brd-ui-kit 0.1.28 → 0.1.29

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
@@ -12,16 +12,16 @@
12
12
  hover:bg-tertiary-inverse-bg border-transparent shadow-[0_1px_3px_rgba(0,0,0,0.2)]
13
13
  hover:shadow-[0_6px_16px_rgba(0,0,0,0.30)]`},active:{true:"",false:""}},defaultVariants:{variant:"light",active:!1},compoundVariants:[{variant:"light",active:!0,class:"bg-tertiary-bg border-default-border shadow-[0_2px_6px_rgba(0,0,0,0.1)]"},{variant:"dark",active:!0,class:"bg-tertiary-inverse-bg shadow-[0_2px_6px_rgba(0,0,0,0.25)]"}]}),SH=xt("flex flex-col space-y-1.5 p-6"),EH=xt(`group-data-[disabled=true]/card:text-disabled-text leading-none font-semibold
14
14
  tracking-tight`),_H=xt(`${dn("body-sm-regular")} text-muted-foreground
15
- group-data-[disabled=true]/card:text-disabled-text`),OH=xt("group-data-[disabled=true]/card:text-disabled-text p-6 pt-0"),PH=xt("group-data-[disabled=true]/card:text-disabled-text flex items-center p-6 pt-0"),MR=({ref:e,className:t,variant:n,disabled:r,active:i,...o})=>O.jsx("div",{ref:e,"data-disabled":r||void 0,className:ue(CH({variant:n,active:i}),t),...o});MR.displayName="Card";const DR=({ref:e,className:t,...n})=>O.jsx("div",{ref:e,className:ue(SH(),t),...n});DR.displayName="CardHeader";const jR=({ref:e,className:t,...n})=>O.jsx("div",{ref:e,className:ue(EH(),t),...n});jR.displayName="CardTitle";const LR=({ref:e,className:t,...n})=>O.jsx("div",{ref:e,className:ue(_H(),t),...n});LR.displayName="CardDescription";const $R=({ref:e,className:t,...n})=>O.jsx("div",{ref:e,className:ue(OH(),t),...n});$R.displayName="CardContent";const FR=({ref:e,className:t,...n})=>O.jsx("div",{ref:e,className:ue(PH(),t),...n});FR.displayName="CardFooter";function AH(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,RH(i,...t)]}function RH(...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:()=>{},IH=x[" useInsertionEffect ".trim().toString()]||ia;function us({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[i,o,a]=TH({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=kH(d)?d(e):d;p!==e&&a.current?.(p)}else o(d)},[s,e,o,a]);return[u,c]}function TH({defaultProp:e,onChange:t}){const[n,r]=x.useState(e),i=x.useRef(n),o=x.useRef(t);return IH(()=>{o.current=t},[t]),x.useEffect(()=>{i.current!==n&&(o.current?.(n),i.current=n)},[n,i]),[n,r,o]}function kH(e){return typeof e=="function"}function Jb(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 NH(e,t){return x.useReducer((n,r)=>t[n][r]??n,e)}var yo=e=>{const{present:t,children:n}=e,r=MH(t),i=typeof n=="function"?n({present:r.isPresent}):x.Children.only(n),o=Zt(r.ref,DH(i));return typeof n=="function"||r.isPresent?x.cloneElement(i,{ref:o}):null};yo.displayName="Presence";function MH(e){const[t,n]=x.useState(),r=x.useRef(null),i=x.useRef(e),o=x.useRef("none"),a=e?"mounted":"unmounted",[s,u]=NH(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 DH(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=jH(e),n=x.forwardRef((r,i)=>{const{children:o,...a}=r,s=x.Children.toArray(o),u=s.find($H);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 jH(e){const t=x.forwardRef((n,r)=>{const{children:i,...o}=n;if(x.isValidElement(i)){const a=VH(i),s=FH(o,i.props);return i.type!==x.Fragment&&(s.ref=r?Zb(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 VR=Symbol("radix.slottable");function LH(e){const t=({children:n})=>O.jsx(O.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=VR,t}function $H(e){return x.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===VR}function FH(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 VH(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 BH=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],wt=BH.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 zH(e,t){e&&la.flushSync(()=>e.dispatchEvent(t))}var qp="Checkbox",[WH]=Fi(qp),[HH,e0]=WH(qp);function UH(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(HH,{scope:t,..._,children:GH(p)?p(_):r})}var BR="CheckboxTrigger",zR=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}=e0(BR,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":qR(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())})})});zR.displayName=BR;var t0=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(UH,{__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(zR,{...p,ref:t,__scopeCheckbox:n}),g&&O.jsx(GR,{__scopeCheckbox:n})]})})});t0.displayName=qp;var WR="CheckboxIndicator",HR=x.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...i}=e,o=e0(WR,n);return O.jsx(yo,{present:r||Qo(o.checked)||o.checked===!0,children:O.jsx(wt.span,{"data-state":qR(o.checked),"data-disabled":o.disabled?"":void 0,...i,ref:t,style:{pointerEvents:"none",...e.style}})})});HR.displayName=WR;var UR="CheckboxBubbleInput",GR=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}=e0(UR,e),y=Zt(n,h),b=Jb(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%)"}})});GR.displayName=UR;function GH(e){return typeof e=="function"}function Qo(e){return e==="indeterminate"}function qR(e){return Qo(e)?"indeterminate":e?"checked":"unchecked"}const KR=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();const qH=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const KH=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase());const vS=e=>{const t=KH(e);return t.charAt(0).toUpperCase()+t.slice(1)};var YH={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 XH=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1};const ZH=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,...YH,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:KR("lucide",i),...!o&&!XH(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(ZH,{ref:o,iconNode:t,className:KR(`lucide-${qH(vS(e))}`,`lucide-${e}`,r),...i}));return n.displayName=vS(e),n};const QH=[["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"}]],JH=ct("bell-ring",QH);const eU=[["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"}]],tU=ct("book-user",eU);const nU=[["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"}]],rU=ct("briefcase-business",nU);const iU=[["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"}]],oU=ct("building-2",iU);const aU=[["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"}]],sU=ct("calendar-1",aU);const lU=[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"m19 9-5 5-4-4-3 3",key:"2osh9i"}]],uU=ct("chart-line",lU);const cU=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],fU=ct("chevron-down",cU);const dU=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],YR=ct("chevron-left",dU);const pU=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],XR=ct("chevron-right",pU);const hU=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],gU=ct("chevrons-up-down",hU);const mU=[["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"}]],vU=ct("circle-question-mark",mU);const yU=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6h4",key:"135r8i"}]],bU=ct("clock-3",yU);const xU=[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]],wU=ct("credit-card",xU);const CU=[["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"}]],SU=ct("dollar-sign",CU);const EU=[["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"}]],ZR=ct("ellipsis",EU);const _U=[["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"}]],OU=ct("eye-off",_U);const PU=[["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"}]],AU=ct("eye",PU);const RU=[["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"}]],IU=ct("folder-open",RU);const TU=[["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"}]],kU=ct("funnel",TU);const NU=[["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"}]],MU=ct("layout-grid",NU);const DU=[["path",{d:"M2 5h20",key:"1fs1ex"}],["path",{d:"M6 12h12",key:"8npq4p"}],["path",{d:"M9 19h6",key:"456am0"}]],jU=ct("list-filter",DU);const LU=[["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"}]],$U=ct("list-todo",LU);const FU=[["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"}]],VU=ct("message-circle",FU);const BU=[["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"}]],zU=ct("package",BU);const WU=[["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"}]],HU=ct("palette",WU);const UU=[["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"}]],GU=ct("phone",UU);const qU=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],KU=ct("plus",qU);const YU=[["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"}]],XU=ct("rotate-ccw",YU);const ZU=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],QU=ct("search",ZU);const JU=[["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"}]],eG=ct("settings",JU);const tG=[["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"}]],nG=ct("tag",tG);const rG=[["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"}]],iG=ct("user-cog",rG);const oG=[["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"}]],aG=ct("users",oG);const sG=[["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"}]],lG=ct("wrench",sG);const uG=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],cG=ct("x",uG);function QR({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 JR({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"})]})}QR.displayName="Check";JR.displayName="CircleCheck";const fG={settings:eG,plus:KU,wrench:lG,phone:GU,palette:HU,building:oU,close:cG,done:QR,check:JR,users:aG,"layout-grid":MU,bell:JH,"book-user":tU,"user-gear":iG,folder:IU,"briefcase-business":rU,calendar:sU,"chart-line":uU,message:VU,search:QU,"list-filter":jU,funnel:kU,dots:ZR,"check-list":$U,tag:nG,chevron:fU,chevrons:gU,"rotate-ccw":XU,question:vU,clock:bU,eye:AU,"eye-off":OU,package:zU,"credit-card":wU,"dollar-sign":SU},dG={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=fG[e],u=dG[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})})},pG=["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(" "),hG="grid place-content-center text-current",n0=({className:e,ref:t,...n})=>O.jsx(t0,{ref:t,className:ue(pG,e),...n,children:O.jsx(HR,{className:ue(hG),children:O.jsx(uo,{type:"done",viewBox:"3 3 14 14"})})});n0.displayName=t0.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(`
15
+ group-data-[disabled=true]/card:text-disabled-text`),OH=xt("group-data-[disabled=true]/card:text-disabled-text p-6 pt-0"),PH=xt("group-data-[disabled=true]/card:text-disabled-text flex items-center p-6 pt-0"),MR=({ref:e,className:t,variant:n,disabled:r,active:i,...o})=>O.jsx("div",{ref:e,"data-disabled":r||void 0,className:ue(CH({variant:n,active:i}),t),...o});MR.displayName="Card";const DR=({ref:e,className:t,...n})=>O.jsx("div",{ref:e,className:ue(SH(),t),...n});DR.displayName="CardHeader";const jR=({ref:e,className:t,...n})=>O.jsx("div",{ref:e,className:ue(EH(),t),...n});jR.displayName="CardTitle";const LR=({ref:e,className:t,...n})=>O.jsx("div",{ref:e,className:ue(_H(),t),...n});LR.displayName="CardDescription";const $R=({ref:e,className:t,...n})=>O.jsx("div",{ref:e,className:ue(OH(),t),...n});$R.displayName="CardContent";const FR=({ref:e,className:t,...n})=>O.jsx("div",{ref:e,className:ue(PH(),t),...n});FR.displayName="CardFooter";function AH(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,RH(i,...t)]}function RH(...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:()=>{},IH=x[" useInsertionEffect ".trim().toString()]||ia;function us({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[i,o,a]=TH({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=kH(d)?d(e):d;p!==e&&a.current?.(p)}else o(d)},[s,e,o,a]);return[u,c]}function TH({defaultProp:e,onChange:t}){const[n,r]=x.useState(e),i=x.useRef(n),o=x.useRef(t);return IH(()=>{o.current=t},[t]),x.useEffect(()=>{i.current!==n&&(o.current?.(n),i.current=n)},[n,i]),[n,r,o]}function kH(e){return typeof e=="function"}function Jb(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 NH(e,t){return x.useReducer((n,r)=>t[n][r]??n,e)}var yo=e=>{const{present:t,children:n}=e,r=MH(t),i=typeof n=="function"?n({present:r.isPresent}):x.Children.only(n),o=Zt(r.ref,DH(i));return typeof n=="function"||r.isPresent?x.cloneElement(i,{ref:o}):null};yo.displayName="Presence";function MH(e){const[t,n]=x.useState(),r=x.useRef(null),i=x.useRef(e),o=x.useRef("none"),a=e?"mounted":"unmounted",[s,u]=NH(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 DH(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=jH(e),n=x.forwardRef((r,i)=>{const{children:o,...a}=r,s=x.Children.toArray(o),u=s.find($H);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 jH(e){const t=x.forwardRef((n,r)=>{const{children:i,...o}=n;if(x.isValidElement(i)){const a=VH(i),s=FH(o,i.props);return i.type!==x.Fragment&&(s.ref=r?Zb(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 VR=Symbol("radix.slottable");function LH(e){const t=({children:n})=>O.jsx(O.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=VR,t}function $H(e){return x.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===VR}function FH(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 VH(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 BH=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],wt=BH.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 zH(e,t){e&&la.flushSync(()=>e.dispatchEvent(t))}var qp="Checkbox",[WH]=Fi(qp),[HH,e0]=WH(qp);function UH(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(HH,{scope:t,..._,children:GH(p)?p(_):r})}var BR="CheckboxTrigger",zR=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}=e0(BR,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":qR(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())})})});zR.displayName=BR;var t0=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(UH,{__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(zR,{...p,ref:t,__scopeCheckbox:n}),g&&O.jsx(GR,{__scopeCheckbox:n})]})})});t0.displayName=qp;var WR="CheckboxIndicator",HR=x.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...i}=e,o=e0(WR,n);return O.jsx(yo,{present:r||Qo(o.checked)||o.checked===!0,children:O.jsx(wt.span,{"data-state":qR(o.checked),"data-disabled":o.disabled?"":void 0,...i,ref:t,style:{pointerEvents:"none",...e.style}})})});HR.displayName=WR;var UR="CheckboxBubbleInput",GR=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}=e0(UR,e),y=Zt(n,h),b=Jb(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%)"}})});GR.displayName=UR;function GH(e){return typeof e=="function"}function Qo(e){return e==="indeterminate"}function qR(e){return Qo(e)?"indeterminate":e?"checked":"unchecked"}const KR=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();const qH=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const KH=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase());const vS=e=>{const t=KH(e);return t.charAt(0).toUpperCase()+t.slice(1)};var YH={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 XH=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1};const ZH=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,...YH,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:KR("lucide",i),...!o&&!XH(s)&&{"aria-hidden":"true"},...s},[...a.map(([c,d])=>j.createElement(c,d)),...Array.isArray(o)?o:[o]]));const st=(e,t)=>{const n=j.forwardRef(({className:r,...i},o)=>j.createElement(ZH,{ref:o,iconNode:t,className:KR(`lucide-${qH(vS(e))}`,`lucide-${e}`,r),...i}));return n.displayName=vS(e),n};const QH=[["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"}]],JH=st("bell-ring",QH);const eU=[["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"}]],tU=st("book-user",eU);const nU=[["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"}]],rU=st("briefcase-business",nU);const iU=[["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"}]],oU=st("building-2",iU);const aU=[["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"}]],sU=st("calendar-1",aU);const lU=[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"m19 9-5 5-4-4-3 3",key:"2osh9i"}]],uU=st("chart-line",lU);const cU=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],fU=st("chevron-down",cU);const dU=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],YR=st("chevron-left",dU);const pU=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],XR=st("chevron-right",pU);const hU=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],gU=st("chevrons-up-down",hU);const mU=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],vU=st("circle-alert",mU);const yU=[["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"}]],bU=st("circle-question-mark",yU);const xU=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6h4",key:"135r8i"}]],wU=st("clock-3",xU);const CU=[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]],SU=st("credit-card",CU);const EU=[["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"}]],_U=st("dollar-sign",EU);const OU=[["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"}]],ZR=st("ellipsis",OU);const PU=[["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"}]],AU=st("eye-off",PU);const RU=[["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"}]],IU=st("eye",RU);const TU=[["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"}]],kU=st("folder-open",TU);const NU=[["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"}]],MU=st("funnel",NU);const DU=[["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"}]],jU=st("layout-grid",DU);const LU=[["path",{d:"M2 5h20",key:"1fs1ex"}],["path",{d:"M6 12h12",key:"8npq4p"}],["path",{d:"M9 19h6",key:"456am0"}]],$U=st("list-filter",LU);const FU=[["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"}]],VU=st("list-todo",FU);const BU=[["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"}]],zU=st("message-circle",BU);const WU=[["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"}]],HU=st("package",WU);const UU=[["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"}]],GU=st("palette",UU);const qU=[["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"}]],KU=st("phone",qU);const YU=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],XU=st("plus",YU);const ZU=[["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"}]],QU=st("rotate-ccw",ZU);const JU=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],eG=st("search",JU);const tG=[["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"}]],nG=st("settings",tG);const rG=[["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"}]],iG=st("tag",rG);const oG=[["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"}]],aG=st("user-cog",oG);const sG=[["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"}]],lG=st("users",sG);const uG=[["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"}]],cG=st("wrench",uG);const fG=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],dG=st("x",fG);function QR({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 JR({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"})]})}QR.displayName="Check";JR.displayName="CircleCheck";const pG={settings:nG,plus:XU,wrench:cG,phone:KU,palette:GU,building:oU,close:dG,done:QR,check:JR,users:lG,"layout-grid":jU,bell:JH,"book-user":tU,"user-gear":aG,folder:kU,"briefcase-business":rU,calendar:sU,"chart-line":uU,message:zU,search:eG,"list-filter":$U,funnel:MU,dots:ZR,"check-list":VU,tag:iG,chevron:fU,chevrons:gU,"rotate-ccw":QU,question:bU,clock:wU,eye:IU,"eye-off":AU,package:HU,"credit-card":SU,"dollar-sign":_U,"circle-alert":vU},hG={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=pG[e],u=hG[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})})},gG=["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(" "),mG="grid place-content-center text-current",n0=({className:e,ref:t,...n})=>O.jsx(t0,{ref:t,className:ue(gG,e),...n,children:O.jsx(HR,{className:ue(mG),children:O.jsx(uo,{type:"done",viewBox:"3 3 14 14"})})});n0.displayName=t0.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
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 yS={};function ei(e,t){const n=x.useRef(yS);return n.current===yS&&(n.current=e(t)),n}const vm=x[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],gG=vm&&vm!==x.useLayoutEffect?vm:e=>e();function Me(e){const t=ei(mG).current;return t.next=e,gG(t.effect),t.trampoline}function mG(){const e={next:void 0,callback:vG,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function vG(){if(process.env.NODE_ENV!=="production")throw new Error("Base UI: Cannot call an event handler while rendering.")}const yG=()=>{},je=typeof document<"u"?x.useLayoutEffect:yG,r0=x.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},elementsRef:{current:[]},nextIndexRef:{current:0}});process.env.NODE_ENV!=="production"&&(r0.displayName="CompositeListContext");function bG(){return x.useContext(r0)}function eI(e){const{children:t,elementsRef:n,labelsRef:r,onMapChange:i}=e,o=Me(i),a=x.useRef(0),s=ei(wG).current,u=ei(xG).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(CG).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(r0.Provider,{value:v,children:t})}function xG(){return new Map}function wG(){return new Set}function CG(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 tI=x.createContext(void 0);process.env.NODE_ENV!=="production"&&(tI.displayName="DirectionContext");function nI(){return x.useContext(tI)?.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(rI).current;return EG(i,e,t,n,r)&&iI(i,[e,t,n,r]),i.callback}function SG(e){const t=ei(rI).current;return _G(t,e)&&iI(t,e),t.callback}function rI(){return{callback:null,cleanup:null,refs:[]}}function EG(e,t,n,r,i){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==i}function _G(e,t){return e.refs.length!==t.length||e.refs.some((n,r)=>n!==t[r])}function iI(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 OG=parseInt(x.version,10);function i0(e){return OG>=e}function bS(e){if(!x.isValidElement(e))return null;const t=e,n=t.props;return(i0(19)?n?.ref:t.ref)??null}function xy(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function PG(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 AG(e,t){return typeof e=="function"?e(t):e}function RG(e,t){return typeof e=="function"?e(t):e}const Au={};function oI(e,t,n,r,i){let o={...wy(e,Au)};return t&&(o=Cd(o,t)),n&&(o=Cd(o,n)),r&&(o=Cd(o,r)),o}function IG(e){if(e.length===0)return Au;if(e.length===1)return wy(e[0],Au);let t={...wy(e[0],Au)};for(let n=1;n<e.length;n+=1)t=Cd(t,e[n]);return t}function Cd(e,t){return aI(t)?t(e):TG(e,t)}function TG(e,t){if(!t)return e;for(const n in t){const r=t[n];switch(n){case"style":{e[n]=xy(e.style,r);break}case"className":{e[n]=sI(e.className,r);break}default:kG(n,r)?e[n]=NG(e[n],r):e[n]=r}}return e}function kG(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 aI(e){return typeof e=="function"}function wy(e,t){return aI(e)?e(t):e??Au}function NG(e,t){return t?e?n=>{if(MG(n)){const i=n;Cy(i);const o=t(i);return i.baseUIHandlerPrevented||e?.(i),o}const r=t(n);return e?.(n),r}:t:e}function Cy(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function sI(e,t){return t?e?t+" "+e:t:e}function MG(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function Wt(){}const jf=Object.freeze([]),Xn=Object.freeze({}),DG={style:{transition:"none"}},jG="data-base-ui-click-trigger",LG={fallbackAxisSide:"none"},$G={clipPath:"inset(50%)",position:"fixed",top:0,left:0};function er(e,t,n={}){const r=t.render,i=FG(t,n);if(n.enabled===!1)return null;const o=n.state??Xn;return BG(e,r,i,o)}function FG(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?AG(n,o):void 0,p=c?RG(r,o):void 0,g=c?PG(o,u):Xn,h=c?xy(g,Array.isArray(s)?IG(s):s)??Xn:Xn;return typeof document<"u"&&(c?Array.isArray(a)?h.ref=SG([h.ref,bS(i),...a]):h.ref=Lu(h.ref,bS(i),a):Lu(null,null)),c?(d!==void 0&&(h.className=sI(h.className,d)),p!==void 0&&(h.style=xy(h.style,p)),h):Xn}const VG=Symbol.for("react.lazy");function BG(e,t,n,r){if(t){if(typeof t=="function")return t(n,r);const i=oI(n,t.props);i.ref=n.ref;let o=t;if(o?.$$typeof===VG&&(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 zG(e,n);throw new Error(process.env.NODE_ENV!=="production"?"Base UI: Render element or function are not defined.":pi(8))}function zG(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",Sy="trigger-press",WG="trigger-hover",o0="outside-press",HG="item-press",xS="clear-press",UG="chip-remove-press",Js="input-change",Uo="input-clear",GG="input-press",Kp="focus-out",lI="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 Ey={...x};let wS=0;function qG(e,t="mui"){const[n,r]=x.useState(e),i=e||n;return x.useEffect(()=>{n==null&&(wS+=1,r(`${t}-${wS}`))},[n,t]),i}const CS=Ey.useId;function a0(e,t){if(CS!==void 0){const n=CS();return e??(t?`${t}-${n}`:n)}return qG(e,t)}function s0(e){return a0(e,"base-ui")}const KG=[];function uI(e){x.useEffect(e,KG)}const Lf=null;let SS=globalThis.requestAnimationFrame;class YG{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"&&SS!==requestAnimationFrame&&(SS=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 YG;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 l0(){const e=ei(Oi.create).current;return uI(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 XG={[$u.startingStyle]:""},ZG={[$u.endingStyle]:""},cI={transitionStatus(e){return e==="starting"?XG:e==="ending"?ZG:null}};function QG(e,t=!1,n=!0){const r=l0();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 fI(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 dI=(function(e){return e[e.None=0]="None",e[e.GuessFromOrder=1]="GuessFromOrder",e})({});function pI(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}=bG(),g=x.useRef(-1),[h,y]=x.useState(o??(i===dI.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 u0(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=(u0(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function u0(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 _y(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 JG(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 e4=/transform|translate|scale|rotate|perspective|filter/,t4=/paint|layout|strict|content/,ka=e=>!!e&&e!=="none";let ym;function c0(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))||e4.test(t.willChange||"")||t4.test(t.contain||"")}function n4(e){let t=co(e);for(;nn(t)&&!ao(t);){if(c0(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||_y(e)&&e.host||Vi(e);return _y(t)?t.host:t}function hI(e){const t=co(e);return ao(t)?e.ownerDocument?e.ownerDocument.body:e.body:nn(t)&&fa(t)?t:hI(t)}function Jo(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=hI(e),o=i===((r=e.ownerDocument)==null?void 0:r.body),a=Nn(i);if(o){const s=Oy(a);return t.concat(a,a.visualViewport||[],fa(i)?i:[],s&&n?Jo(s):[])}else return t.concat(i,Jo(i,[],n))}function Oy(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}let Py;process.env.NODE_ENV!=="production"&&(Py=new Set);function ES(...e){if(process.env.NODE_ENV!=="production"){const t=e.join(" ");Py.has(t)||(Py.add(t),console.error(`Base UI: ${t}`))}}const gI=x.createContext(void 0);process.env.NODE_ENV!=="production"&&(gI.displayName="CompositeRootContext");function r4(e=!1){const t=x.useContext(gI);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 i4(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=r4(!0)!==void 0,s=Me(()=>{const g=o.current;return!!(g?.tagName==="A"&&g?.href)}),{props:u}=i4({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=Ey.captureOwnerStack?.()||"";ES(`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=Ey.captureOwnerStack?.()||"";ES(`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;o4(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 oI({type:i?"button":void 0,onClick(_){if(t){_.preventDefault();return}h?.(_)},onMouseDown(_){t||y?.(_)},onKeyDown(_){if(t||(Cy(_),v?.(_)),_.baseUIHandlerPrevented)return;const P=_.target===_.currentTarget&&!i&&!s()&&!t,R=_.key==="Enter",I=_.key===" ";P&&((I||R)&&_.preventDefault(),R&&h?.(_))},onKeyUp(_){t||(Cy(_),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 o4(e){return nn(e)&&e.tagName==="BUTTON"}const cs=typeof navigator<"u",bm=l4(),mI=c4(),f0=u4(),vI=typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter:none"),yI=bm.platform==="MacIntel"&&bm.maxTouchPoints>1?!0:/iP(hone|ad|od)|iOS/.test(bm.platform),_S=cs&&/firefox/i.test(f0),a4=cs&&/apple/i.test(navigator.vendor),Md=cs&&/android/i.test(mI)||/android/i.test(f0);cs&&mI.toLowerCase().startsWith("mac")&&navigator.maxTouchPoints;const s4=f0.includes("jsdom/");function l4(){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 u4(){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 c4(){if(!cs)return"";const e=navigator.userAgentData;return e?.platform?e.platform:navigator.platform??""}const Ay="data-base-ui-focusable",bI="active",xI="selected",f4="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",ea="ArrowLeft",ta="ArrowRight",d0="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&&_y(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 d4(e){return e.matches("html,body")}function p0(e){return nn(e)&&e.matches(f4)}function Ry(e){return e?e.getAttribute("role")==="combobox"&&p0(e):!1}function Iy(e){return e?e.hasAttribute(Ay)?e:e.querySelector(`[${Ay}]`)||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 OS(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 p4(e){return"nativeEvent"in e}function wI(e){return e.pointerType===""&&e.isTrusted?!0:Md&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function CI(e){return s4?!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 PS(e,t){return["mouse","pen"].includes(e)}function SI(e){const t=e.type;return t==="click"||t==="mousedown"||t==="keydown"||t==="keyup"}const h4=["top","right","bottom","left"],oa=Math.min,Er=Math.max,Dd=Math.round,el=Math.floor,Ii=e=>({x:e,y:e}),g4={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 h0(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 h0(Zr(e))}function m4(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 v4(e){const t=Ld(e);return[Ty(e),t,Ty(t)]}function Ty(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const AS=["left","right"],RS=["right","left"],y4=["top","bottom"],b4=["bottom","top"];function x4(e,t,n){switch(e){case"top":case"bottom":return n?t?RS:AS:t?AS:RS;case"left":case"right":return t?y4:b4;default:return[]}}function w4(e,t,n,r){const i=bo(e);let o=x4(Ar(e),n==="start",r);return i&&(o=o.map(a=>a+"-"+i),t&&(o=o.concat(o.map(Ty)))),o}function Ld(e){const t=Ar(e);return g4[t]+e.slice(t.length)}function C4(e){return{top:0,right:0,bottom:0,left:0,...e}}function g0(e){return typeof e!="number"?C4(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 IS(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 S4(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===d0){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 E4(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 _4(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 O4(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 P4=["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=P4.join(","),EI=typeof Element>"u",dl=EI?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Vd=!EI&&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},A4=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},_I=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},OI=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},PI=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||A4(t))&&!OI(t)?0:t.tabIndex},R4=function(t,n){var r=PI(t);return r<0&&n&&!OI(t)?0:r},I4=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},AI=function(t){return t.tagName==="INPUT"},T4=function(t){return AI(t)&&t.type==="hidden"},k4=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},N4=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},M4=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=N4(i,t.form);return!o||o===t},D4=function(t){return AI(t)&&t.type==="radio"},j4=function(t){return D4(t)&&!M4(t)},L4=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},TS=function(t){var n=t.getBoundingClientRect(),r=n.width,i=n.height;return r===0&&i===0},$4=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 TS(t);t.assignedSlot?t=t.assignedSlot:!c&&d!==t.ownerDocument?t=d.host:t=c}t=u}if(L4(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return TS(t);return!1},F4=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},ky=function(t,n){return!(n.disabled||T4(n)||$4(n,t)||k4(n)||F4(n))},Ny=function(t,n){return!(j4(n)||PI(n)<0||!ky(t,n))},V4=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},RI=function(t){var n=[],r=[];return t.forEach(function(i,o){var a=!!i.scopeParent,s=a?i.scopeParent:i,u=R4(s,a),c=a?RI(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(I4).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:Ny.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:V4}):r=_I(t,n.includeContainer,Ny.bind(null,n)),RI(r)},B4=function(t,n){n=n||{};var r;return n.getShadowRoot?r=zd([t],n.includeContainer,{filter:ky.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):r=_I(t,n.includeContainer,ky.bind(null,n)),r},II=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return dl.call(t,Fd)===!1?!1:Ny(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 TI(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 kI(e){return TI(Xt(e).body,1)||e}function NI(e){return TI(Xt(e).body,-1)||e}function ku(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!ft(n,r)}function z4(e){nh(e,ic()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function kS(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 m0(e){const{enabled:t=!0,open:n,ref:r,onComplete:i}=e,o=Me(i),a=QG(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 uI(e.disposeEffect),e}let NS={},MS={},DS="";function W4(e){if(typeof document>"u")return!1;const t=Xt(e);return Nn(t).innerWidth-t.documentElement.clientWidth>0}function H4(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 U4(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 G4(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(vI&&(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,NS={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},DS=n.style.scrollBehavior,MS={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=H4(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,NS),Object.assign(r.style,MS),s||(n.scrollTop=o,n.scrollLeft=a,n.removeAttribute("data-base-ui-scroll-locked"),n.style.scrollBehavior=DS)}function p(){d(),u.request(c)}return c(),i.addEventListener("resize",p),()=>{u.cancel(),d(),typeof i.removeEventListener=="function"&&i.removeEventListener("resize",p)}}class q4{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=yI||!W4(t);this.restore=o?U4(t):G4(t)}}const K4=new q4;function Y4(e=!0,t=null){je(()=>{if(e)return K4.acquire(t)},[e,t])}function Xr(e){const t=ei(X4,e).current;return t.next=e,je(t.effect),t}function X4(e){const t={current:e,next:e,effect:()=>{t.current=t.next}};return t}function Z4(){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 MI=x.createContext(null);process.env.NODE_ENV!=="production"&&(MI.displayName="FloatingNodeContext");const DI=x.createContext(null);process.env.NODE_ENV!=="production"&&(DI.displayName="FloatingTreeContext");const jI=()=>x.useContext(MI)?.id||null,rh=e=>{const t=x.useContext(DI);return e??t};function Wd(e){return`data-base-ui-${e}`}const LI={clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1},v0={...LI,position:"fixed",top:0,left:0},Q4={...LI,position:"absolute"},Fu=x.forwardRef(function(t,n){const[r,i]=x.useState();je(()=>{a4&&i("button")},[]);const o={tabIndex:0,role:r};return O.jsx("span",{...t,ref:n,style:v0,"aria-hidden":r?void 0:!0,...o,"data-base-ui-focus-guard":""})});process.env.NODE_ENV!=="production"&&(Fu.displayName="FocusGuard");let jS=0;function Nu(e,t={}){const{preventScroll:n=!1,cancelPrevious:r=!0,sync:i=!1}=t;r&&cancelAnimationFrame(jS);const o=()=>e?.focus({preventScroll:n});i?o():jS=requestAnimationFrame(o)}const ol={inert:new WeakMap,"aria-hidden":new WeakMap,none:new WeakMap};function LS(e){return e==="inert"?ol.inert:e==="aria-hidden"?ol["aria-hidden"]:ol.none}let Vf=new WeakSet,Bf={},wm=0;const $I=e=>e&&(e.host||$I(e.parentNode)),J4=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=$I(n);return e.contains(r)?r:null}).filter(n=>n!=null);function eq(e,t,n,r){const i="data-base-ui-inert",o=r?"inert":n?"aria-hidden":null,a=J4(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=LS(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=LS(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 tq(e,t=!1,n=!1){const r=Xt(e[0]).body;return eq(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const y0=x.createContext(null);process.env.NODE_ENV!=="production"&&(y0.displayName="PortalContext");const FI=()=>x.useContext(y0),nq=Wd("portal");function rq(e={}){const{ref:t,container:n,componentProps:r=Xn,elementProps:i}=e,o=a0(),s=FI()?.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&&(u0(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,[nq]:""},i]});return{portalNode:d,portalSubtree:u&&y?la.createPortal(y,u):null}}const VI=x.forwardRef(function(t,n){const{children:r,container:i,className:o,render:a,renderGuards:s,...u}=t,{portalNode:c,portalSubtree:d}=rq({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"?kS:z4)(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||kS(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(y0.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;NI(R)?.focus()}}}),E&&c&&O.jsx("span",{"aria-owns":c.id,style:$G}),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;kI(R)?.focus(),b?.closeOnFocusOut&&b?.onOpenChange(!1,Xe(Kp,P.nativeEvent))}}})]})]})});process.env.NODE_ENV!=="production"&&(VI.displayName="FloatingPortal");function iq(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 $S=20;let Yo=[];function b0(){Yo=Yo.filter(e=>e.deref()?.isConnected)}function oq(e){b0(),e&&ca(e)!=="body"&&(Yo.push(new WeakRef(e)),Yo.length>$S&&(Yo=Yo.slice(-$S)))}function Cm(){return b0(),Yo[Yo.length-1]?.deref()}function aq(e){if(!e)return null;const t=ic();return II(e,t)?e:nh(e,t)[0]||e}function sq(e){return!e||!e.isConnected?!1:typeof e.checkVisibility=="function"?e.checkVisibility():Rr(e).display!=="none"}function FS(e,t){if(!t.current.includes("floating")&&!e.getAttribute("role")?.includes("dialog"))return;const n=ic(),i=B4(e,n).filter(a=>{const s=a.getAttribute("data-tabindex")||"";return II(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 lq(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=Ry(v)&&P,I=x.useRef(["content"]),k=Xr(i),B=Xr(o),L=Xr(c),V=rh(h),D=FI(),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=l0(),Fe=D!=null,Y=Iy(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(`[${jG}]`)&&(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))||OS(V.nodesRef.current,et).find(ot=>[ot.context?.elements.floating,Iy(ot.context?.elements.floating)].includes(le)||ot.context?.elements.domReference===le)));if(be===v&&Y&&FS(Y,I),a&&be!==v&&!sq(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?OS(V.nodesRef.current,_()):[]).find(fe=>Ry(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 tq(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);oq(Z);function Re(me){if(me.open||(pe.current=iq(me.nativeEvent,K.current)),me.reason===WG&&me.nativeEvent.type==="mouseleave"&&(te.current=!0),me.reason===o0)if(me.nested)te.current=!1;else if(wI(me.nativeEvent)||CI(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,v0),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=aq(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(!vI||b||!w)return;const ie=eo(Xt(w));!nn(ie)||!p0(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 FS(Y,I),()=>{queueMicrotask(b0)}},[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)?kI(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)?NI(v)?.focus():Qi(d??D.afterOutsideRef)?.focus())}})]})}function BI(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=Sy}=t,p=x.useRef(void 0),g=l0(),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"||PS(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(p0(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(PS(v)&&s)return;const w=n.select("open"),C=r.current.openEvent,E=n.select("domReferenceElement")!==b.currentTarget,_=w&&E||!(w&&a&&(!(C&&u)||SI(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 VS(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 uq(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=g0(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 cq=50,fq=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:a}=n,s=a.detectOverflow?a:{...a,detectOverflow:uq},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}=VS(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<cq&&(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}=VS(c,g,u)),b=-1)}return{x:d,y:p,placement:g,strategy:i,middlewareData:y}},dq=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=g0(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}}}),pq=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)]:v4(s)),R=y!=="none";!g&&R&&P.push(...w4(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=m4(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 BS(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function zS(e){return h4.some(t=>e[t]>=0)}const hq=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=BS(a,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:zS(s)}}}case"escaped":{const a=await r.detectOverflow(t,{...o,altBoundary:!0}),s=BS(a,n.floating);return{data:{escapedOffsets:s,escaped:zS(s)}}}default:return{}}}}},zI=new Set(["left","top"]);async function gq(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=zI.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 mq=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 gq(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}}}}},vq=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=h0(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}}}}}},yq=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=h0(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",_=zI.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}}}},bq=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 WI(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 x0(e){return Lt(e)?e:e.contextElement}function al(e){const t=x0(e);if(!nn(t))return Ii(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:o}=WI(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 xq=Ii(0);function HI(e){const t=Nn(e);return!Zp()||!t.visualViewport?xq:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function wq(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=x0(e);let a=Ii(1);t&&(r?Lt(r)&&(a=al(r)):a=al(e));const s=wq(o,n,r)?HI(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=Oy(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=Oy(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 UI(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 Cq(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?UI(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 Sq(e){return Array.from(e.getClientRects())}function Eq(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 WS=25;function _q(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<=WS&&(o-=y)}else c<=WS&&(o+=c);return{width:o,height:a,x:s,y:u}}function Oq(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 HS(e,t,n){let r;if(t==="viewport")r=_q(e,n);else if(t==="document")r=Eq(Vi(e));else if(Lt(t))r=Oq(t,n);else{const i=HI(e);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return $d(r)}function GI(e,t){const n=co(e);return n===t||!Lt(n)||ao(n)?!1:Rr(n).position==="fixed"||GI(n,t)}function Pq(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=c0(a);!u&&s.position==="fixed"&&(i=null),(o?!u&&!i:!u&&s.position==="static"&&!!i&&(i.position==="absolute"||i.position==="fixed")||fa(a)&&!u&&GI(e,a))?r=r.filter(d=>d!==a):i=s,a=co(a)}return t.set(e,r),r}function Aq(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const a=[...n==="clippingAncestors"?Xp(t)?[]:Pq(t,this._c):[].concat(n),r],s=HS(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=HS(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 Rq(e){const{width:t,height:n}=WI(e);return{width:t,height:n}}function Iq(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?UI(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 US(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 qI(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=US(e,t);for(;r&&JG(r)&&Sm(r);)r=US(r,t);return r&&ao(r)&&Sm(r)&&!c0(r)?n:r||n4(e)||n}const Tq=async function(e){const t=this.getOffsetParent||qI,n=this.getDimensions,r=await n(e.floating);return{reference:Iq(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function kq(e){return Rr(e).direction==="rtl"}const Nq={convertOffsetParentRelativeRectToViewportRelativeRect:Cq,getDocumentElement:Vi,getClippingRect:Aq,getOffsetParent:qI,getElementRects:Tq,getClientRects:Sq,getDimensions:Rq,getScale:al,isElement:Lt,isRTL:kq};function KI(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Mq(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&&!KI(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 My(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=x0(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?Mq(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&&!KI(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 Dq=mq,jq=vq,Lq=pq,$q=bq,Fq=hq,GS=dq,Vq=yq,Bq=(e,t,n)=>{const r=new Map,i={platform:Nq,...n},o={...i.platform,_c:r};return fq(e,t,{...i,platform:o})};var zq=typeof document<"u",Wq=function(){},Sd=zq?j.useLayoutEffect:Wq;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 YI(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function qS(e,t){const n=YI(e);return Math.round(t*n)/n}function Em(e){const t=x.useRef(e);return Sd(()=>{t.current=e}),t}function XI(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),Bq(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=qS(G.floating,d.x),K=qS(G.floating,d.y);return s?{...Q,transform:"translate("+pe+"px, "+K+"px)",...YI(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 Hq=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?GS({element:r.current,padding:i}).fn(n):{}:r?GS({element:r,padding:i}).fn(n):{}}}},ZI=(e,t)=>{const n=Dq(e);return{name:n.name,fn:n.fn,options:[e,t]}},QI=(e,t)=>{const n=jq(e);return{name:n.name,fn:n.fn,options:[e,t]}},JI=(e,t)=>({fn:Vq(e).fn,options:[e,t]}),eT=(e,t)=>{const n=Lq(e);return{name:n.name,fn:n.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]}},Uq=(e,t)=>{const n=Hq(e);return{name:n.name,fn:n.fn,options:[e,t]}},Gq={intentional:"onClick",sloppy:"onPointerDown"};function qq(e){return{escapeKey:typeof e=="boolean"?e:e?.escapeKey??!1,outsidePress:typeof e=="boolean"?e:e?.outsidePress??!0}}function Kq(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}=qq(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=p4($)?$.nativeEvent:$,U=Xe(lI,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)&&!d4(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(o0,$)),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&&{[Gq[y]]:$=>{n.setOpen(!1,Xe(Sy,$.nativeEvent))},...y!=="intentional"&&{onClick($){n.setOpen(!1,Xe(Sy,$.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 Yq=(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
17
+ `))},[JSON.stringify(t)])}const u=x.useCallback(c=>{i||a(c)},[]);return[s,u]}const yS={};function ei(e,t){const n=x.useRef(yS);return n.current===yS&&(n.current=e(t)),n}const vm=x[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],vG=vm&&vm!==x.useLayoutEffect?vm:e=>e();function Me(e){const t=ei(yG).current;return t.next=e,vG(t.effect),t.trampoline}function yG(){const e={next:void 0,callback:bG,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function bG(){if(process.env.NODE_ENV!=="production")throw new Error("Base UI: Cannot call an event handler while rendering.")}const xG=()=>{},je=typeof document<"u"?x.useLayoutEffect:xG,r0=x.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},elementsRef:{current:[]},nextIndexRef:{current:0}});process.env.NODE_ENV!=="production"&&(r0.displayName="CompositeListContext");function wG(){return x.useContext(r0)}function eI(e){const{children:t,elementsRef:n,labelsRef:r,onMapChange:i}=e,o=Me(i),a=x.useRef(0),s=ei(SG).current,u=ei(CG).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(EG).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(r0.Provider,{value:v,children:t})}function CG(){return new Map}function SG(){return new Set}function EG(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 tI=x.createContext(void 0);process.env.NODE_ENV!=="production"&&(tI.displayName="DirectionContext");function nI(){return x.useContext(tI)?.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(rI).current;return OG(i,e,t,n,r)&&iI(i,[e,t,n,r]),i.callback}function _G(e){const t=ei(rI).current;return PG(t,e)&&iI(t,e),t.callback}function rI(){return{callback:null,cleanup:null,refs:[]}}function OG(e,t,n,r,i){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==i}function PG(e,t){return e.refs.length!==t.length||e.refs.some((n,r)=>n!==t[r])}function iI(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 AG=parseInt(x.version,10);function i0(e){return AG>=e}function bS(e){if(!x.isValidElement(e))return null;const t=e,n=t.props;return(i0(19)?n?.ref:t.ref)??null}function xy(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function RG(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 IG(e,t){return typeof e=="function"?e(t):e}function TG(e,t){return typeof e=="function"?e(t):e}const Au={};function oI(e,t,n,r,i){let o={...wy(e,Au)};return t&&(o=Cd(o,t)),n&&(o=Cd(o,n)),r&&(o=Cd(o,r)),o}function kG(e){if(e.length===0)return Au;if(e.length===1)return wy(e[0],Au);let t={...wy(e[0],Au)};for(let n=1;n<e.length;n+=1)t=Cd(t,e[n]);return t}function Cd(e,t){return aI(t)?t(e):NG(e,t)}function NG(e,t){if(!t)return e;for(const n in t){const r=t[n];switch(n){case"style":{e[n]=xy(e.style,r);break}case"className":{e[n]=sI(e.className,r);break}default:MG(n,r)?e[n]=DG(e[n],r):e[n]=r}}return e}function MG(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 aI(e){return typeof e=="function"}function wy(e,t){return aI(e)?e(t):e??Au}function DG(e,t){return t?e?n=>{if(jG(n)){const i=n;Cy(i);const o=t(i);return i.baseUIHandlerPrevented||e?.(i),o}const r=t(n);return e?.(n),r}:t:e}function Cy(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function sI(e,t){return t?e?t+" "+e:t:e}function jG(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function Wt(){}const jf=Object.freeze([]),Xn=Object.freeze({}),LG={style:{transition:"none"}},$G="data-base-ui-click-trigger",FG={fallbackAxisSide:"none"},VG={clipPath:"inset(50%)",position:"fixed",top:0,left:0};function er(e,t,n={}){const r=t.render,i=BG(t,n);if(n.enabled===!1)return null;const o=n.state??Xn;return WG(e,r,i,o)}function BG(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?IG(n,o):void 0,p=c?TG(r,o):void 0,g=c?RG(o,u):Xn,h=c?xy(g,Array.isArray(s)?kG(s):s)??Xn:Xn;return typeof document<"u"&&(c?Array.isArray(a)?h.ref=_G([h.ref,bS(i),...a]):h.ref=Lu(h.ref,bS(i),a):Lu(null,null)),c?(d!==void 0&&(h.className=sI(h.className,d)),p!==void 0&&(h.style=xy(h.style,p)),h):Xn}const zG=Symbol.for("react.lazy");function WG(e,t,n,r){if(t){if(typeof t=="function")return t(n,r);const i=oI(n,t.props);i.ref=n.ref;let o=t;if(o?.$$typeof===zG&&(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 HG(e,n);throw new Error(process.env.NODE_ENV!=="production"?"Base UI: Render element or function are not defined.":pi(8))}function HG(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",Sy="trigger-press",UG="trigger-hover",o0="outside-press",GG="item-press",xS="clear-press",qG="chip-remove-press",Js="input-change",Uo="input-clear",KG="input-press",Kp="focus-out",lI="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 Ey={...x};let wS=0;function YG(e,t="mui"){const[n,r]=x.useState(e),i=e||n;return x.useEffect(()=>{n==null&&(wS+=1,r(`${t}-${wS}`))},[n,t]),i}const CS=Ey.useId;function a0(e,t){if(CS!==void 0){const n=CS();return e??(t?`${t}-${n}`:n)}return YG(e,t)}function s0(e){return a0(e,"base-ui")}const XG=[];function uI(e){x.useEffect(e,XG)}const Lf=null;let SS=globalThis.requestAnimationFrame;class ZG{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"&&SS!==requestAnimationFrame&&(SS=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 ZG;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 l0(){const e=ei(Oi.create).current;return uI(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 QG={[$u.startingStyle]:""},JG={[$u.endingStyle]:""},cI={transitionStatus(e){return e==="starting"?QG:e==="ending"?JG:null}};function e4(e,t=!1,n=!0){const r=l0();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 fI(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 dI=(function(e){return e[e.None=0]="None",e[e.GuessFromOrder=1]="GuessFromOrder",e})({});function pI(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}=wG(),g=x.useRef(-1),[h,y]=x.useState(o??(i===dI.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 u0(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=(u0(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function u0(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 _y(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 t4(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 n4=/transform|translate|scale|rotate|perspective|filter/,r4=/paint|layout|strict|content/,ka=e=>!!e&&e!=="none";let ym;function c0(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))||n4.test(t.willChange||"")||r4.test(t.contain||"")}function i4(e){let t=co(e);for(;nn(t)&&!ao(t);){if(c0(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||_y(e)&&e.host||Vi(e);return _y(t)?t.host:t}function hI(e){const t=co(e);return ao(t)?e.ownerDocument?e.ownerDocument.body:e.body:nn(t)&&fa(t)?t:hI(t)}function Jo(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=hI(e),o=i===((r=e.ownerDocument)==null?void 0:r.body),a=Nn(i);if(o){const s=Oy(a);return t.concat(a,a.visualViewport||[],fa(i)?i:[],s&&n?Jo(s):[])}else return t.concat(i,Jo(i,[],n))}function Oy(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}let Py;process.env.NODE_ENV!=="production"&&(Py=new Set);function ES(...e){if(process.env.NODE_ENV!=="production"){const t=e.join(" ");Py.has(t)||(Py.add(t),console.error(`Base UI: ${t}`))}}const gI=x.createContext(void 0);process.env.NODE_ENV!=="production"&&(gI.displayName="CompositeRootContext");function o4(e=!1){const t=x.useContext(gI);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 a4(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=o4(!0)!==void 0,s=Me(()=>{const g=o.current;return!!(g?.tagName==="A"&&g?.href)}),{props:u}=a4({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=Ey.captureOwnerStack?.()||"";ES(`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=Ey.captureOwnerStack?.()||"";ES(`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;s4(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 oI({type:i?"button":void 0,onClick(_){if(t){_.preventDefault();return}h?.(_)},onMouseDown(_){t||y?.(_)},onKeyDown(_){if(t||(Cy(_),v?.(_)),_.baseUIHandlerPrevented)return;const P=_.target===_.currentTarget&&!i&&!s()&&!t,R=_.key==="Enter",I=_.key===" ";P&&((I||R)&&_.preventDefault(),R&&h?.(_))},onKeyUp(_){t||(Cy(_),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 s4(e){return nn(e)&&e.tagName==="BUTTON"}const cs=typeof navigator<"u",bm=c4(),mI=d4(),f0=f4(),vI=typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter:none"),yI=bm.platform==="MacIntel"&&bm.maxTouchPoints>1?!0:/iP(hone|ad|od)|iOS/.test(bm.platform),_S=cs&&/firefox/i.test(f0),l4=cs&&/apple/i.test(navigator.vendor),Md=cs&&/android/i.test(mI)||/android/i.test(f0);cs&&mI.toLowerCase().startsWith("mac")&&navigator.maxTouchPoints;const u4=f0.includes("jsdom/");function c4(){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 f4(){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 d4(){if(!cs)return"";const e=navigator.userAgentData;return e?.platform?e.platform:navigator.platform??""}const Ay="data-base-ui-focusable",bI="active",xI="selected",p4="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",ea="ArrowLeft",ta="ArrowRight",d0="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&&_y(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 h4(e){return e.matches("html,body")}function p0(e){return nn(e)&&e.matches(p4)}function Ry(e){return e?e.getAttribute("role")==="combobox"&&p0(e):!1}function Iy(e){return e?e.hasAttribute(Ay)?e:e.querySelector(`[${Ay}]`)||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 OS(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 g4(e){return"nativeEvent"in e}function wI(e){return e.pointerType===""&&e.isTrusted?!0:Md&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function CI(e){return u4?!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 PS(e,t){return["mouse","pen"].includes(e)}function SI(e){const t=e.type;return t==="click"||t==="mousedown"||t==="keydown"||t==="keyup"}const m4=["top","right","bottom","left"],oa=Math.min,Er=Math.max,Dd=Math.round,el=Math.floor,Ii=e=>({x:e,y:e}),v4={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 h0(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 h0(Zr(e))}function y4(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 b4(e){const t=Ld(e);return[Ty(e),t,Ty(t)]}function Ty(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const AS=["left","right"],RS=["right","left"],x4=["top","bottom"],w4=["bottom","top"];function C4(e,t,n){switch(e){case"top":case"bottom":return n?t?RS:AS:t?AS:RS;case"left":case"right":return t?x4:w4;default:return[]}}function S4(e,t,n,r){const i=bo(e);let o=C4(Ar(e),n==="start",r);return i&&(o=o.map(a=>a+"-"+i),t&&(o=o.concat(o.map(Ty)))),o}function Ld(e){const t=Ar(e);return v4[t]+e.slice(t.length)}function E4(e){return{top:0,right:0,bottom:0,left:0,...e}}function g0(e){return typeof e!="number"?E4(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 IS(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 _4(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===d0){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 O4(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 P4(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 A4(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 R4=["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=R4.join(","),EI=typeof Element>"u",dl=EI?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Vd=!EI&&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},I4=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},_I=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},OI=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},PI=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||I4(t))&&!OI(t)?0:t.tabIndex},T4=function(t,n){var r=PI(t);return r<0&&n&&!OI(t)?0:r},k4=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},AI=function(t){return t.tagName==="INPUT"},N4=function(t){return AI(t)&&t.type==="hidden"},M4=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},D4=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},j4=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=D4(i,t.form);return!o||o===t},L4=function(t){return AI(t)&&t.type==="radio"},$4=function(t){return L4(t)&&!j4(t)},F4=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},TS=function(t){var n=t.getBoundingClientRect(),r=n.width,i=n.height;return r===0&&i===0},V4=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 TS(t);t.assignedSlot?t=t.assignedSlot:!c&&d!==t.ownerDocument?t=d.host:t=c}t=u}if(F4(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return TS(t);return!1},B4=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},ky=function(t,n){return!(n.disabled||N4(n)||V4(n,t)||M4(n)||B4(n))},Ny=function(t,n){return!($4(n)||PI(n)<0||!ky(t,n))},z4=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},RI=function(t){var n=[],r=[];return t.forEach(function(i,o){var a=!!i.scopeParent,s=a?i.scopeParent:i,u=T4(s,a),c=a?RI(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(k4).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:Ny.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:z4}):r=_I(t,n.includeContainer,Ny.bind(null,n)),RI(r)},W4=function(t,n){n=n||{};var r;return n.getShadowRoot?r=zd([t],n.includeContainer,{filter:ky.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):r=_I(t,n.includeContainer,ky.bind(null,n)),r},II=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return dl.call(t,Fd)===!1?!1:Ny(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 TI(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 kI(e){return TI(Xt(e).body,1)||e}function NI(e){return TI(Xt(e).body,-1)||e}function ku(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!ft(n,r)}function H4(e){nh(e,ic()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function kS(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 m0(e){const{enabled:t=!0,open:n,ref:r,onComplete:i}=e,o=Me(i),a=e4(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 uI(e.disposeEffect),e}let NS={},MS={},DS="";function U4(e){if(typeof document>"u")return!1;const t=Xt(e);return Nn(t).innerWidth-t.documentElement.clientWidth>0}function G4(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 q4(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 K4(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(vI&&(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,NS={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},DS=n.style.scrollBehavior,MS={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=G4(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,NS),Object.assign(r.style,MS),s||(n.scrollTop=o,n.scrollLeft=a,n.removeAttribute("data-base-ui-scroll-locked"),n.style.scrollBehavior=DS)}function p(){d(),u.request(c)}return c(),i.addEventListener("resize",p),()=>{u.cancel(),d(),typeof i.removeEventListener=="function"&&i.removeEventListener("resize",p)}}class Y4{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=yI||!U4(t);this.restore=o?q4(t):K4(t)}}const X4=new Y4;function Z4(e=!0,t=null){je(()=>{if(e)return X4.acquire(t)},[e,t])}function Xr(e){const t=ei(Q4,e).current;return t.next=e,je(t.effect),t}function Q4(e){const t={current:e,next:e,effect:()=>{t.current=t.next}};return t}function J4(){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 MI=x.createContext(null);process.env.NODE_ENV!=="production"&&(MI.displayName="FloatingNodeContext");const DI=x.createContext(null);process.env.NODE_ENV!=="production"&&(DI.displayName="FloatingTreeContext");const jI=()=>x.useContext(MI)?.id||null,rh=e=>{const t=x.useContext(DI);return e??t};function Wd(e){return`data-base-ui-${e}`}const LI={clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1},v0={...LI,position:"fixed",top:0,left:0},eq={...LI,position:"absolute"},Fu=x.forwardRef(function(t,n){const[r,i]=x.useState();je(()=>{l4&&i("button")},[]);const o={tabIndex:0,role:r};return O.jsx("span",{...t,ref:n,style:v0,"aria-hidden":r?void 0:!0,...o,"data-base-ui-focus-guard":""})});process.env.NODE_ENV!=="production"&&(Fu.displayName="FocusGuard");let jS=0;function Nu(e,t={}){const{preventScroll:n=!1,cancelPrevious:r=!0,sync:i=!1}=t;r&&cancelAnimationFrame(jS);const o=()=>e?.focus({preventScroll:n});i?o():jS=requestAnimationFrame(o)}const ol={inert:new WeakMap,"aria-hidden":new WeakMap,none:new WeakMap};function LS(e){return e==="inert"?ol.inert:e==="aria-hidden"?ol["aria-hidden"]:ol.none}let Vf=new WeakSet,Bf={},wm=0;const $I=e=>e&&(e.host||$I(e.parentNode)),tq=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=$I(n);return e.contains(r)?r:null}).filter(n=>n!=null);function nq(e,t,n,r){const i="data-base-ui-inert",o=r?"inert":n?"aria-hidden":null,a=tq(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=LS(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=LS(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 rq(e,t=!1,n=!1){const r=Xt(e[0]).body;return nq(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const y0=x.createContext(null);process.env.NODE_ENV!=="production"&&(y0.displayName="PortalContext");const FI=()=>x.useContext(y0),iq=Wd("portal");function oq(e={}){const{ref:t,container:n,componentProps:r=Xn,elementProps:i}=e,o=a0(),s=FI()?.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&&(u0(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,[iq]:""},i]});return{portalNode:d,portalSubtree:u&&y?la.createPortal(y,u):null}}const VI=x.forwardRef(function(t,n){const{children:r,container:i,className:o,render:a,renderGuards:s,...u}=t,{portalNode:c,portalSubtree:d}=oq({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"?kS:H4)(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||kS(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(y0.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;NI(R)?.focus()}}}),E&&c&&O.jsx("span",{"aria-owns":c.id,style:VG}),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;kI(R)?.focus(),b?.closeOnFocusOut&&b?.onOpenChange(!1,Xe(Kp,P.nativeEvent))}}})]})]})});process.env.NODE_ENV!=="production"&&(VI.displayName="FloatingPortal");function aq(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 $S=20;let Yo=[];function b0(){Yo=Yo.filter(e=>e.deref()?.isConnected)}function sq(e){b0(),e&&ca(e)!=="body"&&(Yo.push(new WeakRef(e)),Yo.length>$S&&(Yo=Yo.slice(-$S)))}function Cm(){return b0(),Yo[Yo.length-1]?.deref()}function lq(e){if(!e)return null;const t=ic();return II(e,t)?e:nh(e,t)[0]||e}function uq(e){return!e||!e.isConnected?!1:typeof e.checkVisibility=="function"?e.checkVisibility():Rr(e).display!=="none"}function FS(e,t){if(!t.current.includes("floating")&&!e.getAttribute("role")?.includes("dialog"))return;const n=ic(),i=W4(e,n).filter(a=>{const s=a.getAttribute("data-tabindex")||"";return II(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 cq(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=Ry(v)&&P,I=x.useRef(["content"]),k=Xr(i),B=Xr(o),L=Xr(c),V=rh(h),D=FI(),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=l0(),Fe=D!=null,Y=Iy(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(`[${$G}]`)&&(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))||OS(V.nodesRef.current,et).find(ot=>[ot.context?.elements.floating,Iy(ot.context?.elements.floating)].includes(le)||ot.context?.elements.domReference===le)));if(be===v&&Y&&FS(Y,I),a&&be!==v&&!uq(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?OS(V.nodesRef.current,_()):[]).find(fe=>Ry(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 rq(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);sq(Z);function Re(me){if(me.open||(pe.current=aq(me.nativeEvent,K.current)),me.reason===UG&&me.nativeEvent.type==="mouseleave"&&(te.current=!0),me.reason===o0)if(me.nested)te.current=!1;else if(wI(me.nativeEvent)||CI(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,v0),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=lq(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(!vI||b||!w)return;const ie=eo(Xt(w));!nn(ie)||!p0(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 FS(Y,I),()=>{queueMicrotask(b0)}},[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)?kI(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)?NI(v)?.focus():Qi(d??D.afterOutsideRef)?.focus())}})]})}function BI(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=Sy}=t,p=x.useRef(void 0),g=l0(),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"||PS(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(p0(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(PS(v)&&s)return;const w=n.select("open"),C=r.current.openEvent,E=n.select("domReferenceElement")!==b.currentTarget,_=w&&E||!(w&&a&&(!(C&&u)||SI(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 VS(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 fq(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=g0(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 dq=50,pq=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:a}=n,s=a.detectOverflow?a:{...a,detectOverflow:fq},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}=VS(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<dq&&(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}=VS(c,g,u)),b=-1)}return{x:d,y:p,placement:g,strategy:i,middlewareData:y}},hq=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=g0(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}}}),gq=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)]:b4(s)),R=y!=="none";!g&&R&&P.push(...S4(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=y4(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 BS(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function zS(e){return m4.some(t=>e[t]>=0)}const mq=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=BS(a,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:zS(s)}}}case"escaped":{const a=await r.detectOverflow(t,{...o,altBoundary:!0}),s=BS(a,n.floating);return{data:{escapedOffsets:s,escaped:zS(s)}}}default:return{}}}}},zI=new Set(["left","top"]);async function vq(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=zI.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 yq=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 vq(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}}}}},bq=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=h0(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}}}}}},xq=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=h0(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",_=zI.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}}}},wq=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 WI(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 x0(e){return Lt(e)?e:e.contextElement}function al(e){const t=x0(e);if(!nn(t))return Ii(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:o}=WI(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 Cq=Ii(0);function HI(e){const t=Nn(e);return!Zp()||!t.visualViewport?Cq:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Sq(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=x0(e);let a=Ii(1);t&&(r?Lt(r)&&(a=al(r)):a=al(e));const s=Sq(o,n,r)?HI(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=Oy(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=Oy(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 UI(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 Eq(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?UI(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 _q(e){return Array.from(e.getClientRects())}function Oq(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 WS=25;function Pq(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<=WS&&(o-=y)}else c<=WS&&(o+=c);return{width:o,height:a,x:s,y:u}}function Aq(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 HS(e,t,n){let r;if(t==="viewport")r=Pq(e,n);else if(t==="document")r=Oq(Vi(e));else if(Lt(t))r=Aq(t,n);else{const i=HI(e);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return $d(r)}function GI(e,t){const n=co(e);return n===t||!Lt(n)||ao(n)?!1:Rr(n).position==="fixed"||GI(n,t)}function Rq(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=c0(a);!u&&s.position==="fixed"&&(i=null),(o?!u&&!i:!u&&s.position==="static"&&!!i&&(i.position==="absolute"||i.position==="fixed")||fa(a)&&!u&&GI(e,a))?r=r.filter(d=>d!==a):i=s,a=co(a)}return t.set(e,r),r}function Iq(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const a=[...n==="clippingAncestors"?Xp(t)?[]:Rq(t,this._c):[].concat(n),r],s=HS(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=HS(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 Tq(e){const{width:t,height:n}=WI(e);return{width:t,height:n}}function kq(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?UI(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 US(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 qI(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=US(e,t);for(;r&&t4(r)&&Sm(r);)r=US(r,t);return r&&ao(r)&&Sm(r)&&!c0(r)?n:r||i4(e)||n}const Nq=async function(e){const t=this.getOffsetParent||qI,n=this.getDimensions,r=await n(e.floating);return{reference:kq(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Mq(e){return Rr(e).direction==="rtl"}const Dq={convertOffsetParentRelativeRectToViewportRelativeRect:Eq,getDocumentElement:Vi,getClippingRect:Iq,getOffsetParent:qI,getElementRects:Nq,getClientRects:_q,getDimensions:Tq,getScale:al,isElement:Lt,isRTL:Mq};function KI(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function jq(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&&!KI(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 My(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=x0(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?jq(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&&!KI(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 Lq=yq,$q=bq,Fq=gq,Vq=wq,Bq=mq,GS=hq,zq=xq,Wq=(e,t,n)=>{const r=new Map,i={platform:Dq,...n},o={...i.platform,_c:r};return pq(e,t,{...i,platform:o})};var Hq=typeof document<"u",Uq=function(){},Sd=Hq?j.useLayoutEffect:Uq;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 YI(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function qS(e,t){const n=YI(e);return Math.round(t*n)/n}function Em(e){const t=x.useRef(e);return Sd(()=>{t.current=e}),t}function XI(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),Wq(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=qS(G.floating,d.x),K=qS(G.floating,d.y);return s?{...Q,transform:"translate("+pe+"px, "+K+"px)",...YI(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 Gq=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?GS({element:r.current,padding:i}).fn(n):{}:r?GS({element:r,padding:i}).fn(n):{}}}},ZI=(e,t)=>{const n=Lq(e);return{name:n.name,fn:n.fn,options:[e,t]}},QI=(e,t)=>{const n=$q(e);return{name:n.name,fn:n.fn,options:[e,t]}},JI=(e,t)=>({fn:zq(e).fn,options:[e,t]}),eT=(e,t)=>{const n=Fq(e);return{name:n.name,fn:n.fn,options:[e,t]}},tT=(e,t)=>{const n=Vq(e);return{name:n.name,fn:n.fn,options:[e,t]}},nT=(e,t)=>{const n=Bq(e);return{name:n.name,fn:n.fn,options:[e,t]}},qq=(e,t)=>{const n=Gq(e);return{name:n.name,fn:n.fn,options:[e,t]}},Kq={intentional:"onClick",sloppy:"onPointerDown"};function Yq(e){return{escapeKey:typeof e=="boolean"?e:e?.escapeKey??!1,outsidePress:typeof e=="boolean"?e:e?.outsidePress??!0}}function Xq(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}=Yq(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=g4($)?$.nativeEvent:$,U=Xe(lI,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)&&!h4(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(o0,$)),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&&{[Kq[y]]:$=>{n.setOpen(!1,Xe(Sy,$.nativeEvent))},...y!=="intentional"&&{onClick($){n.setOpen(!1,Xe(Sy,$.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 Zq=(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:i})}}},Xq=(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.
21
+ Ensure transformation logic is in the result function, and extraction logic is in the input selectors.`,{stack:i})}}},Qq=(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:o,secondInputs:a,stack:c})}},Zq={inputStabilityCheck:"once",identityFunctionCheck:"once"},Ud=Symbol("NOT_FOUND");function Qq(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function Jq(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function e6(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 KS=e=>Array.isArray(e)?e:[e];function t6(e){const t=Array.isArray(e[0])?e[0]:e;return e6(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function YS(e,t){const n=[],{length:r}=e;for(let i=0;i<r;i++)n.push(e[i].apply(null,t));return n}var n6=(e,t)=>{const{identityFunctionCheck:n,inputStabilityCheck:r}={...Zq,...t};return{identityFunctionCheck:{shouldRun:n==="always"||n==="once"&&e,run:Yq},inputStabilityCheck:{shouldRun:r==="always"||r==="once"&&e,run:Xq}}};function r6(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 i6(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 o6=(e,t)=>e===t;function a6(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 s6(e,t){const n=typeof t=="object"?t:{equalityCheck:t},{equalityCheck:r=o6,maxSize:i=1,resultEqualityCheck:o}=n,a=a6(r);let s=0;const u=i<=1?r6(a):i6(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 l6=class{constructor(e){this.value=e}deref(){return this.value}},u6=typeof WeakRef<"u"?WeakRef:l6,c6=0,XS=1;function zf(){return{s:c6,v:void 0,o:null,p:null}}function rT(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===XS)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 u6(d):d}return c.s=XS,c.v=d,d}return a.clearCache=()=>{n=zf(),a.resetResultsCount()},a.resultsCount=()=>o,a.resetResultsCount=()=>{o=0},a}function iT(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()),Qq(c,`createSelector expects an output function after the inputs, but received: [${typeof c}]`);const d={...n,...u},{memoize:p,memoizeOptions:g=[],argsMemoize:h=rT,argsMemoizeOptions:y=[],devModeChecks:b={}}=d,v=KS(g),w=KS(y),C=t6(i),E=p(function(){return o++,c.apply(null,arguments)},...v);let _=!0;const P=h(function(){a++;const I=YS(C,arguments);if(s=E.apply(null,I),process.env.NODE_ENV!=="production"){const{identityFunctionCheck:k,inputStabilityCheck:B}=n6(_,b);if(k.shouldRun&&k.run(c,I,s),B.shouldRun){const L=YS(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=iT(rT),f6=Object.assign((e,t=q)=>{Jq(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:()=>f6});iT({memoize:s6,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 ZS;function d6(){if(ZS)return _m;ZS=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 QS;function p6(){return QS||(QS=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 JS;function w0(){return JS||(JS=1,process.env.NODE_ENV==="production"?Hf.exports=d6():Hf.exports=p6()),Hf.exports}var h6=w0(),Uf={exports:{}},Pm={};var eE;function g6(){if(eE)return Pm;eE=1;var e=j,t=w0();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 tE;function m6(){return tE||(tE=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=w0(),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 nE;function v6(){return nE||(nE=1,process.env.NODE_ENV==="production"?Uf.exports=g6():Uf.exports=m6()),Uf.exports}var oT=v6();const y6=i0(19),b6=y6?w6:C6;function he(e,t,n,r,i){return b6(e,t,n,r,i)}function x6(e,t,n,r,i){const o=x.useCallback(()=>t(e.getSnapshot(),n,r,i),[e,t,n,r,i]);return h6.useSyncExternalStore(e.subscribe,o,o)}function w6(e,t,n,r,i){return x6(e,t,n,r,i)}function C6(e,t,n,r,i){return oT.useSyncExternalStoreWithSelector(e.subscribe,e.getSnapshot,e.getSnapshot,o=>t(o,n,r,i))}class aT{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 S6 extends aT{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 E6={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 _6 extends S6{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:Z4(),nested:n,noEmit:r,triggerElements:o},E6)}setOpen=(t,n)=>{if((!t||!this.state.open||SI(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 O6{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 sT(e){const{open:t=!1,onOpenChange:n,elements:r={}}=e,i=a0(),o=jI()!=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 _6({open:t,onOpenChange:n,referenceElement:r.reference??null,floatingElement:r.floating??null,triggerElements:new O6,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 P6(e={}){const{nodeId:t,externalTree:n}=e,r=sT(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=XI({...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 A6(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[Ay]="");for(const a in e)i&&e&&(a===bI||a===xI)||(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&&rE(o,s,i,r)}return rE(o,e,i,r),o}function rE(e,t,n,r){for(const i in t){const o=t[i];n&&(i===bI||i===xI)||(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 R6="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===d0||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 I6(e,t,n){return oh(t,n?e===ea:e===ta,e===rc)}function T6(e,t,n,r){const i=n?e===ta:e===ea,o=e===d0;return t==="both"||t==="horizontal"&&r&&r>1?e===R6:oh(t,i,o)}function k6(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=Iy(i),D=Xr(V),H=jI(),J=rh(L);je(()=>{a.current.orientation=P},[a,P]);const te=Ry(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):IS(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&&T6(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=IS(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=E4(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[S4({current:et.map(ot=>ot!=null?s.current[ot]:null)},{event:de,orientation:P,loopFocus:h,rtl:b,cols:I,disabledIndices:O4([...(typeof _!="function"?_:null)||s.current.map((ot,kt)=>Tu(s,kt,_)?kt:void 0),void 0],et),minIndex:Tt,maxIndex:Dn,prevIndex:_4(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"&&wI(le.nativeEvent)&&(G.current=!v)}function ve(le){G.current=w,w==="auto"&&CI(le.nativeEvent)&&(G.current=!0)}return{onKeyDown(le){const be=n.select("open");pe.current=!1;const ke=le.key.startsWith("Arrow"),et=I6(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 N6(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 M6(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 D6(e){const[t,n]=x.useState(null),r=Me((s,u)=>{e||n(u||(yI?"touch":""))}),i=x.useCallback(()=>{n(null)},[]),{onClick:o,onPointerDown:a}=M6(r);return x.useMemo(()=>({openMethod:t,reset:i,triggerProps:{onClick:o,onPointerDown:a}}),[t,i,o,a])}let C0=(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})({}),Dy=(function(e){return e.popupOpen="data-popup-open",e.pressed="data-pressed",e})({});const j6={[Dy.popupOpen]:""},L6={[Dy.popupOpen]:"",[Dy.pressed]:""},$6={[C0.open]:""},F6={[C0.closed]:""},V6={[C0.anchorHidden]:""},B6={open(e){return e?j6:null}},z6={open(e){return e?L6:null}},lT={open(e){return e?$6:F6},anchorHidden(e){return e?V6:null}};function W6(e){return i0(19)?e:e?"true":void 0}const uT=x.forwardRef(function(t,n){const{cutout:r,...i}=t;let o;if(r){const a=r?.getBoundingClientRect();o=`polygon(
24
+ \`createSelector([state => state.todos.map(todo => todo.id)], todoIds => todoIds.length)\``,{arguments:n,firstInputs:o,secondInputs:a,stack:c})}},Jq={inputStabilityCheck:"once",identityFunctionCheck:"once"},Ud=Symbol("NOT_FOUND");function e6(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function t6(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function n6(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 KS=e=>Array.isArray(e)?e:[e];function r6(e){const t=Array.isArray(e[0])?e[0]:e;return n6(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function YS(e,t){const n=[],{length:r}=e;for(let i=0;i<r;i++)n.push(e[i].apply(null,t));return n}var i6=(e,t)=>{const{identityFunctionCheck:n,inputStabilityCheck:r}={...Jq,...t};return{identityFunctionCheck:{shouldRun:n==="always"||n==="once"&&e,run:Zq},inputStabilityCheck:{shouldRun:r==="always"||r==="once"&&e,run:Qq}}};function o6(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 a6(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 s6=(e,t)=>e===t;function l6(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 u6(e,t){const n=typeof t=="object"?t:{equalityCheck:t},{equalityCheck:r=s6,maxSize:i=1,resultEqualityCheck:o}=n,a=l6(r);let s=0;const u=i<=1?o6(a):a6(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 c6=class{constructor(e){this.value=e}deref(){return this.value}},f6=typeof WeakRef<"u"?WeakRef:c6,d6=0,XS=1;function zf(){return{s:d6,v:void 0,o:null,p:null}}function rT(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===XS)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 f6(d):d}return c.s=XS,c.v=d,d}return a.clearCache=()=>{n=zf(),a.resetResultsCount()},a.resultsCount=()=>o,a.resetResultsCount=()=>{o=0},a}function iT(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()),e6(c,`createSelector expects an output function after the inputs, but received: [${typeof c}]`);const d={...n,...u},{memoize:p,memoizeOptions:g=[],argsMemoize:h=rT,argsMemoizeOptions:y=[],devModeChecks:b={}}=d,v=KS(g),w=KS(y),C=r6(i),E=p(function(){return o++,c.apply(null,arguments)},...v);let _=!0;const P=h(function(){a++;const I=YS(C,arguments);if(s=E.apply(null,I),process.env.NODE_ENV!=="production"){const{identityFunctionCheck:k,inputStabilityCheck:B}=i6(_,b);if(k.shouldRun&&k.run(c,I,s),B.shouldRun){const L=YS(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=iT(rT),p6=Object.assign((e,t=q)=>{t6(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:()=>p6});iT({memoize:u6,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 ZS;function h6(){if(ZS)return _m;ZS=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 QS;function g6(){return QS||(QS=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 JS;function w0(){return JS||(JS=1,process.env.NODE_ENV==="production"?Hf.exports=h6():Hf.exports=g6()),Hf.exports}var m6=w0(),Uf={exports:{}},Pm={};var eE;function v6(){if(eE)return Pm;eE=1;var e=j,t=w0();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 tE;function y6(){return tE||(tE=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=w0(),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 nE;function b6(){return nE||(nE=1,process.env.NODE_ENV==="production"?Uf.exports=v6():Uf.exports=y6()),Uf.exports}var oT=b6();const x6=i0(19),w6=x6?S6:E6;function he(e,t,n,r,i){return w6(e,t,n,r,i)}function C6(e,t,n,r,i){const o=x.useCallback(()=>t(e.getSnapshot(),n,r,i),[e,t,n,r,i]);return m6.useSyncExternalStore(e.subscribe,o,o)}function S6(e,t,n,r,i){return C6(e,t,n,r,i)}function E6(e,t,n,r,i){return oT.useSyncExternalStoreWithSelector(e.subscribe,e.getSnapshot,e.getSnapshot,o=>t(o,n,r,i))}class aT{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 _6 extends aT{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 O6={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 P6 extends _6{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:J4(),nested:n,noEmit:r,triggerElements:o},O6)}setOpen=(t,n)=>{if((!t||!this.state.open||SI(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 A6{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 sT(e){const{open:t=!1,onOpenChange:n,elements:r={}}=e,i=a0(),o=jI()!=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 P6({open:t,onOpenChange:n,referenceElement:r.reference??null,floatingElement:r.floating??null,triggerElements:new A6,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 R6(e={}){const{nodeId:t,externalTree:n}=e,r=sT(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=XI({...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 I6(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[Ay]="");for(const a in e)i&&e&&(a===bI||a===xI)||(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&&rE(o,s,i,r)}return rE(o,e,i,r),o}function rE(e,t,n,r){for(const i in t){const o=t[i];n&&(i===bI||i===xI)||(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 T6="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===d0||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 k6(e,t,n){return oh(t,n?e===ea:e===ta,e===rc)}function N6(e,t,n,r){const i=n?e===ta:e===ea,o=e===d0;return t==="both"||t==="horizontal"&&r&&r>1?e===T6:oh(t,i,o)}function M6(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=Iy(i),D=Xr(V),H=jI(),J=rh(L);je(()=>{a.current.orientation=P},[a,P]);const te=Ry(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):IS(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&&N6(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=IS(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=O4(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[_4({current:et.map(ot=>ot!=null?s.current[ot]:null)},{event:de,orientation:P,loopFocus:h,rtl:b,cols:I,disabledIndices:A4([...(typeof _!="function"?_:null)||s.current.map((ot,kt)=>Tu(s,kt,_)?kt:void 0),void 0],et),minIndex:Tt,maxIndex:Dn,prevIndex:P4(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"&&wI(le.nativeEvent)&&(G.current=!v)}function ve(le){G.current=w,w==="auto"&&CI(le.nativeEvent)&&(G.current=!0)}return{onKeyDown(le){const be=n.select("open");pe.current=!1;const ke=le.key.startsWith("Arrow"),et=k6(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 D6(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 j6(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 L6(e){const[t,n]=x.useState(null),r=Me((s,u)=>{e||n(u||(yI?"touch":""))}),i=x.useCallback(()=>{n(null)},[]),{onClick:o,onPointerDown:a}=j6(r);return x.useMemo(()=>({openMethod:t,reset:i,triggerProps:{onClick:o,onPointerDown:a}}),[t,i,o,a])}let C0=(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})({}),Dy=(function(e){return e.popupOpen="data-popup-open",e.pressed="data-pressed",e})({});const $6={[Dy.popupOpen]:""},F6={[Dy.popupOpen]:"",[Dy.pressed]:""},V6={[C0.open]:""},B6={[C0.closed]:""},z6={[C0.anchorHidden]:""},W6={open(e){return e?$6:null}},H6={open(e){return e?F6:null}},lT={open(e){return e?V6:B6},anchorHidden(e){return e?z6:null}};function U6(e){return i0(19)?e:e?"true":void 0}const uT=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,28 +32,28 @@ 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 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"&&(uT.displayName="InternalBackdrop");function H6(e){const t=x.useRef(!0);t.current&&(t.current=!1,e())}const S0=x.createContext(void 0);process.env.NODE_ENV!=="production"&&(S0.displayName="ComboboxRootContext");const E0=x.createContext(void 0);process.env.NODE_ENV!=="production"&&(E0.displayName="ComboboxFloatingContext");const _0=x.createContext(void 0);process.env.NODE_ENV!=="production"&&(_0.displayName="ComboboxDerivedItemsContext");const O0=x.createContext("");process.env.NODE_ENV!=="production"&&(O0.displayName="ComboboxInputValueContext");function Nr(){const e=x.useContext(S0);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(E0);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(_0);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 P0(){return x.useContext(O0)}const U6=(e,t)=>Object.is(e,t);function Qa(e,t,n){return e==null||t==null?Object.is(e,t):n(e,t)}function G6(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 q6(e,t,n){return e.filter(r=>!Qa(t,r,n))}function jy(e){if(e==null)return"";if(typeof e=="string")return e;try{return JSON.stringify(e)}catch{return String(e)}}function A0(e){return e!=null&&e.length>0&&typeof e[0]=="object"&&e[0]!=null&&"items"in e[0]}function K6(e){if(!Array.isArray(e))return e!=null&&!("null"in e);if(A0(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 jy(e)}function uu(e,t){return t&&e!=null?t(e)??"":e&&typeof e=="object"&&"value"in e&&"label"in e?jy(e.value):jy(e)}function cT(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=A0(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 Y6(e,t,n){return e.reduce((r,i,o)=>(o>0&&r.push(", "),r.push(O.jsx(x.Fragment,{children:cT(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?K6(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 iE=(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 X6={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},Z6={valid(e){return e===null?null:e?{[iE.valid]:""}:{[iE.invalid]:""}}},fT=x.createContext({invalid:void 0,name:void 0,validityData:{state:X6,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"&&(fT.displayName="FieldRootContext");function oc(e=!0){const t=x.useContext(fT);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 Q6(e,t){return{...e,state:{...e.state,valid:!t&&e.state.valid}}}const dT=x.createContext({formRef:{current:{fields:new Map}},errors:{},clearErrors:Wt,validationMode:"onSubmit",submitAttemptedRef:{current:!1}});process.env.NODE_ENV!=="production"&&(dT.displayName="FormContext");function pT(){return x.useContext(dT)}function J6(e){const{enabled:t=!0,value:n,id:r,name:i,controlRef:o,commit:a}=e,{formRef:s}=pT(),{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:Q6(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 hT=x.createContext({controlId:void 0,registerControlId:Wt,labelId:void 0,setLabelId:Wt,messageIds:[],setMessageIds:Wt,getDescriptionProps:e=>e});process.env.NODE_ENV!=="production"&&(hT.displayName="LabelableContext");function R0(){return x.useContext(hT)}function gT(e={}){const{id:t,implicit:n=!1,controlRef:r}=e,{controlId:i,registerControlId:o}=R0(),a=s0(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 eK(e,t){return(n,r)=>{if(n==null)return!1;const i=sr(n,t);return e.contains(i,r)}}function tK(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 oE=new Map;function mT(e){return Array.isArray(e)?e.map(t=>mT(t)).join(","):e==null?"":String(e)}function nK(e={}){const t={usage:"search",sensitivity:"base",ignorePunctuation:!0,...e},n=`${mT(e.locale)}|${JSON.stringify(t)}`,r=oE.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 oE.set(n,o),o}const rK=nK;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 vT=Symbol("none"),Na={value:vT,index:-1};function iK(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=U6,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}=pT(),{setDirty:Ae,validityData:Se,shouldValidateOnChange:$e,setFilled:we,name:Ce,disabled:ze,setTouched:Ke,setFocused:Fe,validationMode:Y,validation:oe}=oc(),ne=gT({id:t}),$=rK({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?tK($,k,Ve):eK($,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=A0(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 aT({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}=fI($t),{openMethod:jc,triggerProps:Vl,reset:Lc}=D6($t);J6({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===o0)&&(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(HG,en),bi=Bt?.closest("a")?.getAttribute("href");if(bi){bi.startsWith("#")&&xa(!1,tn);return}if(Qt){const Bi=Array.isArray(Ve)?Ve:[],lg=G6(Bi,Ze,rt.state.isItemEqualToValue)?q6(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]);m0({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!==vT&&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=sT({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=BI(_s,{enabled:!g&&!on&&E,event:"mousedown-only",toggle:!1,touchOpenDelay:yi?0:50,reason:GG}),Bc=Kq(_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=k6(_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}=A6([Vc,ag,Bc,zc]);H6(()=>{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?Q4:v0,tabIndex:-1,"aria-hidden":!0}),sg]});return O.jsx(S0.Provider,{value:rt,children:O.jsx(E0.Provider,{value:_s,children:O.jsx(_0.Provider,{value:Hl,children:O.jsx(O0.Provider,{value:Jt,children:Hc})})})})}const yT={...z6,...Z6,popupSide:e=>e?{"data-popup-side":e}:null,listEmpty:e=>e?{"data-list-empty":""}:null};function oK(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,bT=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}=R0(),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=P0(),Ae=Xa(),Se=d||E||a,$e=w.length===0,we=R&&k?I:null;gT({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}=N6(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}=BI(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=oK(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:yT})});process.env.NODE_ENV!=="production"&&(bT.displayName="ComboboxTrigger");const I0=x.createContext(void 0);process.env.NODE_ENV!=="production"&&(I0.displayName="ComboboxChipsContext");function xT(){return x.useContext(I0)}const T0=x.createContext(void 0);process.env.NODE_ENV!=="production"&&(T0.displayName="ComboboxPositionerContext");function k0(e){const t=x.useContext(T0);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 N0=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}=R0(),b=xT(),w=!!k0(!0),C=Nr(),{filteredItems:E}=da(),_=P0(),P=nI(),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=s0(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=_S&&de?fe.value.length:0;fe.setSelectionRange(be,be),fe.scrollLeft=0;return}if(U.key==="End"){jt(U);const be=_S&&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(lI,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:yT})});process.env.NODE_ENV!=="production"&&(N0.displayName="ComboboxInput");const aK={...cI,...B6},wT=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=P0();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}=fI(C),B={disabled:E,open:y,transitionStatus:I};m0({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(xS,D.nativeEvent)),p!=="none"?(d.state.setSelectedValue(Array.isArray(b)?[]:null,Xe(xS,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:aK});return s||R?L:null});process.env.NODE_ENV!=="production"&&(wT.displayName="ComboboxClear");const M0=x.createContext(null);process.env.NODE_ENV!=="production"&&(M0.displayName="GroupCollectionContext");function sK(){return x.useContext(M0)}function lK(e){const{children:t,items:n}=e,r=x.useMemo(()=>({items:n}),[n]);return O.jsx(M0.Provider,{value:r,children:t})}function CT(e){const{children:t}=e,{filteredItems:n}=da(),r=sK(),i=r?r.items:n;return i?O.jsx(x.Fragment,{children:i.map(t)}):null}const ST=x.forwardRef(function(t,n){var r;const{render:i,className:o,children:a,...s}=t,u=Nr(),c=ah(),d=!!k0(!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(CT,{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(eI,{elementsRef:y,labelsRef:g?void 0:h,children:D})});process.env.NODE_ENV!=="production"&&(ST.displayName="ComboboxList");const D0=x.createContext(void 0);process.env.NODE_ENV!=="production"&&(D0.displayName="ComboboxPortalContext");function uK(){const e=x.useContext(D0);if(e===void 0)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: <Combobox.Portal> is missing.":pi(20));return e}const ET=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(D0.Provider,{value:r,children:O.jsx(VI,{ref:n,...i})}):null});process.env.NODE_ENV!=="production"&&(ET.displayName="ComboboxPortal");const cK=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=g0(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}}}),fK=(e,t)=>({...cK(e),options:[e,t]}),dK={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 nT().fn(e)).data?.referenceHidden||o}}}},pK={sideX:"left",sideY:"top"};function _T(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 aE(e,t,n){const{rects:r,placement:i}=e;return{side:_T(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 hK(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=nI()==="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=[ZI(pt=>{const ht=aE(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:eT({...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:QI(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:JI(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(tT({...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`)}}),fK(()=>({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(aE(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),{}}},dK,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}=P6({rootContext:h,placement:ee,middleware:oe,strategy:n,whileElementsMounted:g?void 0:(...pt)=>My(...pt,Re),nodeId:w,externalTree:_}),{sideX:Dn,sideY:Ct}=ve.adaptiveOrigin||pK,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=(sE(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"&&sE(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 My(fe.domReference,fe.floating,le,Re)},[g,y,fe,le,Re]);const on=Ar(be),_n=_T(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 sE(e){return e!=null&&"current"in e}function OT(e){return e==="starting"?DG:Xn}const PT=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=LG,...w}=t,C=Nr(),{filteredItems:E}=da(),_=ah(),P=uK(),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=hK({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});Y4(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,OT(H),w],stateAttributesMapping:lT});return O.jsxs(T0.Provider,{value:pe,children:[k&&R&&O.jsx(uT,{inert:W6(!I),cutout:V??L}),Ae]})});process.env.NODE_ENV!=="production"&&(PT.displayName="ComboboxPositioner");const gK={...lT,...cI},AT=x.forwardRef(function(t,n){const{render:r,className:i,initialFocus:o,finalFocus:a,...s}=t,u=Nr(),c=k0(),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;m0({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()}},OT(b),s],stateAttributesMapping:gK}),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(lq,{context:d,disabled:!g,modal:!v,openInteractionType:y,initialFocus:R,returnFocus:I,children:_})});process.env.NODE_ENV!=="production"&&(AT.displayName="ComboboxPopup");const j0=x.createContext(void 0);process.env.NODE_ENV!=="production"&&(j0.displayName="ComboboxGroupContext");function mK(){const e=x.useContext(j0);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 RT=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(j0.Provider,{value:c,children:d});return o?O.jsx(lK,{items:o,children:p}):p});process.env.NODE_ENV!=="production"&&(RT.displayName="ComboboxGroup");const IT=x.forwardRef(function(t,n){const{render:r,className:i,id:o,...a}=t,{setLabelId:s}=mK(),u=s0(o);return je(()=>(s(u),()=>{s(void 0)}),[u,s]),er("div",t,{ref:n,props:[{id:u},a]})});process.env.NODE_ENV!=="production"&&(IT.displayName="ComboboxGroupLabel");const TT=x.createContext(void 0);process.env.NODE_ENV!=="production"&&(TT.displayName="ComboboxItemContext");const kT=x.createContext(!1);process.env.NODE_ENV!=="production"&&(kT.displayName="ComboboxRowContext");function vK(){return x.useContext(kT)}const NT=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=pI({index:a,textRef:p,indexGuessBehavior:dI.GuessFromOrder}),h=Nr(),y=vK(),{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(TT.Provider,{value:$e,children:Se})}));process.env.NODE_ENV!=="production"&&(NT.displayName="ComboboxItem");const MT=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"&&(MT.displayName="ComboboxEmpty");const DT=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"&&(DT.displayName="Separator");function yK(e){const{multiple:t=!1,defaultValue:n,value:r,onValueChange:i,autoComplete:o,...a}=e;return O.jsx(iK,{...a,selectionMode:t?"multiple":"single",selectedValue:r,defaultSelectedValue:n,onSelectedValueChange:i,formAutoComplete:o})}function bK(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=Y6(o,a,i):p=cT(o,a,i),O.jsx(x.Fragment,{children:p})}const jT=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(I0.Provider,{value:h,children:O.jsx(eI,{elementsRef:p,children:g})})});process.env.NODE_ENV!=="production"&&(jT.displayName="ComboboxChips");const L0=x.createContext(void 0);process.env.NODE_ENV!=="production"&&(L0.displayName="ComboboxChipContext");function xK(){const e=x.useContext(L0);if(!e)throw new Error(process.env.NODE_ENV!=="production"?"useComboboxChipContext must be used within a ComboboxChip":pi(17));return e}const LT=x.forwardRef(function(t,n){const{render:r,className:i,...o}=t,a=Nr(),{setHighlightedChipIndex:s,chipsRef:u}=xT(),c=he(a,ge.disabled),d=he(a,ge.readOnly),p=he(a,ge.selectedValue),{ref:g,index:h}=pI();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(L0.Provider,{value:w,children:v})});process.env.NODE_ENV!=="production"&&(LT.displayName="ComboboxChip");const $T=x.forwardRef(function(t,n){const{render:r,className:i,disabled:o=!1,nativeButton:a=!0,...s}=t,u=Nr(),{index:c}=xK(),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(UG,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"&&($T.displayName="ComboboxChipRemove");var wK=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],sh=wK.reduce((e,t)=>{const n=NR(`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}},{}),CK="Label",FT=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())}}));FT.displayName=CK;var VT=FT;const SK=xt(dn("body-sm-regular")),Vu=({className:e,ref:t,...n})=>O.jsx(VT,{ref:t,className:ue(SK(),e),...n});Vu.displayName=VT.displayName;var EK="Separator",lE="horizontal",_K=["horizontal","vertical"],BT=x.forwardRef((e,t)=>{const{decorative:n,orientation:r=lE,...i}=e,o=OK(r)?r:lE,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})});BT.displayName=EK;function OK(e){return _K.includes(e)}var zT=BT;const $0=({className:e,orientation:t="horizontal",decorative:n=!0,ref:r,...i})=>O.jsx(zT,{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});$0.displayName=zT.displayName;const PK=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"}}),AK="flex flex-col gap-6 has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3",RK="mb-3 font-medium data-[variant=legend]:text-base data-[variant=label]:text-sm",IK="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",TK="group/field-content flex flex-1 flex-col gap-2",kK=[`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"&&(uT.displayName="InternalBackdrop");function G6(e){const t=x.useRef(!0);t.current&&(t.current=!1,e())}const S0=x.createContext(void 0);process.env.NODE_ENV!=="production"&&(S0.displayName="ComboboxRootContext");const E0=x.createContext(void 0);process.env.NODE_ENV!=="production"&&(E0.displayName="ComboboxFloatingContext");const _0=x.createContext(void 0);process.env.NODE_ENV!=="production"&&(_0.displayName="ComboboxDerivedItemsContext");const O0=x.createContext("");process.env.NODE_ENV!=="production"&&(O0.displayName="ComboboxInputValueContext");function Nr(){const e=x.useContext(S0);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(E0);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(_0);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 P0(){return x.useContext(O0)}const q6=(e,t)=>Object.is(e,t);function Qa(e,t,n){return e==null||t==null?Object.is(e,t):n(e,t)}function K6(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 Y6(e,t,n){return e.filter(r=>!Qa(t,r,n))}function jy(e){if(e==null)return"";if(typeof e=="string")return e;try{return JSON.stringify(e)}catch{return String(e)}}function A0(e){return e!=null&&e.length>0&&typeof e[0]=="object"&&e[0]!=null&&"items"in e[0]}function X6(e){if(!Array.isArray(e))return e!=null&&!("null"in e);if(A0(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 jy(e)}function uu(e,t){return t&&e!=null?t(e)??"":e&&typeof e=="object"&&"value"in e&&"label"in e?jy(e.value):jy(e)}function cT(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=A0(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 Z6(e,t,n){return e.reduce((r,i,o)=>(o>0&&r.push(", "),r.push(O.jsx(x.Fragment,{children:cT(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?X6(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 iE=(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 Q6={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},J6={valid(e){return e===null?null:e?{[iE.valid]:""}:{[iE.invalid]:""}}},fT=x.createContext({invalid:void 0,name:void 0,validityData:{state:Q6,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"&&(fT.displayName="FieldRootContext");function oc(e=!0){const t=x.useContext(fT);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 eK(e,t){return{...e,state:{...e.state,valid:!t&&e.state.valid}}}const dT=x.createContext({formRef:{current:{fields:new Map}},errors:{},clearErrors:Wt,validationMode:"onSubmit",submitAttemptedRef:{current:!1}});process.env.NODE_ENV!=="production"&&(dT.displayName="FormContext");function pT(){return x.useContext(dT)}function tK(e){const{enabled:t=!0,value:n,id:r,name:i,controlRef:o,commit:a}=e,{formRef:s}=pT(),{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:eK(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 hT=x.createContext({controlId:void 0,registerControlId:Wt,labelId:void 0,setLabelId:Wt,messageIds:[],setMessageIds:Wt,getDescriptionProps:e=>e});process.env.NODE_ENV!=="production"&&(hT.displayName="LabelableContext");function R0(){return x.useContext(hT)}function gT(e={}){const{id:t,implicit:n=!1,controlRef:r}=e,{controlId:i,registerControlId:o}=R0(),a=s0(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 nK(e,t){return(n,r)=>{if(n==null)return!1;const i=sr(n,t);return e.contains(i,r)}}function rK(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 oE=new Map;function mT(e){return Array.isArray(e)?e.map(t=>mT(t)).join(","):e==null?"":String(e)}function iK(e={}){const t={usage:"search",sensitivity:"base",ignorePunctuation:!0,...e},n=`${mT(e.locale)}|${JSON.stringify(t)}`,r=oE.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 oE.set(n,o),o}const oK=iK;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 vT=Symbol("none"),Na={value:vT,index:-1};function aK(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=q6,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}=pT(),{setDirty:Ae,validityData:Se,shouldValidateOnChange:$e,setFilled:we,name:Ce,disabled:ze,setTouched:Ke,setFocused:Fe,validationMode:Y,validation:oe}=oc(),ne=gT({id:t}),$=oK({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?rK($,k,Ve):nK($,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=A0(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 aT({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}=fI($t),{openMethod:jc,triggerProps:Vl,reset:Lc}=L6($t);tK({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===o0)&&(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(GG,en),bi=Bt?.closest("a")?.getAttribute("href");if(bi){bi.startsWith("#")&&xa(!1,tn);return}if(Qt){const Bi=Array.isArray(Ve)?Ve:[],lg=K6(Bi,Ze,rt.state.isItemEqualToValue)?Y6(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]);m0({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!==vT&&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=sT({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=BI(_s,{enabled:!g&&!on&&E,event:"mousedown-only",toggle:!1,touchOpenDelay:yi?0:50,reason:KG}),Bc=Xq(_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=M6(_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}=I6([Vc,ag,Bc,zc]);G6(()=>{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?eq:v0,tabIndex:-1,"aria-hidden":!0}),sg]});return O.jsx(S0.Provider,{value:rt,children:O.jsx(E0.Provider,{value:_s,children:O.jsx(_0.Provider,{value:Hl,children:O.jsx(O0.Provider,{value:Jt,children:Hc})})})})}const yT={...H6,...J6,popupSide:e=>e?{"data-popup-side":e}:null,listEmpty:e=>e?{"data-list-empty":""}:null};function sK(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,bT=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}=R0(),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=P0(),Ae=Xa(),Se=d||E||a,$e=w.length===0,we=R&&k?I:null;gT({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}=D6(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}=BI(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=sK(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:yT})});process.env.NODE_ENV!=="production"&&(bT.displayName="ComboboxTrigger");const I0=x.createContext(void 0);process.env.NODE_ENV!=="production"&&(I0.displayName="ComboboxChipsContext");function xT(){return x.useContext(I0)}const T0=x.createContext(void 0);process.env.NODE_ENV!=="production"&&(T0.displayName="ComboboxPositionerContext");function k0(e){const t=x.useContext(T0);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 N0=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}=R0(),b=xT(),w=!!k0(!0),C=Nr(),{filteredItems:E}=da(),_=P0(),P=nI(),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=s0(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=_S&&de?fe.value.length:0;fe.setSelectionRange(be,be),fe.scrollLeft=0;return}if(U.key==="End"){jt(U);const be=_S&&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(lI,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:yT})});process.env.NODE_ENV!=="production"&&(N0.displayName="ComboboxInput");const lK={...cI,...W6},wT=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=P0();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}=fI(C),B={disabled:E,open:y,transitionStatus:I};m0({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(xS,D.nativeEvent)),p!=="none"?(d.state.setSelectedValue(Array.isArray(b)?[]:null,Xe(xS,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:lK});return s||R?L:null});process.env.NODE_ENV!=="production"&&(wT.displayName="ComboboxClear");const M0=x.createContext(null);process.env.NODE_ENV!=="production"&&(M0.displayName="GroupCollectionContext");function uK(){return x.useContext(M0)}function cK(e){const{children:t,items:n}=e,r=x.useMemo(()=>({items:n}),[n]);return O.jsx(M0.Provider,{value:r,children:t})}function CT(e){const{children:t}=e,{filteredItems:n}=da(),r=uK(),i=r?r.items:n;return i?O.jsx(x.Fragment,{children:i.map(t)}):null}const ST=x.forwardRef(function(t,n){var r;const{render:i,className:o,children:a,...s}=t,u=Nr(),c=ah(),d=!!k0(!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(CT,{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(eI,{elementsRef:y,labelsRef:g?void 0:h,children:D})});process.env.NODE_ENV!=="production"&&(ST.displayName="ComboboxList");const D0=x.createContext(void 0);process.env.NODE_ENV!=="production"&&(D0.displayName="ComboboxPortalContext");function fK(){const e=x.useContext(D0);if(e===void 0)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: <Combobox.Portal> is missing.":pi(20));return e}const ET=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(D0.Provider,{value:r,children:O.jsx(VI,{ref:n,...i})}):null});process.env.NODE_ENV!=="production"&&(ET.displayName="ComboboxPortal");const dK=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=g0(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}}}),pK=(e,t)=>({...dK(e),options:[e,t]}),hK={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 nT().fn(e)).data?.referenceHidden||o}}}},gK={sideX:"left",sideY:"top"};function _T(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 aE(e,t,n){const{rects:r,placement:i}=e;return{side:_T(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 mK(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=nI()==="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=[ZI(pt=>{const ht=aE(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:eT({...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:QI(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:JI(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(tT({...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`)}}),pK(()=>({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(aE(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),{}}},hK,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}=R6({rootContext:h,placement:ee,middleware:oe,strategy:n,whileElementsMounted:g?void 0:(...pt)=>My(...pt,Re),nodeId:w,externalTree:_}),{sideX:Dn,sideY:Ct}=ve.adaptiveOrigin||gK,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=(sE(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"&&sE(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 My(fe.domReference,fe.floating,le,Re)},[g,y,fe,le,Re]);const on=Ar(be),_n=_T(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 sE(e){return e!=null&&"current"in e}function OT(e){return e==="starting"?LG:Xn}const PT=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=FG,...w}=t,C=Nr(),{filteredItems:E}=da(),_=ah(),P=fK(),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=mK({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});Z4(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,OT(H),w],stateAttributesMapping:lT});return O.jsxs(T0.Provider,{value:pe,children:[k&&R&&O.jsx(uT,{inert:U6(!I),cutout:V??L}),Ae]})});process.env.NODE_ENV!=="production"&&(PT.displayName="ComboboxPositioner");const vK={...lT,...cI},AT=x.forwardRef(function(t,n){const{render:r,className:i,initialFocus:o,finalFocus:a,...s}=t,u=Nr(),c=k0(),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;m0({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()}},OT(b),s],stateAttributesMapping:vK}),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(cq,{context:d,disabled:!g,modal:!v,openInteractionType:y,initialFocus:R,returnFocus:I,children:_})});process.env.NODE_ENV!=="production"&&(AT.displayName="ComboboxPopup");const j0=x.createContext(void 0);process.env.NODE_ENV!=="production"&&(j0.displayName="ComboboxGroupContext");function yK(){const e=x.useContext(j0);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 RT=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(j0.Provider,{value:c,children:d});return o?O.jsx(cK,{items:o,children:p}):p});process.env.NODE_ENV!=="production"&&(RT.displayName="ComboboxGroup");const IT=x.forwardRef(function(t,n){const{render:r,className:i,id:o,...a}=t,{setLabelId:s}=yK(),u=s0(o);return je(()=>(s(u),()=>{s(void 0)}),[u,s]),er("div",t,{ref:n,props:[{id:u},a]})});process.env.NODE_ENV!=="production"&&(IT.displayName="ComboboxGroupLabel");const TT=x.createContext(void 0);process.env.NODE_ENV!=="production"&&(TT.displayName="ComboboxItemContext");const kT=x.createContext(!1);process.env.NODE_ENV!=="production"&&(kT.displayName="ComboboxRowContext");function bK(){return x.useContext(kT)}const NT=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=pI({index:a,textRef:p,indexGuessBehavior:dI.GuessFromOrder}),h=Nr(),y=bK(),{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(TT.Provider,{value:$e,children:Se})}));process.env.NODE_ENV!=="production"&&(NT.displayName="ComboboxItem");const MT=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"&&(MT.displayName="ComboboxEmpty");const DT=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"&&(DT.displayName="Separator");function xK(e){const{multiple:t=!1,defaultValue:n,value:r,onValueChange:i,autoComplete:o,...a}=e;return O.jsx(aK,{...a,selectionMode:t?"multiple":"single",selectedValue:r,defaultSelectedValue:n,onSelectedValueChange:i,formAutoComplete:o})}function wK(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=Z6(o,a,i):p=cT(o,a,i),O.jsx(x.Fragment,{children:p})}const jT=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(I0.Provider,{value:h,children:O.jsx(eI,{elementsRef:p,children:g})})});process.env.NODE_ENV!=="production"&&(jT.displayName="ComboboxChips");const L0=x.createContext(void 0);process.env.NODE_ENV!=="production"&&(L0.displayName="ComboboxChipContext");function CK(){const e=x.useContext(L0);if(!e)throw new Error(process.env.NODE_ENV!=="production"?"useComboboxChipContext must be used within a ComboboxChip":pi(17));return e}const LT=x.forwardRef(function(t,n){const{render:r,className:i,...o}=t,a=Nr(),{setHighlightedChipIndex:s,chipsRef:u}=xT(),c=he(a,ge.disabled),d=he(a,ge.readOnly),p=he(a,ge.selectedValue),{ref:g,index:h}=pI();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(L0.Provider,{value:w,children:v})});process.env.NODE_ENV!=="production"&&(LT.displayName="ComboboxChip");const $T=x.forwardRef(function(t,n){const{render:r,className:i,disabled:o=!1,nativeButton:a=!0,...s}=t,u=Nr(),{index:c}=CK(),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(qG,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"&&($T.displayName="ComboboxChipRemove");var SK=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],sh=SK.reduce((e,t)=>{const n=NR(`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}},{}),EK="Label",FT=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())}}));FT.displayName=EK;var VT=FT;const _K=xt(dn("body-sm-regular")),Vu=({className:e,ref:t,...n})=>O.jsx(VT,{ref:t,className:ue(_K(),e),...n});Vu.displayName=VT.displayName;var OK="Separator",lE="horizontal",PK=["horizontal","vertical"],BT=x.forwardRef((e,t)=>{const{decorative:n,orientation:r=lE,...i}=e,o=AK(r)?r:lE,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})});BT.displayName=OK;function AK(e){return PK.includes(e)}var zT=BT;const $0=({className:e,orientation:t="horizontal",decorative:n=!0,ref:r,...i})=>O.jsx(zT,{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});$0.displayName=zT.displayName;const RK=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"}}),IK="flex flex-col gap-6 has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3",TK="mb-3 font-medium data-[variant=legend]:text-base data-[variant=label]:text-sm",kK="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",NK="group/field-content flex flex-1 flex-col gap-2",MK=[`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(" "),NK=[`text-primary-text flex w-fit items-center gap-2
42
- group-data-[disabled=true]/field:opacity-50`,dn("body-sm-regular")].join(" "),MK=["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(" "),DK="relative -my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2",jK="absolute inset-0 top-1/2",LK="bg-background text-muted-foreground relative mx-auto block w-fit px-2",$K="ml-4 flex list-disc flex-col gap-1",FK="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(AK,e,"min-w-0 flex-1 w-full"),...t})}function VK({className:e,variant:t="legend",...n}){return O.jsx("legend",{"data-slot":"field-legend","data-variant":t,className:ue(RK,e),...n})}function ac({className:e,...t}){return O.jsx("div",{"data-slot":"field-group",className:ue(IK,e),...t})}function sc({className:e,orientation:t="vertical",...n}){return O.jsx("div",{role:"group","data-slot":"field","data-orientation":t,className:ue(PK({orientation:t}),e),...n})}function BK({className:e,...t}){return O.jsx("div",{"data-slot":"field-content",className:ue(TK,e),...t})}function El({className:e,...t}){return O.jsx(Vu,{"data-slot":"field-label",className:ue(kK,e),...t})}function zK({className:e,...t}){return O.jsx("div",{"data-slot":"field-label",className:ue(NK,e),...t})}function lc({className:e,...t}){return O.jsx("p",{"data-slot":"field-description",className:ue(MK,e),...t})}function WK({children:e,className:t,...n}){return O.jsxs("div",{"data-slot":"field-separator","data-content":!!e,className:ue(DK,t),...n,children:[O.jsx($0,{className:jK}),e&&O.jsx("span",{className:LK,"data-slot":"field-separator-content",children:e})]})}function WT({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:$K,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(FK,e),...r,children:i}):null}const HK=xt(`text-primary-text hover:border-inp-hover-border focus:border-inp-focus-border
41
+ dark:has-data-[state=checked]:bg-primary/10`].join(" "),DK=[`text-primary-text flex w-fit items-center gap-2
42
+ group-data-[disabled=true]/field:opacity-50`,dn("body-sm-regular")].join(" "),jK=["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(" "),LK="relative -my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2",$K="absolute inset-0 top-1/2",FK="bg-background text-muted-foreground relative mx-auto block w-fit px-2",VK="ml-4 flex list-disc flex-col gap-1",BK="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(IK,e,"min-w-0 flex-1 w-full"),...t})}function zK({className:e,variant:t="legend",...n}){return O.jsx("legend",{"data-slot":"field-legend","data-variant":t,className:ue(TK,e),...n})}function ac({className:e,...t}){return O.jsx("div",{"data-slot":"field-group",className:ue(kK,e),...t})}function sc({className:e,orientation:t="vertical",...n}){return O.jsx("div",{role:"group","data-slot":"field","data-orientation":t,className:ue(RK({orientation:t}),e),...n})}function WK({className:e,...t}){return O.jsx("div",{"data-slot":"field-content",className:ue(NK,e),...t})}function El({className:e,...t}){return O.jsx(Vu,{"data-slot":"field-label",className:ue(MK,e),...t})}function HK({className:e,...t}){return O.jsx("div",{"data-slot":"field-label",className:ue(DK,e),...t})}function lc({className:e,...t}){return O.jsx("p",{"data-slot":"field-description",className:ue(jK,e),...t})}function UK({children:e,className:t,...n}){return O.jsxs("div",{"data-slot":"field-separator","data-content":!!e,className:ue(LK,t),...n,children:[O.jsx($0,{className:$K}),e&&O.jsx("span",{className:FK,"data-slot":"field-separator-content",children:e})]})}function WT({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:VK,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(BK,e),...r,children:i}):null}const GK=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"}}),F0=({className:e,sizeInput:t,type:n,variant:r,...i})=>O.jsx("input",{"data-slot":"input",type:n||"text",className:ue(HK({variant:r,sizeInput:t}),e),...i}),UK=[`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"}}),F0=({className:e,sizeInput:t,type:n,variant:r,...i})=>O.jsx("input",{"data-slot":"input",type:n||"text",className:ue(GK({variant:r,sizeInput:t}),e),...i}),qK=[`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(" "),uh=e=>O.jsx("textarea",{className:ue(UK,e.className),...e});uh.displayName="Textarea";const GK=xt(`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(qK,e.className),...e});uh.displayName="Textarea";const KK=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"}}),qK=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
56
+ group-has-[>input]/input-group:pb-2.5 [.border-t]:pt-3`}},defaultVariants:{align:"inline-start"}}),YK=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
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 V0({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
@@ -61,20 +61,20 @@ Avoid returning a new reference inside your input selector, e.g.
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 B0({className:e,align:t="inline-start",...n}){return O.jsx("div",{role:"group","data-slot":"input-group-addon","data-align":t,className:ue(GK({align:t}),e),onClick:r=>{r.target.closest("button")||r.currentTarget.parentElement?.querySelector("input")?.focus()},...n})}function HT({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(qK({size:r}),e),...i})}function KK({className:e,...t}){return O.jsx("span",{className:ue(`text-secondary-text flex items-center gap-2 text-sm [&_svg]:pointer-events-none
64
+ has-[[data-slot=input-group-control][disabled]]:[&_svg]:text-disabled-text`,e),...t})}function B0({className:e,align:t="inline-start",...n}){return O.jsx("div",{role:"group","data-slot":"input-group-addon","data-align":t,className:ue(KK({align:t}),e),onClick:r=>{r.target.closest("button")||r.currentTarget.parentElement?.querySelector("input")?.focus()},...n})}function HT({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(YK({size:r}),e),...i})}function XK({className:e,...t}){return O.jsx("span",{className:ue(`text-secondary-text flex items-center gap-2 text-sm [&_svg]:pointer-events-none
65
65
  [&_svg:not([class*='size-'])]:size-4`,e),...t})}function z0(e){return O.jsx(F0,{"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 YK({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
67
+ dark:bg-transparent`,e.className),...e})}function ZK({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 XK=`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`,ZK=xt("text-primary-text pointer-events-none transition-colors",{variants:{disabled:{true:"text-disabled-text",false:""}},defaultVariants:{disabled:!1}}),UT=`h-full rounded-none border-0 bg-transparent p-0
69
+ dark:bg-transparent`,e),...t})}const QK=`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`,JK=xt("text-primary-text pointer-events-none transition-colors",{variants:{disabled:{true:"text-disabled-text",false:""}},defaultVariants:{disabled:!1}}),UT=`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`,QK="pointer-events-none",JK=`has-[[data-slot=input-group-control]:focus-visible]:border-inp-focus-border
72
+ focus:shadow-none`,e8="pointer-events-none",t8=`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`,e8="cursor-pointer",t8="isolate z-50",n8=`bg-primary-bg text-primary-text data-open:animate-in
77
+ has-[[data-slot=input-group-control]:focus-visible]:outline-none`,n8="cursor-pointer",r8="isolate z-50",i8=`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`,r8=`text-primary-text data-disabled:text-disabled-text
87
+ *:data-[slot=input-group]:shadow-none`,o8=`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`,i8="text-secondary-text px-4 py-2 text-xs",o8=`text-secondary-text hidden w-full justify-center py-2
91
- text-center text-sm group-data-empty/combobox-content:flex`,a8="bg-delicate-border -mx-1 my-1 h-px",s8=xt(`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`,a8="text-secondary-text px-4 py-2 text-xs",s8=`text-secondary-text hidden w-full justify-center py-2
91
+ text-center text-sm group-data-empty/combobox-content:flex`,l8="bg-delicate-border -mx-1 my-1 h-px",u8=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,12 +96,12 @@ text-center text-sm group-data-empty/combobox-content:flex`,a8="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}}),l8=`text-primary-text flex items-center justify-center
99
+ [&_input::placeholder]:text-disabled-text [&_svg]:text-disabled-text`,false:""}},defaultVariants:{disabled:!1}}),c8=`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`,u8=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 GT({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(yK,{...t,children:e})})}function qT({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(WT,{children:r})]})}function Ly({...e}){return O.jsx(bK,{"data-slot":"combobox-value",...e})}function qd({className:e,children:t,...n}){return O.jsxs(bT,{"data-slot":"combobox-trigger",className:ue(XK,e),...n,children:[t,O.jsx(uo,{type:"chevron",className:ue(ZK({disabled:n.disabled})),size:"md"})]})}function c8({className:e,...t}){return O.jsx(wT,{"data-slot":"combobox-clear",className:ue(e),...t,render:O.jsx(HT,{variant:"link",size:"icon-xs",className:UT,children:O.jsx(uo,{className:QK,type:"close"})})})}function f8({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(V0,{ref:s,className:ue(JK,e),children:[O.jsx(N0,{render:O.jsx(z0,{disabled:n}),...o}),O.jsxs(B0,{align:"inline-end",className:e8,children:[r&&O.jsx(qd,{}),i&&O.jsx(c8,{disabled:n})]}),t]})}function KT({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(ET,{container:y,children:O.jsx(PT,{side:t,sideOffset:n,align:r,alignOffset:i,anchor:h,className:t8,children:O.jsx(AT,{"data-slot":"combobox-content","data-chips":!!o,className:ue(n8,e),...s})})})}function YT({className:e,...t}){return O.jsx(ST,{"data-slot":"combobox-list",className:ue("flex flex-col gap-1",e),...t})}function XT({className:e,children:t,...n}){return O.jsx(NT,{"data-slot":"combobox-item",className:ue(r8,e),...n,children:t})}function d8({className:e,...t}){return O.jsx(RT,{"data-slot":"combobox-group",className:ue(e),...t})}function p8({className:e,...t}){return O.jsx(IT,{"data-slot":"combobox-label",className:ue(i8,e),...t})}function h8({...e}){return O.jsx(CT,{"data-slot":"combobox-collection",...e})}function ZT({className:e,...t}){return O.jsx(MT,{"data-slot":"combobox-empty",className:ue(o8,e),...t})}function g8({className:e,...t}){return O.jsx(DT,{"data-slot":"combobox-separator",className:ue(a8,e),...t})}function $y({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(jT,{ref:i,"data-slot":"combobox-chips",className:ue(s8({disabled:t}),e),...n})}function QT({className:e,children:t,showRemove:n=!0,...r}){return O.jsxs(LT,{"data-slot":"combobox-chip",className:ue(l8,e),...r,children:[t,n&&O.jsx($T,{render:O.jsx(oo,{className:UT,variant:"ghost",children:O.jsx(uo,{className:"text-secondary-text",type:"close"})})})]})}function Fy({className:e,...t}){return O.jsx(N0,{"data-slot":"combobox-chip-input",className:ue(u8({disabled:t.disabled}),e),...t})}var m8=x[" useId ".trim().toString()]||(()=>{}),v8=0;function sl(e){const[t,n]=x.useState(m8());return ia(()=>{n(r=>r??String(v8++))},[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 y8(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 b8="DismissableLayer",Vy="dismissableLayer.update",x8="dismissableLayer.pointerDownOutside",w8="dismissableLayer.focusOutside",uE,JT=x.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),W0=x.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:o,onInteractOutside:a,onDismiss:s,...u}=e,c=x.useContext(JT),[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=E8(I=>{const k=I.target,B=[...c.branches].some(L=>L.contains(k));!_||B||(i?.(I),a?.(I),I.defaultPrevented||s?.())},g),R=_8(I=>{const k=I.target;[...c.branches].some(L=>L.contains(k))||(o?.(I),a?.(I),I.defaultPrevented||s?.())},g);return y8(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&&(uE=g.body.style.pointerEvents,g.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(d)),c.layers.add(d),cE(),()=>{n&&c.layersWithOutsidePointerEventsDisabled.size===1&&(g.body.style.pointerEvents=uE)}},[d,g,n,c]),x.useEffect(()=>()=>{d&&(c.layers.delete(d),c.layersWithOutsidePointerEventsDisabled.delete(d),cE())},[d,c]),x.useEffect(()=>{const I=()=>h({});return document.addEventListener(Vy,I),()=>document.removeEventListener(Vy,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)})});W0.displayName=b8;var C8="DismissableLayerBranch",S8=x.forwardRef((e,t)=>{const n=x.useContext(JT),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})});S8.displayName=C8;function E8(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(){ek(x8,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 _8(e,t=globalThis?.document){const n=Ja(e),r=x.useRef(!1);return x.useEffect(()=>{const i=o=>{o.target&&!r.current&&ek(w8,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 cE(){const e=new CustomEvent(Vy);document.dispatchEvent(e)}function ek(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?zH(i,o):i.dispatchEvent(o)}var Im="focusScope.autoFocusOnMount",Tm="focusScope.autoFocusOnUnmount",fE={bubbles:!1,cancelable:!0},O8="FocusScope",tk=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){pE.add(h);const b=document.activeElement;if(!s.contains(b)){const w=new CustomEvent(Im,fE);s.addEventListener(Im,c),s.dispatchEvent(w),w.defaultPrevented||(P8(k8(nk(s)),{select:!0}),document.activeElement===b&&Wo(s))}return()=>{s.removeEventListener(Im,c),setTimeout(()=>{const w=new CustomEvent(Tm,fE);s.addEventListener(Tm,d),s.dispatchEvent(w),w.defaultPrevented||Wo(b??document.body,{select:!0}),s.removeEventListener(Tm,d),pE.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,_]=A8(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})});tk.displayName=O8;function P8(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Wo(r,{select:t}),document.activeElement!==n)return}function A8(e){const t=nk(e),n=dE(t,e),r=dE(t.reverse(),e);return[n,r]}function nk(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 dE(e,t){for(const n of e)if(!R8(n,{upTo:t}))return n}function R8(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 I8(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&&I8(e)&&t&&e.select()}}var pE=T8();function T8(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=hE(e,t),e.unshift(t)},remove(t){e=hE(e,t),e[0]?.resume()}}}function hE(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function k8(e){return e.filter(t=>t.tagName!=="A")}var N8="Portal",H0=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});H0.displayName=N8;var km=0;function M8(){x.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??gE()),document.body.insertAdjacentElement("beforeend",e[1]??gE()),km++,()=>{km===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),km--}},[])}function gE(){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 rk(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 D8(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",j8="with-scroll-bars-hidden",L8="--removed-body-scroll-bar-size";function Nm(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function $8(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 F8=typeof window<"u"?x.useLayoutEffect:x.useEffect,mE=new WeakMap;function V8(e,t){var n=$8(null,function(r){return e.forEach(function(i){return Nm(i,r)})});return F8(function(){var r=mE.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)})}mE.set(n,e)},[e]),n}function B8(e){return e}function z8(e,t){t===void 0&&(t=B8);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 W8(e){e===void 0&&(e={});var t=z8(null);return t.options=Pi({async:!0,ssr:!1},e),t}var ik=function(e){var t=e.sideCar,n=rk(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))};ik.isSideCarExport=!0;function H8(e,t){return e.useMedium(t),ik}var ok=W8(),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,_=rk(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),P=g,R=V8([n,t]),I=Pi(Pi({},_),i);return x.createElement(x.Fragment,null,d&&x.createElement(P,{sideCar:ok,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 U8=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function G8(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=U8();return t&&e.setAttribute("nonce",t),e}function q8(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function K8(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Y8=function(){var e=0,t=null;return{add:function(n){e==0&&(t=G8())&&(q8(t,n),K8(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},X8=function(){var e=Y8();return function(t,n){x.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},ak=function(){var e=X8(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},Z8={left:0,top:0,right:0,gap:0},Dm=function(e){return parseInt(e||"",10)||0},Q8=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)]},J8=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Z8;var t=Q8(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])}},e9=ak(),ll="data-scroll-locked",t9=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(j8,` {
102
+ has-data-[slot=combobox-chip-remove]:pr-0`,f8=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 GT({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(xK,{...t,children:e})})}function qT({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(WT,{children:r})]})}function Ly({...e}){return O.jsx(wK,{"data-slot":"combobox-value",...e})}function qd({className:e,children:t,...n}){return O.jsxs(bT,{"data-slot":"combobox-trigger",className:ue(QK,e),...n,children:[t,O.jsx(uo,{type:"chevron",className:ue(JK({disabled:n.disabled})),size:"md"})]})}function d8({className:e,...t}){return O.jsx(wT,{"data-slot":"combobox-clear",className:ue(e),...t,render:O.jsx(HT,{variant:"link",size:"icon-xs",className:UT,children:O.jsx(uo,{className:e8,type:"close"})})})}function p8({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(V0,{ref:s,className:ue(t8,e),children:[O.jsx(N0,{render:O.jsx(z0,{disabled:n}),...o}),O.jsxs(B0,{align:"inline-end",className:n8,children:[r&&O.jsx(qd,{}),i&&O.jsx(d8,{disabled:n})]}),t]})}function KT({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(ET,{container:y,children:O.jsx(PT,{side:t,sideOffset:n,align:r,alignOffset:i,anchor:h,className:r8,children:O.jsx(AT,{"data-slot":"combobox-content","data-chips":!!o,className:ue(i8,e),...s})})})}function YT({className:e,...t}){return O.jsx(ST,{"data-slot":"combobox-list",className:ue("flex flex-col gap-1",e),...t})}function XT({className:e,children:t,...n}){return O.jsx(NT,{"data-slot":"combobox-item",className:ue(o8,e),...n,children:t})}function h8({className:e,...t}){return O.jsx(RT,{"data-slot":"combobox-group",className:ue(e),...t})}function g8({className:e,...t}){return O.jsx(IT,{"data-slot":"combobox-label",className:ue(a8,e),...t})}function m8({...e}){return O.jsx(CT,{"data-slot":"combobox-collection",...e})}function ZT({className:e,...t}){return O.jsx(MT,{"data-slot":"combobox-empty",className:ue(s8,e),...t})}function v8({className:e,...t}){return O.jsx(DT,{"data-slot":"combobox-separator",className:ue(l8,e),...t})}function $y({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(jT,{ref:i,"data-slot":"combobox-chips",className:ue(u8({disabled:t}),e),...n})}function QT({className:e,children:t,showRemove:n=!0,...r}){return O.jsxs(LT,{"data-slot":"combobox-chip",className:ue(c8,e),...r,children:[t,n&&O.jsx($T,{render:O.jsx(oo,{className:UT,variant:"ghost",children:O.jsx(uo,{className:"text-secondary-text",type:"close"})})})]})}function Fy({className:e,...t}){return O.jsx(N0,{"data-slot":"combobox-chip-input",className:ue(f8({disabled:t.disabled}),e),...t})}var y8=x[" useId ".trim().toString()]||(()=>{}),b8=0;function sl(e){const[t,n]=x.useState(y8());return ia(()=>{n(r=>r??String(b8++))},[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 x8(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 w8="DismissableLayer",Vy="dismissableLayer.update",C8="dismissableLayer.pointerDownOutside",S8="dismissableLayer.focusOutside",uE,JT=x.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),W0=x.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:o,onInteractOutside:a,onDismiss:s,...u}=e,c=x.useContext(JT),[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=O8(I=>{const k=I.target,B=[...c.branches].some(L=>L.contains(k));!_||B||(i?.(I),a?.(I),I.defaultPrevented||s?.())},g),R=P8(I=>{const k=I.target;[...c.branches].some(L=>L.contains(k))||(o?.(I),a?.(I),I.defaultPrevented||s?.())},g);return x8(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&&(uE=g.body.style.pointerEvents,g.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(d)),c.layers.add(d),cE(),()=>{n&&c.layersWithOutsidePointerEventsDisabled.size===1&&(g.body.style.pointerEvents=uE)}},[d,g,n,c]),x.useEffect(()=>()=>{d&&(c.layers.delete(d),c.layersWithOutsidePointerEventsDisabled.delete(d),cE())},[d,c]),x.useEffect(()=>{const I=()=>h({});return document.addEventListener(Vy,I),()=>document.removeEventListener(Vy,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)})});W0.displayName=w8;var E8="DismissableLayerBranch",_8=x.forwardRef((e,t)=>{const n=x.useContext(JT),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})});_8.displayName=E8;function O8(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(){ek(C8,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 P8(e,t=globalThis?.document){const n=Ja(e),r=x.useRef(!1);return x.useEffect(()=>{const i=o=>{o.target&&!r.current&&ek(S8,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 cE(){const e=new CustomEvent(Vy);document.dispatchEvent(e)}function ek(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?zH(i,o):i.dispatchEvent(o)}var Im="focusScope.autoFocusOnMount",Tm="focusScope.autoFocusOnUnmount",fE={bubbles:!1,cancelable:!0},A8="FocusScope",tk=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){pE.add(h);const b=document.activeElement;if(!s.contains(b)){const w=new CustomEvent(Im,fE);s.addEventListener(Im,c),s.dispatchEvent(w),w.defaultPrevented||(R8(M8(nk(s)),{select:!0}),document.activeElement===b&&Wo(s))}return()=>{s.removeEventListener(Im,c),setTimeout(()=>{const w=new CustomEvent(Tm,fE);s.addEventListener(Tm,d),s.dispatchEvent(w),w.defaultPrevented||Wo(b??document.body,{select:!0}),s.removeEventListener(Tm,d),pE.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,_]=I8(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})});tk.displayName=A8;function R8(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Wo(r,{select:t}),document.activeElement!==n)return}function I8(e){const t=nk(e),n=dE(t,e),r=dE(t.reverse(),e);return[n,r]}function nk(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 dE(e,t){for(const n of e)if(!T8(n,{upTo:t}))return n}function T8(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 k8(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&&k8(e)&&t&&e.select()}}var pE=N8();function N8(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=hE(e,t),e.unshift(t)},remove(t){e=hE(e,t),e[0]?.resume()}}}function hE(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function M8(e){return e.filter(t=>t.tagName!=="A")}var D8="Portal",H0=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});H0.displayName=D8;var km=0;function j8(){x.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??gE()),document.body.insertAdjacentElement("beforeend",e[1]??gE()),km++,()=>{km===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),km--}},[])}function gE(){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 rk(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 L8(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",$8="with-scroll-bars-hidden",F8="--removed-body-scroll-bar-size";function Nm(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function V8(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 B8=typeof window<"u"?x.useLayoutEffect:x.useEffect,mE=new WeakMap;function z8(e,t){var n=V8(null,function(r){return e.forEach(function(i){return Nm(i,r)})});return B8(function(){var r=mE.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)})}mE.set(n,e)},[e]),n}function W8(e){return e}function H8(e,t){t===void 0&&(t=W8);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 U8(e){e===void 0&&(e={});var t=H8(null);return t.options=Pi({async:!0,ssr:!1},e),t}var ik=function(e){var t=e.sideCar,n=rk(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))};ik.isSideCarExport=!0;function G8(e,t){return e.useMedium(t),ik}var ok=U8(),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,_=rk(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),P=g,R=z8([n,t]),I=Pi(Pi({},_),i);return x.createElement(x.Fragment,null,d&&x.createElement(P,{sideCar:ok,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 q8=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function K8(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=q8();return t&&e.setAttribute("nonce",t),e}function Y8(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function X8(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Z8=function(){var e=0,t=null;return{add:function(n){e==0&&(t=K8())&&(Y8(t,n),X8(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Q8=function(){var e=Z8();return function(t,n){x.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},ak=function(){var e=Q8(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},J8={left:0,top:0,right:0,gap:0},Dm=function(e){return parseInt(e||"",10)||0},e9=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)]},t9=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return J8;var t=e9(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])}},n9=ak(),ll="data-scroll-locked",r9=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($8,` {
105
105
  overflow: hidden `).concat(r,`;
106
106
  padding-right: `).concat(s,"px ").concat(r,`;
107
107
  }
@@ -135,45 +135,45 @@ has-data-[slot=combobox-chip-remove]:pr-0`,u8=xt(`text-primary-text placeholder:
135
135
  }
136
136
 
137
137
  body[`).concat(ll,`] {
138
- `).concat(L8,": ").concat(s,`px;
138
+ `).concat(F8,": ").concat(s,`px;
139
139
  }
140
- `)},vE=function(){var e=parseInt(document.body.getAttribute(ll)||"0",10);return isFinite(e)?e:0},n9=function(){x.useEffect(function(){return document.body.setAttribute(ll,(vE()+1).toString()),function(){var e=vE()-1;e<=0?document.body.removeAttribute(ll):document.body.setAttribute(ll,e.toString())}},[])},r9=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r;n9();var o=x.useMemo(function(){return J8(i)},[i]);return x.createElement(e9,{styles:t9(o,!t,i,n?"":"!important")})},By=!1;if(typeof window<"u")try{var Xf=Object.defineProperty({},"passive",{get:function(){return By=!0,!0}});window.addEventListener("test",Xf,Xf),window.removeEventListener("test",Xf,Xf)}catch{By=!1}var Ws=By?{passive:!1}:!1,i9=function(e){return e.tagName==="TEXTAREA"},sk=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!i9(e)&&n[t]==="visible")},o9=function(e){return sk(e,"overflowY")},a9=function(e){return sk(e,"overflowX")},yE=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var i=lk(e,r);if(i){var o=uk(e,r),a=o[1],s=o[2];if(a>s)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},s9=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},l9=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},lk=function(e,t){return e==="v"?o9(t):a9(t)},uk=function(e,t){return e==="v"?s9(t):l9(t)},u9=function(e,t){return e==="h"&&t==="rtl"?-1:1},c9=function(e,t,n,r,i){var o=u9(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=uk(e,s),y=h[0],b=h[1],v=h[2],w=b-v-o*y;(y||w)&&lk(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]},bE=function(e){return[e.deltaX,e.deltaY]},xE=function(e){return e&&"current"in e?e.current:e},f9=function(e,t){return e[0]===t[0]&&e[1]===t[1]},d9=function(e){return`
140
+ `)},vE=function(){var e=parseInt(document.body.getAttribute(ll)||"0",10);return isFinite(e)?e:0},i9=function(){x.useEffect(function(){return document.body.setAttribute(ll,(vE()+1).toString()),function(){var e=vE()-1;e<=0?document.body.removeAttribute(ll):document.body.setAttribute(ll,e.toString())}},[])},o9=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r;i9();var o=x.useMemo(function(){return t9(i)},[i]);return x.createElement(n9,{styles:r9(o,!t,i,n?"":"!important")})},By=!1;if(typeof window<"u")try{var Xf=Object.defineProperty({},"passive",{get:function(){return By=!0,!0}});window.addEventListener("test",Xf,Xf),window.removeEventListener("test",Xf,Xf)}catch{By=!1}var Ws=By?{passive:!1}:!1,a9=function(e){return e.tagName==="TEXTAREA"},sk=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!a9(e)&&n[t]==="visible")},s9=function(e){return sk(e,"overflowY")},l9=function(e){return sk(e,"overflowX")},yE=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var i=lk(e,r);if(i){var o=uk(e,r),a=o[1],s=o[2];if(a>s)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},u9=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},c9=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},lk=function(e,t){return e==="v"?s9(t):l9(t)},uk=function(e,t){return e==="v"?u9(t):c9(t)},f9=function(e,t){return e==="h"&&t==="rtl"?-1:1},d9=function(e,t,n,r,i){var o=f9(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=uk(e,s),y=h[0],b=h[1],v=h[2],w=b-v-o*y;(y||w)&&lk(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]},bE=function(e){return[e.deltaX,e.deltaY]},xE=function(e){return e&&"current"in e?e.current:e},p9=function(e,t){return e[0]===t[0]&&e[1]===t[1]},h9=function(e){return`
141
141
  .block-interactivity-`.concat(e,` {pointer-events: none;}
142
142
  .allow-interactivity-`).concat(e,` {pointer-events: all;}
143
- `)},p9=0,Hs=[];function h9(e){var t=x.useRef([]),n=x.useRef([0,0]),r=x.useRef(),i=x.useState(p9++)[0],o=x.useState(ak)[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=D8([e.lockRef.current],(e.shards||[]).map(xE),!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=yE(I,R);if(!V)return!0;if(V?P=I:(P=I==="v"?"h":"v",V=yE(I,R)),!V)return!1;if(!r.current&&"changedTouches"in b&&(E||_)&&(r.current=P),!P)return!0;var D=r.current||P;return c9(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?bE(v):Zf(v),C=t.current.filter(function(P){return P.name===v.type&&(P.target===v.target||v.target===P.shadowParent)&&f9(P.delta,w)})[0];if(C&&C.should){v.cancelable&&v.preventDefault();return}if(!C){var E=(a.current.shards||[]).map(xE).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:g9(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,bE(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:d9(i)}):null,h?x.createElement(r9,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function g9(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const m9=H8(ok,h9);var ck=x.forwardRef(function(e,t){return x.createElement(fh,Pi({},e,{ref:t,sideCar:m9}))});ck.classNames=fh.classNames;var v9=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,fk=function(e){return e&&(e.host||fk(e.parentNode))},y9=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=fk(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})},b9=function(e,t,n,r){var i=y9(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={})}},x9=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=v9(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live], script"))),b9(r,i,n,"aria-hidden")):function(){return null}},dh="Dialog",[dk]=Fi(dh),[w9,hi]=dk(dh),pk=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(w9,{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})};pk.displayName=dh;var hk="DialogTrigger",gk=x.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=hi(hk,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":q0(i.open),...r,ref:o,onClick:bt(e.onClick,i.onOpenToggle)})});gk.displayName=hk;var U0="DialogPortal",[C9,mk]=dk(U0,{forceMount:void 0}),vk=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:i}=e,o=hi(U0,t);return O.jsx(C9,{scope:t,forceMount:n,children:x.Children.map(r,a=>O.jsx(yo,{present:n||o.open,children:O.jsx(H0,{asChild:!0,container:i,children:a})}))})};vk.displayName=U0;var Kd="DialogOverlay",yk=x.forwardRef((e,t)=>{const n=mk(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(E9,{...i,ref:t})}):null});yk.displayName=Kd;var S9=Nd("DialogOverlay.RemoveScroll"),E9=x.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=hi(Kd,n);return O.jsx(ck,{as:S9,allowPinchZoom:!0,shards:[i.contentRef],children:O.jsx(wt.div,{"data-state":q0(i.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),es="DialogContent",bk=x.forwardRef((e,t)=>{const n=mk(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(_9,{...i,ref:t}):O.jsx(O9,{...i,ref:t})})});bk.displayName=es;var _9=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 x9(o)},[]),O.jsx(xk,{...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())})}),O9=x.forwardRef((e,t)=>{const n=hi(es,e.__scopeDialog),r=x.useRef(!1),i=x.useRef(!1);return O.jsx(xk,{...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()}})}),xk=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 M8(),O.jsxs(O.Fragment,{children:[O.jsx(tk,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:o,children:O.jsx(W0,{role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":q0(s.open),...a,ref:c,onDismiss:()=>s.onOpenChange(!1)})}),O.jsxs(O.Fragment,{children:[O.jsx(P9,{titleId:s.titleId}),O.jsx(R9,{contentRef:u,descriptionId:s.descriptionId})]})]})}),G0="DialogTitle",wk=x.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=hi(G0,n);return O.jsx(wt.h2,{id:i.titleId,...r,ref:t})});wk.displayName=G0;var Ck="DialogDescription",Sk=x.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=hi(Ck,n);return O.jsx(wt.p,{id:i.descriptionId,...r,ref:t})});Sk.displayName=Ck;var Ek="DialogClose",_k=x.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=hi(Ek,n);return O.jsx(wt.button,{type:"button",...r,ref:t,onClick:bt(e.onClick,()=>i.onOpenChange(!1))})});_k.displayName=Ek;function q0(e){return e?"open":"closed"}var Ok="DialogTitleWarning",[age,Pk]=AH(Ok,{contentName:es,titleName:G0,docsSlug:"dialog"}),P9=({titleId:e})=>{const t=Pk(Ok),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
143
+ `)},g9=0,Hs=[];function m9(e){var t=x.useRef([]),n=x.useRef([0,0]),r=x.useRef(),i=x.useState(g9++)[0],o=x.useState(ak)[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=L8([e.lockRef.current],(e.shards||[]).map(xE),!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=yE(I,R);if(!V)return!0;if(V?P=I:(P=I==="v"?"h":"v",V=yE(I,R)),!V)return!1;if(!r.current&&"changedTouches"in b&&(E||_)&&(r.current=P),!P)return!0;var D=r.current||P;return d9(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?bE(v):Zf(v),C=t.current.filter(function(P){return P.name===v.type&&(P.target===v.target||v.target===P.shadowParent)&&p9(P.delta,w)})[0];if(C&&C.should){v.cancelable&&v.preventDefault();return}if(!C){var E=(a.current.shards||[]).map(xE).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:v9(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,bE(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:h9(i)}):null,h?x.createElement(o9,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function v9(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const y9=G8(ok,m9);var ck=x.forwardRef(function(e,t){return x.createElement(fh,Pi({},e,{ref:t,sideCar:y9}))});ck.classNames=fh.classNames;var b9=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,fk=function(e){return e&&(e.host||fk(e.parentNode))},x9=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=fk(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})},w9=function(e,t,n,r){var i=x9(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={})}},C9=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=b9(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live], script"))),w9(r,i,n,"aria-hidden")):function(){return null}},dh="Dialog",[dk]=Fi(dh),[S9,hi]=dk(dh),pk=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(S9,{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})};pk.displayName=dh;var hk="DialogTrigger",gk=x.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=hi(hk,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":q0(i.open),...r,ref:o,onClick:bt(e.onClick,i.onOpenToggle)})});gk.displayName=hk;var U0="DialogPortal",[E9,mk]=dk(U0,{forceMount:void 0}),vk=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:i}=e,o=hi(U0,t);return O.jsx(E9,{scope:t,forceMount:n,children:x.Children.map(r,a=>O.jsx(yo,{present:n||o.open,children:O.jsx(H0,{asChild:!0,container:i,children:a})}))})};vk.displayName=U0;var Kd="DialogOverlay",yk=x.forwardRef((e,t)=>{const n=mk(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(O9,{...i,ref:t})}):null});yk.displayName=Kd;var _9=Nd("DialogOverlay.RemoveScroll"),O9=x.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=hi(Kd,n);return O.jsx(ck,{as:_9,allowPinchZoom:!0,shards:[i.contentRef],children:O.jsx(wt.div,{"data-state":q0(i.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),es="DialogContent",bk=x.forwardRef((e,t)=>{const n=mk(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(P9,{...i,ref:t}):O.jsx(A9,{...i,ref:t})})});bk.displayName=es;var P9=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 C9(o)},[]),O.jsx(xk,{...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())})}),A9=x.forwardRef((e,t)=>{const n=hi(es,e.__scopeDialog),r=x.useRef(!1),i=x.useRef(!1);return O.jsx(xk,{...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()}})}),xk=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 j8(),O.jsxs(O.Fragment,{children:[O.jsx(tk,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:o,children:O.jsx(W0,{role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":q0(s.open),...a,ref:c,onDismiss:()=>s.onOpenChange(!1)})}),O.jsxs(O.Fragment,{children:[O.jsx(R9,{titleId:s.titleId}),O.jsx(T9,{contentRef:u,descriptionId:s.descriptionId})]})]})}),G0="DialogTitle",wk=x.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=hi(G0,n);return O.jsx(wt.h2,{id:i.titleId,...r,ref:t})});wk.displayName=G0;var Ck="DialogDescription",Sk=x.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=hi(Ck,n);return O.jsx(wt.p,{id:i.descriptionId,...r,ref:t})});Sk.displayName=Ck;var Ek="DialogClose",_k=x.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=hi(Ek,n);return O.jsx(wt.button,{type:"button",...r,ref:t,onClick:bt(e.onClick,()=>i.onOpenChange(!1))})});_k.displayName=Ek;function q0(e){return e?"open":"closed"}var Ok="DialogTitleWarning",[lge,Pk]=AH(Ok,{contentName:es,titleName:G0,docsSlug:"dialog"}),R9=({titleId:e})=>{const t=Pk(Ok),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 x.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},A9="DialogDescriptionWarning",R9=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Pk(A9).contentName}}.`;return x.useEffect(()=>{const i=e.current?.getAttribute("aria-describedby");t&&i&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},I9=pk,T9=gk,k9=vk,Ak=yk,Rk=bk,Ik=wk,Tk=Sk,kk=_k;const N9=["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"],M9=["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%]"],D9=["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"],j9=["flex flex-col gap-1.5 pr-10 text-left"],L9=["flex flex-col-reverse sm:flex-row sm:justify-end gap-4 [&>*]:flex-1"],$9=["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"],F9=["tracking-normal text-sm font-normal text-secondary-text"],Nk=I9,V9=T9,Mk=k9,B9=kk,K0=({className:e,...t})=>O.jsx(Ak,{className:ue(...N9,e),...t});K0.displayName=Ak.displayName;const Y0=({className:e,children:t,showCloseButton:n=!0,...r})=>O.jsxs(Mk,{children:[O.jsx(K0,{}),O.jsxs(Rk,{className:ue(...M9,e),...r,children:[t,n&&O.jsxs(kk,{className:ue(...D9),children:[O.jsx(uo,{type:"close",viewBox:"3.2 3.2 17.1 17.1"}),O.jsx("span",{className:"sr-only",children:"Close"})]})]})]});Y0.displayName=Rk.displayName;const X0=({className:e,...t})=>O.jsx("div",{className:ue(...j9,e),...t});X0.displayName="DialogHeader";const Z0=({className:e,...t})=>O.jsx("div",{className:ue(...L9,e),...t});Z0.displayName="DialogFooter";const Q0=({className:e,...t})=>O.jsx(Ik,{className:ue(...$9,e),...t});Q0.displayName=Ik.displayName;const Dk=({className:e,...t})=>O.jsx(Tk,{className:ue(...F9,e),...t});Dk.displayName=Tk.displayName;const z9=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}}),W9=dn("body-sm-medium"),jk=({icon:e,label:t,badge:n,active:r=!1,collapsed:i=!1,disabled:o=!1,onAction:a,className:s,...u})=>{const c=ue(z9({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:W9,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})},H9=xt("px-2.5 py-3",{variants:{divider:{true:"",false:""}},defaultVariants:{divider:!1}}),U9=[dn("body-xs-medium"),"mb-1 px-2 text-secondary-text uppercase"].join(" "),Lk=({title:e,divider:t=!1,collapsed:n=!1,className:r,children:i,...o})=>O.jsxs("section",{className:ue(H9({divider:t}),r),...o,children:[!n&&e&&O.jsx("p",{className:U9,children:e}),O.jsx("div",{className:"space-y-1",children:i})]}),J0=({className:e,...t})=>O.jsx("nav",{role:"navigation","aria-label":"pagination",className:ue("mx-auto flex w-full justify-center",e),...t});J0.displayName="Pagination";const ex=({className:e,ref:t,...n})=>O.jsx("ul",{ref:t,className:ue("flex flex-row items-center gap-1",e),...n});ex.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(Qb({size:n}),e),...r});uc.displayName="PaginationLink";const $k=({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(YR,{className:"h-4 w-4"}),O.jsx("span",{children:"Previous"})]});$k.displayName="PaginationPrevious";const Fk=({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(XR,{className:"h-4 w-4"})]});Fk.displayName="PaginationNext";const Vk=({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(ZR,{className:"h-4 w-4"}),O.jsx("span",{className:"sr-only",children:"More pages"})]});Vk.displayName="PaginationEllipsis";function G9(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,q9(i,...t)]}function q9(...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 tx="Progress",nx=100,[K9]=G9(tx),[Y9,X9]=K9(tx),Bk=x.forwardRef((e,t)=>{const{__scopeProgress:n,value:r=null,max:i,getValueLabel:o=Z9,...a}=e;(i||i===0)&&!wE(i)&&console.error(Q9(`${i}`,"Progress"));const s=wE(i)?i:nx;r!==null&&!CE(r,s)&&console.error(J9(`${r}`,"Progress"));const u=CE(r,s)?r:null,c=Yd(u)?o(u,s):void 0;return O.jsx(Y9,{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":Hk(u,s),"data-value":u??void 0,"data-max":s,...a,ref:t})})});Bk.displayName=tx;var zk="ProgressIndicator",Wk=x.forwardRef((e,t)=>{const{__scopeProgress:n,...r}=e,i=X9(zk,n);return O.jsx(sh.div,{"data-state":Hk(i.value,i.max),"data-value":i.value??void 0,"data-max":i.max,...r,ref:t})});Wk.displayName=zk;function Z9(e,t){return`${Math.round(e/t*100)}%`}function Hk(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function Yd(e){return typeof e=="number"}function wE(e){return Yd(e)&&!isNaN(e)&&e>0}function CE(e,t){return Yd(e)&&!isNaN(e)&&e<=t&&e>=0}function Q9(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${nx}\`.`}function J9(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},I9="DialogDescriptionWarning",T9=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Pk(I9).contentName}}.`;return x.useEffect(()=>{const i=e.current?.getAttribute("aria-describedby");t&&i&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},k9=pk,N9=gk,M9=vk,Ak=yk,Rk=bk,Ik=wk,Tk=Sk,kk=_k;const D9=["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"],j9=["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%]"],L9=["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"],$9=["flex flex-col gap-1.5 pr-10 text-left"],F9=["flex flex-col-reverse sm:flex-row sm:justify-end gap-4 [&>*]:flex-1"],V9=["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"],B9=["tracking-normal text-sm font-normal text-secondary-text"],Nk=k9,z9=N9,Mk=M9,W9=kk,K0=({className:e,...t})=>O.jsx(Ak,{className:ue(...D9,e),...t});K0.displayName=Ak.displayName;const Y0=({className:e,children:t,showCloseButton:n=!0,...r})=>O.jsxs(Mk,{children:[O.jsx(K0,{}),O.jsxs(Rk,{className:ue(...j9,e),...r,children:[t,n&&O.jsxs(kk,{className:ue(...L9),children:[O.jsx(uo,{type:"close",viewBox:"3.2 3.2 17.1 17.1"}),O.jsx("span",{className:"sr-only",children:"Close"})]})]})]});Y0.displayName=Rk.displayName;const X0=({className:e,...t})=>O.jsx("div",{className:ue(...$9,e),...t});X0.displayName="DialogHeader";const Z0=({className:e,...t})=>O.jsx("div",{className:ue(...F9,e),...t});Z0.displayName="DialogFooter";const Q0=({className:e,...t})=>O.jsx(Ik,{className:ue(...V9,e),...t});Q0.displayName=Ik.displayName;const Dk=({className:e,...t})=>O.jsx(Tk,{className:ue(...B9,e),...t});Dk.displayName=Tk.displayName;const H9=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}}),U9=dn("body-sm-medium"),jk=({icon:e,label:t,badge:n,active:r=!1,collapsed:i=!1,disabled:o=!1,onAction:a,className:s,...u})=>{const c=ue(H9({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:U9,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})},G9=xt("px-2.5 py-3",{variants:{divider:{true:"",false:""}},defaultVariants:{divider:!1}}),q9=[dn("body-xs-medium"),"mb-1 px-2 text-secondary-text uppercase"].join(" "),Lk=({title:e,divider:t=!1,collapsed:n=!1,className:r,children:i,...o})=>O.jsxs("section",{className:ue(G9({divider:t}),r),...o,children:[!n&&e&&O.jsx("p",{className:q9,children:e}),O.jsx("div",{className:"space-y-1",children:i})]}),J0=({className:e,...t})=>O.jsx("nav",{role:"navigation","aria-label":"pagination",className:ue("mx-auto flex w-full justify-center",e),...t});J0.displayName="Pagination";const ex=({className:e,ref:t,...n})=>O.jsx("ul",{ref:t,className:ue("flex flex-row items-center gap-1",e),...n});ex.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(Qb({size:n}),e),...r});uc.displayName="PaginationLink";const $k=({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(YR,{className:"h-4 w-4"}),O.jsx("span",{children:"Previous"})]});$k.displayName="PaginationPrevious";const Fk=({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(XR,{className:"h-4 w-4"})]});Fk.displayName="PaginationNext";const Vk=({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(ZR,{className:"h-4 w-4"}),O.jsx("span",{className:"sr-only",children:"More pages"})]});Vk.displayName="PaginationEllipsis";function K9(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,Y9(i,...t)]}function Y9(...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 tx="Progress",nx=100,[X9]=K9(tx),[Z9,Q9]=X9(tx),Bk=x.forwardRef((e,t)=>{const{__scopeProgress:n,value:r=null,max:i,getValueLabel:o=J9,...a}=e;(i||i===0)&&!wE(i)&&console.error(e7(`${i}`,"Progress"));const s=wE(i)?i:nx;r!==null&&!CE(r,s)&&console.error(t7(`${r}`,"Progress"));const u=CE(r,s)?r:null,c=Yd(u)?o(u,s):void 0;return O.jsx(Z9,{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":Hk(u,s),"data-value":u??void 0,"data-max":s,...a,ref:t})})});Bk.displayName=tx;var zk="ProgressIndicator",Wk=x.forwardRef((e,t)=>{const{__scopeProgress:n,...r}=e,i=Q9(zk,n);return O.jsx(sh.div,{"data-state":Hk(i.value,i.max),"data-value":i.value??void 0,"data-max":i.max,...r,ref:t})});Wk.displayName=zk;function J9(e,t){return`${Math.round(e/t*100)}%`}function Hk(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function Yd(e){return typeof e=="number"}function wE(e){return Yd(e)&&!isNaN(e)&&e>0}function CE(e,t){return Yd(e)&&!isNaN(e)&&e<=t&&e>=0}function e7(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${nx}\`.`}function t7(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
149
149
  - a positive number
150
150
  - less than the value passed to \`max\` (or ${nx} if no \`max\` prop is set)
151
151
  - \`null\` or \`undefined\` if the progress is indeterminate.
152
152
 
153
- Defaulting to \`null\`.`}var Uk=Bk,e7=Wk;const Gk=({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(Uk,{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(e7,{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})]})};Gk.displayName=Uk.displayName;function t7(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 n7=x.createContext(void 0);function rx(e){const t=x.useContext(n7);return e||t||"ltr"}var Lm="rovingFocusGroup.onEntryFocus",r7={bubbles:!1,cancelable:!0},cc="RovingFocusGroup",[zy,qk,i7]=t7(cc),[o7,ph]=Fi(cc,[i7]),[a7,s7]=o7(cc),Kk=x.forwardRef((e,t)=>O.jsx(zy.Provider,{scope:e.__scopeRovingFocusGroup,children:O.jsx(zy.Slot,{scope:e.__scopeRovingFocusGroup,children:O.jsx(l7,{...e,ref:t})})}));Kk.displayName=cc;var l7=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=rx(o),[b,v]=us({prop:a,defaultProp:s??null,onChange:u,caller:cc}),[w,C]=x.useState(!1),E=Ja(c),_=qk(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(a7,{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,r7);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);Zk(te,d)}}P.current=!1}),onBlur:bt(e.onBlur,()=>C(!1))})})}),Yk="RovingFocusGroupItem",Xk=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=s7(Yk,n),p=d.currentTabStopId===c,g=qk(n),{onFocusableItemAdd:h,onFocusableItemRemove:y,currentTabStopId:b}=d;return x.useEffect(()=>{if(r)return h(),()=>y()},[r,h,y]),O.jsx(zy.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=f7(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?d7(E,_+1):E.slice(_+1)}setTimeout(()=>Zk(E))}}),children:typeof a=="function"?a({isCurrentTabStop:p,hasTabStop:b!=null}):a})})});Xk.displayName=Yk;var u7={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function c7(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function f7(e,t,n){const r=c7(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return u7[r]}function Zk(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function d7(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Qk=Kk,Jk=Xk,ix="Radio",[p7,eN]=Fi(ix),[h7,g7]=p7(ix),tN=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(h7,{scope:n,checked:i,disabled:a,children:[O.jsx(wt.button,{type:"button",role:"radio","aria-checked":i,"data-state":oN(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(iN,{control:p,bubbles:!y.current,name:r,value:s,checked:i,required:o,disabled:a,form:c,style:{transform:"translateX(-100%)"}})]})});tN.displayName=ix;var nN="RadioIndicator",rN=x.forwardRef((e,t)=>{const{__scopeRadio:n,forceMount:r,...i}=e,o=g7(nN,n);return O.jsx(yo,{present:r||o.checked,children:O.jsx(wt.span,{"data-state":oN(o.checked),"data-disabled":o.disabled?"":void 0,...i,ref:t})})});rN.displayName=nN;var m7="RadioBubbleInput",iN=x.forwardRef(({__scopeRadio:e,control:t,checked:n,bubbles:r=!0,...i},o)=>{const a=x.useRef(null),s=Zt(a,o),u=Jb(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}})});iN.displayName=m7;function oN(e){return e?"checked":"unchecked"}var v7=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],hh="RadioGroup",[y7]=Fi(hh,[ph,eN]),aN=ph(),sN=eN(),[b7,x7]=y7(hh),lN=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=aN(n),y=rx(c),[b,v]=us({prop:o,defaultProp:i??null,onChange:p,caller:hh});return O.jsx(b7,{scope:n,name:r,required:a,disabled:s,value:b,onValueChange:v,children:O.jsx(Qk,{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})})})});lN.displayName=hh;var uN="RadioGroupItem",cN=x.forwardRef((e,t)=>{const{__scopeRadioGroup:n,disabled:r,...i}=e,o=x7(uN,n),a=o.disabled||r,s=aN(n),u=sN(n),c=x.useRef(null),d=Zt(t,c),p=o.value===i.value,g=x.useRef(!1);return x.useEffect(()=>{const h=b=>{v7.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(Jk,{asChild:!0,...s,focusable:!a,active:p,children:O.jsx(tN,{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()})})})});cN.displayName=uN;var w7="RadioGroupIndicator",fN=x.forwardRef((e,t)=>{const{__scopeRadioGroup:n,...r}=e,i=sN(n);return O.jsx(rN,{...i,...r,ref:t})});fN.displayName=w7;var dN=lN,pN=cN,C7=fN;const S7=["grid gap-2"],E7=["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"],_7=["flex items-center justify-center"],O7=["size-2.5 rounded-full bg-primary-text transition-colors duration-200","group-hover:bg-secondary-text","group-disabled:bg-disabled-text"],ox=({className:e,ref:t,...n})=>O.jsx(dN,{className:ue(S7,e),...n,ref:t});ox.displayName=dN.displayName;const Xd=({className:e,ref:t,...n})=>O.jsx(pN,{ref:t,className:ue(E7,e),...n,children:O.jsx(C7,{className:ue(_7),children:O.jsx("span",{className:ue(O7)})})});Xd.displayName=pN.displayName;var gh="Switch",[P7]=Fi(gh),[A7,R7]=P7(gh),hN=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(A7,{scope:n,checked:w,disabled:s,children:[O.jsx(wt.button,{type:"button",role:"switch","aria-checked":w,"aria-required":a,"data-state":yN(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(vN,{control:g,bubbles:!b.current,name:r,value:u,checked:w,required:a,disabled:s,form:d,style:{transform:"translateX(-100%)"}})]})});hN.displayName=gh;var gN="SwitchThumb",mN=x.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,i=R7(gN,n);return O.jsx(wt.span,{"data-state":yN(i.checked),"data-disabled":i.disabled?"":void 0,...r,ref:t})});mN.displayName=gN;var I7="SwitchBubbleInput",vN=x.forwardRef(({__scopeSwitch:e,control:t,checked:n,bubbles:r=!0,...i},o)=>{const a=x.useRef(null),s=Zt(a,o),u=Jb(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}})});vN.displayName=I7;function yN(e){return e?"checked":"unchecked"}var bN=hN,T7=mN;const k7=["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"],N7=["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"],xN=({className:e,ref:t,...n})=>O.jsx(bN,{className:ue(k7,e),...n,ref:t,children:O.jsx(T7,{className:ue(N7)})});xN.displayName=bN.displayName;const ax=({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})});ax.displayName="Table";const sx=({ref:e,className:t,...n})=>O.jsx("thead",{ref:e,className:ue("text-primary-text [&_tr]:border-b",t),...n});sx.displayName="TableHeader";const lx=({ref:e,className:t,...n})=>O.jsx("tbody",{ref:e,className:ue(t),...n});lx.displayName="TableBody";const wN=({ref:e,className:t,...n})=>O.jsx("tfoot",{ref:e,className:ue("bg-muted/50 border-t font-medium",t),...n});wN.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
153
+ Defaulting to \`null\`.`}var Uk=Bk,n7=Wk;const Gk=({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(Uk,{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(n7,{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})]})};Gk.displayName=Uk.displayName;function r7(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 i7=x.createContext(void 0);function rx(e){const t=x.useContext(i7);return e||t||"ltr"}var Lm="rovingFocusGroup.onEntryFocus",o7={bubbles:!1,cancelable:!0},cc="RovingFocusGroup",[zy,qk,a7]=r7(cc),[s7,ph]=Fi(cc,[a7]),[l7,u7]=s7(cc),Kk=x.forwardRef((e,t)=>O.jsx(zy.Provider,{scope:e.__scopeRovingFocusGroup,children:O.jsx(zy.Slot,{scope:e.__scopeRovingFocusGroup,children:O.jsx(c7,{...e,ref:t})})}));Kk.displayName=cc;var c7=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=rx(o),[b,v]=us({prop:a,defaultProp:s??null,onChange:u,caller:cc}),[w,C]=x.useState(!1),E=Ja(c),_=qk(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(l7,{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,o7);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);Zk(te,d)}}P.current=!1}),onBlur:bt(e.onBlur,()=>C(!1))})})}),Yk="RovingFocusGroupItem",Xk=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=u7(Yk,n),p=d.currentTabStopId===c,g=qk(n),{onFocusableItemAdd:h,onFocusableItemRemove:y,currentTabStopId:b}=d;return x.useEffect(()=>{if(r)return h(),()=>y()},[r,h,y]),O.jsx(zy.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=p7(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?h7(E,_+1):E.slice(_+1)}setTimeout(()=>Zk(E))}}),children:typeof a=="function"?a({isCurrentTabStop:p,hasTabStop:b!=null}):a})})});Xk.displayName=Yk;var f7={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function d7(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function p7(e,t,n){const r=d7(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return f7[r]}function Zk(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function h7(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Qk=Kk,Jk=Xk,ix="Radio",[g7,eN]=Fi(ix),[m7,v7]=g7(ix),tN=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(m7,{scope:n,checked:i,disabled:a,children:[O.jsx(wt.button,{type:"button",role:"radio","aria-checked":i,"data-state":oN(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(iN,{control:p,bubbles:!y.current,name:r,value:s,checked:i,required:o,disabled:a,form:c,style:{transform:"translateX(-100%)"}})]})});tN.displayName=ix;var nN="RadioIndicator",rN=x.forwardRef((e,t)=>{const{__scopeRadio:n,forceMount:r,...i}=e,o=v7(nN,n);return O.jsx(yo,{present:r||o.checked,children:O.jsx(wt.span,{"data-state":oN(o.checked),"data-disabled":o.disabled?"":void 0,...i,ref:t})})});rN.displayName=nN;var y7="RadioBubbleInput",iN=x.forwardRef(({__scopeRadio:e,control:t,checked:n,bubbles:r=!0,...i},o)=>{const a=x.useRef(null),s=Zt(a,o),u=Jb(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}})});iN.displayName=y7;function oN(e){return e?"checked":"unchecked"}var b7=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],hh="RadioGroup",[x7]=Fi(hh,[ph,eN]),aN=ph(),sN=eN(),[w7,C7]=x7(hh),lN=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=aN(n),y=rx(c),[b,v]=us({prop:o,defaultProp:i??null,onChange:p,caller:hh});return O.jsx(w7,{scope:n,name:r,required:a,disabled:s,value:b,onValueChange:v,children:O.jsx(Qk,{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})})})});lN.displayName=hh;var uN="RadioGroupItem",cN=x.forwardRef((e,t)=>{const{__scopeRadioGroup:n,disabled:r,...i}=e,o=C7(uN,n),a=o.disabled||r,s=aN(n),u=sN(n),c=x.useRef(null),d=Zt(t,c),p=o.value===i.value,g=x.useRef(!1);return x.useEffect(()=>{const h=b=>{b7.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(Jk,{asChild:!0,...s,focusable:!a,active:p,children:O.jsx(tN,{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()})})})});cN.displayName=uN;var S7="RadioGroupIndicator",fN=x.forwardRef((e,t)=>{const{__scopeRadioGroup:n,...r}=e,i=sN(n);return O.jsx(rN,{...i,...r,ref:t})});fN.displayName=S7;var dN=lN,pN=cN,E7=fN;const _7=["grid gap-2"],O7=["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"],P7=["flex items-center justify-center"],A7=["size-2.5 rounded-full bg-primary-text transition-colors duration-200","group-hover:bg-secondary-text","group-disabled:bg-disabled-text"],ox=({className:e,ref:t,...n})=>O.jsx(dN,{className:ue(_7,e),...n,ref:t});ox.displayName=dN.displayName;const Xd=({className:e,ref:t,...n})=>O.jsx(pN,{ref:t,className:ue(O7,e),...n,children:O.jsx(E7,{className:ue(P7),children:O.jsx("span",{className:ue(A7)})})});Xd.displayName=pN.displayName;var gh="Switch",[R7]=Fi(gh),[I7,T7]=R7(gh),hN=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(I7,{scope:n,checked:w,disabled:s,children:[O.jsx(wt.button,{type:"button",role:"switch","aria-checked":w,"aria-required":a,"data-state":yN(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(vN,{control:g,bubbles:!b.current,name:r,value:u,checked:w,required:a,disabled:s,form:d,style:{transform:"translateX(-100%)"}})]})});hN.displayName=gh;var gN="SwitchThumb",mN=x.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,i=T7(gN,n);return O.jsx(wt.span,{"data-state":yN(i.checked),"data-disabled":i.disabled?"":void 0,...r,ref:t})});mN.displayName=gN;var k7="SwitchBubbleInput",vN=x.forwardRef(({__scopeSwitch:e,control:t,checked:n,bubbles:r=!0,...i},o)=>{const a=x.useRef(null),s=Zt(a,o),u=Jb(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}})});vN.displayName=k7;function yN(e){return e?"checked":"unchecked"}var bN=hN,N7=mN;const M7=["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"],D7=["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"],xN=({className:e,ref:t,...n})=>O.jsx(bN,{className:ue(M7,e),...n,ref:t,children:O.jsx(N7,{className:ue(D7)})});xN.displayName=bN.displayName;const ax=({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})});ax.displayName="Table";const sx=({ref:e,className:t,...n})=>O.jsx("thead",{ref:e,className:ue("text-primary-text [&_tr]:border-b",t),...n});sx.displayName="TableHeader";const lx=({ref:e,className:t,...n})=>O.jsx("tbody",{ref:e,className:ue(t),...n});lx.displayName="TableBody";const wN=({ref:e,className:t,...n})=>O.jsx("tfoot",{ref:e,className:ue("bg-muted/50 border-t font-medium",t),...n});wN.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
154
  transition-colors`,t),...n});Mu.displayName="TableRow";const ux=({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
155
  [&:has([role=checkbox])]:pr-0 *:[[role=checkbox]]:translate-y-0.5`,t),...n});ux.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 CN=({ref:e,className:t,...n})=>O.jsx("caption",{ref:e,className:ue("text-muted-foreground mt-4 text-sm",t),...n});CN.displayName="TableCaption";var mh="Tabs",[M7]=Fi(mh,[ph]),SN=ph(),[D7,cx]=M7(mh),EN=x.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:i,defaultValue:o,orientation:a="horizontal",dir:s,activationMode:u="automatic",...c}=e,d=rx(s),[p,g]=us({prop:r,onChange:i,defaultProp:o??"",caller:mh});return O.jsx(D7,{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})})});EN.displayName=mh;var _N="TabsList",ON=x.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...i}=e,o=cx(_N,n),a=SN(n);return O.jsx(Qk,{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})})});ON.displayName=_N;var PN="TabsTrigger",AN=x.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:i=!1,...o}=e,a=cx(PN,n),s=SN(n),u=TN(a.baseId,r),c=kN(a.baseId,r),d=r===a.value;return O.jsx(Jk,{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)})})})});AN.displayName=PN;var RN="TabsContent",IN=x.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:i,children:o,...a}=e,s=cx(RN,n),u=TN(s.baseId,r),c=kN(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})})});IN.displayName=RN;function TN(e,t){return`${e}-trigger-${t}`}function kN(e,t){return`${e}-content-${t}`}var j7=EN,NN=ON,MN=AN,DN=IN;const L7=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"}}),$7=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"}}),jN=x.createContext("default"),F7=j7,LN=({ref:e,className:t,variant:n="default",...r})=>O.jsx(jN,{value:n,children:O.jsx(NN,{ref:e,className:ue(L7({variant:n}),t),...r})});LN.displayName=NN.displayName;const $N=({ref:e,className:t,variant:n,...r})=>{const i=x.use(jN),o=n??i;return O.jsx(MN,{ref:e,className:ue($7({variant:o}),t),...r})};$N.displayName=MN.displayName;const FN=({ref:e,className:t,...n})=>O.jsx(DN,{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});FN.displayName=DN.displayName;var V7="Arrow",VN=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"})})});VN.displayName=V7;var B7=VN,fx="Popper",[BN,zN]=Fi(fx),[z7,WN]=BN(fx),HN=e=>{const{__scopePopper:t,children:n}=e,[r,i]=x.useState(null);return O.jsx(z7,{scope:t,anchor:r,onAnchorChange:i,children:n})};HN.displayName=fx;var UN="PopperAnchor",GN=x.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,o=WN(UN,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})});GN.displayName=UN;var dx="PopperContent",[W7,H7]=BN(dx),qN=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=WN(dx,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(G7),altBoundary:D},{refs:J,floatingStyles:te,placement:G,isPositioned:ee,middlewareData:Q}=XI({strategy:"fixed",placement:B,whileElementsMounted:(...Ke)=>My(...Ke,{animationFrame:h==="always"}),elements:{reference:v.anchor},middleware:[ZI({mainAxis:i+k,alignmentAxis:a}),u&&QI({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?JI():void 0,...H}),u&&eT({...H}),tT({...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`)}}),_&&Uq({element:_,padding:s}),q7({arrowWidth:I,arrowHeight:k}),g&&nT({strategy:"referenceHidden",...H})]}),[pe,K]=XN(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(W7,{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"}})})})});qN.displayName=dx;var KN="PopperArrow",U7={top:"bottom",right:"left",bottom:"top",left:"right"},YN=x.forwardRef(function(t,n){const{__scopePopper:r,...i}=t,o=H7(KN,r),a=U7[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(B7,{...i,ref:n,style:{...i.style,display:"block"}})})});YN.displayName=KN;function G7(e){return e!==null}var q7=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]=XN(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 XN(e){const[t,n="center"]=e.split("-");return[t,n]}var K7=HN,Y7=GN,X7=qN,Z7=YN,Q7=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"}),J7="VisuallyHidden",ZN=x.forwardRef((e,t)=>O.jsx(wt.span,{...e,ref:t,style:{...Q7,...e.style}}));ZN.displayName=J7;var eY=ZN,[vh]=Fi("Tooltip",[zN]),yh=zN(),QN="TooltipProvider",tY=700,Wy="tooltip.open",[nY,px]=vh(QN),JN=e=>{const{__scopeTooltip:t,delayDuration:n=tY,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(nY,{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})};JN.displayName=QN;var Bu="Tooltip",[rY,fc]=vh(Bu),eM=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:i,onOpenChange:o,disableHoverableContent:a,delayDuration:s}=e,u=px(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(Wy))):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(K7,{...c,children:O.jsx(rY,{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})})};eM.displayName=Bu;var Hy="TooltipTrigger",tM=x.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,i=fc(Hy,n),o=px(Hy,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(Y7,{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)})})});tM.displayName=Hy;var hx="TooltipPortal",[iY,oY]=vh(hx,{forceMount:void 0}),nM=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:i}=e,o=fc(hx,t);return O.jsx(iY,{scope:t,forceMount:n,children:O.jsx(yo,{present:n||o.open,children:O.jsx(H0,{asChild:!0,container:i,children:r})})})};nM.displayName=hx;var hl="TooltipContent",rM=x.forwardRef((e,t)=>{const n=oY(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(iM,{side:i,...o,ref:t}):O.jsx(aY,{side:i,...o,ref:t})})}),aY=x.forwardRef((e,t)=>{const n=fc(hl,e.__scopeTooltip),r=px(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=cY(w,v.getBoundingClientRect()),E=fY(w,C),_=dY(b.getBoundingClientRect()),P=hY([...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=!pY(w,a);C?g():E&&(g(),c())};return document.addEventListener("pointermove",y),()=>document.removeEventListener("pointermove",y)}},[u,d,a,c,g]),O.jsx(iM,{...e,ref:o})}),[sY,lY]=vh(Bu,{isInside:!1}),uY=LH("TooltipContent"),iM=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(Wy,d),()=>document.removeEventListener(Wy,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(W0,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:a,onFocusOutside:p=>p.preventDefault(),onDismiss:d,children:O.jsxs(X7,{"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(uY,{children:r}),O.jsx(sY,{scope:n,isInside:!0,children:O.jsx(eY,{id:u.contentId,role:"tooltip",children:i||r})})]})})});rM.displayName=hl;var oM="TooltipArrow",aM=x.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,i=yh(n);return lY(oM,n).isInside?null:O.jsx(Z7,{...i,...r,ref:t})});aM.displayName=oM;function cY(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 fY(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 dY(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 pY(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 hY(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),gY(t)}function gY(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 mY=JN,vY=eM,yY=tM,bY=nM,sM=rM,xY=aM;const wY=`bg-primary text-primary-foreground animate-in fade-in-0 zoom-in-95
156
+ *:[[role=checkbox]]:translate-y-0.5`,t),...n});Zd.displayName="TableCell";const CN=({ref:e,className:t,...n})=>O.jsx("caption",{ref:e,className:ue("text-muted-foreground mt-4 text-sm",t),...n});CN.displayName="TableCaption";var mh="Tabs",[j7]=Fi(mh,[ph]),SN=ph(),[L7,cx]=j7(mh),EN=x.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:i,defaultValue:o,orientation:a="horizontal",dir:s,activationMode:u="automatic",...c}=e,d=rx(s),[p,g]=us({prop:r,onChange:i,defaultProp:o??"",caller:mh});return O.jsx(L7,{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})})});EN.displayName=mh;var _N="TabsList",ON=x.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...i}=e,o=cx(_N,n),a=SN(n);return O.jsx(Qk,{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})})});ON.displayName=_N;var PN="TabsTrigger",AN=x.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:i=!1,...o}=e,a=cx(PN,n),s=SN(n),u=TN(a.baseId,r),c=kN(a.baseId,r),d=r===a.value;return O.jsx(Jk,{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)})})})});AN.displayName=PN;var RN="TabsContent",IN=x.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:i,children:o,...a}=e,s=cx(RN,n),u=TN(s.baseId,r),c=kN(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})})});IN.displayName=RN;function TN(e,t){return`${e}-trigger-${t}`}function kN(e,t){return`${e}-content-${t}`}var $7=EN,NN=ON,MN=AN,DN=IN;const F7=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"}}),V7=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"}}),jN=x.createContext("default"),B7=$7,LN=({ref:e,className:t,variant:n="default",...r})=>O.jsx(jN,{value:n,children:O.jsx(NN,{ref:e,className:ue(F7({variant:n}),t),...r})});LN.displayName=NN.displayName;const $N=({ref:e,className:t,variant:n,...r})=>{const i=x.use(jN),o=n??i;return O.jsx(MN,{ref:e,className:ue(V7({variant:o}),t),...r})};$N.displayName=MN.displayName;const FN=({ref:e,className:t,...n})=>O.jsx(DN,{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});FN.displayName=DN.displayName;var z7="Arrow",VN=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"})})});VN.displayName=z7;var W7=VN,fx="Popper",[BN,zN]=Fi(fx),[H7,WN]=BN(fx),HN=e=>{const{__scopePopper:t,children:n}=e,[r,i]=x.useState(null);return O.jsx(H7,{scope:t,anchor:r,onAnchorChange:i,children:n})};HN.displayName=fx;var UN="PopperAnchor",GN=x.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,o=WN(UN,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})});GN.displayName=UN;var dx="PopperContent",[U7,G7]=BN(dx),qN=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=WN(dx,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(K7),altBoundary:D},{refs:J,floatingStyles:te,placement:G,isPositioned:ee,middlewareData:Q}=XI({strategy:"fixed",placement:B,whileElementsMounted:(...Ke)=>My(...Ke,{animationFrame:h==="always"}),elements:{reference:v.anchor},middleware:[ZI({mainAxis:i+k,alignmentAxis:a}),u&&QI({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?JI():void 0,...H}),u&&eT({...H}),tT({...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`)}}),_&&qq({element:_,padding:s}),Y7({arrowWidth:I,arrowHeight:k}),g&&nT({strategy:"referenceHidden",...H})]}),[pe,K]=XN(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(U7,{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"}})})})});qN.displayName=dx;var KN="PopperArrow",q7={top:"bottom",right:"left",bottom:"top",left:"right"},YN=x.forwardRef(function(t,n){const{__scopePopper:r,...i}=t,o=G7(KN,r),a=q7[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(W7,{...i,ref:n,style:{...i.style,display:"block"}})})});YN.displayName=KN;function K7(e){return e!==null}var Y7=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]=XN(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 XN(e){const[t,n="center"]=e.split("-");return[t,n]}var X7=HN,Z7=GN,Q7=qN,J7=YN,eY=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"}),tY="VisuallyHidden",ZN=x.forwardRef((e,t)=>O.jsx(wt.span,{...e,ref:t,style:{...eY,...e.style}}));ZN.displayName=tY;var nY=ZN,[vh]=Fi("Tooltip",[zN]),yh=zN(),QN="TooltipProvider",rY=700,Wy="tooltip.open",[iY,px]=vh(QN),JN=e=>{const{__scopeTooltip:t,delayDuration:n=rY,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(iY,{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})};JN.displayName=QN;var Bu="Tooltip",[oY,fc]=vh(Bu),eM=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:i,onOpenChange:o,disableHoverableContent:a,delayDuration:s}=e,u=px(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(Wy))):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(X7,{...c,children:O.jsx(oY,{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})})};eM.displayName=Bu;var Hy="TooltipTrigger",tM=x.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,i=fc(Hy,n),o=px(Hy,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(Z7,{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)})})});tM.displayName=Hy;var hx="TooltipPortal",[aY,sY]=vh(hx,{forceMount:void 0}),nM=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:i}=e,o=fc(hx,t);return O.jsx(aY,{scope:t,forceMount:n,children:O.jsx(yo,{present:n||o.open,children:O.jsx(H0,{asChild:!0,container:i,children:r})})})};nM.displayName=hx;var hl="TooltipContent",rM=x.forwardRef((e,t)=>{const n=sY(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(iM,{side:i,...o,ref:t}):O.jsx(lY,{side:i,...o,ref:t})})}),lY=x.forwardRef((e,t)=>{const n=fc(hl,e.__scopeTooltip),r=px(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=dY(w,v.getBoundingClientRect()),E=pY(w,C),_=hY(b.getBoundingClientRect()),P=mY([...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=!gY(w,a);C?g():E&&(g(),c())};return document.addEventListener("pointermove",y),()=>document.removeEventListener("pointermove",y)}},[u,d,a,c,g]),O.jsx(iM,{...e,ref:o})}),[uY,cY]=vh(Bu,{isInside:!1}),fY=LH("TooltipContent"),iM=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(Wy,d),()=>document.removeEventListener(Wy,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(W0,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:a,onFocusOutside:p=>p.preventDefault(),onDismiss:d,children:O.jsxs(Q7,{"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(fY,{children:r}),O.jsx(uY,{scope:n,isInside:!0,children:O.jsx(nY,{id:u.contentId,role:"tooltip",children:i||r})})]})})});rM.displayName=hl;var oM="TooltipArrow",aM=x.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,i=yh(n);return cY(oM,n).isInside?null:O.jsx(J7,{...i,...r,ref:t})});aM.displayName=oM;function dY(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 pY(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 hY(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 gY(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 mY(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),vY(t)}function vY(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 yY=JN,bY=eM,xY=tM,wY=nM,sM=rM,CY=aM;const SY=`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`,CY=mY,lM=vY,uM=yY,cM=xY,gx=({className:e,sideOffset:t=4,ref:n,...r})=>O.jsx(bY,{children:O.jsx(sM,{ref:n,sideOffset:t,className:ue(wY,e),...r})});gx.displayName=sM.displayName;const mx=(e=!1)=>{const[t,n]=j.useState(e);return{isOpened:t,openPopup:()=>n(!0),closePopup:()=>n(!1),togglePopup:()=>n(a=>!a)}},SY=(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},EY=xt("flex items-center",{variants:{size:{sm:"gap-1",default:"gap-1",lg:"gap-2"}},defaultVariants:{size:"default"}}),SE=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"}}),EE=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}}),_Y=5,OY=5,PY=({currentPage:e,totalPages:t,maxVisiblePages:n=_Y,className:r,showNavigation:i=!0,prevLabel:o,nextLabel:a,size:s="default",ellipsisStep:u=OY,onPageChange:c})=>{if(t<=1)return null;const d=SY(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(J0,{children:O.jsxs(ex,{className:ue(EY({size:s}),r),children:[i&&O.jsx(tl,{children:O.jsx(oo,{variant:"ghost",disabled:e===1,onClick:()=>p(e-1),className:SE({size:s,side:"prev"}),"aria-label":"Предыдущая страница",children:o||O.jsx(YR,{})})}),d.map(h=>h==="ellipsis-start"||h==="ellipsis-end"?O.jsx(tl,{children:O.jsx(oo,{variant:"ghost",onClick:()=>g(h),className:EE({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:EE({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:SE({size:s,side:"next"}),"aria-label":"Следующая страница",children:a||O.jsx(XR,{})})})]})})},AY=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"}}),RY=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"}}),IY=xt("flex items-center gap-3",{variants:{state:{expanded:"opacity-100",collapsed:"hidden opacity-0"}},defaultVariants:{state:"expanded"}}),TY=dn("body-xl-medium"),kY=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(" ")),NY=({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(Lk,{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(jk,{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(AY({state:r}),u),"aria-label":"Боковая навигация",...c,children:[O.jsxs("header",{className:RY({state:r}),children:[O.jsxs("div",{className:IY({state:r}),children:[n,O.jsx("p",{className:TY,children:t})]}),o&&O.jsx("button",{type:"button",className:kY(),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)})]})]})},MY=({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(n0,{...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})]})})},DY=({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(Z0,{className:s?.footer,children:[O.jsx(oo,{variant:"secondary",onClick:p,children:r}),O.jsx(oo,{onClick:g,children:i})]}):u;return O.jsx(Nk,{open:e,onOpenChange:t,children:O.jsxs(Y0,{"aria-describedby":d,showCloseButton:c,children:[n&&O.jsx(X0,{className:s?.header,children:O.jsx(Q0,{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 jY(e){return Array.isArray(e)&&e.every(t=>typeof t=="number")}function LY(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`,`
163
+ py-1.5 text-xs`,EY=yY,lM=bY,uM=xY,cM=CY,gx=({className:e,sideOffset:t=4,ref:n,...r})=>O.jsx(wY,{children:O.jsx(sM,{ref:n,sideOffset:t,className:ue(SY,e),...r})});gx.displayName=sM.displayName;const mx=(e=!1)=>{const[t,n]=j.useState(e);return{isOpened:t,openPopup:()=>n(!0),closePopup:()=>n(!1),togglePopup:()=>n(a=>!a)}},_Y=(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},OY=xt("flex items-center",{variants:{size:{sm:"gap-1",default:"gap-1",lg:"gap-2"}},defaultVariants:{size:"default"}}),SE=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"}}),EE=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}}),PY=5,AY=5,RY=({currentPage:e,totalPages:t,maxVisiblePages:n=PY,className:r,showNavigation:i=!0,prevLabel:o,nextLabel:a,size:s="default",ellipsisStep:u=AY,onPageChange:c})=>{if(t<=1)return null;const d=_Y(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(J0,{children:O.jsxs(ex,{className:ue(OY({size:s}),r),children:[i&&O.jsx(tl,{children:O.jsx(oo,{variant:"ghost",disabled:e===1,onClick:()=>p(e-1),className:SE({size:s,side:"prev"}),"aria-label":"Предыдущая страница",children:o||O.jsx(YR,{})})}),d.map(h=>h==="ellipsis-start"||h==="ellipsis-end"?O.jsx(tl,{children:O.jsx(oo,{variant:"ghost",onClick:()=>g(h),className:EE({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:EE({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:SE({size:s,side:"next"}),"aria-label":"Следующая страница",children:a||O.jsx(XR,{})})})]})})},IY=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"}}),TY=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"}}),kY=xt("flex items-center gap-3",{variants:{state:{expanded:"opacity-100",collapsed:"hidden opacity-0"}},defaultVariants:{state:"expanded"}}),NY=dn("body-xl-medium"),MY=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(" ")),DY=({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(Lk,{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(jk,{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(IY({state:r}),u),"aria-label":"Боковая навигация",...c,children:[O.jsxs("header",{className:TY({state:r}),children:[O.jsxs("div",{className:kY({state:r}),children:[n,O.jsx("p",{className:NY,children:t})]}),o&&O.jsx("button",{type:"button",className:MY(),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)})]})]})},jY=({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(n0,{...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})]})})},LY=({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(Z0,{className:s?.footer,children:[O.jsx(oo,{variant:"secondary",onClick:p,children:r}),O.jsx(oo,{onClick:g,children:i})]}):u;return O.jsx(Nk,{open:e,onOpenChange:t,children:O.jsxs(Y0,{"aria-describedby":d,showCloseButton:c,children:[n&&O.jsx(X0,{className:s?.header,children:O.jsx(Q0,{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 $Y(e){return Array.isArray(e)&&e.every(t=>typeof t=="number")}function FY(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*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 $Y(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 FY(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 _E(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 VY={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=_E(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)=>_E(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 BY=(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:()=>LY(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=>$Y(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},zY={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()}}},fM=(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))};fM.autoRemove=e=>ci(e);const dM=(e,t,n)=>{var r;return!!(!((r=e.getValue(t))==null||(r=r.toString())==null)&&r.includes(n))};dM.autoRemove=e=>ci(e);const pM=(e,t,n)=>{var r;return((r=e.getValue(t))==null||(r=r.toString())==null?void 0:r.toLowerCase())===n?.toLowerCase()};pM.autoRemove=e=>ci(e);const hM=(e,t,n)=>{var r;return(r=e.getValue(t))==null?void 0:r.includes(n)};hM.autoRemove=e=>ci(e);const gM=(e,t,n)=>!n.some(r=>{var i;return!((i=e.getValue(t))!=null&&i.includes(r))});gM.autoRemove=e=>ci(e)||!(e!=null&&e.length);const mM=(e,t,n)=>n.some(r=>{var i;return(i=e.getValue(t))==null?void 0:i.includes(r)});mM.autoRemove=e=>ci(e)||!(e!=null&&e.length);const vM=(e,t,n)=>e.getValue(t)===n;vM.autoRemove=e=>ci(e);const yM=(e,t,n)=>e.getValue(t)==n;yM.autoRemove=e=>ci(e);const vx=(e,t,n)=>{let[r,i]=n;const o=e.getValue(t);return o>=r&&o<=i};vx.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]};vx.autoRemove=e=>ci(e)||ci(e[0])&&ci(e[1]);const Ji={includesString:fM,includesStringSensitive:dM,equalsString:pM,arrIncludes:hM,arrIncludesAll:gM,arrIncludesSome:mM,equals:vM,weakEquals:yM,inNumberRange:vx};function ci(e){return e==null||e===""}const WY={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(OE(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(OE(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 OE(e,t,n){return(e&&e.autoRemove?e.autoRemove(t,n):!1)||typeof t>"u"||typeof t=="string"&&!t}const HY=(e,t,n)=>n.reduce((r,i)=>{const o=i.getValue(e);return r+(typeof o=="number"?o:0)},0),UY=(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},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,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]},KY=(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},YY=(e,t)=>{if(!t.length)return;const n=t.map(o=>o.getValue(e));if(!jY(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},XY=(e,t)=>Array.from(new Set(t.map(n=>n.getValue(e))).values()),ZY=(e,t)=>new Set(t.map(n=>n.getValue(e))).size,QY=(e,t)=>t.length,$m={sum:HY,min:UY,max:GY,extent:qY,mean:KY,median:YY,unique:XY,uniqueCount:ZY,count:QY},JY={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 eX(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 tX={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 eX(o,n,r)},Ge(e.options,"debugTable","_getOrderColumnsFn"))}},Fm=()=>({left:[],right:[]}),nX={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 rX(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:[]}),iX={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=rX(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=oX()?{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 oX(){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 aX={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 sX={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()}}},lX={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)}}},uX={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()}}}},Uy=0,Gy=10,zm=()=>({pageIndex:Uy,pageSize:Gy}),cX={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?Uy:(i=(o=e.initialState)==null||(o=o.pagination)==null?void 0:o.pageIndex)!=null?i:Uy)},e.resetPageSize=r=>{var i,o;e.setPageSize(r?Gy:(i=(o=e.initialState)==null||(o=o.pagination)==null?void 0:o.pageSize)!=null?i:Gy)},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:[]}),fX={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"))}},dX={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=>{qy(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 qy(s,e.id,n,(a=r?.selectChildren)!=null?a:!0,t),s})},e.getIsSelected=()=>{const{rowSelection:n}=t.getState();return yx(e,n)},e.getIsSomeSelected=()=>{const{rowSelection:n}=t.getState();return Ky(e,n)==="some"},e.getIsAllSubRowsSelected=()=>{const{rowSelection:n}=t.getState();return Ky(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)}}}},qy=(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=>qy(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=yx(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 yx(e,t){var n;return(n=t[e.id])!=null?n:!1}function Ky(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()&&(yx(a,t)?o=!0:i=!1),a.subRows&&a.subRows.length)){const s=Ky(a,t);s==="all"?o=!0:(s==="some"&&(o=!0),i=!1)}}),i?"all":o?"some":!1}const Yy=/([0-9]+)/gm,pX=(e,t,n)=>bM(aa(e.getValue(n)).toLowerCase(),aa(t.getValue(n)).toLowerCase()),hX=(e,t,n)=>bM(aa(e.getValue(n)),aa(t.getValue(n))),gX=(e,t,n)=>bx(aa(e.getValue(n)).toLowerCase(),aa(t.getValue(n)).toLowerCase()),mX=(e,t,n)=>bx(aa(e.getValue(n)),aa(t.getValue(n))),vX=(e,t,n)=>{const r=e.getValue(n),i=t.getValue(n);return r>i?1:r<i?-1:0},yX=(e,t,n)=>bx(e.getValue(n),t.getValue(n));function bx(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 bM(e,t){const n=e.split(Yy).filter(Boolean),r=t.split(Yy).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:pX,alphanumericCaseSensitive:hX,text:gX,textCaseSensitive:mX,datetime:vX,basic:yX},bX={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(Yy).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())}},xX=[VY,aX,tX,nX,zY,WY,sX,lX,bX,JY,uX,cX,fX,dX,iX];function wX(e){var t,n;process.env.NODE_ENV!=="production"&&(e.debugAll||e.debugTable)&&console.info("Creating Table Instance...");const r=[...xX,...(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=FY(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 CX(){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=BY(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 PE(e,t){return e?SX(e)?x.createElement(e,t):e:null}function SX(e){return EX(e)||typeof e=="function"||_X(e)}function EX(e){return typeof e=="function"&&(()=>{const t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}function _X(e){return typeof e=="object"&&typeof e.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}function OX(e){const t={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[n]=x.useState(()=>({current:wX(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 PX({columns:e,data:t}){const n=OX({data:t,columns:e,getCoreRowModel:CX()});return O.jsx("div",{className:"w-full overflow-hidden",children:O.jsxs(ax,{children:[O.jsx(sx,{children:n.getHeaderGroups().map(r=>O.jsx(Mu,{children:r.headers.map(i=>O.jsx(ux,{children:i.isPlaceholder?null:PE(i.column.columnDef.header,i.getContext())},i.id))},r.id))}),O.jsx(lx,{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:PE(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 AX=({children:e,text:t,place:n="top",arrow:r=!0,classes:i,color:o="dark",tooltipItemsLimit:a=1/0})=>{const{isOpened:s,togglePopup:u}=mx(),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(lM,{open:s,onOpenChange:u,children:[O.jsx(uM,{asChild:!0,className:i?.trigger,children:e}),O.jsxs(gx,{side:n,className:c.content,children:[O.jsx("div",{className:ue(i?.tooltip),children:d}),r&&O.jsx(cM,{className:c.arrow})]})]})},xM=({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(V0,{"data-slot":!0,children:[O.jsx(z0,{ref:a,...s,...u,disabled:n}),e.map(c=>O.jsx(B0,{align:c.position,children:c.component},c.id))]}):O.jsx(F0,{ref:a,...s,...u,disabled:n}),i&&O.jsx(lc,{...u,children:i})]})})})},RX=({...e})=>{const{isOpened:t,togglePopup:n}=mx();return O.jsx(xM,{...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 IX({classNames:e,id:t,value:n,defaultValue:r,label:i,options:o=[],...a}){return O.jsx(ox,{...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",wM=e=>Su(e)?e.value:e,TX=e=>e.every(t=>typeof t=="string")||e.every(t=>typeof t=="object")?e:e.map(t=>wM(t)),Um=(e,t)=>e===null||t===null||typeof e=="string"||typeof t=="string"?e===t:e.id===t.id,CM=({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?.(TX(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=>wM(L).toLowerCase().includes(P)),I=(L,V)=>O.jsx(QT,{showRemove:V.withRemove,onClick:V.onClick,className:`${Xb({variant:L.variant,kind:L.kind})}
168
- ${b} ${V.className}`,children:O.jsx(by,{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(Fy,{...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(yy,{className:b,onClick:E,children:L})),O.jsx(Fy,{...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(qT,{children:[O.jsx(El,{...v,children:t}),O.jsxs(GT,{items:y,multiple:n,autoHighlight:n,value:_,onValueChange:r?void 0:w,children:[n?O.jsxs($y,{disabled:r,className:"pr-8",children:[O.jsx(Ly,{children:k}),O.jsx(qd,{className:"-ml-4.5",disabled:r})]}):O.jsxs($y,{disabled:r,className:"pr-8",children:[O.jsx(Ly,{children:B}),O.jsx(qd,{className:"-ml-4.5",disabled:r})]}),O.jsxs(KT,{children:[O.jsx(ZT,{children:"No items found."}),O.jsx(YT,{children:R.map((L,V)=>{const D=n?u.some(H=>Um(H,L)):Um(d,L);return O.jsx(XT,{disabled:r,value:L,className:`${D?"bg-tertiary-bg":""} ${typeof L=="string"?"py-1":"px-2 py-2"}`,children:Su(L)?O.jsx(by,{dotPosition:"left",variant:L.variant,kind:L.kind,classNames:{className:"px-4 py-1.5"},children:L.value}):O.jsx(yy,{className:"px-4 py-1.5",children:L})},Su(L)?String(L.id):`${L}-${V}`)})})]})]}),O.jsx(lc,{...v,children:o})]})})})};CM.displayName="SelectSearch";const kX=({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 NX=Eu.exports,AE;function MX(){return AE||(AE=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"),Qw=RegExp(Ro,"g"),ug=RegExp(wa+"(?="+wa+")|"+Rs+bi,"g"),k$=RegExp([Io+"?"+Bc+"+"+Hc+"(?="+[Os,Io,"$"].join("|")+")",sg+"+"+xe+"(?="+[Os,Io+As,"$"].join("|")+")",Io+"?"+As+"+"+Hc,Io+"+"+xe,tn,en,Vc,Bi].join("|"),"g"),N$=RegExp("["+Wc+ws+Lc+Ss+"]"),M$=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,D$=["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"],j$=-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 L$={À:"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"},$$={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},F$={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},V$={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},B$=parseFloat,z$=parseInt,Jw=typeof Wf=="object"&&Wf&&Wf.Object===Object&&Wf,W$=typeof self=="object"&&self&&self.Object===Object&&self,Pn=Jw||W$||Function("return this")(),cg=t&&!t.nodeType&&t,Ca=cg&&!0&&e&&!e.nodeType&&e,e1=Ca&&Ca.exports===cg,fg=e1&&Jw.process,$r=(function(){try{var z=Ca&&Ca.require&&Ca.require("util").types;return z||fg&&fg.binding&&fg.binding("util")}catch{}})(),t1=$r&&$r.isArrayBuffer,n1=$r&&$r.isDate,r1=$r&&$r.isMap,i1=$r&&$r.isRegExp,o1=$r&&$r.isSet,a1=$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 H$(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 U$(z,re){for(var X=z==null?0:z.length;X--&&re(z[X],X,z)!==!1;);return z}function s1(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 G$(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 q$=gg("length");function K$(z){return z.split("")}function Y$(z){return z.match(og)||[]}function l1(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?sF(z,re,X):Gc(z,u1,X)}function X$(z,re,X,Ee){for(var qe=X-1,gt=z.length;++qe<gt;)if(Ee(z[qe],re))return qe;return-1}function u1(z){return z!==z}function c1(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 f1(z,re,X,Ee,qe){return qe(z,function(gt,an,_t){X=Ee?(Ee=!1,gt):re(X,gt,an,_t)}),X}function Z$(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 Q$(z,re){return Ft(re,function(X){return[X,z[X]]})}function d1(z){return z&&z.slice(0,m1(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 p1(z,re){for(var X=-1,Ee=z.length;++X<Ee&&Is(re,z[X],0)>-1;);return X}function h1(z,re){for(var X=z.length;X--&&Is(re,z[X],0)>-1;);return X}function J$(z,re){for(var X=z.length,Ee=0;X--;)z[X]===re&&++Ee;return Ee}var eF=mg(L$),tF=mg($$);function nF(z){return"\\"+V$[z]}function rF(z,re){return z==null?n:z[re]}function Ts(z){return N$.test(z)}function iF(z){return M$.test(z)}function oF(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 g1(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 aF(z){var re=-1,X=Array(z.size);return z.forEach(function(Ee){X[++re]=[Ee,Ee]}),X}function sF(z,re,X){for(var Ee=X-1,qe=z.length;++Ee<qe;)if(z[Ee]===re)return Ee;return-1}function lF(z,re,X){for(var Ee=X+1;Ee--;)if(z[Ee]===re)return Ee;return Ee}function ks(z){return Ts(z)?cF(z):q$(z)}function ii(z){return Ts(z)?fF(z):K$(z)}function m1(z){for(var re=z.length;re--&&gr.test(z.charAt(re)););return re}var uF=mg(F$);function cF(z){for(var re=ug.lastIndex=0;ug.test(z);)++re;return re}function fF(z){return z.match(ug)||[]}function dF(z){return z.match(k$)||[]}var pF=(function z(re){re=re==null?Pn:Ns.defaults(Pn.Object(),re,Ns.pick(Pn,D$));var X=re.Array,Ee=re.Date,qe=re.Error,gt=re.Function,an=re.Math,_t=re.Object,wg=re.RegExp,hF=re.String,Vr=re.TypeError,Kc=X.prototype,gF=gt.prototype,Ms=_t.prototype,Yc=re["__core-js_shared__"],Xc=gF.toString,vt=Ms.hasOwnProperty,mF=0,v1=(function(){var l=/[^.]+$/.exec(Yc&&Yc.keys&&Yc.keys.IE_PROTO||"");return l?"Symbol(src)_1."+l:""})(),Zc=Ms.toString,vF=Xc.call(_t),yF=Pn._,bF=wg("^"+Xc.call(vt).replace(Dr,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Qc=e1?re.Buffer:n,Mo=re.Symbol,Jc=re.Uint8Array,y1=Qc?Qc.allocUnsafe:n,ef=g1(_t.getPrototypeOf,_t),b1=_t.create,x1=Ms.propertyIsEnumerable,tf=Kc.splice,w1=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{}})(),xF=re.clearTimeout!==Pn.clearTimeout&&re.clearTimeout,wF=Ee&&Ee.now!==Pn.Date.now&&Ee.now,CF=re.setTimeout!==Pn.setTimeout&&re.setTimeout,rf=an.ceil,of=an.floor,Cg=_t.getOwnPropertySymbols,SF=Qc?Qc.isBuffer:n,C1=re.isFinite,EF=Kc.join,_F=g1(_t.keys,_t),sn=an.max,Ln=an.min,OF=Ee.now,PF=re.parseInt,S1=an.random,AF=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={},RF=Ra(Sg),IF=Ra(ql),TF=Ra(Eg),kF=Ra(Ds),NF=Ra(Kl),sf=Mo?Mo.prototype:n,Xl=sf?sf.valueOf:n,E1=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 _C(l)}return new Br(l)}var Ls=(function(){function l(){}return function(f){if(!zt(f))return{};if(b1)return b1(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 MF(){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 DF(){if(this.__filtered__){var l=new at(this);l.__dir__=-1,l.__filtered__=!0}else l=this.clone(),l.__dir__*=-1;return l}function jF(){var l=this.__wrapped__.value(),f=this.__dir__,m=Ye(l),S=f<0,A=m?l.length:0,N=KV(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 K1(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 LF(){this.__data__=Yl?Yl(null):{},this.size=0}function $F(l){var f=this.has(l)&&delete this.__data__[l];return this.size-=f?1:0,f}function FF(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 VF(l){var f=this.__data__;return Yl?f[l]!==n:vt.call(f,l)}function BF(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=LF,Ea.prototype.delete=$F,Ea.prototype.get=FF,Ea.prototype.has=VF,Ea.prototype.set=BF;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 zF(){this.__data__=[],this.size=0}function WF(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 HF(l){var f=this.__data__,m=uf(f,l);return m<0?n:f[m][1]}function UF(l){return uf(this.__data__,l)>-1}function GF(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=zF,zi.prototype.delete=WF,zi.prototype.get=HF,zi.prototype.has=UF,zi.prototype.set=GF;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 qF(){this.size=0,this.__data__={hash:new Ea,map:new(ql||zi),string:new Ea}}function KF(l){var f=wf(this,l).delete(l);return this.size-=f?1:0,f}function YF(l){return wf(this,l).get(l)}function XF(l){return wf(this,l).has(l)}function ZF(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=qF,Wi.prototype.delete=KF,Wi.prototype.get=YF,Wi.prototype.has=XF,Wi.prototype.set=ZF;function _a(l){var f=-1,m=l==null?0:l.length;for(this.__data__=new Wi;++f<m;)this.add(l[f])}function QF(l){return this.__data__.set(l,u),this}function JF(l){return this.__data__.has(l)}_a.prototype.add=_a.prototype.push=QF,_a.prototype.has=JF;function oi(l){var f=this.__data__=new zi(l);this.size=f.size}function eV(){this.__data__=new zi,this.size=0}function tV(l){var f=this.__data__,m=f.delete(l);return this.size=f.size,m}function nV(l){return this.__data__.get(l)}function rV(l){return this.__data__.has(l)}function iV(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=eV,oi.prototype.delete=tV,oi.prototype.get=nV,oi.prototype.has=rV,oi.prototype.set=iV;function _1(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,hF):[],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 O1(l){var f=l.length;return f?l[Dg(0,f-1)]:n}function oV(l,f){return Cf(rr(l),Oa(f,0,l.length))}function aV(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 sV(l,f,m,S){return Do(l,function(A,N,M){f(S,A,m(A),M)}),S}function P1(l,f){return l&&wi(f,bn(f),l)}function lV(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=XV(l),!F)return rr(l,M)}else{var ce=$n(l),ye=ce==$||ce==ie;if(Fo(l))return Z1(l,F);if(ce==fe||ce==Ce||ye&&!A){if(M=W||ye?{}:mC(l),!F)return W?FV(l,lV(M,l)):$V(l,P1(M,l))}else{if(!Rt[ce])return A?l:{};M=ZV(l,ce,F)}}N||(N=new oi);var Ie=N.get(l);if(Ie)return Ie;N.set(l,M),UC(l)?l.forEach(function(He){M.add(zr(He,f,m,He,l,N))}):WC(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 uV(l){var f=bn(l);return function(m){return A1(m,l,f)}}function A1(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 R1(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=nC(xi),I1=nC(Ag,!0);function cV(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 fV(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:qC(S);m<S;)l[m++]=f;return l}function T1(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=JV),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=rC(),k1=rC(!0);function xi(l,f){return l&&Pg(l,f,bn)}function Ag(l,f){return l&&k1(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 N1(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)?qV(l):aB(l)}function Rg(l,f){return l>f}function dV(l,f){return l!=null&&vt.call(l,f)}function pV(l,f){return l!=null&&f in _t(l)}function hV(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 gV(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=xC(l,f);var S=l==null?l:l[Ci(Hr(f))];return S==null?n:yr(S,l,m)}function M1(l){return Ut(l)&&Gn(l)==Ce}function mV(l){return Ut(l)&&Gn(l)==Ct}function vV(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:yV(l,f,m,S,eu,A)}function yV(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)?pC(l,f,m,S,A,N):UV(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),GV(l,f,m,S,A,N)):!1}function bV(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 D1(l){if(!zt(l)||tB(l))return!1;var f=Ki(l)?bF:ya;return f.test(Ra(l))}function xV(l){return Ut(l)&&Gn(l)==ve}function wV(l){return Ut(l)&&$n(l)==le}function CV(l){return Ut(l)&&Af(l.length)&&!!Nt[Gn(l)]}function j1(l){return typeof l=="function"?l:l==null?ar:typeof l=="object"?Ye(l)?F1(l[0],l[1]):$1(l):iS(l)}function kg(l){if(!ru(l))return _F(l);var f=[];for(var m in _t(l))vt.call(l,m)&&m!="constructor"&&f.push(m);return f}function SV(l){if(!zt(l))return oB(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 L1(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 $1(l){var f=Kg(l);return f.length==1&&f[0][2]?yC(f[0][0],f[0][1]):function(m){return m===l||Tg(m,l,f)}}function F1(l,f){return Xg(l)&&vC(f)?yC(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))EV(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 EV(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=Z1(W,!0)):We?(ce=!1,se=Q1(W,!0)):se=[]:ou(W)||Ia(W)?(se=F,Ia(F)?se=KC(F):(!zt(F)||Ki(F))&&(se=mC(W))):ce=!1}ce&&(M.set(W,se),A(se,W,S,N,M),M.delete(W)),_g(l,m,se)}function V1(l,f){var m=l.length;if(m)return f+=f<0?m:0,qi(f,m)?l[f]:n}function B1(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=L1(l,function(N,M,F){var W=Ft(f,function(ae){return ae(N)});return{criteria:W,index:++S,value:N}});return Z$(A,function(N,M){return LV(N,M,m)})}function _V(l,f){return z1(l,f,function(m,S){return sm(l,S)})}function z1(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 OV(l){return function(f){return Pa(f,l)}}function Mg(l,f,m,S){var A=S?X$: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 W1(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(S1()*(f-l+1))}function PV(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(bC(l,f,ar),l+"")}function AV(l){return O1(zs(l))}function RV(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 H1=af?function(l,f){return af.set(l,f),l}:ar,IV=nf?function(l,f){return nf(l,"toString",{configurable:!0,enumerable:!1,value:um(f),writable:!0})}:ar;function TV(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 kV(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 U1(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 G1(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 E1?E1.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:WV(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=xC(l,f);return M==null||delete M[Ci(Hr(f))]}function q1(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 K1(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 Y1(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]:EC(yt(l))}var NV=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 X1=xF||function(l){return Pn.clearTimeout(l)};function Z1(l,f){if(f)return l.slice();var m=l.length,S=y1?y1(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 MV(l,f){var m=f?zg(l.buffer):l.buffer;return new l.constructor(m,l.byteOffset,l.byteLength)}function DV(l){var f=new l.constructor(l.source,Nc.exec(l));return f.lastIndex=l.lastIndex,f}function jV(l){return Xl?_t(Xl.call(l)):{}}function Q1(l,f){var m=f?zg(l.buffer):l.buffer;return new l.constructor(m,l.byteOffset,l.length)}function J1(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 LV(l,f,m){for(var S=-1,A=l.criteria,N=f.criteria,M=A.length,F=m.length;++S<M;){var W=J1(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 eC(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 tC(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 $V(l,f){return wi(l,Yg(l),f)}function FV(l,f){return wi(l,hC(l),f)}function gf(l,f){return function(m,S){var A=Ye(m)?H$:sV,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 nC(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 rC(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 VV(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 iC(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(nS(tS(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 BV(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 uC(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 oC(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 aC(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=J$(st,Kn);if(S&&(st=eC(st,S,A,Ie)),N&&(st=tC(st,N,M,Ie)),it-=Sr,Ie&&it<ae){var Yt=No(st,Kn);return uC(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=sB(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 sC(l,f){return function(m,S){return gV(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=G1(m),S=G1(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 zV(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 lC(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),PV(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 uC(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)&&wC(He,Je),He.placeholder=S,CC(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&&C1(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 WV=Ds&&1/qc(new Ds([,-0]))[1]==ee?function(l){return new Ds(l)}:dm;function cC(l){return function(f){var m=$n(f);return m==Z?xg(f):m==le?aF(f):Q$(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&&iB(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=VV(l,f,m);else f==E||f==_?We=BV(l,f,F):(f==P||f==(v|P))&&!A.length?We=zV(l,f,m,S):We=mf.apply(n,Ie);var Je=ye?H1:wC;return CC(Je(We,Ie),l,f)}function fC(l,f,m,S){return l===n||ai(l,Ms[m])&&!vt.call(S,m)?f:l}function dC(l,f,m,S,A,N){return zt(l)&&zt(f)&&(N.set(f,l),df(l,f,n,dC,N),N.delete(f)),l}function HV(l){return ou(l)?n:l}function pC(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 UV(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=pC(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 GV(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(bC(l,n,AC),l+"")}function Ug(l){return N1(l,bn,Yg)}function Gg(l){return N1(l,or,hC)}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?j1:l,arguments.length?l(arguments[0],arguments[1]):l}function wf(l,f){var m=l.__data__;return eB(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,vC(A)]}return f}function Aa(l,f){var m=rF(l,f);return D1(m)?m:n}function qV(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 x1.call(l,f)}))}:pm,hC=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 RF:return ot;case IF:return Z;case TF:return me;case kF:return le;case NF:return Tt}return f});function KV(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 YV(l){var f=l.match(rt);return f?f[1].split(vi):[]}function gC(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 XV(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 mC(l){return typeof l.constructor=="function"&&!ru(l)?Ls(ef(l)):{}}function ZV(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 MV(l,m);case kt:case mn:case on:case _n:case Qt:case vn:case hr:case Hn:case pt:return Q1(l,m);case Z:return new S;case Re:case be:return new S(l);case ve:return DV(l);case le:return new S;case ke:return jV(l)}}function QV(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,`{
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 VY(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 BY(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 _E(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 zY={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=_E(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)=>_E(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 WY=(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:()=>FY(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=>VY(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},HY={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()}}},fM=(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))};fM.autoRemove=e=>ci(e);const dM=(e,t,n)=>{var r;return!!(!((r=e.getValue(t))==null||(r=r.toString())==null)&&r.includes(n))};dM.autoRemove=e=>ci(e);const pM=(e,t,n)=>{var r;return((r=e.getValue(t))==null||(r=r.toString())==null?void 0:r.toLowerCase())===n?.toLowerCase()};pM.autoRemove=e=>ci(e);const hM=(e,t,n)=>{var r;return(r=e.getValue(t))==null?void 0:r.includes(n)};hM.autoRemove=e=>ci(e);const gM=(e,t,n)=>!n.some(r=>{var i;return!((i=e.getValue(t))!=null&&i.includes(r))});gM.autoRemove=e=>ci(e)||!(e!=null&&e.length);const mM=(e,t,n)=>n.some(r=>{var i;return(i=e.getValue(t))==null?void 0:i.includes(r)});mM.autoRemove=e=>ci(e)||!(e!=null&&e.length);const vM=(e,t,n)=>e.getValue(t)===n;vM.autoRemove=e=>ci(e);const yM=(e,t,n)=>e.getValue(t)==n;yM.autoRemove=e=>ci(e);const vx=(e,t,n)=>{let[r,i]=n;const o=e.getValue(t);return o>=r&&o<=i};vx.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]};vx.autoRemove=e=>ci(e)||ci(e[0])&&ci(e[1]);const Ji={includesString:fM,includesStringSensitive:dM,equalsString:pM,arrIncludes:hM,arrIncludesAll:gM,arrIncludesSome:mM,equals:vM,weakEquals:yM,inNumberRange:vx};function ci(e){return e==null||e===""}const UY={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(OE(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(OE(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 OE(e,t,n){return(e&&e.autoRemove?e.autoRemove(t,n):!1)||typeof t>"u"||typeof t=="string"&&!t}const GY=(e,t,n)=>n.reduce((r,i)=>{const o=i.getValue(e);return r+(typeof o=="number"?o:0)},0),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;return n.forEach(i=>{const o=i.getValue(e);o!=null&&(r<o||r===void 0&&o>=o)&&(r=o)}),r},YY=(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]},XY=(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},ZY=(e,t)=>{if(!t.length)return;const n=t.map(o=>o.getValue(e));if(!$Y(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},QY=(e,t)=>Array.from(new Set(t.map(n=>n.getValue(e))).values()),JY=(e,t)=>new Set(t.map(n=>n.getValue(e))).size,eX=(e,t)=>t.length,$m={sum:GY,min:qY,max:KY,extent:YY,mean:XY,median:ZY,unique:QY,uniqueCount:JY,count:eX},tX={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 nX(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 rX={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 nX(o,n,r)},Ge(e.options,"debugTable","_getOrderColumnsFn"))}},Fm=()=>({left:[],right:[]}),iX={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 oX(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:[]}),aX={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=oX(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=sX()?{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 sX(){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 lX={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 uX={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()}}},cX={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)}}},fX={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()}}}},Uy=0,Gy=10,zm=()=>({pageIndex:Uy,pageSize:Gy}),dX={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?Uy:(i=(o=e.initialState)==null||(o=o.pagination)==null?void 0:o.pageIndex)!=null?i:Uy)},e.resetPageSize=r=>{var i,o;e.setPageSize(r?Gy:(i=(o=e.initialState)==null||(o=o.pagination)==null?void 0:o.pageSize)!=null?i:Gy)},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:[]}),pX={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"))}},hX={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=>{qy(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 qy(s,e.id,n,(a=r?.selectChildren)!=null?a:!0,t),s})},e.getIsSelected=()=>{const{rowSelection:n}=t.getState();return yx(e,n)},e.getIsSomeSelected=()=>{const{rowSelection:n}=t.getState();return Ky(e,n)==="some"},e.getIsAllSubRowsSelected=()=>{const{rowSelection:n}=t.getState();return Ky(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)}}}},qy=(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=>qy(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=yx(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 yx(e,t){var n;return(n=t[e.id])!=null?n:!1}function Ky(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()&&(yx(a,t)?o=!0:i=!1),a.subRows&&a.subRows.length)){const s=Ky(a,t);s==="all"?o=!0:(s==="some"&&(o=!0),i=!1)}}),i?"all":o?"some":!1}const Yy=/([0-9]+)/gm,gX=(e,t,n)=>bM(aa(e.getValue(n)).toLowerCase(),aa(t.getValue(n)).toLowerCase()),mX=(e,t,n)=>bM(aa(e.getValue(n)),aa(t.getValue(n))),vX=(e,t,n)=>bx(aa(e.getValue(n)).toLowerCase(),aa(t.getValue(n)).toLowerCase()),yX=(e,t,n)=>bx(aa(e.getValue(n)),aa(t.getValue(n))),bX=(e,t,n)=>{const r=e.getValue(n),i=t.getValue(n);return r>i?1:r<i?-1:0},xX=(e,t,n)=>bx(e.getValue(n),t.getValue(n));function bx(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 bM(e,t){const n=e.split(Yy).filter(Boolean),r=t.split(Yy).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:gX,alphanumericCaseSensitive:mX,text:vX,textCaseSensitive:yX,datetime:bX,basic:xX},wX={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(Yy).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())}},CX=[zY,lX,rX,iX,HY,UY,uX,cX,wX,tX,fX,dX,pX,hX,aX];function SX(e){var t,n;process.env.NODE_ENV!=="production"&&(e.debugAll||e.debugTable)&&console.info("Creating Table Instance...");const r=[...CX,...(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=BY(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 EX(){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=WY(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 PE(e,t){return e?_X(e)?x.createElement(e,t):e:null}function _X(e){return OX(e)||typeof e=="function"||PX(e)}function OX(e){return typeof e=="function"&&(()=>{const t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}function PX(e){return typeof e=="object"&&typeof e.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}function AX(e){const t={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[n]=x.useState(()=>({current:SX(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 RX({columns:e,data:t}){const n=AX({data:t,columns:e,getCoreRowModel:EX()});return O.jsx("div",{className:"w-full overflow-hidden",children:O.jsxs(ax,{children:[O.jsx(sx,{children:n.getHeaderGroups().map(r=>O.jsx(Mu,{children:r.headers.map(i=>O.jsx(ux,{children:i.isPlaceholder?null:PE(i.column.columnDef.header,i.getContext())},i.id))},r.id))}),O.jsx(lx,{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:PE(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 IX=({children:e,text:t,place:n="top",arrow:r=!0,classes:i,color:o="dark",tooltipItemsLimit:a=1/0})=>{const{isOpened:s,togglePopup:u}=mx(),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(lM,{open:s,onOpenChange:u,children:[O.jsx(uM,{asChild:!0,className:i?.trigger,children:e}),O.jsxs(gx,{side:n,className:c.content,children:[O.jsx("div",{className:ue(i?.tooltip),children:d}),r&&O.jsx(cM,{className:c.arrow})]})]})},xM=({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(V0,{"data-slot":!0,children:[O.jsx(z0,{ref:a,...s,...u,disabled:n}),e.map(c=>O.jsx(B0,{align:c.position,children:c.component},c.id))]}):O.jsx(F0,{ref:a,...s,...u,disabled:n}),i&&O.jsx(lc,{...u,children:i})]})})})},TX=({...e})=>{const{isOpened:t,togglePopup:n}=mx();return O.jsx(xM,{...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 kX({classNames:e,id:t,value:n,defaultValue:r,label:i,options:o=[],...a}){return O.jsx(ox,{...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",wM=e=>Su(e)?e.value:e,NX=e=>e.every(t=>typeof t=="string")||e.every(t=>typeof t=="object")?e:e.map(t=>wM(t)),Um=(e,t)=>e===null||t===null||typeof e=="string"||typeof t=="string"?e===t:e.id===t.id,CM=({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?.(NX(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=>wM(L).toLowerCase().includes(P)),I=(L,V)=>O.jsx(QT,{showRemove:V.withRemove,onClick:V.onClick,className:`${Xb({variant:L.variant,kind:L.kind})}
168
+ ${b} ${V.className}`,children:O.jsx(by,{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(Fy,{...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(yy,{className:b,onClick:E,children:L})),O.jsx(Fy,{...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(qT,{children:[O.jsx(El,{...v,children:t}),O.jsxs(GT,{items:y,multiple:n,autoHighlight:n,value:_,onValueChange:r?void 0:w,children:[n?O.jsxs($y,{disabled:r,className:"pr-8",children:[O.jsx(Ly,{children:k}),O.jsx(qd,{className:"-ml-4.5",disabled:r})]}):O.jsxs($y,{disabled:r,className:"pr-8",children:[O.jsx(Ly,{children:B}),O.jsx(qd,{className:"-ml-4.5",disabled:r})]}),O.jsxs(KT,{children:[O.jsx(ZT,{children:"No items found."}),O.jsx(YT,{children:R.map((L,V)=>{const D=n?u.some(H=>Um(H,L)):Um(d,L);return O.jsx(XT,{disabled:r,value:L,className:`${D?"bg-tertiary-bg":""} ${typeof L=="string"?"py-1":"px-2 py-2"}`,children:Su(L)?O.jsx(by,{dotPosition:"left",variant:L.variant,kind:L.kind,classNames:{className:"px-4 py-1.5"},children:L.value}):O.jsx(yy,{className:"px-4 py-1.5",children:L})},Su(L)?String(L.id):`${L}-${V}`)})})]})]}),O.jsx(lc,{...v,children:o})]})})})};CM.displayName="SelectSearch";const MX=({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 DX=Eu.exports,AE;function jX(){return AE||(AE=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"),Qw=RegExp(Ro,"g"),ug=RegExp(wa+"(?="+wa+")|"+Rs+bi,"g"),k$=RegExp([Io+"?"+Bc+"+"+Hc+"(?="+[Os,Io,"$"].join("|")+")",sg+"+"+xe+"(?="+[Os,Io+As,"$"].join("|")+")",Io+"?"+As+"+"+Hc,Io+"+"+xe,tn,en,Vc,Bi].join("|"),"g"),N$=RegExp("["+Wc+ws+Lc+Ss+"]"),M$=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,D$=["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"],j$=-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 L$={À:"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"},$$={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},F$={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},V$={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},B$=parseFloat,z$=parseInt,Jw=typeof Wf=="object"&&Wf&&Wf.Object===Object&&Wf,W$=typeof self=="object"&&self&&self.Object===Object&&self,Pn=Jw||W$||Function("return this")(),cg=t&&!t.nodeType&&t,Ca=cg&&!0&&e&&!e.nodeType&&e,e1=Ca&&Ca.exports===cg,fg=e1&&Jw.process,$r=(function(){try{var z=Ca&&Ca.require&&Ca.require("util").types;return z||fg&&fg.binding&&fg.binding("util")}catch{}})(),t1=$r&&$r.isArrayBuffer,n1=$r&&$r.isDate,r1=$r&&$r.isMap,i1=$r&&$r.isRegExp,o1=$r&&$r.isSet,a1=$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 H$(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 U$(z,re){for(var X=z==null?0:z.length;X--&&re(z[X],X,z)!==!1;);return z}function s1(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 G$(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 q$=gg("length");function K$(z){return z.split("")}function Y$(z){return z.match(og)||[]}function l1(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?sF(z,re,X):Gc(z,u1,X)}function X$(z,re,X,Ee){for(var qe=X-1,gt=z.length;++qe<gt;)if(Ee(z[qe],re))return qe;return-1}function u1(z){return z!==z}function c1(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 f1(z,re,X,Ee,qe){return qe(z,function(gt,an,_t){X=Ee?(Ee=!1,gt):re(X,gt,an,_t)}),X}function Z$(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 Q$(z,re){return Ft(re,function(X){return[X,z[X]]})}function d1(z){return z&&z.slice(0,m1(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 p1(z,re){for(var X=-1,Ee=z.length;++X<Ee&&Is(re,z[X],0)>-1;);return X}function h1(z,re){for(var X=z.length;X--&&Is(re,z[X],0)>-1;);return X}function J$(z,re){for(var X=z.length,Ee=0;X--;)z[X]===re&&++Ee;return Ee}var eF=mg(L$),tF=mg($$);function nF(z){return"\\"+V$[z]}function rF(z,re){return z==null?n:z[re]}function Ts(z){return N$.test(z)}function iF(z){return M$.test(z)}function oF(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 g1(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 aF(z){var re=-1,X=Array(z.size);return z.forEach(function(Ee){X[++re]=[Ee,Ee]}),X}function sF(z,re,X){for(var Ee=X-1,qe=z.length;++Ee<qe;)if(z[Ee]===re)return Ee;return-1}function lF(z,re,X){for(var Ee=X+1;Ee--;)if(z[Ee]===re)return Ee;return Ee}function ks(z){return Ts(z)?cF(z):q$(z)}function ii(z){return Ts(z)?fF(z):K$(z)}function m1(z){for(var re=z.length;re--&&gr.test(z.charAt(re)););return re}var uF=mg(F$);function cF(z){for(var re=ug.lastIndex=0;ug.test(z);)++re;return re}function fF(z){return z.match(ug)||[]}function dF(z){return z.match(k$)||[]}var pF=(function z(re){re=re==null?Pn:Ns.defaults(Pn.Object(),re,Ns.pick(Pn,D$));var X=re.Array,Ee=re.Date,qe=re.Error,gt=re.Function,an=re.Math,_t=re.Object,wg=re.RegExp,hF=re.String,Vr=re.TypeError,Kc=X.prototype,gF=gt.prototype,Ms=_t.prototype,Yc=re["__core-js_shared__"],Xc=gF.toString,vt=Ms.hasOwnProperty,mF=0,v1=(function(){var l=/[^.]+$/.exec(Yc&&Yc.keys&&Yc.keys.IE_PROTO||"");return l?"Symbol(src)_1."+l:""})(),Zc=Ms.toString,vF=Xc.call(_t),yF=Pn._,bF=wg("^"+Xc.call(vt).replace(Dr,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Qc=e1?re.Buffer:n,Mo=re.Symbol,Jc=re.Uint8Array,y1=Qc?Qc.allocUnsafe:n,ef=g1(_t.getPrototypeOf,_t),b1=_t.create,x1=Ms.propertyIsEnumerable,tf=Kc.splice,w1=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{}})(),xF=re.clearTimeout!==Pn.clearTimeout&&re.clearTimeout,wF=Ee&&Ee.now!==Pn.Date.now&&Ee.now,CF=re.setTimeout!==Pn.setTimeout&&re.setTimeout,rf=an.ceil,of=an.floor,Cg=_t.getOwnPropertySymbols,SF=Qc?Qc.isBuffer:n,C1=re.isFinite,EF=Kc.join,_F=g1(_t.keys,_t),sn=an.max,Ln=an.min,OF=Ee.now,PF=re.parseInt,S1=an.random,AF=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={},RF=Ra(Sg),IF=Ra(ql),TF=Ra(Eg),kF=Ra(Ds),NF=Ra(Kl),sf=Mo?Mo.prototype:n,Xl=sf?sf.valueOf:n,E1=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 _C(l)}return new Br(l)}var Ls=(function(){function l(){}return function(f){if(!zt(f))return{};if(b1)return b1(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 MF(){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 DF(){if(this.__filtered__){var l=new at(this);l.__dir__=-1,l.__filtered__=!0}else l=this.clone(),l.__dir__*=-1;return l}function jF(){var l=this.__wrapped__.value(),f=this.__dir__,m=Ye(l),S=f<0,A=m?l.length:0,N=KV(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 K1(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],lt=it.iteratee,Cr=it.type,Kn=lt(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 LF(){this.__data__=Yl?Yl(null):{},this.size=0}function $F(l){var f=this.has(l)&&delete this.__data__[l];return this.size-=f?1:0,f}function FF(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 VF(l){var f=this.__data__;return Yl?f[l]!==n:vt.call(f,l)}function BF(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=LF,Ea.prototype.delete=$F,Ea.prototype.get=FF,Ea.prototype.has=VF,Ea.prototype.set=BF;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 zF(){this.__data__=[],this.size=0}function WF(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 HF(l){var f=this.__data__,m=uf(f,l);return m<0?n:f[m][1]}function UF(l){return uf(this.__data__,l)>-1}function GF(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=zF,zi.prototype.delete=WF,zi.prototype.get=HF,zi.prototype.has=UF,zi.prototype.set=GF;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 qF(){this.size=0,this.__data__={hash:new Ea,map:new(ql||zi),string:new Ea}}function KF(l){var f=wf(this,l).delete(l);return this.size-=f?1:0,f}function YF(l){return wf(this,l).get(l)}function XF(l){return wf(this,l).has(l)}function ZF(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=qF,Wi.prototype.delete=KF,Wi.prototype.get=YF,Wi.prototype.has=XF,Wi.prototype.set=ZF;function _a(l){var f=-1,m=l==null?0:l.length;for(this.__data__=new Wi;++f<m;)this.add(l[f])}function QF(l){return this.__data__.set(l,u),this}function JF(l){return this.__data__.has(l)}_a.prototype.add=_a.prototype.push=QF,_a.prototype.has=JF;function oi(l){var f=this.__data__=new zi(l);this.size=f.size}function eV(){this.__data__=new zi,this.size=0}function tV(l){var f=this.__data__,m=f.delete(l);return this.size=f.size,m}function nV(l){return this.__data__.get(l)}function rV(l){return this.__data__.has(l)}function iV(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=eV,oi.prototype.delete=tV,oi.prototype.get=nV,oi.prototype.has=rV,oi.prototype.set=iV;function _1(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,hF):[],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 O1(l){var f=l.length;return f?l[Dg(0,f-1)]:n}function oV(l,f){return Cf(rr(l),Oa(f,0,l.length))}function aV(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 sV(l,f,m,S){return Do(l,function(A,N,M){f(S,A,m(A),M)}),S}function P1(l,f){return l&&wi(f,bn(f),l)}function lV(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=XV(l),!F)return rr(l,M)}else{var ce=$n(l),ye=ce==$||ce==ie;if(Fo(l))return Z1(l,F);if(ce==fe||ce==Ce||ye&&!A){if(M=W||ye?{}:mC(l),!F)return W?FV(l,lV(M,l)):$V(l,P1(M,l))}else{if(!Rt[ce])return A?l:{};M=ZV(l,ce,F)}}N||(N=new oi);var Ie=N.get(l);if(Ie)return Ie;N.set(l,M),UC(l)?l.forEach(function(He){M.add(zr(He,f,m,He,l,N))}):WC(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 uV(l){var f=bn(l);return function(m){return A1(m,l,f)}}function A1(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 R1(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=nC(xi),I1=nC(Ag,!0);function cV(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 fV(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:qC(S);m<S;)l[m++]=f;return l}function T1(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=JV),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=rC(),k1=rC(!0);function xi(l,f){return l&&Pg(l,f,bn)}function Ag(l,f){return l&&k1(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 N1(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)?qV(l):aB(l)}function Rg(l,f){return l>f}function dV(l,f){return l!=null&&vt.call(l,f)}function pV(l,f){return l!=null&&f in _t(l)}function hV(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 gV(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=xC(l,f);var S=l==null?l:l[Ci(Hr(f))];return S==null?n:yr(S,l,m)}function M1(l){return Ut(l)&&Gn(l)==Ce}function mV(l){return Ut(l)&&Gn(l)==Ct}function vV(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:yV(l,f,m,S,eu,A)}function yV(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)?pC(l,f,m,S,A,N):UV(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),GV(l,f,m,S,A,N)):!1}function bV(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 D1(l){if(!zt(l)||tB(l))return!1;var f=Ki(l)?bF:ya;return f.test(Ra(l))}function xV(l){return Ut(l)&&Gn(l)==ve}function wV(l){return Ut(l)&&$n(l)==le}function CV(l){return Ut(l)&&Af(l.length)&&!!Nt[Gn(l)]}function j1(l){return typeof l=="function"?l:l==null?ar:typeof l=="object"?Ye(l)?F1(l[0],l[1]):$1(l):iS(l)}function kg(l){if(!ru(l))return _F(l);var f=[];for(var m in _t(l))vt.call(l,m)&&m!="constructor"&&f.push(m);return f}function SV(l){if(!zt(l))return oB(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 L1(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 $1(l){var f=Kg(l);return f.length==1&&f[0][2]?yC(f[0][0],f[0][1]):function(m){return m===l||Tg(m,l,f)}}function F1(l,f){return Xg(l)&&vC(f)?yC(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))EV(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 EV(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=Z1(W,!0)):We?(ce=!1,se=Q1(W,!0)):se=[]:ou(W)||Ia(W)?(se=F,Ia(F)?se=KC(F):(!zt(F)||Ki(F))&&(se=mC(W))):ce=!1}ce&&(M.set(W,se),A(se,W,S,N,M),M.delete(W)),_g(l,m,se)}function V1(l,f){var m=l.length;if(m)return f+=f<0?m:0,qi(f,m)?l[f]:n}function B1(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=L1(l,function(N,M,F){var W=Ft(f,function(ae){return ae(N)});return{criteria:W,index:++S,value:N}});return Z$(A,function(N,M){return LV(N,M,m)})}function _V(l,f){return z1(l,f,function(m,S){return sm(l,S)})}function z1(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 OV(l){return function(f){return Pa(f,l)}}function Mg(l,f,m,S){var A=S?X$: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 W1(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(S1()*(f-l+1))}function PV(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(bC(l,f,ar),l+"")}function AV(l){return O1(zs(l))}function RV(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 H1=af?function(l,f){return af.set(l,f),l}:ar,IV=nf?function(l,f){return nf(l,"toString",{configurable:!0,enumerable:!1,value:um(f),writable:!0})}:ar;function TV(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 kV(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 U1(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 G1(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 E1?E1.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:WV(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=xC(l,f);return M==null||delete M[Ci(Hr(f))]}function q1(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 K1(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 Y1(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]:EC(yt(l))}var NV=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 X1=xF||function(l){return Pn.clearTimeout(l)};function Z1(l,f){if(f)return l.slice();var m=l.length,S=y1?y1(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 MV(l,f){var m=f?zg(l.buffer):l.buffer;return new l.constructor(m,l.byteOffset,l.byteLength)}function DV(l){var f=new l.constructor(l.source,Nc.exec(l));return f.lastIndex=l.lastIndex,f}function jV(l){return Xl?_t(Xl.call(l)):{}}function Q1(l,f){var m=f?zg(l.buffer):l.buffer;return new l.constructor(m,l.byteOffset,l.length)}function J1(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 LV(l,f,m){for(var S=-1,A=l.criteria,N=f.criteria,M=A.length,F=m.length;++S<M;){var W=J1(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 eC(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 tC(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 $V(l,f){return wi(l,Yg(l),f)}function FV(l,f){return wi(l,hC(l),f)}function gf(l,f){return function(m,S){var A=Ye(m)?H$:sV,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 nC(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 rC(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 VV(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 iC(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(nS(tS(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 BV(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 uC(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 oC(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 aC(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,lt=X(it),Cr=it;Cr--;)lt[Cr]=arguments[Cr];if(Ie)var Kn=Vs(He),Sr=J$(lt,Kn);if(S&&(lt=eC(lt,S,A,Ie)),N&&(lt=tC(lt,N,M,Ie)),it-=Sr,Ie&&it<ae){var Yt=No(lt,Kn);return uC(l,f,mf,He.placeholder,m,lt,Yt,F,W,ae-it)}var si=ce?m:this,Xi=ye?si[l]:l;return it=lt.length,F?lt=sB(lt,F):We&&it>1&&lt.reverse(),se&&W<it&&(lt.length=W),this&&this!==Pn&&this instanceof He&&(Xi=Je||nu(Xi)),Xi.apply(si,lt)}return He}function sC(l,f){return function(m,S){return gV(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=G1(m),S=G1(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 zV(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 lC(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),PV(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 uC(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)&&wC(He,Je),He.placeholder=S,CC(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&&C1(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 WV=Ds&&1/qc(new Ds([,-0]))[1]==ee?function(l){return new Ds(l)}:dm;function cC(l){return function(f){var m=$n(f);return m==Z?xg(f):m==le?aF(f):Q$(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&&iB(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=VV(l,f,m);else f==E||f==_?We=BV(l,f,F):(f==P||f==(v|P))&&!A.length?We=zV(l,f,m,S):We=mf.apply(n,Ie);var Je=ye?H1:wC;return CC(Je(We,Ie),l,f)}function fC(l,f,m,S){return l===n||ai(l,Ms[m])&&!vt.call(S,m)?f:l}function dC(l,f,m,S,A,N){return zt(l)&&zt(f)&&(N.set(f,l),df(l,f,n,dC,N),N.delete(f)),l}function HV(l){return ou(l)?n:l}function pC(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,lt){if(!Ul(Ie,lt)&&(We===it||A(We,it,m,S,N)))return Ie.push(lt)})){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 UV(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=pC(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 GV(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],lt=f[ye];if(S)var Cr=M?S(lt,it,ye,f,l,N):S(it,lt,ye,l,f,N);if(!(Cr===n?it===lt||A(it,lt,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(bC(l,n,AC),l+"")}function Ug(l){return N1(l,bn,Yg)}function Gg(l){return N1(l,or,hC)}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?j1:l,arguments.length?l(arguments[0],arguments[1]):l}function wf(l,f){var m=l.__data__;return eB(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,vC(A)]}return f}function Aa(l,f){var m=rF(l,f);return D1(m)?m:n}function qV(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 x1.call(l,f)}))}:pm,hC=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 RF:return ot;case IF:return Z;case TF:return me;case kF:return le;case NF:return Tt}return f});function KV(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 YV(l){var f=l.match(rt);return f?f[1].split(vi):[]}function gC(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 XV(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 mC(l){return typeof l.constructor=="function"&&!ru(l)?Ls(ef(l)):{}}function ZV(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 MV(l,m);case kt:case mn:case on:case _n:case Qt:case vn:case hr:case Hn:case pt:return Q1(l,m);case Z:return new S;case Re:case be:return new S(l);case ve:return DV(l);case le:return new S;case ke:return jV(l)}}function QV(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
169
  /* [wrapped with `+f+`] */
170
- `)}function JV(l){return Ye(l)||Ia(l)||!!(w1&&l&&l[w1])}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 eB(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 tB(l){return!!v1&&v1 in l}var nB=Yc?Ki:hm;function ru(l){var f=l&&l.constructor,m=typeof f=="function"&&f.prototype||Ms;return l===m}function vC(l){return l===l&&!zt(l)}function yC(l,f){return function(m){return m==null?!1:m[l]===f&&(f!==n||l in _t(m))}}function rB(l){var f=Of(l,function(S){return m.size===c&&m.clear(),S}),m=f.cache;return f}function iB(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?eC(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?tC(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 oB(l){var f=[];if(l!=null)for(var m in _t(l))f.push(m);return f}function aB(l){return Zc.call(l)}function bC(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 xC(l,f){return f.length<2?l:Pa(l,Wr(f,0,-1))}function sB(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 wC=SC(H1),iu=CF||function(l,f){return Pn.setTimeout(l,f)},Jg=SC(IV);function CC(l,f,m){var S=f+"";return Jg(l,QV(S,lB(YV(S),m)))}function SC(l){var f=0,m=0;return function(){var S=OF(),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 EC=rB(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 lB(l,f){return Fr(we,function(m){var S="_."+m[0];f&m[1]&&!Uc(l,S)&&l.push(S)}),l.sort()}function _C(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 uB(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 cB(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 fB(){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 dB=tt(function(l,f){return Kt(l)?Ql(l,An(f,1,Kt,!0)):[]}),pB=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)):[]}),hB=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 gB(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 mB(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 vB(l,f){return l&&l.length?hf(l,Be(f,3),!0,!0):[]}function yB(l,f){return l&&l.length?hf(l,Be(f,3),!0):[]}function bB(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),fV(l,f,m,S)):[]}function OC(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 PC(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 AC(l){var f=l==null?0:l.length;return f?An(l,1):[]}function xB(l){var f=l==null?0:l.length;return f?An(l,ee):[]}function wB(l,f){var m=l==null?0:l.length;return m?(f=f===n?1:Qe(f),An(l,f)):[]}function CB(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 RC(l){return l&&l.length?l[0]:n}function SB(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 EB(l){var f=l==null?0:l.length;return f?Wr(l,0,-1):[]}var _B=tt(function(l){var f=Ft(l,Vg);return f.length&&f[0]===l[0]?Ig(f):[]}),OB=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)):[]}),PB=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 AB(l,f){return l==null?"":EF.call(l,f)}function Hr(l){var f=l==null?0:l.length;return f?l[f-1]:n}function RB(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?lF(l,f,A):Gc(l,u1,A,!0)}function IB(l,f){return l&&l.length?V1(l,Qe(f)):n}var TB=tt(IC);function IC(l,f){return l&&l.length&&f&&f.length?Mg(l,f):l}function kB(l,f,m){return l&&l.length&&f&&f.length?Mg(l,f,Be(m,2)):l}function NB(l,f,m){return l&&l.length&&f&&f.length?Mg(l,f,n,m):l}var MB=Gi(function(l,f){var m=l==null?0:l.length,S=Og(l,f);return W1(l,Ft(f,function(A){return qi(A,m)?+A:A}).sort(J1)),S});function DB(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 W1(l,A),m}function em(l){return l==null?l:AF.call(l)}function jB(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 LB(l,f){return pf(l,f)}function $B(l,f,m){return Lg(l,f,Be(m,2))}function FB(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 VB(l,f){return pf(l,f,!0)}function BB(l,f,m){return Lg(l,f,Be(m,2),!0)}function zB(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 WB(l){return l&&l.length?U1(l):[]}function HB(l,f){return l&&l.length?U1(l,Be(f,2)):[]}function UB(l){var f=l==null?0:l.length;return f?Wr(l,1,f):[]}function GB(l,f,m){return l&&l.length?(f=m||f===n?1:Qe(f),Wr(l,0,f<0?0:f)):[]}function qB(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 KB(l,f){return l&&l.length?hf(l,Be(f,3),!1,!0):[]}function YB(l,f){return l&&l.length?hf(l,Be(f,3)):[]}var XB=tt(function(l){return jo(An(l,1,Kt,!0))}),ZB=tt(function(l){var f=Hr(l);return Kt(f)&&(f=n),jo(An(l,1,Kt,!0),Be(f,2))}),QB=tt(function(l){var f=Hr(l);return f=typeof f=="function"?f:n,jo(An(l,1,Kt,!0),n,f)});function JB(l){return l&&l.length?jo(l):[]}function ez(l,f){return l&&l.length?jo(l,Be(f,2)):[]}function tz(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 TC(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 nz=tt(function(l,f){return Kt(l)?Ql(l,f):[]}),rz=tt(function(l){return Fg(To(l,Kt))}),iz=tt(function(l){var f=Hr(l);return Kt(f)&&(f=n),Fg(To(l,Kt),Be(f,2))}),oz=tt(function(l){var f=Hr(l);return f=typeof f=="function"?f:n,Fg(To(l,Kt),n,f)}),az=tt(tm);function sz(l,f){return Y1(l||[],f||[],Zl)}function lz(l,f){return Y1(l||[],f||[],tu)}var uz=tt(function(l){var f=l.length,m=f>1?l[f-1]:n;return m=typeof m=="function"?(l.pop(),m):n,TC(l,m)});function kC(l){var f=T(l);return f.__chain__=!0,f}function cz(l,f){return f(l),l}function Sf(l,f){return f(l)}var fz=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 dz(){return kC(this)}function pz(){return new Br(this.value(),this.__chain__)}function hz(){this.__values__===n&&(this.__values__=GC(this.value()));var l=this.__index__>=this.__values__.length,f=l?n:this.__values__[this.__index__++];return{done:l,value:f}}function gz(){return this}function mz(l){for(var f,m=this;m instanceof lf;){var S=_C(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 vz(){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 yz(){return K1(this.__wrapped__,this.__actions__)}var bz=gf(function(l,f,m){vt.call(l,m)?++l[m]:Hi(l,m,1)});function xz(l,f,m){var S=Ye(l)?s1:cV;return m&&qn(l,f,m)&&(f=n),S(l,Be(f,3))}function wz(l,f){var m=Ye(l)?To:T1;return m(l,Be(f,3))}var Cz=oC(OC),Sz=oC(PC);function Ez(l,f){return An(Ef(l,f),1)}function _z(l,f){return An(Ef(l,f),ee)}function Oz(l,f,m){return m=m===n?1:Qe(m),An(Ef(l,f),m)}function NC(l,f){var m=Ye(l)?Fr:Do;return m(l,Be(f,3))}function MC(l,f){var m=Ye(l)?U$:I1;return m(l,Be(f,3))}var Pz=gf(function(l,f,m){vt.call(l,m)?l[m].push(f):Hi(l,m,[f])});function Az(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 Rz=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}),Iz=gf(function(l,f,m){Hi(l,m,f)});function Ef(l,f){var m=Ye(l)?Ft:L1;return m(l,Be(f,3))}function Tz(l,f,m,S){return l==null?[]:(Ye(f)||(f=f==null?[]:[f]),m=S?n:m,Ye(m)||(m=m==null?[]:[m]),B1(l,f,m))}var kz=gf(function(l,f,m){l[m?0:1].push(f)},function(){return[[],[]]});function Nz(l,f,m){var S=Ye(l)?pg:f1,A=arguments.length<3;return S(l,Be(f,4),m,A,Do)}function Mz(l,f,m){var S=Ye(l)?G$:f1,A=arguments.length<3;return S(l,Be(f,4),m,A,I1)}function Dz(l,f){var m=Ye(l)?To:T1;return m(l,Pf(Be(f,3)))}function jz(l){var f=Ye(l)?O1:AV;return f(l)}function Lz(l,f,m){(m?qn(l,f,m):f===n)?f=1:f=Qe(f);var S=Ye(l)?oV:RV;return S(l,f)}function $z(l){var f=Ye(l)?aV:TV;return f(l)}function Fz(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 Vz(l,f,m){var S=Ye(l)?hg:kV;return m&&qn(l,f,m)&&(f=n),S(l,Be(f,3))}var Bz=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]]),B1(l,An(f,1),[])}),_f=wF||function(){return Pn.Date.now()};function zz(l,f){if(typeof f!="function")throw new Vr(a);return l=Qe(l),function(){if(--l<1)return f.apply(this,arguments)}}function DC(l,f,m){return f=m?n:f,f=l&&f==null?l.length:f,Ui(l,I,n,n,n,n,f)}function jC(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)}),LC=tt(function(l,f,m){var S=v|w;if(m.length){var A=No(m,Vs(LC));S|=P}return Ui(f,S,l,m,A)});function $C(l,f,m){f=m?n:f;var S=Ui(l,E,n,n,n,n,n,f);return S.placeholder=$C.placeholder,S}function FC(l,f,m){f=m?n:f;var S=Ui(l,_,n,n,n,n,n,f);return S.placeholder=FC.placeholder,S}function VC(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,oS=f-si;return ce?Ln(oS,N-Xi):oS}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&&X1(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 X1(F),F=iu(it,f),Ie(W)}return F===n&&(F=iu(it,f)),M}return Sr.cancel=Cr,Sr.flush=Kn,Sr}var Wz=tt(function(l,f){return R1(l,1,f)}),Hz=tt(function(l,f,m){return R1(l,Ur(f)||0,m)});function Uz(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 Gz(l){return jC(2,l)}var qz=NV(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)}),BC=tt(function(l,f){var m=No(f,Vs(BC));return Ui(l,R,n,f,m)}),Kz=Gi(function(l,f){return Ui(l,k,n,n,n,f)});function Yz(l,f){if(typeof l!="function")throw new Vr(a);return f=f===n?f:Qe(f),tt(l,f)}function Xz(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 Zz(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),VC(l,f,{leading:S,maxWait:f,trailing:A})}function Qz(l){return DC(l,1)}function Jz(l,f){return rm(Bg(f),l)}function e3(){if(!arguments.length)return[];var l=arguments[0];return Ye(l)?l:[l]}function t3(l){return zr(l,h)}function n3(l,f){return f=typeof f=="function"?f:n,zr(l,h,f)}function r3(l){return zr(l,p|h)}function i3(l,f){return f=typeof f=="function"?f:n,zr(l,p|h,f)}function o3(l,f){return f==null||A1(l,f,bn(f))}function ai(l,f){return l===f||l!==l&&f!==f}var a3=bf(Rg),s3=bf(function(l,f){return l>=f}),Ia=M1((function(){return arguments})())?M1:function(l){return Ut(l)&&vt.call(l,"callee")&&!x1.call(l,"callee")},Ye=X.isArray,l3=t1?br(t1):mV;function ir(l){return l!=null&&Af(l.length)&&!Ki(l)}function Kt(l){return Ut(l)&&ir(l)}function u3(l){return l===!0||l===!1||Ut(l)&&Gn(l)==Fe}var Fo=SF||hm,c3=n1?br(n1):vV;function f3(l){return Ut(l)&&l.nodeType===1&&!ou(l)}function d3(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 p3(l,f){return eu(l,f)}function h3(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 g3(l){return typeof l=="number"&&C1(l)}function Ki(l){if(!zt(l))return!1;var f=Gn(l);return f==$||f==ie||f==Ke||f==de}function zC(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 WC=r1?br(r1):bV;function m3(l,f){return l===f||Tg(l,f,Kg(f))}function v3(l,f,m){return m=typeof m=="function"?m:n,Tg(l,f,Kg(f),m)}function y3(l){return HC(l)&&l!=+l}function b3(l){if(nB(l))throw new qe(o);return D1(l)}function x3(l){return l===null}function w3(l){return l==null}function HC(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)==vF}var om=i1?br(i1):xV;function C3(l){return zC(l)&&l>=-Q&&l<=Q}var UC=o1?br(o1):wV;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=a1?br(a1):CV;function S3(l){return l===n}function E3(l){return Ut(l)&&$n(l)==Tt}function _3(l){return Ut(l)&&Gn(l)==Dn}var O3=bf(Ng),P3=bf(function(l,f){return l<=f});function GC(l){if(!l)return[];if(ir(l))return Rf(l)?ii(l):rr(l);if(Gl&&l[Gl])return oF(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 qC(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=d1(l);var m=Mc.test(l);return m||$l.test(l)?z$(l.slice(2),m?2:8):bs.test(l)?K:+l}function KC(l){return wi(l,or(l))}function A3(l){return l?Oa(Qe(l),-Q,Q):l===0?l:0}function yt(l){return l==null?"":xr(l)}var R3=$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])}),YC=$s(function(l,f){wi(f,or(f),l)}),If=$s(function(l,f,m,S){wi(f,or(f),l,S)}),I3=$s(function(l,f,m,S){wi(f,bn(f),l,S)}),T3=Gi(Og);function k3(l,f){var m=Ls(l);return f==null?m:P1(m,f)}var N3=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}),M3=tt(function(l){return l.push(n,dC),yr(XC,n,l)});function D3(l,f){return l1(l,Be(f,3),xi)}function j3(l,f){return l1(l,Be(f,3),Ag)}function L3(l,f){return l==null?l:Pg(l,Be(f,3),or)}function $3(l,f){return l==null?l:k1(l,Be(f,3),or)}function F3(l,f){return l&&xi(l,Be(f,3))}function V3(l,f){return l&&Ag(l,Be(f,3))}function B3(l){return l==null?[]:ff(l,bn(l))}function z3(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 W3(l,f){return l!=null&&gC(l,f,dV)}function sm(l,f){return l!=null&&gC(l,f,pV)}var H3=sC(function(l,f,m){f!=null&&typeof f.toString!="function"&&(f=Zc.call(f)),l[f]=m},um(ar)),U3=sC(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),G3=tt(Jl);function bn(l){return ir(l)?_1(l):kg(l)}function or(l){return ir(l)?_1(l,!0):SV(l)}function q3(l,f){var m={};return f=Be(f,3),xi(l,function(S,A,N){Hi(m,f(S,A,N),S)}),m}function K3(l,f){var m={};return f=Be(f,3),xi(l,function(S,A,N){Hi(m,A,f(S,A,N))}),m}var Y3=$s(function(l,f,m){df(l,f,m)}),XC=$s(function(l,f,m,S){df(l,f,m,S)}),X3=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,HV));for(var A=f.length;A--;)$g(m,f[A]);return m});function Z3(l,f){return ZC(l,Pf(Be(f)))}var Q3=Gi(function(l,f){return l==null?{}:_V(l,f)});function ZC(l,f){if(l==null)return{};var m=Ft(Gg(l),function(S){return[S]});return f=Be(f),z1(l,m,function(S,A){return f(S,A[0])})}function J3(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 e5(l,f,m){return l==null?l:tu(l,f,m)}function t5(l,f,m,S){return S=typeof S=="function"?S:n,l==null?l:tu(l,f,m,S)}var QC=cC(bn),JC=cC(or);function n5(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 r5(l,f){return l==null?!0:$g(l,f)}function i5(l,f,m){return l==null?l:q1(l,f,Bg(m))}function o5(l,f,m,S){return S=typeof S=="function"?S:n,l==null?l:q1(l,f,Bg(m),S)}function zs(l){return l==null?[]:bg(l,bn(l))}function a5(l){return l==null?[]:bg(l,or(l))}function s5(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 l5(l,f,m){return f=Yi(f),m===n?(m=f,f=0):m=Yi(m),l=Ur(l),hV(l,f,m)}function u5(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=S1();return Ln(l+A*(f-l+B$("1e-"+((A+"").length-1))),f)}return Dg(l,f)}var c5=Fs(function(l,f,m){return f=f.toLowerCase(),l+(m?eS(f):f)});function eS(l){return lm(yt(l).toLowerCase())}function tS(l){return l=yt(l),l&&l.replace(yi,eF).replace(Qw,"")}function f5(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 d5(l){return l=yt(l),l&&ma.test(l)?l.replace(mi,tF):l}function p5(l){return l=yt(l),l&&vs.test(l)?l.replace(Dr,"\\$&"):l}var h5=Fs(function(l,f,m){return l+(m?"-":"")+f.toLowerCase()}),g5=Fs(function(l,f,m){return l+(m?" ":"")+f.toLowerCase()}),m5=iC("toLowerCase");function v5(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 y5(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 b5(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 x5(l,f,m){return m||f==null?f=0:f&&(f=+f),PF(yt(l).replace(jr,""),f||0)}function w5(l,f,m){return(m?qn(l,f,m):f===n)?f=1:f=Qe(f),jg(yt(l),f)}function C5(){var l=arguments,f=yt(l[0]);return l.length<3?f:f.replace(l[1],l[2])}var S5=Fs(function(l,f,m){return l+(m?"_":"")+f.toLowerCase()});function E5(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 _5=Fs(function(l,f,m){return l+(m?" ":"")+lm(f)});function O5(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 P5(l,f,m){var S=T.templateSettings;m&&qn(l,f,m)&&(f=n),l=yt(l),f=If({},f,S,fC);var A=If({},f.imports,S.imports,fC),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["+ ++j$+"]")+`
171
- `;l.replace(ye,function(He,it,st,Cr,Kn,Sr){return st||(st=Cr),ce+=l.slice(ae,Sr).replace(Dc,nF),it&&(F=!0,ce+=`' +
170
+ `)}function JV(l){return Ye(l)||Ia(l)||!!(w1&&l&&l[w1])}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 eB(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 tB(l){return!!v1&&v1 in l}var nB=Yc?Ki:hm;function ru(l){var f=l&&l.constructor,m=typeof f=="function"&&f.prototype||Ms;return l===m}function vC(l){return l===l&&!zt(l)}function yC(l,f){return function(m){return m==null?!1:m[l]===f&&(f!==n||l in _t(m))}}function rB(l){var f=Of(l,function(S){return m.size===c&&m.clear(),S}),m=f.cache;return f}function iB(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?eC(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?tC(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 oB(l){var f=[];if(l!=null)for(var m in _t(l))f.push(m);return f}function aB(l){return Zc.call(l)}function bC(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 xC(l,f){return f.length<2?l:Pa(l,Wr(f,0,-1))}function sB(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 wC=SC(H1),iu=CF||function(l,f){return Pn.setTimeout(l,f)},Jg=SC(IV);function CC(l,f,m){var S=f+"";return Jg(l,QV(S,lB(YV(S),m)))}function SC(l){var f=0,m=0;return function(){var S=OF(),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 EC=rB(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 lB(l,f){return Fr(we,function(m){var S="_."+m[0];f&m[1]&&!Uc(l,S)&&l.push(S)}),l.sort()}function _C(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 uB(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 cB(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 fB(){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 dB=tt(function(l,f){return Kt(l)?Ql(l,An(f,1,Kt,!0)):[]}),pB=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)):[]}),hB=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 gB(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 mB(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 vB(l,f){return l&&l.length?hf(l,Be(f,3),!0,!0):[]}function yB(l,f){return l&&l.length?hf(l,Be(f,3),!0):[]}function bB(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),fV(l,f,m,S)):[]}function OC(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 PC(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 AC(l){var f=l==null?0:l.length;return f?An(l,1):[]}function xB(l){var f=l==null?0:l.length;return f?An(l,ee):[]}function wB(l,f){var m=l==null?0:l.length;return m?(f=f===n?1:Qe(f),An(l,f)):[]}function CB(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 RC(l){return l&&l.length?l[0]:n}function SB(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 EB(l){var f=l==null?0:l.length;return f?Wr(l,0,-1):[]}var _B=tt(function(l){var f=Ft(l,Vg);return f.length&&f[0]===l[0]?Ig(f):[]}),OB=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)):[]}),PB=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 AB(l,f){return l==null?"":EF.call(l,f)}function Hr(l){var f=l==null?0:l.length;return f?l[f-1]:n}function RB(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?lF(l,f,A):Gc(l,u1,A,!0)}function IB(l,f){return l&&l.length?V1(l,Qe(f)):n}var TB=tt(IC);function IC(l,f){return l&&l.length&&f&&f.length?Mg(l,f):l}function kB(l,f,m){return l&&l.length&&f&&f.length?Mg(l,f,Be(m,2)):l}function NB(l,f,m){return l&&l.length&&f&&f.length?Mg(l,f,n,m):l}var MB=Gi(function(l,f){var m=l==null?0:l.length,S=Og(l,f);return W1(l,Ft(f,function(A){return qi(A,m)?+A:A}).sort(J1)),S});function DB(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 W1(l,A),m}function em(l){return l==null?l:AF.call(l)}function jB(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 LB(l,f){return pf(l,f)}function $B(l,f,m){return Lg(l,f,Be(m,2))}function FB(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 VB(l,f){return pf(l,f,!0)}function BB(l,f,m){return Lg(l,f,Be(m,2),!0)}function zB(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 WB(l){return l&&l.length?U1(l):[]}function HB(l,f){return l&&l.length?U1(l,Be(f,2)):[]}function UB(l){var f=l==null?0:l.length;return f?Wr(l,1,f):[]}function GB(l,f,m){return l&&l.length?(f=m||f===n?1:Qe(f),Wr(l,0,f<0?0:f)):[]}function qB(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 KB(l,f){return l&&l.length?hf(l,Be(f,3),!1,!0):[]}function YB(l,f){return l&&l.length?hf(l,Be(f,3)):[]}var XB=tt(function(l){return jo(An(l,1,Kt,!0))}),ZB=tt(function(l){var f=Hr(l);return Kt(f)&&(f=n),jo(An(l,1,Kt,!0),Be(f,2))}),QB=tt(function(l){var f=Hr(l);return f=typeof f=="function"?f:n,jo(An(l,1,Kt,!0),n,f)});function JB(l){return l&&l.length?jo(l):[]}function ez(l,f){return l&&l.length?jo(l,Be(f,2)):[]}function tz(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 TC(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 nz=tt(function(l,f){return Kt(l)?Ql(l,f):[]}),rz=tt(function(l){return Fg(To(l,Kt))}),iz=tt(function(l){var f=Hr(l);return Kt(f)&&(f=n),Fg(To(l,Kt),Be(f,2))}),oz=tt(function(l){var f=Hr(l);return f=typeof f=="function"?f:n,Fg(To(l,Kt),n,f)}),az=tt(tm);function sz(l,f){return Y1(l||[],f||[],Zl)}function lz(l,f){return Y1(l||[],f||[],tu)}var uz=tt(function(l){var f=l.length,m=f>1?l[f-1]:n;return m=typeof m=="function"?(l.pop(),m):n,TC(l,m)});function kC(l){var f=T(l);return f.__chain__=!0,f}function cz(l,f){return f(l),l}function Sf(l,f){return f(l)}var fz=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 dz(){return kC(this)}function pz(){return new Br(this.value(),this.__chain__)}function hz(){this.__values__===n&&(this.__values__=GC(this.value()));var l=this.__index__>=this.__values__.length,f=l?n:this.__values__[this.__index__++];return{done:l,value:f}}function gz(){return this}function mz(l){for(var f,m=this;m instanceof lf;){var S=_C(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 vz(){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 yz(){return K1(this.__wrapped__,this.__actions__)}var bz=gf(function(l,f,m){vt.call(l,m)?++l[m]:Hi(l,m,1)});function xz(l,f,m){var S=Ye(l)?s1:cV;return m&&qn(l,f,m)&&(f=n),S(l,Be(f,3))}function wz(l,f){var m=Ye(l)?To:T1;return m(l,Be(f,3))}var Cz=oC(OC),Sz=oC(PC);function Ez(l,f){return An(Ef(l,f),1)}function _z(l,f){return An(Ef(l,f),ee)}function Oz(l,f,m){return m=m===n?1:Qe(m),An(Ef(l,f),m)}function NC(l,f){var m=Ye(l)?Fr:Do;return m(l,Be(f,3))}function MC(l,f){var m=Ye(l)?U$:I1;return m(l,Be(f,3))}var Pz=gf(function(l,f,m){vt.call(l,m)?l[m].push(f):Hi(l,m,[f])});function Az(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 Rz=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}),Iz=gf(function(l,f,m){Hi(l,m,f)});function Ef(l,f){var m=Ye(l)?Ft:L1;return m(l,Be(f,3))}function Tz(l,f,m,S){return l==null?[]:(Ye(f)||(f=f==null?[]:[f]),m=S?n:m,Ye(m)||(m=m==null?[]:[m]),B1(l,f,m))}var kz=gf(function(l,f,m){l[m?0:1].push(f)},function(){return[[],[]]});function Nz(l,f,m){var S=Ye(l)?pg:f1,A=arguments.length<3;return S(l,Be(f,4),m,A,Do)}function Mz(l,f,m){var S=Ye(l)?G$:f1,A=arguments.length<3;return S(l,Be(f,4),m,A,I1)}function Dz(l,f){var m=Ye(l)?To:T1;return m(l,Pf(Be(f,3)))}function jz(l){var f=Ye(l)?O1:AV;return f(l)}function Lz(l,f,m){(m?qn(l,f,m):f===n)?f=1:f=Qe(f);var S=Ye(l)?oV:RV;return S(l,f)}function $z(l){var f=Ye(l)?aV:TV;return f(l)}function Fz(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 Vz(l,f,m){var S=Ye(l)?hg:kV;return m&&qn(l,f,m)&&(f=n),S(l,Be(f,3))}var Bz=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]]),B1(l,An(f,1),[])}),_f=wF||function(){return Pn.Date.now()};function zz(l,f){if(typeof f!="function")throw new Vr(a);return l=Qe(l),function(){if(--l<1)return f.apply(this,arguments)}}function DC(l,f,m){return f=m?n:f,f=l&&f==null?l.length:f,Ui(l,I,n,n,n,n,f)}function jC(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)}),LC=tt(function(l,f,m){var S=v|w;if(m.length){var A=No(m,Vs(LC));S|=P}return Ui(f,S,l,m,A)});function $C(l,f,m){f=m?n:f;var S=Ui(l,E,n,n,n,n,n,f);return S.placeholder=$C.placeholder,S}function FC(l,f,m){f=m?n:f;var S=Ui(l,_,n,n,n,n,n,f);return S.placeholder=FC.placeholder,S}function VC(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,oS=f-si;return ce?Ln(oS,N-Xi):oS}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 lt(Yt);F=iu(it,Je(Yt))}function lt(Yt){return F=n,ye&&S?Ie(Yt):(S=A=n,M)}function Cr(){F!==n&&X1(F),ae=0,S=W=A=F=n}function Kn(){return F===n?M:lt(_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 X1(F),F=iu(it,f),Ie(W)}return F===n&&(F=iu(it,f)),M}return Sr.cancel=Cr,Sr.flush=Kn,Sr}var Wz=tt(function(l,f){return R1(l,1,f)}),Hz=tt(function(l,f,m){return R1(l,Ur(f)||0,m)});function Uz(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 Gz(l){return jC(2,l)}var qz=NV(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)}),BC=tt(function(l,f){var m=No(f,Vs(BC));return Ui(l,R,n,f,m)}),Kz=Gi(function(l,f){return Ui(l,k,n,n,n,f)});function Yz(l,f){if(typeof l!="function")throw new Vr(a);return f=f===n?f:Qe(f),tt(l,f)}function Xz(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 Zz(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),VC(l,f,{leading:S,maxWait:f,trailing:A})}function Qz(l){return DC(l,1)}function Jz(l,f){return rm(Bg(f),l)}function e3(){if(!arguments.length)return[];var l=arguments[0];return Ye(l)?l:[l]}function t3(l){return zr(l,h)}function n3(l,f){return f=typeof f=="function"?f:n,zr(l,h,f)}function r3(l){return zr(l,p|h)}function i3(l,f){return f=typeof f=="function"?f:n,zr(l,p|h,f)}function o3(l,f){return f==null||A1(l,f,bn(f))}function ai(l,f){return l===f||l!==l&&f!==f}var a3=bf(Rg),s3=bf(function(l,f){return l>=f}),Ia=M1((function(){return arguments})())?M1:function(l){return Ut(l)&&vt.call(l,"callee")&&!x1.call(l,"callee")},Ye=X.isArray,l3=t1?br(t1):mV;function ir(l){return l!=null&&Af(l.length)&&!Ki(l)}function Kt(l){return Ut(l)&&ir(l)}function u3(l){return l===!0||l===!1||Ut(l)&&Gn(l)==Fe}var Fo=SF||hm,c3=n1?br(n1):vV;function f3(l){return Ut(l)&&l.nodeType===1&&!ou(l)}function d3(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 p3(l,f){return eu(l,f)}function h3(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 g3(l){return typeof l=="number"&&C1(l)}function Ki(l){if(!zt(l))return!1;var f=Gn(l);return f==$||f==ie||f==Ke||f==de}function zC(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 WC=r1?br(r1):bV;function m3(l,f){return l===f||Tg(l,f,Kg(f))}function v3(l,f,m){return m=typeof m=="function"?m:n,Tg(l,f,Kg(f),m)}function y3(l){return HC(l)&&l!=+l}function b3(l){if(nB(l))throw new qe(o);return D1(l)}function x3(l){return l===null}function w3(l){return l==null}function HC(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)==vF}var om=i1?br(i1):xV;function C3(l){return zC(l)&&l>=-Q&&l<=Q}var UC=o1?br(o1):wV;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=a1?br(a1):CV;function S3(l){return l===n}function E3(l){return Ut(l)&&$n(l)==Tt}function _3(l){return Ut(l)&&Gn(l)==Dn}var O3=bf(Ng),P3=bf(function(l,f){return l<=f});function GC(l){if(!l)return[];if(ir(l))return Rf(l)?ii(l):rr(l);if(Gl&&l[Gl])return oF(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 qC(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=d1(l);var m=Mc.test(l);return m||$l.test(l)?z$(l.slice(2),m?2:8):bs.test(l)?K:+l}function KC(l){return wi(l,or(l))}function A3(l){return l?Oa(Qe(l),-Q,Q):l===0?l:0}function yt(l){return l==null?"":xr(l)}var R3=$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])}),YC=$s(function(l,f){wi(f,or(f),l)}),If=$s(function(l,f,m,S){wi(f,or(f),l,S)}),I3=$s(function(l,f,m,S){wi(f,bn(f),l,S)}),T3=Gi(Og);function k3(l,f){var m=Ls(l);return f==null?m:P1(m,f)}var N3=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}),M3=tt(function(l){return l.push(n,dC),yr(XC,n,l)});function D3(l,f){return l1(l,Be(f,3),xi)}function j3(l,f){return l1(l,Be(f,3),Ag)}function L3(l,f){return l==null?l:Pg(l,Be(f,3),or)}function $3(l,f){return l==null?l:k1(l,Be(f,3),or)}function F3(l,f){return l&&xi(l,Be(f,3))}function V3(l,f){return l&&Ag(l,Be(f,3))}function B3(l){return l==null?[]:ff(l,bn(l))}function z3(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 W3(l,f){return l!=null&&gC(l,f,dV)}function sm(l,f){return l!=null&&gC(l,f,pV)}var H3=sC(function(l,f,m){f!=null&&typeof f.toString!="function"&&(f=Zc.call(f)),l[f]=m},um(ar)),U3=sC(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),G3=tt(Jl);function bn(l){return ir(l)?_1(l):kg(l)}function or(l){return ir(l)?_1(l,!0):SV(l)}function q3(l,f){var m={};return f=Be(f,3),xi(l,function(S,A,N){Hi(m,f(S,A,N),S)}),m}function K3(l,f){var m={};return f=Be(f,3),xi(l,function(S,A,N){Hi(m,A,f(S,A,N))}),m}var Y3=$s(function(l,f,m){df(l,f,m)}),XC=$s(function(l,f,m,S){df(l,f,m,S)}),X3=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,HV));for(var A=f.length;A--;)$g(m,f[A]);return m});function Z3(l,f){return ZC(l,Pf(Be(f)))}var Q3=Gi(function(l,f){return l==null?{}:_V(l,f)});function ZC(l,f){if(l==null)return{};var m=Ft(Gg(l),function(S){return[S]});return f=Be(f),z1(l,m,function(S,A){return f(S,A[0])})}function J3(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 e5(l,f,m){return l==null?l:tu(l,f,m)}function t5(l,f,m,S){return S=typeof S=="function"?S:n,l==null?l:tu(l,f,m,S)}var QC=cC(bn),JC=cC(or);function n5(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 r5(l,f){return l==null?!0:$g(l,f)}function i5(l,f,m){return l==null?l:q1(l,f,Bg(m))}function o5(l,f,m,S){return S=typeof S=="function"?S:n,l==null?l:q1(l,f,Bg(m),S)}function zs(l){return l==null?[]:bg(l,bn(l))}function a5(l){return l==null?[]:bg(l,or(l))}function s5(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 l5(l,f,m){return f=Yi(f),m===n?(m=f,f=0):m=Yi(m),l=Ur(l),hV(l,f,m)}function u5(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=S1();return Ln(l+A*(f-l+B$("1e-"+((A+"").length-1))),f)}return Dg(l,f)}var c5=Fs(function(l,f,m){return f=f.toLowerCase(),l+(m?eS(f):f)});function eS(l){return lm(yt(l).toLowerCase())}function tS(l){return l=yt(l),l&&l.replace(yi,eF).replace(Qw,"")}function f5(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 d5(l){return l=yt(l),l&&ma.test(l)?l.replace(mi,tF):l}function p5(l){return l=yt(l),l&&vs.test(l)?l.replace(Dr,"\\$&"):l}var h5=Fs(function(l,f,m){return l+(m?"-":"")+f.toLowerCase()}),g5=Fs(function(l,f,m){return l+(m?" ":"")+f.toLowerCase()}),m5=iC("toLowerCase");function v5(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 y5(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 b5(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 x5(l,f,m){return m||f==null?f=0:f&&(f=+f),PF(yt(l).replace(jr,""),f||0)}function w5(l,f,m){return(m?qn(l,f,m):f===n)?f=1:f=Qe(f),jg(yt(l),f)}function C5(){var l=arguments,f=yt(l[0]);return l.length<3?f:f.replace(l[1],l[2])}var S5=Fs(function(l,f,m){return l+(m?"_":"")+f.toLowerCase()});function E5(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 _5=Fs(function(l,f,m){return l+(m?" ":"")+lm(f)});function O5(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 P5(l,f,m){var S=T.templateSettings;m&&qn(l,f,m)&&(f=n),l=yt(l),f=If({},f,S,fC);var A=If({},f.imports,S.imports,fC),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["+ ++j$+"]")+`
171
+ `;l.replace(ye,function(He,it,lt,Cr,Kn,Sr){return lt||(lt=Cr),ce+=l.slice(ae,Sr).replace(Dc,nF),it&&(F=!0,ce+=`' +
172
172
  __e(`+it+`) +
173
173
  '`),Kn&&(W=!0,ce+=`';
174
174
  `+Kn+`;
175
- __p += '`),st&&(ce+=`' +
176
- ((__t = (`+st+`)) == null ? '' : __t) +
175
+ __p += '`),lt&&(ce+=`' +
176
+ ((__t = (`+lt+`)) == null ? '' : __t) +
177
177
  '`),ae=Sr+He.length,He}),ce+=`';
178
178
  `;var We=vt.call(f,"variable")&&f.variable;if(!We)ce=`with (obj) {
179
179
  `+ce+`
@@ -184,18 +184,18 @@ __p += '`),st&&(ce+=`' +
184
184
  function print() { __p += __j.call(arguments, '') }
185
185
  `:`;
186
186
  `)+ce+`return __p
187
- }`;var Je=rS(function(){return gt(N,Ie+"return "+ce).apply(n,M)});if(Je.source=ce,im(Je))throw Je;return Je}function A5(l){return yt(l).toLowerCase()}function R5(l){return yt(l).toUpperCase()}function I5(l,f,m){if(l=yt(l),l&&(m||f===n))return d1(l);if(!l||!(f=xr(f)))return l;var S=ii(l),A=ii(f),N=p1(S,A),M=h1(S,A)+1;return $o(S,N,M).join("")}function T5(l,f,m){if(l=yt(l),l&&(m||f===n))return l.slice(0,m1(l)+1);if(!l||!(f=xr(f)))return l;var S=ii(l),A=h1(S,ii(f))+1;return $o(S,0,A).join("")}function k5(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=p1(S,ii(f));return $o(S,A).join("")}function N5(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 M5(l){return l=yt(l),l&&Jt.test(l)?l.replace(On,uF):l}var D5=Fs(function(l,f,m){return l+(m?" ":"")+f.toUpperCase()}),lm=iC("toUpperCase");function nS(l,f,m){return l=yt(l),f=m?n:f,f===n?iF(l)?dF(l):Y$(l):l.match(f)||[]}var rS=tt(function(l,f){try{return yr(l,n,f)}catch(m){return im(m)?m:new qe(m)}}),j5=Gi(function(l,f){return Fr(f,function(m){m=Ci(m),Hi(l,m,nm(l[m],l))}),l});function L5(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 $5(l){return uV(zr(l,p))}function um(l){return function(){return l}}function F5(l,f){return l==null||l!==l?f:l}var V5=aC(),B5=aC(!0);function ar(l){return l}function cm(l){return j1(typeof l=="function"?l:zr(l,p))}function z5(l){return $1(zr(l,p))}function W5(l,f){return F1(l,zr(f,p))}var H5=tt(function(l,f){return function(m){return Jl(m,l,f)}}),U5=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 G5(){return Pn._===this&&(Pn._=yF),this}function dm(){}function q5(l){return l=Qe(l),tt(function(f){return V1(f,l)})}var K5=Wg(Ft),Y5=Wg(s1),X5=Wg(hg);function iS(l){return Xg(l)?gg(Ci(l)):OV(l)}function Z5(l){return function(f){return l==null?n:Pa(l,f)}}var Q5=lC(),J5=lC(!0);function pm(){return[]}function hm(){return!1}function eW(){return{}}function tW(){return""}function nW(){return!0}function rW(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 iW(l){return Ye(l)?Ft(l,Ci):wr(l)?[l]:rr(EC(yt(l)))}function oW(l){var f=++mF;return yt(l)+f}var aW=vf(function(l,f){return l+f},0),sW=Hg("ceil"),lW=vf(function(l,f){return l/f},1),uW=Hg("floor");function cW(l){return l&&l.length?cf(l,ar,Rg):n}function fW(l,f){return l&&l.length?cf(l,Be(f,2),Rg):n}function dW(l){return c1(l,ar)}function pW(l,f){return c1(l,Be(f,2))}function hW(l){return l&&l.length?cf(l,ar,Ng):n}function gW(l,f){return l&&l.length?cf(l,Be(f,2),Ng):n}var mW=vf(function(l,f){return l*f},1),vW=Hg("round"),yW=vf(function(l,f){return l-f},0);function bW(l){return l&&l.length?vg(l,ar):0}function xW(l,f){return l&&l.length?vg(l,Be(f,2)):0}return T.after=zz,T.ary=DC,T.assign=R3,T.assignIn=YC,T.assignInWith=If,T.assignWith=I3,T.at=T3,T.before=jC,T.bind=nm,T.bindAll=j5,T.bindKey=LC,T.castArray=e3,T.chain=kC,T.chunk=uB,T.compact=cB,T.concat=fB,T.cond=L5,T.conforms=$5,T.constant=um,T.countBy=bz,T.create=k3,T.curry=$C,T.curryRight=FC,T.debounce=VC,T.defaults=N3,T.defaultsDeep=M3,T.defer=Wz,T.delay=Hz,T.difference=dB,T.differenceBy=pB,T.differenceWith=hB,T.drop=gB,T.dropRight=mB,T.dropRightWhile=vB,T.dropWhile=yB,T.fill=bB,T.filter=wz,T.flatMap=Ez,T.flatMapDeep=_z,T.flatMapDepth=Oz,T.flatten=AC,T.flattenDeep=xB,T.flattenDepth=wB,T.flip=Uz,T.flow=V5,T.flowRight=B5,T.fromPairs=CB,T.functions=B3,T.functionsIn=z3,T.groupBy=Pz,T.initial=EB,T.intersection=_B,T.intersectionBy=OB,T.intersectionWith=PB,T.invert=H3,T.invertBy=U3,T.invokeMap=Rz,T.iteratee=cm,T.keyBy=Iz,T.keys=bn,T.keysIn=or,T.map=Ef,T.mapKeys=q3,T.mapValues=K3,T.matches=z5,T.matchesProperty=W5,T.memoize=Of,T.merge=Y3,T.mergeWith=XC,T.method=H5,T.methodOf=U5,T.mixin=fm,T.negate=Pf,T.nthArg=q5,T.omit=X3,T.omitBy=Z3,T.once=Gz,T.orderBy=Tz,T.over=K5,T.overArgs=qz,T.overEvery=Y5,T.overSome=X5,T.partial=rm,T.partialRight=BC,T.partition=kz,T.pick=Q3,T.pickBy=ZC,T.property=iS,T.propertyOf=Z5,T.pull=TB,T.pullAll=IC,T.pullAllBy=kB,T.pullAllWith=NB,T.pullAt=MB,T.range=Q5,T.rangeRight=J5,T.rearg=Kz,T.reject=Dz,T.remove=DB,T.rest=Yz,T.reverse=em,T.sampleSize=Lz,T.set=e5,T.setWith=t5,T.shuffle=$z,T.slice=jB,T.sortBy=Bz,T.sortedUniq=WB,T.sortedUniqBy=HB,T.split=E5,T.spread=Xz,T.tail=UB,T.take=GB,T.takeRight=qB,T.takeRightWhile=KB,T.takeWhile=YB,T.tap=cz,T.throttle=Zz,T.thru=Sf,T.toArray=GC,T.toPairs=QC,T.toPairsIn=JC,T.toPath=iW,T.toPlainObject=KC,T.transform=n5,T.unary=Qz,T.union=XB,T.unionBy=ZB,T.unionWith=QB,T.uniq=JB,T.uniqBy=ez,T.uniqWith=tz,T.unset=r5,T.unzip=tm,T.unzipWith=TC,T.update=i5,T.updateWith=o5,T.values=zs,T.valuesIn=a5,T.without=nz,T.words=nS,T.wrap=Jz,T.xor=rz,T.xorBy=iz,T.xorWith=oz,T.zip=az,T.zipObject=sz,T.zipObjectDeep=lz,T.zipWith=uz,T.entries=QC,T.entriesIn=JC,T.extend=YC,T.extendWith=If,fm(T,T),T.add=aW,T.attempt=rS,T.camelCase=c5,T.capitalize=eS,T.ceil=sW,T.clamp=s5,T.clone=t3,T.cloneDeep=r3,T.cloneDeepWith=i3,T.cloneWith=n3,T.conformsTo=o3,T.deburr=tS,T.defaultTo=F5,T.divide=lW,T.endsWith=f5,T.eq=ai,T.escape=d5,T.escapeRegExp=p5,T.every=xz,T.find=Cz,T.findIndex=OC,T.findKey=D3,T.findLast=Sz,T.findLastIndex=PC,T.findLastKey=j3,T.floor=uW,T.forEach=NC,T.forEachRight=MC,T.forIn=L3,T.forInRight=$3,T.forOwn=F3,T.forOwnRight=V3,T.get=am,T.gt=a3,T.gte=s3,T.has=W3,T.hasIn=sm,T.head=RC,T.identity=ar,T.includes=Az,T.indexOf=SB,T.inRange=l5,T.invoke=G3,T.isArguments=Ia,T.isArray=Ye,T.isArrayBuffer=l3,T.isArrayLike=ir,T.isArrayLikeObject=Kt,T.isBoolean=u3,T.isBuffer=Fo,T.isDate=c3,T.isElement=f3,T.isEmpty=d3,T.isEqual=p3,T.isEqualWith=h3,T.isError=im,T.isFinite=g3,T.isFunction=Ki,T.isInteger=zC,T.isLength=Af,T.isMap=WC,T.isMatch=m3,T.isMatchWith=v3,T.isNaN=y3,T.isNative=b3,T.isNil=w3,T.isNull=x3,T.isNumber=HC,T.isObject=zt,T.isObjectLike=Ut,T.isPlainObject=ou,T.isRegExp=om,T.isSafeInteger=C3,T.isSet=UC,T.isString=Rf,T.isSymbol=wr,T.isTypedArray=Bs,T.isUndefined=S3,T.isWeakMap=E3,T.isWeakSet=_3,T.join=AB,T.kebabCase=h5,T.last=Hr,T.lastIndexOf=RB,T.lowerCase=g5,T.lowerFirst=m5,T.lt=O3,T.lte=P3,T.max=cW,T.maxBy=fW,T.mean=dW,T.meanBy=pW,T.min=hW,T.minBy=gW,T.stubArray=pm,T.stubFalse=hm,T.stubObject=eW,T.stubString=tW,T.stubTrue=nW,T.multiply=mW,T.nth=IB,T.noConflict=G5,T.noop=dm,T.now=_f,T.pad=v5,T.padEnd=y5,T.padStart=b5,T.parseInt=x5,T.random=u5,T.reduce=Nz,T.reduceRight=Mz,T.repeat=w5,T.replace=C5,T.result=J3,T.round=vW,T.runInContext=z,T.sample=jz,T.size=Fz,T.snakeCase=S5,T.some=Vz,T.sortedIndex=LB,T.sortedIndexBy=$B,T.sortedIndexOf=FB,T.sortedLastIndex=VB,T.sortedLastIndexBy=BB,T.sortedLastIndexOf=zB,T.startCase=_5,T.startsWith=O5,T.subtract=yW,T.sum=bW,T.sumBy=xW,T.template=P5,T.times=rW,T.toFinite=Yi,T.toInteger=Qe,T.toLength=qC,T.toLower=A5,T.toNumber=Ur,T.toSafeInteger=A3,T.toString=yt,T.toUpper=R5,T.trim=I5,T.trimEnd=T5,T.trimStart=k5,T.truncate=N5,T.unescape=M5,T.uniqueId=oW,T.upperCase=D5,T.upperFirst=lm,T.each=NC,T.eachRight=MC,T.first=RC,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=MF,at.prototype.reverse=DF,at.prototype.value=jF,T.prototype.at=fz,T.prototype.chain=dz,T.prototype.commit=pz,T.prototype.next=hz,T.prototype.plant=mz,T.prototype.reverse=vz,T.prototype.toJSON=T.prototype.valueOf=T.prototype.value=yz,T.prototype.first=T.prototype.head,Gl&&(T.prototype[Gl]=gz),T}),Ns=pF();Ca?((Ca.exports=Ns)._=Ns,cg._=Ns):Pn._=Ns}).call(NX)})(Eu,Eu.exports)),Eu.exports}var DX=MX(),jX=["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 xx(e){if(typeof e!="string")return!1;var t=jX;return t.includes(e)}var LX=["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"],$X=new Set(LX);function SM(e){return typeof e!="string"?!1:$X.has(e)}function EM(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)&&(SM(n)||EM(n))&&(t[n]=e[n]);return t}function wx(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)&&(SM(n)||EM(n)||xx(n))&&(t[n]=e[n]);return t}var FX=["children","width","height","viewBox","className","style","title","desc"];function Xy(){return Xy=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},Xy.apply(null,arguments)}function VX(e,t){if(e==null)return{};var n,r,i=BX(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 BX(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 _M=j.forwardRef((e,t)=>{var{children:n,width:r,height:i,viewBox:o,className:a,style:s,title:u,desc:c}=e,d=VX(e,FX),p=o||{width:r,height:i,x:0,y:0},g=Pt("recharts-surface",a);return x.createElement("svg",Xy({},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)}),zX=["children","className"];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 WX(e,t){if(e==null)return{};var n,r,i=HX(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 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 Mi=x.forwardRef((e,t)=>{var{children:n,className:r}=e,i=WX(e,zX),o=Pt("recharts-layer",r);return x.createElement("g",Zy({className:o},ti(i),{ref:t}),n)}),UX=j.createContext(null);function It(e){return function(){return e}}const OM=Math.cos,Qd=Math.sin,gi=Math.sqrt,Jd=Math.PI,xh=2*Jd,Qy=Math.PI,Jy=2*Qy,$a=1e-6,GX=Jy-$a;function PM(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function qX(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return PM;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 KX{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?PM:qX(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((Qy-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%Jy+Jy),g>GX?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>=Qy)},${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 Cx(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 KX(t)}function Sx(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function AM(e){this._context=e}AM.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 AM(e)}function RM(e){return e[0]}function IM(e){return e[1]}function TM(e,t){var n=It(!0),r=null,i=wh,o=null,a=Cx(s);e=typeof e=="function"?e:e===void 0?RM:It(e),t=typeof t=="function"?t:t===void 0?IM:It(t);function s(u){var c,d=(u=Sx(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=Cx(c);e=typeof e=="function"?e:e===void 0?RM:It(+e),t=typeof t=="function"?t:It(t===void 0?0:+t),n=typeof n=="function"?n:n===void 0?IM:It(+n);function c(p){var g,h,y,b=(p=Sx(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 TM().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 kM{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 YX(e){return new kM(e,!0)}function XX(e){return new kM(e,!1)}const Ex={draw(e,t){const n=gi(t/Jd);e.moveTo(n,0),e.arc(0,0,n,0,xh)}},ZX={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()}},NM=gi(1/3),QX=NM*2,JX={draw(e,t){const n=gi(t/QX),r=n*NM;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},eZ={draw(e,t){const n=gi(t),r=-n/2;e.rect(r,r,n,n)}},tZ=.8908130915292852,MM=Qd(Jd/10)/Qd(7*Jd/10),nZ=Qd(xh/10)*MM,rZ=-OM(xh/10)*MM,iZ={draw(e,t){const n=gi(t*tZ),r=nZ*n,i=rZ*n;e.moveTo(0,-n),e.lineTo(r,i);for(let o=1;o<5;++o){const a=xh*o/5,s=OM(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),oZ={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,eb=1/gi(12),aZ=(eb/2+1)*3,sZ={draw(e,t){const n=gi(t/aZ),r=n/2,i=n*eb,o=r,a=n*eb+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 lZ(e,t){let n=null,r=Cx(i);e=typeof e=="function"?e:It(e||Ex),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 DM(e){this._context=e}DM.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 uZ(e){return new DM(e)}function jM(e){this._context=e}jM.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 cZ(e){return new jM(e)}function LM(e){this._context=e}LM.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 fZ(e){return new LM(e)}function $M(e){this._context=e}$M.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 dZ(e){return new $M(e)}function RE(e){return e<0?-1:1}function IE(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(RE(o)+RE(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(s))||0}function TE(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,TE(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,TE(this,n=IE(this,e,t)),n);break;default:qm(this,this._t0,n=IE(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function FM(e){this._context=new VM(e)}(FM.prototype=Object.create(np.prototype)).point=function(e,t){np.prototype.point.call(this,t,e)};function VM(e){this._context=e}VM.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 pZ(e){return new np(e)}function hZ(e){return new FM(e)}function BM(e){this._context=e}BM.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=kE(e),i=kE(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 kE(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 gZ(e){return new BM(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 mZ(e){return new Ch(e,.5)}function vZ(e){return new Ch(e,0)}function yZ(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 tb(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function bZ(e,t){return e[t]}function xZ(e){const t=[];return t.key=e,t}function wZ(){var e=It([]),t=tb,n=ts,r=bZ;function i(o){var a=Array.from(e.apply(this,arguments),xZ),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=Sx(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?tb:typeof o=="function"?o:It(Array.from(o)),i):t},i.offset=function(o){return arguments.length?(n=o??ts,i):n},i}function CZ(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 SZ(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 EZ(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={},NE;function _Z(){return NE||(NE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return n==="__proto__"}e.isUnsafeProperty=t})(Ym)),Ym}var Xm={},ME;function zM(){return ME||(ME=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={},DE;function _x(){return DE||(DE=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={},jE;function OZ(){return jE||(jE=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 LE;function Ox(){return LE||(LE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=OZ(),n=_x();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 $E;function Px(){return $E||($E=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=_Z(),n=zM(),r=_x(),i=Ox();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,FE;function PZ(){return FE||(FE=1,ev=Px().get),ev}var AZ=PZ();const gl=fs(AZ);var RZ=4;function Zo(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:RZ,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",IZ=0,zu=e=>{var t=++IZ;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},WM=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 TZ(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 kZ=["type","size","sizeType"];function nb(){return nb=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},nb.apply(null,arguments)}function VE(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 BE(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?VE(Object(n),!0).forEach(function(r){NZ(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):VE(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function NZ(e,t,n){return(t=MZ(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function MZ(e){var t=DZ(e,"string");return typeof t=="symbol"?t:t+""}function DZ(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 jZ(e,t){if(e==null)return{};var n,r,i=LZ(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 LZ(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 HM={symbolCircle:Ex,symbolCross:ZX,symbolDiamond:JX,symbolSquare:eZ,symbolStar:iZ,symbolTriangle:oZ,symbolWye:sZ},$Z=Math.PI/180,FZ=e=>{var t="symbol".concat(dc(e));return HM[t]||Ex},VZ=(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*$Z;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}},BZ=(e,t)=>{HM["symbol".concat(dc(e))]=t},UM=e=>{var{type:t="circle",size:n=64,sizeType:r="area"}=e,i=jZ(e,kZ),o=BE(BE({},i),{},{type:t,size:n,sizeType:r}),a="circle";typeof t=="string"&&(a=t);var s=()=>{var g=FZ(a),h=lZ().type(g).size(VZ(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",nb({},p,{className:Pt("recharts-symbols",u),transform:"translate(".concat(c,", ").concat(d,")"),d:s()})):null};UM.registerSymbol=BZ;var GM=e=>"radius"in e&&"startAngle"in e&&"endAngle"in e,zZ=(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=>{xx(i)&&typeof n[i]=="function"&&(r[i]=(o=>n[i](n,o)))}),r},WZ=(e,t,n)=>r=>(e(t,n,r),null),Ax=(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];xx(i)&&typeof o=="function"&&(r||(r={}),r[i]=WZ(o,t,n))}),r};function zE(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 HZ(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?zE(Object(n),!0).forEach(function(r){UZ(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zE(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function UZ(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=qZ(e,"string");return typeof t=="symbol"?t:t+""}function qZ(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=HZ({},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={},WE;function KZ(){return WE||(WE=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={},HE;function YZ(){return HE||(HE=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={},UE;function qM(){return UE||(UE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return n}e.identity=t})(iv)),iv}var ov={},av={},sv={},GE;function XZ(){return GE||(GE=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 qE;function KM(){return qE||(qE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=XZ();function n(r){return r!=null&&typeof r!="function"&&t.isLength(r.length)}e.isArrayLike=n})(av)),av}var lv={},KE;function ZZ(){return KE||(KE=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 YE;function QZ(){return YE||(YE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=KM(),n=ZZ();function r(i){return n.isObjectLike(i)&&t.isArrayLike(i)}e.isArrayLikeObject=r})(ov)),ov}var uv={},cv={},XE;function JZ(){return XE||(XE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Px();function n(r){return function(i){return t.get(i,r)}}e.property=n})(cv)),cv}var fv={},dv={},pv={},hv={},ZE;function YM(){return ZE||(ZE=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={},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.isPrimitive=t})(gv)),gv}var mv={},JE;function ZM(){return JE||(JE=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 e_;function eQ(){return e_||(e_=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=YM(),n=XM(),r=ZM();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 t_;function QM(){return t_||(t_=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=eQ();function n(r,i){return t.isMatchWith(r,i,()=>{})}e.isMatch=n})(dv)),dv}var vv={},yv={},bv={},n_;function tQ(){return n_||(n_=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={},r_;function Rx(){return r_||(r_=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={},i_;function JM(){return i_||(i_=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={},o_;function nQ(){return o_||(o_=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 a_;function eD(){return a_||(a_=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=tQ(),n=Rx(),r=JM(),i=XM(),o=nQ();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 s_;function rQ(){return s_||(s_=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=eD();function n(r){return t.cloneDeepWithImpl(r,void 0,r,new Map,void 0)}e.cloneDeep=n})(vv)),vv}var l_;function iQ(){return l_||(l_=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=QM(),n=rQ();function r(i){return i=n.cloneDeep(i),o=>t.isMatch(o,i)}e.matches=r})(fv)),fv}var Sv={},Ev={},_v={},u_;function oQ(){return u_||(u_=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=eD(),n=Rx(),r=JM();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 c_;function aQ(){return c_||(c_=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=oQ();function n(r){return t.cloneDeepWith(r)}e.cloneDeep=n})(Ev)),Ev}var Ov={},Pv={},f_;function tD(){return f_||(f_=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={},d_;function sQ(){return d_||(d_=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Rx();function n(r){return r!==null&&typeof r=="object"&&t.getTag(r)==="[object Arguments]"}e.isArguments=n})(Av)),Av}var p_;function lQ(){return p_||(p_=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=zM(),n=tD(),r=sQ(),i=Ox();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 h_;function uQ(){return h_||(h_=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=QM(),n=_x(),r=aQ(),i=Px(),o=lQ();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 g_;function cQ(){return g_||(g_=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=qM(),n=JZ(),r=iQ(),i=uQ();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 m_;function fQ(){return m_||(m_=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=KZ(),n=YZ(),r=qM(),i=QZ(),o=cQ();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,v_;function dQ(){return v_||(v_=1,Rv=fQ().uniqBy),Rv}var pQ=dQ();const y_=fs(pQ);function hQ(e,t,n){return t===!0?y_(e,n):typeof t=="function"?y_(e,t):e}var Ix=j.createContext(null),gQ=e=>e,Ht=()=>{var e=j.useContext(Ix);return e?e.store.dispatch:gQ},Od=()=>{},mQ=()=>Od,vQ=(e,t)=>e===t;function Le(e){var t=j.useContext(Ix),n=j.useMemo(()=>t?r=>{if(r!=null)return e(r)}:Od,[t,e]);return oT.useSyncExternalStoreWithSelector(t?t.subscription.addNestedSub:mQ,t?t.store.getState:Od,t?t.store.getState:Od,n,vQ)}var Iv={},Tv={},kv={},b_;function yQ(){return b_||(b_=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={},x_;function nD(){return x_||(x_=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 w_;function bQ(){return w_||(w_=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=nD(),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 C_;function xQ(){return C_||(C_=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=yQ(),n=bQ(),r=Ox();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={},S_;function wQ(){return S_||(S_=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={},E_;function rD(){return E_||(E_=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=tD(),n=KM(),r=YM(),i=ZM();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 __;function CQ(){return __||(__=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=xQ(),n=wQ(),r=rD();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,O_;function SQ(){return O_||(O_=1,Lv=CQ().sortBy),Lv}var EQ=SQ();const Sh=fs(EQ);var iD=e=>e.legend.settings,_Q=e=>e.legend.size,OQ=e=>e.legend.payload;q([OQ,iD],(e,t)=>{var{itemSorter:n}=t,r=e.flat(1);return n?Sh(r,n):r});var id=1;function PQ(){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 AQ=typeof Symbol=="function"&&Symbol.observable||"@@observable",P_=AQ,$v=()=>Math.random().toString(36).substring(7).split("").join("."),RQ={INIT:`@@redux/INIT${$v()}`,REPLACE:`@@redux/REPLACE${$v()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${$v()}`},Ga=RQ;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 IQ(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(NQ(e))return"date";if(kQ(e))return"error";const n=TQ(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 TQ(e){return typeof e.constructor=="function"?e.constructor.name:null}function kQ(e){return e instanceof Error||typeof e.message=="string"&&e.constructor&&typeof e.constructor.stackTraceLimit=="number"}function NQ(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=IQ(e)),t}function oD(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(oD)(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)}},[P_](){return this}}}return g({type:Ga.INIT}),{dispatch:g,subscribe:p,getState:d,replaceReducer:h,[P_]:y}}function A_(e){typeof console<"u"&&typeof console.error=="function"&&console.error(e);try{throw new Error(e)}catch{}}function MQ(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 DQ(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 aD(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"&&A_(`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{DQ(n)}catch(a){o=a}return function(s={},u){if(o)throw o;if(process.env.NODE_ENV!=="production"){const p=MQ(s,n,u,i);p&&A_(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 jQ(...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 Tx(e){return pc(e)&&"type"in e&&typeof e.type=="string"}var sD=Symbol.for("immer-nothing"),R_=Symbol.for("immer-draftable"),Jn=Symbol.for("immer-state"),LQ=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=LQ[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",rb="configurable",op="enumerable",Pd="writable",Wu="value",po=e=>!!e&&!!e[Jn];function di(e){return e?lD(e)||Oh(e)||!!e[R_]||!!e[ip]?.[R_]||Ph(e)||Ah(e):!1}var $Q=Pr[Eh][ip].toString(),I_=new WeakMap;function lD(e){if(!e||!kx(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=I_.get(n);return r===void 0&&(r=Function.toString.call(n),I_.set(n,r)),r===$Q}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 T_=(e,t,n=hc(e))=>n===2?e.has(t):Pr[Eh].hasOwnProperty.call(e,t),ib=(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 FQ(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,kx=e=>typeof e=="object",Ba=e=>typeof e=="function",Fv=e=>typeof e=="boolean";function VQ(e){const t=+e;return Number.isInteger(t)&&String(t)===e}var to=e=>e.copy_||e.base_,Nx=e=>e.modified_?e.copy_:e.base_;function ob(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=lD(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[rb]=!0),(s.get||s.set)&&(r[a]={[rb]:!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 Mx(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)=>{Mx(r,!0)},!1)),e}function BQ(){_r(2)}var od={[Wu]:BQ};function Rh(e){return e===null||!kx(e)?!0:Pr.isFrozen(e)}var sp="MapSet",ab="Patches",k_="ArrayMethods",uD={};function rs(e){const t=uD[e];return t||_r(0,e),t}var N_=e=>!!uD[e],Hu,cD=()=>Hu,zQ=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:N_(sp)?rs(sp):void 0,arrayMethodsPlugin_:N_(k_)?rs(k_):void 0});function M_(e,t){t&&(e.patchPlugin_=rs(ab),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function sb(e){lb(e),e.drafts_.forEach(WQ),e.drafts_=null}function lb(e){e===Hu&&(Hu=e.parent_)}var D_=e=>Hu=zQ(Hu,e);function WQ(e){const t=e[Jn];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function j_(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];if(e!==void 0&&e!==n){n[Jn].modified_&&(sb(t),_r(4)),di(e)&&(e=L_(t,e));const{patchPlugin_:i}=t;i&&i.generateReplacementPatches_(n[Jn].base_,e,t)}else e=L_(t,n);return HQ(t,e,!0),sb(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==sD?e:void 0}function L_(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);pD(n,e)}return n.copy_}function HQ(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Mx(t,n)}function fD(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var Ih=(e,t)=>e.scope_===t,UQ=[];function dD(e,t,n,r){const i=to(e),o=e.type_;if(r!==void 0&&ib(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)??UQ;for(const s of a)ap(i,s,n,o)}function GQ(e,t,n){e.callbacks_.push(function(i){const o=t;if(!o||!Ih(o,i))return;i.mapSetPlugin_?.fixSetContents(o);const a=Nx(o);dD(e,o.draft_??o,a,n),pD(o,i)})}function pD(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)}fD(e)}}function qQ(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=Nx(i);dD(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):ib(o,t,e.type_)===n&&r.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&lp(ib(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=Nx(o);ap(e,r,a,e.type_),fD(o)}}else di(i)&&lp(i,t,n)})),e}function KQ(e,t){const n=Oh(e),r={type_:n?1:0,scope_:t?t.scope_:cD(),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(!T_(i,t,e.type_))return YQ(e,i,t);const o=i[t];if(e.finalized_||!di(o)||r&&e.operationMethod&&n?.isMutatingArrayMethod(e.operationMethod)&&VQ(t))return o;if(o===Vv(e.base_,t)){Ad(e);const a=e.type_===1?+t:t,s=cb(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=hD(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(FQ(n,i)&&(n!==void 0||T_(e.base_,t,e.type_)))return!0;Ad(e),ub(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),qQ(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),ub(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,[rb]: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 YQ(e,t,n){const r=hD(t,n);return r?Wu in r?r[Wu]:r.get?.call(e.draft_):void 0}function hD(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 ub(e){e.modified_||(e.modified_=!0,e.parent_&&ub(e.parent_))}function Ad(e){e.copy_||(e.assigned_=new Map,e.copy_=ob(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var XQ=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=D_(this),s=cb(a,n,void 0);let u=!0;try{o=r(s),u=!1}finally{u?sb(a):lb(a)}return M_(a,i),j_(o,a)}else if(!n||!kx(n)){if(o=r(n),o===void 0&&(o=n),o===sD&&(o=void 0),this.autoFreeze_&&Mx(o,!0),i){const a=[],s=[];rs(ab).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=D_(this),r=cb(n,t,void 0);return r[Jn].isManual_=!0,lb(n),r}finishDraft(t,n){const r=t&&t[Jn];(!r||!r.isManual_)&&_r(9);const{scope_:i}=r;return M_(i,n),j_(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(ab).applyPatches_;return po(t)?i(t,n):this.produce(t,o=>i(o,n))}};function cb(e,t,n,r){const[i,o]=Ph(t)?rs(sp).proxyMap_(t,n):Ah(t)?rs(sp).proxySet_(t,n):KQ(t,n);return(n?.scope_??cD()).drafts_.push(i),o.callbacks_=n?.callbacks_??[],o.key_=r,n&&r!==void 0?GQ(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),gD(e)}function gD(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=ob(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=ob(e,!0);return _h(n,(i,o)=>{ap(n,i,gD(o))},r),t&&(t.finalized_=!1),n}var ZQ=new XQ,mD=ZQ.produce;function vD(e){return({dispatch:n,getState:r})=>i=>o=>typeof o=="function"?o(n,r,e):i(o)}var QQ=vD(),JQ=vD,eJ=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)},tJ=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=>Tx(r)&&r.type===e,n}function nJ(e){return typeof e=="function"&&"type"in e&&tJ(e)}function rJ(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 iJ(e={}){if(process.env.NODE_ENV==="production")return()=>n=>r=>n(r);const{isActionCreator:t=nJ}=e;return()=>n=>r=>(t(r)&&console.warn(rJ(r.type)),n(r))}function yD(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.
187
+ }`;var Je=rS(function(){return gt(N,Ie+"return "+ce).apply(n,M)});if(Je.source=ce,im(Je))throw Je;return Je}function A5(l){return yt(l).toLowerCase()}function R5(l){return yt(l).toUpperCase()}function I5(l,f,m){if(l=yt(l),l&&(m||f===n))return d1(l);if(!l||!(f=xr(f)))return l;var S=ii(l),A=ii(f),N=p1(S,A),M=h1(S,A)+1;return $o(S,N,M).join("")}function T5(l,f,m){if(l=yt(l),l&&(m||f===n))return l.slice(0,m1(l)+1);if(!l||!(f=xr(f)))return l;var S=ii(l),A=h1(S,ii(f))+1;return $o(S,0,A).join("")}function k5(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=p1(S,ii(f));return $o(S,A).join("")}function N5(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 M5(l){return l=yt(l),l&&Jt.test(l)?l.replace(On,uF):l}var D5=Fs(function(l,f,m){return l+(m?" ":"")+f.toUpperCase()}),lm=iC("toUpperCase");function nS(l,f,m){return l=yt(l),f=m?n:f,f===n?iF(l)?dF(l):Y$(l):l.match(f)||[]}var rS=tt(function(l,f){try{return yr(l,n,f)}catch(m){return im(m)?m:new qe(m)}}),j5=Gi(function(l,f){return Fr(f,function(m){m=Ci(m),Hi(l,m,nm(l[m],l))}),l});function L5(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 $5(l){return uV(zr(l,p))}function um(l){return function(){return l}}function F5(l,f){return l==null||l!==l?f:l}var V5=aC(),B5=aC(!0);function ar(l){return l}function cm(l){return j1(typeof l=="function"?l:zr(l,p))}function z5(l){return $1(zr(l,p))}function W5(l,f){return F1(l,zr(f,p))}var H5=tt(function(l,f){return function(m){return Jl(m,l,f)}}),U5=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 G5(){return Pn._===this&&(Pn._=yF),this}function dm(){}function q5(l){return l=Qe(l),tt(function(f){return V1(f,l)})}var K5=Wg(Ft),Y5=Wg(s1),X5=Wg(hg);function iS(l){return Xg(l)?gg(Ci(l)):OV(l)}function Z5(l){return function(f){return l==null?n:Pa(l,f)}}var Q5=lC(),J5=lC(!0);function pm(){return[]}function hm(){return!1}function eW(){return{}}function tW(){return""}function nW(){return!0}function rW(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 iW(l){return Ye(l)?Ft(l,Ci):wr(l)?[l]:rr(EC(yt(l)))}function oW(l){var f=++mF;return yt(l)+f}var aW=vf(function(l,f){return l+f},0),sW=Hg("ceil"),lW=vf(function(l,f){return l/f},1),uW=Hg("floor");function cW(l){return l&&l.length?cf(l,ar,Rg):n}function fW(l,f){return l&&l.length?cf(l,Be(f,2),Rg):n}function dW(l){return c1(l,ar)}function pW(l,f){return c1(l,Be(f,2))}function hW(l){return l&&l.length?cf(l,ar,Ng):n}function gW(l,f){return l&&l.length?cf(l,Be(f,2),Ng):n}var mW=vf(function(l,f){return l*f},1),vW=Hg("round"),yW=vf(function(l,f){return l-f},0);function bW(l){return l&&l.length?vg(l,ar):0}function xW(l,f){return l&&l.length?vg(l,Be(f,2)):0}return T.after=zz,T.ary=DC,T.assign=R3,T.assignIn=YC,T.assignInWith=If,T.assignWith=I3,T.at=T3,T.before=jC,T.bind=nm,T.bindAll=j5,T.bindKey=LC,T.castArray=e3,T.chain=kC,T.chunk=uB,T.compact=cB,T.concat=fB,T.cond=L5,T.conforms=$5,T.constant=um,T.countBy=bz,T.create=k3,T.curry=$C,T.curryRight=FC,T.debounce=VC,T.defaults=N3,T.defaultsDeep=M3,T.defer=Wz,T.delay=Hz,T.difference=dB,T.differenceBy=pB,T.differenceWith=hB,T.drop=gB,T.dropRight=mB,T.dropRightWhile=vB,T.dropWhile=yB,T.fill=bB,T.filter=wz,T.flatMap=Ez,T.flatMapDeep=_z,T.flatMapDepth=Oz,T.flatten=AC,T.flattenDeep=xB,T.flattenDepth=wB,T.flip=Uz,T.flow=V5,T.flowRight=B5,T.fromPairs=CB,T.functions=B3,T.functionsIn=z3,T.groupBy=Pz,T.initial=EB,T.intersection=_B,T.intersectionBy=OB,T.intersectionWith=PB,T.invert=H3,T.invertBy=U3,T.invokeMap=Rz,T.iteratee=cm,T.keyBy=Iz,T.keys=bn,T.keysIn=or,T.map=Ef,T.mapKeys=q3,T.mapValues=K3,T.matches=z5,T.matchesProperty=W5,T.memoize=Of,T.merge=Y3,T.mergeWith=XC,T.method=H5,T.methodOf=U5,T.mixin=fm,T.negate=Pf,T.nthArg=q5,T.omit=X3,T.omitBy=Z3,T.once=Gz,T.orderBy=Tz,T.over=K5,T.overArgs=qz,T.overEvery=Y5,T.overSome=X5,T.partial=rm,T.partialRight=BC,T.partition=kz,T.pick=Q3,T.pickBy=ZC,T.property=iS,T.propertyOf=Z5,T.pull=TB,T.pullAll=IC,T.pullAllBy=kB,T.pullAllWith=NB,T.pullAt=MB,T.range=Q5,T.rangeRight=J5,T.rearg=Kz,T.reject=Dz,T.remove=DB,T.rest=Yz,T.reverse=em,T.sampleSize=Lz,T.set=e5,T.setWith=t5,T.shuffle=$z,T.slice=jB,T.sortBy=Bz,T.sortedUniq=WB,T.sortedUniqBy=HB,T.split=E5,T.spread=Xz,T.tail=UB,T.take=GB,T.takeRight=qB,T.takeRightWhile=KB,T.takeWhile=YB,T.tap=cz,T.throttle=Zz,T.thru=Sf,T.toArray=GC,T.toPairs=QC,T.toPairsIn=JC,T.toPath=iW,T.toPlainObject=KC,T.transform=n5,T.unary=Qz,T.union=XB,T.unionBy=ZB,T.unionWith=QB,T.uniq=JB,T.uniqBy=ez,T.uniqWith=tz,T.unset=r5,T.unzip=tm,T.unzipWith=TC,T.update=i5,T.updateWith=o5,T.values=zs,T.valuesIn=a5,T.without=nz,T.words=nS,T.wrap=Jz,T.xor=rz,T.xorBy=iz,T.xorWith=oz,T.zip=az,T.zipObject=sz,T.zipObjectDeep=lz,T.zipWith=uz,T.entries=QC,T.entriesIn=JC,T.extend=YC,T.extendWith=If,fm(T,T),T.add=aW,T.attempt=rS,T.camelCase=c5,T.capitalize=eS,T.ceil=sW,T.clamp=s5,T.clone=t3,T.cloneDeep=r3,T.cloneDeepWith=i3,T.cloneWith=n3,T.conformsTo=o3,T.deburr=tS,T.defaultTo=F5,T.divide=lW,T.endsWith=f5,T.eq=ai,T.escape=d5,T.escapeRegExp=p5,T.every=xz,T.find=Cz,T.findIndex=OC,T.findKey=D3,T.findLast=Sz,T.findLastIndex=PC,T.findLastKey=j3,T.floor=uW,T.forEach=NC,T.forEachRight=MC,T.forIn=L3,T.forInRight=$3,T.forOwn=F3,T.forOwnRight=V3,T.get=am,T.gt=a3,T.gte=s3,T.has=W3,T.hasIn=sm,T.head=RC,T.identity=ar,T.includes=Az,T.indexOf=SB,T.inRange=l5,T.invoke=G3,T.isArguments=Ia,T.isArray=Ye,T.isArrayBuffer=l3,T.isArrayLike=ir,T.isArrayLikeObject=Kt,T.isBoolean=u3,T.isBuffer=Fo,T.isDate=c3,T.isElement=f3,T.isEmpty=d3,T.isEqual=p3,T.isEqualWith=h3,T.isError=im,T.isFinite=g3,T.isFunction=Ki,T.isInteger=zC,T.isLength=Af,T.isMap=WC,T.isMatch=m3,T.isMatchWith=v3,T.isNaN=y3,T.isNative=b3,T.isNil=w3,T.isNull=x3,T.isNumber=HC,T.isObject=zt,T.isObjectLike=Ut,T.isPlainObject=ou,T.isRegExp=om,T.isSafeInteger=C3,T.isSet=UC,T.isString=Rf,T.isSymbol=wr,T.isTypedArray=Bs,T.isUndefined=S3,T.isWeakMap=E3,T.isWeakSet=_3,T.join=AB,T.kebabCase=h5,T.last=Hr,T.lastIndexOf=RB,T.lowerCase=g5,T.lowerFirst=m5,T.lt=O3,T.lte=P3,T.max=cW,T.maxBy=fW,T.mean=dW,T.meanBy=pW,T.min=hW,T.minBy=gW,T.stubArray=pm,T.stubFalse=hm,T.stubObject=eW,T.stubString=tW,T.stubTrue=nW,T.multiply=mW,T.nth=IB,T.noConflict=G5,T.noop=dm,T.now=_f,T.pad=v5,T.padEnd=y5,T.padStart=b5,T.parseInt=x5,T.random=u5,T.reduce=Nz,T.reduceRight=Mz,T.repeat=w5,T.replace=C5,T.result=J3,T.round=vW,T.runInContext=z,T.sample=jz,T.size=Fz,T.snakeCase=S5,T.some=Vz,T.sortedIndex=LB,T.sortedIndexBy=$B,T.sortedIndexOf=FB,T.sortedLastIndex=VB,T.sortedLastIndexBy=BB,T.sortedLastIndexOf=zB,T.startCase=_5,T.startsWith=O5,T.subtract=yW,T.sum=bW,T.sumBy=xW,T.template=P5,T.times=rW,T.toFinite=Yi,T.toInteger=Qe,T.toLength=qC,T.toLower=A5,T.toNumber=Ur,T.toSafeInteger=A3,T.toString=yt,T.toUpper=R5,T.trim=I5,T.trimEnd=T5,T.trimStart=k5,T.truncate=N5,T.unescape=M5,T.uniqueId=oW,T.upperCase=D5,T.upperFirst=lm,T.each=NC,T.eachRight=MC,T.first=RC,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 lt=A.apply(T,ko([it],F));return S&&ye?lt[0]:lt};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=MF,at.prototype.reverse=DF,at.prototype.value=jF,T.prototype.at=fz,T.prototype.chain=dz,T.prototype.commit=pz,T.prototype.next=hz,T.prototype.plant=mz,T.prototype.reverse=vz,T.prototype.toJSON=T.prototype.valueOf=T.prototype.value=yz,T.prototype.first=T.prototype.head,Gl&&(T.prototype[Gl]=gz),T}),Ns=pF();Ca?((Ca.exports=Ns)._=Ns,cg._=Ns):Pn._=Ns}).call(DX)})(Eu,Eu.exports)),Eu.exports}var LX=jX(),$X=["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 xx(e){if(typeof e!="string")return!1;var t=$X;return t.includes(e)}var FX=["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"],VX=new Set(FX);function SM(e){return typeof e!="string"?!1:VX.has(e)}function EM(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)&&(SM(n)||EM(n))&&(t[n]=e[n]);return t}function wx(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)&&(SM(n)||EM(n)||xx(n))&&(t[n]=e[n]);return t}var BX=["children","width","height","viewBox","className","style","title","desc"];function Xy(){return Xy=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},Xy.apply(null,arguments)}function zX(e,t){if(e==null)return{};var n,r,i=WX(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 WX(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 _M=j.forwardRef((e,t)=>{var{children:n,width:r,height:i,viewBox:o,className:a,style:s,title:u,desc:c}=e,d=zX(e,BX),p=o||{width:r,height:i,x:0,y:0},g=Pt("recharts-surface",a);return x.createElement("svg",Xy({},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)}),HX=["children","className"];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 UX(e,t){if(e==null)return{};var n,r,i=GX(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 GX(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=UX(e,HX),o=Pt("recharts-layer",r);return x.createElement("g",Zy({className:o},ti(i),{ref:t}),n)}),qX=j.createContext(null);function It(e){return function(){return e}}const OM=Math.cos,Qd=Math.sin,gi=Math.sqrt,Jd=Math.PI,xh=2*Jd,Qy=Math.PI,Jy=2*Qy,$a=1e-6,KX=Jy-$a;function PM(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function YX(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return PM;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 XX{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?PM:YX(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((Qy-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%Jy+Jy),g>KX?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>=Qy)},${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 Cx(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 XX(t)}function Sx(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function AM(e){this._context=e}AM.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 AM(e)}function RM(e){return e[0]}function IM(e){return e[1]}function TM(e,t){var n=It(!0),r=null,i=wh,o=null,a=Cx(s);e=typeof e=="function"?e:e===void 0?RM:It(e),t=typeof t=="function"?t:t===void 0?IM:It(t);function s(u){var c,d=(u=Sx(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=Cx(c);e=typeof e=="function"?e:e===void 0?RM:It(+e),t=typeof t=="function"?t:It(t===void 0?0:+t),n=typeof n=="function"?n:n===void 0?IM:It(+n);function c(p){var g,h,y,b=(p=Sx(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 TM().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 kM{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 ZX(e){return new kM(e,!0)}function QX(e){return new kM(e,!1)}const Ex={draw(e,t){const n=gi(t/Jd);e.moveTo(n,0),e.arc(0,0,n,0,xh)}},JX={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()}},NM=gi(1/3),eZ=NM*2,tZ={draw(e,t){const n=gi(t/eZ),r=n*NM;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},nZ={draw(e,t){const n=gi(t),r=-n/2;e.rect(r,r,n,n)}},rZ=.8908130915292852,MM=Qd(Jd/10)/Qd(7*Jd/10),iZ=Qd(xh/10)*MM,oZ=-OM(xh/10)*MM,aZ={draw(e,t){const n=gi(t*rZ),r=iZ*n,i=oZ*n;e.moveTo(0,-n),e.lineTo(r,i);for(let o=1;o<5;++o){const a=xh*o/5,s=OM(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),sZ={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,eb=1/gi(12),lZ=(eb/2+1)*3,uZ={draw(e,t){const n=gi(t/lZ),r=n/2,i=n*eb,o=r,a=n*eb+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 cZ(e,t){let n=null,r=Cx(i);e=typeof e=="function"?e:It(e||Ex),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 DM(e){this._context=e}DM.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 fZ(e){return new DM(e)}function jM(e){this._context=e}jM.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 dZ(e){return new jM(e)}function LM(e){this._context=e}LM.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 pZ(e){return new LM(e)}function $M(e){this._context=e}$M.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 hZ(e){return new $M(e)}function RE(e){return e<0?-1:1}function IE(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(RE(o)+RE(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(s))||0}function TE(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,TE(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,TE(this,n=IE(this,e,t)),n);break;default:qm(this,this._t0,n=IE(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function FM(e){this._context=new VM(e)}(FM.prototype=Object.create(np.prototype)).point=function(e,t){np.prototype.point.call(this,t,e)};function VM(e){this._context=e}VM.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 gZ(e){return new np(e)}function mZ(e){return new FM(e)}function BM(e){this._context=e}BM.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=kE(e),i=kE(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 kE(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 vZ(e){return new BM(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 yZ(e){return new Ch(e,.5)}function bZ(e){return new Ch(e,0)}function xZ(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 tb(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function wZ(e,t){return e[t]}function CZ(e){const t=[];return t.key=e,t}function SZ(){var e=It([]),t=tb,n=ts,r=wZ;function i(o){var a=Array.from(e.apply(this,arguments),CZ),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=Sx(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?tb:typeof o=="function"?o:It(Array.from(o)),i):t},i.offset=function(o){return arguments.length?(n=o??ts,i):n},i}function EZ(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 _Z(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 OZ(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={},NE;function PZ(){return NE||(NE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return n==="__proto__"}e.isUnsafeProperty=t})(Ym)),Ym}var Xm={},ME;function zM(){return ME||(ME=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={},DE;function _x(){return DE||(DE=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={},jE;function AZ(){return jE||(jE=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 LE;function Ox(){return LE||(LE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=AZ(),n=_x();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 $E;function Px(){return $E||($E=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=PZ(),n=zM(),r=_x(),i=Ox();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,FE;function RZ(){return FE||(FE=1,ev=Px().get),ev}var IZ=RZ();const gl=fs(IZ);var TZ=4;function Zo(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:TZ,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",kZ=0,zu=e=>{var t=++kZ;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},WM=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 NZ(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 MZ=["type","size","sizeType"];function nb(){return nb=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},nb.apply(null,arguments)}function VE(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 BE(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?VE(Object(n),!0).forEach(function(r){DZ(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):VE(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function DZ(e,t,n){return(t=jZ(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function jZ(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)}function $Z(e,t){if(e==null)return{};var n,r,i=FZ(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 FZ(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 HM={symbolCircle:Ex,symbolCross:JX,symbolDiamond:tZ,symbolSquare:nZ,symbolStar:aZ,symbolTriangle:sZ,symbolWye:uZ},VZ=Math.PI/180,BZ=e=>{var t="symbol".concat(dc(e));return HM[t]||Ex},zZ=(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*VZ;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}},WZ=(e,t)=>{HM["symbol".concat(dc(e))]=t},UM=e=>{var{type:t="circle",size:n=64,sizeType:r="area"}=e,i=$Z(e,MZ),o=BE(BE({},i),{},{type:t,size:n,sizeType:r}),a="circle";typeof t=="string"&&(a=t);var s=()=>{var g=BZ(a),h=cZ().type(g).size(zZ(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",nb({},p,{className:Pt("recharts-symbols",u),transform:"translate(".concat(c,", ").concat(d,")"),d:s()})):null};UM.registerSymbol=WZ;var GM=e=>"radius"in e&&"startAngle"in e&&"endAngle"in e,HZ=(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=>{xx(i)&&typeof n[i]=="function"&&(r[i]=(o=>n[i](n,o)))}),r},UZ=(e,t,n)=>r=>(e(t,n,r),null),Ax=(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];xx(i)&&typeof o=="function"&&(r||(r={}),r[i]=UZ(o,t,n))}),r};function zE(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 GZ(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?zE(Object(n),!0).forEach(function(r){qZ(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zE(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function qZ(e,t,n){return(t=KZ(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function KZ(e){var t=YZ(e,"string");return typeof t=="symbol"?t:t+""}function YZ(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=GZ({},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={},WE;function XZ(){return WE||(WE=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={},HE;function ZZ(){return HE||(HE=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={},UE;function qM(){return UE||(UE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return n}e.identity=t})(iv)),iv}var ov={},av={},sv={},GE;function QZ(){return GE||(GE=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 qE;function KM(){return qE||(qE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=QZ();function n(r){return r!=null&&typeof r!="function"&&t.isLength(r.length)}e.isArrayLike=n})(av)),av}var lv={},KE;function JZ(){return KE||(KE=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 YE;function eQ(){return YE||(YE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=KM(),n=JZ();function r(i){return n.isObjectLike(i)&&t.isArrayLike(i)}e.isArrayLikeObject=r})(ov)),ov}var uv={},cv={},XE;function tQ(){return XE||(XE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Px();function n(r){return function(i){return t.get(i,r)}}e.property=n})(cv)),cv}var fv={},dv={},pv={},hv={},ZE;function YM(){return ZE||(ZE=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={},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.isPrimitive=t})(gv)),gv}var mv={},JE;function ZM(){return JE||(JE=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 e_;function nQ(){return e_||(e_=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=YM(),n=XM(),r=ZM();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 t_;function QM(){return t_||(t_=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=nQ();function n(r,i){return t.isMatchWith(r,i,()=>{})}e.isMatch=n})(dv)),dv}var vv={},yv={},bv={},n_;function rQ(){return n_||(n_=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={},r_;function Rx(){return r_||(r_=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={},i_;function JM(){return i_||(i_=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={},o_;function iQ(){return o_||(o_=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 a_;function eD(){return a_||(a_=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=rQ(),n=Rx(),r=JM(),i=XM(),o=iQ();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 s_;function oQ(){return s_||(s_=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=eD();function n(r){return t.cloneDeepWithImpl(r,void 0,r,new Map,void 0)}e.cloneDeep=n})(vv)),vv}var l_;function aQ(){return l_||(l_=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=QM(),n=oQ();function r(i){return i=n.cloneDeep(i),o=>t.isMatch(o,i)}e.matches=r})(fv)),fv}var Sv={},Ev={},_v={},u_;function sQ(){return u_||(u_=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=eD(),n=Rx(),r=JM();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 c_;function lQ(){return c_||(c_=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=sQ();function n(r){return t.cloneDeepWith(r)}e.cloneDeep=n})(Ev)),Ev}var Ov={},Pv={},f_;function tD(){return f_||(f_=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={},d_;function uQ(){return d_||(d_=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Rx();function n(r){return r!==null&&typeof r=="object"&&t.getTag(r)==="[object Arguments]"}e.isArguments=n})(Av)),Av}var p_;function cQ(){return p_||(p_=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=zM(),n=tD(),r=uQ(),i=Ox();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 h_;function fQ(){return h_||(h_=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=QM(),n=_x(),r=lQ(),i=Px(),o=cQ();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 g_;function dQ(){return g_||(g_=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=qM(),n=tQ(),r=aQ(),i=fQ();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 m_;function pQ(){return m_||(m_=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=XZ(),n=ZZ(),r=qM(),i=eQ(),o=dQ();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,v_;function hQ(){return v_||(v_=1,Rv=pQ().uniqBy),Rv}var gQ=hQ();const y_=fs(gQ);function mQ(e,t,n){return t===!0?y_(e,n):typeof t=="function"?y_(e,t):e}var Ix=j.createContext(null),vQ=e=>e,Ht=()=>{var e=j.useContext(Ix);return e?e.store.dispatch:vQ},Od=()=>{},yQ=()=>Od,bQ=(e,t)=>e===t;function Le(e){var t=j.useContext(Ix),n=j.useMemo(()=>t?r=>{if(r!=null)return e(r)}:Od,[t,e]);return oT.useSyncExternalStoreWithSelector(t?t.subscription.addNestedSub:yQ,t?t.store.getState:Od,t?t.store.getState:Od,n,bQ)}var Iv={},Tv={},kv={},b_;function xQ(){return b_||(b_=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={},x_;function nD(){return x_||(x_=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 w_;function wQ(){return w_||(w_=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=nD(),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 C_;function CQ(){return C_||(C_=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=xQ(),n=wQ(),r=Ox();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={},S_;function SQ(){return S_||(S_=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={},E_;function rD(){return E_||(E_=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=tD(),n=KM(),r=YM(),i=ZM();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 __;function EQ(){return __||(__=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=CQ(),n=SQ(),r=rD();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,O_;function _Q(){return O_||(O_=1,Lv=EQ().sortBy),Lv}var OQ=_Q();const Sh=fs(OQ);var iD=e=>e.legend.settings,PQ=e=>e.legend.size,AQ=e=>e.legend.payload;q([AQ,iD],(e,t)=>{var{itemSorter:n}=t,r=e.flat(1);return n?Sh(r,n):r});var id=1;function RQ(){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 IQ=typeof Symbol=="function"&&Symbol.observable||"@@observable",P_=IQ,$v=()=>Math.random().toString(36).substring(7).split("").join("."),TQ={INIT:`@@redux/INIT${$v()}`,REPLACE:`@@redux/REPLACE${$v()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${$v()}`},Ga=TQ;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 kQ(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(DQ(e))return"date";if(MQ(e))return"error";const n=NQ(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 NQ(e){return typeof e.constructor=="function"?e.constructor.name:null}function MQ(e){return e instanceof Error||typeof e.message=="string"&&e.constructor&&typeof e.constructor.stackTraceLimit=="number"}function DQ(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=kQ(e)),t}function oD(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(oD)(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)}},[P_](){return this}}}return g({type:Ga.INIT}),{dispatch:g,subscribe:p,getState:d,replaceReducer:h,[P_]:y}}function A_(e){typeof console<"u"&&typeof console.error=="function"&&console.error(e);try{throw new Error(e)}catch{}}function jQ(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 LQ(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 aD(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"&&A_(`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{LQ(n)}catch(a){o=a}return function(s={},u){if(o)throw o;if(process.env.NODE_ENV!=="production"){const p=jQ(s,n,u,i);p&&A_(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 $Q(...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 Tx(e){return pc(e)&&"type"in e&&typeof e.type=="string"}var sD=Symbol.for("immer-nothing"),R_=Symbol.for("immer-draftable"),Jn=Symbol.for("immer-state"),FQ=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=FQ[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",rb="configurable",op="enumerable",Pd="writable",Wu="value",po=e=>!!e&&!!e[Jn];function di(e){return e?lD(e)||Oh(e)||!!e[R_]||!!e[ip]?.[R_]||Ph(e)||Ah(e):!1}var VQ=Pr[Eh][ip].toString(),I_=new WeakMap;function lD(e){if(!e||!kx(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=I_.get(n);return r===void 0&&(r=Function.toString.call(n),I_.set(n,r)),r===VQ}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 T_=(e,t,n=hc(e))=>n===2?e.has(t):Pr[Eh].hasOwnProperty.call(e,t),ib=(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 BQ(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,kx=e=>typeof e=="object",Ba=e=>typeof e=="function",Fv=e=>typeof e=="boolean";function zQ(e){const t=+e;return Number.isInteger(t)&&String(t)===e}var to=e=>e.copy_||e.base_,Nx=e=>e.modified_?e.copy_:e.base_;function ob(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=lD(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[rb]=!0),(s.get||s.set)&&(r[a]={[rb]:!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 Mx(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)=>{Mx(r,!0)},!1)),e}function WQ(){_r(2)}var od={[Wu]:WQ};function Rh(e){return e===null||!kx(e)?!0:Pr.isFrozen(e)}var sp="MapSet",ab="Patches",k_="ArrayMethods",uD={};function rs(e){const t=uD[e];return t||_r(0,e),t}var N_=e=>!!uD[e],Hu,cD=()=>Hu,HQ=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:N_(sp)?rs(sp):void 0,arrayMethodsPlugin_:N_(k_)?rs(k_):void 0});function M_(e,t){t&&(e.patchPlugin_=rs(ab),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function sb(e){lb(e),e.drafts_.forEach(UQ),e.drafts_=null}function lb(e){e===Hu&&(Hu=e.parent_)}var D_=e=>Hu=HQ(Hu,e);function UQ(e){const t=e[Jn];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function j_(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];if(e!==void 0&&e!==n){n[Jn].modified_&&(sb(t),_r(4)),di(e)&&(e=L_(t,e));const{patchPlugin_:i}=t;i&&i.generateReplacementPatches_(n[Jn].base_,e,t)}else e=L_(t,n);return GQ(t,e,!0),sb(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==sD?e:void 0}function L_(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);pD(n,e)}return n.copy_}function GQ(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Mx(t,n)}function fD(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var Ih=(e,t)=>e.scope_===t,qQ=[];function dD(e,t,n,r){const i=to(e),o=e.type_;if(r!==void 0&&ib(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)??qQ;for(const s of a)ap(i,s,n,o)}function KQ(e,t,n){e.callbacks_.push(function(i){const o=t;if(!o||!Ih(o,i))return;i.mapSetPlugin_?.fixSetContents(o);const a=Nx(o);dD(e,o.draft_??o,a,n),pD(o,i)})}function pD(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)}fD(e)}}function YQ(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=Nx(i);dD(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):ib(o,t,e.type_)===n&&r.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&lp(ib(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=Nx(o);ap(e,r,a,e.type_),fD(o)}}else di(i)&&lp(i,t,n)})),e}function XQ(e,t){const n=Oh(e),r={type_:n?1:0,scope_:t?t.scope_:cD(),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(!T_(i,t,e.type_))return ZQ(e,i,t);const o=i[t];if(e.finalized_||!di(o)||r&&e.operationMethod&&n?.isMutatingArrayMethod(e.operationMethod)&&zQ(t))return o;if(o===Vv(e.base_,t)){Ad(e);const a=e.type_===1?+t:t,s=cb(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=hD(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(BQ(n,i)&&(n!==void 0||T_(e.base_,t,e.type_)))return!0;Ad(e),ub(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),YQ(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),ub(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,[rb]: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 ZQ(e,t,n){const r=hD(t,n);return r?Wu in r?r[Wu]:r.get?.call(e.draft_):void 0}function hD(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 ub(e){e.modified_||(e.modified_=!0,e.parent_&&ub(e.parent_))}function Ad(e){e.copy_||(e.assigned_=new Map,e.copy_=ob(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var QQ=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=D_(this),s=cb(a,n,void 0);let u=!0;try{o=r(s),u=!1}finally{u?sb(a):lb(a)}return M_(a,i),j_(o,a)}else if(!n||!kx(n)){if(o=r(n),o===void 0&&(o=n),o===sD&&(o=void 0),this.autoFreeze_&&Mx(o,!0),i){const a=[],s=[];rs(ab).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=D_(this),r=cb(n,t,void 0);return r[Jn].isManual_=!0,lb(n),r}finishDraft(t,n){const r=t&&t[Jn];(!r||!r.isManual_)&&_r(9);const{scope_:i}=r;return M_(i,n),j_(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(ab).applyPatches_;return po(t)?i(t,n):this.produce(t,o=>i(o,n))}};function cb(e,t,n,r){const[i,o]=Ph(t)?rs(sp).proxyMap_(t,n):Ah(t)?rs(sp).proxySet_(t,n):XQ(t,n);return(n?.scope_??cD()).drafts_.push(i),o.callbacks_=n?.callbacks_??[],o.key_=r,n&&r!==void 0?KQ(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),gD(e)}function gD(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=ob(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=ob(e,!0);return _h(n,(i,o)=>{ap(n,i,gD(o))},r),t&&(t.finalized_=!1),n}var JQ=new QQ,mD=JQ.produce;function vD(e){return({dispatch:n,getState:r})=>i=>o=>typeof o=="function"?o(n,r,e):i(o)}var eJ=vD(),tJ=vD,nJ=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)},rJ=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=>Tx(r)&&r.type===e,n}function iJ(e){return typeof e=="function"&&"type"in e&&rJ(e)}function oJ(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 aJ(e={}){if(process.env.NODE_ENV==="production")return()=>n=>r=>n(r);const{isActionCreator:t=iJ}=e;return()=>n=>r=>(t(r)&&console.warn(oJ(r.type)),n(r))}function yD(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.
189
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.
190
- It is disabled in production builds, so you don't need to worry about that.`)}}}var bD=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 $_(e){return di(e)?mD(e,()=>{}):e}function ad(e,t,n){return e.has(t)?e.get(t):e.set(t,n(t)).get(t)}function oJ(e){return typeof e!="object"||e==null||Object.isFrozen(e)}function aJ(e,t,n){const r=xD(e,t,n);return{detectMutations(){return wD(e,t,r,n)}}}function xD(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]=xD(e,t,n[s],u))}}return o}function wD(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=wD(e,t,n.children[d],r[d],s,p);if(g.wasMutated)return g}return{wasMutated:!1}}function sJ(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=oJ,ignoredPaths:i,warnAfter:o=32}=e;const a=aJ.bind(null,r,i);return({getState:s})=>{let u=s(),c=a(u),d;return p=>g=>{const h=yD(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 CD(e){const t=typeof e;return e==null||t==="string"||t==="boolean"||t==="number"||Array.isArray(e)||pc(e)}function fb(e,t="",n=CD,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=fb(d,p,n,r,i,o),a))return a}}return o&&SD(e)&&o.add(e),!1}function SD(e){if(!Object.isFrozen(e))return!1;for(const t of Object.values(e))if(!(typeof t!="object"||t===null)&&!SD(t))return!1;return!0}function lJ(e={}){if(process.env.NODE_ENV==="production")return()=>t=>n=>t(n);{const{isSerializable:t=CD,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(!Tx(h))return g(h);const y=g(h),b=yD(a,"SerializableStateInvariantMiddleware");return!u&&!(r.length&&r.indexOf(h.type)!==-1)&&b.measureTime(()=>{const v=fb(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,`
190
+ It is disabled in production builds, so you don't need to worry about that.`)}}}var bD=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 $_(e){return di(e)?mD(e,()=>{}):e}function ad(e,t,n){return e.has(t)?e.get(t):e.set(t,n(t)).get(t)}function sJ(e){return typeof e!="object"||e==null||Object.isFrozen(e)}function lJ(e,t,n){const r=xD(e,t,n);return{detectMutations(){return wD(e,t,r,n)}}}function xD(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]=xD(e,t,n[s],u))}}return o}function wD(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=wD(e,t,n.children[d],r[d],s,p);if(g.wasMutated)return g}return{wasMutated:!1}}function uJ(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=sJ,ignoredPaths:i,warnAfter:o=32}=e;const a=lJ.bind(null,r,i);return({getState:s})=>{let u=s(),c=a(u),d;return p=>g=>{const h=yD(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 CD(e){const t=typeof e;return e==null||t==="string"||t==="boolean"||t==="number"||Array.isArray(e)||pc(e)}function fb(e,t="",n=CD,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=fb(d,p,n,r,i,o),a))return a}}return o&&SD(e)&&o.add(e),!1}function SD(e){if(!Object.isFrozen(e))return!1;for(const t of Object.values(e))if(!(typeof t!="object"||t===null)&&!SD(t))return!1;return!0}function cJ(e={}){if(process.env.NODE_ENV==="production")return()=>t=>n=>t(n);{const{isSerializable:t=CD,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(!Tx(h))return g(h);const y=g(h),b=yD(a,"SerializableStateInvariantMiddleware");return!u&&!(r.length&&r.indexOf(h.type)!==-1)&&b.measureTime(()=>{const v=fb(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
191
  Take a look at the logic that dispatched this action: `,h,`
192
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)`,`
193
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=fb(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
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 uJ=()=>function(t){const{thunk:n=!0,immutableCheck:r=!0,serializableCheck:i=!0,actionCreatorCheck:o=!0}=t??{};let a=new bD;if(n&&(sd(n)?a.push(QQ):a.push(JQ(n.extraArgument))),process.env.NODE_ENV!=="production"){if(r){let s={};sd(r)||(s=r),a.unshift(sJ(s))}if(i){let s={};sd(i)||(s=i),a.push(lJ(s))}if(o){let s={};sd(o)||(s=o),a.unshift(iJ(s))}}return a},ED="RTK_autoBatch",Mt=()=>e=>({payload:e,meta:{[ED]:!0}}),F_=e=>t=>{setTimeout(t,e)},_D=(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:F_(10):e.type==="callback"?e.queueNotification:F_(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?.[ED],o=!i,o&&(a||(a=!0,u(c))),r.dispatch(d)}finally{i=!0}}})},cJ=e=>function(n){const{autoBatch:r=!0}=n??{};let i=new bD(e);return r&&i.push(_D(typeof r=="object"?r:void 0)),i};function fJ(e){const t=uJ(),{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=aD(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=eJ({trace:process.env.NODE_ENV!=="production",...typeof i=="object"&&i}));const p=jQ(...c),g=cJ(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 oD(u,a,y)}function OD(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 dJ(e){return typeof e=="function"}function pJ(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]=OD(t),o;if(dJ(e))o=()=>$_(e());else{const s=$_(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 mD(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 hJ="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",gJ=(e=21)=>{let t="",n=e;for(;n--;)t+=hJ[Math.random()*64|0];return t},mJ=Symbol.for("rtk-slice-createasyncthunk");function vJ(e,t){return`${e}/${t}`}function yJ({creators:e}={}){const t=e?.asyncThunk?.[mJ];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(xJ()):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:vJ(i,E),createNotation:typeof r.reducers=="function"};CJ(_)?EJ(P,_,c,t):wJ(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"?OD(r.extraReducers):[r.extraReducers],R={...E,...u.sliceCaseReducersByType};return pJ(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]=bJ(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 bJ(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=yJ();function xJ(){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 wJ({type:e,reducerName:t,createNotation:n},r,i){let o,a;if("reducer"in r){if(n&&!SJ(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 CJ(e){return e._reducerDefinitionType==="asyncThunk"}function SJ(e){return e._reducerDefinitionType==="reducerWithPrepare"}function EJ({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 _J="task",PD="listener",AD="completed",Dx="cancelled",OJ=`task-${Dx}`,PJ=`task-${AD}`,db=`${PD}-${Dx}`,AJ=`${PD}-${AD}`,Th=class{constructor(e){this.code=e,this.message=`${_J} ${Dx} (reason: ${e})`}name="TaskAbortError";message},jx=(e,t)=>{if(typeof e!="function")throw new TypeError(process.env.NODE_ENV==="production"?mt(32):`${t} is not a function`)},cp=()=>{},RD=(e,t=cp)=>(e.catch(t),e),ID=(e,t)=>(e.addEventListener("abort",t,{once:!0}),()=>e.removeEventListener("abort",t)),qa=e=>{if(e.aborted)throw new Th(e.reason)};function TD(e,t){let n=cp;return new Promise((r,i)=>{const o=()=>i(new Th(e.reason));if(e.aborted){o();return}n=ID(e,o),t.finally(()=>n()).then(r,i)}).finally(()=>{n=cp})}var RJ=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=>RD(TD(e,t).then(n=>(qa(e),n))),kD=e=>{const t=fp(e);return n=>t(new Promise(r=>setTimeout(r,n)))},{assign:ul}=Object,V_={},gc="listenerMiddleware",IJ=(e,t)=>{const n=r=>ID(e,()=>r.abort(e.reason));return(r,i)=>{jx(r,"taskExecutor");const o=new AbortController;n(o);const a=RJ(async()=>{qa(e),qa(o.signal);const s=await r({pause:fp(o.signal),delay:kD(o.signal),signal:o.signal});return qa(o.signal),s},()=>o.abort(PJ));return i?.autoJoin&&t.push(a.catch(cp)),{result:fp(e)(a),cancel(){o.abort(OJ)}}}},TJ=(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 TD(t,Promise.race(s));return qa(t),u}finally{o()}};return(r,i)=>RD(n(r,i))},ND=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 jx(o,"options.listener"),{predicate:i,type:t,effect:o}},MD=ul(e=>{const{type:t,predicate:n,effect:r}=ND(e);return{id:gJ(),effect:r,type:t,predicate:n,pending:new Set,unsubscribe:()=>{throw new Error(process.env.NODE_ENV==="production"?mt(22):"Unsubscribe not initialized")}}},{withTypes:()=>MD}),B_=(e,t)=>{const{type:n,effect:r,predicate:i}=ND(t);return Array.from(e.values()).find(o=>(typeof n=="string"?o.type===n:o.predicate===i)&&o.effect===r)},pb=e=>{e.pending.forEach(t=>{t.abort(db)})},kJ=(e,t)=>()=>{for(const n of t.keys())pb(n);e.clear()},z_=(e,t,n)=>{try{e(t,n)}catch(r){setTimeout(()=>{throw r},0)}},DD=ul(Tr(`${gc}/add`),{withTypes:()=>DD}),NJ=Tr(`${gc}/removeAll`),jD=ul(Tr(`${gc}/remove`),{withTypes:()=>jD}),MJ=(...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=MJ}=e;jx(a,"onError");const s=h=>(h.unsubscribe=()=>t.delete(h.id),t.set(h.id,h),y=>{h.unsubscribe(),y?.cancelActive&&pb(h)}),u=h=>{const y=B_(t,h)??MD(h);return s(y)};ul(u,{withTypes:()=>u});const c=h=>{const y=B_(t,h);return y&&(y.unsubscribe(),h.cancelActive&&pb(y)),!!y};ul(c,{withTypes:()=>c});const d=async(h,y,b,v)=>{const w=new AbortController,C=TJ(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:kD(w.signal),pause:fp(w.signal),extra:o,signal:w.signal,fork:IJ(w.signal,E),unsubscribe:h.unsubscribe,subscribe:()=>{t.set(h.id,h)},cancelActiveListeners:()=>{h.pending.forEach((_,P,R)=>{_!==w&&(_.abort(db),R.delete(_))})},cancel:()=>{w.abort(db),h.pending.delete(w)},throwIfCancelled:()=>{qa(w.signal)}})))}catch(_){_ instanceof Th||z_(a,_,{raisedBy:"effect"})}finally{await Promise.all(E),w.abort(AJ),i(h),h.pending.delete(w)}},p=kJ(t,n);return{middleware:h=>y=>b=>{if(!Tx(b))return y(b);if(DD.match(b))return u(b.payload);if(NJ.match(b)){p();return}if(jD.match(b))return c(b.payload);let v=h.getState();const w=()=>{if(v===V_)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,z_(a,I,{raisedBy:"predicate"})}R&&d(P,b,h,w)}}}finally{v=V_}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 DJ={layoutType:"horizontal",width:0,height:0,margin:{top:5,right:5,bottom:5,left:5},scale:1},LD=Wn({name:"chartLayout",initialState:DJ,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:jJ,setLayout:LJ,setChartSize:$J,setScale:FJ}=LD.actions,VJ=LD.reducer;function $D(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 W_(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?W_(Object(n),!0).forEach(function(r){BJ(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):W_(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function BJ(e,t,n){return(t=zJ(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function zJ(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 Mn(e,t,n){return pn(e)||pn(t)?n:ji(t)?gl(e,t,n):typeof t=="function"?t(e):n}var HJ=(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",FD=(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},VD=(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)},UJ=(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},GJ=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)}}}},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;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)}}}},KJ={sign:GJ,expand:CZ,none:ts,silhouette:SZ,wiggle:EZ,positive:qJ},YJ=(e,t,n)=>{var r,i=(r=KJ[n])!==null&&r!==void 0?r:ts,o=wZ().keys(t).value((s,u)=>Number(Mn(s,u,0))).order(tb).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 XJ(e){return e==null?void 0:String(e)}var H_=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},ZJ=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]},QJ=e=>{var t=e.flat(2).filter(Te);return[Math.min(...t),Math.max(...t)]},JJ=e=>[e[0]===1/0?0:e[0],e[1]===-1/0?0:e[1]],eee=(e,t,n)=>{if(e!=null)return JJ(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=$D(c,t,n),p=QJ(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]))},U_=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,G_=/^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 q_(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 BD(e,t){if(e)return String(e);if(typeof t=="string")return t}var tee=(e,t)=>{if(t==="horizontal")return e.relativeX;if(t==="vertical")return e.relativeY},nee=(e,t)=>t==="centric"?e.angle:e.radius,xo=e=>e.layout.width,wo=e=>e.layout.height,ree=e=>e.layout.scale,zD=e=>e.layout.margin,kh=q(e=>e.cartesianAxis.xAxis,e=>Object.values(e)),Nh=q(e=>e.cartesianAxis.yAxis,e=>Object.values(e)),iee="data-recharts-item-index",oee="data-recharts-item-id",vc=60;function K_(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?K_(Object(n),!0).forEach(function(r){aee(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):K_(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function aee(e,t,n){return(t=see(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function see(e){var t=lee(e,"string");return typeof t=="symbol"?t:t+""}function lee(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 uee=e=>e.brush.height;function cee(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 fee(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 dee(e){var t=kh(e);return t.reduce((n,r)=>r.orientation==="top"&&!r.mirror&&!r.hide?n+r.height:n,0)}function pee(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,zD,uee,cee,fee,dee,pee,iD,_Q],(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=HJ(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)})}),hee=q(wn,e=>({x:e.left,y:e.top,width:e.width,height:e.height})),Lx=q(xo,wo,(e,t)=>({x:0,y:0,width:e,height:t})),gee=j.createContext(null),pr=()=>j.useContext(gee)!=null,Mh=e=>e.brush,Dh=q([Mh,wn,zD],(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={},Y_;function mee(){return Y_||(Y_=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 X_;function vee(){return X_||(X_=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=mee();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 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={}){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,Q_;function bee(){return Q_||(Q_=1,Hv=yee().throttle),Hv}var xee=bee();const wee=fs(xee);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}},WD=(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}},Cee={width:0,height:0,overflow:"visible"},See={width:0,overflowX:"visible"},Eee={height:0,overflowY:"visible"},_ee={},Oee=e=>{var{width:t,height:n}=e,r=ns(t),i=ns(n);return r&&i?Cee:r?See:i?Eee:_ee};function Pee(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 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 J_(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 eO(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?J_(Object(n),!0).forEach(function(r){Aee(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):J_(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Aee(e,t,n){return(t=Ree(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ree(e){var t=Iee(e,"string");return typeof t=="symbol"?t:t+""}function Iee(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 HD=j.createContext(Ai.initialDimension);function Tee(e){return Li(e.width)&&Li(e.height)}function UD(e){var{children:t,width:n,height:r}=e,i=j.useMemo(()=>({width:n,height:r}),[n,r]);return Tee(i)?x.createElement(HD.Provider,{value:i},t):null}var $x=()=>j.useContext(HD),kee=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=wee(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}=WD(_,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,
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 fJ=()=>function(t){const{thunk:n=!0,immutableCheck:r=!0,serializableCheck:i=!0,actionCreatorCheck:o=!0}=t??{};let a=new bD;if(n&&(sd(n)?a.push(eJ):a.push(tJ(n.extraArgument))),process.env.NODE_ENV!=="production"){if(r){let s={};sd(r)||(s=r),a.unshift(uJ(s))}if(i){let s={};sd(i)||(s=i),a.push(cJ(s))}if(o){let s={};sd(o)||(s=o),a.unshift(aJ(s))}}return a},ED="RTK_autoBatch",Mt=()=>e=>({payload:e,meta:{[ED]:!0}}),F_=e=>t=>{setTimeout(t,e)},_D=(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:F_(10):e.type==="callback"?e.queueNotification:F_(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?.[ED],o=!i,o&&(a||(a=!0,u(c))),r.dispatch(d)}finally{i=!0}}})},dJ=e=>function(n){const{autoBatch:r=!0}=n??{};let i=new bD(e);return r&&i.push(_D(typeof r=="object"?r:void 0)),i};function pJ(e){const t=fJ(),{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=aD(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=nJ({trace:process.env.NODE_ENV!=="production",...typeof i=="object"&&i}));const p=$Q(...c),g=dJ(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 oD(u,a,y)}function OD(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 hJ(e){return typeof e=="function"}function gJ(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]=OD(t),o;if(hJ(e))o=()=>$_(e());else{const s=$_(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 mD(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 mJ="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",vJ=(e=21)=>{let t="",n=e;for(;n--;)t+=mJ[Math.random()*64|0];return t},yJ=Symbol.for("rtk-slice-createasyncthunk");function bJ(e,t){return`${e}/${t}`}function xJ({creators:e}={}){const t=e?.asyncThunk?.[yJ];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(CJ()):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:bJ(i,E),createNotation:typeof r.reducers=="function"};EJ(_)?OJ(P,_,c,t):SJ(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"?OD(r.extraReducers):[r.extraReducers],R={...E,...u.sliceCaseReducersByType};return gJ(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]=wJ(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 wJ(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=xJ();function CJ(){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 SJ({type:e,reducerName:t,createNotation:n},r,i){let o,a;if("reducer"in r){if(n&&!_J(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 EJ(e){return e._reducerDefinitionType==="asyncThunk"}function _J(e){return e._reducerDefinitionType==="reducerWithPrepare"}function OJ({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 PJ="task",PD="listener",AD="completed",Dx="cancelled",AJ=`task-${Dx}`,RJ=`task-${AD}`,db=`${PD}-${Dx}`,IJ=`${PD}-${AD}`,Th=class{constructor(e){this.code=e,this.message=`${PJ} ${Dx} (reason: ${e})`}name="TaskAbortError";message},jx=(e,t)=>{if(typeof e!="function")throw new TypeError(process.env.NODE_ENV==="production"?mt(32):`${t} is not a function`)},cp=()=>{},RD=(e,t=cp)=>(e.catch(t),e),ID=(e,t)=>(e.addEventListener("abort",t,{once:!0}),()=>e.removeEventListener("abort",t)),qa=e=>{if(e.aborted)throw new Th(e.reason)};function TD(e,t){let n=cp;return new Promise((r,i)=>{const o=()=>i(new Th(e.reason));if(e.aborted){o();return}n=ID(e,o),t.finally(()=>n()).then(r,i)}).finally(()=>{n=cp})}var TJ=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=>RD(TD(e,t).then(n=>(qa(e),n))),kD=e=>{const t=fp(e);return n=>t(new Promise(r=>setTimeout(r,n)))},{assign:ul}=Object,V_={},gc="listenerMiddleware",kJ=(e,t)=>{const n=r=>ID(e,()=>r.abort(e.reason));return(r,i)=>{jx(r,"taskExecutor");const o=new AbortController;n(o);const a=TJ(async()=>{qa(e),qa(o.signal);const s=await r({pause:fp(o.signal),delay:kD(o.signal),signal:o.signal});return qa(o.signal),s},()=>o.abort(RJ));return i?.autoJoin&&t.push(a.catch(cp)),{result:fp(e)(a),cancel(){o.abort(AJ)}}}},NJ=(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 TD(t,Promise.race(s));return qa(t),u}finally{o()}};return(r,i)=>RD(n(r,i))},ND=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 jx(o,"options.listener"),{predicate:i,type:t,effect:o}},MD=ul(e=>{const{type:t,predicate:n,effect:r}=ND(e);return{id:vJ(),effect:r,type:t,predicate:n,pending:new Set,unsubscribe:()=>{throw new Error(process.env.NODE_ENV==="production"?mt(22):"Unsubscribe not initialized")}}},{withTypes:()=>MD}),B_=(e,t)=>{const{type:n,effect:r,predicate:i}=ND(t);return Array.from(e.values()).find(o=>(typeof n=="string"?o.type===n:o.predicate===i)&&o.effect===r)},pb=e=>{e.pending.forEach(t=>{t.abort(db)})},MJ=(e,t)=>()=>{for(const n of t.keys())pb(n);e.clear()},z_=(e,t,n)=>{try{e(t,n)}catch(r){setTimeout(()=>{throw r},0)}},DD=ul(Tr(`${gc}/add`),{withTypes:()=>DD}),DJ=Tr(`${gc}/removeAll`),jD=ul(Tr(`${gc}/remove`),{withTypes:()=>jD}),jJ=(...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=jJ}=e;jx(a,"onError");const s=h=>(h.unsubscribe=()=>t.delete(h.id),t.set(h.id,h),y=>{h.unsubscribe(),y?.cancelActive&&pb(h)}),u=h=>{const y=B_(t,h)??MD(h);return s(y)};ul(u,{withTypes:()=>u});const c=h=>{const y=B_(t,h);return y&&(y.unsubscribe(),h.cancelActive&&pb(y)),!!y};ul(c,{withTypes:()=>c});const d=async(h,y,b,v)=>{const w=new AbortController,C=NJ(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:kD(w.signal),pause:fp(w.signal),extra:o,signal:w.signal,fork:kJ(w.signal,E),unsubscribe:h.unsubscribe,subscribe:()=>{t.set(h.id,h)},cancelActiveListeners:()=>{h.pending.forEach((_,P,R)=>{_!==w&&(_.abort(db),R.delete(_))})},cancel:()=>{w.abort(db),h.pending.delete(w)},throwIfCancelled:()=>{qa(w.signal)}})))}catch(_){_ instanceof Th||z_(a,_,{raisedBy:"effect"})}finally{await Promise.all(E),w.abort(IJ),i(h),h.pending.delete(w)}},p=MJ(t,n);return{middleware:h=>y=>b=>{if(!Tx(b))return y(b);if(DD.match(b))return u(b.payload);if(DJ.match(b)){p();return}if(jD.match(b))return c(b.payload);let v=h.getState();const w=()=>{if(v===V_)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,z_(a,I,{raisedBy:"predicate"})}R&&d(P,b,h,w)}}}finally{v=V_}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 LJ={layoutType:"horizontal",width:0,height:0,margin:{top:5,right:5,bottom:5,left:5},scale:1},LD=Wn({name:"chartLayout",initialState:LJ,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:$J,setLayout:FJ,setChartSize:VJ,setScale:BJ}=LD.actions,zJ=LD.reducer;function $D(e,t,n){return Array.isArray(e)&&e&&t+n!==0?e.slice(t,n+1):e}function ct(e){return Number.isFinite(e)}function Li(e){return typeof e=="number"&&e>0&&Number.isFinite(e)}function W_(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?W_(Object(n),!0).forEach(function(r){WJ(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):W_(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function WJ(e,t,n){return(t=HJ(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function HJ(e){var t=UJ(e,"string");return typeof t=="symbol"?t:t+""}function UJ(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 GJ=(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",FD=(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},VD=(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 ct(_)?{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 ct(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 ct(E)?{coordinate:E+b,value:w,index:C,offset:b}:null}).filter(fr):a.domain().map((w,C)=>{var E=a.map(w);return ct(E)?{coordinate:E+b,value:r?r[w]:w,index:C,offset:b}:null}).filter(fr)},qJ=(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},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,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)}}}},YJ=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)}}}},XJ={sign:KJ,expand:EZ,none:ts,silhouette:_Z,wiggle:OZ,positive:YJ},ZJ=(e,t,n)=>{var r,i=(r=XJ[n])!==null&&r!==void 0?r:ts,o=SZ().keys(t).value((s,u)=>Number(Mn(s,u,0))).order(tb).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 QJ(e){return e==null?void 0:String(e)}var H_=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},JJ=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]},eee=e=>{var t=e.flat(2).filter(Te);return[Math.min(...t),Math.max(...t)]},tee=e=>[e[0]===1/0?0:e[0],e[1]===-1/0?0:e[1]],nee=(e,t,n)=>{if(e!=null)return tee(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=$D(c,t,n),p=eee(d);return!ct(p[0])||!ct(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]))},U_=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,G_=/^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 q_(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 BD(e,t){if(e)return String(e);if(typeof t=="string")return t}var ree=(e,t)=>{if(t==="horizontal")return e.relativeX;if(t==="vertical")return e.relativeY},iee=(e,t)=>t==="centric"?e.angle:e.radius,xo=e=>e.layout.width,wo=e=>e.layout.height,oee=e=>e.layout.scale,zD=e=>e.layout.margin,kh=q(e=>e.cartesianAxis.xAxis,e=>Object.values(e)),Nh=q(e=>e.cartesianAxis.yAxis,e=>Object.values(e)),aee="data-recharts-item-index",see="data-recharts-item-id",vc=60;function K_(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?K_(Object(n),!0).forEach(function(r){lee(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):K_(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function lee(e,t,n){return(t=uee(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function uee(e){var t=cee(e,"string");return typeof t=="symbol"?t:t+""}function cee(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 fee=e=>e.brush.height;function dee(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 pee(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 hee(e){var t=kh(e);return t.reduce((n,r)=>r.orientation==="top"&&!r.mirror&&!r.hide?n+r.height:n,0)}function gee(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,zD,fee,dee,pee,hee,gee,iD,PQ],(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=GJ(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)})}),mee=q(wn,e=>({x:e.left,y:e.top,width:e.width,height:e.height})),Lx=q(xo,wo,(e,t)=>({x:0,y:0,width:e,height:t})),vee=j.createContext(null),pr=()=>j.useContext(vee)!=null,Mh=e=>e.brush,Dh=q([Mh,wn,zD],(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={},Y_;function yee(){return Y_||(Y_=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 X_;function bee(){return X_||(X_=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=yee();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 Z_;function xee(){return Z_||(Z_=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=bee();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,Q_;function wee(){return Q_||(Q_=1,Hv=xee().throttle),Hv}var Cee=wee();const See=fs(Cee);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}},WD=(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}},Eee={width:0,height:0,overflow:"visible"},_ee={width:0,overflowX:"visible"},Oee={height:0,overflowY:"visible"},Pee={},Aee=e=>{var{width:t,height:n}=e,r=ns(t),i=ns(n);return r&&i?Eee:r?_ee:i?Oee:Pee};function Ree(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 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 J_(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 eO(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?J_(Object(n),!0).forEach(function(r){Iee(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):J_(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Iee(e,t,n){return(t=Tee(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Tee(e){var t=kee(e,"string");return typeof t=="symbol"?t:t+""}function kee(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 HD=j.createContext(Ai.initialDimension);function Nee(e){return Li(e.width)&&Li(e.height)}function UD(e){var{children:t,width:n,height:r}=e,i=j.useMemo(()=>({width:n,height:r}),[n,r]);return Nee(i)?x.createElement(HD.Provider,{value:i},t):null}var $x=()=>j.useContext(HD),Mee=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=See(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}=WD(_,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,
196
196
  please check the style of container, or the props width(%s) and height(%s),
197
197
  or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the
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:eO(eO({},y),{},{width:i,height:o,minWidth:a,minHeight:s,maxHeight:u}),ref:b},x.createElement("div",{style:Oee({width:i,height:o})},x.createElement(UD,{width:R,height:I},c)))}),Nee=j.forwardRef((e,t)=>{var n=$x();if(Li(n.width)&&Li(n.height))return e.children;var{width:r,height:i}=Pee({width:e.width,height:e.height,aspect:e.aspect}),{calculatedWidth:o,calculatedHeight:a}=WD(void 0,void 0,{width:r,height:i,aspect:e.aspect,maxHeight:e.maxHeight});return Te(o)&&Te(a)?x.createElement(UD,{width:o,height:a},e.children):x.createElement(kee,hb({},e,{width:r,height:i,ref:t}))});function Fx(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(hee),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}},Mee={top:0,bottom:0,left:0,right:0,width:0,height:0,brushBottom:0},GD=()=>{var e;return(e=Le(wn))!==null&&e!==void 0?e:Mee},qD=()=>Le(xo),KD=()=>Le(wo),At=e=>e.layout.layoutType,_l=()=>Le(At),YD=()=>{var e=_l();if(e==="horizontal"||e==="vertical")return e},XD=e=>{var t=e.layout.layoutType;if(t==="centric"||t==="radial")return t},Dee=()=>{var e=_l();return e!==void 0},yc=e=>{var t=Ht(),n=pr(),{width:r,height:i}=e,o=$x(),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($J({width:a,height:s}))},[t,n,a,s]),null},ZD=Symbol.for("immer-nothing"),tO=Symbol.for("immer-draftable"),kr=Symbol.for("immer-state"),jee=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=jee[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?QD(e)||Array.isArray(e)||!!e[tO]||!!e.constructor?.[tO]||bc(e)||$h(e):!1}var Lee=Object.prototype.constructor.toString(),nO=new WeakMap;function QD(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=nO.get(n);return r===void 0&&(r=Function.toString.call(n),nO.set(n,r)),r===Lee}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 gb(e,t){return Lh(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function JD(e,t,n){const r=Lh(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function $ee(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 mb(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=QD(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 Vx(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=>Vx(n,!0))),e}function Fee(){ur(2)}var cd={value:Fee};function Fh(e){return e===null||typeof e!="object"?!0:Object.isFrozen(e)}var Vee={};function os(e){const t=Vee[e];return t||ur(0,e),t}var qu;function ej(){return qu}function Bee(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function rO(e,t){t&&(os("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function vb(e){yb(e),e.drafts_.forEach(zee),e.drafts_=null}function yb(e){e===qu&&(qu=e.parent_)}function iO(e){return qu=Bee(qu,e)}function zee(e){const t=e[kr];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function oO(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[kr].modified_&&(vb(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,[]),vb(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==ZD?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)=>aO(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)=>aO(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 aO(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&&!gb(t.assigned_,r)?o.concat(r):void 0,c=gp(e,i,u);if(JD(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_&&Vx(t,n)}function Wee(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:ej(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let i=r,o=Bx;n&&(i=[r],o=Ku);const{revoke:a,proxy:s}=Proxy.revocable(i,o);return r.draft_=s,r.revoke_=a,s}var Bx={get(e,t){if(t===kr)return e;const n=Fa(e);if(!gb(n,t))return Hee(e,n,t);const r=n[t];return e.finalized_||!is(r)?r:r===Uv(e.base_,t)?(Gv(e),e.copy_[t]=xb(r,e)):r},has(e,t){return t in Fa(e)},ownKeys(e){return Reflect.ownKeys(Fa(e))},set(e,t,n){const r=tj(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($ee(n,i)&&(n!==void 0||gb(e.base_,t)))return!0;Gv(e),bb(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),bb(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(Bx,(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),Bx.set.call(this,e[0],t,n,e[0])};function Uv(e,t){const n=e[kr];return(n?Fa(n):e)[t]}function Hee(e,t,n){const r=tj(t,n);return r?"value"in r?r.value:r.get?.call(e.draft_):void 0}function tj(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 bb(e){e.modified_||(e.modified_=!0,e.parent_&&bb(e.parent_))}function Gv(e){e.copy_||(e.copy_=mb(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var Uee=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=iO(this),a=xb(t,void 0);let s=!0;try{i=n(a),s=!1}finally{s?vb(o):yb(o)}return rO(o,r),oO(i,o)}else if(!t||typeof t!="object"){if(i=n(t),i===void 0&&(i=t),i===ZD&&(i=void 0),this.autoFreeze_&&Vx(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=Gee(e));const t=iO(this),n=xb(e,void 0);return n[kr].isManual_=!0,yb(t),n}finishDraft(e,t){const n=e&&e[kr];(!n||!n.isManual_)&&ur(9);const{scope_:r}=n;return rO(r,t),oO(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 xb(e,t){const n=bc(e)?os("MapSet").proxyMap_(e,t):$h(e)?os("MapSet").proxySet_(e,t):Wee(e,t);return(t?t.scope_:ej()).drafts_.push(n),n}function Gee(e){return vl(e)||ur(10,e),nj(e)}function nj(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=mb(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=mb(e,!0);return hp(n,(i,o)=>{JD(n,i,nj(o))},r),t&&(t.finalized_=!1),n}var qee=new Uee;qee.produce;var Kee={settings:{layout:"horizontal",align:"center",verticalAlign:"middle",itemSorter:"value"},size:{width:0,height:0},payload:[]},rj=Wn({name:"legend",initialState:Kee,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:Yee,replaceLegendPayload:Xee,removeLegendPayload:Zee}=rj.actions,Qee=rj.reducer,fd={exports:{}},qv={};var sO;function Jee(){if(sO)return qv;sO=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 lO;function ete(){return lO||(lO=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 uO;function tte(){return uO||(uO=1,process.env.NODE_ENV==="production"?fd.exports=Jee():fd.exports=ete()),fd.exports}tte();function nte(e){e()}function rte(){let e=null,t=null;return{clear(){e=null,t=null},notify(){nte(()=>{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 cO={notify(){},get:()=>[]};function ite(e,t){let n,r=cO,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=rte())}function p(){i--,n&&i===0&&(n(),n=void 0,r.clear(),r=cO)}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 ote=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",ate=ote(),ste=()=>typeof navigator<"u"&&navigator.product==="ReactNative",lte=ste(),ute=()=>ate||lte?x.useLayoutEffect:x.useEffect,cte=ute();function fO(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function fte(e,t){if(fO(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])||!fO(e[n[i]],t[n[i]]))return!1;return!0}var dte=Symbol.for("react-redux-context"),pte=typeof globalThis<"u"?globalThis:{};function hte(){if(!x.createContext)return{};const e=pte[dte]??=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 gte=hte();function mte(e){const{children:t,context:n,serverState:r,store:i}=e,o=x.useMemo(()=>{const u=ite(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]);cte(()=>{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||gte;return x.createElement(s.Provider,{value:o},t)}var vte=mte,yte=new Set(["axisLine","tickLine","activeBar","activeDot","activeLabel","activeShape","allowEscapeViewBox","background","cursor","dot","label","line","margin","padding","position","shape","style","tick","wrapperStyle","radius","throttledEvents"]);function bte(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(yte.has(r)){if(e[r]==null&&t[r]==null)continue;if(!fte(e[r],t[r]))return!1}else if(!bte(e[r],t[r]))return!1;return!0}function wb(){return wb=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},wb.apply(null,arguments)}function dO(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?dO(Object(n),!0).forEach(function(r){xte(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):dO(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function xte(e,t,n){return(t=wte(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function wte(e){var t=Cte(e,"string");return typeof t=="symbol"?t:t+""}function Cte(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 Ste(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 Ete(e,t){return t==null?e:Sh(e,t)}var _te=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=Ete(o,s),I=R.map((k,B)=>{if(k.type==="none")return null;var L=k.formatter||a||Ste,{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",wb({className:C,style:y},_),x.createElement("p",{className:E,style:b},x.isValidElement(w)?w:"".concat(w)),h())},du="recharts-tooltip-wrapper",Ote={visibility:"hidden"};function Pte(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 pO(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 Ate(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 Rte(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=pO({allowEscapeViewBox:t,coordinate:n,key:"x",offset:i,position:o,reverseDirection:a,tooltipDimension:s.width,viewBox:c,viewBoxDimension:c.width}),g=pO({allowEscapeViewBox:t,coordinate:n,key:"y",offset:r,position:o,reverseDirection:a,tooltipDimension:s.height,viewBox:c,viewBoxDimension:c.height}),d=Ate({translateX:p,translateY:g,useTranslate3d:u})):d=Ote,{cssProperties:d,cssClasses:Pte({translateX:p,translateY:g,coordinate:n})}}var Ite=()=>!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout),xc={isSsr:Ite()};function ij(){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 hO(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?hO(Object(n),!0).forEach(function(r){Tte(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):hO(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Tte(e,t,n){return(t=kte(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function kte(e){var t=Nte(e,"string");return typeof t=="symbol"?t:t+""}function Nte(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 Mte(e){if(!(e.prefersReducedMotion&&e.isAnimationActive==="auto")&&e.isAnimationActive&&e.active)return"transform ".concat(e.animationDuration,"ms ").concat(e.animationEasing)}function Dte(e){var t,n,r,i,o,a,s=ij(),[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}=Rte({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:Mte({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 jte=x.memo(Dte),oj=()=>{var e;return(e=Le(t=>t.rootProps.accessibilityLayer))!==null&&e!==void 0?e:!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 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 mO(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){Lte(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 Lte(e,t,n){return(t=$te(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $te(e){var t=Fte(e,"string");return typeof t=="symbol"?t:t+""}function Fte(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 vO={curveBasisClosed:cZ,curveBasisOpen:fZ,curveBasis:uZ,curveBumpX:YX,curveBumpY:XX,curveLinearClosed:dZ,curveLinear:wh,curveMonotoneX:pZ,curveMonotoneY:hZ,curveNatural:gZ,curveStep:mZ,curveStepAfter:yZ,curveStepBefore:vZ},vp=e=>ut(e.x)&&ut(e.y),yO=e=>e.base!=null&&vp(e.base)&&vp(e),pu=e=>e.x,hu=e=>e.y,Vte=(e,t)=>{if(typeof e=="function")return e;var n="curve".concat(dc(e));if((n==="curveMonotone"||n==="curveBump")&&t){var r=vO["".concat(n).concat(t==="vertical"?"Y":"X")];if(r)return r}return vO[n]||wh},bO={connectNulls:!1,type:"linear"},Bte=e=>{var{type:t=bO.type,points:n=[],baseLine:r,layout:i,connectNulls:o=bO.connectNulls}=e,a=Vte(t,i),s=o?n.filter(vp):n;if(Array.isArray(r)){var u,c=n.map((y,b)=>mO(mO({},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(yO).curve(a),p=o?c.filter(yO):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=TM().x(pu).y(hu);var h=g.defined(vp).curve(a);return h(s)},aj=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?Bte(a):r;return x.createElement("path",Cb({},fo(e),zZ(e),{className:Pt("recharts-curve",t),d:s===null?void 0:s,ref:i}))},zte=["x","y","top","left","width","height","className"];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 xO(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 Wte(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?xO(Object(n),!0).forEach(function(r){Hte(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xO(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Hte(e,t,n){return(t=Ute(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ute(e){var t=Gte(e,"string");return typeof t=="symbol"?t:t+""}function Gte(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 qte(e,t){if(e==null)return{};var n,r,i=Kte(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 Kte(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 Yte=(e,t,n,r,i,o)=>"M".concat(e,",").concat(i,"v").concat(r,"M").concat(o,",").concat(t,"h").concat(n),Xte=e=>{var{x:t=0,y:n=0,top:r=0,left:i=0,width:o=0,height:a=0,className:s}=e,u=qte(e,zte),c=Wte({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",Sb({},ti(c),{className:Pt("recharts-cross",s),d:Yte(t,n,o,a,r,i)}))};function Zte(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 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 CO(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){Qte(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 Qte(e,t,n){return(t=Jte(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Jte(e){var t=ene(e,"string");return typeof t=="symbol"?t:t+""}function ene(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 tne=e=>e.replace(/([A-Z])/g,t=>"-".concat(t.toLowerCase())),sj=(e,t,n)=>e.map(r=>"".concat(tne(r)," ").concat(t,"ms ").concat(n)).join(","),nne=(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)=>CO(CO({},n),{},{[r]:e(r,t[r])}),{});function SO(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?SO(Object(n),!0).forEach(function(r){rne(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):SO(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function rne(e,t,n){return(t=ine(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ine(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)}var yp=(e,t,n)=>e+(t-e)*n,Eb=e=>{var{from:t,to:n}=e;return t!==n},lj=(e,t,n)=>{var r=Yu((i,o)=>{if(Eb(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)=>Eb(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):lj(e,r,n-1)};function ane(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(Eb).length,d=null,p=g=>{a||(a=g);var h=g-a,y=h/n.dt;s=lj(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 sne(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 lne=(e,t,n,r,i,o)=>{var a=nne(e,t);return n==null?()=>(i(fn(fn({},e),t)),()=>{}):n.isStepper===!0?ane(e,t,n,a,i,o):sne(e,t,n,r,a,i,o)};var bp=1e-4,uj=(e,t)=>[0,3*e,3*t-6*e,3*e-3*t+1],cj=(e,t)=>e.map((n,r)=>n*t**r).reduce((n,r)=>n+r),EO=(e,t)=>n=>{var r=uj(e,t);return cj(r,n)},une=(e,t)=>n=>{var r=uj(e,t),i=[...r.map((o,a)=>o*a).slice(1),0];return cj(i,n)},cne=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]]},fne=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=cne(n[0]);if(i)return i}}return n.length===4?n:[0,0,1,1]},dne=(e,t,n,r)=>{var i=EO(e,n),o=EO(t,r),a=une(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},_O=function(){return dne(...fne(...arguments))},pne=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},hne=e=>{if(typeof e=="string")switch(e){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return _O(e);case"spring":return pne();default:if(e.split("(")[0]==="cubic-bezier")return _O(e)}return typeof e=="function"?e:null};function gne(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 mne{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 vne(){return gne(new mne)}var yne=j.createContext(vne);function bne(e,t){var n=j.useContext(yne);return j.useMemo(()=>t??n(e),[e,t,n])}var xne={begin:0,duration:1e3,easing:"ease",isActive:!0,canBegin:!0,onAnimationEnd:()=>{},onAnimationStart:()=>{}},OO={t:0},Yv={t:1};function zx(e){var t=Mr(e,xne),{isActive:n,canBegin:r,duration:i,easing:o,begin:a,onAnimationEnd:s,onAnimationStart:u,children:c}=t,d=ij(),p=n==="auto"?!xc.isSsr&&!d:n,g=bne(t.animationId,t.animationManager),[h,y]=j.useState(p?OO:Yv),b=j.useRef(null);return j.useEffect(()=>{p||y(Yv)},[p]),j.useEffect(()=>{if(!p||!r)return ds;var v=lne(OO,Yv,hne(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 Wx(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 wne=["radius"],Cne=["radius"],PO,AO,RO,IO,TO,kO,NO,MO,DO,jO;function LO(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 $O(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?LO(Object(n),!0).forEach(function(r){Sne(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):LO(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Sne(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=_ne(e,"string");return typeof t=="symbol"?t:t+""}function _ne(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 FO(e,t){if(e==null)return{};var n,r,i=One(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 One(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 VO=(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(PO||(PO=Si(["M",",",""])),e,t+u*g[0]),g[0]>0&&(p+=qt(AO||(AO=Si(["A ",",",",0,0,",",",",",""])),g[0],g[0],d,e+c*g[0],t)),p+=qt(RO||(RO=Si(["L ",",",""])),e+n-c*g[1],t),g[1]>0&&(p+=qt(IO||(IO=Si(["A ",",",",0,0,",`,
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:eO(eO({},y),{},{width:i,height:o,minWidth:a,minHeight:s,maxHeight:u}),ref:b},x.createElement("div",{style:Aee({width:i,height:o})},x.createElement(UD,{width:R,height:I},c)))}),Dee=j.forwardRef((e,t)=>{var n=$x();if(Li(n.width)&&Li(n.height))return e.children;var{width:r,height:i}=Ree({width:e.width,height:e.height,aspect:e.aspect}),{calculatedWidth:o,calculatedHeight:a}=WD(void 0,void 0,{width:r,height:i,aspect:e.aspect,maxHeight:e.maxHeight});return Te(o)&&Te(a)?x.createElement(UD,{width:o,height:a},e.children):x.createElement(Mee,hb({},e,{width:r,height:i,ref:t}))});function Fx(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(mee),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}},jee={top:0,bottom:0,left:0,right:0,width:0,height:0,brushBottom:0},GD=()=>{var e;return(e=Le(wn))!==null&&e!==void 0?e:jee},qD=()=>Le(xo),KD=()=>Le(wo),At=e=>e.layout.layoutType,_l=()=>Le(At),YD=()=>{var e=_l();if(e==="horizontal"||e==="vertical")return e},XD=e=>{var t=e.layout.layoutType;if(t==="centric"||t==="radial")return t},Lee=()=>{var e=_l();return e!==void 0},yc=e=>{var t=Ht(),n=pr(),{width:r,height:i}=e,o=$x(),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(VJ({width:a,height:s}))},[t,n,a,s]),null},ZD=Symbol.for("immer-nothing"),tO=Symbol.for("immer-draftable"),kr=Symbol.for("immer-state"),$ee=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=$ee[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?QD(e)||Array.isArray(e)||!!e[tO]||!!e.constructor?.[tO]||bc(e)||$h(e):!1}var Fee=Object.prototype.constructor.toString(),nO=new WeakMap;function QD(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=nO.get(n);return r===void 0&&(r=Function.toString.call(n),nO.set(n,r)),r===Fee}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 gb(e,t){return Lh(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function JD(e,t,n){const r=Lh(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function Vee(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 mb(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=QD(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 Vx(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=>Vx(n,!0))),e}function Bee(){ur(2)}var cd={value:Bee};function Fh(e){return e===null||typeof e!="object"?!0:Object.isFrozen(e)}var zee={};function os(e){const t=zee[e];return t||ur(0,e),t}var qu;function ej(){return qu}function Wee(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function rO(e,t){t&&(os("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function vb(e){yb(e),e.drafts_.forEach(Hee),e.drafts_=null}function yb(e){e===qu&&(qu=e.parent_)}function iO(e){return qu=Wee(qu,e)}function Hee(e){const t=e[kr];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function oO(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[kr].modified_&&(vb(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,[]),vb(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==ZD?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)=>aO(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)=>aO(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 aO(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&&!gb(t.assigned_,r)?o.concat(r):void 0,c=gp(e,i,u);if(JD(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_&&Vx(t,n)}function Uee(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:ej(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let i=r,o=Bx;n&&(i=[r],o=Ku);const{revoke:a,proxy:s}=Proxy.revocable(i,o);return r.draft_=s,r.revoke_=a,s}var Bx={get(e,t){if(t===kr)return e;const n=Fa(e);if(!gb(n,t))return Gee(e,n,t);const r=n[t];return e.finalized_||!is(r)?r:r===Uv(e.base_,t)?(Gv(e),e.copy_[t]=xb(r,e)):r},has(e,t){return t in Fa(e)},ownKeys(e){return Reflect.ownKeys(Fa(e))},set(e,t,n){const r=tj(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(Vee(n,i)&&(n!==void 0||gb(e.base_,t)))return!0;Gv(e),bb(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),bb(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(Bx,(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),Bx.set.call(this,e[0],t,n,e[0])};function Uv(e,t){const n=e[kr];return(n?Fa(n):e)[t]}function Gee(e,t,n){const r=tj(t,n);return r?"value"in r?r.value:r.get?.call(e.draft_):void 0}function tj(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 bb(e){e.modified_||(e.modified_=!0,e.parent_&&bb(e.parent_))}function Gv(e){e.copy_||(e.copy_=mb(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var qee=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=iO(this),a=xb(t,void 0);let s=!0;try{i=n(a),s=!1}finally{s?vb(o):yb(o)}return rO(o,r),oO(i,o)}else if(!t||typeof t!="object"){if(i=n(t),i===void 0&&(i=t),i===ZD&&(i=void 0),this.autoFreeze_&&Vx(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=Kee(e));const t=iO(this),n=xb(e,void 0);return n[kr].isManual_=!0,yb(t),n}finishDraft(e,t){const n=e&&e[kr];(!n||!n.isManual_)&&ur(9);const{scope_:r}=n;return rO(r,t),oO(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 xb(e,t){const n=bc(e)?os("MapSet").proxyMap_(e,t):$h(e)?os("MapSet").proxySet_(e,t):Uee(e,t);return(t?t.scope_:ej()).drafts_.push(n),n}function Kee(e){return vl(e)||ur(10,e),nj(e)}function nj(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=mb(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=mb(e,!0);return hp(n,(i,o)=>{JD(n,i,nj(o))},r),t&&(t.finalized_=!1),n}var Yee=new qee;Yee.produce;var Xee={settings:{layout:"horizontal",align:"center",verticalAlign:"middle",itemSorter:"value"},size:{width:0,height:0},payload:[]},rj=Wn({name:"legend",initialState:Xee,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:cge,setLegendSettings:fge,addLegendPayload:Zee,replaceLegendPayload:Qee,removeLegendPayload:Jee}=rj.actions,ete=rj.reducer,fd={exports:{}},qv={};var sO;function tte(){if(sO)return qv;sO=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 lO;function nte(){return lO||(lO=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 uO;function rte(){return uO||(uO=1,process.env.NODE_ENV==="production"?fd.exports=tte():fd.exports=nte()),fd.exports}rte();function ite(e){e()}function ote(){let e=null,t=null;return{clear(){e=null,t=null},notify(){ite(()=>{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 cO={notify(){},get:()=>[]};function ate(e,t){let n,r=cO,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=ote())}function p(){i--,n&&i===0&&(n(),n=void 0,r.clear(),r=cO)}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 ste=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",lte=ste(),ute=()=>typeof navigator<"u"&&navigator.product==="ReactNative",cte=ute(),fte=()=>lte||cte?x.useLayoutEffect:x.useEffect,dte=fte();function fO(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function pte(e,t){if(fO(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])||!fO(e[n[i]],t[n[i]]))return!1;return!0}var hte=Symbol.for("react-redux-context"),gte=typeof globalThis<"u"?globalThis:{};function mte(){if(!x.createContext)return{};const e=gte[hte]??=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 vte=mte();function yte(e){const{children:t,context:n,serverState:r,store:i}=e,o=x.useMemo(()=>{const u=ate(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]);dte(()=>{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||vte;return x.createElement(s.Provider,{value:o},t)}var bte=yte,xte=new Set(["axisLine","tickLine","activeBar","activeDot","activeLabel","activeShape","allowEscapeViewBox","background","cursor","dot","label","line","margin","padding","position","shape","style","tick","wrapperStyle","radius","throttledEvents"]);function wte(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(xte.has(r)){if(e[r]==null&&t[r]==null)continue;if(!pte(e[r],t[r]))return!1}else if(!wte(e[r],t[r]))return!1;return!0}function wb(){return wb=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},wb.apply(null,arguments)}function dO(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?dO(Object(n),!0).forEach(function(r){Cte(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):dO(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)}function _te(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 Ote(e,t){return t==null?e:Sh(e,t)}var Pte=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=Ote(o,s),I=R.map((k,B)=>{if(k.type==="none")return null;var L=k.formatter||a||_te,{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",wb({className:C,style:y},_),x.createElement("p",{className:E,style:b},x.isValidElement(w)?w:"".concat(w)),h())},du="recharts-tooltip-wrapper",Ate={visibility:"hidden"};function Rte(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 pO(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 Ite(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 Tte(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=pO({allowEscapeViewBox:t,coordinate:n,key:"x",offset:i,position:o,reverseDirection:a,tooltipDimension:s.width,viewBox:c,viewBoxDimension:c.width}),g=pO({allowEscapeViewBox:t,coordinate:n,key:"y",offset:r,position:o,reverseDirection:a,tooltipDimension:s.height,viewBox:c,viewBoxDimension:c.height}),d=Ite({translateX:p,translateY:g,useTranslate3d:u})):d=Ate,{cssProperties:d,cssClasses:Rte({translateX:p,translateY:g,coordinate:n})}}var kte=()=>!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout),xc={isSsr:kte()};function ij(){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 hO(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?hO(Object(n),!0).forEach(function(r){Nte(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):hO(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Nte(e,t,n){return(t=Mte(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Mte(e){var t=Dte(e,"string");return typeof t=="symbol"?t:t+""}function Dte(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 jte(e){if(!(e.prefersReducedMotion&&e.isAnimationActive==="auto")&&e.isAnimationActive&&e.active)return"transform ".concat(e.animationDuration,"ms ").concat(e.animationEasing)}function Lte(e){var t,n,r,i,o,a,s=ij(),[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}=Tte({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:jte({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 $te=x.memo(Lte),oj=()=>{var e;return(e=Le(t=>t.rootProps.accessibilityLayer))!==null&&e!==void 0?e:!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 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 mO(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){Fte(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 Fte(e,t,n){return(t=Vte(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Vte(e){var t=Bte(e,"string");return typeof t=="symbol"?t:t+""}function Bte(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 vO={curveBasisClosed:dZ,curveBasisOpen:pZ,curveBasis:fZ,curveBumpX:ZX,curveBumpY:QX,curveLinearClosed:hZ,curveLinear:wh,curveMonotoneX:gZ,curveMonotoneY:mZ,curveNatural:vZ,curveStep:yZ,curveStepAfter:xZ,curveStepBefore:bZ},vp=e=>ct(e.x)&&ct(e.y),yO=e=>e.base!=null&&vp(e.base)&&vp(e),pu=e=>e.x,hu=e=>e.y,zte=(e,t)=>{if(typeof e=="function")return e;var n="curve".concat(dc(e));if((n==="curveMonotone"||n==="curveBump")&&t){var r=vO["".concat(n).concat(t==="vertical"?"Y":"X")];if(r)return r}return vO[n]||wh},bO={connectNulls:!1,type:"linear"},Wte=e=>{var{type:t=bO.type,points:n=[],baseLine:r,layout:i,connectNulls:o=bO.connectNulls}=e,a=zte(t,i),s=o?n.filter(vp):n;if(Array.isArray(r)){var u,c=n.map((y,b)=>mO(mO({},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(yO).curve(a),p=o?c.filter(yO):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=TM().x(pu).y(hu);var h=g.defined(vp).curve(a);return h(s)},aj=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?Wte(a):r;return x.createElement("path",Cb({},fo(e),HZ(e),{className:Pt("recharts-curve",t),d:s===null?void 0:s,ref:i}))},Hte=["x","y","top","left","width","height","className"];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 xO(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 Ute(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?xO(Object(n),!0).forEach(function(r){Gte(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xO(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Gte(e,t,n){return(t=qte(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function qte(e){var t=Kte(e,"string");return typeof t=="symbol"?t:t+""}function Kte(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 Yte(e,t){if(e==null)return{};var n,r,i=Xte(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 Xte(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 Zte=(e,t,n,r,i,o)=>"M".concat(e,",").concat(i,"v").concat(r,"M").concat(o,",").concat(t,"h").concat(n),Qte=e=>{var{x:t=0,y:n=0,top:r=0,left:i=0,width:o=0,height:a=0,className:s}=e,u=Yte(e,Hte),c=Ute({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",Sb({},ti(c),{className:Pt("recharts-cross",s),d:Zte(t,n,o,a,r,i)}))};function Jte(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 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 CO(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){ene(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 ene(e,t,n){return(t=tne(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function tne(e){var t=nne(e,"string");return typeof t=="symbol"?t:t+""}function nne(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 rne=e=>e.replace(/([A-Z])/g,t=>"-".concat(t.toLowerCase())),sj=(e,t,n)=>e.map(r=>"".concat(rne(r)," ").concat(t,"ms ").concat(n)).join(","),ine=(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)=>CO(CO({},n),{},{[r]:e(r,t[r])}),{});function SO(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?SO(Object(n),!0).forEach(function(r){one(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):SO(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function one(e,t,n){return(t=ane(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ane(e){var t=sne(e,"string");return typeof t=="symbol"?t:t+""}function sne(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,Eb=e=>{var{from:t,to:n}=e;return t!==n},lj=(e,t,n)=>{var r=Yu((i,o)=>{if(Eb(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)=>Eb(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):lj(e,r,n-1)};function lne(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(Eb).length,d=null,p=g=>{a||(a=g);var h=g-a,y=h/n.dt;s=lj(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 une(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 cne=(e,t,n,r,i,o)=>{var a=ine(e,t);return n==null?()=>(i(fn(fn({},e),t)),()=>{}):n.isStepper===!0?lne(e,t,n,a,i,o):une(e,t,n,r,a,i,o)};var bp=1e-4,uj=(e,t)=>[0,3*e,3*t-6*e,3*e-3*t+1],cj=(e,t)=>e.map((n,r)=>n*t**r).reduce((n,r)=>n+r),EO=(e,t)=>n=>{var r=uj(e,t);return cj(r,n)},fne=(e,t)=>n=>{var r=uj(e,t),i=[...r.map((o,a)=>o*a).slice(1),0];return cj(i,n)},dne=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]]},pne=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=dne(n[0]);if(i)return i}}return n.length===4?n:[0,0,1,1]},hne=(e,t,n,r)=>{var i=EO(e,n),o=EO(t,r),a=fne(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},_O=function(){return hne(...pne(...arguments))},gne=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},mne=e=>{if(typeof e=="string")switch(e){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return _O(e);case"spring":return gne();default:if(e.split("(")[0]==="cubic-bezier")return _O(e)}return typeof e=="function"?e:null};function vne(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 yne{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 bne(){return vne(new yne)}var xne=j.createContext(bne);function wne(e,t){var n=j.useContext(xne);return j.useMemo(()=>t??n(e),[e,t,n])}var Cne={begin:0,duration:1e3,easing:"ease",isActive:!0,canBegin:!0,onAnimationEnd:()=>{},onAnimationStart:()=>{}},OO={t:0},Yv={t:1};function zx(e){var t=Mr(e,Cne),{isActive:n,canBegin:r,duration:i,easing:o,begin:a,onAnimationEnd:s,onAnimationStart:u,children:c}=t,d=ij(),p=n==="auto"?!xc.isSsr&&!d:n,g=wne(t.animationId,t.animationManager),[h,y]=j.useState(p?OO:Yv),b=j.useRef(null);return j.useEffect(()=>{p||y(Yv)},[p]),j.useEffect(()=>{if(!p||!r)return ds;var v=cne(OO,Yv,mne(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 Wx(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 Sne=["radius"],Ene=["radius"],PO,AO,RO,IO,TO,kO,NO,MO,DO,jO;function LO(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 $O(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?LO(Object(n),!0).forEach(function(r){_ne(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):LO(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function _ne(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=Pne(e,"string");return typeof t=="symbol"?t:t+""}function Pne(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 FO(e,t){if(e==null)return{};var n,r,i=Ane(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 Ane(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 VO=(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(PO||(PO=Si(["M",",",""])),e,t+u*g[0]),g[0]>0&&(p+=qt(AO||(AO=Si(["A ",",",",0,0,",",",",",""])),g[0],g[0],d,e+c*g[0],t)),p+=qt(RO||(RO=Si(["L ",",",""])),e+n-c*g[1],t),g[1]>0&&(p+=qt(IO||(IO=Si(["A ",",",",0,0,",`,
199
199
  `,",",""])),g[1],g[1],d,e+n,t+u*g[1])),p+=qt(TO||(TO=Si(["L ",",",""])),e+n,t+r-u*g[2]),g[2]>0&&(p+=qt(kO||(kO=Si(["A ",",",",0,0,",`,
200
200
  `,",",""])),g[2],g[2],d,e+n-c*g[2],t+r)),p+=qt(NO||(NO=Si(["L ",",",""])),e+c*g[3],t+r),g[3]>0&&(p+=qt(MO||(MO=Si(["A ",",",",0,0,",`,
201
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(DO||(DO=Si(["M ",",",`
@@ -205,14 +205,14 @@ Take a look at the reducer(s) handling this action type: ${h.type}.
205
205
  L `,",",`
206
206
  A `,",",",0,0,",",",",",`
207
207
  L `,",",`
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(jO||(jO=Si(["M ",","," h "," v "," h "," Z"])),e,t,n,r,-n);return p},BO={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},fj=e=>{var t=Mr(e,BO),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=Wx(_,"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=FO(I,wne);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:VO(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=sj(["strokeDasharray"],g,typeof p=="string"?p:BO.animationEasing);return x.createElement(zx,{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=FO($e,Cne);return x.createElement("path",xp({},Ce,{radius:typeof c=="number"?c:void 0,className:R,d:VO(K,Ae,Q,pe,c),ref:n,style:$O($O({},Se),t.style)}))})};function zO(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 WO(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?zO(Object(n),!0).forEach(function(r){Pne(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zO(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Pne(e,t,n){return(t=Ane(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ane(e){var t=Rne(e,"string");return typeof t=="symbol"?t:t+""}function Rne(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,Ine=e=>e*180/Math.PI,kn=(e,t,n,r)=>({x:e+Math.cos(-wp*r)*n,y:t+Math.sin(-wp*r)*n}),Tne=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},kne=(e,t)=>{var{x:n,y:r}=e,{x:i,y:o}=t;return Math.sqrt((n-i)**2+(r-o)**2)},Nne=(e,t)=>{var{x:n,y:r}=e,{cx:i,cy:o}=t,a=kne({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:Ine(u),angleInRadian:u}},Mne=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}},Dne=(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},jne=(e,t)=>{var{relativeX:n,relativeY:r}=e,{radius:i,angle:o}=Nne({x:n,y:r},t),{innerRadius:a,outerRadius:s}=t;if(i<a||i>s||i===0)return null;var{startAngle:u,endAngle:c}=Mne(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?WO(WO({},t),{},{radius:i,angle:Dne(d,t)}):null};function dj(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 HO,UO,GO,qO,KO,YO,XO;function _b(){return _b=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},_b.apply(null,arguments)}function za(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var Lne=(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}},pj=e=>{var{cx:t,cy:n,innerRadius:r,outerRadius:i,startAngle:o,endAngle:a}=e,s=Lne(o,a),u=o+s,c=kn(t,n,i,o),d=kn(t,n,i,u),p=qt(HO||(HO=za(["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(jO||(jO=Si(["M ",","," h "," v "," h "," Z"])),e,t,n,r,-n);return p},BO={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},fj=e=>{var t=Mr(e,BO),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=Wx(_,"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=FO(I,Sne);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:VO(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=sj(["strokeDasharray"],g,typeof p=="string"?p:BO.animationEasing);return x.createElement(zx,{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=FO($e,Ene);return x.createElement("path",xp({},Ce,{radius:typeof c=="number"?c:void 0,className:R,d:VO(K,Ae,Q,pe,c),ref:n,style:$O($O({},Se),t.style)}))})};function zO(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 WO(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?zO(Object(n),!0).forEach(function(r){Rne(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zO(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Rne(e,t,n){return(t=Ine(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ine(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 wp=Math.PI/180,kne=e=>e*180/Math.PI,kn=(e,t,n,r)=>({x:e+Math.cos(-wp*r)*n,y:t+Math.sin(-wp*r)*n}),Nne=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},Mne=(e,t)=>{var{x:n,y:r}=e,{x:i,y:o}=t;return Math.sqrt((n-i)**2+(r-o)**2)},Dne=(e,t)=>{var{x:n,y:r}=e,{cx:i,cy:o}=t,a=Mne({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:kne(u),angleInRadian:u}},jne=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}},Lne=(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},$ne=(e,t)=>{var{relativeX:n,relativeY:r}=e,{radius:i,angle:o}=Dne({x:n,y:r},t),{innerRadius:a,outerRadius:s}=t;if(i<a||i>s||i===0)return null;var{startAngle:u,endAngle:c}=jne(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?WO(WO({},t),{},{radius:i,angle:Lne(d,t)}):null};function dj(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 HO,UO,GO,qO,KO,YO,XO;function _b(){return _b=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},_b.apply(null,arguments)}function za(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var Fne=(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}},pj=e=>{var{cx:t,cy:n,innerRadius:r,outerRadius:i,startAngle:o,endAngle:a}=e,s=Fne(o,a),u=o+s,c=kn(t,n,i,o),d=kn(t,n,i,u),p=qt(HO||(HO=za(["M ",",",`
209
209
  A `,",",`,0,
210
210
  `,",",`,
211
211
  `,",",`
212
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(UO||(UO=za(["L ",",",`
213
213
  A `,",",`,0,
214
214
  `,",",`,
215
- `,","," Z"])),h.x,h.y,r,r,+(Math.abs(s)>180),+(o<=u),g.x,g.y)}else p+=qt(GO||(GO=za(["L ",","," Z"])),t,n);return p},$ne=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(qO||(qO=za(["M ",",",`
215
+ `,","," Z"])),h.x,h.y,r,r,+(Math.abs(s)>180),+(o<=u),g.x,g.y)}else p+=qt(GO||(GO=za(["L ",","," Z"])),t,n);return p},Vne=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(qO||(qO=za(["M ",",",`
216
216
  a`,",",",0,0,1,",`,0
217
217
  a`,",",",0,0,1,",`,0
218
218
  `])),g.x,g.y,o,o,o*2,o,o,-o*2):pj({cx:t,cy:n,innerRadius:r,outerRadius:i,startAngle:u,endAngle:c});var C=qt(KO||(KO=za(["M ",",",`
@@ -222,9 +222,9 @@ Take a look at the reducer(s) handling this action type: ${h.type}.
222
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(YO||(YO=za(["L",",",`
223
223
  A`,",",",0,0,",",",",",`
224
224
  A`,",",",0,",",",",",",",`
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(XO||(XO=za(["L",",","Z"])),t,n);return C},Fne={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},hj=e=>{var t=Mr(e,Fne),{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=$ne({cx:n,cy:r,innerRadius:i,outerRadius:o,cornerRadius:Math.min(y,h/2),forceCornerRadius:s,cornerIsExternal:u,startAngle:c,endAngle:d}):b=pj({cx:n,cy:r,innerRadius:i,outerRadius:o,startAngle:c,endAngle:d}),x.createElement("path",_b({},ti(t),{className:g,d:b}))};function Vne(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(GM(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 dj(t)}}var Xv={},Zv={},Qv={},ZO;function Bne(){return ZO||(ZO=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=nD();function n(r){return t.isSymbol(r)?NaN:Number(r)}e.toNumber=n})(Qv)),Qv}var QO;function zne(){return QO||(QO=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Bne();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 JO;function Wne(){return JO||(JO=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=rD(),n=zne();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,eP;function Hne(){return eP||(eP=1,Jv=Wne().range),Jv}var Une=Hne();const gj=fs(Une);var Co=e=>e.chartData,mj=q([Co],e=>{var t=e.chartData!=null?e.chartData.length-1:0;return{chartData:e.chartData,computedData:e.computedData,dataEndIndex:t,dataStartIndex:0}}),vj=(e,t,n,r)=>r?mj(e):Co(e),Gne=(e,t,n)=>n?mj(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 tP(e,t,n){return n?e:[Math.min(e[0],t[0]),Math.max(e[1],t[1])]}function yj(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 qne(e,t,n){if(!(!n&&t==null)){if(typeof e=="function"&&t!=null)try{var r=e(t,n);if(Ti(r))return tP(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"&&U_.test(i)){var u=U_.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"&&G_.test(o)){var d=G_.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:tP(g,t,n)}}}var Ol=1e9,Kne={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},Ux,Vt=!0,ni="[DecimalError] ",Ka=ni+"Invalid argument: ",Hx=ni+"Exponent out of range: ",Pl=Math.floor,Va=Math.pow,Yne=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Or,xn=1e7,Dt=7,bj=9007199254740991,Cp=Pl(bj/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?Cj(t,e):xj(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 wj(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?xj(t,e):Cj(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)<=bj){for(i=new u(Or),t=Math.ceil(r/Dt+4),Vt=!1;n%2&&(i=i.times(s),rP(i.d,t)),n=Pl(n/2),n!==0;)s=s.times(s),rP(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=wj(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 xj(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 wj(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(Hx+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 nP(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(Hx+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(Hx+rn(e));return e}function Cj(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 rP(e,t){if(e.length>t)return e.length=t,!0}function Sj(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 nP(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,Yne.test(o))nP(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=Sj,i.config=i.set=Xne,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 Xne(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 Ux=Sj(Kne);Or=new Ux(1);const lt=Ux;function Ej(e){var t;return e===0?t=1:t=Math.floor(new lt(e).abs().log(10).toNumber())+1,t}function _j(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 Oj=e=>{var[t,n]=e,[r,i]=[t,n];return t>n&&([r,i]=[n,t]),[r,i]},Gx=(e,t,n)=>{if(e.lte(0))return new lt(0);var r=Ej(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()))},Pj=(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()))},Zne=(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(Ej(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},Aj=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]:Gx;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?Aj(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))})},iP=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]=Oj([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 Zne(u,i,o);var p=a==="snap125"?Pj:Gx,{step:g,tickMin:h,tickMax:y}=Aj(u,c,s,o,0,p),b=_j(h,y.add(new lt(.1).mul(g)),g);return n>r?b.reverse():b},oP=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]=Oj([r,i]);if(s===-1/0||u===1/0)return[r,i];if(s===u)return[s];var c=a==="snap125"?Pj:Gx,d=Math.max(n,2),p=c(new lt(u).sub(s).div(d-1),o,0),g=[..._j(new lt(s),new lt(u),p),u];return o===!1&&(g=g.map(h=>Math.round(h))),r>i?g.reverse():g},Rj=e=>e.rootProps.maxBarSize,Qne=e=>e.rootProps.barGap,Ij=e=>e.rootProps.barCategoryGap,Jne=e=>e.rootProps.barSize,Bh=e=>e.rootProps.stackOffset,Tj=e=>e.rootProps.reverseStackOrder,qx=e=>e.options.chartName,Kx=e=>e.rootProps.syncId,kj=e=>e.rootProps.syncMethod,Yx=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 aP(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?aP(Object(n),!0).forEach(function(r){ere(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):aP(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ere(e,t,n){return(t=tre(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function tre(e){var t=nre(e,"string");return typeof t=="symbol"?t:t+""}function nre(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 sP={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"},lP={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"},rre=(e,t)=>{if(t!=null)return e.polarAxis.angleAxis[t]},Xx=q([rre,XD],(e,t)=>{var n;if(e!=null)return e;var r=(n=Wh(t,"angleAxis",sP.type))!==null&&n!==void 0?n:"category";return Sp(Sp({},sP),{},{type:r})}),ire=(e,t)=>e.polarAxis.radiusAxis[t],Zx=q([ire,XD],(e,t)=>{var n;if(e!=null)return e;var r=(n=Wh(t,"radiusAxis",lP.type))!==null&&n!==void 0?n:"category";return Sp(Sp({},lP),{},{type:r})}),Hh=e=>e.polarOptions,Qx=q([xo,wo,wn],Tne),Nj=q([Hh,Qx],(e,t)=>{if(e!=null)return fi(e.innerRadius,t,0)}),Mj=q([Hh,Qx],(e,t)=>{if(e!=null)return fi(e.outerRadius,t,t*.8)}),ore=e=>{if(e==null)return[0,0];var{startAngle:t,endAngle:n}=e;return[t,n]},Dj=q([Hh],ore);q([Xx,Dj],zh);var jj=q([Qx,Nj,Mj],(e,t,n)=>{if(!(e==null||t==null||n==null))return[t,n]});q([Zx,jj],zh);var Lj=q([At,Hh,Nj,Mj,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 Jx(e){return e?.id}function $j(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=Jx(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 are(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 ew(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 sre=(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 lre(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function tw(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===lre?e:ure,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 ure(){return 0}function Fj(e){return e===null?NaN:+e}function*cre(e,t){for(let n of e)n!=null&&(n=+n)>=n&&(yield n)}const fre=tw(na),wc=fre.right;tw(Fj).center;class uP extends Map{constructor(t,n=hre){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(cP(this,t))}has(t){return super.has(cP(this,t))}set(t,n){return super.set(dre(this,t),n)}delete(t){return super.delete(pre(this,t))}}function cP({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function dre({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function pre({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function hre(e){return e!==null&&typeof e=="object"?e.valueOf():e}function gre(e=na){if(e===na)return Vj;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 Vj(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const mre=Math.sqrt(50),vre=Math.sqrt(10),yre=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>=mre?10:o>=vre?5:o>=yre?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 Ob(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 Pb(e,t,n){return t=+t,e=+e,n=+n,Ep(e,t,n)[2]}function Ab(e,t,n){t=+t,e=+e,n=+n;const r=t<e,i=r?Pb(t,e,n):Pb(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}function fP(e,t){let n;for(const r of e)r!=null&&(n<r||n===void 0&&r>=r)&&(n=r);return n}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 Bj(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?Vj:gre(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));Bj(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 bre(e,t,n){if(e=Float64Array.from(cre(e)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return dP(e);if(t>=1)return fP(e);var r,i=(r-1)*t,o=Math.floor(i),a=fP(Bj(e,o).subarray(0,o+1)),s=dP(e.subarray(o+1));return a+(s-a)*(i-o)}}function xre(e,t,n=Fj){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 wre(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 Rb=Symbol("implicit");function nw(){var e=new uP,t=[],n=[],r=Rb;function i(o){let a=e.get(o);if(a===void 0){if(r!==Rb)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 uP;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 nw(t,n).unknown(r)},ri.apply(i,arguments),i}function rw(){var e=nw().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=wre(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 rw(t(),[r,i]).round(s).paddingInner(u).paddingOuter(c).align(d)},ri.apply(p(),arguments)}function zj(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return zj(t())},e}function Cre(){return zj(rw.apply(null,arguments).paddingInner(1))}function iw(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Wj(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*",Sre=/^#([0-9a-f]{3,8})$/,Ere=new RegExp(`^rgb\\(${cl},${cl},${cl}\\)$`),_re=new RegExp(`^rgb\\(${ki},${ki},${ki}\\)$`),Ore=new RegExp(`^rgba\\(${cl},${cl},${cl},${Qu}\\)$`),Pre=new RegExp(`^rgba\\(${ki},${ki},${ki},${Qu}\\)$`),Are=new RegExp(`^hsl\\(${Qu},${ki},${ki}\\)$`),Rre=new RegExp(`^hsla\\(${Qu},${ki},${ki},${Qu}\\)$`),pP={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};iw(Cc,Ju,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:hP,formatHex:hP,formatHex8:Ire,formatHsl:Tre,formatRgb:gP,toString:gP});function hP(){return this.rgb().formatHex()}function Ire(){return this.rgb().formatHex8()}function Tre(){return Hj(this).formatHsl()}function gP(){return this.rgb().formatRgb()}function Ju(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=Sre.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?mP(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=Ere.exec(e))?new dr(t[1],t[2],t[3],1):(t=_re.exec(e))?new dr(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Ore.exec(e))?pd(t[1],t[2],t[3],t[4]):(t=Pre.exec(e))?pd(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=Are.exec(e))?bP(t[1],t[2]/100,t[3]/100,1):(t=Rre.exec(e))?bP(t[1],t[2]/100,t[3]/100,t[4]):pP.hasOwnProperty(e)?mP(pP[e]):e==="transparent"?new dr(NaN,NaN,NaN,0):null}function mP(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 kre(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 Ib(e,t,n,r){return arguments.length===1?kre(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}iw(dr,Ib,Wj(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:vP,formatHex:vP,formatHex8:Nre,formatRgb:yP,toString:yP}));function vP(){return`#${Wa(this.r)}${Wa(this.g)}${Wa(this.b)}`}function Nre(){return`#${Wa(this.r)}${Wa(this.g)}${Wa(this.b)}${Wa((isNaN(this.opacity)?1:this.opacity)*255)}`}function yP(){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 bP(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 Hj(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 Mre(e,t,n,r){return arguments.length===1?Hj(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}iw(ui,Mre,Wj(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(xP(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("}${xP(this.h)}, ${hd(this.s)*100}%, ${hd(this.l)*100}%${e===1?")":`, ${e})`}`}}));function xP(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 ow=e=>()=>e;function Dre(e,t){return function(n){return e+n*t}}function jre(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 Lre(e){return(e=+e)==1?Uj:function(t,n){return n-t?jre(t,n,e):ow(isNaN(t)?n:t)}}function Uj(e,t){var n=t-e;return n?Dre(e,n):ow(isNaN(e)?t:e)}const wP=(function e(t){var n=Lre(t);function r(i,o){var a=n((i=Ib(i)).r,(o=Ib(o)).r),s=n(i.g,o.g),u=n(i.b,o.b),c=Uj(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 $re(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 Fre(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function Vre(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 Bre(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 zre(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 Tb=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ny=new RegExp(Tb.source,"g");function Wre(e){return function(){return e}}function Hre(e){return function(t){return e(t)+""}}function Ure(e,t){var n=Tb.lastIndex=ny.lastIndex=0,r,i,o,a=-1,s=[],u=[];for(e=e+"",t=t+"";(r=Tb.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]?Hre(u[0].x):Wre(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"?ow(t):(n==="number"?Pp:n==="string"?(r=Ju(t))?(t=r,wP):Ure:t instanceof Ju?wP:t instanceof Date?Bre:Fre(t)?$re:Array.isArray(t)?Vre:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?zre:Pp)(e,t)}function aw(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function Gre(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 qre(e){return function(){return e}}function Ap(e){return+e}var CP=[0,1];function Qn(e){return e}function kb(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:qre(isNaN(t)?NaN:.5)}function Kre(e,t){var n;return e>t&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function Yre(e,t,n){var r=e[0],i=e[1],o=t[0],a=t[1];return i<r?(r=kb(i,r),o=n(a,o)):(r=kb(r,i),o=n(o,a)),function(s){return o(r(s))}}function Xre(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]=kb(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=CP,t=CP,n=Rl,r,i,o,a=Qn,s,u,c;function d(){var g=Math.min(e.length,t.length);return a!==Qn&&(a=Kre(e[0],e[g-1])),s=g>2?Xre:Yre,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=aw,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 sw(){return Yh()(Qn,Qn)}function Zre(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 Qre(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 Jre(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var eie=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function ec(e){if(!(t=eie.exec(e)))throw new Error("invalid format: "+e);var t;return new lw({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=lw.prototype;function lw(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+""}lw.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 tie(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 nie(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 SP(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 EP={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:Zre,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)=>SP(e*100,t),r:SP,s:nie,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function _P(e){return e}var OP=Array.prototype.map,PP=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function rie(e){var t=e.grouping===void 0||e.thousands===void 0?_P:Qre(OP.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?_P:Jre(OP.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"):EP[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=EP[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=tie(D)),Q&&+D==0&&b!=="+"&&(Q=!1),H=(Q?b==="("?b:s:b==="-"||b==="("?"":b)+H,J=(R==="s"&&!isNaN(D)&&Ip!==void 0?PP[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:PP[8+h/3]});return function(v){return b(y*v)}}return{format:c,formatPrefix:d}}var gd,uw,Gj;iie({thousands:",",grouping:[3],currency:["$",""]});function iie(e){return gd=rie(e),uw=gd.format,Gj=gd.formatPrefix,gd}function oie(e){return Math.max(0,-yl(Math.abs(e)))}function aie(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(yl(t)/3)))*3-yl(Math.abs(e)))}function sie(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,yl(t)-yl(e))+1}function qj(e,t,n,r){var i=Ab(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=aie(i,a))&&(r.precision=o),Gj(r,a)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(o=sie(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=o-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(o=oie(i))&&(r.precision=o-(r.type==="%")*2);break}}return uw(r)}function ha(e){var t=e.domain;return e.ticks=function(n){var r=t();return Ob(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var i=t();return qj(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=Pb(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 Kj(){var e=sw();return e.copy=function(){return Sc(e,Kj())},ri.apply(e,arguments),ha(e)}function Yj(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 Yj(e).unknown(t)},e=arguments.length?Array.from(e,Ap):[0,1],ha(n)}function Xj(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 AP(e){return Math.log(e)}function RP(e){return Math.exp(e)}function lie(e){return-Math.log(-e)}function uie(e){return-Math.exp(-e)}function cie(e){return isFinite(e)?+("1e"+e):e<0?0:e}function fie(e){return e===10?cie:e===Math.E?Math.exp:t=>Math.pow(e,t)}function die(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 IP(e){return(t,n)=>-e(-t,n)}function cw(e){const t=e(AP,RP),n=t.domain;let r=10,i,o;function a(){return i=die(r),o=fie(r),n()[0]<0?(i=IP(i),o=IP(o),e(lie,uie)):e(AP,RP),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=Ob(c,d,v))}else w=Ob(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=uw(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(Xj(n(),{floor:s=>o(Math.floor(i(s))),ceil:s=>o(Math.ceil(i(s)))})),t}function Zj(){const e=cw(Yh()).domain([1,10]);return e.copy=()=>Sc(e,Zj()).base(e.base()),ri.apply(e,arguments),e}function TP(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function kP(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function fw(e){var t=1,n=e(TP(t),kP(t));return n.constant=function(r){return arguments.length?e(TP(t=+r),kP(t)):t},ha(n)}function Qj(){var e=fw(Yh());return e.copy=function(){return Sc(e,Qj()).constant(e.constant())},ri.apply(e,arguments)}function NP(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function pie(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function hie(e){return e<0?-e*e:e*e}function dw(e){var t=e(Qn,Qn),n=1;function r(){return n===1?e(Qn,Qn):n===.5?e(pie,hie):e(NP(n),NP(1/n))}return t.exponent=function(i){return arguments.length?(n=+i,r()):n},ha(t)}function pw(){var e=dw(Yh());return e.copy=function(){return Sc(e,pw()).exponent(e.exponent())},ri.apply(e,arguments),e}function gie(){return pw.apply(null,arguments).exponent(.5)}function MP(e){return Math.sign(e)*e*e}function mie(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function Jj(){var e=sw(),t=[0,1],n=!1,r;function i(o){var a=mie(e(o));return isNaN(a)?r:n?Math.round(a):a}return i.invert=function(o){return e.invert(MP(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(MP)),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 Jj(e.domain(),t).round(n).clamp(e.clamp()).unknown(r)},ri.apply(i,arguments),ha(i)}function e2(){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]=xre(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 e2().domain(e).range(t).unknown(r)},ri.apply(o,arguments)}function t2(){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 t2().domain([e,t]).range(i).unknown(o)},ri.apply(ha(a),arguments)}function n2(){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 n2().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,hw=ho*7,DP=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 gw=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());gw.range;const mw=hn(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Jr)},(e,t)=>(t-e)/Jr,e=>e.getUTCMinutes());mw.range;const vw=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());vw.range;const yw=hn(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*io)},(e,t)=>(t-e)/io,e=>e.getUTCHours());yw.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 r2=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));r2.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)/hw)}const Zh=ps(0),kp=ps(1),vie=ps(2),yie=ps(3),bl=ps(4),bie=ps(5),xie=ps(6);Zh.range;kp.range;vie.range;yie.range;bl.range;bie.range;xie.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)/hw)}const Qh=hs(0),Np=hs(1),wie=hs(2),Cie=hs(3),xl=hs(4),Sie=hs(5),Eie=hs(6);Qh.range;Np.range;wie.range;Cie.range;xl.range;Sie.range;Eie.range;const bw=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());bw.range;const xw=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());xw.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 i2(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,hw],[t,1,DP],[t,3,3*DP],[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=tw(([,,v])=>v).right(a,g);if(h===a.length)return e.every(Ab(c/oy,d/oy,p));if(h===0)return Tp.every(Math.max(Ab(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[_ie,Oie]=i2(mo,xw,Qh,r2,yw,mw),[Pie,Aie]=i2(go,bw,Zh,Ec,vw,gw);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 Rie(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:BP,e:BP,f:Qie,g:loe,G:coe,H:Yie,I:Xie,j:Zie,L:o2,m:Jie,M:eoe,p:Ae,q:Se,Q:HP,s:UP,S:toe,u:noe,U:roe,V:ioe,w:ooe,W:aoe,x:null,X:null,y:soe,Y:uoe,Z:foe,"%":WP},_={a:$e,A:we,b:Ce,B:ze,c:null,d:zP,e:zP,f:goe,g:_oe,G:Poe,H:doe,I:poe,j:hoe,L:s2,m:moe,M:voe,p:Ke,q:Fe,Q:HP,s:UP,S:yoe,u:boe,U:xoe,V:woe,w:Coe,W:Soe,x:null,X:null,y:Eoe,Y:Ooe,Z:Aoe,"%":WP},P={a:L,A:V,b:D,B:H,c:J,d:FP,e:FP,f:Uie,g:$P,G:LP,H:VP,I:VP,j:Bie,L:Hie,m:Vie,M:zie,p:B,q:Fie,Q:qie,s:Kie,S:Wie,u:Mie,U:Die,V:jie,w:Nie,W:Lie,x:te,X:G,y:$P,Y:LP,Z:$ie,"%":Gie};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=jP[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 jP?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 jP={"-":"",_:" ",0:"0"},En=/^\s*\d+/,Iie=/^%/,Tie=/[\\^$*+?|[\]().{}]/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 kie(e){return e.replace(Tie,"\\$&")}function vu(e){return new RegExp("^(?:"+e.map(kie).join("|")+")","i")}function yu(e){return new Map(e.map((t,n)=>[t.toLowerCase(),n]))}function Nie(e,t,n){var r=En.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function Mie(e,t,n){var r=En.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function Die(e,t,n){var r=En.exec(t.slice(n,n+2));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.V=+r[0],n+r[0].length):-1}function Lie(e,t,n){var r=En.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function LP(e,t,n){var r=En.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function $P(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 $ie(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 Fie(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 Vie(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 FP(e,t,n){var r=En.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function Bie(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 VP(e,t,n){var r=En.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function zie(e,t,n){var r=En.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function Wie(e,t,n){var r=En.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function Hie(e,t,n){var r=En.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function Uie(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 Gie(e,t,n){var r=Iie.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function qie(e,t,n){var r=En.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function Kie(e,t,n){var r=En.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function BP(e,t){return dt(e.getDate(),t,2)}function Yie(e,t){return dt(e.getHours(),t,2)}function Xie(e,t){return dt(e.getHours()%12||12,t,2)}function Zie(e,t){return dt(1+Ec.count(go(e),e),t,3)}function o2(e,t){return dt(e.getMilliseconds(),t,3)}function Qie(e,t){return o2(e,t)+"000"}function Jie(e,t){return dt(e.getMonth()+1,t,2)}function eoe(e,t){return dt(e.getMinutes(),t,2)}function toe(e,t){return dt(e.getSeconds(),t,2)}function noe(e){var t=e.getDay();return t===0?7:t}function roe(e,t){return dt(Zh.count(go(e)-1,e),t,2)}function a2(e){var t=e.getDay();return t>=4||t===0?bl(e):bl.ceil(e)}function ioe(e,t){return e=a2(e),dt(bl.count(go(e),e)+(go(e).getDay()===4),t,2)}function ooe(e){return e.getDay()}function aoe(e,t){return dt(kp.count(go(e)-1,e),t,2)}function soe(e,t){return dt(e.getFullYear()%100,t,2)}function loe(e,t){return e=a2(e),dt(e.getFullYear()%100,t,2)}function uoe(e,t){return dt(e.getFullYear()%1e4,t,4)}function coe(e,t){var n=e.getDay();return e=n>=4||n===0?bl(e):bl.ceil(e),dt(e.getFullYear()%1e4,t,4)}function foe(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+dt(t/60|0,"0",2)+dt(t%60,"0",2)}function zP(e,t){return dt(e.getUTCDate(),t,2)}function doe(e,t){return dt(e.getUTCHours(),t,2)}function poe(e,t){return dt(e.getUTCHours()%12||12,t,2)}function hoe(e,t){return dt(1+Xh.count(mo(e),e),t,3)}function s2(e,t){return dt(e.getUTCMilliseconds(),t,3)}function goe(e,t){return s2(e,t)+"000"}function moe(e,t){return dt(e.getUTCMonth()+1,t,2)}function voe(e,t){return dt(e.getUTCMinutes(),t,2)}function yoe(e,t){return dt(e.getUTCSeconds(),t,2)}function boe(e){var t=e.getUTCDay();return t===0?7:t}function xoe(e,t){return dt(Qh.count(mo(e)-1,e),t,2)}function l2(e){var t=e.getUTCDay();return t>=4||t===0?xl(e):xl.ceil(e)}function woe(e,t){return e=l2(e),dt(xl.count(mo(e),e)+(mo(e).getUTCDay()===4),t,2)}function Coe(e){return e.getUTCDay()}function Soe(e,t){return dt(Np.count(mo(e)-1,e),t,2)}function Eoe(e,t){return dt(e.getUTCFullYear()%100,t,2)}function _oe(e,t){return e=l2(e),dt(e.getUTCFullYear()%100,t,2)}function Ooe(e,t){return dt(e.getUTCFullYear()%1e4,t,4)}function Poe(e,t){var n=e.getUTCDay();return e=n>=4||n===0?xl(e):xl.ceil(e),dt(e.getUTCFullYear()%1e4,t,4)}function Aoe(){return"+0000"}function WP(){return"%"}function HP(e){return+e}function UP(e){return Math.floor(+e/1e3)}var Ks,u2,c2;Roe({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 Roe(e){return Ks=Rie(e),u2=Ks.format,Ks.parse,c2=Ks.utcFormat,Ks.utcParse,Ks}function Ioe(e){return new Date(e)}function Toe(e){return e instanceof Date?+e:+new Date(+e)}function ww(e,t,n,r,i,o,a,s,u,c){var d=sw(),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,Toe)):g().map(Ioe)},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(Xj(I,R)):d},d.copy=function(){return Sc(d,ww(e,t,n,r,i,o,a,s,u,c))},d}function koe(){return ri.apply(ww(Pie,Aie,go,bw,Zh,Ec,vw,gw,Ha,u2).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function Noe(){return ri.apply(ww(_ie,Oie,mo,xw,Qh,Xh,yw,mw,Ha,c2).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(aw),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 f2(){var e=ha(Jh()(Qn));return e.copy=function(){return ga(e,f2())},So.apply(e,arguments)}function d2(){var e=cw(Jh()).domain([1,10]);return e.copy=function(){return ga(e,d2()).base(e.base())},So.apply(e,arguments)}function p2(){var e=fw(Jh());return e.copy=function(){return ga(e,p2()).constant(e.constant())},So.apply(e,arguments)}function Cw(){var e=dw(Jh());return e.copy=function(){return ga(e,Cw()).exponent(e.exponent())},So.apply(e,arguments)}function Moe(){return Cw.apply(null,arguments).exponent(.5)}function h2(){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)=>bre(e,o/r))},n.copy=function(){return h2(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=Gre(b,[w,C,E]),h):[c(0),c(.5),c(1)]}}return h.range=y(Rl),h.rangeRound=y(aw),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 g2(){var e=ha(eg()(Qn));return e.copy=function(){return ga(e,g2())},So.apply(e,arguments)}function m2(){var e=cw(eg()).domain([.1,1,10]);return e.copy=function(){return ga(e,m2()).base(e.base())},So.apply(e,arguments)}function v2(){var e=fw(eg());return e.copy=function(){return ga(e,v2()).constant(e.constant())},So.apply(e,arguments)}function Sw(){var e=dw(eg());return e.copy=function(){return ga(e,Sw()).exponent(e.exponent())},So.apply(e,arguments)}function Doe(){return Sw.apply(null,arguments).exponent(.5)}const Ou=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:rw,scaleDiverging:g2,scaleDivergingLog:m2,scaleDivergingPow:Sw,scaleDivergingSqrt:Doe,scaleDivergingSymlog:v2,scaleIdentity:Yj,scaleImplicit:Rb,scaleLinear:Kj,scaleLog:Zj,scaleOrdinal:nw,scalePoint:Cre,scalePow:pw,scaleQuantile:e2,scaleQuantize:t2,scaleRadial:Jj,scaleSequential:f2,scaleSequentialLog:d2,scaleSequentialPow:Cw,scaleSequentialQuantile:h2,scaleSequentialSqrt:Moe,scaleSequentialSymlog:p2,scaleSqrt:gie,scaleSymlog:Qj,scaleThreshold:n2,scaleTime:koe,scaleUtc:Noe,tickFormat:qj},Symbol.toStringTag,{value:"Module"}));function joe(e){if(e in Ou)return Ou[e]();var t="scale".concat(dc(e));if(t in Ou)return Ou[t]()}function GP(e,t,n){if(typeof e=="function")return e.copy().domain(t).range(n);if(e!=null){var r=joe(e);if(r!=null)return r.domain(t).range(n),r}}function Ew(e,t,n,r){if(!(n==null||r==null))return typeof e.scale=="function"?GP(e.scale,n,r):GP(t,n,r)}function Loe(e){return"scale".concat(dc(e))}function $oe(e){return Loe(e)in Ou}var y2=(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 $oe(r)?r:"point"}};function Foe(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 b2(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=Foe(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 Voe(e){if(e!=null)return"invert"in e&&typeof e.invert=="function"?e.invert.bind(e):b2(e,void 0)}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 Mp(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){Boe(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 Boe(e,t,n){return(t=zoe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function zoe(e){var t=Woe(e,"string");return typeof t=="symbol"?t:t+""}function Woe(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 Nb=[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"},x2=(e,t)=>e.cartesianAxis.xAxis[t],Eo=(e,t)=>{var n=x2(e,t);return n??un},cn={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:Nb,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},w2=(e,t)=>e.cartesianAxis.yAxis[t],_o=(e,t)=>{var n=w2(e,t);return n??cn},Hoe={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:""},_w=(e,t)=>{var n=e.cartesianAxis.zAxis[t];return n??Hoe},tr=(e,t,n)=>{switch(t){case"xAxis":return Eo(e,n);case"yAxis":return _o(e,n);case"zAxis":return _w(e,n);case"angleAxis":return Xx(e,n);case"radiusAxis":return Zx(e,n);default:throw new Error("Unexpected axis type: ".concat(t))}},Uoe=(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 Xx(e,n);case"radiusAxis":return Zx(e,n);default:throw new Error("Unexpected axis type: ".concat(t))}},C2=e=>e.graphicalItems.cartesianItems.some(t=>t.type==="bar")||e.graphicalItems.polarItems.some(t=>t.type==="radialBar");function S2(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 Ow=e=>e.graphicalItems.cartesianItems,Goe=q([Cn,Uh],S2),E2=(e,t,n)=>e.filter(n).filter(r=>t?.includeHidden===!0?!0:!r.hide),Oc=q([Ow,tr,Goe],E2,{memoizeOptions:{resultEqualityCheck:Kh}}),_2=q([Oc],e=>e.filter(t=>t.type==="area"||t.type==="bar").filter(Gh)),O2=e=>e.filter(t=>!("stackId"in t)||t.stackId===void 0),qoe=q([Oc],O2),P2=e=>e.map(t=>t.data).filter(Boolean).flat(1),Koe=q([Oc],P2,{memoizeOptions:{resultEqualityCheck:Kh}}),A2=(e,t)=>{var{chartData:n=[],dataStartIndex:r,dataEndIndex:i}=t;return e.length>0?e:n.slice(r,i+1)},Pw=q([Koe,vj],A2),R2=(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([Pw,tr,Oc],R2);function fl(e){if(ji(e)||e instanceof Date){var t=Number(e);if(ut(t))return t}}function KP(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 Yoe(e,t){var n=fl(e),r=fl(t);return n==null&&r==null?0:n==null?-1:r==null?1:n-r}var Xoe=q([Pc],e=>e?.map(t=>t.value).sort(Yoe));function I2(e,t){switch(e){case"xAxis":return t.direction==="x";case"yAxis":return t.direction==="y";default:return!1}}function Zoe(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),Qoe=q([_2,vj,gn],$j),T2=(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(Jx);return[s,{stackedData:YJ(e,d,n),graphicalItems:c}]}))},Mb=q([Qoe,_2,Bh,Tj],T2),k2=(e,t,n,r)=>{var{dataStartIndex:i,dataEndIndex:o}=t;if(r==null&&n!=="zAxis"){var a=eee(e,i,o);if(!(a!=null&&a[0]===0&&a[1]===0))return a}},Joe=q([tr],e=>e.allowDataOverflow),Aw=e=>{var t;if(e==null||!("domain"in e))return Nb;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:Nb},N2=q([tr],Aw),M2=q([N2,Joe],yj),eae=q([Mb,Co,Cn,M2],k2,{memoizeOptions:{resultEqualityCheck:qh}}),Rw=e=>e.errorBars,tae=(e,t,n)=>e.flatMap(r=>t[r.id]).filter(Boolean).filter(r=>I2(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]}},D2=(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=>I2(i,w)),g=Mn(s,(d=t.dataKey)!==null&&d!==void 0?d:u.dataKey),h=Zoe(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=KP(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=KP(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]},nae=q([Pw,tr,qoe,Rw,Cn],D2,{memoizeOptions:{resultEqualityCheck:qh}});function rae(e){var{value:t}=e;if(ji(t)||t instanceof Date)return t}var iae=(e,t,n)=>{var r=e.map(rae).filter(i=>i!=null);return n&&(t.dataKey==null||t.allowDuplicatedCategory&&WM(r))?gj(0,e.length):t.allowDuplicatedCategory?r:Array.from(new Set(r))},j2=e=>e.referenceElements.dots,Il=(e,t,n)=>e.filter(r=>r.ifOverflow==="extendDomain").filter(r=>t==="xAxis"?r.xAxisId===n:r.yAxisId===n),oae=q([j2,Cn,Uh],Il),L2=e=>e.referenceElements.areas,aae=q([L2,Cn,Uh],Il),$2=e=>e.referenceElements.lines,sae=q([$2,Cn,Uh],Il),F2=(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)]}},lae=q(oae,Cn,F2),V2=(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)]}},uae=q([aae,Cn],V2);function cae(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 fae(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 B2=(e,t)=>{if(e!=null){var n=e.flatMap(r=>t==="xAxis"?cae(r):fae(r));if(n.length!==0)return[Math.min(...n),Math.max(...n)]}},dae=q([sae,Cn],B2),pae=q(lae,dae,uae,(e,t,n)=>Dp(e,n,t)),z2=(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 qne(t,c,e.allowDataOverflow)},hae=q([tr,N2,M2,eae,nae,pae,At,Cn],z2,{memoizeOptions:{resultEqualityCheck:qh}}),gae=[0,1],W2=(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 gj(0,(d=n?.length)!==null&&d!==void 0?d:0)}return u==="category"?iae(r,e,c):i==="expand"?gae:a}},Iw=q([tr,At,Pw,Pc,Bh,Cn,hae],W2),Tl=q([tr,C2,qx],y2),H2=(e,t,n)=>{var{niceTicks:r}=t;if(r!=="none"){var i=Aw(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 iP(e,t.tickCount,t.allowDecimals,r);if(t.type==="number")return oP(e,t.tickCount,t.allowDecimals,r)}if(r==="auto"&&n==="linear"&&t!=null&&t.tickCount){if(o&&Ti(e))return iP(e,t.tickCount,t.allowDecimals,"adaptive");if(t.type==="number"&&Ti(e))return oP(e,t.tickCount,t.allowDecimals,"adaptive")}}},Tw=q([Iw,_c,Tl],H2),U2=(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},mae=q([tr,Iw,Tw,Cn],U2),vae=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}}),G2=q(vae,At,Ij,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}),yae=(e,t,n)=>{var r=Eo(e,t);return r==null||typeof r.padding!="string"?0:G2(e,"xAxis",t,n,r.padding)},bae=(e,t,n)=>{var r=_o(e,t);return r==null||typeof r.padding!="string"?0:G2(e,"yAxis",t,n,r.padding)},xae=q(Eo,yae,(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}}),wae=q(_o,bae,(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}}),Cae=q([wn,xae,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]}),Sae=q([wn,At,wae,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 Cae(e,n,r);case"yAxis":return Sae(e,n,r);case"zAxis":return(i=_w(e,n))===null||i===void 0?void 0:i.range;case"angleAxis":return Dj(e);case"radiusAxis":return jj(e,n);default:return}},q2=q([tr,Rc],zh),Eae=q([Tl,mae],sre),kw=q([tr,Tl,Eae,q2],Ew),K2=(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)}},Nw=q([At,Pc,_c,Cn],K2),tg=q([kw],ew);q([kw],Voe);q([kw,Xoe],b2);q([Oc,Rw,Cn],tae);function Y2(e,t){return e.id<t.id?-1:e.id>t.id?1:0}var ng=(e,t)=>t,rg=(e,t,n)=>n,_ae=q(kh,ng,rg,(e,t,n)=>e.filter(r=>r.orientation===t).filter(r=>r.mirror===n).sort(Y2)),Oae=q(Nh,ng,rg,(e,t,n)=>e.filter(r=>r.orientation===t).filter(r=>r.mirror===n).sort(Y2)),X2=(e,t)=>({width:e.width,height:t.height}),Pae=(e,t)=>{var n=typeof t.width=="number"?t.width:vc;return{width:n,height:e.height}},Z2=q(wn,Eo,X2),Aae=(e,t,n)=>{switch(t){case"top":return e.top;case"bottom":return n-e.bottom;default:return 0}},Rae=(e,t,n)=>{switch(t){case"left":return e.left;case"right":return n-e.right;default:return 0}},Iae=q(wo,wn,_ae,ng,rg,(e,t,n,r,i)=>{var o={},a;return n.forEach(s=>{var u=X2(t,s);a==null&&(a=Aae(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}),Tae=q(xo,wn,Oae,ng,rg,(e,t,n,r,i)=>{var o={},a;return n.forEach(s=>{var u=Pae(t,s);a==null&&(a=Rae(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}),kae=(e,t)=>{var n=Eo(e,t);if(n!=null)return Iae(e,n.orientation,n.mirror)},Nae=q([wn,Eo,kae,(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}}}),Mae=(e,t)=>{var n=_o(e,t);if(n!=null)return Tae(e,n.orientation,n.mirror)},Dae=q([wn,_o,Mae,(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}}}),Q2=q(wn,_o,(e,t)=>{var n=typeof t.width=="number"?t.width:vc;return{width:n,height:e.height}}),YP=(e,t,n)=>{switch(t){case"xAxis":return Z2(e,n).width;case"yAxis":return Q2(e,n).height;default:return}},J2=(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&&WM(u))return u}},Mw=q([At,Pc,tr,Cn],J2),XP=q([At,Uoe,Tl,tg,Mw,Nw,Rc,Tw,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}}}),jae=(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)}},eL=q([At,_c,Tl,tg,Tw,Rc,Mw,Nw,Cn],jae),Lae=(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,Mw,Nw,Cn],Lae),Cl=q(tr,tg,(e,t)=>{if(!(e==null||t==null))return Mp(Mp({},e),{},{scale:t})}),$ae=q([tr,Tl,Iw,q2],Ew),Fae=q([$ae],ew);q((e,t,n)=>_w(e,n),Fae,(e,t)=>{if(!(e==null||t==null))return Mp(Mp({},e),{},{scale:t})});var Vae=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}}),Bae=(e,t,n)=>{var r;return(r=e.renderedTicks[t])===null||r===void 0?void 0:r[n]};q([Bae],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 tL=e=>e.options.defaultTooltipEventType,nL=e=>e.options.validateTooltipEventTypes;function rL(e,t,n){if(e==null)return t;var r=e?"axis":"item";return n==null?t:n.includes(r)?r:t}function Dw(e,t){var n=tL(e),r=nL(e);return rL(t,n,r)}function zae(e){return Le(t=>Dw(t,e))}var iL=(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},Wae=e=>e.tooltip.settings,Ko={active:!1,index:null,dataKey:void 0,graphicalItemId:void 0,coordinate:void 0},Hae={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}},oL=Wn({name:"tooltip",initialState:Hae,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:Uae,replaceTooltipEntrySettings:Gae,removeTooltipEntrySettings:qae,setTooltipSettingsState:Kae,setActiveMouseOverItemIndex:aL,mouseLeaveItem:Yae,mouseLeaveChart:sL,setActiveClickItemIndex:Xae,setMouseOverAxisIndex:lL,setMouseClickAxisIndex:Zae,setSyncInteraction:Db,setKeyboardInteraction:jp}=oL.actions,Qae=oL.reducer;function ZP(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?ZP(Object(n),!0).forEach(function(r){Jae(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ZP(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Jae(e,t,n){return(t=ese(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ese(e){var t=tse(e,"string");return typeof t=="symbol"?t:t+""}function tse(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 nse(e,t,n){return t==="axis"?n==="click"?e.axisInteraction.click:e.axisInteraction.hover:n==="click"?e.itemInteraction.click:e.itemInteraction.hover}function rse(e){return e.index!=null}var uL=(e,t,n,r)=>{if(t==null)return Ko;var i=nse(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(rse(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 ise(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 ose(e,t){var n=ise(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 ase(e,t,n){if(n==null||t==null)return!0;var r=Mn(e,t);return r==null||!Ti(n)?!0:ose(r,n)}var jw=(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||ase(c,n,r)?String(u):null},cL=(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}}},fL=(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})},dL=e=>e.options.tooltipPayloadSearcher,kl=e=>e.tooltip;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 JP(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){sse(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 sse(e,t,n){return(t=lse(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function lse(e){var t=use(e,"string");return typeof t=="symbol"?t:t+""}function use(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 cse(e){if(typeof e=="string"||typeof e=="number")return e}function fse(e){if(typeof e=="string"||typeof e=="number"||typeof e=="boolean")return e}function dse(e){if(typeof e=="string"||typeof e=="number")return e;if(typeof e=="function")return t=>e(t)}function eA(e){if(typeof e=="string")return e}function pse(e){if(!(e==null||typeof e!="object")){var t="name"in e?cse(e.name):void 0,n="unit"in e?fse(e.unit):void 0,r="dataKey"in e?dse(e.dataKey):void 0,i="payload"in e?e.payload:void 0,o="color"in e?eA(e.color):void 0,a="fill"in e?eA(e.fill):void 0;return{name:t,unit:n,dataKey:r,payload:i,color:o,fill:a}}}function hse(e,t){return e??t}var pL=(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=hse(b,s),C=Array.isArray(w)?$D(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=TZ(C,r,i):P=o(C,t,u,_),Array.isArray(P))P.forEach(I=>{var k,B,L=pse(I),V=L?.name,D=L?.dataKey,H=L?.payload,J=JP(JP({},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(q_({tooltipEntrySettings:J,dataKey:D,payload:H,value:Mn(H,D),name:V==null?void 0:String(V)}))});else{var R;g.push(q_({tooltipEntrySettings:v,dataKey:E,payload:P,value:Mn(P,E),name:(R=Mn(P,_))!==null&&R!==void 0?R:v?.name}))}return g},p)}},Lw=q([gn,C2,qx],y2),gse=q([e=>e.graphicalItems.cartesianItems,e=>e.graphicalItems.polarItems],(e,t)=>[...e,...t]),mse=q([Sn,Al],S2),Nl=q([gse,gn,mse],E2,{memoizeOptions:{resultEqualityCheck:Kh}}),vse=q([Nl],e=>e.filter(Gh)),yse=q([Nl],P2,{memoizeOptions:{resultEqualityCheck:Kh}}),Ml=q([yse,Co],A2),bse=q([vse,Co,gn],$j),$w=q([Ml,gn,Nl],R2),hL=q([gn],Aw),xse=q([gn],e=>e.allowDataOverflow),gL=q([hL,xse],yj),wse=q([Nl],e=>e.filter(Gh)),Cse=q([bse,wse,Bh,Tj],T2),Sse=q([Cse,Co,Sn,gL],k2),Ese=q([Nl],O2),_se=q([Ml,gn,Ese,Rw,Sn],D2,{memoizeOptions:{resultEqualityCheck:qh}}),Ose=q([j2,Sn,Al],Il),Pse=q([Ose,Sn],F2),Ase=q([L2,Sn,Al],Il),Rse=q([Ase,Sn],V2),Ise=q([$2,Sn,Al],Il),Tse=q([Ise,Sn],B2),kse=q([Pse,Tse,Rse],Dp),Nse=q([gn,hL,gL,Sse,_se,kse,At,Sn],z2),Ic=q([gn,At,Ml,$w,Bh,Sn,Nse],W2),Mse=q([Ic,gn,Lw],H2),Dse=q([gn,Ic,Mse,Sn],U2),mL=e=>{var t=Sn(e),n=Al(e),r=!1;return Rc(e,t,n,r)},vL=q([gn,mL],zh),jse=q([gn,Lw,Dse,vL],Ew),yL=q([jse],ew),Lse=q([At,$w,gn,Sn],J2),$se=q([At,$w,gn,Sn],K2),Fse=(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,Lw,yL,mL,Lse,$se,Sn],Fse),Fw=q([tL,nL,Wae],(e,t,n)=>rL(n.shared,e,t)),bL=e=>e.tooltip.settings.trigger,Vw=e=>e.tooltip.settings.defaultIndex,Tc=q([kl,Fw,bL,Vw],uL),Sl=q([Tc,Ml,Ac,Ic],jw),xL=q([Oo,Sl],iL),wL=q([Tc],e=>{if(e)return e.dataKey}),Vse=q([Tc],e=>{if(e)return e.graphicalItemId}),CL=q([kl,Fw,bL,Vw],fL),Bse=q([xo,wo,At,wn,Oo,Vw,CL],cL),zse=q([Tc,Bse],(e,t)=>e!=null&&e.coordinate?e.coordinate:t),Wse=q([Tc],e=>{var t;return(t=e?.active)!==null&&t!==void 0?t:!1}),Hse=q([CL,Sl,Co,Ac,xL,dL,Fw],pL);q([Hse],e=>{if(e!=null){var t=e.map(n=>n.payload).filter(n=>n!=null);return Array.from(new Set(t))}});function tA(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 nA(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?tA(Object(n),!0).forEach(function(r){Use(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):tA(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Use(e,t,n){return(t=Gse(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Gse(e){var t=qse(e,"string");return typeof t=="symbol"?t:t+""}function qse(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 Kse=()=>Le(gn),Yse=()=>{var e=Kse(),t=Le(Oo),n=Le(yL);return dp(!e||!n?void 0:nA(nA({},e),{},{scale:n}),t)};function rA(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?rA(Object(n),!0).forEach(function(r){Xse(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rA(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Xse(e,t,n){return(t=Zse(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Zse(e){var t=Qse(e,"string");return typeof t=="symbol"?t:t+""}function Qse(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 Jse=(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}},ele=(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 tle(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 SL=(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},nle=()=>Le(qx),Bw=(e,t)=>t,EL=(e,t,n)=>n,zw=(e,t,n,r)=>r,rle=q(Oo,e=>Sh(e,t=>t.coordinate)),Ww=q([kl,Bw,EL,zw],uL),Hw=q([Ww,Ml,Ac,Ic],jw),ile=(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}},_L=q([kl,Bw,EL,zw],fL),Lp=q([xo,wo,At,wn,Oo,zw,_L],cL),ole=q([Ww,Lp],(e,t)=>{var n;return(n=e.coordinate)!==null&&n!==void 0?n:t}),OL=q([Oo,Hw],iL),ale=q([_L,Hw,Co,Ac,OL,dL,Bw],pL),sle=q([Ww,Hw],(e,t)=>({isActive:e.active&&t!=null,activeIndex:t})),lle=(e,t,n,r,i,o,a)=>{if(!(!e||!n||!r||!i)&&tle(e,a)){var s=tee(e,t),u=SL(s,o,i,n,r),c=Jse(t,i,u,e);return{activeIndex:String(u),activeCoordinate:c}}},ule=(e,t,n,r,i,o,a)=>{if(!(!e||!r||!i||!o||!n)){var s=jne(e,n);if(s){var u=nee(s,t),c=SL(u,a,o,r,i),d=ele(t,o,c,s);return{activeIndex:String(c),activeCoordinate:d}}}},cle=(e,t,n,r,i,o,a,s)=>{if(!(!e||!t||!r||!i||!o))return t==="horizontal"||t==="vertical"?lle(e,t,r,i,o,a,s):ule(e,t,n,r,i,o,a)},fle=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}}),dle=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:are}});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 oA(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){ple(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 ple(e,t,n){return(t=hle(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function hle(e){var t=gle(e,"string");return typeof t=="symbol"?t:t+""}function gle(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 mle={},vle={zIndexMap:Object.values(Zn).reduce((e,t)=>oA(oA({},e),{},{[t]:{element:void 0,panoramaElement:void 0,consumers:0}}),mle)},yle=new Set(Object.values(Zn));function ble(e){return yle.has(e)}var PL=Wn({name:"zIndex",initialState:vle,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&&!ble(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:xle,unregisterZIndexPortal:wle,registerZIndexPortalElement:Cle,unregisterZIndexPortalElement:Sle}=PL.actions,Ele=PL.reducer;function Po(e){var{zIndex:t,children:n}=e,r=Dee(),i=r&&t!==void 0&&t!==0,o=pr(),a=Ht();j.useLayoutEffect(()=>i?(a(xle({zIndex:t})),()=>{a(wle({zIndex:t}))}):ds,[a,t,i]);var s=Le(u=>fle(u,t,o));return i?s?Up.createPortal(n,s):null:n}function jb(){return jb=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},jb.apply(null,arguments)}function aA(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?aA(Object(n),!0).forEach(function(r){_le(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):aA(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function _le(e,t,n){return(t=Ole(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ole(e){var t=Ple(e,"string");return typeof t=="symbol"?t:t+""}function Ple(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 Ale(e){var{cursor:t,cursorComp:n,cursorProps:r}=e;return j.isValidElement(t)?j.cloneElement(t,r):j.createElement(n,r)}function Rle(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=Xte,v=Zn.cursorLine;else if(d==="BarChart")y=Zte(s,p,o,a),b=fj,v=Zn.cursorRectangle;else if(s==="radial"&&GM(p)){var{cx:w,cy:C,radius:E,startAngle:_,endAngle:P}=dj(p);y={cx:w,cy:C,startAngle:_,endAngle:P,innerRadius:E,outerRadius:E},b=hj,v=Zn.cursorLine}else y={points:Vne(s,p,o)},b=aj,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),wx(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(Ale,{cursor:u,cursorComp:b,cursorProps:I}))}function Ile(e){var t=Yse(),n=GD(),r=_l(),i=nle();return t==null||n==null||r==null||i==null?null:x.createElement(Rle,jb({},e,{offset:n,layout:r,tooltipAxisBandSize:t,chartName:i}))}var AL=j.createContext(null),Tle=()=>j.useContext(AL),ly={exports:{}},sA;function kle(){return sA||(sA=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 Nle=kle();const Mle=fs(Nle);var tc=new Mle,Lb="recharts.syncEvent.tooltip",lA="recharts.syncEvent.brush",Dle=(e,t)=>{if(t&&Array.isArray(e)){var n=Number.parseInt(t,10);if(!Di(n))return e[n]}},jle={chartName:"",tooltipPayloadSearcher:()=>{},eventEmitter:void 0,defaultTooltipEventType:"axis"},RL=Wn({name:"options",initialState:jle,reducers:{createEventEmitter:e=>{e.eventEmitter==null&&(e.eventEmitter=Symbol("rechartsEventEmitter"))}}}),Lle=RL.reducer,{createEventEmitter:$le}=RL.actions;function Fle(e){return e.tooltip.syncInteraction}var Vle={chartData:void 0,computedData:void 0,dataStartIndex:0,dataEndIndex:0},IL=Wn({name:"chartData",initialState:Vle,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:uA,setDataStartEndIndexes:Ble,setComputedData:cge}=IL.actions,zle=IL.reducer,Wle=["x","y"];function cA(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?cA(Object(n),!0).forEach(function(r){Hle(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):cA(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Hle(e,t,n){return(t=Ule(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ule(e){var t=Gle(e,"string");return typeof t=="symbol"?t:t+""}function Gle(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 qle(e,t){if(e==null)return{};var n,r,i=Kle(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 Kle(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 Yle(){var e=Le(Kx),t=Le(Yx),n=Ht(),r=Le(kj),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=qle(h,Wle),{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(Db({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=Db({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(Lb,u),()=>{tc.off(Lb,u)}},[s,n,t,e,r,i,o,a])}function Xle(){var e=Le(Kx),t=Le(Yx),n=Ht();j.useEffect(()=>{if(e==null)return ds;var r=(i,o,a)=>{t!==a&&e===i&&n(Ble(o))};return tc.on(lA,r),()=>{tc.off(lA,r)}},[n,t,e])}function Zle(){var e=Ht();j.useEffect(()=>{e($le())},[e]),Yle(),Xle()}function Qle(e,t,n,r,i,o){var a=Le(y=>ile(y,e,t)),s=Le(Vse),u=Le(Yx),c=Le(Kx),d=Le(kj),p=Le(Fle),g=p?.active,h=jh();j.useEffect(()=>{if(!g&&c!=null&&u!=null){var y=Db({active:o,coordinate:n,dataKey:a,index:i,label:typeof r=="number"?String(r):r,sourceViewBox:h,graphicalItemId:s});tc.emit(Lb,c,y,u)}},[g,n,a,s,i,r,u,c,d,o,h])}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 dA(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){Jle(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 Jle(e,t,n){return(t=eue(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function eue(e){var t=tue(e,"string");return typeof t=="symbol"?t:t+""}function tue(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 nue(e){return e.dataKey}function rue(e,t){return x.isValidElement(e)?x.cloneElement(e,t):typeof e=="function"?x.createElement(e,t):x.createElement(_te,t)}var pA=[],iue={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 oue(e){var t,n,r=Mr(e,iue),{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(Kae({shared:C,trigger:E,axisId:R,active:i,defaultIndex:k}))},[I,C,E,R,i,k]);var B=jh(),L=oj(),V=zae(C),{activeIndex:D,isActive:H}=(t=Le(Fe=>sle(Fe,V,E,k)))!==null&&t!==void 0?t:{},J=Le(Fe=>ale(Fe,V,E,k)),te=Le(Fe=>OL(Fe,V,E,k)),G=Le(Fe=>ole(Fe,V,E,k)),ee=J,Q=Tle(),pe=(n=i??H)!==null&&n!==void 0?n:!1,[K,Ae]=PQ([ee,pe]),Se=V==="axis"?te:void 0;Qle(V,E,G,Se,D,pe);var $e=P??Q;if($e==null||B==null||V==null)return null;var we=ee??pA;pe||(we=pA),c&&we.length&&(we=hQ(we.filter(Fe=>Fe.value!=null&&(Fe.hide!==!0||r.includeHidden)),g,nue));var Ce=we.length>0,ze=dA(dA({},r),{},{payload:we,label:Se,active:pe,activeIndex:D,coordinate:G,accessibilityLayer:L}),Ke=x.createElement(jte,{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},rue(u,ze));return x.createElement(x.Fragment,null,Up.createPortal(Ke,$e),pe&&x.createElement(Ile,{cursor:w,tooltipEventType:V,coordinate:G,payload:we,index:D}))}var TL=e=>null;TL.displayName="Cell";function aue(e,t,n){return(t=sue(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function sue(e){var t=lue(e,"string");return typeof t=="symbol"?t:t+""}function lue(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 uue{constructor(t){aue(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 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 cue(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){fue(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 fue(e,t,n){return(t=due(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function due(e){var t=pue(e,"string");return typeof t=="symbol"?t:t+""}function pue(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 hue={cacheSize:2e3,enableCache:!0},kL=cue({},hue),gA=new uue(kL.cacheSize),gue={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},mA="recharts_measurement_span";function mue(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 vA=(e,t)=>{try{var n=document.getElementById(mA);n||(n=document.createElement("span"),n.setAttribute("id",mA),n.setAttribute("aria-hidden","true"),document.body.appendChild(n)),Object.assign(n.style,gue,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(!kL.enableCache)return vA(t,n);var r=mue(t,n),i=gA.get(r);if(i)return i;var o=vA(t,n);return gA.set(r,o),o},NL;function vue(e,t,n){return(t=yue(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function yue(e){var t=bue(e,"string");return typeof t=="symbol"?t:t+""}function bue(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 yA=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,bA=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,xue=/^(px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q)$/,wue=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,Cue={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},Sue=["cm","mm","pt","pc","in","Q","px"];function Eue(e){return Sue.includes(e)}var rl="NaN";function _ue(e,t){return e*Cue[t]}class In{static parse(t){var n,[,r,i]=(n=wue.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!==""&&!xue.test(n)&&(this.num=NaN,this.unit=""),Eue(n)&&(this.num=_ue(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)}}NL=In;vue(In,"NaN",new NL(NaN,""));function ML(e){if(e==null||e.includes(rl))return rl;for(var t=e;t.includes("*")||t.includes("/");){var n,[,r,i,o]=(n=yA.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(yA,u.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var c,[,d,p,g]=(c=bA.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(bA,b.toString())}return t}var xA=/\(([^()]*)\)/;function Oue(e){for(var t=e,n;(n=xA.exec(t))!=null;){var[,r]=n;t=t.replace(xA,ML(r))}return t}function Pue(e){var t=e.replace(/\s+/g,"");return t=Oue(t),t=ML(t),t}function Aue(e){try{return Pue(e)}catch{return rl}}function uy(e){var t=Aue(e.slice(5,-1));return t===rl?"":t}var Rue=["x","y","lineHeight","capHeight","fill","scaleToFit","textAnchor","verticalAnchor"],Iue=["dx","dy","angle","className","breakAll"];function $b(){return $b=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},$b.apply(null,arguments)}function wA(e,t){if(e==null)return{};var n,r,i=Tue(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 Tue(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 DL=/[ \f\n\r\t\v\u2028\u2029]+/,jL=e=>{var{children:t,breakAll:n,style:r}=e;try{var i=[];pn(t)||(n?i=t.toString().split(""):i=t.toString().split(DL));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 LL(e){return e==="start"||e==="middle"||e==="end"||e==="inherit"}function kue(e){return pn(e)||typeof e=="string"||typeof e=="number"||typeof e=="boolean"}var $L=(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},[]),FL=e=>e.reduce((t,n)=>t.width>n.width?t:n),Nue="…",CA=(e,t,n,r,i,o,a,s)=>{var u=e.slice(0,t),c=jL({breakAll:n,style:r,children:u+Nue});if(!c)return[!1,[]];var d=$L(c.wordsWithComputedWidth,o,a,s),p=d.length>i||FL(d).width>Number(o);return[p,d]},Mue=(e,t,n,r,i)=>{var{maxLines:o,children:a,style:s,breakAll:u}=e,c=Te(o),d=String(a),p=$L(t,r,n,i);if(!c||i)return p;var g=p.length>o||FL(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,_]=CA(d,C,u,s,o,r,n,i),[P]=CA(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},SA=e=>{var t=pn(e)?[]:e.toString().split(DL);return[{words:t,width:void 0}]},Due=e=>{var{width:t,scaleToFit:n,children:r,style:i,breakAll:o,maxLines:a}=e;if((t||n)&&!xc.isSsr){var s,u,c=jL({breakAll:o,children:r,style:i});if(c){var{wordsWithComputedWidth:d,spaceWidth:p}=c;s=d,u=p}else return SA(r);return Mue({breakAll:o,children:r,maxLines:a,style:i},s,u,t,!!n)}return SA(r)},VL="#808080",jue={angle:0,breakAll:!1,capHeight:"0.71em",fill:VL,lineHeight:"1em",scaleToFit:!1,textAnchor:"start",verticalAnchor:"end",x:0,y:0},Uw=j.forwardRef((e,t)=>{var n=Mr(e,jue),{x:r,y:i,lineHeight:o,capHeight:a,fill:s,scaleToFit:u,textAnchor:c,verticalAnchor:d}=n,p=wA(n,Rue),g=j.useMemo(()=>Due({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=wA(p,Iue);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",$b({},ti(C),{ref:t,x:E,y:_,className:Pt("recharts-text",v),textAnchor:c,fill:s.includes("url")?VL: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)}))});Uw.displayName="Text";function EA(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?EA(Object(n),!0).forEach(function(r){Lue(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):EA(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Lue(e,t,n){return(t=$ue(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $ue(e){var t=Fue(e,"string");return typeof t=="symbol"?t:t+""}function Fue(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 Vue=e=>{var{viewBox:t,position:n,offset:r=0,parentViewBox:i}=e,{x:o,y:a,height:s,upperWidth:u,lowerWidth:c}=Fx(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)},Bue=["labelRef"],zue=["content"];function _A(e,t){if(e==null)return{};var n,r,i=Wue(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 Wue(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 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 Pu(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){Hue(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 Hue(e,t,n){return(t=Uue(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Uue(e){var t=Gue(e,"string");return typeof t=="symbol"?t:t+""}function Gue(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 BL=j.createContext(null),que=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(BL.Provider,{value:u},s)},zL=()=>{var e=j.useContext(BL),t=jh();return e||(t?Fx(t):void 0)},Kue=j.createContext(null),Yue=()=>{var e=j.useContext(Kue),t=Le(Lj);return e||t},Xue=e=>{var{value:t,formatter:n}=e,r=pn(e.children)?t:e.children;return typeof n=="function"?n(r):r},Gw=e=>e!=null&&typeof e=="function",Zue=(e,t)=>{var n=cr(t-e),r=Math.min(Math.abs(t-e),360);return n*r},Que=(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=Zue(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,`
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(XO||(XO=za(["L",",","Z"])),t,n);return C},Bne={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},hj=e=>{var t=Mr(e,Bne),{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=Vne({cx:n,cy:r,innerRadius:i,outerRadius:o,cornerRadius:Math.min(y,h/2),forceCornerRadius:s,cornerIsExternal:u,startAngle:c,endAngle:d}):b=pj({cx:n,cy:r,innerRadius:i,outerRadius:o,startAngle:c,endAngle:d}),x.createElement("path",_b({},ti(t),{className:g,d:b}))};function zne(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(GM(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 dj(t)}}var Xv={},Zv={},Qv={},ZO;function Wne(){return ZO||(ZO=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=nD();function n(r){return t.isSymbol(r)?NaN:Number(r)}e.toNumber=n})(Qv)),Qv}var QO;function Hne(){return QO||(QO=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Wne();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 JO;function Une(){return JO||(JO=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=rD(),n=Hne();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,eP;function Gne(){return eP||(eP=1,Jv=Une().range),Jv}var qne=Gne();const gj=fs(qne);var Co=e=>e.chartData,mj=q([Co],e=>{var t=e.chartData!=null?e.chartData.length-1:0;return{chartData:e.chartData,computedData:e.computedData,dataEndIndex:t,dataStartIndex:0}}),vj=(e,t,n,r)=>r?mj(e):Co(e),Kne=(e,t,n)=>n?mj(e):Co(e);function Ti(e){if(Array.isArray(e)&&e.length===2){var[t,n]=e;if(ct(t)&&ct(n))return!0}return!1}function tP(e,t,n){return n?e:[Math.min(e[0],t[0]),Math.max(e[1],t[1])]}function yj(e,t){if(t&&typeof e!="function"&&Array.isArray(e)&&e.length===2){var[n,r]=e,i,o;if(ct(n))i=n;else if(typeof n=="function")return;if(ct(r))o=r;else if(typeof r=="function")return;var a=[i,o];if(Ti(a))return a}}function Yne(e,t,n){if(!(!n&&t==null)){if(typeof e=="function"&&t!=null)try{var r=e(t,n);if(Ti(r))return tP(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"&&U_.test(i)){var u=U_.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"&&G_.test(o)){var d=G_.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:tP(g,t,n)}}}var Ol=1e9,Xne={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},Ux,Vt=!0,ni="[DecimalError] ",Ka=ni+"Invalid argument: ",Hx=ni+"Exponent out of range: ",Pl=Math.floor,Va=Math.pow,Zne=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Or,xn=1e7,Dt=7,bj=9007199254740991,Cp=Pl(bj/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?Cj(t,e):xj(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 wj(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?xj(t,e):Cj(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)<=bj){for(i=new u(Or),t=Math.ceil(r/Dt+4),Vt=!1;n%2&&(i=i.times(s),rP(i.d,t)),n=Pl(n/2),n!==0;)s=s.times(s),rP(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=wj(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 xj(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 wj(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(Hx+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 nP(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(Hx+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(Hx+rn(e));return e}function Cj(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 rP(e,t){if(e.length>t)return e.length=t,!0}function Sj(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 nP(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,Zne.test(o))nP(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=Sj,i.config=i.set=Qne,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 Qne(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 Ux=Sj(Xne);Or=new Ux(1);const ut=Ux;function Ej(e){var t;return e===0?t=1:t=Math.floor(new ut(e).abs().log(10).toNumber())+1,t}function _j(e,t,n){for(var r=new ut(e),i=0,o=[];r.lt(t)&&i<1e5;)o.push(r.toNumber()),r=r.add(n),i++;return o}var Oj=e=>{var[t,n]=e,[r,i]=[t,n];return t>n&&([r,i]=[n,t]),[r,i]},Gx=(e,t,n)=>{if(e.lte(0))return new ut(0);var r=Ej(e.toNumber()),i=new ut(10).pow(r),o=e.div(i),a=r!==1?.05:.1,s=new ut(Math.ceil(o.div(a).toNumber())).add(n).mul(a),u=s.mul(i);return t?new ut(u.toNumber()):new ut(Math.ceil(u.toNumber()))},Pj=(e,t,n)=>{var r;if(e.lte(0))return new ut(0);var i=[1,2,2.5,5],o=e.toNumber(),a=Math.floor(new ut(o).abs().log(10).toNumber()),s=new ut(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 ut(10).pow(d))}var p=(r=i[c])!==null&&r!==void 0?r:1,g=new ut(p).mul(s);return t?g:new ut(Math.ceil(g.toNumber()))},Jne=(e,t,n)=>{var r=new ut(1),i=new ut(e);if(!i.isint()&&n){var o=Math.abs(e);o<1?(r=new ut(10).pow(Ej(e)-1),i=new ut(Math.floor(i.div(r).toNumber())).mul(r)):o>1&&(i=new ut(Math.floor(e)))}else e===0?i=new ut(Math.floor((t-1)/2)):n||(i=new ut(Math.floor(e)));for(var a=Math.floor((t-1)/2),s=[],u=0;u<t;u++)s.push(i.add(new ut(u-a).mul(r)).toNumber());return s},Aj=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]:Gx;if(!Number.isFinite((n-t)/(r-1)))return{step:new ut(0),tickMin:new ut(0),tickMax:new ut(0)};var s=a(new ut(n).sub(t).div(r-1),i,o),u;t<=0&&n>=0?u=new ut(0):(u=new ut(t).add(n).div(2),u=u.sub(new ut(u).mod(s)));var c=Math.ceil(u.sub(t).div(s).toNumber()),d=Math.ceil(new ut(n).sub(u).div(s).toNumber()),p=c+d+1;return p>r?Aj(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 ut(c).mul(s)),tickMax:u.add(new ut(d).mul(s))})},iP=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]=Oj([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 Jne(u,i,o);var p=a==="snap125"?Pj:Gx,{step:g,tickMin:h,tickMax:y}=Aj(u,c,s,o,0,p),b=_j(h,y.add(new ut(.1).mul(g)),g);return n>r?b.reverse():b},oP=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]=Oj([r,i]);if(s===-1/0||u===1/0)return[r,i];if(s===u)return[s];var c=a==="snap125"?Pj:Gx,d=Math.max(n,2),p=c(new ut(u).sub(s).div(d-1),o,0),g=[..._j(new ut(s),new ut(u),p),u];return o===!1&&(g=g.map(h=>Math.round(h))),r>i?g.reverse():g},Rj=e=>e.rootProps.maxBarSize,ere=e=>e.rootProps.barGap,Ij=e=>e.rootProps.barCategoryGap,tre=e=>e.rootProps.barSize,Bh=e=>e.rootProps.stackOffset,Tj=e=>e.rootProps.reverseStackOrder,qx=e=>e.options.chartName,Kx=e=>e.rootProps.syncId,kj=e=>e.rootProps.syncMethod,Yx=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 aP(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?aP(Object(n),!0).forEach(function(r){nre(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):aP(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function nre(e,t,n){return(t=rre(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function rre(e){var t=ire(e,"string");return typeof t=="symbol"?t:t+""}function ire(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 sP={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"},lP={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"},ore=(e,t)=>{if(t!=null)return e.polarAxis.angleAxis[t]},Xx=q([ore,XD],(e,t)=>{var n;if(e!=null)return e;var r=(n=Wh(t,"angleAxis",sP.type))!==null&&n!==void 0?n:"category";return Sp(Sp({},sP),{},{type:r})}),are=(e,t)=>e.polarAxis.radiusAxis[t],Zx=q([are,XD],(e,t)=>{var n;if(e!=null)return e;var r=(n=Wh(t,"radiusAxis",lP.type))!==null&&n!==void 0?n:"category";return Sp(Sp({},lP),{},{type:r})}),Hh=e=>e.polarOptions,Qx=q([xo,wo,wn],Nne),Nj=q([Hh,Qx],(e,t)=>{if(e!=null)return fi(e.innerRadius,t,0)}),Mj=q([Hh,Qx],(e,t)=>{if(e!=null)return fi(e.outerRadius,t,t*.8)}),sre=e=>{if(e==null)return[0,0];var{startAngle:t,endAngle:n}=e;return[t,n]},Dj=q([Hh],sre);q([Xx,Dj],zh);var jj=q([Qx,Nj,Mj],(e,t,n)=>{if(!(e==null||t==null||n==null))return[t,n]});q([Zx,jj],zh);var Lj=q([At,Hh,Nj,Mj,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 Jx(e){return e?.id}function $j(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=Jx(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 lre(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 ew(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 ure=(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];ct(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 cre(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function tw(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===cre?e:fre,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 fre(){return 0}function Fj(e){return e===null?NaN:+e}function*dre(e,t){for(let n of e)n!=null&&(n=+n)>=n&&(yield n)}const pre=tw(na),wc=pre.right;tw(Fj).center;class uP extends Map{constructor(t,n=mre){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(cP(this,t))}has(t){return super.has(cP(this,t))}set(t,n){return super.set(hre(this,t),n)}delete(t){return super.delete(gre(this,t))}}function cP({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function hre({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function gre({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function mre(e){return e!==null&&typeof e=="object"?e.valueOf():e}function vre(e=na){if(e===na)return Vj;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 Vj(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const yre=Math.sqrt(50),bre=Math.sqrt(10),xre=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>=yre?10:o>=bre?5:o>=xre?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 Ob(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 Pb(e,t,n){return t=+t,e=+e,n=+n,Ep(e,t,n)[2]}function Ab(e,t,n){t=+t,e=+e,n=+n;const r=t<e,i=r?Pb(t,e,n):Pb(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}function fP(e,t){let n;for(const r of e)r!=null&&(n<r||n===void 0&&r>=r)&&(n=r);return n}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 Bj(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?Vj:vre(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));Bj(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 wre(e,t,n){if(e=Float64Array.from(dre(e)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return dP(e);if(t>=1)return fP(e);var r,i=(r-1)*t,o=Math.floor(i),a=fP(Bj(e,o).subarray(0,o+1)),s=dP(e.subarray(o+1));return a+(s-a)*(i-o)}}function Cre(e,t,n=Fj){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 Sre(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 Rb=Symbol("implicit");function nw(){var e=new uP,t=[],n=[],r=Rb;function i(o){let a=e.get(o);if(a===void 0){if(r!==Rb)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 uP;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 nw(t,n).unknown(r)},ri.apply(i,arguments),i}function rw(){var e=nw().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=Sre(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 rw(t(),[r,i]).round(s).paddingInner(u).paddingOuter(c).align(d)},ri.apply(p(),arguments)}function zj(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return zj(t())},e}function Ere(){return zj(rw.apply(null,arguments).paddingInner(1))}function iw(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Wj(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*",_re=/^#([0-9a-f]{3,8})$/,Ore=new RegExp(`^rgb\\(${cl},${cl},${cl}\\)$`),Pre=new RegExp(`^rgb\\(${ki},${ki},${ki}\\)$`),Are=new RegExp(`^rgba\\(${cl},${cl},${cl},${Qu}\\)$`),Rre=new RegExp(`^rgba\\(${ki},${ki},${ki},${Qu}\\)$`),Ire=new RegExp(`^hsl\\(${Qu},${ki},${ki}\\)$`),Tre=new RegExp(`^hsla\\(${Qu},${ki},${ki},${Qu}\\)$`),pP={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};iw(Cc,Ju,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:hP,formatHex:hP,formatHex8:kre,formatHsl:Nre,formatRgb:gP,toString:gP});function hP(){return this.rgb().formatHex()}function kre(){return this.rgb().formatHex8()}function Nre(){return Hj(this).formatHsl()}function gP(){return this.rgb().formatRgb()}function Ju(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=_re.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?mP(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=Ore.exec(e))?new dr(t[1],t[2],t[3],1):(t=Pre.exec(e))?new dr(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Are.exec(e))?pd(t[1],t[2],t[3],t[4]):(t=Rre.exec(e))?pd(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=Ire.exec(e))?bP(t[1],t[2]/100,t[3]/100,1):(t=Tre.exec(e))?bP(t[1],t[2]/100,t[3]/100,t[4]):pP.hasOwnProperty(e)?mP(pP[e]):e==="transparent"?new dr(NaN,NaN,NaN,0):null}function mP(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 Mre(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 Ib(e,t,n,r){return arguments.length===1?Mre(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}iw(dr,Ib,Wj(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:vP,formatHex:vP,formatHex8:Dre,formatRgb:yP,toString:yP}));function vP(){return`#${Wa(this.r)}${Wa(this.g)}${Wa(this.b)}`}function Dre(){return`#${Wa(this.r)}${Wa(this.g)}${Wa(this.b)}${Wa((isNaN(this.opacity)?1:this.opacity)*255)}`}function yP(){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 bP(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 Hj(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 jre(e,t,n,r){return arguments.length===1?Hj(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}iw(ui,jre,Wj(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(xP(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("}${xP(this.h)}, ${hd(this.s)*100}%, ${hd(this.l)*100}%${e===1?")":`, ${e})`}`}}));function xP(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 ow=e=>()=>e;function Lre(e,t){return function(n){return e+n*t}}function $re(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 Fre(e){return(e=+e)==1?Uj:function(t,n){return n-t?$re(t,n,e):ow(isNaN(t)?n:t)}}function Uj(e,t){var n=t-e;return n?Lre(e,n):ow(isNaN(e)?t:e)}const wP=(function e(t){var n=Fre(t);function r(i,o){var a=n((i=Ib(i)).r,(o=Ib(o)).r),s=n(i.g,o.g),u=n(i.b,o.b),c=Uj(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 Vre(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 Bre(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function zre(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 Wre(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 Hre(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 Tb=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ny=new RegExp(Tb.source,"g");function Ure(e){return function(){return e}}function Gre(e){return function(t){return e(t)+""}}function qre(e,t){var n=Tb.lastIndex=ny.lastIndex=0,r,i,o,a=-1,s=[],u=[];for(e=e+"",t=t+"";(r=Tb.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]?Gre(u[0].x):Ure(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"?ow(t):(n==="number"?Pp:n==="string"?(r=Ju(t))?(t=r,wP):qre:t instanceof Ju?wP:t instanceof Date?Wre:Bre(t)?Vre:Array.isArray(t)?zre:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?Hre:Pp)(e,t)}function aw(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function Kre(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 Yre(e){return function(){return e}}function Ap(e){return+e}var CP=[0,1];function Qn(e){return e}function kb(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:Yre(isNaN(t)?NaN:.5)}function Xre(e,t){var n;return e>t&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function Zre(e,t,n){var r=e[0],i=e[1],o=t[0],a=t[1];return i<r?(r=kb(i,r),o=n(a,o)):(r=kb(r,i),o=n(o,a)),function(s){return o(r(s))}}function Qre(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]=kb(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=CP,t=CP,n=Rl,r,i,o,a=Qn,s,u,c;function d(){var g=Math.min(e.length,t.length);return a!==Qn&&(a=Xre(e[0],e[g-1])),s=g>2?Qre:Zre,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=aw,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 sw(){return Yh()(Qn,Qn)}function Jre(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 eie(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 tie(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var nie=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function ec(e){if(!(t=nie.exec(e)))throw new Error("invalid format: "+e);var t;return new lw({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=lw.prototype;function lw(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+""}lw.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 rie(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 iie(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 SP(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 EP={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:Jre,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)=>SP(e*100,t),r:SP,s:iie,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function _P(e){return e}var OP=Array.prototype.map,PP=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function oie(e){var t=e.grouping===void 0||e.thousands===void 0?_P:eie(OP.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?_P:tie(OP.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"):EP[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=EP[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=rie(D)),Q&&+D==0&&b!=="+"&&(Q=!1),H=(Q?b==="("?b:s:b==="-"||b==="("?"":b)+H,J=(R==="s"&&!isNaN(D)&&Ip!==void 0?PP[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:PP[8+h/3]});return function(v){return b(y*v)}}return{format:c,formatPrefix:d}}var gd,uw,Gj;aie({thousands:",",grouping:[3],currency:["$",""]});function aie(e){return gd=oie(e),uw=gd.format,Gj=gd.formatPrefix,gd}function sie(e){return Math.max(0,-yl(Math.abs(e)))}function lie(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(yl(t)/3)))*3-yl(Math.abs(e)))}function uie(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,yl(t)-yl(e))+1}function qj(e,t,n,r){var i=Ab(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=lie(i,a))&&(r.precision=o),Gj(r,a)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(o=uie(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=o-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(o=sie(i))&&(r.precision=o-(r.type==="%")*2);break}}return uw(r)}function ha(e){var t=e.domain;return e.ticks=function(n){var r=t();return Ob(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var i=t();return qj(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=Pb(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 Kj(){var e=sw();return e.copy=function(){return Sc(e,Kj())},ri.apply(e,arguments),ha(e)}function Yj(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 Yj(e).unknown(t)},e=arguments.length?Array.from(e,Ap):[0,1],ha(n)}function Xj(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 AP(e){return Math.log(e)}function RP(e){return Math.exp(e)}function cie(e){return-Math.log(-e)}function fie(e){return-Math.exp(-e)}function die(e){return isFinite(e)?+("1e"+e):e<0?0:e}function pie(e){return e===10?die:e===Math.E?Math.exp:t=>Math.pow(e,t)}function hie(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 IP(e){return(t,n)=>-e(-t,n)}function cw(e){const t=e(AP,RP),n=t.domain;let r=10,i,o;function a(){return i=hie(r),o=pie(r),n()[0]<0?(i=IP(i),o=IP(o),e(cie,fie)):e(AP,RP),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=Ob(c,d,v))}else w=Ob(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=uw(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(Xj(n(),{floor:s=>o(Math.floor(i(s))),ceil:s=>o(Math.ceil(i(s)))})),t}function Zj(){const e=cw(Yh()).domain([1,10]);return e.copy=()=>Sc(e,Zj()).base(e.base()),ri.apply(e,arguments),e}function TP(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function kP(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function fw(e){var t=1,n=e(TP(t),kP(t));return n.constant=function(r){return arguments.length?e(TP(t=+r),kP(t)):t},ha(n)}function Qj(){var e=fw(Yh());return e.copy=function(){return Sc(e,Qj()).constant(e.constant())},ri.apply(e,arguments)}function NP(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function gie(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function mie(e){return e<0?-e*e:e*e}function dw(e){var t=e(Qn,Qn),n=1;function r(){return n===1?e(Qn,Qn):n===.5?e(gie,mie):e(NP(n),NP(1/n))}return t.exponent=function(i){return arguments.length?(n=+i,r()):n},ha(t)}function pw(){var e=dw(Yh());return e.copy=function(){return Sc(e,pw()).exponent(e.exponent())},ri.apply(e,arguments),e}function vie(){return pw.apply(null,arguments).exponent(.5)}function MP(e){return Math.sign(e)*e*e}function yie(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function Jj(){var e=sw(),t=[0,1],n=!1,r;function i(o){var a=yie(e(o));return isNaN(a)?r:n?Math.round(a):a}return i.invert=function(o){return e.invert(MP(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(MP)),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 Jj(e.domain(),t).round(n).clamp(e.clamp()).unknown(r)},ri.apply(i,arguments),ha(i)}function e2(){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]=Cre(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 e2().domain(e).range(t).unknown(r)},ri.apply(o,arguments)}function t2(){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 t2().domain([e,t]).range(i).unknown(o)},ri.apply(ha(a),arguments)}function n2(){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 n2().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,hw=ho*7,DP=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 gw=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());gw.range;const mw=hn(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Jr)},(e,t)=>(t-e)/Jr,e=>e.getUTCMinutes());mw.range;const vw=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());vw.range;const yw=hn(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*io)},(e,t)=>(t-e)/io,e=>e.getUTCHours());yw.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 r2=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));r2.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)/hw)}const Zh=ps(0),kp=ps(1),bie=ps(2),xie=ps(3),bl=ps(4),wie=ps(5),Cie=ps(6);Zh.range;kp.range;bie.range;xie.range;bl.range;wie.range;Cie.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)/hw)}const Qh=hs(0),Np=hs(1),Sie=hs(2),Eie=hs(3),xl=hs(4),_ie=hs(5),Oie=hs(6);Qh.range;Np.range;Sie.range;Eie.range;xl.range;_ie.range;Oie.range;const bw=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());bw.range;const xw=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());xw.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 i2(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,hw],[t,1,DP],[t,3,3*DP],[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=tw(([,,v])=>v).right(a,g);if(h===a.length)return e.every(Ab(c/oy,d/oy,p));if(h===0)return Tp.every(Math.max(Ab(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[Pie,Aie]=i2(mo,xw,Qh,r2,yw,mw),[Rie,Iie]=i2(go,bw,Zh,Ec,vw,gw);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 Tie(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:BP,e:BP,f:eoe,g:coe,G:doe,H:Zie,I:Qie,j:Jie,L:o2,m:toe,M:noe,p:Ae,q:Se,Q:HP,s:UP,S:roe,u:ioe,U:ooe,V:aoe,w:soe,W:loe,x:null,X:null,y:uoe,Y:foe,Z:poe,"%":WP},_={a:$e,A:we,b:Ce,B:ze,c:null,d:zP,e:zP,f:voe,g:Poe,G:Roe,H:hoe,I:goe,j:moe,L:s2,m:yoe,M:boe,p:Ke,q:Fe,Q:HP,s:UP,S:xoe,u:woe,U:Coe,V:Soe,w:Eoe,W:_oe,x:null,X:null,y:Ooe,Y:Aoe,Z:Ioe,"%":WP},P={a:L,A:V,b:D,B:H,c:J,d:FP,e:FP,f:qie,g:$P,G:LP,H:VP,I:VP,j:Wie,L:Gie,m:zie,M:Hie,p:B,q:Bie,Q:Yie,s:Xie,S:Uie,u:jie,U:Lie,V:$ie,w:Die,W:Fie,x:te,X:G,y:$P,Y:LP,Z:Vie,"%":Kie};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=jP[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 jP?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 jP={"-":"",_:" ",0:"0"},En=/^\s*\d+/,kie=/^%/,Nie=/[\\^$*+?|[\]().{}]/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 Mie(e){return e.replace(Nie,"\\$&")}function vu(e){return new RegExp("^(?:"+e.map(Mie).join("|")+")","i")}function yu(e){return new Map(e.map((t,n)=>[t.toLowerCase(),n]))}function Die(e,t,n){var r=En.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function jie(e,t,n){var r=En.exec(t.slice(n,n+1));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.U=+r[0],n+r[0].length):-1}function $ie(e,t,n){var r=En.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function Fie(e,t,n){var r=En.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function LP(e,t,n){var r=En.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function $P(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 Vie(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 Bie(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 zie(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 FP(e,t,n){var r=En.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function Wie(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 VP(e,t,n){var r=En.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function Hie(e,t,n){var r=En.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function Uie(e,t,n){var r=En.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function Gie(e,t,n){var r=En.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function qie(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 Kie(e,t,n){var r=kie.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function Yie(e,t,n){var r=En.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function Xie(e,t,n){var r=En.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function BP(e,t){return dt(e.getDate(),t,2)}function Zie(e,t){return dt(e.getHours(),t,2)}function Qie(e,t){return dt(e.getHours()%12||12,t,2)}function Jie(e,t){return dt(1+Ec.count(go(e),e),t,3)}function o2(e,t){return dt(e.getMilliseconds(),t,3)}function eoe(e,t){return o2(e,t)+"000"}function toe(e,t){return dt(e.getMonth()+1,t,2)}function noe(e,t){return dt(e.getMinutes(),t,2)}function roe(e,t){return dt(e.getSeconds(),t,2)}function ioe(e){var t=e.getDay();return t===0?7:t}function ooe(e,t){return dt(Zh.count(go(e)-1,e),t,2)}function a2(e){var t=e.getDay();return t>=4||t===0?bl(e):bl.ceil(e)}function aoe(e,t){return e=a2(e),dt(bl.count(go(e),e)+(go(e).getDay()===4),t,2)}function soe(e){return e.getDay()}function loe(e,t){return dt(kp.count(go(e)-1,e),t,2)}function uoe(e,t){return dt(e.getFullYear()%100,t,2)}function coe(e,t){return e=a2(e),dt(e.getFullYear()%100,t,2)}function foe(e,t){return dt(e.getFullYear()%1e4,t,4)}function doe(e,t){var n=e.getDay();return e=n>=4||n===0?bl(e):bl.ceil(e),dt(e.getFullYear()%1e4,t,4)}function poe(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+dt(t/60|0,"0",2)+dt(t%60,"0",2)}function zP(e,t){return dt(e.getUTCDate(),t,2)}function hoe(e,t){return dt(e.getUTCHours(),t,2)}function goe(e,t){return dt(e.getUTCHours()%12||12,t,2)}function moe(e,t){return dt(1+Xh.count(mo(e),e),t,3)}function s2(e,t){return dt(e.getUTCMilliseconds(),t,3)}function voe(e,t){return s2(e,t)+"000"}function yoe(e,t){return dt(e.getUTCMonth()+1,t,2)}function boe(e,t){return dt(e.getUTCMinutes(),t,2)}function xoe(e,t){return dt(e.getUTCSeconds(),t,2)}function woe(e){var t=e.getUTCDay();return t===0?7:t}function Coe(e,t){return dt(Qh.count(mo(e)-1,e),t,2)}function l2(e){var t=e.getUTCDay();return t>=4||t===0?xl(e):xl.ceil(e)}function Soe(e,t){return e=l2(e),dt(xl.count(mo(e),e)+(mo(e).getUTCDay()===4),t,2)}function Eoe(e){return e.getUTCDay()}function _oe(e,t){return dt(Np.count(mo(e)-1,e),t,2)}function Ooe(e,t){return dt(e.getUTCFullYear()%100,t,2)}function Poe(e,t){return e=l2(e),dt(e.getUTCFullYear()%100,t,2)}function Aoe(e,t){return dt(e.getUTCFullYear()%1e4,t,4)}function Roe(e,t){var n=e.getUTCDay();return e=n>=4||n===0?xl(e):xl.ceil(e),dt(e.getUTCFullYear()%1e4,t,4)}function Ioe(){return"+0000"}function WP(){return"%"}function HP(e){return+e}function UP(e){return Math.floor(+e/1e3)}var Ks,u2,c2;Toe({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 Toe(e){return Ks=Tie(e),u2=Ks.format,Ks.parse,c2=Ks.utcFormat,Ks.utcParse,Ks}function koe(e){return new Date(e)}function Noe(e){return e instanceof Date?+e:+new Date(+e)}function ww(e,t,n,r,i,o,a,s,u,c){var d=sw(),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,Noe)):g().map(koe)},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(Xj(I,R)):d},d.copy=function(){return Sc(d,ww(e,t,n,r,i,o,a,s,u,c))},d}function Moe(){return ri.apply(ww(Rie,Iie,go,bw,Zh,Ec,vw,gw,Ha,u2).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function Doe(){return ri.apply(ww(Pie,Aie,mo,xw,Qh,Xh,yw,mw,Ha,c2).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(aw),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 f2(){var e=ha(Jh()(Qn));return e.copy=function(){return ga(e,f2())},So.apply(e,arguments)}function d2(){var e=cw(Jh()).domain([1,10]);return e.copy=function(){return ga(e,d2()).base(e.base())},So.apply(e,arguments)}function p2(){var e=fw(Jh());return e.copy=function(){return ga(e,p2()).constant(e.constant())},So.apply(e,arguments)}function Cw(){var e=dw(Jh());return e.copy=function(){return ga(e,Cw()).exponent(e.exponent())},So.apply(e,arguments)}function joe(){return Cw.apply(null,arguments).exponent(.5)}function h2(){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)=>wre(e,o/r))},n.copy=function(){return h2(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=Kre(b,[w,C,E]),h):[c(0),c(.5),c(1)]}}return h.range=y(Rl),h.rangeRound=y(aw),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 g2(){var e=ha(eg()(Qn));return e.copy=function(){return ga(e,g2())},So.apply(e,arguments)}function m2(){var e=cw(eg()).domain([.1,1,10]);return e.copy=function(){return ga(e,m2()).base(e.base())},So.apply(e,arguments)}function v2(){var e=fw(eg());return e.copy=function(){return ga(e,v2()).constant(e.constant())},So.apply(e,arguments)}function Sw(){var e=dw(eg());return e.copy=function(){return ga(e,Sw()).exponent(e.exponent())},So.apply(e,arguments)}function Loe(){return Sw.apply(null,arguments).exponent(.5)}const Ou=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:rw,scaleDiverging:g2,scaleDivergingLog:m2,scaleDivergingPow:Sw,scaleDivergingSqrt:Loe,scaleDivergingSymlog:v2,scaleIdentity:Yj,scaleImplicit:Rb,scaleLinear:Kj,scaleLog:Zj,scaleOrdinal:nw,scalePoint:Ere,scalePow:pw,scaleQuantile:e2,scaleQuantize:t2,scaleRadial:Jj,scaleSequential:f2,scaleSequentialLog:d2,scaleSequentialPow:Cw,scaleSequentialQuantile:h2,scaleSequentialSqrt:joe,scaleSequentialSymlog:p2,scaleSqrt:vie,scaleSymlog:Qj,scaleThreshold:n2,scaleTime:Moe,scaleUtc:Doe,tickFormat:qj},Symbol.toStringTag,{value:"Module"}));function $oe(e){if(e in Ou)return Ou[e]();var t="scale".concat(dc(e));if(t in Ou)return Ou[t]()}function GP(e,t,n){if(typeof e=="function")return e.copy().domain(t).range(n);if(e!=null){var r=$oe(e);if(r!=null)return r.domain(t).range(n),r}}function Ew(e,t,n,r){if(!(n==null||r==null))return typeof e.scale=="function"?GP(e.scale,n,r):GP(t,n,r)}function Foe(e){return"scale".concat(dc(e))}function Voe(e){return Foe(e)in Ou}var y2=(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 Voe(r)?r:"point"}};function Boe(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 b2(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=Boe(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 zoe(e){if(e!=null)return"invert"in e&&typeof e.invert=="function"?e.invert.bind(e):b2(e,void 0)}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 Mp(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){Woe(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 Woe(e,t,n){return(t=Hoe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Hoe(e){var t=Uoe(e,"string");return typeof t=="symbol"?t:t+""}function Uoe(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 Nb=[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"},x2=(e,t)=>e.cartesianAxis.xAxis[t],Eo=(e,t)=>{var n=x2(e,t);return n??un},cn={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:Nb,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},w2=(e,t)=>e.cartesianAxis.yAxis[t],_o=(e,t)=>{var n=w2(e,t);return n??cn},Goe={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:""},_w=(e,t)=>{var n=e.cartesianAxis.zAxis[t];return n??Goe},tr=(e,t,n)=>{switch(t){case"xAxis":return Eo(e,n);case"yAxis":return _o(e,n);case"zAxis":return _w(e,n);case"angleAxis":return Xx(e,n);case"radiusAxis":return Zx(e,n);default:throw new Error("Unexpected axis type: ".concat(t))}},qoe=(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 Xx(e,n);case"radiusAxis":return Zx(e,n);default:throw new Error("Unexpected axis type: ".concat(t))}},C2=e=>e.graphicalItems.cartesianItems.some(t=>t.type==="bar")||e.graphicalItems.polarItems.some(t=>t.type==="radialBar");function S2(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 Ow=e=>e.graphicalItems.cartesianItems,Koe=q([Cn,Uh],S2),E2=(e,t,n)=>e.filter(n).filter(r=>t?.includeHidden===!0?!0:!r.hide),Oc=q([Ow,tr,Koe],E2,{memoizeOptions:{resultEqualityCheck:Kh}}),_2=q([Oc],e=>e.filter(t=>t.type==="area"||t.type==="bar").filter(Gh)),O2=e=>e.filter(t=>!("stackId"in t)||t.stackId===void 0),Yoe=q([Oc],O2),P2=e=>e.map(t=>t.data).filter(Boolean).flat(1),Xoe=q([Oc],P2,{memoizeOptions:{resultEqualityCheck:Kh}}),A2=(e,t)=>{var{chartData:n=[],dataStartIndex:r,dataEndIndex:i}=t;return e.length>0?e:n.slice(r,i+1)},Pw=q([Xoe,vj],A2),R2=(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([Pw,tr,Oc],R2);function fl(e){if(ji(e)||e instanceof Date){var t=Number(e);if(ct(t))return t}}function KP(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 Zoe(e,t){var n=fl(e),r=fl(t);return n==null&&r==null?0:n==null?-1:r==null?1:n-r}var Qoe=q([Pc],e=>e?.map(t=>t.value).sort(Zoe));function I2(e,t){switch(e){case"xAxis":return t.direction==="x";case"yAxis":return t.direction==="y";default:return!1}}function Joe(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,!(!ct(o)||!ct(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),eae=q([_2,vj,gn],$j),T2=(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(Jx);return[s,{stackedData:ZJ(e,d,n),graphicalItems:c}]}))},Mb=q([eae,_2,Bh,Tj],T2),k2=(e,t,n,r)=>{var{dataStartIndex:i,dataEndIndex:o}=t;if(r==null&&n!=="zAxis"){var a=nee(e,i,o);if(!(a!=null&&a[0]===0&&a[1]===0))return a}},tae=q([tr],e=>e.allowDataOverflow),Aw=e=>{var t;if(e==null||!("domain"in e))return Nb;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:Nb},N2=q([tr],Aw),M2=q([N2,tae],yj),nae=q([Mb,Co,Cn,M2],k2,{memoizeOptions:{resultEqualityCheck:qh}}),Rw=e=>e.errorBars,rae=(e,t,n)=>e.flatMap(r=>t[r.id]).filter(Boolean).filter(r=>I2(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]}},D2=(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=>I2(i,w)),g=Mn(s,(d=t.dataKey)!==null&&d!==void 0?d:u.dataKey),h=Joe(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=KP(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=KP(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]))}),ct(o)&&ct(a))return[o,a]},iae=q([Pw,tr,Yoe,Rw,Cn],D2,{memoizeOptions:{resultEqualityCheck:qh}});function oae(e){var{value:t}=e;if(ji(t)||t instanceof Date)return t}var aae=(e,t,n)=>{var r=e.map(oae).filter(i=>i!=null);return n&&(t.dataKey==null||t.allowDuplicatedCategory&&WM(r))?gj(0,e.length):t.allowDuplicatedCategory?r:Array.from(new Set(r))},j2=e=>e.referenceElements.dots,Il=(e,t,n)=>e.filter(r=>r.ifOverflow==="extendDomain").filter(r=>t==="xAxis"?r.xAxisId===n:r.yAxisId===n),sae=q([j2,Cn,Uh],Il),L2=e=>e.referenceElements.areas,lae=q([L2,Cn,Uh],Il),$2=e=>e.referenceElements.lines,uae=q([$2,Cn,Uh],Il),F2=(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)]}},cae=q(sae,Cn,F2),V2=(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)]}},fae=q([lae,Cn],V2);function dae(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 pae(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 B2=(e,t)=>{if(e!=null){var n=e.flatMap(r=>t==="xAxis"?dae(r):pae(r));if(n.length!==0)return[Math.min(...n),Math.max(...n)]}},hae=q([uae,Cn],B2),gae=q(cae,hae,fae,(e,t,n)=>Dp(e,n,t)),z2=(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 Yne(t,c,e.allowDataOverflow)},mae=q([tr,N2,M2,nae,iae,gae,At,Cn],z2,{memoizeOptions:{resultEqualityCheck:qh}}),vae=[0,1],W2=(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 gj(0,(d=n?.length)!==null&&d!==void 0?d:0)}return u==="category"?aae(r,e,c):i==="expand"?vae:a}},Iw=q([tr,At,Pw,Pc,Bh,Cn,mae],W2),Tl=q([tr,C2,qx],y2),H2=(e,t,n)=>{var{niceTicks:r}=t;if(r!=="none"){var i=Aw(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 iP(e,t.tickCount,t.allowDecimals,r);if(t.type==="number")return oP(e,t.tickCount,t.allowDecimals,r)}if(r==="auto"&&n==="linear"&&t!=null&&t.tickCount){if(o&&Ti(e))return iP(e,t.tickCount,t.allowDecimals,"adaptive");if(t.type==="number"&&Ti(e))return oP(e,t.tickCount,t.allowDecimals,"adaptive")}}},Tw=q([Iw,_c,Tl],H2),U2=(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},yae=q([tr,Iw,Tw,Cn],U2),bae=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}}),G2=q(bae,At,Ij,wn,(e,t,n,r,i)=>i,(e,t,n,r,i)=>{if(!ct(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}),xae=(e,t,n)=>{var r=Eo(e,t);return r==null||typeof r.padding!="string"?0:G2(e,"xAxis",t,n,r.padding)},wae=(e,t,n)=>{var r=_o(e,t);return r==null||typeof r.padding!="string"?0:G2(e,"yAxis",t,n,r.padding)},Cae=q(Eo,xae,(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}}),Sae=q(_o,wae,(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}}),Eae=q([wn,Cae,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]}),_ae=q([wn,At,Sae,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 Eae(e,n,r);case"yAxis":return _ae(e,n,r);case"zAxis":return(i=_w(e,n))===null||i===void 0?void 0:i.range;case"angleAxis":return Dj(e);case"radiusAxis":return jj(e,n);default:return}},q2=q([tr,Rc],zh),Oae=q([Tl,yae],ure),kw=q([tr,Tl,Oae,q2],Ew),K2=(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)}},Nw=q([At,Pc,_c,Cn],K2),tg=q([kw],ew);q([kw],zoe);q([kw,Qoe],b2);q([Oc,Rw,Cn],rae);function Y2(e,t){return e.id<t.id?-1:e.id>t.id?1:0}var ng=(e,t)=>t,rg=(e,t,n)=>n,Pae=q(kh,ng,rg,(e,t,n)=>e.filter(r=>r.orientation===t).filter(r=>r.mirror===n).sort(Y2)),Aae=q(Nh,ng,rg,(e,t,n)=>e.filter(r=>r.orientation===t).filter(r=>r.mirror===n).sort(Y2)),X2=(e,t)=>({width:e.width,height:t.height}),Rae=(e,t)=>{var n=typeof t.width=="number"?t.width:vc;return{width:n,height:e.height}},Z2=q(wn,Eo,X2),Iae=(e,t,n)=>{switch(t){case"top":return e.top;case"bottom":return n-e.bottom;default:return 0}},Tae=(e,t,n)=>{switch(t){case"left":return e.left;case"right":return n-e.right;default:return 0}},kae=q(wo,wn,Pae,ng,rg,(e,t,n,r,i)=>{var o={},a;return n.forEach(s=>{var u=X2(t,s);a==null&&(a=Iae(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}),Nae=q(xo,wn,Aae,ng,rg,(e,t,n,r,i)=>{var o={},a;return n.forEach(s=>{var u=Rae(t,s);a==null&&(a=Tae(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}),Mae=(e,t)=>{var n=Eo(e,t);if(n!=null)return kae(e,n.orientation,n.mirror)},Dae=q([wn,Eo,Mae,(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}}}),jae=(e,t)=>{var n=_o(e,t);if(n!=null)return Nae(e,n.orientation,n.mirror)},Lae=q([wn,_o,jae,(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}}}),Q2=q(wn,_o,(e,t)=>{var n=typeof t.width=="number"?t.width:vc;return{width:n,height:e.height}}),YP=(e,t,n)=>{switch(t){case"xAxis":return Z2(e,n).width;case"yAxis":return Q2(e,n).height;default:return}},J2=(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&&WM(u))return u}},Mw=q([At,Pc,tr,Cn],J2),XP=q([At,qoe,Tl,tg,Mw,Nw,Rc,Tw,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}}}),$ae=(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 ct(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 ct(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 ct(C)?{coordinate:C+y,value:v,index:w,offset:y}:null}).filter(fr):r.domain().map((v,w)=>{var C=r.map(v);return ct(C)?{coordinate:C+y,value:a?a[v]:v,index:w,offset:y}:null}).filter(fr)}},eL=q([At,_c,Tl,tg,Tw,Rc,Mw,Nw,Cn],$ae),Fae=(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 ct(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 ct(g)?{coordinate:g+c,value:d,index:p,offset:c}:null}).filter(fr):n.domain().map((d,p)=>{var g=n.map(d);return ct(g)?{coordinate:g+c,value:i?i[d]:d,index:p,offset:c}:null}).filter(fr)}},wl=q([At,_c,tg,Rc,Mw,Nw,Cn],Fae),Cl=q(tr,tg,(e,t)=>{if(!(e==null||t==null))return Mp(Mp({},e),{},{scale:t})}),Vae=q([tr,Tl,Iw,q2],Ew),Bae=q([Vae],ew);q((e,t,n)=>_w(e,n),Bae,(e,t)=>{if(!(e==null||t==null))return Mp(Mp({},e),{},{scale:t})});var zae=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}}),Wae=(e,t,n)=>{var r;return(r=e.renderedTicks[t])===null||r===void 0?void 0:r[n]};q([Wae],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 tL=e=>e.options.defaultTooltipEventType,nL=e=>e.options.validateTooltipEventTypes;function rL(e,t,n){if(e==null)return t;var r=e?"axis":"item";return n==null?t:n.includes(r)?r:t}function Dw(e,t){var n=tL(e),r=nL(e);return rL(t,n,r)}function Hae(e){return Le(t=>Dw(t,e))}var iL=(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},Uae=e=>e.tooltip.settings,Ko={active:!1,index:null,dataKey:void 0,graphicalItemId:void 0,coordinate:void 0},Gae={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}},oL=Wn({name:"tooltip",initialState:Gae,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:qae,replaceTooltipEntrySettings:Kae,removeTooltipEntrySettings:Yae,setTooltipSettingsState:Xae,setActiveMouseOverItemIndex:aL,mouseLeaveItem:Zae,mouseLeaveChart:sL,setActiveClickItemIndex:Qae,setMouseOverAxisIndex:lL,setMouseClickAxisIndex:Jae,setSyncInteraction:Db,setKeyboardInteraction:jp}=oL.actions,ese=oL.reducer;function ZP(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?ZP(Object(n),!0).forEach(function(r){tse(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ZP(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function tse(e,t,n){return(t=nse(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function nse(e){var t=rse(e,"string");return typeof t=="symbol"?t:t+""}function rse(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 ise(e,t,n){return t==="axis"?n==="click"?e.axisInteraction.click:e.axisInteraction.hover:n==="click"?e.itemInteraction.click:e.itemInteraction.hover}function ose(e){return e.index!=null}var uL=(e,t,n,r)=>{if(t==null)return Ko;var i=ise(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(ose(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 ase(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 sse(e,t){var n=ase(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 lse(e,t,n){if(n==null||t==null)return!0;var r=Mn(e,t);return r==null||!Ti(n)?!0:sse(r,n)}var jw=(e,t,n,r)=>{var i=e?.index;if(i==null)return null;var o=Number(i);if(!ct(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||lse(c,n,r)?String(u):null},cL=(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}}},fL=(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})},dL=e=>e.options.tooltipPayloadSearcher,kl=e=>e.tooltip;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 JP(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){use(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 use(e,t,n){return(t=cse(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function cse(e){var t=fse(e,"string");return typeof t=="symbol"?t:t+""}function fse(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 dse(e){if(typeof e=="string"||typeof e=="number")return e}function pse(e){if(typeof e=="string"||typeof e=="number"||typeof e=="boolean")return e}function hse(e){if(typeof e=="string"||typeof e=="number")return e;if(typeof e=="function")return t=>e(t)}function eA(e){if(typeof e=="string")return e}function gse(e){if(!(e==null||typeof e!="object")){var t="name"in e?dse(e.name):void 0,n="unit"in e?pse(e.unit):void 0,r="dataKey"in e?hse(e.dataKey):void 0,i="payload"in e?e.payload:void 0,o="color"in e?eA(e.color):void 0,a="fill"in e?eA(e.fill):void 0;return{name:t,unit:n,dataKey:r,payload:i,color:o,fill:a}}}function mse(e,t){return e??t}var pL=(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=mse(b,s),C=Array.isArray(w)?$D(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=NZ(C,r,i):P=o(C,t,u,_),Array.isArray(P))P.forEach(I=>{var k,B,L=gse(I),V=L?.name,D=L?.dataKey,H=L?.payload,J=JP(JP({},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(q_({tooltipEntrySettings:J,dataKey:D,payload:H,value:Mn(H,D),name:V==null?void 0:String(V)}))});else{var R;g.push(q_({tooltipEntrySettings:v,dataKey:E,payload:P,value:Mn(P,E),name:(R=Mn(P,_))!==null&&R!==void 0?R:v?.name}))}return g},p)}},Lw=q([gn,C2,qx],y2),vse=q([e=>e.graphicalItems.cartesianItems,e=>e.graphicalItems.polarItems],(e,t)=>[...e,...t]),yse=q([Sn,Al],S2),Nl=q([vse,gn,yse],E2,{memoizeOptions:{resultEqualityCheck:Kh}}),bse=q([Nl],e=>e.filter(Gh)),xse=q([Nl],P2,{memoizeOptions:{resultEqualityCheck:Kh}}),Ml=q([xse,Co],A2),wse=q([bse,Co,gn],$j),$w=q([Ml,gn,Nl],R2),hL=q([gn],Aw),Cse=q([gn],e=>e.allowDataOverflow),gL=q([hL,Cse],yj),Sse=q([Nl],e=>e.filter(Gh)),Ese=q([wse,Sse,Bh,Tj],T2),_se=q([Ese,Co,Sn,gL],k2),Ose=q([Nl],O2),Pse=q([Ml,gn,Ose,Rw,Sn],D2,{memoizeOptions:{resultEqualityCheck:qh}}),Ase=q([j2,Sn,Al],Il),Rse=q([Ase,Sn],F2),Ise=q([L2,Sn,Al],Il),Tse=q([Ise,Sn],V2),kse=q([$2,Sn,Al],Il),Nse=q([kse,Sn],B2),Mse=q([Rse,Nse,Tse],Dp),Dse=q([gn,hL,gL,_se,Pse,Mse,At,Sn],z2),Ic=q([gn,At,Ml,$w,Bh,Sn,Dse],W2),jse=q([Ic,gn,Lw],H2),Lse=q([gn,Ic,jse,Sn],U2),mL=e=>{var t=Sn(e),n=Al(e),r=!1;return Rc(e,t,n,r)},vL=q([gn,mL],zh),$se=q([gn,Lw,Lse,vL],Ew),yL=q([$se],ew),Fse=q([At,$w,gn,Sn],J2),Vse=q([At,$w,gn,Sn],K2),Bse=(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 ct(y)?{coordinate:y+p,value:g,index:h,offset:p}:null}).filter(fr):r.domain().map((g,h)=>{var y=r.map(g);return ct(y)?{coordinate:y+p,value:o?o[g]:g,index:h,offset:p}:null}).filter(fr)}}},Oo=q([At,gn,Lw,yL,mL,Fse,Vse,Sn],Bse),Fw=q([tL,nL,Uae],(e,t,n)=>rL(n.shared,e,t)),bL=e=>e.tooltip.settings.trigger,Vw=e=>e.tooltip.settings.defaultIndex,Tc=q([kl,Fw,bL,Vw],uL),Sl=q([Tc,Ml,Ac,Ic],jw),xL=q([Oo,Sl],iL),wL=q([Tc],e=>{if(e)return e.dataKey}),zse=q([Tc],e=>{if(e)return e.graphicalItemId}),CL=q([kl,Fw,bL,Vw],fL),Wse=q([xo,wo,At,wn,Oo,Vw,CL],cL),Hse=q([Tc,Wse],(e,t)=>e!=null&&e.coordinate?e.coordinate:t),Use=q([Tc],e=>{var t;return(t=e?.active)!==null&&t!==void 0?t:!1}),Gse=q([CL,Sl,Co,Ac,xL,dL,Fw],pL);q([Gse],e=>{if(e!=null){var t=e.map(n=>n.payload).filter(n=>n!=null);return Array.from(new Set(t))}});function tA(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 nA(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?tA(Object(n),!0).forEach(function(r){qse(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):tA(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function qse(e,t,n){return(t=Kse(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Kse(e){var t=Yse(e,"string");return typeof t=="symbol"?t:t+""}function Yse(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 Xse=()=>Le(gn),Zse=()=>{var e=Xse(),t=Le(Oo),n=Le(yL);return dp(!e||!n?void 0:nA(nA({},e),{},{scale:n}),t)};function rA(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?rA(Object(n),!0).forEach(function(r){Qse(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rA(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Qse(e,t,n){return(t=Jse(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Jse(e){var t=ele(e,"string");return typeof t=="symbol"?t:t+""}function ele(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 tle=(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}},nle=(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 rle(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 SL=(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},ile=()=>Le(qx),Bw=(e,t)=>t,EL=(e,t,n)=>n,zw=(e,t,n,r)=>r,ole=q(Oo,e=>Sh(e,t=>t.coordinate)),Ww=q([kl,Bw,EL,zw],uL),Hw=q([Ww,Ml,Ac,Ic],jw),ale=(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}},_L=q([kl,Bw,EL,zw],fL),Lp=q([xo,wo,At,wn,Oo,zw,_L],cL),sle=q([Ww,Lp],(e,t)=>{var n;return(n=e.coordinate)!==null&&n!==void 0?n:t}),OL=q([Oo,Hw],iL),lle=q([_L,Hw,Co,Ac,OL,dL,Bw],pL),ule=q([Ww,Hw],(e,t)=>({isActive:e.active&&t!=null,activeIndex:t})),cle=(e,t,n,r,i,o,a)=>{if(!(!e||!n||!r||!i)&&rle(e,a)){var s=ree(e,t),u=SL(s,o,i,n,r),c=tle(t,i,u,e);return{activeIndex:String(u),activeCoordinate:c}}},fle=(e,t,n,r,i,o,a)=>{if(!(!e||!r||!i||!o||!n)){var s=$ne(e,n);if(s){var u=iee(s,t),c=SL(u,a,o,r,i),d=nle(t,o,c,s);return{activeIndex:String(c),activeCoordinate:d}}}},dle=(e,t,n,r,i,o,a,s)=>{if(!(!e||!t||!r||!i||!o))return t==="horizontal"||t==="vertical"?cle(e,t,r,i,o,a,s):fle(e,t,n,r,i,o,a)},ple=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}}),hle=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:lre}});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 oA(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){gle(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 gle(e,t,n){return(t=mle(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function mle(e){var t=vle(e,"string");return typeof t=="symbol"?t:t+""}function vle(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 yle={},ble={zIndexMap:Object.values(Zn).reduce((e,t)=>oA(oA({},e),{},{[t]:{element:void 0,panoramaElement:void 0,consumers:0}}),yle)},xle=new Set(Object.values(Zn));function wle(e){return xle.has(e)}var PL=Wn({name:"zIndex",initialState:ble,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&&!wle(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:Cle,unregisterZIndexPortal:Sle,registerZIndexPortalElement:Ele,unregisterZIndexPortalElement:_le}=PL.actions,Ole=PL.reducer;function Po(e){var{zIndex:t,children:n}=e,r=Lee(),i=r&&t!==void 0&&t!==0,o=pr(),a=Ht();j.useLayoutEffect(()=>i?(a(Cle({zIndex:t})),()=>{a(Sle({zIndex:t}))}):ds,[a,t,i]);var s=Le(u=>ple(u,t,o));return i?s?Up.createPortal(n,s):null:n}function jb(){return jb=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},jb.apply(null,arguments)}function aA(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?aA(Object(n),!0).forEach(function(r){Ple(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):aA(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Ple(e,t,n){return(t=Ale(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ale(e){var t=Rle(e,"string");return typeof t=="symbol"?t:t+""}function Rle(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 Ile(e){var{cursor:t,cursorComp:n,cursorProps:r}=e;return j.isValidElement(t)?j.cloneElement(t,r):j.createElement(n,r)}function Tle(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=Qte,v=Zn.cursorLine;else if(d==="BarChart")y=Jte(s,p,o,a),b=fj,v=Zn.cursorRectangle;else if(s==="radial"&&GM(p)){var{cx:w,cy:C,radius:E,startAngle:_,endAngle:P}=dj(p);y={cx:w,cy:C,startAngle:_,endAngle:P,innerRadius:E,outerRadius:E},b=hj,v=Zn.cursorLine}else y={points:zne(s,p,o)},b=aj,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),wx(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(Ile,{cursor:u,cursorComp:b,cursorProps:I}))}function kle(e){var t=Zse(),n=GD(),r=_l(),i=ile();return t==null||n==null||r==null||i==null?null:x.createElement(Tle,jb({},e,{offset:n,layout:r,tooltipAxisBandSize:t,chartName:i}))}var AL=j.createContext(null),Nle=()=>j.useContext(AL),ly={exports:{}},sA;function Mle(){return sA||(sA=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 Dle=Mle();const jle=fs(Dle);var tc=new jle,Lb="recharts.syncEvent.tooltip",lA="recharts.syncEvent.brush",Lle=(e,t)=>{if(t&&Array.isArray(e)){var n=Number.parseInt(t,10);if(!Di(n))return e[n]}},$le={chartName:"",tooltipPayloadSearcher:()=>{},eventEmitter:void 0,defaultTooltipEventType:"axis"},RL=Wn({name:"options",initialState:$le,reducers:{createEventEmitter:e=>{e.eventEmitter==null&&(e.eventEmitter=Symbol("rechartsEventEmitter"))}}}),Fle=RL.reducer,{createEventEmitter:Vle}=RL.actions;function Ble(e){return e.tooltip.syncInteraction}var zle={chartData:void 0,computedData:void 0,dataStartIndex:0,dataEndIndex:0},IL=Wn({name:"chartData",initialState:zle,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:uA,setDataStartEndIndexes:Wle,setComputedData:dge}=IL.actions,Hle=IL.reducer,Ule=["x","y"];function cA(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?cA(Object(n),!0).forEach(function(r){Gle(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):cA(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Gle(e,t,n){return(t=qle(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function qle(e){var t=Kle(e,"string");return typeof t=="symbol"?t:t+""}function Kle(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 Yle(e,t){if(e==null)return{};var n,r,i=Xle(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 Xle(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 Zle(){var e=Le(Kx),t=Le(Yx),n=Ht(),r=Le(kj),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=Yle(h,Ule),{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(Db({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=Db({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(Lb,u),()=>{tc.off(Lb,u)}},[s,n,t,e,r,i,o,a])}function Qle(){var e=Le(Kx),t=Le(Yx),n=Ht();j.useEffect(()=>{if(e==null)return ds;var r=(i,o,a)=>{t!==a&&e===i&&n(Wle(o))};return tc.on(lA,r),()=>{tc.off(lA,r)}},[n,t,e])}function Jle(){var e=Ht();j.useEffect(()=>{e(Vle())},[e]),Zle(),Qle()}function eue(e,t,n,r,i,o){var a=Le(y=>ale(y,e,t)),s=Le(zse),u=Le(Yx),c=Le(Kx),d=Le(kj),p=Le(Ble),g=p?.active,h=jh();j.useEffect(()=>{if(!g&&c!=null&&u!=null){var y=Db({active:o,coordinate:n,dataKey:a,index:i,label:typeof r=="number"?String(r):r,sourceViewBox:h,graphicalItemId:s});tc.emit(Lb,c,y,u)}},[g,n,a,s,i,r,u,c,d,o,h])}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 dA(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){tue(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 tue(e,t,n){return(t=nue(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function nue(e){var t=rue(e,"string");return typeof t=="symbol"?t:t+""}function rue(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 iue(e){return e.dataKey}function oue(e,t){return x.isValidElement(e)?x.cloneElement(e,t):typeof e=="function"?x.createElement(e,t):x.createElement(Pte,t)}var pA=[],aue={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 sue(e){var t,n,r=Mr(e,aue),{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(Xae({shared:C,trigger:E,axisId:R,active:i,defaultIndex:k}))},[I,C,E,R,i,k]);var B=jh(),L=oj(),V=Hae(C),{activeIndex:D,isActive:H}=(t=Le(Fe=>ule(Fe,V,E,k)))!==null&&t!==void 0?t:{},J=Le(Fe=>lle(Fe,V,E,k)),te=Le(Fe=>OL(Fe,V,E,k)),G=Le(Fe=>sle(Fe,V,E,k)),ee=J,Q=Nle(),pe=(n=i??H)!==null&&n!==void 0?n:!1,[K,Ae]=RQ([ee,pe]),Se=V==="axis"?te:void 0;eue(V,E,G,Se,D,pe);var $e=P??Q;if($e==null||B==null||V==null)return null;var we=ee??pA;pe||(we=pA),c&&we.length&&(we=mQ(we.filter(Fe=>Fe.value!=null&&(Fe.hide!==!0||r.includeHidden)),g,iue));var Ce=we.length>0,ze=dA(dA({},r),{},{payload:we,label:Se,active:pe,activeIndex:D,coordinate:G,accessibilityLayer:L}),Ke=x.createElement($te,{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},oue(u,ze));return x.createElement(x.Fragment,null,Up.createPortal(Ke,$e),pe&&x.createElement(kle,{cursor:w,tooltipEventType:V,coordinate:G,payload:we,index:D}))}var TL=e=>null;TL.displayName="Cell";function lue(e,t,n){return(t=uue(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function uue(e){var t=cue(e,"string");return typeof t=="symbol"?t:t+""}function cue(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 fue{constructor(t){lue(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 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 due(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){pue(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 pue(e,t,n){return(t=hue(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function hue(e){var t=gue(e,"string");return typeof t=="symbol"?t:t+""}function gue(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 mue={cacheSize:2e3,enableCache:!0},kL=due({},mue),gA=new fue(kL.cacheSize),vue={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},mA="recharts_measurement_span";function yue(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 vA=(e,t)=>{try{var n=document.getElementById(mA);n||(n=document.createElement("span"),n.setAttribute("id",mA),n.setAttribute("aria-hidden","true"),document.body.appendChild(n)),Object.assign(n.style,vue,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(!kL.enableCache)return vA(t,n);var r=yue(t,n),i=gA.get(r);if(i)return i;var o=vA(t,n);return gA.set(r,o),o},NL;function bue(e,t,n){return(t=xue(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function xue(e){var t=wue(e,"string");return typeof t=="symbol"?t:t+""}function wue(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 yA=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,bA=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,Cue=/^(px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q)$/,Sue=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,Eue={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},_ue=["cm","mm","pt","pc","in","Q","px"];function Oue(e){return _ue.includes(e)}var rl="NaN";function Pue(e,t){return e*Eue[t]}class In{static parse(t){var n,[,r,i]=(n=Sue.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!==""&&!Cue.test(n)&&(this.num=NaN,this.unit=""),Oue(n)&&(this.num=Pue(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)}}NL=In;bue(In,"NaN",new NL(NaN,""));function ML(e){if(e==null||e.includes(rl))return rl;for(var t=e;t.includes("*")||t.includes("/");){var n,[,r,i,o]=(n=yA.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(yA,u.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var c,[,d,p,g]=(c=bA.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(bA,b.toString())}return t}var xA=/\(([^()]*)\)/;function Aue(e){for(var t=e,n;(n=xA.exec(t))!=null;){var[,r]=n;t=t.replace(xA,ML(r))}return t}function Rue(e){var t=e.replace(/\s+/g,"");return t=Aue(t),t=ML(t),t}function Iue(e){try{return Rue(e)}catch{return rl}}function uy(e){var t=Iue(e.slice(5,-1));return t===rl?"":t}var Tue=["x","y","lineHeight","capHeight","fill","scaleToFit","textAnchor","verticalAnchor"],kue=["dx","dy","angle","className","breakAll"];function $b(){return $b=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},$b.apply(null,arguments)}function wA(e,t){if(e==null)return{};var n,r,i=Nue(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 Nue(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 DL=/[ \f\n\r\t\v\u2028\u2029]+/,jL=e=>{var{children:t,breakAll:n,style:r}=e;try{var i=[];pn(t)||(n?i=t.toString().split(""):i=t.toString().split(DL));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 LL(e){return e==="start"||e==="middle"||e==="end"||e==="inherit"}function Mue(e){return pn(e)||typeof e=="string"||typeof e=="number"||typeof e=="boolean"}var $L=(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},[]),FL=e=>e.reduce((t,n)=>t.width>n.width?t:n),Due="…",CA=(e,t,n,r,i,o,a,s)=>{var u=e.slice(0,t),c=jL({breakAll:n,style:r,children:u+Due});if(!c)return[!1,[]];var d=$L(c.wordsWithComputedWidth,o,a,s),p=d.length>i||FL(d).width>Number(o);return[p,d]},jue=(e,t,n,r,i)=>{var{maxLines:o,children:a,style:s,breakAll:u}=e,c=Te(o),d=String(a),p=$L(t,r,n,i);if(!c||i)return p;var g=p.length>o||FL(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,_]=CA(d,C,u,s,o,r,n,i),[P]=CA(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},SA=e=>{var t=pn(e)?[]:e.toString().split(DL);return[{words:t,width:void 0}]},Lue=e=>{var{width:t,scaleToFit:n,children:r,style:i,breakAll:o,maxLines:a}=e;if((t||n)&&!xc.isSsr){var s,u,c=jL({breakAll:o,children:r,style:i});if(c){var{wordsWithComputedWidth:d,spaceWidth:p}=c;s=d,u=p}else return SA(r);return jue({breakAll:o,children:r,maxLines:a,style:i},s,u,t,!!n)}return SA(r)},VL="#808080",$ue={angle:0,breakAll:!1,capHeight:"0.71em",fill:VL,lineHeight:"1em",scaleToFit:!1,textAnchor:"start",verticalAnchor:"end",x:0,y:0},Uw=j.forwardRef((e,t)=>{var n=Mr(e,$ue),{x:r,y:i,lineHeight:o,capHeight:a,fill:s,scaleToFit:u,textAnchor:c,verticalAnchor:d}=n,p=wA(n,Tue),g=j.useMemo(()=>Lue({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=wA(p,kue);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(!ct(E)||!ct(_))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",$b({},ti(C),{ref:t,x:E,y:_,className:Pt("recharts-text",v),textAnchor:c,fill:s.includes("url")?VL: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)}))});Uw.displayName="Text";function EA(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?EA(Object(n),!0).forEach(function(r){Fue(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):EA(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Fue(e,t,n){return(t=Vue(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Vue(e){var t=Bue(e,"string");return typeof t=="symbol"?t:t+""}function Bue(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 zue=e=>{var{viewBox:t,position:n,offset:r=0,parentViewBox:i}=e,{x:o,y:a,height:s,upperWidth:u,lowerWidth:c}=Fx(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)},Wue=["labelRef"],Hue=["content"];function _A(e,t){if(e==null)return{};var n,r,i=Uue(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 Uue(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 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 Pu(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){Gue(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 Gue(e,t,n){return(t=que(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function que(e){var t=Kue(e,"string");return typeof t=="symbol"?t:t+""}function Kue(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 BL=j.createContext(null),Yue=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(BL.Provider,{value:u},s)},zL=()=>{var e=j.useContext(BL),t=jh();return e||(t?Fx(t):void 0)},Xue=j.createContext(null),Zue=()=>{var e=j.useContext(Xue),t=Le(Lj);return e||t},Que=e=>{var{value:t,formatter:n}=e,r=pn(e.children)?t:e.children;return typeof n=="function"?n(r):r},Gw=e=>e!=null&&typeof e=="function",Jue=(e,t)=>{var n=cr(t-e),r=Math.min(Math.abs(t-e),360);return n*r},ece=(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=Jue(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
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))},Jue=(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),ece={angle:0,offset:5,zIndex:Zn.label,position:"middle",textBreakAll:!1};function tce(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,ece),{viewBox:n,parentViewBox:r,position:i,value:o,children:a,content:s,className:u="",textBreakAll:c,labelRef:d}=t,p=Yue(),g=zL(),h=i==="center"?g:p??g,y,b,v;n==null?y=h:Rd(n)?y=n:y=Fx(n);var w=tce(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,_=_A(C,Bue);return j.cloneElement(s,_)}if(typeof s=="function"){var{content:P}=C,R=_A(C,zue);if(b=j.createElement(s,R),j.isValidElement(b))return b}else b=Xue(t);var I=ti(t);if(Rd(y)){if(i==="insideStart"||i==="insideEnd"||i==="end")return Que(t,i,b,I,y);v=Jue(y,t.offset,t.position)}else{if(!w)return null;var k=Vue({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(Uw,no({ref:d,className:Pt("recharts-label",u)},I,v,{textAnchor:LL(I.textAnchor)?I.textAnchor:v.textAnchor,breakAll:c}),b))}qo.displayName="Label";var nce=(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)):Gw(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 rce(e){var{label:t,labelRef:n}=e,r=zL();return nce(t,r,n)||null}var ice=["valueAccessor"],oce=["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 PA(e,t){if(e==null)return{};var n,r,i=ace(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 ace(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 sce=e=>{var t=Array.isArray(e.value)?e.value[e.value.length-1]:e.value;if(kue(t))return t},WL=j.createContext(void 0),lce=WL.Provider,HL=j.createContext(void 0);HL.Provider;function uce(){return j.useContext(WL)}function cce(){return j.useContext(HL)}function Id(e){var{valueAccessor:t=sce}=e,n=PA(e,ice),{dataKey:r,clockWise:i,id:o,textBreakAll:a,zIndex:s}=n,u=PA(n,oce),c=uce(),d=cce(),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 fce(e){var{label:t}=e;return t?t===!0?x.createElement(Id,{key:"labelList-implicit"}):x.isValidElement(t)||Gw(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 dce={radiusAxis:{},angleAxis:{}},UL=Wn({name:"polarAxis",initialState:dce,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}=UL.actions,pce=UL.reducer;function hce(e){return e&&typeof e=="object"&&"className"in e&&typeof e.className=="string"?e.className:""}var yd={exports:{}},St={};var AA;function gce(){if(AA)return St;AA=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 RA;function mce(){return RA||(RA=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 IA;function vce(){return IA||(IA=1,process.env.NODE_ENV==="production"?yd.exports=gce():yd.exports=mce()),yd.exports}var yce=vce(),TA=e=>typeof e=="string"?e:e?e.displayName||e.name||"Component":"",kA=null,cy=null,GL=e=>{if(e===kA&&Array.isArray(cy))return cy;var t=[];return j.Children.forEach(e,n=>{pn(n)||(yce.isFragment(n)?t=t.concat(GL(n.props.children)):t.push(n))}),cy=t,kA=e,t};function bce(e,t){var n=[],r=[];return Array.isArray(t)?r=t.map(i=>TA(i)):r=[TA(t)],GL(e).forEach(i=>{var o=gl(i,"type.displayName")||gl(i,"type.name");o&&r.indexOf(o)!==-1&&n.push(i)}),n}var fy={},NA;function xce(){return NA||(NA=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,MA;function wce(){return MA||(MA=1,dy=xce().isPlainObject),dy}var Cce=wce();const Sce=fs(Cce);var DA,jA,LA,$A,FA;function VA(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 BA(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?VA(Object(n),!0).forEach(function(r){Ece(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):VA(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Ece(e,t,n){return(t=_ce(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _ce(e){var t=Oce(e,"string");return typeof t=="symbol"?t:t+""}function Oce(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 zA=(e,t,n,r,i)=>{var o=n-r,a;return a=qt(DA||(DA=bu(["M ",",",""])),e,t),a+=qt(jA||(jA=bu(["L ",",",""])),e+n,t),a+=qt(LA||(LA=bu(["L ",",",""])),e+n-o/2,t+i),a+=qt($A||($A=bu(["L ",",",""])),e+n-o/2-r,t+i),a+=qt(FA||(FA=bu(["L ",","," Z"])),e,t),a},Pce={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},Ace=e=>{var t=Mr(e,Pce),{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),_=Wx(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:zA(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=sj(["strokeDasharray"],c,u);return x.createElement(zx,{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:zA(Q,pe,te,G,ee),ref:g,style:BA(BA({},K),t.style)}))})},Rce=["option","shapeType","activeClassName","inActiveClassName"];function Ice(e,t){if(e==null)return{};var n,r,i=Tce(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 Tce(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 WA(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?WA(Object(n),!0).forEach(function(r){kce(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):WA(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function kce(e,t,n){return(t=Nce(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Nce(e){var t=Mce(e,"string");return typeof t=="symbol"?t:t+""}function Mce(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 Dce(e,t){return Vp(Vp({},t),e)}function jce(e,t){return e==="symbols"}function HA(e){var{shapeType:t,elementProps:n}=e;switch(t){case"rectangle":return x.createElement(fj,n);case"trapezoid":return x.createElement(Ace,n);case"sector":return x.createElement(hj,n);case"symbols":if(jce(t))return x.createElement(UM,n);break;case"curve":return x.createElement(aj,n);default:return null}}function Lce(e){return j.isValidElement(e)?e.props:e}function $ce(e){var{option:t,shapeType:n,activeClassName:r="recharts-active-shape",inActiveClassName:i="recharts-shape"}=e,o=Ice(e,Rce),a;if(j.isValidElement(t))a=j.cloneElement(t,Vp(Vp({},o),Lce(t)));else if(typeof t=="function")a=t(o,o.index);else if(Sce(t)&&typeof t!="boolean"){var s=Dce(t,o);a=x.createElement(HA,{shapeType:n,elementProps:s})}else{var u=o;a=x.createElement(HA,{shapeType:n,elementProps:u})}return o.isActive?x.createElement(Mi,{className:r},a):x.createElement(Mi,{className:i},a)}var qL=(e,t,n)=>{var r=Ht();return(i,o)=>a=>{e?.(i,o,a),r(aL({activeIndex:String(o),activeDataKey:t,activeCoordinate:i.tooltipPosition,activeGraphicalItemId:n}))}},KL=e=>{var t=Ht();return(n,r)=>i=>{e?.(n,r,i),t(Yae())}},YL=(e,t,n)=>{var r=Ht();return(i,o)=>a=>{e?.(i,o,a),r(Xae({activeIndex:String(o),activeDataKey:t,activeCoordinate:i.tooltipPosition,activeGraphicalItemId:n}))}};function Fce(e){var{tooltipEntrySettings:t}=e,n=Ht(),r=pr(),i=j.useRef(null);return j.useLayoutEffect(()=>{r||(i.current===null?n(Uae(t)):i.current!==t&&n(Gae({prev:i.current,next:t})),i.current=t)},[t,n,r]),j.useLayoutEffect(()=>()=>{i.current&&(n(qae(i.current)),i.current=null)},[n]),null}function Vce(e){var{legendPayload:t}=e,n=Ht(),r=pr(),i=j.useRef(null);return j.useLayoutEffect(()=>{r||(i.current===null?n(Yee(t)):i.current!==t&&n(Xee({prev:i.current,next:t})),i.current=t)},[n,r,t]),j.useLayoutEffect(()=>()=>{i.current&&(n(Zee(i.current)),i.current=null)},[n]),null}var py,Bce=()=>{var[e]=x.useState(()=>zu("uid-"));return e},zce=(py=x.useId)!==null&&py!==void 0?py:Bce;function Wce(e,t){var n=zce();return t||(e?"".concat(e,"-").concat(n):n)}var Hce=j.createContext(void 0),Uce=e=>{var{id:t,type:n,children:r}=e,i=Wce("recharts-".concat(n),t);return x.createElement(Hce.Provider,{value:i},r(i))},Gce={cartesianItems:[],polarItems:[]},XL=Wn({name:"graphicalItems",initialState:Gce,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:qce,replaceCartesianGraphicalItem:Kce,removeCartesianGraphicalItem:Yce,addPolarGraphicalItem:gge,removePolarGraphicalItem:mge,replacePolarGraphicalItem:vge}=XL.actions,Xce=XL.reducer,Zce=e=>{var t=Ht(),n=j.useRef(null);return j.useLayoutEffect(()=>{n.current===null?t(qce(e)):n.current!==e&&t(Kce({prev:n.current,next:e})),n.current=e},[t,e]),j.useLayoutEffect(()=>()=>{n.current&&(t(Yce(n.current)),n.current=null)},[t]),null},Qce=j.memo(Zce);function UA(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 GA(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?UA(Object(n),!0).forEach(function(r){Jce(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):UA(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Jce(e,t,n){return(t=efe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function efe(e){var t=tfe(e,"string");return typeof t=="symbol"?t:t+""}function tfe(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 ZL=0,nfe={xAxis:{},yAxis:{},zAxis:{}},QL=Wn({name:"cartesianAxis",initialState:nfe,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]=GA(GA({},i),{},{width:r,widthHistory:s})}}}}),{addXAxis:rfe,replaceXAxis:ife,removeXAxis:ofe,addYAxis:afe,replaceYAxis:sfe,removeYAxis:lfe,addZAxis:yge,replaceZAxis:bge,removeZAxis:xge,updateYAxisWidth:ufe}=QL.actions,cfe=QL.reducer,ffe=q([wn],e=>({top:e.top,bottom:e.bottom,left:e.left,right:e.right})),dfe=q([ffe,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)}}),JL=()=>Le(dfe),qA=(e,t,n)=>{var r=n??e;if(!pn(r))return fi(r,t,0)},pfe=(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=qA(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=qA(t,n,c.barSize);return{stackId:void 0,dataKeys:d,barSize:p}});return[...s,...u]};function KA(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?KA(Object(n),!0).forEach(function(r){hfe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):KA(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function hfe(e,t,n){return(t=gfe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function gfe(e){var t=mfe(e,"string");return typeof t=="symbol"?t:t+""}function mfe(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 vfe(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 yfe=(e,t,n,r,i,o,a)=>{var s=pn(a)?t:a,u=vfe(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},bfe=(e,t)=>{var n=Jx(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)}}}},xfe=(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 wfe(e,t){return e&&typeof e=="object"&&"zIndex"in e&&typeof e.zIndex=="number"&&ut(e.zIndex)?e.zIndex:t}var Cfe=e=>{var{chartData:t}=e,n=Ht(),r=pr();return j.useEffect(()=>r?()=>{}:(n(uA(t)),()=>{n(uA(void 0))}),[t,n,r]),null},YA={x:0,y:0,width:0,height:0,padding:{top:0,right:0,bottom:0,left:0}},e$=Wn({name:"brush",initialState:YA,reducers:{setBrushSettings(e,t){return t.payload==null?YA:t.payload}}}),{setBrushSettings:wge}=e$.actions,Sfe=e$.reducer;function Efe(e){return(e%180+180)%180}var _fe=function(t){var{width:n,height:r}=t,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,o=Efe(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)},Ofe={dots:[],areas:[],lines:[]},t$=Wn({name:"referenceElements",initialState:Ofe,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}=t$.actions,Pfe=t$.reducer,Afe=j.createContext(void 0),Rfe=e=>{var{children:t}=e,[n]=j.useState("".concat(zu("recharts"),"-clip")),r=JL();if(r==null)return null;var{x:i,y:o,width:a,height:s}=r;return x.createElement(Afe.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 n$(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 Ife(e,t,n){var r={width:e.width+t.width,height:e.height+t.height};return _fe(r,n)}function Tfe(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 kfe(e,t){return n$(e,t+1)}function Nfe(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:n$(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 Mfe(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 XA(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?XA(Object(n),!0).forEach(function(r){Dfe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):XA(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Dfe(e,t,n){return(t=jfe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function jfe(e){var t=Lfe(e,"string");return typeof t=="symbol"?t:t+""}function Lfe(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 $fe(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 Ffe(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 qw(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=kfe(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"?Ife(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,_=Tfe(o,E,y);return u==="equidistantPreserveStart"?Nfe(E,_,v,i,a):u==="equidistantPreserveEnd"?Mfe(E,_,v,i,a):(u==="preserveStart"||u==="preserveStartEnd"?h=Ffe(E,_,v,i,a,u==="preserveStartEnd"):h=$fe(E,_,v,i,a),h.filter(P=>P.isShow))}var Vfe=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},Bfe={xAxis:{},yAxis:{}},r$=Wn({name:"renderedTicks",initialState:Bfe,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:zfe,removeRenderedTicks:Wfe}=r$.actions,Hfe=r$.reducer,Ufe=["axisLine","width","height","className","hide","ticks","axisType","axisId"];function Gfe(e,t){if(e==null)return{};var n,r,i=qfe(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 qfe(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 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 Gt(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){Kfe(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 Kfe(e,t,n){return(t=Yfe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Yfe(e){var t=Xfe(e,"string");return typeof t=="symbol"?t:t+""}function Xfe(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 Zfe(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 Qfe(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 Jfe(e,t){switch(e){case"left":return t?"start":"end";case"right":return t?"end":"start";default:return"middle"}}function ede(e,t){switch(e){case"left":case"right":return"middle";case"top":return t?"start":"end";default:return t?"end":"start"}}function tde(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,hce(t))),i=x.createElement(Uw,ss({},n,{className:a}),r)}return i}function nde(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(zfe({ticks:o,axisId:r,axisType:n})),()=>{i(Wfe({axisId:r,axisType:n}))}},[i,t,r,n]),null}var rde=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=qw(Gt(Gt({},_),{},{ticks:n}),C,E),B=fo(_),L=wx(r),V=LL(B.textAnchor)?B.textAnchor:Jfe(d,p),D=ede(d,p),H={};typeof i=="object"&&(H=i);var J=Gt(Gt({},B),{},{fill:"none"},H),te=k.map(Q=>Gt({entry:Q},Qfe(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)},Ax(P,Se,pe)),r&&x.createElement(tde,{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(nde,{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))}),ide=j.forwardRef((e,t)=>{var{axisLine:n,width:r,height:i,className:o,hide:a,ticks:s,axisType:u,axisId:c}=e,d=Gfe(e,Ufe),[p,g]=j.useState(""),[h,y]=j.useState(""),b=j.useRef(null);j.useImperativeHandle(t,()=>({getCalculatedWidth:()=>{var w;return Vfe({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(Zfe,{x:e.x,y:e.y,width:r,height:i,orientation:e.orientation,mirror:e.mirror,axisLine:n,otherSvgProps:fo(e)}),x.createElement(rde,{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(que,{x:e.x,y:e.y,width:e.width,height:e.height,lowerWidth:e.width,upperWidth:e.width},x.createElement(rce,{label:e.label,labelRef:e.labelRef}),e.children)))}),Kw=x.forwardRef((e,t)=>{var n=Mr(e,lo);return x.createElement(ide,ss({},n,{ref:t}))});Kw.displayName="CartesianAxis";var ode=["x1","y1","x2","y2","key"],ade=["offset"],sde=["xAxisId","yAxisId"],lde=["xAxisId","yAxisId"];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 zn(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){ude(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 ude(e,t,n){return(t=cde(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function cde(e){var t=fde(e,"string");return typeof t=="symbol"?t:t+""}function fde(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=dde(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 dde(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=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 i$(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,ode),p=(i=fo(d))!==null&&i!==void 0?i:{},{offset:g}=p,h=Bp(p,ade);r=x.createElement("line",Ua({},h,{x1:o,y1:a,x2:s,y2:u,fill:"none",key:c}))}return r}function hde(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,sde),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(i$,{key:"line-".concat(d),option:r,lineItemProps:p})});return x.createElement("g",{className:"recharts-cartesian-grid-horizontal"},u)}function gde(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,lde),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(i$,{option:r,lineItemProps:p,key:"line-".concat(d)})});return x.createElement("g",{className:"recharts-cartesian-grid-vertical"},u)}function mde(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 vde(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 yde=(e,t)=>{var{xAxis:n,width:r,height:i,offset:o}=e;return FD(qw(zn(zn(zn({},lo),n),{},{ticks:VD(n),viewBox:{x:0,y:0,width:r,height:i}})),o.left,o.left+o.width,t)},bde=(e,t)=>{var{yAxis:n,width:r,height:i,offset:o}=e;return FD(qw(zn(zn(zn({},lo),n),{},{ticks:VD(n),viewBox:{x:0,y:0,width:r,height:i}})),o.top,o.top+o.height,t)},xde={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[],xAxisId:0,yAxisId:0,syncWithTicks:!1,zIndex:Zn.grid};function o$(e){var t=qD(),n=KD(),r=GD(),i=zn(zn({},Mr(e,xde)),{},{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=>XP(B,"xAxis",o,y)),v=Le(B=>XP(B,"yAxis",a,y));if(!Li(c)||!Li(d)||!Te(s)||!Te(u))return null;var w=i.verticalCoordinatesGenerator||yde,C=i.horizontalCoordinatesGenerator||bde,{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(pde,{fill:i.fill,fillOpacity:i.fillOpacity,x:i.x,y:i.y,width:i.width,height:i.height,ry:i.ry}),x.createElement(mde,Ua({},i,{horizontalPoints:E})),x.createElement(vde,Ua({},i,{verticalPoints:_})),x.createElement(hde,Ua({},i,{offset:r,horizontalPoints:E,xAxis:b,yAxis:v})),x.createElement(gde,Ua({},i,{offset:r,verticalPoints:_,xAxis:b,yAxis:v}))))}o$.displayName="CartesianGrid";var wde={},a$=Wn({name:"errorBars",initialState:wde,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}=a$.actions,Cde=a$.reducer,Sde=["children"];function Ede(e,t){if(e==null)return{};var n,r,i=_de(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 _de(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 Ode={data:[],xAxisId:"xAxis-0",yAxisId:"yAxis-0",dataPointFormatter:()=>({x:0,y:0,value:0}),errorBarOffset:0},Pde=j.createContext(Ode);function Ade(e){var{children:t}=e,n=Ede(e,Sde);return x.createElement(Pde.Provider,{value:n},t)}function s$(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 Rde(e){var{xAxisId:t,yAxisId:n,clipPathId:r}=e,i=JL(),{needClipX:o,needClipY:a,needClip:s}=s$(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:ZL}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:ZL}var Ide=process.env.NODE_ENV==="production",hy="Invariant failed";function Tde(e,t){if(Ide)throw new Error(hy);var n=typeof t=="function"?t():t,r=n?"".concat(hy,": ").concat(n):hy;throw new Error(r)}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 Yw(e){return x.createElement($ce,Fb({shapeType:"rectangle",activeClassName:"recharts-active-bar",inActiveClassName:"recharts-inactive-bar"},e))}var kde=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||Tde(!1,"minPointSize callback function received a value with type of ".concat(typeof r,". Currently only numbers or null/undefined are supported.")),n)}},Nde=(e,t,n)=>n,Mde=(e,t)=>t,kc=q([Ow,Mde],(e,t)=>e.filter(n=>n.type==="bar").find(n=>n.id===t)),Dde=q([kc],e=>e?.maxBarSize),jde=(e,t,n,r)=>r,Lde=q([At,Ow,gs,ms,Nde],(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")),$de=(e,t,n)=>{var r=At(e),i=gs(e,t),o=ms(e,t);if(!(i==null||o==null))return r==="horizontal"?Mb(e,"yAxis",o,n):Mb(e,"xAxis",i,n)},Fde=(e,t)=>{var n=At(e),r=gs(e,t),i=ms(e,t);if(!(r==null||i==null))return n==="horizontal"?YP(e,"xAxis",r):YP(e,"yAxis",i)},Vde=q([Lde,Jne,Fde],pfe),Bde=(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=Rj(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},l$=(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)}},zde=q([Vde,Rj,Qne,Ij,Bde,l$,Dde],yfe),Wde=(e,t,n)=>{var r=gs(e,t);if(r!=null)return Cl(e,"xAxis",r,n)},Hde=(e,t,n)=>{var r=ms(e,t);if(r!=null)return Cl(e,"yAxis",r,n)},Ude=(e,t,n)=>{var r=gs(e,t);if(r!=null)return wl(e,"xAxis",r,n)},Gde=(e,t,n)=>{var r=ms(e,t);if(r!=null)return wl(e,"yAxis",r,n)},qde=q([zde,kc],xfe),Kde=q([$de,kc],bfe),Yde=q([wn,Lx,Wde,Hde,Ude,Gde,qde,At,Gne,l$,Kde,kc,jde],(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 Spe({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})}}),Xde=["index"];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 Zde(e,t){if(e==null)return{};var n,r,i=Qde(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 Qde(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 u$=j.createContext(void 0),Jde=e=>{var t=j.useContext(u$);if(t!=null)return t.stackId;if(e!=null)return XJ(e)},epe=(e,t)=>"recharts-bar-stack-clip-path-".concat(e,"-").concat(t),tpe=e=>{var t=j.useContext(u$);if(t!=null){var{stackId:n}=t;return"url(#".concat(epe(n,e),")")}},c$=e=>{var{index:t}=e,n=Zde(e,Xde),r=tpe(t);return x.createElement(Mi,Vb({className:"recharts-bar-stack-layer",clipPath:r},n))},npe=["onMouseEnter","onMouseLeave","onClick"],rpe=["value","background","tooltipPosition"],ipe=["id"],ope=["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 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 Yn(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){ape(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 ape(e,t,n){return(t=spe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function spe(e){var t=lpe(e,"string");return typeof t=="symbol"?t:t+""}function lpe(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=upe(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 upe(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 cpe=e=>{var{dataKey:t,name:n,fill:r,legendType:i,hide:o}=e;return[{inactive:o,dataKey:t,type:i,color:r,value:BD(n,t),payload:e}]},fpe=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:BD(o,t),hide:a,type:u,color:i,unit:s,graphicalItemId:c}};return x.createElement(Fce,{tooltipEntrySettings:d})});function dpe(e){var t=Le(Sl),{data:n,dataKey:r,background:i,allOtherBarProps:o}=e,{onMouseEnter:a,onMouseLeave:s,onClick:u}=o,c=zp(o,npe),d=qL(a,r,o.id),p=KL(s),g=YL(u,r,o.id);if(!i||n==null)return null;var h=wx(i);return x.createElement(Po,{zIndex:wfe(i,Zn.barBackground)},n.map((y,b)=>{var{value:v,background:w,tooltipPosition:C}=y,E=zp(y,rpe);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),Ax(c,y,b)),{},{onMouseEnter:_,onMouseLeave:P,onClick:R,dataKey:r,index:b,className:"recharts-bar-background-rectangle"});return x.createElement(Yw,sa({key:"background-bar-".concat(b)},I))}))}function ppe(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(lce,{value:t?i:void 0},n)}function hpe(e){var{shape:t,activeBar:n,baseProps:r,entry:i,index:o,dataKey:a}=e,s=Le(Sl),u=Le(wL),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(Yw,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(c$,{index:i.originalDataIndex},C)):C}function gpe(e){var{shape:t,baseProps:n,entry:r,index:i,dataKey:o}=e;return x.createElement(Yw,sa({},n,{name:String(n.name)},r,{isActive:!1,option:t,index:i,dataKey:o}))}function mpe(e){var t,{data:n,props:r}=e,i=(t=fo(r))!==null&&t!==void 0?t:{},{id:o}=i,a=zp(i,ipe),{shape:s,dataKey:u,activeBar:c}=r,{onMouseEnter:d,onClick:p,onMouseLeave:g}=r,h=zp(r,ope),y=qL(d,u,o),b=KL(g),v=YL(p,u,o);return n?x.createElement(x.Fragment,null,n.map((w,C)=>x.createElement(c$,sa({index:w.originalDataIndex,key:"rectangle-".concat(w?.x,"-").concat(w?.y,"-").concat(w?.value,"-").concat(C),className:"recharts-bar-rectangle"},Ax(h,w,C),{onMouseEnter:y(w,C),onMouseLeave:b(w,C),onClick:v(w,C)}),c?x.createElement(hpe,{shape:s,activeBar:c,baseProps:a,entry:w,index:C,dataKey:u}):x.createElement(gpe,{shape:s,baseProps:a,entry:w,index:C,dataKey:u})))):null}function vpe(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=Wx(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(ppe,{showLabels:b,rects:r},x.createElement(zx,{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(mpe,{props:t,data:E}))}),x.createElement(fce,{label:t.label}),t.children)}function ype(e){var t=j.useRef(null);return x.createElement(vpe,{previousRectanglesRef:t,props:e})}var f$=0,bpe=(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 xpe 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(Rde,{clipPathId:p,xAxisId:o,yAxisId:a})),x.createElement(Mi,{className:"recharts-bar-rectangles",clipPath:s?"url(#clipPath-".concat(p,")"):void 0},x.createElement(dpe,{data:n,dataKey:r,background:u,allOtherBarProps:this.props}),x.createElement(ype,this.props)))}}var wpe={activeBar:!1,animationBegin:0,animationDuration:400,animationEasing:"ease",background:!1,hide:!1,isAnimationActive:"auto",label:!1,legendType:"rect",minPointSize:f$,xAxisId:0,yAxisId:0,zIndex:Zn.bar};function Cpe(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}=s$(t,n),g=_l(),h=pr(),y=bce(e.children,TL),b=Le(C=>Yde(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(Ade,{xAxisId:t,yAxisId:n,data:b,dataPointFormatter:bpe,errorBarOffset:v},x.createElement(xpe,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 Spe(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=ZJ({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=UJ(H,C)}else I=Mn(P,n),Array.isArray(I)||(I=[E,I]);var J=kde(r,f$)(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=H_({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=H_({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 Epe(e){var t=Mr(e,wpe),n=Jde(t.stackId),r=pr();return x.createElement(Uce,{id:t.id,type:"bar"},i=>x.createElement(x.Fragment,null,x.createElement(Vce,{legendPayload:cpe(t)}),x.createElement(fpe,{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(Qce,{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(Cpe,sa({},t,{id:i})))))}var d$=x.memo(Epe,Vh);d$.displayName="Bar";var _pe=["domain","range"],Ope=["domain","range"];function eR(e,t){if(e==null)return{};var n,r,i=Ppe(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 Ppe(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 tR(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 p$(e,t){if(e===t)return!0;var{domain:n,range:r}=e,i=eR(e,_pe),{domain:o,range:a}=t,s=eR(t,Ope);return!tR(n,o)||!tR(r,a)?!1:Vh(i,s)}var Ape=["type"],Rpe=["dangerouslySetInnerHTML","ticks","scale"],Ipe=["id","scale"];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 nR(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 rR(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?nR(Object(n),!0).forEach(function(r){Tpe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):nR(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Tpe(e,t,n){return(t=kpe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function kpe(e){var t=Npe(e,"string");return typeof t=="symbol"?t:t+""}function Npe(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 zb(e,t){if(e==null)return{};var n,r,i=Mpe(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 Mpe(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 Dpe(e){var t=Ht(),n=j.useRef(null),r=YD(),{type:i}=e,o=zb(e,Ape),a=Wh(r,"xAxis",i),s=j.useMemo(()=>{if(a!=null)return rR(rR({},o),{},{type:a})},[o,a]);return j.useLayoutEffect(()=>{s!=null&&(n.current===null?t(rfe(s)):n.current!==s&&t(ife({prev:n.current,next:s})),n.current=s)},[s,t]),j.useLayoutEffect(()=>()=>{n.current&&(t(ofe(n.current)),n.current=null)},[t]),null}var jpe=e=>{var{xAxisId:t,className:n}=e,r=Le(Lx),i=pr(),o="xAxis",a=Le(w=>eL(w,o,t,i)),s=Le(w=>Z2(w,t)),u=Le(w=>Nae(w,t)),c=Le(w=>x2(w,t));if(s==null||u==null||c==null)return null;var{dangerouslySetInnerHTML:d,ticks:p,scale:g}=e,h=zb(e,Rpe),{id:y,scale:b}=c,v=zb(c,Ipe);return x.createElement(Kw,Bb({},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}))},Lpe={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},$pe=e=>{var t=Mr(e,Lpe);return x.createElement(x.Fragment,null,x.createElement(Dpe,{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(jpe,t))},h$=x.memo($pe,p$);h$.displayName="XAxis";var Fpe=["type"],Vpe=["dangerouslySetInnerHTML","ticks","scale"],Bpe=["id","scale"];function Wb(){return Wb=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},Wb.apply(null,arguments)}function iR(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 oR(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?iR(Object(n),!0).forEach(function(r){zpe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):iR(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function zpe(e,t,n){return(t=Wpe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Wpe(e){var t=Hpe(e,"string");return typeof t=="symbol"?t:t+""}function Hpe(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 Hb(e,t){if(e==null)return{};var n,r,i=Upe(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 Upe(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 Gpe(e){var t=Ht(),n=j.useRef(null),r=YD(),{type:i}=e,o=Hb(e,Fpe),a=Wh(r,"yAxis",i),s=j.useMemo(()=>{if(a!=null)return oR(oR({},o),{},{type:a})},[a,o]);return j.useLayoutEffect(()=>{s!=null&&(n.current===null?t(afe(s)):n.current!==s&&t(sfe({prev:n.current,next:s})),n.current=s)},[s,t]),j.useLayoutEffect(()=>()=>{n.current&&(t(lfe(n.current)),n.current=null)},[t]),null}function qpe(e){var{yAxisId:t,className:n,width:r,label:i}=e,o=j.useRef(null),a=j.useRef(null),s=Le(Lx),u=pr(),c=Ht(),d="yAxis",p=Le(R=>Q2(R,t)),g=Le(R=>Dae(R,t)),h=Le(R=>eL(R,d,t,u)),y=Le(R=>w2(R,t));if(j.useLayoutEffect(()=>{if(!(r!=="auto"||!p||Gw(i)||j.isValidElement(i)||y==null)){var R=o.current;if(R){var I=R.getCalculatedWidth();Math.round(p.width)!==Math.round(I)&&c(ufe({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=Hb(e,Vpe),{id:E,scale:_}=y,P=Hb(y,Bpe);return x.createElement(Kw,Wb({},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 Kpe={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},Ype=e=>{var t=Mr(e,Kpe);return x.createElement(x.Fragment,null,x.createElement(Gpe,{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(qpe,t))},g$=x.memo(Ype,p$);g$.displayName="YAxis";var Xpe=(e,t)=>t,Xw=q([Xpe,At,Lj,Sn,vL,Oo,rle,wn],cle);function Zpe(e){return"getBBox"in e.currentTarget&&typeof e.currentTarget.getBBox=="function"}function Zw(e){var t=e.currentTarget.getBoundingClientRect(),n,r;if(Zpe(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 m$=Tr("mouseClick"),v$=mc();v$.startListening({actionCreator:m$,effect:(e,t)=>{var n=e.payload,r=Xw(t.getState(),Zw(n));r?.activeIndex!=null&&t.dispatch(Zae({activeIndex:r.activeIndex,activeDataKey:void 0,activeCoordinate:r.activeCoordinate}))}});var Ub=Tr("mouseMove"),y$=mc(),Zs=null,Da=null,gy=null;y$.startListening({actionCreator:Ub,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=Zw(n);var s=()=>{var u=t.getState(),c=Dw(u,u.tooltip.settings.shared);if(!gy){Zs=null,Da=null;return}if(c==="axis"){var d=Xw(u,gy);d?.activeIndex!=null?t.dispatch(lL({activeIndex:d.activeIndex,activeDataKey:void 0,activeCoordinate:d.activeCoordinate})):t.dispatch(sL())}Zs=null,Da=null};if(!a){s();return}i==="raf"?Zs=requestAnimationFrame(s):typeof i=="number"&&Da===null&&(Da=setTimeout(s,i))}});function Qpe(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 aR={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},b$=Wn({name:"rootProps",initialState:aR,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:aR.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}}}),Jpe=b$.reducer,{updateOptions:ehe}=b$.actions,the=null,nhe={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)},x$=Wn({name:"polarOptions",initialState:the,reducers:nhe}),{updatePolarOptions:Tge}=x$.actions,rhe=x$.reducer,w$=Tr("keyDown"),C$=Tr("focus"),S$=Tr("blur"),ig=mc(),Qs=null,ja=null,xd=null;ig.startListening({actionCreator:w$,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=jw(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=Vae(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:C$,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:S$,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){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"),_$=mc(),wd=new Map,xu=new Map,my=new Map;_$.startListening({actionCreator:Kr,effect:(e,t)=>{var{handler:n,reactEvent:r}=e.payload;if(n!=null){var i=r.type,o=E$(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:zse(E),activeDataKey:wL(E),activeIndex:Sl(E),activeLabel:xL(E),activeTooltipIndex:Sl(E),isTooltipActive:Wse(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 ihe=q([kl],e=>e.tooltipItemPayloads),ohe=q([ihe,(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)}}}),O$=Tr("touchMove"),P$=mc(),La=null,zo=null,sR=null,wu=null;P$.startListening({actionCreator:O$,effect:(e,t)=>{var n=e.payload;if(!(n.touches==null||n.touches.length===0)){wu=E$(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),sR=Array.from(n.touches).map(u=>Zw({clientX:u.clientX,clientY:u.clientY,currentTarget:n.currentTarget}));var s=()=>{if(wu!=null){var u=t.getState(),c=Dw(u,u.tooltip.settings.shared);if(c==="axis"){var d,p=(d=sR)===null||d===void 0?void 0:d[0];if(p==null){La=null,zo=null;return}var g=Xw(u,p);g?.activeIndex!=null&&t.dispatch(lL({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(iee),w=(h=b.getAttribute(oee))!==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,_=ohe(u,v,w);t.dispatch(aL({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 A$={throttleDelay:"raf",throttledEvents:["mousemove","touchmove","pointermove","scroll","wheel"]},R$=Wn({name:"eventSettings",initialState:A$,reducers:{setEventSettings:(e,t)=>{t.payload.throttleDelay!=null&&(e.throttleDelay=t.payload.throttleDelay),t.payload.throttledEvents!=null&&(e.throttledEvents=t.payload.throttledEvents)}}}),{setEventSettings:ahe}=R$.actions,she=R$.reducer,lhe=aD({brush:Sfe,cartesianAxis:cfe,chartData:zle,errorBars:Cde,eventSettings:she,graphicalItems:Xce,layout:VJ,legend:Qee,options:Lle,polarAxis:pce,polarOptions:rhe,referenceElements:Pfe,renderedTicks:Hfe,rootProps:Jpe,tooltip:Qae,zIndex:Ele}),uhe=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"Chart";return fJ({reducer:lhe,preloadedState:t,middleware:r=>{var i;return r({serializableCheck:!1,immutableCheck:!["commonjs","es6","production"].includes((i="es6")!==null&&i!==void 0?i:"")}).concat([v$.middleware,y$.middleware,ig.middleware,_$.middleware,P$.middleware])},enhancers:r=>{var i=r;return typeof r=="function"&&(i=r()),i.concat(_D({type:"raf"}))},devTools:{serialize:{replacer:Qpe},name:"recharts-".concat(n)}})};function che(e){var{preloadedState:t,children:n,reduxStoreName:r}=e,i=pr(),o=j.useRef(null);if(i)return n;o.current==null&&(o.current=uhe(t,r));var a=Ix;return x.createElement(vte,{context:a,store:o.current},n)}function fhe(e){var{layout:t,margin:n}=e,r=Ht(),i=pr();return j.useEffect(()=>{i||(r(LJ(t)),r(jJ(n)))},[r,i,t,n]),null}var dhe=j.memo(fhe,Vh);function phe(e){var t=Ht();return j.useEffect(()=>{t(ehe(e))},[t,e]),null}var hhe=e=>{var t=Ht();return j.useEffect(()=>{t(ahe(e))},[t,e]),null},ghe=j.memo(hhe,Vh);function lR(e){var{zIndex:t,isPanorama:n}=e,r=j.useRef(null),i=Ht();return j.useLayoutEffect(()=>(r.current&&i(Cle({zIndex:t,element:r.current,isPanorama:n})),()=>{i(Sle({zIndex:t,isPanorama:n}))}),[i,t,n]),x.createElement("g",{tabIndex:-1,ref:r,className:"recharts-zIndex-layer_".concat(t)})}function uR(e){var{children:t,isPanorama:n}=e,r=Le(dle);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(lR,{key:a,zIndex:a,isPanorama:n})),t,o.map(a=>x.createElement(lR,{key:a,zIndex:a,isPanorama:n})))}var mhe=["children"];function vhe(e,t){if(e==null)return{};var n,r,i=yhe(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 yhe(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 bhe={width:"100%",height:"100%",display:"block"},xhe=j.forwardRef((e,t)=>{var n=qD(),r=KD(),i=oj();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(_M,Wp({},a,{title:s,desc:u,role:d,tabIndex:c,width:n,height:r,style:bhe,ref:t}),o)}),whe=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(_M,{width:r,height:i,x:a,y:o},t)},cR=j.forwardRef((e,t)=>{var{children:n}=e,r=vhe(e,mhe),i=pr();return i?x.createElement(whe,null,x.createElement(uR,{isPanorama:!0},n)):x.createElement(xhe,Wp({ref:t},r),x.createElement(uR,{isPanorama:!1},n))});function Che(){var e=Ht(),[t,n]=j.useState(null),r=Le(ree);return j.useEffect(()=>{if(t!=null){var i=t.getBoundingClientRect(),o=i.width/t.offsetWidth;ut(o)&&o!==r&&e(FJ(o))}},[t,e,r]),n}function fR(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 She(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?fR(Object(n),!0).forEach(function(r){Ehe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fR(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Ehe(e,t,n){return(t=_he(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _he(e){var t=Ohe(e,"string");return typeof t=="symbol"?t:t+""}function Ohe(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 Phe=()=>(Zle(),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 Ahe=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)))}),Rhe=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)))}),Ihe=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)))}),The=j.forwardRef((e,t)=>{var{width:n,height:r}=e;return typeof n=="string"||typeof r=="string"?x.createElement(Rhe,ra({},e,{ref:t})):typeof n=="number"&&typeof r=="number"?x.createElement(Ihe,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 khe(e){return e?Ahe:The}var Nhe=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=Che(),V=$x(),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(m$(oe)),P(Kr({handler:o,reactEvent:oe}))},[P,o]),G=j.useCallback(oe=>{P(Ub(oe)),P(Kr({handler:c,reactEvent:oe}))},[P,c]),ee=j.useCallback(oe=>{P(sL()),P(Kr({handler:d,reactEvent:oe}))},[P,d]),Q=j.useCallback(oe=>{P(Ub(oe)),P(Kr({handler:p,reactEvent:oe}))},[P,p]),pe=j.useCallback(()=>{P(C$())},[P]),K=j.useCallback(()=>{P(S$())},[P]),Ae=j.useCallback(oe=>{P(w$(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(O$(oe)),P(Kr({handler:y,reactEvent:oe}))},[P,E,y]),Fe=j.useCallback(oe=>{P(Kr({handler:h,reactEvent:oe}))},[P,h]),Y=khe(C);return x.createElement(AL.Provider,{value:R},x.createElement(UX.Provider,{value:k},x.createElement(Y,{width:D??v?.width,height:H??v?.height,className:Pt("recharts-wrapper",r),style:She({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(Phe,null),n)))}),Mhe=["width","height","responsive","children","className","style","compact","title","desc"];function Dhe(e,t){if(e==null)return{};var n,r,i=jhe(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 jhe(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 Lhe=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=Dhe(e,Mhe),g=fo(p);return u?x.createElement(x.Fragment,null,x.createElement(yc,{width:n,height:r}),x.createElement(cR,{otherAttributes:g,title:c,desc:d},o)):x.createElement(Nhe,{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(cR,{otherAttributes:g,title:c,desc:d,ref:t},x.createElement(Rfe,null,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 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 $he(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){Fhe(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 Fhe(e,t,n){return(t=Vhe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Vhe(e){var t=Bhe(e,"string");return typeof t=="symbol"?t:t+""}function Bhe(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 zhe={top:5,right:5,bottom:5,left:5},Whe=$he({accessibilityLayer:!0,barCategoryGap:"10%",barGap:4,layout:"horizontal",margin:zhe,responsive:!1,reverseStackOrder:!1,stackOffset:"none",syncMethod:"index"},A$),Hhe=j.forwardRef(function(t,n){var r,i=Mr(t.categoricalChartProps,Whe),{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(che,{preloadedState:{options:d},reduxStoreName:(r=c.id)!==null&&r!==void 0?r:o},x.createElement(Cfe,{chartData:c.data}),x.createElement(dhe,{layout:i.layout,margin:i.margin}),x.createElement(ghe,{throttleDelay:i.throttleDelay,throttledEvents:i.throttledEvents}),x.createElement(phe,{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(Lhe,Gb({},i,{ref:n})))}),Uhe=["axis","item"],Ghe=j.forwardRef((e,t)=>x.createElement(Hhe,{chartName:"BarChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:Uhe,tooltipPayloadSearcher:Dle,categoricalChartProps:e,ref:t}));const qhe={light:"",dark:".dark"},I$=x.createContext(null);function Khe(){const e=x.useContext(I$);if(!e)throw new Error("useChart must be used within a <ChartContainer />");return e}function Yhe({id:e,className:t,children:n,config:r,...i}){const o=x.useId(),a=`chart-${e||o.replace(/:/g,"")}`;return O.jsx(I$.Provider,{value:{config:r},children:O.jsxs("div",{"data-slot":"chart","data-chart":a,className:ue(`[&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground
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))},tce=(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),nce={angle:0,offset:5,zIndex:Zn.label,position:"middle",textBreakAll:!1};function rce(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,nce),{viewBox:n,parentViewBox:r,position:i,value:o,children:a,content:s,className:u="",textBreakAll:c,labelRef:d}=t,p=Zue(),g=zL(),h=i==="center"?g:p??g,y,b,v;n==null?y=h:Rd(n)?y=n:y=Fx(n);var w=rce(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,_=_A(C,Wue);return j.cloneElement(s,_)}if(typeof s=="function"){var{content:P}=C,R=_A(C,Hue);if(b=j.createElement(s,R),j.isValidElement(b))return b}else b=Que(t);var I=ti(t);if(Rd(y)){if(i==="insideStart"||i==="insideEnd"||i==="end")return ece(t,i,b,I,y);v=tce(y,t.offset,t.position)}else{if(!w)return null;var k=zue({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(Uw,no({ref:d,className:Pt("recharts-label",u)},I,v,{textAnchor:LL(I.textAnchor)?I.textAnchor:v.textAnchor,breakAll:c}),b))}qo.displayName="Label";var ice=(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)):Gw(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 oce(e){var{label:t,labelRef:n}=e,r=zL();return ice(t,r,n)||null}var ace=["valueAccessor"],sce=["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 PA(e,t){if(e==null)return{};var n,r,i=lce(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 lce(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 uce=e=>{var t=Array.isArray(e.value)?e.value[e.value.length-1]:e.value;if(Mue(t))return t},WL=j.createContext(void 0),cce=WL.Provider,HL=j.createContext(void 0);HL.Provider;function fce(){return j.useContext(WL)}function dce(){return j.useContext(HL)}function Id(e){var{valueAccessor:t=uce}=e,n=PA(e,ace),{dataKey:r,clockWise:i,id:o,textBreakAll:a,zIndex:s}=n,u=PA(n,sce),c=fce(),d=dce(),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 pce(e){var{label:t}=e;return t?t===!0?x.createElement(Id,{key:"labelList-implicit"}):x.isValidElement(t)||Gw(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 hce={radiusAxis:{},angleAxis:{}},UL=Wn({name:"polarAxis",initialState:hce,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:pge,removeRadiusAxis:hge,addAngleAxis:gge,removeAngleAxis:mge}=UL.actions,gce=UL.reducer;function mce(e){return e&&typeof e=="object"&&"className"in e&&typeof e.className=="string"?e.className:""}var yd={exports:{}},St={};var AA;function vce(){if(AA)return St;AA=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 RA;function yce(){return RA||(RA=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 IA;function bce(){return IA||(IA=1,process.env.NODE_ENV==="production"?yd.exports=vce():yd.exports=yce()),yd.exports}var xce=bce(),TA=e=>typeof e=="string"?e:e?e.displayName||e.name||"Component":"",kA=null,cy=null,GL=e=>{if(e===kA&&Array.isArray(cy))return cy;var t=[];return j.Children.forEach(e,n=>{pn(n)||(xce.isFragment(n)?t=t.concat(GL(n.props.children)):t.push(n))}),cy=t,kA=e,t};function wce(e,t){var n=[],r=[];return Array.isArray(t)?r=t.map(i=>TA(i)):r=[TA(t)],GL(e).forEach(i=>{var o=gl(i,"type.displayName")||gl(i,"type.name");o&&r.indexOf(o)!==-1&&n.push(i)}),n}var fy={},NA;function Cce(){return NA||(NA=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,MA;function Sce(){return MA||(MA=1,dy=Cce().isPlainObject),dy}var Ece=Sce();const _ce=fs(Ece);var DA,jA,LA,$A,FA;function VA(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 BA(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?VA(Object(n),!0).forEach(function(r){Oce(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):VA(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Oce(e,t,n){return(t=Pce(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Pce(e){var t=Ace(e,"string");return typeof t=="symbol"?t:t+""}function Ace(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 zA=(e,t,n,r,i)=>{var o=n-r,a;return a=qt(DA||(DA=bu(["M ",",",""])),e,t),a+=qt(jA||(jA=bu(["L ",",",""])),e+n,t),a+=qt(LA||(LA=bu(["L ",",",""])),e+n-o/2,t+i),a+=qt($A||($A=bu(["L ",",",""])),e+n-o/2-r,t+i),a+=qt(FA||(FA=bu(["L ",","," Z"])),e,t),a},Rce={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},Ice=e=>{var t=Mr(e,Rce),{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),_=Wx(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:zA(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=sj(["strokeDasharray"],c,u);return x.createElement(zx,{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:zA(Q,pe,te,G,ee),ref:g,style:BA(BA({},K),t.style)}))})},Tce=["option","shapeType","activeClassName","inActiveClassName"];function kce(e,t){if(e==null)return{};var n,r,i=Nce(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 Nce(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 WA(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?WA(Object(n),!0).forEach(function(r){Mce(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):WA(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Mce(e,t,n){return(t=Dce(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Dce(e){var t=jce(e,"string");return typeof t=="symbol"?t:t+""}function jce(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 Lce(e,t){return Vp(Vp({},t),e)}function $ce(e,t){return e==="symbols"}function HA(e){var{shapeType:t,elementProps:n}=e;switch(t){case"rectangle":return x.createElement(fj,n);case"trapezoid":return x.createElement(Ice,n);case"sector":return x.createElement(hj,n);case"symbols":if($ce(t))return x.createElement(UM,n);break;case"curve":return x.createElement(aj,n);default:return null}}function Fce(e){return j.isValidElement(e)?e.props:e}function Vce(e){var{option:t,shapeType:n,activeClassName:r="recharts-active-shape",inActiveClassName:i="recharts-shape"}=e,o=kce(e,Tce),a;if(j.isValidElement(t))a=j.cloneElement(t,Vp(Vp({},o),Fce(t)));else if(typeof t=="function")a=t(o,o.index);else if(_ce(t)&&typeof t!="boolean"){var s=Lce(t,o);a=x.createElement(HA,{shapeType:n,elementProps:s})}else{var u=o;a=x.createElement(HA,{shapeType:n,elementProps:u})}return o.isActive?x.createElement(Mi,{className:r},a):x.createElement(Mi,{className:i},a)}var qL=(e,t,n)=>{var r=Ht();return(i,o)=>a=>{e?.(i,o,a),r(aL({activeIndex:String(o),activeDataKey:t,activeCoordinate:i.tooltipPosition,activeGraphicalItemId:n}))}},KL=e=>{var t=Ht();return(n,r)=>i=>{e?.(n,r,i),t(Zae())}},YL=(e,t,n)=>{var r=Ht();return(i,o)=>a=>{e?.(i,o,a),r(Qae({activeIndex:String(o),activeDataKey:t,activeCoordinate:i.tooltipPosition,activeGraphicalItemId:n}))}};function Bce(e){var{tooltipEntrySettings:t}=e,n=Ht(),r=pr(),i=j.useRef(null);return j.useLayoutEffect(()=>{r||(i.current===null?n(qae(t)):i.current!==t&&n(Kae({prev:i.current,next:t})),i.current=t)},[t,n,r]),j.useLayoutEffect(()=>()=>{i.current&&(n(Yae(i.current)),i.current=null)},[n]),null}function zce(e){var{legendPayload:t}=e,n=Ht(),r=pr(),i=j.useRef(null);return j.useLayoutEffect(()=>{r||(i.current===null?n(Zee(t)):i.current!==t&&n(Qee({prev:i.current,next:t})),i.current=t)},[n,r,t]),j.useLayoutEffect(()=>()=>{i.current&&(n(Jee(i.current)),i.current=null)},[n]),null}var py,Wce=()=>{var[e]=x.useState(()=>zu("uid-"));return e},Hce=(py=x.useId)!==null&&py!==void 0?py:Wce;function Uce(e,t){var n=Hce();return t||(e?"".concat(e,"-").concat(n):n)}var Gce=j.createContext(void 0),qce=e=>{var{id:t,type:n,children:r}=e,i=Uce("recharts-".concat(n),t);return x.createElement(Gce.Provider,{value:i},r(i))},Kce={cartesianItems:[],polarItems:[]},XL=Wn({name:"graphicalItems",initialState:Kce,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:Yce,replaceCartesianGraphicalItem:Xce,removeCartesianGraphicalItem:Zce,addPolarGraphicalItem:vge,removePolarGraphicalItem:yge,replacePolarGraphicalItem:bge}=XL.actions,Qce=XL.reducer,Jce=e=>{var t=Ht(),n=j.useRef(null);return j.useLayoutEffect(()=>{n.current===null?t(Yce(e)):n.current!==e&&t(Xce({prev:n.current,next:e})),n.current=e},[t,e]),j.useLayoutEffect(()=>()=>{n.current&&(t(Zce(n.current)),n.current=null)},[t]),null},efe=j.memo(Jce);function UA(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 GA(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?UA(Object(n),!0).forEach(function(r){tfe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):UA(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function tfe(e,t,n){return(t=nfe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function nfe(e){var t=rfe(e,"string");return typeof t=="symbol"?t:t+""}function rfe(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 ZL=0,ife={xAxis:{},yAxis:{},zAxis:{}},QL=Wn({name:"cartesianAxis",initialState:ife,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]=GA(GA({},i),{},{width:r,widthHistory:s})}}}}),{addXAxis:ofe,replaceXAxis:afe,removeXAxis:sfe,addYAxis:lfe,replaceYAxis:ufe,removeYAxis:cfe,addZAxis:xge,replaceZAxis:wge,removeZAxis:Cge,updateYAxisWidth:ffe}=QL.actions,dfe=QL.reducer,pfe=q([wn],e=>({top:e.top,bottom:e.bottom,left:e.left,right:e.right})),hfe=q([pfe,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)}}),JL=()=>Le(hfe),qA=(e,t,n)=>{var r=n??e;if(!pn(r))return fi(r,t,0)},gfe=(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=qA(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=qA(t,n,c.barSize);return{stackId:void 0,dataKeys:d,barSize:p}});return[...s,...u]};function KA(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?KA(Object(n),!0).forEach(function(r){mfe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):KA(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function mfe(e,t,n){return(t=vfe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function vfe(e){var t=yfe(e,"string");return typeof t=="symbol"?t:t+""}function yfe(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 bfe(e,t,n,r,i){var o,a=r.length;if(!(a<1)){var s=fi(e,n,0,!0),u,c=[];if(ct((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=ct(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 xfe=(e,t,n,r,i,o,a)=>{var s=pn(a)?t:a,u=bfe(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},wfe=(e,t)=>{var n=Jx(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)}}}},Cfe=(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 Sfe(e,t){return e&&typeof e=="object"&&"zIndex"in e&&typeof e.zIndex=="number"&&ct(e.zIndex)?e.zIndex:t}var Efe=e=>{var{chartData:t}=e,n=Ht(),r=pr();return j.useEffect(()=>r?()=>{}:(n(uA(t)),()=>{n(uA(void 0))}),[t,n,r]),null},YA={x:0,y:0,width:0,height:0,padding:{top:0,right:0,bottom:0,left:0}},e$=Wn({name:"brush",initialState:YA,reducers:{setBrushSettings(e,t){return t.payload==null?YA:t.payload}}}),{setBrushSettings:Sge}=e$.actions,_fe=e$.reducer;function Ofe(e){return(e%180+180)%180}var Pfe=function(t){var{width:n,height:r}=t,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,o=Ofe(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)},Afe={dots:[],areas:[],lines:[]},t$=Wn({name:"referenceElements",initialState:Afe,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:Ege,removeDot:_ge,addArea:Oge,removeArea:Pge,addLine:Age,removeLine:Rge}=t$.actions,Rfe=t$.reducer,Ife=j.createContext(void 0),Tfe=e=>{var{children:t}=e,[n]=j.useState("".concat(zu("recharts"),"-clip")),r=JL();if(r==null)return null;var{x:i,y:o,width:a,height:s}=r;return x.createElement(Ife.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 n$(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 kfe(e,t,n){var r={width:e.width+t.width,height:e.height+t.height};return Pfe(r,n)}function Nfe(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 Mfe(e,t){return n$(e,t+1)}function Dfe(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:n$(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 jfe(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 XA(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?XA(Object(n),!0).forEach(function(r){Lfe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):XA(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Lfe(e,t,n){return(t=$fe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $fe(e){var t=Ffe(e,"string");return typeof t=="symbol"?t:t+""}function Ffe(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 Vfe(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 Bfe(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 qw(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=Mfe(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"?kfe(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,_=Nfe(o,E,y);return u==="equidistantPreserveStart"?Dfe(E,_,v,i,a):u==="equidistantPreserveEnd"?jfe(E,_,v,i,a):(u==="preserveStart"||u==="preserveStartEnd"?h=Bfe(E,_,v,i,a,u==="preserveStartEnd"):h=Vfe(E,_,v,i,a),h.filter(P=>P.isShow))}var zfe=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},Wfe={xAxis:{},yAxis:{}},r$=Wn({name:"renderedTicks",initialState:Wfe,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:Hfe,removeRenderedTicks:Ufe}=r$.actions,Gfe=r$.reducer,qfe=["axisLine","width","height","className","hide","ticks","axisType","axisId"];function Kfe(e,t){if(e==null)return{};var n,r,i=Yfe(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 Yfe(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 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 Gt(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){Xfe(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 Xfe(e,t,n){return(t=Zfe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Zfe(e){var t=Qfe(e,"string");return typeof t=="symbol"?t:t+""}function Qfe(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 Jfe(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 ede(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 tde(e,t){switch(e){case"left":return t?"start":"end";case"right":return t?"end":"start";default:return"middle"}}function nde(e,t){switch(e){case"left":case"right":return"middle";case"top":return t?"start":"end";default:return t?"end":"start"}}function rde(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,mce(t))),i=x.createElement(Uw,ss({},n,{className:a}),r)}return i}function ide(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(Hfe({ticks:o,axisId:r,axisType:n})),()=>{i(Ufe({axisId:r,axisType:n}))}},[i,t,r,n]),null}var ode=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=qw(Gt(Gt({},_),{},{ticks:n}),C,E),B=fo(_),L=wx(r),V=LL(B.textAnchor)?B.textAnchor:tde(d,p),D=nde(d,p),H={};typeof i=="object"&&(H=i);var J=Gt(Gt({},B),{},{fill:"none"},H),te=k.map(Q=>Gt({entry:Q},ede(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)},Ax(P,Se,pe)),r&&x.createElement(rde,{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(ide,{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))}),ade=j.forwardRef((e,t)=>{var{axisLine:n,width:r,height:i,className:o,hide:a,ticks:s,axisType:u,axisId:c}=e,d=Kfe(e,qfe),[p,g]=j.useState(""),[h,y]=j.useState(""),b=j.useRef(null);j.useImperativeHandle(t,()=>({getCalculatedWidth:()=>{var w;return zfe({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(Jfe,{x:e.x,y:e.y,width:r,height:i,orientation:e.orientation,mirror:e.mirror,axisLine:n,otherSvgProps:fo(e)}),x.createElement(ode,{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(Yue,{x:e.x,y:e.y,width:e.width,height:e.height,lowerWidth:e.width,upperWidth:e.width},x.createElement(oce,{label:e.label,labelRef:e.labelRef}),e.children)))}),Kw=x.forwardRef((e,t)=>{var n=Mr(e,lo);return x.createElement(ade,ss({},n,{ref:t}))});Kw.displayName="CartesianAxis";var sde=["x1","y1","x2","y2","key"],lde=["offset"],ude=["xAxisId","yAxisId"],cde=["xAxisId","yAxisId"];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 zn(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){fde(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 fde(e,t,n){return(t=dde(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function dde(e){var t=pde(e,"string");return typeof t=="symbol"?t:t+""}function pde(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=hde(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 hde(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 gde=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 i$(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,sde),p=(i=fo(d))!==null&&i!==void 0?i:{},{offset:g}=p,h=Bp(p,lde);r=x.createElement("line",Ua({},h,{x1:o,y1:a,x2:s,y2:u,fill:"none",key:c}))}return r}function mde(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,ude),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(i$,{key:"line-".concat(d),option:r,lineItemProps:p})});return x.createElement("g",{className:"recharts-cartesian-grid-horizontal"},u)}function vde(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,cde),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(i$,{option:r,lineItemProps:p,key:"line-".concat(d)})});return x.createElement("g",{className:"recharts-cartesian-grid-vertical"},u)}function yde(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 bde(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 xde=(e,t)=>{var{xAxis:n,width:r,height:i,offset:o}=e;return FD(qw(zn(zn(zn({},lo),n),{},{ticks:VD(n),viewBox:{x:0,y:0,width:r,height:i}})),o.left,o.left+o.width,t)},wde=(e,t)=>{var{yAxis:n,width:r,height:i,offset:o}=e;return FD(qw(zn(zn(zn({},lo),n),{},{ticks:VD(n),viewBox:{x:0,y:0,width:r,height:i}})),o.top,o.top+o.height,t)},Cde={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[],xAxisId:0,yAxisId:0,syncWithTicks:!1,zIndex:Zn.grid};function o$(e){var t=qD(),n=KD(),r=GD(),i=zn(zn({},Mr(e,Cde)),{},{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=>XP(B,"xAxis",o,y)),v=Le(B=>XP(B,"yAxis",a,y));if(!Li(c)||!Li(d)||!Te(s)||!Te(u))return null;var w=i.verticalCoordinatesGenerator||xde,C=i.horizontalCoordinatesGenerator||wde,{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(gde,{fill:i.fill,fillOpacity:i.fillOpacity,x:i.x,y:i.y,width:i.width,height:i.height,ry:i.ry}),x.createElement(yde,Ua({},i,{horizontalPoints:E})),x.createElement(bde,Ua({},i,{verticalPoints:_})),x.createElement(mde,Ua({},i,{offset:r,horizontalPoints:E,xAxis:b,yAxis:v})),x.createElement(vde,Ua({},i,{offset:r,verticalPoints:_,xAxis:b,yAxis:v}))))}o$.displayName="CartesianGrid";var Sde={},a$=Wn({name:"errorBars",initialState:Sde,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:Ige,replaceErrorBar:Tge,removeErrorBar:kge}=a$.actions,Ede=a$.reducer,_de=["children"];function Ode(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 Ade={data:[],xAxisId:"xAxis-0",yAxisId:"yAxis-0",dataPointFormatter:()=>({x:0,y:0,value:0}),errorBarOffset:0},Rde=j.createContext(Ade);function Ide(e){var{children:t}=e,n=Ode(e,_de);return x.createElement(Rde.Provider,{value:n},t)}function s$(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 Tde(e){var{xAxisId:t,yAxisId:n,clipPathId:r}=e,i=JL(),{needClipX:o,needClipY:a,needClip:s}=s$(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:ZL}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:ZL}var kde=process.env.NODE_ENV==="production",hy="Invariant failed";function Nde(e,t){if(kde)throw new Error(hy);var n=typeof t=="function"?t():t,r=n?"".concat(hy,": ").concat(n):hy;throw new Error(r)}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 Yw(e){return x.createElement(Vce,Fb({shapeType:"rectangle",activeClassName:"recharts-active-bar",inActiveClassName:"recharts-inactive-bar"},e))}var Mde=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||Nde(!1,"minPointSize callback function received a value with type of ".concat(typeof r,". Currently only numbers or null/undefined are supported.")),n)}},Dde=(e,t,n)=>n,jde=(e,t)=>t,kc=q([Ow,jde],(e,t)=>e.filter(n=>n.type==="bar").find(n=>n.id===t)),Lde=q([kc],e=>e?.maxBarSize),$de=(e,t,n,r)=>r,Fde=q([At,Ow,gs,ms,Dde],(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")),Vde=(e,t,n)=>{var r=At(e),i=gs(e,t),o=ms(e,t);if(!(i==null||o==null))return r==="horizontal"?Mb(e,"yAxis",o,n):Mb(e,"xAxis",i,n)},Bde=(e,t)=>{var n=At(e),r=gs(e,t),i=ms(e,t);if(!(r==null||i==null))return n==="horizontal"?YP(e,"xAxis",r):YP(e,"yAxis",i)},zde=q([Fde,tre,Bde],gfe),Wde=(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=Rj(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},l$=(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)}},Hde=q([zde,Rj,ere,Ij,Wde,l$,Lde],xfe),Ude=(e,t,n)=>{var r=gs(e,t);if(r!=null)return Cl(e,"xAxis",r,n)},Gde=(e,t,n)=>{var r=ms(e,t);if(r!=null)return Cl(e,"yAxis",r,n)},qde=(e,t,n)=>{var r=gs(e,t);if(r!=null)return wl(e,"xAxis",r,n)},Kde=(e,t,n)=>{var r=ms(e,t);if(r!=null)return wl(e,"yAxis",r,n)},Yde=q([Hde,kc],Cfe),Xde=q([Vde,kc],wfe),Zde=q([wn,Lx,Ude,Gde,qde,Kde,Yde,At,Kne,l$,Xde,kc,$de],(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 _pe({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})}}),Qde=["index"];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 Jde(e,t){if(e==null)return{};var n,r,i=epe(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 epe(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 u$=j.createContext(void 0),tpe=e=>{var t=j.useContext(u$);if(t!=null)return t.stackId;if(e!=null)return QJ(e)},npe=(e,t)=>"recharts-bar-stack-clip-path-".concat(e,"-").concat(t),rpe=e=>{var t=j.useContext(u$);if(t!=null){var{stackId:n}=t;return"url(#".concat(npe(n,e),")")}},c$=e=>{var{index:t}=e,n=Jde(e,Qde),r=rpe(t);return x.createElement(Mi,Vb({className:"recharts-bar-stack-layer",clipPath:r},n))},ipe=["onMouseEnter","onMouseLeave","onClick"],ope=["value","background","tooltipPosition"],ape=["id"],spe=["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 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 Yn(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){lpe(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 lpe(e,t,n){return(t=upe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function upe(e){var t=cpe(e,"string");return typeof t=="symbol"?t:t+""}function cpe(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=fpe(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 fpe(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 dpe=e=>{var{dataKey:t,name:n,fill:r,legendType:i,hide:o}=e;return[{inactive:o,dataKey:t,type:i,color:r,value:BD(n,t),payload:e}]},ppe=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:BD(o,t),hide:a,type:u,color:i,unit:s,graphicalItemId:c}};return x.createElement(Bce,{tooltipEntrySettings:d})});function hpe(e){var t=Le(Sl),{data:n,dataKey:r,background:i,allOtherBarProps:o}=e,{onMouseEnter:a,onMouseLeave:s,onClick:u}=o,c=zp(o,ipe),d=qL(a,r,o.id),p=KL(s),g=YL(u,r,o.id);if(!i||n==null)return null;var h=wx(i);return x.createElement(Po,{zIndex:Sfe(i,Zn.barBackground)},n.map((y,b)=>{var{value:v,background:w,tooltipPosition:C}=y,E=zp(y,ope);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),Ax(c,y,b)),{},{onMouseEnter:_,onMouseLeave:P,onClick:R,dataKey:r,index:b,className:"recharts-bar-background-rectangle"});return x.createElement(Yw,sa({key:"background-bar-".concat(b)},I))}))}function gpe(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(cce,{value:t?i:void 0},n)}function mpe(e){var{shape:t,activeBar:n,baseProps:r,entry:i,index:o,dataKey:a}=e,s=Le(Sl),u=Le(wL),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(Yw,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(c$,{index:i.originalDataIndex},C)):C}function vpe(e){var{shape:t,baseProps:n,entry:r,index:i,dataKey:o}=e;return x.createElement(Yw,sa({},n,{name:String(n.name)},r,{isActive:!1,option:t,index:i,dataKey:o}))}function ype(e){var t,{data:n,props:r}=e,i=(t=fo(r))!==null&&t!==void 0?t:{},{id:o}=i,a=zp(i,ape),{shape:s,dataKey:u,activeBar:c}=r,{onMouseEnter:d,onClick:p,onMouseLeave:g}=r,h=zp(r,spe),y=qL(d,u,o),b=KL(g),v=YL(p,u,o);return n?x.createElement(x.Fragment,null,n.map((w,C)=>x.createElement(c$,sa({index:w.originalDataIndex,key:"rectangle-".concat(w?.x,"-").concat(w?.y,"-").concat(w?.value,"-").concat(C),className:"recharts-bar-rectangle"},Ax(h,w,C),{onMouseEnter:y(w,C),onMouseLeave:b(w,C),onClick:v(w,C)}),c?x.createElement(mpe,{shape:s,activeBar:c,baseProps:a,entry:w,index:C,dataKey:u}):x.createElement(vpe,{shape:s,baseProps:a,entry:w,index:C,dataKey:u})))):null}function bpe(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=Wx(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(gpe,{showLabels:b,rects:r},x.createElement(zx,{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(ype,{props:t,data:E}))}),x.createElement(pce,{label:t.label}),t.children)}function xpe(e){var t=j.useRef(null);return x.createElement(bpe,{previousRectanglesRef:t,props:e})}var f$=0,wpe=(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 Cpe 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(Tde,{clipPathId:p,xAxisId:o,yAxisId:a})),x.createElement(Mi,{className:"recharts-bar-rectangles",clipPath:s?"url(#clipPath-".concat(p,")"):void 0},x.createElement(hpe,{data:n,dataKey:r,background:u,allOtherBarProps:this.props}),x.createElement(xpe,this.props)))}}var Spe={activeBar:!1,animationBegin:0,animationDuration:400,animationEasing:"ease",background:!1,hide:!1,isAnimationActive:"auto",label:!1,legendType:"rect",minPointSize:f$,xAxisId:0,yAxisId:0,zIndex:Zn.bar};function Epe(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}=s$(t,n),g=_l(),h=pr(),y=wce(e.children,TL),b=Le(C=>Zde(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(Ide,{xAxisId:t,yAxisId:n,data:b,dataPointFormatter:wpe,errorBarOffset:v},x.createElement(Cpe,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 _pe(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=JJ({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=qJ(H,C)}else I=Mn(P,n),Array.isArray(I)||(I=[E,I]);var J=Mde(r,f$)(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=H_({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=H_({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 Ope(e){var t=Mr(e,Spe),n=tpe(t.stackId),r=pr();return x.createElement(qce,{id:t.id,type:"bar"},i=>x.createElement(x.Fragment,null,x.createElement(zce,{legendPayload:dpe(t)}),x.createElement(ppe,{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(efe,{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(Epe,sa({},t,{id:i})))))}var d$=x.memo(Ope,Vh);d$.displayName="Bar";var Ppe=["domain","range"],Ape=["domain","range"];function eR(e,t){if(e==null)return{};var n,r,i=Rpe(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 Rpe(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 tR(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 p$(e,t){if(e===t)return!0;var{domain:n,range:r}=e,i=eR(e,Ppe),{domain:o,range:a}=t,s=eR(t,Ape);return!tR(n,o)||!tR(r,a)?!1:Vh(i,s)}var Ipe=["type"],Tpe=["dangerouslySetInnerHTML","ticks","scale"],kpe=["id","scale"];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 nR(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 rR(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?nR(Object(n),!0).forEach(function(r){Npe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):nR(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Npe(e,t,n){return(t=Mpe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Mpe(e){var t=Dpe(e,"string");return typeof t=="symbol"?t:t+""}function Dpe(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 zb(e,t){if(e==null)return{};var n,r,i=jpe(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 jpe(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 Lpe(e){var t=Ht(),n=j.useRef(null),r=YD(),{type:i}=e,o=zb(e,Ipe),a=Wh(r,"xAxis",i),s=j.useMemo(()=>{if(a!=null)return rR(rR({},o),{},{type:a})},[o,a]);return j.useLayoutEffect(()=>{s!=null&&(n.current===null?t(ofe(s)):n.current!==s&&t(afe({prev:n.current,next:s})),n.current=s)},[s,t]),j.useLayoutEffect(()=>()=>{n.current&&(t(sfe(n.current)),n.current=null)},[t]),null}var $pe=e=>{var{xAxisId:t,className:n}=e,r=Le(Lx),i=pr(),o="xAxis",a=Le(w=>eL(w,o,t,i)),s=Le(w=>Z2(w,t)),u=Le(w=>Dae(w,t)),c=Le(w=>x2(w,t));if(s==null||u==null||c==null)return null;var{dangerouslySetInnerHTML:d,ticks:p,scale:g}=e,h=zb(e,Tpe),{id:y,scale:b}=c,v=zb(c,kpe);return x.createElement(Kw,Bb({},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}))},Fpe={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},Vpe=e=>{var t=Mr(e,Fpe);return x.createElement(x.Fragment,null,x.createElement(Lpe,{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($pe,t))},h$=x.memo(Vpe,p$);h$.displayName="XAxis";var Bpe=["type"],zpe=["dangerouslySetInnerHTML","ticks","scale"],Wpe=["id","scale"];function Wb(){return Wb=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},Wb.apply(null,arguments)}function iR(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 oR(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?iR(Object(n),!0).forEach(function(r){Hpe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):iR(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Hpe(e,t,n){return(t=Upe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Upe(e){var t=Gpe(e,"string");return typeof t=="symbol"?t:t+""}function Gpe(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 Hb(e,t){if(e==null)return{};var n,r,i=qpe(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 qpe(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 Kpe(e){var t=Ht(),n=j.useRef(null),r=YD(),{type:i}=e,o=Hb(e,Bpe),a=Wh(r,"yAxis",i),s=j.useMemo(()=>{if(a!=null)return oR(oR({},o),{},{type:a})},[a,o]);return j.useLayoutEffect(()=>{s!=null&&(n.current===null?t(lfe(s)):n.current!==s&&t(ufe({prev:n.current,next:s})),n.current=s)},[s,t]),j.useLayoutEffect(()=>()=>{n.current&&(t(cfe(n.current)),n.current=null)},[t]),null}function Ype(e){var{yAxisId:t,className:n,width:r,label:i}=e,o=j.useRef(null),a=j.useRef(null),s=Le(Lx),u=pr(),c=Ht(),d="yAxis",p=Le(R=>Q2(R,t)),g=Le(R=>Lae(R,t)),h=Le(R=>eL(R,d,t,u)),y=Le(R=>w2(R,t));if(j.useLayoutEffect(()=>{if(!(r!=="auto"||!p||Gw(i)||j.isValidElement(i)||y==null)){var R=o.current;if(R){var I=R.getCalculatedWidth();Math.round(p.width)!==Math.round(I)&&c(ffe({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=Hb(e,zpe),{id:E,scale:_}=y,P=Hb(y,Wpe);return x.createElement(Kw,Wb({},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 Xpe={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},Zpe=e=>{var t=Mr(e,Xpe);return x.createElement(x.Fragment,null,x.createElement(Kpe,{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(Ype,t))},g$=x.memo(Zpe,p$);g$.displayName="YAxis";var Qpe=(e,t)=>t,Xw=q([Qpe,At,Lj,Sn,vL,Oo,ole,wn],dle);function Jpe(e){return"getBBox"in e.currentTarget&&typeof e.currentTarget.getBBox=="function"}function Zw(e){var t=e.currentTarget.getBoundingClientRect(),n,r;if(Jpe(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 m$=Tr("mouseClick"),v$=mc();v$.startListening({actionCreator:m$,effect:(e,t)=>{var n=e.payload,r=Xw(t.getState(),Zw(n));r?.activeIndex!=null&&t.dispatch(Jae({activeIndex:r.activeIndex,activeDataKey:void 0,activeCoordinate:r.activeCoordinate}))}});var Ub=Tr("mouseMove"),y$=mc(),Zs=null,Da=null,gy=null;y$.startListening({actionCreator:Ub,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=Zw(n);var s=()=>{var u=t.getState(),c=Dw(u,u.tooltip.settings.shared);if(!gy){Zs=null,Da=null;return}if(c==="axis"){var d=Xw(u,gy);d?.activeIndex!=null?t.dispatch(lL({activeIndex:d.activeIndex,activeDataKey:void 0,activeCoordinate:d.activeCoordinate})):t.dispatch(sL())}Zs=null,Da=null};if(!a){s();return}i==="raf"?Zs=requestAnimationFrame(s):typeof i=="number"&&Da===null&&(Da=setTimeout(s,i))}});function ehe(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 aR={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},b$=Wn({name:"rootProps",initialState:aR,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:aR.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}}}),the=b$.reducer,{updateOptions:nhe}=b$.actions,rhe=null,ihe={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)},x$=Wn({name:"polarOptions",initialState:rhe,reducers:ihe}),{updatePolarOptions:Nge}=x$.actions,ohe=x$.reducer,w$=Tr("keyDown"),C$=Tr("focus"),S$=Tr("blur"),ig=mc(),Qs=null,ja=null,xd=null;ig.startListening({actionCreator:w$,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=jw(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=zae(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:C$,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:S$,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){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"),_$=mc(),wd=new Map,xu=new Map,my=new Map;_$.startListening({actionCreator:Kr,effect:(e,t)=>{var{handler:n,reactEvent:r}=e.payload;if(n!=null){var i=r.type,o=E$(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:Hse(E),activeDataKey:wL(E),activeIndex:Sl(E),activeLabel:xL(E),activeTooltipIndex:Sl(E),isTooltipActive:Use(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 ahe=q([kl],e=>e.tooltipItemPayloads),she=q([ahe,(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)}}}),O$=Tr("touchMove"),P$=mc(),La=null,zo=null,sR=null,wu=null;P$.startListening({actionCreator:O$,effect:(e,t)=>{var n=e.payload;if(!(n.touches==null||n.touches.length===0)){wu=E$(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),sR=Array.from(n.touches).map(u=>Zw({clientX:u.clientX,clientY:u.clientY,currentTarget:n.currentTarget}));var s=()=>{if(wu!=null){var u=t.getState(),c=Dw(u,u.tooltip.settings.shared);if(c==="axis"){var d,p=(d=sR)===null||d===void 0?void 0:d[0];if(p==null){La=null,zo=null;return}var g=Xw(u,p);g?.activeIndex!=null&&t.dispatch(lL({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(aee),w=(h=b.getAttribute(see))!==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,_=she(u,v,w);t.dispatch(aL({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 A$={throttleDelay:"raf",throttledEvents:["mousemove","touchmove","pointermove","scroll","wheel"]},R$=Wn({name:"eventSettings",initialState:A$,reducers:{setEventSettings:(e,t)=>{t.payload.throttleDelay!=null&&(e.throttleDelay=t.payload.throttleDelay),t.payload.throttledEvents!=null&&(e.throttledEvents=t.payload.throttledEvents)}}}),{setEventSettings:lhe}=R$.actions,uhe=R$.reducer,che=aD({brush:_fe,cartesianAxis:dfe,chartData:Hle,errorBars:Ede,eventSettings:uhe,graphicalItems:Qce,layout:zJ,legend:ete,options:Fle,polarAxis:gce,polarOptions:ohe,referenceElements:Rfe,renderedTicks:Gfe,rootProps:the,tooltip:ese,zIndex:Ole}),fhe=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"Chart";return pJ({reducer:che,preloadedState:t,middleware:r=>{var i;return r({serializableCheck:!1,immutableCheck:!["commonjs","es6","production"].includes((i="es6")!==null&&i!==void 0?i:"")}).concat([v$.middleware,y$.middleware,ig.middleware,_$.middleware,P$.middleware])},enhancers:r=>{var i=r;return typeof r=="function"&&(i=r()),i.concat(_D({type:"raf"}))},devTools:{serialize:{replacer:ehe},name:"recharts-".concat(n)}})};function dhe(e){var{preloadedState:t,children:n,reduxStoreName:r}=e,i=pr(),o=j.useRef(null);if(i)return n;o.current==null&&(o.current=fhe(t,r));var a=Ix;return x.createElement(bte,{context:a,store:o.current},n)}function phe(e){var{layout:t,margin:n}=e,r=Ht(),i=pr();return j.useEffect(()=>{i||(r(FJ(t)),r($J(n)))},[r,i,t,n]),null}var hhe=j.memo(phe,Vh);function ghe(e){var t=Ht();return j.useEffect(()=>{t(nhe(e))},[t,e]),null}var mhe=e=>{var t=Ht();return j.useEffect(()=>{t(lhe(e))},[t,e]),null},vhe=j.memo(mhe,Vh);function lR(e){var{zIndex:t,isPanorama:n}=e,r=j.useRef(null),i=Ht();return j.useLayoutEffect(()=>(r.current&&i(Ele({zIndex:t,element:r.current,isPanorama:n})),()=>{i(_le({zIndex:t,isPanorama:n}))}),[i,t,n]),x.createElement("g",{tabIndex:-1,ref:r,className:"recharts-zIndex-layer_".concat(t)})}function uR(e){var{children:t,isPanorama:n}=e,r=Le(hle);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(lR,{key:a,zIndex:a,isPanorama:n})),t,o.map(a=>x.createElement(lR,{key:a,zIndex:a,isPanorama:n})))}var yhe=["children"];function bhe(e,t){if(e==null)return{};var n,r,i=xhe(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 xhe(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 whe={width:"100%",height:"100%",display:"block"},Che=j.forwardRef((e,t)=>{var n=qD(),r=KD(),i=oj();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(_M,Wp({},a,{title:s,desc:u,role:d,tabIndex:c,width:n,height:r,style:whe,ref:t}),o)}),She=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(_M,{width:r,height:i,x:a,y:o},t)},cR=j.forwardRef((e,t)=>{var{children:n}=e,r=bhe(e,yhe),i=pr();return i?x.createElement(She,null,x.createElement(uR,{isPanorama:!0},n)):x.createElement(Che,Wp({ref:t},r),x.createElement(uR,{isPanorama:!1},n))});function Ehe(){var e=Ht(),[t,n]=j.useState(null),r=Le(oee);return j.useEffect(()=>{if(t!=null){var i=t.getBoundingClientRect(),o=i.width/t.offsetWidth;ct(o)&&o!==r&&e(BJ(o))}},[t,e,r]),n}function fR(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 _he(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?fR(Object(n),!0).forEach(function(r){Ohe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fR(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Ohe(e,t,n){return(t=Phe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Phe(e){var t=Ahe(e,"string");return typeof t=="symbol"?t:t+""}function Ahe(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 Rhe=()=>(Jle(),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 Ihe=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)))}),The=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)))}),khe=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)))}),Nhe=j.forwardRef((e,t)=>{var{width:n,height:r}=e;return typeof n=="string"||typeof r=="string"?x.createElement(The,ra({},e,{ref:t})):typeof n=="number"&&typeof r=="number"?x.createElement(khe,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 Mhe(e){return e?Ihe:Nhe}var Dhe=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=Ehe(),V=$x(),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(m$(oe)),P(Kr({handler:o,reactEvent:oe}))},[P,o]),G=j.useCallback(oe=>{P(Ub(oe)),P(Kr({handler:c,reactEvent:oe}))},[P,c]),ee=j.useCallback(oe=>{P(sL()),P(Kr({handler:d,reactEvent:oe}))},[P,d]),Q=j.useCallback(oe=>{P(Ub(oe)),P(Kr({handler:p,reactEvent:oe}))},[P,p]),pe=j.useCallback(()=>{P(C$())},[P]),K=j.useCallback(()=>{P(S$())},[P]),Ae=j.useCallback(oe=>{P(w$(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(O$(oe)),P(Kr({handler:y,reactEvent:oe}))},[P,E,y]),Fe=j.useCallback(oe=>{P(Kr({handler:h,reactEvent:oe}))},[P,h]),Y=Mhe(C);return x.createElement(AL.Provider,{value:R},x.createElement(qX.Provider,{value:k},x.createElement(Y,{width:D??v?.width,height:H??v?.height,className:Pt("recharts-wrapper",r),style:_he({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(Rhe,null),n)))}),jhe=["width","height","responsive","children","className","style","compact","title","desc"];function Lhe(e,t){if(e==null)return{};var n,r,i=$he(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 $he(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 Fhe=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=Lhe(e,jhe),g=fo(p);return u?x.createElement(x.Fragment,null,x.createElement(yc,{width:n,height:r}),x.createElement(cR,{otherAttributes:g,title:c,desc:d},o)):x.createElement(Dhe,{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(cR,{otherAttributes:g,title:c,desc:d,ref:t},x.createElement(Tfe,null,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 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 Vhe(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){Bhe(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 Bhe(e,t,n){return(t=zhe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function zhe(e){var t=Whe(e,"string");return typeof t=="symbol"?t:t+""}function Whe(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 Hhe={top:5,right:5,bottom:5,left:5},Uhe=Vhe({accessibilityLayer:!0,barCategoryGap:"10%",barGap:4,layout:"horizontal",margin:Hhe,responsive:!1,reverseStackOrder:!1,stackOffset:"none",syncMethod:"index"},A$),Ghe=j.forwardRef(function(t,n){var r,i=Mr(t.categoricalChartProps,Uhe),{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(dhe,{preloadedState:{options:d},reduxStoreName:(r=c.id)!==null&&r!==void 0?r:o},x.createElement(Efe,{chartData:c.data}),x.createElement(hhe,{layout:i.layout,margin:i.margin}),x.createElement(vhe,{throttleDelay:i.throttleDelay,throttledEvents:i.throttledEvents}),x.createElement(ghe,{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(Fhe,Gb({},i,{ref:n})))}),qhe=["axis","item"],Khe=j.forwardRef((e,t)=>x.createElement(Ghe,{chartName:"BarChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:qhe,tooltipPayloadSearcher:Lle,categoricalChartProps:e,ref:t}));const Yhe={light:"",dark:".dark"},I$=x.createContext(null);function Xhe(){const e=x.useContext(I$);if(!e)throw new Error("useChart must be used within a <ChartContainer />");return e}function Zhe({id:e,className:t,children:n,config:r,...i}){const o=x.useId(),a=`chart-${e||o.replace(/:/g,"")}`;return O.jsx(I$.Provider,{value:{config:r},children:O.jsxs("div",{"data-slot":"chart","data-chart":a,className:ue(`[&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground
228
228
  [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50
229
229
  [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border
230
230
  [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border
@@ -234,14 +234,14 @@ Take a look at the reducer(s) handling this action type: ${h.type}.
234
234
  justify-center text-xs [&_.recharts-dot[stroke='#fff']]:stroke-transparent
235
235
  [&_.recharts-layer]:outline-hidden [&_.recharts-sector]:outline-hidden
236
236
  [&_.recharts-sector[stroke='#fff']]:stroke-transparent
237
- [&_.recharts-surface]:outline-hidden`,t),...i,children:[O.jsx(Xhe,{id:a,config:r}),O.jsx(Nee,{children:n})]})})}const Xhe=({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(qhe).map(([r,i])=>`
237
+ [&_.recharts-surface]:outline-hidden`,t),...i,children:[O.jsx(Qhe,{id:a,config:r}),O.jsx(Dee,{children:n})]})})}const Qhe=({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(Yhe).map(([r,i])=>`
238
238
  ${i} [data-chart=${e}] {
239
239
  ${n.map(([o,a])=>{const s=a.theme?.[r]||a.color;return s?` --color-${o}: ${s};`:null}).filter(Boolean).join(`
240
240
  `)}
241
241
  }
242
242
  `).join(`
243
- `)}}):null},Zhe=oue;function Qhe({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}=Khe(),y=x.useMemo(()=>{if(i||!t?.length)return null;const[v]=t,w=`${g||v?.dataKey||v?.name||"value"}`,C=pR(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
243
+ `)}}):null},Jhe=sue;function ege({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}=Xhe(),y=x.useMemo(()=>{if(i||!t?.length)return null;const[v]=t,w=`${g||v?.dataKey||v?.name||"value"}`,C=pR(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
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=pR(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
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 pR(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 Jhe=14.52,hR=10,ege=4,T$="#3B82F6",tge=400,nge=200,rge=150,ige={desktop:{label:"default",color:T$}},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=DX.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(Yhe,{...e,config:e?.config??h,className:ue(!u&&"aspect-video","transition-[width,height] duration-200 ease-in-out",e?.className),children:O.jsxs(Ghe,{barSize:a?.barSize??t?.barSize??Jhe,...t,margin:t?.margin||{top:10,right:_?5:10,bottom:_?30:20,left:_?0:10},className:"transition-all duration-200",children:[O.jsx(o$,{vertical:n?.vertical??!1,horizontal:n?.horizontal??!0,strokeDasharray:n?.strokeDasharray??"3 3",...n}),O.jsx(g$,{tickLine:r?.y?.tickLine??!1,axisLine:r?.y?.axisLine??!1,tickMargin:r?.y?.tickMargin??hR,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(h$,{tickLine:r?.x?.tickLine??!1,axisLine:r?.x?.axisLine??!1,tickMargin:r?.x?.tickMargin??hR,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(Zhe,{cursor:o?.cursor??!0,content:O.jsx(Qhe,{...s,className:ue("transition-all duration-200",_&&"origin-top-left scale-90 text-xs")}),...o}),O.jsx(d$,{fill:a?.fill??T$,radius:typeof a?.radius=="number"?Math.min(a.radius,_?3:a.radius):_?3:ege,...a})]})})})};exports.AppPagination=PY;exports.AppSidebar=NY;exports.Badge=by;exports.BasicChart=oge;exports.BasicCheckbox=MY;exports.BasicModal=DY;exports.BasicTable=PX;exports.BasicTooltip=AX;exports.Button=oo;exports.Card=MR;exports.CardContent=$R;exports.CardDescription=LR;exports.CardFooter=FR;exports.CardHeader=DR;exports.CardTitle=jR;exports.Checkbox=n0;exports.Combobox=GT;exports.ComboboxChip=QT;exports.ComboboxChips=$y;exports.ComboboxChipsInput=Fy;exports.ComboboxCollection=h8;exports.ComboboxContent=KT;exports.ComboboxEmpty=ZT;exports.ComboboxField=qT;exports.ComboboxGroup=d8;exports.ComboboxInput=f8;exports.ComboboxItem=XT;exports.ComboboxLabel=p8;exports.ComboboxList=YT;exports.ComboboxSeparator=g8;exports.ComboboxTrigger=qd;exports.ComboboxValue=Ly;exports.Dialog=Nk;exports.DialogClose=B9;exports.DialogContent=Y0;exports.DialogDescription=Dk;exports.DialogFooter=Z0;exports.DialogHeader=X0;exports.DialogOverlay=K0;exports.DialogPortal=Mk;exports.DialogTitle=Q0;exports.DialogTrigger=V9;exports.Field=sc;exports.FieldContent=BK;exports.FieldDescription=lc;exports.FieldError=WT;exports.FieldGroup=ac;exports.FieldLabel=El;exports.FieldLegend=VK;exports.FieldSeparator=WK;exports.FieldSet=lh;exports.FieldTitle=zK;exports.Icon=uo;exports.Input=F0;exports.InputField=xM;exports.InputGroup=V0;exports.InputGroupAddon=B0;exports.InputGroupButton=HT;exports.InputGroupInput=z0;exports.InputGroupText=KK;exports.InputGroupTextarea=YK;exports.InputPassword=RX;exports.Label=Vu;exports.NavigationItem=jk;exports.NavigationMenu=Lk;exports.Pagination=J0;exports.PaginationContent=ex;exports.PaginationEllipsis=Vk;exports.PaginationItem=tl;exports.PaginationLink=uc;exports.PaginationNext=Fk;exports.PaginationPrevious=$k;exports.Progress=Gk;exports.RadioButton=IX;exports.RadioGroup=ox;exports.RadioGroupItem=Xd;exports.SelectField=CM;exports.Separator=$0;exports.Switch=xN;exports.Table=ax;exports.TableBody=lx;exports.TableCaption=CN;exports.TableCell=Zd;exports.TableFooter=wN;exports.TableHead=ux;exports.TableHeader=sx;exports.TableRow=Mu;exports.Tabs=F7;exports.TabsContent=FN;exports.TabsList=LN;exports.TabsTrigger=$N;exports.Textarea=uh;exports.TextareaField=kX;exports.Tooltip=lM;exports.TooltipArrow=cM;exports.TooltipContent=gx;exports.TooltipProvider=CY;exports.TooltipTrigger=uM;exports.Typography=yy;exports.badgeVariants=Xb;exports.buttonVariants=Qb;exports.cn=ue;exports.getTypographyClassName=dn;exports.typographyClassNames=Yb;exports.typographyVariantOptions=cH;exports.usePopupControls=mx;
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 pR(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 tge=14.52,hR=10,nge=4,T$="#3B82F6",rge=400,ige=200,oge=150,age={desktop:{label:"default",color:T$}},sge=({chartContainer:e,barChart:t,cartesianGrid:n,axis:r,hasTooltip:i=!0,tooltip:o,bar:a,chartTooltipContent:s,fillContainer:u=!1,minHeight:c=ige,smoothResize:d=!0,resizeDebounceMs:p=oge,mobileBreakpoint:g=rge})=>{const h=e?.config??age,[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=LX.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(Zhe,{...e,config:e?.config??h,className:ue(!u&&"aspect-video","transition-[width,height] duration-200 ease-in-out",e?.className),children:O.jsxs(Khe,{barSize:a?.barSize??t?.barSize??tge,...t,margin:t?.margin||{top:10,right:_?5:10,bottom:_?30:20,left:_?0:10},className:"transition-all duration-200",children:[O.jsx(o$,{vertical:n?.vertical??!1,horizontal:n?.horizontal??!0,strokeDasharray:n?.strokeDasharray??"3 3",...n}),O.jsx(g$,{tickLine:r?.y?.tickLine??!1,axisLine:r?.y?.axisLine??!1,tickMargin:r?.y?.tickMargin??hR,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(h$,{tickLine:r?.x?.tickLine??!1,axisLine:r?.x?.axisLine??!1,tickMargin:r?.x?.tickMargin??hR,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(Jhe,{cursor:o?.cursor??!0,content:O.jsx(ege,{...s,className:ue("transition-all duration-200",_&&"origin-top-left scale-90 text-xs")}),...o}),O.jsx(d$,{fill:a?.fill??T$,radius:typeof a?.radius=="number"?Math.min(a.radius,_?3:a.radius):_?3:nge,...a})]})})})};exports.AppPagination=RY;exports.AppSidebar=DY;exports.Badge=by;exports.BasicChart=sge;exports.BasicCheckbox=jY;exports.BasicModal=LY;exports.BasicTable=RX;exports.BasicTooltip=IX;exports.Button=oo;exports.Card=MR;exports.CardContent=$R;exports.CardDescription=LR;exports.CardFooter=FR;exports.CardHeader=DR;exports.CardTitle=jR;exports.Checkbox=n0;exports.Combobox=GT;exports.ComboboxChip=QT;exports.ComboboxChips=$y;exports.ComboboxChipsInput=Fy;exports.ComboboxCollection=m8;exports.ComboboxContent=KT;exports.ComboboxEmpty=ZT;exports.ComboboxField=qT;exports.ComboboxGroup=h8;exports.ComboboxInput=p8;exports.ComboboxItem=XT;exports.ComboboxLabel=g8;exports.ComboboxList=YT;exports.ComboboxSeparator=v8;exports.ComboboxTrigger=qd;exports.ComboboxValue=Ly;exports.Dialog=Nk;exports.DialogClose=W9;exports.DialogContent=Y0;exports.DialogDescription=Dk;exports.DialogFooter=Z0;exports.DialogHeader=X0;exports.DialogOverlay=K0;exports.DialogPortal=Mk;exports.DialogTitle=Q0;exports.DialogTrigger=z9;exports.Field=sc;exports.FieldContent=WK;exports.FieldDescription=lc;exports.FieldError=WT;exports.FieldGroup=ac;exports.FieldLabel=El;exports.FieldLegend=zK;exports.FieldSeparator=UK;exports.FieldSet=lh;exports.FieldTitle=HK;exports.Icon=uo;exports.Input=F0;exports.InputField=xM;exports.InputGroup=V0;exports.InputGroupAddon=B0;exports.InputGroupButton=HT;exports.InputGroupInput=z0;exports.InputGroupText=XK;exports.InputGroupTextarea=ZK;exports.InputPassword=TX;exports.Label=Vu;exports.NavigationItem=jk;exports.NavigationMenu=Lk;exports.Pagination=J0;exports.PaginationContent=ex;exports.PaginationEllipsis=Vk;exports.PaginationItem=tl;exports.PaginationLink=uc;exports.PaginationNext=Fk;exports.PaginationPrevious=$k;exports.Progress=Gk;exports.RadioButton=kX;exports.RadioGroup=ox;exports.RadioGroupItem=Xd;exports.SelectField=CM;exports.Separator=$0;exports.Switch=xN;exports.Table=ax;exports.TableBody=lx;exports.TableCaption=CN;exports.TableCell=Zd;exports.TableFooter=wN;exports.TableHead=ux;exports.TableHeader=sx;exports.TableRow=Mu;exports.Tabs=B7;exports.TabsContent=FN;exports.TabsList=LN;exports.TabsTrigger=$N;exports.Textarea=uh;exports.TextareaField=MX;exports.Tooltip=lM;exports.TooltipArrow=cM;exports.TooltipContent=gx;exports.TooltipProvider=EY;exports.TooltipTrigger=uM;exports.Typography=yy;exports.badgeVariants=Xb;exports.buttonVariants=Qb;exports.cn=ue;exports.getTypographyClassName=dn;exports.typographyClassNames=Yb;exports.typographyVariantOptions=cH;exports.usePopupControls=mx;
247
247
  //# sourceMappingURL=index.cjs.map