selftune 0.2.2 → 0.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -0
- package/apps/local-dashboard/dist/assets/index-C75H1Q3n.css +1 -0
- package/apps/local-dashboard/dist/assets/index-axE4kz3Q.js +15 -0
- package/apps/local-dashboard/dist/assets/vendor-ui-r2k_Ku_V.js +346 -0
- package/apps/local-dashboard/dist/index.html +3 -3
- package/cli/selftune/analytics.ts +354 -0
- package/cli/selftune/badge/badge.ts +2 -2
- package/cli/selftune/dashboard-server.ts +3 -3
- package/cli/selftune/evolution/evolve-body.ts +1 -1
- package/cli/selftune/evolution/evolve.ts +1 -1
- package/cli/selftune/index.ts +15 -1
- package/cli/selftune/init.ts +5 -1
- package/cli/selftune/observability.ts +63 -2
- package/cli/selftune/orchestrate.ts +1 -1
- package/cli/selftune/quickstart.ts +1 -1
- package/cli/selftune/status.ts +2 -2
- package/cli/selftune/types.ts +1 -0
- package/cli/selftune/utils/llm-call.ts +2 -1
- package/package.json +5 -3
- package/packages/ui/README.md +113 -0
- package/packages/ui/index.ts +10 -0
- package/packages/ui/package.json +62 -0
- package/packages/ui/src/components/ActivityTimeline.tsx +171 -0
- package/packages/ui/src/components/EvidenceViewer.tsx +718 -0
- package/packages/ui/src/components/EvolutionTimeline.tsx +252 -0
- package/packages/ui/src/components/InfoTip.tsx +19 -0
- package/packages/ui/src/components/OrchestrateRunsPanel.tsx +164 -0
- package/packages/ui/src/components/index.ts +7 -0
- package/packages/ui/src/components/section-cards.tsx +155 -0
- package/packages/ui/src/components/skill-health-grid.tsx +686 -0
- package/packages/ui/src/lib/constants.tsx +43 -0
- package/packages/ui/src/lib/format.ts +37 -0
- package/packages/ui/src/lib/index.ts +3 -0
- package/packages/ui/src/lib/utils.ts +6 -0
- package/packages/ui/src/primitives/badge.tsx +52 -0
- package/packages/ui/src/primitives/button.tsx +58 -0
- package/packages/ui/src/primitives/card.tsx +103 -0
- package/packages/ui/src/primitives/checkbox.tsx +27 -0
- package/packages/ui/src/primitives/collapsible.tsx +7 -0
- package/packages/ui/src/primitives/dropdown-menu.tsx +266 -0
- package/packages/ui/src/primitives/index.ts +55 -0
- package/packages/ui/src/primitives/label.tsx +20 -0
- package/packages/ui/src/primitives/select.tsx +197 -0
- package/packages/ui/src/primitives/table.tsx +114 -0
- package/packages/ui/src/primitives/tabs.tsx +82 -0
- package/packages/ui/src/primitives/tooltip.tsx +64 -0
- package/packages/ui/src/types.ts +87 -0
- package/packages/ui/tsconfig.json +17 -0
- package/skill/SKILL.md +3 -0
- package/skill/Workflows/Telemetry.md +59 -0
- package/apps/local-dashboard/dist/assets/index-C4EOTFZ2.js +0 -15
- package/apps/local-dashboard/dist/assets/index-bl-Webyd.css +0 -1
- package/apps/local-dashboard/dist/assets/vendor-ui-D7_zX_qy.js +0 -346
|
@@ -0,0 +1,346 @@
|
|
|
1
|
+
var Ea=Object.defineProperty;var Ca=(e,t,n)=>t in e?Ea(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var De=(e,t,n)=>Ca(e,typeof t!="symbol"?t+"":t,n);import{r as u,R as Wi,a as xt,j as ie,b as qi}from"./vendor-react-U7zYD9Rg.js";function kr(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}const Hn={};function Zt(e,t,n,o,r){let s={...Tr(e,Hn)};return t&&(s=Dn(s,t)),n&&(s=Dn(s,n)),o&&(s=Dn(s,o)),r&&(s=Dn(s,r)),s}function ka(e){if(e.length===0)return Hn;if(e.length===1)return Tr(e[0],Hn);let t={...Tr(e[0],Hn)};for(let n=1;n<e.length;n+=1)t=Dn(t,e[n]);return t}function Dn(e,t){return Gi(t)?t(e):Ta(e,t)}function Ta(e,t){if(!t)return e;for(const n in t){const o=t[n];switch(n){case"style":{e[n]=kr(e.style,o);break}case"className":{e[n]=Ki(e.className,o);break}default:Ma(n,o)?e[n]=Ia(e[n],o):e[n]=o}}return e}function Ma(e,t){const n=e.charCodeAt(0),o=e.charCodeAt(1),r=e.charCodeAt(2);return n===111&&o===110&&r>=65&&r<=90&&(typeof t=="function"||typeof t>"u")}function Gi(e){return typeof e=="function"}function Tr(e,t){return Gi(e)?e(t):e??Hn}function Ia(e,t){return t?e?n=>{if(Pa(n)){const r=n;Mr(r);const s=t(r);return r.baseUIHandlerPrevented||e==null||e(r),s}const o=t(n);return e==null||e(n),o}:t:e}function Mr(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function Ki(e,t){return t?e?t+" "+e:t:e}function Pa(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function Oa(e,t){return function(o,...r){const s=new URL(e);return s.searchParams.set("code",o.toString()),r.forEach(i=>s.searchParams.append("args[]",i)),`${t} error #${o}; visit ${s} for the full message.`}}const Be=Oa("https://base-ui.com/production-error","Base UI"),Bs={};function et(e,t){const n=u.useRef(Bs);return n.current===Bs&&(n.current=e(t)),n}function Rt(e,t,n,o){const r=et(Yi).current;return La(r,e,t,n,o)&&Xi(r,[e,t,n,o]),r.callback}function Aa(e){const t=et(Yi).current;return Na(t,e)&&Xi(t,e),t.callback}function Yi(){return{callback:null,cleanup:null,refs:[]}}function La(e,t,n,o,r){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==o||e.refs[3]!==r}function Na(e,t){return e.refs.length!==t.length||e.refs.some((n,o)=>n!==t[o])}function Xi(e,t){if(e.refs=t,t.every(n=>n==null)){e.callback=null;return}e.callback=n=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),n!=null){const o=Array(t.length).fill(null);for(let r=0;r<t.length;r+=1){const s=t[r];if(s!=null)switch(typeof s){case"function":{const i=s(n);typeof i=="function"&&(o[r]=i);break}case"object":{s.current=n;break}}}e.cleanup=()=>{for(let r=0;r<t.length;r+=1){const s=t[r];if(s!=null)switch(typeof s){case"function":{const i=o[r];typeof i=="function"?i():s(null);break}case"object":{s.current=null;break}}}}}}}const Fa=parseInt(u.version,10);function Wr(e){return Fa>=e}function zs(e){if(!u.isValidElement(e))return null;const t=e,n=t.props;return(Wr(19)?n==null?void 0:n.ref:t.ref)??null}function Da(e,t){const n={};for(const o in e){const r=e[o];if(t!=null&&t.hasOwnProperty(o)){const s=t[o](r);s!=null&&Object.assign(n,s);continue}r===!0?n[`data-${o.toLowerCase()}`]="":r&&(n[`data-${o.toLowerCase()}`]=r.toString())}return n}function Va(e,t){return typeof e=="function"?e(t):e}function _a(e,t){return typeof e=="function"?e(t):e}function st(){}const Jt=Object.freeze([]),Ue=Object.freeze({}),Ha=500,Ba=500,za={style:{transition:"none"}},$a="data-base-ui-click-trigger",Zi={fallbackAxisSide:"none"},Ji={fallbackAxisSide:"end"},ja={clipPath:"inset(50%)",position:"fixed",top:0,left:0};function Se(e,t,n={}){const o=t.render,r=Ua(t,n);if(n.enabled===!1)return null;const s=n.state??Ue;return qa(e,o,r,s)}function Ua(e,t={}){const{className:n,style:o,render:r}=e,{state:s=Ue,ref:i,props:c,stateAttributesMapping:a,enabled:l=!0}=t,d=l?Va(n,s):void 0,f=l?_a(o,s):void 0,g=l?Da(s,a):Ue,h=l?kr(g,Array.isArray(c)?ka(c):c)??Ue:Ue;return typeof document<"u"&&(l?Array.isArray(i)?h.ref=Aa([h.ref,zs(r),...i]):h.ref=Rt(h.ref,zs(r),i):Rt(null,null)),l?(d!==void 0&&(h.className=Ki(h.className,d)),f!==void 0&&(h.style=kr(h.style,f)),h):Ue}const Wa=Symbol.for("react.lazy");function qa(e,t,n,o){if(t){if(typeof t=="function")return t(n,o);const r=Zt(n,t.props);r.ref=n.ref;let s=t;return(s==null?void 0:s.$$typeof)===Wa&&(s=u.Children.toArray(t)[0]),u.cloneElement(s,r)}if(e&&typeof e=="string")return Ga(e,n);throw new Error(Be(8))}function Ga(e,t){return e==="button"?u.createElement("button",{type:"button",...t,key:t.key}):e==="img"?u.createElement("img",{alt:"",...t,key:t.key}):u.createElement(e,t)}function qh(e){return Se(e.defaultTagName??"div",e,e)}function Qi(e){var t,n,o="";if(typeof e=="string"||typeof e=="number")o+=e;else if(typeof e=="object")if(Array.isArray(e)){var r=e.length;for(t=0;t<r;t++)e[t]&&(n=Qi(e[t]))&&(o&&(o+=" "),o+=n)}else for(n in e)e[n]&&(o&&(o+=" "),o+=n);return o}function Ka(){for(var e,t,n=0,o="",r=arguments.length;n<r;n++)(e=arguments[n])&&(t=Qi(e))&&(o&&(o+=" "),o+=t);return o}const $s=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,js=Ka,Gh=(e,t)=>n=>{var o;if((t==null?void 0:t.variants)==null)return js(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:r,defaultVariants:s}=t,i=Object.keys(r).map(l=>{const d=n==null?void 0:n[l],f=s==null?void 0:s[l];if(d===null)return null;const g=$s(d)||$s(f);return r[l][g]}),c=n&&Object.entries(n).reduce((l,d)=>{let[f,g]=d;return g===void 0||(l[f]=g),l},{}),a=t==null||(o=t.compoundVariants)===null||o===void 0?void 0:o.reduce((l,d)=>{let{class:f,className:g,...h}=d;return Object.entries(h).every(p=>{let[m,b]=p;return Array.isArray(b)?b.includes({...s,...c}[m]):{...s,...c}[m]===b})?[...l,f,g]:l},[]);return js(e,i,a,n==null?void 0:n.class,n==null?void 0:n.className)},Ya=(e,t)=>{const n=new Array(e.length+t.length);for(let o=0;o<e.length;o++)n[o]=e[o];for(let o=0;o<t.length;o++)n[e.length+o]=t[o];return n},Xa=(e,t)=>({classGroupId:e,validator:t}),ec=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Po="-",Us=[],Za="arbitrary..",Ja=e=>{const t=eu(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:i=>{if(i.startsWith("[")&&i.endsWith("]"))return Qa(i);const c=i.split(Po),a=c[0]===""&&c.length>1?1:0;return tc(c,a,t)},getConflictingClassGroupIds:(i,c)=>{if(c){const a=o[i],l=n[i];return a?l?Ya(l,a):a:l||Us}return n[i]||Us}}},tc=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const r=e[t],s=n.nextPart.get(r);if(s){const l=tc(e,t+1,s);if(l)return l}const i=n.validators;if(i===null)return;const c=t===0?e.join(Po):e.slice(t).join(Po),a=i.length;for(let l=0;l<a;l++){const d=i[l];if(d.validator(c))return d.classGroupId}},Qa=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),o=t.slice(0,n);return o?Za+o:void 0})(),eu=e=>{const{theme:t,classGroups:n}=e;return tu(n,t)},tu=(e,t)=>{const n=ec();for(const o in e){const r=e[o];qr(r,n,o,t)}return n},qr=(e,t,n,o)=>{const r=e.length;for(let s=0;s<r;s++){const i=e[s];nu(i,t,n,o)}},nu=(e,t,n,o)=>{if(typeof e=="string"){ou(e,t,n);return}if(typeof e=="function"){ru(e,t,n,o);return}su(e,t,n,o)},ou=(e,t,n)=>{const o=e===""?t:nc(t,e);o.classGroupId=n},ru=(e,t,n,o)=>{if(iu(e)){qr(e(o),t,n,o);return}t.validators===null&&(t.validators=[]),t.validators.push(Xa(n,e))},su=(e,t,n,o)=>{const r=Object.entries(e),s=r.length;for(let i=0;i<s;i++){const[c,a]=r[i];qr(a,nc(t,c),n,o)}},nc=(e,t)=>{let n=e;const o=t.split(Po),r=o.length;for(let s=0;s<r;s++){const i=o[s];let c=n.nextPart.get(i);c||(c=ec(),n.nextPart.set(i,c)),n=c}return n},iu=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,cu=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),o=Object.create(null);const r=(s,i)=>{n[s]=i,t++,t>e&&(t=0,o=n,n=Object.create(null))};return{get(s){let i=n[s];if(i!==void 0)return i;if((i=o[s])!==void 0)return r(s,i),i},set(s,i){s in n?n[s]=i:r(s,i)}}},Ir="!",Ws=":",lu=[],qs=(e,t,n,o,r)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:o,isExternal:r}),au=e=>{const{prefix:t,experimentalParseClassName:n}=e;let o=r=>{const s=[];let i=0,c=0,a=0,l;const d=r.length;for(let m=0;m<d;m++){const b=r[m];if(i===0&&c===0){if(b===Ws){s.push(r.slice(a,m)),a=m+1;continue}if(b==="/"){l=m;continue}}b==="["?i++:b==="]"?i--:b==="("?c++:b===")"&&c--}const f=s.length===0?r:r.slice(a);let g=f,h=!1;f.endsWith(Ir)?(g=f.slice(0,-1),h=!0):f.startsWith(Ir)&&(g=f.slice(1),h=!0);const p=l&&l>a?l-a:void 0;return qs(s,h,g,p)};if(t){const r=t+Ws,s=o;o=i=>i.startsWith(r)?s(i.slice(r.length)):qs(lu,!1,i,void 0,!0)}if(n){const r=o;o=s=>n({className:s,parseClassName:r})}return o},uu=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,o)=>{t.set(n,1e6+o)}),n=>{const o=[];let r=[];for(let s=0;s<n.length;s++){const i=n[s],c=i[0]==="[",a=t.has(i);c||a?(r.length>0&&(r.sort(),o.push(...r),r=[]),o.push(i)):r.push(i)}return r.length>0&&(r.sort(),o.push(...r)),o}},du=e=>({cache:cu(e.cacheSize),parseClassName:au(e),sortModifiers:uu(e),...Ja(e)}),fu=/\s+/,pu=(e,t)=>{const{parseClassName:n,getClassGroupId:o,getConflictingClassGroupIds:r,sortModifiers:s}=t,i=[],c=e.trim().split(fu);let a="";for(let l=c.length-1;l>=0;l-=1){const d=c[l],{isExternal:f,modifiers:g,hasImportantModifier:h,baseClassName:p,maybePostfixModifierPosition:m}=n(d);if(f){a=d+(a.length>0?" "+a:a);continue}let b=!!m,x=o(b?p.substring(0,m):p);if(!x){if(!b){a=d+(a.length>0?" "+a:a);continue}if(x=o(p),!x){a=d+(a.length>0?" "+a:a);continue}b=!1}const y=g.length===0?"":g.length===1?g[0]:s(g).join(":"),w=h?y+Ir:y,S=w+x;if(i.indexOf(S)>-1)continue;i.push(S);const v=r(x,b);for(let R=0;R<v.length;++R){const I=v[R];i.push(w+I)}a=d+(a.length>0?" "+a:a)}return a},gu=(...e)=>{let t=0,n,o,r="";for(;t<e.length;)(n=e[t++])&&(o=oc(n))&&(r&&(r+=" "),r+=o);return r},oc=e=>{if(typeof e=="string")return e;let t,n="";for(let o=0;o<e.length;o++)e[o]&&(t=oc(e[o]))&&(n&&(n+=" "),n+=t);return n},mu=(e,...t)=>{let n,o,r,s;const i=a=>{const l=t.reduce((d,f)=>f(d),e());return n=du(l),o=n.cache.get,r=n.cache.set,s=c,c(a)},c=a=>{const l=o(a);if(l)return l;const d=pu(a,n);return r(a,d),d};return s=i,(...a)=>s(gu(...a))},hu=[],Qe=e=>{const t=n=>n[e]||hu;return t.isThemeGetter=!0,t},rc=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,sc=/^\((?:(\w[\w-]*):)?(.+)\)$/i,bu=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,yu=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,vu=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,xu=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Ru=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,wu=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,qt=e=>bu.test(e),Ie=e=>!!e&&!Number.isNaN(Number(e)),Gt=e=>!!e&&Number.isInteger(Number(e)),lr=e=>e.endsWith("%")&&Ie(e.slice(0,-1)),Nt=e=>yu.test(e),ic=()=>!0,Su=e=>vu.test(e)&&!xu.test(e),Gr=()=>!1,Eu=e=>Ru.test(e),Cu=e=>wu.test(e),ku=e=>!ae(e)&&!ue(e),Tu=e=>en(e,ac,Gr),ae=e=>rc.test(e),cn=e=>en(e,uc,Su),Gs=e=>en(e,Fu,Ie),Mu=e=>en(e,fc,ic),Iu=e=>en(e,dc,Gr),Ks=e=>en(e,cc,Gr),Pu=e=>en(e,lc,Cu),co=e=>en(e,pc,Eu),ue=e=>sc.test(e),Ln=e=>hn(e,uc),Ou=e=>hn(e,dc),Ys=e=>hn(e,cc),Au=e=>hn(e,ac),Lu=e=>hn(e,lc),lo=e=>hn(e,pc,!0),Nu=e=>hn(e,fc,!0),en=(e,t,n)=>{const o=rc.exec(e);return o?o[1]?t(o[1]):n(o[2]):!1},hn=(e,t,n=!1)=>{const o=sc.exec(e);return o?o[1]?t(o[1]):n:!1},cc=e=>e==="position"||e==="percentage",lc=e=>e==="image"||e==="url",ac=e=>e==="length"||e==="size"||e==="bg-size",uc=e=>e==="length",Fu=e=>e==="number",dc=e=>e==="family-name",fc=e=>e==="number"||e==="weight",pc=e=>e==="shadow",Du=()=>{const e=Qe("color"),t=Qe("font"),n=Qe("text"),o=Qe("font-weight"),r=Qe("tracking"),s=Qe("leading"),i=Qe("breakpoint"),c=Qe("container"),a=Qe("spacing"),l=Qe("radius"),d=Qe("shadow"),f=Qe("inset-shadow"),g=Qe("text-shadow"),h=Qe("drop-shadow"),p=Qe("blur"),m=Qe("perspective"),b=Qe("aspect"),x=Qe("ease"),y=Qe("animate"),w=()=>["auto","avoid","all","avoid-page","page","left","right","column"],S=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],v=()=>[...S(),ue,ae],R=()=>["auto","hidden","clip","visible","scroll"],I=()=>["auto","contain","none"],E=()=>[ue,ae,a],T=()=>[qt,"full","auto",...E()],V=()=>[Gt,"none","subgrid",ue,ae],_=()=>["auto",{span:["full",Gt,ue,ae]},Gt,ue,ae],M=()=>[Gt,"auto",ue,ae],C=()=>["auto","min","max","fr",ue,ae],O=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],k=()=>["start","end","center","stretch","center-safe","end-safe"],D=()=>["auto",...E()],P=()=>[qt,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...E()],L=()=>[qt,"screen","full","dvw","lvw","svw","min","max","fit",...E()],N=()=>[qt,"screen","full","lh","dvh","lvh","svh","min","max","fit",...E()],F=()=>[e,ue,ae],U=()=>[...S(),Ys,Ks,{position:[ue,ae]}],H=()=>["no-repeat",{repeat:["","x","y","space","round"]}],ce=()=>["auto","cover","contain",Au,Tu,{size:[ue,ae]}],G=()=>[lr,Ln,cn],Z=()=>["","none","full",l,ue,ae],$=()=>["",Ie,Ln,cn],K=()=>["solid","dashed","dotted","double"],Y=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],oe=()=>[Ie,lr,Ys,Ks],se=()=>["","none",p,ue,ae],re=()=>["none",Ie,ue,ae],me=()=>["none",Ie,ue,ae],te=()=>[Ie,ue,ae],X=()=>[qt,"full",...E()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Nt],breakpoint:[Nt],color:[ic],container:[Nt],"drop-shadow":[Nt],ease:["in","out","in-out"],font:[ku],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Nt],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Nt],shadow:[Nt],spacing:["px",Ie],text:[Nt],"text-shadow":[Nt],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",qt,ae,ue,b]}],container:["container"],columns:[{columns:[Ie,ae,ue,c]}],"break-after":[{"break-after":w()}],"break-before":[{"break-before":w()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:v()}],overflow:[{overflow:R()}],"overflow-x":[{"overflow-x":R()}],"overflow-y":[{"overflow-y":R()}],overscroll:[{overscroll:I()}],"overscroll-x":[{"overscroll-x":I()}],"overscroll-y":[{"overscroll-y":I()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{"inset-s":T(),start:T()}],end:[{"inset-e":T(),end:T()}],"inset-bs":[{"inset-bs":T()}],"inset-be":[{"inset-be":T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:["visible","invisible","collapse"],z:[{z:[Gt,"auto",ue,ae]}],basis:[{basis:[qt,"full","auto",c,...E()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Ie,qt,"auto","initial","none",ae]}],grow:[{grow:["",Ie,ue,ae]}],shrink:[{shrink:["",Ie,ue,ae]}],order:[{order:[Gt,"first","last","none",ue,ae]}],"grid-cols":[{"grid-cols":V()}],"col-start-end":[{col:_()}],"col-start":[{"col-start":M()}],"col-end":[{"col-end":M()}],"grid-rows":[{"grid-rows":V()}],"row-start-end":[{row:_()}],"row-start":[{"row-start":M()}],"row-end":[{"row-end":M()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":C()}],"auto-rows":[{"auto-rows":C()}],gap:[{gap:E()}],"gap-x":[{"gap-x":E()}],"gap-y":[{"gap-y":E()}],"justify-content":[{justify:[...O(),"normal"]}],"justify-items":[{"justify-items":[...k(),"normal"]}],"justify-self":[{"justify-self":["auto",...k()]}],"align-content":[{content:["normal",...O()]}],"align-items":[{items:[...k(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...k(),{baseline:["","last"]}]}],"place-content":[{"place-content":O()}],"place-items":[{"place-items":[...k(),"baseline"]}],"place-self":[{"place-self":["auto",...k()]}],p:[{p:E()}],px:[{px:E()}],py:[{py:E()}],ps:[{ps:E()}],pe:[{pe:E()}],pbs:[{pbs:E()}],pbe:[{pbe:E()}],pt:[{pt:E()}],pr:[{pr:E()}],pb:[{pb:E()}],pl:[{pl:E()}],m:[{m:D()}],mx:[{mx:D()}],my:[{my:D()}],ms:[{ms:D()}],me:[{me:D()}],mbs:[{mbs:D()}],mbe:[{mbe:D()}],mt:[{mt:D()}],mr:[{mr:D()}],mb:[{mb:D()}],ml:[{ml:D()}],"space-x":[{"space-x":E()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":E()}],"space-y-reverse":["space-y-reverse"],size:[{size:P()}],"inline-size":[{inline:["auto",...L()]}],"min-inline-size":[{"min-inline":["auto",...L()]}],"max-inline-size":[{"max-inline":["none",...L()]}],"block-size":[{block:["auto",...N()]}],"min-block-size":[{"min-block":["auto",...N()]}],"max-block-size":[{"max-block":["none",...N()]}],w:[{w:[c,"screen",...P()]}],"min-w":[{"min-w":[c,"screen","none",...P()]}],"max-w":[{"max-w":[c,"screen","none","prose",{screen:[i]},...P()]}],h:[{h:["screen","lh",...P()]}],"min-h":[{"min-h":["screen","lh","none",...P()]}],"max-h":[{"max-h":["screen","lh",...P()]}],"font-size":[{text:["base",n,Ln,cn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[o,Nu,Mu]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",lr,ae]}],"font-family":[{font:[Ou,Iu,t]}],"font-features":[{"font-features":[ae]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[r,ue,ae]}],"line-clamp":[{"line-clamp":[Ie,"none",ue,Gs]}],leading:[{leading:[s,...E()]}],"list-image":[{"list-image":["none",ue,ae]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ue,ae]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:F()}],"text-color":[{text:F()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...K(),"wavy"]}],"text-decoration-thickness":[{decoration:[Ie,"from-font","auto",ue,cn]}],"text-decoration-color":[{decoration:F()}],"underline-offset":[{"underline-offset":[Ie,"auto",ue,ae]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:E()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ue,ae]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ue,ae]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:U()}],"bg-repeat":[{bg:H()}],"bg-size":[{bg:ce()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Gt,ue,ae],radial:["",ue,ae],conic:[Gt,ue,ae]},Lu,Pu]}],"bg-color":[{bg:F()}],"gradient-from-pos":[{from:G()}],"gradient-via-pos":[{via:G()}],"gradient-to-pos":[{to:G()}],"gradient-from":[{from:F()}],"gradient-via":[{via:F()}],"gradient-to":[{to:F()}],rounded:[{rounded:Z()}],"rounded-s":[{"rounded-s":Z()}],"rounded-e":[{"rounded-e":Z()}],"rounded-t":[{"rounded-t":Z()}],"rounded-r":[{"rounded-r":Z()}],"rounded-b":[{"rounded-b":Z()}],"rounded-l":[{"rounded-l":Z()}],"rounded-ss":[{"rounded-ss":Z()}],"rounded-se":[{"rounded-se":Z()}],"rounded-ee":[{"rounded-ee":Z()}],"rounded-es":[{"rounded-es":Z()}],"rounded-tl":[{"rounded-tl":Z()}],"rounded-tr":[{"rounded-tr":Z()}],"rounded-br":[{"rounded-br":Z()}],"rounded-bl":[{"rounded-bl":Z()}],"border-w":[{border:$()}],"border-w-x":[{"border-x":$()}],"border-w-y":[{"border-y":$()}],"border-w-s":[{"border-s":$()}],"border-w-e":[{"border-e":$()}],"border-w-bs":[{"border-bs":$()}],"border-w-be":[{"border-be":$()}],"border-w-t":[{"border-t":$()}],"border-w-r":[{"border-r":$()}],"border-w-b":[{"border-b":$()}],"border-w-l":[{"border-l":$()}],"divide-x":[{"divide-x":$()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":$()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...K(),"hidden","none"]}],"divide-style":[{divide:[...K(),"hidden","none"]}],"border-color":[{border:F()}],"border-color-x":[{"border-x":F()}],"border-color-y":[{"border-y":F()}],"border-color-s":[{"border-s":F()}],"border-color-e":[{"border-e":F()}],"border-color-bs":[{"border-bs":F()}],"border-color-be":[{"border-be":F()}],"border-color-t":[{"border-t":F()}],"border-color-r":[{"border-r":F()}],"border-color-b":[{"border-b":F()}],"border-color-l":[{"border-l":F()}],"divide-color":[{divide:F()}],"outline-style":[{outline:[...K(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Ie,ue,ae]}],"outline-w":[{outline:["",Ie,Ln,cn]}],"outline-color":[{outline:F()}],shadow:[{shadow:["","none",d,lo,co]}],"shadow-color":[{shadow:F()}],"inset-shadow":[{"inset-shadow":["none",f,lo,co]}],"inset-shadow-color":[{"inset-shadow":F()}],"ring-w":[{ring:$()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:F()}],"ring-offset-w":[{"ring-offset":[Ie,cn]}],"ring-offset-color":[{"ring-offset":F()}],"inset-ring-w":[{"inset-ring":$()}],"inset-ring-color":[{"inset-ring":F()}],"text-shadow":[{"text-shadow":["none",g,lo,co]}],"text-shadow-color":[{"text-shadow":F()}],opacity:[{opacity:[Ie,ue,ae]}],"mix-blend":[{"mix-blend":[...Y(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Y()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Ie]}],"mask-image-linear-from-pos":[{"mask-linear-from":oe()}],"mask-image-linear-to-pos":[{"mask-linear-to":oe()}],"mask-image-linear-from-color":[{"mask-linear-from":F()}],"mask-image-linear-to-color":[{"mask-linear-to":F()}],"mask-image-t-from-pos":[{"mask-t-from":oe()}],"mask-image-t-to-pos":[{"mask-t-to":oe()}],"mask-image-t-from-color":[{"mask-t-from":F()}],"mask-image-t-to-color":[{"mask-t-to":F()}],"mask-image-r-from-pos":[{"mask-r-from":oe()}],"mask-image-r-to-pos":[{"mask-r-to":oe()}],"mask-image-r-from-color":[{"mask-r-from":F()}],"mask-image-r-to-color":[{"mask-r-to":F()}],"mask-image-b-from-pos":[{"mask-b-from":oe()}],"mask-image-b-to-pos":[{"mask-b-to":oe()}],"mask-image-b-from-color":[{"mask-b-from":F()}],"mask-image-b-to-color":[{"mask-b-to":F()}],"mask-image-l-from-pos":[{"mask-l-from":oe()}],"mask-image-l-to-pos":[{"mask-l-to":oe()}],"mask-image-l-from-color":[{"mask-l-from":F()}],"mask-image-l-to-color":[{"mask-l-to":F()}],"mask-image-x-from-pos":[{"mask-x-from":oe()}],"mask-image-x-to-pos":[{"mask-x-to":oe()}],"mask-image-x-from-color":[{"mask-x-from":F()}],"mask-image-x-to-color":[{"mask-x-to":F()}],"mask-image-y-from-pos":[{"mask-y-from":oe()}],"mask-image-y-to-pos":[{"mask-y-to":oe()}],"mask-image-y-from-color":[{"mask-y-from":F()}],"mask-image-y-to-color":[{"mask-y-to":F()}],"mask-image-radial":[{"mask-radial":[ue,ae]}],"mask-image-radial-from-pos":[{"mask-radial-from":oe()}],"mask-image-radial-to-pos":[{"mask-radial-to":oe()}],"mask-image-radial-from-color":[{"mask-radial-from":F()}],"mask-image-radial-to-color":[{"mask-radial-to":F()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":S()}],"mask-image-conic-pos":[{"mask-conic":[Ie]}],"mask-image-conic-from-pos":[{"mask-conic-from":oe()}],"mask-image-conic-to-pos":[{"mask-conic-to":oe()}],"mask-image-conic-from-color":[{"mask-conic-from":F()}],"mask-image-conic-to-color":[{"mask-conic-to":F()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:U()}],"mask-repeat":[{mask:H()}],"mask-size":[{mask:ce()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ue,ae]}],filter:[{filter:["","none",ue,ae]}],blur:[{blur:se()}],brightness:[{brightness:[Ie,ue,ae]}],contrast:[{contrast:[Ie,ue,ae]}],"drop-shadow":[{"drop-shadow":["","none",h,lo,co]}],"drop-shadow-color":[{"drop-shadow":F()}],grayscale:[{grayscale:["",Ie,ue,ae]}],"hue-rotate":[{"hue-rotate":[Ie,ue,ae]}],invert:[{invert:["",Ie,ue,ae]}],saturate:[{saturate:[Ie,ue,ae]}],sepia:[{sepia:["",Ie,ue,ae]}],"backdrop-filter":[{"backdrop-filter":["","none",ue,ae]}],"backdrop-blur":[{"backdrop-blur":se()}],"backdrop-brightness":[{"backdrop-brightness":[Ie,ue,ae]}],"backdrop-contrast":[{"backdrop-contrast":[Ie,ue,ae]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Ie,ue,ae]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Ie,ue,ae]}],"backdrop-invert":[{"backdrop-invert":["",Ie,ue,ae]}],"backdrop-opacity":[{"backdrop-opacity":[Ie,ue,ae]}],"backdrop-saturate":[{"backdrop-saturate":[Ie,ue,ae]}],"backdrop-sepia":[{"backdrop-sepia":["",Ie,ue,ae]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":E()}],"border-spacing-x":[{"border-spacing-x":E()}],"border-spacing-y":[{"border-spacing-y":E()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ue,ae]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Ie,"initial",ue,ae]}],ease:[{ease:["linear","initial",x,ue,ae]}],delay:[{delay:[Ie,ue,ae]}],animate:[{animate:["none",y,ue,ae]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[m,ue,ae]}],"perspective-origin":[{"perspective-origin":v()}],rotate:[{rotate:re()}],"rotate-x":[{"rotate-x":re()}],"rotate-y":[{"rotate-y":re()}],"rotate-z":[{"rotate-z":re()}],scale:[{scale:me()}],"scale-x":[{"scale-x":me()}],"scale-y":[{"scale-y":me()}],"scale-z":[{"scale-z":me()}],"scale-3d":["scale-3d"],skew:[{skew:te()}],"skew-x":[{"skew-x":te()}],"skew-y":[{"skew-y":te()}],transform:[{transform:[ue,ae,"","none","gpu","cpu"]}],"transform-origin":[{origin:v()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:X()}],"translate-x":[{"translate-x":X()}],"translate-y":[{"translate-y":X()}],"translate-z":[{"translate-z":X()}],"translate-none":["translate-none"],accent:[{accent:F()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:F()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ue,ae]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":E()}],"scroll-mx":[{"scroll-mx":E()}],"scroll-my":[{"scroll-my":E()}],"scroll-ms":[{"scroll-ms":E()}],"scroll-me":[{"scroll-me":E()}],"scroll-mbs":[{"scroll-mbs":E()}],"scroll-mbe":[{"scroll-mbe":E()}],"scroll-mt":[{"scroll-mt":E()}],"scroll-mr":[{"scroll-mr":E()}],"scroll-mb":[{"scroll-mb":E()}],"scroll-ml":[{"scroll-ml":E()}],"scroll-p":[{"scroll-p":E()}],"scroll-px":[{"scroll-px":E()}],"scroll-py":[{"scroll-py":E()}],"scroll-ps":[{"scroll-ps":E()}],"scroll-pe":[{"scroll-pe":E()}],"scroll-pbs":[{"scroll-pbs":E()}],"scroll-pbe":[{"scroll-pbe":E()}],"scroll-pt":[{"scroll-pt":E()}],"scroll-pr":[{"scroll-pr":E()}],"scroll-pb":[{"scroll-pb":E()}],"scroll-pl":[{"scroll-pl":E()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ue,ae]}],fill:[{fill:["none",...F()]}],"stroke-w":[{stroke:[Ie,Ln,cn,Gs]}],stroke:[{stroke:["none",...F()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},Kh=mu(Du);function $o(){return typeof window<"u"}function tn(e){return Kr(e)?(e.nodeName||"").toLowerCase():"#document"}function Ke(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ot(e){var t;return(t=(Kr(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Kr(e){return $o()?e instanceof Node||e instanceof Ke(e).Node:!1}function Le(e){return $o()?e instanceof Element||e instanceof Ke(e).Element:!1}function je(e){return $o()?e instanceof HTMLElement||e instanceof Ke(e).HTMLElement:!1}function Un(e){return!$o()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Ke(e).ShadowRoot}function nn(e){const{overflow:t,overflowX:n,overflowY:o,display:r}=pt(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&r!=="inline"&&r!=="contents"}function Vu(e){return/^(table|td|th)$/.test(tn(e))}function jo(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const _u=/transform|translate|scale|rotate|perspective|filter/,Hu=/paint|layout|strict|content/,ln=e=>!!e&&e!=="none";let ar;function Yr(e){const t=Le(e)?pt(e):e;return ln(t.transform)||ln(t.translate)||ln(t.scale)||ln(t.rotate)||ln(t.perspective)||!Uo()&&(ln(t.backdropFilter)||ln(t.filter))||_u.test(t.willChange||"")||Hu.test(t.contain||"")}function Bu(e){let t=It(e);for(;je(t)&&!Tt(t);){if(Yr(t))return t;if(jo(t))return null;t=It(t)}return null}function Uo(){return ar==null&&(ar=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),ar}function Tt(e){return/^(html|body|#document)$/.test(tn(e))}function pt(e){return Ke(e).getComputedStyle(e)}function Wo(e){return Le(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function It(e){if(tn(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Un(e)&&e.host||Ot(e);return Un(t)?t.host:t}function gc(e){const t=It(e);return Tt(t)?e.ownerDocument?e.ownerDocument.body:e.body:je(t)&&nn(t)?t:gc(t)}function Wn(e,t,n){var o;t===void 0&&(t=[]),n===void 0&&(n=!0);const r=gc(e),s=r===((o=e.ownerDocument)==null?void 0:o.body),i=Ke(r);if(s){const c=Pr(i);return t.concat(i,i.visualViewport||[],nn(r)?r:[],c&&n?Wn(c):[])}else return t.concat(r,Wn(r,[],n))}function Pr(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const ur=Wi[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],zu=ur&&ur!==u.useLayoutEffect?ur:e=>e();function ne(e){const t=et($u).current;return t.next=e,zu(t.effect),t.trampoline}function $u(){const e={next:void 0,callback:ju,trampoline:(...t)=>{var n;return(n=e.callback)==null?void 0:n.call(e,...t)},effect:()=>{e.callback=e.next}};return e}function ju(){}const Uu={...Wi},Wu=()=>{},J=typeof document<"u"?u.useLayoutEffect:Wu,mc=u.createContext(void 0);function Xr(e=!1){const t=u.useContext(mc);if(t===void 0&&!e)throw new Error(Be(16));return t}function qu(e){const{focusableWhenDisabled:t,disabled:n,composite:o=!1,tabIndex:r=0,isNativeButton:s}=e,i=o&&t!==!1,c=o&&t===!1;return{props:u.useMemo(()=>{const l={onKeyDown(d){n&&t&&d.key!=="Tab"&&d.preventDefault()}};return o||(l.tabIndex=r,!s&&n&&(l.tabIndex=t?r:-1)),(s&&(t||i)||!s&&n)&&(l["aria-disabled"]=n),s&&(!t||c)&&(l.disabled=n),l},[o,n,t,i,c,s,r])}}function zt(e={}){const{disabled:t=!1,focusableWhenDisabled:n,tabIndex:o=0,native:r=!0,composite:s}=e,i=u.useRef(null),c=Xr(!0),a=s??c!==void 0,{props:l}=qu({focusableWhenDisabled:n,disabled:t,composite:a,tabIndex:o,isNativeButton:r}),d=u.useCallback(()=>{const h=i.current;dr(h)&&a&&t&&l.disabled===void 0&&h.disabled&&(h.disabled=!1)},[t,l.disabled,a]);J(d,[d]);const f=u.useCallback((h={})=>{const{onClick:p,onMouseDown:m,onKeyUp:b,onKeyDown:x,onPointerDown:y,...w}=h;return Zt({type:r?"button":void 0,onClick(v){if(t){v.preventDefault();return}p==null||p(v)},onMouseDown(v){t||m==null||m(v)},onKeyDown(v){if(t||(Mr(v),x==null||x(v),v.baseUIHandlerPrevented))return;const R=v.target===v.currentTarget,I=v.currentTarget,E=dr(I),T=!r&&Gu(I),V=R&&(r?E:!T),_=v.key==="Enter",M=v.key===" ",C=I.getAttribute("role"),O=(C==null?void 0:C.startsWith("menuitem"))||C==="option"||C==="gridcell";if(R&&a&&M){if(v.defaultPrevented&&O)return;v.preventDefault(),T||r&&E?(I.click(),v.preventBaseUIHandler()):V&&(p==null||p(v),v.preventBaseUIHandler());return}V&&(!r&&(M||_)&&v.preventDefault(),!r&&_&&(p==null||p(v)))},onKeyUp(v){if(!t){if(Mr(v),b==null||b(v),v.target===v.currentTarget&&r&&a&&dr(v.currentTarget)&&v.key===" "){v.preventDefault();return}v.baseUIHandlerPrevented||v.target===v.currentTarget&&!r&&!a&&v.key===" "&&(p==null||p(v))}},onPointerDown(v){if(t){v.preventDefault();return}y==null||y(v)}},r?void 0:{role:"button"},l,w)},[t,l,a,r]),g=ne(h=>{i.current=h,d()});return{getButtonProps:f,buttonRef:g}}function dr(e){return je(e)&&e.tagName==="BUTTON"}function Gu(e){return!!((e==null?void 0:e.tagName)==="A"&&(e!=null&&e.href))}const Yh=u.forwardRef(function(t,n){const{render:o,className:r,disabled:s=!1,focusableWhenDisabled:i=!1,nativeButton:c=!0,...a}=t,{getButtonProps:l,buttonRef:d}=zt({disabled:s,focusableWhenDisabled:i,native:c});return Se("button",t,{state:{disabled:s},ref:[n,d],props:[a,l]})});function Qt({controlled:e,default:t,name:n,state:o="value"}){const{current:r}=u.useRef(e!==void 0),[s,i]=u.useState(t),c=r?e:s,a=u.useCallback(l=>{r||i(l)},[]);return[c,a]}const hc={clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1},Zr={...hc,position:"fixed",top:0,left:0},bc={...hc,position:"absolute"};let Xs=(function(e){return e.checked="data-checked",e.unchecked="data-unchecked",e.indeterminate="data-indeterminate",e.disabled="data-disabled",e.readonly="data-readonly",e.required="data-required",e.valid="data-valid",e.invalid="data-invalid",e.touched="data-touched",e.dirty="data-dirty",e.filled="data-filled",e.focused="data-focused",e})({}),Zs=(function(e){return e.disabled="data-disabled",e.valid="data-valid",e.invalid="data-invalid",e.touched="data-touched",e.dirty="data-dirty",e.filled="data-filled",e.focused="data-focused",e})({});const Ku={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},Vn={valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},Yu={disabled:!1,...Vn},qo={valid(e){return e===null?null:e?{[Zs.valid]:""}:{[Zs.invalid]:""}}};function yc(e){return u.useMemo(()=>({checked(t){return e.indeterminate?{}:t?{[Xs.checked]:""}:{[Xs.unchecked]:""}},...qo}),[e.indeterminate])}let Js=0;function Xu(e,t="mui"){const[n,o]=u.useState(e),r=e||n;return u.useEffect(()=>{n==null&&(Js+=1,o(`${t}-${Js}`))},[n,t]),r}const Qs=Uu.useId;function bn(e,t){if(Qs!==void 0){const n=Qs();return e??(t?`${t}-${n}`:n)}return Xu(e,t)}function gt(e){return bn(e,"base-ui")}const Zu=u.createContext({invalid:void 0,name:void 0,validityData:{state:Ku,errors:[],error:"",value:"",initialValue:null},setValidityData:st,disabled:void 0,touched:Vn.touched,setTouched:st,dirty:Vn.dirty,setDirty:st,filled:Vn.filled,setFilled:st,focused:Vn.focused,setFocused:st,validate:()=>null,validationMode:"onSubmit",validationDebounceTime:0,shouldValidateOnChange:()=>!1,state:Yu,markedDirtyRef:{current:!1},validation:{getValidationProps:(e=Ue)=>e,getInputValidationProps:(e=Ue)=>e,inputRef:{current:null},commit:async()=>{}}});function Zn(e=!0){const t=u.useContext(Zu);if(t.setValidityData===st&&!e)throw new Error(Be(28));return t}const Ju=u.createContext({disabled:!1});function Qu(){return u.useContext(Ju)}function ed(e,t){return{...e,state:{...e.state,valid:!t&&e.state.valid}}}const td=u.createContext({formRef:{current:{fields:new Map}},errors:{},clearErrors:st,validationMode:"onSubmit",submitAttemptedRef:{current:!1}});function Jr(){return u.useContext(td)}function Qr(e){const{enabled:t=!0,value:n,id:o,name:r,controlRef:s,commit:i}=e,{formRef:c}=Jr(),{invalid:a,markedDirtyRef:l,validityData:d,setValidityData:f}=Zn(),g=ne(e.getValue);J(()=>{if(!t)return;let h=n;h===void 0&&(h=g()),d.initialValue===null&&h!==null&&f(p=>({...p,initialValue:h}))},[t,f,n,d.initialValue,g]),J(()=>{!t||!o||c.current.fields.set(o,{getValue:g,name:r,controlRef:s,validityData:ed(d,a),validate(h=!0){let p=n;p===void 0&&(p=g()),l.current=!0,h?xt.flushSync(()=>i(p)):i(p)}})},[i,s,t,c,g,o,a,l,r,d,n]),J(()=>{const h=c.current.fields;return()=>{o&&h.delete(o)}},[c,o])}const nd=u.createContext({controlId:void 0,registerControlId:st,labelId:void 0,setLabelId:st,messageIds:[],setMessageIds:st,getDescriptionProps:e=>e});function Go(){return u.useContext(nd)}function od(e,t,n,o=!0,r){const[s,i]=u.useState(),c=gt(r?`${r}-label`:void 0),a=e??t??s;return J(()=>{const l=e||t||!o?void 0:rd(n.current,c);s!==l&&i(l)}),a}function rd(e,t){const n=sd(e);if(n)return!n.id&&t&&(n.id=t),n.id||void 0}function sd(e){if(!e)return;const t=e.parentElement;if(t&&t.tagName==="LABEL")return t;const n=e.id;if(n){const r=e.nextElementSibling;if(r&&r.htmlFor===n)return r}const o=e.labels;return o&&o[0]}const id=u.createContext(void 0);function cd(e=!0){const t=u.useContext(id);if(t===void 0&&!e)throw new Error(Be(3));return t}const vc=u.createContext(void 0);function ld(){const e=u.useContext(vc);if(e===void 0)throw new Error(Be(14));return e}const Pt="none",pn="trigger-press",ct="trigger-hover",xn="trigger-focus",Ko="outside-press",fn="item-press",ad="close-press",gn="focus-out",Yo="escape-key",ko="list-navigation",xc="cancel-open",_n="sibling-open",ud="disabled",es="imperative-action",dd="window-resize";function ge(e,t,n,o){let r=!1,s=!1;const i=o??Ue;return{reason:e,event:t??new Event("base-ui"),cancel(){r=!0},allowPropagation(){s=!0},get isCanceled(){return r},get isPropagationAllowed(){return s},trigger:n,...i}}function ts(e,t){const n=u.useRef(e),o=ne(t);J(()=>{n.current!==e&&o(n.current)},[e,o]),J(()=>{n.current=e},[e])}const fd="data-parent",Xh=u.forwardRef(function(t,n){const{checked:o,className:r,defaultChecked:s=!1,"aria-labelledby":i,disabled:c=!1,id:a,indeterminate:l=!1,inputRef:d,name:f,onCheckedChange:g,parent:h=!1,readOnly:p=!1,render:m,required:b=!1,uncheckedValue:x,value:y,nativeButton:w=!1,...S}=t,{clearErrors:v}=Jr(),{disabled:R,name:I,setDirty:E,setFilled:T,setFocused:V,setTouched:_,state:M,validationMode:C,validityData:O,shouldValidateOnChange:k,validation:D}=Zn(),P=Qu(),{labelId:L,controlId:N,registerControlId:F,getDescriptionProps:U}=Go(),H=cd(),ce=H==null?void 0:H.parent,G=ce&&H.allValues,Z=R||P.disabled||(H==null?void 0:H.disabled)||c,$=I??f,K=y??$,Y=gt(),oe=gt();let se=N;G?se=h?oe:`${ce.id}-${K}`:a&&(se=a);let re={};G&&(h?re=H.parent.getParentProps():K&&(re=H.parent.getChildProps(K)));const me=ne(g),{checked:te=o,indeterminate:X=l,onCheckedChange:le,...xe}=re,q=H==null?void 0:H.value,Q=H==null?void 0:H.setValue,j=H==null?void 0:H.defaultValue,B=u.useRef(null),A=et(()=>Symbol("checkbox-control")),z=u.useRef(!1),{getButtonProps:W,buttonRef:de}=zt({disabled:Z,native:w}),be=(H==null?void 0:H.validation)??D,[Ee,Ne]=Qt({controlled:K&&q&&!h?q.includes(K):te,default:K&&j&&!h?j.includes(K):s,name:"Checkbox",state:"checked"});J(()=>{F!==st&&(z.current=!0,F(A.current,se))},[se,H,F,h,A]),u.useEffect(()=>{const Te=A.current;return()=>{!z.current||F===st||(z.current=!1,F(Te,void 0))}},[F,A]),Qr({enabled:!H,id:Y,commit:be.commit,value:Ee,controlRef:B,name:$,getValue:()=>Ee});const Ae=u.useRef(null),ve=Rt(d,Ae,be.inputRef),Pe=od(i,L,Ae,!w,se??void 0);J(()=>{Ae.current&&(Ae.current.indeterminate=X,Ee&&T(!0))},[Ee,X,T]),ts(Ee,()=>{H&&!h||(v($),T(Ee),E(Ee!==O.initialValue),k()?be.commit(Ee):be.commit(Ee,!0))});const Re=Zt({checked:Ee,disabled:Z,name:h?void 0:$,id:w?void 0:se??void 0,required:b,ref:ve,style:$?bc:Zr,tabIndex:-1,type:"checkbox","aria-hidden":!0,onChange(Te){if(Te.nativeEvent.defaultPrevented)return;const $e=Te.target.checked,ke=ge(Pt,Te.nativeEvent);if(le==null||le($e,ke),me($e,ke),!ke.isCanceled&&(Ne($e),K&&q&&Q&&!h)){const Fe=$e?[...q,K]:q.filter(We=>We!==K);Q(Fe,ke)}},onFocus(){var Te;(Te=B.current)==null||Te.focus()}},y!==void 0?{value:(H?Ee&&y:y)||""}:Ue,U,H?be.getValidationProps:be.getInputValidationProps),He=G?!!te:Ee,fe=G&&X||l;u.useEffect(()=>{if(!ce||!K)return;const Te=ce.disabledStatesRef.current;return Te.set(K,Z),()=>{Te.delete(K)}},[ce,Z,K]);const Ce=u.useMemo(()=>({...M,checked:He,disabled:Z,readOnly:p,required:b,indeterminate:fe}),[M,He,Z,p,b,fe]),ze=yc(Ce),Ze=Se("span",t,{state:Ce,ref:[de,B,n,H==null?void 0:H.registerControlRef],props:[{id:w?se??void 0:Y,role:"checkbox","aria-checked":X?"mixed":Ee,"aria-readonly":p||void 0,"aria-required":b||void 0,"aria-labelledby":Pe,[fd]:h?"":void 0,onFocus(){V(!0)},onBlur(){const Te=Ae.current;Te&&(_(!0),V(!1),C==="onBlur"&&be.commit(H?q:Te.checked))},onClick(Te){var $e;p||Z||(Te.preventDefault(),($e=Ae.current)==null||$e.dispatchEvent(new PointerEvent("click",{bubbles:!0,shiftKey:Te.shiftKey,ctrlKey:Te.ctrlKey,altKey:Te.altKey,metaKey:Te.metaKey})))}},U,be.getValidationProps,S,xe,W],stateAttributesMapping:ze});return ie.jsxs(vc.Provider,{value:Ce,children:[Ze,!Ee&&!H&&$&&!h&&x!==void 0&&ie.jsx("input",{type:"hidden",name:$,value:x}),ie.jsx("input",{...Re})]})}),pd=[];function Xo(e){u.useEffect(e,pd)}const ao=null;class gd{constructor(){De(this,"callbacks",[]);De(this,"callbacksCount",0);De(this,"nextId",1);De(this,"startId",1);De(this,"isScheduled",!1);De(this,"tick",t=>{var r;this.isScheduled=!1;const n=this.callbacks,o=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,o>0)for(let s=0;s<n.length;s+=1)(r=n[s])==null||r.call(n,t)})}request(t){const n=this.nextId;return this.nextId+=1,this.callbacks.push(t),this.callbacksCount+=1,(!this.isScheduled||!1)&&(requestAnimationFrame(this.tick),this.isScheduled=!0),n}cancel(t){const n=t-this.startId;n<0||n>=this.callbacks.length||(this.callbacks[n]=null,this.callbacksCount-=1)}}const uo=new gd;class Ge{constructor(){De(this,"currentId",ao);De(this,"cancel",()=>{this.currentId!==ao&&(uo.cancel(this.currentId),this.currentId=ao)});De(this,"disposeEffect",()=>this.cancel)}static create(){return new Ge}static request(t){return uo.request(t)}static cancel(t){return uo.cancel(t)}request(t){this.cancel(),this.currentId=uo.request(()=>{this.currentId=ao,t()})}}function Jn(){const e=et(Ge.create).current;return Xo(e.disposeEffect),e}function Dt(e){return e==null?e:"current"in e?e.current:e}let Ht=(function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e})({});const md={[Ht.startingStyle]:""},hd={[Ht.endingStyle]:""},St={transitionStatus(e){return e==="starting"?md:e==="ending"?hd:null}};function ns(e,t=!1,n=!0){const o=Jn();return ne((r,s=null)=>{o.cancel();function i(){xt.flushSync(r)}const c=Dt(e);if(c==null)return;const a=c;if(typeof a.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED)r();else{let l=function(){const f=Ht.startingStyle;if(!a.hasAttribute(f)){o.request(d);return}const g=new MutationObserver(()=>{a.hasAttribute(f)||(g.disconnect(),d())});g.observe(a,{attributes:!0,attributeFilter:[f]}),s==null||s.addEventListener("abort",()=>g.disconnect(),{once:!0})},d=function(){Promise.all(a.getAnimations().map(f=>f.finished)).then(()=>{s!=null&&s.aborted||i()}).catch(()=>{const f=a.getAnimations();if(n){if(s!=null&&s.aborted)return;i()}else f.length>0&&f.some(g=>g.pending||g.playState!=="finished")&&d()})};if(t){l();return}o.request(d)}})}function mt(e){const{enabled:t=!0,open:n,ref:o,onComplete:r}=e,s=ne(r),i=ns(o,n,!1);u.useEffect(()=>{if(!t)return;const c=new AbortController;return i(s,c.signal),()=>{c.abort()}},[t,n,s,i])}function $t(e,t=!1,n=!1){const[o,r]=u.useState(e&&t?"idle":void 0),[s,i]=u.useState(e);return e&&!s&&(i(!0),r("starting")),!e&&s&&o!=="ending"&&!n&&r("ending"),!e&&!s&&o==="ending"&&r(void 0),J(()=>{if(!e&&s&&o!=="ending"&&n){const c=Ge.request(()=>{r("ending")});return()=>{Ge.cancel(c)}}},[e,s,o,n]),J(()=>{if(!e||t)return;const c=Ge.request(()=>{r(void 0)});return()=>{Ge.cancel(c)}},[t,e]),J(()=>{if(!e||!t)return;e&&s&&o!=="idle"&&r("starting");const c=Ge.request(()=>{r("idle")});return()=>{Ge.cancel(c)}},[t,e,s,r,o]),u.useMemo(()=>({mounted:s,setMounted:i,transitionStatus:o}),[s,o])}const Zh=u.forwardRef(function(t,n){const{render:o,className:r,keepMounted:s=!1,...i}=t,c=ld(),a=c.checked||c.indeterminate,{mounted:l,transitionStatus:d,setMounted:f}=$t(a),g=u.useRef(null),h={...c,transitionStatus:d};mt({open:a,ref:g,onComplete(){a||f(!1)}});const p=yc(c),m=u.useMemo(()=>({...p,...St,...qo}),[p]),b=s||l,x=Se("span",t,{ref:[n,g],state:h,stateAttributesMapping:m,props:i});return b?x:null});/**
|
|
2
|
+
* @license lucide-react v0.577.0 - ISC
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the ISC license.
|
|
5
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/const Rc=(...e)=>e.filter((t,n,o)=>!!t&&t.trim()!==""&&o.indexOf(t)===n).join(" ").trim();/**
|
|
7
|
+
* @license lucide-react v0.577.0 - ISC
|
|
8
|
+
*
|
|
9
|
+
* This source code is licensed under the ISC license.
|
|
10
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
11
|
+
*/const bd=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
|
|
12
|
+
* @license lucide-react v0.577.0 - ISC
|
|
13
|
+
*
|
|
14
|
+
* This source code is licensed under the ISC license.
|
|
15
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
16
|
+
*/const yd=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,o)=>o?o.toUpperCase():n.toLowerCase());/**
|
|
17
|
+
* @license lucide-react v0.577.0 - ISC
|
|
18
|
+
*
|
|
19
|
+
* This source code is licensed under the ISC license.
|
|
20
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
21
|
+
*/const ei=e=>{const t=yd(e);return t.charAt(0).toUpperCase()+t.slice(1)};/**
|
|
22
|
+
* @license lucide-react v0.577.0 - ISC
|
|
23
|
+
*
|
|
24
|
+
* This source code is licensed under the ISC license.
|
|
25
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
26
|
+
*/var vd={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|
27
|
+
* @license lucide-react v0.577.0 - ISC
|
|
28
|
+
*
|
|
29
|
+
* This source code is licensed under the ISC license.
|
|
30
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
31
|
+
*/const xd=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1};/**
|
|
32
|
+
* @license lucide-react v0.577.0 - ISC
|
|
33
|
+
*
|
|
34
|
+
* This source code is licensed under the ISC license.
|
|
35
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
36
|
+
*/const Rd=u.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:o,className:r="",children:s,iconNode:i,...c},a)=>u.createElement("svg",{ref:a,...vd,width:t,height:t,stroke:e,strokeWidth:o?Number(n)*24/Number(t):n,className:Rc("lucide",r),...!s&&!xd(c)&&{"aria-hidden":"true"},...c},[...i.map(([l,d])=>u.createElement(l,d)),...Array.isArray(s)?s:[s]]));/**
|
|
37
|
+
* @license lucide-react v0.577.0 - ISC
|
|
38
|
+
*
|
|
39
|
+
* This source code is licensed under the ISC license.
|
|
40
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
41
|
+
*/const pe=(e,t)=>{const n=u.forwardRef(({className:o,...r},s)=>u.createElement(Rd,{ref:s,iconNode:t,className:Rc(`lucide-${bd(ei(e))}`,`lucide-${e}`,o),...r}));return n.displayName=ei(e),n};/**
|
|
42
|
+
* @license lucide-react v0.577.0 - ISC
|
|
43
|
+
*
|
|
44
|
+
* This source code is licensed under the ISC license.
|
|
45
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
46
|
+
*/const wd=[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]],Jh=pe("activity",wd);/**
|
|
47
|
+
* @license lucide-react v0.577.0 - ISC
|
|
48
|
+
*
|
|
49
|
+
* This source code is licensed under the ISC license.
|
|
50
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
51
|
+
*/const Sd=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],Qh=pe("arrow-left",Sd);/**
|
|
52
|
+
* @license lucide-react v0.577.0 - ISC
|
|
53
|
+
*
|
|
54
|
+
* This source code is licensed under the ISC license.
|
|
55
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
56
|
+
*/const Ed=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],eb=pe("arrow-right",Ed);/**
|
|
57
|
+
* @license lucide-react v0.577.0 - ISC
|
|
58
|
+
*
|
|
59
|
+
* This source code is licensed under the ISC license.
|
|
60
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
61
|
+
*/const Cd=[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]],tb=pe("bot",Cd);/**
|
|
62
|
+
* @license lucide-react v0.577.0 - ISC
|
|
63
|
+
*
|
|
64
|
+
* This source code is licensed under the ISC license.
|
|
65
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
66
|
+
*/const kd=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],nb=pe("check",kd);/**
|
|
67
|
+
* @license lucide-react v0.577.0 - ISC
|
|
68
|
+
*
|
|
69
|
+
* This source code is licensed under the ISC license.
|
|
70
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
71
|
+
*/const Td=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],ob=pe("chevron-down",Td);/**
|
|
72
|
+
* @license lucide-react v0.577.0 - ISC
|
|
73
|
+
*
|
|
74
|
+
* This source code is licensed under the ISC license.
|
|
75
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
76
|
+
*/const Md=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],rb=pe("chevron-left",Md);/**
|
|
77
|
+
* @license lucide-react v0.577.0 - ISC
|
|
78
|
+
*
|
|
79
|
+
* This source code is licensed under the ISC license.
|
|
80
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
81
|
+
*/const Id=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],sb=pe("chevron-right",Id);/**
|
|
82
|
+
* @license lucide-react v0.577.0 - ISC
|
|
83
|
+
*
|
|
84
|
+
* This source code is licensed under the ISC license.
|
|
85
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
86
|
+
*/const Pd=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],ib=pe("chevron-up",Pd);/**
|
|
87
|
+
* @license lucide-react v0.577.0 - ISC
|
|
88
|
+
*
|
|
89
|
+
* This source code is licensed under the ISC license.
|
|
90
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
91
|
+
*/const Od=[["path",{d:"m11 17-5-5 5-5",key:"13zhaf"}],["path",{d:"m18 17-5-5 5-5",key:"h8a8et"}]],cb=pe("chevrons-left",Od);/**
|
|
92
|
+
* @license lucide-react v0.577.0 - ISC
|
|
93
|
+
*
|
|
94
|
+
* This source code is licensed under the ISC license.
|
|
95
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
96
|
+
*/const Ad=[["path",{d:"m6 17 5-5-5-5",key:"xnjwq"}],["path",{d:"m13 17 5-5-5-5",key:"17xmmf"}]],lb=pe("chevrons-right",Ad);/**
|
|
97
|
+
* @license lucide-react v0.577.0 - ISC
|
|
98
|
+
*
|
|
99
|
+
* This source code is licensed under the ISC license.
|
|
100
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
101
|
+
*/const Ld=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],ab=pe("circle-alert",Ld);/**
|
|
102
|
+
* @license lucide-react v0.577.0 - ISC
|
|
103
|
+
*
|
|
104
|
+
* This source code is licensed under the ISC license.
|
|
105
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
106
|
+
*/const Nd=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],ub=pe("circle-check-big",Nd);/**
|
|
107
|
+
* @license lucide-react v0.577.0 - ISC
|
|
108
|
+
*
|
|
109
|
+
* This source code is licensed under the ISC license.
|
|
110
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
111
|
+
*/const Fd=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}]],db=pe("circle-dot",Fd);/**
|
|
112
|
+
* @license lucide-react v0.577.0 - ISC
|
|
113
|
+
*
|
|
114
|
+
* This source code is licensed under the ISC license.
|
|
115
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
116
|
+
*/const Dd=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],fb=pe("circle-question-mark",Dd);/**
|
|
117
|
+
* @license lucide-react v0.577.0 - ISC
|
|
118
|
+
*
|
|
119
|
+
* This source code is licensed under the ISC license.
|
|
120
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
121
|
+
*/const Vd=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],pb=pe("circle-x",Vd);/**
|
|
122
|
+
* @license lucide-react v0.577.0 - ISC
|
|
123
|
+
*
|
|
124
|
+
* This source code is licensed under the ISC license.
|
|
125
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
126
|
+
*/const _d=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]],gb=pe("clock",_d);/**
|
|
127
|
+
* @license lucide-react v0.577.0 - ISC
|
|
128
|
+
*
|
|
129
|
+
* This source code is licensed under the ISC license.
|
|
130
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
131
|
+
*/const Hd=[["path",{d:"M13.744 17.736a6 6 0 1 1-7.48-7.48",key:"bq4yh3"}],["path",{d:"M15 6h1v4",key:"11y1tn"}],["path",{d:"m6.134 14.768.866-.5 2 3.464",key:"17snzx"}],["circle",{cx:"16",cy:"8",r:"6",key:"14bfc9"}]],mb=pe("coins",Hd);/**
|
|
132
|
+
* @license lucide-react v0.577.0 - ISC
|
|
133
|
+
*
|
|
134
|
+
* This source code is licensed under the ISC license.
|
|
135
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
136
|
+
*/const Bd=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"M15 3v18",key:"14nvp0"}]],hb=pe("columns-3",Bd);/**
|
|
137
|
+
* @license lucide-react v0.577.0 - ISC
|
|
138
|
+
*
|
|
139
|
+
* This source code is licensed under the ISC license.
|
|
140
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
141
|
+
*/const zd=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],bb=pe("eye",zd);/**
|
|
142
|
+
* @license lucide-react v0.577.0 - ISC
|
|
143
|
+
*
|
|
144
|
+
* This source code is licensed under the ISC license.
|
|
145
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
146
|
+
*/const $d=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],yb=pe("file-text",$d);/**
|
|
147
|
+
* @license lucide-react v0.577.0 - ISC
|
|
148
|
+
*
|
|
149
|
+
* This source code is licensed under the ISC license.
|
|
150
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
151
|
+
*/const jd=[["path",{d:"M14 2v6a2 2 0 0 0 .245.96l5.51 10.08A2 2 0 0 1 18 22H6a2 2 0 0 1-1.755-2.96l5.51-10.08A2 2 0 0 0 10 8V2",key:"18mbvz"}],["path",{d:"M6.453 15h11.094",key:"3shlmq"}],["path",{d:"M8.5 2h7",key:"csnxdl"}]],vb=pe("flask-conical",jd);/**
|
|
152
|
+
* @license lucide-react v0.577.0 - ISC
|
|
153
|
+
*
|
|
154
|
+
* This source code is licensed under the ISC license.
|
|
155
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
156
|
+
*/const Ud=[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]],xb=pe("folder",Ud);/**
|
|
157
|
+
* @license lucide-react v0.577.0 - ISC
|
|
158
|
+
*
|
|
159
|
+
* This source code is licensed under the ISC license.
|
|
160
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
161
|
+
*/const Wd=[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]],Rb=pe("funnel",Wd);/**
|
|
162
|
+
* @license lucide-react v0.577.0 - ISC
|
|
163
|
+
*
|
|
164
|
+
* This source code is licensed under the ISC license.
|
|
165
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
166
|
+
*/const qd=[["path",{d:"M15 6a9 9 0 0 0-9 9V3",key:"1cii5b"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}]],wb=pe("git-branch",qd);/**
|
|
167
|
+
* @license lucide-react v0.577.0 - ISC
|
|
168
|
+
*
|
|
169
|
+
* This source code is licensed under the ISC license.
|
|
170
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
171
|
+
*/const Gd=[["circle",{cx:"5",cy:"6",r:"3",key:"1qnov2"}],["path",{d:"M5 9v12",key:"ih889a"}],["circle",{cx:"19",cy:"18",r:"3",key:"1qljk2"}],["path",{d:"m15 9-3-3 3-3",key:"1lwv8l"}],["path",{d:"M12 6h5a2 2 0 0 1 2 2v7",key:"1yj91y"}]],Sb=pe("git-pull-request-arrow",Gd);/**
|
|
172
|
+
* @license lucide-react v0.577.0 - ISC
|
|
173
|
+
*
|
|
174
|
+
* This source code is licensed under the ISC license.
|
|
175
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
176
|
+
*/const Kd=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],Eb=pe("globe",Kd);/**
|
|
177
|
+
* @license lucide-react v0.577.0 - ISC
|
|
178
|
+
*
|
|
179
|
+
* This source code is licensed under the ISC license.
|
|
180
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
181
|
+
*/const Yd=[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]],Cb=pe("grip-vertical",Yd);/**
|
|
182
|
+
* @license lucide-react v0.577.0 - ISC
|
|
183
|
+
*
|
|
184
|
+
* This source code is licensed under the ISC license.
|
|
185
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
186
|
+
*/const Xd=[["path",{d:"M10 16h.01",key:"1bzywj"}],["path",{d:"M2.212 11.577a2 2 0 0 0-.212.896V18a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-5.527a2 2 0 0 0-.212-.896L18.55 5.11A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"18tbho"}],["path",{d:"M21.946 12.013H2.054",key:"zqlbp7"}],["path",{d:"M6 16h.01",key:"1pmjb7"}]],kb=pe("hard-drive",Xd);/**
|
|
187
|
+
* @license lucide-react v0.577.0 - ISC
|
|
188
|
+
*
|
|
189
|
+
* This source code is licensed under the ISC license.
|
|
190
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
191
|
+
*/const Zd=[["path",{d:"M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5",key:"mvr1a0"}],["path",{d:"M3.22 13H9.5l.5-1 2 4.5 2-7 1.5 3.5h5.27",key:"auskq0"}]],Tb=pe("heart-pulse",Zd);/**
|
|
192
|
+
* @license lucide-react v0.577.0 - ISC
|
|
193
|
+
*
|
|
194
|
+
* This source code is licensed under the ISC license.
|
|
195
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
196
|
+
*/const Jd=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],Mb=pe("info",Jd);/**
|
|
197
|
+
* @license lucide-react v0.577.0 - ISC
|
|
198
|
+
*
|
|
199
|
+
* This source code is licensed under the ISC license.
|
|
200
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
201
|
+
*/const Qd=[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]],Ib=pe("layers",Qd);/**
|
|
202
|
+
* @license lucide-react v0.577.0 - ISC
|
|
203
|
+
*
|
|
204
|
+
* This source code is licensed under the ISC license.
|
|
205
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
206
|
+
*/const ef=[["path",{d:"M13 5h8",key:"a7qcls"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["path",{d:"m3 7 2 2 4-4",key:"1obspn"}]],Pb=pe("list-checks",ef);/**
|
|
207
|
+
* @license lucide-react v0.577.0 - ISC
|
|
208
|
+
*
|
|
209
|
+
* This source code is licensed under the ISC license.
|
|
210
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
211
|
+
*/const tf=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}],["path",{d:"M7 11h10",key:"1twpyw"}],["path",{d:"M7 15h6",key:"d9of3u"}],["path",{d:"M7 7h8",key:"af5zfr"}]],Ob=pe("message-square-text",tf);/**
|
|
212
|
+
* @license lucide-react v0.577.0 - ISC
|
|
213
|
+
*
|
|
214
|
+
* This source code is licensed under the ISC license.
|
|
215
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
216
|
+
*/const nf=[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]],Ab=pe("moon",nf);/**
|
|
217
|
+
* @license lucide-react v0.577.0 - ISC
|
|
218
|
+
*
|
|
219
|
+
* This source code is licensed under the ISC license.
|
|
220
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
221
|
+
*/const of=[["path",{d:"M12 16h.01",key:"1drbdi"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M15.312 2a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586l-4.688-4.688A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2z",key:"1fd625"}]],Lb=pe("octagon-alert",of);/**
|
|
222
|
+
* @license lucide-react v0.577.0 - ISC
|
|
223
|
+
*
|
|
224
|
+
* This source code is licensed under the ISC license.
|
|
225
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
226
|
+
*/const rf=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]],Nb=pe("panel-left",rf);/**
|
|
227
|
+
* @license lucide-react v0.577.0 - ISC
|
|
228
|
+
*
|
|
229
|
+
* This source code is licensed under the ISC license.
|
|
230
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
231
|
+
*/const sf=[["path",{d:"M12 22v-5",key:"1ega77"}],["path",{d:"M15 8V2",key:"18g5xt"}],["path",{d:"M17 8a1 1 0 0 1 1 1v4a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1z",key:"1xoxul"}],["path",{d:"M9 8V2",key:"14iosj"}]],Fb=pe("plug",sf);/**
|
|
232
|
+
* @license lucide-react v0.577.0 - ISC
|
|
233
|
+
*
|
|
234
|
+
* This source code is licensed under the ISC license.
|
|
235
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
236
|
+
*/const cf=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],Db=pe("refresh-cw",cf);/**
|
|
237
|
+
* @license lucide-react v0.577.0 - ISC
|
|
238
|
+
*
|
|
239
|
+
* This source code is licensed under the ISC license.
|
|
240
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
241
|
+
*/const lf=[["path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5",key:"qeys4"}],["path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09",key:"u4xsad"}],["path",{d:"M9 12a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.4 22.4 0 0 1-4 2z",key:"676m9"}],["path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 .05 5 .05",key:"92ym6u"}]],Vb=pe("rocket",lf);/**
|
|
242
|
+
* @license lucide-react v0.577.0 - ISC
|
|
243
|
+
*
|
|
244
|
+
* This source code is licensed under the ISC license.
|
|
245
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
246
|
+
*/const af=[["path",{d:"m13.5 8.5-5 5",key:"1cs55j"}],["path",{d:"m8.5 8.5 5 5",key:"a8mexj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]],_b=pe("search-x",af);/**
|
|
247
|
+
* @license lucide-react v0.577.0 - ISC
|
|
248
|
+
*
|
|
249
|
+
* This source code is licensed under the ISC license.
|
|
250
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
251
|
+
*/const uf=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],Hb=pe("search",uf);/**
|
|
252
|
+
* @license lucide-react v0.577.0 - ISC
|
|
253
|
+
*
|
|
254
|
+
* This source code is licensed under the ISC license.
|
|
255
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
256
|
+
*/const df=[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]],Bb=pe("server",df);/**
|
|
257
|
+
* @license lucide-react v0.577.0 - ISC
|
|
258
|
+
*
|
|
259
|
+
* This source code is licensed under the ISC license.
|
|
260
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
261
|
+
*/const ff=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],zb=pe("settings",ff);/**
|
|
262
|
+
* @license lucide-react v0.577.0 - ISC
|
|
263
|
+
*
|
|
264
|
+
* This source code is licensed under the ISC license.
|
|
265
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
266
|
+
*/const pf=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]],$b=pe("shield-alert",pf);/**
|
|
267
|
+
* @license lucide-react v0.577.0 - ISC
|
|
268
|
+
*
|
|
269
|
+
* This source code is licensed under the ISC license.
|
|
270
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
271
|
+
*/const gf=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],jb=pe("shield-check",gf);/**
|
|
272
|
+
* @license lucide-react v0.577.0 - ISC
|
|
273
|
+
*
|
|
274
|
+
* This source code is licensed under the ISC license.
|
|
275
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
276
|
+
*/const mf=[["path",{d:"M21 4v16",key:"7j8fe9"}],["path",{d:"M6.029 4.285A2 2 0 0 0 3 6v12a2 2 0 0 0 3.029 1.715l9.997-5.998a2 2 0 0 0 .003-3.432z",key:"zs4d6"}]],Ub=pe("skip-forward",mf);/**
|
|
277
|
+
* @license lucide-react v0.577.0 - ISC
|
|
278
|
+
*
|
|
279
|
+
* This source code is licensed under the ISC license.
|
|
280
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
281
|
+
*/const hf=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],Wb=pe("sun",hf);/**
|
|
282
|
+
* @license lucide-react v0.577.0 - ISC
|
|
283
|
+
*
|
|
284
|
+
* This source code is licensed under the ISC license.
|
|
285
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
286
|
+
*/const bf=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"6",key:"1vlfrh"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]],qb=pe("target",bf);/**
|
|
287
|
+
* @license lucide-react v0.577.0 - ISC
|
|
288
|
+
*
|
|
289
|
+
* This source code is licensed under the ISC license.
|
|
290
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
291
|
+
*/const yf=[["path",{d:"M16 17h6v-6",key:"t6n2it"}],["path",{d:"m22 17-8.5-8.5-5 5L2 7",key:"x473p"}]],Gb=pe("trending-down",yf);/**
|
|
292
|
+
* @license lucide-react v0.577.0 - ISC
|
|
293
|
+
*
|
|
294
|
+
* This source code is licensed under the ISC license.
|
|
295
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
296
|
+
*/const vf=[["path",{d:"M16 7h6v6",key:"box55l"}],["path",{d:"m22 7-8.5 8.5-5-5L2 17",key:"1t1m79"}]],Kb=pe("trending-up",vf);/**
|
|
297
|
+
* @license lucide-react v0.577.0 - ISC
|
|
298
|
+
*
|
|
299
|
+
* This source code is licensed under the ISC license.
|
|
300
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
301
|
+
*/const xf=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],Yb=pe("triangle-alert",xf);/**
|
|
302
|
+
* @license lucide-react v0.577.0 - ISC
|
|
303
|
+
*
|
|
304
|
+
* This source code is licensed under the ISC license.
|
|
305
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
306
|
+
*/const Rf=[["path",{d:"M3 7v6h6",key:"1v2h90"}],["path",{d:"M21 17a9 9 0 0 0-9-9 9 9 0 0 0-6 2.3L3 13",key:"1r6uu6"}]],Xb=pe("undo",Rf);/**
|
|
307
|
+
* @license lucide-react v0.577.0 - ISC
|
|
308
|
+
*
|
|
309
|
+
* This source code is licensed under the ISC license.
|
|
310
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
311
|
+
*/const wf=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Zb=pe("x",wf);/**
|
|
312
|
+
* @license lucide-react v0.577.0 - ISC
|
|
313
|
+
*
|
|
314
|
+
* This source code is licensed under the ISC license.
|
|
315
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
316
|
+
*/const Sf=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],Jb=pe("zap",Sf);function Ef(e){const{open:t,defaultOpen:n,onOpenChange:o,disabled:r}=e,s=t!==void 0,[i,c]=Qt({controlled:t,default:n,name:"Collapsible",state:"open"}),{mounted:a,setMounted:l,transitionStatus:d}=$t(i,!0,!0),[f,g]=u.useState(i),[{height:h,width:p},m]=u.useState({height:void 0,width:void 0}),b=gt(),[x,y]=u.useState(),w=x??b,[S,v]=u.useState(!1),[R,I]=u.useState(!1),E=u.useRef(null),T=u.useRef(null),V=u.useRef(null),_=u.useRef(null),M=ns(_,!1),C=ne(O=>{const k=!i,D=ge(pn,O.nativeEvent);if(o(k,D),D.isCanceled)return;const P=_.current;T.current==="css-animation"&&P!=null&&P.style.removeProperty("animation-name"),!S&&!R&&(T.current!=null&&T.current!=="css-animation"&&!a&&k&&l(!0),T.current==="css-animation"&&(!f&&k&&g(!0),!a&&k&&l(!0))),c(k),T.current==="none"&&a&&!k&&l(!1)});return J(()=>{s&&T.current==="none"&&!R&&!i&&l(!1)},[s,R,i,t,l]),u.useMemo(()=>({abortControllerRef:E,animationTypeRef:T,disabled:r,handleTrigger:C,height:h,mounted:a,open:i,panelId:w,panelRef:_,runOnceAnimationsFinish:M,setDimensions:m,setHiddenUntilFound:v,setKeepMounted:I,setMounted:l,setOpen:c,setPanelIdState:y,setVisible:g,transitionDimensionRef:V,transitionStatus:d,visible:f,width:p}),[E,T,r,C,h,a,i,w,_,M,m,v,I,l,c,g,V,d,f,p])}const wc=u.createContext(void 0);function Sc(){const e=u.useContext(wc);if(e===void 0)throw new Error(Be(15));return e}let Bn=(function(e){return e.open="data-open",e.closed="data-closed",e[e.startingStyle=Ht.startingStyle]="startingStyle",e[e.endingStyle=Ht.endingStyle]="endingStyle",e})({}),Cf=(function(e){return e.panelOpen="data-panel-open",e})({});const kf={[Bn.open]:""},Tf={[Bn.closed]:""},Mf={open(e){return e?{[Cf.panelOpen]:""}:null}},If={open(e){return e?kf:Tf}},Ec={...If,...St},Qb=u.forwardRef(function(t,n){const{render:o,className:r,defaultOpen:s=!1,disabled:i=!1,onOpenChange:c,open:a,...l}=t,d=ne(c),f=Ef({open:a,defaultOpen:s,onOpenChange:d,disabled:i}),g=u.useMemo(()=>({open:f.open,disabled:f.disabled,transitionStatus:f.transitionStatus}),[f.open,f.disabled,f.transitionStatus]),h=u.useMemo(()=>({...f,onOpenChange:d,state:g}),[f,d,g]),p=Se("div",t,{state:g,ref:n,props:l,stateAttributesMapping:Ec});return ie.jsx(wc.Provider,{value:h,children:p})}),Pf={...Mf,...St},ey=u.forwardRef(function(t,n){const{panelId:o,open:r,handleTrigger:s,state:i,disabled:c}=Sc(),{className:a,disabled:l=c,id:d,render:f,nativeButton:g=!0,...h}=t,{getButtonProps:p,buttonRef:m}=zt({disabled:l,focusableWhenDisabled:!0,native:g}),b=u.useMemo(()=>({"aria-controls":r?o:void 0,"aria-expanded":r,onClick:s}),[o,r,s]);return Se("button",t,{state:i,ref:[n,m],props:[b,h,p],stateAttributesMapping:Pf})});let Of=(function(e){return e.disabled="data-disabled",e.orientation="data-orientation",e})({});function Af(e){const{abortControllerRef:t,animationTypeRef:n,externalRef:o,height:r,hiddenUntilFound:s,keepMounted:i,id:c,mounted:a,onOpenChange:l,open:d,panelRef:f,runOnceAnimationsFinish:g,setDimensions:h,setMounted:p,setOpen:m,setVisible:b,transitionDimensionRef:x,visible:y,width:w}=e,S=u.useRef(!1),v=u.useRef(null),R=u.useRef(d),I=u.useRef(d),E=Jn(),T=u.useMemo(()=>n.current==="css-animation"?!y:!d&&!a,[d,a,y,n]),V=ne(M=>{if(!M)return;if(n.current==null||x.current==null){const k=getComputedStyle(M),D=k.animationName!=="none"&&k.animationName!=="",P=k.transitionDuration!=="0s"&&k.transitionDuration!=="";D&&P||(k.animationName==="none"&&k.transitionDuration!=="0s"?n.current="css-transition":k.animationName!=="none"&&k.transitionDuration==="0s"?n.current="css-animation":n.current="none"),M.getAttribute(Of.orientation)==="horizontal"||k.transitionProperty.indexOf("width")>-1?x.current="width":x.current="height"}if(n.current!=="css-transition")return;(r===void 0||w===void 0)&&(h({height:M.scrollHeight,width:M.scrollWidth}),I.current&&M.style.setProperty("transition-duration","0s"));let C=-1,O=-1;return C=Ge.request(()=>{I.current=!1,O=Ge.request(()=>{setTimeout(()=>{M.style.removeProperty("transition-duration")})})}),()=>{Ge.cancel(C),Ge.cancel(O)}}),_=Rt(o,f,V);return J(()=>{if(n.current!=="css-transition")return;const M=f.current;if(!M)return;let C=-1;if(t.current!=null&&(t.current.abort(),t.current=null),d){const O={"justify-content":M.style.justifyContent,"align-items":M.style.alignItems,"align-content":M.style.alignContent,"justify-items":M.style.justifyItems};Object.keys(O).forEach(k=>{M.style.setProperty(k,"initial","important")}),!I.current&&!i&&M.setAttribute(Bn.startingStyle,""),h({height:M.scrollHeight,width:M.scrollWidth}),C=Ge.request(()=>{Object.entries(O).forEach(([k,D])=>{D===""?M.style.removeProperty(k):M.style.setProperty(k,D)})})}else{if(M.scrollHeight===0&&M.scrollWidth===0)return;h({height:M.scrollHeight,width:M.scrollWidth});const O=new AbortController;t.current=O;const k=O.signal;let D=null;const P=Bn.endingStyle;return D=new MutationObserver(L=>{L.some(F=>F.type==="attributes"&&F.attributeName===P)&&(D==null||D.disconnect(),D=null,g(()=>{h({height:0,width:0}),M.style.removeProperty("content-visibility"),p(!1),t.current===O&&(t.current=null)},k))}),D.observe(M,{attributes:!0,attributeFilter:[P]}),()=>{D==null||D.disconnect(),E.cancel(),t.current===O&&(O.abort(),t.current=null)}}return()=>{Ge.cancel(C)}},[t,n,E,s,i,a,d,f,g,h,p]),J(()=>{if(n.current!=="css-animation")return;const M=f.current;M&&(v.current=M.style.animationName||v.current,M.style.setProperty("animation-name","none"),h({height:M.scrollHeight,width:M.scrollWidth}),!R.current&&!S.current&&M.style.removeProperty("animation-name"),d?(t.current!=null&&(t.current.abort(),t.current=null),p(!0),b(!0)):(t.current=new AbortController,g(()=>{p(!1),b(!1),t.current=null},t.current.signal)))},[t,n,d,f,g,h,p,b,y]),Xo(()=>{const M=Ge.request(()=>{R.current=!1});return()=>Ge.cancel(M)}),J(()=>{if(!s)return;const M=f.current;if(!M)return;let C=-1,O=-1;return d&&S.current&&(M.style.transitionDuration="0s",h({height:M.scrollHeight,width:M.scrollWidth}),C=Ge.request(()=>{S.current=!1,O=Ge.request(()=>{setTimeout(()=>{M.style.removeProperty("transition-duration")})})})),()=>{Ge.cancel(C),Ge.cancel(O)}},[s,d,f,h]),J(()=>{const M=f.current;M&&s&&T&&(M.setAttribute("hidden","until-found"),n.current==="css-transition"&&M.setAttribute(Bn.startingStyle,""))},[s,T,n,f]),u.useEffect(function(){const C=f.current;if(!C)return;function O(k){S.current=!0,m(!0),l(!0,ge(Pt,k))}return C.addEventListener("beforematch",O),()=>{C.removeEventListener("beforematch",O)}},[l,f,m]),u.useMemo(()=>({props:{hidden:T,id:c,ref:_}}),[T,c,_])}let ti=(function(e){return e.collapsiblePanelHeight="--collapsible-panel-height",e.collapsiblePanelWidth="--collapsible-panel-width",e})({});const ty=u.forwardRef(function(t,n){const{className:o,hiddenUntilFound:r,keepMounted:s,render:i,id:c,...a}=t,{abortControllerRef:l,animationTypeRef:d,height:f,mounted:g,onOpenChange:h,open:p,panelId:m,panelRef:b,runOnceAnimationsFinish:x,setDimensions:y,setHiddenUntilFound:w,setKeepMounted:S,setMounted:v,setPanelIdState:R,setOpen:I,setVisible:E,state:T,transitionDimensionRef:V,visible:_,width:M,transitionStatus:C}=Sc(),O=r??!1,k=s??!1;J(()=>{if(c)return R(c),()=>{R(void 0)}},[c,R]),J(()=>{w(O)},[w,O]),J(()=>{S(k)},[S,k]);const{props:D}=Af({abortControllerRef:l,animationTypeRef:d,externalRef:n,height:f,hiddenUntilFound:O,id:m,keepMounted:k,mounted:g,onOpenChange:h,open:p,panelRef:b,runOnceAnimationsFinish:x,setDimensions:y,setMounted:v,setOpen:I,setVisible:E,transitionDimensionRef:V,visible:_,width:M});mt({open:p&&C==="idle",ref:b,onComplete(){p&&y({height:void 0,width:void 0})}});const P=u.useMemo(()=>({...T,transitionStatus:C}),[T,C]),L=Se("div",t,{state:P,ref:[n,b],props:[D,{style:{[ti.collapsiblePanelHeight]:f===void 0?"auto":`${f}px`,[ti.collapsiblePanelWidth]:M===void 0?"auto":`${M}px`}},a],stateAttributesMapping:Ec});return k||O||!k&&g?L:null}),Cc=u.createContext(void 0);function os(e){const t=u.useContext(Cc);if(t===void 0&&!e)throw new Error(Be(33));return t}const kc=u.createContext(void 0);function on(e){const t=u.useContext(kc);if(t===void 0&&!e)throw new Error(Be(36));return t}let an=(function(e){return e.open="data-open",e.closed="data-closed",e[e.startingStyle=Ht.startingStyle]="startingStyle",e[e.endingStyle=Ht.endingStyle]="endingStyle",e.anchorHidden="data-anchor-hidden",e.side="data-side",e.align="data-align",e})({}),Oo=(function(e){return e.popupOpen="data-popup-open",e.pressed="data-pressed",e})({});const Lf={[Oo.popupOpen]:""},Nf={[Oo.popupOpen]:"",[Oo.pressed]:""},Ff={[an.open]:""},Df={[an.closed]:""},Vf={[an.anchorHidden]:""},Tc={open(e){return e?Lf:null}},Or={open(e){return e?Nf:null}},jt={open(e){return e?Ff:Df},anchorHidden(e){return e?Vf:null}},_f=u.createContext(void 0);function Zo(e=!0){const t=u.useContext(_f);if(t===void 0&&!e)throw new Error(Be(25));return t}const Mc=u.createContext(void 0);function Hf(){const e=u.useContext(Mc);if(e===void 0)throw new Error(Be(30));return e}const Pn=typeof navigator<"u",fr=Bf(),Ic=$f(),Pc=zf(),rs=typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter:none"),Oc=fr.platform==="MacIntel"&&fr.maxTouchPoints>1?!0:/iP(hone|ad|od)|iOS/.test(fr.platform),Ac=Pn&&/apple/i.test(navigator.vendor),Ar=Pn&&/android/i.test(Ic)||/android/i.test(Pc),Lc=Pn&&Ic.toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints,Nc=Pc.includes("jsdom/");function Bf(){if(!Pn)return{platform:"",maxTouchPoints:-1};const e=navigator.userAgentData;return e!=null&&e.platform?{platform:e.platform,maxTouchPoints:navigator.maxTouchPoints}:{platform:navigator.platform??"",maxTouchPoints:navigator.maxTouchPoints??-1}}function zf(){if(!Pn)return"";const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:t,version:n})=>`${t}/${n}`).join(" "):navigator.userAgent}function $f(){if(!Pn)return"";const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform??""}function jf(e){const{closeOnClick:t,highlighted:n,id:o,nodeId:r,store:s,typingRef:i,itemRef:c,itemMetadata:a}=e,{events:l}=s.useState("floatingTreeRoot"),d=Zo(!0),f=d!==void 0;return u.useMemo(()=>({id:o,role:"menuitem",tabIndex:n?0:-1,onKeyDown(g){g.key===" "&&(i!=null&&i.current)&&g.preventDefault()},onMouseMove(g){r&&l.emit("itemhover",{nodeId:r,target:g.currentTarget})},onClick(g){t&&l.emit("close",{domEvent:g,reason:fn})},onMouseUp(g){if(d){const h=d.initialCursorPointRef.current;if(d.initialCursorPointRef.current=null,f&&h&&Math.abs(g.clientX-h.x)<=1&&Math.abs(g.clientY-h.y)<=1||f&&!Lc&&g.button===2)return}c.current&&s.context.allowMouseUpTriggerRef.current&&(!f||g.button===2)&&(!a||a.type==="regular-item")&&c.current.click()}}),[t,n,o,l,r,s,i,c,d,f,a])}const Fc={type:"regular-item"};function Dc(e){const{closeOnClick:t,disabled:n=!1,highlighted:o,id:r,store:s,typingRef:i=s.context.typingRef,nativeButton:c,itemMetadata:a,nodeId:l}=e,d=u.useRef(null),{getButtonProps:f,buttonRef:g}=zt({disabled:n,focusableWhenDisabled:!0,native:c,composite:!0}),h=jf({closeOnClick:t,highlighted:o,id:r,nodeId:l,store:s,typingRef:i,itemRef:d,itemMetadata:a}),p=u.useCallback(b=>Zt(h,{onMouseEnter(){a.type==="submenu-trigger"&&a.setActive()}},b,f),[h,f,a]),m=Rt(d,g);return u.useMemo(()=>({getItemProps:p,itemRef:m}),[p,m])}const Vc=u.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},elementsRef:{current:[]},nextIndexRef:{current:0}});function Uf(){return u.useContext(Vc)}let _c=(function(e){return e[e.None=0]="None",e[e.GuessFromOrder=1]="GuessFromOrder",e})({});function Qn(e={}){const{label:t,metadata:n,textRef:o,indexGuessBehavior:r,index:s}=e,{register:i,unregister:c,subscribeMapChange:a,elementsRef:l,labelsRef:d,nextIndexRef:f}=Uf(),g=u.useRef(-1),[h,p]=u.useState(s??(r===_c.GuessFromOrder?()=>{if(g.current===-1){const x=f.current;f.current+=1,g.current=x}return g.current}:-1)),m=u.useRef(null),b=u.useCallback(x=>{var y;if(m.current=x,h!==-1&&x!==null&&(l.current[h]=x,d)){const w=t!==void 0;d.current[h]=w?t:((y=o==null?void 0:o.current)==null?void 0:y.textContent)??x.textContent}},[h,l,d,t,o]);return J(()=>{if(s!=null)return;const x=m.current;if(x)return i(x,n),()=>{c(x)}},[s,i,c,n]),J(()=>{if(s==null)return a(x=>{var w;const y=m.current?(w=x.get(m.current))==null?void 0:w.index:null;y!=null&&p(y)})},[s,a,p]),u.useMemo(()=>({ref:b,index:h}),[h,b])}let ni=(function(e){return e.checked="data-checked",e.unchecked="data-unchecked",e.disabled="data-disabled",e.highlighted="data-highlighted",e})({});const Jo={checked(e){return e?{[ni.checked]:""}:{[ni.unchecked]:""}},...St},ny=u.forwardRef(function(t,n){const{render:o,className:r,id:s,label:i,nativeButton:c=!1,disabled:a=!1,closeOnClick:l=!1,checked:d,defaultChecked:f,onCheckedChange:g,...h}=t,p=Qn({label:i}),m=os(!0),b=gt(s),{store:x}=on(),y=x.useState("isActive",p.index),w=x.useState("itemProps"),[S,v]=Qt({controlled:d,default:f??!1,name:"MenuCheckboxItem",state:"checked"}),{getItemProps:R,itemRef:I}=Dc({closeOnClick:l,disabled:a,highlighted:y,id:b,store:x,nativeButton:c,nodeId:m==null?void 0:m.nodeId,itemMetadata:Fc}),E=u.useMemo(()=>({disabled:a,highlighted:y,checked:S}),[a,y,S]),T=ne(_=>{const M={...ge(fn,_.nativeEvent),preventUnmountOnClose:()=>{}};g==null||g(!S,M),!M.isCanceled&&v(C=>!C)}),V=Se("div",t,{state:E,stateAttributesMapping:Jo,props:[w,{role:"menuitemcheckbox","aria-checked":S,onClick:T},h,R],ref:[I,n,p.ref]});return ie.jsx(Mc.Provider,{value:E,children:V})}),oy=u.forwardRef(function(t,n){const{render:o,className:r,keepMounted:s=!1,...i}=t,c=Hf(),a=u.useRef(null),{transitionStatus:l,setMounted:d}=$t(c.checked);mt({open:c.checked,ref:a,onComplete(){c.checked||d(!1)}});const f={checked:c.checked,disabled:c.disabled,highlighted:c.highlighted,transitionStatus:l};return Se("span",t,{state:f,ref:[n,a],stateAttributesMapping:Jo,props:{"aria-hidden":!0,...i},enabled:s||c.checked})}),Nn=0;class wt{constructor(){De(this,"currentId",Nn);De(this,"clear",()=>{this.currentId!==Nn&&(clearTimeout(this.currentId),this.currentId=Nn)});De(this,"disposeEffect",()=>this.clear)}static create(){return new wt}start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=Nn,n()},t)}isStarted(){return this.currentId!==Nn}}function Xe(){const e=et(wt.create).current;return Xo(e.disposeEffect),e}const Lr="data-base-ui-focusable",Hc="active",Bc="selected",zc="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",Yt="ArrowLeft",Xt="ArrowRight",ss="ArrowUp",eo="ArrowDown";function at(e){var n;let t=e.activeElement;for(;((n=t==null?void 0:t.shadowRoot)==null?void 0:n.activeElement)!=null;)t=t.shadowRoot.activeElement;return t}function we(e,t){var o;if(!e||!t)return!1;const n=(o=t.getRootNode)==null?void 0:o.call(t);if(e.contains(t))return!0;if(n&&Un(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function Ao(e,t){if(!Le(e))return!1;const n=e;if(t.hasElement(n))return!n.hasAttribute("data-trigger-disabled");for(const[,o]of t.entries())if(we(o,n))return!o.hasAttribute("data-trigger-disabled");return!1}function lt(e){return"composedPath"in e?e.composedPath()[0]:e.target}function vt(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return n.target!=null&&t.contains(n.target)}function Wf(e){return e.matches("html,body")}function Qo(e){return je(e)&&e.matches(zc)}function Nr(e){return e?e.getAttribute("role")==="combobox"&&Qo(e):!1}function qf(e){if(!e||Nc)return!0;try{return e.matches(":focus-visible")}catch{return!0}}function qn(e){return e?e.hasAttribute(Lr)?e:e.querySelector(`[${Lr}]`)||e:null}function Vt(e,t,n=!0){return e.filter(r=>{var s;return r.parentId===t&&(!n||((s=r.context)==null?void 0:s.open))}).flatMap(r=>[r,...Vt(e,r.id,n)])}function oi(e,t){var r;let n=[],o=(r=e.find(s=>s.id===t))==null?void 0:r.parentId;for(;o;){const s=e.find(i=>i.id===o);o=s==null?void 0:s.parentId,s&&(n=n.concat(s))}return n}function dt(e){e.preventDefault(),e.stopPropagation()}function Gf(e){return"nativeEvent"in e}function $c(e){return e.pointerType===""&&e.isTrusted?!0:Ar&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function jc(e){return Nc?!1:!Ar&&e.width===0&&e.height===0||Ar&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType==="touch"}function Cn(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function Uc(e){const t=e.type;return t==="click"||t==="mousedown"||t==="keydown"||t==="keyup"}const Kf=["top","right","bottom","left"],kn=Math.min,ft=Math.max,Lo=Math.round,un=Math.floor,Mt=e=>({x:e,y:e}),Yf={left:"right",right:"left",bottom:"top",top:"bottom"};function Fr(e,t,n){return ft(e,kn(t,n))}function Bt(e,t){return typeof e=="function"?e(t):e}function ut(e){return e.split("-")[0]}function rn(e){return e.split("-")[1]}function is(e){return e==="x"?"y":"x"}function cs(e){return e==="y"?"height":"width"}function yt(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function ls(e){return is(yt(e))}function Xf(e,t,n){n===void 0&&(n=!1);const o=rn(e),r=ls(e),s=cs(r);let i=r==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(i=No(i)),[i,No(i)]}function Zf(e){const t=No(e);return[Dr(e),t,Dr(t)]}function Dr(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const ri=["left","right"],si=["right","left"],Jf=["top","bottom"],Qf=["bottom","top"];function ep(e,t,n){switch(e){case"top":case"bottom":return n?t?si:ri:t?ri:si;case"left":case"right":return t?Jf:Qf;default:return[]}}function tp(e,t,n,o){const r=rn(e);let s=ep(ut(e),n==="start",o);return r&&(s=s.map(i=>i+"-"+r),t&&(s=s.concat(s.map(Dr)))),s}function No(e){const t=ut(e);return Yf[t]+e.slice(t.length)}function np(e){return{top:0,right:0,bottom:0,left:0,...e}}function Wc(e){return typeof e!="number"?np(e):{top:e,right:e,bottom:e,left:e}}function Gn(e){const{x:t,y:n,width:o,height:r}=e;return{width:o,height:r,top:n,left:t,right:t+o,bottom:n+r,x:t,y:n}}function fo(e,t,n){return Math.floor(e/t)!==n}function Kn(e,t){return t<0||t>=e.current.length}function To(e,t){return rt(e,{disabledIndices:t})}function Vr(e,t){return rt(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function rt(e,{startingIndex:t=-1,decrement:n=!1,disabledIndices:o,amount:r=1}={}){let s=t;do s+=n?-r:r;while(s>=0&&s<=e.current.length-1&&_t(e,s,o));return s}function qc(e,{event:t,orientation:n,loopFocus:o,rtl:r,cols:s,disabledIndices:i,minIndex:c,maxIndex:a,prevIndex:l,stopEvent:d=!1}){let f=l,g;if(t.key===ss?g="up":t.key===eo&&(g="down"),g){const h=[],p=[];let m=!1,b=0;{let E=null,T=-1;e.current.forEach((V,_)=>{if(V==null)return;b+=1;const M=V.closest('[role="row"]');M&&(m=!0),(M!==E||T===-1)&&(E=M,T+=1,h[T]=[]),h[T].push(_),p[_]=T})}let x=!1,y=0;if(m)for(const E of h){const T=E.length;T>y&&(y=T),T!==s&&(x=!0)}const w=x&&b<e.current.length,S=y||s,v=E=>{if(!x||l===-1)return;const T=p[l];if(T==null)return;const V=h[T].indexOf(l),_=E==="up"?-1:1;for(let M=T+_,C=0;C<h.length;C+=1,M+=_){if(M<0||M>=h.length){if(!o||w)return;M=M<0?h.length-1:0}const O=h[M];for(let k=Math.min(V,O.length-1);k>=0;k-=1){const D=O[k];if(!_t(e,D,i))return D}}},R=E=>{if(!w||l===-1)return;const T=l%S,V=E==="up"?-S:S,_=a-a%S,M=un(a/S)+1;for(let C=l-T+V,O=0;O<M;O+=1,C+=V){if(C<0||C>a){if(!o)return;C=C<0?_:0}const k=Math.min(C+S-1,a);for(let D=Math.min(C+T,k);D>=C;D-=1)if(!_t(e,D,i))return D}};d&&dt(t);const I=v(g)??R(g);if(I!==void 0)f=I;else if(l===-1)f=g==="up"?a:c;else if(f=rt(e,{startingIndex:l,amount:S,decrement:g==="up",disabledIndices:i}),o){if(g==="up"&&(l-S<c||f<0)){const E=l%S,T=a%S,V=a-(T-E);T===E?f=a:f=T>E?V:V-S}g==="down"&&l+S>a&&(f=rt(e,{startingIndex:l%S-S,amount:S,disabledIndices:i}))}Kn(e,f)&&(f=l)}if(n==="both"){const h=un(l/s);t.key===(r?Yt:Xt)&&(d&&dt(t),l%s!==s-1?(f=rt(e,{startingIndex:l,disabledIndices:i}),o&&fo(f,s,h)&&(f=rt(e,{startingIndex:l-l%s-1,disabledIndices:i}))):o&&(f=rt(e,{startingIndex:l-l%s-1,disabledIndices:i})),fo(f,s,h)&&(f=l)),t.key===(r?Xt:Yt)&&(d&&dt(t),l%s!==0?(f=rt(e,{startingIndex:l,decrement:!0,disabledIndices:i}),o&&fo(f,s,h)&&(f=rt(e,{startingIndex:l+(s-l%s),decrement:!0,disabledIndices:i}))):o&&(f=rt(e,{startingIndex:l+(s-l%s),decrement:!0,disabledIndices:i})),fo(f,s,h)&&(f=l));const p=un(a/s)===h;Kn(e,f)&&(o&&p?f=t.key===(r?Xt:Yt)?a:rt(e,{startingIndex:l-l%s-1,disabledIndices:i}):f=l)}return f}function Gc(e,t,n){const o=[];let r=0;return e.forEach(({width:s,height:i},c)=>{let a=!1;for(n&&(r=0);!a;){const l=[];for(let d=0;d<s;d+=1)for(let f=0;f<i;f+=1)l.push(r+d+f*t);r%t+s<=t&&l.every(d=>o[d]==null)?(l.forEach(d=>{o[d]=c}),a=!0):r+=1}}),[...o]}function Kc(e,t,n,o,r){if(e===-1)return-1;const s=n.indexOf(e),i=t[e];switch(r){case"tl":return s;case"tr":return i?s+i.width-1:s;case"bl":return i?s+(i.height-1)*o:s;case"br":return n.lastIndexOf(e);default:return-1}}function Yc(e,t){return t.flatMap((n,o)=>e.includes(n)?[o]:[])}function _t(e,t,n){if(typeof n=="function"?n(t):(n==null?void 0:n.includes(t))??!1)return!0;const r=e.current[t];return r?as(r)?!n&&(r.hasAttribute("disabled")||r.getAttribute("aria-disabled")==="true"):!0:!1}function as(e){return pt(e).display!=="none"}/*!
|
|
317
|
+
* tabbable 6.4.0
|
|
318
|
+
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
|
|
319
|
+
*/var op=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"],Fo=op.join(","),Xc=typeof Element>"u",Tn=Xc?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Do=!Xc&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e==null?void 0:e.ownerDocument},Vo=function(t,n){var o;n===void 0&&(n=!0);var r=t==null||(o=t.getAttribute)===null||o===void 0?void 0:o.call(t,"inert"),s=r===""||r==="true",i=s||n&&t&&(typeof t.closest=="function"?t.closest("[inert]"):Vo(t.parentNode));return i},rp=function(t){var n,o=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return o===""||o==="true"},Zc=function(t,n,o){if(Vo(t))return[];var r=Array.prototype.slice.apply(t.querySelectorAll(Fo));return n&&Tn.call(t,Fo)&&r.unshift(t),r=r.filter(o),r},_o=function(t,n,o){for(var r=[],s=Array.from(t);s.length;){var i=s.shift();if(!Vo(i,!1))if(i.tagName==="SLOT"){var c=i.assignedElements(),a=c.length?c:i.children,l=_o(a,!0,o);o.flatten?r.push.apply(r,l):r.push({scopeParent:i,candidates:l})}else{var d=Tn.call(i,Fo);d&&o.filter(i)&&(n||!t.includes(i))&&r.push(i);var f=i.shadowRoot||typeof o.getShadowRoot=="function"&&o.getShadowRoot(i),g=!Vo(f,!1)&&(!o.shadowRootFilter||o.shadowRootFilter(i));if(f&&g){var h=_o(f===!0?i.children:f.children,!0,o);o.flatten?r.push.apply(r,h):r.push({scopeParent:i,candidates:h})}else s.unshift.apply(s,i.children)}}return r},Jc=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},Qc=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||rp(t))&&!Jc(t)?0:t.tabIndex},sp=function(t,n){var o=Qc(t);return o<0&&n&&!Jc(t)?0:o},ip=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},el=function(t){return t.tagName==="INPUT"},cp=function(t){return el(t)&&t.type==="hidden"},lp=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(o){return o.tagName==="SUMMARY"});return n},ap=function(t,n){for(var o=0;o<t.length;o++)if(t[o].checked&&t[o].form===n)return t[o]},up=function(t){if(!t.name)return!0;var n=t.form||Do(t),o=function(c){return n.querySelectorAll('input[type="radio"][name="'+c+'"]')},r;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")r=o(window.CSS.escape(t.name));else try{r=o(t.name)}catch(i){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",i.message),!1}var s=ap(r,t.form);return!s||s===t},dp=function(t){return el(t)&&t.type==="radio"},fp=function(t){return dp(t)&&!up(t)},pp=function(t){var n,o=t&&Do(t),r=(n=o)===null||n===void 0?void 0:n.host,s=!1;if(o&&o!==t){var i,c,a;for(s=!!((i=r)!==null&&i!==void 0&&(c=i.ownerDocument)!==null&&c!==void 0&&c.contains(r)||t!=null&&(a=t.ownerDocument)!==null&&a!==void 0&&a.contains(t));!s&&r;){var l,d,f;o=Do(r),r=(l=o)===null||l===void 0?void 0:l.host,s=!!((d=r)!==null&&d!==void 0&&(f=d.ownerDocument)!==null&&f!==void 0&&f.contains(r))}}return s},ii=function(t){var n=t.getBoundingClientRect(),o=n.width,r=n.height;return o===0&&r===0},gp=function(t,n){var o=n.displayCheck,r=n.getShadowRoot;if(o==="full-native"&&"checkVisibility"in t){var s=t.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!s}if(getComputedStyle(t).visibility==="hidden")return!0;var i=Tn.call(t,"details>summary:first-of-type"),c=i?t.parentElement:t;if(Tn.call(c,"details:not([open]) *"))return!0;if(!o||o==="full"||o==="full-native"||o==="legacy-full"){if(typeof r=="function"){for(var a=t;t;){var l=t.parentElement,d=Do(t);if(l&&!l.shadowRoot&&r(l)===!0)return ii(t);t.assignedSlot?t=t.assignedSlot:!l&&d!==t.ownerDocument?t=d.host:t=l}t=a}if(pp(t))return!t.getClientRects().length;if(o!=="legacy-full")return!0}else if(o==="non-zero-area")return ii(t);return!1},mp=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var o=0;o<n.children.length;o++){var r=n.children.item(o);if(r.tagName==="LEGEND")return Tn.call(n,"fieldset[disabled] *")?!0:!r.contains(t)}return!0}n=n.parentElement}return!1},_r=function(t,n){return!(n.disabled||cp(n)||gp(n,t)||lp(n)||mp(n))},Hr=function(t,n){return!(fp(n)||Qc(n)<0||!_r(t,n))},hp=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},tl=function(t){var n=[],o=[];return t.forEach(function(r,s){var i=!!r.scopeParent,c=i?r.scopeParent:r,a=sp(c,i),l=i?tl(r.candidates):c;a===0?i?n.push.apply(n,l):n.push(c):o.push({documentOrder:s,tabIndex:a,item:r,isScope:i,content:l})}),o.sort(ip).reduce(function(r,s){return s.isScope?r.push.apply(r,s.content):r.push(s.content),r},[]).concat(n)},to=function(t,n){n=n||{};var o;return n.getShadowRoot?o=_o([t],n.includeContainer,{filter:Hr.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:hp}):o=Zc(t,n.includeContainer,Hr.bind(null,n)),tl(o)},bp=function(t,n){n=n||{};var o;return n.getShadowRoot?o=_o([t],n.includeContainer,{filter:_r.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):o=Zc(t,n.includeContainer,_r.bind(null,n)),o},nl=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return Tn.call(t,Fo)===!1?!1:Hr(n,t)};function Oe(e){return(e==null?void 0:e.ownerDocument)||document}const On=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function ol(e,t){const n=to(e,On()),o=n.length;if(o===0)return;const r=at(Oe(e)),s=n.indexOf(r),i=s===-1?t===1?0:o-1:s+t;return n[i]}function us(e){return ol(Oe(e).body,1)||e}function rl(e){return ol(Oe(e).body,-1)||e}function sl(e,t){if(!e)return null;const n=to(Oe(e).body,On()),o=n.length;if(o===0)return null;const r=n.indexOf(e);if(r===-1)return null;const s=(r+t+o)%o;return n[s]}function yp(e){return sl(e,1)}function vp(e){return sl(e,-1)}function Rn(e,t){const n=t||e.currentTarget,o=e.relatedTarget;return!o||!we(n,o)}function xp(e){to(e,On()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function ci(e){e.querySelectorAll("[data-tabindex]").forEach(n=>{const o=n.dataset.tabindex;delete n.dataset.tabindex,o?n.setAttribute("tabindex",o):n.removeAttribute("tabindex")})}function Rp(e,t){return t!=null&&!Cn(t)?0:typeof e=="function"?e():e}function zn(e,t,n){const o=Rp(e,n);return typeof o=="number"?o:o==null?void 0:o[t]}function li(e){return typeof e=="function"?e():e}function il(e,t){return t||e==="click"||e==="mousedown"}const cl=u.createContext({hasProvider:!1,timeoutMs:0,delayRef:{current:0},initialDelayRef:{current:0},timeout:new wt,currentIdRef:{current:null},currentContextRef:{current:null}});function wp(e){const{children:t,delay:n,timeoutMs:o=0}=e,r=u.useRef(n),s=u.useRef(n),i=u.useRef(null),c=u.useRef(null),a=Xe();return ie.jsx(cl.Provider,{value:u.useMemo(()=>({hasProvider:!0,delayRef:r,initialDelayRef:s,currentIdRef:i,timeoutMs:o,currentContextRef:c,timeout:a}),[o,a]),children:t})}function Sp(e,t={open:!1}){const n="rootStore"in e?e.rootStore:e,o=n.useState("floatingId"),{open:r}=t,s=u.useContext(cl),{currentIdRef:i,delayRef:c,timeoutMs:a,initialDelayRef:l,currentContextRef:d,hasProvider:f,timeout:g}=s,[h,p]=u.useState(!1);return J(()=>{function m(){var b;p(!1),(b=d.current)==null||b.setIsInstantPhase(!1),i.current=null,d.current=null,c.current=l.current}if(i.current&&!r&&i.current===o){if(p(!1),a){const b=o;return g.start(a,()=>{n.select("open")||i.current&&i.current!==b||m()}),()=>{g.clear()}}m()}},[r,o,i,c,a,l,d,g,n]),J(()=>{if(!r)return;const m=d.current,b=i.current;g.clear(),d.current={onOpenChange:n.setOpen,setIsInstantPhase:p},i.current=o,c.current={open:0,close:zn(l.current,"close")},b!==null&&b!==o?(p(!0),m==null||m.setIsInstantPhase(!0),m==null||m.onOpenChange(!1,ge(Pt))):(p(!1),m==null||m.setIsInstantPhase(!1))},[r,o,n,i,c,a,l,d,g]),J(()=>()=>{d.current=null},[d]),u.useMemo(()=>({hasProvider:f,delayRef:c,isInstantPhase:h}),[f,c,h])}function nt(e){const t=et(Ep,e).current;return t.next=e,J(t.effect),t}function Ep(e){const t={current:e,next:e,effect:()=>{t.current=t.next}};return t}const Mn=u.forwardRef(function(t,n){const[o,r]=u.useState();J(()=>{Ac&&r("button")},[]);const s={tabIndex:0,role:o};return ie.jsx("span",{...t,ref:n,style:Zr,"aria-hidden":o?void 0:!0,...s,"data-base-ui-focus-guard":""})});function Yn(e){return`data-base-ui-${e}`}let ai=0;function $n(e,t={}){const{preventScroll:n=!1,cancelPrevious:o=!0,sync:r=!1}=t;o&&cancelAnimationFrame(ai);const s=()=>e==null?void 0:e.focus({preventScroll:n});r?s():ai=requestAnimationFrame(s)}const pr={inert:new WeakMap,"aria-hidden":new WeakMap},ui="data-base-ui-inert",Br={inert:new WeakSet,"aria-hidden":new WeakSet};let Fn=new WeakMap,gr=0;function Cp(e){return Br[e]}function ll(e){return e?Un(e)?e.host:ll(e.parentNode):null}const mr=(e,t)=>t.map(n=>{if(e.contains(n))return n;const o=ll(n);return e.contains(o)?o:null}).filter(n=>n!=null),di=e=>{const t=new Set;return e.forEach(n=>{let o=n;for(;o&&!t.has(o);)t.add(o),o=o.parentNode}),t},fi=(e,t,n)=>{const o=[],r=s=>{!s||n.has(s)||Array.from(s.children).forEach(i=>{tn(i)!=="script"&&(t.has(i)?r(i):o.push(i))})};return r(e),o};function kp(e,t,n,o,{mark:r=!0,markerIgnoreElements:s=[]}){const i=o?"inert":n?"aria-hidden":null;let c=null,a=null;const l=mr(t,e),d=r?mr(t,s):[],f=new Set(d),g=r?fi(t,di(l),new Set(l)).filter(m=>!f.has(m)):[],h=[],p=[];if(i){const m=pr[i],b=Cp(i);a=b,c=m;const x=mr(t,Array.from(t.querySelectorAll("[aria-live]"))),y=l.concat(x);fi(t,di(y),new Set(y)).forEach(S=>{const v=S.getAttribute(i),R=v!==null&&v!=="false",I=(m.get(S)||0)+1;m.set(S,I),h.push(S),I===1&&R&&b.add(S),R||S.setAttribute(i,i==="inert"?"":"true")})}return r&&g.forEach(m=>{const b=(Fn.get(m)||0)+1;Fn.set(m,b),p.push(m),b===1&&m.setAttribute(ui,"")}),gr+=1,()=>{c&&h.forEach(m=>{const x=(c.get(m)||0)-1;c.set(m,x),x||(!(a!=null&&a.has(m))&&i&&m.removeAttribute(i),a==null||a.delete(m))}),r&&p.forEach(m=>{const b=(Fn.get(m)||0)-1;Fn.set(m,b),b||m.removeAttribute(ui)}),gr-=1,gr||(pr.inert=new WeakMap,pr["aria-hidden"]=new WeakMap,Br.inert=new WeakSet,Br["aria-hidden"]=new WeakSet,Fn=new WeakMap)}}function pi(e,t={}){const{ariaHidden:n=!1,inert:o=!1,mark:r=!0,markerIgnoreElements:s=[]}=t,i=Oe(e[0]).body;return kp(e,i,n,o,{mark:r,markerIgnoreElements:s})}const al=u.createContext(null),ul=()=>u.useContext(al),Tp=Yn("portal");function dl(e={}){const{ref:t,container:n,componentProps:o=Ue,elementProps:r}=e,s=bn(),i=ul(),c=i==null?void 0:i.portalNode,[a,l]=u.useState(null),[d,f]=u.useState(null),g=ne(b=>{b!==null&&f(b)}),h=u.useRef(null);J(()=>{if(n===null){h.current&&(h.current=null,f(null),l(null));return}if(s==null)return;const b=(n&&(Kr(n)?n:n.current))??c??document.body;if(b==null){h.current&&(h.current=null,f(null),l(null));return}h.current!==b&&(h.current=b,f(null),l(b))},[n,c,s]);const p=Se("div",o,{ref:[t,g],props:[{id:s,[Tp]:""},r]});return{portalNode:d,portalSubtree:a&&p?xt.createPortal(p,a):null}}const ds=u.forwardRef(function(t,n){const{children:o,container:r,className:s,render:i,renderGuards:c,...a}=t,{portalNode:l,portalSubtree:d}=dl({container:r,ref:n,componentProps:t,elementProps:a}),f=u.useRef(null),g=u.useRef(null),h=u.useRef(null),p=u.useRef(null),[m,b]=u.useState(null),x=m==null?void 0:m.modal,y=m==null?void 0:m.open,w=typeof c=="boolean"?c:!!m&&!m.modal&&m.open&&!!l;u.useEffect(()=>{if(!l||x)return;function v(R){l&&R.relatedTarget&&Rn(R)&&(R.type==="focusin"?ci:xp)(l)}return l.addEventListener("focusin",v,!0),l.addEventListener("focusout",v,!0),()=>{l.removeEventListener("focusin",v,!0),l.removeEventListener("focusout",v,!0)}},[l,x]),u.useEffect(()=>{!l||y||ci(l)},[y,l]);const S=u.useMemo(()=>({beforeOutsideRef:f,afterOutsideRef:g,beforeInsideRef:h,afterInsideRef:p,portalNode:l,setFocusManagerState:b}),[l]);return ie.jsxs(u.Fragment,{children:[d,ie.jsxs(al.Provider,{value:S,children:[w&&l&&ie.jsx(Mn,{"data-type":"outside",ref:f,onFocus:v=>{var R;if(Rn(v,l))(R=h.current)==null||R.focus();else{const I=m?m.domReference:null,E=rl(I);E==null||E.focus()}}}),w&&l&&ie.jsx("span",{"aria-owns":l.id,style:ja}),l&&xt.createPortal(o,l),w&&l&&ie.jsx(Mn,{"data-type":"outside",ref:g,onFocus:v=>{var R;if(Rn(v,l))(R=p.current)==null||R.focus();else{const I=m?m.domReference:null,E=us(I);E==null||E.focus(),m!=null&&m.closeOnFocusOut&&(m==null||m.onOpenChange(!1,ge(gn,v.nativeEvent)))}}})]})]})});function fl(){const e=new Map;return{emit(t,n){var o;(o=e.get(t))==null||o.forEach(r=>r(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){var o;(o=e.get(t))==null||o.delete(n)}}}class fs{constructor(){De(this,"nodesRef",{current:[]});De(this,"events",fl())}addNode(t){this.nodesRef.current.push(t)}removeNode(t){const n=this.nodesRef.current.findIndex(o=>o===t);n!==-1&&this.nodesRef.current.splice(n,1)}}const pl=u.createContext(null),gl=u.createContext(null),Ut=()=>{var e;return((e=u.useContext(pl))==null?void 0:e.id)||null},sn=e=>{const t=u.useContext(gl);return e??t};function ml(e){const t=bn(),n=sn(e),o=Ut();return J(()=>{if(!t)return;const r={id:t,parentId:o};return n==null||n.addNode(r),()=>{n==null||n.removeNode(r)}},[n,t,o]),t}function Mp(e){const{children:t,id:n}=e,o=Ut();return ie.jsx(pl.Provider,{value:u.useMemo(()=>({id:n,parentId:o}),[n,o]),children:t})}function Ip(e){const{children:t,externalTree:n}=e,o=et(()=>n??new fs).current;return ie.jsx(gl.Provider,{value:o,children:t})}function Pp(e,t){const n=Ke(e.target);return e instanceof n.KeyboardEvent?"keyboard":e instanceof n.FocusEvent?t||"keyboard":"pointerType"in e?e.pointerType||"keyboard":"touches"in e?"touch":e instanceof n.MouseEvent?t||(e.detail===0?"keyboard":"mouse"):""}const gi=20;let Kt=[];function ps(){Kt=Kt.filter(e=>{var t;return(t=e.deref())==null?void 0:t.isConnected})}function Op(e){ps(),e&&tn(e)!=="body"&&(Kt.push(new WeakRef(e)),Kt.length>gi&&(Kt=Kt.slice(-gi)))}function hr(){var e;return ps(),(e=Kt[Kt.length-1])==null?void 0:e.deref()}function Ap(e){if(!e)return null;const t=On();return nl(e,t)?e:to(e,t)[0]||e}function Lp(e){return!e||!e.isConnected?!1:typeof e.checkVisibility=="function"?e.checkVisibility():as(e)}function mi(e,t){var i;if(!t.current.includes("floating")&&!((i=e.getAttribute("role"))!=null&&i.includes("dialog")))return;const n=On(),r=bp(e,n).filter(c=>{const a=c.getAttribute("data-tabindex")||"";return nl(c,n)||c.hasAttribute("data-tabindex")&&!a.startsWith("-")}),s=e.getAttribute("tabindex");t.current.includes("floating")||r.length===0?s!=="0"&&e.setAttribute("tabindex","0"):(s!=="-1"||e.hasAttribute("data-tabindex")&&e.getAttribute("data-tabindex")!=="-1")&&(e.setAttribute("tabindex","-1"),e.setAttribute("data-tabindex","-1"))}function gs(e){const{context:t,children:n,disabled:o=!1,initialFocus:r=!0,returnFocus:s=!0,restoreFocus:i=!1,modal:c=!0,closeOnFocusOut:a=!0,openInteractionType:l="",nextFocusableElement:d,previousFocusableElement:f,beforeContentFocusGuardRef:g,externalTree:h,getInsideElements:p}=e,m="rootStore"in t?t.rootStore:t,b=m.useState("open"),x=m.useState("domReferenceElement"),y=m.useState("floatingElement"),{events:w,dataRef:S}=m.context,v=ne(()=>{var te;return(te=S.current.floatingContext)==null?void 0:te.nodeId}),R=r===!1,I=Nr(x)&&R,E=u.useRef(["content"]),T=nt(r),V=nt(s),_=nt(l),M=sn(h),C=ul(),O=u.useRef(!1),k=u.useRef(!1),D=u.useRef(!1),P=u.useRef(-1),L=u.useRef(""),N=u.useRef(""),F=u.useRef(null),U=u.useRef(null),H=Rt(F,g,C==null?void 0:C.beforeInsideRef),ce=Rt(U,C==null?void 0:C.afterInsideRef),G=Xe(),Z=Xe(),$=Jn(),K=C!=null,Y=qn(y),oe=ne((te=Y)=>te?to(te,On()):[]),se=ne(()=>(p==null?void 0:p().filter(te=>te!=null))??[]),re=ne(te=>{const X=oe(te);return E.current.map(()=>X).filter(Boolean).flat()});u.useEffect(()=>{if(o||!c)return;function te(le){le.key==="Tab"&&we(Y,at(Oe(Y)))&&oe().length===0&&!I&&dt(le)}const X=Oe(Y);return X.addEventListener("keydown",te),()=>{X.removeEventListener("keydown",te)}},[o,x,Y,c,E,I,oe,re]),u.useEffect(()=>{if(o||!b)return;const te=Oe(Y);function X(){D.current=!1}function le(q){const Q=lt(q),j=se(),B=we(y,Q)||we(x,Q)||we(C==null?void 0:C.portalNode,Q)||j.some(A=>A===Q||we(A,Q));D.current=!B,N.current=q.pointerType||"keyboard",Q!=null&&Q.closest(`[${$a}]`)&&(k.current=!0)}function xe(){N.current="keyboard"}return te.addEventListener("pointerdown",le,!0),te.addEventListener("pointerup",X,!0),te.addEventListener("pointercancel",X,!0),te.addEventListener("keydown",xe,!0),()=>{te.removeEventListener("pointerdown",le,!0),te.removeEventListener("pointerup",X,!0),te.removeEventListener("pointercancel",X,!0),te.removeEventListener("keydown",xe,!0)}},[o,y,x,Y,b,C,se]),u.useEffect(()=>{if(o||!a)return;const te=Oe(Y);function X(){k.current=!0,Z.start(0,()=>{k.current=!1})}function le(B){const A=lt(B),W=oe().indexOf(A);W!==-1&&(P.current=W)}function xe(B){const A=B.relatedTarget,z=B.currentTarget,W=lt(B);queueMicrotask(()=>{const de=v(),be=m.context.triggerElements,Ee=se(),Ne=(A==null?void 0:A.hasAttribute(Yn("focus-guard")))&&[F.current,U.current,C==null?void 0:C.beforeInsideRef.current,C==null?void 0:C.afterInsideRef.current,C==null?void 0:C.beforeOutsideRef.current,C==null?void 0:C.afterOutsideRef.current,Dt(f),Dt(d)].includes(A),Ae=!(we(x,A)||we(y,A)||we(A,y)||we(C==null?void 0:C.portalNode,A)||Ee.some(ve=>ve===A||we(ve,A))||A!=null&&be.hasElement(A)||be.hasMatchingElement(ve=>we(ve,A))||Ne||M&&(Vt(M.nodesRef.current,de).find(ve=>{var Pe,Re;return we((Pe=ve.context)==null?void 0:Pe.elements.floating,A)||we((Re=ve.context)==null?void 0:Re.elements.domReference,A)})||oi(M.nodesRef.current,de).find(ve=>{var Pe,Re,He;return[(Pe=ve.context)==null?void 0:Pe.elements.floating,qn((Re=ve.context)==null?void 0:Re.elements.floating)].includes(A)||((He=ve.context)==null?void 0:He.elements.domReference)===A})));if(z===x&&Y&&mi(Y,E),i&&z!==x&&!Lp(W)&&at(te)===te.body){if(je(Y)&&(Y.focus(),i==="popup")){$.request(()=>{Y.focus()});return}const ve=P.current,Pe=oe(),Re=Pe[ve]||Pe[Pe.length-1]||Y;je(Re)&&Re.focus()}if(S.current.insideReactTree){S.current.insideReactTree=!1;return}(I||!c)&&A&&Ae&&!k.current&&(I||A!==hr())&&(O.current=!0,m.setOpen(!1,ge(gn,B)))})}function q(){D.current||(S.current.insideReactTree=!0,G.start(0,()=>{S.current.insideReactTree=!1}))}const Q=je(x)?x:null,j=[];if(!(!y&&!Q))return Q&&(Q.addEventListener("focusout",xe),Q.addEventListener("pointerdown",X),j.push(()=>{Q.removeEventListener("focusout",xe),Q.removeEventListener("pointerdown",X)})),y&&(y.addEventListener("focusin",le),y.addEventListener("focusout",xe),C&&(y.addEventListener("focusout",q,!0),j.push(()=>{y.removeEventListener("focusout",q,!0)})),j.push(()=>{y.removeEventListener("focusin",le),y.removeEventListener("focusout",xe)})),()=>{j.forEach(B=>{B()})}},[o,x,y,Y,c,M,C,m,a,i,oe,I,v,E,S,G,Z,$,d,f,se]),u.useEffect(()=>{var A,z,W;if(o||!y||!b)return;const te=Array.from(((A=C==null?void 0:C.portalNode)==null?void 0:A.querySelectorAll(`[${Yn("portal")}]`))||[]),le=(W=(z=(M?oi(M.nodesRef.current,v()):[]).find(de=>{var be;return Nr(((be=de.context)==null?void 0:be.elements.domReference)||null)}))==null?void 0:z.context)==null?void 0:W.elements.domReference,q=[...[y,...te,F.current,U.current,C==null?void 0:C.beforeOutsideRef.current,C==null?void 0:C.afterOutsideRef.current,...se()],le,Dt(f),Dt(d),I?x:null].filter(de=>de!=null),Q=pi(q,{ariaHidden:c||I,mark:!1}),j=[y,...te].filter(de=>de!=null),B=pi(j);return()=>{B(),Q()}},[b,o,x,y,c,E,C,I,M,v,d,f,se]),J(()=>{if(!b||o||!je(Y))return;const te=Oe(Y),X=at(te);queueMicrotask(()=>{const le=re(Y),xe=T.current,q=typeof xe=="function"?xe(_.current||""):xe;if(q===void 0||q===!1)return;let Q;q===!0||q===null?Q=le[0]||Y:Q=Dt(q),Q=Q||le[0]||Y,!we(Y,X)&&$n(Q,{preventScroll:Q===Y})})},[o,b,Y,R,re,T,_]),J(()=>{if(o||!Y)return;const te=Oe(Y),X=at(te);Op(X);function le(q){if(q.open||(L.current=Pp(q.nativeEvent,N.current)),q.reason===ct&&q.nativeEvent.type==="mouseleave"&&(O.current=!0),q.reason===Ko)if(q.nested)O.current=!1;else if($c(q.nativeEvent)||jc(q.nativeEvent))O.current=!1;else{let Q=!1;document.createElement("div").focus({get preventScroll(){return Q=!0,!1}}),Q?O.current=!1:O.current=!0}}w.on("openchange",le);function xe(){const q=V.current;let Q=typeof q=="function"?q(L.current):q;if(Q===void 0||Q===!1)return null;if(Q===null&&(Q=!0),typeof Q=="boolean"){const B=x||hr();return B&&B.isConnected?B:null}const j=x||hr();return Dt(Q)||j||null}return()=>{w.off("openchange",le);const q=at(te),Q=se(),j=we(y,q)||Q.some(A=>A===q||we(A,q))||M&&Vt(M.nodesRef.current,v(),!1).some(A=>{var z;return we((z=A.context)==null?void 0:z.elements.floating,q)}),B=xe();queueMicrotask(()=>{const A=Ap(B),z=typeof V.current!="boolean";V.current&&!O.current&&je(A)&&(!(!z&&A!==q&&q!==te.body)||j)&&A.focus({preventScroll:!0}),O.current=!1})}},[o,y,Y,V,S,w,M,x,v,se]),J(()=>{if(!rs||b||!y)return;const te=at(Oe(y));!je(te)||!Qo(te)||we(y,te)&&te.blur()},[b,y]),J(()=>{if(!(o||!C))return C.setFocusManagerState({modal:c,closeOnFocusOut:a,open:b,onOpenChange:m.setOpen,domReference:x}),()=>{C.setFocusManagerState(null)}},[o,C,c,b,m,a,x]),J(()=>{if(!(o||!Y))return mi(Y,E),()=>{queueMicrotask(ps)}},[o,Y,E]);const me=!o&&(c?!I:!0)&&(K||c);return ie.jsxs(u.Fragment,{children:[me&&ie.jsx(Mn,{"data-type":"inside",ref:H,onFocus:te=>{var X;if(c){const le=re();$n(le[le.length-1])}else if(C!=null&&C.portalNode)if(O.current=!1,Rn(te,C.portalNode)){const le=us(x);le==null||le.focus()}else(X=Dt(f??C.beforeOutsideRef))==null||X.focus()}}),n,me&&ie.jsx(Mn,{"data-type":"inside",ref:ce,onFocus:te=>{var X;if(c)$n(re()[0]);else if(C!=null&&C.portalNode)if(a&&(O.current=!0),Rn(te,C.portalNode)){const le=rl(x);le==null||le.focus()}else(X=Dt(d??C.afterOutsideRef))==null||X.focus()}})]})}function hl(e,t={}){const n="rootStore"in e?e.rootStore:e,o=n.context.dataRef,{enabled:r=!0,event:s="click",toggle:i=!0,ignoreMouse:c=!1,stickIfOpen:a=!0,touchOpenDelay:l=0,reason:d=pn}=t,f=u.useRef(void 0),g=Jn(),h=Xe(),p=u.useMemo(()=>({onPointerDown(m){f.current=m.pointerType},onMouseDown(m){const b=f.current,x=m.nativeEvent,y=n.select("open");if(m.button!==0||s==="click"||Cn(b,!0)&&c)return;const w=o.current.openEvent,S=w==null?void 0:w.type,v=n.select("domReferenceElement")!==m.currentTarget,R=y&&v||!(y&&i&&(!(w&&a)||S==="click"||S==="mousedown"));if(Qo(x.target)){const E=ge(d,x,x.target);R&&b==="touch"&&l>0?h.start(l,()=>{n.setOpen(!0,E)}):n.setOpen(R,E);return}const I=m.currentTarget;g.request(()=>{const E=ge(d,x,I);R&&b==="touch"&&l>0?h.start(l,()=>{n.setOpen(!0,E)}):n.setOpen(R,E)})},onClick(m){if(s==="mousedown-only")return;const b=f.current;if(s==="mousedown"&&b){f.current=void 0;return}if(Cn(b,!0)&&c)return;const x=n.select("open"),y=o.current.openEvent,w=n.select("domReferenceElement")!==m.currentTarget,S=x&&w||!(x&&i&&(!(y&&a)||Uc(y))),v=ge(d,m.nativeEvent,m.currentTarget);S&&b==="touch"&&l>0?h.start(l,()=>{n.setOpen(!0,v)}):n.setOpen(S,v)},onKeyDown(){f.current=void 0}}),[o,s,c,n,a,i,g,h,l,d]);return u.useMemo(()=>r?{reference:p}:Ue,[r,p])}function Np(e,t){let n=null,o=null,r=!1;return{contextElement:e||void 0,getBoundingClientRect(){var h;const s=(e==null?void 0:e.getBoundingClientRect())||{width:0,height:0,x:0,y:0},i=t.axis==="x"||t.axis==="both",c=t.axis==="y"||t.axis==="both",a=["mouseenter","mousemove"].includes(((h=t.dataRef.current.openEvent)==null?void 0:h.type)||"")&&t.pointerType!=="touch";let l=s.width,d=s.height,f=s.x,g=s.y;return n==null&&t.x&&i&&(n=s.x-t.x),o==null&&t.y&&c&&(o=s.y-t.y),f-=n||0,g-=o||0,l=0,d=0,!r||a?(l=t.axis==="y"?s.width:0,d=t.axis==="x"?s.height:0,f=i&&t.x!=null?t.x:f,g=c&&t.y!=null?t.y:g):r&&!a&&(d=t.axis==="x"?s.height:d,l=t.axis==="y"?s.width:l),r=!0,{width:l,height:d,x:f,y:g,top:g,right:f+l,bottom:g+d,left:f}}}}function hi(e){return e!=null&&e.clientX!=null}function Fp(e,t={}){const n="rootStore"in e?e.rootStore:e,o=n.useState("open"),r=n.useState("floatingElement"),s=n.useState("domReferenceElement"),i=n.context.dataRef,{enabled:c=!0,axis:a="both"}=t,l=u.useRef(!1),d=u.useRef(null),[f,g]=u.useState(),[h,p]=u.useState([]),m=ne((S,v,R)=>{l.current||i.current.openEvent&&!hi(i.current.openEvent)||n.set("positionReference",Np(R??s,{x:S,y:v,axis:a,dataRef:i,pointerType:f}))}),b=ne(S=>{o?d.current||p([]):m(S.clientX,S.clientY,S.currentTarget)}),x=Cn(f)?r:o,y=u.useCallback(()=>{if(!x||!c)return;const S=Ke(r);function v(R){const I=lt(R);we(r,I)?(S.removeEventListener("mousemove",v),d.current=null):m(R.clientX,R.clientY)}if(!i.current.openEvent||hi(i.current.openEvent)){S.addEventListener("mousemove",v);const R=()=>{S.removeEventListener("mousemove",v),d.current=null};return d.current=R,R}n.set("positionReference",s)},[x,c,r,i,s,n,m]);u.useEffect(()=>y(),[y,h]),u.useEffect(()=>{c&&!r&&(l.current=!1)},[c,r]),u.useEffect(()=>{!c&&o&&(l.current=!0)},[c,o]);const w=u.useMemo(()=>{function S(v){g(v.pointerType)}return{onPointerDown:S,onPointerEnter:S,onMouseMove:b,onMouseEnter:b}},[b]);return u.useMemo(()=>c?{reference:w,trigger:w}:{},[c,w])}const Dp={intentional:"onClick",sloppy:"onPointerDown"};function Vp(){return!1}function _p(e){return{escapeKey:typeof e=="boolean"?e:(e==null?void 0:e.escapeKey)??!1,outsidePress:typeof e=="boolean"?e:(e==null?void 0:e.outsidePress)??!0}}function er(e,t={}){const n="rootStore"in e?e.rootStore:e,o=n.useState("open"),r=n.useState("floatingElement"),{dataRef:s}=n.context,{enabled:i=!0,escapeKey:c=!0,outsidePress:a=!0,outsidePressEvent:l="sloppy",referencePress:d=Vp,referencePressEvent:f="sloppy",bubbles:g,externalTree:h}=t,p=sn(h),m=ne(typeof a=="function"?a:()=>!1),b=typeof a=="function"?m:a,x=b!==!1,y=ne(()=>l),w=u.useRef(!1),S=u.useRef(!1),v=u.useRef(!1),{escapeKey:R,outsidePress:I}=_p(g),E=u.useRef(null),T=Xe(),V=Xe(),_=ne(()=>{V.clear(),s.current.insideReactTree=!1}),M=u.useRef(!1),C=u.useRef(""),O=ne(d),k=ne(U=>{var $;if(!o||!i||!c||U.key!=="Escape"||M.current)return;const H=($=s.current.floatingContext)==null?void 0:$.nodeId,ce=p?Vt(p.nodesRef.current,H):[];if(!R&&ce.length>0){let K=!0;if(ce.forEach(Y=>{var oe;(oe=Y.context)!=null&&oe.open&&!Y.context.dataRef.current.__escapeKeyBubbles&&(K=!1)}),!K)return}const G=Gf(U)?U.nativeEvent:U,Z=ge(Yo,G);n.setOpen(!1,Z),!R&&!Z.isPropagationAllowed&&U.stopPropagation()}),D=ne(()=>{s.current.insideReactTree=!0,V.start(0,_)});u.useEffect(()=>{if(!o||!i)return;s.current.__escapeKeyBubbles=R,s.current.__outsidePressBubbles=I;const U=new wt,H=new wt;function ce(){U.clear(),M.current=!0}function G(){U.start(Uo()?5:0,()=>{M.current=!1})}function Z(){v.current=!0,H.start(0,()=>{v.current=!1})}function $(){w.current=!1,S.current=!1}function K(){const A=C.current,z=A==="pen"||!A?"mouse":A,W=y(),de=typeof W=="function"?W():W;return typeof de=="string"?de:de[z]}function Y(A){const z=K();return z==="intentional"&&A.type!=="click"||z==="sloppy"&&A.type==="click"}function oe(A){var de;const z=(de=s.current.floatingContext)==null?void 0:de.nodeId,W=p&&Vt(p.nodesRef.current,z).some(be=>{var Ee;return vt(A,(Ee=be.context)==null?void 0:Ee.elements.floating)});return vt(A,n.select("floatingElement"))||vt(A,n.select("domReferenceElement"))||W}function se(A){var Pe;if(Y(A)){_();return}if(s.current.insideReactTree){_();return}const z=lt(A),W=`[${Yn("inert")}]`;let de=Array.from(Oe(n.select("floatingElement")).querySelectorAll(W));const be=Le(z)?z.getRootNode():null;Un(be)&&(de=de.concat(Array.from(be.querySelectorAll(W))));const Ee=n.context.triggerElements;if(z&&(Ee.hasElement(z)||Ee.hasMatchingElement(Re=>we(Re,z))))return;let Ne=Le(z)?z:null;for(;Ne&&!Tt(Ne);){const Re=It(Ne);if(Tt(Re)||!Le(Re))break;Ne=Re}if(de.length&&Le(z)&&!Wf(z)&&!we(z,n.select("floatingElement"))&&de.every(Re=>!we(Ne,Re)))return;if(je(z)&&!("touches"in A)){const Re=Tt(z),He=pt(z),fe=/auto|scroll/,Ce=Re||fe.test(He.overflowX),ze=Re||fe.test(He.overflowY),Ze=Ce&&z.clientWidth>0&&z.scrollWidth>z.clientWidth,Te=ze&&z.clientHeight>0&&z.scrollHeight>z.clientHeight,$e=He.direction==="rtl",ke=Te&&($e?A.offsetX<=z.offsetWidth-z.clientWidth:A.offsetX>z.clientWidth),Fe=Ze&&A.offsetY>z.clientHeight;if(ke||Fe)return}if(oe(A))return;if(K()==="intentional"&&v.current){H.clear(),v.current=!1;return}if(typeof b=="function"&&!b(A))return;const Ae=(Pe=s.current.floatingContext)==null?void 0:Pe.nodeId,ve=p?Vt(p.nodesRef.current,Ae):[];if(ve.length>0){let Re=!0;if(ve.forEach(He=>{var fe;(fe=He.context)!=null&&fe.open&&!He.context.dataRef.current.__outsidePressBubbles&&(Re=!1)}),!Re)return}n.setOpen(!1,ge(Ko,A)),_()}function re(A){K()!=="sloppy"||A.pointerType==="touch"||!n.select("open")||!i||vt(A,n.select("floatingElement"))||vt(A,n.select("domReferenceElement"))||se(A)}function me(A){if(K()!=="sloppy"||!n.select("open")||!i||vt(A,n.select("floatingElement"))||vt(A,n.select("domReferenceElement")))return;const z=A.touches[0];z&&(E.current={startTime:Date.now(),startX:z.clientX,startY:z.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},T.start(1e3,()=>{E.current&&(E.current.dismissOnTouchEnd=!1,E.current.dismissOnMouseDown=!1)}))}function te(A){C.current="touch";const z=lt(A);function W(){me(A),z==null||z.removeEventListener(A.type,W)}z==null||z.addEventListener(A.type,W)}function X(A){if(T.clear(),A.type==="pointerdown"&&(C.current=A.pointerType),A.type==="mousedown"&&E.current&&!E.current.dismissOnMouseDown)return;const z=lt(A);function W(){A.type==="pointerdown"?re(A):se(A),z==null||z.removeEventListener(A.type,W)}z==null||z.addEventListener(A.type,W)}function le(A){if(!w.current)return;const z=S.current;if($(),K()==="intentional"){if(A.type==="pointercancel"){z&&Z();return}if(!oe(A)){if(z){Z();return}typeof b=="function"&&!b(A)||(H.clear(),v.current=!0,_())}}}function xe(A){if(K()!=="sloppy"||!E.current||vt(A,n.select("floatingElement"))||vt(A,n.select("domReferenceElement")))return;const z=A.touches[0];if(!z)return;const W=Math.abs(z.clientX-E.current.startX),de=Math.abs(z.clientY-E.current.startY),be=Math.sqrt(W*W+de*de);be>5&&(E.current.dismissOnTouchEnd=!0),be>10&&(se(A),T.clear(),E.current=null)}function q(A){const z=lt(A);function W(){xe(A),z==null||z.removeEventListener(A.type,W)}z==null||z.addEventListener(A.type,W)}function Q(A){K()!=="sloppy"||!E.current||vt(A,n.select("floatingElement"))||vt(A,n.select("domReferenceElement"))||(E.current.dismissOnTouchEnd&&se(A),T.clear(),E.current=null)}function j(A){const z=lt(A);function W(){Q(A),z==null||z.removeEventListener(A.type,W)}z==null||z.addEventListener(A.type,W)}const B=Oe(r);return c&&(B.addEventListener("keydown",k),B.addEventListener("compositionstart",ce),B.addEventListener("compositionend",G)),x&&(B.addEventListener("click",X,!0),B.addEventListener("pointerdown",X,!0),B.addEventListener("pointerup",le,!0),B.addEventListener("pointercancel",le,!0),B.addEventListener("mousedown",X,!0),B.addEventListener("mouseup",le,!0),B.addEventListener("touchstart",te,!0),B.addEventListener("touchmove",q,!0),B.addEventListener("touchend",j,!0)),()=>{c&&(B.removeEventListener("keydown",k),B.removeEventListener("compositionstart",ce),B.removeEventListener("compositionend",G)),x&&(B.removeEventListener("click",X,!0),B.removeEventListener("pointerdown",X,!0),B.removeEventListener("pointerup",le,!0),B.removeEventListener("pointercancel",le,!0),B.removeEventListener("mousedown",X,!0),B.removeEventListener("mouseup",le,!0),B.removeEventListener("touchstart",te,!0),B.removeEventListener("touchmove",q,!0),B.removeEventListener("touchend",j,!0)),U.clear(),H.clear(),$(),v.current=!1}},[s,r,c,x,b,o,i,R,I,k,_,y,p,n,T]),u.useEffect(_,[b,_]);const P=u.useMemo(()=>({onKeyDown:k,[Dp[f]]:U=>{O()&&n.setOpen(!1,ge(pn,U.nativeEvent))},...f!=="intentional"&&{onClick(U){O()&&n.setOpen(!1,ge(pn,U.nativeEvent))}}}),[k,n,f,O]),L=ne(U=>{if(!o||!i||U.button!==0)return;const H=lt(U.nativeEvent);we(n.select("floatingElement"),H)&&(w.current||(w.current=!0,S.current=!1))}),N=ne(U=>{!o||!i||(U.defaultPrevented||U.nativeEvent.defaultPrevented)&&w.current&&(S.current=!0)}),F=u.useMemo(()=>({onKeyDown:k,onPointerDown:N,onMouseDown:N,onClickCapture:D,onMouseDownCapture(U){D(),L(U)},onPointerDownCapture(U){D(),L(U)},onMouseUpCapture:D,onTouchEndCapture:D,onTouchMoveCapture:D}),[k,D,L,N]);return u.useMemo(()=>i?{reference:P,floating:F,trigger:P}:{},[i,P,F])}function bi(e,t,n){let{reference:o,floating:r}=e;const s=yt(t),i=ls(t),c=cs(i),a=ut(t),l=s==="y",d=o.x+o.width/2-r.width/2,f=o.y+o.height/2-r.height/2,g=o[c]/2-r[c]/2;let h;switch(a){case"top":h={x:d,y:o.y-r.height};break;case"bottom":h={x:d,y:o.y+o.height};break;case"right":h={x:o.x+o.width,y:f};break;case"left":h={x:o.x-r.width,y:f};break;default:h={x:o.x,y:o.y}}switch(rn(t)){case"start":h[i]-=g*(n&&l?-1:1);break;case"end":h[i]+=g*(n&&l?-1:1);break}return h}async function Hp(e,t){var n;t===void 0&&(t={});const{x:o,y:r,platform:s,rects:i,elements:c,strategy:a}=e,{boundary:l="clippingAncestors",rootBoundary:d="viewport",elementContext:f="floating",altBoundary:g=!1,padding:h=0}=Bt(t,e),p=Wc(h),b=c[g?f==="floating"?"reference":"floating":f],x=Gn(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(b)))==null||n?b:b.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(c.floating)),boundary:l,rootBoundary:d,strategy:a})),y=f==="floating"?{x:o,y:r,width:i.floating.width,height:i.floating.height}:i.reference,w=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c.floating)),S=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},v=Gn(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:y,offsetParent:w,strategy:a}):y);return{top:(x.top-v.top+p.top)/S.y,bottom:(v.bottom-x.bottom+p.bottom)/S.y,left:(x.left-v.left+p.left)/S.x,right:(v.right-x.right+p.right)/S.x}}const Bp=50,zp=async(e,t,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:s=[],platform:i}=n,c=i.detectOverflow?i:{...i,detectOverflow:Hp},a=await(i.isRTL==null?void 0:i.isRTL(t));let l=await i.getElementRects({reference:e,floating:t,strategy:r}),{x:d,y:f}=bi(l,o,a),g=o,h=0;const p={};for(let m=0;m<s.length;m++){const b=s[m];if(!b)continue;const{name:x,fn:y}=b,{x:w,y:S,data:v,reset:R}=await y({x:d,y:f,initialPlacement:o,placement:g,strategy:r,middlewareData:p,rects:l,platform:c,elements:{reference:e,floating:t}});d=w??d,f=S??f,p[x]={...p[x],...v},R&&h<Bp&&(h++,typeof R=="object"&&(R.placement&&(g=R.placement),R.rects&&(l=R.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:r}):R.rects),{x:d,y:f}=bi(l,g,a)),m=-1)}return{x:d,y:f,placement:g,strategy:r,middlewareData:p}},$p=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:r,middlewareData:s,rects:i,initialPlacement:c,platform:a,elements:l}=t,{mainAxis:d=!0,crossAxis:f=!0,fallbackPlacements:g,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:m=!0,...b}=Bt(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const x=ut(r),y=yt(c),w=ut(c)===c,S=await(a.isRTL==null?void 0:a.isRTL(l.floating)),v=g||(w||!m?[No(c)]:Zf(c)),R=p!=="none";!g&&R&&v.push(...tp(c,m,p,S));const I=[c,...v],E=await a.detectOverflow(t,b),T=[];let V=((o=s.flip)==null?void 0:o.overflows)||[];if(d&&T.push(E[x]),f){const O=Xf(r,i,S);T.push(E[O[0]],E[O[1]])}if(V=[...V,{placement:r,overflows:T}],!T.every(O=>O<=0)){var _,M;const O=(((_=s.flip)==null?void 0:_.index)||0)+1,k=I[O];if(k&&(!(f==="alignment"?y!==yt(k):!1)||V.every(L=>yt(L.placement)===y?L.overflows[0]>0:!0)))return{data:{index:O,overflows:V},reset:{placement:k}};let D=(M=V.filter(P=>P.overflows[0]<=0).sort((P,L)=>P.overflows[1]-L.overflows[1])[0])==null?void 0:M.placement;if(!D)switch(h){case"bestFit":{var C;const P=(C=V.filter(L=>{if(R){const N=yt(L.placement);return N===y||N==="y"}return!0}).map(L=>[L.placement,L.overflows.filter(N=>N>0).reduce((N,F)=>N+F,0)]).sort((L,N)=>L[1]-N[1])[0])==null?void 0:C[0];P&&(D=P);break}case"initialPlacement":D=c;break}if(r!==D)return{reset:{placement:D}}}return{}}}};function yi(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function vi(e){return Kf.some(t=>e[t]>=0)}const jp=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:o}=t,{strategy:r="referenceHidden",...s}=Bt(e,t);switch(r){case"referenceHidden":{const i=await o.detectOverflow(t,{...s,elementContext:"reference"}),c=yi(i,n.reference);return{data:{referenceHiddenOffsets:c,referenceHidden:vi(c)}}}case"escaped":{const i=await o.detectOverflow(t,{...s,altBoundary:!0}),c=yi(i,n.floating);return{data:{escapedOffsets:c,escaped:vi(c)}}}default:return{}}}}},bl=new Set(["left","top"]);async function Up(e,t){const{placement:n,platform:o,elements:r}=e,s=await(o.isRTL==null?void 0:o.isRTL(r.floating)),i=ut(n),c=rn(n),a=yt(n)==="y",l=bl.has(i)?-1:1,d=s&&a?-1:1,f=Bt(t,e);let{mainAxis:g,crossAxis:h,alignmentAxis:p}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return c&&typeof p=="number"&&(h=c==="end"?p*-1:p),a?{x:h*d,y:g*l}:{x:g*l,y:h*d}}const Wp=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,o;const{x:r,y:s,placement:i,middlewareData:c}=t,a=await Up(t,e);return i===((n=c.offset)==null?void 0:n.placement)&&(o=c.arrow)!=null&&o.alignmentOffset?{}:{x:r+a.x,y:s+a.y,data:{...a,placement:i}}}}},qp=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:r,platform:s}=t,{mainAxis:i=!0,crossAxis:c=!1,limiter:a={fn:x=>{let{x:y,y:w}=x;return{x:y,y:w}}},...l}=Bt(e,t),d={x:n,y:o},f=await s.detectOverflow(t,l),g=yt(ut(r)),h=is(g);let p=d[h],m=d[g];if(i){const x=h==="y"?"top":"left",y=h==="y"?"bottom":"right",w=p+f[x],S=p-f[y];p=Fr(w,p,S)}if(c){const x=g==="y"?"top":"left",y=g==="y"?"bottom":"right",w=m+f[x],S=m-f[y];m=Fr(w,m,S)}const b=a.fn({...t,[h]:p,[g]:m});return{...b,data:{x:b.x-n,y:b.y-o,enabled:{[h]:i,[g]:c}}}}}},Gp=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:o,placement:r,rects:s,middlewareData:i}=t,{offset:c=0,mainAxis:a=!0,crossAxis:l=!0}=Bt(e,t),d={x:n,y:o},f=yt(r),g=is(f);let h=d[g],p=d[f];const m=Bt(c,t),b=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(a){const w=g==="y"?"height":"width",S=s.reference[g]-s.floating[w]+b.mainAxis,v=s.reference[g]+s.reference[w]-b.mainAxis;h<S?h=S:h>v&&(h=v)}if(l){var x,y;const w=g==="y"?"width":"height",S=bl.has(ut(r)),v=s.reference[f]-s.floating[w]+(S&&((x=i.offset)==null?void 0:x[f])||0)+(S?0:b.crossAxis),R=s.reference[f]+s.reference[w]+(S?0:((y=i.offset)==null?void 0:y[f])||0)-(S?b.crossAxis:0);p<v?p=v:p>R&&(p=R)}return{[g]:h,[f]:p}}}},Kp=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,o;const{placement:r,rects:s,platform:i,elements:c}=t,{apply:a=()=>{},...l}=Bt(e,t),d=await i.detectOverflow(t,l),f=ut(r),g=rn(r),h=yt(r)==="y",{width:p,height:m}=s.floating;let b,x;f==="top"||f==="bottom"?(b=f,x=g===(await(i.isRTL==null?void 0:i.isRTL(c.floating))?"start":"end")?"left":"right"):(x=f,b=g==="end"?"top":"bottom");const y=m-d.top-d.bottom,w=p-d.left-d.right,S=kn(m-d[b],y),v=kn(p-d[x],w),R=!t.middlewareData.shift;let I=S,E=v;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(E=w),(o=t.middlewareData.shift)!=null&&o.enabled.y&&(I=y),R&&!g){const V=ft(d.left,0),_=ft(d.right,0),M=ft(d.top,0),C=ft(d.bottom,0);h?E=p-2*(V!==0||_!==0?V+_:ft(d.left,d.right)):I=m-2*(M!==0||C!==0?M+C:ft(d.top,d.bottom))}await a({...t,availableWidth:E,availableHeight:I});const T=await i.getDimensions(c.floating);return p!==T.width||m!==T.height?{reset:{rects:!0}}:{}}}};function yl(e){const t=pt(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const r=je(e),s=r?e.offsetWidth:n,i=r?e.offsetHeight:o,c=Lo(n)!==s||Lo(o)!==i;return c&&(n=s,o=i),{width:n,height:o,$:c}}function ms(e){return Le(e)?e:e.contextElement}function wn(e){const t=ms(e);if(!je(t))return Mt(1);const n=t.getBoundingClientRect(),{width:o,height:r,$:s}=yl(t);let i=(s?Lo(n.width):n.width)/o,c=(s?Lo(n.height):n.height)/r;return(!i||!Number.isFinite(i))&&(i=1),(!c||!Number.isFinite(c))&&(c=1),{x:i,y:c}}const Yp=Mt(0);function vl(e){const t=Ke(e);return!Uo()||!t.visualViewport?Yp:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Xp(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Ke(e)?!1:t}function mn(e,t,n,o){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=e.getBoundingClientRect(),s=ms(e);let i=Mt(1);t&&(o?Le(o)&&(i=wn(o)):i=wn(e));const c=Xp(s,n,o)?vl(s):Mt(0);let a=(r.left+c.x)/i.x,l=(r.top+c.y)/i.y,d=r.width/i.x,f=r.height/i.y;if(s){const g=Ke(s),h=o&&Le(o)?Ke(o):o;let p=g,m=Pr(p);for(;m&&o&&h!==p;){const b=wn(m),x=m.getBoundingClientRect(),y=pt(m),w=x.left+(m.clientLeft+parseFloat(y.paddingLeft))*b.x,S=x.top+(m.clientTop+parseFloat(y.paddingTop))*b.y;a*=b.x,l*=b.y,d*=b.x,f*=b.y,a+=w,l+=S,p=Ke(m),m=Pr(p)}}return Gn({width:d,height:f,x:a,y:l})}function tr(e,t){const n=Wo(e).scrollLeft;return t?t.left+n:mn(Ot(e)).left+n}function xl(e,t){const n=e.getBoundingClientRect(),o=n.left+t.scrollLeft-tr(e,n),r=n.top+t.scrollTop;return{x:o,y:r}}function Zp(e){let{elements:t,rect:n,offsetParent:o,strategy:r}=e;const s=r==="fixed",i=Ot(o),c=t?jo(t.floating):!1;if(o===i||c&&s)return n;let a={scrollLeft:0,scrollTop:0},l=Mt(1);const d=Mt(0),f=je(o);if((f||!f&&!s)&&((tn(o)!=="body"||nn(i))&&(a=Wo(o)),f)){const h=mn(o);l=wn(o),d.x=h.x+o.clientLeft,d.y=h.y+o.clientTop}const g=i&&!f&&!s?xl(i,a):Mt(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-a.scrollLeft*l.x+d.x+g.x,y:n.y*l.y-a.scrollTop*l.y+d.y+g.y}}function Jp(e){return Array.from(e.getClientRects())}function Qp(e){const t=Ot(e),n=Wo(e),o=e.ownerDocument.body,r=ft(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),s=ft(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let i=-n.scrollLeft+tr(e);const c=-n.scrollTop;return pt(o).direction==="rtl"&&(i+=ft(t.clientWidth,o.clientWidth)-r),{width:r,height:s,x:i,y:c}}const xi=25;function eg(e,t){const n=Ke(e),o=Ot(e),r=n.visualViewport;let s=o.clientWidth,i=o.clientHeight,c=0,a=0;if(r){s=r.width,i=r.height;const d=Uo();(!d||d&&t==="fixed")&&(c=r.offsetLeft,a=r.offsetTop)}const l=tr(o);if(l<=0){const d=o.ownerDocument,f=d.body,g=getComputedStyle(f),h=d.compatMode==="CSS1Compat"&&parseFloat(g.marginLeft)+parseFloat(g.marginRight)||0,p=Math.abs(o.clientWidth-f.clientWidth-h);p<=xi&&(s-=p)}else l<=xi&&(s+=l);return{width:s,height:i,x:c,y:a}}function tg(e,t){const n=mn(e,!0,t==="fixed"),o=n.top+e.clientTop,r=n.left+e.clientLeft,s=je(e)?wn(e):Mt(1),i=e.clientWidth*s.x,c=e.clientHeight*s.y,a=r*s.x,l=o*s.y;return{width:i,height:c,x:a,y:l}}function Ri(e,t,n){let o;if(t==="viewport")o=eg(e,n);else if(t==="document")o=Qp(Ot(e));else if(Le(t))o=tg(t,n);else{const r=vl(e);o={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return Gn(o)}function Rl(e,t){const n=It(e);return n===t||!Le(n)||Tt(n)?!1:pt(n).position==="fixed"||Rl(n,t)}function ng(e,t){const n=t.get(e);if(n)return n;let o=Wn(e,[],!1).filter(c=>Le(c)&&tn(c)!=="body"),r=null;const s=pt(e).position==="fixed";let i=s?It(e):e;for(;Le(i)&&!Tt(i);){const c=pt(i),a=Yr(i);!a&&c.position==="fixed"&&(r=null),(s?!a&&!r:!a&&c.position==="static"&&!!r&&(r.position==="absolute"||r.position==="fixed")||nn(i)&&!a&&Rl(e,i))?o=o.filter(d=>d!==i):r=c,i=It(i)}return t.set(e,o),o}function og(e){let{element:t,boundary:n,rootBoundary:o,strategy:r}=e;const i=[...n==="clippingAncestors"?jo(t)?[]:ng(t,this._c):[].concat(n),o],c=Ri(t,i[0],r);let a=c.top,l=c.right,d=c.bottom,f=c.left;for(let g=1;g<i.length;g++){const h=Ri(t,i[g],r);a=ft(h.top,a),l=kn(h.right,l),d=kn(h.bottom,d),f=ft(h.left,f)}return{width:l-f,height:d-a,x:f,y:a}}function rg(e){const{width:t,height:n}=yl(e);return{width:t,height:n}}function sg(e,t,n){const o=je(t),r=Ot(t),s=n==="fixed",i=mn(e,!0,s,t);let c={scrollLeft:0,scrollTop:0};const a=Mt(0);function l(){a.x=tr(r)}if(o||!o&&!s)if((tn(t)!=="body"||nn(r))&&(c=Wo(t)),o){const h=mn(t,!0,s,t);a.x=h.x+t.clientLeft,a.y=h.y+t.clientTop}else r&&l();s&&!o&&r&&l();const d=r&&!o&&!s?xl(r,c):Mt(0),f=i.left+c.scrollLeft-a.x-d.x,g=i.top+c.scrollTop-a.y-d.y;return{x:f,y:g,width:i.width,height:i.height}}function br(e){return pt(e).position==="static"}function wi(e,t){if(!je(e)||pt(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Ot(e)===n&&(n=n.ownerDocument.body),n}function wl(e,t){const n=Ke(e);if(jo(e))return n;if(!je(e)){let r=It(e);for(;r&&!Tt(r);){if(Le(r)&&!br(r))return r;r=It(r)}return n}let o=wi(e,t);for(;o&&Vu(o)&&br(o);)o=wi(o,t);return o&&Tt(o)&&br(o)&&!Yr(o)?n:o||Bu(e)||n}const ig=async function(e){const t=this.getOffsetParent||wl,n=this.getDimensions,o=await n(e.floating);return{reference:sg(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function cg(e){return pt(e).direction==="rtl"}const Sl={convertOffsetParentRelativeRectToViewportRelativeRect:Zp,getDocumentElement:Ot,getClippingRect:og,getOffsetParent:wl,getElementRects:ig,getClientRects:Jp,getDimensions:rg,getScale:wn,isElement:Le,isRTL:cg};function El(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function lg(e,t){let n=null,o;const r=Ot(e);function s(){var c;clearTimeout(o),(c=n)==null||c.disconnect(),n=null}function i(c,a){c===void 0&&(c=!1),a===void 0&&(a=1),s();const l=e.getBoundingClientRect(),{left:d,top:f,width:g,height:h}=l;if(c||t(),!g||!h)return;const p=un(f),m=un(r.clientWidth-(d+g)),b=un(r.clientHeight-(f+h)),x=un(d),w={rootMargin:-p+"px "+-m+"px "+-b+"px "+-x+"px",threshold:ft(0,kn(1,a))||1};let S=!0;function v(R){const I=R[0].intersectionRatio;if(I!==a){if(!S)return i();I?i(!1,I):o=setTimeout(()=>{i(!1,1e-7)},1e3)}I===1&&!El(l,e.getBoundingClientRect())&&i(),S=!1}try{n=new IntersectionObserver(v,{...w,root:r.ownerDocument})}catch{n=new IntersectionObserver(v,w)}n.observe(e)}return i(!0),s}function Si(e,t,n,o){o===void 0&&(o={});const{ancestorScroll:r=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:a=!1}=o,l=ms(e),d=r||s?[...l?Wn(l):[],...t?Wn(t):[]]:[];d.forEach(x=>{r&&x.addEventListener("scroll",n,{passive:!0}),s&&x.addEventListener("resize",n)});const f=l&&c?lg(l,n):null;let g=-1,h=null;i&&(h=new ResizeObserver(x=>{let[y]=x;y&&y.target===l&&h&&t&&(h.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var w;(w=h)==null||w.observe(t)})),n()}),l&&!a&&h.observe(l),t&&h.observe(t));let p,m=a?mn(e):null;a&&b();function b(){const x=mn(e);m&&!El(m,x)&&n(),m=x,p=requestAnimationFrame(b)}return n(),()=>{var x;d.forEach(y=>{r&&y.removeEventListener("scroll",n),s&&y.removeEventListener("resize",n)}),f==null||f(),(x=h)==null||x.disconnect(),h=null,a&&cancelAnimationFrame(p)}}const ag=Wp,ug=qp,dg=$p,fg=Kp,pg=jp,gg=Gp,mg=(e,t,n)=>{const o=new Map,r={platform:Sl,...n},s={...r.platform,_c:o};return zp(e,t,{...r,platform:s})};var hg=typeof document<"u",bg=function(){},Mo=hg?u.useLayoutEffect:bg;function Ho(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,o,r;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(o=n;o--!==0;)if(!Ho(e[o],t[o]))return!1;return!0}if(r=Object.keys(e),n=r.length,n!==Object.keys(t).length)return!1;for(o=n;o--!==0;)if(!{}.hasOwnProperty.call(t,r[o]))return!1;for(o=n;o--!==0;){const s=r[o];if(!(s==="_owner"&&e.$$typeof)&&!Ho(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function Cl(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Ei(e,t){const n=Cl(e);return Math.round(t*n)/n}function yr(e){const t=u.useRef(e);return Mo(()=>{t.current=e}),t}function yg(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:o=[],platform:r,elements:{reference:s,floating:i}={},transform:c=!0,whileElementsMounted:a,open:l}=e,[d,f]=u.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[g,h]=u.useState(o);Ho(g,o)||h(o);const[p,m]=u.useState(null),[b,x]=u.useState(null),y=u.useCallback(L=>{L!==R.current&&(R.current=L,m(L))},[]),w=u.useCallback(L=>{L!==I.current&&(I.current=L,x(L))},[]),S=s||p,v=i||b,R=u.useRef(null),I=u.useRef(null),E=u.useRef(d),T=a!=null,V=yr(a),_=yr(r),M=yr(l),C=u.useCallback(()=>{if(!R.current||!I.current)return;const L={placement:t,strategy:n,middleware:g};_.current&&(L.platform=_.current),mg(R.current,I.current,L).then(N=>{const F={...N,isPositioned:M.current!==!1};O.current&&!Ho(E.current,F)&&(E.current=F,xt.flushSync(()=>{f(F)}))})},[g,t,n,_,M]);Mo(()=>{l===!1&&E.current.isPositioned&&(E.current.isPositioned=!1,f(L=>({...L,isPositioned:!1})))},[l]);const O=u.useRef(!1);Mo(()=>(O.current=!0,()=>{O.current=!1}),[]),Mo(()=>{if(S&&(R.current=S),v&&(I.current=v),S&&v){if(V.current)return V.current(S,v,C);C()}},[S,v,C,V,T]);const k=u.useMemo(()=>({reference:R,floating:I,setReference:y,setFloating:w}),[y,w]),D=u.useMemo(()=>({reference:S,floating:v}),[S,v]),P=u.useMemo(()=>{const L={position:n,left:0,top:0};if(!D.floating)return L;const N=Ei(D.floating,d.x),F=Ei(D.floating,d.y);return c?{...L,transform:"translate("+N+"px, "+F+"px)",...Cl(D.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:N,top:F}},[n,c,D.floating,d.x,d.y]);return u.useMemo(()=>({...d,update:C,refs:k,elements:D,floatingStyles:P}),[d,C,k,D,P])}const vg=(e,t)=>{const n=ag(e);return{name:n.name,fn:n.fn,options:[e,t]}},xg=(e,t)=>{const n=ug(e);return{name:n.name,fn:n.fn,options:[e,t]}},Rg=(e,t)=>({fn:gg(e).fn,options:[e,t]}),wg=(e,t)=>{const n=dg(e);return{name:n.name,fn:n.fn,options:[e,t]}},Sg=(e,t)=>{const n=fg(e);return{name:n.name,fn:n.fn,options:[e,t]}},Eg=(e,t)=>{const n=pg(e);return{name:n.name,fn:n.fn,options:[e,t]}};var Bo=Symbol("NOT_FOUND");function Cg(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function kg(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function Tg(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(n=>typeof n=="function")){const n=e.map(o=>typeof o=="function"?`function ${o.name||"unnamed"}()`:typeof o).join(", ");throw new TypeError(`${t}[${n}]`)}}var Ci=e=>Array.isArray(e)?e:[e];function Mg(e){const t=Array.isArray(e[0])?e[0]:e;return Tg(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function Ig(e,t){const n=[],{length:o}=e;for(let r=0;r<o;r++)n.push(e[r].apply(null,t));return n}function Pg(e){let t;return{get(n){return t&&e(t.key,n)?t.value:Bo},put(n,o){t={key:n,value:o}},getEntries(){return t?[t]:[]},clear(){t=void 0}}}function Og(e,t){let n=[];function o(c){const a=n.findIndex(l=>t(c,l.key));if(a>-1){const l=n[a];return a>0&&(n.splice(a,1),n.unshift(l)),l.value}return Bo}function r(c,a){o(c)===Bo&&(n.unshift({key:c,value:a}),n.length>e&&n.pop())}function s(){return n}function i(){n=[]}return{get:o,put:r,getEntries:s,clear:i}}var Ag=(e,t)=>e===t;function Lg(e){return function(n,o){if(n===null||o===null||n.length!==o.length)return!1;const{length:r}=n;for(let s=0;s<r;s++)if(!e(n[s],o[s]))return!1;return!0}}function Ng(e,t){const n=typeof t=="object"?t:{equalityCheck:t},{equalityCheck:o=Ag,maxSize:r=1,resultEqualityCheck:s}=n,i=Lg(o);let c=0;const a=r<=1?Pg(i):Og(r,i);function l(){let d=a.get(arguments);if(d===Bo){if(d=e.apply(null,arguments),c++,s){const g=a.getEntries().find(h=>s(h.value,d));g&&(d=g.value,c!==0&&c--)}a.put(arguments,d)}return d}return l.clearCache=()=>{a.clear(),l.resetResultsCount()},l.resultsCount=()=>c,l.resetResultsCount=()=>{c=0},l}var Fg=class{constructor(e){this.value=e}deref(){return this.value}},Dg=typeof WeakRef<"u"?WeakRef:Fg,Vg=0,ki=1;function po(){return{s:Vg,v:void 0,o:null,p:null}}function kl(e,t={}){let n=po();const{resultEqualityCheck:o}=t;let r,s=0;function i(){var f;let c=n;const{length:a}=arguments;for(let g=0,h=a;g<h;g++){const p=arguments[g];if(typeof p=="function"||typeof p=="object"&&p!==null){let m=c.o;m===null&&(c.o=m=new WeakMap);const b=m.get(p);b===void 0?(c=po(),m.set(p,c)):c=b}else{let m=c.p;m===null&&(c.p=m=new Map);const b=m.get(p);b===void 0?(c=po(),m.set(p,c)):c=b}}const l=c;let d;if(c.s===ki)d=c.v;else if(d=e.apply(null,arguments),s++,o){const g=((f=r==null?void 0:r.deref)==null?void 0:f.call(r))??r;g!=null&&o(g,d)&&(d=g,s!==0&&s--),r=typeof d=="object"&&d!==null||typeof d=="function"?new Dg(d):d}return l.s=ki,l.v=d,d}return i.clearCache=()=>{n=po(),i.resetResultsCount()},i.resultsCount=()=>s,i.resetResultsCount=()=>{s=0},i}function Tl(e,...t){const n=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,o=(...r)=>{let s=0,i=0,c,a={},l=r.pop();typeof l=="object"&&(a=l,l=r.pop()),Cg(l,`createSelector expects an output function after the inputs, but received: [${typeof l}]`);const d={...n,...a},{memoize:f,memoizeOptions:g=[],argsMemoize:h=kl,argsMemoizeOptions:p=[]}=d,m=Ci(g),b=Ci(p),x=Mg(r),y=f(function(){return s++,l.apply(null,arguments)},...m),w=h(function(){i++;const v=Ig(x,arguments);return c=y.apply(null,v),c},...b);return Object.assign(w,{resultFunc:l,memoizedResultFunc:y,dependencies:x,dependencyRecomputations:()=>i,resetDependencyRecomputations:()=>{i=0},lastResult:()=>c,recomputations:()=>s,resetRecomputations:()=>{s=0},memoize:f,argsMemoize:h})};return Object.assign(o,{withTypes:()=>o}),o}var _g=Tl(kl),Hg=Object.assign((e,t=_g)=>{kg(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);const n=Object.keys(e),o=n.map(s=>e[s]);return t(o,(...s)=>s.reduce((i,c,a)=>(i[n[a]]=c,i),{}))},{withTypes:()=>Hg});Tl({memoize:Ng,memoizeOptions:{maxSize:1,equalityCheck:Object.is}});const ee=(e,t,n,o,r,s,...i)=>{if(i.length>0)throw new Error(Be(1));let c;if(e)c=e;else throw new Error("Missing arguments");return c};var vr={exports:{}},xr={};/**
|
|
320
|
+
* @license React
|
|
321
|
+
* use-sync-external-store-shim.production.js
|
|
322
|
+
*
|
|
323
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
324
|
+
*
|
|
325
|
+
* This source code is licensed under the MIT license found in the
|
|
326
|
+
* LICENSE file in the root directory of this source tree.
|
|
327
|
+
*/var Ti;function Bg(){if(Ti)return xr;Ti=1;var e=qi();function t(f,g){return f===g&&(f!==0||1/f===1/g)||f!==f&&g!==g}var n=typeof Object.is=="function"?Object.is:t,o=e.useState,r=e.useEffect,s=e.useLayoutEffect,i=e.useDebugValue;function c(f,g){var h=g(),p=o({inst:{value:h,getSnapshot:g}}),m=p[0].inst,b=p[1];return s(function(){m.value=h,m.getSnapshot=g,a(m)&&b({inst:m})},[f,h,g]),r(function(){return a(m)&&b({inst:m}),f(function(){a(m)&&b({inst:m})})},[f]),i(h),h}function a(f){var g=f.getSnapshot;f=f.value;try{var h=g();return!n(f,h)}catch{return!0}}function l(f,g){return g()}var d=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?l:c;return xr.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:d,xr}var Mi;function Ml(){return Mi||(Mi=1,vr.exports=Bg()),vr.exports}var Il=Ml(),Rr={exports:{}},wr={};/**
|
|
328
|
+
* @license React
|
|
329
|
+
* use-sync-external-store-shim/with-selector.production.js
|
|
330
|
+
*
|
|
331
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
332
|
+
*
|
|
333
|
+
* This source code is licensed under the MIT license found in the
|
|
334
|
+
* LICENSE file in the root directory of this source tree.
|
|
335
|
+
*/var Ii;function zg(){if(Ii)return wr;Ii=1;var e=qi(),t=Ml();function n(l,d){return l===d&&(l!==0||1/l===1/d)||l!==l&&d!==d}var o=typeof Object.is=="function"?Object.is:n,r=t.useSyncExternalStore,s=e.useRef,i=e.useEffect,c=e.useMemo,a=e.useDebugValue;return wr.useSyncExternalStoreWithSelector=function(l,d,f,g,h){var p=s(null);if(p.current===null){var m={hasValue:!1,value:null};p.current=m}else m=p.current;p=c(function(){function x(R){if(!y){if(y=!0,w=R,R=g(R),h!==void 0&&m.hasValue){var I=m.value;if(h(I,R))return S=I}return S=R}if(I=S,o(w,R))return I;var E=g(R);return h!==void 0&&h(I,E)?(w=R,I):(w=R,S=E)}var y=!1,w,S,v=f===void 0?null:f;return[function(){return x(d())},v===null?void 0:function(){return x(v())}]},[d,f,g,h]);var b=r(l,p[0],p[1]);return i(function(){m.hasValue=!0,m.value=b},[b]),a(b),b},wr}var Pi;function $g(){return Pi||(Pi=1,Rr.exports=zg()),Rr.exports}var jg=$g();const zr=[];let $r;function Ug(){return $r}function Wg(e){zr.push(e)}function hs(e){const t=(n,o)=>{const r=et(qg).current;let s;try{$r=r;for(const i of zr)i.before(r);s=e(n,o);for(const i of zr)i.after(r);r.didInitialize=!0}finally{$r=void 0}return s};return t.displayName=e.displayName||e.name,t}function Pl(e){return u.forwardRef(hs(e))}function qg(){return{didInitialize:!1}}const Gg=Wr(19),Kg=Gg?Xg:Zg;function ye(e,t,n,o,r){return Kg(e,t,n,o,r)}function Yg(e,t,n,o,r){const s=u.useCallback(()=>t(e.getSnapshot(),n,o,r),[e,t,n,o,r]);return Il.useSyncExternalStore(e.subscribe,s,s)}Wg({before(e){e.syncIndex=0,e.didInitialize||(e.syncTick=1,e.syncHooks=[],e.didChangeStore=!0,e.getSnapshot=()=>{let t=!1;for(let n=0;n<e.syncHooks.length;n+=1){const o=e.syncHooks[n],r=o.selector(o.store.state,o.a1,o.a2,o.a3);(o.didChange||!Object.is(o.value,r))&&(t=!0,o.value=r,o.didChange=!1)}return t&&(e.syncTick+=1),e.syncTick})},after(e){e.syncHooks.length>0&&(e.didChangeStore&&(e.didChangeStore=!1,e.subscribe=t=>{const n=new Set;for(const r of e.syncHooks)n.add(r.store);const o=[];for(const r of n)o.push(r.subscribe(t));return()=>{for(const r of o)r()}}),Il.useSyncExternalStore(e.subscribe,e.getSnapshot,e.getSnapshot))}});function Xg(e,t,n,o,r){const s=Ug();if(!s)return Yg(e,t,n,o,r);const i=s.syncIndex;s.syncIndex+=1;let c;return s.didInitialize?(c=s.syncHooks[i],(c.store!==e||c.selector!==t||!Object.is(c.a1,n)||!Object.is(c.a2,o)||!Object.is(c.a3,r))&&(c.store!==e&&(s.didChangeStore=!0),c.store=e,c.selector=t,c.a1=n,c.a2=o,c.a3=r,c.didChange=!0)):(c={store:e,selector:t,a1:n,a2:o,a3:r,value:t(e.getSnapshot(),n,o,r),didChange:!1},s.syncHooks.push(c)),c.value}function Zg(e,t,n,o,r){return jg.useSyncExternalStoreWithSelector(e.subscribe,e.getSnapshot,e.getSnapshot,s=>t(s,n,o,r))}class Ol{constructor(t){De(this,"subscribe",t=>(this.listeners.add(t),()=>{this.listeners.delete(t)}));De(this,"getSnapshot",()=>this.state);this.state=t,this.listeners=new Set,this.updateTick=0}setState(t){if(this.state===t)return;this.state=t,this.updateTick+=1;const n=this.updateTick;for(const o of this.listeners){if(n!==this.updateTick)return;o(t)}}update(t){for(const n in t)if(!Object.is(this.state[n],t[n])){this.setState({...this.state,...t});return}}set(t,n){Object.is(this.state[t],n)||this.setState({...this.state,[t]:n})}notifyAll(){const t={...this.state};this.setState(t)}use(t,n,o,r){return ye(this,t,n,o,r)}}class nr extends Ol{constructor(t,n={},o){super(t),this.context=n,this.selectors=o}useSyncedValue(t,n){u.useDebugValue(t),J(()=>{this.state[t]!==n&&this.set(t,n)},[t,n])}useSyncedValueWithCleanup(t,n){const o=this;J(()=>(o.state[t]!==n&&o.set(t,n),()=>{o.set(t,void 0)}),[o,t,n])}useSyncedValues(t){const n=this,o=Object.values(t);J(()=>{n.update(t)},[n,...o])}useControlledProp(t,n){u.useDebugValue(t);const o=n!==void 0;J(()=>{o&&!Object.is(this.state[t],n)&&super.setState({...this.state,[t]:n})},[t,n,o])}select(t,n,o,r){const s=this.selectors[t];return s(this.state,n,o,r)}useState(t,n,o,r){return u.useDebugValue(t),ye(this,this.selectors[t],n,o,r)}useContextCallback(t,n){u.useDebugValue(t);const o=ne(n??st);this.context[t]=o}useStateSetter(t){const n=u.useRef(void 0);return n.current===void 0&&(n.current=o=>{this.set(t,o)}),n.current}observe(t,n){let o;typeof t=="function"?o=t:o=this.selectors[t];let r=o(this.state);return n(r,r,this),this.subscribe(s=>{const i=o(s);if(!Object.is(r,i)){const c=r;r=i,n(i,c,this)}})}}const Jg={open:ee(e=>e.open),domReferenceElement:ee(e=>e.domReferenceElement),referenceElement:ee(e=>e.positionReference??e.referenceElement),floatingElement:ee(e=>e.floatingElement),floatingId:ee(e=>e.floatingId)};class bs extends nr{constructor(n){const{nested:o,noEmit:r,onOpenChange:s,triggerElements:i,...c}=n;super({...c,positionReference:c.referenceElement,domReferenceElement:c.referenceElement},{onOpenChange:s,dataRef:{current:{}},events:fl(),nested:o,noEmit:r,triggerElements:i},Jg);De(this,"setOpen",(n,o)=>{var r,s;if((!n||!this.state.open||Uc(o.event))&&(this.context.dataRef.current.openEvent=n?o.event:void 0),!this.context.noEmit){const i={open:n,reason:o.reason,nativeEvent:o.event,nested:this.context.nested,triggerElement:o.trigger};this.context.events.emit("openchange",i)}(s=(r=this.context).onOpenChange)==null||s.call(r,n,o)})}}function Qg(e,t){const n=u.useRef(null),o=u.useRef(null);return u.useCallback(r=>{if(e!==void 0){if(n.current!==null){const s=n.current,i=o.current,c=t.context.triggerElements.getById(s);i&&c===i&&t.context.triggerElements.delete(s),n.current=null,o.current=null}r!==null&&(n.current=e,o.current=r,t.context.triggerElements.add(e,r))}},[t,e])}function Al(e,t,n,o){const r=n.useState("isMountedByTrigger",e),s=Qg(e,n),i=ne(c=>{if(s(c),!c||!n.select("open"))return;const a=n.select("activeTriggerId");if(a===e){n.update({activeTriggerElement:c,...o});return}a==null&&n.update({activeTriggerId:e,activeTriggerElement:c,...o})});return J(()=>{r&&n.update({activeTriggerElement:t.current,...o})},[r,n,t,...Object.values(o)]),{registerTrigger:i,isMountedByThisTrigger:r}}function ys(e){const t=e.useState("open");J(()=>{if(t&&!e.select("activeTriggerId")&&e.context.triggerElements.size===1){const n=e.context.triggerElements.entries().next();if(!n.done){const[o,r]=n.value;e.update({activeTriggerId:o,activeTriggerElement:r})}}},[t,e])}function vs(e,t,n){const{mounted:o,setMounted:r,transitionStatus:s}=$t(e);t.useSyncedValues({mounted:o,transitionStatus:s});const i=ne(()=>{var a,l;r(!1),t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1}),n==null||n(),(l=(a=t.context).onOpenChangeComplete)==null||l.call(a,!1)}),c=t.useState("preventUnmountingOnClose");return mt({enabled:!c,open:e,ref:t.context.popupRef,onComplete(){e||i()}}),{forceUnmount:i,transitionStatus:s}}class no{constructor(){this.elementsSet=new Set,this.idMap=new Map}add(t,n){const o=this.idMap.get(t);o!==n&&(o!==void 0&&this.elementsSet.delete(o),this.elementsSet.add(n),this.idMap.set(t,n))}delete(t){const n=this.idMap.get(t);n&&(this.elementsSet.delete(n),this.idMap.delete(t))}hasElement(t){return this.elementsSet.has(t)}hasMatchingElement(t){for(const n of this.elementsSet)if(t(n))return!0;return!1}getById(t){return this.idMap.get(t)}entries(){return this.idMap.entries()}elements(){return this.elementsSet.values()}get size(){return this.idMap.size}}function em(){return new bs({open:!1,floatingElement:null,referenceElement:null,triggerElements:new no,floatingId:"",nested:!1,noEmit:!1,onOpenChange:void 0})}function xs(){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:"idle",floatingRootContext:em(),preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:Ue,inactiveTriggerProps:Ue,popupProps:Ue}}const go=ee(e=>e.triggerIdProp??e.activeTriggerId),Rs={open:ee(e=>e.openProp??e.open),mounted:ee(e=>e.mounted),transitionStatus:ee(e=>e.transitionStatus),floatingRootContext:ee(e=>e.floatingRootContext),preventUnmountingOnClose:ee(e=>e.preventUnmountingOnClose),payload:ee(e=>e.payload),activeTriggerId:go,activeTriggerElement:ee(e=>e.mounted?e.activeTriggerElement:null),isTriggerActive:ee((e,t)=>t!==void 0&&go(e)===t),isOpenedByTrigger:ee((e,t)=>t!==void 0&&go(e)===t&&e.open),isMountedByTrigger:ee((e,t)=>t!==void 0&&go(e)===t&&e.mounted),triggerProps:ee((e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps),popupProps:ee(e=>e.popupProps),popupElement:ee(e=>e.popupElement),positionerElement:ee(e=>e.positionerElement)};function Ll(e){const{open:t=!1,onOpenChange:n,elements:o={}}=e,r=bn(),s=Ut()!=null,i=et(()=>new bs({open:t,onOpenChange:n,referenceElement:o.reference??null,floatingElement:o.floating??null,triggerElements:new no,floatingId:r,nested:s,noEmit:!1})).current;return J(()=>{const c={open:t,floatingId:r};o.reference!==void 0&&(c.referenceElement=o.reference,c.domReferenceElement=Le(o.reference)?o.reference:null),o.floating!==void 0&&(c.floatingElement=o.floating),i.update(c)},[t,r,o.reference,o.floating,i]),i.context.onOpenChange=n,i.context.nested=s,i.context.noEmit=!1,i}function tm(e={}){const{nodeId:t,externalTree:n}=e,o=Ll(e),r=e.rootContext||o,s={reference:r.useState("referenceElement"),floating:r.useState("floatingElement"),domReference:r.useState("domReferenceElement")},[i,c]=u.useState(null),a=u.useRef(null),l=sn(n);J(()=>{s.domReference&&(a.current=s.domReference)},[s.domReference]);const d=yg({...e,elements:{...s,...i&&{reference:i}}}),f=u.useCallback(I=>{const E=Le(I)?{getBoundingClientRect:()=>I.getBoundingClientRect(),getClientRects:()=>I.getClientRects(),contextElement:I}:I;c(E),d.refs.setReference(E)},[d.refs]),[g,h]=u.useState(null),[p,m]=u.useState(null);r.useSyncedValue("referenceElement",g),r.useSyncedValue("domReferenceElement",Le(g)?g:null),r.useSyncedValue("floatingElement",p);const b=u.useCallback(I=>{(Le(I)||I===null)&&(a.current=I,h(I)),(Le(d.refs.reference.current)||d.refs.reference.current===null||I!==null&&!Le(I))&&d.refs.setReference(I)},[d.refs,h]),x=u.useCallback(I=>{m(I),d.refs.setFloating(I)},[d.refs]),y=u.useMemo(()=>({...d.refs,setReference:b,setFloating:x,setPositionReference:f,domReference:a}),[d.refs,b,x,f]),w=u.useMemo(()=>({...d.elements,domReference:s.domReference}),[d.elements,s.domReference]),S=r.useState("open"),v=r.useState("floatingId"),R=u.useMemo(()=>({...d,dataRef:r.context.dataRef,open:S,onOpenChange:r.setOpen,events:r.context.events,floatingId:v,refs:y,elements:w,nodeId:t,rootStore:r}),[d,y,w,t,r,S,v]);return J(()=>{r.context.dataRef.current.floatingContext=R;const I=l==null?void 0:l.nodesRef.current.find(E=>E.id===t);I&&(I.context=R)}),u.useMemo(()=>({...d,context:R,refs:y,elements:w,rootStore:r}),[d,y,w,R,r])}function ws(e){const{popupStore:t,noEmit:n=!1,treatPopupAsFloatingElement:o=!1,onOpenChange:r}=e,s=bn(),i=Ut()!=null,c=t.useState("open"),a=t.useState("activeTriggerElement"),l=t.useState(o?"popupElement":"positionerElement"),d=t.context.triggerElements,f=et(()=>new bs({open:c,referenceElement:a,floatingElement:l,triggerElements:d,onOpenChange:r,floatingId:s,nested:i,noEmit:n})).current;return J(()=>{const g={open:c,floatingId:s,referenceElement:a,floatingElement:l};Le(a)&&(g.domReferenceElement=a),f.state.positionReference===f.state.referenceElement&&(g.positionReference=a),f.update(g)},[c,s,a,l,f]),f.context.onOpenChange=r,f.context.nested=i,f.context.noEmit=n,f}const Sr=Lc&&Ac;function Nl(e,t={}){const n="rootStore"in e?e.rootStore:e,{events:o,dataRef:r}=n.context,{enabled:s=!0,delay:i}=t,c=u.useRef(!1),a=u.useRef(null),l=Xe(),d=u.useRef(!0);u.useEffect(()=>{const g=n.select("domReferenceElement");if(!s)return;const h=Ke(g);function p(){const x=n.select("domReferenceElement");!n.select("open")&&je(x)&&x===at(Oe(x))&&(c.current=!0)}function m(){d.current=!0}function b(){d.current=!1}return h.addEventListener("blur",p),Sr&&(h.addEventListener("keydown",m,!0),h.addEventListener("pointerdown",b,!0)),()=>{h.removeEventListener("blur",p),Sr&&(h.removeEventListener("keydown",m,!0),h.removeEventListener("pointerdown",b,!0))}},[n,s]),u.useEffect(()=>{if(!s)return;function g(h){if(h.reason===pn||h.reason===Yo){const p=n.select("domReferenceElement");Le(p)&&(a.current=p,c.current=!0)}}return o.on("openchange",g),()=>{o.off("openchange",g)}},[o,s,n]);const f=u.useMemo(()=>({onMouseLeave(){c.current=!1,a.current=null},onFocus(g){const h=g.currentTarget;if(c.current){if(a.current===h)return;c.current=!1,a.current=null}const p=lt(g.nativeEvent);if(Le(p)){if(Sr&&!g.relatedTarget){if(!d.current&&!Qo(p))return}else if(!qf(p))return}const m=Ao(g.relatedTarget,n.context.triggerElements),{nativeEvent:b,currentTarget:x}=g,y=typeof i=="function"?i():i;if(n.select("open")&&m||y===0||y===void 0){n.setOpen(!0,ge(xn,b,x));return}l.start(y,()=>{c.current||n.setOpen(!0,ge(xn,b,x))})},onBlur(g){c.current=!1,a.current=null;const h=g.relatedTarget,p=g.nativeEvent,m=Le(h)&&h.hasAttribute(Yn("focus-guard"))&&h.getAttribute("data-type")==="outside";l.start(0,()=>{var w;const b=n.select("domReferenceElement"),x=at(b?b.ownerDocument:document);!h&&x===b||we((w=r.current.floatingContext)==null?void 0:w.refs.floating.current,x)||we(b,x)||m||Ao(h??x,n.context.triggerElements)||n.setOpen(!1,ge(xn,p))})}}),[r,n,l,i]);return u.useMemo(()=>s?{reference:f,trigger:f}:{},[s,f])}const nm=`button,a,[role="button"],select,[tabindex]:not([tabindex="-1"]),${zc}`;function om(e){return e?!!e.closest(nm):!1}class Ss{constructor(){De(this,"dispose",()=>{this.openChangeTimeout.clear(),this.restTimeout.clear()});De(this,"disposeEffect",()=>this.dispose);this.pointerType=void 0,this.interactedInside=!1,this.handler=void 0,this.blockMouseMove=!0,this.performedPointerEventsMutation=!1,this.pointerEventsScopeElement=null,this.pointerEventsReferenceElement=null,this.pointerEventsFloatingElement=null,this.restTimeoutPending=!1,this.openChangeTimeout=new wt,this.restTimeout=new wt,this.handleCloseOptions=void 0}static create(){return new Ss}}function Es(e){var t,n,o;e.performedPointerEventsMutation&&((t=e.pointerEventsScopeElement)==null||t.style.removeProperty("pointer-events"),(n=e.pointerEventsReferenceElement)==null||n.style.removeProperty("pointer-events"),(o=e.pointerEventsFloatingElement)==null||o.style.removeProperty("pointer-events"),e.performedPointerEventsMutation=!1,e.pointerEventsScopeElement=null,e.pointerEventsReferenceElement=null,e.pointerEventsFloatingElement=null)}function rm(e,t){const{scopeElement:n,referenceElement:o,floatingElement:r}=t;Es(e),e.performedPointerEventsMutation=!0,e.pointerEventsScopeElement=n,e.pointerEventsReferenceElement=o,e.pointerEventsFloatingElement=r,n.style.pointerEvents="none",o.style.pointerEvents="auto",r.style.pointerEvents="auto"}function Fl(e){const t=et(Ss.create).current,n=e.context.dataRef.current;return n.hoverInteractionState||(n.hoverInteractionState=t),Xo(n.hoverInteractionState.disposeEffect),n.hoverInteractionState}function Dl(e,t={}){const n="rootStore"in e?e.rootStore:e,o=n.useState("open"),r=n.useState("floatingElement"),s=n.useState("domReferenceElement"),{dataRef:i}=n.context,{enabled:c=!0,closeDelay:a=0}=t,l=Fl(n),d=sn(),f=Ut(),g=ne(()=>{var w;return il((w=i.current.openEvent)==null?void 0:w.type,l.interactedInside)}),h=ne(()=>{var S;const w=(S=i.current.openEvent)==null?void 0:S.type;return(w==null?void 0:w.includes("mouse"))&&w!=="mousedown"}),p=ne(w=>Ao(w,n.context.triggerElements)),m=u.useCallback(w=>{const S=zn(a,"close",l.pointerType),v=()=>{n.setOpen(!1,ge(ct,w)),d==null||d.events.emit("floating.closed",w)};S?l.openChangeTimeout.start(S,v):(l.openChangeTimeout.clear(),v())},[a,n,l,d]),b=ne(()=>{Es(l)}),x=ne(w=>{const S=lt(w);if(!om(S)){l.interactedInside=!1;return}l.interactedInside=(S==null?void 0:S.closest("[aria-haspopup]"))!=null});J(()=>{o||(l.pointerType=void 0,l.restTimeoutPending=!1,l.interactedInside=!1,b())},[o,l,b]),u.useEffect(()=>b,[b]),J(()=>{var w,S,v,R,I;if(c&&o&&(w=l.handleCloseOptions)!=null&&w.blockPointerEvents&&h()&&Le(s)&&r){const E=s,T=r,V=Oe(r),_=(v=(S=d==null?void 0:d.nodesRef.current.find(C=>C.id===f))==null?void 0:S.context)==null?void 0:v.elements.floating;_&&(_.style.pointerEvents="");const M=((I=(R=l.handleCloseOptions)==null?void 0:R.getScope)==null?void 0:I.call(R))??l.pointerEventsScopeElement??_??E.closest("[data-rootownerid]")??V.body;return rm(l,{scopeElement:M,referenceElement:E,floatingElement:T}),()=>{b()}}},[c,o,s,r,l,h,d,f,b]);const y=Xe();u.useEffect(()=>{if(!c)return;function w(){l.openChangeTimeout.clear(),y.clear(),d==null||d.events.off("floating.closed",v),b()}function S(I){if(d&&f&&Vt(d.nodesRef.current,f).length>0){d.events.on("floating.closed",v);return}if(!p(I.relatedTarget)){if(l.handler){l.handler(I);return}b(),g()||m(I)}}function v(I){!d||!f||Vt(d.nodesRef.current,f).length>0||y.start(0,()=>{d.events.off("floating.closed",v),n.setOpen(!1,ge(ct,I)),d.events.emit("floating.closed",I)})}const R=r;return R&&(R.addEventListener("mouseenter",w),R.addEventListener("mouseleave",S),R.addEventListener("pointerdown",x,!0)),()=>{R&&(R.removeEventListener("mouseenter",w),R.removeEventListener("mouseleave",S),R.removeEventListener("pointerdown",x,!0)),d==null||d.events.off("floating.closed",v)}},[c,r,n,i,g,p,m,b,x,l,d,f,y])}const sm={current:null};function Vl(e,t={}){var _;const n="rootStore"in e?e.rootStore:e,{dataRef:o,events:r}=n.context,{enabled:s=!0,delay:i=0,handleClose:c=null,mouseOnly:a=!1,restMs:l=0,move:d=!0,triggerElementRef:f=sm,externalTree:g,isActiveTrigger:h=!0,getHandleCloseContext:p}=t,m=sn(g),b=Fl(n),x=nt(c),y=nt(i),w=nt(l),S=nt(s);h&&(b.handleCloseOptions=(_=x.current)==null?void 0:_.__options);const v=ne(()=>{var M;return il((M=o.current.openEvent)==null?void 0:M.type,b.interactedInside)}),R=ne(M=>Ao(M,n.context.triggerElements)),I=ne((M,C,O)=>{const k=n.context.triggerElements;if(k.hasElement(C))return!M||!we(M,C);if(!Le(O))return!1;const D=O;return k.hasMatchingElement(P=>we(P,D))&&(!M||!we(M,D))}),E=u.useCallback((M,C=!0)=>{const O=zn(y.current,"close",b.pointerType);O?b.openChangeTimeout.start(O,()=>{n.setOpen(!1,ge(ct,M)),m==null||m.events.emit("floating.closed",M)}):C&&(b.openChangeTimeout.clear(),n.setOpen(!1,ge(ct,M)),m==null||m.events.emit("floating.closed",M))},[y,n,b,m]),T=ne(()=>{if(!b.handler)return;Oe(n.select("domReferenceElement")).removeEventListener("mousemove",b.handler),b.handler=void 0});u.useEffect(()=>T,[T]);const V=ne(()=>{Es(b)});return u.useEffect(()=>{if(!s)return;function M(C){C.open||(T(),b.openChangeTimeout.clear(),b.restTimeout.clear(),b.blockMouseMove=!0,b.restTimeoutPending=!1)}return r.on("openchange",M),()=>{r.off("openchange",M)}},[s,r,b,T]),u.useEffect(()=>{if(!s)return;const M=f.current??(h?n.select("domReferenceElement"):null);if(!Le(M))return;function C(k){if(b.openChangeTimeout.clear(),b.blockMouseMove=!1,a&&!Cn(b.pointerType)||li(w.current)>0&&!zn(y.current,"open"))return;const P=zn(y.current,"open",b.pointerType),L=k.currentTarget??null,N=n.select("domReferenceElement"),F=L==null?!1:I(N,L,k.target),U=n.select("open"),H=!U||F;F&&U?n.setOpen(!0,ge(ct,k,L)):P?b.openChangeTimeout.start(P,()=>{H&&n.setOpen(!0,ge(ct,k,L))}):H&&n.setOpen(!0,ge(ct,k,L))}function O(k){if(v()){V();return}T();const D=n.select("domReferenceElement"),P=Oe(D);b.restTimeout.clear(),b.restTimeoutPending=!1;const L=o.current.floatingContext??(p==null?void 0:p());if(R(k.relatedTarget))return;if(x.current&&L){n.select("open")||b.openChangeTimeout.clear();const U=f.current;b.handler=x.current({...L,tree:m,x:k.clientX,y:k.clientY,onClose(){V(),T(),S.current&&!v()&&U===n.select("domReferenceElement")&&E(k,!0)}}),P.addEventListener("mousemove",b.handler),b.handler(k);return}(b.pointerType==="touch"?!we(n.select("floatingElement"),k.relatedTarget):!0)&&E(k)}return d&&M.addEventListener("mousemove",C,{once:!0}),M.addEventListener("mouseenter",C),M.addEventListener("mouseleave",O),()=>{d&&M.removeEventListener("mousemove",C),M.removeEventListener("mouseenter",C),M.removeEventListener("mouseleave",O)}},[T,V,o,y,E,n,s,x,b,h,I,v,R,a,d,w,f,m,S,p]),u.useMemo(()=>{if(!s)return;function M(C){b.pointerType=C.pointerType}return{onPointerDown:M,onPointerEnter:M,onMouseMove(C){const{nativeEvent:O}=C,k=C.currentTarget,D=n.select("domReferenceElement"),P=n.select("open"),L=I(D,k,C.target);if(a&&!Cn(b.pointerType))return;const N=li(w.current);if(P&&!L||N===0||!L&&b.restTimeoutPending&&C.movementX**2+C.movementY**2<2)return;b.restTimeout.clear();function F(){if(b.restTimeoutPending=!1,v())return;const U=n.select("open");!b.blockMouseMove&&(!U||L)&&n.setOpen(!0,ge(ct,O,k))}b.pointerType==="touch"?xt.flushSync(()=>{F()}):L&&P?F():(b.restTimeoutPending=!0,b.restTimeout.start(N,F))}}},[s,b,v,I,a,n,w])}function oo(e=[]){const t=e.map(l=>l==null?void 0:l.reference),n=e.map(l=>l==null?void 0:l.floating),o=e.map(l=>l==null?void 0:l.item),r=e.map(l=>l==null?void 0:l.trigger),s=u.useCallback(l=>mo(l,e,"reference"),t),i=u.useCallback(l=>mo(l,e,"floating"),n),c=u.useCallback(l=>mo(l,e,"item"),o),a=u.useCallback(l=>mo(l,e,"trigger"),r);return u.useMemo(()=>({getReferenceProps:s,getFloatingProps:i,getItemProps:c,getTriggerProps:a}),[s,i,c,a])}function mo(e,t,n){var i;const o=new Map,r=n==="item",s={};n==="floating"&&(s.tabIndex=-1,s[Lr]="");for(const c in e)r&&e&&(c===Hc||c===Bc)||(s[c]=e[c]);for(let c=0;c<t.length;c+=1){let a;const l=(i=t[c])==null?void 0:i[n];typeof l=="function"?a=e?l(e):null:a=l,a&&Oi(s,a,r,o)}return Oi(s,e,r,o),s}function Oi(e,t,n,o){var r;for(const s in t){const i=t[s];n&&(s===Hc||s===Bc)||(s.startsWith("on")?(o.has(s)||o.set(s,[]),typeof i=="function"&&((r=o.get(s))==null||r.push(i),e[s]=(...c)=>{var a;return(a=o.get(s))==null?void 0:a.map(l=>l(...c)).find(l=>l!==void 0)})):e[s]=i)}}const im="Escape";function or(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function ho(e,t){return or(t,e===ss||e===eo,e===Yt||e===Xt)}function Er(e,t,n){return or(t,e===eo,n?e===Yt:e===Xt)||e==="Enter"||e===" "||e===""}function cm(e,t,n){return or(t,n?e===Yt:e===Xt,e===eo)}function lm(e,t,n,o){const r=n?e===Xt:e===Yt,s=e===ss;return t==="both"||t==="horizontal"&&o&&o>1?e===im:or(t,r,s)}function _l(e,t){const n="rootStore"in e?e.rootStore:e,o=n.useState("open"),r=n.useState("floatingElement"),s=n.useState("domReferenceElement"),i=n.context.dataRef,{listRef:c,activeIndex:a,onNavigate:l=()=>{},enabled:d=!0,selectedIndex:f=null,allowEscape:g=!1,loopFocus:h=!1,nested:p=!1,rtl:m=!1,virtual:b=!1,focusItemOnOpen:x="auto",focusItemOnHover:y=!0,openOnArrowKeyDown:w=!0,disabledIndices:S=void 0,orientation:v="vertical",parentOrientation:R,cols:I=1,id:E,resetOnPointerLeave:T=!0,externalTree:V}=t,_=qn(r),M=nt(_),C=Ut(),O=sn(V);J(()=>{i.current.orientation=v},[i,v]);const k=Nr(s),D=u.useRef(x),P=u.useRef(f??-1),L=u.useRef(null),N=u.useRef(!0),F=ne(j=>{l(P.current===-1?null:P.current,j)}),U=u.useRef(F),H=u.useRef(!!r),ce=u.useRef(o),G=u.useRef(!1),Z=u.useRef(!1),$=nt(S),K=nt(o),Y=nt(f),oe=nt(T),se=ne(()=>{function j(W){b?O==null||O.events.emit("virtualfocus",W):$n(W,{sync:G.current,preventScroll:!0})}const B=c.current[P.current],A=Z.current;B&&j(B),(G.current?W=>W():requestAnimationFrame)(()=>{var be;const W=c.current[P.current]||B;if(!W)return;B||j(W),me&&(A||!N.current)&&((be=W.scrollIntoView)==null||be.call(W,{block:"nearest",inline:"nearest"}))})});J(()=>{d&&(o&&r?(P.current=f??-1,D.current&&f!=null&&(Z.current=!0,F())):H.current&&(P.current=-1,U.current()))},[d,o,r,f,F]),J(()=>{if(d){if(!o){G.current=!1;return}if(r)if(a==null){if(G.current=!1,Y.current!=null)return;if(H.current&&(P.current=-1,se()),(!ce.current||!H.current)&&D.current&&(L.current!=null||D.current===!0&&L.current==null)){let j=0;const B=()=>{c.current[0]==null?(j<2&&(j?requestAnimationFrame:queueMicrotask)(B),j+=1):(P.current=L.current==null||Er(L.current,v,m)||p?To(c):Vr(c),L.current=null,F())};B()}}else Kn(c,a)||(P.current=a,se(),Z.current=!1)}},[d,o,r,a,Y,p,c,v,m,F,se,$]),J(()=>{var W,de;if(!d||r||!O||b||!H.current)return;const j=O.nodesRef.current,B=(de=(W=j.find(be=>be.id===C))==null?void 0:W.context)==null?void 0:de.elements.floating,A=at(Oe(r)),z=j.some(be=>be.context&&we(be.context.elements.floating,A));B&&!z&&N.current&&B.focus({preventScroll:!0})},[d,r,O,C,b]),J(()=>{U.current=F,ce.current=o,H.current=!!r}),J(()=>{o||(L.current=null,D.current=x)},[o,x]);const re=a!=null,me=u.useMemo(()=>{function j(A){if(!K.current)return;const z=c.current.indexOf(A.currentTarget);z!==-1&&P.current!==z&&(P.current=z,F(A))}return{onFocus(A){G.current=!0,j(A)},onClick:({currentTarget:A})=>A.focus({preventScroll:!0}),onMouseMove(A){G.current=!0,Z.current=!1,y&&j(A)},onPointerLeave(A){if(!K.current||!N.current||A.pointerType==="touch")return;G.current=!0;const z=A.relatedTarget;if(!(!y||c.current.includes(z))&&oe.current&&($n(null,{sync:!0}),P.current=-1,F(A),!b)){const W=M.current,de=at(Oe(W));W&&we(W,de)&&W.focus({preventScroll:!0})}}}},[K,M,y,c,F,oe,b]),te=u.useCallback(()=>{var j,B,A;return R??((A=(B=(j=O==null?void 0:O.nodesRef.current.find(z=>z.id===C))==null?void 0:j.context)==null?void 0:B.dataRef)==null?void 0:A.current.orientation)},[C,O,R]),X=ne(j=>{if(N.current=!1,G.current=!0,j.which===229||!K.current&&j.currentTarget===M.current)return;if(p&&lm(j.key,v,m,I)){ho(j.key,te())||dt(j),n.setOpen(!1,ge(ko,j.nativeEvent)),je(s)&&(b?O==null||O.events.emit("virtualfocus",s):s.focus());return}const B=P.current,A=To(c,S),z=Vr(c,S);if(k||(j.key==="Home"&&(dt(j),P.current=A,F(j)),j.key==="End"&&(dt(j),P.current=z,F(j))),I>1){const W=Array.from({length:c.current.length},()=>({width:1,height:1})),de=Gc(W,I,!1),be=de.findIndex(Ae=>Ae!=null&&!_t(c,Ae,S)),Ee=de.reduce((Ae,ve,Pe)=>ve!=null&&!_t(c,ve,S)?Pe:Ae,-1),Ne=de[qc({current:de.map(Ae=>Ae!=null?c.current[Ae]:null)},{event:j,orientation:v,loopFocus:h,rtl:m,cols:I,disabledIndices:Yc([...(typeof S!="function"?S:null)||c.current.map((Ae,ve)=>_t(c,ve,S)?ve:void 0),void 0],de),minIndex:be,maxIndex:Ee,prevIndex:Kc(P.current>z?A:P.current,W,de,I,j.key===eo?"bl":j.key===(m?Yt:Xt)?"tr":"tl"),stopEvent:!0})];if(Ne!=null&&(P.current=Ne,F(j)),v==="both")return}if(ho(j.key,v)){if(dt(j),o&&!b&&at(j.currentTarget.ownerDocument)===j.currentTarget){P.current=Er(j.key,v,m)?A:z,F(j);return}Er(j.key,v,m)?h?B>=z?g&&B!==c.current.length?P.current=-1:(G.current=!1,P.current=A):P.current=rt(c,{startingIndex:B,disabledIndices:S}):P.current=Math.min(z,rt(c,{startingIndex:B,disabledIndices:S})):h?B<=A?g&&B!==-1?P.current=c.current.length:(G.current=!1,P.current=z):P.current=rt(c,{startingIndex:B,decrement:!0,disabledIndices:S}):P.current=Math.max(A,rt(c,{startingIndex:B,decrement:!0,disabledIndices:S})),Kn(c,P.current)&&(P.current=-1),F(j)}}),le=u.useMemo(()=>b&&o&&re&&{"aria-activedescendant":`${E}-${a}`},[b,o,re,E,a]),xe=u.useMemo(()=>({"aria-orientation":v==="both"?void 0:v,...k?{}:le,onKeyDown(j){if(j.key==="Tab"&&j.shiftKey&&o&&!b){const B=lt(j.nativeEvent);if(B&&!we(M.current,B))return;dt(j),n.setOpen(!1,ge(gn,j.nativeEvent)),je(s)&&s.focus();return}X(j)},onPointerMove(){N.current=!0}}),[le,X,M,v,k,n,o,b,s]),q=u.useMemo(()=>{function j(A){x==="auto"&&$c(A.nativeEvent)&&(D.current=!b)}function B(A){D.current=x,x==="auto"&&jc(A.nativeEvent)&&(D.current=!0)}return{onKeyDown(A){const z=n.select("open");N.current=!1;const W=A.key.startsWith("Arrow"),de=cm(A.key,te(),m),be=ho(A.key,v),Ee=(p?de:be)||A.key==="Enter"||A.key.trim()==="";if(b&&z)return X(A);if(!(!z&&!w&&W)){if(Ee){const Ne=ho(A.key,te());L.current=p&&Ne?null:A.key}if(p){de&&(dt(A),z?(P.current=To(c,$.current),F(A)):n.setOpen(!0,ge(ko,A.nativeEvent,A.currentTarget)));return}be&&(Y.current!=null&&(P.current=Y.current),dt(A),!z&&w?n.setOpen(!0,ge(ko,A.nativeEvent,A.currentTarget)):X(A),z&&F(A))}},onFocus(A){n.select("open")&&!b&&(P.current=-1,F(A))},onPointerDown:B,onPointerEnter:B,onMouseDown:j,onClick:j}},[X,$,x,c,p,F,n,w,v,te,m,Y,b]),Q=u.useMemo(()=>({...le,...q}),[le,q]);return u.useMemo(()=>d?{reference:Q,floating:xe,item:me,trigger:q}:{},[d,Q,xe,q,me])}const am=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function Hl(e,t={}){const n="rootStore"in e?e.rootStore:e,o=n.useState("open"),r=n.useState("floatingId"),s=n.useState("domReferenceElement"),i=n.useState("floatingElement"),{role:c="dialog"}=t,a=bn(),l=(s==null?void 0:s.id)||a,d=u.useMemo(()=>{var y;return((y=qn(i))==null?void 0:y.id)||r},[i,r]),f=am.get(c)??c,h=Ut()!=null,p=u.useMemo(()=>f==="tooltip"||c==="label"?Ue:{"aria-haspopup":f==="alertdialog"?"dialog":f,"aria-expanded":"false",...f==="listbox"&&{role:"combobox"},...f==="menu"&&h&&{role:"menuitem"},...c==="select"&&{"aria-autocomplete":"none"},...c==="combobox"&&{"aria-autocomplete":"list"}},[f,h,c]),m=u.useMemo(()=>f==="tooltip"||c==="label"?{[`aria-${c==="label"?"labelledby":"describedby"}`]:o?d:void 0}:{...p,"aria-expanded":o?"true":"false","aria-controls":o?d:void 0,...f==="menu"&&{id:l}},[f,d,o,l,c,p]),b=u.useMemo(()=>{const y={id:d,...f&&{role:f}};return f==="tooltip"||c==="label"?y:{...y,...f==="menu"&&{"aria-labelledby":l}}},[f,d,l,c]),x=u.useCallback(({active:y,selected:w})=>{const S={role:"option",...y&&{id:`${d}-fui-option`}};switch(c){case"select":case"combobox":return{...S,"aria-selected":w}}return{}},[d,c]);return u.useMemo(()=>({reference:m,floating:b,item:x,trigger:p}),[m,b,p,x])}function Bl(e,t){const n="rootStore"in e?e.rootStore:e,o=n.context.dataRef,r=n.useState("open"),{listRef:s,elementsRef:i,activeIndex:c,onMatch:a,onTypingChange:l,enabled:d=!0,resetMs:f=750,selectedIndex:g=null}=t,h=Xe(),p=u.useRef(""),m=u.useRef(g??c??-1),b=u.useRef(null);J(()=>{!r&&g!==null||(h.clear(),b.current=null,p.current!==""&&(p.current=""))},[r,g,h]),J(()=>{r&&p.current===""&&(m.current=g??c??-1)},[r,g,c]);const x=ne(R=>{R?o.current.typing||(o.current.typing=R,l==null||l(R)):o.current.typing&&(o.current.typing=R,l==null||l(R))}),y=ne(R=>{function I(k){const D=i==null?void 0:i.current[k];return!D||as(D)}function E(k,D,P=0){if(k.length===0)return-1;const L=(P%k.length+k.length)%k.length,N=D.toLocaleLowerCase();for(let F=0;F<k.length;F+=1){const U=(L+F)%k.length,H=k[U];if(!(!(H!=null&&H.toLocaleLowerCase().startsWith(N))||!I(U)))return U}return-1}const T=s.current;if(p.current.length>0&&R.key===" "&&(dt(R),x(!0)),p.current.length>0&&p.current[0]!==" "&&E(T,p.current)===-1&&R.key!==" "&&x(!1),T==null||R.key.length!==1||R.ctrlKey||R.metaKey||R.altKey)return;r&&R.key!==" "&&(dt(R),x(!0));const V=p.current==="";V&&(m.current=g??c??-1),T.every(k=>{var D,P;return k?((D=k[0])==null?void 0:D.toLocaleLowerCase())!==((P=k[1])==null?void 0:P.toLocaleLowerCase()):!0})&&p.current===R.key&&(p.current="",m.current=b.current),p.current+=R.key,h.start(f,()=>{p.current="",m.current=b.current,x(!1)});const C=((V?g??c??-1:m.current)??0)+1,O=E(T,p.current,C);O!==-1?(a==null||a(O),b.current=O):R.key!==" "&&(p.current="",x(!1))}),w=ne(R=>{const I=R.relatedTarget,E=n.select("domReferenceElement"),T=n.select("floatingElement"),V=we(E,I),_=we(T,I);V||_||(h.clear(),p.current="",m.current=b.current,x(!1))}),S=u.useMemo(()=>({onKeyDown:y,onBlur:w}),[y,w]),v=u.useMemo(()=>({onKeyDown:y,onBlur:w}),[y,w]);return u.useMemo(()=>d?{reference:S,floating:v}:{},[d,S,v])}const Ai=.1,um=Ai*Ai,_e=.5;function bo(e,t,n,o,r,s){return o>=t!=s>=t&&e<=(r-n)*(t-o)/(s-o)+n}function yo(e,t,n,o,r,s,i,c,a,l){let d=!1;return bo(e,t,n,o,r,s)&&(d=!d),bo(e,t,r,s,i,c)&&(d=!d),bo(e,t,i,c,a,l)&&(d=!d),bo(e,t,a,l,n,o)&&(d=!d),d}function dm(e,t,n){return e>=n.x&&e<=n.x+n.width&&t>=n.y&&t<=n.y+n.height}function vo(e,t,n,o,r,s){const i=Math.min(n,r),c=Math.max(n,r),a=Math.min(o,s),l=Math.max(o,s);return e>=i&&e<=c&&t>=a&&t<=l}function zl(e={}){const{blockPointerEvents:t=!1}=e,n=new wt,o=({x:r,y:s,placement:i,elements:c,onClose:a,nodeId:l,tree:d})=>{const f=i==null?void 0:i.split("-")[0];let g=!1,h=null,p=null,m=typeof performance<"u"?performance.now():0;function b(y,w){const S=performance.now(),v=S-m;if(h===null||p===null||v===0)return h=y,p=w,m=S,!1;const R=y-h,I=w-p,E=R*R+I*I,T=v*v*um;return h=y,p=w,m=S,E<T}function x(){n.clear(),a()}return function(w){n.clear();const S=c.domReference,v=c.floating;if(!S||!v||f==null||r==null||s==null)return;const{clientX:R,clientY:I}=w,E=lt(w),T=w.type==="mouseleave",V=we(v,E),_=we(S,E);if(V&&(g=!0,!T))return;if(_&&(g=!1,!T)){g=!0;return}if(T&&Le(w.relatedTarget)&&we(v,w.relatedTarget))return;function M(){return!!(d&&Vt(d.nodesRef.current,l).length>0)}function C(){M()||x()}if(M())return;const O=S.getBoundingClientRect(),k=v.getBoundingClientRect(),D=r>k.right-k.width/2,P=s>k.bottom-k.height/2,L=k.width>O.width,N=k.height>O.height,F=(L?O:k).left,U=(L?O:k).right,H=(N?O:k).top,ce=(N?O:k).bottom;if(f==="top"&&s>=O.bottom-1||f==="bottom"&&s<=O.top+1||f==="left"&&r>=O.right-1||f==="right"&&r<=O.left+1){C();return}let G=!1;switch(f){case"top":G=vo(R,I,F,O.top+1,U,k.bottom-1);break;case"bottom":G=vo(R,I,F,k.top+1,U,O.bottom-1);break;case"left":G=vo(R,I,k.right-1,ce,O.left+1,H);break;case"right":G=vo(R,I,O.right-1,ce,k.left+1,H);break}if(G)return;if(g&&!dm(R,I,O)){C();return}if(!T&&b(R,I)){C();return}let Z=!1;switch(f){case"top":{const $=L?_e/2:_e*4,K=L||D?r+$:r-$,Y=L?r-$:D?r+$:r-$,oe=s+_e+1,se=D||L?k.bottom-_e:k.top,re=D?L?k.bottom-_e:k.top:k.bottom-_e;Z=yo(R,I,K,oe,Y,oe,k.left,se,k.right,re);break}case"bottom":{const $=L?_e/2:_e*4,K=L||D?r+$:r-$,Y=L?r-$:D?r+$:r-$,oe=s-_e,se=D||L?k.top+_e:k.bottom,re=D?L?k.top+_e:k.bottom:k.top+_e;Z=yo(R,I,K,oe,Y,oe,k.left,se,k.right,re);break}case"left":{const $=N?_e/2:_e*4,K=N||P?s+$:s-$,Y=N?s-$:P?s+$:s-$,oe=r+_e+1,se=P||N?k.right-_e:k.left,re=P?N?k.right-_e:k.left:k.right-_e;Z=yo(R,I,se,k.top,re,k.bottom,oe,K,oe,Y);break}case"right":{const $=N?_e/2:_e*4,K=N||P?s+$:s-$,Y=N?s-$:P?s+$:s-$,oe=r-_e,se=P||N?k.left+_e:k.right,re=P?N?k.left+_e:k.right:k.left+_e;Z=yo(R,I,oe,K,oe,Y,se,k.top,re,k.bottom);break}}Z?g||n.start(40,C):C()}};return o.__options={blockPointerEvents:t},o}const fm=u.createContext(void 0);function $l(e){return u.useContext(fm)}const Sn="ArrowUp",dn="ArrowDown",Xn="ArrowLeft",En="ArrowRight",ro="Home",so="End",jl=new Set([Xn,En]),pm=new Set([Xn,En,ro,so]),Ul=new Set([Sn,dn]),gm=new Set([Sn,dn,ro,so]),Wl=new Set([...jl,...Ul]),mm=new Set([...Wl,ro,so]),Cs=new Set([Sn,dn,Xn,En,ro,so]),hm="Shift",bm="Control",ym="Alt",vm="Meta",xm=new Set([hm,bm,ym,vm]);function Rm(e){return je(e)&&e.tagName==="INPUT"}function Li(e){return!!(Rm(e)&&e.selectionStart!=null||je(e)&&e.tagName==="TEXTAREA")}function Ni(e,t,n,o){if(!e||!t||!t.scrollTo)return;let r=e.scrollLeft,s=e.scrollTop;const i=e.clientWidth<e.scrollWidth,c=e.clientHeight<e.scrollHeight;if(i&&o!=="vertical"){const a=Fi(e,t,"left"),l=xo(e),d=xo(t);n==="ltr"&&(a+t.offsetWidth+d.scrollMarginRight>e.scrollLeft+e.clientWidth-l.scrollPaddingRight?r=a+t.offsetWidth+d.scrollMarginRight-e.clientWidth+l.scrollPaddingRight:a-d.scrollMarginLeft<e.scrollLeft+l.scrollPaddingLeft&&(r=a-d.scrollMarginLeft-l.scrollPaddingLeft)),n==="rtl"&&(a-d.scrollMarginRight<e.scrollLeft+l.scrollPaddingLeft?r=a-d.scrollMarginLeft-l.scrollPaddingLeft:a+t.offsetWidth+d.scrollMarginRight>e.scrollLeft+e.clientWidth-l.scrollPaddingRight&&(r=a+t.offsetWidth+d.scrollMarginRight-e.clientWidth+l.scrollPaddingRight))}if(c&&o!=="horizontal"){const a=Fi(e,t,"top"),l=xo(e),d=xo(t);a-d.scrollMarginTop<e.scrollTop+l.scrollPaddingTop?s=a-d.scrollMarginTop-l.scrollPaddingTop:a+t.offsetHeight+d.scrollMarginBottom>e.scrollTop+e.clientHeight-l.scrollPaddingBottom&&(s=a+t.offsetHeight+d.scrollMarginBottom-e.clientHeight+l.scrollPaddingBottom)}e.scrollTo({left:r,top:s,behavior:"auto"})}function Fi(e,t,n){const o=n==="left"?"offsetLeft":"offsetTop";let r=0;for(;t.offsetParent&&(r+=t[o],t.offsetParent!==e);)t=t.offsetParent;return r}function xo(e){const t=getComputedStyle(e);return{scrollMarginTop:parseFloat(t.scrollMarginTop)||0,scrollMarginRight:parseFloat(t.scrollMarginRight)||0,scrollMarginBottom:parseFloat(t.scrollMarginBottom)||0,scrollMarginLeft:parseFloat(t.scrollMarginLeft)||0,scrollPaddingTop:parseFloat(t.scrollPaddingTop)||0,scrollPaddingRight:parseFloat(t.scrollPaddingRight)||0,scrollPaddingBottom:parseFloat(t.scrollPaddingBottom)||0,scrollPaddingLeft:parseFloat(t.scrollPaddingLeft)||0}}function An(e){return e==="starting"?za:Ue}const wm={...jt,...St},ry=u.forwardRef(function(t,n){const{render:o,className:r,finalFocus:s,...i}=t,{store:c}=on(),{side:a,align:l}=os(),d=$l()!=null,f=c.useState("open"),g=c.useState("transitionStatus"),h=c.useState("popupProps"),p=c.useState("mounted"),m=c.useState("instantType"),b=c.useState("activeTriggerElement"),x=c.useState("parent"),y=c.useState("lastOpenChangeReason"),w=c.useState("rootId"),S=c.useState("floatingRootContext"),v=c.useState("floatingTreeRoot"),R=c.useState("closeDelay"),I=c.useState("activeTriggerElement"),E=x.type==="context-menu";mt({open:f,ref:c.context.popupRef,onComplete(){var k,D;f&&((D=(k=c.context).onOpenChangeComplete)==null||D.call(k,!0))}}),u.useEffect(()=>{function k(D){c.setOpen(!1,ge(D.reason,D.domEvent))}return v.events.on("close",k),()=>{v.events.off("close",k)}},[v.events,c]);const T=c.useState("hoverEnabled"),V=c.useState("disabled");Dl(S,{enabled:T&&!V&&!E&&x.type!=="menubar",closeDelay:R});const _={transitionStatus:g,side:a,align:l,open:f,nested:x.type==="menu",instant:m},M=u.useCallback(k=>{c.set("popupElement",k)},[c]),C=Se("div",t,{state:_,ref:[n,c.context.popupRef,M],stateAttributesMapping:wm,props:[h,{onKeyDown(k){d&&Cs.has(k.key)&&k.stopPropagation()}},An(g),i,{"data-rootownerid":w}]});let O=x.type===void 0||E;return(b||x.type==="menubar"&&y!==Ko)&&(O=!0),ie.jsx(gs,{context:S,modal:E,disabled:!p,returnFocus:s===void 0?O:s,initialFocus:x.type!=="menu",restoreFocus:!0,externalTree:x.type!=="menubar"?v:void 0,previousFocusableElement:I,nextFocusableElement:x.type===void 0?c.context.triggerFocusTargetRef:void 0,beforeContentFocusGuardRef:x.type===void 0?c.context.beforeContentFocusGuardRef:void 0,children:C})}),ql=u.createContext(void 0);function Sm(){const e=u.useContext(ql);if(e===void 0)throw new Error(Be(32));return e}const sy=u.forwardRef(function(t,n){const{keepMounted:o=!1,...r}=t,{store:s}=on();return s.useState("mounted")||o?ie.jsx(ql.Provider,{value:o,children:ie.jsx(ds,{ref:n,...r})}):null});function rr(e){return Wr(19)?e:e?"true":void 0}const Em=u.createContext(void 0);function sr(){const e=u.useContext(Em);return(e==null?void 0:e.direction)??"ltr"}const Cm=e=>({name:"arrow",options:e,async fn(t){var N,F;const{x:n,y:o,placement:r,rects:s,platform:i,elements:c,middlewareData:a}=t,{element:l,padding:d=0,offsetParent:f="real"}=Bt(e,t)||{};if(l==null)return{};const g=Wc(d),h={x:n,y:o},p=ls(r),m=cs(p),b=await i.getDimensions(l),x=p==="y",y=x?"top":"left",w=x?"bottom":"right",S=x?"clientHeight":"clientWidth",v=s.reference[m]+s.reference[p]-h[p]-s.floating[m],R=h[p]-s.reference[p],I=f==="real"?await((N=i.getOffsetParent)==null?void 0:N.call(i,l)):c.floating;let E=c.floating[S]||s.floating[m];(!E||!await((F=i.isElement)==null?void 0:F.call(i,I)))&&(E=c.floating[S]||s.floating[m]);const T=v/2-R/2,V=E/2-b[m]/2-1,_=Math.min(g[y],V),M=Math.min(g[w],V),C=_,O=E-b[m]-M,k=E/2-b[m]/2+T,D=Fr(C,k,O),P=!a.arrow&&rn(r)!=null&&k!==D&&s.reference[m]/2-(k<C?_:M)-b[m]/2<0,L=P?k<C?k-C:k-O:0;return{[p]:h[p]+L,data:{[p]:D,centerOffset:k-D-L,...P&&{alignmentOffset:L}},reset:P}}}),km=(e,t)=>({...Cm(e),options:[e,t]}),Tm={name:"hide",async fn(e){var c;const{width:t,height:n,x:o,y:r}=e.rects.reference,s=t===0&&n===0&&o===0&&r===0;return{data:{referenceHidden:((c=(await Eg().fn(e)).data)==null?void 0:c.referenceHidden)||s}}}},Io={sideX:"left",sideY:"top"},Gl={name:"adaptiveOrigin",async fn(e){var y,w;const{x:t,y:n,rects:{floating:o},elements:{floating:r},platform:s,strategy:i,placement:c}=e,a=Ke(r),l=a.getComputedStyle(r);if(!(l.transitionDuration!=="0s"&&l.transitionDuration!==""))return{x:t,y:n,data:Io};const f=await((y=s.getOffsetParent)==null?void 0:y.call(s,r));let g={width:0,height:0};if(i==="fixed"&&(a!=null&&a.visualViewport))g={width:a.visualViewport.width,height:a.visualViewport.height};else if(f===a){const S=Oe(r);g={width:S.documentElement.clientWidth,height:S.documentElement.clientHeight}}else await((w=s.isElement)==null?void 0:w.call(s,f))&&(g=await s.getDimensions(f));const h=ut(c);let p=t,m=n;h==="left"&&(p=g.width-(t+o.width)),h==="top"&&(m=g.height-(n+o.height));const b=h==="left"?"right":Io.sideX,x=h==="top"?"bottom":Io.sideY;return{x:p,y:m,data:{sideX:b,sideY:x}}}};function Kl(e,t,n){const o=e==="inline-start"||e==="inline-end";return{top:"top",right:o?n?"inline-start":"inline-end":"right",bottom:"bottom",left:o?n?"inline-end":"inline-start":"left"}[t]}function Di(e,t,n){const{rects:o,placement:r}=e;return{side:Kl(t,ut(r),n),align:rn(r)||"center",anchor:{width:o.reference.width,height:o.reference.height},positioner:{width:o.floating.width,height:o.floating.height}}}function ks(e){var Te,$e;const{anchor:t,positionMethod:n="absolute",side:o="bottom",sideOffset:r=0,align:s="center",alignOffset:i=0,collisionBoundary:c,collisionPadding:a=5,sticky:l=!1,arrowPadding:d=5,disableAnchorTracking:f=!1,keepMounted:g=!1,floatingRootContext:h,mounted:p,collisionAvoidance:m,shiftCrossAxis:b=!1,nodeId:x,adaptiveOrigin:y,lazyFlip:w=!1,externalTree:S}=e,[v,R]=u.useState(null);!p&&v!==null&&R(null);const I=m.side||"flip",E=m.align||"flip",T=m.fallbackAxisSide||"end",V=typeof t=="function"?t:void 0,_=ne(V),M=V?_:t,C=nt(t),k=sr()==="rtl",D=v||{top:"top",right:"right",bottom:"bottom",left:"left","inline-end":k?"left":"right","inline-start":k?"right":"left"}[o],P=s==="center"?D:`${D}-${s}`;let L=a;const N=1,F=o==="bottom"?N:0,U=o==="top"?N:0,H=o==="right"?N:0,ce=o==="left"?N:0;typeof L=="number"?L={top:L+F,right:L+ce,bottom:L+U,left:L+H}:L&&(L={top:(L.top||0)+F,right:(L.right||0)+ce,bottom:(L.bottom||0)+U,left:(L.left||0)+H});const G={boundary:c==="clipping-ancestors"?"clippingAncestors":c,padding:L},Z=u.useRef(null),$=nt(r),K=nt(i),se=[vg(ke=>{const Fe=Di(ke,o,k),We=typeof $.current=="function"?$.current(Fe):$.current,Ve=typeof K.current=="function"?K.current(Fe):K.current;return{mainAxis:We,crossAxis:Ve,alignmentAxis:Ve}},[typeof r!="function"?r:0,typeof i!="function"?i:0,k,o])],re=E==="none"&&I!=="shift",me=!re&&(l||b||I==="shift"),te=I==="none"?null:wg({...G,padding:{top:L.top+N,right:L.right+N,bottom:L.bottom+N,left:L.left+N},mainAxis:!b&&I==="flip",crossAxis:E==="flip"?"alignment":!1,fallbackAxisSideDirection:T}),X=re?null:xg(ke=>{const Fe=Oe(ke.elements.floating).documentElement;return{...G,rootBoundary:b?{x:0,y:0,width:Fe.clientWidth,height:Fe.clientHeight}:void 0,mainAxis:E!=="none",crossAxis:me,limiter:l||b?void 0:Rg(We=>{if(!Z.current)return{};const{width:Ve,height:tt}=Z.current.getBoundingClientRect(),Je=yt(ut(We.placement)),ht=Je==="y"?Ve:tt,Et=Je==="y"?L.left+L.right:L.top+L.bottom;return{offset:ht/2+Et/2}})}},[G,l,b,L,E]);I==="shift"||E==="shift"||s==="center"?se.push(X,te):se.push(te,X),se.push(Sg({...G,apply({elements:{floating:ke},availableWidth:Fe,availableHeight:We,rects:Ve}){const tt=ke.style;tt.setProperty("--available-width",`${Fe}px`),tt.setProperty("--available-height",`${We}px`);const Je=window.devicePixelRatio||1,{x:ht,y:Et,width:bt,height:Lt}=Ve.reference,Wt=(Math.round((ht+bt)*Je)-Math.round(ht*Je))/Je,Me=(Math.round((Et+Lt)*Je)-Math.round(Et*Je))/Je;tt.setProperty("--anchor-width",`${Wt}px`),tt.setProperty("--anchor-height",`${Me}px`)}}),km(()=>({element:Z.current||document.createElement("div"),padding:d,offsetParent:"floating"}),[d]),{name:"transformOrigin",fn(ke){var Vs,_s,Hs;const{elements:Fe,middlewareData:We,placement:Ve,rects:tt,y:Je}=ke,ht=ut(Ve),Et=yt(ht),bt=Z.current,Lt=((Vs=We.arrow)==null?void 0:Vs.x)||0,Wt=((_s=We.arrow)==null?void 0:_s.y)||0,Me=(bt==null?void 0:bt.clientWidth)||0,Ye=(bt==null?void 0:bt.clientHeight)||0,qe=Lt+Me/2,ot=Wt+Ye/2,it=Math.abs(((Hs=We.shift)==null?void 0:Hs.y)||0),Ct=tt.reference.height/2,kt=typeof r=="function"?r(Di(ke,o,k)):r,Ra=it>kt,wa={top:`${qe}px calc(100% + ${kt}px)`,bottom:`${qe}px ${-kt}px`,left:`calc(100% + ${kt}px) ${ot}px`,right:`${-kt}px ${ot}px`}[ht],Sa=`${qe}px ${tt.reference.y+Ct-Je}px`;return Fe.floating.style.setProperty("--transform-origin",me&&Et==="y"&&Ra?Sa:wa),{}}},Tm,y),J(()=>{!p&&h&&h.update({referenceElement:null,floatingElement:null,domReferenceElement:null})},[p,h]);const le=u.useMemo(()=>({elementResize:!f&&typeof ResizeObserver<"u",layoutShift:!f&&typeof IntersectionObserver<"u"}),[f]),{refs:xe,elements:q,x:Q,y:j,middlewareData:B,update:A,placement:z,context:W,isPositioned:de,floatingStyles:be}=tm({rootContext:h,placement:P,middleware:se,strategy:n,whileElementsMounted:g?void 0:(...ke)=>Si(...ke,le),nodeId:x,externalTree:S}),{sideX:Ee,sideY:Ne}=B.adaptiveOrigin||Io,Ae=de?n:"fixed",ve=u.useMemo(()=>{const ke=y?{position:Ae,[Ee]:Q,[Ne]:j}:{position:Ae,...be};return de||(ke.opacity=0),ke},[y,Ae,Ee,Q,Ne,j,be,de]),Pe=u.useRef(null);J(()=>{if(!p)return;const ke=C.current,Fe=typeof ke=="function"?ke():ke,Ve=(Vi(Fe)?Fe.current:Fe)||null||null;Ve!==Pe.current&&(xe.setPositionReference(Ve),Pe.current=Ve)},[p,xe,M,C]),u.useEffect(()=>{if(!p)return;const ke=C.current;typeof ke!="function"&&Vi(ke)&&ke.current!==Pe.current&&(xe.setPositionReference(ke.current),Pe.current=ke.current)},[p,xe,M,C]),u.useEffect(()=>{if(g&&p&&q.domReference&&q.floating)return Si(q.domReference,q.floating,A,le)},[g,p,q,A,le]);const Re=ut(z),He=Kl(o,Re,k),fe=rn(z)||"center",Ce=!!((Te=B.hide)!=null&&Te.referenceHidden);J(()=>{w&&p&&de&&R(Re)},[w,p,de,Re]);const ze=u.useMemo(()=>{var ke,Fe;return{position:"absolute",top:(ke=B.arrow)==null?void 0:ke.y,left:(Fe=B.arrow)==null?void 0:Fe.x}},[B.arrow]),Ze=(($e=B.arrow)==null?void 0:$e.centerOffset)!==0;return u.useMemo(()=>({positionerStyles:ve,arrowStyles:ze,arrowRef:Z,arrowUncentered:Ze,side:He,align:fe,physicalSide:Re,anchorHidden:Ce,refs:xe,context:W,isPositioned:de,update:A}),[ve,ze,Z,Ze,He,fe,Re,Ce,xe,W,de,A])}function Vi(e){return e!=null&&"current"in e}function ir(e){const{children:t,elementsRef:n,labelsRef:o,onMapChange:r}=e,s=ne(r),i=u.useRef(0),c=et(Im).current,a=et(Mm).current,[l,d]=u.useState(0),f=u.useRef(l),g=ne((x,y)=>{a.set(x,y??null),f.current+=1,d(f.current)}),h=ne(x=>{a.delete(x),f.current+=1,d(f.current)}),p=u.useMemo(()=>{const x=new Map;return Array.from(a.keys()).filter(w=>w.isConnected).sort(Pm).forEach((w,S)=>{const v=a.get(w)??{};x.set(w,{...v,index:S})}),x},[a,l]);J(()=>{if(typeof MutationObserver!="function"||p.size===0)return;const x=new MutationObserver(y=>{const w=new Set,S=v=>w.has(v)?w.delete(v):w.add(v);y.forEach(v=>{v.removedNodes.forEach(S),v.addedNodes.forEach(S)}),w.size===0&&(f.current+=1,d(f.current))});return p.forEach((y,w)=>{w.parentElement&&x.observe(w.parentElement,{childList:!0})}),()=>{x.disconnect()}},[p]),J(()=>{f.current===l&&(n.current.length!==p.size&&(n.current.length=p.size),o&&o.current.length!==p.size&&(o.current.length=p.size),i.current=p.size),s(p)},[s,p,n,o,l]),J(()=>()=>{n.current=[]},[n]),J(()=>()=>{o&&(o.current=[])},[o]);const m=ne(x=>(c.add(x),()=>{c.delete(x)}));J(()=>{c.forEach(x=>x(p))},[c,p]);const b=u.useMemo(()=>({register:g,unregister:h,subscribeMapChange:m,elementsRef:n,labelsRef:o,nextIndexRef:i}),[g,h,m,n,o,i]);return ie.jsx(Vc.Provider,{value:b,children:t})}function Mm(){return new Map}function Im(){return new Set}function Pm(e,t){const n=e.compareDocumentPosition(t);return n&Node.DOCUMENT_POSITION_FOLLOWING||n&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:n&Node.DOCUMENT_POSITION_PRECEDING||n&Node.DOCUMENT_POSITION_CONTAINS?1:0}const Ts=u.forwardRef(function(t,n){const{cutout:o,...r}=t;let s;if(o){const i=o==null?void 0:o.getBoundingClientRect();s=`polygon(
|
|
336
|
+
0% 0%,
|
|
337
|
+
100% 0%,
|
|
338
|
+
100% 100%,
|
|
339
|
+
0% 100%,
|
|
340
|
+
0% 0%,
|
|
341
|
+
${i.left}px ${i.top}px,
|
|
342
|
+
${i.left}px ${i.bottom}px,
|
|
343
|
+
${i.right}px ${i.bottom}px,
|
|
344
|
+
${i.right}px ${i.top}px,
|
|
345
|
+
${i.left}px ${i.top}px
|
|
346
|
+
)`}return ie.jsx("div",{ref:n,role:"presentation","data-base-ui-inert":"",...r,style:{position:"fixed",inset:0,userSelect:"none",WebkitUserSelect:"none",clipPath:s}})}),iy=u.forwardRef(function(t,n){var Q;const{anchor:o,positionMethod:r="absolute",className:s,render:i,side:c,align:a,sideOffset:l=0,alignOffset:d=0,collisionBoundary:f="clipping-ancestors",collisionPadding:g=5,arrowPadding:h=5,sticky:p=!1,disableAnchorTracking:m=!1,collisionAvoidance:b=Zi,...x}=t,{store:y}=on(),w=Sm(),S=Zo(!0),v=y.useState("parent"),R=y.useState("floatingRootContext"),I=y.useState("floatingTreeRoot"),E=y.useState("mounted"),T=y.useState("open"),V=y.useState("modal"),_=y.useState("activeTriggerElement"),M=y.useState("transitionStatus"),C=y.useState("positionerElement"),O=y.useState("instantType"),k=y.useState("hasViewport"),D=y.useState("lastOpenChangeReason"),P=y.useState("floatingNodeId"),L=y.useState("floatingParentNodeId"),N=R.useState("domReferenceElement"),F=u.useRef(null),U=ns(C,!1,!1);let H=o,ce=l,G=d,Z=a,$=b;v.type==="context-menu"&&(H=o??((Q=v.context)==null?void 0:Q.anchor),Z=Z??"start",!c&&Z!=="center"&&(G=t.alignOffset??2,ce=t.sideOffset??-5));let K=c,Y=Z;v.type==="menu"?(K=K??"inline-end",Y=Y??"start",$=t.collisionAvoidance??Ji):v.type==="menubar"&&(K=K??"bottom",Y=Y??"start");const oe=v.type==="context-menu",se=ks({anchor:H,floatingRootContext:R,positionMethod:S?"fixed":r,mounted:E,side:K,sideOffset:ce,align:Y,alignOffset:G,arrowPadding:oe?0:h,collisionBoundary:f,collisionPadding:g,sticky:p,nodeId:P,keepMounted:w,disableAnchorTracking:m,collisionAvoidance:$,shiftCrossAxis:oe&&!("side"in $&&$.side==="flip"),externalTree:I,adaptiveOrigin:k?Gl:void 0}),re=u.useMemo(()=>{const j={};return T||(j.pointerEvents="none"),{role:"presentation",hidden:!E,style:{...se.positionerStyles,...j}}},[T,E,se.positionerStyles]);u.useEffect(()=>{function j(B){B.open&&(B.parentNodeId===P&&y.set("hoverEnabled",!1),B.nodeId!==P&&B.parentNodeId===y.select("floatingParentNodeId")&&y.setOpen(!1,ge(_n)))}return I.events.on("menuopenchange",j),()=>{I.events.off("menuopenchange",j)}},[y,I.events,P]),u.useEffect(()=>{if(y.select("floatingParentNodeId")==null)return;function j(B){if(B.open||B.nodeId!==y.select("floatingParentNodeId"))return;const A=B.reason??_n;y.setOpen(!1,ge(A))}return I.events.on("menuopenchange",j),()=>{I.events.off("menuopenchange",j)}},[I.events,y]);const me=Xe();u.useEffect(()=>{T||me.clear()},[T,me]),u.useEffect(()=>{function j(B){if(!(!T||B.nodeId!==y.select("floatingParentNodeId")))if(B.target&&_&&_!==B.target){const A=y.select("closeDelay");A>0?me.isStarted()||me.start(A,()=>{y.setOpen(!1,ge(_n))}):y.setOpen(!1,ge(_n))}else me.clear()}return I.events.on("itemhover",j),()=>{I.events.off("itemhover",j)}},[I.events,T,_,y,me]),u.useEffect(()=>{const j={open:T,nodeId:P,parentNodeId:L,reason:y.select("lastOpenChangeReason")};I.events.emit("menuopenchange",j)},[I.events,T,y,P,L]),J(()=>{const j=N,B=F.current;if(j&&(F.current=j),B&&j&&j!==B){y.set("instantType",void 0);const A=new AbortController;return U(()=>{y.set("instantType","trigger-change")},A.signal),()=>{A.abort()}}},[N,U,y]);const te={open:T,side:se.side,align:se.align,anchorHidden:se.anchorHidden,nested:v.type==="menu",instant:O},X=u.useMemo(()=>({side:se.side,align:se.align,arrowRef:se.arrowRef,arrowUncentered:se.arrowUncentered,arrowStyles:se.arrowStyles,nodeId:se.context.nodeId}),[se.side,se.align,se.arrowRef,se.arrowUncentered,se.arrowStyles,se.context.nodeId]),le=Se("div",t,{state:te,stateAttributesMapping:jt,ref:[n,y.useStateSetter("positionerElement")],props:[re,An(M),x]}),xe=E&&v.type!=="menu"&&(v.type!=="menubar"&&V&&D!==ct||v.type==="menubar"&&v.context.modal);let q=null;return v.type==="menubar"?q=v.context.contentElement:v.type===void 0&&(q=_),ie.jsxs(Cc.Provider,{value:X,children:[xe&&ie.jsx(Ts,{ref:v.type==="context-menu"||v.type==="nested-context-menu"?v.context.internalBackdropRef:null,inert:rr(!T),cutout:q}),ie.jsx(Mp,{id:P,children:ie.jsx(ir,{elementsRef:y.context.itemDomElements,labelsRef:y.context.itemLabels,children:le})})]})}),Yl=u.createContext(void 0);function Om(){const e=u.useContext(Yl);if(e===void 0)throw new Error(Be(34));return e}const cy=u.memo(u.forwardRef(function(t,n){const{render:o,className:r,value:s,defaultValue:i,onValueChange:c,disabled:a=!1,...l}=t,[d,f]=Qt({controlled:s,default:i,name:"MenuRadioGroup"}),g=ne(c),h=ne((x,y)=>{g==null||g(x,y),!y.isCanceled&&f(x)}),m=Se("div",t,{state:{disabled:a},ref:n,props:{role:"group","aria-disabled":a||void 0,...l}}),b=u.useMemo(()=>({value:d,setValue:h,disabled:a}),[d,h,a]);return ie.jsx(Yl.Provider,{value:b,children:m})})),Xl=u.createContext(void 0);function Am(){const e=u.useContext(Xl);if(e===void 0)throw new Error(Be(35));return e}const ly=u.forwardRef(function(t,n){const{render:o,className:r,id:s,label:i,nativeButton:c=!1,disabled:a=!1,closeOnClick:l=!1,value:d,...f}=t,g=Qn({label:i}),h=os(!0),p=gt(s),{store:m}=on(),b=m.useState("isActive",g.index),x=m.useState("itemProps"),{value:y,setValue:w,disabled:S}=Om(),v=S||a,R=y===d,{getItemProps:I,itemRef:E}=Dc({closeOnClick:l,disabled:v,highlighted:b,id:p,store:m,nativeButton:c,nodeId:h==null?void 0:h.nodeId,itemMetadata:Fc}),T=u.useMemo(()=>({disabled:v,highlighted:b,checked:R}),[v,b,R]),V=ne(M=>{const C={...ge(fn,M.nativeEvent),preventUnmountOnClose:()=>{}};w(d,C)}),_=Se("div",t,{state:T,stateAttributesMapping:Jo,props:[x,{role:"menuitemradio","aria-checked":R,onClick:V},f,I],ref:[E,n,g.ref]});return ie.jsx(Xl.Provider,{value:T,children:_})}),ay=u.forwardRef(function(t,n){const{render:o,className:r,keepMounted:s=!1,...i}=t,c=Am(),a=u.useRef(null),{transitionStatus:l,setMounted:d}=$t(c.checked);mt({open:c.checked,ref:a,onComplete(){c.checked||d(!1)}});const f={checked:c.checked,disabled:c.disabled,highlighted:c.highlighted,transitionStatus:l};return Se("span",t,{state:f,stateAttributesMapping:Jo,ref:[n,a],props:{"aria-hidden":!0,...i},enabled:s||c.checked})});function cr(e){const t=u.useRef(!0);t.current&&(t.current=!1,e())}let _i={},Hi={},Bi="";function Lm(e){if(typeof document>"u")return!1;const t=Oe(e);return Ke(t).innerWidth-t.documentElement.clientWidth>0}function Nm(e){if(!(typeof CSS<"u"&&CSS.supports&&CSS.supports("scrollbar-gutter","stable"))||typeof document>"u")return!1;const n=Oe(e),o=n.documentElement,r=n.body,s=nn(o)?o:r,i=s.style.overflowY,c=o.style.scrollbarGutter;o.style.scrollbarGutter="stable",s.style.overflowY="scroll";const a=s.offsetWidth;s.style.overflowY="hidden";const l=s.offsetWidth;return s.style.overflowY=i,o.style.scrollbarGutter=c,a===l}function Fm(e){const t=Oe(e),n=t.documentElement,o=t.body,r=nn(n)?n:o,s={overflowY:r.style.overflowY,overflowX:r.style.overflowX};return Object.assign(r.style,{overflowY:"hidden",overflowX:"hidden"}),()=>{Object.assign(r.style,s)}}function Dm(e){var g;const t=Oe(e),n=t.documentElement,o=t.body,r=Ke(n);let s=0,i=0,c=!1;const a=Ge.create();if(rs&&(((g=r.visualViewport)==null?void 0:g.scale)??1)!==1)return()=>{};function l(){const h=r.getComputedStyle(n),p=r.getComputedStyle(o),x=(h.scrollbarGutter||"").includes("both-edges")?"stable both-edges":"stable";s=n.scrollTop,i=n.scrollLeft,_i={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},Bi=n.style.scrollBehavior,Hi={position:o.style.position,height:o.style.height,width:o.style.width,boxSizing:o.style.boxSizing,overflowY:o.style.overflowY,overflowX:o.style.overflowX,scrollBehavior:o.style.scrollBehavior};const y=n.scrollHeight>n.clientHeight,w=n.scrollWidth>n.clientWidth,S=h.overflowY==="scroll"||p.overflowY==="scroll",v=h.overflowX==="scroll"||p.overflowX==="scroll",R=Math.max(0,r.innerWidth-o.clientWidth),I=Math.max(0,r.innerHeight-o.clientHeight),E=parseFloat(p.marginTop)+parseFloat(p.marginBottom),T=parseFloat(p.marginLeft)+parseFloat(p.marginRight),V=nn(n)?n:o;if(c=Nm(e),c){n.style.scrollbarGutter=x,V.style.overflowY="hidden",V.style.overflowX="hidden";return}Object.assign(n.style,{scrollbarGutter:x,overflowY:"hidden",overflowX:"hidden"}),(y||S)&&(n.style.overflowY="scroll"),(w||v)&&(n.style.overflowX="scroll"),Object.assign(o.style,{position:"relative",height:E||I?`calc(100dvh - ${E+I}px)`:"100dvh",width:T||R?`calc(100vw - ${T+R}px)`:"100vw",boxSizing:"border-box",overflow:"hidden",scrollBehavior:"unset"}),o.scrollTop=s,o.scrollLeft=i,n.setAttribute("data-base-ui-scroll-locked",""),n.style.scrollBehavior="unset"}function d(){Object.assign(n.style,_i),Object.assign(o.style,Hi),c||(n.scrollTop=s,n.scrollLeft=i,n.removeAttribute("data-base-ui-scroll-locked"),n.style.scrollBehavior=Bi)}function f(){d(),a.request(l)}return l(),r.addEventListener("resize",f),()=>{a.cancel(),d(),typeof r.removeEventListener=="function"&&r.removeEventListener("resize",f)}}class Vm{constructor(){De(this,"lockCount",0);De(this,"restore",null);De(this,"timeoutLock",wt.create());De(this,"timeoutUnlock",wt.create());De(this,"release",()=>{this.lockCount-=1,this.lockCount===0&&this.restore&&this.timeoutUnlock.start(0,this.unlock)});De(this,"unlock",()=>{var t;this.lockCount===0&&this.restore&&((t=this.restore)==null||t.call(this),this.restore=null)})}acquire(t){return this.lockCount+=1,this.lockCount===1&&this.restore===null&&this.timeoutLock.start(0,()=>this.lock(t)),this.release}lock(t){if(this.lockCount===0||this.restore!==null)return;const o=Oe(t).documentElement,r=Ke(o).getComputedStyle(o).overflowY;if(r==="hidden"||r==="clip"){this.restore=st;return}const s=Oc||!Lm(t);this.restore=s?Fm(t):Dm(t)}}const _m=new Vm;function Ms(e=!0,t=null){J(()=>{if(e)return _m.acquire(t)},[e,t])}const Hm=u.createContext(null);function Zl(e){return u.useContext(Hm)}function Bm(e){const t=u.useRef(""),n=u.useCallback(r=>{r.defaultPrevented||(t.current=r.pointerType,e(r,r.pointerType))},[e]);return{onClick:u.useCallback(r=>{if(r.detail===0){e(r,"keyboard");return}"pointerType"in r?e(r,r.pointerType):e(r,t.current),t.current=""},[e]),onPointerDown:n}}function Is(e){const[t,n]=u.useState(null),o=ne((i,c)=>{e||n(c||(Oc?"touch":""))});ts(e,i=>{i&&!e&&n(null)});const{onClick:r,onPointerDown:s}=Bm(o);return u.useMemo(()=>({openMethod:t,triggerProps:{onClick:r,onPointerDown:s}}),[t,r,s])}const zm={...Rs,disabled:ee(e=>e.parent.type==="menubar"&&e.parent.context.disabled||e.disabled),modal:ee(e=>(e.parent.type===void 0||e.parent.type==="context-menu")&&(e.modal??!0)),allowMouseEnter:ee(e=>e.allowMouseEnter),stickIfOpen:ee(e=>e.stickIfOpen),parent:ee(e=>e.parent),rootId:ee(e=>e.parent.type==="menu"?e.parent.store.select("rootId"):e.parent.type!==void 0?e.parent.context.rootId:e.rootId),activeIndex:ee(e=>e.activeIndex),isActive:ee((e,t)=>e.activeIndex===t),hoverEnabled:ee(e=>e.hoverEnabled),instantType:ee(e=>e.instantType),lastOpenChangeReason:ee(e=>e.openChangeReason),floatingTreeRoot:ee(e=>e.parent.type==="menu"?e.parent.store.select("floatingTreeRoot"):e.floatingTreeRoot),floatingNodeId:ee(e=>e.floatingNodeId),floatingParentNodeId:ee(e=>e.floatingParentNodeId),itemProps:ee(e=>e.itemProps),closeDelay:ee(e=>e.closeDelay),hasViewport:ee(e=>e.hasViewport),keyboardEventRelay:ee(e=>{if(e.keyboardEventRelay)return e.keyboardEventRelay;if(e.parent.type==="menu")return e.parent.store.select("keyboardEventRelay")})};class Ps extends nr{constructor(n){super({...$m(),...n},{positionerRef:u.createRef(),popupRef:u.createRef(),typingRef:{current:!1},itemDomElements:{current:[]},itemLabels:{current:[]},allowMouseUpTriggerRef:{current:!1},triggerFocusTargetRef:u.createRef(),beforeContentFocusGuardRef:u.createRef(),onOpenChangeComplete:void 0,triggerElements:new no},zm);De(this,"unsubscribeParentListener",null);this.unsubscribeParentListener=this.observe("parent",o=>{var r;if((r=this.unsubscribeParentListener)==null||r.call(this),o.type==="menu"){let s=o.store.select("rootId"),i=o.store.select("floatingTreeRoot"),c=o.store.select("keyboardEventRelay");this.unsubscribeParentListener=o.store.subscribe(()=>{const a=o.store.select("rootId"),l=o.store.select("floatingTreeRoot"),d=o.store.select("keyboardEventRelay");s===a&&i===l&&c===d||(s=a,i=l,c=d,this.notifyAll())}),this.context.allowMouseUpTriggerRef=o.store.context.allowMouseUpTriggerRef;return}o.type!==void 0&&(this.context.allowMouseUpTriggerRef=o.context.allowMouseUpTriggerRef),this.unsubscribeParentListener=null})}setOpen(n,o){this.state.floatingRootContext.context.events.emit("setOpen",{open:n,eventDetails:o})}static useStore(n,o){const r=et(()=>new Ps(o)).current;return n??r}}function $m(){return{...xs(),disabled:!1,modal:!0,allowMouseEnter:!1,stickIfOpen:!0,parent:{type:void 0},rootId:void 0,activeIndex:null,hoverEnabled:!0,instantType:void 0,openChangeReason:null,floatingTreeRoot:new fs,floatingNodeId:void 0,floatingParentNodeId:null,itemProps:Ue,keyboardEventRelay:void 0,closeDelay:0,hasViewport:!1}}const jm=u.createContext(void 0);function Um(){return u.useContext(jm)}const uy=hs(function(t){const{children:n,open:o,onOpenChange:r,onOpenChangeComplete:s,defaultOpen:i=!1,disabled:c=!1,modal:a,loopFocus:l=!0,orientation:d="vertical",actionsRef:f,closeParentOnEsc:g=!1,handle:h,triggerId:p,defaultTriggerId:m=null,highlightItemOnHover:b=!0}=t,x=Zo(!0),y=on(!0),w=Zl(!0),S=Um(),v=u.useMemo(()=>S&&y?{type:"menu",store:y.store}:w?{type:"menubar",context:w}:x&&!y?{type:"context-menu",context:x}:{type:void 0},[x,y,w,S]),R=Ps.useStore(h==null?void 0:h.store,{open:i,openProp:o,activeTriggerId:m,triggerIdProp:p,parent:v});cr(()=>{o===void 0&&R.state.open===!1&&i===!0&&R.update({open:!0,activeTriggerId:m})}),R.useControlledProp("openProp",o),R.useControlledProp("triggerIdProp",p),R.useContextCallback("onOpenChangeComplete",s);const I=R.useState("floatingTreeRoot"),E=ml(I),T=Ut();J(()=>{x&&!y?R.update({parent:{type:"context-menu",context:x},floatingNodeId:E,floatingParentNodeId:T}):y&&R.update({floatingNodeId:E,floatingParentNodeId:T})},[x,y,E,T,R]);const V=R.useState("open"),_=R.useState("activeTriggerElement"),M=R.useState("positionerElement"),C=R.useState("hoverEnabled"),O=R.useState("modal"),k=R.useState("disabled"),D=R.useState("lastOpenChangeReason"),P=R.useState("parent"),L=R.useState("activeIndex"),N=R.useState("payload"),F=R.useState("floatingParentNodeId"),U=u.useRef(null),H=F!=null;let ce;R.useSyncedValues({disabled:c,modal:P.type===void 0?a:void 0,rootId:bn()});const{openMethod:G,triggerProps:Z}=Is(V);ys(R);const{forceUnmount:$}=vs(V,R,()=>{R.update({allowMouseEnter:!1,stickIfOpen:!0})}),K=u.useRef(P.type!=="context-menu"),Y=Xe();u.useEffect(()=>{if(V||(U.current=null),P.type==="context-menu"){if(!V){Y.clear(),K.current=!1;return}Y.start(500,()=>{K.current=!0})}},[Y,V,P.type]),Ms(V&&O&&D!==ct&&G!=="touch",M),J(()=>{!V&&!C&&R.set("hoverEnabled",!0)},[V,C,R]);const oe=u.useRef(!0),se=Xe(),re=ne((fe,Ce)=>{var Ve;const ze=Ce.reason;if(V===fe&&Ce.trigger===_&&D===ze||(Ce.preventUnmountOnClose=()=>{R.set("preventUnmountingOnClose",!0)},!fe&&Ce.trigger==null&&(Ce.trigger=_??void 0),r==null||r(fe,Ce),Ce.isCanceled))return;const Ze={open:fe,nativeEvent:Ce.event,reason:Ce.reason,nested:H};ce==null||ce.emit("openchange",Ze);const Te=Ce.event;if(fe===!1&&(Te==null?void 0:Te.type)==="click"&&Te.pointerType==="touch"&&!oe.current)return;if(!fe&&L!==null){const tt=R.context.itemDomElements.current[L];queueMicrotask(()=>{tt==null||tt.setAttribute("tabindex","-1")})}fe&&ze===xn?(oe.current=!1,se.start(300,()=>{oe.current=!0})):(oe.current=!0,se.clear());const $e=(ze===pn||ze===fn)&&Te.detail===0&&(Te==null?void 0:Te.isTrusted),ke=!fe&&(ze===Yo||ze==null),Fe={open:fe,openChangeReason:ze};U.current=Ce.event??null;const We=((Ve=Ce.trigger)==null?void 0:Ve.id)??null;(We||fe)&&(Fe.activeTriggerId=We,Fe.activeTriggerElement=Ce.trigger??null),R.update(Fe),P.type==="menubar"&&(ze===xn||ze===gn||ze===ct||ze===ko||ze===_n)?R.set("instantType","group"):$e||ke?R.set("instantType",$e?"click":"dismiss"):R.set("instantType",void 0)}),me=u.useCallback(fe=>{const Ce=ge(fe);return Ce.preventUnmountOnClose=()=>{R.set("preventUnmountingOnClose",!0)},Ce},[R]),te=u.useCallback(()=>{R.setOpen(!1,me(es))},[R,me]);u.useImperativeHandle(f,()=>({unmount:$,close:te}),[$,te]);let X;P.type==="context-menu"&&(X=P.context),u.useImperativeHandle(X==null?void 0:X.positionerRef,()=>M,[M]),u.useImperativeHandle(X==null?void 0:X.actionsRef,()=>({setOpen:re}),[re]);const le=ws({popupStore:R,onOpenChange:re});ce=le.context.events,u.useEffect(()=>{const fe=({open:Ce,eventDetails:ze})=>re(Ce,ze);return ce.on("setOpen",fe),()=>{ce==null||ce.off("setOpen",fe)}},[ce,re]);const xe=er(le,{enabled:!k,bubbles:{escapeKey:g&&P.type==="menu"},outsidePress(){var fe;return P.type!=="context-menu"||((fe=U.current)==null?void 0:fe.type)==="contextmenu"?!0:K.current},externalTree:H?I:void 0}),q=Hl(le,{role:"menu"}),Q=sr(),j=u.useCallback(fe=>{R.select("activeIndex")!==fe&&R.set("activeIndex",fe)},[R]),B=_l(le,{enabled:!k,listRef:R.context.itemDomElements,activeIndex:L,nested:P.type!==void 0,loopFocus:l,orientation:d,parentOrientation:P.type==="menubar"?P.context.orientation:void 0,rtl:Q==="rtl",disabledIndices:Jt,onNavigate:j,openOnArrowKeyDown:P.type!=="context-menu",externalTree:H?I:void 0,focusItemOnHover:b}),A=u.useCallback(fe=>{R.context.typingRef.current=fe},[R]),z=Bl(le,{listRef:R.context.itemLabels,elementsRef:R.context.itemDomElements,activeIndex:L,resetMs:Ha,onMatch:fe=>{V&&fe!==L&&R.set("activeIndex",fe)},onTypingChange:A}),{getReferenceProps:W,getFloatingProps:de,getItemProps:be,getTriggerProps:Ee}=oo([xe,q,B,z]),Ne=u.useMemo(()=>{const fe=Zt(W(),{onMouseMove(){R.set("allowMouseEnter",!0)}},Z);return delete fe.role,fe},[W,R,Z]),Ae=u.useMemo(()=>{const fe=Ee();if(!fe)return fe;const Ce=Zt(fe,Z);return delete Ce.role,delete Ce["aria-controls"],Ce},[Ee,Z]),ve=u.useMemo(()=>de({onMouseMove(){R.set("allowMouseEnter",!0),P.type==="menu"&&R.set("hoverEnabled",!1)},onClick(){R.select("hoverEnabled")&&R.set("hoverEnabled",!1)},onKeyDown(fe){const Ce=R.select("keyboardEventRelay");Ce&&!fe.isPropagationStopped()&&Ce(fe)}}),[de,P.type,R]),Pe=u.useMemo(()=>be(),[be]);R.useSyncedValues({floatingRootContext:le,activeTriggerProps:Ne,inactiveTriggerProps:Ae,popupProps:ve,itemProps:Pe});const Re=u.useMemo(()=>({store:R,parent:v}),[R,v]),He=ie.jsx(kc.Provider,{value:Re,children:typeof n=="function"?n({payload:N}):n});return P.type===void 0||P.type==="context-menu"?ie.jsx(Ip,{externalTree:I,children:He}):He});function Jl(e){const t=e.getBoundingClientRect(),n=window.getComputedStyle(e,"::before"),o=window.getComputedStyle(e,"::after");if(!(n.content!=="none"||o.content!=="none"))return t;const s=parseFloat(n.width)||0,i=parseFloat(n.height)||0,c=parseFloat(o.width)||0,a=parseFloat(o.height)||0,l=Math.max(t.width,s,c),d=Math.max(t.height,i,a),f=l-t.width,g=d-t.height;return{left:t.left-f/2,right:t.right+f/2,top:t.top-g/2,bottom:t.bottom+g/2}}function Ql(e={}){const{highlightItemOnHover:t,highlightedIndex:n,onHighlightedIndexChange:o}=Xr(),{ref:r,index:s}=Qn(e),i=n===s,c=u.useRef(null),a=Rt(r,c);return{compositeProps:u.useMemo(()=>({tabIndex:i?0:-1,onFocus(){o(s)},onMouseMove(){const d=c.current;if(!t||!d)return;const f=d.hasAttribute("disabled")||d.ariaDisabled==="true";!i&&!f&&d.focus()}}),[i,o,s,t]),compositeRef:a,index:s}}function Wm(e){const{render:t,className:n,state:o=Ue,props:r=Jt,refs:s=Jt,metadata:i,stateAttributesMapping:c,tag:a="div",...l}=e,{compositeProps:d,compositeRef:f}=Ql({metadata:i});return Se(a,e,{state:o,ref:[...s,f],props:[d,...r,l],stateAttributesMapping:c})}function ea(e){if(je(e)&&e.hasAttribute("data-rootownerid"))return e.getAttribute("data-rootownerid")??void 0;if(!Tt(e))return ea(It(e))}function qm(e){const{enabled:t=!0,mouseDownAction:n,open:o}=e,r=u.useRef(!1);return u.useMemo(()=>t?{onMouseDown:s=>{(n==="open"&&!o||n==="close"&&o)&&(r.current=!0,Oe(s.currentTarget).addEventListener("click",()=>{r.current=!1},{once:!0}))},onClick:s=>{r.current&&(r.current=!1,s.preventBaseUIHandler())}}:Ue,[t,n,o])}const Ro=2,dy=Pl(function(t,n){const{render:o,className:r,disabled:s=!1,nativeButton:i=!0,id:c,openOnHover:a,delay:l=100,closeDelay:d=0,handle:f,payload:g,...h}=t,p=on(!0),m=(f==null?void 0:f.store)??(p==null?void 0:p.store);if(!m)throw new Error(Be(85));const b=gt(c),x=m.useState("isTriggerActive",b),y=m.useState("floatingRootContext"),w=m.useState("isOpenedByTrigger",b),S=u.useRef(null),v=Km(),R=Xr(!0),I=sn(),E=u.useMemo(()=>I??new fs,[I]),T=ml(E),V=Ut(),{registerTrigger:_,isMountedByThisTrigger:M}=Al(b,S,m,{payload:g,closeDelay:d,parent:v,floatingTreeRoot:E,floatingNodeId:T,floatingParentNodeId:V,keyboardEventRelay:R==null?void 0:R.relayKeyboardEvent}),C=v.type==="menubar",O=m.useState("disabled"),k=s||O||C&&v.context.disabled,{getButtonProps:D,buttonRef:P}=zt({disabled:k,native:i});u.useEffect(()=>{!w&&v.type===void 0&&(m.context.allowMouseUpTriggerRef.current=!1)},[m,w,v.type]);const L=u.useRef(null),N=Xe(),F=ne(q=>{if(!L.current)return;N.clear(),m.context.allowMouseUpTriggerRef.current=!1;const Q=q.target;if(we(L.current,Q)||we(m.select("positionerElement"),Q)||Q===L.current||Q!=null&&ea(Q)===m.select("rootId"))return;const j=Jl(L.current);q.clientX>=j.left-Ro&&q.clientX<=j.right+Ro&&q.clientY>=j.top-Ro&&q.clientY<=j.bottom+Ro||E.events.emit("close",{domEvent:q,reason:xc})});u.useEffect(()=>{w&&m.select("lastOpenChangeReason")===ct&&Oe(L.current).addEventListener("mouseup",F,{once:!0})},[w,F,m]);const U=C&&v.context.hasSubmenuOpen,ce=Vl(y,{enabled:(a??U)&&!k&&v.type!=="context-menu"&&(!C||U&&!M),handleClose:zl({blockPointerEvents:!C}),mouseOnly:!0,move:!1,restMs:v.type===void 0?l:void 0,delay:{close:d},triggerElementRef:S,externalTree:E,isActiveTrigger:x}),G=Gm(w,m.select("lastOpenChangeReason")),Z=hl(y,{enabled:!k&&v.type!=="context-menu",event:w&&C?"click":"mousedown",toggle:!0,ignoreMouse:!1,stickIfOpen:v.type===void 0?G:!1}),$=Nl(y,{enabled:!k&&U}),K=qm({open:w,enabled:C,mouseDownAction:"open"}),Y=oo([Z,$]),oe={disabled:k,open:w},se=m.useState("triggerProps",M),re=[L,n,P,_,S],me=[Y.getReferenceProps(),ce??Ue,se,{"aria-haspopup":"menu",id:b,onMouseDown:q=>{if(m.select("open"))return;N.start(200,()=>{m.context.allowMouseUpTriggerRef.current=!0}),Oe(q.currentTarget).addEventListener("mouseup",F,{once:!0})}},C?{role:"menuitem"}:{},K,h,D],te=u.useRef(null),X=ne(q=>{xt.flushSync(()=>{m.setOpen(!1,ge(gn,q.nativeEvent,q.currentTarget))});const Q=vp(te.current);Q==null||Q.focus()}),le=ne(q=>{var j;const Q=m.select("positionerElement");if(Q&&Rn(q,Q))(j=m.context.beforeContentFocusGuardRef.current)==null||j.focus();else{xt.flushSync(()=>{m.setOpen(!1,ge(gn,q.nativeEvent,q.currentTarget))});let B=yp(m.context.triggerFocusTargetRef.current||S.current);for(;B!==null&&we(Q,B);){const A=B;if(B=us(B),B===A)break}B==null||B.focus()}}),xe=Se("button",t,{enabled:!C,stateAttributesMapping:Or,state:oe,ref:re,props:me});return C?ie.jsx(Wm,{tag:"button",render:o,className:r,state:oe,refs:re,props:me,stateAttributesMapping:Or}):w?ie.jsxs(u.Fragment,{children:[ie.jsx(Mn,{ref:te,onFocus:X},`${b}-pre-focus-guard`),ie.jsx(u.Fragment,{children:xe},b),ie.jsx(Mn,{ref:m.context.triggerFocusTargetRef,onFocus:le},`${b}-post-focus-guard`)]}):ie.jsx(u.Fragment,{children:xe},b)});function Gm(e,t){const n=Xe(),[o,r]=u.useState(!1);return J(()=>{e&&t==="trigger-hover"?(r(!0),n.start(Ba,()=>{r(!1)})):e||(n.clear(),r(!1))},[e,t,n]),o}function Km(){const e=Zo(!0),t=on(!0),n=Zl();return u.useMemo(()=>n?{type:"menubar",context:n}:e&&!t?{type:"context-menu",context:e}:{type:void 0},[e,t,n])}const fy=u.forwardRef(function(t,n){const{className:o,render:r,orientation:s="horizontal",...i}=t;return Se("div",t,{state:{orientation:s},ref:n,props:[{role:"separator","aria-orientation":s},i]})}),ta=u.createContext(null),na=u.createContext(null);function At(){const e=u.useContext(ta);if(e===null)throw new Error(Be(60));return e}function oa(){const e=u.useContext(na);if(e===null)throw new Error(Be(61));return e}function Os(e={}){const{id:t,implicit:n=!1,controlRef:o}=e,{controlId:r,registerControlId:s}=Go(),i=gt(t),c=n?r:void 0,a=et(()=>Symbol("labelable-control")),l=u.useRef(!1),d=u.useRef(t!=null),f=ne(()=>{!l.current||s===st||(l.current=!1,s(a.current,void 0))});return J(()=>{if(s===st)return;let g;if(n){const h=o==null?void 0:o.current;Le(h)&&h.closest("label")!=null?g=t??null:g=c??i}else if(t!=null)d.current=!0,g=t;else if(d.current)g=i;else{f();return}if(g===void 0){f();return}l.current=!0,s(a.current,g)},[t,o,c,s,n,i,a,f]),u.useEffect(()=>f,[f]),r??i}const Ym=(e,t)=>Object.is(e,t);function In(e,t,n){return e==null||t==null?Object.is(e,t):n(e,t)}function Xm(e,t,n){return!e||e.length===0?!1:e.some(o=>o===void 0?!1:In(t,o,n))}function jn(e,t,n){return!e||e.length===0?-1:e.findIndex(o=>o===void 0?!1:In(o,t,n))}function Zm(e,t,n){return e.filter(o=>!In(t,o,n))}function jr(e){if(e==null)return"";if(typeof e=="string")return e;try{return JSON.stringify(e)}catch{return String(e)}}function ra(e){return e!=null&&e.length>0&&typeof e[0]=="object"&&e[0]!=null&&"items"in e[0]}function Jm(e){if(!Array.isArray(e))return e!=null&&"null"in e;const t=e;if(ra(t)){for(const n of t)for(const o of n.items)if(o&&o.value==null&&o.label!=null)return!0;return!1}for(const n of t)if(n&&n.value==null&&n.label!=null)return!0;return!1}function Qm(e,t){if(t&&e!=null)return t(e)??"";if(e&&typeof e=="object"){if("label"in e&&e.label!=null)return String(e.label);if("value"in e)return String(e.value)}return jr(e)}function vn(e,t){return t&&e!=null?t(e)??"":e&&typeof e=="object"&&"value"in e&&"label"in e?jr(e.value):jr(e)}function sa(e,t,n){function o(){return Qm(e,n)}if(n&&e!=null)return n(e);if(e&&typeof e=="object"&&"label"in e&&e.label!=null)return e.label;if(t&&!Array.isArray(t))return t[e]??o();if(Array.isArray(t)){const r=t,s=ra(r)?r.flatMap(i=>i.items):r;if(e==null||typeof e!="object"){const i=s.find(c=>c.value===e);return i&&i.label!=null?i.label:o()}if("value"in e){const i=s.find(c=>c&&c.value===e.value);if(i&&i.label!=null)return i.label}}return o()}function eh(e,t,n){return e.reduce((o,r,s)=>(s>0&&o.push(", "),o.push(ie.jsx(u.Fragment,{children:sa(r,t,n)},s)),o),[])}const he={id:ee(e=>e.id),labelId:ee(e=>e.labelId),modal:ee(e=>e.modal),multiple:ee(e=>e.multiple),items:ee(e=>e.items),itemToStringLabel:ee(e=>e.itemToStringLabel),itemToStringValue:ee(e=>e.itemToStringValue),isItemEqualToValue:ee(e=>e.isItemEqualToValue),value:ee(e=>e.value),hasSelectedValue:ee(e=>{const{value:t,multiple:n,itemToStringValue:o}=e;return t==null?!1:n&&Array.isArray(t)?t.length>0:vn(t,o)!==""}),hasNullItemLabel:ee((e,t)=>t?Jm(e.items):!1),open:ee(e=>e.open),mounted:ee(e=>e.mounted),forceMount:ee(e=>e.forceMount),transitionStatus:ee(e=>e.transitionStatus),openMethod:ee(e=>e.openMethod),activeIndex:ee(e=>e.activeIndex),selectedIndex:ee(e=>e.selectedIndex),isActive:ee((e,t)=>e.activeIndex===t),isSelected:ee((e,t,n)=>{const o=e.isItemEqualToValue,r=e.value;return e.multiple?Array.isArray(r)&&r.some(s=>In(n,s,o)):e.selectedIndex===t&&e.selectedIndex!==null?!0:In(n,r,o)}),isSelectedByFocus:ee((e,t)=>e.selectedIndex===t),popupProps:ee(e=>e.popupProps),triggerProps:ee(e=>e.triggerProps),triggerElement:ee(e=>e.triggerElement),positionerElement:ee(e=>e.positionerElement),listElement:ee(e=>e.listElement),scrollUpArrowVisible:ee(e=>e.scrollUpArrowVisible),scrollDownArrowVisible:ee(e=>e.scrollDownArrowVisible),hasScrollArrows:ee(e=>e.hasScrollArrows)};function py(e){const{id:t,value:n,defaultValue:o=null,onValueChange:r,open:s,defaultOpen:i=!1,onOpenChange:c,name:a,autoComplete:l,disabled:d=!1,readOnly:f=!1,required:g=!1,modal:h=!0,actionsRef:p,inputRef:m,onOpenChangeComplete:b,items:x,multiple:y=!1,itemToStringLabel:w,itemToStringValue:S,isItemEqualToValue:v=Ym,highlightItemOnHover:R=!0,children:I}=e,{clearErrors:E}=Jr(),{setDirty:T,setTouched:V,setFocused:_,shouldValidateOnChange:M,validityData:C,setFilled:O,name:k,disabled:D,validation:P,validationMode:L}=Zn(),N=Os({id:t}),F=D||d,U=k??a,[H,ce]=Qt({controlled:n,default:y?o??Jt:o,name:"Select",state:"value"}),[G,Z]=Qt({controlled:s,default:i,name:"Select",state:"open"}),$=u.useRef([]),K=u.useRef([]),Y=u.useRef(null),oe=u.useRef(null),se=u.useRef(0),re=u.useRef(null),me=u.useRef([]),te=u.useRef(!1),X=u.useRef(!1),le=u.useRef(null),xe=u.useRef({allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1}),q=u.useRef(!1),{mounted:Q,setMounted:j,transitionStatus:B}=$t(G),{openMethod:A,triggerProps:z}=Is(G),W=et(()=>new Ol({id:N,labelId:void 0,modal:h,multiple:y,itemToStringLabel:w,itemToStringValue:S,isItemEqualToValue:v,value:H,open:G,mounted:Q,transitionStatus:B,items:x,forceMount:!1,openMethod:null,activeIndex:null,selectedIndex:null,popupProps:{},triggerProps:{},triggerElement:null,positionerElement:null,listElement:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1,hasScrollArrows:!1})).current,de=ye(W,he.activeIndex),be=ye(W,he.selectedIndex),Ee=ye(W,he.triggerElement),Ne=ye(W,he.positionerElement),Ae=u.useMemo(()=>y&&Array.isArray(H)&&H.length===0?"":vn(H,S),[y,H,S]),ve=u.useMemo(()=>y&&Array.isArray(H)?H.map(Me=>vn(Me,S)):vn(H,S),[y,H,S]),Pe=nt(W.state.triggerElement);Qr({id:N,commit:P.commit,value:H,controlRef:Pe,name:U,getValue:()=>ve});const Re=u.useRef(H);J(()=>{H!==Re.current&&W.set("forceMount",!0)},[W,H]),J(()=>{O(y?Array.isArray(H)&&H.length>0:H!=null)},[y,H,O]),J(function(){if(G)return;const Ye=me.current;if(y){const ot=Array.isArray(H)?H:[];if(ot.length===0){W.set("selectedIndex",null);return}const it=ot[ot.length-1],Ct=jn(Ye,it,v);W.set("selectedIndex",Ct===-1?null:Ct);return}const qe=jn(Ye,H,v);W.set("selectedIndex",qe===-1?null:qe)},[y,G,H,me,v,W]),ts(H,()=>{E(U),T(H!==C.initialValue),M()?P.commit(H):P.commit(H,!0)});const He=ne((Me,Ye)=>{if(c==null||c(Me,Ye),!Ye.isCanceled&&(Z(Me),!Me&&(Ye.reason===gn||Ye.reason===Ko)&&(V(!0),_(!1),L==="onBlur"&&P.commit(H)),!Me&&W.state.activeIndex!==null)){const qe=$.current[W.state.activeIndex];queueMicrotask(()=>{qe==null||qe.setAttribute("tabindex","-1")})}}),fe=ne(()=>{j(!1),W.set("activeIndex",null),b==null||b(!1)});mt({enabled:!p,open:G,ref:Y,onComplete(){G||fe()}}),u.useImperativeHandle(p,()=>({unmount:fe}),[fe]);const Ce=ne((Me,Ye)=>{r==null||r(Me,Ye),!Ye.isCanceled&&ce(Me)}),ze=ne(()=>{const Me=W.state.listElement||Y.current;if(!Me)return;const Ye=Me.scrollTop,qe=Me.scrollTop+Me.clientHeight,ot=Ye>1,it=qe<Me.scrollHeight-1;W.state.scrollUpArrowVisible!==ot&&W.set("scrollUpArrowVisible",ot),W.state.scrollDownArrowVisible!==it&&W.set("scrollDownArrowVisible",it)}),Ze=Ll({open:G,onOpenChange:He,elements:{reference:Ee,floating:Ne}}),Te=hl(Ze,{enabled:!f&&!F,event:"mousedown"}),$e=er(Ze,{bubbles:!1}),ke=_l(Ze,{enabled:!f&&!F,listRef:$,activeIndex:de,selectedIndex:be,disabledIndices:Jt,onNavigate(Me){Me===null&&!G||W.set("activeIndex",Me)},focusItemOnHover:!1}),Fe=Bl(Ze,{enabled:!f&&!F&&(G||!y),listRef:K,activeIndex:de,selectedIndex:be,onMatch(Me){G?W.set("activeIndex",Me):Ce(me.current[Me],ge("none"))},onTypingChange(Me){te.current=Me}}),{getReferenceProps:We,getFloatingProps:Ve,getItemProps:tt}=oo([Te,$e,ke,Fe]),Je=u.useMemo(()=>Zt(We(),z,N?{id:N}:Ue),[We,z,N]);cr(()=>{W.update({popupProps:Ve(),triggerProps:Je})}),J(()=>{W.update({id:N,modal:h,multiple:y,value:H,open:G,mounted:Q,transitionStatus:B,popupProps:Ve(),triggerProps:Je,items:x,itemToStringLabel:w,itemToStringValue:S,isItemEqualToValue:v,openMethod:A})},[W,N,h,y,H,G,Q,B,Ve,Je,x,w,S,v,A]);const ht=u.useMemo(()=>({store:W,name:U,required:g,disabled:F,readOnly:f,multiple:y,itemToStringLabel:w,itemToStringValue:S,highlightItemOnHover:R,setValue:Ce,setOpen:He,listRef:$,popupRef:Y,scrollHandlerRef:oe,handleScrollArrowVisibility:ze,scrollArrowsMountedCountRef:se,getItemProps:tt,events:Ze.context.events,valueRef:re,valuesRef:me,labelsRef:K,typingRef:te,selectionRef:xe,selectedItemTextRef:le,validation:P,onOpenChangeComplete:b,keyboardActiveRef:X,alignItemWithTriggerActiveRef:q,initialValueRef:Re}),[W,U,g,F,f,y,w,S,R,Ce,He,tt,Ze.context.events,P,b,ze]),Et=Rt(m,P.inputRef),bt=y&&Array.isArray(H)&&H.length>0,Lt=y?void 0:U,Wt=u.useMemo(()=>!y||!Array.isArray(H)||!U?null:H.map(Me=>{const Ye=vn(Me,S);return ie.jsx("input",{type:"hidden",name:U,value:Ye},Ye)}),[y,H,U,S]);return ie.jsx(ta.Provider,{value:ht,children:ie.jsxs(na.Provider,{value:Ze,children:[I,ie.jsx("input",{...P.getInputValidationProps({onFocus(){var Me;(Me=W.state.triggerElement)==null||Me.focus({focusVisible:!0})},onChange(Me){if(Me.nativeEvent.defaultPrevented)return;const Ye=Me.target.value,qe=ge(Pt,Me.nativeEvent);function ot(){if(y)return;const it=me.current.find(Ct=>vn(Ct,S).toLowerCase()===Ye.toLowerCase());it!=null&&(T(it!==C.initialValue),Ce(it,qe),M()&&P.commit(it))}W.set("forceMount",!0),queueMicrotask(ot)}}),id:N&&Lt==null?`${N}-hidden-input`:void 0,name:Lt,autoComplete:l,value:Ae,disabled:F,required:g&&!bt,readOnly:f,ref:Et,style:U?bc:Zr,tabIndex:-1,"aria-hidden":!0}),Wt]})})}function th(e,t){return e??t}const wo=2,nh=400,zi=200,oh={...Or,...qo,value:()=>null},gy=u.forwardRef(function(t,n){const{render:o,className:r,id:s,disabled:i=!1,nativeButton:c=!0,...a}=t,{setTouched:l,setFocused:d,validationMode:f,state:g,disabled:h}=Zn(),{labelId:p}=Go(),{store:m,setOpen:b,selectionRef:x,validation:y,readOnly:w,required:S,alignItemWithTriggerActiveRef:v,disabled:R,keyboardActiveRef:I}=At(),E=h||R||i,T=ye(m,he.open),V=ye(m,he.value),_=ye(m,he.triggerProps),M=ye(m,he.positionerElement),C=ye(m,he.listElement),O=ye(m,he.id),k=ye(m,he.labelId),D=ye(m,he.hasSelectedValue),P=!D&&T,L=ye(m,he.hasNullItemLabel,P),N=s??O,F=th(p,k);Os({id:N});const U=nt(M),H=u.useRef(null),{getButtonProps:ce,buttonRef:G}=zt({disabled:E,native:c}),Z=ne(X=>{m.set("triggerElement",X)}),$=Rt(n,H,G,Z),K=Xe(),Y=Xe(),oe=Xe(),se=Xe();u.useEffect(()=>{if(T)return!(D||L)?oe.start(nh,()=>{x.current.allowUnselectedMouseUp=!0,x.current.allowSelectedMouseUp=!0}):se.start(zi,()=>{x.current.allowUnselectedMouseUp=!0,oe.start(zi,()=>{x.current.allowSelectedMouseUp=!0})}),()=>{oe.clear(),se.clear()};x.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1},Y.clear()},[T,D,L,x,Y,oe,se]);const re=u.useMemo(()=>{var X;return(C==null?void 0:C.id)??((X=qn(M))==null?void 0:X.id)},[C,M]),me=Zt(_,{id:N,role:"combobox","aria-expanded":T?"true":"false","aria-haspopup":"listbox","aria-controls":T?re:void 0,"aria-labelledby":F,"aria-readonly":w||void 0,"aria-required":S||void 0,tabIndex:E?-1:0,ref:$,onFocus(X){d(!0),T&&v.current&&b(!1,ge(Pt,X.nativeEvent)),K.start(0,()=>{m.set("forceMount",!0)})},onBlur(X){we(M,X.relatedTarget)||(l(!0),d(!1),f==="onBlur"&&y.commit(V))},onPointerMove(){I.current=!1},onKeyDown(){I.current=!0},onMouseDown(X){if(T)return;const le=Oe(X.currentTarget);function xe(q){if(!H.current)return;const Q=q.target;if(we(H.current,Q)||we(U.current,Q)||Q===H.current)return;const j=Jl(H.current);q.clientX>=j.left-wo&&q.clientX<=j.right+wo&&q.clientY>=j.top-wo&&q.clientY<=j.bottom+wo||b(!1,ge(xc,q))}Y.start(0,()=>{le.addEventListener("mouseup",xe,{once:!0})})}},y.getValidationProps,a,ce);me.role="combobox";const te={...g,open:T,disabled:E,value:V,readOnly:w,placeholder:!D};return Se("button",t,{ref:[n,H],state:te,stateAttributesMapping:oh,props:me})}),rh={value:()=>null},my=u.forwardRef(function(t,n){const{className:o,render:r,children:s,placeholder:i,...c}=t,{store:a,valueRef:l}=At(),d=ye(a,he.value),f=ye(a,he.items),g=ye(a,he.itemToStringLabel),h=ye(a,he.hasSelectedValue),p=!h&&i!=null&&s==null,m=ye(a,he.hasNullItemLabel,p),b={value:d,placeholder:!h};let x=null;return typeof s=="function"?x=s(d):s!=null?x=s:!h&&i!=null&&!m?x=i:Array.isArray(d)?x=eh(d,f,g):x=sa(d,f,g),Se("span",t,{state:b,ref:[n,l],props:[{children:x},c],stateAttributesMapping:rh})}),hy=u.forwardRef(function(t,n){const{className:o,render:r,...s}=t,{store:i}=At(),a={open:ye(i,he.open)};return Se("span",t,{state:a,ref:n,props:[{"aria-hidden":!0,children:"▼"},s],stateAttributesMapping:Tc})}),sh=u.createContext(void 0),by=u.forwardRef(function(t,n){const{store:o}=At(),r=ye(o,he.mounted),s=ye(o,he.forceMount);return r||s?ie.jsx(sh.Provider,{value:!0,children:ie.jsx(ds,{ref:n,...t})}):null}),ia=u.createContext(void 0);function As(){const e=u.useContext(ia);if(!e)throw new Error(Be(59));return e}function zo(e,t){e&&Object.assign(e.style,t)}const ca={position:"relative",maxHeight:"100%",overflowX:"hidden",overflowY:"auto"},ih={position:"fixed"},yy=u.forwardRef(function(t,n){const{anchor:o,positionMethod:r="absolute",className:s,render:i,side:c="bottom",align:a="center",sideOffset:l=0,alignOffset:d=0,collisionBoundary:f="clipping-ancestors",collisionPadding:g,arrowPadding:h=5,sticky:p=!1,disableAnchorTracking:m,alignItemWithTrigger:b=!0,collisionAvoidance:x=Zi,...y}=t,{store:w,listRef:S,labelsRef:v,alignItemWithTriggerActiveRef:R,selectedItemTextRef:I,valuesRef:E,initialValueRef:T,popupRef:V,setValue:_}=At(),M=oa(),C=ye(w,he.open),O=ye(w,he.mounted),k=ye(w,he.modal),D=ye(w,he.value),P=ye(w,he.openMethod),L=ye(w,he.positionerElement),N=ye(w,he.triggerElement),F=ye(w,he.isItemEqualToValue),U=ye(w,he.transitionStatus),H=u.useRef(null),ce=u.useRef(null),[G,Z]=u.useState(b),$=O&&G&&P!=="touch";!O&&G!==b&&Z(b),J(()=>{O||(he.scrollUpArrowVisible(w.state)&&w.set("scrollUpArrowVisible",!1),he.scrollDownArrowVisible(w.state)&&w.set("scrollDownArrowVisible",!1))},[w,O]),u.useImperativeHandle(R,()=>$),Ms(($||k)&&C&&P!=="touch",N);const K=ks({anchor:o,floatingRootContext:M,positionMethod:r,mounted:O,side:c,sideOffset:l,align:a,alignOffset:d,arrowPadding:h,collisionBoundary:f,collisionPadding:g,sticky:p,disableAnchorTracking:m??$,collisionAvoidance:x,keepMounted:!0}),Y=$?"none":K.side,oe=$?ih:K.positionerStyles,se=u.useMemo(()=>{const q={};return C||(q.pointerEvents="none"),{role:"presentation",hidden:!O,style:{...oe,...q}}},[C,O,oe]),re={open:C,side:Y,align:K.align,anchorHidden:K.anchorHidden},me=ne(q=>{w.set("positionerElement",q)}),te=Se("div",t,{ref:[n,me],state:re,stateAttributesMapping:jt,props:[se,An(U),y]}),X=u.useRef(0),le=ne(q=>{if(q.size===0&&X.current===0||E.current.length===0)return;const Q=X.current;if(X.current=q.size,q.size===Q)return;const j=ge(Pt);if(Q!==0&&!w.state.multiple&&D!==null&&jn(E.current,D,F)===-1){const A=T.current,W=A!=null&&jn(E.current,A,F)!==-1?A:null;_(W,j),W===null&&(w.set("selectedIndex",null),I.current=null)}if(Q!==0&&w.state.multiple&&Array.isArray(D)){const B=z=>jn(E.current,z,F)!==-1,A=D.filter(z=>B(z));(A.length!==D.length||A.some(z=>!Xm(D,z,F)))&&(_(A,j),A.length===0&&(w.set("selectedIndex",null),I.current=null))}if(C&&$){w.update({scrollUpArrowVisible:!1,scrollDownArrowVisible:!1});const B={height:""};zo(L,B),zo(V.current,B)}}),xe=u.useMemo(()=>({...K,side:Y,alignItemWithTriggerActive:$,setControlledAlignItemWithTrigger:Z,scrollUpArrowRef:H,scrollDownArrowRef:ce}),[K,Y,$,Z]);return ie.jsx(ir,{elementsRef:S,labelsRef:v,onMapChange:le,children:ie.jsxs(ia.Provider,{value:xe,children:[O&&k&&ie.jsx(Ts,{inert:rr(!C),cutout:N}),te]})})});function la(e){const t=e.currentTarget.getBoundingClientRect();return t.top+1<=e.clientY&&e.clientY<=t.bottom-1&&t.left+1<=e.clientX&&e.clientX<=t.right-1}const So="base-ui-disable-scrollbar",Ur={className:So,getElement(e){return ie.jsx("style",{nonce:e,href:So,precedence:"base-ui:low",children:`.${So}{scrollbar-width:none}.${So}::-webkit-scrollbar{display:none}`})}};function Cr(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}const ch=u.createContext(void 0),lh={disableStyleElements:!1};function ah(){return u.useContext(ch)??lh}const Ft=1,uh={...jt,...St},vy=u.forwardRef(function(t,n){const{render:o,className:r,finalFocus:s,...i}=t,{store:c,popupRef:a,onOpenChangeComplete:l,setOpen:d,valueRef:f,selectedItemTextRef:g,keyboardActiveRef:h,multiple:p,handleScrollArrowVisibility:m,scrollHandlerRef:b,highlightItemOnHover:x}=At(),{side:y,align:w,alignItemWithTriggerActive:S,setControlledAlignItemWithTrigger:v,scrollDownArrowRef:R,scrollUpArrowRef:I}=As(),E=$l()!=null,T=oa(),{nonce:V,disableStyleElements:_}=ah(),M=Xe(),C=ye(c,he.id),O=ye(c,he.open),k=ye(c,he.mounted),D=ye(c,he.popupProps),P=ye(c,he.transitionStatus),L=ye(c,he.triggerElement),N=ye(c,he.positionerElement),F=ye(c,he.listElement),U=u.useRef(0),H=u.useRef(!1),ce=u.useRef(0),G=u.useRef(!1),Z=u.useRef({}),$=Jn(),K=ne(re=>{if(!N||!a.current||!G.current)return;if(H.current||!S){m();return}const me=N.style.top==="0px",te=N.style.bottom==="0px",X=N.getBoundingClientRect().height,le=Oe(N),xe=getComputedStyle(N),q=parseFloat(xe.marginTop),Q=parseFloat(xe.marginBottom),j=$i(getComputedStyle(a.current)),B=Math.min(le.documentElement.clientHeight-q-Q,j),A=re.scrollTop,z=Eo(re);let W=0,de=null,be=!1,Ee=!1;const Ne=ve=>{N.style.height=`${ve}px`},Ae=(ve,Pe)=>{const Re=Cr(ve,0,B-X);Re>0&&Ne(X+Re),re.scrollTop=Pe,B-(X+Re)<=Ft&&(H.current=!0),m()};if(me){const ve=z-A,Pe=X+ve,Re=Math.min(Pe,B);if(W=Re,ve<=Ft){Ae(ve,z);return}B-Re>Ft?Ee=!0:be=!0}else if(te){const ve=A,Pe=X+ve,Re=Math.min(Pe,B),He=Pe-B;if(W=Re,ve<=Ft){Ae(ve,0);return}B-Re>Ft?de=0:(be=!0,A<z&&(de=A-(ve-He)))}if(W=Math.ceil(W),W!==0&&Ne(W),Ee||de!=null){const ve=Eo(re),Pe=Ee?ve:Cr(de,0,ve);Math.abs(re.scrollTop-Pe)>Ft&&(re.scrollTop=Pe)}(be||W>=B-Ft)&&(H.current=!0),m()});u.useImperativeHandle(b,()=>K,[K]),mt({open:O,ref:a,onComplete(){O&&(l==null||l(!0))}});const Y={open:O,transitionStatus:P,side:y,align:w};J(()=>{!N||!a.current||Object.keys(Z.current).length||(Z.current={top:N.style.top||"0",left:N.style.left||"0",right:N.style.right,height:N.style.height,bottom:N.style.bottom,minHeight:N.style.minHeight,maxHeight:N.style.maxHeight,marginTop:N.style.marginTop,marginBottom:N.style.marginBottom})},[a,N]),J(()=>{O||S||(G.current=!1,H.current=!1,U.current=0,ce.current=0,zo(N,Z.current))},[O,S,N,a]),J(()=>{const re=a.current;if(!(!O||!L||!N||!re||c.state.transitionStatus==="ending")){if(!S){G.current=!0,$.request(m),re.style.removeProperty("--transform-origin");return}queueMicrotask(()=>{var te;const me=fh(re);re.style.removeProperty("--transform-origin");try{const X=getComputedStyle(N),le=getComputedStyle(re),xe=Oe(L),q=Ke(N),Q=dh(L),j=Co(L.getBoundingClientRect(),Q),B=Co(N.getBoundingClientRect(),Q),A=j.left,z=j.height,W=F||re,de=W.scrollHeight,be=parseFloat(le.borderBottomWidth),Ee=parseFloat(X.marginTop)||10,Ne=parseFloat(X.marginBottom)||10,Ae=parseFloat(X.minHeight)||100,ve=$i(le),Pe=5,Re=5,He=20,fe=xe.documentElement.clientHeight-Ee-Ne,Ce=xe.documentElement.clientWidth,ze=fe-j.bottom+z,Ze=g.current,Te=f.current;let $e,ke=0,Fe=0;if(Ze&&Te){const qe=Co(Te.getBoundingClientRect(),Q);$e=Co(Ze.getBoundingClientRect(),Q);const ot=qe.left-A,it=$e.left-B.left,Ct=qe.top-j.top+qe.height/2,kt=$e.top-B.top+$e.height/2;ke=ot-it,Fe=kt-Ct}const We=ze+Fe+Ne+be;let Ve=Math.min(fe,We);const tt=fe-Ee-Ne,Je=We-Ve,ht=Math.max(Pe,A+ke),Et=Ce-Re,bt=Math.max(0,ht+B.width-Et);N.style.left=`${ht-bt}px`,N.style.height=`${Ve}px`,N.style.maxHeight="auto",N.style.marginTop=`${Ee}px`,N.style.marginBottom=`${Ne}px`,re.style.height="100%";const Lt=Eo(W),Wt=Je>=Lt-Ft;Wt&&(Ve=Math.min(fe,B.height)-(Je-Lt));const Me=j.top<He||j.bottom>fe-He||Math.ceil(Ve)+Ft<Math.min(de,Ae),Ye=(((te=q.visualViewport)==null?void 0:te.scale)??1)!==1&&rs;if(Me||Ye){G.current=!0,zo(N,Z.current),xt.flushSync(()=>v(!1));return}if(Wt){const qe=Math.max(0,fe-We);N.style.top=B.height>=tt?"0":`${qe}px`,N.style.height=`${Ve}px`,W.scrollTop=Eo(W),U.current=Math.max(Ae,Ve)}else N.style.bottom="0",U.current=Math.max(Ae,Ve),W.scrollTop=Je;if($e){const qe=B.top,ot=B.height,it=$e.top+$e.height/2,Ct=ot>0?(it-qe)/ot*100:50,kt=Cr(Ct,0,100);re.style.setProperty("--transform-origin",`50% ${kt}%`)}(U.current===fe||Ve>=ve)&&(H.current=!0),m(),setTimeout(()=>{G.current=!0})}finally{me()}})}},[c,O,N,L,f,g,a,m,S,v,$,R,I,F]),u.useEffect(()=>{if(!S||!N||!O)return;const re=Ke(N);function me(te){d(!1,ge(dd,te))}return re.addEventListener("resize",me),()=>{re.removeEventListener("resize",me)}},[d,S,N,O]);const oe={...F?{role:"presentation","aria-orientation":void 0}:{role:"listbox","aria-multiselectable":p||void 0,id:`${C}-list`},onKeyDown(re){h.current=!0,E&&Cs.has(re.key)&&re.stopPropagation()},onMouseMove(){h.current=!1},onPointerLeave(re){if(!x||la(re)||re.pointerType==="touch")return;const me=re.currentTarget;M.start(0,()=>{c.set("activeIndex",null),me.focus({preventScroll:!0})})},onScroll(re){F||K(re.currentTarget)},...S&&{style:F?{height:"100%"}:ca}},se=Se("div",t,{ref:[n,a],state:Y,stateAttributesMapping:uh,props:[D,oe,An(P),{className:!F&&S?Ur.className:void 0},i]});return ie.jsxs(u.Fragment,{children:[!_&&Ur.getElement(V),ie.jsx(gs,{context:T,modal:!1,disabled:!k,returnFocus:s,restoreFocus:!0,children:se})]})});function $i(e){const t=e.maxHeight||"";return t.endsWith("px")&&parseFloat(t)||1/0}function Eo(e){return Math.max(0,e.scrollHeight-e.clientHeight)}function dh(e){return Sl.getScale(e)}function Co(e,t){return Gn({x:e.x/t.x,y:e.y/t.y,width:e.width/t.x,height:e.height/t.y})}const ji=[["transform","none"],["scale","1"],["translate","0 0"]];function fh(e){const{style:t}=e,n={};for(const[o,r]of ji)n[o]=t.getPropertyValue(o),t.setProperty(o,r,"important");return()=>{for(const[o]of ji){const r=n[o];r?t.setProperty(o,r):t.removeProperty(o)}}}const xy=u.forwardRef(function(t,n){const{className:o,render:r,...s}=t,{store:i,scrollHandlerRef:c}=At(),{alignItemWithTriggerActive:a}=As(),l=ye(i,he.hasScrollArrows),d=ye(i,he.openMethod),f=ye(i,he.multiple),h={id:`${ye(i,he.id)}-list`,role:"listbox","aria-multiselectable":f||void 0,onScroll(m){var b;(b=c.current)==null||b.call(c,m.currentTarget)},...a&&{style:ca},className:l&&d!=="touch"?Ur.className:void 0},p=ne(m=>{i.set("listElement",m)});return Se("div",t,{ref:[n,p],props:[h,s]})}),aa=u.createContext(void 0);function Ls(){const e=u.useContext(aa);if(!e)throw new Error(Be(57));return e}const Ry=u.memo(u.forwardRef(function(t,n){const{render:o,className:r,value:s=null,label:i,disabled:c=!1,nativeButton:a=!1,...l}=t,d=u.useRef(null),f=Qn({label:i,textRef:d,indexGuessBehavior:_c.GuessFromOrder}),{store:g,getItemProps:h,setOpen:p,setValue:m,selectionRef:b,typingRef:x,valuesRef:y,keyboardActiveRef:w,multiple:S,highlightItemOnHover:v}=At(),R=Xe(),I=ye(g,he.isActive,f.index),E=ye(g,he.isSelected,f.index,s),T=ye(g,he.isSelectedByFocus,f.index),V=ye(g,he.isItemEqualToValue),_=f.index,M=_!==-1,C=u.useRef(null),O=nt(_);J(()=>{if(!M)return;const $=y.current;return $[_]=s,()=>{delete $[_]}},[M,_,s,y]),J(()=>{if(!M)return;const $=g.state.value;let K=$;S&&Array.isArray($)&&$.length>0&&(K=$[$.length-1]),K!==void 0&&In(s,K,V)&&g.set("selectedIndex",_)},[M,_,S,V,g,s]);const k={disabled:c,selected:E,highlighted:I},D=h({active:I,selected:E});D.onFocus=void 0,D.id=void 0;const P=u.useRef(null),L=u.useRef("mouse"),N=u.useRef(!1),{getButtonProps:F,buttonRef:U}=zt({disabled:c,focusableWhenDisabled:!0,native:a,composite:!0});function H($){const K=g.state.value;if(S){const Y=Array.isArray(K)?K:[],oe=E?Zm(Y,s,V):[...Y,s];m(oe,ge(fn,$))}else m(s,ge(fn,$)),p(!1,ge(fn,$))}const ce={role:"option","aria-selected":E,tabIndex:I?0:-1,onFocus(){g.set("activeIndex",_)},onMouseEnter(){!w.current&&g.state.selectedIndex===null&&v&&g.set("activeIndex",_)},onMouseMove(){v&&g.set("activeIndex",_)},onMouseLeave($){!v||w.current||la($)||R.start(0,()=>{g.state.activeIndex===_&&g.set("activeIndex",null)})},onTouchStart(){b.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1}},onKeyDown($){P.current=$.key,g.set("activeIndex",_),$.key===" "&&x.current&&$.preventDefault()},onClick($){N.current=!1,!($.type==="keydown"&&P.current===null)&&(c||$.type==="keydown"&&P.current===" "&&x.current||L.current!=="touch"&&!I||(P.current=null,H($.nativeEvent)))},onPointerEnter($){L.current=$.pointerType},onPointerDown($){L.current=$.pointerType,N.current=!0},onMouseUp(){var Y;if(c)return;if(N.current){N.current=!1;return}const $=!b.current.allowSelectedMouseUp&&E,K=!b.current.allowUnselectedMouseUp&&!E;$||K||L.current!=="touch"&&!I||(Y=C.current)==null||Y.click()}},G=Se("div",t,{ref:[U,n,f.ref,C],state:k,props:[D,ce,l,F]}),Z=u.useMemo(()=>({selected:E,indexRef:O,textRef:d,selectedByFocus:T,hasRegistered:M}),[E,O,d,T,M]);return ie.jsx(aa.Provider,{value:Z,children:G})})),wy=u.forwardRef(function(t,n){const o=t.keepMounted??!1,{selected:r}=Ls();return o||r?ie.jsx(ph,{...t,ref:n}):null}),ph=u.memo(u.forwardRef((e,t)=>{const{render:n,className:o,keepMounted:r,...s}=e,{selected:i}=Ls(),c=u.useRef(null),{transitionStatus:a,setMounted:l}=$t(i),f=Se("span",e,{ref:[t,c],state:{selected:i,transitionStatus:a},props:[{"aria-hidden":!0,children:"✔️"},s],stateAttributesMapping:St});return mt({open:i,ref:c,onComplete(){i||l(!1)}}),f})),Sy=u.memo(u.forwardRef(function(t,n){const{indexRef:o,textRef:r,selectedByFocus:s,hasRegistered:i}=Ls(),{selectedItemTextRef:c}=At(),{className:a,render:l,...d}=t,f=u.useCallback(h=>{if(!h||!i)return;const p=c.current===null||!c.current.isConnected;(s||p&&o.current===0)&&(c.current=h)},[c,o,s,i]);return Se("div",t,{ref:[f,n,r],props:d})})),ua=u.forwardRef(function(t,n){const{render:o,className:r,direction:s,keepMounted:i=!1,...c}=t,{store:a,popupRef:l,listRef:d,handleScrollArrowVisibility:f,scrollArrowsMountedCountRef:g}=At(),{side:h,scrollDownArrowRef:p,scrollUpArrowRef:m}=As(),b=s==="up"?he.scrollUpArrowVisible:he.scrollDownArrowVisible,x=ye(a,b),y=ye(a,he.openMethod),w=x&&y!=="touch",S=Xe(),v=s==="up"?m:p,{transitionStatus:R,setMounted:I}=$t(w);J(()=>(g.current+=1,a.state.hasScrollArrows||a.set("hasScrollArrows",!0),()=>{g.current=Math.max(0,g.current-1),g.current===0&&a.state.hasScrollArrows&&a.set("hasScrollArrows",!1)}),[a,g]),mt({open:w,ref:v,onComplete(){w||I(!1)}});const V=Se("div",t,{ref:[n,v],state:{direction:s,visible:w,side:h,transitionStatus:R},props:[{"aria-hidden":!0,children:s==="up"?"▲":"▼",style:{position:"absolute"},onMouseMove(M){if(M.movementX===0&&M.movementY===0||S.isStarted())return;a.set("activeIndex",null);function C(){var L;const O=a.state.listElement??l.current;if(!O)return;a.set("activeIndex",null),f();const k=O.scrollTop===0,D=Math.round(O.scrollTop+O.clientHeight)>=O.scrollHeight;if(d.current.length===0&&(s==="up"?a.set("scrollUpArrowVisible",!k):a.set("scrollDownArrowVisible",!D)),s==="up"&&k||s==="down"&&D){S.clear();return}if((a.state.listElement||l.current)&&d.current&&d.current.length>0){const N=d.current,F=((L=v.current)==null?void 0:L.offsetHeight)||0;if(s==="up"){let U=0;const H=O.scrollTop+F;for(let G=0;G<N.length;G+=1){const Z=N[G];if(Z&&Z.offsetTop>=H){U=G;break}}const ce=Math.max(0,U-1);if(ce<U){const G=N[ce];G&&(O.scrollTop=Math.max(0,G.offsetTop-F))}else O.scrollTop=0}else{let U=N.length-1;const H=O.scrollTop+O.clientHeight-F;for(let G=0;G<N.length;G+=1){const Z=N[G];if(Z&&Z.offsetTop+Z.offsetHeight>H){U=Math.max(0,G-1);break}}const ce=Math.min(N.length-1,U+1);if(ce>U){const G=N[ce];G&&(O.scrollTop=G.offsetTop+G.offsetHeight-O.clientHeight+F)}else O.scrollTop=O.scrollHeight-O.clientHeight}}S.start(40,C)}S.start(40,C)},onMouseLeave(){S.clear()}},c]});return w||i?V:null}),Ey=u.forwardRef(function(t,n){return ie.jsx(ua,{...t,ref:n,direction:"down"})}),Cy=u.forwardRef(function(t,n){return ie.jsx(ua,{...t,ref:n,direction:"up"})}),gh=u.createContext(void 0),ky=u.forwardRef(function(t,n){const{className:o,render:r,...s}=t,[i,c]=u.useState(),a=u.useMemo(()=>({labelId:i,setLabelId:c}),[i,c]),l=Se("div",t,{ref:n,props:[{role:"group","aria-labelledby":i},s]});return ie.jsx(gh.Provider,{value:a,children:l})}),da=u.createContext(void 0);function Ns(){const e=u.useContext(da);if(e===void 0)throw new Error(Be(64));return e}let mh=(function(e){return e.activationDirection="data-activation-direction",e.orientation="data-orientation",e})({});const Fs={tabActivationDirection:e=>({[mh.activationDirection]:e})},Ty=u.forwardRef(function(t,n){const{className:o,defaultValue:r=0,onValueChange:s,orientation:i="horizontal",render:c,value:a,...l}=t,d=sr(),f=Object.hasOwn(t,"defaultValue"),g=u.useRef([]),[h,p]=u.useState(()=>new Map),[m,b]=Qt({controlled:a,default:r,name:"Tabs",state:"value"}),x=a!==void 0,[y,w]=u.useState(()=>new Map),[S,v]=u.useState("none"),R=ne((P,L)=>{s==null||s(P,L),!L.isCanceled&&(b(P),v(L.activationDirection))}),I=ne((P,L)=>{p(N=>{if(N.get(P)===L)return N;const F=new Map(N);return F.set(P,L),F})}),E=ne((P,L)=>{p(N=>{if(!N.has(P)||N.get(P)!==L)return N;const F=new Map(N);return F.delete(P),F})}),T=u.useCallback(P=>h.get(P),[h]),V=u.useCallback(P=>{for(const L of y.values())if(P===(L==null?void 0:L.value))return L==null?void 0:L.id},[y]),_=u.useCallback(P=>{if(P===void 0)return null;for(const[L,N]of y.entries())if(N!=null&&P===(N.value??N.index))return L;return null},[y]),M=u.useMemo(()=>({direction:d,getTabElementBySelectedValue:_,getTabIdByPanelValue:V,getTabPanelIdByValue:T,onValueChange:R,orientation:i,registerMountedTabPanel:I,setTabMap:w,unregisterMountedTabPanel:E,tabActivationDirection:S,value:m}),[d,_,V,T,R,i,I,w,E,S,m]),C=u.useMemo(()=>{for(const P of y.values())if(P!=null&&P.value===m)return P},[y,m]),O=u.useMemo(()=>{for(const P of y.values())if(P!=null&&!P.disabled)return P.value},[y]);J(()=>{if(x||y.size===0)return;const P=C==null?void 0:C.disabled,L=C==null&&m!==null;if(f&&P&&m===r||!P&&!L)return;const F=O??null;m!==F&&(b(F),v("none"))},[r,O,f,x,C,v,b,y,m]);const D=Se("div",t,{state:{orientation:i,tabActivationDirection:S},ref:n,props:l,stateAttributesMapping:Fs});return ie.jsx(da.Provider,{value:M,children:ie.jsx(ir,{elementsRef:g,children:D})})}),fa="data-composite-item-active",pa=u.createContext(void 0);function hh(){const e=u.useContext(pa);if(e===void 0)throw new Error(Be(65));return e}const My=u.forwardRef(function(t,n){const{className:o,disabled:r=!1,render:s,value:i,id:c,nativeButton:a=!0,...l}=t,{value:d,getTabPanelIdByValue:f,orientation:g}=Ns(),{activateOnFocus:h,highlightedTabIndex:p,onTabActivation:m,registerTabResizeObserverElement:b,setHighlightedTabIndex:x,tabsListElement:y}=hh(),w=gt(c),S=u.useMemo(()=>({disabled:r,id:w,value:i}),[r,w,i]),{compositeProps:v,compositeRef:R,index:I}=Ql({metadata:S}),E=i===d,T=u.useRef(!1),V=u.useRef(null);u.useEffect(()=>{const U=V.current;if(U)return b(U)},[b]),J(()=>{if(T.current){T.current=!1;return}if(!(E&&I>-1&&p!==I))return;const U=y;if(U!=null){const H=at(Oe(U));if(H&&we(U,H))return}r||x(I)},[E,I,p,x,r,y]);const{getButtonProps:_,buttonRef:M}=zt({disabled:r,native:a,focusableWhenDisabled:!0}),C=f(i),O=u.useRef(!1),k=u.useRef(!1);function D(U){E||r||m(i,ge(Pt,U.nativeEvent,void 0,{activationDirection:"none"}))}function P(U){E||(I>-1&&!r&&x(I),!r&&h&&(!O.current||O.current&&k.current)&&m(i,ge(Pt,U.nativeEvent,void 0,{activationDirection:"none"})))}function L(U){if(E||r)return;O.current=!0;function H(){O.current=!1,k.current=!1}(!U.button||U.button===0)&&(k.current=!0,Oe(U.currentTarget).addEventListener("pointerup",H,{once:!0}))}return Se("button",t,{state:{disabled:r,active:E,orientation:g},ref:[n,M,R,V],props:[v,{role:"tab","aria-controls":C,"aria-selected":E,id:w,onClick:D,onFocus:P,onPointerDown:L,[fa]:E?"":void 0,onKeyDownCapture(){T.current=!0}},l,_]})});let bh=(function(e){return e.index="data-index",e.activationDirection="data-activation-direction",e.orientation="data-orientation",e.hidden="data-hidden",e[e.startingStyle=Ht.startingStyle]="startingStyle",e[e.endingStyle=Ht.endingStyle]="endingStyle",e})({});const yh={...Fs,...St},Iy=u.forwardRef(function(t,n){const{className:o,value:r,render:s,keepMounted:i=!1,...c}=t,{value:a,getTabIdByPanelValue:l,orientation:d,tabActivationDirection:f,registerMountedTabPanel:g,unregisterMountedTabPanel:h}=Ns(),p=gt(),m=u.useMemo(()=>({id:p,value:r}),[p,r]),{ref:b,index:x}=Qn({metadata:m}),y=r===a,{mounted:w,transitionStatus:S,setMounted:v}=$t(y),R=!w,I=l(r),E={hidden:R,orientation:d,tabActivationDirection:f,transitionStatus:S},T=u.useRef(null),V=Se("div",t,{state:E,ref:[n,b,T],props:[{"aria-labelledby":I,hidden:R,id:p,role:"tabpanel",tabIndex:y?0:-1,inert:rr(!y),[bh.index]:x},c],stateAttributesMapping:yh});return mt({open:y,ref:T,onComplete(){y||v(!1)}}),J(()=>{if(!(R&&!i)&&p!=null)return g(r,p),()=>{h(r,p)}},[R,i,r,p,g,h]),i||w?V:null});function vh(e){return e==null||e.hasAttribute("disabled")||e.getAttribute("aria-disabled")==="true"}const xh=[];function Rh(e){const{itemSizes:t,cols:n=1,loopFocus:o=!0,dense:r=!1,orientation:s="both",direction:i,highlightedIndex:c,onHighlightedIndexChange:a,rootRef:l,enableHomeAndEndKeys:d=!1,stopEventPropagation:f=!1,disabledIndices:g,modifierKeys:h=xh}=e,[p,m]=u.useState(0),b=n>1,x=u.useRef(null),y=Rt(x,l),w=u.useRef([]),S=u.useRef(!1),v=c??p,R=ne((T,V=!1)=>{if((a??m)(T),V){const _=w.current[T];Ni(x.current,_,i,s)}}),I=ne(T=>{if(T.size===0||S.current)return;S.current=!0;const V=Array.from(T.keys()),_=V.find(C=>C==null?void 0:C.hasAttribute(fa))??null,M=_?V.indexOf(_):-1;M!==-1&&R(M),Ni(x.current,_,i,s)}),E=u.useMemo(()=>({"aria-orientation":s==="both"?void 0:s,ref:y,onFocus(T){!x.current||!Li(T.target)||T.target.setSelectionRange(0,T.target.value.length??0)},onKeyDown(T){const V=d?mm:Wl;if(!V.has(T.key)||wh(T,h)||!x.current)return;const M=i==="rtl",C=M?Xn:En,O={horizontal:C,vertical:dn,both:C}[s],k=M?En:Xn,D={horizontal:k,vertical:Sn,both:k}[s];if(Li(T.target)&&!vh(T.target)){const ce=T.target.selectionStart,G=T.target.selectionEnd,Z=T.target.value??"";if(ce==null||T.shiftKey||ce!==G||T.key!==D&&ce<Z.length||T.key!==O&&ce>0)return}let P=v;const L=To(w,g),N=Vr(w,g);if(b){const ce=t||Array.from({length:w.current.length},()=>({width:1,height:1})),G=Gc(ce,n,r),Z=G.findIndex(K=>K!=null&&!_t(w,K,g)),$=G.reduce((K,Y,oe)=>Y!=null&&!_t(w,Y,g)?oe:K,-1);P=G[qc({current:G.map(K=>K?w.current[K]:null)},{event:T,orientation:s,loopFocus:o,cols:n,disabledIndices:Yc([...g||w.current.map((K,Y)=>_t(w,Y)?Y:void 0),void 0],G),minIndex:Z,maxIndex:$,prevIndex:Kc(v>N?L:v,ce,G,n,T.key===dn?"bl":T.key===En?"tr":"tl"),rtl:M})]}const F={horizontal:[C],vertical:[dn],both:[C,dn]}[s],U={horizontal:[k],vertical:[Sn],both:[k,Sn]}[s],H=b?V:{horizontal:d?pm:jl,vertical:d?gm:Ul,both:V}[s];d&&(T.key===ro?P=L:T.key===so&&(P=N)),P===v&&(F.includes(T.key)||U.includes(T.key))&&(o&&P===N&&F.includes(T.key)?P=L:o&&P===L&&U.includes(T.key)?P=N:P=rt(w,{startingIndex:P,decrement:U.includes(T.key),disabledIndices:g})),P!==v&&!Kn(w,P)&&(f&&T.stopPropagation(),H.has(T.key)&&T.preventDefault(),R(P,!0),queueMicrotask(()=>{var ce;(ce=w.current[P])==null||ce.focus()}))}}),[n,r,i,g,w,d,v,b,t,o,y,h,R,s,f]);return u.useMemo(()=>({props:E,highlightedIndex:v,onHighlightedIndexChange:R,elementsRef:w,disabledIndices:g,onMapChange:I,relayKeyboardEvent:E.onKeyDown}),[E,v,R,w,g,I])}function wh(e,t){for(const n of xm.values())if(!t.includes(n)&&e.getModifierState(n))return!0;return!1}function Sh(e){const{render:t,className:n,refs:o=Jt,props:r=Jt,state:s=Ue,stateAttributesMapping:i,highlightedIndex:c,onHighlightedIndexChange:a,orientation:l,dense:d,itemSizes:f,loopFocus:g,cols:h,enableHomeAndEndKeys:p,onMapChange:m,stopEventPropagation:b=!0,rootRef:x,disabledIndices:y,modifierKeys:w,highlightItemOnHover:S=!1,tag:v="div",...R}=e,I=sr(),{props:E,highlightedIndex:T,onHighlightedIndexChange:V,elementsRef:_,onMapChange:M,relayKeyboardEvent:C}=Rh({itemSizes:f,cols:h,loopFocus:g,dense:d,orientation:l,highlightedIndex:c,onHighlightedIndexChange:a,rootRef:x,stopEventPropagation:b,enableHomeAndEndKeys:p,direction:I,disabledIndices:y,modifierKeys:w}),O=Se(v,e,{state:s,ref:o,props:[E,...r,R],stateAttributesMapping:i}),k=u.useMemo(()=>({highlightedIndex:T,onHighlightedIndexChange:V,highlightItemOnHover:S,relayKeyboardEvent:C}),[T,V,S,C]);return ie.jsx(mc.Provider,{value:k,children:ie.jsx(ir,{elementsRef:_,onMapChange:D=>{m==null||m(D),M(D)},children:O})})}const Py=u.forwardRef(function(t,n){const{activateOnFocus:o=!1,className:r,loopFocus:s=!0,render:i,...c}=t,{getTabElementBySelectedValue:a,onValueChange:l,orientation:d,value:f,setTabMap:g,tabActivationDirection:h}=Ns(),[p,m]=u.useState(0),[b,x]=u.useState(null),y=u.useRef(new Set),w=u.useRef(new Set),S=u.useRef(null),v=ne(()=>{y.current.forEach(C=>{C()})});u.useEffect(()=>{if(typeof ResizeObserver>"u")return;const C=new ResizeObserver(()=>{y.current.size&&v()});return S.current=C,b&&C.observe(b),w.current.forEach(O=>{C.observe(O)}),()=>{C.disconnect(),S.current=null}},[b,v]);const R=ne(C=>(y.current.add(C),()=>{y.current.delete(C)})),I=ne(C=>{var O;return w.current.add(C),(O=S.current)==null||O.observe(C),()=>{var k;w.current.delete(C),(k=S.current)==null||k.unobserve(C)}}),E=Eh(f,d,b,a),T=ne((C,O)=>{if(C!==f){const k=E(C);O.activationDirection=k,l(C,O)}}),V={orientation:d,tabActivationDirection:h},_={"aria-orientation":d==="vertical"?"vertical":void 0,role:"tablist"},M=u.useMemo(()=>({activateOnFocus:o,highlightedTabIndex:p,registerIndicatorUpdateListener:R,registerTabResizeObserverElement:I,onTabActivation:T,setHighlightedTabIndex:m,tabsListElement:b}),[o,p,R,I,T,m,b]);return ie.jsx(pa.Provider,{value:M,children:ie.jsx(Sh,{render:i,className:r,state:V,refs:[n,x],props:[_,c],stateAttributesMapping:Fs,highlightedIndex:p,enableHomeAndEndKeys:!0,loopFocus:s,orientation:d,onHighlightedIndexChange:m,onMapChange:g,disabledIndices:Jt})})});function Ui(e,t){const{left:n,top:o}=e.getBoundingClientRect(),{left:r,top:s}=t.getBoundingClientRect(),i=n-r,c=o-s;return{left:i,top:c}}function Eh(e,t,n,o){const[r,s]=u.useState(null);return J(()=>{if(e==null||n==null){s(null);return}const i=o(e);if(i==null){s(null);return}const{left:c,top:a}=Ui(i,n);s(t==="horizontal"?c:a)},[t,o,n,e]),u.useCallback(i=>{if(i===e)return"none";if(i==null)return s(null),"none";if(i!=null&&n!=null){const c=o(i);if(c!=null){const{left:a,top:l}=Ui(c,n);if(r==null)return s(t==="horizontal"?a:l),"none";if(t==="horizontal"){if(a<r)return s(a),"left";if(a>r)return s(a),"right"}else{if(l<r)return s(l),"up";if(l>r)return s(l),"down"}}}return"none"},[o,t,r,n,e])}const ga=u.createContext(void 0);function io(e){const t=u.useContext(ga);if(t===void 0&&!e)throw new Error(Be(72));return t}const Ch={...Rs,disabled:ee(e=>e.disabled),instantType:ee(e=>e.instantType),isInstantPhase:ee(e=>e.isInstantPhase),trackCursorAxis:ee(e=>e.trackCursorAxis),disableHoverablePopup:ee(e=>e.disableHoverablePopup),lastOpenChangeReason:ee(e=>e.openChangeReason),closeOnClick:ee(e=>e.closeOnClick),closeDelay:ee(e=>e.closeDelay),hasViewport:ee(e=>e.hasViewport)};class Ds extends nr{constructor(n){super({...kh(),...n},{popupRef:u.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:new no},Ch);De(this,"setOpen",(n,o)=>{var l,d;const r=o.reason,s=r===ct,i=n&&r===xn,c=!n&&(r===pn||r===Yo);if(o.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},(d=(l=this.context).onOpenChange)==null||d.call(l,n,o),o.isCanceled)return;const a=()=>{var h;const f={open:n,openChangeReason:r};i?f.instantType="focus":c?f.instantType="dismiss":r===ct&&(f.instantType=void 0);const g=((h=o.trigger)==null?void 0:h.id)??null;(g||n)&&(f.activeTriggerId=g,f.activeTriggerElement=o.trigger??null),this.update(f)};s?xt.flushSync(a):a()})}static useStore(n,o){const r=et(()=>new Ds(o)).current,s=n??r,i=ws({popupStore:s,onOpenChange:s.setOpen});return s.state.floatingRootContext=i,s}}function kh(){return{...xs(),disabled:!1,instantType:void 0,isInstantPhase:!1,trackCursorAxis:"none",disableHoverablePopup:!1,openChangeReason:null,closeOnClick:!0,closeDelay:0,hasViewport:!1}}const Oy=hs(function(t){const{disabled:n=!1,defaultOpen:o=!1,open:r,disableHoverablePopup:s=!1,trackCursorAxis:i="none",actionsRef:c,onOpenChange:a,onOpenChangeComplete:l,handle:d,triggerId:f,defaultTriggerId:g=null,children:h}=t,p=Ds.useStore(d==null?void 0:d.store,{open:o,openProp:r,activeTriggerId:g,triggerIdProp:f});cr(()=>{r===void 0&&p.state.open===!1&&o===!0&&p.update({open:!0,activeTriggerId:g})}),p.useControlledProp("openProp",r),p.useControlledProp("triggerIdProp",f),p.useContextCallback("onOpenChange",a),p.useContextCallback("onOpenChangeComplete",l);const m=p.useState("open"),b=!n&&m,x=p.useState("activeTriggerId"),y=p.useState("payload");p.useSyncedValues({trackCursorAxis:i,disableHoverablePopup:s}),J(()=>{m&&n&&p.setOpen(!1,ge(ud))},[m,n,p]),p.useSyncedValue("disabled",n),ys(p);const{forceUnmount:w,transitionStatus:S}=vs(b,p),v=p.useState("isInstantPhase"),R=p.useState("instantType"),I=p.useState("lastOpenChangeReason"),E=u.useRef(null);J(()=>{S==="ending"&&I===Pt||S!=="ending"&&v?(R!=="delay"&&(E.current=R),p.set("instantType","delay")):E.current!==null&&(p.set("instantType",E.current),E.current=null)},[S,v,I,R,p]),J(()=>{b&&x==null&&p.set("payload",void 0)},[p,x,b]);const T=u.useCallback(()=>{p.setOpen(!1,Th(p,es))},[p]);u.useImperativeHandle(c,()=>({unmount:w,close:T}),[w,T]);const V=p.useState("floatingRootContext"),_=er(V,{enabled:!n,referencePress:()=>p.select("closeOnClick")}),M=Fp(V,{enabled:!n&&i!=="none",axis:i==="none"?void 0:i}),{getReferenceProps:C,getFloatingProps:O,getTriggerProps:k}=oo([_,M]),D=u.useMemo(()=>C(),[C]),P=u.useMemo(()=>k(),[k]),L=u.useMemo(()=>O(),[O]);return p.useSyncedValues({activeTriggerProps:D,inactiveTriggerProps:P,popupProps:L}),ie.jsx(ga.Provider,{value:p,children:typeof h=="function"?h({payload:y}):h})});function Th(e,t){const n=ge(t);return n.preventUnmountOnClose=()=>{e.set("preventUnmountingOnClose",!0)},n}const ma=u.createContext(void 0);function Mh(){return u.useContext(ma)}let Ih=(function(e){return e[e.popupOpen=Oo.popupOpen]="popupOpen",e.triggerDisabled="data-trigger-disabled",e})({});const Ph=600,Ay=Pl(function(t,n){const{className:o,render:r,handle:s,payload:i,disabled:c,delay:a,closeOnClick:l=!0,closeDelay:d,id:f,...g}=t,h=io(!0),p=(s==null?void 0:s.store)??h;if(!p)throw new Error(Be(82));const m=gt(f),b=p.useState("isTriggerActive",m),x=p.useState("isOpenedByTrigger",m),y=p.useState("floatingRootContext"),w=u.useRef(null),S=a??Ph,v=d??0,{registerTrigger:R,isMountedByThisTrigger:I}=Al(m,w,p,{payload:i,closeOnClick:l,closeDelay:v}),E=Mh(),{delayRef:T,isInstantPhase:V,hasProvider:_}=Sp(y,{open:x});p.useSyncedValue("isInstantPhase",V);const M=p.useState("disabled"),C=c??M,O=p.useState("trackCursorAxis"),k=p.useState("disableHoverablePopup"),D=Vl(y,{enabled:!C,mouseOnly:!0,move:!1,handleClose:!k&&O!=="both"?zl():null,restMs(){const U=E==null?void 0:E.delay,H=typeof T.current=="object"?T.current.open:void 0;let ce=S;return _&&(H!==0?ce=a??U??S:ce=0),ce},delay(){const U=typeof T.current=="object"?T.current.close:void 0;let H=v;return d==null&&_&&(H=U),{close:H}},triggerElementRef:w,isActiveTrigger:b}),P=Nl(y,{enabled:!C}).reference,L={open:x},N=p.useState("triggerProps",I);return Se("button",t,{state:L,ref:[n,R,w],props:[D,P,N,{onPointerDown(){p.set("closeOnClick",l)},id:m,[Ih.triggerDisabled]:C?"":void 0},g],stateAttributesMapping:Tc})}),ha=u.createContext(void 0);function Oh(){const e=u.useContext(ha);if(e===void 0)throw new Error(Be(70));return e}const Ah=u.forwardRef(function(t,n){const{children:o,container:r,className:s,render:i,...c}=t,{portalNode:a,portalSubtree:l}=dl({container:r,ref:n,componentProps:t,elementProps:c});return!l&&!a?null:ie.jsxs(u.Fragment,{children:[l,a&&xt.createPortal(o,a)]})}),Ly=u.forwardRef(function(t,n){const{keepMounted:o=!1,...r}=t;return io().useState("mounted")||o?ie.jsx(ha.Provider,{value:o,children:ie.jsx(Ah,{ref:n,...r})}):null}),ba=u.createContext(void 0);function ya(){const e=u.useContext(ba);if(e===void 0)throw new Error(Be(71));return e}const Ny=u.forwardRef(function(t,n){const{render:o,className:r,anchor:s,positionMethod:i="absolute",side:c="top",align:a="center",sideOffset:l=0,alignOffset:d=0,collisionBoundary:f="clipping-ancestors",collisionPadding:g=5,arrowPadding:h=5,sticky:p=!1,disableAnchorTracking:m=!1,collisionAvoidance:b=Ji,...x}=t,y=io(),w=Oh(),S=y.useState("open"),v=y.useState("mounted"),R=y.useState("trackCursorAxis"),I=y.useState("disableHoverablePopup"),E=y.useState("floatingRootContext"),T=y.useState("instantType"),V=y.useState("transitionStatus"),_=y.useState("hasViewport"),M=ks({anchor:s,positionMethod:i,floatingRootContext:E,mounted:v,side:c,sideOffset:l,align:a,alignOffset:d,collisionBoundary:f,collisionPadding:g,sticky:p,arrowPadding:h,disableAnchorTracking:m,keepMounted:w,collisionAvoidance:b,adaptiveOrigin:_?Gl:void 0}),C=u.useMemo(()=>{const P={};return(!S||R==="both"||I)&&(P.pointerEvents="none"),{role:"presentation",hidden:!v,style:{...M.positionerStyles,...P}}},[S,R,I,v,M.positionerStyles]),O=u.useMemo(()=>({open:S,side:M.side,align:M.align,anchorHidden:M.anchorHidden,instant:R!=="none"?"tracking-cursor":T}),[S,M.side,M.align,M.anchorHidden,R,T]),k=u.useMemo(()=>({...O,arrowRef:M.arrowRef,arrowStyles:M.arrowStyles,arrowUncentered:M.arrowUncentered}),[O,M.arrowRef,M.arrowStyles,M.arrowUncentered]),D=Se("div",t,{state:O,props:[C,An(V),x],ref:[n,y.useStateSetter("positionerElement")],stateAttributesMapping:jt});return ie.jsx(ba.Provider,{value:k,children:D})}),Lh={...jt,...St},Fy=u.forwardRef(function(t,n){const{className:o,render:r,...s}=t,i=io(),{side:c,align:a}=ya(),l=i.useState("open"),d=i.useState("instantType"),f=i.useState("transitionStatus"),g=i.useState("popupProps"),h=i.useState("floatingRootContext");mt({open:l,ref:i.context.popupRef,onComplete(){var y,w;l&&((w=(y=i.context).onOpenChangeComplete)==null||w.call(y,!0))}});const p=i.useState("disabled"),m=i.useState("closeDelay");return Dl(h,{enabled:!p,closeDelay:m}),Se("div",t,{state:{open:l,side:c,align:a,instant:d,transitionStatus:f},ref:[n,i.context.popupRef,i.useStateSetter("popupElement")],props:[g,An(f),s],stateAttributesMapping:Lh})}),Dy=u.forwardRef(function(t,n){const{className:o,render:r,...s}=t,c=io().useState("instantType"),{open:a,arrowRef:l,side:d,align:f,arrowUncentered:g,arrowStyles:h}=ya();return Se("div",t,{state:{open:a,side:d,align:f,uncentered:g,instant:c},ref:[n,l],props:[{style:h,"aria-hidden":!0},s],stateAttributesMapping:jt})}),Vy=function(t){const{delay:n,closeDelay:o,timeout:r=400}=t,s=u.useMemo(()=>({delay:n,closeDelay:o}),[n,o]),i=u.useMemo(()=>({open:n,close:o}),[n,o]);return ie.jsx(ma.Provider,{value:s,children:ie.jsx(wp,{delay:i,timeoutMs:r,children:t.children})})},Nh=u.forwardRef(function(t,n){const{render:o,className:r,id:s,name:i,value:c,disabled:a=!1,onValueChange:l,defaultValue:d,autoFocus:f=!1,...g}=t,{state:h,name:p,disabled:m,setTouched:b,setDirty:x,validityData:y,setFocused:w,setFilled:S,validationMode:v,validation:R}=Zn(),I=m||a,E=p??i,T={...h,disabled:I},{labelId:V}=Go(),_=Os({id:s});J(()=>{var L;const P=c!=null;(L=R.inputRef.current)!=null&&L.value||P&&c!==""?S(!0):P&&c===""&&S(!1)},[R.inputRef,S,c]);const M=u.useRef(null);J(()=>{f&&M.current===at(Oe(M.current))&&w(!0)},[f,w]);const[C]=Qt({controlled:c,default:d,name:"FieldControl",state:"value"}),O=c!==void 0,k=O?C:void 0;return Qr({id:_,name:E,commit:R.commit,value:k,getValue:()=>{var P;return(P=R.inputRef.current)==null?void 0:P.value},controlRef:R.inputRef}),Se("input",t,{ref:[n,M],state:T,props:[{id:_,disabled:I,name:E,ref:R.inputRef,"aria-labelledby":V,autoFocus:f,...O?{value:k}:{defaultValue:d},onChange(P){const L=P.currentTarget.value;l==null||l(L,ge(Pt,P.nativeEvent)),x(L!==y.initialValue),S(L!=="")},onFocus(){w(!0)},onBlur(P){b(!0),w(!1),v==="onBlur"&&R.commit(P.currentTarget.value)},onKeyDown(P){P.currentTarget.tagName==="INPUT"&&P.key==="Enter"&&(b(!0),R.commit(P.currentTarget.value))}},R.getInputValidationProps(),g],stateAttributesMapping:qo})}),_y=u.forwardRef(function(t,n){return ie.jsx(Nh,{ref:n,...t})}),va=u.createContext(void 0);function yn(e){const t=u.useContext(va);if(e===!1&&t===void 0)throw new Error(Be(27));return t}const Fh={...jt,...St},Hy=u.forwardRef(function(t,n){const{render:o,className:r,forceRender:s=!1,...i}=t,{store:c}=yn(),a=c.useState("open"),l=c.useState("nested"),d=c.useState("mounted"),f=c.useState("transitionStatus");return Se("div",t,{state:{open:a,transitionStatus:f},ref:[c.context.backdropRef,n],stateAttributesMapping:Fh,props:[{role:"presentation",hidden:!d,style:{userSelect:"none",WebkitUserSelect:"none"}},i],enabled:s||!l})}),By=u.forwardRef(function(t,n){const{render:o,className:r,disabled:s=!1,nativeButton:i=!0,...c}=t,{store:a}=yn(),l=a.useState("open");function d(p){l&&a.setOpen(!1,ge(ad,p.nativeEvent))}const{getButtonProps:f,buttonRef:g}=zt({disabled:s,native:i});return Se("button",t,{state:{disabled:s},ref:[n,g],props:[{onClick:d},c,f]})}),zy=u.forwardRef(function(t,n){const{render:o,className:r,id:s,...i}=t,{store:c}=yn(),a=gt(s);return c.useSyncedValueWithCleanup("descriptionElementId",a),Se("p",t,{ref:n,props:[{id:a},i]})});let Dh=(function(e){return e.nestedDialogs="--nested-dialogs",e})({}),Vh=(function(e){return e[e.open=an.open]="open",e[e.closed=an.closed]="closed",e[e.startingStyle=an.startingStyle]="startingStyle",e[e.endingStyle=an.endingStyle]="endingStyle",e.nested="data-nested",e.nestedDialogOpen="data-nested-dialog-open",e})({});const xa=u.createContext(void 0);function _h(){const e=u.useContext(xa);if(e===void 0)throw new Error(Be(26));return e}const Hh={...jt,...St,nestedDialogOpen(e){return e?{[Vh.nestedDialogOpen]:""}:null}},$y=u.forwardRef(function(t,n){const{className:o,finalFocus:r,initialFocus:s,render:i,...c}=t,{store:a}=yn(),l=a.useState("descriptionElementId"),d=a.useState("disablePointerDismissal"),f=a.useState("floatingRootContext"),g=a.useState("popupProps"),h=a.useState("modal"),p=a.useState("mounted"),m=a.useState("nested"),b=a.useState("nestedOpenDialogCount"),x=a.useState("open"),y=a.useState("openMethod"),w=a.useState("titleElementId"),S=a.useState("transitionStatus"),v=a.useState("role");_h(),mt({open:x,ref:a.context.popupRef,onComplete(){var _,M;x&&((M=(_=a.context).onOpenChangeComplete)==null||M.call(_,!0))}});function R(_){return _==="touch"?a.context.popupRef.current:!0}const I=s===void 0?R:s,E=b>0,V=Se("div",t,{state:{open:x,nested:m,transitionStatus:S,nestedDialogOpen:E},props:[g,{"aria-labelledby":w??void 0,"aria-describedby":l??void 0,role:v,tabIndex:-1,hidden:!p,onKeyDown(_){Cs.has(_.key)&&_.stopPropagation()},style:{[Dh.nestedDialogs]:b}},c],ref:[n,a.context.popupRef,a.useStateSetter("popupElement")],stateAttributesMapping:Hh});return ie.jsx(gs,{context:f,openInteractionType:y,disabled:!p,closeOnFocusOut:!d,initialFocus:I,returnFocus:r,modal:h!==!1,restoreFocus:"popup",children:V})}),jy=u.forwardRef(function(t,n){const{keepMounted:o=!1,...r}=t,{store:s}=yn(),i=s.useState("mounted"),c=s.useState("modal"),a=s.useState("open");return i||o?ie.jsx(xa.Provider,{value:o,children:ie.jsxs(ds,{ref:n,...r,children:[i&&c===!0&&ie.jsx(Ts,{ref:s.context.internalBackdropRef,inert:rr(!a)}),t.children]})}):null});function Bh(e){const{store:t,parentContext:n,actionsRef:o}=e,r=t.useState("open"),s=t.useState("disablePointerDismissal"),i=t.useState("modal"),c=t.useState("popupElement"),{openMethod:a,triggerProps:l}=Is(r);ys(t);const{forceUnmount:d}=vs(r,t),f=ne(T=>{const V=ge(T);return V.preventUnmountOnClose=()=>{t.set("preventUnmountingOnClose",!0)},V}),g=u.useCallback(()=>{t.setOpen(!1,f(es))},[t,f]);u.useImperativeHandle(o,()=>({unmount:d,close:g}),[d,g]);const h=ws({popupStore:t,onOpenChange:t.setOpen,treatPopupAsFloatingElement:!0,noEmit:!0}),[p,m]=u.useState(0),b=p===0,x=Hl(h),y=er(h,{outsidePressEvent(){return t.context.internalBackdropRef.current||t.context.backdropRef.current?"intentional":{mouse:i==="trap-focus"?"sloppy":"intentional",touch:"sloppy"}},outsidePress(T){if(!t.context.outsidePressEnabledRef.current||"button"in T&&T.button!==0||"touches"in T&&T.touches.length!==1)return!1;const V=lt(T);if(b&&!s){const _=V;return i&&(t.context.internalBackdropRef.current||t.context.backdropRef.current)?t.context.internalBackdropRef.current===_||t.context.backdropRef.current===_||we(_,c)&&!(_!=null&&_.hasAttribute("data-base-ui-portal")):!0}return!1},escapeKey:b});Ms(r&&i===!0,c);const{getReferenceProps:w,getFloatingProps:S,getTriggerProps:v}=oo([x,y]);t.useContextCallback("onNestedDialogOpen",T=>{m(T+1)}),t.useContextCallback("onNestedDialogClose",()=>{m(0)}),u.useEffect(()=>(n!=null&&n.onNestedDialogOpen&&r&&n.onNestedDialogOpen(p),n!=null&&n.onNestedDialogClose&&!r&&n.onNestedDialogClose(),()=>{n!=null&&n.onNestedDialogClose&&r&&n.onNestedDialogClose()}),[r,n,p]);const R=u.useMemo(()=>w(l),[w,l]),I=u.useMemo(()=>v(l),[v,l]),E=u.useMemo(()=>S(),[S]);t.useSyncedValues({openMethod:a,activeTriggerProps:R,inactiveTriggerProps:I,popupProps:E,floatingRootContext:h,nestedOpenDialogCount:p})}const zh={...Rs,modal:ee(e=>e.modal),nested:ee(e=>e.nested),nestedOpenDialogCount:ee(e=>e.nestedOpenDialogCount),disablePointerDismissal:ee(e=>e.disablePointerDismissal),openMethod:ee(e=>e.openMethod),descriptionElementId:ee(e=>e.descriptionElementId),titleElementId:ee(e=>e.titleElementId),viewportElement:ee(e=>e.viewportElement),role:ee(e=>e.role)};class $h extends nr{constructor(n){super(jh(n),{popupRef:u.createRef(),backdropRef:u.createRef(),internalBackdropRef:u.createRef(),outsidePressEnabledRef:{current:!0},triggerElements:new no,onOpenChange:void 0,onOpenChangeComplete:void 0},zh);De(this,"setOpen",(n,o)=>{var c,a,l,d;if(o.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},!n&&o.trigger==null&&this.state.activeTriggerId!=null&&(o.trigger=this.state.activeTriggerElement??void 0),(a=(c=this.context).onOpenChange)==null||a.call(c,n,o),o.isCanceled)return;const r={open:n,nativeEvent:o.event,reason:o.reason,nested:this.state.nested};(l=this.state.floatingRootContext.context.events)==null||l.emit("openchange",r);const s={open:n},i=((d=o.trigger)==null?void 0:d.id)??null;(i||n)&&(s.activeTriggerId=i,s.activeTriggerElement=o.trigger??null),this.update(s)})}}function jh(e={}){return{...xs(),modal:!0,disablePointerDismissal:!1,popupElement:null,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,role:"dialog",...e}}function Uy(e){const{children:t,open:n,defaultOpen:o=!1,onOpenChange:r,onOpenChangeComplete:s,disablePointerDismissal:i=!1,modal:c=!0,actionsRef:a,handle:l,triggerId:d,defaultTriggerId:f=null}=e,g=yn(!0),h=!!g,p=et(()=>(l==null?void 0:l.store)??new $h({open:o,openProp:n,activeTriggerId:f,triggerIdProp:d,modal:c,disablePointerDismissal:i,nested:h})).current;cr(()=>{n===void 0&&p.state.open===!1&&o===!0&&p.update({open:!0,activeTriggerId:f})}),p.useControlledProp("openProp",n),p.useControlledProp("triggerIdProp",d),p.useSyncedValues({disablePointerDismissal:i,nested:h,modal:c}),p.useContextCallback("onOpenChange",r),p.useContextCallback("onOpenChangeComplete",s);const m=p.useState("payload");Bh({store:p,actionsRef:a,parentContext:g==null?void 0:g.store.context});const b=u.useMemo(()=>({store:p}),[p]);return ie.jsx(va.Provider,{value:b,children:typeof t=="function"?t({payload:m}):t})}const Wy=u.forwardRef(function(t,n){const{render:o,className:r,id:s,...i}=t,{store:c}=yn(),a=gt(s);return c.useSyncedValueWithCleanup("titleElementId",a),Se("h2",t,{ref:n,props:[{id:a},i]})});export{ub as $,xy as A,Yh as B,Xh as C,ky as D,Ry as E,Sy as F,wy as G,Cy as H,ib as I,Ey as J,Py as K,My as L,uy as M,Iy as N,Vy as O,Oy as P,Ly as Q,Ny as R,py as S,Ty as T,Fy as U,Dy as V,Ay as W,fb as X,db as Y,pb as Z,Yb as _,Gh as a,_y as a0,fy as a1,Uy as a2,$y as a3,By as a4,Zb as a5,Wy as a6,zy as a7,jy as a8,Hy as a9,Ib as aA,vb as aB,Rb as aC,hb as aD,cb as aE,rb as aF,lb as aG,Cb as aH,ab as aI,Db as aJ,Qh as aK,mb as aL,Lb as aM,qb as aN,Ob as aO,Bb as aP,wb as aQ,Fb as aR,zb as aS,kb as aT,Nb as aa,Hb as ab,Tb as ac,Jh as ad,sb as ae,Eb as af,xb as ag,Wb as ah,Ab as ai,Sb as aj,gb as ak,_b as al,Mb as am,eb as an,Kb as ao,Gb as ap,Xb as aq,Vb as ar,jb as as,$b as at,yb as au,Pb as av,tb as aw,Ub as ax,bb as ay,Jb as az,Zh as b,Ka as c,nb as d,Qb as e,ey as f,ty as g,dy as h,sy as i,iy as j,ry as k,cy as l,Zt as m,ly as n,ay as o,ny as p,oy as q,gy as r,hy as s,Kh as t,qh as u,ob as v,my as w,by as x,yy as y,vy as z};
|