brd-ui-kit 0.1.24 → 0.1.26

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/dist/index.cjs CHANGED
@@ -1,80 +1,80 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const v=require("react/jsx-runtime"),Te=require("react"),Nc=require("react-dom");function Pc(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const u=Pc(Te),gn=Pc(Nc);function Oc(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=Oc(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function _c(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Oc(e))&&(r&&(r+=" "),r+=t);return r}const rm=(e,t)=>{const n=new Array(e.length+t.length);for(let r=0;r<e.length;r++)n[r]=e[r];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},om=(e,t)=>({classGroupId:e,validator:t}),Ac=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),uo="-",il=[],sm="arbitrary..",im=e=>{const t=lm(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:i=>{if(i.startsWith("[")&&i.endsWith("]"))return am(i);const a=i.split(uo),l=a[0]===""&&a.length>1?1:0;return Tc(a,l,t)},getConflictingClassGroupIds:(i,a)=>{if(a){const l=r[i],c=n[i];return l?c?rm(c,l):l:c||il}return n[i]||il}}},Tc=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const o=e[t],s=n.nextPart.get(o);if(s){const c=Tc(e,t+1,s);if(c)return c}const i=n.validators;if(i===null)return;const a=t===0?e.join(uo):e.slice(t).join(uo),l=i.length;for(let c=0;c<l;c++){const d=i[c];if(d.validator(a))return d.classGroupId}},am=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),r=t.slice(0,n);return r?sm+r:void 0})(),lm=e=>{const{theme:t,classGroups:n}=e;return cm(n,t)},cm=(e,t)=>{const n=Ac();for(const r in e){const o=e[r];Oi(o,n,r,t)}return n},Oi=(e,t,n,r)=>{const o=e.length;for(let s=0;s<o;s++){const i=e[s];um(i,t,n,r)}},um=(e,t,n,r)=>{if(typeof e=="string"){dm(e,t,n);return}if(typeof e=="function"){fm(e,t,n,r);return}pm(e,t,n,r)},dm=(e,t,n)=>{const r=e===""?t:Mc(t,e);r.classGroupId=n},fm=(e,t,n,r)=>{if(gm(e)){Oi(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(om(n,e))},pm=(e,t,n,r)=>{const o=Object.entries(e),s=o.length;for(let i=0;i<s;i++){const[a,l]=o[i];Oi(l,Mc(t,a),n,r)}},Mc=(e,t)=>{let n=e;const r=t.split(uo),o=r.length;for(let s=0;s<o;s++){const i=r[s];let a=n.nextPart.get(i);a||(a=Ac(),n.nextPart.set(i,a)),n=a}return n},gm=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,mm=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const o=(s,i)=>{n[s]=i,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(s){let i=n[s];if(i!==void 0)return i;if((i=r[s])!==void 0)return o(s,i),i},set(s,i){s in n?n[s]=i:o(s,i)}}},Zs="!",al=":",hm=[],ll=(e,t,n,r,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:o}),bm=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=o=>{const s=[];let i=0,a=0,l=0,c;const d=o.length;for(let m=0;m<d;m++){const b=o[m];if(i===0&&a===0){if(b===al){s.push(o.slice(l,m)),l=m+1;continue}if(b==="/"){c=m;continue}}b==="["?i++:b==="]"?i--:b==="("?a++:b===")"&&a--}const p=s.length===0?o:o.slice(l);let g=p,f=!1;p.endsWith(Zs)?(g=p.slice(0,-1),f=!0):p.startsWith(Zs)&&(g=p.slice(1),f=!0);const h=c&&c>l?c-l:void 0;return ll(s,f,g,h)};if(t){const o=t+al,s=r;r=i=>i.startsWith(o)?s(i.slice(o.length)):ll(hm,!1,i,void 0,!0)}if(n){const o=r;r=s=>n({className:s,parseClassName:o})}return r},vm=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let o=[];for(let s=0;s<n.length;s++){const i=n[s],a=i[0]==="[",l=t.has(i);a||l?(o.length>0&&(o.sort(),r.push(...o),o=[]),r.push(i)):o.push(i)}return o.length>0&&(o.sort(),r.push(...o)),r}},xm=e=>({cache:mm(e.cacheSize),parseClassName:bm(e),sortModifiers:vm(e),...im(e)}),ym=/\s+/,Cm=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:s}=t,i=[],a=e.trim().split(ym);let l="";for(let c=a.length-1;c>=0;c-=1){const d=a[c],{isExternal:p,modifiers:g,hasImportantModifier:f,baseClassName:h,maybePostfixModifierPosition:m}=n(d);if(p){l=d+(l.length>0?" "+l:l);continue}let b=!!m,y=r(b?h.substring(0,m):h);if(!y){if(!b){l=d+(l.length>0?" "+l:l);continue}if(y=r(h),!y){l=d+(l.length>0?" "+l:l);continue}b=!1}const x=g.length===0?"":g.length===1?g[0]:s(g).join(":"),w=f?x+Zs:x,C=w+y;if(i.indexOf(C)>-1)continue;i.push(C);const S=o(y,b);for(let I=0;I<S.length;++I){const E=S[I];i.push(w+E)}l=d+(l.length>0?" "+l:l)}return l},wm=(...e)=>{let t=0,n,r,o="";for(;t<e.length;)(n=e[t++])&&(r=Dc(n))&&(o&&(o+=" "),o+=r);return o},Dc=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Dc(e[r]))&&(n&&(n+=" "),n+=t);return n},cl=(e,...t)=>{let n,r,o,s;const i=l=>{const c=t.reduce((d,p)=>p(d),e());return n=xm(c),r=n.cache.get,o=n.cache.set,s=a,a(l)},a=l=>{const c=r(l);if(c)return c;const d=Cm(l,n);return o(l,d),d};return s=i,(...l)=>s(wm(...l))},Sm=[],Ue=e=>{const t=n=>n[e]||Sm;return t.isThemeGetter=!0,t},Fc=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Vc=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Rm=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Em=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Im=/\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$/,km=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Nm=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Pm=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,en=e=>Rm.test(e),he=e=>!!e&&!Number.isNaN(Number(e)),tn=e=>!!e&&Number.isInteger(Number(e)),ys=e=>e.endsWith("%")&&he(e.slice(0,-1)),$t=e=>Em.test(e),Lc=()=>!0,Om=e=>Im.test(e)&&!km.test(e),_i=()=>!1,_m=e=>Nm.test(e),Am=e=>Pm.test(e),Tm=e=>!J(e)&&!ee(e),Mm=e=>mn(e,zc,_i),J=e=>Fc.test(e),wn=e=>mn(e,Gc,Om),ul=e=>mn(e,Gm,he),Dm=e=>mn(e,Bc,Lc),Fm=e=>mn(e,Hc,_i),dl=e=>mn(e,jc,_i),Vm=e=>mn(e,$c,Am),Dr=e=>mn(e,Wc,_m),ee=e=>Vc.test(e),Jn=e=>On(e,Gc),Lm=e=>On(e,Hc),fl=e=>On(e,jc),jm=e=>On(e,zc),$m=e=>On(e,$c),Fr=e=>On(e,Wc,!0),zm=e=>On(e,Bc,!0),mn=(e,t,n)=>{const r=Fc.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},On=(e,t,n=!1)=>{const r=Vc.exec(e);return r?r[1]?t(r[1]):n:!1},jc=e=>e==="position"||e==="percentage",$c=e=>e==="image"||e==="url",zc=e=>e==="length"||e==="size"||e==="bg-size",Gc=e=>e==="length",Gm=e=>e==="number",Hc=e=>e==="family-name",Bc=e=>e==="number"||e==="weight",Wc=e=>e==="shadow",pl=()=>{const e=Ue("color"),t=Ue("font"),n=Ue("text"),r=Ue("font-weight"),o=Ue("tracking"),s=Ue("leading"),i=Ue("breakpoint"),a=Ue("container"),l=Ue("spacing"),c=Ue("radius"),d=Ue("shadow"),p=Ue("inset-shadow"),g=Ue("text-shadow"),f=Ue("drop-shadow"),h=Ue("blur"),m=Ue("perspective"),b=Ue("aspect"),y=Ue("ease"),x=Ue("animate"),w=()=>["auto","avoid","all","avoid-page","page","left","right","column"],C=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],S=()=>[...C(),ee,J],I=()=>["auto","hidden","clip","visible","scroll"],E=()=>["auto","contain","none"],R=()=>[ee,J,l],F=()=>[en,"full","auto",...R()],N=()=>[tn,"none","subgrid",ee,J],T=()=>["auto",{span:["full",tn,ee,J]},tn,ee,J],_=()=>[tn,"auto",ee,J],q=()=>["auto","min","max","fr",ee,J],Y=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],H=()=>["start","end","center","stretch","center-safe","end-safe"],P=()=>["auto",...R()],B=()=>[en,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...R()],z=()=>[en,"screen","full","dvw","lvw","svw","min","max","fit",...R()],te=()=>[en,"screen","full","lh","dvh","lvh","svh","min","max","fit",...R()],A=()=>[e,ee,J],Re=()=>[...C(),fl,dl,{position:[ee,J]}],ge=()=>["no-repeat",{repeat:["","x","y","space","round"]}],Ce=()=>["auto","cover","contain",jm,Mm,{size:[ee,J]}],ae=()=>[ys,Jn,wn],le=()=>["","none","full",c,ee,J],ve=()=>["",he,Jn,wn],Ee=()=>["solid","dashed","dotted","double"],ke=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],X=()=>[he,ys,fl,dl],me=()=>["","none",h,ee,J],we=()=>["none",he,ee,J],O=()=>["none",he,ee,J],M=()=>[he,ee,J],G=()=>[en,"full",...R()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[$t],breakpoint:[$t],color:[Lc],container:[$t],"drop-shadow":[$t],ease:["in","out","in-out"],font:[Tm],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[$t],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[$t],shadow:[$t],spacing:["px",he],text:[$t],"text-shadow":[$t],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",en,J,ee,b]}],container:["container"],columns:[{columns:[he,J,ee,a]}],"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:S()}],overflow:[{overflow:I()}],"overflow-x":[{"overflow-x":I()}],"overflow-y":[{"overflow-y":I()}],overscroll:[{overscroll:E()}],"overscroll-x":[{"overscroll-x":E()}],"overscroll-y":[{"overscroll-y":E()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:F()}],"inset-x":[{"inset-x":F()}],"inset-y":[{"inset-y":F()}],start:[{"inset-s":F(),start:F()}],end:[{"inset-e":F(),end:F()}],"inset-bs":[{"inset-bs":F()}],"inset-be":[{"inset-be":F()}],top:[{top:F()}],right:[{right:F()}],bottom:[{bottom:F()}],left:[{left:F()}],visibility:["visible","invisible","collapse"],z:[{z:[tn,"auto",ee,J]}],basis:[{basis:[en,"full","auto",a,...R()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[he,en,"auto","initial","none",J]}],grow:[{grow:["",he,ee,J]}],shrink:[{shrink:["",he,ee,J]}],order:[{order:[tn,"first","last","none",ee,J]}],"grid-cols":[{"grid-cols":N()}],"col-start-end":[{col:T()}],"col-start":[{"col-start":_()}],"col-end":[{"col-end":_()}],"grid-rows":[{"grid-rows":N()}],"row-start-end":[{row:T()}],"row-start":[{"row-start":_()}],"row-end":[{"row-end":_()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":q()}],"auto-rows":[{"auto-rows":q()}],gap:[{gap:R()}],"gap-x":[{"gap-x":R()}],"gap-y":[{"gap-y":R()}],"justify-content":[{justify:[...Y(),"normal"]}],"justify-items":[{"justify-items":[...H(),"normal"]}],"justify-self":[{"justify-self":["auto",...H()]}],"align-content":[{content:["normal",...Y()]}],"align-items":[{items:[...H(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...H(),{baseline:["","last"]}]}],"place-content":[{"place-content":Y()}],"place-items":[{"place-items":[...H(),"baseline"]}],"place-self":[{"place-self":["auto",...H()]}],p:[{p:R()}],px:[{px:R()}],py:[{py:R()}],ps:[{ps:R()}],pe:[{pe:R()}],pbs:[{pbs:R()}],pbe:[{pbe:R()}],pt:[{pt:R()}],pr:[{pr:R()}],pb:[{pb:R()}],pl:[{pl:R()}],m:[{m:P()}],mx:[{mx:P()}],my:[{my:P()}],ms:[{ms:P()}],me:[{me:P()}],mbs:[{mbs:P()}],mbe:[{mbe:P()}],mt:[{mt:P()}],mr:[{mr:P()}],mb:[{mb:P()}],ml:[{ml:P()}],"space-x":[{"space-x":R()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":R()}],"space-y-reverse":["space-y-reverse"],size:[{size:B()}],"inline-size":[{inline:["auto",...z()]}],"min-inline-size":[{"min-inline":["auto",...z()]}],"max-inline-size":[{"max-inline":["none",...z()]}],"block-size":[{block:["auto",...te()]}],"min-block-size":[{"min-block":["auto",...te()]}],"max-block-size":[{"max-block":["none",...te()]}],w:[{w:[a,"screen",...B()]}],"min-w":[{"min-w":[a,"screen","none",...B()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[i]},...B()]}],h:[{h:["screen","lh",...B()]}],"min-h":[{"min-h":["screen","lh","none",...B()]}],"max-h":[{"max-h":["screen","lh",...B()]}],"font-size":[{text:["base",n,Jn,wn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,zm,Dm]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",ys,J]}],"font-family":[{font:[Lm,Fm,t]}],"font-features":[{"font-features":[J]}],"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:[o,ee,J]}],"line-clamp":[{"line-clamp":[he,"none",ee,ul]}],leading:[{leading:[s,...R()]}],"list-image":[{"list-image":["none",ee,J]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ee,J]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:A()}],"text-color":[{text:A()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Ee(),"wavy"]}],"text-decoration-thickness":[{decoration:[he,"from-font","auto",ee,wn]}],"text-decoration-color":[{decoration:A()}],"underline-offset":[{"underline-offset":[he,"auto",ee,J]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:R()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ee,J]}],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",ee,J]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:Re()}],"bg-repeat":[{bg:ge()}],"bg-size":[{bg:Ce()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},tn,ee,J],radial:["",ee,J],conic:[tn,ee,J]},$m,Vm]}],"bg-color":[{bg:A()}],"gradient-from-pos":[{from:ae()}],"gradient-via-pos":[{via:ae()}],"gradient-to-pos":[{to:ae()}],"gradient-from":[{from:A()}],"gradient-via":[{via:A()}],"gradient-to":[{to:A()}],rounded:[{rounded:le()}],"rounded-s":[{"rounded-s":le()}],"rounded-e":[{"rounded-e":le()}],"rounded-t":[{"rounded-t":le()}],"rounded-r":[{"rounded-r":le()}],"rounded-b":[{"rounded-b":le()}],"rounded-l":[{"rounded-l":le()}],"rounded-ss":[{"rounded-ss":le()}],"rounded-se":[{"rounded-se":le()}],"rounded-ee":[{"rounded-ee":le()}],"rounded-es":[{"rounded-es":le()}],"rounded-tl":[{"rounded-tl":le()}],"rounded-tr":[{"rounded-tr":le()}],"rounded-br":[{"rounded-br":le()}],"rounded-bl":[{"rounded-bl":le()}],"border-w":[{border:ve()}],"border-w-x":[{"border-x":ve()}],"border-w-y":[{"border-y":ve()}],"border-w-s":[{"border-s":ve()}],"border-w-e":[{"border-e":ve()}],"border-w-bs":[{"border-bs":ve()}],"border-w-be":[{"border-be":ve()}],"border-w-t":[{"border-t":ve()}],"border-w-r":[{"border-r":ve()}],"border-w-b":[{"border-b":ve()}],"border-w-l":[{"border-l":ve()}],"divide-x":[{"divide-x":ve()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ve()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Ee(),"hidden","none"]}],"divide-style":[{divide:[...Ee(),"hidden","none"]}],"border-color":[{border:A()}],"border-color-x":[{"border-x":A()}],"border-color-y":[{"border-y":A()}],"border-color-s":[{"border-s":A()}],"border-color-e":[{"border-e":A()}],"border-color-bs":[{"border-bs":A()}],"border-color-be":[{"border-be":A()}],"border-color-t":[{"border-t":A()}],"border-color-r":[{"border-r":A()}],"border-color-b":[{"border-b":A()}],"border-color-l":[{"border-l":A()}],"divide-color":[{divide:A()}],"outline-style":[{outline:[...Ee(),"none","hidden"]}],"outline-offset":[{"outline-offset":[he,ee,J]}],"outline-w":[{outline:["",he,Jn,wn]}],"outline-color":[{outline:A()}],shadow:[{shadow:["","none",d,Fr,Dr]}],"shadow-color":[{shadow:A()}],"inset-shadow":[{"inset-shadow":["none",p,Fr,Dr]}],"inset-shadow-color":[{"inset-shadow":A()}],"ring-w":[{ring:ve()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:A()}],"ring-offset-w":[{"ring-offset":[he,wn]}],"ring-offset-color":[{"ring-offset":A()}],"inset-ring-w":[{"inset-ring":ve()}],"inset-ring-color":[{"inset-ring":A()}],"text-shadow":[{"text-shadow":["none",g,Fr,Dr]}],"text-shadow-color":[{"text-shadow":A()}],opacity:[{opacity:[he,ee,J]}],"mix-blend":[{"mix-blend":[...ke(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ke()}],"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":[he]}],"mask-image-linear-from-pos":[{"mask-linear-from":X()}],"mask-image-linear-to-pos":[{"mask-linear-to":X()}],"mask-image-linear-from-color":[{"mask-linear-from":A()}],"mask-image-linear-to-color":[{"mask-linear-to":A()}],"mask-image-t-from-pos":[{"mask-t-from":X()}],"mask-image-t-to-pos":[{"mask-t-to":X()}],"mask-image-t-from-color":[{"mask-t-from":A()}],"mask-image-t-to-color":[{"mask-t-to":A()}],"mask-image-r-from-pos":[{"mask-r-from":X()}],"mask-image-r-to-pos":[{"mask-r-to":X()}],"mask-image-r-from-color":[{"mask-r-from":A()}],"mask-image-r-to-color":[{"mask-r-to":A()}],"mask-image-b-from-pos":[{"mask-b-from":X()}],"mask-image-b-to-pos":[{"mask-b-to":X()}],"mask-image-b-from-color":[{"mask-b-from":A()}],"mask-image-b-to-color":[{"mask-b-to":A()}],"mask-image-l-from-pos":[{"mask-l-from":X()}],"mask-image-l-to-pos":[{"mask-l-to":X()}],"mask-image-l-from-color":[{"mask-l-from":A()}],"mask-image-l-to-color":[{"mask-l-to":A()}],"mask-image-x-from-pos":[{"mask-x-from":X()}],"mask-image-x-to-pos":[{"mask-x-to":X()}],"mask-image-x-from-color":[{"mask-x-from":A()}],"mask-image-x-to-color":[{"mask-x-to":A()}],"mask-image-y-from-pos":[{"mask-y-from":X()}],"mask-image-y-to-pos":[{"mask-y-to":X()}],"mask-image-y-from-color":[{"mask-y-from":A()}],"mask-image-y-to-color":[{"mask-y-to":A()}],"mask-image-radial":[{"mask-radial":[ee,J]}],"mask-image-radial-from-pos":[{"mask-radial-from":X()}],"mask-image-radial-to-pos":[{"mask-radial-to":X()}],"mask-image-radial-from-color":[{"mask-radial-from":A()}],"mask-image-radial-to-color":[{"mask-radial-to":A()}],"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":C()}],"mask-image-conic-pos":[{"mask-conic":[he]}],"mask-image-conic-from-pos":[{"mask-conic-from":X()}],"mask-image-conic-to-pos":[{"mask-conic-to":X()}],"mask-image-conic-from-color":[{"mask-conic-from":A()}],"mask-image-conic-to-color":[{"mask-conic-to":A()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:Re()}],"mask-repeat":[{mask:ge()}],"mask-size":[{mask:Ce()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ee,J]}],filter:[{filter:["","none",ee,J]}],blur:[{blur:me()}],brightness:[{brightness:[he,ee,J]}],contrast:[{contrast:[he,ee,J]}],"drop-shadow":[{"drop-shadow":["","none",f,Fr,Dr]}],"drop-shadow-color":[{"drop-shadow":A()}],grayscale:[{grayscale:["",he,ee,J]}],"hue-rotate":[{"hue-rotate":[he,ee,J]}],invert:[{invert:["",he,ee,J]}],saturate:[{saturate:[he,ee,J]}],sepia:[{sepia:["",he,ee,J]}],"backdrop-filter":[{"backdrop-filter":["","none",ee,J]}],"backdrop-blur":[{"backdrop-blur":me()}],"backdrop-brightness":[{"backdrop-brightness":[he,ee,J]}],"backdrop-contrast":[{"backdrop-contrast":[he,ee,J]}],"backdrop-grayscale":[{"backdrop-grayscale":["",he,ee,J]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[he,ee,J]}],"backdrop-invert":[{"backdrop-invert":["",he,ee,J]}],"backdrop-opacity":[{"backdrop-opacity":[he,ee,J]}],"backdrop-saturate":[{"backdrop-saturate":[he,ee,J]}],"backdrop-sepia":[{"backdrop-sepia":["",he,ee,J]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":R()}],"border-spacing-x":[{"border-spacing-x":R()}],"border-spacing-y":[{"border-spacing-y":R()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ee,J]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[he,"initial",ee,J]}],ease:[{ease:["linear","initial",y,ee,J]}],delay:[{delay:[he,ee,J]}],animate:[{animate:["none",x,ee,J]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[m,ee,J]}],"perspective-origin":[{"perspective-origin":S()}],rotate:[{rotate:we()}],"rotate-x":[{"rotate-x":we()}],"rotate-y":[{"rotate-y":we()}],"rotate-z":[{"rotate-z":we()}],scale:[{scale:O()}],"scale-x":[{"scale-x":O()}],"scale-y":[{"scale-y":O()}],"scale-z":[{"scale-z":O()}],"scale-3d":["scale-3d"],skew:[{skew:M()}],"skew-x":[{"skew-x":M()}],"skew-y":[{"skew-y":M()}],transform:[{transform:[ee,J,"","none","gpu","cpu"]}],"transform-origin":[{origin:S()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:G()}],"translate-x":[{"translate-x":G()}],"translate-y":[{"translate-y":G()}],"translate-z":[{"translate-z":G()}],"translate-none":["translate-none"],accent:[{accent:A()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:A()}],"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",ee,J]}],"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":R()}],"scroll-mx":[{"scroll-mx":R()}],"scroll-my":[{"scroll-my":R()}],"scroll-ms":[{"scroll-ms":R()}],"scroll-me":[{"scroll-me":R()}],"scroll-mbs":[{"scroll-mbs":R()}],"scroll-mbe":[{"scroll-mbe":R()}],"scroll-mt":[{"scroll-mt":R()}],"scroll-mr":[{"scroll-mr":R()}],"scroll-mb":[{"scroll-mb":R()}],"scroll-ml":[{"scroll-ml":R()}],"scroll-p":[{"scroll-p":R()}],"scroll-px":[{"scroll-px":R()}],"scroll-py":[{"scroll-py":R()}],"scroll-ps":[{"scroll-ps":R()}],"scroll-pe":[{"scroll-pe":R()}],"scroll-pbs":[{"scroll-pbs":R()}],"scroll-pbe":[{"scroll-pbe":R()}],"scroll-pt":[{"scroll-pt":R()}],"scroll-pr":[{"scroll-pr":R()}],"scroll-pb":[{"scroll-pb":R()}],"scroll-pl":[{"scroll-pl":R()}],"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",ee,J]}],fill:[{fill:["none",...A()]}],"stroke-w":[{stroke:[he,Jn,wn,ul]}],stroke:[{stroke:["none",...A()]}],"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"]}},Hm=(e,{cacheSize:t,prefix:n,experimentalParseClassName:r,extend:o={},override:s={}})=>(or(e,"cacheSize",t),or(e,"prefix",n),or(e,"experimentalParseClassName",r),Vr(e.theme,s.theme),Vr(e.classGroups,s.classGroups),Vr(e.conflictingClassGroups,s.conflictingClassGroups),Vr(e.conflictingClassGroupModifiers,s.conflictingClassGroupModifiers),or(e,"orderSensitiveModifiers",s.orderSensitiveModifiers),Lr(e.theme,o.theme),Lr(e.classGroups,o.classGroups),Lr(e.conflictingClassGroups,o.conflictingClassGroups),Lr(e.conflictingClassGroupModifiers,o.conflictingClassGroupModifiers),Uc(e,o,"orderSensitiveModifiers"),e),or=(e,t,n)=>{n!==void 0&&(e[t]=n)},Vr=(e,t)=>{if(t)for(const n in t)or(e,n,t[n])},Lr=(e,t)=>{if(t)for(const n in t)Uc(e,t,n)},Uc=(e,t,n)=>{const r=t[n];r!==void 0&&(e[n]=e[n]?e[n].concat(r):r)},Bm=(e,...t)=>typeof e=="function"?cl(pl,e,...t):cl(()=>Hm(pl(),e),...t),Wm=Bm({extend:{theme:{text:["xxs","xxl","h-xs","h-sm","h-md","h-lg","h-xl","h-xxl"]}}});function L(...e){return Wm(_c(e))}const gl=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,ml=_c,_e=(e,t)=>n=>{var r;if(t?.variants==null)return ml(e,n?.class,n?.className);const{variants:o,defaultVariants:s}=t,i=Object.keys(o).map(c=>{const d=n?.[c],p=s?.[c];if(d===null)return null;const g=gl(d)||gl(p);return o[c][g]}),a=n&&Object.entries(n).reduce((c,d)=>{let[p,g]=d;return g===void 0||(c[p]=g),c},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((c,d)=>{let{class:p,className:g,...f}=d;return Object.entries(f).every(h=>{let[m,b]=h;return Array.isArray(b)?b.includes({...s,...a}[m]):{...s,...a}[m]===b})?[...c,p,g]:c},[]);return ml(e,i,l,n?.class,n?.className)},Um=["h-xxl-regular","h-xxl-medium","h-xl-regular","h-xl-medium","h-lg-regular","h-lg-medium","h-md-regular","h-md-medium","h-sm-regular","h-sm-medium","h-xs-regular","h-xs-medium","body-xxl-regular","body-xxl-medium","body-xxl-semibold","body-xl-regular","body-xl-medium","body-xl-semibold","body-lg-regular","body-lg-medium","body-lg-semibold","body-md-regular","body-md-medium","body-md-semibold","body-sm-regular","body-sm-medium","body-sm-semibold","body-xs-regular","body-xs-medium","body-xs-semibold","body-xxs-regular","body-xxs-medium","body-xxs-semibold"],qm={"h-xxl-regular":"text-h-xxl font-normal","h-xxl-medium":"text-h-xxl font-medium","h-xl-regular":"text-h-xl font-normal","h-xl-medium":"text-h-xl font-medium","h-lg-regular":"text-h-lg font-normal","h-lg-medium":"text-h-lg font-medium","h-md-regular":"text-h-md font-normal","h-md-medium":"text-h-md font-medium","h-sm-regular":"text-h-sm font-normal","h-sm-medium":"text-h-sm font-medium","h-xs-regular":"text-h-xs font-normal","h-xs-medium":"text-h-xs font-medium","body-xxl-regular":"text-xxl font-normal","body-xxl-medium":"text-xxl font-medium","body-xxl-semibold":"text-xxl font-semibold","body-xl-regular":"text-xl font-normal","body-xl-medium":"text-xl font-medium","body-xl-semibold":"text-xl font-semibold","body-lg-regular":"text-lg font-normal","body-lg-medium":"text-lg font-medium","body-lg-semibold":"text-lg font-semibold","body-md-regular":"text-base font-normal","body-md-medium":"text-base font-medium","body-md-semibold":"text-base font-semibold","body-sm-regular":"text-sm font-normal","body-sm-medium":"text-sm font-medium","body-sm-semibold":"text-sm font-semibold","body-xs-regular":"text-xs font-normal","body-xs-medium":"text-xs font-medium","body-xs-semibold":"text-xs font-semibold","body-xxs-regular":"text-xxs font-normal","body-xxs-medium":"text-xxs font-medium","body-xxs-semibold":"text-xxs font-semibold"},Ai=_e("tracking-normal",{variants:{variant:qm},defaultVariants:{variant:"body-md-regular"}}),qe=(e="body-md-regular")=>Ai({variant:e}),Km=e=>e.startsWith("h-xxl")?"h1":e.startsWith("h-xl")?"h2":e.startsWith("h-lg")?"h3":e.startsWith("h-md")?"h4":e.startsWith("h-sm")?"h5":e.startsWith("h-xs")?"h6":"p",Qs=({as:e,className:t,variant:n,...r})=>{const o=n??"body-md-regular",s=e??Km(o);return u.createElement(s,{...r,className:L(Ai({variant:o}),t)})},Ti=_e(`inline-flex items-center justify-center gap-2 px-2 transition-colors
2
- focus:outline-none`,{variants:{variant:{waiting:"bg-warning-bg text-warning-text",in_progress:"bg-success-bg text-success-text",negotiation:"bg-negotiation-bg text-negotiation-text",documents:"bg-invalid-bg text-invalid-text",new:"bg-info-new-bg text-info-new-text",followup:"bg-follow-up-bg text-follow-up-text",interested:"bg-warning-bg text-warning-text",proposal:"bg-proposal-bg text-proposal-text",action_required:"bg-error-bg text-error-text",contract:"bg-contract-bg text-contract-text",completed:"bg-success-bg text-success-text",invalid:"bg-invalid-bg text-invalid-text"},kind:{status:"rounded-[0.875rem] py-1",priority:"rounded py-1"},dotPosition:{left:"py-1.5",right:"flex-row-reverse py-1.5"}},defaultVariants:{variant:"waiting",kind:"status"}}),Ym=_e("tracking-normal whitespace-nowrap",{variants:{kind:{status:qe("body-xs-medium"),priority:qe("body-sm-regular")}},defaultVariants:{kind:"status"}});function Js({variant:e,kind:t="status",dotPosition:n,classNames:r={},children:o,...s}){const i=!!n,{className:a,dotClassName:l,labelClassName:c}=r;return v.jsxs("div",{className:L(Ti({variant:e,kind:t,dotPosition:n}),a),...s,children:[i&&v.jsx("span",{className:L("inline-block h-2 w-2 rounded-full bg-current",l),"aria-hidden":"true"}),v.jsx("span",{className:L(Ym({kind:t}),c),children:o})]})}function hl(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Mi(...e){return t=>{let n=!1;const r=e.map(o=>{const s=hl(o,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let o=0;o<r.length;o++){const s=r[o];typeof s=="function"?s():hl(e[o],null)}}}}function He(...e){return u.useCallback(Mi(...e),e)}var Xm=Symbol.for("react.lazy"),fo=u[" use ".trim().toString()];function Zm(e){return typeof e=="object"&&e!==null&&"then"in e}function qc(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===Xm&&"_payload"in e&&Zm(e._payload)}function Kc(e){const t=Jm(e),n=u.forwardRef((r,o)=>{let{children:s,...i}=r;qc(s)&&typeof fo=="function"&&(s=fo(s._payload));const a=u.Children.toArray(s),l=a.find(th);if(l){const c=l.props.children,d=a.map(p=>p===l?u.Children.count(c)>1?u.Children.only(null):u.isValidElement(c)?c.props.children:null:p);return v.jsx(t,{...i,ref:o,children:u.isValidElement(c)?u.cloneElement(c,void 0,d):null})}return v.jsx(t,{...i,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}var Qm=Kc("Slot");function Jm(e){const t=u.forwardRef((n,r)=>{let{children:o,...s}=n;if(qc(o)&&typeof fo=="function"&&(o=fo(o._payload)),u.isValidElement(o)){const i=rh(o),a=nh(s,o.props);return o.type!==u.Fragment&&(a.ref=r?Mi(r,i):i),u.cloneElement(o,a)}return u.Children.count(o)>1?u.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var eh=Symbol("radix.slottable");function th(e){return u.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===eh}function nh(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...a)=>{const l=s(...a);return o(...a),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function rh(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}const Di=_e(["inline-flex cursor-pointer items-center justify-center rounded-xl font-medium tracking-normal whitespace-nowrap transition-colors","[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg]:origin-center","disabled:bg-disabled-bg disabled:text-disabled-text disabled:pointer-events-none"].join(" "),{variants:{variant:{primary:`bg-primary-inverse-bg text-primary-inverse-text
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const C=require("react/jsx-runtime"),A=require("react"),nc=require("react-dom");function OS(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const v=OS(A),go=OS(nc);function PS(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=PS(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Ue(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=PS(e))&&(r&&(r+=" "),r+=t);return r}const sT=(e,t)=>{const n=new Array(e.length+t.length);for(let r=0;r<e.length;r++)n[r]=e[r];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},lT=(e,t)=>({classGroupId:e,validator:t}),_S=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Bl="-",vy=[],uT="arbitrary..",cT=e=>{const t=dT(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{if(a.startsWith("[")&&a.endsWith("]"))return fT(a);const s=a.split(Bl),l=s[0]===""&&s.length>1?1:0;return AS(s,l,t)},getConflictingClassGroupIds:(a,s)=>{if(s){const l=r[a],u=n[a];return l?u?sT(u,l):l:u||vy}return n[a]||vy}}},AS=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const o=e[t],i=n.nextPart.get(o);if(i){const u=AS(e,t+1,i);if(u)return u}const a=n.validators;if(a===null)return;const s=t===0?e.join(Bl):e.slice(t).join(Bl),l=a.length;for(let u=0;u<l;u++){const c=a[u];if(c.validator(s))return c.classGroupId}},fT=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),r=t.slice(0,n);return r?uT+r:void 0})(),dT=e=>{const{theme:t,classGroups:n}=e;return pT(n,t)},pT=(e,t)=>{const n=_S();for(const r in e){const o=e[r];um(o,n,r,t)}return n},um=(e,t,n,r)=>{const o=e.length;for(let i=0;i<o;i++){const a=e[i];hT(a,t,n,r)}},hT=(e,t,n,r)=>{if(typeof e=="string"){mT(e,t,n);return}if(typeof e=="function"){gT(e,t,n,r);return}vT(e,t,n,r)},mT=(e,t,n)=>{const r=e===""?t:RS(t,e);r.classGroupId=n},gT=(e,t,n,r)=>{if(yT(e)){um(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(lT(n,e))},vT=(e,t,n,r)=>{const o=Object.entries(e),i=o.length;for(let a=0;a<i;a++){const[s,l]=o[a];um(l,RS(t,s),n,r)}},RS=(e,t)=>{let n=e;const r=t.split(Bl),o=r.length;for(let i=0;i<o;i++){const a=r[i];let s=n.nextPart.get(a);s||(s=_S(),n.nextPart.set(a,s)),n=s}return n},yT=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,bT=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const o=(i,a)=>{n[i]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(i){let a=n[i];if(a!==void 0)return a;if((a=r[i])!==void 0)return o(i,a),a},set(i,a){i in n?n[i]=a:o(i,a)}}},Tp="!",yy=":",xT=[],by=(e,t,n,r,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:o}),wT=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=o=>{const i=[];let a=0,s=0,l=0,u;const c=o.length;for(let g=0;g<c;g++){const h=o[g];if(a===0&&s===0){if(h===yy){i.push(o.slice(l,g)),l=g+1;continue}if(h==="/"){u=g;continue}}h==="["?a++:h==="]"?a--:h==="("?s++:h===")"&&s--}const f=i.length===0?o:o.slice(l);let p=f,d=!1;f.endsWith(Tp)?(p=f.slice(0,-1),d=!0):f.startsWith(Tp)&&(p=f.slice(1),d=!0);const m=u&&u>l?u-l:void 0;return by(i,d,p,m)};if(t){const o=t+yy,i=r;r=a=>a.startsWith(o)?i(a.slice(o.length)):by(xT,!1,a,void 0,!0)}if(n){const o=r;r=i=>n({className:i,parseClassName:o})}return r},CT=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let o=[];for(let i=0;i<n.length;i++){const a=n[i],s=a[0]==="[",l=t.has(a);s||l?(o.length>0&&(o.sort(),r.push(...o),o=[]),r.push(a)):o.push(a)}return o.length>0&&(o.sort(),r.push(...o)),r}},ST=e=>({cache:bT(e.cacheSize),parseClassName:wT(e),sortModifiers:CT(e),...cT(e)}),ET=/\s+/,OT=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:i}=t,a=[],s=e.trim().split(ET);let l="";for(let u=s.length-1;u>=0;u-=1){const c=s[u],{isExternal:f,modifiers:p,hasImportantModifier:d,baseClassName:m,maybePostfixModifierPosition:g}=n(c);if(f){l=c+(l.length>0?" "+l:l);continue}let h=!!g,y=r(h?m.substring(0,g):m);if(!y){if(!h){l=c+(l.length>0?" "+l:l);continue}if(y=r(m),!y){l=c+(l.length>0?" "+l:l);continue}h=!1}const b=p.length===0?"":p.length===1?p[0]:i(p).join(":"),x=d?b+Tp:b,w=x+y;if(a.indexOf(w)>-1)continue;a.push(w);const S=o(y,h);for(let E=0;E<S.length;++E){const O=S[E];a.push(x+O)}l=c+(l.length>0?" "+l:l)}return l},PT=(...e)=>{let t=0,n,r,o="";for(;t<e.length;)(n=e[t++])&&(r=IS(n))&&(o&&(o+=" "),o+=r);return o},IS=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=IS(e[r]))&&(n&&(n+=" "),n+=t);return n},xy=(e,...t)=>{let n,r,o,i;const a=l=>{const u=t.reduce((c,f)=>f(c),e());return n=ST(u),r=n.cache.get,o=n.cache.set,i=s,s(l)},s=l=>{const u=r(l);if(u)return u;const c=OT(l,n);return o(l,c),c};return i=a,(...l)=>i(PT(...l))},_T=[],pt=e=>{const t=n=>n[e]||_T;return t.isThemeGetter=!0,t},kS=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,NS=/^\((?:(\w[\w-]*):)?(.+)\)$/i,AT=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,RT=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,IT=/\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$/,kT=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,NT=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,TT=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,qr=e=>AT.test(e),_e=e=>!!e&&!Number.isNaN(Number(e)),Kr=e=>!!e&&Number.isInteger(Number(e)),kf=e=>e.endsWith("%")&&_e(e.slice(0,-1)),pr=e=>RT.test(e),TS=()=>!0,MT=e=>IT.test(e)&&!kT.test(e),cm=()=>!1,DT=e=>NT.test(e),jT=e=>TT.test(e),$T=e=>!se(e)&&!ue(e),LT=e=>vo(e,jS,cm),se=e=>kS.test(e),_o=e=>vo(e,$S,MT),wy=e=>vo(e,UT,_e),FT=e=>vo(e,FS,TS),VT=e=>vo(e,LS,cm),Cy=e=>vo(e,MS,cm),zT=e=>vo(e,DS,jT),Hs=e=>vo(e,VS,DT),ue=e=>NS.test(e),ca=e=>oi(e,$S),BT=e=>oi(e,LS),Sy=e=>oi(e,MS),HT=e=>oi(e,jS),GT=e=>oi(e,DS),Gs=e=>oi(e,VS,!0),WT=e=>oi(e,FS,!0),vo=(e,t,n)=>{const r=kS.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},oi=(e,t,n=!1)=>{const r=NS.exec(e);return r?r[1]?t(r[1]):n:!1},MS=e=>e==="position"||e==="percentage",DS=e=>e==="image"||e==="url",jS=e=>e==="length"||e==="size"||e==="bg-size",$S=e=>e==="length",UT=e=>e==="number",LS=e=>e==="family-name",FS=e=>e==="number"||e==="weight",VS=e=>e==="shadow",Ey=()=>{const e=pt("color"),t=pt("font"),n=pt("text"),r=pt("font-weight"),o=pt("tracking"),i=pt("leading"),a=pt("breakpoint"),s=pt("container"),l=pt("spacing"),u=pt("radius"),c=pt("shadow"),f=pt("inset-shadow"),p=pt("text-shadow"),d=pt("drop-shadow"),m=pt("blur"),g=pt("perspective"),h=pt("aspect"),y=pt("ease"),b=pt("animate"),x=()=>["auto","avoid","all","avoid-page","page","left","right","column"],w=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],S=()=>[...w(),ue,se],E=()=>["auto","hidden","clip","visible","scroll"],O=()=>["auto","contain","none"],P=()=>[ue,se,l],N=()=>[qr,"full","auto",...P()],R=()=>[Kr,"none","subgrid",ue,se],k=()=>["auto",{span:["full",Kr,ue,se]},Kr,ue,se],_=()=>[Kr,"auto",ue,se],T=()=>["auto","min","max","fr",ue,se],F=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],V=()=>["start","end","center","stretch","center-safe","end-safe"],D=()=>["auto",...P()],B=()=>[qr,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...P()],z=()=>[qr,"screen","full","dvw","lvw","svw","min","max","fit",...P()],Y=()=>[qr,"screen","full","lh","dvh","lvh","svh","min","max","fit",...P()],$=()=>[e,ue,se],ye=()=>[...w(),Sy,Cy,{position:[ue,se]}],ae=()=>["no-repeat",{repeat:["","x","y","space","round"]}],be=()=>["auto","cover","contain",HT,LT,{size:[ue,se]}],ne=()=>[kf,ca,_o],le=()=>["","none","full",u,ue,se],Ee=()=>["",_e,ca,_o],Pe=()=>["solid","dashed","dotted","double"],Se=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],L=()=>[_e,kf,Sy,Cy],U=()=>["","none",m,ue,se],G=()=>["none",_e,ue,se],I=()=>["none",_e,ue,se],W=()=>[_e,ue,se],H=()=>[qr,"full",...P()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[pr],breakpoint:[pr],color:[TS],container:[pr],"drop-shadow":[pr],ease:["in","out","in-out"],font:[$T],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[pr],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[pr],shadow:[pr],spacing:["px",_e],text:[pr],"text-shadow":[pr],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",qr,se,ue,h]}],container:["container"],columns:[{columns:[_e,se,ue,s]}],"break-after":[{"break-after":x()}],"break-before":[{"break-before":x()}],"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:S()}],overflow:[{overflow:E()}],"overflow-x":[{"overflow-x":E()}],"overflow-y":[{"overflow-y":E()}],overscroll:[{overscroll:O()}],"overscroll-x":[{"overscroll-x":O()}],"overscroll-y":[{"overscroll-y":O()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:N()}],"inset-x":[{"inset-x":N()}],"inset-y":[{"inset-y":N()}],start:[{"inset-s":N(),start:N()}],end:[{"inset-e":N(),end:N()}],"inset-bs":[{"inset-bs":N()}],"inset-be":[{"inset-be":N()}],top:[{top:N()}],right:[{right:N()}],bottom:[{bottom:N()}],left:[{left:N()}],visibility:["visible","invisible","collapse"],z:[{z:[Kr,"auto",ue,se]}],basis:[{basis:[qr,"full","auto",s,...P()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[_e,qr,"auto","initial","none",se]}],grow:[{grow:["",_e,ue,se]}],shrink:[{shrink:["",_e,ue,se]}],order:[{order:[Kr,"first","last","none",ue,se]}],"grid-cols":[{"grid-cols":R()}],"col-start-end":[{col:k()}],"col-start":[{"col-start":_()}],"col-end":[{"col-end":_()}],"grid-rows":[{"grid-rows":R()}],"row-start-end":[{row:k()}],"row-start":[{"row-start":_()}],"row-end":[{"row-end":_()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":T()}],"auto-rows":[{"auto-rows":T()}],gap:[{gap:P()}],"gap-x":[{"gap-x":P()}],"gap-y":[{"gap-y":P()}],"justify-content":[{justify:[...F(),"normal"]}],"justify-items":[{"justify-items":[...V(),"normal"]}],"justify-self":[{"justify-self":["auto",...V()]}],"align-content":[{content:["normal",...F()]}],"align-items":[{items:[...V(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...V(),{baseline:["","last"]}]}],"place-content":[{"place-content":F()}],"place-items":[{"place-items":[...V(),"baseline"]}],"place-self":[{"place-self":["auto",...V()]}],p:[{p:P()}],px:[{px:P()}],py:[{py:P()}],ps:[{ps:P()}],pe:[{pe:P()}],pbs:[{pbs:P()}],pbe:[{pbe:P()}],pt:[{pt:P()}],pr:[{pr:P()}],pb:[{pb:P()}],pl:[{pl:P()}],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":P()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":P()}],"space-y-reverse":["space-y-reverse"],size:[{size:B()}],"inline-size":[{inline:["auto",...z()]}],"min-inline-size":[{"min-inline":["auto",...z()]}],"max-inline-size":[{"max-inline":["none",...z()]}],"block-size":[{block:["auto",...Y()]}],"min-block-size":[{"min-block":["auto",...Y()]}],"max-block-size":[{"max-block":["none",...Y()]}],w:[{w:[s,"screen",...B()]}],"min-w":[{"min-w":[s,"screen","none",...B()]}],"max-w":[{"max-w":[s,"screen","none","prose",{screen:[a]},...B()]}],h:[{h:["screen","lh",...B()]}],"min-h":[{"min-h":["screen","lh","none",...B()]}],"max-h":[{"max-h":["screen","lh",...B()]}],"font-size":[{text:["base",n,ca,_o]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,WT,FT]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",kf,se]}],"font-family":[{font:[BT,VT,t]}],"font-features":[{"font-features":[se]}],"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:[o,ue,se]}],"line-clamp":[{"line-clamp":[_e,"none",ue,wy]}],leading:[{leading:[i,...P()]}],"list-image":[{"list-image":["none",ue,se]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ue,se]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:$()}],"text-color":[{text:$()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Pe(),"wavy"]}],"text-decoration-thickness":[{decoration:[_e,"from-font","auto",ue,_o]}],"text-decoration-color":[{decoration:$()}],"underline-offset":[{"underline-offset":[_e,"auto",ue,se]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:P()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ue,se]}],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,se]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:ye()}],"bg-repeat":[{bg:ae()}],"bg-size":[{bg:be()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Kr,ue,se],radial:["",ue,se],conic:[Kr,ue,se]},GT,zT]}],"bg-color":[{bg:$()}],"gradient-from-pos":[{from:ne()}],"gradient-via-pos":[{via:ne()}],"gradient-to-pos":[{to:ne()}],"gradient-from":[{from:$()}],"gradient-via":[{via:$()}],"gradient-to":[{to:$()}],rounded:[{rounded:le()}],"rounded-s":[{"rounded-s":le()}],"rounded-e":[{"rounded-e":le()}],"rounded-t":[{"rounded-t":le()}],"rounded-r":[{"rounded-r":le()}],"rounded-b":[{"rounded-b":le()}],"rounded-l":[{"rounded-l":le()}],"rounded-ss":[{"rounded-ss":le()}],"rounded-se":[{"rounded-se":le()}],"rounded-ee":[{"rounded-ee":le()}],"rounded-es":[{"rounded-es":le()}],"rounded-tl":[{"rounded-tl":le()}],"rounded-tr":[{"rounded-tr":le()}],"rounded-br":[{"rounded-br":le()}],"rounded-bl":[{"rounded-bl":le()}],"border-w":[{border:Ee()}],"border-w-x":[{"border-x":Ee()}],"border-w-y":[{"border-y":Ee()}],"border-w-s":[{"border-s":Ee()}],"border-w-e":[{"border-e":Ee()}],"border-w-bs":[{"border-bs":Ee()}],"border-w-be":[{"border-be":Ee()}],"border-w-t":[{"border-t":Ee()}],"border-w-r":[{"border-r":Ee()}],"border-w-b":[{"border-b":Ee()}],"border-w-l":[{"border-l":Ee()}],"divide-x":[{"divide-x":Ee()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":Ee()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Pe(),"hidden","none"]}],"divide-style":[{divide:[...Pe(),"hidden","none"]}],"border-color":[{border:$()}],"border-color-x":[{"border-x":$()}],"border-color-y":[{"border-y":$()}],"border-color-s":[{"border-s":$()}],"border-color-e":[{"border-e":$()}],"border-color-bs":[{"border-bs":$()}],"border-color-be":[{"border-be":$()}],"border-color-t":[{"border-t":$()}],"border-color-r":[{"border-r":$()}],"border-color-b":[{"border-b":$()}],"border-color-l":[{"border-l":$()}],"divide-color":[{divide:$()}],"outline-style":[{outline:[...Pe(),"none","hidden"]}],"outline-offset":[{"outline-offset":[_e,ue,se]}],"outline-w":[{outline:["",_e,ca,_o]}],"outline-color":[{outline:$()}],shadow:[{shadow:["","none",c,Gs,Hs]}],"shadow-color":[{shadow:$()}],"inset-shadow":[{"inset-shadow":["none",f,Gs,Hs]}],"inset-shadow-color":[{"inset-shadow":$()}],"ring-w":[{ring:Ee()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:$()}],"ring-offset-w":[{"ring-offset":[_e,_o]}],"ring-offset-color":[{"ring-offset":$()}],"inset-ring-w":[{"inset-ring":Ee()}],"inset-ring-color":[{"inset-ring":$()}],"text-shadow":[{"text-shadow":["none",p,Gs,Hs]}],"text-shadow-color":[{"text-shadow":$()}],opacity:[{opacity:[_e,ue,se]}],"mix-blend":[{"mix-blend":[...Se(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Se()}],"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":[_e]}],"mask-image-linear-from-pos":[{"mask-linear-from":L()}],"mask-image-linear-to-pos":[{"mask-linear-to":L()}],"mask-image-linear-from-color":[{"mask-linear-from":$()}],"mask-image-linear-to-color":[{"mask-linear-to":$()}],"mask-image-t-from-pos":[{"mask-t-from":L()}],"mask-image-t-to-pos":[{"mask-t-to":L()}],"mask-image-t-from-color":[{"mask-t-from":$()}],"mask-image-t-to-color":[{"mask-t-to":$()}],"mask-image-r-from-pos":[{"mask-r-from":L()}],"mask-image-r-to-pos":[{"mask-r-to":L()}],"mask-image-r-from-color":[{"mask-r-from":$()}],"mask-image-r-to-color":[{"mask-r-to":$()}],"mask-image-b-from-pos":[{"mask-b-from":L()}],"mask-image-b-to-pos":[{"mask-b-to":L()}],"mask-image-b-from-color":[{"mask-b-from":$()}],"mask-image-b-to-color":[{"mask-b-to":$()}],"mask-image-l-from-pos":[{"mask-l-from":L()}],"mask-image-l-to-pos":[{"mask-l-to":L()}],"mask-image-l-from-color":[{"mask-l-from":$()}],"mask-image-l-to-color":[{"mask-l-to":$()}],"mask-image-x-from-pos":[{"mask-x-from":L()}],"mask-image-x-to-pos":[{"mask-x-to":L()}],"mask-image-x-from-color":[{"mask-x-from":$()}],"mask-image-x-to-color":[{"mask-x-to":$()}],"mask-image-y-from-pos":[{"mask-y-from":L()}],"mask-image-y-to-pos":[{"mask-y-to":L()}],"mask-image-y-from-color":[{"mask-y-from":$()}],"mask-image-y-to-color":[{"mask-y-to":$()}],"mask-image-radial":[{"mask-radial":[ue,se]}],"mask-image-radial-from-pos":[{"mask-radial-from":L()}],"mask-image-radial-to-pos":[{"mask-radial-to":L()}],"mask-image-radial-from-color":[{"mask-radial-from":$()}],"mask-image-radial-to-color":[{"mask-radial-to":$()}],"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":w()}],"mask-image-conic-pos":[{"mask-conic":[_e]}],"mask-image-conic-from-pos":[{"mask-conic-from":L()}],"mask-image-conic-to-pos":[{"mask-conic-to":L()}],"mask-image-conic-from-color":[{"mask-conic-from":$()}],"mask-image-conic-to-color":[{"mask-conic-to":$()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:ye()}],"mask-repeat":[{mask:ae()}],"mask-size":[{mask:be()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ue,se]}],filter:[{filter:["","none",ue,se]}],blur:[{blur:U()}],brightness:[{brightness:[_e,ue,se]}],contrast:[{contrast:[_e,ue,se]}],"drop-shadow":[{"drop-shadow":["","none",d,Gs,Hs]}],"drop-shadow-color":[{"drop-shadow":$()}],grayscale:[{grayscale:["",_e,ue,se]}],"hue-rotate":[{"hue-rotate":[_e,ue,se]}],invert:[{invert:["",_e,ue,se]}],saturate:[{saturate:[_e,ue,se]}],sepia:[{sepia:["",_e,ue,se]}],"backdrop-filter":[{"backdrop-filter":["","none",ue,se]}],"backdrop-blur":[{"backdrop-blur":U()}],"backdrop-brightness":[{"backdrop-brightness":[_e,ue,se]}],"backdrop-contrast":[{"backdrop-contrast":[_e,ue,se]}],"backdrop-grayscale":[{"backdrop-grayscale":["",_e,ue,se]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[_e,ue,se]}],"backdrop-invert":[{"backdrop-invert":["",_e,ue,se]}],"backdrop-opacity":[{"backdrop-opacity":[_e,ue,se]}],"backdrop-saturate":[{"backdrop-saturate":[_e,ue,se]}],"backdrop-sepia":[{"backdrop-sepia":["",_e,ue,se]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":P()}],"border-spacing-x":[{"border-spacing-x":P()}],"border-spacing-y":[{"border-spacing-y":P()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ue,se]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[_e,"initial",ue,se]}],ease:[{ease:["linear","initial",y,ue,se]}],delay:[{delay:[_e,ue,se]}],animate:[{animate:["none",b,ue,se]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[g,ue,se]}],"perspective-origin":[{"perspective-origin":S()}],rotate:[{rotate:G()}],"rotate-x":[{"rotate-x":G()}],"rotate-y":[{"rotate-y":G()}],"rotate-z":[{"rotate-z":G()}],scale:[{scale:I()}],"scale-x":[{"scale-x":I()}],"scale-y":[{"scale-y":I()}],"scale-z":[{"scale-z":I()}],"scale-3d":["scale-3d"],skew:[{skew:W()}],"skew-x":[{"skew-x":W()}],"skew-y":[{"skew-y":W()}],transform:[{transform:[ue,se,"","none","gpu","cpu"]}],"transform-origin":[{origin:S()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:H()}],"translate-x":[{"translate-x":H()}],"translate-y":[{"translate-y":H()}],"translate-z":[{"translate-z":H()}],"translate-none":["translate-none"],accent:[{accent:$()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:$()}],"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,se]}],"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":P()}],"scroll-mx":[{"scroll-mx":P()}],"scroll-my":[{"scroll-my":P()}],"scroll-ms":[{"scroll-ms":P()}],"scroll-me":[{"scroll-me":P()}],"scroll-mbs":[{"scroll-mbs":P()}],"scroll-mbe":[{"scroll-mbe":P()}],"scroll-mt":[{"scroll-mt":P()}],"scroll-mr":[{"scroll-mr":P()}],"scroll-mb":[{"scroll-mb":P()}],"scroll-ml":[{"scroll-ml":P()}],"scroll-p":[{"scroll-p":P()}],"scroll-px":[{"scroll-px":P()}],"scroll-py":[{"scroll-py":P()}],"scroll-ps":[{"scroll-ps":P()}],"scroll-pe":[{"scroll-pe":P()}],"scroll-pbs":[{"scroll-pbs":P()}],"scroll-pbe":[{"scroll-pbe":P()}],"scroll-pt":[{"scroll-pt":P()}],"scroll-pr":[{"scroll-pr":P()}],"scroll-pb":[{"scroll-pb":P()}],"scroll-pl":[{"scroll-pl":P()}],"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,se]}],fill:[{fill:["none",...$()]}],"stroke-w":[{stroke:[_e,ca,_o,wy]}],stroke:[{stroke:["none",...$()]}],"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"]}},qT=(e,{cacheSize:t,prefix:n,experimentalParseClassName:r,extend:o={},override:i={}})=>(Pa(e,"cacheSize",t),Pa(e,"prefix",n),Pa(e,"experimentalParseClassName",r),Ws(e.theme,i.theme),Ws(e.classGroups,i.classGroups),Ws(e.conflictingClassGroups,i.conflictingClassGroups),Ws(e.conflictingClassGroupModifiers,i.conflictingClassGroupModifiers),Pa(e,"orderSensitiveModifiers",i.orderSensitiveModifiers),Us(e.theme,o.theme),Us(e.classGroups,o.classGroups),Us(e.conflictingClassGroups,o.conflictingClassGroups),Us(e.conflictingClassGroupModifiers,o.conflictingClassGroupModifiers),zS(e,o,"orderSensitiveModifiers"),e),Pa=(e,t,n)=>{n!==void 0&&(e[t]=n)},Ws=(e,t)=>{if(t)for(const n in t)Pa(e,n,t[n])},Us=(e,t)=>{if(t)for(const n in t)zS(e,t,n)},zS=(e,t,n)=>{const r=t[n];r!==void 0&&(e[n]=e[n]?e[n].concat(r):r)},KT=(e,...t)=>typeof e=="function"?xy(Ey,e,...t):xy(()=>qT(Ey(),e),...t),YT=KT({extend:{theme:{text:["xxs","xxl","h-xs","h-sm","h-md","h-lg","h-xl","h-xxl"]}}});function q(...e){return YT(Ue(e))}const Oy=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Py=Ue,Ve=(e,t)=>n=>{var r;if(t?.variants==null)return Py(e,n?.class,n?.className);const{variants:o,defaultVariants:i}=t,a=Object.keys(o).map(u=>{const c=n?.[u],f=i?.[u];if(c===null)return null;const p=Oy(c)||Oy(f);return o[u][p]}),s=n&&Object.entries(n).reduce((u,c)=>{let[f,p]=c;return p===void 0||(u[f]=p),u},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,c)=>{let{class:f,className:p,...d}=c;return Object.entries(d).every(m=>{let[g,h]=m;return Array.isArray(h)?h.includes({...i,...s}[g]):{...i,...s}[g]===h})?[...u,f,p]:u},[]);return Py(e,a,l,n?.class,n?.className)},XT=["h-xxl-regular","h-xxl-medium","h-xl-regular","h-xl-medium","h-lg-regular","h-lg-medium","h-md-regular","h-md-medium","h-sm-regular","h-sm-medium","h-xs-regular","h-xs-medium","body-xxl-regular","body-xxl-medium","body-xxl-semibold","body-xl-regular","body-xl-medium","body-xl-semibold","body-lg-regular","body-lg-medium","body-lg-semibold","body-md-regular","body-md-medium","body-md-semibold","body-sm-regular","body-sm-medium","body-sm-semibold","body-xs-regular","body-xs-medium","body-xs-semibold","body-xxs-regular","body-xxs-medium","body-xxs-semibold"],ZT={"h-xxl-regular":"text-h-xxl font-normal","h-xxl-medium":"text-h-xxl font-medium","h-xl-regular":"text-h-xl font-normal","h-xl-medium":"text-h-xl font-medium","h-lg-regular":"text-h-lg font-normal","h-lg-medium":"text-h-lg font-medium","h-md-regular":"text-h-md font-normal","h-md-medium":"text-h-md font-medium","h-sm-regular":"text-h-sm font-normal","h-sm-medium":"text-h-sm font-medium","h-xs-regular":"text-h-xs font-normal","h-xs-medium":"text-h-xs font-medium","body-xxl-regular":"text-xxl font-normal","body-xxl-medium":"text-xxl font-medium","body-xxl-semibold":"text-xxl font-semibold","body-xl-regular":"text-xl font-normal","body-xl-medium":"text-xl font-medium","body-xl-semibold":"text-xl font-semibold","body-lg-regular":"text-lg font-normal","body-lg-medium":"text-lg font-medium","body-lg-semibold":"text-lg font-semibold","body-md-regular":"text-base font-normal","body-md-medium":"text-base font-medium","body-md-semibold":"text-base font-semibold","body-sm-regular":"text-sm font-normal","body-sm-medium":"text-sm font-medium","body-sm-semibold":"text-sm font-semibold","body-xs-regular":"text-xs font-normal","body-xs-medium":"text-xs font-medium","body-xs-semibold":"text-xs font-semibold","body-xxs-regular":"text-xxs font-normal","body-xxs-medium":"text-xxs font-medium","body-xxs-semibold":"text-xxs font-semibold"},fm=Ve("tracking-normal",{variants:{variant:ZT},defaultVariants:{variant:"body-md-regular"}}),vt=(e="body-md-regular")=>fm({variant:e}),QT=e=>e.startsWith("h-xxl")?"h1":e.startsWith("h-xl")?"h2":e.startsWith("h-lg")?"h3":e.startsWith("h-md")?"h4":e.startsWith("h-sm")?"h5":e.startsWith("h-xs")?"h6":"p",Mp=({as:e,className:t,variant:n,...r})=>{const o=n??"body-md-regular",i=e??QT(o);return v.createElement(i,{...r,className:q(fm({variant:o}),t)})},dm=Ve(`inline-flex items-center justify-center gap-2 px-2 transition-colors
2
+ focus:outline-none`,{variants:{variant:{waiting:"bg-warning-bg text-warning-text",in_progress:"bg-success-bg text-success-text",negotiation:"bg-negotiation-bg text-negotiation-text",documents:"bg-invalid-bg text-invalid-text",new:"bg-info-new-bg text-info-new-text",followup:"bg-follow-up-bg text-follow-up-text",interested:"bg-warning-bg text-warning-text",proposal:"bg-proposal-bg text-proposal-text",action_required:"bg-error-bg text-error-text",contract:"bg-contract-bg text-contract-text",completed:"bg-success-bg text-success-text",invalid:"bg-invalid-bg text-invalid-text"},kind:{status:"rounded-[0.875rem] py-1",priority:"rounded py-1"},dotPosition:{left:"py-1.5",right:"flex-row-reverse py-1.5"}},defaultVariants:{variant:"waiting",kind:"status"}}),JT=Ve("tracking-normal whitespace-nowrap",{variants:{kind:{status:vt("body-xs-medium"),priority:vt("body-sm-regular")}},defaultVariants:{kind:"status"}});function Dp({variant:e,kind:t="status",dotPosition:n,classNames:r={},children:o,...i}){const a=!!n,{className:s,dotClassName:l,labelClassName:u}=r;return C.jsxs("div",{className:q(dm({variant:e,kind:t,dotPosition:n}),s),...i,children:[a&&C.jsx("span",{className:q("inline-block h-2 w-2 rounded-full bg-current",l),"aria-hidden":"true"}),C.jsx("span",{className:q(JT({kind:t}),u),children:o})]})}function _y(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function pm(...e){return t=>{let n=!1;const r=e.map(o=>{const i=_y(o,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let o=0;o<r.length;o++){const i=r[o];typeof i=="function"?i():_y(e[o],null)}}}}function ut(...e){return v.useCallback(pm(...e),e)}var eM=Symbol.for("react.lazy"),Hl=v[" use ".trim().toString()];function tM(e){return typeof e=="object"&&e!==null&&"then"in e}function BS(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===eM&&"_payload"in e&&tM(e._payload)}function HS(e){const t=rM(e),n=v.forwardRef((r,o)=>{let{children:i,...a}=r;BS(i)&&typeof Hl=="function"&&(i=Hl(i._payload));const s=v.Children.toArray(i),l=s.find(iM);if(l){const u=l.props.children,c=s.map(f=>f===l?v.Children.count(u)>1?v.Children.only(null):v.isValidElement(u)?u.props.children:null:f);return C.jsx(t,{...a,ref:o,children:v.isValidElement(u)?v.cloneElement(u,void 0,c):null})}return C.jsx(t,{...a,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}var nM=HS("Slot");function rM(e){const t=v.forwardRef((n,r)=>{let{children:o,...i}=n;if(BS(o)&&typeof Hl=="function"&&(o=Hl(o._payload)),v.isValidElement(o)){const a=sM(o),s=aM(i,o.props);return o.type!==v.Fragment&&(s.ref=r?pm(r,a):a),v.cloneElement(o,s)}return v.Children.count(o)>1?v.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var oM=Symbol("radix.slottable");function iM(e){return v.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===oM}function aM(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...s)=>{const l=i(...s);return o(...s),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function sM(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}const hm=Ve(["inline-flex cursor-pointer items-center justify-center rounded-xl font-medium tracking-normal whitespace-nowrap transition-colors","[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg]:origin-center","disabled:bg-disabled-bg disabled:text-disabled-text disabled:pointer-events-none"].join(" "),{variants:{variant:{primary:`bg-primary-inverse-bg text-primary-inverse-text
3
3
  hover:bg-primary-inverse-hover-bg`,secondary:"bg-secondary-bg text-primary-text hover:bg-primary-hover-bg",secondaryBorder:`bg-primary-bg text-primary-text hover:bg-primary-hover-bg
4
4
  disabled:border-inp-disabled-border border`,link:"text-primary-text hover:text-secondary-text underline underline-offset-3",ghost:`hover:bg-tertiary-bg hover:text-primary-text aria-expanded:bg-tertiary-bg
5
- aria-expanded:text-primary-text`},size:{lg:`${qe("body-lg-medium")} w-fit gap-2 px-4.5 py-3
6
- [&_svg]:size-[18px]`,md:`${qe("body-md-medium")} w-fit gap-2 px-4.5 py-2
7
- [&_svg]:size-4`,sm:`${qe("body-sm-medium")} w-fit gap-2 px-3 py-2
8
- [&_svg]:size-4`,xs:`${qe("body-xs-medium")} w-fit gap-1 px-3 py-2
9
- [&_svg]:size-[14px]`,default:`${qe("body-sm-medium")} size-9 [&_svg]:size-4`}},compoundVariants:[{variant:"link",size:"lg",className:"[&_svg]:size-5"}],defaultVariants:{variant:"primary",size:"md"}}),Bt=({className:e,variant:t,size:n,asChild:r=!1,ref:o,...s})=>{const i=r?Qm:"button";return v.jsx(i,{className:L(Di({variant:t,size:n,className:e})),ref:o,...s})};Bt.displayName="Button";const oh=_e("group/card rounded-lg",{variants:{variant:{light:`bg-primary-bg text-primary-text border-delicate-border
5
+ aria-expanded:text-primary-text`},size:{lg:`${vt("body-lg-medium")} w-fit gap-2 px-4.5 py-3
6
+ [&_svg]:size-[18px]`,md:`${vt("body-md-medium")} w-fit gap-2 px-4.5 py-2
7
+ [&_svg]:size-4`,sm:`${vt("body-sm-medium")} w-fit gap-2 px-3 py-2
8
+ [&_svg]:size-4`,xs:`${vt("body-xs-medium")} w-fit gap-1 px-3 py-2
9
+ [&_svg]:size-[14px]`,default:`${vt("body-sm-medium")} size-9 [&_svg]:size-4`}},compoundVariants:[{variant:"link",size:"lg",className:"[&_svg]:size-5"}],defaultVariants:{variant:"primary",size:"md"}}),wr=({className:e,variant:t,size:n,asChild:r=!1,ref:o,...i})=>{const a=r?nM:"button";return C.jsx(a,{className:q(hm({variant:t,size:n,className:e})),ref:o,...i})};wr.displayName="Button";const lM=Ve("group/card rounded-lg",{variants:{variant:{light:`bg-primary-bg text-primary-text border-delicate-border
10
10
  hover:border-default-border hover:bg-secondary-bg shadow-[0_2px_6px_rgba(0,0,0,0.1)]
11
11
  hover:shadow-[0_2px_6px_rgba(0,0,0,0.12)]`,dark:`bg-secondary-inverse-bg text-primary-inverse-text
12
12
  hover:bg-tertiary-inverse-bg border-transparent shadow-[0_1px_3px_rgba(0,0,0,0.2)]
13
- hover:shadow-[0_6px_16px_rgba(0,0,0,0.30)]`},active:{true:"",false:""}},defaultVariants:{variant:"light",active:!1},compoundVariants:[{variant:"light",active:!0,class:"bg-tertiary-bg border-default-border shadow-[0_2px_6px_rgba(0,0,0,0.1)]"},{variant:"dark",active:!0,class:"bg-tertiary-inverse-bg shadow-[0_2px_6px_rgba(0,0,0,0.25)]"}]}),sh=_e("flex flex-col space-y-1.5 p-6"),ih=_e(`group-data-[disabled=true]/card:text-disabled-text leading-none font-semibold
14
- tracking-tight`),ah=_e(`${qe("body-sm-regular")} text-muted-foreground
15
- group-data-[disabled=true]/card:text-disabled-text`),lh=_e("group-data-[disabled=true]/card:text-disabled-text p-6 pt-0"),ch=_e("group-data-[disabled=true]/card:text-disabled-text flex items-center p-6 pt-0"),Yc=({ref:e,className:t,variant:n,disabled:r,active:o,...s})=>v.jsx("div",{ref:e,"data-disabled":r||void 0,className:L(oh({variant:n,active:o}),t),...s});Yc.displayName="Card";const Xc=({ref:e,className:t,...n})=>v.jsx("div",{ref:e,className:L(sh(),t),...n});Xc.displayName="CardHeader";const Zc=({ref:e,className:t,...n})=>v.jsx("div",{ref:e,className:L(ih(),t),...n});Zc.displayName="CardTitle";const Qc=({ref:e,className:t,...n})=>v.jsx("div",{ref:e,className:L(ah(),t),...n});Qc.displayName="CardDescription";const Jc=({ref:e,className:t,...n})=>v.jsx("div",{ref:e,className:L(lh(),t),...n});Jc.displayName="CardContent";const eu=({ref:e,className:t,...n})=>v.jsx("div",{ref:e,className:L(ch(),t),...n});eu.displayName="CardFooter";function uh(e,t){const n=u.createContext(t),r=s=>{const{children:i,...a}=s,l=u.useMemo(()=>a,Object.values(a));return v.jsx(n.Provider,{value:l,children:i})};r.displayName=e+"Provider";function o(s){const i=u.useContext(n);if(i)return i;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[r,o]}function Vt(e,t=[]){let n=[];function r(s,i){const a=u.createContext(i),l=n.length;n=[...n,i];const c=p=>{const{scope:g,children:f,...h}=p,m=g?.[e]?.[l]||a,b=u.useMemo(()=>h,Object.values(h));return v.jsx(m.Provider,{value:b,children:f})};c.displayName=s+"Provider";function d(p,g){const f=g?.[e]?.[l]||a,h=u.useContext(f);if(h)return h;if(i!==void 0)return i;throw new Error(`\`${p}\` must be used within \`${s}\``)}return[c,d]}const o=()=>{const s=n.map(i=>u.createContext(i));return function(a){const l=a?.[e]||s;return u.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return o.scopeName=e,[r,dh(o,...t)]}function dh(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const i=r.reduce((a,{useScope:l,scopeName:c})=>{const p=l(s)[`__scope${c}`];return{...a,...p}},{});return u.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}function Oe(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e?.(o),n===!1||!o.defaultPrevented)return t?.(o)}}var dn=globalThis?.document?u.useLayoutEffect:()=>{},fh=u[" useInsertionEffect ".trim().toString()]||dn;function _n({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,s,i]=ph({defaultProp:t,onChange:n}),a=e!==void 0,l=a?e:o;{const d=u.useRef(e!==void 0);u.useEffect(()=>{const p=d.current;p!==a&&console.warn(`${r} is changing from ${p?"controlled":"uncontrolled"} to ${a?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),d.current=a},[a,r])}const c=u.useCallback(d=>{if(a){const p=gh(d)?d(e):d;p!==e&&i.current?.(p)}else s(d)},[a,e,s,i]);return[l,c]}function ph({defaultProp:e,onChange:t}){const[n,r]=u.useState(e),o=u.useRef(n),s=u.useRef(t);return fh(()=>{s.current=t},[t]),u.useEffect(()=>{o.current!==n&&(s.current?.(n),o.current=n)},[n,o]),[n,r,s]}function gh(e){return typeof e=="function"}function Fi(e){const t=u.useRef({value:e,previous:e});return u.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function Ao(e){const[t,n]=u.useState(void 0);return dn(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const s=o[0];let i,a;if("borderBoxSize"in s){const l=s.borderBoxSize,c=Array.isArray(l)?l[0]:l;i=c.inlineSize,a=c.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}function mh(e,t){return u.useReducer((n,r)=>t[n][r]??n,e)}var Kt=e=>{const{present:t,children:n}=e,r=hh(t),o=typeof n=="function"?n({present:r.isPresent}):u.Children.only(n),s=He(r.ref,bh(o));return typeof n=="function"||r.isPresent?u.cloneElement(o,{ref:s}):null};Kt.displayName="Presence";function hh(e){const[t,n]=u.useState(),r=u.useRef(null),o=u.useRef(e),s=u.useRef("none"),i=e?"mounted":"unmounted",[a,l]=mh(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return u.useEffect(()=>{const c=jr(r.current);s.current=a==="mounted"?c:"none"},[a]),dn(()=>{const c=r.current,d=o.current;if(d!==e){const g=s.current,f=jr(c);e?l("MOUNT"):f==="none"||c?.display==="none"?l("UNMOUNT"):l(d&&g!==f?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),dn(()=>{if(t){let c;const d=t.ownerDocument.defaultView??window,p=f=>{const m=jr(r.current).includes(CSS.escape(f.animationName));if(f.target===t&&m&&(l("ANIMATION_END"),!o.current)){const b=t.style.animationFillMode;t.style.animationFillMode="forwards",c=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=b)})}},g=f=>{f.target===t&&(s.current=jr(r.current))};return t.addEventListener("animationstart",g),t.addEventListener("animationcancel",p),t.addEventListener("animationend",p),()=>{d.clearTimeout(c),t.removeEventListener("animationstart",g),t.removeEventListener("animationcancel",p),t.removeEventListener("animationend",p)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:u.useCallback(c=>{r.current=c?getComputedStyle(c):null,n(c)},[])}}function jr(e){return e?.animationName||"none"}function bh(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function po(e){const t=vh(e),n=u.forwardRef((r,o)=>{const{children:s,...i}=r,a=u.Children.toArray(s),l=a.find(yh);if(l){const c=l.props.children,d=a.map(p=>p===l?u.Children.count(c)>1?u.Children.only(null):u.isValidElement(c)?c.props.children:null:p);return v.jsx(t,{...i,ref:o,children:u.isValidElement(c)?u.cloneElement(c,void 0,d):null})}return v.jsx(t,{...i,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function vh(e){const t=u.forwardRef((n,r)=>{const{children:o,...s}=n;if(u.isValidElement(o)){const i=wh(o),a=Ch(s,o.props);return o.type!==u.Fragment&&(a.ref=r?Mi(r,i):i),u.cloneElement(o,a)}return u.Children.count(o)>1?u.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var tu=Symbol("radix.slottable");function xh(e){const t=({children:n})=>v.jsx(v.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=tu,t}function yh(e){return u.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===tu}function Ch(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...a)=>{const l=s(...a);return o(...a),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function wh(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Sh=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Ae=Sh.reduce((e,t)=>{const n=po(`Primitive.${t}`),r=u.forwardRef((o,s)=>{const{asChild:i,...a}=o,l=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),v.jsx(l,{...a,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Rh(e,t){e&&gn.flushSync(()=>e.dispatchEvent(t))}var To="Checkbox",[Eh]=Vt(To),[Ih,Vi]=Eh(To);function kh(e){const{__scopeCheckbox:t,checked:n,children:r,defaultChecked:o,disabled:s,form:i,name:a,onCheckedChange:l,required:c,value:d="on",internal_do_not_use_render:p}=e,[g,f]=_n({prop:n,defaultProp:o??!1,onChange:l,caller:To}),[h,m]=u.useState(null),[b,y]=u.useState(null),x=u.useRef(!1),w=h?!!i||!!h.closest("form"):!0,C={checked:g,disabled:s,setChecked:f,control:h,setControl:m,name:a,form:i,value:d,hasConsumerStoppedPropagationRef:x,required:c,defaultChecked:an(o)?!1:o,isFormControl:w,bubbleInput:b,setBubbleInput:y};return v.jsx(Ih,{scope:t,...C,children:Nh(p)?p(C):r})}var nu="CheckboxTrigger",ru=u.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},o)=>{const{control:s,value:i,disabled:a,checked:l,required:c,setControl:d,setChecked:p,hasConsumerStoppedPropagationRef:g,isFormControl:f,bubbleInput:h}=Vi(nu,e),m=He(o,d),b=u.useRef(l);return u.useEffect(()=>{const y=s?.form;if(y){const x=()=>p(b.current);return y.addEventListener("reset",x),()=>y.removeEventListener("reset",x)}},[s,p]),v.jsx(Ae.button,{type:"button",role:"checkbox","aria-checked":an(l)?"mixed":l,"aria-required":c,"data-state":lu(l),"data-disabled":a?"":void 0,disabled:a,value:i,...r,ref:m,onKeyDown:Oe(t,y=>{y.key==="Enter"&&y.preventDefault()}),onClick:Oe(n,y=>{p(x=>an(x)?!0:!x),h&&f&&(g.current=y.isPropagationStopped(),g.current||y.stopPropagation())})})});ru.displayName=nu;var Li=u.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:o,defaultChecked:s,required:i,disabled:a,value:l,onCheckedChange:c,form:d,...p}=e;return v.jsx(kh,{__scopeCheckbox:n,checked:o,defaultChecked:s,disabled:a,required:i,onCheckedChange:c,name:r,form:d,value:l,internal_do_not_use_render:({isFormControl:g})=>v.jsxs(v.Fragment,{children:[v.jsx(ru,{...p,ref:t,__scopeCheckbox:n}),g&&v.jsx(au,{__scopeCheckbox:n})]})})});Li.displayName=To;var ou="CheckboxIndicator",su=u.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...o}=e,s=Vi(ou,n);return v.jsx(Kt,{present:r||an(s.checked)||s.checked===!0,children:v.jsx(Ae.span,{"data-state":lu(s.checked),"data-disabled":s.disabled?"":void 0,...o,ref:t,style:{pointerEvents:"none",...e.style}})})});su.displayName=ou;var iu="CheckboxBubbleInput",au=u.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:r,hasConsumerStoppedPropagationRef:o,checked:s,defaultChecked:i,required:a,disabled:l,name:c,value:d,form:p,bubbleInput:g,setBubbleInput:f}=Vi(iu,e),h=He(n,f),m=Fi(s),b=Ao(r);u.useEffect(()=>{const x=g;if(!x)return;const w=window.HTMLInputElement.prototype,S=Object.getOwnPropertyDescriptor(w,"checked").set,I=!o.current;if(m!==s&&S){const E=new Event("click",{bubbles:I});x.indeterminate=an(s),S.call(x,an(s)?!1:s),x.dispatchEvent(E)}},[g,m,s,o]);const y=u.useRef(an(s)?!1:s);return v.jsx(Ae.input,{type:"checkbox","aria-hidden":!0,defaultChecked:i??y.current,required:a,disabled:l,name:c,value:d,form:p,...t,tabIndex:-1,ref:h,style:{...t.style,...b,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});au.displayName=iu;function Nh(e){return typeof e=="function"}function an(e){return e==="indeterminate"}function lu(e){return an(e)?"indeterminate":e?"checked":"unchecked"}const cu=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();const Ph=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const Oh=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase());const bl=e=>{const t=Oh(e);return t.charAt(0).toUpperCase()+t.slice(1)};var _h={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"};const Ah=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1};const Th=Te.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:s,iconNode:i,...a},l)=>Te.createElement("svg",{ref:l,..._h,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:cu("lucide",o),...!s&&!Ah(a)&&{"aria-hidden":"true"},...a},[...i.map(([c,d])=>Te.createElement(c,d)),...Array.isArray(s)?s:[s]]));const Se=(e,t)=>{const n=Te.forwardRef(({className:r,...o},s)=>Te.createElement(Th,{ref:s,iconNode:t,className:cu(`lucide-${Ph(bl(e))}`,`lucide-${e}`,r),...o}));return n.displayName=bl(e),n};const Mh=[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M22 8c0-2.3-.8-4.3-2-6",key:"5bb3ad"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}],["path",{d:"M4 2C2.8 3.7 2 5.7 2 8",key:"tap9e0"}]],Dh=Se("bell-ring",Mh);const Fh=[["path",{d:"M15 13a3 3 0 1 0-6 0",key:"10j68g"}],["path",{d:"M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20",key:"k3hazp"}],["circle",{cx:"12",cy:"8",r:"2",key:"1822b1"}]],Vh=Se("book-user",Fh);const Lh=[["path",{d:"M12 12h.01",key:"1mp3jc"}],["path",{d:"M16 6V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v2",key:"1ksdt3"}],["path",{d:"M22 13a18.15 18.15 0 0 1-20 0",key:"12hx5q"}],["rect",{width:"20",height:"14",x:"2",y:"6",rx:"2",key:"i6l2r4"}]],jh=Se("briefcase-business",Lh);const $h=[["path",{d:"M10 12h4",key:"a56b0p"}],["path",{d:"M10 8h4",key:"1sr2af"}],["path",{d:"M14 21v-3a2 2 0 0 0-4 0v3",key:"1rgiei"}],["path",{d:"M6 10H4a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-2",key:"secmi2"}],["path",{d:"M6 21V5a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v16",key:"16ra0t"}]],zh=Se("building-2",$h);const Gh=[["path",{d:"M11 14h1v4",key:"fy54vd"}],["path",{d:"M16 2v4",key:"4m81vk"}],["path",{d:"M3 10h18",key:"8toen8"}],["path",{d:"M8 2v4",key:"1cmpym"}],["rect",{x:"3",y:"4",width:"18",height:"18",rx:"2",key:"12vinp"}]],Hh=Se("calendar-1",Gh);const Bh=[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"m19 9-5 5-4-4-3 3",key:"2osh9i"}]],Wh=Se("chart-line",Bh);const Uh=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],qh=Se("chevron-down",Uh);const Kh=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],uu=Se("chevron-left",Kh);const Yh=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],du=Se("chevron-right",Yh);const Xh=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],Zh=Se("chevrons-up-down",Xh);const Qh=[["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"}]],Jh=Se("circle-question-mark",Qh);const eb=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6h4",key:"135r8i"}]],tb=Se("clock-3",eb);const nb=[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]],rb=Se("credit-card",nb);const ob=[["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}],["path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6",key:"1b0p4s"}]],sb=Se("dollar-sign",ob);const ib=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],fu=Se("ellipsis",ib);const ab=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],lb=Se("eye-off",ab);const cb=[["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"}]],ub=Se("eye",cb);const db=[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]],fb=Se("folder-open",db);const pb=[["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"}]],gb=Se("funnel",pb);const mb=[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]],hb=Se("layout-grid",mb);const bb=[["path",{d:"M2 5h20",key:"1fs1ex"}],["path",{d:"M6 12h12",key:"8npq4p"}],["path",{d:"M9 19h6",key:"456am0"}]],vb=Se("list-filter",bb);const xb=[["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"}],["rect",{x:"3",y:"4",width:"6",height:"6",rx:"1",key:"cif1o7"}]],yb=Se("list-todo",xb);const Cb=[["path",{d:"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",key:"1sd12s"}]],wb=Se("message-circle",Cb);const Sb=[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]],Rb=Se("package",Sb);const Eb=[["path",{d:"M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z",key:"e79jfc"}],["circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor",key:"1okk4w"}],["circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor",key:"f64h9f"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}]],Ib=Se("palette",Eb);const kb=[["path",{d:"M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384",key:"9njp5v"}]],Nb=Se("phone",kb);const Pb=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Ob=Se("plus",Pb);const _b=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]],Ab=Se("rotate-ccw",_b);const Tb=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],Mb=Se("search",Tb);const Db=[["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"}]],Fb=Se("settings",Db);const Vb=[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]],Lb=Se("tag",Vb);const jb=[["path",{d:"M10 15H6a4 4 0 0 0-4 4v2",key:"1nfge6"}],["path",{d:"m14.305 16.53.923-.382",key:"1itpsq"}],["path",{d:"m15.228 13.852-.923-.383",key:"eplpkm"}],["path",{d:"m16.852 12.228-.383-.923",key:"13v3q0"}],["path",{d:"m16.852 17.772-.383.924",key:"1i8mnm"}],["path",{d:"m19.148 12.228.383-.923",key:"1q8j1v"}],["path",{d:"m19.53 18.696-.382-.924",key:"vk1qj3"}],["path",{d:"m20.772 13.852.924-.383",key:"n880s0"}],["path",{d:"m20.772 16.148.924.383",key:"1g6xey"}],["circle",{cx:"18",cy:"15",r:"3",key:"gjjjvw"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],$b=Se("user-cog",jb);const zb=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],Gb=Se("users",zb);const Hb=[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",key:"1ngwbx"}]],Bb=Se("wrench",Hb);const Wb=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Ub=Se("x",Wb);function pu({ref:e,className:t,color:n="currentColor",size:r=24,...o}){return v.jsx("svg",{ref:e,xmlns:"http://www.w3.org/2000/svg",width:r,height:r,fill:"none",stroke:n,strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round",className:t,...o,children:v.jsx("path",{d:"M13.4375 8.125L8.85414 12.5L6.5625 10.3125"})})}function gu({ref:e,className:t,color:n="currentColor",size:r=24,...o}){return v.jsxs("svg",{ref:e,xmlns:"http://www.w3.org/2000/svg",width:r,height:r,fill:"none",stroke:n,strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round",className:t,...o,children:[v.jsx("path",{d:"M13.4375 8.125L8.85414 12.5L6.5625 10.3125"}),v.jsx("path",{d:"M10 17.5C14.1421 17.5 17.5 14.1421 17.5 10C17.5 5.85786 14.1421 2.5 10 2.5C5.85786 2.5 2.5 5.85786 2.5 10C2.5 14.1421 5.85786 17.5 10 17.5Z"})]})}pu.displayName="Check";gu.displayName="CircleCheck";const qb={settings:Fb,plus:Ob,wrench:Bb,phone:Nb,palette:Ib,building:zh,close:Ub,done:pu,check:gu,users:Gb,"layout-grid":hb,bell:Dh,"book-user":Vh,"user-gear":$b,folder:fb,"briefcase-business":jh,calendar:Hh,"chart-line":Wh,message:wb,search:Mb,"list-filter":vb,funnel:gb,dots:fu,"check-list":yb,tag:Lb,chevron:qh,chevrons:Zh,"rotate-ccw":Ab,question:Jh,clock:tb,eye:ub,"eye-off":lb,package:Rb,"credit-card":rb,"dollar-sign":sb},Kb={xs:"w-2.5 h-2.5",sm:"w-3.75 h-3.75",md:"w-5 h-5",lg:"w-6.25 h-6.25"},Ut=({type:e,size:t="md",viewBox:n="0 0 24 24",strokeWidth:r=1.5,classes:o,color:s,...i})=>{const a=qb[e],l=Kb[t],c=L(l,o?.icon);return v.jsx("div",{...i,className:o?.wrapper,children:v.jsx(a,{viewBox:n,strokeWidth:r,className:c,color:s})})},Yb=["peer bg-primary-bg border-inp-default-border grid size-5 shrink-0 cursor-pointer place-content-center rounded border","focus-visible:ring-inp-focus-border focus-visible:ring-1 focus-visible:outline-none","text-transparent transition-all duration-200","disabled:cursor-not-allowed","disabled:border-disabled-border disabled:bg-disabled-bg","disabled:data-[state=checked]:bg-disabled-bg","disabled:data-[state=checked]:border-disabled-border","disabled:data-[state=checked]:text-disabled-text","data-[state=checked]:border-primary-inverse-bg","data-[state=checked]:bg-primary-inverse-bg data-[state=checked]:text-primary-inverse-text","enabled:hover:border-inp-hover-border","enabled:hover:data-[state=checked]:bg-primary-inverse-hover-bg","enabled:hover:data-[state=checked]:border-primary-inverse-hover-bg"].join(" "),Xb="grid place-content-center text-current",ji=({className:e,ref:t,...n})=>v.jsx(Li,{ref:t,className:L(Yb,e),...n,children:v.jsx(su,{className:L(Xb),children:v.jsx(Ut,{type:"done",viewBox:"3 3 14 14"})})});ji.displayName=Li.displayName;function Cs({controlled:e,default:t,name:n,state:r="value"}){const{current:o}=u.useRef(e!==void 0),[s,i]=u.useState(t),a=o?e:s;if(process.env.NODE_ENV!=="production"){u.useEffect(()=>{o!==(e!==void 0)&&console.error([`Base UI: A component is changing the ${o?"":"un"}controlled ${r} state of ${n} to be ${o?"un":""}controlled.`,"Elements should not switch from uncontrolled to controlled (or vice versa).",`Decide between using a controlled or uncontrolled ${n} element for the lifetime of the component.`,"The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.","More info: https://fb.me/react-controlled-components"].join(`
16
- `))},[r,n,e]);const{current:c}=u.useRef(t);u.useEffect(()=>{!o&&JSON.stringify(c)!==JSON.stringify(t)&&console.error([`Base UI: A component is changing the default ${r} state of an uncontrolled ${n} after being initialized. To suppress this warning opt to use a controlled ${n}.`].join(`
17
- `))},[JSON.stringify(t)])}const l=u.useCallback(c=>{o||i(c)},[]);return[a,l]}const vl={};function wt(e,t){const n=u.useRef(vl);return n.current===vl&&(n.current=e(t)),n}const ws=u[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],Zb=ws&&ws!==u.useLayoutEffect?ws:e=>e();function re(e){const t=wt(Qb).current;return t.next=e,Zb(t.effect),t.trampoline}function Qb(){const e={next:void 0,callback:Jb,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function Jb(){if(process.env.NODE_ENV!=="production")throw new Error("Base UI: Cannot call an event handler while rendering.")}const ev=()=>{},oe=typeof document<"u"?u.useLayoutEffect:ev,$i=u.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},elementsRef:{current:[]},nextIndexRef:{current:0}});process.env.NODE_ENV!=="production"&&($i.displayName="CompositeListContext");function tv(){return u.useContext($i)}function mu(e){const{children:t,elementsRef:n,labelsRef:r,onMapChange:o}=e,s=re(o),i=u.useRef(0),a=wt(rv).current,l=wt(nv).current,[c,d]=u.useState(0),p=u.useRef(c),g=re((y,x)=>{l.set(y,x??null),p.current+=1,d(p.current)}),f=re(y=>{l.delete(y),p.current+=1,d(p.current)}),h=u.useMemo(()=>{const y=new Map;return Array.from(l.keys()).filter(w=>w.isConnected).sort(ov).forEach((w,C)=>{const S=l.get(w)??{};y.set(w,{...S,index:C})}),y},[l,c]);oe(()=>{if(typeof MutationObserver!="function"||h.size===0)return;const y=new MutationObserver(x=>{const w=new Set,C=S=>w.has(S)?w.delete(S):w.add(S);x.forEach(S=>{S.removedNodes.forEach(C),S.addedNodes.forEach(C)}),w.size===0&&(p.current+=1,d(p.current))});return h.forEach((x,w)=>{w.parentElement&&y.observe(w.parentElement,{childList:!0})}),()=>{y.disconnect()}},[h]),oe(()=>{p.current===c&&(n.current.length!==h.size&&(n.current.length=h.size),r&&r.current.length!==h.size&&(r.current.length=h.size),i.current=h.size),s(h)},[s,h,n,r,c]),oe(()=>()=>{n.current=[]},[n]),oe(()=>()=>{r&&(r.current=[])},[r]);const m=re(y=>(a.add(y),()=>{a.delete(y)}));oe(()=>{a.forEach(y=>y(h))},[a,h]);const b=u.useMemo(()=>({register:g,unregister:f,subscribeMapChange:m,elementsRef:n,labelsRef:r,nextIndexRef:i}),[g,f,m,n,r,i]);return v.jsx($i.Provider,{value:b,children:t})}function nv(){return new Map}function rv(){return new Set}function ov(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 hu=u.createContext(void 0);process.env.NODE_ENV!=="production"&&(hu.displayName="DirectionContext");function bu(){return u.useContext(hu)?.direction??"ltr"}function Ot(e,...t){const n=new URL("https://base-ui.com/production-error");return n.searchParams.set("code",e.toString()),t.forEach(r=>n.searchParams.append("args[]",r)),`Base UI error #${e}; visit ${n} for the full message.`}function gr(e,t,n,r){const o=wt(vu).current;return iv(o,e,t,n,r)&&xu(o,[e,t,n,r]),o.callback}function sv(e){const t=wt(vu).current;return av(t,e)&&xu(t,e),t.callback}function vu(){return{callback:null,cleanup:null,refs:[]}}function iv(e,t,n,r,o){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==o}function av(e,t){return e.refs.length!==t.length||e.refs.some((n,r)=>n!==t[r])}function xu(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 r=Array(t.length).fill(null);for(let o=0;o<t.length;o+=1){const s=t[o];if(s!=null)switch(typeof s){case"function":{const i=s(n);typeof i=="function"&&(r[o]=i);break}case"object":{s.current=n;break}}}e.cleanup=()=>{for(let o=0;o<t.length;o+=1){const s=t[o];if(s!=null)switch(typeof s){case"function":{const i=r[o];typeof i=="function"?i():s(null);break}case"object":{s.current=null;break}}}}}}}const lv=parseInt(u.version,10);function zi(e){return lv>=e}function xl(e){if(!u.isValidElement(e))return null;const t=e,n=t.props;return(zi(19)?n?.ref:t.ref)??null}function ei(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function cv(e,t){const n={};for(const r in e){const o=e[r];if(t?.hasOwnProperty(r)){const s=t[r](o);s!=null&&Object.assign(n,s);continue}o===!0?n[`data-${r.toLowerCase()}`]="":o&&(n[`data-${r.toLowerCase()}`]=o.toString())}return n}function uv(e,t){return typeof e=="function"?e(t):e}function dv(e,t){return typeof e=="function"?e(t):e}const ir={};function yu(e,t,n,r,o){let s={...ti(e,ir)};return t&&(s=io(s,t)),n&&(s=io(s,n)),r&&(s=io(s,r)),s}function fv(e){if(e.length===0)return ir;if(e.length===1)return ti(e[0],ir);let t={...ti(e[0],ir)};for(let n=1;n<e.length;n+=1)t=io(t,e[n]);return t}function io(e,t){return Cu(t)?t(e):pv(e,t)}function pv(e,t){if(!t)return e;for(const n in t){const r=t[n];switch(n){case"style":{e[n]=ei(e.style,r);break}case"className":{e[n]=wu(e.className,r);break}default:gv(n,r)?e[n]=mv(e[n],r):e[n]=r}}return e}function gv(e,t){const n=e.charCodeAt(0),r=e.charCodeAt(1),o=e.charCodeAt(2);return n===111&&r===110&&o>=65&&o<=90&&(typeof t=="function"||typeof t>"u")}function Cu(e){return typeof e=="function"}function ti(e,t){return Cu(e)?e(t):e??ir}function mv(e,t){return t?e?n=>{if(hv(n)){const o=n;ni(o);const s=t(o);return o.baseUIHandlerPrevented||e?.(o),s}const r=t(n);return e?.(n),r}:t:e}function ni(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function wu(e,t){return t?e?t+" "+e:t:e}function hv(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function Ve(){}const $r=Object.freeze([]),rt=Object.freeze({}),bv={style:{transition:"none"}},vv="data-base-ui-click-trigger",xv={fallbackAxisSide:"none"},yv={clipPath:"inset(50%)",position:"fixed",top:0,left:0};function ot(e,t,n={}){const r=t.render,o=Cv(t,n);if(n.enabled===!1)return null;const s=n.state??rt;return Sv(e,r,o,s)}function Cv(e,t={}){const{className:n,style:r,render:o}=e,{state:s=rt,ref:i,props:a,stateAttributesMapping:l,enabled:c=!0}=t,d=c?uv(n,s):void 0,p=c?dv(r,s):void 0,g=c?cv(s,l):rt,f=c?ei(g,Array.isArray(a)?fv(a):a)??rt:rt;return typeof document<"u"&&(c?Array.isArray(i)?f.ref=sv([f.ref,xl(o),...i]):f.ref=gr(f.ref,xl(o),i):gr(null,null)),c?(d!==void 0&&(f.className=wu(f.className,d)),p!==void 0&&(f.style=ei(f.style,p)),f):rt}const wv=Symbol.for("react.lazy");function Sv(e,t,n,r){if(t){if(typeof t=="function")return t(n,r);const o=yu(n,t.props);o.ref=n.ref;let s=t;if(s?.$$typeof===wv&&(s=u.Children.toArray(t)[0]),process.env.NODE_ENV!=="production"&&!u.isValidElement(s))throw new Error(["Base UI: The `render` prop was provided an invalid React element as `React.isValidElement(render)` is `false`.","A valid React element must be provided to the `render` prop because it is cloned with props to replace the default element.","https://base-ui.com/r/invalid-render-prop"].join(`
18
- `));return u.cloneElement(s,o)}if(e&&typeof e=="string")return Rv(e,n);throw new Error(process.env.NODE_ENV!=="production"?"Base UI: Render element or function are not defined.":Ot(8))}function Rv(e,t){return e==="button"?Te.createElement("button",{type:"button",...t,key:t.key}):e==="img"?Te.createElement("img",{alt:"",...t,key:t.key}):u.createElement(e,t)}const xt="none",ri="trigger-press",Ev="trigger-hover",Gi="outside-press",Iv="item-press",yl="clear-press",kv="chip-remove-press",Vn="input-change",rn="input-clear",Nv="input-press",Mo="focus-out",Su="escape-key",ar="list-navigation";function pe(e,t,n,r){let o=!1,s=!1;const i=rt;return{reason:e,event:t??new Event("base-ui"),cancel(){o=!0},allowPropagation(){s=!0},get isCanceled(){return o},get isPropagationAllowed(){return s},trigger:n,...i}}function er(e,t,n){const r=n??rt;return{reason:e,event:t??new Event("base-ui"),...r}}const oi={...u};let Cl=0;function Pv(e,t="mui"){const[n,r]=u.useState(e),o=e||n;return u.useEffect(()=>{n==null&&(Cl+=1,r(`${t}-${Cl}`))},[n,t]),o}const wl=oi.useId;function Hi(e,t){if(wl!==void 0){const n=wl();return e??(t?`${t}-${n}`:n)}return Pv(e,t)}function Bi(e){return Hi(e,"base-ui")}const Ov=[];function Ru(e){u.useEffect(e,Ov)}const zr=null;let Sl=globalThis.requestAnimationFrame;class _v{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=t=>{this.isScheduled=!1;const n=this.callbacks,r=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,r>0)for(let o=0;o<n.length;o+=1)n[o]?.(t)};request(t){const n=this.nextId;this.nextId+=1,this.callbacks.push(t),this.callbacksCount+=1;const r=process.env.NODE_ENV!=="production"&&Sl!==requestAnimationFrame&&(Sl=requestAnimationFrame,!0);return(!this.isScheduled||r)&&(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 Gr=new _v;class Tt{static create(){return new Tt}static request(t){return Gr.request(t)}static cancel(t){return Gr.cancel(t)}currentId=zr;request(t){this.cancel(),this.currentId=Gr.request(()=>{this.currentId=zr,t()})}cancel=()=>{this.currentId!==zr&&(Gr.cancel(this.currentId),this.currentId=zr)};disposeEffect=()=>this.cancel}function Wi(){const e=wt(Tt.create).current;return Ru(e.disposeEffect),e}function zt(e){return e==null?e:"current"in e?e.current:e}let mr=(function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e})({});const Av={[mr.startingStyle]:""},Tv={[mr.endingStyle]:""},Eu={transitionStatus(e){return e==="starting"?Av:e==="ending"?Tv:null}};function Mv(e,t=!1,n=!0){const r=Wi();return re((o,s=null)=>{r.cancel();function i(){gn.flushSync(o)}const a=zt(e);if(a==null)return;const l=a;if(typeof l.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED)o();else{let c=function(){const p=mr.startingStyle;if(!l.hasAttribute(p)){r.request(d);return}const g=new MutationObserver(()=>{l.hasAttribute(p)||(g.disconnect(),d())});g.observe(l,{attributes:!0,attributeFilter:[p]}),s?.addEventListener("abort",()=>g.disconnect(),{once:!0})},d=function(){Promise.all(l.getAnimations().map(p=>p.finished)).then(()=>{s?.aborted||i()}).catch(()=>{const p=l.getAnimations();if(n){if(s?.aborted)return;i()}else p.length>0&&p.some(g=>g.pending||g.playState!=="finished")&&d()})};if(t){c();return}r.request(d)}})}function Iu(e,t=!1,n=!1){const[r,o]=u.useState(e&&t?"idle":void 0),[s,i]=u.useState(e);return e&&!s&&(i(!0),o("starting")),!e&&s&&r!=="ending"&&!n&&o("ending"),!e&&!s&&r==="ending"&&o(void 0),oe(()=>{if(!e&&s&&r!=="ending"&&n){const a=Tt.request(()=>{o("ending")});return()=>{Tt.cancel(a)}}},[e,s,r,n]),oe(()=>{if(!e||t)return;const a=Tt.request(()=>{o(void 0)});return()=>{Tt.cancel(a)}},[t,e]),oe(()=>{if(!e||!t)return;e&&s&&r!=="idle"&&o("starting");const a=Tt.request(()=>{o("idle")});return()=>{Tt.cancel(a)}},[t,e,s,o,r]),u.useMemo(()=>({mounted:s,setMounted:i,transitionStatus:r}),[s,r])}let ku=(function(e){return e[e.None=0]="None",e[e.GuessFromOrder=1]="GuessFromOrder",e})({});function Nu(e={}){const{label:t,metadata:n,textRef:r,indexGuessBehavior:o,index:s}=e,{register:i,unregister:a,subscribeMapChange:l,elementsRef:c,labelsRef:d,nextIndexRef:p}=tv(),g=u.useRef(-1),[f,h]=u.useState(s??(o===ku.GuessFromOrder?()=>{if(g.current===-1){const y=p.current;p.current+=1,g.current=y}return g.current}:-1)),m=u.useRef(null),b=u.useCallback(y=>{if(m.current=y,f!==-1&&y!==null&&(c.current[f]=y,d)){const x=t!==void 0;d.current[f]=x?t:r?.current?.textContent??y.textContent}},[f,c,d,t,r]);return oe(()=>{if(s!=null)return;const y=m.current;if(y)return i(y,n),()=>{a(y)}},[s,i,a,n]),oe(()=>{if(s==null)return l(y=>{const x=m.current?y.get(m.current)?.index:null;x!=null&&h(x)})},[s,l,h]),u.useMemo(()=>({ref:b,index:f}),[f,b])}function Do(){return typeof window<"u"}function hn(e){return Ui(e)?(e.nodeName||"").toLowerCase():"#document"}function Ze(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Lt(e){var t;return(t=(Ui(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Ui(e){return Do()?e instanceof Node||e instanceof Ze(e).Node:!1}function Fe(e){return Do()?e instanceof Element||e instanceof Ze(e).Element:!1}function Be(e){return Do()?e instanceof HTMLElement||e instanceof Ze(e).HTMLElement:!1}function si(e){return!Do()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Ze(e).ShadowRoot}function bn(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=ht(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&o!=="inline"&&o!=="contents"}function Dv(e){return/^(table|td|th)$/.test(hn(e))}function Fo(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const Fv=/transform|translate|scale|rotate|perspective|filter/,Vv=/paint|layout|strict|content/,Sn=e=>!!e&&e!=="none";let Ss;function qi(e){const t=Fe(e)?ht(e):e;return Sn(t.transform)||Sn(t.translate)||Sn(t.scale)||Sn(t.rotate)||Sn(t.perspective)||!Vo()&&(Sn(t.backdropFilter)||Sn(t.filter))||Fv.test(t.willChange||"")||Vv.test(t.contain||"")}function Lv(e){let t=qt(e);for(;Be(t)&&!Wt(t);){if(qi(t))return t;if(Fo(t))return null;t=qt(t)}return null}function Vo(){return Ss==null&&(Ss=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Ss}function Wt(e){return/^(html|body|#document)$/.test(hn(e))}function ht(e){return Ze(e).getComputedStyle(e)}function Lo(e){return Fe(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function qt(e){if(hn(e)==="html")return e;const t=e.assignedSlot||e.parentNode||si(e)&&e.host||Lt(e);return si(t)?t.host:t}function Pu(e){const t=qt(e);return Wt(t)?e.ownerDocument?e.ownerDocument.body:e.body:Be(t)&&bn(t)?t:Pu(t)}function ln(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Pu(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),i=Ze(o);if(s){const a=ii(i);return t.concat(i,i.visualViewport||[],bn(o)?o:[],a&&n?ln(a):[])}else return t.concat(o,ln(o,[],n))}function ii(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}let ai;process.env.NODE_ENV!=="production"&&(ai=new Set);function Rl(...e){if(process.env.NODE_ENV!=="production"){const t=e.join(" ");ai.has(t)||(ai.add(t),console.error(`Base UI: ${t}`))}}const Ou=u.createContext(void 0);process.env.NODE_ENV!=="production"&&(Ou.displayName="CompositeRootContext");function jv(e=!1){const t=u.useContext(Ou);if(t===void 0&&!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: CompositeRootContext is missing. Composite parts must be placed within <Composite.Root>.":Ot(16));return t}function $v(e){const{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:o=0,isNativeButton:s}=e,i=r&&t!==!1,a=r&&t===!1;return{props:u.useMemo(()=>{const c={onKeyDown(d){n&&t&&d.key!=="Tab"&&d.preventDefault()}};return r||(c.tabIndex=o,!s&&n&&(c.tabIndex=t?o:-1)),(s&&(t||i)||!s&&n)&&(c["aria-disabled"]=n),s&&(!t||a)&&(c.disabled=n),c},[r,n,t,i,a,s,o])}}function jo(e={}){const{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:o=!0}=e,s=u.useRef(null),i=jv(!0)!==void 0,a=re(()=>{const g=s.current;return!!(g?.tagName==="A"&&g?.href)}),{props:l}=$v({focusableWhenDisabled:n,disabled:t,composite:i,tabIndex:r,isNativeButton:o});process.env.NODE_ENV!=="production"&&u.useEffect(()=>{if(!s.current)return;const g=s.current.tagName==="BUTTON";if(o){if(!g){const f=oi.captureOwnerStack?.()||"";Rl(`A component that acts as a button expected a native <button> because the \`nativeButton\` prop is true. Rendering a non-<button> removes native button semantics, which can impact forms and accessibility. Use a real <button> in the \`render\` prop, or set \`nativeButton\` to \`false\`.${f}`)}}else if(g){const f=oi.captureOwnerStack?.()||"";Rl(`A component that acts as a button expected a non-<button> because the \`nativeButton\` prop is false. Rendering a <button> keeps native behavior while Base UI applies non-native attributes and handlers, which can add unintended extra attributes (such as \`role\` or \`aria-disabled\`). Use a non-<button> in the \`render\` prop, or set \`nativeButton\` to \`true\`.${f}`)}},[o]);const c=u.useCallback(()=>{const g=s.current;zv(g)&&i&&t&&l.disabled===void 0&&g.disabled&&(g.disabled=!1)},[t,l.disabled,i]);oe(c,[c]);const d=u.useCallback((g={})=>{const{onClick:f,onMouseDown:h,onKeyUp:m,onKeyDown:b,onPointerDown:y,...x}=g;return yu({type:o?"button":void 0,onClick(C){if(t){C.preventDefault();return}f?.(C)},onMouseDown(C){t||h?.(C)},onKeyDown(C){if(t||(ni(C),b?.(C)),C.baseUIHandlerPrevented)return;const S=C.target===C.currentTarget&&!o&&!a()&&!t,I=C.key==="Enter",E=C.key===" ";S&&((E||I)&&C.preventDefault(),I&&f?.(C))},onKeyUp(C){t||(ni(C),m?.(C)),!C.baseUIHandlerPrevented&&C.target===C.currentTarget&&!o&&!t&&C.key===" "&&f?.(C)},onPointerDown(C){if(t){C.preventDefault();return}y?.(C)}},o?void 0:{role:"button"},l,x)},[t,l,o,a]),p=re(g=>{s.current=g,c()});return{getButtonProps:d,buttonRef:p}}function zv(e){return Be(e)&&e.tagName==="BUTTON"}const An=typeof navigator<"u",Rs=Bv(),_u=Uv(),Ki=Wv(),Au=typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter:none"),Tu=Rs.platform==="MacIntel"&&Rs.maxTouchPoints>1?!0:/iP(hone|ad|od)|iOS/.test(Rs.platform),El=An&&/firefox/i.test(Ki),Gv=An&&/apple/i.test(navigator.vendor),go=An&&/android/i.test(_u)||/android/i.test(Ki);An&&_u.toLowerCase().startsWith("mac")&&navigator.maxTouchPoints;const Hv=Ki.includes("jsdom/");function Bv(){if(!An)return{platform:"",maxTouchPoints:-1};const e=navigator.userAgentData;return e?.platform?{platform:e.platform,maxTouchPoints:navigator.maxTouchPoints}:{platform:navigator.platform??"",maxTouchPoints:navigator.maxTouchPoints??-1}}function Wv(){if(!An)return"";const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:t,version:n})=>`${t}/${n}`).join(" "):navigator.userAgent}function Uv(){if(!An)return"";const e=navigator.userAgentData;return e?.platform?e.platform:navigator.platform??""}const li="data-base-ui-focusable",Mu="active",Du="selected",qv="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",cn="ArrowLeft",un="ArrowRight",Yi="ArrowUp",xr="ArrowDown";function Ht(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function Ie(e,t){if(!e||!t)return!1;const n=t.getRootNode?.();if(e.contains(t))return!0;if(n&&si(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function dt(e){return"composedPath"in e?e.composedPath()[0]:e.target}function Nt(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 Kv(e){return e.matches("html,body")}function Xi(e){return Be(e)&&e.matches(qv)}function ci(e){return e?e.getAttribute("role")==="combobox"&&Xi(e):!1}function ui(e){return e?e.hasAttribute(li)?e:e.querySelector(`[${li}]`)||e:null}function $n(e,t,n=!0){return e.filter(o=>o.parentId===t&&(!n||o.context?.open)).flatMap(o=>[o,...$n(e,o.id,n)])}function Il(e,t){let n=[],r=e.find(o=>o.id===t)?.parentId;for(;r;){const o=e.find(s=>s.id===r);r=o?.parentId,o&&(n=n.concat(o))}return n}function De(e){e.preventDefault(),e.stopPropagation()}function Yv(e){return"nativeEvent"in e}function Fu(e){return e.pointerType===""&&e.isTrusted?!0:go&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function Vu(e){return Hv?!1:!go&&e.width===0&&e.height===0||go&&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 kl(e,t){return["mouse","pen"].includes(e)}function Lu(e){const t=e.type;return t==="click"||t==="mousedown"||t==="keydown"||t==="keyup"}const Xv=["top","right","bottom","left"],fn=Math.min,gt=Math.max,mo=Math.round,Ln=Math.floor,Dt=e=>({x:e,y:e}),Zv={left:"right",right:"left",bottom:"top",top:"bottom"};function ho(e,t,n){return gt(e,fn(t,n))}function Ft(e,t){return typeof e=="function"?e(t):e}function mt(e){return e.split("-")[0]}function Yt(e){return e.split("-")[1]}function Zi(e){return e==="x"?"y":"x"}function $o(e){return e==="y"?"height":"width"}function Ct(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function zo(e){return Zi(Ct(e))}function Qv(e,t,n){n===void 0&&(n=!1);const r=Yt(e),o=zo(e),s=$o(o);let i=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(i=bo(i)),[i,bo(i)]}function Jv(e){const t=bo(e);return[di(e),t,di(t)]}function di(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const Nl=["left","right"],Pl=["right","left"],ex=["top","bottom"],tx=["bottom","top"];function nx(e,t,n){switch(e){case"top":case"bottom":return n?t?Pl:Nl:t?Nl:Pl;case"left":case"right":return t?ex:tx;default:return[]}}function rx(e,t,n,r){const o=Yt(e);let s=nx(mt(e),n==="start",r);return o&&(s=s.map(i=>i+"-"+o),t&&(s=s.concat(s.map(di)))),s}function bo(e){const t=mt(e);return Zv[t]+e.slice(t.length)}function ox(e){return{top:0,right:0,bottom:0,left:0,...e}}function Qi(e){return typeof e!="number"?ox(e):{top:e,right:e,bottom:e,left:e}}function vo(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function Hr(e,t,n){return Math.floor(e/t)!==n}function lr(e,t){return t<0||t>=e.current.length}function Es(e,t){return tt(e,{disabledIndices:t})}function Ol(e,t){return tt(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function tt(e,{startingIndex:t=-1,decrement:n=!1,disabledIndices:r,amount:o=1}={}){let s=t;do s+=n?-o:o;while(s>=0&&s<=e.current.length-1&&cr(e,s,r));return s}function sx(e,{event:t,orientation:n,loopFocus:r,rtl:o,cols:s,disabledIndices:i,minIndex:a,maxIndex:l,prevIndex:c,stopEvent:d=!1}){let p=c;const g=[],f={};let h=!1;{let y=null,x=-1;e.current.forEach((w,C)=>{if(w==null)return;const S=w.closest('[role="row"]');S&&(h=!0),(S!==y||x===-1)&&(y=S,x+=1,g[x]=[]),g[x].push(C),f[C]=x})}const m=h&&g.length>0&&g.some(y=>y.length!==s);function b(y){if(!m||c===-1)return;const x=f[c];if(x==null)return;const w=g[x].indexOf(c);let C=y==="up"?x-1:x+1;r&&(C<0?C=g.length-1:C>=g.length&&(C=0));const S=new Set;for(;C>=0&&C<g.length&&!S.has(C);){S.add(C);const I=g[C];if(I.length===0){C=y==="up"?C-1:C+1;continue}const E=Math.min(w,I.length-1);for(let R=E;R>=0;R-=1){const F=I[R];if(!cr(e,F,i))return F}C=y==="up"?C-1:C+1,r&&(C<0?C=g.length-1:C>=g.length&&(C=0))}}if(t.key===Yi){const y=b("up");if(y!==void 0)d&&De(t),p=y;else{if(d&&De(t),c===-1)p=l;else if(p=tt(e,{startingIndex:p,amount:s,decrement:!0,disabledIndices:i}),r&&(c-s<a||p<0)){const x=c%s,w=l%s,C=l-(w-x);w===x?p=l:p=w>x?C:C-s}lr(e,p)&&(p=c)}}if(t.key===xr){const y=b("down");y!==void 0?(d&&De(t),p=y):(d&&De(t),c===-1?p=a:(p=tt(e,{startingIndex:c,amount:s,disabledIndices:i}),r&&c+s>l&&(p=tt(e,{startingIndex:c%s-s,amount:s,disabledIndices:i}))),lr(e,p)&&(p=c))}if(n==="both"){const y=Ln(c/s);t.key===(o?cn:un)&&(d&&De(t),c%s!==s-1?(p=tt(e,{startingIndex:c,disabledIndices:i}),r&&Hr(p,s,y)&&(p=tt(e,{startingIndex:c-c%s-1,disabledIndices:i}))):r&&(p=tt(e,{startingIndex:c-c%s-1,disabledIndices:i})),Hr(p,s,y)&&(p=c)),t.key===(o?un:cn)&&(d&&De(t),c%s!==0?(p=tt(e,{startingIndex:c,decrement:!0,disabledIndices:i}),r&&Hr(p,s,y)&&(p=tt(e,{startingIndex:c+(s-c%s),decrement:!0,disabledIndices:i}))):r&&(p=tt(e,{startingIndex:c+(s-c%s),decrement:!0,disabledIndices:i})),Hr(p,s,y)&&(p=c));const x=Ln(l/s)===y;lr(e,p)&&(r&&x?p=t.key===(o?un:cn)?l:tt(e,{startingIndex:c-c%s-1,disabledIndices:i}):p=c)}return p}function ix(e,t,n){const r=[];let o=0;return e.forEach(({width:s,height:i},a)=>{if(s>t&&process.env.NODE_ENV!=="production")throw new Error(`[Floating UI]: Invalid grid - item width at index ${a} is greater than grid columns`);let l=!1;for(;!l;){const c=[];for(let d=0;d<s;d+=1)for(let p=0;p<i;p+=1)c.push(o+d+p*t);o%t+s<=t&&c.every(d=>r[d]==null)?(c.forEach(d=>{r[d]=a}),l=!0):o+=1}}),[...r]}function ax(e,t,n,r,o){if(e===-1)return-1;const s=n.indexOf(e),i=t[e];switch(o){case"tl":return s;case"tr":return i?s+i.width-1:s;case"bl":return i?s+(i.height-1)*r:s;case"br":return n.lastIndexOf(e);default:return-1}}function lx(e,t){return t.flatMap((n,r)=>e.includes(n)?[r]:[])}function cr(e,t,n){if(typeof n=="function")return n(t);if(n)return n.includes(t);const r=e.current[t];return r?r.hasAttribute("disabled")||r.getAttribute("aria-disabled")==="true":!1}var cx=["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] *)"],xo=cx.join(","),ju=typeof Element>"u",Wn=ju?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,yo=!ju&&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?.ownerDocument},Co=function(t,n){var r;n===void 0&&(n=!0);var o=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),s=o===""||o==="true",i=s||n&&t&&(typeof t.closest=="function"?t.closest("[inert]"):Co(t.parentNode));return i},ux=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},$u=function(t,n,r){if(Co(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(xo));return n&&Wn.call(t,xo)&&o.unshift(t),o=o.filter(r),o},wo=function(t,n,r){for(var o=[],s=Array.from(t);s.length;){var i=s.shift();if(!Co(i,!1))if(i.tagName==="SLOT"){var a=i.assignedElements(),l=a.length?a:i.children,c=wo(l,!0,r);r.flatten?o.push.apply(o,c):o.push({scopeParent:i,candidates:c})}else{var d=Wn.call(i,xo);d&&r.filter(i)&&(n||!t.includes(i))&&o.push(i);var p=i.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(i),g=!Co(p,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(i));if(p&&g){var f=wo(p===!0?i.children:p.children,!0,r);r.flatten?o.push.apply(o,f):o.push({scopeParent:i,candidates:f})}else s.unshift.apply(s,i.children)}}return o},zu=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},Gu=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||ux(t))&&!zu(t)?0:t.tabIndex},dx=function(t,n){var r=Gu(t);return r<0&&n&&!zu(t)?0:r},fx=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},Hu=function(t){return t.tagName==="INPUT"},px=function(t){return Hu(t)&&t.type==="hidden"},gx=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},mx=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},hx=function(t){if(!t.name)return!0;var n=t.form||yo(t),r=function(a){return n.querySelectorAll('input[type="radio"][name="'+a+'"]')},o;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")o=r(window.CSS.escape(t.name));else try{o=r(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=mx(o,t.form);return!s||s===t},bx=function(t){return Hu(t)&&t.type==="radio"},vx=function(t){return bx(t)&&!hx(t)},xx=function(t){var n,r=t&&yo(t),o=(n=r)===null||n===void 0?void 0:n.host,s=!1;if(r&&r!==t){var i,a,l;for(s=!!((i=o)!==null&&i!==void 0&&(a=i.ownerDocument)!==null&&a!==void 0&&a.contains(o)||t!=null&&(l=t.ownerDocument)!==null&&l!==void 0&&l.contains(t));!s&&o;){var c,d,p;r=yo(o),o=(c=r)===null||c===void 0?void 0:c.host,s=!!((d=o)!==null&&d!==void 0&&(p=d.ownerDocument)!==null&&p!==void 0&&p.contains(o))}}return s},_l=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},yx=function(t,n){var r=n.displayCheck,o=n.getShadowRoot;if(r==="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=Wn.call(t,"details>summary:first-of-type"),a=i?t.parentElement:t;if(Wn.call(a,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="full-native"||r==="legacy-full"){if(typeof o=="function"){for(var l=t;t;){var c=t.parentElement,d=yo(t);if(c&&!c.shadowRoot&&o(c)===!0)return _l(t);t.assignedSlot?t=t.assignedSlot:!c&&d!==t.ownerDocument?t=d.host:t=c}t=l}if(xx(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return _l(t);return!1},Cx=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r<n.children.length;r++){var o=n.children.item(r);if(o.tagName==="LEGEND")return Wn.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},fi=function(t,n){return!(n.disabled||px(n)||yx(n,t)||gx(n)||Cx(n))},pi=function(t,n){return!(vx(n)||Gu(n)<0||!fi(t,n))},wx=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},Bu=function(t){var n=[],r=[];return t.forEach(function(o,s){var i=!!o.scopeParent,a=i?o.scopeParent:o,l=dx(a,i),c=i?Bu(o.candidates):a;l===0?i?n.push.apply(n,c):n.push(a):r.push({documentOrder:s,tabIndex:l,item:o,isScope:i,content:c})}),r.sort(fx).reduce(function(o,s){return s.isScope?o.push.apply(o,s.content):o.push(s.content),o},[]).concat(n)},Go=function(t,n){n=n||{};var r;return n.getShadowRoot?r=wo([t],n.includeContainer,{filter:pi.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:wx}):r=$u(t,n.includeContainer,pi.bind(null,n)),Bu(r)},Sx=function(t,n){n=n||{};var r;return n.getShadowRoot?r=wo([t],n.includeContainer,{filter:fi.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):r=$u(t,n.includeContainer,fi.bind(null,n)),r},Wu=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return Wn.call(t,xo)===!1?!1:pi(n,t)};function Ge(e){return e?.ownerDocument||document}const yr=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function Uu(e,t){const n=Go(e,yr()),r=n.length;if(r===0)return;const o=Ht(Ge(e)),s=n.indexOf(o),i=s===-1?t===1?0:r-1:s+t;return n[i]}function qu(e){return Uu(Ge(e).body,1)||e}function Ku(e){return Uu(Ge(e).body,-1)||e}function ur(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!Ie(n,r)}function Rx(e){Go(e,yr()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function Al(e){e.querySelectorAll("[data-tabindex]").forEach(n=>{const r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}function Ji(e){const{enabled:t=!0,open:n,ref:r,onComplete:o}=e,s=re(o),i=Mv(r,n,!1);u.useEffect(()=>{if(!t)return;const a=new AbortController;return i(s,a.signal),()=>{a.abort()}},[t,n,s,i])}const tr=0;class Un{static create(){return new Un}currentId=tr;start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=tr,n()},t)}isStarted(){return this.currentId!==tr}clear=()=>{this.currentId!==tr&&(clearTimeout(this.currentId),this.currentId=tr)};disposeEffect=()=>this.clear}function En(){const e=wt(Un.create).current;return Ru(e.disposeEffect),e}let Tl={},Ml={},Dl="";function Ex(e){if(typeof document>"u")return!1;const t=Ge(e);return Ze(t).innerWidth-t.documentElement.clientWidth>0}function Ix(e){if(!(typeof CSS<"u"&&CSS.supports&&CSS.supports("scrollbar-gutter","stable"))||typeof document>"u")return!1;const n=Ge(e),r=n.documentElement,o=n.body,s=bn(r)?r:o,i=s.style.overflowY,a=r.style.scrollbarGutter;r.style.scrollbarGutter="stable",s.style.overflowY="scroll";const l=s.offsetWidth;s.style.overflowY="hidden";const c=s.offsetWidth;return s.style.overflowY=i,r.style.scrollbarGutter=a,l===c}function kx(e){const t=Ge(e),n=t.documentElement,r=t.body,o=bn(n)?n:r,s={overflowY:o.style.overflowY,overflowX:o.style.overflowX};return Object.assign(o.style,{overflowY:"hidden",overflowX:"hidden"}),()=>{Object.assign(o.style,s)}}function Nx(e){const t=Ge(e),n=t.documentElement,r=t.body,o=Ze(n);let s=0,i=0,a=!1;const l=Tt.create();if(Au&&(o.visualViewport?.scale??1)!==1)return()=>{};function c(){const g=o.getComputedStyle(n),f=o.getComputedStyle(r),b=(g.scrollbarGutter||"").includes("both-edges")?"stable both-edges":"stable";s=n.scrollTop,i=n.scrollLeft,Tl={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},Dl=n.style.scrollBehavior,Ml={position:r.style.position,height:r.style.height,width:r.style.width,boxSizing:r.style.boxSizing,overflowY:r.style.overflowY,overflowX:r.style.overflowX,scrollBehavior:r.style.scrollBehavior};const y=n.scrollHeight>n.clientHeight,x=n.scrollWidth>n.clientWidth,w=g.overflowY==="scroll"||f.overflowY==="scroll",C=g.overflowX==="scroll"||f.overflowX==="scroll",S=Math.max(0,o.innerWidth-r.clientWidth),I=Math.max(0,o.innerHeight-r.clientHeight),E=parseFloat(f.marginTop)+parseFloat(f.marginBottom),R=parseFloat(f.marginLeft)+parseFloat(f.marginRight),F=bn(n)?n:r;if(a=Ix(e),a){n.style.scrollbarGutter=b,F.style.overflowY="hidden",F.style.overflowX="hidden";return}Object.assign(n.style,{scrollbarGutter:b,overflowY:"hidden",overflowX:"hidden"}),(y||w)&&(n.style.overflowY="scroll"),(x||C)&&(n.style.overflowX="scroll"),Object.assign(r.style,{position:"relative",height:E||I?`calc(100dvh - ${E+I}px)`:"100dvh",width:R||S?`calc(100vw - ${R+S}px)`:"100vw",boxSizing:"border-box",overflow:"hidden",scrollBehavior:"unset"}),r.scrollTop=s,r.scrollLeft=i,n.setAttribute("data-base-ui-scroll-locked",""),n.style.scrollBehavior="unset"}function d(){Object.assign(n.style,Tl),Object.assign(r.style,Ml),a||(n.scrollTop=s,n.scrollLeft=i,n.removeAttribute("data-base-ui-scroll-locked"),n.style.scrollBehavior=Dl)}function p(){d(),l.request(c)}return c(),o.addEventListener("resize",p),()=>{l.cancel(),d(),typeof o.removeEventListener=="function"&&o.removeEventListener("resize",p)}}class Px{lockCount=0;restore=null;timeoutLock=Un.create();timeoutUnlock=Un.create();acquire(t){return this.lockCount+=1,this.lockCount===1&&this.restore===null&&this.timeoutLock.start(0,()=>this.lock(t)),this.release}release=()=>{this.lockCount-=1,this.lockCount===0&&this.restore&&this.timeoutUnlock.start(0,this.unlock)};unlock=()=>{this.lockCount===0&&this.restore&&(this.restore?.(),this.restore=null)};lock(t){if(this.lockCount===0||this.restore!==null)return;const r=Ge(t).documentElement,o=Ze(r).getComputedStyle(r).overflowY;if(o==="hidden"||o==="clip"){this.restore=Ve;return}const s=Tu||!Ex(t);this.restore=s?kx(t):Nx(t)}}const Ox=new Px;function _x(e=!0,t=null){oe(()=>{if(e)return Ox.acquire(t)},[e,t])}function yt(e){const t=wt(Ax,e).current;return t.next=e,oe(t.effect),t}function Ax(e){const t={current:e,next:e,effect:()=>{t.current=t.next}};return t}function Tx(){const e=new Map;return{emit(t,n){e.get(t)?.forEach(r=>r(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){e.get(t)?.delete(n)}}}const Yu=u.createContext(null);process.env.NODE_ENV!=="production"&&(Yu.displayName="FloatingNodeContext");const Xu=u.createContext(null);process.env.NODE_ENV!=="production"&&(Xu.displayName="FloatingTreeContext");const Zu=()=>u.useContext(Yu)?.id||null,Ho=e=>{const t=u.useContext(Xu);return e??t};function So(e){return`data-base-ui-${e}`}const Qu={clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1},ea={...Qu,position:"fixed",top:0,left:0},Mx={...Qu,position:"absolute"},hr=u.forwardRef(function(t,n){const[r,o]=u.useState();oe(()=>{Gv&&o("button")},[]);const s={tabIndex:0,role:r};return v.jsx("span",{...t,ref:n,style:ea,"aria-hidden":r?void 0:!0,...s,"data-base-ui-focus-guard":""})});process.env.NODE_ENV!=="production"&&(hr.displayName="FocusGuard");let Fl=0;function dr(e,t={}){const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(Fl);const s=()=>e?.focus({preventScroll:n});o?s():Fl=requestAnimationFrame(s)}const zn={inert:new WeakMap,"aria-hidden":new WeakMap,none:new WeakMap};function Vl(e){return e==="inert"?zn.inert:e==="aria-hidden"?zn["aria-hidden"]:zn.none}let Br=new WeakSet,Wr={},Is=0;const Ju=e=>e&&(e.host||Ju(e.parentNode)),Dx=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=Ju(n);return e.contains(r)?r:null}).filter(n=>n!=null);function Fx(e,t,n,r){const o="data-base-ui-inert",s=r?"inert":n?"aria-hidden":null,i=Dx(t,e),a=new Set,l=new Set(i),c=[];Wr[o]||(Wr[o]=new WeakMap);const d=Wr[o];i.forEach(p),g(t),a.clear();function p(f){!f||a.has(f)||(a.add(f),f.parentNode&&p(f.parentNode))}function g(f){!f||l.has(f)||[].forEach.call(f.children,h=>{if(hn(h)!=="script")if(a.has(h))g(h);else{const m=s?h.getAttribute(s):null,b=m!==null&&m!=="false",y=Vl(s),x=(y.get(h)||0)+1,w=(d.get(h)||0)+1;y.set(h,x),d.set(h,w),c.push(h),x===1&&b&&Br.add(h),w===1&&h.setAttribute(o,""),!b&&s&&h.setAttribute(s,s==="inert"?"":"true")}})}return Is+=1,()=>{c.forEach(f=>{const h=Vl(s),b=(h.get(f)||0)-1,y=(d.get(f)||0)-1;h.set(f,b),d.set(f,y),b||(!Br.has(f)&&s&&f.removeAttribute(s),Br.delete(f)),y||f.removeAttribute(o)}),Is-=1,Is||(zn.inert=new WeakMap,zn["aria-hidden"]=new WeakMap,zn.none=new WeakMap,Br=new WeakSet,Wr={})}}function Vx(e,t=!1,n=!1){const r=Ge(e[0]).body;return Fx(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const ta=u.createContext(null);process.env.NODE_ENV!=="production"&&(ta.displayName="PortalContext");const ed=()=>u.useContext(ta),Lx=So("portal");function jx(e={}){const{ref:t,container:n,componentProps:r=rt,elementProps:o}=e,s=Hi(),a=ed()?.portalNode,[l,c]=u.useState(null),[d,p]=u.useState(null),g=re(b=>{b!==null&&p(b)}),f=u.useRef(null);oe(()=>{if(n===null){f.current&&(f.current=null,p(null),c(null));return}if(s==null)return;const b=(n&&(Ui(n)?n:n.current))??a??document.body;if(b==null){f.current&&(f.current=null,p(null),c(null));return}f.current!==b&&(f.current=b,p(null),c(b))},[n,a,s]);const h=ot("div",r,{ref:[t,g],props:[{id:s,[Lx]:""},o]});return{portalNode:d,portalSubtree:l&&h?gn.createPortal(h,l):null}}const td=u.forwardRef(function(t,n){const{children:r,container:o,className:s,render:i,renderGuards:a,...l}=t,{portalNode:c,portalSubtree:d}=jx({container:o,ref:n,componentProps:t,elementProps:l}),p=u.useRef(null),g=u.useRef(null),f=u.useRef(null),h=u.useRef(null),[m,b]=u.useState(null),y=m?.modal,x=m?.open,w=typeof a=="boolean"?a:!!m&&!m.modal&&m.open&&!!c;u.useEffect(()=>{if(!c||y)return;function S(I){c&&I.relatedTarget&&ur(I)&&(I.type==="focusin"?Al:Rx)(c)}return c.addEventListener("focusin",S,!0),c.addEventListener("focusout",S,!0),()=>{c.removeEventListener("focusin",S,!0),c.removeEventListener("focusout",S,!0)}},[c,y]),u.useEffect(()=>{!c||x||Al(c)},[x,c]);const C=u.useMemo(()=>({beforeOutsideRef:p,afterOutsideRef:g,beforeInsideRef:f,afterInsideRef:h,portalNode:c,setFocusManagerState:b}),[c]);return v.jsxs(u.Fragment,{children:[d,v.jsxs(ta.Provider,{value:C,children:[w&&c&&v.jsx(hr,{"data-type":"outside",ref:p,onFocus:S=>{if(ur(S,c))f.current?.focus();else{const I=m?m.domReference:null;Ku(I)?.focus()}}}),w&&c&&v.jsx("span",{"aria-owns":c.id,style:yv}),c&&gn.createPortal(r,c),w&&c&&v.jsx(hr,{"data-type":"outside",ref:g,onFocus:S=>{if(ur(S,c))h.current?.focus();else{const I=m?m.domReference:null;qu(I)?.focus(),m?.closeOnFocusOut&&m?.onOpenChange(!1,pe(Mo,S.nativeEvent))}}})]})]})});process.env.NODE_ENV!=="production"&&(td.displayName="FloatingPortal");function $x(e,t){const n=Ze(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 Ll=20;let on=[];function na(){on=on.filter(e=>e.deref()?.isConnected)}function zx(e){na(),e&&hn(e)!=="body"&&(on.push(new WeakRef(e)),on.length>Ll&&(on=on.slice(-Ll)))}function ks(){return na(),on[on.length-1]?.deref()}function Gx(e){if(!e)return null;const t=yr();return Wu(e,t)?e:Go(e,t)[0]||e}function Hx(e){return!e||!e.isConnected?!1:typeof e.checkVisibility=="function"?e.checkVisibility():ht(e).display!=="none"}function jl(e,t){if(!t.current.includes("floating")&&!e.getAttribute("role")?.includes("dialog"))return;const n=yr(),o=Sx(e,n).filter(i=>{const a=i.getAttribute("data-tabindex")||"";return Wu(i,n)||i.hasAttribute("data-tabindex")&&!a.startsWith("-")}),s=e.getAttribute("tabindex");t.current.includes("floating")||o.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 Bx(e){const{context:t,children:n,disabled:r=!1,initialFocus:o=!0,returnFocus:s=!0,restoreFocus:i=!1,modal:a=!0,closeOnFocusOut:l=!0,openInteractionType:c="",nextFocusableElement:d,previousFocusableElement:p,beforeContentFocusGuardRef:g,externalTree:f}=e,h="rootStore"in t?t.rootStore:t,m=h.useState("open"),b=h.useState("domReferenceElement"),y=h.useState("floatingElement"),{events:x,dataRef:w}=h.context,C=re(()=>w.current.floatingContext?.nodeId),S=o===!1,I=ci(b)&&S,E=u.useRef(["content"]),R=yt(o),F=yt(s),N=yt(c),T=Ho(f),_=ed(),q=u.useRef(null),Y=u.useRef(null),H=u.useRef(!1),P=u.useRef(!1),B=u.useRef(!1),z=u.useRef(-1),te=u.useRef(""),A=u.useRef(""),Re=u.useRef(null),ge=u.useRef(null),Ce=gr(Re,g,_?.beforeInsideRef),ae=gr(ge,_?.afterInsideRef),le=En(),ve=En(),Ee=Wi(),ke=_!=null,X=ui(y),me=re((M=X)=>M?Go(M,yr()):[]),we=re(M=>{const G=me(M);return E.current.map(()=>G).filter(Boolean).flat()});u.useEffect(()=>{if(r||!a)return;function M(fe){fe.key==="Tab"&&Ie(X,Ht(Ge(X)))&&me().length===0&&!I&&De(fe)}const G=Ge(X);return G.addEventListener("keydown",M),()=>{G.removeEventListener("keydown",M)}},[r,b,X,a,E,I,me,we]),u.useEffect(()=>{if(r||!m)return;const M=Ge(X);function G(){B.current=!1}function fe(W){const U=dt(W),D=Ie(y,U)||Ie(b,U)||Ie(_?.portalNode,U);B.current=!D,A.current=W.pointerType||"keyboard",U?.closest(`[${vv}]`)&&(P.current=!0)}function k(){A.current="keyboard"}return M.addEventListener("pointerdown",fe,!0),M.addEventListener("pointerup",G,!0),M.addEventListener("pointercancel",G,!0),M.addEventListener("keydown",k,!0),()=>{M.removeEventListener("pointerdown",fe,!0),M.removeEventListener("pointerup",G,!0),M.removeEventListener("pointercancel",G,!0),M.removeEventListener("keydown",k,!0)}},[r,y,b,X,m,_]),u.useEffect(()=>{if(r||!l)return;const M=Ge(X);function G(){P.current=!0,ve.start(0,()=>{P.current=!1})}function fe(K){const j=dt(K),ie=me().indexOf(j);ie!==-1&&(z.current=ie)}function k(K){const j=K.relatedTarget,Q=K.currentTarget,ie=dt(K);queueMicrotask(()=>{const xe=C(),We=h.context.triggerElements,st=j?.hasAttribute(So("focus-guard"))&&[Re.current,ge.current,_?.beforeInsideRef.current,_?.afterInsideRef.current,_?.beforeOutsideRef.current,_?.afterOutsideRef.current,zt(p),zt(d)].includes(j),Le=!(Ie(b,j)||Ie(y,j)||Ie(j,y)||Ie(_?.portalNode,j)||j!=null&&We.hasElement(j)||We.hasMatchingElement(Ne=>Ie(Ne,j))||st||T&&($n(T.nodesRef.current,xe).find(Ne=>Ie(Ne.context?.elements.floating,j)||Ie(Ne.context?.elements.domReference,j))||Il(T.nodesRef.current,xe).find(Ne=>[Ne.context?.elements.floating,ui(Ne.context?.elements.floating)].includes(j)||Ne.context?.elements.domReference===j)));if(Q===b&&X&&jl(X,E),i&&Q!==b&&!Hx(ie)&&Ht(M)===M.body){if(Be(X)&&(X.focus(),i==="popup")){Ee.request(()=>{X.focus()});return}const Ne=z.current,$e=me(),it=$e[Ne]||$e[$e.length-1]||X;Be(it)&&it.focus()}if(w.current.insideReactTree){w.current.insideReactTree=!1;return}(I||!a)&&j&&Le&&!P.current&&(I||j!==ks())&&(H.current=!0,h.setOpen(!1,pe(Mo,K)))})}function W(){B.current||(w.current.insideReactTree=!0,le.start(0,()=>{w.current.insideReactTree=!1}))}const U=Be(b)?b:null,D=[];if(!(!y&&!U))return U&&(U.addEventListener("focusout",k),U.addEventListener("pointerdown",G),D.push(()=>{U.removeEventListener("focusout",k),U.removeEventListener("pointerdown",G)})),y&&(y.addEventListener("focusin",fe),y.addEventListener("focusout",k),_&&(y.addEventListener("focusout",W,!0),D.push(()=>{y.removeEventListener("focusout",W,!0)})),D.push(()=>{y.removeEventListener("focusin",fe),y.removeEventListener("focusout",k)})),()=>{D.forEach(K=>{K()})}},[r,b,y,X,a,T,_,h,l,i,me,I,C,E,w,le,ve,Ee,d,p]),u.useEffect(()=>{if(r||!y||!m)return;const M=Array.from(_?.portalNode?.querySelectorAll(`[${So("portal")}]`)||[]),fe=(T?Il(T.nodesRef.current,C()):[]).find(W=>ci(W.context?.elements.domReference||null))?.context?.elements.domReference,k=[y,fe,...M,q.current,Y.current,Re.current,ge.current,_?.beforeOutsideRef.current,_?.afterOutsideRef.current,zt(p),zt(d),I?b:null].filter(W=>W!=null);return Vx(k,a||I)},[m,r,b,y,a,E,_,I,T,C,d,p]),oe(()=>{if(!m||r||!Be(X))return;const M=Ge(X),G=Ht(M);queueMicrotask(()=>{const fe=we(X),k=R.current,W=typeof k=="function"?k(N.current||""):k;if(W===void 0||W===!1)return;let U;W===!0||W===null?U=fe[0]||X:U=zt(W),U=U||fe[0]||X,!Ie(X,G)&&dr(U,{preventScroll:U===X})})},[r,m,X,S,we,R,N]),oe(()=>{if(r||!X)return;const M=Ge(X),G=Ht(M);zx(G);function fe(U){if(U.open||(te.current=$x(U.nativeEvent,A.current)),U.reason===Ev&&U.nativeEvent.type==="mouseleave"&&(H.current=!0),U.reason===Gi)if(U.nested)H.current=!1;else if(Fu(U.nativeEvent)||Vu(U.nativeEvent))H.current=!1;else{let D=!1;document.createElement("div").focus({get preventScroll(){return D=!0,!1}}),D?H.current=!1:H.current=!0}}x.on("openchange",fe);const k=M.createElement("span");k.setAttribute("tabindex","-1"),k.setAttribute("aria-hidden","true"),Object.assign(k.style,ea),ke&&b&&b.insertAdjacentElement("afterend",k);function W(){const U=F.current;let D=typeof U=="function"?U(te.current):U;if(D===void 0||D===!1)return null;if(D===null&&(D=!0),typeof D=="boolean"){const j=b||ks();return j&&j.isConnected?j:k}const K=b||ks()||k;return zt(D)||K}return()=>{x.off("openchange",fe);const U=Ht(M),D=Ie(y,U)||T&&$n(T.nodesRef.current,C(),!1).some(j=>Ie(j.context?.elements.floating,U)),K=W();queueMicrotask(()=>{const j=Gx(K),Q=typeof F.current!="boolean";F.current&&!H.current&&Be(j)&&(!(!Q&&j!==U&&U!==M.body)||D)&&j.focus({preventScroll:!0}),k.remove(),H.current=!1})}},[r,y,X,F,w,x,T,ke,b,C]),oe(()=>{if(!Au||m||!y)return;const M=Ht(Ge(y));!Be(M)||!Xi(M)||Ie(y,M)&&M.blur()},[m,y]),oe(()=>{if(!(r||!_))return _.setFocusManagerState({modal:a,closeOnFocusOut:l,open:m,onOpenChange:h.setOpen,domReference:b}),()=>{_.setFocusManagerState(null)}},[r,_,a,m,h,l,b]),oe(()=>{if(!(r||!X))return jl(X,E),()=>{queueMicrotask(na)}},[r,X,E]);const O=!r&&(a?!I:!0)&&(ke||a);return v.jsxs(u.Fragment,{children:[O&&v.jsx(hr,{"data-type":"inside",ref:Ce,onFocus:M=>{if(a){const G=we();dr(G[G.length-1])}else _?.portalNode&&(H.current=!1,ur(M,_.portalNode)?qu(b)?.focus():zt(p??_.beforeOutsideRef)?.focus())}}),n,O&&v.jsx(hr,{"data-type":"inside",ref:ae,onFocus:M=>{a?dr(we()[0]):_?.portalNode&&(l&&(H.current=!0),ur(M,_.portalNode)?Ku(b)?.focus():zt(d??_.afterOutsideRef)?.focus())}})]})}function nd(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.context.dataRef,{enabled:o=!0,event:s="click",toggle:i=!0,ignoreMouse:a=!1,stickIfOpen:l=!0,touchOpenDelay:c=0,reason:d=ri}=t,p=u.useRef(void 0),g=Wi(),f=En(),h=u.useMemo(()=>({onPointerDown(m){p.current=m.pointerType},onMouseDown(m){const b=p.current,y=m.nativeEvent,x=n.select("open");if(m.button!==0||s==="click"||kl(b)&&a)return;const w=r.current.openEvent,C=w?.type,S=n.select("domReferenceElement")!==m.currentTarget,I=x&&S||!(x&&i&&(!(w&&l)||C==="click"||C==="mousedown"));if(Xi(y.target)){const R=pe(d,y,y.target);I&&b==="touch"&&c>0?f.start(c,()=>{n.setOpen(!0,R)}):n.setOpen(I,R);return}const E=m.currentTarget;g.request(()=>{const R=pe(d,y,E);I&&b==="touch"&&c>0?f.start(c,()=>{n.setOpen(!0,R)}):n.setOpen(I,R)})},onClick(m){if(s==="mousedown-only")return;const b=p.current;if(s==="mousedown"&&b){p.current=void 0;return}if(kl(b)&&a)return;const y=n.select("open"),x=r.current.openEvent,w=n.select("domReferenceElement")!==m.currentTarget,C=y&&w||!(y&&i&&(!(x&&l)||Lu(x))),S=pe(d,m.nativeEvent,m.currentTarget);C&&b==="touch"&&c>0?f.start(c,()=>{n.setOpen(!0,S)}):n.setOpen(C,S)},onKeyDown(){p.current=void 0}}),[r,s,a,n,l,i,g,f,c,d]);return u.useMemo(()=>o?{reference:h}:rt,[o,h])}function $l(e,t,n){let{reference:r,floating:o}=e;const s=Ct(t),i=zo(t),a=$o(i),l=mt(t),c=s==="y",d=r.x+r.width/2-o.width/2,p=r.y+r.height/2-o.height/2,g=r[a]/2-o[a]/2;let f;switch(l){case"top":f={x:d,y:r.y-o.height};break;case"bottom":f={x:d,y:r.y+r.height};break;case"right":f={x:r.x+r.width,y:p};break;case"left":f={x:r.x-o.width,y:p};break;default:f={x:r.x,y:r.y}}switch(Yt(t)){case"start":f[i]-=g*(n&&c?-1:1);break;case"end":f[i]+=g*(n&&c?-1:1);break}return f}async function Wx(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:s,rects:i,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:p="floating",altBoundary:g=!1,padding:f=0}=Ft(t,e),h=Qi(f),b=a[g?p==="floating"?"reference":"floating":p],y=vo(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(a.floating)),boundary:c,rootBoundary:d,strategy:l})),x=p==="floating"?{x:r,y:o,width:i.floating.width,height:i.floating.height}:i.reference,w=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),C=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},S=vo(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:x,offsetParent:w,strategy:l}):x);return{top:(y.top-S.top+h.top)/C.y,bottom:(S.bottom-y.bottom+h.bottom)/C.y,left:(y.left-S.left+h.left)/C.x,right:(S.right-y.right+h.right)/C.x}}const Ux=50,qx=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:s=[],platform:i}=n,a=i.detectOverflow?i:{...i,detectOverflow:Wx},l=await(i.isRTL==null?void 0:i.isRTL(t));let c=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:d,y:p}=$l(c,r,l),g=r,f=0;const h={};for(let m=0;m<s.length;m++){const b=s[m];if(!b)continue;const{name:y,fn:x}=b,{x:w,y:C,data:S,reset:I}=await x({x:d,y:p,initialPlacement:r,placement:g,strategy:o,middlewareData:h,rects:c,platform:a,elements:{reference:e,floating:t}});d=w??d,p=C??p,h[y]={...h[y],...S},I&&f<Ux&&(f++,typeof I=="object"&&(I.placement&&(g=I.placement),I.rects&&(c=I.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):I.rects),{x:d,y:p}=$l(c,g,l)),m=-1)}return{x:d,y:p,placement:g,strategy:o,middlewareData:h}},Kx=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:s,platform:i,elements:a,middlewareData:l}=t,{element:c,padding:d=0}=Ft(e,t)||{};if(c==null)return{};const p=Qi(d),g={x:n,y:r},f=zo(o),h=$o(f),m=await i.getDimensions(c),b=f==="y",y=b?"top":"left",x=b?"bottom":"right",w=b?"clientHeight":"clientWidth",C=s.reference[h]+s.reference[f]-g[f]-s.floating[h],S=g[f]-s.reference[f],I=await(i.getOffsetParent==null?void 0:i.getOffsetParent(c));let E=I?I[w]:0;(!E||!await(i.isElement==null?void 0:i.isElement(I)))&&(E=a.floating[w]||s.floating[h]);const R=C/2-S/2,F=E/2-m[h]/2-1,N=fn(p[y],F),T=fn(p[x],F),_=N,q=E-m[h]-T,Y=E/2-m[h]/2+R,H=ho(_,Y,q),P=!l.arrow&&Yt(o)!=null&&Y!==H&&s.reference[h]/2-(Y<_?N:T)-m[h]/2<0,B=P?Y<_?Y-_:Y-q:0;return{[f]:g[f]+B,data:{[f]:H,centerOffset:Y-H-B,...P&&{alignmentOffset:B}},reset:P}}}),Yx=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:s,rects:i,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:d=!0,crossAxis:p=!0,fallbackPlacements:g,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:m=!0,...b}=Ft(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const y=mt(o),x=Ct(a),w=mt(a)===a,C=await(l.isRTL==null?void 0:l.isRTL(c.floating)),S=g||(w||!m?[bo(a)]:Jv(a)),I=h!=="none";!g&&I&&S.push(...rx(a,m,h,C));const E=[a,...S],R=await l.detectOverflow(t,b),F=[];let N=((r=s.flip)==null?void 0:r.overflows)||[];if(d&&F.push(R[y]),p){const Y=Qv(o,i,C);F.push(R[Y[0]],R[Y[1]])}if(N=[...N,{placement:o,overflows:F}],!F.every(Y=>Y<=0)){var T,_;const Y=(((T=s.flip)==null?void 0:T.index)||0)+1,H=E[Y];if(H&&(!(p==="alignment"?x!==Ct(H):!1)||N.every(z=>Ct(z.placement)===x?z.overflows[0]>0:!0)))return{data:{index:Y,overflows:N},reset:{placement:H}};let P=(_=N.filter(B=>B.overflows[0]<=0).sort((B,z)=>B.overflows[1]-z.overflows[1])[0])==null?void 0:_.placement;if(!P)switch(f){case"bestFit":{var q;const B=(q=N.filter(z=>{if(I){const te=Ct(z.placement);return te===x||te==="y"}return!0}).map(z=>[z.placement,z.overflows.filter(te=>te>0).reduce((te,A)=>te+A,0)]).sort((z,te)=>z[1]-te[1])[0])==null?void 0:q[0];B&&(P=B);break}case"initialPlacement":P=a;break}if(o!==P)return{reset:{placement:P}}}return{}}}};function zl(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Gl(e){return Xv.some(t=>e[t]>=0)}const Xx=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:o="referenceHidden",...s}=Ft(e,t);switch(o){case"referenceHidden":{const i=await r.detectOverflow(t,{...s,elementContext:"reference"}),a=zl(i,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:Gl(a)}}}case"escaped":{const i=await r.detectOverflow(t,{...s,altBoundary:!0}),a=zl(i,n.floating);return{data:{escapedOffsets:a,escaped:Gl(a)}}}default:return{}}}}},rd=new Set(["left","top"]);async function Zx(e,t){const{placement:n,platform:r,elements:o}=e,s=await(r.isRTL==null?void 0:r.isRTL(o.floating)),i=mt(n),a=Yt(n),l=Ct(n)==="y",c=rd.has(i)?-1:1,d=s&&l?-1:1,p=Ft(t,e);let{mainAxis:g,crossAxis:f,alignmentAxis:h}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return a&&typeof h=="number"&&(f=a==="end"?h*-1:h),l?{x:f*d,y:g*c}:{x:g*c,y:f*d}}const Qx=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:s,placement:i,middlewareData:a}=t,l=await Zx(t,e);return i===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+l.x,y:s+l.y,data:{...l,placement:i}}}}},Jx=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o,platform:s}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:l={fn:y=>{let{x,y:w}=y;return{x,y:w}}},...c}=Ft(e,t),d={x:n,y:r},p=await s.detectOverflow(t,c),g=Ct(mt(o)),f=Zi(g);let h=d[f],m=d[g];if(i){const y=f==="y"?"top":"left",x=f==="y"?"bottom":"right",w=h+p[y],C=h-p[x];h=ho(w,h,C)}if(a){const y=g==="y"?"top":"left",x=g==="y"?"bottom":"right",w=m+p[y],C=m-p[x];m=ho(w,m,C)}const b=l.fn({...t,[f]:h,[g]:m});return{...b,data:{x:b.x-n,y:b.y-r,enabled:{[f]:i,[g]:a}}}}}},ey=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:s,middlewareData:i}=t,{offset:a=0,mainAxis:l=!0,crossAxis:c=!0}=Ft(e,t),d={x:n,y:r},p=Ct(o),g=Zi(p);let f=d[g],h=d[p];const m=Ft(a,t),b=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){const w=g==="y"?"height":"width",C=s.reference[g]-s.floating[w]+b.mainAxis,S=s.reference[g]+s.reference[w]-b.mainAxis;f<C?f=C:f>S&&(f=S)}if(c){var y,x;const w=g==="y"?"width":"height",C=rd.has(mt(o)),S=s.reference[p]-s.floating[w]+(C&&((y=i.offset)==null?void 0:y[p])||0)+(C?0:b.crossAxis),I=s.reference[p]+s.reference[w]+(C?0:((x=i.offset)==null?void 0:x[p])||0)-(C?b.crossAxis:0);h<S?h=S:h>I&&(h=I)}return{[g]:f,[p]:h}}}},ty=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:s,platform:i,elements:a}=t,{apply:l=()=>{},...c}=Ft(e,t),d=await i.detectOverflow(t,c),p=mt(o),g=Yt(o),f=Ct(o)==="y",{width:h,height:m}=s.floating;let b,y;p==="top"||p==="bottom"?(b=p,y=g===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?"start":"end")?"left":"right"):(y=p,b=g==="end"?"top":"bottom");const x=m-d.top-d.bottom,w=h-d.left-d.right,C=fn(m-d[b],x),S=fn(h-d[y],w),I=!t.middlewareData.shift;let E=C,R=S;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(R=w),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(E=x),I&&!g){const N=gt(d.left,0),T=gt(d.right,0),_=gt(d.top,0),q=gt(d.bottom,0);f?R=h-2*(N!==0||T!==0?N+T:gt(d.left,d.right)):E=m-2*(_!==0||q!==0?_+q:gt(d.top,d.bottom))}await l({...t,availableWidth:R,availableHeight:E});const F=await i.getDimensions(a.floating);return h!==F.width||m!==F.height?{reset:{rects:!0}}:{}}}};function od(e){const t=ht(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Be(e),s=o?e.offsetWidth:n,i=o?e.offsetHeight:r,a=mo(n)!==s||mo(r)!==i;return a&&(n=s,r=i),{width:n,height:r,$:a}}function ra(e){return Fe(e)?e:e.contextElement}function Gn(e){const t=ra(e);if(!Be(t))return Dt(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=od(t);let i=(s?mo(n.width):n.width)/r,a=(s?mo(n.height):n.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!a||!Number.isFinite(a))&&(a=1),{x:i,y:a}}const ny=Dt(0);function sd(e){const t=Ze(e);return!Vo()||!t.visualViewport?ny:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function ry(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Ze(e)?!1:t}function In(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),s=ra(e);let i=Dt(1);t&&(r?Fe(r)&&(i=Gn(r)):i=Gn(e));const a=ry(s,n,r)?sd(s):Dt(0);let l=(o.left+a.x)/i.x,c=(o.top+a.y)/i.y,d=o.width/i.x,p=o.height/i.y;if(s){const g=Ze(s),f=r&&Fe(r)?Ze(r):r;let h=g,m=ii(h);for(;m&&r&&f!==h;){const b=Gn(m),y=m.getBoundingClientRect(),x=ht(m),w=y.left+(m.clientLeft+parseFloat(x.paddingLeft))*b.x,C=y.top+(m.clientTop+parseFloat(x.paddingTop))*b.y;l*=b.x,c*=b.y,d*=b.x,p*=b.y,l+=w,c+=C,h=Ze(m),m=ii(h)}}return vo({width:d,height:p,x:l,y:c})}function Bo(e,t){const n=Lo(e).scrollLeft;return t?t.left+n:In(Lt(e)).left+n}function id(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Bo(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function oy(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const s=o==="fixed",i=Lt(r),a=t?Fo(t.floating):!1;if(r===i||a&&s)return n;let l={scrollLeft:0,scrollTop:0},c=Dt(1);const d=Dt(0),p=Be(r);if((p||!p&&!s)&&((hn(r)!=="body"||bn(i))&&(l=Lo(r)),p)){const f=In(r);c=Gn(r),d.x=f.x+r.clientLeft,d.y=f.y+r.clientTop}const g=i&&!p&&!s?id(i,l):Dt(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+d.x+g.x,y:n.y*c.y-l.scrollTop*c.y+d.y+g.y}}function sy(e){return Array.from(e.getClientRects())}function iy(e){const t=Lt(e),n=Lo(e),r=e.ownerDocument.body,o=gt(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=gt(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+Bo(e);const a=-n.scrollTop;return ht(r).direction==="rtl"&&(i+=gt(t.clientWidth,r.clientWidth)-o),{width:o,height:s,x:i,y:a}}const Hl=25;function ay(e,t){const n=Ze(e),r=Lt(e),o=n.visualViewport;let s=r.clientWidth,i=r.clientHeight,a=0,l=0;if(o){s=o.width,i=o.height;const d=Vo();(!d||d&&t==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}const c=Bo(r);if(c<=0){const d=r.ownerDocument,p=d.body,g=getComputedStyle(p),f=d.compatMode==="CSS1Compat"&&parseFloat(g.marginLeft)+parseFloat(g.marginRight)||0,h=Math.abs(r.clientWidth-p.clientWidth-f);h<=Hl&&(s-=h)}else c<=Hl&&(s+=c);return{width:s,height:i,x:a,y:l}}function ly(e,t){const n=In(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,s=Be(e)?Gn(e):Dt(1),i=e.clientWidth*s.x,a=e.clientHeight*s.y,l=o*s.x,c=r*s.y;return{width:i,height:a,x:l,y:c}}function Bl(e,t,n){let r;if(t==="viewport")r=ay(e,n);else if(t==="document")r=iy(Lt(e));else if(Fe(t))r=ly(t,n);else{const o=sd(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return vo(r)}function ad(e,t){const n=qt(e);return n===t||!Fe(n)||Wt(n)?!1:ht(n).position==="fixed"||ad(n,t)}function cy(e,t){const n=t.get(e);if(n)return n;let r=ln(e,[],!1).filter(a=>Fe(a)&&hn(a)!=="body"),o=null;const s=ht(e).position==="fixed";let i=s?qt(e):e;for(;Fe(i)&&!Wt(i);){const a=ht(i),l=qi(i);!l&&a.position==="fixed"&&(o=null),(s?!l&&!o:!l&&a.position==="static"&&!!o&&(o.position==="absolute"||o.position==="fixed")||bn(i)&&!l&&ad(e,i))?r=r.filter(d=>d!==i):o=a,i=qt(i)}return t.set(e,r),r}function uy(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[...n==="clippingAncestors"?Fo(t)?[]:cy(t,this._c):[].concat(n),r],a=Bl(t,i[0],o);let l=a.top,c=a.right,d=a.bottom,p=a.left;for(let g=1;g<i.length;g++){const f=Bl(t,i[g],o);l=gt(f.top,l),c=fn(f.right,c),d=fn(f.bottom,d),p=gt(f.left,p)}return{width:c-p,height:d-l,x:p,y:l}}function dy(e){const{width:t,height:n}=od(e);return{width:t,height:n}}function fy(e,t,n){const r=Be(t),o=Lt(t),s=n==="fixed",i=In(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const l=Dt(0);function c(){l.x=Bo(o)}if(r||!r&&!s)if((hn(t)!=="body"||bn(o))&&(a=Lo(t)),r){const f=In(t,!0,s,t);l.x=f.x+t.clientLeft,l.y=f.y+t.clientTop}else o&&c();s&&!r&&o&&c();const d=o&&!r&&!s?id(o,a):Dt(0),p=i.left+a.scrollLeft-l.x-d.x,g=i.top+a.scrollTop-l.y-d.y;return{x:p,y:g,width:i.width,height:i.height}}function Ns(e){return ht(e).position==="static"}function Wl(e,t){if(!Be(e)||ht(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Lt(e)===n&&(n=n.ownerDocument.body),n}function ld(e,t){const n=Ze(e);if(Fo(e))return n;if(!Be(e)){let o=qt(e);for(;o&&!Wt(o);){if(Fe(o)&&!Ns(o))return o;o=qt(o)}return n}let r=Wl(e,t);for(;r&&Dv(r)&&Ns(r);)r=Wl(r,t);return r&&Wt(r)&&Ns(r)&&!qi(r)?n:r||Lv(e)||n}const py=async function(e){const t=this.getOffsetParent||ld,n=this.getDimensions,r=await n(e.floating);return{reference:fy(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function gy(e){return ht(e).direction==="rtl"}const my={convertOffsetParentRelativeRectToViewportRelativeRect:oy,getDocumentElement:Lt,getClippingRect:uy,getOffsetParent:ld,getElementRects:py,getClientRects:sy,getDimensions:dy,getScale:Gn,isElement:Fe,isRTL:gy};function cd(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function hy(e,t){let n=null,r;const o=Lt(e);function s(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function i(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),s();const c=e.getBoundingClientRect(),{left:d,top:p,width:g,height:f}=c;if(a||t(),!g||!f)return;const h=Ln(p),m=Ln(o.clientWidth-(d+g)),b=Ln(o.clientHeight-(p+f)),y=Ln(d),w={rootMargin:-h+"px "+-m+"px "+-b+"px "+-y+"px",threshold:gt(0,fn(1,l))||1};let C=!0;function S(I){const E=I[0].intersectionRatio;if(E!==l){if(!C)return i();E?i(!1,E):r=setTimeout(()=>{i(!1,1e-7)},1e3)}E===1&&!cd(c,e.getBoundingClientRect())&&i(),C=!1}try{n=new IntersectionObserver(S,{...w,root:o.ownerDocument})}catch{n=new IntersectionObserver(S,w)}n.observe(e)}return i(!0),s}function gi(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=ra(e),d=o||s?[...c?ln(c):[],...t?ln(t):[]]:[];d.forEach(y=>{o&&y.addEventListener("scroll",n,{passive:!0}),s&&y.addEventListener("resize",n)});const p=c&&a?hy(c,n):null;let g=-1,f=null;i&&(f=new ResizeObserver(y=>{let[x]=y;x&&x.target===c&&f&&t&&(f.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var w;(w=f)==null||w.observe(t)})),n()}),c&&!l&&f.observe(c),t&&f.observe(t));let h,m=l?In(e):null;l&&b();function b(){const y=In(e);m&&!cd(m,y)&&n(),m=y,h=requestAnimationFrame(b)}return n(),()=>{var y;d.forEach(x=>{o&&x.removeEventListener("scroll",n),s&&x.removeEventListener("resize",n)}),p?.(),(y=f)==null||y.disconnect(),f=null,l&&cancelAnimationFrame(h)}}const by=Qx,vy=Jx,xy=Yx,yy=ty,Cy=Xx,Ul=Kx,wy=ey,Sy=(e,t,n)=>{const r=new Map,o={platform:my,...n},s={...o.platform,_c:r};return qx(e,t,{...o,platform:s})};var Ry=typeof document<"u",Ey=function(){},ao=Ry?Te.useLayoutEffect:Ey;function Ro(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,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Ro(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const s=o[r];if(!(s==="_owner"&&e.$$typeof)&&!Ro(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function ud(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function ql(e,t){const n=ud(e);return Math.round(t*n)/n}function Ps(e){const t=u.useRef(e);return ao(()=>{t.current=e}),t}function dd(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:s,floating:i}={},transform:a=!0,whileElementsMounted:l,open:c}=e,[d,p]=u.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[g,f]=u.useState(r);Ro(g,r)||f(r);const[h,m]=u.useState(null),[b,y]=u.useState(null),x=u.useCallback(z=>{z!==I.current&&(I.current=z,m(z))},[]),w=u.useCallback(z=>{z!==E.current&&(E.current=z,y(z))},[]),C=s||h,S=i||b,I=u.useRef(null),E=u.useRef(null),R=u.useRef(d),F=l!=null,N=Ps(l),T=Ps(o),_=Ps(c),q=u.useCallback(()=>{if(!I.current||!E.current)return;const z={placement:t,strategy:n,middleware:g};T.current&&(z.platform=T.current),Sy(I.current,E.current,z).then(te=>{const A={...te,isPositioned:_.current!==!1};Y.current&&!Ro(R.current,A)&&(R.current=A,gn.flushSync(()=>{p(A)}))})},[g,t,n,T,_]);ao(()=>{c===!1&&R.current.isPositioned&&(R.current.isPositioned=!1,p(z=>({...z,isPositioned:!1})))},[c]);const Y=u.useRef(!1);ao(()=>(Y.current=!0,()=>{Y.current=!1}),[]),ao(()=>{if(C&&(I.current=C),S&&(E.current=S),C&&S){if(N.current)return N.current(C,S,q);q()}},[C,S,q,N,F]);const H=u.useMemo(()=>({reference:I,floating:E,setReference:x,setFloating:w}),[x,w]),P=u.useMemo(()=>({reference:C,floating:S}),[C,S]),B=u.useMemo(()=>{const z={position:n,left:0,top:0};if(!P.floating)return z;const te=ql(P.floating,d.x),A=ql(P.floating,d.y);return a?{...z,transform:"translate("+te+"px, "+A+"px)",...ud(P.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:te,top:A}},[n,a,P.floating,d.x,d.y]);return u.useMemo(()=>({...d,update:q,refs:H,elements:P,floatingStyles:B}),[d,q,H,P,B])}const Iy=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?Ul({element:r.current,padding:o}).fn(n):{}:r?Ul({element:r,padding:o}).fn(n):{}}}},fd=(e,t)=>{const n=by(e);return{name:n.name,fn:n.fn,options:[e,t]}},pd=(e,t)=>{const n=vy(e);return{name:n.name,fn:n.fn,options:[e,t]}},gd=(e,t)=>({fn:wy(e).fn,options:[e,t]}),md=(e,t)=>{const n=xy(e);return{name:n.name,fn:n.fn,options:[e,t]}},hd=(e,t)=>{const n=yy(e);return{name:n.name,fn:n.fn,options:[e,t]}},bd=(e,t)=>{const n=Cy(e);return{name:n.name,fn:n.fn,options:[e,t]}},ky=(e,t)=>{const n=Iy(e);return{name:n.name,fn:n.fn,options:[e,t]}},Ny={intentional:"onClick",sloppy:"onPointerDown"};function Py(e){return{escapeKey:typeof e=="boolean"?e:e?.escapeKey??!1,outsidePress:typeof e=="boolean"?e:e?.outsidePress??!0}}function Oy(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.useState("open"),o=n.useState("floatingElement"),s=n.useState("referenceElement"),i=n.useState("domReferenceElement"),{onOpenChange:a,dataRef:l}=n.context,{enabled:c=!0,escapeKey:d=!0,outsidePress:p=!0,outsidePressEvent:g="sloppy",referencePress:f=!1,referencePressEvent:h="sloppy",ancestorScroll:m=!1,bubbles:b,externalTree:y}=t,x=Ho(y),w=re(typeof p=="function"?p:()=>!1),C=typeof p=="function"?w:p,S=u.useRef(!1),{escapeKey:I,outsidePress:E}=Py(b),R=u.useRef(null),F=En(),N=En(),T=re(()=>{N.clear(),l.current.insideReactTree=!1}),_=u.useRef(!1),q=u.useRef(""),Y=re(O=>{q.current=O.pointerType}),H=re(()=>{const O=q.current,M=O==="pen"||!O?"mouse":O,G=typeof g=="function"?g():g;return typeof G=="string"?G:G[M]}),P=re(O=>{if(!r||!c||!d||O.key!=="Escape"||_.current)return;const M=l.current.floatingContext?.nodeId,G=x?$n(x.nodesRef.current,M):[];if(!I&&G.length>0){let W=!0;if(G.forEach(U=>{U.context?.open&&!U.context.dataRef.current.__escapeKeyBubbles&&(W=!1)}),!W)return}const fe=Yv(O)?O.nativeEvent:O,k=pe(Su,fe);n.setOpen(!1,k),!I&&!k.isPropagationAllowed&&O.stopPropagation()}),B=re(O=>{const M=H();return M==="intentional"&&O.type!=="click"||M==="sloppy"&&O.type==="click"}),z=re(()=>{l.current.insideReactTree=!0,N.start(0,T)}),te=re((O,M=!1)=>{if(B(O)){T();return}if(l.current.insideReactTree){T();return}if(H()==="intentional"&&M||typeof C=="function"&&!C(O))return;const G=dt(O),fe=`[${So("inert")}]`,k=Ge(n.select("floatingElement")).querySelectorAll(fe),W=n.context.triggerElements;if(G&&(W.hasElement(G)||W.hasMatchingElement(Q=>Ie(Q,G))))return;let U=Fe(G)?G:null;for(;U&&!Wt(U);){const Q=qt(U);if(Wt(Q)||!Fe(Q))break;U=Q}if(k.length&&Fe(G)&&!Kv(G)&&!Ie(G,n.select("floatingElement"))&&Array.from(k).every(Q=>!Ie(U,Q)))return;if(Be(G)&&!("touches"in O)){const Q=Wt(G),ie=ht(G),xe=/auto|scroll/,We=Q||xe.test(ie.overflowX),st=Q||xe.test(ie.overflowY),Le=We&&G.clientWidth>0&&G.scrollWidth>G.clientWidth,Ne=st&&G.clientHeight>0&&G.scrollHeight>G.clientHeight,$e=ie.direction==="rtl",it=Ne&&($e?O.offsetX<=G.offsetWidth-G.clientWidth:O.offsetX>G.clientWidth),nt=Le&&O.offsetY>G.clientHeight;if(it||nt)return}const D=l.current.floatingContext?.nodeId,K=x&&$n(x.nodesRef.current,D).some(Q=>Nt(O,Q.context?.elements.floating));if(Nt(O,n.select("floatingElement"))||Nt(O,n.select("domReferenceElement"))||K)return;const j=x?$n(x.nodesRef.current,D):[];if(j.length>0){let Q=!0;if(j.forEach(ie=>{ie.context?.open&&!ie.context.dataRef.current.__outsidePressBubbles&&(Q=!1)}),!Q)return}n.setOpen(!1,pe(Gi,O)),T()}),A=re(O=>{H()!=="sloppy"||O.pointerType==="touch"||!n.select("open")||!c||Nt(O,n.select("floatingElement"))||Nt(O,n.select("domReferenceElement"))||te(O)}),Re=re(O=>{if(H()!=="sloppy"||!n.select("open")||!c||Nt(O,n.select("floatingElement"))||Nt(O,n.select("domReferenceElement")))return;const M=O.touches[0];M&&(R.current={startTime:Date.now(),startX:M.clientX,startY:M.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},F.start(1e3,()=>{R.current&&(R.current.dismissOnTouchEnd=!1,R.current.dismissOnMouseDown=!1)}))}),ge=re(O=>{const M=dt(O);function G(){Re(O),M?.removeEventListener(O.type,G)}M?.addEventListener(O.type,G)}),Ce=re(O=>{const M=S.current;if(S.current=!1,F.clear(),O.type==="mousedown"&&R.current&&!R.current.dismissOnMouseDown)return;const G=dt(O);function fe(){O.type==="pointerdown"?A(O):te(O,M),G?.removeEventListener(O.type,fe)}G?.addEventListener(O.type,fe)}),ae=re(O=>{if(H()!=="sloppy"||!R.current||Nt(O,n.select("floatingElement"))||Nt(O,n.select("domReferenceElement")))return;const M=O.touches[0];if(!M)return;const G=Math.abs(M.clientX-R.current.startX),fe=Math.abs(M.clientY-R.current.startY),k=Math.sqrt(G*G+fe*fe);k>5&&(R.current.dismissOnTouchEnd=!0),k>10&&(te(O),F.clear(),R.current=null)}),le=re(O=>{const M=dt(O);function G(){ae(O),M?.removeEventListener(O.type,G)}M?.addEventListener(O.type,G)}),ve=re(O=>{H()!=="sloppy"||!R.current||Nt(O,n.select("floatingElement"))||Nt(O,n.select("domReferenceElement"))||(R.current.dismissOnTouchEnd&&te(O),F.clear(),R.current=null)}),Ee=re(O=>{const M=dt(O);function G(){ve(O),M?.removeEventListener(O.type,G)}M?.addEventListener(O.type,G)});u.useEffect(()=>{if(!r||!c)return;l.current.__escapeKeyBubbles=I,l.current.__outsidePressBubbles=E;const O=new Un;function M(U){n.setOpen(!1,pe(xt,U))}function G(){O.clear(),_.current=!0}function fe(){O.start(Vo()?5:0,()=>{_.current=!1})}const k=Ge(o);k.addEventListener("pointerdown",Y,!0),d&&(k.addEventListener("keydown",P),k.addEventListener("compositionstart",G),k.addEventListener("compositionend",fe)),C&&(k.addEventListener("click",Ce,!0),k.addEventListener("pointerdown",Ce,!0),k.addEventListener("touchstart",ge,!0),k.addEventListener("touchmove",le,!0),k.addEventListener("touchend",Ee,!0),k.addEventListener("mousedown",Ce,!0));let W=[];return m&&(Fe(i)&&(W=ln(i)),Fe(o)&&(W=W.concat(ln(o))),!Fe(s)&&s&&s.contextElement&&(W=W.concat(ln(s.contextElement)))),W=W.filter(U=>U!==k.defaultView?.visualViewport),W.forEach(U=>{U.addEventListener("scroll",M,{passive:!0})}),()=>{k.removeEventListener("pointerdown",Y,!0),d&&(k.removeEventListener("keydown",P),k.removeEventListener("compositionstart",G),k.removeEventListener("compositionend",fe)),C&&(k.removeEventListener("click",Ce,!0),k.removeEventListener("pointerdown",Ce,!0),k.removeEventListener("touchstart",ge,!0),k.removeEventListener("touchmove",le,!0),k.removeEventListener("touchend",Ee,!0),k.removeEventListener("mousedown",Ce,!0)),W.forEach(U=>{U.removeEventListener("scroll",M)}),O.clear(),S.current=!1}},[l,o,s,i,d,C,r,a,m,c,I,E,P,te,Ce,A,ge,le,Ee,Y,n]),u.useEffect(T,[C,T]);const ke=u.useMemo(()=>({onKeyDown:P,...f&&{[Ny[h]]:O=>{n.setOpen(!1,pe(ri,O.nativeEvent))},...h!=="intentional"&&{onClick(O){n.setOpen(!1,pe(ri,O.nativeEvent))}}}}),[P,n,f,h]),X=re(O=>{const M=dt(O.nativeEvent);!Ie(n.select("floatingElement"),M)||O.button!==0||(S.current=!0)}),me=re(O=>{!r||!c||O.button!==0||(S.current=!0)}),we=u.useMemo(()=>({onKeyDown:P,onPointerDown:X,onMouseDown:X,onMouseUp:X,onClickCapture:z,onMouseDownCapture(O){z(),me(O)},onPointerDownCapture(O){z(),me(O)},onMouseUpCapture:z,onTouchEndCapture:z,onTouchMoveCapture:z}),[P,X,z,me]);return u.useMemo(()=>c?{reference:ke,floating:we,trigger:ke}:{},[c,ke,we])}var _y=(e,t,n)=>{if(t.length===1&&t[0]===n){let r=!1;try{const o={};e(o)===o&&(r=!0)}catch{}if(r){let o;try{throw new Error}catch(s){({stack:o}=s)}console.warn(`The result function returned its own inputs without modification. e.g
13
+ hover:shadow-[0_6px_16px_rgba(0,0,0,0.30)]`},active:{true:"",false:""}},defaultVariants:{variant:"light",active:!1},compoundVariants:[{variant:"light",active:!0,class:"bg-tertiary-bg border-default-border shadow-[0_2px_6px_rgba(0,0,0,0.1)]"},{variant:"dark",active:!0,class:"bg-tertiary-inverse-bg shadow-[0_2px_6px_rgba(0,0,0,0.25)]"}]}),uM=Ve("flex flex-col space-y-1.5 p-6"),cM=Ve(`group-data-[disabled=true]/card:text-disabled-text leading-none font-semibold
14
+ tracking-tight`),fM=Ve(`${vt("body-sm-regular")} text-muted-foreground
15
+ group-data-[disabled=true]/card:text-disabled-text`),dM=Ve("group-data-[disabled=true]/card:text-disabled-text p-6 pt-0"),pM=Ve("group-data-[disabled=true]/card:text-disabled-text flex items-center p-6 pt-0"),GS=({ref:e,className:t,variant:n,disabled:r,active:o,...i})=>C.jsx("div",{ref:e,"data-disabled":r||void 0,className:q(lM({variant:n,active:o}),t),...i});GS.displayName="Card";const WS=({ref:e,className:t,...n})=>C.jsx("div",{ref:e,className:q(uM(),t),...n});WS.displayName="CardHeader";const US=({ref:e,className:t,...n})=>C.jsx("div",{ref:e,className:q(cM(),t),...n});US.displayName="CardTitle";const qS=({ref:e,className:t,...n})=>C.jsx("div",{ref:e,className:q(fM(),t),...n});qS.displayName="CardDescription";const KS=({ref:e,className:t,...n})=>C.jsx("div",{ref:e,className:q(dM(),t),...n});KS.displayName="CardContent";const YS=({ref:e,className:t,...n})=>C.jsx("div",{ref:e,className:q(pM(),t),...n});YS.displayName="CardFooter";function hM(e,t){const n=v.createContext(t),r=i=>{const{children:a,...s}=i,l=v.useMemo(()=>s,Object.values(s));return C.jsx(n.Provider,{value:l,children:a})};r.displayName=e+"Provider";function o(i){const a=v.useContext(n);if(a)return a;if(t!==void 0)return t;throw new Error(`\`${i}\` must be used within \`${e}\``)}return[r,o]}function cr(e,t=[]){let n=[];function r(i,a){const s=v.createContext(a),l=n.length;n=[...n,a];const u=f=>{const{scope:p,children:d,...m}=f,g=p?.[e]?.[l]||s,h=v.useMemo(()=>m,Object.values(m));return C.jsx(g.Provider,{value:h,children:d})};u.displayName=i+"Provider";function c(f,p){const d=p?.[e]?.[l]||s,m=v.useContext(d);if(m)return m;if(a!==void 0)return a;throw new Error(`\`${f}\` must be used within \`${i}\``)}return[u,c]}const o=()=>{const i=n.map(a=>v.createContext(a));return function(s){const l=s?.[e]||i;return v.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return o.scopeName=e,[r,mM(o,...t)]}function mM(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const a=r.reduce((s,{useScope:l,scopeName:u})=>{const f=l(i)[`__scope${u}`];return{...s,...f}},{});return v.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function Fe(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e?.(o),n===!1||!o.defaultPrevented)return t?.(o)}}var fo=globalThis?.document?v.useLayoutEffect:()=>{},gM=v[" useInsertionEffect ".trim().toString()]||fo;function ii({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,i,a]=vM({defaultProp:t,onChange:n}),s=e!==void 0,l=s?e:o;{const c=v.useRef(e!==void 0);v.useEffect(()=>{const f=c.current;f!==s&&console.warn(`${r} is changing from ${f?"controlled":"uncontrolled"} to ${s?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),c.current=s},[s,r])}const u=v.useCallback(c=>{if(s){const f=yM(c)?c(e):c;f!==e&&a.current?.(f)}else i(c)},[s,e,i,a]);return[l,u]}function vM({defaultProp:e,onChange:t}){const[n,r]=v.useState(e),o=v.useRef(n),i=v.useRef(t);return gM(()=>{i.current=t},[t]),v.useEffect(()=>{o.current!==n&&(i.current?.(n),o.current=n)},[n,o]),[n,r,i]}function yM(e){return typeof e=="function"}function mm(e){const t=v.useRef({value:e,previous:e});return v.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function rc(e){const[t,n]=v.useState(void 0);return fo(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const i=o[0];let a,s;if("borderBoxSize"in i){const l=i.borderBoxSize,u=Array.isArray(l)?l[0]:l;a=u.inlineSize,s=u.blockSize}else a=e.offsetWidth,s=e.offsetHeight;n({width:a,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}function bM(e,t){return v.useReducer((n,r)=>t[n][r]??n,e)}var Tr=e=>{const{present:t,children:n}=e,r=xM(t),o=typeof n=="function"?n({present:r.isPresent}):v.Children.only(n),i=ut(r.ref,wM(o));return typeof n=="function"||r.isPresent?v.cloneElement(o,{ref:i}):null};Tr.displayName="Presence";function xM(e){const[t,n]=v.useState(),r=v.useRef(null),o=v.useRef(e),i=v.useRef("none"),a=e?"mounted":"unmounted",[s,l]=bM(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return v.useEffect(()=>{const u=qs(r.current);i.current=s==="mounted"?u:"none"},[s]),fo(()=>{const u=r.current,c=o.current;if(c!==e){const p=i.current,d=qs(u);e?l("MOUNT"):d==="none"||u?.display==="none"?l("UNMOUNT"):l(c&&p!==d?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),fo(()=>{if(t){let u;const c=t.ownerDocument.defaultView??window,f=d=>{const g=qs(r.current).includes(CSS.escape(d.animationName));if(d.target===t&&g&&(l("ANIMATION_END"),!o.current)){const h=t.style.animationFillMode;t.style.animationFillMode="forwards",u=c.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=h)})}},p=d=>{d.target===t&&(i.current=qs(r.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{c.clearTimeout(u),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:v.useCallback(u=>{r.current=u?getComputedStyle(u):null,n(u)},[])}}function qs(e){return e?.animationName||"none"}function wM(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function Gl(e){const t=CM(e),n=v.forwardRef((r,o)=>{const{children:i,...a}=r,s=v.Children.toArray(i),l=s.find(EM);if(l){const u=l.props.children,c=s.map(f=>f===l?v.Children.count(u)>1?v.Children.only(null):v.isValidElement(u)?u.props.children:null:f);return C.jsx(t,{...a,ref:o,children:v.isValidElement(u)?v.cloneElement(u,void 0,c):null})}return C.jsx(t,{...a,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}function CM(e){const t=v.forwardRef((n,r)=>{const{children:o,...i}=n;if(v.isValidElement(o)){const a=PM(o),s=OM(i,o.props);return o.type!==v.Fragment&&(s.ref=r?pm(r,a):a),v.cloneElement(o,s)}return v.Children.count(o)>1?v.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var XS=Symbol("radix.slottable");function SM(e){const t=({children:n})=>C.jsx(C.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=XS,t}function EM(e){return v.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===XS}function OM(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...s)=>{const l=i(...s);return o(...s),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function PM(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var _M=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ze=_M.reduce((e,t)=>{const n=Gl(`Primitive.${t}`),r=v.forwardRef((o,i)=>{const{asChild:a,...s}=o,l=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),C.jsx(l,{...s,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function AM(e,t){e&&go.flushSync(()=>e.dispatchEvent(t))}var oc="Checkbox",[RM]=cr(oc),[IM,gm]=RM(oc);function kM(e){const{__scopeCheckbox:t,checked:n,children:r,defaultChecked:o,disabled:i,form:a,name:s,onCheckedChange:l,required:u,value:c="on",internal_do_not_use_render:f}=e,[p,d]=ii({prop:n,defaultProp:o??!1,onChange:l,caller:oc}),[m,g]=v.useState(null),[h,y]=v.useState(null),b=v.useRef(!1),x=m?!!a||!!m.closest("form"):!0,w={checked:p,disabled:i,setChecked:d,control:m,setControl:g,name:s,form:a,value:c,hasConsumerStoppedPropagationRef:b,required:u,defaultChecked:io(o)?!1:o,isFormControl:x,bubbleInput:h,setBubbleInput:y};return C.jsx(IM,{scope:t,...w,children:NM(f)?f(w):r})}var ZS="CheckboxTrigger",QS=v.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},o)=>{const{control:i,value:a,disabled:s,checked:l,required:u,setControl:c,setChecked:f,hasConsumerStoppedPropagationRef:p,isFormControl:d,bubbleInput:m}=gm(ZS,e),g=ut(o,c),h=v.useRef(l);return v.useEffect(()=>{const y=i?.form;if(y){const b=()=>f(h.current);return y.addEventListener("reset",b),()=>y.removeEventListener("reset",b)}},[i,f]),C.jsx(ze.button,{type:"button",role:"checkbox","aria-checked":io(l)?"mixed":l,"aria-required":u,"data-state":rE(l),"data-disabled":s?"":void 0,disabled:s,value:a,...r,ref:g,onKeyDown:Fe(t,y=>{y.key==="Enter"&&y.preventDefault()}),onClick:Fe(n,y=>{f(b=>io(b)?!0:!b),m&&d&&(p.current=y.isPropagationStopped(),p.current||y.stopPropagation())})})});QS.displayName=ZS;var vm=v.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:o,defaultChecked:i,required:a,disabled:s,value:l,onCheckedChange:u,form:c,...f}=e;return C.jsx(kM,{__scopeCheckbox:n,checked:o,defaultChecked:i,disabled:s,required:a,onCheckedChange:u,name:r,form:c,value:l,internal_do_not_use_render:({isFormControl:p})=>C.jsxs(C.Fragment,{children:[C.jsx(QS,{...f,ref:t,__scopeCheckbox:n}),p&&C.jsx(nE,{__scopeCheckbox:n})]})})});vm.displayName=oc;var JS="CheckboxIndicator",eE=v.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...o}=e,i=gm(JS,n);return C.jsx(Tr,{present:r||io(i.checked)||i.checked===!0,children:C.jsx(ze.span,{"data-state":rE(i.checked),"data-disabled":i.disabled?"":void 0,...o,ref:t,style:{pointerEvents:"none",...e.style}})})});eE.displayName=JS;var tE="CheckboxBubbleInput",nE=v.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:r,hasConsumerStoppedPropagationRef:o,checked:i,defaultChecked:a,required:s,disabled:l,name:u,value:c,form:f,bubbleInput:p,setBubbleInput:d}=gm(tE,e),m=ut(n,d),g=mm(i),h=rc(r);v.useEffect(()=>{const b=p;if(!b)return;const x=window.HTMLInputElement.prototype,S=Object.getOwnPropertyDescriptor(x,"checked").set,E=!o.current;if(g!==i&&S){const O=new Event("click",{bubbles:E});b.indeterminate=io(i),S.call(b,io(i)?!1:i),b.dispatchEvent(O)}},[p,g,i,o]);const y=v.useRef(io(i)?!1:i);return C.jsx(ze.input,{type:"checkbox","aria-hidden":!0,defaultChecked:a??y.current,required:s,disabled:l,name:u,value:c,form:f,...t,tabIndex:-1,ref:m,style:{...t.style,...h,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});nE.displayName=tE;function NM(e){return typeof e=="function"}function io(e){return e==="indeterminate"}function rE(e){return io(e)?"indeterminate":e?"checked":"unchecked"}const oE=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();const TM=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const MM=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase());const Ay=e=>{const t=MM(e);return t.charAt(0).toUpperCase()+t.slice(1)};var DM={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"};const jM=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1};const $M=A.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:i,iconNode:a,...s},l)=>A.createElement("svg",{ref:l,...DM,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:oE("lucide",o),...!i&&!jM(s)&&{"aria-hidden":"true"},...s},[...a.map(([u,c])=>A.createElement(u,c)),...Array.isArray(i)?i:[i]]));const Te=(e,t)=>{const n=A.forwardRef(({className:r,...o},i)=>A.createElement($M,{ref:i,iconNode:t,className:oE(`lucide-${TM(Ay(e))}`,`lucide-${e}`,r),...o}));return n.displayName=Ay(e),n};const LM=[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M22 8c0-2.3-.8-4.3-2-6",key:"5bb3ad"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}],["path",{d:"M4 2C2.8 3.7 2 5.7 2 8",key:"tap9e0"}]],FM=Te("bell-ring",LM);const VM=[["path",{d:"M15 13a3 3 0 1 0-6 0",key:"10j68g"}],["path",{d:"M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20",key:"k3hazp"}],["circle",{cx:"12",cy:"8",r:"2",key:"1822b1"}]],zM=Te("book-user",VM);const BM=[["path",{d:"M12 12h.01",key:"1mp3jc"}],["path",{d:"M16 6V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v2",key:"1ksdt3"}],["path",{d:"M22 13a18.15 18.15 0 0 1-20 0",key:"12hx5q"}],["rect",{width:"20",height:"14",x:"2",y:"6",rx:"2",key:"i6l2r4"}]],HM=Te("briefcase-business",BM);const GM=[["path",{d:"M10 12h4",key:"a56b0p"}],["path",{d:"M10 8h4",key:"1sr2af"}],["path",{d:"M14 21v-3a2 2 0 0 0-4 0v3",key:"1rgiei"}],["path",{d:"M6 10H4a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-2",key:"secmi2"}],["path",{d:"M6 21V5a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v16",key:"16ra0t"}]],WM=Te("building-2",GM);const UM=[["path",{d:"M11 14h1v4",key:"fy54vd"}],["path",{d:"M16 2v4",key:"4m81vk"}],["path",{d:"M3 10h18",key:"8toen8"}],["path",{d:"M8 2v4",key:"1cmpym"}],["rect",{x:"3",y:"4",width:"18",height:"18",rx:"2",key:"12vinp"}]],qM=Te("calendar-1",UM);const KM=[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"m19 9-5 5-4-4-3 3",key:"2osh9i"}]],YM=Te("chart-line",KM);const XM=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],ZM=Te("chevron-down",XM);const QM=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],iE=Te("chevron-left",QM);const JM=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],aE=Te("chevron-right",JM);const eD=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],tD=Te("chevrons-up-down",eD);const nD=[["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"}]],rD=Te("circle-question-mark",nD);const oD=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6h4",key:"135r8i"}]],iD=Te("clock-3",oD);const aD=[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]],sD=Te("credit-card",aD);const lD=[["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}],["path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6",key:"1b0p4s"}]],uD=Te("dollar-sign",lD);const cD=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],sE=Te("ellipsis",cD);const fD=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],dD=Te("eye-off",fD);const pD=[["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"}]],hD=Te("eye",pD);const mD=[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]],gD=Te("folder-open",mD);const vD=[["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"}]],yD=Te("funnel",vD);const bD=[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]],xD=Te("layout-grid",bD);const wD=[["path",{d:"M2 5h20",key:"1fs1ex"}],["path",{d:"M6 12h12",key:"8npq4p"}],["path",{d:"M9 19h6",key:"456am0"}]],CD=Te("list-filter",wD);const SD=[["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"}],["rect",{x:"3",y:"4",width:"6",height:"6",rx:"1",key:"cif1o7"}]],ED=Te("list-todo",SD);const OD=[["path",{d:"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",key:"1sd12s"}]],PD=Te("message-circle",OD);const _D=[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]],AD=Te("package",_D);const RD=[["path",{d:"M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z",key:"e79jfc"}],["circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor",key:"1okk4w"}],["circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor",key:"f64h9f"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}]],ID=Te("palette",RD);const kD=[["path",{d:"M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384",key:"9njp5v"}]],ND=Te("phone",kD);const TD=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],MD=Te("plus",TD);const DD=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]],jD=Te("rotate-ccw",DD);const $D=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],LD=Te("search",$D);const FD=[["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"}]],VD=Te("settings",FD);const zD=[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]],BD=Te("tag",zD);const HD=[["path",{d:"M10 15H6a4 4 0 0 0-4 4v2",key:"1nfge6"}],["path",{d:"m14.305 16.53.923-.382",key:"1itpsq"}],["path",{d:"m15.228 13.852-.923-.383",key:"eplpkm"}],["path",{d:"m16.852 12.228-.383-.923",key:"13v3q0"}],["path",{d:"m16.852 17.772-.383.924",key:"1i8mnm"}],["path",{d:"m19.148 12.228.383-.923",key:"1q8j1v"}],["path",{d:"m19.53 18.696-.382-.924",key:"vk1qj3"}],["path",{d:"m20.772 13.852.924-.383",key:"n880s0"}],["path",{d:"m20.772 16.148.924.383",key:"1g6xey"}],["circle",{cx:"18",cy:"15",r:"3",key:"gjjjvw"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],GD=Te("user-cog",HD);const WD=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],UD=Te("users",WD);const qD=[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",key:"1ngwbx"}]],KD=Te("wrench",qD);const YD=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],XD=Te("x",YD);function lE({ref:e,className:t,color:n="currentColor",size:r=24,...o}){return C.jsx("svg",{ref:e,xmlns:"http://www.w3.org/2000/svg",width:r,height:r,fill:"none",stroke:n,strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round",className:t,...o,children:C.jsx("path",{d:"M13.4375 8.125L8.85414 12.5L6.5625 10.3125"})})}function uE({ref:e,className:t,color:n="currentColor",size:r=24,...o}){return C.jsxs("svg",{ref:e,xmlns:"http://www.w3.org/2000/svg",width:r,height:r,fill:"none",stroke:n,strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round",className:t,...o,children:[C.jsx("path",{d:"M13.4375 8.125L8.85414 12.5L6.5625 10.3125"}),C.jsx("path",{d:"M10 17.5C14.1421 17.5 17.5 14.1421 17.5 10C17.5 5.85786 14.1421 2.5 10 2.5C5.85786 2.5 2.5 5.85786 2.5 10C2.5 14.1421 5.85786 17.5 10 17.5Z"})]})}lE.displayName="Check";uE.displayName="CircleCheck";const ZD={settings:VD,plus:MD,wrench:KD,phone:ND,palette:ID,building:WM,close:XD,done:lE,check:uE,users:UD,"layout-grid":xD,bell:FM,"book-user":zM,"user-gear":GD,folder:gD,"briefcase-business":HM,calendar:qM,"chart-line":YM,message:PD,search:LD,"list-filter":CD,funnel:yD,dots:sE,"check-list":ED,tag:BD,chevron:ZM,chevrons:tD,"rotate-ccw":jD,question:rD,clock:iD,eye:hD,"eye-off":dD,package:AD,"credit-card":sD,"dollar-sign":uD},QD={xs:"w-2.5 h-2.5",sm:"w-3.75 h-3.75",md:"w-5 h-5",lg:"w-6.25 h-6.25"},Or=({type:e,size:t="md",viewBox:n="0 0 24 24",strokeWidth:r=1.5,classes:o,color:i,...a})=>{const s=ZD[e],l=QD[t],u=q(l,o?.icon);return C.jsx("div",{...a,className:o?.wrapper,children:C.jsx(s,{viewBox:n,strokeWidth:r,className:u,color:i})})},JD=["peer bg-primary-bg border-inp-default-border grid size-5 shrink-0 cursor-pointer place-content-center rounded border","focus-visible:ring-inp-focus-border focus-visible:ring-1 focus-visible:outline-none","text-transparent transition-all duration-200","disabled:cursor-not-allowed","disabled:border-disabled-border disabled:bg-disabled-bg","disabled:data-[state=checked]:bg-disabled-bg","disabled:data-[state=checked]:border-disabled-border","disabled:data-[state=checked]:text-disabled-text","data-[state=checked]:border-primary-inverse-bg","data-[state=checked]:bg-primary-inverse-bg data-[state=checked]:text-primary-inverse-text","enabled:hover:border-inp-hover-border","enabled:hover:data-[state=checked]:bg-primary-inverse-hover-bg","enabled:hover:data-[state=checked]:border-primary-inverse-hover-bg"].join(" "),ej="grid place-content-center text-current",ym=({className:e,ref:t,...n})=>C.jsx(vm,{ref:t,className:q(JD,e),...n,children:C.jsx(eE,{className:q(ej),children:C.jsx(Or,{type:"done",viewBox:"3 3 14 14"})})});ym.displayName=vm.displayName;function Nf({controlled:e,default:t,name:n,state:r="value"}){const{current:o}=v.useRef(e!==void 0),[i,a]=v.useState(t),s=o?e:i;if(process.env.NODE_ENV!=="production"){v.useEffect(()=>{o!==(e!==void 0)&&console.error([`Base UI: A component is changing the ${o?"":"un"}controlled ${r} state of ${n} to be ${o?"un":""}controlled.`,"Elements should not switch from uncontrolled to controlled (or vice versa).",`Decide between using a controlled or uncontrolled ${n} element for the lifetime of the component.`,"The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.","More info: https://fb.me/react-controlled-components"].join(`
16
+ `))},[r,n,e]);const{current:u}=v.useRef(t);v.useEffect(()=>{!o&&JSON.stringify(u)!==JSON.stringify(t)&&console.error([`Base UI: A component is changing the default ${r} state of an uncontrolled ${n} after being initialized. To suppress this warning opt to use a controlled ${n}.`].join(`
17
+ `))},[JSON.stringify(t)])}const l=v.useCallback(u=>{o||a(u)},[]);return[s,l]}const Ry={};function In(e,t){const n=v.useRef(Ry);return n.current===Ry&&(n.current=e(t)),n}const Tf=v[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],tj=Tf&&Tf!==v.useLayoutEffect?Tf:e=>e();function de(e){const t=In(nj).current;return t.next=e,tj(t.effect),t.trampoline}function nj(){const e={next:void 0,callback:rj,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function rj(){if(process.env.NODE_ENV!=="production")throw new Error("Base UI: Cannot call an event handler while rendering.")}const oj=()=>{},he=typeof document<"u"?v.useLayoutEffect:oj,bm=v.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},elementsRef:{current:[]},nextIndexRef:{current:0}});process.env.NODE_ENV!=="production"&&(bm.displayName="CompositeListContext");function ij(){return v.useContext(bm)}function cE(e){const{children:t,elementsRef:n,labelsRef:r,onMapChange:o}=e,i=de(o),a=v.useRef(0),s=In(sj).current,l=In(aj).current,[u,c]=v.useState(0),f=v.useRef(u),p=de((y,b)=>{l.set(y,b??null),f.current+=1,c(f.current)}),d=de(y=>{l.delete(y),f.current+=1,c(f.current)}),m=v.useMemo(()=>{const y=new Map;return Array.from(l.keys()).filter(x=>x.isConnected).sort(lj).forEach((x,w)=>{const S=l.get(x)??{};y.set(x,{...S,index:w})}),y},[l,u]);he(()=>{if(typeof MutationObserver!="function"||m.size===0)return;const y=new MutationObserver(b=>{const x=new Set,w=S=>x.has(S)?x.delete(S):x.add(S);b.forEach(S=>{S.removedNodes.forEach(w),S.addedNodes.forEach(w)}),x.size===0&&(f.current+=1,c(f.current))});return m.forEach((b,x)=>{x.parentElement&&y.observe(x.parentElement,{childList:!0})}),()=>{y.disconnect()}},[m]),he(()=>{f.current===u&&(n.current.length!==m.size&&(n.current.length=m.size),r&&r.current.length!==m.size&&(r.current.length=m.size),a.current=m.size),i(m)},[i,m,n,r,u]),he(()=>()=>{n.current=[]},[n]),he(()=>()=>{r&&(r.current=[])},[r]);const g=de(y=>(s.add(y),()=>{s.delete(y)}));he(()=>{s.forEach(y=>y(m))},[s,m]);const h=v.useMemo(()=>({register:p,unregister:d,subscribeMapChange:g,elementsRef:n,labelsRef:r,nextIndexRef:a}),[p,d,g,n,r,a]);return C.jsx(bm.Provider,{value:h,children:t})}function aj(){return new Map}function sj(){return new Set}function lj(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 fE=v.createContext(void 0);process.env.NODE_ENV!=="production"&&(fE.displayName="DirectionContext");function dE(){return v.useContext(fE)?.direction??"ltr"}function Gn(e,...t){const n=new URL("https://base-ui.com/production-error");return n.searchParams.set("code",e.toString()),t.forEach(r=>n.searchParams.append("args[]",r)),`Base UI error #${e}; visit ${n} for the full message.`}function Va(e,t,n,r){const o=In(pE).current;return cj(o,e,t,n,r)&&hE(o,[e,t,n,r]),o.callback}function uj(e){const t=In(pE).current;return fj(t,e)&&hE(t,e),t.callback}function pE(){return{callback:null,cleanup:null,refs:[]}}function cj(e,t,n,r,o){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==o}function fj(e,t){return e.refs.length!==t.length||e.refs.some((n,r)=>n!==t[r])}function hE(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 r=Array(t.length).fill(null);for(let o=0;o<t.length;o+=1){const i=t[o];if(i!=null)switch(typeof i){case"function":{const a=i(n);typeof a=="function"&&(r[o]=a);break}case"object":{i.current=n;break}}}e.cleanup=()=>{for(let o=0;o<t.length;o+=1){const i=t[o];if(i!=null)switch(typeof i){case"function":{const a=r[o];typeof a=="function"?a():i(null);break}case"object":{i.current=null;break}}}}}}}const dj=parseInt(v.version,10);function xm(e){return dj>=e}function Iy(e){if(!v.isValidElement(e))return null;const t=e,n=t.props;return(xm(19)?n?.ref:t.ref)??null}function jp(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function pj(e,t){const n={};for(const r in e){const o=e[r];if(t?.hasOwnProperty(r)){const i=t[r](o);i!=null&&Object.assign(n,i);continue}o===!0?n[`data-${r.toLowerCase()}`]="":o&&(n[`data-${r.toLowerCase()}`]=o.toString())}return n}function hj(e,t){return typeof e=="function"?e(t):e}function mj(e,t){return typeof e=="function"?e(t):e}const ka={};function mE(e,t,n,r,o){let i={...$p(e,ka)};return t&&(i=Tl(i,t)),n&&(i=Tl(i,n)),r&&(i=Tl(i,r)),i}function gj(e){if(e.length===0)return ka;if(e.length===1)return $p(e[0],ka);let t={...$p(e[0],ka)};for(let n=1;n<e.length;n+=1)t=Tl(t,e[n]);return t}function Tl(e,t){return gE(t)?t(e):vj(e,t)}function vj(e,t){if(!t)return e;for(const n in t){const r=t[n];switch(n){case"style":{e[n]=jp(e.style,r);break}case"className":{e[n]=vE(e.className,r);break}default:yj(n,r)?e[n]=bj(e[n],r):e[n]=r}}return e}function yj(e,t){const n=e.charCodeAt(0),r=e.charCodeAt(1),o=e.charCodeAt(2);return n===111&&r===110&&o>=65&&o<=90&&(typeof t=="function"||typeof t>"u")}function gE(e){return typeof e=="function"}function $p(e,t){return gE(e)?e(t):e??ka}function bj(e,t){return t?e?n=>{if(xj(n)){const o=n;Lp(o);const i=t(o);return o.baseUIHandlerPrevented||e?.(o),i}const r=t(n);return e?.(n),r}:t:e}function Lp(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function vE(e,t){return t?e?t+" "+e:t:e}function xj(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function et(){}const Ks=Object.freeze([]),Gt=Object.freeze({}),wj={style:{transition:"none"}},Cj="data-base-ui-click-trigger",Sj={fallbackAxisSide:"none"},Ej={clipPath:"inset(50%)",position:"fixed",top:0,left:0};function Kt(e,t,n={}){const r=t.render,o=Oj(t,n);if(n.enabled===!1)return null;const i=n.state??Gt;return _j(e,r,o,i)}function Oj(e,t={}){const{className:n,style:r,render:o}=e,{state:i=Gt,ref:a,props:s,stateAttributesMapping:l,enabled:u=!0}=t,c=u?hj(n,i):void 0,f=u?mj(r,i):void 0,p=u?pj(i,l):Gt,d=u?jp(p,Array.isArray(s)?gj(s):s)??Gt:Gt;return typeof document<"u"&&(u?Array.isArray(a)?d.ref=uj([d.ref,Iy(o),...a]):d.ref=Va(d.ref,Iy(o),a):Va(null,null)),u?(c!==void 0&&(d.className=vE(d.className,c)),f!==void 0&&(d.style=jp(d.style,f)),d):Gt}const Pj=Symbol.for("react.lazy");function _j(e,t,n,r){if(t){if(typeof t=="function")return t(n,r);const o=mE(n,t.props);o.ref=n.ref;let i=t;if(i?.$$typeof===Pj&&(i=v.Children.toArray(t)[0]),process.env.NODE_ENV!=="production"&&!v.isValidElement(i))throw new Error(["Base UI: The `render` prop was provided an invalid React element as `React.isValidElement(render)` is `false`.","A valid React element must be provided to the `render` prop because it is cloned with props to replace the default element.","https://base-ui.com/r/invalid-render-prop"].join(`
18
+ `));return v.cloneElement(i,o)}if(e&&typeof e=="string")return Aj(e,n);throw new Error(process.env.NODE_ENV!=="production"?"Base UI: Render element or function are not defined.":Gn(8))}function Aj(e,t){return e==="button"?A.createElement("button",{type:"button",...t,key:t.key}):e==="img"?A.createElement("img",{alt:"",...t,key:t.key}):v.createElement(e,t)}const On="none",Fp="trigger-press",Rj="trigger-hover",wm="outside-press",Ij="item-press",ky="clear-press",kj="chip-remove-press",Ei="input-change",Qr="input-clear",Nj="input-press",ic="focus-out",yE="escape-key",Na="list-navigation";function Oe(e,t,n,r){let o=!1,i=!1;const a=Gt;return{reason:e,event:t??new Event("base-ui"),cancel(){o=!0},allowPropagation(){i=!0},get isCanceled(){return o},get isPropagationAllowed(){return i},trigger:n,...a}}function fa(e,t,n){const r=n??Gt;return{reason:e,event:t??new Event("base-ui"),...r}}const Vp={...v};let Ny=0;function Tj(e,t="mui"){const[n,r]=v.useState(e),o=e||n;return v.useEffect(()=>{n==null&&(Ny+=1,r(`${t}-${Ny}`))},[n,t]),o}const Ty=Vp.useId;function Cm(e,t){if(Ty!==void 0){const n=Ty();return e??(t?`${t}-${n}`:n)}return Tj(e,t)}function Sm(e){return Cm(e,"base-ui")}const Mj=[];function bE(e){v.useEffect(e,Mj)}const Ys=null;let My=globalThis.requestAnimationFrame;class Dj{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=t=>{this.isScheduled=!1;const n=this.callbacks,r=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,r>0)for(let o=0;o<n.length;o+=1)n[o]?.(t)};request(t){const n=this.nextId;this.nextId+=1,this.callbacks.push(t),this.callbacksCount+=1;const r=process.env.NODE_ENV!=="production"&&My!==requestAnimationFrame&&(My=requestAnimationFrame,!0);return(!this.isScheduled||r)&&(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 Xs=new Dj;class Zn{static create(){return new Zn}static request(t){return Xs.request(t)}static cancel(t){return Xs.cancel(t)}currentId=Ys;request(t){this.cancel(),this.currentId=Xs.request(()=>{this.currentId=Ys,t()})}cancel=()=>{this.currentId!==Ys&&(Xs.cancel(this.currentId),this.currentId=Ys)};disposeEffect=()=>this.cancel}function Em(){const e=In(Zn.create).current;return bE(e.disposeEffect),e}function hr(e){return e==null?e:"current"in e?e.current:e}let za=(function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e})({});const jj={[za.startingStyle]:""},$j={[za.endingStyle]:""},xE={transitionStatus(e){return e==="starting"?jj:e==="ending"?$j:null}};function Lj(e,t=!1,n=!0){const r=Em();return de((o,i=null)=>{r.cancel();function a(){go.flushSync(o)}const s=hr(e);if(s==null)return;const l=s;if(typeof l.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED)o();else{let u=function(){const f=za.startingStyle;if(!l.hasAttribute(f)){r.request(c);return}const p=new MutationObserver(()=>{l.hasAttribute(f)||(p.disconnect(),c())});p.observe(l,{attributes:!0,attributeFilter:[f]}),i?.addEventListener("abort",()=>p.disconnect(),{once:!0})},c=function(){Promise.all(l.getAnimations().map(f=>f.finished)).then(()=>{i?.aborted||a()}).catch(()=>{const f=l.getAnimations();if(n){if(i?.aborted)return;a()}else f.length>0&&f.some(p=>p.pending||p.playState!=="finished")&&c()})};if(t){u();return}r.request(c)}})}function wE(e,t=!1,n=!1){const[r,o]=v.useState(e&&t?"idle":void 0),[i,a]=v.useState(e);return e&&!i&&(a(!0),o("starting")),!e&&i&&r!=="ending"&&!n&&o("ending"),!e&&!i&&r==="ending"&&o(void 0),he(()=>{if(!e&&i&&r!=="ending"&&n){const s=Zn.request(()=>{o("ending")});return()=>{Zn.cancel(s)}}},[e,i,r,n]),he(()=>{if(!e||t)return;const s=Zn.request(()=>{o(void 0)});return()=>{Zn.cancel(s)}},[t,e]),he(()=>{if(!e||!t)return;e&&i&&r!=="idle"&&o("starting");const s=Zn.request(()=>{o("idle")});return()=>{Zn.cancel(s)}},[t,e,i,o,r]),v.useMemo(()=>({mounted:i,setMounted:a,transitionStatus:r}),[i,r])}let CE=(function(e){return e[e.None=0]="None",e[e.GuessFromOrder=1]="GuessFromOrder",e})({});function SE(e={}){const{label:t,metadata:n,textRef:r,indexGuessBehavior:o,index:i}=e,{register:a,unregister:s,subscribeMapChange:l,elementsRef:u,labelsRef:c,nextIndexRef:f}=ij(),p=v.useRef(-1),[d,m]=v.useState(i??(o===CE.GuessFromOrder?()=>{if(p.current===-1){const y=f.current;f.current+=1,p.current=y}return p.current}:-1)),g=v.useRef(null),h=v.useCallback(y=>{if(g.current=y,d!==-1&&y!==null&&(u.current[d]=y,c)){const b=t!==void 0;c.current[d]=b?t:r?.current?.textContent??y.textContent}},[d,u,c,t,r]);return he(()=>{if(i!=null)return;const y=g.current;if(y)return a(y,n),()=>{s(y)}},[i,a,s,n]),he(()=>{if(i==null)return l(y=>{const b=g.current?y.get(g.current)?.index:null;b!=null&&m(b)})},[i,l,m]),v.useMemo(()=>({ref:h,index:d}),[d,h])}function ac(){return typeof window<"u"}function yo(e){return Om(e)?(e.nodeName||"").toLowerCase():"#document"}function Tt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function fr(e){var t;return(t=(Om(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Om(e){return ac()?e instanceof Node||e instanceof Tt(e).Node:!1}function Qe(e){return ac()?e instanceof Element||e instanceof Tt(e).Element:!1}function ct(e){return ac()?e instanceof HTMLElement||e instanceof Tt(e).HTMLElement:!1}function zp(e){return!ac()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Tt(e).ShadowRoot}function bo(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=gn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&o!=="inline"&&o!=="contents"}function Fj(e){return/^(table|td|th)$/.test(yo(e))}function sc(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const Vj=/transform|translate|scale|rotate|perspective|filter/,zj=/paint|layout|strict|content/,Ao=e=>!!e&&e!=="none";let Mf;function Pm(e){const t=Qe(e)?gn(e):e;return Ao(t.transform)||Ao(t.translate)||Ao(t.scale)||Ao(t.rotate)||Ao(t.perspective)||!lc()&&(Ao(t.backdropFilter)||Ao(t.filter))||Vj.test(t.willChange||"")||zj.test(t.contain||"")}function Bj(e){let t=Pr(e);for(;ct(t)&&!Cr(t);){if(Pm(t))return t;if(sc(t))return null;t=Pr(t)}return null}function lc(){return Mf==null&&(Mf=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Mf}function Cr(e){return/^(html|body|#document)$/.test(yo(e))}function gn(e){return Tt(e).getComputedStyle(e)}function uc(e){return Qe(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Pr(e){if(yo(e)==="html")return e;const t=e.assignedSlot||e.parentNode||zp(e)&&e.host||fr(e);return zp(t)?t.host:t}function EE(e){const t=Pr(e);return Cr(t)?e.ownerDocument?e.ownerDocument.body:e.body:ct(t)&&bo(t)?t:EE(t)}function ao(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=EE(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),a=Tt(o);if(i){const s=Bp(a);return t.concat(a,a.visualViewport||[],bo(o)?o:[],s&&n?ao(s):[])}else return t.concat(o,ao(o,[],n))}function Bp(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}let Hp;process.env.NODE_ENV!=="production"&&(Hp=new Set);function Dy(...e){if(process.env.NODE_ENV!=="production"){const t=e.join(" ");Hp.has(t)||(Hp.add(t),console.error(`Base UI: ${t}`))}}const OE=v.createContext(void 0);process.env.NODE_ENV!=="production"&&(OE.displayName="CompositeRootContext");function Hj(e=!1){const t=v.useContext(OE);if(t===void 0&&!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: CompositeRootContext is missing. Composite parts must be placed within <Composite.Root>.":Gn(16));return t}function Gj(e){const{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:o=0,isNativeButton:i}=e,a=r&&t!==!1,s=r&&t===!1;return{props:v.useMemo(()=>{const u={onKeyDown(c){n&&t&&c.key!=="Tab"&&c.preventDefault()}};return r||(u.tabIndex=o,!i&&n&&(u.tabIndex=t?o:-1)),(i&&(t||a)||!i&&n)&&(u["aria-disabled"]=n),i&&(!t||s)&&(u.disabled=n),u},[r,n,t,a,s,i,o])}}function cc(e={}){const{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:o=!0}=e,i=v.useRef(null),a=Hj(!0)!==void 0,s=de(()=>{const p=i.current;return!!(p?.tagName==="A"&&p?.href)}),{props:l}=Gj({focusableWhenDisabled:n,disabled:t,composite:a,tabIndex:r,isNativeButton:o});process.env.NODE_ENV!=="production"&&v.useEffect(()=>{if(!i.current)return;const p=i.current.tagName==="BUTTON";if(o){if(!p){const d=Vp.captureOwnerStack?.()||"";Dy(`A component that acts as a button expected a native <button> because the \`nativeButton\` prop is true. Rendering a non-<button> removes native button semantics, which can impact forms and accessibility. Use a real <button> in the \`render\` prop, or set \`nativeButton\` to \`false\`.${d}`)}}else if(p){const d=Vp.captureOwnerStack?.()||"";Dy(`A component that acts as a button expected a non-<button> because the \`nativeButton\` prop is false. Rendering a <button> keeps native behavior while Base UI applies non-native attributes and handlers, which can add unintended extra attributes (such as \`role\` or \`aria-disabled\`). Use a non-<button> in the \`render\` prop, or set \`nativeButton\` to \`true\`.${d}`)}},[o]);const u=v.useCallback(()=>{const p=i.current;Wj(p)&&a&&t&&l.disabled===void 0&&p.disabled&&(p.disabled=!1)},[t,l.disabled,a]);he(u,[u]);const c=v.useCallback((p={})=>{const{onClick:d,onMouseDown:m,onKeyUp:g,onKeyDown:h,onPointerDown:y,...b}=p;return mE({type:o?"button":void 0,onClick(w){if(t){w.preventDefault();return}d?.(w)},onMouseDown(w){t||m?.(w)},onKeyDown(w){if(t||(Lp(w),h?.(w)),w.baseUIHandlerPrevented)return;const S=w.target===w.currentTarget&&!o&&!s()&&!t,E=w.key==="Enter",O=w.key===" ";S&&((O||E)&&w.preventDefault(),E&&d?.(w))},onKeyUp(w){t||(Lp(w),g?.(w)),!w.baseUIHandlerPrevented&&w.target===w.currentTarget&&!o&&!t&&w.key===" "&&d?.(w)},onPointerDown(w){if(t){w.preventDefault();return}y?.(w)}},o?void 0:{role:"button"},l,b)},[t,l,o,s]),f=de(p=>{i.current=p,u()});return{getButtonProps:c,buttonRef:f}}function Wj(e){return ct(e)&&e.tagName==="BUTTON"}const ai=typeof navigator<"u",Df=Kj(),PE=Xj(),_m=Yj(),_E=typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter:none"),AE=Df.platform==="MacIntel"&&Df.maxTouchPoints>1?!0:/iP(hone|ad|od)|iOS/.test(Df.platform),jy=ai&&/firefox/i.test(_m),Uj=ai&&/apple/i.test(navigator.vendor),Wl=ai&&/android/i.test(PE)||/android/i.test(_m);ai&&PE.toLowerCase().startsWith("mac")&&navigator.maxTouchPoints;const qj=_m.includes("jsdom/");function Kj(){if(!ai)return{platform:"",maxTouchPoints:-1};const e=navigator.userAgentData;return e?.platform?{platform:e.platform,maxTouchPoints:navigator.maxTouchPoints}:{platform:navigator.platform??"",maxTouchPoints:navigator.maxTouchPoints??-1}}function Yj(){if(!ai)return"";const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:t,version:n})=>`${t}/${n}`).join(" "):navigator.userAgent}function Xj(){if(!ai)return"";const e=navigator.userAgentData;return e?.platform?e.platform:navigator.platform??""}const Gp="data-base-ui-focusable",RE="active",IE="selected",Zj="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",so="ArrowLeft",lo="ArrowRight",Am="ArrowUp",as="ArrowDown";function gr(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function Me(e,t){if(!e||!t)return!1;const n=t.getRootNode?.();if(e.contains(t))return!0;if(n&&zp(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function nn(e){return"composedPath"in e?e.composedPath()[0]:e.target}function Fn(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 Qj(e){return e.matches("html,body")}function Rm(e){return ct(e)&&e.matches(Zj)}function Wp(e){return e?e.getAttribute("role")==="combobox"&&Rm(e):!1}function Up(e){return e?e.hasAttribute(Gp)?e:e.querySelector(`[${Gp}]`)||e:null}function Ri(e,t,n=!0){return e.filter(o=>o.parentId===t&&(!n||o.context?.open)).flatMap(o=>[o,...Ri(e,o.id,n)])}function $y(e,t){let n=[],r=e.find(o=>o.id===t)?.parentId;for(;r;){const o=e.find(i=>i.id===r);r=o?.parentId,o&&(n=n.concat(o))}return n}function Ze(e){e.preventDefault(),e.stopPropagation()}function Jj(e){return"nativeEvent"in e}function kE(e){return e.pointerType===""&&e.isTrusted?!0:Wl&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function NE(e){return qj?!1:!Wl&&e.width===0&&e.height===0||Wl&&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 Ly(e,t){return["mouse","pen"].includes(e)}function TE(e){const t=e.type;return t==="click"||t==="mousedown"||t==="keydown"||t==="keyup"}const e2=["top","right","bottom","left"],po=Math.min,fn=Math.max,Ul=Math.round,Oi=Math.floor,tr=e=>({x:e,y:e}),t2={left:"right",right:"left",bottom:"top",top:"bottom"};function ql(e,t,n){return fn(e,po(t,n))}function or(e,t){return typeof e=="function"?e(t):e}function mn(e){return e.split("-")[0]}function Mr(e){return e.split("-")[1]}function Im(e){return e==="x"?"y":"x"}function fc(e){return e==="y"?"height":"width"}function _n(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function dc(e){return Im(_n(e))}function n2(e,t,n){n===void 0&&(n=!1);const r=Mr(e),o=dc(e),i=fc(o);let a=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=Kl(a)),[a,Kl(a)]}function r2(e){const t=Kl(e);return[qp(e),t,qp(t)]}function qp(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const Fy=["left","right"],Vy=["right","left"],o2=["top","bottom"],i2=["bottom","top"];function a2(e,t,n){switch(e){case"top":case"bottom":return n?t?Vy:Fy:t?Fy:Vy;case"left":case"right":return t?o2:i2;default:return[]}}function s2(e,t,n,r){const o=Mr(e);let i=a2(mn(e),n==="start",r);return o&&(i=i.map(a=>a+"-"+o),t&&(i=i.concat(i.map(qp)))),i}function Kl(e){const t=mn(e);return t2[t]+e.slice(t.length)}function l2(e){return{top:0,right:0,bottom:0,left:0,...e}}function km(e){return typeof e!="number"?l2(e):{top:e,right:e,bottom:e,left:e}}function Yl(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function Zs(e,t,n){return Math.floor(e/t)!==n}function Ta(e,t){return t<0||t>=e.current.length}function jf(e,t){return Lt(e,{disabledIndices:t})}function zy(e,t){return Lt(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function Lt(e,{startingIndex:t=-1,decrement:n=!1,disabledIndices:r,amount:o=1}={}){let i=t;do i+=n?-o:o;while(i>=0&&i<=e.current.length-1&&Ma(e,i,r));return i}function u2(e,{event:t,orientation:n,loopFocus:r,rtl:o,cols:i,disabledIndices:a,minIndex:s,maxIndex:l,prevIndex:u,stopEvent:c=!1}){let f=u;const p=[],d={};let m=!1;{let y=null,b=-1;e.current.forEach((x,w)=>{if(x==null)return;const S=x.closest('[role="row"]');S&&(m=!0),(S!==y||b===-1)&&(y=S,b+=1,p[b]=[]),p[b].push(w),d[w]=b})}const g=m&&p.length>0&&p.some(y=>y.length!==i);function h(y){if(!g||u===-1)return;const b=d[u];if(b==null)return;const x=p[b].indexOf(u);let w=y==="up"?b-1:b+1;r&&(w<0?w=p.length-1:w>=p.length&&(w=0));const S=new Set;for(;w>=0&&w<p.length&&!S.has(w);){S.add(w);const E=p[w];if(E.length===0){w=y==="up"?w-1:w+1;continue}const O=Math.min(x,E.length-1);for(let P=O;P>=0;P-=1){const N=E[P];if(!Ma(e,N,a))return N}w=y==="up"?w-1:w+1,r&&(w<0?w=p.length-1:w>=p.length&&(w=0))}}if(t.key===Am){const y=h("up");if(y!==void 0)c&&Ze(t),f=y;else{if(c&&Ze(t),u===-1)f=l;else if(f=Lt(e,{startingIndex:f,amount:i,decrement:!0,disabledIndices:a}),r&&(u-i<s||f<0)){const b=u%i,x=l%i,w=l-(x-b);x===b?f=l:f=x>b?w:w-i}Ta(e,f)&&(f=u)}}if(t.key===as){const y=h("down");y!==void 0?(c&&Ze(t),f=y):(c&&Ze(t),u===-1?f=s:(f=Lt(e,{startingIndex:u,amount:i,disabledIndices:a}),r&&u+i>l&&(f=Lt(e,{startingIndex:u%i-i,amount:i,disabledIndices:a}))),Ta(e,f)&&(f=u))}if(n==="both"){const y=Oi(u/i);t.key===(o?so:lo)&&(c&&Ze(t),u%i!==i-1?(f=Lt(e,{startingIndex:u,disabledIndices:a}),r&&Zs(f,i,y)&&(f=Lt(e,{startingIndex:u-u%i-1,disabledIndices:a}))):r&&(f=Lt(e,{startingIndex:u-u%i-1,disabledIndices:a})),Zs(f,i,y)&&(f=u)),t.key===(o?lo:so)&&(c&&Ze(t),u%i!==0?(f=Lt(e,{startingIndex:u,decrement:!0,disabledIndices:a}),r&&Zs(f,i,y)&&(f=Lt(e,{startingIndex:u+(i-u%i),decrement:!0,disabledIndices:a}))):r&&(f=Lt(e,{startingIndex:u+(i-u%i),decrement:!0,disabledIndices:a})),Zs(f,i,y)&&(f=u));const b=Oi(l/i)===y;Ta(e,f)&&(r&&b?f=t.key===(o?lo:so)?l:Lt(e,{startingIndex:u-u%i-1,disabledIndices:a}):f=u)}return f}function c2(e,t,n){const r=[];let o=0;return e.forEach(({width:i,height:a},s)=>{if(i>t&&process.env.NODE_ENV!=="production")throw new Error(`[Floating UI]: Invalid grid - item width at index ${s} is greater than grid columns`);let l=!1;for(;!l;){const u=[];for(let c=0;c<i;c+=1)for(let f=0;f<a;f+=1)u.push(o+c+f*t);o%t+i<=t&&u.every(c=>r[c]==null)?(u.forEach(c=>{r[c]=s}),l=!0):o+=1}}),[...r]}function f2(e,t,n,r,o){if(e===-1)return-1;const i=n.indexOf(e),a=t[e];switch(o){case"tl":return i;case"tr":return a?i+a.width-1:i;case"bl":return a?i+(a.height-1)*r:i;case"br":return n.lastIndexOf(e);default:return-1}}function d2(e,t){return t.flatMap((n,r)=>e.includes(n)?[r]:[])}function Ma(e,t,n){if(typeof n=="function")return n(t);if(n)return n.includes(t);const r=e.current[t];return r?r.hasAttribute("disabled")||r.getAttribute("aria-disabled")==="true":!1}var p2=["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] *)"],Xl=p2.join(","),ME=typeof Element>"u",$i=ME?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Zl=!ME&&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?.ownerDocument},Ql=function(t,n){var r;n===void 0&&(n=!0);var o=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),i=o===""||o==="true",a=i||n&&t&&(typeof t.closest=="function"?t.closest("[inert]"):Ql(t.parentNode));return a},h2=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},DE=function(t,n,r){if(Ql(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(Xl));return n&&$i.call(t,Xl)&&o.unshift(t),o=o.filter(r),o},Jl=function(t,n,r){for(var o=[],i=Array.from(t);i.length;){var a=i.shift();if(!Ql(a,!1))if(a.tagName==="SLOT"){var s=a.assignedElements(),l=s.length?s:a.children,u=Jl(l,!0,r);r.flatten?o.push.apply(o,u):o.push({scopeParent:a,candidates:u})}else{var c=$i.call(a,Xl);c&&r.filter(a)&&(n||!t.includes(a))&&o.push(a);var f=a.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(a),p=!Ql(f,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(a));if(f&&p){var d=Jl(f===!0?a.children:f.children,!0,r);r.flatten?o.push.apply(o,d):o.push({scopeParent:a,candidates:d})}else i.unshift.apply(i,a.children)}}return o},jE=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},$E=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||h2(t))&&!jE(t)?0:t.tabIndex},m2=function(t,n){var r=$E(t);return r<0&&n&&!jE(t)?0:r},g2=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},LE=function(t){return t.tagName==="INPUT"},v2=function(t){return LE(t)&&t.type==="hidden"},y2=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},b2=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},x2=function(t){if(!t.name)return!0;var n=t.form||Zl(t),r=function(s){return n.querySelectorAll('input[type="radio"][name="'+s+'"]')},o;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")o=r(window.CSS.escape(t.name));else try{o=r(t.name)}catch(a){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",a.message),!1}var i=b2(o,t.form);return!i||i===t},w2=function(t){return LE(t)&&t.type==="radio"},C2=function(t){return w2(t)&&!x2(t)},S2=function(t){var n,r=t&&Zl(t),o=(n=r)===null||n===void 0?void 0:n.host,i=!1;if(r&&r!==t){var a,s,l;for(i=!!((a=o)!==null&&a!==void 0&&(s=a.ownerDocument)!==null&&s!==void 0&&s.contains(o)||t!=null&&(l=t.ownerDocument)!==null&&l!==void 0&&l.contains(t));!i&&o;){var u,c,f;r=Zl(o),o=(u=r)===null||u===void 0?void 0:u.host,i=!!((c=o)!==null&&c!==void 0&&(f=c.ownerDocument)!==null&&f!==void 0&&f.contains(o))}}return i},By=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},E2=function(t,n){var r=n.displayCheck,o=n.getShadowRoot;if(r==="full-native"&&"checkVisibility"in t){var i=t.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!i}if(getComputedStyle(t).visibility==="hidden")return!0;var a=$i.call(t,"details>summary:first-of-type"),s=a?t.parentElement:t;if($i.call(s,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="full-native"||r==="legacy-full"){if(typeof o=="function"){for(var l=t;t;){var u=t.parentElement,c=Zl(t);if(u&&!u.shadowRoot&&o(u)===!0)return By(t);t.assignedSlot?t=t.assignedSlot:!u&&c!==t.ownerDocument?t=c.host:t=u}t=l}if(S2(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return By(t);return!1},O2=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r<n.children.length;r++){var o=n.children.item(r);if(o.tagName==="LEGEND")return $i.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},Kp=function(t,n){return!(n.disabled||v2(n)||E2(n,t)||y2(n)||O2(n))},Yp=function(t,n){return!(C2(n)||$E(n)<0||!Kp(t,n))},P2=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},FE=function(t){var n=[],r=[];return t.forEach(function(o,i){var a=!!o.scopeParent,s=a?o.scopeParent:o,l=m2(s,a),u=a?FE(o.candidates):s;l===0?a?n.push.apply(n,u):n.push(s):r.push({documentOrder:i,tabIndex:l,item:o,isScope:a,content:u})}),r.sort(g2).reduce(function(o,i){return i.isScope?o.push.apply(o,i.content):o.push(i.content),o},[]).concat(n)},pc=function(t,n){n=n||{};var r;return n.getShadowRoot?r=Jl([t],n.includeContainer,{filter:Yp.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:P2}):r=DE(t,n.includeContainer,Yp.bind(null,n)),FE(r)},_2=function(t,n){n=n||{};var r;return n.getShadowRoot?r=Jl([t],n.includeContainer,{filter:Kp.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):r=DE(t,n.includeContainer,Kp.bind(null,n)),r},VE=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return $i.call(t,Xl)===!1?!1:Yp(n,t)};function lt(e){return e?.ownerDocument||document}const ss=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function zE(e,t){const n=pc(e,ss()),r=n.length;if(r===0)return;const o=gr(lt(e)),i=n.indexOf(o),a=i===-1?t===1?0:r-1:i+t;return n[a]}function BE(e){return zE(lt(e).body,1)||e}function HE(e){return zE(lt(e).body,-1)||e}function Da(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!Me(n,r)}function A2(e){pc(e,ss()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function Hy(e){e.querySelectorAll("[data-tabindex]").forEach(n=>{const r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}function Nm(e){const{enabled:t=!0,open:n,ref:r,onComplete:o}=e,i=de(o),a=Lj(r,n,!1);v.useEffect(()=>{if(!t)return;const s=new AbortController;return a(i,s.signal),()=>{s.abort()}},[t,n,i,a])}const da=0;class Li{static create(){return new Li}currentId=da;start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=da,n()},t)}isStarted(){return this.currentId!==da}clear=()=>{this.currentId!==da&&(clearTimeout(this.currentId),this.currentId=da)};disposeEffect=()=>this.clear}function Uo(){const e=In(Li.create).current;return bE(e.disposeEffect),e}let Gy={},Wy={},Uy="";function R2(e){if(typeof document>"u")return!1;const t=lt(e);return Tt(t).innerWidth-t.documentElement.clientWidth>0}function I2(e){if(!(typeof CSS<"u"&&CSS.supports&&CSS.supports("scrollbar-gutter","stable"))||typeof document>"u")return!1;const n=lt(e),r=n.documentElement,o=n.body,i=bo(r)?r:o,a=i.style.overflowY,s=r.style.scrollbarGutter;r.style.scrollbarGutter="stable",i.style.overflowY="scroll";const l=i.offsetWidth;i.style.overflowY="hidden";const u=i.offsetWidth;return i.style.overflowY=a,r.style.scrollbarGutter=s,l===u}function k2(e){const t=lt(e),n=t.documentElement,r=t.body,o=bo(n)?n:r,i={overflowY:o.style.overflowY,overflowX:o.style.overflowX};return Object.assign(o.style,{overflowY:"hidden",overflowX:"hidden"}),()=>{Object.assign(o.style,i)}}function N2(e){const t=lt(e),n=t.documentElement,r=t.body,o=Tt(n);let i=0,a=0,s=!1;const l=Zn.create();if(_E&&(o.visualViewport?.scale??1)!==1)return()=>{};function u(){const p=o.getComputedStyle(n),d=o.getComputedStyle(r),h=(p.scrollbarGutter||"").includes("both-edges")?"stable both-edges":"stable";i=n.scrollTop,a=n.scrollLeft,Gy={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},Uy=n.style.scrollBehavior,Wy={position:r.style.position,height:r.style.height,width:r.style.width,boxSizing:r.style.boxSizing,overflowY:r.style.overflowY,overflowX:r.style.overflowX,scrollBehavior:r.style.scrollBehavior};const y=n.scrollHeight>n.clientHeight,b=n.scrollWidth>n.clientWidth,x=p.overflowY==="scroll"||d.overflowY==="scroll",w=p.overflowX==="scroll"||d.overflowX==="scroll",S=Math.max(0,o.innerWidth-r.clientWidth),E=Math.max(0,o.innerHeight-r.clientHeight),O=parseFloat(d.marginTop)+parseFloat(d.marginBottom),P=parseFloat(d.marginLeft)+parseFloat(d.marginRight),N=bo(n)?n:r;if(s=I2(e),s){n.style.scrollbarGutter=h,N.style.overflowY="hidden",N.style.overflowX="hidden";return}Object.assign(n.style,{scrollbarGutter:h,overflowY:"hidden",overflowX:"hidden"}),(y||x)&&(n.style.overflowY="scroll"),(b||w)&&(n.style.overflowX="scroll"),Object.assign(r.style,{position:"relative",height:O||E?`calc(100dvh - ${O+E}px)`:"100dvh",width:P||S?`calc(100vw - ${P+S}px)`:"100vw",boxSizing:"border-box",overflow:"hidden",scrollBehavior:"unset"}),r.scrollTop=i,r.scrollLeft=a,n.setAttribute("data-base-ui-scroll-locked",""),n.style.scrollBehavior="unset"}function c(){Object.assign(n.style,Gy),Object.assign(r.style,Wy),s||(n.scrollTop=i,n.scrollLeft=a,n.removeAttribute("data-base-ui-scroll-locked"),n.style.scrollBehavior=Uy)}function f(){c(),l.request(u)}return u(),o.addEventListener("resize",f),()=>{l.cancel(),c(),typeof o.removeEventListener=="function"&&o.removeEventListener("resize",f)}}class T2{lockCount=0;restore=null;timeoutLock=Li.create();timeoutUnlock=Li.create();acquire(t){return this.lockCount+=1,this.lockCount===1&&this.restore===null&&this.timeoutLock.start(0,()=>this.lock(t)),this.release}release=()=>{this.lockCount-=1,this.lockCount===0&&this.restore&&this.timeoutUnlock.start(0,this.unlock)};unlock=()=>{this.lockCount===0&&this.restore&&(this.restore?.(),this.restore=null)};lock(t){if(this.lockCount===0||this.restore!==null)return;const r=lt(t).documentElement,o=Tt(r).getComputedStyle(r).overflowY;if(o==="hidden"||o==="clip"){this.restore=et;return}const i=AE||!R2(t);this.restore=i?k2(t):N2(t)}}const M2=new T2;function D2(e=!0,t=null){he(()=>{if(e)return M2.acquire(t)},[e,t])}function Pn(e){const t=In(j2,e).current;return t.next=e,he(t.effect),t}function j2(e){const t={current:e,next:e,effect:()=>{t.current=t.next}};return t}function $2(){const e=new Map;return{emit(t,n){e.get(t)?.forEach(r=>r(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){e.get(t)?.delete(n)}}}const GE=v.createContext(null);process.env.NODE_ENV!=="production"&&(GE.displayName="FloatingNodeContext");const WE=v.createContext(null);process.env.NODE_ENV!=="production"&&(WE.displayName="FloatingTreeContext");const UE=()=>v.useContext(GE)?.id||null,hc=e=>{const t=v.useContext(WE);return e??t};function eu(e){return`data-base-ui-${e}`}const qE={clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1},Tm={...qE,position:"fixed",top:0,left:0},L2={...qE,position:"absolute"},Ba=v.forwardRef(function(t,n){const[r,o]=v.useState();he(()=>{Uj&&o("button")},[]);const i={tabIndex:0,role:r};return C.jsx("span",{...t,ref:n,style:Tm,"aria-hidden":r?void 0:!0,...i,"data-base-ui-focus-guard":""})});process.env.NODE_ENV!=="production"&&(Ba.displayName="FocusGuard");let qy=0;function ja(e,t={}){const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(qy);const i=()=>e?.focus({preventScroll:n});o?i():qy=requestAnimationFrame(i)}const Ii={inert:new WeakMap,"aria-hidden":new WeakMap,none:new WeakMap};function Ky(e){return e==="inert"?Ii.inert:e==="aria-hidden"?Ii["aria-hidden"]:Ii.none}let Qs=new WeakSet,Js={},$f=0;const KE=e=>e&&(e.host||KE(e.parentNode)),F2=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=KE(n);return e.contains(r)?r:null}).filter(n=>n!=null);function V2(e,t,n,r){const o="data-base-ui-inert",i=r?"inert":n?"aria-hidden":null,a=F2(t,e),s=new Set,l=new Set(a),u=[];Js[o]||(Js[o]=new WeakMap);const c=Js[o];a.forEach(f),p(t),s.clear();function f(d){!d||s.has(d)||(s.add(d),d.parentNode&&f(d.parentNode))}function p(d){!d||l.has(d)||[].forEach.call(d.children,m=>{if(yo(m)!=="script")if(s.has(m))p(m);else{const g=i?m.getAttribute(i):null,h=g!==null&&g!=="false",y=Ky(i),b=(y.get(m)||0)+1,x=(c.get(m)||0)+1;y.set(m,b),c.set(m,x),u.push(m),b===1&&h&&Qs.add(m),x===1&&m.setAttribute(o,""),!h&&i&&m.setAttribute(i,i==="inert"?"":"true")}})}return $f+=1,()=>{u.forEach(d=>{const m=Ky(i),h=(m.get(d)||0)-1,y=(c.get(d)||0)-1;m.set(d,h),c.set(d,y),h||(!Qs.has(d)&&i&&d.removeAttribute(i),Qs.delete(d)),y||d.removeAttribute(o)}),$f-=1,$f||(Ii.inert=new WeakMap,Ii["aria-hidden"]=new WeakMap,Ii.none=new WeakMap,Qs=new WeakSet,Js={})}}function z2(e,t=!1,n=!1){const r=lt(e[0]).body;return V2(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const Mm=v.createContext(null);process.env.NODE_ENV!=="production"&&(Mm.displayName="PortalContext");const YE=()=>v.useContext(Mm),B2=eu("portal");function H2(e={}){const{ref:t,container:n,componentProps:r=Gt,elementProps:o}=e,i=Cm(),s=YE()?.portalNode,[l,u]=v.useState(null),[c,f]=v.useState(null),p=de(h=>{h!==null&&f(h)}),d=v.useRef(null);he(()=>{if(n===null){d.current&&(d.current=null,f(null),u(null));return}if(i==null)return;const h=(n&&(Om(n)?n:n.current))??s??document.body;if(h==null){d.current&&(d.current=null,f(null),u(null));return}d.current!==h&&(d.current=h,f(null),u(h))},[n,s,i]);const m=Kt("div",r,{ref:[t,p],props:[{id:i,[B2]:""},o]});return{portalNode:c,portalSubtree:l&&m?go.createPortal(m,l):null}}const XE=v.forwardRef(function(t,n){const{children:r,container:o,className:i,render:a,renderGuards:s,...l}=t,{portalNode:u,portalSubtree:c}=H2({container:o,ref:n,componentProps:t,elementProps:l}),f=v.useRef(null),p=v.useRef(null),d=v.useRef(null),m=v.useRef(null),[g,h]=v.useState(null),y=g?.modal,b=g?.open,x=typeof s=="boolean"?s:!!g&&!g.modal&&g.open&&!!u;v.useEffect(()=>{if(!u||y)return;function S(E){u&&E.relatedTarget&&Da(E)&&(E.type==="focusin"?Hy:A2)(u)}return u.addEventListener("focusin",S,!0),u.addEventListener("focusout",S,!0),()=>{u.removeEventListener("focusin",S,!0),u.removeEventListener("focusout",S,!0)}},[u,y]),v.useEffect(()=>{!u||b||Hy(u)},[b,u]);const w=v.useMemo(()=>({beforeOutsideRef:f,afterOutsideRef:p,beforeInsideRef:d,afterInsideRef:m,portalNode:u,setFocusManagerState:h}),[u]);return C.jsxs(v.Fragment,{children:[c,C.jsxs(Mm.Provider,{value:w,children:[x&&u&&C.jsx(Ba,{"data-type":"outside",ref:f,onFocus:S=>{if(Da(S,u))d.current?.focus();else{const E=g?g.domReference:null;HE(E)?.focus()}}}),x&&u&&C.jsx("span",{"aria-owns":u.id,style:Ej}),u&&go.createPortal(r,u),x&&u&&C.jsx(Ba,{"data-type":"outside",ref:p,onFocus:S=>{if(Da(S,u))m.current?.focus();else{const E=g?g.domReference:null;BE(E)?.focus(),g?.closeOnFocusOut&&g?.onOpenChange(!1,Oe(ic,S.nativeEvent))}}})]})]})});process.env.NODE_ENV!=="production"&&(XE.displayName="FloatingPortal");function G2(e,t){const n=Tt(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 Yy=20;let no=[];function Dm(){no=no.filter(e=>e.deref()?.isConnected)}function W2(e){Dm(),e&&yo(e)!=="body"&&(no.push(new WeakRef(e)),no.length>Yy&&(no=no.slice(-Yy)))}function Lf(){return Dm(),no[no.length-1]?.deref()}function U2(e){if(!e)return null;const t=ss();return VE(e,t)?e:pc(e,t)[0]||e}function q2(e){return!e||!e.isConnected?!1:typeof e.checkVisibility=="function"?e.checkVisibility():gn(e).display!=="none"}function Xy(e,t){if(!t.current.includes("floating")&&!e.getAttribute("role")?.includes("dialog"))return;const n=ss(),o=_2(e,n).filter(a=>{const s=a.getAttribute("data-tabindex")||"";return VE(a,n)||a.hasAttribute("data-tabindex")&&!s.startsWith("-")}),i=e.getAttribute("tabindex");t.current.includes("floating")||o.length===0?i!=="0"&&e.setAttribute("tabindex","0"):(i!=="-1"||e.hasAttribute("data-tabindex")&&e.getAttribute("data-tabindex")!=="-1")&&(e.setAttribute("tabindex","-1"),e.setAttribute("data-tabindex","-1"))}function K2(e){const{context:t,children:n,disabled:r=!1,initialFocus:o=!0,returnFocus:i=!0,restoreFocus:a=!1,modal:s=!0,closeOnFocusOut:l=!0,openInteractionType:u="",nextFocusableElement:c,previousFocusableElement:f,beforeContentFocusGuardRef:p,externalTree:d}=e,m="rootStore"in t?t.rootStore:t,g=m.useState("open"),h=m.useState("domReferenceElement"),y=m.useState("floatingElement"),{events:b,dataRef:x}=m.context,w=de(()=>x.current.floatingContext?.nodeId),S=o===!1,E=Wp(h)&&S,O=v.useRef(["content"]),P=Pn(o),N=Pn(i),R=Pn(u),k=hc(d),_=YE(),T=v.useRef(null),F=v.useRef(null),V=v.useRef(!1),D=v.useRef(!1),B=v.useRef(!1),z=v.useRef(-1),Y=v.useRef(""),$=v.useRef(""),ye=v.useRef(null),ae=v.useRef(null),be=Va(ye,p,_?.beforeInsideRef),ne=Va(ae,_?.afterInsideRef),le=Uo(),Ee=Uo(),Pe=Em(),Se=_!=null,L=Up(y),U=de((W=L)=>W?pc(W,ss()):[]),G=de(W=>{const H=U(W);return O.current.map(()=>H).filter(Boolean).flat()});v.useEffect(()=>{if(r||!s)return;function W(pe){pe.key==="Tab"&&Me(L,gr(lt(L)))&&U().length===0&&!E&&Ze(pe)}const H=lt(L);return H.addEventListener("keydown",W),()=>{H.removeEventListener("keydown",W)}},[r,h,L,s,O,E,U,G]),v.useEffect(()=>{if(r||!g)return;const W=lt(L);function H(){B.current=!1}function pe(J){const ee=nn(J),K=Me(y,ee)||Me(h,ee)||Me(_?.portalNode,ee);B.current=!K,$.current=J.pointerType||"keyboard",ee?.closest(`[${Cj}]`)&&(D.current=!0)}function M(){$.current="keyboard"}return W.addEventListener("pointerdown",pe,!0),W.addEventListener("pointerup",H,!0),W.addEventListener("pointercancel",H,!0),W.addEventListener("keydown",M,!0),()=>{W.removeEventListener("pointerdown",pe,!0),W.removeEventListener("pointerup",H,!0),W.removeEventListener("pointercancel",H,!0),W.removeEventListener("keydown",M,!0)}},[r,y,h,L,g,_]),v.useEffect(()=>{if(r||!l)return;const W=lt(L);function H(){D.current=!0,Ee.start(0,()=>{D.current=!1})}function pe(te){const Z=nn(te),ve=U().indexOf(Z);ve!==-1&&(z.current=ve)}function M(te){const Z=te.relatedTarget,oe=te.currentTarget,ve=nn(te);queueMicrotask(()=>{const Re=w(),dt=m.context.triggerElements,Xt=Z?.hasAttribute(eu("focus-guard"))&&[ye.current,ae.current,_?.beforeInsideRef.current,_?.afterInsideRef.current,_?.beforeOutsideRef.current,_?.afterOutsideRef.current,hr(f),hr(c)].includes(Z),nt=!(Me(h,Z)||Me(y,Z)||Me(Z,y)||Me(_?.portalNode,Z)||Z!=null&&dt.hasElement(Z)||dt.hasMatchingElement($e=>Me($e,Z))||Xt||k&&(Ri(k.nodesRef.current,Re).find($e=>Me($e.context?.elements.floating,Z)||Me($e.context?.elements.domReference,Z))||$y(k.nodesRef.current,Re).find($e=>[$e.context?.elements.floating,Up($e.context?.elements.floating)].includes(Z)||$e.context?.elements.domReference===Z)));if(oe===h&&L&&Xy(L,O),a&&oe!==h&&!q2(ve)&&gr(W)===W.body){if(ct(L)&&(L.focus(),a==="popup")){Pe.request(()=>{L.focus()});return}const $e=z.current,at=U(),Zt=at[$e]||at[at.length-1]||L;ct(Zt)&&Zt.focus()}if(x.current.insideReactTree){x.current.insideReactTree=!1;return}(E||!s)&&Z&&nt&&!D.current&&(E||Z!==Lf())&&(V.current=!0,m.setOpen(!1,Oe(ic,te)))})}function J(){B.current||(x.current.insideReactTree=!0,le.start(0,()=>{x.current.insideReactTree=!1}))}const ee=ct(h)?h:null,K=[];if(!(!y&&!ee))return ee&&(ee.addEventListener("focusout",M),ee.addEventListener("pointerdown",H),K.push(()=>{ee.removeEventListener("focusout",M),ee.removeEventListener("pointerdown",H)})),y&&(y.addEventListener("focusin",pe),y.addEventListener("focusout",M),_&&(y.addEventListener("focusout",J,!0),K.push(()=>{y.removeEventListener("focusout",J,!0)})),K.push(()=>{y.removeEventListener("focusin",pe),y.removeEventListener("focusout",M)})),()=>{K.forEach(te=>{te()})}},[r,h,y,L,s,k,_,m,l,a,U,E,w,O,x,le,Ee,Pe,c,f]),v.useEffect(()=>{if(r||!y||!g)return;const W=Array.from(_?.portalNode?.querySelectorAll(`[${eu("portal")}]`)||[]),pe=(k?$y(k.nodesRef.current,w()):[]).find(J=>Wp(J.context?.elements.domReference||null))?.context?.elements.domReference,M=[y,pe,...W,T.current,F.current,ye.current,ae.current,_?.beforeOutsideRef.current,_?.afterOutsideRef.current,hr(f),hr(c),E?h:null].filter(J=>J!=null);return z2(M,s||E)},[g,r,h,y,s,O,_,E,k,w,c,f]),he(()=>{if(!g||r||!ct(L))return;const W=lt(L),H=gr(W);queueMicrotask(()=>{const pe=G(L),M=P.current,J=typeof M=="function"?M(R.current||""):M;if(J===void 0||J===!1)return;let ee;J===!0||J===null?ee=pe[0]||L:ee=hr(J),ee=ee||pe[0]||L,!Me(L,H)&&ja(ee,{preventScroll:ee===L})})},[r,g,L,S,G,P,R]),he(()=>{if(r||!L)return;const W=lt(L),H=gr(W);W2(H);function pe(ee){if(ee.open||(Y.current=G2(ee.nativeEvent,$.current)),ee.reason===Rj&&ee.nativeEvent.type==="mouseleave"&&(V.current=!0),ee.reason===wm)if(ee.nested)V.current=!1;else if(kE(ee.nativeEvent)||NE(ee.nativeEvent))V.current=!1;else{let K=!1;document.createElement("div").focus({get preventScroll(){return K=!0,!1}}),K?V.current=!1:V.current=!0}}b.on("openchange",pe);const M=W.createElement("span");M.setAttribute("tabindex","-1"),M.setAttribute("aria-hidden","true"),Object.assign(M.style,Tm),Se&&h&&h.insertAdjacentElement("afterend",M);function J(){const ee=N.current;let K=typeof ee=="function"?ee(Y.current):ee;if(K===void 0||K===!1)return null;if(K===null&&(K=!0),typeof K=="boolean"){const Z=h||Lf();return Z&&Z.isConnected?Z:M}const te=h||Lf()||M;return hr(K)||te}return()=>{b.off("openchange",pe);const ee=gr(W),K=Me(y,ee)||k&&Ri(k.nodesRef.current,w(),!1).some(Z=>Me(Z.context?.elements.floating,ee)),te=J();queueMicrotask(()=>{const Z=U2(te),oe=typeof N.current!="boolean";N.current&&!V.current&&ct(Z)&&(!(!oe&&Z!==ee&&ee!==W.body)||K)&&Z.focus({preventScroll:!0}),M.remove(),V.current=!1})}},[r,y,L,N,x,b,k,Se,h,w]),he(()=>{if(!_E||g||!y)return;const W=gr(lt(y));!ct(W)||!Rm(W)||Me(y,W)&&W.blur()},[g,y]),he(()=>{if(!(r||!_))return _.setFocusManagerState({modal:s,closeOnFocusOut:l,open:g,onOpenChange:m.setOpen,domReference:h}),()=>{_.setFocusManagerState(null)}},[r,_,s,g,m,l,h]),he(()=>{if(!(r||!L))return Xy(L,O),()=>{queueMicrotask(Dm)}},[r,L,O]);const I=!r&&(s?!E:!0)&&(Se||s);return C.jsxs(v.Fragment,{children:[I&&C.jsx(Ba,{"data-type":"inside",ref:be,onFocus:W=>{if(s){const H=G();ja(H[H.length-1])}else _?.portalNode&&(V.current=!1,Da(W,_.portalNode)?BE(h)?.focus():hr(f??_.beforeOutsideRef)?.focus())}}),n,I&&C.jsx(Ba,{"data-type":"inside",ref:ne,onFocus:W=>{s?ja(G()[0]):_?.portalNode&&(l&&(V.current=!0),Da(W,_.portalNode)?HE(h)?.focus():hr(c??_.afterOutsideRef)?.focus())}})]})}function ZE(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.context.dataRef,{enabled:o=!0,event:i="click",toggle:a=!0,ignoreMouse:s=!1,stickIfOpen:l=!0,touchOpenDelay:u=0,reason:c=Fp}=t,f=v.useRef(void 0),p=Em(),d=Uo(),m=v.useMemo(()=>({onPointerDown(g){f.current=g.pointerType},onMouseDown(g){const h=f.current,y=g.nativeEvent,b=n.select("open");if(g.button!==0||i==="click"||Ly(h)&&s)return;const x=r.current.openEvent,w=x?.type,S=n.select("domReferenceElement")!==g.currentTarget,E=b&&S||!(b&&a&&(!(x&&l)||w==="click"||w==="mousedown"));if(Rm(y.target)){const P=Oe(c,y,y.target);E&&h==="touch"&&u>0?d.start(u,()=>{n.setOpen(!0,P)}):n.setOpen(E,P);return}const O=g.currentTarget;p.request(()=>{const P=Oe(c,y,O);E&&h==="touch"&&u>0?d.start(u,()=>{n.setOpen(!0,P)}):n.setOpen(E,P)})},onClick(g){if(i==="mousedown-only")return;const h=f.current;if(i==="mousedown"&&h){f.current=void 0;return}if(Ly(h)&&s)return;const y=n.select("open"),b=r.current.openEvent,x=n.select("domReferenceElement")!==g.currentTarget,w=y&&x||!(y&&a&&(!(b&&l)||TE(b))),S=Oe(c,g.nativeEvent,g.currentTarget);w&&h==="touch"&&u>0?d.start(u,()=>{n.setOpen(!0,S)}):n.setOpen(w,S)},onKeyDown(){f.current=void 0}}),[r,i,s,n,l,a,p,d,u,c]);return v.useMemo(()=>o?{reference:m}:Gt,[o,m])}function Zy(e,t,n){let{reference:r,floating:o}=e;const i=_n(t),a=dc(t),s=fc(a),l=mn(t),u=i==="y",c=r.x+r.width/2-o.width/2,f=r.y+r.height/2-o.height/2,p=r[s]/2-o[s]/2;let d;switch(l){case"top":d={x:c,y:r.y-o.height};break;case"bottom":d={x:c,y:r.y+r.height};break;case"right":d={x:r.x+r.width,y:f};break;case"left":d={x:r.x-o.width,y:f};break;default:d={x:r.x,y:r.y}}switch(Mr(t)){case"start":d[a]-=p*(n&&u?-1:1);break;case"end":d[a]+=p*(n&&u?-1:1);break}return d}async function Y2(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:a,elements:s,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:f="floating",altBoundary:p=!1,padding:d=0}=or(t,e),m=km(d),h=s[p?f==="floating"?"reference":"floating":f],y=Yl(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(h)))==null||n?h:h.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(s.floating)),boundary:u,rootBoundary:c,strategy:l})),b=f==="floating"?{x:r,y:o,width:a.floating.width,height:a.floating.height}:a.reference,x=await(i.getOffsetParent==null?void 0:i.getOffsetParent(s.floating)),w=await(i.isElement==null?void 0:i.isElement(x))?await(i.getScale==null?void 0:i.getScale(x))||{x:1,y:1}:{x:1,y:1},S=Yl(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:b,offsetParent:x,strategy:l}):b);return{top:(y.top-S.top+m.top)/w.y,bottom:(S.bottom-y.bottom+m.bottom)/w.y,left:(y.left-S.left+m.left)/w.x,right:(S.right-y.right+m.right)/w.x}}const X2=50,Z2=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}=n,s=a.detectOverflow?a:{...a,detectOverflow:Y2},l=await(a.isRTL==null?void 0:a.isRTL(t));let u=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:c,y:f}=Zy(u,r,l),p=r,d=0;const m={};for(let g=0;g<i.length;g++){const h=i[g];if(!h)continue;const{name:y,fn:b}=h,{x,y:w,data:S,reset:E}=await b({x:c,y:f,initialPlacement:r,placement:p,strategy:o,middlewareData:m,rects:u,platform:s,elements:{reference:e,floating:t}});c=x??c,f=w??f,m[y]={...m[y],...S},E&&d<X2&&(d++,typeof E=="object"&&(E.placement&&(p=E.placement),E.rects&&(u=E.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:o}):E.rects),{x:c,y:f}=Zy(u,p,l)),g=-1)}return{x:c,y:f,placement:p,strategy:o,middlewareData:m}},Q2=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:a,elements:s,middlewareData:l}=t,{element:u,padding:c=0}=or(e,t)||{};if(u==null)return{};const f=km(c),p={x:n,y:r},d=dc(o),m=fc(d),g=await a.getDimensions(u),h=d==="y",y=h?"top":"left",b=h?"bottom":"right",x=h?"clientHeight":"clientWidth",w=i.reference[m]+i.reference[d]-p[d]-i.floating[m],S=p[d]-i.reference[d],E=await(a.getOffsetParent==null?void 0:a.getOffsetParent(u));let O=E?E[x]:0;(!O||!await(a.isElement==null?void 0:a.isElement(E)))&&(O=s.floating[x]||i.floating[m]);const P=w/2-S/2,N=O/2-g[m]/2-1,R=po(f[y],N),k=po(f[b],N),_=R,T=O-g[m]-k,F=O/2-g[m]/2+P,V=ql(_,F,T),D=!l.arrow&&Mr(o)!=null&&F!==V&&i.reference[m]/2-(F<_?R:k)-g[m]/2<0,B=D?F<_?F-_:F-T:0;return{[d]:p[d]+B,data:{[d]:V,centerOffset:F-V-B,...D&&{alignmentOffset:B}},reset:D}}}),J2=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:a,initialPlacement:s,platform:l,elements:u}=t,{mainAxis:c=!0,crossAxis:f=!0,fallbackPlacements:p,fallbackStrategy:d="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:g=!0,...h}=or(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const y=mn(o),b=_n(s),x=mn(s)===s,w=await(l.isRTL==null?void 0:l.isRTL(u.floating)),S=p||(x||!g?[Kl(s)]:r2(s)),E=m!=="none";!p&&E&&S.push(...s2(s,g,m,w));const O=[s,...S],P=await l.detectOverflow(t,h),N=[];let R=((r=i.flip)==null?void 0:r.overflows)||[];if(c&&N.push(P[y]),f){const F=n2(o,a,w);N.push(P[F[0]],P[F[1]])}if(R=[...R,{placement:o,overflows:N}],!N.every(F=>F<=0)){var k,_;const F=(((k=i.flip)==null?void 0:k.index)||0)+1,V=O[F];if(V&&(!(f==="alignment"?b!==_n(V):!1)||R.every(z=>_n(z.placement)===b?z.overflows[0]>0:!0)))return{data:{index:F,overflows:R},reset:{placement:V}};let D=(_=R.filter(B=>B.overflows[0]<=0).sort((B,z)=>B.overflows[1]-z.overflows[1])[0])==null?void 0:_.placement;if(!D)switch(d){case"bestFit":{var T;const B=(T=R.filter(z=>{if(E){const Y=_n(z.placement);return Y===b||Y==="y"}return!0}).map(z=>[z.placement,z.overflows.filter(Y=>Y>0).reduce((Y,$)=>Y+$,0)]).sort((z,Y)=>z[1]-Y[1])[0])==null?void 0:T[0];B&&(D=B);break}case"initialPlacement":D=s;break}if(o!==D)return{reset:{placement:D}}}return{}}}};function Qy(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Jy(e){return e2.some(t=>e[t]>=0)}const e$=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:o="referenceHidden",...i}=or(e,t);switch(o){case"referenceHidden":{const a=await r.detectOverflow(t,{...i,elementContext:"reference"}),s=Qy(a,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:Jy(s)}}}case"escaped":{const a=await r.detectOverflow(t,{...i,altBoundary:!0}),s=Qy(a,n.floating);return{data:{escapedOffsets:s,escaped:Jy(s)}}}default:return{}}}}},QE=new Set(["left","top"]);async function t$(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),a=mn(n),s=Mr(n),l=_n(n)==="y",u=QE.has(a)?-1:1,c=i&&l?-1:1,f=or(t,e);let{mainAxis:p,crossAxis:d,alignmentAxis:m}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return s&&typeof m=="number"&&(d=s==="end"?m*-1:m),l?{x:d*c,y:p*u}:{x:p*u,y:d*c}}const n$=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:a,middlewareData:s}=t,l=await t$(t,e);return a===((n=s.offset)==null?void 0:n.placement)&&(r=s.arrow)!=null&&r.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:a}}}}},r$=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o,platform:i}=t,{mainAxis:a=!0,crossAxis:s=!1,limiter:l={fn:y=>{let{x:b,y:x}=y;return{x:b,y:x}}},...u}=or(e,t),c={x:n,y:r},f=await i.detectOverflow(t,u),p=_n(mn(o)),d=Im(p);let m=c[d],g=c[p];if(a){const y=d==="y"?"top":"left",b=d==="y"?"bottom":"right",x=m+f[y],w=m-f[b];m=ql(x,m,w)}if(s){const y=p==="y"?"top":"left",b=p==="y"?"bottom":"right",x=g+f[y],w=g-f[b];g=ql(x,g,w)}const h=l.fn({...t,[d]:m,[p]:g});return{...h,data:{x:h.x-n,y:h.y-r,enabled:{[d]:a,[p]:s}}}}}},o$=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:a}=t,{offset:s=0,mainAxis:l=!0,crossAxis:u=!0}=or(e,t),c={x:n,y:r},f=_n(o),p=Im(f);let d=c[p],m=c[f];const g=or(s,t),h=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(l){const x=p==="y"?"height":"width",w=i.reference[p]-i.floating[x]+h.mainAxis,S=i.reference[p]+i.reference[x]-h.mainAxis;d<w?d=w:d>S&&(d=S)}if(u){var y,b;const x=p==="y"?"width":"height",w=QE.has(mn(o)),S=i.reference[f]-i.floating[x]+(w&&((y=a.offset)==null?void 0:y[f])||0)+(w?0:h.crossAxis),E=i.reference[f]+i.reference[x]+(w?0:((b=a.offset)==null?void 0:b[f])||0)-(w?h.crossAxis:0);m<S?m=S:m>E&&(m=E)}return{[p]:d,[f]:m}}}},i$=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:a,elements:s}=t,{apply:l=()=>{},...u}=or(e,t),c=await a.detectOverflow(t,u),f=mn(o),p=Mr(o),d=_n(o)==="y",{width:m,height:g}=i.floating;let h,y;f==="top"||f==="bottom"?(h=f,y=p===(await(a.isRTL==null?void 0:a.isRTL(s.floating))?"start":"end")?"left":"right"):(y=f,h=p==="end"?"top":"bottom");const b=g-c.top-c.bottom,x=m-c.left-c.right,w=po(g-c[h],b),S=po(m-c[y],x),E=!t.middlewareData.shift;let O=w,P=S;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(P=x),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(O=b),E&&!p){const R=fn(c.left,0),k=fn(c.right,0),_=fn(c.top,0),T=fn(c.bottom,0);d?P=m-2*(R!==0||k!==0?R+k:fn(c.left,c.right)):O=g-2*(_!==0||T!==0?_+T:fn(c.top,c.bottom))}await l({...t,availableWidth:P,availableHeight:O});const N=await a.getDimensions(s.floating);return m!==N.width||g!==N.height?{reset:{rects:!0}}:{}}}};function JE(e){const t=gn(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=ct(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,s=Ul(n)!==i||Ul(r)!==a;return s&&(n=i,r=a),{width:n,height:r,$:s}}function jm(e){return Qe(e)?e:e.contextElement}function ki(e){const t=jm(e);if(!ct(t))return tr(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=JE(t);let a=(i?Ul(n.width):n.width)/r,s=(i?Ul(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const a$=tr(0);function e1(e){const t=Tt(e);return!lc()||!t.visualViewport?a$:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function s$(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Tt(e)?!1:t}function qo(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=jm(e);let a=tr(1);t&&(r?Qe(r)&&(a=ki(r)):a=ki(e));const s=s$(i,n,r)?e1(i):tr(0);let l=(o.left+s.x)/a.x,u=(o.top+s.y)/a.y,c=o.width/a.x,f=o.height/a.y;if(i){const p=Tt(i),d=r&&Qe(r)?Tt(r):r;let m=p,g=Bp(m);for(;g&&r&&d!==m;){const h=ki(g),y=g.getBoundingClientRect(),b=gn(g),x=y.left+(g.clientLeft+parseFloat(b.paddingLeft))*h.x,w=y.top+(g.clientTop+parseFloat(b.paddingTop))*h.y;l*=h.x,u*=h.y,c*=h.x,f*=h.y,l+=x,u+=w,m=Tt(g),g=Bp(m)}}return Yl({width:c,height:f,x:l,y:u})}function mc(e,t){const n=uc(e).scrollLeft;return t?t.left+n:qo(fr(e)).left+n}function t1(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-mc(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function l$(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",a=fr(r),s=t?sc(t.floating):!1;if(r===a||s&&i)return n;let l={scrollLeft:0,scrollTop:0},u=tr(1);const c=tr(0),f=ct(r);if((f||!f&&!i)&&((yo(r)!=="body"||bo(a))&&(l=uc(r)),f)){const d=qo(r);u=ki(r),c.x=d.x+r.clientLeft,c.y=d.y+r.clientTop}const p=a&&!f&&!i?t1(a,l):tr(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+c.x+p.x,y:n.y*u.y-l.scrollTop*u.y+c.y+p.y}}function u$(e){return Array.from(e.getClientRects())}function c$(e){const t=fr(e),n=uc(e),r=e.ownerDocument.body,o=fn(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=fn(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+mc(e);const s=-n.scrollTop;return gn(r).direction==="rtl"&&(a+=fn(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:s}}const eb=25;function f$(e,t){const n=Tt(e),r=fr(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,s=0,l=0;if(o){i=o.width,a=o.height;const c=lc();(!c||c&&t==="fixed")&&(s=o.offsetLeft,l=o.offsetTop)}const u=mc(r);if(u<=0){const c=r.ownerDocument,f=c.body,p=getComputedStyle(f),d=c.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,m=Math.abs(r.clientWidth-f.clientWidth-d);m<=eb&&(i-=m)}else u<=eb&&(i+=u);return{width:i,height:a,x:s,y:l}}function d$(e,t){const n=qo(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=ct(e)?ki(e):tr(1),a=e.clientWidth*i.x,s=e.clientHeight*i.y,l=o*i.x,u=r*i.y;return{width:a,height:s,x:l,y:u}}function tb(e,t,n){let r;if(t==="viewport")r=f$(e,n);else if(t==="document")r=c$(fr(e));else if(Qe(t))r=d$(t,n);else{const o=e1(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Yl(r)}function n1(e,t){const n=Pr(e);return n===t||!Qe(n)||Cr(n)?!1:gn(n).position==="fixed"||n1(n,t)}function p$(e,t){const n=t.get(e);if(n)return n;let r=ao(e,[],!1).filter(s=>Qe(s)&&yo(s)!=="body"),o=null;const i=gn(e).position==="fixed";let a=i?Pr(e):e;for(;Qe(a)&&!Cr(a);){const s=gn(a),l=Pm(a);!l&&s.position==="fixed"&&(o=null),(i?!l&&!o:!l&&s.position==="static"&&!!o&&(o.position==="absolute"||o.position==="fixed")||bo(a)&&!l&&n1(e,a))?r=r.filter(c=>c!==a):o=s,a=Pr(a)}return t.set(e,r),r}function h$(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[...n==="clippingAncestors"?sc(t)?[]:p$(t,this._c):[].concat(n),r],s=tb(t,a[0],o);let l=s.top,u=s.right,c=s.bottom,f=s.left;for(let p=1;p<a.length;p++){const d=tb(t,a[p],o);l=fn(d.top,l),u=po(d.right,u),c=po(d.bottom,c),f=fn(d.left,f)}return{width:u-f,height:c-l,x:f,y:l}}function m$(e){const{width:t,height:n}=JE(e);return{width:t,height:n}}function g$(e,t,n){const r=ct(t),o=fr(t),i=n==="fixed",a=qo(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const l=tr(0);function u(){l.x=mc(o)}if(r||!r&&!i)if((yo(t)!=="body"||bo(o))&&(s=uc(t)),r){const d=qo(t,!0,i,t);l.x=d.x+t.clientLeft,l.y=d.y+t.clientTop}else o&&u();i&&!r&&o&&u();const c=o&&!r&&!i?t1(o,s):tr(0),f=a.left+s.scrollLeft-l.x-c.x,p=a.top+s.scrollTop-l.y-c.y;return{x:f,y:p,width:a.width,height:a.height}}function Ff(e){return gn(e).position==="static"}function nb(e,t){if(!ct(e)||gn(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return fr(e)===n&&(n=n.ownerDocument.body),n}function r1(e,t){const n=Tt(e);if(sc(e))return n;if(!ct(e)){let o=Pr(e);for(;o&&!Cr(o);){if(Qe(o)&&!Ff(o))return o;o=Pr(o)}return n}let r=nb(e,t);for(;r&&Fj(r)&&Ff(r);)r=nb(r,t);return r&&Cr(r)&&Ff(r)&&!Pm(r)?n:r||Bj(e)||n}const v$=async function(e){const t=this.getOffsetParent||r1,n=this.getDimensions,r=await n(e.floating);return{reference:g$(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function y$(e){return gn(e).direction==="rtl"}const b$={convertOffsetParentRelativeRectToViewportRelativeRect:l$,getDocumentElement:fr,getClippingRect:h$,getOffsetParent:r1,getElementRects:v$,getClientRects:u$,getDimensions:m$,getScale:ki,isElement:Qe,isRTL:y$};function o1(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function x$(e,t){let n=null,r;const o=fr(e);function i(){var s;clearTimeout(r),(s=n)==null||s.disconnect(),n=null}function a(s,l){s===void 0&&(s=!1),l===void 0&&(l=1),i();const u=e.getBoundingClientRect(),{left:c,top:f,width:p,height:d}=u;if(s||t(),!p||!d)return;const m=Oi(f),g=Oi(o.clientWidth-(c+p)),h=Oi(o.clientHeight-(f+d)),y=Oi(c),x={rootMargin:-m+"px "+-g+"px "+-h+"px "+-y+"px",threshold:fn(0,po(1,l))||1};let w=!0;function S(E){const O=E[0].intersectionRatio;if(O!==l){if(!w)return a();O?a(!1,O):r=setTimeout(()=>{a(!1,1e-7)},1e3)}O===1&&!o1(u,e.getBoundingClientRect())&&a(),w=!1}try{n=new IntersectionObserver(S,{...x,root:o.ownerDocument})}catch{n=new IntersectionObserver(S,x)}n.observe(e)}return a(!0),i}function Xp(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,u=jm(e),c=o||i?[...u?ao(u):[],...t?ao(t):[]]:[];c.forEach(y=>{o&&y.addEventListener("scroll",n,{passive:!0}),i&&y.addEventListener("resize",n)});const f=u&&s?x$(u,n):null;let p=-1,d=null;a&&(d=new ResizeObserver(y=>{let[b]=y;b&&b.target===u&&d&&t&&(d.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var x;(x=d)==null||x.observe(t)})),n()}),u&&!l&&d.observe(u),t&&d.observe(t));let m,g=l?qo(e):null;l&&h();function h(){const y=qo(e);g&&!o1(g,y)&&n(),g=y,m=requestAnimationFrame(h)}return n(),()=>{var y;c.forEach(b=>{o&&b.removeEventListener("scroll",n),i&&b.removeEventListener("resize",n)}),f?.(),(y=d)==null||y.disconnect(),d=null,l&&cancelAnimationFrame(m)}}const w$=n$,C$=r$,S$=J2,E$=i$,O$=e$,rb=Q2,P$=o$,_$=(e,t,n)=>{const r=new Map,o={platform:b$,...n},i={...o.platform,_c:r};return Z2(e,t,{...o,platform:i})};var A$=typeof document<"u",R$=function(){},Ml=A$?A.useLayoutEffect:R$;function tu(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,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!tu(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const i=o[r];if(!(i==="_owner"&&e.$$typeof)&&!tu(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function i1(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function ob(e,t){const n=i1(e);return Math.round(t*n)/n}function Vf(e){const t=v.useRef(e);return Ml(()=>{t.current=e}),t}function a1(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:a}={},transform:s=!0,whileElementsMounted:l,open:u}=e,[c,f]=v.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,d]=v.useState(r);tu(p,r)||d(r);const[m,g]=v.useState(null),[h,y]=v.useState(null),b=v.useCallback(z=>{z!==E.current&&(E.current=z,g(z))},[]),x=v.useCallback(z=>{z!==O.current&&(O.current=z,y(z))},[]),w=i||m,S=a||h,E=v.useRef(null),O=v.useRef(null),P=v.useRef(c),N=l!=null,R=Vf(l),k=Vf(o),_=Vf(u),T=v.useCallback(()=>{if(!E.current||!O.current)return;const z={placement:t,strategy:n,middleware:p};k.current&&(z.platform=k.current),_$(E.current,O.current,z).then(Y=>{const $={...Y,isPositioned:_.current!==!1};F.current&&!tu(P.current,$)&&(P.current=$,go.flushSync(()=>{f($)}))})},[p,t,n,k,_]);Ml(()=>{u===!1&&P.current.isPositioned&&(P.current.isPositioned=!1,f(z=>({...z,isPositioned:!1})))},[u]);const F=v.useRef(!1);Ml(()=>(F.current=!0,()=>{F.current=!1}),[]),Ml(()=>{if(w&&(E.current=w),S&&(O.current=S),w&&S){if(R.current)return R.current(w,S,T);T()}},[w,S,T,R,N]);const V=v.useMemo(()=>({reference:E,floating:O,setReference:b,setFloating:x}),[b,x]),D=v.useMemo(()=>({reference:w,floating:S}),[w,S]),B=v.useMemo(()=>{const z={position:n,left:0,top:0};if(!D.floating)return z;const Y=ob(D.floating,c.x),$=ob(D.floating,c.y);return s?{...z,transform:"translate("+Y+"px, "+$+"px)",...i1(D.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:Y,top:$}},[n,s,D.floating,c.x,c.y]);return v.useMemo(()=>({...c,update:T,refs:V,elements:D,floatingStyles:B}),[c,T,V,D,B])}const I$=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?rb({element:r.current,padding:o}).fn(n):{}:r?rb({element:r,padding:o}).fn(n):{}}}},s1=(e,t)=>{const n=w$(e);return{name:n.name,fn:n.fn,options:[e,t]}},l1=(e,t)=>{const n=C$(e);return{name:n.name,fn:n.fn,options:[e,t]}},u1=(e,t)=>({fn:P$(e).fn,options:[e,t]}),c1=(e,t)=>{const n=S$(e);return{name:n.name,fn:n.fn,options:[e,t]}},f1=(e,t)=>{const n=E$(e);return{name:n.name,fn:n.fn,options:[e,t]}},d1=(e,t)=>{const n=O$(e);return{name:n.name,fn:n.fn,options:[e,t]}},k$=(e,t)=>{const n=I$(e);return{name:n.name,fn:n.fn,options:[e,t]}},N$={intentional:"onClick",sloppy:"onPointerDown"};function T$(e){return{escapeKey:typeof e=="boolean"?e:e?.escapeKey??!1,outsidePress:typeof e=="boolean"?e:e?.outsidePress??!0}}function M$(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.useState("open"),o=n.useState("floatingElement"),i=n.useState("referenceElement"),a=n.useState("domReferenceElement"),{onOpenChange:s,dataRef:l}=n.context,{enabled:u=!0,escapeKey:c=!0,outsidePress:f=!0,outsidePressEvent:p="sloppy",referencePress:d=!1,referencePressEvent:m="sloppy",ancestorScroll:g=!1,bubbles:h,externalTree:y}=t,b=hc(y),x=de(typeof f=="function"?f:()=>!1),w=typeof f=="function"?x:f,S=v.useRef(!1),{escapeKey:E,outsidePress:O}=T$(h),P=v.useRef(null),N=Uo(),R=Uo(),k=de(()=>{R.clear(),l.current.insideReactTree=!1}),_=v.useRef(!1),T=v.useRef(""),F=de(I=>{T.current=I.pointerType}),V=de(()=>{const I=T.current,W=I==="pen"||!I?"mouse":I,H=typeof p=="function"?p():p;return typeof H=="string"?H:H[W]}),D=de(I=>{if(!r||!u||!c||I.key!=="Escape"||_.current)return;const W=l.current.floatingContext?.nodeId,H=b?Ri(b.nodesRef.current,W):[];if(!E&&H.length>0){let J=!0;if(H.forEach(ee=>{ee.context?.open&&!ee.context.dataRef.current.__escapeKeyBubbles&&(J=!1)}),!J)return}const pe=Jj(I)?I.nativeEvent:I,M=Oe(yE,pe);n.setOpen(!1,M),!E&&!M.isPropagationAllowed&&I.stopPropagation()}),B=de(I=>{const W=V();return W==="intentional"&&I.type!=="click"||W==="sloppy"&&I.type==="click"}),z=de(()=>{l.current.insideReactTree=!0,R.start(0,k)}),Y=de((I,W=!1)=>{if(B(I)){k();return}if(l.current.insideReactTree){k();return}if(V()==="intentional"&&W||typeof w=="function"&&!w(I))return;const H=nn(I),pe=`[${eu("inert")}]`,M=lt(n.select("floatingElement")).querySelectorAll(pe),J=n.context.triggerElements;if(H&&(J.hasElement(H)||J.hasMatchingElement(oe=>Me(oe,H))))return;let ee=Qe(H)?H:null;for(;ee&&!Cr(ee);){const oe=Pr(ee);if(Cr(oe)||!Qe(oe))break;ee=oe}if(M.length&&Qe(H)&&!Qj(H)&&!Me(H,n.select("floatingElement"))&&Array.from(M).every(oe=>!Me(ee,oe)))return;if(ct(H)&&!("touches"in I)){const oe=Cr(H),ve=gn(H),Re=/auto|scroll/,dt=oe||Re.test(ve.overflowX),Xt=oe||Re.test(ve.overflowY),nt=dt&&H.clientWidth>0&&H.scrollWidth>H.clientWidth,$e=Xt&&H.clientHeight>0&&H.scrollHeight>H.clientHeight,at=ve.direction==="rtl",Zt=$e&&(at?I.offsetX<=H.offsetWidth-H.clientWidth:I.offsetX>H.clientWidth),Bt=nt&&I.offsetY>H.clientHeight;if(Zt||Bt)return}const K=l.current.floatingContext?.nodeId,te=b&&Ri(b.nodesRef.current,K).some(oe=>Fn(I,oe.context?.elements.floating));if(Fn(I,n.select("floatingElement"))||Fn(I,n.select("domReferenceElement"))||te)return;const Z=b?Ri(b.nodesRef.current,K):[];if(Z.length>0){let oe=!0;if(Z.forEach(ve=>{ve.context?.open&&!ve.context.dataRef.current.__outsidePressBubbles&&(oe=!1)}),!oe)return}n.setOpen(!1,Oe(wm,I)),k()}),$=de(I=>{V()!=="sloppy"||I.pointerType==="touch"||!n.select("open")||!u||Fn(I,n.select("floatingElement"))||Fn(I,n.select("domReferenceElement"))||Y(I)}),ye=de(I=>{if(V()!=="sloppy"||!n.select("open")||!u||Fn(I,n.select("floatingElement"))||Fn(I,n.select("domReferenceElement")))return;const W=I.touches[0];W&&(P.current={startTime:Date.now(),startX:W.clientX,startY:W.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},N.start(1e3,()=>{P.current&&(P.current.dismissOnTouchEnd=!1,P.current.dismissOnMouseDown=!1)}))}),ae=de(I=>{const W=nn(I);function H(){ye(I),W?.removeEventListener(I.type,H)}W?.addEventListener(I.type,H)}),be=de(I=>{const W=S.current;if(S.current=!1,N.clear(),I.type==="mousedown"&&P.current&&!P.current.dismissOnMouseDown)return;const H=nn(I);function pe(){I.type==="pointerdown"?$(I):Y(I,W),H?.removeEventListener(I.type,pe)}H?.addEventListener(I.type,pe)}),ne=de(I=>{if(V()!=="sloppy"||!P.current||Fn(I,n.select("floatingElement"))||Fn(I,n.select("domReferenceElement")))return;const W=I.touches[0];if(!W)return;const H=Math.abs(W.clientX-P.current.startX),pe=Math.abs(W.clientY-P.current.startY),M=Math.sqrt(H*H+pe*pe);M>5&&(P.current.dismissOnTouchEnd=!0),M>10&&(Y(I),N.clear(),P.current=null)}),le=de(I=>{const W=nn(I);function H(){ne(I),W?.removeEventListener(I.type,H)}W?.addEventListener(I.type,H)}),Ee=de(I=>{V()!=="sloppy"||!P.current||Fn(I,n.select("floatingElement"))||Fn(I,n.select("domReferenceElement"))||(P.current.dismissOnTouchEnd&&Y(I),N.clear(),P.current=null)}),Pe=de(I=>{const W=nn(I);function H(){Ee(I),W?.removeEventListener(I.type,H)}W?.addEventListener(I.type,H)});v.useEffect(()=>{if(!r||!u)return;l.current.__escapeKeyBubbles=E,l.current.__outsidePressBubbles=O;const I=new Li;function W(ee){n.setOpen(!1,Oe(On,ee))}function H(){I.clear(),_.current=!0}function pe(){I.start(lc()?5:0,()=>{_.current=!1})}const M=lt(o);M.addEventListener("pointerdown",F,!0),c&&(M.addEventListener("keydown",D),M.addEventListener("compositionstart",H),M.addEventListener("compositionend",pe)),w&&(M.addEventListener("click",be,!0),M.addEventListener("pointerdown",be,!0),M.addEventListener("touchstart",ae,!0),M.addEventListener("touchmove",le,!0),M.addEventListener("touchend",Pe,!0),M.addEventListener("mousedown",be,!0));let J=[];return g&&(Qe(a)&&(J=ao(a)),Qe(o)&&(J=J.concat(ao(o))),!Qe(i)&&i&&i.contextElement&&(J=J.concat(ao(i.contextElement)))),J=J.filter(ee=>ee!==M.defaultView?.visualViewport),J.forEach(ee=>{ee.addEventListener("scroll",W,{passive:!0})}),()=>{M.removeEventListener("pointerdown",F,!0),c&&(M.removeEventListener("keydown",D),M.removeEventListener("compositionstart",H),M.removeEventListener("compositionend",pe)),w&&(M.removeEventListener("click",be,!0),M.removeEventListener("pointerdown",be,!0),M.removeEventListener("touchstart",ae,!0),M.removeEventListener("touchmove",le,!0),M.removeEventListener("touchend",Pe,!0),M.removeEventListener("mousedown",be,!0)),J.forEach(ee=>{ee.removeEventListener("scroll",W)}),I.clear(),S.current=!1}},[l,o,i,a,c,w,r,s,g,u,E,O,D,Y,be,$,ae,le,Pe,F,n]),v.useEffect(k,[w,k]);const Se=v.useMemo(()=>({onKeyDown:D,...d&&{[N$[m]]:I=>{n.setOpen(!1,Oe(Fp,I.nativeEvent))},...m!=="intentional"&&{onClick(I){n.setOpen(!1,Oe(Fp,I.nativeEvent))}}}}),[D,n,d,m]),L=de(I=>{const W=nn(I.nativeEvent);!Me(n.select("floatingElement"),W)||I.button!==0||(S.current=!0)}),U=de(I=>{!r||!u||I.button!==0||(S.current=!0)}),G=v.useMemo(()=>({onKeyDown:D,onPointerDown:L,onMouseDown:L,onMouseUp:L,onClickCapture:z,onMouseDownCapture(I){z(),U(I)},onPointerDownCapture(I){z(),U(I)},onMouseUpCapture:z,onTouchEndCapture:z,onTouchMoveCapture:z}),[D,L,z,U]);return v.useMemo(()=>u?{reference:Se,floating:G,trigger:Se}:{},[u,Se,G])}var D$=(e,t,n)=>{if(t.length===1&&t[0]===n){let r=!1;try{const o={};e(o)===o&&(r=!0)}catch{}if(r){let o;try{throw new Error}catch(i){({stack:o}=i)}console.warn(`The result function returned its own inputs without modification. e.g
19
19
  \`createSelector([state => state.todos], todos => todos)\`
20
20
  This could lead to inefficient memoization and unnecessary re-renders.
21
- Ensure transformation logic is in the result function, and extraction logic is in the input selectors.`,{stack:o})}}},Ay=(e,t,n)=>{const{memoize:r,memoizeOptions:o}=t,{inputSelectorResults:s,inputSelectorResultsCopy:i}=e,a=r(()=>({}),...o);if(!(a.apply(null,s)===a.apply(null,i))){let c;try{throw new Error}catch(d){({stack:c}=d)}console.warn(`An input selector returned a different result when passed same arguments.
21
+ Ensure transformation logic is in the result function, and extraction logic is in the input selectors.`,{stack:o})}}},j$=(e,t,n)=>{const{memoize:r,memoizeOptions:o}=t,{inputSelectorResults:i,inputSelectorResultsCopy:a}=e,s=r(()=>({}),...o);if(!(s.apply(null,i)===s.apply(null,a))){let u;try{throw new Error}catch(c){({stack:u}=c)}console.warn(`An input selector returned a different result when passed same arguments.
22
22
  This means your output selector will likely run more frequently than intended.
23
23
  Avoid returning a new reference inside your input selector, e.g.
24
- \`createSelector([state => state.todos.map(todo => todo.id)], todoIds => todoIds.length)\``,{arguments:n,firstInputs:s,secondInputs:i,stack:c})}},Ty={inputStabilityCheck:"once",identityFunctionCheck:"once"},Eo=Symbol("NOT_FOUND");function My(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function Dy(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function Fy(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(n=>typeof n=="function")){const n=e.map(r=>typeof r=="function"?`function ${r.name||"unnamed"}()`:typeof r).join(", ");throw new TypeError(`${t}[${n}]`)}}var Kl=e=>Array.isArray(e)?e:[e];function Vy(e){const t=Array.isArray(e[0])?e[0]:e;return Fy(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function Yl(e,t){const n=[],{length:r}=e;for(let o=0;o<r;o++)n.push(e[o].apply(null,t));return n}var Ly=(e,t)=>{const{identityFunctionCheck:n,inputStabilityCheck:r}={...Ty,...t};return{identityFunctionCheck:{shouldRun:n==="always"||n==="once"&&e,run:_y},inputStabilityCheck:{shouldRun:r==="always"||r==="once"&&e,run:Ay}}};function jy(e){let t;return{get(n){return t&&e(t.key,n)?t.value:Eo},put(n,r){t={key:n,value:r}},getEntries(){return t?[t]:[]},clear(){t=void 0}}}function $y(e,t){let n=[];function r(a){const l=n.findIndex(c=>t(a,c.key));if(l>-1){const c=n[l];return l>0&&(n.splice(l,1),n.unshift(c)),c.value}return Eo}function o(a,l){r(a)===Eo&&(n.unshift({key:a,value:l}),n.length>e&&n.pop())}function s(){return n}function i(){n=[]}return{get:r,put:o,getEntries:s,clear:i}}var zy=(e,t)=>e===t;function Gy(e){return function(n,r){if(n===null||r===null||n.length!==r.length)return!1;const{length:o}=n;for(let s=0;s<o;s++)if(!e(n[s],r[s]))return!1;return!0}}function Hy(e,t){const n=typeof t=="object"?t:{equalityCheck:t},{equalityCheck:r=zy,maxSize:o=1,resultEqualityCheck:s}=n,i=Gy(r);let a=0;const l=o<=1?jy(i):$y(o,i);function c(){let d=l.get(arguments);if(d===Eo){if(d=e.apply(null,arguments),a++,s){const g=l.getEntries().find(f=>s(f.value,d));g&&(d=g.value,a!==0&&a--)}l.put(arguments,d)}return d}return c.clearCache=()=>{l.clear(),c.resetResultsCount()},c.resultsCount=()=>a,c.resetResultsCount=()=>{a=0},c}var By=class{constructor(e){this.value=e}deref(){return this.value}},Wy=typeof WeakRef<"u"?WeakRef:By,Uy=0,Xl=1;function Ur(){return{s:Uy,v:void 0,o:null,p:null}}function vd(e,t={}){let n=Ur();const{resultEqualityCheck:r}=t;let o,s=0;function i(){let a=n;const{length:l}=arguments;for(let p=0,g=l;p<g;p++){const f=arguments[p];if(typeof f=="function"||typeof f=="object"&&f!==null){let h=a.o;h===null&&(a.o=h=new WeakMap);const m=h.get(f);m===void 0?(a=Ur(),h.set(f,a)):a=m}else{let h=a.p;h===null&&(a.p=h=new Map);const m=h.get(f);m===void 0?(a=Ur(),h.set(f,a)):a=m}}const c=a;let d;if(a.s===Xl)d=a.v;else if(d=e.apply(null,arguments),s++,r){const p=o?.deref?.()??o;p!=null&&r(p,d)&&(d=p,s!==0&&s--),o=typeof d=="object"&&d!==null||typeof d=="function"?new Wy(d):d}return c.s=Xl,c.v=d,d}return i.clearCache=()=>{n=Ur(),i.resetResultsCount()},i.resultsCount=()=>s,i.resetResultsCount=()=>{s=0},i}function xd(e,...t){const n=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,r=(...o)=>{let s=0,i=0,a,l={},c=o.pop();typeof c=="object"&&(l=c,c=o.pop()),My(c,`createSelector expects an output function after the inputs, but received: [${typeof c}]`);const d={...n,...l},{memoize:p,memoizeOptions:g=[],argsMemoize:f=vd,argsMemoizeOptions:h=[],devModeChecks:m={}}=d,b=Kl(g),y=Kl(h),x=Vy(o),w=p(function(){return s++,c.apply(null,arguments)},...b);let C=!0;const S=f(function(){i++;const E=Yl(x,arguments);if(a=w.apply(null,E),process.env.NODE_ENV!=="production"){const{identityFunctionCheck:R,inputStabilityCheck:F}=Ly(C,m);if(R.shouldRun&&R.run(c,E,a),F.shouldRun){const N=Yl(x,arguments);F.run({inputSelectorResults:E,inputSelectorResultsCopy:N},{memoize:p,memoizeOptions:b},arguments)}C&&(C=!1)}return a},...y);return Object.assign(S,{resultFunc:c,memoizedResultFunc:w,dependencies:x,dependencyRecomputations:()=>i,resetDependencyRecomputations:()=>{i=0},lastResult:()=>a,recomputations:()=>s,resetRecomputations:()=>{s=0},memoize:p,argsMemoize:f})};return Object.assign(r,{withTypes:()=>r}),r}var qy=xd(vd),Ky=Object.assign((e,t=qy)=>{Dy(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),r=n.map(s=>e[s]);return t(r,(...s)=>s.reduce((i,a,l)=>(i[n[l]]=a,i),{}))},{withTypes:()=>Ky});xd({memoize:Hy,memoizeOptions:{maxSize:1,equalityCheck:Object.is}});const ne=(e,t,n,r,o,s,...i)=>{if(i.length>0)throw new Error(process.env.NODE_ENV!=="production"?"Unsupported number of selectors":Ot(1));let a;if(e)a=e;else throw new Error("Missing arguments");return a};var qr={exports:{}},Os={};var Zl;function Yy(){if(Zl)return Os;Zl=1;var e=Te;function t(p,g){return p===g&&(p!==0||1/p===1/g)||p!==p&&g!==g}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,o=e.useEffect,s=e.useLayoutEffect,i=e.useDebugValue;function a(p,g){var f=g(),h=r({inst:{value:f,getSnapshot:g}}),m=h[0].inst,b=h[1];return s(function(){m.value=f,m.getSnapshot=g,l(m)&&b({inst:m})},[p,f,g]),o(function(){return l(m)&&b({inst:m}),p(function(){l(m)&&b({inst:m})})},[p]),i(f),f}function l(p){var g=p.getSnapshot;p=p.value;try{var f=g();return!n(p,f)}catch{return!0}}function c(p,g){return g()}var d=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?c:a;return Os.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:d,Os}var _s={};var Ql;function Xy(){return Ql||(Ql=1,process.env.NODE_ENV!=="production"&&(function(){function e(f,h){return f===h&&(f!==0||1/f===1/h)||f!==f&&h!==h}function t(f,h){d||o.startTransition===void 0||(d=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var m=h();if(!p){var b=h();s(m,b)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),p=!0)}b=i({inst:{value:m,getSnapshot:h}});var y=b[0].inst,x=b[1];return l(function(){y.value=m,y.getSnapshot=h,n(y)&&x({inst:y})},[f,m,h]),a(function(){return n(y)&&x({inst:y}),f(function(){n(y)&&x({inst:y})})},[f]),c(m),m}function n(f){var h=f.getSnapshot;f=f.value;try{var m=h();return!s(f,m)}catch{return!0}}function r(f,h){return h()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var o=Te,s=typeof Object.is=="function"?Object.is:e,i=o.useState,a=o.useEffect,l=o.useLayoutEffect,c=o.useDebugValue,d=!1,p=!1,g=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?r:t;_s.useSyncExternalStore=o.useSyncExternalStore!==void 0?o.useSyncExternalStore:g,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),_s}var Jl;function oa(){return Jl||(Jl=1,process.env.NODE_ENV==="production"?qr.exports=Yy():qr.exports=Xy()),qr.exports}var Zy=oa(),Kr={exports:{}},As={};var ec;function Qy(){if(ec)return As;ec=1;var e=Te,t=oa();function n(c,d){return c===d&&(c!==0||1/c===1/d)||c!==c&&d!==d}var r=typeof Object.is=="function"?Object.is:n,o=t.useSyncExternalStore,s=e.useRef,i=e.useEffect,a=e.useMemo,l=e.useDebugValue;return As.useSyncExternalStoreWithSelector=function(c,d,p,g,f){var h=s(null);if(h.current===null){var m={hasValue:!1,value:null};h.current=m}else m=h.current;h=a(function(){function y(I){if(!x){if(x=!0,w=I,I=g(I),f!==void 0&&m.hasValue){var E=m.value;if(f(E,I))return C=E}return C=I}if(E=C,r(w,I))return E;var R=g(I);return f!==void 0&&f(E,R)?(w=I,E):(w=I,C=R)}var x=!1,w,C,S=p===void 0?null:p;return[function(){return y(d())},S===null?void 0:function(){return y(S())}]},[d,p,g,f]);var b=o(c,h[0],h[1]);return i(function(){m.hasValue=!0,m.value=b},[b]),l(b),b},As}var Ts={};var tc;function Jy(){return tc||(tc=1,process.env.NODE_ENV!=="production"&&(function(){function e(c,d){return c===d&&(c!==0||1/c===1/d)||c!==c&&d!==d}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var t=Te,n=oa(),r=typeof Object.is=="function"?Object.is:e,o=n.useSyncExternalStore,s=t.useRef,i=t.useEffect,a=t.useMemo,l=t.useDebugValue;Ts.useSyncExternalStoreWithSelector=function(c,d,p,g,f){var h=s(null);if(h.current===null){var m={hasValue:!1,value:null};h.current=m}else m=h.current;h=a(function(){function y(I){if(!x){if(x=!0,w=I,I=g(I),f!==void 0&&m.hasValue){var E=m.value;if(f(E,I))return C=E}return C=I}if(E=C,r(w,I))return E;var R=g(I);return f!==void 0&&f(E,R)?(w=I,E):(w=I,C=R)}var x=!1,w,C,S=p===void 0?null:p;return[function(){return y(d())},S===null?void 0:function(){return y(S())}]},[d,p,g,f]);var b=o(c,h[0],h[1]);return i(function(){m.hasValue=!0,m.value=b},[b]),l(b),b},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),Ts}var nc;function eC(){return nc||(nc=1,process.env.NODE_ENV==="production"?Kr.exports=Qy():Kr.exports=Jy()),Kr.exports}var tC=eC();const nC=zi(19),rC=nC?sC:iC;function V(e,t,n,r,o){return rC(e,t,n,r,o)}function oC(e,t,n,r,o){const s=u.useCallback(()=>t(e.getSnapshot(),n,r,o),[e,t,n,r,o]);return Zy.useSyncExternalStore(e.subscribe,s,s)}function sC(e,t,n,r,o){return oC(e,t,n,r,o)}function iC(e,t,n,r,o){return tC.useSyncExternalStoreWithSelector(e.subscribe,e.getSnapshot,e.getSnapshot,s=>t(s,n,r,o))}class yd{constructor(t){this.state=t,this.listeners=new Set,this.updateTick=0}subscribe=t=>(this.listeners.add(t),()=>{this.listeners.delete(t)});getSnapshot=()=>this.state;setState(t){if(this.state===t)return;this.state=t,this.updateTick+=1;const n=this.updateTick;for(const r of this.listeners){if(n!==this.updateTick)return;r(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,r,o){return V(this,t,n,r,o)}}class aC extends yd{constructor(t,n={},r){super(t),this.context=n,this.selectors=r}useSyncedValue(t,n){u.useDebugValue(t),oe(()=>{this.state[t]!==n&&this.set(t,n)},[t,n])}useSyncedValueWithCleanup(t,n){const r=this;oe(()=>(r.state[t]!==n&&r.set(t,n),()=>{r.set(t,void 0)}),[r,t,n])}useSyncedValues(t){const n=this;if(process.env.NODE_ENV!=="production"){u.useDebugValue(t,i=>Object.keys(i));const o=u.useRef(Object.keys(t)).current,s=Object.keys(t);(o.length!==s.length||o.some((i,a)=>i!==s[a]))&&console.error("ReactStore.useSyncedValues expects the same prop keys on every render. Keys should be stable.")}const r=Object.values(t);oe(()=>{n.update(t)},[n,...r])}useControlledProp(t,n){u.useDebugValue(t);const r=n!==void 0;if(oe(()=>{r&&!Object.is(this.state[t],n)&&super.setState({...this.state,[t]:n})},[t,n,r]),process.env.NODE_ENV!=="production"){const o=this.controlledValues??=new Map;o.has(t)||o.set(t,r);const s=o.get(t);s!==void 0&&s!==r&&console.error(`A component is changing the ${r?"":"un"}controlled state of ${t.toString()} to be ${r?"un":""}controlled. Elements should not switch from uncontrolled to controlled (or vice versa).`)}}select(t,n,r,o){const s=this.selectors[t];return s(this.state,n,r,o)}useState(t,n,r,o){return u.useDebugValue(t),V(this,this.selectors[t],n,r,o)}useContextCallback(t,n){u.useDebugValue(t);const r=re(n??Ve);this.context[t]=r}useStateSetter(t){const n=u.useRef(void 0);return n.current===void 0&&(n.current=r=>{this.set(t,r)}),n.current}observe(t,n){let r;typeof t=="function"?r=t:r=this.selectors[t];let o=r(this.state);return n(o,o,this),this.subscribe(s=>{const i=r(s);if(!Object.is(o,i)){const a=o;o=i,n(i,a,this)}})}}const lC={open:ne(e=>e.open),domReferenceElement:ne(e=>e.domReferenceElement),referenceElement:ne(e=>e.positionReference??e.referenceElement),floatingElement:ne(e=>e.floatingElement),floatingId:ne(e=>e.floatingId)};class cC extends aC{constructor(t){const{nested:n,noEmit:r,onOpenChange:o,triggerElements:s,...i}=t;super({...i,positionReference:i.referenceElement,domReferenceElement:i.referenceElement},{onOpenChange:o,dataRef:{current:{}},events:Tx(),nested:n,noEmit:r,triggerElements:s},lC)}setOpen=(t,n)=>{if((!t||!this.state.open||Lu(n.event))&&(this.context.dataRef.current.openEvent=t?n.event:void 0),!this.context.noEmit){const r={open:t,reason:n.reason,nativeEvent:n.event,nested:this.context.nested,triggerElement:n.trigger};this.context.events.emit("openchange",r)}this.context.onOpenChange?.(t,n)}}class uC{constructor(){this.elementsSet=new Set,this.idMap=new Map}add(t,n){const r=this.idMap.get(t);if(r!==n&&(r!==void 0&&this.elementsSet.delete(r),this.elementsSet.add(n),this.idMap.set(t,n),process.env.NODE_ENV!=="production"&&this.elementsSet.size!==this.idMap.size))throw new Error("Base UI: A trigger element cannot be registered under multiple IDs in PopupTriggerMap.")}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 Cd(e){const{open:t=!1,onOpenChange:n,elements:r={}}=e,o=Hi(),s=Zu()!=null;if(process.env.NODE_ENV!=="production"){const a=r.reference;a&&!Fe(a)&&console.error("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `context.setPositionReference()`","instead.")}const i=wt(()=>new cC({open:t,onOpenChange:n,referenceElement:r.reference??null,floatingElement:r.floating??null,triggerElements:new uC,floatingId:o,nested:s,noEmit:!1})).current;return oe(()=>{const a={open:t,floatingId:o};r.reference!==void 0&&(a.referenceElement=r.reference,a.domReferenceElement=Fe(r.reference)?r.reference:null),r.floating!==void 0&&(a.floatingElement=r.floating),i.update(a)},[t,o,r.reference,r.floating,i]),i.context.onOpenChange=n,i.context.nested=s,i.context.noEmit=!1,i}function dC(e={}){const{nodeId:t,externalTree:n}=e,r=Cd(e),o=e.rootContext||r,s={reference:o.useState("referenceElement"),floating:o.useState("floatingElement"),domReference:o.useState("domReferenceElement")},[i,a]=u.useState(null),l=u.useRef(null),c=Ho(n);oe(()=>{s.domReference&&(l.current=s.domReference)},[s.domReference]);const d=dd({...e,elements:{...s,...i&&{reference:i}}}),p=u.useCallback(E=>{const R=Fe(E)?{getBoundingClientRect:()=>E.getBoundingClientRect(),getClientRects:()=>E.getClientRects(),contextElement:E}:E;a(R),d.refs.setReference(R)},[d.refs]),[g,f]=u.useState(null),[h,m]=u.useState(null);o.useSyncedValue("referenceElement",g),o.useSyncedValue("domReferenceElement",Fe(g)?g:null),o.useSyncedValue("floatingElement",h);const b=u.useCallback(E=>{(Fe(E)||E===null)&&(l.current=E,f(E)),(Fe(d.refs.reference.current)||d.refs.reference.current===null||E!==null&&!Fe(E))&&d.refs.setReference(E)},[d.refs,f]),y=u.useCallback(E=>{m(E),d.refs.setFloating(E)},[d.refs]),x=u.useMemo(()=>({...d.refs,setReference:b,setFloating:y,setPositionReference:p,domReference:l}),[d.refs,b,y,p]),w=u.useMemo(()=>({...d.elements,domReference:s.domReference}),[d.elements,s.domReference]),C=o.useState("open"),S=o.useState("floatingId"),I=u.useMemo(()=>({...d,dataRef:o.context.dataRef,open:C,onOpenChange:o.setOpen,events:o.context.events,floatingId:S,refs:x,elements:w,nodeId:t,rootStore:o}),[d,x,w,t,o,C,S]);return oe(()=>{o.context.dataRef.current.floatingContext=I;const E=c?.nodesRef.current.find(R=>R.id===t);E&&(E.context=I)}),u.useMemo(()=>({...d,context:I,refs:x,elements:w,rootStore:o}),[d,x,w,I,o])}function fC(e=[]){const t=e.map(c=>c?.reference),n=e.map(c=>c?.floating),r=e.map(c=>c?.item),o=e.map(c=>c?.trigger),s=u.useCallback(c=>Yr(c,e,"reference"),t),i=u.useCallback(c=>Yr(c,e,"floating"),n),a=u.useCallback(c=>Yr(c,e,"item"),r),l=u.useCallback(c=>Yr(c,e,"trigger"),o);return u.useMemo(()=>({getReferenceProps:s,getFloatingProps:i,getItemProps:a,getTriggerProps:l}),[s,i,a,l])}function Yr(e,t,n){const r=new Map,o=n==="item",s={};n==="floating"&&(s.tabIndex=-1,s[li]="");for(const i in e)o&&e&&(i===Mu||i===Du)||(s[i]=e[i]);for(let i=0;i<t.length;i+=1){let a;const l=t[i]?.[n];typeof l=="function"?a=e?l(e):null:a=l,a&&rc(s,a,o,r)}return rc(s,e,o,r),s}function rc(e,t,n,r){for(const o in t){const s=t[o];n&&(o===Mu||o===Du)||(o.startsWith("on")?(r.has(o)||r.set(o,[]),typeof s=="function"&&(r.get(o)?.push(s),e[o]=(...i)=>r.get(o)?.map(a=>a(...i)).find(a=>a!==void 0))):e[o]=s)}}const pC="Escape";function Wo(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function Xr(e,t){return Wo(t,e===Yi||e===xr,e===cn||e===un)}function Ms(e,t,n){return Wo(t,e===xr,n?e===cn:e===un)||e==="Enter"||e===" "||e===""}function gC(e,t,n){return Wo(t,n?e===cn:e===un,e===xr)}function mC(e,t,n,r){const o=n?e===un:e===cn,s=e===Yi;return t==="both"||t==="horizontal"&&r&&r>1?e===pC:Wo(t,o,s)}function hC(e,t){const n="rootStore"in e?e.rootStore:e,r=n.useState("open"),o=n.useState("floatingElement"),s=n.useState("domReferenceElement"),i=n.context.dataRef,{listRef:a,activeIndex:l,onNavigate:c=()=>{},enabled:d=!0,selectedIndex:p=null,allowEscape:g=!1,loopFocus:f=!1,nested:h=!1,rtl:m=!1,virtual:b=!1,focusItemOnOpen:y="auto",focusItemOnHover:x=!0,openOnArrowKeyDown:w=!0,disabledIndices:C=void 0,orientation:S="vertical",parentOrientation:I,cols:E=1,id:R,resetOnPointerLeave:F=!0,externalTree:N}=t;process.env.NODE_ENV!=="production"&&(g&&(f||console.warn("`useListNavigation` looping must be enabled to allow escaping."),b||console.warn("`useListNavigation` must be virtual to allow escaping.")),S==="vertical"&&E>1&&console.warn("In grid list navigation mode (`cols` > 1), the `orientation` should",'be either "horizontal" or "both".'));const T=ui(o),_=yt(T),q=Zu(),Y=Ho(N);oe(()=>{i.current.orientation=S},[i,S]);const H=ci(s),P=u.useRef(y),B=u.useRef(p??-1),z=u.useRef(null),te=u.useRef(!0),A=re(D=>{c(B.current===-1?null:B.current,D)}),Re=u.useRef(A),ge=u.useRef(!!o),Ce=u.useRef(r),ae=u.useRef(!1),le=u.useRef(!1),ve=yt(C),Ee=yt(r),ke=yt(p),X=yt(F),me=re(()=>{function D(ie){b?Y?.events.emit("virtualfocus",ie):dr(ie,{sync:ae.current,preventScroll:!0})}const K=a.current[B.current],j=le.current;K&&D(K),(ae.current?ie=>ie():requestAnimationFrame)(()=>{const ie=a.current[B.current]||K;if(!ie)return;K||D(ie),O&&(j||!te.current)&&ie.scrollIntoView?.({block:"nearest",inline:"nearest"})})});oe(()=>{d&&(r&&o?(B.current=p??-1,P.current&&p!=null&&(le.current=!0,A())):ge.current&&(B.current=-1,Re.current()))},[d,r,o,p,A]),oe(()=>{if(d){if(!r){ae.current=!1;return}if(o)if(l==null){if(ae.current=!1,ke.current!=null)return;if(ge.current&&(B.current=-1,me()),(!Ce.current||!ge.current)&&P.current&&(z.current!=null||P.current===!0&&z.current==null)){let D=0;const K=()=>{a.current[0]==null?(D<2&&(D?requestAnimationFrame:queueMicrotask)(K),D+=1):(B.current=z.current==null||Ms(z.current,S,m)||h?Es(a):Ol(a),z.current=null,A())};K()}}else lr(a,l)||(B.current=l,me(),le.current=!1)}},[d,r,o,l,ke,h,a,S,m,A,me,ve]),oe(()=>{if(!d||o||!Y||b||!ge.current)return;const D=Y.nodesRef.current,K=D.find(ie=>ie.id===q)?.context?.elements.floating,j=Ht(Ge(o)),Q=D.some(ie=>ie.context&&Ie(ie.context.elements.floating,j));K&&!Q&&te.current&&K.focus({preventScroll:!0})},[d,o,Y,q,b]),oe(()=>{Re.current=A,Ce.current=r,ge.current=!!o}),oe(()=>{r||(z.current=null,P.current=y)},[r,y]);const we=l!=null,O=u.useMemo(()=>{function D(j){if(!Ee.current)return;const Q=a.current.indexOf(j.currentTarget);Q!==-1&&B.current!==Q&&(B.current=Q,A(j))}return{onFocus(j){ae.current=!0,D(j)},onClick:({currentTarget:j})=>j.focus({preventScroll:!0}),onMouseMove(j){ae.current=!0,le.current=!1,x&&D(j)},onPointerLeave(j){if(!Ee.current||!te.current||j.pointerType==="touch")return;ae.current=!0;const Q=j.relatedTarget;!x||a.current.includes(Q)||X.current&&(dr(null,{sync:!0}),B.current=-1,A(j),b||_.current?.focus({preventScroll:!0}))}}},[Ee,_,x,a,A,X,b]),M=u.useCallback(()=>I??Y?.nodesRef.current.find(D=>D.id===q)?.context?.dataRef?.current.orientation,[q,Y,I]),G=re(D=>{if(te.current=!1,ae.current=!0,D.which===229||!Ee.current&&D.currentTarget===_.current)return;if(h&&mC(D.key,S,m,E)){Xr(D.key,M())||De(D),n.setOpen(!1,pe(ar,D.nativeEvent)),Be(s)&&(b?Y?.events.emit("virtualfocus",s):s.focus());return}const K=B.current,j=Es(a,C),Q=Ol(a,C);if(H||(D.key==="Home"&&(De(D),B.current=j,A(D)),D.key==="End"&&(De(D),B.current=Q,A(D))),E>1){const ie=Array.from({length:a.current.length},()=>({width:1,height:1})),xe=ix(ie,E),We=xe.findIndex(Ne=>Ne!=null&&!cr(a,Ne,C)),st=xe.reduce((Ne,$e,it)=>$e!=null&&!cr(a,$e,C)?it:Ne,-1),Le=xe[sx({current:xe.map(Ne=>Ne!=null?a.current[Ne]:null)},{event:D,orientation:S,loopFocus:f,rtl:m,cols:E,disabledIndices:lx([...(typeof C!="function"?C:null)||a.current.map((Ne,$e)=>cr(a,$e,C)?$e:void 0),void 0],xe),minIndex:We,maxIndex:st,prevIndex:ax(B.current>Q?j:B.current,ie,xe,E,D.key===xr?"bl":D.key===(m?cn:un)?"tr":"tl"),stopEvent:!0})];if(Le!=null&&(B.current=Le,A(D)),S==="both")return}if(Xr(D.key,S)){if(De(D),r&&!b&&Ht(D.currentTarget.ownerDocument)===D.currentTarget){B.current=Ms(D.key,S,m)?j:Q,A(D);return}Ms(D.key,S,m)?f?K>=Q?g&&K!==a.current.length?B.current=-1:(ae.current=!1,B.current=j):B.current=tt(a,{startingIndex:K,disabledIndices:C}):B.current=Math.min(Q,tt(a,{startingIndex:K,disabledIndices:C})):f?K<=j?g&&K!==-1?B.current=a.current.length:(ae.current=!1,B.current=Q):B.current=tt(a,{startingIndex:K,decrement:!0,disabledIndices:C}):B.current=Math.max(j,tt(a,{startingIndex:K,decrement:!0,disabledIndices:C})),lr(a,B.current)&&(B.current=-1),A(D)}}),fe=u.useMemo(()=>b&&r&&we&&{"aria-activedescendant":`${R}-${l}`},[b,r,we,R,l]),k=u.useMemo(()=>({"aria-orientation":S==="both"?void 0:S,...H?{}:fe,onKeyDown(D){if(D.key==="Tab"&&D.shiftKey&&r&&!b){const K=dt(D.nativeEvent);if(K&&!Ie(_.current,K))return;De(D),n.setOpen(!1,pe(Mo,D.nativeEvent)),Be(s)&&s.focus();return}G(D)},onPointerMove(){te.current=!0}}),[fe,G,_,S,H,n,r,b,s]),W=u.useMemo(()=>{function D(j){y==="auto"&&Fu(j.nativeEvent)&&(P.current=!b)}function K(j){P.current=y,y==="auto"&&Vu(j.nativeEvent)&&(P.current=!0)}return{onKeyDown(j){const Q=n.select("open");te.current=!1;const ie=j.key.startsWith("Arrow"),xe=gC(j.key,M(),m),We=Xr(j.key,S),st=(h?xe:We)||j.key==="Enter"||j.key.trim()==="";if(b&&Q)return G(j);if(!(!Q&&!w&&ie)){if(st){const Le=Xr(j.key,M());z.current=h&&Le?null:j.key}if(h){xe&&(De(j),Q?(B.current=Es(a,ve.current),A(j)):n.setOpen(!0,pe(ar,j.nativeEvent,j.currentTarget)));return}We&&(ke.current!=null&&(B.current=ke.current),De(j),!Q&&w?n.setOpen(!0,pe(ar,j.nativeEvent,j.currentTarget)):G(j),Q&&A(j))}},onFocus(j){n.select("open")&&!b&&(B.current=-1,A(j))},onPointerDown:K,onPointerEnter:K,onMouseDown:D,onClick:D}},[G,ve,y,a,h,A,n,w,S,M,m,ke,b]),U=u.useMemo(()=>({...fe,...W}),[fe,W]);return u.useMemo(()=>d?{reference:U,floating:k,item:O,trigger:W}:{},[d,U,k,W,O])}function bC(e,t){const n="rootStore"in e?e.rootStore:e,r=n.context.dataRef,o=n.useState("open"),{listRef:s,activeIndex:i,onMatch:a,onTypingChange:l,enabled:c=!0,resetMs:d=750,selectedIndex:p=null}=t,g=En(),f=u.useRef(""),h=u.useRef(p??i??-1),m=u.useRef(null);oe(()=>{!o&&p!==null||(g.clear(),m.current=null,f.current!==""&&(f.current=""))},[o,p,g]),oe(()=>{o&&f.current===""&&(h.current=p??i??-1)},[o,p,i]);const b=re(S=>{S?r.current.typing||(r.current.typing=S,l?.(S)):r.current.typing&&(r.current.typing=S,l?.(S))}),y=re(S=>{function I(_,q,Y){const H=q.find(P=>P?.toLocaleLowerCase().indexOf(Y.toLocaleLowerCase())===0);return H?_.indexOf(H):-1}const E=s.current;if(f.current.length>0&&f.current[0]!==" "&&(I(E,E,f.current)===-1?b(!1):S.key===" "&&De(S)),E==null||S.key.length!==1||S.ctrlKey||S.metaKey||S.altKey)return;o&&S.key!==" "&&(De(S),b(!0));const R=f.current==="";R&&(h.current=p??i??-1),E.every(_=>_?_[0]?.toLocaleLowerCase()!==_[1]?.toLocaleLowerCase():!0)&&f.current===S.key&&(f.current="",h.current=m.current),f.current+=S.key,g.start(d,()=>{f.current="",h.current=m.current,b(!1)});const N=R?p??i??-1:h.current,T=I(E,[...E.slice((N||0)+1),...E.slice(0,(N||0)+1)],f.current);T!==-1?(a?.(T),m.current=T):S.key!==" "&&(f.current="",b(!1))}),x=re(S=>{const I=S.relatedTarget,E=n.select("domReferenceElement"),R=n.select("floatingElement"),F=Ie(E,I),N=Ie(R,I);F||N||(g.clear(),f.current="",h.current=m.current,b(!1))}),w=u.useMemo(()=>({onKeyDown:y,onBlur:x}),[y,x]),C=u.useMemo(()=>({onKeyDown:y,onKeyUp(S){S.key===" "&&b(!1)},onBlur:x}),[y,x,b]);return u.useMemo(()=>c?{reference:w,floating:C}:{},[c,w,C])}function vC(e){const t=u.useRef(""),n=u.useCallback(o=>{o.defaultPrevented||(t.current=o.pointerType,e(o,o.pointerType))},[e]);return{onClick:u.useCallback(o=>{if(o.detail===0){e(o,"keyboard");return}"pointerType"in o?e(o,o.pointerType):e(o,t.current),t.current=""},[e]),onPointerDown:n}}function xC(e){const[t,n]=u.useState(null),r=re((a,l)=>{e||n(l||(Tu?"touch":""))}),o=u.useCallback(()=>{n(null)},[]),{onClick:s,onPointerDown:i}=vC(r);return u.useMemo(()=>({openMethod:t,reset:o,triggerProps:{onClick:s,onPointerDown:i}}),[t,o,s,i])}let sa=(function(e){return e.open="data-open",e.closed="data-closed",e[e.startingStyle=mr.startingStyle]="startingStyle",e[e.endingStyle=mr.endingStyle]="endingStyle",e.anchorHidden="data-anchor-hidden",e.side="data-side",e.align="data-align",e})({}),mi=(function(e){return e.popupOpen="data-popup-open",e.pressed="data-pressed",e})({});const yC={[mi.popupOpen]:""},CC={[mi.popupOpen]:"",[mi.pressed]:""},wC={[sa.open]:""},SC={[sa.closed]:""},RC={[sa.anchorHidden]:""},EC={open(e){return e?yC:null}},IC={open(e){return e?CC:null}},wd={open(e){return e?wC:SC},anchorHidden(e){return e?RC:null}};function kC(e){return zi(19)?e:e?"true":void 0}const Sd=u.forwardRef(function(t,n){const{cutout:r,...o}=t;let s;if(r){const i=r?.getBoundingClientRect();s=`polygon(
24
+ \`createSelector([state => state.todos.map(todo => todo.id)], todoIds => todoIds.length)\``,{arguments:n,firstInputs:i,secondInputs:a,stack:u})}},$$={inputStabilityCheck:"once",identityFunctionCheck:"once"},nu=Symbol("NOT_FOUND");function L$(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function F$(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function V$(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(n=>typeof n=="function")){const n=e.map(r=>typeof r=="function"?`function ${r.name||"unnamed"}()`:typeof r).join(", ");throw new TypeError(`${t}[${n}]`)}}var ib=e=>Array.isArray(e)?e:[e];function z$(e){const t=Array.isArray(e[0])?e[0]:e;return V$(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function ab(e,t){const n=[],{length:r}=e;for(let o=0;o<r;o++)n.push(e[o].apply(null,t));return n}var B$=(e,t)=>{const{identityFunctionCheck:n,inputStabilityCheck:r}={...$$,...t};return{identityFunctionCheck:{shouldRun:n==="always"||n==="once"&&e,run:D$},inputStabilityCheck:{shouldRun:r==="always"||r==="once"&&e,run:j$}}};function H$(e){let t;return{get(n){return t&&e(t.key,n)?t.value:nu},put(n,r){t={key:n,value:r}},getEntries(){return t?[t]:[]},clear(){t=void 0}}}function G$(e,t){let n=[];function r(s){const l=n.findIndex(u=>t(s,u.key));if(l>-1){const u=n[l];return l>0&&(n.splice(l,1),n.unshift(u)),u.value}return nu}function o(s,l){r(s)===nu&&(n.unshift({key:s,value:l}),n.length>e&&n.pop())}function i(){return n}function a(){n=[]}return{get:r,put:o,getEntries:i,clear:a}}var W$=(e,t)=>e===t;function U$(e){return function(n,r){if(n===null||r===null||n.length!==r.length)return!1;const{length:o}=n;for(let i=0;i<o;i++)if(!e(n[i],r[i]))return!1;return!0}}function q$(e,t){const n=typeof t=="object"?t:{equalityCheck:t},{equalityCheck:r=W$,maxSize:o=1,resultEqualityCheck:i}=n,a=U$(r);let s=0;const l=o<=1?H$(a):G$(o,a);function u(){let c=l.get(arguments);if(c===nu){if(c=e.apply(null,arguments),s++,i){const p=l.getEntries().find(d=>i(d.value,c));p&&(c=p.value,s!==0&&s--)}l.put(arguments,c)}return c}return u.clearCache=()=>{l.clear(),u.resetResultsCount()},u.resultsCount=()=>s,u.resetResultsCount=()=>{s=0},u}var K$=class{constructor(e){this.value=e}deref(){return this.value}},Y$=typeof WeakRef<"u"?WeakRef:K$,X$=0,sb=1;function el(){return{s:X$,v:void 0,o:null,p:null}}function p1(e,t={}){let n=el();const{resultEqualityCheck:r}=t;let o,i=0;function a(){let s=n;const{length:l}=arguments;for(let f=0,p=l;f<p;f++){const d=arguments[f];if(typeof d=="function"||typeof d=="object"&&d!==null){let m=s.o;m===null&&(s.o=m=new WeakMap);const g=m.get(d);g===void 0?(s=el(),m.set(d,s)):s=g}else{let m=s.p;m===null&&(s.p=m=new Map);const g=m.get(d);g===void 0?(s=el(),m.set(d,s)):s=g}}const u=s;let c;if(s.s===sb)c=s.v;else if(c=e.apply(null,arguments),i++,r){const f=o?.deref?.()??o;f!=null&&r(f,c)&&(c=f,i!==0&&i--),o=typeof c=="object"&&c!==null||typeof c=="function"?new Y$(c):c}return u.s=sb,u.v=c,c}return a.clearCache=()=>{n=el(),a.resetResultsCount()},a.resultsCount=()=>i,a.resetResultsCount=()=>{i=0},a}function h1(e,...t){const n=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,r=(...o)=>{let i=0,a=0,s,l={},u=o.pop();typeof u=="object"&&(l=u,u=o.pop()),L$(u,`createSelector expects an output function after the inputs, but received: [${typeof u}]`);const c={...n,...l},{memoize:f,memoizeOptions:p=[],argsMemoize:d=p1,argsMemoizeOptions:m=[],devModeChecks:g={}}=c,h=ib(p),y=ib(m),b=z$(o),x=f(function(){return i++,u.apply(null,arguments)},...h);let w=!0;const S=d(function(){a++;const O=ab(b,arguments);if(s=x.apply(null,O),process.env.NODE_ENV!=="production"){const{identityFunctionCheck:P,inputStabilityCheck:N}=B$(w,g);if(P.shouldRun&&P.run(u,O,s),N.shouldRun){const R=ab(b,arguments);N.run({inputSelectorResults:O,inputSelectorResultsCopy:R},{memoize:f,memoizeOptions:h},arguments)}w&&(w=!1)}return s},...y);return Object.assign(S,{resultFunc:u,memoizedResultFunc:x,dependencies:b,dependencyRecomputations:()=>a,resetDependencyRecomputations:()=>{a=0},lastResult:()=>s,recomputations:()=>i,resetRecomputations:()=>{i=0},memoize:f,argsMemoize:d})};return Object.assign(r,{withTypes:()=>r}),r}var j=h1(p1),Z$=Object.assign((e,t=j)=>{F$(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),r=n.map(i=>e[i]);return t(r,(...i)=>i.reduce((a,s,l)=>(a[n[l]]=s,a),{}))},{withTypes:()=>Z$});h1({memoize:q$,memoizeOptions:{maxSize:1,equalityCheck:Object.is}});const fe=(e,t,n,r,o,i,...a)=>{if(a.length>0)throw new Error(process.env.NODE_ENV!=="production"?"Unsupported number of selectors":Gn(1));let s;if(e)s=e;else throw new Error("Missing arguments");return s};function si(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var tl={exports:{}},zf={};var lb;function Q$(){if(lb)return zf;lb=1;var e=A;function t(f,p){return f===p&&(f!==0||1/f===1/p)||f!==f&&p!==p}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,o=e.useEffect,i=e.useLayoutEffect,a=e.useDebugValue;function s(f,p){var d=p(),m=r({inst:{value:d,getSnapshot:p}}),g=m[0].inst,h=m[1];return i(function(){g.value=d,g.getSnapshot=p,l(g)&&h({inst:g})},[f,d,p]),o(function(){return l(g)&&h({inst:g}),f(function(){l(g)&&h({inst:g})})},[f]),a(d),d}function l(f){var p=f.getSnapshot;f=f.value;try{var d=p();return!n(f,d)}catch{return!0}}function u(f,p){return p()}var c=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?u:s;return zf.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:c,zf}var Bf={};var ub;function J$(){return ub||(ub=1,process.env.NODE_ENV!=="production"&&(function(){function e(d,m){return d===m&&(d!==0||1/d===1/m)||d!==d&&m!==m}function t(d,m){c||o.startTransition===void 0||(c=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var g=m();if(!f){var h=m();i(g,h)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),f=!0)}h=a({inst:{value:g,getSnapshot:m}});var y=h[0].inst,b=h[1];return l(function(){y.value=g,y.getSnapshot=m,n(y)&&b({inst:y})},[d,g,m]),s(function(){return n(y)&&b({inst:y}),d(function(){n(y)&&b({inst:y})})},[d]),u(g),g}function n(d){var m=d.getSnapshot;d=d.value;try{var g=m();return!i(d,g)}catch{return!0}}function r(d,m){return m()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var o=A,i=typeof Object.is=="function"?Object.is:e,a=o.useState,s=o.useEffect,l=o.useLayoutEffect,u=o.useDebugValue,c=!1,f=!1,p=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?r:t;Bf.useSyncExternalStore=o.useSyncExternalStore!==void 0?o.useSyncExternalStore:p,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),Bf}var cb;function $m(){return cb||(cb=1,process.env.NODE_ENV==="production"?tl.exports=Q$():tl.exports=J$()),tl.exports}var eL=$m(),nl={exports:{}},Hf={};var fb;function tL(){if(fb)return Hf;fb=1;var e=A,t=$m();function n(u,c){return u===c&&(u!==0||1/u===1/c)||u!==u&&c!==c}var r=typeof Object.is=="function"?Object.is:n,o=t.useSyncExternalStore,i=e.useRef,a=e.useEffect,s=e.useMemo,l=e.useDebugValue;return Hf.useSyncExternalStoreWithSelector=function(u,c,f,p,d){var m=i(null);if(m.current===null){var g={hasValue:!1,value:null};m.current=g}else g=m.current;m=s(function(){function y(E){if(!b){if(b=!0,x=E,E=p(E),d!==void 0&&g.hasValue){var O=g.value;if(d(O,E))return w=O}return w=E}if(O=w,r(x,E))return O;var P=p(E);return d!==void 0&&d(O,P)?(x=E,O):(x=E,w=P)}var b=!1,x,w,S=f===void 0?null:f;return[function(){return y(c())},S===null?void 0:function(){return y(S())}]},[c,f,p,d]);var h=o(u,m[0],m[1]);return a(function(){g.hasValue=!0,g.value=h},[h]),l(h),h},Hf}var Gf={};var db;function nL(){return db||(db=1,process.env.NODE_ENV!=="production"&&(function(){function e(u,c){return u===c&&(u!==0||1/u===1/c)||u!==u&&c!==c}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var t=A,n=$m(),r=typeof Object.is=="function"?Object.is:e,o=n.useSyncExternalStore,i=t.useRef,a=t.useEffect,s=t.useMemo,l=t.useDebugValue;Gf.useSyncExternalStoreWithSelector=function(u,c,f,p,d){var m=i(null);if(m.current===null){var g={hasValue:!1,value:null};m.current=g}else g=m.current;m=s(function(){function y(E){if(!b){if(b=!0,x=E,E=p(E),d!==void 0&&g.hasValue){var O=g.value;if(d(O,E))return w=O}return w=E}if(O=w,r(x,E))return O;var P=p(E);return d!==void 0&&d(O,P)?(x=E,O):(x=E,w=P)}var b=!1,x,w,S=f===void 0?null:f;return[function(){return y(c())},S===null?void 0:function(){return y(S())}]},[c,f,p,d]);var h=o(u,m[0],m[1]);return a(function(){g.hasValue=!0,g.value=h},[h]),l(h),h},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),Gf}var pb;function rL(){return pb||(pb=1,process.env.NODE_ENV==="production"?nl.exports=tL():nl.exports=nL()),nl.exports}var m1=rL();const oL=xm(19),iL=oL?sL:lL;function X(e,t,n,r,o){return iL(e,t,n,r,o)}function aL(e,t,n,r,o){const i=v.useCallback(()=>t(e.getSnapshot(),n,r,o),[e,t,n,r,o]);return eL.useSyncExternalStore(e.subscribe,i,i)}function sL(e,t,n,r,o){return aL(e,t,n,r,o)}function lL(e,t,n,r,o){return m1.useSyncExternalStoreWithSelector(e.subscribe,e.getSnapshot,e.getSnapshot,i=>t(i,n,r,o))}class g1{constructor(t){this.state=t,this.listeners=new Set,this.updateTick=0}subscribe=t=>(this.listeners.add(t),()=>{this.listeners.delete(t)});getSnapshot=()=>this.state;setState(t){if(this.state===t)return;this.state=t,this.updateTick+=1;const n=this.updateTick;for(const r of this.listeners){if(n!==this.updateTick)return;r(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,r,o){return X(this,t,n,r,o)}}class uL extends g1{constructor(t,n={},r){super(t),this.context=n,this.selectors=r}useSyncedValue(t,n){v.useDebugValue(t),he(()=>{this.state[t]!==n&&this.set(t,n)},[t,n])}useSyncedValueWithCleanup(t,n){const r=this;he(()=>(r.state[t]!==n&&r.set(t,n),()=>{r.set(t,void 0)}),[r,t,n])}useSyncedValues(t){const n=this;if(process.env.NODE_ENV!=="production"){v.useDebugValue(t,a=>Object.keys(a));const o=v.useRef(Object.keys(t)).current,i=Object.keys(t);(o.length!==i.length||o.some((a,s)=>a!==i[s]))&&console.error("ReactStore.useSyncedValues expects the same prop keys on every render. Keys should be stable.")}const r=Object.values(t);he(()=>{n.update(t)},[n,...r])}useControlledProp(t,n){v.useDebugValue(t);const r=n!==void 0;if(he(()=>{r&&!Object.is(this.state[t],n)&&super.setState({...this.state,[t]:n})},[t,n,r]),process.env.NODE_ENV!=="production"){const o=this.controlledValues??=new Map;o.has(t)||o.set(t,r);const i=o.get(t);i!==void 0&&i!==r&&console.error(`A component is changing the ${r?"":"un"}controlled state of ${t.toString()} to be ${r?"un":""}controlled. Elements should not switch from uncontrolled to controlled (or vice versa).`)}}select(t,n,r,o){const i=this.selectors[t];return i(this.state,n,r,o)}useState(t,n,r,o){return v.useDebugValue(t),X(this,this.selectors[t],n,r,o)}useContextCallback(t,n){v.useDebugValue(t);const r=de(n??et);this.context[t]=r}useStateSetter(t){const n=v.useRef(void 0);return n.current===void 0&&(n.current=r=>{this.set(t,r)}),n.current}observe(t,n){let r;typeof t=="function"?r=t:r=this.selectors[t];let o=r(this.state);return n(o,o,this),this.subscribe(i=>{const a=r(i);if(!Object.is(o,a)){const s=o;o=a,n(a,s,this)}})}}const cL={open:fe(e=>e.open),domReferenceElement:fe(e=>e.domReferenceElement),referenceElement:fe(e=>e.positionReference??e.referenceElement),floatingElement:fe(e=>e.floatingElement),floatingId:fe(e=>e.floatingId)};class fL extends uL{constructor(t){const{nested:n,noEmit:r,onOpenChange:o,triggerElements:i,...a}=t;super({...a,positionReference:a.referenceElement,domReferenceElement:a.referenceElement},{onOpenChange:o,dataRef:{current:{}},events:$2(),nested:n,noEmit:r,triggerElements:i},cL)}setOpen=(t,n)=>{if((!t||!this.state.open||TE(n.event))&&(this.context.dataRef.current.openEvent=t?n.event:void 0),!this.context.noEmit){const r={open:t,reason:n.reason,nativeEvent:n.event,nested:this.context.nested,triggerElement:n.trigger};this.context.events.emit("openchange",r)}this.context.onOpenChange?.(t,n)}}class dL{constructor(){this.elementsSet=new Set,this.idMap=new Map}add(t,n){const r=this.idMap.get(t);if(r!==n&&(r!==void 0&&this.elementsSet.delete(r),this.elementsSet.add(n),this.idMap.set(t,n),process.env.NODE_ENV!=="production"&&this.elementsSet.size!==this.idMap.size))throw new Error("Base UI: A trigger element cannot be registered under multiple IDs in PopupTriggerMap.")}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 v1(e){const{open:t=!1,onOpenChange:n,elements:r={}}=e,o=Cm(),i=UE()!=null;if(process.env.NODE_ENV!=="production"){const s=r.reference;s&&!Qe(s)&&console.error("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `context.setPositionReference()`","instead.")}const a=In(()=>new fL({open:t,onOpenChange:n,referenceElement:r.reference??null,floatingElement:r.floating??null,triggerElements:new dL,floatingId:o,nested:i,noEmit:!1})).current;return he(()=>{const s={open:t,floatingId:o};r.reference!==void 0&&(s.referenceElement=r.reference,s.domReferenceElement=Qe(r.reference)?r.reference:null),r.floating!==void 0&&(s.floatingElement=r.floating),a.update(s)},[t,o,r.reference,r.floating,a]),a.context.onOpenChange=n,a.context.nested=i,a.context.noEmit=!1,a}function pL(e={}){const{nodeId:t,externalTree:n}=e,r=v1(e),o=e.rootContext||r,i={reference:o.useState("referenceElement"),floating:o.useState("floatingElement"),domReference:o.useState("domReferenceElement")},[a,s]=v.useState(null),l=v.useRef(null),u=hc(n);he(()=>{i.domReference&&(l.current=i.domReference)},[i.domReference]);const c=a1({...e,elements:{...i,...a&&{reference:a}}}),f=v.useCallback(O=>{const P=Qe(O)?{getBoundingClientRect:()=>O.getBoundingClientRect(),getClientRects:()=>O.getClientRects(),contextElement:O}:O;s(P),c.refs.setReference(P)},[c.refs]),[p,d]=v.useState(null),[m,g]=v.useState(null);o.useSyncedValue("referenceElement",p),o.useSyncedValue("domReferenceElement",Qe(p)?p:null),o.useSyncedValue("floatingElement",m);const h=v.useCallback(O=>{(Qe(O)||O===null)&&(l.current=O,d(O)),(Qe(c.refs.reference.current)||c.refs.reference.current===null||O!==null&&!Qe(O))&&c.refs.setReference(O)},[c.refs,d]),y=v.useCallback(O=>{g(O),c.refs.setFloating(O)},[c.refs]),b=v.useMemo(()=>({...c.refs,setReference:h,setFloating:y,setPositionReference:f,domReference:l}),[c.refs,h,y,f]),x=v.useMemo(()=>({...c.elements,domReference:i.domReference}),[c.elements,i.domReference]),w=o.useState("open"),S=o.useState("floatingId"),E=v.useMemo(()=>({...c,dataRef:o.context.dataRef,open:w,onOpenChange:o.setOpen,events:o.context.events,floatingId:S,refs:b,elements:x,nodeId:t,rootStore:o}),[c,b,x,t,o,w,S]);return he(()=>{o.context.dataRef.current.floatingContext=E;const O=u?.nodesRef.current.find(P=>P.id===t);O&&(O.context=E)}),v.useMemo(()=>({...c,context:E,refs:b,elements:x,rootStore:o}),[c,b,x,E,o])}function hL(e=[]){const t=e.map(u=>u?.reference),n=e.map(u=>u?.floating),r=e.map(u=>u?.item),o=e.map(u=>u?.trigger),i=v.useCallback(u=>rl(u,e,"reference"),t),a=v.useCallback(u=>rl(u,e,"floating"),n),s=v.useCallback(u=>rl(u,e,"item"),r),l=v.useCallback(u=>rl(u,e,"trigger"),o);return v.useMemo(()=>({getReferenceProps:i,getFloatingProps:a,getItemProps:s,getTriggerProps:l}),[i,a,s,l])}function rl(e,t,n){const r=new Map,o=n==="item",i={};n==="floating"&&(i.tabIndex=-1,i[Gp]="");for(const a in e)o&&e&&(a===RE||a===IE)||(i[a]=e[a]);for(let a=0;a<t.length;a+=1){let s;const l=t[a]?.[n];typeof l=="function"?s=e?l(e):null:s=l,s&&hb(i,s,o,r)}return hb(i,e,o,r),i}function hb(e,t,n,r){for(const o in t){const i=t[o];n&&(o===RE||o===IE)||(o.startsWith("on")?(r.has(o)||r.set(o,[]),typeof i=="function"&&(r.get(o)?.push(i),e[o]=(...a)=>r.get(o)?.map(s=>s(...a)).find(s=>s!==void 0))):e[o]=i)}}const mL="Escape";function gc(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function ol(e,t){return gc(t,e===Am||e===as,e===so||e===lo)}function Wf(e,t,n){return gc(t,e===as,n?e===so:e===lo)||e==="Enter"||e===" "||e===""}function gL(e,t,n){return gc(t,n?e===so:e===lo,e===as)}function vL(e,t,n,r){const o=n?e===lo:e===so,i=e===Am;return t==="both"||t==="horizontal"&&r&&r>1?e===mL:gc(t,o,i)}function yL(e,t){const n="rootStore"in e?e.rootStore:e,r=n.useState("open"),o=n.useState("floatingElement"),i=n.useState("domReferenceElement"),a=n.context.dataRef,{listRef:s,activeIndex:l,onNavigate:u=()=>{},enabled:c=!0,selectedIndex:f=null,allowEscape:p=!1,loopFocus:d=!1,nested:m=!1,rtl:g=!1,virtual:h=!1,focusItemOnOpen:y="auto",focusItemOnHover:b=!0,openOnArrowKeyDown:x=!0,disabledIndices:w=void 0,orientation:S="vertical",parentOrientation:E,cols:O=1,id:P,resetOnPointerLeave:N=!0,externalTree:R}=t;process.env.NODE_ENV!=="production"&&(p&&(d||console.warn("`useListNavigation` looping must be enabled to allow escaping."),h||console.warn("`useListNavigation` must be virtual to allow escaping.")),S==="vertical"&&O>1&&console.warn("In grid list navigation mode (`cols` > 1), the `orientation` should",'be either "horizontal" or "both".'));const k=Up(o),_=Pn(k),T=UE(),F=hc(R);he(()=>{a.current.orientation=S},[a,S]);const V=Wp(i),D=v.useRef(y),B=v.useRef(f??-1),z=v.useRef(null),Y=v.useRef(!0),$=de(K=>{u(B.current===-1?null:B.current,K)}),ye=v.useRef($),ae=v.useRef(!!o),be=v.useRef(r),ne=v.useRef(!1),le=v.useRef(!1),Ee=Pn(w),Pe=Pn(r),Se=Pn(f),L=Pn(N),U=de(()=>{function K(ve){h?F?.events.emit("virtualfocus",ve):ja(ve,{sync:ne.current,preventScroll:!0})}const te=s.current[B.current],Z=le.current;te&&K(te),(ne.current?ve=>ve():requestAnimationFrame)(()=>{const ve=s.current[B.current]||te;if(!ve)return;te||K(ve),I&&(Z||!Y.current)&&ve.scrollIntoView?.({block:"nearest",inline:"nearest"})})});he(()=>{c&&(r&&o?(B.current=f??-1,D.current&&f!=null&&(le.current=!0,$())):ae.current&&(B.current=-1,ye.current()))},[c,r,o,f,$]),he(()=>{if(c){if(!r){ne.current=!1;return}if(o)if(l==null){if(ne.current=!1,Se.current!=null)return;if(ae.current&&(B.current=-1,U()),(!be.current||!ae.current)&&D.current&&(z.current!=null||D.current===!0&&z.current==null)){let K=0;const te=()=>{s.current[0]==null?(K<2&&(K?requestAnimationFrame:queueMicrotask)(te),K+=1):(B.current=z.current==null||Wf(z.current,S,g)||m?jf(s):zy(s),z.current=null,$())};te()}}else Ta(s,l)||(B.current=l,U(),le.current=!1)}},[c,r,o,l,Se,m,s,S,g,$,U,Ee]),he(()=>{if(!c||o||!F||h||!ae.current)return;const K=F.nodesRef.current,te=K.find(ve=>ve.id===T)?.context?.elements.floating,Z=gr(lt(o)),oe=K.some(ve=>ve.context&&Me(ve.context.elements.floating,Z));te&&!oe&&Y.current&&te.focus({preventScroll:!0})},[c,o,F,T,h]),he(()=>{ye.current=$,be.current=r,ae.current=!!o}),he(()=>{r||(z.current=null,D.current=y)},[r,y]);const G=l!=null,I=v.useMemo(()=>{function K(Z){if(!Pe.current)return;const oe=s.current.indexOf(Z.currentTarget);oe!==-1&&B.current!==oe&&(B.current=oe,$(Z))}return{onFocus(Z){ne.current=!0,K(Z)},onClick:({currentTarget:Z})=>Z.focus({preventScroll:!0}),onMouseMove(Z){ne.current=!0,le.current=!1,b&&K(Z)},onPointerLeave(Z){if(!Pe.current||!Y.current||Z.pointerType==="touch")return;ne.current=!0;const oe=Z.relatedTarget;!b||s.current.includes(oe)||L.current&&(ja(null,{sync:!0}),B.current=-1,$(Z),h||_.current?.focus({preventScroll:!0}))}}},[Pe,_,b,s,$,L,h]),W=v.useCallback(()=>E??F?.nodesRef.current.find(K=>K.id===T)?.context?.dataRef?.current.orientation,[T,F,E]),H=de(K=>{if(Y.current=!1,ne.current=!0,K.which===229||!Pe.current&&K.currentTarget===_.current)return;if(m&&vL(K.key,S,g,O)){ol(K.key,W())||Ze(K),n.setOpen(!1,Oe(Na,K.nativeEvent)),ct(i)&&(h?F?.events.emit("virtualfocus",i):i.focus());return}const te=B.current,Z=jf(s,w),oe=zy(s,w);if(V||(K.key==="Home"&&(Ze(K),B.current=Z,$(K)),K.key==="End"&&(Ze(K),B.current=oe,$(K))),O>1){const ve=Array.from({length:s.current.length},()=>({width:1,height:1})),Re=c2(ve,O),dt=Re.findIndex($e=>$e!=null&&!Ma(s,$e,w)),Xt=Re.reduce(($e,at,Zt)=>at!=null&&!Ma(s,at,w)?Zt:$e,-1),nt=Re[u2({current:Re.map($e=>$e!=null?s.current[$e]:null)},{event:K,orientation:S,loopFocus:d,rtl:g,cols:O,disabledIndices:d2([...(typeof w!="function"?w:null)||s.current.map(($e,at)=>Ma(s,at,w)?at:void 0),void 0],Re),minIndex:dt,maxIndex:Xt,prevIndex:f2(B.current>oe?Z:B.current,ve,Re,O,K.key===as?"bl":K.key===(g?so:lo)?"tr":"tl"),stopEvent:!0})];if(nt!=null&&(B.current=nt,$(K)),S==="both")return}if(ol(K.key,S)){if(Ze(K),r&&!h&&gr(K.currentTarget.ownerDocument)===K.currentTarget){B.current=Wf(K.key,S,g)?Z:oe,$(K);return}Wf(K.key,S,g)?d?te>=oe?p&&te!==s.current.length?B.current=-1:(ne.current=!1,B.current=Z):B.current=Lt(s,{startingIndex:te,disabledIndices:w}):B.current=Math.min(oe,Lt(s,{startingIndex:te,disabledIndices:w})):d?te<=Z?p&&te!==-1?B.current=s.current.length:(ne.current=!1,B.current=oe):B.current=Lt(s,{startingIndex:te,decrement:!0,disabledIndices:w}):B.current=Math.max(Z,Lt(s,{startingIndex:te,decrement:!0,disabledIndices:w})),Ta(s,B.current)&&(B.current=-1),$(K)}}),pe=v.useMemo(()=>h&&r&&G&&{"aria-activedescendant":`${P}-${l}`},[h,r,G,P,l]),M=v.useMemo(()=>({"aria-orientation":S==="both"?void 0:S,...V?{}:pe,onKeyDown(K){if(K.key==="Tab"&&K.shiftKey&&r&&!h){const te=nn(K.nativeEvent);if(te&&!Me(_.current,te))return;Ze(K),n.setOpen(!1,Oe(ic,K.nativeEvent)),ct(i)&&i.focus();return}H(K)},onPointerMove(){Y.current=!0}}),[pe,H,_,S,V,n,r,h,i]),J=v.useMemo(()=>{function K(Z){y==="auto"&&kE(Z.nativeEvent)&&(D.current=!h)}function te(Z){D.current=y,y==="auto"&&NE(Z.nativeEvent)&&(D.current=!0)}return{onKeyDown(Z){const oe=n.select("open");Y.current=!1;const ve=Z.key.startsWith("Arrow"),Re=gL(Z.key,W(),g),dt=ol(Z.key,S),Xt=(m?Re:dt)||Z.key==="Enter"||Z.key.trim()==="";if(h&&oe)return H(Z);if(!(!oe&&!x&&ve)){if(Xt){const nt=ol(Z.key,W());z.current=m&&nt?null:Z.key}if(m){Re&&(Ze(Z),oe?(B.current=jf(s,Ee.current),$(Z)):n.setOpen(!0,Oe(Na,Z.nativeEvent,Z.currentTarget)));return}dt&&(Se.current!=null&&(B.current=Se.current),Ze(Z),!oe&&x?n.setOpen(!0,Oe(Na,Z.nativeEvent,Z.currentTarget)):H(Z),oe&&$(Z))}},onFocus(Z){n.select("open")&&!h&&(B.current=-1,$(Z))},onPointerDown:te,onPointerEnter:te,onMouseDown:K,onClick:K}},[H,Ee,y,s,m,$,n,x,S,W,g,Se,h]),ee=v.useMemo(()=>({...pe,...J}),[pe,J]);return v.useMemo(()=>c?{reference:ee,floating:M,item:I,trigger:J}:{},[c,ee,M,J,I])}function bL(e,t){const n="rootStore"in e?e.rootStore:e,r=n.context.dataRef,o=n.useState("open"),{listRef:i,activeIndex:a,onMatch:s,onTypingChange:l,enabled:u=!0,resetMs:c=750,selectedIndex:f=null}=t,p=Uo(),d=v.useRef(""),m=v.useRef(f??a??-1),g=v.useRef(null);he(()=>{!o&&f!==null||(p.clear(),g.current=null,d.current!==""&&(d.current=""))},[o,f,p]),he(()=>{o&&d.current===""&&(m.current=f??a??-1)},[o,f,a]);const h=de(S=>{S?r.current.typing||(r.current.typing=S,l?.(S)):r.current.typing&&(r.current.typing=S,l?.(S))}),y=de(S=>{function E(_,T,F){const V=T.find(D=>D?.toLocaleLowerCase().indexOf(F.toLocaleLowerCase())===0);return V?_.indexOf(V):-1}const O=i.current;if(d.current.length>0&&d.current[0]!==" "&&(E(O,O,d.current)===-1?h(!1):S.key===" "&&Ze(S)),O==null||S.key.length!==1||S.ctrlKey||S.metaKey||S.altKey)return;o&&S.key!==" "&&(Ze(S),h(!0));const P=d.current==="";P&&(m.current=f??a??-1),O.every(_=>_?_[0]?.toLocaleLowerCase()!==_[1]?.toLocaleLowerCase():!0)&&d.current===S.key&&(d.current="",m.current=g.current),d.current+=S.key,p.start(c,()=>{d.current="",m.current=g.current,h(!1)});const R=P?f??a??-1:m.current,k=E(O,[...O.slice((R||0)+1),...O.slice(0,(R||0)+1)],d.current);k!==-1?(s?.(k),g.current=k):S.key!==" "&&(d.current="",h(!1))}),b=de(S=>{const E=S.relatedTarget,O=n.select("domReferenceElement"),P=n.select("floatingElement"),N=Me(O,E),R=Me(P,E);N||R||(p.clear(),d.current="",m.current=g.current,h(!1))}),x=v.useMemo(()=>({onKeyDown:y,onBlur:b}),[y,b]),w=v.useMemo(()=>({onKeyDown:y,onKeyUp(S){S.key===" "&&h(!1)},onBlur:b}),[y,b,h]);return v.useMemo(()=>u?{reference:x,floating:w}:{},[u,x,w])}function xL(e){const t=v.useRef(""),n=v.useCallback(o=>{o.defaultPrevented||(t.current=o.pointerType,e(o,o.pointerType))},[e]);return{onClick:v.useCallback(o=>{if(o.detail===0){e(o,"keyboard");return}"pointerType"in o?e(o,o.pointerType):e(o,t.current),t.current=""},[e]),onPointerDown:n}}function wL(e){const[t,n]=v.useState(null),r=de((s,l)=>{e||n(l||(AE?"touch":""))}),o=v.useCallback(()=>{n(null)},[]),{onClick:i,onPointerDown:a}=xL(r);return v.useMemo(()=>({openMethod:t,reset:o,triggerProps:{onClick:i,onPointerDown:a}}),[t,o,i,a])}let Lm=(function(e){return e.open="data-open",e.closed="data-closed",e[e.startingStyle=za.startingStyle]="startingStyle",e[e.endingStyle=za.endingStyle]="endingStyle",e.anchorHidden="data-anchor-hidden",e.side="data-side",e.align="data-align",e})({}),Zp=(function(e){return e.popupOpen="data-popup-open",e.pressed="data-pressed",e})({});const CL={[Zp.popupOpen]:""},SL={[Zp.popupOpen]:"",[Zp.pressed]:""},EL={[Lm.open]:""},OL={[Lm.closed]:""},PL={[Lm.anchorHidden]:""},_L={open(e){return e?CL:null}},AL={open(e){return e?SL:null}},y1={open(e){return e?EL:OL},anchorHidden(e){return e?PL:null}};function RL(e){return xm(19)?e:e?"true":void 0}const b1=v.forwardRef(function(t,n){const{cutout:r,...o}=t;let i;if(r){const a=r?.getBoundingClientRect();i=`polygon(
25
25
  0% 0%,
26
26
  100% 0%,
27
27
  100% 100%,
28
28
  0% 100%,
29
29
  0% 0%,
30
- ${i.left}px ${i.top}px,
31
- ${i.left}px ${i.bottom}px,
32
- ${i.right}px ${i.bottom}px,
33
- ${i.right}px ${i.top}px,
34
- ${i.left}px ${i.top}px
35
- )`}return v.jsx("div",{ref:n,role:"presentation","data-base-ui-inert":"",...o,style:{position:"fixed",inset:0,userSelect:"none",WebkitUserSelect:"none",clipPath:s}})});process.env.NODE_ENV!=="production"&&(Sd.displayName="InternalBackdrop");function NC(e){const t=u.useRef(!0);t.current&&(t.current=!1,e())}const ia=u.createContext(void 0);process.env.NODE_ENV!=="production"&&(ia.displayName="ComboboxRootContext");const aa=u.createContext(void 0);process.env.NODE_ENV!=="production"&&(aa.displayName="ComboboxFloatingContext");const la=u.createContext(void 0);process.env.NODE_ENV!=="production"&&(la.displayName="ComboboxDerivedItemsContext");const ca=u.createContext("");process.env.NODE_ENV!=="production"&&(ca.displayName="ComboboxInputValueContext");function vt(){const e=u.useContext(ia);if(!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: ComboboxRootContext is missing. Combobox parts must be placed within <Combobox.Root>.":Ot(22));return e}function Uo(){const e=u.useContext(aa);if(!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: ComboboxFloatingContext is missing. Combobox parts must be placed within <Combobox.Root>.":Ot(23));return e}function vn(){const e=u.useContext(la);if(!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: ComboboxItemsContext is missing. Combobox parts must be placed within <Combobox.Root>.":Ot(24));return e}function ua(){return u.useContext(ca)}const PC=(e,t)=>Object.is(e,t);function kn(e,t,n){return e==null||t==null?Object.is(e,t):n(e,t)}function OC(e,t,n){return!e||e.length===0?!1:e.some(r=>r===void 0?!1:kn(t,r,n))}function Io(e,t,n){return!e||e.length===0?-1:e.findIndex(r=>r===void 0?!1:kn(r,t,n))}function _C(e,t,n){return e.filter(r=>!kn(t,r,n))}function hi(e){if(e==null)return"";if(typeof e=="string")return e;try{return JSON.stringify(e)}catch{return String(e)}}function da(e){return e!=null&&e.length>0&&typeof e[0]=="object"&&e[0]!=null&&"items"in e[0]}function AC(e){if(!Array.isArray(e))return e!=null&&!("null"in e);if(da(e)){for(const t of e)for(const n of t.items)if(n&&n.value==null&&n.label!=null)return!0;return!1}for(const t of e)if(t&&t.value==null&&t.label!=null)return!0;return!1}function ut(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 hi(e)}function nr(e,t){return t&&e!=null?t(e)??"":e&&typeof e=="object"&&"value"in e&&"label"in e?hi(e.value):hi(e)}function Rd(e,t,n){function r(){return ut(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]??r();if(Array.isArray(t)){const o=da(t)?t.flatMap(s=>s.items):t;if(e==null||typeof e!="object"){const s=o.find(i=>i.value===e);return s&&s.label!=null?s.label:r()}if("value"in e){const s=o.find(i=>i&&i.value===e.value);if(s&&s.label!=null)return s.label}}return r()}function TC(e,t,n){return e.reduce((r,o,s)=>(s>0&&r.push(", "),r.push(v.jsx(u.Fragment,{children:Rd(o,t,n)},s)),r),[])}const $={id:ne(e=>e.id),query:ne(e=>e.query),items:ne(e=>e.items),selectedValue:ne(e=>e.selectedValue),hasSelectionChips:ne(e=>{const t=e.selectedValue;return Array.isArray(t)&&t.length>0}),hasSelectedValue:ne(e=>{const{selectedValue:t,selectionMode:n}=e;return t==null?!1:n==="multiple"&&Array.isArray(t)?t.length>0:!0}),hasNullItemLabel:ne((e,t)=>t?AC(e.items):!1),open:ne(e=>e.open),mounted:ne(e=>e.mounted),forceMounted:ne(e=>e.forceMounted),inline:ne(e=>e.inline),activeIndex:ne(e=>e.activeIndex),selectedIndex:ne(e=>e.selectedIndex),isActive:ne((e,t)=>e.activeIndex===t),isSelected:ne((e,t)=>{const n=e.isItemEqualToValue,r=e.selectedValue;return Array.isArray(r)?r.some(o=>kn(t,o,n)):kn(t,r,n)}),transitionStatus:ne(e=>e.transitionStatus),popupProps:ne(e=>e.popupProps),inputProps:ne(e=>e.inputProps),triggerProps:ne(e=>e.triggerProps),getItemProps:ne(e=>e.getItemProps),positionerElement:ne(e=>e.positionerElement),listElement:ne(e=>e.listElement),triggerElement:ne(e=>e.triggerElement),inputElement:ne(e=>e.inputElement),popupSide:ne(e=>e.popupSide),openMethod:ne(e=>e.openMethod),inputInsidePopup:ne(e=>e.inputInsidePopup),selectionMode:ne(e=>e.selectionMode),listRef:ne(e=>e.listRef),labelsRef:ne(e=>e.labelsRef),popupRef:ne(e=>e.popupRef),emptyRef:ne(e=>e.emptyRef),inputRef:ne(e=>e.inputRef),keyboardActiveRef:ne(e=>e.keyboardActiveRef),chipsContainerRef:ne(e=>e.chipsContainerRef),clearRef:ne(e=>e.clearRef),valuesRef:ne(e=>e.valuesRef),allValuesRef:ne(e=>e.allValuesRef),name:ne(e=>e.name),disabled:ne(e=>e.disabled),readOnly:ne(e=>e.readOnly),required:ne(e=>e.required),grid:ne(e=>e.grid),isGrouped:ne(e=>e.isGrouped),virtualized:ne(e=>e.virtualized),onOpenChangeComplete:ne(e=>e.onOpenChangeComplete),openOnInputClick:ne(e=>e.openOnInputClick),itemToStringLabel:ne(e=>e.itemToStringLabel),isItemEqualToValue:ne(e=>e.isItemEqualToValue),modal:ne(e=>e.modal),autoHighlight:ne(e=>e.autoHighlight),submitOnItemClick:ne(e=>e.submitOnItemClick)};let oc=(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 MC={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},DC={valid(e){return e===null?null:e?{[oc.valid]:""}:{[oc.invalid]:""}}},Ed=u.createContext({invalid:void 0,name:void 0,validityData:{state:MC,errors:[],error:"",value:"",initialValue:null},setValidityData:Ve,disabled:void 0,touched:!1,setTouched:Ve,dirty:!1,setDirty:Ve,filled:!1,setFilled:Ve,focused:!1,setFocused:Ve,validate:()=>null,validationMode:"onSubmit",validationDebounceTime:0,shouldValidateOnChange:()=>!1,state:{disabled:!1,valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},markedDirtyRef:{current:!1},validation:{getValidationProps:(e=rt)=>e,getInputValidationProps:(e=rt)=>e,inputRef:{current:null},commit:async()=>{}}});process.env.NODE_ENV!=="production"&&(Ed.displayName="FieldRootContext");function Cr(e=!0){const t=u.useContext(Ed);if(t.setValidityData===Ve&&!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: FieldRootContext is missing. Field parts must be placed within <Field.Root>.":Ot(28));return t}function FC(e,t){return{...e,state:{...e.state,valid:!t&&e.state.valid}}}const Id=u.createContext({formRef:{current:{fields:new Map}},errors:{},clearErrors:Ve,validationMode:"onSubmit",submitAttemptedRef:{current:!1}});process.env.NODE_ENV!=="production"&&(Id.displayName="FormContext");function kd(){return u.useContext(Id)}function VC(e){const{enabled:t=!0,value:n,id:r,name:o,controlRef:s,commit:i}=e,{formRef:a}=kd(),{invalid:l,markedDirtyRef:c,validityData:d,setValidityData:p}=Cr(),g=re(e.getValue);oe(()=>{if(!t)return;let f=n;f===void 0&&(f=g()),d.initialValue===null&&f!==null&&p(h=>({...h,initialValue:f}))},[t,p,n,d.initialValue,g]),oe(()=>{!t||!r||a.current.fields.set(r,{getValue:g,name:o,controlRef:s,validityData:FC(d,l),validate(f=!0){let h=n;h===void 0&&(h=g()),c.current=!0,f?gn.flushSync(()=>i(h)):i(h)}})},[i,s,t,a,g,r,l,c,o,d,n]),oe(()=>{const f=a.current.fields;return()=>{r&&f.delete(r)}},[a,r])}const Nd=u.createContext({controlId:void 0,registerControlId:Ve,labelId:void 0,setLabelId:Ve,messageIds:[],setMessageIds:Ve,getDescriptionProps:e=>e});process.env.NODE_ENV!=="production"&&(Nd.displayName="LabelableContext");function fa(){return u.useContext(Nd)}function Pd(e={}){const{id:t,implicit:n=!1,controlRef:r}=e,{controlId:o,registerControlId:s}=fa(),i=Bi(t),a=n?o:void 0,l=wt(()=>Symbol("labelable-control")),c=u.useRef(!1),d=u.useRef(t!=null),p=re(()=>{!c.current||s===Ve||(c.current=!1,s(l.current,void 0))});return oe(()=>{if(s===Ve)return;let g;if(n){const f=r?.current;Fe(f)&&f.closest("label")!=null?g=t??null:g=a??i}else if(t!=null)d.current=!0,g=t;else if(d.current)g=i;else{p();return}if(g===void 0){p();return}c.current=!0,s(l.current,g)},[t,r,a,s,n,i,l,p]),u.useEffect(()=>p,[p]),o??i}function LC(e,t){return(n,r)=>{if(n==null)return!1;const o=ut(n,t);return e.contains(o,r)}}function jC(e,t,n){return(r,o)=>{if(r==null)return!1;if(!o)return!0;const s=ut(r,t),i=n!=null?ut(n,t):"";return i&&e.contains(i,o)&&i.length===o.length?!0:e.contains(s,o)}}const sc=new Map;function Od(e){return Array.isArray(e)?e.map(t=>Od(t)).join(","):e==null?"":String(e)}function $C(e={}){const t={usage:"search",sensitivity:"base",ignorePunctuation:!0,...e},n=`${Od(e.locale)}|${JSON.stringify(t)}`,r=sc.get(n);if(r)return r;const o=new Intl.Collator(e.locale,t),s={contains(i,a,l){if(!a)return!0;const c=ut(i,l);for(let d=0;d<=c.length-a.length;d+=1)if(o.compare(c.slice(d,d+a.length),a)===0)return!0;return!1},startsWith(i,a,l){if(!a)return!0;const c=ut(i,l);return o.compare(c.slice(0,a.length),a)===0},endsWith(i,a,l){if(!a)return!0;const c=ut(i,l),d=a.length;return c.length>=d&&o.compare(c.slice(c.length-d),a)===0}};return sc.set(n,s),s}const zC=$C;function Zr(e,t){const n=u.useRef(e),r=re(t);oe(()=>{n.current!==e&&r(n.current)},[e,r]),oe(()=>{n.current=e},[e])}const _d=Symbol("none"),Rn={value:_d,index:-1};function GC(e){const{id:t,onOpenChangeComplete:n,defaultSelectedValue:r=null,selectedValue:o,onSelectedValueChange:s,defaultInputValue:i,inputValue:a,selectionMode:l="none",onItemHighlighted:c,name:d,disabled:p=!1,readOnly:g=!1,required:f=!1,inputRef:h,grid:m=!1,items:b,filteredItems:y,filter:x,openOnInputClick:w=!0,autoHighlight:C=!1,keepHighlight:S=!1,highlightItemOnHover:I=!0,loopFocus:E=!0,itemToStringLabel:R,itemToStringValue:F,isItemEqualToValue:N=PC,virtualized:T=!1,inline:_=!1,fillInputOnItemPress:q=!0,modal:Y=!1,limit:H=-1,autoComplete:P="list",formAutoComplete:B,locale:z,submitOnItemClick:te=!1}=e,{clearErrors:A}=kd(),{setDirty:Re,validityData:ge,shouldValidateOnChange:Ce,setFilled:ae,name:le,disabled:ve,setTouched:Ee,setFocused:ke,validationMode:X,validation:me}=Cr(),we=Pd({id:t}),O=zC({locale:z}),[M,G]=u.useState(!1),[fe,k]=u.useState(null),W=u.useRef([]),U=u.useRef([]),D=u.useRef(null),K=u.useRef(null),j=u.useRef(null),Q=u.useRef(!0),ie=u.useRef(!1),xe=u.useRef(null),We=u.useRef(null),st=u.useRef(null),Le=u.useRef(Rn),Ne=u.useRef(null),$e=u.useRef([]),it=u.useRef([]),nt=ve||p,ft=le??d,Qe=l==="multiple",at=l==="single",jt=a!==void 0||i!==void 0,St=b!==void 0,Me=y!==void 0;let Pe;C==="always"?Pe="always":Pe=C?"input-change":!1;const[ce,lt]=Cs({controlled:o,default:Qe?r??$r:r,name:"Combobox",state:"selectedValue"}),ct=u.useMemo(()=>x===null?()=>!0:x!==void 0?x:at&&!M?jC(O,R,ce):LC(O,R),[x,at,ce,M,O,R]),xn=wt(()=>jt?i??"":at?ut(ce,R):"").current,[Ke,Yn]=Cs({controlled:a,default:xn,name:"Combobox",state:"inputValue"}),[je,is]=Cs({controlled:e.open,default:e.defaultOpen,name:"Combobox",state:"open"}),Rt=da(b),Je=fe??(Ke===""?"":String(Ke).trim()),Xn=at?ut(ce,R):"",Tn=at&&!M&&Je!==""&&Xn!==""&&Xn.length===Je.length&&O.contains(Xn,Je),Xt=Tn?"":Je,Nr=St&&Me&&Tn,Zt=u.useMemo(()=>b?Rt?b.flatMap(Z=>Z.items):b:$r,[b,Rt]),Et=u.useMemo(()=>{if(y&&!Nr)return y;if(!b)return $r;if(Rt){const se=b,be=[];let ze=0;for(const Ye of se){if(H>-1&&ze>=H)break;const Xe=Xt===""?Ye.items:Ye.items.filter(Mr=>ct(Mr,Xt,R));if(Xe.length===0)continue;const yn=H>-1?H-ze:1/0,Cn=Xe.slice(0,yn);if(Cn.length>0){const Mr={...Ye,items:Cn};be.push(Mr),ze+=Cn.length}}return be}if(Xt==="")return H>-1?Zt.slice(0,H):Zt;const Z=[];for(const se of Zt){if(H>-1&&Z.length>=H)break;ct(se,Xt,R)&&Z.push(se)}return Z},[y,Nr,b,Rt,Xt,H,ct,R,Zt]),pt=u.useMemo(()=>Rt?Et.flatMap(se=>se.items):Et,[Et,Rt]),ye=wt(()=>new yd({id:we,selectedValue:ce,open:je,filter:ct,query:Je,items:b,selectionMode:l,listRef:W,labelsRef:U,popupRef:D,emptyRef:j,inputRef:K,keyboardActiveRef:Q,chipsContainerRef:xe,clearRef:We,valuesRef:$e,allValuesRef:it,selectionEventRef:st,name:ft,disabled:nt,readOnly:g,required:f,grid:m,isGrouped:Rt,virtualized:T,openOnInputClick:w,itemToStringLabel:R,isItemEqualToValue:N,modal:Y,autoHighlight:Pe,submitOnItemClick:te,hasInputValue:jt,mounted:!1,forceMounted:!1,transitionStatus:"idle",inline:_,activeIndex:null,selectedIndex:null,popupProps:{},inputProps:{},triggerProps:{},positionerElement:null,listElement:null,triggerElement:null,inputElement:null,popupSide:null,openMethod:null,inputInsidePopup:!0,onOpenChangeComplete:n||Ve,setOpen:Ve,setInputValue:Ve,setSelectedValue:Ve,setIndices:Ve,onItemHighlighted:Ve,handleSelection:Ve,getItemProps:()=>rt,forceMount:Ve,requestSubmit:Ve})).current,Qt=l==="none"?Ke:ce,Lg=u.useMemo(()=>l==="none"?Qt:Array.isArray(ce)?ce.map(Z=>nr(Z,F)):nr(ce,F),[Qt,F,l,ce]),as=re(c),ls=re(n),Pr=V(ye,$.activeIndex),jg=V(ye,$.selectedIndex),Or=V(ye,$.positionerElement),rl=V(ye,$.listElement),Zn=V(ye,$.triggerElement),cs=V(ye,$.inputElement),It=V(ye,$.inline),Jt=V(ye,$.inputInsidePopup),$g=yt(Zn),{mounted:ol,setMounted:zg,transitionStatus:us}=Iu(je),{openMethod:sl,triggerProps:ds,reset:Gg}=xC(je);VC({id:we,name:ft,commit:me.commit,value:Qt,controlRef:Jt?$g:K,getValue:()=>Lg});const _r=re(()=>{b?U.current=pt.map(Z=>ut(Z,R)):ye.set("forceMounted",!0)}),Hg=u.useRef(ce);oe(()=>{ce!==Hg.current&&_r()},[_r,ce]);const kt=re(Z=>{ye.update(Z);const se=Z.type||"none";if(Z.activeIndex!==void 0)if(Z.activeIndex===null)Le.current!==Rn&&(Le.current=Rn,as(void 0,er(se,void 0,{index:-1})));else{const be=$e.current[Z.activeIndex];Le.current={value:be,index:Z.activeIndex},as(be,er(se,void 0,{index:Z.activeIndex}))}}),At=re((Z,se)=>{if(ie.current=se.reason===rn,e.onInputValueChange?.(Z,se),!se.isCanceled){if(se.reason===Vn){const be=se.event,ze=be.inputType;if(be.type==="compositionend"||ze!=null&&ze!==""&&ze!=="insertReplacementText"){const Xe=Z.trim()!=="";Xe&&G(!0),Ne.current={hasQuery:Xe},Xe&&Pe&&ye.state.activeIndex==null&&ye.set("activeIndex",0)}}Yn(Z)}}),Qn=re((Z,se)=>{if(je!==Z&&(se.reason==="escape-key"&&St&&pt.length===0&&!ye.state.emptyRef.current&&se.allowPropagation(),e.onOpenChange?.(Z,se),!se.isCanceled&&(!Z&&M&&(at?(It||k(Je),Je===""&&G(!1)):Qe&&(It||Jt?kt({activeIndex:null}):k(Je),At("",pe(rn,se.event)))),is(Z),!Z&&Jt&&(se.reason===Mo||se.reason===Gi)&&(Ee(!0),ke(!1),X==="onBlur")))){const be=l==="none"?Ke:ce;me.commit(be)}}),Ar=re((Z,se)=>{if(s?.(Z,se),se.isCanceled)return;lt(Z),(l==="none"&&D.current&&q||at&&!ye.state.inputInsidePopup)&&At(ut(Z,R),pe(se.reason,se.event)),at&&Z!=null&&se.reason!==Vn&&M&&!It&&k(Je)}),Bg=re((Z,se)=>{let be=se;if(be===void 0){if(Pr===null)return;be=$e.current[Pr]}const ze=dt(Z),Ye=st.current??Z;st.current=null;const Xe=pe(Iv,Ye),yn=ze?.closest("a")?.getAttribute("href");if(yn){yn.startsWith("#")&&Qn(!1,Xe);return}if(Qe){const Cn=Array.isArray(ce)?ce:[],nm=OC(Cn,be,ye.state.isItemEqualToValue)?_C(Cn,be,ye.state.isItemEqualToValue):[...Cn,be];if(Ar(nm,Xe),!(K.current?K.current.value.trim()!=="":!1))return;ye.state.inputInsidePopup?At("",pe(rn,Xe.event)):Qn(!1,Xe)}else Ar(be,Xe),Qn(!1,Xe)}),fs=re(()=>{if(!ye.state.submitOnItemClick)return;const Z=ye.state.inputElement?.form;Z&&typeof Z.requestSubmit=="function"&&Z.requestSubmit()}),ps=re(()=>{if(zg(!1),ls?.(!1),G(!1),Gg(),k(null),kt(l==="none"?{activeIndex:null,selectedIndex:null}:{activeIndex:null}),Qe&&K.current&&K.current.value!==""&&!ie.current&&At("",pe(rn)),at)if(ye.state.inputInsidePopup)K.current&&K.current.value!==""&&At("",pe(rn));else{const Z=ut(ce,R);K.current&&K.current.value!==Z&&At(Z,pe(Z===""?rn:xt))}}),Wg=u.useMemo(()=>It&&Or?{current:Or.closest('[role="dialog"]')}:D,[It,Or]);Ji({enabled:!e.actionsRef,open:je,ref:Wg,onComplete(){je||ps()}}),u.useImperativeHandle(e.actionsRef,()=>({unmount:ps}),[ps]),oe(function(){if(je||l==="none")return;const se=b?Zt:it.current;if(Qe){const be=Array.isArray(ce)?ce:[],ze=be[be.length-1],Ye=Io(se,ze,N);kt({selectedIndex:Ye===-1?null:Ye})}else{const be=Io(se,ce,N);kt({selectedIndex:be===-1?null:be})}},[je,ce,b,l,Zt,Qe,N,kt]),oe(()=>{b&&($e.current=pt,W.current.length=pt.length)},[b,pt]),oe(()=>{const Z=Ne.current;if(Z&&(Z.hasQuery?Pe&&ye.set("activeIndex",0):Pe==="always"&&ye.set("activeIndex",0),Ne.current=null),!je&&!It)return;const be=St||Me?pt:$e.current,ze=ye.state.activeIndex;if(ze==null){if(Pe==="always"&&be.length>0){ye.set("activeIndex",0);return}Le.current!==Rn&&(Le.current=Rn,ye.state.onItemHighlighted(void 0,er(xt,void 0,{index:-1})));return}if(ze>=be.length){Le.current!==Rn&&(Le.current=Rn,ye.state.onItemHighlighted(void 0,er(xt,void 0,{index:-1}))),ye.set("activeIndex",null);return}const Ye=be[ze],Xe=Le.current.value,yn=Xe!==_d&&kn(Ye,Xe,ye.state.isItemEqualToValue);(Le.current.index!==ze||!yn)&&(Le.current={value:Ye,index:ze},ye.state.onItemHighlighted(Ye,er(xt,void 0,{index:ze})))},[Pr,Pe,Me,St,pt,It,je,ye]),oe(()=>{if(l==="none"){ae(String(Ke)!=="");return}ae(Qe?Array.isArray(ce)&&ce.length>0:ce!=null)},[ae,l,Ke,ce,Qe]),u.useEffect(()=>{St&&Pe&&pt.length===0&&kt({activeIndex:null})},[St,Pe,pt.length,kt]),Zr(Je,()=>{!je||Je===""||Je===String(xn)||G(!0)}),Zr(ce,()=>{if(l!=="none"&&(A(ft),Re(ce!==ge.initialValue),Ce()?me.commit(ce):me.commit(ce,!0),at&&!jt&&!Jt)){const Z=ut(ce,R);Ke!==Z&&At(Z,pe(xt))}}),Zr(Ke,()=>{l==="none"&&(A(ft),Re(Ke!==ge.initialValue),Ce()?me.commit(Ke):me.commit(Ke,!0))}),Zr(b,()=>{if(!at||jt||Jt||M)return;const Z=ut(ce,R);Ke!==Z&&At(Z,pe(xt))});const Tr=Cd({open:It?!0:je,onOpenChange:Qn,elements:{reference:Jt?Zn:cs,floating:Or}});let gs,ms;It||(gs=m?"grid":"listbox",ms=je?"true":"false");const Ug=u.useMemo(()=>{const Z=cs?.tagName==="INPUT",se=Z||je,be=Z?{autoComplete:"off",spellCheck:"false",autoCorrect:"off",autoCapitalize:"none"}:{};return se&&(be.role="combobox",be["aria-expanded"]=ms,be["aria-haspopup"]=gs,be["aria-controls"]=je?rl?.id:void 0,be["aria-autocomplete"]=P),{reference:be,floating:{role:"presentation"}}},[cs,je,ms,gs,rl?.id,P]),qg=nd(Tr,{enabled:!g&&!nt&&w,event:"mousedown-only",toggle:!1,touchOpenDelay:Jt?0:50,reason:Nv}),Kg=Oy(Tr,{enabled:!g&&!nt&&!It,outsidePressEvent:{mouse:"sloppy",touch:"intentional"},bubbles:It?!0:void 0,outsidePress(Z){const se=dt(Z);return!Ie(Zn,se)&&!Ie(We.current,se)&&!Ie(xe.current,se)}}),Yg=hC(Tr,{enabled:!g&&!nt,id:we,listRef:W,activeIndex:Pr,selectedIndex:jg,virtual:!0,loopFocus:E,allowEscape:E&&!Pe,focusItemOnOpen:M||l==="none"&&!Pe?!1:"auto",focusItemOnHover:I,resetOnPointerLeave:!S,cols:m?2:1,orientation:m?"horizontal":void 0,disabledIndices:$r,onNavigate(Z,se){!se&&!je||us==="ending"||kt(se?{activeIndex:Z,type:Q.current?"keyboard":"pointer"}:{activeIndex:Z})}}),{getReferenceProps:hs,getFloatingProps:bs,getItemProps:vs}=fC([Ug,qg,Kg,Yg]);NC(()=>{ye.update({inline:_,popupProps:bs(),inputProps:hs(),triggerProps:ds,getItemProps:vs,setOpen:Qn,setInputValue:At,setSelectedValue:Ar,setIndices:kt,onItemHighlighted:as,handleSelection:Bg,forceMount:_r,requestSubmit:fs})}),oe(()=>{ye.update({id:we,selectedValue:ce,open:je,mounted:ol,transitionStatus:us,items:b,inline:_,popupProps:bs(),inputProps:hs(),triggerProps:ds,openMethod:sl,getItemProps:vs,selectionMode:l,name:ft,disabled:nt,readOnly:g,required:f,grid:m,isGrouped:Rt,virtualized:T,onOpenChangeComplete:ls,openOnInputClick:w,itemToStringLabel:R,modal:Y,autoHighlight:Pe,isItemEqualToValue:N,submitOnItemClick:te,hasInputValue:jt,requestSubmit:fs})},[ye,we,ce,je,ol,us,b,bs,hs,vs,sl,ds,l,ft,nt,g,f,me,m,Rt,T,ls,w,R,Y,N,te,jt,_,fs,Pe]);const Xg=gr(h,me.inputRef),Zg=u.useMemo(()=>({query:Je,hasItems:St,filteredItems:Et,flatFilteredItems:pt}),[Je,St,Et,pt]),Qg=u.useMemo(()=>Array.isArray(Qt)?"":nr(Qt,F),[Qt,F]),Jg=Qe&&Array.isArray(ce)&&ce.length>0,xs=Qe||l==="none"?void 0:ft,em=u.useMemo(()=>!Qe||!Array.isArray(ce)||!ft?null:ce.map(Z=>{const se=nr(Z,F);return v.jsx("input",{type:"hidden",name:ft,value:se},se)}),[Qe,ce,ft,F]),tm=v.jsxs(u.Fragment,{children:[e.children,v.jsx("input",{...me.getInputValidationProps({onFocus(){if(Jt){Zn?.focus();return}(K.current||Zn)?.focus()},onChange(Z){if(Z.nativeEvent.defaultPrevented)return;const se=Z.target.value,be=pe(xt,Z.nativeEvent);function ze(){if(Qe)return;if(l==="none"){Re(se!==ge.initialValue),At(se,be),Ce()&&me.commit(se);return}const Ye=$e.current.find(Xe=>nr(Xe,F).toLowerCase()===se.toLowerCase());Ye!=null&&(Re(Ye!==ge.initialValue),Ar?.(Ye,be),Ce()&&me.commit(Ye))}b?ze():(_r(),queueMicrotask(ze))}}),id:we&&xs==null?`${we}-hidden-input`:void 0,name:xs,autoComplete:B,disabled:nt,required:f&&!Jg,readOnly:g,value:Qg,ref:Xg,style:xs?Mx:ea,tabIndex:-1,"aria-hidden":!0}),em]});return v.jsx(ia.Provider,{value:ye,children:v.jsx(aa.Provider,{value:Tr,children:v.jsx(la.Provider,{value:Zg,children:v.jsx(ca.Provider,{value:Ke,children:tm})})})})}const Ad={...IC,...DC,popupSide:e=>e?{"data-popup-side":e}:null,listEmpty:e=>e?{"data-list-empty":""}:null};function HC(e){const t=e.getBoundingClientRect();if(process.env.NODE_ENV!=="production")return t;const n=window.getComputedStyle(e,"::before"),r=window.getComputedStyle(e,"::after");if(!(n.content!=="none"||r.content!=="none"))return t;const s=parseFloat(n.width)||0,i=parseFloat(n.height)||0,a=parseFloat(r.width)||0,l=parseFloat(r.height)||0,c=Math.max(t.width,s,a),d=Math.max(t.height,i,l),p=c-t.width,g=d-t.height;return{left:t.left-p/2,right:t.right+p/2,top:t.top-g/2,bottom:t.bottom+g/2}}const Qr=2,Td=u.forwardRef(function(t,n){const{render:r,className:o,nativeButton:s=!0,disabled:i=!1,id:a,...l}=t,{state:c,disabled:d,setTouched:p,setFocused:g,validationMode:f,validation:h}=Cr(),{labelId:m}=fa(),b=vt(),{filteredItems:y}=vn(),x=V(b,$.selectionMode),w=V(b,$.disabled),C=V(b,$.readOnly),S=V(b,$.required),I=V(b,$.mounted),E=V(b,$.popupSide),R=V(b,$.positionerElement),F=V(b,$.listElement),N=V(b,$.triggerProps),T=V(b,$.triggerElement),_=V(b,$.inputInsidePopup),q=V(b,$.id),Y=V(b,$.open),H=V(b,$.selectedValue),P=V(b,$.activeIndex),B=V(b,$.selectedIndex),z=V(b,$.hasSelectedValue),te=Uo(),A=ua(),Re=En(),ge=d||w||i,Ce=y.length===0,ae=I&&R?E:null;Pd({id:_?a:void 0});const le=_?a??q:a,ve=u.useRef("");function Ee(k){ve.current=k.pointerType}const ke=te.useState("domReferenceElement");u.useEffect(()=>{_&&T&&T!==ke&&te.set("domReferenceElement",T)},[T,ke,te,_]);const{reference:X}=bC(te,{enabled:!Y&&!C&&!w&&x==="single",listRef:b.state.labelsRef,activeIndex:P,selectedIndex:B,onMatch(k){const W=b.state.valuesRef.current[k];W!==void 0&&b.state.setSelectedValue(W,pe("none"))}}),{reference:me}=nd(te,{enabled:!C&&!w,event:"mousedown"}),{buttonRef:we,getButtonProps:O}=jo({native:s,disabled:ge}),M={...c,open:Y,disabled:ge,popupSide:ae,listEmpty:Ce,placeholder:!z},G=re(k=>{b.set("triggerElement",k)});return ot("button",t,{ref:[n,we,G],state:M,props:[N,me,X,{id:le,tabIndex:_?0:-1,role:_?"combobox":void 0,"aria-expanded":Y?"true":"false","aria-haspopup":_?"dialog":"listbox","aria-controls":Y?F?.id:void 0,"aria-required":_&&S||void 0,"aria-labelledby":m,onPointerDown:Ee,onPointerEnter:Ee,onFocus(){g(!0),!(ge||C)&&Re.start(0,b.state.forceMount)},onBlur(k){if(!Ie(R,k.relatedTarget)&&(p(!0),g(!1),f==="onBlur")){const W=x==="none"?A:H;h.commit(W)}},onMouseDown(k){if(ge||C||(_||te.set("domReferenceElement",k.currentTarget),b.state.forceMount(),ve.current!=="touch"&&(b.state.inputRef.current?.focus(),_||k.preventDefault()),Y))return;const W=Ge(k.currentTarget);function U(D){if(!T)return;const K=dt(D),j=b.state.positionerElement,Q=b.state.listElement;if(Ie(T,K)||Ie(j,K)||Ie(Q,K)||K===T)return;const ie=HC(T),xe=D.clientX>=ie.left-Qr&&D.clientX<=ie.right+Qr,We=D.clientY>=ie.top-Qr&&D.clientY<=ie.bottom+Qr;xe&&We||b.state.setOpen(!1,pe("cancel-open",D))}_&&W.addEventListener("mouseup",U,{once:!0})},onKeyDown(k){ge||C||(k.key==="ArrowDown"||k.key==="ArrowUp")&&(De(k),b.state.setOpen(!0,pe(ar,k.nativeEvent)),b.state.inputRef.current?.focus())}},h?h.getValidationProps(l):l,O],stateAttributesMapping:Ad})});process.env.NODE_ENV!=="production"&&(Td.displayName="ComboboxTrigger");const pa=u.createContext(void 0);process.env.NODE_ENV!=="production"&&(pa.displayName="ComboboxChipsContext");function Md(){return u.useContext(pa)}const ga=u.createContext(void 0);process.env.NODE_ENV!=="production"&&(ga.displayName="ComboboxPositionerContext");function ma(e){const t=u.useContext(ga);if(t===void 0&&!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: <Combobox.Popup> and <Combobox.Arrow> must be used within the <Combobox.Positioner> component":Ot(21));return t}const ha=u.forwardRef(function(t,n){const{render:r,className:o,disabled:s=!1,id:i,...a}=t,{state:l,disabled:c,setTouched:d,setFocused:p,validationMode:g,validation:f}=Cr(),{labelId:h}=fa(),m=Md(),y=!!ma(!0),x=vt(),{filteredItems:w}=vn(),C=ua(),S=bu(),I=V(x,$.required),E=V(x,$.disabled),R=V(x,$.readOnly),F=V(x,$.name),N=V(x,$.selectionMode),T=V(x,$.autoHighlight),_=V(x,$.inputProps),q=V(x,$.triggerProps),Y=V(x,$.open),H=V(x,$.mounted),P=V(x,$.selectedValue),B=V(x,$.popupSide),z=V(x,$.positionerElement),te=V(x,$.id),A=V(x,$.inline),Re=!!T,ge=H&&z?B:null,Ce=c||E||s,ae=w.length===0,ve=Bi(i??(y||A?void 0:te)),[Ee,ke]=u.useState(null),X=u.useRef(!1),me=u.useRef(null),we=u.useRef(!1),O=re(k=>{const W=y||x.state.inline;W&&!x.state.hasInputValue&&x.state.setInputValue("",pe(xt)),x.update({inputElement:k,inputInsidePopup:W})}),M={...l,open:Y,disabled:Ce,readOnly:R,popupSide:ge,listEmpty:ae};function G(k){if(!m)return;let W;const{highlightedChipIndex:U}=m;if(U!==void 0){if(k.key==="ArrowLeft")k.preventDefault(),U>0?W=U-1:W=void 0;else if(k.key==="ArrowRight")k.preventDefault(),U<P.length-1?W=U+1:W=void 0;else if(k.key==="Backspace"||k.key==="Delete"){k.preventDefault();const D=U>=P.length-1?P.length-2:U;W=D>=0?D:void 0,x.state.setIndices({activeIndex:null,selectedIndex:null,type:"keyboard"})}return W}return k.key==="ArrowLeft"&&(k.currentTarget.selectionStart??0)===0&&P.length>0?(k.preventDefault(),W=Math.max(P.length-1,0)):k.key==="Backspace"&&k.currentTarget.value===""&&P.length>0&&(x.state.setIndices({activeIndex:null,selectedIndex:null,type:"keyboard"}),k.preventDefault()),W}return ot("input",t,{state:M,ref:[n,x.state.inputRef,O],props:[_,q,{type:"text",value:t.value??Ee??C,"aria-readonly":R||void 0,"aria-required":I||void 0,"aria-labelledby":h,disabled:Ce,readOnly:R,required:N==="none"?I:void 0,...N==="none"&&F&&{name:F},id:ve,onFocus(){if(p(!0),!A||!we.current)return;we.current=!1;const k=me.current;k==null||!Object.hasOwn(x.state.valuesRef.current,k)||x.state.setIndices({activeIndex:k})},onBlur(){d(!0),p(!1);const k=x.state.activeIndex;if(A&&k!==null&&T!=="always"&&(me.current=k,we.current=!0,x.state.setIndices({activeIndex:null})),g==="onBlur"){const W=N==="none"?C:P;f.commit(W)}},onCompositionStart(k){go||(X.current=!0,ke(k.currentTarget.value))},onCompositionEnd(k){X.current=!1;const W=k.currentTarget.value;ke(null),x.state.setInputValue(W,pe(Vn,k.nativeEvent))},onChange(k){const W=k.nativeEvent.inputType,U=!W||W==="insertReplacementText",D=X.current||!U;if(X.current){const ie=k.currentTarget.value;ke(ie),ie===""&&!x.state.openOnInputClick&&!x.state.inputInsidePopup&&x.state.setOpen(!1,pe(rn,k.nativeEvent));const xe=ie.trim(),We=Re&&xe!=="";!R&&!Ce&&xe&&D&&(x.state.setOpen(!0,pe(Vn,k.nativeEvent)),Re||x.state.setIndices({activeIndex:null,selectedIndex:null,type:x.state.keyboardActiveRef.current?"keyboard":"pointer"})),Y&&x.state.activeIndex!==null&&!We&&x.state.setIndices({activeIndex:null,selectedIndex:null,type:x.state.keyboardActiveRef.current?"keyboard":"pointer"});return}x.state.setInputValue(k.currentTarget.value,pe(Vn,k.nativeEvent));const K=k.currentTarget.value==="",j=pe(rn,k.nativeEvent);K&&!x.state.inputInsidePopup&&(N==="single"&&x.state.setSelectedValue(null,j),x.state.openOnInputClick||x.state.setOpen(!1,j));const Q=k.currentTarget.value.trim();!R&&!Ce&&Q&&D&&(x.state.setOpen(!0,pe(Vn,k.nativeEvent)),Re||x.state.setIndices({activeIndex:null,selectedIndex:null,type:x.state.keyboardActiveRef.current?"keyboard":"pointer"})),Y&&x.state.activeIndex!==null&&!Re&&x.state.setIndices({activeIndex:null,selectedIndex:null,type:x.state.keyboardActiveRef.current?"keyboard":"pointer"})},onKeyDown(k){if(Ce||R||k.ctrlKey||k.shiftKey||k.altKey||k.metaKey)return;x.state.keyboardActiveRef.current=!0;const W=k.currentTarget,U=W.scrollWidth-W.clientWidth,D=S==="rtl";if(k.key==="Home"){De(k);const Q=El&&D?W.value.length:0;W.setSelectionRange(Q,Q),W.scrollLeft=0;return}if(k.key==="End"){De(k);const Q=El&&D?0:W.value.length;W.setSelectionRange(Q,Q),W.scrollLeft=D?-U:U;return}if(!H&&k.key==="Escape"){const Q=N==="multiple"&&Array.isArray(P)?P.length===0:P===null,ie=pe(Su,k.nativeEvent),xe=N==="multiple"?[]:null;x.state.setInputValue("",ie),x.state.setSelectedValue(xe,ie),!Q&&!x.state.inline&&!ie.isPropagationAllowed&&k.stopPropagation();return}if(m&&k.key==="Backspace"&&W.value===""&&m.highlightedChipIndex===void 0&&Array.isArray(P)&&P.length>0){const Q=P.slice(0,-1);x.state.setIndices({activeIndex:null,selectedIndex:null,type:x.state.keyboardActiveRef.current?"keyboard":"pointer"}),x.state.setSelectedValue(Q,pe(xt,k.nativeEvent));return}const K=m?.highlightedChipIndex!==void 0,j=G(k);if(m?.setHighlightedChipIndex(j),j!==void 0?m?.chipsRef.current[j]?.focus():K&&x.state.inputRef.current?.focus(),k.which!==229&&k.key==="Enter"&&Y){const Q=x.state.activeIndex,ie=k.nativeEvent;if(Q===null){x.state.setOpen(!1,pe(xt,ie));return}De(k);const xe=x.state.listRef.current[Q];xe&&(x.state.selectionEventRef.current=ie,xe.click(),x.state.selectionEventRef.current=null)}},onPointerMove(){x.state.keyboardActiveRef.current=!1},onPointerDown(){x.state.keyboardActiveRef.current=!1}},f?f.getValidationProps(a):a],stateAttributesMapping:Ad})});process.env.NODE_ENV!=="production"&&(ha.displayName="ComboboxInput");const BC={...Eu,...EC},Dd=u.forwardRef(function(t,n){const{render:r,className:o,disabled:s=!1,nativeButton:i=!0,keepMounted:a=!1,...l}=t,{disabled:c}=Cr(),d=vt(),p=V(d,$.selectionMode),g=V(d,$.disabled),f=V(d,$.readOnly),h=V(d,$.open),m=V(d,$.selectedValue),b=V(d,$.hasSelectionChips),y=ua();let x=!1;p==="none"?x=y!=="":p==="single"?x=m!=null:x=b;const w=c||g||s,{buttonRef:C,getButtonProps:S}=jo({native:i,disabled:w}),{mounted:I,transitionStatus:E,setMounted:R}=Iu(x),F={disabled:w,open:h,transitionStatus:E};Ji({open:x,ref:d.state.clearRef,onComplete(){x||R(!1)}});const N=ot("button",t,{state:F,ref:[n,C,d.state.clearRef],props:[{tabIndex:-1,children:"x",onMouseDown(_){_.preventDefault()},onClick(_){if(w||f)return;const q=d.state.keyboardActiveRef;d.state.setInputValue("",pe(yl,_.nativeEvent)),p!=="none"?(d.state.setSelectedValue(Array.isArray(m)?[]:null,pe(yl,_.nativeEvent)),d.state.setIndices({activeIndex:null,selectedIndex:null,type:q.current?"keyboard":"pointer"})):d.state.setIndices({activeIndex:null,type:q.current?"keyboard":"pointer"}),d.state.inputRef.current?.focus()}},l,S],stateAttributesMapping:BC});return a||I?N:null});process.env.NODE_ENV!=="production"&&(Dd.displayName="ComboboxClear");const ba=u.createContext(null);process.env.NODE_ENV!=="production"&&(ba.displayName="GroupCollectionContext");function WC(){return u.useContext(ba)}function UC(e){const{children:t,items:n}=e,r=u.useMemo(()=>({items:n}),[n]);return v.jsx(ba.Provider,{value:r,children:t})}function Fd(e){const{children:t}=e,{filteredItems:n}=vn(),r=WC(),o=r?r.items:n;return o?v.jsx(u.Fragment,{children:o.map(t)}):null}const Vd=u.forwardRef(function(t,n){var r;const{render:o,className:s,children:i,...a}=t,l=vt(),c=Uo(),d=!!ma(!0),{filteredItems:p}=vn(),g=V(l,$.items),f=V(l,$.labelsRef),h=V(l,$.listRef),m=V(l,$.selectionMode),b=V(l,$.grid),y=V(l,$.popupProps),x=V(l,$.disabled),w=V(l,$.readOnly),C=V(l,$.virtualized),S=m==="multiple",I=p.length===0,E=re(q=>{l.set("positionerElement",q)}),R=re(q=>{l.set("listElement",q)}),F=u.useMemo(()=>typeof i=="function"?r||(r=v.jsx(Fd,{children:i})):i,[i]),N={empty:I},T=c.useState("floatingId"),_=ot("div",t,{state:N,ref:[n,R,d?null:E],props:[y,{children:F,tabIndex:-1,id:T,role:b?"grid":"listbox","aria-multiselectable":S?"true":void 0,onKeyDown(q){if(!(x||w)&&q.key==="Enter"){const Y=l.state.activeIndex;if(Y==null)return;De(q);const H=q.nativeEvent,P=l.state.listRef.current[Y];P&&(l.state.selectionEventRef.current=H,P.click(),l.state.selectionEventRef.current=null)}},onKeyDownCapture(){l.state.keyboardActiveRef.current=!0},onPointerMoveCapture(){l.state.keyboardActiveRef.current=!1}},a]});return C?_:v.jsx(mu,{elementsRef:h,labelsRef:g?void 0:f,children:_})});process.env.NODE_ENV!=="production"&&(Vd.displayName="ComboboxList");const va=u.createContext(void 0);process.env.NODE_ENV!=="production"&&(va.displayName="ComboboxPortalContext");function qC(){const e=u.useContext(va);if(e===void 0)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: <Combobox.Portal> is missing.":Ot(20));return e}const Ld=u.forwardRef(function(t,n){const{keepMounted:r=!1,...o}=t,s=vt(),i=V(s,$.mounted),a=V(s,$.forceMounted);return i||r||a?v.jsx(va.Provider,{value:r,children:v.jsx(td,{ref:n,...o})}):null});process.env.NODE_ENV!=="production"&&(Ld.displayName="ComboboxPortal");const KC=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:s,platform:i,elements:a,middlewareData:l}=t,{element:c,padding:d=0,offsetParent:p="real"}=Ft(e,t)||{};if(c==null)return{};const g=Qi(d),f={x:n,y:r},h=zo(o),m=$o(h),b=await i.getDimensions(c),y=h==="y",x=y?"top":"left",w=y?"bottom":"right",C=y?"clientHeight":"clientWidth",S=s.reference[m]+s.reference[h]-f[h]-s.floating[m],I=f[h]-s.reference[h],E=p==="real"?await i.getOffsetParent?.(c):a.floating;let R=a.floating[C]||s.floating[m];(!R||!await i.isElement?.(E))&&(R=a.floating[C]||s.floating[m]);const F=S/2-I/2,N=R/2-b[m]/2-1,T=Math.min(g[x],N),_=Math.min(g[w],N),q=T,Y=R-b[m]-_,H=R/2-b[m]/2+F,P=ho(q,H,Y),B=!l.arrow&&Yt(o)!=null&&H!==P&&s.reference[m]/2-(H<q?T:_)-b[m]/2<0,z=B?H<q?H-q:H-Y:0;return{[h]:f[h]+z,data:{[h]:P,centerOffset:H-P-z,...B&&{alignmentOffset:z}},reset:B}}}),YC=(e,t)=>({...KC(e),options:[e,t]}),XC={name:"hide",async fn(e){const{width:t,height:n,x:r,y:o}=e.rects.reference,s=t===0&&n===0&&r===0&&o===0;return{data:{referenceHidden:(await bd().fn(e)).data?.referenceHidden||s}}}},ZC={sideX:"left",sideY:"top"};function jd(e,t,n){const r=e==="inline-start"||e==="inline-end";return{top:"top",right:r?n?"inline-start":"inline-end":"right",bottom:"bottom",left:r?n?"inline-end":"inline-start":"left"}[t]}function ic(e,t,n){const{rects:r,placement:o}=e;return{side:jd(t,mt(o),n),align:Yt(o)||"center",anchor:{width:r.reference.width,height:r.reference.height},positioner:{width:r.floating.width,height:r.floating.height}}}function QC(e){const{anchor:t,positionMethod:n="absolute",side:r="bottom",sideOffset:o=0,align:s="center",alignOffset:i=0,collisionBoundary:a,collisionPadding:l=5,sticky:c=!1,arrowPadding:d=5,disableAnchorTracking:p=!1,keepMounted:g=!1,floatingRootContext:f,mounted:h,collisionAvoidance:m,shiftCrossAxis:b=!1,nodeId:y,adaptiveOrigin:x,lazyFlip:w=!1,externalTree:C}=e,[S,I]=u.useState(null);!h&&S!==null&&I(null);const E=m.side||"flip",R=m.align||"flip",F=m.fallbackAxisSide||"end",N=typeof t=="function"?t:void 0,T=re(N),_=N?T:t,q=yt(t),H=bu()==="rtl",P=S||{top:"top",right:"right",bottom:"bottom",left:"left","inline-end":H?"left":"right","inline-start":H?"right":"left"}[r],B=s==="center"?P:`${P}-${s}`;let z=l;const te=1,A=r==="bottom"?te:0,Re=r==="top"?te:0,ge=r==="right"?te:0,Ce=r==="left"?te:0;typeof z=="number"?z={top:z+A,right:z+Ce,bottom:z+Re,left:z+ge}:z&&(z={top:(z.top||0)+A,right:(z.right||0)+Ce,bottom:(z.bottom||0)+Re,left:(z.left||0)+ge});const ae={boundary:a==="clipping-ancestors"?"clippingAncestors":a,padding:z},le=u.useRef(null),ve=yt(o),Ee=yt(i),me=[fd(Me=>{const Pe=ic(Me,r,H),ce=typeof ve.current=="function"?ve.current(Pe):ve.current,lt=typeof Ee.current=="function"?Ee.current(Pe):Ee.current;return{mainAxis:ce,crossAxis:lt,alignmentAxis:lt}},[typeof o!="function"?o:0,typeof i!="function"?i:0,H,r])],we=R==="none"&&E!=="shift",O=!we&&(c||b||E==="shift"),M=E==="none"?null:md({...ae,padding:{top:z.top+te,right:z.right+te,bottom:z.bottom+te,left:z.left+te},mainAxis:!b&&E==="flip",crossAxis:R==="flip"?"alignment":!1,fallbackAxisSideDirection:F}),G=we?null:pd(Me=>{const Pe=Ge(Me.elements.floating).documentElement;return{...ae,rootBoundary:b?{x:0,y:0,width:Pe.clientWidth,height:Pe.clientHeight}:void 0,mainAxis:R!=="none",crossAxis:O,limiter:c||b?void 0:gd(ce=>{if(!le.current)return{};const{width:lt,height:ct}=le.current.getBoundingClientRect(),xn=Ct(mt(ce.placement)),Ke=xn==="y"?lt:ct,Yn=xn==="y"?z.left+z.right:z.top+z.bottom;return{offset:Ke/2+Yn/2}})}},[ae,c,b,z,R]);E==="shift"||R==="shift"||s==="center"?me.push(G,M):me.push(M,G),me.push(hd({...ae,apply({elements:{floating:Me},rects:{reference:Pe},availableWidth:ce,availableHeight:lt}){const ct=Me.style;ct.setProperty("--available-width",`${ce}px`),ct.setProperty("--available-height",`${lt}px`),ct.setProperty("--anchor-width",`${Pe.width}px`),ct.setProperty("--anchor-height",`${Pe.height}px`)}}),YC(()=>({element:le.current||document.createElement("div"),padding:d,offsetParent:"floating"}),[d]),{name:"transformOrigin",fn(Me){const{elements:Pe,middlewareData:ce,placement:lt,rects:ct,y:xn}=Me,Ke=mt(lt),Yn=Ct(Ke),je=le.current,is=ce.arrow?.x||0,Rt=ce.arrow?.y||0,Je=je?.clientWidth||0,Xn=je?.clientHeight||0,Tn=is+Je/2,Xt=Rt+Xn/2,Nr=Math.abs(ce.shift?.y||0),Zt=ct.reference.height/2,Et=typeof o=="function"?o(ic(Me,r,H)):o,pt=Nr>Et,ye={top:`${Tn}px calc(100% + ${Et}px)`,bottom:`${Tn}px ${-Et}px`,left:`calc(100% + ${Et}px) ${Xt}px`,right:`${-Et}px ${Xt}px`}[Ke],Qt=`${Tn}px ${ct.reference.y+Zt-xn}px`;return Pe.floating.style.setProperty("--transform-origin",O&&Yn==="y"&&pt?Qt:ye),{}}},XC,x),oe(()=>{!h&&f&&f.update({referenceElement:null,floatingElement:null,domReferenceElement:null})},[h,f]);const fe=u.useMemo(()=>({elementResize:!p&&typeof ResizeObserver<"u",layoutShift:!p&&typeof IntersectionObserver<"u"}),[p]),{refs:k,elements:W,x:U,y:D,middlewareData:K,update:j,placement:Q,context:ie,isPositioned:xe,floatingStyles:We}=dC({rootContext:f,placement:B,middleware:me,strategy:n,whileElementsMounted:g?void 0:(...Me)=>gi(...Me,fe),nodeId:y,externalTree:C}),{sideX:st,sideY:Le}=K.adaptiveOrigin||ZC,Ne=xe?n:"fixed",$e=u.useMemo(()=>{const Me=x?{position:Ne,[st]:U,[Le]:D}:{position:Ne,...We};return xe||(Me.opacity=0),Me},[x,Ne,st,U,Le,D,We,xe]),it=u.useRef(null);oe(()=>{if(!h)return;const Me=q.current,Pe=typeof Me=="function"?Me():Me,lt=(ac(Pe)?Pe.current:Pe)||null||null;lt!==it.current&&(k.setPositionReference(lt),it.current=lt)},[h,k,_,q]),u.useEffect(()=>{if(!h)return;const Me=q.current;typeof Me!="function"&&ac(Me)&&Me.current!==it.current&&(k.setPositionReference(Me.current),it.current=Me.current)},[h,k,_,q]),u.useEffect(()=>{if(g&&h&&W.domReference&&W.floating)return gi(W.domReference,W.floating,j,fe)},[g,h,W,j,fe]);const nt=mt(Q),ft=jd(r,nt,H),Qe=Yt(Q)||"center",at=!!K.hide?.referenceHidden;oe(()=>{w&&h&&xe&&I(nt)},[w,h,xe,nt]);const jt=u.useMemo(()=>({position:"absolute",top:K.arrow?.y,left:K.arrow?.x}),[K.arrow]),St=K.arrow?.centerOffset!==0;return u.useMemo(()=>({positionerStyles:$e,arrowStyles:jt,arrowRef:le,arrowUncentered:St,side:ft,align:Qe,physicalSide:nt,anchorHidden:at,refs:k,context:ie,isPositioned:xe,update:j}),[$e,jt,le,St,ft,Qe,nt,at,k,ie,xe,j])}function ac(e){return e!=null&&"current"in e}function $d(e){return e==="starting"?bv:rt}const zd=u.forwardRef(function(t,n){const{render:r,className:o,anchor:s,positionMethod:i="absolute",side:a="bottom",align:l="center",sideOffset:c=0,alignOffset:d=0,collisionBoundary:p="clipping-ancestors",collisionPadding:g=5,arrowPadding:f=5,sticky:h=!1,disableAnchorTracking:m=!1,collisionAvoidance:b=xv,...y}=t,x=vt(),{filteredItems:w}=vn(),C=Uo(),S=qC(),I=V(x,$.modal),E=V(x,$.open),R=V(x,$.mounted),F=V(x,$.openMethod),N=V(x,$.triggerElement),T=V(x,$.inputElement),_=V(x,$.inputInsidePopup),q=V(x,$.transitionStatus),Y=w.length===0,P=QC({anchor:s??(_?N:T),floatingRootContext:C,positionMethod:i,mounted:R,side:a,sideOffset:c,align:l,alignOffset:d,arrowPadding:f,collisionBoundary:p,collisionPadding:g,sticky:h,disableAnchorTracking:m,keepMounted:S,collisionAvoidance:b,lazyFlip:!0});_x(E&&I&&F!=="touch",N);const B=u.useMemo(()=>{const ge={...P.positionerStyles};return E||(ge.pointerEvents="none"),{role:"presentation",hidden:!R,style:ge}},[E,R,P.positionerStyles]),z={open:E,side:P.side,align:P.align,anchorHidden:P.anchorHidden,empty:Y};oe(()=>{x.set("popupSide",P.side)},[x,P.side]);const te=u.useMemo(()=>({side:P.side,align:P.align,arrowRef:P.arrowRef,arrowUncentered:P.arrowUncentered,arrowStyles:P.arrowStyles,anchorHidden:P.anchorHidden,isPositioned:P.isPositioned}),[P.side,P.align,P.arrowRef,P.arrowUncentered,P.arrowStyles,P.anchorHidden,P.isPositioned]),A=re(ge=>{x.set("positionerElement",ge)}),Re=ot("div",t,{state:z,ref:[n,A],props:[B,$d(q),y],stateAttributesMapping:wd});return v.jsxs(ga.Provider,{value:te,children:[R&&I&&v.jsx(Sd,{inert:kC(!E),cutout:T??N}),Re]})});process.env.NODE_ENV!=="production"&&(zd.displayName="ComboboxPositioner");const JC={...wd,...Eu},Gd=u.forwardRef(function(t,n){const{render:r,className:o,initialFocus:s,finalFocus:i,...a}=t,l=vt(),c=ma(),d=Uo(),{filteredItems:p}=vn(),g=V(l,$.mounted),f=V(l,$.open),h=V(l,$.openMethod),m=V(l,$.transitionStatus),b=V(l,$.inputInsidePopup),y=V(l,$.inputElement),x=p.length===0;Ji({open:f,ref:l.state.popupRef,onComplete(){f&&l.state.onOpenChangeComplete(!0)}});const w={open:f,side:c.side,align:c.align,anchorHidden:c.anchorHidden,transitionStatus:m,empty:x},C=ot("div",t,{state:w,ref:[n,l.state.popupRef],props:[{role:b?"dialog":"presentation",tabIndex:-1,onFocus(R){const F=dt(R.nativeEvent);h!=="touch"&&(Ie(l.state.listElement,F)||F===R.currentTarget)&&l.state.inputRef.current?.focus()}},$d(m),a],stateAttributesMapping:JC}),I=s===void 0?b?R=>R==="touch"?l.state.popupRef.current:y:!1:s;let E;return i!=null?E=i:E=b?void 0:!1,v.jsx(Bx,{context:d,disabled:!g,modal:!b,openInteractionType:h,initialFocus:I,returnFocus:E,children:C})});process.env.NODE_ENV!=="production"&&(Gd.displayName="ComboboxPopup");const xa=u.createContext(void 0);process.env.NODE_ENV!=="production"&&(xa.displayName="ComboboxGroupContext");function ew(){const e=u.useContext(xa);if(e===void 0)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: ComboboxGroupContext is missing. ComboboxGroup parts must be placed within <Combobox.Group>.":Ot(18));return e}const Hd=u.forwardRef(function(t,n){const{render:r,className:o,items:s,...i}=t,[a,l]=u.useState(),c=u.useMemo(()=>({labelId:a,setLabelId:l,items:s}),[a,l,s]),d=ot("div",t,{ref:n,props:[{role:"group","aria-labelledby":a},i]}),p=v.jsx(xa.Provider,{value:c,children:d});return s?v.jsx(UC,{items:s,children:p}):p});process.env.NODE_ENV!=="production"&&(Hd.displayName="ComboboxGroup");const Bd=u.forwardRef(function(t,n){const{render:r,className:o,id:s,...i}=t,{setLabelId:a}=ew(),l=Bi(s);return oe(()=>(a(l),()=>{a(void 0)}),[l,a]),ot("div",t,{ref:n,props:[{id:l},i]})});process.env.NODE_ENV!=="production"&&(Bd.displayName="ComboboxGroupLabel");const Wd=u.createContext(void 0);process.env.NODE_ENV!=="production"&&(Wd.displayName="ComboboxItemContext");const Ud=u.createContext(!1);process.env.NODE_ENV!=="production"&&(Ud.displayName="ComboboxRowContext");function tw(){return u.useContext(Ud)}const qd=u.memo(u.forwardRef(function(t,n){const{render:r,className:o,value:s=null,index:i,disabled:a=!1,nativeButton:l=!1,...c}=t,d=u.useRef(!1),p=u.useRef(null),g=Nu({index:i,textRef:p,indexGuessBehavior:ku.GuessFromOrder}),f=vt(),h=tw(),{flatFilteredItems:m,hasItems:b}=vn(),y=V(f,$.open),x=V(f,$.selectionMode),w=V(f,$.readOnly),C=V(f,$.virtualized),S=V(f,$.isItemEqualToValue),I=x!=="none",E=i??(C?Io(m,s,S):g.index),R=g.index!==-1,F=V(f,$.id),N=V(f,$.isActive,E),T=V(f,$.isSelected,s),_=V(f,$.getItemProps),q=u.useRef(null),Y=F!=null&&R?`${F}-${E}`:void 0,H=T&&I;oe(()=>{if(!(R&&(C||i!=null)))return;const le=f.state.listRef.current;return le[E]=q.current,()=>{delete le[E]}},[R,C,E,i,f]),oe(()=>{if(!R||b)return;const ae=f.state.valuesRef.current;return ae[E]=s,x!=="none"&&f.state.allValuesRef.current.push(s),()=>{delete ae[E]}},[R,b,E,s,f,x]),oe(()=>{if(!y){d.current=!1;return}if(!R||b)return;const ae=f.state.selectedValue,le=Array.isArray(ae)?ae[ae.length-1]:ae;kn(s,le,S)&&f.set("selectedIndex",E)},[R,b,y,f,E,s,S]);const P={disabled:a,selected:H,highlighted:N},B=_({active:N,selected:H});B.id=void 0,B.onFocus=void 0;const{getButtonProps:z,buttonRef:te}=jo({disabled:a,focusableWhenDisabled:!0,native:l});function A(ae){function le(){f.state.handleSelection(ae,s)}f.state.submitOnItemClick?(gn.flushSync(le),f.state.requestSubmit()):le()}const Re={id:Y,role:h?"gridcell":"option","aria-selected":I?H:void 0,tabIndex:void 0,onPointerDownCapture(ae){d.current=!0,ae.preventDefault()},onClick(ae){a||w||A(ae.nativeEvent)},onMouseUp(ae){const le=d.current;d.current=!1,!(a||w||ae.button!==0||le||!N)&&A(ae.nativeEvent)}},ge=ot("div",t,{ref:[te,n,g.ref,q],state:P,props:[B,Re,c,z]}),Ce=u.useMemo(()=>({selected:H,textRef:p}),[H,p]);return v.jsx(Wd.Provider,{value:Ce,children:ge})}));process.env.NODE_ENV!=="production"&&(qd.displayName="ComboboxItem");const Kd=u.forwardRef(function(t,n){const{render:r,className:o,children:s,...i}=t,{filteredItems:a}=vn(),l=vt(),c=a.length===0?s:null;return ot("div",t,{ref:[n,l.state.emptyRef],props:[{children:c,role:"status","aria-live":"polite","aria-atomic":!0},i]})});process.env.NODE_ENV!=="production"&&(Kd.displayName="ComboboxEmpty");const Yd=u.forwardRef(function(t,n){const{className:r,render:o,orientation:s="horizontal",...i}=t;return ot("div",t,{state:{orientation:s},ref:n,props:[{role:"separator","aria-orientation":s},i]})});process.env.NODE_ENV!=="production"&&(Yd.displayName="Separator");function nw(e){const{multiple:t=!1,defaultValue:n,value:r,onValueChange:o,autoComplete:s,...i}=e;return v.jsx(GC,{...i,selectionMode:t?"multiple":"single",selectedValue:r,defaultSelectedValue:n,onSelectedValueChange:o,formAutoComplete:s})}function rw(e){const{children:t,placeholder:n}=e,r=vt(),o=V(r,$.itemToStringLabel),s=V(r,$.selectedValue),i=V(r,$.items),a=V(r,$.selectionMode)==="multiple",l=V(r,$.hasSelectedValue),c=!l&&n!=null&&t==null,d=V(r,$.hasNullItemLabel,c);let p=null;return typeof t=="function"?p=t(s):t!=null?p=t:!l&&n!=null&&!d?p=n:a&&Array.isArray(s)?p=TC(s,i,o):p=Rd(s,i,o),v.jsx(u.Fragment,{children:p})}const Xd=u.forwardRef(function(t,n){const{render:r,className:o,...s}=t,i=vt(),a=V(i,$.open),l=V(i,$.hasSelectionChips),[c,d]=u.useState(void 0);a&&c!==void 0&&d(void 0);const p=u.useRef([]),g=ot("div",t,{ref:[n,i.state.chipsContainerRef],props:[l?{role:"toolbar"}:rt,s]}),f=u.useMemo(()=>({highlightedChipIndex:c,setHighlightedChipIndex:d,chipsRef:p}),[c,d,p]);return v.jsx(pa.Provider,{value:f,children:v.jsx(mu,{elementsRef:p,children:g})})});process.env.NODE_ENV!=="production"&&(Xd.displayName="ComboboxChips");const ya=u.createContext(void 0);process.env.NODE_ENV!=="production"&&(ya.displayName="ComboboxChipContext");function ow(){const e=u.useContext(ya);if(!e)throw new Error(process.env.NODE_ENV!=="production"?"useComboboxChipContext must be used within a ComboboxChip":Ot(17));return e}const Zd=u.forwardRef(function(t,n){const{render:r,className:o,...s}=t,i=vt(),{setHighlightedChipIndex:a,chipsRef:l}=Md(),c=V(i,$.disabled),d=V(i,$.readOnly),p=V(i,$.selectedValue),{ref:g,index:f}=Nu();function h(x){let w=f;if(x.key==="ArrowLeft")x.preventDefault(),f>0?w=f-1:w=void 0;else if(x.key==="ArrowRight")x.preventDefault(),f<p.length-1?w=f+1:w=void 0;else if(x.key==="Backspace"||x.key==="Delete"){const C=f>=p.length-1?p.length-2:f;w=C>=0?C:void 0,De(x),i.state.setIndices({activeIndex:null,selectedIndex:null,type:"keyboard"}),i.state.setSelectedValue(p.filter((S,I)=>I!==f),pe(xt,x.nativeEvent))}else x.key==="Enter"||x.key===" "?(De(x),w=void 0):x.key==="ArrowDown"||x.key==="ArrowUp"?(De(x),i.state.setOpen(!0,pe(ar,x.nativeEvent)),w=void 0):x.key.length===1&&!x.ctrlKey&&!x.metaKey&&!x.altKey&&(w=void 0);return w}const b=ot("div",t,{ref:[n,g],state:{disabled:c},props:[{tabIndex:-1,"aria-disabled":c||void 0,"aria-readonly":d||void 0,onKeyDown(x){if(c||d)return;const w=h(x);gn.flushSync(()=>{a(w)}),w===void 0?i.state.inputRef.current?.focus():l.current[w]?.focus()},onMouseDown(x){d||(x.preventDefault(),!c&&i.state.inputRef.current?.focus())}},s]}),y=u.useMemo(()=>({index:f}),[f]);return v.jsx(ya.Provider,{value:y,children:b})});process.env.NODE_ENV!=="production"&&(Zd.displayName="ComboboxChip");const Qd=u.forwardRef(function(t,n){const{render:r,className:o,disabled:s=!1,nativeButton:i=!0,...a}=t,l=vt(),{index:c}=ow(),d=V(l,$.disabled),p=V(l,$.readOnly),g=V(l,$.selectedValue),f=V(l,$.isItemEqualToValue),h=d||s,{buttonRef:m,getButtonProps:b}=jo({native:i,disabled:h||p,focusableWhenDisabled:!0}),y={disabled:h};function x(S){const I=l.state.activeIndex;if(I==null)return;const E=Io(l.state.valuesRef.current,S,f);E!==-1&&I===E&&l.state.setIndices({activeIndex:null,type:l.state.keyboardActiveRef.current?"keyboard":"pointer"})}function w(S){const I=pe(kv,S.nativeEvent),E=g[c];return x(E),l.state.setSelectedValue(g.filter((R,F)=>F!==c),I),l.state.inputRef.current?.focus(),I}return ot("button",t,{ref:[n,m],state:y,props:[{tabIndex:-1,onClick(S){if(h||p)return;w(S).isPropagationAllowed||S.stopPropagation()},onKeyDown(S){h||p||(S.key==="Enter"||S.key===" ")&&(w(S).isPropagationAllowed||De(S))}},a,b]})});process.env.NODE_ENV!=="production"&&(Qd.displayName="ComboboxChipRemove");var sw=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],qo=sw.reduce((e,t)=>{const n=Kc(`Primitive.${t}`),r=u.forwardRef((o,s)=>{const{asChild:i,...a}=o,l=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),v.jsx(l,{...a,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),iw="Label",Jd=u.forwardRef((e,t)=>v.jsx(qo.label,{...e,ref:t,onMouseDown:n=>{n.target.closest("button, input, select, textarea")||(e.onMouseDown?.(n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));Jd.displayName=iw;var ef=Jd;const aw=_e(qe("body-sm-regular")),br=({className:e,ref:t,...n})=>v.jsx(ef,{ref:t,className:L(aw(),e),...n});br.displayName=ef.displayName;var lw="Separator",lc="horizontal",cw=["horizontal","vertical"],tf=u.forwardRef((e,t)=>{const{decorative:n,orientation:r=lc,...o}=e,s=uw(r)?r:lc,a=n?{role:"none"}:{"aria-orientation":s==="vertical"?s:void 0,role:"separator"};return v.jsx(qo.div,{"data-orientation":s,...a,...o,ref:t})});tf.displayName=lw;function uw(e){return cw.includes(e)}var nf=tf;const Ca=({className:e,orientation:t="horizontal",decorative:n=!0,ref:r,...o})=>v.jsx(nf,{ref:r,decorative:n,orientation:t,className:L("bg-delicate-border shrink-0",t==="horizontal"?"h-px w-full":"h-full w-px",e),...o});Ca.displayName=nf.displayName;const dw=_e("group/field data-[invalid=true]:text-error-text flex h-full w-full gap-2",{variants:{orientation:{vertical:["flex-col"],horizontal:["flex-row items-center","*:data-[slot=field-label]:flex-auto",`has-[>[data-slot=field-content]]:items-start
36
- has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px`]}},defaultVariants:{orientation:"vertical"}}),fw="flex flex-col gap-6 has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3",pw="mb-3 font-medium data-[variant=legend]:text-base data-[variant=label]:text-sm",gw="group/field-group @container/field-group flex w-full flex-col gap-7 data-[slot=checkbox-group]:gap-3 *:data-[slot=field-group]:gap-4",mw="group/field-content flex flex-1 flex-col gap-2",hw=[`group/field-label peer/field-label text-primary-text flex w-fit gap-2 text-sm
30
+ ${a.left}px ${a.top}px,
31
+ ${a.left}px ${a.bottom}px,
32
+ ${a.right}px ${a.bottom}px,
33
+ ${a.right}px ${a.top}px,
34
+ ${a.left}px ${a.top}px
35
+ )`}return C.jsx("div",{ref:n,role:"presentation","data-base-ui-inert":"",...o,style:{position:"fixed",inset:0,userSelect:"none",WebkitUserSelect:"none",clipPath:i}})});process.env.NODE_ENV!=="production"&&(b1.displayName="InternalBackdrop");function IL(e){const t=v.useRef(!0);t.current&&(t.current=!1,e())}const Fm=v.createContext(void 0);process.env.NODE_ENV!=="production"&&(Fm.displayName="ComboboxRootContext");const Vm=v.createContext(void 0);process.env.NODE_ENV!=="production"&&(Vm.displayName="ComboboxFloatingContext");const zm=v.createContext(void 0);process.env.NODE_ENV!=="production"&&(zm.displayName="ComboboxDerivedItemsContext");const Bm=v.createContext("");process.env.NODE_ENV!=="production"&&(Bm.displayName="ComboboxInputValueContext");function xn(){const e=v.useContext(Fm);if(!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: ComboboxRootContext is missing. Combobox parts must be placed within <Combobox.Root>.":Gn(22));return e}function vc(){const e=v.useContext(Vm);if(!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: ComboboxFloatingContext is missing. Combobox parts must be placed within <Combobox.Root>.":Gn(23));return e}function xo(){const e=v.useContext(zm);if(!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: ComboboxItemsContext is missing. Combobox parts must be placed within <Combobox.Root>.":Gn(24));return e}function Hm(){return v.useContext(Bm)}const kL=(e,t)=>Object.is(e,t);function Ko(e,t,n){return e==null||t==null?Object.is(e,t):n(e,t)}function NL(e,t,n){return!e||e.length===0?!1:e.some(r=>r===void 0?!1:Ko(t,r,n))}function ru(e,t,n){return!e||e.length===0?-1:e.findIndex(r=>r===void 0?!1:Ko(r,t,n))}function TL(e,t,n){return e.filter(r=>!Ko(t,r,n))}function Qp(e){if(e==null)return"";if(typeof e=="string")return e;try{return JSON.stringify(e)}catch{return String(e)}}function Gm(e){return e!=null&&e.length>0&&typeof e[0]=="object"&&e[0]!=null&&"items"in e[0]}function ML(e){if(!Array.isArray(e))return e!=null&&!("null"in e);if(Gm(e)){for(const t of e)for(const n of t.items)if(n&&n.value==null&&n.label!=null)return!0;return!1}for(const t of e)if(t&&t.value==null&&t.label!=null)return!0;return!1}function tn(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 Qp(e)}function pa(e,t){return t&&e!=null?t(e)??"":e&&typeof e=="object"&&"value"in e&&"label"in e?Qp(e.value):Qp(e)}function x1(e,t,n){function r(){return tn(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]??r();if(Array.isArray(t)){const o=Gm(t)?t.flatMap(i=>i.items):t;if(e==null||typeof e!="object"){const i=o.find(a=>a.value===e);return i&&i.label!=null?i.label:r()}if("value"in e){const i=o.find(a=>a&&a.value===e.value);if(i&&i.label!=null)return i.label}}return r()}function DL(e,t,n){return e.reduce((r,o,i)=>(i>0&&r.push(", "),r.push(C.jsx(v.Fragment,{children:x1(o,t,n)},i)),r),[])}const Q={id:fe(e=>e.id),query:fe(e=>e.query),items:fe(e=>e.items),selectedValue:fe(e=>e.selectedValue),hasSelectionChips:fe(e=>{const t=e.selectedValue;return Array.isArray(t)&&t.length>0}),hasSelectedValue:fe(e=>{const{selectedValue:t,selectionMode:n}=e;return t==null?!1:n==="multiple"&&Array.isArray(t)?t.length>0:!0}),hasNullItemLabel:fe((e,t)=>t?ML(e.items):!1),open:fe(e=>e.open),mounted:fe(e=>e.mounted),forceMounted:fe(e=>e.forceMounted),inline:fe(e=>e.inline),activeIndex:fe(e=>e.activeIndex),selectedIndex:fe(e=>e.selectedIndex),isActive:fe((e,t)=>e.activeIndex===t),isSelected:fe((e,t)=>{const n=e.isItemEqualToValue,r=e.selectedValue;return Array.isArray(r)?r.some(o=>Ko(t,o,n)):Ko(t,r,n)}),transitionStatus:fe(e=>e.transitionStatus),popupProps:fe(e=>e.popupProps),inputProps:fe(e=>e.inputProps),triggerProps:fe(e=>e.triggerProps),getItemProps:fe(e=>e.getItemProps),positionerElement:fe(e=>e.positionerElement),listElement:fe(e=>e.listElement),triggerElement:fe(e=>e.triggerElement),inputElement:fe(e=>e.inputElement),popupSide:fe(e=>e.popupSide),openMethod:fe(e=>e.openMethod),inputInsidePopup:fe(e=>e.inputInsidePopup),selectionMode:fe(e=>e.selectionMode),listRef:fe(e=>e.listRef),labelsRef:fe(e=>e.labelsRef),popupRef:fe(e=>e.popupRef),emptyRef:fe(e=>e.emptyRef),inputRef:fe(e=>e.inputRef),keyboardActiveRef:fe(e=>e.keyboardActiveRef),chipsContainerRef:fe(e=>e.chipsContainerRef),clearRef:fe(e=>e.clearRef),valuesRef:fe(e=>e.valuesRef),allValuesRef:fe(e=>e.allValuesRef),name:fe(e=>e.name),disabled:fe(e=>e.disabled),readOnly:fe(e=>e.readOnly),required:fe(e=>e.required),grid:fe(e=>e.grid),isGrouped:fe(e=>e.isGrouped),virtualized:fe(e=>e.virtualized),onOpenChangeComplete:fe(e=>e.onOpenChangeComplete),openOnInputClick:fe(e=>e.openOnInputClick),itemToStringLabel:fe(e=>e.itemToStringLabel),isItemEqualToValue:fe(e=>e.isItemEqualToValue),modal:fe(e=>e.modal),autoHighlight:fe(e=>e.autoHighlight),submitOnItemClick:fe(e=>e.submitOnItemClick)};let mb=(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 jL={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},$L={valid(e){return e===null?null:e?{[mb.valid]:""}:{[mb.invalid]:""}}},w1=v.createContext({invalid:void 0,name:void 0,validityData:{state:jL,errors:[],error:"",value:"",initialValue:null},setValidityData:et,disabled:void 0,touched:!1,setTouched:et,dirty:!1,setDirty:et,filled:!1,setFilled:et,focused:!1,setFocused:et,validate:()=>null,validationMode:"onSubmit",validationDebounceTime:0,shouldValidateOnChange:()=>!1,state:{disabled:!1,valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},markedDirtyRef:{current:!1},validation:{getValidationProps:(e=Gt)=>e,getInputValidationProps:(e=Gt)=>e,inputRef:{current:null},commit:async()=>{}}});process.env.NODE_ENV!=="production"&&(w1.displayName="FieldRootContext");function ls(e=!0){const t=v.useContext(w1);if(t.setValidityData===et&&!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: FieldRootContext is missing. Field parts must be placed within <Field.Root>.":Gn(28));return t}function LL(e,t){return{...e,state:{...e.state,valid:!t&&e.state.valid}}}const C1=v.createContext({formRef:{current:{fields:new Map}},errors:{},clearErrors:et,validationMode:"onSubmit",submitAttemptedRef:{current:!1}});process.env.NODE_ENV!=="production"&&(C1.displayName="FormContext");function S1(){return v.useContext(C1)}function FL(e){const{enabled:t=!0,value:n,id:r,name:o,controlRef:i,commit:a}=e,{formRef:s}=S1(),{invalid:l,markedDirtyRef:u,validityData:c,setValidityData:f}=ls(),p=de(e.getValue);he(()=>{if(!t)return;let d=n;d===void 0&&(d=p()),c.initialValue===null&&d!==null&&f(m=>({...m,initialValue:d}))},[t,f,n,c.initialValue,p]),he(()=>{!t||!r||s.current.fields.set(r,{getValue:p,name:o,controlRef:i,validityData:LL(c,l),validate(d=!0){let m=n;m===void 0&&(m=p()),u.current=!0,d?go.flushSync(()=>a(m)):a(m)}})},[a,i,t,s,p,r,l,u,o,c,n]),he(()=>{const d=s.current.fields;return()=>{r&&d.delete(r)}},[s,r])}const E1=v.createContext({controlId:void 0,registerControlId:et,labelId:void 0,setLabelId:et,messageIds:[],setMessageIds:et,getDescriptionProps:e=>e});process.env.NODE_ENV!=="production"&&(E1.displayName="LabelableContext");function Wm(){return v.useContext(E1)}function O1(e={}){const{id:t,implicit:n=!1,controlRef:r}=e,{controlId:o,registerControlId:i}=Wm(),a=Sm(t),s=n?o:void 0,l=In(()=>Symbol("labelable-control")),u=v.useRef(!1),c=v.useRef(t!=null),f=de(()=>{!u.current||i===et||(u.current=!1,i(l.current,void 0))});return he(()=>{if(i===et)return;let p;if(n){const d=r?.current;Qe(d)&&d.closest("label")!=null?p=t??null:p=s??a}else if(t!=null)c.current=!0,p=t;else if(c.current)p=a;else{f();return}if(p===void 0){f();return}u.current=!0,i(l.current,p)},[t,r,s,i,n,a,l,f]),v.useEffect(()=>f,[f]),o??a}function VL(e,t){return(n,r)=>{if(n==null)return!1;const o=tn(n,t);return e.contains(o,r)}}function zL(e,t,n){return(r,o)=>{if(r==null)return!1;if(!o)return!0;const i=tn(r,t),a=n!=null?tn(n,t):"";return a&&e.contains(a,o)&&a.length===o.length?!0:e.contains(i,o)}}const gb=new Map;function P1(e){return Array.isArray(e)?e.map(t=>P1(t)).join(","):e==null?"":String(e)}function BL(e={}){const t={usage:"search",sensitivity:"base",ignorePunctuation:!0,...e},n=`${P1(e.locale)}|${JSON.stringify(t)}`,r=gb.get(n);if(r)return r;const o=new Intl.Collator(e.locale,t),i={contains(a,s,l){if(!s)return!0;const u=tn(a,l);for(let c=0;c<=u.length-s.length;c+=1)if(o.compare(u.slice(c,c+s.length),s)===0)return!0;return!1},startsWith(a,s,l){if(!s)return!0;const u=tn(a,l);return o.compare(u.slice(0,s.length),s)===0},endsWith(a,s,l){if(!s)return!0;const u=tn(a,l),c=s.length;return u.length>=c&&o.compare(u.slice(u.length-c),s)===0}};return gb.set(n,i),i}const HL=BL;function il(e,t){const n=v.useRef(e),r=de(t);he(()=>{n.current!==e&&r(n.current)},[e,r]),he(()=>{n.current=e},[e])}const _1=Symbol("none"),Ro={value:_1,index:-1};function GL(e){const{id:t,onOpenChangeComplete:n,defaultSelectedValue:r=null,selectedValue:o,onSelectedValueChange:i,defaultInputValue:a,inputValue:s,selectionMode:l="none",onItemHighlighted:u,name:c,disabled:f=!1,readOnly:p=!1,required:d=!1,inputRef:m,grid:g=!1,items:h,filteredItems:y,filter:b,openOnInputClick:x=!0,autoHighlight:w=!1,keepHighlight:S=!1,highlightItemOnHover:E=!0,loopFocus:O=!0,itemToStringLabel:P,itemToStringValue:N,isItemEqualToValue:R=kL,virtualized:k=!1,inline:_=!1,fillInputOnItemPress:T=!0,modal:F=!1,limit:V=-1,autoComplete:D="list",formAutoComplete:B,locale:z,submitOnItemClick:Y=!1}=e,{clearErrors:$}=S1(),{setDirty:ye,validityData:ae,shouldValidateOnChange:be,setFilled:ne,name:le,disabled:Ee,setTouched:Pe,setFocused:Se,validationMode:L,validation:U}=ls(),G=O1({id:t}),I=HL({locale:z}),[W,H]=v.useState(!1),[pe,M]=v.useState(null),J=v.useRef([]),ee=v.useRef([]),K=v.useRef(null),te=v.useRef(null),Z=v.useRef(null),oe=v.useRef(!0),ve=v.useRef(!1),Re=v.useRef(null),dt=v.useRef(null),Xt=v.useRef(null),nt=v.useRef(Ro),$e=v.useRef(null),at=v.useRef([]),Zt=v.useRef([]),Bt=Ee||f,un=le??c,Dt=l==="multiple",Qt=l==="single",dr=s!==void 0||a!==void 0,Mn=h!==void 0,Ge=y!==void 0;let Le;w==="always"?Le="always":Le=w?"input-change":!1;const[xe,Jt]=Nf({controlled:o,default:Dt?r??Ks:r,name:"Combobox",state:"selectedValue"}),en=v.useMemo(()=>b===null?()=>!0:b!==void 0?b:Qt&&!W?zL(I,P,xe):VL(I,P),[b,Qt,xe,W,I,P]),Eo=In(()=>dr?a??"":Qt?tn(xe,P):"").current,[wt,aa]=Nf({controlled:s,default:Eo,name:"Combobox",state:"inputValue"}),[rt,vf]=Nf({controlled:e.open,default:e.defaultOpen,name:"Combobox",state:"open"}),Dn=Gm(h),jt=pe??(wt===""?"":String(wt).trim()),sa=Qt?tn(xe,P):"",pi=Qt&&!W&&jt!==""&&sa!==""&&sa.length===jt.length&&I.contains(sa,jt),Hr=pi?"":jt,js=Mn&&Ge&&pi,Gr=v.useMemo(()=>h?Dn?h.flatMap(re=>re.items):h:Ks,[h,Dn]),jn=v.useMemo(()=>{if(y&&!js)return y;if(!h)return Ks;if(Dn){const ge=h,Ae=[];let st=0;for(const Ct of ge){if(V>-1&&st>=V)break;const St=Hr===""?Ct.items:Ct.items.filter(Bs=>en(Bs,Hr,P));if(St.length===0)continue;const Oo=V>-1?V-st:1/0,Po=St.slice(0,Oo);if(Po.length>0){const Bs={...Ct,items:Po};Ae.push(Bs),st+=Po.length}}return Ae}if(Hr==="")return V>-1?Gr.slice(0,V):Gr;const re=[];for(const ge of Gr){if(V>-1&&re.length>=V)break;en(ge,Hr,P)&&re.push(ge)}return re},[y,js,h,Dn,Hr,V,en,P,Gr]),cn=v.useMemo(()=>Dn?jn.flatMap(ge=>ge.items):jn,[jn,Dn]),Ie=In(()=>new g1({id:G,selectedValue:xe,open:rt,filter:en,query:jt,items:h,selectionMode:l,listRef:J,labelsRef:ee,popupRef:K,emptyRef:Z,inputRef:te,keyboardActiveRef:oe,chipsContainerRef:Re,clearRef:dt,valuesRef:at,allValuesRef:Zt,selectionEventRef:Xt,name:un,disabled:Bt,readOnly:p,required:d,grid:g,isGrouped:Dn,virtualized:k,openOnInputClick:x,itemToStringLabel:P,isItemEqualToValue:R,modal:F,autoHighlight:Le,submitOnItemClick:Y,hasInputValue:dr,mounted:!1,forceMounted:!1,transitionStatus:"idle",inline:_,activeIndex:null,selectedIndex:null,popupProps:{},inputProps:{},triggerProps:{},positionerElement:null,listElement:null,triggerElement:null,inputElement:null,popupSide:null,openMethod:null,inputInsidePopup:!0,onOpenChangeComplete:n||et,setOpen:et,setInputValue:et,setSelectedValue:et,setIndices:et,onItemHighlighted:et,handleSelection:et,getItemProps:()=>Gt,forceMount:et,requestSubmit:et})).current,Wr=l==="none"?wt:xe,BN=v.useMemo(()=>l==="none"?Wr:Array.isArray(xe)?xe.map(re=>pa(re,N)):pa(xe,N),[Wr,N,l,xe]),yf=de(u),bf=de(n),$s=X(Ie,Q.activeIndex),HN=X(Ie,Q.selectedIndex),Ls=X(Ie,Q.positionerElement),hy=X(Ie,Q.listElement),la=X(Ie,Q.triggerElement),xf=X(Ie,Q.inputElement),$n=X(Ie,Q.inline),Ur=X(Ie,Q.inputInsidePopup),GN=Pn(la),{mounted:my,setMounted:WN,transitionStatus:wf}=wE(rt),{openMethod:gy,triggerProps:Cf,reset:UN}=wL(rt);FL({id:G,name:un,commit:U.commit,value:Wr,controlRef:Ur?GN:te,getValue:()=>BN});const Fs=de(()=>{h?ee.current=cn.map(re=>tn(re,P)):Ie.set("forceMounted",!0)}),qN=v.useRef(xe);he(()=>{xe!==qN.current&&Fs()},[Fs,xe]);const Ln=de(re=>{Ie.update(re);const ge=re.type||"none";if(re.activeIndex!==void 0)if(re.activeIndex===null)nt.current!==Ro&&(nt.current=Ro,yf(void 0,fa(ge,void 0,{index:-1})));else{const Ae=at.current[re.activeIndex];nt.current={value:Ae,index:re.activeIndex},yf(Ae,fa(ge,void 0,{index:re.activeIndex}))}}),qn=de((re,ge)=>{if(ve.current=ge.reason===Qr,e.onInputValueChange?.(re,ge),!ge.isCanceled){if(ge.reason===Ei){const Ae=ge.event,st=Ae.inputType;if(Ae.type==="compositionend"||st!=null&&st!==""&&st!=="insertReplacementText"){const St=re.trim()!=="";St&&H(!0),$e.current={hasQuery:St},St&&Le&&Ie.state.activeIndex==null&&Ie.set("activeIndex",0)}}aa(re)}}),ua=de((re,ge)=>{if(rt!==re&&(ge.reason==="escape-key"&&Mn&&cn.length===0&&!Ie.state.emptyRef.current&&ge.allowPropagation(),e.onOpenChange?.(re,ge),!ge.isCanceled&&(!re&&W&&(Qt?($n||M(jt),jt===""&&H(!1)):Dt&&($n||Ur?Ln({activeIndex:null}):M(jt),qn("",Oe(Qr,ge.event)))),vf(re),!re&&Ur&&(ge.reason===ic||ge.reason===wm)&&(Pe(!0),Se(!1),L==="onBlur")))){const Ae=l==="none"?wt:xe;U.commit(Ae)}}),Vs=de((re,ge)=>{if(i?.(re,ge),ge.isCanceled)return;Jt(re),(l==="none"&&K.current&&T||Qt&&!Ie.state.inputInsidePopup)&&qn(tn(re,P),Oe(ge.reason,ge.event)),Qt&&re!=null&&ge.reason!==Ei&&W&&!$n&&M(jt)}),KN=de((re,ge)=>{let Ae=ge;if(Ae===void 0){if($s===null)return;Ae=at.current[$s]}const st=nn(re),Ct=Xt.current??re;Xt.current=null;const St=Oe(Ij,Ct),Oo=st?.closest("a")?.getAttribute("href");if(Oo){Oo.startsWith("#")&&ua(!1,St);return}if(Dt){const Po=Array.isArray(xe)?xe:[],aT=NL(Po,Ae,Ie.state.isItemEqualToValue)?TL(Po,Ae,Ie.state.isItemEqualToValue):[...Po,Ae];if(Vs(aT,St),!(te.current?te.current.value.trim()!=="":!1))return;Ie.state.inputInsidePopup?qn("",Oe(Qr,St.event)):ua(!1,St)}else Vs(Ae,St),ua(!1,St)}),Sf=de(()=>{if(!Ie.state.submitOnItemClick)return;const re=Ie.state.inputElement?.form;re&&typeof re.requestSubmit=="function"&&re.requestSubmit()}),Ef=de(()=>{if(WN(!1),bf?.(!1),H(!1),UN(),M(null),Ln(l==="none"?{activeIndex:null,selectedIndex:null}:{activeIndex:null}),Dt&&te.current&&te.current.value!==""&&!ve.current&&qn("",Oe(Qr)),Qt)if(Ie.state.inputInsidePopup)te.current&&te.current.value!==""&&qn("",Oe(Qr));else{const re=tn(xe,P);te.current&&te.current.value!==re&&qn(re,Oe(re===""?Qr:On))}}),YN=v.useMemo(()=>$n&&Ls?{current:Ls.closest('[role="dialog"]')}:K,[$n,Ls]);Nm({enabled:!e.actionsRef,open:rt,ref:YN,onComplete(){rt||Ef()}}),v.useImperativeHandle(e.actionsRef,()=>({unmount:Ef}),[Ef]),he(function(){if(rt||l==="none")return;const ge=h?Gr:Zt.current;if(Dt){const Ae=Array.isArray(xe)?xe:[],st=Ae[Ae.length-1],Ct=ru(ge,st,R);Ln({selectedIndex:Ct===-1?null:Ct})}else{const Ae=ru(ge,xe,R);Ln({selectedIndex:Ae===-1?null:Ae})}},[rt,xe,h,l,Gr,Dt,R,Ln]),he(()=>{h&&(at.current=cn,J.current.length=cn.length)},[h,cn]),he(()=>{const re=$e.current;if(re&&(re.hasQuery?Le&&Ie.set("activeIndex",0):Le==="always"&&Ie.set("activeIndex",0),$e.current=null),!rt&&!$n)return;const Ae=Mn||Ge?cn:at.current,st=Ie.state.activeIndex;if(st==null){if(Le==="always"&&Ae.length>0){Ie.set("activeIndex",0);return}nt.current!==Ro&&(nt.current=Ro,Ie.state.onItemHighlighted(void 0,fa(On,void 0,{index:-1})));return}if(st>=Ae.length){nt.current!==Ro&&(nt.current=Ro,Ie.state.onItemHighlighted(void 0,fa(On,void 0,{index:-1}))),Ie.set("activeIndex",null);return}const Ct=Ae[st],St=nt.current.value,Oo=St!==_1&&Ko(Ct,St,Ie.state.isItemEqualToValue);(nt.current.index!==st||!Oo)&&(nt.current={value:Ct,index:st},Ie.state.onItemHighlighted(Ct,fa(On,void 0,{index:st})))},[$s,Le,Ge,Mn,cn,$n,rt,Ie]),he(()=>{if(l==="none"){ne(String(wt)!=="");return}ne(Dt?Array.isArray(xe)&&xe.length>0:xe!=null)},[ne,l,wt,xe,Dt]),v.useEffect(()=>{Mn&&Le&&cn.length===0&&Ln({activeIndex:null})},[Mn,Le,cn.length,Ln]),il(jt,()=>{!rt||jt===""||jt===String(Eo)||H(!0)}),il(xe,()=>{if(l!=="none"&&($(un),ye(xe!==ae.initialValue),be()?U.commit(xe):U.commit(xe,!0),Qt&&!dr&&!Ur)){const re=tn(xe,P);wt!==re&&qn(re,Oe(On))}}),il(wt,()=>{l==="none"&&($(un),ye(wt!==ae.initialValue),be()?U.commit(wt):U.commit(wt,!0))}),il(h,()=>{if(!Qt||dr||Ur||W)return;const re=tn(xe,P);wt!==re&&qn(re,Oe(On))});const zs=v1({open:$n?!0:rt,onOpenChange:ua,elements:{reference:Ur?la:xf,floating:Ls}});let Of,Pf;$n||(Of=g?"grid":"listbox",Pf=rt?"true":"false");const XN=v.useMemo(()=>{const re=xf?.tagName==="INPUT",ge=re||rt,Ae=re?{autoComplete:"off",spellCheck:"false",autoCorrect:"off",autoCapitalize:"none"}:{};return ge&&(Ae.role="combobox",Ae["aria-expanded"]=Pf,Ae["aria-haspopup"]=Of,Ae["aria-controls"]=rt?hy?.id:void 0,Ae["aria-autocomplete"]=D),{reference:Ae,floating:{role:"presentation"}}},[xf,rt,Pf,Of,hy?.id,D]),ZN=ZE(zs,{enabled:!p&&!Bt&&x,event:"mousedown-only",toggle:!1,touchOpenDelay:Ur?0:50,reason:Nj}),QN=M$(zs,{enabled:!p&&!Bt&&!$n,outsidePressEvent:{mouse:"sloppy",touch:"intentional"},bubbles:$n?!0:void 0,outsidePress(re){const ge=nn(re);return!Me(la,ge)&&!Me(dt.current,ge)&&!Me(Re.current,ge)}}),JN=yL(zs,{enabled:!p&&!Bt,id:G,listRef:J,activeIndex:$s,selectedIndex:HN,virtual:!0,loopFocus:O,allowEscape:O&&!Le,focusItemOnOpen:W||l==="none"&&!Le?!1:"auto",focusItemOnHover:E,resetOnPointerLeave:!S,cols:g?2:1,orientation:g?"horizontal":void 0,disabledIndices:Ks,onNavigate(re,ge){!ge&&!rt||wf==="ending"||Ln(ge?{activeIndex:re,type:oe.current?"keyboard":"pointer"}:{activeIndex:re})}}),{getReferenceProps:_f,getFloatingProps:Af,getItemProps:Rf}=hL([XN,ZN,QN,JN]);IL(()=>{Ie.update({inline:_,popupProps:Af(),inputProps:_f(),triggerProps:Cf,getItemProps:Rf,setOpen:ua,setInputValue:qn,setSelectedValue:Vs,setIndices:Ln,onItemHighlighted:yf,handleSelection:KN,forceMount:Fs,requestSubmit:Sf})}),he(()=>{Ie.update({id:G,selectedValue:xe,open:rt,mounted:my,transitionStatus:wf,items:h,inline:_,popupProps:Af(),inputProps:_f(),triggerProps:Cf,openMethod:gy,getItemProps:Rf,selectionMode:l,name:un,disabled:Bt,readOnly:p,required:d,grid:g,isGrouped:Dn,virtualized:k,onOpenChangeComplete:bf,openOnInputClick:x,itemToStringLabel:P,modal:F,autoHighlight:Le,isItemEqualToValue:R,submitOnItemClick:Y,hasInputValue:dr,requestSubmit:Sf})},[Ie,G,xe,rt,my,wf,h,Af,_f,Rf,gy,Cf,l,un,Bt,p,d,U,g,Dn,k,bf,x,P,F,R,Y,dr,_,Sf,Le]);const eT=Va(m,U.inputRef),tT=v.useMemo(()=>({query:jt,hasItems:Mn,filteredItems:jn,flatFilteredItems:cn}),[jt,Mn,jn,cn]),nT=v.useMemo(()=>Array.isArray(Wr)?"":pa(Wr,N),[Wr,N]),rT=Dt&&Array.isArray(xe)&&xe.length>0,If=Dt||l==="none"?void 0:un,oT=v.useMemo(()=>!Dt||!Array.isArray(xe)||!un?null:xe.map(re=>{const ge=pa(re,N);return C.jsx("input",{type:"hidden",name:un,value:ge},ge)}),[Dt,xe,un,N]),iT=C.jsxs(v.Fragment,{children:[e.children,C.jsx("input",{...U.getInputValidationProps({onFocus(){if(Ur){la?.focus();return}(te.current||la)?.focus()},onChange(re){if(re.nativeEvent.defaultPrevented)return;const ge=re.target.value,Ae=Oe(On,re.nativeEvent);function st(){if(Dt)return;if(l==="none"){ye(ge!==ae.initialValue),qn(ge,Ae),be()&&U.commit(ge);return}const Ct=at.current.find(St=>pa(St,N).toLowerCase()===ge.toLowerCase());Ct!=null&&(ye(Ct!==ae.initialValue),Vs?.(Ct,Ae),be()&&U.commit(Ct))}h?st():(Fs(),queueMicrotask(st))}}),id:G&&If==null?`${G}-hidden-input`:void 0,name:If,autoComplete:B,disabled:Bt,required:d&&!rT,readOnly:p,value:nT,ref:eT,style:If?L2:Tm,tabIndex:-1,"aria-hidden":!0}),oT]});return C.jsx(Fm.Provider,{value:Ie,children:C.jsx(Vm.Provider,{value:zs,children:C.jsx(zm.Provider,{value:tT,children:C.jsx(Bm.Provider,{value:wt,children:iT})})})})}const A1={...AL,...$L,popupSide:e=>e?{"data-popup-side":e}:null,listEmpty:e=>e?{"data-list-empty":""}:null};function WL(e){const t=e.getBoundingClientRect();if(process.env.NODE_ENV!=="production")return t;const n=window.getComputedStyle(e,"::before"),r=window.getComputedStyle(e,"::after");if(!(n.content!=="none"||r.content!=="none"))return t;const i=parseFloat(n.width)||0,a=parseFloat(n.height)||0,s=parseFloat(r.width)||0,l=parseFloat(r.height)||0,u=Math.max(t.width,i,s),c=Math.max(t.height,a,l),f=u-t.width,p=c-t.height;return{left:t.left-f/2,right:t.right+f/2,top:t.top-p/2,bottom:t.bottom+p/2}}const al=2,R1=v.forwardRef(function(t,n){const{render:r,className:o,nativeButton:i=!0,disabled:a=!1,id:s,...l}=t,{state:u,disabled:c,setTouched:f,setFocused:p,validationMode:d,validation:m}=ls(),{labelId:g}=Wm(),h=xn(),{filteredItems:y}=xo(),b=X(h,Q.selectionMode),x=X(h,Q.disabled),w=X(h,Q.readOnly),S=X(h,Q.required),E=X(h,Q.mounted),O=X(h,Q.popupSide),P=X(h,Q.positionerElement),N=X(h,Q.listElement),R=X(h,Q.triggerProps),k=X(h,Q.triggerElement),_=X(h,Q.inputInsidePopup),T=X(h,Q.id),F=X(h,Q.open),V=X(h,Q.selectedValue),D=X(h,Q.activeIndex),B=X(h,Q.selectedIndex),z=X(h,Q.hasSelectedValue),Y=vc(),$=Hm(),ye=Uo(),ae=c||x||a,be=y.length===0,ne=E&&P?O:null;O1({id:_?s:void 0});const le=_?s??T:s,Ee=v.useRef("");function Pe(M){Ee.current=M.pointerType}const Se=Y.useState("domReferenceElement");v.useEffect(()=>{_&&k&&k!==Se&&Y.set("domReferenceElement",k)},[k,Se,Y,_]);const{reference:L}=bL(Y,{enabled:!F&&!w&&!x&&b==="single",listRef:h.state.labelsRef,activeIndex:D,selectedIndex:B,onMatch(M){const J=h.state.valuesRef.current[M];J!==void 0&&h.state.setSelectedValue(J,Oe("none"))}}),{reference:U}=ZE(Y,{enabled:!w&&!x,event:"mousedown"}),{buttonRef:G,getButtonProps:I}=cc({native:i,disabled:ae}),W={...u,open:F,disabled:ae,popupSide:ne,listEmpty:be,placeholder:!z},H=de(M=>{h.set("triggerElement",M)});return Kt("button",t,{ref:[n,G,H],state:W,props:[R,U,L,{id:le,tabIndex:_?0:-1,role:_?"combobox":void 0,"aria-expanded":F?"true":"false","aria-haspopup":_?"dialog":"listbox","aria-controls":F?N?.id:void 0,"aria-required":_&&S||void 0,"aria-labelledby":g,onPointerDown:Pe,onPointerEnter:Pe,onFocus(){p(!0),!(ae||w)&&ye.start(0,h.state.forceMount)},onBlur(M){if(!Me(P,M.relatedTarget)&&(f(!0),p(!1),d==="onBlur")){const J=b==="none"?$:V;m.commit(J)}},onMouseDown(M){if(ae||w||(_||Y.set("domReferenceElement",M.currentTarget),h.state.forceMount(),Ee.current!=="touch"&&(h.state.inputRef.current?.focus(),_||M.preventDefault()),F))return;const J=lt(M.currentTarget);function ee(K){if(!k)return;const te=nn(K),Z=h.state.positionerElement,oe=h.state.listElement;if(Me(k,te)||Me(Z,te)||Me(oe,te)||te===k)return;const ve=WL(k),Re=K.clientX>=ve.left-al&&K.clientX<=ve.right+al,dt=K.clientY>=ve.top-al&&K.clientY<=ve.bottom+al;Re&&dt||h.state.setOpen(!1,Oe("cancel-open",K))}_&&J.addEventListener("mouseup",ee,{once:!0})},onKeyDown(M){ae||w||(M.key==="ArrowDown"||M.key==="ArrowUp")&&(Ze(M),h.state.setOpen(!0,Oe(Na,M.nativeEvent)),h.state.inputRef.current?.focus())}},m?m.getValidationProps(l):l,I],stateAttributesMapping:A1})});process.env.NODE_ENV!=="production"&&(R1.displayName="ComboboxTrigger");const Um=v.createContext(void 0);process.env.NODE_ENV!=="production"&&(Um.displayName="ComboboxChipsContext");function I1(){return v.useContext(Um)}const qm=v.createContext(void 0);process.env.NODE_ENV!=="production"&&(qm.displayName="ComboboxPositionerContext");function Km(e){const t=v.useContext(qm);if(t===void 0&&!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: <Combobox.Popup> and <Combobox.Arrow> must be used within the <Combobox.Positioner> component":Gn(21));return t}const Ym=v.forwardRef(function(t,n){const{render:r,className:o,disabled:i=!1,id:a,...s}=t,{state:l,disabled:u,setTouched:c,setFocused:f,validationMode:p,validation:d}=ls(),{labelId:m}=Wm(),g=I1(),y=!!Km(!0),b=xn(),{filteredItems:x}=xo(),w=Hm(),S=dE(),E=X(b,Q.required),O=X(b,Q.disabled),P=X(b,Q.readOnly),N=X(b,Q.name),R=X(b,Q.selectionMode),k=X(b,Q.autoHighlight),_=X(b,Q.inputProps),T=X(b,Q.triggerProps),F=X(b,Q.open),V=X(b,Q.mounted),D=X(b,Q.selectedValue),B=X(b,Q.popupSide),z=X(b,Q.positionerElement),Y=X(b,Q.id),$=X(b,Q.inline),ye=!!k,ae=V&&z?B:null,be=u||O||i,ne=x.length===0,Ee=Sm(a??(y||$?void 0:Y)),[Pe,Se]=v.useState(null),L=v.useRef(!1),U=v.useRef(null),G=v.useRef(!1),I=de(M=>{const J=y||b.state.inline;J&&!b.state.hasInputValue&&b.state.setInputValue("",Oe(On)),b.update({inputElement:M,inputInsidePopup:J})}),W={...l,open:F,disabled:be,readOnly:P,popupSide:ae,listEmpty:ne};function H(M){if(!g)return;let J;const{highlightedChipIndex:ee}=g;if(ee!==void 0){if(M.key==="ArrowLeft")M.preventDefault(),ee>0?J=ee-1:J=void 0;else if(M.key==="ArrowRight")M.preventDefault(),ee<D.length-1?J=ee+1:J=void 0;else if(M.key==="Backspace"||M.key==="Delete"){M.preventDefault();const K=ee>=D.length-1?D.length-2:ee;J=K>=0?K:void 0,b.state.setIndices({activeIndex:null,selectedIndex:null,type:"keyboard"})}return J}return M.key==="ArrowLeft"&&(M.currentTarget.selectionStart??0)===0&&D.length>0?(M.preventDefault(),J=Math.max(D.length-1,0)):M.key==="Backspace"&&M.currentTarget.value===""&&D.length>0&&(b.state.setIndices({activeIndex:null,selectedIndex:null,type:"keyboard"}),M.preventDefault()),J}return Kt("input",t,{state:W,ref:[n,b.state.inputRef,I],props:[_,T,{type:"text",value:t.value??Pe??w,"aria-readonly":P||void 0,"aria-required":E||void 0,"aria-labelledby":m,disabled:be,readOnly:P,required:R==="none"?E:void 0,...R==="none"&&N&&{name:N},id:Ee,onFocus(){if(f(!0),!$||!G.current)return;G.current=!1;const M=U.current;M==null||!Object.hasOwn(b.state.valuesRef.current,M)||b.state.setIndices({activeIndex:M})},onBlur(){c(!0),f(!1);const M=b.state.activeIndex;if($&&M!==null&&k!=="always"&&(U.current=M,G.current=!0,b.state.setIndices({activeIndex:null})),p==="onBlur"){const J=R==="none"?w:D;d.commit(J)}},onCompositionStart(M){Wl||(L.current=!0,Se(M.currentTarget.value))},onCompositionEnd(M){L.current=!1;const J=M.currentTarget.value;Se(null),b.state.setInputValue(J,Oe(Ei,M.nativeEvent))},onChange(M){const J=M.nativeEvent.inputType,ee=!J||J==="insertReplacementText",K=L.current||!ee;if(L.current){const ve=M.currentTarget.value;Se(ve),ve===""&&!b.state.openOnInputClick&&!b.state.inputInsidePopup&&b.state.setOpen(!1,Oe(Qr,M.nativeEvent));const Re=ve.trim(),dt=ye&&Re!=="";!P&&!be&&Re&&K&&(b.state.setOpen(!0,Oe(Ei,M.nativeEvent)),ye||b.state.setIndices({activeIndex:null,selectedIndex:null,type:b.state.keyboardActiveRef.current?"keyboard":"pointer"})),F&&b.state.activeIndex!==null&&!dt&&b.state.setIndices({activeIndex:null,selectedIndex:null,type:b.state.keyboardActiveRef.current?"keyboard":"pointer"});return}b.state.setInputValue(M.currentTarget.value,Oe(Ei,M.nativeEvent));const te=M.currentTarget.value==="",Z=Oe(Qr,M.nativeEvent);te&&!b.state.inputInsidePopup&&(R==="single"&&b.state.setSelectedValue(null,Z),b.state.openOnInputClick||b.state.setOpen(!1,Z));const oe=M.currentTarget.value.trim();!P&&!be&&oe&&K&&(b.state.setOpen(!0,Oe(Ei,M.nativeEvent)),ye||b.state.setIndices({activeIndex:null,selectedIndex:null,type:b.state.keyboardActiveRef.current?"keyboard":"pointer"})),F&&b.state.activeIndex!==null&&!ye&&b.state.setIndices({activeIndex:null,selectedIndex:null,type:b.state.keyboardActiveRef.current?"keyboard":"pointer"})},onKeyDown(M){if(be||P||M.ctrlKey||M.shiftKey||M.altKey||M.metaKey)return;b.state.keyboardActiveRef.current=!0;const J=M.currentTarget,ee=J.scrollWidth-J.clientWidth,K=S==="rtl";if(M.key==="Home"){Ze(M);const oe=jy&&K?J.value.length:0;J.setSelectionRange(oe,oe),J.scrollLeft=0;return}if(M.key==="End"){Ze(M);const oe=jy&&K?0:J.value.length;J.setSelectionRange(oe,oe),J.scrollLeft=K?-ee:ee;return}if(!V&&M.key==="Escape"){const oe=R==="multiple"&&Array.isArray(D)?D.length===0:D===null,ve=Oe(yE,M.nativeEvent),Re=R==="multiple"?[]:null;b.state.setInputValue("",ve),b.state.setSelectedValue(Re,ve),!oe&&!b.state.inline&&!ve.isPropagationAllowed&&M.stopPropagation();return}if(g&&M.key==="Backspace"&&J.value===""&&g.highlightedChipIndex===void 0&&Array.isArray(D)&&D.length>0){const oe=D.slice(0,-1);b.state.setIndices({activeIndex:null,selectedIndex:null,type:b.state.keyboardActiveRef.current?"keyboard":"pointer"}),b.state.setSelectedValue(oe,Oe(On,M.nativeEvent));return}const te=g?.highlightedChipIndex!==void 0,Z=H(M);if(g?.setHighlightedChipIndex(Z),Z!==void 0?g?.chipsRef.current[Z]?.focus():te&&b.state.inputRef.current?.focus(),M.which!==229&&M.key==="Enter"&&F){const oe=b.state.activeIndex,ve=M.nativeEvent;if(oe===null){b.state.setOpen(!1,Oe(On,ve));return}Ze(M);const Re=b.state.listRef.current[oe];Re&&(b.state.selectionEventRef.current=ve,Re.click(),b.state.selectionEventRef.current=null)}},onPointerMove(){b.state.keyboardActiveRef.current=!1},onPointerDown(){b.state.keyboardActiveRef.current=!1}},d?d.getValidationProps(s):s],stateAttributesMapping:A1})});process.env.NODE_ENV!=="production"&&(Ym.displayName="ComboboxInput");const UL={...xE,..._L},k1=v.forwardRef(function(t,n){const{render:r,className:o,disabled:i=!1,nativeButton:a=!0,keepMounted:s=!1,...l}=t,{disabled:u}=ls(),c=xn(),f=X(c,Q.selectionMode),p=X(c,Q.disabled),d=X(c,Q.readOnly),m=X(c,Q.open),g=X(c,Q.selectedValue),h=X(c,Q.hasSelectionChips),y=Hm();let b=!1;f==="none"?b=y!=="":f==="single"?b=g!=null:b=h;const x=u||p||i,{buttonRef:w,getButtonProps:S}=cc({native:a,disabled:x}),{mounted:E,transitionStatus:O,setMounted:P}=wE(b),N={disabled:x,open:m,transitionStatus:O};Nm({open:b,ref:c.state.clearRef,onComplete(){b||P(!1)}});const R=Kt("button",t,{state:N,ref:[n,w,c.state.clearRef],props:[{tabIndex:-1,children:"x",onMouseDown(_){_.preventDefault()},onClick(_){if(x||d)return;const T=c.state.keyboardActiveRef;c.state.setInputValue("",Oe(ky,_.nativeEvent)),f!=="none"?(c.state.setSelectedValue(Array.isArray(g)?[]:null,Oe(ky,_.nativeEvent)),c.state.setIndices({activeIndex:null,selectedIndex:null,type:T.current?"keyboard":"pointer"})):c.state.setIndices({activeIndex:null,type:T.current?"keyboard":"pointer"}),c.state.inputRef.current?.focus()}},l,S],stateAttributesMapping:UL});return s||E?R:null});process.env.NODE_ENV!=="production"&&(k1.displayName="ComboboxClear");const Xm=v.createContext(null);process.env.NODE_ENV!=="production"&&(Xm.displayName="GroupCollectionContext");function qL(){return v.useContext(Xm)}function KL(e){const{children:t,items:n}=e,r=v.useMemo(()=>({items:n}),[n]);return C.jsx(Xm.Provider,{value:r,children:t})}function N1(e){const{children:t}=e,{filteredItems:n}=xo(),r=qL(),o=r?r.items:n;return o?C.jsx(v.Fragment,{children:o.map(t)}):null}const T1=v.forwardRef(function(t,n){var r;const{render:o,className:i,children:a,...s}=t,l=xn(),u=vc(),c=!!Km(!0),{filteredItems:f}=xo(),p=X(l,Q.items),d=X(l,Q.labelsRef),m=X(l,Q.listRef),g=X(l,Q.selectionMode),h=X(l,Q.grid),y=X(l,Q.popupProps),b=X(l,Q.disabled),x=X(l,Q.readOnly),w=X(l,Q.virtualized),S=g==="multiple",E=f.length===0,O=de(T=>{l.set("positionerElement",T)}),P=de(T=>{l.set("listElement",T)}),N=v.useMemo(()=>typeof a=="function"?r||(r=C.jsx(N1,{children:a})):a,[a]),R={empty:E},k=u.useState("floatingId"),_=Kt("div",t,{state:R,ref:[n,P,c?null:O],props:[y,{children:N,tabIndex:-1,id:k,role:h?"grid":"listbox","aria-multiselectable":S?"true":void 0,onKeyDown(T){if(!(b||x)&&T.key==="Enter"){const F=l.state.activeIndex;if(F==null)return;Ze(T);const V=T.nativeEvent,D=l.state.listRef.current[F];D&&(l.state.selectionEventRef.current=V,D.click(),l.state.selectionEventRef.current=null)}},onKeyDownCapture(){l.state.keyboardActiveRef.current=!0},onPointerMoveCapture(){l.state.keyboardActiveRef.current=!1}},s]});return w?_:C.jsx(cE,{elementsRef:m,labelsRef:p?void 0:d,children:_})});process.env.NODE_ENV!=="production"&&(T1.displayName="ComboboxList");const Zm=v.createContext(void 0);process.env.NODE_ENV!=="production"&&(Zm.displayName="ComboboxPortalContext");function YL(){const e=v.useContext(Zm);if(e===void 0)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: <Combobox.Portal> is missing.":Gn(20));return e}const M1=v.forwardRef(function(t,n){const{keepMounted:r=!1,...o}=t,i=xn(),a=X(i,Q.mounted),s=X(i,Q.forceMounted);return a||r||s?C.jsx(Zm.Provider,{value:r,children:C.jsx(XE,{ref:n,...o})}):null});process.env.NODE_ENV!=="production"&&(M1.displayName="ComboboxPortal");const XL=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:a,elements:s,middlewareData:l}=t,{element:u,padding:c=0,offsetParent:f="real"}=or(e,t)||{};if(u==null)return{};const p=km(c),d={x:n,y:r},m=dc(o),g=fc(m),h=await a.getDimensions(u),y=m==="y",b=y?"top":"left",x=y?"bottom":"right",w=y?"clientHeight":"clientWidth",S=i.reference[g]+i.reference[m]-d[m]-i.floating[g],E=d[m]-i.reference[m],O=f==="real"?await a.getOffsetParent?.(u):s.floating;let P=s.floating[w]||i.floating[g];(!P||!await a.isElement?.(O))&&(P=s.floating[w]||i.floating[g]);const N=S/2-E/2,R=P/2-h[g]/2-1,k=Math.min(p[b],R),_=Math.min(p[x],R),T=k,F=P-h[g]-_,V=P/2-h[g]/2+N,D=ql(T,V,F),B=!l.arrow&&Mr(o)!=null&&V!==D&&i.reference[g]/2-(V<T?k:_)-h[g]/2<0,z=B?V<T?V-T:V-F:0;return{[m]:d[m]+z,data:{[m]:D,centerOffset:V-D-z,...B&&{alignmentOffset:z}},reset:B}}}),ZL=(e,t)=>({...XL(e),options:[e,t]}),QL={name:"hide",async fn(e){const{width:t,height:n,x:r,y:o}=e.rects.reference,i=t===0&&n===0&&r===0&&o===0;return{data:{referenceHidden:(await d1().fn(e)).data?.referenceHidden||i}}}},JL={sideX:"left",sideY:"top"};function D1(e,t,n){const r=e==="inline-start"||e==="inline-end";return{top:"top",right:r?n?"inline-start":"inline-end":"right",bottom:"bottom",left:r?n?"inline-end":"inline-start":"left"}[t]}function vb(e,t,n){const{rects:r,placement:o}=e;return{side:D1(t,mn(o),n),align:Mr(o)||"center",anchor:{width:r.reference.width,height:r.reference.height},positioner:{width:r.floating.width,height:r.floating.height}}}function eF(e){const{anchor:t,positionMethod:n="absolute",side:r="bottom",sideOffset:o=0,align:i="center",alignOffset:a=0,collisionBoundary:s,collisionPadding:l=5,sticky:u=!1,arrowPadding:c=5,disableAnchorTracking:f=!1,keepMounted:p=!1,floatingRootContext:d,mounted:m,collisionAvoidance:g,shiftCrossAxis:h=!1,nodeId:y,adaptiveOrigin:b,lazyFlip:x=!1,externalTree:w}=e,[S,E]=v.useState(null);!m&&S!==null&&E(null);const O=g.side||"flip",P=g.align||"flip",N=g.fallbackAxisSide||"end",R=typeof t=="function"?t:void 0,k=de(R),_=R?k:t,T=Pn(t),V=dE()==="rtl",D=S||{top:"top",right:"right",bottom:"bottom",left:"left","inline-end":V?"left":"right","inline-start":V?"right":"left"}[r],B=i==="center"?D:`${D}-${i}`;let z=l;const Y=1,$=r==="bottom"?Y:0,ye=r==="top"?Y:0,ae=r==="right"?Y:0,be=r==="left"?Y:0;typeof z=="number"?z={top:z+$,right:z+be,bottom:z+ye,left:z+ae}:z&&(z={top:(z.top||0)+$,right:(z.right||0)+be,bottom:(z.bottom||0)+ye,left:(z.left||0)+ae});const ne={boundary:s==="clipping-ancestors"?"clippingAncestors":s,padding:z},le=v.useRef(null),Ee=Pn(o),Pe=Pn(a),U=[s1(Ge=>{const Le=vb(Ge,r,V),xe=typeof Ee.current=="function"?Ee.current(Le):Ee.current,Jt=typeof Pe.current=="function"?Pe.current(Le):Pe.current;return{mainAxis:xe,crossAxis:Jt,alignmentAxis:Jt}},[typeof o!="function"?o:0,typeof a!="function"?a:0,V,r])],G=P==="none"&&O!=="shift",I=!G&&(u||h||O==="shift"),W=O==="none"?null:c1({...ne,padding:{top:z.top+Y,right:z.right+Y,bottom:z.bottom+Y,left:z.left+Y},mainAxis:!h&&O==="flip",crossAxis:P==="flip"?"alignment":!1,fallbackAxisSideDirection:N}),H=G?null:l1(Ge=>{const Le=lt(Ge.elements.floating).documentElement;return{...ne,rootBoundary:h?{x:0,y:0,width:Le.clientWidth,height:Le.clientHeight}:void 0,mainAxis:P!=="none",crossAxis:I,limiter:u||h?void 0:u1(xe=>{if(!le.current)return{};const{width:Jt,height:en}=le.current.getBoundingClientRect(),Eo=_n(mn(xe.placement)),wt=Eo==="y"?Jt:en,aa=Eo==="y"?z.left+z.right:z.top+z.bottom;return{offset:wt/2+aa/2}})}},[ne,u,h,z,P]);O==="shift"||P==="shift"||i==="center"?U.push(H,W):U.push(W,H),U.push(f1({...ne,apply({elements:{floating:Ge},rects:{reference:Le},availableWidth:xe,availableHeight:Jt}){const en=Ge.style;en.setProperty("--available-width",`${xe}px`),en.setProperty("--available-height",`${Jt}px`),en.setProperty("--anchor-width",`${Le.width}px`),en.setProperty("--anchor-height",`${Le.height}px`)}}),ZL(()=>({element:le.current||document.createElement("div"),padding:c,offsetParent:"floating"}),[c]),{name:"transformOrigin",fn(Ge){const{elements:Le,middlewareData:xe,placement:Jt,rects:en,y:Eo}=Ge,wt=mn(Jt),aa=_n(wt),rt=le.current,vf=xe.arrow?.x||0,Dn=xe.arrow?.y||0,jt=rt?.clientWidth||0,sa=rt?.clientHeight||0,pi=vf+jt/2,Hr=Dn+sa/2,js=Math.abs(xe.shift?.y||0),Gr=en.reference.height/2,jn=typeof o=="function"?o(vb(Ge,r,V)):o,cn=js>jn,Ie={top:`${pi}px calc(100% + ${jn}px)`,bottom:`${pi}px ${-jn}px`,left:`calc(100% + ${jn}px) ${Hr}px`,right:`${-jn}px ${Hr}px`}[wt],Wr=`${pi}px ${en.reference.y+Gr-Eo}px`;return Le.floating.style.setProperty("--transform-origin",I&&aa==="y"&&cn?Wr:Ie),{}}},QL,b),he(()=>{!m&&d&&d.update({referenceElement:null,floatingElement:null,domReferenceElement:null})},[m,d]);const pe=v.useMemo(()=>({elementResize:!f&&typeof ResizeObserver<"u",layoutShift:!f&&typeof IntersectionObserver<"u"}),[f]),{refs:M,elements:J,x:ee,y:K,middlewareData:te,update:Z,placement:oe,context:ve,isPositioned:Re,floatingStyles:dt}=pL({rootContext:d,placement:B,middleware:U,strategy:n,whileElementsMounted:p?void 0:(...Ge)=>Xp(...Ge,pe),nodeId:y,externalTree:w}),{sideX:Xt,sideY:nt}=te.adaptiveOrigin||JL,$e=Re?n:"fixed",at=v.useMemo(()=>{const Ge=b?{position:$e,[Xt]:ee,[nt]:K}:{position:$e,...dt};return Re||(Ge.opacity=0),Ge},[b,$e,Xt,ee,nt,K,dt,Re]),Zt=v.useRef(null);he(()=>{if(!m)return;const Ge=T.current,Le=typeof Ge=="function"?Ge():Ge,Jt=(yb(Le)?Le.current:Le)||null||null;Jt!==Zt.current&&(M.setPositionReference(Jt),Zt.current=Jt)},[m,M,_,T]),v.useEffect(()=>{if(!m)return;const Ge=T.current;typeof Ge!="function"&&yb(Ge)&&Ge.current!==Zt.current&&(M.setPositionReference(Ge.current),Zt.current=Ge.current)},[m,M,_,T]),v.useEffect(()=>{if(p&&m&&J.domReference&&J.floating)return Xp(J.domReference,J.floating,Z,pe)},[p,m,J,Z,pe]);const Bt=mn(oe),un=D1(r,Bt,V),Dt=Mr(oe)||"center",Qt=!!te.hide?.referenceHidden;he(()=>{x&&m&&Re&&E(Bt)},[x,m,Re,Bt]);const dr=v.useMemo(()=>({position:"absolute",top:te.arrow?.y,left:te.arrow?.x}),[te.arrow]),Mn=te.arrow?.centerOffset!==0;return v.useMemo(()=>({positionerStyles:at,arrowStyles:dr,arrowRef:le,arrowUncentered:Mn,side:un,align:Dt,physicalSide:Bt,anchorHidden:Qt,refs:M,context:ve,isPositioned:Re,update:Z}),[at,dr,le,Mn,un,Dt,Bt,Qt,M,ve,Re,Z])}function yb(e){return e!=null&&"current"in e}function j1(e){return e==="starting"?wj:Gt}const $1=v.forwardRef(function(t,n){const{render:r,className:o,anchor:i,positionMethod:a="absolute",side:s="bottom",align:l="center",sideOffset:u=0,alignOffset:c=0,collisionBoundary:f="clipping-ancestors",collisionPadding:p=5,arrowPadding:d=5,sticky:m=!1,disableAnchorTracking:g=!1,collisionAvoidance:h=Sj,...y}=t,b=xn(),{filteredItems:x}=xo(),w=vc(),S=YL(),E=X(b,Q.modal),O=X(b,Q.open),P=X(b,Q.mounted),N=X(b,Q.openMethod),R=X(b,Q.triggerElement),k=X(b,Q.inputElement),_=X(b,Q.inputInsidePopup),T=X(b,Q.transitionStatus),F=x.length===0,D=eF({anchor:i??(_?R:k),floatingRootContext:w,positionMethod:a,mounted:P,side:s,sideOffset:u,align:l,alignOffset:c,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:m,disableAnchorTracking:g,keepMounted:S,collisionAvoidance:h,lazyFlip:!0});D2(O&&E&&N!=="touch",R);const B=v.useMemo(()=>{const ae={...D.positionerStyles};return O||(ae.pointerEvents="none"),{role:"presentation",hidden:!P,style:ae}},[O,P,D.positionerStyles]),z={open:O,side:D.side,align:D.align,anchorHidden:D.anchorHidden,empty:F};he(()=>{b.set("popupSide",D.side)},[b,D.side]);const Y=v.useMemo(()=>({side:D.side,align:D.align,arrowRef:D.arrowRef,arrowUncentered:D.arrowUncentered,arrowStyles:D.arrowStyles,anchorHidden:D.anchorHidden,isPositioned:D.isPositioned}),[D.side,D.align,D.arrowRef,D.arrowUncentered,D.arrowStyles,D.anchorHidden,D.isPositioned]),$=de(ae=>{b.set("positionerElement",ae)}),ye=Kt("div",t,{state:z,ref:[n,$],props:[B,j1(T),y],stateAttributesMapping:y1});return C.jsxs(qm.Provider,{value:Y,children:[P&&E&&C.jsx(b1,{inert:RL(!O),cutout:k??R}),ye]})});process.env.NODE_ENV!=="production"&&($1.displayName="ComboboxPositioner");const tF={...y1,...xE},L1=v.forwardRef(function(t,n){const{render:r,className:o,initialFocus:i,finalFocus:a,...s}=t,l=xn(),u=Km(),c=vc(),{filteredItems:f}=xo(),p=X(l,Q.mounted),d=X(l,Q.open),m=X(l,Q.openMethod),g=X(l,Q.transitionStatus),h=X(l,Q.inputInsidePopup),y=X(l,Q.inputElement),b=f.length===0;Nm({open:d,ref:l.state.popupRef,onComplete(){d&&l.state.onOpenChangeComplete(!0)}});const x={open:d,side:u.side,align:u.align,anchorHidden:u.anchorHidden,transitionStatus:g,empty:b},w=Kt("div",t,{state:x,ref:[n,l.state.popupRef],props:[{role:h?"dialog":"presentation",tabIndex:-1,onFocus(P){const N=nn(P.nativeEvent);m!=="touch"&&(Me(l.state.listElement,N)||N===P.currentTarget)&&l.state.inputRef.current?.focus()}},j1(g),s],stateAttributesMapping:tF}),E=i===void 0?h?P=>P==="touch"?l.state.popupRef.current:y:!1:i;let O;return a!=null?O=a:O=h?void 0:!1,C.jsx(K2,{context:c,disabled:!p,modal:!h,openInteractionType:m,initialFocus:E,returnFocus:O,children:w})});process.env.NODE_ENV!=="production"&&(L1.displayName="ComboboxPopup");const Qm=v.createContext(void 0);process.env.NODE_ENV!=="production"&&(Qm.displayName="ComboboxGroupContext");function nF(){const e=v.useContext(Qm);if(e===void 0)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: ComboboxGroupContext is missing. ComboboxGroup parts must be placed within <Combobox.Group>.":Gn(18));return e}const F1=v.forwardRef(function(t,n){const{render:r,className:o,items:i,...a}=t,[s,l]=v.useState(),u=v.useMemo(()=>({labelId:s,setLabelId:l,items:i}),[s,l,i]),c=Kt("div",t,{ref:n,props:[{role:"group","aria-labelledby":s},a]}),f=C.jsx(Qm.Provider,{value:u,children:c});return i?C.jsx(KL,{items:i,children:f}):f});process.env.NODE_ENV!=="production"&&(F1.displayName="ComboboxGroup");const V1=v.forwardRef(function(t,n){const{render:r,className:o,id:i,...a}=t,{setLabelId:s}=nF(),l=Sm(i);return he(()=>(s(l),()=>{s(void 0)}),[l,s]),Kt("div",t,{ref:n,props:[{id:l},a]})});process.env.NODE_ENV!=="production"&&(V1.displayName="ComboboxGroupLabel");const z1=v.createContext(void 0);process.env.NODE_ENV!=="production"&&(z1.displayName="ComboboxItemContext");const B1=v.createContext(!1);process.env.NODE_ENV!=="production"&&(B1.displayName="ComboboxRowContext");function rF(){return v.useContext(B1)}const H1=v.memo(v.forwardRef(function(t,n){const{render:r,className:o,value:i=null,index:a,disabled:s=!1,nativeButton:l=!1,...u}=t,c=v.useRef(!1),f=v.useRef(null),p=SE({index:a,textRef:f,indexGuessBehavior:CE.GuessFromOrder}),d=xn(),m=rF(),{flatFilteredItems:g,hasItems:h}=xo(),y=X(d,Q.open),b=X(d,Q.selectionMode),x=X(d,Q.readOnly),w=X(d,Q.virtualized),S=X(d,Q.isItemEqualToValue),E=b!=="none",O=a??(w?ru(g,i,S):p.index),P=p.index!==-1,N=X(d,Q.id),R=X(d,Q.isActive,O),k=X(d,Q.isSelected,i),_=X(d,Q.getItemProps),T=v.useRef(null),F=N!=null&&P?`${N}-${O}`:void 0,V=k&&E;he(()=>{if(!(P&&(w||a!=null)))return;const le=d.state.listRef.current;return le[O]=T.current,()=>{delete le[O]}},[P,w,O,a,d]),he(()=>{if(!P||h)return;const ne=d.state.valuesRef.current;return ne[O]=i,b!=="none"&&d.state.allValuesRef.current.push(i),()=>{delete ne[O]}},[P,h,O,i,d,b]),he(()=>{if(!y){c.current=!1;return}if(!P||h)return;const ne=d.state.selectedValue,le=Array.isArray(ne)?ne[ne.length-1]:ne;Ko(i,le,S)&&d.set("selectedIndex",O)},[P,h,y,d,O,i,S]);const D={disabled:s,selected:V,highlighted:R},B=_({active:R,selected:V});B.id=void 0,B.onFocus=void 0;const{getButtonProps:z,buttonRef:Y}=cc({disabled:s,focusableWhenDisabled:!0,native:l});function $(ne){function le(){d.state.handleSelection(ne,i)}d.state.submitOnItemClick?(go.flushSync(le),d.state.requestSubmit()):le()}const ye={id:F,role:m?"gridcell":"option","aria-selected":E?V:void 0,tabIndex:void 0,onPointerDownCapture(ne){c.current=!0,ne.preventDefault()},onClick(ne){s||x||$(ne.nativeEvent)},onMouseUp(ne){const le=c.current;c.current=!1,!(s||x||ne.button!==0||le||!R)&&$(ne.nativeEvent)}},ae=Kt("div",t,{ref:[Y,n,p.ref,T],state:D,props:[B,ye,u,z]}),be=v.useMemo(()=>({selected:V,textRef:f}),[V,f]);return C.jsx(z1.Provider,{value:be,children:ae})}));process.env.NODE_ENV!=="production"&&(H1.displayName="ComboboxItem");const G1=v.forwardRef(function(t,n){const{render:r,className:o,children:i,...a}=t,{filteredItems:s}=xo(),l=xn(),u=s.length===0?i:null;return Kt("div",t,{ref:[n,l.state.emptyRef],props:[{children:u,role:"status","aria-live":"polite","aria-atomic":!0},a]})});process.env.NODE_ENV!=="production"&&(G1.displayName="ComboboxEmpty");const W1=v.forwardRef(function(t,n){const{className:r,render:o,orientation:i="horizontal",...a}=t;return Kt("div",t,{state:{orientation:i},ref:n,props:[{role:"separator","aria-orientation":i},a]})});process.env.NODE_ENV!=="production"&&(W1.displayName="Separator");function oF(e){const{multiple:t=!1,defaultValue:n,value:r,onValueChange:o,autoComplete:i,...a}=e;return C.jsx(GL,{...a,selectionMode:t?"multiple":"single",selectedValue:r,defaultSelectedValue:n,onSelectedValueChange:o,formAutoComplete:i})}function iF(e){const{children:t,placeholder:n}=e,r=xn(),o=X(r,Q.itemToStringLabel),i=X(r,Q.selectedValue),a=X(r,Q.items),s=X(r,Q.selectionMode)==="multiple",l=X(r,Q.hasSelectedValue),u=!l&&n!=null&&t==null,c=X(r,Q.hasNullItemLabel,u);let f=null;return typeof t=="function"?f=t(i):t!=null?f=t:!l&&n!=null&&!c?f=n:s&&Array.isArray(i)?f=DL(i,a,o):f=x1(i,a,o),C.jsx(v.Fragment,{children:f})}const U1=v.forwardRef(function(t,n){const{render:r,className:o,...i}=t,a=xn(),s=X(a,Q.open),l=X(a,Q.hasSelectionChips),[u,c]=v.useState(void 0);s&&u!==void 0&&c(void 0);const f=v.useRef([]),p=Kt("div",t,{ref:[n,a.state.chipsContainerRef],props:[l?{role:"toolbar"}:Gt,i]}),d=v.useMemo(()=>({highlightedChipIndex:u,setHighlightedChipIndex:c,chipsRef:f}),[u,c,f]);return C.jsx(Um.Provider,{value:d,children:C.jsx(cE,{elementsRef:f,children:p})})});process.env.NODE_ENV!=="production"&&(U1.displayName="ComboboxChips");const Jm=v.createContext(void 0);process.env.NODE_ENV!=="production"&&(Jm.displayName="ComboboxChipContext");function aF(){const e=v.useContext(Jm);if(!e)throw new Error(process.env.NODE_ENV!=="production"?"useComboboxChipContext must be used within a ComboboxChip":Gn(17));return e}const q1=v.forwardRef(function(t,n){const{render:r,className:o,...i}=t,a=xn(),{setHighlightedChipIndex:s,chipsRef:l}=I1(),u=X(a,Q.disabled),c=X(a,Q.readOnly),f=X(a,Q.selectedValue),{ref:p,index:d}=SE();function m(b){let x=d;if(b.key==="ArrowLeft")b.preventDefault(),d>0?x=d-1:x=void 0;else if(b.key==="ArrowRight")b.preventDefault(),d<f.length-1?x=d+1:x=void 0;else if(b.key==="Backspace"||b.key==="Delete"){const w=d>=f.length-1?f.length-2:d;x=w>=0?w:void 0,Ze(b),a.state.setIndices({activeIndex:null,selectedIndex:null,type:"keyboard"}),a.state.setSelectedValue(f.filter((S,E)=>E!==d),Oe(On,b.nativeEvent))}else b.key==="Enter"||b.key===" "?(Ze(b),x=void 0):b.key==="ArrowDown"||b.key==="ArrowUp"?(Ze(b),a.state.setOpen(!0,Oe(Na,b.nativeEvent)),x=void 0):b.key.length===1&&!b.ctrlKey&&!b.metaKey&&!b.altKey&&(x=void 0);return x}const h=Kt("div",t,{ref:[n,p],state:{disabled:u},props:[{tabIndex:-1,"aria-disabled":u||void 0,"aria-readonly":c||void 0,onKeyDown(b){if(u||c)return;const x=m(b);go.flushSync(()=>{s(x)}),x===void 0?a.state.inputRef.current?.focus():l.current[x]?.focus()},onMouseDown(b){c||(b.preventDefault(),!u&&a.state.inputRef.current?.focus())}},i]}),y=v.useMemo(()=>({index:d}),[d]);return C.jsx(Jm.Provider,{value:y,children:h})});process.env.NODE_ENV!=="production"&&(q1.displayName="ComboboxChip");const K1=v.forwardRef(function(t,n){const{render:r,className:o,disabled:i=!1,nativeButton:a=!0,...s}=t,l=xn(),{index:u}=aF(),c=X(l,Q.disabled),f=X(l,Q.readOnly),p=X(l,Q.selectedValue),d=X(l,Q.isItemEqualToValue),m=c||i,{buttonRef:g,getButtonProps:h}=cc({native:a,disabled:m||f,focusableWhenDisabled:!0}),y={disabled:m};function b(S){const E=l.state.activeIndex;if(E==null)return;const O=ru(l.state.valuesRef.current,S,d);O!==-1&&E===O&&l.state.setIndices({activeIndex:null,type:l.state.keyboardActiveRef.current?"keyboard":"pointer"})}function x(S){const E=Oe(kj,S.nativeEvent),O=p[u];return b(O),l.state.setSelectedValue(p.filter((P,N)=>N!==u),E),l.state.inputRef.current?.focus(),E}return Kt("button",t,{ref:[n,g],state:y,props:[{tabIndex:-1,onClick(S){if(m||f)return;x(S).isPropagationAllowed||S.stopPropagation()},onKeyDown(S){m||f||(S.key==="Enter"||S.key===" ")&&(x(S).isPropagationAllowed||Ze(S))}},s,h]})});process.env.NODE_ENV!=="production"&&(K1.displayName="ComboboxChipRemove");var sF=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],yc=sF.reduce((e,t)=>{const n=HS(`Primitive.${t}`),r=v.forwardRef((o,i)=>{const{asChild:a,...s}=o,l=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),C.jsx(l,{...s,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),lF="Label",Y1=v.forwardRef((e,t)=>C.jsx(yc.label,{...e,ref:t,onMouseDown:n=>{n.target.closest("button, input, select, textarea")||(e.onMouseDown?.(n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));Y1.displayName=lF;var X1=Y1;const uF=Ve(vt("body-sm-regular")),Ha=({className:e,ref:t,...n})=>C.jsx(X1,{ref:t,className:q(uF(),e),...n});Ha.displayName=X1.displayName;var cF="Separator",bb="horizontal",fF=["horizontal","vertical"],Z1=v.forwardRef((e,t)=>{const{decorative:n,orientation:r=bb,...o}=e,i=dF(r)?r:bb,s=n?{role:"none"}:{"aria-orientation":i==="vertical"?i:void 0,role:"separator"};return C.jsx(yc.div,{"data-orientation":i,...s,...o,ref:t})});Z1.displayName=cF;function dF(e){return fF.includes(e)}var Q1=Z1;const eg=({className:e,orientation:t="horizontal",decorative:n=!0,ref:r,...o})=>C.jsx(Q1,{ref:r,decorative:n,orientation:t,className:q("bg-delicate-border shrink-0",t==="horizontal"?"h-px w-full":"h-full w-px",e),...o});eg.displayName=Q1.displayName;const pF=Ve("group/field data-[invalid=true]:text-error-text flex h-full w-full gap-2",{variants:{orientation:{vertical:["flex-col"],horizontal:["flex-row items-center","*:data-[slot=field-label]:flex-auto",`has-[>[data-slot=field-content]]:items-start
36
+ has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px`]}},defaultVariants:{orientation:"vertical"}}),hF="flex flex-col gap-6 has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3",mF="mb-3 font-medium data-[variant=legend]:text-base data-[variant=label]:text-sm",gF="group/field-group @container/field-group flex w-full flex-col gap-7 data-[slot=checkbox-group]:gap-3 *:data-[slot=field-group]:gap-4",vF="group/field-content flex flex-1 flex-col gap-2",yF=[`group/field-label peer/field-label text-primary-text flex w-fit gap-2 text-sm
37
37
  leading-[150%] font-normal tracking-normal
38
38
  group-data-[disabled=true]/field:opacity-50`,"aria-invalid:text-error-text aria-valid:text-success-text disabled:text-disabled-text",`has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col
39
39
  has-[>[data-slot=field]]:rounded-md has-[>[data-slot=field]]:border
40
40
  *:data-[slot=field]:p-4`,`has-data-[state=checked]:bg-primary/5 has-data-[state=checked]:border-primary
41
- dark:has-data-[state=checked]:bg-primary/10`].join(" "),bw=[`text-primary-text flex w-fit items-center gap-2
42
- group-data-[disabled=true]/field:opacity-50`,qe("body-sm-regular")].join(" "),vw=["text-sub-label-text group-has-data-[orientation=horizontal]/field:text-balance","aria-invalid:text-error-text aria-valid:text-success-text disabled:text-disabled-text",qe("body-xs-regular"),"last:mt-0 nth-last-2:-mt-1 [[data-variant=legend]+&]:-mt-1.5","[&>a:hover]:text-primary-text [&>a]:underline [&>a]:underline-offset-4"].join(" "),xw="relative -my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2",yw="absolute inset-0 top-1/2",Cw="bg-background text-muted-foreground relative mx-auto block w-fit px-2",ww="ml-4 flex list-disc flex-col gap-1",Sw="text-error-text text-xs leading-[140%] font-normal tracking-normal";function Ko({className:e,...t}){return v.jsx("fieldset",{"data-slot":"field-set",className:L(fw,e,"min-w-0 flex-1 w-full"),...t})}function Rw({className:e,variant:t="legend",...n}){return v.jsx("legend",{"data-slot":"field-legend","data-variant":t,className:L(pw,e),...n})}function wr({className:e,...t}){return v.jsx("div",{"data-slot":"field-group",className:L(gw,e),...t})}function Sr({className:e,orientation:t="vertical",...n}){return v.jsx("div",{role:"group","data-slot":"field","data-orientation":t,className:L(dw({orientation:t}),e),...n})}function Ew({className:e,...t}){return v.jsx("div",{"data-slot":"field-content",className:L(mw,e),...t})}function Kn({className:e,...t}){return v.jsx(br,{"data-slot":"field-label",className:L(hw,e),...t})}function Iw({className:e,...t}){return v.jsx("div",{"data-slot":"field-label",className:L(bw,e),...t})}function Rr({className:e,...t}){return v.jsx("p",{"data-slot":"field-description",className:L(vw,e),...t})}function kw({children:e,className:t,...n}){return v.jsxs("div",{"data-slot":"field-separator","data-content":!!e,className:L(xw,t),...n,children:[v.jsx(Ca,{className:yw}),e&&v.jsx("span",{className:Cw,"data-slot":"field-separator-content",children:e})]})}function rf({className:e,children:t,errors:n,...r}){const o=Te.useMemo(()=>t||(n?n.length===1&&n[0]?.message?n[0].message:v.jsx("ul",{className:ww,children:n.map(s=>s?.message?v.jsx("li",{children:s.message},s.message):null)}):null),[t,n]);return o?v.jsx("div",{role:"alert","data-slot":"field-error",className:L(Sw,e),...r,children:o}):null}const Nw=_e(`text-primary-text hover:border-inp-hover-border focus:border-inp-focus-border
41
+ dark:has-data-[state=checked]:bg-primary/10`].join(" "),bF=[`text-primary-text flex w-fit items-center gap-2
42
+ group-data-[disabled=true]/field:opacity-50`,vt("body-sm-regular")].join(" "),xF=["text-sub-label-text group-has-data-[orientation=horizontal]/field:text-balance","aria-invalid:text-error-text aria-valid:text-success-text disabled:text-disabled-text",vt("body-xs-regular"),"last:mt-0 nth-last-2:-mt-1 [[data-variant=legend]+&]:-mt-1.5","[&>a:hover]:text-primary-text [&>a]:underline [&>a]:underline-offset-4"].join(" "),wF="relative -my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2",CF="absolute inset-0 top-1/2",SF="bg-background text-muted-foreground relative mx-auto block w-fit px-2",EF="ml-4 flex list-disc flex-col gap-1",OF="text-error-text text-xs leading-[140%] font-normal tracking-normal";function bc({className:e,...t}){return C.jsx("fieldset",{"data-slot":"field-set",className:q(hF,e,"min-w-0 flex-1 w-full"),...t})}function PF({className:e,variant:t="legend",...n}){return C.jsx("legend",{"data-slot":"field-legend","data-variant":t,className:q(mF,e),...n})}function us({className:e,...t}){return C.jsx("div",{"data-slot":"field-group",className:q(gF,e),...t})}function cs({className:e,orientation:t="vertical",...n}){return C.jsx("div",{role:"group","data-slot":"field","data-orientation":t,className:q(pF({orientation:t}),e),...n})}function _F({className:e,...t}){return C.jsx("div",{"data-slot":"field-content",className:q(vF,e),...t})}function Yi({className:e,...t}){return C.jsx(Ha,{"data-slot":"field-label",className:q(yF,e),...t})}function AF({className:e,...t}){return C.jsx("div",{"data-slot":"field-label",className:q(bF,e),...t})}function fs({className:e,...t}){return C.jsx("p",{"data-slot":"field-description",className:q(xF,e),...t})}function RF({children:e,className:t,...n}){return C.jsxs("div",{"data-slot":"field-separator","data-content":!!e,className:q(wF,t),...n,children:[C.jsx(eg,{className:CF}),e&&C.jsx("span",{className:SF,"data-slot":"field-separator-content",children:e})]})}function J1({className:e,children:t,errors:n,...r}){const o=A.useMemo(()=>t||(n?n.length===1&&n[0]?.message?n[0].message:C.jsx("ul",{className:EF,children:n.map(i=>i?.message?C.jsx("li",{children:i.message},i.message):null)}):null),[t,n]);return o?C.jsx("div",{role:"alert","data-slot":"field-error",className:q(OF,e),...r,children:o}):null}const IF=Ve(`text-primary-text hover:border-inp-hover-border focus:border-inp-focus-border
43
43
  placeholder:text-placeholder-text disabled:border-inp-disabled-border bg-primary-bg
44
44
  disabled:bg-disabled-bg disabled:text-disabled-text
45
45
  disabled:placeholder:text-disabled-text aria-invalid:border-error-text
46
46
  aria-valid:border-success-text w-full rounded-xl border px-3 py-2.5 tracking-normal
47
47
  placeholder:text-sm focus:outline-none focus-visible:ring-0
48
- disabled:pointer-events-none`,{variants:{variant:{primary:"border-inp-default-border"},sizeInput:{lg:"h-12 text-base",md:"h-10 text-sm",sm:"h-8 text-sm",xs:"h-6 text-xs"}},defaultVariants:{variant:"primary",sizeInput:"md"}}),wa=({className:e,sizeInput:t,type:n,variant:r,...o})=>v.jsx("input",{"data-slot":"input",type:n||"text",className:L(Nw({variant:r,sizeInput:t}),e),...o}),Pw=[`border-inp-default-border bg-primary-bg text-primary-text flex h-31 w-full
48
+ disabled:pointer-events-none`,{variants:{variant:{primary:"border-inp-default-border"},sizeInput:{lg:"h-12 text-base",md:"h-10 text-sm",sm:"h-8 text-sm",xs:"h-6 text-xs"}},defaultVariants:{variant:"primary",sizeInput:"md"}}),tg=({className:e,sizeInput:t,type:n,variant:r,...o})=>C.jsx("input",{"data-slot":"input",type:n||"text",className:q(IF({variant:r,sizeInput:t}),e),...o}),kF=[`border-inp-default-border bg-primary-bg text-primary-text flex h-31 w-full
49
49
  resize-none rounded-xl border px-3 py-2.5 text-sm`,"hover:border-inp-hover-border focus:border-inp-focus-border focus:outline-none","placeholder:text-placeholder-text placeholder:text-sm",`disabled:border-inp-disabled-border disabled:bg-disabled-bg
50
50
  disabled:text-disabled-text disabled:placeholder:text-disabled-text
51
- aria-invalid:border-error-text`].join(" "),Yo=e=>v.jsx("textarea",{className:L(Pw,e.className),...e});Yo.displayName="Textarea";const Ow=_e(`text-secondary-text group-data-[disabled=true]/input-group:text-disabled-text flex
51
+ aria-invalid:border-error-text`].join(" "),xc=e=>C.jsx("textarea",{className:q(kF,e.className),...e});xc.displayName="Textarea";const NF=Ve(`text-secondary-text group-data-[disabled=true]/input-group:text-disabled-text flex
52
52
  h-auto shrink-0 cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium
53
53
  select-none [&>kbd]:rounded-[calc(var(--radius)-5px)]
54
54
  [&>svg:not([class*='size-'])]:size-4`,{variants:{align:{"inline-start":"order-first pl-3 has-[>button]:ml-[-0.45rem] has-[>kbd]:ml-[-0.35rem]","inline-end":"order-last pr-3 has-[>button]:mr-[-0.4rem] has-[>kbd]:mr-[-0.35rem]","block-start":`order-first w-full justify-start px-3 pt-3
55
55
  group-has-[>input]/input-group:pt-2.5 [.border-b]:pb-3`,"block-end":`order-last w-full justify-start px-3 pb-3
56
- group-has-[>input]/input-group:pb-2.5 [.border-t]:pt-3`}},defaultVariants:{align:"inline-start"}}),_w=_e("flex items-center gap-2 text-sm shadow-none",{variants:{size:{xs:`h-6 gap-1 rounded-[calc(var(--radius)-5px)] px-2 has-[>svg]:px-2
57
- [&>svg:not([class*='size-'])]:size-3.5`,sm:"h-8 gap-1.5 rounded-md px-2.5 has-[>svg]:px-2.5","icon-xs":"size-6 rounded-[calc(var(--radius)-5px)] p-0 has-[>svg]:p-0","icon-sm":"size-8 p-0 has-[>svg]:p-0"}},defaultVariants:{size:"xs"}});function Sa({className:e,...t}){return v.jsx("div",{"data-slot":"input-group",role:"group",className:L(`group/input-group border-inp-default-border bg-primary-bg relative flex w-full
56
+ group-has-[>input]/input-group:pb-2.5 [.border-t]:pt-3`}},defaultVariants:{align:"inline-start"}}),TF=Ve("flex items-center gap-2 text-sm shadow-none",{variants:{size:{xs:`h-6 gap-1 rounded-[calc(var(--radius)-5px)] px-2 has-[>svg]:px-2
57
+ [&>svg:not([class*='size-'])]:size-3.5`,sm:"h-8 gap-1.5 rounded-md px-2.5 has-[>svg]:px-2.5","icon-xs":"size-6 rounded-[calc(var(--radius)-5px)] p-0 has-[>svg]:p-0","icon-sm":"size-8 p-0 has-[>svg]:p-0"}},defaultVariants:{size:"xs"}});function ng({className:e,...t}){return C.jsx("div",{"data-slot":"input-group",role:"group",className:q(`group/input-group border-inp-default-border bg-primary-bg relative flex w-full
58
58
  items-center rounded-xl border transition-[color,box-shadow] outline-none`,"h-10 has-[>textarea]:h-auto","hover:border-inp-hover-border","has-[>[data-align=inline-start]]:[&>input]:pl-2","has-[>[data-align=inline-end]]:[&>input]:pr-2",`has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col
59
59
  has-[>[data-align=block-start]]:[&>input]:pb-3`,`has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col
60
60
  has-[>[data-align=block-end]]:[&>input]:pt-3`,`has-[[data-slot=input-group-control]:focus-visible]:ring-inp-focus-border/20
61
61
  has-[[data-slot=input-group-control]:focus-visible]:border-inp-focus-border`,"has-[[data-slot=input-group-control][aria-invalid=true]]:border-error-text","has-[[data-slot=input-group-control][aria-valid=true]]:border-success-text",`has-[[data-slot=input-group-control][disabled]]:border-inp-disabled-border
62
62
  has-[[data-slot=input-group-control][disabled]]:bg-disabled-bg
63
63
  has-[[data-slot=input-group-control][disabled]]:text-disabled-text
64
- has-[[data-slot=input-group-control][disabled]]:[&_svg]:text-disabled-text`,e),...t})}function Ra({className:e,align:t="inline-start",...n}){return v.jsx("div",{role:"group","data-slot":"input-group-addon","data-align":t,className:L(Ow({align:t}),e),onClick:r=>{r.target.closest("button")||r.currentTarget.parentElement?.querySelector("input")?.focus()},...n})}function of({className:e,type:t="button",variant:n="primary",size:r="xs",...o}){return v.jsx(Bt,{type:t,"data-size":r,variant:n,className:L(_w({size:r}),e),...o})}function Aw({className:e,...t}){return v.jsx("span",{className:L(`text-secondary-text flex items-center gap-2 text-sm [&_svg]:pointer-events-none
65
- [&_svg:not([class*='size-'])]:size-4`,e),...t})}function Ea(e){return v.jsx(wa,{"data-slot":"input-group-control",className:L(`w-0 min-w-0 flex-1 rounded-none border-0 bg-transparent shadow-none
64
+ has-[[data-slot=input-group-control][disabled]]:[&_svg]:text-disabled-text`,e),...t})}function rg({className:e,align:t="inline-start",...n}){return C.jsx("div",{role:"group","data-slot":"input-group-addon","data-align":t,className:q(NF({align:t}),e),onClick:r=>{r.target.closest("button")||r.currentTarget.parentElement?.querySelector("input")?.focus()},...n})}function eO({className:e,type:t="button",variant:n="primary",size:r="xs",...o}){return C.jsx(wr,{type:t,"data-size":r,variant:n,className:q(TF({size:r}),e),...o})}function MF({className:e,...t}){return C.jsx("span",{className:q(`text-secondary-text flex items-center gap-2 text-sm [&_svg]:pointer-events-none
65
+ [&_svg:not([class*='size-'])]:size-4`,e),...t})}function og(e){return C.jsx(tg,{"data-slot":"input-group-control",className:q(`w-0 min-w-0 flex-1 rounded-none border-0 bg-transparent shadow-none
66
66
  focus-visible:ring-0 disabled:border-0 disabled:bg-transparent
67
- dark:bg-transparent`,e.className),...e})}function Tw({className:e,...t}){return v.jsx(Yo,{"data-slot":"input-group-control",className:L(`flex-1 resize-none rounded-none border-0 bg-transparent py-3 shadow-none
67
+ dark:bg-transparent`,e.className),...e})}function DF({className:e,...t}){return C.jsx(xc,{"data-slot":"input-group-control",className:q(`flex-1 resize-none rounded-none border-0 bg-transparent py-3 shadow-none
68
68
  focus-visible:ring-0 disabled:border-0 disabled:bg-transparent
69
- dark:bg-transparent`,e),...t})}const Mw=`absolute top-1/2 right-3 z-10 -translate-y-1/2
70
- cursor-pointer focus-visible:border-0 focus-visible:ring-0 focus-visible:outline-none`,Dw=_e("text-primary-text pointer-events-none transition-colors",{variants:{disabled:{true:"text-disabled-text",false:""}},defaultVariants:{disabled:!1}}),sf=`h-full rounded-none border-0 bg-transparent p-0
69
+ dark:bg-transparent`,e),...t})}const jF=`absolute top-1/2 right-3 z-10 -translate-y-1/2
70
+ cursor-pointer focus-visible:border-0 focus-visible:ring-0 focus-visible:outline-none`,$F=Ve("text-primary-text pointer-events-none transition-colors",{variants:{disabled:{true:"text-disabled-text",false:""}},defaultVariants:{disabled:!1}}),tO=`h-full rounded-none border-0 bg-transparent p-0
71
71
  pr-1.5 shadow-none hover:bg-transparent hover:shadow-none focus:bg-transparent
72
- focus:shadow-none`,Fw="pointer-events-none",Vw=`has-[[data-slot=input-group-control]:focus-visible]:border-inp-focus-border
72
+ focus:shadow-none`,LF="pointer-events-none",FF=`has-[[data-slot=input-group-control]:focus-visible]:border-inp-focus-border
73
73
  has-[[data-slot=combobox-trigger]:focus-visible]:border-inp-focus-border px-0
74
74
  has-[[data-slot=combobox-trigger]:focus-visible]:ring-0
75
75
  has-[[data-slot=combobox-trigger]:focus-visible]:outline-none
76
76
  has-[[data-slot=input-group-control]:focus-visible]:ring-0
77
- has-[[data-slot=input-group-control]:focus-visible]:outline-none`,Lw="cursor-pointer",jw="isolate z-50",$w=`bg-primary-bg text-primary-text data-open:animate-in
77
+ has-[[data-slot=input-group-control]:focus-visible]:outline-none`,VF="cursor-pointer",zF="isolate z-50",BF=`bg-primary-bg text-primary-text data-open:animate-in
78
78
  data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0
79
79
  data-closed:zoom-out-95 data-open:zoom-in-95 data-[side=bottom]:slide-in-from-top-2
80
80
  data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2
@@ -84,11 +84,11 @@ border-inp-focus-border absolute max-h-63 w-(--anchor-width) min-w-(--anchor-wid
84
84
  origin-(--transform-origin) overflow-auto rounded-xl border pl-0
85
85
  shadow-[0px_4px_12px_0px_rgba(0,0,0,0.1)] duration-100 *:data-[slot=input-group]:m-1
86
86
  *:data-[slot=input-group]:mb-0 *:data-[slot=input-group]:h-8
87
- *:data-[slot=input-group]:shadow-none`,zw=`text-primary-text data-disabled:text-disabled-text
87
+ *:data-[slot=input-group]:shadow-none`,HF=`text-primary-text data-disabled:text-disabled-text
88
88
  data-highlighted:bg-primary-hover-bg relative flex w-full cursor-pointer items-center gap-2
89
89
  text-sm outline-none select-none data-disabled:pointer-events-none
90
- [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,Gw="text-secondary-text px-4 py-2 text-xs",Hw=`text-secondary-text hidden w-full justify-center py-2
91
- text-center text-sm group-data-empty/combobox-content:flex`,Bw="bg-delicate-border -mx-1 my-1 h-px",Ww=_e(`border-inp-default-border bg-primary-bg text-primary-text hover:border-inp-hover-border
90
+ [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,GF="text-secondary-text px-4 py-2 text-xs",WF=`text-secondary-text hidden w-full justify-center py-2
91
+ text-center text-sm group-data-empty/combobox-content:flex`,UF="bg-delicate-border -mx-1 my-1 h-px",qF=Ve(`border-inp-default-border bg-primary-bg text-primary-text hover:border-inp-hover-border
92
92
  has-aria-invalid:border-error-text has-aria-valid:border-success-text
93
93
  has-aria-invalid:ring-error-text/20 focus-within:border-inp-focus-border relative flex
94
94
  min-h-10 w-full flex-wrap items-center gap-1 rounded-xl border bg-clip-padding py-1.5
@@ -96,74 +96,133 @@ text-center text-sm group-data-empty/combobox-content:flex`,Bw="bg-delicate-bord
96
96
  focus-within:outline-none disabled:pointer-events-none
97
97
  has-data-[slot=combobox-chip]:pl-1`,{variants:{disabled:{true:`border-inp-disabled-border bg-disabled-bg text-disabled-text
98
98
  hover:border-inp-disabled-border [&_input]:text-disabled-text
99
- [&_input::placeholder]:text-disabled-text [&_svg]:text-disabled-text`,false:""}},defaultVariants:{disabled:!1}}),Uw=`text-primary-text flex items-center justify-center
99
+ [&_input::placeholder]:text-disabled-text [&_svg]:text-disabled-text`,false:""}},defaultVariants:{disabled:!1}}),KF=`text-primary-text flex items-center justify-center
100
100
  px-1.5 text-xs font-medium whitespace-nowrap has-disabled:pointer-events-none
101
101
  has-disabled:cursor-not-allowed has-disabled:opacity-50
102
- has-data-[slot=combobox-chip-remove]:pr-0`,qw=_e(`text-primary-text placeholder:text-placeholder-text disabled:text-disabled-text
103
- disabled:placeholder:text-disabled-text min-w-16 flex-1 outline-none`,{variants:{disabled:{true:"flex-1 p-0",false:""}},defaultVariants:{disabled:!1}}),Xo=u.createContext(null);function af({children:e,...t}){const[n,r]=u.useState(null),o=u.useMemo(()=>({anchorElement:n,setAnchorElement:r}),[n]);return v.jsx(Xo,{value:o,children:v.jsx(nw,{...t,children:e})})}function lf({className:e,label:t,description:n,error:r,children:o,...s}){return v.jsxs(Sr,{className:e,...s,children:[t&&v.jsx(Kn,{children:t}),o,n&&v.jsx(Rr,{children:n}),r&&v.jsx(rf,{children:r})]})}function bi({...e}){return v.jsx(rw,{"data-slot":"combobox-value",...e})}function ko({className:e,children:t,...n}){return v.jsxs(Td,{"data-slot":"combobox-trigger",className:L(Mw,e),...n,children:[t,v.jsx(Ut,{type:"chevron",className:L(Dw({disabled:n.disabled})),size:"md"})]})}function Kw({className:e,...t}){return v.jsx(Dd,{"data-slot":"combobox-clear",className:L(e),...t,render:v.jsx(of,{variant:"link",size:"icon-xs",className:sf,children:v.jsx(Ut,{className:Fw,type:"close"})})})}function Yw({className:e,children:t,disabled:n=!1,showTrigger:r=!0,showClear:o=!1,...s}){const i=u.use(Xo),a=u.useCallback(l=>{i&&i.setAnchorElement(c=>c===l?c:l)},[i]);return v.jsxs(Sa,{ref:a,className:L(Vw,e),children:[v.jsx(ha,{render:v.jsx(Ea,{disabled:n}),...s}),v.jsxs(Ra,{align:"inline-end",className:Lw,children:[r&&v.jsx(ko,{}),o&&v.jsx(Kw,{disabled:n})]}),t]})}function cf({className:e,side:t="bottom",sideOffset:n=8,align:r="start",alignOffset:o=0,anchor:s,portalContainer:i,...a}){const c=u.use(Xo)?.anchorElement??null,d=u.useCallback(()=>{if(typeof document>"u")return null;const m=document.activeElement;return m?m.closest('[data-slot="combobox-chips"]')??m.closest('[data-slot="input-group"]'):null},[]),p=u.useCallback(()=>{const m=c??d();if(typeof Element>"u"||!s)return m;if(s instanceof Element)return s;if(typeof s=="function"){const b=s();return b instanceof Element?b:m}return"current"in s&&s.current instanceof Element?s.current:m},[s,c,d]),g=u.useCallback(()=>{if(typeof document>"u")return;const m=p();if(m instanceof HTMLElement){const y=m.closest('[role="dialog"]');if(y instanceof HTMLElement)return y}const b=document.activeElement?.closest('[role="dialog"]');return b instanceof HTMLElement?b:void 0},[p]),f=s??c??d,h=i??g();return v.jsx(Ld,{container:h,children:v.jsx(zd,{side:t,sideOffset:n,align:r,alignOffset:o,anchor:f,className:jw,children:v.jsx(Gd,{"data-slot":"combobox-content","data-chips":!!s,className:L($w,e),...a})})})}function uf({className:e,...t}){return v.jsx(Vd,{"data-slot":"combobox-list",className:L("flex flex-col gap-1",e),...t})}function df({className:e,children:t,...n}){return v.jsx(qd,{"data-slot":"combobox-item",className:L(zw,e),...n,children:t})}function Xw({className:e,...t}){return v.jsx(Hd,{"data-slot":"combobox-group",className:L(e),...t})}function Zw({className:e,...t}){return v.jsx(Bd,{"data-slot":"combobox-label",className:L(Gw,e),...t})}function Qw({...e}){return v.jsx(Fd,{"data-slot":"combobox-collection",...e})}function ff({className:e,...t}){return v.jsx(Kd,{"data-slot":"combobox-empty",className:L(Hw,e),...t})}function Jw({className:e,...t}){return v.jsx(Yd,{"data-slot":"combobox-separator",className:L(Bw,e),...t})}function vi({className:e,disabled:t=!1,...n}){const r=u.use(Xo),o=u.useCallback(s=>{r&&r.setAnchorElement(i=>i===s?i:s)},[r]);return v.jsx(Xd,{ref:o,"data-slot":"combobox-chips",className:L(Ww({disabled:t}),e),...n})}function pf({className:e,children:t,showRemove:n=!0,...r}){return v.jsxs(Zd,{"data-slot":"combobox-chip",className:L(Uw,e),...r,children:[t,n&&v.jsx(Qd,{render:v.jsx(Bt,{className:sf,variant:"ghost",children:v.jsx(Ut,{className:"text-secondary-text",type:"close"})})})]})}function xi({className:e,...t}){return v.jsx(ha,{"data-slot":"combobox-chip-input",className:L(qw({disabled:t.disabled}),e),...t})}var eS=u[" useId ".trim().toString()]||(()=>{}),tS=0;function Hn(e){const[t,n]=u.useState(eS());return dn(()=>{n(r=>r??String(tS++))},[e]),t?`radix-${t}`:""}function Nn(e){const t=u.useRef(e);return u.useEffect(()=>{t.current=e}),u.useMemo(()=>(...n)=>t.current?.(...n),[])}function nS(e,t=globalThis?.document){const n=Nn(e);u.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var rS="DismissableLayer",yi="dismissableLayer.update",oS="dismissableLayer.pointerDownOutside",sS="dismissableLayer.focusOutside",cc,gf=u.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Ia=u.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:i,onDismiss:a,...l}=e,c=u.useContext(gf),[d,p]=u.useState(null),g=d?.ownerDocument??globalThis?.document,[,f]=u.useState({}),h=He(t,E=>p(E)),m=Array.from(c.layers),[b]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),y=m.indexOf(b),x=d?m.indexOf(d):-1,w=c.layersWithOutsidePointerEventsDisabled.size>0,C=x>=y,S=lS(E=>{const R=E.target,F=[...c.branches].some(N=>N.contains(R));!C||F||(o?.(E),i?.(E),E.defaultPrevented||a?.())},g),I=cS(E=>{const R=E.target;[...c.branches].some(N=>N.contains(R))||(s?.(E),i?.(E),E.defaultPrevented||a?.())},g);return nS(E=>{x===c.layers.size-1&&(r?.(E),!E.defaultPrevented&&a&&(E.preventDefault(),a()))},g),u.useEffect(()=>{if(d)return n&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(cc=g.body.style.pointerEvents,g.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(d)),c.layers.add(d),uc(),()=>{n&&c.layersWithOutsidePointerEventsDisabled.size===1&&(g.body.style.pointerEvents=cc)}},[d,g,n,c]),u.useEffect(()=>()=>{d&&(c.layers.delete(d),c.layersWithOutsidePointerEventsDisabled.delete(d),uc())},[d,c]),u.useEffect(()=>{const E=()=>f({});return document.addEventListener(yi,E),()=>document.removeEventListener(yi,E)},[]),v.jsx(Ae.div,{...l,ref:h,style:{pointerEvents:w?C?"auto":"none":void 0,...e.style},onFocusCapture:Oe(e.onFocusCapture,I.onFocusCapture),onBlurCapture:Oe(e.onBlurCapture,I.onBlurCapture),onPointerDownCapture:Oe(e.onPointerDownCapture,S.onPointerDownCapture)})});Ia.displayName=rS;var iS="DismissableLayerBranch",aS=u.forwardRef((e,t)=>{const n=u.useContext(gf),r=u.useRef(null),o=He(t,r);return u.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),v.jsx(Ae.div,{...e,ref:o})});aS.displayName=iS;function lS(e,t=globalThis?.document){const n=Nn(e),r=u.useRef(!1),o=u.useRef(()=>{});return u.useEffect(()=>{const s=a=>{if(a.target&&!r.current){let l=function(){mf(oS,n,c,{discrete:!0})};const c={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=l,t.addEventListener("click",o.current,{once:!0})):l()}else t.removeEventListener("click",o.current);r.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",s),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function cS(e,t=globalThis?.document){const n=Nn(e),r=u.useRef(!1);return u.useEffect(()=>{const o=s=>{s.target&&!r.current&&mf(sS,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function uc(){const e=new CustomEvent(yi);document.dispatchEvent(e)}function mf(e,t,n,{discrete:r}){const o=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Rh(o,s):o.dispatchEvent(s)}var Ds="focusScope.autoFocusOnMount",Fs="focusScope.autoFocusOnUnmount",dc={bubbles:!1,cancelable:!0},uS="FocusScope",hf=u.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...i}=e,[a,l]=u.useState(null),c=Nn(o),d=Nn(s),p=u.useRef(null),g=He(t,m=>l(m)),f=u.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;u.useEffect(()=>{if(r){let m=function(w){if(f.paused||!a)return;const C=w.target;a.contains(C)?p.current=C:nn(p.current,{select:!0})},b=function(w){if(f.paused||!a)return;const C=w.relatedTarget;C!==null&&(a.contains(C)||nn(p.current,{select:!0}))},y=function(w){if(document.activeElement===document.body)for(const S of w)S.removedNodes.length>0&&nn(a)};document.addEventListener("focusin",m),document.addEventListener("focusout",b);const x=new MutationObserver(y);return a&&x.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",b),x.disconnect()}}},[r,a,f.paused]),u.useEffect(()=>{if(a){pc.add(f);const m=document.activeElement;if(!a.contains(m)){const y=new CustomEvent(Ds,dc);a.addEventListener(Ds,c),a.dispatchEvent(y),y.defaultPrevented||(dS(hS(bf(a)),{select:!0}),document.activeElement===m&&nn(a))}return()=>{a.removeEventListener(Ds,c),setTimeout(()=>{const y=new CustomEvent(Fs,dc);a.addEventListener(Fs,d),a.dispatchEvent(y),y.defaultPrevented||nn(m??document.body,{select:!0}),a.removeEventListener(Fs,d),pc.remove(f)},0)}}},[a,c,d,f]);const h=u.useCallback(m=>{if(!n&&!r||f.paused)return;const b=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,y=document.activeElement;if(b&&y){const x=m.currentTarget,[w,C]=fS(x);w&&C?!m.shiftKey&&y===C?(m.preventDefault(),n&&nn(w,{select:!0})):m.shiftKey&&y===w&&(m.preventDefault(),n&&nn(C,{select:!0})):y===x&&m.preventDefault()}},[n,r,f.paused]);return v.jsx(Ae.div,{tabIndex:-1,...i,ref:g,onKeyDown:h})});hf.displayName=uS;function dS(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(nn(r,{select:t}),document.activeElement!==n)return}function fS(e){const t=bf(e),n=fc(t,e),r=fc(t.reverse(),e);return[n,r]}function bf(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function fc(e,t){for(const n of e)if(!pS(n,{upTo:t}))return n}function pS(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function gS(e){return e instanceof HTMLInputElement&&"select"in e}function nn(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&gS(e)&&t&&e.select()}}var pc=mS();function mS(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=gc(e,t),e.unshift(t)},remove(t){e=gc(e,t),e[0]?.resume()}}}function gc(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function hS(e){return e.filter(t=>t.tagName!=="A")}var bS="Portal",ka=u.forwardRef((e,t)=>{const{container:n,...r}=e,[o,s]=u.useState(!1);dn(()=>s(!0),[]);const i=n||o&&globalThis?.document?.body;return i?Nc.createPortal(v.jsx(Ae.div,{...r,ref:t}),i):null});ka.displayName=bS;var Vs=0;function vS(){u.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??mc()),document.body.insertAdjacentElement("beforeend",e[1]??mc()),Vs++,()=>{Vs===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Vs--}},[])}function mc(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Mt=function(){return Mt=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},Mt.apply(this,arguments)};function vf(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function xS(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,s;r<o;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))}var lo="right-scroll-bar-position",co="width-before-scroll-bar",yS="with-scroll-bars-hidden",CS="--removed-body-scroll-bar-size";function Ls(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function wS(e,t){var n=Te.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var SS=typeof window<"u"?u.useLayoutEffect:u.useEffect,hc=new WeakMap;function RS(e,t){var n=wS(null,function(r){return e.forEach(function(o){return Ls(o,r)})});return SS(function(){var r=hc.get(n);if(r){var o=new Set(r),s=new Set(e),i=n.current;o.forEach(function(a){s.has(a)||Ls(a,null)}),s.forEach(function(a){o.has(a)||Ls(a,i)})}hc.set(n,e)},[e]),n}function ES(e){return e}function IS(e,t){t===void 0&&(t=ES);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(s){var i=t(s,r);return n.push(i),function(){n=n.filter(function(a){return a!==i})}},assignSyncMedium:function(s){for(r=!0;n.length;){var i=n;n=[],i.forEach(s)}n={push:function(a){return s(a)},filter:function(){return n}}},assignMedium:function(s){r=!0;var i=[];if(n.length){var a=n;n=[],a.forEach(s),i=n}var l=function(){var d=i;i=[],d.forEach(s)},c=function(){return Promise.resolve().then(l)};c(),n={push:function(d){i.push(d),c()},filter:function(d){return i=i.filter(d),n}}}};return o}function kS(e){e===void 0&&(e={});var t=IS(null);return t.options=Mt({async:!0,ssr:!1},e),t}var xf=function(e){var t=e.sideCar,n=vf(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return u.createElement(r,Mt({},n))};xf.isSideCarExport=!0;function NS(e,t){return e.useMedium(t),xf}var yf=kS(),js=function(){},Zo=u.forwardRef(function(e,t){var n=u.useRef(null),r=u.useState({onScrollCapture:js,onWheelCapture:js,onTouchMoveCapture:js}),o=r[0],s=r[1],i=e.forwardProps,a=e.children,l=e.className,c=e.removeScrollBar,d=e.enabled,p=e.shards,g=e.sideCar,f=e.noRelative,h=e.noIsolation,m=e.inert,b=e.allowPinchZoom,y=e.as,x=y===void 0?"div":y,w=e.gapMode,C=vf(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),S=g,I=RS([n,t]),E=Mt(Mt({},C),o);return u.createElement(u.Fragment,null,d&&u.createElement(S,{sideCar:yf,removeScrollBar:c,shards:p,noRelative:f,noIsolation:h,inert:m,setCallbacks:s,allowPinchZoom:!!b,lockRef:n,gapMode:w}),i?u.cloneElement(u.Children.only(a),Mt(Mt({},E),{ref:I})):u.createElement(x,Mt({},E,{className:l,ref:I}),a))});Zo.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Zo.classNames={fullWidth:co,zeroRight:lo};var PS=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function OS(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=PS();return t&&e.setAttribute("nonce",t),e}function _S(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function AS(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var TS=function(){var e=0,t=null;return{add:function(n){e==0&&(t=OS())&&(_S(t,n),AS(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},MS=function(){var e=TS();return function(t,n){u.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Cf=function(){var e=MS(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},DS={left:0,top:0,right:0,gap:0},$s=function(e){return parseInt(e||"",10)||0},FS=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[$s(n),$s(r),$s(o)]},VS=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return DS;var t=FS(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},LS=Cf(),Bn="data-scroll-locked",jS=function(e,t,n,r){var o=e.left,s=e.top,i=e.right,a=e.gap;return n===void 0&&(n="margin"),`
104
- .`.concat(yS,` {
102
+ has-data-[slot=combobox-chip-remove]:pr-0`,YF=Ve(`text-primary-text placeholder:text-placeholder-text disabled:text-disabled-text
103
+ disabled:placeholder:text-disabled-text min-w-16 flex-1 outline-none`,{variants:{disabled:{true:"flex-1 p-0",false:""}},defaultVariants:{disabled:!1}}),wc=v.createContext(null);function nO({children:e,...t}){const[n,r]=v.useState(null),o=v.useMemo(()=>({anchorElement:n,setAnchorElement:r}),[n]);return C.jsx(wc,{value:o,children:C.jsx(oF,{...t,children:e})})}function rO({className:e,label:t,description:n,error:r,children:o,...i}){return C.jsxs(cs,{className:e,...i,children:[t&&C.jsx(Yi,{children:t}),o,n&&C.jsx(fs,{children:n}),r&&C.jsx(J1,{children:r})]})}function Jp({...e}){return C.jsx(iF,{"data-slot":"combobox-value",...e})}function ou({className:e,children:t,...n}){return C.jsxs(R1,{"data-slot":"combobox-trigger",className:q(jF,e),...n,children:[t,C.jsx(Or,{type:"chevron",className:q($F({disabled:n.disabled})),size:"md"})]})}function XF({className:e,...t}){return C.jsx(k1,{"data-slot":"combobox-clear",className:q(e),...t,render:C.jsx(eO,{variant:"link",size:"icon-xs",className:tO,children:C.jsx(Or,{className:LF,type:"close"})})})}function ZF({className:e,children:t,disabled:n=!1,showTrigger:r=!0,showClear:o=!1,...i}){const a=v.use(wc),s=v.useCallback(l=>{a&&a.setAnchorElement(u=>u===l?u:l)},[a]);return C.jsxs(ng,{ref:s,className:q(FF,e),children:[C.jsx(Ym,{render:C.jsx(og,{disabled:n}),...i}),C.jsxs(rg,{align:"inline-end",className:VF,children:[r&&C.jsx(ou,{}),o&&C.jsx(XF,{disabled:n})]}),t]})}function oO({className:e,side:t="bottom",sideOffset:n=8,align:r="start",alignOffset:o=0,anchor:i,portalContainer:a,...s}){const u=v.use(wc)?.anchorElement??null,c=v.useCallback(()=>{if(typeof document>"u")return null;const g=document.activeElement;return g?g.closest('[data-slot="combobox-chips"]')??g.closest('[data-slot="input-group"]'):null},[]),f=v.useCallback(()=>{const g=u??c();if(typeof Element>"u"||!i)return g;if(i instanceof Element)return i;if(typeof i=="function"){const h=i();return h instanceof Element?h:g}return"current"in i&&i.current instanceof Element?i.current:g},[i,u,c]),p=v.useCallback(()=>{if(typeof document>"u")return;const g=f();if(g instanceof HTMLElement){const y=g.closest('[role="dialog"]');if(y instanceof HTMLElement)return y}const h=document.activeElement?.closest('[role="dialog"]');return h instanceof HTMLElement?h:void 0},[f]),d=i??u??c,m=a??p();return C.jsx(M1,{container:m,children:C.jsx($1,{side:t,sideOffset:n,align:r,alignOffset:o,anchor:d,className:zF,children:C.jsx(L1,{"data-slot":"combobox-content","data-chips":!!i,className:q(BF,e),...s})})})}function iO({className:e,...t}){return C.jsx(T1,{"data-slot":"combobox-list",className:q("flex flex-col gap-1",e),...t})}function aO({className:e,children:t,...n}){return C.jsx(H1,{"data-slot":"combobox-item",className:q(HF,e),...n,children:t})}function QF({className:e,...t}){return C.jsx(F1,{"data-slot":"combobox-group",className:q(e),...t})}function JF({className:e,...t}){return C.jsx(V1,{"data-slot":"combobox-label",className:q(GF,e),...t})}function eV({...e}){return C.jsx(N1,{"data-slot":"combobox-collection",...e})}function sO({className:e,...t}){return C.jsx(G1,{"data-slot":"combobox-empty",className:q(WF,e),...t})}function tV({className:e,...t}){return C.jsx(W1,{"data-slot":"combobox-separator",className:q(UF,e),...t})}function eh({className:e,disabled:t=!1,...n}){const r=v.use(wc),o=v.useCallback(i=>{r&&r.setAnchorElement(a=>a===i?a:i)},[r]);return C.jsx(U1,{ref:o,"data-slot":"combobox-chips",className:q(qF({disabled:t}),e),...n})}function lO({className:e,children:t,showRemove:n=!0,...r}){return C.jsxs(q1,{"data-slot":"combobox-chip",className:q(KF,e),...r,children:[t,n&&C.jsx(K1,{render:C.jsx(wr,{className:tO,variant:"ghost",children:C.jsx(Or,{className:"text-secondary-text",type:"close"})})})]})}function th({className:e,...t}){return C.jsx(Ym,{"data-slot":"combobox-chip-input",className:q(YF({disabled:t.disabled}),e),...t})}var nV=v[" useId ".trim().toString()]||(()=>{}),rV=0;function Ni(e){const[t,n]=v.useState(nV());return fo(()=>{n(r=>r??String(rV++))},[e]),t?`radix-${t}`:""}function Yo(e){const t=v.useRef(e);return v.useEffect(()=>{t.current=e}),v.useMemo(()=>(...n)=>t.current?.(...n),[])}function oV(e,t=globalThis?.document){const n=Yo(e);v.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var iV="DismissableLayer",nh="dismissableLayer.update",aV="dismissableLayer.pointerDownOutside",sV="dismissableLayer.focusOutside",xb,uO=v.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),ig=v.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:a,onDismiss:s,...l}=e,u=v.useContext(uO),[c,f]=v.useState(null),p=c?.ownerDocument??globalThis?.document,[,d]=v.useState({}),m=ut(t,O=>f(O)),g=Array.from(u.layers),[h]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),y=g.indexOf(h),b=c?g.indexOf(c):-1,x=u.layersWithOutsidePointerEventsDisabled.size>0,w=b>=y,S=cV(O=>{const P=O.target,N=[...u.branches].some(R=>R.contains(P));!w||N||(o?.(O),a?.(O),O.defaultPrevented||s?.())},p),E=fV(O=>{const P=O.target;[...u.branches].some(R=>R.contains(P))||(i?.(O),a?.(O),O.defaultPrevented||s?.())},p);return oV(O=>{b===u.layers.size-1&&(r?.(O),!O.defaultPrevented&&s&&(O.preventDefault(),s()))},p),v.useEffect(()=>{if(c)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(xb=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(c)),u.layers.add(c),wb(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=xb)}},[c,p,n,u]),v.useEffect(()=>()=>{c&&(u.layers.delete(c),u.layersWithOutsidePointerEventsDisabled.delete(c),wb())},[c,u]),v.useEffect(()=>{const O=()=>d({});return document.addEventListener(nh,O),()=>document.removeEventListener(nh,O)},[]),C.jsx(ze.div,{...l,ref:m,style:{pointerEvents:x?w?"auto":"none":void 0,...e.style},onFocusCapture:Fe(e.onFocusCapture,E.onFocusCapture),onBlurCapture:Fe(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:Fe(e.onPointerDownCapture,S.onPointerDownCapture)})});ig.displayName=iV;var lV="DismissableLayerBranch",uV=v.forwardRef((e,t)=>{const n=v.useContext(uO),r=v.useRef(null),o=ut(t,r);return v.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),C.jsx(ze.div,{...e,ref:o})});uV.displayName=lV;function cV(e,t=globalThis?.document){const n=Yo(e),r=v.useRef(!1),o=v.useRef(()=>{});return v.useEffect(()=>{const i=s=>{if(s.target&&!r.current){let l=function(){cO(aV,n,u,{discrete:!0})};const u={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=l,t.addEventListener("click",o.current,{once:!0})):l()}else t.removeEventListener("click",o.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function fV(e,t=globalThis?.document){const n=Yo(e),r=v.useRef(!1);return v.useEffect(()=>{const o=i=>{i.target&&!r.current&&cO(sV,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function wb(){const e=new CustomEvent(nh);document.dispatchEvent(e)}function cO(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?AM(o,i):o.dispatchEvent(i)}var Uf="focusScope.autoFocusOnMount",qf="focusScope.autoFocusOnUnmount",Cb={bubbles:!1,cancelable:!0},dV="FocusScope",fO=v.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...a}=e,[s,l]=v.useState(null),u=Yo(o),c=Yo(i),f=v.useRef(null),p=ut(t,g=>l(g)),d=v.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;v.useEffect(()=>{if(r){let g=function(x){if(d.paused||!s)return;const w=x.target;s.contains(w)?f.current=w:Xr(f.current,{select:!0})},h=function(x){if(d.paused||!s)return;const w=x.relatedTarget;w!==null&&(s.contains(w)||Xr(f.current,{select:!0}))},y=function(x){if(document.activeElement===document.body)for(const S of x)S.removedNodes.length>0&&Xr(s)};document.addEventListener("focusin",g),document.addEventListener("focusout",h);const b=new MutationObserver(y);return s&&b.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",g),document.removeEventListener("focusout",h),b.disconnect()}}},[r,s,d.paused]),v.useEffect(()=>{if(s){Eb.add(d);const g=document.activeElement;if(!s.contains(g)){const y=new CustomEvent(Uf,Cb);s.addEventListener(Uf,u),s.dispatchEvent(y),y.defaultPrevented||(pV(yV(dO(s)),{select:!0}),document.activeElement===g&&Xr(s))}return()=>{s.removeEventListener(Uf,u),setTimeout(()=>{const y=new CustomEvent(qf,Cb);s.addEventListener(qf,c),s.dispatchEvent(y),y.defaultPrevented||Xr(g??document.body,{select:!0}),s.removeEventListener(qf,c),Eb.remove(d)},0)}}},[s,u,c,d]);const m=v.useCallback(g=>{if(!n&&!r||d.paused)return;const h=g.key==="Tab"&&!g.altKey&&!g.ctrlKey&&!g.metaKey,y=document.activeElement;if(h&&y){const b=g.currentTarget,[x,w]=hV(b);x&&w?!g.shiftKey&&y===w?(g.preventDefault(),n&&Xr(x,{select:!0})):g.shiftKey&&y===x&&(g.preventDefault(),n&&Xr(w,{select:!0})):y===b&&g.preventDefault()}},[n,r,d.paused]);return C.jsx(ze.div,{tabIndex:-1,...a,ref:p,onKeyDown:m})});fO.displayName=dV;function pV(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Xr(r,{select:t}),document.activeElement!==n)return}function hV(e){const t=dO(e),n=Sb(t,e),r=Sb(t.reverse(),e);return[n,r]}function dO(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Sb(e,t){for(const n of e)if(!mV(n,{upTo:t}))return n}function mV(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function gV(e){return e instanceof HTMLInputElement&&"select"in e}function Xr(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&gV(e)&&t&&e.select()}}var Eb=vV();function vV(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=Ob(e,t),e.unshift(t)},remove(t){e=Ob(e,t),e[0]?.resume()}}}function Ob(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function yV(e){return e.filter(t=>t.tagName!=="A")}var bV="Portal",ag=v.forwardRef((e,t)=>{const{container:n,...r}=e,[o,i]=v.useState(!1);fo(()=>i(!0),[]);const a=n||o&&globalThis?.document?.body;return a?nc.createPortal(C.jsx(ze.div,{...r,ref:t}),a):null});ag.displayName=bV;var Kf=0;function xV(){v.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Pb()),document.body.insertAdjacentElement("beforeend",e[1]??Pb()),Kf++,()=>{Kf===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Kf--}},[])}function Pb(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Qn=function(){return Qn=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},Qn.apply(this,arguments)};function pO(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function wV(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,i;r<o;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}var Dl="right-scroll-bar-position",jl="width-before-scroll-bar",CV="with-scroll-bars-hidden",SV="--removed-body-scroll-bar-size";function Yf(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function EV(e,t){var n=A.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var OV=typeof window<"u"?v.useLayoutEffect:v.useEffect,_b=new WeakMap;function PV(e,t){var n=EV(null,function(r){return e.forEach(function(o){return Yf(o,r)})});return OV(function(){var r=_b.get(n);if(r){var o=new Set(r),i=new Set(e),a=n.current;o.forEach(function(s){i.has(s)||Yf(s,null)}),i.forEach(function(s){o.has(s)||Yf(s,a)})}_b.set(n,e)},[e]),n}function _V(e){return e}function AV(e,t){t===void 0&&(t=_V);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(i){var a=t(i,r);return n.push(a),function(){n=n.filter(function(s){return s!==a})}},assignSyncMedium:function(i){for(r=!0;n.length;){var a=n;n=[],a.forEach(i)}n={push:function(s){return i(s)},filter:function(){return n}}},assignMedium:function(i){r=!0;var a=[];if(n.length){var s=n;n=[],s.forEach(i),a=n}var l=function(){var c=a;a=[],c.forEach(i)},u=function(){return Promise.resolve().then(l)};u(),n={push:function(c){a.push(c),u()},filter:function(c){return a=a.filter(c),n}}}};return o}function RV(e){e===void 0&&(e={});var t=AV(null);return t.options=Qn({async:!0,ssr:!1},e),t}var hO=function(e){var t=e.sideCar,n=pO(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return v.createElement(r,Qn({},n))};hO.isSideCarExport=!0;function IV(e,t){return e.useMedium(t),hO}var mO=RV(),Xf=function(){},Cc=v.forwardRef(function(e,t){var n=v.useRef(null),r=v.useState({onScrollCapture:Xf,onWheelCapture:Xf,onTouchMoveCapture:Xf}),o=r[0],i=r[1],a=e.forwardProps,s=e.children,l=e.className,u=e.removeScrollBar,c=e.enabled,f=e.shards,p=e.sideCar,d=e.noRelative,m=e.noIsolation,g=e.inert,h=e.allowPinchZoom,y=e.as,b=y===void 0?"div":y,x=e.gapMode,w=pO(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),S=p,E=PV([n,t]),O=Qn(Qn({},w),o);return v.createElement(v.Fragment,null,c&&v.createElement(S,{sideCar:mO,removeScrollBar:u,shards:f,noRelative:d,noIsolation:m,inert:g,setCallbacks:i,allowPinchZoom:!!h,lockRef:n,gapMode:x}),a?v.cloneElement(v.Children.only(s),Qn(Qn({},O),{ref:E})):v.createElement(b,Qn({},O,{className:l,ref:E}),s))});Cc.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Cc.classNames={fullWidth:jl,zeroRight:Dl};var kV=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function NV(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=kV();return t&&e.setAttribute("nonce",t),e}function TV(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function MV(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var DV=function(){var e=0,t=null;return{add:function(n){e==0&&(t=NV())&&(TV(t,n),MV(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},jV=function(){var e=DV();return function(t,n){v.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},gO=function(){var e=jV(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},$V={left:0,top:0,right:0,gap:0},Zf=function(e){return parseInt(e||"",10)||0},LV=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[Zf(n),Zf(r),Zf(o)]},FV=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return $V;var t=LV(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},VV=gO(),Ti="data-scroll-locked",zV=function(e,t,n,r){var o=e.left,i=e.top,a=e.right,s=e.gap;return n===void 0&&(n="margin"),`
104
+ .`.concat(CV,` {
105
105
  overflow: hidden `).concat(r,`;
106
- padding-right: `).concat(a,"px ").concat(r,`;
106
+ padding-right: `).concat(s,"px ").concat(r,`;
107
107
  }
108
- body[`).concat(Bn,`] {
108
+ body[`).concat(Ti,`] {
109
109
  overflow: hidden `).concat(r,`;
110
110
  overscroll-behavior: contain;
111
111
  `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
112
112
  padding-left: `.concat(o,`px;
113
- padding-top: `).concat(s,`px;
114
- padding-right: `).concat(i,`px;
113
+ padding-top: `).concat(i,`px;
114
+ padding-right: `).concat(a,`px;
115
115
  margin-left:0;
116
116
  margin-top:0;
117
- margin-right: `).concat(a,"px ").concat(r,`;
118
- `),n==="padding"&&"padding-right: ".concat(a,"px ").concat(r,";")].filter(Boolean).join(""),`
117
+ margin-right: `).concat(s,"px ").concat(r,`;
118
+ `),n==="padding"&&"padding-right: ".concat(s,"px ").concat(r,";")].filter(Boolean).join(""),`
119
119
  }
120
120
 
121
- .`).concat(lo,` {
122
- right: `).concat(a,"px ").concat(r,`;
121
+ .`).concat(Dl,` {
122
+ right: `).concat(s,"px ").concat(r,`;
123
123
  }
124
124
 
125
- .`).concat(co,` {
126
- margin-right: `).concat(a,"px ").concat(r,`;
125
+ .`).concat(jl,` {
126
+ margin-right: `).concat(s,"px ").concat(r,`;
127
127
  }
128
128
 
129
- .`).concat(lo," .").concat(lo,` {
129
+ .`).concat(Dl," .").concat(Dl,` {
130
130
  right: 0 `).concat(r,`;
131
131
  }
132
132
 
133
- .`).concat(co," .").concat(co,` {
133
+ .`).concat(jl," .").concat(jl,` {
134
134
  margin-right: 0 `).concat(r,`;
135
135
  }
136
136
 
137
- body[`).concat(Bn,`] {
138
- `).concat(CS,": ").concat(a,`px;
137
+ body[`).concat(Ti,`] {
138
+ `).concat(SV,": ").concat(s,`px;
139
139
  }
140
- `)},bc=function(){var e=parseInt(document.body.getAttribute(Bn)||"0",10);return isFinite(e)?e:0},$S=function(){u.useEffect(function(){return document.body.setAttribute(Bn,(bc()+1).toString()),function(){var e=bc()-1;e<=0?document.body.removeAttribute(Bn):document.body.setAttribute(Bn,e.toString())}},[])},zS=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;$S();var s=u.useMemo(function(){return VS(o)},[o]);return u.createElement(LS,{styles:jS(s,!t,o,n?"":"!important")})},Ci=!1;if(typeof window<"u")try{var Jr=Object.defineProperty({},"passive",{get:function(){return Ci=!0,!0}});window.addEventListener("test",Jr,Jr),window.removeEventListener("test",Jr,Jr)}catch{Ci=!1}var Mn=Ci?{passive:!1}:!1,GS=function(e){return e.tagName==="TEXTAREA"},wf=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!GS(e)&&n[t]==="visible")},HS=function(e){return wf(e,"overflowY")},BS=function(e){return wf(e,"overflowX")},vc=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=Sf(e,r);if(o){var s=Rf(e,r),i=s[1],a=s[2];if(i>a)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},WS=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},US=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},Sf=function(e,t){return e==="v"?HS(t):BS(t)},Rf=function(e,t){return e==="v"?WS(t):US(t)},qS=function(e,t){return e==="h"&&t==="rtl"?-1:1},KS=function(e,t,n,r,o){var s=qS(e,window.getComputedStyle(t).direction),i=s*r,a=n.target,l=t.contains(a),c=!1,d=i>0,p=0,g=0;do{if(!a)break;var f=Rf(e,a),h=f[0],m=f[1],b=f[2],y=m-b-s*h;(h||y)&&Sf(e,a)&&(p+=y,g+=h);var x=a.parentNode;a=x&&x.nodeType===Node.DOCUMENT_FRAGMENT_NODE?x.host:x}while(!l&&a!==document.body||l&&(t.contains(a)||t===a));return(d&&Math.abs(p)<1||!d&&Math.abs(g)<1)&&(c=!0),c},eo=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},xc=function(e){return[e.deltaX,e.deltaY]},yc=function(e){return e&&"current"in e?e.current:e},YS=function(e,t){return e[0]===t[0]&&e[1]===t[1]},XS=function(e){return`
140
+ `)},Ab=function(){var e=parseInt(document.body.getAttribute(Ti)||"0",10);return isFinite(e)?e:0},BV=function(){v.useEffect(function(){return document.body.setAttribute(Ti,(Ab()+1).toString()),function(){var e=Ab()-1;e<=0?document.body.removeAttribute(Ti):document.body.setAttribute(Ti,e.toString())}},[])},HV=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;BV();var i=v.useMemo(function(){return FV(o)},[o]);return v.createElement(VV,{styles:zV(i,!t,o,n?"":"!important")})},rh=!1;if(typeof window<"u")try{var sl=Object.defineProperty({},"passive",{get:function(){return rh=!0,!0}});window.addEventListener("test",sl,sl),window.removeEventListener("test",sl,sl)}catch{rh=!1}var hi=rh?{passive:!1}:!1,GV=function(e){return e.tagName==="TEXTAREA"},vO=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!GV(e)&&n[t]==="visible")},WV=function(e){return vO(e,"overflowY")},UV=function(e){return vO(e,"overflowX")},Rb=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=yO(e,r);if(o){var i=bO(e,r),a=i[1],s=i[2];if(a>s)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},qV=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},KV=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},yO=function(e,t){return e==="v"?WV(t):UV(t)},bO=function(e,t){return e==="v"?qV(t):KV(t)},YV=function(e,t){return e==="h"&&t==="rtl"?-1:1},XV=function(e,t,n,r,o){var i=YV(e,window.getComputedStyle(t).direction),a=i*r,s=n.target,l=t.contains(s),u=!1,c=a>0,f=0,p=0;do{if(!s)break;var d=bO(e,s),m=d[0],g=d[1],h=d[2],y=g-h-i*m;(m||y)&&yO(e,s)&&(f+=y,p+=m);var b=s.parentNode;s=b&&b.nodeType===Node.DOCUMENT_FRAGMENT_NODE?b.host:b}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return(c&&Math.abs(f)<1||!c&&Math.abs(p)<1)&&(u=!0),u},ll=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Ib=function(e){return[e.deltaX,e.deltaY]},kb=function(e){return e&&"current"in e?e.current:e},ZV=function(e,t){return e[0]===t[0]&&e[1]===t[1]},QV=function(e){return`
141
141
  .block-interactivity-`.concat(e,` {pointer-events: none;}
142
142
  .allow-interactivity-`).concat(e,` {pointer-events: all;}
143
- `)},ZS=0,Dn=[];function QS(e){var t=u.useRef([]),n=u.useRef([0,0]),r=u.useRef(),o=u.useState(ZS++)[0],s=u.useState(Cf)[0],i=u.useRef(e);u.useEffect(function(){i.current=e},[e]),u.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var m=xS([e.lockRef.current],(e.shards||[]).map(yc),!0).filter(Boolean);return m.forEach(function(b){return b.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),m.forEach(function(b){return b.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var a=u.useCallback(function(m,b){if("touches"in m&&m.touches.length===2||m.type==="wheel"&&m.ctrlKey)return!i.current.allowPinchZoom;var y=eo(m),x=n.current,w="deltaX"in m?m.deltaX:x[0]-y[0],C="deltaY"in m?m.deltaY:x[1]-y[1],S,I=m.target,E=Math.abs(w)>Math.abs(C)?"h":"v";if("touches"in m&&E==="h"&&I.type==="range")return!1;var R=window.getSelection(),F=R&&R.anchorNode,N=F?F===I||F.contains(I):!1;if(N)return!1;var T=vc(E,I);if(!T)return!0;if(T?S=E:(S=E==="v"?"h":"v",T=vc(E,I)),!T)return!1;if(!r.current&&"changedTouches"in m&&(w||C)&&(r.current=S),!S)return!0;var _=r.current||S;return KS(_,b,m,_==="h"?w:C)},[]),l=u.useCallback(function(m){var b=m;if(!(!Dn.length||Dn[Dn.length-1]!==s)){var y="deltaY"in b?xc(b):eo(b),x=t.current.filter(function(S){return S.name===b.type&&(S.target===b.target||b.target===S.shadowParent)&&YS(S.delta,y)})[0];if(x&&x.should){b.cancelable&&b.preventDefault();return}if(!x){var w=(i.current.shards||[]).map(yc).filter(Boolean).filter(function(S){return S.contains(b.target)}),C=w.length>0?a(b,w[0]):!i.current.noIsolation;C&&b.cancelable&&b.preventDefault()}}},[]),c=u.useCallback(function(m,b,y,x){var w={name:m,delta:b,target:y,should:x,shadowParent:JS(y)};t.current.push(w),setTimeout(function(){t.current=t.current.filter(function(C){return C!==w})},1)},[]),d=u.useCallback(function(m){n.current=eo(m),r.current=void 0},[]),p=u.useCallback(function(m){c(m.type,xc(m),m.target,a(m,e.lockRef.current))},[]),g=u.useCallback(function(m){c(m.type,eo(m),m.target,a(m,e.lockRef.current))},[]);u.useEffect(function(){return Dn.push(s),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:g}),document.addEventListener("wheel",l,Mn),document.addEventListener("touchmove",l,Mn),document.addEventListener("touchstart",d,Mn),function(){Dn=Dn.filter(function(m){return m!==s}),document.removeEventListener("wheel",l,Mn),document.removeEventListener("touchmove",l,Mn),document.removeEventListener("touchstart",d,Mn)}},[]);var f=e.removeScrollBar,h=e.inert;return u.createElement(u.Fragment,null,h?u.createElement(s,{styles:XS(o)}):null,f?u.createElement(zS,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function JS(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const e0=NS(yf,QS);var Ef=u.forwardRef(function(e,t){return u.createElement(Zo,Mt({},e,{ref:t,sideCar:e0}))});Ef.classNames=Zo.classNames;var t0=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Fn=new WeakMap,to=new WeakMap,no={},zs=0,If=function(e){return e&&(e.host||If(e.parentNode))},n0=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=If(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},r0=function(e,t,n,r){var o=n0(t,Array.isArray(e)?e:[e]);no[n]||(no[n]=new WeakMap);var s=no[n],i=[],a=new Set,l=new Set(o),c=function(p){!p||a.has(p)||(a.add(p),c(p.parentNode))};o.forEach(c);var d=function(p){!p||l.has(p)||Array.prototype.forEach.call(p.children,function(g){if(a.has(g))d(g);else try{var f=g.getAttribute(r),h=f!==null&&f!=="false",m=(Fn.get(g)||0)+1,b=(s.get(g)||0)+1;Fn.set(g,m),s.set(g,b),i.push(g),m===1&&h&&to.set(g,!0),b===1&&g.setAttribute(n,"true"),h||g.setAttribute(r,"true")}catch(y){console.error("aria-hidden: cannot operate on ",g,y)}})};return d(t),a.clear(),zs++,function(){i.forEach(function(p){var g=Fn.get(p)-1,f=s.get(p)-1;Fn.set(p,g),s.set(p,f),g||(to.has(p)||p.removeAttribute(r),to.delete(p)),f||p.removeAttribute(n)}),zs--,zs||(Fn=new WeakMap,Fn=new WeakMap,to=new WeakMap,no={})}},o0=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=t0(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),r0(r,o,n,"aria-hidden")):function(){return null}},Qo="Dialog",[kf]=Vt(Qo),[s0,_t]=kf(Qo),Nf=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:s,modal:i=!0}=e,a=u.useRef(null),l=u.useRef(null),[c,d]=_n({prop:r,defaultProp:o??!1,onChange:s,caller:Qo});return v.jsx(s0,{scope:t,triggerRef:a,contentRef:l,contentId:Hn(),titleId:Hn(),descriptionId:Hn(),open:c,onOpenChange:d,onOpenToggle:u.useCallback(()=>d(p=>!p),[d]),modal:i,children:n})};Nf.displayName=Qo;var Pf="DialogTrigger",Of=u.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=_t(Pf,n),s=He(t,o.triggerRef);return v.jsx(Ae.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Oa(o.open),...r,ref:s,onClick:Oe(e.onClick,o.onOpenToggle)})});Of.displayName=Pf;var Na="DialogPortal",[i0,_f]=kf(Na,{forceMount:void 0}),Af=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,s=_t(Na,t);return v.jsx(i0,{scope:t,forceMount:n,children:u.Children.map(r,i=>v.jsx(Kt,{present:n||s.open,children:v.jsx(ka,{asChild:!0,container:o,children:i})}))})};Af.displayName=Na;var No="DialogOverlay",Tf=u.forwardRef((e,t)=>{const n=_f(No,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,s=_t(No,e.__scopeDialog);return s.modal?v.jsx(Kt,{present:r||s.open,children:v.jsx(l0,{...o,ref:t})}):null});Tf.displayName=No;var a0=po("DialogOverlay.RemoveScroll"),l0=u.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=_t(No,n);return v.jsx(Ef,{as:a0,allowPinchZoom:!0,shards:[o.contentRef],children:v.jsx(Ae.div,{"data-state":Oa(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),Pn="DialogContent",Mf=u.forwardRef((e,t)=>{const n=_f(Pn,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,s=_t(Pn,e.__scopeDialog);return v.jsx(Kt,{present:r||s.open,children:s.modal?v.jsx(c0,{...o,ref:t}):v.jsx(u0,{...o,ref:t})})});Mf.displayName=Pn;var c0=u.forwardRef((e,t)=>{const n=_t(Pn,e.__scopeDialog),r=u.useRef(null),o=He(t,n.contentRef,r);return u.useEffect(()=>{const s=r.current;if(s)return o0(s)},[]),v.jsx(Df,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Oe(e.onCloseAutoFocus,s=>{s.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:Oe(e.onPointerDownOutside,s=>{const i=s.detail.originalEvent,a=i.button===0&&i.ctrlKey===!0;(i.button===2||a)&&s.preventDefault()}),onFocusOutside:Oe(e.onFocusOutside,s=>s.preventDefault())})}),u0=u.forwardRef((e,t)=>{const n=_t(Pn,e.__scopeDialog),r=u.useRef(!1),o=u.useRef(!1);return v.jsx(Df,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{e.onCloseAutoFocus?.(s),s.defaultPrevented||(r.current||n.triggerRef.current?.focus(),s.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:s=>{e.onInteractOutside?.(s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const i=s.target;n.triggerRef.current?.contains(i)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&o.current&&s.preventDefault()}})}),Df=u.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:s,...i}=e,a=_t(Pn,n),l=u.useRef(null),c=He(t,l);return vS(),v.jsxs(v.Fragment,{children:[v.jsx(hf,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:s,children:v.jsx(Ia,{role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":Oa(a.open),...i,ref:c,onDismiss:()=>a.onOpenChange(!1)})}),v.jsxs(v.Fragment,{children:[v.jsx(d0,{titleId:a.titleId}),v.jsx(p0,{contentRef:l,descriptionId:a.descriptionId})]})]})}),Pa="DialogTitle",Ff=u.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=_t(Pa,n);return v.jsx(Ae.h2,{id:o.titleId,...r,ref:t})});Ff.displayName=Pa;var Vf="DialogDescription",Lf=u.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=_t(Vf,n);return v.jsx(Ae.p,{id:o.descriptionId,...r,ref:t})});Lf.displayName=Vf;var jf="DialogClose",$f=u.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=_t(jf,n);return v.jsx(Ae.button,{type:"button",...r,ref:t,onClick:Oe(e.onClick,()=>o.onOpenChange(!1))})});$f.displayName=jf;function Oa(e){return e?"open":"closed"}var zf="DialogTitleWarning",[v1,Gf]=uh(zf,{contentName:Pn,titleName:Pa,docsSlug:"dialog"}),d0=({titleId:e})=>{const t=Gf(zf),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
143
+ `)},JV=0,mi=[];function ez(e){var t=v.useRef([]),n=v.useRef([0,0]),r=v.useRef(),o=v.useState(JV++)[0],i=v.useState(gO)[0],a=v.useRef(e);v.useEffect(function(){a.current=e},[e]),v.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var g=wV([e.lockRef.current],(e.shards||[]).map(kb),!0).filter(Boolean);return g.forEach(function(h){return h.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),g.forEach(function(h){return h.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var s=v.useCallback(function(g,h){if("touches"in g&&g.touches.length===2||g.type==="wheel"&&g.ctrlKey)return!a.current.allowPinchZoom;var y=ll(g),b=n.current,x="deltaX"in g?g.deltaX:b[0]-y[0],w="deltaY"in g?g.deltaY:b[1]-y[1],S,E=g.target,O=Math.abs(x)>Math.abs(w)?"h":"v";if("touches"in g&&O==="h"&&E.type==="range")return!1;var P=window.getSelection(),N=P&&P.anchorNode,R=N?N===E||N.contains(E):!1;if(R)return!1;var k=Rb(O,E);if(!k)return!0;if(k?S=O:(S=O==="v"?"h":"v",k=Rb(O,E)),!k)return!1;if(!r.current&&"changedTouches"in g&&(x||w)&&(r.current=S),!S)return!0;var _=r.current||S;return XV(_,h,g,_==="h"?x:w)},[]),l=v.useCallback(function(g){var h=g;if(!(!mi.length||mi[mi.length-1]!==i)){var y="deltaY"in h?Ib(h):ll(h),b=t.current.filter(function(S){return S.name===h.type&&(S.target===h.target||h.target===S.shadowParent)&&ZV(S.delta,y)})[0];if(b&&b.should){h.cancelable&&h.preventDefault();return}if(!b){var x=(a.current.shards||[]).map(kb).filter(Boolean).filter(function(S){return S.contains(h.target)}),w=x.length>0?s(h,x[0]):!a.current.noIsolation;w&&h.cancelable&&h.preventDefault()}}},[]),u=v.useCallback(function(g,h,y,b){var x={name:g,delta:h,target:y,should:b,shadowParent:tz(y)};t.current.push(x),setTimeout(function(){t.current=t.current.filter(function(w){return w!==x})},1)},[]),c=v.useCallback(function(g){n.current=ll(g),r.current=void 0},[]),f=v.useCallback(function(g){u(g.type,Ib(g),g.target,s(g,e.lockRef.current))},[]),p=v.useCallback(function(g){u(g.type,ll(g),g.target,s(g,e.lockRef.current))},[]);v.useEffect(function(){return mi.push(i),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:p}),document.addEventListener("wheel",l,hi),document.addEventListener("touchmove",l,hi),document.addEventListener("touchstart",c,hi),function(){mi=mi.filter(function(g){return g!==i}),document.removeEventListener("wheel",l,hi),document.removeEventListener("touchmove",l,hi),document.removeEventListener("touchstart",c,hi)}},[]);var d=e.removeScrollBar,m=e.inert;return v.createElement(v.Fragment,null,m?v.createElement(i,{styles:QV(o)}):null,d?v.createElement(HV,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function tz(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const nz=IV(mO,ez);var xO=v.forwardRef(function(e,t){return v.createElement(Cc,Qn({},e,{ref:t,sideCar:nz}))});xO.classNames=Cc.classNames;var rz=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},gi=new WeakMap,ul=new WeakMap,cl={},Qf=0,wO=function(e){return e&&(e.host||wO(e.parentNode))},oz=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=wO(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},iz=function(e,t,n,r){var o=oz(t,Array.isArray(e)?e:[e]);cl[n]||(cl[n]=new WeakMap);var i=cl[n],a=[],s=new Set,l=new Set(o),u=function(f){!f||s.has(f)||(s.add(f),u(f.parentNode))};o.forEach(u);var c=function(f){!f||l.has(f)||Array.prototype.forEach.call(f.children,function(p){if(s.has(p))c(p);else try{var d=p.getAttribute(r),m=d!==null&&d!=="false",g=(gi.get(p)||0)+1,h=(i.get(p)||0)+1;gi.set(p,g),i.set(p,h),a.push(p),g===1&&m&&ul.set(p,!0),h===1&&p.setAttribute(n,"true"),m||p.setAttribute(r,"true")}catch(y){console.error("aria-hidden: cannot operate on ",p,y)}})};return c(t),s.clear(),Qf++,function(){a.forEach(function(f){var p=gi.get(f)-1,d=i.get(f)-1;gi.set(f,p),i.set(f,d),p||(ul.has(f)||f.removeAttribute(r),ul.delete(f)),d||f.removeAttribute(n)}),Qf--,Qf||(gi=new WeakMap,gi=new WeakMap,ul=new WeakMap,cl={})}},az=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=rz(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),iz(r,o,n,"aria-hidden")):function(){return null}},Sc="Dialog",[CO]=cr(Sc),[sz,Wn]=CO(Sc),SO=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:i,modal:a=!0}=e,s=v.useRef(null),l=v.useRef(null),[u,c]=ii({prop:r,defaultProp:o??!1,onChange:i,caller:Sc});return C.jsx(sz,{scope:t,triggerRef:s,contentRef:l,contentId:Ni(),titleId:Ni(),descriptionId:Ni(),open:u,onOpenChange:c,onOpenToggle:v.useCallback(()=>c(f=>!f),[c]),modal:a,children:n})};SO.displayName=Sc;var EO="DialogTrigger",OO=v.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Wn(EO,n),i=ut(t,o.triggerRef);return C.jsx(ze.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":ug(o.open),...r,ref:i,onClick:Fe(e.onClick,o.onOpenToggle)})});OO.displayName=EO;var sg="DialogPortal",[lz,PO]=CO(sg,{forceMount:void 0}),_O=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,i=Wn(sg,t);return C.jsx(lz,{scope:t,forceMount:n,children:v.Children.map(r,a=>C.jsx(Tr,{present:n||i.open,children:C.jsx(ag,{asChild:!0,container:o,children:a})}))})};_O.displayName=sg;var iu="DialogOverlay",AO=v.forwardRef((e,t)=>{const n=PO(iu,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=Wn(iu,e.__scopeDialog);return i.modal?C.jsx(Tr,{present:r||i.open,children:C.jsx(cz,{...o,ref:t})}):null});AO.displayName=iu;var uz=Gl("DialogOverlay.RemoveScroll"),cz=v.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Wn(iu,n);return C.jsx(xO,{as:uz,allowPinchZoom:!0,shards:[o.contentRef],children:C.jsx(ze.div,{"data-state":ug(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),Xo="DialogContent",RO=v.forwardRef((e,t)=>{const n=PO(Xo,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=Wn(Xo,e.__scopeDialog);return C.jsx(Tr,{present:r||i.open,children:i.modal?C.jsx(fz,{...o,ref:t}):C.jsx(dz,{...o,ref:t})})});RO.displayName=Xo;var fz=v.forwardRef((e,t)=>{const n=Wn(Xo,e.__scopeDialog),r=v.useRef(null),o=ut(t,n.contentRef,r);return v.useEffect(()=>{const i=r.current;if(i)return az(i)},[]),C.jsx(IO,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Fe(e.onCloseAutoFocus,i=>{i.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:Fe(e.onPointerDownOutside,i=>{const a=i.detail.originalEvent,s=a.button===0&&a.ctrlKey===!0;(a.button===2||s)&&i.preventDefault()}),onFocusOutside:Fe(e.onFocusOutside,i=>i.preventDefault())})}),dz=v.forwardRef((e,t)=>{const n=Wn(Xo,e.__scopeDialog),r=v.useRef(!1),o=v.useRef(!1);return C.jsx(IO,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{e.onCloseAutoFocus?.(i),i.defaultPrevented||(r.current||n.triggerRef.current?.focus(),i.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:i=>{e.onInteractOutside?.(i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const a=i.target;n.triggerRef.current?.contains(a)&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&o.current&&i.preventDefault()}})}),IO=v.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:i,...a}=e,s=Wn(Xo,n),l=v.useRef(null),u=ut(t,l);return xV(),C.jsxs(C.Fragment,{children:[C.jsx(fO,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:i,children:C.jsx(ig,{role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":ug(s.open),...a,ref:u,onDismiss:()=>s.onOpenChange(!1)})}),C.jsxs(C.Fragment,{children:[C.jsx(pz,{titleId:s.titleId}),C.jsx(mz,{contentRef:l,descriptionId:s.descriptionId})]})]})}),lg="DialogTitle",kO=v.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Wn(lg,n);return C.jsx(ze.h2,{id:o.titleId,...r,ref:t})});kO.displayName=lg;var NO="DialogDescription",TO=v.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Wn(NO,n);return C.jsx(ze.p,{id:o.descriptionId,...r,ref:t})});TO.displayName=NO;var MO="DialogClose",DO=v.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Wn(MO,n);return C.jsx(ze.button,{type:"button",...r,ref:t,onClick:Fe(e.onClick,()=>o.onOpenChange(!1))})});DO.displayName=MO;function ug(e){return e?"open":"closed"}var jO="DialogTitleWarning",[zte,$O]=hM(jO,{contentName:Xo,titleName:lg,docsSlug:"dialog"}),pz=({titleId:e})=>{const t=$O(jO),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
144
144
 
145
145
  If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
146
146
 
147
- For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return u.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},f0="DialogDescriptionWarning",p0=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Gf(f0).contentName}}.`;return u.useEffect(()=>{const o=e.current?.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},g0=Nf,m0=Of,h0=Af,Hf=Tf,Bf=Mf,Wf=Ff,Uf=Lf,qf=$f;const b0=["data-open:animate-in data-closed:animate-out data-closed:fade-out-0","data-open:fade-in-0 duration-100","bg-primary-inverse-bg/20 fixed inset-0 isolate z-30"],v0=["fixed left-[50%] top-[50%] z-50 grid translate-x-[-50%]","translate-y-[-50%] gap-8 bg-primary-bg p-6 shadow-[0px_10px_40px_0px_rgba(0,0,0,0.15)] duration-200","rounded-[8px] w-max","[&>[data-base-ui-portal]]:absolute [&>[data-base-ui-portal]]:h-0 [&>[data-base-ui-portal]]:w-0 [&>[data-base-ui-portal]]:overflow-visible","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0","data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95","data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%]"],x0=["absolute cursor-pointer right-6 top-7 inline-flex size-5 items-center justify-center rounded-sm text-secondary-text","focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-inp-focus-border","disabled:pointer-events-none"],y0=["flex flex-col gap-1.5 pr-10 text-left"],C0=["flex flex-col-reverse sm:flex-row sm:justify-end gap-4 [&>*]:flex-1"],w0=["relative pb-3 tracking-normal text-lg font-medium text-primary-text","after:pointer-events-none after:absolute after:bottom-0 after:h-px after:-left-6 after:-right-16 after:bg-delicate-border"],S0=["tracking-normal text-sm font-normal text-secondary-text"],Kf=g0,R0=m0,Yf=h0,E0=qf,_a=({className:e,...t})=>v.jsx(Hf,{className:L(...b0,e),...t});_a.displayName=Hf.displayName;const Aa=({className:e,children:t,showCloseButton:n=!0,...r})=>v.jsxs(Yf,{children:[v.jsx(_a,{}),v.jsxs(Bf,{className:L(...v0,e),...r,children:[t,n&&v.jsxs(qf,{className:L(...x0),children:[v.jsx(Ut,{type:"close",viewBox:"3.2 3.2 17.1 17.1"}),v.jsx("span",{className:"sr-only",children:"Close"})]})]})]});Aa.displayName=Bf.displayName;const Ta=({className:e,...t})=>v.jsx("div",{className:L(...y0,e),...t});Ta.displayName="DialogHeader";const Ma=({className:e,...t})=>v.jsx("div",{className:L(...C0,e),...t});Ma.displayName="DialogFooter";const Da=({className:e,...t})=>v.jsx(Wf,{className:L(...w0,e),...t});Da.displayName=Wf.displayName;const Xf=({className:e,...t})=>v.jsx(Uf,{className:L(...S0,e),...t});Xf.displayName=Uf.displayName;const I0=_e(["flex h-9 w-full cursor-pointer items-center rounded-xl transition-colors","disabled:pointer-events-none disabled:opacity-50"].join(" "),{variants:{collapsed:{true:"justify-center px-0",false:"justify-start gap-3 px-2"},active:{true:`bg-primary-inverse-bg text-primary-inverse-text hover:bg-primary-inverse-bg
148
- hover:text-primary-inverse-text`,false:"text-secondary-text hover:bg-primary-hover-bg hover:text-primary-text"}},defaultVariants:{collapsed:!1,active:!1}}),k0=qe("body-sm-medium"),Zf=({icon:e,label:t,badge:n,active:r=!1,collapsed:o=!1,disabled:s=!1,onAction:i,className:a,...l})=>{const c=L(I0({active:r,collapsed:o}),s&&"pointer-events-none opacity-50",a),d=v.jsxs(v.Fragment,{children:[v.jsx("span",{className:"shrink-0 text-inherit [&_svg]:size-5 [&_svg]:shrink-0",children:e}),!o&&t&&v.jsx("span",{className:k0,children:t}),!o&&n&&v.jsx("span",{className:"ml-auto shrink-0",children:n})]});if("href"in l&&typeof l.href=="string"){const{href:f,rel:h,target:m,...b}=l,y=m==="_blank"?[h,"noopener","noreferrer"].filter(Boolean).join(" "):h;return v.jsx("a",{href:f,target:m,rel:y,"aria-disabled":s||void 0,tabIndex:s?-1:void 0,className:c,onClick:x=>{if(s){x.preventDefault();return}i?.()},...b,children:d})}const{type:p="button",...g}=l;return v.jsx("button",{type:p,disabled:s,className:c,onClick:()=>i?.(),...g,children:d})},N0=_e("px-2.5 py-3",{variants:{divider:{true:"",false:""}},defaultVariants:{divider:!1}}),P0=[qe("body-xs-medium"),"mb-1 px-2 text-secondary-text uppercase"].join(" "),Qf=({title:e,divider:t=!1,collapsed:n=!1,className:r,children:o,...s})=>v.jsxs("section",{className:L(N0({divider:t}),r),...s,children:[!n&&e&&v.jsx("p",{className:P0,children:e}),v.jsx("div",{className:"space-y-1",children:o})]}),Fa=({className:e,...t})=>v.jsx("nav",{role:"navigation","aria-label":"pagination",className:L("mx-auto flex w-full justify-center",e),...t});Fa.displayName="Pagination";const Va=({className:e,ref:t,...n})=>v.jsx("ul",{ref:t,className:L("flex flex-row items-center gap-1",e),...n});Va.displayName="PaginationContent";const jn=({className:e,ref:t,...n})=>v.jsx("li",{ref:t,className:L("",e),...n});jn.displayName="PaginationItem";const Er=({className:e,isActive:t,size:n=null,...r})=>v.jsx("a",{"aria-current":t?"page":void 0,className:L(Di({size:n}),e),...r});Er.displayName="PaginationLink";const Jf=({className:e,...t})=>v.jsxs(Er,{"aria-label":"Go to previous page",size:"md",className:L("gap-1 pl-2.5",e),...t,children:[v.jsx(uu,{className:"h-4 w-4"}),v.jsx("span",{children:"Previous"})]});Jf.displayName="PaginationPrevious";const ep=({className:e,...t})=>v.jsxs(Er,{"aria-label":"Go to next page",size:"md",className:L("gap-1 pr-2.5",e),...t,children:[v.jsx("span",{children:"Next"}),v.jsx(du,{className:"h-4 w-4"})]});ep.displayName="PaginationNext";const tp=({className:e,...t})=>v.jsxs("span",{"aria-hidden":!0,className:L("flex h-9 w-9 items-center justify-center",e),...t,children:[v.jsx(fu,{className:"h-4 w-4"}),v.jsx("span",{className:"sr-only",children:"More pages"})]});tp.displayName="PaginationEllipsis";function O0(e,t=[]){let n=[];function r(s,i){const a=u.createContext(i);a.displayName=s+"Context";const l=n.length;n=[...n,i];const c=p=>{const{scope:g,children:f,...h}=p,m=g?.[e]?.[l]||a,b=u.useMemo(()=>h,Object.values(h));return v.jsx(m.Provider,{value:b,children:f})};c.displayName=s+"Provider";function d(p,g){const f=g?.[e]?.[l]||a,h=u.useContext(f);if(h)return h;if(i!==void 0)return i;throw new Error(`\`${p}\` must be used within \`${s}\``)}return[c,d]}const o=()=>{const s=n.map(i=>u.createContext(i));return function(a){const l=a?.[e]||s;return u.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return o.scopeName=e,[r,_0(o,...t)]}function _0(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const i=r.reduce((a,{useScope:l,scopeName:c})=>{const p=l(s)[`__scope${c}`];return{...a,...p}},{});return u.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}var La="Progress",ja=100,[A0]=O0(La),[T0,M0]=A0(La),np=u.forwardRef((e,t)=>{const{__scopeProgress:n,value:r=null,max:o,getValueLabel:s=D0,...i}=e;(o||o===0)&&!Cc(o)&&console.error(F0(`${o}`,"Progress"));const a=Cc(o)?o:ja;r!==null&&!wc(r,a)&&console.error(V0(`${r}`,"Progress"));const l=wc(r,a)?r:null,c=Po(l)?s(l,a):void 0;return v.jsx(T0,{scope:n,value:l,max:a,children:v.jsx(qo.div,{"aria-valuemax":a,"aria-valuemin":0,"aria-valuenow":Po(l)?l:void 0,"aria-valuetext":c,role:"progressbar","data-state":sp(l,a),"data-value":l??void 0,"data-max":a,...i,ref:t})})});np.displayName=La;var rp="ProgressIndicator",op=u.forwardRef((e,t)=>{const{__scopeProgress:n,...r}=e,o=M0(rp,n);return v.jsx(qo.div,{"data-state":sp(o.value,o.max),"data-value":o.value??void 0,"data-max":o.max,...r,ref:t})});op.displayName=rp;function D0(e,t){return`${Math.round(e/t*100)}%`}function sp(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function Po(e){return typeof e=="number"}function Cc(e){return Po(e)&&!isNaN(e)&&e>0}function wc(e,t){return Po(e)&&!isNaN(e)&&e<=t&&e>=0}function F0(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${ja}\`.`}function V0(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
147
+ For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return v.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},hz="DialogDescriptionWarning",mz=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${$O(hz).contentName}}.`;return v.useEffect(()=>{const o=e.current?.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},gz=SO,vz=OO,yz=_O,LO=AO,FO=RO,VO=kO,zO=TO,BO=DO;const bz=["data-open:animate-in data-closed:animate-out data-closed:fade-out-0","data-open:fade-in-0 duration-100","bg-primary-inverse-bg/20 fixed inset-0 isolate z-30"],xz=["fixed left-[50%] top-[50%] z-50 grid translate-x-[-50%]","translate-y-[-50%] gap-8 bg-primary-bg p-6 shadow-[0px_10px_40px_0px_rgba(0,0,0,0.15)] duration-200","rounded-[8px] w-max","[&>[data-base-ui-portal]]:absolute [&>[data-base-ui-portal]]:h-0 [&>[data-base-ui-portal]]:w-0 [&>[data-base-ui-portal]]:overflow-visible","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0","data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95","data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%]"],wz=["absolute cursor-pointer right-6 top-7 inline-flex size-5 items-center justify-center rounded-sm text-secondary-text","focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-inp-focus-border","disabled:pointer-events-none"],Cz=["flex flex-col gap-1.5 pr-10 text-left"],Sz=["flex flex-col-reverse sm:flex-row sm:justify-end gap-4 [&>*]:flex-1"],Ez=["relative pb-3 tracking-normal text-lg font-medium text-primary-text","after:pointer-events-none after:absolute after:bottom-0 after:h-px after:-left-6 after:-right-16 after:bg-delicate-border"],Oz=["tracking-normal text-sm font-normal text-secondary-text"],HO=gz,Pz=vz,GO=yz,_z=BO,cg=({className:e,...t})=>C.jsx(LO,{className:q(...bz,e),...t});cg.displayName=LO.displayName;const fg=({className:e,children:t,showCloseButton:n=!0,...r})=>C.jsxs(GO,{children:[C.jsx(cg,{}),C.jsxs(FO,{className:q(...xz,e),...r,children:[t,n&&C.jsxs(BO,{className:q(...wz),children:[C.jsx(Or,{type:"close",viewBox:"3.2 3.2 17.1 17.1"}),C.jsx("span",{className:"sr-only",children:"Close"})]})]})]});fg.displayName=FO.displayName;const dg=({className:e,...t})=>C.jsx("div",{className:q(...Cz,e),...t});dg.displayName="DialogHeader";const pg=({className:e,...t})=>C.jsx("div",{className:q(...Sz,e),...t});pg.displayName="DialogFooter";const hg=({className:e,...t})=>C.jsx(VO,{className:q(...Ez,e),...t});hg.displayName=VO.displayName;const WO=({className:e,...t})=>C.jsx(zO,{className:q(...Oz,e),...t});WO.displayName=zO.displayName;const Az=Ve(["flex h-9 w-full cursor-pointer items-center rounded-xl transition-colors","disabled:pointer-events-none disabled:opacity-50"].join(" "),{variants:{collapsed:{true:"justify-center px-0",false:"justify-start gap-3 px-2"},active:{true:`bg-primary-inverse-bg text-primary-inverse-text hover:bg-primary-inverse-bg
148
+ hover:text-primary-inverse-text`,false:"text-secondary-text hover:bg-primary-hover-bg hover:text-primary-text"}},defaultVariants:{collapsed:!1,active:!1}}),Rz=vt("body-sm-medium"),UO=({icon:e,label:t,badge:n,active:r=!1,collapsed:o=!1,disabled:i=!1,onAction:a,className:s,...l})=>{const u=q(Az({active:r,collapsed:o}),i&&"pointer-events-none opacity-50",s),c=C.jsxs(C.Fragment,{children:[C.jsx("span",{className:"shrink-0 text-inherit [&_svg]:size-5 [&_svg]:shrink-0",children:e}),!o&&t&&C.jsx("span",{className:Rz,children:t}),!o&&n&&C.jsx("span",{className:"ml-auto shrink-0",children:n})]});if("href"in l&&typeof l.href=="string"){const{href:d,rel:m,target:g,...h}=l,y=g==="_blank"?[m,"noopener","noreferrer"].filter(Boolean).join(" "):m;return C.jsx("a",{href:d,target:g,rel:y,"aria-disabled":i||void 0,tabIndex:i?-1:void 0,className:u,onClick:b=>{if(i){b.preventDefault();return}a?.()},...h,children:c})}const{type:f="button",...p}=l;return C.jsx("button",{type:f,disabled:i,className:u,onClick:()=>a?.(),...p,children:c})},Iz=Ve("px-2.5 py-3",{variants:{divider:{true:"",false:""}},defaultVariants:{divider:!1}}),kz=[vt("body-xs-medium"),"mb-1 px-2 text-secondary-text uppercase"].join(" "),qO=({title:e,divider:t=!1,collapsed:n=!1,className:r,children:o,...i})=>C.jsxs("section",{className:q(Iz({divider:t}),r),...i,children:[!n&&e&&C.jsx("p",{className:kz,children:e}),C.jsx("div",{className:"space-y-1",children:o})]}),mg=({className:e,...t})=>C.jsx("nav",{role:"navigation","aria-label":"pagination",className:q("mx-auto flex w-full justify-center",e),...t});mg.displayName="Pagination";const gg=({className:e,ref:t,...n})=>C.jsx("ul",{ref:t,className:q("flex flex-row items-center gap-1",e),...n});gg.displayName="PaginationContent";const Pi=({className:e,ref:t,...n})=>C.jsx("li",{ref:t,className:q("",e),...n});Pi.displayName="PaginationItem";const ds=({className:e,isActive:t,size:n=null,...r})=>C.jsx("a",{"aria-current":t?"page":void 0,className:q(hm({size:n}),e),...r});ds.displayName="PaginationLink";const KO=({className:e,...t})=>C.jsxs(ds,{"aria-label":"Go to previous page",size:"md",className:q("gap-1 pl-2.5",e),...t,children:[C.jsx(iE,{className:"h-4 w-4"}),C.jsx("span",{children:"Previous"})]});KO.displayName="PaginationPrevious";const YO=({className:e,...t})=>C.jsxs(ds,{"aria-label":"Go to next page",size:"md",className:q("gap-1 pr-2.5",e),...t,children:[C.jsx("span",{children:"Next"}),C.jsx(aE,{className:"h-4 w-4"})]});YO.displayName="PaginationNext";const XO=({className:e,...t})=>C.jsxs("span",{"aria-hidden":!0,className:q("flex h-9 w-9 items-center justify-center",e),...t,children:[C.jsx(sE,{className:"h-4 w-4"}),C.jsx("span",{className:"sr-only",children:"More pages"})]});XO.displayName="PaginationEllipsis";function Nz(e,t=[]){let n=[];function r(i,a){const s=v.createContext(a);s.displayName=i+"Context";const l=n.length;n=[...n,a];const u=f=>{const{scope:p,children:d,...m}=f,g=p?.[e]?.[l]||s,h=v.useMemo(()=>m,Object.values(m));return C.jsx(g.Provider,{value:h,children:d})};u.displayName=i+"Provider";function c(f,p){const d=p?.[e]?.[l]||s,m=v.useContext(d);if(m)return m;if(a!==void 0)return a;throw new Error(`\`${f}\` must be used within \`${i}\``)}return[u,c]}const o=()=>{const i=n.map(a=>v.createContext(a));return function(s){const l=s?.[e]||i;return v.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return o.scopeName=e,[r,Tz(o,...t)]}function Tz(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const a=r.reduce((s,{useScope:l,scopeName:u})=>{const f=l(i)[`__scope${u}`];return{...s,...f}},{});return v.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}var vg="Progress",yg=100,[Mz]=Nz(vg),[Dz,jz]=Mz(vg),ZO=v.forwardRef((e,t)=>{const{__scopeProgress:n,value:r=null,max:o,getValueLabel:i=$z,...a}=e;(o||o===0)&&!Nb(o)&&console.error(Lz(`${o}`,"Progress"));const s=Nb(o)?o:yg;r!==null&&!Tb(r,s)&&console.error(Fz(`${r}`,"Progress"));const l=Tb(r,s)?r:null,u=au(l)?i(l,s):void 0;return C.jsx(Dz,{scope:n,value:l,max:s,children:C.jsx(yc.div,{"aria-valuemax":s,"aria-valuemin":0,"aria-valuenow":au(l)?l:void 0,"aria-valuetext":u,role:"progressbar","data-state":eP(l,s),"data-value":l??void 0,"data-max":s,...a,ref:t})})});ZO.displayName=vg;var QO="ProgressIndicator",JO=v.forwardRef((e,t)=>{const{__scopeProgress:n,...r}=e,o=jz(QO,n);return C.jsx(yc.div,{"data-state":eP(o.value,o.max),"data-value":o.value??void 0,"data-max":o.max,...r,ref:t})});JO.displayName=QO;function $z(e,t){return`${Math.round(e/t*100)}%`}function eP(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function au(e){return typeof e=="number"}function Nb(e){return au(e)&&!isNaN(e)&&e>0}function Tb(e,t){return au(e)&&!isNaN(e)&&e<=t&&e>=0}function Lz(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${yg}\`.`}function Fz(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
149
149
  - a positive number
150
- - less than the value passed to \`max\` (or ${ja} if no \`max\` prop is set)
150
+ - less than the value passed to \`max\` (or ${yg} if no \`max\` prop is set)
151
151
  - \`null\` or \`undefined\` if the progress is indeterminate.
152
152
 
153
- Defaulting to \`null\`.`}var ip=np,L0=op;const ap=({className:e,value:t=0,max:n=100,ref:r,...o})=>{const s=Math.min(n,Math.max(0,Number(t))),i=s/n*100,a=i>=100,l=`${Math.round(i)}%`;return v.jsxs("div",{className:"flex items-center gap-1",children:[v.jsx(ip,{ref:r,value:s,max:n,className:L("bg-primary-inverse-bg/20 relative h-1.5 w-full overflow-hidden rounded-full",e),...o,children:v.jsx(L0,{className:L("h-full w-full flex-1 rounded-[0.75rem] transition-all",a?"bg-success-text":"bg-primary-inverse-bg"),style:{transform:`translateX(-${n-i}%)`}})}),v.jsx("p",{className:L("text-center",qe("body-xs-regular"),a?"text-success-text":"text-primary-text"),children:l})]})};ap.displayName=ip.displayName;function j0(e){const t=e+"CollectionProvider",[n,r]=Vt(t),[o,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=m=>{const{scope:b,children:y}=m,x=Te.useRef(null),w=Te.useRef(new Map).current;return v.jsx(o,{scope:b,itemMap:w,collectionRef:x,children:y})};i.displayName=t;const a=e+"CollectionSlot",l=po(a),c=Te.forwardRef((m,b)=>{const{scope:y,children:x}=m,w=s(a,y),C=He(b,w.collectionRef);return v.jsx(l,{ref:C,children:x})});c.displayName=a;const d=e+"CollectionItemSlot",p="data-radix-collection-item",g=po(d),f=Te.forwardRef((m,b)=>{const{scope:y,children:x,...w}=m,C=Te.useRef(null),S=He(b,C),I=s(d,y);return Te.useEffect(()=>(I.itemMap.set(C,{ref:C,...w}),()=>{I.itemMap.delete(C)})),v.jsx(g,{[p]:"",ref:S,children:x})});f.displayName=d;function h(m){const b=s(e+"CollectionConsumer",m);return Te.useCallback(()=>{const x=b.collectionRef.current;if(!x)return[];const w=Array.from(x.querySelectorAll(`[${p}]`));return Array.from(b.itemMap.values()).sort((I,E)=>w.indexOf(I.ref.current)-w.indexOf(E.ref.current))},[b.collectionRef,b.itemMap])}return[{Provider:i,Slot:c,ItemSlot:f},h,r]}var $0=u.createContext(void 0);function $a(e){const t=u.useContext($0);return e||t||"ltr"}var Gs="rovingFocusGroup.onEntryFocus",z0={bubbles:!1,cancelable:!0},Ir="RovingFocusGroup",[wi,lp,G0]=j0(Ir),[H0,Jo]=Vt(Ir,[G0]),[B0,W0]=H0(Ir),cp=u.forwardRef((e,t)=>v.jsx(wi.Provider,{scope:e.__scopeRovingFocusGroup,children:v.jsx(wi.Slot,{scope:e.__scopeRovingFocusGroup,children:v.jsx(U0,{...e,ref:t})})}));cp.displayName=Ir;var U0=u.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:s,currentTabStopId:i,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:l,onEntryFocus:c,preventScrollOnEntryFocus:d=!1,...p}=e,g=u.useRef(null),f=He(t,g),h=$a(s),[m,b]=_n({prop:i,defaultProp:a??null,onChange:l,caller:Ir}),[y,x]=u.useState(!1),w=Nn(c),C=lp(n),S=u.useRef(!1),[I,E]=u.useState(0);return u.useEffect(()=>{const R=g.current;if(R)return R.addEventListener(Gs,w),()=>R.removeEventListener(Gs,w)},[w]),v.jsx(B0,{scope:n,orientation:r,dir:h,loop:o,currentTabStopId:m,onItemFocus:u.useCallback(R=>b(R),[b]),onItemShiftTab:u.useCallback(()=>x(!0),[]),onFocusableItemAdd:u.useCallback(()=>E(R=>R+1),[]),onFocusableItemRemove:u.useCallback(()=>E(R=>R-1),[]),children:v.jsx(Ae.div,{tabIndex:y||I===0?-1:0,"data-orientation":r,...p,ref:f,style:{outline:"none",...e.style},onMouseDown:Oe(e.onMouseDown,()=>{S.current=!0}),onFocus:Oe(e.onFocus,R=>{const F=!S.current;if(R.target===R.currentTarget&&F&&!y){const N=new CustomEvent(Gs,z0);if(R.currentTarget.dispatchEvent(N),!N.defaultPrevented){const T=C().filter(P=>P.focusable),_=T.find(P=>P.active),q=T.find(P=>P.id===m),H=[_,q,...T].filter(Boolean).map(P=>P.ref.current);fp(H,d)}}S.current=!1}),onBlur:Oe(e.onBlur,()=>x(!1))})})}),up="RovingFocusGroupItem",dp=u.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:s,children:i,...a}=e,l=Hn(),c=s||l,d=W0(up,n),p=d.currentTabStopId===c,g=lp(n),{onFocusableItemAdd:f,onFocusableItemRemove:h,currentTabStopId:m}=d;return u.useEffect(()=>{if(r)return f(),()=>h()},[r,f,h]),v.jsx(wi.ItemSlot,{scope:n,id:c,focusable:r,active:o,children:v.jsx(Ae.span,{tabIndex:p?0:-1,"data-orientation":d.orientation,...a,ref:t,onMouseDown:Oe(e.onMouseDown,b=>{r?d.onItemFocus(c):b.preventDefault()}),onFocus:Oe(e.onFocus,()=>d.onItemFocus(c)),onKeyDown:Oe(e.onKeyDown,b=>{if(b.key==="Tab"&&b.shiftKey){d.onItemShiftTab();return}if(b.target!==b.currentTarget)return;const y=Y0(b,d.orientation,d.dir);if(y!==void 0){if(b.metaKey||b.ctrlKey||b.altKey||b.shiftKey)return;b.preventDefault();let w=g().filter(C=>C.focusable).map(C=>C.ref.current);if(y==="last")w.reverse();else if(y==="prev"||y==="next"){y==="prev"&&w.reverse();const C=w.indexOf(b.currentTarget);w=d.loop?X0(w,C+1):w.slice(C+1)}setTimeout(()=>fp(w))}}),children:typeof i=="function"?i({isCurrentTabStop:p,hasTabStop:m!=null}):i})})});dp.displayName=up;var q0={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function K0(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Y0(e,t,n){const r=K0(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return q0[r]}function fp(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function X0(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var pp=cp,gp=dp,za="Radio",[Z0,mp]=Vt(za),[Q0,J0]=Z0(za),hp=u.forwardRef((e,t)=>{const{__scopeRadio:n,name:r,checked:o=!1,required:s,disabled:i,value:a="on",onCheck:l,form:c,...d}=e,[p,g]=u.useState(null),f=He(t,b=>g(b)),h=u.useRef(!1),m=p?c||!!p.closest("form"):!0;return v.jsxs(Q0,{scope:n,checked:o,disabled:i,children:[v.jsx(Ae.button,{type:"button",role:"radio","aria-checked":o,"data-state":yp(o),"data-disabled":i?"":void 0,disabled:i,value:a,...d,ref:f,onClick:Oe(e.onClick,b=>{o||l?.(),m&&(h.current=b.isPropagationStopped(),h.current||b.stopPropagation())})}),m&&v.jsx(xp,{control:p,bubbles:!h.current,name:r,value:a,checked:o,required:s,disabled:i,form:c,style:{transform:"translateX(-100%)"}})]})});hp.displayName=za;var bp="RadioIndicator",vp=u.forwardRef((e,t)=>{const{__scopeRadio:n,forceMount:r,...o}=e,s=J0(bp,n);return v.jsx(Kt,{present:r||s.checked,children:v.jsx(Ae.span,{"data-state":yp(s.checked),"data-disabled":s.disabled?"":void 0,...o,ref:t})})});vp.displayName=bp;var eR="RadioBubbleInput",xp=u.forwardRef(({__scopeRadio:e,control:t,checked:n,bubbles:r=!0,...o},s)=>{const i=u.useRef(null),a=He(i,s),l=Fi(n),c=Ao(t);return u.useEffect(()=>{const d=i.current;if(!d)return;const p=window.HTMLInputElement.prototype,f=Object.getOwnPropertyDescriptor(p,"checked").set;if(l!==n&&f){const h=new Event("click",{bubbles:r});f.call(d,n),d.dispatchEvent(h)}},[l,n,r]),v.jsx(Ae.input,{type:"radio","aria-hidden":!0,defaultChecked:n,...o,tabIndex:-1,ref:a,style:{...o.style,...c,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});xp.displayName=eR;function yp(e){return e?"checked":"unchecked"}var tR=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],es="RadioGroup",[nR]=Vt(es,[Jo,mp]),Cp=Jo(),wp=mp(),[rR,oR]=nR(es),Sp=u.forwardRef((e,t)=>{const{__scopeRadioGroup:n,name:r,defaultValue:o,value:s,required:i=!1,disabled:a=!1,orientation:l,dir:c,loop:d=!0,onValueChange:p,...g}=e,f=Cp(n),h=$a(c),[m,b]=_n({prop:s,defaultProp:o??null,onChange:p,caller:es});return v.jsx(rR,{scope:n,name:r,required:i,disabled:a,value:m,onValueChange:b,children:v.jsx(pp,{asChild:!0,...f,orientation:l,dir:h,loop:d,children:v.jsx(Ae.div,{role:"radiogroup","aria-required":i,"aria-orientation":l,"data-disabled":a?"":void 0,dir:h,...g,ref:t})})})});Sp.displayName=es;var Rp="RadioGroupItem",Ep=u.forwardRef((e,t)=>{const{__scopeRadioGroup:n,disabled:r,...o}=e,s=oR(Rp,n),i=s.disabled||r,a=Cp(n),l=wp(n),c=u.useRef(null),d=He(t,c),p=s.value===o.value,g=u.useRef(!1);return u.useEffect(()=>{const f=m=>{tR.includes(m.key)&&(g.current=!0)},h=()=>g.current=!1;return document.addEventListener("keydown",f),document.addEventListener("keyup",h),()=>{document.removeEventListener("keydown",f),document.removeEventListener("keyup",h)}},[]),v.jsx(gp,{asChild:!0,...a,focusable:!i,active:p,children:v.jsx(hp,{disabled:i,required:s.required,checked:p,...l,...o,name:s.name,ref:d,onCheck:()=>s.onValueChange(o.value),onKeyDown:Oe(f=>{f.key==="Enter"&&f.preventDefault()}),onFocus:Oe(o.onFocus,()=>{g.current&&c.current?.click()})})})});Ep.displayName=Rp;var sR="RadioGroupIndicator",Ip=u.forwardRef((e,t)=>{const{__scopeRadioGroup:n,...r}=e,o=wp(n);return v.jsx(vp,{...o,...r,ref:t})});Ip.displayName=sR;var kp=Sp,Np=Ep,iR=Ip;const aR=["grid gap-2"],lR=["group size-5 cursor-pointer place-content-center rounded-full border transition-colors duration-200","border-inp-hover-border bg-primary-bg","data-[state=checked]:border-primary-text","enabled:hover:border-inp-hover-border enabled:hover:bg-tertiary-bg","enabled:hover:data-[state=checked]:border-inp-hover-border enabled:hover:data-[state=checked]:bg-tertiary-bg","disabled:cursor-not-allowed disabled:border-disabled-border disabled:bg-disabled-bg","disabled:data-[state=checked]:border-disabled-border disabled:data-[state=checked]:bg-disabled-bg","focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-inp-focus-border"],cR=["flex items-center justify-center"],uR=["size-2.5 rounded-full bg-primary-text transition-colors duration-200","group-hover:bg-secondary-text","group-disabled:bg-disabled-text"],Ga=({className:e,ref:t,...n})=>v.jsx(kp,{className:L(aR,e),...n,ref:t});Ga.displayName=kp.displayName;const Oo=({className:e,ref:t,...n})=>v.jsx(Np,{ref:t,className:L(lR,e),...n,children:v.jsx(iR,{className:L(cR),children:v.jsx("span",{className:L(uR)})})});Oo.displayName=Np.displayName;var ts="Switch",[dR]=Vt(ts),[fR,pR]=dR(ts),Pp=u.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:o,defaultChecked:s,required:i,disabled:a,value:l="on",onCheckedChange:c,form:d,...p}=e,[g,f]=u.useState(null),h=He(t,w=>f(w)),m=u.useRef(!1),b=g?d||!!g.closest("form"):!0,[y,x]=_n({prop:o,defaultProp:s??!1,onChange:c,caller:ts});return v.jsxs(fR,{scope:n,checked:y,disabled:a,children:[v.jsx(Ae.button,{type:"button",role:"switch","aria-checked":y,"aria-required":i,"data-state":Tp(y),"data-disabled":a?"":void 0,disabled:a,value:l,...p,ref:h,onClick:Oe(e.onClick,w=>{x(C=>!C),b&&(m.current=w.isPropagationStopped(),m.current||w.stopPropagation())})}),b&&v.jsx(Ap,{control:g,bubbles:!m.current,name:r,value:l,checked:y,required:i,disabled:a,form:d,style:{transform:"translateX(-100%)"}})]})});Pp.displayName=ts;var Op="SwitchThumb",_p=u.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,o=pR(Op,n);return v.jsx(Ae.span,{"data-state":Tp(o.checked),"data-disabled":o.disabled?"":void 0,...r,ref:t})});_p.displayName=Op;var gR="SwitchBubbleInput",Ap=u.forwardRef(({__scopeSwitch:e,control:t,checked:n,bubbles:r=!0,...o},s)=>{const i=u.useRef(null),a=He(i,s),l=Fi(n),c=Ao(t);return u.useEffect(()=>{const d=i.current;if(!d)return;const p=window.HTMLInputElement.prototype,f=Object.getOwnPropertyDescriptor(p,"checked").set;if(l!==n&&f){const h=new Event("click",{bubbles:r});f.call(d,n),d.dispatchEvent(h)}},[l,n,r]),v.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...o,tabIndex:-1,ref:a,style:{...o.style,...c,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});Ap.displayName=gR;function Tp(e){return e?"checked":"unchecked"}var Mp=Pp,mR=_p;const hR=["peer group relative inline-flex h-6 w-12 shrink-0 cursor-pointer items-center rounded-full border p-1 transition-colors","border-inp-default-border bg-primary-bg","enabled:hover:border-inp-hover-border","data-[state=checked]:bg-primary-inverse-bg","data-[state=checked]:border-inp-default-border enabled:hover:data-[state=checked]:border-inp-hover-border","disabled:cursor-not-allowed disabled:border-disabled-border disabled:bg-disabled-bg","disabled:data-[state=checked]:border-disabled-border disabled:data-[state=checked]:bg-disabled-bg","focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-inp-focus-border"],bR=["pointer-events-none block size-4 rounded-full transition-transform","bg-primary-inverse-bg data-[state=checked]:translate-x-6 data-[state=checked]:bg-primary-bg","group-disabled:bg-disabled-text group-disabled:data-[state=checked]:bg-disabled-text"],Dp=({className:e,ref:t,...n})=>v.jsx(Mp,{className:L(hR,e),...n,ref:t,children:v.jsx(mR,{className:L(bR)})});Dp.displayName=Mp.displayName;const Ha=({ref:e,className:t,...n})=>v.jsx("div",{className:"relative w-full overflow-auto",children:v.jsx("table",{ref:e,className:L("w-full caption-bottom text-sm",t),...n})});Ha.displayName="Table";const Ba=({ref:e,className:t,...n})=>v.jsx("thead",{ref:e,className:L("text-primary-text [&_tr]:border-b",t),...n});Ba.displayName="TableHeader";const Wa=({ref:e,className:t,...n})=>v.jsx("tbody",{ref:e,className:L(t),...n});Wa.displayName="TableBody";const Fp=({ref:e,className:t,...n})=>v.jsx("tfoot",{ref:e,className:L("bg-muted/50 border-t font-medium",t),...n});Fp.displayName="TableFooter";const fr=({ref:e,className:t,...n})=>v.jsx("tr",{ref:e,className:L(`hover:bg-muted/50 data-[state=selected]:bg-muted border-delicate-border border-b
154
- transition-colors`,t),...n});fr.displayName="TableRow";const Ua=({ref:e,className:t,...n})=>v.jsx("th",{ref:e,className:L(`text-muted-foreground h-10 px-6.25 text-left align-middle font-medium
155
- [&:has([role=checkbox])]:pr-0 *:[[role=checkbox]]:translate-y-0.5`,t),...n});Ua.displayName="TableHead";const _o=({ref:e,className:t,...n})=>v.jsx("td",{ref:e,className:L(`px-6.25 pt-6 pb-3.5 align-middle [&:has([role=checkbox])]:pr-0
156
- *:[[role=checkbox]]:translate-y-0.5`,t),...n});_o.displayName="TableCell";const Vp=({ref:e,className:t,...n})=>v.jsx("caption",{ref:e,className:L("text-muted-foreground mt-4 text-sm",t),...n});Vp.displayName="TableCaption";var ns="Tabs",[vR]=Vt(ns,[Jo]),Lp=Jo(),[xR,qa]=vR(ns),jp=u.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:o,defaultValue:s,orientation:i="horizontal",dir:a,activationMode:l="automatic",...c}=e,d=$a(a),[p,g]=_n({prop:r,onChange:o,defaultProp:s??"",caller:ns});return v.jsx(xR,{scope:n,baseId:Hn(),value:p,onValueChange:g,orientation:i,dir:d,activationMode:l,children:v.jsx(Ae.div,{dir:d,"data-orientation":i,...c,ref:t})})});jp.displayName=ns;var $p="TabsList",zp=u.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...o}=e,s=qa($p,n),i=Lp(n);return v.jsx(pp,{asChild:!0,...i,orientation:s.orientation,dir:s.dir,loop:r,children:v.jsx(Ae.div,{role:"tablist","aria-orientation":s.orientation,...o,ref:t})})});zp.displayName=$p;var Gp="TabsTrigger",Hp=u.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:o=!1,...s}=e,i=qa(Gp,n),a=Lp(n),l=Up(i.baseId,r),c=qp(i.baseId,r),d=r===i.value;return v.jsx(gp,{asChild:!0,...a,focusable:!o,active:d,children:v.jsx(Ae.button,{type:"button",role:"tab","aria-selected":d,"aria-controls":c,"data-state":d?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:l,...s,ref:t,onMouseDown:Oe(e.onMouseDown,p=>{!o&&p.button===0&&p.ctrlKey===!1?i.onValueChange(r):p.preventDefault()}),onKeyDown:Oe(e.onKeyDown,p=>{[" ","Enter"].includes(p.key)&&i.onValueChange(r)}),onFocus:Oe(e.onFocus,()=>{const p=i.activationMode!=="manual";!d&&!o&&p&&i.onValueChange(r)})})})});Hp.displayName=Gp;var Bp="TabsContent",Wp=u.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:o,children:s,...i}=e,a=qa(Bp,n),l=Up(a.baseId,r),c=qp(a.baseId,r),d=r===a.value,p=u.useRef(d);return u.useEffect(()=>{const g=requestAnimationFrame(()=>p.current=!1);return()=>cancelAnimationFrame(g)},[]),v.jsx(Kt,{present:o||d,children:({present:g})=>v.jsx(Ae.div,{"data-state":d?"active":"inactive","data-orientation":a.orientation,role:"tabpanel","aria-labelledby":l,hidden:!g,id:c,tabIndex:0,...i,ref:t,style:{...e.style,animationDuration:p.current?"0s":void 0},children:g&&s})})});Wp.displayName=Bp;function Up(e,t){return`${e}-trigger-${t}`}function qp(e,t){return`${e}-content-${t}`}var yR=jp,Kp=zp,Yp=Hp,Xp=Wp;const CR=_e(["text-primary-text inline-flex items-stretch","data-[orientation=horizontal]:w-full data-[orientation=horizontal]:gap-1","data-[orientation=vertical]:h-fit data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col data-[orientation=vertical]:gap-1"].join(" "),{variants:{variant:{default:["bg-tertiary-bg rounded-lg","data-[orientation=horizontal]:flex-row"].join(" "),line:["border-default-border border-b","data-[orientation=horizontal]:flex-row"].join(" ")}},defaultVariants:{variant:"default"}}),wR=_e(["inline-flex items-center justify-center whitespace-nowrap transition-all","focus-visible:ring-ring focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none","cursor-pointer disabled:pointer-events-none disabled:opacity-50","data-[orientation=horizontal]:h-full data-[orientation=horizontal]:w-full data-[orientation=horizontal]:flex-1","data-[orientation=vertical]:h-full data-[orientation=vertical]:w-full"].join(" "),{variants:{variant:{default:[qe("body-sm-medium"),"rounded-xl px-3 py-3","text-primary-text hover:bg-primary-hover-bg hover:text-primary-inverse-bg bg-transparent","data-[state=active]:bg-primary-inverse-bg data-[state=active]:text-primary-bg","active:text-primary-bg active:bg-neutral-500"].join(" "),line:[qe("body-sm-medium"),"-mb-px rounded-none border-b-2 border-transparent px-4 py-3","text-primary-inverse-bg hover:bg-primary-hover-bg hover:text-primary-inverse-bg","data-[state=active]:bg-primary-inverse-bg data-[state=active]:text-primary-bg","active:bg-secondary-inverse-text active:text-primary-bg"].join(" ")}},defaultVariants:{variant:"default"}}),Zp=u.createContext("default"),SR=yR,Qp=({ref:e,className:t,variant:n="default",...r})=>v.jsx(Zp,{value:n,children:v.jsx(Kp,{ref:e,className:L(CR({variant:n}),t),...r})});Qp.displayName=Kp.displayName;const Jp=({ref:e,className:t,variant:n,...r})=>{const o=u.use(Zp),s=n??o;return v.jsx(Yp,{ref:e,className:L(wR({variant:s}),t),...r})};Jp.displayName=Yp.displayName;const eg=({ref:e,className:t,...n})=>v.jsx(Xp,{ref:e,className:L(`text-primary-text focus-visible:ring-ring focus-visible:ring-2
157
- focus-visible:ring-offset-2 focus-visible:outline-none`,"data-[orientation=vertical]:flex-1",t),...n});eg.displayName=Xp.displayName;var RR="Arrow",tg=u.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...s}=e;return v.jsx(Ae.svg,{...s,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:v.jsx("polygon",{points:"0,0 30,0 15,10"})})});tg.displayName=RR;var ER=tg,Ka="Popper",[ng,rg]=Vt(Ka),[IR,og]=ng(Ka),sg=e=>{const{__scopePopper:t,children:n}=e,[r,o]=u.useState(null);return v.jsx(IR,{scope:t,anchor:r,onAnchorChange:o,children:n})};sg.displayName=Ka;var ig="PopperAnchor",ag=u.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,s=og(ig,n),i=u.useRef(null),a=He(t,i),l=u.useRef(null);return u.useEffect(()=>{const c=l.current;l.current=r?.current||i.current,c!==l.current&&s.onAnchorChange(l.current)}),r?null:v.jsx(Ae.div,{...o,ref:a})});ag.displayName=ig;var Ya="PopperContent",[kR,NR]=ng(Ya),lg=u.forwardRef((e,t)=>{const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:s="center",alignOffset:i=0,arrowPadding:a=0,avoidCollisions:l=!0,collisionBoundary:c=[],collisionPadding:d=0,sticky:p="partial",hideWhenDetached:g=!1,updatePositionStrategy:f="optimized",onPlaced:h,...m}=e,b=og(Ya,n),[y,x]=u.useState(null),w=He(t,Ee=>x(Ee)),[C,S]=u.useState(null),I=Ao(C),E=I?.width??0,R=I?.height??0,F=r+(s!=="center"?"-"+s:""),N=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},T=Array.isArray(c)?c:[c],_=T.length>0,q={padding:N,boundary:T.filter(OR),altBoundary:_},{refs:Y,floatingStyles:H,placement:P,isPositioned:B,middlewareData:z}=dd({strategy:"fixed",placement:F,whileElementsMounted:(...Ee)=>gi(...Ee,{animationFrame:f==="always"}),elements:{reference:b.anchor},middleware:[fd({mainAxis:o+R,alignmentAxis:i}),l&&pd({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?gd():void 0,...q}),l&&md({...q}),hd({...q,apply:({elements:Ee,rects:ke,availableWidth:X,availableHeight:me})=>{const{width:we,height:O}=ke.reference,M=Ee.floating.style;M.setProperty("--radix-popper-available-width",`${X}px`),M.setProperty("--radix-popper-available-height",`${me}px`),M.setProperty("--radix-popper-anchor-width",`${we}px`),M.setProperty("--radix-popper-anchor-height",`${O}px`)}}),C&&ky({element:C,padding:a}),_R({arrowWidth:E,arrowHeight:R}),g&&bd({strategy:"referenceHidden",...q})]}),[te,A]=dg(P),Re=Nn(h);dn(()=>{B&&Re?.()},[B,Re]);const ge=z.arrow?.x,Ce=z.arrow?.y,ae=z.arrow?.centerOffset!==0,[le,ve]=u.useState();return dn(()=>{y&&ve(window.getComputedStyle(y).zIndex)},[y]),v.jsx("div",{ref:Y.setFloating,"data-radix-popper-content-wrapper":"",style:{...H,transform:B?H.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:le,"--radix-popper-transform-origin":[z.transformOrigin?.x,z.transformOrigin?.y].join(" "),...z.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:v.jsx(kR,{scope:n,placedSide:te,onArrowChange:S,arrowX:ge,arrowY:Ce,shouldHideArrow:ae,children:v.jsx(Ae.div,{"data-side":te,"data-align":A,...m,ref:w,style:{...m.style,animation:B?void 0:"none"}})})})});lg.displayName=Ya;var cg="PopperArrow",PR={top:"bottom",right:"left",bottom:"top",left:"right"},ug=u.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,s=NR(cg,r),i=PR[s.placedSide];return v.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:v.jsx(ER,{...o,ref:n,style:{...o.style,display:"block"}})})});ug.displayName=cg;function OR(e){return e!==null}var _R=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:r,middlewareData:o}=t,i=o.arrow?.centerOffset!==0,a=i?0:e.arrowWidth,l=i?0:e.arrowHeight,[c,d]=dg(n),p={start:"0%",center:"50%",end:"100%"}[d],g=(o.arrow?.x??0)+a/2,f=(o.arrow?.y??0)+l/2;let h="",m="";return c==="bottom"?(h=i?p:`${g}px`,m=`${-l}px`):c==="top"?(h=i?p:`${g}px`,m=`${r.floating.height+l}px`):c==="right"?(h=`${-l}px`,m=i?p:`${f}px`):c==="left"&&(h=`${r.floating.width+l}px`,m=i?p:`${f}px`),{data:{x:h,y:m}}}});function dg(e){const[t,n="center"]=e.split("-");return[t,n]}var AR=sg,TR=ag,MR=lg,DR=ug,FR=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),VR="VisuallyHidden",fg=u.forwardRef((e,t)=>v.jsx(Ae.span,{...e,ref:t,style:{...FR,...e.style}}));fg.displayName=VR;var LR=fg,[rs]=Vt("Tooltip",[rg]),os=rg(),pg="TooltipProvider",jR=700,Si="tooltip.open",[$R,Xa]=rs(pg),gg=e=>{const{__scopeTooltip:t,delayDuration:n=jR,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:s}=e,i=u.useRef(!0),a=u.useRef(!1),l=u.useRef(0);return u.useEffect(()=>{const c=l.current;return()=>window.clearTimeout(c)},[]),v.jsx($R,{scope:t,isOpenDelayedRef:i,delayDuration:n,onOpen:u.useCallback(()=>{window.clearTimeout(l.current),i.current=!1},[]),onClose:u.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>i.current=!0,r)},[r]),isPointerInTransitRef:a,onPointerInTransitChange:u.useCallback(c=>{a.current=c},[]),disableHoverableContent:o,children:s})};gg.displayName=pg;var vr="Tooltip",[zR,kr]=rs(vr),mg=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o,onOpenChange:s,disableHoverableContent:i,delayDuration:a}=e,l=Xa(vr,e.__scopeTooltip),c=os(t),[d,p]=u.useState(null),g=Hn(),f=u.useRef(0),h=i??l.disableHoverableContent,m=a??l.delayDuration,b=u.useRef(!1),[y,x]=_n({prop:r,defaultProp:o??!1,onChange:E=>{E?(l.onOpen(),document.dispatchEvent(new CustomEvent(Si))):l.onClose(),s?.(E)},caller:vr}),w=u.useMemo(()=>y?b.current?"delayed-open":"instant-open":"closed",[y]),C=u.useCallback(()=>{window.clearTimeout(f.current),f.current=0,b.current=!1,x(!0)},[x]),S=u.useCallback(()=>{window.clearTimeout(f.current),f.current=0,x(!1)},[x]),I=u.useCallback(()=>{window.clearTimeout(f.current),f.current=window.setTimeout(()=>{b.current=!0,x(!0),f.current=0},m)},[m,x]);return u.useEffect(()=>()=>{f.current&&(window.clearTimeout(f.current),f.current=0)},[]),v.jsx(AR,{...c,children:v.jsx(zR,{scope:t,contentId:g,open:y,stateAttribute:w,trigger:d,onTriggerChange:p,onTriggerEnter:u.useCallback(()=>{l.isOpenDelayedRef.current?I():C()},[l.isOpenDelayedRef,I,C]),onTriggerLeave:u.useCallback(()=>{h?S():(window.clearTimeout(f.current),f.current=0)},[S,h]),onOpen:C,onClose:S,disableHoverableContent:h,children:n})})};mg.displayName=vr;var Ri="TooltipTrigger",hg=u.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=kr(Ri,n),s=Xa(Ri,n),i=os(n),a=u.useRef(null),l=He(t,a,o.onTriggerChange),c=u.useRef(!1),d=u.useRef(!1),p=u.useCallback(()=>c.current=!1,[]);return u.useEffect(()=>()=>document.removeEventListener("pointerup",p),[p]),v.jsx(TR,{asChild:!0,...i,children:v.jsx(Ae.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:l,onPointerMove:Oe(e.onPointerMove,g=>{g.pointerType!=="touch"&&!d.current&&!s.isPointerInTransitRef.current&&(o.onTriggerEnter(),d.current=!0)}),onPointerLeave:Oe(e.onPointerLeave,()=>{o.onTriggerLeave(),d.current=!1}),onPointerDown:Oe(e.onPointerDown,()=>{o.open&&o.onClose(),c.current=!0,document.addEventListener("pointerup",p,{once:!0})}),onFocus:Oe(e.onFocus,()=>{c.current||o.onOpen()}),onBlur:Oe(e.onBlur,o.onClose),onClick:Oe(e.onClick,o.onClose)})})});hg.displayName=Ri;var Za="TooltipPortal",[GR,HR]=rs(Za,{forceMount:void 0}),bg=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:o}=e,s=kr(Za,t);return v.jsx(GR,{scope:t,forceMount:n,children:v.jsx(Kt,{present:n||s.open,children:v.jsx(ka,{asChild:!0,container:o,children:r})})})};bg.displayName=Za;var qn="TooltipContent",vg=u.forwardRef((e,t)=>{const n=HR(qn,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...s}=e,i=kr(qn,e.__scopeTooltip);return v.jsx(Kt,{present:r||i.open,children:i.disableHoverableContent?v.jsx(xg,{side:o,...s,ref:t}):v.jsx(BR,{side:o,...s,ref:t})})}),BR=u.forwardRef((e,t)=>{const n=kr(qn,e.__scopeTooltip),r=Xa(qn,e.__scopeTooltip),o=u.useRef(null),s=He(t,o),[i,a]=u.useState(null),{trigger:l,onClose:c}=n,d=o.current,{onPointerInTransitChange:p}=r,g=u.useCallback(()=>{a(null),p(!1)},[p]),f=u.useCallback((h,m)=>{const b=h.currentTarget,y={x:h.clientX,y:h.clientY},x=KR(y,b.getBoundingClientRect()),w=YR(y,x),C=XR(m.getBoundingClientRect()),S=QR([...w,...C]);a(S),p(!0)},[p]);return u.useEffect(()=>()=>g(),[g]),u.useEffect(()=>{if(l&&d){const h=b=>f(b,d),m=b=>f(b,l);return l.addEventListener("pointerleave",h),d.addEventListener("pointerleave",m),()=>{l.removeEventListener("pointerleave",h),d.removeEventListener("pointerleave",m)}}},[l,d,f,g]),u.useEffect(()=>{if(i){const h=m=>{const b=m.target,y={x:m.clientX,y:m.clientY},x=l?.contains(b)||d?.contains(b),w=!ZR(y,i);x?g():w&&(g(),c())};return document.addEventListener("pointermove",h),()=>document.removeEventListener("pointermove",h)}},[l,d,i,c,g]),v.jsx(xg,{...e,ref:s})}),[WR,UR]=rs(vr,{isInside:!1}),qR=xh("TooltipContent"),xg=u.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:s,onPointerDownOutside:i,...a}=e,l=kr(qn,n),c=os(n),{onClose:d}=l;return u.useEffect(()=>(document.addEventListener(Si,d),()=>document.removeEventListener(Si,d)),[d]),u.useEffect(()=>{if(l.trigger){const p=g=>{g.target?.contains(l.trigger)&&d()};return window.addEventListener("scroll",p,{capture:!0}),()=>window.removeEventListener("scroll",p,{capture:!0})}},[l.trigger,d]),v.jsx(Ia,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:p=>p.preventDefault(),onDismiss:d,children:v.jsxs(MR,{"data-state":l.stateAttribute,...c,...a,ref:t,style:{...a.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[v.jsx(qR,{children:r}),v.jsx(WR,{scope:n,isInside:!0,children:v.jsx(LR,{id:l.contentId,role:"tooltip",children:o||r})})]})})});vg.displayName=qn;var yg="TooltipArrow",Cg=u.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=os(n);return UR(yg,n).isInside?null:v.jsx(DR,{...o,...r,ref:t})});Cg.displayName=yg;function KR(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),s=Math.abs(t.left-e.x);switch(Math.min(n,r,o,s)){case s:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function YR(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function XR(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function ZR(e,t){const{x:n,y:r}=e;let o=!1;for(let s=0,i=t.length-1;s<t.length;i=s++){const a=t[s],l=t[i],c=a.x,d=a.y,p=l.x,g=l.y;d>r!=g>r&&n<(p-c)*(r-d)/(g-d)+c&&(o=!o)}return o}function QR(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),JR(t)}function JR(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const o=e[r];for(;t.length>=2;){const s=t[t.length-1],i=t[t.length-2];if((s.x-i.x)*(o.y-i.y)>=(s.y-i.y)*(o.x-i.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const s=n[n.length-1],i=n[n.length-2];if((s.x-i.x)*(o.y-i.y)>=(s.y-i.y)*(o.x-i.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var eE=gg,tE=mg,nE=hg,rE=bg,wg=vg,oE=Cg;const sE=`bg-primary text-primary-foreground animate-in fade-in-0 zoom-in-95
153
+ Defaulting to \`null\`.`}var tP=ZO,Vz=JO;const nP=({className:e,value:t=0,max:n=100,ref:r,...o})=>{const i=Math.min(n,Math.max(0,Number(t))),a=i/n*100,s=a>=100,l=`${Math.round(a)}%`;return C.jsxs("div",{className:"flex items-center gap-1",children:[C.jsx(tP,{ref:r,value:i,max:n,className:q("bg-primary-inverse-bg/20 relative h-1.5 w-full overflow-hidden rounded-full",e),...o,children:C.jsx(Vz,{className:q("h-full w-full flex-1 rounded-[0.75rem] transition-all",s?"bg-success-text":"bg-primary-inverse-bg"),style:{transform:`translateX(-${n-a}%)`}})}),C.jsx("p",{className:q("text-center",vt("body-xs-regular"),s?"text-success-text":"text-primary-text"),children:l})]})};nP.displayName=tP.displayName;function zz(e){const t=e+"CollectionProvider",[n,r]=cr(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=g=>{const{scope:h,children:y}=g,b=A.useRef(null),x=A.useRef(new Map).current;return C.jsx(o,{scope:h,itemMap:x,collectionRef:b,children:y})};a.displayName=t;const s=e+"CollectionSlot",l=Gl(s),u=A.forwardRef((g,h)=>{const{scope:y,children:b}=g,x=i(s,y),w=ut(h,x.collectionRef);return C.jsx(l,{ref:w,children:b})});u.displayName=s;const c=e+"CollectionItemSlot",f="data-radix-collection-item",p=Gl(c),d=A.forwardRef((g,h)=>{const{scope:y,children:b,...x}=g,w=A.useRef(null),S=ut(h,w),E=i(c,y);return A.useEffect(()=>(E.itemMap.set(w,{ref:w,...x}),()=>{E.itemMap.delete(w)})),C.jsx(p,{[f]:"",ref:S,children:b})});d.displayName=c;function m(g){const h=i(e+"CollectionConsumer",g);return A.useCallback(()=>{const b=h.collectionRef.current;if(!b)return[];const x=Array.from(b.querySelectorAll(`[${f}]`));return Array.from(h.itemMap.values()).sort((E,O)=>x.indexOf(E.ref.current)-x.indexOf(O.ref.current))},[h.collectionRef,h.itemMap])}return[{Provider:a,Slot:u,ItemSlot:d},m,r]}var Bz=v.createContext(void 0);function bg(e){const t=v.useContext(Bz);return e||t||"ltr"}var Jf="rovingFocusGroup.onEntryFocus",Hz={bubbles:!1,cancelable:!0},ps="RovingFocusGroup",[oh,rP,Gz]=zz(ps),[Wz,Ec]=cr(ps,[Gz]),[Uz,qz]=Wz(ps),oP=v.forwardRef((e,t)=>C.jsx(oh.Provider,{scope:e.__scopeRovingFocusGroup,children:C.jsx(oh.Slot,{scope:e.__scopeRovingFocusGroup,children:C.jsx(Kz,{...e,ref:t})})}));oP.displayName=ps;var Kz=v.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:i,currentTabStopId:a,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:l,onEntryFocus:u,preventScrollOnEntryFocus:c=!1,...f}=e,p=v.useRef(null),d=ut(t,p),m=bg(i),[g,h]=ii({prop:a,defaultProp:s??null,onChange:l,caller:ps}),[y,b]=v.useState(!1),x=Yo(u),w=rP(n),S=v.useRef(!1),[E,O]=v.useState(0);return v.useEffect(()=>{const P=p.current;if(P)return P.addEventListener(Jf,x),()=>P.removeEventListener(Jf,x)},[x]),C.jsx(Uz,{scope:n,orientation:r,dir:m,loop:o,currentTabStopId:g,onItemFocus:v.useCallback(P=>h(P),[h]),onItemShiftTab:v.useCallback(()=>b(!0),[]),onFocusableItemAdd:v.useCallback(()=>O(P=>P+1),[]),onFocusableItemRemove:v.useCallback(()=>O(P=>P-1),[]),children:C.jsx(ze.div,{tabIndex:y||E===0?-1:0,"data-orientation":r,...f,ref:d,style:{outline:"none",...e.style},onMouseDown:Fe(e.onMouseDown,()=>{S.current=!0}),onFocus:Fe(e.onFocus,P=>{const N=!S.current;if(P.target===P.currentTarget&&N&&!y){const R=new CustomEvent(Jf,Hz);if(P.currentTarget.dispatchEvent(R),!R.defaultPrevented){const k=w().filter(D=>D.focusable),_=k.find(D=>D.active),T=k.find(D=>D.id===g),V=[_,T,...k].filter(Boolean).map(D=>D.ref.current);sP(V,c)}}S.current=!1}),onBlur:Fe(e.onBlur,()=>b(!1))})})}),iP="RovingFocusGroupItem",aP=v.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:i,children:a,...s}=e,l=Ni(),u=i||l,c=qz(iP,n),f=c.currentTabStopId===u,p=rP(n),{onFocusableItemAdd:d,onFocusableItemRemove:m,currentTabStopId:g}=c;return v.useEffect(()=>{if(r)return d(),()=>m()},[r,d,m]),C.jsx(oh.ItemSlot,{scope:n,id:u,focusable:r,active:o,children:C.jsx(ze.span,{tabIndex:f?0:-1,"data-orientation":c.orientation,...s,ref:t,onMouseDown:Fe(e.onMouseDown,h=>{r?c.onItemFocus(u):h.preventDefault()}),onFocus:Fe(e.onFocus,()=>c.onItemFocus(u)),onKeyDown:Fe(e.onKeyDown,h=>{if(h.key==="Tab"&&h.shiftKey){c.onItemShiftTab();return}if(h.target!==h.currentTarget)return;const y=Zz(h,c.orientation,c.dir);if(y!==void 0){if(h.metaKey||h.ctrlKey||h.altKey||h.shiftKey)return;h.preventDefault();let x=p().filter(w=>w.focusable).map(w=>w.ref.current);if(y==="last")x.reverse();else if(y==="prev"||y==="next"){y==="prev"&&x.reverse();const w=x.indexOf(h.currentTarget);x=c.loop?Qz(x,w+1):x.slice(w+1)}setTimeout(()=>sP(x))}}),children:typeof a=="function"?a({isCurrentTabStop:f,hasTabStop:g!=null}):a})})});aP.displayName=iP;var Yz={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Xz(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Zz(e,t,n){const r=Xz(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return Yz[r]}function sP(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function Qz(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var lP=oP,uP=aP,xg="Radio",[Jz,cP]=cr(xg),[eB,tB]=Jz(xg),fP=v.forwardRef((e,t)=>{const{__scopeRadio:n,name:r,checked:o=!1,required:i,disabled:a,value:s="on",onCheck:l,form:u,...c}=e,[f,p]=v.useState(null),d=ut(t,h=>p(h)),m=v.useRef(!1),g=f?u||!!f.closest("form"):!0;return C.jsxs(eB,{scope:n,checked:o,disabled:a,children:[C.jsx(ze.button,{type:"button",role:"radio","aria-checked":o,"data-state":mP(o),"data-disabled":a?"":void 0,disabled:a,value:s,...c,ref:d,onClick:Fe(e.onClick,h=>{o||l?.(),g&&(m.current=h.isPropagationStopped(),m.current||h.stopPropagation())})}),g&&C.jsx(hP,{control:f,bubbles:!m.current,name:r,value:s,checked:o,required:i,disabled:a,form:u,style:{transform:"translateX(-100%)"}})]})});fP.displayName=xg;var dP="RadioIndicator",pP=v.forwardRef((e,t)=>{const{__scopeRadio:n,forceMount:r,...o}=e,i=tB(dP,n);return C.jsx(Tr,{present:r||i.checked,children:C.jsx(ze.span,{"data-state":mP(i.checked),"data-disabled":i.disabled?"":void 0,...o,ref:t})})});pP.displayName=dP;var nB="RadioBubbleInput",hP=v.forwardRef(({__scopeRadio:e,control:t,checked:n,bubbles:r=!0,...o},i)=>{const a=v.useRef(null),s=ut(a,i),l=mm(n),u=rc(t);return v.useEffect(()=>{const c=a.current;if(!c)return;const f=window.HTMLInputElement.prototype,d=Object.getOwnPropertyDescriptor(f,"checked").set;if(l!==n&&d){const m=new Event("click",{bubbles:r});d.call(c,n),c.dispatchEvent(m)}},[l,n,r]),C.jsx(ze.input,{type:"radio","aria-hidden":!0,defaultChecked:n,...o,tabIndex:-1,ref:s,style:{...o.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});hP.displayName=nB;function mP(e){return e?"checked":"unchecked"}var rB=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Oc="RadioGroup",[oB]=cr(Oc,[Ec,cP]),gP=Ec(),vP=cP(),[iB,aB]=oB(Oc),yP=v.forwardRef((e,t)=>{const{__scopeRadioGroup:n,name:r,defaultValue:o,value:i,required:a=!1,disabled:s=!1,orientation:l,dir:u,loop:c=!0,onValueChange:f,...p}=e,d=gP(n),m=bg(u),[g,h]=ii({prop:i,defaultProp:o??null,onChange:f,caller:Oc});return C.jsx(iB,{scope:n,name:r,required:a,disabled:s,value:g,onValueChange:h,children:C.jsx(lP,{asChild:!0,...d,orientation:l,dir:m,loop:c,children:C.jsx(ze.div,{role:"radiogroup","aria-required":a,"aria-orientation":l,"data-disabled":s?"":void 0,dir:m,...p,ref:t})})})});yP.displayName=Oc;var bP="RadioGroupItem",xP=v.forwardRef((e,t)=>{const{__scopeRadioGroup:n,disabled:r,...o}=e,i=aB(bP,n),a=i.disabled||r,s=gP(n),l=vP(n),u=v.useRef(null),c=ut(t,u),f=i.value===o.value,p=v.useRef(!1);return v.useEffect(()=>{const d=g=>{rB.includes(g.key)&&(p.current=!0)},m=()=>p.current=!1;return document.addEventListener("keydown",d),document.addEventListener("keyup",m),()=>{document.removeEventListener("keydown",d),document.removeEventListener("keyup",m)}},[]),C.jsx(uP,{asChild:!0,...s,focusable:!a,active:f,children:C.jsx(fP,{disabled:a,required:i.required,checked:f,...l,...o,name:i.name,ref:c,onCheck:()=>i.onValueChange(o.value),onKeyDown:Fe(d=>{d.key==="Enter"&&d.preventDefault()}),onFocus:Fe(o.onFocus,()=>{p.current&&u.current?.click()})})})});xP.displayName=bP;var sB="RadioGroupIndicator",wP=v.forwardRef((e,t)=>{const{__scopeRadioGroup:n,...r}=e,o=vP(n);return C.jsx(pP,{...o,...r,ref:t})});wP.displayName=sB;var CP=yP,SP=xP,lB=wP;const uB=["grid gap-2"],cB=["group size-5 cursor-pointer place-content-center rounded-full border transition-colors duration-200","border-inp-hover-border bg-primary-bg","data-[state=checked]:border-primary-text","enabled:hover:border-inp-hover-border enabled:hover:bg-tertiary-bg","enabled:hover:data-[state=checked]:border-inp-hover-border enabled:hover:data-[state=checked]:bg-tertiary-bg","disabled:cursor-not-allowed disabled:border-disabled-border disabled:bg-disabled-bg","disabled:data-[state=checked]:border-disabled-border disabled:data-[state=checked]:bg-disabled-bg","focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-inp-focus-border"],fB=["flex items-center justify-center"],dB=["size-2.5 rounded-full bg-primary-text transition-colors duration-200","group-hover:bg-secondary-text","group-disabled:bg-disabled-text"],wg=({className:e,ref:t,...n})=>C.jsx(CP,{className:q(uB,e),...n,ref:t});wg.displayName=CP.displayName;const su=({className:e,ref:t,...n})=>C.jsx(SP,{ref:t,className:q(cB,e),...n,children:C.jsx(lB,{className:q(fB),children:C.jsx("span",{className:q(dB)})})});su.displayName=SP.displayName;var Pc="Switch",[pB]=cr(Pc),[hB,mB]=pB(Pc),EP=v.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:o,defaultChecked:i,required:a,disabled:s,value:l="on",onCheckedChange:u,form:c,...f}=e,[p,d]=v.useState(null),m=ut(t,x=>d(x)),g=v.useRef(!1),h=p?c||!!p.closest("form"):!0,[y,b]=ii({prop:o,defaultProp:i??!1,onChange:u,caller:Pc});return C.jsxs(hB,{scope:n,checked:y,disabled:s,children:[C.jsx(ze.button,{type:"button",role:"switch","aria-checked":y,"aria-required":a,"data-state":AP(y),"data-disabled":s?"":void 0,disabled:s,value:l,...f,ref:m,onClick:Fe(e.onClick,x=>{b(w=>!w),h&&(g.current=x.isPropagationStopped(),g.current||x.stopPropagation())})}),h&&C.jsx(_P,{control:p,bubbles:!g.current,name:r,value:l,checked:y,required:a,disabled:s,form:c,style:{transform:"translateX(-100%)"}})]})});EP.displayName=Pc;var OP="SwitchThumb",PP=v.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,o=mB(OP,n);return C.jsx(ze.span,{"data-state":AP(o.checked),"data-disabled":o.disabled?"":void 0,...r,ref:t})});PP.displayName=OP;var gB="SwitchBubbleInput",_P=v.forwardRef(({__scopeSwitch:e,control:t,checked:n,bubbles:r=!0,...o},i)=>{const a=v.useRef(null),s=ut(a,i),l=mm(n),u=rc(t);return v.useEffect(()=>{const c=a.current;if(!c)return;const f=window.HTMLInputElement.prototype,d=Object.getOwnPropertyDescriptor(f,"checked").set;if(l!==n&&d){const m=new Event("click",{bubbles:r});d.call(c,n),c.dispatchEvent(m)}},[l,n,r]),C.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...o,tabIndex:-1,ref:s,style:{...o.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});_P.displayName=gB;function AP(e){return e?"checked":"unchecked"}var RP=EP,vB=PP;const yB=["peer group relative inline-flex h-6 w-12 shrink-0 cursor-pointer items-center rounded-full border p-1 transition-colors","border-inp-default-border bg-primary-bg","enabled:hover:border-inp-hover-border","data-[state=checked]:bg-primary-inverse-bg","data-[state=checked]:border-inp-default-border enabled:hover:data-[state=checked]:border-inp-hover-border","disabled:cursor-not-allowed disabled:border-disabled-border disabled:bg-disabled-bg","disabled:data-[state=checked]:border-disabled-border disabled:data-[state=checked]:bg-disabled-bg","focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-inp-focus-border"],bB=["pointer-events-none block size-4 rounded-full transition-transform","bg-primary-inverse-bg data-[state=checked]:translate-x-6 data-[state=checked]:bg-primary-bg","group-disabled:bg-disabled-text group-disabled:data-[state=checked]:bg-disabled-text"],IP=({className:e,ref:t,...n})=>C.jsx(RP,{className:q(yB,e),...n,ref:t,children:C.jsx(vB,{className:q(bB)})});IP.displayName=RP.displayName;const Cg=({ref:e,className:t,...n})=>C.jsx("div",{className:"relative w-full overflow-auto",children:C.jsx("table",{ref:e,className:q("w-full caption-bottom text-sm",t),...n})});Cg.displayName="Table";const Sg=({ref:e,className:t,...n})=>C.jsx("thead",{ref:e,className:q("text-primary-text [&_tr]:border-b",t),...n});Sg.displayName="TableHeader";const Eg=({ref:e,className:t,...n})=>C.jsx("tbody",{ref:e,className:q(t),...n});Eg.displayName="TableBody";const kP=({ref:e,className:t,...n})=>C.jsx("tfoot",{ref:e,className:q("bg-muted/50 border-t font-medium",t),...n});kP.displayName="TableFooter";const $a=({ref:e,className:t,...n})=>C.jsx("tr",{ref:e,className:q(`hover:bg-muted/50 data-[state=selected]:bg-muted border-delicate-border border-b
154
+ transition-colors`,t),...n});$a.displayName="TableRow";const Og=({ref:e,className:t,...n})=>C.jsx("th",{ref:e,className:q(`text-muted-foreground h-10 px-6.25 text-left align-middle font-medium
155
+ [&:has([role=checkbox])]:pr-0 *:[[role=checkbox]]:translate-y-0.5`,t),...n});Og.displayName="TableHead";const lu=({ref:e,className:t,...n})=>C.jsx("td",{ref:e,className:q(`px-6.25 pt-6 pb-3.5 align-middle [&:has([role=checkbox])]:pr-0
156
+ *:[[role=checkbox]]:translate-y-0.5`,t),...n});lu.displayName="TableCell";const NP=({ref:e,className:t,...n})=>C.jsx("caption",{ref:e,className:q("text-muted-foreground mt-4 text-sm",t),...n});NP.displayName="TableCaption";var _c="Tabs",[xB]=cr(_c,[Ec]),TP=Ec(),[wB,Pg]=xB(_c),MP=v.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:o,defaultValue:i,orientation:a="horizontal",dir:s,activationMode:l="automatic",...u}=e,c=bg(s),[f,p]=ii({prop:r,onChange:o,defaultProp:i??"",caller:_c});return C.jsx(wB,{scope:n,baseId:Ni(),value:f,onValueChange:p,orientation:a,dir:c,activationMode:l,children:C.jsx(ze.div,{dir:c,"data-orientation":a,...u,ref:t})})});MP.displayName=_c;var DP="TabsList",jP=v.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...o}=e,i=Pg(DP,n),a=TP(n);return C.jsx(lP,{asChild:!0,...a,orientation:i.orientation,dir:i.dir,loop:r,children:C.jsx(ze.div,{role:"tablist","aria-orientation":i.orientation,...o,ref:t})})});jP.displayName=DP;var $P="TabsTrigger",LP=v.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:o=!1,...i}=e,a=Pg($P,n),s=TP(n),l=zP(a.baseId,r),u=BP(a.baseId,r),c=r===a.value;return C.jsx(uP,{asChild:!0,...s,focusable:!o,active:c,children:C.jsx(ze.button,{type:"button",role:"tab","aria-selected":c,"aria-controls":u,"data-state":c?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:l,...i,ref:t,onMouseDown:Fe(e.onMouseDown,f=>{!o&&f.button===0&&f.ctrlKey===!1?a.onValueChange(r):f.preventDefault()}),onKeyDown:Fe(e.onKeyDown,f=>{[" ","Enter"].includes(f.key)&&a.onValueChange(r)}),onFocus:Fe(e.onFocus,()=>{const f=a.activationMode!=="manual";!c&&!o&&f&&a.onValueChange(r)})})})});LP.displayName=$P;var FP="TabsContent",VP=v.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:o,children:i,...a}=e,s=Pg(FP,n),l=zP(s.baseId,r),u=BP(s.baseId,r),c=r===s.value,f=v.useRef(c);return v.useEffect(()=>{const p=requestAnimationFrame(()=>f.current=!1);return()=>cancelAnimationFrame(p)},[]),C.jsx(Tr,{present:o||c,children:({present:p})=>C.jsx(ze.div,{"data-state":c?"active":"inactive","data-orientation":s.orientation,role:"tabpanel","aria-labelledby":l,hidden:!p,id:u,tabIndex:0,...a,ref:t,style:{...e.style,animationDuration:f.current?"0s":void 0},children:p&&i})})});VP.displayName=FP;function zP(e,t){return`${e}-trigger-${t}`}function BP(e,t){return`${e}-content-${t}`}var CB=MP,HP=jP,GP=LP,WP=VP;const SB=Ve(["text-primary-text inline-flex items-stretch","data-[orientation=horizontal]:w-full data-[orientation=horizontal]:gap-1","data-[orientation=vertical]:h-fit data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col data-[orientation=vertical]:gap-1"].join(" "),{variants:{variant:{default:["bg-tertiary-bg rounded-lg","data-[orientation=horizontal]:flex-row"].join(" "),line:["border-default-border border-b","data-[orientation=horizontal]:flex-row"].join(" ")}},defaultVariants:{variant:"default"}}),EB=Ve(["inline-flex items-center justify-center whitespace-nowrap transition-all","focus-visible:ring-ring focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none","cursor-pointer disabled:pointer-events-none disabled:opacity-50","data-[orientation=horizontal]:h-full data-[orientation=horizontal]:w-full data-[orientation=horizontal]:flex-1","data-[orientation=vertical]:h-full data-[orientation=vertical]:w-full"].join(" "),{variants:{variant:{default:[vt("body-sm-medium"),"rounded-xl px-3 py-3","text-primary-text hover:bg-primary-hover-bg hover:text-primary-inverse-bg bg-transparent","data-[state=active]:bg-primary-inverse-bg data-[state=active]:text-primary-bg","active:text-primary-bg active:bg-neutral-500"].join(" "),line:[vt("body-sm-medium"),"-mb-px rounded-none border-b-2 border-transparent px-4 py-3","text-primary-inverse-bg hover:bg-primary-hover-bg hover:text-primary-inverse-bg","data-[state=active]:bg-primary-inverse-bg data-[state=active]:text-primary-bg","active:bg-secondary-inverse-text active:text-primary-bg"].join(" ")}},defaultVariants:{variant:"default"}}),UP=v.createContext("default"),OB=CB,qP=({ref:e,className:t,variant:n="default",...r})=>C.jsx(UP,{value:n,children:C.jsx(HP,{ref:e,className:q(SB({variant:n}),t),...r})});qP.displayName=HP.displayName;const KP=({ref:e,className:t,variant:n,...r})=>{const o=v.use(UP),i=n??o;return C.jsx(GP,{ref:e,className:q(EB({variant:i}),t),...r})};KP.displayName=GP.displayName;const YP=({ref:e,className:t,...n})=>C.jsx(WP,{ref:e,className:q(`text-primary-text focus-visible:ring-ring focus-visible:ring-2
157
+ focus-visible:ring-offset-2 focus-visible:outline-none`,"data-[orientation=vertical]:flex-1",t),...n});YP.displayName=WP.displayName;var PB="Arrow",XP=v.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...i}=e;return C.jsx(ze.svg,{...i,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:C.jsx("polygon",{points:"0,0 30,0 15,10"})})});XP.displayName=PB;var _B=XP,_g="Popper",[ZP,QP]=cr(_g),[AB,JP]=ZP(_g),e_=e=>{const{__scopePopper:t,children:n}=e,[r,o]=v.useState(null);return C.jsx(AB,{scope:t,anchor:r,onAnchorChange:o,children:n})};e_.displayName=_g;var t_="PopperAnchor",n_=v.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,i=JP(t_,n),a=v.useRef(null),s=ut(t,a),l=v.useRef(null);return v.useEffect(()=>{const u=l.current;l.current=r?.current||a.current,u!==l.current&&i.onAnchorChange(l.current)}),r?null:C.jsx(ze.div,{...o,ref:s})});n_.displayName=t_;var Ag="PopperContent",[RB,IB]=ZP(Ag),r_=v.forwardRef((e,t)=>{const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:i="center",alignOffset:a=0,arrowPadding:s=0,avoidCollisions:l=!0,collisionBoundary:u=[],collisionPadding:c=0,sticky:f="partial",hideWhenDetached:p=!1,updatePositionStrategy:d="optimized",onPlaced:m,...g}=e,h=JP(Ag,n),[y,b]=v.useState(null),x=ut(t,Pe=>b(Pe)),[w,S]=v.useState(null),E=rc(w),O=E?.width??0,P=E?.height??0,N=r+(i!=="center"?"-"+i:""),R=typeof c=="number"?c:{top:0,right:0,bottom:0,left:0,...c},k=Array.isArray(u)?u:[u],_=k.length>0,T={padding:R,boundary:k.filter(NB),altBoundary:_},{refs:F,floatingStyles:V,placement:D,isPositioned:B,middlewareData:z}=a1({strategy:"fixed",placement:N,whileElementsMounted:(...Pe)=>Xp(...Pe,{animationFrame:d==="always"}),elements:{reference:h.anchor},middleware:[s1({mainAxis:o+P,alignmentAxis:a}),l&&l1({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?u1():void 0,...T}),l&&c1({...T}),f1({...T,apply:({elements:Pe,rects:Se,availableWidth:L,availableHeight:U})=>{const{width:G,height:I}=Se.reference,W=Pe.floating.style;W.setProperty("--radix-popper-available-width",`${L}px`),W.setProperty("--radix-popper-available-height",`${U}px`),W.setProperty("--radix-popper-anchor-width",`${G}px`),W.setProperty("--radix-popper-anchor-height",`${I}px`)}}),w&&k$({element:w,padding:s}),TB({arrowWidth:O,arrowHeight:P}),p&&d1({strategy:"referenceHidden",...T})]}),[Y,$]=a_(D),ye=Yo(m);fo(()=>{B&&ye?.()},[B,ye]);const ae=z.arrow?.x,be=z.arrow?.y,ne=z.arrow?.centerOffset!==0,[le,Ee]=v.useState();return fo(()=>{y&&Ee(window.getComputedStyle(y).zIndex)},[y]),C.jsx("div",{ref:F.setFloating,"data-radix-popper-content-wrapper":"",style:{...V,transform:B?V.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:le,"--radix-popper-transform-origin":[z.transformOrigin?.x,z.transformOrigin?.y].join(" "),...z.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:C.jsx(RB,{scope:n,placedSide:Y,onArrowChange:S,arrowX:ae,arrowY:be,shouldHideArrow:ne,children:C.jsx(ze.div,{"data-side":Y,"data-align":$,...g,ref:x,style:{...g.style,animation:B?void 0:"none"}})})})});r_.displayName=Ag;var o_="PopperArrow",kB={top:"bottom",right:"left",bottom:"top",left:"right"},i_=v.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,i=IB(o_,r),a=kB[i.placedSide];return C.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:C.jsx(_B,{...o,ref:n,style:{...o.style,display:"block"}})})});i_.displayName=o_;function NB(e){return e!==null}var TB=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:r,middlewareData:o}=t,a=o.arrow?.centerOffset!==0,s=a?0:e.arrowWidth,l=a?0:e.arrowHeight,[u,c]=a_(n),f={start:"0%",center:"50%",end:"100%"}[c],p=(o.arrow?.x??0)+s/2,d=(o.arrow?.y??0)+l/2;let m="",g="";return u==="bottom"?(m=a?f:`${p}px`,g=`${-l}px`):u==="top"?(m=a?f:`${p}px`,g=`${r.floating.height+l}px`):u==="right"?(m=`${-l}px`,g=a?f:`${d}px`):u==="left"&&(m=`${r.floating.width+l}px`,g=a?f:`${d}px`),{data:{x:m,y:g}}}});function a_(e){const[t,n="center"]=e.split("-");return[t,n]}var MB=e_,DB=n_,jB=r_,$B=i_,LB=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),FB="VisuallyHidden",s_=v.forwardRef((e,t)=>C.jsx(ze.span,{...e,ref:t,style:{...LB,...e.style}}));s_.displayName=FB;var VB=s_,[Ac]=cr("Tooltip",[QP]),Rc=QP(),l_="TooltipProvider",zB=700,ih="tooltip.open",[BB,Rg]=Ac(l_),u_=e=>{const{__scopeTooltip:t,delayDuration:n=zB,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:i}=e,a=v.useRef(!0),s=v.useRef(!1),l=v.useRef(0);return v.useEffect(()=>{const u=l.current;return()=>window.clearTimeout(u)},[]),C.jsx(BB,{scope:t,isOpenDelayedRef:a,delayDuration:n,onOpen:v.useCallback(()=>{window.clearTimeout(l.current),a.current=!1},[]),onClose:v.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>a.current=!0,r)},[r]),isPointerInTransitRef:s,onPointerInTransitChange:v.useCallback(u=>{s.current=u},[]),disableHoverableContent:o,children:i})};u_.displayName=l_;var Ga="Tooltip",[HB,hs]=Ac(Ga),c_=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o,onOpenChange:i,disableHoverableContent:a,delayDuration:s}=e,l=Rg(Ga,e.__scopeTooltip),u=Rc(t),[c,f]=v.useState(null),p=Ni(),d=v.useRef(0),m=a??l.disableHoverableContent,g=s??l.delayDuration,h=v.useRef(!1),[y,b]=ii({prop:r,defaultProp:o??!1,onChange:O=>{O?(l.onOpen(),document.dispatchEvent(new CustomEvent(ih))):l.onClose(),i?.(O)},caller:Ga}),x=v.useMemo(()=>y?h.current?"delayed-open":"instant-open":"closed",[y]),w=v.useCallback(()=>{window.clearTimeout(d.current),d.current=0,h.current=!1,b(!0)},[b]),S=v.useCallback(()=>{window.clearTimeout(d.current),d.current=0,b(!1)},[b]),E=v.useCallback(()=>{window.clearTimeout(d.current),d.current=window.setTimeout(()=>{h.current=!0,b(!0),d.current=0},g)},[g,b]);return v.useEffect(()=>()=>{d.current&&(window.clearTimeout(d.current),d.current=0)},[]),C.jsx(MB,{...u,children:C.jsx(HB,{scope:t,contentId:p,open:y,stateAttribute:x,trigger:c,onTriggerChange:f,onTriggerEnter:v.useCallback(()=>{l.isOpenDelayedRef.current?E():w()},[l.isOpenDelayedRef,E,w]),onTriggerLeave:v.useCallback(()=>{m?S():(window.clearTimeout(d.current),d.current=0)},[S,m]),onOpen:w,onClose:S,disableHoverableContent:m,children:n})})};c_.displayName=Ga;var ah="TooltipTrigger",f_=v.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=hs(ah,n),i=Rg(ah,n),a=Rc(n),s=v.useRef(null),l=ut(t,s,o.onTriggerChange),u=v.useRef(!1),c=v.useRef(!1),f=v.useCallback(()=>u.current=!1,[]);return v.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),C.jsx(DB,{asChild:!0,...a,children:C.jsx(ze.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:l,onPointerMove:Fe(e.onPointerMove,p=>{p.pointerType!=="touch"&&!c.current&&!i.isPointerInTransitRef.current&&(o.onTriggerEnter(),c.current=!0)}),onPointerLeave:Fe(e.onPointerLeave,()=>{o.onTriggerLeave(),c.current=!1}),onPointerDown:Fe(e.onPointerDown,()=>{o.open&&o.onClose(),u.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:Fe(e.onFocus,()=>{u.current||o.onOpen()}),onBlur:Fe(e.onBlur,o.onClose),onClick:Fe(e.onClick,o.onClose)})})});f_.displayName=ah;var Ig="TooltipPortal",[GB,WB]=Ac(Ig,{forceMount:void 0}),d_=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:o}=e,i=hs(Ig,t);return C.jsx(GB,{scope:t,forceMount:n,children:C.jsx(Tr,{present:n||i.open,children:C.jsx(ag,{asChild:!0,container:o,children:r})})})};d_.displayName=Ig;var Fi="TooltipContent",p_=v.forwardRef((e,t)=>{const n=WB(Fi,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...i}=e,a=hs(Fi,e.__scopeTooltip);return C.jsx(Tr,{present:r||a.open,children:a.disableHoverableContent?C.jsx(h_,{side:o,...i,ref:t}):C.jsx(UB,{side:o,...i,ref:t})})}),UB=v.forwardRef((e,t)=>{const n=hs(Fi,e.__scopeTooltip),r=Rg(Fi,e.__scopeTooltip),o=v.useRef(null),i=ut(t,o),[a,s]=v.useState(null),{trigger:l,onClose:u}=n,c=o.current,{onPointerInTransitChange:f}=r,p=v.useCallback(()=>{s(null),f(!1)},[f]),d=v.useCallback((m,g)=>{const h=m.currentTarget,y={x:m.clientX,y:m.clientY},b=XB(y,h.getBoundingClientRect()),x=ZB(y,b),w=QB(g.getBoundingClientRect()),S=e3([...x,...w]);s(S),f(!0)},[f]);return v.useEffect(()=>()=>p(),[p]),v.useEffect(()=>{if(l&&c){const m=h=>d(h,c),g=h=>d(h,l);return l.addEventListener("pointerleave",m),c.addEventListener("pointerleave",g),()=>{l.removeEventListener("pointerleave",m),c.removeEventListener("pointerleave",g)}}},[l,c,d,p]),v.useEffect(()=>{if(a){const m=g=>{const h=g.target,y={x:g.clientX,y:g.clientY},b=l?.contains(h)||c?.contains(h),x=!JB(y,a);b?p():x&&(p(),u())};return document.addEventListener("pointermove",m),()=>document.removeEventListener("pointermove",m)}},[l,c,a,u,p]),C.jsx(h_,{...e,ref:i})}),[qB,KB]=Ac(Ga,{isInside:!1}),YB=SM("TooltipContent"),h_=v.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:i,onPointerDownOutside:a,...s}=e,l=hs(Fi,n),u=Rc(n),{onClose:c}=l;return v.useEffect(()=>(document.addEventListener(ih,c),()=>document.removeEventListener(ih,c)),[c]),v.useEffect(()=>{if(l.trigger){const f=p=>{p.target?.contains(l.trigger)&&c()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[l.trigger,c]),C.jsx(ig,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:f=>f.preventDefault(),onDismiss:c,children:C.jsxs(jB,{"data-state":l.stateAttribute,...u,...s,ref:t,style:{...s.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[C.jsx(YB,{children:r}),C.jsx(qB,{scope:n,isInside:!0,children:C.jsx(VB,{id:l.contentId,role:"tooltip",children:o||r})})]})})});p_.displayName=Fi;var m_="TooltipArrow",g_=v.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Rc(n);return KB(m_,n).isInside?null:C.jsx($B,{...o,...r,ref:t})});g_.displayName=m_;function XB(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(n,r,o,i)){case i:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function ZB(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function QB(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function JB(e,t){const{x:n,y:r}=e;let o=!1;for(let i=0,a=t.length-1;i<t.length;a=i++){const s=t[i],l=t[a],u=s.x,c=s.y,f=l.x,p=l.y;c>r!=p>r&&n<(f-u)*(r-c)/(p-c)+u&&(o=!o)}return o}function e3(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),t3(t)}function t3(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const o=e[r];for(;t.length>=2;){const i=t[t.length-1],a=t[t.length-2];if((i.x-a.x)*(o.y-a.y)>=(i.y-a.y)*(o.x-a.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const i=n[n.length-1],a=n[n.length-2];if((i.x-a.x)*(o.y-a.y)>=(i.y-a.y)*(o.x-a.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var n3=u_,r3=c_,o3=f_,i3=d_,v_=p_,a3=g_;const s3=`bg-primary text-primary-foreground animate-in fade-in-0 zoom-in-95
158
158
  data-[state=closed]:animate-out data-[state=closed]:fade-out-0
159
159
  data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2
160
160
  data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2
161
161
  data-[side=top]:slide-in-from-bottom-2 z-50
162
162
  origin-[--radix-tooltip-content-transform-origin] overflow-hidden rounded-md px-3
163
- py-1.5 text-xs`,iE=eE,Sg=tE,Rg=nE,Eg=oE,Qa=({className:e,sideOffset:t=4,ref:n,...r})=>v.jsx(rE,{children:v.jsx(wg,{ref:n,sideOffset:t,className:L(sE,e),...r})});Qa.displayName=wg.displayName;const Ja=(e=!1)=>{const[t,n]=Te.useState(e);return{isOpened:t,openPopup:()=>n(!0),closePopup:()=>n(!1),togglePopup:()=>n(i=>!i)}},aE=(e,t,n)=>{if(n<=e)return Array.from({length:n},(c,d)=>d+1);const r=Math.floor((e-2)/2);let o=Math.max(t-r,2),s=Math.min(t+r,n-1);const i=s-o+1,a=e-2;i<a&&(o===2?s=Math.min(s+(a-i),n-1):s===n-1&&(o=Math.max(o-(a-i),2)));const l=[];l.push(1),o>2&&l.push("ellipsis-start");for(let c=o;c<=s;c++)l.push(c);return s<n-1&&l.push("ellipsis-end"),n>1&&l.push(n),l},lE=_e("flex items-center",{variants:{size:{sm:"gap-1",default:"gap-1",lg:"gap-2"}},defaultVariants:{size:"default"}}),Sc=_e(["bg-tertiary-bg text-primary-text cursor-pointer rounded-[0.25rem] p-0","hover:bg-primary-hover-bg"].join(" "),{variants:{size:{sm:"size-7 [&_svg]:size-3",default:"size-8 [&_svg]:size-3.5",lg:"size-9 [&_svg]:size-4"},side:{prev:"mr-3",next:"ml-3"}},defaultVariants:{size:"default"}}),Rc=_e(["text-primary-text cursor-pointer rounded-[0.75rem] bg-transparent","hover:bg-tertiary-bg",qe("body-xs-medium")].join(" "),{variants:{size:{sm:"h-7 min-w-7 px-2",default:"h-8 min-w-8 px-3",lg:"h-9 min-w-9 px-3.5"},active:{true:`bg-primary-inverse-bg text-primary-inverse-text
164
- hover:bg-primary-inverse-bg`,false:""}},compoundVariants:[{size:"sm",active:!0,className:"size-7 px-0"},{size:"default",active:!0,className:"size-8 px-0"},{size:"lg",active:!0,className:"size-9 px-0"}],defaultVariants:{size:"default",active:!1}}),cE=5,uE=5,dE=({currentPage:e,totalPages:t,maxVisiblePages:n=cE,className:r,showNavigation:o=!0,prevLabel:s,nextLabel:i,size:a="default",ellipsisStep:l=uE,onPageChange:c})=>{if(t<=1)return null;const d=aE(n,e,t),p=f=>{f>=1&&f<=t&&c(f)},g=f=>{if(f==="ellipsis-start"){const h=Math.max(1,e-l);p(h)}else{const h=Math.min(t,e+l);p(h)}};return v.jsx(Fa,{children:v.jsxs(Va,{className:L(lE({size:a}),r),children:[o&&v.jsx(jn,{children:v.jsx(Bt,{variant:"ghost",disabled:e===1,onClick:()=>p(e-1),className:Sc({size:a,side:"prev"}),"aria-label":"Предыдущая страница",children:s||v.jsx(uu,{})})}),d.map(f=>f==="ellipsis-start"||f==="ellipsis-end"?v.jsx(jn,{children:v.jsx(Bt,{variant:"ghost",onClick:()=>g(f),className:Rc({size:a}),"aria-label":f==="ellipsis-start"?`Перейти на ${l} страниц назад`:`Перейти на ${l} страниц вперед`,title:f==="ellipsis-start"?`Нажать чтобы перейти на ${l} страниц назад`:`Нажать чтобы перейти на ${l} страниц вперед`,children:"..."})},f):v.jsx(jn,{children:v.jsx(Er,{isActive:e===f,onClick:()=>p(f),className:Rc({size:a,active:e===f}),"aria-label":`Страница ${f}`,"aria-current":e===f?"page":void 0,children:f})},f)),o&&v.jsx(jn,{children:v.jsx(Bt,{variant:"ghost",disabled:e===t,onClick:()=>p(e+1),className:Sc({size:a,side:"next"}),"aria-label":"Следующая страница",children:i||v.jsx(du,{})})})]})})},fE=_e(["border-delicate-border bg-secondary-bg flex h-full shrink-0 flex-col border-r","transition-[width] duration-200 ease-out"].join(" "),{variants:{state:{expanded:"w-[15.5rem]",collapsed:"w-16"}},defaultVariants:{state:"expanded"}}),pE=_e("border-delicate-border flex h-[4.5rem] items-center border-b",{variants:{state:{expanded:"justify-between px-7",collapsed:"justify-center px-[1.125rem]"}},defaultVariants:{state:"expanded"}}),gE=_e("flex items-center gap-3",{variants:{state:{expanded:"opacity-100",collapsed:"hidden opacity-0"}},defaultVariants:{state:"expanded"}}),mE=qe("body-xl-medium"),hE=_e(["text-sub-label-text inline-flex size-7 cursor-pointer items-center justify-center rounded-sm","hover:bg-tertiary-bg hover:text-primary-text transition-colors","disabled:text-disabled-text disabled:pointer-events-none"].join(" ")),bE=({groups:e,title:t="CRM",brandMark:n,state:r="expanded",activeItemId:o,showToggle:s=!0,onStateChange:i,onItemSelect:a,className:l,...c})=>{const d=r==="collapsed",p=e.filter(b=>b.placement!=="bottom"),g=e.filter(b=>b.placement==="bottom"),f=d?"expanded":"collapsed",h=()=>{i?.(f)},m=b=>b.map(y=>v.jsx(Qf,{title:y.title,collapsed:d,className:L(y.divider&&"border-delicate-border border-b"),children:y.items.map(x=>{const w=o?o===x.id:!!x.active;return v.jsx(Zf,{icon:v.jsx(Ut,{type:x.icon}),label:x.label,badge:x.badge,active:w,collapsed:d,disabled:x.disabled,href:x.href,target:x.target,rel:x.rel,onAction:()=>{a?.(x),x.onClick?.(x)},"aria-current":w?"page":void 0},x.id)})},y.id));return v.jsxs("aside",{className:L(fE({state:r}),l),"aria-label":"Боковая навигация",...c,children:[v.jsxs("header",{className:pE({state:r}),children:[v.jsxs("div",{className:gE({state:r}),children:[n,v.jsx("p",{className:mE,children:t})]}),s&&v.jsx("button",{type:"button",className:hE(),onClick:h,"aria-label":d?"Развернуть боковую навигацию":"Свернуть боковую навигацию",disabled:!i,children:v.jsx(Ut,{type:"chevrons",strokeWidth:1.5,className:L("transition-transform duration-200",d?"-rotate-90":"rotate-90")})})]}),v.jsxs("div",{className:"flex min-h-0 flex-1 flex-col",children:[v.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto",children:m(p)}),g.length>0&&v.jsx("div",{className:"mt-auto",children:m(g)})]})]})},vE=({name:e,orientation:t="horizontal",label:n,disabled:r,classNames:o,isValid:s,...i})=>{const a={"aria-invalid":!!s,"data-invalid":!!s};return v.jsx(wr,{className:o?.classNameGroup,children:v.jsxs(Sr,{...a,orientation:t,children:[v.jsx(ji,{...i,...a,id:e,name:e,disabled:r,className:o?.classNameCheckbox}),n&&v.jsx(Kn,{htmlFor:e,className:L("text-[14px]",o?.classNameLabel,r&&"cursor-not-allowed"),children:n})]})})},xE=({open:e,onOpenChange:t,title:n,cancelLabel:r="Отмена",confirmLabel:o="Ок",onConfirm:s,children:i,classes:a,footer:l,showCloseButton:c=!1,ariaDescribedby:d=void 0})=>{const p=()=>{t(!1)},g=()=>{s?.(),t(!1)},f=l===void 0?v.jsxs(Ma,{className:a?.footer,children:[v.jsx(Bt,{variant:"secondary",onClick:p,children:r}),v.jsx(Bt,{onClick:g,children:o})]}):l;return v.jsx(Kf,{open:e,onOpenChange:t,children:v.jsxs(Aa,{"aria-describedby":d,showCloseButton:c,children:[n&&v.jsx(Ta,{className:a?.header,children:v.jsx(Da,{className:a?.title,children:n})}),v.jsx("div",{className:a?.body,children:i}),f]})})};function sn(e,t){return typeof e=="function"?e(t):e}function bt(e,t){return n=>{t.setState(r=>({...r,[e]:sn(n,r[e])}))}}function ss(e){return e instanceof Function}function yE(e){return Array.isArray(e)&&e.every(t=>typeof t=="number")}function CE(e,t){const n=[],r=o=>{o.forEach(s=>{n.push(s);const i=t(s);i!=null&&i.length&&r(i)})};return r(e),n}function ue(e,t,n){let r=[],o;return s=>{let i;n.key&&n.debug&&(i=Date.now());const a=e(s);if(!(a.length!==r.length||a.some((d,p)=>r[p]!==d)))return o;r=a;let c;if(n.key&&n.debug&&(c=Date.now()),o=t(...a),n==null||n.onChange==null||n.onChange(o),n.key&&n.debug&&n!=null&&n.debug()){const d=Math.round((Date.now()-i)*100)/100,p=Math.round((Date.now()-c)*100)/100,g=p/16,f=(h,m)=>{for(h=String(h);h.length<m;)h=" "+h;return h};console.info(`%c⏱ ${f(p,5)} /${f(d,5)} ms`,`
163
+ py-1.5 text-xs`,l3=n3,y_=r3,b_=o3,x_=a3,kg=({className:e,sideOffset:t=4,ref:n,...r})=>C.jsx(i3,{children:C.jsx(v_,{ref:n,sideOffset:t,className:q(s3,e),...r})});kg.displayName=v_.displayName;const Ng=(e=!1)=>{const[t,n]=A.useState(e);return{isOpened:t,openPopup:()=>n(!0),closePopup:()=>n(!1),togglePopup:()=>n(a=>!a)}},u3=(e,t,n)=>{if(n<=e)return Array.from({length:n},(u,c)=>c+1);const r=Math.floor((e-2)/2);let o=Math.max(t-r,2),i=Math.min(t+r,n-1);const a=i-o+1,s=e-2;a<s&&(o===2?i=Math.min(i+(s-a),n-1):i===n-1&&(o=Math.max(o-(s-a),2)));const l=[];l.push(1),o>2&&l.push("ellipsis-start");for(let u=o;u<=i;u++)l.push(u);return i<n-1&&l.push("ellipsis-end"),n>1&&l.push(n),l},c3=Ve("flex items-center",{variants:{size:{sm:"gap-1",default:"gap-1",lg:"gap-2"}},defaultVariants:{size:"default"}}),Mb=Ve(["bg-tertiary-bg text-primary-text cursor-pointer rounded-[0.25rem] p-0","hover:bg-primary-hover-bg"].join(" "),{variants:{size:{sm:"size-7 [&_svg]:size-3",default:"size-8 [&_svg]:size-3.5",lg:"size-9 [&_svg]:size-4"},side:{prev:"mr-3",next:"ml-3"}},defaultVariants:{size:"default"}}),Db=Ve(["text-primary-text cursor-pointer rounded-[0.75rem] bg-transparent","hover:bg-tertiary-bg",vt("body-xs-medium")].join(" "),{variants:{size:{sm:"h-7 min-w-7 px-2",default:"h-8 min-w-8 px-3",lg:"h-9 min-w-9 px-3.5"},active:{true:`bg-primary-inverse-bg text-primary-inverse-text
164
+ hover:bg-primary-inverse-bg`,false:""}},compoundVariants:[{size:"sm",active:!0,className:"size-7 px-0"},{size:"default",active:!0,className:"size-8 px-0"},{size:"lg",active:!0,className:"size-9 px-0"}],defaultVariants:{size:"default",active:!1}}),f3=5,d3=5,p3=({currentPage:e,totalPages:t,maxVisiblePages:n=f3,className:r,showNavigation:o=!0,prevLabel:i,nextLabel:a,size:s="default",ellipsisStep:l=d3,onPageChange:u})=>{if(t<=1)return null;const c=u3(n,e,t),f=d=>{d>=1&&d<=t&&u(d)},p=d=>{if(d==="ellipsis-start"){const m=Math.max(1,e-l);f(m)}else{const m=Math.min(t,e+l);f(m)}};return C.jsx(mg,{children:C.jsxs(gg,{className:q(c3({size:s}),r),children:[o&&C.jsx(Pi,{children:C.jsx(wr,{variant:"ghost",disabled:e===1,onClick:()=>f(e-1),className:Mb({size:s,side:"prev"}),"aria-label":"Предыдущая страница",children:i||C.jsx(iE,{})})}),c.map(d=>d==="ellipsis-start"||d==="ellipsis-end"?C.jsx(Pi,{children:C.jsx(wr,{variant:"ghost",onClick:()=>p(d),className:Db({size:s}),"aria-label":d==="ellipsis-start"?`Перейти на ${l} страниц назад`:`Перейти на ${l} страниц вперед`,title:d==="ellipsis-start"?`Нажать чтобы перейти на ${l} страниц назад`:`Нажать чтобы перейти на ${l} страниц вперед`,children:"..."})},d):C.jsx(Pi,{children:C.jsx(ds,{isActive:e===d,onClick:()=>f(d),className:Db({size:s,active:e===d}),"aria-label":`Страница ${d}`,"aria-current":e===d?"page":void 0,children:d})},d)),o&&C.jsx(Pi,{children:C.jsx(wr,{variant:"ghost",disabled:e===t,onClick:()=>f(e+1),className:Mb({size:s,side:"next"}),"aria-label":"Следующая страница",children:a||C.jsx(aE,{})})})]})})},h3=Ve(["border-delicate-border bg-secondary-bg flex h-full shrink-0 flex-col border-r","transition-[width] duration-200 ease-out"].join(" "),{variants:{state:{expanded:"w-[15.5rem]",collapsed:"w-16"}},defaultVariants:{state:"expanded"}}),m3=Ve("border-delicate-border flex h-[4.5rem] items-center border-b",{variants:{state:{expanded:"justify-between px-7",collapsed:"justify-center px-[1.125rem]"}},defaultVariants:{state:"expanded"}}),g3=Ve("flex items-center gap-3",{variants:{state:{expanded:"opacity-100",collapsed:"hidden opacity-0"}},defaultVariants:{state:"expanded"}}),v3=vt("body-xl-medium"),y3=Ve(["text-sub-label-text inline-flex size-7 cursor-pointer items-center justify-center rounded-sm","hover:bg-tertiary-bg hover:text-primary-text transition-colors","disabled:text-disabled-text disabled:pointer-events-none"].join(" ")),b3=({groups:e,title:t="CRM",brandMark:n,state:r="expanded",activeItemId:o,showToggle:i=!0,onStateChange:a,onItemSelect:s,className:l,...u})=>{const c=r==="collapsed",f=e.filter(h=>h.placement!=="bottom"),p=e.filter(h=>h.placement==="bottom"),d=c?"expanded":"collapsed",m=()=>{a?.(d)},g=h=>h.map(y=>C.jsx(qO,{title:y.title,collapsed:c,className:q(y.divider&&"border-delicate-border border-b"),children:y.items.map(b=>{const x=o?o===b.id:!!b.active;return C.jsx(UO,{icon:C.jsx(Or,{type:b.icon}),label:b.label,badge:b.badge,active:x,collapsed:c,disabled:b.disabled,href:b.href,target:b.target,rel:b.rel,onAction:()=>{s?.(b),b.onClick?.(b)},"aria-current":x?"page":void 0},b.id)})},y.id));return C.jsxs("aside",{className:q(h3({state:r}),l),"aria-label":"Боковая навигация",...u,children:[C.jsxs("header",{className:m3({state:r}),children:[C.jsxs("div",{className:g3({state:r}),children:[n,C.jsx("p",{className:v3,children:t})]}),i&&C.jsx("button",{type:"button",className:y3(),onClick:m,"aria-label":c?"Развернуть боковую навигацию":"Свернуть боковую навигацию",disabled:!a,children:C.jsx(Or,{type:"chevrons",strokeWidth:1.5,className:q("transition-transform duration-200",c?"-rotate-90":"rotate-90")})})]}),C.jsxs("div",{className:"flex min-h-0 flex-1 flex-col",children:[C.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto",children:g(f)}),p.length>0&&C.jsx("div",{className:"mt-auto",children:g(p)})]})]})},x3=({name:e,orientation:t="horizontal",label:n,disabled:r,classNames:o,isValid:i,...a})=>{const s={"aria-invalid":!!i,"data-invalid":!!i};return C.jsx(us,{className:o?.classNameGroup,children:C.jsxs(cs,{...s,orientation:t,children:[C.jsx(ym,{...a,...s,id:e,name:e,disabled:r,className:o?.classNameCheckbox}),n&&C.jsx(Yi,{htmlFor:e,className:q("text-[14px]",o?.classNameLabel,r&&"cursor-not-allowed"),children:n})]})})},w3=({open:e,onOpenChange:t,title:n,cancelLabel:r="Отмена",confirmLabel:o="Ок",onConfirm:i,children:a,classes:s,footer:l,showCloseButton:u=!1,ariaDescribedby:c=void 0})=>{const f=()=>{t(!1)},p=()=>{i?.(),t(!1)},d=l===void 0?C.jsxs(pg,{className:s?.footer,children:[C.jsx(wr,{variant:"secondary",onClick:f,children:r}),C.jsx(wr,{onClick:p,children:o})]}):l;return C.jsx(HO,{open:e,onOpenChange:t,children:C.jsxs(fg,{"aria-describedby":c,showCloseButton:u,children:[n&&C.jsx(dg,{className:s?.header,children:C.jsx(hg,{className:s?.title,children:n})}),C.jsx("div",{className:s?.body,children:a}),d]})})};function ro(e,t){return typeof e=="function"?e(t):e}function vn(e,t){return n=>{t.setState(r=>({...r,[e]:ro(n,r[e])}))}}function Ic(e){return e instanceof Function}function C3(e){return Array.isArray(e)&&e.every(t=>typeof t=="number")}function S3(e,t){const n=[],r=o=>{o.forEach(i=>{n.push(i);const a=t(i);a!=null&&a.length&&r(a)})};return r(e),n}function we(e,t,n){let r=[],o;return i=>{let a;n.key&&n.debug&&(a=Date.now());const s=e(i);if(!(s.length!==r.length||s.some((c,f)=>r[f]!==c)))return o;r=s;let u;if(n.key&&n.debug&&(u=Date.now()),o=t(...s),n==null||n.onChange==null||n.onChange(o),n.key&&n.debug&&n!=null&&n.debug()){const c=Math.round((Date.now()-a)*100)/100,f=Math.round((Date.now()-u)*100)/100,p=f/16,d=(m,g)=>{for(m=String(m);m.length<g;)m=" "+m;return m};console.info(`%c⏱ ${d(f,5)} /${d(c,5)} ms`,`
165
165
  font-size: .6rem;
166
166
  font-weight: bold;
167
- color: hsl(${Math.max(0,Math.min(120-120*g,120))}deg 100% 31%);`,n?.key)}return o}}function de(e,t,n,r){return{debug:()=>{var o;return(o=e?.debugAll)!=null?o:e[t]},key:process.env.NODE_ENV==="development"&&n,onChange:r}}function wE(e,t,n,r){const o=()=>{var i;return(i=s.getValue())!=null?i:e.options.renderFallbackValue},s={id:`${t.id}_${n.id}`,row:t,column:n,getValue:()=>t.getValue(r),renderValue:o,getContext:ue(()=>[e,n,t,s],(i,a,l,c)=>({table:i,column:a,row:l,cell:c,getValue:c.getValue,renderValue:c.renderValue}),de(e.options,"debugCells","cell.getContext"))};return e._features.forEach(i=>{i.createCell==null||i.createCell(s,n,t,e)},{}),s}function SE(e,t,n,r){var o,s;const a={...e._getDefaultColumnDef(),...t},l=a.accessorKey;let c=(o=(s=a.id)!=null?s:l?typeof String.prototype.replaceAll=="function"?l.replaceAll(".","_"):l.replace(/\./g,"_"):void 0)!=null?o:typeof a.header=="string"?a.header:void 0,d;if(a.accessorFn?d=a.accessorFn:l&&(l.includes(".")?d=g=>{let f=g;for(const m of l.split(".")){var h;f=(h=f)==null?void 0:h[m],process.env.NODE_ENV!=="production"&&f===void 0&&console.warn(`"${m}" in deeply nested key "${l}" returned undefined.`)}return f}:d=g=>g[a.accessorKey]),!c)throw process.env.NODE_ENV!=="production"?new Error(a.accessorFn?"Columns require an id when using an accessorFn":"Columns require an id when using a non-string header"):new Error;let p={id:`${String(c)}`,accessorFn:d,parent:r,depth:n,columnDef:a,columns:[],getFlatColumns:ue(()=>[!0],()=>{var g;return[p,...(g=p.columns)==null?void 0:g.flatMap(f=>f.getFlatColumns())]},de(e.options,"debugColumns","column.getFlatColumns")),getLeafColumns:ue(()=>[e._getOrderColumnsFn()],g=>{var f;if((f=p.columns)!=null&&f.length){let h=p.columns.flatMap(m=>m.getLeafColumns());return g(h)}return[p]},de(e.options,"debugColumns","column.getLeafColumns"))};for(const g of e._features)g.createColumn==null||g.createColumn(p,e);return p}const et="debugHeaders";function Ec(e,t,n){var r;let s={id:(r=n.id)!=null?r:t.id,column:t,index:n.index,isPlaceholder:!!n.isPlaceholder,placeholderId:n.placeholderId,depth:n.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{const i=[],a=l=>{l.subHeaders&&l.subHeaders.length&&l.subHeaders.map(a),i.push(l)};return a(s),i},getContext:()=>({table:e,header:s,column:t})};return e._features.forEach(i=>{i.createHeader==null||i.createHeader(s,e)}),s}const RE={createTable:e=>{e.getHeaderGroups=ue(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r,o)=>{var s,i;const a=(s=r?.map(p=>n.find(g=>g.id===p)).filter(Boolean))!=null?s:[],l=(i=o?.map(p=>n.find(g=>g.id===p)).filter(Boolean))!=null?i:[],c=n.filter(p=>!(r!=null&&r.includes(p.id))&&!(o!=null&&o.includes(p.id)));return ro(t,[...a,...c,...l],e)},de(e.options,et,"getHeaderGroups")),e.getCenterHeaderGroups=ue(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r,o)=>(n=n.filter(s=>!(r!=null&&r.includes(s.id))&&!(o!=null&&o.includes(s.id))),ro(t,n,e,"center")),de(e.options,et,"getCenterHeaderGroups")),e.getLeftHeaderGroups=ue(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left],(t,n,r)=>{var o;const s=(o=r?.map(i=>n.find(a=>a.id===i)).filter(Boolean))!=null?o:[];return ro(t,s,e,"left")},de(e.options,et,"getLeftHeaderGroups")),e.getRightHeaderGroups=ue(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right],(t,n,r)=>{var o;const s=(o=r?.map(i=>n.find(a=>a.id===i)).filter(Boolean))!=null?o:[];return ro(t,s,e,"right")},de(e.options,et,"getRightHeaderGroups")),e.getFooterGroups=ue(()=>[e.getHeaderGroups()],t=>[...t].reverse(),de(e.options,et,"getFooterGroups")),e.getLeftFooterGroups=ue(()=>[e.getLeftHeaderGroups()],t=>[...t].reverse(),de(e.options,et,"getLeftFooterGroups")),e.getCenterFooterGroups=ue(()=>[e.getCenterHeaderGroups()],t=>[...t].reverse(),de(e.options,et,"getCenterFooterGroups")),e.getRightFooterGroups=ue(()=>[e.getRightHeaderGroups()],t=>[...t].reverse(),de(e.options,et,"getRightFooterGroups")),e.getFlatHeaders=ue(()=>[e.getHeaderGroups()],t=>t.map(n=>n.headers).flat(),de(e.options,et,"getFlatHeaders")),e.getLeftFlatHeaders=ue(()=>[e.getLeftHeaderGroups()],t=>t.map(n=>n.headers).flat(),de(e.options,et,"getLeftFlatHeaders")),e.getCenterFlatHeaders=ue(()=>[e.getCenterHeaderGroups()],t=>t.map(n=>n.headers).flat(),de(e.options,et,"getCenterFlatHeaders")),e.getRightFlatHeaders=ue(()=>[e.getRightHeaderGroups()],t=>t.map(n=>n.headers).flat(),de(e.options,et,"getRightFlatHeaders")),e.getCenterLeafHeaders=ue(()=>[e.getCenterFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),de(e.options,et,"getCenterLeafHeaders")),e.getLeftLeafHeaders=ue(()=>[e.getLeftFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),de(e.options,et,"getLeftLeafHeaders")),e.getRightLeafHeaders=ue(()=>[e.getRightFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),de(e.options,et,"getRightLeafHeaders")),e.getLeafHeaders=ue(()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()],(t,n,r)=>{var o,s,i,a,l,c;return[...(o=(s=t[0])==null?void 0:s.headers)!=null?o:[],...(i=(a=n[0])==null?void 0:a.headers)!=null?i:[],...(l=(c=r[0])==null?void 0:c.headers)!=null?l:[]].map(d=>d.getLeafHeaders()).flat()},de(e.options,et,"getLeafHeaders"))}};function ro(e,t,n,r){var o,s;let i=0;const a=function(g,f){f===void 0&&(f=1),i=Math.max(i,f),g.filter(h=>h.getIsVisible()).forEach(h=>{var m;(m=h.columns)!=null&&m.length&&a(h.columns,f+1)},0)};a(e);let l=[];const c=(g,f)=>{const h={depth:f,id:[r,`${f}`].filter(Boolean).join("_"),headers:[]},m=[];g.forEach(b=>{const y=[...m].reverse()[0],x=b.column.depth===h.depth;let w,C=!1;if(x&&b.column.parent?w=b.column.parent:(w=b.column,C=!0),y&&y?.column===w)y.subHeaders.push(b);else{const S=Ec(n,w,{id:[r,f,w.id,b?.id].filter(Boolean).join("_"),isPlaceholder:C,placeholderId:C?`${m.filter(I=>I.column===w).length}`:void 0,depth:f,index:m.length});S.subHeaders.push(b),m.push(S)}h.headers.push(b),b.headerGroup=h}),l.push(h),f>0&&c(m,f-1)},d=t.map((g,f)=>Ec(n,g,{depth:i,index:f}));c(d,i-1),l.reverse();const p=g=>g.filter(h=>h.column.getIsVisible()).map(h=>{let m=0,b=0,y=[0];h.subHeaders&&h.subHeaders.length?(y=[],p(h.subHeaders).forEach(w=>{let{colSpan:C,rowSpan:S}=w;m+=C,y.push(S)})):m=1;const x=Math.min(...y);return b=b+x,h.colSpan=m,h.rowSpan=b,{colSpan:m,rowSpan:b}});return p((o=(s=l[0])==null?void 0:s.headers)!=null?o:[]),l}const EE=(e,t,n,r,o,s,i)=>{let a={id:t,index:r,original:n,depth:o,parentId:i,_valuesCache:{},_uniqueValuesCache:{},getValue:l=>{if(a._valuesCache.hasOwnProperty(l))return a._valuesCache[l];const c=e.getColumn(l);if(c!=null&&c.accessorFn)return a._valuesCache[l]=c.accessorFn(a.original,r),a._valuesCache[l]},getUniqueValues:l=>{if(a._uniqueValuesCache.hasOwnProperty(l))return a._uniqueValuesCache[l];const c=e.getColumn(l);if(c!=null&&c.accessorFn)return c.columnDef.getUniqueValues?(a._uniqueValuesCache[l]=c.columnDef.getUniqueValues(a.original,r),a._uniqueValuesCache[l]):(a._uniqueValuesCache[l]=[a.getValue(l)],a._uniqueValuesCache[l])},renderValue:l=>{var c;return(c=a.getValue(l))!=null?c:e.options.renderFallbackValue},subRows:[],getLeafRows:()=>CE(a.subRows,l=>l.subRows),getParentRow:()=>a.parentId?e.getRow(a.parentId,!0):void 0,getParentRows:()=>{let l=[],c=a;for(;;){const d=c.getParentRow();if(!d)break;l.push(d),c=d}return l.reverse()},getAllCells:ue(()=>[e.getAllLeafColumns()],l=>l.map(c=>wE(e,a,c,c.id)),de(e.options,"debugRows","getAllCells")),_getAllCellsByColumnId:ue(()=>[a.getAllCells()],l=>l.reduce((c,d)=>(c[d.column.id]=d,c),{}),de(e.options,"debugRows","getAllCellsByColumnId"))};for(let l=0;l<e._features.length;l++){const c=e._features[l];c==null||c.createRow==null||c.createRow(a,e)}return a},IE={createColumn:(e,t)=>{e._getFacetedRowModel=t.options.getFacetedRowModel&&t.options.getFacetedRowModel(t,e.id),e.getFacetedRowModel=()=>e._getFacetedRowModel?e._getFacetedRowModel():t.getPreFilteredRowModel(),e._getFacetedUniqueValues=t.options.getFacetedUniqueValues&&t.options.getFacetedUniqueValues(t,e.id),e.getFacetedUniqueValues=()=>e._getFacetedUniqueValues?e._getFacetedUniqueValues():new Map,e._getFacetedMinMaxValues=t.options.getFacetedMinMaxValues&&t.options.getFacetedMinMaxValues(t,e.id),e.getFacetedMinMaxValues=()=>{if(e._getFacetedMinMaxValues)return e._getFacetedMinMaxValues()}}},Ig=(e,t,n)=>{var r,o;const s=n==null||(r=n.toString())==null?void 0:r.toLowerCase();return!!(!((o=e.getValue(t))==null||(o=o.toString())==null||(o=o.toLowerCase())==null)&&o.includes(s))};Ig.autoRemove=e=>Pt(e);const kg=(e,t,n)=>{var r;return!!(!((r=e.getValue(t))==null||(r=r.toString())==null)&&r.includes(n))};kg.autoRemove=e=>Pt(e);const Ng=(e,t,n)=>{var r;return((r=e.getValue(t))==null||(r=r.toString())==null?void 0:r.toLowerCase())===n?.toLowerCase()};Ng.autoRemove=e=>Pt(e);const Pg=(e,t,n)=>{var r;return(r=e.getValue(t))==null?void 0:r.includes(n)};Pg.autoRemove=e=>Pt(e);const Og=(e,t,n)=>!n.some(r=>{var o;return!((o=e.getValue(t))!=null&&o.includes(r))});Og.autoRemove=e=>Pt(e)||!(e!=null&&e.length);const _g=(e,t,n)=>n.some(r=>{var o;return(o=e.getValue(t))==null?void 0:o.includes(r)});_g.autoRemove=e=>Pt(e)||!(e!=null&&e.length);const Ag=(e,t,n)=>e.getValue(t)===n;Ag.autoRemove=e=>Pt(e);const Tg=(e,t,n)=>e.getValue(t)==n;Tg.autoRemove=e=>Pt(e);const el=(e,t,n)=>{let[r,o]=n;const s=e.getValue(t);return s>=r&&s<=o};el.resolveFilterValue=e=>{let[t,n]=e,r=typeof t!="number"?parseFloat(t):t,o=typeof n!="number"?parseFloat(n):n,s=t===null||Number.isNaN(r)?-1/0:r,i=n===null||Number.isNaN(o)?1/0:o;if(s>i){const a=s;s=i,i=a}return[s,i]};el.autoRemove=e=>Pt(e)||Pt(e[0])&&Pt(e[1]);const Gt={includesString:Ig,includesStringSensitive:kg,equalsString:Ng,arrIncludes:Pg,arrIncludesAll:Og,arrIncludesSome:_g,equals:Ag,weakEquals:Tg,inNumberRange:el};function Pt(e){return e==null||e===""}const kE={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],...e}),getDefaultOptions:e=>({onColumnFiltersChange:bt("columnFilters",e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),createColumn:(e,t)=>{e.getAutoFilterFn=()=>{const n=t.getCoreRowModel().flatRows[0],r=n?.getValue(e.id);return typeof r=="string"?Gt.includesString:typeof r=="number"?Gt.inNumberRange:typeof r=="boolean"||r!==null&&typeof r=="object"?Gt.equals:Array.isArray(r)?Gt.arrIncludes:Gt.weakEquals},e.getFilterFn=()=>{var n,r;return ss(e.columnDef.filterFn)?e.columnDef.filterFn:e.columnDef.filterFn==="auto"?e.getAutoFilterFn():(n=(r=t.options.filterFns)==null?void 0:r[e.columnDef.filterFn])!=null?n:Gt[e.columnDef.filterFn]},e.getCanFilter=()=>{var n,r,o;return((n=e.columnDef.enableColumnFilter)!=null?n:!0)&&((r=t.options.enableColumnFilters)!=null?r:!0)&&((o=t.options.enableFilters)!=null?o:!0)&&!!e.accessorFn},e.getIsFiltered=()=>e.getFilterIndex()>-1,e.getFilterValue=()=>{var n;return(n=t.getState().columnFilters)==null||(n=n.find(r=>r.id===e.id))==null?void 0:n.value},e.getFilterIndex=()=>{var n,r;return(n=(r=t.getState().columnFilters)==null?void 0:r.findIndex(o=>o.id===e.id))!=null?n:-1},e.setFilterValue=n=>{t.setColumnFilters(r=>{const o=e.getFilterFn(),s=r?.find(d=>d.id===e.id),i=sn(n,s?s.value:void 0);if(Ic(o,i,e)){var a;return(a=r?.filter(d=>d.id!==e.id))!=null?a:[]}const l={id:e.id,value:i};if(s){var c;return(c=r?.map(d=>d.id===e.id?l:d))!=null?c:[]}return r!=null&&r.length?[...r,l]:[l]})}},createRow:(e,t)=>{e.columnFilters={},e.columnFiltersMeta={}},createTable:e=>{e.setColumnFilters=t=>{const n=e.getAllLeafColumns(),r=o=>{var s;return(s=sn(t,o))==null?void 0:s.filter(i=>{const a=n.find(l=>l.id===i.id);if(a){const l=a.getFilterFn();if(Ic(l,i.value,a))return!1}return!0})};e.options.onColumnFiltersChange==null||e.options.onColumnFiltersChange(r)},e.resetColumnFilters=t=>{var n,r;e.setColumnFilters(t?[]:(n=(r=e.initialState)==null?void 0:r.columnFilters)!=null?n:[])},e.getPreFilteredRowModel=()=>e.getCoreRowModel(),e.getFilteredRowModel=()=>(!e._getFilteredRowModel&&e.options.getFilteredRowModel&&(e._getFilteredRowModel=e.options.getFilteredRowModel(e)),e.options.manualFiltering||!e._getFilteredRowModel?e.getPreFilteredRowModel():e._getFilteredRowModel())}};function Ic(e,t,n){return(e&&e.autoRemove?e.autoRemove(t,n):!1)||typeof t>"u"||typeof t=="string"&&!t}const NE=(e,t,n)=>n.reduce((r,o)=>{const s=o.getValue(e);return r+(typeof s=="number"?s:0)},0),PE=(e,t,n)=>{let r;return n.forEach(o=>{const s=o.getValue(e);s!=null&&(r>s||r===void 0&&s>=s)&&(r=s)}),r},OE=(e,t,n)=>{let r;return n.forEach(o=>{const s=o.getValue(e);s!=null&&(r<s||r===void 0&&s>=s)&&(r=s)}),r},_E=(e,t,n)=>{let r,o;return n.forEach(s=>{const i=s.getValue(e);i!=null&&(r===void 0?i>=i&&(r=o=i):(r>i&&(r=i),o<i&&(o=i)))}),[r,o]},AE=(e,t)=>{let n=0,r=0;if(t.forEach(o=>{let s=o.getValue(e);s!=null&&(s=+s)>=s&&(++n,r+=s)}),n)return r/n},TE=(e,t)=>{if(!t.length)return;const n=t.map(s=>s.getValue(e));if(!yE(n))return;if(n.length===1)return n[0];const r=Math.floor(n.length/2),o=n.sort((s,i)=>s-i);return n.length%2!==0?o[r]:(o[r-1]+o[r])/2},ME=(e,t)=>Array.from(new Set(t.map(n=>n.getValue(e))).values()),DE=(e,t)=>new Set(t.map(n=>n.getValue(e))).size,FE=(e,t)=>t.length,Hs={sum:NE,min:PE,max:OE,extent:_E,mean:AE,median:TE,unique:ME,uniqueCount:DE,count:FE},VE={getDefaultColumnDef:()=>({aggregatedCell:e=>{var t,n;return(t=(n=e.getValue())==null||n.toString==null?void 0:n.toString())!=null?t:null},aggregationFn:"auto"}),getInitialState:e=>({grouping:[],...e}),getDefaultOptions:e=>({onGroupingChange:bt("grouping",e),groupedColumnMode:"reorder"}),createColumn:(e,t)=>{e.toggleGrouping=()=>{t.setGrouping(n=>n!=null&&n.includes(e.id)?n.filter(r=>r!==e.id):[...n??[],e.id])},e.getCanGroup=()=>{var n,r;return((n=e.columnDef.enableGrouping)!=null?n:!0)&&((r=t.options.enableGrouping)!=null?r:!0)&&(!!e.accessorFn||!!e.columnDef.getGroupingValue)},e.getIsGrouped=()=>{var n;return(n=t.getState().grouping)==null?void 0:n.includes(e.id)},e.getGroupedIndex=()=>{var n;return(n=t.getState().grouping)==null?void 0:n.indexOf(e.id)},e.getToggleGroupingHandler=()=>{const n=e.getCanGroup();return()=>{n&&e.toggleGrouping()}},e.getAutoAggregationFn=()=>{const n=t.getCoreRowModel().flatRows[0],r=n?.getValue(e.id);if(typeof r=="number")return Hs.sum;if(Object.prototype.toString.call(r)==="[object Date]")return Hs.extent},e.getAggregationFn=()=>{var n,r;if(!e)throw new Error;return ss(e.columnDef.aggregationFn)?e.columnDef.aggregationFn:e.columnDef.aggregationFn==="auto"?e.getAutoAggregationFn():(n=(r=t.options.aggregationFns)==null?void 0:r[e.columnDef.aggregationFn])!=null?n:Hs[e.columnDef.aggregationFn]}},createTable:e=>{e.setGrouping=t=>e.options.onGroupingChange==null?void 0:e.options.onGroupingChange(t),e.resetGrouping=t=>{var n,r;e.setGrouping(t?[]:(n=(r=e.initialState)==null?void 0:r.grouping)!=null?n:[])},e.getPreGroupedRowModel=()=>e.getFilteredRowModel(),e.getGroupedRowModel=()=>(!e._getGroupedRowModel&&e.options.getGroupedRowModel&&(e._getGroupedRowModel=e.options.getGroupedRowModel(e)),e.options.manualGrouping||!e._getGroupedRowModel?e.getPreGroupedRowModel():e._getGroupedRowModel())},createRow:(e,t)=>{e.getIsGrouped=()=>!!e.groupingColumnId,e.getGroupingValue=n=>{if(e._groupingValuesCache.hasOwnProperty(n))return e._groupingValuesCache[n];const r=t.getColumn(n);return r!=null&&r.columnDef.getGroupingValue?(e._groupingValuesCache[n]=r.columnDef.getGroupingValue(e.original),e._groupingValuesCache[n]):e.getValue(n)},e._groupingValuesCache={}},createCell:(e,t,n,r)=>{e.getIsGrouped=()=>t.getIsGrouped()&&t.id===n.groupingColumnId,e.getIsPlaceholder=()=>!e.getIsGrouped()&&t.getIsGrouped(),e.getIsAggregated=()=>{var o;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!!((o=n.subRows)!=null&&o.length)}}};function LE(e,t,n){if(!(t!=null&&t.length)||!n)return e;const r=e.filter(s=>!t.includes(s.id));return n==="remove"?r:[...t.map(s=>e.find(i=>i.id===s)).filter(Boolean),...r]}const jE={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:bt("columnOrder",e)}),createColumn:(e,t)=>{e.getIndex=ue(n=>[pr(t,n)],n=>n.findIndex(r=>r.id===e.id),de(t.options,"debugColumns","getIndex")),e.getIsFirstColumn=n=>{var r;return((r=pr(t,n)[0])==null?void 0:r.id)===e.id},e.getIsLastColumn=n=>{var r;const o=pr(t,n);return((r=o[o.length-1])==null?void 0:r.id)===e.id}},createTable:e=>{e.setColumnOrder=t=>e.options.onColumnOrderChange==null?void 0:e.options.onColumnOrderChange(t),e.resetColumnOrder=t=>{var n;e.setColumnOrder(t?[]:(n=e.initialState.columnOrder)!=null?n:[])},e._getOrderColumnsFn=ue(()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode],(t,n,r)=>o=>{let s=[];if(!(t!=null&&t.length))s=o;else{const i=[...t],a=[...o];for(;a.length&&i.length;){const l=i.shift(),c=a.findIndex(d=>d.id===l);c>-1&&s.push(a.splice(c,1)[0])}s=[...s,...a]}return LE(s,n,r)},de(e.options,"debugTable","_getOrderColumnsFn"))}},Bs=()=>({left:[],right:[]}),$E={getInitialState:e=>({columnPinning:Bs(),...e}),getDefaultOptions:e=>({onColumnPinningChange:bt("columnPinning",e)}),createColumn:(e,t)=>{e.pin=n=>{const r=e.getLeafColumns().map(o=>o.id).filter(Boolean);t.setColumnPinning(o=>{var s,i;if(n==="right"){var a,l;return{left:((a=o?.left)!=null?a:[]).filter(p=>!(r!=null&&r.includes(p))),right:[...((l=o?.right)!=null?l:[]).filter(p=>!(r!=null&&r.includes(p))),...r]}}if(n==="left"){var c,d;return{left:[...((c=o?.left)!=null?c:[]).filter(p=>!(r!=null&&r.includes(p))),...r],right:((d=o?.right)!=null?d:[]).filter(p=>!(r!=null&&r.includes(p)))}}return{left:((s=o?.left)!=null?s:[]).filter(p=>!(r!=null&&r.includes(p))),right:((i=o?.right)!=null?i:[]).filter(p=>!(r!=null&&r.includes(p)))}})},e.getCanPin=()=>e.getLeafColumns().some(r=>{var o,s,i;return((o=r.columnDef.enablePinning)!=null?o:!0)&&((s=(i=t.options.enableColumnPinning)!=null?i:t.options.enablePinning)!=null?s:!0)}),e.getIsPinned=()=>{const n=e.getLeafColumns().map(a=>a.id),{left:r,right:o}=t.getState().columnPinning,s=n.some(a=>r?.includes(a)),i=n.some(a=>o?.includes(a));return s?"left":i?"right":!1},e.getPinnedIndex=()=>{var n,r;const o=e.getIsPinned();return o?(n=(r=t.getState().columnPinning)==null||(r=r[o])==null?void 0:r.indexOf(e.id))!=null?n:-1:0}},createRow:(e,t)=>{e.getCenterVisibleCells=ue(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left,t.getState().columnPinning.right],(n,r,o)=>{const s=[...r??[],...o??[]];return n.filter(i=>!s.includes(i.column.id))},de(t.options,"debugRows","getCenterVisibleCells")),e.getLeftVisibleCells=ue(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left],(n,r)=>(r??[]).map(s=>n.find(i=>i.column.id===s)).filter(Boolean).map(s=>({...s,position:"left"})),de(t.options,"debugRows","getLeftVisibleCells")),e.getRightVisibleCells=ue(()=>[e._getAllVisibleCells(),t.getState().columnPinning.right],(n,r)=>(r??[]).map(s=>n.find(i=>i.column.id===s)).filter(Boolean).map(s=>({...s,position:"right"})),de(t.options,"debugRows","getRightVisibleCells"))},createTable:e=>{e.setColumnPinning=t=>e.options.onColumnPinningChange==null?void 0:e.options.onColumnPinningChange(t),e.resetColumnPinning=t=>{var n,r;return e.setColumnPinning(t?Bs():(n=(r=e.initialState)==null?void 0:r.columnPinning)!=null?n:Bs())},e.getIsSomeColumnsPinned=t=>{var n;const r=e.getState().columnPinning;if(!t){var o,s;return!!((o=r.left)!=null&&o.length||(s=r.right)!=null&&s.length)}return!!((n=r[t])!=null&&n.length)},e.getLeftLeafColumns=ue(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left],(t,n)=>(n??[]).map(r=>t.find(o=>o.id===r)).filter(Boolean),de(e.options,"debugColumns","getLeftLeafColumns")),e.getRightLeafColumns=ue(()=>[e.getAllLeafColumns(),e.getState().columnPinning.right],(t,n)=>(n??[]).map(r=>t.find(o=>o.id===r)).filter(Boolean),de(e.options,"debugColumns","getRightLeafColumns")),e.getCenterLeafColumns=ue(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r)=>{const o=[...n??[],...r??[]];return t.filter(s=>!o.includes(s.id))},de(e.options,"debugColumns","getCenterLeafColumns"))}};function zE(e){return e||(typeof document<"u"?document:null)}const oo={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},Ws=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),GE={getDefaultColumnDef:()=>oo,getInitialState:e=>({columnSizing:{},columnSizingInfo:Ws(),...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:bt("columnSizing",e),onColumnSizingInfoChange:bt("columnSizingInfo",e)}),createColumn:(e,t)=>{e.getSize=()=>{var n,r,o;const s=t.getState().columnSizing[e.id];return Math.min(Math.max((n=e.columnDef.minSize)!=null?n:oo.minSize,(r=s??e.columnDef.size)!=null?r:oo.size),(o=e.columnDef.maxSize)!=null?o:oo.maxSize)},e.getStart=ue(n=>[n,pr(t,n),t.getState().columnSizing],(n,r)=>r.slice(0,e.getIndex(n)).reduce((o,s)=>o+s.getSize(),0),de(t.options,"debugColumns","getStart")),e.getAfter=ue(n=>[n,pr(t,n),t.getState().columnSizing],(n,r)=>r.slice(e.getIndex(n)+1).reduce((o,s)=>o+s.getSize(),0),de(t.options,"debugColumns","getAfter")),e.resetSize=()=>{t.setColumnSizing(n=>{let{[e.id]:r,...o}=n;return o})},e.getCanResize=()=>{var n,r;return((n=e.columnDef.enableResizing)!=null?n:!0)&&((r=t.options.enableColumnResizing)!=null?r:!0)},e.getIsResizing=()=>t.getState().columnSizingInfo.isResizingColumn===e.id},createHeader:(e,t)=>{e.getSize=()=>{let n=0;const r=o=>{if(o.subHeaders.length)o.subHeaders.forEach(r);else{var s;n+=(s=o.column.getSize())!=null?s:0}};return r(e),n},e.getStart=()=>{if(e.index>0){const n=e.headerGroup.headers[e.index-1];return n.getStart()+n.getSize()}return 0},e.getResizeHandler=n=>{const r=t.getColumn(e.column.id),o=r?.getCanResize();return s=>{if(!r||!o||(s.persist==null||s.persist(),Us(s)&&s.touches&&s.touches.length>1))return;const i=e.getSize(),a=e?e.getLeafHeaders().map(y=>[y.column.id,y.column.getSize()]):[[r.id,r.getSize()]],l=Us(s)?Math.round(s.touches[0].clientX):s.clientX,c={},d=(y,x)=>{typeof x=="number"&&(t.setColumnSizingInfo(w=>{var C,S;const I=t.options.columnResizeDirection==="rtl"?-1:1,E=(x-((C=w?.startOffset)!=null?C:0))*I,R=Math.max(E/((S=w?.startSize)!=null?S:0),-.999999);return w.columnSizingStart.forEach(F=>{let[N,T]=F;c[N]=Math.round(Math.max(T+T*R,0)*100)/100}),{...w,deltaOffset:E,deltaPercentage:R}}),(t.options.columnResizeMode==="onChange"||y==="end")&&t.setColumnSizing(w=>({...w,...c})))},p=y=>d("move",y),g=y=>{d("end",y),t.setColumnSizingInfo(x=>({...x,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},f=zE(n),h={moveHandler:y=>p(y.clientX),upHandler:y=>{f?.removeEventListener("mousemove",h.moveHandler),f?.removeEventListener("mouseup",h.upHandler),g(y.clientX)}},m={moveHandler:y=>(y.cancelable&&(y.preventDefault(),y.stopPropagation()),p(y.touches[0].clientX),!1),upHandler:y=>{var x;f?.removeEventListener("touchmove",m.moveHandler),f?.removeEventListener("touchend",m.upHandler),y.cancelable&&(y.preventDefault(),y.stopPropagation()),g((x=y.touches[0])==null?void 0:x.clientX)}},b=HE()?{passive:!1}:!1;Us(s)?(f?.addEventListener("touchmove",m.moveHandler,b),f?.addEventListener("touchend",m.upHandler,b)):(f?.addEventListener("mousemove",h.moveHandler,b),f?.addEventListener("mouseup",h.upHandler,b)),t.setColumnSizingInfo(y=>({...y,startOffset:l,startSize:i,deltaOffset:0,deltaPercentage:0,columnSizingStart:a,isResizingColumn:r.id}))}}},createTable:e=>{e.setColumnSizing=t=>e.options.onColumnSizingChange==null?void 0:e.options.onColumnSizingChange(t),e.setColumnSizingInfo=t=>e.options.onColumnSizingInfoChange==null?void 0:e.options.onColumnSizingInfoChange(t),e.resetColumnSizing=t=>{var n;e.setColumnSizing(t?{}:(n=e.initialState.columnSizing)!=null?n:{})},e.resetHeaderSizeInfo=t=>{var n;e.setColumnSizingInfo(t?Ws():(n=e.initialState.columnSizingInfo)!=null?n:Ws())},e.getTotalSize=()=>{var t,n;return(t=(n=e.getHeaderGroups()[0])==null?void 0:n.headers.reduce((r,o)=>r+o.getSize(),0))!=null?t:0},e.getLeftTotalSize=()=>{var t,n;return(t=(n=e.getLeftHeaderGroups()[0])==null?void 0:n.headers.reduce((r,o)=>r+o.getSize(),0))!=null?t:0},e.getCenterTotalSize=()=>{var t,n;return(t=(n=e.getCenterHeaderGroups()[0])==null?void 0:n.headers.reduce((r,o)=>r+o.getSize(),0))!=null?t:0},e.getRightTotalSize=()=>{var t,n;return(t=(n=e.getRightHeaderGroups()[0])==null?void 0:n.headers.reduce((r,o)=>r+o.getSize(),0))!=null?t:0}}};let so=null;function HE(){if(typeof so=="boolean")return so;let e=!1;try{const t={get passive(){return e=!0,!1}},n=()=>{};window.addEventListener("test",n,t),window.removeEventListener("test",n)}catch{e=!1}return so=e,so}function Us(e){return e.type==="touchstart"}const BE={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:bt("columnVisibility",e)}),createColumn:(e,t)=>{e.toggleVisibility=n=>{e.getCanHide()&&t.setColumnVisibility(r=>({...r,[e.id]:n??!e.getIsVisible()}))},e.getIsVisible=()=>{var n,r;const o=e.columns;return(n=o.length?o.some(s=>s.getIsVisible()):(r=t.getState().columnVisibility)==null?void 0:r[e.id])!=null?n:!0},e.getCanHide=()=>{var n,r;return((n=e.columnDef.enableHiding)!=null?n:!0)&&((r=t.options.enableHiding)!=null?r:!0)},e.getToggleVisibilityHandler=()=>n=>{e.toggleVisibility==null||e.toggleVisibility(n.target.checked)}},createRow:(e,t)=>{e._getAllVisibleCells=ue(()=>[e.getAllCells(),t.getState().columnVisibility],n=>n.filter(r=>r.column.getIsVisible()),de(t.options,"debugRows","_getAllVisibleCells")),e.getVisibleCells=ue(()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()],(n,r,o)=>[...n,...r,...o],de(t.options,"debugRows","getVisibleCells"))},createTable:e=>{const t=(n,r)=>ue(()=>[r(),r().filter(o=>o.getIsVisible()).map(o=>o.id).join("_")],o=>o.filter(s=>s.getIsVisible==null?void 0:s.getIsVisible()),de(e.options,"debugColumns",n));e.getVisibleFlatColumns=t("getVisibleFlatColumns",()=>e.getAllFlatColumns()),e.getVisibleLeafColumns=t("getVisibleLeafColumns",()=>e.getAllLeafColumns()),e.getLeftVisibleLeafColumns=t("getLeftVisibleLeafColumns",()=>e.getLeftLeafColumns()),e.getRightVisibleLeafColumns=t("getRightVisibleLeafColumns",()=>e.getRightLeafColumns()),e.getCenterVisibleLeafColumns=t("getCenterVisibleLeafColumns",()=>e.getCenterLeafColumns()),e.setColumnVisibility=n=>e.options.onColumnVisibilityChange==null?void 0:e.options.onColumnVisibilityChange(n),e.resetColumnVisibility=n=>{var r;e.setColumnVisibility(n?{}:(r=e.initialState.columnVisibility)!=null?r:{})},e.toggleAllColumnsVisible=n=>{var r;n=(r=n)!=null?r:!e.getIsAllColumnsVisible(),e.setColumnVisibility(e.getAllLeafColumns().reduce((o,s)=>({...o,[s.id]:n||!(s.getCanHide!=null&&s.getCanHide())}),{}))},e.getIsAllColumnsVisible=()=>!e.getAllLeafColumns().some(n=>!(n.getIsVisible!=null&&n.getIsVisible())),e.getIsSomeColumnsVisible=()=>e.getAllLeafColumns().some(n=>n.getIsVisible==null?void 0:n.getIsVisible()),e.getToggleAllColumnsVisibilityHandler=()=>n=>{var r;e.toggleAllColumnsVisible((r=n.target)==null?void 0:r.checked)}}};function pr(e,t){return t?t==="center"?e.getCenterVisibleLeafColumns():t==="left"?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns()}const WE={createTable:e=>{e._getGlobalFacetedRowModel=e.options.getFacetedRowModel&&e.options.getFacetedRowModel(e,"__global__"),e.getGlobalFacetedRowModel=()=>e.options.manualFiltering||!e._getGlobalFacetedRowModel?e.getPreFilteredRowModel():e._getGlobalFacetedRowModel(),e._getGlobalFacetedUniqueValues=e.options.getFacetedUniqueValues&&e.options.getFacetedUniqueValues(e,"__global__"),e.getGlobalFacetedUniqueValues=()=>e._getGlobalFacetedUniqueValues?e._getGlobalFacetedUniqueValues():new Map,e._getGlobalFacetedMinMaxValues=e.options.getFacetedMinMaxValues&&e.options.getFacetedMinMaxValues(e,"__global__"),e.getGlobalFacetedMinMaxValues=()=>{if(e._getGlobalFacetedMinMaxValues)return e._getGlobalFacetedMinMaxValues()}}},UE={getInitialState:e=>({globalFilter:void 0,...e}),getDefaultOptions:e=>({onGlobalFilterChange:bt("globalFilter",e),globalFilterFn:"auto",getColumnCanGlobalFilter:t=>{var n;const r=(n=e.getCoreRowModel().flatRows[0])==null||(n=n._getAllCellsByColumnId()[t.id])==null?void 0:n.getValue();return typeof r=="string"||typeof r=="number"}}),createColumn:(e,t)=>{e.getCanGlobalFilter=()=>{var n,r,o,s;return((n=e.columnDef.enableGlobalFilter)!=null?n:!0)&&((r=t.options.enableGlobalFilter)!=null?r:!0)&&((o=t.options.enableFilters)!=null?o:!0)&&((s=t.options.getColumnCanGlobalFilter==null?void 0:t.options.getColumnCanGlobalFilter(e))!=null?s:!0)&&!!e.accessorFn}},createTable:e=>{e.getGlobalAutoFilterFn=()=>Gt.includesString,e.getGlobalFilterFn=()=>{var t,n;const{globalFilterFn:r}=e.options;return ss(r)?r:r==="auto"?e.getGlobalAutoFilterFn():(t=(n=e.options.filterFns)==null?void 0:n[r])!=null?t:Gt[r]},e.setGlobalFilter=t=>{e.options.onGlobalFilterChange==null||e.options.onGlobalFilterChange(t)},e.resetGlobalFilter=t=>{e.setGlobalFilter(t?void 0:e.initialState.globalFilter)}}},qE={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:bt("expanded",e),paginateExpandedRows:!0}),createTable:e=>{let t=!1,n=!1;e._autoResetExpanded=()=>{var r,o;if(!t){e._queue(()=>{t=!0});return}if((r=(o=e.options.autoResetAll)!=null?o:e.options.autoResetExpanded)!=null?r:!e.options.manualExpanding){if(n)return;n=!0,e._queue(()=>{e.resetExpanded(),n=!1})}},e.setExpanded=r=>e.options.onExpandedChange==null?void 0:e.options.onExpandedChange(r),e.toggleAllRowsExpanded=r=>{r??!e.getIsAllRowsExpanded()?e.setExpanded(!0):e.setExpanded({})},e.resetExpanded=r=>{var o,s;e.setExpanded(r?{}:(o=(s=e.initialState)==null?void 0:s.expanded)!=null?o:{})},e.getCanSomeRowsExpand=()=>e.getPrePaginationRowModel().flatRows.some(r=>r.getCanExpand()),e.getToggleAllRowsExpandedHandler=()=>r=>{r.persist==null||r.persist(),e.toggleAllRowsExpanded()},e.getIsSomeRowsExpanded=()=>{const r=e.getState().expanded;return r===!0||Object.values(r).some(Boolean)},e.getIsAllRowsExpanded=()=>{const r=e.getState().expanded;return typeof r=="boolean"?r===!0:!(!Object.keys(r).length||e.getRowModel().flatRows.some(o=>!o.getIsExpanded()))},e.getExpandedDepth=()=>{let r=0;return(e.getState().expanded===!0?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach(s=>{const i=s.split(".");r=Math.max(r,i.length)}),r},e.getPreExpandedRowModel=()=>e.getSortedRowModel(),e.getExpandedRowModel=()=>(!e._getExpandedRowModel&&e.options.getExpandedRowModel&&(e._getExpandedRowModel=e.options.getExpandedRowModel(e)),e.options.manualExpanding||!e._getExpandedRowModel?e.getPreExpandedRowModel():e._getExpandedRowModel())},createRow:(e,t)=>{e.toggleExpanded=n=>{t.setExpanded(r=>{var o;const s=r===!0?!0:!!(r!=null&&r[e.id]);let i={};if(r===!0?Object.keys(t.getRowModel().rowsById).forEach(a=>{i[a]=!0}):i=r,n=(o=n)!=null?o:!s,!s&&n)return{...i,[e.id]:!0};if(s&&!n){const{[e.id]:a,...l}=i;return l}return r})},e.getIsExpanded=()=>{var n;const r=t.getState().expanded;return!!((n=t.options.getIsRowExpanded==null?void 0:t.options.getIsRowExpanded(e))!=null?n:r===!0||r?.[e.id])},e.getCanExpand=()=>{var n,r,o;return(n=t.options.getRowCanExpand==null?void 0:t.options.getRowCanExpand(e))!=null?n:((r=t.options.enableExpanding)!=null?r:!0)&&!!((o=e.subRows)!=null&&o.length)},e.getIsAllParentsExpanded=()=>{let n=!0,r=e;for(;n&&r.parentId;)r=t.getRow(r.parentId,!0),n=r.getIsExpanded();return n},e.getToggleExpandedHandler=()=>{const n=e.getCanExpand();return()=>{n&&e.toggleExpanded()}}}},Ei=0,Ii=10,qs=()=>({pageIndex:Ei,pageSize:Ii}),KE={getInitialState:e=>({...e,pagination:{...qs(),...e?.pagination}}),getDefaultOptions:e=>({onPaginationChange:bt("pagination",e)}),createTable:e=>{let t=!1,n=!1;e._autoResetPageIndex=()=>{var r,o;if(!t){e._queue(()=>{t=!0});return}if((r=(o=e.options.autoResetAll)!=null?o:e.options.autoResetPageIndex)!=null?r:!e.options.manualPagination){if(n)return;n=!0,e._queue(()=>{e.resetPageIndex(),n=!1})}},e.setPagination=r=>{const o=s=>sn(r,s);return e.options.onPaginationChange==null?void 0:e.options.onPaginationChange(o)},e.resetPagination=r=>{var o;e.setPagination(r?qs():(o=e.initialState.pagination)!=null?o:qs())},e.setPageIndex=r=>{e.setPagination(o=>{let s=sn(r,o.pageIndex);const i=typeof e.options.pageCount>"u"||e.options.pageCount===-1?Number.MAX_SAFE_INTEGER:e.options.pageCount-1;return s=Math.max(0,Math.min(s,i)),{...o,pageIndex:s}})},e.resetPageIndex=r=>{var o,s;e.setPageIndex(r?Ei:(o=(s=e.initialState)==null||(s=s.pagination)==null?void 0:s.pageIndex)!=null?o:Ei)},e.resetPageSize=r=>{var o,s;e.setPageSize(r?Ii:(o=(s=e.initialState)==null||(s=s.pagination)==null?void 0:s.pageSize)!=null?o:Ii)},e.setPageSize=r=>{e.setPagination(o=>{const s=Math.max(1,sn(r,o.pageSize)),i=o.pageSize*o.pageIndex,a=Math.floor(i/s);return{...o,pageIndex:a,pageSize:s}})},e.setPageCount=r=>e.setPagination(o=>{var s;let i=sn(r,(s=e.options.pageCount)!=null?s:-1);return typeof i=="number"&&(i=Math.max(-1,i)),{...o,pageCount:i}}),e.getPageOptions=ue(()=>[e.getPageCount()],r=>{let o=[];return r&&r>0&&(o=[...new Array(r)].fill(null).map((s,i)=>i)),o},de(e.options,"debugTable","getPageOptions")),e.getCanPreviousPage=()=>e.getState().pagination.pageIndex>0,e.getCanNextPage=()=>{const{pageIndex:r}=e.getState().pagination,o=e.getPageCount();return o===-1?!0:o===0?!1:r<o-1},e.previousPage=()=>e.setPageIndex(r=>r-1),e.nextPage=()=>e.setPageIndex(r=>r+1),e.firstPage=()=>e.setPageIndex(0),e.lastPage=()=>e.setPageIndex(e.getPageCount()-1),e.getPrePaginationRowModel=()=>e.getExpandedRowModel(),e.getPaginationRowModel=()=>(!e._getPaginationRowModel&&e.options.getPaginationRowModel&&(e._getPaginationRowModel=e.options.getPaginationRowModel(e)),e.options.manualPagination||!e._getPaginationRowModel?e.getPrePaginationRowModel():e._getPaginationRowModel()),e.getPageCount=()=>{var r;return(r=e.options.pageCount)!=null?r:Math.ceil(e.getRowCount()/e.getState().pagination.pageSize)},e.getRowCount=()=>{var r;return(r=e.options.rowCount)!=null?r:e.getPrePaginationRowModel().rows.length}}},Ks=()=>({top:[],bottom:[]}),YE={getInitialState:e=>({rowPinning:Ks(),...e}),getDefaultOptions:e=>({onRowPinningChange:bt("rowPinning",e)}),createRow:(e,t)=>{e.pin=(n,r,o)=>{const s=r?e.getLeafRows().map(l=>{let{id:c}=l;return c}):[],i=o?e.getParentRows().map(l=>{let{id:c}=l;return c}):[],a=new Set([...i,e.id,...s]);t.setRowPinning(l=>{var c,d;if(n==="bottom"){var p,g;return{top:((p=l?.top)!=null?p:[]).filter(m=>!(a!=null&&a.has(m))),bottom:[...((g=l?.bottom)!=null?g:[]).filter(m=>!(a!=null&&a.has(m))),...Array.from(a)]}}if(n==="top"){var f,h;return{top:[...((f=l?.top)!=null?f:[]).filter(m=>!(a!=null&&a.has(m))),...Array.from(a)],bottom:((h=l?.bottom)!=null?h:[]).filter(m=>!(a!=null&&a.has(m)))}}return{top:((c=l?.top)!=null?c:[]).filter(m=>!(a!=null&&a.has(m))),bottom:((d=l?.bottom)!=null?d:[]).filter(m=>!(a!=null&&a.has(m)))}})},e.getCanPin=()=>{var n;const{enableRowPinning:r,enablePinning:o}=t.options;return typeof r=="function"?r(e):(n=r??o)!=null?n:!0},e.getIsPinned=()=>{const n=[e.id],{top:r,bottom:o}=t.getState().rowPinning,s=n.some(a=>r?.includes(a)),i=n.some(a=>o?.includes(a));return s?"top":i?"bottom":!1},e.getPinnedIndex=()=>{var n,r;const o=e.getIsPinned();if(!o)return-1;const s=(n=o==="top"?t.getTopRows():t.getBottomRows())==null?void 0:n.map(i=>{let{id:a}=i;return a});return(r=s?.indexOf(e.id))!=null?r:-1}},createTable:e=>{e.setRowPinning=t=>e.options.onRowPinningChange==null?void 0:e.options.onRowPinningChange(t),e.resetRowPinning=t=>{var n,r;return e.setRowPinning(t?Ks():(n=(r=e.initialState)==null?void 0:r.rowPinning)!=null?n:Ks())},e.getIsSomeRowsPinned=t=>{var n;const r=e.getState().rowPinning;if(!t){var o,s;return!!((o=r.top)!=null&&o.length||(s=r.bottom)!=null&&s.length)}return!!((n=r[t])!=null&&n.length)},e._getPinnedRows=(t,n,r)=>{var o;return((o=e.options.keepPinnedRows)==null||o?(n??[]).map(i=>{const a=e.getRow(i,!0);return a.getIsAllParentsExpanded()?a:null}):(n??[]).map(i=>t.find(a=>a.id===i))).filter(Boolean).map(i=>({...i,position:r}))},e.getTopRows=ue(()=>[e.getRowModel().rows,e.getState().rowPinning.top],(t,n)=>e._getPinnedRows(t,n,"top"),de(e.options,"debugRows","getTopRows")),e.getBottomRows=ue(()=>[e.getRowModel().rows,e.getState().rowPinning.bottom],(t,n)=>e._getPinnedRows(t,n,"bottom"),de(e.options,"debugRows","getBottomRows")),e.getCenterRows=ue(()=>[e.getRowModel().rows,e.getState().rowPinning.top,e.getState().rowPinning.bottom],(t,n,r)=>{const o=new Set([...n??[],...r??[]]);return t.filter(s=>!o.has(s.id))},de(e.options,"debugRows","getCenterRows"))}},XE={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:bt("rowSelection",e),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:e=>{e.setRowSelection=t=>e.options.onRowSelectionChange==null?void 0:e.options.onRowSelectionChange(t),e.resetRowSelection=t=>{var n;return e.setRowSelection(t?{}:(n=e.initialState.rowSelection)!=null?n:{})},e.toggleAllRowsSelected=t=>{e.setRowSelection(n=>{t=typeof t<"u"?t:!e.getIsAllRowsSelected();const r={...n},o=e.getPreGroupedRowModel().flatRows;return t?o.forEach(s=>{s.getCanSelect()&&(r[s.id]=!0)}):o.forEach(s=>{delete r[s.id]}),r})},e.toggleAllPageRowsSelected=t=>e.setRowSelection(n=>{const r=typeof t<"u"?t:!e.getIsAllPageRowsSelected(),o={...n};return e.getRowModel().rows.forEach(s=>{ki(o,s.id,r,!0,e)}),o}),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=ue(()=>[e.getState().rowSelection,e.getCoreRowModel()],(t,n)=>Object.keys(t).length?Ys(e,n):{rows:[],flatRows:[],rowsById:{}},de(e.options,"debugTable","getSelectedRowModel")),e.getFilteredSelectedRowModel=ue(()=>[e.getState().rowSelection,e.getFilteredRowModel()],(t,n)=>Object.keys(t).length?Ys(e,n):{rows:[],flatRows:[],rowsById:{}},de(e.options,"debugTable","getFilteredSelectedRowModel")),e.getGroupedSelectedRowModel=ue(()=>[e.getState().rowSelection,e.getSortedRowModel()],(t,n)=>Object.keys(t).length?Ys(e,n):{rows:[],flatRows:[],rowsById:{}},de(e.options,"debugTable","getGroupedSelectedRowModel")),e.getIsAllRowsSelected=()=>{const t=e.getFilteredRowModel().flatRows,{rowSelection:n}=e.getState();let r=!!(t.length&&Object.keys(n).length);return r&&t.some(o=>o.getCanSelect()&&!n[o.id])&&(r=!1),r},e.getIsAllPageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows.filter(o=>o.getCanSelect()),{rowSelection:n}=e.getState();let r=!!t.length;return r&&t.some(o=>!n[o.id])&&(r=!1),r},e.getIsSomeRowsSelected=()=>{var t;const n=Object.keys((t=e.getState().rowSelection)!=null?t:{}).length;return n>0&&n<e.getFilteredRowModel().flatRows.length},e.getIsSomePageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows;return e.getIsAllPageRowsSelected()?!1:t.filter(n=>n.getCanSelect()).some(n=>n.getIsSelected()||n.getIsSomeSelected())},e.getToggleAllRowsSelectedHandler=()=>t=>{e.toggleAllRowsSelected(t.target.checked)},e.getToggleAllPageRowsSelectedHandler=()=>t=>{e.toggleAllPageRowsSelected(t.target.checked)}},createRow:(e,t)=>{e.toggleSelected=(n,r)=>{const o=e.getIsSelected();t.setRowSelection(s=>{var i;if(n=typeof n<"u"?n:!o,e.getCanSelect()&&o===n)return s;const a={...s};return ki(a,e.id,n,(i=r?.selectChildren)!=null?i:!0,t),a})},e.getIsSelected=()=>{const{rowSelection:n}=t.getState();return tl(e,n)},e.getIsSomeSelected=()=>{const{rowSelection:n}=t.getState();return Ni(e,n)==="some"},e.getIsAllSubRowsSelected=()=>{const{rowSelection:n}=t.getState();return Ni(e,n)==="all"},e.getCanSelect=()=>{var n;return typeof t.options.enableRowSelection=="function"?t.options.enableRowSelection(e):(n=t.options.enableRowSelection)!=null?n:!0},e.getCanSelectSubRows=()=>{var n;return typeof t.options.enableSubRowSelection=="function"?t.options.enableSubRowSelection(e):(n=t.options.enableSubRowSelection)!=null?n:!0},e.getCanMultiSelect=()=>{var n;return typeof t.options.enableMultiRowSelection=="function"?t.options.enableMultiRowSelection(e):(n=t.options.enableMultiRowSelection)!=null?n:!0},e.getToggleSelectedHandler=()=>{const n=e.getCanSelect();return r=>{var o;n&&e.toggleSelected((o=r.target)==null?void 0:o.checked)}}}},ki=(e,t,n,r,o)=>{var s;const i=o.getRow(t,!0);n?(i.getCanMultiSelect()||Object.keys(e).forEach(a=>delete e[a]),i.getCanSelect()&&(e[t]=!0)):delete e[t],r&&(s=i.subRows)!=null&&s.length&&i.getCanSelectSubRows()&&i.subRows.forEach(a=>ki(e,a.id,n,r,o))};function Ys(e,t){const n=e.getState().rowSelection,r=[],o={},s=function(i,a){return i.map(l=>{var c;const d=tl(l,n);if(d&&(r.push(l),o[l.id]=l),(c=l.subRows)!=null&&c.length&&(l={...l,subRows:s(l.subRows)}),d)return l}).filter(Boolean)};return{rows:s(t.rows),flatRows:r,rowsById:o}}function tl(e,t){var n;return(n=t[e.id])!=null?n:!1}function Ni(e,t,n){var r;if(!((r=e.subRows)!=null&&r.length))return!1;let o=!0,s=!1;return e.subRows.forEach(i=>{if(!(s&&!o)&&(i.getCanSelect()&&(tl(i,t)?s=!0:o=!1),i.subRows&&i.subRows.length)){const a=Ni(i,t);a==="all"?s=!0:(a==="some"&&(s=!0),o=!1)}}),o?"all":s?"some":!1}const Pi=/([0-9]+)/gm,ZE=(e,t,n)=>Mg(pn(e.getValue(n)).toLowerCase(),pn(t.getValue(n)).toLowerCase()),QE=(e,t,n)=>Mg(pn(e.getValue(n)),pn(t.getValue(n))),JE=(e,t,n)=>nl(pn(e.getValue(n)).toLowerCase(),pn(t.getValue(n)).toLowerCase()),e1=(e,t,n)=>nl(pn(e.getValue(n)),pn(t.getValue(n))),t1=(e,t,n)=>{const r=e.getValue(n),o=t.getValue(n);return r>o?1:r<o?-1:0},n1=(e,t,n)=>nl(e.getValue(n),t.getValue(n));function nl(e,t){return e===t?0:e>t?1:-1}function pn(e){return typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?"":String(e):typeof e=="string"?e:""}function Mg(e,t){const n=e.split(Pi).filter(Boolean),r=t.split(Pi).filter(Boolean);for(;n.length&&r.length;){const o=n.shift(),s=r.shift(),i=parseInt(o,10),a=parseInt(s,10),l=[i,a].sort();if(isNaN(l[0])){if(o>s)return 1;if(s>o)return-1;continue}if(isNaN(l[1]))return isNaN(i)?-1:1;if(i>a)return 1;if(a>i)return-1}return n.length-r.length}const rr={alphanumeric:ZE,alphanumericCaseSensitive:QE,text:JE,textCaseSensitive:e1,datetime:t1,basic:n1},r1={getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:bt("sorting",e),isMultiSortEvent:t=>t.shiftKey}),createColumn:(e,t)=>{e.getAutoSortingFn=()=>{const n=t.getFilteredRowModel().flatRows.slice(10);let r=!1;for(const o of n){const s=o?.getValue(e.id);if(Object.prototype.toString.call(s)==="[object Date]")return rr.datetime;if(typeof s=="string"&&(r=!0,s.split(Pi).length>1))return rr.alphanumeric}return r?rr.text:rr.basic},e.getAutoSortDir=()=>{const n=t.getFilteredRowModel().flatRows[0];return typeof n?.getValue(e.id)=="string"?"asc":"desc"},e.getSortingFn=()=>{var n,r;if(!e)throw new Error;return ss(e.columnDef.sortingFn)?e.columnDef.sortingFn:e.columnDef.sortingFn==="auto"?e.getAutoSortingFn():(n=(r=t.options.sortingFns)==null?void 0:r[e.columnDef.sortingFn])!=null?n:rr[e.columnDef.sortingFn]},e.toggleSorting=(n,r)=>{const o=e.getNextSortingOrder(),s=typeof n<"u"&&n!==null;t.setSorting(i=>{const a=i?.find(f=>f.id===e.id),l=i?.findIndex(f=>f.id===e.id);let c=[],d,p=s?n:o==="desc";if(i!=null&&i.length&&e.getCanMultiSort()&&r?a?d="toggle":d="add":i!=null&&i.length&&l!==i.length-1?d="replace":a?d="toggle":d="replace",d==="toggle"&&(s||o||(d="remove")),d==="add"){var g;c=[...i,{id:e.id,desc:p}],c.splice(0,c.length-((g=t.options.maxMultiSortColCount)!=null?g:Number.MAX_SAFE_INTEGER))}else d==="toggle"?c=i.map(f=>f.id===e.id?{...f,desc:p}:f):d==="remove"?c=i.filter(f=>f.id!==e.id):c=[{id:e.id,desc:p}];return c})},e.getFirstSortDir=()=>{var n,r;return((n=(r=e.columnDef.sortDescFirst)!=null?r:t.options.sortDescFirst)!=null?n:e.getAutoSortDir()==="desc")?"desc":"asc"},e.getNextSortingOrder=n=>{var r,o;const s=e.getFirstSortDir(),i=e.getIsSorted();return i?i!==s&&((r=t.options.enableSortingRemoval)==null||r)&&(!(n&&(o=t.options.enableMultiRemove)!=null)||o)?!1:i==="desc"?"asc":"desc":s},e.getCanSort=()=>{var n,r;return((n=e.columnDef.enableSorting)!=null?n:!0)&&((r=t.options.enableSorting)!=null?r:!0)&&!!e.accessorFn},e.getCanMultiSort=()=>{var n,r;return(n=(r=e.columnDef.enableMultiSort)!=null?r:t.options.enableMultiSort)!=null?n:!!e.accessorFn},e.getIsSorted=()=>{var n;const r=(n=t.getState().sorting)==null?void 0:n.find(o=>o.id===e.id);return r?r.desc?"desc":"asc":!1},e.getSortIndex=()=>{var n,r;return(n=(r=t.getState().sorting)==null?void 0:r.findIndex(o=>o.id===e.id))!=null?n:-1},e.clearSorting=()=>{t.setSorting(n=>n!=null&&n.length?n.filter(r=>r.id!==e.id):[])},e.getToggleSortingHandler=()=>{const n=e.getCanSort();return r=>{n&&(r.persist==null||r.persist(),e.toggleSorting==null||e.toggleSorting(void 0,e.getCanMultiSort()?t.options.isMultiSortEvent==null?void 0:t.options.isMultiSortEvent(r):!1))}}},createTable:e=>{e.setSorting=t=>e.options.onSortingChange==null?void 0:e.options.onSortingChange(t),e.resetSorting=t=>{var n,r;e.setSorting(t?[]:(n=(r=e.initialState)==null?void 0:r.sorting)!=null?n:[])},e.getPreSortedRowModel=()=>e.getGroupedRowModel(),e.getSortedRowModel=()=>(!e._getSortedRowModel&&e.options.getSortedRowModel&&(e._getSortedRowModel=e.options.getSortedRowModel(e)),e.options.manualSorting||!e._getSortedRowModel?e.getPreSortedRowModel():e._getSortedRowModel())}},o1=[RE,BE,jE,$E,IE,kE,WE,UE,r1,VE,qE,KE,YE,XE,GE];function s1(e){var t,n;process.env.NODE_ENV!=="production"&&(e.debugAll||e.debugTable)&&console.info("Creating Table Instance...");const r=[...o1,...(t=e._features)!=null?t:[]];let o={_features:r};const s=o._features.reduce((g,f)=>Object.assign(g,f.getDefaultOptions==null?void 0:f.getDefaultOptions(o)),{}),i=g=>o.options.mergeOptions?o.options.mergeOptions(s,g):{...s,...g};let l={...{},...(n=e.initialState)!=null?n:{}};o._features.forEach(g=>{var f;l=(f=g.getInitialState==null?void 0:g.getInitialState(l))!=null?f:l});const c=[];let d=!1;const p={_features:r,options:{...s,...e},initialState:l,_queue:g=>{c.push(g),d||(d=!0,Promise.resolve().then(()=>{for(;c.length;)c.shift()();d=!1}).catch(f=>setTimeout(()=>{throw f})))},reset:()=>{o.setState(o.initialState)},setOptions:g=>{const f=sn(g,o.options);o.options=i(f)},getState:()=>o.options.state,setState:g=>{o.options.onStateChange==null||o.options.onStateChange(g)},_getRowId:(g,f,h)=>{var m;return(m=o.options.getRowId==null?void 0:o.options.getRowId(g,f,h))!=null?m:`${h?[h.id,f].join("."):f}`},getCoreRowModel:()=>(o._getCoreRowModel||(o._getCoreRowModel=o.options.getCoreRowModel(o)),o._getCoreRowModel()),getRowModel:()=>o.getPaginationRowModel(),getRow:(g,f)=>{let h=(f?o.getPrePaginationRowModel():o.getRowModel()).rowsById[g];if(!h&&(h=o.getCoreRowModel().rowsById[g],!h))throw process.env.NODE_ENV!=="production"?new Error(`getRow could not find row with ID: ${g}`):new Error;return h},_getDefaultColumnDef:ue(()=>[o.options.defaultColumn],g=>{var f;return g=(f=g)!=null?f:{},{header:h=>{const m=h.header.column.columnDef;return m.accessorKey?m.accessorKey:m.accessorFn?m.id:null},cell:h=>{var m,b;return(m=(b=h.renderValue())==null||b.toString==null?void 0:b.toString())!=null?m:null},...o._features.reduce((h,m)=>Object.assign(h,m.getDefaultColumnDef==null?void 0:m.getDefaultColumnDef()),{}),...g}},de(e,"debugColumns","_getDefaultColumnDef")),_getColumnDefs:()=>o.options.columns,getAllColumns:ue(()=>[o._getColumnDefs()],g=>{const f=function(h,m,b){return b===void 0&&(b=0),h.map(y=>{const x=SE(o,y,b,m),w=y;return x.columns=w.columns?f(w.columns,x,b+1):[],x})};return f(g)},de(e,"debugColumns","getAllColumns")),getAllFlatColumns:ue(()=>[o.getAllColumns()],g=>g.flatMap(f=>f.getFlatColumns()),de(e,"debugColumns","getAllFlatColumns")),_getAllFlatColumnsById:ue(()=>[o.getAllFlatColumns()],g=>g.reduce((f,h)=>(f[h.id]=h,f),{}),de(e,"debugColumns","getAllFlatColumnsById")),getAllLeafColumns:ue(()=>[o.getAllColumns(),o._getOrderColumnsFn()],(g,f)=>{let h=g.flatMap(m=>m.getLeafColumns());return f(h)},de(e,"debugColumns","getAllLeafColumns")),getColumn:g=>{const f=o._getAllFlatColumnsById()[g];return process.env.NODE_ENV!=="production"&&!f&&console.error(`[Table] Column with id '${g}' does not exist.`),f}};Object.assign(o,p);for(let g=0;g<o._features.length;g++){const f=o._features[g];f==null||f.createTable==null||f.createTable(o)}return o}function i1(){return e=>ue(()=>[e.options.data],t=>{const n={rows:[],flatRows:[],rowsById:{}},r=function(o,s,i){s===void 0&&(s=0);const a=[];for(let c=0;c<o.length;c++){const d=EE(e,e._getRowId(o[c],c,i),o[c],c,s,void 0,i?.id);if(n.flatRows.push(d),n.rowsById[d.id]=d,a.push(d),e.options.getSubRows){var l;d.originalSubRows=e.options.getSubRows(o[c],c),(l=d.originalSubRows)!=null&&l.length&&(d.subRows=r(d.originalSubRows,s+1,d))}}return a};return n.rows=r(t),n},de(e.options,"debugTable","getRowModel",()=>e._autoResetPageIndex()))}function kc(e,t){return e?a1(e)?u.createElement(e,t):e:null}function a1(e){return l1(e)||typeof e=="function"||c1(e)}function l1(e){return typeof e=="function"&&(()=>{const t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}function c1(e){return typeof e=="object"&&typeof e.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}function u1(e){const t={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[n]=u.useState(()=>({current:s1(t)})),[r,o]=u.useState(()=>n.current.initialState);return n.current.setOptions(s=>({...s,...e,state:{...r,...e.state},onStateChange:i=>{o(i),e.onStateChange==null||e.onStateChange(i)}})),n.current}function d1({columns:e,data:t}){const n=u1({data:t,columns:e,getCoreRowModel:i1()});return v.jsx("div",{className:"w-full overflow-hidden",children:v.jsxs(Ha,{children:[v.jsx(Ba,{children:n.getHeaderGroups().map(r=>v.jsx(fr,{children:r.headers.map(o=>v.jsx(Ua,{children:o.isPlaceholder?null:kc(o.column.columnDef.header,o.getContext())},o.id))},r.id))}),v.jsx(Wa,{children:n.getRowModel().rows.length?n.getRowModel().rows.map(r=>v.jsx(fr,{"data-state":r.getIsSelected()&&"selected",children:r.getVisibleCells().map(o=>v.jsx(_o,{children:kc(o.column.columnDef.cell,o.getContext())},o.id))},r.id)):v.jsx(fr,{children:v.jsx(_o,{colSpan:e.length,className:"h-24 text-center",children:"No results."})})})]})})}const f1=({children:e,text:t,place:n="top",arrow:r=!0,classes:o,color:s="dark",tooltipItemsLimit:i=1/0})=>{const{isOpened:a,togglePopup:l}=Ja(),c=Te.useMemo(()=>({arrow:s==="dark"?"fill-primary-inverse-bg":"fill-primary-bg",content:s==="dark"?"bg-primary-inverse-bg text-primary-inverse-text":"bg-primary-bg text-primary-text"}),[s]),d=Te.useMemo(()=>Array.isArray(t)?(t.length-i>0?t.slice(0,i):t).map((f,h)=>v.jsx("p",{className:o?.tooltipTextItem,children:f},h)):t,[o?.tooltipTextItem,t,i]);return v.jsxs(Sg,{open:a,onOpenChange:l,children:[v.jsx(Rg,{asChild:!0,className:o?.trigger,children:e}),v.jsxs(Qa,{side:n,className:c.content,children:[v.jsx("div",{className:L(o?.tooltip),children:d}),r&&v.jsx(Eg,{className:c.arrow})]})]})},Dg=({date:e=[],isValid:t,disabled:n=!1,label:r,description:o,classes:s,ref:i,...a})=>{const l={...t===!0&&!n&&{"aria-valid":!0},...t===!1&&!n&&{"aria-invalid":!0},disabled:n};return v.jsx(Ko,{className:s?.fieldset,children:v.jsx(wr,{className:s?.fieldgroup,children:v.jsxs(Sr,{className:s?.field,children:[r&&v.jsx(Kn,{...l,children:r}),e.length>0?v.jsxs(Sa,{"data-slot":!0,children:[v.jsx(Ea,{ref:i,...a,...l,disabled:n}),e.map(c=>v.jsx(Ra,{align:c.position,children:c.component},c.id))]}):v.jsx(wa,{ref:i,...a,...l,disabled:n}),o&&v.jsx(Rr,{...l,children:o})]})})})},p1=({...e})=>{const{isOpened:t,togglePopup:n}=Ja();return v.jsx(Dg,{...e,type:t?"text":"password",date:[{id:"0",position:"inline-end",component:v.jsx(Ut,{type:t?"eye-off":"eye",onClick:n,className:"cursor-pointer"})}]})};function g1({classNames:e,id:t,value:n,defaultValue:r,label:o,options:s=[],...i}){return v.jsx(Ga,{...i,defaultValue:r,className:L("w-fit",e?.classNameGroup),children:s.length?s.map(a=>v.jsxs("div",{className:L("flex items-center gap-3",e?.classNameContainerItem),children:[v.jsx(Oo,{value:a.value,id:a.id,className:e?.classNameGroupItem}),a.label&&v.jsx(br,{htmlFor:a.id,className:e?.classNameLabel,children:a.label})]},a.id)):v.jsxs("div",{className:L("flex items-center gap-3",e?.classNameContainerItem),children:[v.jsx(Oo,{value:n,id:t,className:e?.classNameGroupItem}),o&&v.jsx(br,{htmlFor:t,className:e?.classNameLabel,children:o})]})})}const sr=e=>typeof e=="object",Fg=e=>sr(e)?e.value:e,m1=e=>e.every(t=>typeof t=="string")||e.every(t=>typeof t=="object")?e:e.map(t=>Fg(t)),Xs=(e,t)=>e===null||t===null||typeof e=="string"||typeof t=="string"?e===t:e.id===t.id,Vg=({list:e,label:t,multiple:n,disabled:r=!1,isValid:o,description:s,onChange:i,...a})=>{const[l,c]=Te.useState([]),[d,p]=Te.useState(null),[g,f]=Te.useState(""),h=e,m=r?"opacity-50":"",b={...o===!0&&!r&&{"aria-valid":!0},...o===!1&&!r&&{"aria-invalid":!0},disabled:r},y=N=>{if(n){const T=Array.isArray(N)?N:N?[N]:[],_=T.length>l.length;c(T),i?.(m1(T)),_&&f("")}else{const T=Array.isArray(N)?N[0]??null:N;Xs(d,T)?(p(null),i?.(null)):(p(T),i?.(T)),f("")}},x=N=>{f(N.currentTarget.value)},w=()=>{r||(p(null),i?.(null))},C=n?l:d,S=g.trim().toLowerCase(),I=h.filter(N=>Fg(N).toLowerCase().includes(S)),E=(N,T)=>v.jsx(pf,{showRemove:T.withRemove,onClick:T.onClick,className:`${Ti({variant:N.variant,kind:N.kind})}
168
- ${m} ${T.className}`,children:v.jsx(Js,{variant:N.variant,classNames:{className:"px-2 py-0"},children:N.value})},String(N.id)),R=N=>v.jsxs(v.Fragment,{children:[N.map(T=>sr(T)?E(T,{withRemove:!r,className:"pl-2.5"}):v.jsx("span",{className:m,children:T},T)),v.jsx(xi,{...a,...b,placeholder:N.length>0?"":a.placeholder,value:g,onChange:x})]}),F=N=>v.jsxs(v.Fragment,{children:[N&&(sr(N)?E(N,{withRemove:!1,className:"ml-1",onClick:w}):v.jsx(Qs,{className:m,onClick:w,children:N})),v.jsx(xi,{...a,placeholder:N?"":a.placeholder,...b,value:g,onChange:x,className:"flex-1 pl-1"})]});return v.jsx(Ko,{children:v.jsx(wr,{children:v.jsxs(lf,{children:[v.jsx(Kn,{...b,children:t}),v.jsxs(af,{items:h,multiple:n,autoHighlight:n,value:C,onValueChange:r?void 0:y,children:[n?v.jsxs(vi,{disabled:r,className:"pr-8",children:[v.jsx(bi,{children:R}),v.jsx(ko,{className:"-ml-4.5",disabled:r})]}):v.jsxs(vi,{disabled:r,className:"pr-8",children:[v.jsx(bi,{children:F}),v.jsx(ko,{className:"-ml-4.5",disabled:r})]}),v.jsxs(cf,{children:[v.jsx(ff,{children:"No items found."}),v.jsx(uf,{children:I.map((N,T)=>{const _=n?l.some(q=>Xs(q,N)):Xs(d,N);return v.jsx(df,{disabled:r,value:N,className:`${_?"bg-tertiary-bg":""} ${typeof N=="string"?"py-1":"px-2 py-2"}`,children:sr(N)?v.jsx(Js,{dotPosition:"left",variant:N.variant,kind:N.kind,classNames:{className:"px-4 py-1.5"},children:N.value}):v.jsx(Qs,{className:"px-4 py-1.5",children:N})},sr(N)?String(N.id):`${N}-${T}`)})})]})]}),v.jsx(Rr,{...b,children:s})]})})})};Vg.displayName="SelectSearch";const h1=({label:e,description:t,isValid:n,...r})=>{const{disabled:o}=r,s={"aria-invalid":!!n},i=[n===!0&&"text-success-text",n===!1&&"text-error-text",o&&"text-disabled-text"].filter(Boolean).join(" ");return v.jsx(Ko,{children:v.jsx(wr,{children:v.jsxs(Sr,{children:[e&&v.jsx(Kn,{children:e}),v.jsx(Yo,{...r,...s}),t&&v.jsx(Rr,{className:L(o?"text-disabled-text":"",i),children:t})]})})})};exports.AppPagination=dE;exports.AppSidebar=bE;exports.Badge=Js;exports.BasicCheckbox=vE;exports.BasicModal=xE;exports.BasicTable=d1;exports.BasicTooltip=f1;exports.Button=Bt;exports.Card=Yc;exports.CardContent=Jc;exports.CardDescription=Qc;exports.CardFooter=eu;exports.CardHeader=Xc;exports.CardTitle=Zc;exports.Checkbox=ji;exports.Combobox=af;exports.ComboboxChip=pf;exports.ComboboxChips=vi;exports.ComboboxChipsInput=xi;exports.ComboboxCollection=Qw;exports.ComboboxContent=cf;exports.ComboboxEmpty=ff;exports.ComboboxField=lf;exports.ComboboxGroup=Xw;exports.ComboboxInput=Yw;exports.ComboboxItem=df;exports.ComboboxLabel=Zw;exports.ComboboxList=uf;exports.ComboboxSeparator=Jw;exports.ComboboxTrigger=ko;exports.ComboboxValue=bi;exports.Dialog=Kf;exports.DialogClose=E0;exports.DialogContent=Aa;exports.DialogDescription=Xf;exports.DialogFooter=Ma;exports.DialogHeader=Ta;exports.DialogOverlay=_a;exports.DialogPortal=Yf;exports.DialogTitle=Da;exports.DialogTrigger=R0;exports.Field=Sr;exports.FieldContent=Ew;exports.FieldDescription=Rr;exports.FieldError=rf;exports.FieldGroup=wr;exports.FieldLabel=Kn;exports.FieldLegend=Rw;exports.FieldSeparator=kw;exports.FieldSet=Ko;exports.FieldTitle=Iw;exports.Icon=Ut;exports.Input=wa;exports.InputField=Dg;exports.InputGroup=Sa;exports.InputGroupAddon=Ra;exports.InputGroupButton=of;exports.InputGroupInput=Ea;exports.InputGroupText=Aw;exports.InputGroupTextarea=Tw;exports.InputPassword=p1;exports.Label=br;exports.NavigationItem=Zf;exports.NavigationMenu=Qf;exports.Pagination=Fa;exports.PaginationContent=Va;exports.PaginationEllipsis=tp;exports.PaginationItem=jn;exports.PaginationLink=Er;exports.PaginationNext=ep;exports.PaginationPrevious=Jf;exports.Progress=ap;exports.RadioButton=g1;exports.RadioGroup=Ga;exports.RadioGroupItem=Oo;exports.SelectField=Vg;exports.Separator=Ca;exports.Switch=Dp;exports.Table=Ha;exports.TableBody=Wa;exports.TableCaption=Vp;exports.TableCell=_o;exports.TableFooter=Fp;exports.TableHead=Ua;exports.TableHeader=Ba;exports.TableRow=fr;exports.Tabs=SR;exports.TabsContent=eg;exports.TabsList=Qp;exports.TabsTrigger=Jp;exports.Textarea=Yo;exports.TextareaField=h1;exports.Tooltip=Sg;exports.TooltipArrow=Eg;exports.TooltipContent=Qa;exports.TooltipProvider=iE;exports.TooltipTrigger=Rg;exports.Typography=Qs;exports.badgeVariants=Ti;exports.buttonVariants=Di;exports.cn=L;exports.getTypographyClassName=qe;exports.typographyClassNames=Ai;exports.typographyVariantOptions=Um;exports.usePopupControls=Ja;
167
+ color: hsl(${Math.max(0,Math.min(120-120*p,120))}deg 100% 31%);`,n?.key)}return o}}function Ce(e,t,n,r){return{debug:()=>{var o;return(o=e?.debugAll)!=null?o:e[t]},key:process.env.NODE_ENV==="development"&&n,onChange:r}}function E3(e,t,n,r){const o=()=>{var a;return(a=i.getValue())!=null?a:e.options.renderFallbackValue},i={id:`${t.id}_${n.id}`,row:t,column:n,getValue:()=>t.getValue(r),renderValue:o,getContext:we(()=>[e,n,t,i],(a,s,l,u)=>({table:a,column:s,row:l,cell:u,getValue:u.getValue,renderValue:u.renderValue}),Ce(e.options,"debugCells","cell.getContext"))};return e._features.forEach(a=>{a.createCell==null||a.createCell(i,n,t,e)},{}),i}function O3(e,t,n,r){var o,i;const s={...e._getDefaultColumnDef(),...t},l=s.accessorKey;let u=(o=(i=s.id)!=null?i:l?typeof String.prototype.replaceAll=="function"?l.replaceAll(".","_"):l.replace(/\./g,"_"):void 0)!=null?o:typeof s.header=="string"?s.header:void 0,c;if(s.accessorFn?c=s.accessorFn:l&&(l.includes(".")?c=p=>{let d=p;for(const g of l.split(".")){var m;d=(m=d)==null?void 0:m[g],process.env.NODE_ENV!=="production"&&d===void 0&&console.warn(`"${g}" in deeply nested key "${l}" returned undefined.`)}return d}:c=p=>p[s.accessorKey]),!u)throw process.env.NODE_ENV!=="production"?new Error(s.accessorFn?"Columns require an id when using an accessorFn":"Columns require an id when using a non-string header"):new Error;let f={id:`${String(u)}`,accessorFn:c,parent:r,depth:n,columnDef:s,columns:[],getFlatColumns:we(()=>[!0],()=>{var p;return[f,...(p=f.columns)==null?void 0:p.flatMap(d=>d.getFlatColumns())]},Ce(e.options,"debugColumns","column.getFlatColumns")),getLeafColumns:we(()=>[e._getOrderColumnsFn()],p=>{var d;if((d=f.columns)!=null&&d.length){let m=f.columns.flatMap(g=>g.getLeafColumns());return p(m)}return[f]},Ce(e.options,"debugColumns","column.getLeafColumns"))};for(const p of e._features)p.createColumn==null||p.createColumn(f,e);return f}const $t="debugHeaders";function jb(e,t,n){var r;let i={id:(r=n.id)!=null?r:t.id,column:t,index:n.index,isPlaceholder:!!n.isPlaceholder,placeholderId:n.placeholderId,depth:n.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{const a=[],s=l=>{l.subHeaders&&l.subHeaders.length&&l.subHeaders.map(s),a.push(l)};return s(i),a},getContext:()=>({table:e,header:i,column:t})};return e._features.forEach(a=>{a.createHeader==null||a.createHeader(i,e)}),i}const P3={createTable:e=>{e.getHeaderGroups=we(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r,o)=>{var i,a;const s=(i=r?.map(f=>n.find(p=>p.id===f)).filter(Boolean))!=null?i:[],l=(a=o?.map(f=>n.find(p=>p.id===f)).filter(Boolean))!=null?a:[],u=n.filter(f=>!(r!=null&&r.includes(f.id))&&!(o!=null&&o.includes(f.id)));return fl(t,[...s,...u,...l],e)},Ce(e.options,$t,"getHeaderGroups")),e.getCenterHeaderGroups=we(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r,o)=>(n=n.filter(i=>!(r!=null&&r.includes(i.id))&&!(o!=null&&o.includes(i.id))),fl(t,n,e,"center")),Ce(e.options,$t,"getCenterHeaderGroups")),e.getLeftHeaderGroups=we(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left],(t,n,r)=>{var o;const i=(o=r?.map(a=>n.find(s=>s.id===a)).filter(Boolean))!=null?o:[];return fl(t,i,e,"left")},Ce(e.options,$t,"getLeftHeaderGroups")),e.getRightHeaderGroups=we(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right],(t,n,r)=>{var o;const i=(o=r?.map(a=>n.find(s=>s.id===a)).filter(Boolean))!=null?o:[];return fl(t,i,e,"right")},Ce(e.options,$t,"getRightHeaderGroups")),e.getFooterGroups=we(()=>[e.getHeaderGroups()],t=>[...t].reverse(),Ce(e.options,$t,"getFooterGroups")),e.getLeftFooterGroups=we(()=>[e.getLeftHeaderGroups()],t=>[...t].reverse(),Ce(e.options,$t,"getLeftFooterGroups")),e.getCenterFooterGroups=we(()=>[e.getCenterHeaderGroups()],t=>[...t].reverse(),Ce(e.options,$t,"getCenterFooterGroups")),e.getRightFooterGroups=we(()=>[e.getRightHeaderGroups()],t=>[...t].reverse(),Ce(e.options,$t,"getRightFooterGroups")),e.getFlatHeaders=we(()=>[e.getHeaderGroups()],t=>t.map(n=>n.headers).flat(),Ce(e.options,$t,"getFlatHeaders")),e.getLeftFlatHeaders=we(()=>[e.getLeftHeaderGroups()],t=>t.map(n=>n.headers).flat(),Ce(e.options,$t,"getLeftFlatHeaders")),e.getCenterFlatHeaders=we(()=>[e.getCenterHeaderGroups()],t=>t.map(n=>n.headers).flat(),Ce(e.options,$t,"getCenterFlatHeaders")),e.getRightFlatHeaders=we(()=>[e.getRightHeaderGroups()],t=>t.map(n=>n.headers).flat(),Ce(e.options,$t,"getRightFlatHeaders")),e.getCenterLeafHeaders=we(()=>[e.getCenterFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),Ce(e.options,$t,"getCenterLeafHeaders")),e.getLeftLeafHeaders=we(()=>[e.getLeftFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),Ce(e.options,$t,"getLeftLeafHeaders")),e.getRightLeafHeaders=we(()=>[e.getRightFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),Ce(e.options,$t,"getRightLeafHeaders")),e.getLeafHeaders=we(()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()],(t,n,r)=>{var o,i,a,s,l,u;return[...(o=(i=t[0])==null?void 0:i.headers)!=null?o:[],...(a=(s=n[0])==null?void 0:s.headers)!=null?a:[],...(l=(u=r[0])==null?void 0:u.headers)!=null?l:[]].map(c=>c.getLeafHeaders()).flat()},Ce(e.options,$t,"getLeafHeaders"))}};function fl(e,t,n,r){var o,i;let a=0;const s=function(p,d){d===void 0&&(d=1),a=Math.max(a,d),p.filter(m=>m.getIsVisible()).forEach(m=>{var g;(g=m.columns)!=null&&g.length&&s(m.columns,d+1)},0)};s(e);let l=[];const u=(p,d)=>{const m={depth:d,id:[r,`${d}`].filter(Boolean).join("_"),headers:[]},g=[];p.forEach(h=>{const y=[...g].reverse()[0],b=h.column.depth===m.depth;let x,w=!1;if(b&&h.column.parent?x=h.column.parent:(x=h.column,w=!0),y&&y?.column===x)y.subHeaders.push(h);else{const S=jb(n,x,{id:[r,d,x.id,h?.id].filter(Boolean).join("_"),isPlaceholder:w,placeholderId:w?`${g.filter(E=>E.column===x).length}`:void 0,depth:d,index:g.length});S.subHeaders.push(h),g.push(S)}m.headers.push(h),h.headerGroup=m}),l.push(m),d>0&&u(g,d-1)},c=t.map((p,d)=>jb(n,p,{depth:a,index:d}));u(c,a-1),l.reverse();const f=p=>p.filter(m=>m.column.getIsVisible()).map(m=>{let g=0,h=0,y=[0];m.subHeaders&&m.subHeaders.length?(y=[],f(m.subHeaders).forEach(x=>{let{colSpan:w,rowSpan:S}=x;g+=w,y.push(S)})):g=1;const b=Math.min(...y);return h=h+b,m.colSpan=g,m.rowSpan=h,{colSpan:g,rowSpan:h}});return f((o=(i=l[0])==null?void 0:i.headers)!=null?o:[]),l}const _3=(e,t,n,r,o,i,a)=>{let s={id:t,index:r,original:n,depth:o,parentId:a,_valuesCache:{},_uniqueValuesCache:{},getValue:l=>{if(s._valuesCache.hasOwnProperty(l))return s._valuesCache[l];const u=e.getColumn(l);if(u!=null&&u.accessorFn)return s._valuesCache[l]=u.accessorFn(s.original,r),s._valuesCache[l]},getUniqueValues:l=>{if(s._uniqueValuesCache.hasOwnProperty(l))return s._uniqueValuesCache[l];const u=e.getColumn(l);if(u!=null&&u.accessorFn)return u.columnDef.getUniqueValues?(s._uniqueValuesCache[l]=u.columnDef.getUniqueValues(s.original,r),s._uniqueValuesCache[l]):(s._uniqueValuesCache[l]=[s.getValue(l)],s._uniqueValuesCache[l])},renderValue:l=>{var u;return(u=s.getValue(l))!=null?u:e.options.renderFallbackValue},subRows:[],getLeafRows:()=>S3(s.subRows,l=>l.subRows),getParentRow:()=>s.parentId?e.getRow(s.parentId,!0):void 0,getParentRows:()=>{let l=[],u=s;for(;;){const c=u.getParentRow();if(!c)break;l.push(c),u=c}return l.reverse()},getAllCells:we(()=>[e.getAllLeafColumns()],l=>l.map(u=>E3(e,s,u,u.id)),Ce(e.options,"debugRows","getAllCells")),_getAllCellsByColumnId:we(()=>[s.getAllCells()],l=>l.reduce((u,c)=>(u[c.column.id]=c,u),{}),Ce(e.options,"debugRows","getAllCellsByColumnId"))};for(let l=0;l<e._features.length;l++){const u=e._features[l];u==null||u.createRow==null||u.createRow(s,e)}return s},A3={createColumn:(e,t)=>{e._getFacetedRowModel=t.options.getFacetedRowModel&&t.options.getFacetedRowModel(t,e.id),e.getFacetedRowModel=()=>e._getFacetedRowModel?e._getFacetedRowModel():t.getPreFilteredRowModel(),e._getFacetedUniqueValues=t.options.getFacetedUniqueValues&&t.options.getFacetedUniqueValues(t,e.id),e.getFacetedUniqueValues=()=>e._getFacetedUniqueValues?e._getFacetedUniqueValues():new Map,e._getFacetedMinMaxValues=t.options.getFacetedMinMaxValues&&t.options.getFacetedMinMaxValues(t,e.id),e.getFacetedMinMaxValues=()=>{if(e._getFacetedMinMaxValues)return e._getFacetedMinMaxValues()}}},w_=(e,t,n)=>{var r,o;const i=n==null||(r=n.toString())==null?void 0:r.toLowerCase();return!!(!((o=e.getValue(t))==null||(o=o.toString())==null||(o=o.toLowerCase())==null)&&o.includes(i))};w_.autoRemove=e=>zn(e);const C_=(e,t,n)=>{var r;return!!(!((r=e.getValue(t))==null||(r=r.toString())==null)&&r.includes(n))};C_.autoRemove=e=>zn(e);const S_=(e,t,n)=>{var r;return((r=e.getValue(t))==null||(r=r.toString())==null?void 0:r.toLowerCase())===n?.toLowerCase()};S_.autoRemove=e=>zn(e);const E_=(e,t,n)=>{var r;return(r=e.getValue(t))==null?void 0:r.includes(n)};E_.autoRemove=e=>zn(e);const O_=(e,t,n)=>!n.some(r=>{var o;return!((o=e.getValue(t))!=null&&o.includes(r))});O_.autoRemove=e=>zn(e)||!(e!=null&&e.length);const P_=(e,t,n)=>n.some(r=>{var o;return(o=e.getValue(t))==null?void 0:o.includes(r)});P_.autoRemove=e=>zn(e)||!(e!=null&&e.length);const __=(e,t,n)=>e.getValue(t)===n;__.autoRemove=e=>zn(e);const A_=(e,t,n)=>e.getValue(t)==n;A_.autoRemove=e=>zn(e);const Tg=(e,t,n)=>{let[r,o]=n;const i=e.getValue(t);return i>=r&&i<=o};Tg.resolveFilterValue=e=>{let[t,n]=e,r=typeof t!="number"?parseFloat(t):t,o=typeof n!="number"?parseFloat(n):n,i=t===null||Number.isNaN(r)?-1/0:r,a=n===null||Number.isNaN(o)?1/0:o;if(i>a){const s=i;i=a,a=s}return[i,a]};Tg.autoRemove=e=>zn(e)||zn(e[0])&&zn(e[1]);const mr={includesString:w_,includesStringSensitive:C_,equalsString:S_,arrIncludes:E_,arrIncludesAll:O_,arrIncludesSome:P_,equals:__,weakEquals:A_,inNumberRange:Tg};function zn(e){return e==null||e===""}const R3={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],...e}),getDefaultOptions:e=>({onColumnFiltersChange:vn("columnFilters",e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),createColumn:(e,t)=>{e.getAutoFilterFn=()=>{const n=t.getCoreRowModel().flatRows[0],r=n?.getValue(e.id);return typeof r=="string"?mr.includesString:typeof r=="number"?mr.inNumberRange:typeof r=="boolean"||r!==null&&typeof r=="object"?mr.equals:Array.isArray(r)?mr.arrIncludes:mr.weakEquals},e.getFilterFn=()=>{var n,r;return Ic(e.columnDef.filterFn)?e.columnDef.filterFn:e.columnDef.filterFn==="auto"?e.getAutoFilterFn():(n=(r=t.options.filterFns)==null?void 0:r[e.columnDef.filterFn])!=null?n:mr[e.columnDef.filterFn]},e.getCanFilter=()=>{var n,r,o;return((n=e.columnDef.enableColumnFilter)!=null?n:!0)&&((r=t.options.enableColumnFilters)!=null?r:!0)&&((o=t.options.enableFilters)!=null?o:!0)&&!!e.accessorFn},e.getIsFiltered=()=>e.getFilterIndex()>-1,e.getFilterValue=()=>{var n;return(n=t.getState().columnFilters)==null||(n=n.find(r=>r.id===e.id))==null?void 0:n.value},e.getFilterIndex=()=>{var n,r;return(n=(r=t.getState().columnFilters)==null?void 0:r.findIndex(o=>o.id===e.id))!=null?n:-1},e.setFilterValue=n=>{t.setColumnFilters(r=>{const o=e.getFilterFn(),i=r?.find(c=>c.id===e.id),a=ro(n,i?i.value:void 0);if($b(o,a,e)){var s;return(s=r?.filter(c=>c.id!==e.id))!=null?s:[]}const l={id:e.id,value:a};if(i){var u;return(u=r?.map(c=>c.id===e.id?l:c))!=null?u:[]}return r!=null&&r.length?[...r,l]:[l]})}},createRow:(e,t)=>{e.columnFilters={},e.columnFiltersMeta={}},createTable:e=>{e.setColumnFilters=t=>{const n=e.getAllLeafColumns(),r=o=>{var i;return(i=ro(t,o))==null?void 0:i.filter(a=>{const s=n.find(l=>l.id===a.id);if(s){const l=s.getFilterFn();if($b(l,a.value,s))return!1}return!0})};e.options.onColumnFiltersChange==null||e.options.onColumnFiltersChange(r)},e.resetColumnFilters=t=>{var n,r;e.setColumnFilters(t?[]:(n=(r=e.initialState)==null?void 0:r.columnFilters)!=null?n:[])},e.getPreFilteredRowModel=()=>e.getCoreRowModel(),e.getFilteredRowModel=()=>(!e._getFilteredRowModel&&e.options.getFilteredRowModel&&(e._getFilteredRowModel=e.options.getFilteredRowModel(e)),e.options.manualFiltering||!e._getFilteredRowModel?e.getPreFilteredRowModel():e._getFilteredRowModel())}};function $b(e,t,n){return(e&&e.autoRemove?e.autoRemove(t,n):!1)||typeof t>"u"||typeof t=="string"&&!t}const I3=(e,t,n)=>n.reduce((r,o)=>{const i=o.getValue(e);return r+(typeof i=="number"?i:0)},0),k3=(e,t,n)=>{let r;return n.forEach(o=>{const i=o.getValue(e);i!=null&&(r>i||r===void 0&&i>=i)&&(r=i)}),r},N3=(e,t,n)=>{let r;return n.forEach(o=>{const i=o.getValue(e);i!=null&&(r<i||r===void 0&&i>=i)&&(r=i)}),r},T3=(e,t,n)=>{let r,o;return n.forEach(i=>{const a=i.getValue(e);a!=null&&(r===void 0?a>=a&&(r=o=a):(r>a&&(r=a),o<a&&(o=a)))}),[r,o]},M3=(e,t)=>{let n=0,r=0;if(t.forEach(o=>{let i=o.getValue(e);i!=null&&(i=+i)>=i&&(++n,r+=i)}),n)return r/n},D3=(e,t)=>{if(!t.length)return;const n=t.map(i=>i.getValue(e));if(!C3(n))return;if(n.length===1)return n[0];const r=Math.floor(n.length/2),o=n.sort((i,a)=>i-a);return n.length%2!==0?o[r]:(o[r-1]+o[r])/2},j3=(e,t)=>Array.from(new Set(t.map(n=>n.getValue(e))).values()),$3=(e,t)=>new Set(t.map(n=>n.getValue(e))).size,L3=(e,t)=>t.length,ed={sum:I3,min:k3,max:N3,extent:T3,mean:M3,median:D3,unique:j3,uniqueCount:$3,count:L3},F3={getDefaultColumnDef:()=>({aggregatedCell:e=>{var t,n;return(t=(n=e.getValue())==null||n.toString==null?void 0:n.toString())!=null?t:null},aggregationFn:"auto"}),getInitialState:e=>({grouping:[],...e}),getDefaultOptions:e=>({onGroupingChange:vn("grouping",e),groupedColumnMode:"reorder"}),createColumn:(e,t)=>{e.toggleGrouping=()=>{t.setGrouping(n=>n!=null&&n.includes(e.id)?n.filter(r=>r!==e.id):[...n??[],e.id])},e.getCanGroup=()=>{var n,r;return((n=e.columnDef.enableGrouping)!=null?n:!0)&&((r=t.options.enableGrouping)!=null?r:!0)&&(!!e.accessorFn||!!e.columnDef.getGroupingValue)},e.getIsGrouped=()=>{var n;return(n=t.getState().grouping)==null?void 0:n.includes(e.id)},e.getGroupedIndex=()=>{var n;return(n=t.getState().grouping)==null?void 0:n.indexOf(e.id)},e.getToggleGroupingHandler=()=>{const n=e.getCanGroup();return()=>{n&&e.toggleGrouping()}},e.getAutoAggregationFn=()=>{const n=t.getCoreRowModel().flatRows[0],r=n?.getValue(e.id);if(typeof r=="number")return ed.sum;if(Object.prototype.toString.call(r)==="[object Date]")return ed.extent},e.getAggregationFn=()=>{var n,r;if(!e)throw new Error;return Ic(e.columnDef.aggregationFn)?e.columnDef.aggregationFn:e.columnDef.aggregationFn==="auto"?e.getAutoAggregationFn():(n=(r=t.options.aggregationFns)==null?void 0:r[e.columnDef.aggregationFn])!=null?n:ed[e.columnDef.aggregationFn]}},createTable:e=>{e.setGrouping=t=>e.options.onGroupingChange==null?void 0:e.options.onGroupingChange(t),e.resetGrouping=t=>{var n,r;e.setGrouping(t?[]:(n=(r=e.initialState)==null?void 0:r.grouping)!=null?n:[])},e.getPreGroupedRowModel=()=>e.getFilteredRowModel(),e.getGroupedRowModel=()=>(!e._getGroupedRowModel&&e.options.getGroupedRowModel&&(e._getGroupedRowModel=e.options.getGroupedRowModel(e)),e.options.manualGrouping||!e._getGroupedRowModel?e.getPreGroupedRowModel():e._getGroupedRowModel())},createRow:(e,t)=>{e.getIsGrouped=()=>!!e.groupingColumnId,e.getGroupingValue=n=>{if(e._groupingValuesCache.hasOwnProperty(n))return e._groupingValuesCache[n];const r=t.getColumn(n);return r!=null&&r.columnDef.getGroupingValue?(e._groupingValuesCache[n]=r.columnDef.getGroupingValue(e.original),e._groupingValuesCache[n]):e.getValue(n)},e._groupingValuesCache={}},createCell:(e,t,n,r)=>{e.getIsGrouped=()=>t.getIsGrouped()&&t.id===n.groupingColumnId,e.getIsPlaceholder=()=>!e.getIsGrouped()&&t.getIsGrouped(),e.getIsAggregated=()=>{var o;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!!((o=n.subRows)!=null&&o.length)}}};function V3(e,t,n){if(!(t!=null&&t.length)||!n)return e;const r=e.filter(i=>!t.includes(i.id));return n==="remove"?r:[...t.map(i=>e.find(a=>a.id===i)).filter(Boolean),...r]}const z3={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:vn("columnOrder",e)}),createColumn:(e,t)=>{e.getIndex=we(n=>[La(t,n)],n=>n.findIndex(r=>r.id===e.id),Ce(t.options,"debugColumns","getIndex")),e.getIsFirstColumn=n=>{var r;return((r=La(t,n)[0])==null?void 0:r.id)===e.id},e.getIsLastColumn=n=>{var r;const o=La(t,n);return((r=o[o.length-1])==null?void 0:r.id)===e.id}},createTable:e=>{e.setColumnOrder=t=>e.options.onColumnOrderChange==null?void 0:e.options.onColumnOrderChange(t),e.resetColumnOrder=t=>{var n;e.setColumnOrder(t?[]:(n=e.initialState.columnOrder)!=null?n:[])},e._getOrderColumnsFn=we(()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode],(t,n,r)=>o=>{let i=[];if(!(t!=null&&t.length))i=o;else{const a=[...t],s=[...o];for(;s.length&&a.length;){const l=a.shift(),u=s.findIndex(c=>c.id===l);u>-1&&i.push(s.splice(u,1)[0])}i=[...i,...s]}return V3(i,n,r)},Ce(e.options,"debugTable","_getOrderColumnsFn"))}},td=()=>({left:[],right:[]}),B3={getInitialState:e=>({columnPinning:td(),...e}),getDefaultOptions:e=>({onColumnPinningChange:vn("columnPinning",e)}),createColumn:(e,t)=>{e.pin=n=>{const r=e.getLeafColumns().map(o=>o.id).filter(Boolean);t.setColumnPinning(o=>{var i,a;if(n==="right"){var s,l;return{left:((s=o?.left)!=null?s:[]).filter(f=>!(r!=null&&r.includes(f))),right:[...((l=o?.right)!=null?l:[]).filter(f=>!(r!=null&&r.includes(f))),...r]}}if(n==="left"){var u,c;return{left:[...((u=o?.left)!=null?u:[]).filter(f=>!(r!=null&&r.includes(f))),...r],right:((c=o?.right)!=null?c:[]).filter(f=>!(r!=null&&r.includes(f)))}}return{left:((i=o?.left)!=null?i:[]).filter(f=>!(r!=null&&r.includes(f))),right:((a=o?.right)!=null?a:[]).filter(f=>!(r!=null&&r.includes(f)))}})},e.getCanPin=()=>e.getLeafColumns().some(r=>{var o,i,a;return((o=r.columnDef.enablePinning)!=null?o:!0)&&((i=(a=t.options.enableColumnPinning)!=null?a:t.options.enablePinning)!=null?i:!0)}),e.getIsPinned=()=>{const n=e.getLeafColumns().map(s=>s.id),{left:r,right:o}=t.getState().columnPinning,i=n.some(s=>r?.includes(s)),a=n.some(s=>o?.includes(s));return i?"left":a?"right":!1},e.getPinnedIndex=()=>{var n,r;const o=e.getIsPinned();return o?(n=(r=t.getState().columnPinning)==null||(r=r[o])==null?void 0:r.indexOf(e.id))!=null?n:-1:0}},createRow:(e,t)=>{e.getCenterVisibleCells=we(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left,t.getState().columnPinning.right],(n,r,o)=>{const i=[...r??[],...o??[]];return n.filter(a=>!i.includes(a.column.id))},Ce(t.options,"debugRows","getCenterVisibleCells")),e.getLeftVisibleCells=we(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left],(n,r)=>(r??[]).map(i=>n.find(a=>a.column.id===i)).filter(Boolean).map(i=>({...i,position:"left"})),Ce(t.options,"debugRows","getLeftVisibleCells")),e.getRightVisibleCells=we(()=>[e._getAllVisibleCells(),t.getState().columnPinning.right],(n,r)=>(r??[]).map(i=>n.find(a=>a.column.id===i)).filter(Boolean).map(i=>({...i,position:"right"})),Ce(t.options,"debugRows","getRightVisibleCells"))},createTable:e=>{e.setColumnPinning=t=>e.options.onColumnPinningChange==null?void 0:e.options.onColumnPinningChange(t),e.resetColumnPinning=t=>{var n,r;return e.setColumnPinning(t?td():(n=(r=e.initialState)==null?void 0:r.columnPinning)!=null?n:td())},e.getIsSomeColumnsPinned=t=>{var n;const r=e.getState().columnPinning;if(!t){var o,i;return!!((o=r.left)!=null&&o.length||(i=r.right)!=null&&i.length)}return!!((n=r[t])!=null&&n.length)},e.getLeftLeafColumns=we(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left],(t,n)=>(n??[]).map(r=>t.find(o=>o.id===r)).filter(Boolean),Ce(e.options,"debugColumns","getLeftLeafColumns")),e.getRightLeafColumns=we(()=>[e.getAllLeafColumns(),e.getState().columnPinning.right],(t,n)=>(n??[]).map(r=>t.find(o=>o.id===r)).filter(Boolean),Ce(e.options,"debugColumns","getRightLeafColumns")),e.getCenterLeafColumns=we(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r)=>{const o=[...n??[],...r??[]];return t.filter(i=>!o.includes(i.id))},Ce(e.options,"debugColumns","getCenterLeafColumns"))}};function H3(e){return e||(typeof document<"u"?document:null)}const dl={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},nd=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),G3={getDefaultColumnDef:()=>dl,getInitialState:e=>({columnSizing:{},columnSizingInfo:nd(),...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:vn("columnSizing",e),onColumnSizingInfoChange:vn("columnSizingInfo",e)}),createColumn:(e,t)=>{e.getSize=()=>{var n,r,o;const i=t.getState().columnSizing[e.id];return Math.min(Math.max((n=e.columnDef.minSize)!=null?n:dl.minSize,(r=i??e.columnDef.size)!=null?r:dl.size),(o=e.columnDef.maxSize)!=null?o:dl.maxSize)},e.getStart=we(n=>[n,La(t,n),t.getState().columnSizing],(n,r)=>r.slice(0,e.getIndex(n)).reduce((o,i)=>o+i.getSize(),0),Ce(t.options,"debugColumns","getStart")),e.getAfter=we(n=>[n,La(t,n),t.getState().columnSizing],(n,r)=>r.slice(e.getIndex(n)+1).reduce((o,i)=>o+i.getSize(),0),Ce(t.options,"debugColumns","getAfter")),e.resetSize=()=>{t.setColumnSizing(n=>{let{[e.id]:r,...o}=n;return o})},e.getCanResize=()=>{var n,r;return((n=e.columnDef.enableResizing)!=null?n:!0)&&((r=t.options.enableColumnResizing)!=null?r:!0)},e.getIsResizing=()=>t.getState().columnSizingInfo.isResizingColumn===e.id},createHeader:(e,t)=>{e.getSize=()=>{let n=0;const r=o=>{if(o.subHeaders.length)o.subHeaders.forEach(r);else{var i;n+=(i=o.column.getSize())!=null?i:0}};return r(e),n},e.getStart=()=>{if(e.index>0){const n=e.headerGroup.headers[e.index-1];return n.getStart()+n.getSize()}return 0},e.getResizeHandler=n=>{const r=t.getColumn(e.column.id),o=r?.getCanResize();return i=>{if(!r||!o||(i.persist==null||i.persist(),rd(i)&&i.touches&&i.touches.length>1))return;const a=e.getSize(),s=e?e.getLeafHeaders().map(y=>[y.column.id,y.column.getSize()]):[[r.id,r.getSize()]],l=rd(i)?Math.round(i.touches[0].clientX):i.clientX,u={},c=(y,b)=>{typeof b=="number"&&(t.setColumnSizingInfo(x=>{var w,S;const E=t.options.columnResizeDirection==="rtl"?-1:1,O=(b-((w=x?.startOffset)!=null?w:0))*E,P=Math.max(O/((S=x?.startSize)!=null?S:0),-.999999);return x.columnSizingStart.forEach(N=>{let[R,k]=N;u[R]=Math.round(Math.max(k+k*P,0)*100)/100}),{...x,deltaOffset:O,deltaPercentage:P}}),(t.options.columnResizeMode==="onChange"||y==="end")&&t.setColumnSizing(x=>({...x,...u})))},f=y=>c("move",y),p=y=>{c("end",y),t.setColumnSizingInfo(b=>({...b,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},d=H3(n),m={moveHandler:y=>f(y.clientX),upHandler:y=>{d?.removeEventListener("mousemove",m.moveHandler),d?.removeEventListener("mouseup",m.upHandler),p(y.clientX)}},g={moveHandler:y=>(y.cancelable&&(y.preventDefault(),y.stopPropagation()),f(y.touches[0].clientX),!1),upHandler:y=>{var b;d?.removeEventListener("touchmove",g.moveHandler),d?.removeEventListener("touchend",g.upHandler),y.cancelable&&(y.preventDefault(),y.stopPropagation()),p((b=y.touches[0])==null?void 0:b.clientX)}},h=W3()?{passive:!1}:!1;rd(i)?(d?.addEventListener("touchmove",g.moveHandler,h),d?.addEventListener("touchend",g.upHandler,h)):(d?.addEventListener("mousemove",m.moveHandler,h),d?.addEventListener("mouseup",m.upHandler,h)),t.setColumnSizingInfo(y=>({...y,startOffset:l,startSize:a,deltaOffset:0,deltaPercentage:0,columnSizingStart:s,isResizingColumn:r.id}))}}},createTable:e=>{e.setColumnSizing=t=>e.options.onColumnSizingChange==null?void 0:e.options.onColumnSizingChange(t),e.setColumnSizingInfo=t=>e.options.onColumnSizingInfoChange==null?void 0:e.options.onColumnSizingInfoChange(t),e.resetColumnSizing=t=>{var n;e.setColumnSizing(t?{}:(n=e.initialState.columnSizing)!=null?n:{})},e.resetHeaderSizeInfo=t=>{var n;e.setColumnSizingInfo(t?nd():(n=e.initialState.columnSizingInfo)!=null?n:nd())},e.getTotalSize=()=>{var t,n;return(t=(n=e.getHeaderGroups()[0])==null?void 0:n.headers.reduce((r,o)=>r+o.getSize(),0))!=null?t:0},e.getLeftTotalSize=()=>{var t,n;return(t=(n=e.getLeftHeaderGroups()[0])==null?void 0:n.headers.reduce((r,o)=>r+o.getSize(),0))!=null?t:0},e.getCenterTotalSize=()=>{var t,n;return(t=(n=e.getCenterHeaderGroups()[0])==null?void 0:n.headers.reduce((r,o)=>r+o.getSize(),0))!=null?t:0},e.getRightTotalSize=()=>{var t,n;return(t=(n=e.getRightHeaderGroups()[0])==null?void 0:n.headers.reduce((r,o)=>r+o.getSize(),0))!=null?t:0}}};let pl=null;function W3(){if(typeof pl=="boolean")return pl;let e=!1;try{const t={get passive(){return e=!0,!1}},n=()=>{};window.addEventListener("test",n,t),window.removeEventListener("test",n)}catch{e=!1}return pl=e,pl}function rd(e){return e.type==="touchstart"}const U3={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:vn("columnVisibility",e)}),createColumn:(e,t)=>{e.toggleVisibility=n=>{e.getCanHide()&&t.setColumnVisibility(r=>({...r,[e.id]:n??!e.getIsVisible()}))},e.getIsVisible=()=>{var n,r;const o=e.columns;return(n=o.length?o.some(i=>i.getIsVisible()):(r=t.getState().columnVisibility)==null?void 0:r[e.id])!=null?n:!0},e.getCanHide=()=>{var n,r;return((n=e.columnDef.enableHiding)!=null?n:!0)&&((r=t.options.enableHiding)!=null?r:!0)},e.getToggleVisibilityHandler=()=>n=>{e.toggleVisibility==null||e.toggleVisibility(n.target.checked)}},createRow:(e,t)=>{e._getAllVisibleCells=we(()=>[e.getAllCells(),t.getState().columnVisibility],n=>n.filter(r=>r.column.getIsVisible()),Ce(t.options,"debugRows","_getAllVisibleCells")),e.getVisibleCells=we(()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()],(n,r,o)=>[...n,...r,...o],Ce(t.options,"debugRows","getVisibleCells"))},createTable:e=>{const t=(n,r)=>we(()=>[r(),r().filter(o=>o.getIsVisible()).map(o=>o.id).join("_")],o=>o.filter(i=>i.getIsVisible==null?void 0:i.getIsVisible()),Ce(e.options,"debugColumns",n));e.getVisibleFlatColumns=t("getVisibleFlatColumns",()=>e.getAllFlatColumns()),e.getVisibleLeafColumns=t("getVisibleLeafColumns",()=>e.getAllLeafColumns()),e.getLeftVisibleLeafColumns=t("getLeftVisibleLeafColumns",()=>e.getLeftLeafColumns()),e.getRightVisibleLeafColumns=t("getRightVisibleLeafColumns",()=>e.getRightLeafColumns()),e.getCenterVisibleLeafColumns=t("getCenterVisibleLeafColumns",()=>e.getCenterLeafColumns()),e.setColumnVisibility=n=>e.options.onColumnVisibilityChange==null?void 0:e.options.onColumnVisibilityChange(n),e.resetColumnVisibility=n=>{var r;e.setColumnVisibility(n?{}:(r=e.initialState.columnVisibility)!=null?r:{})},e.toggleAllColumnsVisible=n=>{var r;n=(r=n)!=null?r:!e.getIsAllColumnsVisible(),e.setColumnVisibility(e.getAllLeafColumns().reduce((o,i)=>({...o,[i.id]:n||!(i.getCanHide!=null&&i.getCanHide())}),{}))},e.getIsAllColumnsVisible=()=>!e.getAllLeafColumns().some(n=>!(n.getIsVisible!=null&&n.getIsVisible())),e.getIsSomeColumnsVisible=()=>e.getAllLeafColumns().some(n=>n.getIsVisible==null?void 0:n.getIsVisible()),e.getToggleAllColumnsVisibilityHandler=()=>n=>{var r;e.toggleAllColumnsVisible((r=n.target)==null?void 0:r.checked)}}};function La(e,t){return t?t==="center"?e.getCenterVisibleLeafColumns():t==="left"?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns()}const q3={createTable:e=>{e._getGlobalFacetedRowModel=e.options.getFacetedRowModel&&e.options.getFacetedRowModel(e,"__global__"),e.getGlobalFacetedRowModel=()=>e.options.manualFiltering||!e._getGlobalFacetedRowModel?e.getPreFilteredRowModel():e._getGlobalFacetedRowModel(),e._getGlobalFacetedUniqueValues=e.options.getFacetedUniqueValues&&e.options.getFacetedUniqueValues(e,"__global__"),e.getGlobalFacetedUniqueValues=()=>e._getGlobalFacetedUniqueValues?e._getGlobalFacetedUniqueValues():new Map,e._getGlobalFacetedMinMaxValues=e.options.getFacetedMinMaxValues&&e.options.getFacetedMinMaxValues(e,"__global__"),e.getGlobalFacetedMinMaxValues=()=>{if(e._getGlobalFacetedMinMaxValues)return e._getGlobalFacetedMinMaxValues()}}},K3={getInitialState:e=>({globalFilter:void 0,...e}),getDefaultOptions:e=>({onGlobalFilterChange:vn("globalFilter",e),globalFilterFn:"auto",getColumnCanGlobalFilter:t=>{var n;const r=(n=e.getCoreRowModel().flatRows[0])==null||(n=n._getAllCellsByColumnId()[t.id])==null?void 0:n.getValue();return typeof r=="string"||typeof r=="number"}}),createColumn:(e,t)=>{e.getCanGlobalFilter=()=>{var n,r,o,i;return((n=e.columnDef.enableGlobalFilter)!=null?n:!0)&&((r=t.options.enableGlobalFilter)!=null?r:!0)&&((o=t.options.enableFilters)!=null?o:!0)&&((i=t.options.getColumnCanGlobalFilter==null?void 0:t.options.getColumnCanGlobalFilter(e))!=null?i:!0)&&!!e.accessorFn}},createTable:e=>{e.getGlobalAutoFilterFn=()=>mr.includesString,e.getGlobalFilterFn=()=>{var t,n;const{globalFilterFn:r}=e.options;return Ic(r)?r:r==="auto"?e.getGlobalAutoFilterFn():(t=(n=e.options.filterFns)==null?void 0:n[r])!=null?t:mr[r]},e.setGlobalFilter=t=>{e.options.onGlobalFilterChange==null||e.options.onGlobalFilterChange(t)},e.resetGlobalFilter=t=>{e.setGlobalFilter(t?void 0:e.initialState.globalFilter)}}},Y3={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:vn("expanded",e),paginateExpandedRows:!0}),createTable:e=>{let t=!1,n=!1;e._autoResetExpanded=()=>{var r,o;if(!t){e._queue(()=>{t=!0});return}if((r=(o=e.options.autoResetAll)!=null?o:e.options.autoResetExpanded)!=null?r:!e.options.manualExpanding){if(n)return;n=!0,e._queue(()=>{e.resetExpanded(),n=!1})}},e.setExpanded=r=>e.options.onExpandedChange==null?void 0:e.options.onExpandedChange(r),e.toggleAllRowsExpanded=r=>{r??!e.getIsAllRowsExpanded()?e.setExpanded(!0):e.setExpanded({})},e.resetExpanded=r=>{var o,i;e.setExpanded(r?{}:(o=(i=e.initialState)==null?void 0:i.expanded)!=null?o:{})},e.getCanSomeRowsExpand=()=>e.getPrePaginationRowModel().flatRows.some(r=>r.getCanExpand()),e.getToggleAllRowsExpandedHandler=()=>r=>{r.persist==null||r.persist(),e.toggleAllRowsExpanded()},e.getIsSomeRowsExpanded=()=>{const r=e.getState().expanded;return r===!0||Object.values(r).some(Boolean)},e.getIsAllRowsExpanded=()=>{const r=e.getState().expanded;return typeof r=="boolean"?r===!0:!(!Object.keys(r).length||e.getRowModel().flatRows.some(o=>!o.getIsExpanded()))},e.getExpandedDepth=()=>{let r=0;return(e.getState().expanded===!0?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach(i=>{const a=i.split(".");r=Math.max(r,a.length)}),r},e.getPreExpandedRowModel=()=>e.getSortedRowModel(),e.getExpandedRowModel=()=>(!e._getExpandedRowModel&&e.options.getExpandedRowModel&&(e._getExpandedRowModel=e.options.getExpandedRowModel(e)),e.options.manualExpanding||!e._getExpandedRowModel?e.getPreExpandedRowModel():e._getExpandedRowModel())},createRow:(e,t)=>{e.toggleExpanded=n=>{t.setExpanded(r=>{var o;const i=r===!0?!0:!!(r!=null&&r[e.id]);let a={};if(r===!0?Object.keys(t.getRowModel().rowsById).forEach(s=>{a[s]=!0}):a=r,n=(o=n)!=null?o:!i,!i&&n)return{...a,[e.id]:!0};if(i&&!n){const{[e.id]:s,...l}=a;return l}return r})},e.getIsExpanded=()=>{var n;const r=t.getState().expanded;return!!((n=t.options.getIsRowExpanded==null?void 0:t.options.getIsRowExpanded(e))!=null?n:r===!0||r?.[e.id])},e.getCanExpand=()=>{var n,r,o;return(n=t.options.getRowCanExpand==null?void 0:t.options.getRowCanExpand(e))!=null?n:((r=t.options.enableExpanding)!=null?r:!0)&&!!((o=e.subRows)!=null&&o.length)},e.getIsAllParentsExpanded=()=>{let n=!0,r=e;for(;n&&r.parentId;)r=t.getRow(r.parentId,!0),n=r.getIsExpanded();return n},e.getToggleExpandedHandler=()=>{const n=e.getCanExpand();return()=>{n&&e.toggleExpanded()}}}},sh=0,lh=10,od=()=>({pageIndex:sh,pageSize:lh}),X3={getInitialState:e=>({...e,pagination:{...od(),...e?.pagination}}),getDefaultOptions:e=>({onPaginationChange:vn("pagination",e)}),createTable:e=>{let t=!1,n=!1;e._autoResetPageIndex=()=>{var r,o;if(!t){e._queue(()=>{t=!0});return}if((r=(o=e.options.autoResetAll)!=null?o:e.options.autoResetPageIndex)!=null?r:!e.options.manualPagination){if(n)return;n=!0,e._queue(()=>{e.resetPageIndex(),n=!1})}},e.setPagination=r=>{const o=i=>ro(r,i);return e.options.onPaginationChange==null?void 0:e.options.onPaginationChange(o)},e.resetPagination=r=>{var o;e.setPagination(r?od():(o=e.initialState.pagination)!=null?o:od())},e.setPageIndex=r=>{e.setPagination(o=>{let i=ro(r,o.pageIndex);const a=typeof e.options.pageCount>"u"||e.options.pageCount===-1?Number.MAX_SAFE_INTEGER:e.options.pageCount-1;return i=Math.max(0,Math.min(i,a)),{...o,pageIndex:i}})},e.resetPageIndex=r=>{var o,i;e.setPageIndex(r?sh:(o=(i=e.initialState)==null||(i=i.pagination)==null?void 0:i.pageIndex)!=null?o:sh)},e.resetPageSize=r=>{var o,i;e.setPageSize(r?lh:(o=(i=e.initialState)==null||(i=i.pagination)==null?void 0:i.pageSize)!=null?o:lh)},e.setPageSize=r=>{e.setPagination(o=>{const i=Math.max(1,ro(r,o.pageSize)),a=o.pageSize*o.pageIndex,s=Math.floor(a/i);return{...o,pageIndex:s,pageSize:i}})},e.setPageCount=r=>e.setPagination(o=>{var i;let a=ro(r,(i=e.options.pageCount)!=null?i:-1);return typeof a=="number"&&(a=Math.max(-1,a)),{...o,pageCount:a}}),e.getPageOptions=we(()=>[e.getPageCount()],r=>{let o=[];return r&&r>0&&(o=[...new Array(r)].fill(null).map((i,a)=>a)),o},Ce(e.options,"debugTable","getPageOptions")),e.getCanPreviousPage=()=>e.getState().pagination.pageIndex>0,e.getCanNextPage=()=>{const{pageIndex:r}=e.getState().pagination,o=e.getPageCount();return o===-1?!0:o===0?!1:r<o-1},e.previousPage=()=>e.setPageIndex(r=>r-1),e.nextPage=()=>e.setPageIndex(r=>r+1),e.firstPage=()=>e.setPageIndex(0),e.lastPage=()=>e.setPageIndex(e.getPageCount()-1),e.getPrePaginationRowModel=()=>e.getExpandedRowModel(),e.getPaginationRowModel=()=>(!e._getPaginationRowModel&&e.options.getPaginationRowModel&&(e._getPaginationRowModel=e.options.getPaginationRowModel(e)),e.options.manualPagination||!e._getPaginationRowModel?e.getPrePaginationRowModel():e._getPaginationRowModel()),e.getPageCount=()=>{var r;return(r=e.options.pageCount)!=null?r:Math.ceil(e.getRowCount()/e.getState().pagination.pageSize)},e.getRowCount=()=>{var r;return(r=e.options.rowCount)!=null?r:e.getPrePaginationRowModel().rows.length}}},id=()=>({top:[],bottom:[]}),Z3={getInitialState:e=>({rowPinning:id(),...e}),getDefaultOptions:e=>({onRowPinningChange:vn("rowPinning",e)}),createRow:(e,t)=>{e.pin=(n,r,o)=>{const i=r?e.getLeafRows().map(l=>{let{id:u}=l;return u}):[],a=o?e.getParentRows().map(l=>{let{id:u}=l;return u}):[],s=new Set([...a,e.id,...i]);t.setRowPinning(l=>{var u,c;if(n==="bottom"){var f,p;return{top:((f=l?.top)!=null?f:[]).filter(g=>!(s!=null&&s.has(g))),bottom:[...((p=l?.bottom)!=null?p:[]).filter(g=>!(s!=null&&s.has(g))),...Array.from(s)]}}if(n==="top"){var d,m;return{top:[...((d=l?.top)!=null?d:[]).filter(g=>!(s!=null&&s.has(g))),...Array.from(s)],bottom:((m=l?.bottom)!=null?m:[]).filter(g=>!(s!=null&&s.has(g)))}}return{top:((u=l?.top)!=null?u:[]).filter(g=>!(s!=null&&s.has(g))),bottom:((c=l?.bottom)!=null?c:[]).filter(g=>!(s!=null&&s.has(g)))}})},e.getCanPin=()=>{var n;const{enableRowPinning:r,enablePinning:o}=t.options;return typeof r=="function"?r(e):(n=r??o)!=null?n:!0},e.getIsPinned=()=>{const n=[e.id],{top:r,bottom:o}=t.getState().rowPinning,i=n.some(s=>r?.includes(s)),a=n.some(s=>o?.includes(s));return i?"top":a?"bottom":!1},e.getPinnedIndex=()=>{var n,r;const o=e.getIsPinned();if(!o)return-1;const i=(n=o==="top"?t.getTopRows():t.getBottomRows())==null?void 0:n.map(a=>{let{id:s}=a;return s});return(r=i?.indexOf(e.id))!=null?r:-1}},createTable:e=>{e.setRowPinning=t=>e.options.onRowPinningChange==null?void 0:e.options.onRowPinningChange(t),e.resetRowPinning=t=>{var n,r;return e.setRowPinning(t?id():(n=(r=e.initialState)==null?void 0:r.rowPinning)!=null?n:id())},e.getIsSomeRowsPinned=t=>{var n;const r=e.getState().rowPinning;if(!t){var o,i;return!!((o=r.top)!=null&&o.length||(i=r.bottom)!=null&&i.length)}return!!((n=r[t])!=null&&n.length)},e._getPinnedRows=(t,n,r)=>{var o;return((o=e.options.keepPinnedRows)==null||o?(n??[]).map(a=>{const s=e.getRow(a,!0);return s.getIsAllParentsExpanded()?s:null}):(n??[]).map(a=>t.find(s=>s.id===a))).filter(Boolean).map(a=>({...a,position:r}))},e.getTopRows=we(()=>[e.getRowModel().rows,e.getState().rowPinning.top],(t,n)=>e._getPinnedRows(t,n,"top"),Ce(e.options,"debugRows","getTopRows")),e.getBottomRows=we(()=>[e.getRowModel().rows,e.getState().rowPinning.bottom],(t,n)=>e._getPinnedRows(t,n,"bottom"),Ce(e.options,"debugRows","getBottomRows")),e.getCenterRows=we(()=>[e.getRowModel().rows,e.getState().rowPinning.top,e.getState().rowPinning.bottom],(t,n,r)=>{const o=new Set([...n??[],...r??[]]);return t.filter(i=>!o.has(i.id))},Ce(e.options,"debugRows","getCenterRows"))}},Q3={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:vn("rowSelection",e),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:e=>{e.setRowSelection=t=>e.options.onRowSelectionChange==null?void 0:e.options.onRowSelectionChange(t),e.resetRowSelection=t=>{var n;return e.setRowSelection(t?{}:(n=e.initialState.rowSelection)!=null?n:{})},e.toggleAllRowsSelected=t=>{e.setRowSelection(n=>{t=typeof t<"u"?t:!e.getIsAllRowsSelected();const r={...n},o=e.getPreGroupedRowModel().flatRows;return t?o.forEach(i=>{i.getCanSelect()&&(r[i.id]=!0)}):o.forEach(i=>{delete r[i.id]}),r})},e.toggleAllPageRowsSelected=t=>e.setRowSelection(n=>{const r=typeof t<"u"?t:!e.getIsAllPageRowsSelected(),o={...n};return e.getRowModel().rows.forEach(i=>{uh(o,i.id,r,!0,e)}),o}),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=we(()=>[e.getState().rowSelection,e.getCoreRowModel()],(t,n)=>Object.keys(t).length?ad(e,n):{rows:[],flatRows:[],rowsById:{}},Ce(e.options,"debugTable","getSelectedRowModel")),e.getFilteredSelectedRowModel=we(()=>[e.getState().rowSelection,e.getFilteredRowModel()],(t,n)=>Object.keys(t).length?ad(e,n):{rows:[],flatRows:[],rowsById:{}},Ce(e.options,"debugTable","getFilteredSelectedRowModel")),e.getGroupedSelectedRowModel=we(()=>[e.getState().rowSelection,e.getSortedRowModel()],(t,n)=>Object.keys(t).length?ad(e,n):{rows:[],flatRows:[],rowsById:{}},Ce(e.options,"debugTable","getGroupedSelectedRowModel")),e.getIsAllRowsSelected=()=>{const t=e.getFilteredRowModel().flatRows,{rowSelection:n}=e.getState();let r=!!(t.length&&Object.keys(n).length);return r&&t.some(o=>o.getCanSelect()&&!n[o.id])&&(r=!1),r},e.getIsAllPageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows.filter(o=>o.getCanSelect()),{rowSelection:n}=e.getState();let r=!!t.length;return r&&t.some(o=>!n[o.id])&&(r=!1),r},e.getIsSomeRowsSelected=()=>{var t;const n=Object.keys((t=e.getState().rowSelection)!=null?t:{}).length;return n>0&&n<e.getFilteredRowModel().flatRows.length},e.getIsSomePageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows;return e.getIsAllPageRowsSelected()?!1:t.filter(n=>n.getCanSelect()).some(n=>n.getIsSelected()||n.getIsSomeSelected())},e.getToggleAllRowsSelectedHandler=()=>t=>{e.toggleAllRowsSelected(t.target.checked)},e.getToggleAllPageRowsSelectedHandler=()=>t=>{e.toggleAllPageRowsSelected(t.target.checked)}},createRow:(e,t)=>{e.toggleSelected=(n,r)=>{const o=e.getIsSelected();t.setRowSelection(i=>{var a;if(n=typeof n<"u"?n:!o,e.getCanSelect()&&o===n)return i;const s={...i};return uh(s,e.id,n,(a=r?.selectChildren)!=null?a:!0,t),s})},e.getIsSelected=()=>{const{rowSelection:n}=t.getState();return Mg(e,n)},e.getIsSomeSelected=()=>{const{rowSelection:n}=t.getState();return ch(e,n)==="some"},e.getIsAllSubRowsSelected=()=>{const{rowSelection:n}=t.getState();return ch(e,n)==="all"},e.getCanSelect=()=>{var n;return typeof t.options.enableRowSelection=="function"?t.options.enableRowSelection(e):(n=t.options.enableRowSelection)!=null?n:!0},e.getCanSelectSubRows=()=>{var n;return typeof t.options.enableSubRowSelection=="function"?t.options.enableSubRowSelection(e):(n=t.options.enableSubRowSelection)!=null?n:!0},e.getCanMultiSelect=()=>{var n;return typeof t.options.enableMultiRowSelection=="function"?t.options.enableMultiRowSelection(e):(n=t.options.enableMultiRowSelection)!=null?n:!0},e.getToggleSelectedHandler=()=>{const n=e.getCanSelect();return r=>{var o;n&&e.toggleSelected((o=r.target)==null?void 0:o.checked)}}}},uh=(e,t,n,r,o)=>{var i;const a=o.getRow(t,!0);n?(a.getCanMultiSelect()||Object.keys(e).forEach(s=>delete e[s]),a.getCanSelect()&&(e[t]=!0)):delete e[t],r&&(i=a.subRows)!=null&&i.length&&a.getCanSelectSubRows()&&a.subRows.forEach(s=>uh(e,s.id,n,r,o))};function ad(e,t){const n=e.getState().rowSelection,r=[],o={},i=function(a,s){return a.map(l=>{var u;const c=Mg(l,n);if(c&&(r.push(l),o[l.id]=l),(u=l.subRows)!=null&&u.length&&(l={...l,subRows:i(l.subRows)}),c)return l}).filter(Boolean)};return{rows:i(t.rows),flatRows:r,rowsById:o}}function Mg(e,t){var n;return(n=t[e.id])!=null?n:!1}function ch(e,t,n){var r;if(!((r=e.subRows)!=null&&r.length))return!1;let o=!0,i=!1;return e.subRows.forEach(a=>{if(!(i&&!o)&&(a.getCanSelect()&&(Mg(a,t)?i=!0:o=!1),a.subRows&&a.subRows.length)){const s=ch(a,t);s==="all"?i=!0:(s==="some"&&(i=!0),o=!1)}}),o?"all":i?"some":!1}const fh=/([0-9]+)/gm,J3=(e,t,n)=>R_(ho(e.getValue(n)).toLowerCase(),ho(t.getValue(n)).toLowerCase()),e5=(e,t,n)=>R_(ho(e.getValue(n)),ho(t.getValue(n))),t5=(e,t,n)=>Dg(ho(e.getValue(n)).toLowerCase(),ho(t.getValue(n)).toLowerCase()),n5=(e,t,n)=>Dg(ho(e.getValue(n)),ho(t.getValue(n))),r5=(e,t,n)=>{const r=e.getValue(n),o=t.getValue(n);return r>o?1:r<o?-1:0},o5=(e,t,n)=>Dg(e.getValue(n),t.getValue(n));function Dg(e,t){return e===t?0:e>t?1:-1}function ho(e){return typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?"":String(e):typeof e=="string"?e:""}function R_(e,t){const n=e.split(fh).filter(Boolean),r=t.split(fh).filter(Boolean);for(;n.length&&r.length;){const o=n.shift(),i=r.shift(),a=parseInt(o,10),s=parseInt(i,10),l=[a,s].sort();if(isNaN(l[0])){if(o>i)return 1;if(i>o)return-1;continue}if(isNaN(l[1]))return isNaN(a)?-1:1;if(a>s)return 1;if(s>a)return-1}return n.length-r.length}const ha={alphanumeric:J3,alphanumericCaseSensitive:e5,text:t5,textCaseSensitive:n5,datetime:r5,basic:o5},i5={getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:vn("sorting",e),isMultiSortEvent:t=>t.shiftKey}),createColumn:(e,t)=>{e.getAutoSortingFn=()=>{const n=t.getFilteredRowModel().flatRows.slice(10);let r=!1;for(const o of n){const i=o?.getValue(e.id);if(Object.prototype.toString.call(i)==="[object Date]")return ha.datetime;if(typeof i=="string"&&(r=!0,i.split(fh).length>1))return ha.alphanumeric}return r?ha.text:ha.basic},e.getAutoSortDir=()=>{const n=t.getFilteredRowModel().flatRows[0];return typeof n?.getValue(e.id)=="string"?"asc":"desc"},e.getSortingFn=()=>{var n,r;if(!e)throw new Error;return Ic(e.columnDef.sortingFn)?e.columnDef.sortingFn:e.columnDef.sortingFn==="auto"?e.getAutoSortingFn():(n=(r=t.options.sortingFns)==null?void 0:r[e.columnDef.sortingFn])!=null?n:ha[e.columnDef.sortingFn]},e.toggleSorting=(n,r)=>{const o=e.getNextSortingOrder(),i=typeof n<"u"&&n!==null;t.setSorting(a=>{const s=a?.find(d=>d.id===e.id),l=a?.findIndex(d=>d.id===e.id);let u=[],c,f=i?n:o==="desc";if(a!=null&&a.length&&e.getCanMultiSort()&&r?s?c="toggle":c="add":a!=null&&a.length&&l!==a.length-1?c="replace":s?c="toggle":c="replace",c==="toggle"&&(i||o||(c="remove")),c==="add"){var p;u=[...a,{id:e.id,desc:f}],u.splice(0,u.length-((p=t.options.maxMultiSortColCount)!=null?p:Number.MAX_SAFE_INTEGER))}else c==="toggle"?u=a.map(d=>d.id===e.id?{...d,desc:f}:d):c==="remove"?u=a.filter(d=>d.id!==e.id):u=[{id:e.id,desc:f}];return u})},e.getFirstSortDir=()=>{var n,r;return((n=(r=e.columnDef.sortDescFirst)!=null?r:t.options.sortDescFirst)!=null?n:e.getAutoSortDir()==="desc")?"desc":"asc"},e.getNextSortingOrder=n=>{var r,o;const i=e.getFirstSortDir(),a=e.getIsSorted();return a?a!==i&&((r=t.options.enableSortingRemoval)==null||r)&&(!(n&&(o=t.options.enableMultiRemove)!=null)||o)?!1:a==="desc"?"asc":"desc":i},e.getCanSort=()=>{var n,r;return((n=e.columnDef.enableSorting)!=null?n:!0)&&((r=t.options.enableSorting)!=null?r:!0)&&!!e.accessorFn},e.getCanMultiSort=()=>{var n,r;return(n=(r=e.columnDef.enableMultiSort)!=null?r:t.options.enableMultiSort)!=null?n:!!e.accessorFn},e.getIsSorted=()=>{var n;const r=(n=t.getState().sorting)==null?void 0:n.find(o=>o.id===e.id);return r?r.desc?"desc":"asc":!1},e.getSortIndex=()=>{var n,r;return(n=(r=t.getState().sorting)==null?void 0:r.findIndex(o=>o.id===e.id))!=null?n:-1},e.clearSorting=()=>{t.setSorting(n=>n!=null&&n.length?n.filter(r=>r.id!==e.id):[])},e.getToggleSortingHandler=()=>{const n=e.getCanSort();return r=>{n&&(r.persist==null||r.persist(),e.toggleSorting==null||e.toggleSorting(void 0,e.getCanMultiSort()?t.options.isMultiSortEvent==null?void 0:t.options.isMultiSortEvent(r):!1))}}},createTable:e=>{e.setSorting=t=>e.options.onSortingChange==null?void 0:e.options.onSortingChange(t),e.resetSorting=t=>{var n,r;e.setSorting(t?[]:(n=(r=e.initialState)==null?void 0:r.sorting)!=null?n:[])},e.getPreSortedRowModel=()=>e.getGroupedRowModel(),e.getSortedRowModel=()=>(!e._getSortedRowModel&&e.options.getSortedRowModel&&(e._getSortedRowModel=e.options.getSortedRowModel(e)),e.options.manualSorting||!e._getSortedRowModel?e.getPreSortedRowModel():e._getSortedRowModel())}},a5=[P3,U3,z3,B3,A3,R3,q3,K3,i5,F3,Y3,X3,Z3,Q3,G3];function s5(e){var t,n;process.env.NODE_ENV!=="production"&&(e.debugAll||e.debugTable)&&console.info("Creating Table Instance...");const r=[...a5,...(t=e._features)!=null?t:[]];let o={_features:r};const i=o._features.reduce((p,d)=>Object.assign(p,d.getDefaultOptions==null?void 0:d.getDefaultOptions(o)),{}),a=p=>o.options.mergeOptions?o.options.mergeOptions(i,p):{...i,...p};let l={...{},...(n=e.initialState)!=null?n:{}};o._features.forEach(p=>{var d;l=(d=p.getInitialState==null?void 0:p.getInitialState(l))!=null?d:l});const u=[];let c=!1;const f={_features:r,options:{...i,...e},initialState:l,_queue:p=>{u.push(p),c||(c=!0,Promise.resolve().then(()=>{for(;u.length;)u.shift()();c=!1}).catch(d=>setTimeout(()=>{throw d})))},reset:()=>{o.setState(o.initialState)},setOptions:p=>{const d=ro(p,o.options);o.options=a(d)},getState:()=>o.options.state,setState:p=>{o.options.onStateChange==null||o.options.onStateChange(p)},_getRowId:(p,d,m)=>{var g;return(g=o.options.getRowId==null?void 0:o.options.getRowId(p,d,m))!=null?g:`${m?[m.id,d].join("."):d}`},getCoreRowModel:()=>(o._getCoreRowModel||(o._getCoreRowModel=o.options.getCoreRowModel(o)),o._getCoreRowModel()),getRowModel:()=>o.getPaginationRowModel(),getRow:(p,d)=>{let m=(d?o.getPrePaginationRowModel():o.getRowModel()).rowsById[p];if(!m&&(m=o.getCoreRowModel().rowsById[p],!m))throw process.env.NODE_ENV!=="production"?new Error(`getRow could not find row with ID: ${p}`):new Error;return m},_getDefaultColumnDef:we(()=>[o.options.defaultColumn],p=>{var d;return p=(d=p)!=null?d:{},{header:m=>{const g=m.header.column.columnDef;return g.accessorKey?g.accessorKey:g.accessorFn?g.id:null},cell:m=>{var g,h;return(g=(h=m.renderValue())==null||h.toString==null?void 0:h.toString())!=null?g:null},...o._features.reduce((m,g)=>Object.assign(m,g.getDefaultColumnDef==null?void 0:g.getDefaultColumnDef()),{}),...p}},Ce(e,"debugColumns","_getDefaultColumnDef")),_getColumnDefs:()=>o.options.columns,getAllColumns:we(()=>[o._getColumnDefs()],p=>{const d=function(m,g,h){return h===void 0&&(h=0),m.map(y=>{const b=O3(o,y,h,g),x=y;return b.columns=x.columns?d(x.columns,b,h+1):[],b})};return d(p)},Ce(e,"debugColumns","getAllColumns")),getAllFlatColumns:we(()=>[o.getAllColumns()],p=>p.flatMap(d=>d.getFlatColumns()),Ce(e,"debugColumns","getAllFlatColumns")),_getAllFlatColumnsById:we(()=>[o.getAllFlatColumns()],p=>p.reduce((d,m)=>(d[m.id]=m,d),{}),Ce(e,"debugColumns","getAllFlatColumnsById")),getAllLeafColumns:we(()=>[o.getAllColumns(),o._getOrderColumnsFn()],(p,d)=>{let m=p.flatMap(g=>g.getLeafColumns());return d(m)},Ce(e,"debugColumns","getAllLeafColumns")),getColumn:p=>{const d=o._getAllFlatColumnsById()[p];return process.env.NODE_ENV!=="production"&&!d&&console.error(`[Table] Column with id '${p}' does not exist.`),d}};Object.assign(o,f);for(let p=0;p<o._features.length;p++){const d=o._features[p];d==null||d.createTable==null||d.createTable(o)}return o}function l5(){return e=>we(()=>[e.options.data],t=>{const n={rows:[],flatRows:[],rowsById:{}},r=function(o,i,a){i===void 0&&(i=0);const s=[];for(let u=0;u<o.length;u++){const c=_3(e,e._getRowId(o[u],u,a),o[u],u,i,void 0,a?.id);if(n.flatRows.push(c),n.rowsById[c.id]=c,s.push(c),e.options.getSubRows){var l;c.originalSubRows=e.options.getSubRows(o[u],u),(l=c.originalSubRows)!=null&&l.length&&(c.subRows=r(c.originalSubRows,i+1,c))}}return s};return n.rows=r(t),n},Ce(e.options,"debugTable","getRowModel",()=>e._autoResetPageIndex()))}function Lb(e,t){return e?u5(e)?v.createElement(e,t):e:null}function u5(e){return c5(e)||typeof e=="function"||f5(e)}function c5(e){return typeof e=="function"&&(()=>{const t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}function f5(e){return typeof e=="object"&&typeof e.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}function d5(e){const t={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[n]=v.useState(()=>({current:s5(t)})),[r,o]=v.useState(()=>n.current.initialState);return n.current.setOptions(i=>({...i,...e,state:{...r,...e.state},onStateChange:a=>{o(a),e.onStateChange==null||e.onStateChange(a)}})),n.current}function p5({columns:e,data:t}){const n=d5({data:t,columns:e,getCoreRowModel:l5()});return C.jsx("div",{className:"w-full overflow-hidden",children:C.jsxs(Cg,{children:[C.jsx(Sg,{children:n.getHeaderGroups().map(r=>C.jsx($a,{children:r.headers.map(o=>C.jsx(Og,{children:o.isPlaceholder?null:Lb(o.column.columnDef.header,o.getContext())},o.id))},r.id))}),C.jsx(Eg,{children:n.getRowModel().rows.length?n.getRowModel().rows.map(r=>C.jsx($a,{"data-state":r.getIsSelected()&&"selected",children:r.getVisibleCells().map(o=>C.jsx(lu,{children:Lb(o.column.columnDef.cell,o.getContext())},o.id))},r.id)):C.jsx($a,{children:C.jsx(lu,{colSpan:e.length,className:"h-24 text-center",children:"No results."})})})]})})}const h5=({children:e,text:t,place:n="top",arrow:r=!0,classes:o,color:i="dark",tooltipItemsLimit:a=1/0})=>{const{isOpened:s,togglePopup:l}=Ng(),u=A.useMemo(()=>({arrow:i==="dark"?"fill-primary-inverse-bg":"fill-primary-bg",content:i==="dark"?"bg-primary-inverse-bg text-primary-inverse-text":"bg-primary-bg text-primary-text"}),[i]),c=A.useMemo(()=>Array.isArray(t)?(t.length-a>0?t.slice(0,a):t).map((d,m)=>C.jsx("p",{className:o?.tooltipTextItem,children:d},m)):t,[o?.tooltipTextItem,t,a]);return C.jsxs(y_,{open:s,onOpenChange:l,children:[C.jsx(b_,{asChild:!0,className:o?.trigger,children:e}),C.jsxs(kg,{side:n,className:u.content,children:[C.jsx("div",{className:q(o?.tooltip),children:c}),r&&C.jsx(x_,{className:u.arrow})]})]})},I_=({date:e=[],isValid:t,disabled:n=!1,label:r,description:o,classes:i,ref:a,...s})=>{const l={...t===!0&&!n&&{"aria-valid":!0},...t===!1&&!n&&{"aria-invalid":!0},disabled:n};return C.jsx(bc,{className:i?.fieldset,children:C.jsx(us,{className:i?.fieldgroup,children:C.jsxs(cs,{className:i?.field,children:[r&&C.jsx(Yi,{...l,children:r}),e.length>0?C.jsxs(ng,{"data-slot":!0,children:[C.jsx(og,{ref:a,...s,...l,disabled:n}),e.map(u=>C.jsx(rg,{align:u.position,children:u.component},u.id))]}):C.jsx(tg,{ref:a,...s,...l,disabled:n}),o&&C.jsx(fs,{...l,children:o})]})})})},m5=({...e})=>{const{isOpened:t,togglePopup:n}=Ng();return C.jsx(I_,{...e,type:t?"text":"password",date:[{id:"0",position:"inline-end",component:C.jsx(Or,{type:t?"eye-off":"eye",onClick:n,className:"cursor-pointer"})}]})};function g5({classNames:e,id:t,value:n,defaultValue:r,label:o,options:i=[],...a}){return C.jsx(wg,{...a,defaultValue:r,className:q("w-fit",e?.classNameGroup),children:i.length?i.map(s=>C.jsxs("div",{className:q("flex items-center gap-3",e?.classNameContainerItem),children:[C.jsx(su,{value:s.value,id:s.id,className:e?.classNameGroupItem}),s.label&&C.jsx(Ha,{htmlFor:s.id,className:e?.classNameLabel,children:s.label})]},s.id)):C.jsxs("div",{className:q("flex items-center gap-3",e?.classNameContainerItem),children:[C.jsx(su,{value:n,id:t,className:e?.classNameGroupItem}),o&&C.jsx(Ha,{htmlFor:t,className:e?.classNameLabel,children:o})]})})}const _a=e=>typeof e=="object",k_=e=>_a(e)?e.value:e,v5=e=>e.every(t=>typeof t=="string")||e.every(t=>typeof t=="object")?e:e.map(t=>k_(t)),sd=(e,t)=>e===null||t===null||typeof e=="string"||typeof t=="string"?e===t:e.id===t.id,N_=({list:e,label:t,multiple:n,disabled:r=!1,isValid:o,description:i,onChange:a,...s})=>{const[l,u]=A.useState([]),[c,f]=A.useState(null),[p,d]=A.useState(""),m=e,g=r?"opacity-50":"",h={...o===!0&&!r&&{"aria-valid":!0},...o===!1&&!r&&{"aria-invalid":!0},disabled:r},y=R=>{if(n){const k=Array.isArray(R)?R:R?[R]:[],_=k.length>l.length;u(k),a?.(v5(k)),_&&d("")}else{const k=Array.isArray(R)?R[0]??null:R;sd(c,k)?(f(null),a?.(null)):(f(k),a?.(k)),d("")}},b=R=>{d(R.currentTarget.value)},x=()=>{r||(f(null),a?.(null))},w=n?l:c,S=p.trim().toLowerCase(),E=m.filter(R=>k_(R).toLowerCase().includes(S)),O=(R,k)=>C.jsx(lO,{showRemove:k.withRemove,onClick:k.onClick,className:`${dm({variant:R.variant,kind:R.kind})}
168
+ ${g} ${k.className}`,children:C.jsx(Dp,{variant:R.variant,classNames:{className:"px-2 py-0"},children:R.value})},String(R.id)),P=R=>C.jsxs(C.Fragment,{children:[R.map(k=>_a(k)?O(k,{withRemove:!r,className:"pl-2.5"}):C.jsx("span",{className:g,children:k},k)),C.jsx(th,{...s,...h,placeholder:R.length>0?"":s.placeholder,value:p,onChange:b})]}),N=R=>C.jsxs(C.Fragment,{children:[R&&(_a(R)?O(R,{withRemove:!1,className:"ml-1",onClick:x}):C.jsx(Mp,{className:g,onClick:x,children:R})),C.jsx(th,{...s,placeholder:R?"":s.placeholder,...h,value:p,onChange:b,className:"flex-1 pl-1"})]});return C.jsx(bc,{children:C.jsx(us,{children:C.jsxs(rO,{children:[C.jsx(Yi,{...h,children:t}),C.jsxs(nO,{items:m,multiple:n,autoHighlight:n,value:w,onValueChange:r?void 0:y,children:[n?C.jsxs(eh,{disabled:r,className:"pr-8",children:[C.jsx(Jp,{children:P}),C.jsx(ou,{className:"-ml-4.5",disabled:r})]}):C.jsxs(eh,{disabled:r,className:"pr-8",children:[C.jsx(Jp,{children:N}),C.jsx(ou,{className:"-ml-4.5",disabled:r})]}),C.jsxs(oO,{children:[C.jsx(sO,{children:"No items found."}),C.jsx(iO,{children:E.map((R,k)=>{const _=n?l.some(T=>sd(T,R)):sd(c,R);return C.jsx(aO,{disabled:r,value:R,className:`${_?"bg-tertiary-bg":""} ${typeof R=="string"?"py-1":"px-2 py-2"}`,children:_a(R)?C.jsx(Dp,{dotPosition:"left",variant:R.variant,kind:R.kind,classNames:{className:"px-4 py-1.5"},children:R.value}):C.jsx(Mp,{className:"px-4 py-1.5",children:R})},_a(R)?String(R.id):`${R}-${k}`)})})]})]}),C.jsx(fs,{...h,children:i})]})})})};N_.displayName="SelectSearch";const y5=({label:e,description:t,isValid:n,...r})=>{const{disabled:o}=r,i={"aria-invalid":!!n},a=[n===!0&&"text-success-text",n===!1&&"text-error-text",o&&"text-disabled-text"].filter(Boolean).join(" ");return C.jsx(bc,{children:C.jsx(us,{children:C.jsxs(cs,{children:[e&&C.jsx(Yi,{children:e}),C.jsx(xc,{...r,...i}),t&&C.jsx(fs,{className:q(o?"text-disabled-text":"",a),children:t})]})})})};var b5=["dangerouslySetInnerHTML","onCopy","onCopyCapture","onCut","onCutCapture","onPaste","onPasteCapture","onCompositionEnd","onCompositionEndCapture","onCompositionStart","onCompositionStartCapture","onCompositionUpdate","onCompositionUpdateCapture","onFocus","onFocusCapture","onBlur","onBlurCapture","onChange","onChangeCapture","onBeforeInput","onBeforeInputCapture","onInput","onInputCapture","onReset","onResetCapture","onSubmit","onSubmitCapture","onInvalid","onInvalidCapture","onLoad","onLoadCapture","onError","onErrorCapture","onKeyDown","onKeyDownCapture","onKeyPress","onKeyPressCapture","onKeyUp","onKeyUpCapture","onAbort","onAbortCapture","onCanPlay","onCanPlayCapture","onCanPlayThrough","onCanPlayThroughCapture","onDurationChange","onDurationChangeCapture","onEmptied","onEmptiedCapture","onEncrypted","onEncryptedCapture","onEnded","onEndedCapture","onLoadedData","onLoadedDataCapture","onLoadedMetadata","onLoadedMetadataCapture","onLoadStart","onLoadStartCapture","onPause","onPauseCapture","onPlay","onPlayCapture","onPlaying","onPlayingCapture","onProgress","onProgressCapture","onRateChange","onRateChangeCapture","onSeeked","onSeekedCapture","onSeeking","onSeekingCapture","onStalled","onStalledCapture","onSuspend","onSuspendCapture","onTimeUpdate","onTimeUpdateCapture","onVolumeChange","onVolumeChangeCapture","onWaiting","onWaitingCapture","onAuxClick","onAuxClickCapture","onClick","onClickCapture","onContextMenu","onContextMenuCapture","onDoubleClick","onDoubleClickCapture","onDrag","onDragCapture","onDragEnd","onDragEndCapture","onDragEnter","onDragEnterCapture","onDragExit","onDragExitCapture","onDragLeave","onDragLeaveCapture","onDragOver","onDragOverCapture","onDragStart","onDragStartCapture","onDrop","onDropCapture","onMouseDown","onMouseDownCapture","onMouseEnter","onMouseLeave","onMouseMove","onMouseMoveCapture","onMouseOut","onMouseOutCapture","onMouseOver","onMouseOverCapture","onMouseUp","onMouseUpCapture","onSelect","onSelectCapture","onTouchCancel","onTouchCancelCapture","onTouchEnd","onTouchEndCapture","onTouchMove","onTouchMoveCapture","onTouchStart","onTouchStartCapture","onPointerDown","onPointerDownCapture","onPointerMove","onPointerMoveCapture","onPointerUp","onPointerUpCapture","onPointerCancel","onPointerCancelCapture","onPointerEnter","onPointerEnterCapture","onPointerLeave","onPointerLeaveCapture","onPointerOver","onPointerOverCapture","onPointerOut","onPointerOutCapture","onGotPointerCapture","onGotPointerCaptureCapture","onLostPointerCapture","onLostPointerCaptureCapture","onScroll","onScrollCapture","onWheel","onWheelCapture","onAnimationStart","onAnimationStartCapture","onAnimationEnd","onAnimationEndCapture","onAnimationIteration","onAnimationIterationCapture","onTransitionEnd","onTransitionEndCapture"];function jg(e){if(typeof e!="string")return!1;var t=b5;return t.includes(e)}var x5=["aria-activedescendant","aria-atomic","aria-autocomplete","aria-busy","aria-checked","aria-colcount","aria-colindex","aria-colspan","aria-controls","aria-current","aria-describedby","aria-details","aria-disabled","aria-errormessage","aria-expanded","aria-flowto","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext","className","color","height","id","lang","max","media","method","min","name","style","target","width","role","tabIndex","accentHeight","accumulate","additive","alignmentBaseline","allowReorder","alphabetic","amplitude","arabicForm","ascent","attributeName","attributeType","autoReverse","azimuth","baseFrequency","baselineShift","baseProfile","bbox","begin","bias","by","calcMode","capHeight","clip","clipPath","clipPathUnits","clipRule","colorInterpolation","colorInterpolationFilters","colorProfile","colorRendering","contentScriptType","contentStyleType","cursor","cx","cy","d","decelerate","descent","diffuseConstant","direction","display","divisor","dominantBaseline","dur","dx","dy","edgeMode","elevation","enableBackground","end","exponent","externalResourcesRequired","fill","fillOpacity","fillRule","filter","filterRes","filterUnits","floodColor","floodOpacity","focusable","fontFamily","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontWeight","format","from","fx","fy","g1","g2","glyphName","glyphOrientationHorizontal","glyphOrientationVertical","glyphRef","gradientTransform","gradientUnits","hanging","horizAdvX","horizOriginX","href","ideographic","imageRendering","in2","in","intercept","k1","k2","k3","k4","k","kernelMatrix","kernelUnitLength","kerning","keyPoints","keySplines","keyTimes","lengthAdjust","letterSpacing","lightingColor","limitingConeAngle","local","markerEnd","markerHeight","markerMid","markerStart","markerUnits","markerWidth","mask","maskContentUnits","maskUnits","mathematical","mode","numOctaves","offset","opacity","operator","order","orient","orientation","origin","overflow","overlinePosition","overlineThickness","paintOrder","panose1","pathLength","patternContentUnits","patternTransform","patternUnits","pointerEvents","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","r","radius","refX","refY","renderingIntent","repeatCount","repeatDur","requiredExtensions","requiredFeatures","restart","result","rotate","rx","ry","seed","shapeRendering","slope","spacing","specularConstant","specularExponent","speed","spreadMethod","startOffset","stdDeviation","stemh","stemv","stitchTiles","stopColor","stopOpacity","strikethroughPosition","strikethroughThickness","string","stroke","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","strokeOpacity","strokeWidth","surfaceScale","systemLanguage","tableValues","targetX","targetY","textAnchor","textDecoration","textLength","textRendering","to","transform","u1","u2","underlinePosition","underlineThickness","unicode","unicodeBidi","unicodeRange","unitsPerEm","vAlphabetic","values","vectorEffect","version","vertAdvY","vertOriginX","vertOriginY","vHanging","vIdeographic","viewTarget","visibility","vMathematical","widths","wordSpacing","writingMode","x1","x2","x","xChannelSelector","xHeight","xlinkActuate","xlinkArcrole","xlinkHref","xlinkRole","xlinkShow","xlinkTitle","xlinkType","xmlBase","xmlLang","xmlns","xmlnsXlink","xmlSpace","y1","y2","y","yChannelSelector","z","zoomAndPan","ref","key","angle"],w5=new Set(x5);function T_(e){return typeof e!="string"?!1:w5.has(e)}function M_(e){return typeof e=="string"&&e.startsWith("data-")}function _r(e){if(typeof e!="object"||e===null)return{};var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(T_(n)||M_(n))&&(t[n]=e[n]);return t}function $g(e){if(e==null)return null;if(A.isValidElement(e)&&typeof e.props=="object"&&e.props!==null){var t=e.props;return _r(t)}return typeof e=="object"&&!Array.isArray(e)?_r(e):null}function kn(e){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(T_(n)||M_(n)||jg(n))&&(t[n]=e[n]);return t}var C5=["children","width","height","viewBox","className","style","title","desc"];function dh(){return dh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},dh.apply(null,arguments)}function S5(e,t){if(e==null)return{};var n,r,o=E5(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function E5(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var D_=A.forwardRef((e,t)=>{var{children:n,width:r,height:o,viewBox:i,className:a,style:s,title:l,desc:u}=e,c=S5(e,C5),f=i||{width:r,height:o,x:0,y:0},p=Ue("recharts-surface",a);return v.createElement("svg",dh({},kn(c),{className:p,width:r,height:o,style:s,viewBox:"".concat(f.x," ").concat(f.y," ").concat(f.width," ").concat(f.height),ref:t}),v.createElement("title",null,l),v.createElement("desc",null,u),n)}),O5=["children","className"];function ph(){return ph=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ph.apply(null,arguments)}function P5(e,t){if(e==null)return{};var n,r,o=_5(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function _5(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var ir=v.forwardRef((e,t)=>{var{children:n,className:r}=e,o=P5(e,O5),i=Ue("recharts-layer",r);return v.createElement("g",ph({className:i},kn(o),{ref:t}),n)}),A5=A.createContext(null);function Ke(e){return function(){return e}}const j_=Math.cos,uu=Math.sin,Un=Math.sqrt,cu=Math.PI,kc=2*cu,hh=Math.PI,mh=2*hh,Mo=1e-6,R5=mh-Mo;function $_(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function I5(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return $_;const n=10**t;return function(r){this._+=r[0];for(let o=1,i=r.length;o<i;++o)this._+=Math.round(arguments[o]*n)/n+r[o]}}class k5{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?$_:I5(t)}moveTo(t,n){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,n){this._append`L${this._x1=+t},${this._y1=+n}`}quadraticCurveTo(t,n,r,o){this._append`Q${+t},${+n},${this._x1=+r},${this._y1=+o}`}bezierCurveTo(t,n,r,o,i,a){this._append`C${+t},${+n},${+r},${+o},${this._x1=+i},${this._y1=+a}`}arcTo(t,n,r,o,i){if(t=+t,n=+n,r=+r,o=+o,i=+i,i<0)throw new Error(`negative radius: ${i}`);let a=this._x1,s=this._y1,l=r-t,u=o-n,c=a-t,f=s-n,p=c*c+f*f;if(this._x1===null)this._append`M${this._x1=t},${this._y1=n}`;else if(p>Mo)if(!(Math.abs(f*l-u*c)>Mo)||!i)this._append`L${this._x1=t},${this._y1=n}`;else{let d=r-a,m=o-s,g=l*l+u*u,h=d*d+m*m,y=Math.sqrt(g),b=Math.sqrt(p),x=i*Math.tan((hh-Math.acos((g+p-h)/(2*y*b)))/2),w=x/b,S=x/y;Math.abs(w-1)>Mo&&this._append`L${t+w*c},${n+w*f}`,this._append`A${i},${i},0,0,${+(f*d>c*m)},${this._x1=t+S*l},${this._y1=n+S*u}`}}arc(t,n,r,o,i,a){if(t=+t,n=+n,r=+r,a=!!a,r<0)throw new Error(`negative radius: ${r}`);let s=r*Math.cos(o),l=r*Math.sin(o),u=t+s,c=n+l,f=1^a,p=a?o-i:i-o;this._x1===null?this._append`M${u},${c}`:(Math.abs(this._x1-u)>Mo||Math.abs(this._y1-c)>Mo)&&this._append`L${u},${c}`,r&&(p<0&&(p=p%mh+mh),p>R5?this._append`A${r},${r},0,1,${f},${t-s},${n-l}A${r},${r},0,1,${f},${this._x1=u},${this._y1=c}`:p>Mo&&this._append`A${r},${r},0,${+(p>=hh)},${f},${this._x1=t+r*Math.cos(i)},${this._y1=n+r*Math.sin(i)}`)}rect(t,n,r,o){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${r=+r}v${+o}h${-r}Z`}toString(){return this._}}function Lg(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{const r=Math.floor(n);if(!(r>=0))throw new RangeError(`invalid digits: ${n}`);t=r}return e},()=>new k5(t)}function Fg(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function L_(e){this._context=e}L_.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function Nc(e){return new L_(e)}function F_(e){return e[0]}function V_(e){return e[1]}function z_(e,t){var n=Ke(!0),r=null,o=Nc,i=null,a=Lg(s);e=typeof e=="function"?e:e===void 0?F_:Ke(e),t=typeof t=="function"?t:t===void 0?V_:Ke(t);function s(l){var u,c=(l=Fg(l)).length,f,p=!1,d;for(r==null&&(i=o(d=a())),u=0;u<=c;++u)!(u<c&&n(f=l[u],u,l))===p&&((p=!p)?i.lineStart():i.lineEnd()),p&&i.point(+e(f,u,l),+t(f,u,l));if(d)return i=null,d+""||null}return s.x=function(l){return arguments.length?(e=typeof l=="function"?l:Ke(+l),s):e},s.y=function(l){return arguments.length?(t=typeof l=="function"?l:Ke(+l),s):t},s.defined=function(l){return arguments.length?(n=typeof l=="function"?l:Ke(!!l),s):n},s.curve=function(l){return arguments.length?(o=l,r!=null&&(i=o(r)),s):o},s.context=function(l){return arguments.length?(l==null?r=i=null:i=o(r=l),s):r},s}function hl(e,t,n){var r=null,o=Ke(!0),i=null,a=Nc,s=null,l=Lg(u);e=typeof e=="function"?e:e===void 0?F_:Ke(+e),t=typeof t=="function"?t:Ke(t===void 0?0:+t),n=typeof n=="function"?n:n===void 0?V_:Ke(+n);function u(f){var p,d,m,g=(f=Fg(f)).length,h,y=!1,b,x=new Array(g),w=new Array(g);for(i==null&&(s=a(b=l())),p=0;p<=g;++p){if(!(p<g&&o(h=f[p],p,f))===y)if(y=!y)d=p,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),m=p-1;m>=d;--m)s.point(x[m],w[m]);s.lineEnd(),s.areaEnd()}y&&(x[p]=+e(h,p,f),w[p]=+t(h,p,f),s.point(r?+r(h,p,f):x[p],n?+n(h,p,f):w[p]))}if(b)return s=null,b+""||null}function c(){return z_().defined(o).curve(a).context(i)}return u.x=function(f){return arguments.length?(e=typeof f=="function"?f:Ke(+f),r=null,u):e},u.x0=function(f){return arguments.length?(e=typeof f=="function"?f:Ke(+f),u):e},u.x1=function(f){return arguments.length?(r=f==null?null:typeof f=="function"?f:Ke(+f),u):r},u.y=function(f){return arguments.length?(t=typeof f=="function"?f:Ke(+f),n=null,u):t},u.y0=function(f){return arguments.length?(t=typeof f=="function"?f:Ke(+f),u):t},u.y1=function(f){return arguments.length?(n=f==null?null:typeof f=="function"?f:Ke(+f),u):n},u.lineX0=u.lineY0=function(){return c().x(e).y(t)},u.lineY1=function(){return c().x(e).y(n)},u.lineX1=function(){return c().x(r).y(t)},u.defined=function(f){return arguments.length?(o=typeof f=="function"?f:Ke(!!f),u):o},u.curve=function(f){return arguments.length?(a=f,i!=null&&(s=a(i)),u):a},u.context=function(f){return arguments.length?(f==null?i=s=null:s=a(i=f),u):i},u}class B_{constructor(t,n){this._context=t,this._x=n}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,n){switch(t=+t,n=+n,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,n,t,n):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n)/2,t,this._y0,t,n);break}}this._x0=t,this._y0=n}}function N5(e){return new B_(e,!0)}function T5(e){return new B_(e,!1)}const Vg={draw(e,t){const n=Un(t/cu);e.moveTo(n,0),e.arc(0,0,n,0,kc)}},M5={draw(e,t){const n=Un(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}},H_=Un(1/3),D5=H_*2,j5={draw(e,t){const n=Un(t/D5),r=n*H_;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},$5={draw(e,t){const n=Un(t),r=-n/2;e.rect(r,r,n,n)}},L5=.8908130915292852,G_=uu(cu/10)/uu(7*cu/10),F5=uu(kc/10)*G_,V5=-j_(kc/10)*G_,z5={draw(e,t){const n=Un(t*L5),r=F5*n,o=V5*n;e.moveTo(0,-n),e.lineTo(r,o);for(let i=1;i<5;++i){const a=kc*i/5,s=j_(a),l=uu(a);e.lineTo(l*n,-s*n),e.lineTo(s*r-l*o,l*r+s*o)}e.closePath()}},ld=Un(3),B5={draw(e,t){const n=-Un(t/(ld*3));e.moveTo(0,n*2),e.lineTo(-ld*n,-n),e.lineTo(ld*n,-n),e.closePath()}},Cn=-.5,Sn=Un(3)/2,gh=1/Un(12),H5=(gh/2+1)*3,G5={draw(e,t){const n=Un(t/H5),r=n/2,o=n*gh,i=r,a=n*gh+n,s=-i,l=a;e.moveTo(r,o),e.lineTo(i,a),e.lineTo(s,l),e.lineTo(Cn*r-Sn*o,Sn*r+Cn*o),e.lineTo(Cn*i-Sn*a,Sn*i+Cn*a),e.lineTo(Cn*s-Sn*l,Sn*s+Cn*l),e.lineTo(Cn*r+Sn*o,Cn*o-Sn*r),e.lineTo(Cn*i+Sn*a,Cn*a-Sn*i),e.lineTo(Cn*s+Sn*l,Cn*l-Sn*s),e.closePath()}};function W5(e,t){let n=null,r=Lg(o);e=typeof e=="function"?e:Ke(e||Vg),t=typeof t=="function"?t:Ke(t===void 0?64:+t);function o(){let i;if(n||(n=i=r()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),i)return n=null,i+""||null}return o.type=function(i){return arguments.length?(e=typeof i=="function"?i:Ke(i),o):e},o.size=function(i){return arguments.length?(t=typeof i=="function"?i:Ke(+i),o):t},o.context=function(i){return arguments.length?(n=i??null,o):n},o}function fu(){}function du(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function W_(e){this._context=e}W_.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:du(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:du(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function U5(e){return new W_(e)}function U_(e){this._context=e}U_.prototype={areaStart:fu,areaEnd:fu,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:du(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function q5(e){return new U_(e)}function q_(e){this._context=e}q_.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:du(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function K5(e){return new q_(e)}function K_(e){this._context=e}K_.prototype={areaStart:fu,areaEnd:fu,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function Y5(e){return new K_(e)}function Fb(e){return e<0?-1:1}function Vb(e,t,n){var r=e._x1-e._x0,o=t-e._x1,i=(e._y1-e._y0)/(r||o<0&&-0),a=(n-e._y1)/(o||r<0&&-0),s=(i*o+a*r)/(r+o);return(Fb(i)+Fb(a))*Math.min(Math.abs(i),Math.abs(a),.5*Math.abs(s))||0}function zb(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function ud(e,t,n){var r=e._x0,o=e._y0,i=e._x1,a=e._y1,s=(i-r)/3;e._context.bezierCurveTo(r+s,o+s*t,i-s,a-s*n,i,a)}function pu(e){this._context=e}pu.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:ud(this,this._t0,zb(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,ud(this,zb(this,n=Vb(this,e,t)),n);break;default:ud(this,this._t0,n=Vb(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function Y_(e){this._context=new X_(e)}(Y_.prototype=Object.create(pu.prototype)).point=function(e,t){pu.prototype.point.call(this,t,e)};function X_(e){this._context=e}X_.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,o,i){this._context.bezierCurveTo(t,e,r,n,i,o)}};function X5(e){return new pu(e)}function Z5(e){return new Y_(e)}function Z_(e){this._context=e}Z_.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=Bb(e),o=Bb(t),i=0,a=1;a<n;++i,++a)this._context.bezierCurveTo(r[0][i],o[0][i],r[1][i],o[1][i],e[a],t[a]);(this._line||this._line!==0&&n===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function Bb(e){var t,n=e.length-1,r,o=new Array(n),i=new Array(n),a=new Array(n);for(o[0]=0,i[0]=2,a[0]=e[0]+2*e[1],t=1;t<n-1;++t)o[t]=1,i[t]=4,a[t]=4*e[t]+2*e[t+1];for(o[n-1]=2,i[n-1]=7,a[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)r=o[t]/i[t-1],i[t]-=r,a[t]-=r*a[t-1];for(o[n-1]=a[n-1]/i[n-1],t=n-2;t>=0;--t)o[t]=(a[t]-o[t+1])/i[t];for(i[n-1]=(e[n]+o[n-1])/2,t=0;t<n-1;++t)i[t]=2*e[t+1]-o[t+1];return[o,i]}function Q5(e){return new Z_(e)}function Tc(e,t){this._context=e,this._t=t}Tc.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}break}}this._x=e,this._y=t}};function J5(e){return new Tc(e,.5)}function eH(e){return new Tc(e,0)}function tH(e){return new Tc(e,1)}function Zo(e,t){if((a=e.length)>1)for(var n=1,r,o,i=e[t[0]],a,s=i.length;n<a;++n)for(o=i,i=e[t[n]],r=0;r<s;++r)i[r][1]+=i[r][0]=isNaN(o[r][1])?o[r][0]:o[r][1]}function vh(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function nH(e,t){return e[t]}function rH(e){const t=[];return t.key=e,t}function oH(){var e=Ke([]),t=vh,n=Zo,r=nH;function o(i){var a=Array.from(e.apply(this,arguments),rH),s,l=a.length,u=-1,c;for(const f of i)for(s=0,++u;s<l;++s)(a[s][u]=[0,+r(f,a[s].key,u,i)]).data=f;for(s=0,c=Fg(t(a));s<l;++s)a[c[s]].index=s;return n(a,c),a}return o.keys=function(i){return arguments.length?(e=typeof i=="function"?i:Ke(Array.from(i)),o):e},o.value=function(i){return arguments.length?(r=typeof i=="function"?i:Ke(+i),o):r},o.order=function(i){return arguments.length?(t=i==null?vh:typeof i=="function"?i:Ke(Array.from(i)),o):t},o.offset=function(i){return arguments.length?(n=i??Zo,o):n},o}function iH(e,t){if((r=e.length)>0){for(var n,r,o=0,i=e[0].length,a;o<i;++o){for(a=n=0;n<r;++n)a+=e[n][o][1]||0;if(a)for(n=0;n<r;++n)e[n][o][1]/=a}Zo(e,t)}}function aH(e,t){if((o=e.length)>0){for(var n=0,r=e[t[0]],o,i=r.length;n<i;++n){for(var a=0,s=0;a<o;++a)s+=e[a][n][1]||0;r[n][1]+=r[n][0]=-s/2}Zo(e,t)}}function sH(e,t){if(!(!((a=e.length)>0)||!((i=(o=e[t[0]]).length)>0))){for(var n=0,r=1,o,i,a;r<i;++r){for(var s=0,l=0,u=0;s<a;++s){for(var c=e[t[s]],f=c[r][1]||0,p=c[r-1][1]||0,d=(f-p)/2,m=0;m<s;++m){var g=e[t[m]],h=g[r][1]||0,y=g[r-1][1]||0;d+=h-y}l+=f,u+=d*f}o[r-1][1]+=o[r-1][0]=n,l&&(n-=u/l)}o[r-1][1]+=o[r-1][0]=n,Zo(e,t)}}var cd={},fd={},Hb;function lH(){return Hb||(Hb=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return n==="__proto__"}e.isUnsafeProperty=t})(fd)),fd}var dd={},Gb;function Q_(){return Gb||(Gb=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){switch(typeof n){case"number":case"symbol":return!1;case"string":return n.includes(".")||n.includes("[")||n.includes("]")}}e.isDeepKey=t})(dd)),dd}var pd={},Wb;function zg(){return Wb||(Wb=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return typeof n=="string"||typeof n=="symbol"?n:Object.is(n?.valueOf?.(),-0)?"-0":String(n)}e.toKey=t})(pd)),pd}var hd={},md={},Ub;function uH(){return Ub||(Ub=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){if(n==null)return"";if(typeof n=="string")return n;if(Array.isArray(n))return n.map(t).join(",");const r=String(n);return r==="0"&&Object.is(Number(n),-0)?"-0":r}e.toString=t})(md)),md}var qb;function Bg(){return qb||(qb=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=uH(),n=zg();function r(o){if(Array.isArray(o))return o.map(n.toKey);if(typeof o=="symbol")return[o];o=t.toString(o);const i=[],a=o.length;if(a===0)return i;let s=0,l="",u="",c=!1;for(o.charCodeAt(0)===46&&(i.push(""),s++);s<a;){const f=o[s];u?f==="\\"&&s+1<a?(s++,l+=o[s]):f===u?u="":l+=f:c?f==='"'||f==="'"?u=f:f==="]"?(c=!1,i.push(l),l=""):l+=f:f==="["?(c=!0,l&&(i.push(l),l="")):f==="."?l&&(i.push(l),l=""):l+=f,s++}return l&&i.push(l),i}e.toPath=r})(hd)),hd}var Kb;function Hg(){return Kb||(Kb=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=lH(),n=Q_(),r=zg(),o=Bg();function i(s,l,u){if(s==null)return u;switch(typeof l){case"string":{if(t.isUnsafeProperty(l))return u;const c=s[l];return c===void 0?n.isDeepKey(l)?i(s,o.toPath(l),u):u:c}case"number":case"symbol":{typeof l=="number"&&(l=r.toKey(l));const c=s[l];return c===void 0?u:c}default:{if(Array.isArray(l))return a(s,l,u);if(Object.is(l?.valueOf(),-0)?l="-0":l=String(l),t.isUnsafeProperty(l))return u;const c=s[l];return c===void 0?u:c}}}function a(s,l,u){if(l.length===0)return u;let c=s;for(let f=0;f<l.length;f++){if(c==null||t.isUnsafeProperty(l[f]))return u;c=c[l[f]]}return c===void 0?u:c}e.get=i})(cd)),cd}var gd,Yb;function cH(){return Yb||(Yb=1,gd=Hg().get),gd}var fH=cH();const Vi=si(fH);var dH=4;function oo(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:dH,n=10**t,r=Math.round(e*n)/n;return Object.is(r,-0)?0:r}function it(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return e.reduce((o,i,a)=>{var s=n[a-1];return typeof s=="string"?o+s+i:s!==void 0?o+oo(s)+i:o+i},"")}var on=e=>e===0?0:e>0?1:-1,ar=e=>typeof e=="number"&&e!=+e,Qo=e=>typeof e=="string"&&e.indexOf("%")===e.length-1,ce=e=>(typeof e=="number"||e instanceof Number)&&!ar(e),sr=e=>ce(e)||typeof e=="string",pH=0,Wa=e=>{var t=++pH;return"".concat(e||"").concat(t)},Bn=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!ce(t)&&typeof t!="string")return r;var i;if(Qo(t)){if(n==null)return r;var a=t.indexOf("%");i=n*parseFloat(t.slice(0,a))/100}else i=+t;return ar(i)&&(i=r),o&&n!=null&&i>n&&(i=n),i},J_=e=>{if(!Array.isArray(e))return!1;for(var t=e.length,n={},r=0;r<t;r++)if(!n[String(e[r])])n[String(e[r])]=!0;else return!0;return!1};function kt(e,t,n){return ce(e)&&ce(t)?oo(e+n*(t-e)):t}function hH(e,t,n){if(!(!e||!e.length))return e.find(r=>r&&(typeof t=="function"?t(r):Vi(r,t))===n)}var yt=e=>e===null||typeof e>"u",ms=e=>yt(e)?e:"".concat(e.charAt(0).toUpperCase()).concat(e.slice(1));function an(e){return e!=null}function li(){}var mH=["type","size","sizeType"];function yh(){return yh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},yh.apply(null,arguments)}function Xb(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Zb(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Xb(Object(n),!0).forEach(function(r){gH(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Xb(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function gH(e,t,n){return(t=vH(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function vH(e){var t=yH(e,"string");return typeof t=="symbol"?t:t+""}function yH(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function bH(e,t){if(e==null)return{};var n,r,o=xH(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function xH(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var eA={symbolCircle:Vg,symbolCross:M5,symbolDiamond:j5,symbolSquare:$5,symbolStar:z5,symbolTriangle:B5,symbolWye:G5},wH=Math.PI/180,CH=e=>{var t="symbol".concat(ms(e));return eA[t]||Vg},SH=(e,t,n)=>{if(t==="area")return e;switch(n){case"cross":return 5*e*e/9;case"diamond":return .5*e*e/Math.sqrt(3);case"square":return e*e;case"star":{var r=18*wH;return 1.25*e*e*(Math.tan(r)-Math.tan(r*2)*Math.tan(r)**2)}case"triangle":return Math.sqrt(3)*e*e/4;case"wye":return(21-10*Math.sqrt(3))*e*e/8;default:return Math.PI*e*e/4}},EH=(e,t)=>{eA["symbol".concat(ms(e))]=t},tA=e=>{var{type:t="circle",size:n=64,sizeType:r="area"}=e,o=bH(e,mH),i=Zb(Zb({},o),{},{type:t,size:n,sizeType:r}),a="circle";typeof t=="string"&&(a=t);var s=()=>{var p=CH(a),d=W5().type(p).size(SH(n,r,a)),m=d();if(m!==null)return m},{className:l,cx:u,cy:c}=i,f=kn(i);return ce(u)&&ce(c)&&ce(n)?v.createElement("path",yh({},f,{className:Ue("recharts-symbols",l),transform:"translate(".concat(u,", ").concat(c,")"),d:s()})):null};tA.registerSymbol=EH;var nA=e=>"radius"in e&&"startAngle"in e&&"endAngle"in e,OH=(e,t)=>{if(!e||typeof e=="function"||typeof e=="boolean")return null;var n=e;if(A.isValidElement(e)&&(n=e.props),typeof n!="object"&&typeof n!="function")return null;var r={};return Object.keys(n).forEach(o=>{jg(o)&&typeof n[o]=="function"&&(r[o]=(i=>n[o](n,i)))}),r},PH=(e,t,n)=>r=>(e(t,n,r),null),Gg=(e,t,n)=>{if(e===null||typeof e!="object"&&typeof e!="function")return null;var r=null;return Object.keys(e).forEach(o=>{var i=e[o];jg(o)&&typeof i=="function"&&(r||(r={}),r[o]=PH(i,t,n))}),r};function Qb(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function _H(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Qb(Object(n),!0).forEach(function(r){AH(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Qb(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function AH(e,t,n){return(t=RH(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function RH(e){var t=IH(e,"string");return typeof t=="symbol"?t:t+""}function IH(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function wn(e,t){var n=_H({},e),r=t,o=Object.keys(t),i=o.reduce((a,s)=>(a[s]===void 0&&r[s]!==void 0&&(a[s]=r[s]),a),n);return i}var vd={},yd={},Jb;function kH(){return Jb||(Jb=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n,r){const o=new Map;for(let i=0;i<n.length;i++){const a=n[i],s=r(a,i,n);o.has(s)||o.set(s,a)}return Array.from(o.values())}e.uniqBy=t})(yd)),yd}var bd={},ex;function NH(){return ex||(ex=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n,r){return function(...o){return n.apply(this,o.slice(0,r))}}e.ary=t})(bd)),bd}var xd={},tx;function rA(){return tx||(tx=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return n}e.identity=t})(xd)),xd}var wd={},Cd={},Sd={},nx;function TH(){return nx||(nx=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return Number.isSafeInteger(n)&&n>=0}e.isLength=t})(Sd)),Sd}var rx;function oA(){return rx||(rx=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=TH();function n(r){return r!=null&&typeof r!="function"&&t.isLength(r.length)}e.isArrayLike=n})(Cd)),Cd}var Ed={},ox;function MH(){return ox||(ox=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return typeof n=="object"&&n!==null}e.isObjectLike=t})(Ed)),Ed}var ix;function DH(){return ix||(ix=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=oA(),n=MH();function r(o){return n.isObjectLike(o)&&t.isArrayLike(o)}e.isArrayLikeObject=r})(wd)),wd}var Od={},Pd={},ax;function jH(){return ax||(ax=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Hg();function n(r){return function(o){return t.get(o,r)}}e.property=n})(Pd)),Pd}var _d={},Ad={},Rd={},Id={},sx;function iA(){return sx||(sx=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return n!==null&&(typeof n=="object"||typeof n=="function")}e.isObject=t})(Id)),Id}var kd={},lx;function aA(){return lx||(lx=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return n==null||typeof n!="object"&&typeof n!="function"}e.isPrimitive=t})(kd)),kd}var Nd={},ux;function sA(){return ux||(ux=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n,r){return n===r||Number.isNaN(n)&&Number.isNaN(r)}e.isEqualsSameValueZero=t})(Nd)),Nd}var cx;function $H(){return cx||(cx=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=iA(),n=aA(),r=sA();function o(c,f,p){return typeof p!="function"?o(c,f,()=>{}):i(c,f,function d(m,g,h,y,b,x){const w=p(m,g,h,y,b,x);return w!==void 0?!!w:i(m,g,d,x)},new Map)}function i(c,f,p,d){if(f===c)return!0;switch(typeof f){case"object":return a(c,f,p,d);case"function":return Object.keys(f).length>0?i(c,{...f},p,d):r.isEqualsSameValueZero(c,f);default:return t.isObject(c)?typeof f=="string"?f==="":!0:r.isEqualsSameValueZero(c,f)}}function a(c,f,p,d){if(f==null)return!0;if(Array.isArray(f))return l(c,f,p,d);if(f instanceof Map)return s(c,f,p,d);if(f instanceof Set)return u(c,f,p,d);const m=Object.keys(f);if(c==null||n.isPrimitive(c))return m.length===0;if(m.length===0)return!0;if(d?.has(f))return d.get(f)===c;d?.set(f,c);try{for(let g=0;g<m.length;g++){const h=m[g];if(!n.isPrimitive(c)&&!(h in c)||f[h]===void 0&&c[h]!==void 0||f[h]===null&&c[h]!==null||!p(c[h],f[h],h,c,f,d))return!1}return!0}finally{d?.delete(f)}}function s(c,f,p,d){if(f.size===0)return!0;if(!(c instanceof Map))return!1;for(const[m,g]of f.entries()){const h=c.get(m);if(p(h,g,m,c,f,d)===!1)return!1}return!0}function l(c,f,p,d){if(f.length===0)return!0;if(!Array.isArray(c))return!1;const m=new Set;for(let g=0;g<f.length;g++){const h=f[g];let y=!1;for(let b=0;b<c.length;b++){if(m.has(b))continue;const x=c[b];let w=!1;if(p(x,h,g,c,f,d)&&(w=!0),w){m.add(b),y=!0;break}}if(!y)return!1}return!0}function u(c,f,p,d){return f.size===0?!0:c instanceof Set?l([...c],[...f],p,d):!1}e.isMatchWith=o,e.isSetMatch=u})(Rd)),Rd}var fx;function lA(){return fx||(fx=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=$H();function n(r,o){return t.isMatchWith(r,o,()=>{})}e.isMatch=n})(Ad)),Ad}var Td={},Md={},Dd={},dx;function LH(){return dx||(dx=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return Object.getOwnPropertySymbols(n).filter(r=>Object.prototype.propertyIsEnumerable.call(n,r))}e.getSymbols=t})(Dd)),Dd}var jd={},px;function Wg(){return px||(px=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return n==null?n===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(n)}e.getTag=t})(jd)),jd}var $d={},hx;function uA(){return hx||(hx=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t="[object RegExp]",n="[object String]",r="[object Number]",o="[object Boolean]",i="[object Arguments]",a="[object Symbol]",s="[object Date]",l="[object Map]",u="[object Set]",c="[object Array]",f="[object Function]",p="[object ArrayBuffer]",d="[object Object]",m="[object Error]",g="[object DataView]",h="[object Uint8Array]",y="[object Uint8ClampedArray]",b="[object Uint16Array]",x="[object Uint32Array]",w="[object BigUint64Array]",S="[object Int8Array]",E="[object Int16Array]",O="[object Int32Array]",P="[object BigInt64Array]",N="[object Float32Array]",R="[object Float64Array]";e.argumentsTag=i,e.arrayBufferTag=p,e.arrayTag=c,e.bigInt64ArrayTag=P,e.bigUint64ArrayTag=w,e.booleanTag=o,e.dataViewTag=g,e.dateTag=s,e.errorTag=m,e.float32ArrayTag=N,e.float64ArrayTag=R,e.functionTag=f,e.int16ArrayTag=E,e.int32ArrayTag=O,e.int8ArrayTag=S,e.mapTag=l,e.numberTag=r,e.objectTag=d,e.regexpTag=t,e.setTag=u,e.stringTag=n,e.symbolTag=a,e.uint16ArrayTag=b,e.uint32ArrayTag=x,e.uint8ArrayTag=h,e.uint8ClampedArrayTag=y})($d)),$d}var Ld={},mx;function FH(){return mx||(mx=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return ArrayBuffer.isView(n)&&!(n instanceof DataView)}e.isTypedArray=t})(Ld)),Ld}var gx;function cA(){return gx||(gx=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=LH(),n=Wg(),r=uA(),o=aA(),i=FH();function a(c,f){return s(c,void 0,c,new Map,f)}function s(c,f,p,d=new Map,m=void 0){const g=m?.(c,f,p,d);if(g!==void 0)return g;if(o.isPrimitive(c))return c;if(d.has(c))return d.get(c);if(Array.isArray(c)){const h=new Array(c.length);d.set(c,h);for(let y=0;y<c.length;y++)h[y]=s(c[y],y,p,d,m);return Object.hasOwn(c,"index")&&(h.index=c.index),Object.hasOwn(c,"input")&&(h.input=c.input),h}if(c instanceof Date)return new Date(c.getTime());if(c instanceof RegExp){const h=new RegExp(c.source,c.flags);return h.lastIndex=c.lastIndex,h}if(c instanceof Map){const h=new Map;d.set(c,h);for(const[y,b]of c)h.set(y,s(b,y,p,d,m));return h}if(c instanceof Set){const h=new Set;d.set(c,h);for(const y of c)h.add(s(y,void 0,p,d,m));return h}if(typeof Buffer<"u"&&Buffer.isBuffer(c))return c.subarray();if(i.isTypedArray(c)){const h=new(Object.getPrototypeOf(c)).constructor(c.length);d.set(c,h);for(let y=0;y<c.length;y++)h[y]=s(c[y],y,p,d,m);return h}if(c instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&c instanceof SharedArrayBuffer)return c.slice(0);if(c instanceof DataView){const h=new DataView(c.buffer.slice(0),c.byteOffset,c.byteLength);return d.set(c,h),l(h,c,p,d,m),h}if(typeof File<"u"&&c instanceof File){const h=new File([c],c.name,{type:c.type});return d.set(c,h),l(h,c,p,d,m),h}if(typeof Blob<"u"&&c instanceof Blob){const h=new Blob([c],{type:c.type});return d.set(c,h),l(h,c,p,d,m),h}if(c instanceof Error){const h=structuredClone(c);return d.set(c,h),h.message=c.message,h.name=c.name,h.stack=c.stack,h.cause=c.cause,h.constructor=c.constructor,l(h,c,p,d,m),h}if(c instanceof Boolean){const h=new Boolean(c.valueOf());return d.set(c,h),l(h,c,p,d,m),h}if(c instanceof Number){const h=new Number(c.valueOf());return d.set(c,h),l(h,c,p,d,m),h}if(c instanceof String){const h=new String(c.valueOf());return d.set(c,h),l(h,c,p,d,m),h}if(typeof c=="object"&&u(c)){const h=Object.create(Object.getPrototypeOf(c));return d.set(c,h),l(h,c,p,d,m),h}return c}function l(c,f,p=c,d,m){const g=[...Object.keys(f),...t.getSymbols(f)];for(let h=0;h<g.length;h++){const y=g[h],b=Object.getOwnPropertyDescriptor(c,y);(b==null||b.writable)&&(c[y]=s(f[y],y,p,d,m))}}function u(c){switch(n.getTag(c)){case r.argumentsTag:case r.arrayTag:case r.arrayBufferTag:case r.dataViewTag:case r.booleanTag:case r.dateTag:case r.float32ArrayTag:case r.float64ArrayTag:case r.int8ArrayTag:case r.int16ArrayTag:case r.int32ArrayTag:case r.mapTag:case r.numberTag:case r.objectTag:case r.regexpTag:case r.setTag:case r.stringTag:case r.symbolTag:case r.uint8ArrayTag:case r.uint8ClampedArrayTag:case r.uint16ArrayTag:case r.uint32ArrayTag:return!0;default:return!1}}e.cloneDeepWith=a,e.cloneDeepWithImpl=s,e.copyProperties=l})(Md)),Md}var vx;function VH(){return vx||(vx=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=cA();function n(r){return t.cloneDeepWithImpl(r,void 0,r,new Map,void 0)}e.cloneDeep=n})(Td)),Td}var yx;function zH(){return yx||(yx=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=lA(),n=VH();function r(o){return o=n.cloneDeep(o),i=>t.isMatch(i,o)}e.matches=r})(_d)),_d}var Fd={},Vd={},zd={},bx;function BH(){return bx||(bx=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=cA(),n=Wg(),r=uA();function o(i,a){return t.cloneDeepWith(i,(s,l,u,c)=>{const f=a?.(s,l,u,c);if(f!==void 0)return f;if(typeof i=="object"){if(n.getTag(i)===r.objectTag&&typeof i.constructor!="function"){const p={};return c.set(i,p),t.copyProperties(p,i,u,c),p}switch(Object.prototype.toString.call(i)){case r.numberTag:case r.stringTag:case r.booleanTag:{const p=new i.constructor(i?.valueOf());return t.copyProperties(p,i),p}case r.argumentsTag:{const p={};return t.copyProperties(p,i),p.length=i.length,p[Symbol.iterator]=i[Symbol.iterator],p}default:return}}})}e.cloneDeepWith=o})(zd)),zd}var xx;function HH(){return xx||(xx=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=BH();function n(r){return t.cloneDeepWith(r)}e.cloneDeep=n})(Vd)),Vd}var Bd={},Hd={},wx;function fA(){return wx||(wx=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=/^(?:0|[1-9]\d*)$/;function n(r,o=Number.MAX_SAFE_INTEGER){switch(typeof r){case"number":return Number.isInteger(r)&&r>=0&&r<o;case"symbol":return!1;case"string":return t.test(r)}}e.isIndex=n})(Hd)),Hd}var Gd={},Cx;function GH(){return Cx||(Cx=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Wg();function n(r){return r!==null&&typeof r=="object"&&t.getTag(r)==="[object Arguments]"}e.isArguments=n})(Gd)),Gd}var Sx;function WH(){return Sx||(Sx=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Q_(),n=fA(),r=GH(),o=Bg();function i(a,s){let l;if(Array.isArray(s)?l=s:typeof s=="string"&&t.isDeepKey(s)&&a?.[s]==null?l=o.toPath(s):l=[s],l.length===0)return!1;let u=a;for(let c=0;c<l.length;c++){const f=l[c];if((u==null||!Object.hasOwn(u,f))&&!((Array.isArray(u)||r.isArguments(u))&&n.isIndex(f)&&f<u.length))return!1;u=u[f]}return!0}e.has=i})(Bd)),Bd}var Ex;function UH(){return Ex||(Ex=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=lA(),n=zg(),r=HH(),o=Hg(),i=WH();function a(s,l){switch(typeof s){case"object":{Object.is(s?.valueOf(),-0)&&(s="-0");break}case"number":{s=n.toKey(s);break}}return l=r.cloneDeep(l),function(u){const c=o.get(u,s);return c===void 0?i.has(u,s):l===void 0?c===void 0:t.isMatch(c,l)}}e.matchesProperty=a})(Fd)),Fd}var Ox;function qH(){return Ox||(Ox=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=rA(),n=jH(),r=zH(),o=UH();function i(a){if(a==null)return t.identity;switch(typeof a){case"function":return a;case"object":return Array.isArray(a)&&a.length===2?o.matchesProperty(a[0],a[1]):r.matches(a);case"string":case"symbol":case"number":return n.property(a)}}e.iteratee=i})(Od)),Od}var Px;function KH(){return Px||(Px=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=kH(),n=NH(),r=rA(),o=DH(),i=qH();function a(s,l=r.identity){return o.isArrayLikeObject(s)?t.uniqBy(Array.from(s),n.ary(i.iteratee(l),1)):[]}e.uniqBy=a})(vd)),vd}var Wd,_x;function YH(){return _x||(_x=1,Wd=KH().uniqBy),Wd}var XH=YH();const Ax=si(XH);function ZH(e,t,n){return t===!0?Ax(e,n):typeof t=="function"?Ax(e,t):e}var Ug=A.createContext(null),QH=e=>e,tt=()=>{var e=A.useContext(Ug);return e?e.store.dispatch:QH},$l=()=>{},JH=()=>$l,eG=(e,t)=>e===t;function me(e){var t=A.useContext(Ug),n=A.useMemo(()=>t?r=>{if(r!=null)return e(r)}:$l,[t,e]);return m1.useSyncExternalStoreWithSelector(t?t.subscription.addNestedSub:JH,t?t.store.getState:$l,t?t.store.getState:$l,n,eG)}var Ud={},qd={},Kd={},Rx;function tG(){return Rx||(Rx=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return typeof r=="symbol"?1:r===null?2:r===void 0?3:r!==r?4:0}const n=(r,o,i)=>{if(r!==o){const a=t(r),s=t(o);if(a===s&&a===0){if(r<o)return i==="desc"?1:-1;if(r>o)return i==="desc"?-1:1}return i==="desc"?s-a:a-s}return 0};e.compareValues=n})(Kd)),Kd}var Yd={},Xd={},Ix;function dA(){return Ix||(Ix=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return typeof n=="symbol"||n instanceof Symbol}e.isSymbol=t})(Xd)),Xd}var kx;function nG(){return kx||(kx=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=dA(),n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,r=/^\w*$/;function o(i,a){return Array.isArray(i)?!1:typeof i=="number"||typeof i=="boolean"||i==null||t.isSymbol(i)?!0:typeof i=="string"&&(r.test(i)||!n.test(i))||a!=null&&Object.hasOwn(a,i)}e.isKey=o})(Yd)),Yd}var Nx;function rG(){return Nx||(Nx=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=tG(),n=nG(),r=Bg();function o(i,a,s,l){if(i==null)return[];s=l?void 0:s,Array.isArray(i)||(i=Object.values(i)),Array.isArray(a)||(a=a==null?[null]:[a]),a.length===0&&(a=[null]),Array.isArray(s)||(s=s==null?[]:[s]),s=s.map(d=>String(d));const u=(d,m)=>{let g=d;for(let h=0;h<m.length&&g!=null;++h)g=g[m[h]];return g},c=(d,m)=>m==null||d==null?m:typeof d=="object"&&"key"in d?Object.hasOwn(m,d.key)?m[d.key]:u(m,d.path):typeof d=="function"?d(m):Array.isArray(d)?u(m,d):typeof m=="object"?m[d]:m,f=a.map(d=>(Array.isArray(d)&&d.length===1&&(d=d[0]),d==null||typeof d=="function"||Array.isArray(d)||n.isKey(d)?d:{key:d,path:r.toPath(d)}));return i.map(d=>({original:d,criteria:f.map(m=>c(m,d))})).slice().sort((d,m)=>{for(let g=0;g<f.length;g++){const h=t.compareValues(d.criteria[g],m.criteria[g],s[g]);if(h!==0)return h}return 0}).map(d=>d.original)}e.orderBy=o})(qd)),qd}var Zd={},Tx;function oG(){return Tx||(Tx=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n,r=1){const o=[],i=Math.floor(r),a=(s,l)=>{for(let u=0;u<s.length;u++){const c=s[u];Array.isArray(c)&&l<i?a(c,l+1):o.push(c)}};return a(n,0),o}e.flatten=t})(Zd)),Zd}var Qd={},Mx;function pA(){return Mx||(Mx=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=fA(),n=oA(),r=iA(),o=sA();function i(a,s,l){return r.isObject(l)&&(typeof s=="number"&&n.isArrayLike(l)&&t.isIndex(s)&&s<l.length||typeof s=="string"&&s in l)?o.isEqualsSameValueZero(l[s],a):!1}e.isIterateeCall=i})(Qd)),Qd}var Dx;function iG(){return Dx||(Dx=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=rG(),n=oG(),r=pA();function o(i,...a){const s=a.length;return s>1&&r.isIterateeCall(i,a[0],a[1])?a=[]:s>2&&r.isIterateeCall(a[0],a[1],a[2])&&(a=[a[0]]),t.orderBy(i,n.flatten(a),["asc"])}e.sortBy=o})(Ud)),Ud}var Jd,jx;function aG(){return jx||(jx=1,Jd=iG().sortBy),Jd}var sG=aG();const Mc=si(sG);var hA=e=>e.legend.settings,lG=e=>e.legend.size,uG=e=>e.legend.payload;j([uG,hA],(e,t)=>{var{itemSorter:n}=t,r=e.flat(1);return n?Mc(r,n):r});var ml=1;function cG(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],[t,n]=A.useState({height:0,left:0,top:0,width:0}),r=A.useCallback(o=>{if(o!=null){var i=o.getBoundingClientRect(),a={height:i.height,left:i.left,top:i.top,width:i.width};(Math.abs(a.height-t.height)>ml||Math.abs(a.left-t.left)>ml||Math.abs(a.top-t.top)>ml||Math.abs(a.width-t.width)>ml)&&n({height:a.height,left:a.left,top:a.top,width:a.width})}},[t.width,t.height,t.top,t.left,...e]);return[t,r]}function Rt(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var fG=typeof Symbol=="function"&&Symbol.observable||"@@observable",$x=fG,ep=()=>Math.random().toString(36).substring(7).split("").join("."),dG={INIT:`@@redux/INIT${ep()}`,REPLACE:`@@redux/REPLACE${ep()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${ep()}`},Bo=dG;function gs(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function pG(e){if(e===void 0)return"undefined";if(e===null)return"null";const t=typeof e;switch(t){case"boolean":case"string":case"number":case"symbol":case"function":return t}if(Array.isArray(e))return"array";if(gG(e))return"date";if(mG(e))return"error";const n=hG(e);switch(n){case"Symbol":case"Promise":case"WeakMap":case"WeakSet":case"Map":case"Set":return n}return Object.prototype.toString.call(e).slice(8,-1).toLowerCase().replace(/\s/g,"")}function hG(e){return typeof e.constructor=="function"?e.constructor.name:null}function mG(e){return e instanceof Error||typeof e.message=="string"&&e.constructor&&typeof e.constructor.stackTraceLimit=="number"}function gG(e){return e instanceof Date?!0:typeof e.toDateString=="function"&&typeof e.getDate=="function"&&typeof e.setDate=="function"}function Zr(e){let t=typeof e;return process.env.NODE_ENV!=="production"&&(t=pG(e)),t}function mA(e,t,n){if(typeof e!="function")throw new Error(process.env.NODE_ENV==="production"?Rt(2):`Expected the root reducer to be a function. Instead, received: '${Zr(e)}'`);if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(process.env.NODE_ENV==="production"?Rt(0):"It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function. See https://redux.js.org/tutorials/fundamentals/part-4-store#creating-a-store-with-enhancers for an example.");if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(process.env.NODE_ENV==="production"?Rt(1):`Expected the enhancer to be a function. Instead, received: '${Zr(n)}'`);return n(mA)(e,t)}let r=e,o=t,i=new Map,a=i,s=0,l=!1;function u(){a===i&&(a=new Map,i.forEach((h,y)=>{a.set(y,h)}))}function c(){if(l)throw new Error(process.env.NODE_ENV==="production"?Rt(3):"You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");return o}function f(h){if(typeof h!="function")throw new Error(process.env.NODE_ENV==="production"?Rt(4):`Expected the listener to be a function. Instead, received: '${Zr(h)}'`);if(l)throw new Error(process.env.NODE_ENV==="production"?Rt(5):"You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api/store#subscribelistener for more details.");let y=!0;u();const b=s++;return a.set(b,h),function(){if(y){if(l)throw new Error(process.env.NODE_ENV==="production"?Rt(6):"You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api/store#subscribelistener for more details.");y=!1,u(),a.delete(b),i=null}}}function p(h){if(!gs(h))throw new Error(process.env.NODE_ENV==="production"?Rt(7):`Actions must be plain objects. Instead, the actual type was: '${Zr(h)}'. You may need to add middleware to your store setup to handle dispatching other values, such as 'redux-thunk' to handle dispatching functions. See https://redux.js.org/tutorials/fundamentals/part-4-store#middleware and https://redux.js.org/tutorials/fundamentals/part-6-async-logic#using-the-redux-thunk-middleware for examples.`);if(typeof h.type>"u")throw new Error(process.env.NODE_ENV==="production"?Rt(8):'Actions may not have an undefined "type" property. You may have misspelled an action type string constant.');if(typeof h.type!="string")throw new Error(process.env.NODE_ENV==="production"?Rt(17):`Action "type" property must be a string. Instead, the actual type was: '${Zr(h.type)}'. Value was: '${h.type}' (stringified)`);if(l)throw new Error(process.env.NODE_ENV==="production"?Rt(9):"Reducers may not dispatch actions.");try{l=!0,o=r(o,h)}finally{l=!1}return(i=a).forEach(b=>{b()}),h}function d(h){if(typeof h!="function")throw new Error(process.env.NODE_ENV==="production"?Rt(10):`Expected the nextReducer to be a function. Instead, received: '${Zr(h)}`);r=h,p({type:Bo.REPLACE})}function m(){const h=f;return{subscribe(y){if(typeof y!="object"||y===null)throw new Error(process.env.NODE_ENV==="production"?Rt(11):`Expected the observer to be an object. Instead, received: '${Zr(y)}'`);function b(){const w=y;w.next&&w.next(c())}return b(),{unsubscribe:h(b)}},[$x](){return this}}}return p({type:Bo.INIT}),{dispatch:p,subscribe:f,getState:c,replaceReducer:d,[$x]:m}}function Lx(e){typeof console<"u"&&typeof console.error=="function"&&console.error(e);try{throw new Error(e)}catch{}}function vG(e,t,n,r){const o=Object.keys(t),i=n&&n.type===Bo.INIT?"preloadedState argument passed to createStore":"previous state received by the reducer";if(o.length===0)return"Store does not have a valid reducer. Make sure the argument passed to combineReducers is an object whose values are reducers.";if(!gs(e))return`The ${i} has unexpected type of "${Zr(e)}". Expected argument to be an object with the following keys: "${o.join('", "')}"`;const a=Object.keys(e).filter(s=>!t.hasOwnProperty(s)&&!r[s]);if(a.forEach(s=>{r[s]=!0}),!(n&&n.type===Bo.REPLACE)&&a.length>0)return`Unexpected ${a.length>1?"keys":"key"} "${a.join('", "')}" found in ${i}. Expected to find one of the known reducer keys instead: "${o.join('", "')}". Unexpected keys will be ignored.`}function yG(e){Object.keys(e).forEach(t=>{const n=e[t];if(typeof n(void 0,{type:Bo.INIT})>"u")throw new Error(process.env.NODE_ENV==="production"?Rt(12):`The slice reducer for key "${t}" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined. If you don't want to set a value for this reducer, you can use null instead of undefined.`);if(typeof n(void 0,{type:Bo.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(process.env.NODE_ENV==="production"?Rt(13):`The slice reducer for key "${t}" returned undefined when probed with a random type. Don't try to handle '${Bo.INIT}' or other actions in "redux/*" namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined, but can be null.`)})}function gA(e){const t=Object.keys(e),n={};for(let a=0;a<t.length;a++){const s=t[a];process.env.NODE_ENV!=="production"&&typeof e[s]>"u"&&Lx(`No reducer provided for key "${s}"`),typeof e[s]=="function"&&(n[s]=e[s])}const r=Object.keys(n);let o;process.env.NODE_ENV!=="production"&&(o={});let i;try{yG(n)}catch(a){i=a}return function(s={},l){if(i)throw i;if(process.env.NODE_ENV!=="production"){const f=vG(s,n,l,o);f&&Lx(f)}let u=!1;const c={};for(let f=0;f<r.length;f++){const p=r[f],d=n[p],m=s[p],g=d(m,l);if(typeof g>"u"){const h=l&&l.type;throw new Error(process.env.NODE_ENV==="production"?Rt(14):`When called with an action of type ${h?`"${String(h)}"`:"(unknown type)"}, the slice reducer for key "${p}" returned undefined. To ignore an action, you must explicitly return the previous state. If you want this reducer to hold no value, you can return null instead of undefined.`)}c[p]=g,u=u||g!==m}return u=u||r.length!==Object.keys(s).length,u?c:s}}function hu(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,n)=>(...r)=>t(n(...r)))}function bG(...e){return t=>(n,r)=>{const o=t(n,r);let i=()=>{throw new Error(process.env.NODE_ENV==="production"?Rt(15):"Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch.")};const a={getState:o.getState,dispatch:(l,...u)=>i(l,...u)},s=e.map(l=>l(a));return i=hu(...s)(o.dispatch),{...o,dispatch:i}}}function qg(e){return gs(e)&&"type"in e&&typeof e.type=="string"}var vA=Symbol.for("immer-nothing"),Fx=Symbol.for("immer-draftable"),qt=Symbol.for("immer-state"),xG=process.env.NODE_ENV!=="production"?[function(e){return`The plugin for '${e}' has not been loaded into Immer. To enable the plugin, import and call \`enable${e}()\` when initializing your application.`},function(e){return`produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '${e}'`},"This object has been frozen and should not be mutated",function(e){return"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? "+e},"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.","Immer forbids circular references","The first or second argument to `produce` must be a function","The third argument to `produce` must be a function or undefined","First argument to `createDraft` must be a plain object, an array, or an immerable object","First argument to `finishDraft` must be a draft returned by `createDraft`",function(e){return`'current' expects a draft, got: ${e}`},"Object.defineProperty() cannot be used on an Immer draft","Object.setPrototypeOf() cannot be used on an Immer draft","Immer only supports deleting array indices","Immer only supports setting array indices and the 'length' property",function(e){return`'original' expects a draft, got: ${e}`}]:[];function dn(e,...t){if(process.env.NODE_ENV!=="production"){const n=xG[e],r=$o(n)?n.apply(null,t):n;throw new Error(`[Immer] ${r}`)}throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var hn=Object,zi=hn.getPrototypeOf,mu="constructor",Dc="prototype",bh="configurable",gu="enumerable",Ll="writable",Ua="value",Ar=e=>!!e&&!!e[qt];function Hn(e){return e?yA(e)||$c(e)||!!e[Fx]||!!e[mu]?.[Fx]||Lc(e)||Fc(e):!1}var wG=hn[Dc][mu].toString(),Vx=new WeakMap;function yA(e){if(!e||!Kg(e))return!1;const t=zi(e);if(t===null||t===hn[Dc])return!0;const n=hn.hasOwnProperty.call(t,mu)&&t[mu];if(n===Object)return!0;if(!$o(n))return!1;let r=Vx.get(n);return r===void 0&&(r=Function.toString.call(n),Vx.set(n,r)),r===wG}function jc(e,t,n=!0){vs(e)===0?(n?Reflect.ownKeys(e):hn.keys(e)).forEach(o=>{t(o,e[o],e)}):e.forEach((r,o)=>t(o,r,e))}function vs(e){const t=e[qt];return t?t.type_:$c(e)?1:Lc(e)?2:Fc(e)?3:0}var zx=(e,t,n=vs(e))=>n===2?e.has(t):hn[Dc].hasOwnProperty.call(e,t),xh=(e,t,n=vs(e))=>n===2?e.get(t):e[t],vu=(e,t,n,r=vs(e))=>{r===2?e.set(t,n):r===3?e.add(n):e[t]=n};function CG(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var $c=Array.isArray,Lc=e=>e instanceof Map,Fc=e=>e instanceof Set,Kg=e=>typeof e=="object",$o=e=>typeof e=="function",tp=e=>typeof e=="boolean";function SG(e){const t=+e;return Number.isInteger(t)&&String(t)===e}var vr=e=>e.copy_||e.base_,Yg=e=>e.modified_?e.copy_:e.base_;function wh(e,t){if(Lc(e))return new Map(e);if(Fc(e))return new Set(e);if($c(e))return Array[Dc].slice.call(e);const n=yA(e);if(t===!0||t==="class_only"&&!n){const r=hn.getOwnPropertyDescriptors(e);delete r[qt];let o=Reflect.ownKeys(r);for(let i=0;i<o.length;i++){const a=o[i],s=r[a];s[Ll]===!1&&(s[Ll]=!0,s[bh]=!0),(s.get||s.set)&&(r[a]={[bh]:!0,[Ll]:!0,[gu]:s[gu],[Ua]:e[a]})}return hn.create(zi(e),r)}else{const r=zi(e);if(r!==null&&n)return{...e};const o=hn.create(r);return hn.assign(o,e)}}function Xg(e,t=!1){return Vc(e)||Ar(e)||!Hn(e)||(vs(e)>1&&hn.defineProperties(e,{set:gl,add:gl,clear:gl,delete:gl}),hn.freeze(e),t&&jc(e,(n,r)=>{Xg(r,!0)},!1)),e}function EG(){dn(2)}var gl={[Ua]:EG};function Vc(e){return e===null||!Kg(e)?!0:hn.isFrozen(e)}var yu="MapSet",Ch="Patches",Bx="ArrayMethods",bA={};function Jo(e){const t=bA[e];return t||dn(0,e),t}var Hx=e=>!!bA[e],qa,xA=()=>qa,OG=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:Hx(yu)?Jo(yu):void 0,arrayMethodsPlugin_:Hx(Bx)?Jo(Bx):void 0});function Gx(e,t){t&&(e.patchPlugin_=Jo(Ch),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Sh(e){Eh(e),e.drafts_.forEach(PG),e.drafts_=null}function Eh(e){e===qa&&(qa=e.parent_)}var Wx=e=>qa=OG(qa,e);function PG(e){const t=e[qt];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Ux(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];if(e!==void 0&&e!==n){n[qt].modified_&&(Sh(t),dn(4)),Hn(e)&&(e=qx(t,e));const{patchPlugin_:o}=t;o&&o.generateReplacementPatches_(n[qt].base_,e,t)}else e=qx(t,n);return _G(t,e,!0),Sh(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==vA?e:void 0}function qx(e,t){if(Vc(t))return t;const n=t[qt];if(!n)return bu(t,e.handledSet_,e);if(!zc(n,e))return t;if(!n.modified_)return n.base_;if(!n.finalized_){const{callbacks_:r}=n;if(r)for(;r.length>0;)r.pop()(e);SA(n,e)}return n.copy_}function _G(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Xg(t,n)}function wA(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var zc=(e,t)=>e.scope_===t,AG=[];function CA(e,t,n,r){const o=vr(e),i=e.type_;if(r!==void 0&&xh(o,r,i)===t){vu(o,r,n,i);return}if(!e.draftLocations_){const s=e.draftLocations_=new Map;jc(o,(l,u)=>{if(Ar(u)){const c=s.get(u)||[];c.push(l),s.set(u,c)}})}const a=e.draftLocations_.get(t)??AG;for(const s of a)vu(o,s,n,i)}function RG(e,t,n){e.callbacks_.push(function(o){const i=t;if(!i||!zc(i,o))return;o.mapSetPlugin_?.fixSetContents(i);const a=Yg(i);CA(e,i.draft_??i,a,n),SA(i,o)})}function SA(e,t){if(e.modified_&&!e.finalized_&&(e.type_===3||e.type_===1&&e.allIndicesReassigned_||(e.assigned_?.size??0)>0)){const{patchPlugin_:r}=t;if(r){const o=r.getPath(e);o&&r.generatePatches_(e,o,t)}wA(e)}}function IG(e,t,n){const{scope_:r}=e;if(Ar(n)){const o=n[qt];zc(o,r)&&o.callbacks_.push(function(){Fl(e);const a=Yg(o);CA(e,n,a,t)})}else Hn(n)&&e.callbacks_.push(function(){const i=vr(e);e.type_===3?i.has(n)&&bu(n,r.handledSet_,r):xh(i,t,e.type_)===n&&r.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&bu(xh(e.copy_,t,e.type_),r.handledSet_,r)})}function bu(e,t,n){return!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1||Ar(e)||t.has(e)||!Hn(e)||Vc(e)||(t.add(e),jc(e,(r,o)=>{if(Ar(o)){const i=o[qt];if(zc(i,n)){const a=Yg(i);vu(e,r,a,e.type_),wA(i)}}else Hn(o)&&bu(o,t,n)})),e}function kG(e,t){const n=$c(e),r={type_:n?1:0,scope_:t?t.scope_:xA(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0};let o=r,i=xu;n&&(o=[r],i=Ka);const{revoke:a,proxy:s}=Proxy.revocable(o,i);return r.draft_=s,r.revoke_=a,[s,r]}var xu={get(e,t){if(t===qt)return e;let n=e.scope_.arrayMethodsPlugin_;const r=e.type_===1&&typeof t=="string";if(r&&n?.isArrayOperationMethod(t))return n.createMethodInterceptor(e,t);const o=vr(e);if(!zx(o,t,e.type_))return NG(e,o,t);const i=o[t];if(e.finalized_||!Hn(i)||r&&e.operationMethod&&n?.isMutatingArrayMethod(e.operationMethod)&&SG(t))return i;if(i===np(e.base_,t)){Fl(e);const a=e.type_===1?+t:t,s=Ph(e.scope_,i,e,a);return e.copy_[a]=s}return i},has(e,t){return t in vr(e)},ownKeys(e){return Reflect.ownKeys(vr(e))},set(e,t,n){const r=EA(vr(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const o=np(vr(e),t),i=o?.[qt];if(i&&i.base_===n)return e.copy_[t]=n,e.assigned_.set(t,!1),!0;if(CG(n,o)&&(n!==void 0||zx(e.base_,t,e.type_)))return!0;Fl(e),Oh(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_.set(t,!0),IG(e,t,n)),!0},deleteProperty(e,t){return Fl(e),np(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),Oh(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=vr(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{[Ll]:!0,[bh]:e.type_!==1||t!=="length",[gu]:r[gu],[Ua]:n[t]}},defineProperty(){dn(11)},getPrototypeOf(e){return zi(e.base_)},setPrototypeOf(){dn(12)}},Ka={};for(let e in xu){let t=xu[e];Ka[e]=function(){const n=arguments;return n[0]=n[0][0],t.apply(this,n)}}Ka.deleteProperty=function(e,t){return process.env.NODE_ENV!=="production"&&isNaN(parseInt(t))&&dn(13),Ka.set.call(this,e,t,void 0)};Ka.set=function(e,t,n){return process.env.NODE_ENV!=="production"&&t!=="length"&&isNaN(parseInt(t))&&dn(14),xu.set.call(this,e[0],t,n,e[0])};function np(e,t){const n=e[qt];return(n?vr(n):e)[t]}function NG(e,t,n){const r=EA(t,n);return r?Ua in r?r[Ua]:r.get?.call(e.draft_):void 0}function EA(e,t){if(!(t in e))return;let n=zi(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=zi(n)}}function Oh(e){e.modified_||(e.modified_=!0,e.parent_&&Oh(e.parent_))}function Fl(e){e.copy_||(e.assigned_=new Map,e.copy_=wh(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var TG=class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(n,r,o)=>{if($o(n)&&!$o(r)){const a=r;r=n;const s=this;return function(u=a,...c){return s.produce(u,f=>r.call(this,f,...c))}}$o(r)||dn(6),o!==void 0&&!$o(o)&&dn(7);let i;if(Hn(n)){const a=Wx(this),s=Ph(a,n,void 0);let l=!0;try{i=r(s),l=!1}finally{l?Sh(a):Eh(a)}return Gx(a,o),Ux(i,a)}else if(!n||!Kg(n)){if(i=r(n),i===void 0&&(i=n),i===vA&&(i=void 0),this.autoFreeze_&&Xg(i,!0),o){const a=[],s=[];Jo(Ch).generateReplacementPatches_(n,i,{patches_:a,inversePatches_:s}),o(a,s)}return i}else dn(1,n)},this.produceWithPatches=(n,r)=>{if($o(n))return(s,...l)=>this.produceWithPatches(s,u=>n(u,...l));let o,i;return[this.produce(n,r,(s,l)=>{o=s,i=l}),o,i]},tp(t?.autoFreeze)&&this.setAutoFreeze(t.autoFreeze),tp(t?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(t.useStrictShallowCopy),tp(t?.useStrictIteration)&&this.setUseStrictIteration(t.useStrictIteration)}createDraft(t){Hn(t)||dn(8),Ar(t)&&(t=An(t));const n=Wx(this),r=Ph(n,t,void 0);return r[qt].isManual_=!0,Eh(n),r}finishDraft(t,n){const r=t&&t[qt];(!r||!r.isManual_)&&dn(9);const{scope_:o}=r;return Gx(o,n),Ux(void 0,o)}setAutoFreeze(t){this.autoFreeze_=t}setUseStrictShallowCopy(t){this.useStrictShallowCopy_=t}setUseStrictIteration(t){this.useStrictIteration_=t}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(t,n){let r;for(r=n.length-1;r>=0;r--){const i=n[r];if(i.path.length===0&&i.op==="replace"){t=i.value;break}}r>-1&&(n=n.slice(r+1));const o=Jo(Ch).applyPatches_;return Ar(t)?o(t,n):this.produce(t,i=>o(i,n))}};function Ph(e,t,n,r){const[o,i]=Lc(t)?Jo(yu).proxyMap_(t,n):Fc(t)?Jo(yu).proxySet_(t,n):kG(t,n);return(n?.scope_??xA()).drafts_.push(o),i.callbacks_=n?.callbacks_??[],i.key_=r,n&&r!==void 0?RG(n,i,r):i.callbacks_.push(function(l){l.mapSetPlugin_?.fixSetContents(i);const{patchPlugin_:u}=l;i.modified_&&u&&u.generatePatches_(i,[],l)}),o}function An(e){return Ar(e)||dn(10,e),OA(e)}function OA(e){if(!Hn(e)||Vc(e))return e;const t=e[qt];let n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=wh(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=wh(e,!0);return jc(n,(o,i)=>{vu(n,o,OA(i))},r),t&&(t.finalized_=!1),n}var MG=new TG,PA=MG.produce;function _A(e){return({dispatch:n,getState:r})=>o=>i=>typeof i=="function"?i(n,r,e):o(i)}var DG=_A(),jG=_A,$G=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?hu:hu.apply(null,arguments)},LG=e=>e&&typeof e.match=="function";function yn(e,t){function n(...r){if(t){let o=t(...r);if(!o)throw new Error(process.env.NODE_ENV==="production"?je(0):"prepareAction did not return an object");return{type:e,payload:o.payload,..."meta"in o&&{meta:o.meta},..."error"in o&&{error:o.error}}}return{type:e,payload:r[0]}}return n.toString=()=>`${e}`,n.type=e,n.match=r=>qg(r)&&r.type===e,n}function FG(e){return typeof e=="function"&&"type"in e&&LG(e)}function VG(e){const t=e?`${e}`.split("/"):[],n=t[t.length-1]||"actionCreator";return`Detected an action creator with type "${e||"unknown"}" being dispatched.
169
+ Make sure you're calling the action creator before dispatching, i.e. \`dispatch(${n}())\` instead of \`dispatch(${n})\`. This is necessary even if the action has no payload.`}function zG(e={}){if(process.env.NODE_ENV==="production")return()=>n=>r=>n(r);const{isActionCreator:t=FG}=e;return()=>n=>r=>(t(r)&&console.warn(VG(r.type)),n(r))}function AA(e,t){let n=0;return{measureTime(r){const o=Date.now();try{return r()}finally{const i=Date.now();n+=i-o}},warnIfExceeded(){n>e&&console.warn(`${t} took ${n}ms, which is more than the warning threshold of ${e}ms.
170
+ If your state or actions are very large, you may want to disable the middleware as it might cause too much of a slowdown in development mode. See https://redux-toolkit.js.org/api/getDefaultMiddleware for instructions.
171
+ It is disabled in production builds, so you don't need to worry about that.`)}}}var RA=class Aa extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,Aa.prototype)}static get[Symbol.species](){return Aa}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new Aa(...t[0].concat(this)):new Aa(...t.concat(this))}};function Kx(e){return Hn(e)?PA(e,()=>{}):e}function vl(e,t,n){return e.has(t)?e.get(t):e.set(t,n(t)).get(t)}function BG(e){return typeof e!="object"||e==null||Object.isFrozen(e)}function HG(e,t,n){const r=IA(e,t,n);return{detectMutations(){return kA(e,t,r,n)}}}function IA(e,t=[],n,r="",o=new Set){const i={value:n};if(!e(n)&&!o.has(n)){o.add(n),i.children={};const a=t.length>0;for(const s in n){const l=r?r+"."+s:s;a&&t.some(c=>c instanceof RegExp?c.test(l):l===c)||(i.children[s]=IA(e,t,n[s],l))}}return i}function kA(e,t=[],n,r,o=!1,i=""){const a=n?n.value:void 0,s=a===r;if(o&&!s&&!Number.isNaN(r))return{wasMutated:!0,path:i};if(e(a)||e(r))return{wasMutated:!1};const l={};for(let c in n.children)l[c]=!0;for(let c in r)l[c]=!0;const u=t.length>0;for(let c in l){const f=i?i+"."+c:c;if(u&&t.some(m=>m instanceof RegExp?m.test(f):f===m))continue;const p=kA(e,t,n.children[c],r[c],s,f);if(p.wasMutated)return p}return{wasMutated:!1}}function GG(e={}){if(process.env.NODE_ENV==="production")return()=>t=>n=>t(n);{let t=function(s,l,u,c){return JSON.stringify(s,n(l,c),u)},n=function(s,l){let u=[],c=[];return l||(l=function(f,p){return u[0]===p?"[Circular ~]":"[Circular ~."+c.slice(0,u.indexOf(p)).join(".")+"]"}),function(f,p){if(u.length>0){var d=u.indexOf(this);~d?u.splice(d+1):u.push(this),~d?c.splice(d,1/0,f):c.push(f),~u.indexOf(p)&&(p=l.call(this,f,p))}else u.push(p);return s==null?p:s.call(this,f,p)}},{isImmutable:r=BG,ignoredPaths:o,warnAfter:i=32}=e;const a=HG.bind(null,r,o);return({getState:s})=>{let l=s(),u=a(l),c;return f=>p=>{const d=AA(i,"ImmutableStateInvariantMiddleware");d.measureTime(()=>{if(l=s(),c=u.detectMutations(),u=a(l),c.wasMutated)throw new Error(process.env.NODE_ENV==="production"?je(19):`A state mutation was detected between dispatches, in the path '${c.path||""}'. This may cause incorrect behavior. (https://redux.js.org/style-guide/style-guide#do-not-mutate-state)`)});const m=f(p);return d.measureTime(()=>{if(l=s(),c=u.detectMutations(),u=a(l),c.wasMutated)throw new Error(process.env.NODE_ENV==="production"?je(20):`A state mutation was detected inside a dispatch, in the path: ${c.path||""}. Take a look at the reducer(s) handling the action ${t(p)}. (https://redux.js.org/style-guide/style-guide#do-not-mutate-state)`)}),d.warnIfExceeded(),m}}}}function NA(e){const t=typeof e;return e==null||t==="string"||t==="boolean"||t==="number"||Array.isArray(e)||gs(e)}function _h(e,t="",n=NA,r,o=[],i){let a;if(!n(e))return{keyPath:t||"<root>",value:e};if(typeof e!="object"||e===null||i?.has(e))return!1;const s=r!=null?r(e):Object.entries(e),l=o.length>0;for(const[u,c]of s){const f=t?t+"."+u:u;if(!(l&&o.some(d=>d instanceof RegExp?d.test(f):f===d))){if(!n(c))return{keyPath:f,value:c};if(typeof c=="object"&&(a=_h(c,f,n,r,o,i),a))return a}}return i&&TA(e)&&i.add(e),!1}function TA(e){if(!Object.isFrozen(e))return!1;for(const t of Object.values(e))if(!(typeof t!="object"||t===null)&&!TA(t))return!1;return!0}function WG(e={}){if(process.env.NODE_ENV==="production")return()=>t=>n=>t(n);{const{isSerializable:t=NA,getEntries:n,ignoredActions:r=[],ignoredActionPaths:o=["meta.arg","meta.baseQueryMeta"],ignoredPaths:i=[],warnAfter:a=32,ignoreState:s=!1,ignoreActions:l=!1,disableCache:u=!1}=e,c=!u&&WeakSet?new WeakSet:void 0;return f=>p=>d=>{if(!qg(d))return p(d);const m=p(d),g=AA(a,"SerializableStateInvariantMiddleware");return!l&&!(r.length&&r.indexOf(d.type)!==-1)&&g.measureTime(()=>{const h=_h(d,"",t,n,o,c);if(h){const{keyPath:y,value:b}=h;console.error(`A non-serializable value was detected in an action, in the path: \`${y}\`. Value:`,b,`
172
+ Take a look at the logic that dispatched this action: `,d,`
173
+ (See https://redux.js.org/faq/actions#why-should-type-be-a-string-or-at-least-serializable-why-should-my-action-types-be-constants)`,`
174
+ (To allow non-serializable values see: https://redux-toolkit.js.org/usage/usage-guide#working-with-non-serializable-data)`)}}),s||(g.measureTime(()=>{const h=f.getState(),y=_h(h,"",t,n,i,c);if(y){const{keyPath:b,value:x}=y;console.error(`A non-serializable value was detected in the state, in the path: \`${b}\`. Value:`,x,`
175
+ Take a look at the reducer(s) handling this action type: ${d.type}.
176
+ (See https://redux.js.org/faq/organizing-state#can-i-put-functions-promises-or-other-non-serializable-items-in-my-store-state)`)}}),g.warnIfExceeded()),m}}}function yl(e){return typeof e=="boolean"}var UG=()=>function(t){const{thunk:n=!0,immutableCheck:r=!0,serializableCheck:o=!0,actionCreatorCheck:i=!0}=t??{};let a=new RA;if(n&&(yl(n)?a.push(DG):a.push(jG(n.extraArgument))),process.env.NODE_ENV!=="production"){if(r){let s={};yl(r)||(s=r),a.unshift(GG(s))}if(o){let s={};yl(o)||(s=o),a.push(WG(s))}if(i){let s={};yl(i)||(s=i),a.unshift(zG(s))}}return a},MA="RTK_autoBatch",Ye=()=>e=>({payload:e,meta:{[MA]:!0}}),Yx=e=>t=>{setTimeout(t,e)},DA=(e={type:"raf"})=>t=>(...n)=>{const r=t(...n);let o=!0,i=!1,a=!1;const s=new Set,l=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Yx(10):e.type==="callback"?e.queueNotification:Yx(e.timeout),u=()=>{a=!1,i&&(i=!1,s.forEach(c=>c()))};return Object.assign({},r,{subscribe(c){const f=()=>o&&c(),p=r.subscribe(f);return s.add(c),()=>{p(),s.delete(c)}},dispatch(c){try{return o=!c?.meta?.[MA],i=!o,i&&(a||(a=!0,l(u))),r.dispatch(c)}finally{o=!0}}})},qG=e=>function(n){const{autoBatch:r=!0}=n??{};let o=new RA(e);return r&&o.push(DA(typeof r=="object"?r:void 0)),o};function KG(e){const t=UG(),{reducer:n=void 0,middleware:r,devTools:o=!0,duplicateMiddlewareCheck:i=!0,preloadedState:a=void 0,enhancers:s=void 0}=e||{};let l;if(typeof n=="function")l=n;else if(gs(n))l=gA(n);else throw new Error(process.env.NODE_ENV==="production"?je(1):"`reducer` is a required argument, and must be a function or an object of functions that can be passed to combineReducers");if(process.env.NODE_ENV!=="production"&&r&&typeof r!="function")throw new Error(process.env.NODE_ENV==="production"?je(2):"`middleware` field must be a callback");let u;if(typeof r=="function"){if(u=r(t),process.env.NODE_ENV!=="production"&&!Array.isArray(u))throw new Error(process.env.NODE_ENV==="production"?je(3):"when using a middleware builder function, an array of middleware must be returned")}else u=t();if(process.env.NODE_ENV!=="production"&&u.some(g=>typeof g!="function"))throw new Error(process.env.NODE_ENV==="production"?je(4):"each middleware provided to configureStore must be a function");if(process.env.NODE_ENV!=="production"&&i){let g=new Set;u.forEach(h=>{if(g.has(h))throw new Error(process.env.NODE_ENV==="production"?je(42):"Duplicate middleware references found when creating the store. Ensure that each middleware is only included once.");g.add(h)})}let c=hu;o&&(c=$G({trace:process.env.NODE_ENV!=="production",...typeof o=="object"&&o}));const f=bG(...u),p=qG(f);if(process.env.NODE_ENV!=="production"&&s&&typeof s!="function")throw new Error(process.env.NODE_ENV==="production"?je(5):"`enhancers` field must be a callback");let d=typeof s=="function"?s(p):p();if(process.env.NODE_ENV!=="production"&&!Array.isArray(d))throw new Error(process.env.NODE_ENV==="production"?je(6):"`enhancers` callback must return an array");if(process.env.NODE_ENV!=="production"&&d.some(g=>typeof g!="function"))throw new Error(process.env.NODE_ENV==="production"?je(7):"each enhancer provided to configureStore must be a function");process.env.NODE_ENV!=="production"&&u.length&&!d.includes(f)&&console.error("middlewares were provided, but middleware enhancer was not included in final enhancers - make sure to call `getDefaultEnhancers`");const m=c(...d);return mA(l,a,m)}function jA(e){const t={},n=[];let r;const o={addCase(i,a){if(process.env.NODE_ENV!=="production"){if(n.length>0)throw new Error(process.env.NODE_ENV==="production"?je(26):"`builder.addCase` should only be called before calling `builder.addMatcher`");if(r)throw new Error(process.env.NODE_ENV==="production"?je(27):"`builder.addCase` should only be called before calling `builder.addDefaultCase`")}const s=typeof i=="string"?i:i.type;if(!s)throw new Error(process.env.NODE_ENV==="production"?je(28):"`builder.addCase` cannot be called with an empty action type");if(s in t)throw new Error(process.env.NODE_ENV==="production"?je(29):`\`builder.addCase\` cannot be called with two reducers for the same action type '${s}'`);return t[s]=a,o},addAsyncThunk(i,a){if(process.env.NODE_ENV!=="production"&&r)throw new Error(process.env.NODE_ENV==="production"?je(43):"`builder.addAsyncThunk` should only be called before calling `builder.addDefaultCase`");return a.pending&&(t[i.pending.type]=a.pending),a.rejected&&(t[i.rejected.type]=a.rejected),a.fulfilled&&(t[i.fulfilled.type]=a.fulfilled),a.settled&&n.push({matcher:i.settled,reducer:a.settled}),o},addMatcher(i,a){if(process.env.NODE_ENV!=="production"&&r)throw new Error(process.env.NODE_ENV==="production"?je(30):"`builder.addMatcher` should only be called before calling `builder.addDefaultCase`");return n.push({matcher:i,reducer:a}),o},addDefaultCase(i){if(process.env.NODE_ENV!=="production"&&r)throw new Error(process.env.NODE_ENV==="production"?je(31):"`builder.addDefaultCase` can only be called once");return r=i,o}};return e(o),[t,n,r]}function YG(e){return typeof e=="function"}function XG(e,t){if(process.env.NODE_ENV!=="production"&&typeof t=="object")throw new Error(process.env.NODE_ENV==="production"?je(8):"The object notation for `createReducer` has been removed. Please use the 'builder callback' notation instead: https://redux-toolkit.js.org/api/createReducer");let[n,r,o]=jA(t),i;if(YG(e))i=()=>Kx(e());else{const s=Kx(e);i=()=>s}function a(s=i(),l){let u=[n[l.type],...r.filter(({matcher:c})=>c(l)).map(({reducer:c})=>c)];return u.filter(c=>!!c).length===0&&(u=[o]),u.reduce((c,f)=>{if(f)if(Ar(c)){const d=f(c,l);return d===void 0?c:d}else{if(Hn(c))return PA(c,p=>f(p,l));{const p=f(c,l);if(p===void 0){if(c===null)return c;throw Error("A case reducer on a non-draftable value must not return undefined")}return p}}return c},s)}return a.getInitialState=i,a}var ZG="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",QG=(e=21)=>{let t="",n=e;for(;n--;)t+=ZG[Math.random()*64|0];return t},JG=Symbol.for("rtk-slice-createasyncthunk");function eW(e,t){return`${e}/${t}`}function tW({creators:e}={}){const t=e?.asyncThunk?.[JG];return function(r){const{name:o,reducerPath:i=o}=r;if(!o)throw new Error(process.env.NODE_ENV==="production"?je(11):"`name` is a required option for createSlice");typeof process<"u"&&process.env.NODE_ENV==="development"&&r.initialState===void 0&&console.error("You must provide an `initialState` value that is not `undefined`. You may have misspelled `initialState`");const a=(typeof r.reducers=="function"?r.reducers(rW()):r.reducers)||{},s=Object.keys(a),l={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},u={addCase(x,w){const S=typeof x=="string"?x:x.type;if(!S)throw new Error(process.env.NODE_ENV==="production"?je(12):"`context.addCase` cannot be called with an empty action type");if(S in l.sliceCaseReducersByType)throw new Error(process.env.NODE_ENV==="production"?je(13):"`context.addCase` cannot be called with two reducers for the same action type: "+S);return l.sliceCaseReducersByType[S]=w,u},addMatcher(x,w){return l.sliceMatchers.push({matcher:x,reducer:w}),u},exposeAction(x,w){return l.actionCreators[x]=w,u},exposeCaseReducer(x,w){return l.sliceCaseReducersByName[x]=w,u}};s.forEach(x=>{const w=a[x],S={reducerName:x,type:eW(o,x),createNotation:typeof r.reducers=="function"};iW(w)?sW(S,w,u,t):oW(S,w,u)});function c(){if(process.env.NODE_ENV!=="production"&&typeof r.extraReducers=="object")throw new Error(process.env.NODE_ENV==="production"?je(14):"The object notation for `createSlice.extraReducers` has been removed. Please use the 'builder callback' notation instead: https://redux-toolkit.js.org/api/createSlice");const[x={},w=[],S=void 0]=typeof r.extraReducers=="function"?jA(r.extraReducers):[r.extraReducers],E={...x,...l.sliceCaseReducersByType};return XG(r.initialState,O=>{for(let P in E)O.addCase(P,E[P]);for(let P of l.sliceMatchers)O.addMatcher(P.matcher,P.reducer);for(let P of w)O.addMatcher(P.matcher,P.reducer);S&&O.addDefaultCase(S)})}const f=x=>x,p=new Map,d=new WeakMap;let m;function g(x,w){return m||(m=c()),m(x,w)}function h(){return m||(m=c()),m.getInitialState()}function y(x,w=!1){function S(O){let P=O[x];if(typeof P>"u"){if(w)P=vl(d,S,h);else if(process.env.NODE_ENV!=="production")throw new Error(process.env.NODE_ENV==="production"?je(15):"selectSlice returned undefined for an uninjected slice reducer")}return P}function E(O=f){const P=vl(p,w,()=>new WeakMap);return vl(P,O,()=>{const N={};for(const[R,k]of Object.entries(r.selectors??{}))N[R]=nW(k,O,()=>vl(d,O,h),w);return N})}return{reducerPath:x,getSelectors:E,get selectors(){return E(S)},selectSlice:S}}const b={name:o,reducer:g,actions:l.actionCreators,caseReducers:l.sliceCaseReducersByName,getInitialState:h,...y(i),injectInto(x,{reducerPath:w,...S}={}){const E=w??i;return x.inject({reducerPath:E,reducer:g},S),{...b,...y(E,!0)}}};return b}}function nW(e,t,n,r){function o(i,...a){let s=t(i);if(typeof s>"u"){if(r)s=n();else if(process.env.NODE_ENV!=="production")throw new Error(process.env.NODE_ENV==="production"?je(16):"selectState returned undefined for an uninjected slice reducer")}return e(s,...a)}return o.unwrapped=e,o}var zt=tW();function rW(){function e(t,n){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...n}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...n){return t(...n)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,n){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:n}},asyncThunk:e}}function oW({type:e,reducerName:t,createNotation:n},r,o){let i,a;if("reducer"in r){if(n&&!aW(r))throw new Error(process.env.NODE_ENV==="production"?je(17):"Please use the `create.preparedReducer` notation for prepared action creators with the `create` notation.");i=r.reducer,a=r.prepare}else i=r;o.addCase(e,i).exposeCaseReducer(t,i).exposeAction(t,a?yn(e,a):yn(e))}function iW(e){return e._reducerDefinitionType==="asyncThunk"}function aW(e){return e._reducerDefinitionType==="reducerWithPrepare"}function sW({type:e,reducerName:t},n,r,o){if(!o)throw new Error(process.env.NODE_ENV==="production"?je(18):"Cannot use `create.asyncThunk` in the built-in `createSlice`. Use `buildCreateSlice({ creators: { asyncThunk: asyncThunkCreator } })` to create a customised version of `createSlice`.");const{payloadCreator:i,fulfilled:a,pending:s,rejected:l,settled:u,options:c}=n,f=o(e,i,c);r.exposeAction(t,f),a&&r.addCase(f.fulfilled,a),s&&r.addCase(f.pending,s),l&&r.addCase(f.rejected,l),u&&r.addMatcher(f.settled,u),r.exposeCaseReducer(t,{fulfilled:a||bl,pending:s||bl,rejected:l||bl,settled:u||bl})}function bl(){}var lW="task",$A="listener",LA="completed",Zg="cancelled",uW=`task-${Zg}`,cW=`task-${LA}`,Ah=`${$A}-${Zg}`,fW=`${$A}-${LA}`,Bc=class{constructor(e){this.code=e,this.message=`${lW} ${Zg} (reason: ${e})`}name="TaskAbortError";message},Qg=(e,t)=>{if(typeof e!="function")throw new TypeError(process.env.NODE_ENV==="production"?je(32):`${t} is not a function`)},wu=()=>{},FA=(e,t=wu)=>(e.catch(t),e),VA=(e,t)=>(e.addEventListener("abort",t,{once:!0}),()=>e.removeEventListener("abort",t)),Ho=e=>{if(e.aborted)throw new Bc(e.reason)};function zA(e,t){let n=wu;return new Promise((r,o)=>{const i=()=>o(new Bc(e.reason));if(e.aborted){i();return}n=VA(e,i),t.finally(()=>n()).then(r,o)}).finally(()=>{n=wu})}var dW=async(e,t)=>{try{return await Promise.resolve(),{status:"ok",value:await e()}}catch(n){return{status:n instanceof Bc?"cancelled":"rejected",error:n}}finally{t?.()}},Cu=e=>t=>FA(zA(e,t).then(n=>(Ho(e),n))),BA=e=>{const t=Cu(e);return n=>t(new Promise(r=>setTimeout(r,n)))},{assign:Mi}=Object,Xx={},ys="listenerMiddleware",pW=(e,t)=>{const n=r=>VA(e,()=>r.abort(e.reason));return(r,o)=>{Qg(r,"taskExecutor");const i=new AbortController;n(i);const a=dW(async()=>{Ho(e),Ho(i.signal);const s=await r({pause:Cu(i.signal),delay:BA(i.signal),signal:i.signal});return Ho(i.signal),s},()=>i.abort(cW));return o?.autoJoin&&t.push(a.catch(wu)),{result:Cu(e)(a),cancel(){i.abort(uW)}}}},hW=(e,t)=>{const n=async(r,o)=>{Ho(t);let i=()=>{};const s=[new Promise((l,u)=>{let c=e({predicate:r,effect:(f,p)=>{p.unsubscribe(),l([f,p.getState(),p.getOriginalState()])}});i=()=>{c(),u()}})];o!=null&&s.push(new Promise(l=>setTimeout(l,o,null)));try{const l=await zA(t,Promise.race(s));return Ho(t),l}finally{i()}};return(r,o)=>FA(n(r,o))},HA=e=>{let{type:t,actionCreator:n,matcher:r,predicate:o,effect:i}=e;if(t)o=yn(t).match;else if(n)t=n.type,o=n.match;else if(r)o=r;else if(!o)throw new Error(process.env.NODE_ENV==="production"?je(21):"Creating or removing a listener requires one of the known fields for matching an action");return Qg(i,"options.listener"),{predicate:o,type:t,effect:i}},GA=Mi(e=>{const{type:t,predicate:n,effect:r}=HA(e);return{id:QG(),effect:r,type:t,predicate:n,pending:new Set,unsubscribe:()=>{throw new Error(process.env.NODE_ENV==="production"?je(22):"Unsubscribe not initialized")}}},{withTypes:()=>GA}),Zx=(e,t)=>{const{type:n,effect:r,predicate:o}=HA(t);return Array.from(e.values()).find(i=>(typeof n=="string"?i.type===n:i.predicate===o)&&i.effect===r)},Rh=e=>{e.pending.forEach(t=>{t.abort(Ah)})},mW=(e,t)=>()=>{for(const n of t.keys())Rh(n);e.clear()},Qx=(e,t,n)=>{try{e(t,n)}catch(r){setTimeout(()=>{throw r},0)}},WA=Mi(yn(`${ys}/add`),{withTypes:()=>WA}),gW=yn(`${ys}/removeAll`),UA=Mi(yn(`${ys}/remove`),{withTypes:()=>UA}),vW=(...e)=>{console.error(`${ys}/error`,...e)},bs=(e={})=>{const t=new Map,n=new Map,r=d=>{const m=n.get(d)??0;n.set(d,m+1)},o=d=>{const m=n.get(d)??1;m===1?n.delete(d):n.set(d,m-1)},{extra:i,onError:a=vW}=e;Qg(a,"onError");const s=d=>(d.unsubscribe=()=>t.delete(d.id),t.set(d.id,d),m=>{d.unsubscribe(),m?.cancelActive&&Rh(d)}),l=d=>{const m=Zx(t,d)??GA(d);return s(m)};Mi(l,{withTypes:()=>l});const u=d=>{const m=Zx(t,d);return m&&(m.unsubscribe(),d.cancelActive&&Rh(m)),!!m};Mi(u,{withTypes:()=>u});const c=async(d,m,g,h)=>{const y=new AbortController,b=hW(l,y.signal),x=[];try{d.pending.add(y),r(d),await Promise.resolve(d.effect(m,Mi({},g,{getOriginalState:h,condition:(w,S)=>b(w,S).then(Boolean),take:b,delay:BA(y.signal),pause:Cu(y.signal),extra:i,signal:y.signal,fork:pW(y.signal,x),unsubscribe:d.unsubscribe,subscribe:()=>{t.set(d.id,d)},cancelActiveListeners:()=>{d.pending.forEach((w,S,E)=>{w!==y&&(w.abort(Ah),E.delete(w))})},cancel:()=>{y.abort(Ah),d.pending.delete(y)},throwIfCancelled:()=>{Ho(y.signal)}})))}catch(w){w instanceof Bc||Qx(a,w,{raisedBy:"effect"})}finally{await Promise.all(x),y.abort(fW),o(d),d.pending.delete(y)}},f=mW(t,n);return{middleware:d=>m=>g=>{if(!qg(g))return m(g);if(WA.match(g))return l(g.payload);if(gW.match(g)){f();return}if(UA.match(g))return u(g.payload);let h=d.getState();const y=()=>{if(h===Xx)throw new Error(process.env.NODE_ENV==="production"?je(23):`${ys}: getOriginalState can only be called synchronously`);return h};let b;try{if(b=m(g),t.size>0){const x=d.getState(),w=Array.from(t.values());for(const S of w){let E=!1;try{E=S.predicate(g,x,h)}catch(O){E=!1,Qx(a,O,{raisedBy:"predicate"})}E&&c(S,g,d,y)}}}finally{h=Xx}return b},startListening:l,stopListening:u,clearListeners:f}};function je(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var yW={layoutType:"horizontal",width:0,height:0,margin:{top:5,right:5,bottom:5,left:5},scale:1},qA=zt({name:"chartLayout",initialState:yW,reducers:{setLayout(e,t){e.layoutType=t.payload},setChartSize(e,t){e.width=t.payload.width,e.height=t.payload.height},setMargin(e,t){var n,r,o,i;e.margin.top=(n=t.payload.top)!==null&&n!==void 0?n:0,e.margin.right=(r=t.payload.right)!==null&&r!==void 0?r:0,e.margin.bottom=(o=t.payload.bottom)!==null&&o!==void 0?o:0,e.margin.left=(i=t.payload.left)!==null&&i!==void 0?i:0},setScale(e,t){e.scale=t.payload}}}),{setMargin:bW,setLayout:xW,setChartSize:wW,setScale:CW}=qA.actions,SW=qA.reducer;function KA(e,t,n){return Array.isArray(e)&&e&&t+n!==0?e.slice(t,n+1):e}function Ne(e){return Number.isFinite(e)}function lr(e){return typeof e=="number"&&e>0&&Number.isFinite(e)}function Jx(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function _i(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Jx(Object(n),!0).forEach(function(r){EW(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Jx(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function EW(e,t,n){return(t=OW(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function OW(e){var t=PW(e,"string");return typeof t=="symbol"?t:t+""}function PW(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Mt(e,t,n){return yt(e)||yt(t)?n:sr(t)?Vi(e,t,n):typeof t=="function"?t(e):n}var _W=(e,t,n)=>{if(t&&n){var{width:r,height:o}=n,{align:i,verticalAlign:a,layout:s}=t;if((s==="vertical"||s==="horizontal"&&a==="middle")&&i!=="center"&&ce(e[i]))return _i(_i({},e),{},{[i]:e[i]+(r||0)});if((s==="horizontal"||s==="vertical"&&i==="center")&&a!=="middle"&&ce(e[a]))return _i(_i({},e),{},{[a]:e[a]+(o||0)})}return e},wo=(e,t)=>e==="horizontal"&&t==="xAxis"||e==="vertical"&&t==="yAxis"||e==="centric"&&t==="angleAxis"||e==="radial"&&t==="radiusAxis",YA=(e,t,n,r)=>{if(r)return e.map(s=>s.coordinate);var o,i,a=e.map(s=>(s.coordinate===t&&(o=!0),s.coordinate===n&&(i=!0),s.coordinate));return o||a.push(t),i||a.push(n),a},XA=(e,t,n)=>{if(!e)return null;var{duplicateDomain:r,type:o,range:i,scale:a,realScaleType:s,isCategorical:l,categoricalDomain:u,tickCount:c,ticks:f,niceTicks:p,axisType:d}=e;if(!a)return null;var m=s==="scaleBand"&&a.bandwidth?a.bandwidth()/2:2,g=o==="category"&&a.bandwidth?a.bandwidth()/m:0;if(g=d==="angleAxis"&&i&&i.length>=2?on(i[0]-i[1])*2*g:g,f||p){var h=(f||p||[]).map((y,b)=>{var x=r?r.indexOf(y):y,w=a.map(x);return Ne(w)?{coordinate:w+g,value:y,offset:g,index:b}:null}).filter(an);return h}return l&&u?u.map((y,b)=>{var x=a.map(y);return Ne(x)?{coordinate:x+g,value:y,index:b,offset:g}:null}).filter(an):a.ticks&&c!=null?a.ticks(c).map((y,b)=>{var x=a.map(y);return Ne(x)?{coordinate:x+g,value:y,index:b,offset:g}:null}).filter(an):a.domain().map((y,b)=>{var x=a.map(y);return Ne(x)?{coordinate:x+g,value:r?r[y]:y,index:b,offset:g}:null}).filter(an)},AW=(e,t)=>{if(!t||t.length!==2||!ce(t[0])||!ce(t[1]))return e;var n=Math.min(t[0],t[1]),r=Math.max(t[0],t[1]),o=[e[0],e[1]];return(!ce(e[0])||e[0]<n)&&(o[0]=n),(!ce(e[1])||e[1]>r)&&(o[1]=r),o[0]>r&&(o[0]=r),o[1]<n&&(o[1]=n),o},RW=e=>{var t,n=e.length;if(!(n<=0)){var r=(t=e[0])===null||t===void 0?void 0:t.length;if(!(r==null||r<=0))for(var o=0;o<r;++o)for(var i=0,a=0,s=0;s<n;++s){var l=e[s],u=l?.[o];if(u!=null){var c=u[1],f=u[0],p=ar(c)?f:c;p>=0?(u[0]=i,i+=p,u[1]=i):(u[0]=a,a+=p,u[1]=a)}}}},IW=e=>{var t,n=e.length;if(!(n<=0)){var r=(t=e[0])===null||t===void 0?void 0:t.length;if(!(r==null||r<=0))for(var o=0;o<r;++o)for(var i=0,a=0;a<n;++a){var s=e[a],l=s?.[o];if(l!=null){var u=ar(l[1])?l[0]:l[1];u>=0?(l[0]=i,i+=u,l[1]=i):(l[0]=0,l[1]=0)}}}},kW={sign:RW,expand:iH,none:Zo,silhouette:aH,wiggle:sH,positive:IW},NW=(e,t,n)=>{var r,o=(r=kW[n])!==null&&r!==void 0?r:Zo,i=oH().keys(t).value((s,l)=>Number(Mt(s,l,0))).order(vh).offset(o),a=i(e);return a.forEach((s,l)=>{s.forEach((u,c)=>{var f=Mt(e[c],t[l],0);Array.isArray(f)&&f.length===2&&ce(f[0])&&ce(f[1])&&(u[0]=f[0],u[1]=f[1])})}),a};function TW(e){return e==null?void 0:String(e)}var e0=e=>{var{axis:t,ticks:n,offset:r,bandSize:o,entry:i,index:a}=e;if(t.type==="category")return n[a]?n[a].coordinate+r:null;var s=Mt(i,t.dataKey,t.scale.domain()[a]);if(yt(s))return null;var l=t.scale.map(s);return ce(l)?l-o/2+r:null},MW=e=>{var{numericAxis:t}=e,n=t.scale.domain();if(t.type==="number"){var r=Math.min(n[0],n[1]),o=Math.max(n[0],n[1]);return r<=0&&o>=0?0:o<0?o:r}return n[0]},DW=e=>{var t=e.flat(2).filter(ce);return[Math.min(...t),Math.max(...t)]},jW=e=>[e[0]===1/0?0:e[0],e[1]===-1/0?0:e[1]],$W=(e,t,n)=>{if(e!=null)return jW(Object.keys(e).reduce((r,o)=>{var i=e[o];if(!i)return r;var{stackedData:a}=i,s=a.reduce((l,u)=>{var c=KA(u,t,n),f=DW(c);return!Ne(f[0])||!Ne(f[1])?l:[Math.min(l[0],f[0]),Math.max(l[1],f[1])]},[1/0,-1/0]);return[Math.min(s[0],r[0]),Math.max(s[1],r[1])]},[1/0,-1/0]))},t0=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,n0=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Su=(e,t,n)=>{if(e&&e.scale&&e.scale.bandwidth){var r=e.scale.bandwidth();if(!n||r>0)return r}if(e&&t&&t.length>=2){for(var o=Mc(t,c=>c.coordinate),i=1/0,a=1,s=o.length;a<s;a++){var l=o[a],u=o[a-1];i=Math.min((l?.coordinate||0)-(u?.coordinate||0),i)}return i===1/0?0:i}return n?void 0:0};function r0(e){var{tooltipEntrySettings:t,dataKey:n,payload:r,value:o,name:i}=e;return _i(_i({},t),{},{dataKey:n,payload:r,value:o,name:i})}function ZA(e,t){if(e)return String(e);if(typeof t=="string")return t}var LW=(e,t)=>{if(t==="horizontal")return e.relativeX;if(t==="vertical")return e.relativeY},FW=(e,t)=>t==="centric"?e.angle:e.radius,Dr=e=>e.layout.width,jr=e=>e.layout.height,VW=e=>e.layout.scale,QA=e=>e.layout.margin,Hc=j(e=>e.cartesianAxis.xAxis,e=>Object.values(e)),Gc=j(e=>e.cartesianAxis.yAxis,e=>Object.values(e)),zW="data-recharts-item-index",BW="data-recharts-item-id",xs=60;function o0(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function xl(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?o0(Object(n),!0).forEach(function(r){HW(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o0(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function HW(e,t,n){return(t=GW(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function GW(e){var t=WW(e,"string");return typeof t=="symbol"?t:t+""}function WW(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var UW=e=>e.brush.height;function qW(e){var t=Gc(e);return t.reduce((n,r)=>{if(r.orientation==="left"&&!r.mirror&&!r.hide){var o=typeof r.width=="number"?r.width:xs;return n+o}return n},0)}function KW(e){var t=Gc(e);return t.reduce((n,r)=>{if(r.orientation==="right"&&!r.mirror&&!r.hide){var o=typeof r.width=="number"?r.width:xs;return n+o}return n},0)}function YW(e){var t=Hc(e);return t.reduce((n,r)=>r.orientation==="top"&&!r.mirror&&!r.hide?n+r.height:n,0)}function XW(e){var t=Hc(e);return t.reduce((n,r)=>r.orientation==="bottom"&&!r.mirror&&!r.hide?n+r.height:n,0)}var Ot=j([Dr,jr,QA,UW,qW,KW,YW,XW,hA,lG],(e,t,n,r,o,i,a,s,l,u)=>{var c={left:(n.left||0)+o,right:(n.right||0)+i},f={top:(n.top||0)+a,bottom:(n.bottom||0)+s},p=xl(xl({},f),c),d=p.bottom;p.bottom+=r,p=_W(p,l,u);var m=e-p.left-p.right,g=t-p.top-p.bottom;return xl(xl({brushBottom:d},p),{},{width:Math.max(m,0),height:Math.max(g,0)})}),ZW=j(Ot,e=>({x:e.left,y:e.top,width:e.width,height:e.height})),Jg=j(Dr,jr,(e,t)=>({x:0,y:0,width:e,height:t})),QW=A.createContext(null),ln=()=>A.useContext(QW)!=null,Wc=e=>e.brush,Uc=j([Wc,Ot,QA],(e,t,n)=>({height:e.height,x:ce(e.x)?e.x:t.left,y:ce(e.y)?e.y:t.top+t.height+t.brushBottom-(n?.bottom||0),width:ce(e.width)?e.width:t.width})),rp={},op={},ip={},i0;function JW(){return i0||(i0=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n,r,{signal:o,edges:i}={}){let a,s=null;const l=i!=null&&i.includes("leading"),u=i==null||i.includes("trailing"),c=()=>{s!==null&&(n.apply(a,s),a=void 0,s=null)},f=()=>{u&&c(),g()};let p=null;const d=()=>{p!=null&&clearTimeout(p),p=setTimeout(()=>{p=null,f()},r)},m=()=>{p!==null&&(clearTimeout(p),p=null)},g=()=>{m(),a=void 0,s=null},h=()=>{c()},y=function(...b){if(o?.aborted)return;a=this,s=b;const x=p==null;d(),l&&x&&c()};return y.schedule=d,y.cancel=g,y.flush=h,o?.addEventListener("abort",g,{once:!0}),y}e.debounce=t})(ip)),ip}var a0;function eU(){return a0||(a0=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=JW();function n(r,o=0,i={}){typeof i!="object"&&(i={});const{leading:a=!1,trailing:s=!0,maxWait:l}=i,u=Array(2);a&&(u[0]="leading"),s&&(u[1]="trailing");let c,f=null;const p=t.debounce(function(...g){c=r.apply(this,g),f=null},o,{edges:u}),d=function(...g){return l!=null&&(f===null&&(f=Date.now()),Date.now()-f>=l)?(c=r.apply(this,g),f=Date.now(),p.cancel(),p.schedule(),c):(p.apply(this,g),c)},m=()=>(p.flush(),c);return d.cancel=p.cancel,d.flush=m,d}e.debounce=n})(op)),op}var s0;function tU(){return s0||(s0=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=eU();function n(r,o=0,i={}){const{leading:a=!0,trailing:s=!0}=i;return t.debounce(r,o,{leading:a,maxWait:o,trailing:s})}e.throttle=n})(rp)),rp}var ap,l0;function nU(){return l0||(l0=1,ap=tU().throttle),ap}var rU=nU();const oU=si(rU);var Eu=function(t,n){for(var r=arguments.length,o=new Array(r>2?r-2:0),i=2;i<r;i++)o[i-2]=arguments[i];if(typeof console<"u"&&console.warn&&(n===void 0&&console.warn("LogUtils requires an error message argument"),!t))if(n===void 0)console.warn("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var a=0;console.warn(n.replace(/%s/g,()=>o[a++]))}},Jn={width:"100%",height:"100%",debounce:0,minWidth:0,initialDimension:{width:-1,height:-1}},JA=(e,t,n)=>{var{width:r=Jn.width,height:o=Jn.height,aspect:i,maxHeight:a}=n,s=Qo(r)?e:Number(r),l=Qo(o)?t:Number(o);return i&&i>0&&(s?l=s/i:l&&(s=l*i),a&&l!=null&&l>a&&(l=a)),{calculatedWidth:s,calculatedHeight:l}},iU={width:0,height:0,overflow:"visible"},aU={width:0,overflowX:"visible"},sU={height:0,overflowY:"visible"},lU={},uU=e=>{var{width:t,height:n}=e,r=Qo(t),o=Qo(n);return r&&o?iU:r?aU:o?sU:lU};function cU(e){var{width:t,height:n,aspect:r}=e,o=t,i=n;return o===void 0&&i===void 0?(o=Jn.width,i=Jn.height):o===void 0?o=r&&r>0?void 0:Jn.width:i===void 0&&(i=r&&r>0?void 0:Jn.height),{width:o,height:i}}function Ih(){return Ih=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ih.apply(null,arguments)}function u0(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function c0(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?u0(Object(n),!0).forEach(function(r){fU(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u0(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function fU(e,t,n){return(t=dU(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function dU(e){var t=pU(e,"string");return typeof t=="symbol"?t:t+""}function pU(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var eR=A.createContext(Jn.initialDimension);function hU(e){return lr(e.width)&&lr(e.height)}function tR(e){var{children:t,width:n,height:r}=e,o=A.useMemo(()=>({width:n,height:r}),[n,r]);return hU(o)?v.createElement(eR.Provider,{value:o},t):null}var ev=()=>A.useContext(eR),mU=A.forwardRef((e,t)=>{var{aspect:n,initialDimension:r=Jn.initialDimension,width:o,height:i,minWidth:a=Jn.minWidth,minHeight:s,maxHeight:l,children:u,debounce:c=Jn.debounce,id:f,className:p,onResize:d,style:m={}}=e,g=A.useRef(null),h=A.useRef();h.current=d,A.useImperativeHandle(t,()=>g.current);var[y,b]=A.useState({containerWidth:r.width,containerHeight:r.height}),x=A.useCallback((P,N)=>{b(R=>{var k=Math.round(P),_=Math.round(N);return R.containerWidth===k&&R.containerHeight===_?R:{containerWidth:k,containerHeight:_}})},[]);A.useEffect(()=>{if(g.current==null||typeof ResizeObserver>"u")return li;var P=_=>{var T,F=_[0];if(F!=null){var{width:V,height:D}=F.contentRect;x(V,D),(T=h.current)===null||T===void 0||T.call(h,V,D)}};c>0&&(P=oU(P,c,{trailing:!0,leading:!1}));var N=new ResizeObserver(P),{width:R,height:k}=g.current.getBoundingClientRect();return x(R,k),N.observe(g.current),()=>{N.disconnect()}},[x,c]);var{containerWidth:w,containerHeight:S}=y;Eu(!n||n>0,"The aspect(%s) must be greater than zero.",n);var{calculatedWidth:E,calculatedHeight:O}=JA(w,S,{width:o,height:i,aspect:n,maxHeight:l});return Eu(E!=null&&E>0||O!=null&&O>0,`The width(%s) and height(%s) of chart should be greater than 0,
177
+ please check the style of container, or the props width(%s) and height(%s),
178
+ or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the
179
+ height and width.`,E,O,o,i,a,s,n),v.createElement("div",{id:f?"".concat(f):void 0,className:Ue("recharts-responsive-container",p),style:c0(c0({},m),{},{width:o,height:i,minWidth:a,minHeight:s,maxHeight:l}),ref:g},v.createElement("div",{style:uU({width:o,height:i})},v.createElement(tR,{width:E,height:O},u)))}),gU=A.forwardRef((e,t)=>{var n=ev();if(lr(n.width)&&lr(n.height))return e.children;var{width:r,height:o}=cU({width:e.width,height:e.height,aspect:e.aspect}),{calculatedWidth:i,calculatedHeight:a}=JA(void 0,void 0,{width:r,height:o,aspect:e.aspect,maxHeight:e.maxHeight});return ce(i)&&ce(a)?v.createElement(tR,{width:i,height:a},e.children):v.createElement(mU,Ih({},e,{width:r,height:o,ref:t}))});function tv(e){if(e)return{x:e.x,y:e.y,upperWidth:"upperWidth"in e?e.upperWidth:e.width,lowerWidth:"lowerWidth"in e?e.lowerWidth:e.width,width:e.width,height:e.height}}var qc=()=>{var e,t=ln(),n=me(ZW),r=me(Uc),o=(e=me(Wc))===null||e===void 0?void 0:e.padding;return!t||!r||!o?n:{width:r.width-o.left-o.right,height:r.height-o.top-o.bottom,x:o.left,y:o.top}},vU={top:0,bottom:0,left:0,right:0,width:0,height:0,brushBottom:0},nR=()=>{var e;return(e=me(Ot))!==null&&e!==void 0?e:vU},rR=()=>me(Dr),oR=()=>me(jr),qe=e=>e.layout.layoutType,Xi=()=>me(qe),iR=()=>{var e=Xi();if(e==="horizontal"||e==="vertical")return e},aR=e=>{var t=e.layout.layoutType;if(t==="centric"||t==="radial")return t},yU=()=>{var e=Xi();return e!==void 0},ws=e=>{var t=tt(),n=ln(),{width:r,height:o}=e,i=ev(),a=r,s=o;return i&&(a=i.width>0?i.width:r,s=i.height>0?i.height:o),A.useEffect(()=>{!n&&lr(a)&&lr(s)&&t(wW({width:a,height:s}))},[t,n,a,s]),null},sR=Symbol.for("immer-nothing"),f0=Symbol.for("immer-draftable"),bn=Symbol.for("immer-state"),bU=process.env.NODE_ENV!=="production"?[function(e){return`The plugin for '${e}' has not been loaded into Immer. To enable the plugin, import and call \`enable${e}()\` when initializing your application.`},function(e){return`produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '${e}'`},"This object has been frozen and should not be mutated",function(e){return"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? "+e},"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.","Immer forbids circular references","The first or second argument to `produce` must be a function","The third argument to `produce` must be a function or undefined","First argument to `createDraft` must be a plain object, an array, or an immerable object","First argument to `finishDraft` must be a draft returned by `createDraft`",function(e){return`'current' expects a draft, got: ${e}`},"Object.defineProperty() cannot be used on an Immer draft","Object.setPrototypeOf() cannot be used on an Immer draft","Immer only supports deleting array indices","Immer only supports setting array indices and the 'length' property",function(e){return`'original' expects a draft, got: ${e}`}]:[];function rn(e,...t){if(process.env.NODE_ENV!=="production"){const n=bU[e],r=typeof n=="function"?n.apply(null,t):n;throw new Error(`[Immer] ${r}`)}throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Ya=Object.getPrototypeOf;function Bi(e){return!!e&&!!e[bn]}function ei(e){return e?lR(e)||Array.isArray(e)||!!e[f0]||!!e.constructor?.[f0]||Cs(e)||Yc(e):!1}var xU=Object.prototype.constructor.toString(),d0=new WeakMap;function lR(e){if(!e||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);if(t===null||t===Object.prototype)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;if(n===Object)return!0;if(typeof n!="function")return!1;let r=d0.get(n);return r===void 0&&(r=Function.toString.call(n),d0.set(n,r)),r===xU}function Ou(e,t,n=!0){Kc(e)===0?(n?Reflect.ownKeys(e):Object.keys(e)).forEach(o=>{t(o,e[o],e)}):e.forEach((r,o)=>t(o,r,e))}function Kc(e){const t=e[bn];return t?t.type_:Array.isArray(e)?1:Cs(e)?2:Yc(e)?3:0}function kh(e,t){return Kc(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function uR(e,t,n){const r=Kc(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function wU(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function Cs(e){return e instanceof Map}function Yc(e){return e instanceof Set}function Do(e){return e.copy_||e.base_}function Nh(e,t){if(Cs(e))return new Map(e);if(Yc(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=lR(e);if(t===!0||t==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(e);delete r[bn];let o=Reflect.ownKeys(r);for(let i=0;i<o.length;i++){const a=o[i],s=r[a];s.writable===!1&&(s.writable=!0,s.configurable=!0),(s.get||s.set)&&(r[a]={configurable:!0,writable:!0,enumerable:s.enumerable,value:e[a]})}return Object.create(Ya(e),r)}else{const r=Ya(e);if(r!==null&&n)return{...e};const o=Object.create(r);return Object.assign(o,e)}}function nv(e,t=!1){return Xc(e)||Bi(e)||!ei(e)||(Kc(e)>1&&Object.defineProperties(e,{set:wl,add:wl,clear:wl,delete:wl}),Object.freeze(e),t&&Object.values(e).forEach(n=>nv(n,!0))),e}function CU(){rn(2)}var wl={value:CU};function Xc(e){return e===null||typeof e!="object"?!0:Object.isFrozen(e)}var SU={};function ti(e){const t=SU[e];return t||rn(0,e),t}var Xa;function cR(){return Xa}function EU(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function p0(e,t){t&&(ti("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Th(e){Mh(e),e.drafts_.forEach(OU),e.drafts_=null}function Mh(e){e===Xa&&(Xa=e.parent_)}function h0(e){return Xa=EU(Xa,e)}function OU(e){const t=e[bn];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function m0(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[bn].modified_&&(Th(t),rn(4)),ei(e)&&(e=Pu(t,e),t.parent_||_u(t,e)),t.patches_&&ti("Patches").generateReplacementPatches_(n[bn].base_,e,t.patches_,t.inversePatches_)):e=Pu(t,n,[]),Th(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==sR?e:void 0}function Pu(e,t,n){if(Xc(t))return t;const r=e.immer_.shouldUseStrictIteration(),o=t[bn];if(!o)return Ou(t,(i,a)=>g0(e,o,t,i,a,n),r),t;if(o.scope_!==e)return t;if(!o.modified_)return _u(e,o.base_,!0),o.base_;if(!o.finalized_){o.finalized_=!0,o.scope_.unfinalizedDrafts_--;const i=o.copy_;let a=i,s=!1;o.type_===3&&(a=new Set(i),i.clear(),s=!0),Ou(a,(l,u)=>g0(e,o,i,l,u,n,s),r),_u(e,i,!1),n&&e.patches_&&ti("Patches").generatePatches_(o,n,e.patches_,e.inversePatches_)}return o.copy_}function g0(e,t,n,r,o,i,a){if(o==null||typeof o!="object"&&!a)return;const s=Xc(o);if(!(s&&!a)){if(process.env.NODE_ENV!=="production"&&o===n&&rn(5),Bi(o)){const l=i&&t&&t.type_!==3&&!kh(t.assigned_,r)?i.concat(r):void 0,u=Pu(e,o,l);if(uR(n,r,u),Bi(u))e.canAutoFreeze_=!1;else return}else a&&n.add(o);if(ei(o)&&!s){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1||t&&t.base_&&t.base_[r]===o&&s)return;Pu(e,o),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&(Cs(n)?n.has(r):Object.prototype.propertyIsEnumerable.call(n,r))&&_u(e,o)}}}function _u(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&nv(t,n)}function PU(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:cR(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let o=r,i=rv;n&&(o=[r],i=Za);const{revoke:a,proxy:s}=Proxy.revocable(o,i);return r.draft_=s,r.revoke_=a,s}var rv={get(e,t){if(t===bn)return e;const n=Do(e);if(!kh(n,t))return _U(e,n,t);const r=n[t];return e.finalized_||!ei(r)?r:r===sp(e.base_,t)?(lp(e),e.copy_[t]=jh(r,e)):r},has(e,t){return t in Do(e)},ownKeys(e){return Reflect.ownKeys(Do(e))},set(e,t,n){const r=fR(Do(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const o=sp(Do(e),t),i=o?.[bn];if(i&&i.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(wU(n,o)&&(n!==void 0||kh(e.base_,t)))return!0;lp(e),Dh(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty(e,t){return sp(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,lp(e),Dh(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=Do(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){rn(11)},getPrototypeOf(e){return Ya(e.base_)},setPrototypeOf(){rn(12)}},Za={};Ou(rv,(e,t)=>{Za[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});Za.deleteProperty=function(e,t){return process.env.NODE_ENV!=="production"&&isNaN(parseInt(t))&&rn(13),Za.set.call(this,e,t,void 0)};Za.set=function(e,t,n){return process.env.NODE_ENV!=="production"&&t!=="length"&&isNaN(parseInt(t))&&rn(14),rv.set.call(this,e[0],t,n,e[0])};function sp(e,t){const n=e[bn];return(n?Do(n):e)[t]}function _U(e,t,n){const r=fR(t,n);return r?"value"in r?r.value:r.get?.call(e.draft_):void 0}function fR(e,t){if(!(t in e))return;let n=Ya(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Ya(n)}}function Dh(e){e.modified_||(e.modified_=!0,e.parent_&&Dh(e.parent_))}function lp(e){e.copy_||(e.copy_=Nh(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var AU=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!0,this.produce=(t,n,r)=>{if(typeof t=="function"&&typeof n!="function"){const i=n;n=t;const a=this;return function(l=i,...u){return a.produce(l,c=>n.call(this,c,...u))}}typeof n!="function"&&rn(6),r!==void 0&&typeof r!="function"&&rn(7);let o;if(ei(t)){const i=h0(this),a=jh(t,void 0);let s=!0;try{o=n(a),s=!1}finally{s?Th(i):Mh(i)}return p0(i,r),m0(o,i)}else if(!t||typeof t!="object"){if(o=n(t),o===void 0&&(o=t),o===sR&&(o=void 0),this.autoFreeze_&&nv(o,!0),r){const i=[],a=[];ti("Patches").generateReplacementPatches_(t,o,i,a),r(i,a)}return o}else rn(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(a,...s)=>this.produceWithPatches(a,l=>t(l,...s));let r,o;return[this.produce(t,n,(a,s)=>{r=a,o=s}),r,o]},typeof e?.autoFreeze=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof e?.useStrictShallowCopy=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),typeof e?.useStrictIteration=="boolean"&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){ei(e)||rn(8),Bi(e)&&(e=RU(e));const t=h0(this),n=jh(e,void 0);return n[bn].isManual_=!0,Mh(t),n}finishDraft(e,t){const n=e&&e[bn];(!n||!n.isManual_)&&rn(9);const{scope_:r}=n;return p0(r,t),m0(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const o=t[n];if(o.path.length===0&&o.op==="replace"){e=o.value;break}}n>-1&&(t=t.slice(n+1));const r=ti("Patches").applyPatches_;return Bi(e)?r(e,t):this.produce(e,o=>r(o,t))}};function jh(e,t){const n=Cs(e)?ti("MapSet").proxyMap_(e,t):Yc(e)?ti("MapSet").proxySet_(e,t):PU(e,t);return(t?t.scope_:cR()).drafts_.push(n),n}function RU(e){return Bi(e)||rn(10,e),dR(e)}function dR(e){if(!ei(e)||Xc(e))return e;const t=e[bn];let n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Nh(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=Nh(e,!0);return Ou(n,(o,i)=>{uR(n,o,dR(i))},r),t&&(t.finalized_=!1),n}var IU=new AU;IU.produce;var kU={settings:{layout:"horizontal",align:"center",verticalAlign:"middle",itemSorter:"value"},size:{width:0,height:0},payload:[]},pR=zt({name:"legend",initialState:kU,reducers:{setLegendSize(e,t){e.size.width=t.payload.width,e.size.height=t.payload.height},setLegendSettings(e,t){e.settings.align=t.payload.align,e.settings.layout=t.payload.layout,e.settings.verticalAlign=t.payload.verticalAlign,e.settings.itemSorter=t.payload.itemSorter},addLegendPayload:{reducer(e,t){e.payload.push(t.payload)},prepare:Ye()},replaceLegendPayload:{reducer(e,t){var{prev:n,next:r}=t.payload,o=An(e).payload.indexOf(n);o>-1&&(e.payload[o]=r)},prepare:Ye()},removeLegendPayload:{reducer(e,t){var n=An(e).payload.indexOf(t.payload);n>-1&&e.payload.splice(n,1)},prepare:Ye()}}}),{setLegendSize:Hte,setLegendSettings:Gte,addLegendPayload:NU,replaceLegendPayload:TU,removeLegendPayload:MU}=pR.actions,DU=pR.reducer,Cl={exports:{}},up={};var v0;function jU(){if(v0)return up;v0=1;var e=A;function t(l,u){return l===u&&(l!==0||1/l===1/u)||l!==l&&u!==u}var n=typeof Object.is=="function"?Object.is:t,r=e.useSyncExternalStore,o=e.useRef,i=e.useEffect,a=e.useMemo,s=e.useDebugValue;return up.useSyncExternalStoreWithSelector=function(l,u,c,f,p){var d=o(null);if(d.current===null){var m={hasValue:!1,value:null};d.current=m}else m=d.current;d=a(function(){function h(S){if(!y){if(y=!0,b=S,S=f(S),p!==void 0&&m.hasValue){var E=m.value;if(p(E,S))return x=E}return x=S}if(E=x,n(b,S))return E;var O=f(S);return p!==void 0&&p(E,O)?(b=S,E):(b=S,x=O)}var y=!1,b,x,w=c===void 0?null:c;return[function(){return h(u())},w===null?void 0:function(){return h(w())}]},[u,c,f,p]);var g=r(l,d[0],d[1]);return i(function(){m.hasValue=!0,m.value=g},[g]),s(g),g},up}var cp={};var y0;function $U(){return y0||(y0=1,process.env.NODE_ENV!=="production"&&(function(){function e(l,u){return l===u&&(l!==0||1/l===1/u)||l!==l&&u!==u}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var t=A,n=typeof Object.is=="function"?Object.is:e,r=t.useSyncExternalStore,o=t.useRef,i=t.useEffect,a=t.useMemo,s=t.useDebugValue;cp.useSyncExternalStoreWithSelector=function(l,u,c,f,p){var d=o(null);if(d.current===null){var m={hasValue:!1,value:null};d.current=m}else m=d.current;d=a(function(){function h(S){if(!y){if(y=!0,b=S,S=f(S),p!==void 0&&m.hasValue){var E=m.value;if(p(E,S))return x=E}return x=S}if(E=x,n(b,S))return E;var O=f(S);return p!==void 0&&p(E,O)?(b=S,E):(b=S,x=O)}var y=!1,b,x,w=c===void 0?null:c;return[function(){return h(u())},w===null?void 0:function(){return h(w())}]},[u,c,f,p]);var g=r(l,d[0],d[1]);return i(function(){m.hasValue=!0,m.value=g},[g]),s(g),g},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),cp}var b0;function LU(){return b0||(b0=1,process.env.NODE_ENV==="production"?Cl.exports=jU():Cl.exports=$U()),Cl.exports}LU();function FU(e){e()}function VU(){let e=null,t=null;return{clear(){e=null,t=null},notify(){FU(()=>{let n=e;for(;n;)n.callback(),n=n.next})},get(){const n=[];let r=e;for(;r;)n.push(r),r=r.next;return n},subscribe(n){let r=!0;const o=t={callback:n,next:null,prev:t};return o.prev?o.prev.next=o:e=o,function(){!r||e===null||(r=!1,o.next?o.next.prev=o.prev:t=o.prev,o.prev?o.prev.next=o.next:e=o.next)}}}}var x0={notify(){},get:()=>[]};function zU(e,t){let n,r=x0,o=0,i=!1;function a(g){c();const h=r.subscribe(g);let y=!1;return()=>{y||(y=!0,h(),f())}}function s(){r.notify()}function l(){m.onStateChange&&m.onStateChange()}function u(){return i}function c(){o++,n||(n=e.subscribe(l),r=VU())}function f(){o--,n&&o===0&&(n(),n=void 0,r.clear(),r=x0)}function p(){i||(i=!0,c())}function d(){i&&(i=!1,f())}const m={addNestedSub:a,notifyNestedSubs:s,handleChangeWrapper:l,isSubscribed:u,trySubscribe:p,tryUnsubscribe:d,getListeners:()=>r};return m}var BU=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",HU=BU(),GU=()=>typeof navigator<"u"&&navigator.product==="ReactNative",WU=GU(),UU=()=>HU||WU?v.useLayoutEffect:v.useEffect,qU=UU();function w0(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function KU(e,t){if(w0(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let o=0;o<n.length;o++)if(!Object.prototype.hasOwnProperty.call(t,n[o])||!w0(e[n[o]],t[n[o]]))return!1;return!0}var YU=Symbol.for("react-redux-context"),XU=typeof globalThis<"u"?globalThis:{};function ZU(){if(!v.createContext)return{};const e=XU[YU]??=new Map;let t=e.get(v.createContext);return t||(t=v.createContext(null),process.env.NODE_ENV!=="production"&&(t.displayName="ReactRedux"),e.set(v.createContext,t)),t}var QU=ZU();function JU(e){const{children:t,context:n,serverState:r,store:o}=e,i=v.useMemo(()=>{const l=zU(o),u={store:o,subscription:l,getServerState:r?()=>r:void 0};if(process.env.NODE_ENV==="production")return u;{const{identityFunctionCheck:c="once",stabilityCheck:f="once"}=e;return Object.assign(u,{stabilityCheck:f,identityFunctionCheck:c})}},[o,r]),a=v.useMemo(()=>o.getState(),[o]);qU(()=>{const{subscription:l}=i;return l.onStateChange=l.notifyNestedSubs,l.trySubscribe(),a!==o.getState()&&l.notifyNestedSubs(),()=>{l.tryUnsubscribe(),l.onStateChange=void 0}},[i,a]);const s=n||QU;return v.createElement(s.Provider,{value:i},t)}var eq=JU,tq=new Set(["axisLine","tickLine","activeBar","activeDot","activeLabel","activeShape","allowEscapeViewBox","background","cursor","dot","label","line","margin","padding","position","shape","style","tick","wrapperStyle","radius","throttledEvents"]);function nq(e,t){return e==null&&t==null?!0:typeof e=="number"&&typeof t=="number"?e===t||e!==e&&t!==t:e===t}function Zc(e,t){var n=new Set([...Object.keys(e),...Object.keys(t)]);for(var r of n)if(tq.has(r)){if(e[r]==null&&t[r]==null)continue;if(!KU(e[r],t[r]))return!1}else if(!nq(e[r],t[r]))return!1;return!0}function $h(){return $h=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},$h.apply(null,arguments)}function C0(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function ma(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?C0(Object(n),!0).forEach(function(r){rq(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):C0(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function rq(e,t,n){return(t=oq(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function oq(e){var t=iq(e,"string");return typeof t=="symbol"?t:t+""}function iq(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function aq(e){return Array.isArray(e)&&sr(e[0])&&sr(e[1])?e.join(" ~ "):e}var vi={separator:" : ",contentStyle:{margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},itemStyle:{display:"block",paddingTop:4,paddingBottom:4,color:"#000"},labelStyle:{},accessibilityLayer:!1};function sq(e,t){return t==null?e:Mc(e,t)}var lq=e=>{var{separator:t=vi.separator,contentStyle:n,itemStyle:r,labelStyle:o=vi.labelStyle,payload:i,formatter:a,itemSorter:s,wrapperClassName:l,labelClassName:u,label:c,labelFormatter:f,accessibilityLayer:p=vi.accessibilityLayer}=e,d=()=>{if(i&&i.length){var S={padding:0,margin:0},E=sq(i,s),O=E.map((P,N)=>{if(P.type==="none")return null;var R=P.formatter||a||aq,{value:k,name:_}=P,T=k,F=_;if(R){var V=R(k,_,P,N,i);if(Array.isArray(V))[T,F]=V;else if(V!=null)T=V;else return null}var D=ma(ma({},vi.itemStyle),{},{color:P.color||vi.itemStyle.color},r);return v.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(N),style:D},sr(F)?v.createElement("span",{className:"recharts-tooltip-item-name"},F):null,sr(F)?v.createElement("span",{className:"recharts-tooltip-item-separator"},t):null,v.createElement("span",{className:"recharts-tooltip-item-value"},T),v.createElement("span",{className:"recharts-tooltip-item-unit"},P.unit||""))});return v.createElement("ul",{className:"recharts-tooltip-item-list",style:S},O)}return null},m=ma(ma({},vi.contentStyle),n),g=ma({margin:0},o),h=!yt(c),y=h?c:"",b=Ue("recharts-default-tooltip",l),x=Ue("recharts-tooltip-label",u);h&&f&&i!==void 0&&i!==null&&(y=f(c,i));var w=p?{role:"status","aria-live":"assertive"}:{};return v.createElement("div",$h({className:b,style:m},w),v.createElement("p",{className:x,style:g},v.isValidElement(y)?y:"".concat(y)),d())},ga="recharts-tooltip-wrapper",uq={visibility:"hidden"};function cq(e){var{coordinate:t,translateX:n,translateY:r}=e;return Ue(ga,{["".concat(ga,"-right")]:ce(n)&&t&&ce(t.x)&&n>=t.x,["".concat(ga,"-left")]:ce(n)&&t&&ce(t.x)&&n<t.x,["".concat(ga,"-bottom")]:ce(r)&&t&&ce(t.y)&&r>=t.y,["".concat(ga,"-top")]:ce(r)&&t&&ce(t.y)&&r<t.y})}function S0(e){var{allowEscapeViewBox:t,coordinate:n,key:r,offset:o,position:i,reverseDirection:a,tooltipDimension:s,viewBox:l,viewBoxDimension:u}=e;if(i&&ce(i[r]))return i[r];var c=n[r]-s-(o>0?o:0),f=n[r]+o;if(t[r])return a[r]?c:f;var p=l[r];if(p==null)return 0;if(a[r]){var d=c,m=p;return d<m?Math.max(f,p):Math.max(c,p)}if(u==null)return 0;var g=f+s,h=p+u;return g>h?Math.max(c,p):Math.max(f,p)}function fq(e){var{translateX:t,translateY:n,useTranslate3d:r}=e;return{transform:r?"translate3d(".concat(t,"px, ").concat(n,"px, 0)"):"translate(".concat(t,"px, ").concat(n,"px)")}}function dq(e){var{allowEscapeViewBox:t,coordinate:n,offsetTop:r,offsetLeft:o,position:i,reverseDirection:a,tooltipBox:s,useTranslate3d:l,viewBox:u}=e,c,f,p;return s.height>0&&s.width>0&&n?(f=S0({allowEscapeViewBox:t,coordinate:n,key:"x",offset:o,position:i,reverseDirection:a,tooltipDimension:s.width,viewBox:u,viewBoxDimension:u.width}),p=S0({allowEscapeViewBox:t,coordinate:n,key:"y",offset:r,position:i,reverseDirection:a,tooltipDimension:s.height,viewBox:u,viewBoxDimension:u.height}),c=fq({translateX:f,translateY:p,useTranslate3d:l})):c=uq,{cssProperties:c,cssClasses:cq({translateX:f,translateY:p,coordinate:n})}}var pq=()=>!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout),Ss={isSsr:pq()};function hR(){var[e,t]=A.useState(()=>Ss.isSsr||!window.matchMedia?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches);return A.useEffect(()=>{if(window.matchMedia){var n=window.matchMedia("(prefers-reduced-motion: reduce)"),r=()=>{t(n.matches)};return n.addEventListener("change",r),()=>{n.removeEventListener("change",r)}}},[]),e}function E0(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function yi(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?E0(Object(n),!0).forEach(function(r){hq(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):E0(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function hq(e,t,n){return(t=mq(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function mq(e){var t=gq(e,"string");return typeof t=="symbol"?t:t+""}function gq(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function vq(e){if(!(e.prefersReducedMotion&&e.isAnimationActive==="auto")&&e.isAnimationActive&&e.active)return"transform ".concat(e.animationDuration,"ms ").concat(e.animationEasing)}function yq(e){var t,n,r,o,i,a,s=hR(),[l,u]=v.useState(()=>({dismissed:!1,dismissedAtCoordinate:{x:0,y:0}}));v.useEffect(()=>{var m=g=>{if(g.key==="Escape"){var h,y,b,x;u({dismissed:!0,dismissedAtCoordinate:{x:(h=(y=e.coordinate)===null||y===void 0?void 0:y.x)!==null&&h!==void 0?h:0,y:(b=(x=e.coordinate)===null||x===void 0?void 0:x.y)!==null&&b!==void 0?b:0}})}};return document.addEventListener("keydown",m),()=>{document.removeEventListener("keydown",m)}},[(t=e.coordinate)===null||t===void 0?void 0:t.x,(n=e.coordinate)===null||n===void 0?void 0:n.y]),l.dismissed&&(((r=(o=e.coordinate)===null||o===void 0?void 0:o.x)!==null&&r!==void 0?r:0)!==l.dismissedAtCoordinate.x||((i=(a=e.coordinate)===null||a===void 0?void 0:a.y)!==null&&i!==void 0?i:0)!==l.dismissedAtCoordinate.y)&&u(yi(yi({},l),{},{dismissed:!1}));var{cssClasses:c,cssProperties:f}=dq({allowEscapeViewBox:e.allowEscapeViewBox,coordinate:e.coordinate,offsetLeft:typeof e.offset=="number"?e.offset:e.offset.x,offsetTop:typeof e.offset=="number"?e.offset:e.offset.y,position:e.position,reverseDirection:e.reverseDirection,tooltipBox:{height:e.lastBoundingBox.height,width:e.lastBoundingBox.width},useTranslate3d:e.useTranslate3d,viewBox:e.viewBox}),p=e.hasPortalFromProps?{}:yi(yi({transition:vq({prefersReducedMotion:s,isAnimationActive:e.isAnimationActive,active:e.active,animationDuration:e.animationDuration,animationEasing:e.animationEasing})},f),{},{pointerEvents:"none",position:"absolute",top:0,left:0}),d=yi(yi({},p),{},{visibility:!l.dismissed&&e.active&&e.hasPayload?"visible":"hidden"},e.wrapperStyle);return v.createElement("div",{xmlns:"http://www.w3.org/1999/xhtml",tabIndex:-1,className:c,style:d,ref:e.innerRef},e.children)}var bq=v.memo(yq),mR=()=>{var e;return(e=me(t=>t.rootProps.accessibilityLayer))!==null&&e!==void 0?e:!0};function Lh(){return Lh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Lh.apply(null,arguments)}function O0(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function P0(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?O0(Object(n),!0).forEach(function(r){xq(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):O0(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function xq(e,t,n){return(t=wq(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function wq(e){var t=Cq(e,"string");return typeof t=="symbol"?t:t+""}function Cq(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var _0={curveBasisClosed:q5,curveBasisOpen:K5,curveBasis:U5,curveBumpX:N5,curveBumpY:T5,curveLinearClosed:Y5,curveLinear:Nc,curveMonotoneX:X5,curveMonotoneY:Z5,curveNatural:Q5,curveStep:J5,curveStepAfter:tH,curveStepBefore:eH},Au=e=>Ne(e.x)&&Ne(e.y),A0=e=>e.base!=null&&Au(e.base)&&Au(e),va=e=>e.x,ya=e=>e.y,Sq=(e,t)=>{if(typeof e=="function")return e;var n="curve".concat(ms(e));if((n==="curveMonotone"||n==="curveBump")&&t){var r=_0["".concat(n).concat(t==="vertical"?"Y":"X")];if(r)return r}return _0[n]||Nc},R0={connectNulls:!1,type:"linear"},Eq=e=>{var{type:t=R0.type,points:n=[],baseLine:r,layout:o,connectNulls:i=R0.connectNulls}=e,a=Sq(t,o),s=i?n.filter(Au):n;if(Array.isArray(r)){var l,u=n.map((m,g)=>P0(P0({},m),{},{base:r[g]}));o==="vertical"?l=hl().y(ya).x1(va).x0(m=>m.base.x):l=hl().x(va).y1(ya).y0(m=>m.base.y);var c=l.defined(A0).curve(a),f=i?u.filter(A0):u;return c(f)}var p;o==="vertical"&&ce(r)?p=hl().y(ya).x1(va).x0(r):ce(r)?p=hl().x(va).y1(ya).y0(r):p=z_().x(va).y(ya);var d=p.defined(Au).curve(a);return d(s)},gR=e=>{var{className:t,points:n,path:r,pathRef:o}=e,i=Xi();if((!n||!n.length)&&!r)return null;var a={type:e.type,points:e.points,baseLine:e.baseLine,layout:e.layout||i,connectNulls:e.connectNulls},s=n&&n.length?Eq(a):r;return v.createElement("path",Lh({},_r(e),OH(e),{className:Ue("recharts-curve",t),d:s===null?void 0:s,ref:o}))},Oq=["x","y","top","left","width","height","className"];function Fh(){return Fh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Fh.apply(null,arguments)}function I0(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Pq(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?I0(Object(n),!0).forEach(function(r){_q(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):I0(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function _q(e,t,n){return(t=Aq(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Aq(e){var t=Rq(e,"string");return typeof t=="symbol"?t:t+""}function Rq(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Iq(e,t){if(e==null)return{};var n,r,o=kq(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function kq(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var Nq=(e,t,n,r,o,i)=>"M".concat(e,",").concat(o,"v").concat(r,"M").concat(i,",").concat(t,"h").concat(n),Tq=e=>{var{x:t=0,y:n=0,top:r=0,left:o=0,width:i=0,height:a=0,className:s}=e,l=Iq(e,Oq),u=Pq({x:t,y:n,top:r,left:o,width:i,height:a},l);return!ce(t)||!ce(n)||!ce(i)||!ce(a)||!ce(r)||!ce(o)?null:v.createElement("path",Fh({},kn(u),{className:Ue("recharts-cross",s),d:Nq(t,n,i,a,r,o)}))};function Mq(e,t,n,r){var o=r/2;return{stroke:"none",fill:"#ccc",x:e==="horizontal"?t.x-o:n.left+.5,y:e==="horizontal"?n.top+.5:t.y-o,width:e==="horizontal"?r:n.width-1,height:e==="horizontal"?n.height-1:r}}function k0(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function N0(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?k0(Object(n),!0).forEach(function(r){Dq(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):k0(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Dq(e,t,n){return(t=jq(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function jq(e){var t=$q(e,"string");return typeof t=="symbol"?t:t+""}function $q(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Lq=e=>e.replace(/([A-Z])/g,t=>"-".concat(t.toLowerCase())),vR=(e,t,n)=>e.map(r=>"".concat(Lq(r)," ").concat(t,"ms ").concat(n)).join(","),Fq=(e,t)=>[Object.keys(e),Object.keys(t)].reduce((n,r)=>n.filter(o=>r.includes(o))),Qa=(e,t)=>Object.keys(t).reduce((n,r)=>N0(N0({},n),{},{[r]:e(r,t[r])}),{});function T0(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function gt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?T0(Object(n),!0).forEach(function(r){Vq(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):T0(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Vq(e,t,n){return(t=zq(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function zq(e){var t=Bq(e,"string");return typeof t=="symbol"?t:t+""}function Bq(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Ru=(e,t,n)=>e+(t-e)*n,Vh=e=>{var{from:t,to:n}=e;return t!==n},yR=(e,t,n)=>{var r=Qa((o,i)=>{if(Vh(i)){var[a,s]=e(i.from,i.to,i.velocity);return gt(gt({},i),{},{from:a,velocity:s})}return i},t);return n<1?Qa((o,i)=>Vh(i)&&r[o]!=null?gt(gt({},i),{},{velocity:Ru(i.velocity,r[o].velocity,n),from:Ru(i.from,r[o].from,n)}):i,t):yR(e,r,n-1)};function Hq(e,t,n,r,o,i){var a,s=r.reduce((p,d)=>gt(gt({},p),{},{[d]:{from:e[d],velocity:0,to:t[d]}}),{}),l=()=>Qa((p,d)=>d.from,s),u=()=>!Object.values(s).filter(Vh).length,c=null,f=p=>{a||(a=p);var d=p-a,m=d/n.dt;s=yR(n,s,m),o(gt(gt(gt({},e),t),l())),a=p,u()||(c=i.setTimeout(f))};return()=>(c=i.setTimeout(f),()=>{var p;(p=c)===null||p===void 0||p()})}function Gq(e,t,n,r,o,i,a){var s=null,l=o.reduce((f,p)=>{var d=e[p],m=t[p];return d==null||m==null?f:gt(gt({},f),{},{[p]:[d,m]})},{}),u,c=f=>{u||(u=f);var p=(f-u)/r,d=Qa((g,h)=>Ru(...h,n(p)),l);if(i(gt(gt(gt({},e),t),d)),p<1)s=a.setTimeout(c);else{var m=Qa((g,h)=>Ru(...h,n(1)),l);i(gt(gt(gt({},e),t),m))}};return()=>(s=a.setTimeout(c),()=>{var f;(f=s)===null||f===void 0||f()})}const Wq=(e,t,n,r,o,i)=>{var a=Fq(e,t);return n==null?()=>(o(gt(gt({},e),t)),()=>{}):n.isStepper===!0?Hq(e,t,n,a,o,i):Gq(e,t,n,r,a,o,i)};var Iu=1e-4,bR=(e,t)=>[0,3*e,3*t-6*e,3*e-3*t+1],xR=(e,t)=>e.map((n,r)=>n*t**r).reduce((n,r)=>n+r),M0=(e,t)=>n=>{var r=bR(e,t);return xR(r,n)},Uq=(e,t)=>n=>{var r=bR(e,t),o=[...r.map((i,a)=>i*a).slice(1),0];return xR(o,n)},qq=e=>{var t,n=e.split("(");if(n.length!==2||n[0]!=="cubic-bezier")return null;var r=(t=n[1])===null||t===void 0||(t=t.split(")")[0])===null||t===void 0?void 0:t.split(",");if(r==null||r.length!==4)return null;var o=r.map(i=>parseFloat(i));return[o[0],o[1],o[2],o[3]]},Kq=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];if(n.length===1)switch(n[0]){case"linear":return[0,0,1,1];case"ease":return[.25,.1,.25,1];case"ease-in":return[.42,0,1,1];case"ease-out":return[.42,0,.58,1];case"ease-in-out":return[0,0,.58,1];default:{var o=qq(n[0]);if(o)return o}}return n.length===4?n:[0,0,1,1]},Yq=(e,t,n,r)=>{var o=M0(e,n),i=M0(t,r),a=Uq(e,n),s=u=>u>1?1:u<0?0:u,l=u=>{for(var c=u>1?1:u,f=c,p=0;p<8;++p){var d=o(f)-c,m=a(f);if(Math.abs(d-c)<Iu||m<Iu)return i(f);f=s(f-d/m)}return i(f)};return l.isStepper=!1,l},D0=function(){return Yq(...Kq(...arguments))},Xq=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},{stiff:n=100,damping:r=8,dt:o=17}=t,i=(a,s,l)=>{var u=-(a-s)*n,c=l*r,f=l+(u-c)*o/1e3,p=l*o/1e3+a;return Math.abs(p-s)<Iu&&Math.abs(f)<Iu?[s,0]:[p,f]};return i.isStepper=!0,i.dt=o,i},Zq=e=>{if(typeof e=="string")switch(e){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return D0(e);case"spring":return Xq();default:if(e.split("(")[0]==="cubic-bezier")return D0(e)}return typeof e=="function"?e:null};function Qq(e){var t,n=()=>null,r=!1,o=null,i=a=>{if(!r){if(Array.isArray(a)){if(!a.length)return;var s=a,[l,...u]=s;if(typeof l=="number"){o=e.setTimeout(i.bind(null,u),l);return}i(l),o=e.setTimeout(i.bind(null,u));return}typeof a=="string"&&(t=a,n(t)),typeof a=="object"&&(t=a,n(t)),typeof a=="function"&&a()}};return{stop:()=>{r=!0},start:a=>{r=!1,o&&(o(),o=null),i(a)},subscribe:a=>(n=a,()=>{n=()=>null}),getTimeoutController:()=>e}}class Jq{setTimeout(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=performance.now(),o=null,i=a=>{a-r>=n?t(a):typeof requestAnimationFrame=="function"&&(o=requestAnimationFrame(i))};return o=requestAnimationFrame(i),()=>{o!=null&&cancelAnimationFrame(o)}}}function e4(){return Qq(new Jq)}var t4=A.createContext(e4);function n4(e,t){var n=A.useContext(t4);return A.useMemo(()=>t??n(e),[e,t,n])}var r4={begin:0,duration:1e3,easing:"ease",isActive:!0,canBegin:!0,onAnimationEnd:()=>{},onAnimationStart:()=>{}},j0={t:0},fp={t:1};function ov(e){var t=wn(e,r4),{isActive:n,canBegin:r,duration:o,easing:i,begin:a,onAnimationEnd:s,onAnimationStart:l,children:u}=t,c=hR(),f=n==="auto"?!Ss.isSsr&&!c:n,p=n4(t.animationId,t.animationManager),[d,m]=A.useState(f?j0:fp),g=A.useRef(null);return A.useEffect(()=>{f||m(fp)},[f]),A.useEffect(()=>{if(!f||!r)return li;var h=Wq(j0,fp,Zq(i),o,m,p.getTimeoutController()),y=()=>{g.current=h()};return p.start([l,a,y,o,s]),()=>{p.stop(),g.current&&g.current(),s()}},[f,r,o,i,a,l,s,p]),u(d.t)}function iv(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"animation-",n=A.useRef(Wa(t)),r=A.useRef(e);return r.current!==e&&(n.current=Wa(t),r.current=e),n.current}var o4=["radius"],i4=["radius"],$0,L0,F0,V0,z0,B0,H0,G0,W0,U0;function q0(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function K0(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?q0(Object(n),!0).forEach(function(r){a4(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):q0(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function a4(e,t,n){return(t=s4(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s4(e){var t=l4(e,"string");return typeof t=="symbol"?t:t+""}function l4(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ku(){return ku=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ku.apply(null,arguments)}function Y0(e,t){if(e==null)return{};var n,r,o=u4(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function u4(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Kn(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var X0=(e,t,n,r,o)=>{var i=oo(n),a=oo(r),s=Math.min(Math.abs(i)/2,Math.abs(a)/2),l=a>=0?1:-1,u=i>=0?1:-1,c=a>=0&&i>=0||a<0&&i<0?1:0,f;if(s>0&&Array.isArray(o)){for(var p=[0,0,0,0],d=0,m=4;d<m;d++){var g,h=(g=o[d])!==null&&g!==void 0?g:0;p[d]=h>s?s:h}f=it($0||($0=Kn(["M",",",""])),e,t+l*p[0]),p[0]>0&&(f+=it(L0||(L0=Kn(["A ",",",",0,0,",",",",",""])),p[0],p[0],c,e+u*p[0],t)),f+=it(F0||(F0=Kn(["L ",",",""])),e+n-u*p[1],t),p[1]>0&&(f+=it(V0||(V0=Kn(["A ",",",",0,0,",`,
180
+ `,",",""])),p[1],p[1],c,e+n,t+l*p[1])),f+=it(z0||(z0=Kn(["L ",",",""])),e+n,t+r-l*p[2]),p[2]>0&&(f+=it(B0||(B0=Kn(["A ",",",",0,0,",`,
181
+ `,",",""])),p[2],p[2],c,e+n-u*p[2],t+r)),f+=it(H0||(H0=Kn(["L ",",",""])),e+u*p[3],t+r),p[3]>0&&(f+=it(G0||(G0=Kn(["A ",",",",0,0,",`,
182
+ `,",",""])),p[3],p[3],c,e,t+r-l*p[3])),f+="Z"}else if(s>0&&o===+o&&o>0){var y=Math.min(s,o);f=it(W0||(W0=Kn(["M ",",",`
183
+ A `,",",",0,0,",",",",",`
184
+ L `,",",`
185
+ A `,",",",0,0,",",",",",`
186
+ L `,",",`
187
+ A `,",",",0,0,",",",",",`
188
+ L `,",",`
189
+ A `,",",",0,0,",",",","," Z"])),e,t+l*y,y,y,c,e+u*y,t,e+n-u*y,t,y,y,c,e+n,t+l*y,e+n,t+r-l*y,y,y,c,e+n-u*y,t+r,e+u*y,t+r,y,y,c,e,t+r-l*y)}else f=it(U0||(U0=Kn(["M ",","," h "," v "," h "," Z"])),e,t,n,r,-n);return f},Z0={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},wR=e=>{var t=wn(e,Z0),n=A.useRef(null),[r,o]=A.useState(-1);A.useEffect(()=>{if(n.current&&n.current.getTotalLength)try{var B=n.current.getTotalLength();B&&o(B)}catch{}},[]);var{x:i,y:a,width:s,height:l,radius:u,className:c}=t,{animationEasing:f,animationDuration:p,animationBegin:d,isAnimationActive:m,isUpdateAnimationActive:g}=t,h=A.useRef(s),y=A.useRef(l),b=A.useRef(i),x=A.useRef(a),w=A.useMemo(()=>({x:i,y:a,width:s,height:l,radius:u}),[i,a,s,l,u]),S=iv(w,"rectangle-");if(i!==+i||a!==+a||s!==+s||l!==+l||s===0||l===0)return null;var E=Ue("recharts-rectangle",c);if(!g){var O=kn(t),{radius:P}=O,N=Y0(O,o4);return v.createElement("path",ku({},N,{x:oo(i),y:oo(a),width:oo(s),height:oo(l),radius:typeof u=="number"?u:void 0,className:E,d:X0(i,a,s,l,u)}))}var R=h.current,k=y.current,_=b.current,T=x.current,F="0px ".concat(r===-1?1:r,"px"),V="".concat(r,"px ").concat(r,"px"),D=vR(["strokeDasharray"],p,typeof f=="string"?f:Z0.animationEasing);return v.createElement(ov,{animationId:S,key:S,canBegin:r>0,duration:p,easing:f,isActive:g,begin:d},B=>{var z=kt(R,s,B),Y=kt(k,l,B),$=kt(_,i,B),ye=kt(T,a,B);n.current&&(h.current=z,y.current=Y,b.current=$,x.current=ye);var ae;m?B>0?ae={transition:D,strokeDasharray:V}:ae={strokeDasharray:F}:ae={strokeDasharray:V};var be=kn(t),{radius:ne}=be,le=Y0(be,i4);return v.createElement("path",ku({},le,{radius:typeof u=="number"?u:void 0,className:E,d:X0($,ye,z,Y,u),ref:n,style:K0(K0({},ae),t.style)}))})};function Q0(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function J0(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Q0(Object(n),!0).forEach(function(r){c4(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Q0(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function c4(e,t,n){return(t=f4(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function f4(e){var t=d4(e,"string");return typeof t=="symbol"?t:t+""}function d4(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Nu=Math.PI/180,p4=e=>e*180/Math.PI,Nt=(e,t,n,r)=>({x:e+Math.cos(-Nu*r)*n,y:t+Math.sin(-Nu*r)*n}),h4=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{top:0,right:0,bottom:0,left:0};return Math.min(Math.abs(t-(r.left||0)-(r.right||0)),Math.abs(n-(r.top||0)-(r.bottom||0)))/2},m4=(e,t)=>{var{x:n,y:r}=e,{x:o,y:i}=t;return Math.sqrt((n-o)**2+(r-i)**2)},g4=(e,t)=>{var{x:n,y:r}=e,{cx:o,cy:i}=t,a=m4({x:n,y:r},{x:o,y:i});if(a<=0)return{radius:a,angle:0};var s=(n-o)/a,l=Math.acos(s);return r>i&&(l=2*Math.PI-l),{radius:a,angle:p4(l),angleInRadian:l}},v4=e=>{var{startAngle:t,endAngle:n}=e,r=Math.floor(t/360),o=Math.floor(n/360),i=Math.min(r,o);return{startAngle:t-i*360,endAngle:n-i*360}},y4=(e,t)=>{var{startAngle:n,endAngle:r}=t,o=Math.floor(n/360),i=Math.floor(r/360),a=Math.min(o,i);return e+a*360},b4=(e,t)=>{var{relativeX:n,relativeY:r}=e,{radius:o,angle:i}=g4({x:n,y:r},t),{innerRadius:a,outerRadius:s}=t;if(o<a||o>s||o===0)return null;var{startAngle:l,endAngle:u}=v4(t),c=i,f;if(l<=u){for(;c>u;)c-=360;for(;c<l;)c+=360;f=c>=l&&c<=u}else{for(;c>l;)c-=360;for(;c<u;)c+=360;f=c>=u&&c<=l}return f?J0(J0({},t),{},{radius:o,angle:y4(c,t)}):null};function CR(e){var{cx:t,cy:n,radius:r,startAngle:o,endAngle:i}=e,a=Nt(t,n,r,o),s=Nt(t,n,r,i);return{points:[a,s],cx:t,cy:n,radius:r,startAngle:o,endAngle:i}}var ew,tw,nw,rw,ow,iw,aw;function zh(){return zh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},zh.apply(null,arguments)}function Lo(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var x4=(e,t)=>{var n=on(t-e),r=Math.min(Math.abs(t-e),359.999);return n*r},Sl=e=>{var{cx:t,cy:n,radius:r,angle:o,sign:i,isExternal:a,cornerRadius:s,cornerIsExternal:l}=e,u=s*(a?1:-1)+r,c=Math.asin(s/u)/Nu,f=l?o:o+i*c,p=Nt(t,n,u,f),d=Nt(t,n,r,f),m=l?o-i*c:o,g=Nt(t,n,u*Math.cos(c*Nu),m);return{center:p,circleTangency:d,lineTangency:g,theta:c}},SR=e=>{var{cx:t,cy:n,innerRadius:r,outerRadius:o,startAngle:i,endAngle:a}=e,s=x4(i,a),l=i+s,u=Nt(t,n,o,i),c=Nt(t,n,o,l),f=it(ew||(ew=Lo(["M ",",",`
190
+ A `,",",`,0,
191
+ `,",",`,
192
+ `,",",`
193
+ `])),u.x,u.y,o,o,+(Math.abs(s)>180),+(i>l),c.x,c.y);if(r>0){var p=Nt(t,n,r,i),d=Nt(t,n,r,l);f+=it(tw||(tw=Lo(["L ",",",`
194
+ A `,",",`,0,
195
+ `,",",`,
196
+ `,","," Z"])),d.x,d.y,r,r,+(Math.abs(s)>180),+(i<=l),p.x,p.y)}else f+=it(nw||(nw=Lo(["L ",","," Z"])),t,n);return f},w4=e=>{var{cx:t,cy:n,innerRadius:r,outerRadius:o,cornerRadius:i,forceCornerRadius:a,cornerIsExternal:s,startAngle:l,endAngle:u}=e,c=on(u-l),{circleTangency:f,lineTangency:p,theta:d}=Sl({cx:t,cy:n,radius:o,angle:l,sign:c,cornerRadius:i,cornerIsExternal:s}),{circleTangency:m,lineTangency:g,theta:h}=Sl({cx:t,cy:n,radius:o,angle:u,sign:-c,cornerRadius:i,cornerIsExternal:s}),y=s?Math.abs(l-u):Math.abs(l-u)-d-h;if(y<0)return a?it(rw||(rw=Lo(["M ",",",`
197
+ a`,",",",0,0,1,",`,0
198
+ a`,",",",0,0,1,",`,0
199
+ `])),p.x,p.y,i,i,i*2,i,i,-i*2):SR({cx:t,cy:n,innerRadius:r,outerRadius:o,startAngle:l,endAngle:u});var b=it(ow||(ow=Lo(["M ",",",`
200
+ A`,",",",0,0,",",",",",`
201
+ A`,",",",0,",",",",",",",`
202
+ A`,",",",0,0,",",",",",`
203
+ `])),p.x,p.y,i,i,+(c<0),f.x,f.y,o,o,+(y>180),+(c<0),m.x,m.y,i,i,+(c<0),g.x,g.y);if(r>0){var{circleTangency:x,lineTangency:w,theta:S}=Sl({cx:t,cy:n,radius:r,angle:l,sign:c,isExternal:!0,cornerRadius:i,cornerIsExternal:s}),{circleTangency:E,lineTangency:O,theta:P}=Sl({cx:t,cy:n,radius:r,angle:u,sign:-c,isExternal:!0,cornerRadius:i,cornerIsExternal:s}),N=s?Math.abs(l-u):Math.abs(l-u)-S-P;if(N<0&&i===0)return"".concat(b,"L").concat(t,",").concat(n,"Z");b+=it(iw||(iw=Lo(["L",",",`
204
+ A`,",",",0,0,",",",",",`
205
+ A`,",",",0,",",",",",",",`
206
+ A`,",",",0,0,",",",",","Z"])),O.x,O.y,i,i,+(c<0),E.x,E.y,r,r,+(N>180),+(c>0),x.x,x.y,i,i,+(c<0),w.x,w.y)}else b+=it(aw||(aw=Lo(["L",",","Z"])),t,n);return b},C4={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},ER=e=>{var t=wn(e,C4),{cx:n,cy:r,innerRadius:o,outerRadius:i,cornerRadius:a,forceCornerRadius:s,cornerIsExternal:l,startAngle:u,endAngle:c,className:f}=t;if(i<o||u===c)return null;var p=Ue("recharts-sector",f),d=i-o,m=Bn(a,d,0,!0),g;return m>0&&Math.abs(u-c)<360?g=w4({cx:n,cy:r,innerRadius:o,outerRadius:i,cornerRadius:Math.min(m,d/2),forceCornerRadius:s,cornerIsExternal:l,startAngle:u,endAngle:c}):g=SR({cx:n,cy:r,innerRadius:o,outerRadius:i,startAngle:u,endAngle:c}),v.createElement("path",zh({},kn(t),{className:p,d:g}))};function S4(e,t,n){if(e==="horizontal")return[{x:t.x,y:n.top},{x:t.x,y:n.top+n.height}];if(e==="vertical")return[{x:n.left,y:t.y},{x:n.left+n.width,y:t.y}];if(nA(t)){if(e==="centric"){var{cx:r,cy:o,innerRadius:i,outerRadius:a,angle:s}=t,l=Nt(r,o,i,s),u=Nt(r,o,a,s);return[{x:l.x,y:l.y},{x:u.x,y:u.y}]}return CR(t)}}var dp={},pp={},hp={},sw;function E4(){return sw||(sw=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=dA();function n(r){return t.isSymbol(r)?NaN:Number(r)}e.toNumber=n})(hp)),hp}var lw;function O4(){return lw||(lw=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=E4();function n(r){return r?(r=t.toNumber(r),r===1/0||r===-1/0?(r<0?-1:1)*Number.MAX_VALUE:r===r?r:0):r===0?r:0}e.toFinite=n})(pp)),pp}var uw;function P4(){return uw||(uw=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=pA(),n=O4();function r(o,i,a){a&&typeof a!="number"&&t.isIterateeCall(o,i,a)&&(i=a=void 0),o=n.toFinite(o),i===void 0?(i=o,o=0):i=n.toFinite(i),a=a===void 0?o<i?1:-1:n.toFinite(a);const s=Math.max(Math.ceil((i-o)/(a||1)),0),l=new Array(s);for(let u=0;u<s;u++)l[u]=o,o+=a;return l}e.range=r})(dp)),dp}var mp,cw;function _4(){return cw||(cw=1,mp=P4().range),mp}var A4=_4();const OR=si(A4);var $r=e=>e.chartData,PR=j([$r],e=>{var t=e.chartData!=null?e.chartData.length-1:0;return{chartData:e.chartData,computedData:e.computedData,dataEndIndex:t,dataStartIndex:0}}),_R=(e,t,n,r)=>r?PR(e):$r(e),R4=(e,t,n)=>n?PR(e):$r(e);function nr(e){if(Array.isArray(e)&&e.length===2){var[t,n]=e;if(Ne(t)&&Ne(n))return!0}return!1}function fw(e,t,n){return n?e:[Math.min(e[0],t[0]),Math.max(e[1],t[1])]}function AR(e,t){if(t&&typeof e!="function"&&Array.isArray(e)&&e.length===2){var[n,r]=e,o,i;if(Ne(n))o=n;else if(typeof n=="function")return;if(Ne(r))i=r;else if(typeof r=="function")return;var a=[o,i];if(nr(a))return a}}function I4(e,t,n){if(!(!n&&t==null)){if(typeof e=="function"&&t!=null)try{var r=e(t,n);if(nr(r))return fw(r,t,n)}catch{}if(Array.isArray(e)&&e.length===2){var[o,i]=e,a,s;if(o==="auto")t!=null&&(a=Math.min(...t));else if(ce(o))a=o;else if(typeof o=="function")try{t!=null&&(a=o(t?.[0]))}catch{}else if(typeof o=="string"&&t0.test(o)){var l=t0.exec(o);if(l==null||l[1]==null||t==null)a=void 0;else{var u=+l[1];a=t[0]-u}}else a=t?.[0];if(i==="auto")t!=null&&(s=Math.max(...t));else if(ce(i))s=i;else if(typeof i=="function")try{t!=null&&(s=i(t?.[1]))}catch{}else if(typeof i=="string"&&n0.test(i)){var c=n0.exec(i);if(c==null||c[1]==null||t==null)s=void 0;else{var f=+c[1];s=t[1]+f}}else s=t?.[1];var p=[a,s];if(nr(p))return t==null?p:fw(p,t,n)}}}var Zi=1e9,k4={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},sv,Je=!0,Nn="[DecimalError] ",Go=Nn+"Invalid argument: ",av=Nn+"Exponent out of range: ",Qi=Math.floor,jo=Math.pow,N4=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,pn,Et=1e7,Xe=7,RR=9007199254740991,Tu=Qi(RR/Xe),ie={};ie.absoluteValue=ie.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};ie.comparedTo=ie.cmp=function(e){var t,n,r,o,i=this;if(e=new i.constructor(e),i.s!==e.s)return i.s||-e.s;if(i.e!==e.e)return i.e>e.e^i.s<0?1:-1;for(r=i.d.length,o=e.d.length,t=0,n=r<o?r:o;t<n;++t)if(i.d[t]!==e.d[t])return i.d[t]>e.d[t]^i.s<0?1:-1;return r===o?0:r>o^i.s<0?1:-1};ie.decimalPlaces=ie.dp=function(){var e=this,t=e.d.length-1,n=(t-e.e)*Xe;if(t=e.d[t],t)for(;t%10==0;t/=10)n--;return n<0?0:n};ie.dividedBy=ie.div=function(e){return Sr(this,new this.constructor(e))};ie.dividedToIntegerBy=ie.idiv=function(e){var t=this,n=t.constructor;return We(Sr(t,new n(e),0,1),n.precision)};ie.equals=ie.eq=function(e){return!this.cmp(e)};ie.exponent=function(){return ft(this)};ie.greaterThan=ie.gt=function(e){return this.cmp(e)>0};ie.greaterThanOrEqualTo=ie.gte=function(e){return this.cmp(e)>=0};ie.isInteger=ie.isint=function(){return this.e>this.d.length-2};ie.isNegative=ie.isneg=function(){return this.s<0};ie.isPositive=ie.ispos=function(){return this.s>0};ie.isZero=function(){return this.s===0};ie.lessThan=ie.lt=function(e){return this.cmp(e)<0};ie.lessThanOrEqualTo=ie.lte=function(e){return this.cmp(e)<1};ie.logarithm=ie.log=function(e){var t,n=this,r=n.constructor,o=r.precision,i=o+5;if(e===void 0)e=new r(10);else if(e=new r(e),e.s<1||e.eq(pn))throw Error(Nn+"NaN");if(n.s<1)throw Error(Nn+(n.s?"NaN":"-Infinity"));return n.eq(pn)?new r(0):(Je=!1,t=Sr(Ja(n,i),Ja(e,i),i),Je=!0,We(t,o))};ie.minus=ie.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?NR(t,e):IR(t,(e.s=-e.s,e))};ie.modulo=ie.mod=function(e){var t,n=this,r=n.constructor,o=r.precision;if(e=new r(e),!e.s)throw Error(Nn+"NaN");return n.s?(Je=!1,t=Sr(n,e,0,1).times(e),Je=!0,n.minus(t)):We(new r(n),o)};ie.naturalExponential=ie.exp=function(){return kR(this)};ie.naturalLogarithm=ie.ln=function(){return Ja(this)};ie.negated=ie.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};ie.plus=ie.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?IR(t,e):NR(t,(e.s=-e.s,e))};ie.precision=ie.sd=function(e){var t,n,r,o=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(Go+e);if(t=ft(o)+1,r=o.d.length-1,n=r*Xe+1,r=o.d[r],r){for(;r%10==0;r/=10)n--;for(r=o.d[0];r>=10;r/=10)n++}return e&&t>n?t:n};ie.squareRoot=ie.sqrt=function(){var e,t,n,r,o,i,a,s=this,l=s.constructor;if(s.s<1){if(!s.s)return new l(0);throw Error(Nn+"NaN")}for(e=ft(s),Je=!1,o=Math.sqrt(+s),o==0||o==1/0?(t=er(s.d),(t.length+e)%2==0&&(t+="0"),o=Math.sqrt(t),e=Qi((e+1)/2)-(e<0||e%2),o==1/0?t="5e"+e:(t=o.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),r=new l(t)):r=new l(o.toString()),n=l.precision,o=a=n+3;;)if(i=r,r=i.plus(Sr(s,i,a+2)).times(.5),er(i.d).slice(0,a)===(t=er(r.d)).slice(0,a)){if(t=t.slice(a-3,a+1),o==a&&t=="4999"){if(We(i,n+1,0),i.times(i).eq(s)){r=i;break}}else if(t!="9999")break;a+=4}return Je=!0,We(r,n)};ie.times=ie.mul=function(e){var t,n,r,o,i,a,s,l,u,c=this,f=c.constructor,p=c.d,d=(e=new f(e)).d;if(!c.s||!e.s)return new f(0);for(e.s*=c.s,n=c.e+e.e,l=p.length,u=d.length,l<u&&(i=p,p=d,d=i,a=l,l=u,u=a),i=[],a=l+u,r=a;r--;)i.push(0);for(r=u;--r>=0;){for(t=0,o=l+r;o>r;)s=i[o]+d[r]*p[o-r-1]+t,i[o--]=s%Et|0,t=s/Et|0;i[o]=(i[o]+t)%Et|0}for(;!i[--a];)i.pop();return t?++n:i.shift(),e.d=i,e.e=n,Je?We(e,f.precision):e};ie.toDecimalPlaces=ie.todp=function(e,t){var n=this,r=n.constructor;return n=new r(n),e===void 0?n:(ur(e,0,Zi),t===void 0?t=r.rounding:ur(t,0,8),We(n,e+ft(n)+1,t))};ie.toExponential=function(e,t){var n,r=this,o=r.constructor;return e===void 0?n=ni(r,!0):(ur(e,0,Zi),t===void 0?t=o.rounding:ur(t,0,8),r=We(new o(r),e+1,t),n=ni(r,!0,e+1)),n};ie.toFixed=function(e,t){var n,r,o=this,i=o.constructor;return e===void 0?ni(o):(ur(e,0,Zi),t===void 0?t=i.rounding:ur(t,0,8),r=We(new i(o),e+ft(o)+1,t),n=ni(r.abs(),!1,e+ft(r)+1),o.isneg()&&!o.isZero()?"-"+n:n)};ie.toInteger=ie.toint=function(){var e=this,t=e.constructor;return We(new t(e),ft(e)+1,t.rounding)};ie.toNumber=function(){return+this};ie.toPower=ie.pow=function(e){var t,n,r,o,i,a,s=this,l=s.constructor,u=12,c=+(e=new l(e));if(!e.s)return new l(pn);if(s=new l(s),!s.s){if(e.s<1)throw Error(Nn+"Infinity");return s}if(s.eq(pn))return s;if(r=l.precision,e.eq(pn))return We(s,r);if(t=e.e,n=e.d.length-1,a=t>=n,i=s.s,a){if((n=c<0?-c:c)<=RR){for(o=new l(pn),t=Math.ceil(r/Xe+4),Je=!1;n%2&&(o=o.times(s),pw(o.d,t)),n=Qi(n/2),n!==0;)s=s.times(s),pw(s.d,t);return Je=!0,e.s<0?new l(pn).div(o):We(o,r)}}else if(i<0)throw Error(Nn+"NaN");return i=i<0&&e.d[Math.max(t,n)]&1?-1:1,s.s=1,Je=!1,o=e.times(Ja(s,r+u)),Je=!0,o=kR(o),o.s=i,o};ie.toPrecision=function(e,t){var n,r,o=this,i=o.constructor;return e===void 0?(n=ft(o),r=ni(o,n<=i.toExpNeg||n>=i.toExpPos)):(ur(e,1,Zi),t===void 0?t=i.rounding:ur(t,0,8),o=We(new i(o),e,t),n=ft(o),r=ni(o,e<=n||n<=i.toExpNeg,e)),r};ie.toSignificantDigits=ie.tosd=function(e,t){var n=this,r=n.constructor;return e===void 0?(e=r.precision,t=r.rounding):(ur(e,1,Zi),t===void 0?t=r.rounding:ur(t,0,8)),We(new r(n),e,t)};ie.toString=ie.valueOf=ie.val=ie.toJSON=ie[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=ft(e),n=e.constructor;return ni(e,t<=n.toExpNeg||t>=n.toExpPos)};function IR(e,t){var n,r,o,i,a,s,l,u,c=e.constructor,f=c.precision;if(!e.s||!t.s)return t.s||(t=new c(e)),Je?We(t,f):t;if(l=e.d,u=t.d,a=e.e,o=t.e,l=l.slice(),i=a-o,i){for(i<0?(r=l,i=-i,s=u.length):(r=u,o=a,s=l.length),a=Math.ceil(f/Xe),s=a>s?a+1:s+1,i>s&&(i=s,r.length=1),r.reverse();i--;)r.push(0);r.reverse()}for(s=l.length,i=u.length,s-i<0&&(i=s,r=u,u=l,l=r),n=0;i;)n=(l[--i]=l[i]+u[i]+n)/Et|0,l[i]%=Et;for(n&&(l.unshift(n),++o),s=l.length;l[--s]==0;)l.pop();return t.d=l,t.e=o,Je?We(t,f):t}function ur(e,t,n){if(e!==~~e||e<t||e>n)throw Error(Go+e)}function er(e){var t,n,r,o=e.length-1,i="",a=e[0];if(o>0){for(i+=a,t=1;t<o;t++)r=e[t]+"",n=Xe-r.length,n&&(i+=Jr(n)),i+=r;a=e[t],r=a+"",n=Xe-r.length,n&&(i+=Jr(n))}else if(a===0)return"0";for(;a%10===0;)a/=10;return i+a}var Sr=(function(){function e(r,o){var i,a=0,s=r.length;for(r=r.slice();s--;)i=r[s]*o+a,r[s]=i%Et|0,a=i/Et|0;return a&&r.unshift(a),r}function t(r,o,i,a){var s,l;if(i!=a)l=i>a?1:-1;else for(s=l=0;s<i;s++)if(r[s]!=o[s]){l=r[s]>o[s]?1:-1;break}return l}function n(r,o,i){for(var a=0;i--;)r[i]-=a,a=r[i]<o[i]?1:0,r[i]=a*Et+r[i]-o[i];for(;!r[0]&&r.length>1;)r.shift()}return function(r,o,i,a){var s,l,u,c,f,p,d,m,g,h,y,b,x,w,S,E,O,P,N=r.constructor,R=r.s==o.s?1:-1,k=r.d,_=o.d;if(!r.s)return new N(r);if(!o.s)throw Error(Nn+"Division by zero");for(l=r.e-o.e,O=_.length,S=k.length,d=new N(R),m=d.d=[],u=0;_[u]==(k[u]||0);)++u;if(_[u]>(k[u]||0)&&--l,i==null?b=i=N.precision:a?b=i+(ft(r)-ft(o))+1:b=i,b<0)return new N(0);if(b=b/Xe+2|0,u=0,O==1)for(c=0,_=_[0],b++;(u<S||c)&&b--;u++)x=c*Et+(k[u]||0),m[u]=x/_|0,c=x%_|0;else{for(c=Et/(_[0]+1)|0,c>1&&(_=e(_,c),k=e(k,c),O=_.length,S=k.length),w=O,g=k.slice(0,O),h=g.length;h<O;)g[h++]=0;P=_.slice(),P.unshift(0),E=_[0],_[1]>=Et/2&&++E;do c=0,s=t(_,g,O,h),s<0?(y=g[0],O!=h&&(y=y*Et+(g[1]||0)),c=y/E|0,c>1?(c>=Et&&(c=Et-1),f=e(_,c),p=f.length,h=g.length,s=t(f,g,p,h),s==1&&(c--,n(f,O<p?P:_,p))):(c==0&&(s=c=1),f=_.slice()),p=f.length,p<h&&f.unshift(0),n(g,f,h),s==-1&&(h=g.length,s=t(_,g,O,h),s<1&&(c++,n(g,O<h?P:_,h))),h=g.length):s===0&&(c++,g=[0]),m[u++]=c,s&&g[0]?g[h++]=k[w]||0:(g=[k[w]],h=1);while((w++<S||g[0]!==void 0)&&b--)}return m[0]||m.shift(),d.e=l,We(d,a?i+ft(d)+1:i)}})();function kR(e,t){var n,r,o,i,a,s,l=0,u=0,c=e.constructor,f=c.precision;if(ft(e)>16)throw Error(av+ft(e));if(!e.s)return new c(pn);for(Je=!1,s=f,a=new c(.03125);e.abs().gte(.1);)e=e.times(a),u+=5;for(r=Math.log(jo(2,u))/Math.LN10*2+5|0,s+=r,n=o=i=new c(pn),c.precision=s;;){if(o=We(o.times(e),s),n=n.times(++l),a=i.plus(Sr(o,n,s)),er(a.d).slice(0,s)===er(i.d).slice(0,s)){for(;u--;)i=We(i.times(i),s);return c.precision=f,t==null?(Je=!0,We(i,f)):i}i=a}}function ft(e){for(var t=e.e*Xe,n=e.d[0];n>=10;n/=10)t++;return t}function gp(e,t,n){if(t>e.LN10.sd())throw Je=!0,n&&(e.precision=n),Error(Nn+"LN10 precision limit exceeded");return We(new e(e.LN10),t)}function Jr(e){for(var t="";e--;)t+="0";return t}function Ja(e,t){var n,r,o,i,a,s,l,u,c,f=1,p=10,d=e,m=d.d,g=d.constructor,h=g.precision;if(d.s<1)throw Error(Nn+(d.s?"NaN":"-Infinity"));if(d.eq(pn))return new g(0);if(t==null?(Je=!1,u=h):u=t,d.eq(10))return t==null&&(Je=!0),gp(g,u);if(u+=p,g.precision=u,n=er(m),r=n.charAt(0),i=ft(d),Math.abs(i)<15e14){for(;r<7&&r!=1||r==1&&n.charAt(1)>3;)d=d.times(e),n=er(d.d),r=n.charAt(0),f++;i=ft(d),r>1?(d=new g("0."+n),i++):d=new g(r+"."+n.slice(1))}else return l=gp(g,u+2,h).times(i+""),d=Ja(new g(r+"."+n.slice(1)),u-p).plus(l),g.precision=h,t==null?(Je=!0,We(d,h)):d;for(s=a=d=Sr(d.minus(pn),d.plus(pn),u),c=We(d.times(d),u),o=3;;){if(a=We(a.times(c),u),l=s.plus(Sr(a,new g(o),u)),er(l.d).slice(0,u)===er(s.d).slice(0,u))return s=s.times(2),i!==0&&(s=s.plus(gp(g,u+2,h).times(i+""))),s=Sr(s,new g(f),u),g.precision=h,t==null?(Je=!0,We(s,h)):s;s=l,o+=2}}function dw(e,t){var n,r,o;for((n=t.indexOf("."))>-1&&(t=t.replace(".","")),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;t.charCodeAt(r)===48;)++r;for(o=t.length;t.charCodeAt(o-1)===48;)--o;if(t=t.slice(r,o),t){if(o-=r,n=n-r-1,e.e=Qi(n/Xe),e.d=[],r=(n+1)%Xe,n<0&&(r+=Xe),r<o){for(r&&e.d.push(+t.slice(0,r)),o-=Xe;r<o;)e.d.push(+t.slice(r,r+=Xe));t=t.slice(r),r=Xe-t.length}else r-=o;for(;r--;)t+="0";if(e.d.push(+t),Je&&(e.e>Tu||e.e<-Tu))throw Error(av+n)}else e.s=0,e.e=0,e.d=[0];return e}function We(e,t,n){var r,o,i,a,s,l,u,c,f=e.d;for(a=1,i=f[0];i>=10;i/=10)a++;if(r=t-a,r<0)r+=Xe,o=t,u=f[c=0];else{if(c=Math.ceil((r+1)/Xe),i=f.length,c>=i)return e;for(u=i=f[c],a=1;i>=10;i/=10)a++;r%=Xe,o=r-Xe+a}if(n!==void 0&&(i=jo(10,a-o-1),s=u/i%10|0,l=t<0||f[c+1]!==void 0||u%i,l=n<4?(s||l)&&(n==0||n==(e.s<0?3:2)):s>5||s==5&&(n==4||l||n==6&&(r>0?o>0?u/jo(10,a-o):0:f[c-1])%10&1||n==(e.s<0?8:7))),t<1||!f[0])return l?(i=ft(e),f.length=1,t=t-i-1,f[0]=jo(10,(Xe-t%Xe)%Xe),e.e=Qi(-t/Xe)||0):(f.length=1,f[0]=e.e=e.s=0),e;if(r==0?(f.length=c,i=1,c--):(f.length=c+1,i=jo(10,Xe-r),f[c]=o>0?(u/jo(10,a-o)%jo(10,o)|0)*i:0),l)for(;;)if(c==0){(f[0]+=i)==Et&&(f[0]=1,++e.e);break}else{if(f[c]+=i,f[c]!=Et)break;f[c--]=0,i=1}for(r=f.length;f[--r]===0;)f.pop();if(Je&&(e.e>Tu||e.e<-Tu))throw Error(av+ft(e));return e}function NR(e,t){var n,r,o,i,a,s,l,u,c,f,p=e.constructor,d=p.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new p(e),Je?We(t,d):t;if(l=e.d,f=t.d,r=t.e,u=e.e,l=l.slice(),a=u-r,a){for(c=a<0,c?(n=l,a=-a,s=f.length):(n=f,r=u,s=l.length),o=Math.max(Math.ceil(d/Xe),s)+2,a>o&&(a=o,n.length=1),n.reverse(),o=a;o--;)n.push(0);n.reverse()}else{for(o=l.length,s=f.length,c=o<s,c&&(s=o),o=0;o<s;o++)if(l[o]!=f[o]){c=l[o]<f[o];break}a=0}for(c&&(n=l,l=f,f=n,t.s=-t.s),s=l.length,o=f.length-s;o>0;--o)l[s++]=0;for(o=f.length;o>a;){if(l[--o]<f[o]){for(i=o;i&&l[--i]===0;)l[i]=Et-1;--l[i],l[o]+=Et}l[o]-=f[o]}for(;l[--s]===0;)l.pop();for(;l[0]===0;l.shift())--r;return l[0]?(t.d=l,t.e=r,Je?We(t,d):t):new p(0)}function ni(e,t,n){var r,o=ft(e),i=er(e.d),a=i.length;return t?(n&&(r=n-a)>0?i=i.charAt(0)+"."+i.slice(1)+Jr(r):a>1&&(i=i.charAt(0)+"."+i.slice(1)),i=i+(o<0?"e":"e+")+o):o<0?(i="0."+Jr(-o-1)+i,n&&(r=n-a)>0&&(i+=Jr(r))):o>=a?(i+=Jr(o+1-a),n&&(r=n-o-1)>0&&(i=i+"."+Jr(r))):((r=o+1)<a&&(i=i.slice(0,r)+"."+i.slice(r)),n&&(r=n-a)>0&&(o+1===a&&(i+="."),i+=Jr(r))),e.s<0?"-"+i:i}function pw(e,t){if(e.length>t)return e.length=t,!0}function TR(e){var t,n,r;function o(i){var a=this;if(!(a instanceof o))return new o(i);if(a.constructor=o,i instanceof o){a.s=i.s,a.e=i.e,a.d=(i=i.d)?i.slice():i;return}if(typeof i=="number"){if(i*0!==0)throw Error(Go+i);if(i>0)a.s=1;else if(i<0)i=-i,a.s=-1;else{a.s=0,a.e=0,a.d=[0];return}if(i===~~i&&i<1e7){a.e=0,a.d=[i];return}return dw(a,i.toString())}else if(typeof i!="string")throw Error(Go+i);if(i.charCodeAt(0)===45?(i=i.slice(1),a.s=-1):a.s=1,N4.test(i))dw(a,i);else throw Error(Go+i)}if(o.prototype=ie,o.ROUND_UP=0,o.ROUND_DOWN=1,o.ROUND_CEIL=2,o.ROUND_FLOOR=3,o.ROUND_HALF_UP=4,o.ROUND_HALF_DOWN=5,o.ROUND_HALF_EVEN=6,o.ROUND_HALF_CEIL=7,o.ROUND_HALF_FLOOR=8,o.clone=TR,o.config=o.set=T4,e===void 0&&(e={}),e)for(r=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t<r.length;)e.hasOwnProperty(n=r[t++])||(e[n]=this[n]);return o.config(e),o}function T4(e){if(!e||typeof e!="object")throw Error(Nn+"Object expected");var t,n,r,o=["precision",1,Zi,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(t=0;t<o.length;t+=3)if((r=e[n=o[t]])!==void 0)if(Qi(r)===r&&r>=o[t+1]&&r<=o[t+2])this[n]=r;else throw Error(Go+n+": "+r);if((r=e[n="LN10"])!==void 0)if(r==Math.LN10)this[n]=new this(r);else throw Error(Go+n+": "+r);return this}var sv=TR(k4);pn=new sv(1);const ke=sv;function MR(e){var t;return e===0?t=1:t=Math.floor(new ke(e).abs().log(10).toNumber())+1,t}function DR(e,t,n){for(var r=new ke(e),o=0,i=[];r.lt(t)&&o<1e5;)i.push(r.toNumber()),r=r.add(n),o++;return i}var jR=e=>{var[t,n]=e,[r,o]=[t,n];return t>n&&([r,o]=[n,t]),[r,o]},lv=(e,t,n)=>{if(e.lte(0))return new ke(0);var r=MR(e.toNumber()),o=new ke(10).pow(r),i=e.div(o),a=r!==1?.05:.1,s=new ke(Math.ceil(i.div(a).toNumber())).add(n).mul(a),l=s.mul(o);return t?new ke(l.toNumber()):new ke(Math.ceil(l.toNumber()))},$R=(e,t,n)=>{var r;if(e.lte(0))return new ke(0);var o=[1,2,2.5,5],i=e.toNumber(),a=Math.floor(new ke(i).abs().log(10).toNumber()),s=new ke(10).pow(a),l=e.div(s).toNumber(),u=o.findIndex(d=>d>=l-1e-10);if(u===-1&&(s=s.mul(10),u=0),u+=n,u>=o.length){var c=Math.floor(u/o.length);u%=o.length,s=s.mul(new ke(10).pow(c))}var f=(r=o[u])!==null&&r!==void 0?r:1,p=new ke(f).mul(s);return t?p:new ke(Math.ceil(p.toNumber()))},M4=(e,t,n)=>{var r=new ke(1),o=new ke(e);if(!o.isint()&&n){var i=Math.abs(e);i<1?(r=new ke(10).pow(MR(e)-1),o=new ke(Math.floor(o.div(r).toNumber())).mul(r)):i>1&&(o=new ke(Math.floor(e)))}else e===0?o=new ke(Math.floor((t-1)/2)):n||(o=new ke(Math.floor(e)));for(var a=Math.floor((t-1)/2),s=[],l=0;l<t;l++)s.push(o.add(new ke(l-a).mul(r)).toNumber());return s},LR=function(t,n,r,o){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:lv;if(!Number.isFinite((n-t)/(r-1)))return{step:new ke(0),tickMin:new ke(0),tickMax:new ke(0)};var s=a(new ke(n).sub(t).div(r-1),o,i),l;t<=0&&n>=0?l=new ke(0):(l=new ke(t).add(n).div(2),l=l.sub(new ke(l).mod(s)));var u=Math.ceil(l.sub(t).div(s).toNumber()),c=Math.ceil(new ke(n).sub(l).div(s).toNumber()),f=u+c+1;return f>r?LR(t,n,r,o,i+1,a):(f<r&&(c=n>0?c+(r-f):c,u=n>0?u:u+(r-f)),{step:s,tickMin:l.sub(new ke(u).mul(s)),tickMax:l.add(new ke(c).mul(s))})},hw=function(t){var[n,r]=t,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"auto",s=Math.max(o,2),[l,u]=jR([n,r]);if(l===-1/0||u===1/0){var c=u===1/0?[l,...Array(o-1).fill(1/0)]:[...Array(o-1).fill(-1/0),u];return n>r?c.reverse():c}if(l===u)return M4(l,o,i);var f=a==="snap125"?$R:lv,{step:p,tickMin:d,tickMax:m}=LR(l,u,s,i,0,f),g=DR(d,m.add(new ke(.1).mul(p)),p);return n>r?g.reverse():g},mw=function(t,n){var[r,o]=t,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"auto",[s,l]=jR([r,o]);if(s===-1/0||l===1/0)return[r,o];if(s===l)return[s];var u=a==="snap125"?$R:lv,c=Math.max(n,2),f=u(new ke(l).sub(s).div(c-1),i,0),p=[...DR(new ke(s),new ke(l),f),l];return i===!1&&(p=p.map(d=>Math.round(d))),r>o?p.reverse():p},FR=e=>e.rootProps.maxBarSize,D4=e=>e.rootProps.barGap,VR=e=>e.rootProps.barCategoryGap,j4=e=>e.rootProps.barSize,Qc=e=>e.rootProps.stackOffset,zR=e=>e.rootProps.reverseStackOrder,uv=e=>e.options.chartName,cv=e=>e.rootProps.syncId,BR=e=>e.rootProps.syncMethod,fv=e=>e.options.eventEmitter,Wt={grid:-100,barBackground:-50,area:100,cursorRectangle:200,bar:300,line:400,axis:500,scatter:600,activeBar:1e3,cursorLine:1100,activeDot:1200,label:2e3},Io={allowDecimals:!1,allowDataOverflow:!1,angleAxisId:0,reversed:!1,scale:"auto",tick:!0,type:"auto"},Yn={allowDataOverflow:!1,allowDecimals:!1,allowDuplicatedCategory:!0,includeHidden:!1,radiusAxisId:0,reversed:!1,scale:"auto",tick:!0,tickCount:5,type:"auto"},Jc=(e,t)=>{if(!(!e||!t))return e!=null&&e.reversed?[t[1],t[0]]:t};function ef(e,t,n){if(n!=="auto")return n;if(e!=null)return wo(e,t)?"category":"number"}function gw(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Mu(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?gw(Object(n),!0).forEach(function(r){$4(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gw(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function $4(e,t,n){return(t=L4(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function L4(e){var t=F4(e,"string");return typeof t=="symbol"?t:t+""}function F4(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var vw={allowDataOverflow:Io.allowDataOverflow,allowDecimals:Io.allowDecimals,allowDuplicatedCategory:!1,dataKey:void 0,domain:void 0,id:Io.angleAxisId,includeHidden:!1,name:void 0,reversed:Io.reversed,scale:Io.scale,tick:Io.tick,tickCount:void 0,ticks:void 0,type:Io.type,unit:void 0,niceTicks:"auto"},yw={allowDataOverflow:Yn.allowDataOverflow,allowDecimals:Yn.allowDecimals,allowDuplicatedCategory:Yn.allowDuplicatedCategory,dataKey:void 0,domain:void 0,id:Yn.radiusAxisId,includeHidden:Yn.includeHidden,name:void 0,reversed:Yn.reversed,scale:Yn.scale,tick:Yn.tick,tickCount:Yn.tickCount,ticks:void 0,type:Yn.type,unit:void 0,niceTicks:"auto"},V4=(e,t)=>{if(t!=null)return e.polarAxis.angleAxis[t]},dv=j([V4,aR],(e,t)=>{var n;if(e!=null)return e;var r=(n=ef(t,"angleAxis",vw.type))!==null&&n!==void 0?n:"category";return Mu(Mu({},vw),{},{type:r})}),z4=(e,t)=>e.polarAxis.radiusAxis[t],pv=j([z4,aR],(e,t)=>{var n;if(e!=null)return e;var r=(n=ef(t,"radiusAxis",yw.type))!==null&&n!==void 0?n:"category";return Mu(Mu({},yw),{},{type:r})}),tf=e=>e.polarOptions,hv=j([Dr,jr,Ot],h4),HR=j([tf,hv],(e,t)=>{if(e!=null)return Bn(e.innerRadius,t,0)}),GR=j([tf,hv],(e,t)=>{if(e!=null)return Bn(e.outerRadius,t,t*.8)}),B4=e=>{if(e==null)return[0,0];var{startAngle:t,endAngle:n}=e;return[t,n]},WR=j([tf],B4);j([dv,WR],Jc);var UR=j([hv,HR,GR],(e,t,n)=>{if(!(e==null||t==null||n==null))return[t,n]});j([pv,UR],Jc);var qR=j([qe,tf,HR,GR,Dr,jr],(e,t,n,r,o,i)=>{if(!(e!=="centric"&&e!=="radial"||t==null||n==null||r==null)){var{cx:a,cy:s,startAngle:l,endAngle:u}=t;return{cx:Bn(a,o,o/2),cy:Bn(s,i,i/2),innerRadius:n,outerRadius:r,startAngle:l,endAngle:u,clockWise:!1}}}),Pt=(e,t)=>t,nf=(e,t,n)=>n;function mv(e){return e?.id}function KR(e,t,n){var{chartData:r=[]}=t,{allowDuplicatedCategory:o,dataKey:i}=n,a=new Map;return e.forEach(s=>{var l,u=(l=s.data)!==null&&l!==void 0?l:r;if(!(u==null||u.length===0)){var c=mv(s);u.forEach((f,p)=>{var d=i==null||o?p:String(Mt(f,i,null)),m=Mt(f,s.dataKey,0),g;a.has(d)?g=a.get(d):g={},Object.assign(g,{[c]:m}),a.set(d,g)})}}),Array.from(a.values())}function rf(e){return"stackId"in e&&e.stackId!=null&&e.dataKey!=null}var of=(e,t)=>e===t?!0:e==null||t==null?!1:e[0]===t[0]&&e[1]===t[1];function af(e,t){return Array.isArray(e)&&Array.isArray(t)&&e.length===0&&t.length===0?!0:e===t}function H4(e,t){if(e.length===t.length){for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}return!1}var _t=e=>{var t=qe(e);return t==="horizontal"?"xAxis":t==="vertical"?"yAxis":t==="centric"?"angleAxis":"radiusAxis"},Ji=e=>e.tooltip.settings.axisId;function gv(e){if(e!=null){var t=e.ticks,n=e.bandwidth,r=e.range(),o=[Math.min(...r),Math.max(...r)];return{domain:()=>e.domain(),range:(function(i){function a(){return i.apply(this,arguments)}return a.toString=function(){return i.toString()},a})(()=>o),rangeMin:()=>o[0],rangeMax:()=>o[1],isInRange(i){var a=o[0],s=o[1];return a<=s?i>=a&&i<=s:i>=s&&i<=a},bandwidth:n?()=>n.call(e):void 0,ticks:t?i=>t.call(e,i):void 0,map:(i,a)=>{var s=e(i);if(s!=null){if(e.bandwidth&&a!==null&&a!==void 0&&a.position){var l=e.bandwidth();switch(a.position){case"middle":s+=l/2;break;case"end":s+=l;break}}return s}}}}}var G4=(e,t)=>{if(t!=null)switch(e){case"linear":{if(!nr(t)){for(var n,r,o=0;o<t.length;o++){var i=t[o];Ne(i)&&((n===void 0||i<n)&&(n=i),(r===void 0||i>r)&&(r=i))}return n!==void 0&&r!==void 0?[n,r]:void 0}return t}default:return t}};function uo(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function W4(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function vv(e){let t,n,r;e.length!==2?(t=uo,n=(s,l)=>uo(e(s),l),r=(s,l)=>e(s)-l):(t=e===uo||e===W4?e:U4,n=e,r=e);function o(s,l,u=0,c=s.length){if(u<c){if(t(l,l)!==0)return c;do{const f=u+c>>>1;n(s[f],l)<0?u=f+1:c=f}while(u<c)}return u}function i(s,l,u=0,c=s.length){if(u<c){if(t(l,l)!==0)return c;do{const f=u+c>>>1;n(s[f],l)<=0?u=f+1:c=f}while(u<c)}return u}function a(s,l,u=0,c=s.length){const f=o(s,l,u,c-1);return f>u&&r(s[f-1],l)>-r(s[f],l)?f-1:f}return{left:o,center:a,right:i}}function U4(){return 0}function YR(e){return e===null?NaN:+e}function*q4(e,t){for(let n of e)n!=null&&(n=+n)>=n&&(yield n)}const K4=vv(uo),Es=K4.right;vv(YR).center;class bw extends Map{constructor(t,n=Z4){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),t!=null)for(const[r,o]of t)this.set(r,o)}get(t){return super.get(xw(this,t))}has(t){return super.has(xw(this,t))}set(t,n){return super.set(Y4(this,t),n)}delete(t){return super.delete(X4(this,t))}}function xw({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function Y4({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function X4({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function Z4(e){return e!==null&&typeof e=="object"?e.valueOf():e}function Q4(e=uo){if(e===uo)return XR;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,n)=>{const r=e(t,n);return r||r===0?r:(e(n,n)===0)-(e(t,t)===0)}}function XR(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const J4=Math.sqrt(50),eK=Math.sqrt(10),tK=Math.sqrt(2);function Du(e,t,n){const r=(t-e)/Math.max(0,n),o=Math.floor(Math.log10(r)),i=r/Math.pow(10,o),a=i>=J4?10:i>=eK?5:i>=tK?2:1;let s,l,u;return o<0?(u=Math.pow(10,-o)/a,s=Math.round(e*u),l=Math.round(t*u),s/u<e&&++s,l/u>t&&--l,u=-u):(u=Math.pow(10,o)*a,s=Math.round(e/u),l=Math.round(t/u),s*u<e&&++s,l*u>t&&--l),l<s&&.5<=n&&n<2?Du(e,t,n*2):[s,l,u]}function Bh(e,t,n){if(t=+t,e=+e,n=+n,!(n>0))return[];if(e===t)return[e];const r=t<e,[o,i,a]=r?Du(t,e,n):Du(e,t,n);if(!(i>=o))return[];const s=i-o+1,l=new Array(s);if(r)if(a<0)for(let u=0;u<s;++u)l[u]=(i-u)/-a;else for(let u=0;u<s;++u)l[u]=(i-u)*a;else if(a<0)for(let u=0;u<s;++u)l[u]=(o+u)/-a;else for(let u=0;u<s;++u)l[u]=(o+u)*a;return l}function Hh(e,t,n){return t=+t,e=+e,n=+n,Du(e,t,n)[2]}function Gh(e,t,n){t=+t,e=+e,n=+n;const r=t<e,o=r?Hh(t,e,n):Hh(e,t,n);return(r?-1:1)*(o<0?1/-o:o)}function ww(e,t){let n;for(const r of e)r!=null&&(n<r||n===void 0&&r>=r)&&(n=r);return n}function Cw(e,t){let n;for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);return n}function ZR(e,t,n=0,r=1/0,o){if(t=Math.floor(t),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(e.length-1,r)),!(n<=t&&t<=r))return e;for(o=o===void 0?XR:Q4(o);r>n;){if(r-n>600){const l=r-n+1,u=t-n+1,c=Math.log(l),f=.5*Math.exp(2*c/3),p=.5*Math.sqrt(c*f*(l-f)/l)*(u-l/2<0?-1:1),d=Math.max(n,Math.floor(t-u*f/l+p)),m=Math.min(r,Math.floor(t+(l-u)*f/l+p));ZR(e,t,d,m,o)}const i=e[t];let a=n,s=r;for(ba(e,n,t),o(e[r],i)>0&&ba(e,n,r);a<s;){for(ba(e,a,s),++a,--s;o(e[a],i)<0;)++a;for(;o(e[s],i)>0;)--s}o(e[n],i)===0?ba(e,n,s):(++s,ba(e,s,r)),s<=t&&(n=s+1),t<=s&&(r=s-1)}return e}function ba(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function nK(e,t,n){if(e=Float64Array.from(q4(e)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return Cw(e);if(t>=1)return ww(e);var r,o=(r-1)*t,i=Math.floor(o),a=ww(ZR(e,i).subarray(0,i+1)),s=Cw(e.subarray(i+1));return a+(s-a)*(o-i)}}function rK(e,t,n=YR){if(!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,o=(r-1)*t,i=Math.floor(o),a=+n(e[i],i,e),s=+n(e[i+1],i+1,e);return a+(s-a)*(o-i)}}function oK(e,t,n){e=+e,t=+t,n=(o=arguments.length)<2?(t=e,e=0,1):o<3?1:+n;for(var r=-1,o=Math.max(0,Math.ceil((t-e)/n))|0,i=new Array(o);++r<o;)i[r]=e+r*n;return i}function Tn(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function Lr(e,t){switch(arguments.length){case 0:break;case 1:{typeof e=="function"?this.interpolator(e):this.range(e);break}default:{this.domain(e),typeof t=="function"?this.interpolator(t):this.range(t);break}}return this}const Wh=Symbol("implicit");function yv(){var e=new bw,t=[],n=[],r=Wh;function o(i){let a=e.get(i);if(a===void 0){if(r!==Wh)return r;e.set(i,a=t.push(i)-1)}return n[a%n.length]}return o.domain=function(i){if(!arguments.length)return t.slice();t=[],e=new bw;for(const a of i)e.has(a)||e.set(a,t.push(a)-1);return o},o.range=function(i){return arguments.length?(n=Array.from(i),o):n.slice()},o.unknown=function(i){return arguments.length?(r=i,o):r},o.copy=function(){return yv(t,n).unknown(r)},Tn.apply(o,arguments),o}function bv(){var e=yv().unknown(void 0),t=e.domain,n=e.range,r=0,o=1,i,a,s=!1,l=0,u=0,c=.5;delete e.unknown;function f(){var p=t().length,d=o<r,m=d?o:r,g=d?r:o;i=(g-m)/Math.max(1,p-l+u*2),s&&(i=Math.floor(i)),m+=(g-m-i*(p-l))*c,a=i*(1-l),s&&(m=Math.round(m),a=Math.round(a));var h=oK(p).map(function(y){return m+i*y});return n(d?h.reverse():h)}return e.domain=function(p){return arguments.length?(t(p),f()):t()},e.range=function(p){return arguments.length?([r,o]=p,r=+r,o=+o,f()):[r,o]},e.rangeRound=function(p){return[r,o]=p,r=+r,o=+o,s=!0,f()},e.bandwidth=function(){return a},e.step=function(){return i},e.round=function(p){return arguments.length?(s=!!p,f()):s},e.padding=function(p){return arguments.length?(l=Math.min(1,u=+p),f()):l},e.paddingInner=function(p){return arguments.length?(l=Math.min(1,p),f()):l},e.paddingOuter=function(p){return arguments.length?(u=+p,f()):u},e.align=function(p){return arguments.length?(c=Math.max(0,Math.min(1,p)),f()):c},e.copy=function(){return bv(t(),[r,o]).round(s).paddingInner(l).paddingOuter(u).align(c)},Tn.apply(f(),arguments)}function QR(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return QR(t())},e}function iK(){return QR(bv.apply(null,arguments).paddingInner(1))}function xv(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function JR(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Os(){}var es=.7,ju=1/es,Di="\\s*([+-]?\\d+)\\s*",ts="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",rr="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",aK=/^#([0-9a-f]{3,8})$/,sK=new RegExp(`^rgb\\(${Di},${Di},${Di}\\)$`),lK=new RegExp(`^rgb\\(${rr},${rr},${rr}\\)$`),uK=new RegExp(`^rgba\\(${Di},${Di},${Di},${ts}\\)$`),cK=new RegExp(`^rgba\\(${rr},${rr},${rr},${ts}\\)$`),fK=new RegExp(`^hsl\\(${ts},${rr},${rr}\\)$`),dK=new RegExp(`^hsla\\(${ts},${rr},${rr},${ts}\\)$`),Sw={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};xv(Os,ns,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Ew,formatHex:Ew,formatHex8:pK,formatHsl:hK,formatRgb:Ow,toString:Ow});function Ew(){return this.rgb().formatHex()}function pK(){return this.rgb().formatHex8()}function hK(){return eI(this).formatHsl()}function Ow(){return this.rgb().formatRgb()}function ns(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=aK.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?Pw(t):n===3?new sn(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?El(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?El(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=sK.exec(e))?new sn(t[1],t[2],t[3],1):(t=lK.exec(e))?new sn(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=uK.exec(e))?El(t[1],t[2],t[3],t[4]):(t=cK.exec(e))?El(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=fK.exec(e))?Rw(t[1],t[2]/100,t[3]/100,1):(t=dK.exec(e))?Rw(t[1],t[2]/100,t[3]/100,t[4]):Sw.hasOwnProperty(e)?Pw(Sw[e]):e==="transparent"?new sn(NaN,NaN,NaN,0):null}function Pw(e){return new sn(e>>16&255,e>>8&255,e&255,1)}function El(e,t,n,r){return r<=0&&(e=t=n=NaN),new sn(e,t,n,r)}function mK(e){return e instanceof Os||(e=ns(e)),e?(e=e.rgb(),new sn(e.r,e.g,e.b,e.opacity)):new sn}function Uh(e,t,n,r){return arguments.length===1?mK(e):new sn(e,t,n,r??1)}function sn(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}xv(sn,Uh,JR(Os,{brighter(e){return e=e==null?ju:Math.pow(ju,e),new sn(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?es:Math.pow(es,e),new sn(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new sn(Wo(this.r),Wo(this.g),Wo(this.b),$u(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:_w,formatHex:_w,formatHex8:gK,formatRgb:Aw,toString:Aw}));function _w(){return`#${Fo(this.r)}${Fo(this.g)}${Fo(this.b)}`}function gK(){return`#${Fo(this.r)}${Fo(this.g)}${Fo(this.b)}${Fo((isNaN(this.opacity)?1:this.opacity)*255)}`}function Aw(){const e=$u(this.opacity);return`${e===1?"rgb(":"rgba("}${Wo(this.r)}, ${Wo(this.g)}, ${Wo(this.b)}${e===1?")":`, ${e})`}`}function $u(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Wo(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Fo(e){return e=Wo(e),(e<16?"0":"")+e.toString(16)}function Rw(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Vn(e,t,n,r)}function eI(e){if(e instanceof Vn)return new Vn(e.h,e.s,e.l,e.opacity);if(e instanceof Os||(e=ns(e)),!e)return new Vn;if(e instanceof Vn)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,o=Math.min(t,n,r),i=Math.max(t,n,r),a=NaN,s=i-o,l=(i+o)/2;return s?(t===i?a=(n-r)/s+(n<r)*6:n===i?a=(r-t)/s+2:a=(t-n)/s+4,s/=l<.5?i+o:2-i-o,a*=60):s=l>0&&l<1?0:a,new Vn(a,s,l,e.opacity)}function vK(e,t,n,r){return arguments.length===1?eI(e):new Vn(e,t,n,r??1)}function Vn(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}xv(Vn,vK,JR(Os,{brighter(e){return e=e==null?ju:Math.pow(ju,e),new Vn(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?es:Math.pow(es,e),new Vn(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,o=2*n-r;return new sn(vp(e>=240?e-240:e+120,o,r),vp(e,o,r),vp(e<120?e+240:e-120,o,r),this.opacity)},clamp(){return new Vn(Iw(this.h),Ol(this.s),Ol(this.l),$u(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=$u(this.opacity);return`${e===1?"hsl(":"hsla("}${Iw(this.h)}, ${Ol(this.s)*100}%, ${Ol(this.l)*100}%${e===1?")":`, ${e})`}`}}));function Iw(e){return e=(e||0)%360,e<0?e+360:e}function Ol(e){return Math.max(0,Math.min(1,e||0))}function vp(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const wv=e=>()=>e;function yK(e,t){return function(n){return e+n*t}}function bK(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function xK(e){return(e=+e)==1?tI:function(t,n){return n-t?bK(t,n,e):wv(isNaN(t)?n:t)}}function tI(e,t){var n=t-e;return n?yK(e,n):wv(isNaN(e)?t:e)}const kw=(function e(t){var n=xK(t);function r(o,i){var a=n((o=Uh(o)).r,(i=Uh(i)).r),s=n(o.g,i.g),l=n(o.b,i.b),u=tI(o.opacity,i.opacity);return function(c){return o.r=a(c),o.g=s(c),o.b=l(c),o.opacity=u(c),o+""}}return r.gamma=e,r})(1);function wK(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),o;return function(i){for(o=0;o<n;++o)r[o]=e[o]*(1-i)+t[o]*i;return r}}function CK(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function SK(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,o=new Array(r),i=new Array(n),a;for(a=0;a<r;++a)o[a]=ea(e[a],t[a]);for(;a<n;++a)i[a]=t[a];return function(s){for(a=0;a<r;++a)i[a]=o[a](s);return i}}function EK(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function Lu(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function OK(e,t){var n={},r={},o;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(o in t)o in e?n[o]=ea(e[o],t[o]):r[o]=t[o];return function(i){for(o in n)r[o]=n[o](i);return r}}var qh=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,yp=new RegExp(qh.source,"g");function PK(e){return function(){return e}}function _K(e){return function(t){return e(t)+""}}function AK(e,t){var n=qh.lastIndex=yp.lastIndex=0,r,o,i,a=-1,s=[],l=[];for(e=e+"",t=t+"";(r=qh.exec(e))&&(o=yp.exec(t));)(i=o.index)>n&&(i=t.slice(n,i),s[a]?s[a]+=i:s[++a]=i),(r=r[0])===(o=o[0])?s[a]?s[a]+=o:s[++a]=o:(s[++a]=null,l.push({i:a,x:Lu(r,o)})),n=yp.lastIndex;return n<t.length&&(i=t.slice(n),s[a]?s[a]+=i:s[++a]=i),s.length<2?l[0]?_K(l[0].x):PK(t):(t=l.length,function(u){for(var c=0,f;c<t;++c)s[(f=l[c]).i]=f.x(u);return s.join("")})}function ea(e,t){var n=typeof t,r;return t==null||n==="boolean"?wv(t):(n==="number"?Lu:n==="string"?(r=ns(t))?(t=r,kw):AK:t instanceof ns?kw:t instanceof Date?EK:CK(t)?wK:Array.isArray(t)?SK:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?OK:Lu)(e,t)}function Cv(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function RK(e,t){t===void 0&&(t=e,e=ea);for(var n=0,r=t.length-1,o=t[0],i=new Array(r<0?0:r);n<r;)i[n]=e(o,o=t[++n]);return function(a){var s=Math.max(0,Math.min(r-1,Math.floor(a*=r)));return i[s](a-s)}}function IK(e){return function(){return e}}function Fu(e){return+e}var Nw=[0,1];function Ut(e){return e}function Kh(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:IK(isNaN(t)?NaN:.5)}function kK(e,t){var n;return e>t&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function NK(e,t,n){var r=e[0],o=e[1],i=t[0],a=t[1];return o<r?(r=Kh(o,r),i=n(a,i)):(r=Kh(r,o),i=n(i,a)),function(s){return i(r(s))}}function TK(e,t,n){var r=Math.min(e.length,t.length)-1,o=new Array(r),i=new Array(r),a=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++a<r;)o[a]=Kh(e[a],e[a+1]),i[a]=n(t[a],t[a+1]);return function(s){var l=Es(e,s,1,r)-1;return i[l](o[l](s))}}function Ps(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function sf(){var e=Nw,t=Nw,n=ea,r,o,i,a=Ut,s,l,u;function c(){var p=Math.min(e.length,t.length);return a!==Ut&&(a=kK(e[0],e[p-1])),s=p>2?TK:NK,l=u=null,f}function f(p){return p==null||isNaN(p=+p)?i:(l||(l=s(e.map(r),t,n)))(r(a(p)))}return f.invert=function(p){return a(o((u||(u=s(t,e.map(r),Lu)))(p)))},f.domain=function(p){return arguments.length?(e=Array.from(p,Fu),c()):e.slice()},f.range=function(p){return arguments.length?(t=Array.from(p),c()):t.slice()},f.rangeRound=function(p){return t=Array.from(p),n=Cv,c()},f.clamp=function(p){return arguments.length?(a=p?!0:Ut,c()):a!==Ut},f.interpolate=function(p){return arguments.length?(n=p,c()):n},f.unknown=function(p){return arguments.length?(i=p,f):i},function(p,d){return r=p,o=d,c()}}function Sv(){return sf()(Ut,Ut)}function MK(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function Vu(e,t){if(!isFinite(e)||e===0)return null;var n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"),r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function Hi(e){return e=Vu(Math.abs(e)),e?e[1]:NaN}function DK(e,t){return function(n,r){for(var o=n.length,i=[],a=0,s=e[0],l=0;o>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),i.push(n.substring(o-=s,o+s)),!((l+=s+1)>r));)s=e[a=(a+1)%e.length];return i.reverse().join(t)}}function jK(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var $K=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function rs(e){if(!(t=$K.exec(e)))throw new Error("invalid format: "+e);var t;return new Ev({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}rs.prototype=Ev.prototype;function Ev(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}Ev.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function LK(e){e:for(var t=e.length,n=1,r=-1,o;n<t;++n)switch(e[n]){case".":r=o=n;break;case"0":r===0&&(r=n),o=n;break;default:if(!+e[n])break e;r>0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(o+1):e}var zu;function FK(e,t){var n=Vu(e,t);if(!n)return zu=void 0,e.toPrecision(t);var r=n[0],o=n[1],i=o-(zu=Math.max(-8,Math.min(8,Math.floor(o/3)))*3)+1,a=r.length;return i===a?r:i>a?r+new Array(i-a+1).join("0"):i>0?r.slice(0,i)+"."+r.slice(i):"0."+new Array(1-i).join("0")+Vu(e,Math.max(0,t+i-1))[0]}function Tw(e,t){var n=Vu(e,t);if(!n)return e+"";var r=n[0],o=n[1];return o<0?"0."+new Array(-o).join("0")+r:r.length>o+1?r.slice(0,o+1)+"."+r.slice(o+1):r+new Array(o-r.length+2).join("0")}const Mw={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:MK,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>Tw(e*100,t),r:Tw,s:FK,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function Dw(e){return e}var jw=Array.prototype.map,$w=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function VK(e){var t=e.grouping===void 0||e.thousands===void 0?Dw:DK(jw.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",r=e.currency===void 0?"":e.currency[1]+"",o=e.decimal===void 0?".":e.decimal+"",i=e.numerals===void 0?Dw:jK(jw.call(e.numerals,String)),a=e.percent===void 0?"%":e.percent+"",s=e.minus===void 0?"−":e.minus+"",l=e.nan===void 0?"NaN":e.nan+"";function u(f,p){f=rs(f);var d=f.fill,m=f.align,g=f.sign,h=f.symbol,y=f.zero,b=f.width,x=f.comma,w=f.precision,S=f.trim,E=f.type;E==="n"?(x=!0,E="g"):Mw[E]||(w===void 0&&(w=12),S=!0,E="g"),(y||d==="0"&&m==="=")&&(y=!0,d="0",m="=");var O=(p&&p.prefix!==void 0?p.prefix:"")+(h==="$"?n:h==="#"&&/[boxX]/.test(E)?"0"+E.toLowerCase():""),P=(h==="$"?r:/[%p]/.test(E)?a:"")+(p&&p.suffix!==void 0?p.suffix:""),N=Mw[E],R=/[defgprs%]/.test(E);w=w===void 0?6:/[gprs]/.test(E)?Math.max(1,Math.min(21,w)):Math.max(0,Math.min(20,w));function k(_){var T=O,F=P,V,D,B;if(E==="c")F=N(_)+F,_="";else{_=+_;var z=_<0||1/_<0;if(_=isNaN(_)?l:N(Math.abs(_),w),S&&(_=LK(_)),z&&+_==0&&g!=="+"&&(z=!1),T=(z?g==="("?g:s:g==="-"||g==="("?"":g)+T,F=(E==="s"&&!isNaN(_)&&zu!==void 0?$w[8+zu/3]:"")+F+(z&&g==="("?")":""),R){for(V=-1,D=_.length;++V<D;)if(B=_.charCodeAt(V),48>B||B>57){F=(B===46?o+_.slice(V+1):_.slice(V))+F,_=_.slice(0,V);break}}}x&&!y&&(_=t(_,1/0));var Y=T.length+_.length+F.length,$=Y<b?new Array(b-Y+1).join(d):"";switch(x&&y&&(_=t($+_,$.length?b-F.length:1/0),$=""),m){case"<":_=T+_+F+$;break;case"=":_=T+$+_+F;break;case"^":_=$.slice(0,Y=$.length>>1)+T+_+F+$.slice(Y);break;default:_=$+T+_+F;break}return i(_)}return k.toString=function(){return f+""},k}function c(f,p){var d=Math.max(-8,Math.min(8,Math.floor(Hi(p)/3)))*3,m=Math.pow(10,-d),g=u((f=rs(f),f.type="f",f),{suffix:$w[8+d/3]});return function(h){return g(m*h)}}return{format:u,formatPrefix:c}}var Pl,Ov,nI;zK({thousands:",",grouping:[3],currency:["$",""]});function zK(e){return Pl=VK(e),Ov=Pl.format,nI=Pl.formatPrefix,Pl}function BK(e){return Math.max(0,-Hi(Math.abs(e)))}function HK(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Hi(t)/3)))*3-Hi(Math.abs(e)))}function GK(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Hi(t)-Hi(e))+1}function rI(e,t,n,r){var o=Gh(e,t,n),i;switch(r=rs(r??",f"),r.type){case"s":{var a=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(i=HK(o,a))&&(r.precision=i),nI(r,a)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(i=GK(o,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=i-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(i=BK(o))&&(r.precision=i-(r.type==="%")*2);break}}return Ov(r)}function Co(e){var t=e.domain;return e.ticks=function(n){var r=t();return Bh(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var o=t();return rI(o[0],o[o.length-1],n??10,r)},e.nice=function(n){n==null&&(n=10);var r=t(),o=0,i=r.length-1,a=r[o],s=r[i],l,u,c=10;for(s<a&&(u=a,a=s,s=u,u=o,o=i,i=u);c-- >0;){if(u=Hh(a,s,n),u===l)return r[o]=a,r[i]=s,t(r);if(u>0)a=Math.floor(a/u)*u,s=Math.ceil(s/u)*u;else if(u<0)a=Math.ceil(a*u)/u,s=Math.floor(s*u)/u;else break;l=u}return e},e}function oI(){var e=Sv();return e.copy=function(){return Ps(e,oI())},Tn.apply(e,arguments),Co(e)}function iI(e){var t;function n(r){return r==null||isNaN(r=+r)?t:r}return n.invert=n,n.domain=n.range=function(r){return arguments.length?(e=Array.from(r,Fu),n):e.slice()},n.unknown=function(r){return arguments.length?(t=r,n):t},n.copy=function(){return iI(e).unknown(t)},e=arguments.length?Array.from(e,Fu):[0,1],Co(n)}function aI(e,t){e=e.slice();var n=0,r=e.length-1,o=e[n],i=e[r],a;return i<o&&(a=n,n=r,r=a,a=o,o=i,i=a),e[n]=t.floor(o),e[r]=t.ceil(i),e}function Lw(e){return Math.log(e)}function Fw(e){return Math.exp(e)}function WK(e){return-Math.log(-e)}function UK(e){return-Math.exp(-e)}function qK(e){return isFinite(e)?+("1e"+e):e<0?0:e}function KK(e){return e===10?qK:e===Math.E?Math.exp:t=>Math.pow(e,t)}function YK(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function Vw(e){return(t,n)=>-e(-t,n)}function Pv(e){const t=e(Lw,Fw),n=t.domain;let r=10,o,i;function a(){return o=YK(r),i=KK(r),n()[0]<0?(o=Vw(o),i=Vw(i),e(WK,UK)):e(Lw,Fw),t}return t.base=function(s){return arguments.length?(r=+s,a()):r},t.domain=function(s){return arguments.length?(n(s),a()):n()},t.ticks=s=>{const l=n();let u=l[0],c=l[l.length-1];const f=c<u;f&&([u,c]=[c,u]);let p=o(u),d=o(c),m,g;const h=s==null?10:+s;let y=[];if(!(r%1)&&d-p<h){if(p=Math.floor(p),d=Math.ceil(d),u>0){for(;p<=d;++p)for(m=1;m<r;++m)if(g=p<0?m/i(-p):m*i(p),!(g<u)){if(g>c)break;y.push(g)}}else for(;p<=d;++p)for(m=r-1;m>=1;--m)if(g=p>0?m/i(-p):m*i(p),!(g<u)){if(g>c)break;y.push(g)}y.length*2<h&&(y=Bh(u,c,h))}else y=Bh(p,d,Math.min(d-p,h)).map(i);return f?y.reverse():y},t.tickFormat=(s,l)=>{if(s==null&&(s=10),l==null&&(l=r===10?"s":","),typeof l!="function"&&(!(r%1)&&(l=rs(l)).precision==null&&(l.trim=!0),l=Ov(l)),s===1/0)return l;const u=Math.max(1,r*s/t.ticks().length);return c=>{let f=c/i(Math.round(o(c)));return f*r<r-.5&&(f*=r),f<=u?l(c):""}},t.nice=()=>n(aI(n(),{floor:s=>i(Math.floor(o(s))),ceil:s=>i(Math.ceil(o(s)))})),t}function sI(){const e=Pv(sf()).domain([1,10]);return e.copy=()=>Ps(e,sI()).base(e.base()),Tn.apply(e,arguments),e}function zw(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function Bw(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function _v(e){var t=1,n=e(zw(t),Bw(t));return n.constant=function(r){return arguments.length?e(zw(t=+r),Bw(t)):t},Co(n)}function lI(){var e=_v(sf());return e.copy=function(){return Ps(e,lI()).constant(e.constant())},Tn.apply(e,arguments)}function Hw(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function XK(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function ZK(e){return e<0?-e*e:e*e}function Av(e){var t=e(Ut,Ut),n=1;function r(){return n===1?e(Ut,Ut):n===.5?e(XK,ZK):e(Hw(n),Hw(1/n))}return t.exponent=function(o){return arguments.length?(n=+o,r()):n},Co(t)}function Rv(){var e=Av(sf());return e.copy=function(){return Ps(e,Rv()).exponent(e.exponent())},Tn.apply(e,arguments),e}function QK(){return Rv.apply(null,arguments).exponent(.5)}function Gw(e){return Math.sign(e)*e*e}function JK(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function uI(){var e=Sv(),t=[0,1],n=!1,r;function o(i){var a=JK(e(i));return isNaN(a)?r:n?Math.round(a):a}return o.invert=function(i){return e.invert(Gw(i))},o.domain=function(i){return arguments.length?(e.domain(i),o):e.domain()},o.range=function(i){return arguments.length?(e.range((t=Array.from(i,Fu)).map(Gw)),o):t.slice()},o.rangeRound=function(i){return o.range(i).round(!0)},o.round=function(i){return arguments.length?(n=!!i,o):n},o.clamp=function(i){return arguments.length?(e.clamp(i),o):e.clamp()},o.unknown=function(i){return arguments.length?(r=i,o):r},o.copy=function(){return uI(e.domain(),t).round(n).clamp(e.clamp()).unknown(r)},Tn.apply(o,arguments),Co(o)}function cI(){var e=[],t=[],n=[],r;function o(){var a=0,s=Math.max(1,t.length);for(n=new Array(s-1);++a<s;)n[a-1]=rK(e,a/s);return i}function i(a){return a==null||isNaN(a=+a)?r:t[Es(n,a)]}return i.invertExtent=function(a){var s=t.indexOf(a);return s<0?[NaN,NaN]:[s>0?n[s-1]:e[0],s<n.length?n[s]:e[e.length-1]]},i.domain=function(a){if(!arguments.length)return e.slice();e=[];for(let s of a)s!=null&&!isNaN(s=+s)&&e.push(s);return e.sort(uo),o()},i.range=function(a){return arguments.length?(t=Array.from(a),o()):t.slice()},i.unknown=function(a){return arguments.length?(r=a,i):r},i.quantiles=function(){return n.slice()},i.copy=function(){return cI().domain(e).range(t).unknown(r)},Tn.apply(i,arguments)}function fI(){var e=0,t=1,n=1,r=[.5],o=[0,1],i;function a(l){return l!=null&&l<=l?o[Es(r,l,0,n)]:i}function s(){var l=-1;for(r=new Array(n);++l<n;)r[l]=((l+1)*t-(l-n)*e)/(n+1);return a}return a.domain=function(l){return arguments.length?([e,t]=l,e=+e,t=+t,s()):[e,t]},a.range=function(l){return arguments.length?(n=(o=Array.from(l)).length-1,s()):o.slice()},a.invertExtent=function(l){var u=o.indexOf(l);return u<0?[NaN,NaN]:u<1?[e,r[0]]:u>=n?[r[n-1],t]:[r[u-1],r[u]]},a.unknown=function(l){return arguments.length&&(i=l),a},a.thresholds=function(){return r.slice()},a.copy=function(){return fI().domain([e,t]).range(o).unknown(i)},Tn.apply(Co(a),arguments)}function dI(){var e=[.5],t=[0,1],n,r=1;function o(i){return i!=null&&i<=i?t[Es(e,i,0,r)]:n}return o.domain=function(i){return arguments.length?(e=Array.from(i),r=Math.min(e.length,t.length-1),o):e.slice()},o.range=function(i){return arguments.length?(t=Array.from(i),r=Math.min(e.length,t.length-1),o):t.slice()},o.invertExtent=function(i){var a=t.indexOf(i);return[e[a-1],e[a]]},o.unknown=function(i){return arguments.length?(n=i,o):n},o.copy=function(){return dI().domain(e).range(t).unknown(n)},Tn.apply(o,arguments)}const bp=new Date,xp=new Date;function bt(e,t,n,r){function o(i){return e(i=arguments.length===0?new Date:new Date(+i)),i}return o.floor=i=>(e(i=new Date(+i)),i),o.ceil=i=>(e(i=new Date(i-1)),t(i,1),e(i),i),o.round=i=>{const a=o(i),s=o.ceil(i);return i-a<s-i?a:s},o.offset=(i,a)=>(t(i=new Date(+i),a==null?1:Math.floor(a)),i),o.range=(i,a,s)=>{const l=[];if(i=o.ceil(i),s=s==null?1:Math.floor(s),!(i<a)||!(s>0))return l;let u;do l.push(u=new Date(+i)),t(i,s),e(i);while(u<i&&i<a);return l},o.filter=i=>bt(a=>{if(a>=a)for(;e(a),!i(a);)a.setTime(a-1)},(a,s)=>{if(a>=a)if(s<0)for(;++s<=0;)for(;t(a,-1),!i(a););else for(;--s>=0;)for(;t(a,1),!i(a););}),n&&(o.count=(i,a)=>(bp.setTime(+i),xp.setTime(+a),e(bp),e(xp),Math.floor(n(bp,xp))),o.every=i=>(i=Math.floor(i),!isFinite(i)||!(i>0)?null:i>1?o.filter(r?a=>r(a)%i===0:a=>o.count(0,a)%i===0):o)),o}const Bu=bt(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);Bu.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?bt(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):Bu);Bu.range;const br=1e3,Rn=br*60,xr=Rn*60,Rr=xr*24,Iv=Rr*7,Ww=Rr*30,wp=Rr*365,Vo=bt(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*br)},(e,t)=>(t-e)/br,e=>e.getUTCSeconds());Vo.range;const kv=bt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*br)},(e,t)=>{e.setTime(+e+t*Rn)},(e,t)=>(t-e)/Rn,e=>e.getMinutes());kv.range;const Nv=bt(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Rn)},(e,t)=>(t-e)/Rn,e=>e.getUTCMinutes());Nv.range;const Tv=bt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*br-e.getMinutes()*Rn)},(e,t)=>{e.setTime(+e+t*xr)},(e,t)=>(t-e)/xr,e=>e.getHours());Tv.range;const Mv=bt(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*xr)},(e,t)=>(t-e)/xr,e=>e.getUTCHours());Mv.range;const _s=bt(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Rn)/Rr,e=>e.getDate()-1);_s.range;const lf=bt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Rr,e=>e.getUTCDate()-1);lf.range;const pI=bt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Rr,e=>Math.floor(e/Rr));pI.range;function ui(e){return bt(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,n)=>{t.setDate(t.getDate()+n*7)},(t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*Rn)/Iv)}const uf=ui(0),Hu=ui(1),e6=ui(2),t6=ui(3),Gi=ui(4),n6=ui(5),r6=ui(6);uf.range;Hu.range;e6.range;t6.range;Gi.range;n6.range;r6.range;function ci(e){return bt(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCDate(t.getUTCDate()+n*7)},(t,n)=>(n-t)/Iv)}const cf=ci(0),Gu=ci(1),o6=ci(2),i6=ci(3),Wi=ci(4),a6=ci(5),s6=ci(6);cf.range;Gu.range;o6.range;i6.range;Wi.range;a6.range;s6.range;const Dv=bt(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());Dv.range;const jv=bt(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());jv.range;const Ir=bt(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());Ir.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:bt(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)});Ir.range;const kr=bt(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());kr.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:bt(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)});kr.range;function hI(e,t,n,r,o,i){const a=[[Vo,1,br],[Vo,5,5*br],[Vo,15,15*br],[Vo,30,30*br],[i,1,Rn],[i,5,5*Rn],[i,15,15*Rn],[i,30,30*Rn],[o,1,xr],[o,3,3*xr],[o,6,6*xr],[o,12,12*xr],[r,1,Rr],[r,2,2*Rr],[n,1,Iv],[t,1,Ww],[t,3,3*Ww],[e,1,wp]];function s(u,c,f){const p=c<u;p&&([u,c]=[c,u]);const d=f&&typeof f.range=="function"?f:l(u,c,f),m=d?d.range(u,+c+1):[];return p?m.reverse():m}function l(u,c,f){const p=Math.abs(c-u)/f,d=vv(([,,h])=>h).right(a,p);if(d===a.length)return e.every(Gh(u/wp,c/wp,f));if(d===0)return Bu.every(Math.max(Gh(u,c,f),1));const[m,g]=a[p/a[d-1][2]<a[d][2]/p?d-1:d];return m.every(g)}return[s,l]}const[l6,u6]=hI(kr,jv,cf,pI,Mv,Nv),[c6,f6]=hI(Ir,Dv,uf,_s,Tv,kv);function Cp(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function Sp(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function xa(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function d6(e){var t=e.dateTime,n=e.date,r=e.time,o=e.periods,i=e.days,a=e.shortDays,s=e.months,l=e.shortMonths,u=wa(o),c=Ca(o),f=wa(i),p=Ca(i),d=wa(a),m=Ca(a),g=wa(s),h=Ca(s),y=wa(l),b=Ca(l),x={a:B,A:z,b:Y,B:$,c:null,d:Zw,e:Zw,f:D6,g:W6,G:q6,H:N6,I:T6,j:M6,L:mI,m:j6,M:$6,p:ye,q:ae,Q:eC,s:tC,S:L6,u:F6,U:V6,V:z6,w:B6,W:H6,x:null,X:null,y:G6,Y:U6,Z:K6,"%":Jw},w={a:be,A:ne,b:le,B:Ee,c:null,d:Qw,e:Qw,f:Q6,g:l8,G:c8,H:Y6,I:X6,j:Z6,L:vI,m:J6,M:e8,p:Pe,q:Se,Q:eC,s:tC,S:t8,u:n8,U:r8,V:o8,w:i8,W:a8,x:null,X:null,y:s8,Y:u8,Z:f8,"%":Jw},S={a:R,A:k,b:_,B:T,c:F,d:Yw,e:Yw,f:A6,g:Kw,G:qw,H:Xw,I:Xw,j:E6,L:_6,m:S6,M:O6,p:N,q:C6,Q:I6,s:k6,S:P6,u:v6,U:y6,V:b6,w:g6,W:x6,x:V,X:D,y:Kw,Y:qw,Z:w6,"%":R6};x.x=E(n,x),x.X=E(r,x),x.c=E(t,x),w.x=E(n,w),w.X=E(r,w),w.c=E(t,w);function E(L,U){return function(G){var I=[],W=-1,H=0,pe=L.length,M,J,ee;for(G instanceof Date||(G=new Date(+G));++W<pe;)L.charCodeAt(W)===37&&(I.push(L.slice(H,W)),(J=Uw[M=L.charAt(++W)])!=null?M=L.charAt(++W):J=M==="e"?" ":"0",(ee=U[M])&&(M=ee(G,J)),I.push(M),H=W+1);return I.push(L.slice(H,W)),I.join("")}}function O(L,U){return function(G){var I=xa(1900,void 0,1),W=P(I,L,G+="",0),H,pe;if(W!=G.length)return null;if("Q"in I)return new Date(I.Q);if("s"in I)return new Date(I.s*1e3+("L"in I?I.L:0));if(U&&!("Z"in I)&&(I.Z=0),"p"in I&&(I.H=I.H%12+I.p*12),I.m===void 0&&(I.m="q"in I?I.q:0),"V"in I){if(I.V<1||I.V>53)return null;"w"in I||(I.w=1),"Z"in I?(H=Sp(xa(I.y,0,1)),pe=H.getUTCDay(),H=pe>4||pe===0?Gu.ceil(H):Gu(H),H=lf.offset(H,(I.V-1)*7),I.y=H.getUTCFullYear(),I.m=H.getUTCMonth(),I.d=H.getUTCDate()+(I.w+6)%7):(H=Cp(xa(I.y,0,1)),pe=H.getDay(),H=pe>4||pe===0?Hu.ceil(H):Hu(H),H=_s.offset(H,(I.V-1)*7),I.y=H.getFullYear(),I.m=H.getMonth(),I.d=H.getDate()+(I.w+6)%7)}else("W"in I||"U"in I)&&("w"in I||(I.w="u"in I?I.u%7:"W"in I?1:0),pe="Z"in I?Sp(xa(I.y,0,1)).getUTCDay():Cp(xa(I.y,0,1)).getDay(),I.m=0,I.d="W"in I?(I.w+6)%7+I.W*7-(pe+5)%7:I.w+I.U*7-(pe+6)%7);return"Z"in I?(I.H+=I.Z/100|0,I.M+=I.Z%100,Sp(I)):Cp(I)}}function P(L,U,G,I){for(var W=0,H=U.length,pe=G.length,M,J;W<H;){if(I>=pe)return-1;if(M=U.charCodeAt(W++),M===37){if(M=U.charAt(W++),J=S[M in Uw?U.charAt(W++):M],!J||(I=J(L,G,I))<0)return-1}else if(M!=G.charCodeAt(I++))return-1}return I}function N(L,U,G){var I=u.exec(U.slice(G));return I?(L.p=c.get(I[0].toLowerCase()),G+I[0].length):-1}function R(L,U,G){var I=d.exec(U.slice(G));return I?(L.w=m.get(I[0].toLowerCase()),G+I[0].length):-1}function k(L,U,G){var I=f.exec(U.slice(G));return I?(L.w=p.get(I[0].toLowerCase()),G+I[0].length):-1}function _(L,U,G){var I=y.exec(U.slice(G));return I?(L.m=b.get(I[0].toLowerCase()),G+I[0].length):-1}function T(L,U,G){var I=g.exec(U.slice(G));return I?(L.m=h.get(I[0].toLowerCase()),G+I[0].length):-1}function F(L,U,G){return P(L,t,U,G)}function V(L,U,G){return P(L,n,U,G)}function D(L,U,G){return P(L,r,U,G)}function B(L){return a[L.getDay()]}function z(L){return i[L.getDay()]}function Y(L){return l[L.getMonth()]}function $(L){return s[L.getMonth()]}function ye(L){return o[+(L.getHours()>=12)]}function ae(L){return 1+~~(L.getMonth()/3)}function be(L){return a[L.getUTCDay()]}function ne(L){return i[L.getUTCDay()]}function le(L){return l[L.getUTCMonth()]}function Ee(L){return s[L.getUTCMonth()]}function Pe(L){return o[+(L.getUTCHours()>=12)]}function Se(L){return 1+~~(L.getUTCMonth()/3)}return{format:function(L){var U=E(L+="",x);return U.toString=function(){return L},U},parse:function(L){var U=O(L+="",!1);return U.toString=function(){return L},U},utcFormat:function(L){var U=E(L+="",w);return U.toString=function(){return L},U},utcParse:function(L){var U=O(L+="",!0);return U.toString=function(){return L},U}}}var Uw={"-":"",_:" ",0:"0"},At=/^\s*\d+/,p6=/^%/,h6=/[\\^$*+?|[\]().{}]/g;function De(e,t,n){var r=e<0?"-":"",o=(r?-e:e)+"",i=o.length;return r+(i<n?new Array(n-i+1).join(t)+o:o)}function m6(e){return e.replace(h6,"\\$&")}function wa(e){return new RegExp("^(?:"+e.map(m6).join("|")+")","i")}function Ca(e){return new Map(e.map((t,n)=>[t.toLowerCase(),n]))}function g6(e,t,n){var r=At.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function v6(e,t,n){var r=At.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function y6(e,t,n){var r=At.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function b6(e,t,n){var r=At.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function x6(e,t,n){var r=At.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function qw(e,t,n){var r=At.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function Kw(e,t,n){var r=At.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function w6(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function C6(e,t,n){var r=At.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function S6(e,t,n){var r=At.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function Yw(e,t,n){var r=At.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function E6(e,t,n){var r=At.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function Xw(e,t,n){var r=At.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function O6(e,t,n){var r=At.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function P6(e,t,n){var r=At.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function _6(e,t,n){var r=At.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function A6(e,t,n){var r=At.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function R6(e,t,n){var r=p6.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function I6(e,t,n){var r=At.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function k6(e,t,n){var r=At.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function Zw(e,t){return De(e.getDate(),t,2)}function N6(e,t){return De(e.getHours(),t,2)}function T6(e,t){return De(e.getHours()%12||12,t,2)}function M6(e,t){return De(1+_s.count(Ir(e),e),t,3)}function mI(e,t){return De(e.getMilliseconds(),t,3)}function D6(e,t){return mI(e,t)+"000"}function j6(e,t){return De(e.getMonth()+1,t,2)}function $6(e,t){return De(e.getMinutes(),t,2)}function L6(e,t){return De(e.getSeconds(),t,2)}function F6(e){var t=e.getDay();return t===0?7:t}function V6(e,t){return De(uf.count(Ir(e)-1,e),t,2)}function gI(e){var t=e.getDay();return t>=4||t===0?Gi(e):Gi.ceil(e)}function z6(e,t){return e=gI(e),De(Gi.count(Ir(e),e)+(Ir(e).getDay()===4),t,2)}function B6(e){return e.getDay()}function H6(e,t){return De(Hu.count(Ir(e)-1,e),t,2)}function G6(e,t){return De(e.getFullYear()%100,t,2)}function W6(e,t){return e=gI(e),De(e.getFullYear()%100,t,2)}function U6(e,t){return De(e.getFullYear()%1e4,t,4)}function q6(e,t){var n=e.getDay();return e=n>=4||n===0?Gi(e):Gi.ceil(e),De(e.getFullYear()%1e4,t,4)}function K6(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+De(t/60|0,"0",2)+De(t%60,"0",2)}function Qw(e,t){return De(e.getUTCDate(),t,2)}function Y6(e,t){return De(e.getUTCHours(),t,2)}function X6(e,t){return De(e.getUTCHours()%12||12,t,2)}function Z6(e,t){return De(1+lf.count(kr(e),e),t,3)}function vI(e,t){return De(e.getUTCMilliseconds(),t,3)}function Q6(e,t){return vI(e,t)+"000"}function J6(e,t){return De(e.getUTCMonth()+1,t,2)}function e8(e,t){return De(e.getUTCMinutes(),t,2)}function t8(e,t){return De(e.getUTCSeconds(),t,2)}function n8(e){var t=e.getUTCDay();return t===0?7:t}function r8(e,t){return De(cf.count(kr(e)-1,e),t,2)}function yI(e){var t=e.getUTCDay();return t>=4||t===0?Wi(e):Wi.ceil(e)}function o8(e,t){return e=yI(e),De(Wi.count(kr(e),e)+(kr(e).getUTCDay()===4),t,2)}function i8(e){return e.getUTCDay()}function a8(e,t){return De(Gu.count(kr(e)-1,e),t,2)}function s8(e,t){return De(e.getUTCFullYear()%100,t,2)}function l8(e,t){return e=yI(e),De(e.getUTCFullYear()%100,t,2)}function u8(e,t){return De(e.getUTCFullYear()%1e4,t,4)}function c8(e,t){var n=e.getUTCDay();return e=n>=4||n===0?Wi(e):Wi.ceil(e),De(e.getUTCFullYear()%1e4,t,4)}function f8(){return"+0000"}function Jw(){return"%"}function eC(e){return+e}function tC(e){return Math.floor(+e/1e3)}var bi,bI,xI;d8({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function d8(e){return bi=d6(e),bI=bi.format,bi.parse,xI=bi.utcFormat,bi.utcParse,bi}function p8(e){return new Date(e)}function h8(e){return e instanceof Date?+e:+new Date(+e)}function $v(e,t,n,r,o,i,a,s,l,u){var c=Sv(),f=c.invert,p=c.domain,d=u(".%L"),m=u(":%S"),g=u("%I:%M"),h=u("%I %p"),y=u("%a %d"),b=u("%b %d"),x=u("%B"),w=u("%Y");function S(E){return(l(E)<E?d:s(E)<E?m:a(E)<E?g:i(E)<E?h:r(E)<E?o(E)<E?y:b:n(E)<E?x:w)(E)}return c.invert=function(E){return new Date(f(E))},c.domain=function(E){return arguments.length?p(Array.from(E,h8)):p().map(p8)},c.ticks=function(E){var O=p();return e(O[0],O[O.length-1],E??10)},c.tickFormat=function(E,O){return O==null?S:u(O)},c.nice=function(E){var O=p();return(!E||typeof E.range!="function")&&(E=t(O[0],O[O.length-1],E??10)),E?p(aI(O,E)):c},c.copy=function(){return Ps(c,$v(e,t,n,r,o,i,a,s,l,u))},c}function m8(){return Tn.apply($v(c6,f6,Ir,Dv,uf,_s,Tv,kv,Vo,bI).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function g8(){return Tn.apply($v(l6,u6,kr,jv,cf,lf,Mv,Nv,Vo,xI).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function ff(){var e=0,t=1,n,r,o,i,a=Ut,s=!1,l;function u(f){return f==null||isNaN(f=+f)?l:a(o===0?.5:(f=(i(f)-n)*o,s?Math.max(0,Math.min(1,f)):f))}u.domain=function(f){return arguments.length?([e,t]=f,n=i(e=+e),r=i(t=+t),o=n===r?0:1/(r-n),u):[e,t]},u.clamp=function(f){return arguments.length?(s=!!f,u):s},u.interpolator=function(f){return arguments.length?(a=f,u):a};function c(f){return function(p){var d,m;return arguments.length?([d,m]=p,a=f(d,m),u):[a(0),a(1)]}}return u.range=c(ea),u.rangeRound=c(Cv),u.unknown=function(f){return arguments.length?(l=f,u):l},function(f){return i=f,n=f(e),r=f(t),o=n===r?0:1/(r-n),u}}function So(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function wI(){var e=Co(ff()(Ut));return e.copy=function(){return So(e,wI())},Lr.apply(e,arguments)}function CI(){var e=Pv(ff()).domain([1,10]);return e.copy=function(){return So(e,CI()).base(e.base())},Lr.apply(e,arguments)}function SI(){var e=_v(ff());return e.copy=function(){return So(e,SI()).constant(e.constant())},Lr.apply(e,arguments)}function Lv(){var e=Av(ff());return e.copy=function(){return So(e,Lv()).exponent(e.exponent())},Lr.apply(e,arguments)}function v8(){return Lv.apply(null,arguments).exponent(.5)}function EI(){var e=[],t=Ut;function n(r){if(r!=null&&!isNaN(r=+r))return t((Es(e,r,1)-1)/(e.length-1))}return n.domain=function(r){if(!arguments.length)return e.slice();e=[];for(let o of r)o!=null&&!isNaN(o=+o)&&e.push(o);return e.sort(uo),n},n.interpolator=function(r){return arguments.length?(t=r,n):t},n.range=function(){return e.map((r,o)=>t(o/(e.length-1)))},n.quantiles=function(r){return Array.from({length:r+1},(o,i)=>nK(e,i/r))},n.copy=function(){return EI(t).domain(e)},Lr.apply(n,arguments)}function df(){var e=0,t=.5,n=1,r=1,o,i,a,s,l,u=Ut,c,f=!1,p;function d(g){return isNaN(g=+g)?p:(g=.5+((g=+c(g))-i)*(r*g<r*i?s:l),u(f?Math.max(0,Math.min(1,g)):g))}d.domain=function(g){return arguments.length?([e,t,n]=g,o=c(e=+e),i=c(t=+t),a=c(n=+n),s=o===i?0:.5/(i-o),l=i===a?0:.5/(a-i),r=i<o?-1:1,d):[e,t,n]},d.clamp=function(g){return arguments.length?(f=!!g,d):f},d.interpolator=function(g){return arguments.length?(u=g,d):u};function m(g){return function(h){var y,b,x;return arguments.length?([y,b,x]=h,u=RK(g,[y,b,x]),d):[u(0),u(.5),u(1)]}}return d.range=m(ea),d.rangeRound=m(Cv),d.unknown=function(g){return arguments.length?(p=g,d):p},function(g){return c=g,o=g(e),i=g(t),a=g(n),s=o===i?0:.5/(i-o),l=i===a?0:.5/(a-i),r=i<o?-1:1,d}}function OI(){var e=Co(df()(Ut));return e.copy=function(){return So(e,OI())},Lr.apply(e,arguments)}function PI(){var e=Pv(df()).domain([.1,1,10]);return e.copy=function(){return So(e,PI()).base(e.base())},Lr.apply(e,arguments)}function _I(){var e=_v(df());return e.copy=function(){return So(e,_I()).constant(e.constant())},Lr.apply(e,arguments)}function Fv(){var e=Av(df());return e.copy=function(){return So(e,Fv()).exponent(e.exponent())},Lr.apply(e,arguments)}function y8(){return Fv.apply(null,arguments).exponent(.5)}const Ra=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:bv,scaleDiverging:OI,scaleDivergingLog:PI,scaleDivergingPow:Fv,scaleDivergingSqrt:y8,scaleDivergingSymlog:_I,scaleIdentity:iI,scaleImplicit:Wh,scaleLinear:oI,scaleLog:sI,scaleOrdinal:yv,scalePoint:iK,scalePow:Rv,scaleQuantile:cI,scaleQuantize:fI,scaleRadial:uI,scaleSequential:wI,scaleSequentialLog:CI,scaleSequentialPow:Lv,scaleSequentialQuantile:EI,scaleSequentialSqrt:v8,scaleSequentialSymlog:SI,scaleSqrt:QK,scaleSymlog:lI,scaleThreshold:dI,scaleTime:m8,scaleUtc:g8,tickFormat:rI},Symbol.toStringTag,{value:"Module"}));function b8(e){if(e in Ra)return Ra[e]();var t="scale".concat(ms(e));if(t in Ra)return Ra[t]()}function nC(e,t,n){if(typeof e=="function")return e.copy().domain(t).range(n);if(e!=null){var r=b8(e);if(r!=null)return r.domain(t).range(n),r}}function Vv(e,t,n,r){if(!(n==null||r==null))return typeof e.scale=="function"?nC(e.scale,n,r):nC(t,n,r)}function x8(e){return"scale".concat(ms(e))}function w8(e){return x8(e)in Ra}var AI=(e,t,n)=>{if(e!=null){var{scale:r,type:o}=e;if(r==="auto")return o==="category"&&n&&(n.indexOf("LineChart")>=0||n.indexOf("AreaChart")>=0||n.indexOf("ComposedChart")>=0&&!t)?"point":o==="category"?"band":"linear";if(typeof r=="string")return w8(r)?r:"point"}};function C8(e,t){for(var n=0,r=e.length,o=e[0]<e[e.length-1];n<r;){var i=Math.floor((n+r)/2);(o?e[i]<t:e[i]>t)?n=i+1:r=i}return n}function RI(e,t){if(e){var n=t??e.domain(),r=n.map(i=>{var a;return(a=e(i))!==null&&a!==void 0?a:0}),o=e.range();if(!(n.length===0||o.length<2))return i=>{var a,s,l=C8(r,i);if(l<=0)return n[0];if(l>=n.length)return n[n.length-1];var u=(a=r[l-1])!==null&&a!==void 0?a:0,c=(s=r[l])!==null&&s!==void 0?s:0;return Math.abs(i-u)<=Math.abs(i-c)?n[l-1]:n[l]}}}function S8(e){if(e!=null)return"invert"in e&&typeof e.invert=="function"?e.invert.bind(e):RI(e,void 0)}function rC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Wu(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?rC(Object(n),!0).forEach(function(r){E8(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rC(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function E8(e,t,n){return(t=O8(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function O8(e){var t=P8(e,"string");return typeof t=="symbol"?t:t+""}function P8(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Yh=[0,"auto"],ht={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:void 0,height:30,hide:!0,id:0,includeHidden:!1,interval:"preserveEnd",minTickGap:5,mirror:!1,name:void 0,orientation:"bottom",padding:{left:0,right:0},reversed:!1,scale:"auto",tick:!0,tickCount:5,tickFormatter:void 0,ticks:void 0,type:"category",unit:void 0,niceTicks:"auto"},II=(e,t)=>e.cartesianAxis.xAxis[t],Fr=(e,t)=>{var n=II(e,t);return n??ht},mt={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:Yh,hide:!0,id:0,includeHidden:!1,interval:"preserveEnd",minTickGap:5,mirror:!1,name:void 0,orientation:"left",padding:{top:0,bottom:0},reversed:!1,scale:"auto",tick:!0,tickCount:5,tickFormatter:void 0,ticks:void 0,type:"number",unit:void 0,niceTicks:"auto",width:xs},kI=(e,t)=>e.cartesianAxis.yAxis[t],Vr=(e,t)=>{var n=kI(e,t);return n??mt},_8={domain:[0,"auto"],includeHidden:!1,reversed:!1,allowDataOverflow:!1,allowDuplicatedCategory:!1,dataKey:void 0,id:0,name:"",range:[64,64],scale:"auto",type:"number",unit:""},zv=(e,t)=>{var n=e.cartesianAxis.zAxis[t];return n??_8},Yt=(e,t,n)=>{switch(t){case"xAxis":return Fr(e,n);case"yAxis":return Vr(e,n);case"zAxis":return zv(e,n);case"angleAxis":return dv(e,n);case"radiusAxis":return pv(e,n);default:throw new Error("Unexpected axis type: ".concat(t))}},A8=(e,t,n)=>{switch(t){case"xAxis":return Fr(e,n);case"yAxis":return Vr(e,n);default:throw new Error("Unexpected axis type: ".concat(t))}},As=(e,t,n)=>{switch(t){case"xAxis":return Fr(e,n);case"yAxis":return Vr(e,n);case"angleAxis":return dv(e,n);case"radiusAxis":return pv(e,n);default:throw new Error("Unexpected axis type: ".concat(t))}},NI=e=>e.graphicalItems.cartesianItems.some(t=>t.type==="bar")||e.graphicalItems.polarItems.some(t=>t.type==="radialBar");function TI(e,t){return n=>{switch(e){case"xAxis":return"xAxisId"in n&&n.xAxisId===t;case"yAxis":return"yAxisId"in n&&n.yAxisId===t;case"zAxis":return"zAxisId"in n&&n.zAxisId===t;case"angleAxis":return"angleAxisId"in n&&n.angleAxisId===t;case"radiusAxis":return"radiusAxisId"in n&&n.radiusAxisId===t;default:return!1}}}var Bv=e=>e.graphicalItems.cartesianItems,R8=j([Pt,nf],TI),MI=(e,t,n)=>e.filter(n).filter(r=>t?.includeHidden===!0?!0:!r.hide),Rs=j([Bv,Yt,R8],MI,{memoizeOptions:{resultEqualityCheck:af}}),DI=j([Rs],e=>e.filter(t=>t.type==="area"||t.type==="bar").filter(rf)),jI=e=>e.filter(t=>!("stackId"in t)||t.stackId===void 0),I8=j([Rs],jI),$I=e=>e.map(t=>t.data).filter(Boolean).flat(1),k8=j([Rs],$I,{memoizeOptions:{resultEqualityCheck:af}}),LI=(e,t)=>{var{chartData:n=[],dataStartIndex:r,dataEndIndex:o}=t;return e.length>0?e:n.slice(r,o+1)},Hv=j([k8,_R],LI),FI=(e,t,n)=>t?.dataKey!=null?e.map(r=>({value:Mt(r,t.dataKey)})):n.length>0?n.map(r=>r.dataKey).flatMap(r=>e.map(o=>({value:Mt(o,r)}))):e.map(r=>({value:r})),Is=j([Hv,Yt,Rs],FI);function ji(e){if(sr(e)||e instanceof Date){var t=Number(e);if(Ne(t))return t}}function oC(e){if(Array.isArray(e)){var t=[ji(e[0]),ji(e[1])];return nr(t)?t:void 0}var n=ji(e);if(n!=null)return[n,n]}function Nr(e){return e.map(ji).filter(an)}function N8(e,t){var n=ji(e),r=ji(t);return n==null&&r==null?0:n==null?-1:r==null?1:n-r}var T8=j([Is],e=>e?.map(t=>t.value).sort(N8));function VI(e,t){switch(e){case"xAxis":return t.direction==="x";case"yAxis":return t.direction==="y";default:return!1}}function M8(e,t,n){return!n||typeof t!="number"||ar(t)?[]:n.length?Nr(n.flatMap(r=>{var o=Mt(e,r.dataKey),i,a;if(Array.isArray(o)?[i,a]=o:i=a=o,!(!Ne(i)||!Ne(a)))return[t-i,t+a]})):[]}var xt=e=>{var t=_t(e),n=Ji(e);return As(e,t,n)},ks=j([xt],e=>e?.dataKey),D8=j([DI,_R,xt],KR),zI=(e,t,n,r)=>{var o={},i=t.reduce((a,s)=>{if(s.stackId==null)return a;var l=a[s.stackId];return l==null&&(l=[]),l.push(s),a[s.stackId]=l,a},o);return Object.fromEntries(Object.entries(i).map(a=>{var[s,l]=a,u=r?[...l].reverse():l,c=u.map(mv);return[s,{stackedData:NW(e,c,n),graphicalItems:u}]}))},Xh=j([D8,DI,Qc,zR],zI),BI=(e,t,n,r)=>{var{dataStartIndex:o,dataEndIndex:i}=t;if(r==null&&n!=="zAxis"){var a=$W(e,o,i);if(!(a!=null&&a[0]===0&&a[1]===0))return a}},j8=j([Yt],e=>e.allowDataOverflow),Gv=e=>{var t;if(e==null||!("domain"in e))return Yh;if(e.domain!=null)return e.domain;if("ticks"in e&&e.ticks!=null){if(e.type==="number"){var n=Nr(e.ticks);return[Math.min(...n),Math.max(...n)]}if(e.type==="category")return e.ticks.map(String)}return(t=e?.domain)!==null&&t!==void 0?t:Yh},HI=j([Yt],Gv),GI=j([HI,j8],AR),$8=j([Xh,$r,Pt,GI],BI,{memoizeOptions:{resultEqualityCheck:of}}),Wv=e=>e.errorBars,L8=(e,t,n)=>e.flatMap(r=>t[r.id]).filter(Boolean).filter(r=>VI(n,r)),Uu=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var o=n.filter(Boolean);if(o.length!==0){var i=o.flat(),a=Math.min(...i),s=Math.max(...i);return[a,s]}},WI=(e,t,n,r,o)=>{var i,a;if(n.length>0&&e.forEach(s=>{n.forEach(l=>{var u,c,f=(u=r[l.id])===null||u===void 0?void 0:u.filter(y=>VI(o,y)),p=Mt(s,(c=t.dataKey)!==null&&c!==void 0?c:l.dataKey),d=M8(s,p,f);if(d.length>=2){var m=Math.min(...d),g=Math.max(...d);(i==null||m<i)&&(i=m),(a==null||g>a)&&(a=g)}var h=oC(p);h!=null&&(i=i==null?h[0]:Math.min(i,h[0]),a=a==null?h[1]:Math.max(a,h[1]))})}),t?.dataKey!=null&&e.forEach(s=>{var l=oC(Mt(s,t.dataKey));l!=null&&(i=i==null?l[0]:Math.min(i,l[0]),a=a==null?l[1]:Math.max(a,l[1]))}),Ne(i)&&Ne(a))return[i,a]},F8=j([Hv,Yt,I8,Wv,Pt],WI,{memoizeOptions:{resultEqualityCheck:of}});function V8(e){var{value:t}=e;if(sr(t)||t instanceof Date)return t}var z8=(e,t,n)=>{var r=e.map(V8).filter(o=>o!=null);return n&&(t.dataKey==null||t.allowDuplicatedCategory&&J_(r))?OR(0,e.length):t.allowDuplicatedCategory?r:Array.from(new Set(r))},UI=e=>e.referenceElements.dots,ta=(e,t,n)=>e.filter(r=>r.ifOverflow==="extendDomain").filter(r=>t==="xAxis"?r.xAxisId===n:r.yAxisId===n),B8=j([UI,Pt,nf],ta),qI=e=>e.referenceElements.areas,H8=j([qI,Pt,nf],ta),KI=e=>e.referenceElements.lines,G8=j([KI,Pt,nf],ta),YI=(e,t)=>{if(e!=null){var n=Nr(e.map(r=>t==="xAxis"?r.x:r.y));if(n.length!==0)return[Math.min(...n),Math.max(...n)]}},W8=j(B8,Pt,YI),XI=(e,t)=>{if(e!=null){var n=Nr(e.flatMap(r=>[t==="xAxis"?r.x1:r.y1,t==="xAxis"?r.x2:r.y2]));if(n.length!==0)return[Math.min(...n),Math.max(...n)]}},U8=j([H8,Pt],XI);function q8(e){var t;if(e.x!=null)return Nr([e.x]);var n=(t=e.segment)===null||t===void 0?void 0:t.map(r=>r.x);return n==null||n.length===0?[]:Nr(n)}function K8(e){var t;if(e.y!=null)return Nr([e.y]);var n=(t=e.segment)===null||t===void 0?void 0:t.map(r=>r.y);return n==null||n.length===0?[]:Nr(n)}var ZI=(e,t)=>{if(e!=null){var n=e.flatMap(r=>t==="xAxis"?q8(r):K8(r));if(n.length!==0)return[Math.min(...n),Math.max(...n)]}},Y8=j([G8,Pt],ZI),X8=j(W8,Y8,U8,(e,t,n)=>Uu(e,n,t)),QI=(e,t,n,r,o,i,a,s)=>{if(n!=null)return n;var l=a==="vertical"&&s==="xAxis"||a==="horizontal"&&s==="yAxis",u=l?Uu(r,i,o):Uu(i,o);return I4(t,u,e.allowDataOverflow)},Z8=j([Yt,HI,GI,$8,F8,X8,qe,Pt],QI,{memoizeOptions:{resultEqualityCheck:of}}),Q8=[0,1],JI=(e,t,n,r,o,i,a)=>{if(!((e==null||n==null||n.length===0)&&a===void 0)){var{dataKey:s,type:l}=e,u=wo(t,i);if(u&&s==null){var c;return OR(0,(c=n?.length)!==null&&c!==void 0?c:0)}return l==="category"?z8(r,e,u):o==="expand"?Q8:a}},Uv=j([Yt,qe,Hv,Is,Qc,Pt,Z8],JI),na=j([Yt,NI,uv],AI),ek=(e,t,n)=>{var{niceTicks:r}=t;if(r!=="none"){var o=Gv(t),i=Array.isArray(o)&&(o[0]==="auto"||o[1]==="auto");if((r==="snap125"||r==="adaptive")&&t!=null&&t.tickCount&&nr(e)){if(i)return hw(e,t.tickCount,t.allowDecimals,r);if(t.type==="number")return mw(e,t.tickCount,t.allowDecimals,r)}if(r==="auto"&&n==="linear"&&t!=null&&t.tickCount){if(i&&nr(e))return hw(e,t.tickCount,t.allowDecimals,"adaptive");if(t.type==="number"&&nr(e))return mw(e,t.tickCount,t.allowDecimals,"adaptive")}}},qv=j([Uv,As,na],ek),tk=(e,t,n,r)=>{if(r!=="angleAxis"&&e?.type==="number"&&nr(t)&&Array.isArray(n)&&n.length>0){var o,i,a=t[0],s=(o=n[0])!==null&&o!==void 0?o:0,l=t[1],u=(i=n[n.length-1])!==null&&i!==void 0?i:0;return[Math.min(a,s),Math.max(l,u)]}return t},J8=j([Yt,Uv,qv,Pt],tk),e9=j(Is,Yt,(e,t)=>{if(!(!t||t.type!=="number")){var n=1/0,r=Array.from(Nr(e.map(f=>f.value))).sort((f,p)=>f-p),o=r[0],i=r[r.length-1];if(o==null||i==null)return 1/0;var a=i-o;if(a===0)return 1/0;for(var s=0;s<r.length-1;s++){var l=r[s],u=r[s+1];if(!(l==null||u==null)){var c=u-l;n=Math.min(n,c)}}return n/a}}),nk=j(e9,qe,VR,Ot,(e,t,n,r,o)=>o,(e,t,n,r,o)=>{if(!Ne(e))return 0;var i=t==="vertical"?r.height:r.width;if(o==="gap")return e*i/2;if(o==="no-gap"){var a=Bn(n,e*i),s=e*i/2;return s-a-(s-a)/i*a}return 0}),t9=(e,t,n)=>{var r=Fr(e,t);return r==null||typeof r.padding!="string"?0:nk(e,"xAxis",t,n,r.padding)},n9=(e,t,n)=>{var r=Vr(e,t);return r==null||typeof r.padding!="string"?0:nk(e,"yAxis",t,n,r.padding)},r9=j(Fr,t9,(e,t)=>{var n,r;if(e==null)return{left:0,right:0};var{padding:o}=e;return typeof o=="string"?{left:t,right:t}:{left:((n=o.left)!==null&&n!==void 0?n:0)+t,right:((r=o.right)!==null&&r!==void 0?r:0)+t}}),o9=j(Vr,n9,(e,t)=>{var n,r;if(e==null)return{top:0,bottom:0};var{padding:o}=e;return typeof o=="string"?{top:t,bottom:t}:{top:((n=o.top)!==null&&n!==void 0?n:0)+t,bottom:((r=o.bottom)!==null&&r!==void 0?r:0)+t}}),i9=j([Ot,r9,Uc,Wc,(e,t,n)=>n],(e,t,n,r,o)=>{var{padding:i}=r;return o?[i.left,n.width-i.right]:[e.left+t.left,e.left+e.width-t.right]}),a9=j([Ot,qe,o9,Uc,Wc,(e,t,n)=>n],(e,t,n,r,o,i)=>{var{padding:a}=o;return i?[r.height-a.bottom,a.top]:t==="horizontal"?[e.top+e.height-n.bottom,e.top+n.top]:[e.top+n.top,e.top+e.height-n.bottom]}),Ns=(e,t,n,r)=>{var o;switch(t){case"xAxis":return i9(e,n,r);case"yAxis":return a9(e,n,r);case"zAxis":return(o=zv(e,n))===null||o===void 0?void 0:o.range;case"angleAxis":return WR(e);case"radiusAxis":return UR(e,n);default:return}},rk=j([Yt,Ns],Jc),s9=j([na,J8],G4),Kv=j([Yt,na,s9,rk],Vv),ok=(e,t,n,r)=>{if(!(n==null||n.dataKey==null)){var{type:o,scale:i}=n,a=wo(e,r);if(a&&(o==="number"||i!=="auto"))return t.map(s=>s.value)}},Yv=j([qe,Is,As,Pt],ok),pf=j([Kv],gv);j([Kv],S8);j([Kv,T8],RI);j([Rs,Wv,Pt],L8);function ik(e,t){return e.id<t.id?-1:e.id>t.id?1:0}var hf=(e,t)=>t,mf=(e,t,n)=>n,l9=j(Hc,hf,mf,(e,t,n)=>e.filter(r=>r.orientation===t).filter(r=>r.mirror===n).sort(ik)),u9=j(Gc,hf,mf,(e,t,n)=>e.filter(r=>r.orientation===t).filter(r=>r.mirror===n).sort(ik)),ak=(e,t)=>({width:e.width,height:t.height}),c9=(e,t)=>{var n=typeof t.width=="number"?t.width:xs;return{width:n,height:e.height}},sk=j(Ot,Fr,ak),f9=(e,t,n)=>{switch(t){case"top":return e.top;case"bottom":return n-e.bottom;default:return 0}},d9=(e,t,n)=>{switch(t){case"left":return e.left;case"right":return n-e.right;default:return 0}},p9=j(jr,Ot,l9,hf,mf,(e,t,n,r,o)=>{var i={},a;return n.forEach(s=>{var l=ak(t,s);a==null&&(a=f9(t,r,e));var u=r==="top"&&!o||r==="bottom"&&o;i[s.id]=a-Number(u)*l.height,a+=(u?-1:1)*l.height}),i}),h9=j(Dr,Ot,u9,hf,mf,(e,t,n,r,o)=>{var i={},a;return n.forEach(s=>{var l=c9(t,s);a==null&&(a=d9(t,r,e));var u=r==="left"&&!o||r==="right"&&o;i[s.id]=a-Number(u)*l.width,a+=(u?-1:1)*l.width}),i}),m9=(e,t)=>{var n=Fr(e,t);if(n!=null)return p9(e,n.orientation,n.mirror)},g9=j([Ot,Fr,m9,(e,t)=>t],(e,t,n,r)=>{if(t!=null){var o=n?.[r];return o==null?{x:e.left,y:0}:{x:e.left,y:o}}}),v9=(e,t)=>{var n=Vr(e,t);if(n!=null)return h9(e,n.orientation,n.mirror)},y9=j([Ot,Vr,v9,(e,t)=>t],(e,t,n,r)=>{if(t!=null){var o=n?.[r];return o==null?{x:0,y:e.top}:{x:o,y:e.top}}}),lk=j(Ot,Vr,(e,t)=>{var n=typeof t.width=="number"?t.width:xs;return{width:n,height:e.height}}),iC=(e,t,n)=>{switch(t){case"xAxis":return sk(e,n).width;case"yAxis":return lk(e,n).height;default:return}},uk=(e,t,n,r)=>{if(n!=null){var{allowDuplicatedCategory:o,type:i,dataKey:a}=n,s=wo(e,r),l=t.map(u=>u.value);if(a&&s&&i==="category"&&o&&J_(l))return l}},Xv=j([qe,Is,Yt,Pt],uk),aC=j([qe,A8,na,pf,Xv,Yv,Ns,qv,Pt],(e,t,n,r,o,i,a,s,l)=>{if(t!=null){var u=wo(e,l);return{angle:t.angle,interval:t.interval,minTickGap:t.minTickGap,orientation:t.orientation,tick:t.tick,tickCount:t.tickCount,tickFormatter:t.tickFormatter,ticks:t.ticks,type:t.type,unit:t.unit,axisType:l,categoricalDomain:i,duplicateDomain:o,isCategorical:u,niceTicks:s,range:a,realScaleType:n,scale:r}}}),b9=(e,t,n,r,o,i,a,s,l)=>{if(!(t==null||r==null)){var u=wo(e,l),{type:c,ticks:f,tickCount:p}=t,d=n==="scaleBand"&&typeof r.bandwidth=="function"?r.bandwidth()/2:2,m=c==="category"&&r.bandwidth?r.bandwidth()/d:0;m=l==="angleAxis"&&i!=null&&i.length>=2?on(i[0]-i[1])*2*m:m;var g=f||o;return g?g.map((h,y)=>{var b=a?a.indexOf(h):h,x=r.map(b);return Ne(x)?{index:y,coordinate:x+m,value:h,offset:m}:null}).filter(an):u&&s?s.map((h,y)=>{var b=r.map(h);return Ne(b)?{coordinate:b+m,value:h,index:y,offset:m}:null}).filter(an):r.ticks?r.ticks(p).map((h,y)=>{var b=r.map(h);return Ne(b)?{coordinate:b+m,value:h,index:y,offset:m}:null}).filter(an):r.domain().map((h,y)=>{var b=r.map(h);return Ne(b)?{coordinate:b+m,value:a?a[h]:h,index:y,offset:m}:null}).filter(an)}},ck=j([qe,As,na,pf,qv,Ns,Xv,Yv,Pt],b9),x9=(e,t,n,r,o,i,a)=>{if(!(t==null||n==null||r==null||r[0]===r[1])){var s=wo(e,a),{tickCount:l}=t,u=0;return u=a==="angleAxis"&&r?.length>=2?on(r[0]-r[1])*2*u:u,s&&i?i.map((c,f)=>{var p=n.map(c);return Ne(p)?{coordinate:p+u,value:c,index:f,offset:u}:null}).filter(an):n.ticks?n.ticks(l).map((c,f)=>{var p=n.map(c);return Ne(p)?{coordinate:p+u,value:c,index:f,offset:u}:null}).filter(an):n.domain().map((c,f)=>{var p=n.map(c);return Ne(p)?{coordinate:p+u,value:o?o[c]:c,index:f,offset:u}:null}).filter(an)}},Ui=j([qe,As,pf,Ns,Xv,Yv,Pt],x9),qi=j(Yt,pf,(e,t)=>{if(!(e==null||t==null))return Wu(Wu({},e),{},{scale:t})}),w9=j([Yt,na,Uv,rk],Vv),C9=j([w9],gv);j((e,t,n)=>zv(e,n),C9,(e,t)=>{if(!(e==null||t==null))return Wu(Wu({},e),{},{scale:t})});var S9=j([qe,Hc,Gc],(e,t,n)=>{switch(e){case"horizontal":return t.some(r=>r.reversed)?"right-to-left":"left-to-right";case"vertical":return n.some(r=>r.reversed)?"bottom-to-top":"top-to-bottom";case"centric":case"radial":return"left-to-right";default:return}}),E9=(e,t,n)=>{var r;return(r=e.renderedTicks[t])===null||r===void 0?void 0:r[n]};j([E9],e=>{if(!(!e||e.length===0))return t=>{var n,r=1/0,o=e[0];for(var i of e){var a=Math.abs(i.coordinate-t);a<r&&(r=a,o=i)}return(n=o)===null||n===void 0?void 0:n.value}});var fk=e=>e.options.defaultTooltipEventType,dk=e=>e.options.validateTooltipEventTypes;function pk(e,t,n){if(e==null)return t;var r=e?"axis":"item";return n==null?t:n.includes(r)?r:t}function Zv(e,t){var n=fk(e),r=dk(e);return pk(t,n,r)}function O9(e){return me(t=>Zv(t,e))}var hk=(e,t)=>{var n,r=Number(t);if(!(ar(r)||t==null))return r>=0?e==null||(n=e[r])===null||n===void 0?void 0:n.value:void 0},P9=e=>e.tooltip.settings,to={active:!1,index:null,dataKey:void 0,graphicalItemId:void 0,coordinate:void 0},_9={itemInteraction:{click:to,hover:to},axisInteraction:{click:to,hover:to},keyboardInteraction:to,syncInteraction:{active:!1,index:null,dataKey:void 0,label:void 0,coordinate:void 0,sourceViewBox:void 0,graphicalItemId:void 0},tooltipItemPayloads:[],settings:{shared:void 0,trigger:"hover",axisId:0,active:!1,defaultIndex:void 0}},mk=zt({name:"tooltip",initialState:_9,reducers:{addTooltipEntrySettings:{reducer(e,t){e.tooltipItemPayloads.push(t.payload)},prepare:Ye()},replaceTooltipEntrySettings:{reducer(e,t){var{prev:n,next:r}=t.payload,o=An(e).tooltipItemPayloads.indexOf(n);o>-1&&(e.tooltipItemPayloads[o]=r)},prepare:Ye()},removeTooltipEntrySettings:{reducer(e,t){var n=An(e).tooltipItemPayloads.indexOf(t.payload);n>-1&&e.tooltipItemPayloads.splice(n,1)},prepare:Ye()},setTooltipSettingsState(e,t){e.settings=t.payload},setActiveMouseOverItemIndex(e,t){e.syncInteraction.active=!1,e.keyboardInteraction.active=!1,e.itemInteraction.hover.active=!0,e.itemInteraction.hover.index=t.payload.activeIndex,e.itemInteraction.hover.dataKey=t.payload.activeDataKey,e.itemInteraction.hover.graphicalItemId=t.payload.activeGraphicalItemId,e.itemInteraction.hover.coordinate=t.payload.activeCoordinate},mouseLeaveChart(e){e.itemInteraction.hover.active=!1,e.axisInteraction.hover.active=!1},mouseLeaveItem(e){e.itemInteraction.hover.active=!1},setActiveClickItemIndex(e,t){e.syncInteraction.active=!1,e.itemInteraction.click.active=!0,e.keyboardInteraction.active=!1,e.itemInteraction.click.index=t.payload.activeIndex,e.itemInteraction.click.dataKey=t.payload.activeDataKey,e.itemInteraction.click.graphicalItemId=t.payload.activeGraphicalItemId,e.itemInteraction.click.coordinate=t.payload.activeCoordinate},setMouseOverAxisIndex(e,t){e.syncInteraction.active=!1,e.axisInteraction.hover.active=!0,e.keyboardInteraction.active=!1,e.axisInteraction.hover.index=t.payload.activeIndex,e.axisInteraction.hover.dataKey=t.payload.activeDataKey,e.axisInteraction.hover.coordinate=t.payload.activeCoordinate},setMouseClickAxisIndex(e,t){e.syncInteraction.active=!1,e.keyboardInteraction.active=!1,e.axisInteraction.click.active=!0,e.axisInteraction.click.index=t.payload.activeIndex,e.axisInteraction.click.dataKey=t.payload.activeDataKey,e.axisInteraction.click.coordinate=t.payload.activeCoordinate},setSyncInteraction(e,t){e.syncInteraction=t.payload},setKeyboardInteraction(e,t){e.keyboardInteraction.active=t.payload.active,e.keyboardInteraction.index=t.payload.activeIndex,e.keyboardInteraction.coordinate=t.payload.activeCoordinate}}}),{addTooltipEntrySettings:A9,replaceTooltipEntrySettings:R9,removeTooltipEntrySettings:I9,setTooltipSettingsState:k9,setActiveMouseOverItemIndex:gk,mouseLeaveItem:N9,mouseLeaveChart:vk,setActiveClickItemIndex:T9,setMouseOverAxisIndex:yk,setMouseClickAxisIndex:M9,setSyncInteraction:Zh,setKeyboardInteraction:qu}=mk.actions,D9=mk.reducer;function sC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function _l(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?sC(Object(n),!0).forEach(function(r){j9(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):sC(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function j9(e,t,n){return(t=$9(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $9(e){var t=L9(e,"string");return typeof t=="symbol"?t:t+""}function L9(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function F9(e,t,n){return t==="axis"?n==="click"?e.axisInteraction.click:e.axisInteraction.hover:n==="click"?e.itemInteraction.click:e.itemInteraction.hover}function V9(e){return e.index!=null}var bk=(e,t,n,r)=>{if(t==null)return to;var o=F9(e,t,n);if(o==null)return to;if(o.active)return o;if(e.keyboardInteraction.active)return e.keyboardInteraction;if(e.syncInteraction.active&&e.syncInteraction.index!=null)return e.syncInteraction;var i=e.settings.active===!0;if(V9(o)){if(i)return _l(_l({},o),{},{active:!0})}else if(r!=null)return{active:!0,coordinate:void 0,dataKey:void 0,index:r,graphicalItemId:void 0};return _l(_l({},to),{},{coordinate:o.coordinate})};function z9(e){if(typeof e=="number")return Number.isFinite(e)?e:void 0;if(e instanceof Date){var t=e.valueOf();return Number.isFinite(t)?t:void 0}var n=Number(e);return Number.isFinite(n)?n:void 0}function B9(e,t){var n=z9(e),r=t[0],o=t[1];if(n===void 0)return!1;var i=Math.min(r,o),a=Math.max(r,o);return n>=i&&n<=a}function H9(e,t,n){if(n==null||t==null)return!0;var r=Mt(e,t);return r==null||!nr(n)?!0:B9(r,n)}var Qv=(e,t,n,r)=>{var o=e?.index;if(o==null)return null;var i=Number(o);if(!Ne(i))return o;var a=0,s=1/0;t.length>0&&(s=t.length-1);var l=Math.max(a,Math.min(i,s)),u=t[l];return u==null||H9(u,n,r)?String(l):null},xk=(e,t,n,r,o,i,a)=>{if(i!=null){var s=a[0],l=s?.getPosition(i);if(l!=null)return l;var u=o?.[Number(i)];if(u)return n==="horizontal"?{x:u.coordinate,y:(r.top+t)/2}:{x:(r.left+e)/2,y:u.coordinate}}},wk=(e,t,n,r)=>{if(t==="axis")return e.tooltipItemPayloads;if(e.tooltipItemPayloads.length===0)return[];var o;if(n==="hover"?o=e.itemInteraction.hover.graphicalItemId:o=e.itemInteraction.click.graphicalItemId,e.syncInteraction.active&&o==null)return e.tooltipItemPayloads;if(o==null&&r!=null){var i=e.tooltipItemPayloads[0];return i!=null?[i]:[]}return e.tooltipItemPayloads.filter(a=>{var s;return((s=a.settings)===null||s===void 0?void 0:s.graphicalItemId)===o})},Ck=e=>e.options.tooltipPayloadSearcher,ra=e=>e.tooltip;function lC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function uC(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?lC(Object(n),!0).forEach(function(r){G9(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):lC(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function G9(e,t,n){return(t=W9(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function W9(e){var t=U9(e,"string");return typeof t=="symbol"?t:t+""}function U9(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function q9(e){if(typeof e=="string"||typeof e=="number")return e}function K9(e){if(typeof e=="string"||typeof e=="number"||typeof e=="boolean")return e}function Y9(e){if(typeof e=="string"||typeof e=="number")return e;if(typeof e=="function")return t=>e(t)}function cC(e){if(typeof e=="string")return e}function X9(e){if(!(e==null||typeof e!="object")){var t="name"in e?q9(e.name):void 0,n="unit"in e?K9(e.unit):void 0,r="dataKey"in e?Y9(e.dataKey):void 0,o="payload"in e?e.payload:void 0,i="color"in e?cC(e.color):void 0,a="fill"in e?cC(e.fill):void 0;return{name:t,unit:n,dataKey:r,payload:o,color:i,fill:a}}}function Z9(e,t){return e??t}var Sk=(e,t,n,r,o,i,a)=>{if(!(t==null||i==null)){var{chartData:s,computedData:l,dataStartIndex:u,dataEndIndex:c}=n,f=[];return e.reduce((p,d)=>{var m,{dataDefinedOnItem:g,settings:h}=d,y=Z9(g,s),b=Array.isArray(y)?KA(y,u,c):y,x=(m=h?.dataKey)!==null&&m!==void 0?m:r,w=h?.nameKey,S;if(r&&Array.isArray(b)&&!Array.isArray(b[0])&&a==="axis"?S=hH(b,r,o):S=i(b,t,l,w),Array.isArray(S))S.forEach(O=>{var P,N,R=X9(O),k=R?.name,_=R?.dataKey,T=R?.payload,F=uC(uC({},h),{},{name:k,unit:R?.unit,color:(P=R?.color)!==null&&P!==void 0?P:h?.color,fill:(N=R?.fill)!==null&&N!==void 0?N:h?.fill});p.push(r0({tooltipEntrySettings:F,dataKey:_,payload:T,value:Mt(T,_),name:k==null?void 0:String(k)}))});else{var E;p.push(r0({tooltipEntrySettings:h,dataKey:x,payload:S,value:Mt(S,x),name:(E=Mt(S,w))!==null&&E!==void 0?E:h?.name}))}return p},f)}},Jv=j([xt,NI,uv],AI),Q9=j([e=>e.graphicalItems.cartesianItems,e=>e.graphicalItems.polarItems],(e,t)=>[...e,...t]),J9=j([_t,Ji],TI),oa=j([Q9,xt,J9],MI,{memoizeOptions:{resultEqualityCheck:af}}),eY=j([oa],e=>e.filter(rf)),tY=j([oa],$I,{memoizeOptions:{resultEqualityCheck:af}}),ia=j([tY,$r],LI),nY=j([eY,$r,xt],KR),ey=j([ia,xt,oa],FI),Ek=j([xt],Gv),rY=j([xt],e=>e.allowDataOverflow),Ok=j([Ek,rY],AR),oY=j([oa],e=>e.filter(rf)),iY=j([nY,oY,Qc,zR],zI),aY=j([iY,$r,_t,Ok],BI),sY=j([oa],jI),lY=j([ia,xt,sY,Wv,_t],WI,{memoizeOptions:{resultEqualityCheck:of}}),uY=j([UI,_t,Ji],ta),cY=j([uY,_t],YI),fY=j([qI,_t,Ji],ta),dY=j([fY,_t],XI),pY=j([KI,_t,Ji],ta),hY=j([pY,_t],ZI),mY=j([cY,hY,dY],Uu),gY=j([xt,Ek,Ok,aY,lY,mY,qe,_t],QI),Ts=j([xt,qe,ia,ey,Qc,_t,gY],JI),vY=j([Ts,xt,Jv],ek),yY=j([xt,Ts,vY,_t],tk),Pk=e=>{var t=_t(e),n=Ji(e),r=!1;return Ns(e,t,n,r)},_k=j([xt,Pk],Jc),bY=j([xt,Jv,yY,_k],Vv),Ak=j([bY],gv),xY=j([qe,ey,xt,_t],uk),wY=j([qe,ey,xt,_t],ok),CY=(e,t,n,r,o,i,a,s)=>{if(t){var{type:l}=t,u=wo(e,s);if(r){var c=n==="scaleBand"&&r.bandwidth?r.bandwidth()/2:2,f=l==="category"&&r.bandwidth?r.bandwidth()/c:0;return f=s==="angleAxis"&&o!=null&&o?.length>=2?on(o[0]-o[1])*2*f:f,u&&a?a.map((p,d)=>{var m=r.map(p);return Ne(m)?{coordinate:m+f,value:p,index:d,offset:f}:null}).filter(an):r.domain().map((p,d)=>{var m=r.map(p);return Ne(m)?{coordinate:m+f,value:i?i[p]:p,index:d,offset:f}:null}).filter(an)}}},zr=j([qe,xt,Jv,Ak,Pk,xY,wY,_t],CY),ty=j([fk,dk,P9],(e,t,n)=>pk(n.shared,e,t)),Rk=e=>e.tooltip.settings.trigger,ny=e=>e.tooltip.settings.defaultIndex,Ms=j([ra,ty,Rk,ny],bk),Ki=j([Ms,ia,ks,Ts],Qv),Ik=j([zr,Ki],hk),kk=j([Ms],e=>{if(e)return e.dataKey}),SY=j([Ms],e=>{if(e)return e.graphicalItemId}),Nk=j([ra,ty,Rk,ny],wk),EY=j([Dr,jr,qe,Ot,zr,ny,Nk],xk),OY=j([Ms,EY],(e,t)=>e!=null&&e.coordinate?e.coordinate:t),PY=j([Ms],e=>{var t;return(t=e?.active)!==null&&t!==void 0?t:!1}),_Y=j([Nk,Ki,$r,ks,Ik,Ck,ty],Sk);j([_Y],e=>{if(e!=null){var t=e.map(n=>n.payload).filter(n=>n!=null);return Array.from(new Set(t))}});function fC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function dC(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?fC(Object(n),!0).forEach(function(r){AY(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fC(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function AY(e,t,n){return(t=RY(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function RY(e){var t=IY(e,"string");return typeof t=="symbol"?t:t+""}function IY(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var kY=()=>me(xt),NY=()=>{var e=kY(),t=me(zr),n=me(Ak);return Su(!e||!n?void 0:dC(dC({},e),{},{scale:n}),t)};function pC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function xi(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?pC(Object(n),!0).forEach(function(r){TY(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pC(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function TY(e,t,n){return(t=MY(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function MY(e){var t=DY(e,"string");return typeof t=="symbol"?t:t+""}function DY(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var jY=(e,t,n,r)=>{var o=t.find(i=>i&&i.index===n);if(o){if(e==="horizontal")return{x:o.coordinate,y:r.relativeY};if(e==="vertical")return{x:r.relativeX,y:o.coordinate}}return{x:0,y:0}},$Y=(e,t,n,r)=>{var o=t.find(u=>u&&u.index===n);if(o){if(e==="centric"){var i=o.coordinate,{radius:a}=r;return xi(xi(xi({},r),Nt(r.cx,r.cy,a,i)),{},{angle:i,radius:a})}var s=o.coordinate,{angle:l}=r;return xi(xi(xi({},r),Nt(r.cx,r.cy,s,l)),{},{angle:l,radius:s})}return{angle:0,clockWise:!1,cx:0,cy:0,endAngle:0,innerRadius:0,outerRadius:0,radius:0,startAngle:0,x:0,y:0}};function LY(e,t){var{relativeX:n,relativeY:r}=e;return n>=t.left&&n<=t.left+t.width&&r>=t.top&&r<=t.top+t.height}var Tk=(e,t,n,r,o)=>{var i,a=(i=t?.length)!==null&&i!==void 0?i:0;if(a<=1||e==null)return 0;if(r==="angleAxis"&&o!=null&&Math.abs(Math.abs(o[1]-o[0])-360)<=1e-6)for(var s=0;s<a;s++){var l,u,c,f,p,d=s>0?(l=n[s-1])===null||l===void 0?void 0:l.coordinate:(u=n[a-1])===null||u===void 0?void 0:u.coordinate,m=(c=n[s])===null||c===void 0?void 0:c.coordinate,g=s>=a-1?(f=n[0])===null||f===void 0?void 0:f.coordinate:(p=n[s+1])===null||p===void 0?void 0:p.coordinate,h=void 0;if(!(d==null||m==null||g==null))if(on(m-d)!==on(g-m)){var y=[];if(on(g-m)===on(o[1]-o[0])){h=g;var b=m+o[1]-o[0];y[0]=Math.min(b,(b+d)/2),y[1]=Math.max(b,(b+d)/2)}else{h=d;var x=g+o[1]-o[0];y[0]=Math.min(m,(x+m)/2),y[1]=Math.max(m,(x+m)/2)}var w=[Math.min(m,(h+m)/2),Math.max(m,(h+m)/2)];if(e>w[0]&&e<=w[1]||e>=y[0]&&e<=y[1]){var S;return(S=n[s])===null||S===void 0?void 0:S.index}}else{var E=Math.min(d,g),O=Math.max(d,g);if(e>(E+m)/2&&e<=(O+m)/2){var P;return(P=n[s])===null||P===void 0?void 0:P.index}}}else if(t)for(var N=0;N<a;N++){var R=t[N];if(R!=null){var k=t[N+1],_=t[N-1];if(N===0&&k!=null&&e<=(R.coordinate+k.coordinate)/2||N===a-1&&_!=null&&e>(R.coordinate+_.coordinate)/2||N>0&&N<a-1&&_!=null&&k!=null&&e>(R.coordinate+_.coordinate)/2&&e<=(R.coordinate+k.coordinate)/2)return R.index}}return-1},FY=()=>me(uv),ry=(e,t)=>t,Mk=(e,t,n)=>n,oy=(e,t,n,r)=>r,VY=j(zr,e=>Mc(e,t=>t.coordinate)),iy=j([ra,ry,Mk,oy],bk),ay=j([iy,ia,ks,Ts],Qv),zY=(e,t,n)=>{if(t!=null){var r=ra(e);return t==="axis"?n==="hover"?r.axisInteraction.hover.dataKey:r.axisInteraction.click.dataKey:n==="hover"?r.itemInteraction.hover.dataKey:r.itemInteraction.click.dataKey}},Dk=j([ra,ry,Mk,oy],wk),Ku=j([Dr,jr,qe,Ot,zr,oy,Dk],xk),BY=j([iy,Ku],(e,t)=>{var n;return(n=e.coordinate)!==null&&n!==void 0?n:t}),jk=j([zr,ay],hk),HY=j([Dk,ay,$r,ks,jk,Ck,ry],Sk),GY=j([iy,ay],(e,t)=>({isActive:e.active&&t!=null,activeIndex:t})),WY=(e,t,n,r,o,i,a)=>{if(!(!e||!n||!r||!o)&&LY(e,a)){var s=LW(e,t),l=Tk(s,i,o,n,r),u=jY(t,o,l,e);return{activeIndex:String(l),activeCoordinate:u}}},UY=(e,t,n,r,o,i,a)=>{if(!(!e||!r||!o||!i||!n)){var s=b4(e,n);if(s){var l=FW(s,t),u=Tk(l,a,i,r,o),c=$Y(t,i,u,s);return{activeIndex:String(u),activeCoordinate:c}}}},qY=(e,t,n,r,o,i,a,s)=>{if(!(!e||!t||!r||!o||!i))return t==="horizontal"||t==="vertical"?WY(e,t,r,o,i,a,s):UY(e,t,n,r,o,i,a)},KY=j(e=>e.zIndex.zIndexMap,(e,t)=>t,(e,t,n)=>n,(e,t,n)=>{if(t!=null){var r=e[t];if(r!=null)return n?r.panoramaElement:r.element}}),YY=j(e=>e.zIndex.zIndexMap,e=>{var t=Object.keys(e).map(r=>parseInt(r,10)).concat(Object.values(Wt)),n=Array.from(new Set(t));return n.sort((r,o)=>r-o)},{memoizeOptions:{resultEqualityCheck:H4}});function hC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function mC(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?hC(Object(n),!0).forEach(function(r){XY(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):hC(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function XY(e,t,n){return(t=ZY(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ZY(e){var t=QY(e,"string");return typeof t=="symbol"?t:t+""}function QY(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var JY={},e7={zIndexMap:Object.values(Wt).reduce((e,t)=>mC(mC({},e),{},{[t]:{element:void 0,panoramaElement:void 0,consumers:0}}),JY)},t7=new Set(Object.values(Wt));function n7(e){return t7.has(e)}var $k=zt({name:"zIndex",initialState:e7,reducers:{registerZIndexPortal:{reducer:(e,t)=>{var{zIndex:n}=t.payload;e.zIndexMap[n]?e.zIndexMap[n].consumers+=1:e.zIndexMap[n]={consumers:1,element:void 0,panoramaElement:void 0}},prepare:Ye()},unregisterZIndexPortal:{reducer:(e,t)=>{var{zIndex:n}=t.payload;e.zIndexMap[n]&&(e.zIndexMap[n].consumers-=1,e.zIndexMap[n].consumers<=0&&!n7(n)&&delete e.zIndexMap[n])},prepare:Ye()},registerZIndexPortalElement:{reducer:(e,t)=>{var{zIndex:n,element:r,isPanorama:o}=t.payload;e.zIndexMap[n]?o?e.zIndexMap[n].panoramaElement=r:e.zIndexMap[n].element=r:e.zIndexMap[n]={consumers:0,element:o?void 0:r,panoramaElement:o?r:void 0}},prepare:Ye()},unregisterZIndexPortalElement:{reducer:(e,t)=>{var{zIndex:n}=t.payload;e.zIndexMap[n]&&(t.payload.isPanorama?e.zIndexMap[n].panoramaElement=void 0:e.zIndexMap[n].element=void 0)},prepare:Ye()}}}),{registerZIndexPortal:r7,unregisterZIndexPortal:o7,registerZIndexPortalElement:i7,unregisterZIndexPortalElement:a7}=$k.actions,s7=$k.reducer;function Br(e){var{zIndex:t,children:n}=e,r=yU(),o=r&&t!==void 0&&t!==0,i=ln(),a=tt();A.useLayoutEffect(()=>o?(a(r7({zIndex:t})),()=>{a(o7({zIndex:t}))}):li,[a,t,o]);var s=me(l=>KY(l,t,i));return o?s?nc.createPortal(n,s):null:n}function Qh(){return Qh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Qh.apply(null,arguments)}function gC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Al(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?gC(Object(n),!0).forEach(function(r){l7(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gC(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function l7(e,t,n){return(t=u7(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function u7(e){var t=c7(e,"string");return typeof t=="symbol"?t:t+""}function c7(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function f7(e){var{cursor:t,cursorComp:n,cursorProps:r}=e;return A.isValidElement(t)?A.cloneElement(t,r):A.createElement(n,r)}function d7(e){var t,{coordinate:n,payload:r,index:o,offset:i,tooltipAxisBandSize:a,layout:s,cursor:l,tooltipEventType:u,chartName:c}=e,f=n,p=r,d=o;if(!l||!f||c!=="ScatterChart"&&u!=="axis")return null;var m,g,h;if(c==="ScatterChart")m=f,g=Tq,h=Wt.cursorLine;else if(c==="BarChart")m=Mq(s,f,i,a),g=wR,h=Wt.cursorRectangle;else if(s==="radial"&&nA(f)){var{cx:y,cy:b,radius:x,startAngle:w,endAngle:S}=CR(f);m={cx:y,cy:b,startAngle:w,endAngle:S,innerRadius:x,outerRadius:x},g=ER,h=Wt.cursorLine}else m={points:S4(s,f,i)},g=gR,h=Wt.cursorLine;var E=typeof l=="object"&&"className"in l?l.className:void 0,O=Al(Al(Al(Al({stroke:"#ccc",pointerEvents:"none"},i),m),$g(l)),{},{payload:p,payloadIndex:d,className:Ue("recharts-tooltip-cursor",E)});return v.createElement(Br,{zIndex:(t=e.zIndex)!==null&&t!==void 0?t:h},v.createElement(f7,{cursor:l,cursorComp:g,cursorProps:O}))}function p7(e){var t=NY(),n=nR(),r=Xi(),o=FY();return t==null||n==null||r==null||o==null?null:v.createElement(d7,Qh({},e,{offset:n,layout:r,tooltipAxisBandSize:t,chartName:o}))}var Lk=A.createContext(null),h7=()=>A.useContext(Lk),Ep={exports:{}},vC;function m7(){return vC||(vC=1,(function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(n=!1));function o(l,u,c){this.fn=l,this.context=u,this.once=c||!1}function i(l,u,c,f,p){if(typeof c!="function")throw new TypeError("The listener must be a function");var d=new o(c,f||l,p),m=n?n+u:u;return l._events[m]?l._events[m].fn?l._events[m]=[l._events[m],d]:l._events[m].push(d):(l._events[m]=d,l._eventsCount++),l}function a(l,u){--l._eventsCount===0?l._events=new r:delete l._events[u]}function s(){this._events=new r,this._eventsCount=0}s.prototype.eventNames=function(){var u=[],c,f;if(this._eventsCount===0)return u;for(f in c=this._events)t.call(c,f)&&u.push(n?f.slice(1):f);return Object.getOwnPropertySymbols?u.concat(Object.getOwnPropertySymbols(c)):u},s.prototype.listeners=function(u){var c=n?n+u:u,f=this._events[c];if(!f)return[];if(f.fn)return[f.fn];for(var p=0,d=f.length,m=new Array(d);p<d;p++)m[p]=f[p].fn;return m},s.prototype.listenerCount=function(u){var c=n?n+u:u,f=this._events[c];return f?f.fn?1:f.length:0},s.prototype.emit=function(u,c,f,p,d,m){var g=n?n+u:u;if(!this._events[g])return!1;var h=this._events[g],y=arguments.length,b,x;if(h.fn){switch(h.once&&this.removeListener(u,h.fn,void 0,!0),y){case 1:return h.fn.call(h.context),!0;case 2:return h.fn.call(h.context,c),!0;case 3:return h.fn.call(h.context,c,f),!0;case 4:return h.fn.call(h.context,c,f,p),!0;case 5:return h.fn.call(h.context,c,f,p,d),!0;case 6:return h.fn.call(h.context,c,f,p,d,m),!0}for(x=1,b=new Array(y-1);x<y;x++)b[x-1]=arguments[x];h.fn.apply(h.context,b)}else{var w=h.length,S;for(x=0;x<w;x++)switch(h[x].once&&this.removeListener(u,h[x].fn,void 0,!0),y){case 1:h[x].fn.call(h[x].context);break;case 2:h[x].fn.call(h[x].context,c);break;case 3:h[x].fn.call(h[x].context,c,f);break;case 4:h[x].fn.call(h[x].context,c,f,p);break;default:if(!b)for(S=1,b=new Array(y-1);S<y;S++)b[S-1]=arguments[S];h[x].fn.apply(h[x].context,b)}}return!0},s.prototype.on=function(u,c,f){return i(this,u,c,f,!1)},s.prototype.once=function(u,c,f){return i(this,u,c,f,!0)},s.prototype.removeListener=function(u,c,f,p){var d=n?n+u:u;if(!this._events[d])return this;if(!c)return a(this,d),this;var m=this._events[d];if(m.fn)m.fn===c&&(!p||m.once)&&(!f||m.context===f)&&a(this,d);else{for(var g=0,h=[],y=m.length;g<y;g++)(m[g].fn!==c||p&&!m[g].once||f&&m[g].context!==f)&&h.push(m[g]);h.length?this._events[d]=h.length===1?h[0]:h:a(this,d)}return this},s.prototype.removeAllListeners=function(u){var c;return u?(c=n?n+u:u,this._events[c]&&a(this,c)):(this._events=new r,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=n,s.EventEmitter=s,e.exports=s})(Ep)),Ep.exports}var g7=m7();const v7=si(g7);var os=new v7,Jh="recharts.syncEvent.tooltip",yC="recharts.syncEvent.brush",y7=(e,t)=>{if(t&&Array.isArray(e)){var n=Number.parseInt(t,10);if(!ar(n))return e[n]}},b7={chartName:"",tooltipPayloadSearcher:()=>{},eventEmitter:void 0,defaultTooltipEventType:"axis"},Fk=zt({name:"options",initialState:b7,reducers:{createEventEmitter:e=>{e.eventEmitter==null&&(e.eventEmitter=Symbol("rechartsEventEmitter"))}}}),x7=Fk.reducer,{createEventEmitter:w7}=Fk.actions;function C7(e){return e.tooltip.syncInteraction}var S7={chartData:void 0,computedData:void 0,dataStartIndex:0,dataEndIndex:0},Vk=zt({name:"chartData",initialState:S7,reducers:{setChartData(e,t){if(e.chartData=t.payload,t.payload==null){e.dataStartIndex=0,e.dataEndIndex=0;return}t.payload.length>0&&e.dataEndIndex!==t.payload.length-1&&(e.dataEndIndex=t.payload.length-1)},setComputedData(e,t){e.computedData=t.payload},setDataStartEndIndexes(e,t){var{startIndex:n,endIndex:r}=t.payload;n!=null&&(e.dataStartIndex=n),r!=null&&(e.dataEndIndex=r)}}}),{setChartData:bC,setDataStartEndIndexes:E7,setComputedData:Wte}=Vk.actions,O7=Vk.reducer,P7=["x","y"];function xC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function wi(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?xC(Object(n),!0).forEach(function(r){_7(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xC(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function _7(e,t,n){return(t=A7(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function A7(e){var t=R7(e,"string");return typeof t=="symbol"?t:t+""}function R7(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function I7(e,t){if(e==null)return{};var n,r,o=k7(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function k7(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function N7(){var e=me(cv),t=me(fv),n=tt(),r=me(BR),o=me(zr),i=Xi(),a=qc(),s=me(l=>l.rootProps.className);A.useEffect(()=>{if(e==null)return li;var l=(u,c,f)=>{if(t!==f&&e===u){if(r==="index"){var p;if(a&&c!==null&&c!==void 0&&(p=c.payload)!==null&&p!==void 0&&p.coordinate&&c.payload.sourceViewBox){var d=c.payload.coordinate,{x:m,y:g}=d,h=I7(d,P7),{x:y,y:b,width:x,height:w}=c.payload.sourceViewBox,S=wi(wi({},h),{},{x:a.x+(x?(m-y)/x:0)*a.width,y:a.y+(w?(g-b)/w:0)*a.height});n(wi(wi({},c),{},{payload:wi(wi({},c.payload),{},{coordinate:S})}))}else n(c);return}if(o!=null){var E;if(typeof r=="function"){var O={activeTooltipIndex:c.payload.index==null?void 0:Number(c.payload.index),isTooltipActive:c.payload.active,activeIndex:c.payload.index==null?void 0:Number(c.payload.index),activeLabel:c.payload.label,activeDataKey:c.payload.dataKey,activeCoordinate:c.payload.coordinate},P=r(o,O);E=o[P]}else r==="value"&&(E=o.find(D=>String(D.value)===c.payload.label));var{coordinate:N}=c.payload;if(E==null||c.payload.active===!1||N==null||a==null){n(Zh({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:void 0,graphicalItemId:void 0}));return}var{x:R,y:k}=N,_=Math.min(R,a.x+a.width),T=Math.min(k,a.y+a.height),F={x:i==="horizontal"?E.coordinate:_,y:i==="horizontal"?T:E.coordinate},V=Zh({active:c.payload.active,coordinate:F,dataKey:c.payload.dataKey,index:String(E.index),label:c.payload.label,sourceViewBox:c.payload.sourceViewBox,graphicalItemId:c.payload.graphicalItemId});n(V)}}};return os.on(Jh,l),()=>{os.off(Jh,l)}},[s,n,t,e,r,o,i,a])}function T7(){var e=me(cv),t=me(fv),n=tt();A.useEffect(()=>{if(e==null)return li;var r=(o,i,a)=>{t!==a&&e===o&&n(E7(i))};return os.on(yC,r),()=>{os.off(yC,r)}},[n,t,e])}function M7(){var e=tt();A.useEffect(()=>{e(w7())},[e]),N7(),T7()}function D7(e,t,n,r,o,i){var a=me(m=>zY(m,e,t)),s=me(SY),l=me(fv),u=me(cv),c=me(BR),f=me(C7),p=f?.active,d=qc();A.useEffect(()=>{if(!p&&u!=null&&l!=null){var m=Zh({active:i,coordinate:n,dataKey:a,index:o,label:typeof r=="number"?String(r):r,sourceViewBox:d,graphicalItemId:s});os.emit(Jh,u,m,l)}},[p,n,a,s,o,r,l,u,c,i,d])}function wC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function CC(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?wC(Object(n),!0).forEach(function(r){j7(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wC(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function j7(e,t,n){return(t=$7(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $7(e){var t=L7(e,"string");return typeof t=="symbol"?t:t+""}function L7(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function F7(e){return e.dataKey}function V7(e,t){return v.isValidElement(e)?v.cloneElement(e,t):typeof e=="function"?v.createElement(e,t):v.createElement(lq,t)}var SC=[],z7={allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",axisId:0,contentStyle:{},cursor:!0,filterNull:!0,includeHidden:!1,isAnimationActive:"auto",itemSorter:"name",itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,wrapperStyle:{}};function B7(e){var t,n,r=wn(e,z7),{active:o,allowEscapeViewBox:i,animationDuration:a,animationEasing:s,content:l,filterNull:u,isAnimationActive:c,offset:f,payloadUniqBy:p,position:d,reverseDirection:m,useTranslate3d:g,wrapperStyle:h,cursor:y,shared:b,trigger:x,defaultIndex:w,portal:S,axisId:E}=r,O=tt(),P=typeof w=="number"?String(w):w;A.useEffect(()=>{O(k9({shared:b,trigger:x,axisId:E,active:o,defaultIndex:P}))},[O,b,x,E,o,P]);var N=qc(),R=mR(),k=O9(b),{activeIndex:_,isActive:T}=(t=me(Se=>GY(Se,k,x,P)))!==null&&t!==void 0?t:{},F=me(Se=>HY(Se,k,x,P)),V=me(Se=>jk(Se,k,x,P)),D=me(Se=>BY(Se,k,x,P)),B=F,z=h7(),Y=(n=o??T)!==null&&n!==void 0?n:!1,[$,ye]=cG([B,Y]),ae=k==="axis"?V:void 0;D7(k,x,D,ae,_,Y);var be=S??z;if(be==null||N==null||k==null)return null;var ne=B??SC;Y||(ne=SC),u&&ne.length&&(ne=ZH(ne.filter(Se=>Se.value!=null&&(Se.hide!==!0||r.includeHidden)),p,F7));var le=ne.length>0,Ee=CC(CC({},r),{},{payload:ne,label:ae,active:Y,activeIndex:_,coordinate:D,accessibilityLayer:R}),Pe=v.createElement(bq,{allowEscapeViewBox:i,animationDuration:a,animationEasing:s,isAnimationActive:c,active:Y,coordinate:D,hasPayload:le,offset:f,position:d,reverseDirection:m,useTranslate3d:g,viewBox:N,wrapperStyle:h,lastBoundingBox:$,innerRef:ye,hasPortalFromProps:!!S},V7(l,Ee));return v.createElement(v.Fragment,null,nc.createPortal(Pe,be),Y&&v.createElement(p7,{cursor:y,tooltipEventType:k,coordinate:D,payload:ne,index:_}))}var zk=e=>null;zk.displayName="Cell";function H7(e,t,n){return(t=G7(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function G7(e){var t=W7(e,"string");return typeof t=="symbol"?t:t+""}function W7(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}class U7{constructor(t){H7(this,"cache",new Map),this.maxSize=t}get(t){var n=this.cache.get(t);return n!==void 0&&(this.cache.delete(t),this.cache.set(t,n)),n}set(t,n){if(this.cache.has(t))this.cache.delete(t);else if(this.cache.size>=this.maxSize){var r=this.cache.keys().next().value;r!=null&&this.cache.delete(r)}this.cache.set(t,n)}clear(){this.cache.clear()}size(){return this.cache.size}}function EC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function q7(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?EC(Object(n),!0).forEach(function(r){K7(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):EC(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function K7(e,t,n){return(t=Y7(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Y7(e){var t=X7(e,"string");return typeof t=="symbol"?t:t+""}function X7(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Z7={cacheSize:2e3,enableCache:!0},Bk=q7({},Z7),OC=new U7(Bk.cacheSize),Q7={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},PC="recharts_measurement_span";function J7(e,t){var n=t.fontSize||"",r=t.fontFamily||"",o=t.fontWeight||"",i=t.fontStyle||"",a=t.letterSpacing||"",s=t.textTransform||"";return"".concat(e,"|").concat(n,"|").concat(r,"|").concat(o,"|").concat(i,"|").concat(a,"|").concat(s)}var _C=(e,t)=>{try{var n=document.getElementById(PC);n||(n=document.createElement("span"),n.setAttribute("id",PC),n.setAttribute("aria-hidden","true"),document.body.appendChild(n)),Object.assign(n.style,Q7,t),n.textContent="".concat(e);var r=n.getBoundingClientRect();return{width:r.width,height:r.height}}catch{return{width:0,height:0}}},Fa=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||Ss.isSsr)return{width:0,height:0};if(!Bk.enableCache)return _C(t,n);var r=J7(t,n),o=OC.get(r);if(o)return o;var i=_C(t,n);return OC.set(r,i),i},Hk;function eX(e,t,n){return(t=tX(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function tX(e){var t=nX(e,"string");return typeof t=="symbol"?t:t+""}function nX(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var AC=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,RC=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,rX=/^(px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q)$/,oX=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,iX={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},aX=["cm","mm","pt","pc","in","Q","px"];function sX(e){return aX.includes(e)}var Ai="NaN";function lX(e,t){return e*iX[t]}class It{static parse(t){var n,[,r,o]=(n=oX.exec(t))!==null&&n!==void 0?n:[];return r==null?It.NaN:new It(parseFloat(r),o??"")}constructor(t,n){this.num=t,this.unit=n,this.num=t,this.unit=n,ar(t)&&(this.unit=""),n!==""&&!rX.test(n)&&(this.num=NaN,this.unit=""),sX(n)&&(this.num=lX(t,n),this.unit="px")}add(t){return this.unit!==t.unit?new It(NaN,""):new It(this.num+t.num,this.unit)}subtract(t){return this.unit!==t.unit?new It(NaN,""):new It(this.num-t.num,this.unit)}multiply(t){return this.unit!==""&&t.unit!==""&&this.unit!==t.unit?new It(NaN,""):new It(this.num*t.num,this.unit||t.unit)}divide(t){return this.unit!==""&&t.unit!==""&&this.unit!==t.unit?new It(NaN,""):new It(this.num/t.num,this.unit||t.unit)}toString(){return"".concat(this.num).concat(this.unit)}isNaN(){return ar(this.num)}}Hk=It;eX(It,"NaN",new Hk(NaN,""));function Gk(e){if(e==null||e.includes(Ai))return Ai;for(var t=e;t.includes("*")||t.includes("/");){var n,[,r,o,i]=(n=AC.exec(t))!==null&&n!==void 0?n:[],a=It.parse(r??""),s=It.parse(i??""),l=o==="*"?a.multiply(s):a.divide(s);if(l.isNaN())return Ai;t=t.replace(AC,l.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var u,[,c,f,p]=(u=RC.exec(t))!==null&&u!==void 0?u:[],d=It.parse(c??""),m=It.parse(p??""),g=f==="+"?d.add(m):d.subtract(m);if(g.isNaN())return Ai;t=t.replace(RC,g.toString())}return t}var IC=/\(([^()]*)\)/;function uX(e){for(var t=e,n;(n=IC.exec(t))!=null;){var[,r]=n;t=t.replace(IC,Gk(r))}return t}function cX(e){var t=e.replace(/\s+/g,"");return t=uX(t),t=Gk(t),t}function fX(e){try{return cX(e)}catch{return Ai}}function Op(e){var t=fX(e.slice(5,-1));return t===Ai?"":t}var dX=["x","y","lineHeight","capHeight","fill","scaleToFit","textAnchor","verticalAnchor"],pX=["dx","dy","angle","className","breakAll"];function em(){return em=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},em.apply(null,arguments)}function kC(e,t){if(e==null)return{};var n,r,o=hX(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function hX(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var Wk=/[ \f\n\r\t\v\u2028\u2029]+/,Uk=e=>{var{children:t,breakAll:n,style:r}=e;try{var o=[];yt(t)||(n?o=t.toString().split(""):o=t.toString().split(Wk));var i=o.map(s=>({word:s,width:Fa(s,r).width})),a=n?0:Fa(" ",r).width;return{wordsWithComputedWidth:i,spaceWidth:a}}catch{return null}};function qk(e){return e==="start"||e==="middle"||e==="end"||e==="inherit"}function mX(e){return yt(e)||typeof e=="string"||typeof e=="number"||typeof e=="boolean"}var Kk=(e,t,n,r)=>e.reduce((o,i)=>{var{word:a,width:s}=i,l=o[o.length-1];if(l&&s!=null&&(t==null||r||l.width+s+n<Number(t)))l.words.push(a),l.width+=s+n;else{var u={words:[a],width:s};o.push(u)}return o},[]),Yk=e=>e.reduce((t,n)=>t.width>n.width?t:n),gX="…",NC=(e,t,n,r,o,i,a,s)=>{var l=e.slice(0,t),u=Uk({breakAll:n,style:r,children:l+gX});if(!u)return[!1,[]];var c=Kk(u.wordsWithComputedWidth,i,a,s),f=c.length>o||Yk(c).width>Number(i);return[f,c]},vX=(e,t,n,r,o)=>{var{maxLines:i,children:a,style:s,breakAll:l}=e,u=ce(i),c=String(a),f=Kk(t,r,n,o);if(!u||o)return f;var p=f.length>i||Yk(f).width>Number(r);if(!p)return f;for(var d=0,m=c.length-1,g=0,h;d<=m&&g<=c.length-1;){var y=Math.floor((d+m)/2),b=y-1,[x,w]=NC(c,b,l,s,i,r,n,o),[S]=NC(c,y,l,s,i,r,n,o);if(!x&&!S&&(d=y+1),x&&S&&(m=y-1),!x&&S){h=w;break}g++}return h||f},TC=e=>{var t=yt(e)?[]:e.toString().split(Wk);return[{words:t,width:void 0}]},yX=e=>{var{width:t,scaleToFit:n,children:r,style:o,breakAll:i,maxLines:a}=e;if((t||n)&&!Ss.isSsr){var s,l,u=Uk({breakAll:i,children:r,style:o});if(u){var{wordsWithComputedWidth:c,spaceWidth:f}=u;s=c,l=f}else return TC(r);return vX({breakAll:i,children:r,maxLines:a,style:o},s,l,t,!!n)}return TC(r)},Xk="#808080",bX={angle:0,breakAll:!1,capHeight:"0.71em",fill:Xk,lineHeight:"1em",scaleToFit:!1,textAnchor:"start",verticalAnchor:"end",x:0,y:0},sy=A.forwardRef((e,t)=>{var n=wn(e,bX),{x:r,y:o,lineHeight:i,capHeight:a,fill:s,scaleToFit:l,textAnchor:u,verticalAnchor:c}=n,f=kC(n,dX),p=A.useMemo(()=>yX({breakAll:f.breakAll,children:f.children,maxLines:f.maxLines,scaleToFit:l,style:f.style,width:f.width}),[f.breakAll,f.children,f.maxLines,l,f.style,f.width]),{dx:d,dy:m,angle:g,className:h,breakAll:y}=f,b=kC(f,pX);if(!sr(r)||!sr(o)||p.length===0)return null;var x=Number(r)+(ce(d)?d:0),w=Number(o)+(ce(m)?m:0);if(!Ne(x)||!Ne(w))return null;var S;switch(c){case"start":S=Op("calc(".concat(a,")"));break;case"middle":S=Op("calc(".concat((p.length-1)/2," * -").concat(i," + (").concat(a," / 2))"));break;default:S=Op("calc(".concat(p.length-1," * -").concat(i,")"));break}var E=[],O=p[0];if(l&&O!=null){var P=O.width,{width:N}=f;E.push("scale(".concat(ce(N)&&ce(P)?N/P:1,")"))}return g&&E.push("rotate(".concat(g,", ").concat(x,", ").concat(w,")")),E.length&&(b.transform=E.join(" ")),v.createElement("text",em({},kn(b),{ref:t,x,y:w,className:Ue("recharts-text",h),textAnchor:u,fill:s.includes("url")?Xk:s}),p.map((R,k)=>{var _=R.words.join(y?"":" ");return v.createElement("tspan",{x,dy:k===0?S:i,key:"".concat(_,"-").concat(k)},_)}))});sy.displayName="Text";function MC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Xn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?MC(Object(n),!0).forEach(function(r){xX(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):MC(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function xX(e,t,n){return(t=wX(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function wX(e){var t=CX(e,"string");return typeof t=="symbol"?t:t+""}function CX(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var SX=e=>{var{viewBox:t,position:n,offset:r=0,parentViewBox:o}=e,{x:i,y:a,height:s,upperWidth:l,lowerWidth:u}=tv(t),c=i,f=i+(l-u)/2,p=(c+f)/2,d=(l+u)/2,m=c+l/2,g=s>=0?1:-1,h=g*r,y=g>0?"end":"start",b=g>0?"start":"end",x=l>=0?1:-1,w=x*r,S=x>0?"end":"start",E=x>0?"start":"end",O=o;if(n==="top"){var P={x:c+l/2,y:a-h,horizontalAnchor:"middle",verticalAnchor:y};return O&&(P.height=Math.max(a-O.y,0),P.width=l),P}if(n==="bottom"){var N={x:f+u/2,y:a+s+h,horizontalAnchor:"middle",verticalAnchor:b};return O&&(N.height=Math.max(O.y+O.height-(a+s),0),N.width=u),N}if(n==="left"){var R={x:p-w,y:a+s/2,horizontalAnchor:S,verticalAnchor:"middle"};return O&&(R.width=Math.max(R.x-O.x,0),R.height=s),R}if(n==="right"){var k={x:p+d+w,y:a+s/2,horizontalAnchor:E,verticalAnchor:"middle"};return O&&(k.width=Math.max(O.x+O.width-k.x,0),k.height=s),k}var _=O?{width:d,height:s}:{};return n==="insideLeft"?Xn({x:p+w,y:a+s/2,horizontalAnchor:E,verticalAnchor:"middle"},_):n==="insideRight"?Xn({x:p+d-w,y:a+s/2,horizontalAnchor:S,verticalAnchor:"middle"},_):n==="insideTop"?Xn({x:c+l/2,y:a+h,horizontalAnchor:"middle",verticalAnchor:b},_):n==="insideBottom"?Xn({x:f+u/2,y:a+s-h,horizontalAnchor:"middle",verticalAnchor:y},_):n==="insideTopLeft"?Xn({x:c+w,y:a+h,horizontalAnchor:E,verticalAnchor:b},_):n==="insideTopRight"?Xn({x:c+l-w,y:a+h,horizontalAnchor:S,verticalAnchor:b},_):n==="insideBottomLeft"?Xn({x:f+w,y:a+s-h,horizontalAnchor:E,verticalAnchor:y},_):n==="insideBottomRight"?Xn({x:f+u-w,y:a+s-h,horizontalAnchor:S,verticalAnchor:y},_):n&&typeof n=="object"&&(ce(n.x)||Qo(n.x))&&(ce(n.y)||Qo(n.y))?Xn({x:i+Bn(n.x,d),y:a+Bn(n.y,s),horizontalAnchor:"end",verticalAnchor:"end"},_):Xn({x:m,y:a+s/2,horizontalAnchor:"middle",verticalAnchor:"middle"},_)},EX=["labelRef"],OX=["content"];function DC(e,t){if(e==null)return{};var n,r,o=PX(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function PX(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function jC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Ia(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?jC(Object(n),!0).forEach(function(r){_X(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):jC(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function _X(e,t,n){return(t=AX(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function AX(e){var t=RX(e,"string");return typeof t=="symbol"?t:t+""}function RX(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function yr(){return yr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},yr.apply(null,arguments)}var Zk=A.createContext(null),IX=e=>{var{x:t,y:n,upperWidth:r,lowerWidth:o,width:i,height:a,children:s}=e,l=A.useMemo(()=>({x:t,y:n,upperWidth:r,lowerWidth:o,width:i,height:a}),[t,n,r,o,i,a]);return v.createElement(Zk.Provider,{value:l},s)},Qk=()=>{var e=A.useContext(Zk),t=qc();return e||(t?tv(t):void 0)},kX=A.createContext(null),NX=()=>{var e=A.useContext(kX),t=me(qR);return e||t},TX=e=>{var{value:t,formatter:n}=e,r=yt(e.children)?t:e.children;return typeof n=="function"?n(r):r},ly=e=>e!=null&&typeof e=="function",MX=(e,t)=>{var n=on(t-e),r=Math.min(Math.abs(t-e),360);return n*r},DX=(e,t,n,r,o)=>{var{offset:i,className:a}=e,{cx:s,cy:l,innerRadius:u,outerRadius:c,startAngle:f,endAngle:p,clockWise:d}=o,m=(u+c)/2,g=MX(f,p),h=g>=0?1:-1,y,b;switch(t){case"insideStart":y=f+h*i,b=d;break;case"insideEnd":y=p-h*i,b=!d;break;case"end":y=p+h*i,b=d;break;default:throw new Error("Unsupported position ".concat(t))}b=g<=0?b:!b;var x=Nt(s,l,m,y),w=Nt(s,l,m,y+(b?1:-1)*359),S="M".concat(x.x,",").concat(x.y,`
207
+ A`).concat(m,",").concat(m,",0,1,").concat(b?0:1,`,
208
+ `).concat(w.x,",").concat(w.y),E=yt(e.id)?Wa("recharts-radial-line-"):e.id;return v.createElement("text",yr({},r,{dominantBaseline:"central",className:Ue("recharts-radial-bar-label",a)}),v.createElement("defs",null,v.createElement("path",{id:E,d:S})),v.createElement("textPath",{xlinkHref:"#".concat(E)},n))},jX=(e,t,n)=>{var{cx:r,cy:o,innerRadius:i,outerRadius:a,startAngle:s,endAngle:l}=e,u=(s+l)/2;if(n==="outside"){var{x:c,y:f}=Nt(r,o,a+t,u);return{x:c,y:f,textAnchor:c>=r?"start":"end",verticalAnchor:"middle"}}if(n==="center")return{x:r,y:o,textAnchor:"middle",verticalAnchor:"middle"};if(n==="centerTop")return{x:r,y:o,textAnchor:"middle",verticalAnchor:"start"};if(n==="centerBottom")return{x:r,y:o,textAnchor:"middle",verticalAnchor:"end"};var p=(i+a)/2,{x:d,y:m}=Nt(r,o,p,u);return{x:d,y:m,textAnchor:"middle",verticalAnchor:"middle"}},Vl=e=>e!=null&&"cx"in e&&ce(e.cx),$X={angle:0,offset:5,zIndex:Wt.label,position:"middle",textBreakAll:!1};function LX(e){if(!Vl(e))return e;var{cx:t,cy:n,outerRadius:r}=e,o=r*2;return{x:t-r,y:n-r,width:o,upperWidth:o,lowerWidth:o,height:o}}function eo(e){var t=wn(e,$X),{viewBox:n,parentViewBox:r,position:o,value:i,children:a,content:s,className:l="",textBreakAll:u,labelRef:c}=t,f=NX(),p=Qk(),d=o==="center"?p:f??p,m,g,h;n==null?m=d:Vl(n)?m=n:m=tv(n);var y=LX(m);if(!m||yt(i)&&yt(a)&&!A.isValidElement(s)&&typeof s!="function")return null;var b=Ia(Ia({},t),{},{viewBox:m});if(A.isValidElement(s)){var{labelRef:x}=b,w=DC(b,EX);return A.cloneElement(s,w)}if(typeof s=="function"){var{content:S}=b,E=DC(b,OX);if(g=A.createElement(s,E),A.isValidElement(g))return g}else g=TX(t);var O=kn(t);if(Vl(m)){if(o==="insideStart"||o==="insideEnd"||o==="end")return DX(t,o,g,O,m);h=jX(m,t.offset,t.position)}else{if(!y)return null;var P=SX({viewBox:y,position:o,offset:t.offset,parentViewBox:Vl(r)?void 0:r});h=Ia(Ia({x:P.x,y:P.y,textAnchor:P.horizontalAnchor,verticalAnchor:P.verticalAnchor},P.width!==void 0?{width:P.width}:{}),P.height!==void 0?{height:P.height}:{})}return v.createElement(Br,{zIndex:t.zIndex},v.createElement(sy,yr({ref:c,className:Ue("recharts-label",l)},O,h,{textAnchor:qk(O.textAnchor)?O.textAnchor:h.textAnchor,breakAll:u}),g))}eo.displayName="Label";var FX=(e,t,n)=>{if(!e)return null;var r={viewBox:t,labelRef:n};return e===!0?v.createElement(eo,yr({key:"label-implicit"},r)):sr(e)?v.createElement(eo,yr({key:"label-implicit",value:e},r)):A.isValidElement(e)?e.type===eo?A.cloneElement(e,Ia({key:"label-implicit"},r)):v.createElement(eo,yr({key:"label-implicit",content:e},r)):ly(e)?v.createElement(eo,yr({key:"label-implicit",content:e},r)):e&&typeof e=="object"?v.createElement(eo,yr({},e,{key:"label-implicit"},r)):null};function VX(e){var{label:t,labelRef:n}=e,r=Qk();return FX(t,r,n)||null}var zX=["valueAccessor"],BX=["dataKey","clockWise","id","textBreakAll","zIndex"];function Yu(){return Yu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Yu.apply(null,arguments)}function $C(e,t){if(e==null)return{};var n,r,o=HX(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function HX(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var GX=e=>{var t=Array.isArray(e.value)?e.value[e.value.length-1]:e.value;if(mX(t))return t},Jk=A.createContext(void 0),WX=Jk.Provider,eN=A.createContext(void 0);eN.Provider;function UX(){return A.useContext(Jk)}function qX(){return A.useContext(eN)}function zl(e){var{valueAccessor:t=GX}=e,n=$C(e,zX),{dataKey:r,clockWise:o,id:i,textBreakAll:a,zIndex:s}=n,l=$C(n,BX),u=UX(),c=qX(),f=u||c;return!f||!f.length?null:v.createElement(Br,{zIndex:s??Wt.label},v.createElement(ir,{className:"recharts-label-list"},f.map((p,d)=>{var m,g=yt(r)?t(p,d):Mt(p.payload,r),h=yt(i)?{}:{id:"".concat(i,"-").concat(d)};return v.createElement(eo,Yu({key:"label-".concat(d)},kn(p),l,h,{fill:(m=n.fill)!==null&&m!==void 0?m:p.fill,parentViewBox:p.parentViewBox,value:g,textBreakAll:a,viewBox:p.viewBox,index:d,zIndex:0}))})))}zl.displayName="LabelList";function KX(e){var{label:t}=e;return t?t===!0?v.createElement(zl,{key:"labelList-implicit"}):v.isValidElement(t)||ly(t)?v.createElement(zl,{key:"labelList-implicit",content:t}):typeof t=="object"?v.createElement(zl,Yu({key:"labelList-implicit"},t,{type:String(t.type)})):null:null}var YX={radiusAxis:{},angleAxis:{}},tN=zt({name:"polarAxis",initialState:YX,reducers:{addRadiusAxis(e,t){e.radiusAxis[t.payload.id]=t.payload},removeRadiusAxis(e,t){delete e.radiusAxis[t.payload.id]},addAngleAxis(e,t){e.angleAxis[t.payload.id]=t.payload},removeAngleAxis(e,t){delete e.angleAxis[t.payload.id]}}}),{addRadiusAxis:Ute,removeRadiusAxis:qte,addAngleAxis:Kte,removeAngleAxis:Yte}=tN.actions,XX=tN.reducer;function ZX(e){return e&&typeof e=="object"&&"className"in e&&typeof e.className=="string"?e.className:""}var Rl={exports:{}},Be={};var LC;function QX(){if(LC)return Be;LC=1;var e=60103,t=60106,n=60107,r=60108,o=60114,i=60109,a=60110,s=60112,l=60113,u=60120,c=60115,f=60116,p=60121,d=60122,m=60117,g=60129,h=60131;if(typeof Symbol=="function"&&Symbol.for){var y=Symbol.for;e=y("react.element"),t=y("react.portal"),n=y("react.fragment"),r=y("react.strict_mode"),o=y("react.profiler"),i=y("react.provider"),a=y("react.context"),s=y("react.forward_ref"),l=y("react.suspense"),u=y("react.suspense_list"),c=y("react.memo"),f=y("react.lazy"),p=y("react.block"),d=y("react.server.block"),m=y("react.fundamental"),g=y("react.debug_trace_mode"),h=y("react.legacy_hidden")}function b(T){if(typeof T=="object"&&T!==null){var F=T.$$typeof;switch(F){case e:switch(T=T.type,T){case n:case o:case r:case l:case u:return T;default:switch(T=T&&T.$$typeof,T){case a:case s:case f:case c:case i:return T;default:return F}}case t:return F}}}var x=i,w=e,S=s,E=n,O=f,P=c,N=t,R=o,k=r,_=l;return Be.ContextConsumer=a,Be.ContextProvider=x,Be.Element=w,Be.ForwardRef=S,Be.Fragment=E,Be.Lazy=O,Be.Memo=P,Be.Portal=N,Be.Profiler=R,Be.StrictMode=k,Be.Suspense=_,Be.isAsyncMode=function(){return!1},Be.isConcurrentMode=function(){return!1},Be.isContextConsumer=function(T){return b(T)===a},Be.isContextProvider=function(T){return b(T)===i},Be.isElement=function(T){return typeof T=="object"&&T!==null&&T.$$typeof===e},Be.isForwardRef=function(T){return b(T)===s},Be.isFragment=function(T){return b(T)===n},Be.isLazy=function(T){return b(T)===f},Be.isMemo=function(T){return b(T)===c},Be.isPortal=function(T){return b(T)===t},Be.isProfiler=function(T){return b(T)===o},Be.isStrictMode=function(T){return b(T)===r},Be.isSuspense=function(T){return b(T)===l},Be.isValidElementType=function(T){return typeof T=="string"||typeof T=="function"||T===n||T===o||T===g||T===r||T===l||T===u||T===h||typeof T=="object"&&T!==null&&(T.$$typeof===f||T.$$typeof===c||T.$$typeof===i||T.$$typeof===a||T.$$typeof===s||T.$$typeof===m||T.$$typeof===p||T[0]===d)},Be.typeOf=b,Be}var He={};var FC;function JX(){return FC||(FC=1,process.env.NODE_ENV!=="production"&&(function(){var e=60103,t=60106,n=60107,r=60108,o=60114,i=60109,a=60110,s=60112,l=60113,u=60120,c=60115,f=60116,p=60121,d=60122,m=60117,g=60129,h=60131;if(typeof Symbol=="function"&&Symbol.for){var y=Symbol.for;e=y("react.element"),t=y("react.portal"),n=y("react.fragment"),r=y("react.strict_mode"),o=y("react.profiler"),i=y("react.provider"),a=y("react.context"),s=y("react.forward_ref"),l=y("react.suspense"),u=y("react.suspense_list"),c=y("react.memo"),f=y("react.lazy"),p=y("react.block"),d=y("react.server.block"),m=y("react.fundamental"),y("react.scope"),y("react.opaque.id"),g=y("react.debug_trace_mode"),y("react.offscreen"),h=y("react.legacy_hidden")}var b=!1;function x(G){return!!(typeof G=="string"||typeof G=="function"||G===n||G===o||G===g||G===r||G===l||G===u||G===h||b||typeof G=="object"&&G!==null&&(G.$$typeof===f||G.$$typeof===c||G.$$typeof===i||G.$$typeof===a||G.$$typeof===s||G.$$typeof===m||G.$$typeof===p||G[0]===d))}function w(G){if(typeof G=="object"&&G!==null){var I=G.$$typeof;switch(I){case e:var W=G.type;switch(W){case n:case o:case r:case l:case u:return W;default:var H=W&&W.$$typeof;switch(H){case a:case s:case f:case c:case i:return H;default:return I}}case t:return I}}}var S=a,E=i,O=e,P=s,N=n,R=f,k=c,_=t,T=o,F=r,V=l,D=!1,B=!1;function z(G){return D||(D=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")),!1}function Y(G){return B||(B=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),!1}function $(G){return w(G)===a}function ye(G){return w(G)===i}function ae(G){return typeof G=="object"&&G!==null&&G.$$typeof===e}function be(G){return w(G)===s}function ne(G){return w(G)===n}function le(G){return w(G)===f}function Ee(G){return w(G)===c}function Pe(G){return w(G)===t}function Se(G){return w(G)===o}function L(G){return w(G)===r}function U(G){return w(G)===l}He.ContextConsumer=S,He.ContextProvider=E,He.Element=O,He.ForwardRef=P,He.Fragment=N,He.Lazy=R,He.Memo=k,He.Portal=_,He.Profiler=T,He.StrictMode=F,He.Suspense=V,He.isAsyncMode=z,He.isConcurrentMode=Y,He.isContextConsumer=$,He.isContextProvider=ye,He.isElement=ae,He.isForwardRef=be,He.isFragment=ne,He.isLazy=le,He.isMemo=Ee,He.isPortal=Pe,He.isProfiler=Se,He.isStrictMode=L,He.isSuspense=U,He.isValidElementType=x,He.typeOf=w})()),He}var VC;function eZ(){return VC||(VC=1,process.env.NODE_ENV==="production"?Rl.exports=QX():Rl.exports=JX()),Rl.exports}var tZ=eZ(),zC=e=>typeof e=="string"?e:e?e.displayName||e.name||"Component":"",BC=null,Pp=null,nN=e=>{if(e===BC&&Array.isArray(Pp))return Pp;var t=[];return A.Children.forEach(e,n=>{yt(n)||(tZ.isFragment(n)?t=t.concat(nN(n.props.children)):t.push(n))}),Pp=t,BC=e,t};function nZ(e,t){var n=[],r=[];return Array.isArray(t)?r=t.map(o=>zC(o)):r=[zC(t)],nN(e).forEach(o=>{var i=Vi(o,"type.displayName")||Vi(o,"type.name");i&&r.indexOf(i)!==-1&&n.push(o)}),n}var _p={},HC;function rZ(){return HC||(HC=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){if(typeof n!="object"||n==null)return!1;if(Object.getPrototypeOf(n)===null)return!0;if(Object.prototype.toString.call(n)!=="[object Object]"){const o=n[Symbol.toStringTag];return o==null||!Object.getOwnPropertyDescriptor(n,Symbol.toStringTag)?.writable?!1:n.toString()===`[object ${o}]`}let r=n;for(;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return Object.getPrototypeOf(n)===r}e.isPlainObject=t})(_p)),_p}var Ap,GC;function oZ(){return GC||(GC=1,Ap=rZ().isPlainObject),Ap}var iZ=oZ();const aZ=si(iZ);var WC,UC,qC,KC,YC;function XC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function ZC(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?XC(Object(n),!0).forEach(function(r){sZ(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):XC(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function sZ(e,t,n){return(t=lZ(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function lZ(e){var t=uZ(e,"string");return typeof t=="symbol"?t:t+""}function uZ(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Xu(){return Xu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Xu.apply(null,arguments)}function Sa(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var QC=(e,t,n,r,o)=>{var i=n-r,a;return a=it(WC||(WC=Sa(["M ",",",""])),e,t),a+=it(UC||(UC=Sa(["L ",",",""])),e+n,t),a+=it(qC||(qC=Sa(["L ",",",""])),e+n-i/2,t+o),a+=it(KC||(KC=Sa(["L ",",",""])),e+n-i/2-r,t+o),a+=it(YC||(YC=Sa(["L ",","," Z"])),e,t),a},cZ={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},fZ=e=>{var t=wn(e,cZ),{x:n,y:r,upperWidth:o,lowerWidth:i,height:a,className:s}=t,{animationEasing:l,animationDuration:u,animationBegin:c,isUpdateAnimationActive:f}=t,p=A.useRef(null),[d,m]=A.useState(-1),g=A.useRef(o),h=A.useRef(i),y=A.useRef(a),b=A.useRef(n),x=A.useRef(r),w=iv(e,"trapezoid-");if(A.useEffect(()=>{if(p.current&&p.current.getTotalLength)try{var F=p.current.getTotalLength();F&&m(F)}catch{}},[]),n!==+n||r!==+r||o!==+o||i!==+i||a!==+a||o===0&&i===0||a===0)return null;var S=Ue("recharts-trapezoid",s);if(!f)return v.createElement("g",null,v.createElement("path",Xu({},kn(t),{className:S,d:QC(n,r,o,i,a)})));var E=g.current,O=h.current,P=y.current,N=b.current,R=x.current,k="0px ".concat(d===-1?1:d,"px"),_="".concat(d,"px ").concat(d,"px"),T=vR(["strokeDasharray"],u,l);return v.createElement(ov,{animationId:w,key:w,canBegin:d>0,duration:u,easing:l,isActive:f,begin:c},F=>{var V=kt(E,o,F),D=kt(O,i,F),B=kt(P,a,F),z=kt(N,n,F),Y=kt(R,r,F);p.current&&(g.current=V,h.current=D,y.current=B,b.current=z,x.current=Y);var $=F>0?{transition:T,strokeDasharray:_}:{strokeDasharray:k};return v.createElement("path",Xu({},kn(t),{className:S,d:QC(z,Y,V,D,B),ref:p,style:ZC(ZC({},$),t.style)}))})},dZ=["option","shapeType","activeClassName","inActiveClassName"];function pZ(e,t){if(e==null)return{};var n,r,o=hZ(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function hZ(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function JC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Zu(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?JC(Object(n),!0).forEach(function(r){mZ(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):JC(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function mZ(e,t,n){return(t=gZ(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function gZ(e){var t=vZ(e,"string");return typeof t=="symbol"?t:t+""}function vZ(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function yZ(e,t){return Zu(Zu({},t),e)}function bZ(e,t){return e==="symbols"}function eS(e){var{shapeType:t,elementProps:n}=e;switch(t){case"rectangle":return v.createElement(wR,n);case"trapezoid":return v.createElement(fZ,n);case"sector":return v.createElement(ER,n);case"symbols":if(bZ(t))return v.createElement(tA,n);break;case"curve":return v.createElement(gR,n);default:return null}}function xZ(e){return A.isValidElement(e)?e.props:e}function wZ(e){var{option:t,shapeType:n,activeClassName:r="recharts-active-shape",inActiveClassName:o="recharts-shape"}=e,i=pZ(e,dZ),a;if(A.isValidElement(t))a=A.cloneElement(t,Zu(Zu({},i),xZ(t)));else if(typeof t=="function")a=t(i,i.index);else if(aZ(t)&&typeof t!="boolean"){var s=yZ(t,i);a=v.createElement(eS,{shapeType:n,elementProps:s})}else{var l=i;a=v.createElement(eS,{shapeType:n,elementProps:l})}return i.isActive?v.createElement(ir,{className:r},a):v.createElement(ir,{className:o},a)}var rN=(e,t,n)=>{var r=tt();return(o,i)=>a=>{e?.(o,i,a),r(gk({activeIndex:String(i),activeDataKey:t,activeCoordinate:o.tooltipPosition,activeGraphicalItemId:n}))}},oN=e=>{var t=tt();return(n,r)=>o=>{e?.(n,r,o),t(N9())}},iN=(e,t,n)=>{var r=tt();return(o,i)=>a=>{e?.(o,i,a),r(T9({activeIndex:String(i),activeDataKey:t,activeCoordinate:o.tooltipPosition,activeGraphicalItemId:n}))}};function CZ(e){var{tooltipEntrySettings:t}=e,n=tt(),r=ln(),o=A.useRef(null);return A.useLayoutEffect(()=>{r||(o.current===null?n(A9(t)):o.current!==t&&n(R9({prev:o.current,next:t})),o.current=t)},[t,n,r]),A.useLayoutEffect(()=>()=>{o.current&&(n(I9(o.current)),o.current=null)},[n]),null}function SZ(e){var{legendPayload:t}=e,n=tt(),r=ln(),o=A.useRef(null);return A.useLayoutEffect(()=>{r||(o.current===null?n(NU(t)):o.current!==t&&n(TU({prev:o.current,next:t})),o.current=t)},[n,r,t]),A.useLayoutEffect(()=>()=>{o.current&&(n(MU(o.current)),o.current=null)},[n]),null}var Rp,EZ=()=>{var[e]=v.useState(()=>Wa("uid-"));return e},OZ=(Rp=v.useId)!==null&&Rp!==void 0?Rp:EZ;function PZ(e,t){var n=OZ();return t||(e?"".concat(e,"-").concat(n):n)}var _Z=A.createContext(void 0),AZ=e=>{var{id:t,type:n,children:r}=e,o=PZ("recharts-".concat(n),t);return v.createElement(_Z.Provider,{value:o},r(o))},RZ={cartesianItems:[],polarItems:[]},aN=zt({name:"graphicalItems",initialState:RZ,reducers:{addCartesianGraphicalItem:{reducer(e,t){e.cartesianItems.push(t.payload)},prepare:Ye()},replaceCartesianGraphicalItem:{reducer(e,t){var{prev:n,next:r}=t.payload,o=An(e).cartesianItems.indexOf(n);o>-1&&(e.cartesianItems[o]=r)},prepare:Ye()},removeCartesianGraphicalItem:{reducer(e,t){var n=An(e).cartesianItems.indexOf(t.payload);n>-1&&e.cartesianItems.splice(n,1)},prepare:Ye()},addPolarGraphicalItem:{reducer(e,t){e.polarItems.push(t.payload)},prepare:Ye()},removePolarGraphicalItem:{reducer(e,t){var n=An(e).polarItems.indexOf(t.payload);n>-1&&e.polarItems.splice(n,1)},prepare:Ye()},replacePolarGraphicalItem:{reducer(e,t){var{prev:n,next:r}=t.payload,o=An(e).polarItems.indexOf(n);o>-1&&(e.polarItems[o]=r)},prepare:Ye()}}}),{addCartesianGraphicalItem:IZ,replaceCartesianGraphicalItem:kZ,removeCartesianGraphicalItem:NZ,addPolarGraphicalItem:Xte,removePolarGraphicalItem:Zte,replacePolarGraphicalItem:Qte}=aN.actions,TZ=aN.reducer,MZ=e=>{var t=tt(),n=A.useRef(null);return A.useLayoutEffect(()=>{n.current===null?t(IZ(e)):n.current!==e&&t(kZ({prev:n.current,next:e})),n.current=e},[t,e]),A.useLayoutEffect(()=>()=>{n.current&&(t(NZ(n.current)),n.current=null)},[t]),null},DZ=A.memo(MZ);function tS(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function nS(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?tS(Object(n),!0).forEach(function(r){jZ(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):tS(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function jZ(e,t,n){return(t=$Z(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $Z(e){var t=LZ(e,"string");return typeof t=="symbol"?t:t+""}function LZ(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var sN=0,FZ={xAxis:{},yAxis:{},zAxis:{}},lN=zt({name:"cartesianAxis",initialState:FZ,reducers:{addXAxis:{reducer(e,t){e.xAxis[t.payload.id]=t.payload},prepare:Ye()},replaceXAxis:{reducer(e,t){var{prev:n,next:r}=t.payload;e.xAxis[n.id]!==void 0&&(n.id!==r.id&&delete e.xAxis[n.id],e.xAxis[r.id]=r)},prepare:Ye()},removeXAxis:{reducer(e,t){delete e.xAxis[t.payload.id]},prepare:Ye()},addYAxis:{reducer(e,t){e.yAxis[t.payload.id]=t.payload},prepare:Ye()},replaceYAxis:{reducer(e,t){var{prev:n,next:r}=t.payload;e.yAxis[n.id]!==void 0&&(n.id!==r.id&&delete e.yAxis[n.id],e.yAxis[r.id]=r)},prepare:Ye()},removeYAxis:{reducer(e,t){delete e.yAxis[t.payload.id]},prepare:Ye()},addZAxis:{reducer(e,t){e.zAxis[t.payload.id]=t.payload},prepare:Ye()},replaceZAxis:{reducer(e,t){var{prev:n,next:r}=t.payload;e.zAxis[n.id]!==void 0&&(n.id!==r.id&&delete e.zAxis[n.id],e.zAxis[r.id]=r)},prepare:Ye()},removeZAxis:{reducer(e,t){delete e.zAxis[t.payload.id]},prepare:Ye()},updateYAxisWidth(e,t){var{id:n,width:r}=t.payload,o=e.yAxis[n];if(o){var i,a=o.widthHistory||[];if(a.length===3&&a[0]===a[2]&&r===a[1]&&r!==o.width&&Math.abs(r-((i=a[0])!==null&&i!==void 0?i:0))<=1)return;var s=[...a,r].slice(-3);e.yAxis[n]=nS(nS({},o),{},{width:r,widthHistory:s})}}}}),{addXAxis:VZ,replaceXAxis:zZ,removeXAxis:BZ,addYAxis:HZ,replaceYAxis:GZ,removeYAxis:WZ,addZAxis:Jte,replaceZAxis:ene,removeZAxis:tne,updateYAxisWidth:UZ}=lN.actions,qZ=lN.reducer,KZ=j([Ot],e=>({top:e.top,bottom:e.bottom,left:e.left,right:e.right})),YZ=j([KZ,Dr,jr],(e,t,n)=>{if(!(!e||t==null||n==null))return{x:e.left,y:e.top,width:Math.max(0,t-e.left-e.right),height:Math.max(0,n-e.top-e.bottom)}}),uN=()=>me(YZ),rS=(e,t,n)=>{var r=n??e;if(!yt(r))return Bn(r,t,0)},XZ=(e,t,n)=>{var r={},o=e.filter(rf),i=e.filter(u=>u.stackId==null),a=o.reduce((u,c)=>{var f=u[c.stackId];return f==null&&(f=[]),f.push(c),u[c.stackId]=f,u},r),s=Object.entries(a).map(u=>{var c,[f,p]=u,d=p.map(g=>g.dataKey),m=rS(t,n,(c=p[0])===null||c===void 0?void 0:c.barSize);return{stackId:f,dataKeys:d,barSize:m}}),l=i.map(u=>{var c=[u.dataKey].filter(p=>p!=null),f=rS(t,n,u.barSize);return{stackId:void 0,dataKeys:c,barSize:f}});return[...s,...l]};function oS(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Il(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?oS(Object(n),!0).forEach(function(r){ZZ(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):oS(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ZZ(e,t,n){return(t=QZ(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function QZ(e){var t=JZ(e,"string");return typeof t=="symbol"?t:t+""}function JZ(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function eQ(e,t,n,r,o){var i,a=r.length;if(!(a<1)){var s=Bn(e,n,0,!0),l,u=[];if(Ne((i=r[0])===null||i===void 0?void 0:i.barSize)){var c=!1,f=n/a,p=r.reduce((b,x)=>b+(x.barSize||0),0);p+=(a-1)*s,p>=n&&(p-=(a-1)*s,s=0),p>=n&&f>0&&(c=!0,f*=.9,p=a*f);var d=(n-p)/2>>0,m={offset:d-s,size:0};l=r.reduce((b,x)=>{var w,S={stackId:x.stackId,dataKeys:x.dataKeys,position:{offset:m.offset+m.size+s,size:c?f:(w=x.barSize)!==null&&w!==void 0?w:0}},E=[...b,S];return m=S.position,E},u)}else{var g=Bn(t,n,0,!0);n-2*g-(a-1)*s<=0&&(s=0);var h=(n-2*g-(a-1)*s)/a;h>1&&(h>>=0);var y=Ne(o)?Math.min(h,o):h;l=r.reduce((b,x,w)=>[...b,{stackId:x.stackId,dataKeys:x.dataKeys,position:{offset:g+(h+s)*w+(h-y)/2,size:y}}],u)}return l}}var tQ=(e,t,n,r,o,i,a)=>{var s=yt(a)?t:a,l=eQ(n,r,o!==i?o:i,e,s);return o!==i&&l!=null&&(l=l.map(u=>Il(Il({},u),{},{position:Il(Il({},u.position),{},{offset:u.position.offset-o/2})}))),l},nQ=(e,t)=>{var n=mv(t);if(!(!e||n==null||t==null)){var{stackId:r}=t;if(r!=null){var o=e[r];if(o){var{stackedData:i}=o;if(i)return i.find(a=>a.key===n)}}}},rQ=(e,t)=>{if(!(e==null||t==null)){var n=e.find(r=>r.stackId===t.stackId&&t.dataKey!=null&&r.dataKeys.includes(t.dataKey));if(n!=null)return n.position}};function oQ(e,t){return e&&typeof e=="object"&&"zIndex"in e&&typeof e.zIndex=="number"&&Ne(e.zIndex)?e.zIndex:t}var iQ=e=>{var{chartData:t}=e,n=tt(),r=ln();return A.useEffect(()=>r?()=>{}:(n(bC(t)),()=>{n(bC(void 0))}),[t,n,r]),null},iS={x:0,y:0,width:0,height:0,padding:{top:0,right:0,bottom:0,left:0}},cN=zt({name:"brush",initialState:iS,reducers:{setBrushSettings(e,t){return t.payload==null?iS:t.payload}}}),{setBrushSettings:nne}=cN.actions,aQ=cN.reducer;function sQ(e){return(e%180+180)%180}var lQ=function(t){var{width:n,height:r}=t,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,i=sQ(o),a=i*Math.PI/180,s=Math.atan(r/n),l=a>s&&a<Math.PI-s?r/Math.sin(a):n/Math.cos(a);return Math.abs(l)},uQ={dots:[],areas:[],lines:[]},fN=zt({name:"referenceElements",initialState:uQ,reducers:{addDot:(e,t)=>{e.dots.push(t.payload)},removeDot:(e,t)=>{var n=An(e).dots.findIndex(r=>r===t.payload);n!==-1&&e.dots.splice(n,1)},addArea:(e,t)=>{e.areas.push(t.payload)},removeArea:(e,t)=>{var n=An(e).areas.findIndex(r=>r===t.payload);n!==-1&&e.areas.splice(n,1)},addLine:(e,t)=>{e.lines.push(t.payload)},removeLine:(e,t)=>{var n=An(e).lines.findIndex(r=>r===t.payload);n!==-1&&e.lines.splice(n,1)}}}),{addDot:rne,removeDot:one,addArea:ine,removeArea:ane,addLine:sne,removeLine:lne}=fN.actions,cQ=fN.reducer,fQ=A.createContext(void 0),dQ=e=>{var{children:t}=e,[n]=A.useState("".concat(Wa("recharts"),"-clip")),r=uN();if(r==null)return null;var{x:o,y:i,width:a,height:s}=r;return v.createElement(fQ.Provider,{value:n},v.createElement("defs",null,v.createElement("clipPath",{id:n},v.createElement("rect",{x:o,y:i,height:s,width:a}))),t)};function dN(e,t){if(t<1)return[];if(t===1)return e;for(var n=[],r=0;r<e.length;r+=t){var o=e[r];o!==void 0&&n.push(o)}return n}function pQ(e,t,n){var r={width:e.width+t.width,height:e.height+t.height};return lQ(r,n)}function hQ(e,t,n){var r=n==="width",{x:o,y:i,width:a,height:s}=e;return t===1?{start:r?o:i,end:r?o+a:i+s}:{start:r?o+a:i+s,end:r?o:i}}function is(e,t,n,r,o){if(e*t<e*r||e*t>e*o)return!1;var i=n();return e*(t-e*i/2-r)>=0&&e*(t+e*i/2-o)<=0}function mQ(e,t){return dN(e,t+1)}function gQ(e,t,n,r,o){for(var i=(r||[]).slice(),{start:a,end:s}=t,l=0,u=1,c=a,f=function(){var m=r?.[l];if(m===void 0)return{v:dN(r,u)};var g=l,h,y=()=>(h===void 0&&(h=n(m,g)),h),b=m.coordinate,x=l===0||is(e,b,y,c,s);x||(l=0,c=a,u+=1),x&&(c=b+e*(y()/2+o),l+=u)},p;u<=i.length;)if(p=f(),p)return p.v;return[]}function vQ(e,t,n,r,o){var i=(r||[]).slice(),a=i.length;if(a===0)return[];for(var{start:s,end:l}=t,u=1;u<=a;u++){for(var c=(a-1)%u,f=s,p=!0,d=function(){var w=r[g];if(w==null)return 0;var S=g,E,O=()=>(E===void 0&&(E=n(w,S)),E),P=w.coordinate,N=g===c||is(e,P,O,f,l);if(!N)return p=!1,1;N&&(f=P+e*(O()/2+o))},m,g=c;g<a&&(m=d(),!(m!==0&&m===1));g+=u);if(p){for(var h=[],y=c;y<a;y+=u){var b=r[y];b!=null&&h.push(b)}return h}}return[]}function aS(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Ft(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?aS(Object(n),!0).forEach(function(r){yQ(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):aS(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function yQ(e,t,n){return(t=bQ(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function bQ(e){var t=xQ(e,"string");return typeof t=="symbol"?t:t+""}function xQ(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function wQ(e,t,n,r,o){for(var i=(r||[]).slice(),a=i.length,{start:s}=t,{end:l}=t,u=function(p){var d=i[p];if(d==null)return 1;var m=d,g,h=()=>(g===void 0&&(g=n(d,p)),g);if(p===a-1){var y=e*(m.coordinate+e*h()/2-l);i[p]=m=Ft(Ft({},m),{},{tickCoord:y>0?m.coordinate-y*e:m.coordinate})}else i[p]=m=Ft(Ft({},m),{},{tickCoord:m.coordinate});if(m.tickCoord!=null){var b=is(e,m.tickCoord,h,s,l);b&&(l=m.tickCoord-e*(h()/2+o),i[p]=Ft(Ft({},m),{},{isShow:!0}))}},c=a-1;c>=0;c--)u(c);return i}function CQ(e,t,n,r,o,i){var a=(r||[]).slice(),s=a.length,{start:l,end:u}=t;if(i){var c=r[s-1];if(c!=null){var f=n(c,s-1),p=e*(c.coordinate+e*f/2-u);if(a[s-1]=c=Ft(Ft({},c),{},{tickCoord:p>0?c.coordinate-p*e:c.coordinate}),c.tickCoord!=null){var d=is(e,c.tickCoord,()=>f,l,u);d&&(u=c.tickCoord-e*(f/2+o),a[s-1]=Ft(Ft({},c),{},{isShow:!0}))}}}for(var m=i?s-1:s,g=function(b){var x=a[b];if(x==null)return 1;var w=x,S,E=()=>(S===void 0&&(S=n(x,b)),S);if(b===0){var O=e*(w.coordinate-e*E()/2-l);a[b]=w=Ft(Ft({},w),{},{tickCoord:O<0?w.coordinate-O*e:w.coordinate})}else a[b]=w=Ft(Ft({},w),{},{tickCoord:w.coordinate});if(w.tickCoord!=null){var P=is(e,w.tickCoord,E,l,u);P&&(l=w.tickCoord+e*(E()/2+o),a[b]=Ft(Ft({},w),{},{isShow:!0}))}},h=0;h<m;h++)g(h);return a}function uy(e,t,n){var{tick:r,ticks:o,viewBox:i,minTickGap:a,orientation:s,interval:l,tickFormatter:u,unit:c,angle:f}=e;if(!o||!o.length||!r)return[];if(ce(l)||Ss.isSsr){var p;return(p=mQ(o,ce(l)?l:0))!==null&&p!==void 0?p:[]}var d=[],m=s==="top"||s==="bottom"?"width":"height",g=c&&m==="width"?Fa(c,{fontSize:t,letterSpacing:n}):{width:0,height:0},h=(S,E)=>{var O=typeof u=="function"?u(S.value,E):S.value;return m==="width"?pQ(Fa(O,{fontSize:t,letterSpacing:n}),g,f):Fa(O,{fontSize:t,letterSpacing:n})[m]},y=o[0],b=o[1],x=o.length>=2&&y!=null&&b!=null?on(b.coordinate-y.coordinate):1,w=hQ(i,x,m);return l==="equidistantPreserveStart"?gQ(x,w,h,o,a):l==="equidistantPreserveEnd"?vQ(x,w,h,o,a):(l==="preserveStart"||l==="preserveStartEnd"?d=CQ(x,w,h,o,a,l==="preserveStartEnd"):d=wQ(x,w,h,o,a),d.filter(S=>S.isShow))}var SQ=e=>{var{ticks:t,label:n,labelGapWithTick:r=5,tickSize:o=0,tickMargin:i=0}=e,a=0;if(t){Array.from(t).forEach(c=>{if(c){var f=c.getBoundingClientRect();f.width>a&&(a=f.width)}});var s=n?n.getBoundingClientRect().width:0,l=o+i,u=a+l+s+(n?r:0);return Math.round(u)}return 0},EQ={xAxis:{},yAxis:{}},pN=zt({name:"renderedTicks",initialState:EQ,reducers:{setRenderedTicks:(e,t)=>{var{axisType:n,axisId:r,ticks:o}=t.payload;e[n][r]=o},removeRenderedTicks:(e,t)=>{var{axisType:n,axisId:r}=t.payload;delete e[n][r]}}}),{setRenderedTicks:OQ,removeRenderedTicks:PQ}=pN.actions,_Q=pN.reducer,AQ=["axisLine","width","height","className","hide","ticks","axisType","axisId"];function RQ(e,t){if(e==null)return{};var n,r,o=IQ(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function IQ(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function ri(){return ri=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ri.apply(null,arguments)}function sS(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function ot(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?sS(Object(n),!0).forEach(function(r){kQ(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):sS(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function kQ(e,t,n){return(t=NQ(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function NQ(e){var t=TQ(e,"string");return typeof t=="symbol"?t:t+""}function TQ(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Er={x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd",zIndex:Wt.axis};function MQ(e){var{x:t,y:n,width:r,height:o,orientation:i,mirror:a,axisLine:s,otherSvgProps:l}=e;if(!s)return null;var u=ot(ot(ot({},l),_r(s)),{},{fill:"none"});if(i==="top"||i==="bottom"){var c=+(i==="top"&&!a||i==="bottom"&&a);u=ot(ot({},u),{},{x1:t,y1:n+c*o,x2:t+r,y2:n+c*o})}else{var f=+(i==="left"&&!a||i==="right"&&a);u=ot(ot({},u),{},{x1:t+f*r,y1:n,x2:t+f*r,y2:n+o})}return v.createElement("line",ri({},u,{className:Ue("recharts-cartesian-axis-line",Vi(s,"className"))}))}function DQ(e,t,n,r,o,i,a,s,l){var u,c,f,p,d,m,g=s?-1:1,h=e.tickSize||a,y=ce(e.tickCoord)?e.tickCoord:e.coordinate;switch(i){case"top":u=c=e.coordinate,p=n+ +!s*o,f=p-g*h,m=f-g*l,d=y;break;case"left":f=p=e.coordinate,c=t+ +!s*r,u=c-g*h,d=u-g*l,m=y;break;case"right":f=p=e.coordinate,c=t+ +s*r,u=c+g*h,d=u+g*l,m=y;break;default:u=c=e.coordinate,p=n+ +s*o,f=p+g*h,m=f+g*l,d=y;break}return{line:{x1:u,y1:f,x2:c,y2:p},tick:{x:d,y:m}}}function jQ(e,t){switch(e){case"left":return t?"start":"end";case"right":return t?"end":"start";default:return"middle"}}function $Q(e,t){switch(e){case"left":case"right":return"middle";case"top":return t?"start":"end";default:return t?"end":"start"}}function LQ(e){var{option:t,tickProps:n,value:r}=e,o,i=Ue(n.className,"recharts-cartesian-axis-tick-value");if(v.isValidElement(t))o=v.cloneElement(t,ot(ot({},n),{},{className:i}));else if(typeof t=="function")o=t(ot(ot({},n),{},{className:i}));else{var a="recharts-cartesian-axis-tick-value";typeof t!="boolean"&&(a=Ue(a,ZX(t))),o=v.createElement(sy,ri({},n,{className:a}),r)}return o}function FQ(e){var{ticks:t,axisType:n,axisId:r}=e,o=tt();return A.useEffect(()=>{if(r==null||n==null)return li;var i=t.map(a=>({value:a.value,coordinate:a.coordinate,offset:a.offset,index:a.index}));return o(OQ({ticks:i,axisId:r,axisType:n})),()=>{o(PQ({axisId:r,axisType:n}))}},[o,t,r,n]),null}var VQ=A.forwardRef((e,t)=>{var{ticks:n=[],tick:r,tickLine:o,stroke:i,tickFormatter:a,unit:s,padding:l,tickTextProps:u,orientation:c,mirror:f,x:p,y:d,width:m,height:g,tickSize:h,tickMargin:y,fontSize:b,letterSpacing:x,getTicksConfig:w,events:S,axisType:E,axisId:O}=e,P=uy(ot(ot({},w),{},{ticks:n}),b,x),N=_r(w),R=$g(r),k=qk(N.textAnchor)?N.textAnchor:jQ(c,f),_=$Q(c,f),T={};typeof o=="object"&&(T=o);var F=ot(ot({},N),{},{fill:"none"},T),V=P.map(z=>ot({entry:z},DQ(z,p,d,m,g,c,h,f,y))),D=V.map(z=>{var{entry:Y,line:$}=z;return v.createElement(ir,{className:"recharts-cartesian-axis-tick",key:"tick-".concat(Y.value,"-").concat(Y.coordinate,"-").concat(Y.tickCoord)},o&&v.createElement("line",ri({},F,$,{className:Ue("recharts-cartesian-axis-tick-line",Vi(o,"className"))})))}),B=V.map((z,Y)=>{var $,ye,{entry:ae,tick:be}=z,ne=ot(ot(ot(ot({verticalAnchor:_},N),{},{textAnchor:k,stroke:"none",fill:i},be),{},{index:Y,payload:ae,visibleTicksCount:P.length,tickFormatter:a,padding:l},u),{},{angle:($=(ye=u?.angle)!==null&&ye!==void 0?ye:N.angle)!==null&&$!==void 0?$:0}),le=ot(ot({},ne),R);return v.createElement(ir,ri({className:"recharts-cartesian-axis-tick-label",key:"tick-label-".concat(ae.value,"-").concat(ae.coordinate,"-").concat(ae.tickCoord)},Gg(S,ae,Y)),r&&v.createElement(LQ,{option:r,tickProps:le,value:"".concat(typeof a=="function"?a(ae.value,Y):ae.value).concat(s||"")}))});return v.createElement("g",{className:"recharts-cartesian-axis-ticks recharts-".concat(E,"-ticks")},v.createElement(FQ,{ticks:P,axisId:O,axisType:E}),B.length>0&&v.createElement(Br,{zIndex:Wt.label},v.createElement("g",{className:"recharts-cartesian-axis-tick-labels recharts-".concat(E,"-tick-labels"),ref:t},B)),D.length>0&&v.createElement("g",{className:"recharts-cartesian-axis-tick-lines recharts-".concat(E,"-tick-lines")},D))}),zQ=A.forwardRef((e,t)=>{var{axisLine:n,width:r,height:o,className:i,hide:a,ticks:s,axisType:l,axisId:u}=e,c=RQ(e,AQ),[f,p]=A.useState(""),[d,m]=A.useState(""),g=A.useRef(null);A.useImperativeHandle(t,()=>({getCalculatedWidth:()=>{var y;return SQ({ticks:g.current,label:(y=e.labelRef)===null||y===void 0?void 0:y.current,labelGapWithTick:5,tickSize:e.tickSize,tickMargin:e.tickMargin})}}));var h=A.useCallback(y=>{if(y){var b=y.getElementsByClassName("recharts-cartesian-axis-tick-value");g.current=b;var x=b[0];if(x){var w=window.getComputedStyle(x),S=w.fontSize,E=w.letterSpacing;(S!==f||E!==d)&&(p(S),m(E))}}},[f,d]);return a||r!=null&&r<=0||o!=null&&o<=0?null:v.createElement(Br,{zIndex:e.zIndex},v.createElement(ir,{className:Ue("recharts-cartesian-axis",i)},v.createElement(MQ,{x:e.x,y:e.y,width:r,height:o,orientation:e.orientation,mirror:e.mirror,axisLine:n,otherSvgProps:_r(e)}),v.createElement(VQ,{ref:h,axisType:l,events:c,fontSize:f,getTicksConfig:e,height:e.height,letterSpacing:d,mirror:e.mirror,orientation:e.orientation,padding:e.padding,stroke:e.stroke,tick:e.tick,tickFormatter:e.tickFormatter,tickLine:e.tickLine,tickMargin:e.tickMargin,tickSize:e.tickSize,tickTextProps:e.tickTextProps,ticks:s,unit:e.unit,width:e.width,x:e.x,y:e.y,axisId:u}),v.createElement(IX,{x:e.x,y:e.y,width:e.width,height:e.height,lowerWidth:e.width,upperWidth:e.width},v.createElement(VX,{label:e.label,labelRef:e.labelRef}),e.children)))}),cy=v.forwardRef((e,t)=>{var n=wn(e,Er);return v.createElement(zQ,ri({},n,{ref:t}))});cy.displayName="CartesianAxis";var BQ=["x1","y1","x2","y2","key"],HQ=["offset"],GQ=["xAxisId","yAxisId"],WQ=["xAxisId","yAxisId"];function lS(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Vt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?lS(Object(n),!0).forEach(function(r){UQ(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):lS(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function UQ(e,t,n){return(t=qQ(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function qQ(e){var t=KQ(e,"string");return typeof t=="symbol"?t:t+""}function KQ(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function zo(){return zo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},zo.apply(null,arguments)}function Qu(e,t){if(e==null)return{};var n,r,o=YQ(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function YQ(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var XQ=e=>{var{fill:t}=e;if(!t||t==="none")return null;var{fillOpacity:n,x:r,y:o,width:i,height:a,ry:s}=e;return v.createElement("rect",{x:r,y:o,ry:s,width:i,height:a,stroke:"none",fill:t,fillOpacity:n,className:"recharts-cartesian-grid-bg"})};function hN(e){var{option:t,lineItemProps:n}=e,r;if(v.isValidElement(t))r=v.cloneElement(t,n);else if(typeof t=="function")r=t(n);else{var o,{x1:i,y1:a,x2:s,y2:l,key:u}=n,c=Qu(n,BQ),f=(o=_r(c))!==null&&o!==void 0?o:{},{offset:p}=f,d=Qu(f,HQ);r=v.createElement("line",zo({},d,{x1:i,y1:a,x2:s,y2:l,fill:"none",key:u}))}return r}function ZQ(e){var{x:t,width:n,horizontal:r=!0,horizontalPoints:o}=e;if(!r||!o||!o.length)return null;var{xAxisId:i,yAxisId:a}=e,s=Qu(e,GQ),l=o.map((u,c)=>{var f=Vt(Vt({},s),{},{x1:t,y1:u,x2:t+n,y2:u,key:"line-".concat(c),index:c});return v.createElement(hN,{key:"line-".concat(c),option:r,lineItemProps:f})});return v.createElement("g",{className:"recharts-cartesian-grid-horizontal"},l)}function QQ(e){var{y:t,height:n,vertical:r=!0,verticalPoints:o}=e;if(!r||!o||!o.length)return null;var{xAxisId:i,yAxisId:a}=e,s=Qu(e,WQ),l=o.map((u,c)=>{var f=Vt(Vt({},s),{},{x1:u,y1:t,x2:u,y2:t+n,key:"line-".concat(c),index:c});return v.createElement(hN,{option:r,lineItemProps:f,key:"line-".concat(c)})});return v.createElement("g",{className:"recharts-cartesian-grid-vertical"},l)}function JQ(e){var{horizontalFill:t,fillOpacity:n,x:r,y:o,width:i,height:a,horizontalPoints:s,horizontal:l=!0}=e;if(!l||!t||!t.length||s==null)return null;var u=s.map(f=>Math.round(f+o-o)).sort((f,p)=>f-p);o!==u[0]&&u.unshift(0);var c=u.map((f,p)=>{var d=u[p+1],m=d==null,g=m?o+a-f:d-f;if(g<=0)return null;var h=p%t.length;return v.createElement("rect",{key:"react-".concat(p),y:f,x:r,height:g,width:i,stroke:"none",fill:t[h],fillOpacity:n,className:"recharts-cartesian-grid-bg"})});return v.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},c)}function eJ(e){var{vertical:t=!0,verticalFill:n,fillOpacity:r,x:o,y:i,width:a,height:s,verticalPoints:l}=e;if(!t||!n||!n.length)return null;var u=l.map(f=>Math.round(f+o-o)).sort((f,p)=>f-p);o!==u[0]&&u.unshift(0);var c=u.map((f,p)=>{var d=u[p+1],m=d==null,g=m?o+a-f:d-f;if(g<=0)return null;var h=p%n.length;return v.createElement("rect",{key:"react-".concat(p),x:f,y:i,width:g,height:s,stroke:"none",fill:n[h],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return v.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},c)}var tJ=(e,t)=>{var{xAxis:n,width:r,height:o,offset:i}=e;return YA(uy(Vt(Vt(Vt({},Er),n),{},{ticks:XA(n),viewBox:{x:0,y:0,width:r,height:o}})),i.left,i.left+i.width,t)},nJ=(e,t)=>{var{yAxis:n,width:r,height:o,offset:i}=e;return YA(uy(Vt(Vt(Vt({},Er),n),{},{ticks:XA(n),viewBox:{x:0,y:0,width:r,height:o}})),i.top,i.top+i.height,t)},rJ={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[],xAxisId:0,yAxisId:0,syncWithTicks:!1,zIndex:Wt.grid};function mN(e){var t=rR(),n=oR(),r=nR(),o=Vt(Vt({},wn(e,rJ)),{},{x:ce(e.x)?e.x:r.left,y:ce(e.y)?e.y:r.top,width:ce(e.width)?e.width:r.width,height:ce(e.height)?e.height:r.height}),{xAxisId:i,yAxisId:a,x:s,y:l,width:u,height:c,syncWithTicks:f,horizontalValues:p,verticalValues:d}=o,m=ln(),g=me(N=>aC(N,"xAxis",i,m)),h=me(N=>aC(N,"yAxis",a,m));if(!lr(u)||!lr(c)||!ce(s)||!ce(l))return null;var y=o.verticalCoordinatesGenerator||tJ,b=o.horizontalCoordinatesGenerator||nJ,{horizontalPoints:x,verticalPoints:w}=o;if((!x||!x.length)&&typeof b=="function"){var S=p&&p.length,E=b({yAxis:h?Vt(Vt({},h),{},{ticks:S?p:h.ticks}):void 0,width:t??u,height:n??c,offset:r},S?!0:f);Eu(Array.isArray(E),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(typeof E,"]")),Array.isArray(E)&&(x=E)}if((!w||!w.length)&&typeof y=="function"){var O=d&&d.length,P=y({xAxis:g?Vt(Vt({},g),{},{ticks:O?d:g.ticks}):void 0,width:t??u,height:n??c,offset:r},O?!0:f);Eu(Array.isArray(P),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(typeof P,"]")),Array.isArray(P)&&(w=P)}return v.createElement(Br,{zIndex:o.zIndex},v.createElement("g",{className:"recharts-cartesian-grid"},v.createElement(XQ,{fill:o.fill,fillOpacity:o.fillOpacity,x:o.x,y:o.y,width:o.width,height:o.height,ry:o.ry}),v.createElement(JQ,zo({},o,{horizontalPoints:x})),v.createElement(eJ,zo({},o,{verticalPoints:w})),v.createElement(ZQ,zo({},o,{offset:r,horizontalPoints:x,xAxis:g,yAxis:h})),v.createElement(QQ,zo({},o,{offset:r,verticalPoints:w,xAxis:g,yAxis:h}))))}mN.displayName="CartesianGrid";var oJ={},gN=zt({name:"errorBars",initialState:oJ,reducers:{addErrorBar:(e,t)=>{var{itemId:n,errorBar:r}=t.payload;e[n]||(e[n]=[]),e[n].push(r)},replaceErrorBar:(e,t)=>{var{itemId:n,prev:r,next:o}=t.payload;e[n]&&(e[n]=e[n].map(i=>i.dataKey===r.dataKey&&i.direction===r.direction?o:i))},removeErrorBar:(e,t)=>{var{itemId:n,errorBar:r}=t.payload;e[n]&&(e[n]=e[n].filter(o=>o.dataKey!==r.dataKey||o.direction!==r.direction))}}}),{addErrorBar:une,replaceErrorBar:cne,removeErrorBar:fne}=gN.actions,iJ=gN.reducer,aJ=["children"];function sJ(e,t){if(e==null)return{};var n,r,o=lJ(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function lJ(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var uJ={data:[],xAxisId:"xAxis-0",yAxisId:"yAxis-0",dataPointFormatter:()=>({x:0,y:0,value:0}),errorBarOffset:0},cJ=A.createContext(uJ);function fJ(e){var{children:t}=e,n=sJ(e,aJ);return v.createElement(cJ.Provider,{value:n},t)}function vN(e,t){var n,r,o=me(u=>Fr(u,e)),i=me(u=>Vr(u,t)),a=(n=o?.allowDataOverflow)!==null&&n!==void 0?n:ht.allowDataOverflow,s=(r=i?.allowDataOverflow)!==null&&r!==void 0?r:mt.allowDataOverflow,l=a||s;return{needClip:l,needClipX:a,needClipY:s}}function dJ(e){var{xAxisId:t,yAxisId:n,clipPathId:r}=e,o=uN(),{needClipX:i,needClipY:a,needClip:s}=vN(t,n);if(!s||!o)return null;var{x:l,y:u,width:c,height:f}=o;return v.createElement("clipPath",{id:"clipPath-".concat(r)},v.createElement("rect",{x:i?l:l-c/2,y:a?u:u-f/2,width:i?c:c*2,height:a?f:f*2}))}function fi(e,t){var n,r;return(n=(r=e.graphicalItems.cartesianItems.find(o=>o.id===t))===null||r===void 0?void 0:r.xAxisId)!==null&&n!==void 0?n:sN}function di(e,t){var n,r;return(n=(r=e.graphicalItems.cartesianItems.find(o=>o.id===t))===null||r===void 0?void 0:r.yAxisId)!==null&&n!==void 0?n:sN}var pJ=process.env.NODE_ENV==="production",Ip="Invariant failed";function hJ(e,t){if(pJ)throw new Error(Ip);var n=typeof t=="function"?t():t,r=n?"".concat(Ip,": ").concat(n):Ip;throw new Error(r)}function tm(){return tm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},tm.apply(null,arguments)}function fy(e){return v.createElement(wZ,tm({shapeType:"rectangle",activeClassName:"recharts-active-bar",inActiveClassName:"recharts-inactive-bar"},e))}var mJ=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return(r,o)=>{if(ce(t))return t;var i=ce(r)||yt(r);return i?t(r,o):(i||hJ(!1,"minPointSize callback function received a value with type of ".concat(typeof r,". Currently only numbers or null/undefined are supported.")),n)}},gJ=(e,t,n)=>n,vJ=(e,t)=>t,Ds=j([Bv,vJ],(e,t)=>e.filter(n=>n.type==="bar").find(n=>n.id===t)),yJ=j([Ds],e=>e?.maxBarSize),bJ=(e,t,n,r)=>r,xJ=j([qe,Bv,fi,di,gJ],(e,t,n,r,o)=>t.filter(i=>e==="horizontal"?i.xAxisId===n:i.yAxisId===r).filter(i=>i.isPanorama===o).filter(i=>i.hide===!1).filter(i=>i.type==="bar")),wJ=(e,t,n)=>{var r=qe(e),o=fi(e,t),i=di(e,t);if(!(o==null||i==null))return r==="horizontal"?Xh(e,"yAxis",i,n):Xh(e,"xAxis",o,n)},CJ=(e,t)=>{var n=qe(e),r=fi(e,t),o=di(e,t);if(!(r==null||o==null))return n==="horizontal"?iC(e,"xAxis",r):iC(e,"yAxis",o)},SJ=j([xJ,j4,CJ],XZ),EJ=(e,t,n)=>{var r,o,i=Ds(e,t);if(i==null)return 0;var a=fi(e,t),s=di(e,t);if(a==null||s==null)return 0;var l=qe(e),u=FR(e),{maxBarSize:c}=i,f=yt(c)?u:c,p,d;return l==="horizontal"?(p=qi(e,"xAxis",a,n),d=Ui(e,"xAxis",a,n)):(p=qi(e,"yAxis",s,n),d=Ui(e,"yAxis",s,n)),(r=(o=Su(p,d,!0))!==null&&o!==void 0?o:f)!==null&&r!==void 0?r:0},yN=(e,t,n)=>{var r=qe(e),o=fi(e,t),i=di(e,t);if(!(o==null||i==null)){var a,s;return r==="horizontal"?(a=qi(e,"xAxis",o,n),s=Ui(e,"xAxis",o,n)):(a=qi(e,"yAxis",i,n),s=Ui(e,"yAxis",i,n)),Su(a,s)}},OJ=j([SJ,FR,D4,VR,EJ,yN,yJ],tQ),PJ=(e,t,n)=>{var r=fi(e,t);if(r!=null)return qi(e,"xAxis",r,n)},_J=(e,t,n)=>{var r=di(e,t);if(r!=null)return qi(e,"yAxis",r,n)},AJ=(e,t,n)=>{var r=fi(e,t);if(r!=null)return Ui(e,"xAxis",r,n)},RJ=(e,t,n)=>{var r=di(e,t);if(r!=null)return Ui(e,"yAxis",r,n)},IJ=j([OJ,Ds],rQ),kJ=j([wJ,Ds],nQ),NJ=j([Ot,Jg,PJ,_J,AJ,RJ,IJ,qe,R4,yN,kJ,Ds,bJ],(e,t,n,r,o,i,a,s,l,u,c,f,p)=>{var{chartData:d,dataStartIndex:m,dataEndIndex:g}=l;if(!(f==null||a==null||t==null||s!=="horizontal"&&s!=="vertical"||n==null||r==null||o==null||i==null||u==null)){var{data:h}=f,y;if(h!=null&&h.length>0?y=h:y=d?.slice(m,g+1),y!=null)return aee({layout:s,barSettings:f,pos:a,parentViewBox:t,bandSize:u,xAxis:n,yAxis:r,xAxisTicks:o,yAxisTicks:i,stackedData:c,displayedData:y,offset:e,cells:p,dataStartIndex:m})}}),TJ=["index"];function nm(){return nm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},nm.apply(null,arguments)}function MJ(e,t){if(e==null)return{};var n,r,o=DJ(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function DJ(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var bN=A.createContext(void 0),jJ=e=>{var t=A.useContext(bN);if(t!=null)return t.stackId;if(e!=null)return TW(e)},$J=(e,t)=>"recharts-bar-stack-clip-path-".concat(e,"-").concat(t),LJ=e=>{var t=A.useContext(bN);if(t!=null){var{stackId:n}=t;return"url(#".concat($J(n,e),")")}},xN=e=>{var{index:t}=e,n=MJ(e,TJ),r=LJ(t);return v.createElement(ir,nm({className:"recharts-bar-stack-layer",clipPath:r},n))},FJ=["onMouseEnter","onMouseLeave","onClick"],VJ=["value","background","tooltipPosition"],zJ=["id"],BJ=["onMouseEnter","onClick","onMouseLeave"];function mo(){return mo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},mo.apply(null,arguments)}function uS(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Ht(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?uS(Object(n),!0).forEach(function(r){HJ(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):uS(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function HJ(e,t,n){return(t=GJ(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function GJ(e){var t=WJ(e,"string");return typeof t=="symbol"?t:t+""}function WJ(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ju(e,t){if(e==null)return{};var n,r,o=UJ(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function UJ(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var qJ=e=>{var{dataKey:t,name:n,fill:r,legendType:o,hide:i}=e;return[{inactive:i,dataKey:t,type:o,color:r,value:ZA(n,t),payload:e}]},KJ=v.memo(e=>{var{dataKey:t,stroke:n,strokeWidth:r,fill:o,name:i,hide:a,unit:s,tooltipType:l,id:u}=e,c={dataDefinedOnItem:void 0,getPosition:li,settings:{stroke:n,strokeWidth:r,fill:o,dataKey:t,nameKey:void 0,name:ZA(i,t),hide:a,type:l,color:o,unit:s,graphicalItemId:u}};return v.createElement(CZ,{tooltipEntrySettings:c})});function YJ(e){var t=me(Ki),{data:n,dataKey:r,background:o,allOtherBarProps:i}=e,{onMouseEnter:a,onMouseLeave:s,onClick:l}=i,u=Ju(i,FJ),c=rN(a,r,i.id),f=oN(s),p=iN(l,r,i.id);if(!o||n==null)return null;var d=$g(o);return v.createElement(Br,{zIndex:oQ(o,Wt.barBackground)},n.map((m,g)=>{var{value:h,background:y,tooltipPosition:b}=m,x=Ju(m,VJ);if(!y)return null;var w=c(m,g),S=f(m,g),E=p(m,g),O=Ht(Ht(Ht(Ht(Ht({option:o,isActive:String(g)===t},x),{},{fill:"#eee"},y),d),Gg(u,m,g)),{},{onMouseEnter:w,onMouseLeave:S,onClick:E,dataKey:r,index:g,className:"recharts-bar-background-rectangle"});return v.createElement(fy,mo({key:"background-bar-".concat(g)},O))}))}function XJ(e){var{showLabels:t,children:n,rects:r}=e,o=r?.map(i=>{var a={x:i.x,y:i.y,width:i.width,lowerWidth:i.width,upperWidth:i.width,height:i.height};return Ht(Ht({},a),{},{value:i.value,payload:i.payload,parentViewBox:i.parentViewBox,viewBox:a,fill:i.fill})});return v.createElement(WX,{value:t?o:void 0},n)}function ZJ(e){var{shape:t,activeBar:n,baseProps:r,entry:o,index:i,dataKey:a}=e,s=me(Ki),l=me(kk),u=n&&String(o.originalDataIndex)===s&&(l==null||a===l),[c,f]=A.useState(!1),[p,d]=A.useState(!1);A.useEffect(()=>{var x;return u?(f(!0),x=requestAnimationFrame(()=>{d(!0)})):d(!1),()=>{cancelAnimationFrame(x)}},[u]);var m=A.useCallback(()=>{u||f(!1)},[u]),g=u&&p,h=u||c,y;u?n===!0?y=t:y=n:y=t;var b=v.createElement(fy,mo({},r,{name:String(r.name)},o,{isActive:g,option:y,index:i,dataKey:a,onTransitionEnd:m}));return h?v.createElement(Br,{zIndex:Wt.activeBar},v.createElement(xN,{index:o.originalDataIndex},b)):b}function QJ(e){var{shape:t,baseProps:n,entry:r,index:o,dataKey:i}=e;return v.createElement(fy,mo({},n,{name:String(n.name)},r,{isActive:!1,option:t,index:o,dataKey:i}))}function JJ(e){var t,{data:n,props:r}=e,o=(t=_r(r))!==null&&t!==void 0?t:{},{id:i}=o,a=Ju(o,zJ),{shape:s,dataKey:l,activeBar:u}=r,{onMouseEnter:c,onClick:f,onMouseLeave:p}=r,d=Ju(r,BJ),m=rN(c,l,i),g=oN(p),h=iN(f,l,i);return n?v.createElement(v.Fragment,null,n.map((y,b)=>v.createElement(xN,mo({index:y.originalDataIndex,key:"rectangle-".concat(y?.x,"-").concat(y?.y,"-").concat(y?.value,"-").concat(b),className:"recharts-bar-rectangle"},Gg(d,y,b),{onMouseEnter:m(y,b),onMouseLeave:g(y,b),onClick:h(y,b)}),u?v.createElement(ZJ,{shape:s,activeBar:u,baseProps:a,entry:y,index:b,dataKey:l}):v.createElement(QJ,{shape:s,baseProps:a,entry:y,index:b,dataKey:l})))):null}function eee(e){var{props:t,previousRectanglesRef:n}=e,{data:r,layout:o,isAnimationActive:i,animationBegin:a,animationDuration:s,animationEasing:l,onAnimationEnd:u,onAnimationStart:c}=t,f=n.current,p=iv(t,"recharts-bar-"),[d,m]=A.useState(!1),g=!d,h=A.useCallback(()=>{typeof u=="function"&&u(),m(!1)},[u]),y=A.useCallback(()=>{typeof c=="function"&&c(),m(!0)},[c]);return v.createElement(XJ,{showLabels:g,rects:r},v.createElement(ov,{animationId:p,begin:a,duration:s,isActive:i,easing:l,onAnimationEnd:h,onAnimationStart:y,key:p},b=>{var x=b===1?r:r?.map((w,S)=>{var E=f&&f[S];if(E)return Ht(Ht({},w),{},{x:kt(E.x,w.x,b),y:kt(E.y,w.y,b),width:kt(E.width,w.width,b),height:kt(E.height,w.height,b)});if(o==="horizontal"){var O=kt(0,w.height,b),P=kt(w.stackedBarStart,w.y,b);return Ht(Ht({},w),{},{y:P,height:O})}var N=kt(0,w.width,b),R=kt(w.stackedBarStart,w.x,b);return Ht(Ht({},w),{},{width:N,x:R})});return b>0&&(n.current=x??null),x==null?null:v.createElement(ir,null,v.createElement(JJ,{props:t,data:x}))}),v.createElement(KX,{label:t.label}),t.children)}function tee(e){var t=A.useRef(null);return v.createElement(eee,{previousRectanglesRef:t,props:e})}var wN=0,nee=(e,t)=>{var n=Array.isArray(e.value)?e.value[1]:e.value;return{x:e.x,y:e.y,value:n,errorVal:Mt(e,t)}};class ree extends A.PureComponent{render(){var{hide:t,data:n,dataKey:r,className:o,xAxisId:i,yAxisId:a,needClip:s,background:l,id:u}=this.props;if(t||n==null)return null;var c=Ue("recharts-bar",o),f=u;return v.createElement(ir,{className:c,id:u},s&&v.createElement("defs",null,v.createElement(dJ,{clipPathId:f,xAxisId:i,yAxisId:a})),v.createElement(ir,{className:"recharts-bar-rectangles",clipPath:s?"url(#clipPath-".concat(f,")"):void 0},v.createElement(YJ,{data:n,dataKey:r,background:l,allOtherBarProps:this.props}),v.createElement(tee,this.props)))}}var oee={activeBar:!1,animationBegin:0,animationDuration:400,animationEasing:"ease",background:!1,hide:!1,isAnimationActive:"auto",label:!1,legendType:"rect",minPointSize:wN,xAxisId:0,yAxisId:0,zIndex:Wt.bar};function iee(e){var{xAxisId:t,yAxisId:n,hide:r,legendType:o,minPointSize:i,activeBar:a,animationBegin:s,animationDuration:l,animationEasing:u,isAnimationActive:c}=e,{needClip:f}=vN(t,n),p=Xi(),d=ln(),m=nZ(e.children,zk),g=me(b=>NJ(b,e.id,d,m));if(p!=="vertical"&&p!=="horizontal")return null;var h,y=g?.[0];return y==null||y.height==null||y.width==null?h=0:h=p==="vertical"?y.height/2:y.width/2,v.createElement(fJ,{xAxisId:t,yAxisId:n,data:g,dataPointFormatter:nee,errorBarOffset:h},v.createElement(ree,mo({},e,{layout:p,needClip:f,data:g,xAxisId:t,yAxisId:n,hide:r,legendType:o,minPointSize:i,activeBar:a,animationBegin:s,animationDuration:l,animationEasing:u,isAnimationActive:c})))}function aee(e){var{layout:t,barSettings:{dataKey:n,minPointSize:r,hasCustomShape:o},pos:i,bandSize:a,xAxis:s,yAxis:l,xAxisTicks:u,yAxisTicks:c,stackedData:f,displayedData:p,offset:d,cells:m,parentViewBox:g,dataStartIndex:h}=e,y=t==="horizontal"?l:s,b=f?y.scale.domain():null,x=MW({numericAxis:y}),w=y.scale.map(x);return p.map((S,E)=>{var O,P,N,R,k,_;if(f){var T=f[E+h];if(T==null)return null;O=AW(T,b)}else O=Mt(S,n),Array.isArray(O)||(O=[x,O]);var F=mJ(r,wN)(O[1],E);if(t==="horizontal"){var V,D=l.scale.map(O[0]),B=l.scale.map(O[1]);if(D==null||B==null)return null;P=e0({axis:s,ticks:u,bandSize:a,offset:i.offset,entry:S,index:E}),N=(V=B??D)!==null&&V!==void 0?V:void 0,R=i.size;var z=D-B;if(k=ar(z)?0:z,_={x:P,y:d.top,width:R,height:d.height},Math.abs(F)>0&&Math.abs(k)<Math.abs(F)){var Y=on(k||F)*(Math.abs(F)-Math.abs(k));N-=Y,k+=Y}}else{var $=s.scale.map(O[0]),ye=s.scale.map(O[1]);if($==null||ye==null)return null;if(P=$,N=e0({axis:l,ticks:c,bandSize:a,offset:i.offset,entry:S,index:E}),R=ye-$,k=i.size,_={x:d.left,y:N,width:d.width,height:k},Math.abs(F)>0&&Math.abs(R)<Math.abs(F)){var ae=on(R||F)*(Math.abs(F)-Math.abs(R));R+=ae}}if(P==null||N==null||R==null||k==null||!o&&(R===0||k===0))return null;var be=Ht(Ht({},S),{},{stackedBarStart:w,x:P,y:N,width:R,height:k,value:f?O:O[1],payload:S,background:_,tooltipPosition:{x:P+R/2,y:N+k/2},parentViewBox:g,originalDataIndex:E},m&&m[E]&&m[E].props);return be}).filter(Boolean)}function see(e){var t=wn(e,oee),n=jJ(t.stackId),r=ln();return v.createElement(AZ,{id:t.id,type:"bar"},o=>v.createElement(v.Fragment,null,v.createElement(SZ,{legendPayload:qJ(t)}),v.createElement(KJ,{dataKey:t.dataKey,stroke:t.stroke,strokeWidth:t.strokeWidth,fill:t.fill,name:t.name,hide:t.hide,unit:t.unit,tooltipType:t.tooltipType,id:o}),v.createElement(DZ,{type:"bar",id:o,data:void 0,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,dataKey:t.dataKey,stackId:n,hide:t.hide,barSize:t.barSize,minPointSize:t.minPointSize,maxBarSize:t.maxBarSize,isPanorama:r,hasCustomShape:t.shape!=null}),v.createElement(Br,{zIndex:t.zIndex},v.createElement(iee,mo({},t,{id:o})))))}var CN=v.memo(see,Zc);CN.displayName="Bar";var lee=["domain","range"],uee=["domain","range"];function cS(e,t){if(e==null)return{};var n,r,o=cee(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function cee(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function fS(e,t){return e===t?!0:Array.isArray(e)&&e.length===2&&Array.isArray(t)&&t.length===2?e[0]===t[0]&&e[1]===t[1]:!1}function SN(e,t){if(e===t)return!0;var{domain:n,range:r}=e,o=cS(e,lee),{domain:i,range:a}=t,s=cS(t,uee);return!fS(n,i)||!fS(r,a)?!1:Zc(o,s)}var fee=["type"],dee=["dangerouslySetInnerHTML","ticks","scale"],pee=["id","scale"];function rm(){return rm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},rm.apply(null,arguments)}function dS(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function pS(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?dS(Object(n),!0).forEach(function(r){hee(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):dS(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function hee(e,t,n){return(t=mee(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function mee(e){var t=gee(e,"string");return typeof t=="symbol"?t:t+""}function gee(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function om(e,t){if(e==null)return{};var n,r,o=vee(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function vee(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function yee(e){var t=tt(),n=A.useRef(null),r=iR(),{type:o}=e,i=om(e,fee),a=ef(r,"xAxis",o),s=A.useMemo(()=>{if(a!=null)return pS(pS({},i),{},{type:a})},[i,a]);return A.useLayoutEffect(()=>{s!=null&&(n.current===null?t(VZ(s)):n.current!==s&&t(zZ({prev:n.current,next:s})),n.current=s)},[s,t]),A.useLayoutEffect(()=>()=>{n.current&&(t(BZ(n.current)),n.current=null)},[t]),null}var bee=e=>{var{xAxisId:t,className:n}=e,r=me(Jg),o=ln(),i="xAxis",a=me(y=>ck(y,i,t,o)),s=me(y=>sk(y,t)),l=me(y=>g9(y,t)),u=me(y=>II(y,t));if(s==null||l==null||u==null)return null;var{dangerouslySetInnerHTML:c,ticks:f,scale:p}=e,d=om(e,dee),{id:m,scale:g}=u,h=om(u,pee);return v.createElement(cy,rm({},d,h,{x:l.x,y:l.y,width:s.width,height:s.height,className:Ue("recharts-".concat(i," ").concat(i),n),viewBox:r,ticks:a,axisType:i,axisId:t}))},xee={allowDataOverflow:ht.allowDataOverflow,allowDecimals:ht.allowDecimals,allowDuplicatedCategory:ht.allowDuplicatedCategory,angle:ht.angle,axisLine:Er.axisLine,height:ht.height,hide:!1,includeHidden:ht.includeHidden,interval:ht.interval,label:!1,minTickGap:ht.minTickGap,mirror:ht.mirror,orientation:ht.orientation,padding:ht.padding,reversed:ht.reversed,scale:ht.scale,tick:ht.tick,tickCount:ht.tickCount,tickLine:Er.tickLine,tickSize:Er.tickSize,type:ht.type,niceTicks:ht.niceTicks,xAxisId:0},wee=e=>{var t=wn(e,xee);return v.createElement(v.Fragment,null,v.createElement(yee,{allowDataOverflow:t.allowDataOverflow,allowDecimals:t.allowDecimals,allowDuplicatedCategory:t.allowDuplicatedCategory,angle:t.angle,dataKey:t.dataKey,domain:t.domain,height:t.height,hide:t.hide,id:t.xAxisId,includeHidden:t.includeHidden,interval:t.interval,minTickGap:t.minTickGap,mirror:t.mirror,name:t.name,orientation:t.orientation,padding:t.padding,reversed:t.reversed,scale:t.scale,tick:t.tick,tickCount:t.tickCount,tickFormatter:t.tickFormatter,ticks:t.ticks,type:t.type,unit:t.unit,niceTicks:t.niceTicks}),v.createElement(bee,t))},EN=v.memo(wee,SN);EN.displayName="XAxis";var Cee=["type"],See=["dangerouslySetInnerHTML","ticks","scale"],Eee=["id","scale"];function im(){return im=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},im.apply(null,arguments)}function hS(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function mS(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?hS(Object(n),!0).forEach(function(r){Oee(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):hS(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Oee(e,t,n){return(t=Pee(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Pee(e){var t=_ee(e,"string");return typeof t=="symbol"?t:t+""}function _ee(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function am(e,t){if(e==null)return{};var n,r,o=Aee(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function Aee(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Ree(e){var t=tt(),n=A.useRef(null),r=iR(),{type:o}=e,i=am(e,Cee),a=ef(r,"yAxis",o),s=A.useMemo(()=>{if(a!=null)return mS(mS({},i),{},{type:a})},[a,i]);return A.useLayoutEffect(()=>{s!=null&&(n.current===null?t(HZ(s)):n.current!==s&&t(GZ({prev:n.current,next:s})),n.current=s)},[s,t]),A.useLayoutEffect(()=>()=>{n.current&&(t(WZ(n.current)),n.current=null)},[t]),null}function Iee(e){var{yAxisId:t,className:n,width:r,label:o}=e,i=A.useRef(null),a=A.useRef(null),s=me(Jg),l=ln(),u=tt(),c="yAxis",f=me(E=>lk(E,t)),p=me(E=>y9(E,t)),d=me(E=>ck(E,c,t,l)),m=me(E=>kI(E,t));if(A.useLayoutEffect(()=>{if(!(r!=="auto"||!f||ly(o)||A.isValidElement(o)||m==null)){var E=i.current;if(E){var O=E.getCalculatedWidth();Math.round(f.width)!==Math.round(O)&&u(UZ({id:t,width:O}))}}},[d,f,u,o,t,r,m]),f==null||p==null||m==null)return null;var{dangerouslySetInnerHTML:g,ticks:h,scale:y}=e,b=am(e,See),{id:x,scale:w}=m,S=am(m,Eee);return v.createElement(cy,im({},b,S,{ref:i,labelRef:a,x:p.x,y:p.y,tickTextProps:r==="auto"?{width:void 0}:{width:r},width:f.width,height:f.height,className:Ue("recharts-".concat(c," ").concat(c),n),viewBox:s,ticks:d,axisType:c,axisId:t}))}var kee={allowDataOverflow:mt.allowDataOverflow,allowDecimals:mt.allowDecimals,allowDuplicatedCategory:mt.allowDuplicatedCategory,angle:mt.angle,axisLine:Er.axisLine,hide:!1,includeHidden:mt.includeHidden,interval:mt.interval,label:!1,minTickGap:mt.minTickGap,mirror:mt.mirror,orientation:mt.orientation,padding:mt.padding,reversed:mt.reversed,scale:mt.scale,tick:mt.tick,tickCount:mt.tickCount,tickLine:Er.tickLine,tickSize:Er.tickSize,type:mt.type,niceTicks:mt.niceTicks,width:mt.width,yAxisId:0},Nee=e=>{var t=wn(e,kee);return v.createElement(v.Fragment,null,v.createElement(Ree,{interval:t.interval,id:t.yAxisId,scale:t.scale,type:t.type,domain:t.domain,allowDataOverflow:t.allowDataOverflow,dataKey:t.dataKey,allowDuplicatedCategory:t.allowDuplicatedCategory,allowDecimals:t.allowDecimals,tickCount:t.tickCount,padding:t.padding,includeHidden:t.includeHidden,reversed:t.reversed,ticks:t.ticks,width:t.width,orientation:t.orientation,mirror:t.mirror,hide:t.hide,unit:t.unit,name:t.name,angle:t.angle,minTickGap:t.minTickGap,tick:t.tick,tickFormatter:t.tickFormatter,niceTicks:t.niceTicks}),v.createElement(Iee,t))},ON=v.memo(Nee,SN);ON.displayName="YAxis";var Tee=(e,t)=>t,dy=j([Tee,qe,qR,_t,_k,zr,VY,Ot],qY);function Mee(e){return"getBBox"in e.currentTarget&&typeof e.currentTarget.getBBox=="function"}function py(e){var t=e.currentTarget.getBoundingClientRect(),n,r;if(Mee(e)){var o=e.currentTarget.getBBox();n=o.width>0?t.width/o.width:1,r=o.height>0?t.height/o.height:1}else{var i=e.currentTarget;n=i.offsetWidth>0?t.width/i.offsetWidth:1,r=i.offsetHeight>0?t.height/i.offsetHeight:1}var a=(s,l)=>({relativeX:Math.round((s-t.left)/n),relativeY:Math.round((l-t.top)/r)});return"touches"in e?Array.from(e.touches).map(s=>a(s.clientX,s.clientY)):a(e.clientX,e.clientY)}var PN=yn("mouseClick"),_N=bs();_N.startListening({actionCreator:PN,effect:(e,t)=>{var n=e.payload,r=dy(t.getState(),py(n));r?.activeIndex!=null&&t.dispatch(M9({activeIndex:r.activeIndex,activeDataKey:void 0,activeCoordinate:r.activeCoordinate}))}});var sm=yn("mouseMove"),AN=bs(),Ci=null,ko=null,kp=null;AN.startListening({actionCreator:sm,effect:(e,t)=>{var n=e.payload,r=t.getState(),{throttleDelay:o,throttledEvents:i}=r.eventSettings,a=i==="all"||i?.includes("mousemove");Ci!==null&&(cancelAnimationFrame(Ci),Ci=null),ko!==null&&(typeof o!="number"||!a)&&(clearTimeout(ko),ko=null),kp=py(n);var s=()=>{var l=t.getState(),u=Zv(l,l.tooltip.settings.shared);if(!kp){Ci=null,ko=null;return}if(u==="axis"){var c=dy(l,kp);c?.activeIndex!=null?t.dispatch(yk({activeIndex:c.activeIndex,activeDataKey:void 0,activeCoordinate:c.activeCoordinate})):t.dispatch(vk())}Ci=null,ko=null};if(!a){s();return}o==="raf"?Ci=requestAnimationFrame(s):typeof o=="number"&&ko===null&&(ko=setTimeout(s,o))}});function Dee(e,t){return t instanceof HTMLElement?"HTMLElement <".concat(t.tagName,' class="').concat(t.className,'">'):t===window?"global.window":e==="children"&&typeof t=="object"&&t!==null?"<<CHILDREN>>":t}var gS={accessibilityLayer:!0,barCategoryGap:"10%",barGap:4,barSize:void 0,className:void 0,maxBarSize:void 0,stackOffset:"none",syncId:void 0,syncMethod:"index",baseValue:void 0,reverseStackOrder:!1},RN=zt({name:"rootProps",initialState:gS,reducers:{updateOptions:(e,t)=>{var n;e.accessibilityLayer=t.payload.accessibilityLayer,e.barCategoryGap=t.payload.barCategoryGap,e.barGap=(n=t.payload.barGap)!==null&&n!==void 0?n:gS.barGap,e.barSize=t.payload.barSize,e.maxBarSize=t.payload.maxBarSize,e.stackOffset=t.payload.stackOffset,e.syncId=t.payload.syncId,e.syncMethod=t.payload.syncMethod,e.className=t.payload.className,e.baseValue=t.payload.baseValue,e.reverseStackOrder=t.payload.reverseStackOrder}}}),jee=RN.reducer,{updateOptions:$ee}=RN.actions,Lee=null,Fee={updatePolarOptions:(e,t)=>e===null?t.payload:(e.startAngle=t.payload.startAngle,e.endAngle=t.payload.endAngle,e.cx=t.payload.cx,e.cy=t.payload.cy,e.innerRadius=t.payload.innerRadius,e.outerRadius=t.payload.outerRadius,e)},IN=zt({name:"polarOptions",initialState:Lee,reducers:Fee}),{updatePolarOptions:dne}=IN.actions,Vee=IN.reducer,kN=yn("keyDown"),NN=yn("focus"),TN=yn("blur"),gf=bs(),Si=null,No=null,kl=null;gf.startListening({actionCreator:kN,effect:(e,t)=>{kl=e.payload,Si!==null&&(cancelAnimationFrame(Si),Si=null);var n=t.getState(),{throttleDelay:r,throttledEvents:o}=n.eventSettings,i=o==="all"||o.includes("keydown");No!==null&&(typeof r!="number"||!i)&&(clearTimeout(No),No=null);var a=()=>{try{var s=t.getState(),l=s.rootProps.accessibilityLayer!==!1;if(!l)return;var{keyboardInteraction:u}=s.tooltip,c=kl;if(c!=="ArrowRight"&&c!=="ArrowLeft"&&c!=="Enter")return;var f=Qv(u,ia(s),ks(s),Ts(s)),p=f==null?-1:Number(f);if(!Number.isFinite(p)||p<0)return;var d=zr(s);if(c==="Enter"){var m=Ku(s,"axis","hover",String(u.index));t.dispatch(qu({active:!u.active,activeIndex:u.index,activeCoordinate:m}));return}var g=S9(s),h=g==="left-to-right"?1:-1,y=c==="ArrowRight"?1:-1,b=p+y*h;if(d==null||b>=d.length||b<0)return;var x=Ku(s,"axis","hover",String(b));t.dispatch(qu({active:!0,activeIndex:b.toString(),activeCoordinate:x}))}finally{Si=null,No=null}};if(!i){a();return}r==="raf"?Si=requestAnimationFrame(a):typeof r=="number"&&No===null&&(a(),kl=null,No=setTimeout(()=>{kl?a():(No=null,Si=null)},r))}});gf.startListening({actionCreator:NN,effect:(e,t)=>{var n=t.getState(),r=n.rootProps.accessibilityLayer!==!1;if(r){var{keyboardInteraction:o}=n.tooltip;if(!o.active&&o.index==null){var i="0",a=Ku(n,"axis","hover",String(i));t.dispatch(qu({active:!0,activeIndex:i,activeCoordinate:a}))}}}});gf.startListening({actionCreator:TN,effect:(e,t)=>{var n=t.getState(),r=n.rootProps.accessibilityLayer!==!1;if(r){var{keyboardInteraction:o}=n.tooltip;o.active&&t.dispatch(qu({active:!1,activeIndex:o.index,activeCoordinate:o.coordinate}))}}});function MN(e){e.persist();var{currentTarget:t}=e;return new Proxy(e,{get:(n,r)=>{if(r==="currentTarget")return t;var o=Reflect.get(n,r);return typeof o=="function"?o.bind(n):o}})}var En=yn("externalEvent"),DN=bs(),Nl=new Map,Ea=new Map,Np=new Map;DN.startListening({actionCreator:En,effect:(e,t)=>{var{handler:n,reactEvent:r}=e.payload;if(n!=null){var o=r.type,i=MN(r);Np.set(o,{handler:n,reactEvent:i});var a=Nl.get(o);a!==void 0&&(cancelAnimationFrame(a),Nl.delete(o));var s=t.getState(),{throttleDelay:l,throttledEvents:u}=s.eventSettings,c=u,f=c==="all"||c?.includes(o),p=Ea.get(o);p!==void 0&&(typeof l!="number"||!f)&&(clearTimeout(p),Ea.delete(o));var d=()=>{var h=Np.get(o);try{if(!h)return;var{handler:y,reactEvent:b}=h,x=t.getState(),w={activeCoordinate:OY(x),activeDataKey:kk(x),activeIndex:Ki(x),activeLabel:Ik(x),activeTooltipIndex:Ki(x),isTooltipActive:PY(x)};y&&y(w,b)}finally{Nl.delete(o),Ea.delete(o),Np.delete(o)}};if(!f){d();return}if(l==="raf"){var m=requestAnimationFrame(d);Nl.set(o,m)}else if(typeof l=="number"){if(!Ea.has(o)){d();var g=setTimeout(d,l);Ea.set(o,g)}}else d()}}});var zee=j([ra],e=>e.tooltipItemPayloads),Bee=j([zee,(e,t)=>t,(e,t,n)=>n],(e,t,n)=>{if(t!=null){var r=e.find(i=>i.settings.graphicalItemId===n);if(r!=null){var{getPosition:o}=r;if(o!=null)return o(t)}}}),jN=yn("touchMove"),$N=bs(),To=null,Yr=null,vS=null,Oa=null;$N.startListening({actionCreator:jN,effect:(e,t)=>{var n=e.payload;if(!(n.touches==null||n.touches.length===0)){Oa=MN(n);var r=t.getState(),{throttleDelay:o,throttledEvents:i}=r.eventSettings,a=i==="all"||i.includes("touchmove");To!==null&&(cancelAnimationFrame(To),To=null),Yr!==null&&(typeof o!="number"||!a)&&(clearTimeout(Yr),Yr=null),vS=Array.from(n.touches).map(l=>py({clientX:l.clientX,clientY:l.clientY,currentTarget:n.currentTarget}));var s=()=>{if(Oa!=null){var l=t.getState(),u=Zv(l,l.tooltip.settings.shared);if(u==="axis"){var c,f=(c=vS)===null||c===void 0?void 0:c[0];if(f==null){To=null,Yr=null;return}var p=dy(l,f);p?.activeIndex!=null&&t.dispatch(yk({activeIndex:p.activeIndex,activeDataKey:void 0,activeCoordinate:p.activeCoordinate}))}else if(u==="item"){var d,m=Oa.touches[0];if(document.elementFromPoint==null||m==null)return;var g=document.elementFromPoint(m.clientX,m.clientY);if(!g||!g.getAttribute)return;var h=g.getAttribute(zW),y=(d=g.getAttribute(BW))!==null&&d!==void 0?d:void 0,b=oa(l).find(S=>S.id===y);if(h==null||b==null||y==null)return;var{dataKey:x}=b,w=Bee(l,h,y);t.dispatch(gk({activeDataKey:x,activeIndex:h,activeCoordinate:w,activeGraphicalItemId:y}))}To=null,Yr=null}};if(!a){s();return}o==="raf"?To=requestAnimationFrame(s):typeof o=="number"&&Yr===null&&(s(),Oa=null,Yr=setTimeout(()=>{Oa?s():(Yr=null,To=null)},o))}}});var LN={throttleDelay:"raf",throttledEvents:["mousemove","touchmove","pointermove","scroll","wheel"]},FN=zt({name:"eventSettings",initialState:LN,reducers:{setEventSettings:(e,t)=>{t.payload.throttleDelay!=null&&(e.throttleDelay=t.payload.throttleDelay),t.payload.throttledEvents!=null&&(e.throttledEvents=t.payload.throttledEvents)}}}),{setEventSettings:Hee}=FN.actions,Gee=FN.reducer,Wee=gA({brush:aQ,cartesianAxis:qZ,chartData:O7,errorBars:iJ,eventSettings:Gee,graphicalItems:TZ,layout:SW,legend:DU,options:x7,polarAxis:XX,polarOptions:Vee,referenceElements:cQ,renderedTicks:_Q,rootProps:jee,tooltip:D9,zIndex:s7}),Uee=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"Chart";return KG({reducer:Wee,preloadedState:t,middleware:r=>{var o;return r({serializableCheck:!1,immutableCheck:!["commonjs","es6","production"].includes((o="es6")!==null&&o!==void 0?o:"")}).concat([_N.middleware,AN.middleware,gf.middleware,DN.middleware,$N.middleware])},enhancers:r=>{var o=r;return typeof r=="function"&&(o=r()),o.concat(DA({type:"raf"}))},devTools:{serialize:{replacer:Dee},name:"recharts-".concat(n)}})};function qee(e){var{preloadedState:t,children:n,reduxStoreName:r}=e,o=ln(),i=A.useRef(null);if(o)return n;i.current==null&&(i.current=Uee(t,r));var a=Ug;return v.createElement(eq,{context:a,store:i.current},n)}function Kee(e){var{layout:t,margin:n}=e,r=tt(),o=ln();return A.useEffect(()=>{o||(r(xW(t)),r(bW(n)))},[r,o,t,n]),null}var Yee=A.memo(Kee,Zc);function Xee(e){var t=tt();return A.useEffect(()=>{t($ee(e))},[t,e]),null}var Zee=e=>{var t=tt();return A.useEffect(()=>{t(Hee(e))},[t,e]),null},Qee=A.memo(Zee,Zc);function yS(e){var{zIndex:t,isPanorama:n}=e,r=A.useRef(null),o=tt();return A.useLayoutEffect(()=>(r.current&&o(i7({zIndex:t,element:r.current,isPanorama:n})),()=>{o(a7({zIndex:t,isPanorama:n}))}),[o,t,n]),v.createElement("g",{tabIndex:-1,ref:r,className:"recharts-zIndex-layer_".concat(t)})}function bS(e){var{children:t,isPanorama:n}=e,r=me(YY);if(!r||r.length===0)return t;var o=r.filter(a=>a<0),i=r.filter(a=>a>0);return v.createElement(v.Fragment,null,o.map(a=>v.createElement(yS,{key:a,zIndex:a,isPanorama:n})),t,i.map(a=>v.createElement(yS,{key:a,zIndex:a,isPanorama:n})))}var Jee=["children"];function ete(e,t){if(e==null)return{};var n,r,o=tte(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function tte(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function ec(){return ec=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ec.apply(null,arguments)}var nte={width:"100%",height:"100%",display:"block"},rte=A.forwardRef((e,t)=>{var n=rR(),r=oR(),o=mR();if(!lr(n)||!lr(r))return null;var{children:i,otherAttributes:a,title:s,desc:l}=e,u,c;return a!=null&&(typeof a.tabIndex=="number"?u=a.tabIndex:u=o?0:void 0,typeof a.role=="string"?c=a.role:c=o?"application":void 0),v.createElement(D_,ec({},a,{title:s,desc:l,role:c,tabIndex:u,width:n,height:r,style:nte,ref:t}),i)}),ote=e=>{var{children:t}=e,n=me(Uc);if(!n)return null;var{width:r,height:o,y:i,x:a}=n;return v.createElement(D_,{width:r,height:o,x:a,y:i},t)},xS=A.forwardRef((e,t)=>{var{children:n}=e,r=ete(e,Jee),o=ln();return o?v.createElement(ote,null,v.createElement(bS,{isPanorama:!0},n)):v.createElement(rte,ec({ref:t},r),v.createElement(bS,{isPanorama:!1},n))});function ite(){var e=tt(),[t,n]=A.useState(null),r=me(VW);return A.useEffect(()=>{if(t!=null){var o=t.getBoundingClientRect(),i=o.width/t.offsetWidth;Ne(i)&&i!==r&&e(CW(i))}},[t,e,r]),n}function wS(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function ate(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?wS(Object(n),!0).forEach(function(r){ste(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wS(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ste(e,t,n){return(t=lte(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function lte(e){var t=ute(e,"string");return typeof t=="symbol"?t:t+""}function ute(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function co(){return co=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},co.apply(null,arguments)}var cte=()=>(M7(),null);function tc(e){if(typeof e=="number")return e;if(typeof e=="string"){var t=parseFloat(e);if(!Number.isNaN(t))return t}return 0}var fte=A.forwardRef((e,t)=>{var n,r,o=A.useRef(null),[i,a]=A.useState({containerWidth:tc((n=e.style)===null||n===void 0?void 0:n.width),containerHeight:tc((r=e.style)===null||r===void 0?void 0:r.height)}),s=A.useCallback((u,c)=>{a(f=>{var p=Math.round(u),d=Math.round(c);return f.containerWidth===p&&f.containerHeight===d?f:{containerWidth:p,containerHeight:d}})},[]),l=A.useCallback(u=>{if(typeof t=="function"&&t(u),u!=null&&typeof ResizeObserver<"u"){var{width:c,height:f}=u.getBoundingClientRect();s(c,f);var p=m=>{var g=m[0];if(g!=null){var{width:h,height:y}=g.contentRect;s(h,y)}},d=new ResizeObserver(p);d.observe(u),o.current=d}},[t,s]);return A.useEffect(()=>()=>{var u=o.current;u?.disconnect()},[s]),v.createElement(v.Fragment,null,v.createElement(ws,{width:i.containerWidth,height:i.containerHeight}),v.createElement("div",co({ref:l},e)))}),dte=A.forwardRef((e,t)=>{var{width:n,height:r}=e,[o,i]=A.useState({containerWidth:tc(n),containerHeight:tc(r)}),a=A.useCallback((l,u)=>{i(c=>{var f=Math.round(l),p=Math.round(u);return c.containerWidth===f&&c.containerHeight===p?c:{containerWidth:f,containerHeight:p}})},[]),s=A.useCallback(l=>{if(typeof t=="function"&&t(l),l!=null){var{width:u,height:c}=l.getBoundingClientRect();a(u,c)}},[t,a]);return v.createElement(v.Fragment,null,v.createElement(ws,{width:o.containerWidth,height:o.containerHeight}),v.createElement("div",co({ref:s},e)))}),pte=A.forwardRef((e,t)=>{var{width:n,height:r}=e;return v.createElement(v.Fragment,null,v.createElement(ws,{width:n,height:r}),v.createElement("div",co({ref:t},e)))}),hte=A.forwardRef((e,t)=>{var{width:n,height:r}=e;return typeof n=="string"||typeof r=="string"?v.createElement(dte,co({},e,{ref:t})):typeof n=="number"&&typeof r=="number"?v.createElement(pte,co({},e,{width:n,height:r,ref:t})):v.createElement(v.Fragment,null,v.createElement(ws,{width:n,height:r}),v.createElement("div",co({ref:t},e)))});function mte(e){return e?fte:hte}var gte=A.forwardRef((e,t)=>{var{children:n,className:r,height:o,onClick:i,onContextMenu:a,onDoubleClick:s,onMouseDown:l,onMouseEnter:u,onMouseLeave:c,onMouseMove:f,onMouseUp:p,onTouchEnd:d,onTouchMove:m,onTouchStart:g,style:h,width:y,responsive:b,dispatchTouchEvents:x=!0}=e,w=A.useRef(null),S=tt(),[E,O]=A.useState(null),[P,N]=A.useState(null),R=ite(),k=ev(),_=k?.width>0?k.width:y,T=k?.height>0?k.height:o,F=A.useCallback(U=>{R(U),typeof t=="function"&&t(U),O(U),N(U),U!=null&&(w.current=U)},[R,t,O,N]),V=A.useCallback(U=>{S(PN(U)),S(En({handler:i,reactEvent:U}))},[S,i]),D=A.useCallback(U=>{S(sm(U)),S(En({handler:u,reactEvent:U}))},[S,u]),B=A.useCallback(U=>{S(vk()),S(En({handler:c,reactEvent:U}))},[S,c]),z=A.useCallback(U=>{S(sm(U)),S(En({handler:f,reactEvent:U}))},[S,f]),Y=A.useCallback(()=>{S(NN())},[S]),$=A.useCallback(()=>{S(TN())},[S]),ye=A.useCallback(U=>{S(kN(U.key))},[S]),ae=A.useCallback(U=>{S(En({handler:a,reactEvent:U}))},[S,a]),be=A.useCallback(U=>{S(En({handler:s,reactEvent:U}))},[S,s]),ne=A.useCallback(U=>{S(En({handler:l,reactEvent:U}))},[S,l]),le=A.useCallback(U=>{S(En({handler:p,reactEvent:U}))},[S,p]),Ee=A.useCallback(U=>{S(En({handler:g,reactEvent:U}))},[S,g]),Pe=A.useCallback(U=>{x&&S(jN(U)),S(En({handler:m,reactEvent:U}))},[S,x,m]),Se=A.useCallback(U=>{S(En({handler:d,reactEvent:U}))},[S,d]),L=mte(b);return v.createElement(Lk.Provider,{value:E},v.createElement(A5.Provider,{value:P},v.createElement(L,{width:_??h?.width,height:T??h?.height,className:Ue("recharts-wrapper",r),style:ate({position:"relative",cursor:"default",width:_,height:T},h),onClick:V,onContextMenu:ae,onDoubleClick:be,onFocus:Y,onBlur:$,onKeyDown:ye,onMouseDown:ne,onMouseEnter:D,onMouseLeave:B,onMouseMove:z,onMouseUp:le,onTouchEnd:Se,onTouchMove:Pe,onTouchStart:Ee,ref:F},v.createElement(cte,null),n)))}),vte=["width","height","responsive","children","className","style","compact","title","desc"];function yte(e,t){if(e==null)return{};var n,r,o=bte(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function bte(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var xte=A.forwardRef((e,t)=>{var{width:n,height:r,responsive:o,children:i,className:a,style:s,compact:l,title:u,desc:c}=e,f=yte(e,vte),p=_r(f);return l?v.createElement(v.Fragment,null,v.createElement(ws,{width:n,height:r}),v.createElement(xS,{otherAttributes:p,title:u,desc:c},i)):v.createElement(gte,{className:a,style:s,width:n,height:r,responsive:o??!1,onClick:e.onClick,onMouseLeave:e.onMouseLeave,onMouseEnter:e.onMouseEnter,onMouseMove:e.onMouseMove,onMouseDown:e.onMouseDown,onMouseUp:e.onMouseUp,onContextMenu:e.onContextMenu,onDoubleClick:e.onDoubleClick,onTouchStart:e.onTouchStart,onTouchMove:e.onTouchMove,onTouchEnd:e.onTouchEnd},v.createElement(xS,{otherAttributes:p,title:u,desc:c,ref:t},v.createElement(dQ,null,i)))});function lm(){return lm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},lm.apply(null,arguments)}function CS(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function wte(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?CS(Object(n),!0).forEach(function(r){Cte(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):CS(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Cte(e,t,n){return(t=Ste(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ste(e){var t=Ete(e,"string");return typeof t=="symbol"?t:t+""}function Ete(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Ote={top:5,right:5,bottom:5,left:5},Pte=wte({accessibilityLayer:!0,barCategoryGap:"10%",barGap:4,layout:"horizontal",margin:Ote,responsive:!1,reverseStackOrder:!1,stackOffset:"none",syncMethod:"index"},LN),_te=A.forwardRef(function(t,n){var r,o=wn(t.categoricalChartProps,Pte),{chartName:i,defaultTooltipEventType:a,validateTooltipEventTypes:s,tooltipPayloadSearcher:l,categoricalChartProps:u}=t,c={chartName:i,defaultTooltipEventType:a,validateTooltipEventTypes:s,tooltipPayloadSearcher:l,eventEmitter:void 0};return v.createElement(qee,{preloadedState:{options:c},reduxStoreName:(r=u.id)!==null&&r!==void 0?r:i},v.createElement(iQ,{chartData:u.data}),v.createElement(Yee,{layout:o.layout,margin:o.margin}),v.createElement(Qee,{throttleDelay:o.throttleDelay,throttledEvents:o.throttledEvents}),v.createElement(Xee,{baseValue:o.baseValue,accessibilityLayer:o.accessibilityLayer,barCategoryGap:o.barCategoryGap,maxBarSize:o.maxBarSize,stackOffset:o.stackOffset,barGap:o.barGap,barSize:o.barSize,syncId:o.syncId,syncMethod:o.syncMethod,className:o.className,reverseStackOrder:o.reverseStackOrder}),v.createElement(xte,lm({},o,{ref:n})))}),Ate=["axis","item"],Rte=A.forwardRef((e,t)=>v.createElement(_te,{chartName:"BarChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:Ate,tooltipPayloadSearcher:y7,categoricalChartProps:e,ref:t}));const Ite={light:"",dark:".dark"},VN=v.createContext(null);function kte(){const e=v.useContext(VN);if(!e)throw new Error("useChart must be used within a <ChartContainer />");return e}function Nte({id:e,className:t,children:n,config:r,...o}){const i=v.useId(),a=`chart-${e||i.replace(/:/g,"")}`;return C.jsx(VN.Provider,{value:{config:r},children:C.jsxs("div",{"data-slot":"chart","data-chart":a,className:q(`[&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground
209
+ [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50
210
+ [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border
211
+ [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border
212
+ [&_.recharts-radial-bar-background-sector]:fill-muted
213
+ [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted
214
+ [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border flex aspect-video
215
+ justify-center text-xs [&_.recharts-dot[stroke='#fff']]:stroke-transparent
216
+ [&_.recharts-layer]:outline-hidden [&_.recharts-sector]:outline-hidden
217
+ [&_.recharts-sector[stroke='#fff']]:stroke-transparent
218
+ [&_.recharts-surface]:outline-hidden`,t),...o,children:[C.jsx(Tte,{id:a,config:r}),C.jsx(gU,{children:n})]})})}const Tte=({id:e,config:t})=>{const n=Object.entries(t).filter(([,r])=>r.theme||r.color);return n.length?C.jsx("style",{dangerouslySetInnerHTML:{__html:Object.entries(Ite).map(([r,o])=>`
219
+ ${o} [data-chart=${e}] {
220
+ ${n.map(([i,a])=>{const s=a.theme?.[r]||a.color;return s?` --color-${i}: ${s};`:null}).filter(Boolean).join(`
221
+ `)}
222
+ }
223
+ `).join(`
224
+ `)}}):null},Mte=B7;function Dte({active:e,payload:t,className:n,indicator:r="dot",hideLabel:o=!1,hideIndicator:i=!1,label:a,labelFormatter:s,labelClassName:l,formatter:u,color:c,nameKey:f,labelKey:p}){const{config:d}=kte(),m=v.useMemo(()=>{if(o||!t?.length)return null;const[h]=t,y=`${p||h?.dataKey||h?.name||"value"}`,b=SS(d,h,y),x=!p&&typeof a=="string"?d[a]?.label||a:b?.label;return s?C.jsx("div",{className:q("font-medium",l),children:s(x,t)}):x?C.jsx("div",{className:q("font-medium",l),children:x}):null},[a,s,t,o,l,d,p]);if(!e||!t?.length)return null;const g=t.length===1&&r!=="dot";return C.jsxs("div",{className:q(`border-border/50 bg-background grid min-w-32 items-start gap-1.5 rounded-lg
225
+ border px-2.5 py-1.5 text-xs shadow-xl`,n),children:[g?null:m,C.jsx("div",{className:"grid gap-1.5",children:t.filter(h=>h.type!=="none").map((h,y)=>{const b=`${f||h.name||h.dataKey||"value"}`,x=SS(d,h,b),w=c||h.payload?.fill||h.color;return C.jsx("div",{className:q(`[&>svg]:text-muted-foreground flex w-full flex-wrap items-stretch gap-2
226
+ [&>svg]:h-2.5 [&>svg]:w-2.5`,r==="dot"&&"items-center"),children:u&&h?.value!==void 0&&h.name?u(h.value,h.name,h,y,h.payload):C.jsxs(C.Fragment,{children:[x?.icon?C.jsx(x.icon,{}):!i&&C.jsx("div",{className:q(`shrink-0 rounded-[2px] border-(--color-border)
227
+ bg-(--color-bg)`,{"h-2.5 w-2.5":r==="dot","w-1":r==="line","w-0 border-[1.5px] border-dashed bg-transparent":r==="dashed","my-0.5":g&&r==="dashed"}),style:{"--color-bg":w,"--color-border":w}}),C.jsxs("div",{className:q("flex flex-1 justify-between leading-none",g?"items-end":"items-center"),children:[C.jsxs("div",{className:"grid gap-1.5",children:[g?m:null,C.jsx("span",{className:"text-muted-foreground",children:x?.label||h.name})]}),h.value&&C.jsx("span",{className:"text-foreground font-mono font-medium tabular-nums",children:h.value.toLocaleString()})]})]})},h.dataKey)})})]})}function SS(e,t,n){if(typeof t!="object"||t===null)return;const r="payload"in t&&typeof t.payload=="object"&&t.payload!==null?t.payload:void 0;let o=n;return n in t&&typeof t[n]=="string"?o=t[n]:r&&n in r&&typeof r[n]=="string"&&(o=r[n]),o in e?e[o]:e[n]}const jte=14.52,ES=10,$te=4,zN="#3B82F6",Lte={desktop:{label:"default",color:zN}},Fte=({chartContainer:e,barChart:t,cartesianGrid:n,axis:r,hasTooltip:o=!0,tooltip:i,bar:a,chartTooltipContent:s,fillContainer:l=!1,minHeight:u=200})=>{const c=e?.config??Lte;return C.jsx("div",{className:q("w-full",l?"h-full":"min-h-[200px]"),style:{minHeight:l?void 0:u},children:C.jsx(Nte,{...e,config:e?.config??c,className:q(!l&&"aspect-video",e?.className),children:C.jsxs(Rte,{barSize:t?.width??jte,...t,margin:t?.margin||{top:10,right:10,bottom:20,left:10},children:[C.jsx(mN,{vertical:n?.vertical??!1,...n}),C.jsx(ON,{tickLine:r?.y?.tickLine??!1,axisLine:r?.y?.axisLine??!1,tickMargin:r?.y?.tickMargin??ES,width:r?.y?.width??35,...r?.y}),C.jsx(EN,{tickLine:r?.x?.tickLine??!1,axisLine:r?.x?.axisLine??!1,tickMargin:r?.x?.tickMargin??ES,...r?.x}),o&&C.jsx(Mte,{cursor:i?.cursor??!0,content:C.jsx(Dte,{...s}),...i}),C.jsx(CN,{radius:a?.radius??$te,fill:a?.fill??zN,...a})]})})})};exports.AppPagination=p3;exports.AppSidebar=b3;exports.Badge=Dp;exports.BasicChart=Fte;exports.BasicCheckbox=x3;exports.BasicModal=w3;exports.BasicTable=p5;exports.BasicTooltip=h5;exports.Button=wr;exports.Card=GS;exports.CardContent=KS;exports.CardDescription=qS;exports.CardFooter=YS;exports.CardHeader=WS;exports.CardTitle=US;exports.Checkbox=ym;exports.Combobox=nO;exports.ComboboxChip=lO;exports.ComboboxChips=eh;exports.ComboboxChipsInput=th;exports.ComboboxCollection=eV;exports.ComboboxContent=oO;exports.ComboboxEmpty=sO;exports.ComboboxField=rO;exports.ComboboxGroup=QF;exports.ComboboxInput=ZF;exports.ComboboxItem=aO;exports.ComboboxLabel=JF;exports.ComboboxList=iO;exports.ComboboxSeparator=tV;exports.ComboboxTrigger=ou;exports.ComboboxValue=Jp;exports.Dialog=HO;exports.DialogClose=_z;exports.DialogContent=fg;exports.DialogDescription=WO;exports.DialogFooter=pg;exports.DialogHeader=dg;exports.DialogOverlay=cg;exports.DialogPortal=GO;exports.DialogTitle=hg;exports.DialogTrigger=Pz;exports.Field=cs;exports.FieldContent=_F;exports.FieldDescription=fs;exports.FieldError=J1;exports.FieldGroup=us;exports.FieldLabel=Yi;exports.FieldLegend=PF;exports.FieldSeparator=RF;exports.FieldSet=bc;exports.FieldTitle=AF;exports.Icon=Or;exports.Input=tg;exports.InputField=I_;exports.InputGroup=ng;exports.InputGroupAddon=rg;exports.InputGroupButton=eO;exports.InputGroupInput=og;exports.InputGroupText=MF;exports.InputGroupTextarea=DF;exports.InputPassword=m5;exports.Label=Ha;exports.NavigationItem=UO;exports.NavigationMenu=qO;exports.Pagination=mg;exports.PaginationContent=gg;exports.PaginationEllipsis=XO;exports.PaginationItem=Pi;exports.PaginationLink=ds;exports.PaginationNext=YO;exports.PaginationPrevious=KO;exports.Progress=nP;exports.RadioButton=g5;exports.RadioGroup=wg;exports.RadioGroupItem=su;exports.SelectField=N_;exports.Separator=eg;exports.Switch=IP;exports.Table=Cg;exports.TableBody=Eg;exports.TableCaption=NP;exports.TableCell=lu;exports.TableFooter=kP;exports.TableHead=Og;exports.TableHeader=Sg;exports.TableRow=$a;exports.Tabs=OB;exports.TabsContent=YP;exports.TabsList=qP;exports.TabsTrigger=KP;exports.Textarea=xc;exports.TextareaField=y5;exports.Tooltip=y_;exports.TooltipArrow=x_;exports.TooltipContent=kg;exports.TooltipProvider=l3;exports.TooltipTrigger=b_;exports.Typography=Mp;exports.badgeVariants=dm;exports.buttonVariants=hm;exports.cn=q;exports.getTypographyClassName=vt;exports.typographyClassNames=fm;exports.typographyVariantOptions=XT;exports.usePopupControls=Ng;
169
228
  //# sourceMappingURL=index.cjs.map