@3sc/common-component 0.0.82 → 0.0.83
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.es.js +1 -1
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/index.umd.js
CHANGED
|
@@ -235,7 +235,7 @@ const theme2 = createTheme({ palette: {
|
|
|
235
235
|
${e.palette.mode==="light"?El(Be(e.palette.divider,1),.88):Tl(Be(e.palette.divider,1),.68)}`,textAlign:"left",padding:16},t.variant==="head"&&{color:(e.vars||e).palette.text.primary,lineHeight:e.typography.pxToRem(24),fontWeight:e.typography.fontWeightMedium},t.variant==="body"&&{color:(e.vars||e).palette.text.primary},t.variant==="footer"&&{color:(e.vars||e).palette.text.secondary,lineHeight:e.typography.pxToRem(21),fontSize:e.typography.pxToRem(12)},t.size==="small"&&{padding:"6px 16px",[`&.${vc.paddingCheckbox}`]:{width:24,padding:"0 12px 0 16px","& > *":{padding:0}}},t.padding==="checkbox"&&{width:48,padding:"0 0 0 4px"},t.padding==="none"&&{padding:0},t.align==="left"&&{textAlign:"left"},t.align==="center"&&{textAlign:"center"},t.align==="right"&&{textAlign:"right",flexDirection:"row-reverse"},t.align==="justify"&&{textAlign:"justify"},t.stickyHeader&&{position:"sticky",top:0,zIndex:2,backgroundColor:(e.vars||e).palette.background.default})),yc=E.forwardRef(function(t,n){const o=Ie({props:t,name:"MuiTableCell"}),{align:r="inherit",className:s,component:a,padding:c,scope:l,size:u,sortDirection:d,variant:p}=o,h=oe(o,sR),g=E.useContext(mc),m=E.useContext(ri),f=m&&m.variant==="head";let b;a?b=a:b=f?"th":"td";let v=l;b==="td"?v=void 0:!v&&f&&(v="col");const S=p||m&&m.variant,C=T({},o,{align:r,component:b,padding:c||(g&&g.padding?g.padding:"normal"),size:u||(g&&g.size?g.size:"medium"),sortDirection:d,stickyHeader:S==="head"&&g&&g.stickyHeader,variant:S}),I=aR(C);let y=null;return d&&(y=d==="asc"?"ascending":"descending"),x.jsx(lR,T({as:b,ref:n,className:re(I.root,s),"aria-sort":y,scope:v,ownerState:C},h))});process.env.NODE_ENV!=="production"&&(yc.propTypes={align:i.oneOf(["center","inherit","justify","left","right"]),children:i.node,classes:i.object,className:i.string,component:i.elementType,padding:i.oneOf(["checkbox","none","normal"]),scope:i.string,size:i.oneOfType([i.oneOf(["medium","small"]),i.string]),sortDirection:i.oneOf(["asc","desc",!1]),sx:i.oneOfType([i.arrayOf(i.oneOfType([i.func,i.object,i.bool])),i.func,i.object]),variant:i.oneOfType([i.oneOf(["body","footer","head"]),i.string])});function cR(e){return Ce("MuiTableContainer",e)}Te("MuiTableContainer",["root"]);const uR=["className","component"],dR=e=>{const{classes:t}=e;return Ee({root:["root"]},cR,t)},pR=Y("div",{name:"MuiTableContainer",slot:"Root",overridesResolver:(e,t)=>t.root})({width:"100%",overflowX:"auto"}),gm=E.forwardRef(function(t,n){const o=Ie({props:t,name:"MuiTableContainer"}),{className:r,component:s="div"}=o,a=oe(o,uR),c=T({},o,{component:s}),l=dR(c);return x.jsx(pR,T({ref:n,as:s,className:re(l.root,r),ownerState:c},a))});process.env.NODE_ENV!=="production"&&(gm.propTypes={children:i.node,classes:i.object,className:i.string,component:i.elementType,sx:i.oneOfType([i.arrayOf(i.oneOfType([i.func,i.object,i.bool])),i.func,i.object])});function fR(e){return Ce("MuiTableHead",e)}Te("MuiTableHead",["root"]);const hR=["className","component"],mR=e=>{const{classes:t}=e;return Ee({root:["root"]},fR,t)},gR=Y("thead",{name:"MuiTableHead",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"table-header-group"}),bR={variant:"head"},bm="thead",xc=E.forwardRef(function(t,n){const o=Ie({props:t,name:"MuiTableHead"}),{className:r,component:s=bm}=o,a=oe(o,hR),c=T({},o,{component:s}),l=mR(c);return x.jsx(ri.Provider,{value:bR,children:x.jsx(gR,T({as:s,className:re(l.root,r),ref:n,role:s===bm?null:"rowgroup",ownerState:c},a))})});process.env.NODE_ENV!=="production"&&(xc.propTypes={children:i.node,classes:i.object,className:i.string,component:i.elementType,sx:i.oneOfType([i.arrayOf(i.oneOfType([i.func,i.object,i.bool])),i.func,i.object])});const vR=pn(x.jsx("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"}),"KeyboardArrowLeft"),yR=pn(x.jsx("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"}),"KeyboardArrowRight");function xR(e){return Ce("MuiTableRow",e)}const vm=Te("MuiTableRow",["root","selected","hover","head","footer"]),CR=["className","component","hover","selected"],TR=e=>{const{classes:t,selected:n,hover:o,head:r,footer:s}=e;return Ee({root:["root",n&&"selected",o&&"hover",r&&"head",s&&"footer"]},xR,t)},ER=Y("tr",{name:"MuiTableRow",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.head&&t.head,n.footer&&t.footer]}})(({theme:e})=>({color:"inherit",display:"table-row",verticalAlign:"middle",outline:0,[`&.${vm.hover}:hover`]:{backgroundColor:(e.vars||e).palette.action.hover},[`&.${vm.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Be(e.palette.primary.main,e.palette.action.selectedOpacity),"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:Be(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity)}}})),ym="tr",ii=E.forwardRef(function(t,n){const o=Ie({props:t,name:"MuiTableRow"}),{className:r,component:s=ym,hover:a=!1,selected:c=!1}=o,l=oe(o,CR),u=E.useContext(ri),d=T({},o,{component:s,hover:a,selected:c,head:u&&u.variant==="head",footer:u&&u.variant==="footer"}),p=TR(d);return x.jsx(ER,T({as:s,ref:n,className:re(p.root,r),role:s===ym?null:"row",ownerState:d},l))});process.env.NODE_ENV!=="production"&&(ii.propTypes={children:i.node,classes:i.object,className:i.string,component:i.elementType,hover:i.bool,selected:i.bool,sx:i.oneOfType([i.arrayOf(i.oneOfType([i.func,i.object,i.bool])),i.func,i.object])});function IR(e){return(1+Math.sin(Math.PI*e-Math.PI/2))/2}function SR(e,t,n,o={},r=()=>{}){const{ease:s=IR,duration:a=300}=o;let c=null;const l=t[e];let u=!1;const d=()=>{u=!0},p=h=>{if(u){r(new Error("Animation cancelled"));return}c===null&&(c=h);const g=Math.min(1,(h-c)/a);if(t[e]=s(g)*(n-l)+l,g>=1){requestAnimationFrame(()=>{r(null)});return}requestAnimationFrame(p)};return l===n?(r(new Error("Element already at target position")),d):(requestAnimationFrame(p),d)}const wR=["onChange"],AR={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll"};function xm(e){const{onChange:t}=e,n=oe(e,wR),o=E.useRef(),r=E.useRef(null),s=()=>{o.current=r.current.offsetHeight-r.current.clientHeight};return Cn(()=>{const a=ns(()=>{const l=o.current;s(),l!==o.current&&t(o.current)}),c=Nn(r.current);return c.addEventListener("resize",a),()=>{a.clear(),c.removeEventListener("resize",a)}},[t]),E.useEffect(()=>{s(),t(o.current)},[t]),x.jsx("div",T({style:AR},n,{ref:r}))}process.env.NODE_ENV!=="production"&&(xm.propTypes={onChange:i.func.isRequired});function RR(e){return Ce("MuiTabScrollButton",e)}const OR=Te("MuiTabScrollButton",["root","vertical","horizontal","disabled"]),PR=["className","slots","slotProps","direction","orientation","disabled"],NR=e=>{const{classes:t,orientation:n,disabled:o}=e;return Ee({root:["root",n,o&&"disabled"]},RR,t)},MR=Y(Mn,{name:"MuiTabScrollButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.orientation&&t[n.orientation]]}})(({ownerState:e})=>T({width:40,flexShrink:0,opacity:.8,[`&.${OR.disabled}`]:{opacity:0}},e.orientation==="vertical"&&{width:"100%",height:40,"& svg":{transform:`rotate(${e.isRtl?-90:90}deg)`}})),Cm=E.forwardRef(function(t,n){var o,r;const s=Ie({props:t,name:"MuiTabScrollButton"}),{className:a,slots:c={},slotProps:l={},direction:u}=s,d=oe(s,PR),p=Vr(),h=T({isRtl:p},s),g=NR(h),m=(o=c.StartScrollButtonIcon)!=null?o:vR,f=(r=c.EndScrollButtonIcon)!=null?r:yR,b=zt({elementType:m,externalSlotProps:l.startScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:h}),v=zt({elementType:f,externalSlotProps:l.endScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:h});return x.jsx(MR,T({component:"div",className:re(g.root,a),ref:n,role:null,ownerState:h,tabIndex:null},d,{children:u==="left"?x.jsx(m,T({},b)):x.jsx(f,T({},v))}))});process.env.NODE_ENV!=="production"&&(Cm.propTypes={children:i.node,classes:i.object,className:i.string,direction:i.oneOf(["left","right"]).isRequired,disabled:i.bool,orientation:i.oneOf(["horizontal","vertical"]).isRequired,slotProps:i.shape({endScrollButtonIcon:i.oneOfType([i.func,i.object]),startScrollButtonIcon:i.oneOfType([i.func,i.object])}),slots:i.shape({EndScrollButtonIcon:i.elementType,StartScrollButtonIcon:i.elementType}),sx:i.oneOfType([i.arrayOf(i.oneOfType([i.func,i.object,i.bool])),i.func,i.object])});function kR(e){return Ce("MuiTabs",e)}const Cc=Te("MuiTabs",["root","vertical","flexContainer","flexContainerVertical","centered","scroller","fixed","scrollableX","scrollableY","hideScrollbar","scrollButtons","scrollButtonsHideMobile","indicator"]),DR=["aria-label","aria-labelledby","action","centered","children","className","component","allowScrollButtonsMobile","indicatorColor","onChange","orientation","ScrollButtonComponent","scrollButtons","selectionFollowsFocus","slots","slotProps","TabIndicatorProps","TabScrollButtonProps","textColor","value","variant","visibleScrollbar"],Tm=(e,t)=>e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:e.firstChild,Em=(e,t)=>e===t?e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:e.lastChild,Gs=(e,t,n)=>{let o=!1,r=n(e,t);for(;r;){if(r===e.firstChild){if(o)return;o=!0}const s=r.disabled||r.getAttribute("aria-disabled")==="true";if(!r.hasAttribute("tabindex")||s)r=n(e,r);else{r.focus();return}}},BR=e=>{const{vertical:t,fixed:n,hideScrollbar:o,scrollableX:r,scrollableY:s,centered:a,scrollButtonsHideMobile:c,classes:l}=e;return Ee({root:["root",t&&"vertical"],scroller:["scroller",n&&"fixed",o&&"hideScrollbar",r&&"scrollableX",s&&"scrollableY"],flexContainer:["flexContainer",t&&"flexContainerVertical",a&&"centered"],indicator:["indicator"],scrollButtons:["scrollButtons",c&&"scrollButtonsHideMobile"],scrollableX:[r&&"scrollableX"],hideScrollbar:[o&&"hideScrollbar"]},kR,l)},FR=Y("div",{name:"MuiTabs",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${Cc.scrollButtons}`]:t.scrollButtons},{[`& .${Cc.scrollButtons}`]:n.scrollButtonsHideMobile&&t.scrollButtonsHideMobile},t.root,n.vertical&&t.vertical]}})(({ownerState:e,theme:t})=>T({overflow:"hidden",minHeight:48,WebkitOverflowScrolling:"touch",display:"flex"},e.vertical&&{flexDirection:"column"},e.scrollButtonsHideMobile&&{[`& .${Cc.scrollButtons}`]:{[t.breakpoints.down("sm")]:{display:"none"}}})),jR=Y("div",{name:"MuiTabs",slot:"Scroller",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.scroller,n.fixed&&t.fixed,n.hideScrollbar&&t.hideScrollbar,n.scrollableX&&t.scrollableX,n.scrollableY&&t.scrollableY]}})(({ownerState:e})=>T({position:"relative",display:"inline-block",flex:"1 1 auto",whiteSpace:"nowrap"},e.fixed&&{overflowX:"hidden",width:"100%"},e.hideScrollbar&&{scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}},e.scrollableX&&{overflowX:"auto",overflowY:"hidden"},e.scrollableY&&{overflowY:"auto",overflowX:"hidden"})),VR=Y("div",{name:"MuiTabs",slot:"FlexContainer",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.flexContainer,n.vertical&&t.flexContainerVertical,n.centered&&t.centered]}})(({ownerState:e})=>T({display:"flex"},e.vertical&&{flexDirection:"column"},e.centered&&{justifyContent:"center"})),LR=Y("span",{name:"MuiTabs",slot:"Indicator",overridesResolver:(e,t)=>t.indicator})(({ownerState:e,theme:t})=>T({position:"absolute",height:2,bottom:0,width:"100%",transition:t.transitions.create()},e.indicatorColor==="primary"&&{backgroundColor:(t.vars||t).palette.primary.main},e.indicatorColor==="secondary"&&{backgroundColor:(t.vars||t).palette.secondary.main},e.vertical&&{height:"100%",width:2,right:0})),_R=Y(xm)({overflowX:"auto",overflowY:"hidden",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}),Im={};let Sm=!1;const wm=E.forwardRef(function(t,n){const o=Ie({props:t,name:"MuiTabs"}),r=ht(),s=Vr(),{"aria-label":a,"aria-labelledby":c,action:l,centered:u=!1,children:d,className:p,component:h="div",allowScrollButtonsMobile:g=!1,indicatorColor:m="primary",onChange:f,orientation:b="horizontal",ScrollButtonComponent:v=Cm,scrollButtons:S="auto",selectionFollowsFocus:C,slots:I={},slotProps:y={},TabIndicatorProps:A={},TabScrollButtonProps:w={},textColor:R="primary",value:P,variant:N="standard",visibleScrollbar:F=!1}=o,G=oe(o,DR),j=N==="scrollable",L=b==="vertical",_=L?"scrollTop":"scrollLeft",V=L?"top":"left",$=L?"bottom":"right",D=L?"clientHeight":"clientWidth",X=L?"height":"width",k=T({},o,{component:h,allowScrollButtonsMobile:g,indicatorColor:m,orientation:b,vertical:L,scrollButtons:S,textColor:R,variant:N,visibleScrollbar:F,fixed:!j,hideScrollbar:j&&!F,scrollableX:j&&!L,scrollableY:j&&L,centered:u&&!j,scrollButtonsHideMobile:!g}),z=BR(k),Z=zt({elementType:I.StartScrollButtonIcon,externalSlotProps:y.startScrollButtonIcon,ownerState:k}),Q=zt({elementType:I.EndScrollButtonIcon,externalSlotProps:y.endScrollButtonIcon,ownerState:k});process.env.NODE_ENV!=="production"&&u&&j&&console.error('MUI: You can not use the `centered={true}` and `variant="scrollable"` properties at the same time on a `Tabs` component.');const[U,ee]=E.useState(!1),[J,ne]=E.useState(Im),[te,ie]=E.useState(!1),[ce,le]=E.useState(!1),[B,ue]=E.useState(!1),[fe,ge]=E.useState({overflow:"hidden",scrollbarWidth:0}),He=new Map,Xe=E.useRef(null),Oe=E.useRef(null),ot=()=>{const q=Xe.current;let se;if(q){const Re=q.getBoundingClientRect();se={clientWidth:q.clientWidth,scrollLeft:q.scrollLeft,scrollTop:q.scrollTop,scrollLeftNormalized:O1(q,s?"rtl":"ltr"),scrollWidth:q.scrollWidth,top:Re.top,bottom:Re.bottom,left:Re.left,right:Re.right}}let Se;if(q&&P!==!1){const Re=Oe.current.children;if(Re.length>0){const qe=Re[He.get(P)];process.env.NODE_ENV!=="production"&&(qe||console.error(["MUI: The `value` provided to the Tabs component is invalid.",`None of the Tabs' children match with "${P}".`,He.keys?`You can provide one of the following values: ${Array.from(He.keys()).join(", ")}.`:null].join(`
|
|
236
236
|
`))),Se=qe?qe.getBoundingClientRect():null,process.env.NODE_ENV!=="production"&&process.env.NODE_ENV!=="test"&&!Sm&&Se&&Se.width===0&&Se.height===0&&se.clientWidth!==0&&(se=null,console.error(["MUI: The `value` provided to the Tabs component is invalid.",`The Tab with this \`value\` ("${P}") is not part of the document layout.`,"Make sure the tab item is present in the document or that it's not `display: none`."].join(`
|
|
237
237
|
`)),Sm=!0)}}return{tabsMeta:se,tabMeta:Se}},je=dn(()=>{const{tabsMeta:q,tabMeta:se}=ot();let Se=0,Re;if(L)Re="top",se&&q&&(Se=se.top-q.top+q.scrollTop);else if(Re=s?"right":"left",se&&q){const vt=s?q.scrollLeftNormalized+q.clientWidth-q.scrollWidth:q.scrollLeft;Se=(s?-1:1)*(se[Re]-q[Re]+vt)}const qe={[Re]:Se,[X]:se?se[X]:0};if(isNaN(J[Re])||isNaN(J[X]))ne(qe);else{const vt=Math.abs(J[Re]-qe[Re]),xt=Math.abs(J[X]-qe[X]);(vt>=1||xt>=1)&&ne(qe)}}),Ne=(q,{animation:se=!0}={})=>{se?SR(_,Xe.current,q,{duration:r.transitions.duration.standard}):Xe.current[_]=q},Je=q=>{let se=Xe.current[_];L?se+=q:(se+=q*(s?-1:1),se*=s&&nf()==="reverse"?-1:1),Ne(se)},Qe=()=>{const q=Xe.current[D];let se=0;const Se=Array.from(Oe.current.children);for(let Re=0;Re<Se.length;Re+=1){const qe=Se[Re];if(se+qe[D]>q){Re===0&&(se=q);break}se+=qe[D]}return se},ke=()=>{Je(-1*Qe())},rt=()=>{Je(Qe())},bt=E.useCallback(q=>{ge({overflow:null,scrollbarWidth:q})},[]),dt=()=>{const q={};q.scrollbarSizeListener=j?x.jsx(_R,{onChange:bt,className:re(z.scrollableX,z.hideScrollbar)}):null;const Se=j&&(S==="auto"&&(te||ce)||S===!0);return q.scrollButtonStart=Se?x.jsx(v,T({slots:{StartScrollButtonIcon:I.StartScrollButtonIcon},slotProps:{startScrollButtonIcon:Z},orientation:b,direction:s?"right":"left",onClick:ke,disabled:!te},w,{className:re(z.scrollButtons,w.className)})):null,q.scrollButtonEnd=Se?x.jsx(v,T({slots:{EndScrollButtonIcon:I.EndScrollButtonIcon},slotProps:{endScrollButtonIcon:Q},orientation:b,direction:s?"left":"right",onClick:rt,disabled:!ce},w,{className:re(z.scrollButtons,w.className)})):null,q},Ae=dn(q=>{const{tabsMeta:se,tabMeta:Se}=ot();if(!(!Se||!se)){if(Se[V]<se[V]){const Re=se[_]+(Se[V]-se[V]);Ne(Re,{animation:q})}else if(Se[$]>se[$]){const Re=se[_]+(Se[$]-se[$]);Ne(Re,{animation:q})}}}),pe=dn(()=>{j&&S!==!1&&ue(!B)});E.useEffect(()=>{const q=ns(()=>{Xe.current&&je()});let se;const Se=vt=>{vt.forEach(xt=>{xt.removedNodes.forEach(ln=>{var Dt;(Dt=se)==null||Dt.unobserve(ln)}),xt.addedNodes.forEach(ln=>{var Dt;(Dt=se)==null||Dt.observe(ln)})}),q(),pe()},Re=Nn(Xe.current);Re.addEventListener("resize",q);let qe;return typeof ResizeObserver<"u"&&(se=new ResizeObserver(q),Array.from(Oe.current.children).forEach(vt=>{se.observe(vt)})),typeof MutationObserver<"u"&&(qe=new MutationObserver(Se),qe.observe(Oe.current,{childList:!0})),()=>{var vt,xt;q.clear(),Re.removeEventListener("resize",q),(vt=qe)==null||vt.disconnect(),(xt=se)==null||xt.disconnect()}},[je,pe]),E.useEffect(()=>{const q=Array.from(Oe.current.children),se=q.length;if(typeof IntersectionObserver<"u"&&se>0&&j&&S!==!1){const Se=q[0],Re=q[se-1],qe={root:Xe.current,threshold:.99},vt=_n=>{ie(!_n[0].isIntersecting)},xt=new IntersectionObserver(vt,qe);xt.observe(Se);const ln=_n=>{le(!_n[0].isIntersecting)},Dt=new IntersectionObserver(ln,qe);return Dt.observe(Re),()=>{xt.disconnect(),Dt.disconnect()}}},[j,S,B,d==null?void 0:d.length]),E.useEffect(()=>{ee(!0)},[]),E.useEffect(()=>{je()}),E.useEffect(()=>{Ae(Im!==J)},[Ae,J]),E.useImperativeHandle(l,()=>({updateIndicator:je,updateScrollButtons:pe}),[je,pe]);const et=x.jsx(LR,T({},A,{className:re(z.indicator,A.className),ownerState:k,style:T({},J,A.style)}));let Tt=0;const Ot=E.Children.map(d,q=>{if(!E.isValidElement(q))return null;process.env.NODE_ENV!=="production"&&Wo.isFragment(q)&&console.error(["MUI: The Tabs component doesn't accept a Fragment as a child.","Consider providing an array instead."].join(`
|
|
238
|
-
`));const se=q.props.value===void 0?Tt:q.props.value;He.set(se,Tt);const Se=se===P;return Tt+=1,E.cloneElement(q,T({fullWidth:N==="fullWidth",indicator:Se&&!U&&et,selected:Se,selectionFollowsFocus:C,onChange:f,textColor:R,value:se},Tt===1&&P===!1&&!q.props.tabIndex?{tabIndex:0}:{}))}),an=q=>{const se=Oe.current,Se=wt(se).activeElement;if(Se.getAttribute("role")!=="tab")return;let qe=b==="horizontal"?"ArrowLeft":"ArrowUp",vt=b==="horizontal"?"ArrowRight":"ArrowDown";switch(b==="horizontal"&&s&&(qe="ArrowRight",vt="ArrowLeft"),q.key){case qe:q.preventDefault(),Gs(se,Se,Em);break;case vt:q.preventDefault(),Gs(se,Se,Tm);break;case"Home":q.preventDefault(),Gs(se,null,Tm);break;case"End":q.preventDefault(),Gs(se,null,Em);break}},de=dt();return x.jsxs(FR,T({className:re(z.root,p),ownerState:k,ref:n,as:h},G,{children:[de.scrollButtonStart,de.scrollbarSizeListener,x.jsxs(jR,{className:z.scroller,ownerState:k,style:{overflow:fe.overflow,[L?`margin${s?"Left":"Right"}`:"marginBottom"]:F?void 0:-fe.scrollbarWidth},ref:Xe,children:[x.jsx(VR,{"aria-label":a,"aria-labelledby":c,"aria-orientation":b==="vertical"?"vertical":null,className:z.flexContainer,ownerState:k,onKeyDown:an,ref:Oe,role:"tablist",children:Ot}),U&&et]}),de.scrollButtonEnd]}))});process.env.NODE_ENV!=="production"&&(wm.propTypes={action:Nt,allowScrollButtonsMobile:i.bool,"aria-label":i.string,"aria-labelledby":i.string,centered:i.bool,children:i.node,classes:i.object,className:i.string,component:i.elementType,indicatorColor:i.oneOfType([i.oneOf(["primary","secondary"]),i.string]),onChange:i.func,orientation:i.oneOf(["horizontal","vertical"]),ScrollButtonComponent:i.elementType,scrollButtons:i.oneOf(["auto",!1,!0]),selectionFollowsFocus:i.bool,slotProps:i.shape({endScrollButtonIcon:i.oneOfType([i.func,i.object]),startScrollButtonIcon:i.oneOfType([i.func,i.object])}),slots:i.shape({EndScrollButtonIcon:i.elementType,StartScrollButtonIcon:i.elementType}),sx:i.oneOfType([i.arrayOf(i.oneOfType([i.func,i.object,i.bool])),i.func,i.object]),TabIndicatorProps:i.object,TabScrollButtonProps:i.object,textColor:i.oneOf(["inherit","primary","secondary"]),value:i.any,variant:i.oneOf(["fullWidth","scrollable","standard"]),visibleScrollbar:i.bool});function $R(e){return Ce("MuiTextField",e)}Te("MuiTextField",["root"]);const WR=["autoComplete","autoFocus","children","className","color","defaultValue","disabled","error","FormHelperTextProps","fullWidth","helperText","id","InputLabelProps","inputProps","InputProps","inputRef","label","maxRows","minRows","multiline","name","onBlur","onChange","onFocus","placeholder","required","rows","select","SelectProps","type","value","variant"],GR={standard:Vs,filled:js,outlined:_s},zR=e=>{const{classes:t}=e;return Ee({root:["root"]},$R,t)},HR=Y(Dh,{name:"MuiTextField",slot:"Root",overridesResolver:(e,t)=>t.root})({}),Am=E.forwardRef(function(t,n){const o=Ie({props:t,name:"MuiTextField"}),{autoComplete:r,autoFocus:s=!1,children:a,className:c,color:l="primary",defaultValue:u,disabled:d=!1,error:p=!1,FormHelperTextProps:h,fullWidth:g=!1,helperText:m,id:f,InputLabelProps:b,inputProps:v,InputProps:S,inputRef:C,label:I,maxRows:y,minRows:A,multiline:w=!1,name:R,onBlur:P,onChange:N,onFocus:F,placeholder:G,required:j=!1,rows:L,select:_=!1,SelectProps:V,type:$,value:D,variant:X="outlined"}=o,k=oe(o,WR),z=T({},o,{autoFocus:s,color:l,disabled:d,error:p,fullWidth:g,multiline:w,required:j,select:_,variant:X}),Z=zR(z);process.env.NODE_ENV!=="production"&&_&&!a&&console.error("MUI: `children` must be passed when using the `TextField` component with `select`.");const Q={};X==="outlined"&&(b&&typeof b.shrink<"u"&&(Q.notched=b.shrink),Q.label=I),_&&((!V||!V.native)&&(Q.id=void 0),Q["aria-describedby"]=void 0);const U=os(f),ee=m&&U?`${U}-helper-text`:void 0,J=I&&U?`${U}-label`:void 0,ne=GR[X],te=x.jsx(ne,T({"aria-describedby":ee,autoComplete:r,autoFocus:s,defaultValue:u,fullWidth:g,multiline:w,name:R,rows:L,maxRows:y,minRows:A,type:$,value:D,id:U,inputRef:C,onBlur:P,onChange:N,onFocus:F,placeholder:G,inputProps:v},Q,S));return x.jsxs(HR,T({className:re(Z.root,c),disabled:d,error:p,fullWidth:g,ref:n,required:j,color:l,variant:X,ownerState:z},k,{children:[I!=null&&I!==""&&x.jsx(Lh,T({htmlFor:U,id:J},b,{children:I})),_?x.jsx(hc,T({"aria-describedby":ee,id:U,labelId:J,value:D,input:te},V,{children:a})):te,m&&x.jsx(jh,T({id:ee},h,{children:m}))]}))});process.env.NODE_ENV!=="production"&&(Am.propTypes={autoComplete:i.string,autoFocus:i.bool,children:i.node,classes:i.object,className:i.string,color:i.oneOfType([i.oneOf(["primary","secondary","error","info","success","warning"]),i.string]),defaultValue:i.any,disabled:i.bool,error:i.bool,FormHelperTextProps:i.object,fullWidth:i.bool,helperText:i.node,id:i.string,InputLabelProps:i.object,inputProps:i.object,InputProps:i.object,inputRef:Nt,label:i.node,margin:i.oneOf(["dense","none","normal"]),maxRows:i.oneOfType([i.number,i.string]),minRows:i.oneOfType([i.number,i.string]),multiline:i.bool,name:i.string,onBlur:i.func,onChange:i.func,onFocus:i.func,placeholder:i.string,required:i.bool,rows:i.oneOfType([i.number,i.string]),select:i.bool,SelectProps:i.object,size:i.oneOfType([i.oneOf(["medium","small"]),i.string]),sx:i.oneOfType([i.arrayOf(i.oneOfType([i.func,i.object,i.bool])),i.func,i.object]),type:i.string,value:i.any,variant:i.oneOf(["filled","outlined","standard"])});const XR={light:cs({palette:{primary:{appBackground:"#FFFFFF",main:"#f5f7fa",notifyBackground:"#F8FAFB",notifyTextColor:"#525252",notifyActiveText:"#282A2A",notifyBorderColor:"#D0D4DA",notifyTooltipBackground:"#07080B",notifyButtonBackground:"#E6EAEC",notifyActiveBorderColor:"#1D1D1D",notifyIconColor:"#666D80"},brandColor:{blue:"#0166FF",orange:"#E94F1C",grey1:"#595959",main:"#FF6D33",grey3:"#898A93"}},typography:{fontFamily:"Euclid Circular Regular, sans-serif",fontSize:12,fontWeightMedium:"bold",fontWeightRegular:"lighter"},components:{MuiDrawer:{defaultProps:{disableRipple:!0}}}}),dark:cs({palette:{primary:{appBackground:"#101010",main:"#f5f7fa",notifyBackground:"#1D1D1D",notifyTextColor:"#A8A8A8",notifyActiveText:"#FFFFFF",notifyBorderColor:"#313133",notifyTooltipBackground:"#07080B",notifyButtonBackground:"#2C2C2F",notifyActiveBorderColor:"#FFFFFF",notifyIconColor:"#909090"},brandColor:{blue:"#0166FF",orange:"#E94F1C",grey1:"#595959",main:"#FF6D33",grey3:"#898A93"}},typography:{fontFamily:"Euclid Circular Regular, sans-serif",fontSize:12,fontWeightMedium:"bold",fontWeightRegular:"lighter"},components:{MuiDrawer:{defaultProps:{disableRipple:!0}}}})};function Rm({children:e}){var n,o;const t=((o=(n=JSON.parse(localStorage.getItem("settings")))==null?void 0:n.platform)==null?void 0:o.theme)||"light";return x.jsx(Vf,{theme:XR[t],children:e})}const Om=M.createContext(null),Tc=M.createContext(null);function Pm({children:e}){const[t,n]=M.useReducer(UR,ZR);return x.jsx(Om.Provider,{value:t,children:x.jsx(Tc.Provider,{value:n,children:x.jsx(Rm,{children:e})})})}function UR(e,t){switch(t.type){case tt.SET_GRID_DATA:return{...e,...t.payload};default:throw new Error(`${bn.UNHANDLED}: ${t}`)}}const ZR={visibleGridColumns:[]};Pm.propTypes={children:i.node.isRequired};const YR=({columns:e})=>{const{definitions:t,defaultUserSettings:n,labels:o}=e,r=n.reduce((l,u)=>(l[u.key]=u,l),{}),s=o.reduce((l,u)=>(l[u.key]=u,l),{}),a=[];for(const l of t){const{key:u}=l,d=r[u],p=s[u];let h={...l,...d,...p};a.push(h)}return a.sort((l,u)=>l.sequenceId-u.sequenceId)},Dn={Search:"data:image/svg+xml,%3csvg%20width='16'%20height='15'%20viewBox='0%200%2016%2015'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M7.6503%2013.8006C11.3232%2013.8006%2014.3006%2010.8232%2014.3006%207.15029C14.3006%203.47744%2011.3232%200.5%207.6503%200.5C3.97744%200.5%201%203.47744%201%207.15029C1%2010.8232%203.97744%2013.8006%207.6503%2013.8006Z'%20stroke='%23898A93'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M14.9997%2014.5006L13.5996%2013.1006'%20stroke='%23898A93'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",Refresh:"data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M6.0733%203.38664C6.6533%203.21331%207.2933%203.09998%207.99997%203.09998C11.1933%203.09998%2013.78%205.68664%2013.78%208.87998C13.78%2012.0733%2011.1933%2014.66%207.99997%2014.66C4.80664%2014.66%202.21997%2012.0733%202.21997%208.87998C2.21997%207.69331%202.57997%206.58664%203.1933%205.66664'%20stroke='%232176FF'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M5.2467%203.54671L7.17337%201.33337'%20stroke='%232176FF'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M5.2467%203.54663L7.49337%205.18663'%20stroke='%232176FF'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",Close:"data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='12'%20height='12'%20viewBox='0%200%2024%2024'%3e%3ccircle%20cx='12'%20cy='12'%20r='11'%20fill='none'%20stroke='%23E85353'%20stroke-width='2'/%3e%3cpath%20d='M8.5%208.5l7%207M15.5%208.5l-7%207'%20stroke='%23E85353'%20stroke-width='2'/%3e%3c/svg%3e",Unsort:"data:image/svg+xml,%3csvg%20width='10'%20height='10'%20viewBox='0%200%2010%2012'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M0.646447%203.24676C0.451184%203.44202%200.451184%203.7586%200.646447%203.95387C0.841709%204.14913%201.15829%204.14913%201.35355%203.95387L0.646447%203.24676ZM3.40012%201.2002H3.90012C3.90012%200.997964%203.7783%200.815646%203.59146%200.738256C3.40462%200.660865%203.18956%200.703643%203.04656%200.846642L3.40012%201.2002ZM2.90012%2010.8007C2.90012%2011.0768%203.12398%2011.3007%203.40012%2011.3007C3.67626%2011.3007%203.90012%2011.0768%203.90012%2010.8007H2.90012ZM9.35377%208.7541C9.54903%208.55884%209.54903%208.24226%209.35377%208.04699C9.15851%207.85173%208.84193%207.85173%208.64666%208.04699L9.35377%208.7541ZM6.6001%2010.8007H6.1001C6.1001%2011.0029%206.22192%2011.1852%206.40876%2011.2626C6.5956%2011.34%206.81065%2011.2972%206.95365%2011.1542L6.6001%2010.8007ZM7.1001%201.2002C7.1001%200.924053%206.87624%200.700195%206.6001%200.700195C6.32396%200.700195%206.1001%200.924053%206.1001%201.2002H7.1001ZM1.35355%203.95387L3.75367%201.55375L3.04656%200.846642L0.646447%203.24676L1.35355%203.95387ZM2.90012%201.2002V10.8007H3.90012V1.2002H2.90012ZM8.64666%208.04699L6.24655%2010.4471L6.95365%2011.1542L9.35377%208.7541L8.64666%208.04699ZM7.1001%2010.8007V1.2002H6.1001V10.8007H7.1001Z'%20fill='%23909090'/%3e%3c/svg%3e",AscSort:"data:image/svg+xml,%3csvg%20width='9'%20height='12'%20viewBox='0%200%209%2012'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M8%204.59888L4.5%201.09888L1%204.59888'%20stroke='%23909090'%20stroke-miterlimit='10'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M4.5%2010.9013V1.19702'%20stroke='%23909090'%20stroke-miterlimit='10'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",DescSort:"data:image/svg+xml,%3csvg%20width='9'%20height='12'%20viewBox='0%200%209%2012'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M1%207.40112L4.5%2010.9011L8%207.40112'%20stroke='%23909090'%20stroke-miterlimit='10'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M4.5%201.09869L4.5%2010.803'%20stroke='%23909090'%20stroke-miterlimit='10'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",Menu:"data:image/svg+xml,%3csvg%20width='4'%20height='10'%20viewBox='0%200%204%2010'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M2%207.5C1.45%207.5%201%207.95%201%208.5C1%209.05%201.45%209.5%202%209.5C2.55%209.5%203%209.05%203%208.5C3%207.95%202.55%207.5%202%207.5Z'%20stroke='%23909090'%20stroke-width='0.7'/%3e%3cpath%20d='M2%204C1.45%204%201%204.45%201%205C1%205.55%201.45%206%202%206C2.55%206%203%205.55%203%205C3%204.45%202.55%204%202%204Z'%20stroke='%23909090'%20stroke-width='0.7'/%3e%3cpath%20d='M2%200.5C1.45%200.5%201%200.95%201%201.5C1%202.05%201.45%202.5%202%202.5C2.55%202.5%203%202.05%203%201.5C3%200.95%202.55%200.5%202%200.5Z'%20stroke='%23909090'%20stroke-width='0.7'/%3e%3c/svg%3e",Manage:"data:image/svg+xml,%3csvg%20width='15'%20height='16'%20viewBox='0%200%2015%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M6.56152%2012.937V3.06201C6.56152%202.12451%206.16152%201.74951%205.16777%201.74951H2.64277C1.64902%201.74951%201.24902%202.12451%201.24902%203.06201V12.937C1.24902%2013.8745%201.64902%2014.2495%202.64277%2014.2495H5.16777C6.16152%2014.2495%206.56152%2013.8745%206.56152%2012.937Z'%20stroke='%23909090'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M13.75%2012.937V3.06201C13.75%202.12451%2013.35%201.74951%2012.3563%201.74951H9.83125C8.8375%201.74951%208.4375%202.12451%208.4375%203.06201V12.937C8.4375%2013.8745%208.8375%2014.2495%209.83125%2014.2495H12.3563C13.35%2014.2495%2013.75%2013.8745%2013.75%2012.937Z'%20stroke='%23909090'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",ArrowSelectUp:"data:image/svg+xml,%3csvg%20width='10'%20height='5'%20viewBox='0%200%2010%205'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M9%200.595703L5.50126%204.09444C5.08807%204.50763%204.41193%204.50763%203.99874%204.09444L0.5%200.595703'%20stroke='%23909090'%20stroke-miterlimit='10'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",ArrowSelectDown:"data:image/svg+xml,%3csvg%20width='10'%20height='5'%20viewBox='0%200%2010%205'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M9%204.4043L5.50126%200.90556C5.08807%200.492365%204.41193%200.492365%203.99874%200.90556L0.5%204.4043'%20stroke='%23909090'%20stroke-miterlimit='10'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",Upload:"data:image/svg+xml,%3csvg%20width='15'%20height='15'%20viewBox='0%200%2014%2014'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M5.25016%209.9165V6.4165L4.0835%207.58317'%20stroke='white'%20stroke-width='0.8'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M5.25%206.4165L6.41667%207.58317'%20stroke='white'%20stroke-width='0.8'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M12.8332%205.83317V8.74984C12.8332%2011.6665%2011.6665%2012.8332%208.74984%2012.8332H5.24984C2.33317%2012.8332%201.1665%2011.6665%201.1665%208.74984V5.24984C1.1665%202.33317%202.33317%201.1665%205.24984%201.1665H8.1665'%20stroke='white'%20stroke-width='0.8'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M12.8332%205.83317H10.4998C8.74984%205.83317%208.1665%205.24984%208.1665%203.49984V1.1665L12.8332%205.83317Z'%20stroke='white'%20stroke-width='0.8'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",Download:"data:image/svg+xml,%3csvg%20width='15'%20height='15'%20viewBox='0%200%2014%2014'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M5.25%206.41699V9.91699L6.41667%208.75033'%20stroke='%23909090'%20stroke-width='0.8'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M5.25114%209.91667L4.08447%208.75'%20stroke='%23909090'%20stroke-width='0.8'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M12.8322%205.83366V8.75033C12.8322%2011.667%2011.6655%2012.8337%208.74886%2012.8337H5.24886C2.33219%2012.8337%201.16553%2011.667%201.16553%208.75033V5.25033C1.16553%202.33366%202.33219%201.16699%205.24886%201.16699H8.16553'%20stroke='%23909090'%20stroke-width='0.8'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M12.8322%205.83366H10.4989C8.74886%205.83366%208.16553%205.25033%208.16553%203.50033V1.16699L12.8322%205.83366Z'%20stroke='%23909090'%20stroke-width='0.8'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",More:"data:image/svg+xml,%3csvg%20width='15'%20height='16'%20viewBox='0%200%2015%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M2.4531%202.16699H7.64478C8.07645%202.16699%208.43227%202.52283%208.43227%202.9545V3.81782C8.43227%204.13282%208.23395%204.52366%208.04145%204.722L6.3498%206.21533C6.11647%206.41366%205.95894%206.80449%205.95894%207.11949V8.81117C5.95894%209.0445%205.80145%209.3595%205.60312%209.482L5.05478%209.83782C4.54145%2010.1528%203.8356%209.79699%203.8356%209.16699V7.08449C3.8356%206.81032%203.67811%206.4545%203.52061%206.25616L2.02728%204.68116C1.82895%204.48282%201.67146%204.13282%201.67146%203.89365V2.98949C1.66562%202.52283%202.02144%202.16699%202.4531%202.16699Z'%20stroke='white'%20stroke-miterlimit='10'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M1.66211%207.99998V9.74998C1.66211%2012.6666%202.82878%2013.8333%205.74544%2013.8333H9.24544C12.1621%2013.8333%2013.3288%2012.6666%2013.3288%209.74998V6.24998C13.3288%204.42998%2012.8738%203.28664%2011.8179%202.69164C11.5204%202.52248%2010.9254%202.39414%2010.3829%202.30664'%20stroke='white'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M8.08789%208.5835H11.0046'%20stroke='white'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M6.91211%2010.9165H10.9954'%20stroke='white'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e"},Nm=({sortKey:e,sortField:t,sortDir:n,handleSortClick:o})=>{const r=s=>x.jsx($r,{onClick:o,children:x.jsx(be,{component:"img",src:s})});return x.jsx(x.Fragment,{children:r(t===e?n==="asc"?Dn.AscSort:Dn.DescSort:Dn.Unsort)})};Nm.propTypes={sortKey:i.string.isRequired,sortField:i.string,sortDir:i.string,handleSortClick:i.func};function Mm({column:e,sort:t,handleMenuClick:n,isManageable:o}){const r=e==null?void 0:e.isMandatory,s=e==null?void 0:e.label,a=e==null?void 0:e.isSortable,c=t==null?void 0:t.sortField,l=t==null?void 0:t.sortDir,u=t==null?void 0:t.onSort;return x.jsxs(be,{sx:{display:"flex",alignItems:"center",justifyContent:"center",fontSize:"1.1rem"},children:[s,a&&x.jsx(Nm,{sortKey:e==null?void 0:e.key,sortField:c,sortDir:l,handleSortClick:()=>u({column:e,sortDir:l,sortField:c})}),o&&!r&&x.jsx($r,{onClick:d=>n(d,e),children:x.jsx(be,{component:"img",src:Dn.Menu})})]})}Mm.propTypes={column:i.object.isRequired,sort:i.object.isRequired,handleMenuClick:i.func,isManageable:i.bool};const Ec=e=>{const t=localStorage.getItem(e);return t?JSON.parse(t):""},JR=e=>{const t=new Date,n=new Date(e);let o=t-n;o<0&&(o=0);const r=Math.floor(o/1e3),s=Math.floor(r/60);return r<60?`${r} sec ago`:s<60?`${s} min ago`:n.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",hour12:!0})},Ic=e=>e.sort((n,o)=>{let r=new Date(n.createdAt),s=new Date(o.createdAt);return r===s?0:r>s?-1:1}).sort((n,o)=>n.isRead===o.isRead?0:o.isRead?-1:1),qR=e=>{let t=0;for(let n=0;n<e.length;n++)e[n].isRead||t++;return t},KR=e=>{const t=[];return e.forEach(n=>{n.isRead||t.push(n.id)}),t},QR=(e,t,n)=>e.filter(r=>t.some(s=>{var a,c,l;return(l=(a=r[s])==null?void 0:a.toLowerCase())==null?void 0:l.includes((c=n==null?void 0:n.trim())==null?void 0:c.toLowerCase())})),eO=(e,t,n)=>e.sort((r,s)=>n==="asc"?r[t].toLowerCase().localeCompare(s[t].toLowerCase()):s[t].toLowerCase().localeCompare(r[t].toLowerCase())),Sc=(e,t,n)=>e.slice((t-1)*n,t*n),wc=e=>{var r;const t=JSON.parse(localStorage.getItem("configuration")),n=((r=t==null?void 0:t.entities)==null?void 0:r.labelChannel)||"Channel";return e.split("_").map(s=>s==="channel"?n:s[0].toUpperCase()+s.substring(1)).join(" ")},tO=e=>{const t=e.reduce((o,r)=>{const s=new Date(r==null?void 0:r.createdAt),a=new Intl.DateTimeFormat("en-US",{day:"numeric",month:"long",year:"numeric"}).format(s);return o[a]||(o[a]=[]),o[a].push(r),o},{});return Object.fromEntries(Object.entries(t).sort(([o],[r])=>new Date(r)-new Date(o)))},nO=(e,t=20)=>(e==null?void 0:e.length)>t?`${e.slice(0,t)}...`:e;function km({isRenderCellContent:e,column:t,row:n}){const o=n[t.key];return x.jsx(dm,{title:(o==null?void 0:o.length)>20?o:"",arrow:!0,children:x.jsx(be,{sx:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",textTransform:"none",fontSize:"1.1rem"},component:"label",children:e?t==null?void 0:t.cellRenderer(n):nO(o)})})}km.propTypes={isRenderCellContent:i.bool,column:i.object,row:i.object};const Dm=M.createContext({});function oO(e){const t=M.useRef(null);return t.current===null&&(t.current=e()),t.current}const Ac=M.createContext(null),Bm=M.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function rO(e=!0){const t=M.useContext(Ac);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:o,register:r}=t,s=M.useId();M.useEffect(()=>{e&&r(s)},[e]);const a=M.useCallback(()=>e&&o&&o(s),[s,o,e]);return!n&&o?[!1,a]:[!0]}const Rc=typeof window<"u",iO=Rc?M.useLayoutEffect:M.useEffect,Lt=e=>e;let rr=Lt,Jn=Lt;process.env.NODE_ENV!=="production"&&(rr=(e,t)=>{!e&&typeof console<"u"&&console.warn(t)},Jn=(e,t)=>{if(!e)throw new Error(t)});function Oc(e){let t;return()=>(t===void 0&&(t=e()),t)}const ir=(e,t,n)=>{const o=t-e;return o===0?1:(n-e)/o},Sn=e=>e*1e3,Bn=e=>e/1e3,sO={skipAnimations:!1,useManualTiming:!1},zs=["read","resolveKeyframes","update","preRender","render","postRender"],Fm={value:null,addProjectionMetrics:null};function aO(e,t){let n=new Set,o=new Set,r=!1,s=!1;const a=new WeakSet;let c={delta:0,timestamp:0,isProcessing:!1},l=0;function u(p){a.has(p)&&(d.schedule(p),e()),l++,p(c)}const d={schedule:(p,h=!1,g=!1)=>{const f=g&&r?n:o;return h&&a.add(p),f.has(p)||f.add(p),p},cancel:p=>{o.delete(p),a.delete(p)},process:p=>{if(c=p,r){s=!0;return}r=!0,[n,o]=[o,n],n.forEach(u),t&&Fm.value&&Fm.value.frameloop[t].push(l),l=0,n.clear(),r=!1,s&&(s=!1,d.process(p))}};return d}const lO=40;function jm(e,t){let n=!1,o=!0;const r={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,a=zs.reduce((v,S)=>(v[S]=aO(s,t?S:void 0),v),{}),{read:c,resolveKeyframes:l,update:u,preRender:d,render:p,postRender:h}=a,g=()=>{const v=performance.now();n=!1,r.delta=o?1e3/60:Math.max(Math.min(v-r.timestamp,lO),1),r.timestamp=v,r.isProcessing=!0,c.process(r),l.process(r),u.process(r),d.process(r),p.process(r),h.process(r),r.isProcessing=!1,n&&t&&(o=!1,e(g))},m=()=>{n=!0,o=!0,r.isProcessing||e(g)};return{schedule:zs.reduce((v,S)=>{const C=a[S];return v[S]=(I,y=!1,A=!1)=>(n||m(),C.schedule(I,y,A)),v},{}),cancel:v=>{for(let S=0;S<zs.length;S++)a[zs[S]].cancel(v)},state:r,steps:a}}const{schedule:Ke,cancel:qn,state:It,steps:Pc}=jm(typeof requestAnimationFrame<"u"?requestAnimationFrame:Lt,!0),Vm=M.createContext({strict:!1}),Lm={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},sr={};for(const e in Lm)sr[e]={isEnabled:t=>Lm[e].some(n=>!!t[n])};function cO(e){for(const t in e)sr[t]={...sr[t],...e[t]}}const uO=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function Hs(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||uO.has(e)}let _m=e=>!Hs(e);function dO(e){e&&(_m=t=>t.startsWith("on")?!Hs(t):e(t))}try{dO(require("@emotion/is-prop-valid").default)}catch{}function pO(e,t,n){const o={};for(const r in e)r==="values"&&typeof e.values=="object"||(_m(r)||n===!0&&Hs(r)||!t&&!Hs(r)||e.draggable&&r.startsWith("onDrag"))&&(o[r]=e[r]);return o}const $m=new Set;function Xs(e,t,n){e||$m.has(t)||(console.warn(t),$m.add(t))}function fO(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...o)=>(process.env.NODE_ENV!=="production"&&Xs(!1,"motion() is deprecated. Use motion.create() instead."),e(...o));return new Proxy(n,{get:(o,r)=>r==="create"?e:(t.has(r)||t.set(r,e(r)),t.get(r))})}const Us=M.createContext({});function Zs(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function si(e){return typeof e=="string"||Array.isArray(e)}const Nc=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Mc=["initial",...Nc];function Ys(e){return Zs(e.animate)||Mc.some(t=>si(e[t]))}function Wm(e){return!!(Ys(e)||e.variants)}function hO(e,t){if(Ys(e)){const{initial:n,animate:o}=e;return{initial:n===!1||si(n)?n:void 0,animate:si(o)?o:void 0}}return e.inherit!==!1?t:{}}function mO(e){const{initial:t,animate:n}=hO(e,M.useContext(Us));return M.useMemo(()=>({initial:t,animate:n}),[Gm(t),Gm(n)])}function Gm(e){return Array.isArray(e)?e.join(" "):e}const gO=Symbol.for("motionComponentSymbol");function ar(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function bO(e,t,n){return M.useCallback(o=>{o&&e.onMount&&e.onMount(o),t&&(o?t.mount(o):t.unmount()),n&&(typeof n=="function"?n(o):ar(n)&&(n.current=o))},[t])}const kc=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),zm="data-"+kc("framerAppearId"),{schedule:Dc,cancel:_j}=jm(queueMicrotask,!1),Hm=M.createContext({});function vO(e,t,n,o,r){var s,a;const{visualElement:c}=M.useContext(Us),l=M.useContext(Vm),u=M.useContext(Ac),d=M.useContext(Bm).reducedMotion,p=M.useRef(null);o=o||l.renderer,!p.current&&o&&(p.current=o(e,{visualState:t,parent:c,props:n,presenceContext:u,blockInitialAnimation:u?u.initial===!1:!1,reducedMotionConfig:d}));const h=p.current,g=M.useContext(Hm);h&&!h.projection&&r&&(h.type==="html"||h.type==="svg")&&yO(p.current,n,r,g);const m=M.useRef(!1);M.useInsertionEffect(()=>{h&&m.current&&h.update(n,u)});const f=n[zm],b=M.useRef(!!f&&!(!((s=window.MotionHandoffIsComplete)===null||s===void 0)&&s.call(window,f))&&((a=window.MotionHasOptimisedAnimation)===null||a===void 0?void 0:a.call(window,f)));return iO(()=>{h&&(m.current=!0,window.MotionIsMounted=!0,h.updateFeatures(),Dc.render(h.render),b.current&&h.animationState&&h.animationState.animateChanges())}),M.useEffect(()=>{h&&(!b.current&&h.animationState&&h.animationState.animateChanges(),b.current&&(queueMicrotask(()=>{var v;(v=window.MotionHandoffMarkAsComplete)===null||v===void 0||v.call(window,f)}),b.current=!1))}),h}function yO(e,t,n,o){const{layoutId:r,layout:s,drag:a,dragConstraints:c,layoutScroll:l,layoutRoot:u}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Xm(e.parent)),e.projection.setOptions({layoutId:r,layout:s,alwaysMeasureLayout:!!a||c&&ar(c),visualElement:e,animationType:typeof s=="string"?s:"both",initialPromotionConfig:o,layoutScroll:l,layoutRoot:u})}function Xm(e){if(e)return e.options.allowProjection!==!1?e.projection:Xm(e.parent)}function xO({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:o,Component:r}){var s,a;e&&cO(e);function c(u,d){let p;const h={...M.useContext(Bm),...u,layoutId:CO(u)},{isStatic:g}=h,m=mO(u),f=o(u,g);if(!g&&Rc){TO(h,e);const b=EO(h);p=b.MeasureLayout,m.visualElement=vO(r,f,h,t,b.ProjectionNode)}return x.jsxs(Us.Provider,{value:m,children:[p&&m.visualElement?x.jsx(p,{visualElement:m.visualElement,...h}):null,n(r,u,bO(f,m.visualElement,d),f,g,m.visualElement)]})}c.displayName=`motion.${typeof r=="string"?r:`create(${(a=(s=r.displayName)!==null&&s!==void 0?s:r.name)!==null&&a!==void 0?a:""})`}`;const l=M.forwardRef(c);return l[gO]=r,l}function CO({layoutId:e}){const t=M.useContext(Dm).id;return t&&e!==void 0?t+"-"+e:e}function TO(e,t){const n=M.useContext(Vm).strict;if(process.env.NODE_ENV!=="production"&&t&&n){const o="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?rr(!1,o):Jn(!1,o)}}function EO(e){const{drag:t,layout:n}=sr;if(!t&&!n)return{};const o={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?o.MeasureLayout:void 0,ProjectionNode:o.ProjectionNode}}const Um=e=>t=>typeof t=="string"&&t.startsWith(e),Bc=Um("--"),IO=Um("var(--"),Fc=e=>IO(e)?SO.test(e.split("/*")[0].trim()):!1,SO=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,ai={};function wO(e){for(const t in e)ai[t]=e[t],Bc(t)&&(ai[t].isCSSVariable=!0)}const lr=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],go=new Set(lr);function Zm(e,{layout:t,layoutId:n}){return go.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!ai[e]||e==="opacity")}const At=e=>!!(e&&e.getVelocity),Ym=(e,t)=>t&&typeof e=="number"?t.transform(e):e,Fn=(e,t,n)=>n>t?t:n<e?e:n,cr={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},li={...cr,transform:e=>Fn(0,1,e)},Js={...cr,default:1},ci=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Kn=ci("deg"),wn=ci("%"),ye=ci("px"),AO=ci("vh"),RO=ci("vw"),Jm={...wn,parse:e=>wn.parse(e)/100,transform:e=>wn.transform(e*100)},OO={borderWidth:ye,borderTopWidth:ye,borderRightWidth:ye,borderBottomWidth:ye,borderLeftWidth:ye,borderRadius:ye,radius:ye,borderTopLeftRadius:ye,borderTopRightRadius:ye,borderBottomRightRadius:ye,borderBottomLeftRadius:ye,width:ye,maxWidth:ye,height:ye,maxHeight:ye,top:ye,right:ye,bottom:ye,left:ye,padding:ye,paddingTop:ye,paddingRight:ye,paddingBottom:ye,paddingLeft:ye,margin:ye,marginTop:ye,marginRight:ye,marginBottom:ye,marginLeft:ye,backgroundPositionX:ye,backgroundPositionY:ye},PO={rotate:Kn,rotateX:Kn,rotateY:Kn,rotateZ:Kn,scale:Js,scaleX:Js,scaleY:Js,scaleZ:Js,skew:Kn,skewX:Kn,skewY:Kn,distance:ye,translateX:ye,translateY:ye,translateZ:ye,x:ye,y:ye,z:ye,perspective:ye,transformPerspective:ye,opacity:li,originX:Jm,originY:Jm,originZ:ye},qm={...cr,transform:Math.round},jc={...OO,...PO,zIndex:qm,size:ye,fillOpacity:li,strokeOpacity:li,numOctaves:qm},NO={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},MO=lr.length;function kO(e,t,n){let o="",r=!0;for(let s=0;s<MO;s++){const a=lr[s],c=e[a];if(c===void 0)continue;let l=!0;if(typeof c=="number"?l=c===(a.startsWith("scale")?1:0):l=parseFloat(c)===0,!l||n){const u=Ym(c,jc[a]);if(!l){r=!1;const d=NO[a]||a;o+=`${d}(${u}) `}n&&(t[a]=u)}}return o=o.trim(),n?o=n(t,r?"":o):r&&(o="none"),o}function Vc(e,t,n){const{style:o,vars:r,transformOrigin:s}=e;let a=!1,c=!1;for(const l in t){const u=t[l];if(go.has(l)){a=!0;continue}else if(Bc(l)){r[l]=u;continue}else{const d=Ym(u,jc[l]);l.startsWith("origin")?(c=!0,s[l]=d):o[l]=d}}if(t.transform||(a||n?o.transform=kO(t,e.transform,n):o.transform&&(o.transform="none")),c){const{originX:l="50%",originY:u="50%",originZ:d=0}=s;o.transformOrigin=`${l} ${u} ${d}`}}const Lc=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Km(e,t,n){for(const o in t)!At(t[o])&&!Zm(o,n)&&(e[o]=t[o])}function DO({transformTemplate:e},t){return M.useMemo(()=>{const n=Lc();return Vc(n,t,e),Object.assign({},n.vars,n.style)},[t])}function BO(e,t){const n=e.style||{},o={};return Km(o,n,e),Object.assign(o,DO(e,t)),o}function FO(e,t){const n={},o=BO(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,o.userSelect=o.WebkitUserSelect=o.WebkitTouchCallout="none",o.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=o,n}const jO=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function _c(e){return typeof e!="string"||e.includes("-")?!1:!!(jO.indexOf(e)>-1||/[A-Z]/u.test(e))}const VO={offset:"stroke-dashoffset",array:"stroke-dasharray"},LO={offset:"strokeDashoffset",array:"strokeDasharray"};function _O(e,t,n=1,o=0,r=!0){e.pathLength=1;const s=r?VO:LO;e[s.offset]=ye.transform(-o);const a=ye.transform(t),c=ye.transform(n);e[s.array]=`${a} ${c}`}function Qm(e,t,n){return typeof e=="string"?e:ye.transform(t+n*e)}function $O(e,t,n){const o=Qm(t,e.x,e.width),r=Qm(n,e.y,e.height);return`${o} ${r}`}function $c(e,{attrX:t,attrY:n,attrScale:o,originX:r,originY:s,pathLength:a,pathSpacing:c=1,pathOffset:l=0,...u},d,p){if(Vc(e,u,p),d){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:h,style:g,dimensions:m}=e;h.transform&&(m&&(g.transform=h.transform),delete h.transform),m&&(r!==void 0||s!==void 0||g.transform)&&(g.transformOrigin=$O(m,r!==void 0?r:.5,s!==void 0?s:.5)),t!==void 0&&(h.x=t),n!==void 0&&(h.y=n),o!==void 0&&(h.scale=o),a!==void 0&&_O(h,a,c,l,!1)}const eg=()=>({...Lc(),attrs:{}}),Wc=e=>typeof e=="string"&&e.toLowerCase()==="svg";function WO(e,t,n,o){const r=M.useMemo(()=>{const s=eg();return $c(s,t,Wc(o),e.transformTemplate),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};Km(s,e.style,e),r.style={...s,...r.style}}return r}function GO(e=!1){return(n,o,r,{latestValues:s},a)=>{const l=(_c(n)?WO:FO)(o,s,a,n),u=pO(o,typeof n=="string",e),d=n!==M.Fragment?{...u,...l,ref:r}:{},{children:p}=o,h=M.useMemo(()=>At(p)?p.get():p,[p]);return M.createElement(n,{...d,children:h})}}function tg(e){const t=[{},{}];return e==null||e.values.forEach((n,o)=>{t[0][o]=n.get(),t[1][o]=n.getVelocity()}),t}function Gc(e,t,n,o){if(typeof t=="function"){const[r,s]=tg(o);t=t(n!==void 0?n:e.custom,r,s)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[r,s]=tg(o);t=t(n!==void 0?n:e.custom,r,s)}return t}const zc=e=>Array.isArray(e),zO=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),HO=e=>zc(e)?e[e.length-1]||0:e;function qs(e){const t=At(e)?e.get():e;return zO(t)?t.toValue():t}function XO({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},o,r,s){const a={latestValues:UO(o,r,s,e),renderState:t()};return n&&(a.onMount=c=>n({props:o,current:c,...a}),a.onUpdate=c=>n(c)),a}const ng=e=>(t,n)=>{const o=M.useContext(Us),r=M.useContext(Ac),s=()=>XO(e,t,o,r);return n?s():oO(s)};function UO(e,t,n,o){const r={},s=o(e,{});for(const h in s)r[h]=qs(s[h]);let{initial:a,animate:c}=e;const l=Ys(e),u=Wm(e);t&&u&&!l&&e.inherit!==!1&&(a===void 0&&(a=t.initial),c===void 0&&(c=t.animate));let d=n?n.initial===!1:!1;d=d||a===!1;const p=d?c:a;if(p&&typeof p!="boolean"&&!Zs(p)){const h=Array.isArray(p)?p:[p];for(let g=0;g<h.length;g++){const m=Gc(e,h[g]);if(m){const{transitionEnd:f,transition:b,...v}=m;for(const S in v){let C=v[S];if(Array.isArray(C)){const I=d?C.length-1:0;C=C[I]}C!==null&&(r[S]=C)}for(const S in f)r[S]=f[S]}}}return r}function Hc(e,t,n){var o;const{style:r}=e,s={};for(const a in r)(At(r[a])||t.style&&At(t.style[a])||Zm(a,e)||((o=n==null?void 0:n.getValue(a))===null||o===void 0?void 0:o.liveStyle)!==void 0)&&(s[a]=r[a]);return s}const ZO={useVisualState:ng({scrapeMotionValuesFromProps:Hc,createRenderState:Lc})};function og(e,t){try{t.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{t.dimensions={x:0,y:0,width:0,height:0}}}function rg(e,{style:t,vars:n},o,r){Object.assign(e.style,t,r&&r.getProjectionStyles(o));for(const s in n)e.style.setProperty(s,n[s])}const ig=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function sg(e,t,n,o){rg(e,t,void 0,o);for(const r in t.attrs)e.setAttribute(ig.has(r)?r:kc(r),t.attrs[r])}function ag(e,t,n){const o=Hc(e,t,n);for(const r in e)if(At(e[r])||At(t[r])){const s=lr.indexOf(r)!==-1?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r;o[s]=e[r]}return o}const lg=["x","y","width","height","cx","cy","r"],YO={useVisualState:ng({scrapeMotionValuesFromProps:ag,createRenderState:eg,onUpdate:({props:e,prevProps:t,current:n,renderState:o,latestValues:r})=>{if(!n)return;let s=!!e.drag;if(!s){for(const c in r)if(go.has(c)){s=!0;break}}if(!s)return;let a=!t;if(t)for(let c=0;c<lg.length;c++){const l=lg[c];e[l]!==t[l]&&(a=!0)}a&&Ke.read(()=>{og(n,o),Ke.render(()=>{$c(o,r,Wc(n.tagName),e.transformTemplate),sg(n,o)})})}})};function JO(e,t){return function(o,{forwardMotionProps:r}={forwardMotionProps:!1}){const a={..._c(o)?YO:ZO,preloadedFeatures:e,useRender:GO(r),createVisualElement:t,Component:o};return xO(a)}}function ui(e,t,n){const o=e.getProps();return Gc(o,t,n!==void 0?n:o.custom,e)}const qO=Oc(()=>window.ScrollTimeline!==void 0);class KO{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>"finished"in t?t.finished:t))}getAll(t){return this.animations[0][t]}setAll(t,n){for(let o=0;o<this.animations.length;o++)this.animations[o][t]=n}attachTimeline(t,n){const o=this.animations.map(r=>{if(qO()&&r.attachTimeline)return r.attachTimeline(t);if(typeof n=="function")return n(r)});return()=>{o.forEach((r,s)=>{r&&r(),this.animations[s].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let n=0;n<this.animations.length;n++)t=Math.max(t,this.animations[n].duration);return t}runAll(t){this.animations.forEach(n=>n[t]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class QO extends KO{then(t,n){return Promise.all(this.animations).then(t).catch(n)}}function Xc(e,t){return e?e[t]||e.default||e:void 0}const Uc=2e4;function cg(e){let t=0;const n=50;let o=e.next(t);for(;!o.done&&t<Uc;)t+=n,o=e.next(t);return t>=Uc?1/0:t}function Zc(e){return typeof e=="function"}function ug(e,t){e.timeline=t,e.onfinish=null}const Yc=e=>Array.isArray(e)&&typeof e[0]=="number",eP={linearEasing:void 0};function tP(e,t){const n=Oc(e);return()=>{var o;return(o=eP[t])!==null&&o!==void 0?o:n()}}const Ks=tP(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),dg=(e,t,n=10)=>{let o="";const r=Math.max(Math.round(t/n),2);for(let s=0;s<r;s++)o+=e(ir(0,r-1,s))+", ";return`linear(${o.substring(0,o.length-2)})`};function pg(e){return!!(typeof e=="function"&&Ks()||!e||typeof e=="string"&&(e in Jc||Ks())||Yc(e)||Array.isArray(e)&&e.every(pg))}const di=([e,t,n,o])=>`cubic-bezier(${e}, ${t}, ${n}, ${o})`,Jc={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:di([0,.65,.55,1]),circOut:di([.55,0,1,.45]),backIn:di([.31,.01,.66,-.59]),backOut:di([.33,1.53,.69,.99])};function fg(e,t){if(e)return typeof e=="function"&&Ks()?dg(e,t):Yc(e)?di(e):Array.isArray(e)?e.map(n=>fg(n,t)||Jc.easeOut):Jc[e]}const fn={x:!1,y:!1};function hg(){return fn.x||fn.y}function nP(e,t,n){var o;if(e instanceof Element)return[e];if(typeof e=="string"){let r=document;const s=(o=void 0)!==null&&o!==void 0?o:r.querySelectorAll(e);return s?Array.from(s):[]}return Array.from(e)}function mg(e,t){const n=nP(e),o=new AbortController,r={passive:!0,...t,signal:o.signal};return[n,r,()=>o.abort()]}function gg(e){return!(e.pointerType==="touch"||hg())}function oP(e,t,n={}){const[o,r,s]=mg(e,n),a=c=>{if(!gg(c))return;const{target:l}=c,u=t(l,c);if(typeof u!="function"||!l)return;const d=p=>{gg(p)&&(u(p),l.removeEventListener("pointerleave",d))};l.addEventListener("pointerleave",d,r)};return o.forEach(c=>{c.addEventListener("pointerenter",a,r)}),s}const bg=(e,t)=>t?e===t?!0:bg(e,t.parentElement):!1,qc=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,rP=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function iP(e){return rP.has(e.tagName)||e.tabIndex!==-1}const pi=new WeakSet;function vg(e){return t=>{t.key==="Enter"&&e(t)}}function Kc(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const sP=(e,t)=>{const n=e.currentTarget;if(!n)return;const o=vg(()=>{if(pi.has(n))return;Kc(n,"down");const r=vg(()=>{Kc(n,"up")}),s=()=>Kc(n,"cancel");n.addEventListener("keyup",r,t),n.addEventListener("blur",s,t)});n.addEventListener("keydown",o,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",o),t)};function yg(e){return qc(e)&&!hg()}function aP(e,t,n={}){const[o,r,s]=mg(e,n),a=c=>{const l=c.currentTarget;if(!yg(c)||pi.has(l))return;pi.add(l);const u=t(l,c),d=(g,m)=>{window.removeEventListener("pointerup",p),window.removeEventListener("pointercancel",h),!(!yg(g)||!pi.has(l))&&(pi.delete(l),typeof u=="function"&&u(g,{success:m}))},p=g=>{d(g,n.useGlobalTarget||bg(l,g.target))},h=g=>{d(g,!1)};window.addEventListener("pointerup",p,r),window.addEventListener("pointercancel",h,r)};return o.forEach(c=>{!iP(c)&&c.getAttribute("tabindex")===null&&(c.tabIndex=0),(n.useGlobalTarget?window:c).addEventListener("pointerdown",a,r),c.addEventListener("focus",u=>sP(u,r),r)}),s}function lP(e){return e==="x"||e==="y"?fn[e]?null:(fn[e]=!0,()=>{fn[e]=!1}):fn.x||fn.y?null:(fn.x=fn.y=!0,()=>{fn.x=fn.y=!1})}const xg=new Set(["width","height","top","left","right","bottom",...lr]);let Qs;function cP(){Qs=void 0}const An={now:()=>(Qs===void 0&&An.set(It.isProcessing||sO.useManualTiming?It.timestamp:performance.now()),Qs),set:e=>{Qs=e,queueMicrotask(cP)}};function Qc(e,t){e.indexOf(t)===-1&&e.push(t)}function eu(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class tu{constructor(){this.subscriptions=[]}add(t){return Qc(this.subscriptions,t),()=>eu(this.subscriptions,t)}notify(t,n,o){const r=this.subscriptions.length;if(r)if(r===1)this.subscriptions[0](t,n,o);else for(let s=0;s<r;s++){const a=this.subscriptions[s];a&&a(t,n,o)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function Cg(e,t){return t?e*(1e3/t):0}const Tg=30,uP=e=>!isNaN(parseFloat(e));class dP{constructor(t,n={}){this.version="12.4.3",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(o,r=!0)=>{const s=An.now();this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(o),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),r&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=An.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=uP(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&Xs(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new tu);const o=this.events[t].add(n);return t==="change"?()=>{o(),Ke.read(()=>{this.events.change.getSize()||this.stop()})}:o}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,o){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-o}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=An.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Tg)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Tg);return Cg(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function fi(e,t){return new dP(e,t)}function pP(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,fi(n))}function fP(e,t){const n=ui(e,t);let{transitionEnd:o={},transition:r={},...s}=n||{};s={...s,...o};for(const a in s){const c=HO(s[a]);pP(e,a,c)}}function hP(e){return!!(At(e)&&e.add)}function nu(e,t){const n=e.getValue("willChange");if(hP(n))return n.add(t)}function Eg(e){return e.props[zm]}const Ig=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,mP=1e-7,gP=12;function bP(e,t,n,o,r){let s,a,c=0;do a=t+(n-t)/2,s=Ig(a,o,r)-e,s>0?n=a:t=a;while(Math.abs(s)>mP&&++c<gP);return a}function hi(e,t,n,o){if(e===t&&n===o)return Lt;const r=s=>bP(s,0,1,e,n);return s=>s===0||s===1?s:Ig(r(s),t,o)}const Sg=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,wg=e=>t=>1-e(1-t),Ag=hi(.33,1.53,.69,.99),ou=wg(Ag),Rg=Sg(ou),Og=e=>(e*=2)<1?.5*ou(e):.5*(2-Math.pow(2,-10*(e-1))),ru=e=>1-Math.sin(Math.acos(e)),Pg=wg(ru),Ng=Sg(ru),Mg=e=>/^0[^.\s]+$/u.test(e);function vP(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||Mg(e):!0}const mi=e=>Math.round(e*1e5)/1e5,iu=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function yP(e){return e==null}const xP=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,su=(e,t)=>n=>!!(typeof n=="string"&&xP.test(n)&&n.startsWith(e)||t&&!yP(n)&&Object.prototype.hasOwnProperty.call(n,t)),kg=(e,t,n)=>o=>{if(typeof o!="string")return o;const[r,s,a,c]=o.match(iu);return{[e]:parseFloat(r),[t]:parseFloat(s),[n]:parseFloat(a),alpha:c!==void 0?parseFloat(c):1}},CP=e=>Fn(0,255,e),au={...cr,transform:e=>Math.round(CP(e))},bo={test:su("rgb","red"),parse:kg("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:o=1})=>"rgba("+au.transform(e)+", "+au.transform(t)+", "+au.transform(n)+", "+mi(li.transform(o))+")"};function TP(e){let t="",n="",o="",r="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),o=e.substring(5,7),r=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),o=e.substring(3,4),r=e.substring(4,5),t+=t,n+=n,o+=o,r+=r),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(o,16),alpha:r?parseInt(r,16)/255:1}}const lu={test:su("#"),parse:TP,transform:bo.transform},ur={test:su("hsl","hue"),parse:kg("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:o=1})=>"hsla("+Math.round(e)+", "+wn.transform(mi(t))+", "+wn.transform(mi(n))+", "+mi(li.transform(o))+")"},Rt={test:e=>bo.test(e)||lu.test(e)||ur.test(e),parse:e=>bo.test(e)?bo.parse(e):ur.test(e)?ur.parse(e):lu.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?bo.transform(e):ur.transform(e)},EP=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function IP(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(iu))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(EP))===null||n===void 0?void 0:n.length)||0)>0}const Dg="number",Bg="color",SP="var",wP="var(",Fg="${}",AP=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function gi(e){const t=e.toString(),n=[],o={color:[],number:[],var:[]},r=[];let s=0;const c=t.replace(AP,l=>(Rt.test(l)?(o.color.push(s),r.push(Bg),n.push(Rt.parse(l))):l.startsWith(wP)?(o.var.push(s),r.push(SP),n.push(l)):(o.number.push(s),r.push(Dg),n.push(parseFloat(l))),++s,Fg)).split(Fg);return{values:n,split:c,indexes:o,types:r}}function jg(e){return gi(e).values}function Vg(e){const{split:t,types:n}=gi(e),o=t.length;return r=>{let s="";for(let a=0;a<o;a++)if(s+=t[a],r[a]!==void 0){const c=n[a];c===Dg?s+=mi(r[a]):c===Bg?s+=Rt.transform(r[a]):s+=r[a]}return s}}const RP=e=>typeof e=="number"?0:e;function OP(e){const t=jg(e);return Vg(e)(t.map(RP))}const Qn={test:IP,parse:jg,createTransformer:Vg,getAnimatableNone:OP},PP=new Set(["brightness","contrast","saturate","opacity"]);function NP(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[o]=n.match(iu)||[];if(!o)return e;const r=n.replace(o,"");let s=PP.has(t)?1:0;return o!==n&&(s*=100),t+"("+s+r+")"}const MP=/\b([a-z-]*)\(.*?\)/gu,cu={...Qn,getAnimatableNone:e=>{const t=e.match(MP);return t?t.map(NP).join(" "):e}},kP={...jc,color:Rt,backgroundColor:Rt,outlineColor:Rt,fill:Rt,stroke:Rt,borderColor:Rt,borderTopColor:Rt,borderRightColor:Rt,borderBottomColor:Rt,borderLeftColor:Rt,filter:cu,WebkitFilter:cu},uu=e=>kP[e];function Lg(e,t){let n=uu(e);return n!==cu&&(n=Qn),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const DP=new Set(["auto","none","0"]);function BP(e,t,n){let o=0,r;for(;o<e.length&&!r;){const s=e[o];typeof s=="string"&&!DP.has(s)&&gi(s).values.length&&(r=e[o]),o++}if(r&&n)for(const s of t)e[s]=Lg(n,r)}const _g=e=>e===cr||e===ye,$g=(e,t)=>parseFloat(e.split(", ")[t]),Wg=(e,t)=>(n,{transform:o})=>{if(o==="none"||!o)return 0;const r=o.match(/^matrix3d\((.+)\)$/u);if(r)return $g(r[1],t);{const s=o.match(/^matrix\((.+)\)$/u);return s?$g(s[1],e):0}},FP=new Set(["x","y","z"]),jP=lr.filter(e=>!FP.has(e));function VP(e){const t=[];return jP.forEach(n=>{const o=e.getValue(n);o!==void 0&&(t.push([n,o.get()]),o.set(n.startsWith("scale")?1:0))}),t}const dr={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:Wg(4,13),y:Wg(5,14)};dr.translateX=dr.x,dr.translateY=dr.y;const vo=new Set;let du=!1,pu=!1;function Gg(){if(pu){const e=Array.from(vo).filter(o=>o.needsMeasurement),t=new Set(e.map(o=>o.element)),n=new Map;t.forEach(o=>{const r=VP(o);r.length&&(n.set(o,r),o.render())}),e.forEach(o=>o.measureInitialState()),t.forEach(o=>{o.render();const r=n.get(o);r&&r.forEach(([s,a])=>{var c;(c=o.getValue(s))===null||c===void 0||c.set(a)})}),e.forEach(o=>o.measureEndState()),e.forEach(o=>{o.suspendedScrollY!==void 0&&window.scrollTo(0,o.suspendedScrollY)})}pu=!1,du=!1,vo.forEach(e=>e.complete()),vo.clear()}function zg(){vo.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(pu=!0)})}function LP(){zg(),Gg()}class fu{constructor(t,n,o,r,s,a=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=o,this.motionValue=r,this.element=s,this.isAsync=a}scheduleResolve(){this.isScheduled=!0,this.isAsync?(vo.add(this),du||(du=!0,Ke.read(zg),Ke.resolveKeyframes(Gg))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:o,motionValue:r}=this;for(let s=0;s<t.length;s++)if(t[s]===null)if(s===0){const a=r==null?void 0:r.get(),c=t[t.length-1];if(a!==void 0)t[0]=a;else if(o&&n){const l=o.readValue(n,c);l!=null&&(t[0]=l)}t[0]===void 0&&(t[0]=c),r&&a===void 0&&r.set(t[0])}else t[s]=t[s-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),vo.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,vo.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const Hg=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),_P=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function $P(e){const t=_P.exec(e);if(!t)return[,];const[,n,o,r]=t;return[`--${n??o}`,r]}const WP=4;function Xg(e,t,n=1){Jn(n<=WP,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[o,r]=$P(e);if(!o)return;const s=window.getComputedStyle(t).getPropertyValue(o);if(s){const a=s.trim();return Hg(a)?parseFloat(a):a}return Fc(r)?Xg(r,t,n+1):r}const Ug=e=>t=>t.test(e),Zg=[cr,ye,wn,Kn,RO,AO,{test:e=>e==="auto",parse:e=>e}],Yg=e=>Zg.find(Ug(e));class Jg extends fu{constructor(t,n,o,r,s){super(t,n,o,r,s,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:o}=this;if(!n||!n.current)return;super.readKeyframes();for(let l=0;l<t.length;l++){let u=t[l];if(typeof u=="string"&&(u=u.trim(),Fc(u))){const d=Xg(u,n.current);d!==void 0&&(t[l]=d),l===t.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!xg.has(o)||t.length!==2)return;const[r,s]=t,a=Yg(r),c=Yg(s);if(a!==c)if(_g(a)&&_g(c))for(let l=0;l<t.length;l++){const u=t[l];typeof u=="string"&&(t[l]=parseFloat(u))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,o=[];for(let r=0;r<t.length;r++)vP(t[r])&&o.push(r);o.length&&BP(t,o,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:o}=this;if(!t||!t.current)return;o==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=dr[o](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const r=n[n.length-1];r!==void 0&&t.getValue(o,r).jump(r,!1)}measureEndState(){var t;const{element:n,name:o,unresolvedKeyframes:r}=this;if(!n||!n.current)return;const s=n.getValue(o);s&&s.jump(this.measuredOrigin,!1);const a=r.length-1,c=r[a];r[a]=dr[o](n.measureViewportBox(),window.getComputedStyle(n.current)),c!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=c),!((t=this.removedTransforms)===null||t===void 0)&&t.length&&this.removedTransforms.forEach(([l,u])=>{n.getValue(l).set(u)}),this.resolveNoneKeyframes()}}const qg=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Qn.test(e)||e==="0")&&!e.startsWith("url("));function GP(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function zP(e,t,n,o){const r=e[0];if(r===null)return!1;if(t==="display"||t==="visibility")return!0;const s=e[e.length-1],a=qg(r,t),c=qg(s,t);return rr(a===c,`You are trying to animate ${t} from "${r}" to "${s}". ${r} is not an animatable value - to enable this animation set ${r} to a value animatable to ${s} via the \`style\` property.`),!a||!c?!1:GP(e)||(n==="spring"||Zc(n))&&o}const HP=e=>e!==null;function ea(e,{repeat:t,repeatType:n="loop"},o){const r=e.filter(HP),s=t&&n!=="loop"&&t%2===1?0:r.length-1;return!s||o===void 0?r[s]:o}const XP=40;class Kg{constructor({autoplay:t=!0,delay:n=0,type:o="keyframes",repeat:r=0,repeatDelay:s=0,repeatType:a="loop",...c}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=An.now(),this.options={autoplay:t,delay:n,type:o,repeat:r,repeatDelay:s,repeatType:a,...c},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>XP?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&LP(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=An.now(),this.hasAttemptedResolve=!0;const{name:o,type:r,velocity:s,delay:a,onComplete:c,onUpdate:l,isGenerator:u}=this.options;if(!u&&!zP(t,o,r,s))if(a)this.options.duration=0;else{l&&l(ea(t,this.options,n)),c&&c(),this.resolveFinishedPromise();return}const d=this.initPlayback(t,n);d!==!1&&(this._resolved={keyframes:t,finalKeyframe:n,...d},this.onPostResolved())}onPostResolved(){}then(t,n){return this.currentFinishedPromise.then(t,n)}flatten(){this.options.type="keyframes",this.options.ease="linear"}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}const it=(e,t,n)=>e+(t-e)*n;function hu(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function UP({hue:e,saturation:t,lightness:n,alpha:o}){e/=360,t/=100,n/=100;let r=0,s=0,a=0;if(!t)r=s=a=n;else{const c=n<.5?n*(1+t):n+t-n*t,l=2*n-c;r=hu(l,c,e+1/3),s=hu(l,c,e),a=hu(l,c,e-1/3)}return{red:Math.round(r*255),green:Math.round(s*255),blue:Math.round(a*255),alpha:o}}function ta(e,t){return n=>n>0?t:e}const mu=(e,t,n)=>{const o=e*e,r=n*(t*t-o)+o;return r<0?0:Math.sqrt(r)},ZP=[lu,bo,ur],YP=e=>ZP.find(t=>t.test(e));function Qg(e){const t=YP(e);if(rr(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`),!t)return!1;let n=t.parse(e);return t===ur&&(n=UP(n)),n}const eb=(e,t)=>{const n=Qg(e),o=Qg(t);if(!n||!o)return ta(e,t);const r={...n};return s=>(r.red=mu(n.red,o.red,s),r.green=mu(n.green,o.green,s),r.blue=mu(n.blue,o.blue,s),r.alpha=it(n.alpha,o.alpha,s),bo.transform(r))},JP=(e,t)=>n=>t(e(n)),bi=(...e)=>e.reduce(JP),gu=new Set(["none","hidden"]);function qP(e,t){return gu.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function KP(e,t){return n=>it(e,t,n)}function bu(e){return typeof e=="number"?KP:typeof e=="string"?Fc(e)?ta:Rt.test(e)?eb:tN:Array.isArray(e)?tb:typeof e=="object"?Rt.test(e)?eb:QP:ta}function tb(e,t){const n=[...e],o=n.length,r=e.map((s,a)=>bu(s)(s,t[a]));return s=>{for(let a=0;a<o;a++)n[a]=r[a](s);return n}}function QP(e,t){const n={...e,...t},o={};for(const r in n)e[r]!==void 0&&t[r]!==void 0&&(o[r]=bu(e[r])(e[r],t[r]));return r=>{for(const s in o)n[s]=o[s](r);return n}}function eN(e,t){var n;const o=[],r={color:0,var:0,number:0};for(let s=0;s<t.values.length;s++){const a=t.types[s],c=e.indexes[a][r[a]],l=(n=e.values[c])!==null&&n!==void 0?n:0;o[s]=l,r[a]++}return o}const tN=(e,t)=>{const n=Qn.createTransformer(t),o=gi(e),r=gi(t);return o.indexes.var.length===r.indexes.var.length&&o.indexes.color.length===r.indexes.color.length&&o.indexes.number.length>=r.indexes.number.length?gu.has(e)&&!r.values.length||gu.has(t)&&!o.values.length?qP(e,t):bi(tb(eN(o,r),r.values),n):(rr(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),ta(e,t))};function nb(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?it(e,t,n):bu(e)(e,t)}const nN=5;function ob(e,t,n){const o=Math.max(t-nN,0);return Cg(n-e(o),t-o)}const st={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},vu=.001;function oN({duration:e=st.duration,bounce:t=st.bounce,velocity:n=st.velocity,mass:o=st.mass}){let r,s;rr(e<=Sn(st.maxDuration),"Spring duration must be 10 seconds or less");let a=1-t;a=Fn(st.minDamping,st.maxDamping,a),e=Fn(st.minDuration,st.maxDuration,Bn(e)),a<1?(r=u=>{const d=u*a,p=d*e,h=d-n,g=yu(u,a),m=Math.exp(-p);return vu-h/g*m},s=u=>{const p=u*a*e,h=p*n+n,g=Math.pow(a,2)*Math.pow(u,2)*e,m=Math.exp(-p),f=yu(Math.pow(u,2),a);return(-r(u)+vu>0?-1:1)*((h-g)*m)/f}):(r=u=>{const d=Math.exp(-u*e),p=(u-n)*e+1;return-vu+d*p},s=u=>{const d=Math.exp(-u*e),p=(n-u)*(e*e);return d*p});const c=5/e,l=iN(r,s,c);if(e=Sn(e),isNaN(l))return{stiffness:st.stiffness,damping:st.damping,duration:e};{const u=Math.pow(l,2)*o;return{stiffness:u,damping:a*2*Math.sqrt(o*u),duration:e}}}const rN=12;function iN(e,t,n){let o=n;for(let r=1;r<rN;r++)o=o-e(o)/t(o);return o}function yu(e,t){return e*Math.sqrt(1-t*t)}const sN=["duration","bounce"],aN=["stiffness","damping","mass"];function rb(e,t){return t.some(n=>e[n]!==void 0)}function lN(e){let t={velocity:st.velocity,stiffness:st.stiffness,damping:st.damping,mass:st.mass,isResolvedFromDuration:!1,...e};if(!rb(e,aN)&&rb(e,sN))if(e.visualDuration){const n=e.visualDuration,o=2*Math.PI/(n*1.2),r=o*o,s=2*Fn(.05,1,1-(e.bounce||0))*Math.sqrt(r);t={...t,mass:st.mass,stiffness:r,damping:s}}else{const n=oN(e);t={...t,...n,mass:st.mass},t.isResolvedFromDuration=!0}return t}function ib(e=st.visualDuration,t=st.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:o,restDelta:r}=n;const s=n.keyframes[0],a=n.keyframes[n.keyframes.length-1],c={done:!1,value:s},{stiffness:l,damping:u,mass:d,duration:p,velocity:h,isResolvedFromDuration:g}=lN({...n,velocity:-Bn(n.velocity||0)}),m=h||0,f=u/(2*Math.sqrt(l*d)),b=a-s,v=Bn(Math.sqrt(l/d)),S=Math.abs(b)<5;o||(o=S?st.restSpeed.granular:st.restSpeed.default),r||(r=S?st.restDelta.granular:st.restDelta.default);let C;if(f<1){const y=yu(v,f);C=A=>{const w=Math.exp(-f*v*A);return a-w*((m+f*v*b)/y*Math.sin(y*A)+b*Math.cos(y*A))}}else if(f===1)C=y=>a-Math.exp(-v*y)*(b+(m+v*b)*y);else{const y=v*Math.sqrt(f*f-1);C=A=>{const w=Math.exp(-f*v*A),R=Math.min(y*A,300);return a-w*((m+f*v*b)*Math.sinh(R)+y*b*Math.cosh(R))/y}}const I={calculatedDuration:g&&p||null,next:y=>{const A=C(y);if(g)c.done=y>=p;else{let w=0;f<1&&(w=y===0?Sn(m):ob(C,y,A));const R=Math.abs(w)<=o,P=Math.abs(a-A)<=r;c.done=R&&P}return c.value=c.done?a:A,c},toString:()=>{const y=Math.min(cg(I),Uc),A=dg(w=>I.next(y*w).value,y,30);return y+"ms "+A}};return I}function sb({keyframes:e,velocity:t=0,power:n=.8,timeConstant:o=325,bounceDamping:r=10,bounceStiffness:s=500,modifyTarget:a,min:c,max:l,restDelta:u=.5,restSpeed:d}){const p=e[0],h={done:!1,value:p},g=R=>c!==void 0&&R<c||l!==void 0&&R>l,m=R=>c===void 0?l:l===void 0||Math.abs(c-R)<Math.abs(l-R)?c:l;let f=n*t;const b=p+f,v=a===void 0?b:a(b);v!==b&&(f=v-p);const S=R=>-f*Math.exp(-R/o),C=R=>v+S(R),I=R=>{const P=S(R),N=C(R);h.done=Math.abs(P)<=u,h.value=h.done?v:N};let y,A;const w=R=>{g(h.value)&&(y=R,A=ib({keyframes:[h.value,m(h.value)],velocity:ob(C,R,h.value),damping:r,stiffness:s,restDelta:u,restSpeed:d}))};return w(0),{calculatedDuration:null,next:R=>{let P=!1;return!A&&y===void 0&&(P=!0,I(R),w(R)),y!==void 0&&R>=y?A.next(R-y):(!P&&I(R),h)}}}const cN=hi(.42,0,1,1),uN=hi(0,0,.58,1),ab=hi(.42,0,.58,1),dN=e=>Array.isArray(e)&&typeof e[0]!="number",lb={linear:Lt,easeIn:cN,easeInOut:ab,easeOut:uN,circIn:ru,circInOut:Ng,circOut:Pg,backIn:ou,backInOut:Rg,backOut:Ag,anticipate:Og},cb=e=>{if(Yc(e)){Jn(e.length===4,"Cubic bezier arrays must contain four numerical values.");const[t,n,o,r]=e;return hi(t,n,o,r)}else if(typeof e=="string")return Jn(lb[e]!==void 0,`Invalid easing type '${e}'`),lb[e];return e};function pN(e,t,n){const o=[],r=n||nb,s=e.length-1;for(let a=0;a<s;a++){let c=r(e[a],e[a+1]);if(t){const l=Array.isArray(t)?t[a]||Lt:t;c=bi(l,c)}o.push(c)}return o}function fN(e,t,{clamp:n=!0,ease:o,mixer:r}={}){const s=e.length;if(Jn(s===t.length,"Both input and output ranges must be the same length"),s===1)return()=>t[0];if(s===2&&t[0]===t[1])return()=>t[1];const a=e[0]===e[1];e[0]>e[s-1]&&(e=[...e].reverse(),t=[...t].reverse());const c=pN(t,o,r),l=c.length,u=d=>{if(a&&d<e[0])return t[0];let p=0;if(l>1)for(;p<e.length-2&&!(d<e[p+1]);p++);const h=ir(e[p],e[p+1],d);return c[p](h)};return n?d=>u(Fn(e[0],e[s-1],d)):u}function hN(e,t){const n=e[e.length-1];for(let o=1;o<=t;o++){const r=ir(0,t,o);e.push(it(n,1,r))}}function mN(e){const t=[0];return hN(t,e.length-1),t}function gN(e,t){return e.map(n=>n*t)}function bN(e,t){return e.map(()=>t||ab).splice(0,e.length-1)}function vi({duration:e=300,keyframes:t,times:n,ease:o="easeInOut"}){const r=dN(o)?o.map(cb):cb(o),s={done:!1,value:t[0]},a=gN(n&&n.length===t.length?n:mN(t),e),c=fN(a,t,{ease:Array.isArray(r)?r:bN(t,r)});return{calculatedDuration:e,next:l=>(s.value=c(l),s.done=l>=e,s)}}const vN=e=>{const t=({timestamp:n})=>e(n);return{start:()=>Ke.update(t,!0),stop:()=>qn(t),now:()=>It.isProcessing?It.timestamp:An.now()}},yN={decay:sb,inertia:sb,tween:vi,keyframes:vi,spring:ib},xN=e=>e/100;class xu extends Kg{constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:l}=this.options;l&&l()};const{name:n,motionValue:o,element:r,keyframes:s}=this.options,a=(r==null?void 0:r.KeyframeResolver)||fu,c=(l,u)=>this.onKeyframesResolved(l,u);this.resolver=new a(s,c,n,o,r),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(t){const{type:n="keyframes",repeat:o=0,repeatDelay:r=0,repeatType:s,velocity:a=0}=this.options,c=Zc(n)?n:yN[n]||vi;let l,u;process.env.NODE_ENV!=="production"&&c!==vi&&Jn(t.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${t}`),c!==vi&&typeof t[0]!="number"&&(l=bi(xN,nb(t[0],t[1])),t=[0,100]);const d=c({...this.options,keyframes:t});s==="mirror"&&(u=c({...this.options,keyframes:[...t].reverse(),velocity:-a})),d.calculatedDuration===null&&(d.calculatedDuration=cg(d));const{calculatedDuration:p}=d,h=p+r,g=h*(o+1)-r;return{generator:d,mirroredGenerator:u,mapPercentToKeyframes:l,calculatedDuration:p,resolvedDuration:h,totalDuration:g}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,n=!1){const{resolved:o}=this;if(!o){const{keyframes:R}=this.options;return{done:!0,value:R[R.length-1]}}const{finalKeyframe:r,generator:s,mirroredGenerator:a,mapPercentToKeyframes:c,keyframes:l,calculatedDuration:u,totalDuration:d,resolvedDuration:p}=o;if(this.startTime===null)return s.next(0);const{delay:h,repeat:g,repeatType:m,repeatDelay:f,onUpdate:b}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-d/this.speed,this.startTime)),n?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const v=this.currentTime-h*(this.speed>=0?1:-1),S=this.speed>=0?v<0:v>d;this.currentTime=Math.max(v,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=d);let C=this.currentTime,I=s;if(g){const R=Math.min(this.currentTime,d)/p;let P=Math.floor(R),N=R%1;!N&&R>=1&&(N=1),N===1&&P--,P=Math.min(P,g+1),!!(P%2)&&(m==="reverse"?(N=1-N,f&&(N-=f/p)):m==="mirror"&&(I=a)),C=Fn(0,1,N)*p}const y=S?{done:!1,value:l[0]}:I.next(C);c&&(y.value=c(y.value));let{done:A}=y;!S&&u!==null&&(A=this.speed>=0?this.currentTime>=d:this.currentTime<=0);const w=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&A);return w&&r!==void 0&&(y.value=ea(l,this.options,r)),b&&b(y.value),w&&this.finish(),y}get duration(){const{resolved:t}=this;return t?Bn(t.calculatedDuration):0}get time(){return Bn(this.currentTime)}set time(t){t=Sn(t),this.currentTime=t,this.holdTime!==null||this.speed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=Bn(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=vN,onPlay:n,startTime:o}=this.options;this.driver||(this.driver=t(s=>this.tick(s))),n&&n();const r=this.driver.now();this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=r):this.startTime=o??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(t=this.currentTime)!==null&&t!==void 0?t:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}const CN=new Set(["opacity","clipPath","filter","transform"]);function TN(e,t,n,{delay:o=0,duration:r=300,repeat:s=0,repeatType:a="loop",ease:c="easeInOut",times:l}={}){const u={[t]:n};l&&(u.offset=l);const d=fg(c,r);return Array.isArray(d)&&(u.easing=d),e.animate(u,{delay:o,duration:r,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:s+1,direction:a==="reverse"?"alternate":"normal"})}const EN=Oc(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),na=10,IN=2e4;function SN(e){return Zc(e.type)||e.type==="spring"||!pg(e.ease)}function wN(e,t){const n=new xu({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let o={done:!1,value:e[0]};const r=[];let s=0;for(;!o.done&&s<IN;)o=n.sample(s),r.push(o.value),s+=na;return{times:void 0,keyframes:r,duration:s-na,ease:"linear"}}const ub={anticipate:Og,backInOut:Rg,circInOut:Ng};function AN(e){return e in ub}class db extends Kg{constructor(t){super(t);const{name:n,motionValue:o,element:r,keyframes:s}=this.options;this.resolver=new Jg(s,(a,c)=>this.onKeyframesResolved(a,c),n,o,r),this.resolver.scheduleResolve()}initPlayback(t,n){let{duration:o=300,times:r,ease:s,type:a,motionValue:c,name:l,startTime:u}=this.options;if(!c.owner||!c.owner.current)return!1;if(typeof s=="string"&&Ks()&&AN(s)&&(s=ub[s]),SN(this.options)){const{onComplete:p,onUpdate:h,motionValue:g,element:m,...f}=this.options,b=wN(t,f);t=b.keyframes,t.length===1&&(t[1]=t[0]),o=b.duration,r=b.times,s=b.ease,a="keyframes"}const d=TN(c.owner.current,l,t,{...this.options,duration:o,times:r,ease:s});return d.startTime=u??this.calcStartTime(),this.pendingTimeline?(ug(d,this.pendingTimeline),this.pendingTimeline=void 0):d.onfinish=()=>{const{onComplete:p}=this.options;c.set(ea(t,this.options,n)),p&&p(),this.cancel(),this.resolveFinishedPromise()},{animation:d,duration:o,times:r,type:a,ease:s,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return Bn(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return Bn(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:o}=n;o.currentTime=Sn(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:n}=t;return n.playbackRate}set speed(t){const{resolved:n}=this;if(!n)return;const{animation:o}=n;o.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:n}=t;return n.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:n}=t;return n.startTime}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{const{resolved:n}=this;if(!n)return Lt;const{animation:o}=n;ug(o,t)}return Lt}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:n,keyframes:o,duration:r,type:s,ease:a,times:c}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:u,onUpdate:d,onComplete:p,element:h,...g}=this.options,m=new xu({...g,keyframes:o,duration:r,type:s,ease:a,times:c,isGenerator:!0}),f=Sn(this.time);u.setWithVelocity(m.sample(f-na).value,m.sample(f).value,na)}const{onStop:l}=this.options;l&&l(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:n,name:o,repeatDelay:r,repeatType:s,damping:a,type:c}=t;if(!n||!n.owner||!(n.owner.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:u}=n.owner.getProps();return EN()&&o&&CN.has(o)&&!l&&!u&&!r&&s!=="mirror"&&a!==0&&c!=="inertia"}}const RN={type:"spring",stiffness:500,damping:25,restSpeed:10},ON=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),PN={type:"keyframes",duration:.8},NN={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},MN=(e,{keyframes:t})=>t.length>2?PN:go.has(e)?e.startsWith("scale")?ON(t[1]):RN:NN;function kN({when:e,delay:t,delayChildren:n,staggerChildren:o,staggerDirection:r,repeat:s,repeatType:a,repeatDelay:c,from:l,elapsed:u,...d}){return!!Object.keys(d).length}const Cu=(e,t,n,o={},r,s)=>a=>{const c=Xc(o,e)||{},l=c.delay||o.delay||0;let{elapsed:u=0}=o;u=u-Sn(l);let d={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...c,delay:-u,onUpdate:h=>{t.set(h),c.onUpdate&&c.onUpdate(h)},onComplete:()=>{a(),c.onComplete&&c.onComplete()},name:e,motionValue:t,element:s?void 0:r};kN(c)||(d={...d,...MN(e,d)}),d.duration&&(d.duration=Sn(d.duration)),d.repeatDelay&&(d.repeatDelay=Sn(d.repeatDelay)),d.from!==void 0&&(d.keyframes[0]=d.from);let p=!1;if((d.type===!1||d.duration===0&&!d.repeatDelay)&&(d.duration=0,d.delay===0&&(p=!0)),p&&!s&&t.get()!==void 0){const h=ea(d.keyframes,c);if(h!==void 0)return Ke.update(()=>{d.onUpdate(h),d.onComplete()}),new QO([])}return!s&&db.supports(d)?new db(d):new xu(d)};function DN({protectedKeys:e,needsAnimating:t},n){const o=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,o}function pb(e,t,{delay:n=0,transitionOverride:o,type:r}={}){var s;let{transition:a=e.getDefaultTransition(),transitionEnd:c,...l}=t;o&&(a=o);const u=[],d=r&&e.animationState&&e.animationState.getState()[r];for(const p in l){const h=e.getValue(p,(s=e.latestValues[p])!==null&&s!==void 0?s:null),g=l[p];if(g===void 0||d&&DN(d,p))continue;const m={delay:n,...Xc(a||{},p)};let f=!1;if(window.MotionHandoffAnimation){const v=Eg(e);if(v){const S=window.MotionHandoffAnimation(v,p,Ke);S!==null&&(m.startTime=S,f=!0)}}nu(e,p),h.start(Cu(p,h,g,e.shouldReduceMotion&&xg.has(p)?{type:!1}:m,e,f));const b=h.animation;b&&u.push(b)}return c&&Promise.all(u).then(()=>{Ke.update(()=>{c&&fP(e,c)})}),u}function Tu(e,t,n={}){var o;const r=ui(e,t,n.type==="exit"?(o=e.presenceContext)===null||o===void 0?void 0:o.custom:void 0);let{transition:s=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(s=n.transitionOverride);const a=r?()=>Promise.all(pb(e,r,n)):()=>Promise.resolve(),c=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:d=0,staggerChildren:p,staggerDirection:h}=s;return BN(e,t,d+u,p,h,n)}:()=>Promise.resolve(),{when:l}=s;if(l){const[u,d]=l==="beforeChildren"?[a,c]:[c,a];return u().then(()=>d())}else return Promise.all([a(),c(n.delay)])}function BN(e,t,n=0,o=0,r=1,s){const a=[],c=(e.variantChildren.size-1)*o,l=r===1?(u=0)=>u*o:(u=0)=>c-u*o;return Array.from(e.variantChildren).sort(FN).forEach((u,d)=>{u.notify("AnimationStart",t),a.push(Tu(u,t,{...s,delay:n+l(d)}).then(()=>u.notify("AnimationComplete",t)))}),Promise.all(a)}function FN(e,t){return e.sortNodePosition(t)}function jN(e,t,n={}){e.notify("AnimationStart",t);let o;if(Array.isArray(t)){const r=t.map(s=>Tu(e,s,n));o=Promise.all(r)}else if(typeof t=="string")o=Tu(e,t,n);else{const r=typeof t=="function"?ui(e,t,n.custom):t;o=Promise.all(pb(e,r,n))}return o.then(()=>{e.notify("AnimationComplete",t)})}function fb(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let o=0;o<n;o++)if(t[o]!==e[o])return!1;return!0}const VN=Mc.length;function hb(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?hb(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<VN;n++){const o=Mc[n],r=e.props[o];(si(r)||r===!1)&&(t[o]=r)}return t}const LN=[...Nc].reverse(),_N=Nc.length;function $N(e){return t=>Promise.all(t.map(({animation:n,options:o})=>jN(e,n,o)))}function WN(e){let t=$N(e),n=mb(),o=!0;const r=l=>(u,d)=>{var p;const h=ui(e,d,l==="exit"?(p=e.presenceContext)===null||p===void 0?void 0:p.custom:void 0);if(h){const{transition:g,transitionEnd:m,...f}=h;u={...u,...f,...m}}return u};function s(l){t=l(e)}function a(l){const{props:u}=e,d=hb(e.parent)||{},p=[],h=new Set;let g={},m=1/0;for(let b=0;b<_N;b++){const v=LN[b],S=n[v],C=u[v]!==void 0?u[v]:d[v],I=si(C),y=v===l?S.isActive:null;y===!1&&(m=b);let A=C===d[v]&&C!==u[v]&&I;if(A&&o&&e.manuallyAnimateOnMount&&(A=!1),S.protectedKeys={...g},!S.isActive&&y===null||!C&&!S.prevProp||Zs(C)||typeof C=="boolean")continue;const w=GN(S.prevProp,C);let R=w||v===l&&S.isActive&&!A&&I||b>m&&I,P=!1;const N=Array.isArray(C)?C:[C];let F=N.reduce(r(v),{});y===!1&&(F={});const{prevResolvedValues:G={}}=S,j={...G,...F},L=$=>{R=!0,h.has($)&&(P=!0,h.delete($)),S.needsAnimating[$]=!0;const D=e.getValue($);D&&(D.liveStyle=!1)};for(const $ in j){const D=F[$],X=G[$];if(g.hasOwnProperty($))continue;let k=!1;zc(D)&&zc(X)?k=!fb(D,X):k=D!==X,k?D!=null?L($):h.add($):D!==void 0&&h.has($)?L($):S.protectedKeys[$]=!0}S.prevProp=C,S.prevResolvedValues=F,S.isActive&&(g={...g,...F}),o&&e.blockInitialAnimation&&(R=!1),R&&(!(A&&w)||P)&&p.push(...N.map($=>({animation:$,options:{type:v}})))}if(h.size){const b={};if(typeof u.initial!="boolean"){const v=ui(e,Array.isArray(u.initial)?u.initial[0]:u.initial);v&&v.transition&&(b.transition=v.transition)}h.forEach(v=>{const S=e.getBaseTarget(v),C=e.getValue(v);C&&(C.liveStyle=!0),b[v]=S??null}),p.push({animation:b})}let f=!!p.length;return o&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(f=!1),o=!1,f?t(p):Promise.resolve()}function c(l,u){var d;if(n[l].isActive===u)return Promise.resolve();(d=e.variantChildren)===null||d===void 0||d.forEach(h=>{var g;return(g=h.animationState)===null||g===void 0?void 0:g.setActive(l,u)}),n[l].isActive=u;const p=a(l);for(const h in n)n[h].protectedKeys={};return p}return{animateChanges:a,setActive:c,setAnimateFunction:s,getState:()=>n,reset:()=>{n=mb(),o=!0}}}function GN(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!fb(t,e):!1}function yo(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function mb(){return{animate:yo(!0),whileInView:yo(),whileHover:yo(),whileTap:yo(),whileDrag:yo(),whileFocus:yo(),exit:yo()}}class eo{constructor(t){this.isMounted=!1,this.node=t}update(){}}class zN extends eo{constructor(t){super(t),t.animationState||(t.animationState=WN(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Zs(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)===null||t===void 0||t.call(this)}}let HN=0;class XN extends eo{constructor(){super(...arguments),this.id=HN++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:o}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===o)return;const r=this.node.animationState.setActive("exit",!t);n&&!t&&r.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const UN={animation:{Feature:zN},exit:{Feature:XN}};function yi(e,t,n,o={passive:!0}){return e.addEventListener(t,n,o),()=>e.removeEventListener(t,n)}function xi(e){return{point:{x:e.pageX,y:e.pageY}}}const ZN=e=>t=>qc(t)&&e(t,xi(t));function Ci(e,t,n,o){return yi(e,t,ZN(n),o)}const gb=(e,t)=>Math.abs(e-t);function YN(e,t){const n=gb(e.x,t.x),o=gb(e.y,t.y);return Math.sqrt(n**2+o**2)}class bb{constructor(t,n,{transformPagePoint:o,contextWindow:r,dragSnapToOrigin:s=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const p=Iu(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,g=YN(p.offset,{x:0,y:0})>=3;if(!h&&!g)return;const{point:m}=p,{timestamp:f}=It;this.history.push({...m,timestamp:f});const{onStart:b,onMove:v}=this.handlers;h||(b&&b(this.lastMoveEvent,p),this.startEvent=this.lastMoveEvent),v&&v(this.lastMoveEvent,p)},this.handlePointerMove=(p,h)=>{this.lastMoveEvent=p,this.lastMoveEventInfo=Eu(h,this.transformPagePoint),Ke.update(this.updatePoint,!0)},this.handlePointerUp=(p,h)=>{this.end();const{onEnd:g,onSessionEnd:m,resumeAnimation:f}=this.handlers;if(this.dragSnapToOrigin&&f&&f(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const b=Iu(p.type==="pointercancel"?this.lastMoveEventInfo:Eu(h,this.transformPagePoint),this.history);this.startEvent&&g&&g(p,b),m&&m(p,b)},!qc(t))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=o,this.contextWindow=r||window;const a=xi(t),c=Eu(a,this.transformPagePoint),{point:l}=c,{timestamp:u}=It;this.history=[{...l,timestamp:u}];const{onSessionStart:d}=n;d&&d(t,Iu(c,this.history)),this.removeListeners=bi(Ci(this.contextWindow,"pointermove",this.handlePointerMove),Ci(this.contextWindow,"pointerup",this.handlePointerUp),Ci(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),qn(this.updatePoint)}}function Eu(e,t){return t?{point:t(e.point)}:e}function vb(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Iu({point:e},t){return{point:e,delta:vb(e,yb(t)),offset:vb(e,JN(t)),velocity:qN(t,.1)}}function JN(e){return e[0]}function yb(e){return e[e.length-1]}function qN(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,o=null;const r=yb(e);for(;n>=0&&(o=e[n],!(r.timestamp-o.timestamp>Sn(t)));)n--;if(!o)return{x:0,y:0};const s=Bn(r.timestamp-o.timestamp);if(s===0)return{x:0,y:0};const a={x:(r.x-o.x)/s,y:(r.y-o.y)/s};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}const xb=1e-4,KN=1-xb,QN=1+xb,Cb=.01,eM=0-Cb,tM=0+Cb;function kt(e){return e.max-e.min}function nM(e,t,n){return Math.abs(e-t)<=n}function Tb(e,t,n,o=.5){e.origin=o,e.originPoint=it(t.min,t.max,e.origin),e.scale=kt(n)/kt(t),e.translate=it(n.min,n.max,e.origin)-e.originPoint,(e.scale>=KN&&e.scale<=QN||isNaN(e.scale))&&(e.scale=1),(e.translate>=eM&&e.translate<=tM||isNaN(e.translate))&&(e.translate=0)}function Ti(e,t,n,o){Tb(e.x,t.x,n.x,o?o.originX:void 0),Tb(e.y,t.y,n.y,o?o.originY:void 0)}function Eb(e,t,n){e.min=n.min+t.min,e.max=e.min+kt(t)}function oM(e,t,n){Eb(e.x,t.x,n.x),Eb(e.y,t.y,n.y)}function Ib(e,t,n){e.min=t.min-n.min,e.max=e.min+kt(t)}function Ei(e,t,n){Ib(e.x,t.x,n.x),Ib(e.y,t.y,n.y)}function rM(e,{min:t,max:n},o){return t!==void 0&&e<t?e=o?it(t,e,o.min):Math.max(e,t):n!==void 0&&e>n&&(e=o?it(n,e,o.max):Math.min(e,n)),e}function Sb(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function iM(e,{top:t,left:n,bottom:o,right:r}){return{x:Sb(e.x,n,r),y:Sb(e.y,t,o)}}function wb(e,t){let n=t.min-e.min,o=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,o]=[o,n]),{min:n,max:o}}function sM(e,t){return{x:wb(e.x,t.x),y:wb(e.y,t.y)}}function aM(e,t){let n=.5;const o=kt(e),r=kt(t);return r>o?n=ir(t.min,t.max-o,e.min):o>r&&(n=ir(e.min,e.max-r,t.min)),Fn(0,1,n)}function lM(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const Su=.35;function cM(e=Su){return e===!1?e=0:e===!0&&(e=Su),{x:Ab(e,"left","right"),y:Ab(e,"top","bottom")}}function Ab(e,t,n){return{min:Rb(e,t),max:Rb(e,n)}}function Rb(e,t){return typeof e=="number"?e:e[t]||0}const Ob=()=>({translate:0,scale:1,origin:0,originPoint:0}),pr=()=>({x:Ob(),y:Ob()}),Pb=()=>({min:0,max:0}),mt=()=>({x:Pb(),y:Pb()});function on(e){return[e("x"),e("y")]}function Nb({top:e,left:t,right:n,bottom:o}){return{x:{min:t,max:n},y:{min:e,max:o}}}function uM({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function dM(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),o=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:o.y,right:o.x}}function wu(e){return e===void 0||e===1}function Au({scale:e,scaleX:t,scaleY:n}){return!wu(e)||!wu(t)||!wu(n)}function xo(e){return Au(e)||Mb(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Mb(e){return kb(e.x)||kb(e.y)}function kb(e){return e&&e!=="0%"}function oa(e,t,n){const o=e-n,r=t*o;return n+r}function Db(e,t,n,o,r){return r!==void 0&&(e=oa(e,r,o)),oa(e,n,o)+t}function Ru(e,t=0,n=1,o,r){e.min=Db(e.min,t,n,o,r),e.max=Db(e.max,t,n,o,r)}function Bb(e,{x:t,y:n}){Ru(e.x,t.translate,t.scale,t.originPoint),Ru(e.y,n.translate,n.scale,n.originPoint)}const Fb=.999999999999,jb=1.0000000000001;function pM(e,t,n,o=!1){const r=n.length;if(!r)return;t.x=t.y=1;let s,a;for(let c=0;c<r;c++){s=n[c],a=s.projectionDelta;const{visualElement:l}=s.options;l&&l.props.style&&l.props.style.display==="contents"||(o&&s.options.layoutScroll&&s.scroll&&s!==s.root&&hr(e,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),a&&(t.x*=a.x.scale,t.y*=a.y.scale,Bb(e,a)),o&&xo(s.latestValues)&&hr(e,s.latestValues))}t.x<jb&&t.x>Fb&&(t.x=1),t.y<jb&&t.y>Fb&&(t.y=1)}function fr(e,t){e.min=e.min+t,e.max=e.max+t}function Vb(e,t,n,o,r=.5){const s=it(e.min,e.max,r);Ru(e,t,n,s,o)}function hr(e,t){Vb(e.x,t.x,t.scaleX,t.scale,t.originX),Vb(e.y,t.y,t.scaleY,t.scale,t.originY)}function Lb(e,t){return Nb(dM(e.getBoundingClientRect(),t))}function fM(e,t,n){const o=Lb(e,n),{scroll:r}=t;return r&&(fr(o.x,r.offset.x),fr(o.y,r.offset.y)),o}const _b=({current:e})=>e?e.ownerDocument.defaultView:null,hM=new WeakMap;class mM{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=mt(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:o}=this.visualElement;if(o&&o.isPresent===!1)return;const r=d=>{const{dragSnapToOrigin:p}=this.getProps();p?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(xi(d).point)},s=(d,p)=>{const{drag:h,dragPropagation:g,onDragStart:m}=this.getProps();if(h&&!g&&(this.openDragLock&&this.openDragLock(),this.openDragLock=lP(h),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),on(b=>{let v=this.getAxisMotionValue(b).get()||0;if(wn.test(v)){const{projection:S}=this.visualElement;if(S&&S.layout){const C=S.layout.layoutBox[b];C&&(v=kt(C)*(parseFloat(v)/100))}}this.originPoint[b]=v}),m&&Ke.postRender(()=>m(d,p)),nu(this.visualElement,"transform");const{animationState:f}=this.visualElement;f&&f.setActive("whileDrag",!0)},a=(d,p)=>{const{dragPropagation:h,dragDirectionLock:g,onDirectionLock:m,onDrag:f}=this.getProps();if(!h&&!this.openDragLock)return;const{offset:b}=p;if(g&&this.currentDirection===null){this.currentDirection=gM(b),this.currentDirection!==null&&m&&m(this.currentDirection);return}this.updateAxis("x",p.point,b),this.updateAxis("y",p.point,b),this.visualElement.render(),f&&f(d,p)},c=(d,p)=>this.stop(d,p),l=()=>on(d=>{var p;return this.getAnimationState(d)==="paused"&&((p=this.getAxisMotionValue(d).animation)===null||p===void 0?void 0:p.play())}),{dragSnapToOrigin:u}=this.getProps();this.panSession=new bb(t,{onSessionStart:r,onStart:s,onMove:a,onSessionEnd:c,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,contextWindow:_b(this.visualElement)})}stop(t,n){const o=this.isDragging;if(this.cancel(),!o)return;const{velocity:r}=n;this.startAnimation(r);const{onDragEnd:s}=this.getProps();s&&Ke.postRender(()=>s(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:o}=this.getProps();!o&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,o){const{drag:r}=this.getProps();if(!o||!ra(t,r,this.currentDirection))return;const s=this.getAxisMotionValue(t);let a=this.originPoint[t]+o[t];this.constraints&&this.constraints[t]&&(a=rM(a,this.constraints[t],this.elastic[t])),s.set(a)}resolveConstraints(){var t;const{dragConstraints:n,dragElastic:o}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,s=this.constraints;n&&ar(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&r?this.constraints=iM(r.layoutBox,n):this.constraints=!1,this.elastic=cM(o),s!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&on(a=>{this.constraints!==!1&&this.getAxisMotionValue(a)&&(this.constraints[a]=lM(r.layoutBox[a],this.constraints[a]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!ar(t))return!1;const o=t.current;Jn(o!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");const{projection:r}=this.visualElement;if(!r||!r.layout)return!1;const s=fM(o,r.root,this.visualElement.getTransformPagePoint());let a=sM(r.layout.layoutBox,s);if(n){const c=n(uM(a));this.hasMutatedConstraints=!!c,c&&(a=Nb(c))}return a}startAnimation(t){const{drag:n,dragMomentum:o,dragElastic:r,dragTransition:s,dragSnapToOrigin:a,onDragTransitionEnd:c}=this.getProps(),l=this.constraints||{},u=on(d=>{if(!ra(d,n,this.currentDirection))return;let p=l&&l[d]||{};a&&(p={min:0,max:0});const h=r?200:1e6,g=r?40:1e7,m={type:"inertia",velocity:o?t[d]:0,bounceStiffness:h,bounceDamping:g,timeConstant:750,restDelta:1,restSpeed:10,...s,...p};return this.startAxisValueAnimation(d,m)});return Promise.all(u).then(c)}startAxisValueAnimation(t,n){const o=this.getAxisMotionValue(t);return nu(this.visualElement,t),o.start(Cu(t,o,0,n,this.visualElement,!1))}stopAnimation(){on(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){on(t=>{var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,o=this.visualElement.getProps(),r=o[n];return r||this.visualElement.getValue(t,(o.initial?o.initial[t]:void 0)||0)}snapToCursor(t){on(n=>{const{drag:o}=this.getProps();if(!ra(n,o,this.currentDirection))return;const{projection:r}=this.visualElement,s=this.getAxisMotionValue(n);if(r&&r.layout){const{min:a,max:c}=r.layout.layoutBox[n];s.set(t[n]-it(a,c,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:o}=this.visualElement;if(!ar(n)||!o||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};on(a=>{const c=this.getAxisMotionValue(a);if(c&&this.constraints!==!1){const l=c.get();r[a]=aM({min:l,max:l},this.constraints[a])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",o.root&&o.root.updateScroll(),o.updateLayout(),this.resolveConstraints(),on(a=>{if(!ra(a,t,null))return;const c=this.getAxisMotionValue(a),{min:l,max:u}=this.constraints[a];c.set(it(l,u,r[a]))})}addListeners(){if(!this.visualElement.current)return;hM.set(this.visualElement,this);const t=this.visualElement.current,n=Ci(t,"pointerdown",l=>{const{drag:u,dragListener:d=!0}=this.getProps();u&&d&&this.start(l)}),o=()=>{const{dragConstraints:l}=this.getProps();ar(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:r}=this.visualElement,s=r.addEventListener("measure",o);r&&!r.layout&&(r.root&&r.root.updateScroll(),r.updateLayout()),Ke.read(o);const a=yi(window,"resize",()=>this.scalePositionWithinConstraints()),c=r.addEventListener("didUpdate",({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&(on(d=>{const p=this.getAxisMotionValue(d);p&&(this.originPoint[d]+=l[d].translate,p.set(p.get()+l[d].translate))}),this.visualElement.render())});return()=>{a(),n(),s(),c&&c()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:o=!1,dragPropagation:r=!1,dragConstraints:s=!1,dragElastic:a=Su,dragMomentum:c=!0}=t;return{...t,drag:n,dragDirectionLock:o,dragPropagation:r,dragConstraints:s,dragElastic:a,dragMomentum:c}}}function ra(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function gM(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class bM extends eo{constructor(t){super(t),this.removeGroupControls=Lt,this.removeListeners=Lt,this.controls=new mM(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Lt}unmount(){this.removeGroupControls(),this.removeListeners()}}const $b=e=>(t,n)=>{e&&Ke.postRender(()=>e(t,n))};class vM extends eo{constructor(){super(...arguments),this.removePointerDownListener=Lt}onPointerDown(t){this.session=new bb(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:_b(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:o,onPanEnd:r}=this.node.getProps();return{onSessionStart:$b(t),onStart:$b(n),onMove:o,onEnd:(s,a)=>{delete this.session,r&&Ke.postRender(()=>r(s,a))}}}mount(){this.removePointerDownListener=Ci(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const ia={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Wb(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Ii={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(ye.test(e))e=parseFloat(e);else return e;const n=Wb(e,t.target.x),o=Wb(e,t.target.y);return`${n}% ${o}%`}},yM={correct:(e,{treeScale:t,projectionDelta:n})=>{const o=e,r=Qn.parse(e);if(r.length>5)return o;const s=Qn.createTransformer(e),a=typeof r[0]!="number"?1:0,c=n.x.scale*t.x,l=n.y.scale*t.y;r[0+a]/=c,r[1+a]/=l;const u=it(c,l,.5);return typeof r[2+a]=="number"&&(r[2+a]/=u),typeof r[3+a]=="number"&&(r[3+a]/=u),s(r)}};class xM extends M.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:o,layoutId:r}=this.props,{projection:s}=t;wO(CM),s&&(n.group&&n.group.add(s),o&&o.register&&r&&o.register(s),s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),ia.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:o,drag:r,isPresent:s}=this.props,a=o.projection;return a&&(a.isPresent=s,r||t.layoutDependency!==n||n===void 0?a.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?a.promote():a.relegate()||Ke.postRender(()=>{const c=a.getStack();(!c||!c.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Dc.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:o}=this.props,{projection:r}=t;r&&(r.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(r),o&&o.deregister&&o.deregister(r))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function Gb(e){const[t,n]=rO(),o=M.useContext(Dm);return x.jsx(xM,{...e,layoutGroup:o,switchLayoutGroup:M.useContext(Hm),isPresent:t,safeToRemove:n})}const CM={borderRadius:{...Ii,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Ii,borderTopRightRadius:Ii,borderBottomLeftRadius:Ii,borderBottomRightRadius:Ii,boxShadow:yM};function TM(e,t,n){const o=At(e)?e:fi(e);return o.start(Cu("",o,t,n)),o.animation}function EM(e){return e instanceof SVGElement&&e.tagName!=="svg"}const IM=(e,t)=>e.depth-t.depth;class SM{constructor(){this.children=[],this.isDirty=!1}add(t){Qc(this.children,t),this.isDirty=!0}remove(t){eu(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(IM),this.isDirty=!1,this.children.forEach(t)}}function wM(e,t){const n=An.now(),o=({timestamp:r})=>{const s=r-n;s>=t&&(qn(o),e(s-t))};return Ke.read(o,!0),()=>qn(o)}const zb=["TopLeft","TopRight","BottomLeft","BottomRight"],AM=zb.length,Hb=e=>typeof e=="string"?parseFloat(e):e,Xb=e=>typeof e=="number"||ye.test(e);function RM(e,t,n,o,r,s){r?(e.opacity=it(0,n.opacity!==void 0?n.opacity:1,OM(o)),e.opacityExit=it(t.opacity!==void 0?t.opacity:1,0,PM(o))):s&&(e.opacity=it(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,o));for(let a=0;a<AM;a++){const c=`border${zb[a]}Radius`;let l=Ub(t,c),u=Ub(n,c);if(l===void 0&&u===void 0)continue;l||(l=0),u||(u=0),l===0||u===0||Xb(l)===Xb(u)?(e[c]=Math.max(it(Hb(l),Hb(u),o),0),(wn.test(u)||wn.test(l))&&(e[c]+="%")):e[c]=u}(t.rotate||n.rotate)&&(e.rotate=it(t.rotate||0,n.rotate||0,o))}function Ub(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const OM=Zb(0,.5,Pg),PM=Zb(.5,.95,Lt);function Zb(e,t,n){return o=>o<e?0:o>t?1:n(ir(e,t,o))}function Yb(e,t){e.min=t.min,e.max=t.max}function rn(e,t){Yb(e.x,t.x),Yb(e.y,t.y)}function Jb(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function qb(e,t,n,o,r){return e-=t,e=oa(e,1/n,o),r!==void 0&&(e=oa(e,1/r,o)),e}function NM(e,t=0,n=1,o=.5,r,s=e,a=e){if(wn.test(t)&&(t=parseFloat(t),t=it(a.min,a.max,t/100)-a.min),typeof t!="number")return;let c=it(s.min,s.max,o);e===s&&(c-=t),e.min=qb(e.min,t,n,c,r),e.max=qb(e.max,t,n,c,r)}function Kb(e,t,[n,o,r],s,a){NM(e,t[n],t[o],t[r],t.scale,s,a)}const MM=["x","scaleX","originX"],kM=["y","scaleY","originY"];function Qb(e,t,n,o){Kb(e.x,t,MM,n?n.x:void 0,o?o.x:void 0),Kb(e.y,t,kM,n?n.y:void 0,o?o.y:void 0)}function ev(e){return e.translate===0&&e.scale===1}function tv(e){return ev(e.x)&&ev(e.y)}function nv(e,t){return e.min===t.min&&e.max===t.max}function DM(e,t){return nv(e.x,t.x)&&nv(e.y,t.y)}function ov(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function rv(e,t){return ov(e.x,t.x)&&ov(e.y,t.y)}function iv(e){return kt(e.x)/kt(e.y)}function sv(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class BM{constructor(){this.members=[]}add(t){Qc(this.members,t),t.scheduleRender()}remove(t){if(eu(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(r=>t===r);if(n===0)return!1;let o;for(let r=n;r>=0;r--){const s=this.members[r];if(s.isPresent!==!1){o=s;break}}return o?(this.promote(o),!0):!1}promote(t,n){const o=this.lead;if(t!==o&&(this.prevLead=o,this.lead=t,t.show(),o)){o.instance&&o.scheduleRender(),t.scheduleRender(),t.resumeFrom=o,n&&(t.resumeFrom.preserveOpacity=!0),o.snapshot&&(t.snapshot=o.snapshot,t.snapshot.latestValues=o.animationValues||o.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:r}=t.options;r===!1&&o.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:o}=t;n.onExitComplete&&n.onExitComplete(),o&&o.options.onExitComplete&&o.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function FM(e,t,n){let o="";const r=e.x.translate/t.x,s=e.y.translate/t.y,a=(n==null?void 0:n.z)||0;if((r||s||a)&&(o=`translate3d(${r}px, ${s}px, ${a}px) `),(t.x!==1||t.y!==1)&&(o+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:u,rotate:d,rotateX:p,rotateY:h,skewX:g,skewY:m}=n;u&&(o=`perspective(${u}px) ${o}`),d&&(o+=`rotate(${d}deg) `),p&&(o+=`rotateX(${p}deg) `),h&&(o+=`rotateY(${h}deg) `),g&&(o+=`skewX(${g}deg) `),m&&(o+=`skewY(${m}deg) `)}const c=e.x.scale*t.x,l=e.y.scale*t.y;return(c!==1||l!==1)&&(o+=`scale(${c}, ${l})`),o||"none"}const Ou=["","X","Y","Z"],jM={visibility:"hidden"},av=1e3;let VM=0;function Pu(e,t,n,o){const{latestValues:r}=t;r[e]&&(n[e]=r[e],t.setStaticValue(e,0),o&&(o[e]=0))}function lv(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=Eg(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:r,layoutId:s}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",Ke,!(r||s))}const{parent:o}=e;o&&!o.hasCheckedOptimisedAppear&&lv(o)}function cv({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:o,resetTransform:r}){return class{constructor(a={},c=t==null?void 0:t()){this.id=VM++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach($M),this.nodes.forEach(XM),this.nodes.forEach(UM),this.nodes.forEach(WM)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=a,this.root=c?c.root||c:this,this.path=c?[...c.path,c]:[],this.parent=c,this.depth=c?c.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new SM)}addEventListener(a,c){return this.eventHandlers.has(a)||this.eventHandlers.set(a,new tu),this.eventHandlers.get(a).add(c)}notifyListeners(a,...c){const l=this.eventHandlers.get(a);l&&l.notify(...c)}hasListeners(a){return this.eventHandlers.has(a)}mount(a,c=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=EM(a),this.instance=a;const{layoutId:l,layout:u,visualElement:d}=this.options;if(d&&!d.current&&d.mount(a),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),c&&(u||l)&&(this.isLayoutDirty=!0),e){let p;const h=()=>this.root.updateBlockedByResize=!1;e(a,()=>{this.root.updateBlockedByResize=!0,p&&p(),p=wM(h,250),ia.hasAnimatedSinceResize&&(ia.hasAnimatedSinceResize=!1,this.nodes.forEach(dv))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&d&&(l||u)&&this.addEventListener("didUpdate",({delta:p,hasLayoutChanged:h,hasRelativeLayoutChanged:g,layout:m})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const f=this.options.transition||d.getDefaultTransition()||KM,{onLayoutAnimationStart:b,onLayoutAnimationComplete:v}=d.getProps(),S=!this.targetLayout||!rv(this.targetLayout,m),C=!h&&g;if(this.options.layoutRoot||this.resumeFrom||C||h&&(S||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(p,C);const I={...Xc(f,"layout"),onPlay:b,onComplete:v};(d.shouldReduceMotion||this.options.layoutRoot)&&(I.delay=0,I.type=!1),this.startAnimation(I)}else h||dv(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=m})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const a=this.getStack();a&&a.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,qn(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(ZM),this.animationId++)}getTransformTemplate(){const{visualElement:a}=this.options;return a&&a.getProps().transformTemplate}willUpdate(a=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&lv(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let d=0;d<this.path.length;d++){const p=this.path[d];p.shouldResetTransform=!0,p.updateScroll("snapshot"),p.options.layoutRoot&&p.willUpdate(!1)}const{layoutId:c,layout:l}=this.options;if(c===void 0&&!l)return;const u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),a&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(uv);return}this.isUpdating||this.nodes.forEach(zM),this.isUpdating=!1,this.nodes.forEach(HM),this.nodes.forEach(LM),this.nodes.forEach(_M),this.clearAllSnapshots();const c=An.now();It.delta=Fn(0,1e3/60,c-It.timestamp),It.timestamp=c,It.isProcessing=!0,Pc.update.process(It),Pc.preRender.process(It),Pc.render.process(It),It.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Dc.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(GM),this.sharedNodes.forEach(YM)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Ke.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Ke.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!kt(this.snapshot.measuredBox.x)&&!kt(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const a=this.layout;this.layout=this.measure(!1),this.layoutCorrected=mt(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:c}=this.options;c&&c.notify("LayoutMeasure",this.layout.layoutBox,a?a.layoutBox:void 0)}updateScroll(a="measure"){let c=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===a&&(c=!1),c){const l=o(this.instance);this.scroll={animationId:this.root.animationId,phase:a,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!r)return;const a=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,c=this.projectionDelta&&!tv(this.projectionDelta),l=this.getTransformTemplate(),u=l?l(this.latestValues,""):void 0,d=u!==this.prevTransformTemplateValue;a&&(c||xo(this.latestValues)||d)&&(r(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(a=!0){const c=this.measurePageBox();let l=this.removeElementScroll(c);return a&&(l=this.removeTransform(l)),QM(l),{animationId:this.root.animationId,measuredBox:c,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var a;const{visualElement:c}=this.options;if(!c)return mt();const l=c.measureViewportBox();if(!(((a=this.scroll)===null||a===void 0?void 0:a.wasRoot)||this.path.some(ek))){const{scroll:d}=this.root;d&&(fr(l.x,d.offset.x),fr(l.y,d.offset.y))}return l}removeElementScroll(a){var c;const l=mt();if(rn(l,a),!((c=this.scroll)===null||c===void 0)&&c.wasRoot)return l;for(let u=0;u<this.path.length;u++){const d=this.path[u],{scroll:p,options:h}=d;d!==this.root&&p&&h.layoutScroll&&(p.wasRoot&&rn(l,a),fr(l.x,p.offset.x),fr(l.y,p.offset.y))}return l}applyTransform(a,c=!1){const l=mt();rn(l,a);for(let u=0;u<this.path.length;u++){const d=this.path[u];!c&&d.options.layoutScroll&&d.scroll&&d!==d.root&&hr(l,{x:-d.scroll.offset.x,y:-d.scroll.offset.y}),xo(d.latestValues)&&hr(l,d.latestValues)}return xo(this.latestValues)&&hr(l,this.latestValues),l}removeTransform(a){const c=mt();rn(c,a);for(let l=0;l<this.path.length;l++){const u=this.path[l];if(!u.instance||!xo(u.latestValues))continue;Au(u.latestValues)&&u.updateSnapshot();const d=mt(),p=u.measurePageBox();rn(d,p),Qb(c,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,d)}return xo(this.latestValues)&&Qb(c,this.latestValues),c}setTargetDelta(a){this.targetDelta=a,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(a){this.options={...this.options,...a,crossfade:a.crossfade!==void 0?a.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==It.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(a=!1){var c;const l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);const u=!!this.resumingFrom||this!==l;if(!(a||u&&this.isSharedProjectionDirty||this.isProjectionDirty||!((c=this.parent)===null||c===void 0)&&c.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:p,layoutId:h}=this.options;if(!(!this.layout||!(p||h))){if(this.resolvedRelativeTargetAt=It.timestamp,!this.targetDelta&&!this.relativeTarget){const g=this.getClosestProjectingParent();g&&g.layout&&this.animationProgress!==1?(this.relativeParent=g,this.forceRelativeParentToResolveTarget(),this.relativeTarget=mt(),this.relativeTargetOrigin=mt(),Ei(this.relativeTargetOrigin,this.layout.layoutBox,g.layout.layoutBox),rn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=mt(),this.targetWithTransforms=mt()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),oM(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):rn(this.target,this.layout.layoutBox),Bb(this.target,this.targetDelta)):rn(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const g=this.getClosestProjectingParent();g&&!!g.resumingFrom==!!this.resumingFrom&&!g.options.layoutScroll&&g.target&&this.animationProgress!==1?(this.relativeParent=g,this.forceRelativeParentToResolveTarget(),this.relativeTarget=mt(),this.relativeTargetOrigin=mt(),Ei(this.relativeTargetOrigin,this.target,g.target),rn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||Au(this.parent.latestValues)||Mb(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var a;const c=this.getLead(),l=!!this.resumingFrom||this!==c;let u=!0;if((this.isProjectionDirty||!((a=this.parent)===null||a===void 0)&&a.isProjectionDirty)&&(u=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(u=!1),this.resolvedRelativeTargetAt===It.timestamp&&(u=!1),u)return;const{layout:d,layoutId:p}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(d||p))return;rn(this.layoutCorrected,this.layout.layoutBox);const h=this.treeScale.x,g=this.treeScale.y;pM(this.layoutCorrected,this.treeScale,this.path,l),c.layout&&!c.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(c.target=c.layout.layoutBox,c.targetWithTransforms=mt());const{target:m}=c;if(!m){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Jb(this.prevProjectionDelta.x,this.projectionDelta.x),Jb(this.prevProjectionDelta.y,this.projectionDelta.y)),Ti(this.projectionDelta,this.layoutCorrected,m,this.latestValues),(this.treeScale.x!==h||this.treeScale.y!==g||!sv(this.projectionDelta.x,this.prevProjectionDelta.x)||!sv(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",m))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(a=!0){var c;if((c=this.options.visualElement)===null||c===void 0||c.scheduleRender(),a){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=pr(),this.projectionDelta=pr(),this.projectionDeltaWithTransform=pr()}setAnimationOrigin(a,c=!1){const l=this.snapshot,u=l?l.latestValues:{},d={...this.latestValues},p=pr();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!c;const h=mt(),g=l?l.source:void 0,m=this.layout?this.layout.source:void 0,f=g!==m,b=this.getStack(),v=!b||b.members.length<=1,S=!!(f&&!v&&this.options.crossfade===!0&&!this.path.some(qM));this.animationProgress=0;let C;this.mixTargetDelta=I=>{const y=I/1e3;pv(p.x,a.x,y),pv(p.y,a.y,y),this.setTargetDelta(p),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Ei(h,this.layout.layoutBox,this.relativeParent.layout.layoutBox),JM(this.relativeTarget,this.relativeTargetOrigin,h,y),C&&DM(this.relativeTarget,C)&&(this.isProjectionDirty=!1),C||(C=mt()),rn(C,this.relativeTarget)),f&&(this.animationValues=d,RM(d,u,this.latestValues,y,S,v)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=y},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(a){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(qn(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Ke.update(()=>{ia.hasAnimatedSinceResize=!0,this.currentAnimation=TM(0,av,{...a,onUpdate:c=>{this.mixTargetDelta(c),a.onUpdate&&a.onUpdate(c)},onStop:()=>{},onComplete:()=>{a.onComplete&&a.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const a=this.getStack();a&&a.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(av),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:c,target:l,layout:u,latestValues:d}=a;if(!(!c||!l||!u)){if(this!==a&&this.layout&&u&&bv(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||mt();const p=kt(this.layout.layoutBox.x);l.x.min=a.target.x.min,l.x.max=l.x.min+p;const h=kt(this.layout.layoutBox.y);l.y.min=a.target.y.min,l.y.max=l.y.min+h}rn(c,l),hr(c,d),Ti(this.projectionDeltaWithTransform,this.layoutCorrected,c,d)}}registerSharedNode(a,c){this.sharedNodes.has(a)||this.sharedNodes.set(a,new BM),this.sharedNodes.get(a).add(c);const u=c.options.initialPromotionConfig;c.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(c):void 0})}isLead(){const a=this.getStack();return a?a.lead===this:!0}getLead(){var a;const{layoutId:c}=this.options;return c?((a=this.getStack())===null||a===void 0?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:c}=this.options;return c?(a=this.getStack())===null||a===void 0?void 0:a.prevLead:void 0}getStack(){const{layoutId:a}=this.options;if(a)return this.root.sharedNodes.get(a)}promote({needsReset:a,transition:c,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),a&&(this.projectionDelta=void 0,this.needsReset=!0),c&&this.setOptions({transition:c})}relegate(){const a=this.getStack();return a?a.relegate(this):!1}resetSkewAndRotation(){const{visualElement:a}=this.options;if(!a)return;let c=!1;const{latestValues:l}=a;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(c=!0),!c)return;const u={};l.z&&Pu("z",a,u,this.animationValues);for(let d=0;d<Ou.length;d++)Pu(`rotate${Ou[d]}`,a,u,this.animationValues),Pu(`skew${Ou[d]}`,a,u,this.animationValues);a.render();for(const d in u)a.setStaticValue(d,u[d]),this.animationValues&&(this.animationValues[d]=u[d]);a.scheduleRender()}getProjectionStyles(a){var c,l;if(!this.instance||this.isSVG)return;if(!this.isVisible)return jM;const u={visibility:""},d=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,u.opacity="",u.pointerEvents=qs(a==null?void 0:a.pointerEvents)||"",u.transform=d?d(this.latestValues,""):"none",u;const p=this.getLead();if(!this.projectionDelta||!this.layout||!p.target){const f={};return this.options.layoutId&&(f.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,f.pointerEvents=qs(a==null?void 0:a.pointerEvents)||""),this.hasProjected&&!xo(this.latestValues)&&(f.transform=d?d({},""):"none",this.hasProjected=!1),f}const h=p.animationValues||p.latestValues;this.applyTransformsToTarget(),u.transform=FM(this.projectionDeltaWithTransform,this.treeScale,h),d&&(u.transform=d(h,u.transform));const{x:g,y:m}=this.projectionDelta;u.transformOrigin=`${g.origin*100}% ${m.origin*100}% 0`,p.animationValues?u.opacity=p===this?(l=(c=h.opacity)!==null&&c!==void 0?c:this.latestValues.opacity)!==null&&l!==void 0?l:1:this.preserveOpacity?this.latestValues.opacity:h.opacityExit:u.opacity=p===this?h.opacity!==void 0?h.opacity:"":h.opacityExit!==void 0?h.opacityExit:0;for(const f in ai){if(h[f]===void 0)continue;const{correct:b,applyTo:v,isCSSVariable:S}=ai[f],C=u.transform==="none"?h[f]:b(h[f],p);if(v){const I=v.length;for(let y=0;y<I;y++)u[v[y]]=C}else S?this.options.visualElement.renderState.vars[f]=C:u[f]=C}return this.options.layoutId&&(u.pointerEvents=p===this?qs(a==null?void 0:a.pointerEvents)||"":"none"),u}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(a=>{var c;return(c=a.currentAnimation)===null||c===void 0?void 0:c.stop()}),this.root.nodes.forEach(uv),this.root.sharedNodes.clear()}}}function LM(e){e.updateLayout()}function _M(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:o,measuredBox:r}=e.layout,{animationType:s}=e.options,a=n.source!==e.layout.source;s==="size"?on(p=>{const h=a?n.measuredBox[p]:n.layoutBox[p],g=kt(h);h.min=o[p].min,h.max=h.min+g}):bv(s,n.layoutBox,o)&&on(p=>{const h=a?n.measuredBox[p]:n.layoutBox[p],g=kt(o[p]);h.max=h.min+g,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[p].max=e.relativeTarget[p].min+g)});const c=pr();Ti(c,o,n.layoutBox);const l=pr();a?Ti(l,e.applyTransform(r,!0),n.measuredBox):Ti(l,o,n.layoutBox);const u=!tv(c);let d=!1;if(!e.resumeFrom){const p=e.getClosestProjectingParent();if(p&&!p.resumeFrom){const{snapshot:h,layout:g}=p;if(h&&g){const m=mt();Ei(m,n.layoutBox,h.layoutBox);const f=mt();Ei(f,o,g.layoutBox),rv(m,f)||(d=!0),p.options.layoutRoot&&(e.relativeTarget=f,e.relativeTargetOrigin=m,e.relativeParent=p)}}}e.notifyListeners("didUpdate",{layout:o,snapshot:n,delta:l,layoutDelta:c,hasLayoutChanged:u,hasRelativeLayoutChanged:d})}else if(e.isLead()){const{onExitComplete:o}=e.options;o&&o()}e.options.transition=void 0}function $M(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function WM(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function GM(e){e.clearSnapshot()}function uv(e){e.clearMeasurements()}function zM(e){e.isLayoutDirty=!1}function HM(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function dv(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function XM(e){e.resolveTargetDelta()}function UM(e){e.calcProjection()}function ZM(e){e.resetSkewAndRotation()}function YM(e){e.removeLeadSnapshot()}function pv(e,t,n){e.translate=it(t.translate,0,n),e.scale=it(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function fv(e,t,n,o){e.min=it(t.min,n.min,o),e.max=it(t.max,n.max,o)}function JM(e,t,n,o){fv(e.x,t.x,n.x,o),fv(e.y,t.y,n.y,o)}function qM(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const KM={duration:.45,ease:[.4,0,.1,1]},hv=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),mv=hv("applewebkit/")&&!hv("chrome/")?Math.round:Lt;function gv(e){e.min=mv(e.min),e.max=mv(e.max)}function QM(e){gv(e.x),gv(e.y)}function bv(e,t,n){return e==="position"||e==="preserve-aspect"&&!nM(iv(t),iv(n),.2)}function ek(e){var t;return e!==e.root&&((t=e.scroll)===null||t===void 0?void 0:t.wasRoot)}const tk=cv({attachResizeListener:(e,t)=>yi(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Nu={current:void 0},vv=cv({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Nu.current){const e=new tk({});e.mount(window),e.setOptions({layoutScroll:!0}),Nu.current=e}return Nu.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),nk={pan:{Feature:vM},drag:{Feature:bM,ProjectionNode:vv,MeasureLayout:Gb}};function yv(e,t,n){const{props:o}=e;e.animationState&&o.whileHover&&e.animationState.setActive("whileHover",n==="Start");const r="onHover"+n,s=o[r];s&&Ke.postRender(()=>s(t,xi(t)))}class ok extends eo{mount(){const{current:t}=this.node;t&&(this.unmount=oP(t,(n,o)=>(yv(this.node,o,"Start"),r=>yv(this.node,r,"End"))))}unmount(){}}class rk extends eo{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=bi(yi(this.node.current,"focus",()=>this.onFocus()),yi(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function xv(e,t,n){const{props:o}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&o.whileTap&&e.animationState.setActive("whileTap",n==="Start");const r="onTap"+(n==="End"?"":n),s=o[r];s&&Ke.postRender(()=>s(t,xi(t)))}class ik extends eo{mount(){const{current:t}=this.node;t&&(this.unmount=aP(t,(n,o)=>(xv(this.node,o,"Start"),(r,{success:s})=>xv(this.node,r,s?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Mu=new WeakMap,ku=new WeakMap,sk=e=>{const t=Mu.get(e.target);t&&t(e)},ak=e=>{e.forEach(sk)};function lk({root:e,...t}){const n=e||document;ku.has(n)||ku.set(n,{});const o=ku.get(n),r=JSON.stringify(t);return o[r]||(o[r]=new IntersectionObserver(ak,{root:e,...t})),o[r]}function ck(e,t,n){const o=lk(t);return Mu.set(e,n),o.observe(e),()=>{Mu.delete(e),o.unobserve(e)}}const uk={some:0,all:1};class dk extends eo{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:o,amount:r="some",once:s}=t,a={root:n?n.current:void 0,rootMargin:o,threshold:typeof r=="number"?r:uk[r]},c=l=>{const{isIntersecting:u}=l;if(this.isInView===u||(this.isInView=u,s&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:d,onViewportLeave:p}=this.node.getProps(),h=u?d:p;h&&h(l)};return ck(this.node.current,a,c)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(pk(t,n))&&this.startObserver()}unmount(){}}function pk({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const fk={inView:{Feature:dk},tap:{Feature:ik},focus:{Feature:rk},hover:{Feature:ok}},hk={layout:{ProjectionNode:vv,MeasureLayout:Gb}},Du={current:null},Cv={current:!1};function mk(){if(Cv.current=!0,!!Rc)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Du.current=e.matches;e.addListener(t),t()}else Du.current=!1}const gk=[...Zg,Rt,Qn],bk=e=>gk.find(Ug(e)),vk=new WeakMap;function yk(e,t,n){for(const o in t){const r=t[o],s=n[o];if(At(r))e.addValue(o,r),process.env.NODE_ENV==="development"&&Xs(r.version==="12.4.3",`Attempting to mix Motion versions ${r.version} with 12.4.3 may not work as expected.`);else if(At(s))e.addValue(o,fi(r,{owner:e}));else if(s!==r)if(e.hasValue(o)){const a=e.getValue(o);a.liveStyle===!0?a.jump(r):a.hasAnimated||a.set(r)}else{const a=e.getStaticValue(o);e.addValue(o,fi(a!==void 0?a:r,{owner:e}))}}for(const o in n)t[o]===void 0&&e.removeValue(o);return t}const Tv=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class xk{scrapeMotionValuesFromProps(t,n,o){return{}}constructor({parent:t,props:n,presenceContext:o,reducedMotionConfig:r,blockInitialAnimation:s,visualState:a},c={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=fu,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const g=An.now();this.renderScheduledAt<g&&(this.renderScheduledAt=g,Ke.render(this.render,!1,!0))};const{latestValues:l,renderState:u,onUpdate:d}=a;this.onUpdate=d,this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=u,this.parent=t,this.props=n,this.presenceContext=o,this.depth=t?t.depth+1:0,this.reducedMotionConfig=r,this.options=c,this.blockInitialAnimation=!!s,this.isControllingVariants=Ys(n),this.isVariantNode=Wm(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:p,...h}=this.scrapeMotionValuesFromProps(n,{},this);for(const g in h){const m=h[g];l[g]!==void 0&&At(m)&&m.set(l[g],!1)}}mount(t){this.current=t,vk.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,o)=>this.bindToMotionValue(o,n)),Cv.current||mk(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Du.current,process.env.NODE_ENV!=="production"&&Xs(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected."),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),qn(this.notifyUpdate),qn(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const o=go.has(t);o&&this.onBindTransform&&this.onBindTransform();const r=n.on("change",c=>{this.latestValues[t]=c,this.props.onUpdate&&Ke.preRender(this.notifyUpdate),o&&this.projection&&(this.projection.isTransformDirty=!0)}),s=n.on("renderRequest",this.scheduleRender);let a;window.MotionCheckAppearSync&&(a=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{r(),s(),a&&a(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in sr){const n=sr[t];if(!n)continue;const{isEnabled:o,Feature:r}=n;if(!this.features[t]&&r&&o(this.props)&&(this.features[t]=new r(this)),this.features[t]){const s=this.features[t];s.isMounted?s.update():(s.mount(),s.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):mt()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let o=0;o<Tv.length;o++){const r=Tv[o];this.propEventSubscriptions[r]&&(this.propEventSubscriptions[r](),delete this.propEventSubscriptions[r]);const s="on"+r,a=t[s];a&&(this.propEventSubscriptions[r]=this.on(r,a))}this.prevMotionValues=yk(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const o=this.values.get(t);n!==o&&(o&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let o=this.values.get(t);return o===void 0&&n!==void 0&&(o=fi(n===null?void 0:n,{owner:this}),this.addValue(t,o)),o}readValue(t,n){var o;let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(o=this.getBaseTargetFromProps(this.props,t))!==null&&o!==void 0?o:this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(Hg(r)||Mg(r))?r=parseFloat(r):!bk(r)&&Qn.test(n)&&(r=Lg(t,n)),this.setBaseTarget(t,At(r)?r.get():r)),At(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:o}=this.props;let r;if(typeof o=="string"||typeof o=="object"){const a=Gc(this.props,o,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);a&&(r=a[t])}if(o&&r!==void 0)return r;const s=this.getBaseTargetFromProps(this.props,t);return s!==void 0&&!At(s)?s:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new tu),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class Ev extends xk{constructor(){super(...arguments),this.KeyframeResolver=Jg}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:o}){delete n[t],delete o[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;At(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function Ck(e){return window.getComputedStyle(e)}class Tk extends Ev{constructor(){super(...arguments),this.type="html",this.renderInstance=rg}readValueFromInstance(t,n){if(go.has(n)){const o=uu(n);return o&&o.default||0}else{const o=Ck(t),r=(Bc(n)?o.getPropertyValue(n):o[n])||0;return typeof r=="string"?r.trim():r}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Lb(t,n)}build(t,n,o){Vc(t,n,o.transformTemplate)}scrapeMotionValuesFromProps(t,n,o){return Hc(t,n,o)}}class Ek extends Ev{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=mt,this.updateDimensions=()=>{this.current&&!this.renderState.dimensions&&og(this.current,this.renderState)}}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(go.has(n)){const o=uu(n);return o&&o.default||0}return n=ig.has(n)?n:kc(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,o){return ag(t,n,o)}onBindTransform(){this.current&&!this.renderState.dimensions&&Ke.postRender(this.updateDimensions)}build(t,n,o){$c(t,n,this.isSVGTag,o.transformTemplate)}renderInstance(t,n,o,r){sg(t,n,o,r)}mount(t){this.isSVGTag=Wc(t.tagName),super.mount(t)}}const Ik=(e,t)=>_c(e)?new Ek(t):new Tk(t,{allowProjection:e!==M.Fragment}),Sk=JO({...UN,...fk,...nk,...hk},Ik),Co=fO(Sk),Bu=({label:e,icon:t,hasFooter:n=!1,showCheckBox:o=!1,options:r,setVisibleGridColumns:s,defaultValue:a=!0,isMulti:c=!1,handleSelectClick:l})=>{var y,A;const u=ht(),[d,p]=M.useState(!1),[h,g]=M.useState(a?(y=r==null?void 0:r[0])==null?void 0:y.label:"Select option"),[m,f]=M.useState(r||[]);((A=m==null?void 0:m.filter(w=>!(w!=null&&w.isMandatory)))==null?void 0:A.length)>7;const b=M.useRef(null),v=M.useRef(null),S=M.useCallback(w=>{let R=[...m];R=R==null?void 0:R.map(P=>(P==null?void 0:P.key)===w?{...P,hidden:!P.hidden}:P),f(R),p(!0)},[m]);M.useCallback(()=>{f(w=>{const R=[...w];return R.splice(v.current,0,R.splice(b.current,1)[0]),R.map((P,N)=>({...P,sequence_id:N})).sort((P,N)=>P.sequence_id-N.sequence_id)}),b.current=null,v.current=null},[m]);const C=()=>{p(null),(m==null?void 0:m.length)>0&&s(m)},I=()=>{p(null),s(r),f(r)};return x.jsx(be,{sx:{position:"relative",flexShrink:0},children:x.jsx(be,{position:"absolute",top:0,zIndex:10,children:x.jsxs(Co.div,{style:{position:"relative",maxHeight:"3rem",border:`0.1rem solid ${u.palette.primary.notifyBorderColor}`,borderRadius:"0.7rem",color:u.palette.primary.notifyTextColor,backgroundColor:u.palette.primary.notifyBackground,overflow:"hidden",width:"max-content"},animate:{maxHeight:d?"15rem":"3rem"},transition:{duration:.2,ease:"easeInOut"},children:[x.jsxs(be,{sx:{padding:"0.65rem",display:"flex",alignItems:"center",justifyContent:"space-between",cursor:"pointer",gap:"0.5rem"},onClick:()=>p(!d),children:[x.jsx(be,{component:"img",layout:!0,className:"select-icon",src:t,sx:{cursor:"pointer"}}),x.jsx(Kt,{sx:{color:u.palette.primary.notifyTextColor,flex:1,fontSize:"1.1rem"},children:e||h}),x.jsx(be,{component:"img",layout:!0,className:"child",src:d?Dn.ArrowSelectDown:Dn.ArrowSelectUp,sx:{cursor:"pointer"}})]}),d&&x.jsx("hr",{style:{width:"100%",height:"0.1rem",backgroundColor:u.palette.primary.notifyBorderColor,border:"none"}}),x.jsx(Co.ul,{style:{listStyle:"none",padding:"0rem 1rem 0.8rem 1rem",margin:0,opacity:d?1:0,visibility:d?"visible":"hidden",maxHeight:"10rem",overflowY:"auto",scrollbarWidth:"thin",scrollbarColor:`${u.palette.primary.notifyIconColor} transparent`},initial:{opacity:0},animate:{opacity:d?1:0},transition:{duration:.3,ease:"easeInOut"},children:r==null?void 0:r.map((w,R)=>x.jsxs("li",{style:{padding:"0.4rem",cursor:"pointer",fontSize:"1.1rem",color:u.palette.primary.notifyTextColor,backgroundColor:u.palette.primary.notifyBackground},onClick:()=>{g(w==null?void 0:w.label),!c&&p(!1),l(w)},children:[o&&x.jsx(ec,{size:"medium",sx:{color:u.palette.primary.notifyIconColor,"&.Mui-checked":{color:u.palette.brandColor.orange},p:"0.2rem 0.5rem"},onChange:()=>S(w)}),w==null?void 0:w.label]},R))}),n&&d&&x.jsxs(Co.div,{layout:!0,style:{display:"flex",flexDirection:"row",padding:"0.5rem 1rem",justifyContent:"space-between",borderTop:`0.1rem solid ${u.palette.primary.notifyBorderColor}`,position:"sticky",bottom:0,opacity:d?1:0,visibility:d?"visible":"hidden"},initial:{opacity:0},animate:{opacity:d?1:0},transition:{duration:.3,ease:"easeInOut"},children:[x.jsx(Co.button,{layout:!0,onClick:C,style:{textTransform:"none",padding:"0.4rem",background:"transparent",color:u.palette.primary.notifyTextColor,fontSize:"1.1rem",border:"none",cursor:"pointer"},children:"Apply"}),x.jsx(Co.button,{layout:!0,onClick:I,style:{textTransform:"none",padding:"0.4rem",background:"transparent",color:u.palette.primary.notifyTextColor,fontSize:"1.1rem",border:"none",cursor:"pointer"},children:"Cancel"})]})]})})})},sa={TOKEN:"token",USER:"user",SNOP:"snop",SELECTED_BU:"selected_business_unit"},Iv={BEARER:"Bearer",TENANT_ID:"tenant_id",BU_ID:"bu_id",SNOP_ID:"snop_id"},aa={REFRESH:"refresh",CLOSE:"close"},wk=Object.values({"SKU Name":"sku_name",Node:"node","Channel Name":"channel_name"}),Sv=[10,25,50,100],wv={MARK_ALL_READ:"MARK_ALL_READ"},Ak=Sv.map(e=>({label:e,value:e})),Av=({pagination:e})=>{const{selectedPage:t,rowPerPage:n,totalRecords:o,onPageChange:r,onPageSizeChange:s}=e,a=ht();return x.jsxs(be,{sx:{display:"flex",p:"1rem 2rem"},children:[x.jsxs(be,{sx:{zIndex:10,display:"flex",flexDirection:"row",gap:"0.5rem",width:"100%"},children:[x.jsx(be,{sx:{display:"flex",justifyContent:"center",alignItems:"center"},children:x.jsxs(Kt,{sx:{fontSize:"1.1rem",color:a.palette.primary.notifyActiveText},children:["Showing ",(t-1)*n+1," to"]})}),x.jsx(be,{sx:{display:"flex",flexDirection:"row",gap:"0.5rem",justifyContent:"space-between"},children:x.jsx(be,{sx:{display:"flex",flexDirection:"row",width:"5.5rem"},children:x.jsx(Bu,{options:Ak,handleSelectClick:s})})}),x.jsx(be,{sx:{display:"flex",justifyContent:"center",alignItems:"center"},children:x.jsxs(Kt,{sx:{fontSize:"1.1rem",color:a.palette.primary.notifyActiveText},children:["of ",o," records"]})})]}),x.jsx(pc,{count:Math.ceil(o/n),page:t,onChange:(c,l)=>{r(l)},shape:"rounded",sx:{width:"100%","& .MuiPagination-ul":{width:"100%",display:"flex",justifyContent:"flex-end","& li:first-of-type":{border:`0.1rem solid ${a.palette.primary.notifyBorderColor}`,color:a.palette.primary.notifyActiveText,marginRight:"1.5rem",borderRadius:"1rem",width:"3rem",height:"3rem",justifyContent:"center",alignItems:"center",display:"flex"},"& li:last-child":{border:`0.1rem solid ${a.palette.primary.notifyBorderColor}`,color:a.palette.primary.notifyActiveText,marginLeft:"1.5rem",borderRadius:"1rem",width:"3rem",height:"3rem",justifyContent:"center",alignItems:"center",display:"flex"}},"& .MuiPaginationItem-root":{color:"#595959",fontSize:"1.1rem",borderRadius:"1rem",width:"3rem",height:"3rem",justifyContent:"center",alignItems:"center",display:"flex","& .MuiSvgIcon-root":{fontSize:"2.2rem"}},"& .Mui-selected":{color:a.palette.primary.notifyActiveText,backgroundColor:a.palette.primary.notifyButtonBackground}}})]})};Av.propTypes={pagination:i.object.isRequired};const Rv=({menuOpen:e,handleClose:t,onHideClick:n})=>{const o=ht();return x.jsx(uc,{open:!!e,anchorEl:e,onClose:t,anchorOrigin:{vertical:"bottom",horizontal:"left"},children:x.jsx(be,{sx:{p:"0.4rem 1rem",backgroundColor:o.palette.primary.notifyBackground,border:`0.1rem solid ${o.palette.primary.notifyBorderColor}`,minHeight:"2.3rem",display:"flex",justifyContent:"center",alignItems:"center"},children:x.jsx(Ds,{onClick:n,sx:{textTransform:"none",fontSize:"1.1rem",p:0,minHeight:"unset",fontWeight:"500",color:o.palette.primary.notifyTextColor},children:"Hide Column"})})})};Rv.propTypes={menuOpen:i.object,handleClose:i.func,onHideClick:i.func};const Rk=(e,t)=>{const[n,o]=M.useState({isOpen:!1,column:null}),r=(c,l)=>{o({isOpen:c.currentTarget,column:l})},s=()=>{o({isOpen:!1,column:null})};return{selectedColumn:n,handleMenuClick:r,handleClose:s,handleHideClick:()=>{t({type:tt.SET_GRID_DATA,payload:{visibleGridColumns:e.map(c=>{var l;return c.key===((l=n==null?void 0:n.column)==null?void 0:l.key)?{...c,isHidden:!0}:c})}}),s()}}},Ok=Y(ii)(()=>({"&:last-child td":{borderBottom:0}}));function Fu({children:e,...t}){return x.jsx(Ok,{...t,children:e})}Fu.propTypes={children:i.node};const Pk=Y(e=>x.jsx(yc,{...e}))(({theme:e})=>({[`&.${vc.head}`]:{color:e.palette.primary.notifyTextColor,backgroundColor:e.palette.primary.notifyBackground,borderColor:e.palette.primary.notifyBorderColor,padding:"0.8rem 1rem",borderTopLeftRadius:"1.4rem",borderTopRightRadius:"1.4rem",textAlign:"center"},[`&.${vc.body}`]:{color:e.palette.primary.notifyTextColor,borderColor:e.palette.primary.notifyBorderColor,padding:"0.8rem 1rem",textAlign:"center"}}));function ju({children:e,...t}){return x.jsx(Pk,{...t,children:e})}ju.propTypes={children:i.node};function Ov({sort:e,data:t,pagination:n,columns:o}){const r=ht(),{visibleGridColumns:s}=M.useContext(Om),a=M.useContext(Tc),{selectedColumn:c,handleMenuClick:l,handleClose:u,handleHideClick:d}=Rk(s,a),p=o==null?void 0:o.isManageable;return x.jsxs(x.Fragment,{children:[x.jsx(gm,{sx:{maxHeight:"100%"},children:x.jsxs(gc,{stickyHeader:!0,sx:{backgroundColor:r.palette.primary.notifyBackground,border:`0.1rem solid ${r.palette.primary.notifyBorderColor}`,borderRadius:"1.4rem","& .MuiTableHead-root":{backgroundColor:r.palette.primary.notifyBackground}},children:[x.jsx(xc,{children:x.jsx(Fu,{children:s.map((h,g)=>{const m=h==null?void 0:h.isHidden,f=h==null?void 0:h.style;return m?null:x.jsx(ju,{style:f,children:x.jsx(Mm,{column:h,sort:e,handleMenuClick:l,isManageable:p})},g)})})}),x.jsx(bc,{children:t.map((h,g)=>x.jsx(Fu,{children:s.map((m,f)=>{const b=!!(m!=null&&m.cellRenderer);return(m==null?void 0:m.isHidden)?null:x.jsx(ju,{children:x.jsx(km,{isRenderCellContent:b,column:m,row:h},f)},f)})},g))})]})}),x.jsx(Av,{pagination:n}),x.jsx(Rv,{menuOpen:c==null?void 0:c.isOpen,handleClose:u,onHideClick:d})]})}Ov.propTypes={sort:i.object,data:i.array,pagination:i.object,columns:i.object};function Pv({tableProps:e}){const t=M.useContext(Tc),{columns:n}=e,o=YR({columns:n});return M.useEffect(()=>{t({type:tt.SET_GRID_DATA,payload:{visibleGridColumns:o}})},[o,t]),x.jsx(x.Fragment,{children:x.jsx(Ov,{...e})})}Pv.propTypes={tableProps:i.object.isRequired};const la=({styles:e,label:t,...n})=>{const o=ht();if(e!=null&&e.icon&&!t)return x.jsx($r,{disableRipple:!0,sx:{background:(e==null?void 0:e.variant)!=="outlined"?e==null?void 0:e.buttonBackground:o.palette.primary.notifyBackground,borderRadius:"0.7rem",border:(e==null?void 0:e.variant)=="outlined"?`0.1rem solid ${o.palette.primary.notifyBorderColor}`:"none",height:"3.2rem",padding:"1.5rem 1rem",display:"flex",justifyContent:"center",alignItems:"center"},...n,children:x.jsx(be,{component:"img",src:e==null?void 0:e.icon})});if(t)return x.jsx(Ds,{disableRipple:!0,sx:{background:(e==null?void 0:e.variant)!=="outlined"?e==null?void 0:e.buttonBackground:o.palette.primary.notifyBackground,borderRadius:"0.7rem",border:(e==null?void 0:e.variant)=="outlined"?`0.1rem solid ${o.palette.primary.notifyBorderColor}`:"none",height:"3.2rem",padding:"1.5rem",display:"flex",justifyContent:"center",textTransform:"none",alignItems:"center",gap:"0.5rem",color:(e==null?void 0:e.variant)=="outlined"?o.palette.primary.notifyActiveText:"white","&:hover":{backgroundColor:(e==null?void 0:e.variant)!=="outlined"?e==null?void 0:e.buttonBackground:o.palette.primary.notifyBackground,boxShadow:"none"}},startIcon:(e==null?void 0:e.iconPosition)==="start"&&x.jsx(be,{component:"img",src:e==null?void 0:e.icon}),endIcon:(e==null?void 0:e.iconPosition)==="end"&&x.jsx(be,{component:"img",src:e==null?void 0:e.icon}),...n,children:x.jsx(Kt,{sx:{fontSize:"1.1rem"},children:t})})},Nk=({...e})=>{const[t,n]=M.useState(!1),o=ht();return x.jsx(Co.input,{type:"text",onFocus:()=>n(!0),onBlur:()=>n(!1),initial:{width:150,borderRadius:"0.7rem"},animate:{width:t?180:150},transition:{duration:.3,ease:"easeInOut"},style:{height:"3rem",outline:"none",boxShadow:"none",border:`0.1rem solid ${o.palette.primary.notifyBorderColor}`,backgroundColor:o.palette.primary.notifyBackground,padding:"0rem 1rem",color:o.palette.primary.notifyTextColor,transition:"height 0.1s ease"},...e})},Mk=e=>x.jsx("div",{children:"customTools"}),kk=({defaultTools:e,isManageable:t,customTools:n})=>{var o,r,s,a;return ht(),Co(la),M.useState(!1),x.jsxs(be,{sx:{margin:"1rem 0",position:"relative",zIndex:10,display:"flex",flexDirection:"row",gap:"0.5rem",width:"100%"},children:[x.jsxs(be,{sx:{display:"flex",flexDirection:"row",gap:"0.5rem"},children:[((o=e==null?void 0:e.search)==null?void 0:o.isRequired)&&x.jsx(Nk,{...e==null?void 0:e.search}),((r=e==null?void 0:e.refresh)==null?void 0:r.isRequired)&&x.jsx(la,{...e==null?void 0:e.refresh})]}),x.jsx(be,{sx:{display:"flex",flexDirection:"row",gap:"0.5rem",justifyContent:"space-between",flex:1,width:"27rem"},children:x.jsx(be,{sx:{display:"flex",flexDirection:"row",gap:"0.5rem"},children:t&&x.jsx(Bu,{})})}),x.jsxs(be,{sx:{display:"flex",flexDirection:"row",gap:"0.5rem"},children:[x.jsx(Mk,{...n}),((s=e==null?void 0:e.upload)==null?void 0:s.isRequired)&&x.jsx(la,{...e==null?void 0:e.upload}),((a=e==null?void 0:e.download)==null?void 0:a.isRequired)&&x.jsx(la,{...e==null?void 0:e.download})]})]})};function Nv({tableProps:e,toolbarProps:t}){const n=e.columns.isManageable;return x.jsxs(Pm,{children:[x.jsx(kk,{...t,isManageable:n}),x.jsx(Pv,{tableProps:e})]})}Nv.propTypes={tableProps:i.object.isRequired,toolbarProps:i.object.isRequired};const Vu=M.createContext(null),Mv=M.createContext(null);function Dk({children:e}){const[t,n]=M.useReducer(Bk,Fk);return x.jsx(Vu.Provider,{value:t,children:x.jsx(Mv.Provider,{value:n,children:e})})}function Bk(e,t){var n;switch(t.type){case tt.LOADING:return{...e,loading:t.loading};case tt.SUCCESS:return{...e,data:(n=t.data)==null?void 0:n.sort((o,r)=>new Date(r.createdAt)-new Date(o.createdAt))};case tt.MARK_ALL_AS_READ:return{...e,isMarkAllAsRead:t.isMarkAllAsRead};case tt.ERROR:return{...e,error:t.error};default:throw new Error(`${bn.UNHANDLED}: ${t}`)}}const Fk={loading:!1,data:[],error:"",isMarkAllAsRead:{count:0,boo:!1}};function kv(e,t){return function(){return e.apply(t,arguments)}}const{toString:jk}=Object.prototype,{getPrototypeOf:Lu}=Object,ca=(e=>t=>{const n=jk.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),hn=e=>(e=e.toLowerCase(),t=>ca(t)===e),ua=e=>t=>typeof t===e,{isArray:mr}=Array,Si=ua("undefined");function Vk(e){return e!==null&&!Si(e)&&e.constructor!==null&&!Si(e.constructor)&&sn(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Dv=hn("ArrayBuffer");function Lk(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Dv(e.buffer),t}const _k=ua("string"),sn=ua("function"),Bv=ua("number"),da=e=>e!==null&&typeof e=="object",$k=e=>e===!0||e===!1,pa=e=>{if(ca(e)!=="object")return!1;const t=Lu(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},Wk=hn("Date"),Gk=hn("File"),zk=hn("Blob"),Hk=hn("FileList"),Xk=e=>da(e)&&sn(e.pipe),Uk=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||sn(e.append)&&((t=ca(e))==="formdata"||t==="object"&&sn(e.toString)&&e.toString()==="[object FormData]"))},Zk=hn("URLSearchParams"),[Yk,Jk,qk,Kk]=["ReadableStream","Request","Response","Headers"].map(hn),Qk=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function wi(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let o,r;if(typeof e!="object"&&(e=[e]),mr(e))for(o=0,r=e.length;o<r;o++)t.call(null,e[o],o,e);else{const s=n?Object.getOwnPropertyNames(e):Object.keys(e),a=s.length;let c;for(o=0;o<a;o++)c=s[o],t.call(null,e[c],c,e)}}function Fv(e,t){t=t.toLowerCase();const n=Object.keys(e);let o=n.length,r;for(;o-- >0;)if(r=n[o],t===r.toLowerCase())return r;return null}const jv=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Vv=e=>!Si(e)&&e!==jv;function _u(){const{caseless:e}=Vv(this)&&this||{},t={},n=(o,r)=>{const s=e&&Fv(t,r)||r;pa(t[s])&&pa(o)?t[s]=_u(t[s],o):pa(o)?t[s]=_u({},o):mr(o)?t[s]=o.slice():t[s]=o};for(let o=0,r=arguments.length;o<r;o++)arguments[o]&&wi(arguments[o],n);return t}const eD=(e,t,n,{allOwnKeys:o}={})=>(wi(t,(r,s)=>{n&&sn(r)?e[s]=kv(r,n):e[s]=r},{allOwnKeys:o}),e),tD=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),nD=(e,t,n,o)=>{e.prototype=Object.create(t.prototype,o),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},oD=(e,t,n,o)=>{let r,s,a;const c={};if(t=t||{},e==null)return t;do{for(r=Object.getOwnPropertyNames(e),s=r.length;s-- >0;)a=r[s],(!o||o(a,e,t))&&!c[a]&&(t[a]=e[a],c[a]=!0);e=n!==!1&&Lu(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},rD=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const o=e.indexOf(t,n);return o!==-1&&o===n},iD=e=>{if(!e)return null;if(mr(e))return e;let t=e.length;if(!Bv(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},sD=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Lu(Uint8Array)),aD=(e,t)=>{const o=(e&&e[Symbol.iterator]).call(e);let r;for(;(r=o.next())&&!r.done;){const s=r.value;t.call(e,s[0],s[1])}},lD=(e,t)=>{let n;const o=[];for(;(n=e.exec(t))!==null;)o.push(n);return o},cD=hn("HTMLFormElement"),uD=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,o,r){return o.toUpperCase()+r}),Lv=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),dD=hn("RegExp"),_v=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),o={};wi(n,(r,s)=>{let a;(a=t(r,s,e))!==!1&&(o[s]=a||r)}),Object.defineProperties(e,o)},pD=e=>{_v(e,(t,n)=>{if(sn(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const o=e[n];if(sn(o)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},fD=(e,t)=>{const n={},o=r=>{r.forEach(s=>{n[s]=!0})};return mr(e)?o(e):o(String(e).split(t)),n},hD=()=>{},mD=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t,$u="abcdefghijklmnopqrstuvwxyz",$v="0123456789",Wv={DIGIT:$v,ALPHA:$u,ALPHA_DIGIT:$u+$u.toUpperCase()+$v},gD=(e=16,t=Wv.ALPHA_DIGIT)=>{let n="";const{length:o}=t;for(;e--;)n+=t[Math.random()*o|0];return n};function bD(e){return!!(e&&sn(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const vD=e=>{const t=new Array(10),n=(o,r)=>{if(da(o)){if(t.indexOf(o)>=0)return;if(!("toJSON"in o)){t[r]=o;const s=mr(o)?[]:{};return wi(o,(a,c)=>{const l=n(a,r+1);!Si(l)&&(s[c]=l)}),t[r]=void 0,s}}return o};return n(e,0)},yD=hn("AsyncFunction"),W={isArray:mr,isArrayBuffer:Dv,isBuffer:Vk,isFormData:Uk,isArrayBufferView:Lk,isString:_k,isNumber:Bv,isBoolean:$k,isObject:da,isPlainObject:pa,isReadableStream:Yk,isRequest:Jk,isResponse:qk,isHeaders:Kk,isUndefined:Si,isDate:Wk,isFile:Gk,isBlob:zk,isRegExp:dD,isFunction:sn,isStream:Xk,isURLSearchParams:Zk,isTypedArray:sD,isFileList:Hk,forEach:wi,merge:_u,extend:eD,trim:Qk,stripBOM:tD,inherits:nD,toFlatObject:oD,kindOf:ca,kindOfTest:hn,endsWith:rD,toArray:iD,forEachEntry:aD,matchAll:lD,isHTMLForm:cD,hasOwnProperty:Lv,hasOwnProp:Lv,reduceDescriptors:_v,freezeMethods:pD,toObjectSet:fD,toCamelCase:uD,noop:hD,toFiniteNumber:mD,findKey:Fv,global:jv,isContextDefined:Vv,ALPHABET:Wv,generateString:gD,isSpecCompliantForm:bD,toJSONObject:vD,isAsyncFn:yD,isThenable:e=>e&&(da(e)||sn(e))&&sn(e.then)&&sn(e.catch)};function we(e,t,n,o,r){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),o&&(this.request=o),r&&(this.response=r)}W.inherits(we,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:W.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const Gv=we.prototype,zv={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{zv[e]={value:e}}),Object.defineProperties(we,zv),Object.defineProperty(Gv,"isAxiosError",{value:!0}),we.from=(e,t,n,o,r,s)=>{const a=Object.create(Gv);return W.toFlatObject(e,a,function(l){return l!==Error.prototype},c=>c!=="isAxiosError"),we.call(a,e.message,t,n,o,r),a.cause=e,a.name=e.name,s&&Object.assign(a,s),a};const xD=null;function Wu(e){return W.isPlainObject(e)||W.isArray(e)}function Hv(e){return W.endsWith(e,"[]")?e.slice(0,-2):e}function Xv(e,t,n){return e?e.concat(t).map(function(r,s){return r=Hv(r),!n&&s?"["+r+"]":r}).join(n?".":""):t}function CD(e){return W.isArray(e)&&!e.some(Wu)}const TD=W.toFlatObject(W,{},null,function(t){return/^is[A-Z]/.test(t)});function fa(e,t,n){if(!W.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=W.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(f,b){return!W.isUndefined(b[f])});const o=n.metaTokens,r=n.visitor||d,s=n.dots,a=n.indexes,l=(n.Blob||typeof Blob<"u"&&Blob)&&W.isSpecCompliantForm(t);if(!W.isFunction(r))throw new TypeError("visitor must be a function");function u(m){if(m===null)return"";if(W.isDate(m))return m.toISOString();if(!l&&W.isBlob(m))throw new we("Blob is not supported. Use a Buffer instead.");return W.isArrayBuffer(m)||W.isTypedArray(m)?l&&typeof Blob=="function"?new Blob([m]):Buffer.from(m):m}function d(m,f,b){let v=m;if(m&&!b&&typeof m=="object"){if(W.endsWith(f,"{}"))f=o?f:f.slice(0,-2),m=JSON.stringify(m);else if(W.isArray(m)&&CD(m)||(W.isFileList(m)||W.endsWith(f,"[]"))&&(v=W.toArray(m)))return f=Hv(f),v.forEach(function(C,I){!(W.isUndefined(C)||C===null)&&t.append(a===!0?Xv([f],I,s):a===null?f:f+"[]",u(C))}),!1}return Wu(m)?!0:(t.append(Xv(b,f,s),u(m)),!1)}const p=[],h=Object.assign(TD,{defaultVisitor:d,convertValue:u,isVisitable:Wu});function g(m,f){if(!W.isUndefined(m)){if(p.indexOf(m)!==-1)throw Error("Circular reference detected in "+f.join("."));p.push(m),W.forEach(m,function(v,S){(!(W.isUndefined(v)||v===null)&&r.call(t,v,W.isString(S)?S.trim():S,f,h))===!0&&g(v,f?f.concat(S):[S])}),p.pop()}}if(!W.isObject(e))throw new TypeError("data must be an object");return g(e),t}function Uv(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(o){return t[o]})}function Gu(e,t){this._pairs=[],e&&fa(e,this,t)}const Zv=Gu.prototype;Zv.append=function(t,n){this._pairs.push([t,n])},Zv.toString=function(t){const n=t?function(o){return t.call(this,o,Uv)}:Uv;return this._pairs.map(function(r){return n(r[0])+"="+n(r[1])},"").join("&")};function ED(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Yv(e,t,n){if(!t)return e;const o=n&&n.encode||ED,r=n&&n.serialize;let s;if(r?s=r(t,n):s=W.isURLSearchParams(t)?t.toString():new Gu(t,n).toString(o),s){const a=e.indexOf("#");a!==-1&&(e=e.slice(0,a)),e+=(e.indexOf("?")===-1?"?":"&")+s}return e}class Jv{constructor(){this.handlers=[]}use(t,n,o){return this.handlers.push({fulfilled:t,rejected:n,synchronous:o?o.synchronous:!1,runWhen:o?o.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){W.forEach(this.handlers,function(o){o!==null&&t(o)})}}const qv={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},ID={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:Gu,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},zu=typeof window<"u"&&typeof document<"u",SD=(e=>zu&&["ReactNative","NativeScript","NS"].indexOf(e)<0)(typeof navigator<"u"&&navigator.product),wD=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",AD=zu&&window.location.href||"http://localhost",mn={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:zu,hasStandardBrowserEnv:SD,hasStandardBrowserWebWorkerEnv:wD,origin:AD},Symbol.toStringTag,{value:"Module"})),...ID};function RD(e,t){return fa(e,new mn.classes.URLSearchParams,Object.assign({visitor:function(n,o,r,s){return mn.isNode&&W.isBuffer(n)?(this.append(o,n.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)}},t))}function OD(e){return W.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function PD(e){const t={},n=Object.keys(e);let o;const r=n.length;let s;for(o=0;o<r;o++)s=n[o],t[s]=e[s];return t}function Kv(e){function t(n,o,r,s){let a=n[s++];if(a==="__proto__")return!0;const c=Number.isFinite(+a),l=s>=n.length;return a=!a&&W.isArray(r)?r.length:a,l?(W.hasOwnProp(r,a)?r[a]=[r[a],o]:r[a]=o,!c):((!r[a]||!W.isObject(r[a]))&&(r[a]=[]),t(n,o,r[a],s)&&W.isArray(r[a])&&(r[a]=PD(r[a])),!c)}if(W.isFormData(e)&&W.isFunction(e.entries)){const n={};return W.forEachEntry(e,(o,r)=>{t(OD(o),r,n,0)}),n}return null}function ND(e,t,n){if(W.isString(e))try{return(t||JSON.parse)(e),W.trim(e)}catch(o){if(o.name!=="SyntaxError")throw o}return(n||JSON.stringify)(e)}const Ai={transitional:qv,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const o=n.getContentType()||"",r=o.indexOf("application/json")>-1,s=W.isObject(t);if(s&&W.isHTMLForm(t)&&(t=new FormData(t)),W.isFormData(t))return r?JSON.stringify(Kv(t)):t;if(W.isArrayBuffer(t)||W.isBuffer(t)||W.isStream(t)||W.isFile(t)||W.isBlob(t)||W.isReadableStream(t))return t;if(W.isArrayBufferView(t))return t.buffer;if(W.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let c;if(s){if(o.indexOf("application/x-www-form-urlencoded")>-1)return RD(t,this.formSerializer).toString();if((c=W.isFileList(t))||o.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return fa(c?{"files[]":t}:t,l&&new l,this.formSerializer)}}return s||r?(n.setContentType("application/json",!1),ND(t)):t}],transformResponse:[function(t){const n=this.transitional||Ai.transitional,o=n&&n.forcedJSONParsing,r=this.responseType==="json";if(W.isResponse(t)||W.isReadableStream(t))return t;if(t&&W.isString(t)&&(o&&!this.responseType||r)){const a=!(n&&n.silentJSONParsing)&&r;try{return JSON.parse(t)}catch(c){if(a)throw c.name==="SyntaxError"?we.from(c,we.ERR_BAD_RESPONSE,this,null,this.response):c}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:mn.classes.FormData,Blob:mn.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};W.forEach(["delete","get","head","post","put","patch"],e=>{Ai.headers[e]={}});const MD=W.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),kD=e=>{const t={};let n,o,r;return e&&e.split(`
|
|
238
|
+
`));const se=q.props.value===void 0?Tt:q.props.value;He.set(se,Tt);const Se=se===P;return Tt+=1,E.cloneElement(q,T({fullWidth:N==="fullWidth",indicator:Se&&!U&&et,selected:Se,selectionFollowsFocus:C,onChange:f,textColor:R,value:se},Tt===1&&P===!1&&!q.props.tabIndex?{tabIndex:0}:{}))}),an=q=>{const se=Oe.current,Se=wt(se).activeElement;if(Se.getAttribute("role")!=="tab")return;let qe=b==="horizontal"?"ArrowLeft":"ArrowUp",vt=b==="horizontal"?"ArrowRight":"ArrowDown";switch(b==="horizontal"&&s&&(qe="ArrowRight",vt="ArrowLeft"),q.key){case qe:q.preventDefault(),Gs(se,Se,Em);break;case vt:q.preventDefault(),Gs(se,Se,Tm);break;case"Home":q.preventDefault(),Gs(se,null,Tm);break;case"End":q.preventDefault(),Gs(se,null,Em);break}},de=dt();return x.jsxs(FR,T({className:re(z.root,p),ownerState:k,ref:n,as:h},G,{children:[de.scrollButtonStart,de.scrollbarSizeListener,x.jsxs(jR,{className:z.scroller,ownerState:k,style:{overflow:fe.overflow,[L?`margin${s?"Left":"Right"}`:"marginBottom"]:F?void 0:-fe.scrollbarWidth},ref:Xe,children:[x.jsx(VR,{"aria-label":a,"aria-labelledby":c,"aria-orientation":b==="vertical"?"vertical":null,className:z.flexContainer,ownerState:k,onKeyDown:an,ref:Oe,role:"tablist",children:Ot}),U&&et]}),de.scrollButtonEnd]}))});process.env.NODE_ENV!=="production"&&(wm.propTypes={action:Nt,allowScrollButtonsMobile:i.bool,"aria-label":i.string,"aria-labelledby":i.string,centered:i.bool,children:i.node,classes:i.object,className:i.string,component:i.elementType,indicatorColor:i.oneOfType([i.oneOf(["primary","secondary"]),i.string]),onChange:i.func,orientation:i.oneOf(["horizontal","vertical"]),ScrollButtonComponent:i.elementType,scrollButtons:i.oneOf(["auto",!1,!0]),selectionFollowsFocus:i.bool,slotProps:i.shape({endScrollButtonIcon:i.oneOfType([i.func,i.object]),startScrollButtonIcon:i.oneOfType([i.func,i.object])}),slots:i.shape({EndScrollButtonIcon:i.elementType,StartScrollButtonIcon:i.elementType}),sx:i.oneOfType([i.arrayOf(i.oneOfType([i.func,i.object,i.bool])),i.func,i.object]),TabIndicatorProps:i.object,TabScrollButtonProps:i.object,textColor:i.oneOf(["inherit","primary","secondary"]),value:i.any,variant:i.oneOf(["fullWidth","scrollable","standard"]),visibleScrollbar:i.bool});function $R(e){return Ce("MuiTextField",e)}Te("MuiTextField",["root"]);const WR=["autoComplete","autoFocus","children","className","color","defaultValue","disabled","error","FormHelperTextProps","fullWidth","helperText","id","InputLabelProps","inputProps","InputProps","inputRef","label","maxRows","minRows","multiline","name","onBlur","onChange","onFocus","placeholder","required","rows","select","SelectProps","type","value","variant"],GR={standard:Vs,filled:js,outlined:_s},zR=e=>{const{classes:t}=e;return Ee({root:["root"]},$R,t)},HR=Y(Dh,{name:"MuiTextField",slot:"Root",overridesResolver:(e,t)=>t.root})({}),Am=E.forwardRef(function(t,n){const o=Ie({props:t,name:"MuiTextField"}),{autoComplete:r,autoFocus:s=!1,children:a,className:c,color:l="primary",defaultValue:u,disabled:d=!1,error:p=!1,FormHelperTextProps:h,fullWidth:g=!1,helperText:m,id:f,InputLabelProps:b,inputProps:v,InputProps:S,inputRef:C,label:I,maxRows:y,minRows:A,multiline:w=!1,name:R,onBlur:P,onChange:N,onFocus:F,placeholder:G,required:j=!1,rows:L,select:_=!1,SelectProps:V,type:$,value:D,variant:X="outlined"}=o,k=oe(o,WR),z=T({},o,{autoFocus:s,color:l,disabled:d,error:p,fullWidth:g,multiline:w,required:j,select:_,variant:X}),Z=zR(z);process.env.NODE_ENV!=="production"&&_&&!a&&console.error("MUI: `children` must be passed when using the `TextField` component with `select`.");const Q={};X==="outlined"&&(b&&typeof b.shrink<"u"&&(Q.notched=b.shrink),Q.label=I),_&&((!V||!V.native)&&(Q.id=void 0),Q["aria-describedby"]=void 0);const U=os(f),ee=m&&U?`${U}-helper-text`:void 0,J=I&&U?`${U}-label`:void 0,ne=GR[X],te=x.jsx(ne,T({"aria-describedby":ee,autoComplete:r,autoFocus:s,defaultValue:u,fullWidth:g,multiline:w,name:R,rows:L,maxRows:y,minRows:A,type:$,value:D,id:U,inputRef:C,onBlur:P,onChange:N,onFocus:F,placeholder:G,inputProps:v},Q,S));return x.jsxs(HR,T({className:re(Z.root,c),disabled:d,error:p,fullWidth:g,ref:n,required:j,color:l,variant:X,ownerState:z},k,{children:[I!=null&&I!==""&&x.jsx(Lh,T({htmlFor:U,id:J},b,{children:I})),_?x.jsx(hc,T({"aria-describedby":ee,id:U,labelId:J,value:D,input:te},V,{children:a})):te,m&&x.jsx(jh,T({id:ee},h,{children:m}))]}))});process.env.NODE_ENV!=="production"&&(Am.propTypes={autoComplete:i.string,autoFocus:i.bool,children:i.node,classes:i.object,className:i.string,color:i.oneOfType([i.oneOf(["primary","secondary","error","info","success","warning"]),i.string]),defaultValue:i.any,disabled:i.bool,error:i.bool,FormHelperTextProps:i.object,fullWidth:i.bool,helperText:i.node,id:i.string,InputLabelProps:i.object,inputProps:i.object,InputProps:i.object,inputRef:Nt,label:i.node,margin:i.oneOf(["dense","none","normal"]),maxRows:i.oneOfType([i.number,i.string]),minRows:i.oneOfType([i.number,i.string]),multiline:i.bool,name:i.string,onBlur:i.func,onChange:i.func,onFocus:i.func,placeholder:i.string,required:i.bool,rows:i.oneOfType([i.number,i.string]),select:i.bool,SelectProps:i.object,size:i.oneOfType([i.oneOf(["medium","small"]),i.string]),sx:i.oneOfType([i.arrayOf(i.oneOfType([i.func,i.object,i.bool])),i.func,i.object]),type:i.string,value:i.any,variant:i.oneOf(["filled","outlined","standard"])});const XR={light:cs({palette:{primary:{appBackground:"#FFFFFF",main:"#f5f7fa",notifyBackground:"#F8FAFB",notifyTextColor:"#525252",notifyActiveText:"#282A2A",notifyBorderColor:"#D0D4DA",notifyTooltipBackground:"#07080B",notifyButtonBackground:"#E6EAEC",notifyActiveBorderColor:"#1D1D1D",notifyIconColor:"#666D80"},brandColor:{blue:"#0166FF",orange:"#E94F1C",grey1:"#595959",main:"#FF6D33",grey3:"#898A93"}},typography:{fontFamily:"Euclid Circular Regular, sans-serif",fontSize:12,fontWeightMedium:"bold",fontWeightRegular:"lighter"},components:{MuiDrawer:{defaultProps:{disableRipple:!0}}}}),dark:cs({palette:{primary:{appBackground:"#101010",main:"#f5f7fa",notifyBackground:"#1D1D1D",notifyTextColor:"#A8A8A8",notifyActiveText:"#FFFFFF",notifyBorderColor:"#313133",notifyTooltipBackground:"#07080B",notifyButtonBackground:"#2C2C2F",notifyActiveBorderColor:"#FFFFFF",notifyIconColor:"#909090"},brandColor:{blue:"#0166FF",orange:"#E94F1C",grey1:"#595959",main:"#FF6D33",grey3:"#898A93"}},typography:{fontFamily:"Euclid Circular Regular, sans-serif",fontSize:12,fontWeightMedium:"bold",fontWeightRegular:"lighter"},components:{MuiDrawer:{defaultProps:{disableRipple:!0}}}})};function Rm({children:e}){var n,o;const t=((o=(n=JSON.parse(localStorage.getItem("settings")))==null?void 0:n.platform)==null?void 0:o.theme)||"light";return x.jsx(Vf,{theme:XR[t],children:e})}const Om=M.createContext(null),Tc=M.createContext(null);function Pm({children:e}){const[t,n]=M.useReducer(UR,ZR);return x.jsx(Om.Provider,{value:t,children:x.jsx(Tc.Provider,{value:n,children:x.jsx(Rm,{children:e})})})}function UR(e,t){switch(t.type){case tt.SET_GRID_DATA:return{...e,...t.payload};default:throw new Error(`${bn.UNHANDLED}: ${t}`)}}const ZR={visibleGridColumns:[]};Pm.propTypes={children:i.node.isRequired};const YR=({columns:e})=>{const{definitions:t,defaultUserSettings:n,labels:o}=e,r=n.reduce((l,u)=>(l[u.key]=u,l),{}),s=o.reduce((l,u)=>(l[u.key]=u,l),{}),a=[];for(const l of t){const{key:u}=l,d=r[u],p=s[u];let h={...l,...d,...p};a.push(h)}return a.sort((l,u)=>l.sequenceId-u.sequenceId)},Dn={Search:"data:image/svg+xml,%3csvg%20width='16'%20height='15'%20viewBox='0%200%2016%2015'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M7.6503%2013.8006C11.3232%2013.8006%2014.3006%2010.8232%2014.3006%207.15029C14.3006%203.47744%2011.3232%200.5%207.6503%200.5C3.97744%200.5%201%203.47744%201%207.15029C1%2010.8232%203.97744%2013.8006%207.6503%2013.8006Z'%20stroke='%23898A93'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M14.9997%2014.5006L13.5996%2013.1006'%20stroke='%23898A93'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",Refresh:"data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M6.0733%203.38664C6.6533%203.21331%207.2933%203.09998%207.99997%203.09998C11.1933%203.09998%2013.78%205.68664%2013.78%208.87998C13.78%2012.0733%2011.1933%2014.66%207.99997%2014.66C4.80664%2014.66%202.21997%2012.0733%202.21997%208.87998C2.21997%207.69331%202.57997%206.58664%203.1933%205.66664'%20stroke='%232176FF'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M5.2467%203.54671L7.17337%201.33337'%20stroke='%232176FF'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M5.2467%203.54663L7.49337%205.18663'%20stroke='%232176FF'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",Close:"data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='12'%20height='12'%20viewBox='0%200%2024%2024'%3e%3ccircle%20cx='12'%20cy='12'%20r='11'%20fill='none'%20stroke='%23E85353'%20stroke-width='2'/%3e%3cpath%20d='M8.5%208.5l7%207M15.5%208.5l-7%207'%20stroke='%23E85353'%20stroke-width='2'/%3e%3c/svg%3e",Unsort:"data:image/svg+xml,%3csvg%20width='10'%20height='10'%20viewBox='0%200%2010%2012'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M0.646447%203.24676C0.451184%203.44202%200.451184%203.7586%200.646447%203.95387C0.841709%204.14913%201.15829%204.14913%201.35355%203.95387L0.646447%203.24676ZM3.40012%201.2002H3.90012C3.90012%200.997964%203.7783%200.815646%203.59146%200.738256C3.40462%200.660865%203.18956%200.703643%203.04656%200.846642L3.40012%201.2002ZM2.90012%2010.8007C2.90012%2011.0768%203.12398%2011.3007%203.40012%2011.3007C3.67626%2011.3007%203.90012%2011.0768%203.90012%2010.8007H2.90012ZM9.35377%208.7541C9.54903%208.55884%209.54903%208.24226%209.35377%208.04699C9.15851%207.85173%208.84193%207.85173%208.64666%208.04699L9.35377%208.7541ZM6.6001%2010.8007H6.1001C6.1001%2011.0029%206.22192%2011.1852%206.40876%2011.2626C6.5956%2011.34%206.81065%2011.2972%206.95365%2011.1542L6.6001%2010.8007ZM7.1001%201.2002C7.1001%200.924053%206.87624%200.700195%206.6001%200.700195C6.32396%200.700195%206.1001%200.924053%206.1001%201.2002H7.1001ZM1.35355%203.95387L3.75367%201.55375L3.04656%200.846642L0.646447%203.24676L1.35355%203.95387ZM2.90012%201.2002V10.8007H3.90012V1.2002H2.90012ZM8.64666%208.04699L6.24655%2010.4471L6.95365%2011.1542L9.35377%208.7541L8.64666%208.04699ZM7.1001%2010.8007V1.2002H6.1001V10.8007H7.1001Z'%20fill='%23909090'/%3e%3c/svg%3e",AscSort:"data:image/svg+xml,%3csvg%20width='9'%20height='12'%20viewBox='0%200%209%2012'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M8%204.59888L4.5%201.09888L1%204.59888'%20stroke='%23909090'%20stroke-miterlimit='10'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M4.5%2010.9013V1.19702'%20stroke='%23909090'%20stroke-miterlimit='10'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",DescSort:"data:image/svg+xml,%3csvg%20width='9'%20height='12'%20viewBox='0%200%209%2012'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M1%207.40112L4.5%2010.9011L8%207.40112'%20stroke='%23909090'%20stroke-miterlimit='10'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M4.5%201.09869L4.5%2010.803'%20stroke='%23909090'%20stroke-miterlimit='10'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",Menu:"data:image/svg+xml,%3csvg%20width='4'%20height='10'%20viewBox='0%200%204%2010'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M2%207.5C1.45%207.5%201%207.95%201%208.5C1%209.05%201.45%209.5%202%209.5C2.55%209.5%203%209.05%203%208.5C3%207.95%202.55%207.5%202%207.5Z'%20stroke='%23909090'%20stroke-width='0.7'/%3e%3cpath%20d='M2%204C1.45%204%201%204.45%201%205C1%205.55%201.45%206%202%206C2.55%206%203%205.55%203%205C3%204.45%202.55%204%202%204Z'%20stroke='%23909090'%20stroke-width='0.7'/%3e%3cpath%20d='M2%200.5C1.45%200.5%201%200.95%201%201.5C1%202.05%201.45%202.5%202%202.5C2.55%202.5%203%202.05%203%201.5C3%200.95%202.55%200.5%202%200.5Z'%20stroke='%23909090'%20stroke-width='0.7'/%3e%3c/svg%3e",Manage:"data:image/svg+xml,%3csvg%20width='15'%20height='16'%20viewBox='0%200%2015%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M6.56152%2012.937V3.06201C6.56152%202.12451%206.16152%201.74951%205.16777%201.74951H2.64277C1.64902%201.74951%201.24902%202.12451%201.24902%203.06201V12.937C1.24902%2013.8745%201.64902%2014.2495%202.64277%2014.2495H5.16777C6.16152%2014.2495%206.56152%2013.8745%206.56152%2012.937Z'%20stroke='%23909090'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M13.75%2012.937V3.06201C13.75%202.12451%2013.35%201.74951%2012.3563%201.74951H9.83125C8.8375%201.74951%208.4375%202.12451%208.4375%203.06201V12.937C8.4375%2013.8745%208.8375%2014.2495%209.83125%2014.2495H12.3563C13.35%2014.2495%2013.75%2013.8745%2013.75%2012.937Z'%20stroke='%23909090'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",ArrowSelectUp:"data:image/svg+xml,%3csvg%20width='10'%20height='5'%20viewBox='0%200%2010%205'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M9%200.595703L5.50126%204.09444C5.08807%204.50763%204.41193%204.50763%203.99874%204.09444L0.5%200.595703'%20stroke='%23909090'%20stroke-miterlimit='10'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",ArrowSelectDown:"data:image/svg+xml,%3csvg%20width='10'%20height='5'%20viewBox='0%200%2010%205'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M9%204.4043L5.50126%200.90556C5.08807%200.492365%204.41193%200.492365%203.99874%200.90556L0.5%204.4043'%20stroke='%23909090'%20stroke-miterlimit='10'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",Upload:"data:image/svg+xml,%3csvg%20width='15'%20height='15'%20viewBox='0%200%2014%2014'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M5.25016%209.9165V6.4165L4.0835%207.58317'%20stroke='white'%20stroke-width='0.8'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M5.25%206.4165L6.41667%207.58317'%20stroke='white'%20stroke-width='0.8'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M12.8332%205.83317V8.74984C12.8332%2011.6665%2011.6665%2012.8332%208.74984%2012.8332H5.24984C2.33317%2012.8332%201.1665%2011.6665%201.1665%208.74984V5.24984C1.1665%202.33317%202.33317%201.1665%205.24984%201.1665H8.1665'%20stroke='white'%20stroke-width='0.8'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M12.8332%205.83317H10.4998C8.74984%205.83317%208.1665%205.24984%208.1665%203.49984V1.1665L12.8332%205.83317Z'%20stroke='white'%20stroke-width='0.8'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",Download:"data:image/svg+xml,%3csvg%20width='15'%20height='15'%20viewBox='0%200%2014%2014'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M5.25%206.41699V9.91699L6.41667%208.75033'%20stroke='%23909090'%20stroke-width='0.8'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M5.25114%209.91667L4.08447%208.75'%20stroke='%23909090'%20stroke-width='0.8'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M12.8322%205.83366V8.75033C12.8322%2011.667%2011.6655%2012.8337%208.74886%2012.8337H5.24886C2.33219%2012.8337%201.16553%2011.667%201.16553%208.75033V5.25033C1.16553%202.33366%202.33219%201.16699%205.24886%201.16699H8.16553'%20stroke='%23909090'%20stroke-width='0.8'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M12.8322%205.83366H10.4989C8.74886%205.83366%208.16553%205.25033%208.16553%203.50033V1.16699L12.8322%205.83366Z'%20stroke='%23909090'%20stroke-width='0.8'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",More:"data:image/svg+xml,%3csvg%20width='15'%20height='16'%20viewBox='0%200%2015%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M2.4531%202.16699H7.64478C8.07645%202.16699%208.43227%202.52283%208.43227%202.9545V3.81782C8.43227%204.13282%208.23395%204.52366%208.04145%204.722L6.3498%206.21533C6.11647%206.41366%205.95894%206.80449%205.95894%207.11949V8.81117C5.95894%209.0445%205.80145%209.3595%205.60312%209.482L5.05478%209.83782C4.54145%2010.1528%203.8356%209.79699%203.8356%209.16699V7.08449C3.8356%206.81032%203.67811%206.4545%203.52061%206.25616L2.02728%204.68116C1.82895%204.48282%201.67146%204.13282%201.67146%203.89365V2.98949C1.66562%202.52283%202.02144%202.16699%202.4531%202.16699Z'%20stroke='white'%20stroke-miterlimit='10'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M1.66211%207.99998V9.74998C1.66211%2012.6666%202.82878%2013.8333%205.74544%2013.8333H9.24544C12.1621%2013.8333%2013.3288%2012.6666%2013.3288%209.74998V6.24998C13.3288%204.42998%2012.8738%203.28664%2011.8179%202.69164C11.5204%202.52248%2010.9254%202.39414%2010.3829%202.30664'%20stroke='white'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M8.08789%208.5835H11.0046'%20stroke='white'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M6.91211%2010.9165H10.9954'%20stroke='white'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e"},Nm=({sortKey:e,sortField:t,sortDir:n,handleSortClick:o})=>{const r=s=>x.jsx($r,{onClick:o,children:x.jsx(be,{component:"img",src:s})});return x.jsx(x.Fragment,{children:r(t===e?n==="asc"?Dn.AscSort:Dn.DescSort:Dn.Unsort)})};Nm.propTypes={sortKey:i.string.isRequired,sortField:i.string,sortDir:i.string,handleSortClick:i.func};function Mm({column:e,sort:t,handleMenuClick:n,isManageable:o}){const r=e==null?void 0:e.isMandatory,s=e==null?void 0:e.label,a=e==null?void 0:e.isSortable,c=t==null?void 0:t.sortField,l=t==null?void 0:t.sortDir,u=t==null?void 0:t.onSort;return x.jsxs(be,{sx:{display:"flex",alignItems:"center",justifyContent:"center",fontSize:"1.1rem"},children:[s,a&&x.jsx(Nm,{sortKey:e==null?void 0:e.key,sortField:c,sortDir:l,handleSortClick:()=>u({column:e,sortDir:l,sortField:c})}),o&&!r&&x.jsx($r,{onClick:d=>n(d,e),children:x.jsx(be,{component:"img",src:Dn.Menu})})]})}Mm.propTypes={column:i.object.isRequired,sort:i.object.isRequired,handleMenuClick:i.func,isManageable:i.bool};const Ec=e=>{const t=localStorage.getItem(e);return t?JSON.parse(t):""},JR=e=>{const t=new Date,n=new Date(e);let o=t-n;o<0&&(o=0);const r=Math.floor(o/1e3),s=Math.floor(r/60);return r<60?`${r} sec ago`:s<60?`${s} min ago`:n.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",hour12:!0})},Ic=e=>e.sort((n,o)=>{let r=new Date(n.createdAt),s=new Date(o.createdAt);return r===s?0:r>s?-1:1}).sort((n,o)=>n.isRead===o.isRead?0:o.isRead?-1:1),qR=e=>{let t=0;for(let n=0;n<e.length;n++)e[n].isRead||t++;return t},KR=e=>{const t=[];return e.forEach(n=>{n.isRead||t.push(n.id)}),t},QR=(e,t,n)=>e.filter(r=>t.some(s=>{var a,c,l;return(l=(a=r[s])==null?void 0:a.toLowerCase())==null?void 0:l.includes((c=n==null?void 0:n.trim())==null?void 0:c.toLowerCase())})),eO=(e,t,n)=>e.sort((r,s)=>n==="asc"?r[t].toLowerCase().localeCompare(s[t].toLowerCase()):s[t].toLowerCase().localeCompare(r[t].toLowerCase())),Sc=(e,t,n)=>e.slice((t-1)*n,t*n),wc=e=>{var r;const t=JSON.parse(localStorage.getItem("configuration")),n=((r=t==null?void 0:t.entities)==null?void 0:r.labelChannel)||"Channel";return e.split("_").map(s=>s==="channel"?n:s[0].toUpperCase()+s.substring(1)).join(" ")},tO=e=>{const t=e.reduce((o,r)=>{const s=new Date(r==null?void 0:r.createdAt),a=new Intl.DateTimeFormat("en-US",{day:"numeric",month:"long",year:"numeric"}).format(s);return o[a]||(o[a]=[]),o[a].push(r),o},{});return Object.fromEntries(Object.entries(t).sort(([o],[r])=>new Date(r)-new Date(o)))},nO=(e,t=20)=>(e==null?void 0:e.length)>t?`${e.slice(0,t)}...`:e;function km({isRenderCellContent:e,column:t,row:n}){const o=n[t.key];return x.jsx(dm,{title:(o==null?void 0:o.length)>20?o:"",arrow:!0,children:x.jsx(be,{sx:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",textTransform:"none",fontSize:"1.1rem"},component:"label",children:e?t==null?void 0:t.cellRenderer(n):nO(o)})})}km.propTypes={isRenderCellContent:i.bool,column:i.object,row:i.object};const Dm=M.createContext({});function oO(e){const t=M.useRef(null);return t.current===null&&(t.current=e()),t.current}const Ac=M.createContext(null),Bm=M.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function rO(e=!0){const t=M.useContext(Ac);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:o,register:r}=t,s=M.useId();M.useEffect(()=>{e&&r(s)},[e]);const a=M.useCallback(()=>e&&o&&o(s),[s,o,e]);return!n&&o?[!1,a]:[!0]}const Rc=typeof window<"u",iO=Rc?M.useLayoutEffect:M.useEffect,Lt=e=>e;let rr=Lt,Jn=Lt;process.env.NODE_ENV!=="production"&&(rr=(e,t)=>{!e&&typeof console<"u"&&console.warn(t)},Jn=(e,t)=>{if(!e)throw new Error(t)});function Oc(e){let t;return()=>(t===void 0&&(t=e()),t)}const ir=(e,t,n)=>{const o=t-e;return o===0?1:(n-e)/o},Sn=e=>e*1e3,Bn=e=>e/1e3,sO={skipAnimations:!1,useManualTiming:!1},zs=["read","resolveKeyframes","update","preRender","render","postRender"],Fm={value:null,addProjectionMetrics:null};function aO(e,t){let n=new Set,o=new Set,r=!1,s=!1;const a=new WeakSet;let c={delta:0,timestamp:0,isProcessing:!1},l=0;function u(p){a.has(p)&&(d.schedule(p),e()),l++,p(c)}const d={schedule:(p,h=!1,g=!1)=>{const f=g&&r?n:o;return h&&a.add(p),f.has(p)||f.add(p),p},cancel:p=>{o.delete(p),a.delete(p)},process:p=>{if(c=p,r){s=!0;return}r=!0,[n,o]=[o,n],n.forEach(u),t&&Fm.value&&Fm.value.frameloop[t].push(l),l=0,n.clear(),r=!1,s&&(s=!1,d.process(p))}};return d}const lO=40;function jm(e,t){let n=!1,o=!0;const r={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,a=zs.reduce((v,S)=>(v[S]=aO(s,t?S:void 0),v),{}),{read:c,resolveKeyframes:l,update:u,preRender:d,render:p,postRender:h}=a,g=()=>{const v=performance.now();n=!1,r.delta=o?1e3/60:Math.max(Math.min(v-r.timestamp,lO),1),r.timestamp=v,r.isProcessing=!0,c.process(r),l.process(r),u.process(r),d.process(r),p.process(r),h.process(r),r.isProcessing=!1,n&&t&&(o=!1,e(g))},m=()=>{n=!0,o=!0,r.isProcessing||e(g)};return{schedule:zs.reduce((v,S)=>{const C=a[S];return v[S]=(I,y=!1,A=!1)=>(n||m(),C.schedule(I,y,A)),v},{}),cancel:v=>{for(let S=0;S<zs.length;S++)a[zs[S]].cancel(v)},state:r,steps:a}}const{schedule:Ke,cancel:qn,state:It,steps:Pc}=jm(typeof requestAnimationFrame<"u"?requestAnimationFrame:Lt,!0),Vm=M.createContext({strict:!1}),Lm={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},sr={};for(const e in Lm)sr[e]={isEnabled:t=>Lm[e].some(n=>!!t[n])};function cO(e){for(const t in e)sr[t]={...sr[t],...e[t]}}const uO=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function Hs(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||uO.has(e)}let _m=e=>!Hs(e);function dO(e){e&&(_m=t=>t.startsWith("on")?!Hs(t):e(t))}try{dO(require("@emotion/is-prop-valid").default)}catch{}function pO(e,t,n){const o={};for(const r in e)r==="values"&&typeof e.values=="object"||(_m(r)||n===!0&&Hs(r)||!t&&!Hs(r)||e.draggable&&r.startsWith("onDrag"))&&(o[r]=e[r]);return o}const $m=new Set;function Xs(e,t,n){e||$m.has(t)||(console.warn(t),$m.add(t))}function fO(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...o)=>(process.env.NODE_ENV!=="production"&&Xs(!1,"motion() is deprecated. Use motion.create() instead."),e(...o));return new Proxy(n,{get:(o,r)=>r==="create"?e:(t.has(r)||t.set(r,e(r)),t.get(r))})}const Us=M.createContext({});function Zs(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function si(e){return typeof e=="string"||Array.isArray(e)}const Nc=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Mc=["initial",...Nc];function Ys(e){return Zs(e.animate)||Mc.some(t=>si(e[t]))}function Wm(e){return!!(Ys(e)||e.variants)}function hO(e,t){if(Ys(e)){const{initial:n,animate:o}=e;return{initial:n===!1||si(n)?n:void 0,animate:si(o)?o:void 0}}return e.inherit!==!1?t:{}}function mO(e){const{initial:t,animate:n}=hO(e,M.useContext(Us));return M.useMemo(()=>({initial:t,animate:n}),[Gm(t),Gm(n)])}function Gm(e){return Array.isArray(e)?e.join(" "):e}const gO=Symbol.for("motionComponentSymbol");function ar(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function bO(e,t,n){return M.useCallback(o=>{o&&e.onMount&&e.onMount(o),t&&(o?t.mount(o):t.unmount()),n&&(typeof n=="function"?n(o):ar(n)&&(n.current=o))},[t])}const kc=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),zm="data-"+kc("framerAppearId"),{schedule:Dc,cancel:_j}=jm(queueMicrotask,!1),Hm=M.createContext({});function vO(e,t,n,o,r){var s,a;const{visualElement:c}=M.useContext(Us),l=M.useContext(Vm),u=M.useContext(Ac),d=M.useContext(Bm).reducedMotion,p=M.useRef(null);o=o||l.renderer,!p.current&&o&&(p.current=o(e,{visualState:t,parent:c,props:n,presenceContext:u,blockInitialAnimation:u?u.initial===!1:!1,reducedMotionConfig:d}));const h=p.current,g=M.useContext(Hm);h&&!h.projection&&r&&(h.type==="html"||h.type==="svg")&&yO(p.current,n,r,g);const m=M.useRef(!1);M.useInsertionEffect(()=>{h&&m.current&&h.update(n,u)});const f=n[zm],b=M.useRef(!!f&&!(!((s=window.MotionHandoffIsComplete)===null||s===void 0)&&s.call(window,f))&&((a=window.MotionHasOptimisedAnimation)===null||a===void 0?void 0:a.call(window,f)));return iO(()=>{h&&(m.current=!0,window.MotionIsMounted=!0,h.updateFeatures(),Dc.render(h.render),b.current&&h.animationState&&h.animationState.animateChanges())}),M.useEffect(()=>{h&&(!b.current&&h.animationState&&h.animationState.animateChanges(),b.current&&(queueMicrotask(()=>{var v;(v=window.MotionHandoffMarkAsComplete)===null||v===void 0||v.call(window,f)}),b.current=!1))}),h}function yO(e,t,n,o){const{layoutId:r,layout:s,drag:a,dragConstraints:c,layoutScroll:l,layoutRoot:u}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Xm(e.parent)),e.projection.setOptions({layoutId:r,layout:s,alwaysMeasureLayout:!!a||c&&ar(c),visualElement:e,animationType:typeof s=="string"?s:"both",initialPromotionConfig:o,layoutScroll:l,layoutRoot:u})}function Xm(e){if(e)return e.options.allowProjection!==!1?e.projection:Xm(e.parent)}function xO({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:o,Component:r}){var s,a;e&&cO(e);function c(u,d){let p;const h={...M.useContext(Bm),...u,layoutId:CO(u)},{isStatic:g}=h,m=mO(u),f=o(u,g);if(!g&&Rc){TO(h,e);const b=EO(h);p=b.MeasureLayout,m.visualElement=vO(r,f,h,t,b.ProjectionNode)}return x.jsxs(Us.Provider,{value:m,children:[p&&m.visualElement?x.jsx(p,{visualElement:m.visualElement,...h}):null,n(r,u,bO(f,m.visualElement,d),f,g,m.visualElement)]})}c.displayName=`motion.${typeof r=="string"?r:`create(${(a=(s=r.displayName)!==null&&s!==void 0?s:r.name)!==null&&a!==void 0?a:""})`}`;const l=M.forwardRef(c);return l[gO]=r,l}function CO({layoutId:e}){const t=M.useContext(Dm).id;return t&&e!==void 0?t+"-"+e:e}function TO(e,t){const n=M.useContext(Vm).strict;if(process.env.NODE_ENV!=="production"&&t&&n){const o="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?rr(!1,o):Jn(!1,o)}}function EO(e){const{drag:t,layout:n}=sr;if(!t&&!n)return{};const o={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?o.MeasureLayout:void 0,ProjectionNode:o.ProjectionNode}}const Um=e=>t=>typeof t=="string"&&t.startsWith(e),Bc=Um("--"),IO=Um("var(--"),Fc=e=>IO(e)?SO.test(e.split("/*")[0].trim()):!1,SO=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,ai={};function wO(e){for(const t in e)ai[t]=e[t],Bc(t)&&(ai[t].isCSSVariable=!0)}const lr=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],go=new Set(lr);function Zm(e,{layout:t,layoutId:n}){return go.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!ai[e]||e==="opacity")}const At=e=>!!(e&&e.getVelocity),Ym=(e,t)=>t&&typeof e=="number"?t.transform(e):e,Fn=(e,t,n)=>n>t?t:n<e?e:n,cr={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},li={...cr,transform:e=>Fn(0,1,e)},Js={...cr,default:1},ci=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Kn=ci("deg"),wn=ci("%"),ye=ci("px"),AO=ci("vh"),RO=ci("vw"),Jm={...wn,parse:e=>wn.parse(e)/100,transform:e=>wn.transform(e*100)},OO={borderWidth:ye,borderTopWidth:ye,borderRightWidth:ye,borderBottomWidth:ye,borderLeftWidth:ye,borderRadius:ye,radius:ye,borderTopLeftRadius:ye,borderTopRightRadius:ye,borderBottomRightRadius:ye,borderBottomLeftRadius:ye,width:ye,maxWidth:ye,height:ye,maxHeight:ye,top:ye,right:ye,bottom:ye,left:ye,padding:ye,paddingTop:ye,paddingRight:ye,paddingBottom:ye,paddingLeft:ye,margin:ye,marginTop:ye,marginRight:ye,marginBottom:ye,marginLeft:ye,backgroundPositionX:ye,backgroundPositionY:ye},PO={rotate:Kn,rotateX:Kn,rotateY:Kn,rotateZ:Kn,scale:Js,scaleX:Js,scaleY:Js,scaleZ:Js,skew:Kn,skewX:Kn,skewY:Kn,distance:ye,translateX:ye,translateY:ye,translateZ:ye,x:ye,y:ye,z:ye,perspective:ye,transformPerspective:ye,opacity:li,originX:Jm,originY:Jm,originZ:ye},qm={...cr,transform:Math.round},jc={...OO,...PO,zIndex:qm,size:ye,fillOpacity:li,strokeOpacity:li,numOctaves:qm},NO={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},MO=lr.length;function kO(e,t,n){let o="",r=!0;for(let s=0;s<MO;s++){const a=lr[s],c=e[a];if(c===void 0)continue;let l=!0;if(typeof c=="number"?l=c===(a.startsWith("scale")?1:0):l=parseFloat(c)===0,!l||n){const u=Ym(c,jc[a]);if(!l){r=!1;const d=NO[a]||a;o+=`${d}(${u}) `}n&&(t[a]=u)}}return o=o.trim(),n?o=n(t,r?"":o):r&&(o="none"),o}function Vc(e,t,n){const{style:o,vars:r,transformOrigin:s}=e;let a=!1,c=!1;for(const l in t){const u=t[l];if(go.has(l)){a=!0;continue}else if(Bc(l)){r[l]=u;continue}else{const d=Ym(u,jc[l]);l.startsWith("origin")?(c=!0,s[l]=d):o[l]=d}}if(t.transform||(a||n?o.transform=kO(t,e.transform,n):o.transform&&(o.transform="none")),c){const{originX:l="50%",originY:u="50%",originZ:d=0}=s;o.transformOrigin=`${l} ${u} ${d}`}}const Lc=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Km(e,t,n){for(const o in t)!At(t[o])&&!Zm(o,n)&&(e[o]=t[o])}function DO({transformTemplate:e},t){return M.useMemo(()=>{const n=Lc();return Vc(n,t,e),Object.assign({},n.vars,n.style)},[t])}function BO(e,t){const n=e.style||{},o={};return Km(o,n,e),Object.assign(o,DO(e,t)),o}function FO(e,t){const n={},o=BO(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,o.userSelect=o.WebkitUserSelect=o.WebkitTouchCallout="none",o.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=o,n}const jO=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function _c(e){return typeof e!="string"||e.includes("-")?!1:!!(jO.indexOf(e)>-1||/[A-Z]/u.test(e))}const VO={offset:"stroke-dashoffset",array:"stroke-dasharray"},LO={offset:"strokeDashoffset",array:"strokeDasharray"};function _O(e,t,n=1,o=0,r=!0){e.pathLength=1;const s=r?VO:LO;e[s.offset]=ye.transform(-o);const a=ye.transform(t),c=ye.transform(n);e[s.array]=`${a} ${c}`}function Qm(e,t,n){return typeof e=="string"?e:ye.transform(t+n*e)}function $O(e,t,n){const o=Qm(t,e.x,e.width),r=Qm(n,e.y,e.height);return`${o} ${r}`}function $c(e,{attrX:t,attrY:n,attrScale:o,originX:r,originY:s,pathLength:a,pathSpacing:c=1,pathOffset:l=0,...u},d,p){if(Vc(e,u,p),d){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:h,style:g,dimensions:m}=e;h.transform&&(m&&(g.transform=h.transform),delete h.transform),m&&(r!==void 0||s!==void 0||g.transform)&&(g.transformOrigin=$O(m,r!==void 0?r:.5,s!==void 0?s:.5)),t!==void 0&&(h.x=t),n!==void 0&&(h.y=n),o!==void 0&&(h.scale=o),a!==void 0&&_O(h,a,c,l,!1)}const eg=()=>({...Lc(),attrs:{}}),Wc=e=>typeof e=="string"&&e.toLowerCase()==="svg";function WO(e,t,n,o){const r=M.useMemo(()=>{const s=eg();return $c(s,t,Wc(o),e.transformTemplate),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};Km(s,e.style,e),r.style={...s,...r.style}}return r}function GO(e=!1){return(n,o,r,{latestValues:s},a)=>{const l=(_c(n)?WO:FO)(o,s,a,n),u=pO(o,typeof n=="string",e),d=n!==M.Fragment?{...u,...l,ref:r}:{},{children:p}=o,h=M.useMemo(()=>At(p)?p.get():p,[p]);return M.createElement(n,{...d,children:h})}}function tg(e){const t=[{},{}];return e==null||e.values.forEach((n,o)=>{t[0][o]=n.get(),t[1][o]=n.getVelocity()}),t}function Gc(e,t,n,o){if(typeof t=="function"){const[r,s]=tg(o);t=t(n!==void 0?n:e.custom,r,s)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[r,s]=tg(o);t=t(n!==void 0?n:e.custom,r,s)}return t}const zc=e=>Array.isArray(e),zO=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),HO=e=>zc(e)?e[e.length-1]||0:e;function qs(e){const t=At(e)?e.get():e;return zO(t)?t.toValue():t}function XO({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},o,r,s){const a={latestValues:UO(o,r,s,e),renderState:t()};return n&&(a.onMount=c=>n({props:o,current:c,...a}),a.onUpdate=c=>n(c)),a}const ng=e=>(t,n)=>{const o=M.useContext(Us),r=M.useContext(Ac),s=()=>XO(e,t,o,r);return n?s():oO(s)};function UO(e,t,n,o){const r={},s=o(e,{});for(const h in s)r[h]=qs(s[h]);let{initial:a,animate:c}=e;const l=Ys(e),u=Wm(e);t&&u&&!l&&e.inherit!==!1&&(a===void 0&&(a=t.initial),c===void 0&&(c=t.animate));let d=n?n.initial===!1:!1;d=d||a===!1;const p=d?c:a;if(p&&typeof p!="boolean"&&!Zs(p)){const h=Array.isArray(p)?p:[p];for(let g=0;g<h.length;g++){const m=Gc(e,h[g]);if(m){const{transitionEnd:f,transition:b,...v}=m;for(const S in v){let C=v[S];if(Array.isArray(C)){const I=d?C.length-1:0;C=C[I]}C!==null&&(r[S]=C)}for(const S in f)r[S]=f[S]}}}return r}function Hc(e,t,n){var o;const{style:r}=e,s={};for(const a in r)(At(r[a])||t.style&&At(t.style[a])||Zm(a,e)||((o=n==null?void 0:n.getValue(a))===null||o===void 0?void 0:o.liveStyle)!==void 0)&&(s[a]=r[a]);return s}const ZO={useVisualState:ng({scrapeMotionValuesFromProps:Hc,createRenderState:Lc})};function og(e,t){try{t.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{t.dimensions={x:0,y:0,width:0,height:0}}}function rg(e,{style:t,vars:n},o,r){Object.assign(e.style,t,r&&r.getProjectionStyles(o));for(const s in n)e.style.setProperty(s,n[s])}const ig=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function sg(e,t,n,o){rg(e,t,void 0,o);for(const r in t.attrs)e.setAttribute(ig.has(r)?r:kc(r),t.attrs[r])}function ag(e,t,n){const o=Hc(e,t,n);for(const r in e)if(At(e[r])||At(t[r])){const s=lr.indexOf(r)!==-1?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r;o[s]=e[r]}return o}const lg=["x","y","width","height","cx","cy","r"],YO={useVisualState:ng({scrapeMotionValuesFromProps:ag,createRenderState:eg,onUpdate:({props:e,prevProps:t,current:n,renderState:o,latestValues:r})=>{if(!n)return;let s=!!e.drag;if(!s){for(const c in r)if(go.has(c)){s=!0;break}}if(!s)return;let a=!t;if(t)for(let c=0;c<lg.length;c++){const l=lg[c];e[l]!==t[l]&&(a=!0)}a&&Ke.read(()=>{og(n,o),Ke.render(()=>{$c(o,r,Wc(n.tagName),e.transformTemplate),sg(n,o)})})}})};function JO(e,t){return function(o,{forwardMotionProps:r}={forwardMotionProps:!1}){const a={..._c(o)?YO:ZO,preloadedFeatures:e,useRender:GO(r),createVisualElement:t,Component:o};return xO(a)}}function ui(e,t,n){const o=e.getProps();return Gc(o,t,n!==void 0?n:o.custom,e)}const qO=Oc(()=>window.ScrollTimeline!==void 0);class KO{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>"finished"in t?t.finished:t))}getAll(t){return this.animations[0][t]}setAll(t,n){for(let o=0;o<this.animations.length;o++)this.animations[o][t]=n}attachTimeline(t,n){const o=this.animations.map(r=>{if(qO()&&r.attachTimeline)return r.attachTimeline(t);if(typeof n=="function")return n(r)});return()=>{o.forEach((r,s)=>{r&&r(),this.animations[s].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let n=0;n<this.animations.length;n++)t=Math.max(t,this.animations[n].duration);return t}runAll(t){this.animations.forEach(n=>n[t]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class QO extends KO{then(t,n){return Promise.all(this.animations).then(t).catch(n)}}function Xc(e,t){return e?e[t]||e.default||e:void 0}const Uc=2e4;function cg(e){let t=0;const n=50;let o=e.next(t);for(;!o.done&&t<Uc;)t+=n,o=e.next(t);return t>=Uc?1/0:t}function Zc(e){return typeof e=="function"}function ug(e,t){e.timeline=t,e.onfinish=null}const Yc=e=>Array.isArray(e)&&typeof e[0]=="number",eP={linearEasing:void 0};function tP(e,t){const n=Oc(e);return()=>{var o;return(o=eP[t])!==null&&o!==void 0?o:n()}}const Ks=tP(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),dg=(e,t,n=10)=>{let o="";const r=Math.max(Math.round(t/n),2);for(let s=0;s<r;s++)o+=e(ir(0,r-1,s))+", ";return`linear(${o.substring(0,o.length-2)})`};function pg(e){return!!(typeof e=="function"&&Ks()||!e||typeof e=="string"&&(e in Jc||Ks())||Yc(e)||Array.isArray(e)&&e.every(pg))}const di=([e,t,n,o])=>`cubic-bezier(${e}, ${t}, ${n}, ${o})`,Jc={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:di([0,.65,.55,1]),circOut:di([.55,0,1,.45]),backIn:di([.31,.01,.66,-.59]),backOut:di([.33,1.53,.69,.99])};function fg(e,t){if(e)return typeof e=="function"&&Ks()?dg(e,t):Yc(e)?di(e):Array.isArray(e)?e.map(n=>fg(n,t)||Jc.easeOut):Jc[e]}const fn={x:!1,y:!1};function hg(){return fn.x||fn.y}function nP(e,t,n){var o;if(e instanceof Element)return[e];if(typeof e=="string"){let r=document;const s=(o=void 0)!==null&&o!==void 0?o:r.querySelectorAll(e);return s?Array.from(s):[]}return Array.from(e)}function mg(e,t){const n=nP(e),o=new AbortController,r={passive:!0,...t,signal:o.signal};return[n,r,()=>o.abort()]}function gg(e){return!(e.pointerType==="touch"||hg())}function oP(e,t,n={}){const[o,r,s]=mg(e,n),a=c=>{if(!gg(c))return;const{target:l}=c,u=t(l,c);if(typeof u!="function"||!l)return;const d=p=>{gg(p)&&(u(p),l.removeEventListener("pointerleave",d))};l.addEventListener("pointerleave",d,r)};return o.forEach(c=>{c.addEventListener("pointerenter",a,r)}),s}const bg=(e,t)=>t?e===t?!0:bg(e,t.parentElement):!1,qc=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,rP=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function iP(e){return rP.has(e.tagName)||e.tabIndex!==-1}const pi=new WeakSet;function vg(e){return t=>{t.key==="Enter"&&e(t)}}function Kc(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const sP=(e,t)=>{const n=e.currentTarget;if(!n)return;const o=vg(()=>{if(pi.has(n))return;Kc(n,"down");const r=vg(()=>{Kc(n,"up")}),s=()=>Kc(n,"cancel");n.addEventListener("keyup",r,t),n.addEventListener("blur",s,t)});n.addEventListener("keydown",o,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",o),t)};function yg(e){return qc(e)&&!hg()}function aP(e,t,n={}){const[o,r,s]=mg(e,n),a=c=>{const l=c.currentTarget;if(!yg(c)||pi.has(l))return;pi.add(l);const u=t(l,c),d=(g,m)=>{window.removeEventListener("pointerup",p),window.removeEventListener("pointercancel",h),!(!yg(g)||!pi.has(l))&&(pi.delete(l),typeof u=="function"&&u(g,{success:m}))},p=g=>{d(g,n.useGlobalTarget||bg(l,g.target))},h=g=>{d(g,!1)};window.addEventListener("pointerup",p,r),window.addEventListener("pointercancel",h,r)};return o.forEach(c=>{!iP(c)&&c.getAttribute("tabindex")===null&&(c.tabIndex=0),(n.useGlobalTarget?window:c).addEventListener("pointerdown",a,r),c.addEventListener("focus",u=>sP(u,r),r)}),s}function lP(e){return e==="x"||e==="y"?fn[e]?null:(fn[e]=!0,()=>{fn[e]=!1}):fn.x||fn.y?null:(fn.x=fn.y=!0,()=>{fn.x=fn.y=!1})}const xg=new Set(["width","height","top","left","right","bottom",...lr]);let Qs;function cP(){Qs=void 0}const An={now:()=>(Qs===void 0&&An.set(It.isProcessing||sO.useManualTiming?It.timestamp:performance.now()),Qs),set:e=>{Qs=e,queueMicrotask(cP)}};function Qc(e,t){e.indexOf(t)===-1&&e.push(t)}function eu(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class tu{constructor(){this.subscriptions=[]}add(t){return Qc(this.subscriptions,t),()=>eu(this.subscriptions,t)}notify(t,n,o){const r=this.subscriptions.length;if(r)if(r===1)this.subscriptions[0](t,n,o);else for(let s=0;s<r;s++){const a=this.subscriptions[s];a&&a(t,n,o)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function Cg(e,t){return t?e*(1e3/t):0}const Tg=30,uP=e=>!isNaN(parseFloat(e));class dP{constructor(t,n={}){this.version="12.4.3",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(o,r=!0)=>{const s=An.now();this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(o),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),r&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=An.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=uP(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&Xs(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new tu);const o=this.events[t].add(n);return t==="change"?()=>{o(),Ke.read(()=>{this.events.change.getSize()||this.stop()})}:o}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,o){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-o}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=An.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Tg)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Tg);return Cg(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function fi(e,t){return new dP(e,t)}function pP(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,fi(n))}function fP(e,t){const n=ui(e,t);let{transitionEnd:o={},transition:r={},...s}=n||{};s={...s,...o};for(const a in s){const c=HO(s[a]);pP(e,a,c)}}function hP(e){return!!(At(e)&&e.add)}function nu(e,t){const n=e.getValue("willChange");if(hP(n))return n.add(t)}function Eg(e){return e.props[zm]}const Ig=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,mP=1e-7,gP=12;function bP(e,t,n,o,r){let s,a,c=0;do a=t+(n-t)/2,s=Ig(a,o,r)-e,s>0?n=a:t=a;while(Math.abs(s)>mP&&++c<gP);return a}function hi(e,t,n,o){if(e===t&&n===o)return Lt;const r=s=>bP(s,0,1,e,n);return s=>s===0||s===1?s:Ig(r(s),t,o)}const Sg=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,wg=e=>t=>1-e(1-t),Ag=hi(.33,1.53,.69,.99),ou=wg(Ag),Rg=Sg(ou),Og=e=>(e*=2)<1?.5*ou(e):.5*(2-Math.pow(2,-10*(e-1))),ru=e=>1-Math.sin(Math.acos(e)),Pg=wg(ru),Ng=Sg(ru),Mg=e=>/^0[^.\s]+$/u.test(e);function vP(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||Mg(e):!0}const mi=e=>Math.round(e*1e5)/1e5,iu=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function yP(e){return e==null}const xP=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,su=(e,t)=>n=>!!(typeof n=="string"&&xP.test(n)&&n.startsWith(e)||t&&!yP(n)&&Object.prototype.hasOwnProperty.call(n,t)),kg=(e,t,n)=>o=>{if(typeof o!="string")return o;const[r,s,a,c]=o.match(iu);return{[e]:parseFloat(r),[t]:parseFloat(s),[n]:parseFloat(a),alpha:c!==void 0?parseFloat(c):1}},CP=e=>Fn(0,255,e),au={...cr,transform:e=>Math.round(CP(e))},bo={test:su("rgb","red"),parse:kg("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:o=1})=>"rgba("+au.transform(e)+", "+au.transform(t)+", "+au.transform(n)+", "+mi(li.transform(o))+")"};function TP(e){let t="",n="",o="",r="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),o=e.substring(5,7),r=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),o=e.substring(3,4),r=e.substring(4,5),t+=t,n+=n,o+=o,r+=r),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(o,16),alpha:r?parseInt(r,16)/255:1}}const lu={test:su("#"),parse:TP,transform:bo.transform},ur={test:su("hsl","hue"),parse:kg("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:o=1})=>"hsla("+Math.round(e)+", "+wn.transform(mi(t))+", "+wn.transform(mi(n))+", "+mi(li.transform(o))+")"},Rt={test:e=>bo.test(e)||lu.test(e)||ur.test(e),parse:e=>bo.test(e)?bo.parse(e):ur.test(e)?ur.parse(e):lu.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?bo.transform(e):ur.transform(e)},EP=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function IP(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(iu))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(EP))===null||n===void 0?void 0:n.length)||0)>0}const Dg="number",Bg="color",SP="var",wP="var(",Fg="${}",AP=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function gi(e){const t=e.toString(),n=[],o={color:[],number:[],var:[]},r=[];let s=0;const c=t.replace(AP,l=>(Rt.test(l)?(o.color.push(s),r.push(Bg),n.push(Rt.parse(l))):l.startsWith(wP)?(o.var.push(s),r.push(SP),n.push(l)):(o.number.push(s),r.push(Dg),n.push(parseFloat(l))),++s,Fg)).split(Fg);return{values:n,split:c,indexes:o,types:r}}function jg(e){return gi(e).values}function Vg(e){const{split:t,types:n}=gi(e),o=t.length;return r=>{let s="";for(let a=0;a<o;a++)if(s+=t[a],r[a]!==void 0){const c=n[a];c===Dg?s+=mi(r[a]):c===Bg?s+=Rt.transform(r[a]):s+=r[a]}return s}}const RP=e=>typeof e=="number"?0:e;function OP(e){const t=jg(e);return Vg(e)(t.map(RP))}const Qn={test:IP,parse:jg,createTransformer:Vg,getAnimatableNone:OP},PP=new Set(["brightness","contrast","saturate","opacity"]);function NP(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[o]=n.match(iu)||[];if(!o)return e;const r=n.replace(o,"");let s=PP.has(t)?1:0;return o!==n&&(s*=100),t+"("+s+r+")"}const MP=/\b([a-z-]*)\(.*?\)/gu,cu={...Qn,getAnimatableNone:e=>{const t=e.match(MP);return t?t.map(NP).join(" "):e}},kP={...jc,color:Rt,backgroundColor:Rt,outlineColor:Rt,fill:Rt,stroke:Rt,borderColor:Rt,borderTopColor:Rt,borderRightColor:Rt,borderBottomColor:Rt,borderLeftColor:Rt,filter:cu,WebkitFilter:cu},uu=e=>kP[e];function Lg(e,t){let n=uu(e);return n!==cu&&(n=Qn),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const DP=new Set(["auto","none","0"]);function BP(e,t,n){let o=0,r;for(;o<e.length&&!r;){const s=e[o];typeof s=="string"&&!DP.has(s)&&gi(s).values.length&&(r=e[o]),o++}if(r&&n)for(const s of t)e[s]=Lg(n,r)}const _g=e=>e===cr||e===ye,$g=(e,t)=>parseFloat(e.split(", ")[t]),Wg=(e,t)=>(n,{transform:o})=>{if(o==="none"||!o)return 0;const r=o.match(/^matrix3d\((.+)\)$/u);if(r)return $g(r[1],t);{const s=o.match(/^matrix\((.+)\)$/u);return s?$g(s[1],e):0}},FP=new Set(["x","y","z"]),jP=lr.filter(e=>!FP.has(e));function VP(e){const t=[];return jP.forEach(n=>{const o=e.getValue(n);o!==void 0&&(t.push([n,o.get()]),o.set(n.startsWith("scale")?1:0))}),t}const dr={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:Wg(4,13),y:Wg(5,14)};dr.translateX=dr.x,dr.translateY=dr.y;const vo=new Set;let du=!1,pu=!1;function Gg(){if(pu){const e=Array.from(vo).filter(o=>o.needsMeasurement),t=new Set(e.map(o=>o.element)),n=new Map;t.forEach(o=>{const r=VP(o);r.length&&(n.set(o,r),o.render())}),e.forEach(o=>o.measureInitialState()),t.forEach(o=>{o.render();const r=n.get(o);r&&r.forEach(([s,a])=>{var c;(c=o.getValue(s))===null||c===void 0||c.set(a)})}),e.forEach(o=>o.measureEndState()),e.forEach(o=>{o.suspendedScrollY!==void 0&&window.scrollTo(0,o.suspendedScrollY)})}pu=!1,du=!1,vo.forEach(e=>e.complete()),vo.clear()}function zg(){vo.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(pu=!0)})}function LP(){zg(),Gg()}class fu{constructor(t,n,o,r,s,a=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=o,this.motionValue=r,this.element=s,this.isAsync=a}scheduleResolve(){this.isScheduled=!0,this.isAsync?(vo.add(this),du||(du=!0,Ke.read(zg),Ke.resolveKeyframes(Gg))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:o,motionValue:r}=this;for(let s=0;s<t.length;s++)if(t[s]===null)if(s===0){const a=r==null?void 0:r.get(),c=t[t.length-1];if(a!==void 0)t[0]=a;else if(o&&n){const l=o.readValue(n,c);l!=null&&(t[0]=l)}t[0]===void 0&&(t[0]=c),r&&a===void 0&&r.set(t[0])}else t[s]=t[s-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),vo.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,vo.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const Hg=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),_P=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function $P(e){const t=_P.exec(e);if(!t)return[,];const[,n,o,r]=t;return[`--${n??o}`,r]}const WP=4;function Xg(e,t,n=1){Jn(n<=WP,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[o,r]=$P(e);if(!o)return;const s=window.getComputedStyle(t).getPropertyValue(o);if(s){const a=s.trim();return Hg(a)?parseFloat(a):a}return Fc(r)?Xg(r,t,n+1):r}const Ug=e=>t=>t.test(e),Zg=[cr,ye,wn,Kn,RO,AO,{test:e=>e==="auto",parse:e=>e}],Yg=e=>Zg.find(Ug(e));class Jg extends fu{constructor(t,n,o,r,s){super(t,n,o,r,s,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:o}=this;if(!n||!n.current)return;super.readKeyframes();for(let l=0;l<t.length;l++){let u=t[l];if(typeof u=="string"&&(u=u.trim(),Fc(u))){const d=Xg(u,n.current);d!==void 0&&(t[l]=d),l===t.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!xg.has(o)||t.length!==2)return;const[r,s]=t,a=Yg(r),c=Yg(s);if(a!==c)if(_g(a)&&_g(c))for(let l=0;l<t.length;l++){const u=t[l];typeof u=="string"&&(t[l]=parseFloat(u))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,o=[];for(let r=0;r<t.length;r++)vP(t[r])&&o.push(r);o.length&&BP(t,o,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:o}=this;if(!t||!t.current)return;o==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=dr[o](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const r=n[n.length-1];r!==void 0&&t.getValue(o,r).jump(r,!1)}measureEndState(){var t;const{element:n,name:o,unresolvedKeyframes:r}=this;if(!n||!n.current)return;const s=n.getValue(o);s&&s.jump(this.measuredOrigin,!1);const a=r.length-1,c=r[a];r[a]=dr[o](n.measureViewportBox(),window.getComputedStyle(n.current)),c!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=c),!((t=this.removedTransforms)===null||t===void 0)&&t.length&&this.removedTransforms.forEach(([l,u])=>{n.getValue(l).set(u)}),this.resolveNoneKeyframes()}}const qg=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Qn.test(e)||e==="0")&&!e.startsWith("url("));function GP(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function zP(e,t,n,o){const r=e[0];if(r===null)return!1;if(t==="display"||t==="visibility")return!0;const s=e[e.length-1],a=qg(r,t),c=qg(s,t);return rr(a===c,`You are trying to animate ${t} from "${r}" to "${s}". ${r} is not an animatable value - to enable this animation set ${r} to a value animatable to ${s} via the \`style\` property.`),!a||!c?!1:GP(e)||(n==="spring"||Zc(n))&&o}const HP=e=>e!==null;function ea(e,{repeat:t,repeatType:n="loop"},o){const r=e.filter(HP),s=t&&n!=="loop"&&t%2===1?0:r.length-1;return!s||o===void 0?r[s]:o}const XP=40;class Kg{constructor({autoplay:t=!0,delay:n=0,type:o="keyframes",repeat:r=0,repeatDelay:s=0,repeatType:a="loop",...c}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=An.now(),this.options={autoplay:t,delay:n,type:o,repeat:r,repeatDelay:s,repeatType:a,...c},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>XP?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&LP(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=An.now(),this.hasAttemptedResolve=!0;const{name:o,type:r,velocity:s,delay:a,onComplete:c,onUpdate:l,isGenerator:u}=this.options;if(!u&&!zP(t,o,r,s))if(a)this.options.duration=0;else{l&&l(ea(t,this.options,n)),c&&c(),this.resolveFinishedPromise();return}const d=this.initPlayback(t,n);d!==!1&&(this._resolved={keyframes:t,finalKeyframe:n,...d},this.onPostResolved())}onPostResolved(){}then(t,n){return this.currentFinishedPromise.then(t,n)}flatten(){this.options.type="keyframes",this.options.ease="linear"}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}const it=(e,t,n)=>e+(t-e)*n;function hu(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function UP({hue:e,saturation:t,lightness:n,alpha:o}){e/=360,t/=100,n/=100;let r=0,s=0,a=0;if(!t)r=s=a=n;else{const c=n<.5?n*(1+t):n+t-n*t,l=2*n-c;r=hu(l,c,e+1/3),s=hu(l,c,e),a=hu(l,c,e-1/3)}return{red:Math.round(r*255),green:Math.round(s*255),blue:Math.round(a*255),alpha:o}}function ta(e,t){return n=>n>0?t:e}const mu=(e,t,n)=>{const o=e*e,r=n*(t*t-o)+o;return r<0?0:Math.sqrt(r)},ZP=[lu,bo,ur],YP=e=>ZP.find(t=>t.test(e));function Qg(e){const t=YP(e);if(rr(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`),!t)return!1;let n=t.parse(e);return t===ur&&(n=UP(n)),n}const eb=(e,t)=>{const n=Qg(e),o=Qg(t);if(!n||!o)return ta(e,t);const r={...n};return s=>(r.red=mu(n.red,o.red,s),r.green=mu(n.green,o.green,s),r.blue=mu(n.blue,o.blue,s),r.alpha=it(n.alpha,o.alpha,s),bo.transform(r))},JP=(e,t)=>n=>t(e(n)),bi=(...e)=>e.reduce(JP),gu=new Set(["none","hidden"]);function qP(e,t){return gu.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function KP(e,t){return n=>it(e,t,n)}function bu(e){return typeof e=="number"?KP:typeof e=="string"?Fc(e)?ta:Rt.test(e)?eb:tN:Array.isArray(e)?tb:typeof e=="object"?Rt.test(e)?eb:QP:ta}function tb(e,t){const n=[...e],o=n.length,r=e.map((s,a)=>bu(s)(s,t[a]));return s=>{for(let a=0;a<o;a++)n[a]=r[a](s);return n}}function QP(e,t){const n={...e,...t},o={};for(const r in n)e[r]!==void 0&&t[r]!==void 0&&(o[r]=bu(e[r])(e[r],t[r]));return r=>{for(const s in o)n[s]=o[s](r);return n}}function eN(e,t){var n;const o=[],r={color:0,var:0,number:0};for(let s=0;s<t.values.length;s++){const a=t.types[s],c=e.indexes[a][r[a]],l=(n=e.values[c])!==null&&n!==void 0?n:0;o[s]=l,r[a]++}return o}const tN=(e,t)=>{const n=Qn.createTransformer(t),o=gi(e),r=gi(t);return o.indexes.var.length===r.indexes.var.length&&o.indexes.color.length===r.indexes.color.length&&o.indexes.number.length>=r.indexes.number.length?gu.has(e)&&!r.values.length||gu.has(t)&&!o.values.length?qP(e,t):bi(tb(eN(o,r),r.values),n):(rr(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),ta(e,t))};function nb(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?it(e,t,n):bu(e)(e,t)}const nN=5;function ob(e,t,n){const o=Math.max(t-nN,0);return Cg(n-e(o),t-o)}const st={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},vu=.001;function oN({duration:e=st.duration,bounce:t=st.bounce,velocity:n=st.velocity,mass:o=st.mass}){let r,s;rr(e<=Sn(st.maxDuration),"Spring duration must be 10 seconds or less");let a=1-t;a=Fn(st.minDamping,st.maxDamping,a),e=Fn(st.minDuration,st.maxDuration,Bn(e)),a<1?(r=u=>{const d=u*a,p=d*e,h=d-n,g=yu(u,a),m=Math.exp(-p);return vu-h/g*m},s=u=>{const p=u*a*e,h=p*n+n,g=Math.pow(a,2)*Math.pow(u,2)*e,m=Math.exp(-p),f=yu(Math.pow(u,2),a);return(-r(u)+vu>0?-1:1)*((h-g)*m)/f}):(r=u=>{const d=Math.exp(-u*e),p=(u-n)*e+1;return-vu+d*p},s=u=>{const d=Math.exp(-u*e),p=(n-u)*(e*e);return d*p});const c=5/e,l=iN(r,s,c);if(e=Sn(e),isNaN(l))return{stiffness:st.stiffness,damping:st.damping,duration:e};{const u=Math.pow(l,2)*o;return{stiffness:u,damping:a*2*Math.sqrt(o*u),duration:e}}}const rN=12;function iN(e,t,n){let o=n;for(let r=1;r<rN;r++)o=o-e(o)/t(o);return o}function yu(e,t){return e*Math.sqrt(1-t*t)}const sN=["duration","bounce"],aN=["stiffness","damping","mass"];function rb(e,t){return t.some(n=>e[n]!==void 0)}function lN(e){let t={velocity:st.velocity,stiffness:st.stiffness,damping:st.damping,mass:st.mass,isResolvedFromDuration:!1,...e};if(!rb(e,aN)&&rb(e,sN))if(e.visualDuration){const n=e.visualDuration,o=2*Math.PI/(n*1.2),r=o*o,s=2*Fn(.05,1,1-(e.bounce||0))*Math.sqrt(r);t={...t,mass:st.mass,stiffness:r,damping:s}}else{const n=oN(e);t={...t,...n,mass:st.mass},t.isResolvedFromDuration=!0}return t}function ib(e=st.visualDuration,t=st.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:o,restDelta:r}=n;const s=n.keyframes[0],a=n.keyframes[n.keyframes.length-1],c={done:!1,value:s},{stiffness:l,damping:u,mass:d,duration:p,velocity:h,isResolvedFromDuration:g}=lN({...n,velocity:-Bn(n.velocity||0)}),m=h||0,f=u/(2*Math.sqrt(l*d)),b=a-s,v=Bn(Math.sqrt(l/d)),S=Math.abs(b)<5;o||(o=S?st.restSpeed.granular:st.restSpeed.default),r||(r=S?st.restDelta.granular:st.restDelta.default);let C;if(f<1){const y=yu(v,f);C=A=>{const w=Math.exp(-f*v*A);return a-w*((m+f*v*b)/y*Math.sin(y*A)+b*Math.cos(y*A))}}else if(f===1)C=y=>a-Math.exp(-v*y)*(b+(m+v*b)*y);else{const y=v*Math.sqrt(f*f-1);C=A=>{const w=Math.exp(-f*v*A),R=Math.min(y*A,300);return a-w*((m+f*v*b)*Math.sinh(R)+y*b*Math.cosh(R))/y}}const I={calculatedDuration:g&&p||null,next:y=>{const A=C(y);if(g)c.done=y>=p;else{let w=0;f<1&&(w=y===0?Sn(m):ob(C,y,A));const R=Math.abs(w)<=o,P=Math.abs(a-A)<=r;c.done=R&&P}return c.value=c.done?a:A,c},toString:()=>{const y=Math.min(cg(I),Uc),A=dg(w=>I.next(y*w).value,y,30);return y+"ms "+A}};return I}function sb({keyframes:e,velocity:t=0,power:n=.8,timeConstant:o=325,bounceDamping:r=10,bounceStiffness:s=500,modifyTarget:a,min:c,max:l,restDelta:u=.5,restSpeed:d}){const p=e[0],h={done:!1,value:p},g=R=>c!==void 0&&R<c||l!==void 0&&R>l,m=R=>c===void 0?l:l===void 0||Math.abs(c-R)<Math.abs(l-R)?c:l;let f=n*t;const b=p+f,v=a===void 0?b:a(b);v!==b&&(f=v-p);const S=R=>-f*Math.exp(-R/o),C=R=>v+S(R),I=R=>{const P=S(R),N=C(R);h.done=Math.abs(P)<=u,h.value=h.done?v:N};let y,A;const w=R=>{g(h.value)&&(y=R,A=ib({keyframes:[h.value,m(h.value)],velocity:ob(C,R,h.value),damping:r,stiffness:s,restDelta:u,restSpeed:d}))};return w(0),{calculatedDuration:null,next:R=>{let P=!1;return!A&&y===void 0&&(P=!0,I(R),w(R)),y!==void 0&&R>=y?A.next(R-y):(!P&&I(R),h)}}}const cN=hi(.42,0,1,1),uN=hi(0,0,.58,1),ab=hi(.42,0,.58,1),dN=e=>Array.isArray(e)&&typeof e[0]!="number",lb={linear:Lt,easeIn:cN,easeInOut:ab,easeOut:uN,circIn:ru,circInOut:Ng,circOut:Pg,backIn:ou,backInOut:Rg,backOut:Ag,anticipate:Og},cb=e=>{if(Yc(e)){Jn(e.length===4,"Cubic bezier arrays must contain four numerical values.");const[t,n,o,r]=e;return hi(t,n,o,r)}else if(typeof e=="string")return Jn(lb[e]!==void 0,`Invalid easing type '${e}'`),lb[e];return e};function pN(e,t,n){const o=[],r=n||nb,s=e.length-1;for(let a=0;a<s;a++){let c=r(e[a],e[a+1]);if(t){const l=Array.isArray(t)?t[a]||Lt:t;c=bi(l,c)}o.push(c)}return o}function fN(e,t,{clamp:n=!0,ease:o,mixer:r}={}){const s=e.length;if(Jn(s===t.length,"Both input and output ranges must be the same length"),s===1)return()=>t[0];if(s===2&&t[0]===t[1])return()=>t[1];const a=e[0]===e[1];e[0]>e[s-1]&&(e=[...e].reverse(),t=[...t].reverse());const c=pN(t,o,r),l=c.length,u=d=>{if(a&&d<e[0])return t[0];let p=0;if(l>1)for(;p<e.length-2&&!(d<e[p+1]);p++);const h=ir(e[p],e[p+1],d);return c[p](h)};return n?d=>u(Fn(e[0],e[s-1],d)):u}function hN(e,t){const n=e[e.length-1];for(let o=1;o<=t;o++){const r=ir(0,t,o);e.push(it(n,1,r))}}function mN(e){const t=[0];return hN(t,e.length-1),t}function gN(e,t){return e.map(n=>n*t)}function bN(e,t){return e.map(()=>t||ab).splice(0,e.length-1)}function vi({duration:e=300,keyframes:t,times:n,ease:o="easeInOut"}){const r=dN(o)?o.map(cb):cb(o),s={done:!1,value:t[0]},a=gN(n&&n.length===t.length?n:mN(t),e),c=fN(a,t,{ease:Array.isArray(r)?r:bN(t,r)});return{calculatedDuration:e,next:l=>(s.value=c(l),s.done=l>=e,s)}}const vN=e=>{const t=({timestamp:n})=>e(n);return{start:()=>Ke.update(t,!0),stop:()=>qn(t),now:()=>It.isProcessing?It.timestamp:An.now()}},yN={decay:sb,inertia:sb,tween:vi,keyframes:vi,spring:ib},xN=e=>e/100;class xu extends Kg{constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:l}=this.options;l&&l()};const{name:n,motionValue:o,element:r,keyframes:s}=this.options,a=(r==null?void 0:r.KeyframeResolver)||fu,c=(l,u)=>this.onKeyframesResolved(l,u);this.resolver=new a(s,c,n,o,r),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(t){const{type:n="keyframes",repeat:o=0,repeatDelay:r=0,repeatType:s,velocity:a=0}=this.options,c=Zc(n)?n:yN[n]||vi;let l,u;process.env.NODE_ENV!=="production"&&c!==vi&&Jn(t.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${t}`),c!==vi&&typeof t[0]!="number"&&(l=bi(xN,nb(t[0],t[1])),t=[0,100]);const d=c({...this.options,keyframes:t});s==="mirror"&&(u=c({...this.options,keyframes:[...t].reverse(),velocity:-a})),d.calculatedDuration===null&&(d.calculatedDuration=cg(d));const{calculatedDuration:p}=d,h=p+r,g=h*(o+1)-r;return{generator:d,mirroredGenerator:u,mapPercentToKeyframes:l,calculatedDuration:p,resolvedDuration:h,totalDuration:g}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,n=!1){const{resolved:o}=this;if(!o){const{keyframes:R}=this.options;return{done:!0,value:R[R.length-1]}}const{finalKeyframe:r,generator:s,mirroredGenerator:a,mapPercentToKeyframes:c,keyframes:l,calculatedDuration:u,totalDuration:d,resolvedDuration:p}=o;if(this.startTime===null)return s.next(0);const{delay:h,repeat:g,repeatType:m,repeatDelay:f,onUpdate:b}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-d/this.speed,this.startTime)),n?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const v=this.currentTime-h*(this.speed>=0?1:-1),S=this.speed>=0?v<0:v>d;this.currentTime=Math.max(v,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=d);let C=this.currentTime,I=s;if(g){const R=Math.min(this.currentTime,d)/p;let P=Math.floor(R),N=R%1;!N&&R>=1&&(N=1),N===1&&P--,P=Math.min(P,g+1),!!(P%2)&&(m==="reverse"?(N=1-N,f&&(N-=f/p)):m==="mirror"&&(I=a)),C=Fn(0,1,N)*p}const y=S?{done:!1,value:l[0]}:I.next(C);c&&(y.value=c(y.value));let{done:A}=y;!S&&u!==null&&(A=this.speed>=0?this.currentTime>=d:this.currentTime<=0);const w=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&A);return w&&r!==void 0&&(y.value=ea(l,this.options,r)),b&&b(y.value),w&&this.finish(),y}get duration(){const{resolved:t}=this;return t?Bn(t.calculatedDuration):0}get time(){return Bn(this.currentTime)}set time(t){t=Sn(t),this.currentTime=t,this.holdTime!==null||this.speed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=Bn(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=vN,onPlay:n,startTime:o}=this.options;this.driver||(this.driver=t(s=>this.tick(s))),n&&n();const r=this.driver.now();this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=r):this.startTime=o??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(t=this.currentTime)!==null&&t!==void 0?t:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}const CN=new Set(["opacity","clipPath","filter","transform"]);function TN(e,t,n,{delay:o=0,duration:r=300,repeat:s=0,repeatType:a="loop",ease:c="easeInOut",times:l}={}){const u={[t]:n};l&&(u.offset=l);const d=fg(c,r);return Array.isArray(d)&&(u.easing=d),e.animate(u,{delay:o,duration:r,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:s+1,direction:a==="reverse"?"alternate":"normal"})}const EN=Oc(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),na=10,IN=2e4;function SN(e){return Zc(e.type)||e.type==="spring"||!pg(e.ease)}function wN(e,t){const n=new xu({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let o={done:!1,value:e[0]};const r=[];let s=0;for(;!o.done&&s<IN;)o=n.sample(s),r.push(o.value),s+=na;return{times:void 0,keyframes:r,duration:s-na,ease:"linear"}}const ub={anticipate:Og,backInOut:Rg,circInOut:Ng};function AN(e){return e in ub}class db extends Kg{constructor(t){super(t);const{name:n,motionValue:o,element:r,keyframes:s}=this.options;this.resolver=new Jg(s,(a,c)=>this.onKeyframesResolved(a,c),n,o,r),this.resolver.scheduleResolve()}initPlayback(t,n){let{duration:o=300,times:r,ease:s,type:a,motionValue:c,name:l,startTime:u}=this.options;if(!c.owner||!c.owner.current)return!1;if(typeof s=="string"&&Ks()&&AN(s)&&(s=ub[s]),SN(this.options)){const{onComplete:p,onUpdate:h,motionValue:g,element:m,...f}=this.options,b=wN(t,f);t=b.keyframes,t.length===1&&(t[1]=t[0]),o=b.duration,r=b.times,s=b.ease,a="keyframes"}const d=TN(c.owner.current,l,t,{...this.options,duration:o,times:r,ease:s});return d.startTime=u??this.calcStartTime(),this.pendingTimeline?(ug(d,this.pendingTimeline),this.pendingTimeline=void 0):d.onfinish=()=>{const{onComplete:p}=this.options;c.set(ea(t,this.options,n)),p&&p(),this.cancel(),this.resolveFinishedPromise()},{animation:d,duration:o,times:r,type:a,ease:s,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return Bn(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return Bn(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:o}=n;o.currentTime=Sn(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:n}=t;return n.playbackRate}set speed(t){const{resolved:n}=this;if(!n)return;const{animation:o}=n;o.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:n}=t;return n.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:n}=t;return n.startTime}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{const{resolved:n}=this;if(!n)return Lt;const{animation:o}=n;ug(o,t)}return Lt}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:n,keyframes:o,duration:r,type:s,ease:a,times:c}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:u,onUpdate:d,onComplete:p,element:h,...g}=this.options,m=new xu({...g,keyframes:o,duration:r,type:s,ease:a,times:c,isGenerator:!0}),f=Sn(this.time);u.setWithVelocity(m.sample(f-na).value,m.sample(f).value,na)}const{onStop:l}=this.options;l&&l(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:n,name:o,repeatDelay:r,repeatType:s,damping:a,type:c}=t;if(!n||!n.owner||!(n.owner.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:u}=n.owner.getProps();return EN()&&o&&CN.has(o)&&!l&&!u&&!r&&s!=="mirror"&&a!==0&&c!=="inertia"}}const RN={type:"spring",stiffness:500,damping:25,restSpeed:10},ON=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),PN={type:"keyframes",duration:.8},NN={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},MN=(e,{keyframes:t})=>t.length>2?PN:go.has(e)?e.startsWith("scale")?ON(t[1]):RN:NN;function kN({when:e,delay:t,delayChildren:n,staggerChildren:o,staggerDirection:r,repeat:s,repeatType:a,repeatDelay:c,from:l,elapsed:u,...d}){return!!Object.keys(d).length}const Cu=(e,t,n,o={},r,s)=>a=>{const c=Xc(o,e)||{},l=c.delay||o.delay||0;let{elapsed:u=0}=o;u=u-Sn(l);let d={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...c,delay:-u,onUpdate:h=>{t.set(h),c.onUpdate&&c.onUpdate(h)},onComplete:()=>{a(),c.onComplete&&c.onComplete()},name:e,motionValue:t,element:s?void 0:r};kN(c)||(d={...d,...MN(e,d)}),d.duration&&(d.duration=Sn(d.duration)),d.repeatDelay&&(d.repeatDelay=Sn(d.repeatDelay)),d.from!==void 0&&(d.keyframes[0]=d.from);let p=!1;if((d.type===!1||d.duration===0&&!d.repeatDelay)&&(d.duration=0,d.delay===0&&(p=!0)),p&&!s&&t.get()!==void 0){const h=ea(d.keyframes,c);if(h!==void 0)return Ke.update(()=>{d.onUpdate(h),d.onComplete()}),new QO([])}return!s&&db.supports(d)?new db(d):new xu(d)};function DN({protectedKeys:e,needsAnimating:t},n){const o=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,o}function pb(e,t,{delay:n=0,transitionOverride:o,type:r}={}){var s;let{transition:a=e.getDefaultTransition(),transitionEnd:c,...l}=t;o&&(a=o);const u=[],d=r&&e.animationState&&e.animationState.getState()[r];for(const p in l){const h=e.getValue(p,(s=e.latestValues[p])!==null&&s!==void 0?s:null),g=l[p];if(g===void 0||d&&DN(d,p))continue;const m={delay:n,...Xc(a||{},p)};let f=!1;if(window.MotionHandoffAnimation){const v=Eg(e);if(v){const S=window.MotionHandoffAnimation(v,p,Ke);S!==null&&(m.startTime=S,f=!0)}}nu(e,p),h.start(Cu(p,h,g,e.shouldReduceMotion&&xg.has(p)?{type:!1}:m,e,f));const b=h.animation;b&&u.push(b)}return c&&Promise.all(u).then(()=>{Ke.update(()=>{c&&fP(e,c)})}),u}function Tu(e,t,n={}){var o;const r=ui(e,t,n.type==="exit"?(o=e.presenceContext)===null||o===void 0?void 0:o.custom:void 0);let{transition:s=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(s=n.transitionOverride);const a=r?()=>Promise.all(pb(e,r,n)):()=>Promise.resolve(),c=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:d=0,staggerChildren:p,staggerDirection:h}=s;return BN(e,t,d+u,p,h,n)}:()=>Promise.resolve(),{when:l}=s;if(l){const[u,d]=l==="beforeChildren"?[a,c]:[c,a];return u().then(()=>d())}else return Promise.all([a(),c(n.delay)])}function BN(e,t,n=0,o=0,r=1,s){const a=[],c=(e.variantChildren.size-1)*o,l=r===1?(u=0)=>u*o:(u=0)=>c-u*o;return Array.from(e.variantChildren).sort(FN).forEach((u,d)=>{u.notify("AnimationStart",t),a.push(Tu(u,t,{...s,delay:n+l(d)}).then(()=>u.notify("AnimationComplete",t)))}),Promise.all(a)}function FN(e,t){return e.sortNodePosition(t)}function jN(e,t,n={}){e.notify("AnimationStart",t);let o;if(Array.isArray(t)){const r=t.map(s=>Tu(e,s,n));o=Promise.all(r)}else if(typeof t=="string")o=Tu(e,t,n);else{const r=typeof t=="function"?ui(e,t,n.custom):t;o=Promise.all(pb(e,r,n))}return o.then(()=>{e.notify("AnimationComplete",t)})}function fb(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let o=0;o<n;o++)if(t[o]!==e[o])return!1;return!0}const VN=Mc.length;function hb(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?hb(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<VN;n++){const o=Mc[n],r=e.props[o];(si(r)||r===!1)&&(t[o]=r)}return t}const LN=[...Nc].reverse(),_N=Nc.length;function $N(e){return t=>Promise.all(t.map(({animation:n,options:o})=>jN(e,n,o)))}function WN(e){let t=$N(e),n=mb(),o=!0;const r=l=>(u,d)=>{var p;const h=ui(e,d,l==="exit"?(p=e.presenceContext)===null||p===void 0?void 0:p.custom:void 0);if(h){const{transition:g,transitionEnd:m,...f}=h;u={...u,...f,...m}}return u};function s(l){t=l(e)}function a(l){const{props:u}=e,d=hb(e.parent)||{},p=[],h=new Set;let g={},m=1/0;for(let b=0;b<_N;b++){const v=LN[b],S=n[v],C=u[v]!==void 0?u[v]:d[v],I=si(C),y=v===l?S.isActive:null;y===!1&&(m=b);let A=C===d[v]&&C!==u[v]&&I;if(A&&o&&e.manuallyAnimateOnMount&&(A=!1),S.protectedKeys={...g},!S.isActive&&y===null||!C&&!S.prevProp||Zs(C)||typeof C=="boolean")continue;const w=GN(S.prevProp,C);let R=w||v===l&&S.isActive&&!A&&I||b>m&&I,P=!1;const N=Array.isArray(C)?C:[C];let F=N.reduce(r(v),{});y===!1&&(F={});const{prevResolvedValues:G={}}=S,j={...G,...F},L=$=>{R=!0,h.has($)&&(P=!0,h.delete($)),S.needsAnimating[$]=!0;const D=e.getValue($);D&&(D.liveStyle=!1)};for(const $ in j){const D=F[$],X=G[$];if(g.hasOwnProperty($))continue;let k=!1;zc(D)&&zc(X)?k=!fb(D,X):k=D!==X,k?D!=null?L($):h.add($):D!==void 0&&h.has($)?L($):S.protectedKeys[$]=!0}S.prevProp=C,S.prevResolvedValues=F,S.isActive&&(g={...g,...F}),o&&e.blockInitialAnimation&&(R=!1),R&&(!(A&&w)||P)&&p.push(...N.map($=>({animation:$,options:{type:v}})))}if(h.size){const b={};if(typeof u.initial!="boolean"){const v=ui(e,Array.isArray(u.initial)?u.initial[0]:u.initial);v&&v.transition&&(b.transition=v.transition)}h.forEach(v=>{const S=e.getBaseTarget(v),C=e.getValue(v);C&&(C.liveStyle=!0),b[v]=S??null}),p.push({animation:b})}let f=!!p.length;return o&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(f=!1),o=!1,f?t(p):Promise.resolve()}function c(l,u){var d;if(n[l].isActive===u)return Promise.resolve();(d=e.variantChildren)===null||d===void 0||d.forEach(h=>{var g;return(g=h.animationState)===null||g===void 0?void 0:g.setActive(l,u)}),n[l].isActive=u;const p=a(l);for(const h in n)n[h].protectedKeys={};return p}return{animateChanges:a,setActive:c,setAnimateFunction:s,getState:()=>n,reset:()=>{n=mb(),o=!0}}}function GN(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!fb(t,e):!1}function yo(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function mb(){return{animate:yo(!0),whileInView:yo(),whileHover:yo(),whileTap:yo(),whileDrag:yo(),whileFocus:yo(),exit:yo()}}class eo{constructor(t){this.isMounted=!1,this.node=t}update(){}}class zN extends eo{constructor(t){super(t),t.animationState||(t.animationState=WN(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Zs(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)===null||t===void 0||t.call(this)}}let HN=0;class XN extends eo{constructor(){super(...arguments),this.id=HN++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:o}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===o)return;const r=this.node.animationState.setActive("exit",!t);n&&!t&&r.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const UN={animation:{Feature:zN},exit:{Feature:XN}};function yi(e,t,n,o={passive:!0}){return e.addEventListener(t,n,o),()=>e.removeEventListener(t,n)}function xi(e){return{point:{x:e.pageX,y:e.pageY}}}const ZN=e=>t=>qc(t)&&e(t,xi(t));function Ci(e,t,n,o){return yi(e,t,ZN(n),o)}const gb=(e,t)=>Math.abs(e-t);function YN(e,t){const n=gb(e.x,t.x),o=gb(e.y,t.y);return Math.sqrt(n**2+o**2)}class bb{constructor(t,n,{transformPagePoint:o,contextWindow:r,dragSnapToOrigin:s=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const p=Iu(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,g=YN(p.offset,{x:0,y:0})>=3;if(!h&&!g)return;const{point:m}=p,{timestamp:f}=It;this.history.push({...m,timestamp:f});const{onStart:b,onMove:v}=this.handlers;h||(b&&b(this.lastMoveEvent,p),this.startEvent=this.lastMoveEvent),v&&v(this.lastMoveEvent,p)},this.handlePointerMove=(p,h)=>{this.lastMoveEvent=p,this.lastMoveEventInfo=Eu(h,this.transformPagePoint),Ke.update(this.updatePoint,!0)},this.handlePointerUp=(p,h)=>{this.end();const{onEnd:g,onSessionEnd:m,resumeAnimation:f}=this.handlers;if(this.dragSnapToOrigin&&f&&f(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const b=Iu(p.type==="pointercancel"?this.lastMoveEventInfo:Eu(h,this.transformPagePoint),this.history);this.startEvent&&g&&g(p,b),m&&m(p,b)},!qc(t))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=o,this.contextWindow=r||window;const a=xi(t),c=Eu(a,this.transformPagePoint),{point:l}=c,{timestamp:u}=It;this.history=[{...l,timestamp:u}];const{onSessionStart:d}=n;d&&d(t,Iu(c,this.history)),this.removeListeners=bi(Ci(this.contextWindow,"pointermove",this.handlePointerMove),Ci(this.contextWindow,"pointerup",this.handlePointerUp),Ci(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),qn(this.updatePoint)}}function Eu(e,t){return t?{point:t(e.point)}:e}function vb(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Iu({point:e},t){return{point:e,delta:vb(e,yb(t)),offset:vb(e,JN(t)),velocity:qN(t,.1)}}function JN(e){return e[0]}function yb(e){return e[e.length-1]}function qN(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,o=null;const r=yb(e);for(;n>=0&&(o=e[n],!(r.timestamp-o.timestamp>Sn(t)));)n--;if(!o)return{x:0,y:0};const s=Bn(r.timestamp-o.timestamp);if(s===0)return{x:0,y:0};const a={x:(r.x-o.x)/s,y:(r.y-o.y)/s};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}const xb=1e-4,KN=1-xb,QN=1+xb,Cb=.01,eM=0-Cb,tM=0+Cb;function kt(e){return e.max-e.min}function nM(e,t,n){return Math.abs(e-t)<=n}function Tb(e,t,n,o=.5){e.origin=o,e.originPoint=it(t.min,t.max,e.origin),e.scale=kt(n)/kt(t),e.translate=it(n.min,n.max,e.origin)-e.originPoint,(e.scale>=KN&&e.scale<=QN||isNaN(e.scale))&&(e.scale=1),(e.translate>=eM&&e.translate<=tM||isNaN(e.translate))&&(e.translate=0)}function Ti(e,t,n,o){Tb(e.x,t.x,n.x,o?o.originX:void 0),Tb(e.y,t.y,n.y,o?o.originY:void 0)}function Eb(e,t,n){e.min=n.min+t.min,e.max=e.min+kt(t)}function oM(e,t,n){Eb(e.x,t.x,n.x),Eb(e.y,t.y,n.y)}function Ib(e,t,n){e.min=t.min-n.min,e.max=e.min+kt(t)}function Ei(e,t,n){Ib(e.x,t.x,n.x),Ib(e.y,t.y,n.y)}function rM(e,{min:t,max:n},o){return t!==void 0&&e<t?e=o?it(t,e,o.min):Math.max(e,t):n!==void 0&&e>n&&(e=o?it(n,e,o.max):Math.min(e,n)),e}function Sb(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function iM(e,{top:t,left:n,bottom:o,right:r}){return{x:Sb(e.x,n,r),y:Sb(e.y,t,o)}}function wb(e,t){let n=t.min-e.min,o=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,o]=[o,n]),{min:n,max:o}}function sM(e,t){return{x:wb(e.x,t.x),y:wb(e.y,t.y)}}function aM(e,t){let n=.5;const o=kt(e),r=kt(t);return r>o?n=ir(t.min,t.max-o,e.min):o>r&&(n=ir(e.min,e.max-r,t.min)),Fn(0,1,n)}function lM(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const Su=.35;function cM(e=Su){return e===!1?e=0:e===!0&&(e=Su),{x:Ab(e,"left","right"),y:Ab(e,"top","bottom")}}function Ab(e,t,n){return{min:Rb(e,t),max:Rb(e,n)}}function Rb(e,t){return typeof e=="number"?e:e[t]||0}const Ob=()=>({translate:0,scale:1,origin:0,originPoint:0}),pr=()=>({x:Ob(),y:Ob()}),Pb=()=>({min:0,max:0}),mt=()=>({x:Pb(),y:Pb()});function on(e){return[e("x"),e("y")]}function Nb({top:e,left:t,right:n,bottom:o}){return{x:{min:t,max:n},y:{min:e,max:o}}}function uM({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function dM(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),o=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:o.y,right:o.x}}function wu(e){return e===void 0||e===1}function Au({scale:e,scaleX:t,scaleY:n}){return!wu(e)||!wu(t)||!wu(n)}function xo(e){return Au(e)||Mb(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Mb(e){return kb(e.x)||kb(e.y)}function kb(e){return e&&e!=="0%"}function oa(e,t,n){const o=e-n,r=t*o;return n+r}function Db(e,t,n,o,r){return r!==void 0&&(e=oa(e,r,o)),oa(e,n,o)+t}function Ru(e,t=0,n=1,o,r){e.min=Db(e.min,t,n,o,r),e.max=Db(e.max,t,n,o,r)}function Bb(e,{x:t,y:n}){Ru(e.x,t.translate,t.scale,t.originPoint),Ru(e.y,n.translate,n.scale,n.originPoint)}const Fb=.999999999999,jb=1.0000000000001;function pM(e,t,n,o=!1){const r=n.length;if(!r)return;t.x=t.y=1;let s,a;for(let c=0;c<r;c++){s=n[c],a=s.projectionDelta;const{visualElement:l}=s.options;l&&l.props.style&&l.props.style.display==="contents"||(o&&s.options.layoutScroll&&s.scroll&&s!==s.root&&hr(e,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),a&&(t.x*=a.x.scale,t.y*=a.y.scale,Bb(e,a)),o&&xo(s.latestValues)&&hr(e,s.latestValues))}t.x<jb&&t.x>Fb&&(t.x=1),t.y<jb&&t.y>Fb&&(t.y=1)}function fr(e,t){e.min=e.min+t,e.max=e.max+t}function Vb(e,t,n,o,r=.5){const s=it(e.min,e.max,r);Ru(e,t,n,s,o)}function hr(e,t){Vb(e.x,t.x,t.scaleX,t.scale,t.originX),Vb(e.y,t.y,t.scaleY,t.scale,t.originY)}function Lb(e,t){return Nb(dM(e.getBoundingClientRect(),t))}function fM(e,t,n){const o=Lb(e,n),{scroll:r}=t;return r&&(fr(o.x,r.offset.x),fr(o.y,r.offset.y)),o}const _b=({current:e})=>e?e.ownerDocument.defaultView:null,hM=new WeakMap;class mM{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=mt(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:o}=this.visualElement;if(o&&o.isPresent===!1)return;const r=d=>{const{dragSnapToOrigin:p}=this.getProps();p?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(xi(d).point)},s=(d,p)=>{const{drag:h,dragPropagation:g,onDragStart:m}=this.getProps();if(h&&!g&&(this.openDragLock&&this.openDragLock(),this.openDragLock=lP(h),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),on(b=>{let v=this.getAxisMotionValue(b).get()||0;if(wn.test(v)){const{projection:S}=this.visualElement;if(S&&S.layout){const C=S.layout.layoutBox[b];C&&(v=kt(C)*(parseFloat(v)/100))}}this.originPoint[b]=v}),m&&Ke.postRender(()=>m(d,p)),nu(this.visualElement,"transform");const{animationState:f}=this.visualElement;f&&f.setActive("whileDrag",!0)},a=(d,p)=>{const{dragPropagation:h,dragDirectionLock:g,onDirectionLock:m,onDrag:f}=this.getProps();if(!h&&!this.openDragLock)return;const{offset:b}=p;if(g&&this.currentDirection===null){this.currentDirection=gM(b),this.currentDirection!==null&&m&&m(this.currentDirection);return}this.updateAxis("x",p.point,b),this.updateAxis("y",p.point,b),this.visualElement.render(),f&&f(d,p)},c=(d,p)=>this.stop(d,p),l=()=>on(d=>{var p;return this.getAnimationState(d)==="paused"&&((p=this.getAxisMotionValue(d).animation)===null||p===void 0?void 0:p.play())}),{dragSnapToOrigin:u}=this.getProps();this.panSession=new bb(t,{onSessionStart:r,onStart:s,onMove:a,onSessionEnd:c,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,contextWindow:_b(this.visualElement)})}stop(t,n){const o=this.isDragging;if(this.cancel(),!o)return;const{velocity:r}=n;this.startAnimation(r);const{onDragEnd:s}=this.getProps();s&&Ke.postRender(()=>s(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:o}=this.getProps();!o&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,o){const{drag:r}=this.getProps();if(!o||!ra(t,r,this.currentDirection))return;const s=this.getAxisMotionValue(t);let a=this.originPoint[t]+o[t];this.constraints&&this.constraints[t]&&(a=rM(a,this.constraints[t],this.elastic[t])),s.set(a)}resolveConstraints(){var t;const{dragConstraints:n,dragElastic:o}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,s=this.constraints;n&&ar(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&r?this.constraints=iM(r.layoutBox,n):this.constraints=!1,this.elastic=cM(o),s!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&on(a=>{this.constraints!==!1&&this.getAxisMotionValue(a)&&(this.constraints[a]=lM(r.layoutBox[a],this.constraints[a]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!ar(t))return!1;const o=t.current;Jn(o!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");const{projection:r}=this.visualElement;if(!r||!r.layout)return!1;const s=fM(o,r.root,this.visualElement.getTransformPagePoint());let a=sM(r.layout.layoutBox,s);if(n){const c=n(uM(a));this.hasMutatedConstraints=!!c,c&&(a=Nb(c))}return a}startAnimation(t){const{drag:n,dragMomentum:o,dragElastic:r,dragTransition:s,dragSnapToOrigin:a,onDragTransitionEnd:c}=this.getProps(),l=this.constraints||{},u=on(d=>{if(!ra(d,n,this.currentDirection))return;let p=l&&l[d]||{};a&&(p={min:0,max:0});const h=r?200:1e6,g=r?40:1e7,m={type:"inertia",velocity:o?t[d]:0,bounceStiffness:h,bounceDamping:g,timeConstant:750,restDelta:1,restSpeed:10,...s,...p};return this.startAxisValueAnimation(d,m)});return Promise.all(u).then(c)}startAxisValueAnimation(t,n){const o=this.getAxisMotionValue(t);return nu(this.visualElement,t),o.start(Cu(t,o,0,n,this.visualElement,!1))}stopAnimation(){on(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){on(t=>{var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,o=this.visualElement.getProps(),r=o[n];return r||this.visualElement.getValue(t,(o.initial?o.initial[t]:void 0)||0)}snapToCursor(t){on(n=>{const{drag:o}=this.getProps();if(!ra(n,o,this.currentDirection))return;const{projection:r}=this.visualElement,s=this.getAxisMotionValue(n);if(r&&r.layout){const{min:a,max:c}=r.layout.layoutBox[n];s.set(t[n]-it(a,c,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:o}=this.visualElement;if(!ar(n)||!o||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};on(a=>{const c=this.getAxisMotionValue(a);if(c&&this.constraints!==!1){const l=c.get();r[a]=aM({min:l,max:l},this.constraints[a])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",o.root&&o.root.updateScroll(),o.updateLayout(),this.resolveConstraints(),on(a=>{if(!ra(a,t,null))return;const c=this.getAxisMotionValue(a),{min:l,max:u}=this.constraints[a];c.set(it(l,u,r[a]))})}addListeners(){if(!this.visualElement.current)return;hM.set(this.visualElement,this);const t=this.visualElement.current,n=Ci(t,"pointerdown",l=>{const{drag:u,dragListener:d=!0}=this.getProps();u&&d&&this.start(l)}),o=()=>{const{dragConstraints:l}=this.getProps();ar(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:r}=this.visualElement,s=r.addEventListener("measure",o);r&&!r.layout&&(r.root&&r.root.updateScroll(),r.updateLayout()),Ke.read(o);const a=yi(window,"resize",()=>this.scalePositionWithinConstraints()),c=r.addEventListener("didUpdate",({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&(on(d=>{const p=this.getAxisMotionValue(d);p&&(this.originPoint[d]+=l[d].translate,p.set(p.get()+l[d].translate))}),this.visualElement.render())});return()=>{a(),n(),s(),c&&c()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:o=!1,dragPropagation:r=!1,dragConstraints:s=!1,dragElastic:a=Su,dragMomentum:c=!0}=t;return{...t,drag:n,dragDirectionLock:o,dragPropagation:r,dragConstraints:s,dragElastic:a,dragMomentum:c}}}function ra(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function gM(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class bM extends eo{constructor(t){super(t),this.removeGroupControls=Lt,this.removeListeners=Lt,this.controls=new mM(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Lt}unmount(){this.removeGroupControls(),this.removeListeners()}}const $b=e=>(t,n)=>{e&&Ke.postRender(()=>e(t,n))};class vM extends eo{constructor(){super(...arguments),this.removePointerDownListener=Lt}onPointerDown(t){this.session=new bb(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:_b(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:o,onPanEnd:r}=this.node.getProps();return{onSessionStart:$b(t),onStart:$b(n),onMove:o,onEnd:(s,a)=>{delete this.session,r&&Ke.postRender(()=>r(s,a))}}}mount(){this.removePointerDownListener=Ci(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const ia={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Wb(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Ii={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(ye.test(e))e=parseFloat(e);else return e;const n=Wb(e,t.target.x),o=Wb(e,t.target.y);return`${n}% ${o}%`}},yM={correct:(e,{treeScale:t,projectionDelta:n})=>{const o=e,r=Qn.parse(e);if(r.length>5)return o;const s=Qn.createTransformer(e),a=typeof r[0]!="number"?1:0,c=n.x.scale*t.x,l=n.y.scale*t.y;r[0+a]/=c,r[1+a]/=l;const u=it(c,l,.5);return typeof r[2+a]=="number"&&(r[2+a]/=u),typeof r[3+a]=="number"&&(r[3+a]/=u),s(r)}};class xM extends M.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:o,layoutId:r}=this.props,{projection:s}=t;wO(CM),s&&(n.group&&n.group.add(s),o&&o.register&&r&&o.register(s),s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),ia.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:o,drag:r,isPresent:s}=this.props,a=o.projection;return a&&(a.isPresent=s,r||t.layoutDependency!==n||n===void 0?a.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?a.promote():a.relegate()||Ke.postRender(()=>{const c=a.getStack();(!c||!c.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Dc.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:o}=this.props,{projection:r}=t;r&&(r.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(r),o&&o.deregister&&o.deregister(r))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function Gb(e){const[t,n]=rO(),o=M.useContext(Dm);return x.jsx(xM,{...e,layoutGroup:o,switchLayoutGroup:M.useContext(Hm),isPresent:t,safeToRemove:n})}const CM={borderRadius:{...Ii,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Ii,borderTopRightRadius:Ii,borderBottomLeftRadius:Ii,borderBottomRightRadius:Ii,boxShadow:yM};function TM(e,t,n){const o=At(e)?e:fi(e);return o.start(Cu("",o,t,n)),o.animation}function EM(e){return e instanceof SVGElement&&e.tagName!=="svg"}const IM=(e,t)=>e.depth-t.depth;class SM{constructor(){this.children=[],this.isDirty=!1}add(t){Qc(this.children,t),this.isDirty=!0}remove(t){eu(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(IM),this.isDirty=!1,this.children.forEach(t)}}function wM(e,t){const n=An.now(),o=({timestamp:r})=>{const s=r-n;s>=t&&(qn(o),e(s-t))};return Ke.read(o,!0),()=>qn(o)}const zb=["TopLeft","TopRight","BottomLeft","BottomRight"],AM=zb.length,Hb=e=>typeof e=="string"?parseFloat(e):e,Xb=e=>typeof e=="number"||ye.test(e);function RM(e,t,n,o,r,s){r?(e.opacity=it(0,n.opacity!==void 0?n.opacity:1,OM(o)),e.opacityExit=it(t.opacity!==void 0?t.opacity:1,0,PM(o))):s&&(e.opacity=it(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,o));for(let a=0;a<AM;a++){const c=`border${zb[a]}Radius`;let l=Ub(t,c),u=Ub(n,c);if(l===void 0&&u===void 0)continue;l||(l=0),u||(u=0),l===0||u===0||Xb(l)===Xb(u)?(e[c]=Math.max(it(Hb(l),Hb(u),o),0),(wn.test(u)||wn.test(l))&&(e[c]+="%")):e[c]=u}(t.rotate||n.rotate)&&(e.rotate=it(t.rotate||0,n.rotate||0,o))}function Ub(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const OM=Zb(0,.5,Pg),PM=Zb(.5,.95,Lt);function Zb(e,t,n){return o=>o<e?0:o>t?1:n(ir(e,t,o))}function Yb(e,t){e.min=t.min,e.max=t.max}function rn(e,t){Yb(e.x,t.x),Yb(e.y,t.y)}function Jb(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function qb(e,t,n,o,r){return e-=t,e=oa(e,1/n,o),r!==void 0&&(e=oa(e,1/r,o)),e}function NM(e,t=0,n=1,o=.5,r,s=e,a=e){if(wn.test(t)&&(t=parseFloat(t),t=it(a.min,a.max,t/100)-a.min),typeof t!="number")return;let c=it(s.min,s.max,o);e===s&&(c-=t),e.min=qb(e.min,t,n,c,r),e.max=qb(e.max,t,n,c,r)}function Kb(e,t,[n,o,r],s,a){NM(e,t[n],t[o],t[r],t.scale,s,a)}const MM=["x","scaleX","originX"],kM=["y","scaleY","originY"];function Qb(e,t,n,o){Kb(e.x,t,MM,n?n.x:void 0,o?o.x:void 0),Kb(e.y,t,kM,n?n.y:void 0,o?o.y:void 0)}function ev(e){return e.translate===0&&e.scale===1}function tv(e){return ev(e.x)&&ev(e.y)}function nv(e,t){return e.min===t.min&&e.max===t.max}function DM(e,t){return nv(e.x,t.x)&&nv(e.y,t.y)}function ov(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function rv(e,t){return ov(e.x,t.x)&&ov(e.y,t.y)}function iv(e){return kt(e.x)/kt(e.y)}function sv(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class BM{constructor(){this.members=[]}add(t){Qc(this.members,t),t.scheduleRender()}remove(t){if(eu(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(r=>t===r);if(n===0)return!1;let o;for(let r=n;r>=0;r--){const s=this.members[r];if(s.isPresent!==!1){o=s;break}}return o?(this.promote(o),!0):!1}promote(t,n){const o=this.lead;if(t!==o&&(this.prevLead=o,this.lead=t,t.show(),o)){o.instance&&o.scheduleRender(),t.scheduleRender(),t.resumeFrom=o,n&&(t.resumeFrom.preserveOpacity=!0),o.snapshot&&(t.snapshot=o.snapshot,t.snapshot.latestValues=o.animationValues||o.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:r}=t.options;r===!1&&o.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:o}=t;n.onExitComplete&&n.onExitComplete(),o&&o.options.onExitComplete&&o.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function FM(e,t,n){let o="";const r=e.x.translate/t.x,s=e.y.translate/t.y,a=(n==null?void 0:n.z)||0;if((r||s||a)&&(o=`translate3d(${r}px, ${s}px, ${a}px) `),(t.x!==1||t.y!==1)&&(o+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:u,rotate:d,rotateX:p,rotateY:h,skewX:g,skewY:m}=n;u&&(o=`perspective(${u}px) ${o}`),d&&(o+=`rotate(${d}deg) `),p&&(o+=`rotateX(${p}deg) `),h&&(o+=`rotateY(${h}deg) `),g&&(o+=`skewX(${g}deg) `),m&&(o+=`skewY(${m}deg) `)}const c=e.x.scale*t.x,l=e.y.scale*t.y;return(c!==1||l!==1)&&(o+=`scale(${c}, ${l})`),o||"none"}const Ou=["","X","Y","Z"],jM={visibility:"hidden"},av=1e3;let VM=0;function Pu(e,t,n,o){const{latestValues:r}=t;r[e]&&(n[e]=r[e],t.setStaticValue(e,0),o&&(o[e]=0))}function lv(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=Eg(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:r,layoutId:s}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",Ke,!(r||s))}const{parent:o}=e;o&&!o.hasCheckedOptimisedAppear&&lv(o)}function cv({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:o,resetTransform:r}){return class{constructor(a={},c=t==null?void 0:t()){this.id=VM++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach($M),this.nodes.forEach(XM),this.nodes.forEach(UM),this.nodes.forEach(WM)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=a,this.root=c?c.root||c:this,this.path=c?[...c.path,c]:[],this.parent=c,this.depth=c?c.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new SM)}addEventListener(a,c){return this.eventHandlers.has(a)||this.eventHandlers.set(a,new tu),this.eventHandlers.get(a).add(c)}notifyListeners(a,...c){const l=this.eventHandlers.get(a);l&&l.notify(...c)}hasListeners(a){return this.eventHandlers.has(a)}mount(a,c=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=EM(a),this.instance=a;const{layoutId:l,layout:u,visualElement:d}=this.options;if(d&&!d.current&&d.mount(a),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),c&&(u||l)&&(this.isLayoutDirty=!0),e){let p;const h=()=>this.root.updateBlockedByResize=!1;e(a,()=>{this.root.updateBlockedByResize=!0,p&&p(),p=wM(h,250),ia.hasAnimatedSinceResize&&(ia.hasAnimatedSinceResize=!1,this.nodes.forEach(dv))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&d&&(l||u)&&this.addEventListener("didUpdate",({delta:p,hasLayoutChanged:h,hasRelativeLayoutChanged:g,layout:m})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const f=this.options.transition||d.getDefaultTransition()||KM,{onLayoutAnimationStart:b,onLayoutAnimationComplete:v}=d.getProps(),S=!this.targetLayout||!rv(this.targetLayout,m),C=!h&&g;if(this.options.layoutRoot||this.resumeFrom||C||h&&(S||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(p,C);const I={...Xc(f,"layout"),onPlay:b,onComplete:v};(d.shouldReduceMotion||this.options.layoutRoot)&&(I.delay=0,I.type=!1),this.startAnimation(I)}else h||dv(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=m})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const a=this.getStack();a&&a.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,qn(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(ZM),this.animationId++)}getTransformTemplate(){const{visualElement:a}=this.options;return a&&a.getProps().transformTemplate}willUpdate(a=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&lv(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let d=0;d<this.path.length;d++){const p=this.path[d];p.shouldResetTransform=!0,p.updateScroll("snapshot"),p.options.layoutRoot&&p.willUpdate(!1)}const{layoutId:c,layout:l}=this.options;if(c===void 0&&!l)return;const u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),a&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(uv);return}this.isUpdating||this.nodes.forEach(zM),this.isUpdating=!1,this.nodes.forEach(HM),this.nodes.forEach(LM),this.nodes.forEach(_M),this.clearAllSnapshots();const c=An.now();It.delta=Fn(0,1e3/60,c-It.timestamp),It.timestamp=c,It.isProcessing=!0,Pc.update.process(It),Pc.preRender.process(It),Pc.render.process(It),It.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Dc.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(GM),this.sharedNodes.forEach(YM)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Ke.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Ke.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!kt(this.snapshot.measuredBox.x)&&!kt(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const a=this.layout;this.layout=this.measure(!1),this.layoutCorrected=mt(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:c}=this.options;c&&c.notify("LayoutMeasure",this.layout.layoutBox,a?a.layoutBox:void 0)}updateScroll(a="measure"){let c=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===a&&(c=!1),c){const l=o(this.instance);this.scroll={animationId:this.root.animationId,phase:a,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!r)return;const a=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,c=this.projectionDelta&&!tv(this.projectionDelta),l=this.getTransformTemplate(),u=l?l(this.latestValues,""):void 0,d=u!==this.prevTransformTemplateValue;a&&(c||xo(this.latestValues)||d)&&(r(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(a=!0){const c=this.measurePageBox();let l=this.removeElementScroll(c);return a&&(l=this.removeTransform(l)),QM(l),{animationId:this.root.animationId,measuredBox:c,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var a;const{visualElement:c}=this.options;if(!c)return mt();const l=c.measureViewportBox();if(!(((a=this.scroll)===null||a===void 0?void 0:a.wasRoot)||this.path.some(ek))){const{scroll:d}=this.root;d&&(fr(l.x,d.offset.x),fr(l.y,d.offset.y))}return l}removeElementScroll(a){var c;const l=mt();if(rn(l,a),!((c=this.scroll)===null||c===void 0)&&c.wasRoot)return l;for(let u=0;u<this.path.length;u++){const d=this.path[u],{scroll:p,options:h}=d;d!==this.root&&p&&h.layoutScroll&&(p.wasRoot&&rn(l,a),fr(l.x,p.offset.x),fr(l.y,p.offset.y))}return l}applyTransform(a,c=!1){const l=mt();rn(l,a);for(let u=0;u<this.path.length;u++){const d=this.path[u];!c&&d.options.layoutScroll&&d.scroll&&d!==d.root&&hr(l,{x:-d.scroll.offset.x,y:-d.scroll.offset.y}),xo(d.latestValues)&&hr(l,d.latestValues)}return xo(this.latestValues)&&hr(l,this.latestValues),l}removeTransform(a){const c=mt();rn(c,a);for(let l=0;l<this.path.length;l++){const u=this.path[l];if(!u.instance||!xo(u.latestValues))continue;Au(u.latestValues)&&u.updateSnapshot();const d=mt(),p=u.measurePageBox();rn(d,p),Qb(c,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,d)}return xo(this.latestValues)&&Qb(c,this.latestValues),c}setTargetDelta(a){this.targetDelta=a,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(a){this.options={...this.options,...a,crossfade:a.crossfade!==void 0?a.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==It.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(a=!1){var c;const l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);const u=!!this.resumingFrom||this!==l;if(!(a||u&&this.isSharedProjectionDirty||this.isProjectionDirty||!((c=this.parent)===null||c===void 0)&&c.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:p,layoutId:h}=this.options;if(!(!this.layout||!(p||h))){if(this.resolvedRelativeTargetAt=It.timestamp,!this.targetDelta&&!this.relativeTarget){const g=this.getClosestProjectingParent();g&&g.layout&&this.animationProgress!==1?(this.relativeParent=g,this.forceRelativeParentToResolveTarget(),this.relativeTarget=mt(),this.relativeTargetOrigin=mt(),Ei(this.relativeTargetOrigin,this.layout.layoutBox,g.layout.layoutBox),rn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=mt(),this.targetWithTransforms=mt()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),oM(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):rn(this.target,this.layout.layoutBox),Bb(this.target,this.targetDelta)):rn(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const g=this.getClosestProjectingParent();g&&!!g.resumingFrom==!!this.resumingFrom&&!g.options.layoutScroll&&g.target&&this.animationProgress!==1?(this.relativeParent=g,this.forceRelativeParentToResolveTarget(),this.relativeTarget=mt(),this.relativeTargetOrigin=mt(),Ei(this.relativeTargetOrigin,this.target,g.target),rn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||Au(this.parent.latestValues)||Mb(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var a;const c=this.getLead(),l=!!this.resumingFrom||this!==c;let u=!0;if((this.isProjectionDirty||!((a=this.parent)===null||a===void 0)&&a.isProjectionDirty)&&(u=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(u=!1),this.resolvedRelativeTargetAt===It.timestamp&&(u=!1),u)return;const{layout:d,layoutId:p}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(d||p))return;rn(this.layoutCorrected,this.layout.layoutBox);const h=this.treeScale.x,g=this.treeScale.y;pM(this.layoutCorrected,this.treeScale,this.path,l),c.layout&&!c.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(c.target=c.layout.layoutBox,c.targetWithTransforms=mt());const{target:m}=c;if(!m){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Jb(this.prevProjectionDelta.x,this.projectionDelta.x),Jb(this.prevProjectionDelta.y,this.projectionDelta.y)),Ti(this.projectionDelta,this.layoutCorrected,m,this.latestValues),(this.treeScale.x!==h||this.treeScale.y!==g||!sv(this.projectionDelta.x,this.prevProjectionDelta.x)||!sv(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",m))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(a=!0){var c;if((c=this.options.visualElement)===null||c===void 0||c.scheduleRender(),a){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=pr(),this.projectionDelta=pr(),this.projectionDeltaWithTransform=pr()}setAnimationOrigin(a,c=!1){const l=this.snapshot,u=l?l.latestValues:{},d={...this.latestValues},p=pr();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!c;const h=mt(),g=l?l.source:void 0,m=this.layout?this.layout.source:void 0,f=g!==m,b=this.getStack(),v=!b||b.members.length<=1,S=!!(f&&!v&&this.options.crossfade===!0&&!this.path.some(qM));this.animationProgress=0;let C;this.mixTargetDelta=I=>{const y=I/1e3;pv(p.x,a.x,y),pv(p.y,a.y,y),this.setTargetDelta(p),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Ei(h,this.layout.layoutBox,this.relativeParent.layout.layoutBox),JM(this.relativeTarget,this.relativeTargetOrigin,h,y),C&&DM(this.relativeTarget,C)&&(this.isProjectionDirty=!1),C||(C=mt()),rn(C,this.relativeTarget)),f&&(this.animationValues=d,RM(d,u,this.latestValues,y,S,v)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=y},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(a){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(qn(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Ke.update(()=>{ia.hasAnimatedSinceResize=!0,this.currentAnimation=TM(0,av,{...a,onUpdate:c=>{this.mixTargetDelta(c),a.onUpdate&&a.onUpdate(c)},onStop:()=>{},onComplete:()=>{a.onComplete&&a.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const a=this.getStack();a&&a.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(av),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:c,target:l,layout:u,latestValues:d}=a;if(!(!c||!l||!u)){if(this!==a&&this.layout&&u&&bv(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||mt();const p=kt(this.layout.layoutBox.x);l.x.min=a.target.x.min,l.x.max=l.x.min+p;const h=kt(this.layout.layoutBox.y);l.y.min=a.target.y.min,l.y.max=l.y.min+h}rn(c,l),hr(c,d),Ti(this.projectionDeltaWithTransform,this.layoutCorrected,c,d)}}registerSharedNode(a,c){this.sharedNodes.has(a)||this.sharedNodes.set(a,new BM),this.sharedNodes.get(a).add(c);const u=c.options.initialPromotionConfig;c.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(c):void 0})}isLead(){const a=this.getStack();return a?a.lead===this:!0}getLead(){var a;const{layoutId:c}=this.options;return c?((a=this.getStack())===null||a===void 0?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:c}=this.options;return c?(a=this.getStack())===null||a===void 0?void 0:a.prevLead:void 0}getStack(){const{layoutId:a}=this.options;if(a)return this.root.sharedNodes.get(a)}promote({needsReset:a,transition:c,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),a&&(this.projectionDelta=void 0,this.needsReset=!0),c&&this.setOptions({transition:c})}relegate(){const a=this.getStack();return a?a.relegate(this):!1}resetSkewAndRotation(){const{visualElement:a}=this.options;if(!a)return;let c=!1;const{latestValues:l}=a;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(c=!0),!c)return;const u={};l.z&&Pu("z",a,u,this.animationValues);for(let d=0;d<Ou.length;d++)Pu(`rotate${Ou[d]}`,a,u,this.animationValues),Pu(`skew${Ou[d]}`,a,u,this.animationValues);a.render();for(const d in u)a.setStaticValue(d,u[d]),this.animationValues&&(this.animationValues[d]=u[d]);a.scheduleRender()}getProjectionStyles(a){var c,l;if(!this.instance||this.isSVG)return;if(!this.isVisible)return jM;const u={visibility:""},d=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,u.opacity="",u.pointerEvents=qs(a==null?void 0:a.pointerEvents)||"",u.transform=d?d(this.latestValues,""):"none",u;const p=this.getLead();if(!this.projectionDelta||!this.layout||!p.target){const f={};return this.options.layoutId&&(f.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,f.pointerEvents=qs(a==null?void 0:a.pointerEvents)||""),this.hasProjected&&!xo(this.latestValues)&&(f.transform=d?d({},""):"none",this.hasProjected=!1),f}const h=p.animationValues||p.latestValues;this.applyTransformsToTarget(),u.transform=FM(this.projectionDeltaWithTransform,this.treeScale,h),d&&(u.transform=d(h,u.transform));const{x:g,y:m}=this.projectionDelta;u.transformOrigin=`${g.origin*100}% ${m.origin*100}% 0`,p.animationValues?u.opacity=p===this?(l=(c=h.opacity)!==null&&c!==void 0?c:this.latestValues.opacity)!==null&&l!==void 0?l:1:this.preserveOpacity?this.latestValues.opacity:h.opacityExit:u.opacity=p===this?h.opacity!==void 0?h.opacity:"":h.opacityExit!==void 0?h.opacityExit:0;for(const f in ai){if(h[f]===void 0)continue;const{correct:b,applyTo:v,isCSSVariable:S}=ai[f],C=u.transform==="none"?h[f]:b(h[f],p);if(v){const I=v.length;for(let y=0;y<I;y++)u[v[y]]=C}else S?this.options.visualElement.renderState.vars[f]=C:u[f]=C}return this.options.layoutId&&(u.pointerEvents=p===this?qs(a==null?void 0:a.pointerEvents)||"":"none"),u}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(a=>{var c;return(c=a.currentAnimation)===null||c===void 0?void 0:c.stop()}),this.root.nodes.forEach(uv),this.root.sharedNodes.clear()}}}function LM(e){e.updateLayout()}function _M(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:o,measuredBox:r}=e.layout,{animationType:s}=e.options,a=n.source!==e.layout.source;s==="size"?on(p=>{const h=a?n.measuredBox[p]:n.layoutBox[p],g=kt(h);h.min=o[p].min,h.max=h.min+g}):bv(s,n.layoutBox,o)&&on(p=>{const h=a?n.measuredBox[p]:n.layoutBox[p],g=kt(o[p]);h.max=h.min+g,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[p].max=e.relativeTarget[p].min+g)});const c=pr();Ti(c,o,n.layoutBox);const l=pr();a?Ti(l,e.applyTransform(r,!0),n.measuredBox):Ti(l,o,n.layoutBox);const u=!tv(c);let d=!1;if(!e.resumeFrom){const p=e.getClosestProjectingParent();if(p&&!p.resumeFrom){const{snapshot:h,layout:g}=p;if(h&&g){const m=mt();Ei(m,n.layoutBox,h.layoutBox);const f=mt();Ei(f,o,g.layoutBox),rv(m,f)||(d=!0),p.options.layoutRoot&&(e.relativeTarget=f,e.relativeTargetOrigin=m,e.relativeParent=p)}}}e.notifyListeners("didUpdate",{layout:o,snapshot:n,delta:l,layoutDelta:c,hasLayoutChanged:u,hasRelativeLayoutChanged:d})}else if(e.isLead()){const{onExitComplete:o}=e.options;o&&o()}e.options.transition=void 0}function $M(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function WM(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function GM(e){e.clearSnapshot()}function uv(e){e.clearMeasurements()}function zM(e){e.isLayoutDirty=!1}function HM(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function dv(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function XM(e){e.resolveTargetDelta()}function UM(e){e.calcProjection()}function ZM(e){e.resetSkewAndRotation()}function YM(e){e.removeLeadSnapshot()}function pv(e,t,n){e.translate=it(t.translate,0,n),e.scale=it(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function fv(e,t,n,o){e.min=it(t.min,n.min,o),e.max=it(t.max,n.max,o)}function JM(e,t,n,o){fv(e.x,t.x,n.x,o),fv(e.y,t.y,n.y,o)}function qM(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const KM={duration:.45,ease:[.4,0,.1,1]},hv=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),mv=hv("applewebkit/")&&!hv("chrome/")?Math.round:Lt;function gv(e){e.min=mv(e.min),e.max=mv(e.max)}function QM(e){gv(e.x),gv(e.y)}function bv(e,t,n){return e==="position"||e==="preserve-aspect"&&!nM(iv(t),iv(n),.2)}function ek(e){var t;return e!==e.root&&((t=e.scroll)===null||t===void 0?void 0:t.wasRoot)}const tk=cv({attachResizeListener:(e,t)=>yi(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Nu={current:void 0},vv=cv({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Nu.current){const e=new tk({});e.mount(window),e.setOptions({layoutScroll:!0}),Nu.current=e}return Nu.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),nk={pan:{Feature:vM},drag:{Feature:bM,ProjectionNode:vv,MeasureLayout:Gb}};function yv(e,t,n){const{props:o}=e;e.animationState&&o.whileHover&&e.animationState.setActive("whileHover",n==="Start");const r="onHover"+n,s=o[r];s&&Ke.postRender(()=>s(t,xi(t)))}class ok extends eo{mount(){const{current:t}=this.node;t&&(this.unmount=oP(t,(n,o)=>(yv(this.node,o,"Start"),r=>yv(this.node,r,"End"))))}unmount(){}}class rk extends eo{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=bi(yi(this.node.current,"focus",()=>this.onFocus()),yi(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function xv(e,t,n){const{props:o}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&o.whileTap&&e.animationState.setActive("whileTap",n==="Start");const r="onTap"+(n==="End"?"":n),s=o[r];s&&Ke.postRender(()=>s(t,xi(t)))}class ik extends eo{mount(){const{current:t}=this.node;t&&(this.unmount=aP(t,(n,o)=>(xv(this.node,o,"Start"),(r,{success:s})=>xv(this.node,r,s?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Mu=new WeakMap,ku=new WeakMap,sk=e=>{const t=Mu.get(e.target);t&&t(e)},ak=e=>{e.forEach(sk)};function lk({root:e,...t}){const n=e||document;ku.has(n)||ku.set(n,{});const o=ku.get(n),r=JSON.stringify(t);return o[r]||(o[r]=new IntersectionObserver(ak,{root:e,...t})),o[r]}function ck(e,t,n){const o=lk(t);return Mu.set(e,n),o.observe(e),()=>{Mu.delete(e),o.unobserve(e)}}const uk={some:0,all:1};class dk extends eo{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:o,amount:r="some",once:s}=t,a={root:n?n.current:void 0,rootMargin:o,threshold:typeof r=="number"?r:uk[r]},c=l=>{const{isIntersecting:u}=l;if(this.isInView===u||(this.isInView=u,s&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:d,onViewportLeave:p}=this.node.getProps(),h=u?d:p;h&&h(l)};return ck(this.node.current,a,c)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(pk(t,n))&&this.startObserver()}unmount(){}}function pk({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const fk={inView:{Feature:dk},tap:{Feature:ik},focus:{Feature:rk},hover:{Feature:ok}},hk={layout:{ProjectionNode:vv,MeasureLayout:Gb}},Du={current:null},Cv={current:!1};function mk(){if(Cv.current=!0,!!Rc)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Du.current=e.matches;e.addListener(t),t()}else Du.current=!1}const gk=[...Zg,Rt,Qn],bk=e=>gk.find(Ug(e)),vk=new WeakMap;function yk(e,t,n){for(const o in t){const r=t[o],s=n[o];if(At(r))e.addValue(o,r),process.env.NODE_ENV==="development"&&Xs(r.version==="12.4.3",`Attempting to mix Motion versions ${r.version} with 12.4.3 may not work as expected.`);else if(At(s))e.addValue(o,fi(r,{owner:e}));else if(s!==r)if(e.hasValue(o)){const a=e.getValue(o);a.liveStyle===!0?a.jump(r):a.hasAnimated||a.set(r)}else{const a=e.getStaticValue(o);e.addValue(o,fi(a!==void 0?a:r,{owner:e}))}}for(const o in n)t[o]===void 0&&e.removeValue(o);return t}const Tv=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class xk{scrapeMotionValuesFromProps(t,n,o){return{}}constructor({parent:t,props:n,presenceContext:o,reducedMotionConfig:r,blockInitialAnimation:s,visualState:a},c={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=fu,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const g=An.now();this.renderScheduledAt<g&&(this.renderScheduledAt=g,Ke.render(this.render,!1,!0))};const{latestValues:l,renderState:u,onUpdate:d}=a;this.onUpdate=d,this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=u,this.parent=t,this.props=n,this.presenceContext=o,this.depth=t?t.depth+1:0,this.reducedMotionConfig=r,this.options=c,this.blockInitialAnimation=!!s,this.isControllingVariants=Ys(n),this.isVariantNode=Wm(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:p,...h}=this.scrapeMotionValuesFromProps(n,{},this);for(const g in h){const m=h[g];l[g]!==void 0&&At(m)&&m.set(l[g],!1)}}mount(t){this.current=t,vk.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,o)=>this.bindToMotionValue(o,n)),Cv.current||mk(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Du.current,process.env.NODE_ENV!=="production"&&Xs(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected."),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),qn(this.notifyUpdate),qn(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const o=go.has(t);o&&this.onBindTransform&&this.onBindTransform();const r=n.on("change",c=>{this.latestValues[t]=c,this.props.onUpdate&&Ke.preRender(this.notifyUpdate),o&&this.projection&&(this.projection.isTransformDirty=!0)}),s=n.on("renderRequest",this.scheduleRender);let a;window.MotionCheckAppearSync&&(a=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{r(),s(),a&&a(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in sr){const n=sr[t];if(!n)continue;const{isEnabled:o,Feature:r}=n;if(!this.features[t]&&r&&o(this.props)&&(this.features[t]=new r(this)),this.features[t]){const s=this.features[t];s.isMounted?s.update():(s.mount(),s.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):mt()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let o=0;o<Tv.length;o++){const r=Tv[o];this.propEventSubscriptions[r]&&(this.propEventSubscriptions[r](),delete this.propEventSubscriptions[r]);const s="on"+r,a=t[s];a&&(this.propEventSubscriptions[r]=this.on(r,a))}this.prevMotionValues=yk(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const o=this.values.get(t);n!==o&&(o&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let o=this.values.get(t);return o===void 0&&n!==void 0&&(o=fi(n===null?void 0:n,{owner:this}),this.addValue(t,o)),o}readValue(t,n){var o;let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(o=this.getBaseTargetFromProps(this.props,t))!==null&&o!==void 0?o:this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(Hg(r)||Mg(r))?r=parseFloat(r):!bk(r)&&Qn.test(n)&&(r=Lg(t,n)),this.setBaseTarget(t,At(r)?r.get():r)),At(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:o}=this.props;let r;if(typeof o=="string"||typeof o=="object"){const a=Gc(this.props,o,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);a&&(r=a[t])}if(o&&r!==void 0)return r;const s=this.getBaseTargetFromProps(this.props,t);return s!==void 0&&!At(s)?s:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new tu),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class Ev extends xk{constructor(){super(...arguments),this.KeyframeResolver=Jg}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:o}){delete n[t],delete o[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;At(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function Ck(e){return window.getComputedStyle(e)}class Tk extends Ev{constructor(){super(...arguments),this.type="html",this.renderInstance=rg}readValueFromInstance(t,n){if(go.has(n)){const o=uu(n);return o&&o.default||0}else{const o=Ck(t),r=(Bc(n)?o.getPropertyValue(n):o[n])||0;return typeof r=="string"?r.trim():r}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Lb(t,n)}build(t,n,o){Vc(t,n,o.transformTemplate)}scrapeMotionValuesFromProps(t,n,o){return Hc(t,n,o)}}class Ek extends Ev{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=mt,this.updateDimensions=()=>{this.current&&!this.renderState.dimensions&&og(this.current,this.renderState)}}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(go.has(n)){const o=uu(n);return o&&o.default||0}return n=ig.has(n)?n:kc(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,o){return ag(t,n,o)}onBindTransform(){this.current&&!this.renderState.dimensions&&Ke.postRender(this.updateDimensions)}build(t,n,o){$c(t,n,this.isSVGTag,o.transformTemplate)}renderInstance(t,n,o,r){sg(t,n,o,r)}mount(t){this.isSVGTag=Wc(t.tagName),super.mount(t)}}const Ik=(e,t)=>_c(e)?new Ek(t):new Tk(t,{allowProjection:e!==M.Fragment}),Sk=JO({...UN,...fk,...nk,...hk},Ik),Co=fO(Sk),Bu=({label:e,icon:t,hasFooter:n=!1,showCheckBox:o=!1,options:r,setVisibleGridColumns:s,defaultValue:a=!0,isMulti:c=!1,handleSelectClick:l})=>{var y,A;const u=ht(),[d,p]=M.useState(!1),[h,g]=M.useState(a?(y=r==null?void 0:r[0])==null?void 0:y.label:"Select option"),[m,f]=M.useState(r||[]);((A=m==null?void 0:m.filter(w=>!(w!=null&&w.isMandatory)))==null?void 0:A.length)>7;const b=M.useRef(null),v=M.useRef(null),S=M.useCallback(w=>{let R=[...m];R=R==null?void 0:R.map(P=>(P==null?void 0:P.key)===w?{...P,hidden:!P.hidden}:P),f(R),p(!0)},[m]);M.useCallback(()=>{f(w=>{const R=[...w];return R.splice(v.current,0,R.splice(b.current,1)[0]),R.map((P,N)=>({...P,sequence_id:N})).sort((P,N)=>P.sequence_id-N.sequence_id)}),b.current=null,v.current=null},[m]);const C=()=>{p(null),(m==null?void 0:m.length)>0&&s(m)},I=()=>{p(null),s(r),f(r)};return x.jsx(be,{sx:{position:"relative",flexShrink:0},children:x.jsx(be,{position:"absolute",top:0,zIndex:10,children:x.jsxs(Co.div,{style:{position:"relative",maxHeight:"3rem",border:`0.1rem solid ${u.palette.primary.notifyBorderColor}`,borderRadius:"0.7rem",color:u.palette.primary.notifyTextColor,backgroundColor:u.palette.primary.notifyBackground,overflow:"hidden",width:"max-content"},animate:{maxHeight:d?"15rem":"3rem"},transition:{duration:.2,ease:"easeInOut"},children:[x.jsxs(be,{sx:{padding:"0.65rem",display:"flex",alignItems:"center",justifyContent:"space-between",cursor:"pointer",gap:"0.5rem"},onClick:()=>p(!d),children:[x.jsx(be,{component:"img",layout:!0,className:"select-icon",src:t,sx:{cursor:"pointer"}}),x.jsx(Kt,{sx:{color:u.palette.primary.notifyTextColor,flex:1,fontSize:"1.1rem"},children:e||h}),x.jsx(be,{component:"img",layout:!0,className:"child",src:d?Dn.ArrowSelectDown:Dn.ArrowSelectUp,sx:{cursor:"pointer"}})]}),d&&x.jsx("hr",{style:{width:"100%",height:"0.1rem",backgroundColor:u.palette.primary.notifyBorderColor,border:"none"}}),x.jsx(Co.ul,{style:{listStyle:"none",padding:"0rem 1rem 0.8rem 1rem",margin:0,opacity:d?1:0,visibility:d?"visible":"hidden",maxHeight:"10rem",overflowY:"auto",scrollbarWidth:"thin",scrollbarColor:`${u.palette.primary.notifyIconColor} transparent`},initial:{opacity:0},animate:{opacity:d?1:0},transition:{duration:.3,ease:"easeInOut"},children:r==null?void 0:r.map((w,R)=>x.jsxs("li",{style:{padding:"0.4rem",cursor:"pointer",fontSize:"1.1rem",color:u.palette.primary.notifyTextColor,backgroundColor:u.palette.primary.notifyBackground},onClick:()=>{g(w==null?void 0:w.label),!c&&p(!1),l(w)},children:[o&&x.jsx(ec,{size:"medium",sx:{color:u.palette.primary.notifyIconColor,"&.Mui-checked":{color:u.palette.brandColor.orange},p:"0.2rem 0.5rem"},onChange:()=>S(w)}),w==null?void 0:w.label]},R))}),n&&d&&x.jsxs(Co.div,{layout:!0,style:{display:"flex",flexDirection:"row",padding:"0.5rem 1rem",justifyContent:"space-between",borderTop:`0.1rem solid ${u.palette.primary.notifyBorderColor}`,position:"sticky",bottom:0,opacity:d?1:0,visibility:d?"visible":"hidden"},initial:{opacity:0},animate:{opacity:d?1:0},transition:{duration:.3,ease:"easeInOut"},children:[x.jsx(Co.button,{layout:!0,onClick:C,style:{textTransform:"none",padding:"0.4rem",background:"transparent",color:u.palette.primary.notifyTextColor,fontSize:"1.1rem",border:"none",cursor:"pointer"},children:"Apply"}),x.jsx(Co.button,{layout:!0,onClick:I,style:{textTransform:"none",padding:"0.4rem",background:"transparent",color:u.palette.primary.notifyTextColor,fontSize:"1.1rem",border:"none",cursor:"pointer"},children:"Cancel"})]})]})})})},sa={TOKEN:"token",USER:"user",SNOP:"snop",SELECTED_BU:"selected_business_unit"},Iv={BEARER:"Bearer",TENANT_ID:"tenant_id",BU_ID:"bu_id",SNOP_ID:"snop_id"},aa={REFRESH:"refresh",CLOSE:"close"},wk=Object.values({"SKU Name":"sku_name",Node:"node","Channel Name":"channel_name"}),Sv=[10,25,50,100],wv={MARK_ALL_READ:"MARK_ALL_READ"},Ak=Sv.map(e=>({label:e,value:e})),Av=({pagination:e})=>{const{selectedPage:t,rowPerPage:n,totalRecords:o,onPageChange:r,onPageSizeChange:s}=e,a=ht();return x.jsxs(be,{sx:{display:"flex",p:"1rem 2rem"},children:[x.jsxs(be,{sx:{zIndex:10,display:"flex",flexDirection:"row",gap:"0.5rem",width:"100%"},children:[x.jsx(be,{sx:{display:"flex",justifyContent:"center",alignItems:"center"},children:x.jsxs(Kt,{sx:{fontSize:"1.1rem",color:a.palette.primary.notifyActiveText},children:["Showing ",(t-1)*n+1," to"]})}),x.jsx(be,{sx:{display:"flex",flexDirection:"row",gap:"0.5rem",justifyContent:"space-between"},children:x.jsx(be,{sx:{display:"flex",flexDirection:"row",width:"5.5rem"},children:x.jsx(Bu,{options:Ak,handleSelectClick:s})})}),x.jsx(be,{sx:{display:"flex",justifyContent:"center",alignItems:"center"},children:x.jsxs(Kt,{sx:{fontSize:"1.1rem",color:a.palette.primary.notifyActiveText},children:["of ",o," records"]})})]}),x.jsx(pc,{count:Math.ceil(o/n),page:t,onChange:(c,l)=>{r(l)},shape:"rounded",sx:{width:"100%","& .MuiPagination-ul":{width:"100%",display:"flex",justifyContent:"flex-end","& li:first-of-type":{border:`0.1rem solid ${a.palette.primary.notifyBorderColor}`,color:a.palette.primary.notifyActiveText,marginRight:"1.5rem",borderRadius:"1rem",width:"3rem",height:"3rem",justifyContent:"center",alignItems:"center",display:"flex"},"& li:last-child":{border:`0.1rem solid ${a.palette.primary.notifyBorderColor}`,color:a.palette.primary.notifyActiveText,marginLeft:"1.5rem",borderRadius:"1rem",width:"3rem",height:"3rem",justifyContent:"center",alignItems:"center",display:"flex"}},"& .MuiPaginationItem-root":{color:"#595959",fontSize:"1.1rem",borderRadius:"1rem",width:"3rem",height:"3rem",justifyContent:"center",alignItems:"center",display:"flex","& .MuiSvgIcon-root":{fontSize:"2.2rem"}},"& .Mui-selected":{color:a.palette.primary.notifyActiveText,backgroundColor:a.palette.primary.notifyButtonBackground}}})]})};Av.propTypes={pagination:i.object.isRequired};const Rv=({menuOpen:e,handleClose:t,onHideClick:n})=>{const o=ht();return x.jsx(uc,{open:!!e,anchorEl:e,onClose:t,anchorOrigin:{vertical:"bottom",horizontal:"left"},children:x.jsx(be,{sx:{p:"0.4rem 1rem",backgroundColor:o.palette.primary.notifyBackground,border:`0.1rem solid ${o.palette.primary.notifyBorderColor}`,minHeight:"2.3rem",display:"flex",justifyContent:"center",alignItems:"center"},children:x.jsx(Ds,{onClick:n,sx:{textTransform:"none",fontSize:"1.1rem",p:0,minHeight:"unset",fontWeight:"500",color:o.palette.primary.notifyTextColor},children:"Hide Column"})})})};Rv.propTypes={menuOpen:i.object,handleClose:i.func,onHideClick:i.func};const Rk=(e,t)=>{const[n,o]=M.useState({isOpen:!1,column:null}),r=(c,l)=>{o({isOpen:c.currentTarget,column:l})},s=()=>{o({isOpen:!1,column:null})};return{selectedColumn:n,handleMenuClick:r,handleClose:s,handleHideClick:()=>{t({type:tt.SET_GRID_DATA,payload:{visibleGridColumns:e.map(c=>{var l;return c.key===((l=n==null?void 0:n.column)==null?void 0:l.key)?{...c,isHidden:!0}:c})}}),s()}}},Ok=Y(ii)(()=>({"&:last-child td":{borderBottom:0}}));function Fu({children:e,...t}){return x.jsx(Ok,{...t,children:e})}Fu.propTypes={children:i.node};const Pk=Y(e=>x.jsx(yc,{...e}))(({theme:e})=>({[`&.${vc.head}`]:{color:e.palette.primary.notifyTextColor,backgroundColor:e.palette.primary.notifyBackground,borderColor:e.palette.primary.notifyBorderColor,padding:"0.8rem 1rem",borderTopLeftRadius:"1.4rem",borderTopRightRadius:"1.4rem",textAlign:"center"},[`&.${vc.body}`]:{color:e.palette.primary.notifyTextColor,borderColor:e.palette.primary.notifyBorderColor,padding:"0.8rem 1rem",textAlign:"center"}}));function ju({children:e,...t}){return x.jsx(Pk,{...t,children:e})}ju.propTypes={children:i.node};function Ov({sort:e,data:t,pagination:n,columns:o}){const r=ht(),{visibleGridColumns:s}=M.useContext(Om),a=M.useContext(Tc),{selectedColumn:c,handleMenuClick:l,handleClose:u,handleHideClick:d}=Rk(s,a),p=o==null?void 0:o.isManageable;return x.jsxs(x.Fragment,{children:[x.jsx(gm,{sx:{maxHeight:"100%"},children:x.jsxs(gc,{stickyHeader:!0,sx:{backgroundColor:r.palette.primary.notifyBackground,border:`0.1rem solid ${r.palette.primary.notifyBorderColor}`,borderRadius:"1.4rem","& .MuiTableHead-root":{backgroundColor:r.palette.primary.notifyBackground}},children:[x.jsx(xc,{children:x.jsx(Fu,{children:s.map((h,g)=>{const m=h==null?void 0:h.isHidden,f=h==null?void 0:h.style;return m?null:x.jsx(ju,{style:f,children:x.jsx(Mm,{column:h,sort:e,handleMenuClick:l,isManageable:p})},g)})})}),x.jsx(bc,{children:t.map((h,g)=>x.jsx(Fu,{children:s.map((m,f)=>{const b=!!(m!=null&&m.cellRenderer);return(m==null?void 0:m.isHidden)?null:x.jsx(ju,{children:x.jsx(km,{isRenderCellContent:b,column:m,row:h},f)},f)})},g))})]})}),x.jsx(Av,{pagination:n}),x.jsx(Rv,{menuOpen:c==null?void 0:c.isOpen,handleClose:u,onHideClick:d})]})}Ov.propTypes={sort:i.object,data:i.array,pagination:i.object,columns:i.object};function Pv({tableProps:e}){const t=M.useContext(Tc),{columns:n}=e,o=YR({columns:n});return M.useEffect(()=>{t({type:tt.SET_GRID_DATA,payload:{visibleGridColumns:o}})},[o,t]),x.jsx(x.Fragment,{children:x.jsx(Ov,{...e})})}Pv.propTypes={tableProps:i.object.isRequired};const la=({styles:e,label:t,...n})=>{const o=ht();if(e!=null&&e.icon&&!t)return x.jsx($r,{disableRipple:!0,sx:{background:(e==null?void 0:e.variant)!=="outlined"?e==null?void 0:e.buttonBackground:o.palette.primary.notifyBackground,borderRadius:"0.7rem",border:(e==null?void 0:e.variant)=="outlined"?`0.1rem solid ${o.palette.primary.notifyBorderColor}`:"none",height:"3.2rem",padding:"1.5rem 1rem",display:"flex",justifyContent:"center",alignItems:"center"},...n,children:x.jsx(be,{component:"img",src:e==null?void 0:e.icon})});if(t)return x.jsx(Ds,{disableRipple:!0,sx:{background:(e==null?void 0:e.variant)!=="outlined"?e==null?void 0:e.buttonBackground:o.palette.primary.notifyBackground,borderRadius:"0.7rem",border:(e==null?void 0:e.variant)=="outlined"?`0.1rem solid ${o.palette.primary.notifyBorderColor}`:"none",height:"3.2rem",padding:"1.5rem",display:"flex",justifyContent:"center",textTransform:"none",alignItems:"center",gap:"0.5rem",color:(e==null?void 0:e.variant)=="outlined"?o.palette.primary.notifyActiveText:"white","&:hover":{backgroundColor:(e==null?void 0:e.variant)!=="outlined"?e==null?void 0:e.buttonBackground:o.palette.primary.notifyBackground,boxShadow:"none"}},startIcon:(e==null?void 0:e.iconPosition)==="start"&&x.jsx(be,{component:"img",src:e==null?void 0:e.icon}),endIcon:(e==null?void 0:e.iconPosition)==="end"&&x.jsx(be,{component:"img",src:e==null?void 0:e.icon}),...n,children:x.jsx(Kt,{sx:{fontSize:"1.1rem"},children:t})})},Nk=({...e})=>{const[t,n]=M.useState(!1),o=ht();return x.jsx(Co.input,{type:"text",onFocus:()=>n(!0),onBlur:()=>n(!1),initial:{width:150,borderRadius:"0.7rem"},animate:{width:t?180:150},transition:{duration:.3,ease:"easeInOut"},style:{height:"3rem",outline:"none",boxShadow:"none",border:`0.1rem solid ${o.palette.primary.notifyBorderColor}`,backgroundColor:o.palette.primary.notifyBackground,padding:"0rem 1rem",color:o.palette.primary.notifyTextColor,transition:"height 0.1s ease"},...e})},Mk=e=>x.jsx("div",{}),kk=({defaultTools:e,isManageable:t,customTools:n})=>{var o,r,s,a;return ht(),Co(la),M.useState(!1),x.jsxs(be,{sx:{margin:"1rem 0",position:"relative",zIndex:10,display:"flex",flexDirection:"row",gap:"0.5rem",width:"100%"},children:[x.jsxs(be,{sx:{display:"flex",flexDirection:"row",gap:"0.5rem"},children:[((o=e==null?void 0:e.search)==null?void 0:o.isRequired)&&x.jsx(Nk,{...e==null?void 0:e.search}),((r=e==null?void 0:e.refresh)==null?void 0:r.isRequired)&&x.jsx(la,{...e==null?void 0:e.refresh})]}),x.jsx(be,{sx:{display:"flex",flexDirection:"row",gap:"0.5rem",justifyContent:"space-between",flex:1,width:"27rem"},children:x.jsx(be,{sx:{display:"flex",flexDirection:"row",gap:"0.5rem"},children:t&&x.jsx(Bu,{})})}),x.jsxs(be,{sx:{display:"flex",flexDirection:"row",gap:"0.5rem"},children:[x.jsx(Mk,{...n}),((s=e==null?void 0:e.upload)==null?void 0:s.isRequired)&&x.jsx(la,{...e==null?void 0:e.upload}),((a=e==null?void 0:e.download)==null?void 0:a.isRequired)&&x.jsx(la,{...e==null?void 0:e.download})]})]})};function Nv({tableProps:e,toolbarProps:t}){const n=e.columns.isManageable;return x.jsxs(Pm,{children:[x.jsx(kk,{...t,isManageable:n}),x.jsx(Pv,{tableProps:e})]})}Nv.propTypes={tableProps:i.object.isRequired,toolbarProps:i.object.isRequired};const Vu=M.createContext(null),Mv=M.createContext(null);function Dk({children:e}){const[t,n]=M.useReducer(Bk,Fk);return x.jsx(Vu.Provider,{value:t,children:x.jsx(Mv.Provider,{value:n,children:e})})}function Bk(e,t){var n;switch(t.type){case tt.LOADING:return{...e,loading:t.loading};case tt.SUCCESS:return{...e,data:(n=t.data)==null?void 0:n.sort((o,r)=>new Date(r.createdAt)-new Date(o.createdAt))};case tt.MARK_ALL_AS_READ:return{...e,isMarkAllAsRead:t.isMarkAllAsRead};case tt.ERROR:return{...e,error:t.error};default:throw new Error(`${bn.UNHANDLED}: ${t}`)}}const Fk={loading:!1,data:[],error:"",isMarkAllAsRead:{count:0,boo:!1}};function kv(e,t){return function(){return e.apply(t,arguments)}}const{toString:jk}=Object.prototype,{getPrototypeOf:Lu}=Object,ca=(e=>t=>{const n=jk.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),hn=e=>(e=e.toLowerCase(),t=>ca(t)===e),ua=e=>t=>typeof t===e,{isArray:mr}=Array,Si=ua("undefined");function Vk(e){return e!==null&&!Si(e)&&e.constructor!==null&&!Si(e.constructor)&&sn(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Dv=hn("ArrayBuffer");function Lk(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Dv(e.buffer),t}const _k=ua("string"),sn=ua("function"),Bv=ua("number"),da=e=>e!==null&&typeof e=="object",$k=e=>e===!0||e===!1,pa=e=>{if(ca(e)!=="object")return!1;const t=Lu(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},Wk=hn("Date"),Gk=hn("File"),zk=hn("Blob"),Hk=hn("FileList"),Xk=e=>da(e)&&sn(e.pipe),Uk=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||sn(e.append)&&((t=ca(e))==="formdata"||t==="object"&&sn(e.toString)&&e.toString()==="[object FormData]"))},Zk=hn("URLSearchParams"),[Yk,Jk,qk,Kk]=["ReadableStream","Request","Response","Headers"].map(hn),Qk=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function wi(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let o,r;if(typeof e!="object"&&(e=[e]),mr(e))for(o=0,r=e.length;o<r;o++)t.call(null,e[o],o,e);else{const s=n?Object.getOwnPropertyNames(e):Object.keys(e),a=s.length;let c;for(o=0;o<a;o++)c=s[o],t.call(null,e[c],c,e)}}function Fv(e,t){t=t.toLowerCase();const n=Object.keys(e);let o=n.length,r;for(;o-- >0;)if(r=n[o],t===r.toLowerCase())return r;return null}const jv=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Vv=e=>!Si(e)&&e!==jv;function _u(){const{caseless:e}=Vv(this)&&this||{},t={},n=(o,r)=>{const s=e&&Fv(t,r)||r;pa(t[s])&&pa(o)?t[s]=_u(t[s],o):pa(o)?t[s]=_u({},o):mr(o)?t[s]=o.slice():t[s]=o};for(let o=0,r=arguments.length;o<r;o++)arguments[o]&&wi(arguments[o],n);return t}const eD=(e,t,n,{allOwnKeys:o}={})=>(wi(t,(r,s)=>{n&&sn(r)?e[s]=kv(r,n):e[s]=r},{allOwnKeys:o}),e),tD=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),nD=(e,t,n,o)=>{e.prototype=Object.create(t.prototype,o),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},oD=(e,t,n,o)=>{let r,s,a;const c={};if(t=t||{},e==null)return t;do{for(r=Object.getOwnPropertyNames(e),s=r.length;s-- >0;)a=r[s],(!o||o(a,e,t))&&!c[a]&&(t[a]=e[a],c[a]=!0);e=n!==!1&&Lu(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},rD=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const o=e.indexOf(t,n);return o!==-1&&o===n},iD=e=>{if(!e)return null;if(mr(e))return e;let t=e.length;if(!Bv(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},sD=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Lu(Uint8Array)),aD=(e,t)=>{const o=(e&&e[Symbol.iterator]).call(e);let r;for(;(r=o.next())&&!r.done;){const s=r.value;t.call(e,s[0],s[1])}},lD=(e,t)=>{let n;const o=[];for(;(n=e.exec(t))!==null;)o.push(n);return o},cD=hn("HTMLFormElement"),uD=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,o,r){return o.toUpperCase()+r}),Lv=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),dD=hn("RegExp"),_v=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),o={};wi(n,(r,s)=>{let a;(a=t(r,s,e))!==!1&&(o[s]=a||r)}),Object.defineProperties(e,o)},pD=e=>{_v(e,(t,n)=>{if(sn(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const o=e[n];if(sn(o)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},fD=(e,t)=>{const n={},o=r=>{r.forEach(s=>{n[s]=!0})};return mr(e)?o(e):o(String(e).split(t)),n},hD=()=>{},mD=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t,$u="abcdefghijklmnopqrstuvwxyz",$v="0123456789",Wv={DIGIT:$v,ALPHA:$u,ALPHA_DIGIT:$u+$u.toUpperCase()+$v},gD=(e=16,t=Wv.ALPHA_DIGIT)=>{let n="";const{length:o}=t;for(;e--;)n+=t[Math.random()*o|0];return n};function bD(e){return!!(e&&sn(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const vD=e=>{const t=new Array(10),n=(o,r)=>{if(da(o)){if(t.indexOf(o)>=0)return;if(!("toJSON"in o)){t[r]=o;const s=mr(o)?[]:{};return wi(o,(a,c)=>{const l=n(a,r+1);!Si(l)&&(s[c]=l)}),t[r]=void 0,s}}return o};return n(e,0)},yD=hn("AsyncFunction"),W={isArray:mr,isArrayBuffer:Dv,isBuffer:Vk,isFormData:Uk,isArrayBufferView:Lk,isString:_k,isNumber:Bv,isBoolean:$k,isObject:da,isPlainObject:pa,isReadableStream:Yk,isRequest:Jk,isResponse:qk,isHeaders:Kk,isUndefined:Si,isDate:Wk,isFile:Gk,isBlob:zk,isRegExp:dD,isFunction:sn,isStream:Xk,isURLSearchParams:Zk,isTypedArray:sD,isFileList:Hk,forEach:wi,merge:_u,extend:eD,trim:Qk,stripBOM:tD,inherits:nD,toFlatObject:oD,kindOf:ca,kindOfTest:hn,endsWith:rD,toArray:iD,forEachEntry:aD,matchAll:lD,isHTMLForm:cD,hasOwnProperty:Lv,hasOwnProp:Lv,reduceDescriptors:_v,freezeMethods:pD,toObjectSet:fD,toCamelCase:uD,noop:hD,toFiniteNumber:mD,findKey:Fv,global:jv,isContextDefined:Vv,ALPHABET:Wv,generateString:gD,isSpecCompliantForm:bD,toJSONObject:vD,isAsyncFn:yD,isThenable:e=>e&&(da(e)||sn(e))&&sn(e.then)&&sn(e.catch)};function we(e,t,n,o,r){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),o&&(this.request=o),r&&(this.response=r)}W.inherits(we,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:W.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const Gv=we.prototype,zv={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{zv[e]={value:e}}),Object.defineProperties(we,zv),Object.defineProperty(Gv,"isAxiosError",{value:!0}),we.from=(e,t,n,o,r,s)=>{const a=Object.create(Gv);return W.toFlatObject(e,a,function(l){return l!==Error.prototype},c=>c!=="isAxiosError"),we.call(a,e.message,t,n,o,r),a.cause=e,a.name=e.name,s&&Object.assign(a,s),a};const xD=null;function Wu(e){return W.isPlainObject(e)||W.isArray(e)}function Hv(e){return W.endsWith(e,"[]")?e.slice(0,-2):e}function Xv(e,t,n){return e?e.concat(t).map(function(r,s){return r=Hv(r),!n&&s?"["+r+"]":r}).join(n?".":""):t}function CD(e){return W.isArray(e)&&!e.some(Wu)}const TD=W.toFlatObject(W,{},null,function(t){return/^is[A-Z]/.test(t)});function fa(e,t,n){if(!W.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=W.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(f,b){return!W.isUndefined(b[f])});const o=n.metaTokens,r=n.visitor||d,s=n.dots,a=n.indexes,l=(n.Blob||typeof Blob<"u"&&Blob)&&W.isSpecCompliantForm(t);if(!W.isFunction(r))throw new TypeError("visitor must be a function");function u(m){if(m===null)return"";if(W.isDate(m))return m.toISOString();if(!l&&W.isBlob(m))throw new we("Blob is not supported. Use a Buffer instead.");return W.isArrayBuffer(m)||W.isTypedArray(m)?l&&typeof Blob=="function"?new Blob([m]):Buffer.from(m):m}function d(m,f,b){let v=m;if(m&&!b&&typeof m=="object"){if(W.endsWith(f,"{}"))f=o?f:f.slice(0,-2),m=JSON.stringify(m);else if(W.isArray(m)&&CD(m)||(W.isFileList(m)||W.endsWith(f,"[]"))&&(v=W.toArray(m)))return f=Hv(f),v.forEach(function(C,I){!(W.isUndefined(C)||C===null)&&t.append(a===!0?Xv([f],I,s):a===null?f:f+"[]",u(C))}),!1}return Wu(m)?!0:(t.append(Xv(b,f,s),u(m)),!1)}const p=[],h=Object.assign(TD,{defaultVisitor:d,convertValue:u,isVisitable:Wu});function g(m,f){if(!W.isUndefined(m)){if(p.indexOf(m)!==-1)throw Error("Circular reference detected in "+f.join("."));p.push(m),W.forEach(m,function(v,S){(!(W.isUndefined(v)||v===null)&&r.call(t,v,W.isString(S)?S.trim():S,f,h))===!0&&g(v,f?f.concat(S):[S])}),p.pop()}}if(!W.isObject(e))throw new TypeError("data must be an object");return g(e),t}function Uv(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(o){return t[o]})}function Gu(e,t){this._pairs=[],e&&fa(e,this,t)}const Zv=Gu.prototype;Zv.append=function(t,n){this._pairs.push([t,n])},Zv.toString=function(t){const n=t?function(o){return t.call(this,o,Uv)}:Uv;return this._pairs.map(function(r){return n(r[0])+"="+n(r[1])},"").join("&")};function ED(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Yv(e,t,n){if(!t)return e;const o=n&&n.encode||ED,r=n&&n.serialize;let s;if(r?s=r(t,n):s=W.isURLSearchParams(t)?t.toString():new Gu(t,n).toString(o),s){const a=e.indexOf("#");a!==-1&&(e=e.slice(0,a)),e+=(e.indexOf("?")===-1?"?":"&")+s}return e}class Jv{constructor(){this.handlers=[]}use(t,n,o){return this.handlers.push({fulfilled:t,rejected:n,synchronous:o?o.synchronous:!1,runWhen:o?o.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){W.forEach(this.handlers,function(o){o!==null&&t(o)})}}const qv={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},ID={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:Gu,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},zu=typeof window<"u"&&typeof document<"u",SD=(e=>zu&&["ReactNative","NativeScript","NS"].indexOf(e)<0)(typeof navigator<"u"&&navigator.product),wD=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",AD=zu&&window.location.href||"http://localhost",mn={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:zu,hasStandardBrowserEnv:SD,hasStandardBrowserWebWorkerEnv:wD,origin:AD},Symbol.toStringTag,{value:"Module"})),...ID};function RD(e,t){return fa(e,new mn.classes.URLSearchParams,Object.assign({visitor:function(n,o,r,s){return mn.isNode&&W.isBuffer(n)?(this.append(o,n.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)}},t))}function OD(e){return W.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function PD(e){const t={},n=Object.keys(e);let o;const r=n.length;let s;for(o=0;o<r;o++)s=n[o],t[s]=e[s];return t}function Kv(e){function t(n,o,r,s){let a=n[s++];if(a==="__proto__")return!0;const c=Number.isFinite(+a),l=s>=n.length;return a=!a&&W.isArray(r)?r.length:a,l?(W.hasOwnProp(r,a)?r[a]=[r[a],o]:r[a]=o,!c):((!r[a]||!W.isObject(r[a]))&&(r[a]=[]),t(n,o,r[a],s)&&W.isArray(r[a])&&(r[a]=PD(r[a])),!c)}if(W.isFormData(e)&&W.isFunction(e.entries)){const n={};return W.forEachEntry(e,(o,r)=>{t(OD(o),r,n,0)}),n}return null}function ND(e,t,n){if(W.isString(e))try{return(t||JSON.parse)(e),W.trim(e)}catch(o){if(o.name!=="SyntaxError")throw o}return(n||JSON.stringify)(e)}const Ai={transitional:qv,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const o=n.getContentType()||"",r=o.indexOf("application/json")>-1,s=W.isObject(t);if(s&&W.isHTMLForm(t)&&(t=new FormData(t)),W.isFormData(t))return r?JSON.stringify(Kv(t)):t;if(W.isArrayBuffer(t)||W.isBuffer(t)||W.isStream(t)||W.isFile(t)||W.isBlob(t)||W.isReadableStream(t))return t;if(W.isArrayBufferView(t))return t.buffer;if(W.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let c;if(s){if(o.indexOf("application/x-www-form-urlencoded")>-1)return RD(t,this.formSerializer).toString();if((c=W.isFileList(t))||o.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return fa(c?{"files[]":t}:t,l&&new l,this.formSerializer)}}return s||r?(n.setContentType("application/json",!1),ND(t)):t}],transformResponse:[function(t){const n=this.transitional||Ai.transitional,o=n&&n.forcedJSONParsing,r=this.responseType==="json";if(W.isResponse(t)||W.isReadableStream(t))return t;if(t&&W.isString(t)&&(o&&!this.responseType||r)){const a=!(n&&n.silentJSONParsing)&&r;try{return JSON.parse(t)}catch(c){if(a)throw c.name==="SyntaxError"?we.from(c,we.ERR_BAD_RESPONSE,this,null,this.response):c}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:mn.classes.FormData,Blob:mn.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};W.forEach(["delete","get","head","post","put","patch"],e=>{Ai.headers[e]={}});const MD=W.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),kD=e=>{const t={};let n,o,r;return e&&e.split(`
|
|
239
239
|
`).forEach(function(a){r=a.indexOf(":"),n=a.substring(0,r).trim().toLowerCase(),o=a.substring(r+1).trim(),!(!n||t[n]&&MD[n])&&(n==="set-cookie"?t[n]?t[n].push(o):t[n]=[o]:t[n]=t[n]?t[n]+", "+o:o)}),t},Qv=Symbol("internals");function Ri(e){return e&&String(e).trim().toLowerCase()}function ha(e){return e===!1||e==null?e:W.isArray(e)?e.map(ha):String(e)}function DD(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let o;for(;o=n.exec(e);)t[o[1]]=o[2];return t}const BD=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Hu(e,t,n,o,r){if(W.isFunction(o))return o.call(this,t,n);if(r&&(t=n),!!W.isString(t)){if(W.isString(o))return t.indexOf(o)!==-1;if(W.isRegExp(o))return o.test(t)}}function FD(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,o)=>n.toUpperCase()+o)}function jD(e,t){const n=W.toCamelCase(" "+t);["get","set","has"].forEach(o=>{Object.defineProperty(e,o+n,{value:function(r,s,a){return this[o].call(this,t,r,s,a)},configurable:!0})})}class _t{constructor(t){t&&this.set(t)}set(t,n,o){const r=this;function s(c,l,u){const d=Ri(l);if(!d)throw new Error("header name must be a non-empty string");const p=W.findKey(r,d);(!p||r[p]===void 0||u===!0||u===void 0&&r[p]!==!1)&&(r[p||l]=ha(c))}const a=(c,l)=>W.forEach(c,(u,d)=>s(u,d,l));if(W.isPlainObject(t)||t instanceof this.constructor)a(t,n);else if(W.isString(t)&&(t=t.trim())&&!BD(t))a(kD(t),n);else if(W.isHeaders(t))for(const[c,l]of t.entries())s(l,c,o);else t!=null&&s(n,t,o);return this}get(t,n){if(t=Ri(t),t){const o=W.findKey(this,t);if(o){const r=this[o];if(!n)return r;if(n===!0)return DD(r);if(W.isFunction(n))return n.call(this,r,o);if(W.isRegExp(n))return n.exec(r);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Ri(t),t){const o=W.findKey(this,t);return!!(o&&this[o]!==void 0&&(!n||Hu(this,this[o],o,n)))}return!1}delete(t,n){const o=this;let r=!1;function s(a){if(a=Ri(a),a){const c=W.findKey(o,a);c&&(!n||Hu(o,o[c],c,n))&&(delete o[c],r=!0)}}return W.isArray(t)?t.forEach(s):s(t),r}clear(t){const n=Object.keys(this);let o=n.length,r=!1;for(;o--;){const s=n[o];(!t||Hu(this,this[s],s,t,!0))&&(delete this[s],r=!0)}return r}normalize(t){const n=this,o={};return W.forEach(this,(r,s)=>{const a=W.findKey(o,s);if(a){n[a]=ha(r),delete n[s];return}const c=t?FD(s):String(s).trim();c!==s&&delete n[s],n[c]=ha(r),o[c]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return W.forEach(this,(o,r)=>{o!=null&&o!==!1&&(n[r]=t&&W.isArray(o)?o.join(", "):o)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
|
|
240
240
|
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const o=new this(t);return n.forEach(r=>o.set(r)),o}static accessor(t){const o=(this[Qv]=this[Qv]={accessors:{}}).accessors,r=this.prototype;function s(a){const c=Ri(a);o[c]||(jD(r,a),o[c]=!0)}return W.isArray(t)?t.forEach(s):s(t),this}}_t.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),W.reduceDescriptors(_t.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(o){this[n]=o}}}),W.freezeMethods(_t);function Xu(e,t){const n=this||Ai,o=t||n,r=_t.from(o.headers);let s=o.data;return W.forEach(e,function(c){s=c.call(n,s,r.normalize(),t?t.status:void 0)}),r.normalize(),s}function e0(e){return!!(e&&e.__CANCEL__)}function gr(e,t,n){we.call(this,e??"canceled",we.ERR_CANCELED,t,n),this.name="CanceledError"}W.inherits(gr,we,{__CANCEL__:!0});function t0(e,t,n){const o=n.config.validateStatus;!n.status||!o||o(n.status)?e(n):t(new we("Request failed with status code "+n.status,[we.ERR_BAD_REQUEST,we.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function VD(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function LD(e,t){e=e||10;const n=new Array(e),o=new Array(e);let r=0,s=0,a;return t=t!==void 0?t:1e3,function(l){const u=Date.now(),d=o[s];a||(a=u),n[r]=l,o[r]=u;let p=s,h=0;for(;p!==r;)h+=n[p++],p=p%e;if(r=(r+1)%e,r===s&&(s=(s+1)%e),u-a<t)return;const g=d&&u-d;return g?Math.round(h*1e3/g):void 0}}function _D(e,t){let n=0;const o=1e3/t;let r=null;return function(){const a=this===!0,c=Date.now();if(a||c-n>o)return r&&(clearTimeout(r),r=null),n=c,e.apply(null,arguments);r||(r=setTimeout(()=>(r=null,n=Date.now(),e.apply(null,arguments)),o-(c-n)))}}const ma=(e,t,n=3)=>{let o=0;const r=LD(50,250);return _D(s=>{const a=s.loaded,c=s.lengthComputable?s.total:void 0,l=a-o,u=r(l),d=a<=c;o=a;const p={loaded:a,total:c,progress:c?a/c:void 0,bytes:l,rate:u||void 0,estimated:u&&c&&d?(c-a)/u:void 0,event:s,lengthComputable:c!=null};p[t?"download":"upload"]=!0,e(p)},n)},$D=mn.hasStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let o;function r(s){let a=s;return t&&(n.setAttribute("href",a),a=n.href),n.setAttribute("href",a),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return o=r(window.location.href),function(a){const c=W.isString(a)?r(a):a;return c.protocol===o.protocol&&c.host===o.host}}():function(){return function(){return!0}}(),WD=mn.hasStandardBrowserEnv?{write(e,t,n,o,r,s){const a=[e+"="+encodeURIComponent(t)];W.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),W.isString(o)&&a.push("path="+o),W.isString(r)&&a.push("domain="+r),s===!0&&a.push("secure"),document.cookie=a.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function GD(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function zD(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function n0(e,t){return e&&!GD(t)?zD(e,t):t}const o0=e=>e instanceof _t?{...e}:e;function To(e,t){t=t||{};const n={};function o(u,d,p){return W.isPlainObject(u)&&W.isPlainObject(d)?W.merge.call({caseless:p},u,d):W.isPlainObject(d)?W.merge({},d):W.isArray(d)?d.slice():d}function r(u,d,p){if(W.isUndefined(d)){if(!W.isUndefined(u))return o(void 0,u,p)}else return o(u,d,p)}function s(u,d){if(!W.isUndefined(d))return o(void 0,d)}function a(u,d){if(W.isUndefined(d)){if(!W.isUndefined(u))return o(void 0,u)}else return o(void 0,d)}function c(u,d,p){if(p in t)return o(u,d);if(p in e)return o(void 0,u)}const l={url:s,method:s,data:s,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:c,headers:(u,d)=>r(o0(u),o0(d),!0)};return W.forEach(Object.keys(Object.assign({},e,t)),function(d){const p=l[d]||r,h=p(e[d],t[d],d);W.isUndefined(h)&&p!==c||(n[d]=h)}),n}const r0=e=>{const t=To({},e);let{data:n,withXSRFToken:o,xsrfHeaderName:r,xsrfCookieName:s,headers:a,auth:c}=t;t.headers=a=_t.from(a),t.url=Yv(n0(t.baseURL,t.url),e.params,e.paramsSerializer),c&&a.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):"")));let l;if(W.isFormData(n)){if(mn.hasStandardBrowserEnv||mn.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if((l=a.getContentType())!==!1){const[u,...d]=l?l.split(";").map(p=>p.trim()).filter(Boolean):[];a.setContentType([u||"multipart/form-data",...d].join("; "))}}if(mn.hasStandardBrowserEnv&&(o&&W.isFunction(o)&&(o=o(t)),o||o!==!1&&$D(t.url))){const u=r&&s&&WD.read(s);u&&a.set(r,u)}return t},HD=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(n,o){const r=r0(e);let s=r.data;const a=_t.from(r.headers).normalize();let{responseType:c}=r,l;function u(){r.cancelToken&&r.cancelToken.unsubscribe(l),r.signal&&r.signal.removeEventListener("abort",l)}let d=new XMLHttpRequest;d.open(r.method.toUpperCase(),r.url,!0),d.timeout=r.timeout;function p(){if(!d)return;const g=_t.from("getAllResponseHeaders"in d&&d.getAllResponseHeaders()),f={data:!c||c==="text"||c==="json"?d.responseText:d.response,status:d.status,statusText:d.statusText,headers:g,config:e,request:d};t0(function(v){n(v),u()},function(v){o(v),u()},f),d=null}"onloadend"in d?d.onloadend=p:d.onreadystatechange=function(){!d||d.readyState!==4||d.status===0&&!(d.responseURL&&d.responseURL.indexOf("file:")===0)||setTimeout(p)},d.onabort=function(){d&&(o(new we("Request aborted",we.ECONNABORTED,r,d)),d=null)},d.onerror=function(){o(new we("Network Error",we.ERR_NETWORK,r,d)),d=null},d.ontimeout=function(){let m=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const f=r.transitional||qv;r.timeoutErrorMessage&&(m=r.timeoutErrorMessage),o(new we(m,f.clarifyTimeoutError?we.ETIMEDOUT:we.ECONNABORTED,r,d)),d=null},s===void 0&&a.setContentType(null),"setRequestHeader"in d&&W.forEach(a.toJSON(),function(m,f){d.setRequestHeader(f,m)}),W.isUndefined(r.withCredentials)||(d.withCredentials=!!r.withCredentials),c&&c!=="json"&&(d.responseType=r.responseType),typeof r.onDownloadProgress=="function"&&d.addEventListener("progress",ma(r.onDownloadProgress,!0)),typeof r.onUploadProgress=="function"&&d.upload&&d.upload.addEventListener("progress",ma(r.onUploadProgress)),(r.cancelToken||r.signal)&&(l=g=>{d&&(o(!g||g.type?new gr(null,e,d):g),d.abort(),d=null)},r.cancelToken&&r.cancelToken.subscribe(l),r.signal&&(r.signal.aborted?l():r.signal.addEventListener("abort",l)));const h=VD(r.url);if(h&&mn.protocols.indexOf(h)===-1){o(new we("Unsupported protocol "+h+":",we.ERR_BAD_REQUEST,e));return}d.send(s||null)})},XD=(e,t)=>{let n=new AbortController,o;const r=function(l){if(!o){o=!0,a();const u=l instanceof Error?l:this.reason;n.abort(u instanceof we?u:new gr(u instanceof Error?u.message:u))}};let s=t&&setTimeout(()=>{r(new we(`timeout ${t} of ms exceeded`,we.ETIMEDOUT))},t);const a=()=>{e&&(s&&clearTimeout(s),s=null,e.forEach(l=>{l&&(l.removeEventListener?l.removeEventListener("abort",r):l.unsubscribe(r))}),e=null)};e.forEach(l=>l&&l.addEventListener&&l.addEventListener("abort",r));const{signal:c}=n;return c.unsubscribe=a,[c,()=>{s&&clearTimeout(s),s=null}]},UD=function*(e,t){let n=e.byteLength;if(!t||n<t){yield e;return}let o=0,r;for(;o<n;)r=o+t,yield e.slice(o,r),o=r},ZD=async function*(e,t,n){for await(const o of e)yield*UD(ArrayBuffer.isView(o)?o:await n(String(o)),t)},i0=(e,t,n,o,r)=>{const s=ZD(e,t,r);let a=0;return new ReadableStream({type:"bytes",async pull(c){const{done:l,value:u}=await s.next();if(l){c.close(),o();return}let d=u.byteLength;n&&n(a+=d),c.enqueue(new Uint8Array(u))},cancel(c){return o(c),s.return()}},{highWaterMark:2})},s0=(e,t)=>{const n=e!=null;return o=>setTimeout(()=>t({lengthComputable:n,total:e,loaded:o}))},ga=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",a0=ga&&typeof ReadableStream=="function",Uu=ga&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),YD=a0&&(()=>{let e=!1;const t=new Request(mn.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t})(),l0=64*1024,Zu=a0&&!!(()=>{try{return W.isReadableStream(new Response("").body)}catch{}})(),ba={stream:Zu&&(e=>e.body)};ga&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!ba[t]&&(ba[t]=W.isFunction(e[t])?n=>n[t]():(n,o)=>{throw new we(`Response type '${t}' is not supported`,we.ERR_NOT_SUPPORT,o)})})})(new Response);const JD=async e=>{if(e==null)return 0;if(W.isBlob(e))return e.size;if(W.isSpecCompliantForm(e))return(await new Request(e).arrayBuffer()).byteLength;if(W.isArrayBufferView(e))return e.byteLength;if(W.isURLSearchParams(e)&&(e=e+""),W.isString(e))return(await Uu(e)).byteLength},qD=async(e,t)=>{const n=W.toFiniteNumber(e.getContentLength());return n??JD(t)},Yu={http:xD,xhr:HD,fetch:ga&&(async e=>{let{url:t,method:n,data:o,signal:r,cancelToken:s,timeout:a,onDownloadProgress:c,onUploadProgress:l,responseType:u,headers:d,withCredentials:p="same-origin",fetchOptions:h}=r0(e);u=u?(u+"").toLowerCase():"text";let[g,m]=r||s||a?XD([r,s],a):[],f,b;const v=()=>{!f&&setTimeout(()=>{g&&g.unsubscribe()}),f=!0};let S;try{if(l&&YD&&n!=="get"&&n!=="head"&&(S=await qD(d,o))!==0){let A=new Request(t,{method:"POST",body:o,duplex:"half"}),w;W.isFormData(o)&&(w=A.headers.get("content-type"))&&d.setContentType(w),A.body&&(o=i0(A.body,l0,s0(S,ma(l)),null,Uu))}W.isString(p)||(p=p?"cors":"omit"),b=new Request(t,{...h,signal:g,method:n.toUpperCase(),headers:d.normalize().toJSON(),body:o,duplex:"half",withCredentials:p});let C=await fetch(b);const I=Zu&&(u==="stream"||u==="response");if(Zu&&(c||I)){const A={};["status","statusText","headers"].forEach(R=>{A[R]=C[R]});const w=W.toFiniteNumber(C.headers.get("content-length"));C=new Response(i0(C.body,l0,c&&s0(w,ma(c,!0)),I&&v,Uu),A)}u=u||"text";let y=await ba[W.findKey(ba,u)||"text"](C,e);return!I&&v(),m&&m(),await new Promise((A,w)=>{t0(A,w,{data:y,headers:_t.from(C.headers),status:C.status,statusText:C.statusText,config:e,request:b})})}catch(C){throw v(),C&&C.name==="TypeError"&&/fetch/i.test(C.message)?Object.assign(new we("Network Error",we.ERR_NETWORK,e,b),{cause:C.cause||C}):we.from(C,C&&C.code,e,b)}})};W.forEach(Yu,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const c0=e=>`- ${e}`,KD=e=>W.isFunction(e)||e===null||e===!1,u0={getAdapter:e=>{e=W.isArray(e)?e:[e];const{length:t}=e;let n,o;const r={};for(let s=0;s<t;s++){n=e[s];let a;if(o=n,!KD(n)&&(o=Yu[(a=String(n)).toLowerCase()],o===void 0))throw new we(`Unknown adapter '${a}'`);if(o)break;r[a||"#"+s]=o}if(!o){const s=Object.entries(r).map(([c,l])=>`adapter ${c} `+(l===!1?"is not supported by the environment":"is not available in the build"));let a=t?s.length>1?`since :
|
|
241
241
|
`+s.map(c0).join(`
|