brd-ui-kit 0.1.25 → 0.1.27

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,27 +1,27 @@
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
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const O=require("react/jsx-runtime"),j=require("react"),Up=require("react-dom");function mR(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 x=mR(j),la=mR(Up);function vR(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=vR(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Pt(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=vR(e))&&(r&&(r+=" "),r+=t);return r}const CW=(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},SW=(e,t)=>({classGroupId:e,validator:t}),yR=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Td="-",sS=[],EW="arbitrary..",_W=e=>{const t=PW(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{if(a.startsWith("[")&&a.endsWith("]"))return OW(a);const s=a.split(Td),u=s[0]===""&&s.length>1?1:0;return bR(s,u,t)},getConflictingClassGroupIds:(a,s)=>{if(s){const u=r[a],c=n[a];return u?c?CW(c,u):u:c||sS}return n[a]||sS}}},bR=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const i=e[t],o=n.nextPart.get(i);if(o){const c=bR(e,t+1,o);if(c)return c}const a=n.validators;if(a===null)return;const s=t===0?e.join(Td):e.slice(t).join(Td),u=a.length;for(let c=0;c<u;c++){const d=a[c];if(d.validator(s))return d.classGroupId}},OW=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?EW+r:void 0})(),PW=e=>{const{theme:t,classGroups:n}=e;return AW(n,t)},AW=(e,t)=>{const n=yR();for(const r in e){const i=e[r];Kb(i,n,r,t)}return n},Kb=(e,t,n,r)=>{const i=e.length;for(let o=0;o<i;o++){const a=e[o];RW(a,t,n,r)}},RW=(e,t,n,r)=>{if(typeof e=="string"){IW(e,t,n);return}if(typeof e=="function"){TW(e,t,n,r);return}kW(e,t,n,r)},IW=(e,t,n)=>{const r=e===""?t:xR(t,e);r.classGroupId=n},TW=(e,t,n,r)=>{if(NW(e)){Kb(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(SW(n,e))},kW=(e,t,n,r)=>{const i=Object.entries(e),o=i.length;for(let a=0;a<o;a++){const[s,u]=i[a];Kb(u,xR(t,s),n,r)}},xR=(e,t)=>{let n=e;const r=t.split(Td),i=r.length;for(let o=0;o<i;o++){const a=r[o];let s=n.nextPart.get(a);s||(s=yR(),n.nextPart.set(a,s)),n=s}return n},NW=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,MW=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const i=(o,a)=>{n[o]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(o){let a=n[o];if(a!==void 0)return a;if((a=r[o])!==void 0)return i(o,a),a},set(o,a){o in n?n[o]=a:i(o,a)}}},yy="!",lS=":",DW=[],uS=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),jW=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=i=>{const o=[];let a=0,s=0,u=0,c;const d=i.length;for(let b=0;b<d;b++){const v=i[b];if(a===0&&s===0){if(v===lS){o.push(i.slice(u,b)),u=b+1;continue}if(v==="/"){c=b;continue}}v==="["?a++:v==="]"?a--:v==="("?s++:v===")"&&s--}const p=o.length===0?i:i.slice(u);let g=p,h=!1;p.endsWith(yy)?(g=p.slice(0,-1),h=!0):p.startsWith(yy)&&(g=p.slice(1),h=!0);const y=c&&c>u?c-u:void 0;return uS(o,h,g,y)};if(t){const i=t+lS,o=r;r=a=>a.startsWith(i)?o(a.slice(i.length)):uS(DW,!1,a,void 0,!0)}if(n){const i=r;r=o=>n({className:o,parseClassName:i})}return r},LW=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let i=[];for(let o=0;o<n.length;o++){const a=n[o],s=a[0]==="[",u=t.has(a);s||u?(i.length>0&&(i.sort(),r.push(...i),i=[]),r.push(a)):i.push(a)}return i.length>0&&(i.sort(),r.push(...i)),r}},$W=e=>({cache:MW(e.cacheSize),parseClassName:jW(e),sortModifiers:LW(e),..._W(e)}),FW=/\s+/,VW=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:o}=t,a=[],s=e.trim().split(FW);let u="";for(let c=s.length-1;c>=0;c-=1){const d=s[c],{isExternal:p,modifiers:g,hasImportantModifier:h,baseClassName:y,maybePostfixModifierPosition:b}=n(d);if(p){u=d+(u.length>0?" "+u:u);continue}let v=!!b,w=r(v?y.substring(0,b):y);if(!w){if(!v){u=d+(u.length>0?" "+u:u);continue}if(w=r(y),!w){u=d+(u.length>0?" "+u:u);continue}v=!1}const C=g.length===0?"":g.length===1?g[0]:o(g).join(":"),E=h?C+yy:C,_=E+w;if(a.indexOf(_)>-1)continue;a.push(_);const P=i(w,v);for(let R=0;R<P.length;++R){const I=P[R];a.push(E+I)}u=d+(u.length>0?" "+u:u)}return u},BW=(...e)=>{let t=0,n,r,i="";for(;t<e.length;)(n=e[t++])&&(r=wR(n))&&(i&&(i+=" "),i+=r);return i},wR=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=wR(e[r]))&&(n&&(n+=" "),n+=t);return n},cS=(e,...t)=>{let n,r,i,o;const a=u=>{const c=t.reduce((d,p)=>p(d),e());return n=$W(c),r=n.cache.get,i=n.cache.set,o=s,s(u)},s=u=>{const c=r(u);if(c)return c;const d=VW(u,n);return i(u,d),d};return o=a,(...u)=>o(BW(...u))},zW=[],ln=e=>{const t=n=>n[e]||zW;return t.isThemeGetter=!0,t},CR=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,SR=/^\((?:(\w[\w-]*):)?(.+)\)$/i,WW=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,HW=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,UW=/\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$/,GW=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,qW=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,KW=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Vo=e=>WW.test(e),nt=e=>!!e&&!Number.isNaN(Number(e)),Bo=e=>!!e&&Number.isInteger(Number(e)),gm=e=>e.endsWith("%")&&nt(e.slice(0,-1)),Zi=e=>HW.test(e),ER=()=>!0,YW=e=>UW.test(e)&&!GW.test(e),Yb=()=>!1,XW=e=>qW.test(e),ZW=e=>KW.test(e),QW=e=>!Oe(e)&&!Pe(e),JW=e=>ua(e,PR,Yb),Oe=e=>CR.test(e),Ta=e=>ua(e,AR,YW),fS=e=>ua(e,sH,nt),eH=e=>ua(e,IR,ER),tH=e=>ua(e,RR,Yb),dS=e=>ua(e,_R,Yb),nH=e=>ua(e,OR,ZW),Tf=e=>ua(e,TR,XW),Pe=e=>SR.test(e),au=e=>ls(e,AR),rH=e=>ls(e,RR),pS=e=>ls(e,_R),iH=e=>ls(e,PR),oH=e=>ls(e,OR),kf=e=>ls(e,TR,!0),aH=e=>ls(e,IR,!0),ua=(e,t,n)=>{const r=CR.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},ls=(e,t,n=!1)=>{const r=SR.exec(e);return r?r[1]?t(r[1]):n:!1},_R=e=>e==="position"||e==="percentage",OR=e=>e==="image"||e==="url",PR=e=>e==="length"||e==="size"||e==="bg-size",AR=e=>e==="length",sH=e=>e==="number",RR=e=>e==="family-name",IR=e=>e==="number"||e==="weight",TR=e=>e==="shadow",hS=()=>{const e=ln("color"),t=ln("font"),n=ln("text"),r=ln("font-weight"),i=ln("tracking"),o=ln("leading"),a=ln("breakpoint"),s=ln("container"),u=ln("spacing"),c=ln("radius"),d=ln("shadow"),p=ln("inset-shadow"),g=ln("text-shadow"),h=ln("drop-shadow"),y=ln("blur"),b=ln("perspective"),v=ln("aspect"),w=ln("ease"),C=ln("animate"),E=()=>["auto","avoid","all","avoid-page","page","left","right","column"],_=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],P=()=>[..._(),Pe,Oe],R=()=>["auto","hidden","clip","visible","scroll"],I=()=>["auto","contain","none"],k=()=>[Pe,Oe,u],B=()=>[Vo,"full","auto",...k()],L=()=>[Bo,"none","subgrid",Pe,Oe],V=()=>["auto",{span:["full",Bo,Pe,Oe]},Bo,Pe,Oe],D=()=>[Bo,"auto",Pe,Oe],H=()=>["auto","min","max","fr",Pe,Oe],J=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],te=()=>["start","end","center","stretch","center-safe","end-safe"],G=()=>["auto",...k()],ee=()=>[Vo,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...k()],Q=()=>[Vo,"screen","full","dvw","lvw","svw","min","max","fit",...k()],pe=()=>[Vo,"screen","full","lh","dvh","lvh","svh","min","max","fit",...k()],K=()=>[e,Pe,Oe],Ae=()=>[..._(),pS,dS,{position:[Pe,Oe]}],Se=()=>["no-repeat",{repeat:["","x","y","space","round"]}],$e=()=>["auto","cover","contain",iH,JW,{size:[Pe,Oe]}],we=()=>[gm,au,Ta],Ce=()=>["","none","full",c,Pe,Oe],ze=()=>["",nt,au,Ta],Ke=()=>["solid","dashed","dotted","double"],Fe=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Y=()=>[nt,gm,pS,dS],oe=()=>["","none",y,Pe,Oe],ne=()=>["none",nt,Pe,Oe],$=()=>["none",nt,Pe,Oe],ie=()=>[nt,Pe,Oe],Z=()=>[Vo,"full",...k()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Zi],breakpoint:[Zi],color:[ER],container:[Zi],"drop-shadow":[Zi],ease:["in","out","in-out"],font:[QW],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Zi],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Zi],shadow:[Zi],spacing:["px",nt],text:[Zi],"text-shadow":[Zi],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Vo,Oe,Pe,v]}],container:["container"],columns:[{columns:[nt,Oe,Pe,s]}],"break-after":[{"break-after":E()}],"break-before":[{"break-before":E()}],"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:P()}],overflow:[{overflow:R()}],"overflow-x":[{"overflow-x":R()}],"overflow-y":[{"overflow-y":R()}],overscroll:[{overscroll:I()}],"overscroll-x":[{"overscroll-x":I()}],"overscroll-y":[{"overscroll-y":I()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:B()}],"inset-x":[{"inset-x":B()}],"inset-y":[{"inset-y":B()}],start:[{"inset-s":B(),start:B()}],end:[{"inset-e":B(),end:B()}],"inset-bs":[{"inset-bs":B()}],"inset-be":[{"inset-be":B()}],top:[{top:B()}],right:[{right:B()}],bottom:[{bottom:B()}],left:[{left:B()}],visibility:["visible","invisible","collapse"],z:[{z:[Bo,"auto",Pe,Oe]}],basis:[{basis:[Vo,"full","auto",s,...k()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[nt,Vo,"auto","initial","none",Oe]}],grow:[{grow:["",nt,Pe,Oe]}],shrink:[{shrink:["",nt,Pe,Oe]}],order:[{order:[Bo,"first","last","none",Pe,Oe]}],"grid-cols":[{"grid-cols":L()}],"col-start-end":[{col:V()}],"col-start":[{"col-start":D()}],"col-end":[{"col-end":D()}],"grid-rows":[{"grid-rows":L()}],"row-start-end":[{row:V()}],"row-start":[{"row-start":D()}],"row-end":[{"row-end":D()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":H()}],"auto-rows":[{"auto-rows":H()}],gap:[{gap:k()}],"gap-x":[{"gap-x":k()}],"gap-y":[{"gap-y":k()}],"justify-content":[{justify:[...J(),"normal"]}],"justify-items":[{"justify-items":[...te(),"normal"]}],"justify-self":[{"justify-self":["auto",...te()]}],"align-content":[{content:["normal",...J()]}],"align-items":[{items:[...te(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...te(),{baseline:["","last"]}]}],"place-content":[{"place-content":J()}],"place-items":[{"place-items":[...te(),"baseline"]}],"place-self":[{"place-self":["auto",...te()]}],p:[{p:k()}],px:[{px:k()}],py:[{py:k()}],ps:[{ps:k()}],pe:[{pe:k()}],pbs:[{pbs:k()}],pbe:[{pbe:k()}],pt:[{pt:k()}],pr:[{pr:k()}],pb:[{pb:k()}],pl:[{pl:k()}],m:[{m:G()}],mx:[{mx:G()}],my:[{my:G()}],ms:[{ms:G()}],me:[{me:G()}],mbs:[{mbs:G()}],mbe:[{mbe:G()}],mt:[{mt:G()}],mr:[{mr:G()}],mb:[{mb:G()}],ml:[{ml:G()}],"space-x":[{"space-x":k()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":k()}],"space-y-reverse":["space-y-reverse"],size:[{size:ee()}],"inline-size":[{inline:["auto",...Q()]}],"min-inline-size":[{"min-inline":["auto",...Q()]}],"max-inline-size":[{"max-inline":["none",...Q()]}],"block-size":[{block:["auto",...pe()]}],"min-block-size":[{"min-block":["auto",...pe()]}],"max-block-size":[{"max-block":["none",...pe()]}],w:[{w:[s,"screen",...ee()]}],"min-w":[{"min-w":[s,"screen","none",...ee()]}],"max-w":[{"max-w":[s,"screen","none","prose",{screen:[a]},...ee()]}],h:[{h:["screen","lh",...ee()]}],"min-h":[{"min-h":["screen","lh","none",...ee()]}],"max-h":[{"max-h":["screen","lh",...ee()]}],"font-size":[{text:["base",n,au,Ta]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,aH,eH]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",gm,Oe]}],"font-family":[{font:[rH,tH,t]}],"font-features":[{"font-features":[Oe]}],"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:[i,Pe,Oe]}],"line-clamp":[{"line-clamp":[nt,"none",Pe,fS]}],leading:[{leading:[o,...k()]}],"list-image":[{"list-image":["none",Pe,Oe]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Pe,Oe]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:K()}],"text-color":[{text:K()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Ke(),"wavy"]}],"text-decoration-thickness":[{decoration:[nt,"from-font","auto",Pe,Ta]}],"text-decoration-color":[{decoration:K()}],"underline-offset":[{"underline-offset":[nt,"auto",Pe,Oe]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:k()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Pe,Oe]}],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",Pe,Oe]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:Ae()}],"bg-repeat":[{bg:Se()}],"bg-size":[{bg:$e()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Bo,Pe,Oe],radial:["",Pe,Oe],conic:[Bo,Pe,Oe]},oH,nH]}],"bg-color":[{bg:K()}],"gradient-from-pos":[{from:we()}],"gradient-via-pos":[{via:we()}],"gradient-to-pos":[{to:we()}],"gradient-from":[{from:K()}],"gradient-via":[{via:K()}],"gradient-to":[{to:K()}],rounded:[{rounded:Ce()}],"rounded-s":[{"rounded-s":Ce()}],"rounded-e":[{"rounded-e":Ce()}],"rounded-t":[{"rounded-t":Ce()}],"rounded-r":[{"rounded-r":Ce()}],"rounded-b":[{"rounded-b":Ce()}],"rounded-l":[{"rounded-l":Ce()}],"rounded-ss":[{"rounded-ss":Ce()}],"rounded-se":[{"rounded-se":Ce()}],"rounded-ee":[{"rounded-ee":Ce()}],"rounded-es":[{"rounded-es":Ce()}],"rounded-tl":[{"rounded-tl":Ce()}],"rounded-tr":[{"rounded-tr":Ce()}],"rounded-br":[{"rounded-br":Ce()}],"rounded-bl":[{"rounded-bl":Ce()}],"border-w":[{border:ze()}],"border-w-x":[{"border-x":ze()}],"border-w-y":[{"border-y":ze()}],"border-w-s":[{"border-s":ze()}],"border-w-e":[{"border-e":ze()}],"border-w-bs":[{"border-bs":ze()}],"border-w-be":[{"border-be":ze()}],"border-w-t":[{"border-t":ze()}],"border-w-r":[{"border-r":ze()}],"border-w-b":[{"border-b":ze()}],"border-w-l":[{"border-l":ze()}],"divide-x":[{"divide-x":ze()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ze()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Ke(),"hidden","none"]}],"divide-style":[{divide:[...Ke(),"hidden","none"]}],"border-color":[{border:K()}],"border-color-x":[{"border-x":K()}],"border-color-y":[{"border-y":K()}],"border-color-s":[{"border-s":K()}],"border-color-e":[{"border-e":K()}],"border-color-bs":[{"border-bs":K()}],"border-color-be":[{"border-be":K()}],"border-color-t":[{"border-t":K()}],"border-color-r":[{"border-r":K()}],"border-color-b":[{"border-b":K()}],"border-color-l":[{"border-l":K()}],"divide-color":[{divide:K()}],"outline-style":[{outline:[...Ke(),"none","hidden"]}],"outline-offset":[{"outline-offset":[nt,Pe,Oe]}],"outline-w":[{outline:["",nt,au,Ta]}],"outline-color":[{outline:K()}],shadow:[{shadow:["","none",d,kf,Tf]}],"shadow-color":[{shadow:K()}],"inset-shadow":[{"inset-shadow":["none",p,kf,Tf]}],"inset-shadow-color":[{"inset-shadow":K()}],"ring-w":[{ring:ze()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:K()}],"ring-offset-w":[{"ring-offset":[nt,Ta]}],"ring-offset-color":[{"ring-offset":K()}],"inset-ring-w":[{"inset-ring":ze()}],"inset-ring-color":[{"inset-ring":K()}],"text-shadow":[{"text-shadow":["none",g,kf,Tf]}],"text-shadow-color":[{"text-shadow":K()}],opacity:[{opacity:[nt,Pe,Oe]}],"mix-blend":[{"mix-blend":[...Fe(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Fe()}],"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":[nt]}],"mask-image-linear-from-pos":[{"mask-linear-from":Y()}],"mask-image-linear-to-pos":[{"mask-linear-to":Y()}],"mask-image-linear-from-color":[{"mask-linear-from":K()}],"mask-image-linear-to-color":[{"mask-linear-to":K()}],"mask-image-t-from-pos":[{"mask-t-from":Y()}],"mask-image-t-to-pos":[{"mask-t-to":Y()}],"mask-image-t-from-color":[{"mask-t-from":K()}],"mask-image-t-to-color":[{"mask-t-to":K()}],"mask-image-r-from-pos":[{"mask-r-from":Y()}],"mask-image-r-to-pos":[{"mask-r-to":Y()}],"mask-image-r-from-color":[{"mask-r-from":K()}],"mask-image-r-to-color":[{"mask-r-to":K()}],"mask-image-b-from-pos":[{"mask-b-from":Y()}],"mask-image-b-to-pos":[{"mask-b-to":Y()}],"mask-image-b-from-color":[{"mask-b-from":K()}],"mask-image-b-to-color":[{"mask-b-to":K()}],"mask-image-l-from-pos":[{"mask-l-from":Y()}],"mask-image-l-to-pos":[{"mask-l-to":Y()}],"mask-image-l-from-color":[{"mask-l-from":K()}],"mask-image-l-to-color":[{"mask-l-to":K()}],"mask-image-x-from-pos":[{"mask-x-from":Y()}],"mask-image-x-to-pos":[{"mask-x-to":Y()}],"mask-image-x-from-color":[{"mask-x-from":K()}],"mask-image-x-to-color":[{"mask-x-to":K()}],"mask-image-y-from-pos":[{"mask-y-from":Y()}],"mask-image-y-to-pos":[{"mask-y-to":Y()}],"mask-image-y-from-color":[{"mask-y-from":K()}],"mask-image-y-to-color":[{"mask-y-to":K()}],"mask-image-radial":[{"mask-radial":[Pe,Oe]}],"mask-image-radial-from-pos":[{"mask-radial-from":Y()}],"mask-image-radial-to-pos":[{"mask-radial-to":Y()}],"mask-image-radial-from-color":[{"mask-radial-from":K()}],"mask-image-radial-to-color":[{"mask-radial-to":K()}],"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":_()}],"mask-image-conic-pos":[{"mask-conic":[nt]}],"mask-image-conic-from-pos":[{"mask-conic-from":Y()}],"mask-image-conic-to-pos":[{"mask-conic-to":Y()}],"mask-image-conic-from-color":[{"mask-conic-from":K()}],"mask-image-conic-to-color":[{"mask-conic-to":K()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:Ae()}],"mask-repeat":[{mask:Se()}],"mask-size":[{mask:$e()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Pe,Oe]}],filter:[{filter:["","none",Pe,Oe]}],blur:[{blur:oe()}],brightness:[{brightness:[nt,Pe,Oe]}],contrast:[{contrast:[nt,Pe,Oe]}],"drop-shadow":[{"drop-shadow":["","none",h,kf,Tf]}],"drop-shadow-color":[{"drop-shadow":K()}],grayscale:[{grayscale:["",nt,Pe,Oe]}],"hue-rotate":[{"hue-rotate":[nt,Pe,Oe]}],invert:[{invert:["",nt,Pe,Oe]}],saturate:[{saturate:[nt,Pe,Oe]}],sepia:[{sepia:["",nt,Pe,Oe]}],"backdrop-filter":[{"backdrop-filter":["","none",Pe,Oe]}],"backdrop-blur":[{"backdrop-blur":oe()}],"backdrop-brightness":[{"backdrop-brightness":[nt,Pe,Oe]}],"backdrop-contrast":[{"backdrop-contrast":[nt,Pe,Oe]}],"backdrop-grayscale":[{"backdrop-grayscale":["",nt,Pe,Oe]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[nt,Pe,Oe]}],"backdrop-invert":[{"backdrop-invert":["",nt,Pe,Oe]}],"backdrop-opacity":[{"backdrop-opacity":[nt,Pe,Oe]}],"backdrop-saturate":[{"backdrop-saturate":[nt,Pe,Oe]}],"backdrop-sepia":[{"backdrop-sepia":["",nt,Pe,Oe]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":k()}],"border-spacing-x":[{"border-spacing-x":k()}],"border-spacing-y":[{"border-spacing-y":k()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Pe,Oe]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[nt,"initial",Pe,Oe]}],ease:[{ease:["linear","initial",w,Pe,Oe]}],delay:[{delay:[nt,Pe,Oe]}],animate:[{animate:["none",C,Pe,Oe]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[b,Pe,Oe]}],"perspective-origin":[{"perspective-origin":P()}],rotate:[{rotate:ne()}],"rotate-x":[{"rotate-x":ne()}],"rotate-y":[{"rotate-y":ne()}],"rotate-z":[{"rotate-z":ne()}],scale:[{scale:$()}],"scale-x":[{"scale-x":$()}],"scale-y":[{"scale-y":$()}],"scale-z":[{"scale-z":$()}],"scale-3d":["scale-3d"],skew:[{skew:ie()}],"skew-x":[{"skew-x":ie()}],"skew-y":[{"skew-y":ie()}],transform:[{transform:[Pe,Oe,"","none","gpu","cpu"]}],"transform-origin":[{origin:P()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Z()}],"translate-x":[{"translate-x":Z()}],"translate-y":[{"translate-y":Z()}],"translate-z":[{"translate-z":Z()}],"translate-none":["translate-none"],accent:[{accent:K()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:K()}],"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",Pe,Oe]}],"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":k()}],"scroll-mx":[{"scroll-mx":k()}],"scroll-my":[{"scroll-my":k()}],"scroll-ms":[{"scroll-ms":k()}],"scroll-me":[{"scroll-me":k()}],"scroll-mbs":[{"scroll-mbs":k()}],"scroll-mbe":[{"scroll-mbe":k()}],"scroll-mt":[{"scroll-mt":k()}],"scroll-mr":[{"scroll-mr":k()}],"scroll-mb":[{"scroll-mb":k()}],"scroll-ml":[{"scroll-ml":k()}],"scroll-p":[{"scroll-p":k()}],"scroll-px":[{"scroll-px":k()}],"scroll-py":[{"scroll-py":k()}],"scroll-ps":[{"scroll-ps":k()}],"scroll-pe":[{"scroll-pe":k()}],"scroll-pbs":[{"scroll-pbs":k()}],"scroll-pbe":[{"scroll-pbe":k()}],"scroll-pt":[{"scroll-pt":k()}],"scroll-pr":[{"scroll-pr":k()}],"scroll-pb":[{"scroll-pb":k()}],"scroll-pl":[{"scroll-pl":k()}],"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",Pe,Oe]}],fill:[{fill:["none",...K()]}],"stroke-w":[{stroke:[nt,au,Ta,fS]}],stroke:[{stroke:["none",...K()]}],"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"]}},lH=(e,{cacheSize:t,prefix:n,experimentalParseClassName:r,extend:i={},override:o={}})=>(Cu(e,"cacheSize",t),Cu(e,"prefix",n),Cu(e,"experimentalParseClassName",r),Nf(e.theme,o.theme),Nf(e.classGroups,o.classGroups),Nf(e.conflictingClassGroups,o.conflictingClassGroups),Nf(e.conflictingClassGroupModifiers,o.conflictingClassGroupModifiers),Cu(e,"orderSensitiveModifiers",o.orderSensitiveModifiers),Mf(e.theme,i.theme),Mf(e.classGroups,i.classGroups),Mf(e.conflictingClassGroups,i.conflictingClassGroups),Mf(e.conflictingClassGroupModifiers,i.conflictingClassGroupModifiers),kR(e,i,"orderSensitiveModifiers"),e),Cu=(e,t,n)=>{n!==void 0&&(e[t]=n)},Nf=(e,t)=>{if(t)for(const n in t)Cu(e,n,t[n])},Mf=(e,t)=>{if(t)for(const n in t)kR(e,t,n)},kR=(e,t,n)=>{const r=t[n];r!==void 0&&(e[n]=e[n]?e[n].concat(r):r)},uH=(e,...t)=>typeof e=="function"?cS(hS,e,...t):cS(()=>lH(hS(),e),...t),cH=uH({extend:{theme:{text:["xxs","xxl","h-xs","h-sm","h-md","h-lg","h-xl","h-xxl"]}}});function ue(...e){return cH(Pt(e))}const gS=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,mS=Pt,xt=(e,t)=>n=>{var r;if(t?.variants==null)return mS(e,n?.class,n?.className);const{variants:i,defaultVariants:o}=t,a=Object.keys(i).map(c=>{const d=n?.[c],p=o?.[c];if(d===null)return null;const g=gS(d)||gS(p);return i[c][g]}),s=n&&Object.entries(n).reduce((c,d)=>{let[p,g]=d;return g===void 0||(c[p]=g),c},{}),u=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((c,d)=>{let{class:p,className:g,...h}=d;return Object.entries(h).every(y=>{let[b,v]=y;return Array.isArray(v)?v.includes({...o,...s}[b]):{...o,...s}[b]===v})?[...c,p,g]:c},[]);return mS(e,a,u,n?.class,n?.className)},fH=["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"],dH={"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"},Xb=xt("tracking-normal",{variants:{variant:dH},defaultVariants:{variant:"body-md-regular"}}),dn=(e="body-md-regular")=>Xb({variant:e}),pH=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",by=({as:e,className:t,variant:n,...r})=>{const i=n??"body-md-regular",o=e??pH(i);return x.createElement(o,{...r,className:ue(Xb({variant:i}),t)})},Zb=xt(`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"}}),hH=xt("tracking-normal whitespace-nowrap",{variants:{kind:{status:dn("body-xs-medium"),priority:dn("body-sm-regular")}},defaultVariants:{kind:"status"}});function xy({variant:e,kind:t="status",dotPosition:n,classNames:r={},children:i,...o}){const a=!!n,{className:s,dotClassName:u,labelClassName:c}=r;return O.jsxs("div",{className:ue(Zb({variant:e,kind:t,dotPosition:n}),s),...o,children:[a&&O.jsx("span",{className:ue("inline-block h-2 w-2 rounded-full bg-current",u),"aria-hidden":"true"}),O.jsx("span",{className:ue(hH({kind:t}),c),children:i})]})}function vS(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Qb(...e){return t=>{let n=!1;const r=e.map(i=>{const o=vS(i,t);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let i=0;i<r.length;i++){const o=r[i];typeof o=="function"?o():vS(e[i],null)}}}}function Zt(...e){return x.useCallback(Qb(...e),e)}var gH=Symbol.for("react.lazy"),kd=x[" use ".trim().toString()];function mH(e){return typeof e=="object"&&e!==null&&"then"in e}function NR(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===gH&&"_payload"in e&&mH(e._payload)}function MR(e){const t=yH(e),n=x.forwardRef((r,i)=>{let{children:o,...a}=r;NR(o)&&typeof kd=="function"&&(o=kd(o._payload));const s=x.Children.toArray(o),u=s.find(xH);if(u){const c=u.props.children,d=s.map(p=>p===u?x.Children.count(c)>1?x.Children.only(null):x.isValidElement(c)?c.props.children:null:p);return O.jsx(t,{...a,ref:i,children:x.isValidElement(c)?x.cloneElement(c,void 0,d):null})}return O.jsx(t,{...a,ref:i,children:o})});return n.displayName=`${e}.Slot`,n}var vH=MR("Slot");function yH(e){const t=x.forwardRef((n,r)=>{let{children:i,...o}=n;if(NR(i)&&typeof kd=="function"&&(i=kd(i._payload)),x.isValidElement(i)){const a=CH(i),s=wH(o,i.props);return i.type!==x.Fragment&&(s.ref=r?Qb(r,a):a),x.cloneElement(i,s)}return x.Children.count(i)>1?x.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var bH=Symbol("radix.slottable");function xH(e){return x.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===bH}function wH(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...s)=>{const u=o(...s);return i(...s),u}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}function CH(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 Jb=xt(["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:`${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
5
+ aria-expanded:text-primary-text`},size:{lg:`${dn("body-lg-medium")} w-fit gap-2 px-4.5 py-3
6
+ [&_svg]:size-[18px]`,md:`${dn("body-md-medium")} w-fit gap-2 px-4.5 py-2
7
+ [&_svg]:size-4`,sm:`${dn("body-sm-medium")} w-fit gap-2 px-3 py-2
8
+ [&_svg]:size-4`,xs:`${dn("body-xs-medium")} w-fit gap-1 px-3 py-2
9
+ [&_svg]:size-[14px]`,default:`${dn("body-sm-medium")} size-9 [&_svg]:size-4`}},compoundVariants:[{variant:"link",size:"lg",className:"[&_svg]:size-5"}],defaultVariants:{variant:"primary",size:"md"}}),oo=({className:e,variant:t,size:n,asChild:r=!1,ref:i,...o})=>{const a=r?vH:"button";return O.jsx(a,{className:ue(Jb({variant:t,size:n,className:e})),ref:i,...o})};oo.displayName="Button";const SH=xt("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)]"}]}),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
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)]"}]}),EH=xt("flex flex-col space-y-1.5 p-6"),_H=xt(`group-data-[disabled=true]/card:text-disabled-text leading-none font-semibold
14
+ tracking-tight`),OH=xt(`${dn("body-sm-regular")} text-muted-foreground
15
+ group-data-[disabled=true]/card:text-disabled-text`),PH=xt("group-data-[disabled=true]/card:text-disabled-text p-6 pt-0"),AH=xt("group-data-[disabled=true]/card:text-disabled-text flex items-center p-6 pt-0"),DR=({ref:e,className:t,variant:n,disabled:r,active:i,...o})=>O.jsx("div",{ref:e,"data-disabled":r||void 0,className:ue(SH({variant:n,active:i}),t),...o});DR.displayName="Card";const jR=({ref:e,className:t,...n})=>O.jsx("div",{ref:e,className:ue(EH(),t),...n});jR.displayName="CardHeader";const LR=({ref:e,className:t,...n})=>O.jsx("div",{ref:e,className:ue(_H(),t),...n});LR.displayName="CardTitle";const $R=({ref:e,className:t,...n})=>O.jsx("div",{ref:e,className:ue(OH(),t),...n});$R.displayName="CardDescription";const FR=({ref:e,className:t,...n})=>O.jsx("div",{ref:e,className:ue(PH(),t),...n});FR.displayName="CardContent";const VR=({ref:e,className:t,...n})=>O.jsx("div",{ref:e,className:ue(AH(),t),...n});VR.displayName="CardFooter";function RH(e,t){const n=x.createContext(t),r=o=>{const{children:a,...s}=o,u=x.useMemo(()=>s,Object.values(s));return O.jsx(n.Provider,{value:u,children:a})};r.displayName=e+"Provider";function i(o){const a=x.useContext(n);if(a)return a;if(t!==void 0)return t;throw new Error(`\`${o}\` must be used within \`${e}\``)}return[r,i]}function Fi(e,t=[]){let n=[];function r(o,a){const s=x.createContext(a),u=n.length;n=[...n,a];const c=p=>{const{scope:g,children:h,...y}=p,b=g?.[e]?.[u]||s,v=x.useMemo(()=>y,Object.values(y));return O.jsx(b.Provider,{value:v,children:h})};c.displayName=o+"Provider";function d(p,g){const h=g?.[e]?.[u]||s,y=x.useContext(h);if(y)return y;if(a!==void 0)return a;throw new Error(`\`${p}\` must be used within \`${o}\``)}return[c,d]}const i=()=>{const o=n.map(a=>x.createContext(a));return function(s){const u=s?.[e]||o;return x.useMemo(()=>({[`__scope${e}`]:{...s,[e]:u}}),[s,u])}};return i.scopeName=e,[r,IH(i,...t)]}function IH(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const a=r.reduce((s,{useScope:u,scopeName:c})=>{const p=u(o)[`__scope${c}`];return{...s,...p}},{});return x.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function bt(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e?.(i),n===!1||!i.defaultPrevented)return t?.(i)}}var ia=globalThis?.document?x.useLayoutEffect:()=>{},TH=x[" useInsertionEffect ".trim().toString()]||ia;function us({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[i,o,a]=kH({defaultProp:t,onChange:n}),s=e!==void 0,u=s?e:i;{const d=x.useRef(e!==void 0);x.useEffect(()=>{const p=d.current;p!==s&&console.warn(`${r} is changing from ${p?"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.`),d.current=s},[s,r])}const c=x.useCallback(d=>{if(s){const p=NH(d)?d(e):d;p!==e&&a.current?.(p)}else o(d)},[s,e,o,a]);return[u,c]}function kH({defaultProp:e,onChange:t}){const[n,r]=x.useState(e),i=x.useRef(n),o=x.useRef(t);return TH(()=>{o.current=t},[t]),x.useEffect(()=>{i.current!==n&&(o.current?.(n),i.current=n)},[n,i]),[n,r,o]}function NH(e){return typeof e=="function"}function e0(e){const t=x.useRef({value:e,previous:e});return x.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function Gp(e){const[t,n]=x.useState(void 0);return ia(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const o=i[0];let a,s;if("borderBoxSize"in o){const u=o.borderBoxSize,c=Array.isArray(u)?u[0]:u;a=c.inlineSize,s=c.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 MH(e,t){return x.useReducer((n,r)=>t[n][r]??n,e)}var yo=e=>{const{present:t,children:n}=e,r=DH(t),i=typeof n=="function"?n({present:r.isPresent}):x.Children.only(n),o=Zt(r.ref,jH(i));return typeof n=="function"||r.isPresent?x.cloneElement(i,{ref:o}):null};yo.displayName="Presence";function DH(e){const[t,n]=x.useState(),r=x.useRef(null),i=x.useRef(e),o=x.useRef("none"),a=e?"mounted":"unmounted",[s,u]=MH(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return x.useEffect(()=>{const c=Df(r.current);o.current=s==="mounted"?c:"none"},[s]),ia(()=>{const c=r.current,d=i.current;if(d!==e){const g=o.current,h=Df(c);e?u("MOUNT"):h==="none"||c?.display==="none"?u("UNMOUNT"):u(d&&g!==h?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,u]),ia(()=>{if(t){let c;const d=t.ownerDocument.defaultView??window,p=h=>{const b=Df(r.current).includes(CSS.escape(h.animationName));if(h.target===t&&b&&(u("ANIMATION_END"),!i.current)){const v=t.style.animationFillMode;t.style.animationFillMode="forwards",c=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=v)})}},g=h=>{h.target===t&&(o.current=Df(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 u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:x.useCallback(c=>{r.current=c?getComputedStyle(c):null,n(c)},[])}}function Df(e){return e?.animationName||"none"}function jH(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 Nd(e){const t=LH(e),n=x.forwardRef((r,i)=>{const{children:o,...a}=r,s=x.Children.toArray(o),u=s.find(FH);if(u){const c=u.props.children,d=s.map(p=>p===u?x.Children.count(c)>1?x.Children.only(null):x.isValidElement(c)?c.props.children:null:p);return O.jsx(t,{...a,ref:i,children:x.isValidElement(c)?x.cloneElement(c,void 0,d):null})}return O.jsx(t,{...a,ref:i,children:o})});return n.displayName=`${e}.Slot`,n}function LH(e){const t=x.forwardRef((n,r)=>{const{children:i,...o}=n;if(x.isValidElement(i)){const a=BH(i),s=VH(o,i.props);return i.type!==x.Fragment&&(s.ref=r?Qb(r,a):a),x.cloneElement(i,s)}return x.Children.count(i)>1?x.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var BR=Symbol("radix.slottable");function $H(e){const t=({children:n})=>O.jsx(O.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=BR,t}function FH(e){return x.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===BR}function VH(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...s)=>{const u=o(...s);return i(...s),u}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}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)}var zH=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],wt=zH.reduce((e,t)=>{const n=Nd(`Primitive.${t}`),r=x.forwardRef((i,o)=>{const{asChild:a,...s}=i,u=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),O.jsx(u,{...s,ref:o})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function WH(e,t){e&&la.flushSync(()=>e.dispatchEvent(t))}var qp="Checkbox",[HH]=Fi(qp),[UH,t0]=HH(qp);function GH(e){const{__scopeCheckbox:t,checked:n,children:r,defaultChecked:i,disabled:o,form:a,name:s,onCheckedChange:u,required:c,value:d="on",internal_do_not_use_render:p}=e,[g,h]=us({prop:n,defaultProp:i??!1,onChange:u,caller:qp}),[y,b]=x.useState(null),[v,w]=x.useState(null),C=x.useRef(!1),E=y?!!a||!!y.closest("form"):!0,_={checked:g,disabled:o,setChecked:h,control:y,setControl:b,name:s,form:a,value:d,hasConsumerStoppedPropagationRef:C,required:c,defaultChecked:Qo(i)?!1:i,isFormControl:E,bubbleInput:v,setBubbleInput:w};return O.jsx(UH,{scope:t,..._,children:qH(p)?p(_):r})}var zR="CheckboxTrigger",WR=x.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},i)=>{const{control:o,value:a,disabled:s,checked:u,required:c,setControl:d,setChecked:p,hasConsumerStoppedPropagationRef:g,isFormControl:h,bubbleInput:y}=t0(zR,e),b=Zt(i,d),v=x.useRef(u);return x.useEffect(()=>{const w=o?.form;if(w){const C=()=>p(v.current);return w.addEventListener("reset",C),()=>w.removeEventListener("reset",C)}},[o,p]),O.jsx(wt.button,{type:"button",role:"checkbox","aria-checked":Qo(u)?"mixed":u,"aria-required":c,"data-state":KR(u),"data-disabled":s?"":void 0,disabled:s,value:a,...r,ref:b,onKeyDown:bt(t,w=>{w.key==="Enter"&&w.preventDefault()}),onClick:bt(n,w=>{p(C=>Qo(C)?!0:!C),y&&h&&(g.current=w.isPropagationStopped(),g.current||w.stopPropagation())})})});WR.displayName=zR;var n0=x.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:i,defaultChecked:o,required:a,disabled:s,value:u,onCheckedChange:c,form:d,...p}=e;return O.jsx(GH,{__scopeCheckbox:n,checked:i,defaultChecked:o,disabled:s,required:a,onCheckedChange:c,name:r,form:d,value:u,internal_do_not_use_render:({isFormControl:g})=>O.jsxs(O.Fragment,{children:[O.jsx(WR,{...p,ref:t,__scopeCheckbox:n}),g&&O.jsx(qR,{__scopeCheckbox:n})]})})});n0.displayName=qp;var HR="CheckboxIndicator",UR=x.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...i}=e,o=t0(HR,n);return O.jsx(yo,{present:r||Qo(o.checked)||o.checked===!0,children:O.jsx(wt.span,{"data-state":KR(o.checked),"data-disabled":o.disabled?"":void 0,...i,ref:t,style:{pointerEvents:"none",...e.style}})})});UR.displayName=HR;var GR="CheckboxBubbleInput",qR=x.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:r,hasConsumerStoppedPropagationRef:i,checked:o,defaultChecked:a,required:s,disabled:u,name:c,value:d,form:p,bubbleInput:g,setBubbleInput:h}=t0(GR,e),y=Zt(n,h),b=e0(o),v=Gp(r);x.useEffect(()=>{const C=g;if(!C)return;const E=window.HTMLInputElement.prototype,P=Object.getOwnPropertyDescriptor(E,"checked").set,R=!i.current;if(b!==o&&P){const I=new Event("click",{bubbles:R});C.indeterminate=Qo(o),P.call(C,Qo(o)?!1:o),C.dispatchEvent(I)}},[g,b,o,i]);const w=x.useRef(Qo(o)?!1:o);return O.jsx(wt.input,{type:"checkbox","aria-hidden":!0,defaultChecked:a??w.current,required:s,disabled:u,name:c,value:d,form:p,...t,tabIndex:-1,ref:y,style:{...t.style,...v,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});qR.displayName=GR;function qH(e){return typeof e=="function"}function Qo(e){return e==="indeterminate"}function KR(e){return Qo(e)?"indeterminate":e?"checked":"unchecked"}const YR=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();const KH=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const YH=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase());const yS=e=>{const t=YH(e);return t.charAt(0).toUpperCase()+t.slice(1)};var XH={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 ZH=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1};const QH=j.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:o,iconNode:a,...s},u)=>j.createElement("svg",{ref:u,...XH,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:YR("lucide",i),...!o&&!ZH(s)&&{"aria-hidden":"true"},...s},[...a.map(([c,d])=>j.createElement(c,d)),...Array.isArray(o)?o:[o]]));const ct=(e,t)=>{const n=j.forwardRef(({className:r,...i},o)=>j.createElement(QH,{ref:o,iconNode:t,className:YR(`lucide-${KH(yS(e))}`,`lucide-${e}`,r),...i}));return n.displayName=yS(e),n};const JH=[["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"}]],eU=ct("bell-ring",JH);const tU=[["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"}]],nU=ct("book-user",tU);const rU=[["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"}]],iU=ct("briefcase-business",rU);const oU=[["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"}]],aU=ct("building-2",oU);const sU=[["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"}]],lU=ct("calendar-1",sU);const uU=[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"m19 9-5 5-4-4-3 3",key:"2osh9i"}]],cU=ct("chart-line",uU);const fU=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],dU=ct("chevron-down",fU);const pU=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],XR=ct("chevron-left",pU);const hU=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],ZR=ct("chevron-right",hU);const gU=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],mU=ct("chevrons-up-down",gU);const vU=[["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"}]],yU=ct("circle-question-mark",vU);const bU=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6h4",key:"135r8i"}]],xU=ct("clock-3",bU);const wU=[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]],CU=ct("credit-card",wU);const SU=[["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"}]],EU=ct("dollar-sign",SU);const _U=[["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"}]],QR=ct("ellipsis",_U);const OU=[["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"}]],PU=ct("eye-off",OU);const AU=[["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"}]],RU=ct("eye",AU);const IU=[["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"}]],TU=ct("folder-open",IU);const kU=[["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"}]],NU=ct("funnel",kU);const MU=[["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"}]],DU=ct("layout-grid",MU);const jU=[["path",{d:"M2 5h20",key:"1fs1ex"}],["path",{d:"M6 12h12",key:"8npq4p"}],["path",{d:"M9 19h6",key:"456am0"}]],LU=ct("list-filter",jU);const $U=[["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"}]],FU=ct("list-todo",$U);const VU=[["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"}]],BU=ct("message-circle",VU);const zU=[["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"}]],WU=ct("package",zU);const HU=[["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"}]],UU=ct("palette",HU);const GU=[["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"}]],qU=ct("phone",GU);const KU=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],YU=ct("plus",KU);const XU=[["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"}]],ZU=ct("rotate-ccw",XU);const QU=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],JU=ct("search",QU);const eG=[["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"}]],tG=ct("settings",eG);const nG=[["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"}]],rG=ct("tag",nG);const iG=[["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"}]],oG=ct("user-cog",iG);const aG=[["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"}]],sG=ct("users",aG);const lG=[["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"}]],uG=ct("wrench",lG);const cG=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],fG=ct("x",cG);function JR({ref:e,className:t,color:n="currentColor",size:r=24,...i}){return O.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,...i,children:O.jsx("path",{d:"M13.4375 8.125L8.85414 12.5L6.5625 10.3125"})})}function eI({ref:e,className:t,color:n="currentColor",size:r=24,...i}){return O.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,...i,children:[O.jsx("path",{d:"M13.4375 8.125L8.85414 12.5L6.5625 10.3125"}),O.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"})]})}JR.displayName="Check";eI.displayName="CircleCheck";const dG={settings:tG,plus:YU,wrench:uG,phone:qU,palette:UU,building:aU,close:fG,done:JR,check:eI,users:sG,"layout-grid":DU,bell:eU,"book-user":nU,"user-gear":oG,folder:TU,"briefcase-business":iU,calendar:lU,"chart-line":cU,message:BU,search:JU,"list-filter":LU,funnel:NU,dots:QR,"check-list":FU,tag:rG,chevron:dU,chevrons:mU,"rotate-ccw":ZU,question:yU,clock:xU,eye:RU,"eye-off":PU,package:WU,"credit-card":CU,"dollar-sign":EU},pG={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"},uo=({type:e,size:t="md",viewBox:n="0 0 24 24",strokeWidth:r=1.5,classes:i,color:o,...a})=>{const s=dG[e],u=pG[t],c=ue(u,i?.icon);return O.jsx("div",{...a,className:i?.wrapper,children:O.jsx(s,{viewBox:n,strokeWidth:r,className:c,color:o})})},hG=["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(" "),gG="grid place-content-center text-current",r0=({className:e,ref:t,...n})=>O.jsx(n0,{ref:t,className:ue(hG,e),...n,children:O.jsx(UR,{className:ue(gG),children:O.jsx(uo,{type:"done",viewBox:"3 3 14 14"})})});r0.displayName=n0.displayName;function mm({controlled:e,default:t,name:n,state:r="value"}){const{current:i}=x.useRef(e!==void 0),[o,a]=x.useState(t),s=i?e:o;if(process.env.NODE_ENV!=="production"){x.useEffect(()=>{i!==(e!==void 0)&&console.error([`Base UI: A component is changing the ${i?"":"un"}controlled ${r} state of ${n} to be ${i?"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}=x.useRef(t);x.useEffect(()=>{!i&&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 u=x.useCallback(c=>{i||a(c)},[]);return[s,u]}const bS={};function ei(e,t){const n=x.useRef(bS);return n.current===bS&&(n.current=e(t)),n}const vm=x[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],mG=vm&&vm!==x.useLayoutEffect?vm:e=>e();function Me(e){const t=ei(vG).current;return t.next=e,mG(t.effect),t.trampoline}function vG(){const e={next:void 0,callback:yG,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function yG(){if(process.env.NODE_ENV!=="production")throw new Error("Base UI: Cannot call an event handler while rendering.")}const bG=()=>{},je=typeof document<"u"?x.useLayoutEffect:bG,i0=x.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},elementsRef:{current:[]},nextIndexRef:{current:0}});process.env.NODE_ENV!=="production"&&(i0.displayName="CompositeListContext");function xG(){return x.useContext(i0)}function tI(e){const{children:t,elementsRef:n,labelsRef:r,onMapChange:i}=e,o=Me(i),a=x.useRef(0),s=ei(CG).current,u=ei(wG).current,[c,d]=x.useState(0),p=x.useRef(c),g=Me((w,C)=>{u.set(w,C??null),p.current+=1,d(p.current)}),h=Me(w=>{u.delete(w),p.current+=1,d(p.current)}),y=x.useMemo(()=>{const w=new Map;return Array.from(u.keys()).filter(E=>E.isConnected).sort(SG).forEach((E,_)=>{const P=u.get(E)??{};w.set(E,{...P,index:_})}),w},[u,c]);je(()=>{if(typeof MutationObserver!="function"||y.size===0)return;const w=new MutationObserver(C=>{const E=new Set,_=P=>E.has(P)?E.delete(P):E.add(P);C.forEach(P=>{P.removedNodes.forEach(_),P.addedNodes.forEach(_)}),E.size===0&&(p.current+=1,d(p.current))});return y.forEach((C,E)=>{E.parentElement&&w.observe(E.parentElement,{childList:!0})}),()=>{w.disconnect()}},[y]),je(()=>{p.current===c&&(n.current.length!==y.size&&(n.current.length=y.size),r&&r.current.length!==y.size&&(r.current.length=y.size),a.current=y.size),o(y)},[o,y,n,r,c]),je(()=>()=>{n.current=[]},[n]),je(()=>()=>{r&&(r.current=[])},[r]);const b=Me(w=>(s.add(w),()=>{s.delete(w)}));je(()=>{s.forEach(w=>w(y))},[s,y]);const v=x.useMemo(()=>({register:g,unregister:h,subscribeMapChange:b,elementsRef:n,labelsRef:r,nextIndexRef:a}),[g,h,b,n,r,a]);return O.jsx(i0.Provider,{value:v,children:t})}function wG(){return new Map}function CG(){return new Set}function SG(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 nI=x.createContext(void 0);process.env.NODE_ENV!=="production"&&(nI.displayName="DirectionContext");function rI(){return x.useContext(nI)?.direction??"ltr"}function pi(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 Lu(e,t,n,r){const i=ei(iI).current;return _G(i,e,t,n,r)&&oI(i,[e,t,n,r]),i.callback}function EG(e){const t=ei(iI).current;return OG(t,e)&&oI(t,e),t.callback}function iI(){return{callback:null,cleanup:null,refs:[]}}function _G(e,t,n,r,i){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==i}function OG(e,t){return e.refs.length!==t.length||e.refs.some((n,r)=>n!==t[r])}function oI(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 i=0;i<t.length;i+=1){const o=t[i];if(o!=null)switch(typeof o){case"function":{const a=o(n);typeof a=="function"&&(r[i]=a);break}case"object":{o.current=n;break}}}e.cleanup=()=>{for(let i=0;i<t.length;i+=1){const o=t[i];if(o!=null)switch(typeof o){case"function":{const a=r[i];typeof a=="function"?a():o(null);break}case"object":{o.current=null;break}}}}}}}const PG=parseInt(x.version,10);function o0(e){return PG>=e}function xS(e){if(!x.isValidElement(e))return null;const t=e,n=t.props;return(o0(19)?n?.ref:t.ref)??null}function wy(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function AG(e,t){const n={};for(const r in e){const i=e[r];if(t?.hasOwnProperty(r)){const o=t[r](i);o!=null&&Object.assign(n,o);continue}i===!0?n[`data-${r.toLowerCase()}`]="":i&&(n[`data-${r.toLowerCase()}`]=i.toString())}return n}function RG(e,t){return typeof e=="function"?e(t):e}function IG(e,t){return typeof e=="function"?e(t):e}const Au={};function aI(e,t,n,r,i){let o={...Cy(e,Au)};return t&&(o=Cd(o,t)),n&&(o=Cd(o,n)),r&&(o=Cd(o,r)),o}function TG(e){if(e.length===0)return Au;if(e.length===1)return Cy(e[0],Au);let t={...Cy(e[0],Au)};for(let n=1;n<e.length;n+=1)t=Cd(t,e[n]);return t}function Cd(e,t){return sI(t)?t(e):kG(e,t)}function kG(e,t){if(!t)return e;for(const n in t){const r=t[n];switch(n){case"style":{e[n]=wy(e.style,r);break}case"className":{e[n]=lI(e.className,r);break}default:NG(n,r)?e[n]=MG(e[n],r):e[n]=r}}return e}function NG(e,t){const n=e.charCodeAt(0),r=e.charCodeAt(1),i=e.charCodeAt(2);return n===111&&r===110&&i>=65&&i<=90&&(typeof t=="function"||typeof t>"u")}function sI(e){return typeof e=="function"}function Cy(e,t){return sI(e)?e(t):e??Au}function MG(e,t){return t?e?n=>{if(DG(n)){const i=n;Sy(i);const o=t(i);return i.baseUIHandlerPrevented||e?.(i),o}const r=t(n);return e?.(n),r}:t:e}function Sy(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function lI(e,t){return t?e?t+" "+e:t:e}function DG(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function Wt(){}const jf=Object.freeze([]),Xn=Object.freeze({}),jG={style:{transition:"none"}},LG="data-base-ui-click-trigger",$G={fallbackAxisSide:"none"},FG={clipPath:"inset(50%)",position:"fixed",top:0,left:0};function er(e,t,n={}){const r=t.render,i=VG(t,n);if(n.enabled===!1)return null;const o=n.state??Xn;return zG(e,r,i,o)}function VG(e,t={}){const{className:n,style:r,render:i}=e,{state:o=Xn,ref:a,props:s,stateAttributesMapping:u,enabled:c=!0}=t,d=c?RG(n,o):void 0,p=c?IG(r,o):void 0,g=c?AG(o,u):Xn,h=c?wy(g,Array.isArray(s)?TG(s):s)??Xn:Xn;return typeof document<"u"&&(c?Array.isArray(a)?h.ref=EG([h.ref,xS(i),...a]):h.ref=Lu(h.ref,xS(i),a):Lu(null,null)),c?(d!==void 0&&(h.className=lI(h.className,d)),p!==void 0&&(h.style=wy(h.style,p)),h):Xn}const BG=Symbol.for("react.lazy");function zG(e,t,n,r){if(t){if(typeof t=="function")return t(n,r);const i=aI(n,t.props);i.ref=n.ref;let o=t;if(o?.$$typeof===BG&&(o=x.Children.toArray(t)[0]),process.env.NODE_ENV!=="production"&&!x.isValidElement(o))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 x.cloneElement(o,i)}if(e&&typeof e=="string")return WG(e,n);throw new Error(process.env.NODE_ENV!=="production"?"Base UI: Render element or function are not defined.":pi(8))}function WG(e,t){return e==="button"?j.createElement("button",{type:"button",...t,key:t.key}):e==="img"?j.createElement("img",{alt:"",...t,key:t.key}):x.createElement(e,t)}const Yr="none",Ey="trigger-press",HG="trigger-hover",a0="outside-press",UG="item-press",wS="clear-press",GG="chip-remove-press",Js="input-change",Uo="input-clear",qG="input-press",Kp="focus-out",uI="escape-key",Ru="list-navigation";function Xe(e,t,n,r){let i=!1,o=!1;const a=Xn;return{reason:e,event:t??new Event("base-ui"),cancel(){i=!0},allowPropagation(){o=!0},get isCanceled(){return i},get isPropagationAllowed(){return o},trigger:n,...a}}function su(e,t,n){const r=n??Xn;return{reason:e,event:t??new Event("base-ui"),...r}}const _y={...x};let CS=0;function KG(e,t="mui"){const[n,r]=x.useState(e),i=e||n;return x.useEffect(()=>{n==null&&(CS+=1,r(`${t}-${CS}`))},[n,t]),i}const SS=_y.useId;function s0(e,t){if(SS!==void 0){const n=SS();return e??(t?`${t}-${n}`:n)}return KG(e,t)}function l0(e){return s0(e,"base-ui")}const YG=[];function cI(e){x.useEffect(e,YG)}const Lf=null;let ES=globalThis.requestAnimationFrame;class XG{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 i=0;i<n.length;i+=1)n[i]?.(t)};request(t){const n=this.nextId;this.nextId+=1,this.callbacks.push(t),this.callbacksCount+=1;const r=process.env.NODE_ENV!=="production"&&ES!==requestAnimationFrame&&(ES=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 $f=new XG;class Oi{static create(){return new Oi}static request(t){return $f.request(t)}static cancel(t){return $f.cancel(t)}currentId=Lf;request(t){this.cancel(),this.currentId=$f.request(()=>{this.currentId=Lf,t()})}cancel=()=>{this.currentId!==Lf&&($f.cancel(this.currentId),this.currentId=Lf)};disposeEffect=()=>this.cancel}function u0(){const e=ei(Oi.create).current;return cI(e.disposeEffect),e}function Qi(e){return e==null?e:"current"in e?e.current:e}let $u=(function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e})({});const ZG={[$u.startingStyle]:""},QG={[$u.endingStyle]:""},fI={transitionStatus(e){return e==="starting"?ZG:e==="ending"?QG:null}};function JG(e,t=!1,n=!0){const r=u0();return Me((i,o=null)=>{r.cancel();function a(){la.flushSync(i)}const s=Qi(e);if(s==null)return;const u=s;if(typeof u.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED)i();else{let c=function(){const p=$u.startingStyle;if(!u.hasAttribute(p)){r.request(d);return}const g=new MutationObserver(()=>{u.hasAttribute(p)||(g.disconnect(),d())});g.observe(u,{attributes:!0,attributeFilter:[p]}),o?.addEventListener("abort",()=>g.disconnect(),{once:!0})},d=function(){Promise.all(u.getAnimations().map(p=>p.finished)).then(()=>{o?.aborted||a()}).catch(()=>{const p=u.getAnimations();if(n){if(o?.aborted)return;a()}else p.length>0&&p.some(g=>g.pending||g.playState!=="finished")&&d()})};if(t){c();return}r.request(d)}})}function dI(e,t=!1,n=!1){const[r,i]=x.useState(e&&t?"idle":void 0),[o,a]=x.useState(e);return e&&!o&&(a(!0),i("starting")),!e&&o&&r!=="ending"&&!n&&i("ending"),!e&&!o&&r==="ending"&&i(void 0),je(()=>{if(!e&&o&&r!=="ending"&&n){const s=Oi.request(()=>{i("ending")});return()=>{Oi.cancel(s)}}},[e,o,r,n]),je(()=>{if(!e||t)return;const s=Oi.request(()=>{i(void 0)});return()=>{Oi.cancel(s)}},[t,e]),je(()=>{if(!e||!t)return;e&&o&&r!=="idle"&&i("starting");const s=Oi.request(()=>{i("idle")});return()=>{Oi.cancel(s)}},[t,e,o,i,r]),x.useMemo(()=>({mounted:o,setMounted:a,transitionStatus:r}),[o,r])}let pI=(function(e){return e[e.None=0]="None",e[e.GuessFromOrder=1]="GuessFromOrder",e})({});function hI(e={}){const{label:t,metadata:n,textRef:r,indexGuessBehavior:i,index:o}=e,{register:a,unregister:s,subscribeMapChange:u,elementsRef:c,labelsRef:d,nextIndexRef:p}=xG(),g=x.useRef(-1),[h,y]=x.useState(o??(i===pI.GuessFromOrder?()=>{if(g.current===-1){const w=p.current;p.current+=1,g.current=w}return g.current}:-1)),b=x.useRef(null),v=x.useCallback(w=>{if(b.current=w,h!==-1&&w!==null&&(c.current[h]=w,d)){const C=t!==void 0;d.current[h]=C?t:r?.current?.textContent??w.textContent}},[h,c,d,t,r]);return je(()=>{if(o!=null)return;const w=b.current;if(w)return a(w,n),()=>{s(w)}},[o,a,s,n]),je(()=>{if(o==null)return u(w=>{const C=b.current?w.get(b.current)?.index:null;C!=null&&y(C)})},[o,u,y]),x.useMemo(()=>({ref:v,index:h}),[h,v])}function Yp(){return typeof window<"u"}function ca(e){return c0(e)?(e.nodeName||"").toLowerCase():"#document"}function Nn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Vi(e){var t;return(t=(c0(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function c0(e){return Yp()?e instanceof Node||e instanceof Nn(e).Node:!1}function Lt(e){return Yp()?e instanceof Element||e instanceof Nn(e).Element:!1}function nn(e){return Yp()?e instanceof HTMLElement||e instanceof Nn(e).HTMLElement:!1}function Oy(e){return!Yp()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Nn(e).ShadowRoot}function fa(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=Rr(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!=="inline"&&i!=="contents"}function e4(e){return/^(table|td|th)$/.test(ca(e))}function Xp(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const t4=/transform|translate|scale|rotate|perspective|filter/,n4=/paint|layout|strict|content/,ka=e=>!!e&&e!=="none";let ym;function f0(e){const t=Lt(e)?Rr(e):e;return ka(t.transform)||ka(t.translate)||ka(t.scale)||ka(t.rotate)||ka(t.perspective)||!Zp()&&(ka(t.backdropFilter)||ka(t.filter))||t4.test(t.willChange||"")||n4.test(t.contain||"")}function r4(e){let t=co(e);for(;nn(t)&&!ao(t);){if(f0(t))return t;if(Xp(t))return null;t=co(t)}return null}function Zp(){return ym==null&&(ym=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),ym}function ao(e){return/^(html|body|#document)$/.test(ca(e))}function Rr(e){return Nn(e).getComputedStyle(e)}function Qp(e){return Lt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function co(e){if(ca(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Oy(e)&&e.host||Vi(e);return Oy(t)?t.host:t}function gI(e){const t=co(e);return ao(t)?e.ownerDocument?e.ownerDocument.body:e.body:nn(t)&&fa(t)?t:gI(t)}function Jo(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=gI(e),o=i===((r=e.ownerDocument)==null?void 0:r.body),a=Nn(i);if(o){const s=Py(a);return t.concat(a,a.visualViewport||[],fa(i)?i:[],s&&n?Jo(s):[])}else return t.concat(i,Jo(i,[],n))}function Py(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}let Ay;process.env.NODE_ENV!=="production"&&(Ay=new Set);function _S(...e){if(process.env.NODE_ENV!=="production"){const t=e.join(" ");Ay.has(t)||(Ay.add(t),console.error(`Base UI: ${t}`))}}const mI=x.createContext(void 0);process.env.NODE_ENV!=="production"&&(mI.displayName="CompositeRootContext");function i4(e=!1){const t=x.useContext(mI);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>.":pi(16));return t}function o4(e){const{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:i=0,isNativeButton:o}=e,a=r&&t!==!1,s=r&&t===!1;return{props:x.useMemo(()=>{const c={onKeyDown(d){n&&t&&d.key!=="Tab"&&d.preventDefault()}};return r||(c.tabIndex=i,!o&&n&&(c.tabIndex=t?i:-1)),(o&&(t||a)||!o&&n)&&(c["aria-disabled"]=n),o&&(!t||s)&&(c.disabled=n),c},[r,n,t,a,s,o,i])}}function Jp(e={}){const{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:i=!0}=e,o=x.useRef(null),a=i4(!0)!==void 0,s=Me(()=>{const g=o.current;return!!(g?.tagName==="A"&&g?.href)}),{props:u}=o4({focusableWhenDisabled:n,disabled:t,composite:a,tabIndex:r,isNativeButton:i});process.env.NODE_ENV!=="production"&&x.useEffect(()=>{if(!o.current)return;const g=o.current.tagName==="BUTTON";if(i){if(!g){const h=_y.captureOwnerStack?.()||"";_S(`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\`.${h}`)}}else if(g){const h=_y.captureOwnerStack?.()||"";_S(`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\`.${h}`)}},[i]);const c=x.useCallback(()=>{const g=o.current;a4(g)&&a&&t&&u.disabled===void 0&&g.disabled&&(g.disabled=!1)},[t,u.disabled,a]);je(c,[c]);const d=x.useCallback((g={})=>{const{onClick:h,onMouseDown:y,onKeyUp:b,onKeyDown:v,onPointerDown:w,...C}=g;return aI({type:i?"button":void 0,onClick(_){if(t){_.preventDefault();return}h?.(_)},onMouseDown(_){t||y?.(_)},onKeyDown(_){if(t||(Sy(_),v?.(_)),_.baseUIHandlerPrevented)return;const P=_.target===_.currentTarget&&!i&&!s()&&!t,R=_.key==="Enter",I=_.key===" ";P&&((I||R)&&_.preventDefault(),R&&h?.(_))},onKeyUp(_){t||(Sy(_),b?.(_)),!_.baseUIHandlerPrevented&&_.target===_.currentTarget&&!i&&!t&&_.key===" "&&h?.(_)},onPointerDown(_){if(t){_.preventDefault();return}w?.(_)}},i?void 0:{role:"button"},u,C)},[t,u,i,s]),p=Me(g=>{o.current=g,c()});return{getButtonProps:d,buttonRef:p}}function a4(e){return nn(e)&&e.tagName==="BUTTON"}const cs=typeof navigator<"u",bm=u4(),vI=f4(),d0=c4(),yI=typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter:none"),bI=bm.platform==="MacIntel"&&bm.maxTouchPoints>1?!0:/iP(hone|ad|od)|iOS/.test(bm.platform),OS=cs&&/firefox/i.test(d0),s4=cs&&/apple/i.test(navigator.vendor),Md=cs&&/android/i.test(vI)||/android/i.test(d0);cs&&vI.toLowerCase().startsWith("mac")&&navigator.maxTouchPoints;const l4=d0.includes("jsdom/");function u4(){if(!cs)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 c4(){if(!cs)return"";const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:t,version:n})=>`${t}/${n}`).join(" "):navigator.userAgent}function f4(){if(!cs)return"";const e=navigator.userAgentData;return e?.platform?e.platform:navigator.platform??""}const Ry="data-base-ui-focusable",xI="active",wI="selected",d4="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",ea="ArrowLeft",ta="ArrowRight",p0="ArrowUp",rc="ArrowDown";function eo(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function ft(e,t){if(!e||!t)return!1;const n=t.getRootNode?.();if(e.contains(t))return!0;if(n&&Oy(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function lr(e){return"composedPath"in e?e.composedPath()[0]:e.target}function li(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 p4(e){return e.matches("html,body")}function h0(e){return nn(e)&&e.matches(d4)}function Iy(e){return e?e.getAttribute("role")==="combobox"&&h0(e):!1}function Ty(e){return e?e.hasAttribute(Ry)?e:e.querySelector(`[${Ry}]`)||e:null}function il(e,t,n=!0){return e.filter(i=>i.parentId===t&&(!n||i.context?.open)).flatMap(i=>[i,...il(e,i.id,n)])}function PS(e,t){let n=[],r=e.find(i=>i.id===t)?.parentId;for(;r;){const i=e.find(o=>o.id===r);r=i?.parentId,i&&(n=n.concat(i))}return n}function jt(e){e.preventDefault(),e.stopPropagation()}function h4(e){return"nativeEvent"in e}function CI(e){return e.pointerType===""&&e.isTrusted?!0:Md&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function SI(e){return l4?!1:!Md&&e.width===0&&e.height===0||Md&&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 AS(e,t){return["mouse","pen"].includes(e)}function EI(e){const t=e.type;return t==="click"||t==="mousedown"||t==="keydown"||t==="keyup"}const g4=["top","right","bottom","left"],oa=Math.min,Er=Math.max,Dd=Math.round,el=Math.floor,Ii=e=>({x:e,y:e}),m4={left:"right",right:"left",bottom:"top",top:"bottom"};function jd(e,t,n){return Er(e,oa(t,n))}function Ni(e,t){return typeof e=="function"?e(t):e}function Ar(e){return e.split("-")[0]}function bo(e){return e.split("-")[1]}function g0(e){return e==="x"?"y":"x"}function eh(e){return e==="y"?"height":"width"}function Zr(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function th(e){return g0(Zr(e))}function v4(e,t,n){n===void 0&&(n=!1);const r=bo(e),i=th(e),o=eh(i);let a=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=Ld(a)),[a,Ld(a)]}function y4(e){const t=Ld(e);return[ky(e),t,ky(t)]}function ky(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const RS=["left","right"],IS=["right","left"],b4=["top","bottom"],x4=["bottom","top"];function w4(e,t,n){switch(e){case"top":case"bottom":return n?t?IS:RS:t?RS:IS;case"left":case"right":return t?b4:x4;default:return[]}}function C4(e,t,n,r){const i=bo(e);let o=w4(Ar(e),n==="start",r);return i&&(o=o.map(a=>a+"-"+i),t&&(o=o.concat(o.map(ky)))),o}function Ld(e){const t=Ar(e);return m4[t]+e.slice(t.length)}function S4(e){return{top:0,right:0,bottom:0,left:0,...e}}function m0(e){return typeof e!="number"?S4(e):{top:e,right:e,bottom:e,left:e}}function $d(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function Ff(e,t,n){return Math.floor(e/t)!==n}function Iu(e,t){return t<0||t>=e.current.length}function xm(e,t){return Vn(e,{disabledIndices:t})}function TS(e,t){return Vn(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function Vn(e,{startingIndex:t=-1,decrement:n=!1,disabledIndices:r,amount:i=1}={}){let o=t;do o+=n?-i:i;while(o>=0&&o<=e.current.length-1&&Tu(e,o,r));return o}function E4(e,{event:t,orientation:n,loopFocus:r,rtl:i,cols:o,disabledIndices:a,minIndex:s,maxIndex:u,prevIndex:c,stopEvent:d=!1}){let p=c;const g=[],h={};let y=!1;{let w=null,C=-1;e.current.forEach((E,_)=>{if(E==null)return;const P=E.closest('[role="row"]');P&&(y=!0),(P!==w||C===-1)&&(w=P,C+=1,g[C]=[]),g[C].push(_),h[_]=C})}const b=y&&g.length>0&&g.some(w=>w.length!==o);function v(w){if(!b||c===-1)return;const C=h[c];if(C==null)return;const E=g[C].indexOf(c);let _=w==="up"?C-1:C+1;r&&(_<0?_=g.length-1:_>=g.length&&(_=0));const P=new Set;for(;_>=0&&_<g.length&&!P.has(_);){P.add(_);const R=g[_];if(R.length===0){_=w==="up"?_-1:_+1;continue}const I=Math.min(E,R.length-1);for(let k=I;k>=0;k-=1){const B=R[k];if(!Tu(e,B,a))return B}_=w==="up"?_-1:_+1,r&&(_<0?_=g.length-1:_>=g.length&&(_=0))}}if(t.key===p0){const w=v("up");if(w!==void 0)d&&jt(t),p=w;else{if(d&&jt(t),c===-1)p=u;else if(p=Vn(e,{startingIndex:p,amount:o,decrement:!0,disabledIndices:a}),r&&(c-o<s||p<0)){const C=c%o,E=u%o,_=u-(E-C);E===C?p=u:p=E>C?_:_-o}Iu(e,p)&&(p=c)}}if(t.key===rc){const w=v("down");w!==void 0?(d&&jt(t),p=w):(d&&jt(t),c===-1?p=s:(p=Vn(e,{startingIndex:c,amount:o,disabledIndices:a}),r&&c+o>u&&(p=Vn(e,{startingIndex:c%o-o,amount:o,disabledIndices:a}))),Iu(e,p)&&(p=c))}if(n==="both"){const w=el(c/o);t.key===(i?ea:ta)&&(d&&jt(t),c%o!==o-1?(p=Vn(e,{startingIndex:c,disabledIndices:a}),r&&Ff(p,o,w)&&(p=Vn(e,{startingIndex:c-c%o-1,disabledIndices:a}))):r&&(p=Vn(e,{startingIndex:c-c%o-1,disabledIndices:a})),Ff(p,o,w)&&(p=c)),t.key===(i?ta:ea)&&(d&&jt(t),c%o!==0?(p=Vn(e,{startingIndex:c,decrement:!0,disabledIndices:a}),r&&Ff(p,o,w)&&(p=Vn(e,{startingIndex:c+(o-c%o),decrement:!0,disabledIndices:a}))):r&&(p=Vn(e,{startingIndex:c+(o-c%o),decrement:!0,disabledIndices:a})),Ff(p,o,w)&&(p=c));const C=el(u/o)===w;Iu(e,p)&&(r&&C?p=t.key===(i?ta:ea)?u:Vn(e,{startingIndex:c-c%o-1,disabledIndices:a}):p=c)}return p}function _4(e,t,n){const r=[];let i=0;return e.forEach(({width:o,height:a},s)=>{if(o>t&&process.env.NODE_ENV!=="production")throw new Error(`[Floating UI]: Invalid grid - item width at index ${s} is greater than grid columns`);let u=!1;for(;!u;){const c=[];for(let d=0;d<o;d+=1)for(let p=0;p<a;p+=1)c.push(i+d+p*t);i%t+o<=t&&c.every(d=>r[d]==null)?(c.forEach(d=>{r[d]=s}),u=!0):i+=1}}),[...r]}function O4(e,t,n,r,i){if(e===-1)return-1;const o=n.indexOf(e),a=t[e];switch(i){case"tl":return o;case"tr":return a?o+a.width-1:o;case"bl":return a?o+(a.height-1)*r:o;case"br":return n.lastIndexOf(e);default:return-1}}function P4(e,t){return t.flatMap((n,r)=>e.includes(n)?[r]:[])}function Tu(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 A4=["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] *)"],Fd=A4.join(","),_I=typeof Element>"u",dl=_I?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Vd=!_I&&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},Bd=function(t,n){var r;n===void 0&&(n=!0);var i=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),o=i===""||i==="true",a=o||n&&t&&(typeof t.closest=="function"?t.closest("[inert]"):Bd(t.parentNode));return a},R4=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},OI=function(t,n,r){if(Bd(t))return[];var i=Array.prototype.slice.apply(t.querySelectorAll(Fd));return n&&dl.call(t,Fd)&&i.unshift(t),i=i.filter(r),i},zd=function(t,n,r){for(var i=[],o=Array.from(t);o.length;){var a=o.shift();if(!Bd(a,!1))if(a.tagName==="SLOT"){var s=a.assignedElements(),u=s.length?s:a.children,c=zd(u,!0,r);r.flatten?i.push.apply(i,c):i.push({scopeParent:a,candidates:c})}else{var d=dl.call(a,Fd);d&&r.filter(a)&&(n||!t.includes(a))&&i.push(a);var p=a.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(a),g=!Bd(p,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(a));if(p&&g){var h=zd(p===!0?a.children:p.children,!0,r);r.flatten?i.push.apply(i,h):i.push({scopeParent:a,candidates:h})}else o.unshift.apply(o,a.children)}}return i},PI=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},AI=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||R4(t))&&!PI(t)?0:t.tabIndex},I4=function(t,n){var r=AI(t);return r<0&&n&&!PI(t)?0:r},T4=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},RI=function(t){return t.tagName==="INPUT"},k4=function(t){return RI(t)&&t.type==="hidden"},N4=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},M4=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},D4=function(t){if(!t.name)return!0;var n=t.form||Vd(t),r=function(s){return n.querySelectorAll('input[type="radio"][name="'+s+'"]')},i;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")i=r(window.CSS.escape(t.name));else try{i=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 o=M4(i,t.form);return!o||o===t},j4=function(t){return RI(t)&&t.type==="radio"},L4=function(t){return j4(t)&&!D4(t)},$4=function(t){var n,r=t&&Vd(t),i=(n=r)===null||n===void 0?void 0:n.host,o=!1;if(r&&r!==t){var a,s,u;for(o=!!((a=i)!==null&&a!==void 0&&(s=a.ownerDocument)!==null&&s!==void 0&&s.contains(i)||t!=null&&(u=t.ownerDocument)!==null&&u!==void 0&&u.contains(t));!o&&i;){var c,d,p;r=Vd(i),i=(c=r)===null||c===void 0?void 0:c.host,o=!!((d=i)!==null&&d!==void 0&&(p=d.ownerDocument)!==null&&p!==void 0&&p.contains(i))}}return o},kS=function(t){var n=t.getBoundingClientRect(),r=n.width,i=n.height;return r===0&&i===0},F4=function(t,n){var r=n.displayCheck,i=n.getShadowRoot;if(r==="full-native"&&"checkVisibility"in t){var o=t.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!o}if(getComputedStyle(t).visibility==="hidden")return!0;var a=dl.call(t,"details>summary:first-of-type"),s=a?t.parentElement:t;if(dl.call(s,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="full-native"||r==="legacy-full"){if(typeof i=="function"){for(var u=t;t;){var c=t.parentElement,d=Vd(t);if(c&&!c.shadowRoot&&i(c)===!0)return kS(t);t.assignedSlot?t=t.assignedSlot:!c&&d!==t.ownerDocument?t=d.host:t=c}t=u}if($4(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return kS(t);return!1},V4=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 i=n.children.item(r);if(i.tagName==="LEGEND")return dl.call(n,"fieldset[disabled] *")?!0:!i.contains(t)}return!0}n=n.parentElement}return!1},Ny=function(t,n){return!(n.disabled||k4(n)||F4(n,t)||N4(n)||V4(n))},My=function(t,n){return!(L4(n)||AI(n)<0||!Ny(t,n))},B4=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},II=function(t){var n=[],r=[];return t.forEach(function(i,o){var a=!!i.scopeParent,s=a?i.scopeParent:i,u=I4(s,a),c=a?II(i.candidates):s;u===0?a?n.push.apply(n,c):n.push(s):r.push({documentOrder:o,tabIndex:u,item:i,isScope:a,content:c})}),r.sort(T4).reduce(function(i,o){return o.isScope?i.push.apply(i,o.content):i.push(o.content),i},[]).concat(n)},nh=function(t,n){n=n||{};var r;return n.getShadowRoot?r=zd([t],n.includeContainer,{filter:My.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:B4}):r=OI(t,n.includeContainer,My.bind(null,n)),II(r)},z4=function(t,n){n=n||{};var r;return n.getShadowRoot?r=zd([t],n.includeContainer,{filter:Ny.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):r=OI(t,n.includeContainer,Ny.bind(null,n)),r},TI=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return dl.call(t,Fd)===!1?!1:My(n,t)};function Xt(e){return e?.ownerDocument||document}const ic=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function kI(e,t){const n=nh(e,ic()),r=n.length;if(r===0)return;const i=eo(Xt(e)),o=n.indexOf(i),a=o===-1?t===1?0:r-1:o+t;return n[a]}function NI(e){return kI(Xt(e).body,1)||e}function MI(e){return kI(Xt(e).body,-1)||e}function ku(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!ft(n,r)}function W4(e){nh(e,ic()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function NS(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 v0(e){const{enabled:t=!0,open:n,ref:r,onComplete:i}=e,o=Me(i),a=JG(r,n,!1);x.useEffect(()=>{if(!t)return;const s=new AbortController;return a(o,s.signal),()=>{s.abort()}},[t,n,o,a])}const lu=0;class pl{static create(){return new pl}currentId=lu;start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=lu,n()},t)}isStarted(){return this.currentId!==lu}clear=()=>{this.currentId!==lu&&(clearTimeout(this.currentId),this.currentId=lu)};disposeEffect=()=>this.clear}function Xa(){const e=ei(pl.create).current;return cI(e.disposeEffect),e}let MS={},DS={},jS="";function H4(e){if(typeof document>"u")return!1;const t=Xt(e);return Nn(t).innerWidth-t.documentElement.clientWidth>0}function U4(e){if(!(typeof CSS<"u"&&CSS.supports&&CSS.supports("scrollbar-gutter","stable"))||typeof document>"u")return!1;const n=Xt(e),r=n.documentElement,i=n.body,o=fa(r)?r:i,a=o.style.overflowY,s=r.style.scrollbarGutter;r.style.scrollbarGutter="stable",o.style.overflowY="scroll";const u=o.offsetWidth;o.style.overflowY="hidden";const c=o.offsetWidth;return o.style.overflowY=a,r.style.scrollbarGutter=s,u===c}function G4(e){const t=Xt(e),n=t.documentElement,r=t.body,i=fa(n)?n:r,o={overflowY:i.style.overflowY,overflowX:i.style.overflowX};return Object.assign(i.style,{overflowY:"hidden",overflowX:"hidden"}),()=>{Object.assign(i.style,o)}}function q4(e){const t=Xt(e),n=t.documentElement,r=t.body,i=Nn(n);let o=0,a=0,s=!1;const u=Oi.create();if(yI&&(i.visualViewport?.scale??1)!==1)return()=>{};function c(){const g=i.getComputedStyle(n),h=i.getComputedStyle(r),v=(g.scrollbarGutter||"").includes("both-edges")?"stable both-edges":"stable";o=n.scrollTop,a=n.scrollLeft,MS={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},jS=n.style.scrollBehavior,DS={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 w=n.scrollHeight>n.clientHeight,C=n.scrollWidth>n.clientWidth,E=g.overflowY==="scroll"||h.overflowY==="scroll",_=g.overflowX==="scroll"||h.overflowX==="scroll",P=Math.max(0,i.innerWidth-r.clientWidth),R=Math.max(0,i.innerHeight-r.clientHeight),I=parseFloat(h.marginTop)+parseFloat(h.marginBottom),k=parseFloat(h.marginLeft)+parseFloat(h.marginRight),B=fa(n)?n:r;if(s=U4(e),s){n.style.scrollbarGutter=v,B.style.overflowY="hidden",B.style.overflowX="hidden";return}Object.assign(n.style,{scrollbarGutter:v,overflowY:"hidden",overflowX:"hidden"}),(w||E)&&(n.style.overflowY="scroll"),(C||_)&&(n.style.overflowX="scroll"),Object.assign(r.style,{position:"relative",height:I||R?`calc(100dvh - ${I+R}px)`:"100dvh",width:k||P?`calc(100vw - ${k+P}px)`:"100vw",boxSizing:"border-box",overflow:"hidden",scrollBehavior:"unset"}),r.scrollTop=o,r.scrollLeft=a,n.setAttribute("data-base-ui-scroll-locked",""),n.style.scrollBehavior="unset"}function d(){Object.assign(n.style,MS),Object.assign(r.style,DS),s||(n.scrollTop=o,n.scrollLeft=a,n.removeAttribute("data-base-ui-scroll-locked"),n.style.scrollBehavior=jS)}function p(){d(),u.request(c)}return c(),i.addEventListener("resize",p),()=>{u.cancel(),d(),typeof i.removeEventListener=="function"&&i.removeEventListener("resize",p)}}class K4{lockCount=0;restore=null;timeoutLock=pl.create();timeoutUnlock=pl.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=Xt(t).documentElement,i=Nn(r).getComputedStyle(r).overflowY;if(i==="hidden"||i==="clip"){this.restore=Wt;return}const o=bI||!H4(t);this.restore=o?G4(t):q4(t)}}const Y4=new K4;function X4(e=!0,t=null){je(()=>{if(e)return Y4.acquire(t)},[e,t])}function Xr(e){const t=ei(Z4,e).current;return t.next=e,je(t.effect),t}function Z4(e){const t={current:e,next:e,effect:()=>{t.current=t.next}};return t}function Q4(){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 DI=x.createContext(null);process.env.NODE_ENV!=="production"&&(DI.displayName="FloatingNodeContext");const jI=x.createContext(null);process.env.NODE_ENV!=="production"&&(jI.displayName="FloatingTreeContext");const LI=()=>x.useContext(DI)?.id||null,rh=e=>{const t=x.useContext(jI);return e??t};function Wd(e){return`data-base-ui-${e}`}const $I={clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1},y0={...$I,position:"fixed",top:0,left:0},J4={...$I,position:"absolute"},Fu=x.forwardRef(function(t,n){const[r,i]=x.useState();je(()=>{s4&&i("button")},[]);const o={tabIndex:0,role:r};return O.jsx("span",{...t,ref:n,style:y0,"aria-hidden":r?void 0:!0,...o,"data-base-ui-focus-guard":""})});process.env.NODE_ENV!=="production"&&(Fu.displayName="FocusGuard");let LS=0;function Nu(e,t={}){const{preventScroll:n=!1,cancelPrevious:r=!0,sync:i=!1}=t;r&&cancelAnimationFrame(LS);const o=()=>e?.focus({preventScroll:n});i?o():LS=requestAnimationFrame(o)}const ol={inert:new WeakMap,"aria-hidden":new WeakMap,none:new WeakMap};function $S(e){return e==="inert"?ol.inert:e==="aria-hidden"?ol["aria-hidden"]:ol.none}let Vf=new WeakSet,Bf={},wm=0;const FI=e=>e&&(e.host||FI(e.parentNode)),eq=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=FI(n);return e.contains(r)?r:null}).filter(n=>n!=null);function tq(e,t,n,r){const i="data-base-ui-inert",o=r?"inert":n?"aria-hidden":null,a=eq(t,e),s=new Set,u=new Set(a),c=[];Bf[i]||(Bf[i]=new WeakMap);const d=Bf[i];a.forEach(p),g(t),s.clear();function p(h){!h||s.has(h)||(s.add(h),h.parentNode&&p(h.parentNode))}function g(h){!h||u.has(h)||[].forEach.call(h.children,y=>{if(ca(y)!=="script")if(s.has(y))g(y);else{const b=o?y.getAttribute(o):null,v=b!==null&&b!=="false",w=$S(o),C=(w.get(y)||0)+1,E=(d.get(y)||0)+1;w.set(y,C),d.set(y,E),c.push(y),C===1&&v&&Vf.add(y),E===1&&y.setAttribute(i,""),!v&&o&&y.setAttribute(o,o==="inert"?"":"true")}})}return wm+=1,()=>{c.forEach(h=>{const y=$S(o),v=(y.get(h)||0)-1,w=(d.get(h)||0)-1;y.set(h,v),d.set(h,w),v||(!Vf.has(h)&&o&&h.removeAttribute(o),Vf.delete(h)),w||h.removeAttribute(i)}),wm-=1,wm||(ol.inert=new WeakMap,ol["aria-hidden"]=new WeakMap,ol.none=new WeakMap,Vf=new WeakSet,Bf={})}}function nq(e,t=!1,n=!1){const r=Xt(e[0]).body;return tq(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const b0=x.createContext(null);process.env.NODE_ENV!=="production"&&(b0.displayName="PortalContext");const VI=()=>x.useContext(b0),rq=Wd("portal");function iq(e={}){const{ref:t,container:n,componentProps:r=Xn,elementProps:i}=e,o=s0(),s=VI()?.portalNode,[u,c]=x.useState(null),[d,p]=x.useState(null),g=Me(v=>{v!==null&&p(v)}),h=x.useRef(null);je(()=>{if(n===null){h.current&&(h.current=null,p(null),c(null));return}if(o==null)return;const v=(n&&(c0(n)?n:n.current))??s??document.body;if(v==null){h.current&&(h.current=null,p(null),c(null));return}h.current!==v&&(h.current=v,p(null),c(v))},[n,s,o]);const y=er("div",r,{ref:[t,g],props:[{id:o,[rq]:""},i]});return{portalNode:d,portalSubtree:u&&y?la.createPortal(y,u):null}}const BI=x.forwardRef(function(t,n){const{children:r,container:i,className:o,render:a,renderGuards:s,...u}=t,{portalNode:c,portalSubtree:d}=iq({container:i,ref:n,componentProps:t,elementProps:u}),p=x.useRef(null),g=x.useRef(null),h=x.useRef(null),y=x.useRef(null),[b,v]=x.useState(null),w=b?.modal,C=b?.open,E=typeof s=="boolean"?s:!!b&&!b.modal&&b.open&&!!c;x.useEffect(()=>{if(!c||w)return;function P(R){c&&R.relatedTarget&&ku(R)&&(R.type==="focusin"?NS:W4)(c)}return c.addEventListener("focusin",P,!0),c.addEventListener("focusout",P,!0),()=>{c.removeEventListener("focusin",P,!0),c.removeEventListener("focusout",P,!0)}},[c,w]),x.useEffect(()=>{!c||C||NS(c)},[C,c]);const _=x.useMemo(()=>({beforeOutsideRef:p,afterOutsideRef:g,beforeInsideRef:h,afterInsideRef:y,portalNode:c,setFocusManagerState:v}),[c]);return O.jsxs(x.Fragment,{children:[d,O.jsxs(b0.Provider,{value:_,children:[E&&c&&O.jsx(Fu,{"data-type":"outside",ref:p,onFocus:P=>{if(ku(P,c))h.current?.focus();else{const R=b?b.domReference:null;MI(R)?.focus()}}}),E&&c&&O.jsx("span",{"aria-owns":c.id,style:FG}),c&&la.createPortal(r,c),E&&c&&O.jsx(Fu,{"data-type":"outside",ref:g,onFocus:P=>{if(ku(P,c))y.current?.focus();else{const R=b?b.domReference:null;NI(R)?.focus(),b?.closeOnFocusOut&&b?.onOpenChange(!1,Xe(Kp,P.nativeEvent))}}})]})]})});process.env.NODE_ENV!=="production"&&(BI.displayName="FloatingPortal");function oq(e,t){const n=Nn(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 FS=20;let Yo=[];function x0(){Yo=Yo.filter(e=>e.deref()?.isConnected)}function aq(e){x0(),e&&ca(e)!=="body"&&(Yo.push(new WeakRef(e)),Yo.length>FS&&(Yo=Yo.slice(-FS)))}function Cm(){return x0(),Yo[Yo.length-1]?.deref()}function sq(e){if(!e)return null;const t=ic();return TI(e,t)?e:nh(e,t)[0]||e}function lq(e){return!e||!e.isConnected?!1:typeof e.checkVisibility=="function"?e.checkVisibility():Rr(e).display!=="none"}function VS(e,t){if(!t.current.includes("floating")&&!e.getAttribute("role")?.includes("dialog"))return;const n=ic(),i=z4(e,n).filter(a=>{const s=a.getAttribute("data-tabindex")||"";return TI(a,n)||a.hasAttribute("data-tabindex")&&!s.startsWith("-")}),o=e.getAttribute("tabindex");t.current.includes("floating")||i.length===0?o!=="0"&&e.setAttribute("tabindex","0"):(o!=="-1"||e.hasAttribute("data-tabindex")&&e.getAttribute("data-tabindex")!=="-1")&&(e.setAttribute("tabindex","-1"),e.setAttribute("data-tabindex","-1"))}function uq(e){const{context:t,children:n,disabled:r=!1,initialFocus:i=!0,returnFocus:o=!0,restoreFocus:a=!1,modal:s=!0,closeOnFocusOut:u=!0,openInteractionType:c="",nextFocusableElement:d,previousFocusableElement:p,beforeContentFocusGuardRef:g,externalTree:h}=e,y="rootStore"in t?t.rootStore:t,b=y.useState("open"),v=y.useState("domReferenceElement"),w=y.useState("floatingElement"),{events:C,dataRef:E}=y.context,_=Me(()=>E.current.floatingContext?.nodeId),P=i===!1,R=Iy(v)&&P,I=x.useRef(["content"]),k=Xr(i),B=Xr(o),L=Xr(c),V=rh(h),D=VI(),H=x.useRef(null),J=x.useRef(null),te=x.useRef(!1),G=x.useRef(!1),ee=x.useRef(!1),Q=x.useRef(-1),pe=x.useRef(""),K=x.useRef(""),Ae=x.useRef(null),Se=x.useRef(null),$e=Lu(Ae,g,D?.beforeInsideRef),we=Lu(Se,D?.afterInsideRef),Ce=Xa(),ze=Xa(),Ke=u0(),Fe=D!=null,Y=Ty(w),oe=Me((ie=Y)=>ie?nh(ie,ic()):[]),ne=Me(ie=>{const Z=oe(ie);return I.current.map(()=>Z).filter(Boolean).flat()});x.useEffect(()=>{if(r||!s)return;function ie(Re){Re.key==="Tab"&&ft(Y,eo(Xt(Y)))&&oe().length===0&&!R&&jt(Re)}const Z=Xt(Y);return Z.addEventListener("keydown",ie),()=>{Z.removeEventListener("keydown",ie)}},[r,v,Y,s,I,R,oe,ne]),x.useEffect(()=>{if(r||!b)return;const ie=Xt(Y);function Z(){ee.current=!1}function Re(fe){const me=lr(fe),de=ft(w,me)||ft(v,me)||ft(D?.portalNode,me);ee.current=!de,K.current=fe.pointerType||"keyboard",me?.closest(`[${LG}]`)&&(G.current=!0)}function U(){K.current="keyboard"}return ie.addEventListener("pointerdown",Re,!0),ie.addEventListener("pointerup",Z,!0),ie.addEventListener("pointercancel",Z,!0),ie.addEventListener("keydown",U,!0),()=>{ie.removeEventListener("pointerdown",Re,!0),ie.removeEventListener("pointerup",Z,!0),ie.removeEventListener("pointercancel",Z,!0),ie.removeEventListener("keydown",U,!0)}},[r,w,v,Y,b,D]),x.useEffect(()=>{if(r||!u)return;const ie=Xt(Y);function Z(){G.current=!0,ze.start(0,()=>{G.current=!1})}function Re(ve){const le=lr(ve),ke=oe().indexOf(le);ke!==-1&&(Q.current=ke)}function U(ve){const le=ve.relatedTarget,be=ve.currentTarget,ke=lr(ve);queueMicrotask(()=>{const et=_(),Tt=y.context.triggerElements,Dn=le?.hasAttribute(Wd("focus-guard"))&&[Ae.current,Se.current,D?.beforeInsideRef.current,D?.afterInsideRef.current,D?.beforeOutsideRef.current,D?.afterOutsideRef.current,Qi(p),Qi(d)].includes(le),Ct=!(ft(v,le)||ft(w,le)||ft(le,w)||ft(D?.portalNode,le)||le!=null&&Tt.hasElement(le)||Tt.hasMatchingElement(ot=>ft(ot,le))||Dn||V&&(il(V.nodesRef.current,et).find(ot=>ft(ot.context?.elements.floating,le)||ft(ot.context?.elements.domReference,le))||PS(V.nodesRef.current,et).find(ot=>[ot.context?.elements.floating,Ty(ot.context?.elements.floating)].includes(le)||ot.context?.elements.domReference===le)));if(be===v&&Y&&VS(Y,I),a&&be!==v&&!lq(ke)&&eo(ie)===ie.body){if(nn(Y)&&(Y.focus(),a==="popup")){Ke.request(()=>{Y.focus()});return}const ot=Q.current,kt=oe(),mn=kt[ot]||kt[kt.length-1]||Y;nn(mn)&&mn.focus()}if(E.current.insideReactTree){E.current.insideReactTree=!1;return}(R||!s)&&le&&Ct&&!G.current&&(R||le!==Cm())&&(te.current=!0,y.setOpen(!1,Xe(Kp,ve)))})}function fe(){ee.current||(E.current.insideReactTree=!0,Ce.start(0,()=>{E.current.insideReactTree=!1}))}const me=nn(v)?v:null,de=[];if(!(!w&&!me))return me&&(me.addEventListener("focusout",U),me.addEventListener("pointerdown",Z),de.push(()=>{me.removeEventListener("focusout",U),me.removeEventListener("pointerdown",Z)})),w&&(w.addEventListener("focusin",Re),w.addEventListener("focusout",U),D&&(w.addEventListener("focusout",fe,!0),de.push(()=>{w.removeEventListener("focusout",fe,!0)})),de.push(()=>{w.removeEventListener("focusin",Re),w.removeEventListener("focusout",U)})),()=>{de.forEach(ve=>{ve()})}},[r,v,w,Y,s,V,D,y,u,a,oe,R,_,I,E,Ce,ze,Ke,d,p]),x.useEffect(()=>{if(r||!w||!b)return;const ie=Array.from(D?.portalNode?.querySelectorAll(`[${Wd("portal")}]`)||[]),Re=(V?PS(V.nodesRef.current,_()):[]).find(fe=>Iy(fe.context?.elements.domReference||null))?.context?.elements.domReference,U=[w,Re,...ie,H.current,J.current,Ae.current,Se.current,D?.beforeOutsideRef.current,D?.afterOutsideRef.current,Qi(p),Qi(d),R?v:null].filter(fe=>fe!=null);return nq(U,s||R)},[b,r,v,w,s,I,D,R,V,_,d,p]),je(()=>{if(!b||r||!nn(Y))return;const ie=Xt(Y),Z=eo(ie);queueMicrotask(()=>{const Re=ne(Y),U=k.current,fe=typeof U=="function"?U(L.current||""):U;if(fe===void 0||fe===!1)return;let me;fe===!0||fe===null?me=Re[0]||Y:me=Qi(fe),me=me||Re[0]||Y,!ft(Y,Z)&&Nu(me,{preventScroll:me===Y})})},[r,b,Y,P,ne,k,L]),je(()=>{if(r||!Y)return;const ie=Xt(Y),Z=eo(ie);aq(Z);function Re(me){if(me.open||(pe.current=oq(me.nativeEvent,K.current)),me.reason===HG&&me.nativeEvent.type==="mouseleave"&&(te.current=!0),me.reason===a0)if(me.nested)te.current=!1;else if(CI(me.nativeEvent)||SI(me.nativeEvent))te.current=!1;else{let de=!1;document.createElement("div").focus({get preventScroll(){return de=!0,!1}}),de?te.current=!1:te.current=!0}}C.on("openchange",Re);const U=ie.createElement("span");U.setAttribute("tabindex","-1"),U.setAttribute("aria-hidden","true"),Object.assign(U.style,y0),Fe&&v&&v.insertAdjacentElement("afterend",U);function fe(){const me=B.current;let de=typeof me=="function"?me(pe.current):me;if(de===void 0||de===!1)return null;if(de===null&&(de=!0),typeof de=="boolean"){const le=v||Cm();return le&&le.isConnected?le:U}const ve=v||Cm()||U;return Qi(de)||ve}return()=>{C.off("openchange",Re);const me=eo(ie),de=ft(w,me)||V&&il(V.nodesRef.current,_(),!1).some(le=>ft(le.context?.elements.floating,me)),ve=fe();queueMicrotask(()=>{const le=sq(ve),be=typeof B.current!="boolean";B.current&&!te.current&&nn(le)&&(!(!be&&le!==me&&me!==ie.body)||de)&&le.focus({preventScroll:!0}),U.remove(),te.current=!1})}},[r,w,Y,B,E,C,V,Fe,v,_]),je(()=>{if(!yI||b||!w)return;const ie=eo(Xt(w));!nn(ie)||!h0(ie)||ft(w,ie)&&ie.blur()},[b,w]),je(()=>{if(!(r||!D))return D.setFocusManagerState({modal:s,closeOnFocusOut:u,open:b,onOpenChange:y.setOpen,domReference:v}),()=>{D.setFocusManagerState(null)}},[r,D,s,b,y,u,v]),je(()=>{if(!(r||!Y))return VS(Y,I),()=>{queueMicrotask(x0)}},[r,Y,I]);const $=!r&&(s?!R:!0)&&(Fe||s);return O.jsxs(x.Fragment,{children:[$&&O.jsx(Fu,{"data-type":"inside",ref:$e,onFocus:ie=>{if(s){const Z=ne();Nu(Z[Z.length-1])}else D?.portalNode&&(te.current=!1,ku(ie,D.portalNode)?NI(v)?.focus():Qi(p??D.beforeOutsideRef)?.focus())}}),n,$&&O.jsx(Fu,{"data-type":"inside",ref:we,onFocus:ie=>{s?Nu(ne()[0]):D?.portalNode&&(u&&(te.current=!0),ku(ie,D.portalNode)?MI(v)?.focus():Qi(d??D.afterOutsideRef)?.focus())}})]})}function zI(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.context.dataRef,{enabled:i=!0,event:o="click",toggle:a=!0,ignoreMouse:s=!1,stickIfOpen:u=!0,touchOpenDelay:c=0,reason:d=Ey}=t,p=x.useRef(void 0),g=u0(),h=Xa(),y=x.useMemo(()=>({onPointerDown(b){p.current=b.pointerType},onMouseDown(b){const v=p.current,w=b.nativeEvent,C=n.select("open");if(b.button!==0||o==="click"||AS(v)&&s)return;const E=r.current.openEvent,_=E?.type,P=n.select("domReferenceElement")!==b.currentTarget,R=C&&P||!(C&&a&&(!(E&&u)||_==="click"||_==="mousedown"));if(h0(w.target)){const k=Xe(d,w,w.target);R&&v==="touch"&&c>0?h.start(c,()=>{n.setOpen(!0,k)}):n.setOpen(R,k);return}const I=b.currentTarget;g.request(()=>{const k=Xe(d,w,I);R&&v==="touch"&&c>0?h.start(c,()=>{n.setOpen(!0,k)}):n.setOpen(R,k)})},onClick(b){if(o==="mousedown-only")return;const v=p.current;if(o==="mousedown"&&v){p.current=void 0;return}if(AS(v)&&s)return;const w=n.select("open"),C=r.current.openEvent,E=n.select("domReferenceElement")!==b.currentTarget,_=w&&E||!(w&&a&&(!(C&&u)||EI(C))),P=Xe(d,b.nativeEvent,b.currentTarget);_&&v==="touch"&&c>0?h.start(c,()=>{n.setOpen(!0,P)}):n.setOpen(_,P)},onKeyDown(){p.current=void 0}}),[r,o,s,n,u,a,g,h,c,d]);return x.useMemo(()=>i?{reference:y}:Xn,[i,y])}function BS(e,t,n){let{reference:r,floating:i}=e;const o=Zr(t),a=th(t),s=eh(a),u=Ar(t),c=o==="y",d=r.x+r.width/2-i.width/2,p=r.y+r.height/2-i.height/2,g=r[s]/2-i[s]/2;let h;switch(u){case"top":h={x:d,y:r.y-i.height};break;case"bottom":h={x:d,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:p};break;case"left":h={x:r.x-i.width,y:p};break;default:h={x:r.x,y:r.y}}switch(bo(t)){case"start":h[a]-=g*(n&&c?-1:1);break;case"end":h[a]+=g*(n&&c?-1:1);break}return h}async function cq(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:o,rects:a,elements:s,strategy:u}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:p="floating",altBoundary:g=!1,padding:h=0}=Ni(t,e),y=m0(h),v=s[g?p==="floating"?"reference":"floating":p],w=$d(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(v)))==null||n?v:v.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(s.floating)),boundary:c,rootBoundary:d,strategy:u})),C=p==="floating"?{x:r,y:i,width:a.floating.width,height:a.floating.height}:a.reference,E=await(o.getOffsetParent==null?void 0:o.getOffsetParent(s.floating)),_=await(o.isElement==null?void 0:o.isElement(E))?await(o.getScale==null?void 0:o.getScale(E))||{x:1,y:1}:{x:1,y:1},P=$d(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:C,offsetParent:E,strategy:u}):C);return{top:(w.top-P.top+y.top)/_.y,bottom:(P.bottom-w.bottom+y.bottom)/_.y,left:(w.left-P.left+y.left)/_.x,right:(P.right-w.right+y.right)/_.x}}const fq=50,dq=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:a}=n,s=a.detectOverflow?a:{...a,detectOverflow:cq},u=await(a.isRTL==null?void 0:a.isRTL(t));let c=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:d,y:p}=BS(c,r,u),g=r,h=0;const y={};for(let b=0;b<o.length;b++){const v=o[b];if(!v)continue;const{name:w,fn:C}=v,{x:E,y:_,data:P,reset:R}=await C({x:d,y:p,initialPlacement:r,placement:g,strategy:i,middlewareData:y,rects:c,platform:s,elements:{reference:e,floating:t}});d=E??d,p=_??p,y[w]={...y[w],...P},R&&h<fq&&(h++,typeof R=="object"&&(R.placement&&(g=R.placement),R.rects&&(c=R.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:i}):R.rects),{x:d,y:p}=BS(c,g,u)),b=-1)}return{x:d,y:p,placement:g,strategy:i,middlewareData:y}},pq=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:o,platform:a,elements:s,middlewareData:u}=t,{element:c,padding:d=0}=Ni(e,t)||{};if(c==null)return{};const p=m0(d),g={x:n,y:r},h=th(i),y=eh(h),b=await a.getDimensions(c),v=h==="y",w=v?"top":"left",C=v?"bottom":"right",E=v?"clientHeight":"clientWidth",_=o.reference[y]+o.reference[h]-g[h]-o.floating[y],P=g[h]-o.reference[h],R=await(a.getOffsetParent==null?void 0:a.getOffsetParent(c));let I=R?R[E]:0;(!I||!await(a.isElement==null?void 0:a.isElement(R)))&&(I=s.floating[E]||o.floating[y]);const k=_/2-P/2,B=I/2-b[y]/2-1,L=oa(p[w],B),V=oa(p[C],B),D=L,H=I-b[y]-V,J=I/2-b[y]/2+k,te=jd(D,J,H),G=!u.arrow&&bo(i)!=null&&J!==te&&o.reference[y]/2-(J<D?L:V)-b[y]/2<0,ee=G?J<D?J-D:J-H:0;return{[h]:g[h]+ee,data:{[h]:te,centerOffset:J-te-ee,...G&&{alignmentOffset:ee}},reset:G}}}),hq=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:i,middlewareData:o,rects:a,initialPlacement:s,platform:u,elements:c}=t,{mainAxis:d=!0,crossAxis:p=!0,fallbackPlacements:g,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:y="none",flipAlignment:b=!0,...v}=Ni(e,t);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const w=Ar(i),C=Zr(s),E=Ar(s)===s,_=await(u.isRTL==null?void 0:u.isRTL(c.floating)),P=g||(E||!b?[Ld(s)]:y4(s)),R=y!=="none";!g&&R&&P.push(...C4(s,b,y,_));const I=[s,...P],k=await u.detectOverflow(t,v),B=[];let L=((r=o.flip)==null?void 0:r.overflows)||[];if(d&&B.push(k[w]),p){const J=v4(i,a,_);B.push(k[J[0]],k[J[1]])}if(L=[...L,{placement:i,overflows:B}],!B.every(J=>J<=0)){var V,D;const J=(((V=o.flip)==null?void 0:V.index)||0)+1,te=I[J];if(te&&(!(p==="alignment"?C!==Zr(te):!1)||L.every(Q=>Zr(Q.placement)===C?Q.overflows[0]>0:!0)))return{data:{index:J,overflows:L},reset:{placement:te}};let G=(D=L.filter(ee=>ee.overflows[0]<=0).sort((ee,Q)=>ee.overflows[1]-Q.overflows[1])[0])==null?void 0:D.placement;if(!G)switch(h){case"bestFit":{var H;const ee=(H=L.filter(Q=>{if(R){const pe=Zr(Q.placement);return pe===C||pe==="y"}return!0}).map(Q=>[Q.placement,Q.overflows.filter(pe=>pe>0).reduce((pe,K)=>pe+K,0)]).sort((Q,pe)=>Q[1]-pe[1])[0])==null?void 0:H[0];ee&&(G=ee);break}case"initialPlacement":G=s;break}if(i!==G)return{reset:{placement:G}}}return{}}}};function zS(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function WS(e){return g4.some(t=>e[t]>=0)}const gq=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:i="referenceHidden",...o}=Ni(e,t);switch(i){case"referenceHidden":{const a=await r.detectOverflow(t,{...o,elementContext:"reference"}),s=zS(a,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:WS(s)}}}case"escaped":{const a=await r.detectOverflow(t,{...o,altBoundary:!0}),s=zS(a,n.floating);return{data:{escapedOffsets:s,escaped:WS(s)}}}default:return{}}}}},WI=new Set(["left","top"]);async function mq(e,t){const{placement:n,platform:r,elements:i}=e,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),a=Ar(n),s=bo(n),u=Zr(n)==="y",c=WI.has(a)?-1:1,d=o&&u?-1:1,p=Ni(t,e);let{mainAxis:g,crossAxis:h,alignmentAxis:y}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return s&&typeof y=="number"&&(h=s==="end"?y*-1:y),u?{x:h*d,y:g*c}:{x:g*c,y:h*d}}const vq=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:o,placement:a,middlewareData:s}=t,u=await mq(t,e);return a===((n=s.offset)==null?void 0:n.placement)&&(r=s.arrow)!=null&&r.alignmentOffset?{}:{x:i+u.x,y:o+u.y,data:{...u,placement:a}}}}},yq=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i,platform:o}=t,{mainAxis:a=!0,crossAxis:s=!1,limiter:u={fn:w=>{let{x:C,y:E}=w;return{x:C,y:E}}},...c}=Ni(e,t),d={x:n,y:r},p=await o.detectOverflow(t,c),g=Zr(Ar(i)),h=g0(g);let y=d[h],b=d[g];if(a){const w=h==="y"?"top":"left",C=h==="y"?"bottom":"right",E=y+p[w],_=y-p[C];y=jd(E,y,_)}if(s){const w=g==="y"?"top":"left",C=g==="y"?"bottom":"right",E=b+p[w],_=b-p[C];b=jd(E,b,_)}const v=u.fn({...t,[h]:y,[g]:b});return{...v,data:{x:v.x-n,y:v.y-r,enabled:{[h]:a,[g]:s}}}}}},bq=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:o,middlewareData:a}=t,{offset:s=0,mainAxis:u=!0,crossAxis:c=!0}=Ni(e,t),d={x:n,y:r},p=Zr(i),g=g0(p);let h=d[g],y=d[p];const b=Ni(s,t),v=typeof b=="number"?{mainAxis:b,crossAxis:0}:{mainAxis:0,crossAxis:0,...b};if(u){const E=g==="y"?"height":"width",_=o.reference[g]-o.floating[E]+v.mainAxis,P=o.reference[g]+o.reference[E]-v.mainAxis;h<_?h=_:h>P&&(h=P)}if(c){var w,C;const E=g==="y"?"width":"height",_=WI.has(Ar(i)),P=o.reference[p]-o.floating[E]+(_&&((w=a.offset)==null?void 0:w[p])||0)+(_?0:v.crossAxis),R=o.reference[p]+o.reference[E]+(_?0:((C=a.offset)==null?void 0:C[p])||0)-(_?v.crossAxis:0);y<P?y=P:y>R&&(y=R)}return{[g]:h,[p]:y}}}},xq=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:i,rects:o,platform:a,elements:s}=t,{apply:u=()=>{},...c}=Ni(e,t),d=await a.detectOverflow(t,c),p=Ar(i),g=bo(i),h=Zr(i)==="y",{width:y,height:b}=o.floating;let v,w;p==="top"||p==="bottom"?(v=p,w=g===(await(a.isRTL==null?void 0:a.isRTL(s.floating))?"start":"end")?"left":"right"):(w=p,v=g==="end"?"top":"bottom");const C=b-d.top-d.bottom,E=y-d.left-d.right,_=oa(b-d[v],C),P=oa(y-d[w],E),R=!t.middlewareData.shift;let I=_,k=P;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(k=E),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(I=C),R&&!g){const L=Er(d.left,0),V=Er(d.right,0),D=Er(d.top,0),H=Er(d.bottom,0);h?k=y-2*(L!==0||V!==0?L+V:Er(d.left,d.right)):I=b-2*(D!==0||H!==0?D+H:Er(d.top,d.bottom))}await u({...t,availableWidth:k,availableHeight:I});const B=await a.getDimensions(s.floating);return y!==B.width||b!==B.height?{reset:{rects:!0}}:{}}}};function HI(e){const t=Rr(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=nn(e),o=i?e.offsetWidth:n,a=i?e.offsetHeight:r,s=Dd(n)!==o||Dd(r)!==a;return s&&(n=o,r=a),{width:n,height:r,$:s}}function w0(e){return Lt(e)?e:e.contextElement}function al(e){const t=w0(e);if(!nn(t))return Ii(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:o}=HI(t);let a=(o?Dd(n.width):n.width)/r,s=(o?Dd(n.height):n.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const wq=Ii(0);function UI(e){const t=Nn(e);return!Zp()||!t.visualViewport?wq:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Cq(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Nn(e)?!1:t}function Za(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),o=w0(e);let a=Ii(1);t&&(r?Lt(r)&&(a=al(r)):a=al(e));const s=Cq(o,n,r)?UI(o):Ii(0);let u=(i.left+s.x)/a.x,c=(i.top+s.y)/a.y,d=i.width/a.x,p=i.height/a.y;if(o){const g=Nn(o),h=r&&Lt(r)?Nn(r):r;let y=g,b=Py(y);for(;b&&r&&h!==y;){const v=al(b),w=b.getBoundingClientRect(),C=Rr(b),E=w.left+(b.clientLeft+parseFloat(C.paddingLeft))*v.x,_=w.top+(b.clientTop+parseFloat(C.paddingTop))*v.y;u*=v.x,c*=v.y,d*=v.x,p*=v.y,u+=E,c+=_,y=Nn(b),b=Py(y)}}return $d({width:d,height:p,x:u,y:c})}function ih(e,t){const n=Qp(e).scrollLeft;return t?t.left+n:Za(Vi(e)).left+n}function GI(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-ih(e,n),i=n.top+t.scrollTop;return{x:r,y:i}}function Sq(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const o=i==="fixed",a=Vi(r),s=t?Xp(t.floating):!1;if(r===a||s&&o)return n;let u={scrollLeft:0,scrollTop:0},c=Ii(1);const d=Ii(0),p=nn(r);if((p||!p&&!o)&&((ca(r)!=="body"||fa(a))&&(u=Qp(r)),p)){const h=Za(r);c=al(r),d.x=h.x+r.clientLeft,d.y=h.y+r.clientTop}const g=a&&!p&&!o?GI(a,u):Ii(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-u.scrollLeft*c.x+d.x+g.x,y:n.y*c.y-u.scrollTop*c.y+d.y+g.y}}function Eq(e){return Array.from(e.getClientRects())}function _q(e){const t=Vi(e),n=Qp(e),r=e.ownerDocument.body,i=Er(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=Er(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+ih(e);const s=-n.scrollTop;return Rr(r).direction==="rtl"&&(a+=Er(t.clientWidth,r.clientWidth)-i),{width:i,height:o,x:a,y:s}}const HS=25;function Oq(e,t){const n=Nn(e),r=Vi(e),i=n.visualViewport;let o=r.clientWidth,a=r.clientHeight,s=0,u=0;if(i){o=i.width,a=i.height;const d=Zp();(!d||d&&t==="fixed")&&(s=i.offsetLeft,u=i.offsetTop)}const c=ih(r);if(c<=0){const d=r.ownerDocument,p=d.body,g=getComputedStyle(p),h=d.compatMode==="CSS1Compat"&&parseFloat(g.marginLeft)+parseFloat(g.marginRight)||0,y=Math.abs(r.clientWidth-p.clientWidth-h);y<=HS&&(o-=y)}else c<=HS&&(o+=c);return{width:o,height:a,x:s,y:u}}function Pq(e,t){const n=Za(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,o=nn(e)?al(e):Ii(1),a=e.clientWidth*o.x,s=e.clientHeight*o.y,u=i*o.x,c=r*o.y;return{width:a,height:s,x:u,y:c}}function US(e,t,n){let r;if(t==="viewport")r=Oq(e,n);else if(t==="document")r=_q(Vi(e));else if(Lt(t))r=Pq(t,n);else{const i=UI(e);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return $d(r)}function qI(e,t){const n=co(e);return n===t||!Lt(n)||ao(n)?!1:Rr(n).position==="fixed"||qI(n,t)}function Aq(e,t){const n=t.get(e);if(n)return n;let r=Jo(e,[],!1).filter(s=>Lt(s)&&ca(s)!=="body"),i=null;const o=Rr(e).position==="fixed";let a=o?co(e):e;for(;Lt(a)&&!ao(a);){const s=Rr(a),u=f0(a);!u&&s.position==="fixed"&&(i=null),(o?!u&&!i:!u&&s.position==="static"&&!!i&&(i.position==="absolute"||i.position==="fixed")||fa(a)&&!u&&qI(e,a))?r=r.filter(d=>d!==a):i=s,a=co(a)}return t.set(e,r),r}function Rq(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const a=[...n==="clippingAncestors"?Xp(t)?[]:Aq(t,this._c):[].concat(n),r],s=US(t,a[0],i);let u=s.top,c=s.right,d=s.bottom,p=s.left;for(let g=1;g<a.length;g++){const h=US(t,a[g],i);u=Er(h.top,u),c=oa(h.right,c),d=oa(h.bottom,d),p=Er(h.left,p)}return{width:c-p,height:d-u,x:p,y:u}}function Iq(e){const{width:t,height:n}=HI(e);return{width:t,height:n}}function Tq(e,t,n){const r=nn(t),i=Vi(t),o=n==="fixed",a=Za(e,!0,o,t);let s={scrollLeft:0,scrollTop:0};const u=Ii(0);function c(){u.x=ih(i)}if(r||!r&&!o)if((ca(t)!=="body"||fa(i))&&(s=Qp(t)),r){const h=Za(t,!0,o,t);u.x=h.x+t.clientLeft,u.y=h.y+t.clientTop}else i&&c();o&&!r&&i&&c();const d=i&&!r&&!o?GI(i,s):Ii(0),p=a.left+s.scrollLeft-u.x-d.x,g=a.top+s.scrollTop-u.y-d.y;return{x:p,y:g,width:a.width,height:a.height}}function Sm(e){return Rr(e).position==="static"}function GS(e,t){if(!nn(e)||Rr(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Vi(e)===n&&(n=n.ownerDocument.body),n}function KI(e,t){const n=Nn(e);if(Xp(e))return n;if(!nn(e)){let i=co(e);for(;i&&!ao(i);){if(Lt(i)&&!Sm(i))return i;i=co(i)}return n}let r=GS(e,t);for(;r&&e4(r)&&Sm(r);)r=GS(r,t);return r&&ao(r)&&Sm(r)&&!f0(r)?n:r||r4(e)||n}const kq=async function(e){const t=this.getOffsetParent||KI,n=this.getDimensions,r=await n(e.floating);return{reference:Tq(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Nq(e){return Rr(e).direction==="rtl"}const Mq={convertOffsetParentRelativeRectToViewportRelativeRect:Sq,getDocumentElement:Vi,getClippingRect:Rq,getOffsetParent:KI,getElementRects:kq,getClientRects:Eq,getDimensions:Iq,getScale:al,isElement:Lt,isRTL:Nq};function YI(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Dq(e,t){let n=null,r;const i=Vi(e);function o(){var s;clearTimeout(r),(s=n)==null||s.disconnect(),n=null}function a(s,u){s===void 0&&(s=!1),u===void 0&&(u=1),o();const c=e.getBoundingClientRect(),{left:d,top:p,width:g,height:h}=c;if(s||t(),!g||!h)return;const y=el(p),b=el(i.clientWidth-(d+g)),v=el(i.clientHeight-(p+h)),w=el(d),E={rootMargin:-y+"px "+-b+"px "+-v+"px "+-w+"px",threshold:Er(0,oa(1,u))||1};let _=!0;function P(R){const I=R[0].intersectionRatio;if(I!==u){if(!_)return a();I?a(!1,I):r=setTimeout(()=>{a(!1,1e-7)},1e3)}I===1&&!YI(c,e.getBoundingClientRect())&&a(),_=!1}try{n=new IntersectionObserver(P,{...E,root:i.ownerDocument})}catch{n=new IntersectionObserver(P,E)}n.observe(e)}return a(!0),o}function Dy(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:u=!1}=r,c=w0(e),d=i||o?[...c?Jo(c):[],...t?Jo(t):[]]:[];d.forEach(w=>{i&&w.addEventListener("scroll",n,{passive:!0}),o&&w.addEventListener("resize",n)});const p=c&&s?Dq(c,n):null;let g=-1,h=null;a&&(h=new ResizeObserver(w=>{let[C]=w;C&&C.target===c&&h&&t&&(h.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var E;(E=h)==null||E.observe(t)})),n()}),c&&!u&&h.observe(c),t&&h.observe(t));let y,b=u?Za(e):null;u&&v();function v(){const w=Za(e);b&&!YI(b,w)&&n(),b=w,y=requestAnimationFrame(v)}return n(),()=>{var w;d.forEach(C=>{i&&C.removeEventListener("scroll",n),o&&C.removeEventListener("resize",n)}),p?.(),(w=h)==null||w.disconnect(),h=null,u&&cancelAnimationFrame(y)}}const jq=vq,Lq=yq,$q=hq,Fq=xq,Vq=gq,qS=pq,Bq=bq,zq=(e,t,n)=>{const r=new Map,i={platform:Mq,...n},o={...i.platform,_c:r};return dq(e,t,{...i,platform:o})};var Wq=typeof document<"u",Hq=function(){},Sd=Wq?j.useLayoutEffect:Hq;function Hd(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,i;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(!Hd(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const o=i[r];if(!(o==="_owner"&&e.$$typeof)&&!Hd(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function XI(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function KS(e,t){const n=XI(e);return Math.round(t*n)/n}function Em(e){const t=x.useRef(e);return Sd(()=>{t.current=e}),t}function ZI(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:o,floating:a}={},transform:s=!0,whileElementsMounted:u,open:c}=e,[d,p]=x.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[g,h]=x.useState(r);Hd(g,r)||h(r);const[y,b]=x.useState(null),[v,w]=x.useState(null),C=x.useCallback(Q=>{Q!==R.current&&(R.current=Q,b(Q))},[]),E=x.useCallback(Q=>{Q!==I.current&&(I.current=Q,w(Q))},[]),_=o||y,P=a||v,R=x.useRef(null),I=x.useRef(null),k=x.useRef(d),B=u!=null,L=Em(u),V=Em(i),D=Em(c),H=x.useCallback(()=>{if(!R.current||!I.current)return;const Q={placement:t,strategy:n,middleware:g};V.current&&(Q.platform=V.current),zq(R.current,I.current,Q).then(pe=>{const K={...pe,isPositioned:D.current!==!1};J.current&&!Hd(k.current,K)&&(k.current=K,la.flushSync(()=>{p(K)}))})},[g,t,n,V,D]);Sd(()=>{c===!1&&k.current.isPositioned&&(k.current.isPositioned=!1,p(Q=>({...Q,isPositioned:!1})))},[c]);const J=x.useRef(!1);Sd(()=>(J.current=!0,()=>{J.current=!1}),[]),Sd(()=>{if(_&&(R.current=_),P&&(I.current=P),_&&P){if(L.current)return L.current(_,P,H);H()}},[_,P,H,L,B]);const te=x.useMemo(()=>({reference:R,floating:I,setReference:C,setFloating:E}),[C,E]),G=x.useMemo(()=>({reference:_,floating:P}),[_,P]),ee=x.useMemo(()=>{const Q={position:n,left:0,top:0};if(!G.floating)return Q;const pe=KS(G.floating,d.x),K=KS(G.floating,d.y);return s?{...Q,transform:"translate("+pe+"px, "+K+"px)",...XI(G.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:pe,top:K}},[n,s,G.floating,d.x,d.y]);return x.useMemo(()=>({...d,update:H,refs:te,elements:G,floatingStyles:ee}),[d,H,te,G,ee])}const Uq=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:i}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?qS({element:r.current,padding:i}).fn(n):{}:r?qS({element:r,padding:i}).fn(n):{}}}},QI=(e,t)=>{const n=jq(e);return{name:n.name,fn:n.fn,options:[e,t]}},JI=(e,t)=>{const n=Lq(e);return{name:n.name,fn:n.fn,options:[e,t]}},eT=(e,t)=>({fn:Bq(e).fn,options:[e,t]}),tT=(e,t)=>{const n=$q(e);return{name:n.name,fn:n.fn,options:[e,t]}},nT=(e,t)=>{const n=Fq(e);return{name:n.name,fn:n.fn,options:[e,t]}},rT=(e,t)=>{const n=Vq(e);return{name:n.name,fn:n.fn,options:[e,t]}},Gq=(e,t)=>{const n=Uq(e);return{name:n.name,fn:n.fn,options:[e,t]}},qq={intentional:"onClick",sloppy:"onPointerDown"};function Kq(e){return{escapeKey:typeof e=="boolean"?e:e?.escapeKey??!1,outsidePress:typeof e=="boolean"?e:e?.outsidePress??!0}}function Yq(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.useState("open"),i=n.useState("floatingElement"),o=n.useState("referenceElement"),a=n.useState("domReferenceElement"),{onOpenChange:s,dataRef:u}=n.context,{enabled:c=!0,escapeKey:d=!0,outsidePress:p=!0,outsidePressEvent:g="sloppy",referencePress:h=!1,referencePressEvent:y="sloppy",ancestorScroll:b=!1,bubbles:v,externalTree:w}=t,C=rh(w),E=Me(typeof p=="function"?p:()=>!1),_=typeof p=="function"?E:p,P=x.useRef(!1),{escapeKey:R,outsidePress:I}=Kq(v),k=x.useRef(null),B=Xa(),L=Xa(),V=Me(()=>{L.clear(),u.current.insideReactTree=!1}),D=x.useRef(!1),H=x.useRef(""),J=Me($=>{H.current=$.pointerType}),te=Me(()=>{const $=H.current,ie=$==="pen"||!$?"mouse":$,Z=typeof g=="function"?g():g;return typeof Z=="string"?Z:Z[ie]}),G=Me($=>{if(!r||!c||!d||$.key!=="Escape"||D.current)return;const ie=u.current.floatingContext?.nodeId,Z=C?il(C.nodesRef.current,ie):[];if(!R&&Z.length>0){let fe=!0;if(Z.forEach(me=>{me.context?.open&&!me.context.dataRef.current.__escapeKeyBubbles&&(fe=!1)}),!fe)return}const Re=h4($)?$.nativeEvent:$,U=Xe(uI,Re);n.setOpen(!1,U),!R&&!U.isPropagationAllowed&&$.stopPropagation()}),ee=Me($=>{const ie=te();return ie==="intentional"&&$.type!=="click"||ie==="sloppy"&&$.type==="click"}),Q=Me(()=>{u.current.insideReactTree=!0,L.start(0,V)}),pe=Me(($,ie=!1)=>{if(ee($)){V();return}if(u.current.insideReactTree){V();return}if(te()==="intentional"&&ie||typeof _=="function"&&!_($))return;const Z=lr($),Re=`[${Wd("inert")}]`,U=Xt(n.select("floatingElement")).querySelectorAll(Re),fe=n.context.triggerElements;if(Z&&(fe.hasElement(Z)||fe.hasMatchingElement(be=>ft(be,Z))))return;let me=Lt(Z)?Z:null;for(;me&&!ao(me);){const be=co(me);if(ao(be)||!Lt(be))break;me=be}if(U.length&&Lt(Z)&&!p4(Z)&&!ft(Z,n.select("floatingElement"))&&Array.from(U).every(be=>!ft(me,be)))return;if(nn(Z)&&!("touches"in $)){const be=ao(Z),ke=Rr(Z),et=/auto|scroll/,Tt=be||et.test(ke.overflowX),Dn=be||et.test(ke.overflowY),Ct=Tt&&Z.clientWidth>0&&Z.scrollWidth>Z.clientWidth,ot=Dn&&Z.clientHeight>0&&Z.scrollHeight>Z.clientHeight,kt=ke.direction==="rtl",mn=ot&&(kt?$.offsetX<=Z.offsetWidth-Z.clientWidth:$.offsetX>Z.clientWidth),on=Ct&&$.offsetY>Z.clientHeight;if(mn||on)return}const de=u.current.floatingContext?.nodeId,ve=C&&il(C.nodesRef.current,de).some(be=>li($,be.context?.elements.floating));if(li($,n.select("floatingElement"))||li($,n.select("domReferenceElement"))||ve)return;const le=C?il(C.nodesRef.current,de):[];if(le.length>0){let be=!0;if(le.forEach(ke=>{ke.context?.open&&!ke.context.dataRef.current.__outsidePressBubbles&&(be=!1)}),!be)return}n.setOpen(!1,Xe(a0,$)),V()}),K=Me($=>{te()!=="sloppy"||$.pointerType==="touch"||!n.select("open")||!c||li($,n.select("floatingElement"))||li($,n.select("domReferenceElement"))||pe($)}),Ae=Me($=>{if(te()!=="sloppy"||!n.select("open")||!c||li($,n.select("floatingElement"))||li($,n.select("domReferenceElement")))return;const ie=$.touches[0];ie&&(k.current={startTime:Date.now(),startX:ie.clientX,startY:ie.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},B.start(1e3,()=>{k.current&&(k.current.dismissOnTouchEnd=!1,k.current.dismissOnMouseDown=!1)}))}),Se=Me($=>{const ie=lr($);function Z(){Ae($),ie?.removeEventListener($.type,Z)}ie?.addEventListener($.type,Z)}),$e=Me($=>{const ie=P.current;if(P.current=!1,B.clear(),$.type==="mousedown"&&k.current&&!k.current.dismissOnMouseDown)return;const Z=lr($);function Re(){$.type==="pointerdown"?K($):pe($,ie),Z?.removeEventListener($.type,Re)}Z?.addEventListener($.type,Re)}),we=Me($=>{if(te()!=="sloppy"||!k.current||li($,n.select("floatingElement"))||li($,n.select("domReferenceElement")))return;const ie=$.touches[0];if(!ie)return;const Z=Math.abs(ie.clientX-k.current.startX),Re=Math.abs(ie.clientY-k.current.startY),U=Math.sqrt(Z*Z+Re*Re);U>5&&(k.current.dismissOnTouchEnd=!0),U>10&&(pe($),B.clear(),k.current=null)}),Ce=Me($=>{const ie=lr($);function Z(){we($),ie?.removeEventListener($.type,Z)}ie?.addEventListener($.type,Z)}),ze=Me($=>{te()!=="sloppy"||!k.current||li($,n.select("floatingElement"))||li($,n.select("domReferenceElement"))||(k.current.dismissOnTouchEnd&&pe($),B.clear(),k.current=null)}),Ke=Me($=>{const ie=lr($);function Z(){ze($),ie?.removeEventListener($.type,Z)}ie?.addEventListener($.type,Z)});x.useEffect(()=>{if(!r||!c)return;u.current.__escapeKeyBubbles=R,u.current.__outsidePressBubbles=I;const $=new pl;function ie(me){n.setOpen(!1,Xe(Yr,me))}function Z(){$.clear(),D.current=!0}function Re(){$.start(Zp()?5:0,()=>{D.current=!1})}const U=Xt(i);U.addEventListener("pointerdown",J,!0),d&&(U.addEventListener("keydown",G),U.addEventListener("compositionstart",Z),U.addEventListener("compositionend",Re)),_&&(U.addEventListener("click",$e,!0),U.addEventListener("pointerdown",$e,!0),U.addEventListener("touchstart",Se,!0),U.addEventListener("touchmove",Ce,!0),U.addEventListener("touchend",Ke,!0),U.addEventListener("mousedown",$e,!0));let fe=[];return b&&(Lt(a)&&(fe=Jo(a)),Lt(i)&&(fe=fe.concat(Jo(i))),!Lt(o)&&o&&o.contextElement&&(fe=fe.concat(Jo(o.contextElement)))),fe=fe.filter(me=>me!==U.defaultView?.visualViewport),fe.forEach(me=>{me.addEventListener("scroll",ie,{passive:!0})}),()=>{U.removeEventListener("pointerdown",J,!0),d&&(U.removeEventListener("keydown",G),U.removeEventListener("compositionstart",Z),U.removeEventListener("compositionend",Re)),_&&(U.removeEventListener("click",$e,!0),U.removeEventListener("pointerdown",$e,!0),U.removeEventListener("touchstart",Se,!0),U.removeEventListener("touchmove",Ce,!0),U.removeEventListener("touchend",Ke,!0),U.removeEventListener("mousedown",$e,!0)),fe.forEach(me=>{me.removeEventListener("scroll",ie)}),$.clear(),P.current=!1}},[u,i,o,a,d,_,r,s,b,c,R,I,G,pe,$e,K,Se,Ce,Ke,J,n]),x.useEffect(V,[_,V]);const Fe=x.useMemo(()=>({onKeyDown:G,...h&&{[qq[y]]:$=>{n.setOpen(!1,Xe(Ey,$.nativeEvent))},...y!=="intentional"&&{onClick($){n.setOpen(!1,Xe(Ey,$.nativeEvent))}}}}),[G,n,h,y]),Y=Me($=>{const ie=lr($.nativeEvent);!ft(n.select("floatingElement"),ie)||$.button!==0||(P.current=!0)}),oe=Me($=>{!r||!c||$.button!==0||(P.current=!0)}),ne=x.useMemo(()=>({onKeyDown:G,onPointerDown:Y,onMouseDown:Y,onMouseUp:Y,onClickCapture:Q,onMouseDownCapture($){Q(),oe($)},onPointerDownCapture($){Q(),oe($)},onMouseUpCapture:Q,onTouchEndCapture:Q,onTouchMoveCapture:Q}),[G,Y,Q,oe]);return x.useMemo(()=>c?{reference:Fe,floating:ne,trigger:Fe}:{},[c,Fe,ne])}var Xq=(e,t,n)=>{if(t.length===1&&t[0]===n){let r=!1;try{const i={};e(i)===i&&(r=!0)}catch{}if(r){let i;try{throw new Error}catch(o){({stack:i}=o)}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})}}},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.
21
+ Ensure transformation logic is in the result function, and extraction logic is in the input selectors.`,{stack:i})}}},Zq=(e,t,n)=>{const{memoize:r,memoizeOptions:i}=t,{inputSelectorResults:o,inputSelectorResultsCopy:a}=e,s=r(()=>({}),...i);if(!(s.apply(null,o)===s.apply(null,a))){let c;try{throw new Error}catch(d){({stack:c}=d)}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: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(
24
+ \`createSelector([state => state.todos.map(todo => todo.id)], todoIds => todoIds.length)\``,{arguments:n,firstInputs:o,secondInputs:a,stack:c})}},Qq={inputStabilityCheck:"once",identityFunctionCheck:"once"},Ud=Symbol("NOT_FOUND");function Jq(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function e6(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function t6(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 YS=e=>Array.isArray(e)?e:[e];function n6(e){const t=Array.isArray(e[0])?e[0]:e;return t6(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function XS(e,t){const n=[],{length:r}=e;for(let i=0;i<r;i++)n.push(e[i].apply(null,t));return n}var r6=(e,t)=>{const{identityFunctionCheck:n,inputStabilityCheck:r}={...Qq,...t};return{identityFunctionCheck:{shouldRun:n==="always"||n==="once"&&e,run:Xq},inputStabilityCheck:{shouldRun:r==="always"||r==="once"&&e,run:Zq}}};function i6(e){let t;return{get(n){return t&&e(t.key,n)?t.value:Ud},put(n,r){t={key:n,value:r}},getEntries(){return t?[t]:[]},clear(){t=void 0}}}function o6(e,t){let n=[];function r(s){const u=n.findIndex(c=>t(s,c.key));if(u>-1){const c=n[u];return u>0&&(n.splice(u,1),n.unshift(c)),c.value}return Ud}function i(s,u){r(s)===Ud&&(n.unshift({key:s,value:u}),n.length>e&&n.pop())}function o(){return n}function a(){n=[]}return{get:r,put:i,getEntries:o,clear:a}}var a6=(e,t)=>e===t;function s6(e){return function(n,r){if(n===null||r===null||n.length!==r.length)return!1;const{length:i}=n;for(let o=0;o<i;o++)if(!e(n[o],r[o]))return!1;return!0}}function l6(e,t){const n=typeof t=="object"?t:{equalityCheck:t},{equalityCheck:r=a6,maxSize:i=1,resultEqualityCheck:o}=n,a=s6(r);let s=0;const u=i<=1?i6(a):o6(i,a);function c(){let d=u.get(arguments);if(d===Ud){if(d=e.apply(null,arguments),s++,o){const g=u.getEntries().find(h=>o(h.value,d));g&&(d=g.value,s!==0&&s--)}u.put(arguments,d)}return d}return c.clearCache=()=>{u.clear(),c.resetResultsCount()},c.resultsCount=()=>s,c.resetResultsCount=()=>{s=0},c}var u6=class{constructor(e){this.value=e}deref(){return this.value}},c6=typeof WeakRef<"u"?WeakRef:u6,f6=0,ZS=1;function zf(){return{s:f6,v:void 0,o:null,p:null}}function iT(e,t={}){let n=zf();const{resultEqualityCheck:r}=t;let i,o=0;function a(){let s=n;const{length:u}=arguments;for(let p=0,g=u;p<g;p++){const h=arguments[p];if(typeof h=="function"||typeof h=="object"&&h!==null){let y=s.o;y===null&&(s.o=y=new WeakMap);const b=y.get(h);b===void 0?(s=zf(),y.set(h,s)):s=b}else{let y=s.p;y===null&&(s.p=y=new Map);const b=y.get(h);b===void 0?(s=zf(),y.set(h,s)):s=b}}const c=s;let d;if(s.s===ZS)d=s.v;else if(d=e.apply(null,arguments),o++,r){const p=i?.deref?.()??i;p!=null&&r(p,d)&&(d=p,o!==0&&o--),i=typeof d=="object"&&d!==null||typeof d=="function"?new c6(d):d}return c.s=ZS,c.v=d,d}return a.clearCache=()=>{n=zf(),a.resetResultsCount()},a.resultsCount=()=>o,a.resetResultsCount=()=>{o=0},a}function oT(e,...t){const n=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,r=(...i)=>{let o=0,a=0,s,u={},c=i.pop();typeof c=="object"&&(u=c,c=i.pop()),Jq(c,`createSelector expects an output function after the inputs, but received: [${typeof c}]`);const d={...n,...u},{memoize:p,memoizeOptions:g=[],argsMemoize:h=iT,argsMemoizeOptions:y=[],devModeChecks:b={}}=d,v=YS(g),w=YS(y),C=n6(i),E=p(function(){return o++,c.apply(null,arguments)},...v);let _=!0;const P=h(function(){a++;const I=XS(C,arguments);if(s=E.apply(null,I),process.env.NODE_ENV!=="production"){const{identityFunctionCheck:k,inputStabilityCheck:B}=r6(_,b);if(k.shouldRun&&k.run(c,I,s),B.shouldRun){const L=XS(C,arguments);B.run({inputSelectorResults:I,inputSelectorResultsCopy:L},{memoize:p,memoizeOptions:v},arguments)}_&&(_=!1)}return s},...w);return Object.assign(P,{resultFunc:c,memoizedResultFunc:E,dependencies:C,dependencyRecomputations:()=>a,resetDependencyRecomputations:()=>{a=0},lastResult:()=>s,recomputations:()=>o,resetRecomputations:()=>{o=0},memoize:p,argsMemoize:h})};return Object.assign(r,{withTypes:()=>r}),r}var q=oT(iT),d6=Object.assign((e,t=q)=>{e6(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(o=>e[o]);return t(r,(...o)=>o.reduce((a,s,u)=>(a[n[u]]=s,a),{}))},{withTypes:()=>d6});oT({memoize:l6,memoizeOptions:{maxSize:1,equalityCheck:Object.is}});const Ne=(e,t,n,r,i,o,...a)=>{if(a.length>0)throw new Error(process.env.NODE_ENV!=="production"?"Unsupported number of selectors":pi(1));let s;if(e)s=e;else throw new Error("Missing arguments");return s};var Wf=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function fs(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Hf={exports:{}},_m={};var QS;function p6(){if(QS)return _m;QS=1;var e=j;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,i=e.useEffect,o=e.useLayoutEffect,a=e.useDebugValue;function s(p,g){var h=g(),y=r({inst:{value:h,getSnapshot:g}}),b=y[0].inst,v=y[1];return o(function(){b.value=h,b.getSnapshot=g,u(b)&&v({inst:b})},[p,h,g]),i(function(){return u(b)&&v({inst:b}),p(function(){u(b)&&v({inst:b})})},[p]),a(h),h}function u(p){var g=p.getSnapshot;p=p.value;try{var h=g();return!n(p,h)}catch{return!0}}function c(p,g){return g()}var d=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?c:s;return _m.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:d,_m}var Om={};var JS;function h6(){return JS||(JS=1,process.env.NODE_ENV!=="production"&&(function(){function e(h,y){return h===y&&(h!==0||1/h===1/y)||h!==h&&y!==y}function t(h,y){d||i.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 b=y();if(!p){var v=y();o(b,v)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),p=!0)}v=a({inst:{value:b,getSnapshot:y}});var w=v[0].inst,C=v[1];return u(function(){w.value=b,w.getSnapshot=y,n(w)&&C({inst:w})},[h,b,y]),s(function(){return n(w)&&C({inst:w}),h(function(){n(w)&&C({inst:w})})},[h]),c(b),b}function n(h){var y=h.getSnapshot;h=h.value;try{var b=y();return!o(h,b)}catch{return!0}}function r(h,y){return y()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var i=j,o=typeof Object.is=="function"?Object.is:e,a=i.useState,s=i.useEffect,u=i.useLayoutEffect,c=i.useDebugValue,d=!1,p=!1,g=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?r:t;Om.useSyncExternalStore=i.useSyncExternalStore!==void 0?i.useSyncExternalStore:g,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),Om}var eE;function C0(){return eE||(eE=1,process.env.NODE_ENV==="production"?Hf.exports=p6():Hf.exports=h6()),Hf.exports}var g6=C0(),Uf={exports:{}},Pm={};var tE;function m6(){if(tE)return Pm;tE=1;var e=j,t=C0();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,i=t.useSyncExternalStore,o=e.useRef,a=e.useEffect,s=e.useMemo,u=e.useDebugValue;return Pm.useSyncExternalStoreWithSelector=function(c,d,p,g,h){var y=o(null);if(y.current===null){var b={hasValue:!1,value:null};y.current=b}else b=y.current;y=s(function(){function w(R){if(!C){if(C=!0,E=R,R=g(R),h!==void 0&&b.hasValue){var I=b.value;if(h(I,R))return _=I}return _=R}if(I=_,r(E,R))return I;var k=g(R);return h!==void 0&&h(I,k)?(E=R,I):(E=R,_=k)}var C=!1,E,_,P=p===void 0?null:p;return[function(){return w(d())},P===null?void 0:function(){return w(P())}]},[d,p,g,h]);var v=i(c,y[0],y[1]);return a(function(){b.hasValue=!0,b.value=v},[v]),u(v),v},Pm}var Am={};var nE;function v6(){return nE||(nE=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=j,n=C0(),r=typeof Object.is=="function"?Object.is:e,i=n.useSyncExternalStore,o=t.useRef,a=t.useEffect,s=t.useMemo,u=t.useDebugValue;Am.useSyncExternalStoreWithSelector=function(c,d,p,g,h){var y=o(null);if(y.current===null){var b={hasValue:!1,value:null};y.current=b}else b=y.current;y=s(function(){function w(R){if(!C){if(C=!0,E=R,R=g(R),h!==void 0&&b.hasValue){var I=b.value;if(h(I,R))return _=I}return _=R}if(I=_,r(E,R))return I;var k=g(R);return h!==void 0&&h(I,k)?(E=R,I):(E=R,_=k)}var C=!1,E,_,P=p===void 0?null:p;return[function(){return w(d())},P===null?void 0:function(){return w(P())}]},[d,p,g,h]);var v=i(c,y[0],y[1]);return a(function(){b.hasValue=!0,b.value=v},[v]),u(v),v},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),Am}var rE;function y6(){return rE||(rE=1,process.env.NODE_ENV==="production"?Uf.exports=m6():Uf.exports=v6()),Uf.exports}var aT=y6();const b6=o0(19),x6=b6?C6:S6;function he(e,t,n,r,i){return x6(e,t,n,r,i)}function w6(e,t,n,r,i){const o=x.useCallback(()=>t(e.getSnapshot(),n,r,i),[e,t,n,r,i]);return g6.useSyncExternalStore(e.subscribe,o,o)}function C6(e,t,n,r,i){return w6(e,t,n,r,i)}function S6(e,t,n,r,i){return aT.useSyncExternalStoreWithSelector(e.subscribe,e.getSnapshot,e.getSnapshot,o=>t(o,n,r,i))}class sT{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,i){return he(this,t,n,r,i)}}class E6 extends sT{constructor(t,n={},r){super(t),this.context=n,this.selectors=r}useSyncedValue(t,n){x.useDebugValue(t),je(()=>{this.state[t]!==n&&this.set(t,n)},[t,n])}useSyncedValueWithCleanup(t,n){const r=this;je(()=>(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"){x.useDebugValue(t,a=>Object.keys(a));const i=x.useRef(Object.keys(t)).current,o=Object.keys(t);(i.length!==o.length||i.some((a,s)=>a!==o[s]))&&console.error("ReactStore.useSyncedValues expects the same prop keys on every render. Keys should be stable.")}const r=Object.values(t);je(()=>{n.update(t)},[n,...r])}useControlledProp(t,n){x.useDebugValue(t);const r=n!==void 0;if(je(()=>{r&&!Object.is(this.state[t],n)&&super.setState({...this.state,[t]:n})},[t,n,r]),process.env.NODE_ENV!=="production"){const i=this.controlledValues??=new Map;i.has(t)||i.set(t,r);const o=i.get(t);o!==void 0&&o!==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,i){const o=this.selectors[t];return o(this.state,n,r,i)}useState(t,n,r,i){return x.useDebugValue(t),he(this,this.selectors[t],n,r,i)}useContextCallback(t,n){x.useDebugValue(t);const r=Me(n??Wt);this.context[t]=r}useStateSetter(t){const n=x.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 i=r(this.state);return n(i,i,this),this.subscribe(o=>{const a=r(o);if(!Object.is(i,a)){const s=i;i=a,n(a,s,this)}})}}const _6={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 O6 extends E6{constructor(t){const{nested:n,noEmit:r,onOpenChange:i,triggerElements:o,...a}=t;super({...a,positionReference:a.referenceElement,domReferenceElement:a.referenceElement},{onOpenChange:i,dataRef:{current:{}},events:Q4(),nested:n,noEmit:r,triggerElements:o},_6)}setOpen=(t,n)=>{if((!t||!this.state.open||EI(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 P6{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 lT(e){const{open:t=!1,onOpenChange:n,elements:r={}}=e,i=s0(),o=LI()!=null;if(process.env.NODE_ENV!=="production"){const s=r.reference;s&&!Lt(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=ei(()=>new O6({open:t,onOpenChange:n,referenceElement:r.reference??null,floatingElement:r.floating??null,triggerElements:new P6,floatingId:i,nested:o,noEmit:!1})).current;return je(()=>{const s={open:t,floatingId:i};r.reference!==void 0&&(s.referenceElement=r.reference,s.domReferenceElement=Lt(r.reference)?r.reference:null),r.floating!==void 0&&(s.floatingElement=r.floating),a.update(s)},[t,i,r.reference,r.floating,a]),a.context.onOpenChange=n,a.context.nested=o,a.context.noEmit=!1,a}function A6(e={}){const{nodeId:t,externalTree:n}=e,r=lT(e),i=e.rootContext||r,o={reference:i.useState("referenceElement"),floating:i.useState("floatingElement"),domReference:i.useState("domReferenceElement")},[a,s]=x.useState(null),u=x.useRef(null),c=rh(n);je(()=>{o.domReference&&(u.current=o.domReference)},[o.domReference]);const d=ZI({...e,elements:{...o,...a&&{reference:a}}}),p=x.useCallback(I=>{const k=Lt(I)?{getBoundingClientRect:()=>I.getBoundingClientRect(),getClientRects:()=>I.getClientRects(),contextElement:I}:I;s(k),d.refs.setReference(k)},[d.refs]),[g,h]=x.useState(null),[y,b]=x.useState(null);i.useSyncedValue("referenceElement",g),i.useSyncedValue("domReferenceElement",Lt(g)?g:null),i.useSyncedValue("floatingElement",y);const v=x.useCallback(I=>{(Lt(I)||I===null)&&(u.current=I,h(I)),(Lt(d.refs.reference.current)||d.refs.reference.current===null||I!==null&&!Lt(I))&&d.refs.setReference(I)},[d.refs,h]),w=x.useCallback(I=>{b(I),d.refs.setFloating(I)},[d.refs]),C=x.useMemo(()=>({...d.refs,setReference:v,setFloating:w,setPositionReference:p,domReference:u}),[d.refs,v,w,p]),E=x.useMemo(()=>({...d.elements,domReference:o.domReference}),[d.elements,o.domReference]),_=i.useState("open"),P=i.useState("floatingId"),R=x.useMemo(()=>({...d,dataRef:i.context.dataRef,open:_,onOpenChange:i.setOpen,events:i.context.events,floatingId:P,refs:C,elements:E,nodeId:t,rootStore:i}),[d,C,E,t,i,_,P]);return je(()=>{i.context.dataRef.current.floatingContext=R;const I=c?.nodesRef.current.find(k=>k.id===t);I&&(I.context=R)}),x.useMemo(()=>({...d,context:R,refs:C,elements:E,rootStore:i}),[d,C,E,R,i])}function R6(e=[]){const t=e.map(c=>c?.reference),n=e.map(c=>c?.floating),r=e.map(c=>c?.item),i=e.map(c=>c?.trigger),o=x.useCallback(c=>Gf(c,e,"reference"),t),a=x.useCallback(c=>Gf(c,e,"floating"),n),s=x.useCallback(c=>Gf(c,e,"item"),r),u=x.useCallback(c=>Gf(c,e,"trigger"),i);return x.useMemo(()=>({getReferenceProps:o,getFloatingProps:a,getItemProps:s,getTriggerProps:u}),[o,a,s,u])}function Gf(e,t,n){const r=new Map,i=n==="item",o={};n==="floating"&&(o.tabIndex=-1,o[Ry]="");for(const a in e)i&&e&&(a===xI||a===wI)||(o[a]=e[a]);for(let a=0;a<t.length;a+=1){let s;const u=t[a]?.[n];typeof u=="function"?s=e?u(e):null:s=u,s&&iE(o,s,i,r)}return iE(o,e,i,r),o}function iE(e,t,n,r){for(const i in t){const o=t[i];n&&(i===xI||i===wI)||(i.startsWith("on")?(r.has(i)||r.set(i,[]),typeof o=="function"&&(r.get(i)?.push(o),e[i]=(...a)=>r.get(i)?.map(s=>s(...a)).find(s=>s!==void 0))):e[i]=o)}}const I6="Escape";function oh(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function qf(e,t){return oh(t,e===p0||e===rc,e===ea||e===ta)}function Rm(e,t,n){return oh(t,e===rc,n?e===ea:e===ta)||e==="Enter"||e===" "||e===""}function T6(e,t,n){return oh(t,n?e===ea:e===ta,e===rc)}function k6(e,t,n,r){const i=n?e===ta:e===ea,o=e===p0;return t==="both"||t==="horizontal"&&r&&r>1?e===I6:oh(t,i,o)}function N6(e,t){const n="rootStore"in e?e.rootStore:e,r=n.useState("open"),i=n.useState("floatingElement"),o=n.useState("domReferenceElement"),a=n.context.dataRef,{listRef:s,activeIndex:u,onNavigate:c=()=>{},enabled:d=!0,selectedIndex:p=null,allowEscape:g=!1,loopFocus:h=!1,nested:y=!1,rtl:b=!1,virtual:v=!1,focusItemOnOpen:w="auto",focusItemOnHover:C=!0,openOnArrowKeyDown:E=!0,disabledIndices:_=void 0,orientation:P="vertical",parentOrientation:R,cols:I=1,id:k,resetOnPointerLeave:B=!0,externalTree:L}=t;process.env.NODE_ENV!=="production"&&(g&&(h||console.warn("`useListNavigation` looping must be enabled to allow escaping."),v||console.warn("`useListNavigation` must be virtual to allow escaping.")),P==="vertical"&&I>1&&console.warn("In grid list navigation mode (`cols` > 1), the `orientation` should",'be either "horizontal" or "both".'));const V=Ty(i),D=Xr(V),H=LI(),J=rh(L);je(()=>{a.current.orientation=P},[a,P]);const te=Iy(o),G=x.useRef(w),ee=x.useRef(p??-1),Q=x.useRef(null),pe=x.useRef(!0),K=Me(de=>{c(ee.current===-1?null:ee.current,de)}),Ae=x.useRef(K),Se=x.useRef(!!i),$e=x.useRef(r),we=x.useRef(!1),Ce=x.useRef(!1),ze=Xr(_),Ke=Xr(r),Fe=Xr(p),Y=Xr(B),oe=Me(()=>{function de(ke){v?J?.events.emit("virtualfocus",ke):Nu(ke,{sync:we.current,preventScroll:!0})}const ve=s.current[ee.current],le=Ce.current;ve&&de(ve),(we.current?ke=>ke():requestAnimationFrame)(()=>{const ke=s.current[ee.current]||ve;if(!ke)return;ve||de(ke),$&&(le||!pe.current)&&ke.scrollIntoView?.({block:"nearest",inline:"nearest"})})});je(()=>{d&&(r&&i?(ee.current=p??-1,G.current&&p!=null&&(Ce.current=!0,K())):Se.current&&(ee.current=-1,Ae.current()))},[d,r,i,p,K]),je(()=>{if(d){if(!r){we.current=!1;return}if(i)if(u==null){if(we.current=!1,Fe.current!=null)return;if(Se.current&&(ee.current=-1,oe()),(!$e.current||!Se.current)&&G.current&&(Q.current!=null||G.current===!0&&Q.current==null)){let de=0;const ve=()=>{s.current[0]==null?(de<2&&(de?requestAnimationFrame:queueMicrotask)(ve),de+=1):(ee.current=Q.current==null||Rm(Q.current,P,b)||y?xm(s):TS(s),Q.current=null,K())};ve()}}else Iu(s,u)||(ee.current=u,oe(),Ce.current=!1)}},[d,r,i,u,Fe,y,s,P,b,K,oe,ze]),je(()=>{if(!d||i||!J||v||!Se.current)return;const de=J.nodesRef.current,ve=de.find(ke=>ke.id===H)?.context?.elements.floating,le=eo(Xt(i)),be=de.some(ke=>ke.context&&ft(ke.context.elements.floating,le));ve&&!be&&pe.current&&ve.focus({preventScroll:!0})},[d,i,J,H,v]),je(()=>{Ae.current=K,$e.current=r,Se.current=!!i}),je(()=>{r||(Q.current=null,G.current=w)},[r,w]);const ne=u!=null,$=x.useMemo(()=>{function de(le){if(!Ke.current)return;const be=s.current.indexOf(le.currentTarget);be!==-1&&ee.current!==be&&(ee.current=be,K(le))}return{onFocus(le){we.current=!0,de(le)},onClick:({currentTarget:le})=>le.focus({preventScroll:!0}),onMouseMove(le){we.current=!0,Ce.current=!1,C&&de(le)},onPointerLeave(le){if(!Ke.current||!pe.current||le.pointerType==="touch")return;we.current=!0;const be=le.relatedTarget;!C||s.current.includes(be)||Y.current&&(Nu(null,{sync:!0}),ee.current=-1,K(le),v||D.current?.focus({preventScroll:!0}))}}},[Ke,D,C,s,K,Y,v]),ie=x.useCallback(()=>R??J?.nodesRef.current.find(de=>de.id===H)?.context?.dataRef?.current.orientation,[H,J,R]),Z=Me(de=>{if(pe.current=!1,we.current=!0,de.which===229||!Ke.current&&de.currentTarget===D.current)return;if(y&&k6(de.key,P,b,I)){qf(de.key,ie())||jt(de),n.setOpen(!1,Xe(Ru,de.nativeEvent)),nn(o)&&(v?J?.events.emit("virtualfocus",o):o.focus());return}const ve=ee.current,le=xm(s,_),be=TS(s,_);if(te||(de.key==="Home"&&(jt(de),ee.current=le,K(de)),de.key==="End"&&(jt(de),ee.current=be,K(de))),I>1){const ke=Array.from({length:s.current.length},()=>({width:1,height:1})),et=_4(ke,I),Tt=et.findIndex(ot=>ot!=null&&!Tu(s,ot,_)),Dn=et.reduce((ot,kt,mn)=>kt!=null&&!Tu(s,kt,_)?mn:ot,-1),Ct=et[E4({current:et.map(ot=>ot!=null?s.current[ot]:null)},{event:de,orientation:P,loopFocus:h,rtl:b,cols:I,disabledIndices:P4([...(typeof _!="function"?_:null)||s.current.map((ot,kt)=>Tu(s,kt,_)?kt:void 0),void 0],et),minIndex:Tt,maxIndex:Dn,prevIndex:O4(ee.current>be?le:ee.current,ke,et,I,de.key===rc?"bl":de.key===(b?ea:ta)?"tr":"tl"),stopEvent:!0})];if(Ct!=null&&(ee.current=Ct,K(de)),P==="both")return}if(qf(de.key,P)){if(jt(de),r&&!v&&eo(de.currentTarget.ownerDocument)===de.currentTarget){ee.current=Rm(de.key,P,b)?le:be,K(de);return}Rm(de.key,P,b)?h?ve>=be?g&&ve!==s.current.length?ee.current=-1:(we.current=!1,ee.current=le):ee.current=Vn(s,{startingIndex:ve,disabledIndices:_}):ee.current=Math.min(be,Vn(s,{startingIndex:ve,disabledIndices:_})):h?ve<=le?g&&ve!==-1?ee.current=s.current.length:(we.current=!1,ee.current=be):ee.current=Vn(s,{startingIndex:ve,decrement:!0,disabledIndices:_}):ee.current=Math.max(le,Vn(s,{startingIndex:ve,decrement:!0,disabledIndices:_})),Iu(s,ee.current)&&(ee.current=-1),K(de)}}),Re=x.useMemo(()=>v&&r&&ne&&{"aria-activedescendant":`${k}-${u}`},[v,r,ne,k,u]),U=x.useMemo(()=>({"aria-orientation":P==="both"?void 0:P,...te?{}:Re,onKeyDown(de){if(de.key==="Tab"&&de.shiftKey&&r&&!v){const ve=lr(de.nativeEvent);if(ve&&!ft(D.current,ve))return;jt(de),n.setOpen(!1,Xe(Kp,de.nativeEvent)),nn(o)&&o.focus();return}Z(de)},onPointerMove(){pe.current=!0}}),[Re,Z,D,P,te,n,r,v,o]),fe=x.useMemo(()=>{function de(le){w==="auto"&&CI(le.nativeEvent)&&(G.current=!v)}function ve(le){G.current=w,w==="auto"&&SI(le.nativeEvent)&&(G.current=!0)}return{onKeyDown(le){const be=n.select("open");pe.current=!1;const ke=le.key.startsWith("Arrow"),et=T6(le.key,ie(),b),Tt=qf(le.key,P),Dn=(y?et:Tt)||le.key==="Enter"||le.key.trim()==="";if(v&&be)return Z(le);if(!(!be&&!E&&ke)){if(Dn){const Ct=qf(le.key,ie());Q.current=y&&Ct?null:le.key}if(y){et&&(jt(le),be?(ee.current=xm(s,ze.current),K(le)):n.setOpen(!0,Xe(Ru,le.nativeEvent,le.currentTarget)));return}Tt&&(Fe.current!=null&&(ee.current=Fe.current),jt(le),!be&&E?n.setOpen(!0,Xe(Ru,le.nativeEvent,le.currentTarget)):Z(le),be&&K(le))}},onFocus(le){n.select("open")&&!v&&(ee.current=-1,K(le))},onPointerDown:ve,onPointerEnter:ve,onMouseDown:de,onClick:de}},[Z,ze,w,s,y,K,n,E,P,ie,b,Fe,v]),me=x.useMemo(()=>({...Re,...fe}),[Re,fe]);return x.useMemo(()=>d?{reference:me,floating:U,item:$,trigger:fe}:{},[d,me,U,fe,$])}function M6(e,t){const n="rootStore"in e?e.rootStore:e,r=n.context.dataRef,i=n.useState("open"),{listRef:o,activeIndex:a,onMatch:s,onTypingChange:u,enabled:c=!0,resetMs:d=750,selectedIndex:p=null}=t,g=Xa(),h=x.useRef(""),y=x.useRef(p??a??-1),b=x.useRef(null);je(()=>{!i&&p!==null||(g.clear(),b.current=null,h.current!==""&&(h.current=""))},[i,p,g]),je(()=>{i&&h.current===""&&(y.current=p??a??-1)},[i,p,a]);const v=Me(P=>{P?r.current.typing||(r.current.typing=P,u?.(P)):r.current.typing&&(r.current.typing=P,u?.(P))}),w=Me(P=>{function R(D,H,J){const te=H.find(G=>G?.toLocaleLowerCase().indexOf(J.toLocaleLowerCase())===0);return te?D.indexOf(te):-1}const I=o.current;if(h.current.length>0&&h.current[0]!==" "&&(R(I,I,h.current)===-1?v(!1):P.key===" "&&jt(P)),I==null||P.key.length!==1||P.ctrlKey||P.metaKey||P.altKey)return;i&&P.key!==" "&&(jt(P),v(!0));const k=h.current==="";k&&(y.current=p??a??-1),I.every(D=>D?D[0]?.toLocaleLowerCase()!==D[1]?.toLocaleLowerCase():!0)&&h.current===P.key&&(h.current="",y.current=b.current),h.current+=P.key,g.start(d,()=>{h.current="",y.current=b.current,v(!1)});const L=k?p??a??-1:y.current,V=R(I,[...I.slice((L||0)+1),...I.slice(0,(L||0)+1)],h.current);V!==-1?(s?.(V),b.current=V):P.key!==" "&&(h.current="",v(!1))}),C=Me(P=>{const R=P.relatedTarget,I=n.select("domReferenceElement"),k=n.select("floatingElement"),B=ft(I,R),L=ft(k,R);B||L||(g.clear(),h.current="",y.current=b.current,v(!1))}),E=x.useMemo(()=>({onKeyDown:w,onBlur:C}),[w,C]),_=x.useMemo(()=>({onKeyDown:w,onKeyUp(P){P.key===" "&&v(!1)},onBlur:C}),[w,C,v]);return x.useMemo(()=>c?{reference:E,floating:_}:{},[c,E,_])}function D6(e){const t=x.useRef(""),n=x.useCallback(i=>{i.defaultPrevented||(t.current=i.pointerType,e(i,i.pointerType))},[e]);return{onClick:x.useCallback(i=>{if(i.detail===0){e(i,"keyboard");return}"pointerType"in i?e(i,i.pointerType):e(i,t.current),t.current=""},[e]),onPointerDown:n}}function j6(e){const[t,n]=x.useState(null),r=Me((s,u)=>{e||n(u||(bI?"touch":""))}),i=x.useCallback(()=>{n(null)},[]),{onClick:o,onPointerDown:a}=D6(r);return x.useMemo(()=>({openMethod:t,reset:i,triggerProps:{onClick:o,onPointerDown:a}}),[t,i,o,a])}let S0=(function(e){return e.open="data-open",e.closed="data-closed",e[e.startingStyle=$u.startingStyle]="startingStyle",e[e.endingStyle=$u.endingStyle]="endingStyle",e.anchorHidden="data-anchor-hidden",e.side="data-side",e.align="data-align",e})({}),jy=(function(e){return e.popupOpen="data-popup-open",e.pressed="data-pressed",e})({});const L6={[jy.popupOpen]:""},$6={[jy.popupOpen]:"",[jy.pressed]:""},F6={[S0.open]:""},V6={[S0.closed]:""},B6={[S0.anchorHidden]:""},z6={open(e){return e?L6:null}},W6={open(e){return e?$6:null}},uT={open(e){return e?F6:V6},anchorHidden(e){return e?B6:null}};function H6(e){return o0(19)?e:e?"true":void 0}const cT=x.forwardRef(function(t,n){const{cutout:r,...i}=t;let o;if(r){const a=r?.getBoundingClientRect();o=`polygon(
25
25
  0% 0%,
26
26
  100% 0%,
27
27
  100% 100%,
@@ -32,49 +32,49 @@ Avoid returning a new reference inside your input selector, e.g.
32
32
  ${a.right}px ${a.bottom}px,
33
33
  ${a.right}px ${a.top}px,
34
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
35
+ )`}return O.jsx("div",{ref:n,role:"presentation","data-base-ui-inert":"",...i,style:{position:"fixed",inset:0,userSelect:"none",WebkitUserSelect:"none",clipPath:o}})});process.env.NODE_ENV!=="production"&&(cT.displayName="InternalBackdrop");function U6(e){const t=x.useRef(!0);t.current&&(t.current=!1,e())}const E0=x.createContext(void 0);process.env.NODE_ENV!=="production"&&(E0.displayName="ComboboxRootContext");const _0=x.createContext(void 0);process.env.NODE_ENV!=="production"&&(_0.displayName="ComboboxFloatingContext");const O0=x.createContext(void 0);process.env.NODE_ENV!=="production"&&(O0.displayName="ComboboxDerivedItemsContext");const P0=x.createContext("");process.env.NODE_ENV!=="production"&&(P0.displayName="ComboboxInputValueContext");function Nr(){const e=x.useContext(E0);if(!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: ComboboxRootContext is missing. Combobox parts must be placed within <Combobox.Root>.":pi(22));return e}function ah(){const e=x.useContext(_0);if(!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: ComboboxFloatingContext is missing. Combobox parts must be placed within <Combobox.Root>.":pi(23));return e}function da(){const e=x.useContext(O0);if(!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: ComboboxItemsContext is missing. Combobox parts must be placed within <Combobox.Root>.":pi(24));return e}function A0(){return x.useContext(P0)}const G6=(e,t)=>Object.is(e,t);function Qa(e,t,n){return e==null||t==null?Object.is(e,t):n(e,t)}function q6(e,t,n){return!e||e.length===0?!1:e.some(r=>r===void 0?!1:Qa(t,r,n))}function Gd(e,t,n){return!e||e.length===0?-1:e.findIndex(r=>r===void 0?!1:Qa(r,t,n))}function K6(e,t,n){return e.filter(r=>!Qa(t,r,n))}function Ly(e){if(e==null)return"";if(typeof e=="string")return e;try{return JSON.stringify(e)}catch{return String(e)}}function R0(e){return e!=null&&e.length>0&&typeof e[0]=="object"&&e[0]!=null&&"items"in e[0]}function Y6(e){if(!Array.isArray(e))return e!=null&&!("null"in e);if(R0(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 sr(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 Ly(e)}function uu(e,t){return t&&e!=null?t(e)??"":e&&typeof e=="object"&&"value"in e&&"label"in e?Ly(e.value):Ly(e)}function fT(e,t,n){function r(){return sr(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 i=R0(t)?t.flatMap(o=>o.items):t;if(e==null||typeof e!="object"){const o=i.find(a=>a.value===e);return o&&o.label!=null?o.label:r()}if("value"in e){const o=i.find(a=>a&&a.value===e.value);if(o&&o.label!=null)return o.label}}return r()}function X6(e,t,n){return e.reduce((r,i,o)=>(o>0&&r.push(", "),r.push(O.jsx(x.Fragment,{children:fT(i,t,n)},o)),r),[])}const ge={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?Y6(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(i=>Qa(t,i,n)):Qa(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 oE=(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 Z6={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},Q6={valid(e){return e===null?null:e?{[oE.valid]:""}:{[oE.invalid]:""}}},dT=x.createContext({invalid:void 0,name:void 0,validityData:{state:Z6,errors:[],error:"",value:"",initialValue:null},setValidityData:Wt,disabled:void 0,touched:!1,setTouched:Wt,dirty:!1,setDirty:Wt,filled:!1,setFilled:Wt,focused:!1,setFocused:Wt,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=Xn)=>e,getInputValidationProps:(e=Xn)=>e,inputRef:{current:null},commit:async()=>{}}});process.env.NODE_ENV!=="production"&&(dT.displayName="FieldRootContext");function oc(e=!0){const t=x.useContext(dT);if(t.setValidityData===Wt&&!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: FieldRootContext is missing. Field parts must be placed within <Field.Root>.":pi(28));return t}function J6(e,t){return{...e,state:{...e.state,valid:!t&&e.state.valid}}}const pT=x.createContext({formRef:{current:{fields:new Map}},errors:{},clearErrors:Wt,validationMode:"onSubmit",submitAttemptedRef:{current:!1}});process.env.NODE_ENV!=="production"&&(pT.displayName="FormContext");function hT(){return x.useContext(pT)}function eK(e){const{enabled:t=!0,value:n,id:r,name:i,controlRef:o,commit:a}=e,{formRef:s}=hT(),{invalid:u,markedDirtyRef:c,validityData:d,setValidityData:p}=oc(),g=Me(e.getValue);je(()=>{if(!t)return;let h=n;h===void 0&&(h=g()),d.initialValue===null&&h!==null&&p(y=>({...y,initialValue:h}))},[t,p,n,d.initialValue,g]),je(()=>{!t||!r||s.current.fields.set(r,{getValue:g,name:i,controlRef:o,validityData:J6(d,u),validate(h=!0){let y=n;y===void 0&&(y=g()),c.current=!0,h?la.flushSync(()=>a(y)):a(y)}})},[a,o,t,s,g,r,u,c,i,d,n]),je(()=>{const h=s.current.fields;return()=>{r&&h.delete(r)}},[s,r])}const gT=x.createContext({controlId:void 0,registerControlId:Wt,labelId:void 0,setLabelId:Wt,messageIds:[],setMessageIds:Wt,getDescriptionProps:e=>e});process.env.NODE_ENV!=="production"&&(gT.displayName="LabelableContext");function I0(){return x.useContext(gT)}function mT(e={}){const{id:t,implicit:n=!1,controlRef:r}=e,{controlId:i,registerControlId:o}=I0(),a=l0(t),s=n?i:void 0,u=ei(()=>Symbol("labelable-control")),c=x.useRef(!1),d=x.useRef(t!=null),p=Me(()=>{!c.current||o===Wt||(c.current=!1,o(u.current,void 0))});return je(()=>{if(o===Wt)return;let g;if(n){const h=r?.current;Lt(h)&&h.closest("label")!=null?g=t??null:g=s??a}else if(t!=null)d.current=!0,g=t;else if(d.current)g=a;else{p();return}if(g===void 0){p();return}c.current=!0,o(u.current,g)},[t,r,s,o,n,a,u,p]),x.useEffect(()=>p,[p]),i??a}function tK(e,t){return(n,r)=>{if(n==null)return!1;const i=sr(n,t);return e.contains(i,r)}}function nK(e,t,n){return(r,i)=>{if(r==null)return!1;if(!i)return!0;const o=sr(r,t),a=n!=null?sr(n,t):"";return a&&e.contains(a,i)&&a.length===i.length?!0:e.contains(o,i)}}const aE=new Map;function vT(e){return Array.isArray(e)?e.map(t=>vT(t)).join(","):e==null?"":String(e)}function rK(e={}){const t={usage:"search",sensitivity:"base",ignorePunctuation:!0,...e},n=`${vT(e.locale)}|${JSON.stringify(t)}`,r=aE.get(n);if(r)return r;const i=new Intl.Collator(e.locale,t),o={contains(a,s,u){if(!s)return!0;const c=sr(a,u);for(let d=0;d<=c.length-s.length;d+=1)if(i.compare(c.slice(d,d+s.length),s)===0)return!0;return!1},startsWith(a,s,u){if(!s)return!0;const c=sr(a,u);return i.compare(c.slice(0,s.length),s)===0},endsWith(a,s,u){if(!s)return!0;const c=sr(a,u),d=s.length;return c.length>=d&&i.compare(c.slice(c.length-d),s)===0}};return aE.set(n,o),o}const iK=rK;function Kf(e,t){const n=x.useRef(e),r=Me(t);je(()=>{n.current!==e&&r(n.current)},[e,r]),je(()=>{n.current=e},[e])}const yT=Symbol("none"),Na={value:yT,index:-1};function oK(e){const{id:t,onOpenChangeComplete:n,defaultSelectedValue:r=null,selectedValue:i,onSelectedValueChange:o,defaultInputValue:a,inputValue:s,selectionMode:u="none",onItemHighlighted:c,name:d,disabled:p=!1,readOnly:g=!1,required:h=!1,inputRef:y,grid:b=!1,items:v,filteredItems:w,filter:C,openOnInputClick:E=!0,autoHighlight:_=!1,keepHighlight:P=!1,highlightItemOnHover:R=!0,loopFocus:I=!0,itemToStringLabel:k,itemToStringValue:B,isItemEqualToValue:L=G6,virtualized:V=!1,inline:D=!1,fillInputOnItemPress:H=!0,modal:J=!1,limit:te=-1,autoComplete:G="list",formAutoComplete:ee,locale:Q,submitOnItemClick:pe=!1}=e,{clearErrors:K}=hT(),{setDirty:Ae,validityData:Se,shouldValidateOnChange:$e,setFilled:we,name:Ce,disabled:ze,setTouched:Ke,setFocused:Fe,validationMode:Y,validation:oe}=oc(),ne=mT({id:t}),$=iK({locale:Q}),[ie,Z]=x.useState(!1),[Re,U]=x.useState(null),fe=x.useRef([]),me=x.useRef([]),de=x.useRef(null),ve=x.useRef(null),le=x.useRef(null),be=x.useRef(!0),ke=x.useRef(!1),et=x.useRef(null),Tt=x.useRef(null),Dn=x.useRef(null),Ct=x.useRef(Na),ot=x.useRef(null),kt=x.useRef([]),mn=x.useRef([]),on=ze||p,_n=Ce??d,Qt=u==="multiple",vn=u==="single",hr=s!==void 0||a!==void 0,Hn=v!==void 0,pt=w!==void 0;let ht;_==="always"?ht="always":ht=_?"input-change":!1;const[Ve,jn]=mm({controlled:i,default:Qt?r??jf:r,name:"Combobox",state:"selectedValue"}),On=x.useMemo(()=>C===null?()=>!0:C!==void 0?C:vn&&!ie?nK($,k,Ve):tK($,k),[C,vn,Ve,ie,$,k]),mi=ei(()=>hr?a??"":vn?sr(Ve,k):"").current,[Jt,ma]=mm({controlled:s,default:mi,name:"Combobox",state:"inputValue"}),[$t,Dl]=mm({controlled:e.open,default:e.defaultOpen,name:"Combobox",state:"open"}),nr=R0(v),yn=Re??(Jt===""?"":String(Jt).trim()),va=vn?sr(Ve,k):"",Ao=vn&&!ie&&yn!==""&&va!==""&&va.length===yn.length&&$.contains(va,yn),Dr=Ao?"":yn,vs=Hn&&pt&&Ao,jr=x.useMemo(()=>v?nr?v.flatMap(xe=>xe.items):v:jf,[v,nr]),gr=x.useMemo(()=>{if(w&&!vs)return w;if(!v)return jf;if(nr){const De=v,Ze=[];let Bt=0;for(const en of De){if(te>-1&&Bt>=te)break;const tn=Dr===""?en.items:en.items.filter(Rs=>On(Rs,Dr,k));if(tn.length===0)continue;const bi=te>-1?te-Bt:1/0,Bi=tn.slice(0,bi);if(Bi.length>0){const Rs={...en,items:Bi};Ze.push(Rs),Bt+=Bi.length}}return Ze}if(Dr==="")return te>-1?jr.slice(0,te):jr;const xe=[];for(const De of jr){if(te>-1&&xe.length>=te)break;On(De,Dr,k)&&xe.push(De)}return xe},[w,vs,v,nr,Dr,te,On,k,jr]),Un=x.useMemo(()=>nr?gr.flatMap(De=>De.items):gr,[gr,nr]),rt=ei(()=>new sT({id:ne,selectedValue:Ve,open:$t,filter:On,query:yn,items:v,selectionMode:u,listRef:fe,labelsRef:me,popupRef:de,emptyRef:le,inputRef:ve,keyboardActiveRef:be,chipsContainerRef:et,clearRef:Tt,valuesRef:kt,allValuesRef:mn,selectionEventRef:Dn,name:_n,disabled:on,readOnly:g,required:h,grid:b,isGrouped:nr,virtualized:V,openOnInputClick:E,itemToStringLabel:k,isItemEqualToValue:L,modal:J,autoHighlight:ht,submitOnItemClick:pe,hasInputValue:hr,mounted:!1,forceMounted:!1,transitionStatus:"idle",inline:D,activeIndex:null,selectedIndex:null,popupProps:{},inputProps:{},triggerProps:{},positionerElement:null,listElement:null,triggerElement:null,inputElement:null,popupSide:null,openMethod:null,inputInsidePopup:!0,onOpenChangeComplete:n||Wt,setOpen:Wt,setInputValue:Wt,setSelectedValue:Wt,setIndices:Wt,onItemHighlighted:Wt,handleSelection:Wt,getItemProps:()=>Xn,forceMount:Wt,requestSubmit:Wt})).current,vi=u==="none"?Jt:Ve,og=x.useMemo(()=>u==="none"?vi:Array.isArray(Ve)?Ve.map(xe=>uu(xe,B)):uu(Ve,B),[vi,B,u,Ve]),jl=Me(c),Ll=Me(n),ys=he(rt,ge.activeIndex),Nc=he(rt,ge.selectedIndex),bs=he(rt,ge.positionerElement),Mc=he(rt,ge.listElement),ya=he(rt,ge.triggerElement),$l=he(rt,ge.inputElement),mr=he(rt,ge.inline),yi=he(rt,ge.inputInsidePopup),xs=Xr(ya),{mounted:Dc,setMounted:ws,transitionStatus:Fl}=dI($t),{openMethod:jc,triggerProps:Vl,reset:Lc}=j6($t);eK({id:ne,name:_n,commit:oe.commit,value:vi,controlRef:yi?xs:ve,getValue:()=>og});const ba=Me(()=>{v?me.current=Un.map(xe=>sr(xe,k)):rt.set("forceMounted",!0)}),$c=x.useRef(Ve);je(()=>{Ve!==$c.current&&ba()},[ba,Ve]);const vr=Me(xe=>{rt.update(xe);const De=xe.type||"none";if(xe.activeIndex!==void 0)if(xe.activeIndex===null)Ct.current!==Na&&(Ct.current=Na,jl(void 0,su(De,void 0,{index:-1})));else{const Ze=kt.current[xe.activeIndex];Ct.current={value:Ze,index:xe.activeIndex},jl(Ze,su(De,void 0,{index:xe.activeIndex}))}}),Lr=Me((xe,De)=>{if(ke.current=De.reason===Uo,e.onInputValueChange?.(xe,De),!De.isCanceled){if(De.reason===Js){const Ze=De.event,Bt=Ze.inputType;if(Ze.type==="compositionend"||Bt!=null&&Bt!==""&&Bt!=="insertReplacementText"){const tn=xe.trim()!=="";tn&&Z(!0),ot.current={hasQuery:tn},tn&&ht&&rt.state.activeIndex==null&&rt.set("activeIndex",0)}}ma(xe)}}),xa=Me((xe,De)=>{if($t!==xe&&(De.reason==="escape-key"&&Hn&&Un.length===0&&!rt.state.emptyRef.current&&De.allowPropagation(),e.onOpenChange?.(xe,De),!De.isCanceled&&(!xe&&ie&&(vn?(mr||U(yn),yn===""&&Z(!1)):Qt&&(mr||yi?vr({activeIndex:null}):U(yn),Lr("",Xe(Uo,De.event)))),Dl(xe),!xe&&yi&&(De.reason===Kp||De.reason===a0)&&(Ke(!0),Fe(!1),Y==="onBlur")))){const Ze=u==="none"?Jt:Ve;oe.commit(Ze)}}),Cs=Me((xe,De)=>{if(o?.(xe,De),De.isCanceled)return;jn(xe),(u==="none"&&de.current&&H||vn&&!rt.state.inputInsidePopup)&&Lr(sr(xe,k),Xe(De.reason,De.event)),vn&&xe!=null&&De.reason!==Js&&ie&&!mr&&U(yn)}),Fc=Me((xe,De)=>{let Ze=De;if(Ze===void 0){if(ys===null)return;Ze=kt.current[ys]}const Bt=lr(xe),en=Dn.current??xe;Dn.current=null;const tn=Xe(UG,en),bi=Bt?.closest("a")?.getAttribute("href");if(bi){bi.startsWith("#")&&xa(!1,tn);return}if(Qt){const Bi=Array.isArray(Ve)?Ve:[],lg=q6(Bi,Ze,rt.state.isItemEqualToValue)?K6(Bi,Ze,rt.state.isItemEqualToValue):[...Bi,Ze];if(Cs(lg,tn),!(ve.current?ve.current.value.trim()!=="":!1))return;rt.state.inputInsidePopup?Lr("",Xe(Uo,tn.event)):xa(!1,tn)}else Cs(Ze,tn),xa(!1,tn)}),Ss=Me(()=>{if(!rt.state.submitOnItemClick)return;const xe=rt.state.inputElement?.form;xe&&typeof xe.requestSubmit=="function"&&xe.requestSubmit()}),Es=Me(()=>{if(ws(!1),Ll?.(!1),Z(!1),Lc(),U(null),vr(u==="none"?{activeIndex:null,selectedIndex:null}:{activeIndex:null}),Qt&&ve.current&&ve.current.value!==""&&!ke.current&&Lr("",Xe(Uo)),vn)if(rt.state.inputInsidePopup)ve.current&&ve.current.value!==""&&Lr("",Xe(Uo));else{const xe=sr(Ve,k);ve.current&&ve.current.value!==xe&&Lr(xe,Xe(xe===""?Uo:Yr))}}),Bl=x.useMemo(()=>mr&&bs?{current:bs.closest('[role="dialog"]')}:de,[mr,bs]);v0({enabled:!e.actionsRef,open:$t,ref:Bl,onComplete(){$t||Es()}}),x.useImperativeHandle(e.actionsRef,()=>({unmount:Es}),[Es]),je(function(){if($t||u==="none")return;const De=v?jr:mn.current;if(Qt){const Ze=Array.isArray(Ve)?Ve:[],Bt=Ze[Ze.length-1],en=Gd(De,Bt,L);vr({selectedIndex:en===-1?null:en})}else{const Ze=Gd(De,Ve,L);vr({selectedIndex:Ze===-1?null:Ze})}},[$t,Ve,v,u,jr,Qt,L,vr]),je(()=>{v&&(kt.current=Un,fe.current.length=Un.length)},[v,Un]),je(()=>{const xe=ot.current;if(xe&&(xe.hasQuery?ht&&rt.set("activeIndex",0):ht==="always"&&rt.set("activeIndex",0),ot.current=null),!$t&&!mr)return;const Ze=Hn||pt?Un:kt.current,Bt=rt.state.activeIndex;if(Bt==null){if(ht==="always"&&Ze.length>0){rt.set("activeIndex",0);return}Ct.current!==Na&&(Ct.current=Na,rt.state.onItemHighlighted(void 0,su(Yr,void 0,{index:-1})));return}if(Bt>=Ze.length){Ct.current!==Na&&(Ct.current=Na,rt.state.onItemHighlighted(void 0,su(Yr,void 0,{index:-1}))),rt.set("activeIndex",null);return}const en=Ze[Bt],tn=Ct.current.value,bi=tn!==yT&&Qa(en,tn,rt.state.isItemEqualToValue);(Ct.current.index!==Bt||!bi)&&(Ct.current={value:en,index:Bt},rt.state.onItemHighlighted(en,su(Yr,void 0,{index:Bt})))},[ys,ht,pt,Hn,Un,mr,$t,rt]),je(()=>{if(u==="none"){we(String(Jt)!=="");return}we(Qt?Array.isArray(Ve)&&Ve.length>0:Ve!=null)},[we,u,Jt,Ve,Qt]),x.useEffect(()=>{Hn&&ht&&Un.length===0&&vr({activeIndex:null})},[Hn,ht,Un.length,vr]),Kf(yn,()=>{!$t||yn===""||yn===String(mi)||Z(!0)}),Kf(Ve,()=>{if(u!=="none"&&(K(_n),Ae(Ve!==Se.initialValue),$e()?oe.commit(Ve):oe.commit(Ve,!0),vn&&!hr&&!yi)){const xe=sr(Ve,k);Jt!==xe&&Lr(xe,Xe(Yr))}}),Kf(Jt,()=>{u==="none"&&(K(_n),Ae(Jt!==Se.initialValue),$e()?oe.commit(Jt):oe.commit(Jt,!0))}),Kf(v,()=>{if(!vn||hr||yi||ie)return;const xe=sr(Ve,k);Jt!==xe&&Lr(xe,Xe(Yr))});const _s=lT({open:mr?!0:$t,onOpenChange:xa,elements:{reference:yi?ya:$l,floating:bs}});let Os,Ro;mr||(Os=b?"grid":"listbox",Ro=$t?"true":"false");const Vc=x.useMemo(()=>{const xe=$l?.tagName==="INPUT",De=xe||$t,Ze=xe?{autoComplete:"off",spellCheck:"false",autoCorrect:"off",autoCapitalize:"none"}:{};return De&&(Ze.role="combobox",Ze["aria-expanded"]=Ro,Ze["aria-haspopup"]=Os,Ze["aria-controls"]=$t?Mc?.id:void 0,Ze["aria-autocomplete"]=G),{reference:Ze,floating:{role:"presentation"}}},[$l,$t,Ro,Os,Mc?.id,G]),ag=zI(_s,{enabled:!g&&!on&&E,event:"mousedown-only",toggle:!1,touchOpenDelay:yi?0:50,reason:qG}),Bc=Yq(_s,{enabled:!g&&!on&&!mr,outsidePressEvent:{mouse:"sloppy",touch:"intentional"},bubbles:mr?!0:void 0,outsidePress(xe){const De=lr(xe);return!ft(ya,De)&&!ft(Tt.current,De)&&!ft(et.current,De)}}),zc=N6(_s,{enabled:!g&&!on,id:ne,listRef:fe,activeIndex:ys,selectedIndex:Nc,virtual:!0,loopFocus:I,allowEscape:I&&!ht,focusItemOnOpen:ie||u==="none"&&!ht?!1:"auto",focusItemOnHover:R,resetOnPointerLeave:!P,cols:b?2:1,orientation:b?"horizontal":void 0,disabledIndices:jf,onNavigate(xe,De){!De&&!$t||Fl==="ending"||vr(De?{activeIndex:xe,type:be.current?"keyboard":"pointer"}:{activeIndex:xe})}}),{getReferenceProps:wa,getFloatingProps:zl,getItemProps:Ps}=R6([Vc,ag,Bc,zc]);U6(()=>{rt.update({inline:D,popupProps:zl(),inputProps:wa(),triggerProps:Vl,getItemProps:Ps,setOpen:xa,setInputValue:Lr,setSelectedValue:Cs,setIndices:vr,onItemHighlighted:jl,handleSelection:Fc,forceMount:ba,requestSubmit:Ss})}),je(()=>{rt.update({id:ne,selectedValue:Ve,open:$t,mounted:Dc,transitionStatus:Fl,items:v,inline:D,popupProps:zl(),inputProps:wa(),triggerProps:Vl,openMethod:jc,getItemProps:Ps,selectionMode:u,name:_n,disabled:on,readOnly:g,required:h,grid:b,isGrouped:nr,virtualized:V,onOpenChangeComplete:Ll,openOnInputClick:E,itemToStringLabel:k,modal:J,autoHighlight:ht,isItemEqualToValue:L,submitOnItemClick:pe,hasInputValue:hr,requestSubmit:Ss})},[rt,ne,Ve,$t,Dc,Fl,v,zl,wa,Ps,jc,Vl,u,_n,on,g,h,oe,b,nr,V,Ll,E,k,J,L,pe,hr,D,Ss,ht]);const Wl=Lu(y,oe.inputRef),Hl=x.useMemo(()=>({query:yn,hasItems:Hn,filteredItems:gr,flatFilteredItems:Un}),[yn,Hn,gr,Un]),Io=x.useMemo(()=>Array.isArray(vi)?"":uu(vi,B),[vi,B]),Wc=Qt&&Array.isArray(Ve)&&Ve.length>0,As=Qt||u==="none"?void 0:_n,sg=x.useMemo(()=>!Qt||!Array.isArray(Ve)||!_n?null:Ve.map(xe=>{const De=uu(xe,B);return O.jsx("input",{type:"hidden",name:_n,value:De},De)}),[Qt,Ve,_n,B]),Hc=O.jsxs(x.Fragment,{children:[e.children,O.jsx("input",{...oe.getInputValidationProps({onFocus(){if(yi){ya?.focus();return}(ve.current||ya)?.focus()},onChange(xe){if(xe.nativeEvent.defaultPrevented)return;const De=xe.target.value,Ze=Xe(Yr,xe.nativeEvent);function Bt(){if(Qt)return;if(u==="none"){Ae(De!==Se.initialValue),Lr(De,Ze),$e()&&oe.commit(De);return}const en=kt.current.find(tn=>uu(tn,B).toLowerCase()===De.toLowerCase());en!=null&&(Ae(en!==Se.initialValue),Cs?.(en,Ze),$e()&&oe.commit(en))}v?Bt():(ba(),queueMicrotask(Bt))}}),id:ne&&As==null?`${ne}-hidden-input`:void 0,name:As,autoComplete:ee,disabled:on,required:h&&!Wc,readOnly:g,value:Io,ref:Wl,style:As?J4:y0,tabIndex:-1,"aria-hidden":!0}),sg]});return O.jsx(E0.Provider,{value:rt,children:O.jsx(_0.Provider,{value:_s,children:O.jsx(O0.Provider,{value:Hl,children:O.jsx(P0.Provider,{value:Jt,children:Hc})})})})}const bT={...W6,...Q6,popupSide:e=>e?{"data-popup-side":e}:null,listEmpty:e=>e?{"data-list-empty":""}:null};function aK(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 o=parseFloat(n.width)||0,a=parseFloat(n.height)||0,s=parseFloat(r.width)||0,u=parseFloat(r.height)||0,c=Math.max(t.width,o,s),d=Math.max(t.height,a,u),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 Yf=2,xT=x.forwardRef(function(t,n){const{render:r,className:i,nativeButton:o=!0,disabled:a=!1,id:s,...u}=t,{state:c,disabled:d,setTouched:p,setFocused:g,validationMode:h,validation:y}=oc(),{labelId:b}=I0(),v=Nr(),{filteredItems:w}=da(),C=he(v,ge.selectionMode),E=he(v,ge.disabled),_=he(v,ge.readOnly),P=he(v,ge.required),R=he(v,ge.mounted),I=he(v,ge.popupSide),k=he(v,ge.positionerElement),B=he(v,ge.listElement),L=he(v,ge.triggerProps),V=he(v,ge.triggerElement),D=he(v,ge.inputInsidePopup),H=he(v,ge.id),J=he(v,ge.open),te=he(v,ge.selectedValue),G=he(v,ge.activeIndex),ee=he(v,ge.selectedIndex),Q=he(v,ge.hasSelectedValue),pe=ah(),K=A0(),Ae=Xa(),Se=d||E||a,$e=w.length===0,we=R&&k?I:null;mT({id:D?s:void 0});const Ce=D?s??H:s,ze=x.useRef("");function Ke(U){ze.current=U.pointerType}const Fe=pe.useState("domReferenceElement");x.useEffect(()=>{D&&V&&V!==Fe&&pe.set("domReferenceElement",V)},[V,Fe,pe,D]);const{reference:Y}=M6(pe,{enabled:!J&&!_&&!E&&C==="single",listRef:v.state.labelsRef,activeIndex:G,selectedIndex:ee,onMatch(U){const fe=v.state.valuesRef.current[U];fe!==void 0&&v.state.setSelectedValue(fe,Xe("none"))}}),{reference:oe}=zI(pe,{enabled:!_&&!E,event:"mousedown"}),{buttonRef:ne,getButtonProps:$}=Jp({native:o,disabled:Se}),ie={...c,open:J,disabled:Se,popupSide:we,listEmpty:$e,placeholder:!Q},Z=Me(U=>{v.set("triggerElement",U)});return er("button",t,{ref:[n,ne,Z],state:ie,props:[L,oe,Y,{id:Ce,tabIndex:D?0:-1,role:D?"combobox":void 0,"aria-expanded":J?"true":"false","aria-haspopup":D?"dialog":"listbox","aria-controls":J?B?.id:void 0,"aria-required":D&&P||void 0,"aria-labelledby":b,onPointerDown:Ke,onPointerEnter:Ke,onFocus(){g(!0),!(Se||_)&&Ae.start(0,v.state.forceMount)},onBlur(U){if(!ft(k,U.relatedTarget)&&(p(!0),g(!1),h==="onBlur")){const fe=C==="none"?K:te;y.commit(fe)}},onMouseDown(U){if(Se||_||(D||pe.set("domReferenceElement",U.currentTarget),v.state.forceMount(),ze.current!=="touch"&&(v.state.inputRef.current?.focus(),D||U.preventDefault()),J))return;const fe=Xt(U.currentTarget);function me(de){if(!V)return;const ve=lr(de),le=v.state.positionerElement,be=v.state.listElement;if(ft(V,ve)||ft(le,ve)||ft(be,ve)||ve===V)return;const ke=aK(V),et=de.clientX>=ke.left-Yf&&de.clientX<=ke.right+Yf,Tt=de.clientY>=ke.top-Yf&&de.clientY<=ke.bottom+Yf;et&&Tt||v.state.setOpen(!1,Xe("cancel-open",de))}D&&fe.addEventListener("mouseup",me,{once:!0})},onKeyDown(U){Se||_||(U.key==="ArrowDown"||U.key==="ArrowUp")&&(jt(U),v.state.setOpen(!0,Xe(Ru,U.nativeEvent)),v.state.inputRef.current?.focus())}},y?y.getValidationProps(u):u,$],stateAttributesMapping:bT})});process.env.NODE_ENV!=="production"&&(xT.displayName="ComboboxTrigger");const T0=x.createContext(void 0);process.env.NODE_ENV!=="production"&&(T0.displayName="ComboboxChipsContext");function wT(){return x.useContext(T0)}const k0=x.createContext(void 0);process.env.NODE_ENV!=="production"&&(k0.displayName="ComboboxPositionerContext");function N0(e){const t=x.useContext(k0);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":pi(21));return t}const M0=x.forwardRef(function(t,n){const{render:r,className:i,disabled:o=!1,id:a,...s}=t,{state:u,disabled:c,setTouched:d,setFocused:p,validationMode:g,validation:h}=oc(),{labelId:y}=I0(),b=wT(),w=!!N0(!0),C=Nr(),{filteredItems:E}=da(),_=A0(),P=rI(),R=he(C,ge.required),I=he(C,ge.disabled),k=he(C,ge.readOnly),B=he(C,ge.name),L=he(C,ge.selectionMode),V=he(C,ge.autoHighlight),D=he(C,ge.inputProps),H=he(C,ge.triggerProps),J=he(C,ge.open),te=he(C,ge.mounted),G=he(C,ge.selectedValue),ee=he(C,ge.popupSide),Q=he(C,ge.positionerElement),pe=he(C,ge.id),K=he(C,ge.inline),Ae=!!V,Se=te&&Q?ee:null,$e=c||I||o,we=E.length===0,ze=l0(a??(w||K?void 0:pe)),[Ke,Fe]=x.useState(null),Y=x.useRef(!1),oe=x.useRef(null),ne=x.useRef(!1),$=Me(U=>{const fe=w||C.state.inline;fe&&!C.state.hasInputValue&&C.state.setInputValue("",Xe(Yr)),C.update({inputElement:U,inputInsidePopup:fe})}),ie={...u,open:J,disabled:$e,readOnly:k,popupSide:Se,listEmpty:we};function Z(U){if(!b)return;let fe;const{highlightedChipIndex:me}=b;if(me!==void 0){if(U.key==="ArrowLeft")U.preventDefault(),me>0?fe=me-1:fe=void 0;else if(U.key==="ArrowRight")U.preventDefault(),me<G.length-1?fe=me+1:fe=void 0;else if(U.key==="Backspace"||U.key==="Delete"){U.preventDefault();const de=me>=G.length-1?G.length-2:me;fe=de>=0?de:void 0,C.state.setIndices({activeIndex:null,selectedIndex:null,type:"keyboard"})}return fe}return U.key==="ArrowLeft"&&(U.currentTarget.selectionStart??0)===0&&G.length>0?(U.preventDefault(),fe=Math.max(G.length-1,0)):U.key==="Backspace"&&U.currentTarget.value===""&&G.length>0&&(C.state.setIndices({activeIndex:null,selectedIndex:null,type:"keyboard"}),U.preventDefault()),fe}return er("input",t,{state:ie,ref:[n,C.state.inputRef,$],props:[D,H,{type:"text",value:t.value??Ke??_,"aria-readonly":k||void 0,"aria-required":R||void 0,"aria-labelledby":y,disabled:$e,readOnly:k,required:L==="none"?R:void 0,...L==="none"&&B&&{name:B},id:ze,onFocus(){if(p(!0),!K||!ne.current)return;ne.current=!1;const U=oe.current;U==null||!Object.hasOwn(C.state.valuesRef.current,U)||C.state.setIndices({activeIndex:U})},onBlur(){d(!0),p(!1);const U=C.state.activeIndex;if(K&&U!==null&&V!=="always"&&(oe.current=U,ne.current=!0,C.state.setIndices({activeIndex:null})),g==="onBlur"){const fe=L==="none"?_:G;h.commit(fe)}},onCompositionStart(U){Md||(Y.current=!0,Fe(U.currentTarget.value))},onCompositionEnd(U){Y.current=!1;const fe=U.currentTarget.value;Fe(null),C.state.setInputValue(fe,Xe(Js,U.nativeEvent))},onChange(U){const fe=U.nativeEvent.inputType,me=!fe||fe==="insertReplacementText",de=Y.current||!me;if(Y.current){const ke=U.currentTarget.value;Fe(ke),ke===""&&!C.state.openOnInputClick&&!C.state.inputInsidePopup&&C.state.setOpen(!1,Xe(Uo,U.nativeEvent));const et=ke.trim(),Tt=Ae&&et!=="";!k&&!$e&&et&&de&&(C.state.setOpen(!0,Xe(Js,U.nativeEvent)),Ae||C.state.setIndices({activeIndex:null,selectedIndex:null,type:C.state.keyboardActiveRef.current?"keyboard":"pointer"})),J&&C.state.activeIndex!==null&&!Tt&&C.state.setIndices({activeIndex:null,selectedIndex:null,type:C.state.keyboardActiveRef.current?"keyboard":"pointer"});return}C.state.setInputValue(U.currentTarget.value,Xe(Js,U.nativeEvent));const ve=U.currentTarget.value==="",le=Xe(Uo,U.nativeEvent);ve&&!C.state.inputInsidePopup&&(L==="single"&&C.state.setSelectedValue(null,le),C.state.openOnInputClick||C.state.setOpen(!1,le));const be=U.currentTarget.value.trim();!k&&!$e&&be&&de&&(C.state.setOpen(!0,Xe(Js,U.nativeEvent)),Ae||C.state.setIndices({activeIndex:null,selectedIndex:null,type:C.state.keyboardActiveRef.current?"keyboard":"pointer"})),J&&C.state.activeIndex!==null&&!Ae&&C.state.setIndices({activeIndex:null,selectedIndex:null,type:C.state.keyboardActiveRef.current?"keyboard":"pointer"})},onKeyDown(U){if($e||k||U.ctrlKey||U.shiftKey||U.altKey||U.metaKey)return;C.state.keyboardActiveRef.current=!0;const fe=U.currentTarget,me=fe.scrollWidth-fe.clientWidth,de=P==="rtl";if(U.key==="Home"){jt(U);const be=OS&&de?fe.value.length:0;fe.setSelectionRange(be,be),fe.scrollLeft=0;return}if(U.key==="End"){jt(U);const be=OS&&de?0:fe.value.length;fe.setSelectionRange(be,be),fe.scrollLeft=de?-me:me;return}if(!te&&U.key==="Escape"){const be=L==="multiple"&&Array.isArray(G)?G.length===0:G===null,ke=Xe(uI,U.nativeEvent),et=L==="multiple"?[]:null;C.state.setInputValue("",ke),C.state.setSelectedValue(et,ke),!be&&!C.state.inline&&!ke.isPropagationAllowed&&U.stopPropagation();return}if(b&&U.key==="Backspace"&&fe.value===""&&b.highlightedChipIndex===void 0&&Array.isArray(G)&&G.length>0){const be=G.slice(0,-1);C.state.setIndices({activeIndex:null,selectedIndex:null,type:C.state.keyboardActiveRef.current?"keyboard":"pointer"}),C.state.setSelectedValue(be,Xe(Yr,U.nativeEvent));return}const ve=b?.highlightedChipIndex!==void 0,le=Z(U);if(b?.setHighlightedChipIndex(le),le!==void 0?b?.chipsRef.current[le]?.focus():ve&&C.state.inputRef.current?.focus(),U.which!==229&&U.key==="Enter"&&J){const be=C.state.activeIndex,ke=U.nativeEvent;if(be===null){C.state.setOpen(!1,Xe(Yr,ke));return}jt(U);const et=C.state.listRef.current[be];et&&(C.state.selectionEventRef.current=ke,et.click(),C.state.selectionEventRef.current=null)}},onPointerMove(){C.state.keyboardActiveRef.current=!1},onPointerDown(){C.state.keyboardActiveRef.current=!1}},h?h.getValidationProps(s):s],stateAttributesMapping:bT})});process.env.NODE_ENV!=="production"&&(M0.displayName="ComboboxInput");const sK={...fI,...z6},CT=x.forwardRef(function(t,n){const{render:r,className:i,disabled:o=!1,nativeButton:a=!0,keepMounted:s=!1,...u}=t,{disabled:c}=oc(),d=Nr(),p=he(d,ge.selectionMode),g=he(d,ge.disabled),h=he(d,ge.readOnly),y=he(d,ge.open),b=he(d,ge.selectedValue),v=he(d,ge.hasSelectionChips),w=A0();let C=!1;p==="none"?C=w!=="":p==="single"?C=b!=null:C=v;const E=c||g||o,{buttonRef:_,getButtonProps:P}=Jp({native:a,disabled:E}),{mounted:R,transitionStatus:I,setMounted:k}=dI(C),B={disabled:E,open:y,transitionStatus:I};v0({open:C,ref:d.state.clearRef,onComplete(){C||k(!1)}});const L=er("button",t,{state:B,ref:[n,_,d.state.clearRef],props:[{tabIndex:-1,children:"x",onMouseDown(D){D.preventDefault()},onClick(D){if(E||h)return;const H=d.state.keyboardActiveRef;d.state.setInputValue("",Xe(wS,D.nativeEvent)),p!=="none"?(d.state.setSelectedValue(Array.isArray(b)?[]:null,Xe(wS,D.nativeEvent)),d.state.setIndices({activeIndex:null,selectedIndex:null,type:H.current?"keyboard":"pointer"})):d.state.setIndices({activeIndex:null,type:H.current?"keyboard":"pointer"}),d.state.inputRef.current?.focus()}},u,P],stateAttributesMapping:sK});return s||R?L:null});process.env.NODE_ENV!=="production"&&(CT.displayName="ComboboxClear");const D0=x.createContext(null);process.env.NODE_ENV!=="production"&&(D0.displayName="GroupCollectionContext");function lK(){return x.useContext(D0)}function uK(e){const{children:t,items:n}=e,r=x.useMemo(()=>({items:n}),[n]);return O.jsx(D0.Provider,{value:r,children:t})}function ST(e){const{children:t}=e,{filteredItems:n}=da(),r=lK(),i=r?r.items:n;return i?O.jsx(x.Fragment,{children:i.map(t)}):null}const ET=x.forwardRef(function(t,n){var r;const{render:i,className:o,children:a,...s}=t,u=Nr(),c=ah(),d=!!N0(!0),{filteredItems:p}=da(),g=he(u,ge.items),h=he(u,ge.labelsRef),y=he(u,ge.listRef),b=he(u,ge.selectionMode),v=he(u,ge.grid),w=he(u,ge.popupProps),C=he(u,ge.disabled),E=he(u,ge.readOnly),_=he(u,ge.virtualized),P=b==="multiple",R=p.length===0,I=Me(H=>{u.set("positionerElement",H)}),k=Me(H=>{u.set("listElement",H)}),B=x.useMemo(()=>typeof a=="function"?r||(r=O.jsx(ST,{children:a})):a,[a]),L={empty:R},V=c.useState("floatingId"),D=er("div",t,{state:L,ref:[n,k,d?null:I],props:[w,{children:B,tabIndex:-1,id:V,role:v?"grid":"listbox","aria-multiselectable":P?"true":void 0,onKeyDown(H){if(!(C||E)&&H.key==="Enter"){const J=u.state.activeIndex;if(J==null)return;jt(H);const te=H.nativeEvent,G=u.state.listRef.current[J];G&&(u.state.selectionEventRef.current=te,G.click(),u.state.selectionEventRef.current=null)}},onKeyDownCapture(){u.state.keyboardActiveRef.current=!0},onPointerMoveCapture(){u.state.keyboardActiveRef.current=!1}},s]});return _?D:O.jsx(tI,{elementsRef:y,labelsRef:g?void 0:h,children:D})});process.env.NODE_ENV!=="production"&&(ET.displayName="ComboboxList");const j0=x.createContext(void 0);process.env.NODE_ENV!=="production"&&(j0.displayName="ComboboxPortalContext");function cK(){const e=x.useContext(j0);if(e===void 0)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: <Combobox.Portal> is missing.":pi(20));return e}const _T=x.forwardRef(function(t,n){const{keepMounted:r=!1,...i}=t,o=Nr(),a=he(o,ge.mounted),s=he(o,ge.forceMounted);return a||r||s?O.jsx(j0.Provider,{value:r,children:O.jsx(BI,{ref:n,...i})}):null});process.env.NODE_ENV!=="production"&&(_T.displayName="ComboboxPortal");const fK=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:o,platform:a,elements:s,middlewareData:u}=t,{element:c,padding:d=0,offsetParent:p="real"}=Ni(e,t)||{};if(c==null)return{};const g=m0(d),h={x:n,y:r},y=th(i),b=eh(y),v=await a.getDimensions(c),w=y==="y",C=w?"top":"left",E=w?"bottom":"right",_=w?"clientHeight":"clientWidth",P=o.reference[b]+o.reference[y]-h[y]-o.floating[b],R=h[y]-o.reference[y],I=p==="real"?await a.getOffsetParent?.(c):s.floating;let k=s.floating[_]||o.floating[b];(!k||!await a.isElement?.(I))&&(k=s.floating[_]||o.floating[b]);const B=P/2-R/2,L=k/2-v[b]/2-1,V=Math.min(g[C],L),D=Math.min(g[E],L),H=V,J=k-v[b]-D,te=k/2-v[b]/2+B,G=jd(H,te,J),ee=!u.arrow&&bo(i)!=null&&te!==G&&o.reference[b]/2-(te<H?V:D)-v[b]/2<0,Q=ee?te<H?te-H:te-J:0;return{[y]:h[y]+Q,data:{[y]:G,centerOffset:te-G-Q,...ee&&{alignmentOffset:Q}},reset:ee}}}),dK=(e,t)=>({...fK(e),options:[e,t]}),pK={name:"hide",async fn(e){const{width:t,height:n,x:r,y:i}=e.rects.reference,o=t===0&&n===0&&r===0&&i===0;return{data:{referenceHidden:(await rT().fn(e)).data?.referenceHidden||o}}}},hK={sideX:"left",sideY:"top"};function OT(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 sE(e,t,n){const{rects:r,placement:i}=e;return{side:OT(t,Ar(i),n),align:bo(i)||"center",anchor:{width:r.reference.width,height:r.reference.height},positioner:{width:r.floating.width,height:r.floating.height}}}function gK(e){const{anchor:t,positionMethod:n="absolute",side:r="bottom",sideOffset:i=0,align:o="center",alignOffset:a=0,collisionBoundary:s,collisionPadding:u=5,sticky:c=!1,arrowPadding:d=5,disableAnchorTracking:p=!1,keepMounted:g=!1,floatingRootContext:h,mounted:y,collisionAvoidance:b,shiftCrossAxis:v=!1,nodeId:w,adaptiveOrigin:C,lazyFlip:E=!1,externalTree:_}=e,[P,R]=x.useState(null);!y&&P!==null&&R(null);const I=b.side||"flip",k=b.align||"flip",B=b.fallbackAxisSide||"end",L=typeof t=="function"?t:void 0,V=Me(L),D=L?V:t,H=Xr(t),te=rI()==="rtl",G=P||{top:"top",right:"right",bottom:"bottom",left:"left","inline-end":te?"left":"right","inline-start":te?"right":"left"}[r],ee=o==="center"?G:`${G}-${o}`;let Q=u;const pe=1,K=r==="bottom"?pe:0,Ae=r==="top"?pe:0,Se=r==="right"?pe:0,$e=r==="left"?pe:0;typeof Q=="number"?Q={top:Q+K,right:Q+$e,bottom:Q+Ae,left:Q+Se}:Q&&(Q={top:(Q.top||0)+K,right:(Q.right||0)+$e,bottom:(Q.bottom||0)+Ae,left:(Q.left||0)+Se});const we={boundary:s==="clipping-ancestors"?"clippingAncestors":s,padding:Q},Ce=x.useRef(null),ze=Xr(i),Ke=Xr(a),oe=[QI(pt=>{const ht=sE(pt,r,te),Ve=typeof ze.current=="function"?ze.current(ht):ze.current,jn=typeof Ke.current=="function"?Ke.current(ht):Ke.current;return{mainAxis:Ve,crossAxis:jn,alignmentAxis:jn}},[typeof i!="function"?i:0,typeof a!="function"?a:0,te,r])],ne=k==="none"&&I!=="shift",$=!ne&&(c||v||I==="shift"),ie=I==="none"?null:tT({...we,padding:{top:Q.top+pe,right:Q.right+pe,bottom:Q.bottom+pe,left:Q.left+pe},mainAxis:!v&&I==="flip",crossAxis:k==="flip"?"alignment":!1,fallbackAxisSideDirection:B}),Z=ne?null:JI(pt=>{const ht=Xt(pt.elements.floating).documentElement;return{...we,rootBoundary:v?{x:0,y:0,width:ht.clientWidth,height:ht.clientHeight}:void 0,mainAxis:k!=="none",crossAxis:$,limiter:c||v?void 0:eT(Ve=>{if(!Ce.current)return{};const{width:jn,height:On}=Ce.current.getBoundingClientRect(),mi=Zr(Ar(Ve.placement)),Jt=mi==="y"?jn:On,ma=mi==="y"?Q.left+Q.right:Q.top+Q.bottom;return{offset:Jt/2+ma/2}})}},[we,c,v,Q,k]);I==="shift"||k==="shift"||o==="center"?oe.push(Z,ie):oe.push(ie,Z),oe.push(nT({...we,apply({elements:{floating:pt},rects:{reference:ht},availableWidth:Ve,availableHeight:jn}){const On=pt.style;On.setProperty("--available-width",`${Ve}px`),On.setProperty("--available-height",`${jn}px`),On.setProperty("--anchor-width",`${ht.width}px`),On.setProperty("--anchor-height",`${ht.height}px`)}}),dK(()=>({element:Ce.current||document.createElement("div"),padding:d,offsetParent:"floating"}),[d]),{name:"transformOrigin",fn(pt){const{elements:ht,middlewareData:Ve,placement:jn,rects:On,y:mi}=pt,Jt=Ar(jn),ma=Zr(Jt),$t=Ce.current,Dl=Ve.arrow?.x||0,nr=Ve.arrow?.y||0,yn=$t?.clientWidth||0,va=$t?.clientHeight||0,Ao=Dl+yn/2,Dr=nr+va/2,vs=Math.abs(Ve.shift?.y||0),jr=On.reference.height/2,gr=typeof i=="function"?i(sE(pt,r,te)):i,Un=vs>gr,rt={top:`${Ao}px calc(100% + ${gr}px)`,bottom:`${Ao}px ${-gr}px`,left:`calc(100% + ${gr}px) ${Dr}px`,right:`${-gr}px ${Dr}px`}[Jt],vi=`${Ao}px ${On.reference.y+jr-mi}px`;return ht.floating.style.setProperty("--transform-origin",$&&ma==="y"&&Un?vi:rt),{}}},pK,C),je(()=>{!y&&h&&h.update({referenceElement:null,floatingElement:null,domReferenceElement:null})},[y,h]);const Re=x.useMemo(()=>({elementResize:!p&&typeof ResizeObserver<"u",layoutShift:!p&&typeof IntersectionObserver<"u"}),[p]),{refs:U,elements:fe,x:me,y:de,middlewareData:ve,update:le,placement:be,context:ke,isPositioned:et,floatingStyles:Tt}=A6({rootContext:h,placement:ee,middleware:oe,strategy:n,whileElementsMounted:g?void 0:(...pt)=>Dy(...pt,Re),nodeId:w,externalTree:_}),{sideX:Dn,sideY:Ct}=ve.adaptiveOrigin||hK,ot=et?n:"fixed",kt=x.useMemo(()=>{const pt=C?{position:ot,[Dn]:me,[Ct]:de}:{position:ot,...Tt};return et||(pt.opacity=0),pt},[C,ot,Dn,me,Ct,de,Tt,et]),mn=x.useRef(null);je(()=>{if(!y)return;const pt=H.current,ht=typeof pt=="function"?pt():pt,jn=(lE(ht)?ht.current:ht)||null||null;jn!==mn.current&&(U.setPositionReference(jn),mn.current=jn)},[y,U,D,H]),x.useEffect(()=>{if(!y)return;const pt=H.current;typeof pt!="function"&&lE(pt)&&pt.current!==mn.current&&(U.setPositionReference(pt.current),mn.current=pt.current)},[y,U,D,H]),x.useEffect(()=>{if(g&&y&&fe.domReference&&fe.floating)return Dy(fe.domReference,fe.floating,le,Re)},[g,y,fe,le,Re]);const on=Ar(be),_n=OT(r,on,te),Qt=bo(be)||"center",vn=!!ve.hide?.referenceHidden;je(()=>{E&&y&&et&&R(on)},[E,y,et,on]);const hr=x.useMemo(()=>({position:"absolute",top:ve.arrow?.y,left:ve.arrow?.x}),[ve.arrow]),Hn=ve.arrow?.centerOffset!==0;return x.useMemo(()=>({positionerStyles:kt,arrowStyles:hr,arrowRef:Ce,arrowUncentered:Hn,side:_n,align:Qt,physicalSide:on,anchorHidden:vn,refs:U,context:ke,isPositioned:et,update:le}),[kt,hr,Ce,Hn,_n,Qt,on,vn,U,ke,et,le])}function lE(e){return e!=null&&"current"in e}function PT(e){return e==="starting"?jG:Xn}const AT=x.forwardRef(function(t,n){const{render:r,className:i,anchor:o,positionMethod:a="absolute",side:s="bottom",align:u="center",sideOffset:c=0,alignOffset:d=0,collisionBoundary:p="clipping-ancestors",collisionPadding:g=5,arrowPadding:h=5,sticky:y=!1,disableAnchorTracking:b=!1,collisionAvoidance:v=$G,...w}=t,C=Nr(),{filteredItems:E}=da(),_=ah(),P=cK(),R=he(C,ge.modal),I=he(C,ge.open),k=he(C,ge.mounted),B=he(C,ge.openMethod),L=he(C,ge.triggerElement),V=he(C,ge.inputElement),D=he(C,ge.inputInsidePopup),H=he(C,ge.transitionStatus),J=E.length===0,G=gK({anchor:o??(D?L:V),floatingRootContext:_,positionMethod:a,mounted:k,side:s,sideOffset:c,align:u,alignOffset:d,arrowPadding:h,collisionBoundary:p,collisionPadding:g,sticky:y,disableAnchorTracking:b,keepMounted:P,collisionAvoidance:v,lazyFlip:!0});X4(I&&R&&B!=="touch",L);const ee=x.useMemo(()=>{const Se={...G.positionerStyles};return I||(Se.pointerEvents="none"),{role:"presentation",hidden:!k,style:Se}},[I,k,G.positionerStyles]),Q={open:I,side:G.side,align:G.align,anchorHidden:G.anchorHidden,empty:J};je(()=>{C.set("popupSide",G.side)},[C,G.side]);const pe=x.useMemo(()=>({side:G.side,align:G.align,arrowRef:G.arrowRef,arrowUncentered:G.arrowUncentered,arrowStyles:G.arrowStyles,anchorHidden:G.anchorHidden,isPositioned:G.isPositioned}),[G.side,G.align,G.arrowRef,G.arrowUncentered,G.arrowStyles,G.anchorHidden,G.isPositioned]),K=Me(Se=>{C.set("positionerElement",Se)}),Ae=er("div",t,{state:Q,ref:[n,K],props:[ee,PT(H),w],stateAttributesMapping:uT});return O.jsxs(k0.Provider,{value:pe,children:[k&&R&&O.jsx(cT,{inert:H6(!I),cutout:V??L}),Ae]})});process.env.NODE_ENV!=="production"&&(AT.displayName="ComboboxPositioner");const mK={...uT,...fI},RT=x.forwardRef(function(t,n){const{render:r,className:i,initialFocus:o,finalFocus:a,...s}=t,u=Nr(),c=N0(),d=ah(),{filteredItems:p}=da(),g=he(u,ge.mounted),h=he(u,ge.open),y=he(u,ge.openMethod),b=he(u,ge.transitionStatus),v=he(u,ge.inputInsidePopup),w=he(u,ge.inputElement),C=p.length===0;v0({open:h,ref:u.state.popupRef,onComplete(){h&&u.state.onOpenChangeComplete(!0)}});const E={open:h,side:c.side,align:c.align,anchorHidden:c.anchorHidden,transitionStatus:b,empty:C},_=er("div",t,{state:E,ref:[n,u.state.popupRef],props:[{role:v?"dialog":"presentation",tabIndex:-1,onFocus(k){const B=lr(k.nativeEvent);y!=="touch"&&(ft(u.state.listElement,B)||B===k.currentTarget)&&u.state.inputRef.current?.focus()}},PT(b),s],stateAttributesMapping:mK}),R=o===void 0?v?k=>k==="touch"?u.state.popupRef.current:w:!1:o;let I;return a!=null?I=a:I=v?void 0:!1,O.jsx(uq,{context:d,disabled:!g,modal:!v,openInteractionType:y,initialFocus:R,returnFocus:I,children:_})});process.env.NODE_ENV!=="production"&&(RT.displayName="ComboboxPopup");const L0=x.createContext(void 0);process.env.NODE_ENV!=="production"&&(L0.displayName="ComboboxGroupContext");function vK(){const e=x.useContext(L0);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>.":pi(18));return e}const IT=x.forwardRef(function(t,n){const{render:r,className:i,items:o,...a}=t,[s,u]=x.useState(),c=x.useMemo(()=>({labelId:s,setLabelId:u,items:o}),[s,u,o]),d=er("div",t,{ref:n,props:[{role:"group","aria-labelledby":s},a]}),p=O.jsx(L0.Provider,{value:c,children:d});return o?O.jsx(uK,{items:o,children:p}):p});process.env.NODE_ENV!=="production"&&(IT.displayName="ComboboxGroup");const TT=x.forwardRef(function(t,n){const{render:r,className:i,id:o,...a}=t,{setLabelId:s}=vK(),u=l0(o);return je(()=>(s(u),()=>{s(void 0)}),[u,s]),er("div",t,{ref:n,props:[{id:u},a]})});process.env.NODE_ENV!=="production"&&(TT.displayName="ComboboxGroupLabel");const kT=x.createContext(void 0);process.env.NODE_ENV!=="production"&&(kT.displayName="ComboboxItemContext");const NT=x.createContext(!1);process.env.NODE_ENV!=="production"&&(NT.displayName="ComboboxRowContext");function yK(){return x.useContext(NT)}const MT=x.memo(x.forwardRef(function(t,n){const{render:r,className:i,value:o=null,index:a,disabled:s=!1,nativeButton:u=!1,...c}=t,d=x.useRef(!1),p=x.useRef(null),g=hI({index:a,textRef:p,indexGuessBehavior:pI.GuessFromOrder}),h=Nr(),y=yK(),{flatFilteredItems:b,hasItems:v}=da(),w=he(h,ge.open),C=he(h,ge.selectionMode),E=he(h,ge.readOnly),_=he(h,ge.virtualized),P=he(h,ge.isItemEqualToValue),R=C!=="none",I=a??(_?Gd(b,o,P):g.index),k=g.index!==-1,B=he(h,ge.id),L=he(h,ge.isActive,I),V=he(h,ge.isSelected,o),D=he(h,ge.getItemProps),H=x.useRef(null),J=B!=null&&k?`${B}-${I}`:void 0,te=V&&R;je(()=>{if(!(k&&(_||a!=null)))return;const Ce=h.state.listRef.current;return Ce[I]=H.current,()=>{delete Ce[I]}},[k,_,I,a,h]),je(()=>{if(!k||v)return;const we=h.state.valuesRef.current;return we[I]=o,C!=="none"&&h.state.allValuesRef.current.push(o),()=>{delete we[I]}},[k,v,I,o,h,C]),je(()=>{if(!w){d.current=!1;return}if(!k||v)return;const we=h.state.selectedValue,Ce=Array.isArray(we)?we[we.length-1]:we;Qa(o,Ce,P)&&h.set("selectedIndex",I)},[k,v,w,h,I,o,P]);const G={disabled:s,selected:te,highlighted:L},ee=D({active:L,selected:te});ee.id=void 0,ee.onFocus=void 0;const{getButtonProps:Q,buttonRef:pe}=Jp({disabled:s,focusableWhenDisabled:!0,native:u});function K(we){function Ce(){h.state.handleSelection(we,o)}h.state.submitOnItemClick?(la.flushSync(Ce),h.state.requestSubmit()):Ce()}const Ae={id:J,role:y?"gridcell":"option","aria-selected":R?te:void 0,tabIndex:void 0,onPointerDownCapture(we){d.current=!0,we.preventDefault()},onClick(we){s||E||K(we.nativeEvent)},onMouseUp(we){const Ce=d.current;d.current=!1,!(s||E||we.button!==0||Ce||!L)&&K(we.nativeEvent)}},Se=er("div",t,{ref:[pe,n,g.ref,H],state:G,props:[ee,Ae,c,Q]}),$e=x.useMemo(()=>({selected:te,textRef:p}),[te,p]);return O.jsx(kT.Provider,{value:$e,children:Se})}));process.env.NODE_ENV!=="production"&&(MT.displayName="ComboboxItem");const DT=x.forwardRef(function(t,n){const{render:r,className:i,children:o,...a}=t,{filteredItems:s}=da(),u=Nr(),c=s.length===0?o:null;return er("div",t,{ref:[n,u.state.emptyRef],props:[{children:c,role:"status","aria-live":"polite","aria-atomic":!0},a]})});process.env.NODE_ENV!=="production"&&(DT.displayName="ComboboxEmpty");const jT=x.forwardRef(function(t,n){const{className:r,render:i,orientation:o="horizontal",...a}=t;return er("div",t,{state:{orientation:o},ref:n,props:[{role:"separator","aria-orientation":o},a]})});process.env.NODE_ENV!=="production"&&(jT.displayName="Separator");function bK(e){const{multiple:t=!1,defaultValue:n,value:r,onValueChange:i,autoComplete:o,...a}=e;return O.jsx(oK,{...a,selectionMode:t?"multiple":"single",selectedValue:r,defaultSelectedValue:n,onSelectedValueChange:i,formAutoComplete:o})}function xK(e){const{children:t,placeholder:n}=e,r=Nr(),i=he(r,ge.itemToStringLabel),o=he(r,ge.selectedValue),a=he(r,ge.items),s=he(r,ge.selectionMode)==="multiple",u=he(r,ge.hasSelectedValue),c=!u&&n!=null&&t==null,d=he(r,ge.hasNullItemLabel,c);let p=null;return typeof t=="function"?p=t(o):t!=null?p=t:!u&&n!=null&&!d?p=n:s&&Array.isArray(o)?p=X6(o,a,i):p=fT(o,a,i),O.jsx(x.Fragment,{children:p})}const LT=x.forwardRef(function(t,n){const{render:r,className:i,...o}=t,a=Nr(),s=he(a,ge.open),u=he(a,ge.hasSelectionChips),[c,d]=x.useState(void 0);s&&c!==void 0&&d(void 0);const p=x.useRef([]),g=er("div",t,{ref:[n,a.state.chipsContainerRef],props:[u?{role:"toolbar"}:Xn,o]}),h=x.useMemo(()=>({highlightedChipIndex:c,setHighlightedChipIndex:d,chipsRef:p}),[c,d,p]);return O.jsx(T0.Provider,{value:h,children:O.jsx(tI,{elementsRef:p,children:g})})});process.env.NODE_ENV!=="production"&&(LT.displayName="ComboboxChips");const $0=x.createContext(void 0);process.env.NODE_ENV!=="production"&&($0.displayName="ComboboxChipContext");function wK(){const e=x.useContext($0);if(!e)throw new Error(process.env.NODE_ENV!=="production"?"useComboboxChipContext must be used within a ComboboxChip":pi(17));return e}const $T=x.forwardRef(function(t,n){const{render:r,className:i,...o}=t,a=Nr(),{setHighlightedChipIndex:s,chipsRef:u}=wT(),c=he(a,ge.disabled),d=he(a,ge.readOnly),p=he(a,ge.selectedValue),{ref:g,index:h}=hI();function y(C){let E=h;if(C.key==="ArrowLeft")C.preventDefault(),h>0?E=h-1:E=void 0;else if(C.key==="ArrowRight")C.preventDefault(),h<p.length-1?E=h+1:E=void 0;else if(C.key==="Backspace"||C.key==="Delete"){const _=h>=p.length-1?p.length-2:h;E=_>=0?_:void 0,jt(C),a.state.setIndices({activeIndex:null,selectedIndex:null,type:"keyboard"}),a.state.setSelectedValue(p.filter((P,R)=>R!==h),Xe(Yr,C.nativeEvent))}else C.key==="Enter"||C.key===" "?(jt(C),E=void 0):C.key==="ArrowDown"||C.key==="ArrowUp"?(jt(C),a.state.setOpen(!0,Xe(Ru,C.nativeEvent)),E=void 0):C.key.length===1&&!C.ctrlKey&&!C.metaKey&&!C.altKey&&(E=void 0);return E}const v=er("div",t,{ref:[n,g],state:{disabled:c},props:[{tabIndex:-1,"aria-disabled":c||void 0,"aria-readonly":d||void 0,onKeyDown(C){if(c||d)return;const E=y(C);la.flushSync(()=>{s(E)}),E===void 0?a.state.inputRef.current?.focus():u.current[E]?.focus()},onMouseDown(C){d||(C.preventDefault(),!c&&a.state.inputRef.current?.focus())}},o]}),w=x.useMemo(()=>({index:h}),[h]);return O.jsx($0.Provider,{value:w,children:v})});process.env.NODE_ENV!=="production"&&($T.displayName="ComboboxChip");const FT=x.forwardRef(function(t,n){const{render:r,className:i,disabled:o=!1,nativeButton:a=!0,...s}=t,u=Nr(),{index:c}=wK(),d=he(u,ge.disabled),p=he(u,ge.readOnly),g=he(u,ge.selectedValue),h=he(u,ge.isItemEqualToValue),y=d||o,{buttonRef:b,getButtonProps:v}=Jp({native:a,disabled:y||p,focusableWhenDisabled:!0}),w={disabled:y};function C(P){const R=u.state.activeIndex;if(R==null)return;const I=Gd(u.state.valuesRef.current,P,h);I!==-1&&R===I&&u.state.setIndices({activeIndex:null,type:u.state.keyboardActiveRef.current?"keyboard":"pointer"})}function E(P){const R=Xe(GG,P.nativeEvent),I=g[c];return C(I),u.state.setSelectedValue(g.filter((k,B)=>B!==c),R),u.state.inputRef.current?.focus(),R}return er("button",t,{ref:[n,b],state:w,props:[{tabIndex:-1,onClick(P){if(y||p)return;E(P).isPropagationAllowed||P.stopPropagation()},onKeyDown(P){y||p||(P.key==="Enter"||P.key===" ")&&(E(P).isPropagationAllowed||jt(P))}},s,v]})});process.env.NODE_ENV!=="production"&&(FT.displayName="ComboboxChipRemove");var CK=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],sh=CK.reduce((e,t)=>{const n=MR(`Primitive.${t}`),r=x.forwardRef((i,o)=>{const{asChild:a,...s}=i,u=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),O.jsx(u,{...s,ref:o})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),SK="Label",VT=x.forwardRef((e,t)=>O.jsx(sh.label,{...e,ref:t,onMouseDown:n=>{n.target.closest("button, input, select, textarea")||(e.onMouseDown?.(n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));VT.displayName=SK;var BT=VT;const EK=xt(dn("body-sm-regular")),Vu=({className:e,ref:t,...n})=>O.jsx(BT,{ref:t,className:ue(EK(),e),...n});Vu.displayName=BT.displayName;var _K="Separator",uE="horizontal",OK=["horizontal","vertical"],zT=x.forwardRef((e,t)=>{const{decorative:n,orientation:r=uE,...i}=e,o=PK(r)?r:uE,s=n?{role:"none"}:{"aria-orientation":o==="vertical"?o:void 0,role:"separator"};return O.jsx(sh.div,{"data-orientation":o,...s,...i,ref:t})});zT.displayName=_K;function PK(e){return OK.includes(e)}var WT=zT;const F0=({className:e,orientation:t="horizontal",decorative:n=!0,ref:r,...i})=>O.jsx(WT,{ref:r,decorative:n,orientation:t,className:ue("bg-delicate-border shrink-0",t==="horizontal"?"h-px w-full":"h-full w-px",e),...i});F0.displayName=WT.displayName;const AK=xt("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"}}),RK="flex flex-col gap-6 has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3",IK="mb-3 font-medium data-[variant=legend]:text-base data-[variant=label]:text-sm",TK="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",kK="group/field-content flex flex-1 flex-col gap-2",NK=[`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(" "),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
41
+ dark:has-data-[state=checked]:bg-primary/10`].join(" "),MK=[`text-primary-text flex w-fit items-center gap-2
42
+ group-data-[disabled=true]/field:opacity-50`,dn("body-sm-regular")].join(" "),DK=["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",dn("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(" "),jK="relative -my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2",LK="absolute inset-0 top-1/2",$K="bg-background text-muted-foreground relative mx-auto block w-fit px-2",FK="ml-4 flex list-disc flex-col gap-1",VK="text-error-text text-xs leading-[140%] font-normal tracking-normal";function lh({className:e,...t}){return O.jsx("fieldset",{"data-slot":"field-set",className:ue(RK,e,"min-w-0 flex-1 w-full"),...t})}function BK({className:e,variant:t="legend",...n}){return O.jsx("legend",{"data-slot":"field-legend","data-variant":t,className:ue(IK,e),...n})}function ac({className:e,...t}){return O.jsx("div",{"data-slot":"field-group",className:ue(TK,e),...t})}function sc({className:e,orientation:t="vertical",...n}){return O.jsx("div",{role:"group","data-slot":"field","data-orientation":t,className:ue(AK({orientation:t}),e),...n})}function zK({className:e,...t}){return O.jsx("div",{"data-slot":"field-content",className:ue(kK,e),...t})}function El({className:e,...t}){return O.jsx(Vu,{"data-slot":"field-label",className:ue(NK,e),...t})}function WK({className:e,...t}){return O.jsx("div",{"data-slot":"field-label",className:ue(MK,e),...t})}function lc({className:e,...t}){return O.jsx("p",{"data-slot":"field-description",className:ue(DK,e),...t})}function HK({children:e,className:t,...n}){return O.jsxs("div",{"data-slot":"field-separator","data-content":!!e,className:ue(jK,t),...n,children:[O.jsx(F0,{className:LK}),e&&O.jsx("span",{className:$K,"data-slot":"field-separator-content",children:e})]})}function HT({className:e,children:t,errors:n,...r}){const i=j.useMemo(()=>t||(n?n.length===1&&n[0]?.message?n[0].message:O.jsx("ul",{className:FK,children:n.map(o=>o?.message?O.jsx("li",{children:o.message},o.message):null)}):null),[t,n]);return i?O.jsx("div",{role:"alert","data-slot":"field-error",className:ue(VK,e),...r,children:i}):null}const UK=xt(`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"}}),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
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"}}),V0=({className:e,sizeInput:t,type:n,variant:r,...i})=>O.jsx("input",{"data-slot":"input",type:n||"text",className:ue(UK({variant:r,sizeInput:t}),e),...i}),GK=[`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(" "),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
51
+ aria-invalid:border-error-text`].join(" "),uh=e=>O.jsx("textarea",{className:ue(GK,e.className),...e});uh.displayName="Textarea";const qK=xt(`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"}}),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
56
+ group-has-[>input]/input-group:pb-2.5 [.border-t]:pt-3`}},defaultVariants:{align:"inline-start"}}),KK=xt("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 B0({className:e,...t}){return O.jsx("div",{"data-slot":"input-group",role:"group",className:ue(`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 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
64
+ has-[[data-slot=input-group-control][disabled]]:[&_svg]:text-disabled-text`,e),...t})}function z0({className:e,align:t="inline-start",...n}){return O.jsx("div",{role:"group","data-slot":"input-group-addon","data-align":t,className:ue(qK({align:t}),e),onClick:r=>{r.target.closest("button")||r.currentTarget.parentElement?.querySelector("input")?.focus()},...n})}function UT({className:e,type:t="button",variant:n="primary",size:r="xs",...i}){return O.jsx(oo,{type:t,"data-size":r,variant:n,className:ue(KK({size:r}),e),...i})}function YK({className:e,...t}){return O.jsx("span",{className:ue(`text-secondary-text flex items-center gap-2 text-sm [&_svg]:pointer-events-none
65
+ [&_svg:not([class*='size-'])]:size-4`,e),...t})}function W0(e){return O.jsx(V0,{"data-slot":"input-group-control",className:ue(`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 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
67
+ dark:bg-transparent`,e.className),...e})}function XK({className:e,...t}){return O.jsx(uh,{"data-slot":"input-group-control",className:ue(`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 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
69
+ dark:bg-transparent`,e),...t})}const ZK=`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`,QK=xt("text-primary-text pointer-events-none transition-colors",{variants:{disabled:{true:"text-disabled-text",false:""}},defaultVariants:{disabled:!1}}),GT=`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`,LF="pointer-events-none",FF=`has-[[data-slot=input-group-control]:focus-visible]:border-inp-focus-border
72
+ focus:shadow-none`,JK="pointer-events-none",e8=`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`,VF="cursor-pointer",zF="isolate z-50",BF=`bg-primary-bg text-primary-text data-open:animate-in
77
+ has-[[data-slot=input-group-control]:focus-visible]:outline-none`,t8="cursor-pointer",n8="isolate z-50",r8=`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`,HF=`text-primary-text data-disabled:text-disabled-text
87
+ *:data-[slot=input-group]:shadow-none`,i8=`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`,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
90
+ [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,o8="text-secondary-text px-4 py-2 text-xs",a8=`text-secondary-text hidden w-full justify-center py-2
91
+ text-center text-sm group-data-empty/combobox-content:flex`,s8="bg-delicate-border -mx-1 my-1 h-px",l8=xt(`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,21 +96,21 @@ text-center text-sm group-data-empty/combobox-content:flex`,UF="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}}),KF=`text-primary-text flex items-center justify-center
99
+ [&_input::placeholder]:text-disabled-text [&_svg]:text-disabled-text`,false:""}},defaultVariants:{disabled:!1}}),u8=`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`,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,` {
102
+ has-data-[slot=combobox-chip-remove]:pr-0`,c8=xt(`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}}),ch=x.createContext(null);function qT({children:e,...t}){const[n,r]=x.useState(null),i=x.useMemo(()=>({anchorElement:n,setAnchorElement:r}),[n]);return O.jsx(ch,{value:i,children:O.jsx(bK,{...t,children:e})})}function KT({className:e,label:t,description:n,error:r,children:i,...o}){return O.jsxs(sc,{className:e,...o,children:[t&&O.jsx(El,{children:t}),i,n&&O.jsx(lc,{children:n}),r&&O.jsx(HT,{children:r})]})}function $y({...e}){return O.jsx(xK,{"data-slot":"combobox-value",...e})}function qd({className:e,children:t,...n}){return O.jsxs(xT,{"data-slot":"combobox-trigger",className:ue(ZK,e),...n,children:[t,O.jsx(uo,{type:"chevron",className:ue(QK({disabled:n.disabled})),size:"md"})]})}function f8({className:e,...t}){return O.jsx(CT,{"data-slot":"combobox-clear",className:ue(e),...t,render:O.jsx(UT,{variant:"link",size:"icon-xs",className:GT,children:O.jsx(uo,{className:JK,type:"close"})})})}function d8({className:e,children:t,disabled:n=!1,showTrigger:r=!0,showClear:i=!1,...o}){const a=x.use(ch),s=x.useCallback(u=>{a&&a.setAnchorElement(c=>c===u?c:u)},[a]);return O.jsxs(B0,{ref:s,className:ue(e8,e),children:[O.jsx(M0,{render:O.jsx(W0,{disabled:n}),...o}),O.jsxs(z0,{align:"inline-end",className:t8,children:[r&&O.jsx(qd,{}),i&&O.jsx(f8,{disabled:n})]}),t]})}function YT({className:e,side:t="bottom",sideOffset:n=8,align:r="start",alignOffset:i=0,anchor:o,portalContainer:a,...s}){const c=x.use(ch)?.anchorElement??null,d=x.useCallback(()=>{if(typeof document>"u")return null;const b=document.activeElement;return b?b.closest('[data-slot="combobox-chips"]')??b.closest('[data-slot="input-group"]'):null},[]),p=x.useCallback(()=>{const b=c??d();if(typeof Element>"u"||!o)return b;if(o instanceof Element)return o;if(typeof o=="function"){const v=o();return v instanceof Element?v:b}return"current"in o&&o.current instanceof Element?o.current:b},[o,c,d]),g=x.useCallback(()=>{if(typeof document>"u")return;const b=p();if(b instanceof HTMLElement){const w=b.closest('[role="dialog"]');if(w instanceof HTMLElement)return w}const v=document.activeElement?.closest('[role="dialog"]');return v instanceof HTMLElement?v:void 0},[p]),h=o??c??d,y=a??g();return O.jsx(_T,{container:y,children:O.jsx(AT,{side:t,sideOffset:n,align:r,alignOffset:i,anchor:h,className:n8,children:O.jsx(RT,{"data-slot":"combobox-content","data-chips":!!o,className:ue(r8,e),...s})})})}function XT({className:e,...t}){return O.jsx(ET,{"data-slot":"combobox-list",className:ue("flex flex-col gap-1",e),...t})}function ZT({className:e,children:t,...n}){return O.jsx(MT,{"data-slot":"combobox-item",className:ue(i8,e),...n,children:t})}function p8({className:e,...t}){return O.jsx(IT,{"data-slot":"combobox-group",className:ue(e),...t})}function h8({className:e,...t}){return O.jsx(TT,{"data-slot":"combobox-label",className:ue(o8,e),...t})}function g8({...e}){return O.jsx(ST,{"data-slot":"combobox-collection",...e})}function QT({className:e,...t}){return O.jsx(DT,{"data-slot":"combobox-empty",className:ue(a8,e),...t})}function m8({className:e,...t}){return O.jsx(jT,{"data-slot":"combobox-separator",className:ue(s8,e),...t})}function Fy({className:e,disabled:t=!1,...n}){const r=x.use(ch),i=x.useCallback(o=>{r&&r.setAnchorElement(a=>a===o?a:o)},[r]);return O.jsx(LT,{ref:i,"data-slot":"combobox-chips",className:ue(l8({disabled:t}),e),...n})}function JT({className:e,children:t,showRemove:n=!0,...r}){return O.jsxs($T,{"data-slot":"combobox-chip",className:ue(u8,e),...r,children:[t,n&&O.jsx(FT,{render:O.jsx(oo,{className:GT,variant:"ghost",children:O.jsx(uo,{className:"text-secondary-text",type:"close"})})})]})}function Vy({className:e,...t}){return O.jsx(M0,{"data-slot":"combobox-chip-input",className:ue(c8({disabled:t.disabled}),e),...t})}var v8=x[" useId ".trim().toString()]||(()=>{}),y8=0;function sl(e){const[t,n]=x.useState(v8());return ia(()=>{n(r=>r??String(y8++))},[e]),t?`radix-${t}`:""}function Ja(e){const t=x.useRef(e);return x.useEffect(()=>{t.current=e}),x.useMemo(()=>(...n)=>t.current?.(...n),[])}function b8(e,t=globalThis?.document){const n=Ja(e);x.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var x8="DismissableLayer",By="dismissableLayer.update",w8="dismissableLayer.pointerDownOutside",C8="dismissableLayer.focusOutside",cE,ek=x.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),H0=x.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:o,onInteractOutside:a,onDismiss:s,...u}=e,c=x.useContext(ek),[d,p]=x.useState(null),g=d?.ownerDocument??globalThis?.document,[,h]=x.useState({}),y=Zt(t,I=>p(I)),b=Array.from(c.layers),[v]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),w=b.indexOf(v),C=d?b.indexOf(d):-1,E=c.layersWithOutsidePointerEventsDisabled.size>0,_=C>=w,P=_8(I=>{const k=I.target,B=[...c.branches].some(L=>L.contains(k));!_||B||(i?.(I),a?.(I),I.defaultPrevented||s?.())},g),R=O8(I=>{const k=I.target;[...c.branches].some(L=>L.contains(k))||(o?.(I),a?.(I),I.defaultPrevented||s?.())},g);return b8(I=>{C===c.layers.size-1&&(r?.(I),!I.defaultPrevented&&s&&(I.preventDefault(),s()))},g),x.useEffect(()=>{if(d)return n&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(cE=g.body.style.pointerEvents,g.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(d)),c.layers.add(d),fE(),()=>{n&&c.layersWithOutsidePointerEventsDisabled.size===1&&(g.body.style.pointerEvents=cE)}},[d,g,n,c]),x.useEffect(()=>()=>{d&&(c.layers.delete(d),c.layersWithOutsidePointerEventsDisabled.delete(d),fE())},[d,c]),x.useEffect(()=>{const I=()=>h({});return document.addEventListener(By,I),()=>document.removeEventListener(By,I)},[]),O.jsx(wt.div,{...u,ref:y,style:{pointerEvents:E?_?"auto":"none":void 0,...e.style},onFocusCapture:bt(e.onFocusCapture,R.onFocusCapture),onBlurCapture:bt(e.onBlurCapture,R.onBlurCapture),onPointerDownCapture:bt(e.onPointerDownCapture,P.onPointerDownCapture)})});H0.displayName=x8;var S8="DismissableLayerBranch",E8=x.forwardRef((e,t)=>{const n=x.useContext(ek),r=x.useRef(null),i=Zt(t,r);return x.useEffect(()=>{const o=r.current;if(o)return n.branches.add(o),()=>{n.branches.delete(o)}},[n.branches]),O.jsx(wt.div,{...e,ref:i})});E8.displayName=S8;function _8(e,t=globalThis?.document){const n=Ja(e),r=x.useRef(!1),i=x.useRef(()=>{});return x.useEffect(()=>{const o=s=>{if(s.target&&!r.current){let u=function(){tk(w8,n,c,{discrete:!0})};const c={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=u,t.addEventListener("click",i.current,{once:!0})):u()}else t.removeEventListener("click",i.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",o),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function O8(e,t=globalThis?.document){const n=Ja(e),r=x.useRef(!1);return x.useEffect(()=>{const i=o=>{o.target&&!r.current&&tk(C8,n,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function fE(){const e=new CustomEvent(By);document.dispatchEvent(e)}function tk(e,t,n,{discrete:r}){const i=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?WH(i,o):i.dispatchEvent(o)}var Im="focusScope.autoFocusOnMount",Tm="focusScope.autoFocusOnUnmount",dE={bubbles:!1,cancelable:!0},P8="FocusScope",nk=x.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...a}=e,[s,u]=x.useState(null),c=Ja(i),d=Ja(o),p=x.useRef(null),g=Zt(t,b=>u(b)),h=x.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;x.useEffect(()=>{if(r){let b=function(E){if(h.paused||!s)return;const _=E.target;s.contains(_)?p.current=_:Wo(p.current,{select:!0})},v=function(E){if(h.paused||!s)return;const _=E.relatedTarget;_!==null&&(s.contains(_)||Wo(p.current,{select:!0}))},w=function(E){if(document.activeElement===document.body)for(const P of E)P.removedNodes.length>0&&Wo(s)};document.addEventListener("focusin",b),document.addEventListener("focusout",v);const C=new MutationObserver(w);return s&&C.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",b),document.removeEventListener("focusout",v),C.disconnect()}}},[r,s,h.paused]),x.useEffect(()=>{if(s){hE.add(h);const b=document.activeElement;if(!s.contains(b)){const w=new CustomEvent(Im,dE);s.addEventListener(Im,c),s.dispatchEvent(w),w.defaultPrevented||(A8(N8(rk(s)),{select:!0}),document.activeElement===b&&Wo(s))}return()=>{s.removeEventListener(Im,c),setTimeout(()=>{const w=new CustomEvent(Tm,dE);s.addEventListener(Tm,d),s.dispatchEvent(w),w.defaultPrevented||Wo(b??document.body,{select:!0}),s.removeEventListener(Tm,d),hE.remove(h)},0)}}},[s,c,d,h]);const y=x.useCallback(b=>{if(!n&&!r||h.paused)return;const v=b.key==="Tab"&&!b.altKey&&!b.ctrlKey&&!b.metaKey,w=document.activeElement;if(v&&w){const C=b.currentTarget,[E,_]=R8(C);E&&_?!b.shiftKey&&w===_?(b.preventDefault(),n&&Wo(E,{select:!0})):b.shiftKey&&w===E&&(b.preventDefault(),n&&Wo(_,{select:!0})):w===C&&b.preventDefault()}},[n,r,h.paused]);return O.jsx(wt.div,{tabIndex:-1,...a,ref:g,onKeyDown:y})});nk.displayName=P8;function A8(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Wo(r,{select:t}),document.activeElement!==n)return}function R8(e){const t=rk(e),n=pE(t,e),r=pE(t.reverse(),e);return[n,r]}function rk(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function pE(e,t){for(const n of e)if(!I8(n,{upTo:t}))return n}function I8(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 T8(e){return e instanceof HTMLInputElement&&"select"in e}function Wo(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&T8(e)&&t&&e.select()}}var hE=k8();function k8(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=gE(e,t),e.unshift(t)},remove(t){e=gE(e,t),e[0]?.resume()}}}function gE(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function N8(e){return e.filter(t=>t.tagName!=="A")}var M8="Portal",U0=x.forwardRef((e,t)=>{const{container:n,...r}=e,[i,o]=x.useState(!1);ia(()=>o(!0),[]);const a=n||i&&globalThis?.document?.body;return a?Up.createPortal(O.jsx(wt.div,{...r,ref:t}),a):null});U0.displayName=M8;var km=0;function D8(){x.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??mE()),document.body.insertAdjacentElement("beforeend",e[1]??mE()),km++,()=>{km===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),km--}},[])}function mE(){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 Pi=function(){return Pi=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},Pi.apply(this,arguments)};function ik(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 i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function j8(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))}var Ed="right-scroll-bar-position",_d="width-before-scroll-bar",L8="with-scroll-bars-hidden",$8="--removed-body-scroll-bar-size";function Nm(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function F8(e,t){var n=j.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=t,n.facade}var V8=typeof window<"u"?x.useLayoutEffect:x.useEffect,vE=new WeakMap;function B8(e,t){var n=F8(null,function(r){return e.forEach(function(i){return Nm(i,r)})});return V8(function(){var r=vE.get(n);if(r){var i=new Set(r),o=new Set(e),a=n.current;i.forEach(function(s){o.has(s)||Nm(s,null)}),o.forEach(function(s){i.has(s)||Nm(s,a)})}vE.set(n,e)},[e]),n}function z8(e){return e}function W8(e,t){t===void 0&&(t=z8);var n=[],r=!1,i={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(o){var a=t(o,r);return n.push(a),function(){n=n.filter(function(s){return s!==a})}},assignSyncMedium:function(o){for(r=!0;n.length;){var a=n;n=[],a.forEach(o)}n={push:function(s){return o(s)},filter:function(){return n}}},assignMedium:function(o){r=!0;var a=[];if(n.length){var s=n;n=[],s.forEach(o),a=n}var u=function(){var d=a;a=[],d.forEach(o)},c=function(){return Promise.resolve().then(u)};c(),n={push:function(d){a.push(d),c()},filter:function(d){return a=a.filter(d),n}}}};return i}function H8(e){e===void 0&&(e={});var t=W8(null);return t.options=Pi({async:!0,ssr:!1},e),t}var ok=function(e){var t=e.sideCar,n=ik(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 x.createElement(r,Pi({},n))};ok.isSideCarExport=!0;function U8(e,t){return e.useMedium(t),ok}var ak=H8(),Mm=function(){},fh=x.forwardRef(function(e,t){var n=x.useRef(null),r=x.useState({onScrollCapture:Mm,onWheelCapture:Mm,onTouchMoveCapture:Mm}),i=r[0],o=r[1],a=e.forwardProps,s=e.children,u=e.className,c=e.removeScrollBar,d=e.enabled,p=e.shards,g=e.sideCar,h=e.noRelative,y=e.noIsolation,b=e.inert,v=e.allowPinchZoom,w=e.as,C=w===void 0?"div":w,E=e.gapMode,_=ik(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),P=g,R=B8([n,t]),I=Pi(Pi({},_),i);return x.createElement(x.Fragment,null,d&&x.createElement(P,{sideCar:ak,removeScrollBar:c,shards:p,noRelative:h,noIsolation:y,inert:b,setCallbacks:o,allowPinchZoom:!!v,lockRef:n,gapMode:E}),a?x.cloneElement(x.Children.only(s),Pi(Pi({},I),{ref:R})):x.createElement(C,Pi({},I,{className:u,ref:R}),s))});fh.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};fh.classNames={fullWidth:_d,zeroRight:Ed};var G8=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function q8(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=G8();return t&&e.setAttribute("nonce",t),e}function K8(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Y8(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var X8=function(){var e=0,t=null;return{add:function(n){e==0&&(t=q8())&&(K8(t,n),Y8(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Z8=function(){var e=X8();return function(t,n){x.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},sk=function(){var e=Z8(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},Q8={left:0,top:0,right:0,gap:0},Dm=function(e){return parseInt(e||"",10)||0},J8=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[Dm(n),Dm(r),Dm(i)]},e9=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Q8;var t=J8(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])}},t9=sk(),ll="data-scroll-locked",n9=function(e,t,n,r){var i=e.left,o=e.top,a=e.right,s=e.gap;return n===void 0&&(n="margin"),`
104
+ .`.concat(L8,` {
105
105
  overflow: hidden `).concat(r,`;
106
106
  padding-right: `).concat(s,"px ").concat(r,`;
107
107
  }
108
- body[`).concat(Ti,`] {
108
+ body[`).concat(ll,`] {
109
109
  overflow: hidden `).concat(r,`;
110
110
  overscroll-behavior: contain;
111
111
  `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
112
- padding-left: `.concat(o,`px;
113
- padding-top: `).concat(i,`px;
112
+ padding-left: `.concat(i,`px;
113
+ padding-top: `).concat(o,`px;
114
114
  padding-right: `).concat(a,`px;
115
115
  margin-left:0;
116
116
  margin-top:0;
@@ -118,94 +118,113 @@ has-data-[slot=combobox-chip-remove]:pr-0`,YF=Ve(`text-primary-text placeholder:
118
118
  `),n==="padding"&&"padding-right: ".concat(s,"px ").concat(r,";")].filter(Boolean).join(""),`
119
119
  }
120
120
 
121
- .`).concat(Dl,` {
121
+ .`).concat(Ed,` {
122
122
  right: `).concat(s,"px ").concat(r,`;
123
123
  }
124
124
 
125
- .`).concat(jl,` {
125
+ .`).concat(_d,` {
126
126
  margin-right: `).concat(s,"px ").concat(r,`;
127
127
  }
128
128
 
129
- .`).concat(Dl," .").concat(Dl,` {
129
+ .`).concat(Ed," .").concat(Ed,` {
130
130
  right: 0 `).concat(r,`;
131
131
  }
132
132
 
133
- .`).concat(jl," .").concat(jl,` {
133
+ .`).concat(_d," .").concat(_d,` {
134
134
  margin-right: 0 `).concat(r,`;
135
135
  }
136
136
 
137
- body[`).concat(Ti,`] {
138
- `).concat(SV,": ").concat(s,`px;
137
+ body[`).concat(ll,`] {
138
+ `).concat($8,": ").concat(s,`px;
139
139
  }
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`
140
+ `)},yE=function(){var e=parseInt(document.body.getAttribute(ll)||"0",10);return isFinite(e)?e:0},r9=function(){x.useEffect(function(){return document.body.setAttribute(ll,(yE()+1).toString()),function(){var e=yE()-1;e<=0?document.body.removeAttribute(ll):document.body.setAttribute(ll,e.toString())}},[])},i9=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r;r9();var o=x.useMemo(function(){return e9(i)},[i]);return x.createElement(t9,{styles:n9(o,!t,i,n?"":"!important")})},zy=!1;if(typeof window<"u")try{var Xf=Object.defineProperty({},"passive",{get:function(){return zy=!0,!0}});window.addEventListener("test",Xf,Xf),window.removeEventListener("test",Xf,Xf)}catch{zy=!1}var Ws=zy?{passive:!1}:!1,o9=function(e){return e.tagName==="TEXTAREA"},lk=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!o9(e)&&n[t]==="visible")},a9=function(e){return lk(e,"overflowY")},s9=function(e){return lk(e,"overflowX")},bE=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var i=uk(e,r);if(i){var o=ck(e,r),a=o[1],s=o[2];if(a>s)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},l9=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},u9=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},uk=function(e,t){return e==="v"?a9(t):s9(t)},ck=function(e,t){return e==="v"?l9(t):u9(t)},c9=function(e,t){return e==="h"&&t==="rtl"?-1:1},f9=function(e,t,n,r,i){var o=c9(e,window.getComputedStyle(t).direction),a=o*r,s=n.target,u=t.contains(s),c=!1,d=a>0,p=0,g=0;do{if(!s)break;var h=ck(e,s),y=h[0],b=h[1],v=h[2],w=b-v-o*y;(y||w)&&uk(e,s)&&(p+=w,g+=y);var C=s.parentNode;s=C&&C.nodeType===Node.DOCUMENT_FRAGMENT_NODE?C.host:C}while(!u&&s!==document.body||u&&(t.contains(s)||t===s));return(d&&Math.abs(p)<1||!d&&Math.abs(g)<1)&&(c=!0),c},Zf=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},xE=function(e){return[e.deltaX,e.deltaY]},wE=function(e){return e&&"current"in e?e.current:e},d9=function(e,t){return e[0]===t[0]&&e[1]===t[1]},p9=function(e){return`
141
141
  .block-interactivity-`.concat(e,` {pointer-events: none;}
142
142
  .allow-interactivity-`).concat(e,` {pointer-events: all;}
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.
143
+ `)},h9=0,Hs=[];function g9(e){var t=x.useRef([]),n=x.useRef([0,0]),r=x.useRef(),i=x.useState(h9++)[0],o=x.useState(sk)[0],a=x.useRef(e);x.useEffect(function(){a.current=e},[e]),x.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var b=j8([e.lockRef.current],(e.shards||[]).map(wE),!0).filter(Boolean);return b.forEach(function(v){return v.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),b.forEach(function(v){return v.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var s=x.useCallback(function(b,v){if("touches"in b&&b.touches.length===2||b.type==="wheel"&&b.ctrlKey)return!a.current.allowPinchZoom;var w=Zf(b),C=n.current,E="deltaX"in b?b.deltaX:C[0]-w[0],_="deltaY"in b?b.deltaY:C[1]-w[1],P,R=b.target,I=Math.abs(E)>Math.abs(_)?"h":"v";if("touches"in b&&I==="h"&&R.type==="range")return!1;var k=window.getSelection(),B=k&&k.anchorNode,L=B?B===R||B.contains(R):!1;if(L)return!1;var V=bE(I,R);if(!V)return!0;if(V?P=I:(P=I==="v"?"h":"v",V=bE(I,R)),!V)return!1;if(!r.current&&"changedTouches"in b&&(E||_)&&(r.current=P),!P)return!0;var D=r.current||P;return f9(D,v,b,D==="h"?E:_)},[]),u=x.useCallback(function(b){var v=b;if(!(!Hs.length||Hs[Hs.length-1]!==o)){var w="deltaY"in v?xE(v):Zf(v),C=t.current.filter(function(P){return P.name===v.type&&(P.target===v.target||v.target===P.shadowParent)&&d9(P.delta,w)})[0];if(C&&C.should){v.cancelable&&v.preventDefault();return}if(!C){var E=(a.current.shards||[]).map(wE).filter(Boolean).filter(function(P){return P.contains(v.target)}),_=E.length>0?s(v,E[0]):!a.current.noIsolation;_&&v.cancelable&&v.preventDefault()}}},[]),c=x.useCallback(function(b,v,w,C){var E={name:b,delta:v,target:w,should:C,shadowParent:m9(w)};t.current.push(E),setTimeout(function(){t.current=t.current.filter(function(_){return _!==E})},1)},[]),d=x.useCallback(function(b){n.current=Zf(b),r.current=void 0},[]),p=x.useCallback(function(b){c(b.type,xE(b),b.target,s(b,e.lockRef.current))},[]),g=x.useCallback(function(b){c(b.type,Zf(b),b.target,s(b,e.lockRef.current))},[]);x.useEffect(function(){return Hs.push(o),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:g}),document.addEventListener("wheel",u,Ws),document.addEventListener("touchmove",u,Ws),document.addEventListener("touchstart",d,Ws),function(){Hs=Hs.filter(function(b){return b!==o}),document.removeEventListener("wheel",u,Ws),document.removeEventListener("touchmove",u,Ws),document.removeEventListener("touchstart",d,Ws)}},[]);var h=e.removeScrollBar,y=e.inert;return x.createElement(x.Fragment,null,y?x.createElement(o,{styles:p9(i)}):null,h?x.createElement(i9,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function m9(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const v9=U8(ak,g9);var fk=x.forwardRef(function(e,t){return x.createElement(fh,Pi({},e,{ref:t,sideCar:v9}))});fk.classNames=fh.classNames;var y9=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Us=new WeakMap,Qf=new WeakMap,Jf={},jm=0,dk=function(e){return e&&(e.host||dk(e.parentNode))},b9=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=dk(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})},x9=function(e,t,n,r){var i=b9(t,Array.isArray(e)?e:[e]);Jf[n]||(Jf[n]=new WeakMap);var o=Jf[n],a=[],s=new Set,u=new Set(i),c=function(p){!p||s.has(p)||(s.add(p),c(p.parentNode))};i.forEach(c);var d=function(p){!p||u.has(p)||Array.prototype.forEach.call(p.children,function(g){if(s.has(g))d(g);else try{var h=g.getAttribute(r),y=h!==null&&h!=="false",b=(Us.get(g)||0)+1,v=(o.get(g)||0)+1;Us.set(g,b),o.set(g,v),a.push(g),b===1&&y&&Qf.set(g,!0),v===1&&g.setAttribute(n,"true"),y||g.setAttribute(r,"true")}catch(w){console.error("aria-hidden: cannot operate on ",g,w)}})};return d(t),s.clear(),jm++,function(){a.forEach(function(p){var g=Us.get(p)-1,h=o.get(p)-1;Us.set(p,g),o.set(p,h),g||(Qf.has(p)||p.removeAttribute(r),Qf.delete(p)),h||p.removeAttribute(n)}),jm--,jm||(Us=new WeakMap,Us=new WeakMap,Qf=new WeakMap,Jf={})}},w9=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=y9(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live], script"))),x9(r,i,n,"aria-hidden")):function(){return null}},dh="Dialog",[pk]=Fi(dh),[C9,hi]=pk(dh),hk=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:o,modal:a=!0}=e,s=x.useRef(null),u=x.useRef(null),[c,d]=us({prop:r,defaultProp:i??!1,onChange:o,caller:dh});return O.jsx(C9,{scope:t,triggerRef:s,contentRef:u,contentId:sl(),titleId:sl(),descriptionId:sl(),open:c,onOpenChange:d,onOpenToggle:x.useCallback(()=>d(p=>!p),[d]),modal:a,children:n})};hk.displayName=dh;var gk="DialogTrigger",mk=x.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=hi(gk,n),o=Zt(t,i.triggerRef);return O.jsx(wt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":K0(i.open),...r,ref:o,onClick:bt(e.onClick,i.onOpenToggle)})});mk.displayName=gk;var G0="DialogPortal",[S9,vk]=pk(G0,{forceMount:void 0}),yk=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:i}=e,o=hi(G0,t);return O.jsx(S9,{scope:t,forceMount:n,children:x.Children.map(r,a=>O.jsx(yo,{present:n||o.open,children:O.jsx(U0,{asChild:!0,container:i,children:a})}))})};yk.displayName=G0;var Kd="DialogOverlay",bk=x.forwardRef((e,t)=>{const n=vk(Kd,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,o=hi(Kd,e.__scopeDialog);return o.modal?O.jsx(yo,{present:r||o.open,children:O.jsx(_9,{...i,ref:t})}):null});bk.displayName=Kd;var E9=Nd("DialogOverlay.RemoveScroll"),_9=x.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=hi(Kd,n);return O.jsx(fk,{as:E9,allowPinchZoom:!0,shards:[i.contentRef],children:O.jsx(wt.div,{"data-state":K0(i.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),es="DialogContent",xk=x.forwardRef((e,t)=>{const n=vk(es,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,o=hi(es,e.__scopeDialog);return O.jsx(yo,{present:r||o.open,children:o.modal?O.jsx(O9,{...i,ref:t}):O.jsx(P9,{...i,ref:t})})});xk.displayName=es;var O9=x.forwardRef((e,t)=>{const n=hi(es,e.__scopeDialog),r=x.useRef(null),i=Zt(t,n.contentRef,r);return x.useEffect(()=>{const o=r.current;if(o)return w9(o)},[]),O.jsx(wk,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:bt(e.onCloseAutoFocus,o=>{o.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:bt(e.onPointerDownOutside,o=>{const a=o.detail.originalEvent,s=a.button===0&&a.ctrlKey===!0;(a.button===2||s)&&o.preventDefault()}),onFocusOutside:bt(e.onFocusOutside,o=>o.preventDefault())})}),P9=x.forwardRef((e,t)=>{const n=hi(es,e.__scopeDialog),r=x.useRef(!1),i=x.useRef(!1);return O.jsx(wk,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{e.onCloseAutoFocus?.(o),o.defaultPrevented||(r.current||n.triggerRef.current?.focus(),o.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:o=>{e.onInteractOutside?.(o),o.defaultPrevented||(r.current=!0,o.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const a=o.target;n.triggerRef.current?.contains(a)&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&i.current&&o.preventDefault()}})}),wk=x.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:o,...a}=e,s=hi(es,n),u=x.useRef(null),c=Zt(t,u);return D8(),O.jsxs(O.Fragment,{children:[O.jsx(nk,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:o,children:O.jsx(H0,{role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":K0(s.open),...a,ref:c,onDismiss:()=>s.onOpenChange(!1)})}),O.jsxs(O.Fragment,{children:[O.jsx(A9,{titleId:s.titleId}),O.jsx(I9,{contentRef:u,descriptionId:s.descriptionId})]})]})}),q0="DialogTitle",Ck=x.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=hi(q0,n);return O.jsx(wt.h2,{id:i.titleId,...r,ref:t})});Ck.displayName=q0;var Sk="DialogDescription",Ek=x.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=hi(Sk,n);return O.jsx(wt.p,{id:i.descriptionId,...r,ref:t})});Ek.displayName=Sk;var _k="DialogClose",Ok=x.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=hi(_k,n);return O.jsx(wt.button,{type:"button",...r,ref:t,onClick:bt(e.onClick,()=>i.onOpenChange(!1))})});Ok.displayName=_k;function K0(e){return e?"open":"closed"}var Pk="DialogTitleWarning",[age,Ak]=RH(Pk,{contentName:es,titleName:q0,docsSlug:"dialog"}),A9=({titleId:e})=>{const t=Ak(Pk),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 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:
147
+ For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return x.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},R9="DialogDescriptionWarning",I9=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Ak(R9).contentName}}.`;return x.useEffect(()=>{const i=e.current?.getAttribute("aria-describedby");t&&i&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},T9=hk,k9=mk,N9=yk,Rk=bk,Ik=xk,Tk=Ck,kk=Ek,Nk=Ok;const M9=["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"],D9=["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%]"],j9=["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"],L9=["flex flex-col gap-1.5 pr-10 text-left"],$9=["flex flex-col-reverse sm:flex-row sm:justify-end gap-4 [&>*]:flex-1"],F9=["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"],V9=["tracking-normal text-sm font-normal text-secondary-text"],Mk=T9,B9=k9,Dk=N9,z9=Nk,Y0=({className:e,...t})=>O.jsx(Rk,{className:ue(...M9,e),...t});Y0.displayName=Rk.displayName;const X0=({className:e,children:t,showCloseButton:n=!0,...r})=>O.jsxs(Dk,{children:[O.jsx(Y0,{}),O.jsxs(Ik,{className:ue(...D9,e),...r,children:[t,n&&O.jsxs(Nk,{className:ue(...j9),children:[O.jsx(uo,{type:"close",viewBox:"3.2 3.2 17.1 17.1"}),O.jsx("span",{className:"sr-only",children:"Close"})]})]})]});X0.displayName=Ik.displayName;const Z0=({className:e,...t})=>O.jsx("div",{className:ue(...L9,e),...t});Z0.displayName="DialogHeader";const Q0=({className:e,...t})=>O.jsx("div",{className:ue(...$9,e),...t});Q0.displayName="DialogFooter";const J0=({className:e,...t})=>O.jsx(Tk,{className:ue(...F9,e),...t});J0.displayName=Tk.displayName;const jk=({className:e,...t})=>O.jsx(kk,{className:ue(...V9,e),...t});jk.displayName=kk.displayName;const W9=xt(["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}}),H9=dn("body-sm-medium"),Lk=({icon:e,label:t,badge:n,active:r=!1,collapsed:i=!1,disabled:o=!1,onAction:a,className:s,...u})=>{const c=ue(W9({active:r,collapsed:i}),o&&"pointer-events-none opacity-50",s),d=O.jsxs(O.Fragment,{children:[O.jsx("span",{className:"shrink-0 text-inherit [&_svg]:size-5 [&_svg]:shrink-0",children:e}),!i&&t&&O.jsx("span",{className:H9,children:t}),!i&&n&&O.jsx("span",{className:"ml-auto shrink-0",children:n})]});if("href"in u&&typeof u.href=="string"){const{href:h,rel:y,target:b,...v}=u,w=b==="_blank"?[y,"noopener","noreferrer"].filter(Boolean).join(" "):y;return O.jsx("a",{href:h,target:b,rel:w,"aria-disabled":o||void 0,tabIndex:o?-1:void 0,className:c,onClick:C=>{if(o){C.preventDefault();return}a?.()},...v,children:d})}const{type:p="button",...g}=u;return O.jsx("button",{type:p,disabled:o,className:c,onClick:()=>a?.(),...g,children:d})},U9=xt("px-2.5 py-3",{variants:{divider:{true:"",false:""}},defaultVariants:{divider:!1}}),G9=[dn("body-xs-medium"),"mb-1 px-2 text-secondary-text uppercase"].join(" "),$k=({title:e,divider:t=!1,collapsed:n=!1,className:r,children:i,...o})=>O.jsxs("section",{className:ue(U9({divider:t}),r),...o,children:[!n&&e&&O.jsx("p",{className:G9,children:e}),O.jsx("div",{className:"space-y-1",children:i})]}),ex=({className:e,...t})=>O.jsx("nav",{role:"navigation","aria-label":"pagination",className:ue("mx-auto flex w-full justify-center",e),...t});ex.displayName="Pagination";const tx=({className:e,ref:t,...n})=>O.jsx("ul",{ref:t,className:ue("flex flex-row items-center gap-1",e),...n});tx.displayName="PaginationContent";const tl=({className:e,ref:t,...n})=>O.jsx("li",{ref:t,className:ue("",e),...n});tl.displayName="PaginationItem";const uc=({className:e,isActive:t,size:n=null,...r})=>O.jsx("a",{"aria-current":t?"page":void 0,className:ue(Jb({size:n}),e),...r});uc.displayName="PaginationLink";const Fk=({className:e,...t})=>O.jsxs(uc,{"aria-label":"Go to previous page",size:"md",className:ue("gap-1 pl-2.5",e),...t,children:[O.jsx(XR,{className:"h-4 w-4"}),O.jsx("span",{children:"Previous"})]});Fk.displayName="PaginationPrevious";const Vk=({className:e,...t})=>O.jsxs(uc,{"aria-label":"Go to next page",size:"md",className:ue("gap-1 pr-2.5",e),...t,children:[O.jsx("span",{children:"Next"}),O.jsx(ZR,{className:"h-4 w-4"})]});Vk.displayName="PaginationNext";const Bk=({className:e,...t})=>O.jsxs("span",{"aria-hidden":!0,className:ue("flex h-9 w-9 items-center justify-center",e),...t,children:[O.jsx(QR,{className:"h-4 w-4"}),O.jsx("span",{className:"sr-only",children:"More pages"})]});Bk.displayName="PaginationEllipsis";function q9(e,t=[]){let n=[];function r(o,a){const s=x.createContext(a);s.displayName=o+"Context";const u=n.length;n=[...n,a];const c=p=>{const{scope:g,children:h,...y}=p,b=g?.[e]?.[u]||s,v=x.useMemo(()=>y,Object.values(y));return O.jsx(b.Provider,{value:v,children:h})};c.displayName=o+"Provider";function d(p,g){const h=g?.[e]?.[u]||s,y=x.useContext(h);if(y)return y;if(a!==void 0)return a;throw new Error(`\`${p}\` must be used within \`${o}\``)}return[c,d]}const i=()=>{const o=n.map(a=>x.createContext(a));return function(s){const u=s?.[e]||o;return x.useMemo(()=>({[`__scope${e}`]:{...s,[e]:u}}),[s,u])}};return i.scopeName=e,[r,K9(i,...t)]}function K9(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const a=r.reduce((s,{useScope:u,scopeName:c})=>{const p=u(o)[`__scope${c}`];return{...s,...p}},{});return x.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}var nx="Progress",rx=100,[Y9]=q9(nx),[X9,Z9]=Y9(nx),zk=x.forwardRef((e,t)=>{const{__scopeProgress:n,value:r=null,max:i,getValueLabel:o=Q9,...a}=e;(i||i===0)&&!CE(i)&&console.error(J9(`${i}`,"Progress"));const s=CE(i)?i:rx;r!==null&&!SE(r,s)&&console.error(e7(`${r}`,"Progress"));const u=SE(r,s)?r:null,c=Yd(u)?o(u,s):void 0;return O.jsx(X9,{scope:n,value:u,max:s,children:O.jsx(sh.div,{"aria-valuemax":s,"aria-valuemin":0,"aria-valuenow":Yd(u)?u:void 0,"aria-valuetext":c,role:"progressbar","data-state":Uk(u,s),"data-value":u??void 0,"data-max":s,...a,ref:t})})});zk.displayName=nx;var Wk="ProgressIndicator",Hk=x.forwardRef((e,t)=>{const{__scopeProgress:n,...r}=e,i=Z9(Wk,n);return O.jsx(sh.div,{"data-state":Uk(i.value,i.max),"data-value":i.value??void 0,"data-max":i.max,...r,ref:t})});Hk.displayName=Wk;function Q9(e,t){return`${Math.round(e/t*100)}%`}function Uk(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function Yd(e){return typeof e=="number"}function CE(e){return Yd(e)&&!isNaN(e)&&e>0}function SE(e,t){return Yd(e)&&!isNaN(e)&&e<=t&&e>=0}function J9(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${rx}\`.`}function e7(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 ${yg} if no \`max\` prop is set)
150
+ - less than the value passed to \`max\` (or ${rx} if no \`max\` prop is set)
151
151
  - \`null\` or \`undefined\` if the progress is indeterminate.
152
152
 
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
153
+ Defaulting to \`null\`.`}var Gk=zk,t7=Hk;const qk=({className:e,value:t=0,max:n=100,ref:r,...i})=>{const o=Math.min(n,Math.max(0,Number(t))),a=o/n*100,s=a>=100,u=`${Math.round(a)}%`;return O.jsxs("div",{className:"flex items-center gap-1",children:[O.jsx(Gk,{ref:r,value:o,max:n,className:ue("bg-primary-inverse-bg/20 relative h-1.5 w-full overflow-hidden rounded-full",e),...i,children:O.jsx(t7,{className:ue("h-full w-full flex-1 rounded-[0.75rem] transition-all",s?"bg-success-text":"bg-primary-inverse-bg"),style:{transform:`translateX(-${n-a}%)`}})}),O.jsx("p",{className:ue("text-center",dn("body-xs-regular"),s?"text-success-text":"text-primary-text"),children:u})]})};qk.displayName=Gk.displayName;function n7(e){const t=e+"CollectionProvider",[n,r]=Fi(t),[i,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=b=>{const{scope:v,children:w}=b,C=j.useRef(null),E=j.useRef(new Map).current;return O.jsx(i,{scope:v,itemMap:E,collectionRef:C,children:w})};a.displayName=t;const s=e+"CollectionSlot",u=Nd(s),c=j.forwardRef((b,v)=>{const{scope:w,children:C}=b,E=o(s,w),_=Zt(v,E.collectionRef);return O.jsx(u,{ref:_,children:C})});c.displayName=s;const d=e+"CollectionItemSlot",p="data-radix-collection-item",g=Nd(d),h=j.forwardRef((b,v)=>{const{scope:w,children:C,...E}=b,_=j.useRef(null),P=Zt(v,_),R=o(d,w);return j.useEffect(()=>(R.itemMap.set(_,{ref:_,...E}),()=>{R.itemMap.delete(_)})),O.jsx(g,{[p]:"",ref:P,children:C})});h.displayName=d;function y(b){const v=o(e+"CollectionConsumer",b);return j.useCallback(()=>{const C=v.collectionRef.current;if(!C)return[];const E=Array.from(C.querySelectorAll(`[${p}]`));return Array.from(v.itemMap.values()).sort((R,I)=>E.indexOf(R.ref.current)-E.indexOf(I.ref.current))},[v.collectionRef,v.itemMap])}return[{Provider:a,Slot:c,ItemSlot:h},y,r]}var r7=x.createContext(void 0);function ix(e){const t=x.useContext(r7);return e||t||"ltr"}var Lm="rovingFocusGroup.onEntryFocus",i7={bubbles:!1,cancelable:!0},cc="RovingFocusGroup",[Wy,Kk,o7]=n7(cc),[a7,ph]=Fi(cc,[o7]),[s7,l7]=a7(cc),Yk=x.forwardRef((e,t)=>O.jsx(Wy.Provider,{scope:e.__scopeRovingFocusGroup,children:O.jsx(Wy.Slot,{scope:e.__scopeRovingFocusGroup,children:O.jsx(u7,{...e,ref:t})})}));Yk.displayName=cc;var u7=x.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:o,currentTabStopId:a,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:u,onEntryFocus:c,preventScrollOnEntryFocus:d=!1,...p}=e,g=x.useRef(null),h=Zt(t,g),y=ix(o),[b,v]=us({prop:a,defaultProp:s??null,onChange:u,caller:cc}),[w,C]=x.useState(!1),E=Ja(c),_=Kk(n),P=x.useRef(!1),[R,I]=x.useState(0);return x.useEffect(()=>{const k=g.current;if(k)return k.addEventListener(Lm,E),()=>k.removeEventListener(Lm,E)},[E]),O.jsx(s7,{scope:n,orientation:r,dir:y,loop:i,currentTabStopId:b,onItemFocus:x.useCallback(k=>v(k),[v]),onItemShiftTab:x.useCallback(()=>C(!0),[]),onFocusableItemAdd:x.useCallback(()=>I(k=>k+1),[]),onFocusableItemRemove:x.useCallback(()=>I(k=>k-1),[]),children:O.jsx(wt.div,{tabIndex:w||R===0?-1:0,"data-orientation":r,...p,ref:h,style:{outline:"none",...e.style},onMouseDown:bt(e.onMouseDown,()=>{P.current=!0}),onFocus:bt(e.onFocus,k=>{const B=!P.current;if(k.target===k.currentTarget&&B&&!w){const L=new CustomEvent(Lm,i7);if(k.currentTarget.dispatchEvent(L),!L.defaultPrevented){const V=_().filter(G=>G.focusable),D=V.find(G=>G.active),H=V.find(G=>G.id===b),te=[D,H,...V].filter(Boolean).map(G=>G.ref.current);Qk(te,d)}}P.current=!1}),onBlur:bt(e.onBlur,()=>C(!1))})})}),Xk="RovingFocusGroupItem",Zk=x.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:o,children:a,...s}=e,u=sl(),c=o||u,d=l7(Xk,n),p=d.currentTabStopId===c,g=Kk(n),{onFocusableItemAdd:h,onFocusableItemRemove:y,currentTabStopId:b}=d;return x.useEffect(()=>{if(r)return h(),()=>y()},[r,h,y]),O.jsx(Wy.ItemSlot,{scope:n,id:c,focusable:r,active:i,children:O.jsx(wt.span,{tabIndex:p?0:-1,"data-orientation":d.orientation,...s,ref:t,onMouseDown:bt(e.onMouseDown,v=>{r?d.onItemFocus(c):v.preventDefault()}),onFocus:bt(e.onFocus,()=>d.onItemFocus(c)),onKeyDown:bt(e.onKeyDown,v=>{if(v.key==="Tab"&&v.shiftKey){d.onItemShiftTab();return}if(v.target!==v.currentTarget)return;const w=d7(v,d.orientation,d.dir);if(w!==void 0){if(v.metaKey||v.ctrlKey||v.altKey||v.shiftKey)return;v.preventDefault();let E=g().filter(_=>_.focusable).map(_=>_.ref.current);if(w==="last")E.reverse();else if(w==="prev"||w==="next"){w==="prev"&&E.reverse();const _=E.indexOf(v.currentTarget);E=d.loop?p7(E,_+1):E.slice(_+1)}setTimeout(()=>Qk(E))}}),children:typeof a=="function"?a({isCurrentTabStop:p,hasTabStop:b!=null}):a})})});Zk.displayName=Xk;var c7={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function f7(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function d7(e,t,n){const r=f7(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return c7[r]}function Qk(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function p7(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Jk=Yk,eN=Zk,ox="Radio",[h7,tN]=Fi(ox),[g7,m7]=h7(ox),nN=x.forwardRef((e,t)=>{const{__scopeRadio:n,name:r,checked:i=!1,required:o,disabled:a,value:s="on",onCheck:u,form:c,...d}=e,[p,g]=x.useState(null),h=Zt(t,v=>g(v)),y=x.useRef(!1),b=p?c||!!p.closest("form"):!0;return O.jsxs(g7,{scope:n,checked:i,disabled:a,children:[O.jsx(wt.button,{type:"button",role:"radio","aria-checked":i,"data-state":aN(i),"data-disabled":a?"":void 0,disabled:a,value:s,...d,ref:h,onClick:bt(e.onClick,v=>{i||u?.(),b&&(y.current=v.isPropagationStopped(),y.current||v.stopPropagation())})}),b&&O.jsx(oN,{control:p,bubbles:!y.current,name:r,value:s,checked:i,required:o,disabled:a,form:c,style:{transform:"translateX(-100%)"}})]})});nN.displayName=ox;var rN="RadioIndicator",iN=x.forwardRef((e,t)=>{const{__scopeRadio:n,forceMount:r,...i}=e,o=m7(rN,n);return O.jsx(yo,{present:r||o.checked,children:O.jsx(wt.span,{"data-state":aN(o.checked),"data-disabled":o.disabled?"":void 0,...i,ref:t})})});iN.displayName=rN;var v7="RadioBubbleInput",oN=x.forwardRef(({__scopeRadio:e,control:t,checked:n,bubbles:r=!0,...i},o)=>{const a=x.useRef(null),s=Zt(a,o),u=e0(n),c=Gp(t);return x.useEffect(()=>{const d=a.current;if(!d)return;const p=window.HTMLInputElement.prototype,h=Object.getOwnPropertyDescriptor(p,"checked").set;if(u!==n&&h){const y=new Event("click",{bubbles:r});h.call(d,n),d.dispatchEvent(y)}},[u,n,r]),O.jsx(wt.input,{type:"radio","aria-hidden":!0,defaultChecked:n,...i,tabIndex:-1,ref:s,style:{...i.style,...c,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});oN.displayName=v7;function aN(e){return e?"checked":"unchecked"}var y7=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],hh="RadioGroup",[b7]=Fi(hh,[ph,tN]),sN=ph(),lN=tN(),[x7,w7]=b7(hh),uN=x.forwardRef((e,t)=>{const{__scopeRadioGroup:n,name:r,defaultValue:i,value:o,required:a=!1,disabled:s=!1,orientation:u,dir:c,loop:d=!0,onValueChange:p,...g}=e,h=sN(n),y=ix(c),[b,v]=us({prop:o,defaultProp:i??null,onChange:p,caller:hh});return O.jsx(x7,{scope:n,name:r,required:a,disabled:s,value:b,onValueChange:v,children:O.jsx(Jk,{asChild:!0,...h,orientation:u,dir:y,loop:d,children:O.jsx(wt.div,{role:"radiogroup","aria-required":a,"aria-orientation":u,"data-disabled":s?"":void 0,dir:y,...g,ref:t})})})});uN.displayName=hh;var cN="RadioGroupItem",fN=x.forwardRef((e,t)=>{const{__scopeRadioGroup:n,disabled:r,...i}=e,o=w7(cN,n),a=o.disabled||r,s=sN(n),u=lN(n),c=x.useRef(null),d=Zt(t,c),p=o.value===i.value,g=x.useRef(!1);return x.useEffect(()=>{const h=b=>{y7.includes(b.key)&&(g.current=!0)},y=()=>g.current=!1;return document.addEventListener("keydown",h),document.addEventListener("keyup",y),()=>{document.removeEventListener("keydown",h),document.removeEventListener("keyup",y)}},[]),O.jsx(eN,{asChild:!0,...s,focusable:!a,active:p,children:O.jsx(nN,{disabled:a,required:o.required,checked:p,...u,...i,name:o.name,ref:d,onCheck:()=>o.onValueChange(i.value),onKeyDown:bt(h=>{h.key==="Enter"&&h.preventDefault()}),onFocus:bt(i.onFocus,()=>{g.current&&c.current?.click()})})})});fN.displayName=cN;var C7="RadioGroupIndicator",dN=x.forwardRef((e,t)=>{const{__scopeRadioGroup:n,...r}=e,i=lN(n);return O.jsx(iN,{...i,...r,ref:t})});dN.displayName=C7;var pN=uN,hN=fN,S7=dN;const E7=["grid gap-2"],_7=["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"],O7=["flex items-center justify-center"],P7=["size-2.5 rounded-full bg-primary-text transition-colors duration-200","group-hover:bg-secondary-text","group-disabled:bg-disabled-text"],ax=({className:e,ref:t,...n})=>O.jsx(pN,{className:ue(E7,e),...n,ref:t});ax.displayName=pN.displayName;const Xd=({className:e,ref:t,...n})=>O.jsx(hN,{ref:t,className:ue(_7,e),...n,children:O.jsx(S7,{className:ue(O7),children:O.jsx("span",{className:ue(P7)})})});Xd.displayName=hN.displayName;var gh="Switch",[A7]=Fi(gh),[R7,I7]=A7(gh),gN=x.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:i,defaultChecked:o,required:a,disabled:s,value:u="on",onCheckedChange:c,form:d,...p}=e,[g,h]=x.useState(null),y=Zt(t,E=>h(E)),b=x.useRef(!1),v=g?d||!!g.closest("form"):!0,[w,C]=us({prop:i,defaultProp:o??!1,onChange:c,caller:gh});return O.jsxs(R7,{scope:n,checked:w,disabled:s,children:[O.jsx(wt.button,{type:"button",role:"switch","aria-checked":w,"aria-required":a,"data-state":bN(w),"data-disabled":s?"":void 0,disabled:s,value:u,...p,ref:y,onClick:bt(e.onClick,E=>{C(_=>!_),v&&(b.current=E.isPropagationStopped(),b.current||E.stopPropagation())})}),v&&O.jsx(yN,{control:g,bubbles:!b.current,name:r,value:u,checked:w,required:a,disabled:s,form:d,style:{transform:"translateX(-100%)"}})]})});gN.displayName=gh;var mN="SwitchThumb",vN=x.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,i=I7(mN,n);return O.jsx(wt.span,{"data-state":bN(i.checked),"data-disabled":i.disabled?"":void 0,...r,ref:t})});vN.displayName=mN;var T7="SwitchBubbleInput",yN=x.forwardRef(({__scopeSwitch:e,control:t,checked:n,bubbles:r=!0,...i},o)=>{const a=x.useRef(null),s=Zt(a,o),u=e0(n),c=Gp(t);return x.useEffect(()=>{const d=a.current;if(!d)return;const p=window.HTMLInputElement.prototype,h=Object.getOwnPropertyDescriptor(p,"checked").set;if(u!==n&&h){const y=new Event("click",{bubbles:r});h.call(d,n),d.dispatchEvent(y)}},[u,n,r]),O.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...i,tabIndex:-1,ref:s,style:{...i.style,...c,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});yN.displayName=T7;function bN(e){return e?"checked":"unchecked"}var xN=gN,k7=vN;const N7=["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"],M7=["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"],wN=({className:e,ref:t,...n})=>O.jsx(xN,{className:ue(N7,e),...n,ref:t,children:O.jsx(k7,{className:ue(M7)})});wN.displayName=xN.displayName;const sx=({ref:e,className:t,...n})=>O.jsx("div",{className:"relative w-full overflow-auto",children:O.jsx("table",{ref:e,className:ue("w-full caption-bottom text-sm",t),...n})});sx.displayName="Table";const lx=({ref:e,className:t,...n})=>O.jsx("thead",{ref:e,className:ue("text-primary-text [&_tr]:border-b",t),...n});lx.displayName="TableHeader";const ux=({ref:e,className:t,...n})=>O.jsx("tbody",{ref:e,className:ue(t),...n});ux.displayName="TableBody";const CN=({ref:e,className:t,...n})=>O.jsx("tfoot",{ref:e,className:ue("bg-muted/50 border-t font-medium",t),...n});CN.displayName="TableFooter";const Mu=({ref:e,className:t,...n})=>O.jsx("tr",{ref:e,className:ue(`hover:bg-muted/50 data-[state=selected]:bg-muted border-delicate-border border-b
154
+ transition-colors`,t),...n});Mu.displayName="TableRow";const cx=({ref:e,className:t,...n})=>O.jsx("th",{ref:e,className:ue(`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});cx.displayName="TableHead";const Zd=({ref:e,className:t,...n})=>O.jsx("td",{ref:e,className:ue(`px-6.25 pt-6 pb-3.5 align-middle [&:has([role=checkbox])]:pr-0
156
+ *:[[role=checkbox]]:translate-y-0.5`,t),...n});Zd.displayName="TableCell";const SN=({ref:e,className:t,...n})=>O.jsx("caption",{ref:e,className:ue("text-muted-foreground mt-4 text-sm",t),...n});SN.displayName="TableCaption";var mh="Tabs",[D7]=Fi(mh,[ph]),EN=ph(),[j7,fx]=D7(mh),_N=x.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:i,defaultValue:o,orientation:a="horizontal",dir:s,activationMode:u="automatic",...c}=e,d=ix(s),[p,g]=us({prop:r,onChange:i,defaultProp:o??"",caller:mh});return O.jsx(j7,{scope:n,baseId:sl(),value:p,onValueChange:g,orientation:a,dir:d,activationMode:u,children:O.jsx(wt.div,{dir:d,"data-orientation":a,...c,ref:t})})});_N.displayName=mh;var ON="TabsList",PN=x.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...i}=e,o=fx(ON,n),a=EN(n);return O.jsx(Jk,{asChild:!0,...a,orientation:o.orientation,dir:o.dir,loop:r,children:O.jsx(wt.div,{role:"tablist","aria-orientation":o.orientation,...i,ref:t})})});PN.displayName=ON;var AN="TabsTrigger",RN=x.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:i=!1,...o}=e,a=fx(AN,n),s=EN(n),u=kN(a.baseId,r),c=NN(a.baseId,r),d=r===a.value;return O.jsx(eN,{asChild:!0,...s,focusable:!i,active:d,children:O.jsx(wt.button,{type:"button",role:"tab","aria-selected":d,"aria-controls":c,"data-state":d?"active":"inactive","data-disabled":i?"":void 0,disabled:i,id:u,...o,ref:t,onMouseDown:bt(e.onMouseDown,p=>{!i&&p.button===0&&p.ctrlKey===!1?a.onValueChange(r):p.preventDefault()}),onKeyDown:bt(e.onKeyDown,p=>{[" ","Enter"].includes(p.key)&&a.onValueChange(r)}),onFocus:bt(e.onFocus,()=>{const p=a.activationMode!=="manual";!d&&!i&&p&&a.onValueChange(r)})})})});RN.displayName=AN;var IN="TabsContent",TN=x.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:i,children:o,...a}=e,s=fx(IN,n),u=kN(s.baseId,r),c=NN(s.baseId,r),d=r===s.value,p=x.useRef(d);return x.useEffect(()=>{const g=requestAnimationFrame(()=>p.current=!1);return()=>cancelAnimationFrame(g)},[]),O.jsx(yo,{present:i||d,children:({present:g})=>O.jsx(wt.div,{"data-state":d?"active":"inactive","data-orientation":s.orientation,role:"tabpanel","aria-labelledby":u,hidden:!g,id:c,tabIndex:0,...a,ref:t,style:{...e.style,animationDuration:p.current?"0s":void 0},children:g&&o})})});TN.displayName=IN;function kN(e,t){return`${e}-trigger-${t}`}function NN(e,t){return`${e}-content-${t}`}var L7=_N,MN=PN,DN=RN,jN=TN;const $7=xt(["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"}}),F7=xt(["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:[dn("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:[dn("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"}}),LN=x.createContext("default"),V7=L7,$N=({ref:e,className:t,variant:n="default",...r})=>O.jsx(LN,{value:n,children:O.jsx(MN,{ref:e,className:ue($7({variant:n}),t),...r})});$N.displayName=MN.displayName;const FN=({ref:e,className:t,variant:n,...r})=>{const i=x.use(LN),o=n??i;return O.jsx(DN,{ref:e,className:ue(F7({variant:o}),t),...r})};FN.displayName=DN.displayName;const VN=({ref:e,className:t,...n})=>O.jsx(jN,{ref:e,className:ue(`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});VN.displayName=jN.displayName;var B7="Arrow",BN=x.forwardRef((e,t)=>{const{children:n,width:r=10,height:i=5,...o}=e;return O.jsx(wt.svg,{...o,ref:t,width:r,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:O.jsx("polygon",{points:"0,0 30,0 15,10"})})});BN.displayName=B7;var z7=BN,dx="Popper",[zN,WN]=Fi(dx),[W7,HN]=zN(dx),UN=e=>{const{__scopePopper:t,children:n}=e,[r,i]=x.useState(null);return O.jsx(W7,{scope:t,anchor:r,onAnchorChange:i,children:n})};UN.displayName=dx;var GN="PopperAnchor",qN=x.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,o=HN(GN,n),a=x.useRef(null),s=Zt(t,a),u=x.useRef(null);return x.useEffect(()=>{const c=u.current;u.current=r?.current||a.current,c!==u.current&&o.onAnchorChange(u.current)}),r?null:O.jsx(wt.div,{...i,ref:s})});qN.displayName=GN;var px="PopperContent",[H7,U7]=zN(px),KN=x.forwardRef((e,t)=>{const{__scopePopper:n,side:r="bottom",sideOffset:i=0,align:o="center",alignOffset:a=0,arrowPadding:s=0,avoidCollisions:u=!0,collisionBoundary:c=[],collisionPadding:d=0,sticky:p="partial",hideWhenDetached:g=!1,updatePositionStrategy:h="optimized",onPlaced:y,...b}=e,v=HN(px,n),[w,C]=x.useState(null),E=Zt(t,Ke=>C(Ke)),[_,P]=x.useState(null),R=Gp(_),I=R?.width??0,k=R?.height??0,B=r+(o!=="center"?"-"+o:""),L=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},V=Array.isArray(c)?c:[c],D=V.length>0,H={padding:L,boundary:V.filter(q7),altBoundary:D},{refs:J,floatingStyles:te,placement:G,isPositioned:ee,middlewareData:Q}=ZI({strategy:"fixed",placement:B,whileElementsMounted:(...Ke)=>Dy(...Ke,{animationFrame:h==="always"}),elements:{reference:v.anchor},middleware:[QI({mainAxis:i+k,alignmentAxis:a}),u&&JI({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?eT():void 0,...H}),u&&tT({...H}),nT({...H,apply:({elements:Ke,rects:Fe,availableWidth:Y,availableHeight:oe})=>{const{width:ne,height:$}=Fe.reference,ie=Ke.floating.style;ie.setProperty("--radix-popper-available-width",`${Y}px`),ie.setProperty("--radix-popper-available-height",`${oe}px`),ie.setProperty("--radix-popper-anchor-width",`${ne}px`),ie.setProperty("--radix-popper-anchor-height",`${$}px`)}}),_&&Gq({element:_,padding:s}),K7({arrowWidth:I,arrowHeight:k}),g&&rT({strategy:"referenceHidden",...H})]}),[pe,K]=ZN(G),Ae=Ja(y);ia(()=>{ee&&Ae?.()},[ee,Ae]);const Se=Q.arrow?.x,$e=Q.arrow?.y,we=Q.arrow?.centerOffset!==0,[Ce,ze]=x.useState();return ia(()=>{w&&ze(window.getComputedStyle(w).zIndex)},[w]),O.jsx("div",{ref:J.setFloating,"data-radix-popper-content-wrapper":"",style:{...te,transform:ee?te.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Ce,"--radix-popper-transform-origin":[Q.transformOrigin?.x,Q.transformOrigin?.y].join(" "),...Q.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:O.jsx(H7,{scope:n,placedSide:pe,onArrowChange:P,arrowX:Se,arrowY:$e,shouldHideArrow:we,children:O.jsx(wt.div,{"data-side":pe,"data-align":K,...b,ref:E,style:{...b.style,animation:ee?void 0:"none"}})})})});KN.displayName=px;var YN="PopperArrow",G7={top:"bottom",right:"left",bottom:"top",left:"right"},XN=x.forwardRef(function(t,n){const{__scopePopper:r,...i}=t,o=U7(YN,r),a=G7[o.placedSide];return O.jsx("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:O.jsx(z7,{...i,ref:n,style:{...i.style,display:"block"}})})});XN.displayName=YN;function q7(e){return e!==null}var K7=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,s=a?0:e.arrowWidth,u=a?0:e.arrowHeight,[c,d]=ZN(n),p={start:"0%",center:"50%",end:"100%"}[d],g=(i.arrow?.x??0)+s/2,h=(i.arrow?.y??0)+u/2;let y="",b="";return c==="bottom"?(y=a?p:`${g}px`,b=`${-u}px`):c==="top"?(y=a?p:`${g}px`,b=`${r.floating.height+u}px`):c==="right"?(y=`${-u}px`,b=a?p:`${h}px`):c==="left"&&(y=`${r.floating.width+u}px`,b=a?p:`${h}px`),{data:{x:y,y:b}}}});function ZN(e){const[t,n="center"]=e.split("-");return[t,n]}var Y7=UN,X7=qN,Z7=KN,Q7=XN,J7=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"}),eY="VisuallyHidden",QN=x.forwardRef((e,t)=>O.jsx(wt.span,{...e,ref:t,style:{...J7,...e.style}}));QN.displayName=eY;var tY=QN,[vh]=Fi("Tooltip",[WN]),yh=WN(),JN="TooltipProvider",nY=700,Hy="tooltip.open",[rY,hx]=vh(JN),eM=e=>{const{__scopeTooltip:t,delayDuration:n=nY,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:o}=e,a=x.useRef(!0),s=x.useRef(!1),u=x.useRef(0);return x.useEffect(()=>{const c=u.current;return()=>window.clearTimeout(c)},[]),O.jsx(rY,{scope:t,isOpenDelayedRef:a,delayDuration:n,onOpen:x.useCallback(()=>{window.clearTimeout(u.current),a.current=!1},[]),onClose:x.useCallback(()=>{window.clearTimeout(u.current),u.current=window.setTimeout(()=>a.current=!0,r)},[r]),isPointerInTransitRef:s,onPointerInTransitChange:x.useCallback(c=>{s.current=c},[]),disableHoverableContent:i,children:o})};eM.displayName=JN;var Bu="Tooltip",[iY,fc]=vh(Bu),tM=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:i,onOpenChange:o,disableHoverableContent:a,delayDuration:s}=e,u=hx(Bu,e.__scopeTooltip),c=yh(t),[d,p]=x.useState(null),g=sl(),h=x.useRef(0),y=a??u.disableHoverableContent,b=s??u.delayDuration,v=x.useRef(!1),[w,C]=us({prop:r,defaultProp:i??!1,onChange:I=>{I?(u.onOpen(),document.dispatchEvent(new CustomEvent(Hy))):u.onClose(),o?.(I)},caller:Bu}),E=x.useMemo(()=>w?v.current?"delayed-open":"instant-open":"closed",[w]),_=x.useCallback(()=>{window.clearTimeout(h.current),h.current=0,v.current=!1,C(!0)},[C]),P=x.useCallback(()=>{window.clearTimeout(h.current),h.current=0,C(!1)},[C]),R=x.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>{v.current=!0,C(!0),h.current=0},b)},[b,C]);return x.useEffect(()=>()=>{h.current&&(window.clearTimeout(h.current),h.current=0)},[]),O.jsx(Y7,{...c,children:O.jsx(iY,{scope:t,contentId:g,open:w,stateAttribute:E,trigger:d,onTriggerChange:p,onTriggerEnter:x.useCallback(()=>{u.isOpenDelayedRef.current?R():_()},[u.isOpenDelayedRef,R,_]),onTriggerLeave:x.useCallback(()=>{y?P():(window.clearTimeout(h.current),h.current=0)},[P,y]),onOpen:_,onClose:P,disableHoverableContent:y,children:n})})};tM.displayName=Bu;var Uy="TooltipTrigger",nM=x.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,i=fc(Uy,n),o=hx(Uy,n),a=yh(n),s=x.useRef(null),u=Zt(t,s,i.onTriggerChange),c=x.useRef(!1),d=x.useRef(!1),p=x.useCallback(()=>c.current=!1,[]);return x.useEffect(()=>()=>document.removeEventListener("pointerup",p),[p]),O.jsx(X7,{asChild:!0,...a,children:O.jsx(wt.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...r,ref:u,onPointerMove:bt(e.onPointerMove,g=>{g.pointerType!=="touch"&&!d.current&&!o.isPointerInTransitRef.current&&(i.onTriggerEnter(),d.current=!0)}),onPointerLeave:bt(e.onPointerLeave,()=>{i.onTriggerLeave(),d.current=!1}),onPointerDown:bt(e.onPointerDown,()=>{i.open&&i.onClose(),c.current=!0,document.addEventListener("pointerup",p,{once:!0})}),onFocus:bt(e.onFocus,()=>{c.current||i.onOpen()}),onBlur:bt(e.onBlur,i.onClose),onClick:bt(e.onClick,i.onClose)})})});nM.displayName=Uy;var gx="TooltipPortal",[oY,aY]=vh(gx,{forceMount:void 0}),rM=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:i}=e,o=fc(gx,t);return O.jsx(oY,{scope:t,forceMount:n,children:O.jsx(yo,{present:n||o.open,children:O.jsx(U0,{asChild:!0,container:i,children:r})})})};rM.displayName=gx;var hl="TooltipContent",iM=x.forwardRef((e,t)=>{const n=aY(hl,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i="top",...o}=e,a=fc(hl,e.__scopeTooltip);return O.jsx(yo,{present:r||a.open,children:a.disableHoverableContent?O.jsx(oM,{side:i,...o,ref:t}):O.jsx(sY,{side:i,...o,ref:t})})}),sY=x.forwardRef((e,t)=>{const n=fc(hl,e.__scopeTooltip),r=hx(hl,e.__scopeTooltip),i=x.useRef(null),o=Zt(t,i),[a,s]=x.useState(null),{trigger:u,onClose:c}=n,d=i.current,{onPointerInTransitChange:p}=r,g=x.useCallback(()=>{s(null),p(!1)},[p]),h=x.useCallback((y,b)=>{const v=y.currentTarget,w={x:y.clientX,y:y.clientY},C=fY(w,v.getBoundingClientRect()),E=dY(w,C),_=pY(b.getBoundingClientRect()),P=gY([...E,..._]);s(P),p(!0)},[p]);return x.useEffect(()=>()=>g(),[g]),x.useEffect(()=>{if(u&&d){const y=v=>h(v,d),b=v=>h(v,u);return u.addEventListener("pointerleave",y),d.addEventListener("pointerleave",b),()=>{u.removeEventListener("pointerleave",y),d.removeEventListener("pointerleave",b)}}},[u,d,h,g]),x.useEffect(()=>{if(a){const y=b=>{const v=b.target,w={x:b.clientX,y:b.clientY},C=u?.contains(v)||d?.contains(v),E=!hY(w,a);C?g():E&&(g(),c())};return document.addEventListener("pointermove",y),()=>document.removeEventListener("pointermove",y)}},[u,d,a,c,g]),O.jsx(oM,{...e,ref:o})}),[lY,uY]=vh(Bu,{isInside:!1}),cY=$H("TooltipContent"),oM=x.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":i,onEscapeKeyDown:o,onPointerDownOutside:a,...s}=e,u=fc(hl,n),c=yh(n),{onClose:d}=u;return x.useEffect(()=>(document.addEventListener(Hy,d),()=>document.removeEventListener(Hy,d)),[d]),x.useEffect(()=>{if(u.trigger){const p=g=>{g.target?.contains(u.trigger)&&d()};return window.addEventListener("scroll",p,{capture:!0}),()=>window.removeEventListener("scroll",p,{capture:!0})}},[u.trigger,d]),O.jsx(H0,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:a,onFocusOutside:p=>p.preventDefault(),onDismiss:d,children:O.jsxs(Z7,{"data-state":u.stateAttribute,...c,...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:[O.jsx(cY,{children:r}),O.jsx(lY,{scope:n,isInside:!0,children:O.jsx(tY,{id:u.contentId,role:"tooltip",children:i||r})})]})})});iM.displayName=hl;var aM="TooltipArrow",sM=x.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,i=yh(n);return uY(aM,n).isInside?null:O.jsx(Q7,{...i,...r,ref:t})});sM.displayName=aM;function fY(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),o=Math.abs(t.left-e.x);switch(Math.min(n,r,i,o)){case o:return"left";case i:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function dY(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 pY(e){const{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}function hY(e,t){const{x:n,y:r}=e;let i=!1;for(let o=0,a=t.length-1;o<t.length;a=o++){const s=t[o],u=t[a],c=s.x,d=s.y,p=u.x,g=u.y;d>r!=g>r&&n<(p-c)*(r-d)/(g-d)+c&&(i=!i)}return i}function gY(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),mY(t)}function mY(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const i=e[r];for(;t.length>=2;){const o=t[t.length-1],a=t[t.length-2];if((o.x-a.x)*(i.y-a.y)>=(o.y-a.y)*(i.x-a.x))t.pop();else break}t.push(i)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const i=e[r];for(;n.length>=2;){const o=n[n.length-1],a=n[n.length-2];if((o.x-a.x)*(i.y-a.y)>=(o.y-a.y)*(i.x-a.x))n.pop();else break}n.push(i)}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 vY=eM,yY=tM,bY=nM,xY=rM,lM=iM,wY=sM;const CY=`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`,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`,`
163
+ py-1.5 text-xs`,SY=vY,uM=yY,cM=bY,fM=wY,mx=({className:e,sideOffset:t=4,ref:n,...r})=>O.jsx(xY,{children:O.jsx(lM,{ref:n,sideOffset:t,className:ue(CY,e),...r})});mx.displayName=lM.displayName;const vx=(e=!1)=>{const[t,n]=j.useState(e);return{isOpened:t,openPopup:()=>n(!0),closePopup:()=>n(!1),togglePopup:()=>n(a=>!a)}},EY=(e,t,n)=>{if(n<=e)return Array.from({length:n},(c,d)=>d+1);const r=Math.floor((e-2)/2);let i=Math.max(t-r,2),o=Math.min(t+r,n-1);const a=o-i+1,s=e-2;a<s&&(i===2?o=Math.min(o+(s-a),n-1):o===n-1&&(i=Math.max(i-(s-a),2)));const u=[];u.push(1),i>2&&u.push("ellipsis-start");for(let c=i;c<=o;c++)u.push(c);return o<n-1&&u.push("ellipsis-end"),n>1&&u.push(n),u},_Y=xt("flex items-center",{variants:{size:{sm:"gap-1",default:"gap-1",lg:"gap-2"}},defaultVariants:{size:"default"}}),EE=xt(["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"}}),_E=xt(["text-primary-text cursor-pointer rounded-[0.75rem] bg-transparent","hover:bg-tertiary-bg",dn("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}}),OY=5,PY=5,AY=({currentPage:e,totalPages:t,maxVisiblePages:n=OY,className:r,showNavigation:i=!0,prevLabel:o,nextLabel:a,size:s="default",ellipsisStep:u=PY,onPageChange:c})=>{if(t<=1)return null;const d=EY(n,e,t),p=h=>{h>=1&&h<=t&&c(h)},g=h=>{if(h==="ellipsis-start"){const y=Math.max(1,e-u);p(y)}else{const y=Math.min(t,e+u);p(y)}};return O.jsx(ex,{children:O.jsxs(tx,{className:ue(_Y({size:s}),r),children:[i&&O.jsx(tl,{children:O.jsx(oo,{variant:"ghost",disabled:e===1,onClick:()=>p(e-1),className:EE({size:s,side:"prev"}),"aria-label":"Предыдущая страница",children:o||O.jsx(XR,{})})}),d.map(h=>h==="ellipsis-start"||h==="ellipsis-end"?O.jsx(tl,{children:O.jsx(oo,{variant:"ghost",onClick:()=>g(h),className:_E({size:s}),"aria-label":h==="ellipsis-start"?`Перейти на ${u} страниц назад`:`Перейти на ${u} страниц вперед`,title:h==="ellipsis-start"?`Нажать чтобы перейти на ${u} страниц назад`:`Нажать чтобы перейти на ${u} страниц вперед`,children:"..."})},h):O.jsx(tl,{children:O.jsx(uc,{isActive:e===h,onClick:()=>p(h),className:_E({size:s,active:e===h}),"aria-label":`Страница ${h}`,"aria-current":e===h?"page":void 0,children:h})},h)),i&&O.jsx(tl,{children:O.jsx(oo,{variant:"ghost",disabled:e===t,onClick:()=>p(e+1),className:EE({size:s,side:"next"}),"aria-label":"Следующая страница",children:a||O.jsx(ZR,{})})})]})})},RY=xt(["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"}}),IY=xt("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"}}),TY=xt("flex items-center gap-3",{variants:{state:{expanded:"opacity-100",collapsed:"hidden opacity-0"}},defaultVariants:{state:"expanded"}}),kY=dn("body-xl-medium"),NY=xt(["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(" ")),MY=({groups:e,title:t="CRM",brandMark:n,state:r="expanded",activeItemId:i,showToggle:o=!0,onStateChange:a,onItemSelect:s,className:u,...c})=>{const d=r==="collapsed",p=e.filter(v=>v.placement!=="bottom"),g=e.filter(v=>v.placement==="bottom"),h=d?"expanded":"collapsed",y=()=>{a?.(h)},b=v=>v.map(w=>O.jsx($k,{title:w.title,collapsed:d,className:ue(w.divider&&"border-delicate-border border-b"),children:w.items.map(C=>{const E=i?i===C.id:!!C.active;return O.jsx(Lk,{icon:O.jsx(uo,{type:C.icon}),label:C.label,badge:C.badge,active:E,collapsed:d,disabled:C.disabled,href:C.href,target:C.target,rel:C.rel,onAction:()=>{s?.(C),C.onClick?.(C)},"aria-current":E?"page":void 0},C.id)})},w.id));return O.jsxs("aside",{className:ue(RY({state:r}),u),"aria-label":"Боковая навигация",...c,children:[O.jsxs("header",{className:IY({state:r}),children:[O.jsxs("div",{className:TY({state:r}),children:[n,O.jsx("p",{className:kY,children:t})]}),o&&O.jsx("button",{type:"button",className:NY(),onClick:y,"aria-label":d?"Развернуть боковую навигацию":"Свернуть боковую навигацию",disabled:!a,children:O.jsx(uo,{type:"chevrons",strokeWidth:1.5,className:ue("transition-transform duration-200",d?"-rotate-90":"rotate-90")})})]}),O.jsxs("div",{className:"flex min-h-0 flex-1 flex-col",children:[O.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto",children:b(p)}),g.length>0&&O.jsx("div",{className:"mt-auto",children:b(g)})]})]})},DY=({name:e,orientation:t="horizontal",label:n,disabled:r,classNames:i,isValid:o,...a})=>{const s={"aria-invalid":!!o,"data-invalid":!!o};return O.jsx(ac,{className:i?.classNameGroup,children:O.jsxs(sc,{...s,orientation:t,children:[O.jsx(r0,{...a,...s,id:e,name:e,disabled:r,className:i?.classNameCheckbox}),n&&O.jsx(El,{htmlFor:e,className:ue("text-[14px]",i?.classNameLabel,r&&"cursor-not-allowed"),children:n})]})})},jY=({open:e,onOpenChange:t,title:n,cancelLabel:r="Отмена",confirmLabel:i="Ок",onConfirm:o,children:a,classes:s,footer:u,showCloseButton:c=!1,ariaDescribedby:d=void 0})=>{const p=()=>{t(!1)},g=()=>{o?.(),t(!1)},h=u===void 0?O.jsxs(Q0,{className:s?.footer,children:[O.jsx(oo,{variant:"secondary",onClick:p,children:r}),O.jsx(oo,{onClick:g,children:i})]}):u;return O.jsx(Mk,{open:e,onOpenChange:t,children:O.jsxs(X0,{"aria-describedby":d,showCloseButton:c,children:[n&&O.jsx(Z0,{className:s?.header,children:O.jsx(J0,{className:s?.title,children:n})}),O.jsx("div",{className:s?.body,children:a}),h]})})};function Xo(e,t){return typeof e=="function"?e(t):e}function Ir(e,t){return n=>{t.setState(r=>({...r,[e]:Xo(n,r[e])}))}}function bh(e){return e instanceof Function}function LY(e){return Array.isArray(e)&&e.every(t=>typeof t=="number")}function $Y(e,t){const n=[],r=i=>{i.forEach(o=>{n.push(o);const a=t(o);a!=null&&a.length&&r(a)})};return r(e),n}function Ue(e,t,n){let r=[],i;return o=>{let a;n.key&&n.debug&&(a=Date.now());const s=e(o);if(!(s.length!==r.length||s.some((d,p)=>r[p]!==d)))return i;r=s;let c;if(n.key&&n.debug&&(c=Date.now()),i=t(...s),n==null||n.onChange==null||n.onChange(i),n.key&&n.debug&&n!=null&&n.debug()){const d=Math.round((Date.now()-a)*100)/100,p=Math.round((Date.now()-c)*100)/100,g=p/16,h=(y,b)=>{for(y=String(y);y.length<b;)y=" "+y;return y};console.info(`%c⏱ ${h(p,5)} /${h(d,5)} ms`,`
165
165
  font-size: .6rem;
166
166
  font-weight: bold;
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.
167
+ color: hsl(${Math.max(0,Math.min(120-120*g,120))}deg 100% 31%);`,n?.key)}return i}}function Ge(e,t,n,r){return{debug:()=>{var i;return(i=e?.debugAll)!=null?i:e[t]},key:process.env.NODE_ENV==="development"&&n,onChange:r}}function FY(e,t,n,r){const i=()=>{var a;return(a=o.getValue())!=null?a:e.options.renderFallbackValue},o={id:`${t.id}_${n.id}`,row:t,column:n,getValue:()=>t.getValue(r),renderValue:i,getContext:Ue(()=>[e,n,t,o],(a,s,u,c)=>({table:a,column:s,row:u,cell:c,getValue:c.getValue,renderValue:c.renderValue}),Ge(e.options,"debugCells","cell.getContext"))};return e._features.forEach(a=>{a.createCell==null||a.createCell(o,n,t,e)},{}),o}function VY(e,t,n,r){var i,o;const s={...e._getDefaultColumnDef(),...t},u=s.accessorKey;let c=(i=(o=s.id)!=null?o:u?typeof String.prototype.replaceAll=="function"?u.replaceAll(".","_"):u.replace(/\./g,"_"):void 0)!=null?i:typeof s.header=="string"?s.header:void 0,d;if(s.accessorFn?d=s.accessorFn:u&&(u.includes(".")?d=g=>{let h=g;for(const b of u.split(".")){var y;h=(y=h)==null?void 0:y[b],process.env.NODE_ENV!=="production"&&h===void 0&&console.warn(`"${b}" in deeply nested key "${u}" returned undefined.`)}return h}:d=g=>g[s.accessorKey]),!c)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 p={id:`${String(c)}`,accessorFn:d,parent:r,depth:n,columnDef:s,columns:[],getFlatColumns:Ue(()=>[!0],()=>{var g;return[p,...(g=p.columns)==null?void 0:g.flatMap(h=>h.getFlatColumns())]},Ge(e.options,"debugColumns","column.getFlatColumns")),getLeafColumns:Ue(()=>[e._getOrderColumnsFn()],g=>{var h;if((h=p.columns)!=null&&h.length){let y=p.columns.flatMap(b=>b.getLeafColumns());return g(y)}return[p]},Ge(e.options,"debugColumns","column.getLeafColumns"))};for(const g of e._features)g.createColumn==null||g.createColumn(p,e);return p}const Fn="debugHeaders";function OE(e,t,n){var r;let o={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=u=>{u.subHeaders&&u.subHeaders.length&&u.subHeaders.map(s),a.push(u)};return s(o),a},getContext:()=>({table:e,header:o,column:t})};return e._features.forEach(a=>{a.createHeader==null||a.createHeader(o,e)}),o}const BY={createTable:e=>{e.getHeaderGroups=Ue(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r,i)=>{var o,a;const s=(o=r?.map(p=>n.find(g=>g.id===p)).filter(Boolean))!=null?o:[],u=(a=i?.map(p=>n.find(g=>g.id===p)).filter(Boolean))!=null?a:[],c=n.filter(p=>!(r!=null&&r.includes(p.id))&&!(i!=null&&i.includes(p.id)));return ed(t,[...s,...c,...u],e)},Ge(e.options,Fn,"getHeaderGroups")),e.getCenterHeaderGroups=Ue(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r,i)=>(n=n.filter(o=>!(r!=null&&r.includes(o.id))&&!(i!=null&&i.includes(o.id))),ed(t,n,e,"center")),Ge(e.options,Fn,"getCenterHeaderGroups")),e.getLeftHeaderGroups=Ue(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left],(t,n,r)=>{var i;const o=(i=r?.map(a=>n.find(s=>s.id===a)).filter(Boolean))!=null?i:[];return ed(t,o,e,"left")},Ge(e.options,Fn,"getLeftHeaderGroups")),e.getRightHeaderGroups=Ue(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right],(t,n,r)=>{var i;const o=(i=r?.map(a=>n.find(s=>s.id===a)).filter(Boolean))!=null?i:[];return ed(t,o,e,"right")},Ge(e.options,Fn,"getRightHeaderGroups")),e.getFooterGroups=Ue(()=>[e.getHeaderGroups()],t=>[...t].reverse(),Ge(e.options,Fn,"getFooterGroups")),e.getLeftFooterGroups=Ue(()=>[e.getLeftHeaderGroups()],t=>[...t].reverse(),Ge(e.options,Fn,"getLeftFooterGroups")),e.getCenterFooterGroups=Ue(()=>[e.getCenterHeaderGroups()],t=>[...t].reverse(),Ge(e.options,Fn,"getCenterFooterGroups")),e.getRightFooterGroups=Ue(()=>[e.getRightHeaderGroups()],t=>[...t].reverse(),Ge(e.options,Fn,"getRightFooterGroups")),e.getFlatHeaders=Ue(()=>[e.getHeaderGroups()],t=>t.map(n=>n.headers).flat(),Ge(e.options,Fn,"getFlatHeaders")),e.getLeftFlatHeaders=Ue(()=>[e.getLeftHeaderGroups()],t=>t.map(n=>n.headers).flat(),Ge(e.options,Fn,"getLeftFlatHeaders")),e.getCenterFlatHeaders=Ue(()=>[e.getCenterHeaderGroups()],t=>t.map(n=>n.headers).flat(),Ge(e.options,Fn,"getCenterFlatHeaders")),e.getRightFlatHeaders=Ue(()=>[e.getRightHeaderGroups()],t=>t.map(n=>n.headers).flat(),Ge(e.options,Fn,"getRightFlatHeaders")),e.getCenterLeafHeaders=Ue(()=>[e.getCenterFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),Ge(e.options,Fn,"getCenterLeafHeaders")),e.getLeftLeafHeaders=Ue(()=>[e.getLeftFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),Ge(e.options,Fn,"getLeftLeafHeaders")),e.getRightLeafHeaders=Ue(()=>[e.getRightFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),Ge(e.options,Fn,"getRightLeafHeaders")),e.getLeafHeaders=Ue(()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()],(t,n,r)=>{var i,o,a,s,u,c;return[...(i=(o=t[0])==null?void 0:o.headers)!=null?i:[],...(a=(s=n[0])==null?void 0:s.headers)!=null?a:[],...(u=(c=r[0])==null?void 0:c.headers)!=null?u:[]].map(d=>d.getLeafHeaders()).flat()},Ge(e.options,Fn,"getLeafHeaders"))}};function ed(e,t,n,r){var i,o;let a=0;const s=function(g,h){h===void 0&&(h=1),a=Math.max(a,h),g.filter(y=>y.getIsVisible()).forEach(y=>{var b;(b=y.columns)!=null&&b.length&&s(y.columns,h+1)},0)};s(e);let u=[];const c=(g,h)=>{const y={depth:h,id:[r,`${h}`].filter(Boolean).join("_"),headers:[]},b=[];g.forEach(v=>{const w=[...b].reverse()[0],C=v.column.depth===y.depth;let E,_=!1;if(C&&v.column.parent?E=v.column.parent:(E=v.column,_=!0),w&&w?.column===E)w.subHeaders.push(v);else{const P=OE(n,E,{id:[r,h,E.id,v?.id].filter(Boolean).join("_"),isPlaceholder:_,placeholderId:_?`${b.filter(R=>R.column===E).length}`:void 0,depth:h,index:b.length});P.subHeaders.push(v),b.push(P)}y.headers.push(v),v.headerGroup=y}),u.push(y),h>0&&c(b,h-1)},d=t.map((g,h)=>OE(n,g,{depth:a,index:h}));c(d,a-1),u.reverse();const p=g=>g.filter(y=>y.column.getIsVisible()).map(y=>{let b=0,v=0,w=[0];y.subHeaders&&y.subHeaders.length?(w=[],p(y.subHeaders).forEach(E=>{let{colSpan:_,rowSpan:P}=E;b+=_,w.push(P)})):b=1;const C=Math.min(...w);return v=v+C,y.colSpan=b,y.rowSpan=v,{colSpan:b,rowSpan:v}});return p((i=(o=u[0])==null?void 0:o.headers)!=null?i:[]),u}const zY=(e,t,n,r,i,o,a)=>{let s={id:t,index:r,original:n,depth:i,parentId:a,_valuesCache:{},_uniqueValuesCache:{},getValue:u=>{if(s._valuesCache.hasOwnProperty(u))return s._valuesCache[u];const c=e.getColumn(u);if(c!=null&&c.accessorFn)return s._valuesCache[u]=c.accessorFn(s.original,r),s._valuesCache[u]},getUniqueValues:u=>{if(s._uniqueValuesCache.hasOwnProperty(u))return s._uniqueValuesCache[u];const c=e.getColumn(u);if(c!=null&&c.accessorFn)return c.columnDef.getUniqueValues?(s._uniqueValuesCache[u]=c.columnDef.getUniqueValues(s.original,r),s._uniqueValuesCache[u]):(s._uniqueValuesCache[u]=[s.getValue(u)],s._uniqueValuesCache[u])},renderValue:u=>{var c;return(c=s.getValue(u))!=null?c:e.options.renderFallbackValue},subRows:[],getLeafRows:()=>$Y(s.subRows,u=>u.subRows),getParentRow:()=>s.parentId?e.getRow(s.parentId,!0):void 0,getParentRows:()=>{let u=[],c=s;for(;;){const d=c.getParentRow();if(!d)break;u.push(d),c=d}return u.reverse()},getAllCells:Ue(()=>[e.getAllLeafColumns()],u=>u.map(c=>FY(e,s,c,c.id)),Ge(e.options,"debugRows","getAllCells")),_getAllCellsByColumnId:Ue(()=>[s.getAllCells()],u=>u.reduce((c,d)=>(c[d.column.id]=d,c),{}),Ge(e.options,"debugRows","getAllCellsByColumnId"))};for(let u=0;u<e._features.length;u++){const c=e._features[u];c==null||c.createRow==null||c.createRow(s,e)}return s},WY={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()}}},dM=(e,t,n)=>{var r,i;const o=n==null||(r=n.toString())==null?void 0:r.toLowerCase();return!!(!((i=e.getValue(t))==null||(i=i.toString())==null||(i=i.toLowerCase())==null)&&i.includes(o))};dM.autoRemove=e=>ci(e);const pM=(e,t,n)=>{var r;return!!(!((r=e.getValue(t))==null||(r=r.toString())==null)&&r.includes(n))};pM.autoRemove=e=>ci(e);const hM=(e,t,n)=>{var r;return((r=e.getValue(t))==null||(r=r.toString())==null?void 0:r.toLowerCase())===n?.toLowerCase()};hM.autoRemove=e=>ci(e);const gM=(e,t,n)=>{var r;return(r=e.getValue(t))==null?void 0:r.includes(n)};gM.autoRemove=e=>ci(e);const mM=(e,t,n)=>!n.some(r=>{var i;return!((i=e.getValue(t))!=null&&i.includes(r))});mM.autoRemove=e=>ci(e)||!(e!=null&&e.length);const vM=(e,t,n)=>n.some(r=>{var i;return(i=e.getValue(t))==null?void 0:i.includes(r)});vM.autoRemove=e=>ci(e)||!(e!=null&&e.length);const yM=(e,t,n)=>e.getValue(t)===n;yM.autoRemove=e=>ci(e);const bM=(e,t,n)=>e.getValue(t)==n;bM.autoRemove=e=>ci(e);const yx=(e,t,n)=>{let[r,i]=n;const o=e.getValue(t);return o>=r&&o<=i};yx.resolveFilterValue=e=>{let[t,n]=e,r=typeof t!="number"?parseFloat(t):t,i=typeof n!="number"?parseFloat(n):n,o=t===null||Number.isNaN(r)?-1/0:r,a=n===null||Number.isNaN(i)?1/0:i;if(o>a){const s=o;o=a,a=s}return[o,a]};yx.autoRemove=e=>ci(e)||ci(e[0])&&ci(e[1]);const Ji={includesString:dM,includesStringSensitive:pM,equalsString:hM,arrIncludes:gM,arrIncludesAll:mM,arrIncludesSome:vM,equals:yM,weakEquals:bM,inNumberRange:yx};function ci(e){return e==null||e===""}const HY={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],...e}),getDefaultOptions:e=>({onColumnFiltersChange:Ir("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"?Ji.includesString:typeof r=="number"?Ji.inNumberRange:typeof r=="boolean"||r!==null&&typeof r=="object"?Ji.equals:Array.isArray(r)?Ji.arrIncludes:Ji.weakEquals},e.getFilterFn=()=>{var n,r;return bh(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:Ji[e.columnDef.filterFn]},e.getCanFilter=()=>{var n,r,i;return((n=e.columnDef.enableColumnFilter)!=null?n:!0)&&((r=t.options.enableColumnFilters)!=null?r:!0)&&((i=t.options.enableFilters)!=null?i:!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(i=>i.id===e.id))!=null?n:-1},e.setFilterValue=n=>{t.setColumnFilters(r=>{const i=e.getFilterFn(),o=r?.find(d=>d.id===e.id),a=Xo(n,o?o.value:void 0);if(PE(i,a,e)){var s;return(s=r?.filter(d=>d.id!==e.id))!=null?s:[]}const u={id:e.id,value:a};if(o){var c;return(c=r?.map(d=>d.id===e.id?u:d))!=null?c:[]}return r!=null&&r.length?[...r,u]:[u]})}},createRow:(e,t)=>{e.columnFilters={},e.columnFiltersMeta={}},createTable:e=>{e.setColumnFilters=t=>{const n=e.getAllLeafColumns(),r=i=>{var o;return(o=Xo(t,i))==null?void 0:o.filter(a=>{const s=n.find(u=>u.id===a.id);if(s){const u=s.getFilterFn();if(PE(u,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 PE(e,t,n){return(e&&e.autoRemove?e.autoRemove(t,n):!1)||typeof t>"u"||typeof t=="string"&&!t}const UY=(e,t,n)=>n.reduce((r,i)=>{const o=i.getValue(e);return r+(typeof o=="number"?o:0)},0),GY=(e,t,n)=>{let r;return n.forEach(i=>{const o=i.getValue(e);o!=null&&(r>o||r===void 0&&o>=o)&&(r=o)}),r},qY=(e,t,n)=>{let r;return n.forEach(i=>{const o=i.getValue(e);o!=null&&(r<o||r===void 0&&o>=o)&&(r=o)}),r},KY=(e,t,n)=>{let r,i;return n.forEach(o=>{const a=o.getValue(e);a!=null&&(r===void 0?a>=a&&(r=i=a):(r>a&&(r=a),i<a&&(i=a)))}),[r,i]},YY=(e,t)=>{let n=0,r=0;if(t.forEach(i=>{let o=i.getValue(e);o!=null&&(o=+o)>=o&&(++n,r+=o)}),n)return r/n},XY=(e,t)=>{if(!t.length)return;const n=t.map(o=>o.getValue(e));if(!LY(n))return;if(n.length===1)return n[0];const r=Math.floor(n.length/2),i=n.sort((o,a)=>o-a);return n.length%2!==0?i[r]:(i[r-1]+i[r])/2},ZY=(e,t)=>Array.from(new Set(t.map(n=>n.getValue(e))).values()),QY=(e,t)=>new Set(t.map(n=>n.getValue(e))).size,JY=(e,t)=>t.length,$m={sum:UY,min:GY,max:qY,extent:KY,mean:YY,median:XY,unique:ZY,uniqueCount:QY,count:JY},eX={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:Ir("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 $m.sum;if(Object.prototype.toString.call(r)==="[object Date]")return $m.extent},e.getAggregationFn=()=>{var n,r;if(!e)throw new Error;return bh(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:$m[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 i;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!!((i=n.subRows)!=null&&i.length)}}};function tX(e,t,n){if(!(t!=null&&t.length)||!n)return e;const r=e.filter(o=>!t.includes(o.id));return n==="remove"?r:[...t.map(o=>e.find(a=>a.id===o)).filter(Boolean),...r]}const nX={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:Ir("columnOrder",e)}),createColumn:(e,t)=>{e.getIndex=Ue(n=>[Du(t,n)],n=>n.findIndex(r=>r.id===e.id),Ge(t.options,"debugColumns","getIndex")),e.getIsFirstColumn=n=>{var r;return((r=Du(t,n)[0])==null?void 0:r.id)===e.id},e.getIsLastColumn=n=>{var r;const i=Du(t,n);return((r=i[i.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)=>i=>{let o=[];if(!(t!=null&&t.length))o=i;else{const a=[...t],s=[...i];for(;s.length&&a.length;){const u=a.shift(),c=s.findIndex(d=>d.id===u);c>-1&&o.push(s.splice(c,1)[0])}o=[...o,...s]}return tX(o,n,r)},Ge(e.options,"debugTable","_getOrderColumnsFn"))}},Fm=()=>({left:[],right:[]}),rX={getInitialState:e=>({columnPinning:Fm(),...e}),getDefaultOptions:e=>({onColumnPinningChange:Ir("columnPinning",e)}),createColumn:(e,t)=>{e.pin=n=>{const r=e.getLeafColumns().map(i=>i.id).filter(Boolean);t.setColumnPinning(i=>{var o,a;if(n==="right"){var s,u;return{left:((s=i?.left)!=null?s:[]).filter(p=>!(r!=null&&r.includes(p))),right:[...((u=i?.right)!=null?u:[]).filter(p=>!(r!=null&&r.includes(p))),...r]}}if(n==="left"){var c,d;return{left:[...((c=i?.left)!=null?c:[]).filter(p=>!(r!=null&&r.includes(p))),...r],right:((d=i?.right)!=null?d:[]).filter(p=>!(r!=null&&r.includes(p)))}}return{left:((o=i?.left)!=null?o:[]).filter(p=>!(r!=null&&r.includes(p))),right:((a=i?.right)!=null?a:[]).filter(p=>!(r!=null&&r.includes(p)))}})},e.getCanPin=()=>e.getLeafColumns().some(r=>{var i,o,a;return((i=r.columnDef.enablePinning)!=null?i:!0)&&((o=(a=t.options.enableColumnPinning)!=null?a:t.options.enablePinning)!=null?o:!0)}),e.getIsPinned=()=>{const n=e.getLeafColumns().map(s=>s.id),{left:r,right:i}=t.getState().columnPinning,o=n.some(s=>r?.includes(s)),a=n.some(s=>i?.includes(s));return o?"left":a?"right":!1},e.getPinnedIndex=()=>{var n,r;const i=e.getIsPinned();return i?(n=(r=t.getState().columnPinning)==null||(r=r[i])==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,i)=>{const o=[...r??[],...i??[]];return n.filter(a=>!o.includes(a.column.id))},Ge(t.options,"debugRows","getCenterVisibleCells")),e.getLeftVisibleCells=Ue(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left],(n,r)=>(r??[]).map(o=>n.find(a=>a.column.id===o)).filter(Boolean).map(o=>({...o,position:"left"})),Ge(t.options,"debugRows","getLeftVisibleCells")),e.getRightVisibleCells=Ue(()=>[e._getAllVisibleCells(),t.getState().columnPinning.right],(n,r)=>(r??[]).map(o=>n.find(a=>a.column.id===o)).filter(Boolean).map(o=>({...o,position:"right"})),Ge(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?Fm():(n=(r=e.initialState)==null?void 0:r.columnPinning)!=null?n:Fm())},e.getIsSomeColumnsPinned=t=>{var n;const r=e.getState().columnPinning;if(!t){var i,o;return!!((i=r.left)!=null&&i.length||(o=r.right)!=null&&o.length)}return!!((n=r[t])!=null&&n.length)},e.getLeftLeafColumns=Ue(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left],(t,n)=>(n??[]).map(r=>t.find(i=>i.id===r)).filter(Boolean),Ge(e.options,"debugColumns","getLeftLeafColumns")),e.getRightLeafColumns=Ue(()=>[e.getAllLeafColumns(),e.getState().columnPinning.right],(t,n)=>(n??[]).map(r=>t.find(i=>i.id===r)).filter(Boolean),Ge(e.options,"debugColumns","getRightLeafColumns")),e.getCenterLeafColumns=Ue(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r)=>{const i=[...n??[],...r??[]];return t.filter(o=>!i.includes(o.id))},Ge(e.options,"debugColumns","getCenterLeafColumns"))}};function iX(e){return e||(typeof document<"u"?document:null)}const td={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},Vm=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),oX={getDefaultColumnDef:()=>td,getInitialState:e=>({columnSizing:{},columnSizingInfo:Vm(),...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:Ir("columnSizing",e),onColumnSizingInfoChange:Ir("columnSizingInfo",e)}),createColumn:(e,t)=>{e.getSize=()=>{var n,r,i;const o=t.getState().columnSizing[e.id];return Math.min(Math.max((n=e.columnDef.minSize)!=null?n:td.minSize,(r=o??e.columnDef.size)!=null?r:td.size),(i=e.columnDef.maxSize)!=null?i:td.maxSize)},e.getStart=Ue(n=>[n,Du(t,n),t.getState().columnSizing],(n,r)=>r.slice(0,e.getIndex(n)).reduce((i,o)=>i+o.getSize(),0),Ge(t.options,"debugColumns","getStart")),e.getAfter=Ue(n=>[n,Du(t,n),t.getState().columnSizing],(n,r)=>r.slice(e.getIndex(n)+1).reduce((i,o)=>i+o.getSize(),0),Ge(t.options,"debugColumns","getAfter")),e.resetSize=()=>{t.setColumnSizing(n=>{let{[e.id]:r,...i}=n;return i})},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=i=>{if(i.subHeaders.length)i.subHeaders.forEach(r);else{var o;n+=(o=i.column.getSize())!=null?o: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),i=r?.getCanResize();return o=>{if(!r||!i||(o.persist==null||o.persist(),Bm(o)&&o.touches&&o.touches.length>1))return;const a=e.getSize(),s=e?e.getLeafHeaders().map(w=>[w.column.id,w.column.getSize()]):[[r.id,r.getSize()]],u=Bm(o)?Math.round(o.touches[0].clientX):o.clientX,c={},d=(w,C)=>{typeof C=="number"&&(t.setColumnSizingInfo(E=>{var _,P;const R=t.options.columnResizeDirection==="rtl"?-1:1,I=(C-((_=E?.startOffset)!=null?_:0))*R,k=Math.max(I/((P=E?.startSize)!=null?P:0),-.999999);return E.columnSizingStart.forEach(B=>{let[L,V]=B;c[L]=Math.round(Math.max(V+V*k,0)*100)/100}),{...E,deltaOffset:I,deltaPercentage:k}}),(t.options.columnResizeMode==="onChange"||w==="end")&&t.setColumnSizing(E=>({...E,...c})))},p=w=>d("move",w),g=w=>{d("end",w),t.setColumnSizingInfo(C=>({...C,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},h=iX(n),y={moveHandler:w=>p(w.clientX),upHandler:w=>{h?.removeEventListener("mousemove",y.moveHandler),h?.removeEventListener("mouseup",y.upHandler),g(w.clientX)}},b={moveHandler:w=>(w.cancelable&&(w.preventDefault(),w.stopPropagation()),p(w.touches[0].clientX),!1),upHandler:w=>{var C;h?.removeEventListener("touchmove",b.moveHandler),h?.removeEventListener("touchend",b.upHandler),w.cancelable&&(w.preventDefault(),w.stopPropagation()),g((C=w.touches[0])==null?void 0:C.clientX)}},v=aX()?{passive:!1}:!1;Bm(o)?(h?.addEventListener("touchmove",b.moveHandler,v),h?.addEventListener("touchend",b.upHandler,v)):(h?.addEventListener("mousemove",y.moveHandler,v),h?.addEventListener("mouseup",y.upHandler,v)),t.setColumnSizingInfo(w=>({...w,startOffset:u,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?Vm():(n=e.initialState.columnSizingInfo)!=null?n:Vm())},e.getTotalSize=()=>{var t,n;return(t=(n=e.getHeaderGroups()[0])==null?void 0:n.headers.reduce((r,i)=>r+i.getSize(),0))!=null?t:0},e.getLeftTotalSize=()=>{var t,n;return(t=(n=e.getLeftHeaderGroups()[0])==null?void 0:n.headers.reduce((r,i)=>r+i.getSize(),0))!=null?t:0},e.getCenterTotalSize=()=>{var t,n;return(t=(n=e.getCenterHeaderGroups()[0])==null?void 0:n.headers.reduce((r,i)=>r+i.getSize(),0))!=null?t:0},e.getRightTotalSize=()=>{var t,n;return(t=(n=e.getRightHeaderGroups()[0])==null?void 0:n.headers.reduce((r,i)=>r+i.getSize(),0))!=null?t:0}}};let nd=null;function aX(){if(typeof nd=="boolean")return nd;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 nd=e,nd}function Bm(e){return e.type==="touchstart"}const sX={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:Ir("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 i=e.columns;return(n=i.length?i.some(o=>o.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()),Ge(t.options,"debugRows","_getAllVisibleCells")),e.getVisibleCells=Ue(()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()],(n,r,i)=>[...n,...r,...i],Ge(t.options,"debugRows","getVisibleCells"))},createTable:e=>{const t=(n,r)=>Ue(()=>[r(),r().filter(i=>i.getIsVisible()).map(i=>i.id).join("_")],i=>i.filter(o=>o.getIsVisible==null?void 0:o.getIsVisible()),Ge(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((i,o)=>({...i,[o.id]:n||!(o.getCanHide!=null&&o.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 Du(e,t){return t?t==="center"?e.getCenterVisibleLeafColumns():t==="left"?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns()}const lX={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()}}},uX={getInitialState:e=>({globalFilter:void 0,...e}),getDefaultOptions:e=>({onGlobalFilterChange:Ir("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,i,o;return((n=e.columnDef.enableGlobalFilter)!=null?n:!0)&&((r=t.options.enableGlobalFilter)!=null?r:!0)&&((i=t.options.enableFilters)!=null?i:!0)&&((o=t.options.getColumnCanGlobalFilter==null?void 0:t.options.getColumnCanGlobalFilter(e))!=null?o:!0)&&!!e.accessorFn}},createTable:e=>{e.getGlobalAutoFilterFn=()=>Ji.includesString,e.getGlobalFilterFn=()=>{var t,n;const{globalFilterFn:r}=e.options;return bh(r)?r:r==="auto"?e.getGlobalAutoFilterFn():(t=(n=e.options.filterFns)==null?void 0:n[r])!=null?t:Ji[r]},e.setGlobalFilter=t=>{e.options.onGlobalFilterChange==null||e.options.onGlobalFilterChange(t)},e.resetGlobalFilter=t=>{e.setGlobalFilter(t?void 0:e.initialState.globalFilter)}}},cX={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:Ir("expanded",e),paginateExpandedRows:!0}),createTable:e=>{let t=!1,n=!1;e._autoResetExpanded=()=>{var r,i;if(!t){e._queue(()=>{t=!0});return}if((r=(i=e.options.autoResetAll)!=null?i: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 i,o;e.setExpanded(r?{}:(i=(o=e.initialState)==null?void 0:o.expanded)!=null?i:{})},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(i=>!i.getIsExpanded()))},e.getExpandedDepth=()=>{let r=0;return(e.getState().expanded===!0?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach(o=>{const a=o.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 i;const o=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=(i=n)!=null?i:!o,!o&&n)return{...a,[e.id]:!0};if(o&&!n){const{[e.id]:s,...u}=a;return u}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,i;return(n=t.options.getRowCanExpand==null?void 0:t.options.getRowCanExpand(e))!=null?n:((r=t.options.enableExpanding)!=null?r:!0)&&!!((i=e.subRows)!=null&&i.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()}}}},Gy=0,qy=10,zm=()=>({pageIndex:Gy,pageSize:qy}),fX={getInitialState:e=>({...e,pagination:{...zm(),...e?.pagination}}),getDefaultOptions:e=>({onPaginationChange:Ir("pagination",e)}),createTable:e=>{let t=!1,n=!1;e._autoResetPageIndex=()=>{var r,i;if(!t){e._queue(()=>{t=!0});return}if((r=(i=e.options.autoResetAll)!=null?i:e.options.autoResetPageIndex)!=null?r:!e.options.manualPagination){if(n)return;n=!0,e._queue(()=>{e.resetPageIndex(),n=!1})}},e.setPagination=r=>{const i=o=>Xo(r,o);return e.options.onPaginationChange==null?void 0:e.options.onPaginationChange(i)},e.resetPagination=r=>{var i;e.setPagination(r?zm():(i=e.initialState.pagination)!=null?i:zm())},e.setPageIndex=r=>{e.setPagination(i=>{let o=Xo(r,i.pageIndex);const a=typeof e.options.pageCount>"u"||e.options.pageCount===-1?Number.MAX_SAFE_INTEGER:e.options.pageCount-1;return o=Math.max(0,Math.min(o,a)),{...i,pageIndex:o}})},e.resetPageIndex=r=>{var i,o;e.setPageIndex(r?Gy:(i=(o=e.initialState)==null||(o=o.pagination)==null?void 0:o.pageIndex)!=null?i:Gy)},e.resetPageSize=r=>{var i,o;e.setPageSize(r?qy:(i=(o=e.initialState)==null||(o=o.pagination)==null?void 0:o.pageSize)!=null?i:qy)},e.setPageSize=r=>{e.setPagination(i=>{const o=Math.max(1,Xo(r,i.pageSize)),a=i.pageSize*i.pageIndex,s=Math.floor(a/o);return{...i,pageIndex:s,pageSize:o}})},e.setPageCount=r=>e.setPagination(i=>{var o;let a=Xo(r,(o=e.options.pageCount)!=null?o:-1);return typeof a=="number"&&(a=Math.max(-1,a)),{...i,pageCount:a}}),e.getPageOptions=Ue(()=>[e.getPageCount()],r=>{let i=[];return r&&r>0&&(i=[...new Array(r)].fill(null).map((o,a)=>a)),i},Ge(e.options,"debugTable","getPageOptions")),e.getCanPreviousPage=()=>e.getState().pagination.pageIndex>0,e.getCanNextPage=()=>{const{pageIndex:r}=e.getState().pagination,i=e.getPageCount();return i===-1?!0:i===0?!1:r<i-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}}},Wm=()=>({top:[],bottom:[]}),dX={getInitialState:e=>({rowPinning:Wm(),...e}),getDefaultOptions:e=>({onRowPinningChange:Ir("rowPinning",e)}),createRow:(e,t)=>{e.pin=(n,r,i)=>{const o=r?e.getLeafRows().map(u=>{let{id:c}=u;return c}):[],a=i?e.getParentRows().map(u=>{let{id:c}=u;return c}):[],s=new Set([...a,e.id,...o]);t.setRowPinning(u=>{var c,d;if(n==="bottom"){var p,g;return{top:((p=u?.top)!=null?p:[]).filter(b=>!(s!=null&&s.has(b))),bottom:[...((g=u?.bottom)!=null?g:[]).filter(b=>!(s!=null&&s.has(b))),...Array.from(s)]}}if(n==="top"){var h,y;return{top:[...((h=u?.top)!=null?h:[]).filter(b=>!(s!=null&&s.has(b))),...Array.from(s)],bottom:((y=u?.bottom)!=null?y:[]).filter(b=>!(s!=null&&s.has(b)))}}return{top:((c=u?.top)!=null?c:[]).filter(b=>!(s!=null&&s.has(b))),bottom:((d=u?.bottom)!=null?d:[]).filter(b=>!(s!=null&&s.has(b)))}})},e.getCanPin=()=>{var n;const{enableRowPinning:r,enablePinning:i}=t.options;return typeof r=="function"?r(e):(n=r??i)!=null?n:!0},e.getIsPinned=()=>{const n=[e.id],{top:r,bottom:i}=t.getState().rowPinning,o=n.some(s=>r?.includes(s)),a=n.some(s=>i?.includes(s));return o?"top":a?"bottom":!1},e.getPinnedIndex=()=>{var n,r;const i=e.getIsPinned();if(!i)return-1;const o=(n=i==="top"?t.getTopRows():t.getBottomRows())==null?void 0:n.map(a=>{let{id:s}=a;return s});return(r=o?.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?Wm():(n=(r=e.initialState)==null?void 0:r.rowPinning)!=null?n:Wm())},e.getIsSomeRowsPinned=t=>{var n;const r=e.getState().rowPinning;if(!t){var i,o;return!!((i=r.top)!=null&&i.length||(o=r.bottom)!=null&&o.length)}return!!((n=r[t])!=null&&n.length)},e._getPinnedRows=(t,n,r)=>{var i;return((i=e.options.keepPinnedRows)==null||i?(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=Ue(()=>[e.getRowModel().rows,e.getState().rowPinning.top],(t,n)=>e._getPinnedRows(t,n,"top"),Ge(e.options,"debugRows","getTopRows")),e.getBottomRows=Ue(()=>[e.getRowModel().rows,e.getState().rowPinning.bottom],(t,n)=>e._getPinnedRows(t,n,"bottom"),Ge(e.options,"debugRows","getBottomRows")),e.getCenterRows=Ue(()=>[e.getRowModel().rows,e.getState().rowPinning.top,e.getState().rowPinning.bottom],(t,n,r)=>{const i=new Set([...n??[],...r??[]]);return t.filter(o=>!i.has(o.id))},Ge(e.options,"debugRows","getCenterRows"))}},pX={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:Ir("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},i=e.getPreGroupedRowModel().flatRows;return t?i.forEach(o=>{o.getCanSelect()&&(r[o.id]=!0)}):i.forEach(o=>{delete r[o.id]}),r})},e.toggleAllPageRowsSelected=t=>e.setRowSelection(n=>{const r=typeof t<"u"?t:!e.getIsAllPageRowsSelected(),i={...n};return e.getRowModel().rows.forEach(o=>{Ky(i,o.id,r,!0,e)}),i}),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=Ue(()=>[e.getState().rowSelection,e.getCoreRowModel()],(t,n)=>Object.keys(t).length?Hm(e,n):{rows:[],flatRows:[],rowsById:{}},Ge(e.options,"debugTable","getSelectedRowModel")),e.getFilteredSelectedRowModel=Ue(()=>[e.getState().rowSelection,e.getFilteredRowModel()],(t,n)=>Object.keys(t).length?Hm(e,n):{rows:[],flatRows:[],rowsById:{}},Ge(e.options,"debugTable","getFilteredSelectedRowModel")),e.getGroupedSelectedRowModel=Ue(()=>[e.getState().rowSelection,e.getSortedRowModel()],(t,n)=>Object.keys(t).length?Hm(e,n):{rows:[],flatRows:[],rowsById:{}},Ge(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(i=>i.getCanSelect()&&!n[i.id])&&(r=!1),r},e.getIsAllPageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows.filter(i=>i.getCanSelect()),{rowSelection:n}=e.getState();let r=!!t.length;return r&&t.some(i=>!n[i.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 i=e.getIsSelected();t.setRowSelection(o=>{var a;if(n=typeof n<"u"?n:!i,e.getCanSelect()&&i===n)return o;const s={...o};return Ky(s,e.id,n,(a=r?.selectChildren)!=null?a:!0,t),s})},e.getIsSelected=()=>{const{rowSelection:n}=t.getState();return bx(e,n)},e.getIsSomeSelected=()=>{const{rowSelection:n}=t.getState();return Yy(e,n)==="some"},e.getIsAllSubRowsSelected=()=>{const{rowSelection:n}=t.getState();return Yy(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 i;n&&e.toggleSelected((i=r.target)==null?void 0:i.checked)}}}},Ky=(e,t,n,r,i)=>{var o;const a=i.getRow(t,!0);n?(a.getCanMultiSelect()||Object.keys(e).forEach(s=>delete e[s]),a.getCanSelect()&&(e[t]=!0)):delete e[t],r&&(o=a.subRows)!=null&&o.length&&a.getCanSelectSubRows()&&a.subRows.forEach(s=>Ky(e,s.id,n,r,i))};function Hm(e,t){const n=e.getState().rowSelection,r=[],i={},o=function(a,s){return a.map(u=>{var c;const d=bx(u,n);if(d&&(r.push(u),i[u.id]=u),(c=u.subRows)!=null&&c.length&&(u={...u,subRows:o(u.subRows)}),d)return u}).filter(Boolean)};return{rows:o(t.rows),flatRows:r,rowsById:i}}function bx(e,t){var n;return(n=t[e.id])!=null?n:!1}function Yy(e,t,n){var r;if(!((r=e.subRows)!=null&&r.length))return!1;let i=!0,o=!1;return e.subRows.forEach(a=>{if(!(o&&!i)&&(a.getCanSelect()&&(bx(a,t)?o=!0:i=!1),a.subRows&&a.subRows.length)){const s=Yy(a,t);s==="all"?o=!0:(s==="some"&&(o=!0),i=!1)}}),i?"all":o?"some":!1}const Xy=/([0-9]+)/gm,hX=(e,t,n)=>xM(aa(e.getValue(n)).toLowerCase(),aa(t.getValue(n)).toLowerCase()),gX=(e,t,n)=>xM(aa(e.getValue(n)),aa(t.getValue(n))),mX=(e,t,n)=>xx(aa(e.getValue(n)).toLowerCase(),aa(t.getValue(n)).toLowerCase()),vX=(e,t,n)=>xx(aa(e.getValue(n)),aa(t.getValue(n))),yX=(e,t,n)=>{const r=e.getValue(n),i=t.getValue(n);return r>i?1:r<i?-1:0},bX=(e,t,n)=>xx(e.getValue(n),t.getValue(n));function xx(e,t){return e===t?0:e>t?1:-1}function aa(e){return typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?"":String(e):typeof e=="string"?e:""}function xM(e,t){const n=e.split(Xy).filter(Boolean),r=t.split(Xy).filter(Boolean);for(;n.length&&r.length;){const i=n.shift(),o=r.shift(),a=parseInt(i,10),s=parseInt(o,10),u=[a,s].sort();if(isNaN(u[0])){if(i>o)return 1;if(o>i)return-1;continue}if(isNaN(u[1]))return isNaN(a)?-1:1;if(a>s)return 1;if(s>a)return-1}return n.length-r.length}const cu={alphanumeric:hX,alphanumericCaseSensitive:gX,text:mX,textCaseSensitive:vX,datetime:yX,basic:bX},xX={getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:Ir("sorting",e),isMultiSortEvent:t=>t.shiftKey}),createColumn:(e,t)=>{e.getAutoSortingFn=()=>{const n=t.getFilteredRowModel().flatRows.slice(10);let r=!1;for(const i of n){const o=i?.getValue(e.id);if(Object.prototype.toString.call(o)==="[object Date]")return cu.datetime;if(typeof o=="string"&&(r=!0,o.split(Xy).length>1))return cu.alphanumeric}return r?cu.text:cu.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 bh(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:cu[e.columnDef.sortingFn]},e.toggleSorting=(n,r)=>{const i=e.getNextSortingOrder(),o=typeof n<"u"&&n!==null;t.setSorting(a=>{const s=a?.find(h=>h.id===e.id),u=a?.findIndex(h=>h.id===e.id);let c=[],d,p=o?n:i==="desc";if(a!=null&&a.length&&e.getCanMultiSort()&&r?s?d="toggle":d="add":a!=null&&a.length&&u!==a.length-1?d="replace":s?d="toggle":d="replace",d==="toggle"&&(o||i||(d="remove")),d==="add"){var g;c=[...a,{id:e.id,desc:p}],c.splice(0,c.length-((g=t.options.maxMultiSortColCount)!=null?g:Number.MAX_SAFE_INTEGER))}else d==="toggle"?c=a.map(h=>h.id===e.id?{...h,desc:p}:h):d==="remove"?c=a.filter(h=>h.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,i;const o=e.getFirstSortDir(),a=e.getIsSorted();return a?a!==o&&((r=t.options.enableSortingRemoval)==null||r)&&(!(n&&(i=t.options.enableMultiRemove)!=null)||i)?!1:a==="desc"?"asc":"desc":o},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(i=>i.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(i=>i.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())}},wX=[BY,sX,nX,rX,WY,HY,lX,uX,xX,eX,cX,fX,dX,pX,oX];function CX(e){var t,n;process.env.NODE_ENV!=="production"&&(e.debugAll||e.debugTable)&&console.info("Creating Table Instance...");const r=[...wX,...(t=e._features)!=null?t:[]];let i={_features:r};const o=i._features.reduce((g,h)=>Object.assign(g,h.getDefaultOptions==null?void 0:h.getDefaultOptions(i)),{}),a=g=>i.options.mergeOptions?i.options.mergeOptions(o,g):{...o,...g};let u={...{},...(n=e.initialState)!=null?n:{}};i._features.forEach(g=>{var h;u=(h=g.getInitialState==null?void 0:g.getInitialState(u))!=null?h:u});const c=[];let d=!1;const p={_features:r,options:{...o,...e},initialState:u,_queue:g=>{c.push(g),d||(d=!0,Promise.resolve().then(()=>{for(;c.length;)c.shift()();d=!1}).catch(h=>setTimeout(()=>{throw h})))},reset:()=>{i.setState(i.initialState)},setOptions:g=>{const h=Xo(g,i.options);i.options=a(h)},getState:()=>i.options.state,setState:g=>{i.options.onStateChange==null||i.options.onStateChange(g)},_getRowId:(g,h,y)=>{var b;return(b=i.options.getRowId==null?void 0:i.options.getRowId(g,h,y))!=null?b:`${y?[y.id,h].join("."):h}`},getCoreRowModel:()=>(i._getCoreRowModel||(i._getCoreRowModel=i.options.getCoreRowModel(i)),i._getCoreRowModel()),getRowModel:()=>i.getPaginationRowModel(),getRow:(g,h)=>{let y=(h?i.getPrePaginationRowModel():i.getRowModel()).rowsById[g];if(!y&&(y=i.getCoreRowModel().rowsById[g],!y))throw process.env.NODE_ENV!=="production"?new Error(`getRow could not find row with ID: ${g}`):new Error;return y},_getDefaultColumnDef:Ue(()=>[i.options.defaultColumn],g=>{var h;return g=(h=g)!=null?h:{},{header:y=>{const b=y.header.column.columnDef;return b.accessorKey?b.accessorKey:b.accessorFn?b.id:null},cell:y=>{var b,v;return(b=(v=y.renderValue())==null||v.toString==null?void 0:v.toString())!=null?b:null},...i._features.reduce((y,b)=>Object.assign(y,b.getDefaultColumnDef==null?void 0:b.getDefaultColumnDef()),{}),...g}},Ge(e,"debugColumns","_getDefaultColumnDef")),_getColumnDefs:()=>i.options.columns,getAllColumns:Ue(()=>[i._getColumnDefs()],g=>{const h=function(y,b,v){return v===void 0&&(v=0),y.map(w=>{const C=VY(i,w,v,b),E=w;return C.columns=E.columns?h(E.columns,C,v+1):[],C})};return h(g)},Ge(e,"debugColumns","getAllColumns")),getAllFlatColumns:Ue(()=>[i.getAllColumns()],g=>g.flatMap(h=>h.getFlatColumns()),Ge(e,"debugColumns","getAllFlatColumns")),_getAllFlatColumnsById:Ue(()=>[i.getAllFlatColumns()],g=>g.reduce((h,y)=>(h[y.id]=y,h),{}),Ge(e,"debugColumns","getAllFlatColumnsById")),getAllLeafColumns:Ue(()=>[i.getAllColumns(),i._getOrderColumnsFn()],(g,h)=>{let y=g.flatMap(b=>b.getLeafColumns());return h(y)},Ge(e,"debugColumns","getAllLeafColumns")),getColumn:g=>{const h=i._getAllFlatColumnsById()[g];return process.env.NODE_ENV!=="production"&&!h&&console.error(`[Table] Column with id '${g}' does not exist.`),h}};Object.assign(i,p);for(let g=0;g<i._features.length;g++){const h=i._features[g];h==null||h.createTable==null||h.createTable(i)}return i}function SX(){return e=>Ue(()=>[e.options.data],t=>{const n={rows:[],flatRows:[],rowsById:{}},r=function(i,o,a){o===void 0&&(o=0);const s=[];for(let c=0;c<i.length;c++){const d=zY(e,e._getRowId(i[c],c,a),i[c],c,o,void 0,a?.id);if(n.flatRows.push(d),n.rowsById[d.id]=d,s.push(d),e.options.getSubRows){var u;d.originalSubRows=e.options.getSubRows(i[c],c),(u=d.originalSubRows)!=null&&u.length&&(d.subRows=r(d.originalSubRows,o+1,d))}}return s};return n.rows=r(t),n},Ge(e.options,"debugTable","getRowModel",()=>e._autoResetPageIndex()))}function AE(e,t){return e?EX(e)?x.createElement(e,t):e:null}function EX(e){return _X(e)||typeof e=="function"||OX(e)}function _X(e){return typeof e=="function"&&(()=>{const t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}function OX(e){return typeof e=="object"&&typeof e.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}function PX(e){const t={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[n]=x.useState(()=>({current:CX(t)})),[r,i]=x.useState(()=>n.current.initialState);return n.current.setOptions(o=>({...o,...e,state:{...r,...e.state},onStateChange:a=>{i(a),e.onStateChange==null||e.onStateChange(a)}})),n.current}function AX({columns:e,data:t}){const n=PX({data:t,columns:e,getCoreRowModel:SX()});return O.jsx("div",{className:"w-full overflow-hidden",children:O.jsxs(sx,{children:[O.jsx(lx,{children:n.getHeaderGroups().map(r=>O.jsx(Mu,{children:r.headers.map(i=>O.jsx(cx,{children:i.isPlaceholder?null:AE(i.column.columnDef.header,i.getContext())},i.id))},r.id))}),O.jsx(ux,{children:n.getRowModel().rows.length?n.getRowModel().rows.map(r=>O.jsx(Mu,{"data-state":r.getIsSelected()&&"selected",children:r.getVisibleCells().map(i=>O.jsx(Zd,{children:AE(i.column.columnDef.cell,i.getContext())},i.id))},r.id)):O.jsx(Mu,{children:O.jsx(Zd,{colSpan:e.length,className:"h-24 text-center",children:"No results."})})})]})})}const RX=({children:e,text:t,place:n="top",arrow:r=!0,classes:i,color:o="dark",tooltipItemsLimit:a=1/0})=>{const{isOpened:s,togglePopup:u}=vx(),c=j.useMemo(()=>({arrow:o==="dark"?"fill-primary-inverse-bg":"fill-primary-bg",content:o==="dark"?"bg-primary-inverse-bg text-primary-inverse-text":"bg-primary-bg text-primary-text"}),[o]),d=j.useMemo(()=>Array.isArray(t)?(t.length-a>0?t.slice(0,a):t).map((h,y)=>O.jsx("p",{className:i?.tooltipTextItem,children:h},y)):t,[i?.tooltipTextItem,t,a]);return O.jsxs(uM,{open:s,onOpenChange:u,children:[O.jsx(cM,{asChild:!0,className:i?.trigger,children:e}),O.jsxs(mx,{side:n,className:c.content,children:[O.jsx("div",{className:ue(i?.tooltip),children:d}),r&&O.jsx(fM,{className:c.arrow})]})]})},wM=({date:e=[],isValid:t,disabled:n=!1,label:r,description:i,classes:o,ref:a,...s})=>{const u={...t===!0&&!n&&{"aria-valid":!0},...t===!1&&!n&&{"aria-invalid":!0},disabled:n};return O.jsx(lh,{className:o?.fieldset,children:O.jsx(ac,{className:o?.fieldgroup,children:O.jsxs(sc,{className:o?.field,children:[r&&O.jsx(El,{...u,children:r}),e.length>0?O.jsxs(B0,{"data-slot":!0,children:[O.jsx(W0,{ref:a,...s,...u,disabled:n}),e.map(c=>O.jsx(z0,{align:c.position,children:c.component},c.id))]}):O.jsx(V0,{ref:a,...s,...u,disabled:n}),i&&O.jsx(lc,{...u,children:i})]})})})},IX=({...e})=>{const{isOpened:t,togglePopup:n}=vx();return O.jsx(wM,{...e,type:t?"text":"password",date:[{id:"0",position:"inline-end",component:O.jsx(uo,{type:t?"eye-off":"eye",onClick:n,className:"cursor-pointer"})}]})};function TX({classNames:e,id:t,value:n,defaultValue:r,label:i,options:o=[],...a}){return O.jsx(ax,{...a,defaultValue:r,className:ue("w-fit",e?.classNameGroup),children:o.length?o.map(s=>O.jsxs("div",{className:ue("flex items-center gap-3",e?.classNameContainerItem),children:[O.jsx(Xd,{value:s.value,id:s.id,className:e?.classNameGroupItem}),s.label&&O.jsx(Vu,{htmlFor:s.id,className:e?.classNameLabel,children:s.label})]},s.id)):O.jsxs("div",{className:ue("flex items-center gap-3",e?.classNameContainerItem),children:[O.jsx(Xd,{value:n,id:t,className:e?.classNameGroupItem}),i&&O.jsx(Vu,{htmlFor:t,className:e?.classNameLabel,children:i})]})})}const Su=e=>typeof e=="object",CM=e=>Su(e)?e.value:e,kX=e=>e.every(t=>typeof t=="string")||e.every(t=>typeof t=="object")?e:e.map(t=>CM(t)),Um=(e,t)=>e===null||t===null||typeof e=="string"||typeof t=="string"?e===t:e.id===t.id,SM=({list:e,label:t,multiple:n,disabled:r=!1,isValid:i,description:o,onChange:a,...s})=>{const[u,c]=j.useState([]),[d,p]=j.useState(null),[g,h]=j.useState(""),y=e,b=r?"opacity-50":"",v={...i===!0&&!r&&{"aria-valid":!0},...i===!1&&!r&&{"aria-invalid":!0},disabled:r},w=L=>{if(n){const V=Array.isArray(L)?L:L?[L]:[],D=V.length>u.length;c(V),a?.(kX(V)),D&&h("")}else{const V=Array.isArray(L)?L[0]??null:L;Um(d,V)?(p(null),a?.(null)):(p(V),a?.(V)),h("")}},C=L=>{h(L.currentTarget.value)},E=()=>{r||(p(null),a?.(null))},_=n?u:d,P=g.trim().toLowerCase(),R=y.filter(L=>CM(L).toLowerCase().includes(P)),I=(L,V)=>O.jsx(JT,{showRemove:V.withRemove,onClick:V.onClick,className:`${Zb({variant:L.variant,kind:L.kind})}
168
+ ${b} ${V.className}`,children:O.jsx(xy,{variant:L.variant,classNames:{className:"px-2 py-0"},children:L.value})},String(L.id)),k=L=>O.jsxs(O.Fragment,{children:[L.map(V=>Su(V)?I(V,{withRemove:!r,className:"pl-2.5"}):O.jsx("span",{className:b,children:V},V)),O.jsx(Vy,{...s,...v,placeholder:L.length>0?"":s.placeholder,value:g,onChange:C})]}),B=L=>O.jsxs(O.Fragment,{children:[L&&(Su(L)?I(L,{withRemove:!1,className:"ml-1",onClick:E}):O.jsx(by,{className:b,onClick:E,children:L})),O.jsx(Vy,{...s,placeholder:L?"":s.placeholder,...v,value:g,onChange:C,className:"flex-1 pl-1"})]});return O.jsx(lh,{children:O.jsx(ac,{children:O.jsxs(KT,{children:[O.jsx(El,{...v,children:t}),O.jsxs(qT,{items:y,multiple:n,autoHighlight:n,value:_,onValueChange:r?void 0:w,children:[n?O.jsxs(Fy,{disabled:r,className:"pr-8",children:[O.jsx($y,{children:k}),O.jsx(qd,{className:"-ml-4.5",disabled:r})]}):O.jsxs(Fy,{disabled:r,className:"pr-8",children:[O.jsx($y,{children:B}),O.jsx(qd,{className:"-ml-4.5",disabled:r})]}),O.jsxs(YT,{children:[O.jsx(QT,{children:"No items found."}),O.jsx(XT,{children:R.map((L,V)=>{const D=n?u.some(H=>Um(H,L)):Um(d,L);return O.jsx(ZT,{disabled:r,value:L,className:`${D?"bg-tertiary-bg":""} ${typeof L=="string"?"py-1":"px-2 py-2"}`,children:Su(L)?O.jsx(xy,{dotPosition:"left",variant:L.variant,kind:L.kind,classNames:{className:"px-4 py-1.5"},children:L.value}):O.jsx(by,{className:"px-4 py-1.5",children:L})},Su(L)?String(L.id):`${L}-${V}`)})})]})]}),O.jsx(lc,{...v,children:o})]})})})};SM.displayName="SelectSearch";const NX=({label:e,description:t,isValid:n,...r})=>{const{disabled:i}=r,o={"aria-invalid":!!n},a=[n===!0&&"text-success-text",n===!1&&"text-error-text",i&&"text-disabled-text"].filter(Boolean).join(" ");return O.jsx(lh,{children:O.jsx(ac,{children:O.jsxs(sc,{children:[e&&O.jsx(El,{children:e}),O.jsx(uh,{...r,...o}),t&&O.jsx(lc,{className:ue(i?"text-disabled-text":"",a),children:t})]})})})};var Eu={exports:{}};var MX=Eu.exports,RE;function DX(){return RE||(RE=1,(function(e,t){(function(){var n,r="4.17.23",i=200,o="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",a="Expected a function",s="Invalid `variable` option passed into `_.template`",u="__lodash_hash_undefined__",c=500,d="__lodash_placeholder__",p=1,g=2,h=4,y=1,b=2,v=1,w=2,C=4,E=8,_=16,P=32,R=64,I=128,k=256,B=512,L=30,V="...",D=800,H=16,J=1,te=2,G=3,ee=1/0,Q=9007199254740991,pe=17976931348623157e292,K=NaN,Ae=4294967295,Se=Ae-1,$e=Ae>>>1,we=[["ary",I],["bind",v],["bindKey",w],["curry",E],["curryRight",_],["flip",B],["partial",P],["partialRight",R],["rearg",k]],Ce="[object Arguments]",ze="[object Array]",Ke="[object AsyncFunction]",Fe="[object Boolean]",Y="[object Date]",oe="[object DOMException]",ne="[object Error]",$="[object Function]",ie="[object GeneratorFunction]",Z="[object Map]",Re="[object Number]",U="[object Null]",fe="[object Object]",me="[object Promise]",de="[object Proxy]",ve="[object RegExp]",le="[object Set]",be="[object String]",ke="[object Symbol]",et="[object Undefined]",Tt="[object WeakMap]",Dn="[object WeakSet]",Ct="[object ArrayBuffer]",ot="[object DataView]",kt="[object Float32Array]",mn="[object Float64Array]",on="[object Int8Array]",_n="[object Int16Array]",Qt="[object Int32Array]",vn="[object Uint8Array]",hr="[object Uint8ClampedArray]",Hn="[object Uint16Array]",pt="[object Uint32Array]",ht=/\b__p \+= '';/g,Ve=/\b(__p \+=) '' \+/g,jn=/(__e\(.*?\)|\b__t\)) \+\n'';/g,On=/&(?:amp|lt|gt|quot|#39);/g,mi=/[&<>"']/g,Jt=RegExp(On.source),ma=RegExp(mi.source),$t=/<%-([\s\S]+?)%>/g,Dl=/<%([\s\S]+?)%>/g,nr=/<%=([\s\S]+?)%>/g,yn=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,va=/^\w*$/,Ao=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Dr=/[\\^$.*+?()[\]{}|]/g,vs=RegExp(Dr.source),jr=/^\s+/,gr=/\s/,Un=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,rt=/\{\n\/\* \[wrapped with (.+)\] \*/,vi=/,? & /,og=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,jl=/[()=,{}\[\]\/\s]/,Ll=/\\(\\)?/g,ys=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Nc=/\w*$/,bs=/^[-+]0x[0-9a-f]+$/i,Mc=/^0b[01]+$/i,ya=/^\[object .+?Constructor\]$/,$l=/^0o[0-7]+$/i,mr=/^(?:0|[1-9]\d*)$/,yi=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,xs=/($^)/,Dc=/['\n\r\u2028\u2029\\]/g,ws="\\ud800-\\udfff",Fl="\\u0300-\\u036f",jc="\\ufe20-\\ufe2f",Vl="\\u20d0-\\u20ff",Lc=Fl+jc+Vl,ba="\\u2700-\\u27bf",$c="a-z\\xdf-\\xf6\\xf8-\\xff",vr="\\xac\\xb1\\xd7\\xf7",Lr="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",xa="\\u2000-\\u206f",Cs=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Fc="A-Z\\xc0-\\xd6\\xd8-\\xde",Ss="\\ufe0e\\ufe0f",Es=vr+Lr+xa+Cs,Bl="['’]",_s="["+ws+"]",Os="["+Es+"]",Ro="["+Lc+"]",Vc="\\d+",ag="["+ba+"]",Bc="["+$c+"]",zc="[^"+ws+Es+Vc+ba+$c+Fc+"]",wa="\\ud83c[\\udffb-\\udfff]",zl="(?:"+Ro+"|"+wa+")",Ps="[^"+ws+"]",Wl="(?:\\ud83c[\\udde6-\\uddff]){2}",Hl="[\\ud800-\\udbff][\\udc00-\\udfff]",Io="["+Fc+"]",Wc="\\u200d",As="(?:"+Bc+"|"+zc+")",sg="(?:"+Io+"|"+zc+")",Hc="(?:"+Bl+"(?:d|ll|m|re|s|t|ve))?",xe="(?:"+Bl+"(?:D|LL|M|RE|S|T|VE))?",De=zl+"?",Ze="["+Ss+"]?",Bt="(?:"+Wc+"(?:"+[Ps,Wl,Hl].join("|")+")"+Ze+De+")*",en="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",tn="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",bi=Ze+De+Bt,Bi="(?:"+[ag,Wl,Hl].join("|")+")"+bi,Rs="(?:"+[Ps+Ro+"?",Ro,Wl,Hl,_s].join("|")+")",lg=RegExp(Bl,"g"),Jw=RegExp(Ro,"g"),ug=RegExp(wa+"(?="+wa+")|"+Rs+bi,"g"),N$=RegExp([Io+"?"+Bc+"+"+Hc+"(?="+[Os,Io,"$"].join("|")+")",sg+"+"+xe+"(?="+[Os,Io+As,"$"].join("|")+")",Io+"?"+As+"+"+Hc,Io+"+"+xe,tn,en,Vc,Bi].join("|"),"g"),M$=RegExp("["+Wc+ws+Lc+Ss+"]"),D$=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,j$=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],L$=-1,Nt={};Nt[kt]=Nt[mn]=Nt[on]=Nt[_n]=Nt[Qt]=Nt[vn]=Nt[hr]=Nt[Hn]=Nt[pt]=!0,Nt[Ce]=Nt[ze]=Nt[Ct]=Nt[Fe]=Nt[ot]=Nt[Y]=Nt[ne]=Nt[$]=Nt[Z]=Nt[Re]=Nt[fe]=Nt[ve]=Nt[le]=Nt[be]=Nt[Tt]=!1;var Rt={};Rt[Ce]=Rt[ze]=Rt[Ct]=Rt[ot]=Rt[Fe]=Rt[Y]=Rt[kt]=Rt[mn]=Rt[on]=Rt[_n]=Rt[Qt]=Rt[Z]=Rt[Re]=Rt[fe]=Rt[ve]=Rt[le]=Rt[be]=Rt[ke]=Rt[vn]=Rt[hr]=Rt[Hn]=Rt[pt]=!0,Rt[ne]=Rt[$]=Rt[Tt]=!1;var $$={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},F$={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},V$={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},B$={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},z$=parseFloat,W$=parseInt,e1=typeof Wf=="object"&&Wf&&Wf.Object===Object&&Wf,H$=typeof self=="object"&&self&&self.Object===Object&&self,Pn=e1||H$||Function("return this")(),cg=t&&!t.nodeType&&t,Ca=cg&&!0&&e&&!e.nodeType&&e,t1=Ca&&Ca.exports===cg,fg=t1&&e1.process,$r=(function(){try{var z=Ca&&Ca.require&&Ca.require("util").types;return z||fg&&fg.binding&&fg.binding("util")}catch{}})(),n1=$r&&$r.isArrayBuffer,r1=$r&&$r.isDate,i1=$r&&$r.isMap,o1=$r&&$r.isRegExp,a1=$r&&$r.isSet,s1=$r&&$r.isTypedArray;function yr(z,re,X){switch(X.length){case 0:return z.call(re);case 1:return z.call(re,X[0]);case 2:return z.call(re,X[0],X[1]);case 3:return z.call(re,X[0],X[1],X[2])}return z.apply(re,X)}function U$(z,re,X,Ee){for(var qe=-1,gt=z==null?0:z.length;++qe<gt;){var an=z[qe];re(Ee,an,X(an),z)}return Ee}function Fr(z,re){for(var X=-1,Ee=z==null?0:z.length;++X<Ee&&re(z[X],X,z)!==!1;);return z}function G$(z,re){for(var X=z==null?0:z.length;X--&&re(z[X],X,z)!==!1;);return z}function l1(z,re){for(var X=-1,Ee=z==null?0:z.length;++X<Ee;)if(!re(z[X],X,z))return!1;return!0}function To(z,re){for(var X=-1,Ee=z==null?0:z.length,qe=0,gt=[];++X<Ee;){var an=z[X];re(an,X,z)&&(gt[qe++]=an)}return gt}function Uc(z,re){var X=z==null?0:z.length;return!!X&&Is(z,re,0)>-1}function dg(z,re,X){for(var Ee=-1,qe=z==null?0:z.length;++Ee<qe;)if(X(re,z[Ee]))return!0;return!1}function Ft(z,re){for(var X=-1,Ee=z==null?0:z.length,qe=Array(Ee);++X<Ee;)qe[X]=re(z[X],X,z);return qe}function ko(z,re){for(var X=-1,Ee=re.length,qe=z.length;++X<Ee;)z[qe+X]=re[X];return z}function pg(z,re,X,Ee){var qe=-1,gt=z==null?0:z.length;for(Ee&&gt&&(X=z[++qe]);++qe<gt;)X=re(X,z[qe],qe,z);return X}function q$(z,re,X,Ee){var qe=z==null?0:z.length;for(Ee&&qe&&(X=z[--qe]);qe--;)X=re(X,z[qe],qe,z);return X}function hg(z,re){for(var X=-1,Ee=z==null?0:z.length;++X<Ee;)if(re(z[X],X,z))return!0;return!1}var K$=gg("length");function Y$(z){return z.split("")}function X$(z){return z.match(og)||[]}function u1(z,re,X){var Ee;return X(z,function(qe,gt,an){if(re(qe,gt,an))return Ee=gt,!1}),Ee}function Gc(z,re,X,Ee){for(var qe=z.length,gt=X+(Ee?1:-1);Ee?gt--:++gt<qe;)if(re(z[gt],gt,z))return gt;return-1}function Is(z,re,X){return re===re?lF(z,re,X):Gc(z,c1,X)}function Z$(z,re,X,Ee){for(var qe=X-1,gt=z.length;++qe<gt;)if(Ee(z[qe],re))return qe;return-1}function c1(z){return z!==z}function f1(z,re){var X=z==null?0:z.length;return X?vg(z,re)/X:K}function gg(z){return function(re){return re==null?n:re[z]}}function mg(z){return function(re){return z==null?n:z[re]}}function d1(z,re,X,Ee,qe){return qe(z,function(gt,an,_t){X=Ee?(Ee=!1,gt):re(X,gt,an,_t)}),X}function Q$(z,re){var X=z.length;for(z.sort(re);X--;)z[X]=z[X].value;return z}function vg(z,re){for(var X,Ee=-1,qe=z.length;++Ee<qe;){var gt=re(z[Ee]);gt!==n&&(X=X===n?gt:X+gt)}return X}function yg(z,re){for(var X=-1,Ee=Array(z);++X<z;)Ee[X]=re(X);return Ee}function J$(z,re){return Ft(re,function(X){return[X,z[X]]})}function p1(z){return z&&z.slice(0,v1(z)+1).replace(jr,"")}function br(z){return function(re){return z(re)}}function bg(z,re){return Ft(re,function(X){return z[X]})}function Ul(z,re){return z.has(re)}function h1(z,re){for(var X=-1,Ee=z.length;++X<Ee&&Is(re,z[X],0)>-1;);return X}function g1(z,re){for(var X=z.length;X--&&Is(re,z[X],0)>-1;);return X}function eF(z,re){for(var X=z.length,Ee=0;X--;)z[X]===re&&++Ee;return Ee}var tF=mg($$),nF=mg(F$);function rF(z){return"\\"+B$[z]}function iF(z,re){return z==null?n:z[re]}function Ts(z){return M$.test(z)}function oF(z){return D$.test(z)}function aF(z){for(var re,X=[];!(re=z.next()).done;)X.push(re.value);return X}function xg(z){var re=-1,X=Array(z.size);return z.forEach(function(Ee,qe){X[++re]=[qe,Ee]}),X}function m1(z,re){return function(X){return z(re(X))}}function No(z,re){for(var X=-1,Ee=z.length,qe=0,gt=[];++X<Ee;){var an=z[X];(an===re||an===d)&&(z[X]=d,gt[qe++]=X)}return gt}function qc(z){var re=-1,X=Array(z.size);return z.forEach(function(Ee){X[++re]=Ee}),X}function sF(z){var re=-1,X=Array(z.size);return z.forEach(function(Ee){X[++re]=[Ee,Ee]}),X}function lF(z,re,X){for(var Ee=X-1,qe=z.length;++Ee<qe;)if(z[Ee]===re)return Ee;return-1}function uF(z,re,X){for(var Ee=X+1;Ee--;)if(z[Ee]===re)return Ee;return Ee}function ks(z){return Ts(z)?fF(z):K$(z)}function ii(z){return Ts(z)?dF(z):Y$(z)}function v1(z){for(var re=z.length;re--&&gr.test(z.charAt(re)););return re}var cF=mg(V$);function fF(z){for(var re=ug.lastIndex=0;ug.test(z);)++re;return re}function dF(z){return z.match(ug)||[]}function pF(z){return z.match(N$)||[]}var hF=(function z(re){re=re==null?Pn:Ns.defaults(Pn.Object(),re,Ns.pick(Pn,j$));var X=re.Array,Ee=re.Date,qe=re.Error,gt=re.Function,an=re.Math,_t=re.Object,wg=re.RegExp,gF=re.String,Vr=re.TypeError,Kc=X.prototype,mF=gt.prototype,Ms=_t.prototype,Yc=re["__core-js_shared__"],Xc=mF.toString,vt=Ms.hasOwnProperty,vF=0,y1=(function(){var l=/[^.]+$/.exec(Yc&&Yc.keys&&Yc.keys.IE_PROTO||"");return l?"Symbol(src)_1."+l:""})(),Zc=Ms.toString,yF=Xc.call(_t),bF=Pn._,xF=wg("^"+Xc.call(vt).replace(Dr,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Qc=t1?re.Buffer:n,Mo=re.Symbol,Jc=re.Uint8Array,b1=Qc?Qc.allocUnsafe:n,ef=m1(_t.getPrototypeOf,_t),x1=_t.create,w1=Ms.propertyIsEnumerable,tf=Kc.splice,C1=Mo?Mo.isConcatSpreadable:n,Gl=Mo?Mo.iterator:n,Sa=Mo?Mo.toStringTag:n,nf=(function(){try{var l=Aa(_t,"defineProperty");return l({},"",{}),l}catch{}})(),wF=re.clearTimeout!==Pn.clearTimeout&&re.clearTimeout,CF=Ee&&Ee.now!==Pn.Date.now&&Ee.now,SF=re.setTimeout!==Pn.setTimeout&&re.setTimeout,rf=an.ceil,of=an.floor,Cg=_t.getOwnPropertySymbols,EF=Qc?Qc.isBuffer:n,S1=re.isFinite,_F=Kc.join,OF=m1(_t.keys,_t),sn=an.max,Ln=an.min,PF=Ee.now,AF=re.parseInt,E1=an.random,RF=Kc.reverse,Sg=Aa(re,"DataView"),ql=Aa(re,"Map"),Eg=Aa(re,"Promise"),Ds=Aa(re,"Set"),Kl=Aa(re,"WeakMap"),Yl=Aa(_t,"create"),af=Kl&&new Kl,js={},IF=Ra(Sg),TF=Ra(ql),kF=Ra(Eg),NF=Ra(Ds),MF=Ra(Kl),sf=Mo?Mo.prototype:n,Xl=sf?sf.valueOf:n,_1=sf?sf.toString:n;function T(l){if(Ut(l)&&!Ye(l)&&!(l instanceof at)){if(l instanceof Br)return l;if(vt.call(l,"__wrapped__"))return OC(l)}return new Br(l)}var Ls=(function(){function l(){}return function(f){if(!zt(f))return{};if(x1)return x1(f);l.prototype=f;var m=new l;return l.prototype=n,m}})();function lf(){}function Br(l,f){this.__wrapped__=l,this.__actions__=[],this.__chain__=!!f,this.__index__=0,this.__values__=n}T.templateSettings={escape:$t,evaluate:Dl,interpolate:nr,variable:"",imports:{_:T}},T.prototype=lf.prototype,T.prototype.constructor=T,Br.prototype=Ls(lf.prototype),Br.prototype.constructor=Br;function at(l){this.__wrapped__=l,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=Ae,this.__views__=[]}function DF(){var l=new at(this.__wrapped__);return l.__actions__=rr(this.__actions__),l.__dir__=this.__dir__,l.__filtered__=this.__filtered__,l.__iteratees__=rr(this.__iteratees__),l.__takeCount__=this.__takeCount__,l.__views__=rr(this.__views__),l}function jF(){if(this.__filtered__){var l=new at(this);l.__dir__=-1,l.__filtered__=!0}else l=this.clone(),l.__dir__*=-1;return l}function LF(){var l=this.__wrapped__.value(),f=this.__dir__,m=Ye(l),S=f<0,A=m?l.length:0,N=YV(0,A,this.__views__),M=N.start,F=N.end,W=F-M,ae=S?F:M-1,se=this.__iteratees__,ce=se.length,ye=0,Ie=Ln(W,this.__takeCount__);if(!m||!S&&A==W&&Ie==W)return Y1(l,this.__actions__);var We=[];e:for(;W--&&ye<Ie;){ae+=f;for(var Je=-1,He=l[ae];++Je<ce;){var it=se[Je],st=it.iteratee,Cr=it.type,Kn=st(He);if(Cr==te)He=Kn;else if(!Kn){if(Cr==J)continue e;break e}}We[ye++]=He}return We}at.prototype=Ls(lf.prototype),at.prototype.constructor=at;function Ea(l){var f=-1,m=l==null?0:l.length;for(this.clear();++f<m;){var S=l[f];this.set(S[0],S[1])}}function $F(){this.__data__=Yl?Yl(null):{},this.size=0}function FF(l){var f=this.has(l)&&delete this.__data__[l];return this.size-=f?1:0,f}function VF(l){var f=this.__data__;if(Yl){var m=f[l];return m===u?n:m}return vt.call(f,l)?f[l]:n}function BF(l){var f=this.__data__;return Yl?f[l]!==n:vt.call(f,l)}function zF(l,f){var m=this.__data__;return this.size+=this.has(l)?0:1,m[l]=Yl&&f===n?u:f,this}Ea.prototype.clear=$F,Ea.prototype.delete=FF,Ea.prototype.get=VF,Ea.prototype.has=BF,Ea.prototype.set=zF;function zi(l){var f=-1,m=l==null?0:l.length;for(this.clear();++f<m;){var S=l[f];this.set(S[0],S[1])}}function WF(){this.__data__=[],this.size=0}function HF(l){var f=this.__data__,m=uf(f,l);if(m<0)return!1;var S=f.length-1;return m==S?f.pop():tf.call(f,m,1),--this.size,!0}function UF(l){var f=this.__data__,m=uf(f,l);return m<0?n:f[m][1]}function GF(l){return uf(this.__data__,l)>-1}function qF(l,f){var m=this.__data__,S=uf(m,l);return S<0?(++this.size,m.push([l,f])):m[S][1]=f,this}zi.prototype.clear=WF,zi.prototype.delete=HF,zi.prototype.get=UF,zi.prototype.has=GF,zi.prototype.set=qF;function Wi(l){var f=-1,m=l==null?0:l.length;for(this.clear();++f<m;){var S=l[f];this.set(S[0],S[1])}}function KF(){this.size=0,this.__data__={hash:new Ea,map:new(ql||zi),string:new Ea}}function YF(l){var f=wf(this,l).delete(l);return this.size-=f?1:0,f}function XF(l){return wf(this,l).get(l)}function ZF(l){return wf(this,l).has(l)}function QF(l,f){var m=wf(this,l),S=m.size;return m.set(l,f),this.size+=m.size==S?0:1,this}Wi.prototype.clear=KF,Wi.prototype.delete=YF,Wi.prototype.get=XF,Wi.prototype.has=ZF,Wi.prototype.set=QF;function _a(l){var f=-1,m=l==null?0:l.length;for(this.__data__=new Wi;++f<m;)this.add(l[f])}function JF(l){return this.__data__.set(l,u),this}function eV(l){return this.__data__.has(l)}_a.prototype.add=_a.prototype.push=JF,_a.prototype.has=eV;function oi(l){var f=this.__data__=new zi(l);this.size=f.size}function tV(){this.__data__=new zi,this.size=0}function nV(l){var f=this.__data__,m=f.delete(l);return this.size=f.size,m}function rV(l){return this.__data__.get(l)}function iV(l){return this.__data__.has(l)}function oV(l,f){var m=this.__data__;if(m instanceof zi){var S=m.__data__;if(!ql||S.length<i-1)return S.push([l,f]),this.size=++m.size,this;m=this.__data__=new Wi(S)}return m.set(l,f),this.size=m.size,this}oi.prototype.clear=tV,oi.prototype.delete=nV,oi.prototype.get=rV,oi.prototype.has=iV,oi.prototype.set=oV;function O1(l,f){var m=Ye(l),S=!m&&Ia(l),A=!m&&!S&&Fo(l),N=!m&&!S&&!A&&Bs(l),M=m||S||A||N,F=M?yg(l.length,gF):[],W=F.length;for(var ae in l)(f||vt.call(l,ae))&&!(M&&(ae=="length"||A&&(ae=="offset"||ae=="parent")||N&&(ae=="buffer"||ae=="byteLength"||ae=="byteOffset")||qi(ae,W)))&&F.push(ae);return F}function P1(l){var f=l.length;return f?l[Dg(0,f-1)]:n}function aV(l,f){return Cf(rr(l),Oa(f,0,l.length))}function sV(l){return Cf(rr(l))}function _g(l,f,m){(m!==n&&!ai(l[f],m)||m===n&&!(f in l))&&Hi(l,f,m)}function Zl(l,f,m){var S=l[f];(!(vt.call(l,f)&&ai(S,m))||m===n&&!(f in l))&&Hi(l,f,m)}function uf(l,f){for(var m=l.length;m--;)if(ai(l[m][0],f))return m;return-1}function lV(l,f,m,S){return Do(l,function(A,N,M){f(S,A,m(A),M)}),S}function A1(l,f){return l&&wi(f,bn(f),l)}function uV(l,f){return l&&wi(f,or(f),l)}function Hi(l,f,m){f=="__proto__"&&nf?nf(l,f,{configurable:!0,enumerable:!0,value:m,writable:!0}):l[f]=m}function Og(l,f){for(var m=-1,S=f.length,A=X(S),N=l==null;++m<S;)A[m]=N?n:am(l,f[m]);return A}function Oa(l,f,m){return l===l&&(m!==n&&(l=l<=m?l:m),f!==n&&(l=l>=f?l:f)),l}function zr(l,f,m,S,A,N){var M,F=f&p,W=f&g,ae=f&h;if(m&&(M=A?m(l,S,A,N):m(l)),M!==n)return M;if(!zt(l))return l;var se=Ye(l);if(se){if(M=ZV(l),!F)return rr(l,M)}else{var ce=$n(l),ye=ce==$||ce==ie;if(Fo(l))return Q1(l,F);if(ce==fe||ce==Ce||ye&&!A){if(M=W||ye?{}:vC(l),!F)return W?VV(l,uV(M,l)):FV(l,A1(M,l))}else{if(!Rt[ce])return A?l:{};M=QV(l,ce,F)}}N||(N=new oi);var Ie=N.get(l);if(Ie)return Ie;N.set(l,M),GC(l)?l.forEach(function(He){M.add(zr(He,f,m,He,l,N))}):HC(l)&&l.forEach(function(He,it){M.set(it,zr(He,f,m,it,l,N))});var We=ae?W?Gg:Ug:W?or:bn,Je=se?n:We(l);return Fr(Je||l,function(He,it){Je&&(it=He,He=l[it]),Zl(M,it,zr(He,f,m,it,l,N))}),M}function cV(l){var f=bn(l);return function(m){return R1(m,l,f)}}function R1(l,f,m){var S=m.length;if(l==null)return!S;for(l=_t(l);S--;){var A=m[S],N=f[A],M=l[A];if(M===n&&!(A in l)||!N(M))return!1}return!0}function I1(l,f,m){if(typeof l!="function")throw new Vr(a);return iu(function(){l.apply(n,m)},f)}function Ql(l,f,m,S){var A=-1,N=Uc,M=!0,F=l.length,W=[],ae=f.length;if(!F)return W;m&&(f=Ft(f,br(m))),S?(N=dg,M=!1):f.length>=i&&(N=Ul,M=!1,f=new _a(f));e:for(;++A<F;){var se=l[A],ce=m==null?se:m(se);if(se=S||se!==0?se:0,M&&ce===ce){for(var ye=ae;ye--;)if(f[ye]===ce)continue e;W.push(se)}else N(f,ce,S)||W.push(se)}return W}var Do=rC(xi),T1=rC(Ag,!0);function fV(l,f){var m=!0;return Do(l,function(S,A,N){return m=!!f(S,A,N),m}),m}function cf(l,f,m){for(var S=-1,A=l.length;++S<A;){var N=l[S],M=f(N);if(M!=null&&(F===n?M===M&&!wr(M):m(M,F)))var F=M,W=N}return W}function dV(l,f,m,S){var A=l.length;for(m=Qe(m),m<0&&(m=-m>A?0:A+m),S=S===n||S>A?A:Qe(S),S<0&&(S+=A),S=m>S?0:KC(S);m<S;)l[m++]=f;return l}function k1(l,f){var m=[];return Do(l,function(S,A,N){f(S,A,N)&&m.push(S)}),m}function An(l,f,m,S,A){var N=-1,M=l.length;for(m||(m=eB),A||(A=[]);++N<M;){var F=l[N];f>0&&m(F)?f>1?An(F,f-1,m,S,A):ko(A,F):S||(A[A.length]=F)}return A}var Pg=iC(),N1=iC(!0);function xi(l,f){return l&&Pg(l,f,bn)}function Ag(l,f){return l&&N1(l,f,bn)}function ff(l,f){return To(f,function(m){return Ki(l[m])})}function Pa(l,f){f=Lo(f,l);for(var m=0,S=f.length;l!=null&&m<S;)l=l[Ci(f[m++])];return m&&m==S?l:n}function M1(l,f,m){var S=f(l);return Ye(l)?S:ko(S,m(l))}function Gn(l){return l==null?l===n?et:U:Sa&&Sa in _t(l)?KV(l):sB(l)}function Rg(l,f){return l>f}function pV(l,f){return l!=null&&vt.call(l,f)}function hV(l,f){return l!=null&&f in _t(l)}function gV(l,f,m){return l>=Ln(f,m)&&l<sn(f,m)}function Ig(l,f,m){for(var S=m?dg:Uc,A=l[0].length,N=l.length,M=N,F=X(N),W=1/0,ae=[];M--;){var se=l[M];M&&f&&(se=Ft(se,br(f))),W=Ln(se.length,W),F[M]=!m&&(f||A>=120&&se.length>=120)?new _a(M&&se):n}se=l[0];var ce=-1,ye=F[0];e:for(;++ce<A&&ae.length<W;){var Ie=se[ce],We=f?f(Ie):Ie;if(Ie=m||Ie!==0?Ie:0,!(ye?Ul(ye,We):S(ae,We,m))){for(M=N;--M;){var Je=F[M];if(!(Je?Ul(Je,We):S(l[M],We,m)))continue e}ye&&ye.push(We),ae.push(Ie)}}return ae}function mV(l,f,m,S){return xi(l,function(A,N,M){f(S,m(A),N,M)}),S}function Jl(l,f,m){f=Lo(f,l),l=wC(l,f);var S=l==null?l:l[Ci(Hr(f))];return S==null?n:yr(S,l,m)}function D1(l){return Ut(l)&&Gn(l)==Ce}function vV(l){return Ut(l)&&Gn(l)==Ct}function yV(l){return Ut(l)&&Gn(l)==Y}function eu(l,f,m,S,A){return l===f?!0:l==null||f==null||!Ut(l)&&!Ut(f)?l!==l&&f!==f:bV(l,f,m,S,eu,A)}function bV(l,f,m,S,A,N){var M=Ye(l),F=Ye(f),W=M?ze:$n(l),ae=F?ze:$n(f);W=W==Ce?fe:W,ae=ae==Ce?fe:ae;var se=W==fe,ce=ae==fe,ye=W==ae;if(ye&&Fo(l)){if(!Fo(f))return!1;M=!0,se=!1}if(ye&&!se)return N||(N=new oi),M||Bs(l)?hC(l,f,m,S,A,N):GV(l,f,W,m,S,A,N);if(!(m&y)){var Ie=se&&vt.call(l,"__wrapped__"),We=ce&&vt.call(f,"__wrapped__");if(Ie||We){var Je=Ie?l.value():l,He=We?f.value():f;return N||(N=new oi),A(Je,He,m,S,N)}}return ye?(N||(N=new oi),qV(l,f,m,S,A,N)):!1}function xV(l){return Ut(l)&&$n(l)==Z}function Tg(l,f,m,S){var A=m.length,N=A,M=!S;if(l==null)return!N;for(l=_t(l);A--;){var F=m[A];if(M&&F[2]?F[1]!==l[F[0]]:!(F[0]in l))return!1}for(;++A<N;){F=m[A];var W=F[0],ae=l[W],se=F[1];if(M&&F[2]){if(ae===n&&!(W in l))return!1}else{var ce=new oi;if(S)var ye=S(ae,se,W,l,f,ce);if(!(ye===n?eu(se,ae,y|b,S,ce):ye))return!1}}return!0}function j1(l){if(!zt(l)||nB(l))return!1;var f=Ki(l)?xF:ya;return f.test(Ra(l))}function wV(l){return Ut(l)&&Gn(l)==ve}function CV(l){return Ut(l)&&$n(l)==le}function SV(l){return Ut(l)&&Af(l.length)&&!!Nt[Gn(l)]}function L1(l){return typeof l=="function"?l:l==null?ar:typeof l=="object"?Ye(l)?V1(l[0],l[1]):F1(l):oS(l)}function kg(l){if(!ru(l))return OF(l);var f=[];for(var m in _t(l))vt.call(l,m)&&m!="constructor"&&f.push(m);return f}function EV(l){if(!zt(l))return aB(l);var f=ru(l),m=[];for(var S in l)S=="constructor"&&(f||!vt.call(l,S))||m.push(S);return m}function Ng(l,f){return l<f}function $1(l,f){var m=-1,S=ir(l)?X(l.length):[];return Do(l,function(A,N,M){S[++m]=f(A,N,M)}),S}function F1(l){var f=Kg(l);return f.length==1&&f[0][2]?bC(f[0][0],f[0][1]):function(m){return m===l||Tg(m,l,f)}}function V1(l,f){return Xg(l)&&yC(f)?bC(Ci(l),f):function(m){var S=am(m,l);return S===n&&S===f?sm(m,l):eu(f,S,y|b)}}function df(l,f,m,S,A){l!==f&&Pg(f,function(N,M){if(A||(A=new oi),zt(N))_V(l,f,M,m,df,S,A);else{var F=S?S(Qg(l,M),N,M+"",l,f,A):n;F===n&&(F=N),_g(l,M,F)}},or)}function _V(l,f,m,S,A,N,M){var F=Qg(l,m),W=Qg(f,m),ae=M.get(W);if(ae){_g(l,m,ae);return}var se=N?N(F,W,m+"",l,f,M):n,ce=se===n;if(ce){var ye=Ye(W),Ie=!ye&&Fo(W),We=!ye&&!Ie&&Bs(W);se=W,ye||Ie||We?Ye(F)?se=F:Kt(F)?se=rr(F):Ie?(ce=!1,se=Q1(W,!0)):We?(ce=!1,se=J1(W,!0)):se=[]:ou(W)||Ia(W)?(se=F,Ia(F)?se=YC(F):(!zt(F)||Ki(F))&&(se=vC(W))):ce=!1}ce&&(M.set(W,se),A(se,W,S,N,M),M.delete(W)),_g(l,m,se)}function B1(l,f){var m=l.length;if(m)return f+=f<0?m:0,qi(f,m)?l[f]:n}function z1(l,f,m){f.length?f=Ft(f,function(N){return Ye(N)?function(M){return Pa(M,N.length===1?N[0]:N)}:N}):f=[ar];var S=-1;f=Ft(f,br(Be()));var A=$1(l,function(N,M,F){var W=Ft(f,function(ae){return ae(N)});return{criteria:W,index:++S,value:N}});return Q$(A,function(N,M){return $V(N,M,m)})}function OV(l,f){return W1(l,f,function(m,S){return sm(l,S)})}function W1(l,f,m){for(var S=-1,A=f.length,N={};++S<A;){var M=f[S],F=Pa(l,M);m(F,M)&&tu(N,Lo(M,l),F)}return N}function PV(l){return function(f){return Pa(f,l)}}function Mg(l,f,m,S){var A=S?Z$:Is,N=-1,M=f.length,F=l;for(l===f&&(f=rr(f)),m&&(F=Ft(l,br(m)));++N<M;)for(var W=0,ae=f[N],se=m?m(ae):ae;(W=A(F,se,W,S))>-1;)F!==l&&tf.call(F,W,1),tf.call(l,W,1);return l}function H1(l,f){for(var m=l?f.length:0,S=m-1;m--;){var A=f[m];if(m==S||A!==N){var N=A;qi(A)?tf.call(l,A,1):$g(l,A)}}return l}function Dg(l,f){return l+of(E1()*(f-l+1))}function AV(l,f,m,S){for(var A=-1,N=sn(rf((f-l)/(m||1)),0),M=X(N);N--;)M[S?N:++A]=l,l+=m;return M}function jg(l,f){var m="";if(!l||f<1||f>Q)return m;do f%2&&(m+=l),f=of(f/2),f&&(l+=l);while(f);return m}function tt(l,f){return Jg(xC(l,f,ar),l+"")}function RV(l){return P1(zs(l))}function IV(l,f){var m=zs(l);return Cf(m,Oa(f,0,m.length))}function tu(l,f,m,S){if(!zt(l))return l;f=Lo(f,l);for(var A=-1,N=f.length,M=N-1,F=l;F!=null&&++A<N;){var W=Ci(f[A]),ae=m;if(W==="__proto__"||W==="constructor"||W==="prototype")return l;if(A!=M){var se=F[W];ae=S?S(se,W,F):n,ae===n&&(ae=zt(se)?se:qi(f[A+1])?[]:{})}Zl(F,W,ae),F=F[W]}return l}var U1=af?function(l,f){return af.set(l,f),l}:ar,TV=nf?function(l,f){return nf(l,"toString",{configurable:!0,enumerable:!1,value:um(f),writable:!0})}:ar;function kV(l){return Cf(zs(l))}function Wr(l,f,m){var S=-1,A=l.length;f<0&&(f=-f>A?0:A+f),m=m>A?A:m,m<0&&(m+=A),A=f>m?0:m-f>>>0,f>>>=0;for(var N=X(A);++S<A;)N[S]=l[S+f];return N}function NV(l,f){var m;return Do(l,function(S,A,N){return m=f(S,A,N),!m}),!!m}function pf(l,f,m){var S=0,A=l==null?S:l.length;if(typeof f=="number"&&f===f&&A<=$e){for(;S<A;){var N=S+A>>>1,M=l[N];M!==null&&!wr(M)&&(m?M<=f:M<f)?S=N+1:A=N}return A}return Lg(l,f,ar,m)}function Lg(l,f,m,S){var A=0,N=l==null?0:l.length;if(N===0)return 0;f=m(f);for(var M=f!==f,F=f===null,W=wr(f),ae=f===n;A<N;){var se=of((A+N)/2),ce=m(l[se]),ye=ce!==n,Ie=ce===null,We=ce===ce,Je=wr(ce);if(M)var He=S||We;else ae?He=We&&(S||ye):F?He=We&&ye&&(S||!Ie):W?He=We&&ye&&!Ie&&(S||!Je):Ie||Je?He=!1:He=S?ce<=f:ce<f;He?A=se+1:N=se}return Ln(N,Se)}function G1(l,f){for(var m=-1,S=l.length,A=0,N=[];++m<S;){var M=l[m],F=f?f(M):M;if(!m||!ai(F,W)){var W=F;N[A++]=M===0?0:M}}return N}function q1(l){return typeof l=="number"?l:wr(l)?K:+l}function xr(l){if(typeof l=="string")return l;if(Ye(l))return Ft(l,xr)+"";if(wr(l))return _1?_1.call(l):"";var f=l+"";return f=="0"&&1/l==-ee?"-0":f}function jo(l,f,m){var S=-1,A=Uc,N=l.length,M=!0,F=[],W=F;if(m)M=!1,A=dg;else if(N>=i){var ae=f?null:HV(l);if(ae)return qc(ae);M=!1,A=Ul,W=new _a}else W=f?[]:F;e:for(;++S<N;){var se=l[S],ce=f?f(se):se;if(se=m||se!==0?se:0,M&&ce===ce){for(var ye=W.length;ye--;)if(W[ye]===ce)continue e;f&&W.push(ce),F.push(se)}else A(W,ce,m)||(W!==F&&W.push(ce),F.push(se))}return F}function $g(l,f){f=Lo(f,l);var m=-1,S=f.length;if(!S)return!0;for(var A=l==null||typeof l!="object"&&typeof l!="function";++m<S;){var N=f[m];if(typeof N=="string"){if(N==="__proto__"&&!vt.call(l,"__proto__"))return!1;if(N==="constructor"&&m+1<S&&typeof f[m+1]=="string"&&f[m+1]==="prototype"){if(A&&m===0)continue;return!1}}}var M=wC(l,f);return M==null||delete M[Ci(Hr(f))]}function K1(l,f,m,S){return tu(l,f,m(Pa(l,f)),S)}function hf(l,f,m,S){for(var A=l.length,N=S?A:-1;(S?N--:++N<A)&&f(l[N],N,l););return m?Wr(l,S?0:N,S?N+1:A):Wr(l,S?N+1:0,S?A:N)}function Y1(l,f){var m=l;return m instanceof at&&(m=m.value()),pg(f,function(S,A){return A.func.apply(A.thisArg,ko([S],A.args))},m)}function Fg(l,f,m){var S=l.length;if(S<2)return S?jo(l[0]):[];for(var A=-1,N=X(S);++A<S;)for(var M=l[A],F=-1;++F<S;)F!=A&&(N[A]=Ql(N[A]||M,l[F],f,m));return jo(An(N,1),f,m)}function X1(l,f,m){for(var S=-1,A=l.length,N=f.length,M={};++S<A;){var F=S<N?f[S]:n;m(M,l[S],F)}return M}function Vg(l){return Kt(l)?l:[]}function Bg(l){return typeof l=="function"?l:ar}function Lo(l,f){return Ye(l)?l:Xg(l,f)?[l]:_C(yt(l))}var MV=tt;function $o(l,f,m){var S=l.length;return m=m===n?S:m,!f&&m>=S?l:Wr(l,f,m)}var Z1=wF||function(l){return Pn.clearTimeout(l)};function Q1(l,f){if(f)return l.slice();var m=l.length,S=b1?b1(m):new l.constructor(m);return l.copy(S),S}function zg(l){var f=new l.constructor(l.byteLength);return new Jc(f).set(new Jc(l)),f}function DV(l,f){var m=f?zg(l.buffer):l.buffer;return new l.constructor(m,l.byteOffset,l.byteLength)}function jV(l){var f=new l.constructor(l.source,Nc.exec(l));return f.lastIndex=l.lastIndex,f}function LV(l){return Xl?_t(Xl.call(l)):{}}function J1(l,f){var m=f?zg(l.buffer):l.buffer;return new l.constructor(m,l.byteOffset,l.length)}function eC(l,f){if(l!==f){var m=l!==n,S=l===null,A=l===l,N=wr(l),M=f!==n,F=f===null,W=f===f,ae=wr(f);if(!F&&!ae&&!N&&l>f||N&&M&&W&&!F&&!ae||S&&M&&W||!m&&W||!A)return 1;if(!S&&!N&&!ae&&l<f||ae&&m&&A&&!S&&!N||F&&m&&A||!M&&A||!W)return-1}return 0}function $V(l,f,m){for(var S=-1,A=l.criteria,N=f.criteria,M=A.length,F=m.length;++S<M;){var W=eC(A[S],N[S]);if(W){if(S>=F)return W;var ae=m[S];return W*(ae=="desc"?-1:1)}}return l.index-f.index}function tC(l,f,m,S){for(var A=-1,N=l.length,M=m.length,F=-1,W=f.length,ae=sn(N-M,0),se=X(W+ae),ce=!S;++F<W;)se[F]=f[F];for(;++A<M;)(ce||A<N)&&(se[m[A]]=l[A]);for(;ae--;)se[F++]=l[A++];return se}function nC(l,f,m,S){for(var A=-1,N=l.length,M=-1,F=m.length,W=-1,ae=f.length,se=sn(N-F,0),ce=X(se+ae),ye=!S;++A<se;)ce[A]=l[A];for(var Ie=A;++W<ae;)ce[Ie+W]=f[W];for(;++M<F;)(ye||A<N)&&(ce[Ie+m[M]]=l[A++]);return ce}function rr(l,f){var m=-1,S=l.length;for(f||(f=X(S));++m<S;)f[m]=l[m];return f}function wi(l,f,m,S){var A=!m;m||(m={});for(var N=-1,M=f.length;++N<M;){var F=f[N],W=S?S(m[F],l[F],F,m,l):n;W===n&&(W=l[F]),A?Hi(m,F,W):Zl(m,F,W)}return m}function FV(l,f){return wi(l,Yg(l),f)}function VV(l,f){return wi(l,gC(l),f)}function gf(l,f){return function(m,S){var A=Ye(m)?U$:lV,N=f?f():{};return A(m,l,Be(S,2),N)}}function $s(l){return tt(function(f,m){var S=-1,A=m.length,N=A>1?m[A-1]:n,M=A>2?m[2]:n;for(N=l.length>3&&typeof N=="function"?(A--,N):n,M&&qn(m[0],m[1],M)&&(N=A<3?n:N,A=1),f=_t(f);++S<A;){var F=m[S];F&&l(f,F,S,N)}return f})}function rC(l,f){return function(m,S){if(m==null)return m;if(!ir(m))return l(m,S);for(var A=m.length,N=f?A:-1,M=_t(m);(f?N--:++N<A)&&S(M[N],N,M)!==!1;);return m}}function iC(l){return function(f,m,S){for(var A=-1,N=_t(f),M=S(f),F=M.length;F--;){var W=M[l?F:++A];if(m(N[W],W,N)===!1)break}return f}}function BV(l,f,m){var S=f&v,A=nu(l);function N(){var M=this&&this!==Pn&&this instanceof N?A:l;return M.apply(S?m:this,arguments)}return N}function oC(l){return function(f){f=yt(f);var m=Ts(f)?ii(f):n,S=m?m[0]:f.charAt(0),A=m?$o(m,1).join(""):f.slice(1);return S[l]()+A}}function Fs(l){return function(f){return pg(rS(nS(f).replace(lg,"")),l,"")}}function nu(l){return function(){var f=arguments;switch(f.length){case 0:return new l;case 1:return new l(f[0]);case 2:return new l(f[0],f[1]);case 3:return new l(f[0],f[1],f[2]);case 4:return new l(f[0],f[1],f[2],f[3]);case 5:return new l(f[0],f[1],f[2],f[3],f[4]);case 6:return new l(f[0],f[1],f[2],f[3],f[4],f[5]);case 7:return new l(f[0],f[1],f[2],f[3],f[4],f[5],f[6])}var m=Ls(l.prototype),S=l.apply(m,f);return zt(S)?S:m}}function zV(l,f,m){var S=nu(l);function A(){for(var N=arguments.length,M=X(N),F=N,W=Vs(A);F--;)M[F]=arguments[F];var ae=N<3&&M[0]!==W&&M[N-1]!==W?[]:No(M,W);if(N-=ae.length,N<m)return cC(l,f,mf,A.placeholder,n,M,ae,n,n,m-N);var se=this&&this!==Pn&&this instanceof A?S:l;return yr(se,this,M)}return A}function aC(l){return function(f,m,S){var A=_t(f);if(!ir(f)){var N=Be(m,3);f=bn(f),m=function(F){return N(A[F],F,A)}}var M=l(f,m,S);return M>-1?A[N?f[M]:M]:n}}function sC(l){return Gi(function(f){var m=f.length,S=m,A=Br.prototype.thru;for(l&&f.reverse();S--;){var N=f[S];if(typeof N!="function")throw new Vr(a);if(A&&!M&&xf(N)=="wrapper")var M=new Br([],!0)}for(S=M?S:m;++S<m;){N=f[S];var F=xf(N),W=F=="wrapper"?qg(N):n;W&&Zg(W[0])&&W[1]==(I|E|P|k)&&!W[4].length&&W[9]==1?M=M[xf(W[0])].apply(M,W[3]):M=N.length==1&&Zg(N)?M[F]():M.thru(N)}return function(){var ae=arguments,se=ae[0];if(M&&ae.length==1&&Ye(se))return M.plant(se).value();for(var ce=0,ye=m?f[ce].apply(this,ae):se;++ce<m;)ye=f[ce].call(this,ye);return ye}})}function mf(l,f,m,S,A,N,M,F,W,ae){var se=f&I,ce=f&v,ye=f&w,Ie=f&(E|_),We=f&B,Je=ye?n:nu(l);function He(){for(var it=arguments.length,st=X(it),Cr=it;Cr--;)st[Cr]=arguments[Cr];if(Ie)var Kn=Vs(He),Sr=eF(st,Kn);if(S&&(st=tC(st,S,A,Ie)),N&&(st=nC(st,N,M,Ie)),it-=Sr,Ie&&it<ae){var Yt=No(st,Kn);return cC(l,f,mf,He.placeholder,m,st,Yt,F,W,ae-it)}var si=ce?m:this,Xi=ye?si[l]:l;return it=st.length,F?st=lB(st,F):We&&it>1&&st.reverse(),se&&W<it&&(st.length=W),this&&this!==Pn&&this instanceof He&&(Xi=Je||nu(Xi)),Xi.apply(si,st)}return He}function lC(l,f){return function(m,S){return mV(m,l,f(S),{})}}function vf(l,f){return function(m,S){var A;if(m===n&&S===n)return f;if(m!==n&&(A=m),S!==n){if(A===n)return S;typeof m=="string"||typeof S=="string"?(m=xr(m),S=xr(S)):(m=q1(m),S=q1(S)),A=l(m,S)}return A}}function Wg(l){return Gi(function(f){return f=Ft(f,br(Be())),tt(function(m){var S=this;return l(f,function(A){return yr(A,S,m)})})})}function yf(l,f){f=f===n?" ":xr(f);var m=f.length;if(m<2)return m?jg(f,l):f;var S=jg(f,rf(l/ks(f)));return Ts(f)?$o(ii(S),0,l).join(""):S.slice(0,l)}function WV(l,f,m,S){var A=f&v,N=nu(l);function M(){for(var F=-1,W=arguments.length,ae=-1,se=S.length,ce=X(se+W),ye=this&&this!==Pn&&this instanceof M?N:l;++ae<se;)ce[ae]=S[ae];for(;W--;)ce[ae++]=arguments[++F];return yr(ye,A?m:this,ce)}return M}function uC(l){return function(f,m,S){return S&&typeof S!="number"&&qn(f,m,S)&&(m=S=n),f=Yi(f),m===n?(m=f,f=0):m=Yi(m),S=S===n?f<m?1:-1:Yi(S),AV(f,m,S,l)}}function bf(l){return function(f,m){return typeof f=="string"&&typeof m=="string"||(f=Ur(f),m=Ur(m)),l(f,m)}}function cC(l,f,m,S,A,N,M,F,W,ae){var se=f&E,ce=se?M:n,ye=se?n:M,Ie=se?N:n,We=se?n:N;f|=se?P:R,f&=~(se?R:P),f&C||(f&=-4);var Je=[l,f,A,Ie,ce,We,ye,F,W,ae],He=m.apply(n,Je);return Zg(l)&&CC(He,Je),He.placeholder=S,SC(He,l,f)}function Hg(l){var f=an[l];return function(m,S){if(m=Ur(m),S=S==null?0:Ln(Qe(S),292),S&&S1(m)){var A=(yt(m)+"e").split("e"),N=f(A[0]+"e"+(+A[1]+S));return A=(yt(N)+"e").split("e"),+(A[0]+"e"+(+A[1]-S))}return f(m)}}var HV=Ds&&1/qc(new Ds([,-0]))[1]==ee?function(l){return new Ds(l)}:dm;function fC(l){return function(f){var m=$n(f);return m==Z?xg(f):m==le?sF(f):J$(f,l(f))}}function Ui(l,f,m,S,A,N,M,F){var W=f&w;if(!W&&typeof l!="function")throw new Vr(a);var ae=S?S.length:0;if(ae||(f&=-97,S=A=n),M=M===n?M:sn(Qe(M),0),F=F===n?F:Qe(F),ae-=A?A.length:0,f&R){var se=S,ce=A;S=A=n}var ye=W?n:qg(l),Ie=[l,f,m,S,A,se,ce,N,M,F];if(ye&&oB(Ie,ye),l=Ie[0],f=Ie[1],m=Ie[2],S=Ie[3],A=Ie[4],F=Ie[9]=Ie[9]===n?W?0:l.length:sn(Ie[9]-ae,0),!F&&f&(E|_)&&(f&=-25),!f||f==v)var We=BV(l,f,m);else f==E||f==_?We=zV(l,f,F):(f==P||f==(v|P))&&!A.length?We=WV(l,f,m,S):We=mf.apply(n,Ie);var Je=ye?U1:CC;return SC(Je(We,Ie),l,f)}function dC(l,f,m,S){return l===n||ai(l,Ms[m])&&!vt.call(S,m)?f:l}function pC(l,f,m,S,A,N){return zt(l)&&zt(f)&&(N.set(f,l),df(l,f,n,pC,N),N.delete(f)),l}function UV(l){return ou(l)?n:l}function hC(l,f,m,S,A,N){var M=m&y,F=l.length,W=f.length;if(F!=W&&!(M&&W>F))return!1;var ae=N.get(l),se=N.get(f);if(ae&&se)return ae==f&&se==l;var ce=-1,ye=!0,Ie=m&b?new _a:n;for(N.set(l,f),N.set(f,l);++ce<F;){var We=l[ce],Je=f[ce];if(S)var He=M?S(Je,We,ce,f,l,N):S(We,Je,ce,l,f,N);if(He!==n){if(He)continue;ye=!1;break}if(Ie){if(!hg(f,function(it,st){if(!Ul(Ie,st)&&(We===it||A(We,it,m,S,N)))return Ie.push(st)})){ye=!1;break}}else if(!(We===Je||A(We,Je,m,S,N))){ye=!1;break}}return N.delete(l),N.delete(f),ye}function GV(l,f,m,S,A,N,M){switch(m){case ot:if(l.byteLength!=f.byteLength||l.byteOffset!=f.byteOffset)return!1;l=l.buffer,f=f.buffer;case Ct:return!(l.byteLength!=f.byteLength||!N(new Jc(l),new Jc(f)));case Fe:case Y:case Re:return ai(+l,+f);case ne:return l.name==f.name&&l.message==f.message;case ve:case be:return l==f+"";case Z:var F=xg;case le:var W=S&y;if(F||(F=qc),l.size!=f.size&&!W)return!1;var ae=M.get(l);if(ae)return ae==f;S|=b,M.set(l,f);var se=hC(F(l),F(f),S,A,N,M);return M.delete(l),se;case ke:if(Xl)return Xl.call(l)==Xl.call(f)}return!1}function qV(l,f,m,S,A,N){var M=m&y,F=Ug(l),W=F.length,ae=Ug(f),se=ae.length;if(W!=se&&!M)return!1;for(var ce=W;ce--;){var ye=F[ce];if(!(M?ye in f:vt.call(f,ye)))return!1}var Ie=N.get(l),We=N.get(f);if(Ie&&We)return Ie==f&&We==l;var Je=!0;N.set(l,f),N.set(f,l);for(var He=M;++ce<W;){ye=F[ce];var it=l[ye],st=f[ye];if(S)var Cr=M?S(st,it,ye,f,l,N):S(it,st,ye,l,f,N);if(!(Cr===n?it===st||A(it,st,m,S,N):Cr)){Je=!1;break}He||(He=ye=="constructor")}if(Je&&!He){var Kn=l.constructor,Sr=f.constructor;Kn!=Sr&&"constructor"in l&&"constructor"in f&&!(typeof Kn=="function"&&Kn instanceof Kn&&typeof Sr=="function"&&Sr instanceof Sr)&&(Je=!1)}return N.delete(l),N.delete(f),Je}function Gi(l){return Jg(xC(l,n,RC),l+"")}function Ug(l){return M1(l,bn,Yg)}function Gg(l){return M1(l,or,gC)}var qg=af?function(l){return af.get(l)}:dm;function xf(l){for(var f=l.name+"",m=js[f],S=vt.call(js,f)?m.length:0;S--;){var A=m[S],N=A.func;if(N==null||N==l)return A.name}return f}function Vs(l){var f=vt.call(T,"placeholder")?T:l;return f.placeholder}function Be(){var l=T.iteratee||cm;return l=l===cm?L1:l,arguments.length?l(arguments[0],arguments[1]):l}function wf(l,f){var m=l.__data__;return tB(f)?m[typeof f=="string"?"string":"hash"]:m.map}function Kg(l){for(var f=bn(l),m=f.length;m--;){var S=f[m],A=l[S];f[m]=[S,A,yC(A)]}return f}function Aa(l,f){var m=iF(l,f);return j1(m)?m:n}function KV(l){var f=vt.call(l,Sa),m=l[Sa];try{l[Sa]=n;var S=!0}catch{}var A=Zc.call(l);return S&&(f?l[Sa]=m:delete l[Sa]),A}var Yg=Cg?function(l){return l==null?[]:(l=_t(l),To(Cg(l),function(f){return w1.call(l,f)}))}:pm,gC=Cg?function(l){for(var f=[];l;)ko(f,Yg(l)),l=ef(l);return f}:pm,$n=Gn;(Sg&&$n(new Sg(new ArrayBuffer(1)))!=ot||ql&&$n(new ql)!=Z||Eg&&$n(Eg.resolve())!=me||Ds&&$n(new Ds)!=le||Kl&&$n(new Kl)!=Tt)&&($n=function(l){var f=Gn(l),m=f==fe?l.constructor:n,S=m?Ra(m):"";if(S)switch(S){case IF:return ot;case TF:return Z;case kF:return me;case NF:return le;case MF:return Tt}return f});function YV(l,f,m){for(var S=-1,A=m.length;++S<A;){var N=m[S],M=N.size;switch(N.type){case"drop":l+=M;break;case"dropRight":f-=M;break;case"take":f=Ln(f,l+M);break;case"takeRight":l=sn(l,f-M);break}}return{start:l,end:f}}function XV(l){var f=l.match(rt);return f?f[1].split(vi):[]}function mC(l,f,m){f=Lo(f,l);for(var S=-1,A=f.length,N=!1;++S<A;){var M=Ci(f[S]);if(!(N=l!=null&&m(l,M)))break;l=l[M]}return N||++S!=A?N:(A=l==null?0:l.length,!!A&&Af(A)&&qi(M,A)&&(Ye(l)||Ia(l)))}function ZV(l){var f=l.length,m=new l.constructor(f);return f&&typeof l[0]=="string"&&vt.call(l,"index")&&(m.index=l.index,m.input=l.input),m}function vC(l){return typeof l.constructor=="function"&&!ru(l)?Ls(ef(l)):{}}function QV(l,f,m){var S=l.constructor;switch(f){case Ct:return zg(l);case Fe:case Y:return new S(+l);case ot:return DV(l,m);case kt:case mn:case on:case _n:case Qt:case vn:case hr:case Hn:case pt:return J1(l,m);case Z:return new S;case Re:case be:return new S(l);case ve:return jV(l);case le:return new S;case ke:return LV(l)}}function JV(l,f){var m=f.length;if(!m)return l;var S=m-1;return f[S]=(m>1?"& ":"")+f[S],f=f.join(m>2?", ":" "),l.replace(Un,`{
169
+ /* [wrapped with `+f+`] */
170
+ `)}function eB(l){return Ye(l)||Ia(l)||!!(C1&&l&&l[C1])}function qi(l,f){var m=typeof l;return f=f??Q,!!f&&(m=="number"||m!="symbol"&&mr.test(l))&&l>-1&&l%1==0&&l<f}function qn(l,f,m){if(!zt(m))return!1;var S=typeof f;return(S=="number"?ir(m)&&qi(f,m.length):S=="string"&&f in m)?ai(m[f],l):!1}function Xg(l,f){if(Ye(l))return!1;var m=typeof l;return m=="number"||m=="symbol"||m=="boolean"||l==null||wr(l)?!0:va.test(l)||!yn.test(l)||f!=null&&l in _t(f)}function tB(l){var f=typeof l;return f=="string"||f=="number"||f=="symbol"||f=="boolean"?l!=="__proto__":l===null}function Zg(l){var f=xf(l),m=T[f];if(typeof m!="function"||!(f in at.prototype))return!1;if(l===m)return!0;var S=qg(m);return!!S&&l===S[0]}function nB(l){return!!y1&&y1 in l}var rB=Yc?Ki:hm;function ru(l){var f=l&&l.constructor,m=typeof f=="function"&&f.prototype||Ms;return l===m}function yC(l){return l===l&&!zt(l)}function bC(l,f){return function(m){return m==null?!1:m[l]===f&&(f!==n||l in _t(m))}}function iB(l){var f=Of(l,function(S){return m.size===c&&m.clear(),S}),m=f.cache;return f}function oB(l,f){var m=l[1],S=f[1],A=m|S,N=A<(v|w|I),M=S==I&&m==E||S==I&&m==k&&l[7].length<=f[8]||S==(I|k)&&f[7].length<=f[8]&&m==E;if(!(N||M))return l;S&v&&(l[2]=f[2],A|=m&v?0:C);var F=f[3];if(F){var W=l[3];l[3]=W?tC(W,F,f[4]):F,l[4]=W?No(l[3],d):f[4]}return F=f[5],F&&(W=l[5],l[5]=W?nC(W,F,f[6]):F,l[6]=W?No(l[5],d):f[6]),F=f[7],F&&(l[7]=F),S&I&&(l[8]=l[8]==null?f[8]:Ln(l[8],f[8])),l[9]==null&&(l[9]=f[9]),l[0]=f[0],l[1]=A,l}function aB(l){var f=[];if(l!=null)for(var m in _t(l))f.push(m);return f}function sB(l){return Zc.call(l)}function xC(l,f,m){return f=sn(f===n?l.length-1:f,0),function(){for(var S=arguments,A=-1,N=sn(S.length-f,0),M=X(N);++A<N;)M[A]=S[f+A];A=-1;for(var F=X(f+1);++A<f;)F[A]=S[A];return F[f]=m(M),yr(l,this,F)}}function wC(l,f){return f.length<2?l:Pa(l,Wr(f,0,-1))}function lB(l,f){for(var m=l.length,S=Ln(f.length,m),A=rr(l);S--;){var N=f[S];l[S]=qi(N,m)?A[N]:n}return l}function Qg(l,f){if(!(f==="constructor"&&typeof l[f]=="function")&&f!="__proto__")return l[f]}var CC=EC(U1),iu=SF||function(l,f){return Pn.setTimeout(l,f)},Jg=EC(TV);function SC(l,f,m){var S=f+"";return Jg(l,JV(S,uB(XV(S),m)))}function EC(l){var f=0,m=0;return function(){var S=PF(),A=H-(S-m);if(m=S,A>0){if(++f>=D)return arguments[0]}else f=0;return l.apply(n,arguments)}}function Cf(l,f){var m=-1,S=l.length,A=S-1;for(f=f===n?S:f;++m<f;){var N=Dg(m,A),M=l[N];l[N]=l[m],l[m]=M}return l.length=f,l}var _C=iB(function(l){var f=[];return l.charCodeAt(0)===46&&f.push(""),l.replace(Ao,function(m,S,A,N){f.push(A?N.replace(Ll,"$1"):S||m)}),f});function Ci(l){if(typeof l=="string"||wr(l))return l;var f=l+"";return f=="0"&&1/l==-ee?"-0":f}function Ra(l){if(l!=null){try{return Xc.call(l)}catch{}try{return l+""}catch{}}return""}function uB(l,f){return Fr(we,function(m){var S="_."+m[0];f&m[1]&&!Uc(l,S)&&l.push(S)}),l.sort()}function OC(l){if(l instanceof at)return l.clone();var f=new Br(l.__wrapped__,l.__chain__);return f.__actions__=rr(l.__actions__),f.__index__=l.__index__,f.__values__=l.__values__,f}function cB(l,f,m){(m?qn(l,f,m):f===n)?f=1:f=sn(Qe(f),0);var S=l==null?0:l.length;if(!S||f<1)return[];for(var A=0,N=0,M=X(rf(S/f));A<S;)M[N++]=Wr(l,A,A+=f);return M}function fB(l){for(var f=-1,m=l==null?0:l.length,S=0,A=[];++f<m;){var N=l[f];N&&(A[S++]=N)}return A}function dB(){var l=arguments.length;if(!l)return[];for(var f=X(l-1),m=arguments[0],S=l;S--;)f[S-1]=arguments[S];return ko(Ye(m)?rr(m):[m],An(f,1))}var pB=tt(function(l,f){return Kt(l)?Ql(l,An(f,1,Kt,!0)):[]}),hB=tt(function(l,f){var m=Hr(f);return Kt(m)&&(m=n),Kt(l)?Ql(l,An(f,1,Kt,!0),Be(m,2)):[]}),gB=tt(function(l,f){var m=Hr(f);return Kt(m)&&(m=n),Kt(l)?Ql(l,An(f,1,Kt,!0),n,m):[]});function mB(l,f,m){var S=l==null?0:l.length;return S?(f=m||f===n?1:Qe(f),Wr(l,f<0?0:f,S)):[]}function vB(l,f,m){var S=l==null?0:l.length;return S?(f=m||f===n?1:Qe(f),f=S-f,Wr(l,0,f<0?0:f)):[]}function yB(l,f){return l&&l.length?hf(l,Be(f,3),!0,!0):[]}function bB(l,f){return l&&l.length?hf(l,Be(f,3),!0):[]}function xB(l,f,m,S){var A=l==null?0:l.length;return A?(m&&typeof m!="number"&&qn(l,f,m)&&(m=0,S=A),dV(l,f,m,S)):[]}function PC(l,f,m){var S=l==null?0:l.length;if(!S)return-1;var A=m==null?0:Qe(m);return A<0&&(A=sn(S+A,0)),Gc(l,Be(f,3),A)}function AC(l,f,m){var S=l==null?0:l.length;if(!S)return-1;var A=S-1;return m!==n&&(A=Qe(m),A=m<0?sn(S+A,0):Ln(A,S-1)),Gc(l,Be(f,3),A,!0)}function RC(l){var f=l==null?0:l.length;return f?An(l,1):[]}function wB(l){var f=l==null?0:l.length;return f?An(l,ee):[]}function CB(l,f){var m=l==null?0:l.length;return m?(f=f===n?1:Qe(f),An(l,f)):[]}function SB(l){for(var f=-1,m=l==null?0:l.length,S={};++f<m;){var A=l[f];S[A[0]]=A[1]}return S}function IC(l){return l&&l.length?l[0]:n}function EB(l,f,m){var S=l==null?0:l.length;if(!S)return-1;var A=m==null?0:Qe(m);return A<0&&(A=sn(S+A,0)),Is(l,f,A)}function _B(l){var f=l==null?0:l.length;return f?Wr(l,0,-1):[]}var OB=tt(function(l){var f=Ft(l,Vg);return f.length&&f[0]===l[0]?Ig(f):[]}),PB=tt(function(l){var f=Hr(l),m=Ft(l,Vg);return f===Hr(m)?f=n:m.pop(),m.length&&m[0]===l[0]?Ig(m,Be(f,2)):[]}),AB=tt(function(l){var f=Hr(l),m=Ft(l,Vg);return f=typeof f=="function"?f:n,f&&m.pop(),m.length&&m[0]===l[0]?Ig(m,n,f):[]});function RB(l,f){return l==null?"":_F.call(l,f)}function Hr(l){var f=l==null?0:l.length;return f?l[f-1]:n}function IB(l,f,m){var S=l==null?0:l.length;if(!S)return-1;var A=S;return m!==n&&(A=Qe(m),A=A<0?sn(S+A,0):Ln(A,S-1)),f===f?uF(l,f,A):Gc(l,c1,A,!0)}function TB(l,f){return l&&l.length?B1(l,Qe(f)):n}var kB=tt(TC);function TC(l,f){return l&&l.length&&f&&f.length?Mg(l,f):l}function NB(l,f,m){return l&&l.length&&f&&f.length?Mg(l,f,Be(m,2)):l}function MB(l,f,m){return l&&l.length&&f&&f.length?Mg(l,f,n,m):l}var DB=Gi(function(l,f){var m=l==null?0:l.length,S=Og(l,f);return H1(l,Ft(f,function(A){return qi(A,m)?+A:A}).sort(eC)),S});function jB(l,f){var m=[];if(!(l&&l.length))return m;var S=-1,A=[],N=l.length;for(f=Be(f,3);++S<N;){var M=l[S];f(M,S,l)&&(m.push(M),A.push(S))}return H1(l,A),m}function em(l){return l==null?l:RF.call(l)}function LB(l,f,m){var S=l==null?0:l.length;return S?(m&&typeof m!="number"&&qn(l,f,m)?(f=0,m=S):(f=f==null?0:Qe(f),m=m===n?S:Qe(m)),Wr(l,f,m)):[]}function $B(l,f){return pf(l,f)}function FB(l,f,m){return Lg(l,f,Be(m,2))}function VB(l,f){var m=l==null?0:l.length;if(m){var S=pf(l,f);if(S<m&&ai(l[S],f))return S}return-1}function BB(l,f){return pf(l,f,!0)}function zB(l,f,m){return Lg(l,f,Be(m,2),!0)}function WB(l,f){var m=l==null?0:l.length;if(m){var S=pf(l,f,!0)-1;if(ai(l[S],f))return S}return-1}function HB(l){return l&&l.length?G1(l):[]}function UB(l,f){return l&&l.length?G1(l,Be(f,2)):[]}function GB(l){var f=l==null?0:l.length;return f?Wr(l,1,f):[]}function qB(l,f,m){return l&&l.length?(f=m||f===n?1:Qe(f),Wr(l,0,f<0?0:f)):[]}function KB(l,f,m){var S=l==null?0:l.length;return S?(f=m||f===n?1:Qe(f),f=S-f,Wr(l,f<0?0:f,S)):[]}function YB(l,f){return l&&l.length?hf(l,Be(f,3),!1,!0):[]}function XB(l,f){return l&&l.length?hf(l,Be(f,3)):[]}var ZB=tt(function(l){return jo(An(l,1,Kt,!0))}),QB=tt(function(l){var f=Hr(l);return Kt(f)&&(f=n),jo(An(l,1,Kt,!0),Be(f,2))}),JB=tt(function(l){var f=Hr(l);return f=typeof f=="function"?f:n,jo(An(l,1,Kt,!0),n,f)});function ez(l){return l&&l.length?jo(l):[]}function tz(l,f){return l&&l.length?jo(l,Be(f,2)):[]}function nz(l,f){return f=typeof f=="function"?f:n,l&&l.length?jo(l,n,f):[]}function tm(l){if(!(l&&l.length))return[];var f=0;return l=To(l,function(m){if(Kt(m))return f=sn(m.length,f),!0}),yg(f,function(m){return Ft(l,gg(m))})}function kC(l,f){if(!(l&&l.length))return[];var m=tm(l);return f==null?m:Ft(m,function(S){return yr(f,n,S)})}var rz=tt(function(l,f){return Kt(l)?Ql(l,f):[]}),iz=tt(function(l){return Fg(To(l,Kt))}),oz=tt(function(l){var f=Hr(l);return Kt(f)&&(f=n),Fg(To(l,Kt),Be(f,2))}),az=tt(function(l){var f=Hr(l);return f=typeof f=="function"?f:n,Fg(To(l,Kt),n,f)}),sz=tt(tm);function lz(l,f){return X1(l||[],f||[],Zl)}function uz(l,f){return X1(l||[],f||[],tu)}var cz=tt(function(l){var f=l.length,m=f>1?l[f-1]:n;return m=typeof m=="function"?(l.pop(),m):n,kC(l,m)});function NC(l){var f=T(l);return f.__chain__=!0,f}function fz(l,f){return f(l),l}function Sf(l,f){return f(l)}var dz=Gi(function(l){var f=l.length,m=f?l[0]:0,S=this.__wrapped__,A=function(N){return Og(N,l)};return f>1||this.__actions__.length||!(S instanceof at)||!qi(m)?this.thru(A):(S=S.slice(m,+m+(f?1:0)),S.__actions__.push({func:Sf,args:[A],thisArg:n}),new Br(S,this.__chain__).thru(function(N){return f&&!N.length&&N.push(n),N}))});function pz(){return NC(this)}function hz(){return new Br(this.value(),this.__chain__)}function gz(){this.__values__===n&&(this.__values__=qC(this.value()));var l=this.__index__>=this.__values__.length,f=l?n:this.__values__[this.__index__++];return{done:l,value:f}}function mz(){return this}function vz(l){for(var f,m=this;m instanceof lf;){var S=OC(m);S.__index__=0,S.__values__=n,f?A.__wrapped__=S:f=S;var A=S;m=m.__wrapped__}return A.__wrapped__=l,f}function yz(){var l=this.__wrapped__;if(l instanceof at){var f=l;return this.__actions__.length&&(f=new at(this)),f=f.reverse(),f.__actions__.push({func:Sf,args:[em],thisArg:n}),new Br(f,this.__chain__)}return this.thru(em)}function bz(){return Y1(this.__wrapped__,this.__actions__)}var xz=gf(function(l,f,m){vt.call(l,m)?++l[m]:Hi(l,m,1)});function wz(l,f,m){var S=Ye(l)?l1:fV;return m&&qn(l,f,m)&&(f=n),S(l,Be(f,3))}function Cz(l,f){var m=Ye(l)?To:k1;return m(l,Be(f,3))}var Sz=aC(PC),Ez=aC(AC);function _z(l,f){return An(Ef(l,f),1)}function Oz(l,f){return An(Ef(l,f),ee)}function Pz(l,f,m){return m=m===n?1:Qe(m),An(Ef(l,f),m)}function MC(l,f){var m=Ye(l)?Fr:Do;return m(l,Be(f,3))}function DC(l,f){var m=Ye(l)?G$:T1;return m(l,Be(f,3))}var Az=gf(function(l,f,m){vt.call(l,m)?l[m].push(f):Hi(l,m,[f])});function Rz(l,f,m,S){l=ir(l)?l:zs(l),m=m&&!S?Qe(m):0;var A=l.length;return m<0&&(m=sn(A+m,0)),Rf(l)?m<=A&&l.indexOf(f,m)>-1:!!A&&Is(l,f,m)>-1}var Iz=tt(function(l,f,m){var S=-1,A=typeof f=="function",N=ir(l)?X(l.length):[];return Do(l,function(M){N[++S]=A?yr(f,M,m):Jl(M,f,m)}),N}),Tz=gf(function(l,f,m){Hi(l,m,f)});function Ef(l,f){var m=Ye(l)?Ft:$1;return m(l,Be(f,3))}function kz(l,f,m,S){return l==null?[]:(Ye(f)||(f=f==null?[]:[f]),m=S?n:m,Ye(m)||(m=m==null?[]:[m]),z1(l,f,m))}var Nz=gf(function(l,f,m){l[m?0:1].push(f)},function(){return[[],[]]});function Mz(l,f,m){var S=Ye(l)?pg:d1,A=arguments.length<3;return S(l,Be(f,4),m,A,Do)}function Dz(l,f,m){var S=Ye(l)?q$:d1,A=arguments.length<3;return S(l,Be(f,4),m,A,T1)}function jz(l,f){var m=Ye(l)?To:k1;return m(l,Pf(Be(f,3)))}function Lz(l){var f=Ye(l)?P1:RV;return f(l)}function $z(l,f,m){(m?qn(l,f,m):f===n)?f=1:f=Qe(f);var S=Ye(l)?aV:IV;return S(l,f)}function Fz(l){var f=Ye(l)?sV:kV;return f(l)}function Vz(l){if(l==null)return 0;if(ir(l))return Rf(l)?ks(l):l.length;var f=$n(l);return f==Z||f==le?l.size:kg(l).length}function Bz(l,f,m){var S=Ye(l)?hg:NV;return m&&qn(l,f,m)&&(f=n),S(l,Be(f,3))}var zz=tt(function(l,f){if(l==null)return[];var m=f.length;return m>1&&qn(l,f[0],f[1])?f=[]:m>2&&qn(f[0],f[1],f[2])&&(f=[f[0]]),z1(l,An(f,1),[])}),_f=CF||function(){return Pn.Date.now()};function Wz(l,f){if(typeof f!="function")throw new Vr(a);return l=Qe(l),function(){if(--l<1)return f.apply(this,arguments)}}function jC(l,f,m){return f=m?n:f,f=l&&f==null?l.length:f,Ui(l,I,n,n,n,n,f)}function LC(l,f){var m;if(typeof f!="function")throw new Vr(a);return l=Qe(l),function(){return--l>0&&(m=f.apply(this,arguments)),l<=1&&(f=n),m}}var nm=tt(function(l,f,m){var S=v;if(m.length){var A=No(m,Vs(nm));S|=P}return Ui(l,S,f,m,A)}),$C=tt(function(l,f,m){var S=v|w;if(m.length){var A=No(m,Vs($C));S|=P}return Ui(f,S,l,m,A)});function FC(l,f,m){f=m?n:f;var S=Ui(l,E,n,n,n,n,n,f);return S.placeholder=FC.placeholder,S}function VC(l,f,m){f=m?n:f;var S=Ui(l,_,n,n,n,n,n,f);return S.placeholder=VC.placeholder,S}function BC(l,f,m){var S,A,N,M,F,W,ae=0,se=!1,ce=!1,ye=!0;if(typeof l!="function")throw new Vr(a);f=Ur(f)||0,zt(m)&&(se=!!m.leading,ce="maxWait"in m,N=ce?sn(Ur(m.maxWait)||0,f):N,ye="trailing"in m?!!m.trailing:ye);function Ie(Yt){var si=S,Xi=A;return S=A=n,ae=Yt,M=l.apply(Xi,si),M}function We(Yt){return ae=Yt,F=iu(it,f),se?Ie(Yt):M}function Je(Yt){var si=Yt-W,Xi=Yt-ae,aS=f-si;return ce?Ln(aS,N-Xi):aS}function He(Yt){var si=Yt-W,Xi=Yt-ae;return W===n||si>=f||si<0||ce&&Xi>=N}function it(){var Yt=_f();if(He(Yt))return st(Yt);F=iu(it,Je(Yt))}function st(Yt){return F=n,ye&&S?Ie(Yt):(S=A=n,M)}function Cr(){F!==n&&Z1(F),ae=0,S=W=A=F=n}function Kn(){return F===n?M:st(_f())}function Sr(){var Yt=_f(),si=He(Yt);if(S=arguments,A=this,W=Yt,si){if(F===n)return We(W);if(ce)return Z1(F),F=iu(it,f),Ie(W)}return F===n&&(F=iu(it,f)),M}return Sr.cancel=Cr,Sr.flush=Kn,Sr}var Hz=tt(function(l,f){return I1(l,1,f)}),Uz=tt(function(l,f,m){return I1(l,Ur(f)||0,m)});function Gz(l){return Ui(l,B)}function Of(l,f){if(typeof l!="function"||f!=null&&typeof f!="function")throw new Vr(a);var m=function(){var S=arguments,A=f?f.apply(this,S):S[0],N=m.cache;if(N.has(A))return N.get(A);var M=l.apply(this,S);return m.cache=N.set(A,M)||N,M};return m.cache=new(Of.Cache||Wi),m}Of.Cache=Wi;function Pf(l){if(typeof l!="function")throw new Vr(a);return function(){var f=arguments;switch(f.length){case 0:return!l.call(this);case 1:return!l.call(this,f[0]);case 2:return!l.call(this,f[0],f[1]);case 3:return!l.call(this,f[0],f[1],f[2])}return!l.apply(this,f)}}function qz(l){return LC(2,l)}var Kz=MV(function(l,f){f=f.length==1&&Ye(f[0])?Ft(f[0],br(Be())):Ft(An(f,1),br(Be()));var m=f.length;return tt(function(S){for(var A=-1,N=Ln(S.length,m);++A<N;)S[A]=f[A].call(this,S[A]);return yr(l,this,S)})}),rm=tt(function(l,f){var m=No(f,Vs(rm));return Ui(l,P,n,f,m)}),zC=tt(function(l,f){var m=No(f,Vs(zC));return Ui(l,R,n,f,m)}),Yz=Gi(function(l,f){return Ui(l,k,n,n,n,f)});function Xz(l,f){if(typeof l!="function")throw new Vr(a);return f=f===n?f:Qe(f),tt(l,f)}function Zz(l,f){if(typeof l!="function")throw new Vr(a);return f=f==null?0:sn(Qe(f),0),tt(function(m){var S=m[f],A=$o(m,0,f);return S&&ko(A,S),yr(l,this,A)})}function Qz(l,f,m){var S=!0,A=!0;if(typeof l!="function")throw new Vr(a);return zt(m)&&(S="leading"in m?!!m.leading:S,A="trailing"in m?!!m.trailing:A),BC(l,f,{leading:S,maxWait:f,trailing:A})}function Jz(l){return jC(l,1)}function e3(l,f){return rm(Bg(f),l)}function t3(){if(!arguments.length)return[];var l=arguments[0];return Ye(l)?l:[l]}function n3(l){return zr(l,h)}function r3(l,f){return f=typeof f=="function"?f:n,zr(l,h,f)}function i3(l){return zr(l,p|h)}function o3(l,f){return f=typeof f=="function"?f:n,zr(l,p|h,f)}function a3(l,f){return f==null||R1(l,f,bn(f))}function ai(l,f){return l===f||l!==l&&f!==f}var s3=bf(Rg),l3=bf(function(l,f){return l>=f}),Ia=D1((function(){return arguments})())?D1:function(l){return Ut(l)&&vt.call(l,"callee")&&!w1.call(l,"callee")},Ye=X.isArray,u3=n1?br(n1):vV;function ir(l){return l!=null&&Af(l.length)&&!Ki(l)}function Kt(l){return Ut(l)&&ir(l)}function c3(l){return l===!0||l===!1||Ut(l)&&Gn(l)==Fe}var Fo=EF||hm,f3=r1?br(r1):yV;function d3(l){return Ut(l)&&l.nodeType===1&&!ou(l)}function p3(l){if(l==null)return!0;if(ir(l)&&(Ye(l)||typeof l=="string"||typeof l.splice=="function"||Fo(l)||Bs(l)||Ia(l)))return!l.length;var f=$n(l);if(f==Z||f==le)return!l.size;if(ru(l))return!kg(l).length;for(var m in l)if(vt.call(l,m))return!1;return!0}function h3(l,f){return eu(l,f)}function g3(l,f,m){m=typeof m=="function"?m:n;var S=m?m(l,f):n;return S===n?eu(l,f,n,m):!!S}function im(l){if(!Ut(l))return!1;var f=Gn(l);return f==ne||f==oe||typeof l.message=="string"&&typeof l.name=="string"&&!ou(l)}function m3(l){return typeof l=="number"&&S1(l)}function Ki(l){if(!zt(l))return!1;var f=Gn(l);return f==$||f==ie||f==Ke||f==de}function WC(l){return typeof l=="number"&&l==Qe(l)}function Af(l){return typeof l=="number"&&l>-1&&l%1==0&&l<=Q}function zt(l){var f=typeof l;return l!=null&&(f=="object"||f=="function")}function Ut(l){return l!=null&&typeof l=="object"}var HC=i1?br(i1):xV;function v3(l,f){return l===f||Tg(l,f,Kg(f))}function y3(l,f,m){return m=typeof m=="function"?m:n,Tg(l,f,Kg(f),m)}function b3(l){return UC(l)&&l!=+l}function x3(l){if(rB(l))throw new qe(o);return j1(l)}function w3(l){return l===null}function C3(l){return l==null}function UC(l){return typeof l=="number"||Ut(l)&&Gn(l)==Re}function ou(l){if(!Ut(l)||Gn(l)!=fe)return!1;var f=ef(l);if(f===null)return!0;var m=vt.call(f,"constructor")&&f.constructor;return typeof m=="function"&&m instanceof m&&Xc.call(m)==yF}var om=o1?br(o1):wV;function S3(l){return WC(l)&&l>=-Q&&l<=Q}var GC=a1?br(a1):CV;function Rf(l){return typeof l=="string"||!Ye(l)&&Ut(l)&&Gn(l)==be}function wr(l){return typeof l=="symbol"||Ut(l)&&Gn(l)==ke}var Bs=s1?br(s1):SV;function E3(l){return l===n}function _3(l){return Ut(l)&&$n(l)==Tt}function O3(l){return Ut(l)&&Gn(l)==Dn}var P3=bf(Ng),A3=bf(function(l,f){return l<=f});function qC(l){if(!l)return[];if(ir(l))return Rf(l)?ii(l):rr(l);if(Gl&&l[Gl])return aF(l[Gl]());var f=$n(l),m=f==Z?xg:f==le?qc:zs;return m(l)}function Yi(l){if(!l)return l===0?l:0;if(l=Ur(l),l===ee||l===-ee){var f=l<0?-1:1;return f*pe}return l===l?l:0}function Qe(l){var f=Yi(l),m=f%1;return f===f?m?f-m:f:0}function KC(l){return l?Oa(Qe(l),0,Ae):0}function Ur(l){if(typeof l=="number")return l;if(wr(l))return K;if(zt(l)){var f=typeof l.valueOf=="function"?l.valueOf():l;l=zt(f)?f+"":f}if(typeof l!="string")return l===0?l:+l;l=p1(l);var m=Mc.test(l);return m||$l.test(l)?W$(l.slice(2),m?2:8):bs.test(l)?K:+l}function YC(l){return wi(l,or(l))}function R3(l){return l?Oa(Qe(l),-Q,Q):l===0?l:0}function yt(l){return l==null?"":xr(l)}var I3=$s(function(l,f){if(ru(f)||ir(f)){wi(f,bn(f),l);return}for(var m in f)vt.call(f,m)&&Zl(l,m,f[m])}),XC=$s(function(l,f){wi(f,or(f),l)}),If=$s(function(l,f,m,S){wi(f,or(f),l,S)}),T3=$s(function(l,f,m,S){wi(f,bn(f),l,S)}),k3=Gi(Og);function N3(l,f){var m=Ls(l);return f==null?m:A1(m,f)}var M3=tt(function(l,f){l=_t(l);var m=-1,S=f.length,A=S>2?f[2]:n;for(A&&qn(f[0],f[1],A)&&(S=1);++m<S;)for(var N=f[m],M=or(N),F=-1,W=M.length;++F<W;){var ae=M[F],se=l[ae];(se===n||ai(se,Ms[ae])&&!vt.call(l,ae))&&(l[ae]=N[ae])}return l}),D3=tt(function(l){return l.push(n,pC),yr(ZC,n,l)});function j3(l,f){return u1(l,Be(f,3),xi)}function L3(l,f){return u1(l,Be(f,3),Ag)}function $3(l,f){return l==null?l:Pg(l,Be(f,3),or)}function F3(l,f){return l==null?l:N1(l,Be(f,3),or)}function V3(l,f){return l&&xi(l,Be(f,3))}function B3(l,f){return l&&Ag(l,Be(f,3))}function z3(l){return l==null?[]:ff(l,bn(l))}function W3(l){return l==null?[]:ff(l,or(l))}function am(l,f,m){var S=l==null?n:Pa(l,f);return S===n?m:S}function H3(l,f){return l!=null&&mC(l,f,pV)}function sm(l,f){return l!=null&&mC(l,f,hV)}var U3=lC(function(l,f,m){f!=null&&typeof f.toString!="function"&&(f=Zc.call(f)),l[f]=m},um(ar)),G3=lC(function(l,f,m){f!=null&&typeof f.toString!="function"&&(f=Zc.call(f)),vt.call(l,f)?l[f].push(m):l[f]=[m]},Be),q3=tt(Jl);function bn(l){return ir(l)?O1(l):kg(l)}function or(l){return ir(l)?O1(l,!0):EV(l)}function K3(l,f){var m={};return f=Be(f,3),xi(l,function(S,A,N){Hi(m,f(S,A,N),S)}),m}function Y3(l,f){var m={};return f=Be(f,3),xi(l,function(S,A,N){Hi(m,A,f(S,A,N))}),m}var X3=$s(function(l,f,m){df(l,f,m)}),ZC=$s(function(l,f,m,S){df(l,f,m,S)}),Z3=Gi(function(l,f){var m={};if(l==null)return m;var S=!1;f=Ft(f,function(N){return N=Lo(N,l),S||(S=N.length>1),N}),wi(l,Gg(l),m),S&&(m=zr(m,p|g|h,UV));for(var A=f.length;A--;)$g(m,f[A]);return m});function Q3(l,f){return QC(l,Pf(Be(f)))}var J3=Gi(function(l,f){return l==null?{}:OV(l,f)});function QC(l,f){if(l==null)return{};var m=Ft(Gg(l),function(S){return[S]});return f=Be(f),W1(l,m,function(S,A){return f(S,A[0])})}function e5(l,f,m){f=Lo(f,l);var S=-1,A=f.length;for(A||(A=1,l=n);++S<A;){var N=l==null?n:l[Ci(f[S])];N===n&&(S=A,N=m),l=Ki(N)?N.call(l):N}return l}function t5(l,f,m){return l==null?l:tu(l,f,m)}function n5(l,f,m,S){return S=typeof S=="function"?S:n,l==null?l:tu(l,f,m,S)}var JC=fC(bn),eS=fC(or);function r5(l,f,m){var S=Ye(l),A=S||Fo(l)||Bs(l);if(f=Be(f,4),m==null){var N=l&&l.constructor;A?m=S?new N:[]:zt(l)?m=Ki(N)?Ls(ef(l)):{}:m={}}return(A?Fr:xi)(l,function(M,F,W){return f(m,M,F,W)}),m}function i5(l,f){return l==null?!0:$g(l,f)}function o5(l,f,m){return l==null?l:K1(l,f,Bg(m))}function a5(l,f,m,S){return S=typeof S=="function"?S:n,l==null?l:K1(l,f,Bg(m),S)}function zs(l){return l==null?[]:bg(l,bn(l))}function s5(l){return l==null?[]:bg(l,or(l))}function l5(l,f,m){return m===n&&(m=f,f=n),m!==n&&(m=Ur(m),m=m===m?m:0),f!==n&&(f=Ur(f),f=f===f?f:0),Oa(Ur(l),f,m)}function u5(l,f,m){return f=Yi(f),m===n?(m=f,f=0):m=Yi(m),l=Ur(l),gV(l,f,m)}function c5(l,f,m){if(m&&typeof m!="boolean"&&qn(l,f,m)&&(f=m=n),m===n&&(typeof f=="boolean"?(m=f,f=n):typeof l=="boolean"&&(m=l,l=n)),l===n&&f===n?(l=0,f=1):(l=Yi(l),f===n?(f=l,l=0):f=Yi(f)),l>f){var S=l;l=f,f=S}if(m||l%1||f%1){var A=E1();return Ln(l+A*(f-l+z$("1e-"+((A+"").length-1))),f)}return Dg(l,f)}var f5=Fs(function(l,f,m){return f=f.toLowerCase(),l+(m?tS(f):f)});function tS(l){return lm(yt(l).toLowerCase())}function nS(l){return l=yt(l),l&&l.replace(yi,tF).replace(Jw,"")}function d5(l,f,m){l=yt(l),f=xr(f);var S=l.length;m=m===n?S:Oa(Qe(m),0,S);var A=m;return m-=f.length,m>=0&&l.slice(m,A)==f}function p5(l){return l=yt(l),l&&ma.test(l)?l.replace(mi,nF):l}function h5(l){return l=yt(l),l&&vs.test(l)?l.replace(Dr,"\\$&"):l}var g5=Fs(function(l,f,m){return l+(m?"-":"")+f.toLowerCase()}),m5=Fs(function(l,f,m){return l+(m?" ":"")+f.toLowerCase()}),v5=oC("toLowerCase");function y5(l,f,m){l=yt(l),f=Qe(f);var S=f?ks(l):0;if(!f||S>=f)return l;var A=(f-S)/2;return yf(of(A),m)+l+yf(rf(A),m)}function b5(l,f,m){l=yt(l),f=Qe(f);var S=f?ks(l):0;return f&&S<f?l+yf(f-S,m):l}function x5(l,f,m){l=yt(l),f=Qe(f);var S=f?ks(l):0;return f&&S<f?yf(f-S,m)+l:l}function w5(l,f,m){return m||f==null?f=0:f&&(f=+f),AF(yt(l).replace(jr,""),f||0)}function C5(l,f,m){return(m?qn(l,f,m):f===n)?f=1:f=Qe(f),jg(yt(l),f)}function S5(){var l=arguments,f=yt(l[0]);return l.length<3?f:f.replace(l[1],l[2])}var E5=Fs(function(l,f,m){return l+(m?"_":"")+f.toLowerCase()});function _5(l,f,m){return m&&typeof m!="number"&&qn(l,f,m)&&(f=m=n),m=m===n?Ae:m>>>0,m?(l=yt(l),l&&(typeof f=="string"||f!=null&&!om(f))&&(f=xr(f),!f&&Ts(l))?$o(ii(l),0,m):l.split(f,m)):[]}var O5=Fs(function(l,f,m){return l+(m?" ":"")+lm(f)});function P5(l,f,m){return l=yt(l),m=m==null?0:Oa(Qe(m),0,l.length),f=xr(f),l.slice(m,m+f.length)==f}function A5(l,f,m){var S=T.templateSettings;m&&qn(l,f,m)&&(f=n),l=yt(l),f=If({},f,S,dC);var A=If({},f.imports,S.imports,dC),N=bn(A),M=bg(A,N),F,W,ae=0,se=f.interpolate||xs,ce="__p += '",ye=wg((f.escape||xs).source+"|"+se.source+"|"+(se===nr?ys:xs).source+"|"+(f.evaluate||xs).source+"|$","g"),Ie="//# sourceURL="+(vt.call(f,"sourceURL")?(f.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++L$+"]")+`
171
+ `;l.replace(ye,function(He,it,st,Cr,Kn,Sr){return st||(st=Cr),ce+=l.slice(ae,Sr).replace(Dc,rF),it&&(F=!0,ce+=`' +
172
+ __e(`+it+`) +
173
+ '`),Kn&&(W=!0,ce+=`';
174
+ `+Kn+`;
175
+ __p += '`),st&&(ce+=`' +
176
+ ((__t = (`+st+`)) == null ? '' : __t) +
177
+ '`),ae=Sr+He.length,He}),ce+=`';
178
+ `;var We=vt.call(f,"variable")&&f.variable;if(!We)ce=`with (obj) {
179
+ `+ce+`
180
+ }
181
+ `;else if(jl.test(We))throw new qe(s);ce=(W?ce.replace(ht,""):ce).replace(Ve,"$1").replace(jn,"$1;"),ce="function("+(We||"obj")+`) {
182
+ `+(We?"":`obj || (obj = {});
183
+ `)+"var __t, __p = ''"+(F?", __e = _.escape":"")+(W?`, __j = Array.prototype.join;
184
+ function print() { __p += __j.call(arguments, '') }
185
+ `:`;
186
+ `)+ce+`return __p
187
+ }`;var Je=iS(function(){return gt(N,Ie+"return "+ce).apply(n,M)});if(Je.source=ce,im(Je))throw Je;return Je}function R5(l){return yt(l).toLowerCase()}function I5(l){return yt(l).toUpperCase()}function T5(l,f,m){if(l=yt(l),l&&(m||f===n))return p1(l);if(!l||!(f=xr(f)))return l;var S=ii(l),A=ii(f),N=h1(S,A),M=g1(S,A)+1;return $o(S,N,M).join("")}function k5(l,f,m){if(l=yt(l),l&&(m||f===n))return l.slice(0,v1(l)+1);if(!l||!(f=xr(f)))return l;var S=ii(l),A=g1(S,ii(f))+1;return $o(S,0,A).join("")}function N5(l,f,m){if(l=yt(l),l&&(m||f===n))return l.replace(jr,"");if(!l||!(f=xr(f)))return l;var S=ii(l),A=h1(S,ii(f));return $o(S,A).join("")}function M5(l,f){var m=L,S=V;if(zt(f)){var A="separator"in f?f.separator:A;m="length"in f?Qe(f.length):m,S="omission"in f?xr(f.omission):S}l=yt(l);var N=l.length;if(Ts(l)){var M=ii(l);N=M.length}if(m>=N)return l;var F=m-ks(S);if(F<1)return S;var W=M?$o(M,0,F).join(""):l.slice(0,F);if(A===n)return W+S;if(M&&(F+=W.length-F),om(A)){if(l.slice(F).search(A)){var ae,se=W;for(A.global||(A=wg(A.source,yt(Nc.exec(A))+"g")),A.lastIndex=0;ae=A.exec(se);)var ce=ae.index;W=W.slice(0,ce===n?F:ce)}}else if(l.indexOf(xr(A),F)!=F){var ye=W.lastIndexOf(A);ye>-1&&(W=W.slice(0,ye))}return W+S}function D5(l){return l=yt(l),l&&Jt.test(l)?l.replace(On,cF):l}var j5=Fs(function(l,f,m){return l+(m?" ":"")+f.toUpperCase()}),lm=oC("toUpperCase");function rS(l,f,m){return l=yt(l),f=m?n:f,f===n?oF(l)?pF(l):X$(l):l.match(f)||[]}var iS=tt(function(l,f){try{return yr(l,n,f)}catch(m){return im(m)?m:new qe(m)}}),L5=Gi(function(l,f){return Fr(f,function(m){m=Ci(m),Hi(l,m,nm(l[m],l))}),l});function $5(l){var f=l==null?0:l.length,m=Be();return l=f?Ft(l,function(S){if(typeof S[1]!="function")throw new Vr(a);return[m(S[0]),S[1]]}):[],tt(function(S){for(var A=-1;++A<f;){var N=l[A];if(yr(N[0],this,S))return yr(N[1],this,S)}})}function F5(l){return cV(zr(l,p))}function um(l){return function(){return l}}function V5(l,f){return l==null||l!==l?f:l}var B5=sC(),z5=sC(!0);function ar(l){return l}function cm(l){return L1(typeof l=="function"?l:zr(l,p))}function W5(l){return F1(zr(l,p))}function H5(l,f){return V1(l,zr(f,p))}var U5=tt(function(l,f){return function(m){return Jl(m,l,f)}}),G5=tt(function(l,f){return function(m){return Jl(l,m,f)}});function fm(l,f,m){var S=bn(f),A=ff(f,S);m==null&&!(zt(f)&&(A.length||!S.length))&&(m=f,f=l,l=this,A=ff(f,bn(f)));var N=!(zt(m)&&"chain"in m)||!!m.chain,M=Ki(l);return Fr(A,function(F){var W=f[F];l[F]=W,M&&(l.prototype[F]=function(){var ae=this.__chain__;if(N||ae){var se=l(this.__wrapped__),ce=se.__actions__=rr(this.__actions__);return ce.push({func:W,args:arguments,thisArg:l}),se.__chain__=ae,se}return W.apply(l,ko([this.value()],arguments))})}),l}function q5(){return Pn._===this&&(Pn._=bF),this}function dm(){}function K5(l){return l=Qe(l),tt(function(f){return B1(f,l)})}var Y5=Wg(Ft),X5=Wg(l1),Z5=Wg(hg);function oS(l){return Xg(l)?gg(Ci(l)):PV(l)}function Q5(l){return function(f){return l==null?n:Pa(l,f)}}var J5=uC(),eW=uC(!0);function pm(){return[]}function hm(){return!1}function tW(){return{}}function nW(){return""}function rW(){return!0}function iW(l,f){if(l=Qe(l),l<1||l>Q)return[];var m=Ae,S=Ln(l,Ae);f=Be(f),l-=Ae;for(var A=yg(S,f);++m<l;)f(m);return A}function oW(l){return Ye(l)?Ft(l,Ci):wr(l)?[l]:rr(_C(yt(l)))}function aW(l){var f=++vF;return yt(l)+f}var sW=vf(function(l,f){return l+f},0),lW=Hg("ceil"),uW=vf(function(l,f){return l/f},1),cW=Hg("floor");function fW(l){return l&&l.length?cf(l,ar,Rg):n}function dW(l,f){return l&&l.length?cf(l,Be(f,2),Rg):n}function pW(l){return f1(l,ar)}function hW(l,f){return f1(l,Be(f,2))}function gW(l){return l&&l.length?cf(l,ar,Ng):n}function mW(l,f){return l&&l.length?cf(l,Be(f,2),Ng):n}var vW=vf(function(l,f){return l*f},1),yW=Hg("round"),bW=vf(function(l,f){return l-f},0);function xW(l){return l&&l.length?vg(l,ar):0}function wW(l,f){return l&&l.length?vg(l,Be(f,2)):0}return T.after=Wz,T.ary=jC,T.assign=I3,T.assignIn=XC,T.assignInWith=If,T.assignWith=T3,T.at=k3,T.before=LC,T.bind=nm,T.bindAll=L5,T.bindKey=$C,T.castArray=t3,T.chain=NC,T.chunk=cB,T.compact=fB,T.concat=dB,T.cond=$5,T.conforms=F5,T.constant=um,T.countBy=xz,T.create=N3,T.curry=FC,T.curryRight=VC,T.debounce=BC,T.defaults=M3,T.defaultsDeep=D3,T.defer=Hz,T.delay=Uz,T.difference=pB,T.differenceBy=hB,T.differenceWith=gB,T.drop=mB,T.dropRight=vB,T.dropRightWhile=yB,T.dropWhile=bB,T.fill=xB,T.filter=Cz,T.flatMap=_z,T.flatMapDeep=Oz,T.flatMapDepth=Pz,T.flatten=RC,T.flattenDeep=wB,T.flattenDepth=CB,T.flip=Gz,T.flow=B5,T.flowRight=z5,T.fromPairs=SB,T.functions=z3,T.functionsIn=W3,T.groupBy=Az,T.initial=_B,T.intersection=OB,T.intersectionBy=PB,T.intersectionWith=AB,T.invert=U3,T.invertBy=G3,T.invokeMap=Iz,T.iteratee=cm,T.keyBy=Tz,T.keys=bn,T.keysIn=or,T.map=Ef,T.mapKeys=K3,T.mapValues=Y3,T.matches=W5,T.matchesProperty=H5,T.memoize=Of,T.merge=X3,T.mergeWith=ZC,T.method=U5,T.methodOf=G5,T.mixin=fm,T.negate=Pf,T.nthArg=K5,T.omit=Z3,T.omitBy=Q3,T.once=qz,T.orderBy=kz,T.over=Y5,T.overArgs=Kz,T.overEvery=X5,T.overSome=Z5,T.partial=rm,T.partialRight=zC,T.partition=Nz,T.pick=J3,T.pickBy=QC,T.property=oS,T.propertyOf=Q5,T.pull=kB,T.pullAll=TC,T.pullAllBy=NB,T.pullAllWith=MB,T.pullAt=DB,T.range=J5,T.rangeRight=eW,T.rearg=Yz,T.reject=jz,T.remove=jB,T.rest=Xz,T.reverse=em,T.sampleSize=$z,T.set=t5,T.setWith=n5,T.shuffle=Fz,T.slice=LB,T.sortBy=zz,T.sortedUniq=HB,T.sortedUniqBy=UB,T.split=_5,T.spread=Zz,T.tail=GB,T.take=qB,T.takeRight=KB,T.takeRightWhile=YB,T.takeWhile=XB,T.tap=fz,T.throttle=Qz,T.thru=Sf,T.toArray=qC,T.toPairs=JC,T.toPairsIn=eS,T.toPath=oW,T.toPlainObject=YC,T.transform=r5,T.unary=Jz,T.union=ZB,T.unionBy=QB,T.unionWith=JB,T.uniq=ez,T.uniqBy=tz,T.uniqWith=nz,T.unset=i5,T.unzip=tm,T.unzipWith=kC,T.update=o5,T.updateWith=a5,T.values=zs,T.valuesIn=s5,T.without=rz,T.words=rS,T.wrap=e3,T.xor=iz,T.xorBy=oz,T.xorWith=az,T.zip=sz,T.zipObject=lz,T.zipObjectDeep=uz,T.zipWith=cz,T.entries=JC,T.entriesIn=eS,T.extend=XC,T.extendWith=If,fm(T,T),T.add=sW,T.attempt=iS,T.camelCase=f5,T.capitalize=tS,T.ceil=lW,T.clamp=l5,T.clone=n3,T.cloneDeep=i3,T.cloneDeepWith=o3,T.cloneWith=r3,T.conformsTo=a3,T.deburr=nS,T.defaultTo=V5,T.divide=uW,T.endsWith=d5,T.eq=ai,T.escape=p5,T.escapeRegExp=h5,T.every=wz,T.find=Sz,T.findIndex=PC,T.findKey=j3,T.findLast=Ez,T.findLastIndex=AC,T.findLastKey=L3,T.floor=cW,T.forEach=MC,T.forEachRight=DC,T.forIn=$3,T.forInRight=F3,T.forOwn=V3,T.forOwnRight=B3,T.get=am,T.gt=s3,T.gte=l3,T.has=H3,T.hasIn=sm,T.head=IC,T.identity=ar,T.includes=Rz,T.indexOf=EB,T.inRange=u5,T.invoke=q3,T.isArguments=Ia,T.isArray=Ye,T.isArrayBuffer=u3,T.isArrayLike=ir,T.isArrayLikeObject=Kt,T.isBoolean=c3,T.isBuffer=Fo,T.isDate=f3,T.isElement=d3,T.isEmpty=p3,T.isEqual=h3,T.isEqualWith=g3,T.isError=im,T.isFinite=m3,T.isFunction=Ki,T.isInteger=WC,T.isLength=Af,T.isMap=HC,T.isMatch=v3,T.isMatchWith=y3,T.isNaN=b3,T.isNative=x3,T.isNil=C3,T.isNull=w3,T.isNumber=UC,T.isObject=zt,T.isObjectLike=Ut,T.isPlainObject=ou,T.isRegExp=om,T.isSafeInteger=S3,T.isSet=GC,T.isString=Rf,T.isSymbol=wr,T.isTypedArray=Bs,T.isUndefined=E3,T.isWeakMap=_3,T.isWeakSet=O3,T.join=RB,T.kebabCase=g5,T.last=Hr,T.lastIndexOf=IB,T.lowerCase=m5,T.lowerFirst=v5,T.lt=P3,T.lte=A3,T.max=fW,T.maxBy=dW,T.mean=pW,T.meanBy=hW,T.min=gW,T.minBy=mW,T.stubArray=pm,T.stubFalse=hm,T.stubObject=tW,T.stubString=nW,T.stubTrue=rW,T.multiply=vW,T.nth=TB,T.noConflict=q5,T.noop=dm,T.now=_f,T.pad=y5,T.padEnd=b5,T.padStart=x5,T.parseInt=w5,T.random=c5,T.reduce=Mz,T.reduceRight=Dz,T.repeat=C5,T.replace=S5,T.result=e5,T.round=yW,T.runInContext=z,T.sample=Lz,T.size=Vz,T.snakeCase=E5,T.some=Bz,T.sortedIndex=$B,T.sortedIndexBy=FB,T.sortedIndexOf=VB,T.sortedLastIndex=BB,T.sortedLastIndexBy=zB,T.sortedLastIndexOf=WB,T.startCase=O5,T.startsWith=P5,T.subtract=bW,T.sum=xW,T.sumBy=wW,T.template=A5,T.times=iW,T.toFinite=Yi,T.toInteger=Qe,T.toLength=KC,T.toLower=R5,T.toNumber=Ur,T.toSafeInteger=R3,T.toString=yt,T.toUpper=I5,T.trim=T5,T.trimEnd=k5,T.trimStart=N5,T.truncate=M5,T.unescape=D5,T.uniqueId=aW,T.upperCase=j5,T.upperFirst=lm,T.each=MC,T.eachRight=DC,T.first=IC,fm(T,(function(){var l={};return xi(T,function(f,m){vt.call(T.prototype,m)||(l[m]=f)}),l})(),{chain:!1}),T.VERSION=r,Fr(["bind","bindKey","curry","curryRight","partial","partialRight"],function(l){T[l].placeholder=T}),Fr(["drop","take"],function(l,f){at.prototype[l]=function(m){m=m===n?1:sn(Qe(m),0);var S=this.__filtered__&&!f?new at(this):this.clone();return S.__filtered__?S.__takeCount__=Ln(m,S.__takeCount__):S.__views__.push({size:Ln(m,Ae),type:l+(S.__dir__<0?"Right":"")}),S},at.prototype[l+"Right"]=function(m){return this.reverse()[l](m).reverse()}}),Fr(["filter","map","takeWhile"],function(l,f){var m=f+1,S=m==J||m==G;at.prototype[l]=function(A){var N=this.clone();return N.__iteratees__.push({iteratee:Be(A,3),type:m}),N.__filtered__=N.__filtered__||S,N}}),Fr(["head","last"],function(l,f){var m="take"+(f?"Right":"");at.prototype[l]=function(){return this[m](1).value()[0]}}),Fr(["initial","tail"],function(l,f){var m="drop"+(f?"":"Right");at.prototype[l]=function(){return this.__filtered__?new at(this):this[m](1)}}),at.prototype.compact=function(){return this.filter(ar)},at.prototype.find=function(l){return this.filter(l).head()},at.prototype.findLast=function(l){return this.reverse().find(l)},at.prototype.invokeMap=tt(function(l,f){return typeof l=="function"?new at(this):this.map(function(m){return Jl(m,l,f)})}),at.prototype.reject=function(l){return this.filter(Pf(Be(l)))},at.prototype.slice=function(l,f){l=Qe(l);var m=this;return m.__filtered__&&(l>0||f<0)?new at(m):(l<0?m=m.takeRight(-l):l&&(m=m.drop(l)),f!==n&&(f=Qe(f),m=f<0?m.dropRight(-f):m.take(f-l)),m)},at.prototype.takeRightWhile=function(l){return this.reverse().takeWhile(l).reverse()},at.prototype.toArray=function(){return this.take(Ae)},xi(at.prototype,function(l,f){var m=/^(?:filter|find|map|reject)|While$/.test(f),S=/^(?:head|last)$/.test(f),A=T[S?"take"+(f=="last"?"Right":""):f],N=S||/^find/.test(f);A&&(T.prototype[f]=function(){var M=this.__wrapped__,F=S?[1]:arguments,W=M instanceof at,ae=F[0],se=W||Ye(M),ce=function(it){var st=A.apply(T,ko([it],F));return S&&ye?st[0]:st};se&&m&&typeof ae=="function"&&ae.length!=1&&(W=se=!1);var ye=this.__chain__,Ie=!!this.__actions__.length,We=N&&!ye,Je=W&&!Ie;if(!N&&se){M=Je?M:new at(this);var He=l.apply(M,F);return He.__actions__.push({func:Sf,args:[ce],thisArg:n}),new Br(He,ye)}return We&&Je?l.apply(this,F):(He=this.thru(ce),We?S?He.value()[0]:He.value():He)})}),Fr(["pop","push","shift","sort","splice","unshift"],function(l){var f=Kc[l],m=/^(?:push|sort|unshift)$/.test(l)?"tap":"thru",S=/^(?:pop|shift)$/.test(l);T.prototype[l]=function(){var A=arguments;if(S&&!this.__chain__){var N=this.value();return f.apply(Ye(N)?N:[],A)}return this[m](function(M){return f.apply(Ye(M)?M:[],A)})}}),xi(at.prototype,function(l,f){var m=T[f];if(m){var S=m.name+"";vt.call(js,S)||(js[S]=[]),js[S].push({name:f,func:m})}}),js[mf(n,w).name]=[{name:"wrapper",func:n}],at.prototype.clone=DF,at.prototype.reverse=jF,at.prototype.value=LF,T.prototype.at=dz,T.prototype.chain=pz,T.prototype.commit=hz,T.prototype.next=gz,T.prototype.plant=vz,T.prototype.reverse=yz,T.prototype.toJSON=T.prototype.valueOf=T.prototype.value=bz,T.prototype.first=T.prototype.head,Gl&&(T.prototype[Gl]=mz),T}),Ns=hF();Ca?((Ca.exports=Ns)._=Ns,cg._=Ns):Pn._=Ns}).call(MX)})(Eu,Eu.exports)),Eu.exports}var jX=DX(),LX=["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 wx(e){if(typeof e!="string")return!1;var t=LX;return t.includes(e)}var $X=["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"],FX=new Set($X);function EM(e){return typeof e!="string"?!1:FX.has(e)}function _M(e){return typeof e=="string"&&e.startsWith("data-")}function fo(e){if(typeof e!="object"||e===null)return{};var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(EM(n)||_M(n))&&(t[n]=e[n]);return t}function Cx(e){if(e==null)return null;if(j.isValidElement(e)&&typeof e.props=="object"&&e.props!==null){var t=e.props;return fo(t)}return typeof e=="object"&&!Array.isArray(e)?fo(e):null}function ti(e){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(EM(n)||_M(n)||wx(n))&&(t[n]=e[n]);return t}var VX=["children","width","height","viewBox","className","style","title","desc"];function Zy(){return Zy=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},Zy.apply(null,arguments)}function BX(e,t){if(e==null)return{};var n,r,i=zX(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function zX(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 OM=j.forwardRef((e,t)=>{var{children:n,width:r,height:i,viewBox:o,className:a,style:s,title:u,desc:c}=e,d=BX(e,VX),p=o||{width:r,height:i,x:0,y:0},g=Pt("recharts-surface",a);return x.createElement("svg",Zy({},ti(d),{className:g,width:r,height:i,style:s,viewBox:"".concat(p.x," ").concat(p.y," ").concat(p.width," ").concat(p.height),ref:t}),x.createElement("title",null,u),x.createElement("desc",null,c),n)}),WX=["children","className"];function Qy(){return Qy=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},Qy.apply(null,arguments)}function HX(e,t){if(e==null)return{};var n,r,i=UX(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function UX(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 Mi=x.forwardRef((e,t)=>{var{children:n,className:r}=e,i=HX(e,WX),o=Pt("recharts-layer",r);return x.createElement("g",Qy({className:o},ti(i),{ref:t}),n)}),GX=j.createContext(null);function It(e){return function(){return e}}const PM=Math.cos,Qd=Math.sin,gi=Math.sqrt,Jd=Math.PI,xh=2*Jd,Jy=Math.PI,eb=2*Jy,$a=1e-6,qX=eb-$a;function AM(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function KX(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return AM;const n=10**t;return function(r){this._+=r[0];for(let i=1,o=r.length;i<o;++i)this._+=Math.round(arguments[i]*n)/n+r[i]}}class YX{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?AM:KX(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,i){this._append`Q${+t},${+n},${this._x1=+r},${this._y1=+i}`}bezierCurveTo(t,n,r,i,o,a){this._append`C${+t},${+n},${+r},${+i},${this._x1=+o},${this._y1=+a}`}arcTo(t,n,r,i,o){if(t=+t,n=+n,r=+r,i=+i,o=+o,o<0)throw new Error(`negative radius: ${o}`);let a=this._x1,s=this._y1,u=r-t,c=i-n,d=a-t,p=s-n,g=d*d+p*p;if(this._x1===null)this._append`M${this._x1=t},${this._y1=n}`;else if(g>$a)if(!(Math.abs(p*u-c*d)>$a)||!o)this._append`L${this._x1=t},${this._y1=n}`;else{let h=r-a,y=i-s,b=u*u+c*c,v=h*h+y*y,w=Math.sqrt(b),C=Math.sqrt(g),E=o*Math.tan((Jy-Math.acos((b+g-v)/(2*w*C)))/2),_=E/C,P=E/w;Math.abs(_-1)>$a&&this._append`L${t+_*d},${n+_*p}`,this._append`A${o},${o},0,0,${+(p*h>d*y)},${this._x1=t+P*u},${this._y1=n+P*c}`}}arc(t,n,r,i,o,a){if(t=+t,n=+n,r=+r,a=!!a,r<0)throw new Error(`negative radius: ${r}`);let s=r*Math.cos(i),u=r*Math.sin(i),c=t+s,d=n+u,p=1^a,g=a?i-o:o-i;this._x1===null?this._append`M${c},${d}`:(Math.abs(this._x1-c)>$a||Math.abs(this._y1-d)>$a)&&this._append`L${c},${d}`,r&&(g<0&&(g=g%eb+eb),g>qX?this._append`A${r},${r},0,1,${p},${t-s},${n-u}A${r},${r},0,1,${p},${this._x1=c},${this._y1=d}`:g>$a&&this._append`A${r},${r},0,${+(g>=Jy)},${p},${this._x1=t+r*Math.cos(o)},${this._y1=n+r*Math.sin(o)}`)}rect(t,n,r,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${r=+r}v${+i}h${-r}Z`}toString(){return this._}}function Sx(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 YX(t)}function Ex(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function RM(e){this._context=e}RM.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 wh(e){return new RM(e)}function IM(e){return e[0]}function TM(e){return e[1]}function kM(e,t){var n=It(!0),r=null,i=wh,o=null,a=Sx(s);e=typeof e=="function"?e:e===void 0?IM:It(e),t=typeof t=="function"?t:t===void 0?TM:It(t);function s(u){var c,d=(u=Ex(u)).length,p,g=!1,h;for(r==null&&(o=i(h=a())),c=0;c<=d;++c)!(c<d&&n(p=u[c],c,u))===g&&((g=!g)?o.lineStart():o.lineEnd()),g&&o.point(+e(p,c,u),+t(p,c,u));if(h)return o=null,h+""||null}return s.x=function(u){return arguments.length?(e=typeof u=="function"?u:It(+u),s):e},s.y=function(u){return arguments.length?(t=typeof u=="function"?u:It(+u),s):t},s.defined=function(u){return arguments.length?(n=typeof u=="function"?u:It(!!u),s):n},s.curve=function(u){return arguments.length?(i=u,r!=null&&(o=i(r)),s):i},s.context=function(u){return arguments.length?(u==null?r=o=null:o=i(r=u),s):r},s}function rd(e,t,n){var r=null,i=It(!0),o=null,a=wh,s=null,u=Sx(c);e=typeof e=="function"?e:e===void 0?IM:It(+e),t=typeof t=="function"?t:It(t===void 0?0:+t),n=typeof n=="function"?n:n===void 0?TM:It(+n);function c(p){var g,h,y,b=(p=Ex(p)).length,v,w=!1,C,E=new Array(b),_=new Array(b);for(o==null&&(s=a(C=u())),g=0;g<=b;++g){if(!(g<b&&i(v=p[g],g,p))===w)if(w=!w)h=g,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),y=g-1;y>=h;--y)s.point(E[y],_[y]);s.lineEnd(),s.areaEnd()}w&&(E[g]=+e(v,g,p),_[g]=+t(v,g,p),s.point(r?+r(v,g,p):E[g],n?+n(v,g,p):_[g]))}if(C)return s=null,C+""||null}function d(){return kM().defined(i).curve(a).context(o)}return c.x=function(p){return arguments.length?(e=typeof p=="function"?p:It(+p),r=null,c):e},c.x0=function(p){return arguments.length?(e=typeof p=="function"?p:It(+p),c):e},c.x1=function(p){return arguments.length?(r=p==null?null:typeof p=="function"?p:It(+p),c):r},c.y=function(p){return arguments.length?(t=typeof p=="function"?p:It(+p),n=null,c):t},c.y0=function(p){return arguments.length?(t=typeof p=="function"?p:It(+p),c):t},c.y1=function(p){return arguments.length?(n=p==null?null:typeof p=="function"?p:It(+p),c):n},c.lineX0=c.lineY0=function(){return d().x(e).y(t)},c.lineY1=function(){return d().x(e).y(n)},c.lineX1=function(){return d().x(r).y(t)},c.defined=function(p){return arguments.length?(i=typeof p=="function"?p:It(!!p),c):i},c.curve=function(p){return arguments.length?(a=p,o!=null&&(s=a(o)),c):a},c.context=function(p){return arguments.length?(p==null?o=s=null:s=a(o=p),c):o},c}class NM{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 XX(e){return new NM(e,!0)}function ZX(e){return new NM(e,!1)}const _x={draw(e,t){const n=gi(t/Jd);e.moveTo(n,0),e.arc(0,0,n,0,xh)}},QX={draw(e,t){const n=gi(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()}},MM=gi(1/3),JX=MM*2,eZ={draw(e,t){const n=gi(t/JX),r=n*MM;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},tZ={draw(e,t){const n=gi(t),r=-n/2;e.rect(r,r,n,n)}},nZ=.8908130915292852,DM=Qd(Jd/10)/Qd(7*Jd/10),rZ=Qd(xh/10)*DM,iZ=-PM(xh/10)*DM,oZ={draw(e,t){const n=gi(t*nZ),r=rZ*n,i=iZ*n;e.moveTo(0,-n),e.lineTo(r,i);for(let o=1;o<5;++o){const a=xh*o/5,s=PM(a),u=Qd(a);e.lineTo(u*n,-s*n),e.lineTo(s*r-u*i,u*r+s*i)}e.closePath()}},Gm=gi(3),aZ={draw(e,t){const n=-gi(t/(Gm*3));e.moveTo(0,n*2),e.lineTo(-Gm*n,-n),e.lineTo(Gm*n,-n),e.closePath()}},Gr=-.5,qr=gi(3)/2,tb=1/gi(12),sZ=(tb/2+1)*3,lZ={draw(e,t){const n=gi(t/sZ),r=n/2,i=n*tb,o=r,a=n*tb+n,s=-o,u=a;e.moveTo(r,i),e.lineTo(o,a),e.lineTo(s,u),e.lineTo(Gr*r-qr*i,qr*r+Gr*i),e.lineTo(Gr*o-qr*a,qr*o+Gr*a),e.lineTo(Gr*s-qr*u,qr*s+Gr*u),e.lineTo(Gr*r+qr*i,Gr*i-qr*r),e.lineTo(Gr*o+qr*a,Gr*a-qr*o),e.lineTo(Gr*s+qr*u,Gr*u-qr*s),e.closePath()}};function uZ(e,t){let n=null,r=Sx(i);e=typeof e=="function"?e:It(e||_x),t=typeof t=="function"?t:It(t===void 0?64:+t);function i(){let o;if(n||(n=o=r()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),o)return n=null,o+""||null}return i.type=function(o){return arguments.length?(e=typeof o=="function"?o:It(o),i):e},i.size=function(o){return arguments.length?(t=typeof o=="function"?o:It(+o),i):t},i.context=function(o){return arguments.length?(n=o??null,i):n},i}function ep(){}function tp(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 jM(e){this._context=e}jM.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:tp(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:tp(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function cZ(e){return new jM(e)}function LM(e){this._context=e}LM.prototype={areaStart:ep,areaEnd:ep,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:tp(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function fZ(e){return new LM(e)}function $M(e){this._context=e}$M.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:tp(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function dZ(e){return new $M(e)}function FM(e){this._context=e}FM.prototype={areaStart:ep,areaEnd:ep,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 pZ(e){return new FM(e)}function IE(e){return e<0?-1:1}function TE(e,t,n){var r=e._x1-e._x0,i=t-e._x1,o=(e._y1-e._y0)/(r||i<0&&-0),a=(n-e._y1)/(i||r<0&&-0),s=(o*i+a*r)/(r+i);return(IE(o)+IE(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(s))||0}function kE(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function qm(e,t,n){var r=e._x0,i=e._y0,o=e._x1,a=e._y1,s=(o-r)/3;e._context.bezierCurveTo(r+s,i+s*t,o-s,a-s*n,o,a)}function np(e){this._context=e}np.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:qm(this,this._t0,kE(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,qm(this,kE(this,n=TE(this,e,t)),n);break;default:qm(this,this._t0,n=TE(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function VM(e){this._context=new BM(e)}(VM.prototype=Object.create(np.prototype)).point=function(e,t){np.prototype.point.call(this,t,e)};function BM(e){this._context=e}BM.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,i,o){this._context.bezierCurveTo(t,e,r,n,o,i)}};function hZ(e){return new np(e)}function gZ(e){return new VM(e)}function zM(e){this._context=e}zM.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=NE(e),i=NE(t),o=0,a=1;a<n;++o,++a)this._context.bezierCurveTo(r[0][o],i[0][o],r[1][o],i[1][o],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 NE(e){var t,n=e.length-1,r,i=new Array(n),o=new Array(n),a=new Array(n);for(i[0]=0,o[0]=2,a[0]=e[0]+2*e[1],t=1;t<n-1;++t)i[t]=1,o[t]=4,a[t]=4*e[t]+2*e[t+1];for(i[n-1]=2,o[n-1]=7,a[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)r=i[t]/o[t-1],o[t]-=r,a[t]-=r*a[t-1];for(i[n-1]=a[n-1]/o[n-1],t=n-2;t>=0;--t)i[t]=(a[t]-i[t+1])/o[t];for(o[n-1]=(e[n]+i[n-1])/2,t=0;t<n-1;++t)o[t]=2*e[t+1]-i[t+1];return[i,o]}function mZ(e){return new zM(e)}function Ch(e,t){this._context=e,this._t=t}Ch.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 vZ(e){return new Ch(e,.5)}function yZ(e){return new Ch(e,0)}function bZ(e){return new Ch(e,1)}function ts(e,t){if((a=e.length)>1)for(var n=1,r,i,o=e[t[0]],a,s=o.length;n<a;++n)for(i=o,o=e[t[n]],r=0;r<s;++r)o[r][1]+=o[r][0]=isNaN(i[r][1])?i[r][0]:i[r][1]}function nb(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function xZ(e,t){return e[t]}function wZ(e){const t=[];return t.key=e,t}function CZ(){var e=It([]),t=nb,n=ts,r=xZ;function i(o){var a=Array.from(e.apply(this,arguments),wZ),s,u=a.length,c=-1,d;for(const p of o)for(s=0,++c;s<u;++s)(a[s][c]=[0,+r(p,a[s].key,c,o)]).data=p;for(s=0,d=Ex(t(a));s<u;++s)a[d[s]].index=s;return n(a,d),a}return i.keys=function(o){return arguments.length?(e=typeof o=="function"?o:It(Array.from(o)),i):e},i.value=function(o){return arguments.length?(r=typeof o=="function"?o:It(+o),i):r},i.order=function(o){return arguments.length?(t=o==null?nb:typeof o=="function"?o:It(Array.from(o)),i):t},i.offset=function(o){return arguments.length?(n=o??ts,i):n},i}function SZ(e,t){if((r=e.length)>0){for(var n,r,i=0,o=e[0].length,a;i<o;++i){for(a=n=0;n<r;++n)a+=e[n][i][1]||0;if(a)for(n=0;n<r;++n)e[n][i][1]/=a}ts(e,t)}}function EZ(e,t){if((i=e.length)>0){for(var n=0,r=e[t[0]],i,o=r.length;n<o;++n){for(var a=0,s=0;a<i;++a)s+=e[a][n][1]||0;r[n][1]+=r[n][0]=-s/2}ts(e,t)}}function _Z(e,t){if(!(!((a=e.length)>0)||!((o=(i=e[t[0]]).length)>0))){for(var n=0,r=1,i,o,a;r<o;++r){for(var s=0,u=0,c=0;s<a;++s){for(var d=e[t[s]],p=d[r][1]||0,g=d[r-1][1]||0,h=(p-g)/2,y=0;y<s;++y){var b=e[t[y]],v=b[r][1]||0,w=b[r-1][1]||0;h+=v-w}u+=p,c+=h*p}i[r-1][1]+=i[r-1][0]=n,u&&(n-=c/u)}i[r-1][1]+=i[r-1][0]=n,ts(e,t)}}var Km={},Ym={},ME;function OZ(){return ME||(ME=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return n==="__proto__"}e.isUnsafeProperty=t})(Ym)),Ym}var Xm={},DE;function WM(){return DE||(DE=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})(Xm)),Xm}var Zm={},jE;function Ox(){return jE||(jE=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})(Zm)),Zm}var Qm={},Jm={},LE;function PZ(){return LE||(LE=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})(Jm)),Jm}var $E;function Px(){return $E||($E=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=PZ(),n=Ox();function r(i){if(Array.isArray(i))return i.map(n.toKey);if(typeof i=="symbol")return[i];i=t.toString(i);const o=[],a=i.length;if(a===0)return o;let s=0,u="",c="",d=!1;for(i.charCodeAt(0)===46&&(o.push(""),s++);s<a;){const p=i[s];c?p==="\\"&&s+1<a?(s++,u+=i[s]):p===c?c="":u+=p:d?p==='"'||p==="'"?c=p:p==="]"?(d=!1,o.push(u),u=""):u+=p:p==="["?(d=!0,u&&(o.push(u),u="")):p==="."?u&&(o.push(u),u=""):u+=p,s++}return u&&o.push(u),o}e.toPath=r})(Qm)),Qm}var FE;function Ax(){return FE||(FE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=OZ(),n=WM(),r=Ox(),i=Px();function o(s,u,c){if(s==null)return c;switch(typeof u){case"string":{if(t.isUnsafeProperty(u))return c;const d=s[u];return d===void 0?n.isDeepKey(u)?o(s,i.toPath(u),c):c:d}case"number":case"symbol":{typeof u=="number"&&(u=r.toKey(u));const d=s[u];return d===void 0?c:d}default:{if(Array.isArray(u))return a(s,u,c);if(Object.is(u?.valueOf(),-0)?u="-0":u=String(u),t.isUnsafeProperty(u))return c;const d=s[u];return d===void 0?c:d}}}function a(s,u,c){if(u.length===0)return c;let d=s;for(let p=0;p<u.length;p++){if(d==null||t.isUnsafeProperty(u[p]))return c;d=d[u[p]]}return d===void 0?c:d}e.get=o})(Km)),Km}var ev,VE;function AZ(){return VE||(VE=1,ev=Ax().get),ev}var RZ=AZ();const gl=fs(RZ);var IZ=4;function Zo(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:IZ,n=10**t,r=Math.round(e*n)/n;return Object.is(r,-0)?0:r}function qt(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((i,o,a)=>{var s=n[a-1];return typeof s=="string"?i+s+o:s!==void 0?i+Zo(s)+o:i+o},"")}var cr=e=>e===0?0:e>0?1:-1,Di=e=>typeof e=="number"&&e!=+e,ns=e=>typeof e=="string"&&e.indexOf("%")===e.length-1,Te=e=>(typeof e=="number"||e instanceof Number)&&!Di(e),ji=e=>Te(e)||typeof e=="string",TZ=0,zu=e=>{var t=++TZ;return"".concat(e||"").concat(t)},fi=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!Te(t)&&typeof t!="string")return r;var o;if(ns(t)){if(n==null)return r;var a=t.indexOf("%");o=n*parseFloat(t.slice(0,a))/100}else o=+t;return Di(o)&&(o=r),i&&n!=null&&o>n&&(o=n),o},HM=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 Tn(e,t,n){return Te(e)&&Te(t)?Zo(e+n*(t-e)):t}function kZ(e,t,n){if(!(!e||!e.length))return e.find(r=>r&&(typeof t=="function"?t(r):gl(r,t))===n)}var pn=e=>e===null||typeof e>"u",dc=e=>pn(e)?e:"".concat(e.charAt(0).toUpperCase()).concat(e.slice(1));function fr(e){return e!=null}function ds(){}var NZ=["type","size","sizeType"];function rb(){return rb=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},rb.apply(null,arguments)}function BE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function zE(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?BE(Object(n),!0).forEach(function(r){MZ(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):BE(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function MZ(e,t,n){return(t=DZ(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function DZ(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 LZ(e,t){if(e==null)return{};var n,r,i=$Z(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function $Z(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 UM={symbolCircle:_x,symbolCross:QX,symbolDiamond:eZ,symbolSquare:tZ,symbolStar:oZ,symbolTriangle:aZ,symbolWye:lZ},FZ=Math.PI/180,VZ=e=>{var t="symbol".concat(dc(e));return UM[t]||_x},BZ=(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*FZ;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}},zZ=(e,t)=>{UM["symbol".concat(dc(e))]=t},GM=e=>{var{type:t="circle",size:n=64,sizeType:r="area"}=e,i=LZ(e,NZ),o=zE(zE({},i),{},{type:t,size:n,sizeType:r}),a="circle";typeof t=="string"&&(a=t);var s=()=>{var g=VZ(a),h=uZ().type(g).size(BZ(n,r,a)),y=h();if(y!==null)return y},{className:u,cx:c,cy:d}=o,p=ti(o);return Te(c)&&Te(d)&&Te(n)?x.createElement("path",rb({},p,{className:Pt("recharts-symbols",u),transform:"translate(".concat(c,", ").concat(d,")"),d:s()})):null};GM.registerSymbol=zZ;var qM=e=>"radius"in e&&"startAngle"in e&&"endAngle"in e,WZ=(e,t)=>{if(!e||typeof e=="function"||typeof e=="boolean")return null;var n=e;if(j.isValidElement(e)&&(n=e.props),typeof n!="object"&&typeof n!="function")return null;var r={};return Object.keys(n).forEach(i=>{wx(i)&&typeof n[i]=="function"&&(r[i]=(o=>n[i](n,o)))}),r},HZ=(e,t,n)=>r=>(e(t,n,r),null),Rx=(e,t,n)=>{if(e===null||typeof e!="object"&&typeof e!="function")return null;var r=null;return Object.keys(e).forEach(i=>{var o=e[i];wx(i)&&typeof o=="function"&&(r||(r={}),r[i]=HZ(o,t,n))}),r};function WE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function UZ(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?WE(Object(n),!0).forEach(function(r){GZ(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):WE(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function GZ(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=KZ(e,"string");return typeof t=="symbol"?t:t+""}function KZ(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 Mr(e,t){var n=UZ({},e),r=t,i=Object.keys(t),o=i.reduce((a,s)=>(a[s]===void 0&&r[s]!==void 0&&(a[s]=r[s]),a),n);return o}var tv={},nv={},HE;function YZ(){return HE||(HE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n,r){const i=new Map;for(let o=0;o<n.length;o++){const a=n[o],s=r(a,o,n);i.has(s)||i.set(s,a)}return Array.from(i.values())}e.uniqBy=t})(nv)),nv}var rv={},UE;function XZ(){return UE||(UE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n,r){return function(...i){return n.apply(this,i.slice(0,r))}}e.ary=t})(rv)),rv}var iv={},GE;function KM(){return GE||(GE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return n}e.identity=t})(iv)),iv}var ov={},av={},sv={},qE;function ZZ(){return qE||(qE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return Number.isSafeInteger(n)&&n>=0}e.isLength=t})(sv)),sv}var KE;function YM(){return KE||(KE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=ZZ();function n(r){return r!=null&&typeof r!="function"&&t.isLength(r.length)}e.isArrayLike=n})(av)),av}var lv={},YE;function QZ(){return YE||(YE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return typeof n=="object"&&n!==null}e.isObjectLike=t})(lv)),lv}var XE;function JZ(){return XE||(XE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=YM(),n=QZ();function r(i){return n.isObjectLike(i)&&t.isArrayLike(i)}e.isArrayLikeObject=r})(ov)),ov}var uv={},cv={},ZE;function eQ(){return ZE||(ZE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Ax();function n(r){return function(i){return t.get(i,r)}}e.property=n})(cv)),cv}var fv={},dv={},pv={},hv={},QE;function XM(){return QE||(QE=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})(hv)),hv}var gv={},JE;function ZM(){return JE||(JE=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})(gv)),gv}var mv={},e_;function QM(){return e_||(e_=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})(mv)),mv}var t_;function tQ(){return t_||(t_=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=XM(),n=ZM(),r=QM();function i(d,p,g){return typeof g!="function"?i(d,p,()=>{}):o(d,p,function h(y,b,v,w,C,E){const _=g(y,b,v,w,C,E);return _!==void 0?!!_:o(y,b,h,E)},new Map)}function o(d,p,g,h){if(p===d)return!0;switch(typeof p){case"object":return a(d,p,g,h);case"function":return Object.keys(p).length>0?o(d,{...p},g,h):r.isEqualsSameValueZero(d,p);default:return t.isObject(d)?typeof p=="string"?p==="":!0:r.isEqualsSameValueZero(d,p)}}function a(d,p,g,h){if(p==null)return!0;if(Array.isArray(p))return u(d,p,g,h);if(p instanceof Map)return s(d,p,g,h);if(p instanceof Set)return c(d,p,g,h);const y=Object.keys(p);if(d==null||n.isPrimitive(d))return y.length===0;if(y.length===0)return!0;if(h?.has(p))return h.get(p)===d;h?.set(p,d);try{for(let b=0;b<y.length;b++){const v=y[b];if(!n.isPrimitive(d)&&!(v in d)||p[v]===void 0&&d[v]!==void 0||p[v]===null&&d[v]!==null||!g(d[v],p[v],v,d,p,h))return!1}return!0}finally{h?.delete(p)}}function s(d,p,g,h){if(p.size===0)return!0;if(!(d instanceof Map))return!1;for(const[y,b]of p.entries()){const v=d.get(y);if(g(v,b,y,d,p,h)===!1)return!1}return!0}function u(d,p,g,h){if(p.length===0)return!0;if(!Array.isArray(d))return!1;const y=new Set;for(let b=0;b<p.length;b++){const v=p[b];let w=!1;for(let C=0;C<d.length;C++){if(y.has(C))continue;const E=d[C];let _=!1;if(g(E,v,b,d,p,h)&&(_=!0),_){y.add(C),w=!0;break}}if(!w)return!1}return!0}function c(d,p,g,h){return p.size===0?!0:d instanceof Set?u([...d],[...p],g,h):!1}e.isMatchWith=i,e.isSetMatch=c})(pv)),pv}var n_;function JM(){return n_||(n_=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=tQ();function n(r,i){return t.isMatchWith(r,i,()=>{})}e.isMatch=n})(dv)),dv}var vv={},yv={},bv={},r_;function nQ(){return r_||(r_=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})(bv)),bv}var xv={},i_;function Ix(){return i_||(i_=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})(xv)),xv}var wv={},o_;function eD(){return o_||(o_=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t="[object RegExp]",n="[object String]",r="[object Number]",i="[object Boolean]",o="[object Arguments]",a="[object Symbol]",s="[object Date]",u="[object Map]",c="[object Set]",d="[object Array]",p="[object Function]",g="[object ArrayBuffer]",h="[object Object]",y="[object Error]",b="[object DataView]",v="[object Uint8Array]",w="[object Uint8ClampedArray]",C="[object Uint16Array]",E="[object Uint32Array]",_="[object BigUint64Array]",P="[object Int8Array]",R="[object Int16Array]",I="[object Int32Array]",k="[object BigInt64Array]",B="[object Float32Array]",L="[object Float64Array]";e.argumentsTag=o,e.arrayBufferTag=g,e.arrayTag=d,e.bigInt64ArrayTag=k,e.bigUint64ArrayTag=_,e.booleanTag=i,e.dataViewTag=b,e.dateTag=s,e.errorTag=y,e.float32ArrayTag=B,e.float64ArrayTag=L,e.functionTag=p,e.int16ArrayTag=R,e.int32ArrayTag=I,e.int8ArrayTag=P,e.mapTag=u,e.numberTag=r,e.objectTag=h,e.regexpTag=t,e.setTag=c,e.stringTag=n,e.symbolTag=a,e.uint16ArrayTag=C,e.uint32ArrayTag=E,e.uint8ArrayTag=v,e.uint8ClampedArrayTag=w})(wv)),wv}var Cv={},a_;function rQ(){return a_||(a_=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return ArrayBuffer.isView(n)&&!(n instanceof DataView)}e.isTypedArray=t})(Cv)),Cv}var s_;function tD(){return s_||(s_=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=nQ(),n=Ix(),r=eD(),i=ZM(),o=rQ();function a(d,p){return s(d,void 0,d,new Map,p)}function s(d,p,g,h=new Map,y=void 0){const b=y?.(d,p,g,h);if(b!==void 0)return b;if(i.isPrimitive(d))return d;if(h.has(d))return h.get(d);if(Array.isArray(d)){const v=new Array(d.length);h.set(d,v);for(let w=0;w<d.length;w++)v[w]=s(d[w],w,g,h,y);return Object.hasOwn(d,"index")&&(v.index=d.index),Object.hasOwn(d,"input")&&(v.input=d.input),v}if(d instanceof Date)return new Date(d.getTime());if(d instanceof RegExp){const v=new RegExp(d.source,d.flags);return v.lastIndex=d.lastIndex,v}if(d instanceof Map){const v=new Map;h.set(d,v);for(const[w,C]of d)v.set(w,s(C,w,g,h,y));return v}if(d instanceof Set){const v=new Set;h.set(d,v);for(const w of d)v.add(s(w,void 0,g,h,y));return v}if(typeof Buffer<"u"&&Buffer.isBuffer(d))return d.subarray();if(o.isTypedArray(d)){const v=new(Object.getPrototypeOf(d)).constructor(d.length);h.set(d,v);for(let w=0;w<d.length;w++)v[w]=s(d[w],w,g,h,y);return v}if(d instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&d instanceof SharedArrayBuffer)return d.slice(0);if(d instanceof DataView){const v=new DataView(d.buffer.slice(0),d.byteOffset,d.byteLength);return h.set(d,v),u(v,d,g,h,y),v}if(typeof File<"u"&&d instanceof File){const v=new File([d],d.name,{type:d.type});return h.set(d,v),u(v,d,g,h,y),v}if(typeof Blob<"u"&&d instanceof Blob){const v=new Blob([d],{type:d.type});return h.set(d,v),u(v,d,g,h,y),v}if(d instanceof Error){const v=structuredClone(d);return h.set(d,v),v.message=d.message,v.name=d.name,v.stack=d.stack,v.cause=d.cause,v.constructor=d.constructor,u(v,d,g,h,y),v}if(d instanceof Boolean){const v=new Boolean(d.valueOf());return h.set(d,v),u(v,d,g,h,y),v}if(d instanceof Number){const v=new Number(d.valueOf());return h.set(d,v),u(v,d,g,h,y),v}if(d instanceof String){const v=new String(d.valueOf());return h.set(d,v),u(v,d,g,h,y),v}if(typeof d=="object"&&c(d)){const v=Object.create(Object.getPrototypeOf(d));return h.set(d,v),u(v,d,g,h,y),v}return d}function u(d,p,g=d,h,y){const b=[...Object.keys(p),...t.getSymbols(p)];for(let v=0;v<b.length;v++){const w=b[v],C=Object.getOwnPropertyDescriptor(d,w);(C==null||C.writable)&&(d[w]=s(p[w],w,g,h,y))}}function c(d){switch(n.getTag(d)){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=u})(yv)),yv}var l_;function iQ(){return l_||(l_=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=tD();function n(r){return t.cloneDeepWithImpl(r,void 0,r,new Map,void 0)}e.cloneDeep=n})(vv)),vv}var u_;function oQ(){return u_||(u_=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=JM(),n=iQ();function r(i){return i=n.cloneDeep(i),o=>t.isMatch(o,i)}e.matches=r})(fv)),fv}var Sv={},Ev={},_v={},c_;function aQ(){return c_||(c_=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=tD(),n=Ix(),r=eD();function i(o,a){return t.cloneDeepWith(o,(s,u,c,d)=>{const p=a?.(s,u,c,d);if(p!==void 0)return p;if(typeof o=="object"){if(n.getTag(o)===r.objectTag&&typeof o.constructor!="function"){const g={};return d.set(o,g),t.copyProperties(g,o,c,d),g}switch(Object.prototype.toString.call(o)){case r.numberTag:case r.stringTag:case r.booleanTag:{const g=new o.constructor(o?.valueOf());return t.copyProperties(g,o),g}case r.argumentsTag:{const g={};return t.copyProperties(g,o),g.length=o.length,g[Symbol.iterator]=o[Symbol.iterator],g}default:return}}})}e.cloneDeepWith=i})(_v)),_v}var f_;function sQ(){return f_||(f_=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=aQ();function n(r){return t.cloneDeepWith(r)}e.cloneDeep=n})(Ev)),Ev}var Ov={},Pv={},d_;function nD(){return d_||(d_=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=/^(?:0|[1-9]\d*)$/;function n(r,i=Number.MAX_SAFE_INTEGER){switch(typeof r){case"number":return Number.isInteger(r)&&r>=0&&r<i;case"symbol":return!1;case"string":return t.test(r)}}e.isIndex=n})(Pv)),Pv}var Av={},p_;function lQ(){return p_||(p_=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Ix();function n(r){return r!==null&&typeof r=="object"&&t.getTag(r)==="[object Arguments]"}e.isArguments=n})(Av)),Av}var h_;function uQ(){return h_||(h_=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=WM(),n=nD(),r=lQ(),i=Px();function o(a,s){let u;if(Array.isArray(s)?u=s:typeof s=="string"&&t.isDeepKey(s)&&a?.[s]==null?u=i.toPath(s):u=[s],u.length===0)return!1;let c=a;for(let d=0;d<u.length;d++){const p=u[d];if((c==null||!Object.hasOwn(c,p))&&!((Array.isArray(c)||r.isArguments(c))&&n.isIndex(p)&&p<c.length))return!1;c=c[p]}return!0}e.has=o})(Ov)),Ov}var g_;function cQ(){return g_||(g_=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=JM(),n=Ox(),r=sQ(),i=Ax(),o=uQ();function a(s,u){switch(typeof s){case"object":{Object.is(s?.valueOf(),-0)&&(s="-0");break}case"number":{s=n.toKey(s);break}}return u=r.cloneDeep(u),function(c){const d=i.get(c,s);return d===void 0?o.has(c,s):u===void 0?d===void 0:t.isMatch(d,u)}}e.matchesProperty=a})(Sv)),Sv}var m_;function fQ(){return m_||(m_=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=KM(),n=eQ(),r=oQ(),i=cQ();function o(a){if(a==null)return t.identity;switch(typeof a){case"function":return a;case"object":return Array.isArray(a)&&a.length===2?i.matchesProperty(a[0],a[1]):r.matches(a);case"string":case"symbol":case"number":return n.property(a)}}e.iteratee=o})(uv)),uv}var v_;function dQ(){return v_||(v_=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=YZ(),n=XZ(),r=KM(),i=JZ(),o=fQ();function a(s,u=r.identity){return i.isArrayLikeObject(s)?t.uniqBy(Array.from(s),n.ary(o.iteratee(u),1)):[]}e.uniqBy=a})(tv)),tv}var Rv,y_;function pQ(){return y_||(y_=1,Rv=dQ().uniqBy),Rv}var hQ=pQ();const b_=fs(hQ);function gQ(e,t,n){return t===!0?b_(e,n):typeof t=="function"?b_(e,t):e}var Tx=j.createContext(null),mQ=e=>e,Ht=()=>{var e=j.useContext(Tx);return e?e.store.dispatch:mQ},Od=()=>{},vQ=()=>Od,yQ=(e,t)=>e===t;function Le(e){var t=j.useContext(Tx),n=j.useMemo(()=>t?r=>{if(r!=null)return e(r)}:Od,[t,e]);return aT.useSyncExternalStoreWithSelector(t?t.subscription.addNestedSub:vQ,t?t.store.getState:Od,t?t.store.getState:Od,n,yQ)}var Iv={},Tv={},kv={},x_;function bQ(){return x_||(x_=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,i,o)=>{if(r!==i){const a=t(r),s=t(i);if(a===s&&a===0){if(r<i)return o==="desc"?1:-1;if(r>i)return o==="desc"?-1:1}return o==="desc"?s-a:a-s}return 0};e.compareValues=n})(kv)),kv}var Nv={},Mv={},w_;function rD(){return w_||(w_=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return typeof n=="symbol"||n instanceof Symbol}e.isSymbol=t})(Mv)),Mv}var C_;function xQ(){return C_||(C_=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=rD(),n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,r=/^\w*$/;function i(o,a){return Array.isArray(o)?!1:typeof o=="number"||typeof o=="boolean"||o==null||t.isSymbol(o)?!0:typeof o=="string"&&(r.test(o)||!n.test(o))||a!=null&&Object.hasOwn(a,o)}e.isKey=i})(Nv)),Nv}var S_;function wQ(){return S_||(S_=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=bQ(),n=xQ(),r=Px();function i(o,a,s,u){if(o==null)return[];s=u?void 0:s,Array.isArray(o)||(o=Object.values(o)),Array.isArray(a)||(a=a==null?[null]:[a]),a.length===0&&(a=[null]),Array.isArray(s)||(s=s==null?[]:[s]),s=s.map(h=>String(h));const c=(h,y)=>{let b=h;for(let v=0;v<y.length&&b!=null;++v)b=b[y[v]];return b},d=(h,y)=>y==null||h==null?y:typeof h=="object"&&"key"in h?Object.hasOwn(y,h.key)?y[h.key]:c(y,h.path):typeof h=="function"?h(y):Array.isArray(h)?c(y,h):typeof y=="object"?y[h]:y,p=a.map(h=>(Array.isArray(h)&&h.length===1&&(h=h[0]),h==null||typeof h=="function"||Array.isArray(h)||n.isKey(h)?h:{key:h,path:r.toPath(h)}));return o.map(h=>({original:h,criteria:p.map(y=>d(y,h))})).slice().sort((h,y)=>{for(let b=0;b<p.length;b++){const v=t.compareValues(h.criteria[b],y.criteria[b],s[b]);if(v!==0)return v}return 0}).map(h=>h.original)}e.orderBy=i})(Tv)),Tv}var Dv={},E_;function CQ(){return E_||(E_=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n,r=1){const i=[],o=Math.floor(r),a=(s,u)=>{for(let c=0;c<s.length;c++){const d=s[c];Array.isArray(d)&&u<o?a(d,u+1):i.push(d)}};return a(n,0),i}e.flatten=t})(Dv)),Dv}var jv={},__;function iD(){return __||(__=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=nD(),n=YM(),r=XM(),i=QM();function o(a,s,u){return r.isObject(u)&&(typeof s=="number"&&n.isArrayLike(u)&&t.isIndex(s)&&s<u.length||typeof s=="string"&&s in u)?i.isEqualsSameValueZero(u[s],a):!1}e.isIterateeCall=o})(jv)),jv}var O_;function SQ(){return O_||(O_=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=wQ(),n=CQ(),r=iD();function i(o,...a){const s=a.length;return s>1&&r.isIterateeCall(o,a[0],a[1])?a=[]:s>2&&r.isIterateeCall(a[0],a[1],a[2])&&(a=[a[0]]),t.orderBy(o,n.flatten(a),["asc"])}e.sortBy=i})(Iv)),Iv}var Lv,P_;function EQ(){return P_||(P_=1,Lv=SQ().sortBy),Lv}var _Q=EQ();const Sh=fs(_Q);var oD=e=>e.legend.settings,OQ=e=>e.legend.size,PQ=e=>e.legend.payload;q([PQ,oD],(e,t)=>{var{itemSorter:n}=t,r=e.flat(1);return n?Sh(r,n):r});var id=1;function AQ(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],[t,n]=j.useState({height:0,left:0,top:0,width:0}),r=j.useCallback(i=>{if(i!=null){var o=i.getBoundingClientRect(),a={height:o.height,left:o.left,top:o.top,width:o.width};(Math.abs(a.height-t.height)>id||Math.abs(a.left-t.left)>id||Math.abs(a.top-t.top)>id||Math.abs(a.width-t.width)>id)&&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 Rn(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 RQ=typeof Symbol=="function"&&Symbol.observable||"@@observable",A_=RQ,$v=()=>Math.random().toString(36).substring(7).split("").join("."),IQ={INIT:`@@redux/INIT${$v()}`,REPLACE:`@@redux/REPLACE${$v()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${$v()}`},Ga=IQ;function pc(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 TQ(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(MQ(e))return"date";if(NQ(e))return"error";const n=kQ(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 kQ(e){return typeof e.constructor=="function"?e.constructor.name:null}function NQ(e){return e instanceof Error||typeof e.message=="string"&&e.constructor&&typeof e.constructor.stackTraceLimit=="number"}function MQ(e){return e instanceof Date?!0:typeof e.toDateString=="function"&&typeof e.getDate=="function"&&typeof e.setDate=="function"}function Ho(e){let t=typeof e;return process.env.NODE_ENV!=="production"&&(t=TQ(e)),t}function aD(e,t,n){if(typeof e!="function")throw new Error(process.env.NODE_ENV==="production"?Rn(2):`Expected the root reducer to be a function. Instead, received: '${Ho(e)}'`);if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(process.env.NODE_ENV==="production"?Rn(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"?Rn(1):`Expected the enhancer to be a function. Instead, received: '${Ho(n)}'`);return n(aD)(e,t)}let r=e,i=t,o=new Map,a=o,s=0,u=!1;function c(){a===o&&(a=new Map,o.forEach((v,w)=>{a.set(w,v)}))}function d(){if(u)throw new Error(process.env.NODE_ENV==="production"?Rn(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 i}function p(v){if(typeof v!="function")throw new Error(process.env.NODE_ENV==="production"?Rn(4):`Expected the listener to be a function. Instead, received: '${Ho(v)}'`);if(u)throw new Error(process.env.NODE_ENV==="production"?Rn(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 w=!0;c();const C=s++;return a.set(C,v),function(){if(w){if(u)throw new Error(process.env.NODE_ENV==="production"?Rn(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.");w=!1,c(),a.delete(C),o=null}}}function g(v){if(!pc(v))throw new Error(process.env.NODE_ENV==="production"?Rn(7):`Actions must be plain objects. Instead, the actual type was: '${Ho(v)}'. 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 v.type>"u")throw new Error(process.env.NODE_ENV==="production"?Rn(8):'Actions may not have an undefined "type" property. You may have misspelled an action type string constant.');if(typeof v.type!="string")throw new Error(process.env.NODE_ENV==="production"?Rn(17):`Action "type" property must be a string. Instead, the actual type was: '${Ho(v.type)}'. Value was: '${v.type}' (stringified)`);if(u)throw new Error(process.env.NODE_ENV==="production"?Rn(9):"Reducers may not dispatch actions.");try{u=!0,i=r(i,v)}finally{u=!1}return(o=a).forEach(C=>{C()}),v}function h(v){if(typeof v!="function")throw new Error(process.env.NODE_ENV==="production"?Rn(10):`Expected the nextReducer to be a function. Instead, received: '${Ho(v)}`);r=v,g({type:Ga.REPLACE})}function y(){const v=p;return{subscribe(w){if(typeof w!="object"||w===null)throw new Error(process.env.NODE_ENV==="production"?Rn(11):`Expected the observer to be an object. Instead, received: '${Ho(w)}'`);function C(){const _=w;_.next&&_.next(d())}return C(),{unsubscribe:v(C)}},[A_](){return this}}}return g({type:Ga.INIT}),{dispatch:g,subscribe:p,getState:d,replaceReducer:h,[A_]:y}}function R_(e){typeof console<"u"&&typeof console.error=="function"&&console.error(e);try{throw new Error(e)}catch{}}function DQ(e,t,n,r){const i=Object.keys(t),o=n&&n.type===Ga.INIT?"preloadedState argument passed to createStore":"previous state received by the reducer";if(i.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(!pc(e))return`The ${o} has unexpected type of "${Ho(e)}". Expected argument to be an object with the following keys: "${i.join('", "')}"`;const a=Object.keys(e).filter(s=>!t.hasOwnProperty(s)&&!r[s]);if(a.forEach(s=>{r[s]=!0}),!(n&&n.type===Ga.REPLACE)&&a.length>0)return`Unexpected ${a.length>1?"keys":"key"} "${a.join('", "')}" found in ${o}. Expected to find one of the known reducer keys instead: "${i.join('", "')}". Unexpected keys will be ignored.`}function jQ(e){Object.keys(e).forEach(t=>{const n=e[t];if(typeof n(void 0,{type:Ga.INIT})>"u")throw new Error(process.env.NODE_ENV==="production"?Rn(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:Ga.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(process.env.NODE_ENV==="production"?Rn(13):`The slice reducer for key "${t}" returned undefined when probed with a random type. Don't try to handle '${Ga.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 sD(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"&&R_(`No reducer provided for key "${s}"`),typeof e[s]=="function"&&(n[s]=e[s])}const r=Object.keys(n);let i;process.env.NODE_ENV!=="production"&&(i={});let o;try{jQ(n)}catch(a){o=a}return function(s={},u){if(o)throw o;if(process.env.NODE_ENV!=="production"){const p=DQ(s,n,u,i);p&&R_(p)}let c=!1;const d={};for(let p=0;p<r.length;p++){const g=r[p],h=n[g],y=s[g],b=h(y,u);if(typeof b>"u"){const v=u&&u.type;throw new Error(process.env.NODE_ENV==="production"?Rn(14):`When called with an action of type ${v?`"${String(v)}"`:"(unknown type)"}, the slice reducer for key "${g}" 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.`)}d[g]=b,c=c||b!==y}return c=c||r.length!==Object.keys(s).length,c?d:s}}function rp(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,n)=>(...r)=>t(n(...r)))}function LQ(...e){return t=>(n,r)=>{const i=t(n,r);let o=()=>{throw new Error(process.env.NODE_ENV==="production"?Rn(15):"Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch.")};const a={getState:i.getState,dispatch:(u,...c)=>o(u,...c)},s=e.map(u=>u(a));return o=rp(...s)(i.dispatch),{...i,dispatch:o}}}function kx(e){return pc(e)&&"type"in e&&typeof e.type=="string"}var lD=Symbol.for("immer-nothing"),I_=Symbol.for("immer-draftable"),Jn=Symbol.for("immer-state"),$Q=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 _r(e,...t){if(process.env.NODE_ENV!=="production"){const n=$Q[e],r=Ba(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 Pr=Object,ml=Pr.getPrototypeOf,ip="constructor",Eh="prototype",ib="configurable",op="enumerable",Pd="writable",Wu="value",po=e=>!!e&&!!e[Jn];function di(e){return e?uD(e)||Oh(e)||!!e[I_]||!!e[ip]?.[I_]||Ph(e)||Ah(e):!1}var FQ=Pr[Eh][ip].toString(),T_=new WeakMap;function uD(e){if(!e||!Nx(e))return!1;const t=ml(e);if(t===null||t===Pr[Eh])return!0;const n=Pr.hasOwnProperty.call(t,ip)&&t[ip];if(n===Object)return!0;if(!Ba(n))return!1;let r=T_.get(n);return r===void 0&&(r=Function.toString.call(n),T_.set(n,r)),r===FQ}function _h(e,t,n=!0){hc(e)===0?(n?Reflect.ownKeys(e):Pr.keys(e)).forEach(i=>{t(i,e[i],e)}):e.forEach((r,i)=>t(i,r,e))}function hc(e){const t=e[Jn];return t?t.type_:Oh(e)?1:Ph(e)?2:Ah(e)?3:0}var k_=(e,t,n=hc(e))=>n===2?e.has(t):Pr[Eh].hasOwnProperty.call(e,t),ob=(e,t,n=hc(e))=>n===2?e.get(t):e[t],ap=(e,t,n,r=hc(e))=>{r===2?e.set(t,n):r===3?e.add(n):e[t]=n};function VQ(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var Oh=Array.isArray,Ph=e=>e instanceof Map,Ah=e=>e instanceof Set,Nx=e=>typeof e=="object",Ba=e=>typeof e=="function",Fv=e=>typeof e=="boolean";function BQ(e){const t=+e;return Number.isInteger(t)&&String(t)===e}var to=e=>e.copy_||e.base_,Mx=e=>e.modified_?e.copy_:e.base_;function ab(e,t){if(Ph(e))return new Map(e);if(Ah(e))return new Set(e);if(Oh(e))return Array[Eh].slice.call(e);const n=uD(e);if(t===!0||t==="class_only"&&!n){const r=Pr.getOwnPropertyDescriptors(e);delete r[Jn];let i=Reflect.ownKeys(r);for(let o=0;o<i.length;o++){const a=i[o],s=r[a];s[Pd]===!1&&(s[Pd]=!0,s[ib]=!0),(s.get||s.set)&&(r[a]={[ib]:!0,[Pd]:!0,[op]:s[op],[Wu]:e[a]})}return Pr.create(ml(e),r)}else{const r=ml(e);if(r!==null&&n)return{...e};const i=Pr.create(r);return Pr.assign(i,e)}}function Dx(e,t=!1){return Rh(e)||po(e)||!di(e)||(hc(e)>1&&Pr.defineProperties(e,{set:od,add:od,clear:od,delete:od}),Pr.freeze(e),t&&_h(e,(n,r)=>{Dx(r,!0)},!1)),e}function zQ(){_r(2)}var od={[Wu]:zQ};function Rh(e){return e===null||!Nx(e)?!0:Pr.isFrozen(e)}var sp="MapSet",sb="Patches",N_="ArrayMethods",cD={};function rs(e){const t=cD[e];return t||_r(0,e),t}var M_=e=>!!cD[e],Hu,fD=()=>Hu,WQ=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:M_(sp)?rs(sp):void 0,arrayMethodsPlugin_:M_(N_)?rs(N_):void 0});function D_(e,t){t&&(e.patchPlugin_=rs(sb),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function lb(e){ub(e),e.drafts_.forEach(HQ),e.drafts_=null}function ub(e){e===Hu&&(Hu=e.parent_)}var j_=e=>Hu=WQ(Hu,e);function HQ(e){const t=e[Jn];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function L_(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];if(e!==void 0&&e!==n){n[Jn].modified_&&(lb(t),_r(4)),di(e)&&(e=$_(t,e));const{patchPlugin_:i}=t;i&&i.generateReplacementPatches_(n[Jn].base_,e,t)}else e=$_(t,n);return UQ(t,e,!0),lb(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==lD?e:void 0}function $_(e,t){if(Rh(t))return t;const n=t[Jn];if(!n)return lp(t,e.handledSet_,e);if(!Ih(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);hD(n,e)}return n.copy_}function UQ(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Dx(t,n)}function dD(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var Ih=(e,t)=>e.scope_===t,GQ=[];function pD(e,t,n,r){const i=to(e),o=e.type_;if(r!==void 0&&ob(i,r,o)===t){ap(i,r,n,o);return}if(!e.draftLocations_){const s=e.draftLocations_=new Map;_h(i,(u,c)=>{if(po(c)){const d=s.get(c)||[];d.push(u),s.set(c,d)}})}const a=e.draftLocations_.get(t)??GQ;for(const s of a)ap(i,s,n,o)}function qQ(e,t,n){e.callbacks_.push(function(i){const o=t;if(!o||!Ih(o,i))return;i.mapSetPlugin_?.fixSetContents(o);const a=Mx(o);pD(e,o.draft_??o,a,n),hD(o,i)})}function hD(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 i=r.getPath(e);i&&r.generatePatches_(e,i,t)}dD(e)}}function KQ(e,t,n){const{scope_:r}=e;if(po(n)){const i=n[Jn];Ih(i,r)&&i.callbacks_.push(function(){Ad(e);const a=Mx(i);pD(e,n,a,t)})}else di(n)&&e.callbacks_.push(function(){const o=to(e);e.type_===3?o.has(n)&&lp(n,r.handledSet_,r):ob(o,t,e.type_)===n&&r.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&lp(ob(e.copy_,t,e.type_),r.handledSet_,r)})}function lp(e,t,n){return!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1||po(e)||t.has(e)||!di(e)||Rh(e)||(t.add(e),_h(e,(r,i)=>{if(po(i)){const o=i[Jn];if(Ih(o,n)){const a=Mx(o);ap(e,r,a,e.type_),dD(o)}}else di(i)&&lp(i,t,n)})),e}function YQ(e,t){const n=Oh(e),r={type_:n?1:0,scope_:t?t.scope_:fD(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0};let i=r,o=up;n&&(i=[r],o=Uu);const{revoke:a,proxy:s}=Proxy.revocable(i,o);return r.draft_=s,r.revoke_=a,[s,r]}var up={get(e,t){if(t===Jn)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 i=to(e);if(!k_(i,t,e.type_))return XQ(e,i,t);const o=i[t];if(e.finalized_||!di(o)||r&&e.operationMethod&&n?.isMutatingArrayMethod(e.operationMethod)&&BQ(t))return o;if(o===Vv(e.base_,t)){Ad(e);const a=e.type_===1?+t:t,s=fb(e.scope_,o,e,a);return e.copy_[a]=s}return o},has(e,t){return t in to(e)},ownKeys(e){return Reflect.ownKeys(to(e))},set(e,t,n){const r=gD(to(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const i=Vv(to(e),t),o=i?.[Jn];if(o&&o.base_===n)return e.copy_[t]=n,e.assigned_.set(t,!1),!0;if(VQ(n,i)&&(n!==void 0||k_(e.base_,t,e.type_)))return!0;Ad(e),cb(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),KQ(e,t,n)),!0},deleteProperty(e,t){return Ad(e),Vv(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),cb(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=to(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{[Pd]:!0,[ib]:e.type_!==1||t!=="length",[op]:r[op],[Wu]:n[t]}},defineProperty(){_r(11)},getPrototypeOf(e){return ml(e.base_)},setPrototypeOf(){_r(12)}},Uu={};for(let e in up){let t=up[e];Uu[e]=function(){const n=arguments;return n[0]=n[0][0],t.apply(this,n)}}Uu.deleteProperty=function(e,t){return process.env.NODE_ENV!=="production"&&isNaN(parseInt(t))&&_r(13),Uu.set.call(this,e,t,void 0)};Uu.set=function(e,t,n){return process.env.NODE_ENV!=="production"&&t!=="length"&&isNaN(parseInt(t))&&_r(14),up.set.call(this,e[0],t,n,e[0])};function Vv(e,t){const n=e[Jn];return(n?to(n):e)[t]}function XQ(e,t,n){const r=gD(t,n);return r?Wu in r?r[Wu]:r.get?.call(e.draft_):void 0}function gD(e,t){if(!(t in e))return;let n=ml(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=ml(n)}}function cb(e){e.modified_||(e.modified_=!0,e.parent_&&cb(e.parent_))}function Ad(e){e.copy_||(e.assigned_=new Map,e.copy_=ab(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var ZQ=class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(n,r,i)=>{if(Ba(n)&&!Ba(r)){const a=r;r=n;const s=this;return function(c=a,...d){return s.produce(c,p=>r.call(this,p,...d))}}Ba(r)||_r(6),i!==void 0&&!Ba(i)&&_r(7);let o;if(di(n)){const a=j_(this),s=fb(a,n,void 0);let u=!0;try{o=r(s),u=!1}finally{u?lb(a):ub(a)}return D_(a,i),L_(o,a)}else if(!n||!Nx(n)){if(o=r(n),o===void 0&&(o=n),o===lD&&(o=void 0),this.autoFreeze_&&Dx(o,!0),i){const a=[],s=[];rs(sb).generateReplacementPatches_(n,o,{patches_:a,inversePatches_:s}),i(a,s)}return o}else _r(1,n)},this.produceWithPatches=(n,r)=>{if(Ba(n))return(s,...u)=>this.produceWithPatches(s,c=>n(c,...u));let i,o;return[this.produce(n,r,(s,u)=>{i=s,o=u}),i,o]},Fv(t?.autoFreeze)&&this.setAutoFreeze(t.autoFreeze),Fv(t?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(t.useStrictShallowCopy),Fv(t?.useStrictIteration)&&this.setUseStrictIteration(t.useStrictIteration)}createDraft(t){di(t)||_r(8),po(t)&&(t=Qr(t));const n=j_(this),r=fb(n,t,void 0);return r[Jn].isManual_=!0,ub(n),r}finishDraft(t,n){const r=t&&t[Jn];(!r||!r.isManual_)&&_r(9);const{scope_:i}=r;return D_(i,n),L_(void 0,i)}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 o=n[r];if(o.path.length===0&&o.op==="replace"){t=o.value;break}}r>-1&&(n=n.slice(r+1));const i=rs(sb).applyPatches_;return po(t)?i(t,n):this.produce(t,o=>i(o,n))}};function fb(e,t,n,r){const[i,o]=Ph(t)?rs(sp).proxyMap_(t,n):Ah(t)?rs(sp).proxySet_(t,n):YQ(t,n);return(n?.scope_??fD()).drafts_.push(i),o.callbacks_=n?.callbacks_??[],o.key_=r,n&&r!==void 0?qQ(n,o,r):o.callbacks_.push(function(u){u.mapSetPlugin_?.fixSetContents(o);const{patchPlugin_:c}=u;o.modified_&&c&&c.generatePatches_(o,[],u)}),i}function Qr(e){return po(e)||_r(10,e),mD(e)}function mD(e){if(!di(e)||Rh(e))return e;const t=e[Jn];let n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=ab(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=ab(e,!0);return _h(n,(i,o)=>{ap(n,i,mD(o))},r),t&&(t.finalized_=!1),n}var QQ=new ZQ,vD=QQ.produce;function yD(e){return({dispatch:n,getState:r})=>i=>o=>typeof o=="function"?o(n,r,e):i(o)}var JQ=yD(),eJ=yD,tJ=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?rp:rp.apply(null,arguments)},nJ=e=>e&&typeof e.match=="function";function Tr(e,t){function n(...r){if(t){let i=t(...r);if(!i)throw new Error(process.env.NODE_ENV==="production"?mt(0):"prepareAction did not return an object");return{type:e,payload:i.payload,..."meta"in i&&{meta:i.meta},..."error"in i&&{error:i.error}}}return{type:e,payload:r[0]}}return n.toString=()=>`${e}`,n.type=e,n.match=r=>kx(r)&&r.type===e,n}function rJ(e){return typeof e=="function"&&"type"in e&&nJ(e)}function iJ(e){const t=e?`${e}`.split("/"):[],n=t[t.length-1]||"actionCreator";return`Detected an action creator with type "${e||"unknown"}" being dispatched.
188
+ 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 oJ(e={}){if(process.env.NODE_ENV==="production")return()=>n=>r=>n(r);const{isActionCreator:t=rJ}=e;return()=>n=>r=>(t(r)&&console.warn(iJ(r.type)),n(r))}function bD(e,t){let n=0;return{measureTime(r){const i=Date.now();try{return r()}finally{const o=Date.now();n+=o-i}},warnIfExceeded(){n>e&&console.warn(`${t} took ${n}ms, which is more than the warning threshold of ${e}ms.
170
189
  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,`
190
+ It is disabled in production builds, so you don't need to worry about that.`)}}}var xD=class _u extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,_u.prototype)}static get[Symbol.species](){return _u}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new _u(...t[0].concat(this)):new _u(...t.concat(this))}};function F_(e){return di(e)?vD(e,()=>{}):e}function ad(e,t,n){return e.has(t)?e.get(t):e.set(t,n(t)).get(t)}function aJ(e){return typeof e!="object"||e==null||Object.isFrozen(e)}function sJ(e,t,n){const r=wD(e,t,n);return{detectMutations(){return CD(e,t,r,n)}}}function wD(e,t=[],n,r="",i=new Set){const o={value:n};if(!e(n)&&!i.has(n)){i.add(n),o.children={};const a=t.length>0;for(const s in n){const u=r?r+"."+s:s;a&&t.some(d=>d instanceof RegExp?d.test(u):u===d)||(o.children[s]=wD(e,t,n[s],u))}}return o}function CD(e,t=[],n,r,i=!1,o=""){const a=n?n.value:void 0,s=a===r;if(i&&!s&&!Number.isNaN(r))return{wasMutated:!0,path:o};if(e(a)||e(r))return{wasMutated:!1};const u={};for(let d in n.children)u[d]=!0;for(let d in r)u[d]=!0;const c=t.length>0;for(let d in u){const p=o?o+"."+d:d;if(c&&t.some(y=>y instanceof RegExp?y.test(p):p===y))continue;const g=CD(e,t,n.children[d],r[d],s,p);if(g.wasMutated)return g}return{wasMutated:!1}}function lJ(e={}){if(process.env.NODE_ENV==="production")return()=>t=>n=>t(n);{let t=function(s,u,c,d){return JSON.stringify(s,n(u,d),c)},n=function(s,u){let c=[],d=[];return u||(u=function(p,g){return c[0]===g?"[Circular ~]":"[Circular ~."+d.slice(0,c.indexOf(g)).join(".")+"]"}),function(p,g){if(c.length>0){var h=c.indexOf(this);~h?c.splice(h+1):c.push(this),~h?d.splice(h,1/0,p):d.push(p),~c.indexOf(g)&&(g=u.call(this,p,g))}else c.push(g);return s==null?g:s.call(this,p,g)}},{isImmutable:r=aJ,ignoredPaths:i,warnAfter:o=32}=e;const a=sJ.bind(null,r,i);return({getState:s})=>{let u=s(),c=a(u),d;return p=>g=>{const h=bD(o,"ImmutableStateInvariantMiddleware");h.measureTime(()=>{if(u=s(),d=c.detectMutations(),c=a(u),d.wasMutated)throw new Error(process.env.NODE_ENV==="production"?mt(19):`A state mutation was detected between dispatches, in the path '${d.path||""}'. This may cause incorrect behavior. (https://redux.js.org/style-guide/style-guide#do-not-mutate-state)`)});const y=p(g);return h.measureTime(()=>{if(u=s(),d=c.detectMutations(),c=a(u),d.wasMutated)throw new Error(process.env.NODE_ENV==="production"?mt(20):`A state mutation was detected inside a dispatch, in the path: ${d.path||""}. Take a look at the reducer(s) handling the action ${t(g)}. (https://redux.js.org/style-guide/style-guide#do-not-mutate-state)`)}),h.warnIfExceeded(),y}}}}function SD(e){const t=typeof e;return e==null||t==="string"||t==="boolean"||t==="number"||Array.isArray(e)||pc(e)}function db(e,t="",n=SD,r,i=[],o){let a;if(!n(e))return{keyPath:t||"<root>",value:e};if(typeof e!="object"||e===null||o?.has(e))return!1;const s=r!=null?r(e):Object.entries(e),u=i.length>0;for(const[c,d]of s){const p=t?t+"."+c:c;if(!(u&&i.some(h=>h instanceof RegExp?h.test(p):p===h))){if(!n(d))return{keyPath:p,value:d};if(typeof d=="object"&&(a=db(d,p,n,r,i,o),a))return a}}return o&&ED(e)&&o.add(e),!1}function ED(e){if(!Object.isFrozen(e))return!1;for(const t of Object.values(e))if(!(typeof t!="object"||t===null)&&!ED(t))return!1;return!0}function uJ(e={}){if(process.env.NODE_ENV==="production")return()=>t=>n=>t(n);{const{isSerializable:t=SD,getEntries:n,ignoredActions:r=[],ignoredActionPaths:i=["meta.arg","meta.baseQueryMeta"],ignoredPaths:o=[],warnAfter:a=32,ignoreState:s=!1,ignoreActions:u=!1,disableCache:c=!1}=e,d=!c&&WeakSet?new WeakSet:void 0;return p=>g=>h=>{if(!kx(h))return g(h);const y=g(h),b=bD(a,"SerializableStateInvariantMiddleware");return!u&&!(r.length&&r.indexOf(h.type)!==-1)&&b.measureTime(()=>{const v=db(h,"",t,n,i,d);if(v){const{keyPath:w,value:C}=v;console.error(`A non-serializable value was detected in an action, in the path: \`${w}\`. Value:`,C,`
191
+ Take a look at the logic that dispatched this action: `,h,`
173
192
  (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,
193
+ (To allow non-serializable values see: https://redux-toolkit.js.org/usage/usage-guide#working-with-non-serializable-data)`)}}),s||(b.measureTime(()=>{const v=p.getState(),w=db(v,"",t,n,o,d);if(w){const{keyPath:C,value:E}=w;console.error(`A non-serializable value was detected in the state, in the path: \`${C}\`. Value:`,E,`
194
+ Take a look at the reducer(s) handling this action type: ${h.type}.
195
+ (See https://redux.js.org/faq/organizing-state#can-i-put-functions-promises-or-other-non-serializable-items-in-my-store-state)`)}}),b.warnIfExceeded()),y}}}function sd(e){return typeof e=="boolean"}var cJ=()=>function(t){const{thunk:n=!0,immutableCheck:r=!0,serializableCheck:i=!0,actionCreatorCheck:o=!0}=t??{};let a=new xD;if(n&&(sd(n)?a.push(JQ):a.push(eJ(n.extraArgument))),process.env.NODE_ENV!=="production"){if(r){let s={};sd(r)||(s=r),a.unshift(lJ(s))}if(i){let s={};sd(i)||(s=i),a.push(uJ(s))}if(o){let s={};sd(o)||(s=o),a.unshift(oJ(s))}}return a},_D="RTK_autoBatch",Mt=()=>e=>({payload:e,meta:{[_D]:!0}}),V_=e=>t=>{setTimeout(t,e)},OD=(e={type:"raf"})=>t=>(...n)=>{const r=t(...n);let i=!0,o=!1,a=!1;const s=new Set,u=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:V_(10):e.type==="callback"?e.queueNotification:V_(e.timeout),c=()=>{a=!1,o&&(o=!1,s.forEach(d=>d()))};return Object.assign({},r,{subscribe(d){const p=()=>i&&d(),g=r.subscribe(p);return s.add(d),()=>{g(),s.delete(d)}},dispatch(d){try{return i=!d?.meta?.[_D],o=!i,o&&(a||(a=!0,u(c))),r.dispatch(d)}finally{i=!0}}})},fJ=e=>function(n){const{autoBatch:r=!0}=n??{};let i=new xD(e);return r&&i.push(OD(typeof r=="object"?r:void 0)),i};function dJ(e){const t=cJ(),{reducer:n=void 0,middleware:r,devTools:i=!0,duplicateMiddlewareCheck:o=!0,preloadedState:a=void 0,enhancers:s=void 0}=e||{};let u;if(typeof n=="function")u=n;else if(pc(n))u=sD(n);else throw new Error(process.env.NODE_ENV==="production"?mt(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"?mt(2):"`middleware` field must be a callback");let c;if(typeof r=="function"){if(c=r(t),process.env.NODE_ENV!=="production"&&!Array.isArray(c))throw new Error(process.env.NODE_ENV==="production"?mt(3):"when using a middleware builder function, an array of middleware must be returned")}else c=t();if(process.env.NODE_ENV!=="production"&&c.some(b=>typeof b!="function"))throw new Error(process.env.NODE_ENV==="production"?mt(4):"each middleware provided to configureStore must be a function");if(process.env.NODE_ENV!=="production"&&o){let b=new Set;c.forEach(v=>{if(b.has(v))throw new Error(process.env.NODE_ENV==="production"?mt(42):"Duplicate middleware references found when creating the store. Ensure that each middleware is only included once.");b.add(v)})}let d=rp;i&&(d=tJ({trace:process.env.NODE_ENV!=="production",...typeof i=="object"&&i}));const p=LQ(...c),g=fJ(p);if(process.env.NODE_ENV!=="production"&&s&&typeof s!="function")throw new Error(process.env.NODE_ENV==="production"?mt(5):"`enhancers` field must be a callback");let h=typeof s=="function"?s(g):g();if(process.env.NODE_ENV!=="production"&&!Array.isArray(h))throw new Error(process.env.NODE_ENV==="production"?mt(6):"`enhancers` callback must return an array");if(process.env.NODE_ENV!=="production"&&h.some(b=>typeof b!="function"))throw new Error(process.env.NODE_ENV==="production"?mt(7):"each enhancer provided to configureStore must be a function");process.env.NODE_ENV!=="production"&&c.length&&!h.includes(p)&&console.error("middlewares were provided, but middleware enhancer was not included in final enhancers - make sure to call `getDefaultEnhancers`");const y=d(...h);return aD(u,a,y)}function PD(e){const t={},n=[];let r;const i={addCase(o,a){if(process.env.NODE_ENV!=="production"){if(n.length>0)throw new Error(process.env.NODE_ENV==="production"?mt(26):"`builder.addCase` should only be called before calling `builder.addMatcher`");if(r)throw new Error(process.env.NODE_ENV==="production"?mt(27):"`builder.addCase` should only be called before calling `builder.addDefaultCase`")}const s=typeof o=="string"?o:o.type;if(!s)throw new Error(process.env.NODE_ENV==="production"?mt(28):"`builder.addCase` cannot be called with an empty action type");if(s in t)throw new Error(process.env.NODE_ENV==="production"?mt(29):`\`builder.addCase\` cannot be called with two reducers for the same action type '${s}'`);return t[s]=a,i},addAsyncThunk(o,a){if(process.env.NODE_ENV!=="production"&&r)throw new Error(process.env.NODE_ENV==="production"?mt(43):"`builder.addAsyncThunk` should only be called before calling `builder.addDefaultCase`");return a.pending&&(t[o.pending.type]=a.pending),a.rejected&&(t[o.rejected.type]=a.rejected),a.fulfilled&&(t[o.fulfilled.type]=a.fulfilled),a.settled&&n.push({matcher:o.settled,reducer:a.settled}),i},addMatcher(o,a){if(process.env.NODE_ENV!=="production"&&r)throw new Error(process.env.NODE_ENV==="production"?mt(30):"`builder.addMatcher` should only be called before calling `builder.addDefaultCase`");return n.push({matcher:o,reducer:a}),i},addDefaultCase(o){if(process.env.NODE_ENV!=="production"&&r)throw new Error(process.env.NODE_ENV==="production"?mt(31):"`builder.addDefaultCase` can only be called once");return r=o,i}};return e(i),[t,n,r]}function pJ(e){return typeof e=="function"}function hJ(e,t){if(process.env.NODE_ENV!=="production"&&typeof t=="object")throw new Error(process.env.NODE_ENV==="production"?mt(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,i]=PD(t),o;if(pJ(e))o=()=>F_(e());else{const s=F_(e);o=()=>s}function a(s=o(),u){let c=[n[u.type],...r.filter(({matcher:d})=>d(u)).map(({reducer:d})=>d)];return c.filter(d=>!!d).length===0&&(c=[i]),c.reduce((d,p)=>{if(p)if(po(d)){const h=p(d,u);return h===void 0?d:h}else{if(di(d))return vD(d,g=>p(g,u));{const g=p(d,u);if(g===void 0){if(d===null)return d;throw Error("A case reducer on a non-draftable value must not return undefined")}return g}}return d},s)}return a.getInitialState=o,a}var gJ="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",mJ=(e=21)=>{let t="",n=e;for(;n--;)t+=gJ[Math.random()*64|0];return t},vJ=Symbol.for("rtk-slice-createasyncthunk");function yJ(e,t){return`${e}/${t}`}function bJ({creators:e}={}){const t=e?.asyncThunk?.[vJ];return function(r){const{name:i,reducerPath:o=i}=r;if(!i)throw new Error(process.env.NODE_ENV==="production"?mt(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(wJ()):r.reducers)||{},s=Object.keys(a),u={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},c={addCase(E,_){const P=typeof E=="string"?E:E.type;if(!P)throw new Error(process.env.NODE_ENV==="production"?mt(12):"`context.addCase` cannot be called with an empty action type");if(P in u.sliceCaseReducersByType)throw new Error(process.env.NODE_ENV==="production"?mt(13):"`context.addCase` cannot be called with two reducers for the same action type: "+P);return u.sliceCaseReducersByType[P]=_,c},addMatcher(E,_){return u.sliceMatchers.push({matcher:E,reducer:_}),c},exposeAction(E,_){return u.actionCreators[E]=_,c},exposeCaseReducer(E,_){return u.sliceCaseReducersByName[E]=_,c}};s.forEach(E=>{const _=a[E],P={reducerName:E,type:yJ(i,E),createNotation:typeof r.reducers=="function"};SJ(_)?_J(P,_,c,t):CJ(P,_,c)});function d(){if(process.env.NODE_ENV!=="production"&&typeof r.extraReducers=="object")throw new Error(process.env.NODE_ENV==="production"?mt(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[E={},_=[],P=void 0]=typeof r.extraReducers=="function"?PD(r.extraReducers):[r.extraReducers],R={...E,...u.sliceCaseReducersByType};return hJ(r.initialState,I=>{for(let k in R)I.addCase(k,R[k]);for(let k of u.sliceMatchers)I.addMatcher(k.matcher,k.reducer);for(let k of _)I.addMatcher(k.matcher,k.reducer);P&&I.addDefaultCase(P)})}const p=E=>E,g=new Map,h=new WeakMap;let y;function b(E,_){return y||(y=d()),y(E,_)}function v(){return y||(y=d()),y.getInitialState()}function w(E,_=!1){function P(I){let k=I[E];if(typeof k>"u"){if(_)k=ad(h,P,v);else if(process.env.NODE_ENV!=="production")throw new Error(process.env.NODE_ENV==="production"?mt(15):"selectSlice returned undefined for an uninjected slice reducer")}return k}function R(I=p){const k=ad(g,_,()=>new WeakMap);return ad(k,I,()=>{const B={};for(const[L,V]of Object.entries(r.selectors??{}))B[L]=xJ(V,I,()=>ad(h,I,v),_);return B})}return{reducerPath:E,getSelectors:R,get selectors(){return R(P)},selectSlice:P}}const C={name:i,reducer:b,actions:u.actionCreators,caseReducers:u.sliceCaseReducersByName,getInitialState:v,...w(o),injectInto(E,{reducerPath:_,...P}={}){const R=_??o;return E.inject({reducerPath:R,reducer:b},P),{...C,...w(R,!0)}}};return C}}function xJ(e,t,n,r){function i(o,...a){let s=t(o);if(typeof s>"u"){if(r)s=n();else if(process.env.NODE_ENV!=="production")throw new Error(process.env.NODE_ENV==="production"?mt(16):"selectState returned undefined for an uninjected slice reducer")}return e(s,...a)}return i.unwrapped=e,i}var Wn=bJ();function wJ(){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 CJ({type:e,reducerName:t,createNotation:n},r,i){let o,a;if("reducer"in r){if(n&&!EJ(r))throw new Error(process.env.NODE_ENV==="production"?mt(17):"Please use the `create.preparedReducer` notation for prepared action creators with the `create` notation.");o=r.reducer,a=r.prepare}else o=r;i.addCase(e,o).exposeCaseReducer(t,o).exposeAction(t,a?Tr(e,a):Tr(e))}function SJ(e){return e._reducerDefinitionType==="asyncThunk"}function EJ(e){return e._reducerDefinitionType==="reducerWithPrepare"}function _J({type:e,reducerName:t},n,r,i){if(!i)throw new Error(process.env.NODE_ENV==="production"?mt(18):"Cannot use `create.asyncThunk` in the built-in `createSlice`. Use `buildCreateSlice({ creators: { asyncThunk: asyncThunkCreator } })` to create a customised version of `createSlice`.");const{payloadCreator:o,fulfilled:a,pending:s,rejected:u,settled:c,options:d}=n,p=i(e,o,d);r.exposeAction(t,p),a&&r.addCase(p.fulfilled,a),s&&r.addCase(p.pending,s),u&&r.addCase(p.rejected,u),c&&r.addMatcher(p.settled,c),r.exposeCaseReducer(t,{fulfilled:a||ld,pending:s||ld,rejected:u||ld,settled:c||ld})}function ld(){}var OJ="task",AD="listener",RD="completed",jx="cancelled",PJ=`task-${jx}`,AJ=`task-${RD}`,pb=`${AD}-${jx}`,RJ=`${AD}-${RD}`,Th=class{constructor(e){this.code=e,this.message=`${OJ} ${jx} (reason: ${e})`}name="TaskAbortError";message},Lx=(e,t)=>{if(typeof e!="function")throw new TypeError(process.env.NODE_ENV==="production"?mt(32):`${t} is not a function`)},cp=()=>{},ID=(e,t=cp)=>(e.catch(t),e),TD=(e,t)=>(e.addEventListener("abort",t,{once:!0}),()=>e.removeEventListener("abort",t)),qa=e=>{if(e.aborted)throw new Th(e.reason)};function kD(e,t){let n=cp;return new Promise((r,i)=>{const o=()=>i(new Th(e.reason));if(e.aborted){o();return}n=TD(e,o),t.finally(()=>n()).then(r,i)}).finally(()=>{n=cp})}var IJ=async(e,t)=>{try{return await Promise.resolve(),{status:"ok",value:await e()}}catch(n){return{status:n instanceof Th?"cancelled":"rejected",error:n}}finally{t?.()}},fp=e=>t=>ID(kD(e,t).then(n=>(qa(e),n))),ND=e=>{const t=fp(e);return n=>t(new Promise(r=>setTimeout(r,n)))},{assign:ul}=Object,B_={},gc="listenerMiddleware",TJ=(e,t)=>{const n=r=>TD(e,()=>r.abort(e.reason));return(r,i)=>{Lx(r,"taskExecutor");const o=new AbortController;n(o);const a=IJ(async()=>{qa(e),qa(o.signal);const s=await r({pause:fp(o.signal),delay:ND(o.signal),signal:o.signal});return qa(o.signal),s},()=>o.abort(AJ));return i?.autoJoin&&t.push(a.catch(cp)),{result:fp(e)(a),cancel(){o.abort(PJ)}}}},kJ=(e,t)=>{const n=async(r,i)=>{qa(t);let o=()=>{};const s=[new Promise((u,c)=>{let d=e({predicate:r,effect:(p,g)=>{g.unsubscribe(),u([p,g.getState(),g.getOriginalState()])}});o=()=>{d(),c()}})];i!=null&&s.push(new Promise(u=>setTimeout(u,i,null)));try{const u=await kD(t,Promise.race(s));return qa(t),u}finally{o()}};return(r,i)=>ID(n(r,i))},MD=e=>{let{type:t,actionCreator:n,matcher:r,predicate:i,effect:o}=e;if(t)i=Tr(t).match;else if(n)t=n.type,i=n.match;else if(r)i=r;else if(!i)throw new Error(process.env.NODE_ENV==="production"?mt(21):"Creating or removing a listener requires one of the known fields for matching an action");return Lx(o,"options.listener"),{predicate:i,type:t,effect:o}},DD=ul(e=>{const{type:t,predicate:n,effect:r}=MD(e);return{id:mJ(),effect:r,type:t,predicate:n,pending:new Set,unsubscribe:()=>{throw new Error(process.env.NODE_ENV==="production"?mt(22):"Unsubscribe not initialized")}}},{withTypes:()=>DD}),z_=(e,t)=>{const{type:n,effect:r,predicate:i}=MD(t);return Array.from(e.values()).find(o=>(typeof n=="string"?o.type===n:o.predicate===i)&&o.effect===r)},hb=e=>{e.pending.forEach(t=>{t.abort(pb)})},NJ=(e,t)=>()=>{for(const n of t.keys())hb(n);e.clear()},W_=(e,t,n)=>{try{e(t,n)}catch(r){setTimeout(()=>{throw r},0)}},jD=ul(Tr(`${gc}/add`),{withTypes:()=>jD}),MJ=Tr(`${gc}/removeAll`),LD=ul(Tr(`${gc}/remove`),{withTypes:()=>LD}),DJ=(...e)=>{console.error(`${gc}/error`,...e)},mc=(e={})=>{const t=new Map,n=new Map,r=h=>{const y=n.get(h)??0;n.set(h,y+1)},i=h=>{const y=n.get(h)??1;y===1?n.delete(h):n.set(h,y-1)},{extra:o,onError:a=DJ}=e;Lx(a,"onError");const s=h=>(h.unsubscribe=()=>t.delete(h.id),t.set(h.id,h),y=>{h.unsubscribe(),y?.cancelActive&&hb(h)}),u=h=>{const y=z_(t,h)??DD(h);return s(y)};ul(u,{withTypes:()=>u});const c=h=>{const y=z_(t,h);return y&&(y.unsubscribe(),h.cancelActive&&hb(y)),!!y};ul(c,{withTypes:()=>c});const d=async(h,y,b,v)=>{const w=new AbortController,C=kJ(u,w.signal),E=[];try{h.pending.add(w),r(h),await Promise.resolve(h.effect(y,ul({},b,{getOriginalState:v,condition:(_,P)=>C(_,P).then(Boolean),take:C,delay:ND(w.signal),pause:fp(w.signal),extra:o,signal:w.signal,fork:TJ(w.signal,E),unsubscribe:h.unsubscribe,subscribe:()=>{t.set(h.id,h)},cancelActiveListeners:()=>{h.pending.forEach((_,P,R)=>{_!==w&&(_.abort(pb),R.delete(_))})},cancel:()=>{w.abort(pb),h.pending.delete(w)},throwIfCancelled:()=>{qa(w.signal)}})))}catch(_){_ instanceof Th||W_(a,_,{raisedBy:"effect"})}finally{await Promise.all(E),w.abort(RJ),i(h),h.pending.delete(w)}},p=NJ(t,n);return{middleware:h=>y=>b=>{if(!kx(b))return y(b);if(jD.match(b))return u(b.payload);if(MJ.match(b)){p();return}if(LD.match(b))return c(b.payload);let v=h.getState();const w=()=>{if(v===B_)throw new Error(process.env.NODE_ENV==="production"?mt(23):`${gc}: getOriginalState can only be called synchronously`);return v};let C;try{if(C=y(b),t.size>0){const E=h.getState(),_=Array.from(t.values());for(const P of _){let R=!1;try{R=P.predicate(b,E,v)}catch(I){R=!1,W_(a,I,{raisedBy:"predicate"})}R&&d(P,b,h,w)}}}finally{v=B_}return C},startListening:u,stopListening:c,clearListeners:p}};function mt(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 jJ={layoutType:"horizontal",width:0,height:0,margin:{top:5,right:5,bottom:5,left:5},scale:1},$D=Wn({name:"chartLayout",initialState:jJ,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,i,o;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=(i=t.payload.bottom)!==null&&i!==void 0?i:0,e.margin.left=(o=t.payload.left)!==null&&o!==void 0?o:0},setScale(e,t){e.scale=t.payload}}}),{setMargin:LJ,setLayout:$J,setChartSize:FJ,setScale:VJ}=$D.actions,BJ=$D.reducer;function FD(e,t,n){return Array.isArray(e)&&e&&t+n!==0?e.slice(t,n+1):e}function ut(e){return Number.isFinite(e)}function Li(e){return typeof e=="number"&&e>0&&Number.isFinite(e)}function H_(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function nl(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?H_(Object(n),!0).forEach(function(r){zJ(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):H_(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function zJ(e,t,n){return(t=WJ(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function WJ(e){var t=HJ(e,"string");return typeof t=="symbol"?t:t+""}function HJ(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 Mn(e,t,n){return pn(e)||pn(t)?n:ji(t)?gl(e,t,n):typeof t=="function"?t(e):n}var UJ=(e,t,n)=>{if(t&&n){var{width:r,height:i}=n,{align:o,verticalAlign:a,layout:s}=t;if((s==="vertical"||s==="horizontal"&&a==="middle")&&o!=="center"&&Te(e[o]))return nl(nl({},e),{},{[o]:e[o]+(r||0)});if((s==="horizontal"||s==="vertical"&&o==="center")&&a!=="middle"&&Te(e[a]))return nl(nl({},e),{},{[a]:e[a]+(i||0)})}return e},pa=(e,t)=>e==="horizontal"&&t==="xAxis"||e==="vertical"&&t==="yAxis"||e==="centric"&&t==="angleAxis"||e==="radial"&&t==="radiusAxis",VD=(e,t,n,r)=>{if(r)return e.map(s=>s.coordinate);var i,o,a=e.map(s=>(s.coordinate===t&&(i=!0),s.coordinate===n&&(o=!0),s.coordinate));return i||a.push(t),o||a.push(n),a},BD=(e,t,n)=>{if(!e)return null;var{duplicateDomain:r,type:i,range:o,scale:a,realScaleType:s,isCategorical:u,categoricalDomain:c,tickCount:d,ticks:p,niceTicks:g,axisType:h}=e;if(!a)return null;var y=s==="scaleBand"&&a.bandwidth?a.bandwidth()/2:2,b=i==="category"&&a.bandwidth?a.bandwidth()/y:0;if(b=h==="angleAxis"&&o&&o.length>=2?cr(o[0]-o[1])*2*b:b,p||g){var v=(p||g||[]).map((w,C)=>{var E=r?r.indexOf(w):w,_=a.map(E);return ut(_)?{coordinate:_+b,value:w,offset:b,index:C}:null}).filter(fr);return v}return u&&c?c.map((w,C)=>{var E=a.map(w);return ut(E)?{coordinate:E+b,value:w,index:C,offset:b}:null}).filter(fr):a.ticks&&d!=null?a.ticks(d).map((w,C)=>{var E=a.map(w);return ut(E)?{coordinate:E+b,value:w,index:C,offset:b}:null}).filter(fr):a.domain().map((w,C)=>{var E=a.map(w);return ut(E)?{coordinate:E+b,value:r?r[w]:w,index:C,offset:b}:null}).filter(fr)},GJ=(e,t)=>{if(!t||t.length!==2||!Te(t[0])||!Te(t[1]))return e;var n=Math.min(t[0],t[1]),r=Math.max(t[0],t[1]),i=[e[0],e[1]];return(!Te(e[0])||e[0]<n)&&(i[0]=n),(!Te(e[1])||e[1]>r)&&(i[1]=r),i[0]>r&&(i[0]=r),i[1]<n&&(i[1]=n),i},qJ=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 i=0;i<r;++i)for(var o=0,a=0,s=0;s<n;++s){var u=e[s],c=u?.[i];if(c!=null){var d=c[1],p=c[0],g=Di(d)?p:d;g>=0?(c[0]=o,o+=g,c[1]=o):(c[0]=a,a+=g,c[1]=a)}}}},KJ=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 i=0;i<r;++i)for(var o=0,a=0;a<n;++a){var s=e[a],u=s?.[i];if(u!=null){var c=Di(u[1])?u[0]:u[1];c>=0?(u[0]=o,o+=c,u[1]=o):(u[0]=0,u[1]=0)}}}},YJ={sign:qJ,expand:SZ,none:ts,silhouette:EZ,wiggle:_Z,positive:KJ},XJ=(e,t,n)=>{var r,i=(r=YJ[n])!==null&&r!==void 0?r:ts,o=CZ().keys(t).value((s,u)=>Number(Mn(s,u,0))).order(nb).offset(i),a=o(e);return a.forEach((s,u)=>{s.forEach((c,d)=>{var p=Mn(e[d],t[u],0);Array.isArray(p)&&p.length===2&&Te(p[0])&&Te(p[1])&&(c[0]=p[0],c[1]=p[1])})}),a};function ZJ(e){return e==null?void 0:String(e)}var U_=e=>{var{axis:t,ticks:n,offset:r,bandSize:i,entry:o,index:a}=e;if(t.type==="category")return n[a]?n[a].coordinate+r:null;var s=Mn(o,t.dataKey,t.scale.domain()[a]);if(pn(s))return null;var u=t.scale.map(s);return Te(u)?u-i/2+r:null},QJ=e=>{var{numericAxis:t}=e,n=t.scale.domain();if(t.type==="number"){var r=Math.min(n[0],n[1]),i=Math.max(n[0],n[1]);return r<=0&&i>=0?0:i<0?i:r}return n[0]},JJ=e=>{var t=e.flat(2).filter(Te);return[Math.min(...t),Math.max(...t)]},eee=e=>[e[0]===1/0?0:e[0],e[1]===-1/0?0:e[1]],tee=(e,t,n)=>{if(e!=null)return eee(Object.keys(e).reduce((r,i)=>{var o=e[i];if(!o)return r;var{stackedData:a}=o,s=a.reduce((u,c)=>{var d=FD(c,t,n),p=JJ(d);return!ut(p[0])||!ut(p[1])?u:[Math.min(u[0],p[0]),Math.max(u[1],p[1])]},[1/0,-1/0]);return[Math.min(s[0],r[0]),Math.max(s[1],r[1])]},[1/0,-1/0]))},G_=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,q_=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,dp=(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 i=Sh(t,d=>d.coordinate),o=1/0,a=1,s=i.length;a<s;a++){var u=i[a],c=i[a-1];o=Math.min((u?.coordinate||0)-(c?.coordinate||0),o)}return o===1/0?0:o}return n?void 0:0};function K_(e){var{tooltipEntrySettings:t,dataKey:n,payload:r,value:i,name:o}=e;return nl(nl({},t),{},{dataKey:n,payload:r,value:i,name:o})}function zD(e,t){if(e)return String(e);if(typeof t=="string")return t}var nee=(e,t)=>{if(t==="horizontal")return e.relativeX;if(t==="vertical")return e.relativeY},ree=(e,t)=>t==="centric"?e.angle:e.radius,xo=e=>e.layout.width,wo=e=>e.layout.height,iee=e=>e.layout.scale,WD=e=>e.layout.margin,kh=q(e=>e.cartesianAxis.xAxis,e=>Object.values(e)),Nh=q(e=>e.cartesianAxis.yAxis,e=>Object.values(e)),oee="data-recharts-item-index",aee="data-recharts-item-id",vc=60;function Y_(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function ud(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Y_(Object(n),!0).forEach(function(r){see(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Y_(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function see(e,t,n){return(t=lee(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function lee(e){var t=uee(e,"string");return typeof t=="symbol"?t:t+""}function uee(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 cee=e=>e.brush.height;function fee(e){var t=Nh(e);return t.reduce((n,r)=>{if(r.orientation==="left"&&!r.mirror&&!r.hide){var i=typeof r.width=="number"?r.width:vc;return n+i}return n},0)}function dee(e){var t=Nh(e);return t.reduce((n,r)=>{if(r.orientation==="right"&&!r.mirror&&!r.hide){var i=typeof r.width=="number"?r.width:vc;return n+i}return n},0)}function pee(e){var t=kh(e);return t.reduce((n,r)=>r.orientation==="top"&&!r.mirror&&!r.hide?n+r.height:n,0)}function hee(e){var t=kh(e);return t.reduce((n,r)=>r.orientation==="bottom"&&!r.mirror&&!r.hide?n+r.height:n,0)}var wn=q([xo,wo,WD,cee,fee,dee,pee,hee,oD,OQ],(e,t,n,r,i,o,a,s,u,c)=>{var d={left:(n.left||0)+i,right:(n.right||0)+o},p={top:(n.top||0)+a,bottom:(n.bottom||0)+s},g=ud(ud({},p),d),h=g.bottom;g.bottom+=r,g=UJ(g,u,c);var y=e-g.left-g.right,b=t-g.top-g.bottom;return ud(ud({brushBottom:h},g),{},{width:Math.max(y,0),height:Math.max(b,0)})}),gee=q(wn,e=>({x:e.left,y:e.top,width:e.width,height:e.height})),$x=q(xo,wo,(e,t)=>({x:0,y:0,width:e,height:t})),mee=j.createContext(null),pr=()=>j.useContext(mee)!=null,Mh=e=>e.brush,Dh=q([Mh,wn,WD],(e,t,n)=>({height:e.height,x:Te(e.x)?e.x:t.left,y:Te(e.y)?e.y:t.top+t.height+t.brushBottom-(n?.bottom||0),width:Te(e.width)?e.width:t.width})),Bv={},zv={},Wv={},X_;function vee(){return X_||(X_=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n,r,{signal:i,edges:o}={}){let a,s=null;const u=o!=null&&o.includes("leading"),c=o==null||o.includes("trailing"),d=()=>{s!==null&&(n.apply(a,s),a=void 0,s=null)},p=()=>{c&&d(),b()};let g=null;const h=()=>{g!=null&&clearTimeout(g),g=setTimeout(()=>{g=null,p()},r)},y=()=>{g!==null&&(clearTimeout(g),g=null)},b=()=>{y(),a=void 0,s=null},v=()=>{d()},w=function(...C){if(i?.aborted)return;a=this,s=C;const E=g==null;h(),u&&E&&d()};return w.schedule=h,w.cancel=b,w.flush=v,i?.addEventListener("abort",b,{once:!0}),w}e.debounce=t})(Wv)),Wv}var Z_;function yee(){return Z_||(Z_=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=vee();function n(r,i=0,o={}){typeof o!="object"&&(o={});const{leading:a=!1,trailing:s=!0,maxWait:u}=o,c=Array(2);a&&(c[0]="leading"),s&&(c[1]="trailing");let d,p=null;const g=t.debounce(function(...b){d=r.apply(this,b),p=null},i,{edges:c}),h=function(...b){return u!=null&&(p===null&&(p=Date.now()),Date.now()-p>=u)?(d=r.apply(this,b),p=Date.now(),g.cancel(),g.schedule(),d):(g.apply(this,b),d)},y=()=>(g.flush(),d);return h.cancel=g.cancel,h.flush=y,h}e.debounce=n})(zv)),zv}var Q_;function bee(){return Q_||(Q_=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=yee();function n(r,i=0,o={}){const{leading:a=!0,trailing:s=!0}=o;return t.debounce(r,i,{leading:a,maxWait:i,trailing:s})}e.throttle=n})(Bv)),Bv}var Hv,J_;function xee(){return J_||(J_=1,Hv=bee().throttle),Hv}var wee=xee();const Cee=fs(wee);var pp=function(t,n){for(var r=arguments.length,i=new Array(r>2?r-2:0),o=2;o<r;o++)i[o-2]=arguments[o];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,()=>i[a++]))}},Ai={width:"100%",height:"100%",debounce:0,minWidth:0,initialDimension:{width:-1,height:-1}},HD=(e,t,n)=>{var{width:r=Ai.width,height:i=Ai.height,aspect:o,maxHeight:a}=n,s=ns(r)?e:Number(r),u=ns(i)?t:Number(i);return o&&o>0&&(s?u=s/o:u&&(s=u*o),a&&u!=null&&u>a&&(u=a)),{calculatedWidth:s,calculatedHeight:u}},See={width:0,height:0,overflow:"visible"},Eee={width:0,overflowX:"visible"},_ee={height:0,overflowY:"visible"},Oee={},Pee=e=>{var{width:t,height:n}=e,r=ns(t),i=ns(n);return r&&i?See:r?Eee:i?_ee:Oee};function Aee(e){var{width:t,height:n,aspect:r}=e,i=t,o=n;return i===void 0&&o===void 0?(i=Ai.width,o=Ai.height):i===void 0?i=r&&r>0?void 0:Ai.width:o===void 0&&(o=r&&r>0?void 0:Ai.height),{width:i,height:o}}function gb(){return gb=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},gb.apply(null,arguments)}function eO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function tO(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?eO(Object(n),!0).forEach(function(r){Ree(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):eO(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Ree(e,t,n){return(t=Iee(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Iee(e){var t=Tee(e,"string");return typeof t=="symbol"?t:t+""}function Tee(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 UD=j.createContext(Ai.initialDimension);function kee(e){return Li(e.width)&&Li(e.height)}function GD(e){var{children:t,width:n,height:r}=e,i=j.useMemo(()=>({width:n,height:r}),[n,r]);return kee(i)?x.createElement(UD.Provider,{value:i},t):null}var Fx=()=>j.useContext(UD),Nee=j.forwardRef((e,t)=>{var{aspect:n,initialDimension:r=Ai.initialDimension,width:i,height:o,minWidth:a=Ai.minWidth,minHeight:s,maxHeight:u,children:c,debounce:d=Ai.debounce,id:p,className:g,onResize:h,style:y={}}=e,b=j.useRef(null),v=j.useRef();v.current=h,j.useImperativeHandle(t,()=>b.current);var[w,C]=j.useState({containerWidth:r.width,containerHeight:r.height}),E=j.useCallback((k,B)=>{C(L=>{var V=Math.round(k),D=Math.round(B);return L.containerWidth===V&&L.containerHeight===D?L:{containerWidth:V,containerHeight:D}})},[]);j.useEffect(()=>{if(b.current==null||typeof ResizeObserver>"u")return ds;var k=D=>{var H,J=D[0];if(J!=null){var{width:te,height:G}=J.contentRect;E(te,G),(H=v.current)===null||H===void 0||H.call(v,te,G)}};d>0&&(k=Cee(k,d,{trailing:!0,leading:!1}));var B=new ResizeObserver(k),{width:L,height:V}=b.current.getBoundingClientRect();return E(L,V),B.observe(b.current),()=>{B.disconnect()}},[E,d]);var{containerWidth:_,containerHeight:P}=w;pp(!n||n>0,"The aspect(%s) must be greater than zero.",n);var{calculatedWidth:R,calculatedHeight:I}=HD(_,P,{width:i,height:o,aspect:n,maxHeight:u});return pp(R!=null&&R>0||I!=null&&I>0,`The width(%s) and height(%s) of chart should be greater than 0,
177
196
  please check the style of container, or the props width(%s) and height(%s),
178
197
  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 ",",",`
198
+ height and width.`,R,I,i,o,a,s,n),x.createElement("div",{id:p?"".concat(p):void 0,className:Pt("recharts-responsive-container",g),style:tO(tO({},y),{},{width:i,height:o,minWidth:a,minHeight:s,maxHeight:u}),ref:b},x.createElement("div",{style:Pee({width:i,height:o})},x.createElement(GD,{width:R,height:I},c)))}),Mee=j.forwardRef((e,t)=>{var n=Fx();if(Li(n.width)&&Li(n.height))return e.children;var{width:r,height:i}=Aee({width:e.width,height:e.height,aspect:e.aspect}),{calculatedWidth:o,calculatedHeight:a}=HD(void 0,void 0,{width:r,height:i,aspect:e.aspect,maxHeight:e.maxHeight});return Te(o)&&Te(a)?x.createElement(GD,{width:o,height:a},e.children):x.createElement(Nee,gb({},e,{width:r,height:i,ref:t}))});function Vx(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 jh=()=>{var e,t=pr(),n=Le(gee),r=Le(Dh),i=(e=Le(Mh))===null||e===void 0?void 0:e.padding;return!t||!r||!i?n:{width:r.width-i.left-i.right,height:r.height-i.top-i.bottom,x:i.left,y:i.top}},Dee={top:0,bottom:0,left:0,right:0,width:0,height:0,brushBottom:0},qD=()=>{var e;return(e=Le(wn))!==null&&e!==void 0?e:Dee},KD=()=>Le(xo),YD=()=>Le(wo),At=e=>e.layout.layoutType,_l=()=>Le(At),XD=()=>{var e=_l();if(e==="horizontal"||e==="vertical")return e},ZD=e=>{var t=e.layout.layoutType;if(t==="centric"||t==="radial")return t},jee=()=>{var e=_l();return e!==void 0},yc=e=>{var t=Ht(),n=pr(),{width:r,height:i}=e,o=Fx(),a=r,s=i;return o&&(a=o.width>0?o.width:r,s=o.height>0?o.height:i),j.useEffect(()=>{!n&&Li(a)&&Li(s)&&t(FJ({width:a,height:s}))},[t,n,a,s]),null},QD=Symbol.for("immer-nothing"),nO=Symbol.for("immer-draftable"),kr=Symbol.for("immer-state"),Lee=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 ur(e,...t){if(process.env.NODE_ENV!=="production"){const n=Lee[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 Gu=Object.getPrototypeOf;function vl(e){return!!e&&!!e[kr]}function is(e){return e?JD(e)||Array.isArray(e)||!!e[nO]||!!e.constructor?.[nO]||bc(e)||$h(e):!1}var $ee=Object.prototype.constructor.toString(),rO=new WeakMap;function JD(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=rO.get(n);return r===void 0&&(r=Function.toString.call(n),rO.set(n,r)),r===$ee}function hp(e,t,n=!0){Lh(e)===0?(n?Reflect.ownKeys(e):Object.keys(e)).forEach(i=>{t(i,e[i],e)}):e.forEach((r,i)=>t(i,r,e))}function Lh(e){const t=e[kr];return t?t.type_:Array.isArray(e)?1:bc(e)?2:$h(e)?3:0}function mb(e,t){return Lh(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function ej(e,t,n){const r=Lh(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function Fee(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function bc(e){return e instanceof Map}function $h(e){return e instanceof Set}function Fa(e){return e.copy_||e.base_}function vb(e,t){if(bc(e))return new Map(e);if($h(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=JD(e);if(t===!0||t==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(e);delete r[kr];let i=Reflect.ownKeys(r);for(let o=0;o<i.length;o++){const a=i[o],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(Gu(e),r)}else{const r=Gu(e);if(r!==null&&n)return{...e};const i=Object.create(r);return Object.assign(i,e)}}function Bx(e,t=!1){return Fh(e)||vl(e)||!is(e)||(Lh(e)>1&&Object.defineProperties(e,{set:cd,add:cd,clear:cd,delete:cd}),Object.freeze(e),t&&Object.values(e).forEach(n=>Bx(n,!0))),e}function Vee(){ur(2)}var cd={value:Vee};function Fh(e){return e===null||typeof e!="object"?!0:Object.isFrozen(e)}var Bee={};function os(e){const t=Bee[e];return t||ur(0,e),t}var qu;function tj(){return qu}function zee(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function iO(e,t){t&&(os("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function yb(e){bb(e),e.drafts_.forEach(Wee),e.drafts_=null}function bb(e){e===qu&&(qu=e.parent_)}function oO(e){return qu=zee(qu,e)}function Wee(e){const t=e[kr];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function aO(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[kr].modified_&&(yb(t),ur(4)),is(e)&&(e=gp(t,e),t.parent_||mp(t,e)),t.patches_&&os("Patches").generateReplacementPatches_(n[kr].base_,e,t.patches_,t.inversePatches_)):e=gp(t,n,[]),yb(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==QD?e:void 0}function gp(e,t,n){if(Fh(t))return t;const r=e.immer_.shouldUseStrictIteration(),i=t[kr];if(!i)return hp(t,(o,a)=>sO(e,i,t,o,a,n),r),t;if(i.scope_!==e)return t;if(!i.modified_)return mp(e,i.base_,!0),i.base_;if(!i.finalized_){i.finalized_=!0,i.scope_.unfinalizedDrafts_--;const o=i.copy_;let a=o,s=!1;i.type_===3&&(a=new Set(o),o.clear(),s=!0),hp(a,(u,c)=>sO(e,i,o,u,c,n,s),r),mp(e,o,!1),n&&e.patches_&&os("Patches").generatePatches_(i,n,e.patches_,e.inversePatches_)}return i.copy_}function sO(e,t,n,r,i,o,a){if(i==null||typeof i!="object"&&!a)return;const s=Fh(i);if(!(s&&!a)){if(process.env.NODE_ENV!=="production"&&i===n&&ur(5),vl(i)){const u=o&&t&&t.type_!==3&&!mb(t.assigned_,r)?o.concat(r):void 0,c=gp(e,i,u);if(ej(n,r,c),vl(c))e.canAutoFreeze_=!1;else return}else a&&n.add(i);if(is(i)&&!s){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1||t&&t.base_&&t.base_[r]===i&&s)return;gp(e,i),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&(bc(n)?n.has(r):Object.prototype.propertyIsEnumerable.call(n,r))&&mp(e,i)}}}function mp(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Bx(t,n)}function Hee(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:tj(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let i=r,o=zx;n&&(i=[r],o=Ku);const{revoke:a,proxy:s}=Proxy.revocable(i,o);return r.draft_=s,r.revoke_=a,s}var zx={get(e,t){if(t===kr)return e;const n=Fa(e);if(!mb(n,t))return Uee(e,n,t);const r=n[t];return e.finalized_||!is(r)?r:r===Uv(e.base_,t)?(Gv(e),e.copy_[t]=wb(r,e)):r},has(e,t){return t in Fa(e)},ownKeys(e){return Reflect.ownKeys(Fa(e))},set(e,t,n){const r=nj(Fa(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const i=Uv(Fa(e),t),o=i?.[kr];if(o&&o.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(Fee(n,i)&&(n!==void 0||mb(e.base_,t)))return!0;Gv(e),xb(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 Uv(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,Gv(e),xb(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=Fa(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){ur(11)},getPrototypeOf(e){return Gu(e.base_)},setPrototypeOf(){ur(12)}},Ku={};hp(zx,(e,t)=>{Ku[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});Ku.deleteProperty=function(e,t){return process.env.NODE_ENV!=="production"&&isNaN(parseInt(t))&&ur(13),Ku.set.call(this,e,t,void 0)};Ku.set=function(e,t,n){return process.env.NODE_ENV!=="production"&&t!=="length"&&isNaN(parseInt(t))&&ur(14),zx.set.call(this,e[0],t,n,e[0])};function Uv(e,t){const n=e[kr];return(n?Fa(n):e)[t]}function Uee(e,t,n){const r=nj(t,n);return r?"value"in r?r.value:r.get?.call(e.draft_):void 0}function nj(e,t){if(!(t in e))return;let n=Gu(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Gu(n)}}function xb(e){e.modified_||(e.modified_=!0,e.parent_&&xb(e.parent_))}function Gv(e){e.copy_||(e.copy_=vb(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var Gee=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 o=n;n=t;const a=this;return function(u=o,...c){return a.produce(u,d=>n.call(this,d,...c))}}typeof n!="function"&&ur(6),r!==void 0&&typeof r!="function"&&ur(7);let i;if(is(t)){const o=oO(this),a=wb(t,void 0);let s=!0;try{i=n(a),s=!1}finally{s?yb(o):bb(o)}return iO(o,r),aO(i,o)}else if(!t||typeof t!="object"){if(i=n(t),i===void 0&&(i=t),i===QD&&(i=void 0),this.autoFreeze_&&Bx(i,!0),r){const o=[],a=[];os("Patches").generateReplacementPatches_(t,i,o,a),r(o,a)}return i}else ur(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(a,...s)=>this.produceWithPatches(a,u=>t(u,...s));let r,i;return[this.produce(t,n,(a,s)=>{r=a,i=s}),r,i]},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){is(e)||ur(8),vl(e)&&(e=qee(e));const t=oO(this),n=wb(e,void 0);return n[kr].isManual_=!0,bb(t),n}finishDraft(e,t){const n=e&&e[kr];(!n||!n.isManual_)&&ur(9);const{scope_:r}=n;return iO(r,t),aO(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 i=t[n];if(i.path.length===0&&i.op==="replace"){e=i.value;break}}n>-1&&(t=t.slice(n+1));const r=os("Patches").applyPatches_;return vl(e)?r(e,t):this.produce(e,i=>r(i,t))}};function wb(e,t){const n=bc(e)?os("MapSet").proxyMap_(e,t):$h(e)?os("MapSet").proxySet_(e,t):Hee(e,t);return(t?t.scope_:tj()).drafts_.push(n),n}function qee(e){return vl(e)||ur(10,e),rj(e)}function rj(e){if(!is(e)||Fh(e))return e;const t=e[kr];let n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=vb(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=vb(e,!0);return hp(n,(i,o)=>{ej(n,i,rj(o))},r),t&&(t.finalized_=!1),n}var Kee=new Gee;Kee.produce;var Yee={settings:{layout:"horizontal",align:"center",verticalAlign:"middle",itemSorter:"value"},size:{width:0,height:0},payload:[]},ij=Wn({name:"legend",initialState:Yee,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:Mt()},replaceLegendPayload:{reducer(e,t){var{prev:n,next:r}=t.payload,i=Qr(e).payload.indexOf(n);i>-1&&(e.payload[i]=r)},prepare:Mt()},removeLegendPayload:{reducer(e,t){var n=Qr(e).payload.indexOf(t.payload);n>-1&&e.payload.splice(n,1)},prepare:Mt()}}}),{setLegendSize:lge,setLegendSettings:uge,addLegendPayload:Xee,replaceLegendPayload:Zee,removeLegendPayload:Qee}=ij.actions,Jee=ij.reducer,fd={exports:{}},qv={};var lO;function ete(){if(lO)return qv;lO=1;var e=j;function t(u,c){return u===c&&(u!==0||1/u===1/c)||u!==u&&c!==c}var n=typeof Object.is=="function"?Object.is:t,r=e.useSyncExternalStore,i=e.useRef,o=e.useEffect,a=e.useMemo,s=e.useDebugValue;return qv.useSyncExternalStoreWithSelector=function(u,c,d,p,g){var h=i(null);if(h.current===null){var y={hasValue:!1,value:null};h.current=y}else y=h.current;h=a(function(){function v(P){if(!w){if(w=!0,C=P,P=p(P),g!==void 0&&y.hasValue){var R=y.value;if(g(R,P))return E=R}return E=P}if(R=E,n(C,P))return R;var I=p(P);return g!==void 0&&g(R,I)?(C=P,R):(C=P,E=I)}var w=!1,C,E,_=d===void 0?null:d;return[function(){return v(c())},_===null?void 0:function(){return v(_())}]},[c,d,p,g]);var b=r(u,h[0],h[1]);return o(function(){y.hasValue=!0,y.value=b},[b]),s(b),b},qv}var Kv={};var uO;function tte(){return uO||(uO=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=j,n=typeof Object.is=="function"?Object.is:e,r=t.useSyncExternalStore,i=t.useRef,o=t.useEffect,a=t.useMemo,s=t.useDebugValue;Kv.useSyncExternalStoreWithSelector=function(u,c,d,p,g){var h=i(null);if(h.current===null){var y={hasValue:!1,value:null};h.current=y}else y=h.current;h=a(function(){function v(P){if(!w){if(w=!0,C=P,P=p(P),g!==void 0&&y.hasValue){var R=y.value;if(g(R,P))return E=R}return E=P}if(R=E,n(C,P))return R;var I=p(P);return g!==void 0&&g(R,I)?(C=P,R):(C=P,E=I)}var w=!1,C,E,_=d===void 0?null:d;return[function(){return v(c())},_===null?void 0:function(){return v(_())}]},[c,d,p,g]);var b=r(u,h[0],h[1]);return o(function(){y.hasValue=!0,y.value=b},[b]),s(b),b},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),Kv}var cO;function nte(){return cO||(cO=1,process.env.NODE_ENV==="production"?fd.exports=ete():fd.exports=tte()),fd.exports}nte();function rte(e){e()}function ite(){let e=null,t=null;return{clear(){e=null,t=null},notify(){rte(()=>{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 i=t={callback:n,next:null,prev:t};return i.prev?i.prev.next=i:e=i,function(){!r||e===null||(r=!1,i.next?i.next.prev=i.prev:t=i.prev,i.prev?i.prev.next=i.next:e=i.next)}}}}var fO={notify(){},get:()=>[]};function ote(e,t){let n,r=fO,i=0,o=!1;function a(b){d();const v=r.subscribe(b);let w=!1;return()=>{w||(w=!0,v(),p())}}function s(){r.notify()}function u(){y.onStateChange&&y.onStateChange()}function c(){return o}function d(){i++,n||(n=e.subscribe(u),r=ite())}function p(){i--,n&&i===0&&(n(),n=void 0,r.clear(),r=fO)}function g(){o||(o=!0,d())}function h(){o&&(o=!1,p())}const y={addNestedSub:a,notifyNestedSubs:s,handleChangeWrapper:u,isSubscribed:c,trySubscribe:g,tryUnsubscribe:h,getListeners:()=>r};return y}var ate=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",ste=ate(),lte=()=>typeof navigator<"u"&&navigator.product==="ReactNative",ute=lte(),cte=()=>ste||ute?x.useLayoutEffect:x.useEffect,fte=cte();function dO(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function dte(e,t){if(dO(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 i=0;i<n.length;i++)if(!Object.prototype.hasOwnProperty.call(t,n[i])||!dO(e[n[i]],t[n[i]]))return!1;return!0}var pte=Symbol.for("react-redux-context"),hte=typeof globalThis<"u"?globalThis:{};function gte(){if(!x.createContext)return{};const e=hte[pte]??=new Map;let t=e.get(x.createContext);return t||(t=x.createContext(null),process.env.NODE_ENV!=="production"&&(t.displayName="ReactRedux"),e.set(x.createContext,t)),t}var mte=gte();function vte(e){const{children:t,context:n,serverState:r,store:i}=e,o=x.useMemo(()=>{const u=ote(i),c={store:i,subscription:u,getServerState:r?()=>r:void 0};if(process.env.NODE_ENV==="production")return c;{const{identityFunctionCheck:d="once",stabilityCheck:p="once"}=e;return Object.assign(c,{stabilityCheck:p,identityFunctionCheck:d})}},[i,r]),a=x.useMemo(()=>i.getState(),[i]);fte(()=>{const{subscription:u}=o;return u.onStateChange=u.notifyNestedSubs,u.trySubscribe(),a!==i.getState()&&u.notifyNestedSubs(),()=>{u.tryUnsubscribe(),u.onStateChange=void 0}},[o,a]);const s=n||mte;return x.createElement(s.Provider,{value:o},t)}var yte=vte,bte=new Set(["axisLine","tickLine","activeBar","activeDot","activeLabel","activeShape","allowEscapeViewBox","background","cursor","dot","label","line","margin","padding","position","shape","style","tick","wrapperStyle","radius","throttledEvents"]);function xte(e,t){return e==null&&t==null?!0:typeof e=="number"&&typeof t=="number"?e===t||e!==e&&t!==t:e===t}function Vh(e,t){var n=new Set([...Object.keys(e),...Object.keys(t)]);for(var r of n)if(bte.has(r)){if(e[r]==null&&t[r]==null)continue;if(!dte(e[r],t[r]))return!1}else if(!xte(e[r],t[r]))return!1;return!0}function Cb(){return Cb=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},Cb.apply(null,arguments)}function pO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function fu(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?pO(Object(n),!0).forEach(function(r){wte(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pO(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function wte(e,t,n){return(t=Cte(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Cte(e){var t=Ste(e,"string");return typeof t=="symbol"?t:t+""}function Ste(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 Ete(e){return Array.isArray(e)&&ji(e[0])&&ji(e[1])?e.join(" ~ "):e}var Gs={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 _te(e,t){return t==null?e:Sh(e,t)}var Ote=e=>{var{separator:t=Gs.separator,contentStyle:n,itemStyle:r,labelStyle:i=Gs.labelStyle,payload:o,formatter:a,itemSorter:s,wrapperClassName:u,labelClassName:c,label:d,labelFormatter:p,accessibilityLayer:g=Gs.accessibilityLayer}=e,h=()=>{if(o&&o.length){var P={padding:0,margin:0},R=_te(o,s),I=R.map((k,B)=>{if(k.type==="none")return null;var L=k.formatter||a||Ete,{value:V,name:D}=k,H=V,J=D;if(L){var te=L(V,D,k,B,o);if(Array.isArray(te))[H,J]=te;else if(te!=null)H=te;else return null}var G=fu(fu({},Gs.itemStyle),{},{color:k.color||Gs.itemStyle.color},r);return x.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(B),style:G},ji(J)?x.createElement("span",{className:"recharts-tooltip-item-name"},J):null,ji(J)?x.createElement("span",{className:"recharts-tooltip-item-separator"},t):null,x.createElement("span",{className:"recharts-tooltip-item-value"},H),x.createElement("span",{className:"recharts-tooltip-item-unit"},k.unit||""))});return x.createElement("ul",{className:"recharts-tooltip-item-list",style:P},I)}return null},y=fu(fu({},Gs.contentStyle),n),b=fu({margin:0},i),v=!pn(d),w=v?d:"",C=Pt("recharts-default-tooltip",u),E=Pt("recharts-tooltip-label",c);v&&p&&o!==void 0&&o!==null&&(w=p(d,o));var _=g?{role:"status","aria-live":"assertive"}:{};return x.createElement("div",Cb({className:C,style:y},_),x.createElement("p",{className:E,style:b},x.isValidElement(w)?w:"".concat(w)),h())},du="recharts-tooltip-wrapper",Pte={visibility:"hidden"};function Ate(e){var{coordinate:t,translateX:n,translateY:r}=e;return Pt(du,{["".concat(du,"-right")]:Te(n)&&t&&Te(t.x)&&n>=t.x,["".concat(du,"-left")]:Te(n)&&t&&Te(t.x)&&n<t.x,["".concat(du,"-bottom")]:Te(r)&&t&&Te(t.y)&&r>=t.y,["".concat(du,"-top")]:Te(r)&&t&&Te(t.y)&&r<t.y})}function hO(e){var{allowEscapeViewBox:t,coordinate:n,key:r,offset:i,position:o,reverseDirection:a,tooltipDimension:s,viewBox:u,viewBoxDimension:c}=e;if(o&&Te(o[r]))return o[r];var d=n[r]-s-(i>0?i:0),p=n[r]+i;if(t[r])return a[r]?d:p;var g=u[r];if(g==null)return 0;if(a[r]){var h=d,y=g;return h<y?Math.max(p,g):Math.max(d,g)}if(c==null)return 0;var b=p+s,v=g+c;return b>v?Math.max(d,g):Math.max(p,g)}function Rte(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 Ite(e){var{allowEscapeViewBox:t,coordinate:n,offsetTop:r,offsetLeft:i,position:o,reverseDirection:a,tooltipBox:s,useTranslate3d:u,viewBox:c}=e,d,p,g;return s.height>0&&s.width>0&&n?(p=hO({allowEscapeViewBox:t,coordinate:n,key:"x",offset:i,position:o,reverseDirection:a,tooltipDimension:s.width,viewBox:c,viewBoxDimension:c.width}),g=hO({allowEscapeViewBox:t,coordinate:n,key:"y",offset:r,position:o,reverseDirection:a,tooltipDimension:s.height,viewBox:c,viewBoxDimension:c.height}),d=Rte({translateX:p,translateY:g,useTranslate3d:u})):d=Pte,{cssProperties:d,cssClasses:Ate({translateX:p,translateY:g,coordinate:n})}}var Tte=()=>!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout),xc={isSsr:Tte()};function oj(){var[e,t]=j.useState(()=>xc.isSsr||!window.matchMedia?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches);return j.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 gO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function qs(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?gO(Object(n),!0).forEach(function(r){kte(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gO(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function kte(e,t,n){return(t=Nte(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Nte(e){var t=Mte(e,"string");return typeof t=="symbol"?t:t+""}function Mte(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 Dte(e){if(!(e.prefersReducedMotion&&e.isAnimationActive==="auto")&&e.isAnimationActive&&e.active)return"transform ".concat(e.animationDuration,"ms ").concat(e.animationEasing)}function jte(e){var t,n,r,i,o,a,s=oj(),[u,c]=x.useState(()=>({dismissed:!1,dismissedAtCoordinate:{x:0,y:0}}));x.useEffect(()=>{var y=b=>{if(b.key==="Escape"){var v,w,C,E;c({dismissed:!0,dismissedAtCoordinate:{x:(v=(w=e.coordinate)===null||w===void 0?void 0:w.x)!==null&&v!==void 0?v:0,y:(C=(E=e.coordinate)===null||E===void 0?void 0:E.y)!==null&&C!==void 0?C:0}})}};return document.addEventListener("keydown",y),()=>{document.removeEventListener("keydown",y)}},[(t=e.coordinate)===null||t===void 0?void 0:t.x,(n=e.coordinate)===null||n===void 0?void 0:n.y]),u.dismissed&&(((r=(i=e.coordinate)===null||i===void 0?void 0:i.x)!==null&&r!==void 0?r:0)!==u.dismissedAtCoordinate.x||((o=(a=e.coordinate)===null||a===void 0?void 0:a.y)!==null&&o!==void 0?o:0)!==u.dismissedAtCoordinate.y)&&c(qs(qs({},u),{},{dismissed:!1}));var{cssClasses:d,cssProperties:p}=Ite({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}),g=e.hasPortalFromProps?{}:qs(qs({transition:Dte({prefersReducedMotion:s,isAnimationActive:e.isAnimationActive,active:e.active,animationDuration:e.animationDuration,animationEasing:e.animationEasing})},p),{},{pointerEvents:"none",position:"absolute",top:0,left:0}),h=qs(qs({},g),{},{visibility:!u.dismissed&&e.active&&e.hasPayload?"visible":"hidden"},e.wrapperStyle);return x.createElement("div",{xmlns:"http://www.w3.org/1999/xhtml",tabIndex:-1,className:d,style:h,ref:e.innerRef},e.children)}var Lte=x.memo(jte),aj=()=>{var e;return(e=Le(t=>t.rootProps.accessibilityLayer))!==null&&e!==void 0?e:!0};function Sb(){return Sb=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},Sb.apply(null,arguments)}function mO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function vO(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?mO(Object(n),!0).forEach(function(r){$te(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):mO(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function $te(e,t,n){return(t=Fte(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Fte(e){var t=Vte(e,"string");return typeof t=="symbol"?t:t+""}function Vte(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 yO={curveBasisClosed:fZ,curveBasisOpen:dZ,curveBasis:cZ,curveBumpX:XX,curveBumpY:ZX,curveLinearClosed:pZ,curveLinear:wh,curveMonotoneX:hZ,curveMonotoneY:gZ,curveNatural:mZ,curveStep:vZ,curveStepAfter:bZ,curveStepBefore:yZ},vp=e=>ut(e.x)&&ut(e.y),bO=e=>e.base!=null&&vp(e.base)&&vp(e),pu=e=>e.x,hu=e=>e.y,Bte=(e,t)=>{if(typeof e=="function")return e;var n="curve".concat(dc(e));if((n==="curveMonotone"||n==="curveBump")&&t){var r=yO["".concat(n).concat(t==="vertical"?"Y":"X")];if(r)return r}return yO[n]||wh},xO={connectNulls:!1,type:"linear"},zte=e=>{var{type:t=xO.type,points:n=[],baseLine:r,layout:i,connectNulls:o=xO.connectNulls}=e,a=Bte(t,i),s=o?n.filter(vp):n;if(Array.isArray(r)){var u,c=n.map((y,b)=>vO(vO({},y),{},{base:r[b]}));i==="vertical"?u=rd().y(hu).x1(pu).x0(y=>y.base.x):u=rd().x(pu).y1(hu).y0(y=>y.base.y);var d=u.defined(bO).curve(a),p=o?c.filter(bO):c;return d(p)}var g;i==="vertical"&&Te(r)?g=rd().y(hu).x1(pu).x0(r):Te(r)?g=rd().x(pu).y1(hu).y0(r):g=kM().x(pu).y(hu);var h=g.defined(vp).curve(a);return h(s)},sj=e=>{var{className:t,points:n,path:r,pathRef:i}=e,o=_l();if((!n||!n.length)&&!r)return null;var a={type:e.type,points:e.points,baseLine:e.baseLine,layout:e.layout||o,connectNulls:e.connectNulls},s=n&&n.length?zte(a):r;return x.createElement("path",Sb({},fo(e),WZ(e),{className:Pt("recharts-curve",t),d:s===null?void 0:s,ref:i}))},Wte=["x","y","top","left","width","height","className"];function Eb(){return Eb=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},Eb.apply(null,arguments)}function wO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Hte(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?wO(Object(n),!0).forEach(function(r){Ute(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wO(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Ute(e,t,n){return(t=Gte(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Gte(e){var t=qte(e,"string");return typeof t=="symbol"?t:t+""}function qte(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 Kte(e,t){if(e==null)return{};var n,r,i=Yte(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Yte(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=(e,t,n,r,i,o)=>"M".concat(e,",").concat(i,"v").concat(r,"M").concat(o,",").concat(t,"h").concat(n),Zte=e=>{var{x:t=0,y:n=0,top:r=0,left:i=0,width:o=0,height:a=0,className:s}=e,u=Kte(e,Wte),c=Hte({x:t,y:n,top:r,left:i,width:o,height:a},u);return!Te(t)||!Te(n)||!Te(o)||!Te(a)||!Te(r)||!Te(i)?null:x.createElement("path",Eb({},ti(c),{className:Pt("recharts-cross",s),d:Xte(t,n,o,a,r,i)}))};function Qte(e,t,n,r){var i=r/2;return{stroke:"none",fill:"#ccc",x:e==="horizontal"?t.x-i:n.left+.5,y:e==="horizontal"?n.top+.5:t.y-i,width:e==="horizontal"?r:n.width-1,height:e==="horizontal"?n.height-1:r}}function CO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function SO(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?CO(Object(n),!0).forEach(function(r){Jte(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):CO(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Jte(e,t,n){return(t=ene(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ene(e){var t=tne(e,"string");return typeof t=="symbol"?t:t+""}function tne(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 nne=e=>e.replace(/([A-Z])/g,t=>"-".concat(t.toLowerCase())),lj=(e,t,n)=>e.map(r=>"".concat(nne(r)," ").concat(t,"ms ").concat(n)).join(","),rne=(e,t)=>[Object.keys(e),Object.keys(t)].reduce((n,r)=>n.filter(i=>r.includes(i))),Yu=(e,t)=>Object.keys(t).reduce((n,r)=>SO(SO({},n),{},{[r]:e(r,t[r])}),{});function EO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function fn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?EO(Object(n),!0).forEach(function(r){ine(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):EO(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ine(e,t,n){return(t=one(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function one(e){var t=ane(e,"string");return typeof t=="symbol"?t:t+""}function ane(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 yp=(e,t,n)=>e+(t-e)*n,_b=e=>{var{from:t,to:n}=e;return t!==n},uj=(e,t,n)=>{var r=Yu((i,o)=>{if(_b(o)){var[a,s]=e(o.from,o.to,o.velocity);return fn(fn({},o),{},{from:a,velocity:s})}return o},t);return n<1?Yu((i,o)=>_b(o)&&r[i]!=null?fn(fn({},o),{},{velocity:yp(o.velocity,r[i].velocity,n),from:yp(o.from,r[i].from,n)}):o,t):uj(e,r,n-1)};function sne(e,t,n,r,i,o){var a,s=r.reduce((g,h)=>fn(fn({},g),{},{[h]:{from:e[h],velocity:0,to:t[h]}}),{}),u=()=>Yu((g,h)=>h.from,s),c=()=>!Object.values(s).filter(_b).length,d=null,p=g=>{a||(a=g);var h=g-a,y=h/n.dt;s=uj(n,s,y),i(fn(fn(fn({},e),t),u())),a=g,c()||(d=o.setTimeout(p))};return()=>(d=o.setTimeout(p),()=>{var g;(g=d)===null||g===void 0||g()})}function lne(e,t,n,r,i,o,a){var s=null,u=i.reduce((p,g)=>{var h=e[g],y=t[g];return h==null||y==null?p:fn(fn({},p),{},{[g]:[h,y]})},{}),c,d=p=>{c||(c=p);var g=(p-c)/r,h=Yu((b,v)=>yp(...v,n(g)),u);if(o(fn(fn(fn({},e),t),h)),g<1)s=a.setTimeout(d);else{var y=Yu((b,v)=>yp(...v,n(1)),u);o(fn(fn(fn({},e),t),y))}};return()=>(s=a.setTimeout(d),()=>{var p;(p=s)===null||p===void 0||p()})}const une=(e,t,n,r,i,o)=>{var a=rne(e,t);return n==null?()=>(i(fn(fn({},e),t)),()=>{}):n.isStepper===!0?sne(e,t,n,a,i,o):lne(e,t,n,r,a,i,o)};var bp=1e-4,cj=(e,t)=>[0,3*e,3*t-6*e,3*e-3*t+1],fj=(e,t)=>e.map((n,r)=>n*t**r).reduce((n,r)=>n+r),_O=(e,t)=>n=>{var r=cj(e,t);return fj(r,n)},cne=(e,t)=>n=>{var r=cj(e,t),i=[...r.map((o,a)=>o*a).slice(1),0];return fj(i,n)},fne=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 i=r.map(o=>parseFloat(o));return[i[0],i[1],i[2],i[3]]},dne=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 i=fne(n[0]);if(i)return i}}return n.length===4?n:[0,0,1,1]},pne=(e,t,n,r)=>{var i=_O(e,n),o=_O(t,r),a=cne(e,n),s=c=>c>1?1:c<0?0:c,u=c=>{for(var d=c>1?1:c,p=d,g=0;g<8;++g){var h=i(p)-d,y=a(p);if(Math.abs(h-d)<bp||y<bp)return o(p);p=s(p-h/y)}return o(p)};return u.isStepper=!1,u},OO=function(){return pne(...dne(...arguments))},hne=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},{stiff:n=100,damping:r=8,dt:i=17}=t,o=(a,s,u)=>{var c=-(a-s)*n,d=u*r,p=u+(c-d)*i/1e3,g=u*i/1e3+a;return Math.abs(g-s)<bp&&Math.abs(p)<bp?[s,0]:[g,p]};return o.isStepper=!0,o.dt=i,o},gne=e=>{if(typeof e=="string")switch(e){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return OO(e);case"spring":return hne();default:if(e.split("(")[0]==="cubic-bezier")return OO(e)}return typeof e=="function"?e:null};function mne(e){var t,n=()=>null,r=!1,i=null,o=a=>{if(!r){if(Array.isArray(a)){if(!a.length)return;var s=a,[u,...c]=s;if(typeof u=="number"){i=e.setTimeout(o.bind(null,c),u);return}o(u),i=e.setTimeout(o.bind(null,c));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,i&&(i(),i=null),o(a)},subscribe:a=>(n=a,()=>{n=()=>null}),getTimeoutController:()=>e}}class vne{setTimeout(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=performance.now(),i=null,o=a=>{a-r>=n?t(a):typeof requestAnimationFrame=="function"&&(i=requestAnimationFrame(o))};return i=requestAnimationFrame(o),()=>{i!=null&&cancelAnimationFrame(i)}}}function yne(){return mne(new vne)}var bne=j.createContext(yne);function xne(e,t){var n=j.useContext(bne);return j.useMemo(()=>t??n(e),[e,t,n])}var wne={begin:0,duration:1e3,easing:"ease",isActive:!0,canBegin:!0,onAnimationEnd:()=>{},onAnimationStart:()=>{}},PO={t:0},Yv={t:1};function Wx(e){var t=Mr(e,wne),{isActive:n,canBegin:r,duration:i,easing:o,begin:a,onAnimationEnd:s,onAnimationStart:u,children:c}=t,d=oj(),p=n==="auto"?!xc.isSsr&&!d:n,g=xne(t.animationId,t.animationManager),[h,y]=j.useState(p?PO:Yv),b=j.useRef(null);return j.useEffect(()=>{p||y(Yv)},[p]),j.useEffect(()=>{if(!p||!r)return ds;var v=une(PO,Yv,gne(o),i,y,g.getTimeoutController()),w=()=>{b.current=v()};return g.start([u,a,w,i,s]),()=>{g.stop(),b.current&&b.current(),s()}},[p,r,i,o,a,u,s,g]),c(h.t)}function Hx(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"animation-",n=j.useRef(zu(t)),r=j.useRef(e);return r.current!==e&&(n.current=zu(t),r.current=e),n.current}var Cne=["radius"],Sne=["radius"],AO,RO,IO,TO,kO,NO,MO,DO,jO,LO;function $O(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function FO(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?$O(Object(n),!0).forEach(function(r){Ene(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$O(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Ene(e,t,n){return(t=_ne(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _ne(e){var t=One(e,"string");return typeof t=="symbol"?t:t+""}function One(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 xp(){return xp=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},xp.apply(null,arguments)}function VO(e,t){if(e==null)return{};var n,r,i=Pne(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Pne(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 Si(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var BO=(e,t,n,r,i)=>{var o=Zo(n),a=Zo(r),s=Math.min(Math.abs(o)/2,Math.abs(a)/2),u=a>=0?1:-1,c=o>=0?1:-1,d=a>=0&&o>=0||a<0&&o<0?1:0,p;if(s>0&&Array.isArray(i)){for(var g=[0,0,0,0],h=0,y=4;h<y;h++){var b,v=(b=i[h])!==null&&b!==void 0?b:0;g[h]=v>s?s:v}p=qt(AO||(AO=Si(["M",",",""])),e,t+u*g[0]),g[0]>0&&(p+=qt(RO||(RO=Si(["A ",",",",0,0,",",",",",""])),g[0],g[0],d,e+c*g[0],t)),p+=qt(IO||(IO=Si(["L ",",",""])),e+n-c*g[1],t),g[1]>0&&(p+=qt(TO||(TO=Si(["A ",",",",0,0,",`,
199
+ `,",",""])),g[1],g[1],d,e+n,t+u*g[1])),p+=qt(kO||(kO=Si(["L ",",",""])),e+n,t+r-u*g[2]),g[2]>0&&(p+=qt(NO||(NO=Si(["A ",",",",0,0,",`,
200
+ `,",",""])),g[2],g[2],d,e+n-c*g[2],t+r)),p+=qt(MO||(MO=Si(["L ",",",""])),e+c*g[3],t+r),g[3]>0&&(p+=qt(DO||(DO=Si(["A ",",",",0,0,",`,
201
+ `,",",""])),g[3],g[3],d,e,t+r-u*g[3])),p+="Z"}else if(s>0&&i===+i&&i>0){var w=Math.min(s,i);p=qt(jO||(jO=Si(["M ",",",`
183
202
  A `,",",",0,0,",",",",",`
184
203
  L `,",",`
185
204
  A `,",",",0,0,",",",",",`
186
205
  L `,",",`
187
206
  A `,",",",0,0,",",",",",`
188
207
  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 ",",",`
208
+ A `,",",",0,0,",",",","," Z"])),e,t+u*w,w,w,d,e+c*w,t,e+n-c*w,t,w,w,d,e+n,t+u*w,e+n,t+r-u*w,w,w,d,e+n-c*w,t+r,e+c*w,t+r,w,w,d,e,t+r-u*w)}else p=qt(LO||(LO=Si(["M ",","," h "," v "," h "," Z"])),e,t,n,r,-n);return p},zO={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},dj=e=>{var t=Mr(e,zO),n=j.useRef(null),[r,i]=j.useState(-1);j.useEffect(()=>{if(n.current&&n.current.getTotalLength)try{var ee=n.current.getTotalLength();ee&&i(ee)}catch{}},[]);var{x:o,y:a,width:s,height:u,radius:c,className:d}=t,{animationEasing:p,animationDuration:g,animationBegin:h,isAnimationActive:y,isUpdateAnimationActive:b}=t,v=j.useRef(s),w=j.useRef(u),C=j.useRef(o),E=j.useRef(a),_=j.useMemo(()=>({x:o,y:a,width:s,height:u,radius:c}),[o,a,s,u,c]),P=Hx(_,"rectangle-");if(o!==+o||a!==+a||s!==+s||u!==+u||s===0||u===0)return null;var R=Pt("recharts-rectangle",d);if(!b){var I=ti(t),{radius:k}=I,B=VO(I,Cne);return x.createElement("path",xp({},B,{x:Zo(o),y:Zo(a),width:Zo(s),height:Zo(u),radius:typeof c=="number"?c:void 0,className:R,d:BO(o,a,s,u,c)}))}var L=v.current,V=w.current,D=C.current,H=E.current,J="0px ".concat(r===-1?1:r,"px"),te="".concat(r,"px ").concat(r,"px"),G=lj(["strokeDasharray"],g,typeof p=="string"?p:zO.animationEasing);return x.createElement(Wx,{animationId:P,key:P,canBegin:r>0,duration:g,easing:p,isActive:b,begin:h},ee=>{var Q=Tn(L,s,ee),pe=Tn(V,u,ee),K=Tn(D,o,ee),Ae=Tn(H,a,ee);n.current&&(v.current=Q,w.current=pe,C.current=K,E.current=Ae);var Se;y?ee>0?Se={transition:G,strokeDasharray:te}:Se={strokeDasharray:J}:Se={strokeDasharray:te};var $e=ti(t),{radius:we}=$e,Ce=VO($e,Sne);return x.createElement("path",xp({},Ce,{radius:typeof c=="number"?c:void 0,className:R,d:BO(K,Ae,Q,pe,c),ref:n,style:FO(FO({},Se),t.style)}))})};function WO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function HO(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?WO(Object(n),!0).forEach(function(r){Ane(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):WO(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Ane(e,t,n){return(t=Rne(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Rne(e){var t=Ine(e,"string");return typeof t=="symbol"?t:t+""}function Ine(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 wp=Math.PI/180,Tne=e=>e*180/Math.PI,kn=(e,t,n,r)=>({x:e+Math.cos(-wp*r)*n,y:t+Math.sin(-wp*r)*n}),kne=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},Nne=(e,t)=>{var{x:n,y:r}=e,{x:i,y:o}=t;return Math.sqrt((n-i)**2+(r-o)**2)},Mne=(e,t)=>{var{x:n,y:r}=e,{cx:i,cy:o}=t,a=Nne({x:n,y:r},{x:i,y:o});if(a<=0)return{radius:a,angle:0};var s=(n-i)/a,u=Math.acos(s);return r>o&&(u=2*Math.PI-u),{radius:a,angle:Tne(u),angleInRadian:u}},Dne=e=>{var{startAngle:t,endAngle:n}=e,r=Math.floor(t/360),i=Math.floor(n/360),o=Math.min(r,i);return{startAngle:t-o*360,endAngle:n-o*360}},jne=(e,t)=>{var{startAngle:n,endAngle:r}=t,i=Math.floor(n/360),o=Math.floor(r/360),a=Math.min(i,o);return e+a*360},Lne=(e,t)=>{var{relativeX:n,relativeY:r}=e,{radius:i,angle:o}=Mne({x:n,y:r},t),{innerRadius:a,outerRadius:s}=t;if(i<a||i>s||i===0)return null;var{startAngle:u,endAngle:c}=Dne(t),d=o,p;if(u<=c){for(;d>c;)d-=360;for(;d<u;)d+=360;p=d>=u&&d<=c}else{for(;d>u;)d-=360;for(;d<c;)d+=360;p=d>=c&&d<=u}return p?HO(HO({},t),{},{radius:i,angle:jne(d,t)}):null};function pj(e){var{cx:t,cy:n,radius:r,startAngle:i,endAngle:o}=e,a=kn(t,n,r,i),s=kn(t,n,r,o);return{points:[a,s],cx:t,cy:n,radius:r,startAngle:i,endAngle:o}}var UO,GO,qO,KO,YO,XO,ZO;function Ob(){return Ob=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},Ob.apply(null,arguments)}function za(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var $ne=(e,t)=>{var n=cr(t-e),r=Math.min(Math.abs(t-e),359.999);return n*r},dd=e=>{var{cx:t,cy:n,radius:r,angle:i,sign:o,isExternal:a,cornerRadius:s,cornerIsExternal:u}=e,c=s*(a?1:-1)+r,d=Math.asin(s/c)/wp,p=u?i:i+o*d,g=kn(t,n,c,p),h=kn(t,n,r,p),y=u?i-o*d:i,b=kn(t,n,c*Math.cos(d*wp),y);return{center:g,circleTangency:h,lineTangency:b,theta:d}},hj=e=>{var{cx:t,cy:n,innerRadius:r,outerRadius:i,startAngle:o,endAngle:a}=e,s=$ne(o,a),u=o+s,c=kn(t,n,i,o),d=kn(t,n,i,u),p=qt(UO||(UO=za(["M ",",",`
190
209
  A `,",",`,0,
191
210
  `,",",`,
192
211
  `,",",`
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 ",",",`
212
+ `])),c.x,c.y,i,i,+(Math.abs(s)>180),+(o>u),d.x,d.y);if(r>0){var g=kn(t,n,r,o),h=kn(t,n,r,u);p+=qt(GO||(GO=za(["L ",",",`
194
213
  A `,",",`,0,
195
214
  `,",",`,
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 ",",",`
215
+ `,","," Z"])),h.x,h.y,r,r,+(Math.abs(s)>180),+(o<=u),g.x,g.y)}else p+=qt(qO||(qO=za(["L ",","," Z"])),t,n);return p},Fne=e=>{var{cx:t,cy:n,innerRadius:r,outerRadius:i,cornerRadius:o,forceCornerRadius:a,cornerIsExternal:s,startAngle:u,endAngle:c}=e,d=cr(c-u),{circleTangency:p,lineTangency:g,theta:h}=dd({cx:t,cy:n,radius:i,angle:u,sign:d,cornerRadius:o,cornerIsExternal:s}),{circleTangency:y,lineTangency:b,theta:v}=dd({cx:t,cy:n,radius:i,angle:c,sign:-d,cornerRadius:o,cornerIsExternal:s}),w=s?Math.abs(u-c):Math.abs(u-c)-h-v;if(w<0)return a?qt(KO||(KO=za(["M ",",",`
197
216
  a`,",",",0,0,1,",`,0
198
217
  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 ",",",`
218
+ `])),g.x,g.y,o,o,o*2,o,o,-o*2):hj({cx:t,cy:n,innerRadius:r,outerRadius:i,startAngle:u,endAngle:c});var C=qt(YO||(YO=za(["M ",",",`
200
219
  A`,",",",0,0,",",",",",`
201
220
  A`,",",",0,",",",",",",",`
202
221
  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",",",`
222
+ `])),g.x,g.y,o,o,+(d<0),p.x,p.y,i,i,+(w>180),+(d<0),y.x,y.y,o,o,+(d<0),b.x,b.y);if(r>0){var{circleTangency:E,lineTangency:_,theta:P}=dd({cx:t,cy:n,radius:r,angle:u,sign:d,isExternal:!0,cornerRadius:o,cornerIsExternal:s}),{circleTangency:R,lineTangency:I,theta:k}=dd({cx:t,cy:n,radius:r,angle:c,sign:-d,isExternal:!0,cornerRadius:o,cornerIsExternal:s}),B=s?Math.abs(u-c):Math.abs(u-c)-P-k;if(B<0&&o===0)return"".concat(C,"L").concat(t,",").concat(n,"Z");C+=qt(XO||(XO=za(["L",",",`
204
223
  A`,",",",0,0,",",",",",`
205
224
  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
225
+ A`,",",",0,0,",",",",","Z"])),I.x,I.y,o,o,+(d<0),R.x,R.y,r,r,+(B>180),+(d>0),E.x,E.y,o,o,+(d<0),_.x,_.y)}else C+=qt(ZO||(ZO=za(["L",",","Z"])),t,n);return C},Vne={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},gj=e=>{var t=Mr(e,Vne),{cx:n,cy:r,innerRadius:i,outerRadius:o,cornerRadius:a,forceCornerRadius:s,cornerIsExternal:u,startAngle:c,endAngle:d,className:p}=t;if(o<i||c===d)return null;var g=Pt("recharts-sector",p),h=o-i,y=fi(a,h,0,!0),b;return y>0&&Math.abs(c-d)<360?b=Fne({cx:n,cy:r,innerRadius:i,outerRadius:o,cornerRadius:Math.min(y,h/2),forceCornerRadius:s,cornerIsExternal:u,startAngle:c,endAngle:d}):b=hj({cx:n,cy:r,innerRadius:i,outerRadius:o,startAngle:c,endAngle:d}),x.createElement("path",Ob({},ti(t),{className:g,d:b}))};function Bne(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(qM(t)){if(e==="centric"){var{cx:r,cy:i,innerRadius:o,outerRadius:a,angle:s}=t,u=kn(r,i,o,s),c=kn(r,i,a,s);return[{x:u.x,y:u.y},{x:c.x,y:c.y}]}return pj(t)}}var Xv={},Zv={},Qv={},QO;function zne(){return QO||(QO=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=rD();function n(r){return t.isSymbol(r)?NaN:Number(r)}e.toNumber=n})(Qv)),Qv}var JO;function Wne(){return JO||(JO=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=zne();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})(Zv)),Zv}var eP;function Hne(){return eP||(eP=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=iD(),n=Wne();function r(i,o,a){a&&typeof a!="number"&&t.isIterateeCall(i,o,a)&&(o=a=void 0),i=n.toFinite(i),o===void 0?(o=i,i=0):o=n.toFinite(o),a=a===void 0?i<o?1:-1:n.toFinite(a);const s=Math.max(Math.ceil((o-i)/(a||1)),0),u=new Array(s);for(let c=0;c<s;c++)u[c]=i,i+=a;return u}e.range=r})(Xv)),Xv}var Jv,tP;function Une(){return tP||(tP=1,Jv=Hne().range),Jv}var Gne=Une();const mj=fs(Gne);var Co=e=>e.chartData,vj=q([Co],e=>{var t=e.chartData!=null?e.chartData.length-1:0;return{chartData:e.chartData,computedData:e.computedData,dataEndIndex:t,dataStartIndex:0}}),yj=(e,t,n,r)=>r?vj(e):Co(e),qne=(e,t,n)=>n?vj(e):Co(e);function Ti(e){if(Array.isArray(e)&&e.length===2){var[t,n]=e;if(ut(t)&&ut(n))return!0}return!1}function nP(e,t,n){return n?e:[Math.min(e[0],t[0]),Math.max(e[1],t[1])]}function bj(e,t){if(t&&typeof e!="function"&&Array.isArray(e)&&e.length===2){var[n,r]=e,i,o;if(ut(n))i=n;else if(typeof n=="function")return;if(ut(r))o=r;else if(typeof r=="function")return;var a=[i,o];if(Ti(a))return a}}function Kne(e,t,n){if(!(!n&&t==null)){if(typeof e=="function"&&t!=null)try{var r=e(t,n);if(Ti(r))return nP(r,t,n)}catch{}if(Array.isArray(e)&&e.length===2){var[i,o]=e,a,s;if(i==="auto")t!=null&&(a=Math.min(...t));else if(Te(i))a=i;else if(typeof i=="function")try{t!=null&&(a=i(t?.[0]))}catch{}else if(typeof i=="string"&&G_.test(i)){var u=G_.exec(i);if(u==null||u[1]==null||t==null)a=void 0;else{var c=+u[1];a=t[0]-c}}else a=t?.[0];if(o==="auto")t!=null&&(s=Math.max(...t));else if(Te(o))s=o;else if(typeof o=="function")try{t!=null&&(s=o(t?.[1]))}catch{}else if(typeof o=="string"&&q_.test(o)){var d=q_.exec(o);if(d==null||d[1]==null||t==null)s=void 0;else{var p=+d[1];s=t[1]+p}}else s=t?.[1];var g=[a,s];if(Ti(g))return t==null?g:nP(g,t,n)}}}var Ol=1e9,Yne={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},Gx,Vt=!0,ni="[DecimalError] ",Ka=ni+"Invalid argument: ",Ux=ni+"Exponent out of range: ",Pl=Math.floor,Va=Math.pow,Xne=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Or,xn=1e7,Dt=7,xj=9007199254740991,Cp=Pl(xj/Dt),_e={};_e.absoluteValue=_e.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};_e.comparedTo=_e.cmp=function(e){var t,n,r,i,o=this;if(e=new o.constructor(e),o.s!==e.s)return o.s||-e.s;if(o.e!==e.e)return o.e>e.e^o.s<0?1:-1;for(r=o.d.length,i=e.d.length,t=0,n=r<i?r:i;t<n;++t)if(o.d[t]!==e.d[t])return o.d[t]>e.d[t]^o.s<0?1:-1;return r===i?0:r>i^o.s<0?1:-1};_e.decimalPlaces=_e.dp=function(){var e=this,t=e.d.length-1,n=(t-e.e)*Dt;if(t=e.d[t],t)for(;t%10==0;t/=10)n--;return n<0?0:n};_e.dividedBy=_e.div=function(e){return so(this,new this.constructor(e))};_e.dividedToIntegerBy=_e.idiv=function(e){var t=this,n=t.constructor;return Ot(so(t,new n(e),0,1),n.precision)};_e.equals=_e.eq=function(e){return!this.cmp(e)};_e.exponent=function(){return rn(this)};_e.greaterThan=_e.gt=function(e){return this.cmp(e)>0};_e.greaterThanOrEqualTo=_e.gte=function(e){return this.cmp(e)>=0};_e.isInteger=_e.isint=function(){return this.e>this.d.length-2};_e.isNegative=_e.isneg=function(){return this.s<0};_e.isPositive=_e.ispos=function(){return this.s>0};_e.isZero=function(){return this.s===0};_e.lessThan=_e.lt=function(e){return this.cmp(e)<0};_e.lessThanOrEqualTo=_e.lte=function(e){return this.cmp(e)<1};_e.logarithm=_e.log=function(e){var t,n=this,r=n.constructor,i=r.precision,o=i+5;if(e===void 0)e=new r(10);else if(e=new r(e),e.s<1||e.eq(Or))throw Error(ni+"NaN");if(n.s<1)throw Error(ni+(n.s?"NaN":"-Infinity"));return n.eq(Or)?new r(0):(Vt=!1,t=so(Xu(n,o),Xu(e,o),o),Vt=!0,Ot(t,i))};_e.minus=_e.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?Sj(t,e):wj(t,(e.s=-e.s,e))};_e.modulo=_e.mod=function(e){var t,n=this,r=n.constructor,i=r.precision;if(e=new r(e),!e.s)throw Error(ni+"NaN");return n.s?(Vt=!1,t=so(n,e,0,1).times(e),Vt=!0,n.minus(t)):Ot(new r(n),i)};_e.naturalExponential=_e.exp=function(){return Cj(this)};_e.naturalLogarithm=_e.ln=function(){return Xu(this)};_e.negated=_e.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};_e.plus=_e.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?wj(t,e):Sj(t,(e.s=-e.s,e))};_e.precision=_e.sd=function(e){var t,n,r,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(Ka+e);if(t=rn(i)+1,r=i.d.length-1,n=r*Dt+1,r=i.d[r],r){for(;r%10==0;r/=10)n--;for(r=i.d[0];r>=10;r/=10)n++}return e&&t>n?t:n};_e.squareRoot=_e.sqrt=function(){var e,t,n,r,i,o,a,s=this,u=s.constructor;if(s.s<1){if(!s.s)return new u(0);throw Error(ni+"NaN")}for(e=rn(s),Vt=!1,i=Math.sqrt(+s),i==0||i==1/0?(t=Ri(s.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=Pl((e+1)/2)-(e<0||e%2),i==1/0?t="5e"+e:(t=i.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),r=new u(t)):r=new u(i.toString()),n=u.precision,i=a=n+3;;)if(o=r,r=o.plus(so(s,o,a+2)).times(.5),Ri(o.d).slice(0,a)===(t=Ri(r.d)).slice(0,a)){if(t=t.slice(a-3,a+1),i==a&&t=="4999"){if(Ot(o,n+1,0),o.times(o).eq(s)){r=o;break}}else if(t!="9999")break;a+=4}return Vt=!0,Ot(r,n)};_e.times=_e.mul=function(e){var t,n,r,i,o,a,s,u,c,d=this,p=d.constructor,g=d.d,h=(e=new p(e)).d;if(!d.s||!e.s)return new p(0);for(e.s*=d.s,n=d.e+e.e,u=g.length,c=h.length,u<c&&(o=g,g=h,h=o,a=u,u=c,c=a),o=[],a=u+c,r=a;r--;)o.push(0);for(r=c;--r>=0;){for(t=0,i=u+r;i>r;)s=o[i]+h[r]*g[i-r-1]+t,o[i--]=s%xn|0,t=s/xn|0;o[i]=(o[i]+t)%xn|0}for(;!o[--a];)o.pop();return t?++n:o.shift(),e.d=o,e.e=n,Vt?Ot(e,p.precision):e};_e.toDecimalPlaces=_e.todp=function(e,t){var n=this,r=n.constructor;return n=new r(n),e===void 0?n:($i(e,0,Ol),t===void 0?t=r.rounding:$i(t,0,8),Ot(n,e+rn(n)+1,t))};_e.toExponential=function(e,t){var n,r=this,i=r.constructor;return e===void 0?n=as(r,!0):($i(e,0,Ol),t===void 0?t=i.rounding:$i(t,0,8),r=Ot(new i(r),e+1,t),n=as(r,!0,e+1)),n};_e.toFixed=function(e,t){var n,r,i=this,o=i.constructor;return e===void 0?as(i):($i(e,0,Ol),t===void 0?t=o.rounding:$i(t,0,8),r=Ot(new o(i),e+rn(i)+1,t),n=as(r.abs(),!1,e+rn(r)+1),i.isneg()&&!i.isZero()?"-"+n:n)};_e.toInteger=_e.toint=function(){var e=this,t=e.constructor;return Ot(new t(e),rn(e)+1,t.rounding)};_e.toNumber=function(){return+this};_e.toPower=_e.pow=function(e){var t,n,r,i,o,a,s=this,u=s.constructor,c=12,d=+(e=new u(e));if(!e.s)return new u(Or);if(s=new u(s),!s.s){if(e.s<1)throw Error(ni+"Infinity");return s}if(s.eq(Or))return s;if(r=u.precision,e.eq(Or))return Ot(s,r);if(t=e.e,n=e.d.length-1,a=t>=n,o=s.s,a){if((n=d<0?-d:d)<=xj){for(i=new u(Or),t=Math.ceil(r/Dt+4),Vt=!1;n%2&&(i=i.times(s),iP(i.d,t)),n=Pl(n/2),n!==0;)s=s.times(s),iP(s.d,t);return Vt=!0,e.s<0?new u(Or).div(i):Ot(i,r)}}else if(o<0)throw Error(ni+"NaN");return o=o<0&&e.d[Math.max(t,n)]&1?-1:1,s.s=1,Vt=!1,i=e.times(Xu(s,r+c)),Vt=!0,i=Cj(i),i.s=o,i};_e.toPrecision=function(e,t){var n,r,i=this,o=i.constructor;return e===void 0?(n=rn(i),r=as(i,n<=o.toExpNeg||n>=o.toExpPos)):($i(e,1,Ol),t===void 0?t=o.rounding:$i(t,0,8),i=Ot(new o(i),e,t),n=rn(i),r=as(i,e<=n||n<=o.toExpNeg,e)),r};_e.toSignificantDigits=_e.tosd=function(e,t){var n=this,r=n.constructor;return e===void 0?(e=r.precision,t=r.rounding):($i(e,1,Ol),t===void 0?t=r.rounding:$i(t,0,8)),Ot(new r(n),e,t)};_e.toString=_e.valueOf=_e.val=_e.toJSON=_e[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=rn(e),n=e.constructor;return as(e,t<=n.toExpNeg||t>=n.toExpPos)};function wj(e,t){var n,r,i,o,a,s,u,c,d=e.constructor,p=d.precision;if(!e.s||!t.s)return t.s||(t=new d(e)),Vt?Ot(t,p):t;if(u=e.d,c=t.d,a=e.e,i=t.e,u=u.slice(),o=a-i,o){for(o<0?(r=u,o=-o,s=c.length):(r=c,i=a,s=u.length),a=Math.ceil(p/Dt),s=a>s?a+1:s+1,o>s&&(o=s,r.length=1),r.reverse();o--;)r.push(0);r.reverse()}for(s=u.length,o=c.length,s-o<0&&(o=s,r=c,c=u,u=r),n=0;o;)n=(u[--o]=u[o]+c[o]+n)/xn|0,u[o]%=xn;for(n&&(u.unshift(n),++i),s=u.length;u[--s]==0;)u.pop();return t.d=u,t.e=i,Vt?Ot(t,p):t}function $i(e,t,n){if(e!==~~e||e<t||e>n)throw Error(Ka+e)}function Ri(e){var t,n,r,i=e.length-1,o="",a=e[0];if(i>0){for(o+=a,t=1;t<i;t++)r=e[t]+"",n=Dt-r.length,n&&(o+=Go(n)),o+=r;a=e[t],r=a+"",n=Dt-r.length,n&&(o+=Go(n))}else if(a===0)return"0";for(;a%10===0;)a/=10;return o+a}var so=(function(){function e(r,i){var o,a=0,s=r.length;for(r=r.slice();s--;)o=r[s]*i+a,r[s]=o%xn|0,a=o/xn|0;return a&&r.unshift(a),r}function t(r,i,o,a){var s,u;if(o!=a)u=o>a?1:-1;else for(s=u=0;s<o;s++)if(r[s]!=i[s]){u=r[s]>i[s]?1:-1;break}return u}function n(r,i,o){for(var a=0;o--;)r[o]-=a,a=r[o]<i[o]?1:0,r[o]=a*xn+r[o]-i[o];for(;!r[0]&&r.length>1;)r.shift()}return function(r,i,o,a){var s,u,c,d,p,g,h,y,b,v,w,C,E,_,P,R,I,k,B=r.constructor,L=r.s==i.s?1:-1,V=r.d,D=i.d;if(!r.s)return new B(r);if(!i.s)throw Error(ni+"Division by zero");for(u=r.e-i.e,I=D.length,P=V.length,h=new B(L),y=h.d=[],c=0;D[c]==(V[c]||0);)++c;if(D[c]>(V[c]||0)&&--u,o==null?C=o=B.precision:a?C=o+(rn(r)-rn(i))+1:C=o,C<0)return new B(0);if(C=C/Dt+2|0,c=0,I==1)for(d=0,D=D[0],C++;(c<P||d)&&C--;c++)E=d*xn+(V[c]||0),y[c]=E/D|0,d=E%D|0;else{for(d=xn/(D[0]+1)|0,d>1&&(D=e(D,d),V=e(V,d),I=D.length,P=V.length),_=I,b=V.slice(0,I),v=b.length;v<I;)b[v++]=0;k=D.slice(),k.unshift(0),R=D[0],D[1]>=xn/2&&++R;do d=0,s=t(D,b,I,v),s<0?(w=b[0],I!=v&&(w=w*xn+(b[1]||0)),d=w/R|0,d>1?(d>=xn&&(d=xn-1),p=e(D,d),g=p.length,v=b.length,s=t(p,b,g,v),s==1&&(d--,n(p,I<g?k:D,g))):(d==0&&(s=d=1),p=D.slice()),g=p.length,g<v&&p.unshift(0),n(b,p,v),s==-1&&(v=b.length,s=t(D,b,I,v),s<1&&(d++,n(b,I<v?k:D,v))),v=b.length):s===0&&(d++,b=[0]),y[c++]=d,s&&b[0]?b[v++]=V[_]||0:(b=[V[_]],v=1);while((_++<P||b[0]!==void 0)&&C--)}return y[0]||y.shift(),h.e=u,Ot(h,a?o+rn(h)+1:o)}})();function Cj(e,t){var n,r,i,o,a,s,u=0,c=0,d=e.constructor,p=d.precision;if(rn(e)>16)throw Error(Ux+rn(e));if(!e.s)return new d(Or);for(Vt=!1,s=p,a=new d(.03125);e.abs().gte(.1);)e=e.times(a),c+=5;for(r=Math.log(Va(2,c))/Math.LN10*2+5|0,s+=r,n=i=o=new d(Or),d.precision=s;;){if(i=Ot(i.times(e),s),n=n.times(++u),a=o.plus(so(i,n,s)),Ri(a.d).slice(0,s)===Ri(o.d).slice(0,s)){for(;c--;)o=Ot(o.times(o),s);return d.precision=p,t==null?(Vt=!0,Ot(o,p)):o}o=a}}function rn(e){for(var t=e.e*Dt,n=e.d[0];n>=10;n/=10)t++;return t}function ey(e,t,n){if(t>e.LN10.sd())throw Vt=!0,n&&(e.precision=n),Error(ni+"LN10 precision limit exceeded");return Ot(new e(e.LN10),t)}function Go(e){for(var t="";e--;)t+="0";return t}function Xu(e,t){var n,r,i,o,a,s,u,c,d,p=1,g=10,h=e,y=h.d,b=h.constructor,v=b.precision;if(h.s<1)throw Error(ni+(h.s?"NaN":"-Infinity"));if(h.eq(Or))return new b(0);if(t==null?(Vt=!1,c=v):c=t,h.eq(10))return t==null&&(Vt=!0),ey(b,c);if(c+=g,b.precision=c,n=Ri(y),r=n.charAt(0),o=rn(h),Math.abs(o)<15e14){for(;r<7&&r!=1||r==1&&n.charAt(1)>3;)h=h.times(e),n=Ri(h.d),r=n.charAt(0),p++;o=rn(h),r>1?(h=new b("0."+n),o++):h=new b(r+"."+n.slice(1))}else return u=ey(b,c+2,v).times(o+""),h=Xu(new b(r+"."+n.slice(1)),c-g).plus(u),b.precision=v,t==null?(Vt=!0,Ot(h,v)):h;for(s=a=h=so(h.minus(Or),h.plus(Or),c),d=Ot(h.times(h),c),i=3;;){if(a=Ot(a.times(d),c),u=s.plus(so(a,new b(i),c)),Ri(u.d).slice(0,c)===Ri(s.d).slice(0,c))return s=s.times(2),o!==0&&(s=s.plus(ey(b,c+2,v).times(o+""))),s=so(s,new b(p),c),b.precision=v,t==null?(Vt=!0,Ot(s,v)):s;s=u,i+=2}}function rP(e,t){var n,r,i;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(i=t.length;t.charCodeAt(i-1)===48;)--i;if(t=t.slice(r,i),t){if(i-=r,n=n-r-1,e.e=Pl(n/Dt),e.d=[],r=(n+1)%Dt,n<0&&(r+=Dt),r<i){for(r&&e.d.push(+t.slice(0,r)),i-=Dt;r<i;)e.d.push(+t.slice(r,r+=Dt));t=t.slice(r),r=Dt-t.length}else r-=i;for(;r--;)t+="0";if(e.d.push(+t),Vt&&(e.e>Cp||e.e<-Cp))throw Error(Ux+n)}else e.s=0,e.e=0,e.d=[0];return e}function Ot(e,t,n){var r,i,o,a,s,u,c,d,p=e.d;for(a=1,o=p[0];o>=10;o/=10)a++;if(r=t-a,r<0)r+=Dt,i=t,c=p[d=0];else{if(d=Math.ceil((r+1)/Dt),o=p.length,d>=o)return e;for(c=o=p[d],a=1;o>=10;o/=10)a++;r%=Dt,i=r-Dt+a}if(n!==void 0&&(o=Va(10,a-i-1),s=c/o%10|0,u=t<0||p[d+1]!==void 0||c%o,u=n<4?(s||u)&&(n==0||n==(e.s<0?3:2)):s>5||s==5&&(n==4||u||n==6&&(r>0?i>0?c/Va(10,a-i):0:p[d-1])%10&1||n==(e.s<0?8:7))),t<1||!p[0])return u?(o=rn(e),p.length=1,t=t-o-1,p[0]=Va(10,(Dt-t%Dt)%Dt),e.e=Pl(-t/Dt)||0):(p.length=1,p[0]=e.e=e.s=0),e;if(r==0?(p.length=d,o=1,d--):(p.length=d+1,o=Va(10,Dt-r),p[d]=i>0?(c/Va(10,a-i)%Va(10,i)|0)*o:0),u)for(;;)if(d==0){(p[0]+=o)==xn&&(p[0]=1,++e.e);break}else{if(p[d]+=o,p[d]!=xn)break;p[d--]=0,o=1}for(r=p.length;p[--r]===0;)p.pop();if(Vt&&(e.e>Cp||e.e<-Cp))throw Error(Ux+rn(e));return e}function Sj(e,t){var n,r,i,o,a,s,u,c,d,p,g=e.constructor,h=g.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new g(e),Vt?Ot(t,h):t;if(u=e.d,p=t.d,r=t.e,c=e.e,u=u.slice(),a=c-r,a){for(d=a<0,d?(n=u,a=-a,s=p.length):(n=p,r=c,s=u.length),i=Math.max(Math.ceil(h/Dt),s)+2,a>i&&(a=i,n.length=1),n.reverse(),i=a;i--;)n.push(0);n.reverse()}else{for(i=u.length,s=p.length,d=i<s,d&&(s=i),i=0;i<s;i++)if(u[i]!=p[i]){d=u[i]<p[i];break}a=0}for(d&&(n=u,u=p,p=n,t.s=-t.s),s=u.length,i=p.length-s;i>0;--i)u[s++]=0;for(i=p.length;i>a;){if(u[--i]<p[i]){for(o=i;o&&u[--o]===0;)u[o]=xn-1;--u[o],u[i]+=xn}u[i]-=p[i]}for(;u[--s]===0;)u.pop();for(;u[0]===0;u.shift())--r;return u[0]?(t.d=u,t.e=r,Vt?Ot(t,h):t):new g(0)}function as(e,t,n){var r,i=rn(e),o=Ri(e.d),a=o.length;return t?(n&&(r=n-a)>0?o=o.charAt(0)+"."+o.slice(1)+Go(r):a>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(i<0?"e":"e+")+i):i<0?(o="0."+Go(-i-1)+o,n&&(r=n-a)>0&&(o+=Go(r))):i>=a?(o+=Go(i+1-a),n&&(r=n-i-1)>0&&(o=o+"."+Go(r))):((r=i+1)<a&&(o=o.slice(0,r)+"."+o.slice(r)),n&&(r=n-a)>0&&(i+1===a&&(o+="."),o+=Go(r))),e.s<0?"-"+o:o}function iP(e,t){if(e.length>t)return e.length=t,!0}function Ej(e){var t,n,r;function i(o){var a=this;if(!(a instanceof i))return new i(o);if(a.constructor=i,o instanceof i){a.s=o.s,a.e=o.e,a.d=(o=o.d)?o.slice():o;return}if(typeof o=="number"){if(o*0!==0)throw Error(Ka+o);if(o>0)a.s=1;else if(o<0)o=-o,a.s=-1;else{a.s=0,a.e=0,a.d=[0];return}if(o===~~o&&o<1e7){a.e=0,a.d=[o];return}return rP(a,o.toString())}else if(typeof o!="string")throw Error(Ka+o);if(o.charCodeAt(0)===45?(o=o.slice(1),a.s=-1):a.s=1,Xne.test(o))rP(a,o);else throw Error(Ka+o)}if(i.prototype=_e,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.clone=Ej,i.config=i.set=Zne,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 i.config(e),i}function Zne(e){if(!e||typeof e!="object")throw Error(ni+"Object expected");var t,n,r,i=["precision",1,Ol,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(t=0;t<i.length;t+=3)if((r=e[n=i[t]])!==void 0)if(Pl(r)===r&&r>=i[t+1]&&r<=i[t+2])this[n]=r;else throw Error(Ka+n+": "+r);if((r=e[n="LN10"])!==void 0)if(r==Math.LN10)this[n]=new this(r);else throw Error(Ka+n+": "+r);return this}var Gx=Ej(Yne);Or=new Gx(1);const lt=Gx;function _j(e){var t;return e===0?t=1:t=Math.floor(new lt(e).abs().log(10).toNumber())+1,t}function Oj(e,t,n){for(var r=new lt(e),i=0,o=[];r.lt(t)&&i<1e5;)o.push(r.toNumber()),r=r.add(n),i++;return o}var Pj=e=>{var[t,n]=e,[r,i]=[t,n];return t>n&&([r,i]=[n,t]),[r,i]},qx=(e,t,n)=>{if(e.lte(0))return new lt(0);var r=_j(e.toNumber()),i=new lt(10).pow(r),o=e.div(i),a=r!==1?.05:.1,s=new lt(Math.ceil(o.div(a).toNumber())).add(n).mul(a),u=s.mul(i);return t?new lt(u.toNumber()):new lt(Math.ceil(u.toNumber()))},Aj=(e,t,n)=>{var r;if(e.lte(0))return new lt(0);var i=[1,2,2.5,5],o=e.toNumber(),a=Math.floor(new lt(o).abs().log(10).toNumber()),s=new lt(10).pow(a),u=e.div(s).toNumber(),c=i.findIndex(h=>h>=u-1e-10);if(c===-1&&(s=s.mul(10),c=0),c+=n,c>=i.length){var d=Math.floor(c/i.length);c%=i.length,s=s.mul(new lt(10).pow(d))}var p=(r=i[c])!==null&&r!==void 0?r:1,g=new lt(p).mul(s);return t?g:new lt(Math.ceil(g.toNumber()))},Qne=(e,t,n)=>{var r=new lt(1),i=new lt(e);if(!i.isint()&&n){var o=Math.abs(e);o<1?(r=new lt(10).pow(_j(e)-1),i=new lt(Math.floor(i.div(r).toNumber())).mul(r)):o>1&&(i=new lt(Math.floor(e)))}else e===0?i=new lt(Math.floor((t-1)/2)):n||(i=new lt(Math.floor(e)));for(var a=Math.floor((t-1)/2),s=[],u=0;u<t;u++)s.push(i.add(new lt(u-a).mul(r)).toNumber());return s},Rj=function(t,n,r,i){var o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:qx;if(!Number.isFinite((n-t)/(r-1)))return{step:new lt(0),tickMin:new lt(0),tickMax:new lt(0)};var s=a(new lt(n).sub(t).div(r-1),i,o),u;t<=0&&n>=0?u=new lt(0):(u=new lt(t).add(n).div(2),u=u.sub(new lt(u).mod(s)));var c=Math.ceil(u.sub(t).div(s).toNumber()),d=Math.ceil(new lt(n).sub(u).div(s).toNumber()),p=c+d+1;return p>r?Rj(t,n,r,i,o+1,a):(p<r&&(d=n>0?d+(r-p):d,c=n>0?c:c+(r-p)),{step:s,tickMin:u.sub(new lt(c).mul(s)),tickMax:u.add(new lt(d).mul(s))})},oP=function(t){var[n,r]=t,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"auto",s=Math.max(i,2),[u,c]=Pj([n,r]);if(u===-1/0||c===1/0){var d=c===1/0?[u,...Array(i-1).fill(1/0)]:[...Array(i-1).fill(-1/0),c];return n>r?d.reverse():d}if(u===c)return Qne(u,i,o);var p=a==="snap125"?Aj:qx,{step:g,tickMin:h,tickMax:y}=Rj(u,c,s,o,0,p),b=Oj(h,y.add(new lt(.1).mul(g)),g);return n>r?b.reverse():b},aP=function(t,n){var[r,i]=t,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"auto",[s,u]=Pj([r,i]);if(s===-1/0||u===1/0)return[r,i];if(s===u)return[s];var c=a==="snap125"?Aj:qx,d=Math.max(n,2),p=c(new lt(u).sub(s).div(d-1),o,0),g=[...Oj(new lt(s),new lt(u),p),u];return o===!1&&(g=g.map(h=>Math.round(h))),r>i?g.reverse():g},Ij=e=>e.rootProps.maxBarSize,Jne=e=>e.rootProps.barGap,Tj=e=>e.rootProps.barCategoryGap,ere=e=>e.rootProps.barSize,Bh=e=>e.rootProps.stackOffset,kj=e=>e.rootProps.reverseStackOrder,Kx=e=>e.options.chartName,Yx=e=>e.rootProps.syncId,Nj=e=>e.rootProps.syncMethod,Xx=e=>e.options.eventEmitter,Zn={grid:-100,barBackground:-50,area:100,cursorRectangle:200,bar:300,line:400,axis:500,scatter:600,activeBar:1e3,cursorLine:1100,activeDot:1200,label:2e3},Ma={allowDecimals:!1,allowDataOverflow:!1,angleAxisId:0,reversed:!1,scale:"auto",tick:!0,type:"auto"},Ei={allowDataOverflow:!1,allowDecimals:!1,allowDuplicatedCategory:!0,includeHidden:!1,radiusAxisId:0,reversed:!1,scale:"auto",tick:!0,tickCount:5,type:"auto"},zh=(e,t)=>{if(!(!e||!t))return e!=null&&e.reversed?[t[1],t[0]]:t};function Wh(e,t,n){if(n!=="auto")return n;if(e!=null)return pa(e,t)?"category":"number"}function sP(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Sp(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?sP(Object(n),!0).forEach(function(r){tre(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):sP(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function tre(e,t,n){return(t=nre(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function nre(e){var t=rre(e,"string");return typeof t=="symbol"?t:t+""}function rre(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 lP={allowDataOverflow:Ma.allowDataOverflow,allowDecimals:Ma.allowDecimals,allowDuplicatedCategory:!1,dataKey:void 0,domain:void 0,id:Ma.angleAxisId,includeHidden:!1,name:void 0,reversed:Ma.reversed,scale:Ma.scale,tick:Ma.tick,tickCount:void 0,ticks:void 0,type:Ma.type,unit:void 0,niceTicks:"auto"},uP={allowDataOverflow:Ei.allowDataOverflow,allowDecimals:Ei.allowDecimals,allowDuplicatedCategory:Ei.allowDuplicatedCategory,dataKey:void 0,domain:void 0,id:Ei.radiusAxisId,includeHidden:Ei.includeHidden,name:void 0,reversed:Ei.reversed,scale:Ei.scale,tick:Ei.tick,tickCount:Ei.tickCount,ticks:void 0,type:Ei.type,unit:void 0,niceTicks:"auto"},ire=(e,t)=>{if(t!=null)return e.polarAxis.angleAxis[t]},Zx=q([ire,ZD],(e,t)=>{var n;if(e!=null)return e;var r=(n=Wh(t,"angleAxis",lP.type))!==null&&n!==void 0?n:"category";return Sp(Sp({},lP),{},{type:r})}),ore=(e,t)=>e.polarAxis.radiusAxis[t],Qx=q([ore,ZD],(e,t)=>{var n;if(e!=null)return e;var r=(n=Wh(t,"radiusAxis",uP.type))!==null&&n!==void 0?n:"category";return Sp(Sp({},uP),{},{type:r})}),Hh=e=>e.polarOptions,Jx=q([xo,wo,wn],kne),Mj=q([Hh,Jx],(e,t)=>{if(e!=null)return fi(e.innerRadius,t,0)}),Dj=q([Hh,Jx],(e,t)=>{if(e!=null)return fi(e.outerRadius,t,t*.8)}),are=e=>{if(e==null)return[0,0];var{startAngle:t,endAngle:n}=e;return[t,n]},jj=q([Hh],are);q([Zx,jj],zh);var Lj=q([Jx,Mj,Dj],(e,t,n)=>{if(!(e==null||t==null||n==null))return[t,n]});q([Qx,Lj],zh);var $j=q([At,Hh,Mj,Dj,xo,wo],(e,t,n,r,i,o)=>{if(!(e!=="centric"&&e!=="radial"||t==null||n==null||r==null)){var{cx:a,cy:s,startAngle:u,endAngle:c}=t;return{cx:fi(a,i,i/2),cy:fi(s,o,o/2),innerRadius:n,outerRadius:r,startAngle:u,endAngle:c,clockWise:!1}}}),Cn=(e,t)=>t,Uh=(e,t,n)=>n;function ew(e){return e?.id}function Fj(e,t,n){var{chartData:r=[]}=t,{allowDuplicatedCategory:i,dataKey:o}=n,a=new Map;return e.forEach(s=>{var u,c=(u=s.data)!==null&&u!==void 0?u:r;if(!(c==null||c.length===0)){var d=ew(s);c.forEach((p,g)=>{var h=o==null||i?g:String(Mn(p,o,null)),y=Mn(p,s.dataKey,0),b;a.has(h)?b=a.get(h):b={},Object.assign(b,{[d]:y}),a.set(h,b)})}}),Array.from(a.values())}function Gh(e){return"stackId"in e&&e.stackId!=null&&e.dataKey!=null}var qh=(e,t)=>e===t?!0:e==null||t==null?!1:e[0]===t[0]&&e[1]===t[1];function Kh(e,t){return Array.isArray(e)&&Array.isArray(t)&&e.length===0&&t.length===0?!0:e===t}function sre(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 Sn=e=>{var t=At(e);return t==="horizontal"?"xAxis":t==="vertical"?"yAxis":t==="centric"?"angleAxis":"radiusAxis"},Al=e=>e.tooltip.settings.axisId;function tw(e){if(e!=null){var t=e.ticks,n=e.bandwidth,r=e.range(),i=[Math.min(...r),Math.max(...r)];return{domain:()=>e.domain(),range:(function(o){function a(){return o.apply(this,arguments)}return a.toString=function(){return o.toString()},a})(()=>i),rangeMin:()=>i[0],rangeMax:()=>i[1],isInRange(o){var a=i[0],s=i[1];return a<=s?o>=a&&o<=s:o>=s&&o<=a},bandwidth:n?()=>n.call(e):void 0,ticks:t?o=>t.call(e,o):void 0,map:(o,a)=>{var s=e(o);if(s!=null){if(e.bandwidth&&a!==null&&a!==void 0&&a.position){var u=e.bandwidth();switch(a.position){case"middle":s+=u/2;break;case"end":s+=u;break}}return s}}}}}var lre=(e,t)=>{if(t!=null)switch(e){case"linear":{if(!Ti(t)){for(var n,r,i=0;i<t.length;i++){var o=t[i];ut(o)&&((n===void 0||o<n)&&(n=o),(r===void 0||o>r)&&(r=o))}return n!==void 0&&r!==void 0?[n,r]:void 0}return t}default:return t}};function na(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function ure(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function nw(e){let t,n,r;e.length!==2?(t=na,n=(s,u)=>na(e(s),u),r=(s,u)=>e(s)-u):(t=e===na||e===ure?e:cre,n=e,r=e);function i(s,u,c=0,d=s.length){if(c<d){if(t(u,u)!==0)return d;do{const p=c+d>>>1;n(s[p],u)<0?c=p+1:d=p}while(c<d)}return c}function o(s,u,c=0,d=s.length){if(c<d){if(t(u,u)!==0)return d;do{const p=c+d>>>1;n(s[p],u)<=0?c=p+1:d=p}while(c<d)}return c}function a(s,u,c=0,d=s.length){const p=i(s,u,c,d-1);return p>c&&r(s[p-1],u)>-r(s[p],u)?p-1:p}return{left:i,center:a,right:o}}function cre(){return 0}function Vj(e){return e===null?NaN:+e}function*fre(e,t){for(let n of e)n!=null&&(n=+n)>=n&&(yield n)}const dre=nw(na),wc=dre.right;nw(Vj).center;class cP extends Map{constructor(t,n=gre){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),t!=null)for(const[r,i]of t)this.set(r,i)}get(t){return super.get(fP(this,t))}has(t){return super.has(fP(this,t))}set(t,n){return super.set(pre(this,t),n)}delete(t){return super.delete(hre(this,t))}}function fP({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function pre({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function hre({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function gre(e){return e!==null&&typeof e=="object"?e.valueOf():e}function mre(e=na){if(e===na)return Bj;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 Bj(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const vre=Math.sqrt(50),yre=Math.sqrt(10),bre=Math.sqrt(2);function Ep(e,t,n){const r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),o=r/Math.pow(10,i),a=o>=vre?10:o>=yre?5:o>=bre?2:1;let s,u,c;return i<0?(c=Math.pow(10,-i)/a,s=Math.round(e*c),u=Math.round(t*c),s/c<e&&++s,u/c>t&&--u,c=-c):(c=Math.pow(10,i)*a,s=Math.round(e/c),u=Math.round(t/c),s*c<e&&++s,u*c>t&&--u),u<s&&.5<=n&&n<2?Ep(e,t,n*2):[s,u,c]}function Pb(e,t,n){if(t=+t,e=+e,n=+n,!(n>0))return[];if(e===t)return[e];const r=t<e,[i,o,a]=r?Ep(t,e,n):Ep(e,t,n);if(!(o>=i))return[];const s=o-i+1,u=new Array(s);if(r)if(a<0)for(let c=0;c<s;++c)u[c]=(o-c)/-a;else for(let c=0;c<s;++c)u[c]=(o-c)*a;else if(a<0)for(let c=0;c<s;++c)u[c]=(i+c)/-a;else for(let c=0;c<s;++c)u[c]=(i+c)*a;return u}function Ab(e,t,n){return t=+t,e=+e,n=+n,Ep(e,t,n)[2]}function Rb(e,t,n){t=+t,e=+e,n=+n;const r=t<e,i=r?Ab(t,e,n):Ab(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}function dP(e,t){let n;for(const r of e)r!=null&&(n<r||n===void 0&&r>=r)&&(n=r);return n}function pP(e,t){let n;for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);return n}function zj(e,t,n=0,r=1/0,i){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(i=i===void 0?Bj:mre(i);r>n;){if(r-n>600){const u=r-n+1,c=t-n+1,d=Math.log(u),p=.5*Math.exp(2*d/3),g=.5*Math.sqrt(d*p*(u-p)/u)*(c-u/2<0?-1:1),h=Math.max(n,Math.floor(t-c*p/u+g)),y=Math.min(r,Math.floor(t+(u-c)*p/u+g));zj(e,t,h,y,i)}const o=e[t];let a=n,s=r;for(gu(e,n,t),i(e[r],o)>0&&gu(e,n,r);a<s;){for(gu(e,a,s),++a,--s;i(e[a],o)<0;)++a;for(;i(e[s],o)>0;)--s}i(e[n],o)===0?gu(e,n,s):(++s,gu(e,s,r)),s<=t&&(n=s+1),t<=s&&(r=s-1)}return e}function gu(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function xre(e,t,n){if(e=Float64Array.from(fre(e)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return pP(e);if(t>=1)return dP(e);var r,i=(r-1)*t,o=Math.floor(i),a=dP(zj(e,o).subarray(0,o+1)),s=pP(e.subarray(o+1));return a+(s-a)*(i-o)}}function wre(e,t,n=Vj){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,i=(r-1)*t,o=Math.floor(i),a=+n(e[o],o,e),s=+n(e[o+1],o+1,e);return a+(s-a)*(i-o)}}function Cre(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((t-e)/n))|0,o=new Array(i);++r<i;)o[r]=e+r*n;return o}function ri(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function So(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 Ib=Symbol("implicit");function rw(){var e=new cP,t=[],n=[],r=Ib;function i(o){let a=e.get(o);if(a===void 0){if(r!==Ib)return r;e.set(o,a=t.push(o)-1)}return n[a%n.length]}return i.domain=function(o){if(!arguments.length)return t.slice();t=[],e=new cP;for(const a of o)e.has(a)||e.set(a,t.push(a)-1);return i},i.range=function(o){return arguments.length?(n=Array.from(o),i):n.slice()},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return rw(t,n).unknown(r)},ri.apply(i,arguments),i}function iw(){var e=rw().unknown(void 0),t=e.domain,n=e.range,r=0,i=1,o,a,s=!1,u=0,c=0,d=.5;delete e.unknown;function p(){var g=t().length,h=i<r,y=h?i:r,b=h?r:i;o=(b-y)/Math.max(1,g-u+c*2),s&&(o=Math.floor(o)),y+=(b-y-o*(g-u))*d,a=o*(1-u),s&&(y=Math.round(y),a=Math.round(a));var v=Cre(g).map(function(w){return y+o*w});return n(h?v.reverse():v)}return e.domain=function(g){return arguments.length?(t(g),p()):t()},e.range=function(g){return arguments.length?([r,i]=g,r=+r,i=+i,p()):[r,i]},e.rangeRound=function(g){return[r,i]=g,r=+r,i=+i,s=!0,p()},e.bandwidth=function(){return a},e.step=function(){return o},e.round=function(g){return arguments.length?(s=!!g,p()):s},e.padding=function(g){return arguments.length?(u=Math.min(1,c=+g),p()):u},e.paddingInner=function(g){return arguments.length?(u=Math.min(1,g),p()):u},e.paddingOuter=function(g){return arguments.length?(c=+g,p()):c},e.align=function(g){return arguments.length?(d=Math.max(0,Math.min(1,g)),p()):d},e.copy=function(){return iw(t(),[r,i]).round(s).paddingInner(u).paddingOuter(c).align(d)},ri.apply(p(),arguments)}function Wj(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return Wj(t())},e}function Sre(){return Wj(iw.apply(null,arguments).paddingInner(1))}function ow(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Hj(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Cc(){}var Zu=.7,_p=1/Zu,cl="\\s*([+-]?\\d+)\\s*",Qu="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",ki="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Ere=/^#([0-9a-f]{3,8})$/,_re=new RegExp(`^rgb\\(${cl},${cl},${cl}\\)$`),Ore=new RegExp(`^rgb\\(${ki},${ki},${ki}\\)$`),Pre=new RegExp(`^rgba\\(${cl},${cl},${cl},${Qu}\\)$`),Are=new RegExp(`^rgba\\(${ki},${ki},${ki},${Qu}\\)$`),Rre=new RegExp(`^hsl\\(${Qu},${ki},${ki}\\)$`),Ire=new RegExp(`^hsla\\(${Qu},${ki},${ki},${Qu}\\)$`),hP={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};ow(Cc,Ju,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:gP,formatHex:gP,formatHex8:Tre,formatHsl:kre,formatRgb:mP,toString:mP});function gP(){return this.rgb().formatHex()}function Tre(){return this.rgb().formatHex8()}function kre(){return Uj(this).formatHsl()}function mP(){return this.rgb().formatRgb()}function Ju(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=Ere.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?vP(t):n===3?new dr(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?pd(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?pd(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=_re.exec(e))?new dr(t[1],t[2],t[3],1):(t=Ore.exec(e))?new dr(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Pre.exec(e))?pd(t[1],t[2],t[3],t[4]):(t=Are.exec(e))?pd(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=Rre.exec(e))?xP(t[1],t[2]/100,t[3]/100,1):(t=Ire.exec(e))?xP(t[1],t[2]/100,t[3]/100,t[4]):hP.hasOwnProperty(e)?vP(hP[e]):e==="transparent"?new dr(NaN,NaN,NaN,0):null}function vP(e){return new dr(e>>16&255,e>>8&255,e&255,1)}function pd(e,t,n,r){return r<=0&&(e=t=n=NaN),new dr(e,t,n,r)}function Nre(e){return e instanceof Cc||(e=Ju(e)),e?(e=e.rgb(),new dr(e.r,e.g,e.b,e.opacity)):new dr}function Tb(e,t,n,r){return arguments.length===1?Nre(e):new dr(e,t,n,r??1)}function dr(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}ow(dr,Tb,Hj(Cc,{brighter(e){return e=e==null?_p:Math.pow(_p,e),new dr(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Zu:Math.pow(Zu,e),new dr(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new dr(Ya(this.r),Ya(this.g),Ya(this.b),Op(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:yP,formatHex:yP,formatHex8:Mre,formatRgb:bP,toString:bP}));function yP(){return`#${Wa(this.r)}${Wa(this.g)}${Wa(this.b)}`}function Mre(){return`#${Wa(this.r)}${Wa(this.g)}${Wa(this.b)}${Wa((isNaN(this.opacity)?1:this.opacity)*255)}`}function bP(){const e=Op(this.opacity);return`${e===1?"rgb(":"rgba("}${Ya(this.r)}, ${Ya(this.g)}, ${Ya(this.b)}${e===1?")":`, ${e})`}`}function Op(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Ya(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Wa(e){return e=Ya(e),(e<16?"0":"")+e.toString(16)}function xP(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new ui(e,t,n,r)}function Uj(e){if(e instanceof ui)return new ui(e.h,e.s,e.l,e.opacity);if(e instanceof Cc||(e=Ju(e)),!e)return new ui;if(e instanceof ui)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),a=NaN,s=o-i,u=(o+i)/2;return s?(t===o?a=(n-r)/s+(n<r)*6:n===o?a=(r-t)/s+2:a=(t-n)/s+4,s/=u<.5?o+i:2-o-i,a*=60):s=u>0&&u<1?0:a,new ui(a,s,u,e.opacity)}function Dre(e,t,n,r){return arguments.length===1?Uj(e):new ui(e,t,n,r??1)}function ui(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}ow(ui,Dre,Hj(Cc,{brighter(e){return e=e==null?_p:Math.pow(_p,e),new ui(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Zu:Math.pow(Zu,e),new ui(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,i=2*n-r;return new dr(ty(e>=240?e-240:e+120,i,r),ty(e,i,r),ty(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new ui(wP(this.h),hd(this.s),hd(this.l),Op(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=Op(this.opacity);return`${e===1?"hsl(":"hsla("}${wP(this.h)}, ${hd(this.s)*100}%, ${hd(this.l)*100}%${e===1?")":`, ${e})`}`}}));function wP(e){return e=(e||0)%360,e<0?e+360:e}function hd(e){return Math.max(0,Math.min(1,e||0))}function ty(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 aw=e=>()=>e;function jre(e,t){return function(n){return e+n*t}}function Lre(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 $re(e){return(e=+e)==1?Gj:function(t,n){return n-t?Lre(t,n,e):aw(isNaN(t)?n:t)}}function Gj(e,t){var n=t-e;return n?jre(e,n):aw(isNaN(e)?t:e)}const CP=(function e(t){var n=$re(t);function r(i,o){var a=n((i=Tb(i)).r,(o=Tb(o)).r),s=n(i.g,o.g),u=n(i.b,o.b),c=Gj(i.opacity,o.opacity);return function(d){return i.r=a(d),i.g=s(d),i.b=u(d),i.opacity=c(d),i+""}}return r.gamma=e,r})(1);function Fre(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(o){for(i=0;i<n;++i)r[i]=e[i]*(1-o)+t[i]*o;return r}}function Vre(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function Bre(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,i=new Array(r),o=new Array(n),a;for(a=0;a<r;++a)i[a]=Rl(e[a],t[a]);for(;a<n;++a)o[a]=t[a];return function(s){for(a=0;a<r;++a)o[a]=i[a](s);return o}}function zre(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function Pp(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function Wre(e,t){var n={},r={},i;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(i in t)i in e?n[i]=Rl(e[i],t[i]):r[i]=t[i];return function(o){for(i in n)r[i]=n[i](o);return r}}var kb=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ny=new RegExp(kb.source,"g");function Hre(e){return function(){return e}}function Ure(e){return function(t){return e(t)+""}}function Gre(e,t){var n=kb.lastIndex=ny.lastIndex=0,r,i,o,a=-1,s=[],u=[];for(e=e+"",t=t+"";(r=kb.exec(e))&&(i=ny.exec(t));)(o=i.index)>n&&(o=t.slice(n,o),s[a]?s[a]+=o:s[++a]=o),(r=r[0])===(i=i[0])?s[a]?s[a]+=i:s[++a]=i:(s[++a]=null,u.push({i:a,x:Pp(r,i)})),n=ny.lastIndex;return n<t.length&&(o=t.slice(n),s[a]?s[a]+=o:s[++a]=o),s.length<2?u[0]?Ure(u[0].x):Hre(t):(t=u.length,function(c){for(var d=0,p;d<t;++d)s[(p=u[d]).i]=p.x(c);return s.join("")})}function Rl(e,t){var n=typeof t,r;return t==null||n==="boolean"?aw(t):(n==="number"?Pp:n==="string"?(r=Ju(t))?(t=r,CP):Gre:t instanceof Ju?CP:t instanceof Date?zre:Vre(t)?Fre:Array.isArray(t)?Bre:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?Wre:Pp)(e,t)}function sw(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function qre(e,t){t===void 0&&(t=e,e=Rl);for(var n=0,r=t.length-1,i=t[0],o=new Array(r<0?0:r);n<r;)o[n]=e(i,i=t[++n]);return function(a){var s=Math.max(0,Math.min(r-1,Math.floor(a*=r)));return o[s](a-s)}}function Kre(e){return function(){return e}}function Ap(e){return+e}var SP=[0,1];function Qn(e){return e}function Nb(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:Kre(isNaN(t)?NaN:.5)}function Yre(e,t){var n;return e>t&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function Xre(e,t,n){var r=e[0],i=e[1],o=t[0],a=t[1];return i<r?(r=Nb(i,r),o=n(a,o)):(r=Nb(r,i),o=n(o,a)),function(s){return o(r(s))}}function Zre(e,t,n){var r=Math.min(e.length,t.length)-1,i=new Array(r),o=new Array(r),a=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++a<r;)i[a]=Nb(e[a],e[a+1]),o[a]=n(t[a],t[a+1]);return function(s){var u=wc(e,s,1,r)-1;return o[u](i[u](s))}}function Sc(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function Yh(){var e=SP,t=SP,n=Rl,r,i,o,a=Qn,s,u,c;function d(){var g=Math.min(e.length,t.length);return a!==Qn&&(a=Yre(e[0],e[g-1])),s=g>2?Zre:Xre,u=c=null,p}function p(g){return g==null||isNaN(g=+g)?o:(u||(u=s(e.map(r),t,n)))(r(a(g)))}return p.invert=function(g){return a(i((c||(c=s(t,e.map(r),Pp)))(g)))},p.domain=function(g){return arguments.length?(e=Array.from(g,Ap),d()):e.slice()},p.range=function(g){return arguments.length?(t=Array.from(g),d()):t.slice()},p.rangeRound=function(g){return t=Array.from(g),n=sw,d()},p.clamp=function(g){return arguments.length?(a=g?!0:Qn,d()):a!==Qn},p.interpolate=function(g){return arguments.length?(n=g,d()):n},p.unknown=function(g){return arguments.length?(o=g,p):o},function(g,h){return r=g,i=h,d()}}function lw(){return Yh()(Qn,Qn)}function Qre(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function Rp(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 yl(e){return e=Rp(Math.abs(e)),e?e[1]:NaN}function Jre(e,t){return function(n,r){for(var i=n.length,o=[],a=0,s=e[0],u=0;i>0&&s>0&&(u+s+1>r&&(s=Math.max(1,r-u)),o.push(n.substring(i-=s,i+s)),!((u+=s+1)>r));)s=e[a=(a+1)%e.length];return o.reverse().join(t)}}function eie(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var tie=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function ec(e){if(!(t=tie.exec(e)))throw new Error("invalid format: "+e);var t;return new uw({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]})}ec.prototype=uw.prototype;function uw(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+""}uw.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 nie(e){e:for(var t=e.length,n=1,r=-1,i;n<t;++n)switch(e[n]){case".":r=i=n;break;case"0":r===0&&(r=n),i=n;break;default:if(!+e[n])break e;r>0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(i+1):e}var Ip;function rie(e,t){var n=Rp(e,t);if(!n)return Ip=void 0,e.toPrecision(t);var r=n[0],i=n[1],o=i-(Ip=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+Rp(e,Math.max(0,t+o-1))[0]}function EP(e,t){var n=Rp(e,t);if(!n)return e+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}const _P={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:Qre,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)=>EP(e*100,t),r:EP,s:rie,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function OP(e){return e}var PP=Array.prototype.map,AP=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function iie(e){var t=e.grouping===void 0||e.thousands===void 0?OP:Jre(PP.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",r=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",o=e.numerals===void 0?OP:eie(PP.call(e.numerals,String)),a=e.percent===void 0?"%":e.percent+"",s=e.minus===void 0?"−":e.minus+"",u=e.nan===void 0?"NaN":e.nan+"";function c(p,g){p=ec(p);var h=p.fill,y=p.align,b=p.sign,v=p.symbol,w=p.zero,C=p.width,E=p.comma,_=p.precision,P=p.trim,R=p.type;R==="n"?(E=!0,R="g"):_P[R]||(_===void 0&&(_=12),P=!0,R="g"),(w||h==="0"&&y==="=")&&(w=!0,h="0",y="=");var I=(g&&g.prefix!==void 0?g.prefix:"")+(v==="$"?n:v==="#"&&/[boxX]/.test(R)?"0"+R.toLowerCase():""),k=(v==="$"?r:/[%p]/.test(R)?a:"")+(g&&g.suffix!==void 0?g.suffix:""),B=_P[R],L=/[defgprs%]/.test(R);_=_===void 0?6:/[gprs]/.test(R)?Math.max(1,Math.min(21,_)):Math.max(0,Math.min(20,_));function V(D){var H=I,J=k,te,G,ee;if(R==="c")J=B(D)+J,D="";else{D=+D;var Q=D<0||1/D<0;if(D=isNaN(D)?u:B(Math.abs(D),_),P&&(D=nie(D)),Q&&+D==0&&b!=="+"&&(Q=!1),H=(Q?b==="("?b:s:b==="-"||b==="("?"":b)+H,J=(R==="s"&&!isNaN(D)&&Ip!==void 0?AP[8+Ip/3]:"")+J+(Q&&b==="("?")":""),L){for(te=-1,G=D.length;++te<G;)if(ee=D.charCodeAt(te),48>ee||ee>57){J=(ee===46?i+D.slice(te+1):D.slice(te))+J,D=D.slice(0,te);break}}}E&&!w&&(D=t(D,1/0));var pe=H.length+D.length+J.length,K=pe<C?new Array(C-pe+1).join(h):"";switch(E&&w&&(D=t(K+D,K.length?C-J.length:1/0),K=""),y){case"<":D=H+D+J+K;break;case"=":D=H+K+D+J;break;case"^":D=K.slice(0,pe=K.length>>1)+H+D+J+K.slice(pe);break;default:D=K+H+D+J;break}return o(D)}return V.toString=function(){return p+""},V}function d(p,g){var h=Math.max(-8,Math.min(8,Math.floor(yl(g)/3)))*3,y=Math.pow(10,-h),b=c((p=ec(p),p.type="f",p),{suffix:AP[8+h/3]});return function(v){return b(y*v)}}return{format:c,formatPrefix:d}}var gd,cw,qj;oie({thousands:",",grouping:[3],currency:["$",""]});function oie(e){return gd=iie(e),cw=gd.format,qj=gd.formatPrefix,gd}function aie(e){return Math.max(0,-yl(Math.abs(e)))}function sie(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(yl(t)/3)))*3-yl(Math.abs(e)))}function lie(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,yl(t)-yl(e))+1}function Kj(e,t,n,r){var i=Rb(e,t,n),o;switch(r=ec(r??",f"),r.type){case"s":{var a=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(o=sie(i,a))&&(r.precision=o),qj(r,a)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(o=lie(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=o-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(o=aie(i))&&(r.precision=o-(r.type==="%")*2);break}}return cw(r)}function ha(e){var t=e.domain;return e.ticks=function(n){var r=t();return Pb(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var i=t();return Kj(i[0],i[i.length-1],n??10,r)},e.nice=function(n){n==null&&(n=10);var r=t(),i=0,o=r.length-1,a=r[i],s=r[o],u,c,d=10;for(s<a&&(c=a,a=s,s=c,c=i,i=o,o=c);d-- >0;){if(c=Ab(a,s,n),c===u)return r[i]=a,r[o]=s,t(r);if(c>0)a=Math.floor(a/c)*c,s=Math.ceil(s/c)*c;else if(c<0)a=Math.ceil(a*c)/c,s=Math.floor(s*c)/c;else break;u=c}return e},e}function Yj(){var e=lw();return e.copy=function(){return Sc(e,Yj())},ri.apply(e,arguments),ha(e)}function Xj(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,Ap),n):e.slice()},n.unknown=function(r){return arguments.length?(t=r,n):t},n.copy=function(){return Xj(e).unknown(t)},e=arguments.length?Array.from(e,Ap):[0,1],ha(n)}function Zj(e,t){e=e.slice();var n=0,r=e.length-1,i=e[n],o=e[r],a;return o<i&&(a=n,n=r,r=a,a=i,i=o,o=a),e[n]=t.floor(i),e[r]=t.ceil(o),e}function RP(e){return Math.log(e)}function IP(e){return Math.exp(e)}function uie(e){return-Math.log(-e)}function cie(e){return-Math.exp(-e)}function fie(e){return isFinite(e)?+("1e"+e):e<0?0:e}function die(e){return e===10?fie:e===Math.E?Math.exp:t=>Math.pow(e,t)}function pie(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 TP(e){return(t,n)=>-e(-t,n)}function fw(e){const t=e(RP,IP),n=t.domain;let r=10,i,o;function a(){return i=pie(r),o=die(r),n()[0]<0?(i=TP(i),o=TP(o),e(uie,cie)):e(RP,IP),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 u=n();let c=u[0],d=u[u.length-1];const p=d<c;p&&([c,d]=[d,c]);let g=i(c),h=i(d),y,b;const v=s==null?10:+s;let w=[];if(!(r%1)&&h-g<v){if(g=Math.floor(g),h=Math.ceil(h),c>0){for(;g<=h;++g)for(y=1;y<r;++y)if(b=g<0?y/o(-g):y*o(g),!(b<c)){if(b>d)break;w.push(b)}}else for(;g<=h;++g)for(y=r-1;y>=1;--y)if(b=g>0?y/o(-g):y*o(g),!(b<c)){if(b>d)break;w.push(b)}w.length*2<v&&(w=Pb(c,d,v))}else w=Pb(g,h,Math.min(h-g,v)).map(o);return p?w.reverse():w},t.tickFormat=(s,u)=>{if(s==null&&(s=10),u==null&&(u=r===10?"s":","),typeof u!="function"&&(!(r%1)&&(u=ec(u)).precision==null&&(u.trim=!0),u=cw(u)),s===1/0)return u;const c=Math.max(1,r*s/t.ticks().length);return d=>{let p=d/o(Math.round(i(d)));return p*r<r-.5&&(p*=r),p<=c?u(d):""}},t.nice=()=>n(Zj(n(),{floor:s=>o(Math.floor(i(s))),ceil:s=>o(Math.ceil(i(s)))})),t}function Qj(){const e=fw(Yh()).domain([1,10]);return e.copy=()=>Sc(e,Qj()).base(e.base()),ri.apply(e,arguments),e}function kP(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function NP(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function dw(e){var t=1,n=e(kP(t),NP(t));return n.constant=function(r){return arguments.length?e(kP(t=+r),NP(t)):t},ha(n)}function Jj(){var e=dw(Yh());return e.copy=function(){return Sc(e,Jj()).constant(e.constant())},ri.apply(e,arguments)}function MP(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function hie(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function gie(e){return e<0?-e*e:e*e}function pw(e){var t=e(Qn,Qn),n=1;function r(){return n===1?e(Qn,Qn):n===.5?e(hie,gie):e(MP(n),MP(1/n))}return t.exponent=function(i){return arguments.length?(n=+i,r()):n},ha(t)}function hw(){var e=pw(Yh());return e.copy=function(){return Sc(e,hw()).exponent(e.exponent())},ri.apply(e,arguments),e}function mie(){return hw.apply(null,arguments).exponent(.5)}function DP(e){return Math.sign(e)*e*e}function vie(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function e2(){var e=lw(),t=[0,1],n=!1,r;function i(o){var a=vie(e(o));return isNaN(a)?r:n?Math.round(a):a}return i.invert=function(o){return e.invert(DP(o))},i.domain=function(o){return arguments.length?(e.domain(o),i):e.domain()},i.range=function(o){return arguments.length?(e.range((t=Array.from(o,Ap)).map(DP)),i):t.slice()},i.rangeRound=function(o){return i.range(o).round(!0)},i.round=function(o){return arguments.length?(n=!!o,i):n},i.clamp=function(o){return arguments.length?(e.clamp(o),i):e.clamp()},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return e2(e.domain(),t).round(n).clamp(e.clamp()).unknown(r)},ri.apply(i,arguments),ha(i)}function t2(){var e=[],t=[],n=[],r;function i(){var a=0,s=Math.max(1,t.length);for(n=new Array(s-1);++a<s;)n[a-1]=wre(e,a/s);return o}function o(a){return a==null||isNaN(a=+a)?r:t[wc(n,a)]}return o.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]]},o.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(na),i()},o.range=function(a){return arguments.length?(t=Array.from(a),i()):t.slice()},o.unknown=function(a){return arguments.length?(r=a,o):r},o.quantiles=function(){return n.slice()},o.copy=function(){return t2().domain(e).range(t).unknown(r)},ri.apply(o,arguments)}function n2(){var e=0,t=1,n=1,r=[.5],i=[0,1],o;function a(u){return u!=null&&u<=u?i[wc(r,u,0,n)]:o}function s(){var u=-1;for(r=new Array(n);++u<n;)r[u]=((u+1)*t-(u-n)*e)/(n+1);return a}return a.domain=function(u){return arguments.length?([e,t]=u,e=+e,t=+t,s()):[e,t]},a.range=function(u){return arguments.length?(n=(i=Array.from(u)).length-1,s()):i.slice()},a.invertExtent=function(u){var c=i.indexOf(u);return c<0?[NaN,NaN]:c<1?[e,r[0]]:c>=n?[r[n-1],t]:[r[c-1],r[c]]},a.unknown=function(u){return arguments.length&&(o=u),a},a.thresholds=function(){return r.slice()},a.copy=function(){return n2().domain([e,t]).range(i).unknown(o)},ri.apply(ha(a),arguments)}function r2(){var e=[.5],t=[0,1],n,r=1;function i(o){return o!=null&&o<=o?t[wc(e,o,0,r)]:n}return i.domain=function(o){return arguments.length?(e=Array.from(o),r=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(o){return arguments.length?(t=Array.from(o),r=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(o){var a=t.indexOf(o);return[e[a-1],e[a]]},i.unknown=function(o){return arguments.length?(n=o,i):n},i.copy=function(){return r2().domain(e).range(t).unknown(n)},ri.apply(i,arguments)}const ry=new Date,iy=new Date;function hn(e,t,n,r){function i(o){return e(o=arguments.length===0?new Date:new Date(+o)),o}return i.floor=o=>(e(o=new Date(+o)),o),i.ceil=o=>(e(o=new Date(o-1)),t(o,1),e(o),o),i.round=o=>{const a=i(o),s=i.ceil(o);return o-a<s-o?a:s},i.offset=(o,a)=>(t(o=new Date(+o),a==null?1:Math.floor(a)),o),i.range=(o,a,s)=>{const u=[];if(o=i.ceil(o),s=s==null?1:Math.floor(s),!(o<a)||!(s>0))return u;let c;do u.push(c=new Date(+o)),t(o,s),e(o);while(c<o&&o<a);return u},i.filter=o=>hn(a=>{if(a>=a)for(;e(a),!o(a);)a.setTime(a-1)},(a,s)=>{if(a>=a)if(s<0)for(;++s<=0;)for(;t(a,-1),!o(a););else for(;--s>=0;)for(;t(a,1),!o(a););}),n&&(i.count=(o,a)=>(ry.setTime(+o),iy.setTime(+a),e(ry),e(iy),Math.floor(n(ry,iy))),i.every=o=>(o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?i.filter(r?a=>r(a)%o===0:a=>i.count(0,a)%o===0):i)),i}const Tp=hn(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);Tp.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?hn(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):Tp);Tp.range;const ro=1e3,Jr=ro*60,io=Jr*60,ho=io*24,gw=ho*7,jP=ho*30,oy=ho*365,Ha=hn(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*ro)},(e,t)=>(t-e)/ro,e=>e.getUTCSeconds());Ha.range;const mw=hn(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*ro)},(e,t)=>{e.setTime(+e+t*Jr)},(e,t)=>(t-e)/Jr,e=>e.getMinutes());mw.range;const vw=hn(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Jr)},(e,t)=>(t-e)/Jr,e=>e.getUTCMinutes());vw.range;const yw=hn(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*ro-e.getMinutes()*Jr)},(e,t)=>{e.setTime(+e+t*io)},(e,t)=>(t-e)/io,e=>e.getHours());yw.range;const bw=hn(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*io)},(e,t)=>(t-e)/io,e=>e.getUTCHours());bw.range;const Ec=hn(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Jr)/ho,e=>e.getDate()-1);Ec.range;const Xh=hn(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/ho,e=>e.getUTCDate()-1);Xh.range;const i2=hn(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/ho,e=>Math.floor(e/ho));i2.range;function ps(e){return hn(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())*Jr)/gw)}const Zh=ps(0),kp=ps(1),yie=ps(2),bie=ps(3),bl=ps(4),xie=ps(5),wie=ps(6);Zh.range;kp.range;yie.range;bie.range;bl.range;xie.range;wie.range;function hs(e){return hn(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)/gw)}const Qh=hs(0),Np=hs(1),Cie=hs(2),Sie=hs(3),xl=hs(4),Eie=hs(5),_ie=hs(6);Qh.range;Np.range;Cie.range;Sie.range;xl.range;Eie.range;_ie.range;const xw=hn(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());xw.range;const ww=hn(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());ww.range;const go=hn(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());go.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:hn(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)});go.range;const mo=hn(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());mo.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:hn(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)});mo.range;function o2(e,t,n,r,i,o){const a=[[Ha,1,ro],[Ha,5,5*ro],[Ha,15,15*ro],[Ha,30,30*ro],[o,1,Jr],[o,5,5*Jr],[o,15,15*Jr],[o,30,30*Jr],[i,1,io],[i,3,3*io],[i,6,6*io],[i,12,12*io],[r,1,ho],[r,2,2*ho],[n,1,gw],[t,1,jP],[t,3,3*jP],[e,1,oy]];function s(c,d,p){const g=d<c;g&&([c,d]=[d,c]);const h=p&&typeof p.range=="function"?p:u(c,d,p),y=h?h.range(c,+d+1):[];return g?y.reverse():y}function u(c,d,p){const g=Math.abs(d-c)/p,h=nw(([,,v])=>v).right(a,g);if(h===a.length)return e.every(Rb(c/oy,d/oy,p));if(h===0)return Tp.every(Math.max(Rb(c,d,p),1));const[y,b]=a[g/a[h-1][2]<a[h][2]/g?h-1:h];return y.every(b)}return[s,u]}const[Oie,Pie]=o2(mo,ww,Qh,i2,bw,vw),[Aie,Rie]=o2(go,xw,Zh,Ec,yw,mw);function ay(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 sy(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 mu(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function Iie(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,o=e.days,a=e.shortDays,s=e.months,u=e.shortMonths,c=vu(i),d=yu(i),p=vu(o),g=yu(o),h=vu(a),y=yu(a),b=vu(s),v=yu(s),w=vu(u),C=yu(u),E={a:ee,A:Q,b:pe,B:K,c:null,d:zP,e:zP,f:Jie,g:uoe,G:foe,H:Xie,I:Zie,j:Qie,L:a2,m:eoe,M:toe,p:Ae,q:Se,Q:UP,s:GP,S:noe,u:roe,U:ioe,V:ooe,w:aoe,W:soe,x:null,X:null,y:loe,Y:coe,Z:doe,"%":HP},_={a:$e,A:we,b:Ce,B:ze,c:null,d:WP,e:WP,f:moe,g:Ooe,G:Aoe,H:poe,I:hoe,j:goe,L:l2,m:voe,M:yoe,p:Ke,q:Fe,Q:UP,s:GP,S:boe,u:xoe,U:woe,V:Coe,w:Soe,W:Eoe,x:null,X:null,y:_oe,Y:Poe,Z:Roe,"%":HP},P={a:L,A:V,b:D,B:H,c:J,d:VP,e:VP,f:Gie,g:FP,G:$P,H:BP,I:BP,j:zie,L:Uie,m:Bie,M:Wie,p:B,q:Vie,Q:Kie,s:Yie,S:Hie,u:Die,U:jie,V:Lie,w:Mie,W:$ie,x:te,X:G,y:FP,Y:$P,Z:Fie,"%":qie};E.x=R(n,E),E.X=R(r,E),E.c=R(t,E),_.x=R(n,_),_.X=R(r,_),_.c=R(t,_);function R(Y,oe){return function(ne){var $=[],ie=-1,Z=0,Re=Y.length,U,fe,me;for(ne instanceof Date||(ne=new Date(+ne));++ie<Re;)Y.charCodeAt(ie)===37&&($.push(Y.slice(Z,ie)),(fe=LP[U=Y.charAt(++ie)])!=null?U=Y.charAt(++ie):fe=U==="e"?" ":"0",(me=oe[U])&&(U=me(ne,fe)),$.push(U),Z=ie+1);return $.push(Y.slice(Z,ie)),$.join("")}}function I(Y,oe){return function(ne){var $=mu(1900,void 0,1),ie=k($,Y,ne+="",0),Z,Re;if(ie!=ne.length)return null;if("Q"in $)return new Date($.Q);if("s"in $)return new Date($.s*1e3+("L"in $?$.L:0));if(oe&&!("Z"in $)&&($.Z=0),"p"in $&&($.H=$.H%12+$.p*12),$.m===void 0&&($.m="q"in $?$.q:0),"V"in $){if($.V<1||$.V>53)return null;"w"in $||($.w=1),"Z"in $?(Z=sy(mu($.y,0,1)),Re=Z.getUTCDay(),Z=Re>4||Re===0?Np.ceil(Z):Np(Z),Z=Xh.offset(Z,($.V-1)*7),$.y=Z.getUTCFullYear(),$.m=Z.getUTCMonth(),$.d=Z.getUTCDate()+($.w+6)%7):(Z=ay(mu($.y,0,1)),Re=Z.getDay(),Z=Re>4||Re===0?kp.ceil(Z):kp(Z),Z=Ec.offset(Z,($.V-1)*7),$.y=Z.getFullYear(),$.m=Z.getMonth(),$.d=Z.getDate()+($.w+6)%7)}else("W"in $||"U"in $)&&("w"in $||($.w="u"in $?$.u%7:"W"in $?1:0),Re="Z"in $?sy(mu($.y,0,1)).getUTCDay():ay(mu($.y,0,1)).getDay(),$.m=0,$.d="W"in $?($.w+6)%7+$.W*7-(Re+5)%7:$.w+$.U*7-(Re+6)%7);return"Z"in $?($.H+=$.Z/100|0,$.M+=$.Z%100,sy($)):ay($)}}function k(Y,oe,ne,$){for(var ie=0,Z=oe.length,Re=ne.length,U,fe;ie<Z;){if($>=Re)return-1;if(U=oe.charCodeAt(ie++),U===37){if(U=oe.charAt(ie++),fe=P[U in LP?oe.charAt(ie++):U],!fe||($=fe(Y,ne,$))<0)return-1}else if(U!=ne.charCodeAt($++))return-1}return $}function B(Y,oe,ne){var $=c.exec(oe.slice(ne));return $?(Y.p=d.get($[0].toLowerCase()),ne+$[0].length):-1}function L(Y,oe,ne){var $=h.exec(oe.slice(ne));return $?(Y.w=y.get($[0].toLowerCase()),ne+$[0].length):-1}function V(Y,oe,ne){var $=p.exec(oe.slice(ne));return $?(Y.w=g.get($[0].toLowerCase()),ne+$[0].length):-1}function D(Y,oe,ne){var $=w.exec(oe.slice(ne));return $?(Y.m=C.get($[0].toLowerCase()),ne+$[0].length):-1}function H(Y,oe,ne){var $=b.exec(oe.slice(ne));return $?(Y.m=v.get($[0].toLowerCase()),ne+$[0].length):-1}function J(Y,oe,ne){return k(Y,t,oe,ne)}function te(Y,oe,ne){return k(Y,n,oe,ne)}function G(Y,oe,ne){return k(Y,r,oe,ne)}function ee(Y){return a[Y.getDay()]}function Q(Y){return o[Y.getDay()]}function pe(Y){return u[Y.getMonth()]}function K(Y){return s[Y.getMonth()]}function Ae(Y){return i[+(Y.getHours()>=12)]}function Se(Y){return 1+~~(Y.getMonth()/3)}function $e(Y){return a[Y.getUTCDay()]}function we(Y){return o[Y.getUTCDay()]}function Ce(Y){return u[Y.getUTCMonth()]}function ze(Y){return s[Y.getUTCMonth()]}function Ke(Y){return i[+(Y.getUTCHours()>=12)]}function Fe(Y){return 1+~~(Y.getUTCMonth()/3)}return{format:function(Y){var oe=R(Y+="",E);return oe.toString=function(){return Y},oe},parse:function(Y){var oe=I(Y+="",!1);return oe.toString=function(){return Y},oe},utcFormat:function(Y){var oe=R(Y+="",_);return oe.toString=function(){return Y},oe},utcParse:function(Y){var oe=I(Y+="",!0);return oe.toString=function(){return Y},oe}}}var LP={"-":"",_:" ",0:"0"},En=/^\s*\d+/,Tie=/^%/,kie=/[\\^$*+?|[\]().{}]/g;function dt(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",o=i.length;return r+(o<n?new Array(n-o+1).join(t)+i:i)}function Nie(e){return e.replace(kie,"\\$&")}function vu(e){return new RegExp("^(?:"+e.map(Nie).join("|")+")","i")}function yu(e){return new Map(e.map((t,n)=>[t.toLowerCase(),n]))}function Mie(e,t,n){var r=En.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function Die(e,t,n){var r=En.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function jie(e,t,n){var r=En.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function Lie(e,t,n){var r=En.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function $ie(e,t,n){var r=En.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function $P(e,t,n){var r=En.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function FP(e,t,n){var r=En.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Fie(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 Vie(e,t,n){var r=En.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function Bie(e,t,n){var r=En.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function VP(e,t,n){var r=En.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function zie(e,t,n){var r=En.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function BP(e,t,n){var r=En.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function Wie(e,t,n){var r=En.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function Hie(e,t,n){var r=En.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function Uie(e,t,n){var r=En.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function Gie(e,t,n){var r=En.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function qie(e,t,n){var r=Tie.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function Kie(e,t,n){var r=En.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function Yie(e,t,n){var r=En.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function zP(e,t){return dt(e.getDate(),t,2)}function Xie(e,t){return dt(e.getHours(),t,2)}function Zie(e,t){return dt(e.getHours()%12||12,t,2)}function Qie(e,t){return dt(1+Ec.count(go(e),e),t,3)}function a2(e,t){return dt(e.getMilliseconds(),t,3)}function Jie(e,t){return a2(e,t)+"000"}function eoe(e,t){return dt(e.getMonth()+1,t,2)}function toe(e,t){return dt(e.getMinutes(),t,2)}function noe(e,t){return dt(e.getSeconds(),t,2)}function roe(e){var t=e.getDay();return t===0?7:t}function ioe(e,t){return dt(Zh.count(go(e)-1,e),t,2)}function s2(e){var t=e.getDay();return t>=4||t===0?bl(e):bl.ceil(e)}function ooe(e,t){return e=s2(e),dt(bl.count(go(e),e)+(go(e).getDay()===4),t,2)}function aoe(e){return e.getDay()}function soe(e,t){return dt(kp.count(go(e)-1,e),t,2)}function loe(e,t){return dt(e.getFullYear()%100,t,2)}function uoe(e,t){return e=s2(e),dt(e.getFullYear()%100,t,2)}function coe(e,t){return dt(e.getFullYear()%1e4,t,4)}function foe(e,t){var n=e.getDay();return e=n>=4||n===0?bl(e):bl.ceil(e),dt(e.getFullYear()%1e4,t,4)}function doe(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+dt(t/60|0,"0",2)+dt(t%60,"0",2)}function WP(e,t){return dt(e.getUTCDate(),t,2)}function poe(e,t){return dt(e.getUTCHours(),t,2)}function hoe(e,t){return dt(e.getUTCHours()%12||12,t,2)}function goe(e,t){return dt(1+Xh.count(mo(e),e),t,3)}function l2(e,t){return dt(e.getUTCMilliseconds(),t,3)}function moe(e,t){return l2(e,t)+"000"}function voe(e,t){return dt(e.getUTCMonth()+1,t,2)}function yoe(e,t){return dt(e.getUTCMinutes(),t,2)}function boe(e,t){return dt(e.getUTCSeconds(),t,2)}function xoe(e){var t=e.getUTCDay();return t===0?7:t}function woe(e,t){return dt(Qh.count(mo(e)-1,e),t,2)}function u2(e){var t=e.getUTCDay();return t>=4||t===0?xl(e):xl.ceil(e)}function Coe(e,t){return e=u2(e),dt(xl.count(mo(e),e)+(mo(e).getUTCDay()===4),t,2)}function Soe(e){return e.getUTCDay()}function Eoe(e,t){return dt(Np.count(mo(e)-1,e),t,2)}function _oe(e,t){return dt(e.getUTCFullYear()%100,t,2)}function Ooe(e,t){return e=u2(e),dt(e.getUTCFullYear()%100,t,2)}function Poe(e,t){return dt(e.getUTCFullYear()%1e4,t,4)}function Aoe(e,t){var n=e.getUTCDay();return e=n>=4||n===0?xl(e):xl.ceil(e),dt(e.getUTCFullYear()%1e4,t,4)}function Roe(){return"+0000"}function HP(){return"%"}function UP(e){return+e}function GP(e){return Math.floor(+e/1e3)}var Ks,c2,f2;Ioe({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 Ioe(e){return Ks=Iie(e),c2=Ks.format,Ks.parse,f2=Ks.utcFormat,Ks.utcParse,Ks}function Toe(e){return new Date(e)}function koe(e){return e instanceof Date?+e:+new Date(+e)}function Cw(e,t,n,r,i,o,a,s,u,c){var d=lw(),p=d.invert,g=d.domain,h=c(".%L"),y=c(":%S"),b=c("%I:%M"),v=c("%I %p"),w=c("%a %d"),C=c("%b %d"),E=c("%B"),_=c("%Y");function P(R){return(u(R)<R?h:s(R)<R?y:a(R)<R?b:o(R)<R?v:r(R)<R?i(R)<R?w:C:n(R)<R?E:_)(R)}return d.invert=function(R){return new Date(p(R))},d.domain=function(R){return arguments.length?g(Array.from(R,koe)):g().map(Toe)},d.ticks=function(R){var I=g();return e(I[0],I[I.length-1],R??10)},d.tickFormat=function(R,I){return I==null?P:c(I)},d.nice=function(R){var I=g();return(!R||typeof R.range!="function")&&(R=t(I[0],I[I.length-1],R??10)),R?g(Zj(I,R)):d},d.copy=function(){return Sc(d,Cw(e,t,n,r,i,o,a,s,u,c))},d}function Noe(){return ri.apply(Cw(Aie,Rie,go,xw,Zh,Ec,yw,mw,Ha,c2).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function Moe(){return ri.apply(Cw(Oie,Pie,mo,ww,Qh,Xh,bw,vw,Ha,f2).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function Jh(){var e=0,t=1,n,r,i,o,a=Qn,s=!1,u;function c(p){return p==null||isNaN(p=+p)?u:a(i===0?.5:(p=(o(p)-n)*i,s?Math.max(0,Math.min(1,p)):p))}c.domain=function(p){return arguments.length?([e,t]=p,n=o(e=+e),r=o(t=+t),i=n===r?0:1/(r-n),c):[e,t]},c.clamp=function(p){return arguments.length?(s=!!p,c):s},c.interpolator=function(p){return arguments.length?(a=p,c):a};function d(p){return function(g){var h,y;return arguments.length?([h,y]=g,a=p(h,y),c):[a(0),a(1)]}}return c.range=d(Rl),c.rangeRound=d(sw),c.unknown=function(p){return arguments.length?(u=p,c):u},function(p){return o=p,n=p(e),r=p(t),i=n===r?0:1/(r-n),c}}function ga(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function d2(){var e=ha(Jh()(Qn));return e.copy=function(){return ga(e,d2())},So.apply(e,arguments)}function p2(){var e=fw(Jh()).domain([1,10]);return e.copy=function(){return ga(e,p2()).base(e.base())},So.apply(e,arguments)}function h2(){var e=dw(Jh());return e.copy=function(){return ga(e,h2()).constant(e.constant())},So.apply(e,arguments)}function Sw(){var e=pw(Jh());return e.copy=function(){return ga(e,Sw()).exponent(e.exponent())},So.apply(e,arguments)}function Doe(){return Sw.apply(null,arguments).exponent(.5)}function g2(){var e=[],t=Qn;function n(r){if(r!=null&&!isNaN(r=+r))return t((wc(e,r,1)-1)/(e.length-1))}return n.domain=function(r){if(!arguments.length)return e.slice();e=[];for(let i of r)i!=null&&!isNaN(i=+i)&&e.push(i);return e.sort(na),n},n.interpolator=function(r){return arguments.length?(t=r,n):t},n.range=function(){return e.map((r,i)=>t(i/(e.length-1)))},n.quantiles=function(r){return Array.from({length:r+1},(i,o)=>xre(e,o/r))},n.copy=function(){return g2(t).domain(e)},So.apply(n,arguments)}function eg(){var e=0,t=.5,n=1,r=1,i,o,a,s,u,c=Qn,d,p=!1,g;function h(b){return isNaN(b=+b)?g:(b=.5+((b=+d(b))-o)*(r*b<r*o?s:u),c(p?Math.max(0,Math.min(1,b)):b))}h.domain=function(b){return arguments.length?([e,t,n]=b,i=d(e=+e),o=d(t=+t),a=d(n=+n),s=i===o?0:.5/(o-i),u=o===a?0:.5/(a-o),r=o<i?-1:1,h):[e,t,n]},h.clamp=function(b){return arguments.length?(p=!!b,h):p},h.interpolator=function(b){return arguments.length?(c=b,h):c};function y(b){return function(v){var w,C,E;return arguments.length?([w,C,E]=v,c=qre(b,[w,C,E]),h):[c(0),c(.5),c(1)]}}return h.range=y(Rl),h.rangeRound=y(sw),h.unknown=function(b){return arguments.length?(g=b,h):g},function(b){return d=b,i=b(e),o=b(t),a=b(n),s=i===o?0:.5/(o-i),u=o===a?0:.5/(a-o),r=o<i?-1:1,h}}function m2(){var e=ha(eg()(Qn));return e.copy=function(){return ga(e,m2())},So.apply(e,arguments)}function v2(){var e=fw(eg()).domain([.1,1,10]);return e.copy=function(){return ga(e,v2()).base(e.base())},So.apply(e,arguments)}function y2(){var e=dw(eg());return e.copy=function(){return ga(e,y2()).constant(e.constant())},So.apply(e,arguments)}function Ew(){var e=pw(eg());return e.copy=function(){return ga(e,Ew()).exponent(e.exponent())},So.apply(e,arguments)}function joe(){return Ew.apply(null,arguments).exponent(.5)}const Ou=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:iw,scaleDiverging:m2,scaleDivergingLog:v2,scaleDivergingPow:Ew,scaleDivergingSqrt:joe,scaleDivergingSymlog:y2,scaleIdentity:Xj,scaleImplicit:Ib,scaleLinear:Yj,scaleLog:Qj,scaleOrdinal:rw,scalePoint:Sre,scalePow:hw,scaleQuantile:t2,scaleQuantize:n2,scaleRadial:e2,scaleSequential:d2,scaleSequentialLog:p2,scaleSequentialPow:Sw,scaleSequentialQuantile:g2,scaleSequentialSqrt:Doe,scaleSequentialSymlog:h2,scaleSqrt:mie,scaleSymlog:Jj,scaleThreshold:r2,scaleTime:Noe,scaleUtc:Moe,tickFormat:Kj},Symbol.toStringTag,{value:"Module"}));function Loe(e){if(e in Ou)return Ou[e]();var t="scale".concat(dc(e));if(t in Ou)return Ou[t]()}function qP(e,t,n){if(typeof e=="function")return e.copy().domain(t).range(n);if(e!=null){var r=Loe(e);if(r!=null)return r.domain(t).range(n),r}}function _w(e,t,n,r){if(!(n==null||r==null))return typeof e.scale=="function"?qP(e.scale,n,r):qP(t,n,r)}function $oe(e){return"scale".concat(dc(e))}function Foe(e){return $oe(e)in Ou}var b2=(e,t,n)=>{if(e!=null){var{scale:r,type:i}=e;if(r==="auto")return i==="category"&&n&&(n.indexOf("LineChart")>=0||n.indexOf("AreaChart")>=0||n.indexOf("ComposedChart")>=0&&!t)?"point":i==="category"?"band":"linear";if(typeof r=="string")return Foe(r)?r:"point"}};function Voe(e,t){for(var n=0,r=e.length,i=e[0]<e[e.length-1];n<r;){var o=Math.floor((n+r)/2);(i?e[o]<t:e[o]>t)?n=o+1:r=o}return n}function x2(e,t){if(e){var n=t??e.domain(),r=n.map(o=>{var a;return(a=e(o))!==null&&a!==void 0?a:0}),i=e.range();if(!(n.length===0||i.length<2))return o=>{var a,s,u=Voe(r,o);if(u<=0)return n[0];if(u>=n.length)return n[n.length-1];var c=(a=r[u-1])!==null&&a!==void 0?a:0,d=(s=r[u])!==null&&s!==void 0?s:0;return Math.abs(o-c)<=Math.abs(o-d)?n[u-1]:n[u]}}}function Boe(e){if(e!=null)return"invert"in e&&typeof e.invert=="function"?e.invert.bind(e):x2(e,void 0)}function KP(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Mp(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?KP(Object(n),!0).forEach(function(r){zoe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):KP(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function zoe(e,t,n){return(t=Woe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Woe(e){var t=Hoe(e,"string");return typeof t=="symbol"?t:t+""}function Hoe(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 Mb=[0,"auto"],un={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"},w2=(e,t)=>e.cartesianAxis.xAxis[t],Eo=(e,t)=>{var n=w2(e,t);return n??un},cn={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:Mb,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:vc},C2=(e,t)=>e.cartesianAxis.yAxis[t],_o=(e,t)=>{var n=C2(e,t);return n??cn},Uoe={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:""},Ow=(e,t)=>{var n=e.cartesianAxis.zAxis[t];return n??Uoe},tr=(e,t,n)=>{switch(t){case"xAxis":return Eo(e,n);case"yAxis":return _o(e,n);case"zAxis":return Ow(e,n);case"angleAxis":return Zx(e,n);case"radiusAxis":return Qx(e,n);default:throw new Error("Unexpected axis type: ".concat(t))}},Goe=(e,t,n)=>{switch(t){case"xAxis":return Eo(e,n);case"yAxis":return _o(e,n);default:throw new Error("Unexpected axis type: ".concat(t))}},_c=(e,t,n)=>{switch(t){case"xAxis":return Eo(e,n);case"yAxis":return _o(e,n);case"angleAxis":return Zx(e,n);case"radiusAxis":return Qx(e,n);default:throw new Error("Unexpected axis type: ".concat(t))}},S2=e=>e.graphicalItems.cartesianItems.some(t=>t.type==="bar")||e.graphicalItems.polarItems.some(t=>t.type==="radialBar");function E2(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 Pw=e=>e.graphicalItems.cartesianItems,qoe=q([Cn,Uh],E2),_2=(e,t,n)=>e.filter(n).filter(r=>t?.includeHidden===!0?!0:!r.hide),Oc=q([Pw,tr,qoe],_2,{memoizeOptions:{resultEqualityCheck:Kh}}),O2=q([Oc],e=>e.filter(t=>t.type==="area"||t.type==="bar").filter(Gh)),P2=e=>e.filter(t=>!("stackId"in t)||t.stackId===void 0),Koe=q([Oc],P2),A2=e=>e.map(t=>t.data).filter(Boolean).flat(1),Yoe=q([Oc],A2,{memoizeOptions:{resultEqualityCheck:Kh}}),R2=(e,t)=>{var{chartData:n=[],dataStartIndex:r,dataEndIndex:i}=t;return e.length>0?e:n.slice(r,i+1)},Aw=q([Yoe,yj],R2),I2=(e,t,n)=>t?.dataKey!=null?e.map(r=>({value:Mn(r,t.dataKey)})):n.length>0?n.map(r=>r.dataKey).flatMap(r=>e.map(i=>({value:Mn(i,r)}))):e.map(r=>({value:r})),Pc=q([Aw,tr,Oc],I2);function fl(e){if(ji(e)||e instanceof Date){var t=Number(e);if(ut(t))return t}}function YP(e){if(Array.isArray(e)){var t=[fl(e[0]),fl(e[1])];return Ti(t)?t:void 0}var n=fl(e);if(n!=null)return[n,n]}function vo(e){return e.map(fl).filter(fr)}function Xoe(e,t){var n=fl(e),r=fl(t);return n==null&&r==null?0:n==null?-1:r==null?1:n-r}var Zoe=q([Pc],e=>e?.map(t=>t.value).sort(Xoe));function T2(e,t){switch(e){case"xAxis":return t.direction==="x";case"yAxis":return t.direction==="y";default:return!1}}function Qoe(e,t,n){return!n||typeof t!="number"||Di(t)?[]:n.length?vo(n.flatMap(r=>{var i=Mn(e,r.dataKey),o,a;if(Array.isArray(i)?[o,a]=i:o=a=i,!(!ut(o)||!ut(a)))return[t-o,t+a]})):[]}var gn=e=>{var t=Sn(e),n=Al(e);return _c(e,t,n)},Ac=q([gn],e=>e?.dataKey),Joe=q([O2,yj,gn],Fj),k2=(e,t,n,r)=>{var i={},o=t.reduce((a,s)=>{if(s.stackId==null)return a;var u=a[s.stackId];return u==null&&(u=[]),u.push(s),a[s.stackId]=u,a},i);return Object.fromEntries(Object.entries(o).map(a=>{var[s,u]=a,c=r?[...u].reverse():u,d=c.map(ew);return[s,{stackedData:XJ(e,d,n),graphicalItems:c}]}))},Db=q([Joe,O2,Bh,kj],k2),N2=(e,t,n,r)=>{var{dataStartIndex:i,dataEndIndex:o}=t;if(r==null&&n!=="zAxis"){var a=tee(e,i,o);if(!(a!=null&&a[0]===0&&a[1]===0))return a}},eae=q([tr],e=>e.allowDataOverflow),Rw=e=>{var t;if(e==null||!("domain"in e))return Mb;if(e.domain!=null)return e.domain;if("ticks"in e&&e.ticks!=null){if(e.type==="number"){var n=vo(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:Mb},M2=q([tr],Rw),D2=q([M2,eae],bj),tae=q([Db,Co,Cn,D2],N2,{memoizeOptions:{resultEqualityCheck:qh}}),Iw=e=>e.errorBars,nae=(e,t,n)=>e.flatMap(r=>t[r.id]).filter(Boolean).filter(r=>T2(n,r)),Dp=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=n.filter(Boolean);if(i.length!==0){var o=i.flat(),a=Math.min(...o),s=Math.max(...o);return[a,s]}},j2=(e,t,n,r,i)=>{var o,a;if(n.length>0&&e.forEach(s=>{n.forEach(u=>{var c,d,p=(c=r[u.id])===null||c===void 0?void 0:c.filter(w=>T2(i,w)),g=Mn(s,(d=t.dataKey)!==null&&d!==void 0?d:u.dataKey),h=Qoe(s,g,p);if(h.length>=2){var y=Math.min(...h),b=Math.max(...h);(o==null||y<o)&&(o=y),(a==null||b>a)&&(a=b)}var v=YP(g);v!=null&&(o=o==null?v[0]:Math.min(o,v[0]),a=a==null?v[1]:Math.max(a,v[1]))})}),t?.dataKey!=null&&e.forEach(s=>{var u=YP(Mn(s,t.dataKey));u!=null&&(o=o==null?u[0]:Math.min(o,u[0]),a=a==null?u[1]:Math.max(a,u[1]))}),ut(o)&&ut(a))return[o,a]},rae=q([Aw,tr,Koe,Iw,Cn],j2,{memoizeOptions:{resultEqualityCheck:qh}});function iae(e){var{value:t}=e;if(ji(t)||t instanceof Date)return t}var oae=(e,t,n)=>{var r=e.map(iae).filter(i=>i!=null);return n&&(t.dataKey==null||t.allowDuplicatedCategory&&HM(r))?mj(0,e.length):t.allowDuplicatedCategory?r:Array.from(new Set(r))},L2=e=>e.referenceElements.dots,Il=(e,t,n)=>e.filter(r=>r.ifOverflow==="extendDomain").filter(r=>t==="xAxis"?r.xAxisId===n:r.yAxisId===n),aae=q([L2,Cn,Uh],Il),$2=e=>e.referenceElements.areas,sae=q([$2,Cn,Uh],Il),F2=e=>e.referenceElements.lines,lae=q([F2,Cn,Uh],Il),V2=(e,t)=>{if(e!=null){var n=vo(e.map(r=>t==="xAxis"?r.x:r.y));if(n.length!==0)return[Math.min(...n),Math.max(...n)]}},uae=q(aae,Cn,V2),B2=(e,t)=>{if(e!=null){var n=vo(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)]}},cae=q([sae,Cn],B2);function fae(e){var t;if(e.x!=null)return vo([e.x]);var n=(t=e.segment)===null||t===void 0?void 0:t.map(r=>r.x);return n==null||n.length===0?[]:vo(n)}function dae(e){var t;if(e.y!=null)return vo([e.y]);var n=(t=e.segment)===null||t===void 0?void 0:t.map(r=>r.y);return n==null||n.length===0?[]:vo(n)}var z2=(e,t)=>{if(e!=null){var n=e.flatMap(r=>t==="xAxis"?fae(r):dae(r));if(n.length!==0)return[Math.min(...n),Math.max(...n)]}},pae=q([lae,Cn],z2),hae=q(uae,pae,cae,(e,t,n)=>Dp(e,n,t)),W2=(e,t,n,r,i,o,a,s)=>{if(n!=null)return n;var u=a==="vertical"&&s==="xAxis"||a==="horizontal"&&s==="yAxis",c=u?Dp(r,o,i):Dp(o,i);return Kne(t,c,e.allowDataOverflow)},gae=q([tr,M2,D2,tae,rae,hae,At,Cn],W2,{memoizeOptions:{resultEqualityCheck:qh}}),mae=[0,1],H2=(e,t,n,r,i,o,a)=>{if(!((e==null||n==null||n.length===0)&&a===void 0)){var{dataKey:s,type:u}=e,c=pa(t,o);if(c&&s==null){var d;return mj(0,(d=n?.length)!==null&&d!==void 0?d:0)}return u==="category"?oae(r,e,c):i==="expand"?mae:a}},Tw=q([tr,At,Aw,Pc,Bh,Cn,gae],H2),Tl=q([tr,S2,Kx],b2),U2=(e,t,n)=>{var{niceTicks:r}=t;if(r!=="none"){var i=Rw(t),o=Array.isArray(i)&&(i[0]==="auto"||i[1]==="auto");if((r==="snap125"||r==="adaptive")&&t!=null&&t.tickCount&&Ti(e)){if(o)return oP(e,t.tickCount,t.allowDecimals,r);if(t.type==="number")return aP(e,t.tickCount,t.allowDecimals,r)}if(r==="auto"&&n==="linear"&&t!=null&&t.tickCount){if(o&&Ti(e))return oP(e,t.tickCount,t.allowDecimals,"adaptive");if(t.type==="number"&&Ti(e))return aP(e,t.tickCount,t.allowDecimals,"adaptive")}}},kw=q([Tw,_c,Tl],U2),G2=(e,t,n,r)=>{if(r!=="angleAxis"&&e?.type==="number"&&Ti(t)&&Array.isArray(n)&&n.length>0){var i,o,a=t[0],s=(i=n[0])!==null&&i!==void 0?i:0,u=t[1],c=(o=n[n.length-1])!==null&&o!==void 0?o:0;return[Math.min(a,s),Math.max(u,c)]}return t},vae=q([tr,Tw,kw,Cn],G2),yae=q(Pc,tr,(e,t)=>{if(!(!t||t.type!=="number")){var n=1/0,r=Array.from(vo(e.map(p=>p.value))).sort((p,g)=>p-g),i=r[0],o=r[r.length-1];if(i==null||o==null)return 1/0;var a=o-i;if(a===0)return 1/0;for(var s=0;s<r.length-1;s++){var u=r[s],c=r[s+1];if(!(u==null||c==null)){var d=c-u;n=Math.min(n,d)}}return n/a}}),q2=q(yae,At,Tj,wn,(e,t,n,r,i)=>i,(e,t,n,r,i)=>{if(!ut(e))return 0;var o=t==="vertical"?r.height:r.width;if(i==="gap")return e*o/2;if(i==="no-gap"){var a=fi(n,e*o),s=e*o/2;return s-a-(s-a)/o*a}return 0}),bae=(e,t,n)=>{var r=Eo(e,t);return r==null||typeof r.padding!="string"?0:q2(e,"xAxis",t,n,r.padding)},xae=(e,t,n)=>{var r=_o(e,t);return r==null||typeof r.padding!="string"?0:q2(e,"yAxis",t,n,r.padding)},wae=q(Eo,bae,(e,t)=>{var n,r;if(e==null)return{left:0,right:0};var{padding:i}=e;return typeof i=="string"?{left:t,right:t}:{left:((n=i.left)!==null&&n!==void 0?n:0)+t,right:((r=i.right)!==null&&r!==void 0?r:0)+t}}),Cae=q(_o,xae,(e,t)=>{var n,r;if(e==null)return{top:0,bottom:0};var{padding:i}=e;return typeof i=="string"?{top:t,bottom:t}:{top:((n=i.top)!==null&&n!==void 0?n:0)+t,bottom:((r=i.bottom)!==null&&r!==void 0?r:0)+t}}),Sae=q([wn,wae,Dh,Mh,(e,t,n)=>n],(e,t,n,r,i)=>{var{padding:o}=r;return i?[o.left,n.width-o.right]:[e.left+t.left,e.left+e.width-t.right]}),Eae=q([wn,At,Cae,Dh,Mh,(e,t,n)=>n],(e,t,n,r,i,o)=>{var{padding:a}=i;return o?[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]}),Rc=(e,t,n,r)=>{var i;switch(t){case"xAxis":return Sae(e,n,r);case"yAxis":return Eae(e,n,r);case"zAxis":return(i=Ow(e,n))===null||i===void 0?void 0:i.range;case"angleAxis":return jj(e);case"radiusAxis":return Lj(e,n);default:return}},K2=q([tr,Rc],zh),_ae=q([Tl,vae],lre),Nw=q([tr,Tl,_ae,K2],_w),Y2=(e,t,n,r)=>{if(!(n==null||n.dataKey==null)){var{type:i,scale:o}=n,a=pa(e,r);if(a&&(i==="number"||o!=="auto"))return t.map(s=>s.value)}},Mw=q([At,Pc,_c,Cn],Y2),tg=q([Nw],tw);q([Nw],Boe);q([Nw,Zoe],x2);q([Oc,Iw,Cn],nae);function X2(e,t){return e.id<t.id?-1:e.id>t.id?1:0}var ng=(e,t)=>t,rg=(e,t,n)=>n,Oae=q(kh,ng,rg,(e,t,n)=>e.filter(r=>r.orientation===t).filter(r=>r.mirror===n).sort(X2)),Pae=q(Nh,ng,rg,(e,t,n)=>e.filter(r=>r.orientation===t).filter(r=>r.mirror===n).sort(X2)),Z2=(e,t)=>({width:e.width,height:t.height}),Aae=(e,t)=>{var n=typeof t.width=="number"?t.width:vc;return{width:n,height:e.height}},Q2=q(wn,Eo,Z2),Rae=(e,t,n)=>{switch(t){case"top":return e.top;case"bottom":return n-e.bottom;default:return 0}},Iae=(e,t,n)=>{switch(t){case"left":return e.left;case"right":return n-e.right;default:return 0}},Tae=q(wo,wn,Oae,ng,rg,(e,t,n,r,i)=>{var o={},a;return n.forEach(s=>{var u=Z2(t,s);a==null&&(a=Rae(t,r,e));var c=r==="top"&&!i||r==="bottom"&&i;o[s.id]=a-Number(c)*u.height,a+=(c?-1:1)*u.height}),o}),kae=q(xo,wn,Pae,ng,rg,(e,t,n,r,i)=>{var o={},a;return n.forEach(s=>{var u=Aae(t,s);a==null&&(a=Iae(t,r,e));var c=r==="left"&&!i||r==="right"&&i;o[s.id]=a-Number(c)*u.width,a+=(c?-1:1)*u.width}),o}),Nae=(e,t)=>{var n=Eo(e,t);if(n!=null)return Tae(e,n.orientation,n.mirror)},Mae=q([wn,Eo,Nae,(e,t)=>t],(e,t,n,r)=>{if(t!=null){var i=n?.[r];return i==null?{x:e.left,y:0}:{x:e.left,y:i}}}),Dae=(e,t)=>{var n=_o(e,t);if(n!=null)return kae(e,n.orientation,n.mirror)},jae=q([wn,_o,Dae,(e,t)=>t],(e,t,n,r)=>{if(t!=null){var i=n?.[r];return i==null?{x:0,y:e.top}:{x:i,y:e.top}}}),J2=q(wn,_o,(e,t)=>{var n=typeof t.width=="number"?t.width:vc;return{width:n,height:e.height}}),XP=(e,t,n)=>{switch(t){case"xAxis":return Q2(e,n).width;case"yAxis":return J2(e,n).height;default:return}},eL=(e,t,n,r)=>{if(n!=null){var{allowDuplicatedCategory:i,type:o,dataKey:a}=n,s=pa(e,r),u=t.map(c=>c.value);if(a&&s&&o==="category"&&i&&HM(u))return u}},Dw=q([At,Pc,tr,Cn],eL),ZP=q([At,Goe,Tl,tg,Dw,Mw,Rc,kw,Cn],(e,t,n,r,i,o,a,s,u)=>{if(t!=null){var c=pa(e,u);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:u,categoricalDomain:o,duplicateDomain:i,isCategorical:c,niceTicks:s,range:a,realScaleType:n,scale:r}}}),Lae=(e,t,n,r,i,o,a,s,u)=>{if(!(t==null||r==null)){var c=pa(e,u),{type:d,ticks:p,tickCount:g}=t,h=n==="scaleBand"&&typeof r.bandwidth=="function"?r.bandwidth()/2:2,y=d==="category"&&r.bandwidth?r.bandwidth()/h:0;y=u==="angleAxis"&&o!=null&&o.length>=2?cr(o[0]-o[1])*2*y:y;var b=p||i;return b?b.map((v,w)=>{var C=a?a.indexOf(v):v,E=r.map(C);return ut(E)?{index:w,coordinate:E+y,value:v,offset:y}:null}).filter(fr):c&&s?s.map((v,w)=>{var C=r.map(v);return ut(C)?{coordinate:C+y,value:v,index:w,offset:y}:null}).filter(fr):r.ticks?r.ticks(g).map((v,w)=>{var C=r.map(v);return ut(C)?{coordinate:C+y,value:v,index:w,offset:y}:null}).filter(fr):r.domain().map((v,w)=>{var C=r.map(v);return ut(C)?{coordinate:C+y,value:a?a[v]:v,index:w,offset:y}:null}).filter(fr)}},tL=q([At,_c,Tl,tg,kw,Rc,Dw,Mw,Cn],Lae),$ae=(e,t,n,r,i,o,a)=>{if(!(t==null||n==null||r==null||r[0]===r[1])){var s=pa(e,a),{tickCount:u}=t,c=0;return c=a==="angleAxis"&&r?.length>=2?cr(r[0]-r[1])*2*c:c,s&&o?o.map((d,p)=>{var g=n.map(d);return ut(g)?{coordinate:g+c,value:d,index:p,offset:c}:null}).filter(fr):n.ticks?n.ticks(u).map((d,p)=>{var g=n.map(d);return ut(g)?{coordinate:g+c,value:d,index:p,offset:c}:null}).filter(fr):n.domain().map((d,p)=>{var g=n.map(d);return ut(g)?{coordinate:g+c,value:i?i[d]:d,index:p,offset:c}:null}).filter(fr)}},wl=q([At,_c,tg,Rc,Dw,Mw,Cn],$ae),Cl=q(tr,tg,(e,t)=>{if(!(e==null||t==null))return Mp(Mp({},e),{},{scale:t})}),Fae=q([tr,Tl,Tw,K2],_w),Vae=q([Fae],tw);q((e,t,n)=>Ow(e,n),Vae,(e,t)=>{if(!(e==null||t==null))return Mp(Mp({},e),{},{scale:t})});var Bae=q([At,kh,Nh],(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}}),zae=(e,t,n)=>{var r;return(r=e.renderedTicks[t])===null||r===void 0?void 0:r[n]};q([zae],e=>{if(!(!e||e.length===0))return t=>{var n,r=1/0,i=e[0];for(var o of e){var a=Math.abs(o.coordinate-t);a<r&&(r=a,i=o)}return(n=i)===null||n===void 0?void 0:n.value}});var nL=e=>e.options.defaultTooltipEventType,rL=e=>e.options.validateTooltipEventTypes;function iL(e,t,n){if(e==null)return t;var r=e?"axis":"item";return n==null?t:n.includes(r)?r:t}function jw(e,t){var n=nL(e),r=rL(e);return iL(t,n,r)}function Wae(e){return Le(t=>jw(t,e))}var oL=(e,t)=>{var n,r=Number(t);if(!(Di(r)||t==null))return r>=0?e==null||(n=e[r])===null||n===void 0?void 0:n.value:void 0},Hae=e=>e.tooltip.settings,Ko={active:!1,index:null,dataKey:void 0,graphicalItemId:void 0,coordinate:void 0},Uae={itemInteraction:{click:Ko,hover:Ko},axisInteraction:{click:Ko,hover:Ko},keyboardInteraction:Ko,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}},aL=Wn({name:"tooltip",initialState:Uae,reducers:{addTooltipEntrySettings:{reducer(e,t){e.tooltipItemPayloads.push(t.payload)},prepare:Mt()},replaceTooltipEntrySettings:{reducer(e,t){var{prev:n,next:r}=t.payload,i=Qr(e).tooltipItemPayloads.indexOf(n);i>-1&&(e.tooltipItemPayloads[i]=r)},prepare:Mt()},removeTooltipEntrySettings:{reducer(e,t){var n=Qr(e).tooltipItemPayloads.indexOf(t.payload);n>-1&&e.tooltipItemPayloads.splice(n,1)},prepare:Mt()},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:Gae,replaceTooltipEntrySettings:qae,removeTooltipEntrySettings:Kae,setTooltipSettingsState:Yae,setActiveMouseOverItemIndex:sL,mouseLeaveItem:Xae,mouseLeaveChart:lL,setActiveClickItemIndex:Zae,setMouseOverAxisIndex:uL,setMouseClickAxisIndex:Qae,setSyncInteraction:jb,setKeyboardInteraction:jp}=aL.actions,Jae=aL.reducer;function QP(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function md(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?QP(Object(n),!0).forEach(function(r){ese(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):QP(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ese(e,t,n){return(t=tse(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function tse(e){var t=nse(e,"string");return typeof t=="symbol"?t:t+""}function nse(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 rse(e,t,n){return t==="axis"?n==="click"?e.axisInteraction.click:e.axisInteraction.hover:n==="click"?e.itemInteraction.click:e.itemInteraction.hover}function ise(e){return e.index!=null}var cL=(e,t,n,r)=>{if(t==null)return Ko;var i=rse(e,t,n);if(i==null)return Ko;if(i.active)return i;if(e.keyboardInteraction.active)return e.keyboardInteraction;if(e.syncInteraction.active&&e.syncInteraction.index!=null)return e.syncInteraction;var o=e.settings.active===!0;if(ise(i)){if(o)return md(md({},i),{},{active:!0})}else if(r!=null)return{active:!0,coordinate:void 0,dataKey:void 0,index:r,graphicalItemId:void 0};return md(md({},Ko),{},{coordinate:i.coordinate})};function ose(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 ase(e,t){var n=ose(e),r=t[0],i=t[1];if(n===void 0)return!1;var o=Math.min(r,i),a=Math.max(r,i);return n>=o&&n<=a}function sse(e,t,n){if(n==null||t==null)return!0;var r=Mn(e,t);return r==null||!Ti(n)?!0:ase(r,n)}var Lw=(e,t,n,r)=>{var i=e?.index;if(i==null)return null;var o=Number(i);if(!ut(o))return i;var a=0,s=1/0;t.length>0&&(s=t.length-1);var u=Math.max(a,Math.min(o,s)),c=t[u];return c==null||sse(c,n,r)?String(u):null},fL=(e,t,n,r,i,o,a)=>{if(o!=null){var s=a[0],u=s?.getPosition(o);if(u!=null)return u;var c=i?.[Number(o)];if(c)return n==="horizontal"?{x:c.coordinate,y:(r.top+t)/2}:{x:(r.left+e)/2,y:c.coordinate}}},dL=(e,t,n,r)=>{if(t==="axis")return e.tooltipItemPayloads;if(e.tooltipItemPayloads.length===0)return[];var i;if(n==="hover"?i=e.itemInteraction.hover.graphicalItemId:i=e.itemInteraction.click.graphicalItemId,e.syncInteraction.active&&i==null)return e.tooltipItemPayloads;if(i==null&&r!=null){var o=e.tooltipItemPayloads[0];return o!=null?[o]:[]}return e.tooltipItemPayloads.filter(a=>{var s;return((s=a.settings)===null||s===void 0?void 0:s.graphicalItemId)===i})},pL=e=>e.options.tooltipPayloadSearcher,kl=e=>e.tooltip;function JP(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function eA(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?JP(Object(n),!0).forEach(function(r){lse(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):JP(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function lse(e,t,n){return(t=use(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function use(e){var t=cse(e,"string");return typeof t=="symbol"?t:t+""}function cse(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 fse(e){if(typeof e=="string"||typeof e=="number")return e}function dse(e){if(typeof e=="string"||typeof e=="number"||typeof e=="boolean")return e}function pse(e){if(typeof e=="string"||typeof e=="number")return e;if(typeof e=="function")return t=>e(t)}function tA(e){if(typeof e=="string")return e}function hse(e){if(!(e==null||typeof e!="object")){var t="name"in e?fse(e.name):void 0,n="unit"in e?dse(e.unit):void 0,r="dataKey"in e?pse(e.dataKey):void 0,i="payload"in e?e.payload:void 0,o="color"in e?tA(e.color):void 0,a="fill"in e?tA(e.fill):void 0;return{name:t,unit:n,dataKey:r,payload:i,color:o,fill:a}}}function gse(e,t){return e??t}var hL=(e,t,n,r,i,o,a)=>{if(!(t==null||o==null)){var{chartData:s,computedData:u,dataStartIndex:c,dataEndIndex:d}=n,p=[];return e.reduce((g,h)=>{var y,{dataDefinedOnItem:b,settings:v}=h,w=gse(b,s),C=Array.isArray(w)?FD(w,c,d):w,E=(y=v?.dataKey)!==null&&y!==void 0?y:r,_=v?.nameKey,P;if(r&&Array.isArray(C)&&!Array.isArray(C[0])&&a==="axis"?P=kZ(C,r,i):P=o(C,t,u,_),Array.isArray(P))P.forEach(I=>{var k,B,L=hse(I),V=L?.name,D=L?.dataKey,H=L?.payload,J=eA(eA({},v),{},{name:V,unit:L?.unit,color:(k=L?.color)!==null&&k!==void 0?k:v?.color,fill:(B=L?.fill)!==null&&B!==void 0?B:v?.fill});g.push(K_({tooltipEntrySettings:J,dataKey:D,payload:H,value:Mn(H,D),name:V==null?void 0:String(V)}))});else{var R;g.push(K_({tooltipEntrySettings:v,dataKey:E,payload:P,value:Mn(P,E),name:(R=Mn(P,_))!==null&&R!==void 0?R:v?.name}))}return g},p)}},$w=q([gn,S2,Kx],b2),mse=q([e=>e.graphicalItems.cartesianItems,e=>e.graphicalItems.polarItems],(e,t)=>[...e,...t]),vse=q([Sn,Al],E2),Nl=q([mse,gn,vse],_2,{memoizeOptions:{resultEqualityCheck:Kh}}),yse=q([Nl],e=>e.filter(Gh)),bse=q([Nl],A2,{memoizeOptions:{resultEqualityCheck:Kh}}),Ml=q([bse,Co],R2),xse=q([yse,Co,gn],Fj),Fw=q([Ml,gn,Nl],I2),gL=q([gn],Rw),wse=q([gn],e=>e.allowDataOverflow),mL=q([gL,wse],bj),Cse=q([Nl],e=>e.filter(Gh)),Sse=q([xse,Cse,Bh,kj],k2),Ese=q([Sse,Co,Sn,mL],N2),_se=q([Nl],P2),Ose=q([Ml,gn,_se,Iw,Sn],j2,{memoizeOptions:{resultEqualityCheck:qh}}),Pse=q([L2,Sn,Al],Il),Ase=q([Pse,Sn],V2),Rse=q([$2,Sn,Al],Il),Ise=q([Rse,Sn],B2),Tse=q([F2,Sn,Al],Il),kse=q([Tse,Sn],z2),Nse=q([Ase,kse,Ise],Dp),Mse=q([gn,gL,mL,Ese,Ose,Nse,At,Sn],W2),Ic=q([gn,At,Ml,Fw,Bh,Sn,Mse],H2),Dse=q([Ic,gn,$w],U2),jse=q([gn,Ic,Dse,Sn],G2),vL=e=>{var t=Sn(e),n=Al(e),r=!1;return Rc(e,t,n,r)},yL=q([gn,vL],zh),Lse=q([gn,$w,jse,yL],_w),bL=q([Lse],tw),$se=q([At,Fw,gn,Sn],eL),Fse=q([At,Fw,gn,Sn],Y2),Vse=(e,t,n,r,i,o,a,s)=>{if(t){var{type:u}=t,c=pa(e,s);if(r){var d=n==="scaleBand"&&r.bandwidth?r.bandwidth()/2:2,p=u==="category"&&r.bandwidth?r.bandwidth()/d:0;return p=s==="angleAxis"&&i!=null&&i?.length>=2?cr(i[0]-i[1])*2*p:p,c&&a?a.map((g,h)=>{var y=r.map(g);return ut(y)?{coordinate:y+p,value:g,index:h,offset:p}:null}).filter(fr):r.domain().map((g,h)=>{var y=r.map(g);return ut(y)?{coordinate:y+p,value:o?o[g]:g,index:h,offset:p}:null}).filter(fr)}}},Oo=q([At,gn,$w,bL,vL,$se,Fse,Sn],Vse),Vw=q([nL,rL,Hae],(e,t,n)=>iL(n.shared,e,t)),xL=e=>e.tooltip.settings.trigger,Bw=e=>e.tooltip.settings.defaultIndex,Tc=q([kl,Vw,xL,Bw],cL),Sl=q([Tc,Ml,Ac,Ic],Lw),wL=q([Oo,Sl],oL),CL=q([Tc],e=>{if(e)return e.dataKey}),Bse=q([Tc],e=>{if(e)return e.graphicalItemId}),SL=q([kl,Vw,xL,Bw],dL),zse=q([xo,wo,At,wn,Oo,Bw,SL],fL),Wse=q([Tc,zse],(e,t)=>e!=null&&e.coordinate?e.coordinate:t),Hse=q([Tc],e=>{var t;return(t=e?.active)!==null&&t!==void 0?t:!1}),Use=q([SL,Sl,Co,Ac,wL,pL,Vw],hL);q([Use],e=>{if(e!=null){var t=e.map(n=>n.payload).filter(n=>n!=null);return Array.from(new Set(t))}});function nA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function rA(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?nA(Object(n),!0).forEach(function(r){Gse(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):nA(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Gse(e,t,n){return(t=qse(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function qse(e){var t=Kse(e,"string");return typeof t=="symbol"?t:t+""}function Kse(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 Yse=()=>Le(gn),Xse=()=>{var e=Yse(),t=Le(Oo),n=Le(bL);return dp(!e||!n?void 0:rA(rA({},e),{},{scale:n}),t)};function iA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Ys(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?iA(Object(n),!0).forEach(function(r){Zse(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):iA(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Zse(e,t,n){return(t=Qse(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Qse(e){var t=Jse(e,"string");return typeof t=="symbol"?t:t+""}function Jse(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 ele=(e,t,n,r)=>{var i=t.find(o=>o&&o.index===n);if(i){if(e==="horizontal")return{x:i.coordinate,y:r.relativeY};if(e==="vertical")return{x:r.relativeX,y:i.coordinate}}return{x:0,y:0}},tle=(e,t,n,r)=>{var i=t.find(c=>c&&c.index===n);if(i){if(e==="centric"){var o=i.coordinate,{radius:a}=r;return Ys(Ys(Ys({},r),kn(r.cx,r.cy,a,o)),{},{angle:o,radius:a})}var s=i.coordinate,{angle:u}=r;return Ys(Ys(Ys({},r),kn(r.cx,r.cy,s,u)),{},{angle:u,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 nle(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 EL=(e,t,n,r,i)=>{var o,a=(o=t?.length)!==null&&o!==void 0?o:0;if(a<=1||e==null)return 0;if(r==="angleAxis"&&i!=null&&Math.abs(Math.abs(i[1]-i[0])-360)<=1e-6)for(var s=0;s<a;s++){var u,c,d,p,g,h=s>0?(u=n[s-1])===null||u===void 0?void 0:u.coordinate:(c=n[a-1])===null||c===void 0?void 0:c.coordinate,y=(d=n[s])===null||d===void 0?void 0:d.coordinate,b=s>=a-1?(p=n[0])===null||p===void 0?void 0:p.coordinate:(g=n[s+1])===null||g===void 0?void 0:g.coordinate,v=void 0;if(!(h==null||y==null||b==null))if(cr(y-h)!==cr(b-y)){var w=[];if(cr(b-y)===cr(i[1]-i[0])){v=b;var C=y+i[1]-i[0];w[0]=Math.min(C,(C+h)/2),w[1]=Math.max(C,(C+h)/2)}else{v=h;var E=b+i[1]-i[0];w[0]=Math.min(y,(E+y)/2),w[1]=Math.max(y,(E+y)/2)}var _=[Math.min(y,(v+y)/2),Math.max(y,(v+y)/2)];if(e>_[0]&&e<=_[1]||e>=w[0]&&e<=w[1]){var P;return(P=n[s])===null||P===void 0?void 0:P.index}}else{var R=Math.min(h,b),I=Math.max(h,b);if(e>(R+y)/2&&e<=(I+y)/2){var k;return(k=n[s])===null||k===void 0?void 0:k.index}}}else if(t)for(var B=0;B<a;B++){var L=t[B];if(L!=null){var V=t[B+1],D=t[B-1];if(B===0&&V!=null&&e<=(L.coordinate+V.coordinate)/2||B===a-1&&D!=null&&e>(L.coordinate+D.coordinate)/2||B>0&&B<a-1&&D!=null&&V!=null&&e>(L.coordinate+D.coordinate)/2&&e<=(L.coordinate+V.coordinate)/2)return L.index}}return-1},rle=()=>Le(Kx),zw=(e,t)=>t,_L=(e,t,n)=>n,Ww=(e,t,n,r)=>r,ile=q(Oo,e=>Sh(e,t=>t.coordinate)),Hw=q([kl,zw,_L,Ww],cL),Uw=q([Hw,Ml,Ac,Ic],Lw),ole=(e,t,n)=>{if(t!=null){var r=kl(e);return t==="axis"?n==="hover"?r.axisInteraction.hover.dataKey:r.axisInteraction.click.dataKey:n==="hover"?r.itemInteraction.hover.dataKey:r.itemInteraction.click.dataKey}},OL=q([kl,zw,_L,Ww],dL),Lp=q([xo,wo,At,wn,Oo,Ww,OL],fL),ale=q([Hw,Lp],(e,t)=>{var n;return(n=e.coordinate)!==null&&n!==void 0?n:t}),PL=q([Oo,Uw],oL),sle=q([OL,Uw,Co,Ac,PL,pL,zw],hL),lle=q([Hw,Uw],(e,t)=>({isActive:e.active&&t!=null,activeIndex:t})),ule=(e,t,n,r,i,o,a)=>{if(!(!e||!n||!r||!i)&&nle(e,a)){var s=nee(e,t),u=EL(s,o,i,n,r),c=ele(t,i,u,e);return{activeIndex:String(u),activeCoordinate:c}}},cle=(e,t,n,r,i,o,a)=>{if(!(!e||!r||!i||!o||!n)){var s=Lne(e,n);if(s){var u=ree(s,t),c=EL(u,a,o,r,i),d=tle(t,o,c,s);return{activeIndex:String(c),activeCoordinate:d}}}},fle=(e,t,n,r,i,o,a,s)=>{if(!(!e||!t||!r||!i||!o))return t==="horizontal"||t==="vertical"?ule(e,t,r,i,o,a,s):cle(e,t,n,r,i,o,a)},dle=q(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}}),ple=q(e=>e.zIndex.zIndexMap,e=>{var t=Object.keys(e).map(r=>parseInt(r,10)).concat(Object.values(Zn)),n=Array.from(new Set(t));return n.sort((r,i)=>r-i)},{memoizeOptions:{resultEqualityCheck:sre}});function oA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function aA(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?oA(Object(n),!0).forEach(function(r){hle(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):oA(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function hle(e,t,n){return(t=gle(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function gle(e){var t=mle(e,"string");return typeof t=="symbol"?t:t+""}function mle(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 vle={},yle={zIndexMap:Object.values(Zn).reduce((e,t)=>aA(aA({},e),{},{[t]:{element:void 0,panoramaElement:void 0,consumers:0}}),vle)},ble=new Set(Object.values(Zn));function xle(e){return ble.has(e)}var AL=Wn({name:"zIndex",initialState:yle,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:Mt()},unregisterZIndexPortal:{reducer:(e,t)=>{var{zIndex:n}=t.payload;e.zIndexMap[n]&&(e.zIndexMap[n].consumers-=1,e.zIndexMap[n].consumers<=0&&!xle(n)&&delete e.zIndexMap[n])},prepare:Mt()},registerZIndexPortalElement:{reducer:(e,t)=>{var{zIndex:n,element:r,isPanorama:i}=t.payload;e.zIndexMap[n]?i?e.zIndexMap[n].panoramaElement=r:e.zIndexMap[n].element=r:e.zIndexMap[n]={consumers:0,element:i?void 0:r,panoramaElement:i?r:void 0}},prepare:Mt()},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:Mt()}}}),{registerZIndexPortal:wle,unregisterZIndexPortal:Cle,registerZIndexPortalElement:Sle,unregisterZIndexPortalElement:Ele}=AL.actions,_le=AL.reducer;function Po(e){var{zIndex:t,children:n}=e,r=jee(),i=r&&t!==void 0&&t!==0,o=pr(),a=Ht();j.useLayoutEffect(()=>i?(a(wle({zIndex:t})),()=>{a(Cle({zIndex:t}))}):ds,[a,t,i]);var s=Le(u=>dle(u,t,o));return i?s?Up.createPortal(n,s):null:n}function Lb(){return Lb=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},Lb.apply(null,arguments)}function sA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function vd(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?sA(Object(n),!0).forEach(function(r){Ole(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):sA(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Ole(e,t,n){return(t=Ple(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ple(e){var t=Ale(e,"string");return typeof t=="symbol"?t:t+""}function Ale(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 Rle(e){var{cursor:t,cursorComp:n,cursorProps:r}=e;return j.isValidElement(t)?j.cloneElement(t,r):j.createElement(n,r)}function Ile(e){var t,{coordinate:n,payload:r,index:i,offset:o,tooltipAxisBandSize:a,layout:s,cursor:u,tooltipEventType:c,chartName:d}=e,p=n,g=r,h=i;if(!u||!p||d!=="ScatterChart"&&c!=="axis")return null;var y,b,v;if(d==="ScatterChart")y=p,b=Zte,v=Zn.cursorLine;else if(d==="BarChart")y=Qte(s,p,o,a),b=dj,v=Zn.cursorRectangle;else if(s==="radial"&&qM(p)){var{cx:w,cy:C,radius:E,startAngle:_,endAngle:P}=pj(p);y={cx:w,cy:C,startAngle:_,endAngle:P,innerRadius:E,outerRadius:E},b=gj,v=Zn.cursorLine}else y={points:Bne(s,p,o)},b=sj,v=Zn.cursorLine;var R=typeof u=="object"&&"className"in u?u.className:void 0,I=vd(vd(vd(vd({stroke:"#ccc",pointerEvents:"none"},o),y),Cx(u)),{},{payload:g,payloadIndex:h,className:Pt("recharts-tooltip-cursor",R)});return x.createElement(Po,{zIndex:(t=e.zIndex)!==null&&t!==void 0?t:v},x.createElement(Rle,{cursor:u,cursorComp:b,cursorProps:I}))}function Tle(e){var t=Xse(),n=qD(),r=_l(),i=rle();return t==null||n==null||r==null||i==null?null:x.createElement(Ile,Lb({},e,{offset:n,layout:r,tooltipAxisBandSize:t,chartName:i}))}var RL=j.createContext(null),kle=()=>j.useContext(RL),ly={exports:{}},lA;function Nle(){return lA||(lA=1,(function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(n=!1));function i(u,c,d){this.fn=u,this.context=c,this.once=d||!1}function o(u,c,d,p,g){if(typeof d!="function")throw new TypeError("The listener must be a function");var h=new i(d,p||u,g),y=n?n+c:c;return u._events[y]?u._events[y].fn?u._events[y]=[u._events[y],h]:u._events[y].push(h):(u._events[y]=h,u._eventsCount++),u}function a(u,c){--u._eventsCount===0?u._events=new r:delete u._events[c]}function s(){this._events=new r,this._eventsCount=0}s.prototype.eventNames=function(){var c=[],d,p;if(this._eventsCount===0)return c;for(p in d=this._events)t.call(d,p)&&c.push(n?p.slice(1):p);return Object.getOwnPropertySymbols?c.concat(Object.getOwnPropertySymbols(d)):c},s.prototype.listeners=function(c){var d=n?n+c:c,p=this._events[d];if(!p)return[];if(p.fn)return[p.fn];for(var g=0,h=p.length,y=new Array(h);g<h;g++)y[g]=p[g].fn;return y},s.prototype.listenerCount=function(c){var d=n?n+c:c,p=this._events[d];return p?p.fn?1:p.length:0},s.prototype.emit=function(c,d,p,g,h,y){var b=n?n+c:c;if(!this._events[b])return!1;var v=this._events[b],w=arguments.length,C,E;if(v.fn){switch(v.once&&this.removeListener(c,v.fn,void 0,!0),w){case 1:return v.fn.call(v.context),!0;case 2:return v.fn.call(v.context,d),!0;case 3:return v.fn.call(v.context,d,p),!0;case 4:return v.fn.call(v.context,d,p,g),!0;case 5:return v.fn.call(v.context,d,p,g,h),!0;case 6:return v.fn.call(v.context,d,p,g,h,y),!0}for(E=1,C=new Array(w-1);E<w;E++)C[E-1]=arguments[E];v.fn.apply(v.context,C)}else{var _=v.length,P;for(E=0;E<_;E++)switch(v[E].once&&this.removeListener(c,v[E].fn,void 0,!0),w){case 1:v[E].fn.call(v[E].context);break;case 2:v[E].fn.call(v[E].context,d);break;case 3:v[E].fn.call(v[E].context,d,p);break;case 4:v[E].fn.call(v[E].context,d,p,g);break;default:if(!C)for(P=1,C=new Array(w-1);P<w;P++)C[P-1]=arguments[P];v[E].fn.apply(v[E].context,C)}}return!0},s.prototype.on=function(c,d,p){return o(this,c,d,p,!1)},s.prototype.once=function(c,d,p){return o(this,c,d,p,!0)},s.prototype.removeListener=function(c,d,p,g){var h=n?n+c:c;if(!this._events[h])return this;if(!d)return a(this,h),this;var y=this._events[h];if(y.fn)y.fn===d&&(!g||y.once)&&(!p||y.context===p)&&a(this,h);else{for(var b=0,v=[],w=y.length;b<w;b++)(y[b].fn!==d||g&&!y[b].once||p&&y[b].context!==p)&&v.push(y[b]);v.length?this._events[h]=v.length===1?v[0]:v:a(this,h)}return this},s.prototype.removeAllListeners=function(c){var d;return c?(d=n?n+c:c,this._events[d]&&a(this,d)):(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})(ly)),ly.exports}var Mle=Nle();const Dle=fs(Mle);var tc=new Dle,$b="recharts.syncEvent.tooltip",uA="recharts.syncEvent.brush",jle=(e,t)=>{if(t&&Array.isArray(e)){var n=Number.parseInt(t,10);if(!Di(n))return e[n]}},Lle={chartName:"",tooltipPayloadSearcher:()=>{},eventEmitter:void 0,defaultTooltipEventType:"axis"},IL=Wn({name:"options",initialState:Lle,reducers:{createEventEmitter:e=>{e.eventEmitter==null&&(e.eventEmitter=Symbol("rechartsEventEmitter"))}}}),$le=IL.reducer,{createEventEmitter:Fle}=IL.actions;function Vle(e){return e.tooltip.syncInteraction}var Ble={chartData:void 0,computedData:void 0,dataStartIndex:0,dataEndIndex:0},TL=Wn({name:"chartData",initialState:Ble,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:cA,setDataStartEndIndexes:zle,setComputedData:cge}=TL.actions,Wle=TL.reducer,Hle=["x","y"];function fA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Xs(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?fA(Object(n),!0).forEach(function(r){Ule(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fA(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Ule(e,t,n){return(t=Gle(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Gle(e){var t=qle(e,"string");return typeof t=="symbol"?t:t+""}function qle(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 Kle(e,t){if(e==null)return{};var n,r,i=Yle(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Yle(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 Xle(){var e=Le(Yx),t=Le(Xx),n=Ht(),r=Le(Nj),i=Le(Oo),o=_l(),a=jh(),s=Le(u=>u.rootProps.className);j.useEffect(()=>{if(e==null)return ds;var u=(c,d,p)=>{if(t!==p&&e===c){if(r==="index"){var g;if(a&&d!==null&&d!==void 0&&(g=d.payload)!==null&&g!==void 0&&g.coordinate&&d.payload.sourceViewBox){var h=d.payload.coordinate,{x:y,y:b}=h,v=Kle(h,Hle),{x:w,y:C,width:E,height:_}=d.payload.sourceViewBox,P=Xs(Xs({},v),{},{x:a.x+(E?(y-w)/E:0)*a.width,y:a.y+(_?(b-C)/_:0)*a.height});n(Xs(Xs({},d),{},{payload:Xs(Xs({},d.payload),{},{coordinate:P})}))}else n(d);return}if(i!=null){var R;if(typeof r=="function"){var I={activeTooltipIndex:d.payload.index==null?void 0:Number(d.payload.index),isTooltipActive:d.payload.active,activeIndex:d.payload.index==null?void 0:Number(d.payload.index),activeLabel:d.payload.label,activeDataKey:d.payload.dataKey,activeCoordinate:d.payload.coordinate},k=r(i,I);R=i[k]}else r==="value"&&(R=i.find(G=>String(G.value)===d.payload.label));var{coordinate:B}=d.payload;if(R==null||d.payload.active===!1||B==null||a==null){n(jb({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:void 0,graphicalItemId:void 0}));return}var{x:L,y:V}=B,D=Math.min(L,a.x+a.width),H=Math.min(V,a.y+a.height),J={x:o==="horizontal"?R.coordinate:D,y:o==="horizontal"?H:R.coordinate},te=jb({active:d.payload.active,coordinate:J,dataKey:d.payload.dataKey,index:String(R.index),label:d.payload.label,sourceViewBox:d.payload.sourceViewBox,graphicalItemId:d.payload.graphicalItemId});n(te)}}};return tc.on($b,u),()=>{tc.off($b,u)}},[s,n,t,e,r,i,o,a])}function Zle(){var e=Le(Yx),t=Le(Xx),n=Ht();j.useEffect(()=>{if(e==null)return ds;var r=(i,o,a)=>{t!==a&&e===i&&n(zle(o))};return tc.on(uA,r),()=>{tc.off(uA,r)}},[n,t,e])}function Qle(){var e=Ht();j.useEffect(()=>{e(Fle())},[e]),Xle(),Zle()}function Jle(e,t,n,r,i,o){var a=Le(y=>ole(y,e,t)),s=Le(Bse),u=Le(Xx),c=Le(Yx),d=Le(Nj),p=Le(Vle),g=p?.active,h=jh();j.useEffect(()=>{if(!g&&c!=null&&u!=null){var y=jb({active:o,coordinate:n,dataKey:a,index:i,label:typeof r=="number"?String(r):r,sourceViewBox:h,graphicalItemId:s});tc.emit($b,c,y,u)}},[g,n,a,s,i,r,u,c,d,o,h])}function dA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function pA(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?dA(Object(n),!0).forEach(function(r){eue(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):dA(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function eue(e,t,n){return(t=tue(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function tue(e){var t=nue(e,"string");return typeof t=="symbol"?t:t+""}function nue(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 rue(e){return e.dataKey}function iue(e,t){return x.isValidElement(e)?x.cloneElement(e,t):typeof e=="function"?x.createElement(e,t):x.createElement(Ote,t)}var hA=[],oue={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 aue(e){var t,n,r=Mr(e,oue),{active:i,allowEscapeViewBox:o,animationDuration:a,animationEasing:s,content:u,filterNull:c,isAnimationActive:d,offset:p,payloadUniqBy:g,position:h,reverseDirection:y,useTranslate3d:b,wrapperStyle:v,cursor:w,shared:C,trigger:E,defaultIndex:_,portal:P,axisId:R}=r,I=Ht(),k=typeof _=="number"?String(_):_;j.useEffect(()=>{I(Yae({shared:C,trigger:E,axisId:R,active:i,defaultIndex:k}))},[I,C,E,R,i,k]);var B=jh(),L=aj(),V=Wae(C),{activeIndex:D,isActive:H}=(t=Le(Fe=>lle(Fe,V,E,k)))!==null&&t!==void 0?t:{},J=Le(Fe=>sle(Fe,V,E,k)),te=Le(Fe=>PL(Fe,V,E,k)),G=Le(Fe=>ale(Fe,V,E,k)),ee=J,Q=kle(),pe=(n=i??H)!==null&&n!==void 0?n:!1,[K,Ae]=AQ([ee,pe]),Se=V==="axis"?te:void 0;Jle(V,E,G,Se,D,pe);var $e=P??Q;if($e==null||B==null||V==null)return null;var we=ee??hA;pe||(we=hA),c&&we.length&&(we=gQ(we.filter(Fe=>Fe.value!=null&&(Fe.hide!==!0||r.includeHidden)),g,rue));var Ce=we.length>0,ze=pA(pA({},r),{},{payload:we,label:Se,active:pe,activeIndex:D,coordinate:G,accessibilityLayer:L}),Ke=x.createElement(Lte,{allowEscapeViewBox:o,animationDuration:a,animationEasing:s,isAnimationActive:d,active:pe,coordinate:G,hasPayload:Ce,offset:p,position:h,reverseDirection:y,useTranslate3d:b,viewBox:B,wrapperStyle:v,lastBoundingBox:K,innerRef:Ae,hasPortalFromProps:!!P},iue(u,ze));return x.createElement(x.Fragment,null,Up.createPortal(Ke,$e),pe&&x.createElement(Tle,{cursor:w,tooltipEventType:V,coordinate:G,payload:we,index:D}))}var kL=e=>null;kL.displayName="Cell";function sue(e,t,n){return(t=lue(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function lue(e){var t=uue(e,"string");return typeof t=="symbol"?t:t+""}function uue(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 cue{constructor(t){sue(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 gA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function fue(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?gA(Object(n),!0).forEach(function(r){due(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gA(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function due(e,t,n){return(t=pue(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pue(e){var t=hue(e,"string");return typeof t=="symbol"?t:t+""}function hue(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 gue={cacheSize:2e3,enableCache:!0},NL=fue({},gue),mA=new cue(NL.cacheSize),mue={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},vA="recharts_measurement_span";function vue(e,t){var n=t.fontSize||"",r=t.fontFamily||"",i=t.fontWeight||"",o=t.fontStyle||"",a=t.letterSpacing||"",s=t.textTransform||"";return"".concat(e,"|").concat(n,"|").concat(r,"|").concat(i,"|").concat(o,"|").concat(a,"|").concat(s)}var yA=(e,t)=>{try{var n=document.getElementById(vA);n||(n=document.createElement("span"),n.setAttribute("id",vA),n.setAttribute("aria-hidden","true"),document.body.appendChild(n)),Object.assign(n.style,mue,t),n.textContent="".concat(e);var r=n.getBoundingClientRect();return{width:r.width,height:r.height}}catch{return{width:0,height:0}}},ju=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||xc.isSsr)return{width:0,height:0};if(!NL.enableCache)return yA(t,n);var r=vue(t,n),i=mA.get(r);if(i)return i;var o=yA(t,n);return mA.set(r,o),o},ML;function yue(e,t,n){return(t=bue(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function bue(e){var t=xue(e,"string");return typeof t=="symbol"?t:t+""}function xue(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 bA=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,xA=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,wue=/^(px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q)$/,Cue=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,Sue={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},Eue=["cm","mm","pt","pc","in","Q","px"];function _ue(e){return Eue.includes(e)}var rl="NaN";function Oue(e,t){return e*Sue[t]}class In{static parse(t){var n,[,r,i]=(n=Cue.exec(t))!==null&&n!==void 0?n:[];return r==null?In.NaN:new In(parseFloat(r),i??"")}constructor(t,n){this.num=t,this.unit=n,this.num=t,this.unit=n,Di(t)&&(this.unit=""),n!==""&&!wue.test(n)&&(this.num=NaN,this.unit=""),_ue(n)&&(this.num=Oue(t,n),this.unit="px")}add(t){return this.unit!==t.unit?new In(NaN,""):new In(this.num+t.num,this.unit)}subtract(t){return this.unit!==t.unit?new In(NaN,""):new In(this.num-t.num,this.unit)}multiply(t){return this.unit!==""&&t.unit!==""&&this.unit!==t.unit?new In(NaN,""):new In(this.num*t.num,this.unit||t.unit)}divide(t){return this.unit!==""&&t.unit!==""&&this.unit!==t.unit?new In(NaN,""):new In(this.num/t.num,this.unit||t.unit)}toString(){return"".concat(this.num).concat(this.unit)}isNaN(){return Di(this.num)}}ML=In;yue(In,"NaN",new ML(NaN,""));function DL(e){if(e==null||e.includes(rl))return rl;for(var t=e;t.includes("*")||t.includes("/");){var n,[,r,i,o]=(n=bA.exec(t))!==null&&n!==void 0?n:[],a=In.parse(r??""),s=In.parse(o??""),u=i==="*"?a.multiply(s):a.divide(s);if(u.isNaN())return rl;t=t.replace(bA,u.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var c,[,d,p,g]=(c=xA.exec(t))!==null&&c!==void 0?c:[],h=In.parse(d??""),y=In.parse(g??""),b=p==="+"?h.add(y):h.subtract(y);if(b.isNaN())return rl;t=t.replace(xA,b.toString())}return t}var wA=/\(([^()]*)\)/;function Pue(e){for(var t=e,n;(n=wA.exec(t))!=null;){var[,r]=n;t=t.replace(wA,DL(r))}return t}function Aue(e){var t=e.replace(/\s+/g,"");return t=Pue(t),t=DL(t),t}function Rue(e){try{return Aue(e)}catch{return rl}}function uy(e){var t=Rue(e.slice(5,-1));return t===rl?"":t}var Iue=["x","y","lineHeight","capHeight","fill","scaleToFit","textAnchor","verticalAnchor"],Tue=["dx","dy","angle","className","breakAll"];function Fb(){return Fb=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},Fb.apply(null,arguments)}function CA(e,t){if(e==null)return{};var n,r,i=kue(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function kue(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 jL=/[ \f\n\r\t\v\u2028\u2029]+/,LL=e=>{var{children:t,breakAll:n,style:r}=e;try{var i=[];pn(t)||(n?i=t.toString().split(""):i=t.toString().split(jL));var o=i.map(s=>({word:s,width:ju(s,r).width})),a=n?0:ju(" ",r).width;return{wordsWithComputedWidth:o,spaceWidth:a}}catch{return null}};function $L(e){return e==="start"||e==="middle"||e==="end"||e==="inherit"}function Nue(e){return pn(e)||typeof e=="string"||typeof e=="number"||typeof e=="boolean"}var FL=(e,t,n,r)=>e.reduce((i,o)=>{var{word:a,width:s}=o,u=i[i.length-1];if(u&&s!=null&&(t==null||r||u.width+s+n<Number(t)))u.words.push(a),u.width+=s+n;else{var c={words:[a],width:s};i.push(c)}return i},[]),VL=e=>e.reduce((t,n)=>t.width>n.width?t:n),Mue="…",SA=(e,t,n,r,i,o,a,s)=>{var u=e.slice(0,t),c=LL({breakAll:n,style:r,children:u+Mue});if(!c)return[!1,[]];var d=FL(c.wordsWithComputedWidth,o,a,s),p=d.length>i||VL(d).width>Number(o);return[p,d]},Due=(e,t,n,r,i)=>{var{maxLines:o,children:a,style:s,breakAll:u}=e,c=Te(o),d=String(a),p=FL(t,r,n,i);if(!c||i)return p;var g=p.length>o||VL(p).width>Number(r);if(!g)return p;for(var h=0,y=d.length-1,b=0,v;h<=y&&b<=d.length-1;){var w=Math.floor((h+y)/2),C=w-1,[E,_]=SA(d,C,u,s,o,r,n,i),[P]=SA(d,w,u,s,o,r,n,i);if(!E&&!P&&(h=w+1),E&&P&&(y=w-1),!E&&P){v=_;break}b++}return v||p},EA=e=>{var t=pn(e)?[]:e.toString().split(jL);return[{words:t,width:void 0}]},jue=e=>{var{width:t,scaleToFit:n,children:r,style:i,breakAll:o,maxLines:a}=e;if((t||n)&&!xc.isSsr){var s,u,c=LL({breakAll:o,children:r,style:i});if(c){var{wordsWithComputedWidth:d,spaceWidth:p}=c;s=d,u=p}else return EA(r);return Due({breakAll:o,children:r,maxLines:a,style:i},s,u,t,!!n)}return EA(r)},BL="#808080",Lue={angle:0,breakAll:!1,capHeight:"0.71em",fill:BL,lineHeight:"1em",scaleToFit:!1,textAnchor:"start",verticalAnchor:"end",x:0,y:0},Gw=j.forwardRef((e,t)=>{var n=Mr(e,Lue),{x:r,y:i,lineHeight:o,capHeight:a,fill:s,scaleToFit:u,textAnchor:c,verticalAnchor:d}=n,p=CA(n,Iue),g=j.useMemo(()=>jue({breakAll:p.breakAll,children:p.children,maxLines:p.maxLines,scaleToFit:u,style:p.style,width:p.width}),[p.breakAll,p.children,p.maxLines,u,p.style,p.width]),{dx:h,dy:y,angle:b,className:v,breakAll:w}=p,C=CA(p,Tue);if(!ji(r)||!ji(i)||g.length===0)return null;var E=Number(r)+(Te(h)?h:0),_=Number(i)+(Te(y)?y:0);if(!ut(E)||!ut(_))return null;var P;switch(d){case"start":P=uy("calc(".concat(a,")"));break;case"middle":P=uy("calc(".concat((g.length-1)/2," * -").concat(o," + (").concat(a," / 2))"));break;default:P=uy("calc(".concat(g.length-1," * -").concat(o,")"));break}var R=[],I=g[0];if(u&&I!=null){var k=I.width,{width:B}=p;R.push("scale(".concat(Te(B)&&Te(k)?B/k:1,")"))}return b&&R.push("rotate(".concat(b,", ").concat(E,", ").concat(_,")")),R.length&&(C.transform=R.join(" ")),x.createElement("text",Fb({},ti(C),{ref:t,x:E,y:_,className:Pt("recharts-text",v),textAnchor:c,fill:s.includes("url")?BL:s}),g.map((L,V)=>{var D=L.words.join(w?"":" ");return x.createElement("tspan",{x:E,dy:V===0?P:o,key:"".concat(D,"-").concat(V)},D)}))});Gw.displayName="Text";function _A(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).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?_A(Object(n),!0).forEach(function(r){$ue(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_A(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function $ue(e,t,n){return(t=Fue(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Fue(e){var t=Vue(e,"string");return typeof t=="symbol"?t:t+""}function Vue(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 Bue=e=>{var{viewBox:t,position:n,offset:r=0,parentViewBox:i}=e,{x:o,y:a,height:s,upperWidth:u,lowerWidth:c}=Vx(t),d=o,p=o+(u-c)/2,g=(d+p)/2,h=(u+c)/2,y=d+u/2,b=s>=0?1:-1,v=b*r,w=b>0?"end":"start",C=b>0?"start":"end",E=u>=0?1:-1,_=E*r,P=E>0?"end":"start",R=E>0?"start":"end",I=i;if(n==="top"){var k={x:d+u/2,y:a-v,horizontalAnchor:"middle",verticalAnchor:w};return I&&(k.height=Math.max(a-I.y,0),k.width=u),k}if(n==="bottom"){var B={x:p+c/2,y:a+s+v,horizontalAnchor:"middle",verticalAnchor:C};return I&&(B.height=Math.max(I.y+I.height-(a+s),0),B.width=c),B}if(n==="left"){var L={x:g-_,y:a+s/2,horizontalAnchor:P,verticalAnchor:"middle"};return I&&(L.width=Math.max(L.x-I.x,0),L.height=s),L}if(n==="right"){var V={x:g+h+_,y:a+s/2,horizontalAnchor:R,verticalAnchor:"middle"};return I&&(V.width=Math.max(I.x+I.width-V.x,0),V.height=s),V}var D=I?{width:h,height:s}:{};return n==="insideLeft"?_i({x:g+_,y:a+s/2,horizontalAnchor:R,verticalAnchor:"middle"},D):n==="insideRight"?_i({x:g+h-_,y:a+s/2,horizontalAnchor:P,verticalAnchor:"middle"},D):n==="insideTop"?_i({x:d+u/2,y:a+v,horizontalAnchor:"middle",verticalAnchor:C},D):n==="insideBottom"?_i({x:p+c/2,y:a+s-v,horizontalAnchor:"middle",verticalAnchor:w},D):n==="insideTopLeft"?_i({x:d+_,y:a+v,horizontalAnchor:R,verticalAnchor:C},D):n==="insideTopRight"?_i({x:d+u-_,y:a+v,horizontalAnchor:P,verticalAnchor:C},D):n==="insideBottomLeft"?_i({x:p+_,y:a+s-v,horizontalAnchor:R,verticalAnchor:w},D):n==="insideBottomRight"?_i({x:p+c-_,y:a+s-v,horizontalAnchor:P,verticalAnchor:w},D):n&&typeof n=="object"&&(Te(n.x)||ns(n.x))&&(Te(n.y)||ns(n.y))?_i({x:o+fi(n.x,h),y:a+fi(n.y,s),horizontalAnchor:"end",verticalAnchor:"end"},D):_i({x:y,y:a+s/2,horizontalAnchor:"middle",verticalAnchor:"middle"},D)},zue=["labelRef"],Wue=["content"];function OA(e,t){if(e==null)return{};var n,r,i=Hue(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Hue(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 PA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Pu(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?PA(Object(n),!0).forEach(function(r){Uue(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):PA(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Uue(e,t,n){return(t=Gue(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Gue(e){var t=que(e,"string");return typeof t=="symbol"?t:t+""}function que(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 no(){return no=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},no.apply(null,arguments)}var zL=j.createContext(null),Kue=e=>{var{x:t,y:n,upperWidth:r,lowerWidth:i,width:o,height:a,children:s}=e,u=j.useMemo(()=>({x:t,y:n,upperWidth:r,lowerWidth:i,width:o,height:a}),[t,n,r,i,o,a]);return x.createElement(zL.Provider,{value:u},s)},WL=()=>{var e=j.useContext(zL),t=jh();return e||(t?Vx(t):void 0)},Yue=j.createContext(null),Xue=()=>{var e=j.useContext(Yue),t=Le($j);return e||t},Zue=e=>{var{value:t,formatter:n}=e,r=pn(e.children)?t:e.children;return typeof n=="function"?n(r):r},qw=e=>e!=null&&typeof e=="function",Que=(e,t)=>{var n=cr(t-e),r=Math.min(Math.abs(t-e),360);return n*r},Jue=(e,t,n,r,i)=>{var{offset:o,className:a}=e,{cx:s,cy:u,innerRadius:c,outerRadius:d,startAngle:p,endAngle:g,clockWise:h}=i,y=(c+d)/2,b=Que(p,g),v=b>=0?1:-1,w,C;switch(t){case"insideStart":w=p+v*o,C=h;break;case"insideEnd":w=g-v*o,C=!h;break;case"end":w=g+v*o,C=h;break;default:throw new Error("Unsupported position ".concat(t))}C=b<=0?C:!C;var E=kn(s,u,y,w),_=kn(s,u,y,w+(C?1:-1)*359),P="M".concat(E.x,",").concat(E.y,`
226
+ A`).concat(y,",").concat(y,",0,1,").concat(C?0:1,`,
227
+ `).concat(_.x,",").concat(_.y),R=pn(e.id)?zu("recharts-radial-line-"):e.id;return x.createElement("text",no({},r,{dominantBaseline:"central",className:Pt("recharts-radial-bar-label",a)}),x.createElement("defs",null,x.createElement("path",{id:R,d:P})),x.createElement("textPath",{xlinkHref:"#".concat(R)},n))},ece=(e,t,n)=>{var{cx:r,cy:i,innerRadius:o,outerRadius:a,startAngle:s,endAngle:u}=e,c=(s+u)/2;if(n==="outside"){var{x:d,y:p}=kn(r,i,a+t,c);return{x:d,y:p,textAnchor:d>=r?"start":"end",verticalAnchor:"middle"}}if(n==="center")return{x:r,y:i,textAnchor:"middle",verticalAnchor:"middle"};if(n==="centerTop")return{x:r,y:i,textAnchor:"middle",verticalAnchor:"start"};if(n==="centerBottom")return{x:r,y:i,textAnchor:"middle",verticalAnchor:"end"};var g=(o+a)/2,{x:h,y}=kn(r,i,g,c);return{x:h,y,textAnchor:"middle",verticalAnchor:"middle"}},Rd=e=>e!=null&&"cx"in e&&Te(e.cx),tce={angle:0,offset:5,zIndex:Zn.label,position:"middle",textBreakAll:!1};function nce(e){if(!Rd(e))return e;var{cx:t,cy:n,outerRadius:r}=e,i=r*2;return{x:t-r,y:n-r,width:i,upperWidth:i,lowerWidth:i,height:i}}function qo(e){var t=Mr(e,tce),{viewBox:n,parentViewBox:r,position:i,value:o,children:a,content:s,className:u="",textBreakAll:c,labelRef:d}=t,p=Xue(),g=WL(),h=i==="center"?g:p??g,y,b,v;n==null?y=h:Rd(n)?y=n:y=Vx(n);var w=nce(y);if(!y||pn(o)&&pn(a)&&!j.isValidElement(s)&&typeof s!="function")return null;var C=Pu(Pu({},t),{},{viewBox:y});if(j.isValidElement(s)){var{labelRef:E}=C,_=OA(C,zue);return j.cloneElement(s,_)}if(typeof s=="function"){var{content:P}=C,R=OA(C,Wue);if(b=j.createElement(s,R),j.isValidElement(b))return b}else b=Zue(t);var I=ti(t);if(Rd(y)){if(i==="insideStart"||i==="insideEnd"||i==="end")return Jue(t,i,b,I,y);v=ece(y,t.offset,t.position)}else{if(!w)return null;var k=Bue({viewBox:w,position:i,offset:t.offset,parentViewBox:Rd(r)?void 0:r});v=Pu(Pu({x:k.x,y:k.y,textAnchor:k.horizontalAnchor,verticalAnchor:k.verticalAnchor},k.width!==void 0?{width:k.width}:{}),k.height!==void 0?{height:k.height}:{})}return x.createElement(Po,{zIndex:t.zIndex},x.createElement(Gw,no({ref:d,className:Pt("recharts-label",u)},I,v,{textAnchor:$L(I.textAnchor)?I.textAnchor:v.textAnchor,breakAll:c}),b))}qo.displayName="Label";var rce=(e,t,n)=>{if(!e)return null;var r={viewBox:t,labelRef:n};return e===!0?x.createElement(qo,no({key:"label-implicit"},r)):ji(e)?x.createElement(qo,no({key:"label-implicit",value:e},r)):j.isValidElement(e)?e.type===qo?j.cloneElement(e,Pu({key:"label-implicit"},r)):x.createElement(qo,no({key:"label-implicit",content:e},r)):qw(e)?x.createElement(qo,no({key:"label-implicit",content:e},r)):e&&typeof e=="object"?x.createElement(qo,no({},e,{key:"label-implicit"},r)):null};function ice(e){var{label:t,labelRef:n}=e,r=WL();return rce(t,r,n)||null}var oce=["valueAccessor"],ace=["dataKey","clockWise","id","textBreakAll","zIndex"];function $p(){return $p=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},$p.apply(null,arguments)}function AA(e,t){if(e==null)return{};var n,r,i=sce(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function sce(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 lce=e=>{var t=Array.isArray(e.value)?e.value[e.value.length-1]:e.value;if(Nue(t))return t},HL=j.createContext(void 0),uce=HL.Provider,UL=j.createContext(void 0);UL.Provider;function cce(){return j.useContext(HL)}function fce(){return j.useContext(UL)}function Id(e){var{valueAccessor:t=lce}=e,n=AA(e,oce),{dataKey:r,clockWise:i,id:o,textBreakAll:a,zIndex:s}=n,u=AA(n,ace),c=cce(),d=fce(),p=c||d;return!p||!p.length?null:x.createElement(Po,{zIndex:s??Zn.label},x.createElement(Mi,{className:"recharts-label-list"},p.map((g,h)=>{var y,b=pn(r)?t(g,h):Mn(g.payload,r),v=pn(o)?{}:{id:"".concat(o,"-").concat(h)};return x.createElement(qo,$p({key:"label-".concat(h)},ti(g),u,v,{fill:(y=n.fill)!==null&&y!==void 0?y:g.fill,parentViewBox:g.parentViewBox,value:b,textBreakAll:a,viewBox:g.viewBox,index:h,zIndex:0}))})))}Id.displayName="LabelList";function dce(e){var{label:t}=e;return t?t===!0?x.createElement(Id,{key:"labelList-implicit"}):x.isValidElement(t)||qw(t)?x.createElement(Id,{key:"labelList-implicit",content:t}):typeof t=="object"?x.createElement(Id,$p({key:"labelList-implicit"},t,{type:String(t.type)})):null:null}var pce={radiusAxis:{},angleAxis:{}},GL=Wn({name:"polarAxis",initialState:pce,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:fge,removeRadiusAxis:dge,addAngleAxis:pge,removeAngleAxis:hge}=GL.actions,hce=GL.reducer;function gce(e){return e&&typeof e=="object"&&"className"in e&&typeof e.className=="string"?e.className:""}var yd={exports:{}},St={};var RA;function mce(){if(RA)return St;RA=1;var e=60103,t=60106,n=60107,r=60108,i=60114,o=60109,a=60110,s=60112,u=60113,c=60120,d=60115,p=60116,g=60121,h=60122,y=60117,b=60129,v=60131;if(typeof Symbol=="function"&&Symbol.for){var w=Symbol.for;e=w("react.element"),t=w("react.portal"),n=w("react.fragment"),r=w("react.strict_mode"),i=w("react.profiler"),o=w("react.provider"),a=w("react.context"),s=w("react.forward_ref"),u=w("react.suspense"),c=w("react.suspense_list"),d=w("react.memo"),p=w("react.lazy"),g=w("react.block"),h=w("react.server.block"),y=w("react.fundamental"),b=w("react.debug_trace_mode"),v=w("react.legacy_hidden")}function C(H){if(typeof H=="object"&&H!==null){var J=H.$$typeof;switch(J){case e:switch(H=H.type,H){case n:case i:case r:case u:case c:return H;default:switch(H=H&&H.$$typeof,H){case a:case s:case p:case d:case o:return H;default:return J}}case t:return J}}}var E=o,_=e,P=s,R=n,I=p,k=d,B=t,L=i,V=r,D=u;return St.ContextConsumer=a,St.ContextProvider=E,St.Element=_,St.ForwardRef=P,St.Fragment=R,St.Lazy=I,St.Memo=k,St.Portal=B,St.Profiler=L,St.StrictMode=V,St.Suspense=D,St.isAsyncMode=function(){return!1},St.isConcurrentMode=function(){return!1},St.isContextConsumer=function(H){return C(H)===a},St.isContextProvider=function(H){return C(H)===o},St.isElement=function(H){return typeof H=="object"&&H!==null&&H.$$typeof===e},St.isForwardRef=function(H){return C(H)===s},St.isFragment=function(H){return C(H)===n},St.isLazy=function(H){return C(H)===p},St.isMemo=function(H){return C(H)===d},St.isPortal=function(H){return C(H)===t},St.isProfiler=function(H){return C(H)===i},St.isStrictMode=function(H){return C(H)===r},St.isSuspense=function(H){return C(H)===u},St.isValidElementType=function(H){return typeof H=="string"||typeof H=="function"||H===n||H===i||H===b||H===r||H===u||H===c||H===v||typeof H=="object"&&H!==null&&(H.$$typeof===p||H.$$typeof===d||H.$$typeof===o||H.$$typeof===a||H.$$typeof===s||H.$$typeof===y||H.$$typeof===g||H[0]===h)},St.typeOf=C,St}var Et={};var IA;function vce(){return IA||(IA=1,process.env.NODE_ENV!=="production"&&(function(){var e=60103,t=60106,n=60107,r=60108,i=60114,o=60109,a=60110,s=60112,u=60113,c=60120,d=60115,p=60116,g=60121,h=60122,y=60117,b=60129,v=60131;if(typeof Symbol=="function"&&Symbol.for){var w=Symbol.for;e=w("react.element"),t=w("react.portal"),n=w("react.fragment"),r=w("react.strict_mode"),i=w("react.profiler"),o=w("react.provider"),a=w("react.context"),s=w("react.forward_ref"),u=w("react.suspense"),c=w("react.suspense_list"),d=w("react.memo"),p=w("react.lazy"),g=w("react.block"),h=w("react.server.block"),y=w("react.fundamental"),w("react.scope"),w("react.opaque.id"),b=w("react.debug_trace_mode"),w("react.offscreen"),v=w("react.legacy_hidden")}var C=!1;function E(ne){return!!(typeof ne=="string"||typeof ne=="function"||ne===n||ne===i||ne===b||ne===r||ne===u||ne===c||ne===v||C||typeof ne=="object"&&ne!==null&&(ne.$$typeof===p||ne.$$typeof===d||ne.$$typeof===o||ne.$$typeof===a||ne.$$typeof===s||ne.$$typeof===y||ne.$$typeof===g||ne[0]===h))}function _(ne){if(typeof ne=="object"&&ne!==null){var $=ne.$$typeof;switch($){case e:var ie=ne.type;switch(ie){case n:case i:case r:case u:case c:return ie;default:var Z=ie&&ie.$$typeof;switch(Z){case a:case s:case p:case d:case o:return Z;default:return $}}case t:return $}}}var P=a,R=o,I=e,k=s,B=n,L=p,V=d,D=t,H=i,J=r,te=u,G=!1,ee=!1;function Q(ne){return G||(G=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")),!1}function pe(ne){return ee||(ee=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),!1}function K(ne){return _(ne)===a}function Ae(ne){return _(ne)===o}function Se(ne){return typeof ne=="object"&&ne!==null&&ne.$$typeof===e}function $e(ne){return _(ne)===s}function we(ne){return _(ne)===n}function Ce(ne){return _(ne)===p}function ze(ne){return _(ne)===d}function Ke(ne){return _(ne)===t}function Fe(ne){return _(ne)===i}function Y(ne){return _(ne)===r}function oe(ne){return _(ne)===u}Et.ContextConsumer=P,Et.ContextProvider=R,Et.Element=I,Et.ForwardRef=k,Et.Fragment=B,Et.Lazy=L,Et.Memo=V,Et.Portal=D,Et.Profiler=H,Et.StrictMode=J,Et.Suspense=te,Et.isAsyncMode=Q,Et.isConcurrentMode=pe,Et.isContextConsumer=K,Et.isContextProvider=Ae,Et.isElement=Se,Et.isForwardRef=$e,Et.isFragment=we,Et.isLazy=Ce,Et.isMemo=ze,Et.isPortal=Ke,Et.isProfiler=Fe,Et.isStrictMode=Y,Et.isSuspense=oe,Et.isValidElementType=E,Et.typeOf=_})()),Et}var TA;function yce(){return TA||(TA=1,process.env.NODE_ENV==="production"?yd.exports=mce():yd.exports=vce()),yd.exports}var bce=yce(),kA=e=>typeof e=="string"?e:e?e.displayName||e.name||"Component":"",NA=null,cy=null,qL=e=>{if(e===NA&&Array.isArray(cy))return cy;var t=[];return j.Children.forEach(e,n=>{pn(n)||(bce.isFragment(n)?t=t.concat(qL(n.props.children)):t.push(n))}),cy=t,NA=e,t};function xce(e,t){var n=[],r=[];return Array.isArray(t)?r=t.map(i=>kA(i)):r=[kA(t)],qL(e).forEach(i=>{var o=gl(i,"type.displayName")||gl(i,"type.name");o&&r.indexOf(o)!==-1&&n.push(i)}),n}var fy={},MA;function wce(){return MA||(MA=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 i=n[Symbol.toStringTag];return i==null||!Object.getOwnPropertyDescriptor(n,Symbol.toStringTag)?.writable?!1:n.toString()===`[object ${i}]`}let r=n;for(;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return Object.getPrototypeOf(n)===r}e.isPlainObject=t})(fy)),fy}var dy,DA;function Cce(){return DA||(DA=1,dy=wce().isPlainObject),dy}var Sce=Cce();const Ece=fs(Sce);var jA,LA,$A,FA,VA;function BA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function zA(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?BA(Object(n),!0).forEach(function(r){_ce(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):BA(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function _ce(e,t,n){return(t=Oce(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Oce(e){var t=Pce(e,"string");return typeof t=="symbol"?t:t+""}function Pce(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 Fp(){return Fp=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},Fp.apply(null,arguments)}function bu(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var WA=(e,t,n,r,i)=>{var o=n-r,a;return a=qt(jA||(jA=bu(["M ",",",""])),e,t),a+=qt(LA||(LA=bu(["L ",",",""])),e+n,t),a+=qt($A||($A=bu(["L ",",",""])),e+n-o/2,t+i),a+=qt(FA||(FA=bu(["L ",",",""])),e+n-o/2-r,t+i),a+=qt(VA||(VA=bu(["L ",","," Z"])),e,t),a},Ace={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},Rce=e=>{var t=Mr(e,Ace),{x:n,y:r,upperWidth:i,lowerWidth:o,height:a,className:s}=t,{animationEasing:u,animationDuration:c,animationBegin:d,isUpdateAnimationActive:p}=t,g=j.useRef(null),[h,y]=j.useState(-1),b=j.useRef(i),v=j.useRef(o),w=j.useRef(a),C=j.useRef(n),E=j.useRef(r),_=Hx(e,"trapezoid-");if(j.useEffect(()=>{if(g.current&&g.current.getTotalLength)try{var J=g.current.getTotalLength();J&&y(J)}catch{}},[]),n!==+n||r!==+r||i!==+i||o!==+o||a!==+a||i===0&&o===0||a===0)return null;var P=Pt("recharts-trapezoid",s);if(!p)return x.createElement("g",null,x.createElement("path",Fp({},ti(t),{className:P,d:WA(n,r,i,o,a)})));var R=b.current,I=v.current,k=w.current,B=C.current,L=E.current,V="0px ".concat(h===-1?1:h,"px"),D="".concat(h,"px ").concat(h,"px"),H=lj(["strokeDasharray"],c,u);return x.createElement(Wx,{animationId:_,key:_,canBegin:h>0,duration:c,easing:u,isActive:p,begin:d},J=>{var te=Tn(R,i,J),G=Tn(I,o,J),ee=Tn(k,a,J),Q=Tn(B,n,J),pe=Tn(L,r,J);g.current&&(b.current=te,v.current=G,w.current=ee,C.current=Q,E.current=pe);var K=J>0?{transition:H,strokeDasharray:D}:{strokeDasharray:V};return x.createElement("path",Fp({},ti(t),{className:P,d:WA(Q,pe,te,G,ee),ref:g,style:zA(zA({},K),t.style)}))})},Ice=["option","shapeType","activeClassName","inActiveClassName"];function Tce(e,t){if(e==null)return{};var n,r,i=kce(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function kce(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 HA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Vp(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?HA(Object(n),!0).forEach(function(r){Nce(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):HA(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Nce(e,t,n){return(t=Mce(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Mce(e){var t=Dce(e,"string");return typeof t=="symbol"?t:t+""}function Dce(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 jce(e,t){return Vp(Vp({},t),e)}function Lce(e,t){return e==="symbols"}function UA(e){var{shapeType:t,elementProps:n}=e;switch(t){case"rectangle":return x.createElement(dj,n);case"trapezoid":return x.createElement(Rce,n);case"sector":return x.createElement(gj,n);case"symbols":if(Lce(t))return x.createElement(GM,n);break;case"curve":return x.createElement(sj,n);default:return null}}function $ce(e){return j.isValidElement(e)?e.props:e}function Fce(e){var{option:t,shapeType:n,activeClassName:r="recharts-active-shape",inActiveClassName:i="recharts-shape"}=e,o=Tce(e,Ice),a;if(j.isValidElement(t))a=j.cloneElement(t,Vp(Vp({},o),$ce(t)));else if(typeof t=="function")a=t(o,o.index);else if(Ece(t)&&typeof t!="boolean"){var s=jce(t,o);a=x.createElement(UA,{shapeType:n,elementProps:s})}else{var u=o;a=x.createElement(UA,{shapeType:n,elementProps:u})}return o.isActive?x.createElement(Mi,{className:r},a):x.createElement(Mi,{className:i},a)}var KL=(e,t,n)=>{var r=Ht();return(i,o)=>a=>{e?.(i,o,a),r(sL({activeIndex:String(o),activeDataKey:t,activeCoordinate:i.tooltipPosition,activeGraphicalItemId:n}))}},YL=e=>{var t=Ht();return(n,r)=>i=>{e?.(n,r,i),t(Xae())}},XL=(e,t,n)=>{var r=Ht();return(i,o)=>a=>{e?.(i,o,a),r(Zae({activeIndex:String(o),activeDataKey:t,activeCoordinate:i.tooltipPosition,activeGraphicalItemId:n}))}};function Vce(e){var{tooltipEntrySettings:t}=e,n=Ht(),r=pr(),i=j.useRef(null);return j.useLayoutEffect(()=>{r||(i.current===null?n(Gae(t)):i.current!==t&&n(qae({prev:i.current,next:t})),i.current=t)},[t,n,r]),j.useLayoutEffect(()=>()=>{i.current&&(n(Kae(i.current)),i.current=null)},[n]),null}function Bce(e){var{legendPayload:t}=e,n=Ht(),r=pr(),i=j.useRef(null);return j.useLayoutEffect(()=>{r||(i.current===null?n(Xee(t)):i.current!==t&&n(Zee({prev:i.current,next:t})),i.current=t)},[n,r,t]),j.useLayoutEffect(()=>()=>{i.current&&(n(Qee(i.current)),i.current=null)},[n]),null}var py,zce=()=>{var[e]=x.useState(()=>zu("uid-"));return e},Wce=(py=x.useId)!==null&&py!==void 0?py:zce;function Hce(e,t){var n=Wce();return t||(e?"".concat(e,"-").concat(n):n)}var Uce=j.createContext(void 0),Gce=e=>{var{id:t,type:n,children:r}=e,i=Hce("recharts-".concat(n),t);return x.createElement(Uce.Provider,{value:i},r(i))},qce={cartesianItems:[],polarItems:[]},ZL=Wn({name:"graphicalItems",initialState:qce,reducers:{addCartesianGraphicalItem:{reducer(e,t){e.cartesianItems.push(t.payload)},prepare:Mt()},replaceCartesianGraphicalItem:{reducer(e,t){var{prev:n,next:r}=t.payload,i=Qr(e).cartesianItems.indexOf(n);i>-1&&(e.cartesianItems[i]=r)},prepare:Mt()},removeCartesianGraphicalItem:{reducer(e,t){var n=Qr(e).cartesianItems.indexOf(t.payload);n>-1&&e.cartesianItems.splice(n,1)},prepare:Mt()},addPolarGraphicalItem:{reducer(e,t){e.polarItems.push(t.payload)},prepare:Mt()},removePolarGraphicalItem:{reducer(e,t){var n=Qr(e).polarItems.indexOf(t.payload);n>-1&&e.polarItems.splice(n,1)},prepare:Mt()},replacePolarGraphicalItem:{reducer(e,t){var{prev:n,next:r}=t.payload,i=Qr(e).polarItems.indexOf(n);i>-1&&(e.polarItems[i]=r)},prepare:Mt()}}}),{addCartesianGraphicalItem:Kce,replaceCartesianGraphicalItem:Yce,removeCartesianGraphicalItem:Xce,addPolarGraphicalItem:gge,removePolarGraphicalItem:mge,replacePolarGraphicalItem:vge}=ZL.actions,Zce=ZL.reducer,Qce=e=>{var t=Ht(),n=j.useRef(null);return j.useLayoutEffect(()=>{n.current===null?t(Kce(e)):n.current!==e&&t(Yce({prev:n.current,next:e})),n.current=e},[t,e]),j.useLayoutEffect(()=>()=>{n.current&&(t(Xce(n.current)),n.current=null)},[t]),null},Jce=j.memo(Qce);function GA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function qA(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?GA(Object(n),!0).forEach(function(r){efe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):GA(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function efe(e,t,n){return(t=tfe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function tfe(e){var t=nfe(e,"string");return typeof t=="symbol"?t:t+""}function nfe(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 QL=0,rfe={xAxis:{},yAxis:{},zAxis:{}},JL=Wn({name:"cartesianAxis",initialState:rfe,reducers:{addXAxis:{reducer(e,t){e.xAxis[t.payload.id]=t.payload},prepare:Mt()},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:Mt()},removeXAxis:{reducer(e,t){delete e.xAxis[t.payload.id]},prepare:Mt()},addYAxis:{reducer(e,t){e.yAxis[t.payload.id]=t.payload},prepare:Mt()},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:Mt()},removeYAxis:{reducer(e,t){delete e.yAxis[t.payload.id]},prepare:Mt()},addZAxis:{reducer(e,t){e.zAxis[t.payload.id]=t.payload},prepare:Mt()},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:Mt()},removeZAxis:{reducer(e,t){delete e.zAxis[t.payload.id]},prepare:Mt()},updateYAxisWidth(e,t){var{id:n,width:r}=t.payload,i=e.yAxis[n];if(i){var o,a=i.widthHistory||[];if(a.length===3&&a[0]===a[2]&&r===a[1]&&r!==i.width&&Math.abs(r-((o=a[0])!==null&&o!==void 0?o:0))<=1)return;var s=[...a,r].slice(-3);e.yAxis[n]=qA(qA({},i),{},{width:r,widthHistory:s})}}}}),{addXAxis:ife,replaceXAxis:ofe,removeXAxis:afe,addYAxis:sfe,replaceYAxis:lfe,removeYAxis:ufe,addZAxis:yge,replaceZAxis:bge,removeZAxis:xge,updateYAxisWidth:cfe}=JL.actions,ffe=JL.reducer,dfe=q([wn],e=>({top:e.top,bottom:e.bottom,left:e.left,right:e.right})),pfe=q([dfe,xo,wo],(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)}}),e$=()=>Le(pfe),KA=(e,t,n)=>{var r=n??e;if(!pn(r))return fi(r,t,0)},hfe=(e,t,n)=>{var r={},i=e.filter(Gh),o=e.filter(c=>c.stackId==null),a=i.reduce((c,d)=>{var p=c[d.stackId];return p==null&&(p=[]),p.push(d),c[d.stackId]=p,c},r),s=Object.entries(a).map(c=>{var d,[p,g]=c,h=g.map(b=>b.dataKey),y=KA(t,n,(d=g[0])===null||d===void 0?void 0:d.barSize);return{stackId:p,dataKeys:h,barSize:y}}),u=o.map(c=>{var d=[c.dataKey].filter(g=>g!=null),p=KA(t,n,c.barSize);return{stackId:void 0,dataKeys:d,barSize:p}});return[...s,...u]};function YA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function bd(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?YA(Object(n),!0).forEach(function(r){gfe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):YA(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function gfe(e,t,n){return(t=mfe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function mfe(e){var t=vfe(e,"string");return typeof t=="symbol"?t:t+""}function vfe(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 yfe(e,t,n,r,i){var o,a=r.length;if(!(a<1)){var s=fi(e,n,0,!0),u,c=[];if(ut((o=r[0])===null||o===void 0?void 0:o.barSize)){var d=!1,p=n/a,g=r.reduce((C,E)=>C+(E.barSize||0),0);g+=(a-1)*s,g>=n&&(g-=(a-1)*s,s=0),g>=n&&p>0&&(d=!0,p*=.9,g=a*p);var h=(n-g)/2>>0,y={offset:h-s,size:0};u=r.reduce((C,E)=>{var _,P={stackId:E.stackId,dataKeys:E.dataKeys,position:{offset:y.offset+y.size+s,size:d?p:(_=E.barSize)!==null&&_!==void 0?_:0}},R=[...C,P];return y=P.position,R},c)}else{var b=fi(t,n,0,!0);n-2*b-(a-1)*s<=0&&(s=0);var v=(n-2*b-(a-1)*s)/a;v>1&&(v>>=0);var w=ut(i)?Math.min(v,i):v;u=r.reduce((C,E,_)=>[...C,{stackId:E.stackId,dataKeys:E.dataKeys,position:{offset:b+(v+s)*_+(v-w)/2,size:w}}],c)}return u}}var bfe=(e,t,n,r,i,o,a)=>{var s=pn(a)?t:a,u=yfe(n,r,i!==o?i:o,e,s);return i!==o&&u!=null&&(u=u.map(c=>bd(bd({},c),{},{position:bd(bd({},c.position),{},{offset:c.position.offset-i/2})}))),u},xfe=(e,t)=>{var n=ew(t);if(!(!e||n==null||t==null)){var{stackId:r}=t;if(r!=null){var i=e[r];if(i){var{stackedData:o}=i;if(o)return o.find(a=>a.key===n)}}}},wfe=(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 Cfe(e,t){return e&&typeof e=="object"&&"zIndex"in e&&typeof e.zIndex=="number"&&ut(e.zIndex)?e.zIndex:t}var Sfe=e=>{var{chartData:t}=e,n=Ht(),r=pr();return j.useEffect(()=>r?()=>{}:(n(cA(t)),()=>{n(cA(void 0))}),[t,n,r]),null},XA={x:0,y:0,width:0,height:0,padding:{top:0,right:0,bottom:0,left:0}},t$=Wn({name:"brush",initialState:XA,reducers:{setBrushSettings(e,t){return t.payload==null?XA:t.payload}}}),{setBrushSettings:wge}=t$.actions,Efe=t$.reducer;function _fe(e){return(e%180+180)%180}var Ofe=function(t){var{width:n,height:r}=t,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,o=_fe(i),a=o*Math.PI/180,s=Math.atan(r/n),u=a>s&&a<Math.PI-s?r/Math.sin(a):n/Math.cos(a);return Math.abs(u)},Pfe={dots:[],areas:[],lines:[]},n$=Wn({name:"referenceElements",initialState:Pfe,reducers:{addDot:(e,t)=>{e.dots.push(t.payload)},removeDot:(e,t)=>{var n=Qr(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=Qr(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=Qr(e).lines.findIndex(r=>r===t.payload);n!==-1&&e.lines.splice(n,1)}}}),{addDot:Cge,removeDot:Sge,addArea:Ege,removeArea:_ge,addLine:Oge,removeLine:Pge}=n$.actions,Afe=n$.reducer,Rfe=j.createContext(void 0),Ife=e=>{var{children:t}=e,[n]=j.useState("".concat(zu("recharts"),"-clip")),r=e$();if(r==null)return null;var{x:i,y:o,width:a,height:s}=r;return x.createElement(Rfe.Provider,{value:n},x.createElement("defs",null,x.createElement("clipPath",{id:n},x.createElement("rect",{x:i,y:o,height:s,width:a}))),t)};function r$(e,t){if(t<1)return[];if(t===1)return e;for(var n=[],r=0;r<e.length;r+=t){var i=e[r];i!==void 0&&n.push(i)}return n}function Tfe(e,t,n){var r={width:e.width+t.width,height:e.height+t.height};return Ofe(r,n)}function kfe(e,t,n){var r=n==="width",{x:i,y:o,width:a,height:s}=e;return t===1?{start:r?i:o,end:r?i+a:o+s}:{start:r?i+a:o+s,end:r?i:o}}function nc(e,t,n,r,i){if(e*t<e*r||e*t>e*i)return!1;var o=n();return e*(t-e*o/2-r)>=0&&e*(t+e*o/2-i)<=0}function Nfe(e,t){return r$(e,t+1)}function Mfe(e,t,n,r,i){for(var o=(r||[]).slice(),{start:a,end:s}=t,u=0,c=1,d=a,p=function(){var y=r?.[u];if(y===void 0)return{v:r$(r,c)};var b=u,v,w=()=>(v===void 0&&(v=n(y,b)),v),C=y.coordinate,E=u===0||nc(e,C,w,d,s);E||(u=0,d=a,c+=1),E&&(d=C+e*(w()/2+i),u+=c)},g;c<=o.length;)if(g=p(),g)return g.v;return[]}function Dfe(e,t,n,r,i){var o=(r||[]).slice(),a=o.length;if(a===0)return[];for(var{start:s,end:u}=t,c=1;c<=a;c++){for(var d=(a-1)%c,p=s,g=!0,h=function(){var _=r[b];if(_==null)return 0;var P=b,R,I=()=>(R===void 0&&(R=n(_,P)),R),k=_.coordinate,B=b===d||nc(e,k,I,p,u);if(!B)return g=!1,1;B&&(p=k+e*(I()/2+i))},y,b=d;b<a&&(y=h(),!(y!==0&&y===1));b+=c);if(g){for(var v=[],w=d;w<a;w+=c){var C=r[w];C!=null&&v.push(C)}return v}}return[]}function ZA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Bn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ZA(Object(n),!0).forEach(function(r){jfe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ZA(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function jfe(e,t,n){return(t=Lfe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Lfe(e){var t=$fe(e,"string");return typeof t=="symbol"?t:t+""}function $fe(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 Ffe(e,t,n,r,i){for(var o=(r||[]).slice(),a=o.length,{start:s}=t,{end:u}=t,c=function(g){var h=o[g];if(h==null)return 1;var y=h,b,v=()=>(b===void 0&&(b=n(h,g)),b);if(g===a-1){var w=e*(y.coordinate+e*v()/2-u);o[g]=y=Bn(Bn({},y),{},{tickCoord:w>0?y.coordinate-w*e:y.coordinate})}else o[g]=y=Bn(Bn({},y),{},{tickCoord:y.coordinate});if(y.tickCoord!=null){var C=nc(e,y.tickCoord,v,s,u);C&&(u=y.tickCoord-e*(v()/2+i),o[g]=Bn(Bn({},y),{},{isShow:!0}))}},d=a-1;d>=0;d--)c(d);return o}function Vfe(e,t,n,r,i,o){var a=(r||[]).slice(),s=a.length,{start:u,end:c}=t;if(o){var d=r[s-1];if(d!=null){var p=n(d,s-1),g=e*(d.coordinate+e*p/2-c);if(a[s-1]=d=Bn(Bn({},d),{},{tickCoord:g>0?d.coordinate-g*e:d.coordinate}),d.tickCoord!=null){var h=nc(e,d.tickCoord,()=>p,u,c);h&&(c=d.tickCoord-e*(p/2+i),a[s-1]=Bn(Bn({},d),{},{isShow:!0}))}}}for(var y=o?s-1:s,b=function(C){var E=a[C];if(E==null)return 1;var _=E,P,R=()=>(P===void 0&&(P=n(E,C)),P);if(C===0){var I=e*(_.coordinate-e*R()/2-u);a[C]=_=Bn(Bn({},_),{},{tickCoord:I<0?_.coordinate-I*e:_.coordinate})}else a[C]=_=Bn(Bn({},_),{},{tickCoord:_.coordinate});if(_.tickCoord!=null){var k=nc(e,_.tickCoord,R,u,c);k&&(u=_.tickCoord+e*(R()/2+i),a[C]=Bn(Bn({},_),{},{isShow:!0}))}},v=0;v<y;v++)b(v);return a}function Kw(e,t,n){var{tick:r,ticks:i,viewBox:o,minTickGap:a,orientation:s,interval:u,tickFormatter:c,unit:d,angle:p}=e;if(!i||!i.length||!r)return[];if(Te(u)||xc.isSsr){var g;return(g=Nfe(i,Te(u)?u:0))!==null&&g!==void 0?g:[]}var h=[],y=s==="top"||s==="bottom"?"width":"height",b=d&&y==="width"?ju(d,{fontSize:t,letterSpacing:n}):{width:0,height:0},v=(P,R)=>{var I=typeof c=="function"?c(P.value,R):P.value;return y==="width"?Tfe(ju(I,{fontSize:t,letterSpacing:n}),b,p):ju(I,{fontSize:t,letterSpacing:n})[y]},w=i[0],C=i[1],E=i.length>=2&&w!=null&&C!=null?cr(C.coordinate-w.coordinate):1,_=kfe(o,E,y);return u==="equidistantPreserveStart"?Mfe(E,_,v,i,a):u==="equidistantPreserveEnd"?Dfe(E,_,v,i,a):(u==="preserveStart"||u==="preserveStartEnd"?h=Vfe(E,_,v,i,a,u==="preserveStartEnd"):h=Ffe(E,_,v,i,a),h.filter(P=>P.isShow))}var Bfe=e=>{var{ticks:t,label:n,labelGapWithTick:r=5,tickSize:i=0,tickMargin:o=0}=e,a=0;if(t){Array.from(t).forEach(d=>{if(d){var p=d.getBoundingClientRect();p.width>a&&(a=p.width)}});var s=n?n.getBoundingClientRect().width:0,u=i+o,c=a+u+s+(n?r:0);return Math.round(c)}return 0},zfe={xAxis:{},yAxis:{}},i$=Wn({name:"renderedTicks",initialState:zfe,reducers:{setRenderedTicks:(e,t)=>{var{axisType:n,axisId:r,ticks:i}=t.payload;e[n][r]=i},removeRenderedTicks:(e,t)=>{var{axisType:n,axisId:r}=t.payload;delete e[n][r]}}}),{setRenderedTicks:Wfe,removeRenderedTicks:Hfe}=i$.actions,Ufe=i$.reducer,Gfe=["axisLine","width","height","className","hide","ticks","axisType","axisId"];function qfe(e,t){if(e==null)return{};var n,r,i=Kfe(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Kfe(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 ss(){return ss=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},ss.apply(null,arguments)}function QA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).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?QA(Object(n),!0).forEach(function(r){Yfe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):QA(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Yfe(e,t,n){return(t=Xfe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Xfe(e){var t=Zfe(e,"string");return typeof t=="symbol"?t:t+""}function Zfe(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 lo={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:Zn.axis};function Qfe(e){var{x:t,y:n,width:r,height:i,orientation:o,mirror:a,axisLine:s,otherSvgProps:u}=e;if(!s)return null;var c=Gt(Gt(Gt({},u),fo(s)),{},{fill:"none"});if(o==="top"||o==="bottom"){var d=+(o==="top"&&!a||o==="bottom"&&a);c=Gt(Gt({},c),{},{x1:t,y1:n+d*i,x2:t+r,y2:n+d*i})}else{var p=+(o==="left"&&!a||o==="right"&&a);c=Gt(Gt({},c),{},{x1:t+p*r,y1:n,x2:t+p*r,y2:n+i})}return x.createElement("line",ss({},c,{className:Pt("recharts-cartesian-axis-line",gl(s,"className"))}))}function Jfe(e,t,n,r,i,o,a,s,u){var c,d,p,g,h,y,b=s?-1:1,v=e.tickSize||a,w=Te(e.tickCoord)?e.tickCoord:e.coordinate;switch(o){case"top":c=d=e.coordinate,g=n+ +!s*i,p=g-b*v,y=p-b*u,h=w;break;case"left":p=g=e.coordinate,d=t+ +!s*r,c=d-b*v,h=c-b*u,y=w;break;case"right":p=g=e.coordinate,d=t+ +s*r,c=d+b*v,h=c+b*u,y=w;break;default:c=d=e.coordinate,g=n+ +s*i,p=g+b*v,y=p+b*u,h=w;break}return{line:{x1:c,y1:p,x2:d,y2:g},tick:{x:h,y}}}function ede(e,t){switch(e){case"left":return t?"start":"end";case"right":return t?"end":"start";default:return"middle"}}function tde(e,t){switch(e){case"left":case"right":return"middle";case"top":return t?"start":"end";default:return t?"end":"start"}}function nde(e){var{option:t,tickProps:n,value:r}=e,i,o=Pt(n.className,"recharts-cartesian-axis-tick-value");if(x.isValidElement(t))i=x.cloneElement(t,Gt(Gt({},n),{},{className:o}));else if(typeof t=="function")i=t(Gt(Gt({},n),{},{className:o}));else{var a="recharts-cartesian-axis-tick-value";typeof t!="boolean"&&(a=Pt(a,gce(t))),i=x.createElement(Gw,ss({},n,{className:a}),r)}return i}function rde(e){var{ticks:t,axisType:n,axisId:r}=e,i=Ht();return j.useEffect(()=>{if(r==null||n==null)return ds;var o=t.map(a=>({value:a.value,coordinate:a.coordinate,offset:a.offset,index:a.index}));return i(Wfe({ticks:o,axisId:r,axisType:n})),()=>{i(Hfe({axisId:r,axisType:n}))}},[i,t,r,n]),null}var ide=j.forwardRef((e,t)=>{var{ticks:n=[],tick:r,tickLine:i,stroke:o,tickFormatter:a,unit:s,padding:u,tickTextProps:c,orientation:d,mirror:p,x:g,y:h,width:y,height:b,tickSize:v,tickMargin:w,fontSize:C,letterSpacing:E,getTicksConfig:_,events:P,axisType:R,axisId:I}=e,k=Kw(Gt(Gt({},_),{},{ticks:n}),C,E),B=fo(_),L=Cx(r),V=$L(B.textAnchor)?B.textAnchor:ede(d,p),D=tde(d,p),H={};typeof i=="object"&&(H=i);var J=Gt(Gt({},B),{},{fill:"none"},H),te=k.map(Q=>Gt({entry:Q},Jfe(Q,g,h,y,b,d,v,p,w))),G=te.map(Q=>{var{entry:pe,line:K}=Q;return x.createElement(Mi,{className:"recharts-cartesian-axis-tick",key:"tick-".concat(pe.value,"-").concat(pe.coordinate,"-").concat(pe.tickCoord)},i&&x.createElement("line",ss({},J,K,{className:Pt("recharts-cartesian-axis-tick-line",gl(i,"className"))})))}),ee=te.map((Q,pe)=>{var K,Ae,{entry:Se,tick:$e}=Q,we=Gt(Gt(Gt(Gt({verticalAnchor:D},B),{},{textAnchor:V,stroke:"none",fill:o},$e),{},{index:pe,payload:Se,visibleTicksCount:k.length,tickFormatter:a,padding:u},c),{},{angle:(K=(Ae=c?.angle)!==null&&Ae!==void 0?Ae:B.angle)!==null&&K!==void 0?K:0}),Ce=Gt(Gt({},we),L);return x.createElement(Mi,ss({className:"recharts-cartesian-axis-tick-label",key:"tick-label-".concat(Se.value,"-").concat(Se.coordinate,"-").concat(Se.tickCoord)},Rx(P,Se,pe)),r&&x.createElement(nde,{option:r,tickProps:Ce,value:"".concat(typeof a=="function"?a(Se.value,pe):Se.value).concat(s||"")}))});return x.createElement("g",{className:"recharts-cartesian-axis-ticks recharts-".concat(R,"-ticks")},x.createElement(rde,{ticks:k,axisId:I,axisType:R}),ee.length>0&&x.createElement(Po,{zIndex:Zn.label},x.createElement("g",{className:"recharts-cartesian-axis-tick-labels recharts-".concat(R,"-tick-labels"),ref:t},ee)),G.length>0&&x.createElement("g",{className:"recharts-cartesian-axis-tick-lines recharts-".concat(R,"-tick-lines")},G))}),ode=j.forwardRef((e,t)=>{var{axisLine:n,width:r,height:i,className:o,hide:a,ticks:s,axisType:u,axisId:c}=e,d=qfe(e,Gfe),[p,g]=j.useState(""),[h,y]=j.useState(""),b=j.useRef(null);j.useImperativeHandle(t,()=>({getCalculatedWidth:()=>{var w;return Bfe({ticks:b.current,label:(w=e.labelRef)===null||w===void 0?void 0:w.current,labelGapWithTick:5,tickSize:e.tickSize,tickMargin:e.tickMargin})}}));var v=j.useCallback(w=>{if(w){var C=w.getElementsByClassName("recharts-cartesian-axis-tick-value");b.current=C;var E=C[0];if(E){var _=window.getComputedStyle(E),P=_.fontSize,R=_.letterSpacing;(P!==p||R!==h)&&(g(P),y(R))}}},[p,h]);return a||r!=null&&r<=0||i!=null&&i<=0?null:x.createElement(Po,{zIndex:e.zIndex},x.createElement(Mi,{className:Pt("recharts-cartesian-axis",o)},x.createElement(Qfe,{x:e.x,y:e.y,width:r,height:i,orientation:e.orientation,mirror:e.mirror,axisLine:n,otherSvgProps:fo(e)}),x.createElement(ide,{ref:v,axisType:u,events:d,fontSize:p,getTicksConfig:e,height:e.height,letterSpacing:h,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:c}),x.createElement(Kue,{x:e.x,y:e.y,width:e.width,height:e.height,lowerWidth:e.width,upperWidth:e.width},x.createElement(ice,{label:e.label,labelRef:e.labelRef}),e.children)))}),Yw=x.forwardRef((e,t)=>{var n=Mr(e,lo);return x.createElement(ode,ss({},n,{ref:t}))});Yw.displayName="CartesianAxis";var ade=["x1","y1","x2","y2","key"],sde=["offset"],lde=["xAxisId","yAxisId"],ude=["xAxisId","yAxisId"];function JA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function zn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?JA(Object(n),!0).forEach(function(r){cde(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):JA(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function cde(e,t,n){return(t=fde(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function fde(e){var t=dde(e,"string");return typeof t=="symbol"?t:t+""}function dde(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 Ua(){return Ua=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},Ua.apply(null,arguments)}function Bp(e,t){if(e==null)return{};var n,r,i=pde(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function pde(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 hde=e=>{var{fill:t}=e;if(!t||t==="none")return null;var{fillOpacity:n,x:r,y:i,width:o,height:a,ry:s}=e;return x.createElement("rect",{x:r,y:i,ry:s,width:o,height:a,stroke:"none",fill:t,fillOpacity:n,className:"recharts-cartesian-grid-bg"})};function o$(e){var{option:t,lineItemProps:n}=e,r;if(x.isValidElement(t))r=x.cloneElement(t,n);else if(typeof t=="function")r=t(n);else{var i,{x1:o,y1:a,x2:s,y2:u,key:c}=n,d=Bp(n,ade),p=(i=fo(d))!==null&&i!==void 0?i:{},{offset:g}=p,h=Bp(p,sde);r=x.createElement("line",Ua({},h,{x1:o,y1:a,x2:s,y2:u,fill:"none",key:c}))}return r}function gde(e){var{x:t,width:n,horizontal:r=!0,horizontalPoints:i}=e;if(!r||!i||!i.length)return null;var{xAxisId:o,yAxisId:a}=e,s=Bp(e,lde),u=i.map((c,d)=>{var p=zn(zn({},s),{},{x1:t,y1:c,x2:t+n,y2:c,key:"line-".concat(d),index:d});return x.createElement(o$,{key:"line-".concat(d),option:r,lineItemProps:p})});return x.createElement("g",{className:"recharts-cartesian-grid-horizontal"},u)}function mde(e){var{y:t,height:n,vertical:r=!0,verticalPoints:i}=e;if(!r||!i||!i.length)return null;var{xAxisId:o,yAxisId:a}=e,s=Bp(e,ude),u=i.map((c,d)=>{var p=zn(zn({},s),{},{x1:c,y1:t,x2:c,y2:t+n,key:"line-".concat(d),index:d});return x.createElement(o$,{option:r,lineItemProps:p,key:"line-".concat(d)})});return x.createElement("g",{className:"recharts-cartesian-grid-vertical"},u)}function vde(e){var{horizontalFill:t,fillOpacity:n,x:r,y:i,width:o,height:a,horizontalPoints:s,horizontal:u=!0}=e;if(!u||!t||!t.length||s==null)return null;var c=s.map(p=>Math.round(p+i-i)).sort((p,g)=>p-g);i!==c[0]&&c.unshift(0);var d=c.map((p,g)=>{var h=c[g+1],y=h==null,b=y?i+a-p:h-p;if(b<=0)return null;var v=g%t.length;return x.createElement("rect",{key:"react-".concat(g),y:p,x:r,height:b,width:o,stroke:"none",fill:t[v],fillOpacity:n,className:"recharts-cartesian-grid-bg"})});return x.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},d)}function yde(e){var{vertical:t=!0,verticalFill:n,fillOpacity:r,x:i,y:o,width:a,height:s,verticalPoints:u}=e;if(!t||!n||!n.length)return null;var c=u.map(p=>Math.round(p+i-i)).sort((p,g)=>p-g);i!==c[0]&&c.unshift(0);var d=c.map((p,g)=>{var h=c[g+1],y=h==null,b=y?i+a-p:h-p;if(b<=0)return null;var v=g%n.length;return x.createElement("rect",{key:"react-".concat(g),x:p,y:o,width:b,height:s,stroke:"none",fill:n[v],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return x.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},d)}var bde=(e,t)=>{var{xAxis:n,width:r,height:i,offset:o}=e;return VD(Kw(zn(zn(zn({},lo),n),{},{ticks:BD(n),viewBox:{x:0,y:0,width:r,height:i}})),o.left,o.left+o.width,t)},xde=(e,t)=>{var{yAxis:n,width:r,height:i,offset:o}=e;return VD(Kw(zn(zn(zn({},lo),n),{},{ticks:BD(n),viewBox:{x:0,y:0,width:r,height:i}})),o.top,o.top+o.height,t)},wde={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[],xAxisId:0,yAxisId:0,syncWithTicks:!1,zIndex:Zn.grid};function a$(e){var t=KD(),n=YD(),r=qD(),i=zn(zn({},Mr(e,wde)),{},{x:Te(e.x)?e.x:r.left,y:Te(e.y)?e.y:r.top,width:Te(e.width)?e.width:r.width,height:Te(e.height)?e.height:r.height}),{xAxisId:o,yAxisId:a,x:s,y:u,width:c,height:d,syncWithTicks:p,horizontalValues:g,verticalValues:h}=i,y=pr(),b=Le(B=>ZP(B,"xAxis",o,y)),v=Le(B=>ZP(B,"yAxis",a,y));if(!Li(c)||!Li(d)||!Te(s)||!Te(u))return null;var w=i.verticalCoordinatesGenerator||bde,C=i.horizontalCoordinatesGenerator||xde,{horizontalPoints:E,verticalPoints:_}=i;if((!E||!E.length)&&typeof C=="function"){var P=g&&g.length,R=C({yAxis:v?zn(zn({},v),{},{ticks:P?g:v.ticks}):void 0,width:t??c,height:n??d,offset:r},P?!0:p);pp(Array.isArray(R),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(typeof R,"]")),Array.isArray(R)&&(E=R)}if((!_||!_.length)&&typeof w=="function"){var I=h&&h.length,k=w({xAxis:b?zn(zn({},b),{},{ticks:I?h:b.ticks}):void 0,width:t??c,height:n??d,offset:r},I?!0:p);pp(Array.isArray(k),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(typeof k,"]")),Array.isArray(k)&&(_=k)}return x.createElement(Po,{zIndex:i.zIndex},x.createElement("g",{className:"recharts-cartesian-grid"},x.createElement(hde,{fill:i.fill,fillOpacity:i.fillOpacity,x:i.x,y:i.y,width:i.width,height:i.height,ry:i.ry}),x.createElement(vde,Ua({},i,{horizontalPoints:E})),x.createElement(yde,Ua({},i,{verticalPoints:_})),x.createElement(gde,Ua({},i,{offset:r,horizontalPoints:E,xAxis:b,yAxis:v})),x.createElement(mde,Ua({},i,{offset:r,verticalPoints:_,xAxis:b,yAxis:v}))))}a$.displayName="CartesianGrid";var Cde={},s$=Wn({name:"errorBars",initialState:Cde,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:i}=t.payload;e[n]&&(e[n]=e[n].map(o=>o.dataKey===r.dataKey&&o.direction===r.direction?i:o))},removeErrorBar:(e,t)=>{var{itemId:n,errorBar:r}=t.payload;e[n]&&(e[n]=e[n].filter(i=>i.dataKey!==r.dataKey||i.direction!==r.direction))}}}),{addErrorBar:Age,replaceErrorBar:Rge,removeErrorBar:Ige}=s$.actions,Sde=s$.reducer,Ede=["children"];function _de(e,t){if(e==null)return{};var n,r,i=Ode(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Ode(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 Pde={data:[],xAxisId:"xAxis-0",yAxisId:"yAxis-0",dataPointFormatter:()=>({x:0,y:0,value:0}),errorBarOffset:0},Ade=j.createContext(Pde);function Rde(e){var{children:t}=e,n=_de(e,Ede);return x.createElement(Ade.Provider,{value:n},t)}function l$(e,t){var n,r,i=Le(c=>Eo(c,e)),o=Le(c=>_o(c,t)),a=(n=i?.allowDataOverflow)!==null&&n!==void 0?n:un.allowDataOverflow,s=(r=o?.allowDataOverflow)!==null&&r!==void 0?r:cn.allowDataOverflow,u=a||s;return{needClip:u,needClipX:a,needClipY:s}}function Ide(e){var{xAxisId:t,yAxisId:n,clipPathId:r}=e,i=e$(),{needClipX:o,needClipY:a,needClip:s}=l$(t,n);if(!s||!i)return null;var{x:u,y:c,width:d,height:p}=i;return x.createElement("clipPath",{id:"clipPath-".concat(r)},x.createElement("rect",{x:o?u:u-d/2,y:a?c:c-p/2,width:o?d:d*2,height:a?p:p*2}))}function gs(e,t){var n,r;return(n=(r=e.graphicalItems.cartesianItems.find(i=>i.id===t))===null||r===void 0?void 0:r.xAxisId)!==null&&n!==void 0?n:QL}function ms(e,t){var n,r;return(n=(r=e.graphicalItems.cartesianItems.find(i=>i.id===t))===null||r===void 0?void 0:r.yAxisId)!==null&&n!==void 0?n:QL}var Tde=process.env.NODE_ENV==="production",hy="Invariant failed";function kde(e,t){if(Tde)throw new Error(hy);var n=typeof t=="function"?t():t,r=n?"".concat(hy,": ").concat(n):hy;throw new Error(r)}function Vb(){return Vb=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},Vb.apply(null,arguments)}function Xw(e){return x.createElement(Fce,Vb({shapeType:"rectangle",activeClassName:"recharts-active-bar",inActiveClassName:"recharts-inactive-bar"},e))}var Nde=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return(r,i)=>{if(Te(t))return t;var o=Te(r)||pn(r);return o?t(r,i):(o||kde(!1,"minPointSize callback function received a value with type of ".concat(typeof r,". Currently only numbers or null/undefined are supported.")),n)}},Mde=(e,t,n)=>n,Dde=(e,t)=>t,kc=q([Pw,Dde],(e,t)=>e.filter(n=>n.type==="bar").find(n=>n.id===t)),jde=q([kc],e=>e?.maxBarSize),Lde=(e,t,n,r)=>r,$de=q([At,Pw,gs,ms,Mde],(e,t,n,r,i)=>t.filter(o=>e==="horizontal"?o.xAxisId===n:o.yAxisId===r).filter(o=>o.isPanorama===i).filter(o=>o.hide===!1).filter(o=>o.type==="bar")),Fde=(e,t,n)=>{var r=At(e),i=gs(e,t),o=ms(e,t);if(!(i==null||o==null))return r==="horizontal"?Db(e,"yAxis",o,n):Db(e,"xAxis",i,n)},Vde=(e,t)=>{var n=At(e),r=gs(e,t),i=ms(e,t);if(!(r==null||i==null))return n==="horizontal"?XP(e,"xAxis",r):XP(e,"yAxis",i)},Bde=q([$de,ere,Vde],hfe),zde=(e,t,n)=>{var r,i,o=kc(e,t);if(o==null)return 0;var a=gs(e,t),s=ms(e,t);if(a==null||s==null)return 0;var u=At(e),c=Ij(e),{maxBarSize:d}=o,p=pn(d)?c:d,g,h;return u==="horizontal"?(g=Cl(e,"xAxis",a,n),h=wl(e,"xAxis",a,n)):(g=Cl(e,"yAxis",s,n),h=wl(e,"yAxis",s,n)),(r=(i=dp(g,h,!0))!==null&&i!==void 0?i:p)!==null&&r!==void 0?r:0},u$=(e,t,n)=>{var r=At(e),i=gs(e,t),o=ms(e,t);if(!(i==null||o==null)){var a,s;return r==="horizontal"?(a=Cl(e,"xAxis",i,n),s=wl(e,"xAxis",i,n)):(a=Cl(e,"yAxis",o,n),s=wl(e,"yAxis",o,n)),dp(a,s)}},Wde=q([Bde,Ij,Jne,Tj,zde,u$,jde],bfe),Hde=(e,t,n)=>{var r=gs(e,t);if(r!=null)return Cl(e,"xAxis",r,n)},Ude=(e,t,n)=>{var r=ms(e,t);if(r!=null)return Cl(e,"yAxis",r,n)},Gde=(e,t,n)=>{var r=gs(e,t);if(r!=null)return wl(e,"xAxis",r,n)},qde=(e,t,n)=>{var r=ms(e,t);if(r!=null)return wl(e,"yAxis",r,n)},Kde=q([Wde,kc],wfe),Yde=q([Fde,kc],xfe),Xde=q([wn,$x,Hde,Ude,Gde,qde,Kde,At,qne,u$,Yde,kc,Lde],(e,t,n,r,i,o,a,s,u,c,d,p,g)=>{var{chartData:h,dataStartIndex:y,dataEndIndex:b}=u;if(!(p==null||a==null||t==null||s!=="horizontal"&&s!=="vertical"||n==null||r==null||i==null||o==null||c==null)){var{data:v}=p,w;if(v!=null&&v.length>0?w=v:w=h?.slice(y,b+1),w!=null)return Epe({layout:s,barSettings:p,pos:a,parentViewBox:t,bandSize:c,xAxis:n,yAxis:r,xAxisTicks:i,yAxisTicks:o,stackedData:d,displayedData:w,offset:e,cells:g,dataStartIndex:y})}}),Zde=["index"];function Bb(){return Bb=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},Bb.apply(null,arguments)}function Qde(e,t){if(e==null)return{};var n,r,i=Jde(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Jde(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 c$=j.createContext(void 0),epe=e=>{var t=j.useContext(c$);if(t!=null)return t.stackId;if(e!=null)return ZJ(e)},tpe=(e,t)=>"recharts-bar-stack-clip-path-".concat(e,"-").concat(t),npe=e=>{var t=j.useContext(c$);if(t!=null){var{stackId:n}=t;return"url(#".concat(tpe(n,e),")")}},f$=e=>{var{index:t}=e,n=Qde(e,Zde),r=npe(t);return x.createElement(Mi,Bb({className:"recharts-bar-stack-layer",clipPath:r},n))},rpe=["onMouseEnter","onMouseLeave","onClick"],ipe=["value","background","tooltipPosition"],ope=["id"],ape=["onMouseEnter","onClick","onMouseLeave"];function sa(){return sa=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},sa.apply(null,arguments)}function eR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Yn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?eR(Object(n),!0).forEach(function(r){spe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):eR(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function spe(e,t,n){return(t=lpe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function lpe(e){var t=upe(e,"string");return typeof t=="symbol"?t:t+""}function upe(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 zp(e,t){if(e==null)return{};var n,r,i=cpe(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function cpe(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 fpe=e=>{var{dataKey:t,name:n,fill:r,legendType:i,hide:o}=e;return[{inactive:o,dataKey:t,type:i,color:r,value:zD(n,t),payload:e}]},dpe=x.memo(e=>{var{dataKey:t,stroke:n,strokeWidth:r,fill:i,name:o,hide:a,unit:s,tooltipType:u,id:c}=e,d={dataDefinedOnItem:void 0,getPosition:ds,settings:{stroke:n,strokeWidth:r,fill:i,dataKey:t,nameKey:void 0,name:zD(o,t),hide:a,type:u,color:i,unit:s,graphicalItemId:c}};return x.createElement(Vce,{tooltipEntrySettings:d})});function ppe(e){var t=Le(Sl),{data:n,dataKey:r,background:i,allOtherBarProps:o}=e,{onMouseEnter:a,onMouseLeave:s,onClick:u}=o,c=zp(o,rpe),d=KL(a,r,o.id),p=YL(s),g=XL(u,r,o.id);if(!i||n==null)return null;var h=Cx(i);return x.createElement(Po,{zIndex:Cfe(i,Zn.barBackground)},n.map((y,b)=>{var{value:v,background:w,tooltipPosition:C}=y,E=zp(y,ipe);if(!w)return null;var _=d(y,b),P=p(y,b),R=g(y,b),I=Yn(Yn(Yn(Yn(Yn({option:i,isActive:String(b)===t},E),{},{fill:"#eee"},w),h),Rx(c,y,b)),{},{onMouseEnter:_,onMouseLeave:P,onClick:R,dataKey:r,index:b,className:"recharts-bar-background-rectangle"});return x.createElement(Xw,sa({key:"background-bar-".concat(b)},I))}))}function hpe(e){var{showLabels:t,children:n,rects:r}=e,i=r?.map(o=>{var a={x:o.x,y:o.y,width:o.width,lowerWidth:o.width,upperWidth:o.width,height:o.height};return Yn(Yn({},a),{},{value:o.value,payload:o.payload,parentViewBox:o.parentViewBox,viewBox:a,fill:o.fill})});return x.createElement(uce,{value:t?i:void 0},n)}function gpe(e){var{shape:t,activeBar:n,baseProps:r,entry:i,index:o,dataKey:a}=e,s=Le(Sl),u=Le(CL),c=n&&String(i.originalDataIndex)===s&&(u==null||a===u),[d,p]=j.useState(!1),[g,h]=j.useState(!1);j.useEffect(()=>{var E;return c?(p(!0),E=requestAnimationFrame(()=>{h(!0)})):h(!1),()=>{cancelAnimationFrame(E)}},[c]);var y=j.useCallback(()=>{c||p(!1)},[c]),b=c&&g,v=c||d,w;c?n===!0?w=t:w=n:w=t;var C=x.createElement(Xw,sa({},r,{name:String(r.name)},i,{isActive:b,option:w,index:o,dataKey:a,onTransitionEnd:y}));return v?x.createElement(Po,{zIndex:Zn.activeBar},x.createElement(f$,{index:i.originalDataIndex},C)):C}function mpe(e){var{shape:t,baseProps:n,entry:r,index:i,dataKey:o}=e;return x.createElement(Xw,sa({},n,{name:String(n.name)},r,{isActive:!1,option:t,index:i,dataKey:o}))}function vpe(e){var t,{data:n,props:r}=e,i=(t=fo(r))!==null&&t!==void 0?t:{},{id:o}=i,a=zp(i,ope),{shape:s,dataKey:u,activeBar:c}=r,{onMouseEnter:d,onClick:p,onMouseLeave:g}=r,h=zp(r,ape),y=KL(d,u,o),b=YL(g),v=XL(p,u,o);return n?x.createElement(x.Fragment,null,n.map((w,C)=>x.createElement(f$,sa({index:w.originalDataIndex,key:"rectangle-".concat(w?.x,"-").concat(w?.y,"-").concat(w?.value,"-").concat(C),className:"recharts-bar-rectangle"},Rx(h,w,C),{onMouseEnter:y(w,C),onMouseLeave:b(w,C),onClick:v(w,C)}),c?x.createElement(gpe,{shape:s,activeBar:c,baseProps:a,entry:w,index:C,dataKey:u}):x.createElement(mpe,{shape:s,baseProps:a,entry:w,index:C,dataKey:u})))):null}function ype(e){var{props:t,previousRectanglesRef:n}=e,{data:r,layout:i,isAnimationActive:o,animationBegin:a,animationDuration:s,animationEasing:u,onAnimationEnd:c,onAnimationStart:d}=t,p=n.current,g=Hx(t,"recharts-bar-"),[h,y]=j.useState(!1),b=!h,v=j.useCallback(()=>{typeof c=="function"&&c(),y(!1)},[c]),w=j.useCallback(()=>{typeof d=="function"&&d(),y(!0)},[d]);return x.createElement(hpe,{showLabels:b,rects:r},x.createElement(Wx,{animationId:g,begin:a,duration:s,isActive:o,easing:u,onAnimationEnd:v,onAnimationStart:w,key:g},C=>{var E=C===1?r:r?.map((_,P)=>{var R=p&&p[P];if(R)return Yn(Yn({},_),{},{x:Tn(R.x,_.x,C),y:Tn(R.y,_.y,C),width:Tn(R.width,_.width,C),height:Tn(R.height,_.height,C)});if(i==="horizontal"){var I=Tn(0,_.height,C),k=Tn(_.stackedBarStart,_.y,C);return Yn(Yn({},_),{},{y:k,height:I})}var B=Tn(0,_.width,C),L=Tn(_.stackedBarStart,_.x,C);return Yn(Yn({},_),{},{width:B,x:L})});return C>0&&(n.current=E??null),E==null?null:x.createElement(Mi,null,x.createElement(vpe,{props:t,data:E}))}),x.createElement(dce,{label:t.label}),t.children)}function bpe(e){var t=j.useRef(null);return x.createElement(ype,{previousRectanglesRef:t,props:e})}var d$=0,xpe=(e,t)=>{var n=Array.isArray(e.value)?e.value[1]:e.value;return{x:e.x,y:e.y,value:n,errorVal:Mn(e,t)}};class wpe extends j.PureComponent{render(){var{hide:t,data:n,dataKey:r,className:i,xAxisId:o,yAxisId:a,needClip:s,background:u,id:c}=this.props;if(t||n==null)return null;var d=Pt("recharts-bar",i),p=c;return x.createElement(Mi,{className:d,id:c},s&&x.createElement("defs",null,x.createElement(Ide,{clipPathId:p,xAxisId:o,yAxisId:a})),x.createElement(Mi,{className:"recharts-bar-rectangles",clipPath:s?"url(#clipPath-".concat(p,")"):void 0},x.createElement(ppe,{data:n,dataKey:r,background:u,allOtherBarProps:this.props}),x.createElement(bpe,this.props)))}}var Cpe={activeBar:!1,animationBegin:0,animationDuration:400,animationEasing:"ease",background:!1,hide:!1,isAnimationActive:"auto",label:!1,legendType:"rect",minPointSize:d$,xAxisId:0,yAxisId:0,zIndex:Zn.bar};function Spe(e){var{xAxisId:t,yAxisId:n,hide:r,legendType:i,minPointSize:o,activeBar:a,animationBegin:s,animationDuration:u,animationEasing:c,isAnimationActive:d}=e,{needClip:p}=l$(t,n),g=_l(),h=pr(),y=xce(e.children,kL),b=Le(C=>Xde(C,e.id,h,y));if(g!=="vertical"&&g!=="horizontal")return null;var v,w=b?.[0];return w==null||w.height==null||w.width==null?v=0:v=g==="vertical"?w.height/2:w.width/2,x.createElement(Rde,{xAxisId:t,yAxisId:n,data:b,dataPointFormatter:xpe,errorBarOffset:v},x.createElement(wpe,sa({},e,{layout:g,needClip:p,data:b,xAxisId:t,yAxisId:n,hide:r,legendType:i,minPointSize:o,activeBar:a,animationBegin:s,animationDuration:u,animationEasing:c,isAnimationActive:d})))}function Epe(e){var{layout:t,barSettings:{dataKey:n,minPointSize:r,hasCustomShape:i},pos:o,bandSize:a,xAxis:s,yAxis:u,xAxisTicks:c,yAxisTicks:d,stackedData:p,displayedData:g,offset:h,cells:y,parentViewBox:b,dataStartIndex:v}=e,w=t==="horizontal"?u:s,C=p?w.scale.domain():null,E=QJ({numericAxis:w}),_=w.scale.map(E);return g.map((P,R)=>{var I,k,B,L,V,D;if(p){var H=p[R+v];if(H==null)return null;I=GJ(H,C)}else I=Mn(P,n),Array.isArray(I)||(I=[E,I]);var J=Nde(r,d$)(I[1],R);if(t==="horizontal"){var te,G=u.scale.map(I[0]),ee=u.scale.map(I[1]);if(G==null||ee==null)return null;k=U_({axis:s,ticks:c,bandSize:a,offset:o.offset,entry:P,index:R}),B=(te=ee??G)!==null&&te!==void 0?te:void 0,L=o.size;var Q=G-ee;if(V=Di(Q)?0:Q,D={x:k,y:h.top,width:L,height:h.height},Math.abs(J)>0&&Math.abs(V)<Math.abs(J)){var pe=cr(V||J)*(Math.abs(J)-Math.abs(V));B-=pe,V+=pe}}else{var K=s.scale.map(I[0]),Ae=s.scale.map(I[1]);if(K==null||Ae==null)return null;if(k=K,B=U_({axis:u,ticks:d,bandSize:a,offset:o.offset,entry:P,index:R}),L=Ae-K,V=o.size,D={x:h.left,y:B,width:h.width,height:V},Math.abs(J)>0&&Math.abs(L)<Math.abs(J)){var Se=cr(L||J)*(Math.abs(J)-Math.abs(L));L+=Se}}if(k==null||B==null||L==null||V==null||!i&&(L===0||V===0))return null;var $e=Yn(Yn({},P),{},{stackedBarStart:_,x:k,y:B,width:L,height:V,value:p?I:I[1],payload:P,background:D,tooltipPosition:{x:k+L/2,y:B+V/2},parentViewBox:b,originalDataIndex:R},y&&y[R]&&y[R].props);return $e}).filter(Boolean)}function _pe(e){var t=Mr(e,Cpe),n=epe(t.stackId),r=pr();return x.createElement(Gce,{id:t.id,type:"bar"},i=>x.createElement(x.Fragment,null,x.createElement(Bce,{legendPayload:fpe(t)}),x.createElement(dpe,{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:i}),x.createElement(Jce,{type:"bar",id:i,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}),x.createElement(Po,{zIndex:t.zIndex},x.createElement(Spe,sa({},t,{id:i})))))}var p$=x.memo(_pe,Vh);p$.displayName="Bar";var Ope=["domain","range"],Ppe=["domain","range"];function tR(e,t){if(e==null)return{};var n,r,i=Ape(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Ape(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 nR(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 h$(e,t){if(e===t)return!0;var{domain:n,range:r}=e,i=tR(e,Ope),{domain:o,range:a}=t,s=tR(t,Ppe);return!nR(n,o)||!nR(r,a)?!1:Vh(i,s)}var Rpe=["type"],Ipe=["dangerouslySetInnerHTML","ticks","scale"],Tpe=["id","scale"];function zb(){return zb=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},zb.apply(null,arguments)}function rR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function iR(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?rR(Object(n),!0).forEach(function(r){kpe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rR(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function kpe(e,t,n){return(t=Npe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Npe(e){var t=Mpe(e,"string");return typeof t=="symbol"?t:t+""}function Mpe(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 Wb(e,t){if(e==null)return{};var n,r,i=Dpe(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Dpe(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 jpe(e){var t=Ht(),n=j.useRef(null),r=XD(),{type:i}=e,o=Wb(e,Rpe),a=Wh(r,"xAxis",i),s=j.useMemo(()=>{if(a!=null)return iR(iR({},o),{},{type:a})},[o,a]);return j.useLayoutEffect(()=>{s!=null&&(n.current===null?t(ife(s)):n.current!==s&&t(ofe({prev:n.current,next:s})),n.current=s)},[s,t]),j.useLayoutEffect(()=>()=>{n.current&&(t(afe(n.current)),n.current=null)},[t]),null}var Lpe=e=>{var{xAxisId:t,className:n}=e,r=Le($x),i=pr(),o="xAxis",a=Le(w=>tL(w,o,t,i)),s=Le(w=>Q2(w,t)),u=Le(w=>Mae(w,t)),c=Le(w=>w2(w,t));if(s==null||u==null||c==null)return null;var{dangerouslySetInnerHTML:d,ticks:p,scale:g}=e,h=Wb(e,Ipe),{id:y,scale:b}=c,v=Wb(c,Tpe);return x.createElement(Yw,zb({},h,v,{x:u.x,y:u.y,width:s.width,height:s.height,className:Pt("recharts-".concat(o," ").concat(o),n),viewBox:r,ticks:a,axisType:o,axisId:t}))},$pe={allowDataOverflow:un.allowDataOverflow,allowDecimals:un.allowDecimals,allowDuplicatedCategory:un.allowDuplicatedCategory,angle:un.angle,axisLine:lo.axisLine,height:un.height,hide:!1,includeHidden:un.includeHidden,interval:un.interval,label:!1,minTickGap:un.minTickGap,mirror:un.mirror,orientation:un.orientation,padding:un.padding,reversed:un.reversed,scale:un.scale,tick:un.tick,tickCount:un.tickCount,tickLine:lo.tickLine,tickSize:lo.tickSize,type:un.type,niceTicks:un.niceTicks,xAxisId:0},Fpe=e=>{var t=Mr(e,$pe);return x.createElement(x.Fragment,null,x.createElement(jpe,{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}),x.createElement(Lpe,t))},g$=x.memo(Fpe,h$);g$.displayName="XAxis";var Vpe=["type"],Bpe=["dangerouslySetInnerHTML","ticks","scale"],zpe=["id","scale"];function Hb(){return Hb=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},Hb.apply(null,arguments)}function oR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function aR(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?oR(Object(n),!0).forEach(function(r){Wpe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):oR(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Wpe(e,t,n){return(t=Hpe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Hpe(e){var t=Upe(e,"string");return typeof t=="symbol"?t:t+""}function Upe(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 Ub(e,t){if(e==null)return{};var n,r,i=Gpe(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Gpe(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 qpe(e){var t=Ht(),n=j.useRef(null),r=XD(),{type:i}=e,o=Ub(e,Vpe),a=Wh(r,"yAxis",i),s=j.useMemo(()=>{if(a!=null)return aR(aR({},o),{},{type:a})},[a,o]);return j.useLayoutEffect(()=>{s!=null&&(n.current===null?t(sfe(s)):n.current!==s&&t(lfe({prev:n.current,next:s})),n.current=s)},[s,t]),j.useLayoutEffect(()=>()=>{n.current&&(t(ufe(n.current)),n.current=null)},[t]),null}function Kpe(e){var{yAxisId:t,className:n,width:r,label:i}=e,o=j.useRef(null),a=j.useRef(null),s=Le($x),u=pr(),c=Ht(),d="yAxis",p=Le(R=>J2(R,t)),g=Le(R=>jae(R,t)),h=Le(R=>tL(R,d,t,u)),y=Le(R=>C2(R,t));if(j.useLayoutEffect(()=>{if(!(r!=="auto"||!p||qw(i)||j.isValidElement(i)||y==null)){var R=o.current;if(R){var I=R.getCalculatedWidth();Math.round(p.width)!==Math.round(I)&&c(cfe({id:t,width:I}))}}},[h,p,c,i,t,r,y]),p==null||g==null||y==null)return null;var{dangerouslySetInnerHTML:b,ticks:v,scale:w}=e,C=Ub(e,Bpe),{id:E,scale:_}=y,P=Ub(y,zpe);return x.createElement(Yw,Hb({},C,P,{ref:o,labelRef:a,x:g.x,y:g.y,tickTextProps:r==="auto"?{width:void 0}:{width:r},width:p.width,height:p.height,className:Pt("recharts-".concat(d," ").concat(d),n),viewBox:s,ticks:h,axisType:d,axisId:t}))}var Ype={allowDataOverflow:cn.allowDataOverflow,allowDecimals:cn.allowDecimals,allowDuplicatedCategory:cn.allowDuplicatedCategory,angle:cn.angle,axisLine:lo.axisLine,hide:!1,includeHidden:cn.includeHidden,interval:cn.interval,label:!1,minTickGap:cn.minTickGap,mirror:cn.mirror,orientation:cn.orientation,padding:cn.padding,reversed:cn.reversed,scale:cn.scale,tick:cn.tick,tickCount:cn.tickCount,tickLine:lo.tickLine,tickSize:lo.tickSize,type:cn.type,niceTicks:cn.niceTicks,width:cn.width,yAxisId:0},Xpe=e=>{var t=Mr(e,Ype);return x.createElement(x.Fragment,null,x.createElement(qpe,{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}),x.createElement(Kpe,t))},m$=x.memo(Xpe,h$);m$.displayName="YAxis";var Zpe=(e,t)=>t,Zw=q([Zpe,At,$j,Sn,yL,Oo,ile,wn],fle);function Qpe(e){return"getBBox"in e.currentTarget&&typeof e.currentTarget.getBBox=="function"}function Qw(e){var t=e.currentTarget.getBoundingClientRect(),n,r;if(Qpe(e)){var i=e.currentTarget.getBBox();n=i.width>0?t.width/i.width:1,r=i.height>0?t.height/i.height:1}else{var o=e.currentTarget;n=o.offsetWidth>0?t.width/o.offsetWidth:1,r=o.offsetHeight>0?t.height/o.offsetHeight:1}var a=(s,u)=>({relativeX:Math.round((s-t.left)/n),relativeY:Math.round((u-t.top)/r)});return"touches"in e?Array.from(e.touches).map(s=>a(s.clientX,s.clientY)):a(e.clientX,e.clientY)}var v$=Tr("mouseClick"),y$=mc();y$.startListening({actionCreator:v$,effect:(e,t)=>{var n=e.payload,r=Zw(t.getState(),Qw(n));r?.activeIndex!=null&&t.dispatch(Qae({activeIndex:r.activeIndex,activeDataKey:void 0,activeCoordinate:r.activeCoordinate}))}});var Gb=Tr("mouseMove"),b$=mc(),Zs=null,Da=null,gy=null;b$.startListening({actionCreator:Gb,effect:(e,t)=>{var n=e.payload,r=t.getState(),{throttleDelay:i,throttledEvents:o}=r.eventSettings,a=o==="all"||o?.includes("mousemove");Zs!==null&&(cancelAnimationFrame(Zs),Zs=null),Da!==null&&(typeof i!="number"||!a)&&(clearTimeout(Da),Da=null),gy=Qw(n);var s=()=>{var u=t.getState(),c=jw(u,u.tooltip.settings.shared);if(!gy){Zs=null,Da=null;return}if(c==="axis"){var d=Zw(u,gy);d?.activeIndex!=null?t.dispatch(uL({activeIndex:d.activeIndex,activeDataKey:void 0,activeCoordinate:d.activeCoordinate})):t.dispatch(lL())}Zs=null,Da=null};if(!a){s();return}i==="raf"?Zs=requestAnimationFrame(s):typeof i=="number"&&Da===null&&(Da=setTimeout(s,i))}});function Jpe(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 sR={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},x$=Wn({name:"rootProps",initialState:sR,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:sR.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}}}),ehe=x$.reducer,{updateOptions:the}=x$.actions,nhe=null,rhe={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)},w$=Wn({name:"polarOptions",initialState:nhe,reducers:rhe}),{updatePolarOptions:Tge}=w$.actions,ihe=w$.reducer,C$=Tr("keyDown"),S$=Tr("focus"),E$=Tr("blur"),ig=mc(),Qs=null,ja=null,xd=null;ig.startListening({actionCreator:C$,effect:(e,t)=>{xd=e.payload,Qs!==null&&(cancelAnimationFrame(Qs),Qs=null);var n=t.getState(),{throttleDelay:r,throttledEvents:i}=n.eventSettings,o=i==="all"||i.includes("keydown");ja!==null&&(typeof r!="number"||!o)&&(clearTimeout(ja),ja=null);var a=()=>{try{var s=t.getState(),u=s.rootProps.accessibilityLayer!==!1;if(!u)return;var{keyboardInteraction:c}=s.tooltip,d=xd;if(d!=="ArrowRight"&&d!=="ArrowLeft"&&d!=="Enter")return;var p=Lw(c,Ml(s),Ac(s),Ic(s)),g=p==null?-1:Number(p);if(!Number.isFinite(g)||g<0)return;var h=Oo(s);if(d==="Enter"){var y=Lp(s,"axis","hover",String(c.index));t.dispatch(jp({active:!c.active,activeIndex:c.index,activeCoordinate:y}));return}var b=Bae(s),v=b==="left-to-right"?1:-1,w=d==="ArrowRight"?1:-1,C=g+w*v;if(h==null||C>=h.length||C<0)return;var E=Lp(s,"axis","hover",String(C));t.dispatch(jp({active:!0,activeIndex:C.toString(),activeCoordinate:E}))}finally{Qs=null,ja=null}};if(!o){a();return}r==="raf"?Qs=requestAnimationFrame(a):typeof r=="number"&&ja===null&&(a(),xd=null,ja=setTimeout(()=>{xd?a():(ja=null,Qs=null)},r))}});ig.startListening({actionCreator:S$,effect:(e,t)=>{var n=t.getState(),r=n.rootProps.accessibilityLayer!==!1;if(r){var{keyboardInteraction:i}=n.tooltip;if(!i.active&&i.index==null){var o="0",a=Lp(n,"axis","hover",String(o));t.dispatch(jp({active:!0,activeIndex:o,activeCoordinate:a}))}}}});ig.startListening({actionCreator:E$,effect:(e,t)=>{var n=t.getState(),r=n.rootProps.accessibilityLayer!==!1;if(r){var{keyboardInteraction:i}=n.tooltip;i.active&&t.dispatch(jp({active:!1,activeIndex:i.index,activeCoordinate:i.coordinate}))}}});function _$(e){e.persist();var{currentTarget:t}=e;return new Proxy(e,{get:(n,r)=>{if(r==="currentTarget")return t;var i=Reflect.get(n,r);return typeof i=="function"?i.bind(n):i}})}var Kr=Tr("externalEvent"),O$=mc(),wd=new Map,xu=new Map,my=new Map;O$.startListening({actionCreator:Kr,effect:(e,t)=>{var{handler:n,reactEvent:r}=e.payload;if(n!=null){var i=r.type,o=_$(r);my.set(i,{handler:n,reactEvent:o});var a=wd.get(i);a!==void 0&&(cancelAnimationFrame(a),wd.delete(i));var s=t.getState(),{throttleDelay:u,throttledEvents:c}=s.eventSettings,d=c,p=d==="all"||d?.includes(i),g=xu.get(i);g!==void 0&&(typeof u!="number"||!p)&&(clearTimeout(g),xu.delete(i));var h=()=>{var v=my.get(i);try{if(!v)return;var{handler:w,reactEvent:C}=v,E=t.getState(),_={activeCoordinate:Wse(E),activeDataKey:CL(E),activeIndex:Sl(E),activeLabel:wL(E),activeTooltipIndex:Sl(E),isTooltipActive:Hse(E)};w&&w(_,C)}finally{wd.delete(i),xu.delete(i),my.delete(i)}};if(!p){h();return}if(u==="raf"){var y=requestAnimationFrame(h);wd.set(i,y)}else if(typeof u=="number"){if(!xu.has(i)){h();var b=setTimeout(h,u);xu.set(i,b)}}else h()}}});var ohe=q([kl],e=>e.tooltipItemPayloads),ahe=q([ohe,(e,t)=>t,(e,t,n)=>n],(e,t,n)=>{if(t!=null){var r=e.find(o=>o.settings.graphicalItemId===n);if(r!=null){var{getPosition:i}=r;if(i!=null)return i(t)}}}),P$=Tr("touchMove"),A$=mc(),La=null,zo=null,lR=null,wu=null;A$.startListening({actionCreator:P$,effect:(e,t)=>{var n=e.payload;if(!(n.touches==null||n.touches.length===0)){wu=_$(n);var r=t.getState(),{throttleDelay:i,throttledEvents:o}=r.eventSettings,a=o==="all"||o.includes("touchmove");La!==null&&(cancelAnimationFrame(La),La=null),zo!==null&&(typeof i!="number"||!a)&&(clearTimeout(zo),zo=null),lR=Array.from(n.touches).map(u=>Qw({clientX:u.clientX,clientY:u.clientY,currentTarget:n.currentTarget}));var s=()=>{if(wu!=null){var u=t.getState(),c=jw(u,u.tooltip.settings.shared);if(c==="axis"){var d,p=(d=lR)===null||d===void 0?void 0:d[0];if(p==null){La=null,zo=null;return}var g=Zw(u,p);g?.activeIndex!=null&&t.dispatch(uL({activeIndex:g.activeIndex,activeDataKey:void 0,activeCoordinate:g.activeCoordinate}))}else if(c==="item"){var h,y=wu.touches[0];if(document.elementFromPoint==null||y==null)return;var b=document.elementFromPoint(y.clientX,y.clientY);if(!b||!b.getAttribute)return;var v=b.getAttribute(oee),w=(h=b.getAttribute(aee))!==null&&h!==void 0?h:void 0,C=Nl(u).find(P=>P.id===w);if(v==null||C==null||w==null)return;var{dataKey:E}=C,_=ahe(u,v,w);t.dispatch(sL({activeDataKey:E,activeIndex:v,activeCoordinate:_,activeGraphicalItemId:w}))}La=null,zo=null}};if(!a){s();return}i==="raf"?La=requestAnimationFrame(s):typeof i=="number"&&zo===null&&(s(),wu=null,zo=setTimeout(()=>{wu?s():(zo=null,La=null)},i))}}});var R$={throttleDelay:"raf",throttledEvents:["mousemove","touchmove","pointermove","scroll","wheel"]},I$=Wn({name:"eventSettings",initialState:R$,reducers:{setEventSettings:(e,t)=>{t.payload.throttleDelay!=null&&(e.throttleDelay=t.payload.throttleDelay),t.payload.throttledEvents!=null&&(e.throttledEvents=t.payload.throttledEvents)}}}),{setEventSettings:she}=I$.actions,lhe=I$.reducer,uhe=sD({brush:Efe,cartesianAxis:ffe,chartData:Wle,errorBars:Sde,eventSettings:lhe,graphicalItems:Zce,layout:BJ,legend:Jee,options:$le,polarAxis:hce,polarOptions:ihe,referenceElements:Afe,renderedTicks:Ufe,rootProps:ehe,tooltip:Jae,zIndex:_le}),che=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"Chart";return dJ({reducer:uhe,preloadedState:t,middleware:r=>{var i;return r({serializableCheck:!1,immutableCheck:!["commonjs","es6","production"].includes((i="es6")!==null&&i!==void 0?i:"")}).concat([y$.middleware,b$.middleware,ig.middleware,O$.middleware,A$.middleware])},enhancers:r=>{var i=r;return typeof r=="function"&&(i=r()),i.concat(OD({type:"raf"}))},devTools:{serialize:{replacer:Jpe},name:"recharts-".concat(n)}})};function fhe(e){var{preloadedState:t,children:n,reduxStoreName:r}=e,i=pr(),o=j.useRef(null);if(i)return n;o.current==null&&(o.current=che(t,r));var a=Tx;return x.createElement(yte,{context:a,store:o.current},n)}function dhe(e){var{layout:t,margin:n}=e,r=Ht(),i=pr();return j.useEffect(()=>{i||(r($J(t)),r(LJ(n)))},[r,i,t,n]),null}var phe=j.memo(dhe,Vh);function hhe(e){var t=Ht();return j.useEffect(()=>{t(the(e))},[t,e]),null}var ghe=e=>{var t=Ht();return j.useEffect(()=>{t(she(e))},[t,e]),null},mhe=j.memo(ghe,Vh);function uR(e){var{zIndex:t,isPanorama:n}=e,r=j.useRef(null),i=Ht();return j.useLayoutEffect(()=>(r.current&&i(Sle({zIndex:t,element:r.current,isPanorama:n})),()=>{i(Ele({zIndex:t,isPanorama:n}))}),[i,t,n]),x.createElement("g",{tabIndex:-1,ref:r,className:"recharts-zIndex-layer_".concat(t)})}function cR(e){var{children:t,isPanorama:n}=e,r=Le(ple);if(!r||r.length===0)return t;var i=r.filter(a=>a<0),o=r.filter(a=>a>0);return x.createElement(x.Fragment,null,i.map(a=>x.createElement(uR,{key:a,zIndex:a,isPanorama:n})),t,o.map(a=>x.createElement(uR,{key:a,zIndex:a,isPanorama:n})))}var vhe=["children"];function yhe(e,t){if(e==null)return{};var n,r,i=bhe(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function bhe(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 Wp(){return Wp=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},Wp.apply(null,arguments)}var xhe={width:"100%",height:"100%",display:"block"},whe=j.forwardRef((e,t)=>{var n=KD(),r=YD(),i=aj();if(!Li(n)||!Li(r))return null;var{children:o,otherAttributes:a,title:s,desc:u}=e,c,d;return a!=null&&(typeof a.tabIndex=="number"?c=a.tabIndex:c=i?0:void 0,typeof a.role=="string"?d=a.role:d=i?"application":void 0),x.createElement(OM,Wp({},a,{title:s,desc:u,role:d,tabIndex:c,width:n,height:r,style:xhe,ref:t}),o)}),Che=e=>{var{children:t}=e,n=Le(Dh);if(!n)return null;var{width:r,height:i,y:o,x:a}=n;return x.createElement(OM,{width:r,height:i,x:a,y:o},t)},fR=j.forwardRef((e,t)=>{var{children:n}=e,r=yhe(e,vhe),i=pr();return i?x.createElement(Che,null,x.createElement(cR,{isPanorama:!0},n)):x.createElement(whe,Wp({ref:t},r),x.createElement(cR,{isPanorama:!1},n))});function She(){var e=Ht(),[t,n]=j.useState(null),r=Le(iee);return j.useEffect(()=>{if(t!=null){var i=t.getBoundingClientRect(),o=i.width/t.offsetWidth;ut(o)&&o!==r&&e(VJ(o))}},[t,e,r]),n}function dR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Ehe(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?dR(Object(n),!0).forEach(function(r){_he(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):dR(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function _he(e,t,n){return(t=Ohe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ohe(e){var t=Phe(e,"string");return typeof t=="symbol"?t:t+""}function Phe(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 ra(){return ra=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},ra.apply(null,arguments)}var Ahe=()=>(Qle(),null);function Hp(e){if(typeof e=="number")return e;if(typeof e=="string"){var t=parseFloat(e);if(!Number.isNaN(t))return t}return 0}var Rhe=j.forwardRef((e,t)=>{var n,r,i=j.useRef(null),[o,a]=j.useState({containerWidth:Hp((n=e.style)===null||n===void 0?void 0:n.width),containerHeight:Hp((r=e.style)===null||r===void 0?void 0:r.height)}),s=j.useCallback((c,d)=>{a(p=>{var g=Math.round(c),h=Math.round(d);return p.containerWidth===g&&p.containerHeight===h?p:{containerWidth:g,containerHeight:h}})},[]),u=j.useCallback(c=>{if(typeof t=="function"&&t(c),c!=null&&typeof ResizeObserver<"u"){var{width:d,height:p}=c.getBoundingClientRect();s(d,p);var g=y=>{var b=y[0];if(b!=null){var{width:v,height:w}=b.contentRect;s(v,w)}},h=new ResizeObserver(g);h.observe(c),i.current=h}},[t,s]);return j.useEffect(()=>()=>{var c=i.current;c?.disconnect()},[s]),x.createElement(x.Fragment,null,x.createElement(yc,{width:o.containerWidth,height:o.containerHeight}),x.createElement("div",ra({ref:u},e)))}),Ihe=j.forwardRef((e,t)=>{var{width:n,height:r}=e,[i,o]=j.useState({containerWidth:Hp(n),containerHeight:Hp(r)}),a=j.useCallback((u,c)=>{o(d=>{var p=Math.round(u),g=Math.round(c);return d.containerWidth===p&&d.containerHeight===g?d:{containerWidth:p,containerHeight:g}})},[]),s=j.useCallback(u=>{if(typeof t=="function"&&t(u),u!=null){var{width:c,height:d}=u.getBoundingClientRect();a(c,d)}},[t,a]);return x.createElement(x.Fragment,null,x.createElement(yc,{width:i.containerWidth,height:i.containerHeight}),x.createElement("div",ra({ref:s},e)))}),The=j.forwardRef((e,t)=>{var{width:n,height:r}=e;return x.createElement(x.Fragment,null,x.createElement(yc,{width:n,height:r}),x.createElement("div",ra({ref:t},e)))}),khe=j.forwardRef((e,t)=>{var{width:n,height:r}=e;return typeof n=="string"||typeof r=="string"?x.createElement(Ihe,ra({},e,{ref:t})):typeof n=="number"&&typeof r=="number"?x.createElement(The,ra({},e,{width:n,height:r,ref:t})):x.createElement(x.Fragment,null,x.createElement(yc,{width:n,height:r}),x.createElement("div",ra({ref:t},e)))});function Nhe(e){return e?Rhe:khe}var Mhe=j.forwardRef((e,t)=>{var{children:n,className:r,height:i,onClick:o,onContextMenu:a,onDoubleClick:s,onMouseDown:u,onMouseEnter:c,onMouseLeave:d,onMouseMove:p,onMouseUp:g,onTouchEnd:h,onTouchMove:y,onTouchStart:b,style:v,width:w,responsive:C,dispatchTouchEvents:E=!0}=e,_=j.useRef(null),P=Ht(),[R,I]=j.useState(null),[k,B]=j.useState(null),L=She(),V=Fx(),D=V?.width>0?V.width:w,H=V?.height>0?V.height:i,J=j.useCallback(oe=>{L(oe),typeof t=="function"&&t(oe),I(oe),B(oe),oe!=null&&(_.current=oe)},[L,t,I,B]),te=j.useCallback(oe=>{P(v$(oe)),P(Kr({handler:o,reactEvent:oe}))},[P,o]),G=j.useCallback(oe=>{P(Gb(oe)),P(Kr({handler:c,reactEvent:oe}))},[P,c]),ee=j.useCallback(oe=>{P(lL()),P(Kr({handler:d,reactEvent:oe}))},[P,d]),Q=j.useCallback(oe=>{P(Gb(oe)),P(Kr({handler:p,reactEvent:oe}))},[P,p]),pe=j.useCallback(()=>{P(S$())},[P]),K=j.useCallback(()=>{P(E$())},[P]),Ae=j.useCallback(oe=>{P(C$(oe.key))},[P]),Se=j.useCallback(oe=>{P(Kr({handler:a,reactEvent:oe}))},[P,a]),$e=j.useCallback(oe=>{P(Kr({handler:s,reactEvent:oe}))},[P,s]),we=j.useCallback(oe=>{P(Kr({handler:u,reactEvent:oe}))},[P,u]),Ce=j.useCallback(oe=>{P(Kr({handler:g,reactEvent:oe}))},[P,g]),ze=j.useCallback(oe=>{P(Kr({handler:b,reactEvent:oe}))},[P,b]),Ke=j.useCallback(oe=>{E&&P(P$(oe)),P(Kr({handler:y,reactEvent:oe}))},[P,E,y]),Fe=j.useCallback(oe=>{P(Kr({handler:h,reactEvent:oe}))},[P,h]),Y=Nhe(C);return x.createElement(RL.Provider,{value:R},x.createElement(GX.Provider,{value:k},x.createElement(Y,{width:D??v?.width,height:H??v?.height,className:Pt("recharts-wrapper",r),style:Ehe({position:"relative",cursor:"default",width:D,height:H},v),onClick:te,onContextMenu:Se,onDoubleClick:$e,onFocus:pe,onBlur:K,onKeyDown:Ae,onMouseDown:we,onMouseEnter:G,onMouseLeave:ee,onMouseMove:Q,onMouseUp:Ce,onTouchEnd:Fe,onTouchMove:Ke,onTouchStart:ze,ref:J},x.createElement(Ahe,null),n)))}),Dhe=["width","height","responsive","children","className","style","compact","title","desc"];function jhe(e,t){if(e==null)return{};var n,r,i=Lhe(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Lhe(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 $he=j.forwardRef((e,t)=>{var{width:n,height:r,responsive:i,children:o,className:a,style:s,compact:u,title:c,desc:d}=e,p=jhe(e,Dhe),g=fo(p);return u?x.createElement(x.Fragment,null,x.createElement(yc,{width:n,height:r}),x.createElement(fR,{otherAttributes:g,title:c,desc:d},o)):x.createElement(Mhe,{className:a,style:s,width:n,height:r,responsive:i??!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},x.createElement(fR,{otherAttributes:g,title:c,desc:d,ref:t},x.createElement(Ife,null,o)))});function qb(){return qb=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},qb.apply(null,arguments)}function pR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Fhe(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?pR(Object(n),!0).forEach(function(r){Vhe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pR(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Vhe(e,t,n){return(t=Bhe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Bhe(e){var t=zhe(e,"string");return typeof t=="symbol"?t:t+""}function zhe(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 Whe={top:5,right:5,bottom:5,left:5},Hhe=Fhe({accessibilityLayer:!0,barCategoryGap:"10%",barGap:4,layout:"horizontal",margin:Whe,responsive:!1,reverseStackOrder:!1,stackOffset:"none",syncMethod:"index"},R$),Uhe=j.forwardRef(function(t,n){var r,i=Mr(t.categoricalChartProps,Hhe),{chartName:o,defaultTooltipEventType:a,validateTooltipEventTypes:s,tooltipPayloadSearcher:u,categoricalChartProps:c}=t,d={chartName:o,defaultTooltipEventType:a,validateTooltipEventTypes:s,tooltipPayloadSearcher:u,eventEmitter:void 0};return x.createElement(fhe,{preloadedState:{options:d},reduxStoreName:(r=c.id)!==null&&r!==void 0?r:o},x.createElement(Sfe,{chartData:c.data}),x.createElement(phe,{layout:i.layout,margin:i.margin}),x.createElement(mhe,{throttleDelay:i.throttleDelay,throttledEvents:i.throttledEvents}),x.createElement(hhe,{baseValue:i.baseValue,accessibilityLayer:i.accessibilityLayer,barCategoryGap:i.barCategoryGap,maxBarSize:i.maxBarSize,stackOffset:i.stackOffset,barGap:i.barGap,barSize:i.barSize,syncId:i.syncId,syncMethod:i.syncMethod,className:i.className,reverseStackOrder:i.reverseStackOrder}),x.createElement($he,qb({},i,{ref:n})))}),Ghe=["axis","item"],qhe=j.forwardRef((e,t)=>x.createElement(Uhe,{chartName:"BarChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:Ghe,tooltipPayloadSearcher:jle,categoricalChartProps:e,ref:t}));const Khe={light:"",dark:".dark"},T$=x.createContext(null);function Yhe(){const e=x.useContext(T$);if(!e)throw new Error("useChart must be used within a <ChartContainer />");return e}function Xhe({id:e,className:t,children:n,config:r,...i}){const o=x.useId(),a=`chart-${e||o.replace(/:/g,"")}`;return O.jsx(T$.Provider,{value:{config:r},children:O.jsxs("div",{"data-slot":"chart","data-chart":a,className:ue(`[&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground
209
228
  [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50
210
229
  [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border
211
230
  [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border
@@ -215,14 +234,14 @@ Take a look at the reducer(s) handling this action type: ${d.type}.
215
234
  justify-center text-xs [&_.recharts-dot[stroke='#fff']]:stroke-transparent
216
235
  [&_.recharts-layer]:outline-hidden [&_.recharts-sector]:outline-hidden
217
236
  [&_.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(`
237
+ [&_.recharts-surface]:outline-hidden`,t),...i,children:[O.jsx(Zhe,{id:a,config:r}),O.jsx(Mee,{children:n})]})})}const Zhe=({id:e,config:t})=>{const n=Object.entries(t).filter(([,r])=>r.theme||r.color);return n.length?O.jsx("style",{dangerouslySetInnerHTML:{__html:Object.entries(Khe).map(([r,i])=>`
238
+ ${i} [data-chart=${e}] {
239
+ ${n.map(([o,a])=>{const s=a.theme?.[r]||a.color;return s?` --color-${o}: ${s};`:null}).filter(Boolean).join(`
221
240
  `)}
222
241
  }
223
242
  `).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})=>{const l=e?.config??Lte;return C.jsx(Nte,{...e,config:e?.config??l,className:"min-h-200",children:C.jsxs(Rte,{barSize:t?.width??jte,...t,children:[C.jsx(mN,{...n}),C.jsx(ON,{tickLine:r?.y?.tickLine??!1,axisLine:r?.y?.axisLine??!1,tickMargin:r?.y?.tickMargin??ES,...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;
243
+ `)}}):null},Qhe=aue;function Jhe({active:e,payload:t,className:n,indicator:r="dot",hideLabel:i=!1,hideIndicator:o=!1,label:a,labelFormatter:s,labelClassName:u,formatter:c,color:d,nameKey:p,labelKey:g}){const{config:h}=Yhe(),y=x.useMemo(()=>{if(i||!t?.length)return null;const[v]=t,w=`${g||v?.dataKey||v?.name||"value"}`,C=hR(h,v,w),E=!g&&typeof a=="string"?h[a]?.label||a:C?.label;return s?O.jsx("div",{className:ue("font-medium",u),children:s(E,t)}):E?O.jsx("div",{className:ue("font-medium",u),children:E}):null},[a,s,t,i,u,h,g]);if(!e||!t?.length)return null;const b=t.length===1&&r!=="dot";return O.jsxs("div",{className:ue(`border-border/50 bg-background grid min-w-32 items-start gap-1.5 rounded-lg
244
+ border px-2.5 py-1.5 text-xs shadow-xl`,n),children:[b?null:y,O.jsx("div",{className:"grid gap-1.5",children:t.filter(v=>v.type!=="none").map((v,w)=>{const C=`${p||v.name||v.dataKey||"value"}`,E=hR(h,v,C),_=d||v.payload?.fill||v.color;return O.jsx("div",{className:ue(`[&>svg]:text-muted-foreground flex w-full flex-wrap items-stretch gap-2
245
+ [&>svg]:h-2.5 [&>svg]:w-2.5`,r==="dot"&&"items-center"),children:c&&v?.value!==void 0&&v.name?c(v.value,v.name,v,w,v.payload):O.jsxs(O.Fragment,{children:[E?.icon?O.jsx(E.icon,{}):!o&&O.jsx("div",{className:ue(`shrink-0 rounded-[2px] border-(--color-border)
246
+ 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":b&&r==="dashed"}),style:{"--color-bg":_,"--color-border":_}}),O.jsxs("div",{className:ue("flex flex-1 justify-between leading-none",b?"items-end":"items-center"),children:[O.jsxs("div",{className:"grid gap-1.5",children:[b?y:null,O.jsx("span",{className:"text-muted-foreground",children:E?.label||v.name})]}),v.value&&O.jsx("span",{className:"text-foreground font-mono font-medium tabular-nums",children:v.value.toLocaleString()})]})]})},v.dataKey)})})]})}function hR(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 i=n;return n in t&&typeof t[n]=="string"?i=t[n]:r&&n in r&&typeof r[n]=="string"&&(i=r[n]),i in e?e[i]:e[n]}const vy=14.52,gR=10,ege=4,k$="#3B82F6",tge=400,nge=200,rge=150,ige={desktop:{label:"default",color:k$}},oge=({chartContainer:e,barChart:t,cartesianGrid:n,axis:r,hasTooltip:i=!0,tooltip:o,bar:a,chartTooltipContent:s,fillContainer:u=!1,minHeight:c=nge,smoothResize:d=!0,resizeDebounceMs:p=rge,mobileBreakpoint:g=tge})=>{const h=e?.config??ige,[y,b]=j.useState(null),[v,w]=j.useState({width:0,height:0}),[C,E]=j.useState(!1);j.useEffect(()=>{if(!d||!y)return;let P;const R=jX.debounce(L=>{E(!0);for(const V of L){const{width:D,height:H}=V.contentRect;w({width:D,height:H})}clearTimeout(P),P=setTimeout(()=>{E(!1)},100)},p),I=new ResizeObserver(R);I.observe(y);const{width:k,height:B}=y.getBoundingClientRect();return w({width:k,height:B}),()=>{I.disconnect(),R.cancel(),clearTimeout(P)}},[y,d,p]);const _=v.width<g;return O.jsx("div",{ref:b,className:ue("w-full transition-opacity duration-200 will-change-transform",C?"opacity-60":"opacity-100",u?"h-full":"min-h-[200px]"),style:{minHeight:u?void 0:c,transform:"translateZ(0)",backfaceVisibility:"hidden"},children:O.jsx(Xhe,{...e,config:e?.config??h,className:ue(!u&&"aspect-video","transition-[width,height] duration-200 ease-in-out",e?.className),children:O.jsxs(qhe,{barSize:a?.barSize??t?.barSize??vy,...t,margin:t?.margin||{top:10,right:_?5:10,bottom:_?30:20,left:_?0:10},className:"transition-all duration-200",children:[O.jsx(a$,{vertical:n?.vertical??!1,horizontal:n?.horizontal??!0,strokeDasharray:n?.strokeDasharray??"3 3",...n}),O.jsx(m$,{tickLine:r?.y?.tickLine??!1,axisLine:r?.y?.axisLine??!1,tickMargin:r?.y?.tickMargin??gR,width:r?.y?.width??(_?30:35),...r?.y,hide:r?.y?.hide??_,tick:r?.y?.tick??{fontSize:_?10:12,...typeof r?.y?.tick=="object"?r?.y?.tick:{}}}),O.jsx(g$,{tickLine:r?.x?.tickLine??!1,axisLine:r?.x?.axisLine??!1,tickMargin:r?.x?.tickMargin??gR,interval:r?.x?.interval??(_?0:"preserveStart"),...r?.x,angle:r?.x?.angle??(_?-45:0),textAnchor:r?.x?.textAnchor??(_?"end":"middle"),height:r?.x?.height??(_?60:30),tick:r?.x?.tick??{fontSize:_?10:12,...typeof r?.x?.tick=="object"?r?.x?.tick:{}}}),i&&O.jsx(Qhe,{cursor:o?.cursor??!0,content:O.jsx(Jhe,{...s,className:ue("transition-all duration-200",_&&"origin-top-left scale-90 text-xs")}),...o}),O.jsx(p$,{fill:a?.fill??k$,...a,barSize:typeof a?.barSize=="number"?a.barSize:_?Math.max(10,vy*.7):vy,radius:typeof a?.radius=="number"?Math.min(a.radius,_?3:a.radius):_?3:ege})]})})})};exports.AppPagination=AY;exports.AppSidebar=MY;exports.Badge=xy;exports.BasicChart=oge;exports.BasicCheckbox=DY;exports.BasicModal=jY;exports.BasicTable=AX;exports.BasicTooltip=RX;exports.Button=oo;exports.Card=DR;exports.CardContent=FR;exports.CardDescription=$R;exports.CardFooter=VR;exports.CardHeader=jR;exports.CardTitle=LR;exports.Checkbox=r0;exports.Combobox=qT;exports.ComboboxChip=JT;exports.ComboboxChips=Fy;exports.ComboboxChipsInput=Vy;exports.ComboboxCollection=g8;exports.ComboboxContent=YT;exports.ComboboxEmpty=QT;exports.ComboboxField=KT;exports.ComboboxGroup=p8;exports.ComboboxInput=d8;exports.ComboboxItem=ZT;exports.ComboboxLabel=h8;exports.ComboboxList=XT;exports.ComboboxSeparator=m8;exports.ComboboxTrigger=qd;exports.ComboboxValue=$y;exports.Dialog=Mk;exports.DialogClose=z9;exports.DialogContent=X0;exports.DialogDescription=jk;exports.DialogFooter=Q0;exports.DialogHeader=Z0;exports.DialogOverlay=Y0;exports.DialogPortal=Dk;exports.DialogTitle=J0;exports.DialogTrigger=B9;exports.Field=sc;exports.FieldContent=zK;exports.FieldDescription=lc;exports.FieldError=HT;exports.FieldGroup=ac;exports.FieldLabel=El;exports.FieldLegend=BK;exports.FieldSeparator=HK;exports.FieldSet=lh;exports.FieldTitle=WK;exports.Icon=uo;exports.Input=V0;exports.InputField=wM;exports.InputGroup=B0;exports.InputGroupAddon=z0;exports.InputGroupButton=UT;exports.InputGroupInput=W0;exports.InputGroupText=YK;exports.InputGroupTextarea=XK;exports.InputPassword=IX;exports.Label=Vu;exports.NavigationItem=Lk;exports.NavigationMenu=$k;exports.Pagination=ex;exports.PaginationContent=tx;exports.PaginationEllipsis=Bk;exports.PaginationItem=tl;exports.PaginationLink=uc;exports.PaginationNext=Vk;exports.PaginationPrevious=Fk;exports.Progress=qk;exports.RadioButton=TX;exports.RadioGroup=ax;exports.RadioGroupItem=Xd;exports.SelectField=SM;exports.Separator=F0;exports.Switch=wN;exports.Table=sx;exports.TableBody=ux;exports.TableCaption=SN;exports.TableCell=Zd;exports.TableFooter=CN;exports.TableHead=cx;exports.TableHeader=lx;exports.TableRow=Mu;exports.Tabs=V7;exports.TabsContent=VN;exports.TabsList=$N;exports.TabsTrigger=FN;exports.Textarea=uh;exports.TextareaField=NX;exports.Tooltip=uM;exports.TooltipArrow=fM;exports.TooltipContent=mx;exports.TooltipProvider=SY;exports.TooltipTrigger=cM;exports.Typography=by;exports.badgeVariants=Zb;exports.buttonVariants=Jb;exports.cn=ue;exports.getTypographyClassName=dn;exports.typographyClassNames=Xb;exports.typographyVariantOptions=fH;exports.usePopupControls=vx;
228
247
  //# sourceMappingURL=index.cjs.map