diff --git a/wger/core/static/react/main.js b/wger/core/static/react/main.js index b566489f5..a835fc29c 100644 --- a/wger/core/static/react/main.js +++ b/wger/core/static/react/main.js @@ -1,4 +1,4 @@ -var Vwe=Object.defineProperty;var o4=e=>{throw TypeError(e)};var Hwe=(e,t,n)=>t in e?Vwe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Uwe=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Tt=(e,t,n)=>Hwe(e,typeof t!="symbol"?t+"":t,n),y$=(e,t,n)=>t.has(e)||o4("Cannot "+n);var be=(e,t,n)=>(y$(e,t,"read from private field"),n?n.call(e):t.get(e)),qt=(e,t,n)=>t.has(e)?o4("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Ct=(e,t,n,r)=>(y$(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),xn=(e,t,n)=>(y$(e,t,"access private method"),n);var mE=(e,t,n,r)=>({set _(o){Ct(e,t,o,n)},get _(){return be(e,t,r)}});var $5t=Uwe((ds,fs)=>{function MJ(e,t){for(var n=0;nr[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const i of o)if(i.type==="childList")for(const a of i.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(o){const i={};return o.integrity&&(i.integrity=o.integrity),o.referrerPolicy&&(i.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?i.credentials="include":o.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(o){if(o.ep)return;o.ep=!0;const i=n(o);fetch(o.href,i)}})();var ea=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Bn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var RJ={exports:{}},JO={},$J={exports:{}},Rn={};/** +var Xwe=Object.defineProperty;var l4=e=>{throw TypeError(e)};var Jwe=(e,t,n)=>t in e?Xwe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Zwe=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var mt=(e,t,n)=>Jwe(e,typeof t!="symbol"?t+"":t,n),C$=(e,t,n)=>t.has(e)||l4("Cannot "+n);var be=(e,t,n)=>(C$(e,t,"read from private field"),n?n.call(e):t.get(e)),qt=(e,t,n)=>t.has(e)?l4("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Pt=(e,t,n,r)=>(C$(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),xn=(e,t,n)=>(C$(e,t,"access private method"),n);var IE=(e,t,n,r)=>({set _(o){Pt(e,t,o,n)},get _(){return be(e,t,r)}});var mUt=Zwe((ps,hs)=>{function NJ(e,t){for(var n=0;nr[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const i of o)if(i.type==="childList")for(const a of i.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(o){const i={};return o.integrity&&(i.integrity=o.integrity),o.referrerPolicy&&(i.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?i.credentials="include":o.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(o){if(o.ep)return;o.ep=!0;const i=n(o);fetch(o.href,i)}})();var ea=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Bn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var LJ={exports:{}},uA={},FJ={exports:{}},Dn={};/** * @license React * react.production.min.js * @@ -6,7 +6,7 @@ var Vwe=Object.defineProperty;var o4=e=>{throw TypeError(e)};var Hwe=(e,t,n)=>t * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var mC=Symbol.for("react.element"),Wwe=Symbol.for("react.portal"),Gwe=Symbol.for("react.fragment"),qwe=Symbol.for("react.strict_mode"),Kwe=Symbol.for("react.profiler"),Ywe=Symbol.for("react.provider"),Qwe=Symbol.for("react.context"),Xwe=Symbol.for("react.forward_ref"),Jwe=Symbol.for("react.suspense"),Zwe=Symbol.for("react.memo"),exe=Symbol.for("react.lazy"),i4=Symbol.iterator;function txe(e){return e===null||typeof e!="object"?null:(e=i4&&e[i4]||e["@@iterator"],typeof e=="function"?e:null)}var DJ={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_J=Object.assign,NJ={};function yb(e,t,n){this.props=e,this.context=t,this.refs=NJ,this.updater=n||DJ}yb.prototype.isReactComponent={};yb.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};yb.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function LJ(){}LJ.prototype=yb.prototype;function gj(e,t,n){this.props=e,this.context=t,this.refs=NJ,this.updater=n||DJ}var mj=gj.prototype=new LJ;mj.constructor=gj;_J(mj,yb.prototype);mj.isPureReactComponent=!0;var a4=Array.isArray,FJ=Object.prototype.hasOwnProperty,yj={current:null},jJ={key:!0,ref:!0,__self:!0,__source:!0};function BJ(e,t,n){var r,o={},i=null,a=null;if(t!=null)for(r in t.ref!==void 0&&(a=t.ref),t.key!==void 0&&(i=""+t.key),t)FJ.call(t,r)&&!jJ.hasOwnProperty(r)&&(o[r]=t[r]);var s=arguments.length-2;if(s===1)o.children=n;else if(1{throw TypeError(e)};var Hwe=(e,t,n)=>t * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var axe=v,sxe=Symbol.for("react.element"),lxe=Symbol.for("react.fragment"),cxe=Object.prototype.hasOwnProperty,uxe=axe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,dxe={key:!0,ref:!0,__self:!0,__source:!0};function VJ(e,t,n){var r,o={},i=null,a=null;n!==void 0&&(i=""+n),t.key!==void 0&&(i=""+t.key),t.ref!==void 0&&(a=t.ref);for(r in t)cxe.call(t,r)&&!dxe.hasOwnProperty(r)&&(o[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)o[r]===void 0&&(o[r]=t[r]);return{$$typeof:sxe,type:e,key:i,ref:a,props:o,_owner:uxe.current}}JO.Fragment=lxe;JO.jsx=VJ;JO.jsxs=VJ;RJ.exports=JO;var R=RJ.exports,fxe=!1;function pxe(e){if(e.sheet)return e.sheet;for(var t=0;t0?pi(vb,--_a):0,hv--,Eo===10&&(hv=1,eA--),Eo}function ps(){return Eo=_a2||Rx(Eo)>3?"":" "}function Txe(e,t){for(;--t&&ps()&&!(Eo<48||Eo>102||Eo>57&&Eo<65||Eo>70&&Eo<97););return yC(e,$P()+(t<6&&ou()==32&&ps()==32))}function z_(e){for(;ps();)switch(Eo){case e:return _a;case 34:case 39:e!==34&&e!==39&&z_(Eo);break;case 40:e===41&&z_(e);break;case 92:ps();break}return _a}function Ixe(e,t){for(;ps()&&e+Eo!==57;)if(e+Eo===84&&ou()===47)break;return"/*"+yC(t,_a-1)+"*"+ZO(e===47?e:ps())}function Oxe(e){for(;!Rx(ou());)ps();return yC(e,_a)}function Axe(e){return KJ(_P("",null,null,null,[""],e=qJ(e),0,[0],e))}function _P(e,t,n,r,o,i,a,s,l){for(var c=0,u=0,d=a,f=0,p=0,h=0,m=1,y=1,w=1,x=0,C="",E=o,P=i,T=r,I=C;y;)switch(h=x,x=ps()){case 40:if(h!=108&&pi(I,d-1)==58){B_(I+=rr(DP(x),"&","&\f"),"&\f")!=-1&&(w=-1);break}case 34:case 39:case 91:I+=DP(x);break;case 9:case 10:case 13:case 32:I+=Pxe(h);break;case 92:I+=Txe($P()-1,7);continue;case 47:switch(ou()){case 42:case 47:vE(kxe(Ixe(ps(),$P()),t,n),l);break;default:I+="/"}break;case 123*m:s[c++]=Qc(I)*w;case 125*m:case 59:case 0:switch(x){case 0:case 125:y=0;case 59+u:w==-1&&(I=rr(I,/\f/g,"")),p>0&&Qc(I)-d&&vE(p>32?c4(I+";",r,n,d-1):c4(rr(I," ","")+";",r,n,d-2),l);break;case 59:I+=";";default:if(vE(T=l4(I,t,n,c,u,o,s,C,E=[],P=[],d),i),x===123)if(u===0)_P(I,t,T,T,E,i,d,s,P);else switch(f===99&&pi(I,3)===110?100:f){case 100:case 108:case 109:case 115:_P(e,T,T,r&&vE(l4(e,T,T,0,0,o,s,C,o,E=[],d),P),o,P,d,s,r?E:P);break;default:_P(I,T,T,T,[""],P,0,s,P)}}c=u=p=0,m=w=1,C=I="",d=a;break;case 58:d=1+Qc(I),p=h;default:if(m<1){if(x==123)--m;else if(x==125&&m++==0&&Exe()==125)continue}switch(I+=ZO(x),x*m){case 38:w=u>0?1:(I+="\f",-1);break;case 44:s[c++]=(Qc(I)-1)*w,w=1;break;case 64:ou()===45&&(I+=DP(ps())),f=ou(),u=d=Qc(C=I+=Oxe($P())),x++;break;case 45:h===45&&Qc(I)==2&&(m=0)}}return i}function l4(e,t,n,r,o,i,a,s,l,c,u){for(var d=o-1,f=o===0?i:[""],p=xj(f),h=0,m=0,y=0;h0?f[w]+" "+x:rr(x,/&\f/g,f[w])))&&(l[y++]=C);return tA(e,t,n,o===0?bj:s,l,c,u)}function kxe(e,t,n){return tA(e,t,n,HJ,ZO(Cxe()),Mx(e,2,-2),0)}function c4(e,t,n,r){return tA(e,t,n,wj,Mx(e,0,r),Mx(e,r+1,-1),r)}function Ay(e,t){for(var n="",r=xj(e),o=0;o6)switch(pi(e,t+1)){case 109:if(pi(e,t+4)!==45)break;case 102:return rr(e,/(.+:)(.+)-([^]+)/,"$1"+nr+"$2-$3$1"+gT+(pi(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~B_(e,"stretch")?QJ(rr(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(pi(e,t+1)!==115)break;case 6444:switch(pi(e,Qc(e)-3-(~B_(e,"!important")&&10))){case 107:return rr(e,":",":"+nr)+e;case 101:return rr(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+nr+(pi(e,14)===45?"inline-":"")+"box$3$1"+nr+"$2$3$1"+Ti+"$2box$3")+e}break;case 5936:switch(pi(e,t+11)){case 114:return nr+e+Ti+rr(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return nr+e+Ti+rr(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return nr+e+Ti+rr(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return nr+e+Ti+e+e}return e}var jxe=function(t,n,r,o){if(t.length>-1&&!t.return)switch(t.type){case wj:t.return=QJ(t.value,t.length);break;case UJ:return Ay([j0(t,{value:rr(t.value,"@","@"+nr)})],o);case bj:if(t.length)return Sxe(t.props,function(i){switch(xxe(i,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Ay([j0(t,{props:[rr(i,/:(read-\w+)/,":"+gT+"$1")]})],o);case"::placeholder":return Ay([j0(t,{props:[rr(i,/:(plac\w+)/,":"+nr+"input-$1")]}),j0(t,{props:[rr(i,/:(plac\w+)/,":"+gT+"$1")]}),j0(t,{props:[rr(i,/:(plac\w+)/,Ti+"input-$1")]})],o)}return""})}},Bxe=[jxe],XJ=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(m){var y=m.getAttribute("data-emotion");y.indexOf(" ")!==-1&&(document.head.appendChild(m),m.setAttribute("data-s",""))})}var o=t.stylisPlugins||Bxe,i={},a,s=[];a=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(m){for(var y=m.getAttribute("data-emotion").split(" "),w=1;w0?gi(wb,--_a):0,gv--,Po===10&&(gv=1,fA--),Po}function gs(){return Po=_a2||Lx(Po)>3?"":" "}function _xe(e,t){for(;--t&&gs()&&!(Po<48||Po>102||Po>57&&Po<65||Po>70&&Po<97););return CC(e,UP()+(t<6&&au()==32&&gs()==32))}function q_(e){for(;gs();)switch(Po){case e:return _a;case 34:case 39:e!==34&&e!==39&&q_(Po);break;case 40:e===41&&q_(e);break;case 92:gs();break}return _a}function Nxe(e,t){for(;gs()&&e+Po!==57;)if(e+Po===84&&au()===47)break;return"/*"+CC(t,_a-1)+"*"+dA(e===47?e:gs())}function Lxe(e){for(;!Lx(au());)gs();return CC(e,_a)}function Fxe(e){return ZJ(GP("",null,null,null,[""],e=JJ(e),0,[0],e))}function GP(e,t,n,r,o,i,a,s,l){for(var c=0,u=0,d=a,f=0,p=0,h=0,m=1,y=1,w=1,x=0,S="",E=o,P=i,T=r,I=S;y;)switch(h=x,x=gs()){case 40:if(h!=108&&gi(I,d-1)==58){G_(I+=rr(WP(x),"&","&\f"),"&\f")!=-1&&(w=-1);break}case 34:case 39:case 91:I+=WP(x);break;case 9:case 10:case 13:case 32:I+=Dxe(h);break;case 92:I+=_xe(UP()-1,7);continue;case 47:switch(au()){case 42:case 47:AE(jxe(Nxe(gs(),UP()),t,n),l);break;default:I+="/"}break;case 123*m:s[c++]=Jc(I)*w;case 125*m:case 59:case 0:switch(x){case 0:case 125:y=0;case 59+u:w==-1&&(I=rr(I,/\f/g,"")),p>0&&Jc(I)-d&&AE(p>32?p4(I+";",r,n,d-1):p4(rr(I," ","")+";",r,n,d-2),l);break;case 59:I+=";";default:if(AE(T=f4(I,t,n,c,u,o,s,S,E=[],P=[],d),i),x===123)if(u===0)GP(I,t,T,T,E,i,d,s,P);else switch(f===99&&gi(I,3)===110?100:f){case 100:case 108:case 109:case 115:GP(e,T,T,r&&AE(f4(e,T,T,0,0,o,s,S,o,E=[],d),P),o,P,d,s,r?E:P);break;default:GP(I,T,T,T,[""],P,0,s,P)}}c=u=p=0,m=w=1,S=I="",d=a;break;case 58:d=1+Jc(I),p=h;default:if(m<1){if(x==123)--m;else if(x==125&&m++==0&&$xe()==125)continue}switch(I+=dA(x),x*m){case 38:w=u>0?1:(I+="\f",-1);break;case 44:s[c++]=(Jc(I)-1)*w,w=1;break;case 64:au()===45&&(I+=WP(gs())),f=au(),u=d=Jc(S=I+=Lxe(UP())),x++;break;case 45:h===45&&Jc(I)==2&&(m=0)}}return i}function f4(e,t,n,r,o,i,a,s,l,c,u){for(var d=o-1,f=o===0?i:[""],p=Tj(f),h=0,m=0,y=0;h0?f[w]+" "+x:rr(x,/&\f/g,f[w])))&&(l[y++]=S);return pA(e,t,n,o===0?Ej:s,l,c,u)}function jxe(e,t,n){return pA(e,t,n,KJ,dA(Rxe()),Nx(e,2,-2),0)}function p4(e,t,n,r){return pA(e,t,n,Pj,Nx(e,0,r),Nx(e,r+1,-1),r)}function ky(e,t){for(var n="",r=Tj(e),o=0;o6)switch(gi(e,t+1)){case 109:if(gi(e,t+4)!==45)break;case 102:return rr(e,/(.+:)(.+)-([^]+)/,"$1"+nr+"$2-$3$1"+IT+(gi(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~G_(e,"stretch")?tZ(rr(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(gi(e,t+1)!==115)break;case 6444:switch(gi(e,Jc(e)-3-(~G_(e,"!important")&&10))){case 107:return rr(e,":",":"+nr)+e;case 101:return rr(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+nr+(gi(e,14)===45?"inline-":"")+"box$3$1"+nr+"$2$3$1"+Ii+"$2box$3")+e}break;case 5936:switch(gi(e,t+11)){case 114:return nr+e+Ii+rr(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return nr+e+Ii+rr(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return nr+e+Ii+rr(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return nr+e+Ii+e+e}return e}var Kxe=function(t,n,r,o){if(t.length>-1&&!t.return)switch(t.type){case Pj:t.return=tZ(t.value,t.length);break;case YJ:return ky([H0(t,{value:rr(t.value,"@","@"+nr)})],o);case Ej:if(t.length)return Mxe(t.props,function(i){switch(kxe(i,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return ky([H0(t,{props:[rr(i,/:(read-\w+)/,":"+IT+"$1")]})],o);case"::placeholder":return ky([H0(t,{props:[rr(i,/:(plac\w+)/,":"+nr+"input-$1")]}),H0(t,{props:[rr(i,/:(plac\w+)/,":"+IT+"$1")]}),H0(t,{props:[rr(i,/:(plac\w+)/,Ii+"input-$1")]})],o)}return""})}},Yxe=[Kxe],nZ=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(m){var y=m.getAttribute("data-emotion");y.indexOf(" ")!==-1&&(document.head.appendChild(m),m.setAttribute("data-s",""))})}var o=t.stylisPlugins||Yxe,i={},a,s=[];a=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(m){for(var y=m.getAttribute("data-emotion").split(" "),w=1;w=4;++r,o-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(o){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var oZ={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},Qxe=!1,Xxe=/[A-Z]|^ms/g,Jxe=/_EMO_([^_]+?)_([^]*?)_EMO_/g,iZ=function(t){return t.charCodeAt(1)===45},d4=function(t){return t!=null&&typeof t!="boolean"},b$=YJ(function(e){return iZ(e)?e:e.replace(Xxe,"-$&").toLowerCase()}),f4=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(Jxe,function(r,o,i){return Xc={name:o,styles:i,next:Xc},o})}return oZ[t]!==1&&!iZ(t)&&typeof n=="number"&&n!==0?n+"px":n},Zxe="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function $x(e,t,n){if(n==null)return"";var r=n;if(r.__emotion_styles!==void 0)return r;switch(typeof n){case"boolean":return"";case"object":{var o=n;if(o.anim===1)return Xc={name:o.name,styles:o.styles,next:Xc},o.name;var i=n;if(i.styles!==void 0){var a=i.next;if(a!==void 0)for(;a!==void 0;)Xc={name:a.name,styles:a.styles,next:Xc},a=a.next;var s=i.styles+";";return s}return eSe(e,t,n)}case"function":{if(e!==void 0){var l=Xc,c=n(e);return Xc=l,$x(e,t,c)}break}}var u=n;if(t==null)return u;var d=t[u];return d!==void 0?d:u}function eSe(e,t,n){var r="";if(Array.isArray(n))for(var o=0;on.searchParams.append("args[]",r)),`Minified MUI error #${e}; visit ${n} for the full message.`}const vc="$$material";function sSe(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var lSe=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,cSe=sSe(function(e){return lSe.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),uSe=cSe,dSe=function(t){return t!=="theme"},g4=function(t){return typeof t=="string"&&t.charCodeAt(0)>96?uSe:dSe},m4=function(t,n,r){var o;if(n){var i=n.shouldForwardProp;o=t.__emotion_forwardProp&&i?function(a){return t.__emotion_forwardProp(a)&&i(a)}:i}return typeof o!="function"&&r&&(o=t.__emotion_forwardProp),o},fSe=function(t){var n=t.cache,r=t.serialized,o=t.isStringTag;return Pj(n,r,o),sZ(function(){return Tj(n,r,o)}),null},pSe=function e(t,n){var r=t.__emotion_real===t,o=r&&t.__emotion_base||t,i,a;n!==void 0&&(i=n.label,a=n.target);var s=m4(t,n,r),l=s||g4(o),c=!l("as");return function(){var u=arguments,d=r&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(i!==void 0&&d.push("label:"+i+";"),u[0]==null||u[0].raw===void 0)d.push.apply(d,u);else{d.push(u[0][0]);for(var f=u.length,p=1;pt(TSe(o)?n:o):t;return R.jsx(aSe,{styles:r})}/** + */var ii=typeof Symbol=="function"&&Symbol.for,Ij=ii?Symbol.for("react.element"):60103,Oj=ii?Symbol.for("react.portal"):60106,hA=ii?Symbol.for("react.fragment"):60107,gA=ii?Symbol.for("react.strict_mode"):60108,mA=ii?Symbol.for("react.profiler"):60114,yA=ii?Symbol.for("react.provider"):60109,vA=ii?Symbol.for("react.context"):60110,Aj=ii?Symbol.for("react.async_mode"):60111,bA=ii?Symbol.for("react.concurrent_mode"):60111,wA=ii?Symbol.for("react.forward_ref"):60112,xA=ii?Symbol.for("react.suspense"):60113,Qxe=ii?Symbol.for("react.suspense_list"):60120,SA=ii?Symbol.for("react.memo"):60115,CA=ii?Symbol.for("react.lazy"):60116,Xxe=ii?Symbol.for("react.block"):60121,Jxe=ii?Symbol.for("react.fundamental"):60117,Zxe=ii?Symbol.for("react.responder"):60118,eSe=ii?Symbol.for("react.scope"):60119;function ks(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case Ij:switch(e=e.type,e){case Aj:case bA:case hA:case mA:case gA:case xA:return e;default:switch(e=e&&e.$$typeof,e){case vA:case wA:case CA:case SA:case yA:return e;default:return t}}case Oj:return t}}}function oZ(e){return ks(e)===bA}hr.AsyncMode=Aj;hr.ConcurrentMode=bA;hr.ContextConsumer=vA;hr.ContextProvider=yA;hr.Element=Ij;hr.ForwardRef=wA;hr.Fragment=hA;hr.Lazy=CA;hr.Memo=SA;hr.Portal=Oj;hr.Profiler=mA;hr.StrictMode=gA;hr.Suspense=xA;hr.isAsyncMode=function(e){return oZ(e)||ks(e)===Aj};hr.isConcurrentMode=oZ;hr.isContextConsumer=function(e){return ks(e)===vA};hr.isContextProvider=function(e){return ks(e)===yA};hr.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===Ij};hr.isForwardRef=function(e){return ks(e)===wA};hr.isFragment=function(e){return ks(e)===hA};hr.isLazy=function(e){return ks(e)===CA};hr.isMemo=function(e){return ks(e)===SA};hr.isPortal=function(e){return ks(e)===Oj};hr.isProfiler=function(e){return ks(e)===mA};hr.isStrictMode=function(e){return ks(e)===gA};hr.isSuspense=function(e){return ks(e)===xA};hr.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===hA||e===bA||e===mA||e===gA||e===xA||e===Qxe||typeof e=="object"&&e!==null&&(e.$$typeof===CA||e.$$typeof===SA||e.$$typeof===yA||e.$$typeof===vA||e.$$typeof===wA||e.$$typeof===Jxe||e.$$typeof===Zxe||e.$$typeof===eSe||e.$$typeof===Xxe)};hr.typeOf=ks;rZ.exports=hr;var tSe=rZ.exports,iZ=tSe,nSe={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},rSe={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},aZ={};aZ[iZ.ForwardRef]=nSe;aZ[iZ.Memo]=rSe;var oSe=!0;function sZ(e,t,n){var r="";return n.split(" ").forEach(function(o){e[o]!==void 0?t.push(e[o]+";"):r+=o+" "}),r}var kj=function(t,n,r){var o=t.key+"-"+n.name;(r===!1||oSe===!1)&&t.registered[o]===void 0&&(t.registered[o]=n.styles)},Mj=function(t,n,r){kj(t,n,r);var o=t.key+"-"+n.name;if(t.inserted[n.name]===void 0){var i=n;do t.insert(n===i?"."+o:"",i,t.sheet,!0),i=i.next;while(i!==void 0)}};function lZ(e){for(var t=0,n,r=0,o=e.length;o>=4;++r,o-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(o){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var cZ={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},iSe=!1,aSe=/[A-Z]|^ms/g,sSe=/_EMO_([^_]+?)_([^]*?)_EMO_/g,uZ=function(t){return t.charCodeAt(1)===45},g4=function(t){return t!=null&&typeof t!="boolean"},P$=eZ(function(e){return uZ(e)?e:e.replace(aSe,"-$&").toLowerCase()}),m4=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(sSe,function(r,o,i){return Zc={name:o,styles:i,next:Zc},o})}return cZ[t]!==1&&!uZ(t)&&typeof n=="number"&&n!==0?n+"px":n},lSe="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function Fx(e,t,n){if(n==null)return"";var r=n;if(r.__emotion_styles!==void 0)return r;switch(typeof n){case"boolean":return"";case"object":{var o=n;if(o.anim===1)return Zc={name:o.name,styles:o.styles,next:Zc},o.name;var i=n;if(i.styles!==void 0){var a=i.next;if(a!==void 0)for(;a!==void 0;)Zc={name:a.name,styles:a.styles,next:Zc},a=a.next;var s=i.styles+";";return s}return cSe(e,t,n)}case"function":{if(e!==void 0){var l=Zc,c=n(e);return Zc=l,Fx(e,t,c)}break}}var u=n;if(t==null)return u;var d=t[u];return d!==void 0?d:u}function cSe(e,t,n){var r="";if(Array.isArray(n))for(var o=0;on.searchParams.append("args[]",r)),`Minified MUI error #${e}; visit ${n} for the full message.`}const wc="$$material";function mSe(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var ySe=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,vSe=mSe(function(e){return ySe.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),bSe=vSe,wSe=function(t){return t!=="theme"},b4=function(t){return typeof t=="string"&&t.charCodeAt(0)>96?bSe:wSe},w4=function(t,n,r){var o;if(n){var i=n.shouldForwardProp;o=t.__emotion_forwardProp&&i?function(a){return t.__emotion_forwardProp(a)&&i(a)}:i}return typeof o!="function"&&r&&(o=t.__emotion_forwardProp),o},xSe=function(t){var n=t.cache,r=t.serialized,o=t.isStringTag;return kj(n,r,o),fZ(function(){return Mj(n,r,o)}),null},SSe=function e(t,n){var r=t.__emotion_real===t,o=r&&t.__emotion_base||t,i,a;n!==void 0&&(i=n.label,a=n.target);var s=w4(t,n,r),l=s||b4(o),c=!l("as");return function(){var u=arguments,d=r&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(i!==void 0&&d.push("label:"+i+";"),u[0]==null||u[0].raw===void 0)d.push.apply(d,u);else{d.push(u[0][0]);for(var f=u.length,p=1;pt(_Se(o)?n:o):t;return R.jsx(gSe,{styles:r})}/** * @mui/styled-engine v6.1.6 * * @license MIT * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */function gZ(e,t){return H_(e,t)}function ISe(e,t){Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}const w4=[];function x4(e){return w4[0]=e,wSe(w4)}function Jc(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function mZ(e){if(!Jc(e))return e;const t={};return Object.keys(e).forEach(n=>{t[n]=mZ(e[n])}),t}function Oo(e,t,n={clone:!0}){const r=n.clone?{...e}:e;return Jc(e)&&Jc(t)&&Object.keys(t).forEach(o=>{Jc(t[o])&&Object.prototype.hasOwnProperty.call(e,o)&&Jc(e[o])?r[o]=Oo(e[o],t[o],n):n.clone?r[o]=Jc(t[o])?mZ(t[o]):t[o]:r[o]=t[o]}),r}const OSe=e=>{const t=Object.keys(e).map(n=>({key:n,val:e[n]}))||[];return t.sort((n,r)=>n.val-r.val),t.reduce((n,r)=>({...n,[r.key]:r.val}),{})};function ASe(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5,...o}=e,i=OSe(t),a=Object.keys(i);function s(f){return`@media (min-width:${typeof t[f]=="number"?t[f]:f}${n})`}function l(f){return`@media (max-width:${(typeof t[f]=="number"?t[f]:f)-r/100}${n})`}function c(f,p){const h=a.indexOf(p);return`@media (min-width:${typeof t[f]=="number"?t[f]:f}${n}) and (max-width:${(h!==-1&&typeof t[a[h]]=="number"?t[a[h]]:p)-r/100}${n})`}function u(f){return a.indexOf(f)+1r.startsWith("@container")).sort((r,o)=>{var a,s;const i=/min-width:\s*([0-9.]+)/;return+(((a=r.match(i))==null?void 0:a[1])||0)-+(((s=o.match(i))==null?void 0:s[1])||0)});return n.length?n.reduce((r,o)=>{const i=t[o];return delete r[o],r[o]=i,r},{...t}):t}function MSe(e,t){return t==="@"||t.startsWith("@")&&(e.some(n=>t.startsWith(`@${n}`))||!!t.match(/^@\d/))}function RSe(e,t){const n=t.match(/^@([^/]+)?\/?(.+)?$/);if(!n)return null;const[,r,o]=n,i=Number.isNaN(+r)?r||0:+r;return e.containerQueries(o).up(i)}function $Se(e){const t=(i,a)=>i.replace("@media",a?`@container ${a}`:"@container");function n(i,a){i.up=(...s)=>t(e.breakpoints.up(...s),a),i.down=(...s)=>t(e.breakpoints.down(...s),a),i.between=(...s)=>t(e.breakpoints.between(...s),a),i.only=(...s)=>t(e.breakpoints.only(...s),a),i.not=(...s)=>{const l=t(e.breakpoints.not(...s),a);return l.includes("not all and")?l.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):l}}const r={},o=i=>(n(r,i),r);return n(o),{...e,containerQueries:o}}const DSe={borderRadius:4};function Qw(e,t){return t?Oo(e,t,{clone:!1}):e}const pA={xs:0,sm:600,md:900,lg:1200,xl:1536},S4={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${pA[e]}px)`},_Se={containerQueries:e=>({up:t=>{let n=typeof t=="number"?t:pA[t]||t;return typeof n=="number"&&(n=`${n}px`),e?`@container ${e} (min-width:${n})`:`@container (min-width:${n})`}})};function Pc(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const i=r.breakpoints||S4;return t.reduce((a,s,l)=>(a[i.up(i.keys[l])]=n(t[l]),a),{})}if(typeof t=="object"){const i=r.breakpoints||S4;return Object.keys(t).reduce((a,s)=>{if(MSe(i.keys,s)){const l=RSe(r.containerQueries?r:_Se,s);l&&(a[l]=n(t[s],s))}else if(Object.keys(i.values||pA).includes(s)){const l=i.up(s);a[l]=n(t[s],s)}else{const l=s;a[l]=t[l]}return a},{})}return n(t)}function yZ(e={}){var n;return((n=e.keys)==null?void 0:n.reduce((r,o)=>{const i=e.up(o);return r[i]={},r},{}))||{}}function vZ(e,t){return e.reduce((n,r)=>{const o=n[r];return(!o||Object.keys(o).length===0)&&delete n[r],n},t)}function NSe(e,...t){const n=yZ(e),r=[n,...t].reduce((o,i)=>Oo(o,i),{});return vZ(Object.keys(n),r)}function LSe(e,t){if(typeof e!="object")return{};const n={},r=Object.keys(t);return Array.isArray(e)?r.forEach((o,i)=>{i{e[o]!=null&&(n[o]=!0)}),n}function x$({values:e,breakpoints:t,base:n}){const r=n||LSe(e,t),o=Object.keys(r);if(o.length===0)return e;let i;return o.reduce((a,s,l)=>(Array.isArray(e)?(a[s]=e[l]!=null?e[l]:e[i],i=l):typeof e=="object"?(a[s]=e[s]!=null?e[s]:e[i],i=s):a[s]=e,a),{})}function Ce(e){if(typeof e!="string")throw new Error(vd(7));return e.charAt(0).toUpperCase()+e.slice(1)}function hA(e,t,n=!0){if(!t||typeof t!="string")return null;if(e&&e.vars&&n){const r=`vars.${t}`.split(".").reduce((o,i)=>o&&o[i]?o[i]:null,e);if(r!=null)return r}return t.split(".").reduce((r,o)=>r&&r[o]!=null?r[o]:null,e)}function yT(e,t,n,r=n){let o;return typeof e=="function"?o=e(n):Array.isArray(e)?o=e[n]||r:o=hA(e,n)||r,t&&(o=t(o,r,e)),o}function wo(e){const{prop:t,cssProperty:n=e.prop,themeKey:r,transform:o}=e,i=a=>{if(a[t]==null)return null;const s=a[t],l=a.theme,c=hA(l,r)||{};return Pc(a,s,d=>{let f=yT(c,o,d);return d===f&&typeof d=="string"&&(f=yT(c,o,`${t}${d==="default"?"":Ce(d)}`,d)),n===!1?f:{[n]:f}})};return i.propTypes={},i.filterProps=[t],i}function FSe(e){const t={};return n=>(t[n]===void 0&&(t[n]=e(n)),t[n])}const jSe={m:"margin",p:"padding"},BSe={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},C4={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},zSe=FSe(e=>{if(e.length>2)if(C4[e])e=C4[e];else return[e];const[t,n]=e.split(""),r=jSe[t],o=BSe[n]||"";return Array.isArray(o)?o.map(i=>r+i):[r+o]}),kj=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],Mj=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];[...kj,...Mj];function wC(e,t,n,r){const o=hA(e,t,!0)??n;return typeof o=="number"||typeof o=="string"?i=>typeof i=="string"?i:typeof o=="string"?`calc(${i} * ${o})`:o*i:Array.isArray(o)?i=>{if(typeof i=="string")return i;const a=Math.abs(i),s=o[a];return i>=0?s:typeof s=="number"?-s:`-${s}`}:typeof o=="function"?o:()=>{}}function gA(e){return wC(e,"spacing",8)}function ag(e,t){return typeof t=="string"||t==null?t:e(t)}function VSe(e,t){return n=>e.reduce((r,o)=>(r[o]=ag(t,n),r),{})}function HSe(e,t,n,r){if(!t.includes(n))return null;const o=zSe(n),i=VSe(o,r),a=e[n];return Pc(e,a,i)}function bZ(e,t){const n=gA(e.theme);return Object.keys(e).map(r=>HSe(e,t,r,n)).reduce(Qw,{})}function io(e){return bZ(e,kj)}io.propTypes={};io.filterProps=kj;function ao(e){return bZ(e,Mj)}ao.propTypes={};ao.filterProps=Mj;function wZ(e=8,t=gA({spacing:e})){if(e.mui)return e;const n=(...r)=>(r.length===0?[1]:r).map(i=>{const a=t(i);return typeof a=="number"?`${a}px`:a}).join(" ");return n.mui=!0,n}function mA(...e){const t=e.reduce((r,o)=>(o.filterProps.forEach(i=>{r[i]=o}),r),{}),n=r=>Object.keys(r).reduce((o,i)=>t[i]?Qw(o,t[i](r)):o,{});return n.propTypes={},n.filterProps=e.reduce((r,o)=>r.concat(o.filterProps),[]),n}function al(e){return typeof e!="number"?e:`${e}px solid`}function _l(e,t){return wo({prop:e,themeKey:"borders",transform:t})}const USe=_l("border",al),WSe=_l("borderTop",al),GSe=_l("borderRight",al),qSe=_l("borderBottom",al),KSe=_l("borderLeft",al),YSe=_l("borderColor"),QSe=_l("borderTopColor"),XSe=_l("borderRightColor"),JSe=_l("borderBottomColor"),ZSe=_l("borderLeftColor"),eCe=_l("outline",al),tCe=_l("outlineColor"),yA=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=wC(e.theme,"shape.borderRadius",4),n=r=>({borderRadius:ag(t,r)});return Pc(e,e.borderRadius,n)}return null};yA.propTypes={};yA.filterProps=["borderRadius"];mA(USe,WSe,GSe,qSe,KSe,YSe,QSe,XSe,JSe,ZSe,yA,eCe,tCe);const vA=e=>{if(e.gap!==void 0&&e.gap!==null){const t=wC(e.theme,"spacing",8),n=r=>({gap:ag(t,r)});return Pc(e,e.gap,n)}return null};vA.propTypes={};vA.filterProps=["gap"];const bA=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=wC(e.theme,"spacing",8),n=r=>({columnGap:ag(t,r)});return Pc(e,e.columnGap,n)}return null};bA.propTypes={};bA.filterProps=["columnGap"];const wA=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=wC(e.theme,"spacing",8),n=r=>({rowGap:ag(t,r)});return Pc(e,e.rowGap,n)}return null};wA.propTypes={};wA.filterProps=["rowGap"];const nCe=wo({prop:"gridColumn"}),rCe=wo({prop:"gridRow"}),oCe=wo({prop:"gridAutoFlow"}),iCe=wo({prop:"gridAutoColumns"}),aCe=wo({prop:"gridAutoRows"}),sCe=wo({prop:"gridTemplateColumns"}),lCe=wo({prop:"gridTemplateRows"}),cCe=wo({prop:"gridTemplateAreas"}),uCe=wo({prop:"gridArea"});mA(vA,bA,wA,nCe,rCe,oCe,iCe,aCe,sCe,lCe,cCe,uCe);function ky(e,t){return t==="grey"?t:e}const dCe=wo({prop:"color",themeKey:"palette",transform:ky}),fCe=wo({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:ky}),pCe=wo({prop:"backgroundColor",themeKey:"palette",transform:ky});mA(dCe,fCe,pCe);function as(e){return e<=1&&e!==0?`${e*100}%`:e}const hCe=wo({prop:"width",transform:as}),Rj=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=n=>{var o,i,a,s,l;const r=((a=(i=(o=e.theme)==null?void 0:o.breakpoints)==null?void 0:i.values)==null?void 0:a[n])||pA[n];return r?((l=(s=e.theme)==null?void 0:s.breakpoints)==null?void 0:l.unit)!=="px"?{maxWidth:`${r}${e.theme.breakpoints.unit}`}:{maxWidth:r}:{maxWidth:as(n)}};return Pc(e,e.maxWidth,t)}return null};Rj.filterProps=["maxWidth"];const gCe=wo({prop:"minWidth",transform:as}),mCe=wo({prop:"height",transform:as}),yCe=wo({prop:"maxHeight",transform:as}),vCe=wo({prop:"minHeight",transform:as});wo({prop:"size",cssProperty:"width",transform:as});wo({prop:"size",cssProperty:"height",transform:as});const bCe=wo({prop:"boxSizing"});mA(hCe,Rj,gCe,mCe,yCe,vCe,bCe);const xC={border:{themeKey:"borders",transform:al},borderTop:{themeKey:"borders",transform:al},borderRight:{themeKey:"borders",transform:al},borderBottom:{themeKey:"borders",transform:al},borderLeft:{themeKey:"borders",transform:al},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:al},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:yA},color:{themeKey:"palette",transform:ky},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:ky},backgroundColor:{themeKey:"palette",transform:ky},p:{style:ao},pt:{style:ao},pr:{style:ao},pb:{style:ao},pl:{style:ao},px:{style:ao},py:{style:ao},padding:{style:ao},paddingTop:{style:ao},paddingRight:{style:ao},paddingBottom:{style:ao},paddingLeft:{style:ao},paddingX:{style:ao},paddingY:{style:ao},paddingInline:{style:ao},paddingInlineStart:{style:ao},paddingInlineEnd:{style:ao},paddingBlock:{style:ao},paddingBlockStart:{style:ao},paddingBlockEnd:{style:ao},m:{style:io},mt:{style:io},mr:{style:io},mb:{style:io},ml:{style:io},mx:{style:io},my:{style:io},margin:{style:io},marginTop:{style:io},marginRight:{style:io},marginBottom:{style:io},marginLeft:{style:io},marginX:{style:io},marginY:{style:io},marginInline:{style:io},marginInlineStart:{style:io},marginInlineEnd:{style:io},marginBlock:{style:io},marginBlockStart:{style:io},marginBlockEnd:{style:io},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:vA},rowGap:{style:wA},columnGap:{style:bA},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:as},maxWidth:{style:Rj},minWidth:{transform:as},height:{transform:as},maxHeight:{transform:as},minHeight:{transform:as},boxSizing:{},font:{themeKey:"font"},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};function wCe(...e){const t=e.reduce((r,o)=>r.concat(Object.keys(o)),[]),n=new Set(t);return e.every(r=>n.size===Object.keys(r).length)}function xCe(e,t){return typeof e=="function"?e(t):e}function SCe(){function e(n,r,o,i){const a={[n]:r,theme:o},s=i[n];if(!s)return{[n]:r};const{cssProperty:l=n,themeKey:c,transform:u,style:d}=s;if(r==null)return null;if(c==="typography"&&r==="inherit")return{[n]:r};const f=hA(o,c)||{};return d?d(a):Pc(a,r,h=>{let m=yT(f,u,h);return h===m&&typeof h=="string"&&(m=yT(f,u,`${n}${h==="default"?"":Ce(h)}`,h)),l===!1?m:{[l]:m}})}function t(n){const{sx:r,theme:o={}}=n||{};if(!r)return null;const i=o.unstable_sxConfig??xC;function a(s){let l=s;if(typeof s=="function")l=s(o);else if(typeof s!="object")return s;if(!l)return null;const c=yZ(o.breakpoints),u=Object.keys(c);let d=c;return Object.keys(l).forEach(f=>{const p=xCe(l[f],o);if(p!=null)if(typeof p=="object")if(i[f])d=Qw(d,e(f,p,o,i));else{const h=Pc({theme:o},p,m=>({[f]:m}));wCe(h,p)?d[f]=t({sx:p,theme:o}):d=Qw(d,h)}else d=Qw(d,e(f,p,o,i))}),kSe(o,vZ(u,d))}return Array.isArray(r)?r.map(a):a(r)}return t}const tp=SCe();tp.filterProps=["sx"];function CCe(e,t){var r;const n=this;if(n.vars){if(!((r=n.colorSchemes)!=null&&r[e])||typeof n.getColorSchemeSelector!="function")return{};let o=n.getColorSchemeSelector(e);return o==="&"?t:((o.includes("data-")||o.includes("."))&&(o=`*:where(${o.replace(/\s*&$/,"")}) &`),{[o]:t})}return n.palette.mode===e?t:{}}function bb(e={},...t){const{breakpoints:n={},palette:r={},spacing:o,shape:i={},...a}=e,s=ASe(n),l=wZ(o);let c=Oo({breakpoints:s,direction:"ltr",components:{},palette:{mode:"light",...r},spacing:l,shape:{...DSe,...i}},a);return c=$Se(c),c.applyStyles=CCe,c=t.reduce((u,d)=>Oo(u,d),c),c.unstable_sxConfig={...xC,...a==null?void 0:a.unstable_sxConfig},c.unstable_sx=function(d){return tp({sx:d,theme:this})},c}function ECe(e){return Object.keys(e).length===0}function $j(e=null){const t=v.useContext(vC);return!t||ECe(t)?e:t}const PCe=bb();function SC(e=PCe){return $j(e)}function TCe({styles:e,themeId:t,defaultTheme:n={}}){const r=SC(n),o=typeof e=="function"?e(t&&r[t]||r):e;return R.jsx(hZ,{styles:o})}const ICe=e=>{var r;const t={systemProps:{},otherProps:{}},n=((r=e==null?void 0:e.theme)==null?void 0:r.unstable_sxConfig)??xC;return Object.keys(e).forEach(o=>{n[o]?t.systemProps[o]=e[o]:t.otherProps[o]=e[o]}),t};function xA(e){const{sx:t,...n}=e,{systemProps:r,otherProps:o}=ICe(n);let i;return Array.isArray(t)?i=[r,...t]:typeof t=="function"?i=(...a)=>{const s=t(...a);return Jc(s)?{...r,...s}:r}:i={...r,...t},{...o,sx:i}}const E4=e=>e,OCe=()=>{let e=E4;return{configure(t){e=t},generate(t){return e(t)},reset(){e=E4}}},xZ=OCe();function SZ(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;ts!=="theme"&&s!=="sx"&&s!=="as"})(tp);return v.forwardRef(function(l,c){const u=SC(n),{className:d,component:f="div",...p}=xA(l);return R.jsx(i,{as:f,ref:c,className:de(d,o?o(r):r),theme:t&&u[t]||u,...p})})}const kCe={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function nt(e,t,n="Mui"){const r=kCe[t];return r?`${n}-${r}`:`${xZ.generate(e)}-${t}`}function it(e,t,n="Mui"){const r={};return t.forEach(o=>{r[o]=nt(e,o,n)}),r}var CZ={exports:{}},gr={};/** + */function wZ(e,t){return Y_(e,t)}function NSe(e,t){Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}const E4=[];function P4(e){return E4[0]=e,ASe(E4)}function eu(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function xZ(e){if(!eu(e))return e;const t={};return Object.keys(e).forEach(n=>{t[n]=xZ(e[n])}),t}function Ao(e,t,n={clone:!0}){const r=n.clone?{...e}:e;return eu(e)&&eu(t)&&Object.keys(t).forEach(o=>{eu(t[o])&&Object.prototype.hasOwnProperty.call(e,o)&&eu(e[o])?r[o]=Ao(e[o],t[o],n):n.clone?r[o]=eu(t[o])?xZ(t[o]):t[o]:r[o]=t[o]}),r}const LSe=e=>{const t=Object.keys(e).map(n=>({key:n,val:e[n]}))||[];return t.sort((n,r)=>n.val-r.val),t.reduce((n,r)=>({...n,[r.key]:r.val}),{})};function FSe(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5,...o}=e,i=LSe(t),a=Object.keys(i);function s(f){return`@media (min-width:${typeof t[f]=="number"?t[f]:f}${n})`}function l(f){return`@media (max-width:${(typeof t[f]=="number"?t[f]:f)-r/100}${n})`}function c(f,p){const h=a.indexOf(p);return`@media (min-width:${typeof t[f]=="number"?t[f]:f}${n}) and (max-width:${(h!==-1&&typeof t[a[h]]=="number"?t[a[h]]:p)-r/100}${n})`}function u(f){return a.indexOf(f)+1r.startsWith("@container")).sort((r,o)=>{var a,s;const i=/min-width:\s*([0-9.]+)/;return+(((a=r.match(i))==null?void 0:a[1])||0)-+(((s=o.match(i))==null?void 0:s[1])||0)});return n.length?n.reduce((r,o)=>{const i=t[o];return delete r[o],r[o]=i,r},{...t}):t}function BSe(e,t){return t==="@"||t.startsWith("@")&&(e.some(n=>t.startsWith(`@${n}`))||!!t.match(/^@\d/))}function zSe(e,t){const n=t.match(/^@([^/]+)?\/?(.+)?$/);if(!n)return null;const[,r,o]=n,i=Number.isNaN(+r)?r||0:+r;return e.containerQueries(o).up(i)}function VSe(e){const t=(i,a)=>i.replace("@media",a?`@container ${a}`:"@container");function n(i,a){i.up=(...s)=>t(e.breakpoints.up(...s),a),i.down=(...s)=>t(e.breakpoints.down(...s),a),i.between=(...s)=>t(e.breakpoints.between(...s),a),i.only=(...s)=>t(e.breakpoints.only(...s),a),i.not=(...s)=>{const l=t(e.breakpoints.not(...s),a);return l.includes("not all and")?l.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):l}}const r={},o=i=>(n(r,i),r);return n(o),{...e,containerQueries:o}}const HSe={borderRadius:4};function tx(e,t){return t?Ao(e,t,{clone:!1}):e}const PA={xs:0,sm:600,md:900,lg:1200,xl:1536},T4={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${PA[e]}px)`},USe={containerQueries:e=>({up:t=>{let n=typeof t=="number"?t:PA[t]||t;return typeof n=="number"&&(n=`${n}px`),e?`@container ${e} (min-width:${n})`:`@container (min-width:${n})`}})};function Na(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const i=r.breakpoints||T4;return t.reduce((a,s,l)=>(a[i.up(i.keys[l])]=n(t[l]),a),{})}if(typeof t=="object"){const i=r.breakpoints||T4;return Object.keys(t).reduce((a,s)=>{if(BSe(i.keys,s)){const l=zSe(r.containerQueries?r:USe,s);l&&(a[l]=n(t[s],s))}else if(Object.keys(i.values||PA).includes(s)){const l=i.up(s);a[l]=n(t[s],s)}else{const l=s;a[l]=t[l]}return a},{})}return n(t)}function SZ(e={}){var n;return((n=e.keys)==null?void 0:n.reduce((r,o)=>{const i=e.up(o);return r[i]={},r},{}))||{}}function CZ(e,t){return e.reduce((n,r)=>{const o=n[r];return(!o||Object.keys(o).length===0)&&delete n[r],n},t)}function WSe(e,...t){const n=SZ(e),r=[n,...t].reduce((o,i)=>Ao(o,i),{});return CZ(Object.keys(n),r)}function GSe(e,t){if(typeof e!="object")return{};const n={},r=Object.keys(t);return Array.isArray(e)?r.forEach((o,i)=>{i{e[o]!=null&&(n[o]=!0)}),n}function Yh({values:e,breakpoints:t,base:n}){const r=n||GSe(e,t),o=Object.keys(r);if(o.length===0)return e;let i;return o.reduce((a,s,l)=>(Array.isArray(e)?(a[s]=e[l]!=null?e[l]:e[i],i=l):typeof e=="object"?(a[s]=e[s]!=null?e[s]:e[i],i=s):a[s]=e,a),{})}function Ce(e){if(typeof e!="string")throw new Error(bd(7));return e.charAt(0).toUpperCase()+e.slice(1)}function TA(e,t,n=!0){if(!t||typeof t!="string")return null;if(e&&e.vars&&n){const r=`vars.${t}`.split(".").reduce((o,i)=>o&&o[i]?o[i]:null,e);if(r!=null)return r}return t.split(".").reduce((r,o)=>r&&r[o]!=null?r[o]:null,e)}function AT(e,t,n,r=n){let o;return typeof e=="function"?o=e(n):Array.isArray(e)?o=e[n]||r:o=TA(e,n)||r,t&&(o=t(o,r,e)),o}function xo(e){const{prop:t,cssProperty:n=e.prop,themeKey:r,transform:o}=e,i=a=>{if(a[t]==null)return null;const s=a[t],l=a.theme,c=TA(l,r)||{};return Na(a,s,d=>{let f=AT(c,o,d);return d===f&&typeof d=="string"&&(f=AT(c,o,`${t}${d==="default"?"":Ce(d)}`,d)),n===!1?f:{[n]:f}})};return i.propTypes={},i.filterProps=[t],i}function qSe(e){const t={};return n=>(t[n]===void 0&&(t[n]=e(n)),t[n])}const KSe={m:"margin",p:"padding"},YSe={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},I4={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},QSe=qSe(e=>{if(e.length>2)if(I4[e])e=I4[e];else return[e];const[t,n]=e.split(""),r=KSe[t],o=YSe[n]||"";return Array.isArray(o)?o.map(i=>r+i):[r+o]}),_j=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],Nj=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];[..._j,...Nj];function TC(e,t,n,r){const o=TA(e,t,!0)??n;return typeof o=="number"||typeof o=="string"?i=>typeof i=="string"?i:typeof o=="string"?`calc(${i} * ${o})`:o*i:Array.isArray(o)?i=>{if(typeof i=="string")return i;const a=Math.abs(i),s=o[a];return i>=0?s:typeof s=="number"?-s:`-${s}`}:typeof o=="function"?o:()=>{}}function IA(e){return TC(e,"spacing",8)}function lg(e,t){return typeof t=="string"||t==null?t:e(t)}function XSe(e,t){return n=>e.reduce((r,o)=>(r[o]=lg(t,n),r),{})}function JSe(e,t,n,r){if(!t.includes(n))return null;const o=QSe(n),i=XSe(o,r),a=e[n];return Na(e,a,i)}function EZ(e,t){const n=IA(e.theme);return Object.keys(e).map(r=>JSe(e,t,r,n)).reduce(tx,{})}function so(e){return EZ(e,_j)}so.propTypes={};so.filterProps=_j;function lo(e){return EZ(e,Nj)}lo.propTypes={};lo.filterProps=Nj;function PZ(e=8,t=IA({spacing:e})){if(e.mui)return e;const n=(...r)=>(r.length===0?[1]:r).map(i=>{const a=t(i);return typeof a=="number"?`${a}px`:a}).join(" ");return n.mui=!0,n}function OA(...e){const t=e.reduce((r,o)=>(o.filterProps.forEach(i=>{r[i]=o}),r),{}),n=r=>Object.keys(r).reduce((o,i)=>t[i]?tx(o,t[i](r)):o,{});return n.propTypes={},n.filterProps=e.reduce((r,o)=>r.concat(o.filterProps),[]),n}function cl(e){return typeof e!="number"?e:`${e}px solid`}function Ll(e,t){return xo({prop:e,themeKey:"borders",transform:t})}const ZSe=Ll("border",cl),eCe=Ll("borderTop",cl),tCe=Ll("borderRight",cl),nCe=Ll("borderBottom",cl),rCe=Ll("borderLeft",cl),oCe=Ll("borderColor"),iCe=Ll("borderTopColor"),aCe=Ll("borderRightColor"),sCe=Ll("borderBottomColor"),lCe=Ll("borderLeftColor"),cCe=Ll("outline",cl),uCe=Ll("outlineColor"),AA=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=TC(e.theme,"shape.borderRadius",4),n=r=>({borderRadius:lg(t,r)});return Na(e,e.borderRadius,n)}return null};AA.propTypes={};AA.filterProps=["borderRadius"];OA(ZSe,eCe,tCe,nCe,rCe,oCe,iCe,aCe,sCe,lCe,AA,cCe,uCe);const kA=e=>{if(e.gap!==void 0&&e.gap!==null){const t=TC(e.theme,"spacing",8),n=r=>({gap:lg(t,r)});return Na(e,e.gap,n)}return null};kA.propTypes={};kA.filterProps=["gap"];const MA=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=TC(e.theme,"spacing",8),n=r=>({columnGap:lg(t,r)});return Na(e,e.columnGap,n)}return null};MA.propTypes={};MA.filterProps=["columnGap"];const RA=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=TC(e.theme,"spacing",8),n=r=>({rowGap:lg(t,r)});return Na(e,e.rowGap,n)}return null};RA.propTypes={};RA.filterProps=["rowGap"];const dCe=xo({prop:"gridColumn"}),fCe=xo({prop:"gridRow"}),pCe=xo({prop:"gridAutoFlow"}),hCe=xo({prop:"gridAutoColumns"}),gCe=xo({prop:"gridAutoRows"}),mCe=xo({prop:"gridTemplateColumns"}),yCe=xo({prop:"gridTemplateRows"}),vCe=xo({prop:"gridTemplateAreas"}),bCe=xo({prop:"gridArea"});OA(kA,MA,RA,dCe,fCe,pCe,hCe,gCe,mCe,yCe,vCe,bCe);function My(e,t){return t==="grey"?t:e}const wCe=xo({prop:"color",themeKey:"palette",transform:My}),xCe=xo({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:My}),SCe=xo({prop:"backgroundColor",themeKey:"palette",transform:My});OA(wCe,xCe,SCe);function ls(e){return e<=1&&e!==0?`${e*100}%`:e}const CCe=xo({prop:"width",transform:ls}),Lj=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=n=>{var o,i,a,s,l;const r=((a=(i=(o=e.theme)==null?void 0:o.breakpoints)==null?void 0:i.values)==null?void 0:a[n])||PA[n];return r?((l=(s=e.theme)==null?void 0:s.breakpoints)==null?void 0:l.unit)!=="px"?{maxWidth:`${r}${e.theme.breakpoints.unit}`}:{maxWidth:r}:{maxWidth:ls(n)}};return Na(e,e.maxWidth,t)}return null};Lj.filterProps=["maxWidth"];const ECe=xo({prop:"minWidth",transform:ls}),PCe=xo({prop:"height",transform:ls}),TCe=xo({prop:"maxHeight",transform:ls}),ICe=xo({prop:"minHeight",transform:ls});xo({prop:"size",cssProperty:"width",transform:ls});xo({prop:"size",cssProperty:"height",transform:ls});const OCe=xo({prop:"boxSizing"});OA(CCe,Lj,ECe,PCe,TCe,ICe,OCe);const IC={border:{themeKey:"borders",transform:cl},borderTop:{themeKey:"borders",transform:cl},borderRight:{themeKey:"borders",transform:cl},borderBottom:{themeKey:"borders",transform:cl},borderLeft:{themeKey:"borders",transform:cl},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:cl},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:AA},color:{themeKey:"palette",transform:My},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:My},backgroundColor:{themeKey:"palette",transform:My},p:{style:lo},pt:{style:lo},pr:{style:lo},pb:{style:lo},pl:{style:lo},px:{style:lo},py:{style:lo},padding:{style:lo},paddingTop:{style:lo},paddingRight:{style:lo},paddingBottom:{style:lo},paddingLeft:{style:lo},paddingX:{style:lo},paddingY:{style:lo},paddingInline:{style:lo},paddingInlineStart:{style:lo},paddingInlineEnd:{style:lo},paddingBlock:{style:lo},paddingBlockStart:{style:lo},paddingBlockEnd:{style:lo},m:{style:so},mt:{style:so},mr:{style:so},mb:{style:so},ml:{style:so},mx:{style:so},my:{style:so},margin:{style:so},marginTop:{style:so},marginRight:{style:so},marginBottom:{style:so},marginLeft:{style:so},marginX:{style:so},marginY:{style:so},marginInline:{style:so},marginInlineStart:{style:so},marginInlineEnd:{style:so},marginBlock:{style:so},marginBlockStart:{style:so},marginBlockEnd:{style:so},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:kA},rowGap:{style:RA},columnGap:{style:MA},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:ls},maxWidth:{style:Lj},minWidth:{transform:ls},height:{transform:ls},maxHeight:{transform:ls},minHeight:{transform:ls},boxSizing:{},font:{themeKey:"font"},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};function ACe(...e){const t=e.reduce((r,o)=>r.concat(Object.keys(o)),[]),n=new Set(t);return e.every(r=>n.size===Object.keys(r).length)}function kCe(e,t){return typeof e=="function"?e(t):e}function MCe(){function e(n,r,o,i){const a={[n]:r,theme:o},s=i[n];if(!s)return{[n]:r};const{cssProperty:l=n,themeKey:c,transform:u,style:d}=s;if(r==null)return null;if(c==="typography"&&r==="inherit")return{[n]:r};const f=TA(o,c)||{};return d?d(a):Na(a,r,h=>{let m=AT(f,u,h);return h===m&&typeof h=="string"&&(m=AT(f,u,`${n}${h==="default"?"":Ce(h)}`,h)),l===!1?m:{[l]:m}})}function t(n){const{sx:r,theme:o={}}=n||{};if(!r)return null;const i=o.unstable_sxConfig??IC;function a(s){let l=s;if(typeof s=="function")l=s(o);else if(typeof s!="object")return s;if(!l)return null;const c=SZ(o.breakpoints),u=Object.keys(c);let d=c;return Object.keys(l).forEach(f=>{const p=kCe(l[f],o);if(p!=null)if(typeof p=="object")if(i[f])d=tx(d,e(f,p,o,i));else{const h=Na({theme:o},p,m=>({[f]:m}));ACe(h,p)?d[f]=t({sx:p,theme:o}):d=tx(d,h)}else d=tx(d,e(f,p,o,i))}),jSe(o,CZ(u,d))}return Array.isArray(r)?r.map(a):a(r)}return t}const rp=MCe();rp.filterProps=["sx"];function RCe(e,t){var r;const n=this;if(n.vars){if(!((r=n.colorSchemes)!=null&&r[e])||typeof n.getColorSchemeSelector!="function")return{};let o=n.getColorSchemeSelector(e);return o==="&"?t:((o.includes("data-")||o.includes("."))&&(o=`*:where(${o.replace(/\s*&$/,"")}) &`),{[o]:t})}return n.palette.mode===e?t:{}}function xb(e={},...t){const{breakpoints:n={},palette:r={},spacing:o,shape:i={},...a}=e,s=FSe(n),l=PZ(o);let c=Ao({breakpoints:s,direction:"ltr",components:{},palette:{mode:"light",...r},spacing:l,shape:{...HSe,...i}},a);return c=VSe(c),c.applyStyles=RCe,c=t.reduce((u,d)=>Ao(u,d),c),c.unstable_sxConfig={...IC,...a==null?void 0:a.unstable_sxConfig},c.unstable_sx=function(d){return rp({sx:d,theme:this})},c}function $Ce(e){return Object.keys(e).length===0}function Fj(e=null){const t=v.useContext(EC);return!t||$Ce(t)?e:t}const DCe=xb();function OC(e=DCe){return Fj(e)}function _Ce({styles:e,themeId:t,defaultTheme:n={}}){const r=OC(n),o=typeof e=="function"?e(t&&r[t]||r):e;return R.jsx(bZ,{styles:o})}const NCe=e=>{var r;const t={systemProps:{},otherProps:{}},n=((r=e==null?void 0:e.theme)==null?void 0:r.unstable_sxConfig)??IC;return Object.keys(e).forEach(o=>{n[o]?t.systemProps[o]=e[o]:t.otherProps[o]=e[o]}),t};function AC(e){const{sx:t,...n}=e,{systemProps:r,otherProps:o}=NCe(n);let i;return Array.isArray(t)?i=[r,...t]:typeof t=="function"?i=(...a)=>{const s=t(...a);return eu(s)?{...r,...s}:r}:i={...r,...t},{...o,sx:i}}const O4=e=>e,LCe=()=>{let e=O4;return{configure(t){e=t},generate(t){return e(t)},reset(){e=O4}}},TZ=LCe();function IZ(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;ts!=="theme"&&s!=="sx"&&s!=="as"})(rp);return v.forwardRef(function(l,c){const u=OC(n),{className:d,component:f="div",...p}=AC(l);return R.jsx(i,{as:f,ref:c,className:de(d,o?o(r):r),theme:t&&u[t]||u,...p})})}const jCe={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function nt(e,t,n="Mui"){const r=jCe[t];return r?`${n}-${r}`:`${TZ.generate(e)}-${t}`}function it(e,t,n="Mui"){const r={};return t.forEach(o=>{r[o]=nt(e,o,n)}),r}var OZ={exports:{}},gr={};/** * @license React * react-is.production.min.js * @@ -35,7 +35,7 @@ var Vwe=Object.defineProperty;var o4=e=>{throw TypeError(e)};var Hwe=(e,t,n)=>t * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var Dj=Symbol.for("react.element"),_j=Symbol.for("react.portal"),SA=Symbol.for("react.fragment"),CA=Symbol.for("react.strict_mode"),EA=Symbol.for("react.profiler"),PA=Symbol.for("react.provider"),TA=Symbol.for("react.context"),MCe=Symbol.for("react.server_context"),IA=Symbol.for("react.forward_ref"),OA=Symbol.for("react.suspense"),AA=Symbol.for("react.suspense_list"),kA=Symbol.for("react.memo"),MA=Symbol.for("react.lazy"),RCe=Symbol.for("react.offscreen"),EZ;EZ=Symbol.for("react.module.reference");function Nl(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case Dj:switch(e=e.type,e){case SA:case EA:case CA:case OA:case AA:return e;default:switch(e=e&&e.$$typeof,e){case MCe:case TA:case IA:case MA:case kA:case PA:return e;default:return t}}case _j:return t}}}gr.ContextConsumer=TA;gr.ContextProvider=PA;gr.Element=Dj;gr.ForwardRef=IA;gr.Fragment=SA;gr.Lazy=MA;gr.Memo=kA;gr.Portal=_j;gr.Profiler=EA;gr.StrictMode=CA;gr.Suspense=OA;gr.SuspenseList=AA;gr.isAsyncMode=function(){return!1};gr.isConcurrentMode=function(){return!1};gr.isContextConsumer=function(e){return Nl(e)===TA};gr.isContextProvider=function(e){return Nl(e)===PA};gr.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===Dj};gr.isForwardRef=function(e){return Nl(e)===IA};gr.isFragment=function(e){return Nl(e)===SA};gr.isLazy=function(e){return Nl(e)===MA};gr.isMemo=function(e){return Nl(e)===kA};gr.isPortal=function(e){return Nl(e)===_j};gr.isProfiler=function(e){return Nl(e)===EA};gr.isStrictMode=function(e){return Nl(e)===CA};gr.isSuspense=function(e){return Nl(e)===OA};gr.isSuspenseList=function(e){return Nl(e)===AA};gr.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===SA||e===EA||e===CA||e===OA||e===AA||e===RCe||typeof e=="object"&&e!==null&&(e.$$typeof===MA||e.$$typeof===kA||e.$$typeof===PA||e.$$typeof===TA||e.$$typeof===IA||e.$$typeof===EZ||e.getModuleId!==void 0)};gr.typeOf=Nl;CZ.exports=gr;var $Ce=CZ.exports;function PZ(e){const{variants:t,...n}=e,r={variants:t,style:x4(n),isProcessed:!0};return r.style===n||t&&t.forEach(o=>{typeof o.style!="function"&&(o.style=x4(o.style))}),r}const DCe=bb();function NP(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}function _Ce(e){return e?(t,n)=>n[e]:null}function NCe(e,t,n){e.theme=FCe(e.theme)?n:e.theme[t]||e.theme}function LP(e,t){const n=typeof t=="function"?t(e):t;if(Array.isArray(n))return n.flatMap(r=>LP(e,r));if(Array.isArray(n==null?void 0:n.variants)){let r;if(n.isProcessed)r=n.style;else{const{variants:o,...i}=n;r=i}return TZ(e,n.variants,[r])}return n!=null&&n.isProcessed?n.style:n}function TZ(e,t,n=[]){var o;let r;e:for(let i=0;i{ISe(s,P=>P.filter(T=>T!==tp));const{name:c,slot:u,skipVariantsResolver:d,skipSx:f,overridesResolver:p=_Ce(BCe(u)),...h}=l,m=d!==void 0?d:u&&u!=="Root"&&u!=="root"||!1,y=f||!1;let w=NP;u==="Root"||u==="root"?w=r:u?w=o:jCe(s)&&(w=void 0);const x=gZ(s,{shouldForwardProp:w,label:LCe(),...h}),C=P=>{if(typeof P=="function"&&P.__emotion_real!==P)return function(I){return LP(I,P)};if(Jc(P)){const T=PZ(P);return T.variants?function(A){return LP(A,T)}:T.style}return P},E=(...P)=>{const T=[],I=P.map(C),A=[];if(T.push(i),c&&p&&A.push(function(N){var _,z;const j=(z=(_=N.theme.components)==null?void 0:_[c])==null?void 0:z.styleOverrides;if(!j)return null;const D={};for(const F in j)D[F]=LP(N,j[F]);return p(N,D)}),c&&!m&&A.push(function(N){var D,_;const L=N.theme,j=(_=(D=L==null?void 0:L.components)==null?void 0:D[c])==null?void 0:_.variants;return j?TZ(N,j):null}),y||A.push(tp),Array.isArray(I[0])){const $=I.shift(),N=new Array(T.length).fill(""),L=new Array(A.length).fill("");let j;j=[...N,...$,...L],j.raw=[...N,...$.raw,...L],T.unshift(j)}const k=[...T,...I,...A],O=x(...k);return s.muiName&&(O.muiName=s.muiName),O};return x.withConfig&&(E.withConfig=x.withConfig),E}}function LCe(e,t){return void 0}function FCe(e){for(const t in e)return!1;return!0}function jCe(e){return typeof e=="string"&&e.charCodeAt(0)>96}function BCe(e){return e&&e.charAt(0).toLowerCase()+e.slice(1)}const or=IZ();function sg(e,t){const n={...t};for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)){const o=r;if(o==="components"||o==="slots")n[o]={...e[o],...n[o]};else if(o==="componentsProps"||o==="slotProps"){const i=e[o],a=t[o];if(!a)n[o]=i||{};else if(!i)n[o]=a;else{n[o]={...a};for(const s in i)if(Object.prototype.hasOwnProperty.call(i,s)){const l=s;n[o][l]=sg(i[l],a[l])}}}else n[o]===void 0&&(n[o]=e[o])}return n}function OZ(e){const{theme:t,name:n,props:r}=e;return!t||!t.components||!t.components[n]||!t.components[n].defaultProps?r:sg(t.components[n].defaultProps,r)}function RA({props:e,name:t,defaultTheme:n,themeId:r}){let o=SC(n);return r&&(o=o[r]||o),OZ({theme:o,name:t,props:e})}const xs=typeof window<"u"?v.useLayoutEffect:v.useEffect;function zCe(e,t,n,r,o){const[i,a]=v.useState(()=>o&&n?n(e).matches:r?r(e).matches:t);return xs(()=>{if(!n)return;const s=n(e),l=()=>{a(s.matches)};return l(),s.addEventListener("change",l),()=>{s.removeEventListener("change",l)}},[e,n]),i}const VCe={...yd},AZ=VCe.useSyncExternalStore;function HCe(e,t,n,r,o){const i=v.useCallback(()=>t,[t]),a=v.useMemo(()=>{if(o&&n)return()=>n(e).matches;if(r!==null){const{matches:u}=r(e);return()=>u}return i},[i,e,r,o,n]),[s,l]=v.useMemo(()=>{if(n===null)return[i,()=>()=>{}];const u=n(e);return[()=>u.matches,d=>(u.addEventListener("change",d),()=>{u.removeEventListener("change",d)})]},[i,n,e]);return AZ(l,s,a)}function CC(e,t={}){const n=$j(),r=typeof window<"u"&&typeof window.matchMedia<"u",{defaultMatches:o=!1,matchMedia:i=r?window.matchMedia:null,ssrMatchMedia:a=null,noSsr:s=!1}=OZ({name:"MuiUseMediaQuery",props:t,theme:n});let l=typeof e=="function"?e(n):e;return l=l.replace(/^@media( ?)/m,""),(AZ!==void 0?HCe:zCe)(l,o,i,a,s)}function UCe(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}function Nj(e,t=0,n=1){return UCe(e,t,n)}function WCe(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let n=e.match(t);return n&&n[0].length===1&&(n=n.map(r=>r+r)),n?`rgb${n.length===4?"a":""}(${n.map((r,o)=>o<3?parseInt(r,16):Math.round(parseInt(r,16)/255*1e3)/1e3).join(", ")})`:""}function pu(e){if(e.type)return e;if(e.charAt(0)==="#")return pu(WCe(e));const t=e.indexOf("("),n=e.substring(0,t);if(!["rgb","rgba","hsl","hsla","color"].includes(n))throw new Error(vd(9,e));let r=e.substring(t+1,e.length-1),o;if(n==="color"){if(r=r.split(" "),o=r.shift(),r.length===4&&r[3].charAt(0)==="/"&&(r[3]=r[3].slice(1)),!["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].includes(o))throw new Error(vd(10,o))}else r=r.split(",");return r=r.map(i=>parseFloat(i)),{type:n,values:r,colorSpace:o}}const GCe=e=>{const t=pu(e);return t.values.slice(0,3).map((n,r)=>t.type.includes("hsl")&&r!==0?`${n}%`:n).join(" ")},Aw=(e,t)=>{try{return GCe(e)}catch{return e}};function EC(e){const{type:t,colorSpace:n}=e;let{values:r}=e;return t.includes("rgb")?r=r.map((o,i)=>i<3?parseInt(o,10):o):t.includes("hsl")&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),t.includes("color")?r=`${n} ${r.join(" ")}`:r=`${r.join(", ")}`,`${t}(${r})`}function kZ(e){e=pu(e);const{values:t}=e,n=t[0],r=t[1]/100,o=t[2]/100,i=r*Math.min(o,1-o),a=(c,u=(c+n/30)%12)=>o-i*Math.max(Math.min(u-3,9-u,1),-1);let s="rgb";const l=[Math.round(a(0)*255),Math.round(a(8)*255),Math.round(a(4)*255)];return e.type==="hsla"&&(s+="a",l.push(t[3])),EC({type:s,values:l})}function U_(e){e=pu(e);let t=e.type==="hsl"||e.type==="hsla"?pu(kZ(e)).values:e.values;return t=t.map(n=>(e.type!=="color"&&(n/=255),n<=.03928?n/12.92:((n+.055)/1.055)**2.4)),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function qCe(e,t){const n=U_(e),r=U_(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function xt(e,t){return e=pu(e),t=Nj(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${t}`:e.values[3]=t,EC(e)}function bE(e,t,n){try{return xt(e,t)}catch{return e}}function bd(e,t){if(e=pu(e),t=Nj(t),e.type.includes("hsl"))e.values[2]*=1-t;else if(e.type.includes("rgb")||e.type.includes("color"))for(let n=0;n<3;n+=1)e.values[n]*=1-t;return EC(e)}function xr(e,t,n){try{return bd(e,t)}catch{return e}}function wd(e,t){if(e=pu(e),t=Nj(t),e.type.includes("hsl"))e.values[2]+=(100-e.values[2])*t;else if(e.type.includes("rgb"))for(let n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(e.type.includes("color"))for(let n=0;n<3;n+=1)e.values[n]+=(1-e.values[n])*t;return EC(e)}function Sr(e,t,n){try{return wd(e,t)}catch{return e}}function MZ(e,t=.15){return U_(e)>.5?bd(e,t):wd(e,t)}function wE(e,t,n){try{return MZ(e,t)}catch{return e}}function P4(...e){return e.reduce((t,n)=>n==null?t:function(...o){t.apply(this,o),n.apply(this,o)},()=>{})}function PC(e,t=166){let n;function r(...o){const i=()=>{e.apply(this,o)};clearTimeout(n),n=setTimeout(i,t)}return r.clear=()=>{clearTimeout(n)},r}function My(e,t){var n,r,o;return v.isValidElement(e)&&t.indexOf(e.type.muiName??((o=(r=(n=e.type)==null?void 0:n._payload)==null?void 0:r.value)==null?void 0:o.muiName))!==-1}function yi(e){return e&&e.ownerDocument||document}function Ss(e){return yi(e).defaultView||window}function vT(e,t){typeof e=="function"?e(t):e&&(e.current=t)}let T4=0;function KCe(e){const[t,n]=v.useState(e),r=e||t;return v.useEffect(()=>{t==null&&(T4+=1,n(`mui-${T4}`))},[t]),r}const YCe={...yd},I4=YCe.useId;function np(e){if(I4!==void 0){const t=I4();return e??t}return KCe(e)}function id({controlled:e,default:t,name:n,state:r="value"}){const{current:o}=v.useRef(e!==void 0),[i,a]=v.useState(t),s=o?e:i,l=v.useCallback(c=>{o||a(c)},[]);return[s,l]}function ei(e){const t=v.useRef(e);return xs(()=>{t.current=e}),v.useRef((...n)=>(0,t.current)(...n)).current}function Rr(...e){return v.useMemo(()=>e.every(t=>t==null)?null:t=>{e.forEach(n=>{vT(n,t)})},e)}const O4={};function RZ(e,t){const n=v.useRef(O4);return n.current===O4&&(n.current=e(t)),n}const QCe=[];function XCe(e){v.useEffect(e,QCe)}let $Z=class DZ{constructor(){Tt(this,"currentId",null);Tt(this,"clear",()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)});Tt(this,"disposeEffect",()=>this.clear)}static create(){return new DZ}start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,n()},t)}};function kf(){const e=RZ($Z.create).current;return XCe(e.disposeEffect),e}function bT(e){try{return e.matches(":focus-visible")}catch{}return!1}function _Z(e=window){const t=e.document.documentElement.clientWidth;return e.innerWidth-t}const Lj=e=>{const t=v.useRef({});return v.useEffect(()=>{t.current=e}),t.current};function NZ(e){return v.Children.toArray(e).filter(t=>v.isValidElement(t))}function rt(e,t,n=void 0){const r={};for(const o in e){const i=e[o];let a="",s=!0;for(let l=0;lr.match(/^on[A-Z]/)&&typeof e[r]=="function"&&!t.includes(r)).forEach(r=>{n[r]=e[r]}),n}function A4(e){if(e===void 0)return{};const t={};return Object.keys(e).filter(n=>!(n.match(/^on[A-Z]/)&&typeof e[n]=="function")).forEach(n=>{t[n]=e[n]}),t}function LZ(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:o,className:i}=e;if(!t){const p=de(n==null?void 0:n.className,i,o==null?void 0:o.className,r==null?void 0:r.className),h={...n==null?void 0:n.style,...o==null?void 0:o.style,...r==null?void 0:r.style},m={...n,...o,...r};return p.length>0&&(m.className=p),Object.keys(h).length>0&&(m.style=h),{props:m,internalRef:void 0}}const a=wT({...o,...r}),s=A4(r),l=A4(o),c=t(a),u=de(c==null?void 0:c.className,n==null?void 0:n.className,i,o==null?void 0:o.className,r==null?void 0:r.className),d={...c==null?void 0:c.style,...n==null?void 0:n.style,...o==null?void 0:o.style,...r==null?void 0:r.style},f={...c,...n,...l,...s};return u.length>0&&(f.className=u),Object.keys(d).length>0&&(f.style=d),{props:f,internalRef:c.ref}}function FZ(e,t,n){return typeof e=="function"?e(t,n):e}function hu(e){var d;const{elementType:t,externalSlotProps:n,ownerState:r,skipResolvingSlotProps:o=!1,...i}=e,a=o?{}:FZ(n,r),{props:s,internalRef:l}=LZ({...i,externalSlotProps:a}),c=Rr(l,a==null?void 0:a.ref,(d=e.additionalProps)==null?void 0:d.ref);return ry(t,{...s,ref:c},r)}function mp(e){var t;return parseInt(v.version,10)>=19?((t=e==null?void 0:e.props)==null?void 0:t.ref)||null:(e==null?void 0:e.ref)||null}const jZ=v.createContext(null);function $A(){return v.useContext(jZ)}const ZCe=typeof Symbol=="function"&&Symbol.for,BZ=ZCe?Symbol.for("mui.nested"):"__THEME_NESTED__";function e1e(e,t){return typeof t=="function"?t(e):{...e,...t}}function t1e(e){const{children:t,theme:n}=e,r=$A(),o=v.useMemo(()=>{const i=r===null?{...n}:e1e(r,n);return i!=null&&(i[BZ]=r!==null),i},[n,r]);return R.jsx(jZ.Provider,{value:o,children:t})}const zZ=v.createContext();function n1e({value:e,...t}){return R.jsx(zZ.Provider,{value:e??!0,...t})}const dr=()=>v.useContext(zZ)??!1,VZ=v.createContext(void 0);function r1e({value:e,children:t}){return R.jsx(VZ.Provider,{value:e,children:t})}function o1e(e){const{theme:t,name:n,props:r}=e;if(!t||!t.components||!t.components[n])return r;const o=t.components[n];return o.defaultProps?sg(o.defaultProps,r):!o.styleOverrides&&!o.variants?sg(o,r):r}function i1e({props:e,name:t}){const n=v.useContext(VZ);return o1e({props:e,name:t,theme:{components:n}})}const k4={};function M4(e,t,n,r=!1){return v.useMemo(()=>{const o=e&&t[e]||t;if(typeof n=="function"){const i=n(o),a=e?{...t,[e]:i}:i;return r?()=>a:a}return e?{...t,[e]:n}:{...t,...n}},[e,t,n,r])}function HZ(e){const{children:t,theme:n,themeId:r}=e,o=$j(k4),i=$A()||k4,a=M4(r,o,n),s=M4(r,i,n,!0),l=a.direction==="rtl";return R.jsx(t1e,{theme:s,children:R.jsx(vC.Provider,{value:a,children:R.jsx(n1e,{value:l,children:R.jsx(r1e,{value:a==null?void 0:a.components,children:t})})})})}const R4={theme:void 0};function a1e(e){let t,n;return function(o){let i=t;return(i===void 0||o.theme!==n)&&(R4.theme=o.theme,i=PZ(e(R4)),t=i,n=o.theme),i}}const Fj="mode",jj="color-scheme",s1e="data-color-scheme";function l1e(e){const{defaultMode:t="system",defaultLightColorScheme:n="light",defaultDarkColorScheme:r="dark",modeStorageKey:o=Fj,colorSchemeStorageKey:i=jj,attribute:a=s1e,colorSchemeNode:s="document.documentElement",nonce:l}=e||{};let c="",u=a;if(a==="class"&&(u=".%s"),a==="data"&&(u="[data-%s]"),u.startsWith(".")){const f=u.substring(1);c+=`${s}.classList.remove('${f}'.replace('%s', light), '${f}'.replace('%s', dark)); + */var jj=Symbol.for("react.element"),Bj=Symbol.for("react.portal"),$A=Symbol.for("react.fragment"),DA=Symbol.for("react.strict_mode"),_A=Symbol.for("react.profiler"),NA=Symbol.for("react.provider"),LA=Symbol.for("react.context"),BCe=Symbol.for("react.server_context"),FA=Symbol.for("react.forward_ref"),jA=Symbol.for("react.suspense"),BA=Symbol.for("react.suspense_list"),zA=Symbol.for("react.memo"),VA=Symbol.for("react.lazy"),zCe=Symbol.for("react.offscreen"),AZ;AZ=Symbol.for("react.module.reference");function Fl(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case jj:switch(e=e.type,e){case $A:case _A:case DA:case jA:case BA:return e;default:switch(e=e&&e.$$typeof,e){case BCe:case LA:case FA:case VA:case zA:case NA:return e;default:return t}}case Bj:return t}}}gr.ContextConsumer=LA;gr.ContextProvider=NA;gr.Element=jj;gr.ForwardRef=FA;gr.Fragment=$A;gr.Lazy=VA;gr.Memo=zA;gr.Portal=Bj;gr.Profiler=_A;gr.StrictMode=DA;gr.Suspense=jA;gr.SuspenseList=BA;gr.isAsyncMode=function(){return!1};gr.isConcurrentMode=function(){return!1};gr.isContextConsumer=function(e){return Fl(e)===LA};gr.isContextProvider=function(e){return Fl(e)===NA};gr.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===jj};gr.isForwardRef=function(e){return Fl(e)===FA};gr.isFragment=function(e){return Fl(e)===$A};gr.isLazy=function(e){return Fl(e)===VA};gr.isMemo=function(e){return Fl(e)===zA};gr.isPortal=function(e){return Fl(e)===Bj};gr.isProfiler=function(e){return Fl(e)===_A};gr.isStrictMode=function(e){return Fl(e)===DA};gr.isSuspense=function(e){return Fl(e)===jA};gr.isSuspenseList=function(e){return Fl(e)===BA};gr.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===$A||e===_A||e===DA||e===jA||e===BA||e===zCe||typeof e=="object"&&e!==null&&(e.$$typeof===VA||e.$$typeof===zA||e.$$typeof===NA||e.$$typeof===LA||e.$$typeof===FA||e.$$typeof===AZ||e.getModuleId!==void 0)};gr.typeOf=Fl;OZ.exports=gr;var VCe=OZ.exports;function kZ(e){const{variants:t,...n}=e,r={variants:t,style:P4(n),isProcessed:!0};return r.style===n||t&&t.forEach(o=>{typeof o.style!="function"&&(o.style=P4(o.style))}),r}const HCe=xb();function qP(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}function UCe(e){return e?(t,n)=>n[e]:null}function WCe(e,t,n){e.theme=qCe(e.theme)?n:e.theme[t]||e.theme}function KP(e,t){const n=typeof t=="function"?t(e):t;if(Array.isArray(n))return n.flatMap(r=>KP(e,r));if(Array.isArray(n==null?void 0:n.variants)){let r;if(n.isProcessed)r=n.style;else{const{variants:o,...i}=n;r=i}return MZ(e,n.variants,[r])}return n!=null&&n.isProcessed?n.style:n}function MZ(e,t,n=[]){var o;let r;e:for(let i=0;i{NSe(s,P=>P.filter(T=>T!==rp));const{name:c,slot:u,skipVariantsResolver:d,skipSx:f,overridesResolver:p=UCe(YCe(u)),...h}=l,m=d!==void 0?d:u&&u!=="Root"&&u!=="root"||!1,y=f||!1;let w=qP;u==="Root"||u==="root"?w=r:u?w=o:KCe(s)&&(w=void 0);const x=wZ(s,{shouldForwardProp:w,label:GCe(),...h}),S=P=>{if(typeof P=="function"&&P.__emotion_real!==P)return function(I){return KP(I,P)};if(eu(P)){const T=kZ(P);return T.variants?function(A){return KP(A,T)}:T.style}return P},E=(...P)=>{const T=[],I=P.map(S),A=[];if(T.push(i),c&&p&&A.push(function(N){var _,z;const j=(z=(_=N.theme.components)==null?void 0:_[c])==null?void 0:z.styleOverrides;if(!j)return null;const D={};for(const F in j)D[F]=KP(N,j[F]);return p(N,D)}),c&&!m&&A.push(function(N){var D,_;const L=N.theme,j=(_=(D=L==null?void 0:L.components)==null?void 0:D[c])==null?void 0:_.variants;return j?MZ(N,j):null}),y||A.push(rp),Array.isArray(I[0])){const $=I.shift(),N=new Array(T.length).fill(""),L=new Array(A.length).fill("");let j;j=[...N,...$,...L],j.raw=[...N,...$.raw,...L],T.unshift(j)}const k=[...T,...I,...A],O=x(...k);return s.muiName&&(O.muiName=s.muiName),O};return x.withConfig&&(E.withConfig=x.withConfig),E}}function GCe(e,t){return void 0}function qCe(e){for(const t in e)return!1;return!0}function KCe(e){return typeof e=="string"&&e.charCodeAt(0)>96}function YCe(e){return e&&e.charAt(0).toLowerCase()+e.slice(1)}const or=RZ();function cg(e,t){const n={...t};for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)){const o=r;if(o==="components"||o==="slots")n[o]={...e[o],...n[o]};else if(o==="componentsProps"||o==="slotProps"){const i=e[o],a=t[o];if(!a)n[o]=i||{};else if(!i)n[o]=a;else{n[o]={...a};for(const s in i)if(Object.prototype.hasOwnProperty.call(i,s)){const l=s;n[o][l]=cg(i[l],a[l])}}}else n[o]===void 0&&(n[o]=e[o])}return n}function $Z(e){const{theme:t,name:n,props:r}=e;return!t||!t.components||!t.components[n]||!t.components[n].defaultProps?r:cg(t.components[n].defaultProps,r)}function HA({props:e,name:t,defaultTheme:n,themeId:r}){let o=OC(n);return r&&(o=o[r]||o),$Z({theme:o,name:t,props:e})}const Cs=typeof window<"u"?v.useLayoutEffect:v.useEffect;function QCe(e,t,n,r,o){const[i,a]=v.useState(()=>o&&n?n(e).matches:r?r(e).matches:t);return Cs(()=>{if(!n)return;const s=n(e),l=()=>{a(s.matches)};return l(),s.addEventListener("change",l),()=>{s.removeEventListener("change",l)}},[e,n]),i}const XCe={...vd},DZ=XCe.useSyncExternalStore;function JCe(e,t,n,r,o){const i=v.useCallback(()=>t,[t]),a=v.useMemo(()=>{if(o&&n)return()=>n(e).matches;if(r!==null){const{matches:u}=r(e);return()=>u}return i},[i,e,r,o,n]),[s,l]=v.useMemo(()=>{if(n===null)return[i,()=>()=>{}];const u=n(e);return[()=>u.matches,d=>(u.addEventListener("change",d),()=>{u.removeEventListener("change",d)})]},[i,n,e]);return DZ(l,s,a)}function op(e,t={}){const n=Fj(),r=typeof window<"u"&&typeof window.matchMedia<"u",{defaultMatches:o=!1,matchMedia:i=r?window.matchMedia:null,ssrMatchMedia:a=null,noSsr:s=!1}=$Z({name:"MuiUseMediaQuery",props:t,theme:n});let l=typeof e=="function"?e(n):e;return l=l.replace(/^@media( ?)/m,""),(DZ!==void 0?JCe:QCe)(l,o,i,a,s)}function ZCe(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}function zj(e,t=0,n=1){return ZCe(e,t,n)}function e1e(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let n=e.match(t);return n&&n[0].length===1&&(n=n.map(r=>r+r)),n?`rgb${n.length===4?"a":""}(${n.map((r,o)=>o<3?parseInt(r,16):Math.round(parseInt(r,16)/255*1e3)/1e3).join(", ")})`:""}function gu(e){if(e.type)return e;if(e.charAt(0)==="#")return gu(e1e(e));const t=e.indexOf("("),n=e.substring(0,t);if(!["rgb","rgba","hsl","hsla","color"].includes(n))throw new Error(bd(9,e));let r=e.substring(t+1,e.length-1),o;if(n==="color"){if(r=r.split(" "),o=r.shift(),r.length===4&&r[3].charAt(0)==="/"&&(r[3]=r[3].slice(1)),!["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].includes(o))throw new Error(bd(10,o))}else r=r.split(",");return r=r.map(i=>parseFloat(i)),{type:n,values:r,colorSpace:o}}const t1e=e=>{const t=gu(e);return t.values.slice(0,3).map((n,r)=>t.type.includes("hsl")&&r!==0?`${n}%`:n).join(" ")},Dw=(e,t)=>{try{return t1e(e)}catch{return e}};function kC(e){const{type:t,colorSpace:n}=e;let{values:r}=e;return t.includes("rgb")?r=r.map((o,i)=>i<3?parseInt(o,10):o):t.includes("hsl")&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),t.includes("color")?r=`${n} ${r.join(" ")}`:r=`${r.join(", ")}`,`${t}(${r})`}function _Z(e){e=gu(e);const{values:t}=e,n=t[0],r=t[1]/100,o=t[2]/100,i=r*Math.min(o,1-o),a=(c,u=(c+n/30)%12)=>o-i*Math.max(Math.min(u-3,9-u,1),-1);let s="rgb";const l=[Math.round(a(0)*255),Math.round(a(8)*255),Math.round(a(4)*255)];return e.type==="hsla"&&(s+="a",l.push(t[3])),kC({type:s,values:l})}function Q_(e){e=gu(e);let t=e.type==="hsl"||e.type==="hsla"?gu(_Z(e)).values:e.values;return t=t.map(n=>(e.type!=="color"&&(n/=255),n<=.03928?n/12.92:((n+.055)/1.055)**2.4)),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function n1e(e,t){const n=Q_(e),r=Q_(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function St(e,t){return e=gu(e),t=zj(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${t}`:e.values[3]=t,kC(e)}function kE(e,t,n){try{return St(e,t)}catch{return e}}function wd(e,t){if(e=gu(e),t=zj(t),e.type.includes("hsl"))e.values[2]*=1-t;else if(e.type.includes("rgb")||e.type.includes("color"))for(let n=0;n<3;n+=1)e.values[n]*=1-t;return kC(e)}function xr(e,t,n){try{return wd(e,t)}catch{return e}}function xd(e,t){if(e=gu(e),t=zj(t),e.type.includes("hsl"))e.values[2]+=(100-e.values[2])*t;else if(e.type.includes("rgb"))for(let n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(e.type.includes("color"))for(let n=0;n<3;n+=1)e.values[n]+=(1-e.values[n])*t;return kC(e)}function Sr(e,t,n){try{return xd(e,t)}catch{return e}}function NZ(e,t=.15){return Q_(e)>.5?wd(e,t):xd(e,t)}function ME(e,t,n){try{return NZ(e,t)}catch{return e}}function A4(...e){return e.reduce((t,n)=>n==null?t:function(...o){t.apply(this,o),n.apply(this,o)},()=>{})}function MC(e,t=166){let n;function r(...o){const i=()=>{e.apply(this,o)};clearTimeout(n),n=setTimeout(i,t)}return r.clear=()=>{clearTimeout(n)},r}function Ry(e,t){var n,r,o;return v.isValidElement(e)&&t.indexOf(e.type.muiName??((o=(r=(n=e.type)==null?void 0:n._payload)==null?void 0:r.value)==null?void 0:o.muiName))!==-1}function bi(e){return e&&e.ownerDocument||document}function Es(e){return bi(e).defaultView||window}function kT(e,t){typeof e=="function"?e(t):e&&(e.current=t)}let k4=0;function r1e(e){const[t,n]=v.useState(e),r=e||t;return v.useEffect(()=>{t==null&&(k4+=1,n(`mui-${k4}`))},[t]),r}const o1e={...vd},M4=o1e.useId;function ip(e){if(M4!==void 0){const t=M4();return e??t}return r1e(e)}function ad({controlled:e,default:t,name:n,state:r="value"}){const{current:o}=v.useRef(e!==void 0),[i,a]=v.useState(t),s=o?e:i,l=v.useCallback(c=>{o||a(c)},[]);return[s,l]}function ei(e){const t=v.useRef(e);return Cs(()=>{t.current=e}),v.useRef((...n)=>(0,t.current)(...n)).current}function Rr(...e){return v.useMemo(()=>e.every(t=>t==null)?null:t=>{e.forEach(n=>{kT(n,t)})},e)}const R4={};function LZ(e,t){const n=v.useRef(R4);return n.current===R4&&(n.current=e(t)),n}const i1e=[];function a1e(e){v.useEffect(e,i1e)}let FZ=class jZ{constructor(){mt(this,"currentId",null);mt(this,"clear",()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)});mt(this,"disposeEffect",()=>this.clear)}static create(){return new jZ}start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,n()},t)}};function Mf(){const e=LZ(FZ.create).current;return a1e(e.disposeEffect),e}function MT(e){try{return e.matches(":focus-visible")}catch{}return!1}function BZ(e=window){const t=e.document.documentElement.clientWidth;return e.innerWidth-t}const Vj=e=>{const t=v.useRef({});return v.useEffect(()=>{t.current=e}),t.current};function zZ(e){return v.Children.toArray(e).filter(t=>v.isValidElement(t))}function rt(e,t,n=void 0){const r={};for(const o in e){const i=e[o];let a="",s=!0;for(let l=0;lr.match(/^on[A-Z]/)&&typeof e[r]=="function"&&!t.includes(r)).forEach(r=>{n[r]=e[r]}),n}function $4(e){if(e===void 0)return{};const t={};return Object.keys(e).filter(n=>!(n.match(/^on[A-Z]/)&&typeof e[n]=="function")).forEach(n=>{t[n]=e[n]}),t}function VZ(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:o,className:i}=e;if(!t){const p=de(n==null?void 0:n.className,i,o==null?void 0:o.className,r==null?void 0:r.className),h={...n==null?void 0:n.style,...o==null?void 0:o.style,...r==null?void 0:r.style},m={...n,...o,...r};return p.length>0&&(m.className=p),Object.keys(h).length>0&&(m.style=h),{props:m,internalRef:void 0}}const a=RT({...o,...r}),s=$4(r),l=$4(o),c=t(a),u=de(c==null?void 0:c.className,n==null?void 0:n.className,i,o==null?void 0:o.className,r==null?void 0:r.className),d={...c==null?void 0:c.style,...n==null?void 0:n.style,...o==null?void 0:o.style,...r==null?void 0:r.style},f={...c,...n,...l,...s};return u.length>0&&(f.className=u),Object.keys(d).length>0&&(f.style=d),{props:f,internalRef:c.ref}}function HZ(e,t,n){return typeof e=="function"?e(t,n):e}function mu(e){var d;const{elementType:t,externalSlotProps:n,ownerState:r,skipResolvingSlotProps:o=!1,...i}=e,a=o?{}:HZ(n,r),{props:s,internalRef:l}=VZ({...i,externalSlotProps:a}),c=Rr(l,a==null?void 0:a.ref,(d=e.additionalProps)==null?void 0:d.ref);return oy(t,{...s,ref:c},r)}function bp(e){var t;return parseInt(v.version,10)>=19?((t=e==null?void 0:e.props)==null?void 0:t.ref)||null:(e==null?void 0:e.ref)||null}const UZ=v.createContext(null);function UA(){return v.useContext(UZ)}const l1e=typeof Symbol=="function"&&Symbol.for,WZ=l1e?Symbol.for("mui.nested"):"__THEME_NESTED__";function c1e(e,t){return typeof t=="function"?t(e):{...e,...t}}function u1e(e){const{children:t,theme:n}=e,r=UA(),o=v.useMemo(()=>{const i=r===null?{...n}:c1e(r,n);return i!=null&&(i[WZ]=r!==null),i},[n,r]);return R.jsx(UZ.Provider,{value:o,children:t})}const GZ=v.createContext();function d1e({value:e,...t}){return R.jsx(GZ.Provider,{value:e??!0,...t})}const dr=()=>v.useContext(GZ)??!1,qZ=v.createContext(void 0);function f1e({value:e,children:t}){return R.jsx(qZ.Provider,{value:e,children:t})}function p1e(e){const{theme:t,name:n,props:r}=e;if(!t||!t.components||!t.components[n])return r;const o=t.components[n];return o.defaultProps?cg(o.defaultProps,r):!o.styleOverrides&&!o.variants?cg(o,r):r}function h1e({props:e,name:t}){const n=v.useContext(qZ);return p1e({props:e,name:t,theme:{components:n}})}const D4={};function _4(e,t,n,r=!1){return v.useMemo(()=>{const o=e&&t[e]||t;if(typeof n=="function"){const i=n(o),a=e?{...t,[e]:i}:i;return r?()=>a:a}return e?{...t,[e]:n}:{...t,...n}},[e,t,n,r])}function KZ(e){const{children:t,theme:n,themeId:r}=e,o=Fj(D4),i=UA()||D4,a=_4(r,o,n),s=_4(r,i,n,!0),l=a.direction==="rtl";return R.jsx(u1e,{theme:s,children:R.jsx(EC.Provider,{value:a,children:R.jsx(d1e,{value:l,children:R.jsx(f1e,{value:a==null?void 0:a.components,children:t})})})})}const N4={theme:void 0};function g1e(e){let t,n;return function(o){let i=t;return(i===void 0||o.theme!==n)&&(N4.theme=o.theme,i=kZ(e(N4)),t=i,n=o.theme),i}}const Hj="mode",Uj="color-scheme",m1e="data-color-scheme";function y1e(e){const{defaultMode:t="system",defaultLightColorScheme:n="light",defaultDarkColorScheme:r="dark",modeStorageKey:o=Hj,colorSchemeStorageKey:i=Uj,attribute:a=m1e,colorSchemeNode:s="document.documentElement",nonce:l}=e||{};let c="",u=a;if(a==="class"&&(u=".%s"),a==="data"&&(u="[data-%s]"),u.startsWith(".")){const f=u.substring(1);c+=`${s}.classList.remove('${f}'.replace('%s', light), '${f}'.replace('%s', dark)); ${s}.classList.add('${f}'.replace('%s', colorScheme));`}const d=u.match(/\[([^\]]+)\]/);if(d){const[f,p]=d[1].split("=");p||(c+=`${s}.removeAttribute('${f}'.replace('%s', light)); ${s}.removeAttribute('${f}'.replace('%s', dark));`),c+=` ${s}.setAttribute('${f}'.replace('%s', colorScheme), ${p?`${p}.replace('%s', colorScheme)`:'""'});`}else c+=`${s}.setAttribute('${u}', colorScheme);`;return R.jsx("script",{suppressHydrationWarning:!0,nonce:typeof window>"u"?l:"",dangerouslySetInnerHTML:{__html:`(function() { @@ -62,15 +62,15 @@ try { if (colorScheme) { ${c} } -} catch(e){}})();`}},"mui-color-scheme-init")}function $4(e){if(typeof window<"u"&&typeof window.matchMedia=="function"&&e==="system")return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function UZ(e,t){if(e.mode==="light"||e.mode==="system"&&e.systemMode==="light")return t("light");if(e.mode==="dark"||e.mode==="system"&&e.systemMode==="dark")return t("dark")}function c1e(e){return UZ(e,t=>{if(t==="light")return e.lightColorScheme;if(t==="dark")return e.darkColorScheme})}function S$(e,t){if(typeof window>"u")return;let n;try{n=localStorage.getItem(e)||void 0,n||localStorage.setItem(e,t)}catch{}return n||t}function u1e(e){const{defaultMode:t="light",defaultLightColorScheme:n,defaultDarkColorScheme:r,supportedColorSchemes:o=[],modeStorageKey:i=Fj,colorSchemeStorageKey:a=jj,storageWindow:s=typeof window>"u"?void 0:window}=e,l=o.join(","),c=o.length>1,[u,d]=v.useState(()=>{const C=S$(i,t),E=S$(`${a}-light`,n),P=S$(`${a}-dark`,r);return{mode:C,systemMode:$4(C),lightColorScheme:E,darkColorScheme:P}}),[,f]=v.useState(!1),p=v.useRef(!1);v.useEffect(()=>{c&&f(!0),p.current=!0},[c]);const h=c1e(u),m=v.useCallback(C=>{d(E=>{if(C===E.mode)return E;const P=C??t;try{localStorage.setItem(i,P)}catch{}return{...E,mode:P,systemMode:$4(P)}})},[i,t]),y=v.useCallback(C=>{C?typeof C=="string"?C&&!l.includes(C)?console.error(`\`${C}\` does not exist in \`theme.colorSchemes\`.`):d(E=>{const P={...E};return UZ(E,T=>{try{localStorage.setItem(`${a}-${T}`,C)}catch{}T==="light"&&(P.lightColorScheme=C),T==="dark"&&(P.darkColorScheme=C)}),P}):d(E=>{const P={...E},T=C.light===null?n:C.light,I=C.dark===null?r:C.dark;if(T)if(!l.includes(T))console.error(`\`${T}\` does not exist in \`theme.colorSchemes\`.`);else{P.lightColorScheme=T;try{localStorage.setItem(`${a}-light`,T)}catch{}}if(I)if(!l.includes(I))console.error(`\`${I}\` does not exist in \`theme.colorSchemes\`.`);else{P.darkColorScheme=I;try{localStorage.setItem(`${a}-dark`,I)}catch{}}return P}):d(E=>{try{localStorage.setItem(`${a}-light`,n),localStorage.setItem(`${a}-dark`,r)}catch{}return{...E,lightColorScheme:n,darkColorScheme:r}})},[l,a,n,r]),w=v.useCallback(C=>{u.mode==="system"&&d(E=>{const P=C!=null&&C.matches?"dark":"light";return E.systemMode===P?E:{...E,systemMode:P}})},[u.mode]),x=v.useRef(w);return x.current=w,v.useEffect(()=>{if(typeof window.matchMedia!="function"||!c)return;const C=(...P)=>x.current(...P),E=window.matchMedia("(prefers-color-scheme: dark)");return E.addListener(C),C(E),()=>{E.removeListener(C)}},[c]),v.useEffect(()=>{if(s&&c){const C=E=>{const P=E.newValue;typeof E.key=="string"&&E.key.startsWith(a)&&(!P||l.match(P))&&(E.key.endsWith("light")&&y({light:P}),E.key.endsWith("dark")&&y({dark:P})),E.key===i&&(!P||["light","dark","system"].includes(P))&&m(P||t)};return s.addEventListener("storage",C),()=>{s.removeEventListener("storage",C)}}},[y,m,i,a,l,t,s,c]),{...u,mode:p.current||!c?u.mode:void 0,systemMode:p.current||!c?u.systemMode:void 0,colorScheme:p.current||!c?h:void 0,setMode:m,setColorScheme:y}}const d1e="*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}";function f1e(e){const{themeId:t,theme:n={},modeStorageKey:r=Fj,colorSchemeStorageKey:o=jj,disableTransitionOnChange:i=!1,defaultColorScheme:a,resolveTheme:s}=e,l={allColorSchemes:[],colorScheme:void 0,darkColorScheme:void 0,lightColorScheme:void 0,mode:void 0,setColorScheme:()=>{},setMode:()=>{},systemMode:void 0},c=v.createContext(void 0),u=()=>v.useContext(c)||l;function d(m){var ye,Pe,Ae,Me,We;const{children:y,theme:w,modeStorageKey:x=r,colorSchemeStorageKey:C=o,disableTransitionOnChange:E=i,storageWindow:P=typeof window>"u"?void 0:window,documentNode:T=typeof document>"u"?void 0:document,colorSchemeNode:I=typeof document>"u"?void 0:document.documentElement,disableNestedContext:A=!1,disableStyleSheetGeneration:k=!1,defaultMode:O="system"}=m,$=v.useRef(!1),N=$A(),L=v.useContext(c),j=!!L&&!A,D=v.useMemo(()=>w||(typeof n=="function"?n():n),[w]),_=D[t],{colorSchemes:z={},components:F={},cssVarPrefix:V,...U}=_||D,q=Object.keys(z).filter(He=>!!z[He]).join(","),X=v.useMemo(()=>q.split(","),[q]),ie=typeof a=="string"?a:a.light,ee=typeof a=="string"?a:a.dark,Q=z[ie]&&z[ee]?O:((Pe=(ye=z[U.defaultColorScheme])==null?void 0:ye.palette)==null?void 0:Pe.mode)||((Ae=U.palette)==null?void 0:Ae.mode),{mode:te,setMode:pe,systemMode:ae,lightColorScheme:se,darkColorScheme:re,colorScheme:fe,setColorScheme:Z}=u1e({supportedColorSchemes:X,defaultLightColorScheme:ie,defaultDarkColorScheme:ee,modeStorageKey:x,colorSchemeStorageKey:C,defaultMode:Q,storageWindow:P});let ce=te,ge=fe;j&&(ce=L.mode,ge=L.colorScheme);const we=ge||U.defaultColorScheme,me=((Me=U.generateThemeVars)==null?void 0:Me.call(U))||U.vars,Se={...U,components:F,colorSchemes:z,cssVarPrefix:V,vars:me};if(typeof Se.generateSpacing=="function"&&(Se.spacing=Se.generateSpacing()),we){const He=z[we];He&&typeof He=="object"&&Object.keys(He).forEach(Xe=>{He[Xe]&&typeof He[Xe]=="object"?Se[Xe]={...Se[Xe],...He[Xe]}:Se[Xe]=He[Xe]})}const xe=U.colorSchemeSelector;v.useEffect(()=>{if(ge&&I&&xe&&xe!=="media"){const He=xe;let Xe=xe;if(He==="class"&&(Xe=".%s"),He==="data"&&(Xe="[data-%s]"),He!=null&&He.startsWith("data-")&&!He.includes("%s")&&(Xe=`[${He}="%s"]`),Xe.startsWith("."))I.classList.remove(...X.map(ht=>Xe.substring(1).replace("%s",ht))),I.classList.add(Xe.substring(1).replace("%s",ge));else{const ht=Xe.replace("%s",ge).match(/\[([^\]]+)\]/);if(ht){const[ot,et]=ht[1].split("=");et||X.forEach(St=>{I.removeAttribute(ot.replace(ge,St))}),I.setAttribute(ot,et?et.replace(/"|'/g,""):"")}else I.setAttribute(Xe,ge)}}},[ge,xe,I,X]),v.useEffect(()=>{let He;if(E&&$.current&&T){const Xe=T.createElement("style");Xe.appendChild(T.createTextNode(d1e)),T.head.appendChild(Xe),window.getComputedStyle(T.body),He=setTimeout(()=>{T.head.removeChild(Xe)},1)}return()=>{clearTimeout(He)}},[ge,E,T]),v.useEffect(()=>($.current=!0,()=>{$.current=!1}),[]);const ke=v.useMemo(()=>({allColorSchemes:X,colorScheme:ge,darkColorScheme:re,lightColorScheme:se,mode:ce,setColorScheme:Z,setMode:pe,systemMode:ae}),[X,ge,re,se,ce,Z,pe,ae]);let De=!0;(k||U.cssVariables===!1||j&&(N==null?void 0:N.cssVarPrefix)===V)&&(De=!1);const _e=R.jsxs(v.Fragment,{children:[R.jsx(HZ,{themeId:_?t:void 0,theme:s?s(Se):Se,children:y}),De&&R.jsx(hZ,{styles:((We=Se.generateStyleSheets)==null?void 0:We.call(Se))||[]})]});return j?_e:R.jsx(c.Provider,{value:ke,children:_e})}const f=typeof a=="string"?a:a.light,p=typeof a=="string"?a:a.dark;return{CssVarsProvider:d,useColorScheme:u,getInitColorSchemeScript:m=>l1e({colorSchemeStorageKey:o,defaultLightColorScheme:f,defaultDarkColorScheme:p,modeStorageKey:r,...m})}}function p1e(e=""){function t(...r){if(!r.length)return"";const o=r[0];return typeof o=="string"&&!o.match(/(#|\(|\)|(-?(\d*\.)?\d+)(px|em|%|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc))|^(-?(\d*\.)?\d+)$|(\d+ \d+ \d+)/)?`, var(--${e?`${e}-`:""}${o}${t(...r.slice(1))})`:`, ${o}`}return(r,...o)=>`var(--${e?`${e}-`:""}${r}${t(...o)})`}const D4=(e,t,n,r=[])=>{let o=e;t.forEach((i,a)=>{a===t.length-1?Array.isArray(o)?o[Number(i)]=n:o&&typeof o=="object"&&(o[i]=n):o&&typeof o=="object"&&(o[i]||(o[i]=r.includes(i)?[]:{}),o=o[i])})},h1e=(e,t,n)=>{function r(o,i=[],a=[]){Object.entries(o).forEach(([s,l])=>{(!n||n&&!n([...i,s]))&&l!=null&&(typeof l=="object"&&Object.keys(l).length>0?r(l,[...i,s],Array.isArray(l)?[...a,s]:a):t([...i,s],l,a))})}r(e)},g1e=(e,t)=>typeof t=="number"?["lineHeight","fontWeight","opacity","zIndex"].some(r=>e.includes(r))||e[e.length-1].toLowerCase().includes("opacity")?t:`${t}px`:t;function C$(e,t){const{prefix:n,shouldSkipGeneratingVar:r}=t||{},o={},i={},a={};return h1e(e,(s,l,c)=>{if((typeof l=="string"||typeof l=="number")&&(!r||!r(s,l))){const u=`--${n?`${n}-`:""}${s.join("-")}`,d=g1e(s,l);Object.assign(o,{[u]:d}),D4(i,s,`var(${u})`,c),D4(a,s,`var(${u}, ${d})`,c)}},s=>s[0]==="vars"),{css:o,vars:i,varsWithDefaults:a}}function m1e(e,t={}){const{getSelector:n=y,disableCssColorScheme:r,colorSchemeSelector:o}=t,{colorSchemes:i={},components:a,defaultColorScheme:s="light",...l}=e,{vars:c,css:u,varsWithDefaults:d}=C$(l,t);let f=d;const p={},{[s]:h,...m}=i;if(Object.entries(m||{}).forEach(([C,E])=>{const{vars:P,css:T,varsWithDefaults:I}=C$(E,t);f=Oo(f,I),p[C]={css:T,vars:P}}),h){const{css:C,vars:E,varsWithDefaults:P}=C$(h,t);f=Oo(f,P),p[s]={css:C,vars:E}}function y(C,E){var T,I;let P=o;if(o==="class"&&(P=".%s"),o==="data"&&(P="[data-%s]"),o!=null&&o.startsWith("data-")&&!o.includes("%s")&&(P=`[${o}="%s"]`),C){if(P==="media")return e.defaultColorScheme===C?":root":{[`@media (prefers-color-scheme: ${((I=(T=i[C])==null?void 0:T.palette)==null?void 0:I.mode)||C})`]:{":root":E}};if(P)return e.defaultColorScheme===C?`:root, ${P.replace("%s",String(C))}`:P.replace("%s",String(C))}return":root"}return{vars:f,generateThemeVars:()=>{let C={...c};return Object.entries(p).forEach(([,{vars:E}])=>{C=Oo(C,E)}),C},generateStyleSheets:()=>{var A,k;const C=[],E=e.defaultColorScheme||"light";function P(O,$){Object.keys($).length&&C.push(typeof O=="string"?{[O]:{...$}}:O)}P(n(void 0,{...u}),u);const{[E]:T,...I}=p;if(T){const{css:O}=T,$=(k=(A=i[E])==null?void 0:A.palette)==null?void 0:k.mode,N=!r&&$?{colorScheme:$,...O}:{...O};P(n(E,{...N}),N)}return Object.entries(I).forEach(([O,{css:$}])=>{var j,D;const N=(D=(j=i[O])==null?void 0:j.palette)==null?void 0:D.mode,L=!r&&N?{colorScheme:N,...$}:{...$};P(n(O,{...L}),L)}),C}}}function y1e(e){return function(n){return e==="media"?`@media (prefers-color-scheme: ${n})`:e?e.startsWith("data-")&&!e.includes("%s")?`[${e}="${n}"] &`:e==="class"?`.${n} &`:e==="data"?`[data-${n}] &`:`${e.replace("%s",n)} &`:"&"}}const v1e=bb(),b1e=or("div",{name:"MuiContainer",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`maxWidth${Ce(String(n.maxWidth))}`],n.fixed&&t.fixed,n.disableGutters&&t.disableGutters]}}),w1e=e=>RA({props:e,name:"MuiContainer",defaultTheme:v1e}),x1e=(e,t)=>{const n=l=>nt(t,l),{classes:r,fixed:o,disableGutters:i,maxWidth:a}=e,s={root:["root",a&&`maxWidth${Ce(String(a))}`,o&&"fixed",i&&"disableGutters"]};return rt(s,n,r)};function S1e(e={}){const{createStyledComponent:t=b1e,useThemeProps:n=w1e,componentName:r="MuiContainer"}=e,o=t(({theme:a,ownerState:s})=>({width:"100%",marginLeft:"auto",boxSizing:"border-box",marginRight:"auto",...!s.disableGutters&&{paddingLeft:a.spacing(2),paddingRight:a.spacing(2),[a.breakpoints.up("sm")]:{paddingLeft:a.spacing(3),paddingRight:a.spacing(3)}}}),({theme:a,ownerState:s})=>s.fixed&&Object.keys(a.breakpoints.values).reduce((l,c)=>{const u=c,d=a.breakpoints.values[u];return d!==0&&(l[a.breakpoints.up(u)]={maxWidth:`${d}${a.breakpoints.unit}`}),l},{}),({theme:a,ownerState:s})=>({...s.maxWidth==="xs"&&{[a.breakpoints.up("xs")]:{maxWidth:Math.max(a.breakpoints.values.xs,444)}},...s.maxWidth&&s.maxWidth!=="xs"&&{[a.breakpoints.up(s.maxWidth)]:{maxWidth:`${a.breakpoints.values[s.maxWidth]}${a.breakpoints.unit}`}}}));return v.forwardRef(function(s,l){const c=n(s),{className:u,component:d="div",disableGutters:f=!1,fixed:p=!1,maxWidth:h="lg",classes:m,...y}=c,w={...c,component:d,disableGutters:f,fixed:p,maxWidth:h},x=x1e(w,r);return R.jsx(o,{as:d,ownerState:w,className:de(x.root,u),ref:l,...y})})}const C1e=(e,t)=>e.filter(n=>t.includes(n)),wb=(e,t,n)=>{const r=e.keys[0];Array.isArray(t)?t.forEach((o,i)=>{n((a,s)=>{i<=e.keys.length-1&&(i===0?Object.assign(a,s):a[e.up(e.keys[i])]=s)},o)}):t&&typeof t=="object"?(Object.keys(t).length>e.keys.length?e.keys:C1e(e.keys,Object.keys(t))).forEach(i=>{if(e.keys.includes(i)){const a=t[i];a!==void 0&&n((s,l)=>{r===i?Object.assign(s,l):s[e.up(i)]=l},a)}}):(typeof t=="number"||typeof t=="string")&&n((o,i)=>{Object.assign(o,i)},t)};function xT(e){return`--Grid-${e}Spacing`}function DA(e){return`--Grid-parent-${e}Spacing`}const _4="--Grid-columns",Ry="--Grid-parent-columns",E1e=({theme:e,ownerState:t})=>{const n={};return wb(e.breakpoints,t.size,(r,o)=>{let i={};o==="grow"&&(i={flexBasis:0,flexGrow:1,maxWidth:"100%"}),o==="auto"&&(i={flexBasis:"auto",flexGrow:0,flexShrink:0,maxWidth:"none",width:"auto"}),typeof o=="number"&&(i={flexGrow:0,flexBasis:"auto",width:`calc(100% * ${o} / var(${Ry}) - (var(${Ry}) - ${o}) * (var(${DA("column")}) / var(${Ry})))`}),r(n,i)}),n},P1e=({theme:e,ownerState:t})=>{const n={};return wb(e.breakpoints,t.offset,(r,o)=>{let i={};o==="auto"&&(i={marginLeft:"auto"}),typeof o=="number"&&(i={marginLeft:o===0?"0px":`calc(100% * ${o} / var(${Ry}) + var(${DA("column")}) * ${o} / var(${Ry}))`}),r(n,i)}),n},T1e=({theme:e,ownerState:t})=>{if(!t.container)return{};const n={[_4]:12};return wb(e.breakpoints,t.columns,(r,o)=>{const i=o??12;r(n,{[_4]:i,"> *":{[Ry]:i}})}),n},I1e=({theme:e,ownerState:t})=>{if(!t.container)return{};const n={};return wb(e.breakpoints,t.rowSpacing,(r,o)=>{var a;const i=typeof o=="string"?o:(a=e.spacing)==null?void 0:a.call(e,o);r(n,{[xT("row")]:i,"> *":{[DA("row")]:i}})}),n},O1e=({theme:e,ownerState:t})=>{if(!t.container)return{};const n={};return wb(e.breakpoints,t.columnSpacing,(r,o)=>{var a;const i=typeof o=="string"?o:(a=e.spacing)==null?void 0:a.call(e,o);r(n,{[xT("column")]:i,"> *":{[DA("column")]:i}})}),n},A1e=({theme:e,ownerState:t})=>{if(!t.container)return{};const n={};return wb(e.breakpoints,t.direction,(r,o)=>{r(n,{flexDirection:o})}),n},k1e=({ownerState:e})=>({minWidth:0,boxSizing:"border-box",...e.container&&{display:"flex",flexWrap:"wrap",...e.wrap&&e.wrap!=="wrap"&&{flexWrap:e.wrap},gap:`var(${xT("row")}) var(${xT("column")})`}}),M1e=e=>{const t=[];return Object.entries(e).forEach(([n,r])=>{r!==!1&&r!==void 0&&t.push(`grid-${n}-${String(r)}`)}),t},R1e=(e,t="xs")=>{function n(r){return r===void 0?!1:typeof r=="string"&&!Number.isNaN(Number(r))||typeof r=="number"&&r>0}if(n(e))return[`spacing-${t}-${String(e)}`];if(typeof e=="object"&&!Array.isArray(e)){const r=[];return Object.entries(e).forEach(([o,i])=>{n(i)&&r.push(`spacing-${o}-${String(i)}`)}),r}return[]},$1e=e=>e===void 0?[]:typeof e=="object"?Object.entries(e).map(([t,n])=>`direction-${t}-${n}`):[`direction-xs-${String(e)}`],D1e=bb(),_1e=or("div",{name:"MuiGrid",slot:"Root",overridesResolver:(e,t)=>t.root});function N1e(e){return RA({props:e,name:"MuiGrid",defaultTheme:D1e})}function L1e(e={}){const{createStyledComponent:t=_1e,useThemeProps:n=N1e,componentName:r="MuiGrid"}=e,o=(l,c)=>{const{container:u,direction:d,spacing:f,wrap:p,size:h}=l,m={root:["root",u&&"container",p!=="wrap"&&`wrap-xs-${String(p)}`,...$1e(d),...M1e(h),...u?R1e(f,c.breakpoints.keys[0]):[]]};return rt(m,y=>nt(r,y),{})};function i(l,c,u=()=>!0){const d={};return l===null||(Array.isArray(l)?l.forEach((f,p)=>{f!==null&&u(f)&&c.keys[p]&&(d[c.keys[p]]=f)}):typeof l=="object"?Object.keys(l).forEach(f=>{const p=l[f];p!=null&&u(p)&&(d[f]=p)}):d[c.keys[0]]=l),d}const a=t(T1e,O1e,I1e,E1e,A1e,k1e,P1e),s=v.forwardRef(function(c,u){const d=SC(),f=n(c),p=xA(f),{className:h,children:m,columns:y=12,container:w=!1,component:x="div",direction:C="row",wrap:E="wrap",size:P={},offset:T={},spacing:I=0,rowSpacing:A=I,columnSpacing:k=I,unstable_level:O=0,...$}=p,N=i(P,d.breakpoints,U=>U!==!1),L=i(T,d.breakpoints),j=c.columns??(O?void 0:y),D=c.spacing??(O?void 0:I),_=c.rowSpacing??c.spacing??(O?void 0:A),z=c.columnSpacing??c.spacing??(O?void 0:k),F={...p,level:O,columns:j,container:w,direction:C,wrap:E,spacing:D,rowSpacing:_,columnSpacing:z,size:N,offset:L},V=o(F,d);return R.jsx(a,{ref:u,as:x,ownerState:F,className:de(V.root,h),...$,children:v.Children.map(m,U=>{var q;return v.isValidElement(U)&&My(U,["Grid"])&&w&&U.props.container?v.cloneElement(U,{unstable_level:((q=U.props)==null?void 0:q.unstable_level)??O+1}):U})})});return s.muiName="Grid",s}const F1e=bb(),j1e=or("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root});function B1e(e){return RA({props:e,name:"MuiStack",defaultTheme:F1e})}function z1e(e,t){const n=v.Children.toArray(e).filter(Boolean);return n.reduce((r,o,i)=>(r.push(o),i({row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"})[e],H1e=({ownerState:e,theme:t})=>{let n={display:"flex",flexDirection:"column",...Pc({theme:t},x$({values:e.direction,breakpoints:t.breakpoints.values}),r=>({flexDirection:r}))};if(e.spacing){const r=gA(t),o=Object.keys(t.breakpoints.values).reduce((l,c)=>((typeof e.spacing=="object"&&e.spacing[c]!=null||typeof e.direction=="object"&&e.direction[c]!=null)&&(l[c]=!0),l),{}),i=x$({values:e.direction,base:o}),a=x$({values:e.spacing,base:o});typeof i=="object"&&Object.keys(i).forEach((l,c,u)=>{if(!i[l]){const f=c>0?i[u[c-1]]:"column";i[l]=f}}),n=Oo(n,Pc({theme:t},a,(l,c)=>e.useFlexGap?{gap:ag(r,l)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${V1e(c?i[c]:e.direction)}`]:ag(r,l)}}))}return n=NSe(t.breakpoints,n),n};function U1e(e={}){const{createStyledComponent:t=j1e,useThemeProps:n=B1e,componentName:r="MuiStack"}=e,o=()=>rt({root:["root"]},l=>nt(r,l),{}),i=t(H1e);return v.forwardRef(function(l,c){const u=n(l),d=xA(u),{component:f="div",direction:p="column",spacing:h=0,divider:m,children:y,className:w,useFlexGap:x=!1,...C}=d,E={direction:p,spacing:h,useFlexGap:x},P=o();return R.jsx(i,{as:f,ownerState:E,ref:c,className:de(P.root,w),...C,children:m?z1e(y,m):y})})}const Dx={black:"#000",white:"#fff"},W1e={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},xm={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",A100:"#ea80fc",A200:"#e040fb",A400:"#d500f9",A700:"#aa00ff"},Sm={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"},B0={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"},Cm={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"},Em={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",A100:"#80d8ff",A200:"#40c4ff",A400:"#00b0ff",A700:"#0091ea"},Pm={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"};function WZ(){return{text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:Dx.white,default:Dx.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}}}const G1e=WZ();function GZ(){return{text:{primary:Dx.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:Dx.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}}}const N4=GZ();function L4(e,t,n,r){const o=r.light||r,i=r.dark||r*1.5;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:t==="light"?e.light=wd(e.main,o):t==="dark"&&(e.dark=bd(e.main,i)))}function q1e(e="light"){return e==="dark"?{main:Cm[200],light:Cm[50],dark:Cm[400]}:{main:Cm[700],light:Cm[400],dark:Cm[800]}}function K1e(e="light"){return e==="dark"?{main:xm[200],light:xm[50],dark:xm[400]}:{main:xm[500],light:xm[300],dark:xm[700]}}function Y1e(e="light"){return e==="dark"?{main:Sm[500],light:Sm[300],dark:Sm[700]}:{main:Sm[700],light:Sm[400],dark:Sm[800]}}function Q1e(e="light"){return e==="dark"?{main:Em[400],light:Em[300],dark:Em[700]}:{main:Em[700],light:Em[500],dark:Em[900]}}function X1e(e="light"){return e==="dark"?{main:Pm[400],light:Pm[300],dark:Pm[700]}:{main:Pm[800],light:Pm[500],dark:Pm[900]}}function J1e(e="light"){return e==="dark"?{main:B0[400],light:B0[300],dark:B0[700]}:{main:"#ed6c02",light:B0[500],dark:B0[900]}}function Bj(e){const{mode:t="light",contrastThreshold:n=3,tonalOffset:r=.2,...o}=e,i=e.primary||q1e(t),a=e.secondary||K1e(t),s=e.error||Y1e(t),l=e.info||Q1e(t),c=e.success||X1e(t),u=e.warning||J1e(t);function d(m){return qCe(m,N4.text.primary)>=n?N4.text.primary:G1e.text.primary}const f=({color:m,name:y,mainShade:w=500,lightShade:x=300,darkShade:C=700})=>{if(m={...m},!m.main&&m[w]&&(m.main=m[w]),!m.hasOwnProperty("main"))throw new Error(vd(11,y?` (${y})`:"",w));if(typeof m.main!="string")throw new Error(vd(12,y?` (${y})`:"",JSON.stringify(m.main)));return L4(m,"light",x,r),L4(m,"dark",C,r),m.contrastText||(m.contrastText=d(m.main)),m};let p;return t==="light"?p=WZ():t==="dark"&&(p=GZ()),Oo({common:{...Dx},mode:t,primary:f({color:i,name:"primary"}),secondary:f({color:a,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:f({color:s,name:"error"}),warning:f({color:u,name:"warning"}),info:f({color:l,name:"info"}),success:f({color:c,name:"success"}),grey:W1e,contrastThreshold:n,getContrastText:d,augmentColor:f,tonalOffset:r,...p},o)}function Z1e(e){const t={};return Object.entries(e).forEach(r=>{const[o,i]=r;typeof i=="object"&&(t[o]=`${i.fontStyle?`${i.fontStyle} `:""}${i.fontVariant?`${i.fontVariant} `:""}${i.fontWeight?`${i.fontWeight} `:""}${i.fontStretch?`${i.fontStretch} `:""}${i.fontSize||""}${i.lineHeight?`/${i.lineHeight} `:""}${i.fontFamily||""}`)}),t}function eEe(e,t){return{toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}},...t}}function tEe(e){return Math.round(e*1e5)/1e5}const F4={textTransform:"uppercase"},j4='"Roboto", "Helvetica", "Arial", sans-serif';function qZ(e,t){const{fontFamily:n=j4,fontSize:r=14,fontWeightLight:o=300,fontWeightRegular:i=400,fontWeightMedium:a=500,fontWeightBold:s=700,htmlFontSize:l=16,allVariants:c,pxToRem:u,...d}=typeof t=="function"?t(e):t,f=r/14,p=u||(y=>`${y/l*f}rem`),h=(y,w,x,C,E)=>({fontFamily:n,fontWeight:y,fontSize:p(w),lineHeight:x,...n===j4?{letterSpacing:`${tEe(C/w)}em`}:{},...E,...c}),m={h1:h(o,96,1.167,-1.5),h2:h(o,60,1.2,-.5),h3:h(i,48,1.167,0),h4:h(i,34,1.235,.25),h5:h(i,24,1.334,0),h6:h(a,20,1.6,.15),subtitle1:h(i,16,1.75,.15),subtitle2:h(a,14,1.57,.1),body1:h(i,16,1.5,.15),body2:h(i,14,1.43,.15),button:h(a,14,1.75,.4,F4),caption:h(i,12,1.66,.4),overline:h(i,12,2.66,1,F4),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return Oo({htmlFontSize:l,pxToRem:p,fontFamily:n,fontSize:r,fontWeightLight:o,fontWeightRegular:i,fontWeightMedium:a,fontWeightBold:s,...m},d,{clone:!1})}const nEe=.2,rEe=.14,oEe=.12;function Ur(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${nEe})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${rEe})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${oEe})`].join(",")}const iEe=["none",Ur(0,2,1,-1,0,1,1,0,0,1,3,0),Ur(0,3,1,-2,0,2,2,0,0,1,5,0),Ur(0,3,3,-2,0,3,4,0,0,1,8,0),Ur(0,2,4,-1,0,4,5,0,0,1,10,0),Ur(0,3,5,-1,0,5,8,0,0,1,14,0),Ur(0,3,5,-1,0,6,10,0,0,1,18,0),Ur(0,4,5,-2,0,7,10,1,0,2,16,1),Ur(0,5,5,-3,0,8,10,1,0,3,14,2),Ur(0,5,6,-3,0,9,12,1,0,3,16,2),Ur(0,6,6,-3,0,10,14,1,0,4,18,3),Ur(0,6,7,-4,0,11,15,1,0,4,20,3),Ur(0,7,8,-4,0,12,17,2,0,5,22,4),Ur(0,7,8,-4,0,13,19,2,0,5,24,4),Ur(0,7,9,-4,0,14,21,2,0,5,26,4),Ur(0,8,9,-5,0,15,22,2,0,6,28,5),Ur(0,8,10,-5,0,16,24,2,0,6,30,5),Ur(0,8,11,-5,0,17,26,2,0,6,32,5),Ur(0,9,11,-5,0,18,28,2,0,7,34,6),Ur(0,9,12,-6,0,19,29,2,0,7,36,6),Ur(0,10,13,-6,0,20,31,3,0,8,38,7),Ur(0,10,13,-6,0,21,33,3,0,8,40,7),Ur(0,10,14,-6,0,22,35,3,0,8,42,7),Ur(0,11,14,-7,0,23,36,3,0,9,44,8),Ur(0,11,15,-7,0,24,38,3,0,9,46,8)],aEe={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},KZ={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function B4(e){return`${Math.round(e)}ms`}function sEe(e){if(!e)return 0;const t=e/36;return Math.min(Math.round((4+15*t**.25+t/5)*10),3e3)}function lEe(e){const t={...aEe,...e.easing},n={...KZ,...e.duration};return{getAutoHeightDuration:sEe,create:(o=["all"],i={})=>{const{duration:a=n.standard,easing:s=t.easeInOut,delay:l=0,...c}=i;return(Array.isArray(o)?o:[o]).map(u=>`${u} ${typeof a=="string"?a:B4(a)} ${s} ${typeof l=="string"?l:B4(l)}`).join(",")},...e,easing:t,duration:n}}const cEe={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function uEe(e){return Jc(e)||typeof e>"u"||typeof e=="string"||typeof e=="boolean"||typeof e=="number"||Array.isArray(e)}function YZ(e={}){const t={...e};function n(r){const o=Object.entries(r);for(let i=0;i{if(t==="light")return e.lightColorScheme;if(t==="dark")return e.darkColorScheme})}function I$(e,t){if(typeof window>"u")return;let n;try{n=localStorage.getItem(e)||void 0,n||localStorage.setItem(e,t)}catch{}return n||t}function b1e(e){const{defaultMode:t="light",defaultLightColorScheme:n,defaultDarkColorScheme:r,supportedColorSchemes:o=[],modeStorageKey:i=Hj,colorSchemeStorageKey:a=Uj,storageWindow:s=typeof window>"u"?void 0:window}=e,l=o.join(","),c=o.length>1,[u,d]=v.useState(()=>{const S=I$(i,t),E=I$(`${a}-light`,n),P=I$(`${a}-dark`,r);return{mode:S,systemMode:L4(S),lightColorScheme:E,darkColorScheme:P}}),[,f]=v.useState(!1),p=v.useRef(!1);v.useEffect(()=>{c&&f(!0),p.current=!0},[c]);const h=v1e(u),m=v.useCallback(S=>{d(E=>{if(S===E.mode)return E;const P=S??t;try{localStorage.setItem(i,P)}catch{}return{...E,mode:P,systemMode:L4(P)}})},[i,t]),y=v.useCallback(S=>{S?typeof S=="string"?S&&!l.includes(S)?console.error(`\`${S}\` does not exist in \`theme.colorSchemes\`.`):d(E=>{const P={...E};return YZ(E,T=>{try{localStorage.setItem(`${a}-${T}`,S)}catch{}T==="light"&&(P.lightColorScheme=S),T==="dark"&&(P.darkColorScheme=S)}),P}):d(E=>{const P={...E},T=S.light===null?n:S.light,I=S.dark===null?r:S.dark;if(T)if(!l.includes(T))console.error(`\`${T}\` does not exist in \`theme.colorSchemes\`.`);else{P.lightColorScheme=T;try{localStorage.setItem(`${a}-light`,T)}catch{}}if(I)if(!l.includes(I))console.error(`\`${I}\` does not exist in \`theme.colorSchemes\`.`);else{P.darkColorScheme=I;try{localStorage.setItem(`${a}-dark`,I)}catch{}}return P}):d(E=>{try{localStorage.setItem(`${a}-light`,n),localStorage.setItem(`${a}-dark`,r)}catch{}return{...E,lightColorScheme:n,darkColorScheme:r}})},[l,a,n,r]),w=v.useCallback(S=>{u.mode==="system"&&d(E=>{const P=S!=null&&S.matches?"dark":"light";return E.systemMode===P?E:{...E,systemMode:P}})},[u.mode]),x=v.useRef(w);return x.current=w,v.useEffect(()=>{if(typeof window.matchMedia!="function"||!c)return;const S=(...P)=>x.current(...P),E=window.matchMedia("(prefers-color-scheme: dark)");return E.addListener(S),S(E),()=>{E.removeListener(S)}},[c]),v.useEffect(()=>{if(s&&c){const S=E=>{const P=E.newValue;typeof E.key=="string"&&E.key.startsWith(a)&&(!P||l.match(P))&&(E.key.endsWith("light")&&y({light:P}),E.key.endsWith("dark")&&y({dark:P})),E.key===i&&(!P||["light","dark","system"].includes(P))&&m(P||t)};return s.addEventListener("storage",S),()=>{s.removeEventListener("storage",S)}}},[y,m,i,a,l,t,s,c]),{...u,mode:p.current||!c?u.mode:void 0,systemMode:p.current||!c?u.systemMode:void 0,colorScheme:p.current||!c?h:void 0,setMode:m,setColorScheme:y}}const w1e="*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}";function x1e(e){const{themeId:t,theme:n={},modeStorageKey:r=Hj,colorSchemeStorageKey:o=Uj,disableTransitionOnChange:i=!1,defaultColorScheme:a,resolveTheme:s}=e,l={allColorSchemes:[],colorScheme:void 0,darkColorScheme:void 0,lightColorScheme:void 0,mode:void 0,setColorScheme:()=>{},setMode:()=>{},systemMode:void 0},c=v.createContext(void 0),u=()=>v.useContext(c)||l;function d(m){var ye,Pe,Ae,Me,We;const{children:y,theme:w,modeStorageKey:x=r,colorSchemeStorageKey:S=o,disableTransitionOnChange:E=i,storageWindow:P=typeof window>"u"?void 0:window,documentNode:T=typeof document>"u"?void 0:document,colorSchemeNode:I=typeof document>"u"?void 0:document.documentElement,disableNestedContext:A=!1,disableStyleSheetGeneration:k=!1,defaultMode:O="system"}=m,$=v.useRef(!1),N=UA(),L=v.useContext(c),j=!!L&&!A,D=v.useMemo(()=>w||(typeof n=="function"?n():n),[w]),_=D[t],{colorSchemes:z={},components:F={},cssVarPrefix:V,...U}=_||D,K=Object.keys(z).filter(He=>!!z[He]).join(","),X=v.useMemo(()=>K.split(","),[K]),ie=typeof a=="string"?a:a.light,ee=typeof a=="string"?a:a.dark,Q=z[ie]&&z[ee]?O:((Pe=(ye=z[U.defaultColorScheme])==null?void 0:ye.palette)==null?void 0:Pe.mode)||((Ae=U.palette)==null?void 0:Ae.mode),{mode:te,setMode:pe,systemMode:ae,lightColorScheme:se,darkColorScheme:oe,colorScheme:fe,setColorScheme:Z}=b1e({supportedColorSchemes:X,defaultLightColorScheme:ie,defaultDarkColorScheme:ee,modeStorageKey:x,colorSchemeStorageKey:S,defaultMode:Q,storageWindow:P});let ce=te,ge=fe;j&&(ce=L.mode,ge=L.colorScheme);const we=ge||U.defaultColorScheme,me=((Me=U.generateThemeVars)==null?void 0:Me.call(U))||U.vars,Se={...U,components:F,colorSchemes:z,cssVarPrefix:V,vars:me};if(typeof Se.generateSpacing=="function"&&(Se.spacing=Se.generateSpacing()),we){const He=z[we];He&&typeof He=="object"&&Object.keys(He).forEach(Xe=>{He[Xe]&&typeof He[Xe]=="object"?Se[Xe]={...Se[Xe],...He[Xe]}:Se[Xe]=He[Xe]})}const xe=U.colorSchemeSelector;v.useEffect(()=>{if(ge&&I&&xe&&xe!=="media"){const He=xe;let Xe=xe;if(He==="class"&&(Xe=".%s"),He==="data"&&(Xe="[data-%s]"),He!=null&&He.startsWith("data-")&&!He.includes("%s")&&(Xe=`[${He}="%s"]`),Xe.startsWith("."))I.classList.remove(...X.map(gt=>Xe.substring(1).replace("%s",gt))),I.classList.add(Xe.substring(1).replace("%s",ge));else{const gt=Xe.replace("%s",ge).match(/\[([^\]]+)\]/);if(gt){const[st,et]=gt[1].split("=");et||X.forEach(Et=>{I.removeAttribute(st.replace(ge,Et))}),I.setAttribute(st,et?et.replace(/"|'/g,""):"")}else I.setAttribute(Xe,ge)}}},[ge,xe,I,X]),v.useEffect(()=>{let He;if(E&&$.current&&T){const Xe=T.createElement("style");Xe.appendChild(T.createTextNode(w1e)),T.head.appendChild(Xe),window.getComputedStyle(T.body),He=setTimeout(()=>{T.head.removeChild(Xe)},1)}return()=>{clearTimeout(He)}},[ge,E,T]),v.useEffect(()=>($.current=!0,()=>{$.current=!1}),[]);const ke=v.useMemo(()=>({allColorSchemes:X,colorScheme:ge,darkColorScheme:oe,lightColorScheme:se,mode:ce,setColorScheme:Z,setMode:pe,systemMode:ae}),[X,ge,oe,se,ce,Z,pe,ae]);let De=!0;(k||U.cssVariables===!1||j&&(N==null?void 0:N.cssVarPrefix)===V)&&(De=!1);const _e=R.jsxs(v.Fragment,{children:[R.jsx(KZ,{themeId:_?t:void 0,theme:s?s(Se):Se,children:y}),De&&R.jsx(bZ,{styles:((We=Se.generateStyleSheets)==null?void 0:We.call(Se))||[]})]});return j?_e:R.jsx(c.Provider,{value:ke,children:_e})}const f=typeof a=="string"?a:a.light,p=typeof a=="string"?a:a.dark;return{CssVarsProvider:d,useColorScheme:u,getInitColorSchemeScript:m=>y1e({colorSchemeStorageKey:o,defaultLightColorScheme:f,defaultDarkColorScheme:p,modeStorageKey:r,...m})}}function S1e(e=""){function t(...r){if(!r.length)return"";const o=r[0];return typeof o=="string"&&!o.match(/(#|\(|\)|(-?(\d*\.)?\d+)(px|em|%|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc))|^(-?(\d*\.)?\d+)$|(\d+ \d+ \d+)/)?`, var(--${e?`${e}-`:""}${o}${t(...r.slice(1))})`:`, ${o}`}return(r,...o)=>`var(--${e?`${e}-`:""}${r}${t(...o)})`}const F4=(e,t,n,r=[])=>{let o=e;t.forEach((i,a)=>{a===t.length-1?Array.isArray(o)?o[Number(i)]=n:o&&typeof o=="object"&&(o[i]=n):o&&typeof o=="object"&&(o[i]||(o[i]=r.includes(i)?[]:{}),o=o[i])})},C1e=(e,t,n)=>{function r(o,i=[],a=[]){Object.entries(o).forEach(([s,l])=>{(!n||n&&!n([...i,s]))&&l!=null&&(typeof l=="object"&&Object.keys(l).length>0?r(l,[...i,s],Array.isArray(l)?[...a,s]:a):t([...i,s],l,a))})}r(e)},E1e=(e,t)=>typeof t=="number"?["lineHeight","fontWeight","opacity","zIndex"].some(r=>e.includes(r))||e[e.length-1].toLowerCase().includes("opacity")?t:`${t}px`:t;function O$(e,t){const{prefix:n,shouldSkipGeneratingVar:r}=t||{},o={},i={},a={};return C1e(e,(s,l,c)=>{if((typeof l=="string"||typeof l=="number")&&(!r||!r(s,l))){const u=`--${n?`${n}-`:""}${s.join("-")}`,d=E1e(s,l);Object.assign(o,{[u]:d}),F4(i,s,`var(${u})`,c),F4(a,s,`var(${u}, ${d})`,c)}},s=>s[0]==="vars"),{css:o,vars:i,varsWithDefaults:a}}function P1e(e,t={}){const{getSelector:n=y,disableCssColorScheme:r,colorSchemeSelector:o}=t,{colorSchemes:i={},components:a,defaultColorScheme:s="light",...l}=e,{vars:c,css:u,varsWithDefaults:d}=O$(l,t);let f=d;const p={},{[s]:h,...m}=i;if(Object.entries(m||{}).forEach(([S,E])=>{const{vars:P,css:T,varsWithDefaults:I}=O$(E,t);f=Ao(f,I),p[S]={css:T,vars:P}}),h){const{css:S,vars:E,varsWithDefaults:P}=O$(h,t);f=Ao(f,P),p[s]={css:S,vars:E}}function y(S,E){var T,I;let P=o;if(o==="class"&&(P=".%s"),o==="data"&&(P="[data-%s]"),o!=null&&o.startsWith("data-")&&!o.includes("%s")&&(P=`[${o}="%s"]`),S){if(P==="media")return e.defaultColorScheme===S?":root":{[`@media (prefers-color-scheme: ${((I=(T=i[S])==null?void 0:T.palette)==null?void 0:I.mode)||S})`]:{":root":E}};if(P)return e.defaultColorScheme===S?`:root, ${P.replace("%s",String(S))}`:P.replace("%s",String(S))}return":root"}return{vars:f,generateThemeVars:()=>{let S={...c};return Object.entries(p).forEach(([,{vars:E}])=>{S=Ao(S,E)}),S},generateStyleSheets:()=>{var A,k;const S=[],E=e.defaultColorScheme||"light";function P(O,$){Object.keys($).length&&S.push(typeof O=="string"?{[O]:{...$}}:O)}P(n(void 0,{...u}),u);const{[E]:T,...I}=p;if(T){const{css:O}=T,$=(k=(A=i[E])==null?void 0:A.palette)==null?void 0:k.mode,N=!r&&$?{colorScheme:$,...O}:{...O};P(n(E,{...N}),N)}return Object.entries(I).forEach(([O,{css:$}])=>{var j,D;const N=(D=(j=i[O])==null?void 0:j.palette)==null?void 0:D.mode,L=!r&&N?{colorScheme:N,...$}:{...$};P(n(O,{...L}),L)}),S}}}function T1e(e){return function(n){return e==="media"?`@media (prefers-color-scheme: ${n})`:e?e.startsWith("data-")&&!e.includes("%s")?`[${e}="${n}"] &`:e==="class"?`.${n} &`:e==="data"?`[data-${n}] &`:`${e.replace("%s",n)} &`:"&"}}const I1e=xb(),O1e=or("div",{name:"MuiContainer",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`maxWidth${Ce(String(n.maxWidth))}`],n.fixed&&t.fixed,n.disableGutters&&t.disableGutters]}}),A1e=e=>HA({props:e,name:"MuiContainer",defaultTheme:I1e}),k1e=(e,t)=>{const n=l=>nt(t,l),{classes:r,fixed:o,disableGutters:i,maxWidth:a}=e,s={root:["root",a&&`maxWidth${Ce(String(a))}`,o&&"fixed",i&&"disableGutters"]};return rt(s,n,r)};function M1e(e={}){const{createStyledComponent:t=O1e,useThemeProps:n=A1e,componentName:r="MuiContainer"}=e,o=t(({theme:a,ownerState:s})=>({width:"100%",marginLeft:"auto",boxSizing:"border-box",marginRight:"auto",...!s.disableGutters&&{paddingLeft:a.spacing(2),paddingRight:a.spacing(2),[a.breakpoints.up("sm")]:{paddingLeft:a.spacing(3),paddingRight:a.spacing(3)}}}),({theme:a,ownerState:s})=>s.fixed&&Object.keys(a.breakpoints.values).reduce((l,c)=>{const u=c,d=a.breakpoints.values[u];return d!==0&&(l[a.breakpoints.up(u)]={maxWidth:`${d}${a.breakpoints.unit}`}),l},{}),({theme:a,ownerState:s})=>({...s.maxWidth==="xs"&&{[a.breakpoints.up("xs")]:{maxWidth:Math.max(a.breakpoints.values.xs,444)}},...s.maxWidth&&s.maxWidth!=="xs"&&{[a.breakpoints.up(s.maxWidth)]:{maxWidth:`${a.breakpoints.values[s.maxWidth]}${a.breakpoints.unit}`}}}));return v.forwardRef(function(s,l){const c=n(s),{className:u,component:d="div",disableGutters:f=!1,fixed:p=!1,maxWidth:h="lg",classes:m,...y}=c,w={...c,component:d,disableGutters:f,fixed:p,maxWidth:h},x=k1e(w,r);return R.jsx(o,{as:d,ownerState:w,className:de(x.root,u),ref:l,...y})})}const R1e=(e,t)=>e.filter(n=>t.includes(n)),Sb=(e,t,n)=>{const r=e.keys[0];Array.isArray(t)?t.forEach((o,i)=>{n((a,s)=>{i<=e.keys.length-1&&(i===0?Object.assign(a,s):a[e.up(e.keys[i])]=s)},o)}):t&&typeof t=="object"?(Object.keys(t).length>e.keys.length?e.keys:R1e(e.keys,Object.keys(t))).forEach(i=>{if(e.keys.includes(i)){const a=t[i];a!==void 0&&n((s,l)=>{r===i?Object.assign(s,l):s[e.up(i)]=l},a)}}):(typeof t=="number"||typeof t=="string")&&n((o,i)=>{Object.assign(o,i)},t)};function $T(e){return`--Grid-${e}Spacing`}function WA(e){return`--Grid-parent-${e}Spacing`}const j4="--Grid-columns",$y="--Grid-parent-columns",$1e=({theme:e,ownerState:t})=>{const n={};return Sb(e.breakpoints,t.size,(r,o)=>{let i={};o==="grow"&&(i={flexBasis:0,flexGrow:1,maxWidth:"100%"}),o==="auto"&&(i={flexBasis:"auto",flexGrow:0,flexShrink:0,maxWidth:"none",width:"auto"}),typeof o=="number"&&(i={flexGrow:0,flexBasis:"auto",width:`calc(100% * ${o} / var(${$y}) - (var(${$y}) - ${o}) * (var(${WA("column")}) / var(${$y})))`}),r(n,i)}),n},D1e=({theme:e,ownerState:t})=>{const n={};return Sb(e.breakpoints,t.offset,(r,o)=>{let i={};o==="auto"&&(i={marginLeft:"auto"}),typeof o=="number"&&(i={marginLeft:o===0?"0px":`calc(100% * ${o} / var(${$y}) + var(${WA("column")}) * ${o} / var(${$y}))`}),r(n,i)}),n},_1e=({theme:e,ownerState:t})=>{if(!t.container)return{};const n={[j4]:12};return Sb(e.breakpoints,t.columns,(r,o)=>{const i=o??12;r(n,{[j4]:i,"> *":{[$y]:i}})}),n},N1e=({theme:e,ownerState:t})=>{if(!t.container)return{};const n={};return Sb(e.breakpoints,t.rowSpacing,(r,o)=>{var a;const i=typeof o=="string"?o:(a=e.spacing)==null?void 0:a.call(e,o);r(n,{[$T("row")]:i,"> *":{[WA("row")]:i}})}),n},L1e=({theme:e,ownerState:t})=>{if(!t.container)return{};const n={};return Sb(e.breakpoints,t.columnSpacing,(r,o)=>{var a;const i=typeof o=="string"?o:(a=e.spacing)==null?void 0:a.call(e,o);r(n,{[$T("column")]:i,"> *":{[WA("column")]:i}})}),n},F1e=({theme:e,ownerState:t})=>{if(!t.container)return{};const n={};return Sb(e.breakpoints,t.direction,(r,o)=>{r(n,{flexDirection:o})}),n},j1e=({ownerState:e})=>({minWidth:0,boxSizing:"border-box",...e.container&&{display:"flex",flexWrap:"wrap",...e.wrap&&e.wrap!=="wrap"&&{flexWrap:e.wrap},gap:`var(${$T("row")}) var(${$T("column")})`}}),B1e=e=>{const t=[];return Object.entries(e).forEach(([n,r])=>{r!==!1&&r!==void 0&&t.push(`grid-${n}-${String(r)}`)}),t},z1e=(e,t="xs")=>{function n(r){return r===void 0?!1:typeof r=="string"&&!Number.isNaN(Number(r))||typeof r=="number"&&r>0}if(n(e))return[`spacing-${t}-${String(e)}`];if(typeof e=="object"&&!Array.isArray(e)){const r=[];return Object.entries(e).forEach(([o,i])=>{n(i)&&r.push(`spacing-${o}-${String(i)}`)}),r}return[]},V1e=e=>e===void 0?[]:typeof e=="object"?Object.entries(e).map(([t,n])=>`direction-${t}-${n}`):[`direction-xs-${String(e)}`],H1e=xb(),U1e=or("div",{name:"MuiGrid",slot:"Root",overridesResolver:(e,t)=>t.root});function W1e(e){return HA({props:e,name:"MuiGrid",defaultTheme:H1e})}function G1e(e={}){const{createStyledComponent:t=U1e,useThemeProps:n=W1e,componentName:r="MuiGrid"}=e,o=(l,c)=>{const{container:u,direction:d,spacing:f,wrap:p,size:h}=l,m={root:["root",u&&"container",p!=="wrap"&&`wrap-xs-${String(p)}`,...V1e(d),...B1e(h),...u?z1e(f,c.breakpoints.keys[0]):[]]};return rt(m,y=>nt(r,y),{})};function i(l,c,u=()=>!0){const d={};return l===null||(Array.isArray(l)?l.forEach((f,p)=>{f!==null&&u(f)&&c.keys[p]&&(d[c.keys[p]]=f)}):typeof l=="object"?Object.keys(l).forEach(f=>{const p=l[f];p!=null&&u(p)&&(d[f]=p)}):d[c.keys[0]]=l),d}const a=t(_1e,L1e,N1e,$1e,F1e,j1e,D1e),s=v.forwardRef(function(c,u){const d=OC(),f=n(c),p=AC(f),{className:h,children:m,columns:y=12,container:w=!1,component:x="div",direction:S="row",wrap:E="wrap",size:P={},offset:T={},spacing:I=0,rowSpacing:A=I,columnSpacing:k=I,unstable_level:O=0,...$}=p,N=i(P,d.breakpoints,U=>U!==!1),L=i(T,d.breakpoints),j=c.columns??(O?void 0:y),D=c.spacing??(O?void 0:I),_=c.rowSpacing??c.spacing??(O?void 0:A),z=c.columnSpacing??c.spacing??(O?void 0:k),F={...p,level:O,columns:j,container:w,direction:S,wrap:E,spacing:D,rowSpacing:_,columnSpacing:z,size:N,offset:L},V=o(F,d);return R.jsx(a,{ref:u,as:x,ownerState:F,className:de(V.root,h),...$,children:v.Children.map(m,U=>{var K;return v.isValidElement(U)&&Ry(U,["Grid"])&&w&&U.props.container?v.cloneElement(U,{unstable_level:((K=U.props)==null?void 0:K.unstable_level)??O+1}):U})})});return s.muiName="Grid",s}const q1e=xb(),K1e=or("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root});function Y1e(e){return HA({props:e,name:"MuiStack",defaultTheme:q1e})}function Q1e(e,t){const n=v.Children.toArray(e).filter(Boolean);return n.reduce((r,o,i)=>(r.push(o),i({row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"})[e],J1e=({ownerState:e,theme:t})=>{let n={display:"flex",flexDirection:"column",...Na({theme:t},Yh({values:e.direction,breakpoints:t.breakpoints.values}),r=>({flexDirection:r}))};if(e.spacing){const r=IA(t),o=Object.keys(t.breakpoints.values).reduce((l,c)=>((typeof e.spacing=="object"&&e.spacing[c]!=null||typeof e.direction=="object"&&e.direction[c]!=null)&&(l[c]=!0),l),{}),i=Yh({values:e.direction,base:o}),a=Yh({values:e.spacing,base:o});typeof i=="object"&&Object.keys(i).forEach((l,c,u)=>{if(!i[l]){const f=c>0?i[u[c-1]]:"column";i[l]=f}}),n=Ao(n,Na({theme:t},a,(l,c)=>e.useFlexGap?{gap:lg(r,l)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${X1e(c?i[c]:e.direction)}`]:lg(r,l)}}))}return n=WSe(t.breakpoints,n),n};function Z1e(e={}){const{createStyledComponent:t=K1e,useThemeProps:n=Y1e,componentName:r="MuiStack"}=e,o=()=>rt({root:["root"]},l=>nt(r,l),{}),i=t(J1e);return v.forwardRef(function(l,c){const u=n(l),d=AC(u),{component:f="div",direction:p="column",spacing:h=0,divider:m,children:y,className:w,useFlexGap:x=!1,...S}=d,E={direction:p,spacing:h,useFlexGap:x},P=o();return R.jsx(i,{as:f,ownerState:E,ref:c,className:de(P.root,w),...S,children:m?Q1e(y,m):y})})}const jx={black:"#000",white:"#fff"},eEe={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},Sm={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",A100:"#ea80fc",A200:"#e040fb",A400:"#d500f9",A700:"#aa00ff"},Cm={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"},U0={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"},Em={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"},Pm={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",A100:"#80d8ff",A200:"#40c4ff",A400:"#00b0ff",A700:"#0091ea"},Tm={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"};function QZ(){return{text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:jx.white,default:jx.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}}}const tEe=QZ();function XZ(){return{text:{primary:jx.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:jx.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}}}const B4=XZ();function z4(e,t,n,r){const o=r.light||r,i=r.dark||r*1.5;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:t==="light"?e.light=xd(e.main,o):t==="dark"&&(e.dark=wd(e.main,i)))}function nEe(e="light"){return e==="dark"?{main:Em[200],light:Em[50],dark:Em[400]}:{main:Em[700],light:Em[400],dark:Em[800]}}function rEe(e="light"){return e==="dark"?{main:Sm[200],light:Sm[50],dark:Sm[400]}:{main:Sm[500],light:Sm[300],dark:Sm[700]}}function oEe(e="light"){return e==="dark"?{main:Cm[500],light:Cm[300],dark:Cm[700]}:{main:Cm[700],light:Cm[400],dark:Cm[800]}}function iEe(e="light"){return e==="dark"?{main:Pm[400],light:Pm[300],dark:Pm[700]}:{main:Pm[700],light:Pm[500],dark:Pm[900]}}function aEe(e="light"){return e==="dark"?{main:Tm[400],light:Tm[300],dark:Tm[700]}:{main:Tm[800],light:Tm[500],dark:Tm[900]}}function sEe(e="light"){return e==="dark"?{main:U0[400],light:U0[300],dark:U0[700]}:{main:"#ed6c02",light:U0[500],dark:U0[900]}}function Wj(e){const{mode:t="light",contrastThreshold:n=3,tonalOffset:r=.2,...o}=e,i=e.primary||nEe(t),a=e.secondary||rEe(t),s=e.error||oEe(t),l=e.info||iEe(t),c=e.success||aEe(t),u=e.warning||sEe(t);function d(m){return n1e(m,B4.text.primary)>=n?B4.text.primary:tEe.text.primary}const f=({color:m,name:y,mainShade:w=500,lightShade:x=300,darkShade:S=700})=>{if(m={...m},!m.main&&m[w]&&(m.main=m[w]),!m.hasOwnProperty("main"))throw new Error(bd(11,y?` (${y})`:"",w));if(typeof m.main!="string")throw new Error(bd(12,y?` (${y})`:"",JSON.stringify(m.main)));return z4(m,"light",x,r),z4(m,"dark",S,r),m.contrastText||(m.contrastText=d(m.main)),m};let p;return t==="light"?p=QZ():t==="dark"&&(p=XZ()),Ao({common:{...jx},mode:t,primary:f({color:i,name:"primary"}),secondary:f({color:a,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:f({color:s,name:"error"}),warning:f({color:u,name:"warning"}),info:f({color:l,name:"info"}),success:f({color:c,name:"success"}),grey:eEe,contrastThreshold:n,getContrastText:d,augmentColor:f,tonalOffset:r,...p},o)}function lEe(e){const t={};return Object.entries(e).forEach(r=>{const[o,i]=r;typeof i=="object"&&(t[o]=`${i.fontStyle?`${i.fontStyle} `:""}${i.fontVariant?`${i.fontVariant} `:""}${i.fontWeight?`${i.fontWeight} `:""}${i.fontStretch?`${i.fontStretch} `:""}${i.fontSize||""}${i.lineHeight?`/${i.lineHeight} `:""}${i.fontFamily||""}`)}),t}function cEe(e,t){return{toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}},...t}}function uEe(e){return Math.round(e*1e5)/1e5}const V4={textTransform:"uppercase"},H4='"Roboto", "Helvetica", "Arial", sans-serif';function JZ(e,t){const{fontFamily:n=H4,fontSize:r=14,fontWeightLight:o=300,fontWeightRegular:i=400,fontWeightMedium:a=500,fontWeightBold:s=700,htmlFontSize:l=16,allVariants:c,pxToRem:u,...d}=typeof t=="function"?t(e):t,f=r/14,p=u||(y=>`${y/l*f}rem`),h=(y,w,x,S,E)=>({fontFamily:n,fontWeight:y,fontSize:p(w),lineHeight:x,...n===H4?{letterSpacing:`${uEe(S/w)}em`}:{},...E,...c}),m={h1:h(o,96,1.167,-1.5),h2:h(o,60,1.2,-.5),h3:h(i,48,1.167,0),h4:h(i,34,1.235,.25),h5:h(i,24,1.334,0),h6:h(a,20,1.6,.15),subtitle1:h(i,16,1.75,.15),subtitle2:h(a,14,1.57,.1),body1:h(i,16,1.5,.15),body2:h(i,14,1.43,.15),button:h(a,14,1.75,.4,V4),caption:h(i,12,1.66,.4),overline:h(i,12,2.66,1,V4),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return Ao({htmlFontSize:l,pxToRem:p,fontFamily:n,fontSize:r,fontWeightLight:o,fontWeightRegular:i,fontWeightMedium:a,fontWeightBold:s,...m},d,{clone:!1})}const dEe=.2,fEe=.14,pEe=.12;function Ur(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${dEe})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${fEe})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${pEe})`].join(",")}const hEe=["none",Ur(0,2,1,-1,0,1,1,0,0,1,3,0),Ur(0,3,1,-2,0,2,2,0,0,1,5,0),Ur(0,3,3,-2,0,3,4,0,0,1,8,0),Ur(0,2,4,-1,0,4,5,0,0,1,10,0),Ur(0,3,5,-1,0,5,8,0,0,1,14,0),Ur(0,3,5,-1,0,6,10,0,0,1,18,0),Ur(0,4,5,-2,0,7,10,1,0,2,16,1),Ur(0,5,5,-3,0,8,10,1,0,3,14,2),Ur(0,5,6,-3,0,9,12,1,0,3,16,2),Ur(0,6,6,-3,0,10,14,1,0,4,18,3),Ur(0,6,7,-4,0,11,15,1,0,4,20,3),Ur(0,7,8,-4,0,12,17,2,0,5,22,4),Ur(0,7,8,-4,0,13,19,2,0,5,24,4),Ur(0,7,9,-4,0,14,21,2,0,5,26,4),Ur(0,8,9,-5,0,15,22,2,0,6,28,5),Ur(0,8,10,-5,0,16,24,2,0,6,30,5),Ur(0,8,11,-5,0,17,26,2,0,6,32,5),Ur(0,9,11,-5,0,18,28,2,0,7,34,6),Ur(0,9,12,-6,0,19,29,2,0,7,36,6),Ur(0,10,13,-6,0,20,31,3,0,8,38,7),Ur(0,10,13,-6,0,21,33,3,0,8,40,7),Ur(0,10,14,-6,0,22,35,3,0,8,42,7),Ur(0,11,14,-7,0,23,36,3,0,9,44,8),Ur(0,11,15,-7,0,24,38,3,0,9,46,8)],gEe={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},ZZ={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function U4(e){return`${Math.round(e)}ms`}function mEe(e){if(!e)return 0;const t=e/36;return Math.min(Math.round((4+15*t**.25+t/5)*10),3e3)}function yEe(e){const t={...gEe,...e.easing},n={...ZZ,...e.duration};return{getAutoHeightDuration:mEe,create:(o=["all"],i={})=>{const{duration:a=n.standard,easing:s=t.easeInOut,delay:l=0,...c}=i;return(Array.isArray(o)?o:[o]).map(u=>`${u} ${typeof a=="string"?a:U4(a)} ${s} ${typeof l=="string"?l:U4(l)}`).join(",")},...e,easing:t,duration:n}}const vEe={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function bEe(e){return eu(e)||typeof e>"u"||typeof e=="string"||typeof e=="boolean"||typeof e=="number"||Array.isArray(e)}function eee(e={}){const t={...e};function n(r){const o=Object.entries(r);for(let i=0;iOo(p,h),f),f.unstable_sxConfig={...xC,...c==null?void 0:c.unstable_sxConfig},f.unstable_sx=function(h){return tp({sx:h,theme:this})},f.toRuntimeSource=YZ,f}function G_(e){let t;return e<1?t=5.11916*e**2:t=4.5*Math.log(e+1)+2,Math.round(t*10)/1e3}const dEe=[...Array(25)].map((e,t)=>{if(t===0)return"none";const n=G_(t);return`linear-gradient(rgba(255 255 255 / ${n}), rgba(255 255 255 / ${n}))`});function QZ(e){return{inputPlaceholder:e==="dark"?.5:.42,inputUnderline:e==="dark"?.7:.42,switchTrackDisabled:e==="dark"?.2:.12,switchTrack:e==="dark"?.3:.38}}function XZ(e){return e==="dark"?dEe:[]}function fEe(e){const{palette:t={mode:"light"},opacity:n,overlays:r,...o}=e,i=Bj(t);return{palette:i,opacity:{...QZ(i.mode),...n},overlays:r||XZ(i.mode),...o}}function pEe(e){var t;return!!e[0].match(/(cssVarPrefix|colorSchemeSelector|rootSelector|typography|mixins|breakpoints|direction|transitions)/)||!!e[0].match(/sxConfig$/)||e[0]==="palette"&&!!((t=e[1])!=null&&t.match(/(mode|contrastThreshold|tonalOffset)/))}const hEe=e=>[...[...Array(25)].map((t,n)=>`--${e?`${e}-`:""}overlays-${n}`),`--${e?`${e}-`:""}palette-AppBar-darkBg`,`--${e?`${e}-`:""}palette-AppBar-darkColor`],gEe=e=>(t,n)=>{const r=e.rootSelector||":root",o=e.colorSchemeSelector;let i=o;if(o==="class"&&(i=".%s"),o==="data"&&(i="[data-%s]"),o!=null&&o.startsWith("data-")&&!o.includes("%s")&&(i=`[${o}="%s"]`),e.defaultColorScheme===t){if(t==="dark"){const a={};return hEe(e.cssVarPrefix).forEach(s=>{a[s]=n[s],delete n[s]}),i==="media"?{[r]:n,"@media (prefers-color-scheme: dark)":{[r]:a}}:i?{[i.replace("%s",t)]:a,[`${r}, ${i.replace("%s",t)}`]:n}:{[r]:{...n,...a}}}if(i&&i!=="media")return`${r}, ${i.replace("%s",String(t))}`}else if(t){if(i==="media")return{[`@media (prefers-color-scheme: ${String(t)})`]:{[r]:n}};if(i)return i.replace("%s",String(t))}return r};function mEe(e,t){t.forEach(n=>{e[n]||(e[n]={})})}function je(e,t,n){!e[t]&&n&&(e[t]=n)}function kw(e){return!e||!e.startsWith("hsl")?e:kZ(e)}function zu(e,t){`${t}Channel`in e||(e[`${t}Channel`]=Aw(kw(e[t]),`MUI: Can't create \`palette.${t}Channel\` because \`palette.${t}\` is not one of these formats: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color(). -To suppress this warning, you need to explicitly provide the \`palette.${t}Channel\` as a string (in rgb format, for example "12 12 12") or undefined if you want to remove the channel token.`))}function yEe(e){return typeof e=="number"?`${e}px`:typeof e=="string"||typeof e=="function"||Array.isArray(e)?e:"8px"}const Bc=e=>{try{return e()}catch{}},vEe=(e="mui")=>p1e(e);function E$(e,t,n,r){if(!t)return;t=t===!0?{}:t;const o=r==="dark"?"dark":"light";if(!n){e[r]=fEe({...t,palette:{mode:o,...t==null?void 0:t.palette}});return}const{palette:i,...a}=W_({...n,palette:{mode:o,...t==null?void 0:t.palette}});return e[r]={...t,palette:i,opacity:{...QZ(o),...t==null?void 0:t.opacity},overlays:(t==null?void 0:t.overlays)||XZ(o)},a}function bEe(e={},...t){const{colorSchemes:n={light:!0},defaultColorScheme:r,disableCssColorScheme:o=!1,cssVarPrefix:i="mui",shouldSkipGeneratingVar:a=pEe,colorSchemeSelector:s=n.light&&n.dark?"media":void 0,rootSelector:l=":root",...c}=e,u=Object.keys(n)[0],d=r||(n.light&&u!=="light"?"light":u),f=vEe(i),{[d]:p,light:h,dark:m,...y}=n,w={...y};let x=p;if((d==="dark"&&!("dark"in n)||d==="light"&&!("light"in n))&&(x=!0),!x)throw new Error(vd(21,d));const C=E$(w,x,c,d);h&&!w.light&&E$(w,h,void 0,"light"),m&&!w.dark&&E$(w,m,void 0,"dark");let E={defaultColorScheme:d,...C,cssVarPrefix:i,colorSchemeSelector:s,rootSelector:l,getCssVar:f,colorSchemes:w,font:{...Z1e(C.typography),...C.font},spacing:yEe(c.spacing)};Object.keys(E.colorSchemes).forEach(k=>{const O=E.colorSchemes[k].palette,$=N=>{const L=N.split("-"),j=L[1],D=L[2];return f(N,O[j][D])};if(O.mode==="light"&&(je(O.common,"background","#fff"),je(O.common,"onBackground","#000")),O.mode==="dark"&&(je(O.common,"background","#000"),je(O.common,"onBackground","#fff")),mEe(O,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),O.mode==="light"){je(O.Alert,"errorColor",xr(O.error.light,.6)),je(O.Alert,"infoColor",xr(O.info.light,.6)),je(O.Alert,"successColor",xr(O.success.light,.6)),je(O.Alert,"warningColor",xr(O.warning.light,.6)),je(O.Alert,"errorFilledBg",$("palette-error-main")),je(O.Alert,"infoFilledBg",$("palette-info-main")),je(O.Alert,"successFilledBg",$("palette-success-main")),je(O.Alert,"warningFilledBg",$("palette-warning-main")),je(O.Alert,"errorFilledColor",Bc(()=>O.getContrastText(O.error.main))),je(O.Alert,"infoFilledColor",Bc(()=>O.getContrastText(O.info.main))),je(O.Alert,"successFilledColor",Bc(()=>O.getContrastText(O.success.main))),je(O.Alert,"warningFilledColor",Bc(()=>O.getContrastText(O.warning.main))),je(O.Alert,"errorStandardBg",Sr(O.error.light,.9)),je(O.Alert,"infoStandardBg",Sr(O.info.light,.9)),je(O.Alert,"successStandardBg",Sr(O.success.light,.9)),je(O.Alert,"warningStandardBg",Sr(O.warning.light,.9)),je(O.Alert,"errorIconColor",$("palette-error-main")),je(O.Alert,"infoIconColor",$("palette-info-main")),je(O.Alert,"successIconColor",$("palette-success-main")),je(O.Alert,"warningIconColor",$("palette-warning-main")),je(O.AppBar,"defaultBg",$("palette-grey-100")),je(O.Avatar,"defaultBg",$("palette-grey-400")),je(O.Button,"inheritContainedBg",$("palette-grey-300")),je(O.Button,"inheritContainedHoverBg",$("palette-grey-A100")),je(O.Chip,"defaultBorder",$("palette-grey-400")),je(O.Chip,"defaultAvatarColor",$("palette-grey-700")),je(O.Chip,"defaultIconColor",$("palette-grey-700")),je(O.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),je(O.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),je(O.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),je(O.LinearProgress,"primaryBg",Sr(O.primary.main,.62)),je(O.LinearProgress,"secondaryBg",Sr(O.secondary.main,.62)),je(O.LinearProgress,"errorBg",Sr(O.error.main,.62)),je(O.LinearProgress,"infoBg",Sr(O.info.main,.62)),je(O.LinearProgress,"successBg",Sr(O.success.main,.62)),je(O.LinearProgress,"warningBg",Sr(O.warning.main,.62)),je(O.Skeleton,"bg",`rgba(${$("palette-text-primaryChannel")} / 0.11)`),je(O.Slider,"primaryTrack",Sr(O.primary.main,.62)),je(O.Slider,"secondaryTrack",Sr(O.secondary.main,.62)),je(O.Slider,"errorTrack",Sr(O.error.main,.62)),je(O.Slider,"infoTrack",Sr(O.info.main,.62)),je(O.Slider,"successTrack",Sr(O.success.main,.62)),je(O.Slider,"warningTrack",Sr(O.warning.main,.62));const N=wE(O.background.default,.8);je(O.SnackbarContent,"bg",N),je(O.SnackbarContent,"color",Bc(()=>O.getContrastText(N))),je(O.SpeedDialAction,"fabHoverBg",wE(O.background.paper,.15)),je(O.StepConnector,"border",$("palette-grey-400")),je(O.StepContent,"border",$("palette-grey-400")),je(O.Switch,"defaultColor",$("palette-common-white")),je(O.Switch,"defaultDisabledColor",$("palette-grey-100")),je(O.Switch,"primaryDisabledColor",Sr(O.primary.main,.62)),je(O.Switch,"secondaryDisabledColor",Sr(O.secondary.main,.62)),je(O.Switch,"errorDisabledColor",Sr(O.error.main,.62)),je(O.Switch,"infoDisabledColor",Sr(O.info.main,.62)),je(O.Switch,"successDisabledColor",Sr(O.success.main,.62)),je(O.Switch,"warningDisabledColor",Sr(O.warning.main,.62)),je(O.TableCell,"border",Sr(bE(O.divider,1),.88)),je(O.Tooltip,"bg",bE(O.grey[700],.92))}if(O.mode==="dark"){je(O.Alert,"errorColor",Sr(O.error.light,.6)),je(O.Alert,"infoColor",Sr(O.info.light,.6)),je(O.Alert,"successColor",Sr(O.success.light,.6)),je(O.Alert,"warningColor",Sr(O.warning.light,.6)),je(O.Alert,"errorFilledBg",$("palette-error-dark")),je(O.Alert,"infoFilledBg",$("palette-info-dark")),je(O.Alert,"successFilledBg",$("palette-success-dark")),je(O.Alert,"warningFilledBg",$("palette-warning-dark")),je(O.Alert,"errorFilledColor",Bc(()=>O.getContrastText(O.error.dark))),je(O.Alert,"infoFilledColor",Bc(()=>O.getContrastText(O.info.dark))),je(O.Alert,"successFilledColor",Bc(()=>O.getContrastText(O.success.dark))),je(O.Alert,"warningFilledColor",Bc(()=>O.getContrastText(O.warning.dark))),je(O.Alert,"errorStandardBg",xr(O.error.light,.9)),je(O.Alert,"infoStandardBg",xr(O.info.light,.9)),je(O.Alert,"successStandardBg",xr(O.success.light,.9)),je(O.Alert,"warningStandardBg",xr(O.warning.light,.9)),je(O.Alert,"errorIconColor",$("palette-error-main")),je(O.Alert,"infoIconColor",$("palette-info-main")),je(O.Alert,"successIconColor",$("palette-success-main")),je(O.Alert,"warningIconColor",$("palette-warning-main")),je(O.AppBar,"defaultBg",$("palette-grey-900")),je(O.AppBar,"darkBg",$("palette-background-paper")),je(O.AppBar,"darkColor",$("palette-text-primary")),je(O.Avatar,"defaultBg",$("palette-grey-600")),je(O.Button,"inheritContainedBg",$("palette-grey-800")),je(O.Button,"inheritContainedHoverBg",$("palette-grey-700")),je(O.Chip,"defaultBorder",$("palette-grey-700")),je(O.Chip,"defaultAvatarColor",$("palette-grey-300")),je(O.Chip,"defaultIconColor",$("palette-grey-300")),je(O.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),je(O.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),je(O.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),je(O.LinearProgress,"primaryBg",xr(O.primary.main,.5)),je(O.LinearProgress,"secondaryBg",xr(O.secondary.main,.5)),je(O.LinearProgress,"errorBg",xr(O.error.main,.5)),je(O.LinearProgress,"infoBg",xr(O.info.main,.5)),je(O.LinearProgress,"successBg",xr(O.success.main,.5)),je(O.LinearProgress,"warningBg",xr(O.warning.main,.5)),je(O.Skeleton,"bg",`rgba(${$("palette-text-primaryChannel")} / 0.13)`),je(O.Slider,"primaryTrack",xr(O.primary.main,.5)),je(O.Slider,"secondaryTrack",xr(O.secondary.main,.5)),je(O.Slider,"errorTrack",xr(O.error.main,.5)),je(O.Slider,"infoTrack",xr(O.info.main,.5)),je(O.Slider,"successTrack",xr(O.success.main,.5)),je(O.Slider,"warningTrack",xr(O.warning.main,.5));const N=wE(O.background.default,.98);je(O.SnackbarContent,"bg",N),je(O.SnackbarContent,"color",Bc(()=>O.getContrastText(N))),je(O.SpeedDialAction,"fabHoverBg",wE(O.background.paper,.15)),je(O.StepConnector,"border",$("palette-grey-600")),je(O.StepContent,"border",$("palette-grey-600")),je(O.Switch,"defaultColor",$("palette-grey-300")),je(O.Switch,"defaultDisabledColor",$("palette-grey-600")),je(O.Switch,"primaryDisabledColor",xr(O.primary.main,.55)),je(O.Switch,"secondaryDisabledColor",xr(O.secondary.main,.55)),je(O.Switch,"errorDisabledColor",xr(O.error.main,.55)),je(O.Switch,"infoDisabledColor",xr(O.info.main,.55)),je(O.Switch,"successDisabledColor",xr(O.success.main,.55)),je(O.Switch,"warningDisabledColor",xr(O.warning.main,.55)),je(O.TableCell,"border",xr(bE(O.divider,1),.68)),je(O.Tooltip,"bg",bE(O.grey[700],.92))}zu(O.background,"default"),zu(O.background,"paper"),zu(O.common,"background"),zu(O.common,"onBackground"),zu(O,"divider"),Object.keys(O).forEach(N=>{const L=O[N];L&&typeof L=="object"&&(L.main&&je(O[N],"mainChannel",Aw(kw(L.main))),L.light&&je(O[N],"lightChannel",Aw(kw(L.light))),L.dark&&je(O[N],"darkChannel",Aw(kw(L.dark))),L.contrastText&&je(O[N],"contrastTextChannel",Aw(kw(L.contrastText))),N==="text"&&(zu(O[N],"primary"),zu(O[N],"secondary")),N==="action"&&(L.active&&zu(O[N],"active"),L.selected&&zu(O[N],"selected")))})}),E=t.reduce((k,O)=>Oo(k,O),E);const P={prefix:i,disableCssColorScheme:o,shouldSkipGeneratingVar:a,getSelector:gEe(E)},{vars:T,generateThemeVars:I,generateStyleSheets:A}=m1e(E,P);return E.vars=T,Object.entries(E.colorSchemes[E.defaultColorScheme]).forEach(([k,O])=>{E[k]=O}),E.generateThemeVars=I,E.generateStyleSheets=A,E.generateSpacing=function(){return wZ(c.spacing,gA(this))},E.getColorSchemeSelector=y1e(s),E.spacing=E.generateSpacing(),E.shouldSkipGeneratingVar=a,E.unstable_sxConfig={...xC,...c==null?void 0:c.unstable_sxConfig},E.unstable_sx=function(O){return tp({sx:O,theme:this})},E.toRuntimeSource=YZ,E}function z4(e,t,n){e.colorSchemes&&n&&(e.colorSchemes[t]={...n!==!0&&n,palette:Bj({...n===!0?{}:n.palette,mode:t})})}function TC(e={},...t){const{palette:n,cssVariables:r=!1,colorSchemes:o=n?void 0:{light:!0},defaultColorScheme:i=n==null?void 0:n.mode,...a}=e,s=i||"light",l=o==null?void 0:o[s],c={...o,...n?{[s]:{...typeof l!="boolean"&&l,palette:n}}:void 0};if(r===!1){if(!("colorSchemes"in e))return W_(e,...t);let u=n;"palette"in e||c[s]&&(c[s]!==!0?u=c[s].palette:s==="dark"&&(u={mode:"dark"}));const d=W_({...e,palette:u},...t);return d.defaultColorScheme=s,d.colorSchemes=c,d.palette.mode==="light"&&(d.colorSchemes.light={...c.light!==!0&&c.light,palette:d.palette},z4(d,"dark",c.dark)),d.palette.mode==="dark"&&(d.colorSchemes.dark={...c.dark!==!0&&c.dark,palette:d.palette},z4(d,"light",c.light)),d}return!n&&!("light"in c)&&s==="light"&&(c.light=!0),bEe({...a,colorSchemes:c,defaultColorScheme:s,...typeof r!="boolean"&&r},...t)}function wEe(e){return String(e).match(/[\d.\-+]*\s*(.*)/)[1]||""}function xEe(e){return parseFloat(e)}const _A=TC();function Ro(){const e=SC(_A);return e[vc]||e}function cn({props:e,name:t}){return RA({props:e,name:t,defaultTheme:_A,themeId:vc})}function JZ(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const xi=e=>JZ(e)&&e!=="classes",oe=IZ({themeId:vc,defaultTheme:_A,rootShouldForwardProp:xi});function V4({theme:e,...t}){const n=vc in e?e[vc]:void 0;return R.jsx(HZ,{...t,themeId:n?vc:void 0,theme:n||e})}const xE={attribute:"data-mui-color-scheme",colorSchemeStorageKey:"mui-color-scheme",defaultLightColorScheme:"light",defaultDarkColorScheme:"dark",modeStorageKey:"mui-mode"},{CssVarsProvider:SEe,useColorScheme:_5t,getInitColorSchemeScript:N5t}=f1e({themeId:vc,theme:()=>TC({cssVariables:!0}),colorSchemeStorageKey:xE.colorSchemeStorageKey,modeStorageKey:xE.modeStorageKey,defaultColorScheme:{light:xE.defaultLightColorScheme,dark:xE.defaultDarkColorScheme},resolveTheme:e=>{const t={...e,typography:qZ(e.palette,e.typography)};return t.unstable_sx=function(r){return tp({sx:r,theme:this})},t}}),CEe=SEe;function yp({theme:e,...t}){return typeof e=="function"?R.jsx(V4,{theme:e,...t}):"colorSchemes"in(vc in e?e[vc]:e)?R.jsx(CEe,{theme:e,...t}):R.jsx(V4,{theme:e,...t})}var xb=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},lg=typeof window>"u"||"Deno"in globalThis;function nl(){}function EEe(e,t){return typeof e=="function"?e(t):e}function q_(e){return typeof e=="number"&&e>=0&&e!==1/0}function ZZ(e,t){return Math.max(e+(t||0)-Date.now(),0)}function $y(e,t){return typeof e=="function"?e(t):e}function cc(e,t){return typeof e=="function"?e(t):e}function H4(e,t){const{type:n="all",exact:r,fetchStatus:o,predicate:i,queryKey:a,stale:s}=e;if(a){if(r){if(t.queryHash!==zj(a,t.options))return!1}else if(!_x(t.queryKey,a))return!1}if(n!=="all"){const l=t.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof s=="boolean"&&t.isStale()!==s||o&&o!==t.state.fetchStatus||i&&!i(t))}function U4(e,t){const{exact:n,status:r,predicate:o,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(n){if(cg(t.options.mutationKey)!==cg(i))return!1}else if(!_x(t.options.mutationKey,i))return!1}return!(r&&t.state.status!==r||o&&!o(t))}function zj(e,t){return((t==null?void 0:t.queryKeyHashFn)||cg)(e)}function cg(e){return JSON.stringify(e,(t,n)=>K_(n)?Object.keys(n).sort().reduce((r,o)=>(r[o]=n[o],r),{}):n)}function _x(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(n=>!_x(e[n],t[n])):!1}function eee(e,t){if(e===t)return e;const n=W4(e)&&W4(t);if(n||K_(e)&&K_(t)){const r=n?e:Object.keys(e),o=r.length,i=n?t:Object.keys(t),a=i.length,s=n?[]:{};let l=0;for(let c=0;c{setTimeout(t,e)})}function Y_(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?eee(e,t):t}function TEe(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function IEe(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Vj=Symbol();function tee(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Vj?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var zh,wf,tv,xJ,OEe=(xJ=class extends xb{constructor(){super();qt(this,zh);qt(this,wf);qt(this,tv);Ct(this,tv,t=>{if(!lg&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){be(this,wf)||this.setEventListener(be(this,tv))}onUnsubscribe(){var t;this.hasListeners()||((t=be(this,wf))==null||t.call(this),Ct(this,wf,void 0))}setEventListener(t){var n;Ct(this,tv,t),(n=be(this,wf))==null||n.call(this),Ct(this,wf,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){be(this,zh)!==t&&(Ct(this,zh,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof be(this,zh)=="boolean"?be(this,zh):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},zh=new WeakMap,wf=new WeakMap,tv=new WeakMap,xJ),Hj=new OEe,nv,xf,rv,SJ,AEe=(SJ=class extends xb{constructor(){super();qt(this,nv,!0);qt(this,xf);qt(this,rv);Ct(this,rv,t=>{if(!lg&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){be(this,xf)||this.setEventListener(be(this,rv))}onUnsubscribe(){var t;this.hasListeners()||((t=be(this,xf))==null||t.call(this),Ct(this,xf,void 0))}setEventListener(t){var n;Ct(this,rv,t),(n=be(this,xf))==null||n.call(this),Ct(this,xf,t(this.setOnline.bind(this)))}setOnline(t){be(this,nv)!==t&&(Ct(this,nv,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return be(this,nv)}},nv=new WeakMap,xf=new WeakMap,rv=new WeakMap,SJ),CT=new AEe;function Q_(){let e,t;const n=new Promise((o,i)=>{e=o,t=i});n.status="pending",n.catch(()=>{});function r(o){Object.assign(n,o),delete n.resolve,delete n.reject}return n.resolve=o=>{r({status:"fulfilled",value:o}),e(o)},n.reject=o=>{r({status:"rejected",reason:o}),t(o)},n}function kEe(e){return Math.min(1e3*2**e,3e4)}function nee(e){return(e??"online")==="online"?CT.isOnline():!0}var ree=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function P$(e){return e instanceof ree}function oee(e){let t=!1,n=0,r=!1,o;const i=Q_(),a=m=>{var y;r||(f(new ree(m)),(y=e.abort)==null||y.call(e))},s=()=>{t=!0},l=()=>{t=!1},c=()=>Hj.isFocused()&&(e.networkMode==="always"||CT.isOnline())&&e.canRun(),u=()=>nee(e.networkMode)&&e.canRun(),d=m=>{var y;r||(r=!0,(y=e.onSuccess)==null||y.call(e,m),o==null||o(),i.resolve(m))},f=m=>{var y;r||(r=!0,(y=e.onError)==null||y.call(e,m),o==null||o(),i.reject(m))},p=()=>new Promise(m=>{var y;o=w=>{(r||c())&&m(w)},(y=e.onPause)==null||y.call(e)}).then(()=>{var m;o=void 0,r||(m=e.onContinue)==null||m.call(e)}),h=()=>{if(r)return;let m;const y=n===0?e.initialPromise:void 0;try{m=y??e.fn()}catch(w){m=Promise.reject(w)}Promise.resolve(m).then(d).catch(w=>{var T;if(r)return;const x=e.retry??(lg?0:3),C=e.retryDelay??kEe,E=typeof C=="function"?C(n,w):C,P=x===!0||typeof x=="number"&&nc()?void 0:p()).then(()=>{t?f(w):h()})})};return{promise:i,cancel:a,continue:()=>(o==null||o(),i),cancelRetry:s,continueRetry:l,canStart:u,start:()=>(u()?h():p().then(h),i)}}function MEe(){let e=[],t=0,n=s=>{s()},r=s=>{s()},o=s=>setTimeout(s,0);const i=s=>{t?e.push(s):o(()=>{n(s)})},a=()=>{const s=e;e=[],s.length&&o(()=>{r(()=>{s.forEach(l=>{n(l)})})})};return{batch:s=>{let l;t++;try{l=s()}finally{t--,t||a()}return l},batchCalls:s=>(...l)=>{i(()=>{s(...l)})},schedule:i,setNotifyFunction:s=>{n=s},setBatchNotifyFunction:s=>{r=s},setScheduler:s=>{o=s}}}var jo=MEe(),Vh,CJ,iee=(CJ=class{constructor(){qt(this,Vh)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),q_(this.gcTime)&&Ct(this,Vh,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(lg?1/0:5*60*1e3))}clearGcTimeout(){be(this,Vh)&&(clearTimeout(be(this,Vh)),Ct(this,Vh,void 0))}},Vh=new WeakMap,CJ),ov,iv,tl,Ii,fC,Hh,oc,Wu,EJ,REe=(EJ=class extends iee{constructor(t){super();qt(this,oc);qt(this,ov);qt(this,iv);qt(this,tl);qt(this,Ii);qt(this,fC);qt(this,Hh);Ct(this,Hh,!1),Ct(this,fC,t.defaultOptions),this.setOptions(t.options),this.observers=[],Ct(this,tl,t.cache),this.queryKey=t.queryKey,this.queryHash=t.queryHash,Ct(this,ov,$Ee(this.options)),this.state=t.state??be(this,ov),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=be(this,Ii))==null?void 0:t.promise}setOptions(t){this.options={...be(this,fC),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&be(this,tl).remove(this)}setData(t,n){const r=Y_(this.state.data,t,this.options);return xn(this,oc,Wu).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){xn(this,oc,Wu).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,o;const n=(r=be(this,Ii))==null?void 0:r.promise;return(o=be(this,Ii))==null||o.cancel(t),n?n.then(nl).catch(nl):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(be(this,ov))}isActive(){return this.observers.some(t=>cc(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Vj||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStale(){return this.state.isInvalidated?!0:this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0}isStaleByTime(t=0){return this.state.isInvalidated||this.state.data===void 0||!ZZ(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=be(this,Ii))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=be(this,Ii))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),be(this,tl).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(be(this,Ii)&&(be(this,Hh)?be(this,Ii).cancel({revert:!0}):be(this,Ii).cancelRetry()),this.scheduleGc()),be(this,tl).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||xn(this,oc,Wu).call(this,{type:"invalidate"})}fetch(t,n){var l,c,u;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(be(this,Ii))return be(this,Ii).continueRetry(),be(this,Ii).promise}if(t&&this.setOptions(t),!this.options.queryFn){const d=this.observers.find(f=>f.options.queryFn);d&&this.setOptions(d.options)}const r=new AbortController,o=d=>{Object.defineProperty(d,"signal",{enumerable:!0,get:()=>(Ct(this,Hh,!0),r.signal)})},i=()=>{const d=tee(this.options,n),f={queryKey:this.queryKey,meta:this.meta};return o(f),Ct(this,Hh,!1),this.options.persister?this.options.persister(d,f,this):d(f)},a={fetchOptions:n,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:i};o(a),(l=this.options.behavior)==null||l.onFetch(a,this),Ct(this,iv,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((c=a.fetchOptions)==null?void 0:c.meta))&&xn(this,oc,Wu).call(this,{type:"fetch",meta:(u=a.fetchOptions)==null?void 0:u.meta});const s=d=>{var f,p,h,m;P$(d)&&d.silent||xn(this,oc,Wu).call(this,{type:"error",error:d}),P$(d)||((p=(f=be(this,tl).config).onError)==null||p.call(f,d,this),(m=(h=be(this,tl).config).onSettled)==null||m.call(h,this.state.data,d,this)),this.scheduleGc()};return Ct(this,Ii,oee({initialPromise:n==null?void 0:n.initialPromise,fn:a.fetchFn,abort:r.abort.bind(r),onSuccess:d=>{var f,p,h,m;if(d===void 0){s(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(d)}catch(y){s(y);return}(p=(f=be(this,tl).config).onSuccess)==null||p.call(f,d,this),(m=(h=be(this,tl).config).onSettled)==null||m.call(h,d,this.state.error,this),this.scheduleGc()},onError:s,onFail:(d,f)=>{xn(this,oc,Wu).call(this,{type:"failed",failureCount:d,error:f})},onPause:()=>{xn(this,oc,Wu).call(this,{type:"pause"})},onContinue:()=>{xn(this,oc,Wu).call(this,{type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0})),be(this,Ii).start()}},ov=new WeakMap,iv=new WeakMap,tl=new WeakMap,Ii=new WeakMap,fC=new WeakMap,Hh=new WeakMap,oc=new WeakSet,Wu=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...aee(r.data,this.options),fetchMeta:t.meta??null};case"success":return{...r,data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const o=t.error;return P$(o)&&o.revert&&be(this,iv)?{...be(this,iv),fetchStatus:"idle"}:{...r,error:o,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),jo.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),be(this,tl).notify({query:this,type:"updated",action:t})})},EJ);function aee(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:nee(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function $Ee(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var Gc,PJ,DEe=(PJ=class extends xb{constructor(t={}){super();qt(this,Gc);this.config=t,Ct(this,Gc,new Map)}build(t,n,r){const o=n.queryKey,i=n.queryHash??zj(o,n);let a=this.get(i);return a||(a=new REe({cache:this,queryKey:o,queryHash:i,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(o)}),this.add(a)),a}add(t){be(this,Gc).has(t.queryHash)||(be(this,Gc).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=be(this,Gc).get(t.queryHash);n&&(t.destroy(),n===t&&be(this,Gc).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){jo.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return be(this,Gc).get(t)}getAll(){return[...be(this,Gc).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>H4(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>H4(t,r)):n}notify(t){jo.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){jo.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){jo.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Gc=new WeakMap,PJ),qc,Yi,Uh,Kc,rf,TJ,_Ee=(TJ=class extends iee{constructor(t){super();qt(this,Kc);qt(this,qc);qt(this,Yi);qt(this,Uh);this.mutationId=t.mutationId,Ct(this,Yi,t.mutationCache),Ct(this,qc,[]),this.state=t.state||see(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){be(this,qc).includes(t)||(be(this,qc).push(t),this.clearGcTimeout(),be(this,Yi).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){Ct(this,qc,be(this,qc).filter(n=>n!==t)),this.scheduleGc(),be(this,Yi).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){be(this,qc).length||(this.state.status==="pending"?this.scheduleGc():be(this,Yi).remove(this))}continue(){var t;return((t=be(this,Uh))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var o,i,a,s,l,c,u,d,f,p,h,m,y,w,x,C,E,P,T,I;Ct(this,Uh,oee({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(A,k)=>{xn(this,Kc,rf).call(this,{type:"failed",failureCount:A,error:k})},onPause:()=>{xn(this,Kc,rf).call(this,{type:"pause"})},onContinue:()=>{xn(this,Kc,rf).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>be(this,Yi).canRun(this)}));const n=this.state.status==="pending",r=!be(this,Uh).canStart();try{if(!n){xn(this,Kc,rf).call(this,{type:"pending",variables:t,isPaused:r}),await((i=(o=be(this,Yi).config).onMutate)==null?void 0:i.call(o,t,this));const k=await((s=(a=this.options).onMutate)==null?void 0:s.call(a,t));k!==this.state.context&&xn(this,Kc,rf).call(this,{type:"pending",context:k,variables:t,isPaused:r})}const A=await be(this,Uh).start();return await((c=(l=be(this,Yi).config).onSuccess)==null?void 0:c.call(l,A,t,this.state.context,this)),await((d=(u=this.options).onSuccess)==null?void 0:d.call(u,A,t,this.state.context)),await((p=(f=be(this,Yi).config).onSettled)==null?void 0:p.call(f,A,null,this.state.variables,this.state.context,this)),await((m=(h=this.options).onSettled)==null?void 0:m.call(h,A,null,t,this.state.context)),xn(this,Kc,rf).call(this,{type:"success",data:A}),A}catch(A){try{throw await((w=(y=be(this,Yi).config).onError)==null?void 0:w.call(y,A,t,this.state.context,this)),await((C=(x=this.options).onError)==null?void 0:C.call(x,A,t,this.state.context)),await((P=(E=be(this,Yi).config).onSettled)==null?void 0:P.call(E,void 0,A,this.state.variables,this.state.context,this)),await((I=(T=this.options).onSettled)==null?void 0:I.call(T,void 0,A,t,this.state.context)),A}finally{xn(this,Kc,rf).call(this,{type:"error",error:A})}}finally{be(this,Yi).runNext(this)}}},qc=new WeakMap,Yi=new WeakMap,Uh=new WeakMap,Kc=new WeakSet,rf=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),jo.batch(()=>{be(this,qc).forEach(r=>{r.onMutationUpdate(t)}),be(this,Yi).notify({mutation:this,type:"updated",action:t})})},TJ);function see(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Ja,pC,IJ,NEe=(IJ=class extends xb{constructor(t={}){super();qt(this,Ja);qt(this,pC);this.config=t,Ct(this,Ja,new Map),Ct(this,pC,Date.now())}build(t,n,r){const o=new _Ee({mutationCache:this,mutationId:++mE(this,pC)._,options:t.defaultMutationOptions(n),state:r});return this.add(o),o}add(t){const n=SE(t),r=be(this,Ja).get(n)??[];r.push(t),be(this,Ja).set(n,r),this.notify({type:"added",mutation:t})}remove(t){var r;const n=SE(t);if(be(this,Ja).has(n)){const o=(r=be(this,Ja).get(n))==null?void 0:r.filter(i=>i!==t);o&&(o.length===0?be(this,Ja).delete(n):be(this,Ja).set(n,o))}this.notify({type:"removed",mutation:t})}canRun(t){var r;const n=(r=be(this,Ja).get(SE(t)))==null?void 0:r.find(o=>o.state.status==="pending");return!n||n===t}runNext(t){var r;const n=(r=be(this,Ja).get(SE(t)))==null?void 0:r.find(o=>o!==t&&o.state.isPaused);return(n==null?void 0:n.continue())??Promise.resolve()}clear(){jo.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}getAll(){return[...be(this,Ja).values()].flat()}find(t){const n={exact:!0,...t};return this.getAll().find(r=>U4(n,r))}findAll(t={}){return this.getAll().filter(n=>U4(t,n))}notify(t){jo.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return jo.batch(()=>Promise.all(t.map(n=>n.continue().catch(nl))))}},Ja=new WeakMap,pC=new WeakMap,IJ);function SE(e){var t;return((t=e.options.scope)==null?void 0:t.id)??String(e.mutationId)}function q4(e){return{onFetch:(t,n)=>{var u,d,f,p,h;const r=t.options,o=(f=(d=(u=t.fetchOptions)==null?void 0:u.meta)==null?void 0:d.fetchMore)==null?void 0:f.direction,i=((p=t.state.data)==null?void 0:p.pages)||[],a=((h=t.state.data)==null?void 0:h.pageParams)||[];let s={pages:[],pageParams:[]},l=0;const c=async()=>{let m=!1;const y=C=>{Object.defineProperty(C,"signal",{enumerable:!0,get:()=>(t.signal.aborted?m=!0:t.signal.addEventListener("abort",()=>{m=!0}),t.signal)})},w=tee(t.options,t.fetchOptions),x=async(C,E,P)=>{if(m)return Promise.reject();if(E==null&&C.pages.length)return Promise.resolve(C);const T={queryKey:t.queryKey,pageParam:E,direction:P?"backward":"forward",meta:t.options.meta};y(T);const I=await w(T),{maxPages:A}=t.options,k=P?IEe:TEe;return{pages:k(C.pages,I,A),pageParams:k(C.pageParams,E,A)}};if(o&&i.length){const C=o==="backward",E=C?LEe:K4,P={pages:i,pageParams:a},T=E(r,P);s=await x(P,T,C)}else{const C=e??i.length;do{const E=l===0?a[0]??r.initialPageParam:K4(r,s);if(l>0&&E==null)break;s=await x(s,E),l++}while(l{var m,y;return(y=(m=t.options).persister)==null?void 0:y.call(m,c,{queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=c}}}function K4(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function LEe(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var so,Sf,Cf,av,sv,Ef,lv,cv,OJ,FEe=(OJ=class{constructor(e={}){qt(this,so);qt(this,Sf);qt(this,Cf);qt(this,av);qt(this,sv);qt(this,Ef);qt(this,lv);qt(this,cv);Ct(this,so,e.queryCache||new DEe),Ct(this,Sf,e.mutationCache||new NEe),Ct(this,Cf,e.defaultOptions||{}),Ct(this,av,new Map),Ct(this,sv,new Map),Ct(this,Ef,0)}mount(){mE(this,Ef)._++,be(this,Ef)===1&&(Ct(this,lv,Hj.subscribe(async e=>{e&&(await this.resumePausedMutations(),be(this,so).onFocus())})),Ct(this,cv,CT.subscribe(async e=>{e&&(await this.resumePausedMutations(),be(this,so).onOnline())})))}unmount(){var e,t;mE(this,Ef)._--,be(this,Ef)===0&&((e=be(this,lv))==null||e.call(this),Ct(this,lv,void 0),(t=be(this,cv))==null||t.call(this),Ct(this,cv,void 0))}isFetching(e){return be(this,so).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return be(this,Sf).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=be(this,so).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.getQueryData(e.queryKey);if(t===void 0)return this.fetchQuery(e);{const n=this.defaultQueryOptions(e),r=be(this,so).build(this,n);return e.revalidateIfStale&&r.isStaleByTime($y(n.staleTime,r))&&this.prefetchQuery(n),Promise.resolve(t)}}getQueriesData(e){return be(this,so).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),o=be(this,so).get(r.queryHash),i=o==null?void 0:o.state.data,a=EEe(t,i);if(a!==void 0)return be(this,so).build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return jo.batch(()=>be(this,so).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=be(this,so).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=be(this,so);jo.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=be(this,so),r={type:"active",...e};return jo.batch(()=>(n.findAll(e).forEach(o=>{o.reset()}),this.refetchQueries(r,t)))}cancelQueries(e={},t={}){const n={revert:!0,...t},r=jo.batch(()=>be(this,so).findAll(e).map(o=>o.cancel(n)));return Promise.all(r).then(nl).catch(nl)}invalidateQueries(e={},t={}){return jo.batch(()=>{if(be(this,so).findAll(e).forEach(r=>{r.invalidate()}),e.refetchType==="none")return Promise.resolve();const n={...e,type:e.refetchType??e.type??"active"};return this.refetchQueries(n,t)})}refetchQueries(e={},t){const n={...t,cancelRefetch:(t==null?void 0:t.cancelRefetch)??!0},r=jo.batch(()=>be(this,so).findAll(e).filter(o=>!o.isDisabled()).map(o=>{let i=o.fetch(void 0,n);return n.throwOnError||(i=i.catch(nl)),o.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(r).then(nl)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=be(this,so).build(this,t);return n.isStaleByTime($y(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(nl).catch(nl)}fetchInfiniteQuery(e){return e.behavior=q4(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(nl).catch(nl)}ensureInfiniteQueryData(e){return e.behavior=q4(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return CT.isOnline()?be(this,Sf).resumePausedMutations():Promise.resolve()}getQueryCache(){return be(this,so)}getMutationCache(){return be(this,Sf)}getDefaultOptions(){return be(this,Cf)}setDefaultOptions(e){Ct(this,Cf,e)}setQueryDefaults(e,t){be(this,av).set(cg(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...be(this,av).values()];let n={};return t.forEach(r=>{_x(e,r.queryKey)&&(n={...n,...r.defaultOptions})}),n}setMutationDefaults(e,t){be(this,sv).set(cg(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...be(this,sv).values()];let n={};return t.forEach(r=>{_x(e,r.mutationKey)&&(n={...n,...r.defaultOptions})}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...be(this,Cf).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=zj(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.enabled!==!0&&t.queryFn===Vj&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...be(this,Cf).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){be(this,so).clear(),be(this,Sf).clear()}},so=new WeakMap,Sf=new WeakMap,Cf=new WeakMap,av=new WeakMap,sv=new WeakMap,Ef=new WeakMap,lv=new WeakMap,cv=new WeakMap,OJ),va,Ln,hC,Qi,Wh,uv,Pf,Yc,gC,dv,fv,Gh,qh,Tf,pv,ur,Mw,X_,J_,Z_,e2,t2,n2,r2,lee,AJ,jEe=(AJ=class extends xb{constructor(t,n){super();qt(this,ur);qt(this,va);qt(this,Ln);qt(this,hC);qt(this,Qi);qt(this,Wh);qt(this,uv);qt(this,Pf);qt(this,Yc);qt(this,gC);qt(this,dv);qt(this,fv);qt(this,Gh);qt(this,qh);qt(this,Tf);qt(this,pv,new Set);this.options=n,Ct(this,va,t),Ct(this,Yc,null),Ct(this,Pf,Q_()),this.options.experimental_prefetchInRender||be(this,Pf).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(be(this,Ln).addObserver(this),Y4(be(this,Ln),this.options)?xn(this,ur,Mw).call(this):this.updateResult(),xn(this,ur,e2).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return o2(be(this,Ln),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return o2(be(this,Ln),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,xn(this,ur,t2).call(this),xn(this,ur,n2).call(this),be(this,Ln).removeObserver(this)}setOptions(t,n){const r=this.options,o=be(this,Ln);if(this.options=be(this,va).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof cc(this.options.enabled,be(this,Ln))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");xn(this,ur,r2).call(this),be(this,Ln).setOptions(this.options),r._defaulted&&!ST(this.options,r)&&be(this,va).getQueryCache().notify({type:"observerOptionsUpdated",query:be(this,Ln),observer:this});const i=this.hasListeners();i&&Q4(be(this,Ln),o,this.options,r)&&xn(this,ur,Mw).call(this),this.updateResult(n),i&&(be(this,Ln)!==o||cc(this.options.enabled,be(this,Ln))!==cc(r.enabled,be(this,Ln))||$y(this.options.staleTime,be(this,Ln))!==$y(r.staleTime,be(this,Ln)))&&xn(this,ur,X_).call(this);const a=xn(this,ur,J_).call(this);i&&(be(this,Ln)!==o||cc(this.options.enabled,be(this,Ln))!==cc(r.enabled,be(this,Ln))||a!==be(this,Tf))&&xn(this,ur,Z_).call(this,a)}getOptimisticResult(t){const n=be(this,va).getQueryCache().build(be(this,va),t),r=this.createResult(n,t);return zEe(this,r)&&(Ct(this,Qi,r),Ct(this,uv,this.options),Ct(this,Wh,be(this,Ln).state)),r}getCurrentResult(){return be(this,Qi)}trackResult(t,n){const r={};return Object.keys(t).forEach(o=>{Object.defineProperty(r,o,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(o),n==null||n(o),t[o])})}),r}trackProp(t){be(this,pv).add(t)}getCurrentQuery(){return be(this,Ln)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=be(this,va).defaultQueryOptions(t),r=be(this,va).getQueryCache().build(be(this,va),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return xn(this,ur,Mw).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),be(this,Qi)))}createResult(t,n){var A;const r=be(this,Ln),o=this.options,i=be(this,Qi),a=be(this,Wh),s=be(this,uv),c=t!==r?t.state:be(this,hC),{state:u}=t;let d={...u},f=!1,p;if(n._optimisticResults){const k=this.hasListeners(),O=!k&&Y4(t,n),$=k&&Q4(t,r,n,o);(O||$)&&(d={...d,...aee(u.data,t.options)}),n._optimisticResults==="isRestoring"&&(d.fetchStatus="idle")}let{error:h,errorUpdatedAt:m,status:y}=d;if(n.select&&d.data!==void 0)if(i&&d.data===(a==null?void 0:a.data)&&n.select===be(this,gC))p=be(this,dv);else try{Ct(this,gC,n.select),p=n.select(d.data),p=Y_(i==null?void 0:i.data,p,n),Ct(this,dv,p),Ct(this,Yc,null)}catch(k){Ct(this,Yc,k)}else p=d.data;if(n.placeholderData!==void 0&&p===void 0&&y==="pending"){let k;if(i!=null&&i.isPlaceholderData&&n.placeholderData===(s==null?void 0:s.placeholderData))k=i.data;else if(k=typeof n.placeholderData=="function"?n.placeholderData((A=be(this,fv))==null?void 0:A.state.data,be(this,fv)):n.placeholderData,n.select&&k!==void 0)try{k=n.select(k),Ct(this,Yc,null)}catch(O){Ct(this,Yc,O)}k!==void 0&&(y="success",p=Y_(i==null?void 0:i.data,k,n),f=!0)}be(this,Yc)&&(h=be(this,Yc),p=be(this,dv),m=Date.now(),y="error");const w=d.fetchStatus==="fetching",x=y==="pending",C=y==="error",E=x&&w,P=p!==void 0,I={status:y,fetchStatus:d.fetchStatus,isPending:x,isSuccess:y==="success",isError:C,isInitialLoading:E,isLoading:E,data:p,dataUpdatedAt:d.dataUpdatedAt,error:h,errorUpdatedAt:m,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:d.dataUpdateCount>0||d.errorUpdateCount>0,isFetchedAfterMount:d.dataUpdateCount>c.dataUpdateCount||d.errorUpdateCount>c.errorUpdateCount,isFetching:w,isRefetching:w&&!x,isLoadingError:C&&!P,isPaused:d.fetchStatus==="paused",isPlaceholderData:f,isRefetchError:C&&P,isStale:Uj(t,n),refetch:this.refetch,promise:be(this,Pf)};if(this.options.experimental_prefetchInRender){const k=N=>{I.status==="error"?N.reject(I.error):I.data!==void 0&&N.resolve(I.data)},O=()=>{const N=Ct(this,Pf,I.promise=Q_());k(N)},$=be(this,Pf);switch($.status){case"pending":t.queryHash===r.queryHash&&k($);break;case"fulfilled":(I.status==="error"||I.data!==$.value)&&O();break;case"rejected":(I.status!=="error"||I.error!==$.reason)&&O();break}}return I}updateResult(t){const n=be(this,Qi),r=this.createResult(be(this,Ln),this.options);if(Ct(this,Wh,be(this,Ln).state),Ct(this,uv,this.options),be(this,Wh).data!==void 0&&Ct(this,fv,be(this,Ln)),ST(r,n))return;Ct(this,Qi,r);const o={},i=()=>{if(!n)return!0;const{notifyOnChangeProps:a}=this.options,s=typeof a=="function"?a():a;if(s==="all"||!s&&!be(this,pv).size)return!0;const l=new Set(s??be(this,pv));return this.options.throwOnError&&l.add("error"),Object.keys(be(this,Qi)).some(c=>{const u=c;return be(this,Qi)[u]!==n[u]&&l.has(u)})};(t==null?void 0:t.listeners)!==!1&&i()&&(o.listeners=!0),xn(this,ur,lee).call(this,{...o,...t})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&xn(this,ur,e2).call(this)}},va=new WeakMap,Ln=new WeakMap,hC=new WeakMap,Qi=new WeakMap,Wh=new WeakMap,uv=new WeakMap,Pf=new WeakMap,Yc=new WeakMap,gC=new WeakMap,dv=new WeakMap,fv=new WeakMap,Gh=new WeakMap,qh=new WeakMap,Tf=new WeakMap,pv=new WeakMap,ur=new WeakSet,Mw=function(t){xn(this,ur,r2).call(this);let n=be(this,Ln).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(nl)),n},X_=function(){xn(this,ur,t2).call(this);const t=$y(this.options.staleTime,be(this,Ln));if(lg||be(this,Qi).isStale||!q_(t))return;const r=ZZ(be(this,Qi).dataUpdatedAt,t)+1;Ct(this,Gh,setTimeout(()=>{be(this,Qi).isStale||this.updateResult()},r))},J_=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(be(this,Ln)):this.options.refetchInterval)??!1},Z_=function(t){xn(this,ur,n2).call(this),Ct(this,Tf,t),!(lg||cc(this.options.enabled,be(this,Ln))===!1||!q_(be(this,Tf))||be(this,Tf)===0)&&Ct(this,qh,setInterval(()=>{(this.options.refetchIntervalInBackground||Hj.isFocused())&&xn(this,ur,Mw).call(this)},be(this,Tf)))},e2=function(){xn(this,ur,X_).call(this),xn(this,ur,Z_).call(this,xn(this,ur,J_).call(this))},t2=function(){be(this,Gh)&&(clearTimeout(be(this,Gh)),Ct(this,Gh,void 0))},n2=function(){be(this,qh)&&(clearInterval(be(this,qh)),Ct(this,qh,void 0))},r2=function(){const t=be(this,va).getQueryCache().build(be(this,va),this.options);if(t===be(this,Ln))return;const n=be(this,Ln);Ct(this,Ln,t),Ct(this,hC,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},lee=function(t){jo.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(be(this,Qi))}),be(this,va).getQueryCache().notify({query:be(this,Ln),type:"observerResultsUpdated"})})},AJ);function BEe(e,t){return cc(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function Y4(e,t){return BEe(e,t)||e.state.data!==void 0&&o2(e,t,t.refetchOnMount)}function o2(e,t,n){if(cc(t.enabled,e)!==!1){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&Uj(e,t)}return!1}function Q4(e,t,n,r){return(e!==t||cc(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&Uj(e,n)}function Uj(e,t){return cc(t.enabled,e)!==!1&&e.isStaleByTime($y(t.staleTime,e))}function zEe(e,t){return!ST(e.getCurrentResult(),t)}var If,Of,ba,Zu,md,FP,i2,kJ,VEe=(kJ=class extends xb{constructor(n,r){super();qt(this,md);qt(this,If);qt(this,Of);qt(this,ba);qt(this,Zu);Ct(this,If,n),this.setOptions(r),this.bindMethods(),xn(this,md,FP).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){var o;const r=this.options;this.options=be(this,If).defaultMutationOptions(n),ST(this.options,r)||be(this,If).getMutationCache().notify({type:"observerOptionsUpdated",mutation:be(this,ba),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&cg(r.mutationKey)!==cg(this.options.mutationKey)?this.reset():((o=be(this,ba))==null?void 0:o.state.status)==="pending"&&be(this,ba).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=be(this,ba))==null||n.removeObserver(this)}onMutationUpdate(n){xn(this,md,FP).call(this),xn(this,md,i2).call(this,n)}getCurrentResult(){return be(this,Of)}reset(){var n;(n=be(this,ba))==null||n.removeObserver(this),Ct(this,ba,void 0),xn(this,md,FP).call(this),xn(this,md,i2).call(this)}mutate(n,r){var o;return Ct(this,Zu,r),(o=be(this,ba))==null||o.removeObserver(this),Ct(this,ba,be(this,If).getMutationCache().build(be(this,If),this.options)),be(this,ba).addObserver(this),be(this,ba).execute(n)}},If=new WeakMap,Of=new WeakMap,ba=new WeakMap,Zu=new WeakMap,md=new WeakSet,FP=function(){var r;const n=((r=be(this,ba))==null?void 0:r.state)??see();Ct(this,Of,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},i2=function(n){jo.batch(()=>{var r,o,i,a,s,l,c,u;if(be(this,Zu)&&this.hasListeners()){const d=be(this,Of).variables,f=be(this,Of).context;(n==null?void 0:n.type)==="success"?((o=(r=be(this,Zu)).onSuccess)==null||o.call(r,n.data,d,f),(a=(i=be(this,Zu)).onSettled)==null||a.call(i,n.data,null,d,f)):(n==null?void 0:n.type)==="error"&&((l=(s=be(this,Zu)).onError)==null||l.call(s,n.error,d,f),(u=(c=be(this,Zu)).onSettled)==null||u.call(c,void 0,n.error,d,f))}this.listeners.forEach(d=>{d(be(this,Of))})})},kJ),cee=v.createContext(void 0),Lt=e=>{const t=v.useContext(cee);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Mg=({client:e,children:t})=>(v.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),R.jsx(cee.Provider,{value:e,children:t})),uee=v.createContext(!1),HEe=()=>v.useContext(uee);uee.Provider;function UEe(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var WEe=v.createContext(UEe()),GEe=()=>v.useContext(WEe);function dee(e,t){return typeof e=="function"?e(...t):!!e}function fee(){}var qEe=(e,t)=>{(e.suspense||e.throwOnError)&&(t.isReset()||(e.retryOnMount=!1))},KEe=e=>{v.useEffect(()=>{e.clearReset()},[e])},YEe=({result:e,errorResetBoundary:t,throwOnError:n,query:r})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&dee(n,[e.error,r]),QEe=e=>{e.suspense&&(e.staleTime===void 0&&(e.staleTime=1e3),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3)))},XEe=(e,t)=>e.isLoading&&e.isFetching&&!t,JEe=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,X4=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function ZEe(e,t,n){var u,d,f,p,h;const r=Lt(),o=HEe(),i=GEe(),a=r.defaultQueryOptions(e);(d=(u=r.getDefaultOptions().queries)==null?void 0:u._experimental_beforeQuery)==null||d.call(u,a),a._optimisticResults=o?"isRestoring":"optimistic",QEe(a),qEe(a,i),KEe(i);const s=!r.getQueryCache().get(a.queryHash),[l]=v.useState(()=>new t(r,a)),c=l.getOptimisticResult(a);if(v.useSyncExternalStore(v.useCallback(m=>{const y=o?()=>{}:l.subscribe(jo.batchCalls(m));return l.updateResult(),y},[l,o]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),v.useEffect(()=>{l.setOptions(a,{listeners:!1})},[a,l]),JEe(a,c))throw X4(a,l,i);if(YEe({result:c,errorResetBoundary:i,throwOnError:a.throwOnError,query:r.getQueryCache().get(a.queryHash)}))throw c.error;if((p=(f=r.getDefaultOptions().queries)==null?void 0:f._experimental_afterQuery)==null||p.call(f,a,c),a.experimental_prefetchInRender&&!lg&&XEe(c,o)){const m=s?X4(a,l,i):(h=r.getQueryCache().get(a.queryHash))==null?void 0:h.promise;m==null||m.catch(fee).finally(()=>{l.updateResult()})}return a.notifyOnChangeProps?c:l.trackResult(c)}function fo(e,t){return ZEe(e,jEe)}function jt(e,t){const n=Lt(),[r]=v.useState(()=>new VEe(n,e));v.useEffect(()=>{r.setOptions(e)},[r,e]);const o=v.useSyncExternalStore(v.useCallback(a=>r.subscribe(jo.batchCalls(a)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),i=v.useCallback((a,s)=>{r.mutate(a,s).catch(fee)},[r]);if(o.error&&dee(r.options.throwOnError,[o.error]))throw o.error;return{...o,mutate:i,mutateAsync:o.mutate}}var ePe=function(){return null};function tPe(e){return R.jsx(TCe,{...e,defaultTheme:_A,themeId:vc})}function nPe(e){return function(n){return R.jsx(tPe,{styles:typeof e=="function"?r=>e({theme:r,...n}):e})}}function rPe(){return xA}const Je=a1e;function at(e){return i1e(e)}function oPe(e){return nt("MuiSvgIcon",e)}it("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const iPe=e=>{const{color:t,fontSize:n,classes:r}=e,o={root:["root",t!=="inherit"&&`color${Ce(t)}`,`fontSize${Ce(n)}`]};return rt(o,oPe,r)},aPe=oe("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="inherit"&&t[`color${Ce(n.color)}`],t[`fontSize${Ce(n.fontSize)}`]]}})(Je(({theme:e})=>{var t,n,r,o,i,a,s,l,c,u,d,f,p,h;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",flexShrink:0,transition:(o=(t=e.transitions)==null?void 0:t.create)==null?void 0:o.call(t,"fill",{duration:(r=(n=(e.vars??e).transitions)==null?void 0:n.duration)==null?void 0:r.shorter}),variants:[{props:m=>!m.hasSvgAsChild,style:{fill:"currentColor"}},{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:((a=(i=e.typography)==null?void 0:i.pxToRem)==null?void 0:a.call(i,20))||"1.25rem"}},{props:{fontSize:"medium"},style:{fontSize:((l=(s=e.typography)==null?void 0:s.pxToRem)==null?void 0:l.call(s,24))||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:((u=(c=e.typography)==null?void 0:c.pxToRem)==null?void 0:u.call(c,35))||"2.1875rem"}},...Object.entries((e.vars??e).palette).filter(([,m])=>m&&m.main).map(([m])=>{var y,w;return{props:{color:m},style:{color:(w=(y=(e.vars??e).palette)==null?void 0:y[m])==null?void 0:w.main}}}),{props:{color:"action"},style:{color:(f=(d=(e.vars??e).palette)==null?void 0:d.action)==null?void 0:f.active}},{props:{color:"disabled"},style:{color:(h=(p=(e.vars??e).palette)==null?void 0:p.action)==null?void 0:h.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}})),Nx=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiSvgIcon"}),{children:o,className:i,color:a="inherit",component:s="svg",fontSize:l="medium",htmlColor:c,inheritViewBox:u=!1,titleAccess:d,viewBox:f="0 0 24 24",...p}=r,h=v.isValidElement(o)&&o.type==="svg",m={...r,color:a,component:s,fontSize:l,instanceFontSize:t.fontSize,inheritViewBox:u,viewBox:f,hasSvgAsChild:h},y={};u||(y.viewBox=f);const w=iPe(m);return R.jsxs(aPe,{as:s,className:de(w.root,i),focusable:"false",color:c,"aria-hidden":d?void 0:!0,role:d?"img":void 0,ref:n,...y,...p,...h&&o.props,ownerState:m,children:[h?o.props.children:o,d?R.jsx("title",{children:d}):null]})});Nx&&(Nx.muiName="SvgIcon");function ct(e,t){function n(r,o){return R.jsx(Nx,{"data-testid":`${t}Icon`,ref:o,...r,children:e})}return n.muiName=Nx.muiName,v.memo(v.forwardRef(n))}function NA(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function a2(e,t){return a2=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},a2(e,t)}function IC(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,a2(e,t)}function sPe(e,t){return e.classList?!!t&&e.classList.contains(t):(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")!==-1}function lPe(e,t){e.classList?e.classList.add(t):sPe(e,t)||(typeof e.className=="string"?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))}function J4(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function cPe(e,t){e.classList?e.classList.remove(t):typeof e.className=="string"?e.className=J4(e.className,t):e.setAttribute("class",J4(e.className&&e.className.baseVal||"",t))}var pee={exports:{}},Os={},hee={exports:{}},gee={};/** +export default theme;`}function X_(e={},...t){const{breakpoints:n,mixins:r={},spacing:o,palette:i={},transitions:a={},typography:s={},shape:l,...c}=e;if(e.vars)throw new Error(bd(20));const u=Wj(i),d=xb(e);let f=Ao(d,{mixins:cEe(d.breakpoints,r),palette:u,shadows:hEe.slice(),typography:JZ(u,s),transitions:yEe(a),zIndex:{...vEe}});return f=Ao(f,c),f=t.reduce((p,h)=>Ao(p,h),f),f.unstable_sxConfig={...IC,...c==null?void 0:c.unstable_sxConfig},f.unstable_sx=function(h){return rp({sx:h,theme:this})},f.toRuntimeSource=eee,f}function J_(e){let t;return e<1?t=5.11916*e**2:t=4.5*Math.log(e+1)+2,Math.round(t*10)/1e3}const wEe=[...Array(25)].map((e,t)=>{if(t===0)return"none";const n=J_(t);return`linear-gradient(rgba(255 255 255 / ${n}), rgba(255 255 255 / ${n}))`});function tee(e){return{inputPlaceholder:e==="dark"?.5:.42,inputUnderline:e==="dark"?.7:.42,switchTrackDisabled:e==="dark"?.2:.12,switchTrack:e==="dark"?.3:.38}}function nee(e){return e==="dark"?wEe:[]}function xEe(e){const{palette:t={mode:"light"},opacity:n,overlays:r,...o}=e,i=Wj(t);return{palette:i,opacity:{...tee(i.mode),...n},overlays:r||nee(i.mode),...o}}function SEe(e){var t;return!!e[0].match(/(cssVarPrefix|colorSchemeSelector|rootSelector|typography|mixins|breakpoints|direction|transitions)/)||!!e[0].match(/sxConfig$/)||e[0]==="palette"&&!!((t=e[1])!=null&&t.match(/(mode|contrastThreshold|tonalOffset)/))}const CEe=e=>[...[...Array(25)].map((t,n)=>`--${e?`${e}-`:""}overlays-${n}`),`--${e?`${e}-`:""}palette-AppBar-darkBg`,`--${e?`${e}-`:""}palette-AppBar-darkColor`],EEe=e=>(t,n)=>{const r=e.rootSelector||":root",o=e.colorSchemeSelector;let i=o;if(o==="class"&&(i=".%s"),o==="data"&&(i="[data-%s]"),o!=null&&o.startsWith("data-")&&!o.includes("%s")&&(i=`[${o}="%s"]`),e.defaultColorScheme===t){if(t==="dark"){const a={};return CEe(e.cssVarPrefix).forEach(s=>{a[s]=n[s],delete n[s]}),i==="media"?{[r]:n,"@media (prefers-color-scheme: dark)":{[r]:a}}:i?{[i.replace("%s",t)]:a,[`${r}, ${i.replace("%s",t)}`]:n}:{[r]:{...n,...a}}}if(i&&i!=="media")return`${r}, ${i.replace("%s",String(t))}`}else if(t){if(i==="media")return{[`@media (prefers-color-scheme: ${String(t)})`]:{[r]:n}};if(i)return i.replace("%s",String(t))}return r};function PEe(e,t){t.forEach(n=>{e[n]||(e[n]={})})}function je(e,t,n){!e[t]&&n&&(e[t]=n)}function _w(e){return!e||!e.startsWith("hsl")?e:_Z(e)}function Vu(e,t){`${t}Channel`in e||(e[`${t}Channel`]=Dw(_w(e[t]),`MUI: Can't create \`palette.${t}Channel\` because \`palette.${t}\` is not one of these formats: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color(). +To suppress this warning, you need to explicitly provide the \`palette.${t}Channel\` as a string (in rgb format, for example "12 12 12") or undefined if you want to remove the channel token.`))}function TEe(e){return typeof e=="number"?`${e}px`:typeof e=="string"||typeof e=="function"||Array.isArray(e)?e:"8px"}const Vc=e=>{try{return e()}catch{}},IEe=(e="mui")=>S1e(e);function A$(e,t,n,r){if(!t)return;t=t===!0?{}:t;const o=r==="dark"?"dark":"light";if(!n){e[r]=xEe({...t,palette:{mode:o,...t==null?void 0:t.palette}});return}const{palette:i,...a}=X_({...n,palette:{mode:o,...t==null?void 0:t.palette}});return e[r]={...t,palette:i,opacity:{...tee(o),...t==null?void 0:t.opacity},overlays:(t==null?void 0:t.overlays)||nee(o)},a}function OEe(e={},...t){const{colorSchemes:n={light:!0},defaultColorScheme:r,disableCssColorScheme:o=!1,cssVarPrefix:i="mui",shouldSkipGeneratingVar:a=SEe,colorSchemeSelector:s=n.light&&n.dark?"media":void 0,rootSelector:l=":root",...c}=e,u=Object.keys(n)[0],d=r||(n.light&&u!=="light"?"light":u),f=IEe(i),{[d]:p,light:h,dark:m,...y}=n,w={...y};let x=p;if((d==="dark"&&!("dark"in n)||d==="light"&&!("light"in n))&&(x=!0),!x)throw new Error(bd(21,d));const S=A$(w,x,c,d);h&&!w.light&&A$(w,h,void 0,"light"),m&&!w.dark&&A$(w,m,void 0,"dark");let E={defaultColorScheme:d,...S,cssVarPrefix:i,colorSchemeSelector:s,rootSelector:l,getCssVar:f,colorSchemes:w,font:{...lEe(S.typography),...S.font},spacing:TEe(c.spacing)};Object.keys(E.colorSchemes).forEach(k=>{const O=E.colorSchemes[k].palette,$=N=>{const L=N.split("-"),j=L[1],D=L[2];return f(N,O[j][D])};if(O.mode==="light"&&(je(O.common,"background","#fff"),je(O.common,"onBackground","#000")),O.mode==="dark"&&(je(O.common,"background","#000"),je(O.common,"onBackground","#fff")),PEe(O,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),O.mode==="light"){je(O.Alert,"errorColor",xr(O.error.light,.6)),je(O.Alert,"infoColor",xr(O.info.light,.6)),je(O.Alert,"successColor",xr(O.success.light,.6)),je(O.Alert,"warningColor",xr(O.warning.light,.6)),je(O.Alert,"errorFilledBg",$("palette-error-main")),je(O.Alert,"infoFilledBg",$("palette-info-main")),je(O.Alert,"successFilledBg",$("palette-success-main")),je(O.Alert,"warningFilledBg",$("palette-warning-main")),je(O.Alert,"errorFilledColor",Vc(()=>O.getContrastText(O.error.main))),je(O.Alert,"infoFilledColor",Vc(()=>O.getContrastText(O.info.main))),je(O.Alert,"successFilledColor",Vc(()=>O.getContrastText(O.success.main))),je(O.Alert,"warningFilledColor",Vc(()=>O.getContrastText(O.warning.main))),je(O.Alert,"errorStandardBg",Sr(O.error.light,.9)),je(O.Alert,"infoStandardBg",Sr(O.info.light,.9)),je(O.Alert,"successStandardBg",Sr(O.success.light,.9)),je(O.Alert,"warningStandardBg",Sr(O.warning.light,.9)),je(O.Alert,"errorIconColor",$("palette-error-main")),je(O.Alert,"infoIconColor",$("palette-info-main")),je(O.Alert,"successIconColor",$("palette-success-main")),je(O.Alert,"warningIconColor",$("palette-warning-main")),je(O.AppBar,"defaultBg",$("palette-grey-100")),je(O.Avatar,"defaultBg",$("palette-grey-400")),je(O.Button,"inheritContainedBg",$("palette-grey-300")),je(O.Button,"inheritContainedHoverBg",$("palette-grey-A100")),je(O.Chip,"defaultBorder",$("palette-grey-400")),je(O.Chip,"defaultAvatarColor",$("palette-grey-700")),je(O.Chip,"defaultIconColor",$("palette-grey-700")),je(O.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),je(O.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),je(O.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),je(O.LinearProgress,"primaryBg",Sr(O.primary.main,.62)),je(O.LinearProgress,"secondaryBg",Sr(O.secondary.main,.62)),je(O.LinearProgress,"errorBg",Sr(O.error.main,.62)),je(O.LinearProgress,"infoBg",Sr(O.info.main,.62)),je(O.LinearProgress,"successBg",Sr(O.success.main,.62)),je(O.LinearProgress,"warningBg",Sr(O.warning.main,.62)),je(O.Skeleton,"bg",`rgba(${$("palette-text-primaryChannel")} / 0.11)`),je(O.Slider,"primaryTrack",Sr(O.primary.main,.62)),je(O.Slider,"secondaryTrack",Sr(O.secondary.main,.62)),je(O.Slider,"errorTrack",Sr(O.error.main,.62)),je(O.Slider,"infoTrack",Sr(O.info.main,.62)),je(O.Slider,"successTrack",Sr(O.success.main,.62)),je(O.Slider,"warningTrack",Sr(O.warning.main,.62));const N=ME(O.background.default,.8);je(O.SnackbarContent,"bg",N),je(O.SnackbarContent,"color",Vc(()=>O.getContrastText(N))),je(O.SpeedDialAction,"fabHoverBg",ME(O.background.paper,.15)),je(O.StepConnector,"border",$("palette-grey-400")),je(O.StepContent,"border",$("palette-grey-400")),je(O.Switch,"defaultColor",$("palette-common-white")),je(O.Switch,"defaultDisabledColor",$("palette-grey-100")),je(O.Switch,"primaryDisabledColor",Sr(O.primary.main,.62)),je(O.Switch,"secondaryDisabledColor",Sr(O.secondary.main,.62)),je(O.Switch,"errorDisabledColor",Sr(O.error.main,.62)),je(O.Switch,"infoDisabledColor",Sr(O.info.main,.62)),je(O.Switch,"successDisabledColor",Sr(O.success.main,.62)),je(O.Switch,"warningDisabledColor",Sr(O.warning.main,.62)),je(O.TableCell,"border",Sr(kE(O.divider,1),.88)),je(O.Tooltip,"bg",kE(O.grey[700],.92))}if(O.mode==="dark"){je(O.Alert,"errorColor",Sr(O.error.light,.6)),je(O.Alert,"infoColor",Sr(O.info.light,.6)),je(O.Alert,"successColor",Sr(O.success.light,.6)),je(O.Alert,"warningColor",Sr(O.warning.light,.6)),je(O.Alert,"errorFilledBg",$("palette-error-dark")),je(O.Alert,"infoFilledBg",$("palette-info-dark")),je(O.Alert,"successFilledBg",$("palette-success-dark")),je(O.Alert,"warningFilledBg",$("palette-warning-dark")),je(O.Alert,"errorFilledColor",Vc(()=>O.getContrastText(O.error.dark))),je(O.Alert,"infoFilledColor",Vc(()=>O.getContrastText(O.info.dark))),je(O.Alert,"successFilledColor",Vc(()=>O.getContrastText(O.success.dark))),je(O.Alert,"warningFilledColor",Vc(()=>O.getContrastText(O.warning.dark))),je(O.Alert,"errorStandardBg",xr(O.error.light,.9)),je(O.Alert,"infoStandardBg",xr(O.info.light,.9)),je(O.Alert,"successStandardBg",xr(O.success.light,.9)),je(O.Alert,"warningStandardBg",xr(O.warning.light,.9)),je(O.Alert,"errorIconColor",$("palette-error-main")),je(O.Alert,"infoIconColor",$("palette-info-main")),je(O.Alert,"successIconColor",$("palette-success-main")),je(O.Alert,"warningIconColor",$("palette-warning-main")),je(O.AppBar,"defaultBg",$("palette-grey-900")),je(O.AppBar,"darkBg",$("palette-background-paper")),je(O.AppBar,"darkColor",$("palette-text-primary")),je(O.Avatar,"defaultBg",$("palette-grey-600")),je(O.Button,"inheritContainedBg",$("palette-grey-800")),je(O.Button,"inheritContainedHoverBg",$("palette-grey-700")),je(O.Chip,"defaultBorder",$("palette-grey-700")),je(O.Chip,"defaultAvatarColor",$("palette-grey-300")),je(O.Chip,"defaultIconColor",$("palette-grey-300")),je(O.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),je(O.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),je(O.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),je(O.LinearProgress,"primaryBg",xr(O.primary.main,.5)),je(O.LinearProgress,"secondaryBg",xr(O.secondary.main,.5)),je(O.LinearProgress,"errorBg",xr(O.error.main,.5)),je(O.LinearProgress,"infoBg",xr(O.info.main,.5)),je(O.LinearProgress,"successBg",xr(O.success.main,.5)),je(O.LinearProgress,"warningBg",xr(O.warning.main,.5)),je(O.Skeleton,"bg",`rgba(${$("palette-text-primaryChannel")} / 0.13)`),je(O.Slider,"primaryTrack",xr(O.primary.main,.5)),je(O.Slider,"secondaryTrack",xr(O.secondary.main,.5)),je(O.Slider,"errorTrack",xr(O.error.main,.5)),je(O.Slider,"infoTrack",xr(O.info.main,.5)),je(O.Slider,"successTrack",xr(O.success.main,.5)),je(O.Slider,"warningTrack",xr(O.warning.main,.5));const N=ME(O.background.default,.98);je(O.SnackbarContent,"bg",N),je(O.SnackbarContent,"color",Vc(()=>O.getContrastText(N))),je(O.SpeedDialAction,"fabHoverBg",ME(O.background.paper,.15)),je(O.StepConnector,"border",$("palette-grey-600")),je(O.StepContent,"border",$("palette-grey-600")),je(O.Switch,"defaultColor",$("palette-grey-300")),je(O.Switch,"defaultDisabledColor",$("palette-grey-600")),je(O.Switch,"primaryDisabledColor",xr(O.primary.main,.55)),je(O.Switch,"secondaryDisabledColor",xr(O.secondary.main,.55)),je(O.Switch,"errorDisabledColor",xr(O.error.main,.55)),je(O.Switch,"infoDisabledColor",xr(O.info.main,.55)),je(O.Switch,"successDisabledColor",xr(O.success.main,.55)),je(O.Switch,"warningDisabledColor",xr(O.warning.main,.55)),je(O.TableCell,"border",xr(kE(O.divider,1),.68)),je(O.Tooltip,"bg",kE(O.grey[700],.92))}Vu(O.background,"default"),Vu(O.background,"paper"),Vu(O.common,"background"),Vu(O.common,"onBackground"),Vu(O,"divider"),Object.keys(O).forEach(N=>{const L=O[N];L&&typeof L=="object"&&(L.main&&je(O[N],"mainChannel",Dw(_w(L.main))),L.light&&je(O[N],"lightChannel",Dw(_w(L.light))),L.dark&&je(O[N],"darkChannel",Dw(_w(L.dark))),L.contrastText&&je(O[N],"contrastTextChannel",Dw(_w(L.contrastText))),N==="text"&&(Vu(O[N],"primary"),Vu(O[N],"secondary")),N==="action"&&(L.active&&Vu(O[N],"active"),L.selected&&Vu(O[N],"selected")))})}),E=t.reduce((k,O)=>Ao(k,O),E);const P={prefix:i,disableCssColorScheme:o,shouldSkipGeneratingVar:a,getSelector:EEe(E)},{vars:T,generateThemeVars:I,generateStyleSheets:A}=P1e(E,P);return E.vars=T,Object.entries(E.colorSchemes[E.defaultColorScheme]).forEach(([k,O])=>{E[k]=O}),E.generateThemeVars=I,E.generateStyleSheets=A,E.generateSpacing=function(){return PZ(c.spacing,IA(this))},E.getColorSchemeSelector=T1e(s),E.spacing=E.generateSpacing(),E.shouldSkipGeneratingVar=a,E.unstable_sxConfig={...IC,...c==null?void 0:c.unstable_sxConfig},E.unstable_sx=function(O){return rp({sx:O,theme:this})},E.toRuntimeSource=eee,E}function W4(e,t,n){e.colorSchemes&&n&&(e.colorSchemes[t]={...n!==!0&&n,palette:Wj({...n===!0?{}:n.palette,mode:t})})}function RC(e={},...t){const{palette:n,cssVariables:r=!1,colorSchemes:o=n?void 0:{light:!0},defaultColorScheme:i=n==null?void 0:n.mode,...a}=e,s=i||"light",l=o==null?void 0:o[s],c={...o,...n?{[s]:{...typeof l!="boolean"&&l,palette:n}}:void 0};if(r===!1){if(!("colorSchemes"in e))return X_(e,...t);let u=n;"palette"in e||c[s]&&(c[s]!==!0?u=c[s].palette:s==="dark"&&(u={mode:"dark"}));const d=X_({...e,palette:u},...t);return d.defaultColorScheme=s,d.colorSchemes=c,d.palette.mode==="light"&&(d.colorSchemes.light={...c.light!==!0&&c.light,palette:d.palette},W4(d,"dark",c.dark)),d.palette.mode==="dark"&&(d.colorSchemes.dark={...c.dark!==!0&&c.dark,palette:d.palette},W4(d,"light",c.light)),d}return!n&&!("light"in c)&&s==="light"&&(c.light=!0),OEe({...a,colorSchemes:c,defaultColorScheme:s,...typeof r!="boolean"&&r},...t)}function AEe(e){return String(e).match(/[\d.\-+]*\s*(.*)/)[1]||""}function kEe(e){return parseFloat(e)}const GA=RC();function no(){const e=OC(GA);return e[wc]||e}function cn({props:e,name:t}){return HA({props:e,name:t,defaultTheme:GA,themeId:wc})}function ree(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const ai=e=>ree(e)&&e!=="classes",re=RZ({themeId:wc,defaultTheme:GA,rootShouldForwardProp:ai});function G4({theme:e,...t}){const n=wc in e?e[wc]:void 0;return R.jsx(KZ,{...t,themeId:n?wc:void 0,theme:n||e})}const RE={attribute:"data-mui-color-scheme",colorSchemeStorageKey:"mui-color-scheme",defaultLightColorScheme:"light",defaultDarkColorScheme:"dark",modeStorageKey:"mui-mode"},{CssVarsProvider:MEe,useColorScheme:vUt,getInitColorSchemeScript:bUt}=x1e({themeId:wc,theme:()=>RC({cssVariables:!0}),colorSchemeStorageKey:RE.colorSchemeStorageKey,modeStorageKey:RE.modeStorageKey,defaultColorScheme:{light:RE.defaultLightColorScheme,dark:RE.defaultDarkColorScheme},resolveTheme:e=>{const t={...e,typography:JZ(e.palette,e.typography)};return t.unstable_sx=function(r){return rp({sx:r,theme:this})},t}}),REe=MEe;function wp({theme:e,...t}){return typeof e=="function"?R.jsx(G4,{theme:e,...t}):"colorSchemes"in(wc in e?e[wc]:e)?R.jsx(REe,{theme:e,...t}):R.jsx(G4,{theme:e,...t})}var Cb=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},ug=typeof window>"u"||"Deno"in globalThis;function il(){}function $Ee(e,t){return typeof e=="function"?e(t):e}function Z_(e){return typeof e=="number"&&e>=0&&e!==1/0}function oee(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Dy(e,t){return typeof e=="function"?e(t):e}function dc(e,t){return typeof e=="function"?e(t):e}function q4(e,t){const{type:n="all",exact:r,fetchStatus:o,predicate:i,queryKey:a,stale:s}=e;if(a){if(r){if(t.queryHash!==Gj(a,t.options))return!1}else if(!Bx(t.queryKey,a))return!1}if(n!=="all"){const l=t.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof s=="boolean"&&t.isStale()!==s||o&&o!==t.state.fetchStatus||i&&!i(t))}function K4(e,t){const{exact:n,status:r,predicate:o,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(n){if(dg(t.options.mutationKey)!==dg(i))return!1}else if(!Bx(t.options.mutationKey,i))return!1}return!(r&&t.state.status!==r||o&&!o(t))}function Gj(e,t){return((t==null?void 0:t.queryKeyHashFn)||dg)(e)}function dg(e){return JSON.stringify(e,(t,n)=>e2(n)?Object.keys(n).sort().reduce((r,o)=>(r[o]=n[o],r),{}):n)}function Bx(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(n=>!Bx(e[n],t[n])):!1}function iee(e,t){if(e===t)return e;const n=Y4(e)&&Y4(t);if(n||e2(e)&&e2(t)){const r=n?e:Object.keys(e),o=r.length,i=n?t:Object.keys(t),a=i.length,s=n?[]:{};let l=0;for(let c=0;c{setTimeout(t,e)})}function t2(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?iee(e,t):t}function _Ee(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function NEe(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var qj=Symbol();function aee(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===qj?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var Vh,xf,nv,TJ,LEe=(TJ=class extends Cb{constructor(){super();qt(this,Vh);qt(this,xf);qt(this,nv);Pt(this,nv,t=>{if(!ug&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){be(this,xf)||this.setEventListener(be(this,nv))}onUnsubscribe(){var t;this.hasListeners()||((t=be(this,xf))==null||t.call(this),Pt(this,xf,void 0))}setEventListener(t){var n;Pt(this,nv,t),(n=be(this,xf))==null||n.call(this),Pt(this,xf,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){be(this,Vh)!==t&&(Pt(this,Vh,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof be(this,Vh)=="boolean"?be(this,Vh):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Vh=new WeakMap,xf=new WeakMap,nv=new WeakMap,TJ),Kj=new LEe,rv,Sf,ov,IJ,FEe=(IJ=class extends Cb{constructor(){super();qt(this,rv,!0);qt(this,Sf);qt(this,ov);Pt(this,ov,t=>{if(!ug&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){be(this,Sf)||this.setEventListener(be(this,ov))}onUnsubscribe(){var t;this.hasListeners()||((t=be(this,Sf))==null||t.call(this),Pt(this,Sf,void 0))}setEventListener(t){var n;Pt(this,ov,t),(n=be(this,Sf))==null||n.call(this),Pt(this,Sf,t(this.setOnline.bind(this)))}setOnline(t){be(this,rv)!==t&&(Pt(this,rv,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return be(this,rv)}},rv=new WeakMap,Sf=new WeakMap,ov=new WeakMap,IJ),_T=new FEe;function n2(){let e,t;const n=new Promise((o,i)=>{e=o,t=i});n.status="pending",n.catch(()=>{});function r(o){Object.assign(n,o),delete n.resolve,delete n.reject}return n.resolve=o=>{r({status:"fulfilled",value:o}),e(o)},n.reject=o=>{r({status:"rejected",reason:o}),t(o)},n}function jEe(e){return Math.min(1e3*2**e,3e4)}function see(e){return(e??"online")==="online"?_T.isOnline():!0}var lee=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function k$(e){return e instanceof lee}function cee(e){let t=!1,n=0,r=!1,o;const i=n2(),a=m=>{var y;r||(f(new lee(m)),(y=e.abort)==null||y.call(e))},s=()=>{t=!0},l=()=>{t=!1},c=()=>Kj.isFocused()&&(e.networkMode==="always"||_T.isOnline())&&e.canRun(),u=()=>see(e.networkMode)&&e.canRun(),d=m=>{var y;r||(r=!0,(y=e.onSuccess)==null||y.call(e,m),o==null||o(),i.resolve(m))},f=m=>{var y;r||(r=!0,(y=e.onError)==null||y.call(e,m),o==null||o(),i.reject(m))},p=()=>new Promise(m=>{var y;o=w=>{(r||c())&&m(w)},(y=e.onPause)==null||y.call(e)}).then(()=>{var m;o=void 0,r||(m=e.onContinue)==null||m.call(e)}),h=()=>{if(r)return;let m;const y=n===0?e.initialPromise:void 0;try{m=y??e.fn()}catch(w){m=Promise.reject(w)}Promise.resolve(m).then(d).catch(w=>{var T;if(r)return;const x=e.retry??(ug?0:3),S=e.retryDelay??jEe,E=typeof S=="function"?S(n,w):S,P=x===!0||typeof x=="number"&&nc()?void 0:p()).then(()=>{t?f(w):h()})})};return{promise:i,cancel:a,continue:()=>(o==null||o(),i),cancelRetry:s,continueRetry:l,canStart:u,start:()=>(u()?h():p().then(h),i)}}function BEe(){let e=[],t=0,n=s=>{s()},r=s=>{s()},o=s=>setTimeout(s,0);const i=s=>{t?e.push(s):o(()=>{n(s)})},a=()=>{const s=e;e=[],s.length&&o(()=>{r(()=>{s.forEach(l=>{n(l)})})})};return{batch:s=>{let l;t++;try{l=s()}finally{t--,t||a()}return l},batchCalls:s=>(...l)=>{i(()=>{s(...l)})},schedule:i,setNotifyFunction:s=>{n=s},setBatchNotifyFunction:s=>{r=s},setScheduler:s=>{o=s}}}var jo=BEe(),Hh,OJ,uee=(OJ=class{constructor(){qt(this,Hh)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Z_(this.gcTime)&&Pt(this,Hh,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(ug?1/0:5*60*1e3))}clearGcTimeout(){be(this,Hh)&&(clearTimeout(be(this,Hh)),Pt(this,Hh,void 0))}},Hh=new WeakMap,OJ),iv,av,ol,Oi,vC,Uh,ac,Gu,AJ,zEe=(AJ=class extends uee{constructor(t){super();qt(this,ac);qt(this,iv);qt(this,av);qt(this,ol);qt(this,Oi);qt(this,vC);qt(this,Uh);Pt(this,Uh,!1),Pt(this,vC,t.defaultOptions),this.setOptions(t.options),this.observers=[],Pt(this,ol,t.cache),this.queryKey=t.queryKey,this.queryHash=t.queryHash,Pt(this,iv,VEe(this.options)),this.state=t.state??be(this,iv),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=be(this,Oi))==null?void 0:t.promise}setOptions(t){this.options={...be(this,vC),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&be(this,ol).remove(this)}setData(t,n){const r=t2(this.state.data,t,this.options);return xn(this,ac,Gu).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){xn(this,ac,Gu).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,o;const n=(r=be(this,Oi))==null?void 0:r.promise;return(o=be(this,Oi))==null||o.cancel(t),n?n.then(il).catch(il):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(be(this,iv))}isActive(){return this.observers.some(t=>dc(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===qj||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStale(){return this.state.isInvalidated?!0:this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0}isStaleByTime(t=0){return this.state.isInvalidated||this.state.data===void 0||!oee(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=be(this,Oi))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=be(this,Oi))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),be(this,ol).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(be(this,Oi)&&(be(this,Uh)?be(this,Oi).cancel({revert:!0}):be(this,Oi).cancelRetry()),this.scheduleGc()),be(this,ol).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||xn(this,ac,Gu).call(this,{type:"invalidate"})}fetch(t,n){var l,c,u;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(be(this,Oi))return be(this,Oi).continueRetry(),be(this,Oi).promise}if(t&&this.setOptions(t),!this.options.queryFn){const d=this.observers.find(f=>f.options.queryFn);d&&this.setOptions(d.options)}const r=new AbortController,o=d=>{Object.defineProperty(d,"signal",{enumerable:!0,get:()=>(Pt(this,Uh,!0),r.signal)})},i=()=>{const d=aee(this.options,n),f={queryKey:this.queryKey,meta:this.meta};return o(f),Pt(this,Uh,!1),this.options.persister?this.options.persister(d,f,this):d(f)},a={fetchOptions:n,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:i};o(a),(l=this.options.behavior)==null||l.onFetch(a,this),Pt(this,av,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((c=a.fetchOptions)==null?void 0:c.meta))&&xn(this,ac,Gu).call(this,{type:"fetch",meta:(u=a.fetchOptions)==null?void 0:u.meta});const s=d=>{var f,p,h,m;k$(d)&&d.silent||xn(this,ac,Gu).call(this,{type:"error",error:d}),k$(d)||((p=(f=be(this,ol).config).onError)==null||p.call(f,d,this),(m=(h=be(this,ol).config).onSettled)==null||m.call(h,this.state.data,d,this)),this.scheduleGc()};return Pt(this,Oi,cee({initialPromise:n==null?void 0:n.initialPromise,fn:a.fetchFn,abort:r.abort.bind(r),onSuccess:d=>{var f,p,h,m;if(d===void 0){s(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(d)}catch(y){s(y);return}(p=(f=be(this,ol).config).onSuccess)==null||p.call(f,d,this),(m=(h=be(this,ol).config).onSettled)==null||m.call(h,d,this.state.error,this),this.scheduleGc()},onError:s,onFail:(d,f)=>{xn(this,ac,Gu).call(this,{type:"failed",failureCount:d,error:f})},onPause:()=>{xn(this,ac,Gu).call(this,{type:"pause"})},onContinue:()=>{xn(this,ac,Gu).call(this,{type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0})),be(this,Oi).start()}},iv=new WeakMap,av=new WeakMap,ol=new WeakMap,Oi=new WeakMap,vC=new WeakMap,Uh=new WeakMap,ac=new WeakSet,Gu=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...dee(r.data,this.options),fetchMeta:t.meta??null};case"success":return{...r,data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const o=t.error;return k$(o)&&o.revert&&be(this,av)?{...be(this,av),fetchStatus:"idle"}:{...r,error:o,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),jo.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),be(this,ol).notify({query:this,type:"updated",action:t})})},AJ);function dee(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:see(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function VEe(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var Kc,kJ,HEe=(kJ=class extends Cb{constructor(t={}){super();qt(this,Kc);this.config=t,Pt(this,Kc,new Map)}build(t,n,r){const o=n.queryKey,i=n.queryHash??Gj(o,n);let a=this.get(i);return a||(a=new zEe({cache:this,queryKey:o,queryHash:i,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(o)}),this.add(a)),a}add(t){be(this,Kc).has(t.queryHash)||(be(this,Kc).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=be(this,Kc).get(t.queryHash);n&&(t.destroy(),n===t&&be(this,Kc).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){jo.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return be(this,Kc).get(t)}getAll(){return[...be(this,Kc).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>q4(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>q4(t,r)):n}notify(t){jo.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){jo.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){jo.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Kc=new WeakMap,kJ),Yc,Yi,Wh,Qc,of,MJ,UEe=(MJ=class extends uee{constructor(t){super();qt(this,Qc);qt(this,Yc);qt(this,Yi);qt(this,Wh);this.mutationId=t.mutationId,Pt(this,Yi,t.mutationCache),Pt(this,Yc,[]),this.state=t.state||fee(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){be(this,Yc).includes(t)||(be(this,Yc).push(t),this.clearGcTimeout(),be(this,Yi).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){Pt(this,Yc,be(this,Yc).filter(n=>n!==t)),this.scheduleGc(),be(this,Yi).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){be(this,Yc).length||(this.state.status==="pending"?this.scheduleGc():be(this,Yi).remove(this))}continue(){var t;return((t=be(this,Wh))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var o,i,a,s,l,c,u,d,f,p,h,m,y,w,x,S,E,P,T,I;Pt(this,Wh,cee({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(A,k)=>{xn(this,Qc,of).call(this,{type:"failed",failureCount:A,error:k})},onPause:()=>{xn(this,Qc,of).call(this,{type:"pause"})},onContinue:()=>{xn(this,Qc,of).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>be(this,Yi).canRun(this)}));const n=this.state.status==="pending",r=!be(this,Wh).canStart();try{if(!n){xn(this,Qc,of).call(this,{type:"pending",variables:t,isPaused:r}),await((i=(o=be(this,Yi).config).onMutate)==null?void 0:i.call(o,t,this));const k=await((s=(a=this.options).onMutate)==null?void 0:s.call(a,t));k!==this.state.context&&xn(this,Qc,of).call(this,{type:"pending",context:k,variables:t,isPaused:r})}const A=await be(this,Wh).start();return await((c=(l=be(this,Yi).config).onSuccess)==null?void 0:c.call(l,A,t,this.state.context,this)),await((d=(u=this.options).onSuccess)==null?void 0:d.call(u,A,t,this.state.context)),await((p=(f=be(this,Yi).config).onSettled)==null?void 0:p.call(f,A,null,this.state.variables,this.state.context,this)),await((m=(h=this.options).onSettled)==null?void 0:m.call(h,A,null,t,this.state.context)),xn(this,Qc,of).call(this,{type:"success",data:A}),A}catch(A){try{throw await((w=(y=be(this,Yi).config).onError)==null?void 0:w.call(y,A,t,this.state.context,this)),await((S=(x=this.options).onError)==null?void 0:S.call(x,A,t,this.state.context)),await((P=(E=be(this,Yi).config).onSettled)==null?void 0:P.call(E,void 0,A,this.state.variables,this.state.context,this)),await((I=(T=this.options).onSettled)==null?void 0:I.call(T,void 0,A,t,this.state.context)),A}finally{xn(this,Qc,of).call(this,{type:"error",error:A})}}finally{be(this,Yi).runNext(this)}}},Yc=new WeakMap,Yi=new WeakMap,Wh=new WeakMap,Qc=new WeakSet,of=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),jo.batch(()=>{be(this,Yc).forEach(r=>{r.onMutationUpdate(t)}),be(this,Yi).notify({mutation:this,type:"updated",action:t})})},MJ);function fee(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var es,bC,RJ,WEe=(RJ=class extends Cb{constructor(t={}){super();qt(this,es);qt(this,bC);this.config=t,Pt(this,es,new Map),Pt(this,bC,Date.now())}build(t,n,r){const o=new UEe({mutationCache:this,mutationId:++IE(this,bC)._,options:t.defaultMutationOptions(n),state:r});return this.add(o),o}add(t){const n=$E(t),r=be(this,es).get(n)??[];r.push(t),be(this,es).set(n,r),this.notify({type:"added",mutation:t})}remove(t){var r;const n=$E(t);if(be(this,es).has(n)){const o=(r=be(this,es).get(n))==null?void 0:r.filter(i=>i!==t);o&&(o.length===0?be(this,es).delete(n):be(this,es).set(n,o))}this.notify({type:"removed",mutation:t})}canRun(t){var r;const n=(r=be(this,es).get($E(t)))==null?void 0:r.find(o=>o.state.status==="pending");return!n||n===t}runNext(t){var r;const n=(r=be(this,es).get($E(t)))==null?void 0:r.find(o=>o!==t&&o.state.isPaused);return(n==null?void 0:n.continue())??Promise.resolve()}clear(){jo.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}getAll(){return[...be(this,es).values()].flat()}find(t){const n={exact:!0,...t};return this.getAll().find(r=>K4(n,r))}findAll(t={}){return this.getAll().filter(n=>K4(t,n))}notify(t){jo.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return jo.batch(()=>Promise.all(t.map(n=>n.continue().catch(il))))}},es=new WeakMap,bC=new WeakMap,RJ);function $E(e){var t;return((t=e.options.scope)==null?void 0:t.id)??String(e.mutationId)}function X4(e){return{onFetch:(t,n)=>{var u,d,f,p,h;const r=t.options,o=(f=(d=(u=t.fetchOptions)==null?void 0:u.meta)==null?void 0:d.fetchMore)==null?void 0:f.direction,i=((p=t.state.data)==null?void 0:p.pages)||[],a=((h=t.state.data)==null?void 0:h.pageParams)||[];let s={pages:[],pageParams:[]},l=0;const c=async()=>{let m=!1;const y=S=>{Object.defineProperty(S,"signal",{enumerable:!0,get:()=>(t.signal.aborted?m=!0:t.signal.addEventListener("abort",()=>{m=!0}),t.signal)})},w=aee(t.options,t.fetchOptions),x=async(S,E,P)=>{if(m)return Promise.reject();if(E==null&&S.pages.length)return Promise.resolve(S);const T={queryKey:t.queryKey,pageParam:E,direction:P?"backward":"forward",meta:t.options.meta};y(T);const I=await w(T),{maxPages:A}=t.options,k=P?NEe:_Ee;return{pages:k(S.pages,I,A),pageParams:k(S.pageParams,E,A)}};if(o&&i.length){const S=o==="backward",E=S?GEe:J4,P={pages:i,pageParams:a},T=E(r,P);s=await x(P,T,S)}else{const S=e??i.length;do{const E=l===0?a[0]??r.initialPageParam:J4(r,s);if(l>0&&E==null)break;s=await x(s,E),l++}while(l{var m,y;return(y=(m=t.options).persister)==null?void 0:y.call(m,c,{queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=c}}}function J4(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function GEe(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var co,Cf,Ef,sv,lv,Pf,cv,uv,$J,qEe=($J=class{constructor(e={}){qt(this,co);qt(this,Cf);qt(this,Ef);qt(this,sv);qt(this,lv);qt(this,Pf);qt(this,cv);qt(this,uv);Pt(this,co,e.queryCache||new HEe),Pt(this,Cf,e.mutationCache||new WEe),Pt(this,Ef,e.defaultOptions||{}),Pt(this,sv,new Map),Pt(this,lv,new Map),Pt(this,Pf,0)}mount(){IE(this,Pf)._++,be(this,Pf)===1&&(Pt(this,cv,Kj.subscribe(async e=>{e&&(await this.resumePausedMutations(),be(this,co).onFocus())})),Pt(this,uv,_T.subscribe(async e=>{e&&(await this.resumePausedMutations(),be(this,co).onOnline())})))}unmount(){var e,t;IE(this,Pf)._--,be(this,Pf)===0&&((e=be(this,cv))==null||e.call(this),Pt(this,cv,void 0),(t=be(this,uv))==null||t.call(this),Pt(this,uv,void 0))}isFetching(e){return be(this,co).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return be(this,Cf).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=be(this,co).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.getQueryData(e.queryKey);if(t===void 0)return this.fetchQuery(e);{const n=this.defaultQueryOptions(e),r=be(this,co).build(this,n);return e.revalidateIfStale&&r.isStaleByTime(Dy(n.staleTime,r))&&this.prefetchQuery(n),Promise.resolve(t)}}getQueriesData(e){return be(this,co).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),o=be(this,co).get(r.queryHash),i=o==null?void 0:o.state.data,a=$Ee(t,i);if(a!==void 0)return be(this,co).build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return jo.batch(()=>be(this,co).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=be(this,co).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=be(this,co);jo.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=be(this,co),r={type:"active",...e};return jo.batch(()=>(n.findAll(e).forEach(o=>{o.reset()}),this.refetchQueries(r,t)))}cancelQueries(e={},t={}){const n={revert:!0,...t},r=jo.batch(()=>be(this,co).findAll(e).map(o=>o.cancel(n)));return Promise.all(r).then(il).catch(il)}invalidateQueries(e={},t={}){return jo.batch(()=>{if(be(this,co).findAll(e).forEach(r=>{r.invalidate()}),e.refetchType==="none")return Promise.resolve();const n={...e,type:e.refetchType??e.type??"active"};return this.refetchQueries(n,t)})}refetchQueries(e={},t){const n={...t,cancelRefetch:(t==null?void 0:t.cancelRefetch)??!0},r=jo.batch(()=>be(this,co).findAll(e).filter(o=>!o.isDisabled()).map(o=>{let i=o.fetch(void 0,n);return n.throwOnError||(i=i.catch(il)),o.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(r).then(il)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=be(this,co).build(this,t);return n.isStaleByTime(Dy(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(il).catch(il)}fetchInfiniteQuery(e){return e.behavior=X4(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(il).catch(il)}ensureInfiniteQueryData(e){return e.behavior=X4(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return _T.isOnline()?be(this,Cf).resumePausedMutations():Promise.resolve()}getQueryCache(){return be(this,co)}getMutationCache(){return be(this,Cf)}getDefaultOptions(){return be(this,Ef)}setDefaultOptions(e){Pt(this,Ef,e)}setQueryDefaults(e,t){be(this,sv).set(dg(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...be(this,sv).values()];let n={};return t.forEach(r=>{Bx(e,r.queryKey)&&(n={...n,...r.defaultOptions})}),n}setMutationDefaults(e,t){be(this,lv).set(dg(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...be(this,lv).values()];let n={};return t.forEach(r=>{Bx(e,r.mutationKey)&&(n={...n,...r.defaultOptions})}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...be(this,Ef).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Gj(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.enabled!==!0&&t.queryFn===qj&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...be(this,Ef).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){be(this,co).clear(),be(this,Cf).clear()}},co=new WeakMap,Cf=new WeakMap,Ef=new WeakMap,sv=new WeakMap,lv=new WeakMap,Pf=new WeakMap,cv=new WeakMap,uv=new WeakMap,$J),ba,Fn,wC,Qi,Gh,dv,Tf,Xc,xC,fv,pv,qh,Kh,If,hv,ur,Nw,r2,o2,i2,a2,s2,l2,c2,pee,DJ,KEe=(DJ=class extends Cb{constructor(t,n){super();qt(this,ur);qt(this,ba);qt(this,Fn);qt(this,wC);qt(this,Qi);qt(this,Gh);qt(this,dv);qt(this,Tf);qt(this,Xc);qt(this,xC);qt(this,fv);qt(this,pv);qt(this,qh);qt(this,Kh);qt(this,If);qt(this,hv,new Set);this.options=n,Pt(this,ba,t),Pt(this,Xc,null),Pt(this,Tf,n2()),this.options.experimental_prefetchInRender||be(this,Tf).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(be(this,Fn).addObserver(this),Z4(be(this,Fn),this.options)?xn(this,ur,Nw).call(this):this.updateResult(),xn(this,ur,a2).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return u2(be(this,Fn),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return u2(be(this,Fn),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,xn(this,ur,s2).call(this),xn(this,ur,l2).call(this),be(this,Fn).removeObserver(this)}setOptions(t,n){const r=this.options,o=be(this,Fn);if(this.options=be(this,ba).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof dc(this.options.enabled,be(this,Fn))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");xn(this,ur,c2).call(this),be(this,Fn).setOptions(this.options),r._defaulted&&!DT(this.options,r)&&be(this,ba).getQueryCache().notify({type:"observerOptionsUpdated",query:be(this,Fn),observer:this});const i=this.hasListeners();i&&eW(be(this,Fn),o,this.options,r)&&xn(this,ur,Nw).call(this),this.updateResult(n),i&&(be(this,Fn)!==o||dc(this.options.enabled,be(this,Fn))!==dc(r.enabled,be(this,Fn))||Dy(this.options.staleTime,be(this,Fn))!==Dy(r.staleTime,be(this,Fn)))&&xn(this,ur,r2).call(this);const a=xn(this,ur,o2).call(this);i&&(be(this,Fn)!==o||dc(this.options.enabled,be(this,Fn))!==dc(r.enabled,be(this,Fn))||a!==be(this,If))&&xn(this,ur,i2).call(this,a)}getOptimisticResult(t){const n=be(this,ba).getQueryCache().build(be(this,ba),t),r=this.createResult(n,t);return QEe(this,r)&&(Pt(this,Qi,r),Pt(this,dv,this.options),Pt(this,Gh,be(this,Fn).state)),r}getCurrentResult(){return be(this,Qi)}trackResult(t,n){const r={};return Object.keys(t).forEach(o=>{Object.defineProperty(r,o,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(o),n==null||n(o),t[o])})}),r}trackProp(t){be(this,hv).add(t)}getCurrentQuery(){return be(this,Fn)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=be(this,ba).defaultQueryOptions(t),r=be(this,ba).getQueryCache().build(be(this,ba),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return xn(this,ur,Nw).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),be(this,Qi)))}createResult(t,n){var A;const r=be(this,Fn),o=this.options,i=be(this,Qi),a=be(this,Gh),s=be(this,dv),c=t!==r?t.state:be(this,wC),{state:u}=t;let d={...u},f=!1,p;if(n._optimisticResults){const k=this.hasListeners(),O=!k&&Z4(t,n),$=k&&eW(t,r,n,o);(O||$)&&(d={...d,...dee(u.data,t.options)}),n._optimisticResults==="isRestoring"&&(d.fetchStatus="idle")}let{error:h,errorUpdatedAt:m,status:y}=d;if(n.select&&d.data!==void 0)if(i&&d.data===(a==null?void 0:a.data)&&n.select===be(this,xC))p=be(this,fv);else try{Pt(this,xC,n.select),p=n.select(d.data),p=t2(i==null?void 0:i.data,p,n),Pt(this,fv,p),Pt(this,Xc,null)}catch(k){Pt(this,Xc,k)}else p=d.data;if(n.placeholderData!==void 0&&p===void 0&&y==="pending"){let k;if(i!=null&&i.isPlaceholderData&&n.placeholderData===(s==null?void 0:s.placeholderData))k=i.data;else if(k=typeof n.placeholderData=="function"?n.placeholderData((A=be(this,pv))==null?void 0:A.state.data,be(this,pv)):n.placeholderData,n.select&&k!==void 0)try{k=n.select(k),Pt(this,Xc,null)}catch(O){Pt(this,Xc,O)}k!==void 0&&(y="success",p=t2(i==null?void 0:i.data,k,n),f=!0)}be(this,Xc)&&(h=be(this,Xc),p=be(this,fv),m=Date.now(),y="error");const w=d.fetchStatus==="fetching",x=y==="pending",S=y==="error",E=x&&w,P=p!==void 0,I={status:y,fetchStatus:d.fetchStatus,isPending:x,isSuccess:y==="success",isError:S,isInitialLoading:E,isLoading:E,data:p,dataUpdatedAt:d.dataUpdatedAt,error:h,errorUpdatedAt:m,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:d.dataUpdateCount>0||d.errorUpdateCount>0,isFetchedAfterMount:d.dataUpdateCount>c.dataUpdateCount||d.errorUpdateCount>c.errorUpdateCount,isFetching:w,isRefetching:w&&!x,isLoadingError:S&&!P,isPaused:d.fetchStatus==="paused",isPlaceholderData:f,isRefetchError:S&&P,isStale:Yj(t,n),refetch:this.refetch,promise:be(this,Tf)};if(this.options.experimental_prefetchInRender){const k=N=>{I.status==="error"?N.reject(I.error):I.data!==void 0&&N.resolve(I.data)},O=()=>{const N=Pt(this,Tf,I.promise=n2());k(N)},$=be(this,Tf);switch($.status){case"pending":t.queryHash===r.queryHash&&k($);break;case"fulfilled":(I.status==="error"||I.data!==$.value)&&O();break;case"rejected":(I.status!=="error"||I.error!==$.reason)&&O();break}}return I}updateResult(t){const n=be(this,Qi),r=this.createResult(be(this,Fn),this.options);if(Pt(this,Gh,be(this,Fn).state),Pt(this,dv,this.options),be(this,Gh).data!==void 0&&Pt(this,pv,be(this,Fn)),DT(r,n))return;Pt(this,Qi,r);const o={},i=()=>{if(!n)return!0;const{notifyOnChangeProps:a}=this.options,s=typeof a=="function"?a():a;if(s==="all"||!s&&!be(this,hv).size)return!0;const l=new Set(s??be(this,hv));return this.options.throwOnError&&l.add("error"),Object.keys(be(this,Qi)).some(c=>{const u=c;return be(this,Qi)[u]!==n[u]&&l.has(u)})};(t==null?void 0:t.listeners)!==!1&&i()&&(o.listeners=!0),xn(this,ur,pee).call(this,{...o,...t})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&xn(this,ur,a2).call(this)}},ba=new WeakMap,Fn=new WeakMap,wC=new WeakMap,Qi=new WeakMap,Gh=new WeakMap,dv=new WeakMap,Tf=new WeakMap,Xc=new WeakMap,xC=new WeakMap,fv=new WeakMap,pv=new WeakMap,qh=new WeakMap,Kh=new WeakMap,If=new WeakMap,hv=new WeakMap,ur=new WeakSet,Nw=function(t){xn(this,ur,c2).call(this);let n=be(this,Fn).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(il)),n},r2=function(){xn(this,ur,s2).call(this);const t=Dy(this.options.staleTime,be(this,Fn));if(ug||be(this,Qi).isStale||!Z_(t))return;const r=oee(be(this,Qi).dataUpdatedAt,t)+1;Pt(this,qh,setTimeout(()=>{be(this,Qi).isStale||this.updateResult()},r))},o2=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(be(this,Fn)):this.options.refetchInterval)??!1},i2=function(t){xn(this,ur,l2).call(this),Pt(this,If,t),!(ug||dc(this.options.enabled,be(this,Fn))===!1||!Z_(be(this,If))||be(this,If)===0)&&Pt(this,Kh,setInterval(()=>{(this.options.refetchIntervalInBackground||Kj.isFocused())&&xn(this,ur,Nw).call(this)},be(this,If)))},a2=function(){xn(this,ur,r2).call(this),xn(this,ur,i2).call(this,xn(this,ur,o2).call(this))},s2=function(){be(this,qh)&&(clearTimeout(be(this,qh)),Pt(this,qh,void 0))},l2=function(){be(this,Kh)&&(clearInterval(be(this,Kh)),Pt(this,Kh,void 0))},c2=function(){const t=be(this,ba).getQueryCache().build(be(this,ba),this.options);if(t===be(this,Fn))return;const n=be(this,Fn);Pt(this,Fn,t),Pt(this,wC,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},pee=function(t){jo.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(be(this,Qi))}),be(this,ba).getQueryCache().notify({query:be(this,Fn),type:"observerResultsUpdated"})})},DJ);function YEe(e,t){return dc(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function Z4(e,t){return YEe(e,t)||e.state.data!==void 0&&u2(e,t,t.refetchOnMount)}function u2(e,t,n){if(dc(t.enabled,e)!==!1){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&Yj(e,t)}return!1}function eW(e,t,n,r){return(e!==t||dc(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&Yj(e,n)}function Yj(e,t){return dc(t.enabled,e)!==!1&&e.isStaleByTime(Dy(t.staleTime,e))}function QEe(e,t){return!DT(e.getCurrentResult(),t)}var Of,Af,wa,ed,yd,YP,d2,_J,XEe=(_J=class extends Cb{constructor(n,r){super();qt(this,yd);qt(this,Of);qt(this,Af);qt(this,wa);qt(this,ed);Pt(this,Of,n),this.setOptions(r),this.bindMethods(),xn(this,yd,YP).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){var o;const r=this.options;this.options=be(this,Of).defaultMutationOptions(n),DT(this.options,r)||be(this,Of).getMutationCache().notify({type:"observerOptionsUpdated",mutation:be(this,wa),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&dg(r.mutationKey)!==dg(this.options.mutationKey)?this.reset():((o=be(this,wa))==null?void 0:o.state.status)==="pending"&&be(this,wa).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=be(this,wa))==null||n.removeObserver(this)}onMutationUpdate(n){xn(this,yd,YP).call(this),xn(this,yd,d2).call(this,n)}getCurrentResult(){return be(this,Af)}reset(){var n;(n=be(this,wa))==null||n.removeObserver(this),Pt(this,wa,void 0),xn(this,yd,YP).call(this),xn(this,yd,d2).call(this)}mutate(n,r){var o;return Pt(this,ed,r),(o=be(this,wa))==null||o.removeObserver(this),Pt(this,wa,be(this,Of).getMutationCache().build(be(this,Of),this.options)),be(this,wa).addObserver(this),be(this,wa).execute(n)}},Of=new WeakMap,Af=new WeakMap,wa=new WeakMap,ed=new WeakMap,yd=new WeakSet,YP=function(){var r;const n=((r=be(this,wa))==null?void 0:r.state)??fee();Pt(this,Af,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},d2=function(n){jo.batch(()=>{var r,o,i,a,s,l,c,u;if(be(this,ed)&&this.hasListeners()){const d=be(this,Af).variables,f=be(this,Af).context;(n==null?void 0:n.type)==="success"?((o=(r=be(this,ed)).onSuccess)==null||o.call(r,n.data,d,f),(a=(i=be(this,ed)).onSettled)==null||a.call(i,n.data,null,d,f)):(n==null?void 0:n.type)==="error"&&((l=(s=be(this,ed)).onError)==null||l.call(s,n.error,d,f),(u=(c=be(this,ed)).onSettled)==null||u.call(c,void 0,n.error,d,f))}this.listeners.forEach(d=>{d(be(this,Af))})})},_J),hee=v.createContext(void 0),Lt=e=>{const t=v.useContext(hee);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},$g=({client:e,children:t})=>(v.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),R.jsx(hee.Provider,{value:e,children:t})),gee=v.createContext(!1),JEe=()=>v.useContext(gee);gee.Provider;function ZEe(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var ePe=v.createContext(ZEe()),tPe=()=>v.useContext(ePe);function mee(e,t){return typeof e=="function"?e(...t):!!e}function yee(){}var nPe=(e,t)=>{(e.suspense||e.throwOnError)&&(t.isReset()||(e.retryOnMount=!1))},rPe=e=>{v.useEffect(()=>{e.clearReset()},[e])},oPe=({result:e,errorResetBoundary:t,throwOnError:n,query:r})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&mee(n,[e.error,r]),iPe=e=>{e.suspense&&(e.staleTime===void 0&&(e.staleTime=1e3),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3)))},aPe=(e,t)=>e.isLoading&&e.isFetching&&!t,sPe=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,tW=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function lPe(e,t,n){var u,d,f,p,h;const r=Lt(),o=JEe(),i=tPe(),a=r.defaultQueryOptions(e);(d=(u=r.getDefaultOptions().queries)==null?void 0:u._experimental_beforeQuery)==null||d.call(u,a),a._optimisticResults=o?"isRestoring":"optimistic",iPe(a),nPe(a,i),rPe(i);const s=!r.getQueryCache().get(a.queryHash),[l]=v.useState(()=>new t(r,a)),c=l.getOptimisticResult(a);if(v.useSyncExternalStore(v.useCallback(m=>{const y=o?()=>{}:l.subscribe(jo.batchCalls(m));return l.updateResult(),y},[l,o]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),v.useEffect(()=>{l.setOptions(a,{listeners:!1})},[a,l]),sPe(a,c))throw tW(a,l,i);if(oPe({result:c,errorResetBoundary:i,throwOnError:a.throwOnError,query:r.getQueryCache().get(a.queryHash)}))throw c.error;if((p=(f=r.getDefaultOptions().queries)==null?void 0:f._experimental_afterQuery)==null||p.call(f,a,c),a.experimental_prefetchInRender&&!ug&&aPe(c,o)){const m=s?tW(a,l,i):(h=r.getQueryCache().get(a.queryHash))==null?void 0:h.promise;m==null||m.catch(yee).finally(()=>{l.updateResult()})}return a.notifyOnChangeProps?c:l.trackResult(c)}function ho(e,t){return lPe(e,KEe)}function jt(e,t){const n=Lt(),[r]=v.useState(()=>new XEe(n,e));v.useEffect(()=>{r.setOptions(e)},[r,e]);const o=v.useSyncExternalStore(v.useCallback(a=>r.subscribe(jo.batchCalls(a)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),i=v.useCallback((a,s)=>{r.mutate(a,s).catch(yee)},[r]);if(o.error&&mee(r.options.throwOnError,[o.error]))throw o.error;return{...o,mutate:i,mutateAsync:o.mutate}}var cPe=function(){return null};function uPe(e){return R.jsx(_Ce,{...e,defaultTheme:GA,themeId:wc})}function dPe(e){return function(n){return R.jsx(uPe,{styles:typeof e=="function"?r=>e({theme:r,...n}):e})}}function fPe(){return AC}const Je=g1e;function at(e){return h1e(e)}function pPe(e){return nt("MuiSvgIcon",e)}it("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const hPe=e=>{const{color:t,fontSize:n,classes:r}=e,o={root:["root",t!=="inherit"&&`color${Ce(t)}`,`fontSize${Ce(n)}`]};return rt(o,pPe,r)},gPe=re("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="inherit"&&t[`color${Ce(n.color)}`],t[`fontSize${Ce(n.fontSize)}`]]}})(Je(({theme:e})=>{var t,n,r,o,i,a,s,l,c,u,d,f,p,h;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",flexShrink:0,transition:(o=(t=e.transitions)==null?void 0:t.create)==null?void 0:o.call(t,"fill",{duration:(r=(n=(e.vars??e).transitions)==null?void 0:n.duration)==null?void 0:r.shorter}),variants:[{props:m=>!m.hasSvgAsChild,style:{fill:"currentColor"}},{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:((a=(i=e.typography)==null?void 0:i.pxToRem)==null?void 0:a.call(i,20))||"1.25rem"}},{props:{fontSize:"medium"},style:{fontSize:((l=(s=e.typography)==null?void 0:s.pxToRem)==null?void 0:l.call(s,24))||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:((u=(c=e.typography)==null?void 0:c.pxToRem)==null?void 0:u.call(c,35))||"2.1875rem"}},...Object.entries((e.vars??e).palette).filter(([,m])=>m&&m.main).map(([m])=>{var y,w;return{props:{color:m},style:{color:(w=(y=(e.vars??e).palette)==null?void 0:y[m])==null?void 0:w.main}}}),{props:{color:"action"},style:{color:(f=(d=(e.vars??e).palette)==null?void 0:d.action)==null?void 0:f.active}},{props:{color:"disabled"},style:{color:(h=(p=(e.vars??e).palette)==null?void 0:p.action)==null?void 0:h.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}})),zx=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiSvgIcon"}),{children:o,className:i,color:a="inherit",component:s="svg",fontSize:l="medium",htmlColor:c,inheritViewBox:u=!1,titleAccess:d,viewBox:f="0 0 24 24",...p}=r,h=v.isValidElement(o)&&o.type==="svg",m={...r,color:a,component:s,fontSize:l,instanceFontSize:t.fontSize,inheritViewBox:u,viewBox:f,hasSvgAsChild:h},y={};u||(y.viewBox=f);const w=hPe(m);return R.jsxs(gPe,{as:s,className:de(w.root,i),focusable:"false",color:c,"aria-hidden":d?void 0:!0,role:d?"img":void 0,ref:n,...y,...p,...h&&o.props,ownerState:m,children:[h?o.props.children:o,d?R.jsx("title",{children:d}):null]})});zx&&(zx.muiName="SvgIcon");function ct(e,t){function n(r,o){return R.jsx(zx,{"data-testid":`${t}Icon`,ref:o,...r,children:e})}return n.muiName=zx.muiName,v.memo(v.forwardRef(n))}function qA(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function f2(e,t){return f2=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},f2(e,t)}function $C(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,f2(e,t)}function mPe(e,t){return e.classList?!!t&&e.classList.contains(t):(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")!==-1}function yPe(e,t){e.classList?e.classList.add(t):mPe(e,t)||(typeof e.className=="string"?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))}function nW(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function vPe(e,t){e.classList?e.classList.remove(t):typeof e.className=="string"?e.className=nW(e.className,t):e.setAttribute("class",nW(e.className&&e.className.baseVal||"",t))}var vee={exports:{}},Ms={},bee={exports:{}},wee={};/** * @license React * scheduler.production.min.js * @@ -78,7 +78,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${t}Chann * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */(function(e){function t(F,V){var U=F.length;F.push(V);e:for(;0>>1,X=F[q];if(0>>1;qo(Q,U))teo(pe,Q)?(F[q]=pe,F[te]=U,q=te):(F[q]=Q,F[ee]=U,q=ee);else if(teo(pe,U))F[q]=pe,F[te]=U,q=te;else break e}}return V}function o(F,V){var U=F.sortIndex-V.sortIndex;return U!==0?U:F.id-V.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var a=Date,s=a.now();e.unstable_now=function(){return a.now()-s}}var l=[],c=[],u=1,d=null,f=3,p=!1,h=!1,m=!1,y=typeof setTimeout=="function"?setTimeout:null,w=typeof clearTimeout=="function"?clearTimeout:null,x=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function C(F){for(var V=n(c);V!==null;){if(V.callback===null)r(c);else if(V.startTime<=F)r(c),V.sortIndex=V.expirationTime,t(l,V);else break;V=n(c)}}function E(F){if(m=!1,C(F),!h)if(n(l)!==null)h=!0,_(P);else{var V=n(c);V!==null&&z(E,V.startTime-F)}}function P(F,V){h=!1,m&&(m=!1,w(A),A=-1),p=!0;var U=f;try{for(C(V),d=n(l);d!==null&&(!(d.expirationTime>V)||F&&!$());){var q=d.callback;if(typeof q=="function"){d.callback=null,f=d.priorityLevel;var X=q(d.expirationTime<=V);V=e.unstable_now(),typeof X=="function"?d.callback=X:d===n(l)&&r(l),C(V)}else r(l);d=n(l)}if(d!==null)var ie=!0;else{var ee=n(c);ee!==null&&z(E,ee.startTime-V),ie=!1}return ie}finally{d=null,f=U,p=!1}}var T=!1,I=null,A=-1,k=5,O=-1;function $(){return!(e.unstable_now()-OF||125q?(F.sortIndex=U,t(c,F),n(l)===null&&F===n(c)&&(m?(w(A),A=-1):m=!0,z(E,U-q))):(F.sortIndex=X,t(l,F),h||p||(h=!0,_(P))),F},e.unstable_shouldYield=$,e.unstable_wrapCallback=function(F){var V=f;return function(){var U=f;f=V;try{return F.apply(this,arguments)}finally{f=U}}}})(gee);hee.exports=gee;var uPe=hee.exports;/** + */(function(e){function t(F,V){var U=F.length;F.push(V);e:for(;0>>1,X=F[K];if(0>>1;Ko(Q,U))teo(pe,Q)?(F[K]=pe,F[te]=U,K=te):(F[K]=Q,F[ee]=U,K=ee);else if(teo(pe,U))F[K]=pe,F[te]=U,K=te;else break e}}return V}function o(F,V){var U=F.sortIndex-V.sortIndex;return U!==0?U:F.id-V.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var a=Date,s=a.now();e.unstable_now=function(){return a.now()-s}}var l=[],c=[],u=1,d=null,f=3,p=!1,h=!1,m=!1,y=typeof setTimeout=="function"?setTimeout:null,w=typeof clearTimeout=="function"?clearTimeout:null,x=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function S(F){for(var V=n(c);V!==null;){if(V.callback===null)r(c);else if(V.startTime<=F)r(c),V.sortIndex=V.expirationTime,t(l,V);else break;V=n(c)}}function E(F){if(m=!1,S(F),!h)if(n(l)!==null)h=!0,_(P);else{var V=n(c);V!==null&&z(E,V.startTime-F)}}function P(F,V){h=!1,m&&(m=!1,w(A),A=-1),p=!0;var U=f;try{for(S(V),d=n(l);d!==null&&(!(d.expirationTime>V)||F&&!$());){var K=d.callback;if(typeof K=="function"){d.callback=null,f=d.priorityLevel;var X=K(d.expirationTime<=V);V=e.unstable_now(),typeof X=="function"?d.callback=X:d===n(l)&&r(l),S(V)}else r(l);d=n(l)}if(d!==null)var ie=!0;else{var ee=n(c);ee!==null&&z(E,ee.startTime-V),ie=!1}return ie}finally{d=null,f=U,p=!1}}var T=!1,I=null,A=-1,k=5,O=-1;function $(){return!(e.unstable_now()-OF||125K?(F.sortIndex=U,t(c,F),n(l)===null&&F===n(c)&&(m?(w(A),A=-1):m=!0,z(E,U-K))):(F.sortIndex=X,t(l,F),h||p||(h=!0,_(P))),F},e.unstable_shouldYield=$,e.unstable_wrapCallback=function(F){var V=f;return function(){var U=f;f=V;try{return F.apply(this,arguments)}finally{f=U}}}})(wee);bee.exports=wee;var bPe=bee.exports;/** * @license React * react-dom.production.min.js * @@ -86,14 +86,14 @@ To suppress this warning, you need to explicitly provide the \`palette.${t}Chann * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var dPe=v,Cs=uPe;function lt(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),s2=Object.prototype.hasOwnProperty,fPe=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Z4={},eW={};function pPe(e){return s2.call(eW,e)?!0:s2.call(Z4,e)?!1:fPe.test(e)?eW[e]=!0:(Z4[e]=!0,!1)}function hPe(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function gPe(e,t,n,r){if(t===null||typeof t>"u"||hPe(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function da(e,t,n,r,o,i,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=a}var bi={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){bi[e]=new da(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];bi[t]=new da(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){bi[e]=new da(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){bi[e]=new da(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){bi[e]=new da(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){bi[e]=new da(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){bi[e]=new da(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){bi[e]=new da(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){bi[e]=new da(e,5,!1,e.toLowerCase(),null,!1,!1)});var Wj=/[\-:]([a-z])/g;function Gj(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Wj,Gj);bi[t]=new da(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Wj,Gj);bi[t]=new da(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Wj,Gj);bi[t]=new da(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){bi[e]=new da(e,1,!1,e.toLowerCase(),null,!1,!1)});bi.xlinkHref=new da("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){bi[e]=new da(e,1,!1,e.toLowerCase(),null,!0,!0)});function qj(e,t,n,r){var o=bi.hasOwnProperty(t)?bi[t]:null;(o!==null?o.type!==0:r||!(2"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),p2=Object.prototype.hasOwnProperty,xPe=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,rW={},oW={};function SPe(e){return p2.call(oW,e)?!0:p2.call(rW,e)?!1:xPe.test(e)?oW[e]=!0:(rW[e]=!0,!1)}function CPe(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function EPe(e,t,n,r){if(t===null||typeof t>"u"||CPe(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function fa(e,t,n,r,o,i,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=a}var xi={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){xi[e]=new fa(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];xi[t]=new fa(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){xi[e]=new fa(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){xi[e]=new fa(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){xi[e]=new fa(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){xi[e]=new fa(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){xi[e]=new fa(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){xi[e]=new fa(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){xi[e]=new fa(e,5,!1,e.toLowerCase(),null,!1,!1)});var Qj=/[\-:]([a-z])/g;function Xj(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Qj,Xj);xi[t]=new fa(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Qj,Xj);xi[t]=new fa(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Qj,Xj);xi[t]=new fa(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){xi[e]=new fa(e,1,!1,e.toLowerCase(),null,!1,!1)});xi.xlinkHref=new fa("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){xi[e]=new fa(e,1,!1,e.toLowerCase(),null,!0,!0)});function Jj(e,t,n,r){var o=xi.hasOwnProperty(t)?xi[t]:null;(o!==null?o.type!==0:r||!(2s||o[a]!==i[s]){var l=` -`+o[a].replace(" at new "," at ");return e.displayName&&l.includes("")&&(l=l.replace("",e.displayName)),l}while(1<=a&&0<=s);break}}}finally{I$=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Rw(e):""}function mPe(e){switch(e.tag){case 5:return Rw(e.type);case 16:return Rw("Lazy");case 13:return Rw("Suspense");case 19:return Rw("SuspenseList");case 0:case 2:case 15:return e=O$(e.type,!1),e;case 11:return e=O$(e.type.render,!1),e;case 1:return e=O$(e.type,!0),e;default:return""}}function d2(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case iy:return"Fragment";case oy:return"Portal";case l2:return"Profiler";case Kj:return"StrictMode";case c2:return"Suspense";case u2:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case vee:return(e.displayName||"Context")+".Consumer";case yee:return(e._context.displayName||"Context")+".Provider";case Yj:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Qj:return t=e.displayName||null,t!==null?t:d2(e.type)||"Memo";case cf:t=e._payload,e=e._init;try{return d2(e(t))}catch{}}return null}function yPe(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return d2(t);case 8:return t===Kj?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function rp(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function wee(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function vPe(e){var t=wee(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(a){r=""+a,i.call(this,a)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(a){r=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function EE(e){e._valueTracker||(e._valueTracker=vPe(e))}function xee(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=wee(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function ET(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function f2(e,t){var n=t.checked;return eo({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function nW(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=rp(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function See(e,t){t=t.checked,t!=null&&qj(e,"checked",t,!1)}function p2(e,t){See(e,t);var n=rp(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?h2(e,t.type,n):t.hasOwnProperty("defaultValue")&&h2(e,t.type,rp(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function rW(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function h2(e,t,n){(t!=="number"||ET(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var $w=Array.isArray;function Dy(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o"+t.valueOf().toString()+"",t=PE.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Fx(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Xw={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},bPe=["Webkit","ms","Moz","O"];Object.keys(Xw).forEach(function(e){bPe.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Xw[t]=Xw[e]})});function Tee(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Xw.hasOwnProperty(e)&&Xw[e]?(""+t).trim():t+"px"}function Iee(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=Tee(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var wPe=eo({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function y2(e,t){if(t){if(wPe[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(lt(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(lt(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(lt(61))}if(t.style!=null&&typeof t.style!="object")throw Error(lt(62))}}function v2(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var b2=null;function Xj(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var w2=null,_y=null,Ny=null;function aW(e){if(e=kC(e)){if(typeof w2!="function")throw Error(lt(280));var t=e.stateNode;t&&(t=zA(t),w2(e.stateNode,e.type,t))}}function Oee(e){_y?Ny?Ny.push(e):Ny=[e]:_y=e}function Aee(){if(_y){var e=_y,t=Ny;if(Ny=_y=null,aW(e),t)for(e=0;e>>=0,e===0?32:31-(MPe(e)/RPe|0)|0}var TE=64,IE=4194304;function Dw(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function OT(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,o=e.suspendedLanes,i=e.pingedLanes,a=n&268435455;if(a!==0){var s=a&~o;s!==0?r=Dw(s):(i&=a,i!==0&&(r=Dw(i)))}else a=n&~o,a!==0?r=Dw(a):i!==0&&(r=Dw(i));if(r===0)return 0;if(t!==0&&t!==r&&!(t&o)&&(o=r&-r,i=t&-t,o>=i||o===16&&(i&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function OC(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-bc(t),e[t]=n}function NPe(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=Zw),gW=" ",mW=!1;function Yee(e,t){switch(e){case"keyup":return uTe.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Qee(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ay=!1;function fTe(e,t){switch(e){case"compositionend":return Qee(t);case"keypress":return t.which!==32?null:(mW=!0,gW);case"textInput":return e=t.data,e===gW&&mW?null:e;default:return null}}function pTe(e,t){if(ay)return e==="compositionend"||!iB&&Yee(e,t)?(e=qee(),BP=nB=Mf=null,ay=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=wW(n)}}function ete(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?ete(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function tte(){for(var e=window,t=ET();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=ET(e.document)}return t}function aB(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function STe(e){var t=tte(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&ete(n.ownerDocument.documentElement,n)){if(r!==null&&aB(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=n.textContent.length,i=Math.min(r.start,o);r=r.end===void 0?i:Math.min(r.end,o),!e.extend&&i>r&&(o=r,r=i,i=o),o=xW(n,i);var a=xW(n,r);o&&a&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,sy=null,T2=null,tx=null,I2=!1;function SW(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;I2||sy==null||sy!==ET(r)||(r=sy,"selectionStart"in r&&aB(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),tx&&Ux(tx,r)||(tx=r,r=MT(T2,"onSelect"),0uy||(e.current=$2[uy],$2[uy]=null,uy--)}function kr(e,t){uy++,$2[uy]=e.current,e.current=t}var op={},Ni=bp(op),Ia=bp(!1),ug=op;function mv(e,t){var n=e.type.contextTypes;if(!n)return op;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o={},i;for(i in n)o[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function Oa(e){return e=e.childContextTypes,e!=null}function $T(){Br(Ia),Br(Ni)}function AW(e,t,n){if(Ni.current!==op)throw Error(lt(168));kr(Ni,t),kr(Ia,n)}function ute(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var o in r)if(!(o in t))throw Error(lt(108,yPe(e)||"Unknown",o));return eo({},n,r)}function DT(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||op,ug=Ni.current,kr(Ni,e),kr(Ia,Ia.current),!0}function kW(e,t,n){var r=e.stateNode;if(!r)throw Error(lt(169));n?(e=ute(e,t,ug),r.__reactInternalMemoizedMergedChildContext=e,Br(Ia),Br(Ni),kr(Ni,e)):Br(Ia),kr(Ia,n)}var Qu=null,VA=!1,V$=!1;function dte(e){Qu===null?Qu=[e]:Qu.push(e)}function DTe(e){VA=!0,dte(e)}function wp(){if(!V$&&Qu!==null){V$=!0;var e=0,t=pr;try{var n=Qu;for(pr=1;e>=a,o-=a,ed=1<<32-bc(t)+o|n<A?(k=I,I=null):k=I.sibling;var O=f(w,I,C[A],E);if(O===null){I===null&&(I=k);break}e&&I&&O.alternate===null&&t(w,I),x=i(O,x,A),T===null?P=O:T.sibling=O,T=O,I=k}if(A===C.length)return n(w,I),Wr&&vh(w,A),P;if(I===null){for(;AA?(k=I,I=null):k=I.sibling;var $=f(w,I,O.value,E);if($===null){I===null&&(I=k);break}e&&I&&$.alternate===null&&t(w,I),x=i($,x,A),T===null?P=$:T.sibling=$,T=$,I=k}if(O.done)return n(w,I),Wr&&vh(w,A),P;if(I===null){for(;!O.done;A++,O=C.next())O=d(w,O.value,E),O!==null&&(x=i(O,x,A),T===null?P=O:T.sibling=O,T=O);return Wr&&vh(w,A),P}for(I=r(w,I);!O.done;A++,O=C.next())O=p(I,w,A,O.value,E),O!==null&&(e&&O.alternate!==null&&I.delete(O.key===null?A:O.key),x=i(O,x,A),T===null?P=O:T.sibling=O,T=O);return e&&I.forEach(function(N){return t(w,N)}),Wr&&vh(w,A),P}function y(w,x,C,E){if(typeof C=="object"&&C!==null&&C.type===iy&&C.key===null&&(C=C.props.children),typeof C=="object"&&C!==null){switch(C.$$typeof){case CE:e:{for(var P=C.key,T=x;T!==null;){if(T.key===P){if(P=C.type,P===iy){if(T.tag===7){n(w,T.sibling),x=o(T,C.props.children),x.return=w,w=x;break e}}else if(T.elementType===P||typeof P=="object"&&P!==null&&P.$$typeof===cf&&$W(P)===T.type){n(w,T.sibling),x=o(T,C.props),x.ref=G0(w,T,C),x.return=w,w=x;break e}n(w,T);break}else t(w,T);T=T.sibling}C.type===iy?(x=Yh(C.props.children,w.mode,E,C.key),x.return=w,w=x):(E=KP(C.type,C.key,C.props,null,w.mode,E),E.ref=G0(w,x,C),E.return=w,w=E)}return a(w);case oy:e:{for(T=C.key;x!==null;){if(x.key===T)if(x.tag===4&&x.stateNode.containerInfo===C.containerInfo&&x.stateNode.implementation===C.implementation){n(w,x.sibling),x=o(x,C.children||[]),x.return=w,w=x;break e}else{n(w,x);break}else t(w,x);x=x.sibling}x=Q$(C,w.mode,E),x.return=w,w=x}return a(w);case cf:return T=C._init,y(w,x,T(C._payload),E)}if($w(C))return h(w,x,C,E);if(z0(C))return m(w,x,C,E);DE(w,C)}return typeof C=="string"&&C!==""||typeof C=="number"?(C=""+C,x!==null&&x.tag===6?(n(w,x.sibling),x=o(x,C),x.return=w,w=x):(n(w,x),x=Y$(C,w.mode,E),x.return=w,w=x),a(w)):n(w,x)}return y}var vv=gte(!0),mte=gte(!1),LT=bp(null),FT=null,py=null,uB=null;function dB(){uB=py=FT=null}function fB(e){var t=LT.current;Br(LT),e._currentValue=t}function N2(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Fy(e,t){FT=e,uB=py=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Pa=!0),e.firstContext=null)}function Pl(e){var t=e._currentValue;if(uB!==e)if(e={context:e,memoizedValue:t,next:null},py===null){if(FT===null)throw Error(lt(308));py=e,FT.dependencies={lanes:0,firstContext:e}}else py=py.next=e;return t}var kh=null;function pB(e){kh===null?kh=[e]:kh.push(e)}function yte(e,t,n,r){var o=t.interleaved;return o===null?(n.next=n,pB(t)):(n.next=o.next,o.next=n),t.interleaved=n,Cd(e,r)}function Cd(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var uf=!1;function hB(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function vte(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function ad(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Hf(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Un&2){var o=r.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),r.pending=t,Cd(e,n)}return o=r.interleaved,o===null?(t.next=t,pB(r)):(t.next=o.next,o.next=t),r.interleaved=t,Cd(e,n)}function VP(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Zj(e,n)}}function DW(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var o=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};i===null?o=i=a:i=i.next=a,n=n.next}while(n!==null);i===null?o=i=t:i=i.next=t}else o=i=t;n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:i,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function jT(e,t,n,r){var o=e.updateQueue;uf=!1;var i=o.firstBaseUpdate,a=o.lastBaseUpdate,s=o.shared.pending;if(s!==null){o.shared.pending=null;var l=s,c=l.next;l.next=null,a===null?i=c:a.next=c,a=l;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==a&&(s===null?u.firstBaseUpdate=c:s.next=c,u.lastBaseUpdate=l))}if(i!==null){var d=o.baseState;a=0,u=c=l=null,s=i;do{var f=s.lane,p=s.eventTime;if((r&f)===f){u!==null&&(u=u.next={eventTime:p,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var h=e,m=s;switch(f=t,p=n,m.tag){case 1:if(h=m.payload,typeof h=="function"){d=h.call(p,d,f);break e}d=h;break e;case 3:h.flags=h.flags&-65537|128;case 0:if(h=m.payload,f=typeof h=="function"?h.call(p,d,f):h,f==null)break e;d=eo({},d,f);break e;case 2:uf=!0}}s.callback!==null&&s.lane!==0&&(e.flags|=64,f=o.effects,f===null?o.effects=[s]:f.push(s))}else p={eventTime:p,lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(c=u=p,l=d):u=u.next=p,a|=f;if(s=s.next,s===null){if(s=o.shared.pending,s===null)break;f=s,s=f.next,f.next=null,o.lastBaseUpdate=f,o.shared.pending=null}}while(!0);if(u===null&&(l=d),o.baseState=l,o.firstBaseUpdate=c,o.lastBaseUpdate=u,t=o.shared.interleaved,t!==null){o=t;do a|=o.lane,o=o.next;while(o!==t)}else i===null&&(o.shared.lanes=0);pg|=a,e.lanes=a,e.memoizedState=d}}function _W(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=U$.transition;U$.transition={};try{e(!1),t()}finally{pr=n,U$.transition=r}}function _te(){return Tl().memoizedState}function FTe(e,t,n){var r=Wf(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Nte(e))Lte(t,n);else if(n=yte(e,t,n,r),n!==null){var o=ia();wc(n,e,r,o),Fte(n,t,r)}}function jTe(e,t,n){var r=Wf(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Nte(e))Lte(t,o);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var a=t.lastRenderedState,s=i(a,n);if(o.hasEagerState=!0,o.eagerState=s,Tc(s,a)){var l=t.interleaved;l===null?(o.next=o,pB(t)):(o.next=l.next,l.next=o),t.interleaved=o;return}}catch{}finally{}n=yte(e,t,o,r),n!==null&&(o=ia(),wc(n,e,r,o),Fte(n,t,r))}}function Nte(e){var t=e.alternate;return e===Zr||t!==null&&t===Zr}function Lte(e,t){nx=zT=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Fte(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Zj(e,n)}}var VT={readContext:Pl,useCallback:Ei,useContext:Ei,useEffect:Ei,useImperativeHandle:Ei,useInsertionEffect:Ei,useLayoutEffect:Ei,useMemo:Ei,useReducer:Ei,useRef:Ei,useState:Ei,useDebugValue:Ei,useDeferredValue:Ei,useTransition:Ei,useMutableSource:Ei,useSyncExternalStore:Ei,useId:Ei,unstable_isNewReconciler:!1},BTe={readContext:Pl,useCallback:function(e,t){return Hc().memoizedState=[e,t===void 0?null:t],e},useContext:Pl,useEffect:LW,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,UP(4194308,4,kte.bind(null,t,e),n)},useLayoutEffect:function(e,t){return UP(4194308,4,e,t)},useInsertionEffect:function(e,t){return UP(4,2,e,t)},useMemo:function(e,t){var n=Hc();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Hc();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=FTe.bind(null,Zr,e),[r.memoizedState,e]},useRef:function(e){var t=Hc();return e={current:e},t.memoizedState=e},useState:NW,useDebugValue:SB,useDeferredValue:function(e){return Hc().memoizedState=e},useTransition:function(){var e=NW(!1),t=e[0];return e=LTe.bind(null,e[1]),Hc().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Zr,o=Hc();if(Wr){if(n===void 0)throw Error(lt(407));n=n()}else{if(n=t(),ti===null)throw Error(lt(349));fg&30||Ste(r,t,n)}o.memoizedState=n;var i={value:n,getSnapshot:t};return o.queue=i,LW(Ete.bind(null,r,i,e),[e]),r.flags|=2048,Jx(9,Cte.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=Hc(),t=ti.identifierPrefix;if(Wr){var n=td,r=ed;n=(r&~(1<<32-bc(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Qx++,0")&&(l=l.replace("",e.displayName)),l}while(1<=a&&0<=s);break}}}finally{R$=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Lw(e):""}function PPe(e){switch(e.tag){case 5:return Lw(e.type);case 16:return Lw("Lazy");case 13:return Lw("Suspense");case 19:return Lw("SuspenseList");case 0:case 2:case 15:return e=$$(e.type,!1),e;case 11:return e=$$(e.type.render,!1),e;case 1:return e=$$(e.type,!0),e;default:return""}}function y2(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case ay:return"Fragment";case iy:return"Portal";case h2:return"Profiler";case Zj:return"StrictMode";case g2:return"Suspense";case m2:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Cee:return(e.displayName||"Context")+".Consumer";case See:return(e._context.displayName||"Context")+".Provider";case eB:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case tB:return t=e.displayName||null,t!==null?t:y2(e.type)||"Memo";case uf:t=e._payload,e=e._init;try{return y2(e(t))}catch{}}return null}function TPe(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return y2(t);case 8:return t===Zj?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function ap(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Pee(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function IPe(e){var t=Pee(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(a){r=""+a,i.call(this,a)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(a){r=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function _E(e){e._valueTracker||(e._valueTracker=IPe(e))}function Tee(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Pee(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function NT(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function v2(e,t){var n=t.checked;return eo({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function aW(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=ap(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Iee(e,t){t=t.checked,t!=null&&Jj(e,"checked",t,!1)}function b2(e,t){Iee(e,t);var n=ap(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?w2(e,t.type,n):t.hasOwnProperty("defaultValue")&&w2(e,t.type,ap(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function sW(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function w2(e,t,n){(t!=="number"||NT(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Fw=Array.isArray;function _y(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o"+t.valueOf().toString()+"",t=NE.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Hx(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var nx={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},OPe=["Webkit","ms","Moz","O"];Object.keys(nx).forEach(function(e){OPe.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),nx[t]=nx[e]})});function Mee(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||nx.hasOwnProperty(e)&&nx[e]?(""+t).trim():t+"px"}function Ree(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=Mee(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var APe=eo({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function C2(e,t){if(t){if(APe[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(lt(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(lt(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(lt(61))}if(t.style!=null&&typeof t.style!="object")throw Error(lt(62))}}function E2(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var P2=null;function nB(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var T2=null,Ny=null,Ly=null;function uW(e){if(e=NC(e)){if(typeof T2!="function")throw Error(lt(280));var t=e.stateNode;t&&(t=JA(t),T2(e.stateNode,e.type,t))}}function $ee(e){Ny?Ly?Ly.push(e):Ly=[e]:Ny=e}function Dee(){if(Ny){var e=Ny,t=Ly;if(Ly=Ny=null,uW(e),t)for(e=0;e>>=0,e===0?32:31-(BPe(e)/zPe|0)|0}var LE=64,FE=4194304;function jw(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function BT(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,o=e.suspendedLanes,i=e.pingedLanes,a=n&268435455;if(a!==0){var s=a&~o;s!==0?r=jw(s):(i&=a,i!==0&&(r=jw(i)))}else a=n&~o,a!==0?r=jw(a):i!==0&&(r=jw(i));if(r===0)return 0;if(t!==0&&t!==r&&!(t&o)&&(o=r&-r,i=t&-t,o>=i||o===16&&(i&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function DC(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-xc(t),e[t]=n}function WPe(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=ox),bW=" ",wW=!1;function ete(e,t){switch(e){case"keyup":return bTe.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function tte(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var sy=!1;function xTe(e,t){switch(e){case"compositionend":return tte(t);case"keypress":return t.which!==32?null:(wW=!0,bW);case"textInput":return e=t.data,e===bW&&wW?null:e;default:return null}}function STe(e,t){if(sy)return e==="compositionend"||!uB&&ete(e,t)?(e=Jee(),XP=sB=Rf=null,sy=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=EW(n)}}function ite(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?ite(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function ate(){for(var e=window,t=NT();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=NT(e.document)}return t}function dB(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function MTe(e){var t=ate(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&ite(n.ownerDocument.documentElement,n)){if(r!==null&&dB(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=n.textContent.length,i=Math.min(r.start,o);r=r.end===void 0?i:Math.min(r.end,o),!e.extend&&i>r&&(o=r,r=i,i=o),o=PW(n,i);var a=PW(n,r);o&&a&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,ly=null,R2=null,ax=null,$2=!1;function TW(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;$2||ly==null||ly!==NT(r)||(r=ly,"selectionStart"in r&&dB(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),ax&&Yx(ax,r)||(ax=r,r=HT(R2,"onSelect"),0dy||(e.current=j2[dy],j2[dy]=null,dy--)}function kr(e,t){dy++,j2[dy]=e.current,e.current=t}var sp={},Ni=Sp(sp),Oa=Sp(!1),fg=sp;function yv(e,t){var n=e.type.contextTypes;if(!n)return sp;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o={},i;for(i in n)o[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function Aa(e){return e=e.childContextTypes,e!=null}function WT(){Br(Oa),Br(Ni)}function $W(e,t,n){if(Ni.current!==sp)throw Error(lt(168));kr(Ni,t),kr(Oa,n)}function gte(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var o in r)if(!(o in t))throw Error(lt(108,TPe(e)||"Unknown",o));return eo({},n,r)}function GT(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||sp,fg=Ni.current,kr(Ni,e),kr(Oa,Oa.current),!0}function DW(e,t,n){var r=e.stateNode;if(!r)throw Error(lt(169));n?(e=gte(e,t,fg),r.__reactInternalMemoizedMergedChildContext=e,Br(Oa),Br(Ni),kr(Ni,e)):Br(Oa),kr(Oa,n)}var Xu=null,ZA=!1,q$=!1;function mte(e){Xu===null?Xu=[e]:Xu.push(e)}function HTe(e){ZA=!0,mte(e)}function Cp(){if(!q$&&Xu!==null){q$=!0;var e=0,t=pr;try{var n=Xu;for(pr=1;e>=a,o-=a,td=1<<32-xc(t)+o|n<A?(k=I,I=null):k=I.sibling;var O=f(w,I,S[A],E);if(O===null){I===null&&(I=k);break}e&&I&&O.alternate===null&&t(w,I),x=i(O,x,A),T===null?P=O:T.sibling=O,T=O,I=k}if(A===S.length)return n(w,I),Wr&&bh(w,A),P;if(I===null){for(;AA?(k=I,I=null):k=I.sibling;var $=f(w,I,O.value,E);if($===null){I===null&&(I=k);break}e&&I&&$.alternate===null&&t(w,I),x=i($,x,A),T===null?P=$:T.sibling=$,T=$,I=k}if(O.done)return n(w,I),Wr&&bh(w,A),P;if(I===null){for(;!O.done;A++,O=S.next())O=d(w,O.value,E),O!==null&&(x=i(O,x,A),T===null?P=O:T.sibling=O,T=O);return Wr&&bh(w,A),P}for(I=r(w,I);!O.done;A++,O=S.next())O=p(I,w,A,O.value,E),O!==null&&(e&&O.alternate!==null&&I.delete(O.key===null?A:O.key),x=i(O,x,A),T===null?P=O:T.sibling=O,T=O);return e&&I.forEach(function(N){return t(w,N)}),Wr&&bh(w,A),P}function y(w,x,S,E){if(typeof S=="object"&&S!==null&&S.type===ay&&S.key===null&&(S=S.props.children),typeof S=="object"&&S!==null){switch(S.$$typeof){case DE:e:{for(var P=S.key,T=x;T!==null;){if(T.key===P){if(P=S.type,P===ay){if(T.tag===7){n(w,T.sibling),x=o(T,S.props.children),x.return=w,w=x;break e}}else if(T.elementType===P||typeof P=="object"&&P!==null&&P.$$typeof===uf&&LW(P)===T.type){n(w,T.sibling),x=o(T,S.props),x.ref=Q0(w,T,S),x.return=w,w=x;break e}n(w,T);break}else t(w,T);T=T.sibling}S.type===ay?(x=Xh(S.props.children,w.mode,E,S.key),x.return=w,w=x):(E=iT(S.type,S.key,S.props,null,w.mode,E),E.ref=Q0(w,x,S),E.return=w,w=E)}return a(w);case iy:e:{for(T=S.key;x!==null;){if(x.key===T)if(x.tag===4&&x.stateNode.containerInfo===S.containerInfo&&x.stateNode.implementation===S.implementation){n(w,x.sibling),x=o(x,S.children||[]),x.return=w,w=x;break e}else{n(w,x);break}else t(w,x);x=x.sibling}x=tD(S,w.mode,E),x.return=w,w=x}return a(w);case uf:return T=S._init,y(w,x,T(S._payload),E)}if(Fw(S))return h(w,x,S,E);if(W0(S))return m(w,x,S,E);WE(w,S)}return typeof S=="string"&&S!==""||typeof S=="number"?(S=""+S,x!==null&&x.tag===6?(n(w,x.sibling),x=o(x,S),x.return=w,w=x):(n(w,x),x=eD(S,w.mode,E),x.return=w,w=x),a(w)):n(w,x)}return y}var bv=wte(!0),xte=wte(!1),YT=Sp(null),QT=null,hy=null,gB=null;function mB(){gB=hy=QT=null}function yB(e){var t=YT.current;Br(YT),e._currentValue=t}function V2(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function jy(e,t){QT=e,gB=hy=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Ta=!0),e.firstContext=null)}function Ol(e){var t=e._currentValue;if(gB!==e)if(e={context:e,memoizedValue:t,next:null},hy===null){if(QT===null)throw Error(lt(308));hy=e,QT.dependencies={lanes:0,firstContext:e}}else hy=hy.next=e;return t}var Mh=null;function vB(e){Mh===null?Mh=[e]:Mh.push(e)}function Ste(e,t,n,r){var o=t.interleaved;return o===null?(n.next=n,vB(t)):(n.next=o.next,o.next=n),t.interleaved=n,Ed(e,r)}function Ed(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var df=!1;function bB(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Cte(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function sd(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Uf(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Un&2){var o=r.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),r.pending=t,Ed(e,n)}return o=r.interleaved,o===null?(t.next=t,vB(r)):(t.next=o.next,o.next=t),r.interleaved=t,Ed(e,n)}function ZP(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,oB(e,n)}}function FW(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var o=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};i===null?o=i=a:i=i.next=a,n=n.next}while(n!==null);i===null?o=i=t:i=i.next=t}else o=i=t;n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:i,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function XT(e,t,n,r){var o=e.updateQueue;df=!1;var i=o.firstBaseUpdate,a=o.lastBaseUpdate,s=o.shared.pending;if(s!==null){o.shared.pending=null;var l=s,c=l.next;l.next=null,a===null?i=c:a.next=c,a=l;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==a&&(s===null?u.firstBaseUpdate=c:s.next=c,u.lastBaseUpdate=l))}if(i!==null){var d=o.baseState;a=0,u=c=l=null,s=i;do{var f=s.lane,p=s.eventTime;if((r&f)===f){u!==null&&(u=u.next={eventTime:p,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var h=e,m=s;switch(f=t,p=n,m.tag){case 1:if(h=m.payload,typeof h=="function"){d=h.call(p,d,f);break e}d=h;break e;case 3:h.flags=h.flags&-65537|128;case 0:if(h=m.payload,f=typeof h=="function"?h.call(p,d,f):h,f==null)break e;d=eo({},d,f);break e;case 2:df=!0}}s.callback!==null&&s.lane!==0&&(e.flags|=64,f=o.effects,f===null?o.effects=[s]:f.push(s))}else p={eventTime:p,lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(c=u=p,l=d):u=u.next=p,a|=f;if(s=s.next,s===null){if(s=o.shared.pending,s===null)break;f=s,s=f.next,f.next=null,o.lastBaseUpdate=f,o.shared.pending=null}}while(!0);if(u===null&&(l=d),o.baseState=l,o.firstBaseUpdate=c,o.lastBaseUpdate=u,t=o.shared.interleaved,t!==null){o=t;do a|=o.lane,o=o.next;while(o!==t)}else i===null&&(o.shared.lanes=0);gg|=a,e.lanes=a,e.memoizedState=d}}function jW(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=Y$.transition;Y$.transition={};try{e(!1),t()}finally{pr=n,Y$.transition=r}}function Bte(){return Al().memoizedState}function qTe(e,t,n){var r=Gf(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},zte(e))Vte(t,n);else if(n=Ste(e,t,n,r),n!==null){var o=aa();Sc(n,e,r,o),Hte(n,t,r)}}function KTe(e,t,n){var r=Gf(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(zte(e))Vte(t,o);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var a=t.lastRenderedState,s=i(a,n);if(o.hasEagerState=!0,o.eagerState=s,Ic(s,a)){var l=t.interleaved;l===null?(o.next=o,vB(t)):(o.next=l.next,l.next=o),t.interleaved=o;return}}catch{}finally{}n=Ste(e,t,o,r),n!==null&&(o=aa(),Sc(n,e,r,o),Hte(n,t,r))}}function zte(e){var t=e.alternate;return e===Zr||t!==null&&t===Zr}function Vte(e,t){sx=ZT=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Hte(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,oB(e,n)}}var eI={readContext:Ol,useCallback:Pi,useContext:Pi,useEffect:Pi,useImperativeHandle:Pi,useInsertionEffect:Pi,useLayoutEffect:Pi,useMemo:Pi,useReducer:Pi,useRef:Pi,useState:Pi,useDebugValue:Pi,useDeferredValue:Pi,useTransition:Pi,useMutableSource:Pi,useSyncExternalStore:Pi,useId:Pi,unstable_isNewReconciler:!1},YTe={readContext:Ol,useCallback:function(e,t){return Wc().memoizedState=[e,t===void 0?null:t],e},useContext:Ol,useEffect:zW,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,tT(4194308,4,_te.bind(null,t,e),n)},useLayoutEffect:function(e,t){return tT(4194308,4,e,t)},useInsertionEffect:function(e,t){return tT(4,2,e,t)},useMemo:function(e,t){var n=Wc();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Wc();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=qTe.bind(null,Zr,e),[r.memoizedState,e]},useRef:function(e){var t=Wc();return e={current:e},t.memoizedState=e},useState:BW,useDebugValue:IB,useDeferredValue:function(e){return Wc().memoizedState=e},useTransition:function(){var e=BW(!1),t=e[0];return e=GTe.bind(null,e[1]),Wc().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Zr,o=Wc();if(Wr){if(n===void 0)throw Error(lt(407));n=n()}else{if(n=t(),ti===null)throw Error(lt(349));hg&30||Ite(r,t,n)}o.memoizedState=n;var i={value:n,getSnapshot:t};return o.queue=i,zW(Ate.bind(null,r,i,e),[e]),r.flags|=2048,rS(9,Ote.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=Wc(),t=ti.identifierPrefix;if(Wr){var n=nd,r=td;n=(r&~(1<<32-xc(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=tS++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=a.createElement(n,{is:r.is}):(e=a.createElement(n),n==="select"&&(a=e,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):e=a.createElementNS(e,n),e[Zc]=t,e[qx]=r,Kte(e,t,!1,!1),t.stateNode=e;e:{switch(a=v2(n,r),n){case"dialog":_r("cancel",e),_r("close",e),o=r;break;case"iframe":case"object":case"embed":_r("load",e),o=r;break;case"video":case"audio":for(o=0;o<_w.length;o++)_r(_w[o],e);o=r;break;case"source":_r("error",e),o=r;break;case"img":case"image":case"link":_r("error",e),_r("load",e),o=r;break;case"details":_r("toggle",e),o=r;break;case"input":nW(e,r),o=f2(e,r),_r("invalid",e);break;case"option":o=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},o=eo({},r,{value:void 0}),_r("invalid",e);break;case"textarea":oW(e,r),o=g2(e,r),_r("invalid",e);break;default:o=r}y2(n,o),s=o;for(i in s)if(s.hasOwnProperty(i)){var l=s[i];i==="style"?Iee(e,l):i==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&Pee(e,l)):i==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&Fx(e,l):typeof l=="number"&&Fx(e,""+l):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(Lx.hasOwnProperty(i)?l!=null&&i==="onScroll"&&_r("scroll",e):l!=null&&qj(e,i,l,a))}switch(n){case"input":EE(e),rW(e,r,!1);break;case"textarea":EE(e),iW(e);break;case"option":r.value!=null&&e.setAttribute("value",""+rp(r.value));break;case"select":e.multiple=!!r.multiple,i=r.value,i!=null?Dy(e,!!r.multiple,i,!1):r.defaultValue!=null&&Dy(e,!!r.multiple,r.defaultValue,!0);break;default:typeof o.onClick=="function"&&(e.onclick=RT)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return Pi(t),null;case 6:if(e&&t.stateNode!=null)Qte(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(lt(166));if(n=Mh(Yx.current),Mh(au.current),$E(t)){if(r=t.stateNode,n=t.memoizedProps,r[Zc]=t,(i=r.nodeValue!==n)&&(e=hs,e!==null))switch(e.tag){case 3:RE(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&RE(r.nodeValue,n,(e.mode&1)!==0)}i&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Zc]=t,t.stateNode=r}return Pi(t),null;case 13:if(Br(Xr),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Wr&&cs!==null&&t.mode&1&&!(t.flags&128))hte(),yv(),t.flags|=98560,i=!1;else if(i=$E(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(lt(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(lt(317));i[Zc]=t}else yv(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Pi(t),i=!1}else uc!==null&&(J2(uc),uc=null),i=!0;if(!i)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||Xr.current&1?Bo===0&&(Bo=3):AB())),t.updateQueue!==null&&(t.flags|=4),Pi(t),null);case 4:return bv(),U2(e,t),e===null&&Wx(t.stateNode.containerInfo),Pi(t),null;case 10:return fB(t.type._context),Pi(t),null;case 17:return Oa(t.type)&&$T(),Pi(t),null;case 19:if(Br(Xr),i=t.memoizedState,i===null)return Pi(t),null;if(r=(t.flags&128)!==0,a=i.rendering,a===null)if(r)q0(i,!1);else{if(Bo!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(a=BT(e),a!==null){for(t.flags|=128,q0(i,!1),r=a.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)i=n,e=r,i.flags&=14680066,a=i.alternate,a===null?(i.childLanes=0,i.lanes=e,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=a.childLanes,i.lanes=a.lanes,i.child=a.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=a.memoizedProps,i.memoizedState=a.memoizedState,i.updateQueue=a.updateQueue,i.type=a.type,e=a.dependencies,i.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return kr(Xr,Xr.current&1|2),t.child}e=e.sibling}i.tail!==null&&vo()>xv&&(t.flags|=128,r=!0,q0(i,!1),t.lanes=4194304)}else{if(!r)if(e=BT(a),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),q0(i,!0),i.tail===null&&i.tailMode==="hidden"&&!a.alternate&&!Wr)return Pi(t),null}else 2*vo()-i.renderingStartTime>xv&&n!==1073741824&&(t.flags|=128,r=!0,q0(i,!1),t.lanes=4194304);i.isBackwards?(a.sibling=t.child,t.child=a):(n=i.last,n!==null?n.sibling=a:t.child=a,i.last=a)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=vo(),t.sibling=null,n=Xr.current,kr(Xr,r?n&1|2:n&1),t):(Pi(t),null);case 22:case 23:return OB(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?es&1073741824&&(Pi(t),t.subtreeFlags&6&&(t.flags|=8192)):Pi(t),null;case 24:return null;case 25:return null}throw Error(lt(156,t.tag))}function KTe(e,t){switch(lB(t),t.tag){case 1:return Oa(t.type)&&$T(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return bv(),Br(Ia),Br(Ni),yB(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return mB(t),null;case 13:if(Br(Xr),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(lt(340));yv()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Br(Xr),null;case 4:return bv(),null;case 10:return fB(t.type._context),null;case 22:case 23:return OB(),null;case 24:return null;default:return null}}var NE=!1,ki=!1,YTe=typeof WeakSet=="function"?WeakSet:Set,Mt=null;function hy(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){co(e,t,r)}else n.current=null}function W2(e,t,n){try{n()}catch(r){co(e,t,r)}}var KW=!1;function QTe(e,t){if(O2=AT,e=tte(),aB(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var o=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var a=0,s=-1,l=-1,c=0,u=0,d=e,f=null;t:for(;;){for(var p;d!==n||o!==0&&d.nodeType!==3||(s=a+o),d!==i||r!==0&&d.nodeType!==3||(l=a+r),d.nodeType===3&&(a+=d.nodeValue.length),(p=d.firstChild)!==null;)f=d,d=p;for(;;){if(d===e)break t;if(f===n&&++c===o&&(s=a),f===i&&++u===r&&(l=a),(p=d.nextSibling)!==null)break;d=f,f=d.parentNode}d=p}n=s===-1||l===-1?null:{start:s,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(A2={focusedElem:e,selectionRange:n},AT=!1,Mt=t;Mt!==null;)if(t=Mt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Mt=e;else for(;Mt!==null;){t=Mt;try{var h=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(h!==null){var m=h.memoizedProps,y=h.memoizedState,w=t.stateNode,x=w.getSnapshotBeforeUpdate(t.elementType===t.type?m:nc(t.type,m),y);w.__reactInternalSnapshotBeforeUpdate=x}break;case 3:var C=t.stateNode.containerInfo;C.nodeType===1?C.textContent="":C.nodeType===9&&C.documentElement&&C.removeChild(C.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(lt(163))}}catch(E){co(t,t.return,E)}if(e=t.sibling,e!==null){e.return=t.return,Mt=e;break}Mt=t.return}return h=KW,KW=!1,h}function rx(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var o=r=r.next;do{if((o.tag&e)===e){var i=o.destroy;o.destroy=void 0,i!==void 0&&W2(t,n,i)}o=o.next}while(o!==r)}}function WA(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function G2(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function Xte(e){var t=e.alternate;t!==null&&(e.alternate=null,Xte(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Zc],delete t[qx],delete t[R2],delete t[RTe],delete t[$Te])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Jte(e){return e.tag===5||e.tag===3||e.tag===4}function YW(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Jte(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function q2(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=RT));else if(r!==4&&(e=e.child,e!==null))for(q2(e,t,n),e=e.sibling;e!==null;)q2(e,t,n),e=e.sibling}function K2(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(K2(e,t,n),e=e.sibling;e!==null;)K2(e,t,n),e=e.sibling}var ui=null,ic=!1;function Xd(e,t,n){for(n=n.child;n!==null;)Zte(e,t,n),n=n.sibling}function Zte(e,t,n){if(iu&&typeof iu.onCommitFiberUnmount=="function")try{iu.onCommitFiberUnmount(LA,n)}catch{}switch(n.tag){case 5:ki||hy(n,t);case 6:var r=ui,o=ic;ui=null,Xd(e,t,n),ui=r,ic=o,ui!==null&&(ic?(e=ui,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):ui.removeChild(n.stateNode));break;case 18:ui!==null&&(ic?(e=ui,n=n.stateNode,e.nodeType===8?z$(e.parentNode,n):e.nodeType===1&&z$(e,n),Vx(e)):z$(ui,n.stateNode));break;case 4:r=ui,o=ic,ui=n.stateNode.containerInfo,ic=!0,Xd(e,t,n),ui=r,ic=o;break;case 0:case 11:case 14:case 15:if(!ki&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var i=o,a=i.destroy;i=i.tag,a!==void 0&&(i&2||i&4)&&W2(n,t,a),o=o.next}while(o!==r)}Xd(e,t,n);break;case 1:if(!ki&&(hy(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){co(n,t,s)}Xd(e,t,n);break;case 21:Xd(e,t,n);break;case 22:n.mode&1?(ki=(r=ki)||n.memoizedState!==null,Xd(e,t,n),ki=r):Xd(e,t,n);break;default:Xd(e,t,n)}}function QW(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new YTe),t.forEach(function(r){var o=iIe.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function Ql(e,t){var n=t.deletions;if(n!==null)for(var r=0;ro&&(o=a),r&=~i}if(r=o,r=vo()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*JTe(r/1960))-r,10e?16:e,Rf===null)var r=!1;else{if(e=Rf,Rf=null,WT=0,Un&6)throw Error(lt(331));var o=Un;for(Un|=4,Mt=e.current;Mt!==null;){var i=Mt,a=i.child;if(Mt.flags&16){var s=i.deletions;if(s!==null){for(var l=0;lvo()-TB?Kh(e,0):PB|=n),Aa(e,t)}function sne(e,t){t===0&&(e.mode&1?(t=IE,IE<<=1,!(IE&130023424)&&(IE=4194304)):t=1);var n=ia();e=Cd(e,t),e!==null&&(OC(e,t,n),Aa(e,n))}function oIe(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),sne(e,n)}function iIe(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;o!==null&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(lt(314))}r!==null&&r.delete(t),sne(e,n)}var lne;lne=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ia.current)Pa=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Pa=!1,GTe(e,t,n);Pa=!!(e.flags&131072)}else Pa=!1,Wr&&t.flags&1048576&&fte(t,NT,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;WP(e,t),e=t.pendingProps;var o=mv(t,Ni.current);Fy(t,n),o=bB(null,t,r,e,o,n);var i=wB();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Oa(r)?(i=!0,DT(t)):i=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,hB(t),o.updater=UA,t.stateNode=o,o._reactInternals=t,F2(t,r,e,n),t=z2(null,t,r,!0,i,n)):(t.tag=0,Wr&&i&&sB(t),Xi(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(WP(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=sIe(r),e=nc(r,e),o){case 0:t=B2(null,t,r,e,n);break e;case 1:t=WW(null,t,r,e,n);break e;case 11:t=HW(null,t,r,e,n);break e;case 14:t=UW(null,t,r,nc(r.type,e),n);break e}throw Error(lt(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:nc(r,o),B2(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:nc(r,o),WW(e,t,r,o,n);case 3:e:{if(Wte(t),e===null)throw Error(lt(387));r=t.pendingProps,i=t.memoizedState,o=i.element,vte(e,t),jT(t,r,null,n);var a=t.memoizedState;if(r=a.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){o=wv(Error(lt(423)),t),t=GW(e,t,r,n,o);break e}else if(r!==o){o=wv(Error(lt(424)),t),t=GW(e,t,r,n,o);break e}else for(cs=Vf(t.stateNode.containerInfo.firstChild),hs=t,Wr=!0,uc=null,n=mte(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(yv(),r===o){t=Ed(e,t,n);break e}Xi(e,t,r,n)}t=t.child}return t;case 5:return bte(t),e===null&&_2(t),r=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,a=o.children,k2(r,o)?a=null:i!==null&&k2(r,i)&&(t.flags|=32),Ute(e,t),Xi(e,t,a,n),t.child;case 6:return e===null&&_2(t),null;case 13:return Gte(e,t,n);case 4:return gB(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=vv(t,null,r,n):Xi(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:nc(r,o),HW(e,t,r,o,n);case 7:return Xi(e,t,t.pendingProps,n),t.child;case 8:return Xi(e,t,t.pendingProps.children,n),t.child;case 12:return Xi(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,i=t.memoizedProps,a=o.value,kr(LT,r._currentValue),r._currentValue=a,i!==null)if(Tc(i.value,a)){if(i.children===o.children&&!Ia.current){t=Ed(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var s=i.dependencies;if(s!==null){a=i.child;for(var l=s.firstContext;l!==null;){if(l.context===r){if(i.tag===1){l=ad(-1,n&-n),l.tag=2;var c=i.updateQueue;if(c!==null){c=c.shared;var u=c.pending;u===null?l.next=l:(l.next=u.next,u.next=l),c.pending=l}}i.lanes|=n,l=i.alternate,l!==null&&(l.lanes|=n),N2(i.return,n,t),s.lanes|=n;break}l=l.next}}else if(i.tag===10)a=i.type===t.type?null:i.child;else if(i.tag===18){if(a=i.return,a===null)throw Error(lt(341));a.lanes|=n,s=a.alternate,s!==null&&(s.lanes|=n),N2(a,n,t),a=i.sibling}else a=i.child;if(a!==null)a.return=i;else for(a=i;a!==null;){if(a===t){a=null;break}if(i=a.sibling,i!==null){i.return=a.return,a=i;break}a=a.return}i=a}Xi(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,Fy(t,n),o=Pl(o),r=r(o),t.flags|=1,Xi(e,t,r,n),t.child;case 14:return r=t.type,o=nc(r,t.pendingProps),o=nc(r.type,o),UW(e,t,r,o,n);case 15:return Vte(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:nc(r,o),WP(e,t),t.tag=1,Oa(r)?(e=!0,DT(t)):e=!1,Fy(t,n),jte(t,r,o),F2(t,r,o,n),z2(null,t,r,!0,e,n);case 19:return qte(e,t,n);case 22:return Hte(e,t,n)}throw Error(lt(156,t.tag))};function cne(e,t){return Nee(e,t)}function aIe(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function dl(e,t,n,r){return new aIe(e,t,n,r)}function kB(e){return e=e.prototype,!(!e||!e.isReactComponent)}function sIe(e){if(typeof e=="function")return kB(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Yj)return 11;if(e===Qj)return 14}return 2}function Gf(e,t){var n=e.alternate;return n===null?(n=dl(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function KP(e,t,n,r,o,i){var a=2;if(r=e,typeof e=="function")kB(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case iy:return Yh(n.children,o,i,t);case Kj:a=8,o|=8;break;case l2:return e=dl(12,n,t,o|2),e.elementType=l2,e.lanes=i,e;case c2:return e=dl(13,n,t,o),e.elementType=c2,e.lanes=i,e;case u2:return e=dl(19,n,t,o),e.elementType=u2,e.lanes=i,e;case bee:return qA(n,o,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case yee:a=10;break e;case vee:a=9;break e;case Yj:a=11;break e;case Qj:a=14;break e;case cf:a=16,r=null;break e}throw Error(lt(130,e==null?e:typeof e,""))}return t=dl(a,n,t,o),t.elementType=e,t.type=r,t.lanes=i,t}function Yh(e,t,n,r){return e=dl(7,e,r,t),e.lanes=n,e}function qA(e,t,n,r){return e=dl(22,e,r,t),e.elementType=bee,e.lanes=n,e.stateNode={isHidden:!1},e}function Y$(e,t,n){return e=dl(6,e,null,t),e.lanes=n,e}function Q$(e,t,n){return t=dl(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function lIe(e,t,n,r,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=k$(0),this.expirationTimes=k$(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=k$(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function MB(e,t,n,r,o,i,a,s,l){return e=new lIe(e,t,n,s,l),t===1?(t=1,i===!0&&(t|=8)):t=0,i=dl(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},hB(i),e}function cIe(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(pne)}catch(e){console.error(e)}}pne(),pee.exports=Os;var Eb=pee.exports;const Nw=Bn(Eb),o6={disabled:!1},KT=Y.createContext(null);var hne=function(t){return t.scrollTop},Lw="unmounted",wh="exited",xh="entering",Ym="entered",Z2="exiting",ks=function(e){IC(t,e);function t(r,o){var i;i=e.call(this,r,o)||this;var a=o,s=a&&!a.isMounting?r.enter:r.appear,l;return i.appearStatus=null,r.in?s?(l=wh,i.appearStatus=xh):l=Ym:r.unmountOnExit||r.mountOnEnter?l=Lw:l=wh,i.state={status:l},i.nextCallback=null,i}t.getDerivedStateFromProps=function(o,i){var a=o.in;return a&&i.status===Lw?{status:wh}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(o){var i=null;if(o!==this.props){var a=this.state.status;this.props.in?a!==xh&&a!==Ym&&(i=xh):(a===xh||a===Ym)&&(i=Z2)}this.updateStatus(!1,i)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var o=this.props.timeout,i,a,s;return i=a=s=o,o!=null&&typeof o!="number"&&(i=o.exit,a=o.enter,s=o.appear!==void 0?o.appear:a),{exit:i,enter:a,appear:s}},n.updateStatus=function(o,i){if(o===void 0&&(o=!1),i!==null)if(this.cancelNextCallback(),i===xh){if(this.props.unmountOnExit||this.props.mountOnEnter){var a=this.props.nodeRef?this.props.nodeRef.current:Nw.findDOMNode(this);a&&hne(a)}this.performEnter(o)}else this.performExit();else this.props.unmountOnExit&&this.state.status===wh&&this.setState({status:Lw})},n.performEnter=function(o){var i=this,a=this.props.enter,s=this.context?this.context.isMounting:o,l=this.props.nodeRef?[s]:[Nw.findDOMNode(this),s],c=l[0],u=l[1],d=this.getTimeouts(),f=s?d.appear:d.enter;if(!o&&!a||o6.disabled){this.safeSetState({status:Ym},function(){i.props.onEntered(c)});return}this.props.onEnter(c,u),this.safeSetState({status:xh},function(){i.props.onEntering(c,u),i.onTransitionEnd(f,function(){i.safeSetState({status:Ym},function(){i.props.onEntered(c,u)})})})},n.performExit=function(){var o=this,i=this.props.exit,a=this.getTimeouts(),s=this.props.nodeRef?void 0:Nw.findDOMNode(this);if(!i||o6.disabled){this.safeSetState({status:wh},function(){o.props.onExited(s)});return}this.props.onExit(s),this.safeSetState({status:Z2},function(){o.props.onExiting(s),o.onTransitionEnd(a.exit,function(){o.safeSetState({status:wh},function(){o.props.onExited(s)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(o,i){i=this.setNextCallback(i),this.setState(o,i)},n.setNextCallback=function(o){var i=this,a=!0;return this.nextCallback=function(s){a&&(a=!1,i.nextCallback=null,o(s))},this.nextCallback.cancel=function(){a=!1},this.nextCallback},n.onTransitionEnd=function(o,i){this.setNextCallback(i);var a=this.props.nodeRef?this.props.nodeRef.current:Nw.findDOMNode(this),s=o==null&&!this.props.addEndListener;if(!a||s){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var l=this.props.nodeRef?[this.nextCallback]:[a,this.nextCallback],c=l[0],u=l[1];this.props.addEndListener(c,u)}o!=null&&setTimeout(this.nextCallback,o)},n.render=function(){var o=this.state.status;if(o===Lw)return null;var i=this.props,a=i.children;i.in,i.mountOnEnter,i.unmountOnExit,i.appear,i.enter,i.exit,i.timeout,i.addEndListener,i.onEnter,i.onEntering,i.onEntered,i.onExit,i.onExiting,i.onExited,i.nodeRef;var s=NA(i,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return Y.createElement(KT.Provider,{value:null},typeof a=="function"?a(o,s):Y.cloneElement(Y.Children.only(a),s))},t}(Y.Component);ks.contextType=KT;ks.propTypes={};function Im(){}ks.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Im,onEntering:Im,onEntered:Im,onExit:Im,onExiting:Im,onExited:Im};ks.UNMOUNTED=Lw;ks.EXITED=wh;ks.ENTERING=xh;ks.ENTERED=Ym;ks.EXITING=Z2;var hIe=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return lPe(t,r)})},X$=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return cPe(t,r)})},_B=function(e){IC(t,e);function t(){for(var r,o=arguments.length,i=new Array(o),a=0;ae.scrollTop;function ip(e,t){const{timeout:n,easing:r,style:o={}}=e;return{duration:o.transitionDuration??(typeof n=="number"?n:n[t.mode]||0),easing:o.transitionTimingFunction??(typeof r=="object"?r[t.mode]:r),delay:o.transitionDelay}}function wIe(e){return nt("MuiCollapse",e)}it("MuiCollapse",["root","horizontal","vertical","entered","hidden","wrapper","wrapperInner"]);const xIe=e=>{const{orientation:t,classes:n}=e,r={root:["root",`${t}`],entered:["entered"],hidden:["hidden"],wrapper:["wrapper",`${t}`],wrapperInner:["wrapperInner",`${t}`]};return rt(r,wIe,n)},SIe=oe("div",{name:"MuiCollapse",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.orientation],n.state==="entered"&&t.entered,n.state==="exited"&&!n.in&&n.collapsedSize==="0px"&&t.hidden]}})(Je(({theme:e})=>({height:0,overflow:"hidden",transition:e.transitions.create("height"),variants:[{props:{orientation:"horizontal"},style:{height:"auto",width:0,transition:e.transitions.create("width")}},{props:{state:"entered"},style:{height:"auto",overflow:"visible"}},{props:{state:"entered",orientation:"horizontal"},style:{width:"auto"}},{props:({ownerState:t})=>t.state==="exited"&&!t.in&&t.collapsedSize==="0px",style:{visibility:"hidden"}}]}))),CIe=oe("div",{name:"MuiCollapse",slot:"Wrapper",overridesResolver:(e,t)=>t.wrapper})({display:"flex",width:"100%",variants:[{props:{orientation:"horizontal"},style:{width:"auto",height:"100%"}}]}),EIe=oe("div",{name:"MuiCollapse",slot:"WrapperInner",overridesResolver:(e,t)=>t.wrapperInner})({width:"100%",variants:[{props:{orientation:"horizontal"},style:{width:"auto",height:"100%"}}]}),vl=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiCollapse"}),{addEndListener:o,children:i,className:a,collapsedSize:s="0px",component:l,easing:c,in:u,onEnter:d,onEntered:f,onEntering:p,onExit:h,onExited:m,onExiting:y,orientation:w="vertical",style:x,timeout:C=KZ.standard,TransitionComponent:E=ks,...P}=r,T={...r,orientation:w,collapsedSize:s},I=xIe(T),A=Ro(),k=kf(),O=v.useRef(null),$=v.useRef(),N=typeof s=="number"?`${s}px`:s,L=w==="horizontal",j=L?"width":"height",D=v.useRef(null),_=Rr(n,D),z=te=>pe=>{if(te){const ae=D.current;pe===void 0?te(ae):te(ae,pe)}},F=()=>O.current?O.current[L?"clientWidth":"clientHeight"]:0,V=z((te,pe)=>{O.current&&L&&(O.current.style.position="absolute"),te.style[j]=N,d&&d(te,pe)}),U=z((te,pe)=>{const ae=F();O.current&&L&&(O.current.style.position="");const{duration:se,easing:re}=ip({style:x,timeout:C,easing:c},{mode:"enter"});if(C==="auto"){const fe=A.transitions.getAutoHeightDuration(ae);te.style.transitionDuration=`${fe}ms`,$.current=fe}else te.style.transitionDuration=typeof se=="string"?se:`${se}ms`;te.style[j]=`${ae}px`,te.style.transitionTimingFunction=re,p&&p(te,pe)}),q=z((te,pe)=>{te.style[j]="auto",f&&f(te,pe)}),X=z(te=>{te.style[j]=`${F()}px`,h&&h(te)}),ie=z(m),ee=z(te=>{const pe=F(),{duration:ae,easing:se}=ip({style:x,timeout:C,easing:c},{mode:"exit"});if(C==="auto"){const re=A.transitions.getAutoHeightDuration(pe);te.style.transitionDuration=`${re}ms`,$.current=re}else te.style.transitionDuration=typeof ae=="string"?ae:`${ae}ms`;te.style[j]=N,te.style.transitionTimingFunction=se,y&&y(te)}),Q=te=>{C==="auto"&&k.start($.current||0,te),o&&o(D.current,te)};return R.jsx(E,{in:u,onEnter:V,onEntered:q,onEntering:U,onExit:X,onExited:ie,onExiting:ee,addEndListener:Q,nodeRef:D,timeout:C==="auto"?null:C,...P,children:(te,pe)=>R.jsx(SIe,{as:l,className:de(I.root,a,{entered:I.entered,exited:!u&&N==="0px"&&I.hidden}[te]),style:{[L?"minWidth":"minHeight"]:N,...x},ref:_,...pe,ownerState:{...T,state:te},children:R.jsx(CIe,{ownerState:{...T,state:te},className:I.wrapper,ref:O,children:R.jsx(EIe,{ownerState:{...T,state:te},className:I.wrapperInner,children:i})})})})});vl&&(vl.muiSupportAuto=!0);function PIe(e){return nt("MuiPaper",e)}it("MuiPaper",["root","rounded","outlined","elevation","elevation0","elevation1","elevation2","elevation3","elevation4","elevation5","elevation6","elevation7","elevation8","elevation9","elevation10","elevation11","elevation12","elevation13","elevation14","elevation15","elevation16","elevation17","elevation18","elevation19","elevation20","elevation21","elevation22","elevation23","elevation24"]);const TIe=e=>{const{square:t,elevation:n,variant:r,classes:o}=e,i={root:["root",r,!t&&"rounded",r==="elevation"&&`elevation${n}`]};return rt(i,PIe,o)},IIe=oe("div",{name:"MuiPaper",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],!n.square&&t.rounded,n.variant==="elevation"&&t[`elevation${n.elevation}`]]}})(Je(({theme:e})=>({backgroundColor:(e.vars||e).palette.background.paper,color:(e.vars||e).palette.text.primary,transition:e.transitions.create("box-shadow"),variants:[{props:({ownerState:t})=>!t.square,style:{borderRadius:e.shape.borderRadius}},{props:{variant:"outlined"},style:{border:`1px solid ${(e.vars||e).palette.divider}`}},{props:{variant:"elevation"},style:{boxShadow:"var(--Paper-shadow)",backgroundImage:"var(--Paper-overlay)"}}]}))),to=v.forwardRef(function(t,n){var p;const r=at({props:t,name:"MuiPaper"}),o=Ro(),{className:i,component:a="div",elevation:s=1,square:l=!1,variant:c="elevation",...u}=r,d={...r,component:a,elevation:s,square:l,variant:c},f=TIe(d);return R.jsx(IIe,{as:a,ownerState:d,className:de(f.root,i),ref:n,...u,style:{...c==="elevation"&&{"--Paper-shadow":(o.vars||o).shadows[s],...o.vars&&{"--Paper-overlay":(p=o.vars.overlays)==null?void 0:p[s]},...!o.vars&&o.palette.mode==="dark"&&{"--Paper-overlay":`linear-gradient(${xt("#fff",G_(s))}, ${xt("#fff",G_(s))})`}},...u.style}})}),gne=v.createContext({});function Cr(e,t){const{className:n,elementType:r,ownerState:o,externalForwardedProps:i,getSlotOwnerState:a,internalForwardedProps:s,...l}=t,{component:c,slots:u={[e]:void 0},slotProps:d={[e]:void 0},...f}=i,p=u[e]||r,h=FZ(d[e],o),{props:{component:m,...y},internalRef:w}=LZ({className:n,...l,externalForwardedProps:e==="root"?f:void 0,externalSlotProps:h}),x=Rr(w,h==null?void 0:h.ref,t.ref),C=a?a(y):{},E={...o,...C},P=e==="root"?m||c:m,T=ry(p,{...e==="root"&&!c&&!u[e]&&s,...e!=="root"&&!u[e]&&s,...y,...P&&{as:P},ref:x},E);return Object.keys(C).forEach(I=>{delete T[I]}),[p,T]}function OIe(e){return nt("MuiAccordion",e)}const jE=it("MuiAccordion",["root","heading","rounded","expanded","disabled","gutters","region"]),AIe=e=>{const{classes:t,square:n,expanded:r,disabled:o,disableGutters:i}=e;return rt({root:["root",!n&&"rounded",r&&"expanded",o&&"disabled",!i&&"gutters"],heading:["heading"],region:["region"]},OIe,t)},kIe=oe(to,{name:"MuiAccordion",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${jE.region}`]:t.region},t.root,!n.square&&t.rounded,!n.disableGutters&&t.gutters]}})(Je(({theme:e})=>{const t={duration:e.transitions.duration.shortest};return{position:"relative",transition:e.transitions.create(["margin"],t),overflowAnchor:"none","&::before":{position:"absolute",left:0,top:-1,right:0,height:1,content:'""',opacity:1,backgroundColor:(e.vars||e).palette.divider,transition:e.transitions.create(["opacity","background-color"],t)},"&:first-of-type":{"&::before":{display:"none"}},[`&.${jE.expanded}`]:{"&::before":{opacity:0},"&:first-of-type":{marginTop:0},"&:last-of-type":{marginBottom:0},"& + &":{"&::before":{display:"none"}}},[`&.${jE.disabled}`]:{backgroundColor:(e.vars||e).palette.action.disabledBackground}}}),Je(({theme:e})=>({variants:[{props:t=>!t.square,style:{borderRadius:0,"&:first-of-type":{borderTopLeftRadius:(e.vars||e).shape.borderRadius,borderTopRightRadius:(e.vars||e).shape.borderRadius},"&:last-of-type":{borderBottomLeftRadius:(e.vars||e).shape.borderRadius,borderBottomRightRadius:(e.vars||e).shape.borderRadius,"@supports (-ms-ime-align: auto)":{borderBottomLeftRadius:0,borderBottomRightRadius:0}}}},{props:t=>!t.disableGutters,style:{[`&.${jE.expanded}`]:{margin:"16px 0"}}}]}))),MIe=oe("h3",{name:"MuiAccordion",slot:"Heading",overridesResolver:(e,t)=>t.heading})({all:"unset"}),FB=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiAccordion"}),{children:o,className:i,defaultExpanded:a=!1,disabled:s=!1,disableGutters:l=!1,expanded:c,onChange:u,square:d=!1,slots:f={},slotProps:p={},TransitionComponent:h,TransitionProps:m,...y}=r,[w,x]=id({controlled:c,default:a,name:"Accordion",state:"expanded"}),C=v.useCallback(_=>{x(!w),u&&u(_,!w)},[w,u,x]),[E,...P]=v.Children.toArray(o),T=v.useMemo(()=>({expanded:w,disabled:s,disableGutters:l,toggle:C}),[w,s,l,C]),I={...r,square:d,disabled:s,disableGutters:l,expanded:w},A=AIe(I),k={transition:h,...f},O={transition:m,...p},$={slots:k,slotProps:O},[N,L]=Cr("heading",{elementType:MIe,externalForwardedProps:$,className:A.heading,ownerState:I}),[j,D]=Cr("transition",{elementType:vl,externalForwardedProps:$,ownerState:I});return R.jsxs(kIe,{className:de(A.root,i),ref:n,ownerState:I,square:d,...y,children:[R.jsx(N,{...L,children:R.jsx(gne.Provider,{value:T,children:E})}),R.jsx(j,{in:w,timeout:"auto",...D,children:R.jsx("div",{"aria-labelledby":E.props.id,id:E.props["aria-controls"],role:"region",className:A.region,children:P})})]})});function RIe(e){return nt("MuiAccordionDetails",e)}it("MuiAccordionDetails",["root"]);const $Ie=e=>{const{classes:t}=e;return rt({root:["root"]},RIe,t)},DIe=oe("div",{name:"MuiAccordionDetails",slot:"Root",overridesResolver:(e,t)=>t.root})(Je(({theme:e})=>({padding:e.spacing(1,2,2)}))),jB=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiAccordionDetails"}),{className:o,...i}=r,a=r,s=$Ie(a);return R.jsx(DIe,{className:de(s.root,o),ref:n,ownerState:a,...i})});class YT{constructor(){Tt(this,"mountEffect",()=>{this.shouldMount&&!this.didMount&&this.ref.current!==null&&(this.didMount=!0,this.mounted.resolve())});this.ref={current:null},this.mounted=null,this.didMount=!1,this.shouldMount=!1,this.setShouldMount=null}static create(){return new YT}static use(){const t=RZ(YT.create).current,[n,r]=v.useState(!1);return t.shouldMount=n,t.setShouldMount=r,v.useEffect(t.mountEffect,[n]),t}mount(){return this.mounted||(this.mounted=NIe(),this.shouldMount=!0,this.setShouldMount(this.shouldMount)),this.mounted}start(...t){this.mount().then(()=>{var n;return(n=this.ref.current)==null?void 0:n.start(...t)})}stop(...t){this.mount().then(()=>{var n;return(n=this.ref.current)==null?void 0:n.stop(...t)})}pulsate(...t){this.mount().then(()=>{var n;return(n=this.ref.current)==null?void 0:n.pulsate(...t)})}}function _Ie(){return YT.use()}function NIe(){let e,t;const n=new Promise((r,o)=>{e=r,t=o});return n.resolve=e,n.reject=t,n}function LIe(e){const{className:t,classes:n,pulsate:r=!1,rippleX:o,rippleY:i,rippleSize:a,in:s,onExited:l,timeout:c}=e,[u,d]=v.useState(!1),f=de(t,n.ripple,n.rippleVisible,r&&n.ripplePulsate),p={width:a,height:a,top:-(a/2)+i,left:-(a/2)+o},h=de(n.child,u&&n.childLeaving,r&&n.childPulsate);return!s&&!u&&d(!0),v.useEffect(()=>{if(!s&&l!=null){const m=setTimeout(l,c);return()=>{clearTimeout(m)}}},[l,s,c]),R.jsx("span",{className:f,style:p,children:R.jsx("span",{className:h})})}const il=it("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),tN=550,FIe=80,jIe=xu` +`+i.stack}return{value:e,source:t,stack:o,digest:null}}function J$(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function W2(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var JTe=typeof WeakMap=="function"?WeakMap:Map;function Wte(e,t,n){n=sd(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){nI||(nI=!0,tN=r),W2(e,t)},n}function Gte(e,t,n){n=sd(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var o=t.value;n.payload=function(){return r(o)},n.callback=function(){W2(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){W2(e,t),typeof r!="function"&&(Wf===null?Wf=new Set([this]):Wf.add(this));var a=t.stack;this.componentDidCatch(t.value,{componentStack:a!==null?a:""})}),n}function UW(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new JTe;var o=new Set;r.set(t,o)}else o=r.get(t),o===void 0&&(o=new Set,r.set(t,o));o.has(n)||(o.add(n),e=fIe.bind(null,e,t,n),t.then(e,e))}function WW(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function GW(e,t,n,r,o){return e.mode&1?(e.flags|=65536,e.lanes=o,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=sd(-1,1),t.tag=2,Uf(n,t,1))),n.lanes|=1),e)}var ZTe=Md.ReactCurrentOwner,Ta=!1;function Xi(e,t,n,r){t.child=e===null?xte(t,null,n,r):bv(t,e.child,n,r)}function qW(e,t,n,r,o){n=n.render;var i=t.ref;return jy(t,o),r=EB(e,t,n,r,i,o),n=PB(),e!==null&&!Ta?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Pd(e,t,o)):(Wr&&n&&fB(t),t.flags|=1,Xi(e,t,r,o),t.child)}function KW(e,t,n,r,o){if(e===null){var i=n.type;return typeof i=="function"&&!_B(i)&&i.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=i,qte(e,t,i,r,o)):(e=iT(n.type,null,r,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!(e.lanes&o)){var a=i.memoizedProps;if(n=n.compare,n=n!==null?n:Yx,n(a,r)&&e.ref===t.ref)return Pd(e,t,o)}return t.flags|=1,e=qf(i,r),e.ref=t.ref,e.return=t,t.child=e}function qte(e,t,n,r,o){if(e!==null){var i=e.memoizedProps;if(Yx(i,r)&&e.ref===t.ref)if(Ta=!1,t.pendingProps=r=i,(e.lanes&o)!==0)e.flags&131072&&(Ta=!0);else return t.lanes=e.lanes,Pd(e,t,o)}return G2(e,t,n,r,o)}function Kte(e,t,n){var r=t.pendingProps,o=r.children,i=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},kr(my,ns),ns|=n;else{if(!(n&1073741824))return e=i!==null?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,kr(my,ns),ns|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=i!==null?i.baseLanes:n,kr(my,ns),ns|=r}else i!==null?(r=i.baseLanes|n,t.memoizedState=null):r=n,kr(my,ns),ns|=r;return Xi(e,t,o,n),t.child}function Yte(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function G2(e,t,n,r,o){var i=Aa(n)?fg:Ni.current;return i=yv(t,i),jy(t,o),n=EB(e,t,n,r,i,o),r=PB(),e!==null&&!Ta?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Pd(e,t,o)):(Wr&&r&&fB(t),t.flags|=1,Xi(e,t,n,o),t.child)}function YW(e,t,n,r,o){if(Aa(n)){var i=!0;GT(t)}else i=!1;if(jy(t,o),t.stateNode===null)nT(e,t),Ute(t,n,r),U2(t,n,r,o),r=!0;else if(e===null){var a=t.stateNode,s=t.memoizedProps;a.props=s;var l=a.context,c=n.contextType;typeof c=="object"&&c!==null?c=Ol(c):(c=Aa(n)?fg:Ni.current,c=yv(t,c));var u=n.getDerivedStateFromProps,d=typeof u=="function"||typeof a.getSnapshotBeforeUpdate=="function";d||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(s!==r||l!==c)&&HW(t,a,r,c),df=!1;var f=t.memoizedState;a.state=f,XT(t,r,a,o),l=t.memoizedState,s!==r||f!==l||Oa.current||df?(typeof u=="function"&&(H2(t,n,u,r),l=t.memoizedState),(s=df||VW(t,n,s,r,f,l,c))?(d||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount=="function"&&(t.flags|=4194308)):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=c,r=s):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,Cte(e,t),s=t.memoizedProps,c=t.type===t.elementType?s:oc(t.type,s),a.props=c,d=t.pendingProps,f=a.context,l=n.contextType,typeof l=="object"&&l!==null?l=Ol(l):(l=Aa(n)?fg:Ni.current,l=yv(t,l));var p=n.getDerivedStateFromProps;(u=typeof p=="function"||typeof a.getSnapshotBeforeUpdate=="function")||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(s!==d||f!==l)&&HW(t,a,r,l),df=!1,f=t.memoizedState,a.state=f,XT(t,r,a,o);var h=t.memoizedState;s!==d||f!==h||Oa.current||df?(typeof p=="function"&&(H2(t,n,p,r),h=t.memoizedState),(c=df||VW(t,n,c,r,f,h,l)||!1)?(u||typeof a.UNSAFE_componentWillUpdate!="function"&&typeof a.componentWillUpdate!="function"||(typeof a.componentWillUpdate=="function"&&a.componentWillUpdate(r,h,l),typeof a.UNSAFE_componentWillUpdate=="function"&&a.UNSAFE_componentWillUpdate(r,h,l)),typeof a.componentDidUpdate=="function"&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof a.componentDidUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=h),a.props=r,a.state=h,a.context=l,r=c):(typeof a.componentDidUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return q2(e,t,n,r,i,o)}function q2(e,t,n,r,o,i){Yte(e,t);var a=(t.flags&128)!==0;if(!r&&!a)return o&&DW(t,n,!1),Pd(e,t,i);r=t.stateNode,ZTe.current=t;var s=a&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&a?(t.child=bv(t,e.child,null,i),t.child=bv(t,null,s,i)):Xi(e,t,s,i),t.memoizedState=r.state,o&&DW(t,n,!0),t.child}function Qte(e){var t=e.stateNode;t.pendingContext?$W(e,t.pendingContext,t.pendingContext!==t.context):t.context&&$W(e,t.context,!1),wB(e,t.containerInfo)}function QW(e,t,n,r,o){return vv(),hB(o),t.flags|=256,Xi(e,t,n,r),t.child}var K2={dehydrated:null,treeContext:null,retryLane:0};function Y2(e){return{baseLanes:e,cachePool:null,transitions:null}}function Xte(e,t,n){var r=t.pendingProps,o=Xr.current,i=!1,a=(t.flags&128)!==0,s;if((s=a)||(s=e!==null&&e.memoizedState===null?!1:(o&2)!==0),s?(i=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(o|=1),kr(Xr,o&1),e===null)return z2(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(a=r.children,e=r.fallback,i?(r=t.mode,i=t.child,a={mode:"hidden",children:a},!(r&1)&&i!==null?(i.childLanes=0,i.pendingProps=a):i=ok(a,r,0,null),e=Xh(e,r,n,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=Y2(n),t.memoizedState=K2,e):OB(t,a));if(o=e.memoizedState,o!==null&&(s=o.dehydrated,s!==null))return eIe(e,t,a,r,s,o,n);if(i){i=r.fallback,a=t.mode,o=e.child,s=o.sibling;var l={mode:"hidden",children:r.children};return!(a&1)&&t.child!==o?(r=t.child,r.childLanes=0,r.pendingProps=l,t.deletions=null):(r=qf(o,l),r.subtreeFlags=o.subtreeFlags&14680064),s!==null?i=qf(s,i):(i=Xh(i,a,n,null),i.flags|=2),i.return=t,r.return=t,r.sibling=i,t.child=r,r=i,i=t.child,a=e.child.memoizedState,a=a===null?Y2(n):{baseLanes:a.baseLanes|n,cachePool:null,transitions:a.transitions},i.memoizedState=a,i.childLanes=e.childLanes&~n,t.memoizedState=K2,r}return i=e.child,e=i.sibling,r=qf(i,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function OB(e,t){return t=ok({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function GE(e,t,n,r){return r!==null&&hB(r),bv(t,e.child,null,n),e=OB(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function eIe(e,t,n,r,o,i,a){if(n)return t.flags&256?(t.flags&=-257,r=J$(Error(lt(422))),GE(e,t,a,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=r.fallback,o=t.mode,r=ok({mode:"visible",children:r.children},o,0,null),i=Xh(i,o,a,null),i.flags|=2,r.return=t,i.return=t,r.sibling=i,t.child=r,t.mode&1&&bv(t,e.child,null,a),t.child.memoizedState=Y2(a),t.memoizedState=K2,i);if(!(t.mode&1))return GE(e,t,a,null);if(o.data==="$!"){if(r=o.nextSibling&&o.nextSibling.dataset,r)var s=r.dgst;return r=s,i=Error(lt(419)),r=J$(i,r,void 0),GE(e,t,a,r)}if(s=(a&e.childLanes)!==0,Ta||s){if(r=ti,r!==null){switch(a&-a){case 4:o=2;break;case 16:o=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:o=32;break;case 536870912:o=268435456;break;default:o=0}o=o&(r.suspendedLanes|a)?0:o,o!==0&&o!==i.retryLane&&(i.retryLane=o,Ed(e,o),Sc(r,e,o,-1))}return DB(),r=J$(Error(lt(421))),GE(e,t,a,r)}return o.data==="$?"?(t.flags|=128,t.child=e.child,t=pIe.bind(null,e),o._reactRetry=t,null):(e=i.treeContext,ds=Hf(o.nextSibling),ms=t,Wr=!0,fc=null,e!==null&&(ul[dl++]=td,ul[dl++]=nd,ul[dl++]=pg,td=e.id,nd=e.overflow,pg=t),t=OB(t,r.children),t.flags|=4096,t)}function XW(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),V2(e.return,t,n)}function Z$(e,t,n,r,o){var i=e.memoizedState;i===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:o}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=r,i.tail=n,i.tailMode=o)}function Jte(e,t,n){var r=t.pendingProps,o=r.revealOrder,i=r.tail;if(Xi(e,t,r.children,n),r=Xr.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&XW(e,n,t);else if(e.tag===19)XW(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(kr(Xr,r),!(t.mode&1))t.memoizedState=null;else switch(o){case"forwards":for(n=t.child,o=null;n!==null;)e=n.alternate,e!==null&&JT(e)===null&&(o=n),n=n.sibling;n=o,n===null?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),Z$(t,!1,o,n,i);break;case"backwards":for(n=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&JT(e)===null){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}Z$(t,!0,n,null,i);break;case"together":Z$(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function nT(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Pd(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),gg|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(lt(153));if(t.child!==null){for(e=t.child,n=qf(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=qf(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function tIe(e,t,n){switch(t.tag){case 3:Qte(t),vv();break;case 5:Ete(t);break;case 1:Aa(t.type)&>(t);break;case 4:wB(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,o=t.memoizedProps.value;kr(YT,r._currentValue),r._currentValue=o;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(kr(Xr,Xr.current&1),t.flags|=128,null):n&t.child.childLanes?Xte(e,t,n):(kr(Xr,Xr.current&1),e=Pd(e,t,n),e!==null?e.sibling:null);kr(Xr,Xr.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return Jte(e,t,n);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),kr(Xr,Xr.current),r)break;return null;case 22:case 23:return t.lanes=0,Kte(e,t,n)}return Pd(e,t,n)}var Zte,Q2,ene,tne;Zte=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};Q2=function(){};ene=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,Rh(lu.current);var i=null;switch(n){case"input":o=v2(e,o),r=v2(e,r),i=[];break;case"select":o=eo({},o,{value:void 0}),r=eo({},r,{value:void 0}),i=[];break;case"textarea":o=x2(e,o),r=x2(e,r),i=[];break;default:typeof o.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=UT)}C2(n,r);var a;n=null;for(c in o)if(!r.hasOwnProperty(c)&&o.hasOwnProperty(c)&&o[c]!=null)if(c==="style"){var s=o[c];for(a in s)s.hasOwnProperty(a)&&(n||(n={}),n[a]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(Vx.hasOwnProperty(c)?i||(i=[]):(i=i||[]).push(c,null));for(c in r){var l=r[c];if(s=o!=null?o[c]:void 0,r.hasOwnProperty(c)&&l!==s&&(l!=null||s!=null))if(c==="style")if(s){for(a in s)!s.hasOwnProperty(a)||l&&l.hasOwnProperty(a)||(n||(n={}),n[a]="");for(a in l)l.hasOwnProperty(a)&&s[a]!==l[a]&&(n||(n={}),n[a]=l[a])}else n||(i||(i=[]),i.push(c,n)),n=l;else c==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,s=s?s.__html:void 0,l!=null&&s!==l&&(i=i||[]).push(c,l)):c==="children"?typeof l!="string"&&typeof l!="number"||(i=i||[]).push(c,""+l):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(Vx.hasOwnProperty(c)?(l!=null&&c==="onScroll"&&_r("scroll",e),i||s===l||(i=[])):(i=i||[]).push(c,l))}n&&(i=i||[]).push("style",n);var c=i;(t.updateQueue=c)&&(t.flags|=4)}};tne=function(e,t,n,r){n!==r&&(t.flags|=4)};function X0(e,t){if(!Wr)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Ti(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags&14680064,r|=o.flags&14680064,o.return=e,o=o.sibling;else for(o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags,r|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function nIe(e,t,n){var r=t.pendingProps;switch(pB(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ti(t),null;case 1:return Aa(t.type)&&WT(),Ti(t),null;case 3:return r=t.stateNode,wv(),Br(Oa),Br(Ni),SB(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(UE(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,fc!==null&&(oN(fc),fc=null))),Q2(e,t),Ti(t),null;case 5:xB(t);var o=Rh(eS.current);if(n=t.type,e!==null&&t.stateNode!=null)ene(e,t,n,r,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(lt(166));return Ti(t),null}if(e=Rh(lu.current),UE(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[tu]=t,r[Jx]=i,e=(t.mode&1)!==0,n){case"dialog":_r("cancel",r),_r("close",r);break;case"iframe":case"object":case"embed":_r("load",r);break;case"video":case"audio":for(o=0;o<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=a.createElement(n,{is:r.is}):(e=a.createElement(n),n==="select"&&(a=e,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):e=a.createElementNS(e,n),e[tu]=t,e[Jx]=r,Zte(e,t,!1,!1),t.stateNode=e;e:{switch(a=E2(n,r),n){case"dialog":_r("cancel",e),_r("close",e),o=r;break;case"iframe":case"object":case"embed":_r("load",e),o=r;break;case"video":case"audio":for(o=0;oSv&&(t.flags|=128,r=!0,X0(i,!1),t.lanes=4194304)}else{if(!r)if(e=JT(a),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),X0(i,!0),i.tail===null&&i.tailMode==="hidden"&&!a.alternate&&!Wr)return Ti(t),null}else 2*wo()-i.renderingStartTime>Sv&&n!==1073741824&&(t.flags|=128,r=!0,X0(i,!1),t.lanes=4194304);i.isBackwards?(a.sibling=t.child,t.child=a):(n=i.last,n!==null?n.sibling=a:t.child=a,i.last=a)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=wo(),t.sibling=null,n=Xr.current,kr(Xr,r?n&1|2:n&1),t):(Ti(t),null);case 22:case 23:return $B(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?ns&1073741824&&(Ti(t),t.subtreeFlags&6&&(t.flags|=8192)):Ti(t),null;case 24:return null;case 25:return null}throw Error(lt(156,t.tag))}function rIe(e,t){switch(pB(t),t.tag){case 1:return Aa(t.type)&&WT(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return wv(),Br(Oa),Br(Ni),SB(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return xB(t),null;case 13:if(Br(Xr),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(lt(340));vv()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Br(Xr),null;case 4:return wv(),null;case 10:return yB(t.type._context),null;case 22:case 23:return $B(),null;case 24:return null;default:return null}}var qE=!1,Mi=!1,oIe=typeof WeakSet=="function"?WeakSet:Set,Mt=null;function gy(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){fo(e,t,r)}else n.current=null}function X2(e,t,n){try{n()}catch(r){fo(e,t,r)}}var JW=!1;function iIe(e,t){if(D2=zT,e=ate(),dB(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var o=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var a=0,s=-1,l=-1,c=0,u=0,d=e,f=null;t:for(;;){for(var p;d!==n||o!==0&&d.nodeType!==3||(s=a+o),d!==i||r!==0&&d.nodeType!==3||(l=a+r),d.nodeType===3&&(a+=d.nodeValue.length),(p=d.firstChild)!==null;)f=d,d=p;for(;;){if(d===e)break t;if(f===n&&++c===o&&(s=a),f===i&&++u===r&&(l=a),(p=d.nextSibling)!==null)break;d=f,f=d.parentNode}d=p}n=s===-1||l===-1?null:{start:s,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(_2={focusedElem:e,selectionRange:n},zT=!1,Mt=t;Mt!==null;)if(t=Mt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Mt=e;else for(;Mt!==null;){t=Mt;try{var h=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(h!==null){var m=h.memoizedProps,y=h.memoizedState,w=t.stateNode,x=w.getSnapshotBeforeUpdate(t.elementType===t.type?m:oc(t.type,m),y);w.__reactInternalSnapshotBeforeUpdate=x}break;case 3:var S=t.stateNode.containerInfo;S.nodeType===1?S.textContent="":S.nodeType===9&&S.documentElement&&S.removeChild(S.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(lt(163))}}catch(E){fo(t,t.return,E)}if(e=t.sibling,e!==null){e.return=t.return,Mt=e;break}Mt=t.return}return h=JW,JW=!1,h}function lx(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var o=r=r.next;do{if((o.tag&e)===e){var i=o.destroy;o.destroy=void 0,i!==void 0&&X2(t,n,i)}o=o.next}while(o!==r)}}function nk(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function J2(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function nne(e){var t=e.alternate;t!==null&&(e.alternate=null,nne(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[tu],delete t[Jx],delete t[F2],delete t[zTe],delete t[VTe])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function rne(e){return e.tag===5||e.tag===3||e.tag===4}function ZW(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||rne(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Z2(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=UT));else if(r!==4&&(e=e.child,e!==null))for(Z2(e,t,n),e=e.sibling;e!==null;)Z2(e,t,n),e=e.sibling}function eN(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(eN(e,t,n),e=e.sibling;e!==null;)eN(e,t,n),e=e.sibling}var fi=null,sc=!1;function Jd(e,t,n){for(n=n.child;n!==null;)one(e,t,n),n=n.sibling}function one(e,t,n){if(su&&typeof su.onCommitFiberUnmount=="function")try{su.onCommitFiberUnmount(KA,n)}catch{}switch(n.tag){case 5:Mi||gy(n,t);case 6:var r=fi,o=sc;fi=null,Jd(e,t,n),fi=r,sc=o,fi!==null&&(sc?(e=fi,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):fi.removeChild(n.stateNode));break;case 18:fi!==null&&(sc?(e=fi,n=n.stateNode,e.nodeType===8?G$(e.parentNode,n):e.nodeType===1&&G$(e,n),qx(e)):G$(fi,n.stateNode));break;case 4:r=fi,o=sc,fi=n.stateNode.containerInfo,sc=!0,Jd(e,t,n),fi=r,sc=o;break;case 0:case 11:case 14:case 15:if(!Mi&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var i=o,a=i.destroy;i=i.tag,a!==void 0&&(i&2||i&4)&&X2(n,t,a),o=o.next}while(o!==r)}Jd(e,t,n);break;case 1:if(!Mi&&(gy(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){fo(n,t,s)}Jd(e,t,n);break;case 21:Jd(e,t,n);break;case 22:n.mode&1?(Mi=(r=Mi)||n.memoizedState!==null,Jd(e,t,n),Mi=r):Jd(e,t,n);break;default:Jd(e,t,n)}}function e6(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new oIe),t.forEach(function(r){var o=hIe.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function Jl(e,t){var n=t.deletions;if(n!==null)for(var r=0;ro&&(o=a),r&=~i}if(r=o,r=wo()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*sIe(r/1960))-r,10e?16:e,$f===null)var r=!1;else{if(e=$f,$f=null,rI=0,Un&6)throw Error(lt(331));var o=Un;for(Un|=4,Mt=e.current;Mt!==null;){var i=Mt,a=i.child;if(Mt.flags&16){var s=i.deletions;if(s!==null){for(var l=0;lwo()-MB?Qh(e,0):kB|=n),ka(e,t)}function fne(e,t){t===0&&(e.mode&1?(t=FE,FE<<=1,!(FE&130023424)&&(FE=4194304)):t=1);var n=aa();e=Ed(e,t),e!==null&&(DC(e,t,n),ka(e,n))}function pIe(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),fne(e,n)}function hIe(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;o!==null&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(lt(314))}r!==null&&r.delete(t),fne(e,n)}var pne;pne=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Oa.current)Ta=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Ta=!1,tIe(e,t,n);Ta=!!(e.flags&131072)}else Ta=!1,Wr&&t.flags&1048576&&yte(t,KT,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;nT(e,t),e=t.pendingProps;var o=yv(t,Ni.current);jy(t,n),o=EB(null,t,r,e,o,n);var i=PB();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Aa(r)?(i=!0,GT(t)):i=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,bB(t),o.updater=tk,t.stateNode=o,o._reactInternals=t,U2(t,r,e,n),t=q2(null,t,r,!0,i,n)):(t.tag=0,Wr&&i&&fB(t),Xi(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(nT(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=mIe(r),e=oc(r,e),o){case 0:t=G2(null,t,r,e,n);break e;case 1:t=YW(null,t,r,e,n);break e;case 11:t=qW(null,t,r,e,n);break e;case 14:t=KW(null,t,r,oc(r.type,e),n);break e}throw Error(lt(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:oc(r,o),G2(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:oc(r,o),YW(e,t,r,o,n);case 3:e:{if(Qte(t),e===null)throw Error(lt(387));r=t.pendingProps,i=t.memoizedState,o=i.element,Cte(e,t),XT(t,r,null,n);var a=t.memoizedState;if(r=a.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){o=xv(Error(lt(423)),t),t=QW(e,t,r,n,o);break e}else if(r!==o){o=xv(Error(lt(424)),t),t=QW(e,t,r,n,o);break e}else for(ds=Hf(t.stateNode.containerInfo.firstChild),ms=t,Wr=!0,fc=null,n=xte(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(vv(),r===o){t=Pd(e,t,n);break e}Xi(e,t,r,n)}t=t.child}return t;case 5:return Ete(t),e===null&&z2(t),r=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,a=o.children,N2(r,o)?a=null:i!==null&&N2(r,i)&&(t.flags|=32),Yte(e,t),Xi(e,t,a,n),t.child;case 6:return e===null&&z2(t),null;case 13:return Xte(e,t,n);case 4:return wB(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=bv(t,null,r,n):Xi(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:oc(r,o),qW(e,t,r,o,n);case 7:return Xi(e,t,t.pendingProps,n),t.child;case 8:return Xi(e,t,t.pendingProps.children,n),t.child;case 12:return Xi(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,i=t.memoizedProps,a=o.value,kr(YT,r._currentValue),r._currentValue=a,i!==null)if(Ic(i.value,a)){if(i.children===o.children&&!Oa.current){t=Pd(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var s=i.dependencies;if(s!==null){a=i.child;for(var l=s.firstContext;l!==null;){if(l.context===r){if(i.tag===1){l=sd(-1,n&-n),l.tag=2;var c=i.updateQueue;if(c!==null){c=c.shared;var u=c.pending;u===null?l.next=l:(l.next=u.next,u.next=l),c.pending=l}}i.lanes|=n,l=i.alternate,l!==null&&(l.lanes|=n),V2(i.return,n,t),s.lanes|=n;break}l=l.next}}else if(i.tag===10)a=i.type===t.type?null:i.child;else if(i.tag===18){if(a=i.return,a===null)throw Error(lt(341));a.lanes|=n,s=a.alternate,s!==null&&(s.lanes|=n),V2(a,n,t),a=i.sibling}else a=i.child;if(a!==null)a.return=i;else for(a=i;a!==null;){if(a===t){a=null;break}if(i=a.sibling,i!==null){i.return=a.return,a=i;break}a=a.return}i=a}Xi(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,jy(t,n),o=Ol(o),r=r(o),t.flags|=1,Xi(e,t,r,n),t.child;case 14:return r=t.type,o=oc(r,t.pendingProps),o=oc(r.type,o),KW(e,t,r,o,n);case 15:return qte(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:oc(r,o),nT(e,t),t.tag=1,Aa(r)?(e=!0,GT(t)):e=!1,jy(t,n),Ute(t,r,o),U2(t,r,o,n),q2(null,t,r,!0,e,n);case 19:return Jte(e,t,n);case 22:return Kte(e,t,n)}throw Error(lt(156,t.tag))};function hne(e,t){return zee(e,t)}function gIe(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function hl(e,t,n,r){return new gIe(e,t,n,r)}function _B(e){return e=e.prototype,!(!e||!e.isReactComponent)}function mIe(e){if(typeof e=="function")return _B(e)?1:0;if(e!=null){if(e=e.$$typeof,e===eB)return 11;if(e===tB)return 14}return 2}function qf(e,t){var n=e.alternate;return n===null?(n=hl(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function iT(e,t,n,r,o,i){var a=2;if(r=e,typeof e=="function")_B(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case ay:return Xh(n.children,o,i,t);case Zj:a=8,o|=8;break;case h2:return e=hl(12,n,t,o|2),e.elementType=h2,e.lanes=i,e;case g2:return e=hl(13,n,t,o),e.elementType=g2,e.lanes=i,e;case m2:return e=hl(19,n,t,o),e.elementType=m2,e.lanes=i,e;case Eee:return ok(n,o,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case See:a=10;break e;case Cee:a=9;break e;case eB:a=11;break e;case tB:a=14;break e;case uf:a=16,r=null;break e}throw Error(lt(130,e==null?e:typeof e,""))}return t=hl(a,n,t,o),t.elementType=e,t.type=r,t.lanes=i,t}function Xh(e,t,n,r){return e=hl(7,e,r,t),e.lanes=n,e}function ok(e,t,n,r){return e=hl(22,e,r,t),e.elementType=Eee,e.lanes=n,e.stateNode={isHidden:!1},e}function eD(e,t,n){return e=hl(6,e,null,t),e.lanes=n,e}function tD(e,t,n){return t=hl(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function yIe(e,t,n,r,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=_$(0),this.expirationTimes=_$(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=_$(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function NB(e,t,n,r,o,i,a,s,l){return e=new yIe(e,t,n,s,l),t===1?(t=1,i===!0&&(t|=8)):t=0,i=hl(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},bB(i),e}function vIe(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(vne)}catch(e){console.error(e)}}vne(),vee.exports=Ms;var Tb=vee.exports;const zw=Bn(Tb),l6={disabled:!1},aI=Y.createContext(null);var bne=function(t){return t.scrollTop},Vw="unmounted",xh="exited",Sh="entering",Qm="entered",iN="exiting",$s=function(e){$C(t,e);function t(r,o){var i;i=e.call(this,r,o)||this;var a=o,s=a&&!a.isMounting?r.enter:r.appear,l;return i.appearStatus=null,r.in?s?(l=xh,i.appearStatus=Sh):l=Qm:r.unmountOnExit||r.mountOnEnter?l=Vw:l=xh,i.state={status:l},i.nextCallback=null,i}t.getDerivedStateFromProps=function(o,i){var a=o.in;return a&&i.status===Vw?{status:xh}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(o){var i=null;if(o!==this.props){var a=this.state.status;this.props.in?a!==Sh&&a!==Qm&&(i=Sh):(a===Sh||a===Qm)&&(i=iN)}this.updateStatus(!1,i)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var o=this.props.timeout,i,a,s;return i=a=s=o,o!=null&&typeof o!="number"&&(i=o.exit,a=o.enter,s=o.appear!==void 0?o.appear:a),{exit:i,enter:a,appear:s}},n.updateStatus=function(o,i){if(o===void 0&&(o=!1),i!==null)if(this.cancelNextCallback(),i===Sh){if(this.props.unmountOnExit||this.props.mountOnEnter){var a=this.props.nodeRef?this.props.nodeRef.current:zw.findDOMNode(this);a&&bne(a)}this.performEnter(o)}else this.performExit();else this.props.unmountOnExit&&this.state.status===xh&&this.setState({status:Vw})},n.performEnter=function(o){var i=this,a=this.props.enter,s=this.context?this.context.isMounting:o,l=this.props.nodeRef?[s]:[zw.findDOMNode(this),s],c=l[0],u=l[1],d=this.getTimeouts(),f=s?d.appear:d.enter;if(!o&&!a||l6.disabled){this.safeSetState({status:Qm},function(){i.props.onEntered(c)});return}this.props.onEnter(c,u),this.safeSetState({status:Sh},function(){i.props.onEntering(c,u),i.onTransitionEnd(f,function(){i.safeSetState({status:Qm},function(){i.props.onEntered(c,u)})})})},n.performExit=function(){var o=this,i=this.props.exit,a=this.getTimeouts(),s=this.props.nodeRef?void 0:zw.findDOMNode(this);if(!i||l6.disabled){this.safeSetState({status:xh},function(){o.props.onExited(s)});return}this.props.onExit(s),this.safeSetState({status:iN},function(){o.props.onExiting(s),o.onTransitionEnd(a.exit,function(){o.safeSetState({status:xh},function(){o.props.onExited(s)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(o,i){i=this.setNextCallback(i),this.setState(o,i)},n.setNextCallback=function(o){var i=this,a=!0;return this.nextCallback=function(s){a&&(a=!1,i.nextCallback=null,o(s))},this.nextCallback.cancel=function(){a=!1},this.nextCallback},n.onTransitionEnd=function(o,i){this.setNextCallback(i);var a=this.props.nodeRef?this.props.nodeRef.current:zw.findDOMNode(this),s=o==null&&!this.props.addEndListener;if(!a||s){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var l=this.props.nodeRef?[this.nextCallback]:[a,this.nextCallback],c=l[0],u=l[1];this.props.addEndListener(c,u)}o!=null&&setTimeout(this.nextCallback,o)},n.render=function(){var o=this.state.status;if(o===Vw)return null;var i=this.props,a=i.children;i.in,i.mountOnEnter,i.unmountOnExit,i.appear,i.enter,i.exit,i.timeout,i.addEndListener,i.onEnter,i.onEntering,i.onEntered,i.onExit,i.onExiting,i.onExited,i.nodeRef;var s=qA(i,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return Y.createElement(aI.Provider,{value:null},typeof a=="function"?a(o,s):Y.cloneElement(Y.Children.only(a),s))},t}(Y.Component);$s.contextType=aI;$s.propTypes={};function Om(){}$s.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Om,onEntering:Om,onEntered:Om,onExit:Om,onExiting:Om,onExited:Om};$s.UNMOUNTED=Vw;$s.EXITED=xh;$s.ENTERING=Sh;$s.ENTERED=Qm;$s.EXITING=iN;var CIe=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return yPe(t,r)})},nD=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return vPe(t,r)})},BB=function(e){$C(t,e);function t(){for(var r,o=arguments.length,i=new Array(o),a=0;ae.scrollTop;function lp(e,t){const{timeout:n,easing:r,style:o={}}=e;return{duration:o.transitionDuration??(typeof n=="number"?n:n[t.mode]||0),easing:o.transitionTimingFunction??(typeof r=="object"?r[t.mode]:r),delay:o.transitionDelay}}function AIe(e){return nt("MuiCollapse",e)}it("MuiCollapse",["root","horizontal","vertical","entered","hidden","wrapper","wrapperInner"]);const kIe=e=>{const{orientation:t,classes:n}=e,r={root:["root",`${t}`],entered:["entered"],hidden:["hidden"],wrapper:["wrapper",`${t}`],wrapperInner:["wrapperInner",`${t}`]};return rt(r,AIe,n)},MIe=re("div",{name:"MuiCollapse",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.orientation],n.state==="entered"&&t.entered,n.state==="exited"&&!n.in&&n.collapsedSize==="0px"&&t.hidden]}})(Je(({theme:e})=>({height:0,overflow:"hidden",transition:e.transitions.create("height"),variants:[{props:{orientation:"horizontal"},style:{height:"auto",width:0,transition:e.transitions.create("width")}},{props:{state:"entered"},style:{height:"auto",overflow:"visible"}},{props:{state:"entered",orientation:"horizontal"},style:{width:"auto"}},{props:({ownerState:t})=>t.state==="exited"&&!t.in&&t.collapsedSize==="0px",style:{visibility:"hidden"}}]}))),RIe=re("div",{name:"MuiCollapse",slot:"Wrapper",overridesResolver:(e,t)=>t.wrapper})({display:"flex",width:"100%",variants:[{props:{orientation:"horizontal"},style:{width:"auto",height:"100%"}}]}),$Ie=re("div",{name:"MuiCollapse",slot:"WrapperInner",overridesResolver:(e,t)=>t.wrapperInner})({width:"100%",variants:[{props:{orientation:"horizontal"},style:{width:"auto",height:"100%"}}]}),xl=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiCollapse"}),{addEndListener:o,children:i,className:a,collapsedSize:s="0px",component:l,easing:c,in:u,onEnter:d,onEntered:f,onEntering:p,onExit:h,onExited:m,onExiting:y,orientation:w="vertical",style:x,timeout:S=ZZ.standard,TransitionComponent:E=$s,...P}=r,T={...r,orientation:w,collapsedSize:s},I=kIe(T),A=no(),k=Mf(),O=v.useRef(null),$=v.useRef(),N=typeof s=="number"?`${s}px`:s,L=w==="horizontal",j=L?"width":"height",D=v.useRef(null),_=Rr(n,D),z=te=>pe=>{if(te){const ae=D.current;pe===void 0?te(ae):te(ae,pe)}},F=()=>O.current?O.current[L?"clientWidth":"clientHeight"]:0,V=z((te,pe)=>{O.current&&L&&(O.current.style.position="absolute"),te.style[j]=N,d&&d(te,pe)}),U=z((te,pe)=>{const ae=F();O.current&&L&&(O.current.style.position="");const{duration:se,easing:oe}=lp({style:x,timeout:S,easing:c},{mode:"enter"});if(S==="auto"){const fe=A.transitions.getAutoHeightDuration(ae);te.style.transitionDuration=`${fe}ms`,$.current=fe}else te.style.transitionDuration=typeof se=="string"?se:`${se}ms`;te.style[j]=`${ae}px`,te.style.transitionTimingFunction=oe,p&&p(te,pe)}),K=z((te,pe)=>{te.style[j]="auto",f&&f(te,pe)}),X=z(te=>{te.style[j]=`${F()}px`,h&&h(te)}),ie=z(m),ee=z(te=>{const pe=F(),{duration:ae,easing:se}=lp({style:x,timeout:S,easing:c},{mode:"exit"});if(S==="auto"){const oe=A.transitions.getAutoHeightDuration(pe);te.style.transitionDuration=`${oe}ms`,$.current=oe}else te.style.transitionDuration=typeof ae=="string"?ae:`${ae}ms`;te.style[j]=N,te.style.transitionTimingFunction=se,y&&y(te)}),Q=te=>{S==="auto"&&k.start($.current||0,te),o&&o(D.current,te)};return R.jsx(E,{in:u,onEnter:V,onEntered:K,onEntering:U,onExit:X,onExited:ie,onExiting:ee,addEndListener:Q,nodeRef:D,timeout:S==="auto"?null:S,...P,children:(te,pe)=>R.jsx(MIe,{as:l,className:de(I.root,a,{entered:I.entered,exited:!u&&N==="0px"&&I.hidden}[te]),style:{[L?"minWidth":"minHeight"]:N,...x},ref:_,...pe,ownerState:{...T,state:te},children:R.jsx(RIe,{ownerState:{...T,state:te},className:I.wrapper,ref:O,children:R.jsx($Ie,{ownerState:{...T,state:te},className:I.wrapperInner,children:i})})})})});xl&&(xl.muiSupportAuto=!0);function DIe(e){return nt("MuiPaper",e)}it("MuiPaper",["root","rounded","outlined","elevation","elevation0","elevation1","elevation2","elevation3","elevation4","elevation5","elevation6","elevation7","elevation8","elevation9","elevation10","elevation11","elevation12","elevation13","elevation14","elevation15","elevation16","elevation17","elevation18","elevation19","elevation20","elevation21","elevation22","elevation23","elevation24"]);const _Ie=e=>{const{square:t,elevation:n,variant:r,classes:o}=e,i={root:["root",r,!t&&"rounded",r==="elevation"&&`elevation${n}`]};return rt(i,DIe,o)},NIe=re("div",{name:"MuiPaper",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],!n.square&&t.rounded,n.variant==="elevation"&&t[`elevation${n.elevation}`]]}})(Je(({theme:e})=>({backgroundColor:(e.vars||e).palette.background.paper,color:(e.vars||e).palette.text.primary,transition:e.transitions.create("box-shadow"),variants:[{props:({ownerState:t})=>!t.square,style:{borderRadius:e.shape.borderRadius}},{props:{variant:"outlined"},style:{border:`1px solid ${(e.vars||e).palette.divider}`}},{props:{variant:"elevation"},style:{boxShadow:"var(--Paper-shadow)",backgroundImage:"var(--Paper-overlay)"}}]}))),ro=v.forwardRef(function(t,n){var p;const r=at({props:t,name:"MuiPaper"}),o=no(),{className:i,component:a="div",elevation:s=1,square:l=!1,variant:c="elevation",...u}=r,d={...r,component:a,elevation:s,square:l,variant:c},f=_Ie(d);return R.jsx(NIe,{as:a,ownerState:d,className:de(f.root,i),ref:n,...u,style:{...c==="elevation"&&{"--Paper-shadow":(o.vars||o).shadows[s],...o.vars&&{"--Paper-overlay":(p=o.vars.overlays)==null?void 0:p[s]},...!o.vars&&o.palette.mode==="dark"&&{"--Paper-overlay":`linear-gradient(${St("#fff",J_(s))}, ${St("#fff",J_(s))})`}},...u.style}})}),wne=v.createContext({});function Cr(e,t){const{className:n,elementType:r,ownerState:o,externalForwardedProps:i,getSlotOwnerState:a,internalForwardedProps:s,...l}=t,{component:c,slots:u={[e]:void 0},slotProps:d={[e]:void 0},...f}=i,p=u[e]||r,h=HZ(d[e],o),{props:{component:m,...y},internalRef:w}=VZ({className:n,...l,externalForwardedProps:e==="root"?f:void 0,externalSlotProps:h}),x=Rr(w,h==null?void 0:h.ref,t.ref),S=a?a(y):{},E={...o,...S},P=e==="root"?m||c:m,T=oy(p,{...e==="root"&&!c&&!u[e]&&s,...e!=="root"&&!u[e]&&s,...y,...P&&{as:P},ref:x},E);return Object.keys(S).forEach(I=>{delete T[I]}),[p,T]}function LIe(e){return nt("MuiAccordion",e)}const QE=it("MuiAccordion",["root","heading","rounded","expanded","disabled","gutters","region"]),FIe=e=>{const{classes:t,square:n,expanded:r,disabled:o,disableGutters:i}=e;return rt({root:["root",!n&&"rounded",r&&"expanded",o&&"disabled",!i&&"gutters"],heading:["heading"],region:["region"]},LIe,t)},jIe=re(ro,{name:"MuiAccordion",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${QE.region}`]:t.region},t.root,!n.square&&t.rounded,!n.disableGutters&&t.gutters]}})(Je(({theme:e})=>{const t={duration:e.transitions.duration.shortest};return{position:"relative",transition:e.transitions.create(["margin"],t),overflowAnchor:"none","&::before":{position:"absolute",left:0,top:-1,right:0,height:1,content:'""',opacity:1,backgroundColor:(e.vars||e).palette.divider,transition:e.transitions.create(["opacity","background-color"],t)},"&:first-of-type":{"&::before":{display:"none"}},[`&.${QE.expanded}`]:{"&::before":{opacity:0},"&:first-of-type":{marginTop:0},"&:last-of-type":{marginBottom:0},"& + &":{"&::before":{display:"none"}}},[`&.${QE.disabled}`]:{backgroundColor:(e.vars||e).palette.action.disabledBackground}}}),Je(({theme:e})=>({variants:[{props:t=>!t.square,style:{borderRadius:0,"&:first-of-type":{borderTopLeftRadius:(e.vars||e).shape.borderRadius,borderTopRightRadius:(e.vars||e).shape.borderRadius},"&:last-of-type":{borderBottomLeftRadius:(e.vars||e).shape.borderRadius,borderBottomRightRadius:(e.vars||e).shape.borderRadius,"@supports (-ms-ime-align: auto)":{borderBottomLeftRadius:0,borderBottomRightRadius:0}}}},{props:t=>!t.disableGutters,style:{[`&.${QE.expanded}`]:{margin:"16px 0"}}}]}))),BIe=re("h3",{name:"MuiAccordion",slot:"Heading",overridesResolver:(e,t)=>t.heading})({all:"unset"}),HB=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiAccordion"}),{children:o,className:i,defaultExpanded:a=!1,disabled:s=!1,disableGutters:l=!1,expanded:c,onChange:u,square:d=!1,slots:f={},slotProps:p={},TransitionComponent:h,TransitionProps:m,...y}=r,[w,x]=ad({controlled:c,default:a,name:"Accordion",state:"expanded"}),S=v.useCallback(_=>{x(!w),u&&u(_,!w)},[w,u,x]),[E,...P]=v.Children.toArray(o),T=v.useMemo(()=>({expanded:w,disabled:s,disableGutters:l,toggle:S}),[w,s,l,S]),I={...r,square:d,disabled:s,disableGutters:l,expanded:w},A=FIe(I),k={transition:h,...f},O={transition:m,...p},$={slots:k,slotProps:O},[N,L]=Cr("heading",{elementType:BIe,externalForwardedProps:$,className:A.heading,ownerState:I}),[j,D]=Cr("transition",{elementType:xl,externalForwardedProps:$,ownerState:I});return R.jsxs(jIe,{className:de(A.root,i),ref:n,ownerState:I,square:d,...y,children:[R.jsx(N,{...L,children:R.jsx(wne.Provider,{value:T,children:E})}),R.jsx(j,{in:w,timeout:"auto",...D,children:R.jsx("div",{"aria-labelledby":E.props.id,id:E.props["aria-controls"],role:"region",className:A.region,children:P})})]})});function zIe(e){return nt("MuiAccordionDetails",e)}it("MuiAccordionDetails",["root"]);const VIe=e=>{const{classes:t}=e;return rt({root:["root"]},zIe,t)},HIe=re("div",{name:"MuiAccordionDetails",slot:"Root",overridesResolver:(e,t)=>t.root})(Je(({theme:e})=>({padding:e.spacing(1,2,2)}))),UB=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiAccordionDetails"}),{className:o,...i}=r,a=r,s=VIe(a);return R.jsx(HIe,{className:de(s.root,o),ref:n,ownerState:a,...i})});class sI{constructor(){mt(this,"mountEffect",()=>{this.shouldMount&&!this.didMount&&this.ref.current!==null&&(this.didMount=!0,this.mounted.resolve())});this.ref={current:null},this.mounted=null,this.didMount=!1,this.shouldMount=!1,this.setShouldMount=null}static create(){return new sI}static use(){const t=LZ(sI.create).current,[n,r]=v.useState(!1);return t.shouldMount=n,t.setShouldMount=r,v.useEffect(t.mountEffect,[n]),t}mount(){return this.mounted||(this.mounted=WIe(),this.shouldMount=!0,this.setShouldMount(this.shouldMount)),this.mounted}start(...t){this.mount().then(()=>{var n;return(n=this.ref.current)==null?void 0:n.start(...t)})}stop(...t){this.mount().then(()=>{var n;return(n=this.ref.current)==null?void 0:n.stop(...t)})}pulsate(...t){this.mount().then(()=>{var n;return(n=this.ref.current)==null?void 0:n.pulsate(...t)})}}function UIe(){return sI.use()}function WIe(){let e,t;const n=new Promise((r,o)=>{e=r,t=o});return n.resolve=e,n.reject=t,n}function GIe(e){const{className:t,classes:n,pulsate:r=!1,rippleX:o,rippleY:i,rippleSize:a,in:s,onExited:l,timeout:c}=e,[u,d]=v.useState(!1),f=de(t,n.ripple,n.rippleVisible,r&&n.ripplePulsate),p={width:a,height:a,top:-(a/2)+i,left:-(a/2)+o},h=de(n.child,u&&n.childLeaving,r&&n.childPulsate);return!s&&!u&&d(!0),v.useEffect(()=>{if(!s&&l!=null){const m=setTimeout(l,c);return()=>{clearTimeout(m)}}},[l,s,c]),R.jsx("span",{className:f,style:p,children:R.jsx("span",{className:h})})}const ll=it("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),sN=550,qIe=80,KIe=Cu` 0% { transform: scale(0); opacity: 0.1; @@ -103,7 +103,7 @@ Error generating stack: `+i.message+` transform: scale(1); opacity: 0.3; } -`,BIe=xu` +`,YIe=Cu` 0% { opacity: 1; } @@ -111,7 +111,7 @@ Error generating stack: `+i.message+` 100% { opacity: 0; } -`,zIe=xu` +`,QIe=Cu` 0% { transform: scale(1); } @@ -123,23 +123,23 @@ Error generating stack: `+i.message+` 100% { transform: scale(1); } -`,VIe=oe("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),HIe=oe(LIe,{name:"MuiTouchRipple",slot:"Ripple"})` +`,XIe=re("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),JIe=re(GIe,{name:"MuiTouchRipple",slot:"Ripple"})` opacity: 0; position: absolute; - &.${il.rippleVisible} { + &.${ll.rippleVisible} { opacity: 0.3; transform: scale(1); - animation-name: ${jIe}; - animation-duration: ${tN}ms; + animation-name: ${KIe}; + animation-duration: ${sN}ms; animation-timing-function: ${({theme:e})=>e.transitions.easing.easeInOut}; } - &.${il.ripplePulsate} { + &.${ll.ripplePulsate} { animation-duration: ${({theme:e})=>e.transitions.duration.shorter}ms; } - & .${il.child} { + & .${ll.child} { opacity: 1; display: block; width: 100%; @@ -148,26 +148,26 @@ Error generating stack: `+i.message+` background-color: currentColor; } - & .${il.childLeaving} { + & .${ll.childLeaving} { opacity: 0; - animation-name: ${BIe}; - animation-duration: ${tN}ms; + animation-name: ${YIe}; + animation-duration: ${sN}ms; animation-timing-function: ${({theme:e})=>e.transitions.easing.easeInOut}; } - & .${il.childPulsate} { + & .${ll.childPulsate} { position: absolute; /* @noflip */ left: 0px; top: 0; - animation-name: ${zIe}; + animation-name: ${QIe}; animation-duration: 2500ms; animation-timing-function: ${({theme:e})=>e.transitions.easing.easeInOut}; animation-iteration-count: infinite; animation-delay: 200ms; } -`,UIe=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiTouchRipple"}),{center:o=!1,classes:i={},className:a,...s}=r,[l,c]=v.useState([]),u=v.useRef(0),d=v.useRef(null);v.useEffect(()=>{d.current&&(d.current(),d.current=null)},[l]);const f=v.useRef(!1),p=kf(),h=v.useRef(null),m=v.useRef(null),y=v.useCallback(E=>{const{pulsate:P,rippleX:T,rippleY:I,rippleSize:A,cb:k}=E;c(O=>[...O,R.jsx(HIe,{classes:{ripple:de(i.ripple,il.ripple),rippleVisible:de(i.rippleVisible,il.rippleVisible),ripplePulsate:de(i.ripplePulsate,il.ripplePulsate),child:de(i.child,il.child),childLeaving:de(i.childLeaving,il.childLeaving),childPulsate:de(i.childPulsate,il.childPulsate)},timeout:tN,pulsate:P,rippleX:T,rippleY:I,rippleSize:A},u.current)]),u.current+=1,d.current=k},[i]),w=v.useCallback((E={},P={},T=()=>{})=>{const{pulsate:I=!1,center:A=o||P.pulsate,fakeElement:k=!1}=P;if((E==null?void 0:E.type)==="mousedown"&&f.current){f.current=!1;return}(E==null?void 0:E.type)==="touchstart"&&(f.current=!0);const O=k?null:m.current,$=O?O.getBoundingClientRect():{width:0,height:0,left:0,top:0};let N,L,j;if(A||E===void 0||E.clientX===0&&E.clientY===0||!E.clientX&&!E.touches)N=Math.round($.width/2),L=Math.round($.height/2);else{const{clientX:D,clientY:_}=E.touches&&E.touches.length>0?E.touches[0]:E;N=Math.round(D-$.left),L=Math.round(_-$.top)}if(A)j=Math.sqrt((2*$.width**2+$.height**2)/3),j%2===0&&(j+=1);else{const D=Math.max(Math.abs((O?O.clientWidth:0)-N),N)*2+2,_=Math.max(Math.abs((O?O.clientHeight:0)-L),L)*2+2;j=Math.sqrt(D**2+_**2)}E!=null&&E.touches?h.current===null&&(h.current=()=>{y({pulsate:I,rippleX:N,rippleY:L,rippleSize:j,cb:T})},p.start(FIe,()=>{h.current&&(h.current(),h.current=null)})):y({pulsate:I,rippleX:N,rippleY:L,rippleSize:j,cb:T})},[o,y,p]),x=v.useCallback(()=>{w({},{pulsate:!0})},[w]),C=v.useCallback((E,P)=>{if(p.clear(),(E==null?void 0:E.type)==="touchend"&&h.current){h.current(),h.current=null,p.start(0,()=>{C(E,P)});return}h.current=null,c(T=>T.length>0?T.slice(1):T),d.current=P},[p]);return v.useImperativeHandle(n,()=>({pulsate:x,start:w,stop:C}),[x,w,C]),R.jsx(VIe,{className:de(il.root,i.root,a),ref:m,...s,children:R.jsx(RC,{component:null,exit:!0,children:l})})});function WIe(e){return nt("MuiButtonBase",e)}const GIe=it("MuiButtonBase",["root","disabled","focusVisible"]),qIe=e=>{const{disabled:t,focusVisible:n,focusVisibleClassName:r,classes:o}=e,a=rt({root:["root",t&&"disabled",n&&"focusVisible"]},WIe,o);return n&&r&&(a.root+=` ${r}`),a},KIe=oe("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${GIe.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),la=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiButtonBase"}),{action:o,centerRipple:i=!1,children:a,className:s,component:l="button",disabled:c=!1,disableRipple:u=!1,disableTouchRipple:d=!1,focusRipple:f=!1,focusVisibleClassName:p,LinkComponent:h="a",onBlur:m,onClick:y,onContextMenu:w,onDragLeave:x,onFocus:C,onFocusVisible:E,onKeyDown:P,onKeyUp:T,onMouseDown:I,onMouseLeave:A,onMouseUp:k,onTouchEnd:O,onTouchMove:$,onTouchStart:N,tabIndex:L=0,TouchRippleProps:j,touchRippleRef:D,type:_,...z}=r,F=v.useRef(null),V=_Ie(),U=Rr(V.ref,D),[q,X]=v.useState(!1);c&&q&&X(!1),v.useImperativeHandle(o,()=>({focusVisible:()=>{X(!0),F.current.focus()}}),[]);const ie=V.shouldMount&&!u&&!c;v.useEffect(()=>{q&&f&&!u&&V.pulsate()},[u,f,q,V]);function ee(Pe,Ae,Me=d){return ei(We=>(Ae&&Ae(We),Me||V[Pe](We),!0))}const Q=ee("start",I),te=ee("stop",w),pe=ee("stop",x),ae=ee("stop",k),se=ee("stop",Pe=>{q&&Pe.preventDefault(),A&&A(Pe)}),re=ee("start",N),fe=ee("stop",O),Z=ee("stop",$),ce=ee("stop",Pe=>{bT(Pe.target)||X(!1),m&&m(Pe)},!1),ge=ei(Pe=>{F.current||(F.current=Pe.currentTarget),bT(Pe.target)&&(X(!0),E&&E(Pe)),C&&C(Pe)}),we=()=>{const Pe=F.current;return l&&l!=="button"&&!(Pe.tagName==="A"&&Pe.href)},me=ei(Pe=>{f&&!Pe.repeat&&q&&Pe.key===" "&&V.stop(Pe,()=>{V.start(Pe)}),Pe.target===Pe.currentTarget&&we()&&Pe.key===" "&&Pe.preventDefault(),P&&P(Pe),Pe.target===Pe.currentTarget&&we()&&Pe.key==="Enter"&&!c&&(Pe.preventDefault(),y&&y(Pe))}),Se=ei(Pe=>{f&&Pe.key===" "&&q&&!Pe.defaultPrevented&&V.stop(Pe,()=>{V.pulsate(Pe)}),T&&T(Pe),y&&Pe.target===Pe.currentTarget&&we()&&Pe.key===" "&&!Pe.defaultPrevented&&y(Pe)});let xe=l;xe==="button"&&(z.href||z.to)&&(xe=h);const ke={};xe==="button"?(ke.type=_===void 0?"button":_,ke.disabled=c):(!z.href&&!z.to&&(ke.role="button"),c&&(ke["aria-disabled"]=c));const De=Rr(n,F),_e={...r,centerRipple:i,component:l,disabled:c,disableRipple:u,disableTouchRipple:d,focusRipple:f,tabIndex:L,focusVisible:q},ye=qIe(_e);return R.jsxs(KIe,{as:xe,className:de(ye.root,s),ownerState:_e,onBlur:ce,onClick:y,onContextMenu:te,onFocus:ge,onKeyDown:me,onKeyUp:Se,onMouseDown:Q,onMouseLeave:se,onMouseUp:ae,onDragLeave:pe,onTouchEnd:fe,onTouchMove:Z,onTouchStart:re,ref:De,tabIndex:c?-1:L,type:_,...ke,...z,children:[a,ie?R.jsx(UIe,{ref:U,center:i,...j}):null]})});function YIe(e){return nt("MuiAccordionSummary",e)}const my=it("MuiAccordionSummary",["root","expanded","focusVisible","disabled","gutters","contentGutters","content","expandIconWrapper"]),QIe=e=>{const{classes:t,expanded:n,disabled:r,disableGutters:o}=e;return rt({root:["root",n&&"expanded",r&&"disabled",!o&&"gutters"],focusVisible:["focusVisible"],content:["content",n&&"expanded",!o&&"contentGutters"],expandIconWrapper:["expandIconWrapper",n&&"expanded"]},YIe,t)},XIe=oe(la,{name:"MuiAccordionSummary",slot:"Root",overridesResolver:(e,t)=>t.root})(Je(({theme:e})=>{const t={duration:e.transitions.duration.shortest};return{display:"flex",minHeight:48,padding:e.spacing(0,2),transition:e.transitions.create(["min-height","background-color"],t),[`&.${my.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${my.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`&:hover:not(.${my.disabled})`]:{cursor:"pointer"},variants:[{props:n=>!n.disableGutters,style:{[`&.${my.expanded}`]:{minHeight:64}}}]}})),JIe=oe("div",{name:"MuiAccordionSummary",slot:"Content",overridesResolver:(e,t)=>t.content})(Je(({theme:e})=>({display:"flex",flexGrow:1,margin:"12px 0",variants:[{props:t=>!t.disableGutters,style:{transition:e.transitions.create(["margin"],{duration:e.transitions.duration.shortest}),[`&.${my.expanded}`]:{margin:"20px 0"}}}]}))),ZIe=oe("div",{name:"MuiAccordionSummary",slot:"ExpandIconWrapper",overridesResolver:(e,t)=>t.expandIconWrapper})(Je(({theme:e})=>({display:"flex",color:(e.vars||e).palette.action.active,transform:"rotate(0deg)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shortest}),[`&.${my.expanded}`]:{transform:"rotate(180deg)"}}))),BB=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiAccordionSummary"}),{children:o,className:i,expandIcon:a,focusVisibleClassName:s,onClick:l,...c}=r,{disabled:u=!1,disableGutters:d,expanded:f,toggle:p}=v.useContext(gne),h=w=>{p&&p(w),l&&l(w)},m={...r,expanded:f,disabled:u,disableGutters:d},y=QIe(m);return R.jsxs(XIe,{focusRipple:!1,disableRipple:!0,disabled:u,component:"div","aria-expanded":f,className:de(y.root,i),focusVisibleClassName:de(y.focusVisible,s),onClick:h,ref:n,ownerState:m,...c,children:[R.jsx(JIe,{className:y.content,ownerState:m,children:o}),a&&R.jsx(ZIe,{className:y.expandIconWrapper,ownerState:m,children:a})]})});function eOe(e){return typeof e.main=="string"}function tOe(e,t=[]){if(!eOe(e))return!1;for(const n of t)if(!e.hasOwnProperty(n)||typeof e[n]!="string")return!1;return!0}function Kn(e=[]){return([,t])=>t&&tOe(t,e)}function nOe(e){return nt("MuiAlert",e)}const i6=it("MuiAlert",["root","action","icon","message","filled","colorSuccess","colorInfo","colorWarning","colorError","filledSuccess","filledInfo","filledWarning","filledError","outlined","outlinedSuccess","outlinedInfo","outlinedWarning","outlinedError","standard","standardSuccess","standardInfo","standardWarning","standardError"]);function rOe(e){return nt("MuiIconButton",e)}const oOe=it("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge"]),iOe=e=>{const{classes:t,disabled:n,color:r,edge:o,size:i}=e,a={root:["root",n&&"disabled",r!=="default"&&`color${Ce(r)}`,o&&`edge${Ce(o)}`,`size${Ce(i)}`]};return rt(a,rOe,t)},aOe=oe(la,{name:"MuiIconButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="default"&&t[`color${Ce(n.color)}`],n.edge&&t[`edge${Ce(n.edge)}`],t[`size${Ce(n.size)}`]]}})(Je(({theme:e})=>({textAlign:"center",flex:"0 0 auto",fontSize:e.typography.pxToRem(24),padding:8,borderRadius:"50%",color:(e.vars||e).palette.action.active,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),variants:[{props:t=>!t.disableRipple,style:{"--IconButton-hoverBg":e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:xt(e.palette.action.active,e.palette.action.hoverOpacity),"&:hover":{backgroundColor:"var(--IconButton-hoverBg)","@media (hover: none)":{backgroundColor:"transparent"}}}},{props:{edge:"start"},style:{marginLeft:-12}},{props:{edge:"start",size:"small"},style:{marginLeft:-3}},{props:{edge:"end"},style:{marginRight:-12}},{props:{edge:"end",size:"small"},style:{marginRight:-3}}]})),Je(({theme:e})=>({variants:[{props:{color:"inherit"},style:{color:"inherit"}},...Object.entries(e.palette).filter(Kn()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}})),...Object.entries(e.palette).filter(Kn()).map(([t])=>({props:{color:t},style:{"--IconButton-hoverBg":e.vars?`rgba(${(e.vars||e).palette[t].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:xt((e.vars||e).palette[t].main,e.palette.action.hoverOpacity)}})),{props:{size:"small"},style:{padding:5,fontSize:e.typography.pxToRem(18)}},{props:{size:"large"},style:{padding:12,fontSize:e.typography.pxToRem(28)}}],[`&.${oOe.disabled}`]:{backgroundColor:"transparent",color:(e.vars||e).palette.action.disabled}}))),vn=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiIconButton"}),{edge:o=!1,children:i,className:a,color:s="default",disabled:l=!1,disableFocusRipple:c=!1,size:u="medium",...d}=r,f={...r,edge:o,color:s,disabled:l,disableFocusRipple:c,size:u},p=iOe(f);return R.jsx(aOe,{className:de(p.root,a),centerRipple:!0,focusRipple:!c,disabled:l,ref:n,...d,ownerState:f,children:i})}),sOe=ct(R.jsx("path",{d:"M20,12A8,8 0 0,1 12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4C12.76,4 13.5,4.11 14.2, 4.31L15.77,2.74C14.61,2.26 13.34,2 12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0, 0 22,12M7.91,10.08L6.5,11.5L11,16L21,6L19.59,4.58L11,13.17L7.91,10.08Z"}),"SuccessOutlined"),lOe=ct(R.jsx("path",{d:"M12 5.99L19.53 19H4.47L12 5.99M12 2L1 21h22L12 2zm1 14h-2v2h2v-2zm0-6h-2v4h2v-4z"}),"ReportProblemOutlined"),cOe=ct(R.jsx("path",{d:"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),"ErrorOutline"),uOe=ct(R.jsx("path",{d:"M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20, 12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10, 10 0 0,0 12,2M11,17H13V11H11V17Z"}),"InfoOutlined"),mne=ct(R.jsx("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close"),dOe=e=>{const{variant:t,color:n,severity:r,classes:o}=e,i={root:["root",`color${Ce(n||r)}`,`${t}${Ce(n||r)}`,`${t}`],icon:["icon"],message:["message"],action:["action"]};return rt(i,nOe,o)},fOe=oe(to,{name:"MuiAlert",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${Ce(n.color||n.severity)}`]]}})(Je(({theme:e})=>{const t=e.palette.mode==="light"?bd:wd,n=e.palette.mode==="light"?wd:bd;return{...e.typography.body2,backgroundColor:"transparent",display:"flex",padding:"6px 16px",variants:[...Object.entries(e.palette).filter(Kn(["light"])).map(([r])=>({props:{colorSeverity:r,variant:"standard"},style:{color:e.vars?e.vars.palette.Alert[`${r}Color`]:t(e.palette[r].light,.6),backgroundColor:e.vars?e.vars.palette.Alert[`${r}StandardBg`]:n(e.palette[r].light,.9),[`& .${i6.icon}`]:e.vars?{color:e.vars.palette.Alert[`${r}IconColor`]}:{color:e.palette[r].main}}})),...Object.entries(e.palette).filter(Kn(["light"])).map(([r])=>({props:{colorSeverity:r,variant:"outlined"},style:{color:e.vars?e.vars.palette.Alert[`${r}Color`]:t(e.palette[r].light,.6),border:`1px solid ${(e.vars||e).palette[r].light}`,[`& .${i6.icon}`]:e.vars?{color:e.vars.palette.Alert[`${r}IconColor`]}:{color:e.palette[r].main}}})),...Object.entries(e.palette).filter(Kn(["dark"])).map(([r])=>({props:{colorSeverity:r,variant:"filled"},style:{fontWeight:e.typography.fontWeightMedium,...e.vars?{color:e.vars.palette.Alert[`${r}FilledColor`],backgroundColor:e.vars.palette.Alert[`${r}FilledBg`]}:{backgroundColor:e.palette.mode==="dark"?e.palette[r].dark:e.palette[r].main,color:e.palette.getContrastText(e.palette[r].main)}}}))]}})),pOe=oe("div",{name:"MuiAlert",slot:"Icon",overridesResolver:(e,t)=>t.icon})({marginRight:12,padding:"7px 0",display:"flex",fontSize:22,opacity:.9}),hOe=oe("div",{name:"MuiAlert",slot:"Message",overridesResolver:(e,t)=>t.message})({padding:"8px 0",minWidth:0,overflow:"auto"}),a6=oe("div",{name:"MuiAlert",slot:"Action",overridesResolver:(e,t)=>t.action})({display:"flex",alignItems:"flex-start",padding:"4px 0 0 16px",marginLeft:"auto",marginRight:-8}),s6={success:R.jsx(sOe,{fontSize:"inherit"}),warning:R.jsx(lOe,{fontSize:"inherit"}),error:R.jsx(cOe,{fontSize:"inherit"}),info:R.jsx(uOe,{fontSize:"inherit"})},Il=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiAlert"}),{action:o,children:i,className:a,closeText:s="Close",color:l,components:c={},componentsProps:u={},icon:d,iconMapping:f=s6,onClose:p,role:h="alert",severity:m="success",slotProps:y={},slots:w={},variant:x="standard",...C}=r,E={...r,color:l,severity:m,variant:x,colorSeverity:l||m},P=dOe(E),T={slots:{closeButton:c.CloseButton,closeIcon:c.CloseIcon,...w},slotProps:{...u,...y}},[I,A]=Cr("closeButton",{elementType:vn,externalForwardedProps:T,ownerState:E}),[k,O]=Cr("closeIcon",{elementType:mne,externalForwardedProps:T,ownerState:E});return R.jsxs(fOe,{role:h,elevation:0,ownerState:E,className:de(P.root,a),ref:n,...C,children:[d!==!1?R.jsx(pOe,{ownerState:E,className:P.icon,children:d||f[m]||s6[m]}):null,R.jsx(hOe,{ownerState:E,className:P.message,children:i}),o!=null?R.jsx(a6,{ownerState:E,className:P.action,children:o}):null,o==null&&p?R.jsx(a6,{ownerState:E,className:P.action,children:R.jsx(I,{size:"small","aria-label":s,title:s,color:"inherit",onClick:p,...A,children:R.jsx(k,{fontSize:"small",...O})})}):null]})});function gOe(e){return nt("MuiTypography",e)}const QT=it("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]),mOe={primary:!0,secondary:!0,error:!0,info:!0,success:!0,warning:!0,textPrimary:!0,textSecondary:!0,textDisabled:!0},yOe=rPe(),vOe=e=>{const{align:t,gutterBottom:n,noWrap:r,paragraph:o,variant:i,classes:a}=e,s={root:["root",i,e.align!=="inherit"&&`align${Ce(t)}`,n&&"gutterBottom",r&&"noWrap",o&&"paragraph"]};return rt(s,gOe,a)},bOe=oe("span",{name:"MuiTypography",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.variant&&t[n.variant],n.align!=="inherit"&&t[`align${Ce(n.align)}`],n.noWrap&&t.noWrap,n.gutterBottom&&t.gutterBottom,n.paragraph&&t.paragraph]}})(Je(({theme:e})=>{var t;return{margin:0,variants:[{props:{variant:"inherit"},style:{font:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}},...Object.entries(e.typography).filter(([n,r])=>n!=="inherit"&&r&&typeof r=="object").map(([n,r])=>({props:{variant:n},style:r})),...Object.entries(e.palette).filter(Kn()).map(([n])=>({props:{color:n},style:{color:(e.vars||e).palette[n].main}})),...Object.entries(((t=e.palette)==null?void 0:t.text)||{}).filter(([,n])=>typeof n=="string").map(([n])=>({props:{color:`text${Ce(n)}`},style:{color:(e.vars||e).palette.text[n]}})),{props:({ownerState:n})=>n.align!=="inherit",style:{textAlign:"var(--Typography-textAlign)"}},{props:({ownerState:n})=>n.noWrap,style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}},{props:({ownerState:n})=>n.gutterBottom,style:{marginBottom:"0.35em"}},{props:({ownerState:n})=>n.paragraph,style:{marginBottom:16}}]}})),l6={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},st=v.forwardRef(function(t,n){const{color:r,...o}=at({props:t,name:"MuiTypography"}),i=!mOe[r],a=yOe({...o,...i&&{color:r}}),{align:s="inherit",className:l,component:c,gutterBottom:u=!1,noWrap:d=!1,paragraph:f=!1,variant:p="body1",variantMapping:h=l6,...m}=a,y={...a,align:s,color:r,className:l,component:c,gutterBottom:u,noWrap:d,paragraph:f,variant:p,variantMapping:h},w=c||(f?"p":h[p]||l6[p])||"span",x=vOe(y);return R.jsx(bOe,{as:w,ref:n,className:de(x.root,l),...m,ownerState:y,style:{...s!=="inherit"&&{"--Typography-textAlign":s},...m.style}})});function wOe(e){return nt("MuiAlertTitle",e)}it("MuiAlertTitle",["root"]);const xOe=e=>{const{classes:t}=e;return rt({root:["root"]},wOe,t)},SOe=oe(st,{name:"MuiAlertTitle",slot:"Root",overridesResolver:(e,t)=>t.root})(Je(({theme:e})=>({fontWeight:e.typography.fontWeightMedium,marginTop:-2}))),XT=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiAlertTitle"}),{className:o,...i}=r,a=r,s=xOe(a);return R.jsx(SOe,{gutterBottom:!0,component:"div",ownerState:a,ref:n,className:de(s.root,o),...i})});function COe(e){return nt("MuiAppBar",e)}it("MuiAppBar",["root","positionFixed","positionAbsolute","positionSticky","positionStatic","positionRelative","colorDefault","colorPrimary","colorSecondary","colorInherit","colorTransparent","colorError","colorInfo","colorSuccess","colorWarning"]);const EOe=e=>{const{color:t,position:n,classes:r}=e,o={root:["root",`color${Ce(t)}`,`position${Ce(n)}`]};return rt(o,COe,r)},c6=(e,t)=>e?`${e==null?void 0:e.replace(")","")}, ${t})`:t,POe=oe(to,{name:"MuiAppBar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`position${Ce(n.position)}`],t[`color${Ce(n.color)}`]]}})(Je(({theme:e})=>({display:"flex",flexDirection:"column",width:"100%",boxSizing:"border-box",flexShrink:0,variants:[{props:{position:"fixed"},style:{position:"fixed",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0,"@media print":{position:"absolute"}}},{props:{position:"absolute"},style:{position:"absolute",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0}},{props:{position:"sticky"},style:{position:"sticky",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0}},{props:{position:"static"},style:{position:"static"}},{props:{position:"relative"},style:{position:"relative"}},{props:{color:"inherit"},style:{"--AppBar-color":"inherit"}},{props:{color:"default"},style:{"--AppBar-background":e.vars?e.vars.palette.AppBar.defaultBg:e.palette.grey[100],"--AppBar-color":e.vars?e.vars.palette.text.primary:e.palette.getContrastText(e.palette.grey[100]),...e.applyStyles("dark",{"--AppBar-background":e.vars?e.vars.palette.AppBar.defaultBg:e.palette.grey[900],"--AppBar-color":e.vars?e.vars.palette.text.primary:e.palette.getContrastText(e.palette.grey[900])})}},...Object.entries(e.palette).filter(Kn(["contrastText"])).map(([t])=>({props:{color:t},style:{"--AppBar-background":(e.vars??e).palette[t].main,"--AppBar-color":(e.vars??e).palette[t].contrastText}})),{props:t=>t.enableColorOnDark===!0&&!["inherit","transparent"].includes(t.color),style:{backgroundColor:"var(--AppBar-background)",color:"var(--AppBar-color)"}},{props:t=>t.enableColorOnDark===!1&&!["inherit","transparent"].includes(t.color),style:{backgroundColor:"var(--AppBar-background)",color:"var(--AppBar-color)",...e.applyStyles("dark",{backgroundColor:e.vars?c6(e.vars.palette.AppBar.darkBg,"var(--AppBar-background)"):null,color:e.vars?c6(e.vars.palette.AppBar.darkColor,"var(--AppBar-color)"):null})}},{props:{color:"transparent"},style:{"--AppBar-background":"transparent","--AppBar-color":"inherit",backgroundColor:"var(--AppBar-background)",color:"var(--AppBar-color)",...e.applyStyles("dark",{backgroundImage:"none"})}}]}))),TOe=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiAppBar"}),{className:o,color:i="primary",enableColorOnDark:a=!1,position:s="fixed",...l}=r,c={...r,color:i,position:s,enableColorOnDark:a},u=EOe(c);return R.jsx(POe,{square:!0,component:"header",ownerState:c,elevation:4,className:de(u.root,o,s==="fixed"&&"mui-fixed"),ref:n,...l})});function u6(e){return e.normalize("NFD").replace(/[\u0300-\u036f]/g,"")}function yne(e={}){const{ignoreAccents:t=!0,ignoreCase:n=!0,limit:r,matchFrom:o="any",stringify:i,trim:a=!1}=e;return(s,{inputValue:l,getOptionLabel:c})=>{let u=a?l.trim():l;n&&(u=u.toLowerCase()),t&&(u=u6(u));const d=u?s.filter(f=>{let p=(i||c)(f);return n&&(p=p.toLowerCase()),t&&(p=u6(p)),o==="start"?p.startsWith(u):p.includes(u)}):s;return typeof r=="number"?d.slice(0,r):d}}const IOe=yne(),d6=5,OOe=e=>{var t;return e.current!==null&&((t=e.current.parentElement)==null?void 0:t.contains(document.activeElement))},AOe=[];function kOe(e){const{unstable_isActiveElementInListbox:t=OOe,unstable_classNamePrefix:n="Mui",autoComplete:r=!1,autoHighlight:o=!1,autoSelect:i=!1,blurOnSelect:a=!1,clearOnBlur:s=!e.freeSolo,clearOnEscape:l=!1,componentName:c="useAutocomplete",defaultValue:u=e.multiple?AOe:null,disableClearable:d=!1,disableCloseOnSelect:f=!1,disabled:p,disabledItemsFocusable:h=!1,disableListWrap:m=!1,filterOptions:y=IOe,filterSelectedOptions:w=!1,freeSolo:x=!1,getOptionDisabled:C,getOptionKey:E,getOptionLabel:P=Ue=>Ue.label??Ue,groupBy:T,handleHomeEndKeys:I=!e.freeSolo,id:A,includeInputInList:k=!1,inputValue:O,isOptionEqualToValue:$=(Ue,Fe)=>Ue===Fe,multiple:N=!1,onChange:L,onClose:j,onHighlightChange:D,onInputChange:_,onOpen:z,open:F,openOnFocus:V=!1,options:U,readOnly:q=!1,selectOnFocus:X=!e.freeSolo,value:ie}=e,ee=np(A);let Q=P;Q=Ue=>{const Fe=P(Ue);return typeof Fe!="string"?String(Fe):Fe};const te=v.useRef(!1),pe=v.useRef(!0),ae=v.useRef(null),se=v.useRef(null),[re,fe]=v.useState(null),[Z,ce]=v.useState(-1),ge=o?0:-1,we=v.useRef(ge),[me,Se]=id({controlled:ie,default:u,name:c}),[xe,ke]=id({controlled:O,default:"",name:c,state:"inputValue"}),[De,_e]=v.useState(!1),ye=v.useCallback((Ue,Fe,Pt)=>{if(!(N?me.length!(w&&(N?me:[me]).some(Fe=>Fe!==null&&$(Ue,Fe)))),{inputValue:He&&Me?"":xe,getOptionLabel:Q}):[],ot=Lj({filteredOptions:ht,value:me,inputValue:xe});v.useEffect(()=>{const Ue=me!==ot.value;De&&!Ue||x&&!Ue||ye(null,me,"reset")},[me,ye,De,ot.value,x]);const et=Pe&&ht.length>0&&!q,St=ei(Ue=>{Ue===-1?ae.current.focus():re.querySelector(`[data-tag-index="${Ue}"]`).focus()});v.useEffect(()=>{N&&Z>me.length-1&&(ce(-1),St(-1))},[me,N,Z,St]);function On(Ue,Fe){if(!se.current||Ue<0||Ue>=ht.length)return-1;let Pt=Ue;for(;;){const un=se.current.querySelector(`[data-option-index="${Pt}"]`),gn=h?!1:!un||un.disabled||un.getAttribute("aria-disabled")==="true";if(un&&un.hasAttribute("tabindex")&&!gn)return Pt;if(Fe==="next"?Pt=(Pt+1)%ht.length:Pt=(Pt-1+ht.length)%ht.length,Pt===Ue)return-1}}const Ke=ei(({event:Ue,index:Fe,reason:Pt="auto"})=>{if(we.current=Fe,Fe===-1?ae.current.removeAttribute("aria-activedescendant"):ae.current.setAttribute("aria-activedescendant",`${ee}-option-${Fe}`),D&&D(Ue,Fe===-1?null:ht[Fe],Pt),!se.current)return;const un=se.current.querySelector(`[role="option"].${n}-focused`);un&&(un.classList.remove(`${n}-focused`),un.classList.remove(`${n}-focusVisible`));let gn=se.current;if(se.current.getAttribute("role")!=="listbox"&&(gn=se.current.parentElement.querySelector('[role="listbox"]')),!gn)return;if(Fe===-1){gn.scrollTop=0;return}const Vr=se.current.querySelector(`[data-option-index="${Fe}"]`);if(Vr&&(Vr.classList.add(`${n}-focused`),Pt==="keyboard"&&Vr.classList.add(`${n}-focusVisible`),gn.scrollHeight>gn.clientHeight&&Pt!=="mouse"&&Pt!=="touch")){const Zn=Vr,Va=gn.clientHeight+gn.scrollTop,Mu=Zn.offsetTop+Zn.offsetHeight;Mu>Va?gn.scrollTop=Mu-gn.clientHeight:Zn.offsetTop-Zn.offsetHeight*(T?1.3:0){if(!Xe)return;const Vr=On((()=>{const Zn=ht.length-1;if(Fe==="reset")return ge;if(Fe==="start")return 0;if(Fe==="end")return Zn;const Va=we.current+Fe;return Va<0?Va===-1&&k?-1:m&&we.current!==-1||Math.abs(Fe)>1?0:Zn:Va>Zn?Va===Zn+1&&k?-1:m||Math.abs(Fe)>1?Zn:0:Va})(),Pt);if(Ke({index:Vr,reason:un,event:Ue}),r&&Fe!=="reset")if(Vr===-1)ae.current.value=xe;else{const Zn=Q(ht[Vr]);ae.current.value=Zn,Zn.toLowerCase().indexOf(xe.toLowerCase())===0&&xe.length>0&&ae.current.setSelectionRange(xe.length,Zn.length)}}),Qe=()=>{const Ue=(Fe,Pt)=>{const un=Fe?Q(Fe):"",gn=Pt?Q(Pt):"";return un===gn};if(we.current!==-1&&ot.filteredOptions&&ot.filteredOptions.length!==ht.length&&ot.inputValue===xe&&(N?me.length===ot.value.length&&ot.value.every((Fe,Pt)=>Q(me[Pt])===Q(Fe)):Ue(ot.value,me))){const Fe=ot.filteredOptions[we.current];if(Fe)return ht.findIndex(Pt=>Q(Pt)===Q(Fe))}return-1},Et=v.useCallback(()=>{if(!Xe)return;const Ue=Qe();if(Ue!==-1){we.current=Ue;return}const Fe=N?me[0]:me;if(ht.length===0||Fe==null){$e({diff:"reset"});return}if(se.current){if(Fe!=null){const Pt=ht[we.current];if(N&&Pt&&me.findIndex(gn=>$(Pt,gn))!==-1)return;const un=ht.findIndex(gn=>$(gn,Fe));un===-1?$e({diff:"reset"}):Ke({index:un});return}if(we.current>=ht.length-1){Ke({index:ht.length-1});return}Ke({index:we.current})}},[ht.length,N?!1:me,w,$e,Ke,Xe,xe,N]),Xt=ei(Ue=>{vT(se,Ue),Ue&&Et()});v.useEffect(()=>{Et()},[Et]);const $t=Ue=>{Pe||(Ae(!0),We(!0),z&&z(Ue))},bn=(Ue,Fe)=>{Pe&&(Ae(!1),j&&j(Ue,Fe))},Gn=(Ue,Fe,Pt,un)=>{if(N){if(me.length===Fe.length&&me.every((gn,Vr)=>gn===Fe[Vr]))return}else if(me===Fe)return;L&&L(Ue,Fe,Pt,un),Se(Fe)},Jn=v.useRef(!1),Do=(Ue,Fe,Pt="selectOption",un="options")=>{let gn=Pt,Vr=Fe;if(N){Vr=Array.isArray(me)?me.slice():[];const Zn=Vr.findIndex(Va=>$(Fe,Va));Zn===-1?Vr.push(Fe):un!=="freeSolo"&&(Vr.splice(Zn,1),gn="removeOption")}ye(Ue,Vr,gn),Gn(Ue,Vr,gn,{option:Fe}),!f&&(!Ue||!Ue.ctrlKey&&!Ue.metaKey)&&bn(Ue,gn),(a===!0||a==="touch"&&Jn.current||a==="mouse"&&!Jn.current)&&ae.current.blur()};function no(Ue,Fe){if(Ue===-1)return-1;let Pt=Ue;for(;;){if(Fe==="next"&&Pt===me.length||Fe==="previous"&&Pt===-1)return-1;const un=re.querySelector(`[data-tag-index="${Pt}"]`);if(!un||!un.hasAttribute("tabindex")||un.disabled||un.getAttribute("aria-disabled")==="true")Pt+=Fe==="next"?1:-1;else return Pt}}const Bi=(Ue,Fe)=>{if(!N)return;xe===""&&bn(Ue,"toggleInput");let Pt=Z;Z===-1?xe===""&&Fe==="previous"&&(Pt=me.length-1):(Pt+=Fe==="next"?1:-1,Pt<0&&(Pt=0),Pt===me.length&&(Pt=-1)),Pt=no(Pt,Fe),ce(Pt),St(Pt)},Ds=Ue=>{te.current=!0,ke(""),_&&_(Ue,"","clear"),Gn(Ue,N?[]:null,"clear")},tn=Ue=>Fe=>{if(Ue.onKeyDown&&Ue.onKeyDown(Fe),!Fe.defaultMuiPrevented&&(Z!==-1&&!["ArrowLeft","ArrowRight"].includes(Fe.key)&&(ce(-1),St(-1)),Fe.which!==229))switch(Fe.key){case"Home":Xe&&I&&(Fe.preventDefault(),$e({diff:"start",direction:"next",reason:"keyboard",event:Fe}));break;case"End":Xe&&I&&(Fe.preventDefault(),$e({diff:"end",direction:"previous",reason:"keyboard",event:Fe}));break;case"PageUp":Fe.preventDefault(),$e({diff:-d6,direction:"previous",reason:"keyboard",event:Fe}),$t(Fe);break;case"PageDown":Fe.preventDefault(),$e({diff:d6,direction:"next",reason:"keyboard",event:Fe}),$t(Fe);break;case"ArrowDown":Fe.preventDefault(),$e({diff:1,direction:"next",reason:"keyboard",event:Fe}),$t(Fe);break;case"ArrowUp":Fe.preventDefault(),$e({diff:-1,direction:"previous",reason:"keyboard",event:Fe}),$t(Fe);break;case"ArrowLeft":Bi(Fe,"previous");break;case"ArrowRight":Bi(Fe,"next");break;case"Enter":if(we.current!==-1&&Xe){const Pt=ht[we.current],un=C?C(Pt):!1;if(Fe.preventDefault(),un)return;Do(Fe,Pt,"selectOption"),r&&ae.current.setSelectionRange(ae.current.value.length,ae.current.value.length)}else x&&xe!==""&&He===!1&&(N&&Fe.preventDefault(),Do(Fe,xe,"createOption","freeSolo"));break;case"Escape":Xe?(Fe.preventDefault(),Fe.stopPropagation(),bn(Fe,"escape")):l&&(xe!==""||N&&me.length>0)&&(Fe.preventDefault(),Fe.stopPropagation(),Ds(Fe));break;case"Backspace":if(N&&!q&&xe===""&&me.length>0){const Pt=Z===-1?me.length-1:Z,un=me.slice();un.splice(Pt,1),Gn(Fe,un,"removeOption",{option:me[Pt]})}break;case"Delete":if(N&&!q&&xe===""&&me.length>0&&Z!==-1){const Pt=Z,un=me.slice();un.splice(Pt,1),Gn(Fe,un,"removeOption",{option:me[Pt]})}break}},ai=Ue=>{_e(!0),V&&!te.current&&$t(Ue)},tm=Ue=>{if(t(se)){ae.current.focus();return}_e(!1),pe.current=!0,te.current=!1,i&&we.current!==-1&&Xe?Do(Ue,ht[we.current],"blur"):i&&x&&xe!==""?Do(Ue,xe,"blur","freeSolo"):s&&ye(Ue,me,"blur"),bn(Ue,"blur")},zd=Ue=>{const Fe=Ue.target.value;xe!==Fe&&(ke(Fe),We(!1),_&&_(Ue,Fe,"input")),Fe===""?!d&&!N&&Gn(Ue,null,"clear"):$t(Ue)},ku=Ue=>{const Fe=Number(Ue.currentTarget.getAttribute("data-option-index"));we.current!==Fe&&Ke({event:Ue,index:Fe,reason:"mouse"})},Gp=Ue=>{Ke({event:Ue,index:Number(Ue.currentTarget.getAttribute("data-option-index")),reason:"touch"}),Jn.current=!0},qp=Ue=>{const Fe=Number(Ue.currentTarget.getAttribute("data-option-index"));Do(Ue,ht[Fe],"selectOption"),Jn.current=!1},C0=Ue=>Fe=>{const Pt=me.slice();Pt.splice(Ue,1),Gn(Fe,Pt,"removeOption",{option:me[Ue]})},nm=Ue=>{Pe?bn(Ue,"toggleInput"):$t(Ue)},O1=Ue=>{Ue.currentTarget.contains(Ue.target)&&Ue.target.getAttribute("id")!==ee&&Ue.preventDefault()},Kp=Ue=>{Ue.currentTarget.contains(Ue.target)&&(ae.current.focus(),X&&pe.current&&ae.current.selectionEnd-ae.current.selectionStart===0&&ae.current.select(),pe.current=!1)},Go=Ue=>{!p&&(xe===""||!Pe)&&nm(Ue)};let ro=x&&xe.length>0;ro=ro||(N?me.length>0:me!==null);let Wl=ht;return T&&(Wl=ht.reduce((Ue,Fe,Pt)=>{const un=T(Fe);return Ue.length>0&&Ue[Ue.length-1].group===un?Ue[Ue.length-1].options.push(Fe):Ue.push({key:Pt,index:Pt,group:un,options:[Fe]}),Ue},[])),p&&De&&tm(),{getRootProps:(Ue={})=>({"aria-owns":et?`${ee}-listbox`:null,...Ue,onKeyDown:tn(Ue),onMouseDown:O1,onClick:Kp}),getInputLabelProps:()=>({id:`${ee}-label`,htmlFor:ee}),getInputProps:()=>({id:ee,value:xe,onBlur:tm,onFocus:ai,onChange:zd,onMouseDown:Go,"aria-activedescendant":Xe?"":null,"aria-autocomplete":r?"both":"list","aria-controls":et?`${ee}-listbox`:void 0,"aria-expanded":et,autoComplete:"off",ref:ae,autoCapitalize:"none",spellCheck:"false",role:"combobox",disabled:p}),getClearProps:()=>({tabIndex:-1,type:"button",onClick:Ds}),getPopupIndicatorProps:()=>({tabIndex:-1,type:"button",onClick:nm}),getTagProps:({index:Ue})=>({key:Ue,"data-tag-index":Ue,tabIndex:-1,...!q&&{onDelete:C0(Ue)}}),getListboxProps:()=>({role:"listbox",id:`${ee}-listbox`,"aria-labelledby":`${ee}-label`,ref:Xt,onMouseDown:Ue=>{Ue.preventDefault()}}),getOptionProps:({index:Ue,option:Fe})=>{const Pt=(N?me:[me]).some(gn=>gn!=null&&$(Fe,gn)),un=C?C(Fe):!1;return{key:(E==null?void 0:E(Fe))??Q(Fe),tabIndex:-1,role:"option",id:`${ee}-option-${Ue}`,onMouseMove:ku,onClick:qp,onTouchStart:Gp,"data-option-index":Ue,"aria-disabled":un,"aria-selected":Pt}},id:ee,inputValue:xe,value:me,dirty:ro,expanded:Xe&&re,popupOpen:Xe,focused:De||Z!==-1,anchorEl:re,setAnchorEl:fe,focusedTag:Z,groupedOptions:Wl}}var ka="top",Ol="bottom",Al="right",Ma="left",zB="auto",$C=[ka,Ol,Al,Ma],Sv="start",eS="end",MOe="clippingParents",vne="viewport",Y0="popper",ROe="reference",f6=$C.reduce(function(e,t){return e.concat([t+"-"+Sv,t+"-"+eS])},[]),bne=[].concat($C,[zB]).reduce(function(e,t){return e.concat([t,t+"-"+Sv,t+"-"+eS])},[]),$Oe="beforeRead",DOe="read",_Oe="afterRead",NOe="beforeMain",LOe="main",FOe="afterMain",jOe="beforeWrite",BOe="write",zOe="afterWrite",VOe=[$Oe,DOe,_Oe,NOe,LOe,FOe,jOe,BOe,zOe];function gu(e){return e?(e.nodeName||"").toLowerCase():null}function Es(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function gg(e){var t=Es(e).Element;return e instanceof t||e instanceof Element}function bl(e){var t=Es(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function VB(e){if(typeof ShadowRoot>"u")return!1;var t=Es(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function HOe(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},o=t.attributes[n]||{},i=t.elements[n];!bl(i)||!gu(i)||(Object.assign(i.style,r),Object.keys(o).forEach(function(a){var s=o[a];s===!1?i.removeAttribute(a):i.setAttribute(a,s===!0?"":s)}))})}function UOe(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(r){var o=t.elements[r],i=t.attributes[r]||{},a=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),s=a.reduce(function(l,c){return l[c]="",l},{});!bl(o)||!gu(o)||(Object.assign(o.style,s),Object.keys(i).forEach(function(l){o.removeAttribute(l)}))})}}const WOe={name:"applyStyles",enabled:!0,phase:"write",fn:HOe,effect:UOe,requires:["computeStyles"]};function su(e){return e.split("-")[0]}var Qh=Math.max,JT=Math.min,Cv=Math.round;function nN(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function wne(){return!/^((?!chrome|android).)*safari/i.test(nN())}function Ev(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),o=1,i=1;t&&bl(e)&&(o=e.offsetWidth>0&&Cv(r.width)/e.offsetWidth||1,i=e.offsetHeight>0&&Cv(r.height)/e.offsetHeight||1);var a=gg(e)?Es(e):window,s=a.visualViewport,l=!wne()&&n,c=(r.left+(l&&s?s.offsetLeft:0))/o,u=(r.top+(l&&s?s.offsetTop:0))/i,d=r.width/o,f=r.height/i;return{width:d,height:f,top:u,right:c+d,bottom:u+f,left:c,x:c,y:u}}function HB(e){var t=Ev(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function xne(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&VB(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function Pd(e){return Es(e).getComputedStyle(e)}function GOe(e){return["table","td","th"].indexOf(gu(e))>=0}function xp(e){return((gg(e)?e.ownerDocument:e.document)||window.document).documentElement}function JA(e){return gu(e)==="html"?e:e.assignedSlot||e.parentNode||(VB(e)?e.host:null)||xp(e)}function p6(e){return!bl(e)||Pd(e).position==="fixed"?null:e.offsetParent}function qOe(e){var t=/firefox/i.test(nN()),n=/Trident/i.test(nN());if(n&&bl(e)){var r=Pd(e);if(r.position==="fixed")return null}var o=JA(e);for(VB(o)&&(o=o.host);bl(o)&&["html","body"].indexOf(gu(o))<0;){var i=Pd(o);if(i.transform!=="none"||i.perspective!=="none"||i.contain==="paint"||["transform","perspective"].indexOf(i.willChange)!==-1||t&&i.willChange==="filter"||t&&i.filter&&i.filter!=="none")return o;o=o.parentNode}return null}function DC(e){for(var t=Es(e),n=p6(e);n&&GOe(n)&&Pd(n).position==="static";)n=p6(n);return n&&(gu(n)==="html"||gu(n)==="body"&&Pd(n).position==="static")?t:n||qOe(e)||t}function UB(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function ax(e,t,n){return Qh(e,JT(t,n))}function KOe(e,t,n){var r=ax(e,t,n);return r>n?n:r}function Sne(){return{top:0,right:0,bottom:0,left:0}}function Cne(e){return Object.assign({},Sne(),e)}function Ene(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var YOe=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,Cne(typeof t!="number"?t:Ene(t,$C))};function QOe(e){var t,n=e.state,r=e.name,o=e.options,i=n.elements.arrow,a=n.modifiersData.popperOffsets,s=su(n.placement),l=UB(s),c=[Ma,Al].indexOf(s)>=0,u=c?"height":"width";if(!(!i||!a)){var d=YOe(o.padding,n),f=HB(i),p=l==="y"?ka:Ma,h=l==="y"?Ol:Al,m=n.rects.reference[u]+n.rects.reference[l]-a[l]-n.rects.popper[u],y=a[l]-n.rects.reference[l],w=DC(i),x=w?l==="y"?w.clientHeight||0:w.clientWidth||0:0,C=m/2-y/2,E=d[p],P=x-f[u]-d[h],T=x/2-f[u]/2+C,I=ax(E,T,P),A=l;n.modifiersData[r]=(t={},t[A]=I,t.centerOffset=I-T,t)}}function XOe(e){var t=e.state,n=e.options,r=n.element,o=r===void 0?"[data-popper-arrow]":r;o!=null&&(typeof o=="string"&&(o=t.elements.popper.querySelector(o),!o)||xne(t.elements.popper,o)&&(t.elements.arrow=o))}const JOe={name:"arrow",enabled:!0,phase:"main",fn:QOe,effect:XOe,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Pv(e){return e.split("-")[1]}var ZOe={top:"auto",right:"auto",bottom:"auto",left:"auto"};function eAe(e,t){var n=e.x,r=e.y,o=t.devicePixelRatio||1;return{x:Cv(n*o)/o||0,y:Cv(r*o)/o||0}}function h6(e){var t,n=e.popper,r=e.popperRect,o=e.placement,i=e.variation,a=e.offsets,s=e.position,l=e.gpuAcceleration,c=e.adaptive,u=e.roundOffsets,d=e.isFixed,f=a.x,p=f===void 0?0:f,h=a.y,m=h===void 0?0:h,y=typeof u=="function"?u({x:p,y:m}):{x:p,y:m};p=y.x,m=y.y;var w=a.hasOwnProperty("x"),x=a.hasOwnProperty("y"),C=Ma,E=ka,P=window;if(c){var T=DC(n),I="clientHeight",A="clientWidth";if(T===Es(n)&&(T=xp(n),Pd(T).position!=="static"&&s==="absolute"&&(I="scrollHeight",A="scrollWidth")),T=T,o===ka||(o===Ma||o===Al)&&i===eS){E=Ol;var k=d&&T===P&&P.visualViewport?P.visualViewport.height:T[I];m-=k-r.height,m*=l?1:-1}if(o===Ma||(o===ka||o===Ol)&&i===eS){C=Al;var O=d&&T===P&&P.visualViewport?P.visualViewport.width:T[A];p-=O-r.width,p*=l?1:-1}}var $=Object.assign({position:s},c&&ZOe),N=u===!0?eAe({x:p,y:m},Es(n)):{x:p,y:m};if(p=N.x,m=N.y,l){var L;return Object.assign({},$,(L={},L[E]=x?"0":"",L[C]=w?"0":"",L.transform=(P.devicePixelRatio||1)<=1?"translate("+p+"px, "+m+"px)":"translate3d("+p+"px, "+m+"px, 0)",L))}return Object.assign({},$,(t={},t[E]=x?m+"px":"",t[C]=w?p+"px":"",t.transform="",t))}function tAe(e){var t=e.state,n=e.options,r=n.gpuAcceleration,o=r===void 0?!0:r,i=n.adaptive,a=i===void 0?!0:i,s=n.roundOffsets,l=s===void 0?!0:s,c={placement:su(t.placement),variation:Pv(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,h6(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,h6(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const nAe={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:tAe,data:{}};var BE={passive:!0};function rAe(e){var t=e.state,n=e.instance,r=e.options,o=r.scroll,i=o===void 0?!0:o,a=r.resize,s=a===void 0?!0:a,l=Es(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&c.forEach(function(u){u.addEventListener("scroll",n.update,BE)}),s&&l.addEventListener("resize",n.update,BE),function(){i&&c.forEach(function(u){u.removeEventListener("scroll",n.update,BE)}),s&&l.removeEventListener("resize",n.update,BE)}}const oAe={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:rAe,data:{}};var iAe={left:"right",right:"left",bottom:"top",top:"bottom"};function YP(e){return e.replace(/left|right|bottom|top/g,function(t){return iAe[t]})}var aAe={start:"end",end:"start"};function g6(e){return e.replace(/start|end/g,function(t){return aAe[t]})}function WB(e){var t=Es(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function GB(e){return Ev(xp(e)).left+WB(e).scrollLeft}function sAe(e,t){var n=Es(e),r=xp(e),o=n.visualViewport,i=r.clientWidth,a=r.clientHeight,s=0,l=0;if(o){i=o.width,a=o.height;var c=wne();(c||!c&&t==="fixed")&&(s=o.offsetLeft,l=o.offsetTop)}return{width:i,height:a,x:s+GB(e),y:l}}function lAe(e){var t,n=xp(e),r=WB(e),o=(t=e.ownerDocument)==null?void 0:t.body,i=Qh(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),a=Qh(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),s=-r.scrollLeft+GB(e),l=-r.scrollTop;return Pd(o||n).direction==="rtl"&&(s+=Qh(n.clientWidth,o?o.clientWidth:0)-i),{width:i,height:a,x:s,y:l}}function qB(e){var t=Pd(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function Pne(e){return["html","body","#document"].indexOf(gu(e))>=0?e.ownerDocument.body:bl(e)&&qB(e)?e:Pne(JA(e))}function sx(e,t){var n;t===void 0&&(t=[]);var r=Pne(e),o=r===((n=e.ownerDocument)==null?void 0:n.body),i=Es(r),a=o?[i].concat(i.visualViewport||[],qB(r)?r:[]):r,s=t.concat(a);return o?s:s.concat(sx(JA(a)))}function rN(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function cAe(e,t){var n=Ev(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function m6(e,t,n){return t===vne?rN(sAe(e,n)):gg(t)?cAe(t,n):rN(lAe(xp(e)))}function uAe(e){var t=sx(JA(e)),n=["absolute","fixed"].indexOf(Pd(e).position)>=0,r=n&&bl(e)?DC(e):e;return gg(r)?t.filter(function(o){return gg(o)&&xne(o,r)&&gu(o)!=="body"}):[]}function dAe(e,t,n,r){var o=t==="clippingParents"?uAe(e):[].concat(t),i=[].concat(o,[n]),a=i[0],s=i.reduce(function(l,c){var u=m6(e,c,r);return l.top=Qh(u.top,l.top),l.right=JT(u.right,l.right),l.bottom=JT(u.bottom,l.bottom),l.left=Qh(u.left,l.left),l},m6(e,a,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function Tne(e){var t=e.reference,n=e.element,r=e.placement,o=r?su(r):null,i=r?Pv(r):null,a=t.x+t.width/2-n.width/2,s=t.y+t.height/2-n.height/2,l;switch(o){case ka:l={x:a,y:t.y-n.height};break;case Ol:l={x:a,y:t.y+t.height};break;case Al:l={x:t.x+t.width,y:s};break;case Ma:l={x:t.x-n.width,y:s};break;default:l={x:t.x,y:t.y}}var c=o?UB(o):null;if(c!=null){var u=c==="y"?"height":"width";switch(i){case Sv:l[c]=l[c]-(t[u]/2-n[u]/2);break;case eS:l[c]=l[c]+(t[u]/2-n[u]/2);break}}return l}function tS(e,t){t===void 0&&(t={});var n=t,r=n.placement,o=r===void 0?e.placement:r,i=n.strategy,a=i===void 0?e.strategy:i,s=n.boundary,l=s===void 0?MOe:s,c=n.rootBoundary,u=c===void 0?vne:c,d=n.elementContext,f=d===void 0?Y0:d,p=n.altBoundary,h=p===void 0?!1:p,m=n.padding,y=m===void 0?0:m,w=Cne(typeof y!="number"?y:Ene(y,$C)),x=f===Y0?ROe:Y0,C=e.rects.popper,E=e.elements[h?x:f],P=dAe(gg(E)?E:E.contextElement||xp(e.elements.popper),l,u,a),T=Ev(e.elements.reference),I=Tne({reference:T,element:C,strategy:"absolute",placement:o}),A=rN(Object.assign({},C,I)),k=f===Y0?A:T,O={top:P.top-k.top+w.top,bottom:k.bottom-P.bottom+w.bottom,left:P.left-k.left+w.left,right:k.right-P.right+w.right},$=e.modifiersData.offset;if(f===Y0&&$){var N=$[o];Object.keys(O).forEach(function(L){var j=[Al,Ol].indexOf(L)>=0?1:-1,D=[ka,Ol].indexOf(L)>=0?"y":"x";O[L]+=N[D]*j})}return O}function fAe(e,t){t===void 0&&(t={});var n=t,r=n.placement,o=n.boundary,i=n.rootBoundary,a=n.padding,s=n.flipVariations,l=n.allowedAutoPlacements,c=l===void 0?bne:l,u=Pv(r),d=u?s?f6:f6.filter(function(h){return Pv(h)===u}):$C,f=d.filter(function(h){return c.indexOf(h)>=0});f.length===0&&(f=d);var p=f.reduce(function(h,m){return h[m]=tS(e,{placement:m,boundary:o,rootBoundary:i,padding:a})[su(m)],h},{});return Object.keys(p).sort(function(h,m){return p[h]-p[m]})}function pAe(e){if(su(e)===zB)return[];var t=YP(e);return[g6(e),t,g6(t)]}function hAe(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var o=n.mainAxis,i=o===void 0?!0:o,a=n.altAxis,s=a===void 0?!0:a,l=n.fallbackPlacements,c=n.padding,u=n.boundary,d=n.rootBoundary,f=n.altBoundary,p=n.flipVariations,h=p===void 0?!0:p,m=n.allowedAutoPlacements,y=t.options.placement,w=su(y),x=w===y,C=l||(x||!h?[YP(y)]:pAe(y)),E=[y].concat(C).reduce(function(ee,Q){return ee.concat(su(Q)===zB?fAe(t,{placement:Q,boundary:u,rootBoundary:d,padding:c,flipVariations:h,allowedAutoPlacements:m}):Q)},[]),P=t.rects.reference,T=t.rects.popper,I=new Map,A=!0,k=E[0],O=0;O=0,D=j?"width":"height",_=tS(t,{placement:$,boundary:u,rootBoundary:d,altBoundary:f,padding:c}),z=j?L?Al:Ma:L?Ol:ka;P[D]>T[D]&&(z=YP(z));var F=YP(z),V=[];if(i&&V.push(_[N]<=0),s&&V.push(_[z]<=0,_[F]<=0),V.every(function(ee){return ee})){k=$,A=!1;break}I.set($,V)}if(A)for(var U=h?3:1,q=function(Q){var te=E.find(function(pe){var ae=I.get(pe);if(ae)return ae.slice(0,Q).every(function(se){return se})});if(te)return k=te,"break"},X=U;X>0;X--){var ie=q(X);if(ie==="break")break}t.placement!==k&&(t.modifiersData[r]._skip=!0,t.placement=k,t.reset=!0)}}const gAe={name:"flip",enabled:!0,phase:"main",fn:hAe,requiresIfExists:["offset"],data:{_skip:!1}};function y6(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function v6(e){return[ka,Al,Ol,Ma].some(function(t){return e[t]>=0})}function mAe(e){var t=e.state,n=e.name,r=t.rects.reference,o=t.rects.popper,i=t.modifiersData.preventOverflow,a=tS(t,{elementContext:"reference"}),s=tS(t,{altBoundary:!0}),l=y6(a,r),c=y6(s,o,i),u=v6(l),d=v6(c);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}const yAe={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:mAe};function vAe(e,t,n){var r=su(e),o=[Ma,ka].indexOf(r)>=0?-1:1,i=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,a=i[0],s=i[1];return a=a||0,s=(s||0)*o,[Ma,Al].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}function bAe(e){var t=e.state,n=e.options,r=e.name,o=n.offset,i=o===void 0?[0,0]:o,a=bne.reduce(function(u,d){return u[d]=vAe(d,t.rects,i),u},{}),s=a[t.placement],l=s.x,c=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[r]=a}const wAe={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:bAe};function xAe(e){var t=e.state,n=e.name;t.modifiersData[n]=Tne({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const SAe={name:"popperOffsets",enabled:!0,phase:"read",fn:xAe,data:{}};function CAe(e){return e==="x"?"y":"x"}function EAe(e){var t=e.state,n=e.options,r=e.name,o=n.mainAxis,i=o===void 0?!0:o,a=n.altAxis,s=a===void 0?!1:a,l=n.boundary,c=n.rootBoundary,u=n.altBoundary,d=n.padding,f=n.tether,p=f===void 0?!0:f,h=n.tetherOffset,m=h===void 0?0:h,y=tS(t,{boundary:l,rootBoundary:c,padding:d,altBoundary:u}),w=su(t.placement),x=Pv(t.placement),C=!x,E=UB(w),P=CAe(E),T=t.modifiersData.popperOffsets,I=t.rects.reference,A=t.rects.popper,k=typeof m=="function"?m(Object.assign({},t.rects,{placement:t.placement})):m,O=typeof k=="number"?{mainAxis:k,altAxis:k}:Object.assign({mainAxis:0,altAxis:0},k),$=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,N={x:0,y:0};if(T){if(i){var L,j=E==="y"?ka:Ma,D=E==="y"?Ol:Al,_=E==="y"?"height":"width",z=T[E],F=z+y[j],V=z-y[D],U=p?-A[_]/2:0,q=x===Sv?I[_]:A[_],X=x===Sv?-A[_]:-I[_],ie=t.elements.arrow,ee=p&&ie?HB(ie):{width:0,height:0},Q=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:Sne(),te=Q[j],pe=Q[D],ae=ax(0,I[_],ee[_]),se=C?I[_]/2-U-ae-te-O.mainAxis:q-ae-te-O.mainAxis,re=C?-I[_]/2+U+ae+pe+O.mainAxis:X+ae+pe+O.mainAxis,fe=t.elements.arrow&&DC(t.elements.arrow),Z=fe?E==="y"?fe.clientTop||0:fe.clientLeft||0:0,ce=(L=$==null?void 0:$[E])!=null?L:0,ge=z+se-ce-Z,we=z+re-ce,me=ax(p?JT(F,ge):F,z,p?Qh(V,we):V);T[E]=me,N[E]=me-z}if(s){var Se,xe=E==="x"?ka:Ma,ke=E==="x"?Ol:Al,De=T[P],_e=P==="y"?"height":"width",ye=De+y[xe],Pe=De-y[ke],Ae=[ka,Ma].indexOf(w)!==-1,Me=(Se=$==null?void 0:$[P])!=null?Se:0,We=Ae?ye:De-I[_e]-A[_e]-Me+O.altAxis,He=Ae?De+I[_e]+A[_e]-Me-O.altAxis:Pe,Xe=p&&Ae?KOe(We,De,He):ax(p?We:ye,De,p?He:Pe);T[P]=Xe,N[P]=Xe-De}t.modifiersData[r]=N}}const PAe={name:"preventOverflow",enabled:!0,phase:"main",fn:EAe,requiresIfExists:["offset"]};function TAe(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function IAe(e){return e===Es(e)||!bl(e)?WB(e):TAe(e)}function OAe(e){var t=e.getBoundingClientRect(),n=Cv(t.width)/e.offsetWidth||1,r=Cv(t.height)/e.offsetHeight||1;return n!==1||r!==1}function AAe(e,t,n){n===void 0&&(n=!1);var r=bl(t),o=bl(t)&&OAe(t),i=xp(t),a=Ev(e,o,n),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&((gu(t)!=="body"||qB(i))&&(s=IAe(t)),bl(t)?(l=Ev(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):i&&(l.x=GB(i))),{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function kAe(e){var t=new Map,n=new Set,r=[];e.forEach(function(i){t.set(i.name,i)});function o(i){n.add(i.name);var a=[].concat(i.requires||[],i.requiresIfExists||[]);a.forEach(function(s){if(!n.has(s)){var l=t.get(s);l&&o(l)}}),r.push(i)}return e.forEach(function(i){n.has(i.name)||o(i)}),r}function MAe(e){var t=kAe(e);return VOe.reduce(function(n,r){return n.concat(t.filter(function(o){return o.phase===r}))},[])}function RAe(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function $Ae(e){var t=e.reduce(function(n,r){var o=n[r.name];return n[r.name]=o?Object.assign({},o,r,{options:Object.assign({},o.options,r.options),data:Object.assign({},o.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var b6={placement:"bottom",modifiers:[],strategy:"absolute"};function w6(){for(var e=arguments.length,t=new Array(e),n=0;n{i||s(LAe(o)||document.body)},[o,i]),xs(()=>{if(a&&!i)return vT(n,a),()=>{vT(n,null)}},[n,a,i]),i){if(v.isValidElement(r)){const c={ref:l};return v.cloneElement(r,c)}return R.jsx(v.Fragment,{children:r})}return R.jsx(v.Fragment,{children:a&&Eb.createPortal(r,a)})});function FAe(e){return nt("MuiPopper",e)}it("MuiPopper",["root"]);function jAe(e,t){if(t==="ltr")return e;switch(e){case"bottom-end":return"bottom-start";case"bottom-start":return"bottom-end";case"top-end":return"top-start";case"top-start":return"top-end";default:return e}}function oN(e){return typeof e=="function"?e():e}function BAe(e){return e.nodeType!==void 0}const zAe=e=>{const{classes:t}=e;return rt({root:["root"]},FAe,t)},VAe={},HAe=v.forwardRef(function(t,n){const{anchorEl:r,children:o,direction:i,disablePortal:a,modifiers:s,open:l,placement:c,popperOptions:u,popperRef:d,slotProps:f={},slots:p={},TransitionProps:h,ownerState:m,...y}=t,w=v.useRef(null),x=Rr(w,n),C=v.useRef(null),E=Rr(C,d),P=v.useRef(E);xs(()=>{P.current=E},[E]),v.useImperativeHandle(d,()=>C.current,[]);const T=jAe(c,i),[I,A]=v.useState(T),[k,O]=v.useState(oN(r));v.useEffect(()=>{C.current&&C.current.forceUpdate()}),v.useEffect(()=>{r&&O(oN(r))},[r]),xs(()=>{if(!k||!l)return;const D=F=>{A(F.placement)};let _=[{name:"preventOverflow",options:{altBoundary:a}},{name:"flip",options:{altBoundary:a}},{name:"onUpdate",enabled:!0,phase:"afterWrite",fn:({state:F})=>{D(F)}}];s!=null&&(_=_.concat(s)),u&&u.modifiers!=null&&(_=_.concat(u.modifiers));const z=NAe(k,w.current,{placement:T,...u,modifiers:_});return P.current(z),()=>{z.destroy(),P.current(null)}},[k,a,s,l,u,T]);const $={placement:I};h!==null&&($.TransitionProps=h);const N=zAe(t),L=p.root??"div",j=hu({elementType:L,externalSlotProps:f.root,externalForwardedProps:y,additionalProps:{role:"tooltip",ref:x},ownerState:t,className:N.root});return R.jsx(L,{...j,children:typeof o=="function"?o($):o})}),UAe=v.forwardRef(function(t,n){const{anchorEl:r,children:o,container:i,direction:a="ltr",disablePortal:s=!1,keepMounted:l=!1,modifiers:c,open:u,placement:d="bottom",popperOptions:f=VAe,popperRef:p,style:h,transition:m=!1,slotProps:y={},slots:w={},...x}=t,[C,E]=v.useState(!0),P=()=>{E(!1)},T=()=>{E(!0)};if(!l&&!u&&(!m||C))return null;let I;if(i)I=i;else if(r){const O=oN(r);I=O&&BAe(O)?yi(O).body:yi(null).body}const A=!u&&l&&(!m||C)?"none":void 0,k=m?{in:u,onEnter:P,onExited:T}:void 0;return R.jsx(Ine,{disablePortal:s,container:I,children:R.jsx(HAe,{anchorEl:r,direction:a,disablePortal:s,modifiers:c,ref:n,open:m?!C:u,placement:d,popperOptions:f,popperRef:p,slotProps:y,slots:w,...x,style:{position:"fixed",top:0,left:0,display:A,...h},TransitionProps:k,children:o})})}),WAe=oe(UAe,{name:"MuiPopper",slot:"Root",overridesResolver:(e,t)=>t.root})({}),Sp=v.forwardRef(function(t,n){const r=dr(),o=at({props:t,name:"MuiPopper"}),{anchorEl:i,component:a,components:s,componentsProps:l,container:c,disablePortal:u,keepMounted:d,modifiers:f,open:p,placement:h,popperOptions:m,popperRef:y,transition:w,slots:x,slotProps:C,...E}=o,P=(x==null?void 0:x.root)??(s==null?void 0:s.Root),T={anchorEl:i,container:c,disablePortal:u,keepMounted:d,modifiers:f,open:p,placement:h,popperOptions:m,popperRef:y,transition:w,...E};return R.jsx(WAe,{as:a,direction:r?"rtl":"ltr",slots:{root:P},slotProps:C??l,...T,ref:n})});function GAe(e){return nt("MuiListSubheader",e)}it("MuiListSubheader",["root","colorPrimary","colorInherit","gutters","inset","sticky"]);const qAe=e=>{const{classes:t,color:n,disableGutters:r,inset:o,disableSticky:i}=e,a={root:["root",n!=="default"&&`color${Ce(n)}`,!r&&"gutters",o&&"inset",!i&&"sticky"]};return rt(a,GAe,t)},KAe=oe("li",{name:"MuiListSubheader",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="default"&&t[`color${Ce(n.color)}`],!n.disableGutters&&t.gutters,n.inset&&t.inset,!n.disableSticky&&t.sticky]}})(Je(({theme:e})=>({boxSizing:"border-box",lineHeight:"48px",listStyle:"none",color:(e.vars||e).palette.text.secondary,fontFamily:e.typography.fontFamily,fontWeight:e.typography.fontWeightMedium,fontSize:e.typography.pxToRem(14),variants:[{props:{color:"primary"},style:{color:(e.vars||e).palette.primary.main}},{props:{color:"inherit"},style:{color:"inherit"}},{props:({ownerState:t})=>!t.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:t})=>t.inset,style:{paddingLeft:72}},{props:({ownerState:t})=>!t.disableSticky,style:{position:"sticky",top:0,zIndex:1,backgroundColor:(e.vars||e).palette.background.paper}}]}))),iN=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiListSubheader"}),{className:o,color:i="default",component:a="li",disableGutters:s=!1,disableSticky:l=!1,inset:c=!1,...u}=r,d={...r,color:i,component:a,disableGutters:s,disableSticky:l,inset:c},f=qAe(d);return R.jsx(KAe,{as:a,className:de(f.root,o),ref:n,ownerState:d,...u})});iN&&(iN.muiSkipListHighlight=!0);const YAe=ct(R.jsx("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"}),"Cancel");function QAe(e){return nt("MuiChip",e)}const Mn=it("MuiChip",["root","sizeSmall","sizeMedium","colorDefault","colorError","colorInfo","colorPrimary","colorSecondary","colorSuccess","colorWarning","disabled","clickable","clickableColorPrimary","clickableColorSecondary","deletable","deletableColorPrimary","deletableColorSecondary","outlined","filled","outlinedPrimary","outlinedSecondary","filledPrimary","filledSecondary","avatar","avatarSmall","avatarMedium","avatarColorPrimary","avatarColorSecondary","icon","iconSmall","iconMedium","iconColorPrimary","iconColorSecondary","label","labelSmall","labelMedium","deleteIcon","deleteIconSmall","deleteIconMedium","deleteIconColorPrimary","deleteIconColorSecondary","deleteIconOutlinedColorPrimary","deleteIconOutlinedColorSecondary","deleteIconFilledColorPrimary","deleteIconFilledColorSecondary","focusVisible"]),XAe=e=>{const{classes:t,disabled:n,size:r,color:o,iconColor:i,onDelete:a,clickable:s,variant:l}=e,c={root:["root",l,n&&"disabled",`size${Ce(r)}`,`color${Ce(o)}`,s&&"clickable",s&&`clickableColor${Ce(o)}`,a&&"deletable",a&&`deletableColor${Ce(o)}`,`${l}${Ce(o)}`],label:["label",`label${Ce(r)}`],avatar:["avatar",`avatar${Ce(r)}`,`avatarColor${Ce(o)}`],icon:["icon",`icon${Ce(r)}`,`iconColor${Ce(i)}`],deleteIcon:["deleteIcon",`deleteIcon${Ce(r)}`,`deleteIconColor${Ce(o)}`,`deleteIcon${Ce(l)}Color${Ce(o)}`]};return rt(c,QAe,t)},JAe=oe("div",{name:"MuiChip",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e,{color:r,iconColor:o,clickable:i,onDelete:a,size:s,variant:l}=n;return[{[`& .${Mn.avatar}`]:t.avatar},{[`& .${Mn.avatar}`]:t[`avatar${Ce(s)}`]},{[`& .${Mn.avatar}`]:t[`avatarColor${Ce(r)}`]},{[`& .${Mn.icon}`]:t.icon},{[`& .${Mn.icon}`]:t[`icon${Ce(s)}`]},{[`& .${Mn.icon}`]:t[`iconColor${Ce(o)}`]},{[`& .${Mn.deleteIcon}`]:t.deleteIcon},{[`& .${Mn.deleteIcon}`]:t[`deleteIcon${Ce(s)}`]},{[`& .${Mn.deleteIcon}`]:t[`deleteIconColor${Ce(r)}`]},{[`& .${Mn.deleteIcon}`]:t[`deleteIcon${Ce(l)}Color${Ce(r)}`]},t.root,t[`size${Ce(s)}`],t[`color${Ce(r)}`],i&&t.clickable,i&&r!=="default"&&t[`clickableColor${Ce(r)})`],a&&t.deletable,a&&r!=="default"&&t[`deletableColor${Ce(r)}`],t[l],t[`${l}${Ce(r)}`]]}})(Je(({theme:e})=>{const t=e.palette.mode==="light"?e.palette.grey[700]:e.palette.grey[300];return{maxWidth:"100%",fontFamily:e.typography.fontFamily,fontSize:e.typography.pxToRem(13),display:"inline-flex",alignItems:"center",justifyContent:"center",height:32,color:(e.vars||e).palette.text.primary,backgroundColor:(e.vars||e).palette.action.selected,borderRadius:32/2,whiteSpace:"nowrap",transition:e.transitions.create(["background-color","box-shadow"]),cursor:"unset",outline:0,textDecoration:"none",border:0,padding:0,verticalAlign:"middle",boxSizing:"border-box",[`&.${Mn.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity,pointerEvents:"none"},[`& .${Mn.avatar}`]:{marginLeft:5,marginRight:-6,width:24,height:24,color:e.vars?e.vars.palette.Chip.defaultAvatarColor:t,fontSize:e.typography.pxToRem(12)},[`& .${Mn.avatarColorPrimary}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.dark},[`& .${Mn.avatarColorSecondary}`]:{color:(e.vars||e).palette.secondary.contrastText,backgroundColor:(e.vars||e).palette.secondary.dark},[`& .${Mn.avatarSmall}`]:{marginLeft:4,marginRight:-4,width:18,height:18,fontSize:e.typography.pxToRem(10)},[`& .${Mn.icon}`]:{marginLeft:5,marginRight:-6},[`& .${Mn.deleteIcon}`]:{WebkitTapHighlightColor:"transparent",color:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / 0.26)`:xt(e.palette.text.primary,.26),fontSize:22,cursor:"pointer",margin:"0 5px 0 -6px","&:hover":{color:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / 0.4)`:xt(e.palette.text.primary,.4)}},variants:[{props:{size:"small"},style:{height:24,[`& .${Mn.icon}`]:{fontSize:18,marginLeft:4,marginRight:-4},[`& .${Mn.deleteIcon}`]:{fontSize:16,marginRight:4,marginLeft:-4}}},...Object.entries(e.palette).filter(Kn(["contrastText"])).map(([n])=>({props:{color:n},style:{backgroundColor:(e.vars||e).palette[n].main,color:(e.vars||e).palette[n].contrastText,[`& .${Mn.deleteIcon}`]:{color:e.vars?`rgba(${e.vars.palette[n].contrastTextChannel} / 0.7)`:xt(e.palette[n].contrastText,.7),"&:hover, &:active":{color:(e.vars||e).palette[n].contrastText}}}})),{props:n=>n.iconColor===n.color,style:{[`& .${Mn.icon}`]:{color:e.vars?e.vars.palette.Chip.defaultIconColor:t}}},{props:n=>n.iconColor===n.color&&n.color!=="default",style:{[`& .${Mn.icon}`]:{color:"inherit"}}},{props:{onDelete:!0},style:{[`&.${Mn.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:xt(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}}},...Object.entries(e.palette).filter(Kn(["dark"])).map(([n])=>({props:{color:n,onDelete:!0},style:{[`&.${Mn.focusVisible}`]:{background:(e.vars||e).palette[n].dark}}})),{props:{clickable:!0},style:{userSelect:"none",WebkitTapHighlightColor:"transparent",cursor:"pointer","&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:xt(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity)},[`&.${Mn.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:xt(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)},"&:active":{boxShadow:(e.vars||e).shadows[1]}}},...Object.entries(e.palette).filter(Kn(["dark"])).map(([n])=>({props:{color:n,clickable:!0},style:{[`&:hover, &.${Mn.focusVisible}`]:{backgroundColor:(e.vars||e).palette[n].dark}}})),{props:{variant:"outlined"},style:{backgroundColor:"transparent",border:e.vars?`1px solid ${e.vars.palette.Chip.defaultBorder}`:`1px solid ${e.palette.mode==="light"?e.palette.grey[400]:e.palette.grey[700]}`,[`&.${Mn.clickable}:hover`]:{backgroundColor:(e.vars||e).palette.action.hover},[`&.${Mn.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`& .${Mn.avatar}`]:{marginLeft:4},[`& .${Mn.avatarSmall}`]:{marginLeft:2},[`& .${Mn.icon}`]:{marginLeft:4},[`& .${Mn.iconSmall}`]:{marginLeft:2},[`& .${Mn.deleteIcon}`]:{marginRight:5},[`& .${Mn.deleteIconSmall}`]:{marginRight:3}}},...Object.entries(e.palette).filter(Kn()).map(([n])=>({props:{variant:"outlined",color:n},style:{color:(e.vars||e).palette[n].main,border:`1px solid ${e.vars?`rgba(${e.vars.palette[n].mainChannel} / 0.7)`:xt(e.palette[n].main,.7)}`,[`&.${Mn.clickable}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette[n].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:xt(e.palette[n].main,e.palette.action.hoverOpacity)},[`&.${Mn.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette[n].mainChannel} / ${e.vars.palette.action.focusOpacity})`:xt(e.palette[n].main,e.palette.action.focusOpacity)},[`& .${Mn.deleteIcon}`]:{color:e.vars?`rgba(${e.vars.palette[n].mainChannel} / 0.7)`:xt(e.palette[n].main,.7),"&:hover, &:active":{color:(e.vars||e).palette[n].main}}}}))]}})),ZAe=oe("span",{name:"MuiChip",slot:"Label",overridesResolver:(e,t)=>{const{ownerState:n}=e,{size:r}=n;return[t.label,t[`label${Ce(r)}`]]}})({overflow:"hidden",textOverflow:"ellipsis",paddingLeft:12,paddingRight:12,whiteSpace:"nowrap",variants:[{props:{variant:"outlined"},style:{paddingLeft:11,paddingRight:11}},{props:{size:"small"},style:{paddingLeft:8,paddingRight:8}},{props:{size:"small",variant:"outlined"},style:{paddingLeft:7,paddingRight:7}}]});function x6(e){return e.key==="Backspace"||e.key==="Delete"}const mu=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiChip"}),{avatar:o,className:i,clickable:a,color:s="default",component:l,deleteIcon:c,disabled:u=!1,icon:d,label:f,onClick:p,onDelete:h,onKeyDown:m,onKeyUp:y,size:w="medium",variant:x="filled",tabIndex:C,skipFocusWhenDisabled:E=!1,...P}=r,T=v.useRef(null),I=Rr(T,n),A=V=>{V.stopPropagation(),h&&h(V)},k=V=>{V.currentTarget===V.target&&x6(V)&&V.preventDefault(),m&&m(V)},O=V=>{V.currentTarget===V.target&&h&&x6(V)&&h(V),y&&y(V)},$=a!==!1&&p?!0:a,N=$||h?la:l||"div",L={...r,component:N,disabled:u,size:w,color:s,iconColor:v.isValidElement(d)&&d.props.color||s,onDelete:!!h,clickable:$,variant:x},j=XAe(L),D=N===la?{component:l||"div",focusVisibleClassName:j.focusVisible,...h&&{disableRipple:!0}}:{};let _=null;h&&(_=c&&v.isValidElement(c)?v.cloneElement(c,{className:de(c.props.className,j.deleteIcon),onClick:A}):R.jsx(YAe,{className:de(j.deleteIcon),onClick:A}));let z=null;o&&v.isValidElement(o)&&(z=v.cloneElement(o,{className:de(j.avatar,o.props.className)}));let F=null;return d&&v.isValidElement(d)&&(F=v.cloneElement(d,{className:de(j.icon,d.props.className)})),R.jsxs(JAe,{as:N,className:de(j.root,i),disabled:$&&u?!0:void 0,onClick:p,onKeyDown:k,onKeyUp:O,ref:I,tabIndex:E&&u?-1:C,ownerState:L,...D,...P,children:[z||F,R.jsx(ZAe,{className:de(j.label),ownerState:L,children:f}),_]})});function zE(e){return parseInt(e,10)||0}const eke={shadow:{visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"}};function tke(e){return e==null||Object.keys(e).length===0||e.outerHeightStyle===0&&!e.overflowing}const nke=v.forwardRef(function(t,n){const{onChange:r,maxRows:o,minRows:i=1,style:a,value:s,...l}=t,{current:c}=v.useRef(s!=null),u=v.useRef(null),d=Rr(n,u),f=v.useRef(null),p=v.useRef(null),h=v.useCallback(()=>{const w=u.current,C=Ss(w).getComputedStyle(w);if(C.width==="0px")return{outerHeightStyle:0,overflowing:!1};const E=p.current;E.style.width=C.width,E.value=w.value||t.placeholder||"x",E.value.slice(-1)===` -`&&(E.value+=" ");const P=C.boxSizing,T=zE(C.paddingBottom)+zE(C.paddingTop),I=zE(C.borderBottomWidth)+zE(C.borderTopWidth),A=E.scrollHeight;E.value="x";const k=E.scrollHeight;let O=A;i&&(O=Math.max(Number(i)*k,O)),o&&(O=Math.min(Number(o)*k,O)),O=Math.max(O,k);const $=O+(P==="border-box"?T+I:0),N=Math.abs(O-A)<=1;return{outerHeightStyle:$,overflowing:N}},[o,i,t.placeholder]),m=v.useCallback(()=>{const w=h();if(tke(w))return;const x=w.outerHeightStyle,C=u.current;f.current!==x&&(f.current=x,C.style.height=`${x}px`),C.style.overflow=w.overflowing?"hidden":""},[h]);xs(()=>{const w=()=>{m()};let x;const C=PC(w),E=u.current,P=Ss(E);P.addEventListener("resize",C);let T;return typeof ResizeObserver<"u"&&(T=new ResizeObserver(w),T.observe(E)),()=>{C.clear(),cancelAnimationFrame(x),P.removeEventListener("resize",C),T&&T.disconnect()}},[h,m]),xs(()=>{m()});const y=w=>{c||m(),r&&r(w)};return R.jsxs(v.Fragment,{children:[R.jsx("textarea",{value:s,onChange:y,ref:d,rows:i,style:a,...l}),R.jsx("textarea",{"aria-hidden":!0,className:t.className,readOnly:!0,ref:p,tabIndex:-1,style:{...eke.shadow,...a,paddingTop:0,paddingBottom:0}})]})});function Tv(e){return typeof e=="string"}function Cp({props:e,states:t,muiFormControl:n}){return t.reduce((r,o)=>(r[o]=e[o],n&&typeof e[o]>"u"&&(r[o]=n[o]),r),{})}const ZA=v.createContext(void 0);function Fa(){return v.useContext(ZA)}function S6(e){return e!=null&&!(Array.isArray(e)&&e.length===0)}function ZT(e,t=!1){return e&&(S6(e.value)&&e.value!==""||t&&S6(e.defaultValue)&&e.defaultValue!=="")}function rke(e){return e.startAdornment}function oke(e){return nt("MuiInputBase",e)}const rs=it("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"]);var C6;const ek=(e,t)=>{const{ownerState:n}=e;return[t.root,n.formControl&&t.formControl,n.startAdornment&&t.adornedStart,n.endAdornment&&t.adornedEnd,n.error&&t.error,n.size==="small"&&t.sizeSmall,n.multiline&&t.multiline,n.color&&t[`color${Ce(n.color)}`],n.fullWidth&&t.fullWidth,n.hiddenLabel&&t.hiddenLabel]},tk=(e,t)=>{const{ownerState:n}=e;return[t.input,n.size==="small"&&t.inputSizeSmall,n.multiline&&t.inputMultiline,n.type==="search"&&t.inputTypeSearch,n.startAdornment&&t.inputAdornedStart,n.endAdornment&&t.inputAdornedEnd,n.hiddenLabel&&t.inputHiddenLabel]},ike=e=>{const{classes:t,color:n,disabled:r,error:o,endAdornment:i,focused:a,formControl:s,fullWidth:l,hiddenLabel:c,multiline:u,readOnly:d,size:f,startAdornment:p,type:h}=e,m={root:["root",`color${Ce(n)}`,r&&"disabled",o&&"error",l&&"fullWidth",a&&"focused",s&&"formControl",f&&f!=="medium"&&`size${Ce(f)}`,u&&"multiline",p&&"adornedStart",i&&"adornedEnd",c&&"hiddenLabel",d&&"readOnly"],input:["input",r&&"disabled",h==="search"&&"inputTypeSearch",u&&"inputMultiline",f==="small"&&"inputSizeSmall",c&&"inputHiddenLabel",p&&"inputAdornedStart",i&&"inputAdornedEnd",d&&"readOnly"]};return rt(m,oke,t)},nk=oe("div",{name:"MuiInputBase",slot:"Root",overridesResolver:ek})(Je(({theme:e})=>({...e.typography.body1,color:(e.vars||e).palette.text.primary,lineHeight:"1.4375em",boxSizing:"border-box",position:"relative",cursor:"text",display:"inline-flex",alignItems:"center",[`&.${rs.disabled}`]:{color:(e.vars||e).palette.text.disabled,cursor:"default"},variants:[{props:({ownerState:t})=>t.multiline,style:{padding:"4px 0 5px"}},{props:({ownerState:t,size:n})=>t.multiline&&n==="small",style:{paddingTop:1}},{props:({ownerState:t})=>t.fullWidth,style:{width:"100%"}}]}))),rk=oe("input",{name:"MuiInputBase",slot:"Input",overridesResolver:tk})(Je(({theme:e})=>{const t=e.palette.mode==="light",n={color:"currentColor",...e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:t?.42:.5},transition:e.transitions.create("opacity",{duration:e.transitions.duration.shorter})},r={opacity:"0 !important"},o=e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:t?.42:.5};return{font:"inherit",letterSpacing:"inherit",color:"currentColor",padding:"4px 0 5px",border:0,boxSizing:"content-box",background:"none",height:"1.4375em",margin:0,WebkitTapHighlightColor:"transparent",display:"block",minWidth:0,width:"100%","&::-webkit-input-placeholder":n,"&::-moz-placeholder":n,"&::-ms-input-placeholder":n,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{WebkitAppearance:"none"},[`label[data-shrink=false] + .${rs.formControl} &`]:{"&::-webkit-input-placeholder":r,"&::-moz-placeholder":r,"&::-ms-input-placeholder":r,"&:focus::-webkit-input-placeholder":o,"&:focus::-moz-placeholder":o,"&:focus::-ms-input-placeholder":o},[`&.${rs.disabled}`]:{opacity:1,WebkitTextFillColor:(e.vars||e).palette.text.disabled},variants:[{props:({ownerState:i})=>!i.disableInjectingGlobalStyles,style:{animationName:"mui-auto-fill-cancel",animationDuration:"10ms","&:-webkit-autofill":{animationDuration:"5000s",animationName:"mui-auto-fill"}}},{props:{size:"small"},style:{paddingTop:1}},{props:({ownerState:i})=>i.multiline,style:{height:"auto",resize:"none",padding:0,paddingTop:0}},{props:{type:"search"},style:{MozAppearance:"textfield"}}]}})),E6=nPe({"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}),Pb=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiInputBase"}),{"aria-describedby":o,autoComplete:i,autoFocus:a,className:s,color:l,components:c={},componentsProps:u={},defaultValue:d,disabled:f,disableInjectingGlobalStyles:p,endAdornment:h,error:m,fullWidth:y=!1,id:w,inputComponent:x="input",inputProps:C={},inputRef:E,margin:P,maxRows:T,minRows:I,multiline:A=!1,name:k,onBlur:O,onChange:$,onClick:N,onFocus:L,onKeyDown:j,onKeyUp:D,placeholder:_,readOnly:z,renderSuffix:F,rows:V,size:U,slotProps:q={},slots:X={},startAdornment:ie,type:ee="text",value:Q,...te}=r,pe=C.value!=null?C.value:Q,{current:ae}=v.useRef(pe!=null),se=v.useRef(),re=v.useCallback(et=>{},[]),fe=Rr(se,E,C.ref,re),[Z,ce]=v.useState(!1),ge=Fa(),we=Cp({props:r,muiFormControl:ge,states:["color","disabled","error","hiddenLabel","size","required","filled"]});we.focused=ge?ge.focused:Z,v.useEffect(()=>{!ge&&f&&Z&&(ce(!1),O&&O())},[ge,f,Z,O]);const me=ge&&ge.onFilled,Se=ge&&ge.onEmpty,xe=v.useCallback(et=>{ZT(et)?me&&me():Se&&Se()},[me,Se]);xs(()=>{ae&&xe({value:pe})},[pe,xe,ae]);const ke=et=>{L&&L(et),C.onFocus&&C.onFocus(et),ge&&ge.onFocus?ge.onFocus(et):ce(!0)},De=et=>{O&&O(et),C.onBlur&&C.onBlur(et),ge&&ge.onBlur?ge.onBlur(et):ce(!1)},_e=(et,...St)=>{if(!ae){const On=et.target||se.current;if(On==null)throw new Error(vd(1));xe({value:On.value})}C.onChange&&C.onChange(et,...St),$&&$(et,...St)};v.useEffect(()=>{xe(se.current)},[]);const ye=et=>{se.current&&et.currentTarget===et.target&&se.current.focus(),N&&N(et)};let Pe=x,Ae=C;A&&Pe==="input"&&(V?Ae={type:void 0,minRows:V,maxRows:V,...Ae}:Ae={type:void 0,maxRows:T,minRows:I,...Ae},Pe=nke);const Me=et=>{xe(et.animationName==="mui-auto-fill-cancel"?se.current:{value:"x"})};v.useEffect(()=>{ge&&ge.setAdornedStart(!!ie)},[ge,ie]);const We={...r,color:we.color||"primary",disabled:we.disabled,endAdornment:h,error:we.error,focused:we.focused,formControl:ge,fullWidth:y,hiddenLabel:we.hiddenLabel,multiline:A,size:we.size,startAdornment:ie,type:ee},He=ike(We),Xe=X.root||c.Root||nk,ht=q.root||u.root||{},ot=X.input||c.Input||rk;return Ae={...Ae,...q.input??u.input},R.jsxs(v.Fragment,{children:[!p&&typeof E6=="function"&&(C6||(C6=R.jsx(E6,{}))),R.jsxs(Xe,{...ht,ref:n,onClick:ye,...te,...!Tv(Xe)&&{ownerState:{...We,...ht.ownerState}},className:de(He.root,ht.className,s,z&&"MuiInputBase-readOnly"),children:[ie,R.jsx(ZA.Provider,{value:null,children:R.jsx(ot,{"aria-invalid":we.error,"aria-describedby":o,autoComplete:i,autoFocus:a,defaultValue:d,disabled:we.disabled,id:w,onAnimationStart:Me,name:k,placeholder:_,readOnly:z,required:we.required,rows:V,value:pe,onKeyDown:j,onKeyUp:D,type:ee,...Ae,...!Tv(ot)&&{as:Pe,ownerState:{...We,...Ae.ownerState}},ref:fe,className:de(He.input,Ae.className,z&&"MuiInputBase-readOnly"),onBlur:De,onChange:_e,onFocus:ke})}),h,F?F({...we,startAdornment:ie}):null]})]})});function ake(e){return nt("MuiInput",e)}const yf={...rs,...it("MuiInput",["root","underline","input"])};function ske(e){return nt("MuiOutlinedInput",e)}const Js={...rs,...it("MuiOutlinedInput",["root","notchedOutline","input"])};function lke(e){return nt("MuiFilledInput",e)}const os={...rs,...it("MuiFilledInput",["root","underline","input","adornedStart","adornedEnd","sizeSmall","multiline","hiddenLabel"])},One=ct(R.jsx("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown");function cke(e){return nt("MuiAutocomplete",e)}const Sn=it("MuiAutocomplete",["root","expanded","fullWidth","focused","focusVisible","tag","tagSizeSmall","tagSizeMedium","hasPopupIcon","hasClearIcon","inputRoot","input","inputFocused","endAdornment","clearIndicator","popupIndicator","popupIndicatorOpen","popper","popperDisablePortal","paper","listbox","loading","noOptions","option","groupLabel","groupUl"]);var P6,T6;const uke=e=>{const{classes:t,disablePortal:n,expanded:r,focused:o,fullWidth:i,hasClearIcon:a,hasPopupIcon:s,inputFocused:l,popupOpen:c,size:u}=e,d={root:["root",r&&"expanded",o&&"focused",i&&"fullWidth",a&&"hasClearIcon",s&&"hasPopupIcon"],inputRoot:["inputRoot"],input:["input",l&&"inputFocused"],tag:["tag",`tagSize${Ce(u)}`],endAdornment:["endAdornment"],clearIndicator:["clearIndicator"],popupIndicator:["popupIndicator",c&&"popupIndicatorOpen"],popper:["popper",n&&"popperDisablePortal"],paper:["paper"],listbox:["listbox"],loading:["loading"],noOptions:["noOptions"],option:["option"],groupLabel:["groupLabel"],groupUl:["groupUl"]};return rt(d,cke,t)},dke=oe("div",{name:"MuiAutocomplete",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e,{fullWidth:r,hasClearIcon:o,hasPopupIcon:i,inputFocused:a,size:s}=n;return[{[`& .${Sn.tag}`]:t.tag},{[`& .${Sn.tag}`]:t[`tagSize${Ce(s)}`]},{[`& .${Sn.inputRoot}`]:t.inputRoot},{[`& .${Sn.input}`]:t.input},{[`& .${Sn.input}`]:a&&t.inputFocused},t.root,r&&t.fullWidth,i&&t.hasPopupIcon,o&&t.hasClearIcon]}})({[`&.${Sn.focused} .${Sn.clearIndicator}`]:{visibility:"visible"},"@media (pointer: fine)":{[`&:hover .${Sn.clearIndicator}`]:{visibility:"visible"}},[`& .${Sn.tag}`]:{margin:3,maxWidth:"calc(100% - 6px)"},[`& .${Sn.inputRoot}`]:{[`.${Sn.hasPopupIcon}&, .${Sn.hasClearIcon}&`]:{paddingRight:30},[`.${Sn.hasPopupIcon}.${Sn.hasClearIcon}&`]:{paddingRight:56},[`& .${Sn.input}`]:{width:0,minWidth:30}},[`& .${yf.root}`]:{paddingBottom:1,"& .MuiInput-input":{padding:"4px 4px 4px 0px"}},[`& .${yf.root}.${rs.sizeSmall}`]:{[`& .${yf.input}`]:{padding:"2px 4px 3px 0"}},[`& .${Js.root}`]:{padding:9,[`.${Sn.hasPopupIcon}&, .${Sn.hasClearIcon}&`]:{paddingRight:39},[`.${Sn.hasPopupIcon}.${Sn.hasClearIcon}&`]:{paddingRight:65},[`& .${Sn.input}`]:{padding:"7.5px 4px 7.5px 5px"},[`& .${Sn.endAdornment}`]:{right:9}},[`& .${Js.root}.${rs.sizeSmall}`]:{paddingTop:6,paddingBottom:6,paddingLeft:6,[`& .${Sn.input}`]:{padding:"2.5px 4px 2.5px 8px"}},[`& .${os.root}`]:{paddingTop:19,paddingLeft:8,[`.${Sn.hasPopupIcon}&, .${Sn.hasClearIcon}&`]:{paddingRight:39},[`.${Sn.hasPopupIcon}.${Sn.hasClearIcon}&`]:{paddingRight:65},[`& .${os.input}`]:{padding:"7px 4px"},[`& .${Sn.endAdornment}`]:{right:9}},[`& .${os.root}.${rs.sizeSmall}`]:{paddingBottom:1,[`& .${os.input}`]:{padding:"2.5px 4px"}},[`& .${rs.hiddenLabel}`]:{paddingTop:8},[`& .${os.root}.${rs.hiddenLabel}`]:{paddingTop:0,paddingBottom:0,[`& .${Sn.input}`]:{paddingTop:16,paddingBottom:17}},[`& .${os.root}.${rs.hiddenLabel}.${rs.sizeSmall}`]:{[`& .${Sn.input}`]:{paddingTop:8,paddingBottom:9}},[`& .${Sn.input}`]:{flexGrow:1,textOverflow:"ellipsis",opacity:0},variants:[{props:{fullWidth:!0},style:{width:"100%"}},{props:{size:"small"},style:{[`& .${Sn.tag}`]:{margin:2,maxWidth:"calc(100% - 4px)"}}},{props:{inputFocused:!0},style:{[`& .${Sn.input}`]:{opacity:1}}},{props:{multiple:!0},style:{[`& .${Sn.inputRoot}`]:{flexWrap:"wrap"}}}]}),fke=oe("div",{name:"MuiAutocomplete",slot:"EndAdornment",overridesResolver:(e,t)=>t.endAdornment})({position:"absolute",right:0,top:"50%",transform:"translate(0, -50%)"}),pke=oe(vn,{name:"MuiAutocomplete",slot:"ClearIndicator",overridesResolver:(e,t)=>t.clearIndicator})({marginRight:-2,padding:4,visibility:"hidden"}),hke=oe(vn,{name:"MuiAutocomplete",slot:"PopupIndicator",overridesResolver:({ownerState:e},t)=>({...t.popupIndicator,...e.popupOpen&&t.popupIndicatorOpen})})({padding:2,marginRight:-2,variants:[{props:{popupOpen:!0},style:{transform:"rotate(180deg)"}}]}),gke=oe(Sp,{name:"MuiAutocomplete",slot:"Popper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${Sn.option}`]:t.option},t.popper,n.disablePortal&&t.popperDisablePortal]}})(Je(({theme:e})=>({zIndex:(e.vars||e).zIndex.modal,variants:[{props:{disablePortal:!0},style:{position:"absolute"}}]}))),mke=oe(to,{name:"MuiAutocomplete",slot:"Paper",overridesResolver:(e,t)=>t.paper})(Je(({theme:e})=>({...e.typography.body1,overflow:"auto"}))),yke=oe("div",{name:"MuiAutocomplete",slot:"Loading",overridesResolver:(e,t)=>t.loading})(Je(({theme:e})=>({color:(e.vars||e).palette.text.secondary,padding:"14px 16px"}))),vke=oe("div",{name:"MuiAutocomplete",slot:"NoOptions",overridesResolver:(e,t)=>t.noOptions})(Je(({theme:e})=>({color:(e.vars||e).palette.text.secondary,padding:"14px 16px"}))),bke=oe("div",{name:"MuiAutocomplete",slot:"Listbox",overridesResolver:(e,t)=>t.listbox})(Je(({theme:e})=>({listStyle:"none",margin:0,padding:"8px 0",maxHeight:"40vh",overflow:"auto",position:"relative",[`& .${Sn.option}`]:{minHeight:48,display:"flex",overflow:"hidden",justifyContent:"flex-start",alignItems:"center",cursor:"pointer",paddingTop:6,boxSizing:"border-box",outline:"0",WebkitTapHighlightColor:"transparent",paddingBottom:6,paddingLeft:16,paddingRight:16,[e.breakpoints.up("sm")]:{minHeight:"auto"},[`&.${Sn.focused}`]:{backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},'&[aria-disabled="true"]':{opacity:(e.vars||e).palette.action.disabledOpacity,pointerEvents:"none"},[`&.${Sn.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},'&[aria-selected="true"]':{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:xt(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${Sn.focused}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:xt(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:(e.vars||e).palette.action.selected}},[`&.${Sn.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:xt(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}}}}))),wke=oe(iN,{name:"MuiAutocomplete",slot:"GroupLabel",overridesResolver:(e,t)=>t.groupLabel})(Je(({theme:e})=>({backgroundColor:(e.vars||e).palette.background.paper,top:-8}))),xke=oe("ul",{name:"MuiAutocomplete",slot:"GroupUl",overridesResolver:(e,t)=>t.groupUl})({padding:0,[`& .${Sn.option}`]:{paddingLeft:24}}),Ic=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiAutocomplete"}),{autoComplete:o=!1,autoHighlight:i=!1,autoSelect:a=!1,blurOnSelect:s=!1,ChipProps:l,className:c,clearIcon:u=P6||(P6=R.jsx(mne,{fontSize:"small"})),clearOnBlur:d=!r.freeSolo,clearOnEscape:f=!1,clearText:p="Clear",closeText:h="Close",componentsProps:m,defaultValue:y=r.multiple?[]:null,disableClearable:w=!1,disableCloseOnSelect:x=!1,disabled:C=!1,disabledItemsFocusable:E=!1,disableListWrap:P=!1,disablePortal:T=!1,filterOptions:I,filterSelectedOptions:A=!1,forcePopupIcon:k="auto",freeSolo:O=!1,fullWidth:$=!1,getLimitTagsText:N=$n=>`+${$n}`,getOptionDisabled:L,getOptionKey:j,getOptionLabel:D,isOptionEqualToValue:_,groupBy:z,handleHomeEndKeys:F=!r.freeSolo,id:V,includeInputInList:U=!1,inputValue:q,limitTags:X=-1,ListboxComponent:ie,ListboxProps:ee,loading:Q=!1,loadingText:te="Loading…",multiple:pe=!1,noOptionsText:ae="No options",onChange:se,onClose:re,onHighlightChange:fe,onInputChange:Z,onOpen:ce,open:ge,openOnFocus:we=!1,openText:me="Open",options:Se,PaperComponent:xe,PopperComponent:ke,popupIcon:De=T6||(T6=R.jsx(One,{})),readOnly:_e=!1,renderGroup:ye,renderInput:Pe,renderOption:Ae,renderTags:Me,selectOnFocus:We=!r.freeSolo,size:He="medium",slots:Xe={},slotProps:ht={},value:ot,...et}=r,{getRootProps:St,getInputProps:On,getInputLabelProps:Ke,getPopupIndicatorProps:$e,getClearProps:Qe,getTagProps:Et,getListboxProps:Xt,getOptionProps:$t,value:bn,dirty:Gn,expanded:Jn,id:Do,popupOpen:no,focused:Bi,focusedTag:Ds,anchorEl:tn,setAnchorEl:ai,inputValue:tm,groupedOptions:zd}=kOe({...r,componentName:"Autocomplete"}),ku=!w&&!C&&Gn&&!_e,Gp=(!O||k===!0)&&k!==!1,{onMouseDown:qp}=On(),{ref:C0,...nm}=Xt(),Kp=D||($n=>$n.label??$n),Go={...r,disablePortal:T,expanded:Jn,focused:Bi,fullWidth:$,getOptionLabel:Kp,hasClearIcon:ku,hasPopupIcon:Gp,inputFocused:Ds===-1,popupOpen:no,size:He},ro=uke(Go),Wl={slots:{paper:xe,popper:ke,...Xe},slotProps:{chip:l,listbox:ee,...m,...ht}},[Ue,Fe]=Cr("listbox",{elementType:bke,externalForwardedProps:Wl,ownerState:Go,className:ro.listbox,additionalProps:nm,ref:C0}),[Pt,un]=Cr("paper",{elementType:to,externalForwardedProps:Wl,ownerState:Go,className:ro.paper}),[gn,Vr]=Cr("popper",{elementType:Sp,externalForwardedProps:Wl,ownerState:Go,className:ro.popper,additionalProps:{disablePortal:T,style:{width:tn?tn.clientWidth:null},role:"presentation",anchorEl:tn,open:no}});let Zn;if(pe&&bn.length>0){const $n=_s=>({className:ro.tag,disabled:C,...Et(_s)});Me?Zn=Me(bn,$n,Go):Zn=bn.map((_s,Nc)=>{const{key:Qp,...aR}=$n({index:Nc});return R.jsx(mu,{label:Kp(_s),size:He,...aR,...Wl.slotProps.chip},Qp)})}if(X>-1&&Array.isArray(Zn)){const $n=Zn.length-X;!Bi&&$n>0&&(Zn=Zn.splice(0,X),Zn.push(R.jsx("span",{className:ro.tag,children:N($n)},Zn.length)))}const Mu=ye||($n=>R.jsxs("li",{children:[R.jsx(wke,{className:ro.groupLabel,ownerState:Go,component:"div",children:$n.group}),R.jsx(xke,{className:ro.groupUl,ownerState:Go,children:$n.children})]},$n.key)),rm=Ae||(($n,_s)=>{const{key:Nc,...Qp}=$n;return R.jsx("li",{...Qp,children:Kp(_s)},Nc)}),A1=($n,_s)=>{const Nc=$t({option:$n,index:_s});return rm({...Nc,className:ro.option},$n,{selected:Nc["aria-selected"],index:_s,inputValue:tm},Go)},om=Wl.slotProps.clearIndicator,im=Wl.slotProps.popupIndicator,am=$n=>R.jsx(gke,{as:gn,...Vr,children:R.jsx(mke,{as:Pt,...un,children:$n})});let Yp=null;return zd.length>0?Yp=am(R.jsx(Ue,{as:ie,...Fe,children:zd.map(($n,_s)=>z?Mu({key:$n.key,group:$n.group,children:$n.options.map((Nc,Qp)=>A1(Nc,$n.index+Qp))}):A1($n,_s))})):Q&&zd.length===0?Yp=am(R.jsx(yke,{className:ro.loading,ownerState:Go,children:te})):zd.length===0&&!O&&!Q&&(Yp=am(R.jsx(vke,{className:ro.noOptions,ownerState:Go,role:"presentation",onMouseDown:$n=>{$n.preventDefault()},children:ae}))),R.jsxs(v.Fragment,{children:[R.jsx(dke,{ref:n,className:de(ro.root,c),ownerState:Go,...St(et),children:Pe({id:Do,disabled:C,fullWidth:!0,size:He==="small"?"small":void 0,InputLabelProps:Ke(),InputProps:{ref:ai,className:ro.inputRoot,startAdornment:Zn,onMouseDown:$n=>{$n.target===$n.currentTarget&&qp($n)},...(ku||Gp)&&{endAdornment:R.jsxs(fke,{className:ro.endAdornment,ownerState:Go,children:[ku?R.jsx(pke,{...Qe(),"aria-label":p,title:p,ownerState:Go,...om,className:de(ro.clearIndicator,om==null?void 0:om.className),children:u}):null,Gp?R.jsx(hke,{...$e(),disabled:C,"aria-label":no?h:me,title:no?h:me,ownerState:Go,...im,className:de(ro.popupIndicator,im==null?void 0:im.className),children:De}):null]})}},inputProps:{className:ro.input,disabled:C,readOnly:_e,...On()}})}),tn?Yp:null]})}),Ske=ct(R.jsx("path",{d:"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"}),"Person");function Cke(e){return nt("MuiAvatar",e)}const Eke=it("MuiAvatar",["root","colorDefault","circular","rounded","square","img","fallback"]),Pke=e=>{const{classes:t,variant:n,colorDefault:r}=e;return rt({root:["root",n,r&&"colorDefault"],img:["img"],fallback:["fallback"]},Cke,t)},Tke=oe("div",{name:"MuiAvatar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],n.colorDefault&&t.colorDefault]}})(Je(({theme:e})=>({position:"relative",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,width:40,height:40,fontFamily:e.typography.fontFamily,fontSize:e.typography.pxToRem(20),lineHeight:1,borderRadius:"50%",overflow:"hidden",userSelect:"none",variants:[{props:{variant:"rounded"},style:{borderRadius:(e.vars||e).shape.borderRadius}},{props:{variant:"square"},style:{borderRadius:0}},{props:{colorDefault:!0},style:{color:(e.vars||e).palette.background.default,...e.vars?{backgroundColor:e.vars.palette.Avatar.defaultBg}:{backgroundColor:e.palette.grey[400],...e.applyStyles("dark",{backgroundColor:e.palette.grey[600]})}}}]}))),Ike=oe("img",{name:"MuiAvatar",slot:"Img",overridesResolver:(e,t)=>t.img})({width:"100%",height:"100%",textAlign:"center",objectFit:"cover",color:"transparent",textIndent:1e4}),Oke=oe(Ske,{name:"MuiAvatar",slot:"Fallback",overridesResolver:(e,t)=>t.fallback})({width:"75%",height:"75%"});function Ake({crossOrigin:e,referrerPolicy:t,src:n,srcSet:r}){const[o,i]=v.useState(!1);return v.useEffect(()=>{if(!n&&!r)return;i(!1);let a=!0;const s=new Image;return s.onload=()=>{a&&i("loaded")},s.onerror=()=>{a&&i("error")},s.crossOrigin=e,s.referrerPolicy=t,s.src=n,r&&(s.srcset=r),()=>{a=!1}},[e,t,n,r]),o}const Oc=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiAvatar"}),{alt:o,children:i,className:a,component:s="div",slots:l={},slotProps:c={},imgProps:u,sizes:d,src:f,srcSet:p,variant:h="circular",...m}=r;let y=null;const w=Ake({...u,src:f,srcSet:p}),x=f||p,C=x&&w!=="error",E={...r,colorDefault:!C,component:s,variant:h};delete E.ownerState;const P=Pke(E),[T,I]=Cr("img",{className:P.img,elementType:Ike,externalForwardedProps:{slots:l,slotProps:{img:{...u,...c.img}}},additionalProps:{alt:o,src:f,srcSet:p,sizes:d},ownerState:E});return C?y=R.jsx(T,{...I}):i||i===0?y=i:x&&o?y=o[0]:y=R.jsx(Oke,{ownerState:E,className:P.fallback}),R.jsx(Tke,{as:s,className:de(P.root,a),ref:n,...m,ownerState:E,children:y})});function kke(e){return nt("MuiAvatarGroup",e)}const Mke=it("MuiAvatarGroup",["root","avatar"]),I6={small:-16,medium:-8},Rke=e=>{const{classes:t}=e;return rt({root:["root"],avatar:["avatar"]},kke,t)},$ke=oe("div",{name:"MuiAvatarGroup",slot:"Root",overridesResolver:(e,t)=>({[`& .${Mke.avatar}`]:t.avatar,...t.root})})(Je(({theme:e})=>({display:"flex",flexDirection:"row-reverse",[`& .${Eke.root}`]:{border:`2px solid ${(e.vars||e).palette.background.default}`,boxSizing:"content-box",marginLeft:"var(--AvatarGroup-spacing, -8px)","&:last-child":{marginLeft:0}}}))),Dke=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiAvatarGroup"}),{children:o,className:i,component:a="div",componentsProps:s,max:l=5,renderSurplus:c,slotProps:u={},slots:d={},spacing:f="medium",total:p,variant:h="circular",...m}=r;let y=l<2?2:l;const w={...r,max:l,spacing:f,component:a,variant:h},x=Rke(w),C=v.Children.toArray(o).filter(N=>v.isValidElement(N)),E=p||C.length;E===y&&(y+=1),y=Math.min(E+1,y);const P=Math.min(C.length,y-1),T=Math.max(E-y,E-P,0),I=c?c(T):`+${T}`,A=w.spacing&&I6[w.spacing]!==void 0?I6[w.spacing]:-w.spacing||-8,k={slots:d,slotProps:{surplus:u.additionalAvatar??(s==null?void 0:s.additionalAvatar),...s,...u}},[O,$]=Cr("surplus",{elementType:Oc,externalForwardedProps:k,className:x.avatar,ownerState:w,additionalProps:{variant:h}});return R.jsxs($ke,{as:a,ownerState:w,className:de(x.root,i),ref:n,...m,style:{"--AvatarGroup-spacing":A?`${A}px`:void 0,...m.style},children:[T?R.jsx(O,{...$,children:I}):null,C.slice(0,P).reverse().map(N=>v.cloneElement(N,{className:de(N.props.className,x.avatar),variant:N.props.variant||h}))]})}),_ke={entering:{opacity:1},entered:{opacity:1}},Tb=v.forwardRef(function(t,n){const r=Ro(),o={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:i,appear:a=!0,children:s,easing:l,in:c,onEnter:u,onEntered:d,onEntering:f,onExit:p,onExited:h,onExiting:m,style:y,timeout:w=o,TransitionComponent:x=ks,...C}=t,E=v.useRef(null),P=Rr(E,mp(s),n),T=j=>D=>{if(j){const _=E.current;D===void 0?j(_):j(_,D)}},I=T(f),A=T((j,D)=>{LB(j);const _=ip({style:y,timeout:w,easing:l},{mode:"enter"});j.style.webkitTransition=r.transitions.create("opacity",_),j.style.transition=r.transitions.create("opacity",_),u&&u(j,D)}),k=T(d),O=T(m),$=T(j=>{const D=ip({style:y,timeout:w,easing:l},{mode:"exit"});j.style.webkitTransition=r.transitions.create("opacity",D),j.style.transition=r.transitions.create("opacity",D),p&&p(j)}),N=T(h),L=j=>{i&&i(E.current,j)};return R.jsx(x,{appear:a,in:c,nodeRef:E,onEnter:A,onEntered:k,onEntering:I,onExit:$,onExited:N,onExiting:O,addEndListener:L,timeout:w,...C,children:(j,D)=>v.cloneElement(s,{style:{opacity:0,visibility:j==="exited"&&!c?"hidden":void 0,..._ke[j],...y,...s.props.style},ref:P,...D})})});function Nke(e){return nt("MuiBackdrop",e)}it("MuiBackdrop",["root","invisible"]);const Lke=e=>{const{ownerState:t,...n}=e;return n},Fke=e=>{const{classes:t,invisible:n}=e;return rt({root:["root",n&&"invisible"]},Nke,t)},jke=oe("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.invisible&&t.invisible]}})({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent",variants:[{props:{invisible:!0},style:{backgroundColor:"transparent"}}]}),Ane=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiBackdrop"}),{children:o,className:i,component:a="div",invisible:s=!1,open:l,components:c={},componentsProps:u={},slotProps:d={},slots:f={},TransitionComponent:p,transitionDuration:h,...m}=r,y={...r,component:a,invisible:s},w=Fke(y),x={transition:p,root:c.Root,...f},C={...u,...d},E={slots:x,slotProps:C},[P,T]=Cr("root",{elementType:jke,externalForwardedProps:E,className:de(w.root,i),ownerState:y}),[I,A]=Cr("transition",{elementType:Tb,externalForwardedProps:E,ownerState:y}),k=Lke(A);return R.jsx(I,{in:l,timeout:h,...m,...k,children:R.jsx(P,{"aria-hidden":!0,...T,classes:w,ref:n,children:o})})});function Bke(e){const{badgeContent:t,invisible:n=!1,max:r=99,showZero:o=!1}=e,i=Lj({badgeContent:t,max:r});let a=n;n===!1&&t===0&&!o&&(a=!0);const{badgeContent:s,max:l=r}=a?i:e,c=s&&Number(s)>l?`${l}+`:s;return{badgeContent:s,invisible:a,max:l,displayValue:c}}function zke(e){return nt("MuiBadge",e)}const Jd=it("MuiBadge",["root","badge","dot","standard","anchorOriginTopRight","anchorOriginBottomRight","anchorOriginTopLeft","anchorOriginBottomLeft","invisible","colorError","colorInfo","colorPrimary","colorSecondary","colorSuccess","colorWarning","overlapRectangular","overlapCircular","anchorOriginTopLeftCircular","anchorOriginTopLeftRectangular","anchorOriginTopRightCircular","anchorOriginTopRightRectangular","anchorOriginBottomLeftCircular","anchorOriginBottomLeftRectangular","anchorOriginBottomRightCircular","anchorOriginBottomRightRectangular"]),J$=10,Z$=4,Vke=e=>{const{color:t,anchorOrigin:n,invisible:r,overlap:o,variant:i,classes:a={}}=e,s={root:["root"],badge:["badge",i,r&&"invisible",`anchorOrigin${Ce(n.vertical)}${Ce(n.horizontal)}`,`anchorOrigin${Ce(n.vertical)}${Ce(n.horizontal)}${Ce(o)}`,`overlap${Ce(o)}`,t!=="default"&&`color${Ce(t)}`]};return rt(s,zke,a)},Hke=oe("span",{name:"MuiBadge",slot:"Root",overridesResolver:(e,t)=>t.root})({position:"relative",display:"inline-flex",verticalAlign:"middle",flexShrink:0}),Uke=oe("span",{name:"MuiBadge",slot:"Badge",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.badge,t[n.variant],t[`anchorOrigin${Ce(n.anchorOrigin.vertical)}${Ce(n.anchorOrigin.horizontal)}${Ce(n.overlap)}`],n.color!=="default"&&t[`color${Ce(n.color)}`],n.invisible&&t.invisible]}})(Je(({theme:e})=>({display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"center",alignContent:"center",alignItems:"center",position:"absolute",boxSizing:"border-box",fontFamily:e.typography.fontFamily,fontWeight:e.typography.fontWeightMedium,fontSize:e.typography.pxToRem(12),minWidth:J$*2,lineHeight:1,padding:"0 6px",height:J$*2,borderRadius:J$,zIndex:1,transition:e.transitions.create("transform",{easing:e.transitions.easing.easeInOut,duration:e.transitions.duration.enteringScreen}),variants:[...Object.entries(e.palette).filter(Kn(["contrastText"])).map(([t])=>({props:{color:t},style:{backgroundColor:(e.vars||e).palette[t].main,color:(e.vars||e).palette[t].contrastText}})),{props:{variant:"dot"},style:{borderRadius:Z$,height:Z$*2,minWidth:Z$*2,padding:0}},{props:({ownerState:t})=>t.anchorOrigin.vertical==="top"&&t.anchorOrigin.horizontal==="right"&&t.overlap==="rectangular",style:{top:0,right:0,transform:"scale(1) translate(50%, -50%)",transformOrigin:"100% 0%",[`&.${Jd.invisible}`]:{transform:"scale(0) translate(50%, -50%)"}}},{props:({ownerState:t})=>t.anchorOrigin.vertical==="bottom"&&t.anchorOrigin.horizontal==="right"&&t.overlap==="rectangular",style:{bottom:0,right:0,transform:"scale(1) translate(50%, 50%)",transformOrigin:"100% 100%",[`&.${Jd.invisible}`]:{transform:"scale(0) translate(50%, 50%)"}}},{props:({ownerState:t})=>t.anchorOrigin.vertical==="top"&&t.anchorOrigin.horizontal==="left"&&t.overlap==="rectangular",style:{top:0,left:0,transform:"scale(1) translate(-50%, -50%)",transformOrigin:"0% 0%",[`&.${Jd.invisible}`]:{transform:"scale(0) translate(-50%, -50%)"}}},{props:({ownerState:t})=>t.anchorOrigin.vertical==="bottom"&&t.anchorOrigin.horizontal==="left"&&t.overlap==="rectangular",style:{bottom:0,left:0,transform:"scale(1) translate(-50%, 50%)",transformOrigin:"0% 100%",[`&.${Jd.invisible}`]:{transform:"scale(0) translate(-50%, 50%)"}}},{props:({ownerState:t})=>t.anchorOrigin.vertical==="top"&&t.anchorOrigin.horizontal==="right"&&t.overlap==="circular",style:{top:"14%",right:"14%",transform:"scale(1) translate(50%, -50%)",transformOrigin:"100% 0%",[`&.${Jd.invisible}`]:{transform:"scale(0) translate(50%, -50%)"}}},{props:({ownerState:t})=>t.anchorOrigin.vertical==="bottom"&&t.anchorOrigin.horizontal==="right"&&t.overlap==="circular",style:{bottom:"14%",right:"14%",transform:"scale(1) translate(50%, 50%)",transformOrigin:"100% 100%",[`&.${Jd.invisible}`]:{transform:"scale(0) translate(50%, 50%)"}}},{props:({ownerState:t})=>t.anchorOrigin.vertical==="top"&&t.anchorOrigin.horizontal==="left"&&t.overlap==="circular",style:{top:"14%",left:"14%",transform:"scale(1) translate(-50%, -50%)",transformOrigin:"0% 0%",[`&.${Jd.invisible}`]:{transform:"scale(0) translate(-50%, -50%)"}}},{props:({ownerState:t})=>t.anchorOrigin.vertical==="bottom"&&t.anchorOrigin.horizontal==="left"&&t.overlap==="circular",style:{bottom:"14%",left:"14%",transform:"scale(1) translate(-50%, 50%)",transformOrigin:"0% 100%",[`&.${Jd.invisible}`]:{transform:"scale(0) translate(-50%, 50%)"}}},{props:{invisible:!0},style:{transition:e.transitions.create("transform",{easing:e.transitions.easing.easeInOut,duration:e.transitions.duration.leavingScreen})}}]})));function O6(e){return{vertical:(e==null?void 0:e.vertical)??"top",horizontal:(e==null?void 0:e.horizontal)??"right"}}const Wke=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiBadge"}),{anchorOrigin:o,className:i,classes:a,component:s,components:l={},componentsProps:c={},children:u,overlap:d="rectangular",color:f="default",invisible:p=!1,max:h=99,badgeContent:m,slots:y,slotProps:w,showZero:x=!1,variant:C="standard",...E}=r,{badgeContent:P,invisible:T,max:I,displayValue:A}=Bke({max:h,invisible:p,badgeContent:m,showZero:x}),k=Lj({anchorOrigin:O6(o),color:f,overlap:d,variant:C,badgeContent:m}),O=T||P==null&&C!=="dot",{color:$=f,overlap:N=d,anchorOrigin:L,variant:j=C}=O?k:r,D=O6(L),_=j!=="dot"?A:void 0,z={...r,badgeContent:P,invisible:O,max:I,displayValue:_,showZero:x,anchorOrigin:D,color:$,overlap:N,variant:j},F=Vke(z),V=(y==null?void 0:y.root)??l.Root??Hke,U=(y==null?void 0:y.badge)??l.Badge??Uke,q=(w==null?void 0:w.root)??c.root,X=(w==null?void 0:w.badge)??c.badge,ie=hu({elementType:V,externalSlotProps:q,externalForwardedProps:E,additionalProps:{ref:n,as:s},ownerState:z,className:de(q==null?void 0:q.className,F.root,i)}),ee=hu({elementType:U,externalSlotProps:X,ownerState:z,className:de(F.badge,X==null?void 0:X.className)});return R.jsxs(V,{...ie,children:[u,R.jsx(U,{...ee,children:_})]})}),Gke=it("MuiBox",["root"]),qke=TC(),on=ACe({themeId:vc,defaultTheme:qke,defaultClassName:Gke.root,generateClassName:xZ.generate});function Kke(e){return nt("MuiButton",e)}const Om=it("MuiButton",["root","text","textInherit","textPrimary","textSecondary","textSuccess","textError","textInfo","textWarning","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","outlinedSuccess","outlinedError","outlinedInfo","outlinedWarning","contained","containedInherit","containedPrimary","containedSecondary","containedSuccess","containedError","containedInfo","containedWarning","disableElevation","focusVisible","disabled","colorInherit","colorPrimary","colorSecondary","colorSuccess","colorError","colorInfo","colorWarning","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","icon","iconSizeSmall","iconSizeMedium","iconSizeLarge"]),KB=v.createContext({}),kne=v.createContext(void 0),Yke=e=>{const{color:t,disableElevation:n,fullWidth:r,size:o,variant:i,classes:a}=e,s={root:["root",i,`${i}${Ce(t)}`,`size${Ce(o)}`,`${i}Size${Ce(o)}`,`color${Ce(t)}`,n&&"disableElevation",r&&"fullWidth"],label:["label"],startIcon:["icon","startIcon",`iconSize${Ce(o)}`],endIcon:["icon","endIcon",`iconSize${Ce(o)}`]},l=rt(s,Kke,a);return{...a,...l}},Mne=[{props:{size:"small"},style:{"& > *:nth-of-type(1)":{fontSize:18}}},{props:{size:"medium"},style:{"& > *:nth-of-type(1)":{fontSize:20}}},{props:{size:"large"},style:{"& > *:nth-of-type(1)":{fontSize:22}}}],Qke=oe(la,{shouldForwardProp:e=>xi(e)||e==="classes",name:"MuiButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${Ce(n.color)}`],t[`size${Ce(n.size)}`],t[`${n.variant}Size${Ce(n.size)}`],n.color==="inherit"&&t.colorInherit,n.disableElevation&&t.disableElevation,n.fullWidth&&t.fullWidth]}})(Je(({theme:e})=>{const t=e.palette.mode==="light"?e.palette.grey[300]:e.palette.grey[800],n=e.palette.mode==="light"?e.palette.grey.A100:e.palette.grey[700];return{...e.typography.button,minWidth:64,padding:"6px 16px",border:0,borderRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create(["background-color","box-shadow","border-color","color"],{duration:e.transitions.duration.short}),"&:hover":{textDecoration:"none"},[`&.${Om.disabled}`]:{color:(e.vars||e).palette.action.disabled},variants:[{props:{variant:"contained"},style:{color:"var(--variant-containedColor)",backgroundColor:"var(--variant-containedBg)",boxShadow:(e.vars||e).shadows[2],"&:hover":{boxShadow:(e.vars||e).shadows[4],"@media (hover: none)":{boxShadow:(e.vars||e).shadows[2]}},"&:active":{boxShadow:(e.vars||e).shadows[8]},[`&.${Om.focusVisible}`]:{boxShadow:(e.vars||e).shadows[6]},[`&.${Om.disabled}`]:{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground}}},{props:{variant:"outlined"},style:{padding:"5px 15px",border:"1px solid currentColor",borderColor:"var(--variant-outlinedBorder, currentColor)",backgroundColor:"var(--variant-outlinedBg)",color:"var(--variant-outlinedColor)",[`&.${Om.disabled}`]:{border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`}}},{props:{variant:"text"},style:{padding:"6px 8px",color:"var(--variant-textColor)",backgroundColor:"var(--variant-textBg)"}},...Object.entries(e.palette).filter(Kn()).map(([r])=>({props:{color:r},style:{"--variant-textColor":(e.vars||e).palette[r].main,"--variant-outlinedColor":(e.vars||e).palette[r].main,"--variant-outlinedBorder":e.vars?`rgba(${e.vars.palette[r].mainChannel} / 0.5)`:xt(e.palette[r].main,.5),"--variant-containedColor":(e.vars||e).palette[r].contrastText,"--variant-containedBg":(e.vars||e).palette[r].main,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":(e.vars||e).palette[r].dark,"--variant-textBg":e.vars?`rgba(${e.vars.palette[r].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:xt(e.palette[r].main,e.palette.action.hoverOpacity),"--variant-outlinedBorder":(e.vars||e).palette[r].main,"--variant-outlinedBg":e.vars?`rgba(${e.vars.palette[r].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:xt(e.palette[r].main,e.palette.action.hoverOpacity)}}}})),{props:{color:"inherit"},style:{color:"inherit",borderColor:"currentColor","--variant-containedBg":e.vars?e.vars.palette.Button.inheritContainedBg:t,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":e.vars?e.vars.palette.Button.inheritContainedHoverBg:n,"--variant-textBg":e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.hoverOpacity})`:xt(e.palette.text.primary,e.palette.action.hoverOpacity),"--variant-outlinedBg":e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.hoverOpacity})`:xt(e.palette.text.primary,e.palette.action.hoverOpacity)}}}},{props:{size:"small",variant:"text"},style:{padding:"4px 5px",fontSize:e.typography.pxToRem(13)}},{props:{size:"large",variant:"text"},style:{padding:"8px 11px",fontSize:e.typography.pxToRem(15)}},{props:{size:"small",variant:"outlined"},style:{padding:"3px 9px",fontSize:e.typography.pxToRem(13)}},{props:{size:"large",variant:"outlined"},style:{padding:"7px 21px",fontSize:e.typography.pxToRem(15)}},{props:{size:"small",variant:"contained"},style:{padding:"4px 10px",fontSize:e.typography.pxToRem(13)}},{props:{size:"large",variant:"contained"},style:{padding:"8px 22px",fontSize:e.typography.pxToRem(15)}},{props:{disableElevation:!0},style:{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${Om.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${Om.disabled}`]:{boxShadow:"none"}}},{props:{fullWidth:!0},style:{width:"100%"}}]}})),Xke=oe("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.startIcon,t[`iconSize${Ce(n.size)}`]]}})({display:"inherit",marginRight:8,marginLeft:-4,variants:[{props:{size:"small"},style:{marginLeft:-2}},...Mne]}),Jke=oe("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.endIcon,t[`iconSize${Ce(n.size)}`]]}})({display:"inherit",marginRight:-4,marginLeft:8,variants:[{props:{size:"small"},style:{marginRight:-2}},...Mne]}),dt=v.forwardRef(function(t,n){const r=v.useContext(KB),o=v.useContext(kne),i=sg(r,t),a=at({props:i,name:"MuiButton"}),{children:s,color:l="primary",component:c="button",className:u,disabled:d=!1,disableElevation:f=!1,disableFocusRipple:p=!1,endIcon:h,focusVisibleClassName:m,fullWidth:y=!1,size:w="medium",startIcon:x,type:C,variant:E="text",...P}=a,T={...a,color:l,component:c,disabled:d,disableElevation:f,disableFocusRipple:p,fullWidth:y,size:w,type:C,variant:E},I=Yke(T),A=x&&R.jsx(Xke,{className:I.startIcon,ownerState:T,children:x}),k=h&&R.jsx(Jke,{className:I.endIcon,ownerState:T,children:h}),O=o||"";return R.jsxs(Qke,{ownerState:T,className:de(r.className,I.root,u,O),component:c,disabled:d,focusRipple:!p,focusVisibleClassName:de(I.focusVisible,m),ref:n,type:C,...P,classes:I,children:[A,s,k]})});function Zke(e){return nt("MuiButtonGroup",e)}const yn=it("MuiButtonGroup",["root","contained","outlined","text","disableElevation","disabled","firstButton","fullWidth","horizontal","vertical","colorPrimary","colorSecondary","grouped","groupedHorizontal","groupedVertical","groupedText","groupedTextHorizontal","groupedTextVertical","groupedTextPrimary","groupedTextSecondary","groupedOutlined","groupedOutlinedHorizontal","groupedOutlinedVertical","groupedOutlinedPrimary","groupedOutlinedSecondary","groupedContained","groupedContainedHorizontal","groupedContainedVertical","groupedContainedPrimary","groupedContainedSecondary","lastButton","middleButton"]),eMe=(e,t)=>{const{ownerState:n}=e;return[{[`& .${yn.grouped}`]:t.grouped},{[`& .${yn.grouped}`]:t[`grouped${Ce(n.orientation)}`]},{[`& .${yn.grouped}`]:t[`grouped${Ce(n.variant)}`]},{[`& .${yn.grouped}`]:t[`grouped${Ce(n.variant)}${Ce(n.orientation)}`]},{[`& .${yn.grouped}`]:t[`grouped${Ce(n.variant)}${Ce(n.color)}`]},{[`& .${yn.firstButton}`]:t.firstButton},{[`& .${yn.lastButton}`]:t.lastButton},{[`& .${yn.middleButton}`]:t.middleButton},t.root,t[n.variant],n.disableElevation===!0&&t.disableElevation,n.fullWidth&&t.fullWidth,n.orientation==="vertical"&&t.vertical]},tMe=e=>{const{classes:t,color:n,disabled:r,disableElevation:o,fullWidth:i,orientation:a,variant:s}=e,l={root:["root",s,a,i&&"fullWidth",o&&"disableElevation",`color${Ce(n)}`],grouped:["grouped",`grouped${Ce(a)}`,`grouped${Ce(s)}`,`grouped${Ce(s)}${Ce(a)}`,`grouped${Ce(s)}${Ce(n)}`,r&&"disabled"],firstButton:["firstButton"],lastButton:["lastButton"],middleButton:["middleButton"]};return rt(l,Zke,t)},nMe=oe("div",{name:"MuiButtonGroup",slot:"Root",overridesResolver:eMe})(Je(({theme:e})=>({display:"inline-flex",borderRadius:(e.vars||e).shape.borderRadius,variants:[{props:{variant:"contained"},style:{boxShadow:(e.vars||e).shadows[2]}},{props:{disableElevation:!0},style:{boxShadow:"none"}},{props:{fullWidth:!0},style:{width:"100%"}},{props:{orientation:"vertical"},style:{flexDirection:"column",[`& .${yn.lastButton},& .${yn.middleButton}`]:{borderTopRightRadius:0,borderTopLeftRadius:0},[`& .${yn.firstButton},& .${yn.middleButton}`]:{borderBottomRightRadius:0,borderBottomLeftRadius:0}}},{props:{orientation:"horizontal"},style:{[`& .${yn.firstButton},& .${yn.middleButton}`]:{borderTopRightRadius:0,borderBottomRightRadius:0},[`& .${yn.lastButton},& .${yn.middleButton}`]:{borderTopLeftRadius:0,borderBottomLeftRadius:0}}},{props:{variant:"text",orientation:"horizontal"},style:{[`& .${yn.firstButton},& .${yn.middleButton}`]:{borderRight:e.vars?`1px solid rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:`1px solid ${e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"}`,[`&.${yn.disabled}`]:{borderRight:`1px solid ${(e.vars||e).palette.action.disabled}`}}}},{props:{variant:"text",orientation:"vertical"},style:{[`& .${yn.firstButton},& .${yn.middleButton}`]:{borderBottom:e.vars?`1px solid rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:`1px solid ${e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"}`,[`&.${yn.disabled}`]:{borderBottom:`1px solid ${(e.vars||e).palette.action.disabled}`}}}},...Object.entries(e.palette).filter(Kn()).flatMap(([t])=>[{props:{variant:"text",color:t},style:{[`& .${yn.firstButton},& .${yn.middleButton}`]:{borderColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / 0.5)`:xt(e.palette[t].main,.5)}}}]),{props:{variant:"outlined",orientation:"horizontal"},style:{[`& .${yn.firstButton},& .${yn.middleButton}`]:{borderRightColor:"transparent","&:hover":{borderRightColor:"currentColor"}},[`& .${yn.lastButton},& .${yn.middleButton}`]:{marginLeft:-1}}},{props:{variant:"outlined",orientation:"vertical"},style:{[`& .${yn.firstButton},& .${yn.middleButton}`]:{borderBottomColor:"transparent","&:hover":{borderBottomColor:"currentColor"}},[`& .${yn.lastButton},& .${yn.middleButton}`]:{marginTop:-1}}},{props:{variant:"contained",orientation:"horizontal"},style:{[`& .${yn.firstButton},& .${yn.middleButton}`]:{borderRight:`1px solid ${(e.vars||e).palette.grey[400]}`,[`&.${yn.disabled}`]:{borderRight:`1px solid ${(e.vars||e).palette.action.disabled}`}}}},{props:{variant:"contained",orientation:"vertical"},style:{[`& .${yn.firstButton},& .${yn.middleButton}`]:{borderBottom:`1px solid ${(e.vars||e).palette.grey[400]}`,[`&.${yn.disabled}`]:{borderBottom:`1px solid ${(e.vars||e).palette.action.disabled}`}}}},...Object.entries(e.palette).filter(Kn(["dark"])).map(([t])=>({props:{variant:"contained",color:t},style:{[`& .${yn.firstButton},& .${yn.middleButton}`]:{borderColor:(e.vars||e).palette[t].dark}}}))],[`& .${yn.grouped}`]:{minWidth:40,boxShadow:"none",props:{variant:"contained"},style:{"&:hover":{boxShadow:"none"}}}}))),aN=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiButtonGroup"}),{children:o,className:i,color:a="primary",component:s="div",disabled:l=!1,disableElevation:c=!1,disableFocusRipple:u=!1,disableRipple:d=!1,fullWidth:f=!1,orientation:p="horizontal",size:h="medium",variant:m="outlined",...y}=r,w={...r,color:a,component:s,disabled:l,disableElevation:c,disableFocusRipple:u,disableRipple:d,fullWidth:f,orientation:p,size:h,variant:m},x=tMe(w),C=v.useMemo(()=>({className:x.grouped,color:a,disabled:l,disableElevation:c,disableFocusRipple:u,disableRipple:d,fullWidth:f,size:h,variant:m}),[a,l,c,u,d,f,h,m,x.grouped]),E=NZ(o),P=E.length,T=I=>{const A=I===0,k=I===P-1;return A&&k?"":A?x.firstButton:k?x.lastButton:x.middleButton};return R.jsx(nMe,{as:s,role:"group",className:de(x.root,i),ref:n,ownerState:w,...y,children:R.jsx(KB.Provider,{value:C,children:E.map((I,A)=>R.jsx(kne.Provider,{value:T(A),children:I},A))})})});function rMe(e){return nt("MuiCard",e)}it("MuiCard",["root"]);const oMe=e=>{const{classes:t}=e;return rt({root:["root"]},rMe,t)},iMe=oe(to,{name:"MuiCard",slot:"Root",overridesResolver:(e,t)=>t.root})({overflow:"hidden"}),bo=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiCard"}),{className:o,raised:i=!1,...a}=r,s={...r,raised:i},l=oMe(s);return R.jsx(iMe,{className:de(l.root,o),elevation:i?8:void 0,ref:n,ownerState:s,...a})});function aMe(e){return nt("MuiCardActionArea",e)}const eD=it("MuiCardActionArea",["root","focusVisible","focusHighlight"]),sMe=e=>{const{classes:t}=e;return rt({root:["root"],focusHighlight:["focusHighlight"]},aMe,t)},lMe=oe(la,{name:"MuiCardActionArea",slot:"Root",overridesResolver:(e,t)=>t.root})(Je(({theme:e})=>({display:"block",textAlign:"inherit",borderRadius:"inherit",width:"100%",[`&:hover .${eD.focusHighlight}`]:{opacity:(e.vars||e).palette.action.hoverOpacity,"@media (hover: none)":{opacity:0}},[`&.${eD.focusVisible} .${eD.focusHighlight}`]:{opacity:(e.vars||e).palette.action.focusOpacity}}))),cMe=oe("span",{name:"MuiCardActionArea",slot:"FocusHighlight",overridesResolver:(e,t)=>t.focusHighlight})(Je(({theme:e})=>({overflow:"hidden",pointerEvents:"none",position:"absolute",top:0,right:0,bottom:0,left:0,borderRadius:"inherit",opacity:0,backgroundColor:"currentcolor",transition:e.transitions.create("opacity",{duration:e.transitions.duration.short})}))),Rne=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiCardActionArea"}),{children:o,className:i,focusVisibleClassName:a,...s}=r,l=r,c=sMe(l);return R.jsxs(lMe,{className:de(c.root,i),focusVisibleClassName:de(a,c.focusVisible),ref:n,ownerState:l,...s,children:[o,R.jsx(cMe,{className:c.focusHighlight,ownerState:l})]})});function uMe(e){return nt("MuiCardActions",e)}it("MuiCardActions",["root","spacing"]);const dMe=e=>{const{classes:t,disableSpacing:n}=e;return rt({root:["root",!n&&"spacing"]},uMe,t)},fMe=oe("div",{name:"MuiCardActions",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableSpacing&&t.spacing]}})({display:"flex",alignItems:"center",padding:8,variants:[{props:{disableSpacing:!1},style:{"& > :not(style) ~ :not(style)":{marginLeft:8}}}]}),Ms=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiCardActions"}),{disableSpacing:o=!1,className:i,...a}=r,s={...r,disableSpacing:o},l=dMe(s);return R.jsx(fMe,{className:de(l.root,i),ownerState:s,ref:n,...a})});function pMe(e){return nt("MuiCardContent",e)}it("MuiCardContent",["root"]);const hMe=e=>{const{classes:t}=e;return rt({root:["root"]},pMe,t)},gMe=oe("div",{name:"MuiCardContent",slot:"Root",overridesResolver:(e,t)=>t.root})({padding:16,"&:last-child":{paddingBottom:24}}),_i=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiCardContent"}),{className:o,component:i="div",...a}=r,s={...r,component:i},l=hMe(s);return R.jsx(gMe,{as:i,className:de(l.root,o),ownerState:s,ref:n,...a})});function mMe(e){return nt("MuiCardHeader",e)}const eI=it("MuiCardHeader",["root","avatar","action","content","title","subheader"]),yMe=e=>{const{classes:t}=e;return rt({root:["root"],avatar:["avatar"],action:["action"],content:["content"],title:["title"],subheader:["subheader"]},mMe,t)},vMe=oe("div",{name:"MuiCardHeader",slot:"Root",overridesResolver:(e,t)=>({[`& .${eI.title}`]:t.title,[`& .${eI.subheader}`]:t.subheader,...t.root})})({display:"flex",alignItems:"center",padding:16}),bMe=oe("div",{name:"MuiCardHeader",slot:"Avatar",overridesResolver:(e,t)=>t.avatar})({display:"flex",flex:"0 0 auto",marginRight:16}),wMe=oe("div",{name:"MuiCardHeader",slot:"Action",overridesResolver:(e,t)=>t.action})({flex:"0 0 auto",alignSelf:"flex-start",marginTop:-4,marginRight:-8,marginBottom:-4}),xMe=oe("div",{name:"MuiCardHeader",slot:"Content",overridesResolver:(e,t)=>t.content})({flex:"1 1 auto",[`.${QT.root}:where(& .${eI.title})`]:{display:"block"},[`.${QT.root}:where(& .${eI.subheader})`]:{display:"block"}}),Su=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiCardHeader"}),{action:o,avatar:i,className:a,component:s="div",disableTypography:l=!1,subheader:c,subheaderTypographyProps:u,title:d,titleTypographyProps:f,...p}=r,h={...r,component:s,disableTypography:l},m=yMe(h);let y=d;y!=null&&y.type!==st&&!l&&(y=R.jsx(st,{variant:i?"body2":"h5",className:m.title,component:"span",...f,children:y}));let w=c;return w!=null&&w.type!==st&&!l&&(w=R.jsx(st,{variant:i?"body2":"body1",className:m.subheader,color:"textSecondary",component:"span",...u,children:w})),R.jsxs(vMe,{className:de(m.root,a),as:s,ref:n,ownerState:h,...p,children:[i&&R.jsx(bMe,{className:m.avatar,ownerState:h,children:i}),R.jsxs(xMe,{className:m.content,ownerState:h,children:[y,w]}),o&&R.jsx(wMe,{className:m.action,ownerState:h,children:o})]})});function SMe(e){return nt("MuiCardMedia",e)}it("MuiCardMedia",["root","media","img"]);const CMe=e=>{const{classes:t,isMediaComponent:n,isImageComponent:r}=e;return rt({root:["root",n&&"media",r&&"img"]},SMe,t)},EMe=oe("div",{name:"MuiCardMedia",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e,{isMediaComponent:r,isImageComponent:o}=n;return[t.root,r&&t.media,o&&t.img]}})({display:"block",backgroundSize:"cover",backgroundRepeat:"no-repeat",backgroundPosition:"center",variants:[{props:{isMediaComponent:!0},style:{width:"100%"}},{props:{isImageComponent:!0},style:{objectFit:"cover"}}]}),PMe=["video","audio","picture","iframe","img"],TMe=["picture","img"],yu=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiCardMedia"}),{children:o,className:i,component:a="div",image:s,src:l,style:c,...u}=r,d=PMe.includes(a),f=!d&&s?{backgroundImage:`url("${s}")`,...c}:c,p={...r,component:a,isMediaComponent:d,isImageComponent:TMe.includes(a)},h=CMe(p);return R.jsx(EMe,{className:de(h.root,i),as:a,role:!d&&s?"img":void 0,ref:n,style:f,ownerState:p,src:d?s||l:void 0,...u,children:o})});function IMe(e){return nt("PrivateSwitchBase",e)}it("PrivateSwitchBase",["root","checked","disabled","input","edgeStart","edgeEnd"]);const OMe=e=>{const{classes:t,checked:n,disabled:r,edge:o}=e,i={root:["root",n&&"checked",r&&"disabled",o&&`edge${Ce(o)}`],input:["input"]};return rt(i,IMe,t)},AMe=oe(la)({padding:9,borderRadius:"50%",variants:[{props:{edge:"start",size:"small"},style:{marginLeft:-3}},{props:({edge:e,ownerState:t})=>e==="start"&&t.size!=="small",style:{marginLeft:-12}},{props:{edge:"end",size:"small"},style:{marginRight:-3}},{props:({edge:e,ownerState:t})=>e==="end"&&t.size!=="small",style:{marginRight:-12}}]}),kMe=oe("input",{shouldForwardProp:xi})({cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}),$ne=v.forwardRef(function(t,n){const{autoFocus:r,checked:o,checkedIcon:i,className:a,defaultChecked:s,disabled:l,disableFocusRipple:c=!1,edge:u=!1,icon:d,id:f,inputProps:p,inputRef:h,name:m,onBlur:y,onChange:w,onFocus:x,readOnly:C,required:E=!1,tabIndex:P,type:T,value:I,...A}=t,[k,O]=id({controlled:o,default:!!s,name:"SwitchBase",state:"checked"}),$=Fa(),N=V=>{x&&x(V),$&&$.onFocus&&$.onFocus(V)},L=V=>{y&&y(V),$&&$.onBlur&&$.onBlur(V)},j=V=>{if(V.nativeEvent.defaultPrevented)return;const U=V.target.checked;O(U),w&&w(V,U)};let D=l;$&&typeof D>"u"&&(D=$.disabled);const _=T==="checkbox"||T==="radio",z={...t,checked:k,disabled:D,disableFocusRipple:c,edge:u},F=OMe(z);return R.jsxs(AMe,{component:"span",className:de(F.root,a),centerRipple:!0,focusRipple:!c,disabled:D,tabIndex:null,role:void 0,onFocus:N,onBlur:L,ownerState:z,ref:n,...A,children:[R.jsx(kMe,{autoFocus:r,checked:o,defaultChecked:s,className:F.input,disabled:D,id:_?f:void 0,name:m,onChange:j,readOnly:C,ref:h,required:E,ownerState:z,tabIndex:P,type:T,...T==="checkbox"&&I===void 0?{}:{value:I},...p}),k?i:d]})}),MMe=ct(R.jsx("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"}),"CheckBoxOutlineBlank"),RMe=ct(R.jsx("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckBox"),$Me=ct(R.jsx("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z"}),"IndeterminateCheckBox");function DMe(e){return nt("MuiCheckbox",e)}const tD=it("MuiCheckbox",["root","checked","disabled","indeterminate","colorPrimary","colorSecondary","sizeSmall","sizeMedium"]),_Me=e=>{const{classes:t,indeterminate:n,color:r,size:o}=e,i={root:["root",n&&"indeterminate",`color${Ce(r)}`,`size${Ce(o)}`]},a=rt(i,DMe,t);return{...t,...a}},NMe=oe($ne,{shouldForwardProp:e=>xi(e)||e==="classes",name:"MuiCheckbox",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.indeterminate&&t.indeterminate,t[`size${Ce(n.size)}`],n.color!=="default"&&t[`color${Ce(n.color)}`]]}})(Je(({theme:e})=>({color:(e.vars||e).palette.text.secondary,variants:[{props:{color:"default",disableRipple:!1},style:{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:xt(e.palette.action.active,e.palette.action.hoverOpacity)}}},...Object.entries(e.palette).filter(Kn()).map(([t])=>({props:{color:t,disableRipple:!1},style:{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:xt(e.palette[t].main,e.palette.action.hoverOpacity)}}})),...Object.entries(e.palette).filter(Kn()).map(([t])=>({props:{color:t},style:{[`&.${tD.checked}, &.${tD.indeterminate}`]:{color:(e.vars||e).palette[t].main},[`&.${tD.disabled}`]:{color:(e.vars||e).palette.action.disabled}}})),{props:{disableRipple:!1},style:{"&:hover":{"@media (hover: none)":{backgroundColor:"transparent"}}}}]}))),LMe=R.jsx(RMe,{}),FMe=R.jsx(MMe,{}),jMe=R.jsx($Me,{}),BMe=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiCheckbox"}),{checkedIcon:o=LMe,color:i="primary",icon:a=FMe,indeterminate:s=!1,indeterminateIcon:l=jMe,inputProps:c,size:u="medium",disableRipple:d=!1,className:f,...p}=r,h=s?l:a,m=s?l:o,y={...r,disableRipple:d,color:i,indeterminate:s,size:u},w=_Me(y);return R.jsx(NMe,{type:"checkbox",inputProps:{"data-indeterminate":s,...c},icon:v.cloneElement(h,{fontSize:h.props.fontSize??u}),checkedIcon:v.cloneElement(m,{fontSize:m.props.fontSize??u}),ownerState:y,ref:n,className:de(w.root,f),disableRipple:d,...p,classes:w})});function zMe(e){return nt("MuiCircularProgress",e)}it("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);const Zd=44,sN=xu` +`,ZIe=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiTouchRipple"}),{center:o=!1,classes:i={},className:a,...s}=r,[l,c]=v.useState([]),u=v.useRef(0),d=v.useRef(null);v.useEffect(()=>{d.current&&(d.current(),d.current=null)},[l]);const f=v.useRef(!1),p=Mf(),h=v.useRef(null),m=v.useRef(null),y=v.useCallback(E=>{const{pulsate:P,rippleX:T,rippleY:I,rippleSize:A,cb:k}=E;c(O=>[...O,R.jsx(JIe,{classes:{ripple:de(i.ripple,ll.ripple),rippleVisible:de(i.rippleVisible,ll.rippleVisible),ripplePulsate:de(i.ripplePulsate,ll.ripplePulsate),child:de(i.child,ll.child),childLeaving:de(i.childLeaving,ll.childLeaving),childPulsate:de(i.childPulsate,ll.childPulsate)},timeout:sN,pulsate:P,rippleX:T,rippleY:I,rippleSize:A},u.current)]),u.current+=1,d.current=k},[i]),w=v.useCallback((E={},P={},T=()=>{})=>{const{pulsate:I=!1,center:A=o||P.pulsate,fakeElement:k=!1}=P;if((E==null?void 0:E.type)==="mousedown"&&f.current){f.current=!1;return}(E==null?void 0:E.type)==="touchstart"&&(f.current=!0);const O=k?null:m.current,$=O?O.getBoundingClientRect():{width:0,height:0,left:0,top:0};let N,L,j;if(A||E===void 0||E.clientX===0&&E.clientY===0||!E.clientX&&!E.touches)N=Math.round($.width/2),L=Math.round($.height/2);else{const{clientX:D,clientY:_}=E.touches&&E.touches.length>0?E.touches[0]:E;N=Math.round(D-$.left),L=Math.round(_-$.top)}if(A)j=Math.sqrt((2*$.width**2+$.height**2)/3),j%2===0&&(j+=1);else{const D=Math.max(Math.abs((O?O.clientWidth:0)-N),N)*2+2,_=Math.max(Math.abs((O?O.clientHeight:0)-L),L)*2+2;j=Math.sqrt(D**2+_**2)}E!=null&&E.touches?h.current===null&&(h.current=()=>{y({pulsate:I,rippleX:N,rippleY:L,rippleSize:j,cb:T})},p.start(qIe,()=>{h.current&&(h.current(),h.current=null)})):y({pulsate:I,rippleX:N,rippleY:L,rippleSize:j,cb:T})},[o,y,p]),x=v.useCallback(()=>{w({},{pulsate:!0})},[w]),S=v.useCallback((E,P)=>{if(p.clear(),(E==null?void 0:E.type)==="touchend"&&h.current){h.current(),h.current=null,p.start(0,()=>{S(E,P)});return}h.current=null,c(T=>T.length>0?T.slice(1):T),d.current=P},[p]);return v.useImperativeHandle(n,()=>({pulsate:x,start:w,stop:S}),[x,w,S]),R.jsx(XIe,{className:de(ll.root,i.root,a),ref:m,...s,children:R.jsx(FC,{component:null,exit:!0,children:l})})});function eOe(e){return nt("MuiButtonBase",e)}const tOe=it("MuiButtonBase",["root","disabled","focusVisible"]),nOe=e=>{const{disabled:t,focusVisible:n,focusVisibleClassName:r,classes:o}=e,a=rt({root:["root",t&&"disabled",n&&"focusVisible"]},eOe,o);return n&&r&&(a.root+=` ${r}`),a},rOe=re("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${tOe.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),ca=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiButtonBase"}),{action:o,centerRipple:i=!1,children:a,className:s,component:l="button",disabled:c=!1,disableRipple:u=!1,disableTouchRipple:d=!1,focusRipple:f=!1,focusVisibleClassName:p,LinkComponent:h="a",onBlur:m,onClick:y,onContextMenu:w,onDragLeave:x,onFocus:S,onFocusVisible:E,onKeyDown:P,onKeyUp:T,onMouseDown:I,onMouseLeave:A,onMouseUp:k,onTouchEnd:O,onTouchMove:$,onTouchStart:N,tabIndex:L=0,TouchRippleProps:j,touchRippleRef:D,type:_,...z}=r,F=v.useRef(null),V=UIe(),U=Rr(V.ref,D),[K,X]=v.useState(!1);c&&K&&X(!1),v.useImperativeHandle(o,()=>({focusVisible:()=>{X(!0),F.current.focus()}}),[]);const ie=V.shouldMount&&!u&&!c;v.useEffect(()=>{K&&f&&!u&&V.pulsate()},[u,f,K,V]);function ee(Pe,Ae,Me=d){return ei(We=>(Ae&&Ae(We),Me||V[Pe](We),!0))}const Q=ee("start",I),te=ee("stop",w),pe=ee("stop",x),ae=ee("stop",k),se=ee("stop",Pe=>{K&&Pe.preventDefault(),A&&A(Pe)}),oe=ee("start",N),fe=ee("stop",O),Z=ee("stop",$),ce=ee("stop",Pe=>{MT(Pe.target)||X(!1),m&&m(Pe)},!1),ge=ei(Pe=>{F.current||(F.current=Pe.currentTarget),MT(Pe.target)&&(X(!0),E&&E(Pe)),S&&S(Pe)}),we=()=>{const Pe=F.current;return l&&l!=="button"&&!(Pe.tagName==="A"&&Pe.href)},me=ei(Pe=>{f&&!Pe.repeat&&K&&Pe.key===" "&&V.stop(Pe,()=>{V.start(Pe)}),Pe.target===Pe.currentTarget&&we()&&Pe.key===" "&&Pe.preventDefault(),P&&P(Pe),Pe.target===Pe.currentTarget&&we()&&Pe.key==="Enter"&&!c&&(Pe.preventDefault(),y&&y(Pe))}),Se=ei(Pe=>{f&&Pe.key===" "&&K&&!Pe.defaultPrevented&&V.stop(Pe,()=>{V.pulsate(Pe)}),T&&T(Pe),y&&Pe.target===Pe.currentTarget&&we()&&Pe.key===" "&&!Pe.defaultPrevented&&y(Pe)});let xe=l;xe==="button"&&(z.href||z.to)&&(xe=h);const ke={};xe==="button"?(ke.type=_===void 0?"button":_,ke.disabled=c):(!z.href&&!z.to&&(ke.role="button"),c&&(ke["aria-disabled"]=c));const De=Rr(n,F),_e={...r,centerRipple:i,component:l,disabled:c,disableRipple:u,disableTouchRipple:d,focusRipple:f,tabIndex:L,focusVisible:K},ye=nOe(_e);return R.jsxs(rOe,{as:xe,className:de(ye.root,s),ownerState:_e,onBlur:ce,onClick:y,onContextMenu:te,onFocus:ge,onKeyDown:me,onKeyUp:Se,onMouseDown:Q,onMouseLeave:se,onMouseUp:ae,onDragLeave:pe,onTouchEnd:fe,onTouchMove:Z,onTouchStart:oe,ref:De,tabIndex:c?-1:L,type:_,...ke,...z,children:[a,ie?R.jsx(ZIe,{ref:U,center:i,...j}):null]})});function oOe(e){return nt("MuiAccordionSummary",e)}const yy=it("MuiAccordionSummary",["root","expanded","focusVisible","disabled","gutters","contentGutters","content","expandIconWrapper"]),iOe=e=>{const{classes:t,expanded:n,disabled:r,disableGutters:o}=e;return rt({root:["root",n&&"expanded",r&&"disabled",!o&&"gutters"],focusVisible:["focusVisible"],content:["content",n&&"expanded",!o&&"contentGutters"],expandIconWrapper:["expandIconWrapper",n&&"expanded"]},oOe,t)},aOe=re(ca,{name:"MuiAccordionSummary",slot:"Root",overridesResolver:(e,t)=>t.root})(Je(({theme:e})=>{const t={duration:e.transitions.duration.shortest};return{display:"flex",minHeight:48,padding:e.spacing(0,2),transition:e.transitions.create(["min-height","background-color"],t),[`&.${yy.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${yy.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`&:hover:not(.${yy.disabled})`]:{cursor:"pointer"},variants:[{props:n=>!n.disableGutters,style:{[`&.${yy.expanded}`]:{minHeight:64}}}]}})),sOe=re("div",{name:"MuiAccordionSummary",slot:"Content",overridesResolver:(e,t)=>t.content})(Je(({theme:e})=>({display:"flex",flexGrow:1,margin:"12px 0",variants:[{props:t=>!t.disableGutters,style:{transition:e.transitions.create(["margin"],{duration:e.transitions.duration.shortest}),[`&.${yy.expanded}`]:{margin:"20px 0"}}}]}))),lOe=re("div",{name:"MuiAccordionSummary",slot:"ExpandIconWrapper",overridesResolver:(e,t)=>t.expandIconWrapper})(Je(({theme:e})=>({display:"flex",color:(e.vars||e).palette.action.active,transform:"rotate(0deg)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shortest}),[`&.${yy.expanded}`]:{transform:"rotate(180deg)"}}))),WB=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiAccordionSummary"}),{children:o,className:i,expandIcon:a,focusVisibleClassName:s,onClick:l,...c}=r,{disabled:u=!1,disableGutters:d,expanded:f,toggle:p}=v.useContext(wne),h=w=>{p&&p(w),l&&l(w)},m={...r,expanded:f,disabled:u,disableGutters:d},y=iOe(m);return R.jsxs(aOe,{focusRipple:!1,disableRipple:!0,disabled:u,component:"div","aria-expanded":f,className:de(y.root,i),focusVisibleClassName:de(y.focusVisible,s),onClick:h,ref:n,ownerState:m,...c,children:[R.jsx(sOe,{className:y.content,ownerState:m,children:o}),a&&R.jsx(lOe,{className:y.expandIconWrapper,ownerState:m,children:a})]})});function cOe(e){return typeof e.main=="string"}function uOe(e,t=[]){if(!cOe(e))return!1;for(const n of t)if(!e.hasOwnProperty(n)||typeof e[n]!="string")return!1;return!0}function Kn(e=[]){return([,t])=>t&&uOe(t,e)}function dOe(e){return nt("MuiAlert",e)}const c6=it("MuiAlert",["root","action","icon","message","filled","colorSuccess","colorInfo","colorWarning","colorError","filledSuccess","filledInfo","filledWarning","filledError","outlined","outlinedSuccess","outlinedInfo","outlinedWarning","outlinedError","standard","standardSuccess","standardInfo","standardWarning","standardError"]);function fOe(e){return nt("MuiIconButton",e)}const pOe=it("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge"]),hOe=e=>{const{classes:t,disabled:n,color:r,edge:o,size:i}=e,a={root:["root",n&&"disabled",r!=="default"&&`color${Ce(r)}`,o&&`edge${Ce(o)}`,`size${Ce(i)}`]};return rt(a,fOe,t)},gOe=re(ca,{name:"MuiIconButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="default"&&t[`color${Ce(n.color)}`],n.edge&&t[`edge${Ce(n.edge)}`],t[`size${Ce(n.size)}`]]}})(Je(({theme:e})=>({textAlign:"center",flex:"0 0 auto",fontSize:e.typography.pxToRem(24),padding:8,borderRadius:"50%",color:(e.vars||e).palette.action.active,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),variants:[{props:t=>!t.disableRipple,style:{"--IconButton-hoverBg":e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:St(e.palette.action.active,e.palette.action.hoverOpacity),"&:hover":{backgroundColor:"var(--IconButton-hoverBg)","@media (hover: none)":{backgroundColor:"transparent"}}}},{props:{edge:"start"},style:{marginLeft:-12}},{props:{edge:"start",size:"small"},style:{marginLeft:-3}},{props:{edge:"end"},style:{marginRight:-12}},{props:{edge:"end",size:"small"},style:{marginRight:-3}}]})),Je(({theme:e})=>({variants:[{props:{color:"inherit"},style:{color:"inherit"}},...Object.entries(e.palette).filter(Kn()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}})),...Object.entries(e.palette).filter(Kn()).map(([t])=>({props:{color:t},style:{"--IconButton-hoverBg":e.vars?`rgba(${(e.vars||e).palette[t].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:St((e.vars||e).palette[t].main,e.palette.action.hoverOpacity)}})),{props:{size:"small"},style:{padding:5,fontSize:e.typography.pxToRem(18)}},{props:{size:"large"},style:{padding:12,fontSize:e.typography.pxToRem(28)}}],[`&.${pOe.disabled}`]:{backgroundColor:"transparent",color:(e.vars||e).palette.action.disabled}}))),vn=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiIconButton"}),{edge:o=!1,children:i,className:a,color:s="default",disabled:l=!1,disableFocusRipple:c=!1,size:u="medium",...d}=r,f={...r,edge:o,color:s,disabled:l,disableFocusRipple:c,size:u},p=hOe(f);return R.jsx(gOe,{className:de(p.root,a),centerRipple:!0,focusRipple:!c,disabled:l,ref:n,...d,ownerState:f,children:i})}),mOe=ct(R.jsx("path",{d:"M20,12A8,8 0 0,1 12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4C12.76,4 13.5,4.11 14.2, 4.31L15.77,2.74C14.61,2.26 13.34,2 12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0, 0 22,12M7.91,10.08L6.5,11.5L11,16L21,6L19.59,4.58L11,13.17L7.91,10.08Z"}),"SuccessOutlined"),yOe=ct(R.jsx("path",{d:"M12 5.99L19.53 19H4.47L12 5.99M12 2L1 21h22L12 2zm1 14h-2v2h2v-2zm0-6h-2v4h2v-4z"}),"ReportProblemOutlined"),vOe=ct(R.jsx("path",{d:"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),"ErrorOutline"),bOe=ct(R.jsx("path",{d:"M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20, 12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10, 10 0 0,0 12,2M11,17H13V11H11V17Z"}),"InfoOutlined"),xne=ct(R.jsx("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close"),wOe=e=>{const{variant:t,color:n,severity:r,classes:o}=e,i={root:["root",`color${Ce(n||r)}`,`${t}${Ce(n||r)}`,`${t}`],icon:["icon"],message:["message"],action:["action"]};return rt(i,dOe,o)},xOe=re(ro,{name:"MuiAlert",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${Ce(n.color||n.severity)}`]]}})(Je(({theme:e})=>{const t=e.palette.mode==="light"?wd:xd,n=e.palette.mode==="light"?xd:wd;return{...e.typography.body2,backgroundColor:"transparent",display:"flex",padding:"6px 16px",variants:[...Object.entries(e.palette).filter(Kn(["light"])).map(([r])=>({props:{colorSeverity:r,variant:"standard"},style:{color:e.vars?e.vars.palette.Alert[`${r}Color`]:t(e.palette[r].light,.6),backgroundColor:e.vars?e.vars.palette.Alert[`${r}StandardBg`]:n(e.palette[r].light,.9),[`& .${c6.icon}`]:e.vars?{color:e.vars.palette.Alert[`${r}IconColor`]}:{color:e.palette[r].main}}})),...Object.entries(e.palette).filter(Kn(["light"])).map(([r])=>({props:{colorSeverity:r,variant:"outlined"},style:{color:e.vars?e.vars.palette.Alert[`${r}Color`]:t(e.palette[r].light,.6),border:`1px solid ${(e.vars||e).palette[r].light}`,[`& .${c6.icon}`]:e.vars?{color:e.vars.palette.Alert[`${r}IconColor`]}:{color:e.palette[r].main}}})),...Object.entries(e.palette).filter(Kn(["dark"])).map(([r])=>({props:{colorSeverity:r,variant:"filled"},style:{fontWeight:e.typography.fontWeightMedium,...e.vars?{color:e.vars.palette.Alert[`${r}FilledColor`],backgroundColor:e.vars.palette.Alert[`${r}FilledBg`]}:{backgroundColor:e.palette.mode==="dark"?e.palette[r].dark:e.palette[r].main,color:e.palette.getContrastText(e.palette[r].main)}}}))]}})),SOe=re("div",{name:"MuiAlert",slot:"Icon",overridesResolver:(e,t)=>t.icon})({marginRight:12,padding:"7px 0",display:"flex",fontSize:22,opacity:.9}),COe=re("div",{name:"MuiAlert",slot:"Message",overridesResolver:(e,t)=>t.message})({padding:"8px 0",minWidth:0,overflow:"auto"}),u6=re("div",{name:"MuiAlert",slot:"Action",overridesResolver:(e,t)=>t.action})({display:"flex",alignItems:"flex-start",padding:"4px 0 0 16px",marginLeft:"auto",marginRight:-8}),d6={success:R.jsx(mOe,{fontSize:"inherit"}),warning:R.jsx(yOe,{fontSize:"inherit"}),error:R.jsx(vOe,{fontSize:"inherit"}),info:R.jsx(bOe,{fontSize:"inherit"})},kl=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiAlert"}),{action:o,children:i,className:a,closeText:s="Close",color:l,components:c={},componentsProps:u={},icon:d,iconMapping:f=d6,onClose:p,role:h="alert",severity:m="success",slotProps:y={},slots:w={},variant:x="standard",...S}=r,E={...r,color:l,severity:m,variant:x,colorSeverity:l||m},P=wOe(E),T={slots:{closeButton:c.CloseButton,closeIcon:c.CloseIcon,...w},slotProps:{...u,...y}},[I,A]=Cr("closeButton",{elementType:vn,externalForwardedProps:T,ownerState:E}),[k,O]=Cr("closeIcon",{elementType:xne,externalForwardedProps:T,ownerState:E});return R.jsxs(xOe,{role:h,elevation:0,ownerState:E,className:de(P.root,a),ref:n,...S,children:[d!==!1?R.jsx(SOe,{ownerState:E,className:P.icon,children:d||f[m]||d6[m]}):null,R.jsx(COe,{ownerState:E,className:P.message,children:i}),o!=null?R.jsx(u6,{ownerState:E,className:P.action,children:o}):null,o==null&&p?R.jsx(u6,{ownerState:E,className:P.action,children:R.jsx(I,{size:"small","aria-label":s,title:s,color:"inherit",onClick:p,...A,children:R.jsx(k,{fontSize:"small",...O})})}):null]})});function EOe(e){return nt("MuiTypography",e)}const lI=it("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]),POe={primary:!0,secondary:!0,error:!0,info:!0,success:!0,warning:!0,textPrimary:!0,textSecondary:!0,textDisabled:!0},TOe=fPe(),IOe=e=>{const{align:t,gutterBottom:n,noWrap:r,paragraph:o,variant:i,classes:a}=e,s={root:["root",i,e.align!=="inherit"&&`align${Ce(t)}`,n&&"gutterBottom",r&&"noWrap",o&&"paragraph"]};return rt(s,EOe,a)},OOe=re("span",{name:"MuiTypography",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.variant&&t[n.variant],n.align!=="inherit"&&t[`align${Ce(n.align)}`],n.noWrap&&t.noWrap,n.gutterBottom&&t.gutterBottom,n.paragraph&&t.paragraph]}})(Je(({theme:e})=>{var t;return{margin:0,variants:[{props:{variant:"inherit"},style:{font:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}},...Object.entries(e.typography).filter(([n,r])=>n!=="inherit"&&r&&typeof r=="object").map(([n,r])=>({props:{variant:n},style:r})),...Object.entries(e.palette).filter(Kn()).map(([n])=>({props:{color:n},style:{color:(e.vars||e).palette[n].main}})),...Object.entries(((t=e.palette)==null?void 0:t.text)||{}).filter(([,n])=>typeof n=="string").map(([n])=>({props:{color:`text${Ce(n)}`},style:{color:(e.vars||e).palette.text[n]}})),{props:({ownerState:n})=>n.align!=="inherit",style:{textAlign:"var(--Typography-textAlign)"}},{props:({ownerState:n})=>n.noWrap,style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}},{props:({ownerState:n})=>n.gutterBottom,style:{marginBottom:"0.35em"}},{props:({ownerState:n})=>n.paragraph,style:{marginBottom:16}}]}})),f6={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},ot=v.forwardRef(function(t,n){const{color:r,...o}=at({props:t,name:"MuiTypography"}),i=!POe[r],a=TOe({...o,...i&&{color:r}}),{align:s="inherit",className:l,component:c,gutterBottom:u=!1,noWrap:d=!1,paragraph:f=!1,variant:p="body1",variantMapping:h=f6,...m}=a,y={...a,align:s,color:r,className:l,component:c,gutterBottom:u,noWrap:d,paragraph:f,variant:p,variantMapping:h},w=c||(f?"p":h[p]||f6[p])||"span",x=IOe(y);return R.jsx(OOe,{as:w,ref:n,className:de(x.root,l),...m,ownerState:y,style:{...s!=="inherit"&&{"--Typography-textAlign":s},...m.style}})});function AOe(e){return nt("MuiAlertTitle",e)}it("MuiAlertTitle",["root"]);const kOe=e=>{const{classes:t}=e;return rt({root:["root"]},AOe,t)},MOe=re(ot,{name:"MuiAlertTitle",slot:"Root",overridesResolver:(e,t)=>t.root})(Je(({theme:e})=>({fontWeight:e.typography.fontWeightMedium,marginTop:-2}))),cI=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiAlertTitle"}),{className:o,...i}=r,a=r,s=kOe(a);return R.jsx(MOe,{gutterBottom:!0,component:"div",ownerState:a,ref:n,className:de(s.root,o),...i})});function ROe(e){return nt("MuiAppBar",e)}it("MuiAppBar",["root","positionFixed","positionAbsolute","positionSticky","positionStatic","positionRelative","colorDefault","colorPrimary","colorSecondary","colorInherit","colorTransparent","colorError","colorInfo","colorSuccess","colorWarning"]);const $Oe=e=>{const{color:t,position:n,classes:r}=e,o={root:["root",`color${Ce(t)}`,`position${Ce(n)}`]};return rt(o,ROe,r)},p6=(e,t)=>e?`${e==null?void 0:e.replace(")","")}, ${t})`:t,DOe=re(ro,{name:"MuiAppBar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`position${Ce(n.position)}`],t[`color${Ce(n.color)}`]]}})(Je(({theme:e})=>({display:"flex",flexDirection:"column",width:"100%",boxSizing:"border-box",flexShrink:0,variants:[{props:{position:"fixed"},style:{position:"fixed",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0,"@media print":{position:"absolute"}}},{props:{position:"absolute"},style:{position:"absolute",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0}},{props:{position:"sticky"},style:{position:"sticky",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0}},{props:{position:"static"},style:{position:"static"}},{props:{position:"relative"},style:{position:"relative"}},{props:{color:"inherit"},style:{"--AppBar-color":"inherit"}},{props:{color:"default"},style:{"--AppBar-background":e.vars?e.vars.palette.AppBar.defaultBg:e.palette.grey[100],"--AppBar-color":e.vars?e.vars.palette.text.primary:e.palette.getContrastText(e.palette.grey[100]),...e.applyStyles("dark",{"--AppBar-background":e.vars?e.vars.palette.AppBar.defaultBg:e.palette.grey[900],"--AppBar-color":e.vars?e.vars.palette.text.primary:e.palette.getContrastText(e.palette.grey[900])})}},...Object.entries(e.palette).filter(Kn(["contrastText"])).map(([t])=>({props:{color:t},style:{"--AppBar-background":(e.vars??e).palette[t].main,"--AppBar-color":(e.vars??e).palette[t].contrastText}})),{props:t=>t.enableColorOnDark===!0&&!["inherit","transparent"].includes(t.color),style:{backgroundColor:"var(--AppBar-background)",color:"var(--AppBar-color)"}},{props:t=>t.enableColorOnDark===!1&&!["inherit","transparent"].includes(t.color),style:{backgroundColor:"var(--AppBar-background)",color:"var(--AppBar-color)",...e.applyStyles("dark",{backgroundColor:e.vars?p6(e.vars.palette.AppBar.darkBg,"var(--AppBar-background)"):null,color:e.vars?p6(e.vars.palette.AppBar.darkColor,"var(--AppBar-color)"):null})}},{props:{color:"transparent"},style:{"--AppBar-background":"transparent","--AppBar-color":"inherit",backgroundColor:"var(--AppBar-background)",color:"var(--AppBar-color)",...e.applyStyles("dark",{backgroundImage:"none"})}}]}))),_Oe=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiAppBar"}),{className:o,color:i="primary",enableColorOnDark:a=!1,position:s="fixed",...l}=r,c={...r,color:i,position:s,enableColorOnDark:a},u=$Oe(c);return R.jsx(DOe,{square:!0,component:"header",ownerState:c,elevation:4,className:de(u.root,o,s==="fixed"&&"mui-fixed"),ref:n,...l})});function h6(e){return e.normalize("NFD").replace(/[\u0300-\u036f]/g,"")}function Sne(e={}){const{ignoreAccents:t=!0,ignoreCase:n=!0,limit:r,matchFrom:o="any",stringify:i,trim:a=!1}=e;return(s,{inputValue:l,getOptionLabel:c})=>{let u=a?l.trim():l;n&&(u=u.toLowerCase()),t&&(u=h6(u));const d=u?s.filter(f=>{let p=(i||c)(f);return n&&(p=p.toLowerCase()),t&&(p=h6(p)),o==="start"?p.startsWith(u):p.includes(u)}):s;return typeof r=="number"?d.slice(0,r):d}}const NOe=Sne(),g6=5,LOe=e=>{var t;return e.current!==null&&((t=e.current.parentElement)==null?void 0:t.contains(document.activeElement))},FOe=[];function jOe(e){const{unstable_isActiveElementInListbox:t=LOe,unstable_classNamePrefix:n="Mui",autoComplete:r=!1,autoHighlight:o=!1,autoSelect:i=!1,blurOnSelect:a=!1,clearOnBlur:s=!e.freeSolo,clearOnEscape:l=!1,componentName:c="useAutocomplete",defaultValue:u=e.multiple?FOe:null,disableClearable:d=!1,disableCloseOnSelect:f=!1,disabled:p,disabledItemsFocusable:h=!1,disableListWrap:m=!1,filterOptions:y=NOe,filterSelectedOptions:w=!1,freeSolo:x=!1,getOptionDisabled:S,getOptionKey:E,getOptionLabel:P=Ue=>Ue.label??Ue,groupBy:T,handleHomeEndKeys:I=!e.freeSolo,id:A,includeInputInList:k=!1,inputValue:O,isOptionEqualToValue:$=(Ue,Fe)=>Ue===Fe,multiple:N=!1,onChange:L,onClose:j,onHighlightChange:D,onInputChange:_,onOpen:z,open:F,openOnFocus:V=!1,options:U,readOnly:K=!1,selectOnFocus:X=!e.freeSolo,value:ie}=e,ee=ip(A);let Q=P;Q=Ue=>{const Fe=P(Ue);return typeof Fe!="string"?String(Fe):Fe};const te=v.useRef(!1),pe=v.useRef(!0),ae=v.useRef(null),se=v.useRef(null),[oe,fe]=v.useState(null),[Z,ce]=v.useState(-1),ge=o?0:-1,we=v.useRef(ge),[me,Se]=ad({controlled:ie,default:u,name:c}),[xe,ke]=ad({controlled:O,default:"",name:c,state:"inputValue"}),[De,_e]=v.useState(!1),ye=v.useCallback((Ue,Fe,It)=>{if(!(N?me.length!(w&&(N?me:[me]).some(Fe=>Fe!==null&&$(Ue,Fe)))),{inputValue:He&&Me?"":xe,getOptionLabel:Q}):[],st=Vj({filteredOptions:gt,value:me,inputValue:xe});v.useEffect(()=>{const Ue=me!==st.value;De&&!Ue||x&&!Ue||ye(null,me,"reset")},[me,ye,De,st.value,x]);const et=Pe&>.length>0&&!K,Et=ei(Ue=>{Ue===-1?ae.current.focus():oe.querySelector(`[data-tag-index="${Ue}"]`).focus()});v.useEffect(()=>{N&&Z>me.length-1&&(ce(-1),Et(-1))},[me,N,Z,Et]);function An(Ue,Fe){if(!se.current||Ue<0||Ue>=gt.length)return-1;let It=Ue;for(;;){const un=se.current.querySelector(`[data-option-index="${It}"]`),gn=h?!1:!un||un.disabled||un.getAttribute("aria-disabled")==="true";if(un&&un.hasAttribute("tabindex")&&!gn)return It;if(Fe==="next"?It=(It+1)%gt.length:It=(It-1+gt.length)%gt.length,It===Ue)return-1}}const Ke=ei(({event:Ue,index:Fe,reason:It="auto"})=>{if(we.current=Fe,Fe===-1?ae.current.removeAttribute("aria-activedescendant"):ae.current.setAttribute("aria-activedescendant",`${ee}-option-${Fe}`),D&&D(Ue,Fe===-1?null:gt[Fe],It),!se.current)return;const un=se.current.querySelector(`[role="option"].${n}-focused`);un&&(un.classList.remove(`${n}-focused`),un.classList.remove(`${n}-focusVisible`));let gn=se.current;if(se.current.getAttribute("role")!=="listbox"&&(gn=se.current.parentElement.querySelector('[role="listbox"]')),!gn)return;if(Fe===-1){gn.scrollTop=0;return}const Vr=se.current.querySelector(`[data-option-index="${Fe}"]`);if(Vr&&(Vr.classList.add(`${n}-focused`),It==="keyboard"&&Vr.classList.add(`${n}-focusVisible`),gn.scrollHeight>gn.clientHeight&&It!=="mouse"&&It!=="touch")){const Zn=Vr,Ua=gn.clientHeight+gn.scrollTop,Ru=Zn.offsetTop+Zn.offsetHeight;Ru>Ua?gn.scrollTop=Ru-gn.clientHeight:Zn.offsetTop-Zn.offsetHeight*(T?1.3:0){if(!Xe)return;const Vr=An((()=>{const Zn=gt.length-1;if(Fe==="reset")return ge;if(Fe==="start")return 0;if(Fe==="end")return Zn;const Ua=we.current+Fe;return Ua<0?Ua===-1&&k?-1:m&&we.current!==-1||Math.abs(Fe)>1?0:Zn:Ua>Zn?Ua===Zn+1&&k?-1:m||Math.abs(Fe)>1?Zn:0:Ua})(),It);if(Ke({index:Vr,reason:un,event:Ue}),r&&Fe!=="reset")if(Vr===-1)ae.current.value=xe;else{const Zn=Q(gt[Vr]);ae.current.value=Zn,Zn.toLowerCase().indexOf(xe.toLowerCase())===0&&xe.length>0&&ae.current.setSelectionRange(xe.length,Zn.length)}}),Qe=()=>{const Ue=(Fe,It)=>{const un=Fe?Q(Fe):"",gn=It?Q(It):"";return un===gn};if(we.current!==-1&&st.filteredOptions&&st.filteredOptions.length!==gt.length&&st.inputValue===xe&&(N?me.length===st.value.length&&st.value.every((Fe,It)=>Q(me[It])===Q(Fe)):Ue(st.value,me))){const Fe=st.filteredOptions[we.current];if(Fe)return gt.findIndex(It=>Q(It)===Q(Fe))}return-1},Tt=v.useCallback(()=>{if(!Xe)return;const Ue=Qe();if(Ue!==-1){we.current=Ue;return}const Fe=N?me[0]:me;if(gt.length===0||Fe==null){$e({diff:"reset"});return}if(se.current){if(Fe!=null){const It=gt[we.current];if(N&&It&&me.findIndex(gn=>$(It,gn))!==-1)return;const un=gt.findIndex(gn=>$(gn,Fe));un===-1?$e({diff:"reset"}):Ke({index:un});return}if(we.current>=gt.length-1){Ke({index:gt.length-1});return}Ke({index:we.current})}},[gt.length,N?!1:me,w,$e,Ke,Xe,xe,N]),Xt=ei(Ue=>{kT(se,Ue),Ue&&Tt()});v.useEffect(()=>{Tt()},[Tt]);const $t=Ue=>{Pe||(Ae(!0),We(!0),z&&z(Ue))},bn=(Ue,Fe)=>{Pe&&(Ae(!1),j&&j(Ue,Fe))},Gn=(Ue,Fe,It,un)=>{if(N){if(me.length===Fe.length&&me.every((gn,Vr)=>gn===Fe[Vr]))return}else if(me===Fe)return;L&&L(Ue,Fe,It,un),Se(Fe)},Jn=v.useRef(!1),Do=(Ue,Fe,It="selectOption",un="options")=>{let gn=It,Vr=Fe;if(N){Vr=Array.isArray(me)?me.slice():[];const Zn=Vr.findIndex(Ua=>$(Fe,Ua));Zn===-1?Vr.push(Fe):un!=="freeSolo"&&(Vr.splice(Zn,1),gn="removeOption")}ye(Ue,Vr,gn),Gn(Ue,Vr,gn,{option:Fe}),!f&&(!Ue||!Ue.ctrlKey&&!Ue.metaKey)&&bn(Ue,gn),(a===!0||a==="touch"&&Jn.current||a==="mouse"&&!Jn.current)&&ae.current.blur()};function oo(Ue,Fe){if(Ue===-1)return-1;let It=Ue;for(;;){if(Fe==="next"&&It===me.length||Fe==="previous"&&It===-1)return-1;const un=oe.querySelector(`[data-tag-index="${It}"]`);if(!un||!un.hasAttribute("tabindex")||un.disabled||un.getAttribute("aria-disabled")==="true")It+=Fe==="next"?1:-1;else return It}}const Bi=(Ue,Fe)=>{if(!N)return;xe===""&&bn(Ue,"toggleInput");let It=Z;Z===-1?xe===""&&Fe==="previous"&&(It=me.length-1):(It+=Fe==="next"?1:-1,It<0&&(It=0),It===me.length&&(It=-1)),It=oo(It,Fe),ce(It),Et(It)},Ls=Ue=>{te.current=!0,ke(""),_&&_(Ue,"","clear"),Gn(Ue,N?[]:null,"clear")},tn=Ue=>Fe=>{if(Ue.onKeyDown&&Ue.onKeyDown(Fe),!Fe.defaultMuiPrevented&&(Z!==-1&&!["ArrowLeft","ArrowRight"].includes(Fe.key)&&(ce(-1),Et(-1)),Fe.which!==229))switch(Fe.key){case"Home":Xe&&I&&(Fe.preventDefault(),$e({diff:"start",direction:"next",reason:"keyboard",event:Fe}));break;case"End":Xe&&I&&(Fe.preventDefault(),$e({diff:"end",direction:"previous",reason:"keyboard",event:Fe}));break;case"PageUp":Fe.preventDefault(),$e({diff:-g6,direction:"previous",reason:"keyboard",event:Fe}),$t(Fe);break;case"PageDown":Fe.preventDefault(),$e({diff:g6,direction:"next",reason:"keyboard",event:Fe}),$t(Fe);break;case"ArrowDown":Fe.preventDefault(),$e({diff:1,direction:"next",reason:"keyboard",event:Fe}),$t(Fe);break;case"ArrowUp":Fe.preventDefault(),$e({diff:-1,direction:"previous",reason:"keyboard",event:Fe}),$t(Fe);break;case"ArrowLeft":Bi(Fe,"previous");break;case"ArrowRight":Bi(Fe,"next");break;case"Enter":if(we.current!==-1&&Xe){const It=gt[we.current],un=S?S(It):!1;if(Fe.preventDefault(),un)return;Do(Fe,It,"selectOption"),r&&ae.current.setSelectionRange(ae.current.value.length,ae.current.value.length)}else x&&xe!==""&&He===!1&&(N&&Fe.preventDefault(),Do(Fe,xe,"createOption","freeSolo"));break;case"Escape":Xe?(Fe.preventDefault(),Fe.stopPropagation(),bn(Fe,"escape")):l&&(xe!==""||N&&me.length>0)&&(Fe.preventDefault(),Fe.stopPropagation(),Ls(Fe));break;case"Backspace":if(N&&!K&&xe===""&&me.length>0){const It=Z===-1?me.length-1:Z,un=me.slice();un.splice(It,1),Gn(Fe,un,"removeOption",{option:me[It]})}break;case"Delete":if(N&&!K&&xe===""&&me.length>0&&Z!==-1){const It=Z,un=me.slice();un.splice(It,1),Gn(Fe,un,"removeOption",{option:me[It]})}break}},li=Ue=>{_e(!0),V&&!te.current&&$t(Ue)},nm=Ue=>{if(t(se)){ae.current.focus();return}_e(!1),pe.current=!0,te.current=!1,i&&we.current!==-1&&Xe?Do(Ue,gt[we.current],"blur"):i&&x&&xe!==""?Do(Ue,xe,"blur","freeSolo"):s&&ye(Ue,me,"blur"),bn(Ue,"blur")},Vd=Ue=>{const Fe=Ue.target.value;xe!==Fe&&(ke(Fe),We(!1),_&&_(Ue,Fe,"input")),Fe===""?!d&&!N&&Gn(Ue,null,"clear"):$t(Ue)},Mu=Ue=>{const Fe=Number(Ue.currentTarget.getAttribute("data-option-index"));we.current!==Fe&&Ke({event:Ue,index:Fe,reason:"mouse"})},qp=Ue=>{Ke({event:Ue,index:Number(Ue.currentTarget.getAttribute("data-option-index")),reason:"touch"}),Jn.current=!0},Kp=Ue=>{const Fe=Number(Ue.currentTarget.getAttribute("data-option-index"));Do(Ue,gt[Fe],"selectOption"),Jn.current=!1},I0=Ue=>Fe=>{const It=me.slice();It.splice(Ue,1),Gn(Fe,It,"removeOption",{option:me[Ue]})},rm=Ue=>{Pe?bn(Ue,"toggleInput"):$t(Ue)},j1=Ue=>{Ue.currentTarget.contains(Ue.target)&&Ue.target.getAttribute("id")!==ee&&Ue.preventDefault()},Yp=Ue=>{Ue.currentTarget.contains(Ue.target)&&(ae.current.focus(),X&&pe.current&&ae.current.selectionEnd-ae.current.selectionStart===0&&ae.current.select(),pe.current=!1)},Go=Ue=>{!p&&(xe===""||!Pe)&&rm(Ue)};let io=x&&xe.length>0;io=io||(N?me.length>0:me!==null);let ql=gt;return T&&(ql=gt.reduce((Ue,Fe,It)=>{const un=T(Fe);return Ue.length>0&&Ue[Ue.length-1].group===un?Ue[Ue.length-1].options.push(Fe):Ue.push({key:It,index:It,group:un,options:[Fe]}),Ue},[])),p&&De&&nm(),{getRootProps:(Ue={})=>({"aria-owns":et?`${ee}-listbox`:null,...Ue,onKeyDown:tn(Ue),onMouseDown:j1,onClick:Yp}),getInputLabelProps:()=>({id:`${ee}-label`,htmlFor:ee}),getInputProps:()=>({id:ee,value:xe,onBlur:nm,onFocus:li,onChange:Vd,onMouseDown:Go,"aria-activedescendant":Xe?"":null,"aria-autocomplete":r?"both":"list","aria-controls":et?`${ee}-listbox`:void 0,"aria-expanded":et,autoComplete:"off",ref:ae,autoCapitalize:"none",spellCheck:"false",role:"combobox",disabled:p}),getClearProps:()=>({tabIndex:-1,type:"button",onClick:Ls}),getPopupIndicatorProps:()=>({tabIndex:-1,type:"button",onClick:rm}),getTagProps:({index:Ue})=>({key:Ue,"data-tag-index":Ue,tabIndex:-1,...!K&&{onDelete:I0(Ue)}}),getListboxProps:()=>({role:"listbox",id:`${ee}-listbox`,"aria-labelledby":`${ee}-label`,ref:Xt,onMouseDown:Ue=>{Ue.preventDefault()}}),getOptionProps:({index:Ue,option:Fe})=>{const It=(N?me:[me]).some(gn=>gn!=null&&$(Fe,gn)),un=S?S(Fe):!1;return{key:(E==null?void 0:E(Fe))??Q(Fe),tabIndex:-1,role:"option",id:`${ee}-option-${Ue}`,onMouseMove:Mu,onClick:Kp,onTouchStart:qp,"data-option-index":Ue,"aria-disabled":un,"aria-selected":It}},id:ee,inputValue:xe,value:me,dirty:io,expanded:Xe&&oe,popupOpen:Xe,focused:De||Z!==-1,anchorEl:oe,setAnchorEl:fe,focusedTag:Z,groupedOptions:ql}}var Ma="top",Ml="bottom",Rl="right",Ra="left",GB="auto",jC=[Ma,Ml,Rl,Ra],Cv="start",iS="end",BOe="clippingParents",Cne="viewport",Z0="popper",zOe="reference",m6=jC.reduce(function(e,t){return e.concat([t+"-"+Cv,t+"-"+iS])},[]),Ene=[].concat(jC,[GB]).reduce(function(e,t){return e.concat([t,t+"-"+Cv,t+"-"+iS])},[]),VOe="beforeRead",HOe="read",UOe="afterRead",WOe="beforeMain",GOe="main",qOe="afterMain",KOe="beforeWrite",YOe="write",QOe="afterWrite",XOe=[VOe,HOe,UOe,WOe,GOe,qOe,KOe,YOe,QOe];function yu(e){return e?(e.nodeName||"").toLowerCase():null}function Ts(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function yg(e){var t=Ts(e).Element;return e instanceof t||e instanceof Element}function Sl(e){var t=Ts(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function qB(e){if(typeof ShadowRoot>"u")return!1;var t=Ts(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function JOe(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},o=t.attributes[n]||{},i=t.elements[n];!Sl(i)||!yu(i)||(Object.assign(i.style,r),Object.keys(o).forEach(function(a){var s=o[a];s===!1?i.removeAttribute(a):i.setAttribute(a,s===!0?"":s)}))})}function ZOe(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(r){var o=t.elements[r],i=t.attributes[r]||{},a=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),s=a.reduce(function(l,c){return l[c]="",l},{});!Sl(o)||!yu(o)||(Object.assign(o.style,s),Object.keys(i).forEach(function(l){o.removeAttribute(l)}))})}}const eAe={name:"applyStyles",enabled:!0,phase:"write",fn:JOe,effect:ZOe,requires:["computeStyles"]};function cu(e){return e.split("-")[0]}var Jh=Math.max,uI=Math.min,Ev=Math.round;function lN(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function Pne(){return!/^((?!chrome|android).)*safari/i.test(lN())}function Pv(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),o=1,i=1;t&&Sl(e)&&(o=e.offsetWidth>0&&Ev(r.width)/e.offsetWidth||1,i=e.offsetHeight>0&&Ev(r.height)/e.offsetHeight||1);var a=yg(e)?Ts(e):window,s=a.visualViewport,l=!Pne()&&n,c=(r.left+(l&&s?s.offsetLeft:0))/o,u=(r.top+(l&&s?s.offsetTop:0))/i,d=r.width/o,f=r.height/i;return{width:d,height:f,top:u,right:c+d,bottom:u+f,left:c,x:c,y:u}}function KB(e){var t=Pv(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function Tne(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&qB(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function Td(e){return Ts(e).getComputedStyle(e)}function tAe(e){return["table","td","th"].indexOf(yu(e))>=0}function Ep(e){return((yg(e)?e.ownerDocument:e.document)||window.document).documentElement}function ck(e){return yu(e)==="html"?e:e.assignedSlot||e.parentNode||(qB(e)?e.host:null)||Ep(e)}function y6(e){return!Sl(e)||Td(e).position==="fixed"?null:e.offsetParent}function nAe(e){var t=/firefox/i.test(lN()),n=/Trident/i.test(lN());if(n&&Sl(e)){var r=Td(e);if(r.position==="fixed")return null}var o=ck(e);for(qB(o)&&(o=o.host);Sl(o)&&["html","body"].indexOf(yu(o))<0;){var i=Td(o);if(i.transform!=="none"||i.perspective!=="none"||i.contain==="paint"||["transform","perspective"].indexOf(i.willChange)!==-1||t&&i.willChange==="filter"||t&&i.filter&&i.filter!=="none")return o;o=o.parentNode}return null}function BC(e){for(var t=Ts(e),n=y6(e);n&&tAe(n)&&Td(n).position==="static";)n=y6(n);return n&&(yu(n)==="html"||yu(n)==="body"&&Td(n).position==="static")?t:n||nAe(e)||t}function YB(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function dx(e,t,n){return Jh(e,uI(t,n))}function rAe(e,t,n){var r=dx(e,t,n);return r>n?n:r}function Ine(){return{top:0,right:0,bottom:0,left:0}}function One(e){return Object.assign({},Ine(),e)}function Ane(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var oAe=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,One(typeof t!="number"?t:Ane(t,jC))};function iAe(e){var t,n=e.state,r=e.name,o=e.options,i=n.elements.arrow,a=n.modifiersData.popperOffsets,s=cu(n.placement),l=YB(s),c=[Ra,Rl].indexOf(s)>=0,u=c?"height":"width";if(!(!i||!a)){var d=oAe(o.padding,n),f=KB(i),p=l==="y"?Ma:Ra,h=l==="y"?Ml:Rl,m=n.rects.reference[u]+n.rects.reference[l]-a[l]-n.rects.popper[u],y=a[l]-n.rects.reference[l],w=BC(i),x=w?l==="y"?w.clientHeight||0:w.clientWidth||0:0,S=m/2-y/2,E=d[p],P=x-f[u]-d[h],T=x/2-f[u]/2+S,I=dx(E,T,P),A=l;n.modifiersData[r]=(t={},t[A]=I,t.centerOffset=I-T,t)}}function aAe(e){var t=e.state,n=e.options,r=n.element,o=r===void 0?"[data-popper-arrow]":r;o!=null&&(typeof o=="string"&&(o=t.elements.popper.querySelector(o),!o)||Tne(t.elements.popper,o)&&(t.elements.arrow=o))}const sAe={name:"arrow",enabled:!0,phase:"main",fn:iAe,effect:aAe,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Tv(e){return e.split("-")[1]}var lAe={top:"auto",right:"auto",bottom:"auto",left:"auto"};function cAe(e,t){var n=e.x,r=e.y,o=t.devicePixelRatio||1;return{x:Ev(n*o)/o||0,y:Ev(r*o)/o||0}}function v6(e){var t,n=e.popper,r=e.popperRect,o=e.placement,i=e.variation,a=e.offsets,s=e.position,l=e.gpuAcceleration,c=e.adaptive,u=e.roundOffsets,d=e.isFixed,f=a.x,p=f===void 0?0:f,h=a.y,m=h===void 0?0:h,y=typeof u=="function"?u({x:p,y:m}):{x:p,y:m};p=y.x,m=y.y;var w=a.hasOwnProperty("x"),x=a.hasOwnProperty("y"),S=Ra,E=Ma,P=window;if(c){var T=BC(n),I="clientHeight",A="clientWidth";if(T===Ts(n)&&(T=Ep(n),Td(T).position!=="static"&&s==="absolute"&&(I="scrollHeight",A="scrollWidth")),T=T,o===Ma||(o===Ra||o===Rl)&&i===iS){E=Ml;var k=d&&T===P&&P.visualViewport?P.visualViewport.height:T[I];m-=k-r.height,m*=l?1:-1}if(o===Ra||(o===Ma||o===Ml)&&i===iS){S=Rl;var O=d&&T===P&&P.visualViewport?P.visualViewport.width:T[A];p-=O-r.width,p*=l?1:-1}}var $=Object.assign({position:s},c&&lAe),N=u===!0?cAe({x:p,y:m},Ts(n)):{x:p,y:m};if(p=N.x,m=N.y,l){var L;return Object.assign({},$,(L={},L[E]=x?"0":"",L[S]=w?"0":"",L.transform=(P.devicePixelRatio||1)<=1?"translate("+p+"px, "+m+"px)":"translate3d("+p+"px, "+m+"px, 0)",L))}return Object.assign({},$,(t={},t[E]=x?m+"px":"",t[S]=w?p+"px":"",t.transform="",t))}function uAe(e){var t=e.state,n=e.options,r=n.gpuAcceleration,o=r===void 0?!0:r,i=n.adaptive,a=i===void 0?!0:i,s=n.roundOffsets,l=s===void 0?!0:s,c={placement:cu(t.placement),variation:Tv(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,v6(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,v6(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const dAe={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:uAe,data:{}};var XE={passive:!0};function fAe(e){var t=e.state,n=e.instance,r=e.options,o=r.scroll,i=o===void 0?!0:o,a=r.resize,s=a===void 0?!0:a,l=Ts(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&c.forEach(function(u){u.addEventListener("scroll",n.update,XE)}),s&&l.addEventListener("resize",n.update,XE),function(){i&&c.forEach(function(u){u.removeEventListener("scroll",n.update,XE)}),s&&l.removeEventListener("resize",n.update,XE)}}const pAe={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:fAe,data:{}};var hAe={left:"right",right:"left",bottom:"top",top:"bottom"};function aT(e){return e.replace(/left|right|bottom|top/g,function(t){return hAe[t]})}var gAe={start:"end",end:"start"};function b6(e){return e.replace(/start|end/g,function(t){return gAe[t]})}function QB(e){var t=Ts(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function XB(e){return Pv(Ep(e)).left+QB(e).scrollLeft}function mAe(e,t){var n=Ts(e),r=Ep(e),o=n.visualViewport,i=r.clientWidth,a=r.clientHeight,s=0,l=0;if(o){i=o.width,a=o.height;var c=Pne();(c||!c&&t==="fixed")&&(s=o.offsetLeft,l=o.offsetTop)}return{width:i,height:a,x:s+XB(e),y:l}}function yAe(e){var t,n=Ep(e),r=QB(e),o=(t=e.ownerDocument)==null?void 0:t.body,i=Jh(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),a=Jh(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),s=-r.scrollLeft+XB(e),l=-r.scrollTop;return Td(o||n).direction==="rtl"&&(s+=Jh(n.clientWidth,o?o.clientWidth:0)-i),{width:i,height:a,x:s,y:l}}function JB(e){var t=Td(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function kne(e){return["html","body","#document"].indexOf(yu(e))>=0?e.ownerDocument.body:Sl(e)&&JB(e)?e:kne(ck(e))}function fx(e,t){var n;t===void 0&&(t=[]);var r=kne(e),o=r===((n=e.ownerDocument)==null?void 0:n.body),i=Ts(r),a=o?[i].concat(i.visualViewport||[],JB(r)?r:[]):r,s=t.concat(a);return o?s:s.concat(fx(ck(a)))}function cN(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function vAe(e,t){var n=Pv(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function w6(e,t,n){return t===Cne?cN(mAe(e,n)):yg(t)?vAe(t,n):cN(yAe(Ep(e)))}function bAe(e){var t=fx(ck(e)),n=["absolute","fixed"].indexOf(Td(e).position)>=0,r=n&&Sl(e)?BC(e):e;return yg(r)?t.filter(function(o){return yg(o)&&Tne(o,r)&&yu(o)!=="body"}):[]}function wAe(e,t,n,r){var o=t==="clippingParents"?bAe(e):[].concat(t),i=[].concat(o,[n]),a=i[0],s=i.reduce(function(l,c){var u=w6(e,c,r);return l.top=Jh(u.top,l.top),l.right=uI(u.right,l.right),l.bottom=uI(u.bottom,l.bottom),l.left=Jh(u.left,l.left),l},w6(e,a,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function Mne(e){var t=e.reference,n=e.element,r=e.placement,o=r?cu(r):null,i=r?Tv(r):null,a=t.x+t.width/2-n.width/2,s=t.y+t.height/2-n.height/2,l;switch(o){case Ma:l={x:a,y:t.y-n.height};break;case Ml:l={x:a,y:t.y+t.height};break;case Rl:l={x:t.x+t.width,y:s};break;case Ra:l={x:t.x-n.width,y:s};break;default:l={x:t.x,y:t.y}}var c=o?YB(o):null;if(c!=null){var u=c==="y"?"height":"width";switch(i){case Cv:l[c]=l[c]-(t[u]/2-n[u]/2);break;case iS:l[c]=l[c]+(t[u]/2-n[u]/2);break}}return l}function aS(e,t){t===void 0&&(t={});var n=t,r=n.placement,o=r===void 0?e.placement:r,i=n.strategy,a=i===void 0?e.strategy:i,s=n.boundary,l=s===void 0?BOe:s,c=n.rootBoundary,u=c===void 0?Cne:c,d=n.elementContext,f=d===void 0?Z0:d,p=n.altBoundary,h=p===void 0?!1:p,m=n.padding,y=m===void 0?0:m,w=One(typeof y!="number"?y:Ane(y,jC)),x=f===Z0?zOe:Z0,S=e.rects.popper,E=e.elements[h?x:f],P=wAe(yg(E)?E:E.contextElement||Ep(e.elements.popper),l,u,a),T=Pv(e.elements.reference),I=Mne({reference:T,element:S,strategy:"absolute",placement:o}),A=cN(Object.assign({},S,I)),k=f===Z0?A:T,O={top:P.top-k.top+w.top,bottom:k.bottom-P.bottom+w.bottom,left:P.left-k.left+w.left,right:k.right-P.right+w.right},$=e.modifiersData.offset;if(f===Z0&&$){var N=$[o];Object.keys(O).forEach(function(L){var j=[Rl,Ml].indexOf(L)>=0?1:-1,D=[Ma,Ml].indexOf(L)>=0?"y":"x";O[L]+=N[D]*j})}return O}function xAe(e,t){t===void 0&&(t={});var n=t,r=n.placement,o=n.boundary,i=n.rootBoundary,a=n.padding,s=n.flipVariations,l=n.allowedAutoPlacements,c=l===void 0?Ene:l,u=Tv(r),d=u?s?m6:m6.filter(function(h){return Tv(h)===u}):jC,f=d.filter(function(h){return c.indexOf(h)>=0});f.length===0&&(f=d);var p=f.reduce(function(h,m){return h[m]=aS(e,{placement:m,boundary:o,rootBoundary:i,padding:a})[cu(m)],h},{});return Object.keys(p).sort(function(h,m){return p[h]-p[m]})}function SAe(e){if(cu(e)===GB)return[];var t=aT(e);return[b6(e),t,b6(t)]}function CAe(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var o=n.mainAxis,i=o===void 0?!0:o,a=n.altAxis,s=a===void 0?!0:a,l=n.fallbackPlacements,c=n.padding,u=n.boundary,d=n.rootBoundary,f=n.altBoundary,p=n.flipVariations,h=p===void 0?!0:p,m=n.allowedAutoPlacements,y=t.options.placement,w=cu(y),x=w===y,S=l||(x||!h?[aT(y)]:SAe(y)),E=[y].concat(S).reduce(function(ee,Q){return ee.concat(cu(Q)===GB?xAe(t,{placement:Q,boundary:u,rootBoundary:d,padding:c,flipVariations:h,allowedAutoPlacements:m}):Q)},[]),P=t.rects.reference,T=t.rects.popper,I=new Map,A=!0,k=E[0],O=0;O=0,D=j?"width":"height",_=aS(t,{placement:$,boundary:u,rootBoundary:d,altBoundary:f,padding:c}),z=j?L?Rl:Ra:L?Ml:Ma;P[D]>T[D]&&(z=aT(z));var F=aT(z),V=[];if(i&&V.push(_[N]<=0),s&&V.push(_[z]<=0,_[F]<=0),V.every(function(ee){return ee})){k=$,A=!1;break}I.set($,V)}if(A)for(var U=h?3:1,K=function(Q){var te=E.find(function(pe){var ae=I.get(pe);if(ae)return ae.slice(0,Q).every(function(se){return se})});if(te)return k=te,"break"},X=U;X>0;X--){var ie=K(X);if(ie==="break")break}t.placement!==k&&(t.modifiersData[r]._skip=!0,t.placement=k,t.reset=!0)}}const EAe={name:"flip",enabled:!0,phase:"main",fn:CAe,requiresIfExists:["offset"],data:{_skip:!1}};function x6(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function S6(e){return[Ma,Rl,Ml,Ra].some(function(t){return e[t]>=0})}function PAe(e){var t=e.state,n=e.name,r=t.rects.reference,o=t.rects.popper,i=t.modifiersData.preventOverflow,a=aS(t,{elementContext:"reference"}),s=aS(t,{altBoundary:!0}),l=x6(a,r),c=x6(s,o,i),u=S6(l),d=S6(c);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}const TAe={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:PAe};function IAe(e,t,n){var r=cu(e),o=[Ra,Ma].indexOf(r)>=0?-1:1,i=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,a=i[0],s=i[1];return a=a||0,s=(s||0)*o,[Ra,Rl].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}function OAe(e){var t=e.state,n=e.options,r=e.name,o=n.offset,i=o===void 0?[0,0]:o,a=Ene.reduce(function(u,d){return u[d]=IAe(d,t.rects,i),u},{}),s=a[t.placement],l=s.x,c=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[r]=a}const AAe={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:OAe};function kAe(e){var t=e.state,n=e.name;t.modifiersData[n]=Mne({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const MAe={name:"popperOffsets",enabled:!0,phase:"read",fn:kAe,data:{}};function RAe(e){return e==="x"?"y":"x"}function $Ae(e){var t=e.state,n=e.options,r=e.name,o=n.mainAxis,i=o===void 0?!0:o,a=n.altAxis,s=a===void 0?!1:a,l=n.boundary,c=n.rootBoundary,u=n.altBoundary,d=n.padding,f=n.tether,p=f===void 0?!0:f,h=n.tetherOffset,m=h===void 0?0:h,y=aS(t,{boundary:l,rootBoundary:c,padding:d,altBoundary:u}),w=cu(t.placement),x=Tv(t.placement),S=!x,E=YB(w),P=RAe(E),T=t.modifiersData.popperOffsets,I=t.rects.reference,A=t.rects.popper,k=typeof m=="function"?m(Object.assign({},t.rects,{placement:t.placement})):m,O=typeof k=="number"?{mainAxis:k,altAxis:k}:Object.assign({mainAxis:0,altAxis:0},k),$=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,N={x:0,y:0};if(T){if(i){var L,j=E==="y"?Ma:Ra,D=E==="y"?Ml:Rl,_=E==="y"?"height":"width",z=T[E],F=z+y[j],V=z-y[D],U=p?-A[_]/2:0,K=x===Cv?I[_]:A[_],X=x===Cv?-A[_]:-I[_],ie=t.elements.arrow,ee=p&&ie?KB(ie):{width:0,height:0},Q=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:Ine(),te=Q[j],pe=Q[D],ae=dx(0,I[_],ee[_]),se=S?I[_]/2-U-ae-te-O.mainAxis:K-ae-te-O.mainAxis,oe=S?-I[_]/2+U+ae+pe+O.mainAxis:X+ae+pe+O.mainAxis,fe=t.elements.arrow&&BC(t.elements.arrow),Z=fe?E==="y"?fe.clientTop||0:fe.clientLeft||0:0,ce=(L=$==null?void 0:$[E])!=null?L:0,ge=z+se-ce-Z,we=z+oe-ce,me=dx(p?uI(F,ge):F,z,p?Jh(V,we):V);T[E]=me,N[E]=me-z}if(s){var Se,xe=E==="x"?Ma:Ra,ke=E==="x"?Ml:Rl,De=T[P],_e=P==="y"?"height":"width",ye=De+y[xe],Pe=De-y[ke],Ae=[Ma,Ra].indexOf(w)!==-1,Me=(Se=$==null?void 0:$[P])!=null?Se:0,We=Ae?ye:De-I[_e]-A[_e]-Me+O.altAxis,He=Ae?De+I[_e]+A[_e]-Me-O.altAxis:Pe,Xe=p&&Ae?rAe(We,De,He):dx(p?We:ye,De,p?He:Pe);T[P]=Xe,N[P]=Xe-De}t.modifiersData[r]=N}}const DAe={name:"preventOverflow",enabled:!0,phase:"main",fn:$Ae,requiresIfExists:["offset"]};function _Ae(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function NAe(e){return e===Ts(e)||!Sl(e)?QB(e):_Ae(e)}function LAe(e){var t=e.getBoundingClientRect(),n=Ev(t.width)/e.offsetWidth||1,r=Ev(t.height)/e.offsetHeight||1;return n!==1||r!==1}function FAe(e,t,n){n===void 0&&(n=!1);var r=Sl(t),o=Sl(t)&&LAe(t),i=Ep(t),a=Pv(e,o,n),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&((yu(t)!=="body"||JB(i))&&(s=NAe(t)),Sl(t)?(l=Pv(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):i&&(l.x=XB(i))),{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function jAe(e){var t=new Map,n=new Set,r=[];e.forEach(function(i){t.set(i.name,i)});function o(i){n.add(i.name);var a=[].concat(i.requires||[],i.requiresIfExists||[]);a.forEach(function(s){if(!n.has(s)){var l=t.get(s);l&&o(l)}}),r.push(i)}return e.forEach(function(i){n.has(i.name)||o(i)}),r}function BAe(e){var t=jAe(e);return XOe.reduce(function(n,r){return n.concat(t.filter(function(o){return o.phase===r}))},[])}function zAe(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function VAe(e){var t=e.reduce(function(n,r){var o=n[r.name];return n[r.name]=o?Object.assign({},o,r,{options:Object.assign({},o.options,r.options),data:Object.assign({},o.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var C6={placement:"bottom",modifiers:[],strategy:"absolute"};function E6(){for(var e=arguments.length,t=new Array(e),n=0;n{i||s(GAe(o)||document.body)},[o,i]),Cs(()=>{if(a&&!i)return kT(n,a),()=>{kT(n,null)}},[n,a,i]),i){if(v.isValidElement(r)){const c={ref:l};return v.cloneElement(r,c)}return R.jsx(v.Fragment,{children:r})}return R.jsx(v.Fragment,{children:a&&Tb.createPortal(r,a)})});function qAe(e){return nt("MuiPopper",e)}it("MuiPopper",["root"]);function KAe(e,t){if(t==="ltr")return e;switch(e){case"bottom-end":return"bottom-start";case"bottom-start":return"bottom-end";case"top-end":return"top-start";case"top-start":return"top-end";default:return e}}function uN(e){return typeof e=="function"?e():e}function YAe(e){return e.nodeType!==void 0}const QAe=e=>{const{classes:t}=e;return rt({root:["root"]},qAe,t)},XAe={},JAe=v.forwardRef(function(t,n){const{anchorEl:r,children:o,direction:i,disablePortal:a,modifiers:s,open:l,placement:c,popperOptions:u,popperRef:d,slotProps:f={},slots:p={},TransitionProps:h,ownerState:m,...y}=t,w=v.useRef(null),x=Rr(w,n),S=v.useRef(null),E=Rr(S,d),P=v.useRef(E);Cs(()=>{P.current=E},[E]),v.useImperativeHandle(d,()=>S.current,[]);const T=KAe(c,i),[I,A]=v.useState(T),[k,O]=v.useState(uN(r));v.useEffect(()=>{S.current&&S.current.forceUpdate()}),v.useEffect(()=>{r&&O(uN(r))},[r]),Cs(()=>{if(!k||!l)return;const D=F=>{A(F.placement)};let _=[{name:"preventOverflow",options:{altBoundary:a}},{name:"flip",options:{altBoundary:a}},{name:"onUpdate",enabled:!0,phase:"afterWrite",fn:({state:F})=>{D(F)}}];s!=null&&(_=_.concat(s)),u&&u.modifiers!=null&&(_=_.concat(u.modifiers));const z=WAe(k,w.current,{placement:T,...u,modifiers:_});return P.current(z),()=>{z.destroy(),P.current(null)}},[k,a,s,l,u,T]);const $={placement:I};h!==null&&($.TransitionProps=h);const N=QAe(t),L=p.root??"div",j=mu({elementType:L,externalSlotProps:f.root,externalForwardedProps:y,additionalProps:{role:"tooltip",ref:x},ownerState:t,className:N.root});return R.jsx(L,{...j,children:typeof o=="function"?o($):o})}),ZAe=v.forwardRef(function(t,n){const{anchorEl:r,children:o,container:i,direction:a="ltr",disablePortal:s=!1,keepMounted:l=!1,modifiers:c,open:u,placement:d="bottom",popperOptions:f=XAe,popperRef:p,style:h,transition:m=!1,slotProps:y={},slots:w={},...x}=t,[S,E]=v.useState(!0),P=()=>{E(!1)},T=()=>{E(!0)};if(!l&&!u&&(!m||S))return null;let I;if(i)I=i;else if(r){const O=uN(r);I=O&&YAe(O)?bi(O).body:bi(null).body}const A=!u&&l&&(!m||S)?"none":void 0,k=m?{in:u,onEnter:P,onExited:T}:void 0;return R.jsx(Rne,{disablePortal:s,container:I,children:R.jsx(JAe,{anchorEl:r,direction:a,disablePortal:s,modifiers:c,ref:n,open:m?!S:u,placement:d,popperOptions:f,popperRef:p,slotProps:y,slots:w,...x,style:{position:"fixed",top:0,left:0,display:A,...h},TransitionProps:k,children:o})})}),eke=re(ZAe,{name:"MuiPopper",slot:"Root",overridesResolver:(e,t)=>t.root})({}),Pp=v.forwardRef(function(t,n){const r=dr(),o=at({props:t,name:"MuiPopper"}),{anchorEl:i,component:a,components:s,componentsProps:l,container:c,disablePortal:u,keepMounted:d,modifiers:f,open:p,placement:h,popperOptions:m,popperRef:y,transition:w,slots:x,slotProps:S,...E}=o,P=(x==null?void 0:x.root)??(s==null?void 0:s.Root),T={anchorEl:i,container:c,disablePortal:u,keepMounted:d,modifiers:f,open:p,placement:h,popperOptions:m,popperRef:y,transition:w,...E};return R.jsx(eke,{as:a,direction:r?"rtl":"ltr",slots:{root:P},slotProps:S??l,...T,ref:n})});function tke(e){return nt("MuiListSubheader",e)}it("MuiListSubheader",["root","colorPrimary","colorInherit","gutters","inset","sticky"]);const nke=e=>{const{classes:t,color:n,disableGutters:r,inset:o,disableSticky:i}=e,a={root:["root",n!=="default"&&`color${Ce(n)}`,!r&&"gutters",o&&"inset",!i&&"sticky"]};return rt(a,tke,t)},rke=re("li",{name:"MuiListSubheader",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="default"&&t[`color${Ce(n.color)}`],!n.disableGutters&&t.gutters,n.inset&&t.inset,!n.disableSticky&&t.sticky]}})(Je(({theme:e})=>({boxSizing:"border-box",lineHeight:"48px",listStyle:"none",color:(e.vars||e).palette.text.secondary,fontFamily:e.typography.fontFamily,fontWeight:e.typography.fontWeightMedium,fontSize:e.typography.pxToRem(14),variants:[{props:{color:"primary"},style:{color:(e.vars||e).palette.primary.main}},{props:{color:"inherit"},style:{color:"inherit"}},{props:({ownerState:t})=>!t.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:t})=>t.inset,style:{paddingLeft:72}},{props:({ownerState:t})=>!t.disableSticky,style:{position:"sticky",top:0,zIndex:1,backgroundColor:(e.vars||e).palette.background.paper}}]}))),dN=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiListSubheader"}),{className:o,color:i="default",component:a="li",disableGutters:s=!1,disableSticky:l=!1,inset:c=!1,...u}=r,d={...r,color:i,component:a,disableGutters:s,disableSticky:l,inset:c},f=nke(d);return R.jsx(rke,{as:a,className:de(f.root,o),ref:n,ownerState:d,...u})});dN&&(dN.muiSkipListHighlight=!0);const oke=ct(R.jsx("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"}),"Cancel");function ike(e){return nt("MuiChip",e)}const $n=it("MuiChip",["root","sizeSmall","sizeMedium","colorDefault","colorError","colorInfo","colorPrimary","colorSecondary","colorSuccess","colorWarning","disabled","clickable","clickableColorPrimary","clickableColorSecondary","deletable","deletableColorPrimary","deletableColorSecondary","outlined","filled","outlinedPrimary","outlinedSecondary","filledPrimary","filledSecondary","avatar","avatarSmall","avatarMedium","avatarColorPrimary","avatarColorSecondary","icon","iconSmall","iconMedium","iconColorPrimary","iconColorSecondary","label","labelSmall","labelMedium","deleteIcon","deleteIconSmall","deleteIconMedium","deleteIconColorPrimary","deleteIconColorSecondary","deleteIconOutlinedColorPrimary","deleteIconOutlinedColorSecondary","deleteIconFilledColorPrimary","deleteIconFilledColorSecondary","focusVisible"]),ake=e=>{const{classes:t,disabled:n,size:r,color:o,iconColor:i,onDelete:a,clickable:s,variant:l}=e,c={root:["root",l,n&&"disabled",`size${Ce(r)}`,`color${Ce(o)}`,s&&"clickable",s&&`clickableColor${Ce(o)}`,a&&"deletable",a&&`deletableColor${Ce(o)}`,`${l}${Ce(o)}`],label:["label",`label${Ce(r)}`],avatar:["avatar",`avatar${Ce(r)}`,`avatarColor${Ce(o)}`],icon:["icon",`icon${Ce(r)}`,`iconColor${Ce(i)}`],deleteIcon:["deleteIcon",`deleteIcon${Ce(r)}`,`deleteIconColor${Ce(o)}`,`deleteIcon${Ce(l)}Color${Ce(o)}`]};return rt(c,ike,t)},ske=re("div",{name:"MuiChip",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e,{color:r,iconColor:o,clickable:i,onDelete:a,size:s,variant:l}=n;return[{[`& .${$n.avatar}`]:t.avatar},{[`& .${$n.avatar}`]:t[`avatar${Ce(s)}`]},{[`& .${$n.avatar}`]:t[`avatarColor${Ce(r)}`]},{[`& .${$n.icon}`]:t.icon},{[`& .${$n.icon}`]:t[`icon${Ce(s)}`]},{[`& .${$n.icon}`]:t[`iconColor${Ce(o)}`]},{[`& .${$n.deleteIcon}`]:t.deleteIcon},{[`& .${$n.deleteIcon}`]:t[`deleteIcon${Ce(s)}`]},{[`& .${$n.deleteIcon}`]:t[`deleteIconColor${Ce(r)}`]},{[`& .${$n.deleteIcon}`]:t[`deleteIcon${Ce(l)}Color${Ce(r)}`]},t.root,t[`size${Ce(s)}`],t[`color${Ce(r)}`],i&&t.clickable,i&&r!=="default"&&t[`clickableColor${Ce(r)})`],a&&t.deletable,a&&r!=="default"&&t[`deletableColor${Ce(r)}`],t[l],t[`${l}${Ce(r)}`]]}})(Je(({theme:e})=>{const t=e.palette.mode==="light"?e.palette.grey[700]:e.palette.grey[300];return{maxWidth:"100%",fontFamily:e.typography.fontFamily,fontSize:e.typography.pxToRem(13),display:"inline-flex",alignItems:"center",justifyContent:"center",height:32,color:(e.vars||e).palette.text.primary,backgroundColor:(e.vars||e).palette.action.selected,borderRadius:32/2,whiteSpace:"nowrap",transition:e.transitions.create(["background-color","box-shadow"]),cursor:"unset",outline:0,textDecoration:"none",border:0,padding:0,verticalAlign:"middle",boxSizing:"border-box",[`&.${$n.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity,pointerEvents:"none"},[`& .${$n.avatar}`]:{marginLeft:5,marginRight:-6,width:24,height:24,color:e.vars?e.vars.palette.Chip.defaultAvatarColor:t,fontSize:e.typography.pxToRem(12)},[`& .${$n.avatarColorPrimary}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.dark},[`& .${$n.avatarColorSecondary}`]:{color:(e.vars||e).palette.secondary.contrastText,backgroundColor:(e.vars||e).palette.secondary.dark},[`& .${$n.avatarSmall}`]:{marginLeft:4,marginRight:-4,width:18,height:18,fontSize:e.typography.pxToRem(10)},[`& .${$n.icon}`]:{marginLeft:5,marginRight:-6},[`& .${$n.deleteIcon}`]:{WebkitTapHighlightColor:"transparent",color:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / 0.26)`:St(e.palette.text.primary,.26),fontSize:22,cursor:"pointer",margin:"0 5px 0 -6px","&:hover":{color:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / 0.4)`:St(e.palette.text.primary,.4)}},variants:[{props:{size:"small"},style:{height:24,[`& .${$n.icon}`]:{fontSize:18,marginLeft:4,marginRight:-4},[`& .${$n.deleteIcon}`]:{fontSize:16,marginRight:4,marginLeft:-4}}},...Object.entries(e.palette).filter(Kn(["contrastText"])).map(([n])=>({props:{color:n},style:{backgroundColor:(e.vars||e).palette[n].main,color:(e.vars||e).palette[n].contrastText,[`& .${$n.deleteIcon}`]:{color:e.vars?`rgba(${e.vars.palette[n].contrastTextChannel} / 0.7)`:St(e.palette[n].contrastText,.7),"&:hover, &:active":{color:(e.vars||e).palette[n].contrastText}}}})),{props:n=>n.iconColor===n.color,style:{[`& .${$n.icon}`]:{color:e.vars?e.vars.palette.Chip.defaultIconColor:t}}},{props:n=>n.iconColor===n.color&&n.color!=="default",style:{[`& .${$n.icon}`]:{color:"inherit"}}},{props:{onDelete:!0},style:{[`&.${$n.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:St(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}}},...Object.entries(e.palette).filter(Kn(["dark"])).map(([n])=>({props:{color:n,onDelete:!0},style:{[`&.${$n.focusVisible}`]:{background:(e.vars||e).palette[n].dark}}})),{props:{clickable:!0},style:{userSelect:"none",WebkitTapHighlightColor:"transparent",cursor:"pointer","&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:St(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity)},[`&.${$n.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:St(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)},"&:active":{boxShadow:(e.vars||e).shadows[1]}}},...Object.entries(e.palette).filter(Kn(["dark"])).map(([n])=>({props:{color:n,clickable:!0},style:{[`&:hover, &.${$n.focusVisible}`]:{backgroundColor:(e.vars||e).palette[n].dark}}})),{props:{variant:"outlined"},style:{backgroundColor:"transparent",border:e.vars?`1px solid ${e.vars.palette.Chip.defaultBorder}`:`1px solid ${e.palette.mode==="light"?e.palette.grey[400]:e.palette.grey[700]}`,[`&.${$n.clickable}:hover`]:{backgroundColor:(e.vars||e).palette.action.hover},[`&.${$n.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`& .${$n.avatar}`]:{marginLeft:4},[`& .${$n.avatarSmall}`]:{marginLeft:2},[`& .${$n.icon}`]:{marginLeft:4},[`& .${$n.iconSmall}`]:{marginLeft:2},[`& .${$n.deleteIcon}`]:{marginRight:5},[`& .${$n.deleteIconSmall}`]:{marginRight:3}}},...Object.entries(e.palette).filter(Kn()).map(([n])=>({props:{variant:"outlined",color:n},style:{color:(e.vars||e).palette[n].main,border:`1px solid ${e.vars?`rgba(${e.vars.palette[n].mainChannel} / 0.7)`:St(e.palette[n].main,.7)}`,[`&.${$n.clickable}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette[n].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:St(e.palette[n].main,e.palette.action.hoverOpacity)},[`&.${$n.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette[n].mainChannel} / ${e.vars.palette.action.focusOpacity})`:St(e.palette[n].main,e.palette.action.focusOpacity)},[`& .${$n.deleteIcon}`]:{color:e.vars?`rgba(${e.vars.palette[n].mainChannel} / 0.7)`:St(e.palette[n].main,.7),"&:hover, &:active":{color:(e.vars||e).palette[n].main}}}}))]}})),lke=re("span",{name:"MuiChip",slot:"Label",overridesResolver:(e,t)=>{const{ownerState:n}=e,{size:r}=n;return[t.label,t[`label${Ce(r)}`]]}})({overflow:"hidden",textOverflow:"ellipsis",paddingLeft:12,paddingRight:12,whiteSpace:"nowrap",variants:[{props:{variant:"outlined"},style:{paddingLeft:11,paddingRight:11}},{props:{size:"small"},style:{paddingLeft:8,paddingRight:8}},{props:{size:"small",variant:"outlined"},style:{paddingLeft:7,paddingRight:7}}]});function P6(e){return e.key==="Backspace"||e.key==="Delete"}const vu=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiChip"}),{avatar:o,className:i,clickable:a,color:s="default",component:l,deleteIcon:c,disabled:u=!1,icon:d,label:f,onClick:p,onDelete:h,onKeyDown:m,onKeyUp:y,size:w="medium",variant:x="filled",tabIndex:S,skipFocusWhenDisabled:E=!1,...P}=r,T=v.useRef(null),I=Rr(T,n),A=V=>{V.stopPropagation(),h&&h(V)},k=V=>{V.currentTarget===V.target&&P6(V)&&V.preventDefault(),m&&m(V)},O=V=>{V.currentTarget===V.target&&h&&P6(V)&&h(V),y&&y(V)},$=a!==!1&&p?!0:a,N=$||h?ca:l||"div",L={...r,component:N,disabled:u,size:w,color:s,iconColor:v.isValidElement(d)&&d.props.color||s,onDelete:!!h,clickable:$,variant:x},j=ake(L),D=N===ca?{component:l||"div",focusVisibleClassName:j.focusVisible,...h&&{disableRipple:!0}}:{};let _=null;h&&(_=c&&v.isValidElement(c)?v.cloneElement(c,{className:de(c.props.className,j.deleteIcon),onClick:A}):R.jsx(oke,{className:de(j.deleteIcon),onClick:A}));let z=null;o&&v.isValidElement(o)&&(z=v.cloneElement(o,{className:de(j.avatar,o.props.className)}));let F=null;return d&&v.isValidElement(d)&&(F=v.cloneElement(d,{className:de(j.icon,d.props.className)})),R.jsxs(ske,{as:N,className:de(j.root,i),disabled:$&&u?!0:void 0,onClick:p,onKeyDown:k,onKeyUp:O,ref:I,tabIndex:E&&u?-1:S,ownerState:L,...D,...P,children:[z||F,R.jsx(lke,{className:de(j.label),ownerState:L,children:f}),_]})});function JE(e){return parseInt(e,10)||0}const cke={shadow:{visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"}};function uke(e){return e==null||Object.keys(e).length===0||e.outerHeightStyle===0&&!e.overflowing}const dke=v.forwardRef(function(t,n){const{onChange:r,maxRows:o,minRows:i=1,style:a,value:s,...l}=t,{current:c}=v.useRef(s!=null),u=v.useRef(null),d=Rr(n,u),f=v.useRef(null),p=v.useRef(null),h=v.useCallback(()=>{const w=u.current,S=Es(w).getComputedStyle(w);if(S.width==="0px")return{outerHeightStyle:0,overflowing:!1};const E=p.current;E.style.width=S.width,E.value=w.value||t.placeholder||"x",E.value.slice(-1)===` +`&&(E.value+=" ");const P=S.boxSizing,T=JE(S.paddingBottom)+JE(S.paddingTop),I=JE(S.borderBottomWidth)+JE(S.borderTopWidth),A=E.scrollHeight;E.value="x";const k=E.scrollHeight;let O=A;i&&(O=Math.max(Number(i)*k,O)),o&&(O=Math.min(Number(o)*k,O)),O=Math.max(O,k);const $=O+(P==="border-box"?T+I:0),N=Math.abs(O-A)<=1;return{outerHeightStyle:$,overflowing:N}},[o,i,t.placeholder]),m=v.useCallback(()=>{const w=h();if(uke(w))return;const x=w.outerHeightStyle,S=u.current;f.current!==x&&(f.current=x,S.style.height=`${x}px`),S.style.overflow=w.overflowing?"hidden":""},[h]);Cs(()=>{const w=()=>{m()};let x;const S=MC(w),E=u.current,P=Es(E);P.addEventListener("resize",S);let T;return typeof ResizeObserver<"u"&&(T=new ResizeObserver(w),T.observe(E)),()=>{S.clear(),cancelAnimationFrame(x),P.removeEventListener("resize",S),T&&T.disconnect()}},[h,m]),Cs(()=>{m()});const y=w=>{c||m(),r&&r(w)};return R.jsxs(v.Fragment,{children:[R.jsx("textarea",{value:s,onChange:y,ref:d,rows:i,style:a,...l}),R.jsx("textarea",{"aria-hidden":!0,className:t.className,readOnly:!0,ref:p,tabIndex:-1,style:{...cke.shadow,...a,paddingTop:0,paddingBottom:0}})]})});function Iv(e){return typeof e=="string"}function Tp({props:e,states:t,muiFormControl:n}){return t.reduce((r,o)=>(r[o]=e[o],n&&typeof e[o]>"u"&&(r[o]=n[o]),r),{})}const uk=v.createContext(void 0);function Ba(){return v.useContext(uk)}function T6(e){return e!=null&&!(Array.isArray(e)&&e.length===0)}function dI(e,t=!1){return e&&(T6(e.value)&&e.value!==""||t&&T6(e.defaultValue)&&e.defaultValue!=="")}function fke(e){return e.startAdornment}function pke(e){return nt("MuiInputBase",e)}const is=it("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"]);var I6;const dk=(e,t)=>{const{ownerState:n}=e;return[t.root,n.formControl&&t.formControl,n.startAdornment&&t.adornedStart,n.endAdornment&&t.adornedEnd,n.error&&t.error,n.size==="small"&&t.sizeSmall,n.multiline&&t.multiline,n.color&&t[`color${Ce(n.color)}`],n.fullWidth&&t.fullWidth,n.hiddenLabel&&t.hiddenLabel]},fk=(e,t)=>{const{ownerState:n}=e;return[t.input,n.size==="small"&&t.inputSizeSmall,n.multiline&&t.inputMultiline,n.type==="search"&&t.inputTypeSearch,n.startAdornment&&t.inputAdornedStart,n.endAdornment&&t.inputAdornedEnd,n.hiddenLabel&&t.inputHiddenLabel]},hke=e=>{const{classes:t,color:n,disabled:r,error:o,endAdornment:i,focused:a,formControl:s,fullWidth:l,hiddenLabel:c,multiline:u,readOnly:d,size:f,startAdornment:p,type:h}=e,m={root:["root",`color${Ce(n)}`,r&&"disabled",o&&"error",l&&"fullWidth",a&&"focused",s&&"formControl",f&&f!=="medium"&&`size${Ce(f)}`,u&&"multiline",p&&"adornedStart",i&&"adornedEnd",c&&"hiddenLabel",d&&"readOnly"],input:["input",r&&"disabled",h==="search"&&"inputTypeSearch",u&&"inputMultiline",f==="small"&&"inputSizeSmall",c&&"inputHiddenLabel",p&&"inputAdornedStart",i&&"inputAdornedEnd",d&&"readOnly"]};return rt(m,pke,t)},pk=re("div",{name:"MuiInputBase",slot:"Root",overridesResolver:dk})(Je(({theme:e})=>({...e.typography.body1,color:(e.vars||e).palette.text.primary,lineHeight:"1.4375em",boxSizing:"border-box",position:"relative",cursor:"text",display:"inline-flex",alignItems:"center",[`&.${is.disabled}`]:{color:(e.vars||e).palette.text.disabled,cursor:"default"},variants:[{props:({ownerState:t})=>t.multiline,style:{padding:"4px 0 5px"}},{props:({ownerState:t,size:n})=>t.multiline&&n==="small",style:{paddingTop:1}},{props:({ownerState:t})=>t.fullWidth,style:{width:"100%"}}]}))),hk=re("input",{name:"MuiInputBase",slot:"Input",overridesResolver:fk})(Je(({theme:e})=>{const t=e.palette.mode==="light",n={color:"currentColor",...e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:t?.42:.5},transition:e.transitions.create("opacity",{duration:e.transitions.duration.shorter})},r={opacity:"0 !important"},o=e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:t?.42:.5};return{font:"inherit",letterSpacing:"inherit",color:"currentColor",padding:"4px 0 5px",border:0,boxSizing:"content-box",background:"none",height:"1.4375em",margin:0,WebkitTapHighlightColor:"transparent",display:"block",minWidth:0,width:"100%","&::-webkit-input-placeholder":n,"&::-moz-placeholder":n,"&::-ms-input-placeholder":n,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{WebkitAppearance:"none"},[`label[data-shrink=false] + .${is.formControl} &`]:{"&::-webkit-input-placeholder":r,"&::-moz-placeholder":r,"&::-ms-input-placeholder":r,"&:focus::-webkit-input-placeholder":o,"&:focus::-moz-placeholder":o,"&:focus::-ms-input-placeholder":o},[`&.${is.disabled}`]:{opacity:1,WebkitTextFillColor:(e.vars||e).palette.text.disabled},variants:[{props:({ownerState:i})=>!i.disableInjectingGlobalStyles,style:{animationName:"mui-auto-fill-cancel",animationDuration:"10ms","&:-webkit-autofill":{animationDuration:"5000s",animationName:"mui-auto-fill"}}},{props:{size:"small"},style:{paddingTop:1}},{props:({ownerState:i})=>i.multiline,style:{height:"auto",resize:"none",padding:0,paddingTop:0}},{props:{type:"search"},style:{MozAppearance:"textfield"}}]}})),O6=dPe({"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}),Ib=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiInputBase"}),{"aria-describedby":o,autoComplete:i,autoFocus:a,className:s,color:l,components:c={},componentsProps:u={},defaultValue:d,disabled:f,disableInjectingGlobalStyles:p,endAdornment:h,error:m,fullWidth:y=!1,id:w,inputComponent:x="input",inputProps:S={},inputRef:E,margin:P,maxRows:T,minRows:I,multiline:A=!1,name:k,onBlur:O,onChange:$,onClick:N,onFocus:L,onKeyDown:j,onKeyUp:D,placeholder:_,readOnly:z,renderSuffix:F,rows:V,size:U,slotProps:K={},slots:X={},startAdornment:ie,type:ee="text",value:Q,...te}=r,pe=S.value!=null?S.value:Q,{current:ae}=v.useRef(pe!=null),se=v.useRef(),oe=v.useCallback(et=>{},[]),fe=Rr(se,E,S.ref,oe),[Z,ce]=v.useState(!1),ge=Ba(),we=Tp({props:r,muiFormControl:ge,states:["color","disabled","error","hiddenLabel","size","required","filled"]});we.focused=ge?ge.focused:Z,v.useEffect(()=>{!ge&&f&&Z&&(ce(!1),O&&O())},[ge,f,Z,O]);const me=ge&&ge.onFilled,Se=ge&&ge.onEmpty,xe=v.useCallback(et=>{dI(et)?me&&me():Se&&Se()},[me,Se]);Cs(()=>{ae&&xe({value:pe})},[pe,xe,ae]);const ke=et=>{L&&L(et),S.onFocus&&S.onFocus(et),ge&&ge.onFocus?ge.onFocus(et):ce(!0)},De=et=>{O&&O(et),S.onBlur&&S.onBlur(et),ge&&ge.onBlur?ge.onBlur(et):ce(!1)},_e=(et,...Et)=>{if(!ae){const An=et.target||se.current;if(An==null)throw new Error(bd(1));xe({value:An.value})}S.onChange&&S.onChange(et,...Et),$&&$(et,...Et)};v.useEffect(()=>{xe(se.current)},[]);const ye=et=>{se.current&&et.currentTarget===et.target&&se.current.focus(),N&&N(et)};let Pe=x,Ae=S;A&&Pe==="input"&&(V?Ae={type:void 0,minRows:V,maxRows:V,...Ae}:Ae={type:void 0,maxRows:T,minRows:I,...Ae},Pe=dke);const Me=et=>{xe(et.animationName==="mui-auto-fill-cancel"?se.current:{value:"x"})};v.useEffect(()=>{ge&&ge.setAdornedStart(!!ie)},[ge,ie]);const We={...r,color:we.color||"primary",disabled:we.disabled,endAdornment:h,error:we.error,focused:we.focused,formControl:ge,fullWidth:y,hiddenLabel:we.hiddenLabel,multiline:A,size:we.size,startAdornment:ie,type:ee},He=hke(We),Xe=X.root||c.Root||pk,gt=K.root||u.root||{},st=X.input||c.Input||hk;return Ae={...Ae,...K.input??u.input},R.jsxs(v.Fragment,{children:[!p&&typeof O6=="function"&&(I6||(I6=R.jsx(O6,{}))),R.jsxs(Xe,{...gt,ref:n,onClick:ye,...te,...!Iv(Xe)&&{ownerState:{...We,...gt.ownerState}},className:de(He.root,gt.className,s,z&&"MuiInputBase-readOnly"),children:[ie,R.jsx(uk.Provider,{value:null,children:R.jsx(st,{"aria-invalid":we.error,"aria-describedby":o,autoComplete:i,autoFocus:a,defaultValue:d,disabled:we.disabled,id:w,onAnimationStart:Me,name:k,placeholder:_,readOnly:z,required:we.required,rows:V,value:pe,onKeyDown:j,onKeyUp:D,type:ee,...Ae,...!Iv(st)&&{as:Pe,ownerState:{...We,...Ae.ownerState}},ref:fe,className:de(He.input,Ae.className,z&&"MuiInputBase-readOnly"),onBlur:De,onChange:_e,onFocus:ke})}),h,F?F({...we,startAdornment:ie}):null]})]})});function gke(e){return nt("MuiInput",e)}const vf={...is,...it("MuiInput",["root","underline","input"])};function mke(e){return nt("MuiOutlinedInput",e)}const tl={...is,...it("MuiOutlinedInput",["root","notchedOutline","input"])};function yke(e){return nt("MuiFilledInput",e)}const as={...is,...it("MuiFilledInput",["root","underline","input","adornedStart","adornedEnd","sizeSmall","multiline","hiddenLabel"])},$ne=ct(R.jsx("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown");function vke(e){return nt("MuiAutocomplete",e)}const Sn=it("MuiAutocomplete",["root","expanded","fullWidth","focused","focusVisible","tag","tagSizeSmall","tagSizeMedium","hasPopupIcon","hasClearIcon","inputRoot","input","inputFocused","endAdornment","clearIndicator","popupIndicator","popupIndicatorOpen","popper","popperDisablePortal","paper","listbox","loading","noOptions","option","groupLabel","groupUl"]);var A6,k6;const bke=e=>{const{classes:t,disablePortal:n,expanded:r,focused:o,fullWidth:i,hasClearIcon:a,hasPopupIcon:s,inputFocused:l,popupOpen:c,size:u}=e,d={root:["root",r&&"expanded",o&&"focused",i&&"fullWidth",a&&"hasClearIcon",s&&"hasPopupIcon"],inputRoot:["inputRoot"],input:["input",l&&"inputFocused"],tag:["tag",`tagSize${Ce(u)}`],endAdornment:["endAdornment"],clearIndicator:["clearIndicator"],popupIndicator:["popupIndicator",c&&"popupIndicatorOpen"],popper:["popper",n&&"popperDisablePortal"],paper:["paper"],listbox:["listbox"],loading:["loading"],noOptions:["noOptions"],option:["option"],groupLabel:["groupLabel"],groupUl:["groupUl"]};return rt(d,vke,t)},wke=re("div",{name:"MuiAutocomplete",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e,{fullWidth:r,hasClearIcon:o,hasPopupIcon:i,inputFocused:a,size:s}=n;return[{[`& .${Sn.tag}`]:t.tag},{[`& .${Sn.tag}`]:t[`tagSize${Ce(s)}`]},{[`& .${Sn.inputRoot}`]:t.inputRoot},{[`& .${Sn.input}`]:t.input},{[`& .${Sn.input}`]:a&&t.inputFocused},t.root,r&&t.fullWidth,i&&t.hasPopupIcon,o&&t.hasClearIcon]}})({[`&.${Sn.focused} .${Sn.clearIndicator}`]:{visibility:"visible"},"@media (pointer: fine)":{[`&:hover .${Sn.clearIndicator}`]:{visibility:"visible"}},[`& .${Sn.tag}`]:{margin:3,maxWidth:"calc(100% - 6px)"},[`& .${Sn.inputRoot}`]:{[`.${Sn.hasPopupIcon}&, .${Sn.hasClearIcon}&`]:{paddingRight:30},[`.${Sn.hasPopupIcon}.${Sn.hasClearIcon}&`]:{paddingRight:56},[`& .${Sn.input}`]:{width:0,minWidth:30}},[`& .${vf.root}`]:{paddingBottom:1,"& .MuiInput-input":{padding:"4px 4px 4px 0px"}},[`& .${vf.root}.${is.sizeSmall}`]:{[`& .${vf.input}`]:{padding:"2px 4px 3px 0"}},[`& .${tl.root}`]:{padding:9,[`.${Sn.hasPopupIcon}&, .${Sn.hasClearIcon}&`]:{paddingRight:39},[`.${Sn.hasPopupIcon}.${Sn.hasClearIcon}&`]:{paddingRight:65},[`& .${Sn.input}`]:{padding:"7.5px 4px 7.5px 5px"},[`& .${Sn.endAdornment}`]:{right:9}},[`& .${tl.root}.${is.sizeSmall}`]:{paddingTop:6,paddingBottom:6,paddingLeft:6,[`& .${Sn.input}`]:{padding:"2.5px 4px 2.5px 8px"}},[`& .${as.root}`]:{paddingTop:19,paddingLeft:8,[`.${Sn.hasPopupIcon}&, .${Sn.hasClearIcon}&`]:{paddingRight:39},[`.${Sn.hasPopupIcon}.${Sn.hasClearIcon}&`]:{paddingRight:65},[`& .${as.input}`]:{padding:"7px 4px"},[`& .${Sn.endAdornment}`]:{right:9}},[`& .${as.root}.${is.sizeSmall}`]:{paddingBottom:1,[`& .${as.input}`]:{padding:"2.5px 4px"}},[`& .${is.hiddenLabel}`]:{paddingTop:8},[`& .${as.root}.${is.hiddenLabel}`]:{paddingTop:0,paddingBottom:0,[`& .${Sn.input}`]:{paddingTop:16,paddingBottom:17}},[`& .${as.root}.${is.hiddenLabel}.${is.sizeSmall}`]:{[`& .${Sn.input}`]:{paddingTop:8,paddingBottom:9}},[`& .${Sn.input}`]:{flexGrow:1,textOverflow:"ellipsis",opacity:0},variants:[{props:{fullWidth:!0},style:{width:"100%"}},{props:{size:"small"},style:{[`& .${Sn.tag}`]:{margin:2,maxWidth:"calc(100% - 4px)"}}},{props:{inputFocused:!0},style:{[`& .${Sn.input}`]:{opacity:1}}},{props:{multiple:!0},style:{[`& .${Sn.inputRoot}`]:{flexWrap:"wrap"}}}]}),xke=re("div",{name:"MuiAutocomplete",slot:"EndAdornment",overridesResolver:(e,t)=>t.endAdornment})({position:"absolute",right:0,top:"50%",transform:"translate(0, -50%)"}),Ske=re(vn,{name:"MuiAutocomplete",slot:"ClearIndicator",overridesResolver:(e,t)=>t.clearIndicator})({marginRight:-2,padding:4,visibility:"hidden"}),Cke=re(vn,{name:"MuiAutocomplete",slot:"PopupIndicator",overridesResolver:({ownerState:e},t)=>({...t.popupIndicator,...e.popupOpen&&t.popupIndicatorOpen})})({padding:2,marginRight:-2,variants:[{props:{popupOpen:!0},style:{transform:"rotate(180deg)"}}]}),Eke=re(Pp,{name:"MuiAutocomplete",slot:"Popper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${Sn.option}`]:t.option},t.popper,n.disablePortal&&t.popperDisablePortal]}})(Je(({theme:e})=>({zIndex:(e.vars||e).zIndex.modal,variants:[{props:{disablePortal:!0},style:{position:"absolute"}}]}))),Pke=re(ro,{name:"MuiAutocomplete",slot:"Paper",overridesResolver:(e,t)=>t.paper})(Je(({theme:e})=>({...e.typography.body1,overflow:"auto"}))),Tke=re("div",{name:"MuiAutocomplete",slot:"Loading",overridesResolver:(e,t)=>t.loading})(Je(({theme:e})=>({color:(e.vars||e).palette.text.secondary,padding:"14px 16px"}))),Ike=re("div",{name:"MuiAutocomplete",slot:"NoOptions",overridesResolver:(e,t)=>t.noOptions})(Je(({theme:e})=>({color:(e.vars||e).palette.text.secondary,padding:"14px 16px"}))),Oke=re("div",{name:"MuiAutocomplete",slot:"Listbox",overridesResolver:(e,t)=>t.listbox})(Je(({theme:e})=>({listStyle:"none",margin:0,padding:"8px 0",maxHeight:"40vh",overflow:"auto",position:"relative",[`& .${Sn.option}`]:{minHeight:48,display:"flex",overflow:"hidden",justifyContent:"flex-start",alignItems:"center",cursor:"pointer",paddingTop:6,boxSizing:"border-box",outline:"0",WebkitTapHighlightColor:"transparent",paddingBottom:6,paddingLeft:16,paddingRight:16,[e.breakpoints.up("sm")]:{minHeight:"auto"},[`&.${Sn.focused}`]:{backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},'&[aria-disabled="true"]':{opacity:(e.vars||e).palette.action.disabledOpacity,pointerEvents:"none"},[`&.${Sn.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},'&[aria-selected="true"]':{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:St(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${Sn.focused}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:St(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:(e.vars||e).palette.action.selected}},[`&.${Sn.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:St(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}}}}))),Ake=re(dN,{name:"MuiAutocomplete",slot:"GroupLabel",overridesResolver:(e,t)=>t.groupLabel})(Je(({theme:e})=>({backgroundColor:(e.vars||e).palette.background.paper,top:-8}))),kke=re("ul",{name:"MuiAutocomplete",slot:"GroupUl",overridesResolver:(e,t)=>t.groupUl})({padding:0,[`& .${Sn.option}`]:{paddingLeft:24}}),Oc=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiAutocomplete"}),{autoComplete:o=!1,autoHighlight:i=!1,autoSelect:a=!1,blurOnSelect:s=!1,ChipProps:l,className:c,clearIcon:u=A6||(A6=R.jsx(xne,{fontSize:"small"})),clearOnBlur:d=!r.freeSolo,clearOnEscape:f=!1,clearText:p="Clear",closeText:h="Close",componentsProps:m,defaultValue:y=r.multiple?[]:null,disableClearable:w=!1,disableCloseOnSelect:x=!1,disabled:S=!1,disabledItemsFocusable:E=!1,disableListWrap:P=!1,disablePortal:T=!1,filterOptions:I,filterSelectedOptions:A=!1,forcePopupIcon:k="auto",freeSolo:O=!1,fullWidth:$=!1,getLimitTagsText:N=_n=>`+${_n}`,getOptionDisabled:L,getOptionKey:j,getOptionLabel:D,isOptionEqualToValue:_,groupBy:z,handleHomeEndKeys:F=!r.freeSolo,id:V,includeInputInList:U=!1,inputValue:K,limitTags:X=-1,ListboxComponent:ie,ListboxProps:ee,loading:Q=!1,loadingText:te="Loading…",multiple:pe=!1,noOptionsText:ae="No options",onChange:se,onClose:oe,onHighlightChange:fe,onInputChange:Z,onOpen:ce,open:ge,openOnFocus:we=!1,openText:me="Open",options:Se,PaperComponent:xe,PopperComponent:ke,popupIcon:De=k6||(k6=R.jsx($ne,{})),readOnly:_e=!1,renderGroup:ye,renderInput:Pe,renderOption:Ae,renderTags:Me,selectOnFocus:We=!r.freeSolo,size:He="medium",slots:Xe={},slotProps:gt={},value:st,...et}=r,{getRootProps:Et,getInputProps:An,getInputLabelProps:Ke,getPopupIndicatorProps:$e,getClearProps:Qe,getTagProps:Tt,getListboxProps:Xt,getOptionProps:$t,value:bn,dirty:Gn,expanded:Jn,id:Do,popupOpen:oo,focused:Bi,focusedTag:Ls,anchorEl:tn,setAnchorEl:li,inputValue:nm,groupedOptions:Vd}=jOe({...r,componentName:"Autocomplete"}),Mu=!w&&!S&&Gn&&!_e,qp=(!O||k===!0)&&k!==!1,{onMouseDown:Kp}=An(),{ref:I0,...rm}=Xt(),Yp=D||(_n=>_n.label??_n),Go={...r,disablePortal:T,expanded:Jn,focused:Bi,fullWidth:$,getOptionLabel:Yp,hasClearIcon:Mu,hasPopupIcon:qp,inputFocused:Ls===-1,popupOpen:oo,size:He},io=bke(Go),ql={slots:{paper:xe,popper:ke,...Xe},slotProps:{chip:l,listbox:ee,...m,...gt}},[Ue,Fe]=Cr("listbox",{elementType:Oke,externalForwardedProps:ql,ownerState:Go,className:io.listbox,additionalProps:rm,ref:I0}),[It,un]=Cr("paper",{elementType:ro,externalForwardedProps:ql,ownerState:Go,className:io.paper}),[gn,Vr]=Cr("popper",{elementType:Pp,externalForwardedProps:ql,ownerState:Go,className:io.popper,additionalProps:{disablePortal:T,style:{width:tn?tn.clientWidth:null},role:"presentation",anchorEl:tn,open:oo}});let Zn;if(pe&&bn.length>0){const _n=Fs=>({className:io.tag,disabled:S,...Tt(Fs)});Me?Zn=Me(bn,_n,Go):Zn=bn.map((Fs,Fc)=>{const{key:Xp,...fR}=_n({index:Fc});return R.jsx(vu,{label:Yp(Fs),size:He,...fR,...ql.slotProps.chip},Xp)})}if(X>-1&&Array.isArray(Zn)){const _n=Zn.length-X;!Bi&&_n>0&&(Zn=Zn.splice(0,X),Zn.push(R.jsx("span",{className:io.tag,children:N(_n)},Zn.length)))}const Ru=ye||(_n=>R.jsxs("li",{children:[R.jsx(Ake,{className:io.groupLabel,ownerState:Go,component:"div",children:_n.group}),R.jsx(kke,{className:io.groupUl,ownerState:Go,children:_n.children})]},_n.key)),om=Ae||((_n,Fs)=>{const{key:Fc,...Xp}=_n;return R.jsx("li",{...Xp,children:Yp(Fs)},Fc)}),B1=(_n,Fs)=>{const Fc=$t({option:_n,index:Fs});return om({...Fc,className:io.option},_n,{selected:Fc["aria-selected"],index:Fs,inputValue:nm},Go)},im=ql.slotProps.clearIndicator,am=ql.slotProps.popupIndicator,sm=_n=>R.jsx(Eke,{as:gn,...Vr,children:R.jsx(Pke,{as:It,...un,children:_n})});let Qp=null;return Vd.length>0?Qp=sm(R.jsx(Ue,{as:ie,...Fe,children:Vd.map((_n,Fs)=>z?Ru({key:_n.key,group:_n.group,children:_n.options.map((Fc,Xp)=>B1(Fc,_n.index+Xp))}):B1(_n,Fs))})):Q&&Vd.length===0?Qp=sm(R.jsx(Tke,{className:io.loading,ownerState:Go,children:te})):Vd.length===0&&!O&&!Q&&(Qp=sm(R.jsx(Ike,{className:io.noOptions,ownerState:Go,role:"presentation",onMouseDown:_n=>{_n.preventDefault()},children:ae}))),R.jsxs(v.Fragment,{children:[R.jsx(wke,{ref:n,className:de(io.root,c),ownerState:Go,...Et(et),children:Pe({id:Do,disabled:S,fullWidth:!0,size:He==="small"?"small":void 0,InputLabelProps:Ke(),InputProps:{ref:li,className:io.inputRoot,startAdornment:Zn,onMouseDown:_n=>{_n.target===_n.currentTarget&&Kp(_n)},...(Mu||qp)&&{endAdornment:R.jsxs(xke,{className:io.endAdornment,ownerState:Go,children:[Mu?R.jsx(Ske,{...Qe(),"aria-label":p,title:p,ownerState:Go,...im,className:de(io.clearIndicator,im==null?void 0:im.className),children:u}):null,qp?R.jsx(Cke,{...$e(),disabled:S,"aria-label":oo?h:me,title:oo?h:me,ownerState:Go,...am,className:de(io.popupIndicator,am==null?void 0:am.className),children:De}):null]})}},inputProps:{className:io.input,disabled:S,readOnly:_e,...An()}})}),tn?Qp:null]})}),Mke=ct(R.jsx("path",{d:"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"}),"Person");function Rke(e){return nt("MuiAvatar",e)}const $ke=it("MuiAvatar",["root","colorDefault","circular","rounded","square","img","fallback"]),Dke=e=>{const{classes:t,variant:n,colorDefault:r}=e;return rt({root:["root",n,r&&"colorDefault"],img:["img"],fallback:["fallback"]},Rke,t)},_ke=re("div",{name:"MuiAvatar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],n.colorDefault&&t.colorDefault]}})(Je(({theme:e})=>({position:"relative",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,width:40,height:40,fontFamily:e.typography.fontFamily,fontSize:e.typography.pxToRem(20),lineHeight:1,borderRadius:"50%",overflow:"hidden",userSelect:"none",variants:[{props:{variant:"rounded"},style:{borderRadius:(e.vars||e).shape.borderRadius}},{props:{variant:"square"},style:{borderRadius:0}},{props:{colorDefault:!0},style:{color:(e.vars||e).palette.background.default,...e.vars?{backgroundColor:e.vars.palette.Avatar.defaultBg}:{backgroundColor:e.palette.grey[400],...e.applyStyles("dark",{backgroundColor:e.palette.grey[600]})}}}]}))),Nke=re("img",{name:"MuiAvatar",slot:"Img",overridesResolver:(e,t)=>t.img})({width:"100%",height:"100%",textAlign:"center",objectFit:"cover",color:"transparent",textIndent:1e4}),Lke=re(Mke,{name:"MuiAvatar",slot:"Fallback",overridesResolver:(e,t)=>t.fallback})({width:"75%",height:"75%"});function Fke({crossOrigin:e,referrerPolicy:t,src:n,srcSet:r}){const[o,i]=v.useState(!1);return v.useEffect(()=>{if(!n&&!r)return;i(!1);let a=!0;const s=new Image;return s.onload=()=>{a&&i("loaded")},s.onerror=()=>{a&&i("error")},s.crossOrigin=e,s.referrerPolicy=t,s.src=n,r&&(s.srcset=r),()=>{a=!1}},[e,t,n,r]),o}const Ac=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiAvatar"}),{alt:o,children:i,className:a,component:s="div",slots:l={},slotProps:c={},imgProps:u,sizes:d,src:f,srcSet:p,variant:h="circular",...m}=r;let y=null;const w=Fke({...u,src:f,srcSet:p}),x=f||p,S=x&&w!=="error",E={...r,colorDefault:!S,component:s,variant:h};delete E.ownerState;const P=Dke(E),[T,I]=Cr("img",{className:P.img,elementType:Nke,externalForwardedProps:{slots:l,slotProps:{img:{...u,...c.img}}},additionalProps:{alt:o,src:f,srcSet:p,sizes:d},ownerState:E});return S?y=R.jsx(T,{...I}):i||i===0?y=i:x&&o?y=o[0]:y=R.jsx(Lke,{ownerState:E,className:P.fallback}),R.jsx(_ke,{as:s,className:de(P.root,a),ref:n,...m,ownerState:E,children:y})});function jke(e){return nt("MuiAvatarGroup",e)}const Bke=it("MuiAvatarGroup",["root","avatar"]),M6={small:-16,medium:-8},zke=e=>{const{classes:t}=e;return rt({root:["root"],avatar:["avatar"]},jke,t)},Vke=re("div",{name:"MuiAvatarGroup",slot:"Root",overridesResolver:(e,t)=>({[`& .${Bke.avatar}`]:t.avatar,...t.root})})(Je(({theme:e})=>({display:"flex",flexDirection:"row-reverse",[`& .${$ke.root}`]:{border:`2px solid ${(e.vars||e).palette.background.default}`,boxSizing:"content-box",marginLeft:"var(--AvatarGroup-spacing, -8px)","&:last-child":{marginLeft:0}}}))),Hke=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiAvatarGroup"}),{children:o,className:i,component:a="div",componentsProps:s,max:l=5,renderSurplus:c,slotProps:u={},slots:d={},spacing:f="medium",total:p,variant:h="circular",...m}=r;let y=l<2?2:l;const w={...r,max:l,spacing:f,component:a,variant:h},x=zke(w),S=v.Children.toArray(o).filter(N=>v.isValidElement(N)),E=p||S.length;E===y&&(y+=1),y=Math.min(E+1,y);const P=Math.min(S.length,y-1),T=Math.max(E-y,E-P,0),I=c?c(T):`+${T}`,A=w.spacing&&M6[w.spacing]!==void 0?M6[w.spacing]:-w.spacing||-8,k={slots:d,slotProps:{surplus:u.additionalAvatar??(s==null?void 0:s.additionalAvatar),...s,...u}},[O,$]=Cr("surplus",{elementType:Ac,externalForwardedProps:k,className:x.avatar,ownerState:w,additionalProps:{variant:h}});return R.jsxs(Vke,{as:a,ownerState:w,className:de(x.root,i),ref:n,...m,style:{"--AvatarGroup-spacing":A?`${A}px`:void 0,...m.style},children:[T?R.jsx(O,{...$,children:I}):null,S.slice(0,P).reverse().map(N=>v.cloneElement(N,{className:de(N.props.className,x.avatar),variant:N.props.variant||h}))]})}),Uke={entering:{opacity:1},entered:{opacity:1}},Ob=v.forwardRef(function(t,n){const r=no(),o={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:i,appear:a=!0,children:s,easing:l,in:c,onEnter:u,onEntered:d,onEntering:f,onExit:p,onExited:h,onExiting:m,style:y,timeout:w=o,TransitionComponent:x=$s,...S}=t,E=v.useRef(null),P=Rr(E,bp(s),n),T=j=>D=>{if(j){const _=E.current;D===void 0?j(_):j(_,D)}},I=T(f),A=T((j,D)=>{VB(j);const _=lp({style:y,timeout:w,easing:l},{mode:"enter"});j.style.webkitTransition=r.transitions.create("opacity",_),j.style.transition=r.transitions.create("opacity",_),u&&u(j,D)}),k=T(d),O=T(m),$=T(j=>{const D=lp({style:y,timeout:w,easing:l},{mode:"exit"});j.style.webkitTransition=r.transitions.create("opacity",D),j.style.transition=r.transitions.create("opacity",D),p&&p(j)}),N=T(h),L=j=>{i&&i(E.current,j)};return R.jsx(x,{appear:a,in:c,nodeRef:E,onEnter:A,onEntered:k,onEntering:I,onExit:$,onExited:N,onExiting:O,addEndListener:L,timeout:w,...S,children:(j,D)=>v.cloneElement(s,{style:{opacity:0,visibility:j==="exited"&&!c?"hidden":void 0,...Uke[j],...y,...s.props.style},ref:P,...D})})});function Wke(e){return nt("MuiBackdrop",e)}it("MuiBackdrop",["root","invisible"]);const Gke=e=>{const{ownerState:t,...n}=e;return n},qke=e=>{const{classes:t,invisible:n}=e;return rt({root:["root",n&&"invisible"]},Wke,t)},Kke=re("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.invisible&&t.invisible]}})({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent",variants:[{props:{invisible:!0},style:{backgroundColor:"transparent"}}]}),Dne=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiBackdrop"}),{children:o,className:i,component:a="div",invisible:s=!1,open:l,components:c={},componentsProps:u={},slotProps:d={},slots:f={},TransitionComponent:p,transitionDuration:h,...m}=r,y={...r,component:a,invisible:s},w=qke(y),x={transition:p,root:c.Root,...f},S={...u,...d},E={slots:x,slotProps:S},[P,T]=Cr("root",{elementType:Kke,externalForwardedProps:E,className:de(w.root,i),ownerState:y}),[I,A]=Cr("transition",{elementType:Ob,externalForwardedProps:E,ownerState:y}),k=Gke(A);return R.jsx(I,{in:l,timeout:h,...m,...k,children:R.jsx(P,{"aria-hidden":!0,...T,classes:w,ref:n,children:o})})});function Yke(e){const{badgeContent:t,invisible:n=!1,max:r=99,showZero:o=!1}=e,i=Vj({badgeContent:t,max:r});let a=n;n===!1&&t===0&&!o&&(a=!0);const{badgeContent:s,max:l=r}=a?i:e,c=s&&Number(s)>l?`${l}+`:s;return{badgeContent:s,invisible:a,max:l,displayValue:c}}function Qke(e){return nt("MuiBadge",e)}const Zd=it("MuiBadge",["root","badge","dot","standard","anchorOriginTopRight","anchorOriginBottomRight","anchorOriginTopLeft","anchorOriginBottomLeft","invisible","colorError","colorInfo","colorPrimary","colorSecondary","colorSuccess","colorWarning","overlapRectangular","overlapCircular","anchorOriginTopLeftCircular","anchorOriginTopLeftRectangular","anchorOriginTopRightCircular","anchorOriginTopRightRectangular","anchorOriginBottomLeftCircular","anchorOriginBottomLeftRectangular","anchorOriginBottomRightCircular","anchorOriginBottomRightRectangular"]),rD=10,oD=4,Xke=e=>{const{color:t,anchorOrigin:n,invisible:r,overlap:o,variant:i,classes:a={}}=e,s={root:["root"],badge:["badge",i,r&&"invisible",`anchorOrigin${Ce(n.vertical)}${Ce(n.horizontal)}`,`anchorOrigin${Ce(n.vertical)}${Ce(n.horizontal)}${Ce(o)}`,`overlap${Ce(o)}`,t!=="default"&&`color${Ce(t)}`]};return rt(s,Qke,a)},Jke=re("span",{name:"MuiBadge",slot:"Root",overridesResolver:(e,t)=>t.root})({position:"relative",display:"inline-flex",verticalAlign:"middle",flexShrink:0}),Zke=re("span",{name:"MuiBadge",slot:"Badge",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.badge,t[n.variant],t[`anchorOrigin${Ce(n.anchorOrigin.vertical)}${Ce(n.anchorOrigin.horizontal)}${Ce(n.overlap)}`],n.color!=="default"&&t[`color${Ce(n.color)}`],n.invisible&&t.invisible]}})(Je(({theme:e})=>({display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"center",alignContent:"center",alignItems:"center",position:"absolute",boxSizing:"border-box",fontFamily:e.typography.fontFamily,fontWeight:e.typography.fontWeightMedium,fontSize:e.typography.pxToRem(12),minWidth:rD*2,lineHeight:1,padding:"0 6px",height:rD*2,borderRadius:rD,zIndex:1,transition:e.transitions.create("transform",{easing:e.transitions.easing.easeInOut,duration:e.transitions.duration.enteringScreen}),variants:[...Object.entries(e.palette).filter(Kn(["contrastText"])).map(([t])=>({props:{color:t},style:{backgroundColor:(e.vars||e).palette[t].main,color:(e.vars||e).palette[t].contrastText}})),{props:{variant:"dot"},style:{borderRadius:oD,height:oD*2,minWidth:oD*2,padding:0}},{props:({ownerState:t})=>t.anchorOrigin.vertical==="top"&&t.anchorOrigin.horizontal==="right"&&t.overlap==="rectangular",style:{top:0,right:0,transform:"scale(1) translate(50%, -50%)",transformOrigin:"100% 0%",[`&.${Zd.invisible}`]:{transform:"scale(0) translate(50%, -50%)"}}},{props:({ownerState:t})=>t.anchorOrigin.vertical==="bottom"&&t.anchorOrigin.horizontal==="right"&&t.overlap==="rectangular",style:{bottom:0,right:0,transform:"scale(1) translate(50%, 50%)",transformOrigin:"100% 100%",[`&.${Zd.invisible}`]:{transform:"scale(0) translate(50%, 50%)"}}},{props:({ownerState:t})=>t.anchorOrigin.vertical==="top"&&t.anchorOrigin.horizontal==="left"&&t.overlap==="rectangular",style:{top:0,left:0,transform:"scale(1) translate(-50%, -50%)",transformOrigin:"0% 0%",[`&.${Zd.invisible}`]:{transform:"scale(0) translate(-50%, -50%)"}}},{props:({ownerState:t})=>t.anchorOrigin.vertical==="bottom"&&t.anchorOrigin.horizontal==="left"&&t.overlap==="rectangular",style:{bottom:0,left:0,transform:"scale(1) translate(-50%, 50%)",transformOrigin:"0% 100%",[`&.${Zd.invisible}`]:{transform:"scale(0) translate(-50%, 50%)"}}},{props:({ownerState:t})=>t.anchorOrigin.vertical==="top"&&t.anchorOrigin.horizontal==="right"&&t.overlap==="circular",style:{top:"14%",right:"14%",transform:"scale(1) translate(50%, -50%)",transformOrigin:"100% 0%",[`&.${Zd.invisible}`]:{transform:"scale(0) translate(50%, -50%)"}}},{props:({ownerState:t})=>t.anchorOrigin.vertical==="bottom"&&t.anchorOrigin.horizontal==="right"&&t.overlap==="circular",style:{bottom:"14%",right:"14%",transform:"scale(1) translate(50%, 50%)",transformOrigin:"100% 100%",[`&.${Zd.invisible}`]:{transform:"scale(0) translate(50%, 50%)"}}},{props:({ownerState:t})=>t.anchorOrigin.vertical==="top"&&t.anchorOrigin.horizontal==="left"&&t.overlap==="circular",style:{top:"14%",left:"14%",transform:"scale(1) translate(-50%, -50%)",transformOrigin:"0% 0%",[`&.${Zd.invisible}`]:{transform:"scale(0) translate(-50%, -50%)"}}},{props:({ownerState:t})=>t.anchorOrigin.vertical==="bottom"&&t.anchorOrigin.horizontal==="left"&&t.overlap==="circular",style:{bottom:"14%",left:"14%",transform:"scale(1) translate(-50%, 50%)",transformOrigin:"0% 100%",[`&.${Zd.invisible}`]:{transform:"scale(0) translate(-50%, 50%)"}}},{props:{invisible:!0},style:{transition:e.transitions.create("transform",{easing:e.transitions.easing.easeInOut,duration:e.transitions.duration.leavingScreen})}}]})));function R6(e){return{vertical:(e==null?void 0:e.vertical)??"top",horizontal:(e==null?void 0:e.horizontal)??"right"}}const eMe=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiBadge"}),{anchorOrigin:o,className:i,classes:a,component:s,components:l={},componentsProps:c={},children:u,overlap:d="rectangular",color:f="default",invisible:p=!1,max:h=99,badgeContent:m,slots:y,slotProps:w,showZero:x=!1,variant:S="standard",...E}=r,{badgeContent:P,invisible:T,max:I,displayValue:A}=Yke({max:h,invisible:p,badgeContent:m,showZero:x}),k=Vj({anchorOrigin:R6(o),color:f,overlap:d,variant:S,badgeContent:m}),O=T||P==null&&S!=="dot",{color:$=f,overlap:N=d,anchorOrigin:L,variant:j=S}=O?k:r,D=R6(L),_=j!=="dot"?A:void 0,z={...r,badgeContent:P,invisible:O,max:I,displayValue:_,showZero:x,anchorOrigin:D,color:$,overlap:N,variant:j},F=Xke(z),V=(y==null?void 0:y.root)??l.Root??Jke,U=(y==null?void 0:y.badge)??l.Badge??Zke,K=(w==null?void 0:w.root)??c.root,X=(w==null?void 0:w.badge)??c.badge,ie=mu({elementType:V,externalSlotProps:K,externalForwardedProps:E,additionalProps:{ref:n,as:s},ownerState:z,className:de(K==null?void 0:K.className,F.root,i)}),ee=mu({elementType:U,externalSlotProps:X,ownerState:z,className:de(F.badge,X==null?void 0:X.className)});return R.jsxs(V,{...ie,children:[u,R.jsx(U,{...ee,children:_})]})}),tMe=it("MuiBox",["root"]),nMe=RC(),en=FCe({themeId:wc,defaultTheme:nMe,defaultClassName:tMe.root,generateClassName:TZ.generate});function rMe(e){return nt("MuiButton",e)}const Am=it("MuiButton",["root","text","textInherit","textPrimary","textSecondary","textSuccess","textError","textInfo","textWarning","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","outlinedSuccess","outlinedError","outlinedInfo","outlinedWarning","contained","containedInherit","containedPrimary","containedSecondary","containedSuccess","containedError","containedInfo","containedWarning","disableElevation","focusVisible","disabled","colorInherit","colorPrimary","colorSecondary","colorSuccess","colorError","colorInfo","colorWarning","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","icon","iconSizeSmall","iconSizeMedium","iconSizeLarge"]),ZB=v.createContext({}),_ne=v.createContext(void 0),oMe=e=>{const{color:t,disableElevation:n,fullWidth:r,size:o,variant:i,classes:a}=e,s={root:["root",i,`${i}${Ce(t)}`,`size${Ce(o)}`,`${i}Size${Ce(o)}`,`color${Ce(t)}`,n&&"disableElevation",r&&"fullWidth"],label:["label"],startIcon:["icon","startIcon",`iconSize${Ce(o)}`],endIcon:["icon","endIcon",`iconSize${Ce(o)}`]},l=rt(s,rMe,a);return{...a,...l}},Nne=[{props:{size:"small"},style:{"& > *:nth-of-type(1)":{fontSize:18}}},{props:{size:"medium"},style:{"& > *:nth-of-type(1)":{fontSize:20}}},{props:{size:"large"},style:{"& > *:nth-of-type(1)":{fontSize:22}}}],iMe=re(ca,{shouldForwardProp:e=>ai(e)||e==="classes",name:"MuiButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${Ce(n.color)}`],t[`size${Ce(n.size)}`],t[`${n.variant}Size${Ce(n.size)}`],n.color==="inherit"&&t.colorInherit,n.disableElevation&&t.disableElevation,n.fullWidth&&t.fullWidth]}})(Je(({theme:e})=>{const t=e.palette.mode==="light"?e.palette.grey[300]:e.palette.grey[800],n=e.palette.mode==="light"?e.palette.grey.A100:e.palette.grey[700];return{...e.typography.button,minWidth:64,padding:"6px 16px",border:0,borderRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create(["background-color","box-shadow","border-color","color"],{duration:e.transitions.duration.short}),"&:hover":{textDecoration:"none"},[`&.${Am.disabled}`]:{color:(e.vars||e).palette.action.disabled},variants:[{props:{variant:"contained"},style:{color:"var(--variant-containedColor)",backgroundColor:"var(--variant-containedBg)",boxShadow:(e.vars||e).shadows[2],"&:hover":{boxShadow:(e.vars||e).shadows[4],"@media (hover: none)":{boxShadow:(e.vars||e).shadows[2]}},"&:active":{boxShadow:(e.vars||e).shadows[8]},[`&.${Am.focusVisible}`]:{boxShadow:(e.vars||e).shadows[6]},[`&.${Am.disabled}`]:{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground}}},{props:{variant:"outlined"},style:{padding:"5px 15px",border:"1px solid currentColor",borderColor:"var(--variant-outlinedBorder, currentColor)",backgroundColor:"var(--variant-outlinedBg)",color:"var(--variant-outlinedColor)",[`&.${Am.disabled}`]:{border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`}}},{props:{variant:"text"},style:{padding:"6px 8px",color:"var(--variant-textColor)",backgroundColor:"var(--variant-textBg)"}},...Object.entries(e.palette).filter(Kn()).map(([r])=>({props:{color:r},style:{"--variant-textColor":(e.vars||e).palette[r].main,"--variant-outlinedColor":(e.vars||e).palette[r].main,"--variant-outlinedBorder":e.vars?`rgba(${e.vars.palette[r].mainChannel} / 0.5)`:St(e.palette[r].main,.5),"--variant-containedColor":(e.vars||e).palette[r].contrastText,"--variant-containedBg":(e.vars||e).palette[r].main,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":(e.vars||e).palette[r].dark,"--variant-textBg":e.vars?`rgba(${e.vars.palette[r].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:St(e.palette[r].main,e.palette.action.hoverOpacity),"--variant-outlinedBorder":(e.vars||e).palette[r].main,"--variant-outlinedBg":e.vars?`rgba(${e.vars.palette[r].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:St(e.palette[r].main,e.palette.action.hoverOpacity)}}}})),{props:{color:"inherit"},style:{color:"inherit",borderColor:"currentColor","--variant-containedBg":e.vars?e.vars.palette.Button.inheritContainedBg:t,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":e.vars?e.vars.palette.Button.inheritContainedHoverBg:n,"--variant-textBg":e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.hoverOpacity})`:St(e.palette.text.primary,e.palette.action.hoverOpacity),"--variant-outlinedBg":e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.hoverOpacity})`:St(e.palette.text.primary,e.palette.action.hoverOpacity)}}}},{props:{size:"small",variant:"text"},style:{padding:"4px 5px",fontSize:e.typography.pxToRem(13)}},{props:{size:"large",variant:"text"},style:{padding:"8px 11px",fontSize:e.typography.pxToRem(15)}},{props:{size:"small",variant:"outlined"},style:{padding:"3px 9px",fontSize:e.typography.pxToRem(13)}},{props:{size:"large",variant:"outlined"},style:{padding:"7px 21px",fontSize:e.typography.pxToRem(15)}},{props:{size:"small",variant:"contained"},style:{padding:"4px 10px",fontSize:e.typography.pxToRem(13)}},{props:{size:"large",variant:"contained"},style:{padding:"8px 22px",fontSize:e.typography.pxToRem(15)}},{props:{disableElevation:!0},style:{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${Am.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${Am.disabled}`]:{boxShadow:"none"}}},{props:{fullWidth:!0},style:{width:"100%"}}]}})),aMe=re("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.startIcon,t[`iconSize${Ce(n.size)}`]]}})({display:"inherit",marginRight:8,marginLeft:-4,variants:[{props:{size:"small"},style:{marginLeft:-2}},...Nne]}),sMe=re("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.endIcon,t[`iconSize${Ce(n.size)}`]]}})({display:"inherit",marginRight:-4,marginLeft:8,variants:[{props:{size:"small"},style:{marginRight:-2}},...Nne]}),dt=v.forwardRef(function(t,n){const r=v.useContext(ZB),o=v.useContext(_ne),i=cg(r,t),a=at({props:i,name:"MuiButton"}),{children:s,color:l="primary",component:c="button",className:u,disabled:d=!1,disableElevation:f=!1,disableFocusRipple:p=!1,endIcon:h,focusVisibleClassName:m,fullWidth:y=!1,size:w="medium",startIcon:x,type:S,variant:E="text",...P}=a,T={...a,color:l,component:c,disabled:d,disableElevation:f,disableFocusRipple:p,fullWidth:y,size:w,type:S,variant:E},I=oMe(T),A=x&&R.jsx(aMe,{className:I.startIcon,ownerState:T,children:x}),k=h&&R.jsx(sMe,{className:I.endIcon,ownerState:T,children:h}),O=o||"";return R.jsxs(iMe,{ownerState:T,className:de(r.className,I.root,u,O),component:c,disabled:d,focusRipple:!p,focusVisibleClassName:de(I.focusVisible,m),ref:n,type:S,...P,classes:I,children:[A,s,k]})});function lMe(e){return nt("MuiButtonGroup",e)}const yn=it("MuiButtonGroup",["root","contained","outlined","text","disableElevation","disabled","firstButton","fullWidth","horizontal","vertical","colorPrimary","colorSecondary","grouped","groupedHorizontal","groupedVertical","groupedText","groupedTextHorizontal","groupedTextVertical","groupedTextPrimary","groupedTextSecondary","groupedOutlined","groupedOutlinedHorizontal","groupedOutlinedVertical","groupedOutlinedPrimary","groupedOutlinedSecondary","groupedContained","groupedContainedHorizontal","groupedContainedVertical","groupedContainedPrimary","groupedContainedSecondary","lastButton","middleButton"]),cMe=(e,t)=>{const{ownerState:n}=e;return[{[`& .${yn.grouped}`]:t.grouped},{[`& .${yn.grouped}`]:t[`grouped${Ce(n.orientation)}`]},{[`& .${yn.grouped}`]:t[`grouped${Ce(n.variant)}`]},{[`& .${yn.grouped}`]:t[`grouped${Ce(n.variant)}${Ce(n.orientation)}`]},{[`& .${yn.grouped}`]:t[`grouped${Ce(n.variant)}${Ce(n.color)}`]},{[`& .${yn.firstButton}`]:t.firstButton},{[`& .${yn.lastButton}`]:t.lastButton},{[`& .${yn.middleButton}`]:t.middleButton},t.root,t[n.variant],n.disableElevation===!0&&t.disableElevation,n.fullWidth&&t.fullWidth,n.orientation==="vertical"&&t.vertical]},uMe=e=>{const{classes:t,color:n,disabled:r,disableElevation:o,fullWidth:i,orientation:a,variant:s}=e,l={root:["root",s,a,i&&"fullWidth",o&&"disableElevation",`color${Ce(n)}`],grouped:["grouped",`grouped${Ce(a)}`,`grouped${Ce(s)}`,`grouped${Ce(s)}${Ce(a)}`,`grouped${Ce(s)}${Ce(n)}`,r&&"disabled"],firstButton:["firstButton"],lastButton:["lastButton"],middleButton:["middleButton"]};return rt(l,lMe,t)},dMe=re("div",{name:"MuiButtonGroup",slot:"Root",overridesResolver:cMe})(Je(({theme:e})=>({display:"inline-flex",borderRadius:(e.vars||e).shape.borderRadius,variants:[{props:{variant:"contained"},style:{boxShadow:(e.vars||e).shadows[2]}},{props:{disableElevation:!0},style:{boxShadow:"none"}},{props:{fullWidth:!0},style:{width:"100%"}},{props:{orientation:"vertical"},style:{flexDirection:"column",[`& .${yn.lastButton},& .${yn.middleButton}`]:{borderTopRightRadius:0,borderTopLeftRadius:0},[`& .${yn.firstButton},& .${yn.middleButton}`]:{borderBottomRightRadius:0,borderBottomLeftRadius:0}}},{props:{orientation:"horizontal"},style:{[`& .${yn.firstButton},& .${yn.middleButton}`]:{borderTopRightRadius:0,borderBottomRightRadius:0},[`& .${yn.lastButton},& .${yn.middleButton}`]:{borderTopLeftRadius:0,borderBottomLeftRadius:0}}},{props:{variant:"text",orientation:"horizontal"},style:{[`& .${yn.firstButton},& .${yn.middleButton}`]:{borderRight:e.vars?`1px solid rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:`1px solid ${e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"}`,[`&.${yn.disabled}`]:{borderRight:`1px solid ${(e.vars||e).palette.action.disabled}`}}}},{props:{variant:"text",orientation:"vertical"},style:{[`& .${yn.firstButton},& .${yn.middleButton}`]:{borderBottom:e.vars?`1px solid rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:`1px solid ${e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"}`,[`&.${yn.disabled}`]:{borderBottom:`1px solid ${(e.vars||e).palette.action.disabled}`}}}},...Object.entries(e.palette).filter(Kn()).flatMap(([t])=>[{props:{variant:"text",color:t},style:{[`& .${yn.firstButton},& .${yn.middleButton}`]:{borderColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / 0.5)`:St(e.palette[t].main,.5)}}}]),{props:{variant:"outlined",orientation:"horizontal"},style:{[`& .${yn.firstButton},& .${yn.middleButton}`]:{borderRightColor:"transparent","&:hover":{borderRightColor:"currentColor"}},[`& .${yn.lastButton},& .${yn.middleButton}`]:{marginLeft:-1}}},{props:{variant:"outlined",orientation:"vertical"},style:{[`& .${yn.firstButton},& .${yn.middleButton}`]:{borderBottomColor:"transparent","&:hover":{borderBottomColor:"currentColor"}},[`& .${yn.lastButton},& .${yn.middleButton}`]:{marginTop:-1}}},{props:{variant:"contained",orientation:"horizontal"},style:{[`& .${yn.firstButton},& .${yn.middleButton}`]:{borderRight:`1px solid ${(e.vars||e).palette.grey[400]}`,[`&.${yn.disabled}`]:{borderRight:`1px solid ${(e.vars||e).palette.action.disabled}`}}}},{props:{variant:"contained",orientation:"vertical"},style:{[`& .${yn.firstButton},& .${yn.middleButton}`]:{borderBottom:`1px solid ${(e.vars||e).palette.grey[400]}`,[`&.${yn.disabled}`]:{borderBottom:`1px solid ${(e.vars||e).palette.action.disabled}`}}}},...Object.entries(e.palette).filter(Kn(["dark"])).map(([t])=>({props:{variant:"contained",color:t},style:{[`& .${yn.firstButton},& .${yn.middleButton}`]:{borderColor:(e.vars||e).palette[t].dark}}}))],[`& .${yn.grouped}`]:{minWidth:40,boxShadow:"none",props:{variant:"contained"},style:{"&:hover":{boxShadow:"none"}}}}))),fN=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiButtonGroup"}),{children:o,className:i,color:a="primary",component:s="div",disabled:l=!1,disableElevation:c=!1,disableFocusRipple:u=!1,disableRipple:d=!1,fullWidth:f=!1,orientation:p="horizontal",size:h="medium",variant:m="outlined",...y}=r,w={...r,color:a,component:s,disabled:l,disableElevation:c,disableFocusRipple:u,disableRipple:d,fullWidth:f,orientation:p,size:h,variant:m},x=uMe(w),S=v.useMemo(()=>({className:x.grouped,color:a,disabled:l,disableElevation:c,disableFocusRipple:u,disableRipple:d,fullWidth:f,size:h,variant:m}),[a,l,c,u,d,f,h,m,x.grouped]),E=zZ(o),P=E.length,T=I=>{const A=I===0,k=I===P-1;return A&&k?"":A?x.firstButton:k?x.lastButton:x.middleButton};return R.jsx(dMe,{as:s,role:"group",className:de(x.root,i),ref:n,ownerState:w,...y,children:R.jsx(ZB.Provider,{value:S,children:E.map((I,A)=>R.jsx(_ne.Provider,{value:T(A),children:I},A))})})});function fMe(e){return nt("MuiCard",e)}it("MuiCard",["root"]);const pMe=e=>{const{classes:t}=e;return rt({root:["root"]},fMe,t)},hMe=re(ro,{name:"MuiCard",slot:"Root",overridesResolver:(e,t)=>t.root})({overflow:"hidden"}),to=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiCard"}),{className:o,raised:i=!1,...a}=r,s={...r,raised:i},l=pMe(s);return R.jsx(hMe,{className:de(l.root,o),elevation:i?8:void 0,ref:n,ownerState:s,...a})});function gMe(e){return nt("MuiCardActionArea",e)}const iD=it("MuiCardActionArea",["root","focusVisible","focusHighlight"]),mMe=e=>{const{classes:t}=e;return rt({root:["root"],focusHighlight:["focusHighlight"]},gMe,t)},yMe=re(ca,{name:"MuiCardActionArea",slot:"Root",overridesResolver:(e,t)=>t.root})(Je(({theme:e})=>({display:"block",textAlign:"inherit",borderRadius:"inherit",width:"100%",[`&:hover .${iD.focusHighlight}`]:{opacity:(e.vars||e).palette.action.hoverOpacity,"@media (hover: none)":{opacity:0}},[`&.${iD.focusVisible} .${iD.focusHighlight}`]:{opacity:(e.vars||e).palette.action.focusOpacity}}))),vMe=re("span",{name:"MuiCardActionArea",slot:"FocusHighlight",overridesResolver:(e,t)=>t.focusHighlight})(Je(({theme:e})=>({overflow:"hidden",pointerEvents:"none",position:"absolute",top:0,right:0,bottom:0,left:0,borderRadius:"inherit",opacity:0,backgroundColor:"currentcolor",transition:e.transitions.create("opacity",{duration:e.transitions.duration.short})}))),Lne=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiCardActionArea"}),{children:o,className:i,focusVisibleClassName:a,...s}=r,l=r,c=mMe(l);return R.jsxs(yMe,{className:de(c.root,i),focusVisibleClassName:de(a,c.focusVisible),ref:n,ownerState:l,...s,children:[o,R.jsx(vMe,{className:c.focusHighlight,ownerState:l})]})});function bMe(e){return nt("MuiCardActions",e)}it("MuiCardActions",["root","spacing"]);const wMe=e=>{const{classes:t,disableSpacing:n}=e;return rt({root:["root",!n&&"spacing"]},bMe,t)},xMe=re("div",{name:"MuiCardActions",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableSpacing&&t.spacing]}})({display:"flex",alignItems:"center",padding:8,variants:[{props:{disableSpacing:!1},style:{"& > :not(style) ~ :not(style)":{marginLeft:8}}}]}),Ds=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiCardActions"}),{disableSpacing:o=!1,className:i,...a}=r,s={...r,disableSpacing:o},l=wMe(s);return R.jsx(xMe,{className:de(l.root,i),ownerState:s,ref:n,...a})});function SMe(e){return nt("MuiCardContent",e)}it("MuiCardContent",["root"]);const CMe=e=>{const{classes:t}=e;return rt({root:["root"]},SMe,t)},EMe=re("div",{name:"MuiCardContent",slot:"Root",overridesResolver:(e,t)=>t.root})({padding:16,"&:last-child":{paddingBottom:24}}),ni=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiCardContent"}),{className:o,component:i="div",...a}=r,s={...r,component:i},l=CMe(s);return R.jsx(EMe,{as:i,className:de(l.root,o),ownerState:s,ref:n,...a})});function PMe(e){return nt("MuiCardHeader",e)}const fI=it("MuiCardHeader",["root","avatar","action","content","title","subheader"]),TMe=e=>{const{classes:t}=e;return rt({root:["root"],avatar:["avatar"],action:["action"],content:["content"],title:["title"],subheader:["subheader"]},PMe,t)},IMe=re("div",{name:"MuiCardHeader",slot:"Root",overridesResolver:(e,t)=>({[`& .${fI.title}`]:t.title,[`& .${fI.subheader}`]:t.subheader,...t.root})})({display:"flex",alignItems:"center",padding:16}),OMe=re("div",{name:"MuiCardHeader",slot:"Avatar",overridesResolver:(e,t)=>t.avatar})({display:"flex",flex:"0 0 auto",marginRight:16}),AMe=re("div",{name:"MuiCardHeader",slot:"Action",overridesResolver:(e,t)=>t.action})({flex:"0 0 auto",alignSelf:"flex-start",marginTop:-4,marginRight:-8,marginBottom:-4}),kMe=re("div",{name:"MuiCardHeader",slot:"Content",overridesResolver:(e,t)=>t.content})({flex:"1 1 auto",[`.${lI.root}:where(& .${fI.title})`]:{display:"block"},[`.${lI.root}:where(& .${fI.subheader})`]:{display:"block"}}),jl=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiCardHeader"}),{action:o,avatar:i,className:a,component:s="div",disableTypography:l=!1,subheader:c,subheaderTypographyProps:u,title:d,titleTypographyProps:f,...p}=r,h={...r,component:s,disableTypography:l},m=TMe(h);let y=d;y!=null&&y.type!==ot&&!l&&(y=R.jsx(ot,{variant:i?"body2":"h5",className:m.title,component:"span",...f,children:y}));let w=c;return w!=null&&w.type!==ot&&!l&&(w=R.jsx(ot,{variant:i?"body2":"body1",className:m.subheader,color:"textSecondary",component:"span",...u,children:w})),R.jsxs(IMe,{className:de(m.root,a),as:s,ref:n,ownerState:h,...p,children:[i&&R.jsx(OMe,{className:m.avatar,ownerState:h,children:i}),R.jsxs(kMe,{className:m.content,ownerState:h,children:[y,w]}),o&&R.jsx(AMe,{className:m.action,ownerState:h,children:o})]})});function MMe(e){return nt("MuiCardMedia",e)}it("MuiCardMedia",["root","media","img"]);const RMe=e=>{const{classes:t,isMediaComponent:n,isImageComponent:r}=e;return rt({root:["root",n&&"media",r&&"img"]},MMe,t)},$Me=re("div",{name:"MuiCardMedia",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e,{isMediaComponent:r,isImageComponent:o}=n;return[t.root,r&&t.media,o&&t.img]}})({display:"block",backgroundSize:"cover",backgroundRepeat:"no-repeat",backgroundPosition:"center",variants:[{props:{isMediaComponent:!0},style:{width:"100%"}},{props:{isImageComponent:!0},style:{objectFit:"cover"}}]}),DMe=["video","audio","picture","iframe","img"],_Me=["picture","img"],bu=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiCardMedia"}),{children:o,className:i,component:a="div",image:s,src:l,style:c,...u}=r,d=DMe.includes(a),f=!d&&s?{backgroundImage:`url("${s}")`,...c}:c,p={...r,component:a,isMediaComponent:d,isImageComponent:_Me.includes(a)},h=RMe(p);return R.jsx($Me,{className:de(h.root,i),as:a,role:!d&&s?"img":void 0,ref:n,style:f,ownerState:p,src:d?s||l:void 0,...u,children:o})});function NMe(e){return nt("PrivateSwitchBase",e)}it("PrivateSwitchBase",["root","checked","disabled","input","edgeStart","edgeEnd"]);const LMe=e=>{const{classes:t,checked:n,disabled:r,edge:o}=e,i={root:["root",n&&"checked",r&&"disabled",o&&`edge${Ce(o)}`],input:["input"]};return rt(i,NMe,t)},FMe=re(ca)({padding:9,borderRadius:"50%",variants:[{props:{edge:"start",size:"small"},style:{marginLeft:-3}},{props:({edge:e,ownerState:t})=>e==="start"&&t.size!=="small",style:{marginLeft:-12}},{props:{edge:"end",size:"small"},style:{marginRight:-3}},{props:({edge:e,ownerState:t})=>e==="end"&&t.size!=="small",style:{marginRight:-12}}]}),jMe=re("input",{shouldForwardProp:ai})({cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}),Fne=v.forwardRef(function(t,n){const{autoFocus:r,checked:o,checkedIcon:i,className:a,defaultChecked:s,disabled:l,disableFocusRipple:c=!1,edge:u=!1,icon:d,id:f,inputProps:p,inputRef:h,name:m,onBlur:y,onChange:w,onFocus:x,readOnly:S,required:E=!1,tabIndex:P,type:T,value:I,...A}=t,[k,O]=ad({controlled:o,default:!!s,name:"SwitchBase",state:"checked"}),$=Ba(),N=V=>{x&&x(V),$&&$.onFocus&&$.onFocus(V)},L=V=>{y&&y(V),$&&$.onBlur&&$.onBlur(V)},j=V=>{if(V.nativeEvent.defaultPrevented)return;const U=V.target.checked;O(U),w&&w(V,U)};let D=l;$&&typeof D>"u"&&(D=$.disabled);const _=T==="checkbox"||T==="radio",z={...t,checked:k,disabled:D,disableFocusRipple:c,edge:u},F=LMe(z);return R.jsxs(FMe,{component:"span",className:de(F.root,a),centerRipple:!0,focusRipple:!c,disabled:D,tabIndex:null,role:void 0,onFocus:N,onBlur:L,ownerState:z,ref:n,...A,children:[R.jsx(jMe,{autoFocus:r,checked:o,defaultChecked:s,className:F.input,disabled:D,id:_?f:void 0,name:m,onChange:j,readOnly:S,ref:h,required:E,ownerState:z,tabIndex:P,type:T,...T==="checkbox"&&I===void 0?{}:{value:I},...p}),k?i:d]})}),BMe=ct(R.jsx("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"}),"CheckBoxOutlineBlank"),zMe=ct(R.jsx("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckBox"),VMe=ct(R.jsx("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z"}),"IndeterminateCheckBox");function HMe(e){return nt("MuiCheckbox",e)}const aD=it("MuiCheckbox",["root","checked","disabled","indeterminate","colorPrimary","colorSecondary","sizeSmall","sizeMedium"]),UMe=e=>{const{classes:t,indeterminate:n,color:r,size:o}=e,i={root:["root",n&&"indeterminate",`color${Ce(r)}`,`size${Ce(o)}`]},a=rt(i,HMe,t);return{...t,...a}},WMe=re(Fne,{shouldForwardProp:e=>ai(e)||e==="classes",name:"MuiCheckbox",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.indeterminate&&t.indeterminate,t[`size${Ce(n.size)}`],n.color!=="default"&&t[`color${Ce(n.color)}`]]}})(Je(({theme:e})=>({color:(e.vars||e).palette.text.secondary,variants:[{props:{color:"default",disableRipple:!1},style:{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:St(e.palette.action.active,e.palette.action.hoverOpacity)}}},...Object.entries(e.palette).filter(Kn()).map(([t])=>({props:{color:t,disableRipple:!1},style:{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:St(e.palette[t].main,e.palette.action.hoverOpacity)}}})),...Object.entries(e.palette).filter(Kn()).map(([t])=>({props:{color:t},style:{[`&.${aD.checked}, &.${aD.indeterminate}`]:{color:(e.vars||e).palette[t].main},[`&.${aD.disabled}`]:{color:(e.vars||e).palette.action.disabled}}})),{props:{disableRipple:!1},style:{"&:hover":{"@media (hover: none)":{backgroundColor:"transparent"}}}}]}))),GMe=R.jsx(zMe,{}),qMe=R.jsx(BMe,{}),KMe=R.jsx(VMe,{}),YMe=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiCheckbox"}),{checkedIcon:o=GMe,color:i="primary",icon:a=qMe,indeterminate:s=!1,indeterminateIcon:l=KMe,inputProps:c,size:u="medium",disableRipple:d=!1,className:f,...p}=r,h=s?l:a,m=s?l:o,y={...r,disableRipple:d,color:i,indeterminate:s,size:u},w=UMe(y);return R.jsx(WMe,{type:"checkbox",inputProps:{"data-indeterminate":s,...c},icon:v.cloneElement(h,{fontSize:h.props.fontSize??u}),checkedIcon:v.cloneElement(m,{fontSize:m.props.fontSize??u}),ownerState:y,ref:n,className:de(w.root,f),disableRipple:d,...p,classes:w})});function QMe(e){return nt("MuiCircularProgress",e)}it("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);const ef=44,pN=Cu` 0% { transform: rotate(0deg); } @@ -175,7 +175,7 @@ Error generating stack: `+i.message+` 100% { transform: rotate(360deg); } -`,lN=xu` +`,hN=Cu` 0% { stroke-dasharray: 1px, 200px; stroke-dashoffset: 0; @@ -190,11 +190,11 @@ Error generating stack: `+i.message+` stroke-dasharray: 100px, 200px; stroke-dashoffset: -125px; } -`,VMe=typeof sN!="string"?gp` - animation: ${sN} 1.4s linear infinite; - `:null,HMe=typeof lN!="string"?gp` - animation: ${lN} 1.4s ease-in-out infinite; - `:null,UMe=e=>{const{classes:t,variant:n,color:r,disableShrink:o}=e,i={root:["root",n,`color${Ce(r)}`],svg:["svg"],circle:["circle",`circle${Ce(n)}`,o&&"circleDisableShrink"]};return rt(i,zMe,t)},WMe=oe("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`color${Ce(n.color)}`]]}})(Je(({theme:e})=>({display:"inline-block",variants:[{props:{variant:"determinate"},style:{transition:e.transitions.create("transform")}},{props:{variant:"indeterminate"},style:VMe||{animation:`${sN} 1.4s linear infinite`}},...Object.entries(e.palette).filter(Kn()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}}))]}))),GMe=oe("svg",{name:"MuiCircularProgress",slot:"Svg",overridesResolver:(e,t)=>t.svg})({display:"block"}),qMe=oe("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.circle,t[`circle${Ce(n.variant)}`],n.disableShrink&&t.circleDisableShrink]}})(Je(({theme:e})=>({stroke:"currentColor",variants:[{props:{variant:"determinate"},style:{transition:e.transitions.create("stroke-dashoffset")}},{props:{variant:"indeterminate"},style:{strokeDasharray:"80px, 200px",strokeDashoffset:0}},{props:({ownerState:t})=>t.variant==="indeterminate"&&!t.disableShrink,style:HMe||{animation:`${lN} 1.4s ease-in-out infinite`}}]}))),ok=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiCircularProgress"}),{className:o,color:i="primary",disableShrink:a=!1,size:s=40,style:l,thickness:c=3.6,value:u=0,variant:d="indeterminate",...f}=r,p={...r,color:i,disableShrink:a,size:s,thickness:c,value:u,variant:d},h=UMe(p),m={},y={},w={};if(d==="determinate"){const x=2*Math.PI*((Zd-c)/2);m.strokeDasharray=x.toFixed(3),w["aria-valuenow"]=Math.round(u),m.strokeDashoffset=`${((100-u)/100*x).toFixed(3)}px`,y.transform="rotate(-90deg)"}return R.jsx(WMe,{className:de(h.root,o),style:{width:s,height:s,...y,...l},ownerState:p,ref:n,role:"progressbar",...w,...f,children:R.jsx(GMe,{className:h.svg,ownerState:p,viewBox:`${Zd/2} ${Zd/2} ${Zd} ${Zd}`,children:R.jsx(qMe,{className:h.circle,style:m,ownerState:p,cx:Zd,cy:Zd,r:(Zd-c)/2,fill:"none",strokeWidth:c})})})});function A6(e){return e.substring(2).toLowerCase()}function KMe(e,t){return t.documentElement.clientWidth(setTimeout(()=>{l.current=!0},0),()=>{l.current=!1}),[]);const u=Rr(mp(t),s),d=ei(h=>{const m=c.current;c.current=!1;const y=yi(s.current);if(!l.current||!s.current||"clientX"in h&&KMe(h,y))return;if(a.current){a.current=!1;return}let w;h.composedPath?w=h.composedPath().includes(s.current):w=!y.documentElement.contains(h.target)||s.current.contains(h.target),!w&&(n||!m)&&o(h)}),f=h=>m=>{c.current=!0;const y=t.props[h];y&&y(m)},p={ref:u};return i!==!1&&(p[i]=f(i)),v.useEffect(()=>{if(i!==!1){const h=A6(i),m=yi(s.current),y=()=>{a.current=!0};return m.addEventListener(h,d),m.addEventListener("touchmove",y),()=>{m.removeEventListener(h,d),m.removeEventListener("touchmove",y)}}},[d,i]),r!==!1&&(p[r]=f(r)),v.useEffect(()=>{if(r!==!1){const h=A6(r),m=yi(s.current);return m.addEventListener(h,d),()=>{m.removeEventListener(h,d)}}},[d,r]),R.jsx(v.Fragment,{children:v.cloneElement(t,p)})}const Ac=S1e({createStyledComponent:oe("div",{name:"MuiContainer",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`maxWidth${Ce(String(n.maxWidth))}`],n.fixed&&t.fixed,n.disableGutters&&t.disableGutters]}}),useThemeProps:e=>at({props:e,name:"MuiContainer"})});function YMe(e){const t=yi(e);return t.body===e?Ss(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}function lx(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function k6(e){return parseInt(Ss(e).getComputedStyle(e).paddingRight,10)||0}function QMe(e){const n=["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].includes(e.tagName),r=e.tagName==="INPUT"&&e.getAttribute("type")==="hidden";return n||r}function M6(e,t,n,r,o){const i=[t,n,...r];[].forEach.call(e.children,a=>{const s=!i.includes(a),l=!QMe(a);s&&l&&lx(a,o)})}function nD(e,t){let n=-1;return e.some((r,o)=>t(r)?(n=o,!0):!1),n}function XMe(e,t){const n=[],r=e.container;if(!t.disableScrollLock){if(YMe(r)){const a=_Z(Ss(r));n.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight=`${k6(r)+a}px`;const s=yi(r).querySelectorAll(".mui-fixed");[].forEach.call(s,l=>{n.push({value:l.style.paddingRight,property:"padding-right",el:l}),l.style.paddingRight=`${k6(l)+a}px`})}let i;if(r.parentNode instanceof DocumentFragment)i=yi(r).body;else{const a=r.parentElement,s=Ss(r);i=(a==null?void 0:a.nodeName)==="HTML"&&s.getComputedStyle(a).overflowY==="scroll"?a:r}n.push({value:i.style.overflow,property:"overflow",el:i},{value:i.style.overflowX,property:"overflow-x",el:i},{value:i.style.overflowY,property:"overflow-y",el:i}),i.style.overflow="hidden"}return()=>{n.forEach(({value:i,el:a,property:s})=>{i?a.style.setProperty(s,i):a.style.removeProperty(s)})}}function JMe(e){const t=[];return[].forEach.call(e.children,n=>{n.getAttribute("aria-hidden")==="true"&&t.push(n)}),t}class ZMe{constructor(){this.modals=[],this.containers=[]}add(t,n){let r=this.modals.indexOf(t);if(r!==-1)return r;r=this.modals.length,this.modals.push(t),t.modalRef&&lx(t.modalRef,!1);const o=JMe(n);M6(n,t.mount,t.modalRef,o,!0);const i=nD(this.containers,a=>a.container===n);return i!==-1?(this.containers[i].modals.push(t),r):(this.containers.push({modals:[t],container:n,restore:null,hiddenSiblings:o}),r)}mount(t,n){const r=nD(this.containers,i=>i.modals.includes(t)),o=this.containers[r];o.restore||(o.restore=XMe(o,n))}remove(t,n=!0){const r=this.modals.indexOf(t);if(r===-1)return r;const o=nD(this.containers,a=>a.modals.includes(t)),i=this.containers[o];if(i.modals.splice(i.modals.indexOf(t),1),this.modals.splice(r,1),i.modals.length===0)i.restore&&i.restore(),t.modalRef&&lx(t.modalRef,n),M6(i.container,t.mount,t.modalRef,i.hiddenSiblings,!1),this.containers.splice(o,1);else{const a=i.modals[i.modals.length-1];a.modalRef&&lx(a.modalRef,!1)}return r}isTopModal(t){return this.modals.length>0&&this.modals[this.modals.length-1]===t}}const eRe=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function tRe(e){const t=parseInt(e.getAttribute("tabindex")||"",10);return Number.isNaN(t)?e.contentEditable==="true"||(e.nodeName==="AUDIO"||e.nodeName==="VIDEO"||e.nodeName==="DETAILS")&&e.getAttribute("tabindex")===null?0:e.tabIndex:t}function nRe(e){if(e.tagName!=="INPUT"||e.type!=="radio"||!e.name)return!1;const t=r=>e.ownerDocument.querySelector(`input[type="radio"]${r}`);let n=t(`[name="${e.name}"]:checked`);return n||(n=t(`[name="${e.name}"]`)),n!==e}function rRe(e){return!(e.disabled||e.tagName==="INPUT"&&e.type==="hidden"||nRe(e))}function oRe(e){const t=[],n=[];return Array.from(e.querySelectorAll(eRe)).forEach((r,o)=>{const i=tRe(r);i===-1||!rRe(r)||(i===0?t.push(r):n.push({documentOrder:o,tabIndex:i,node:r}))}),n.sort((r,o)=>r.tabIndex===o.tabIndex?r.documentOrder-o.documentOrder:r.tabIndex-o.tabIndex).map(r=>r.node).concat(t)}function iRe(){return!0}function QB(e){const{children:t,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:o=!1,getTabbable:i=oRe,isEnabled:a=iRe,open:s}=e,l=v.useRef(!1),c=v.useRef(null),u=v.useRef(null),d=v.useRef(null),f=v.useRef(null),p=v.useRef(!1),h=v.useRef(null),m=Rr(mp(t),h),y=v.useRef(null);v.useEffect(()=>{!s||!h.current||(p.current=!n)},[n,s]),v.useEffect(()=>{if(!s||!h.current)return;const C=yi(h.current);return h.current.contains(C.activeElement)||(h.current.hasAttribute("tabIndex")||h.current.setAttribute("tabIndex","-1"),p.current&&h.current.focus()),()=>{o||(d.current&&d.current.focus&&(l.current=!0,d.current.focus()),d.current=null)}},[s]),v.useEffect(()=>{if(!s||!h.current)return;const C=yi(h.current),E=I=>{y.current=I,!(r||!a()||I.key!=="Tab")&&C.activeElement===h.current&&I.shiftKey&&(l.current=!0,u.current&&u.current.focus())},P=()=>{var k,O;const I=h.current;if(I===null)return;if(!C.hasFocus()||!a()||l.current){l.current=!1;return}if(I.contains(C.activeElement)||r&&C.activeElement!==c.current&&C.activeElement!==u.current)return;if(C.activeElement!==f.current)f.current=null;else if(f.current!==null)return;if(!p.current)return;let A=[];if((C.activeElement===c.current||C.activeElement===u.current)&&(A=i(h.current)),A.length>0){const $=!!((k=y.current)!=null&&k.shiftKey&&((O=y.current)==null?void 0:O.key)==="Tab"),N=A[0],L=A[A.length-1];typeof N!="string"&&typeof L!="string"&&($?L.focus():N.focus())}else I.focus()};C.addEventListener("focusin",P),C.addEventListener("keydown",E,!0);const T=setInterval(()=>{C.activeElement&&C.activeElement.tagName==="BODY"&&P()},50);return()=>{clearInterval(T),C.removeEventListener("focusin",P),C.removeEventListener("keydown",E,!0)}},[n,r,o,a,s,i]);const w=C=>{d.current===null&&(d.current=C.relatedTarget),p.current=!0,f.current=C.target;const E=t.props.onFocus;E&&E(C)},x=C=>{d.current===null&&(d.current=C.relatedTarget),p.current=!0};return R.jsxs(v.Fragment,{children:[R.jsx("div",{tabIndex:s?0:-1,onFocus:x,ref:c,"data-testid":"sentinelStart"}),v.cloneElement(t,{ref:m,onFocus:w}),R.jsx("div",{tabIndex:s?0:-1,onFocus:x,ref:u,"data-testid":"sentinelEnd"})]})}function aRe(e){return typeof e=="function"?e():e}function sRe(e){return e?e.props.hasOwnProperty("in"):!1}const VE=new ZMe;function lRe(e){const{container:t,disableEscapeKeyDown:n=!1,disableScrollLock:r=!1,closeAfterTransition:o=!1,onTransitionEnter:i,onTransitionExited:a,children:s,onClose:l,open:c,rootRef:u}=e,d=v.useRef({}),f=v.useRef(null),p=v.useRef(null),h=Rr(p,u),[m,y]=v.useState(!c),w=sRe(s);let x=!0;(e["aria-hidden"]==="false"||e["aria-hidden"]===!1)&&(x=!1);const C=()=>yi(f.current),E=()=>(d.current.modalRef=p.current,d.current.mount=f.current,d.current),P=()=>{VE.mount(E(),{disableScrollLock:r}),p.current&&(p.current.scrollTop=0)},T=ei(()=>{const D=aRe(t)||C().body;VE.add(E(),D),p.current&&P()}),I=()=>VE.isTopModal(E()),A=ei(D=>{f.current=D,D&&(c&&I()?P():p.current&&lx(p.current,x))}),k=v.useCallback(()=>{VE.remove(E(),x)},[x]);v.useEffect(()=>()=>{k()},[k]),v.useEffect(()=>{c?T():(!w||!o)&&k()},[c,k,w,o,T]);const O=D=>_=>{var z;(z=D.onKeyDown)==null||z.call(D,_),!(_.key!=="Escape"||_.which===229||!I())&&(n||(_.stopPropagation(),l&&l(_,"escapeKeyDown")))},$=D=>_=>{var z;(z=D.onClick)==null||z.call(D,_),_.target===_.currentTarget&&l&&l(_,"backdropClick")};return{getRootProps:(D={})=>{const _=wT(e);delete _.onTransitionEnter,delete _.onTransitionExited;const z={..._,...D};return{role:"presentation",...z,onKeyDown:O(z),ref:h}},getBackdropProps:(D={})=>{const _=D;return{"aria-hidden":!0,..._,onClick:$(_),open:c}},getTransitionProps:()=>{const D=()=>{y(!1),i&&i()},_=()=>{y(!0),a&&a(),o&&k()};return{onEnter:P4(D,s==null?void 0:s.props.onEnter),onExited:P4(_,s==null?void 0:s.props.onExited)}},rootRef:h,portalRef:A,isTopModal:I,exited:m,hasTransition:w}}function cRe(e){return nt("MuiModal",e)}it("MuiModal",["root","hidden","backdrop"]);const uRe=e=>{const{open:t,exited:n,classes:r}=e;return rt({root:["root",!t&&n&&"hidden"],backdrop:["backdrop"]},cRe,r)},dRe=oe("div",{name:"MuiModal",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.open&&n.exited&&t.hidden]}})(Je(({theme:e})=>({position:"fixed",zIndex:(e.vars||e).zIndex.modal,right:0,bottom:0,top:0,left:0,variants:[{props:({ownerState:t})=>!t.open&&t.exited,style:{visibility:"hidden"}}]}))),fRe=oe(Ane,{name:"MuiModal",slot:"Backdrop",overridesResolver:(e,t)=>t.backdrop})({zIndex:-1}),Ib=v.forwardRef(function(t,n){const r=at({name:"MuiModal",props:t}),{BackdropComponent:o=fRe,BackdropProps:i,classes:a,className:s,closeAfterTransition:l=!1,children:c,container:u,component:d,components:f={},componentsProps:p={},disableAutoFocus:h=!1,disableEnforceFocus:m=!1,disableEscapeKeyDown:y=!1,disablePortal:w=!1,disableRestoreFocus:x=!1,disableScrollLock:C=!1,hideBackdrop:E=!1,keepMounted:P=!1,onBackdropClick:T,onClose:I,onTransitionEnter:A,onTransitionExited:k,open:O,slotProps:$={},slots:N={},theme:L,...j}=r,D={...r,closeAfterTransition:l,disableAutoFocus:h,disableEnforceFocus:m,disableEscapeKeyDown:y,disablePortal:w,disableRestoreFocus:x,disableScrollLock:C,hideBackdrop:E,keepMounted:P},{getRootProps:_,getBackdropProps:z,getTransitionProps:F,portalRef:V,isTopModal:U,exited:q,hasTransition:X}=lRe({...D,rootRef:n}),ie={...D,exited:q},ee=uRe(ie),Q={};if(c.props.tabIndex===void 0&&(Q.tabIndex="-1"),X){const{onEnter:Z,onExited:ce}=F();Q.onEnter=Z,Q.onExited=ce}const te={...j,slots:{root:f.Root,backdrop:f.Backdrop,...N},slotProps:{...p,...$}},[pe,ae]=Cr("root",{elementType:dRe,externalForwardedProps:te,getSlotProps:_,additionalProps:{ref:n,as:d},ownerState:ie,className:de(s,ee==null?void 0:ee.root,!ie.open&&ie.exited&&(ee==null?void 0:ee.hidden))}),[se,re]=Cr("backdrop",{elementType:o,externalForwardedProps:te,additionalProps:i,getSlotProps:Z=>z({...Z,onClick:ce=>{T&&T(ce),Z!=null&&Z.onClick&&Z.onClick(ce)}}),className:de(i==null?void 0:i.className,ee==null?void 0:ee.backdrop),ownerState:ie}),fe=Rr(i==null?void 0:i.ref,re.ref);return!P&&!O&&(!X||q)?null:R.jsx(Ine,{ref:V,container:u,disablePortal:w,children:R.jsxs(pe,{...ae,children:[!E&&o?R.jsx(se,{...re,ref:fe}):null,R.jsx(QB,{disableEnforceFocus:m,disableAutoFocus:h,disableRestoreFocus:x,isEnabled:U,open:O,children:v.cloneElement(c,Q)})]})})});function pRe(e){return nt("MuiDialog",e)}const cx=it("MuiDialog",["root","scrollPaper","scrollBody","container","paper","paperScrollPaper","paperScrollBody","paperWidthFalse","paperWidthXs","paperWidthSm","paperWidthMd","paperWidthLg","paperWidthXl","paperFullWidth","paperFullScreen"]),Dne=v.createContext({}),hRe=oe(Ane,{name:"MuiDialog",slot:"Backdrop",overrides:(e,t)=>t.backdrop})({zIndex:-1}),gRe=e=>{const{classes:t,scroll:n,maxWidth:r,fullWidth:o,fullScreen:i}=e,a={root:["root"],container:["container",`scroll${Ce(n)}`],paper:["paper",`paperScroll${Ce(n)}`,`paperWidth${Ce(String(r))}`,o&&"paperFullWidth",i&&"paperFullScreen"]};return rt(a,pRe,t)},mRe=oe(Ib,{name:"MuiDialog",slot:"Root",overridesResolver:(e,t)=>t.root})({"@media print":{position:"absolute !important"}}),yRe=oe("div",{name:"MuiDialog",slot:"Container",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.container,t[`scroll${Ce(n.scroll)}`]]}})({height:"100%","@media print":{height:"auto"},outline:0,variants:[{props:{scroll:"paper"},style:{display:"flex",justifyContent:"center",alignItems:"center"}},{props:{scroll:"body"},style:{overflowY:"auto",overflowX:"hidden",textAlign:"center","&::after":{content:'""',display:"inline-block",verticalAlign:"middle",height:"100%",width:"0"}}}]}),vRe=oe(to,{name:"MuiDialog",slot:"Paper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.paper,t[`scrollPaper${Ce(n.scroll)}`],t[`paperWidth${Ce(String(n.maxWidth))}`],n.fullWidth&&t.paperFullWidth,n.fullScreen&&t.paperFullScreen]}})(Je(({theme:e})=>({margin:32,position:"relative",overflowY:"auto","@media print":{overflowY:"visible",boxShadow:"none"},variants:[{props:{scroll:"paper"},style:{display:"flex",flexDirection:"column",maxHeight:"calc(100% - 64px)"}},{props:{scroll:"body"},style:{display:"inline-block",verticalAlign:"middle",textAlign:"initial"}},{props:({ownerState:t})=>!t.maxWidth,style:{maxWidth:"calc(100% - 64px)"}},{props:{maxWidth:"xs"},style:{maxWidth:e.breakpoints.unit==="px"?Math.max(e.breakpoints.values.xs,444):`max(${e.breakpoints.values.xs}${e.breakpoints.unit}, 444px)`,[`&.${cx.paperScrollBody}`]:{[e.breakpoints.down(Math.max(e.breakpoints.values.xs,444)+32*2)]:{maxWidth:"calc(100% - 64px)"}}}},...Object.keys(e.breakpoints.values).filter(t=>t!=="xs").map(t=>({props:{maxWidth:t},style:{maxWidth:`${e.breakpoints.values[t]}${e.breakpoints.unit}`,[`&.${cx.paperScrollBody}`]:{[e.breakpoints.down(e.breakpoints.values[t]+32*2)]:{maxWidth:"calc(100% - 64px)"}}}})),{props:({ownerState:t})=>t.fullWidth,style:{width:"calc(100% - 64px)"}},{props:({ownerState:t})=>t.fullScreen,style:{margin:0,width:"100%",maxWidth:"100%",height:"100%",maxHeight:"none",borderRadius:0,[`&.${cx.paperScrollBody}`]:{margin:0,maxWidth:"100%"}}}]}))),ik=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiDialog"}),o=Ro(),i={enter:o.transitions.duration.enteringScreen,exit:o.transitions.duration.leavingScreen},{"aria-describedby":a,"aria-labelledby":s,"aria-modal":l=!0,BackdropComponent:c,BackdropProps:u,children:d,className:f,disableEscapeKeyDown:p=!1,fullScreen:h=!1,fullWidth:m=!1,maxWidth:y="sm",onBackdropClick:w,onClick:x,onClose:C,open:E,PaperComponent:P=to,PaperProps:T={},scroll:I="paper",TransitionComponent:A=Tb,transitionDuration:k=i,TransitionProps:O,...$}=r,N={...r,disableEscapeKeyDown:p,fullScreen:h,fullWidth:m,maxWidth:y,scroll:I},L=gRe(N),j=v.useRef(),D=V=>{j.current=V.target===V.currentTarget},_=V=>{x&&x(V),j.current&&(j.current=null,w&&w(V),C&&C(V,"backdropClick"))},z=np(s),F=v.useMemo(()=>({titleId:z}),[z]);return R.jsx(mRe,{className:de(L.root,f),closeAfterTransition:!0,components:{Backdrop:hRe},componentsProps:{backdrop:{transitionDuration:k,as:c,...u}},disableEscapeKeyDown:p,onClose:C,open:E,ref:n,onClick:_,ownerState:N,...$,children:R.jsx(A,{appear:!0,in:E,timeout:k,role:"presentation",...O,children:R.jsx(yRe,{className:de(L.container),onMouseDown:D,ownerState:N,children:R.jsx(vRe,{as:P,elevation:24,role:"dialog","aria-describedby":a,"aria-labelledby":z,"aria-modal":l,...T,className:de(L.paper,T.className),ownerState:N,children:R.jsx(Dne.Provider,{value:F,children:d})})})})})});function bRe(e){return nt("MuiDialogActions",e)}it("MuiDialogActions",["root","spacing"]);const wRe=e=>{const{classes:t,disableSpacing:n}=e;return rt({root:["root",!n&&"spacing"]},bRe,t)},xRe=oe("div",{name:"MuiDialogActions",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableSpacing&&t.spacing]}})({display:"flex",alignItems:"center",padding:8,justifyContent:"flex-end",flex:"0 0 auto",variants:[{props:({ownerState:e})=>!e.disableSpacing,style:{"& > :not(style) ~ :not(style)":{marginLeft:8}}}]}),ak=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiDialogActions"}),{className:o,disableSpacing:i=!1,...a}=r,s={...r,disableSpacing:i},l=wRe(s);return R.jsx(xRe,{className:de(l.root,o),ownerState:s,ref:n,...a})});function SRe(e){return nt("MuiDialogContent",e)}it("MuiDialogContent",["root","dividers"]);function CRe(e){return nt("MuiDialogTitle",e)}const ERe=it("MuiDialogTitle",["root"]),PRe=e=>{const{classes:t,dividers:n}=e;return rt({root:["root",n&&"dividers"]},SRe,t)},TRe=oe("div",{name:"MuiDialogContent",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.dividers&&t.dividers]}})(Je(({theme:e})=>({flex:"1 1 auto",WebkitOverflowScrolling:"touch",overflowY:"auto",padding:"20px 24px",variants:[{props:({ownerState:t})=>t.dividers,style:{padding:"16px 24px",borderTop:`1px solid ${(e.vars||e).palette.divider}`,borderBottom:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:t})=>!t.dividers,style:{[`.${ERe.root} + &`]:{paddingTop:0}}}]}))),nS=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiDialogContent"}),{className:o,dividers:i=!1,...a}=r,s={...r,dividers:i},l=PRe(s);return R.jsx(TRe,{className:de(l.root,o),ownerState:s,ref:n,...a})}),IRe=e=>{const{classes:t}=e;return rt({root:["root"]},CRe,t)},ORe=oe(st,{name:"MuiDialogTitle",slot:"Root",overridesResolver:(e,t)=>t.root})({padding:"16px 24px",flex:"0 0 auto"}),XB=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiDialogTitle"}),{className:o,id:i,...a}=r,s=r,l=IRe(s),{titleId:c=i}=v.useContext(Dne);return R.jsx(ORe,{component:"h2",className:de(l.root,o),ownerState:s,ref:n,variant:"h6",id:i??c,...a})});function ARe(e){return nt("MuiDivider",e)}const R6=it("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]),kRe=e=>{const{absolute:t,children:n,classes:r,flexItem:o,light:i,orientation:a,textAlign:s,variant:l}=e;return rt({root:["root",t&&"absolute",l,i&&"light",a==="vertical"&&"vertical",o&&"flexItem",n&&"withChildren",n&&a==="vertical"&&"withChildrenVertical",s==="right"&&a!=="vertical"&&"textAlignRight",s==="left"&&a!=="vertical"&&"textAlignLeft"],wrapper:["wrapper",a==="vertical"&&"wrapperVertical"]},ARe,r)},MRe=oe("div",{name:"MuiDivider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.absolute&&t.absolute,t[n.variant],n.light&&t.light,n.orientation==="vertical"&&t.vertical,n.flexItem&&t.flexItem,n.children&&t.withChildren,n.children&&n.orientation==="vertical"&&t.withChildrenVertical,n.textAlign==="right"&&n.orientation!=="vertical"&&t.textAlignRight,n.textAlign==="left"&&n.orientation!=="vertical"&&t.textAlignLeft]}})(Je(({theme:e})=>({margin:0,flexShrink:0,borderWidth:0,borderStyle:"solid",borderColor:(e.vars||e).palette.divider,borderBottomWidth:"thin",variants:[{props:{absolute:!0},style:{position:"absolute",bottom:0,left:0,width:"100%"}},{props:{light:!0},style:{borderColor:e.vars?`rgba(${e.vars.palette.dividerChannel} / 0.08)`:xt(e.palette.divider,.08)}},{props:{variant:"inset"},style:{marginLeft:72}},{props:{variant:"middle",orientation:"horizontal"},style:{marginLeft:e.spacing(2),marginRight:e.spacing(2)}},{props:{variant:"middle",orientation:"vertical"},style:{marginTop:e.spacing(1),marginBottom:e.spacing(1)}},{props:{orientation:"vertical"},style:{height:"100%",borderBottomWidth:0,borderRightWidth:"thin"}},{props:{flexItem:!0},style:{alignSelf:"stretch",height:"auto"}},{props:({ownerState:t})=>!!t.children,style:{display:"flex",textAlign:"center",border:0,borderTopStyle:"solid",borderLeftStyle:"solid","&::before, &::after":{content:'""',alignSelf:"center"}}},{props:({ownerState:t})=>t.children&&t.orientation!=="vertical",style:{"&::before, &::after":{width:"100%",borderTop:`thin solid ${(e.vars||e).palette.divider}`,borderTopStyle:"inherit"}}},{props:({ownerState:t})=>t.orientation==="vertical"&&t.children,style:{flexDirection:"column","&::before, &::after":{height:"100%",borderLeft:`thin solid ${(e.vars||e).palette.divider}`,borderLeftStyle:"inherit"}}},{props:({ownerState:t})=>t.textAlign==="right"&&t.orientation!=="vertical",style:{"&::before":{width:"90%"},"&::after":{width:"10%"}}},{props:({ownerState:t})=>t.textAlign==="left"&&t.orientation!=="vertical",style:{"&::before":{width:"10%"},"&::after":{width:"90%"}}}]}))),RRe=oe("span",{name:"MuiDivider",slot:"Wrapper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.wrapper,n.orientation==="vertical"&&t.wrapperVertical]}})(Je(({theme:e})=>({display:"inline-block",paddingLeft:`calc(${e.spacing(1)} * 1.2)`,paddingRight:`calc(${e.spacing(1)} * 1.2)`,whiteSpace:"nowrap",variants:[{props:{orientation:"vertical"},style:{paddingTop:`calc(${e.spacing(1)} * 1.2)`,paddingBottom:`calc(${e.spacing(1)} * 1.2)`}}]}))),kl=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiDivider"}),{absolute:o=!1,children:i,className:a,orientation:s="horizontal",component:l=i||s==="vertical"?"div":"hr",flexItem:c=!1,light:u=!1,role:d=l!=="hr"?"separator":void 0,textAlign:f="center",variant:p="fullWidth",...h}=r,m={...r,absolute:o,component:l,flexItem:c,light:u,orientation:s,role:d,textAlign:f,variant:p},y=kRe(m);return R.jsx(MRe,{as:l,className:de(y.root,a),role:d,ref:n,ownerState:m,"aria-orientation":d==="separator"&&(l!=="hr"||s==="vertical")?s:void 0,...h,children:i?R.jsx(RRe,{className:y.wrapper,ownerState:m,children:i}):null})});kl&&(kl.muiSkipListHighlight=!0);function $Re(e,t,n){const r=t.getBoundingClientRect(),o=n&&n.getBoundingClientRect(),i=Ss(t);let a;if(t.fakeTransform)a=t.fakeTransform;else{const c=i.getComputedStyle(t);a=c.getPropertyValue("-webkit-transform")||c.getPropertyValue("transform")}let s=0,l=0;if(a&&a!=="none"&&typeof a=="string"){const c=a.split("(")[1].split(")")[0].split(",");s=parseInt(c[4],10),l=parseInt(c[5],10)}return e==="left"?o?`translateX(${o.right+s-r.left}px)`:`translateX(${i.innerWidth+s-r.left}px)`:e==="right"?o?`translateX(-${r.right-o.left-s}px)`:`translateX(-${r.left+r.width-s}px)`:e==="up"?o?`translateY(${o.bottom+l-r.top}px)`:`translateY(${i.innerHeight+l-r.top}px)`:o?`translateY(-${r.top-o.top+r.height-l}px)`:`translateY(-${r.top+r.height-l}px)`}function DRe(e){return typeof e=="function"?e():e}function HE(e,t,n){const r=DRe(n),o=$Re(e,t,r);o&&(t.style.webkitTransform=o,t.style.transform=o)}const _Re=v.forwardRef(function(t,n){const r=Ro(),o={enter:r.transitions.easing.easeOut,exit:r.transitions.easing.sharp},i={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:a,appear:s=!0,children:l,container:c,direction:u="down",easing:d=o,in:f,onEnter:p,onEntered:h,onEntering:m,onExit:y,onExited:w,onExiting:x,style:C,timeout:E=i,TransitionComponent:P=ks,...T}=t,I=v.useRef(null),A=Rr(mp(l),I,n),k=F=>V=>{F&&(V===void 0?F(I.current):F(I.current,V))},O=k((F,V)=>{HE(u,F,c),LB(F),p&&p(F,V)}),$=k((F,V)=>{const U=ip({timeout:E,style:C,easing:d},{mode:"enter"});F.style.webkitTransition=r.transitions.create("-webkit-transform",{...U}),F.style.transition=r.transitions.create("transform",{...U}),F.style.webkitTransform="none",F.style.transform="none",m&&m(F,V)}),N=k(h),L=k(x),j=k(F=>{const V=ip({timeout:E,style:C,easing:d},{mode:"exit"});F.style.webkitTransition=r.transitions.create("-webkit-transform",V),F.style.transition=r.transitions.create("transform",V),HE(u,F,c),y&&y(F)}),D=k(F=>{F.style.webkitTransition="",F.style.transition="",w&&w(F)}),_=F=>{a&&a(I.current,F)},z=v.useCallback(()=>{I.current&&HE(u,I.current,c)},[u,c]);return v.useEffect(()=>{if(f||u==="down"||u==="right")return;const F=PC(()=>{I.current&&HE(u,I.current,c)}),V=Ss(I.current);return V.addEventListener("resize",F),()=>{F.clear(),V.removeEventListener("resize",F)}},[u,f,c]),v.useEffect(()=>{f||z()},[f,z]),R.jsx(P,{nodeRef:I,onEnter:O,onEntered:N,onEntering:$,onExit:j,onExited:D,onExiting:L,addEndListener:_,appear:s,in:f,timeout:E,...T,children:(F,V)=>v.cloneElement(l,{ref:A,style:{visibility:F==="exited"&&!f?"hidden":void 0,...C,...l.props.style},...V})})});function NRe(e){return nt("MuiDrawer",e)}it("MuiDrawer",["root","docked","paper","paperAnchorLeft","paperAnchorRight","paperAnchorTop","paperAnchorBottom","paperAnchorDockedLeft","paperAnchorDockedRight","paperAnchorDockedTop","paperAnchorDockedBottom","modal"]);const _ne=(e,t)=>{const{ownerState:n}=e;return[t.root,(n.variant==="permanent"||n.variant==="persistent")&&t.docked,t.modal]},LRe=e=>{const{classes:t,anchor:n,variant:r}=e,o={root:["root"],docked:[(r==="permanent"||r==="persistent")&&"docked"],modal:["modal"],paper:["paper",`paperAnchor${Ce(n)}`,r!=="temporary"&&`paperAnchorDocked${Ce(n)}`]};return rt(o,NRe,t)},FRe=oe(Ib,{name:"MuiDrawer",slot:"Root",overridesResolver:_ne})(Je(({theme:e})=>({zIndex:(e.vars||e).zIndex.drawer}))),$6=oe("div",{shouldForwardProp:xi,name:"MuiDrawer",slot:"Docked",skipVariantsResolver:!1,overridesResolver:_ne})({flex:"0 0 auto"}),jRe=oe(to,{name:"MuiDrawer",slot:"Paper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.paper,t[`paperAnchor${Ce(n.anchor)}`],n.variant!=="temporary"&&t[`paperAnchorDocked${Ce(n.anchor)}`]]}})(Je(({theme:e})=>({overflowY:"auto",display:"flex",flexDirection:"column",height:"100%",flex:"1 0 auto",zIndex:(e.vars||e).zIndex.drawer,WebkitOverflowScrolling:"touch",position:"fixed",top:0,outline:0,variants:[{props:{anchor:"left"},style:{left:0}},{props:{anchor:"top"},style:{top:0,left:0,right:0,height:"auto",maxHeight:"100%"}},{props:{anchor:"right"},style:{right:0}},{props:{anchor:"bottom"},style:{top:"auto",left:0,bottom:0,right:0,height:"auto",maxHeight:"100%"}},{props:({ownerState:t})=>t.anchor==="left"&&t.variant!=="temporary",style:{borderRight:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:t})=>t.anchor==="top"&&t.variant!=="temporary",style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:t})=>t.anchor==="right"&&t.variant!=="temporary",style:{borderLeft:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:t})=>t.anchor==="bottom"&&t.variant!=="temporary",style:{borderTop:`1px solid ${(e.vars||e).palette.divider}`}}]}))),Nne={left:"right",right:"left",top:"down",bottom:"up"};function BRe(e){return["left","right"].includes(e)}function zRe({direction:e},t){return e==="rtl"&&BRe(t)?Nne[t]:t}const VRe=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiDrawer"}),o=Ro(),i=dr(),a={enter:o.transitions.duration.enteringScreen,exit:o.transitions.duration.leavingScreen},{anchor:s="left",BackdropProps:l,children:c,className:u,elevation:d=16,hideBackdrop:f=!1,ModalProps:{BackdropProps:p,...h}={},onClose:m,open:y=!1,PaperProps:w={},SlideProps:x,TransitionComponent:C=_Re,transitionDuration:E=a,variant:P="temporary",...T}=r,I=v.useRef(!1);v.useEffect(()=>{I.current=!0},[]);const A=zRe({direction:i?"rtl":"ltr"},s),O={...r,anchor:s,elevation:d,open:y,variant:P,...T},$=LRe(O),N=R.jsx(jRe,{elevation:P==="temporary"?d:0,square:!0,...w,className:de($.paper,w.className),ownerState:O,children:c});if(P==="permanent")return R.jsx($6,{className:de($.root,$.docked,u),ownerState:O,ref:n,...T,children:N});const L=R.jsx(C,{in:y,direction:Nne[A],timeout:E,appear:I.current,...x,children:N});return P==="persistent"?R.jsx($6,{className:de($.root,$.docked,u),ownerState:O,ref:n,...T,children:L}):R.jsx(FRe,{BackdropProps:{...l,...p,transitionDuration:E},className:de($.root,$.modal,u),open:y,ownerState:O,onClose:m,hideBackdrop:f,ref:n,...T,...h,children:L})});function HRe(e){return nt("MuiFab",e)}const D6=it("MuiFab",["root","primary","secondary","extended","circular","focusVisible","disabled","colorInherit","sizeSmall","sizeMedium","sizeLarge","info","error","warning","success"]),URe=e=>{const{color:t,variant:n,classes:r,size:o}=e,i={root:["root",n,`size${Ce(o)}`,t==="inherit"?"colorInherit":t]},a=rt(i,HRe,r);return{...r,...a}},WRe=oe(la,{name:"MuiFab",slot:"Root",shouldForwardProp:e=>xi(e)||e==="classes",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`size${Ce(n.size)}`],n.color==="inherit"&&t.colorInherit,t[Ce(n.size)],t[n.color]]}})(Je(({theme:e})=>{var t,n;return{...e.typography.button,minHeight:36,transition:e.transitions.create(["background-color","box-shadow","border-color"],{duration:e.transitions.duration.short}),borderRadius:"50%",padding:0,minWidth:0,width:56,height:56,zIndex:(e.vars||e).zIndex.fab,boxShadow:(e.vars||e).shadows[6],"&:active":{boxShadow:(e.vars||e).shadows[12]},color:e.vars?e.vars.palette.text.primary:(n=(t=e.palette).getContrastText)==null?void 0:n.call(t,e.palette.grey[300]),backgroundColor:(e.vars||e).palette.grey[300],"&:hover":{backgroundColor:(e.vars||e).palette.grey.A100,"@media (hover: none)":{backgroundColor:(e.vars||e).palette.grey[300]},textDecoration:"none"},[`&.${D6.focusVisible}`]:{boxShadow:(e.vars||e).shadows[6]},variants:[{props:{size:"small"},style:{width:40,height:40}},{props:{size:"medium"},style:{width:48,height:48}},{props:{variant:"extended"},style:{borderRadius:48/2,padding:"0 16px",width:"auto",minHeight:"auto",minWidth:48,height:48}},{props:{variant:"extended",size:"small"},style:{width:"auto",padding:"0 8px",borderRadius:34/2,minWidth:34,height:34}},{props:{variant:"extended",size:"medium"},style:{width:"auto",padding:"0 16px",borderRadius:40/2,minWidth:40,height:40}},{props:{color:"inherit"},style:{color:"inherit"}}]}}),Je(({theme:e})=>({variants:[...Object.entries(e.palette).filter(Kn(["dark","contrastText"])).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].contrastText,backgroundColor:(e.vars||e).palette[t].main,"&:hover":{backgroundColor:(e.vars||e).palette[t].dark,"@media (hover: none)":{backgroundColor:(e.vars||e).palette[t].main}}}}))]})),Je(({theme:e})=>({[`&.${D6.disabled}`]:{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground}}))),Dg=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiFab"}),{children:o,className:i,color:a="default",component:s="button",disabled:l=!1,disableFocusRipple:c=!1,focusVisibleClassName:u,size:d="large",variant:f="circular",...p}=r,h={...r,color:a,component:s,disabled:l,disableFocusRipple:c,size:d,variant:f},m=URe(h);return R.jsx(WRe,{className:de(m.root,i),component:s,disabled:l,focusRipple:!c,focusVisibleClassName:de(m.focusVisible,u),ownerState:h,ref:n,...p,classes:m,children:o})}),GRe=e=>{const{classes:t,disableUnderline:n,startAdornment:r,endAdornment:o,size:i,hiddenLabel:a,multiline:s}=e,l={root:["root",!n&&"underline",r&&"adornedStart",o&&"adornedEnd",i==="small"&&`size${Ce(i)}`,a&&"hiddenLabel",s&&"multiline"],input:["input"]},c=rt(l,lke,t);return{...t,...c}},qRe=oe(nk,{shouldForwardProp:e=>xi(e)||e==="classes",name:"MuiFilledInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...ek(e,t),!n.disableUnderline&&t.underline]}})(Je(({theme:e})=>{const t=e.palette.mode==="light",n=t?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",r=t?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",o=t?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",i=t?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return{position:"relative",backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r,borderTopLeftRadius:(e.vars||e).shape.borderRadius,borderTopRightRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),"&:hover":{backgroundColor:e.vars?e.vars.palette.FilledInput.hoverBg:o,"@media (hover: none)":{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r}},[`&.${os.focused}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r},[`&.${os.disabled}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.disabledBg:i},variants:[{props:({ownerState:a})=>!a.disableUnderline,style:{"&::after":{left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${os.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${os.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / ${e.vars.opacity.inputUnderline})`:n}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${os.disabled}, .${os.error}):before`]:{borderBottom:`1px solid ${(e.vars||e).palette.text.primary}`},[`&.${os.disabled}:before`]:{borderBottomStyle:"dotted"}}},...Object.entries(e.palette).filter(Kn()).map(([a])=>{var s;return{props:{disableUnderline:!1,color:a},style:{"&::after":{borderBottom:`2px solid ${(s=(e.vars||e).palette[a])==null?void 0:s.main}`}}}}),{props:({ownerState:a})=>a.startAdornment,style:{paddingLeft:12}},{props:({ownerState:a})=>a.endAdornment,style:{paddingRight:12}},{props:({ownerState:a})=>a.multiline,style:{padding:"25px 12px 8px"}},{props:({ownerState:a,size:s})=>a.multiline&&s==="small",style:{paddingTop:21,paddingBottom:4}},{props:({ownerState:a})=>a.multiline&&a.hiddenLabel,style:{paddingTop:16,paddingBottom:17}},{props:({ownerState:a})=>a.multiline&&a.hiddenLabel&&a.size==="small",style:{paddingTop:8,paddingBottom:9}}]}})),KRe=oe(rk,{name:"MuiFilledInput",slot:"Input",overridesResolver:tk})(Je(({theme:e})=>({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12,...!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:e.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:e.palette.mode==="light"?null:"#fff",caretColor:e.palette.mode==="light"?null:"#fff",borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"}},...e.vars&&{"&:-webkit-autofill":{borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},variants:[{props:{size:"small"},style:{paddingTop:21,paddingBottom:4}},{props:({ownerState:t})=>t.hiddenLabel,style:{paddingTop:16,paddingBottom:17}},{props:({ownerState:t})=>t.startAdornment,style:{paddingLeft:0}},{props:({ownerState:t})=>t.endAdornment,style:{paddingRight:0}},{props:({ownerState:t})=>t.hiddenLabel&&t.size==="small",style:{paddingTop:8,paddingBottom:9}},{props:({ownerState:t})=>t.multiline,style:{paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0}}]}))),tI=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiFilledInput"}),{disableUnderline:o=!1,components:i={},componentsProps:a,fullWidth:s=!1,hiddenLabel:l,inputComponent:c="input",multiline:u=!1,slotProps:d,slots:f={},type:p="text",...h}=r,m={...r,disableUnderline:o,fullWidth:s,inputComponent:c,multiline:u,type:p},y=GRe(r),w={root:{ownerState:m},input:{ownerState:m}},x=d??a?Oo(w,d??a):w,C=f.root??i.Root??qRe,E=f.input??i.Input??KRe;return R.jsx(Pb,{slots:{root:C,input:E},componentsProps:x,fullWidth:s,inputComponent:c,multiline:u,ref:n,type:p,...h,classes:y})});tI&&(tI.muiName="Input");function YRe(e){return nt("MuiFormControl",e)}it("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);const QRe=e=>{const{classes:t,margin:n,fullWidth:r}=e,o={root:["root",n!=="none"&&`margin${Ce(n)}`,r&&"fullWidth"]};return rt(o,YRe,t)},XRe=oe("div",{name:"MuiFormControl",slot:"Root",overridesResolver:({ownerState:e},t)=>({...t.root,...t[`margin${Ce(e.margin)}`],...e.fullWidth&&t.fullWidth})})({display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top",variants:[{props:{margin:"normal"},style:{marginTop:16,marginBottom:8}},{props:{margin:"dense"},style:{marginTop:8,marginBottom:4}},{props:{fullWidth:!0},style:{width:"100%"}}]}),_g=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiFormControl"}),{children:o,className:i,color:a="primary",component:s="div",disabled:l=!1,error:c=!1,focused:u,fullWidth:d=!1,hiddenLabel:f=!1,margin:p="none",required:h=!1,size:m="medium",variant:y="outlined",...w}=r,x={...r,color:a,component:s,disabled:l,error:c,fullWidth:d,hiddenLabel:f,margin:p,required:h,size:m,variant:y},C=QRe(x),[E,P]=v.useState(()=>{let L=!1;return o&&v.Children.forEach(o,j=>{if(!My(j,["Input","Select"]))return;const D=My(j,["Select"])?j.props.input:j;D&&rke(D.props)&&(L=!0)}),L}),[T,I]=v.useState(()=>{let L=!1;return o&&v.Children.forEach(o,j=>{My(j,["Input","Select"])&&(ZT(j.props,!0)||ZT(j.props.inputProps,!0))&&(L=!0)}),L}),[A,k]=v.useState(!1);l&&A&&k(!1);const O=u!==void 0&&!l?u:A;let $;v.useRef(!1);const N=v.useMemo(()=>({adornedStart:E,setAdornedStart:P,color:a,disabled:l,error:c,filled:T,focused:O,fullWidth:d,hiddenLabel:f,size:m,onBlur:()=>{k(!1)},onEmpty:()=>{I(!1)},onFilled:()=>{I(!0)},onFocus:()=>{k(!0)},registerEffect:$,required:h,variant:y}),[E,a,l,c,T,O,d,f,$,h,m,y]);return R.jsx(ZA.Provider,{value:N,children:R.jsx(XRe,{as:s,ownerState:x,className:de(C.root,i),ref:n,...w,children:o})})});function JRe(e){return nt("MuiFormControlLabel",e)}const Fw=it("MuiFormControlLabel",["root","labelPlacementStart","labelPlacementTop","labelPlacementBottom","disabled","label","error","required","asterisk"]),ZRe=e=>{const{classes:t,disabled:n,labelPlacement:r,error:o,required:i}=e,a={root:["root",n&&"disabled",`labelPlacement${Ce(r)}`,o&&"error",i&&"required"],label:["label",n&&"disabled"],asterisk:["asterisk",o&&"error"]};return rt(a,JRe,t)},e$e=oe("label",{name:"MuiFormControlLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${Fw.label}`]:t.label},t.root,t[`labelPlacement${Ce(n.labelPlacement)}`]]}})(Je(({theme:e})=>({display:"inline-flex",alignItems:"center",cursor:"pointer",verticalAlign:"middle",WebkitTapHighlightColor:"transparent",marginLeft:-11,marginRight:16,[`&.${Fw.disabled}`]:{cursor:"default"},[`& .${Fw.label}`]:{[`&.${Fw.disabled}`]:{color:(e.vars||e).palette.text.disabled}},variants:[{props:{labelPlacement:"start"},style:{flexDirection:"row-reverse",marginRight:-11}},{props:{labelPlacement:"top"},style:{flexDirection:"column-reverse"}},{props:{labelPlacement:"bottom"},style:{flexDirection:"column"}},{props:({labelPlacement:t})=>t==="start"||t==="top"||t==="bottom",style:{marginLeft:16}}]}))),t$e=oe("span",{name:"MuiFormControlLabel",slot:"Asterisk",overridesResolver:(e,t)=>t.asterisk})(Je(({theme:e})=>({[`&.${Fw.error}`]:{color:(e.vars||e).palette.error.main}}))),Td=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiFormControlLabel"}),{checked:o,className:i,componentsProps:a={},control:s,disabled:l,disableTypography:c,inputRef:u,label:d,labelPlacement:f="end",name:p,onChange:h,required:m,slots:y={},slotProps:w={},value:x,...C}=r,E=Fa(),P=l??s.props.disabled??(E==null?void 0:E.disabled),T=m??s.props.required,I={disabled:P,required:T};["checked","name","onChange","value","inputRef"].forEach(D=>{typeof s.props[D]>"u"&&typeof r[D]<"u"&&(I[D]=r[D])});const A=Cp({props:r,muiFormControl:E,states:["error"]}),k={...r,disabled:P,labelPlacement:f,required:T,error:A.error},O=ZRe(k),$={slots:y,slotProps:{...a,...w}},[N,L]=Cr("typography",{elementType:st,externalForwardedProps:$,ownerState:k});let j=d;return j!=null&&j.type!==st&&!c&&(j=R.jsx(N,{component:"span",...L,className:de(O.label,L==null?void 0:L.className),children:j})),R.jsxs(e$e,{className:de(O.root,i),ownerState:k,ref:n,...C,children:[v.cloneElement(s,I),T?R.jsxs("div",{children:[j,R.jsxs(t$e,{ownerState:k,"aria-hidden":!0,className:O.asterisk,children:[" ","*"]})]}):j]})});function n$e(e){return nt("MuiFormGroup",e)}it("MuiFormGroup",["root","row","error"]);const r$e=e=>{const{classes:t,row:n,error:r}=e;return rt({root:["root",n&&"row",r&&"error"]},n$e,t)},o$e=oe("div",{name:"MuiFormGroup",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.row&&t.row]}})({display:"flex",flexDirection:"column",flexWrap:"wrap",variants:[{props:{row:!0},style:{flexDirection:"row"}}]}),sk=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiFormGroup"}),{className:o,row:i=!1,...a}=r,s=Fa(),l=Cp({props:r,muiFormControl:s,states:["error"]}),c={...r,row:i,error:l.error},u=r$e(c);return R.jsx(o$e,{className:de(u.root,o),ownerState:c,ref:n,...a})});function i$e(e){return nt("MuiFormHelperText",e)}const _6=it("MuiFormHelperText",["root","error","disabled","sizeSmall","sizeMedium","contained","focused","filled","required"]);var N6;const a$e=e=>{const{classes:t,contained:n,size:r,disabled:o,error:i,filled:a,focused:s,required:l}=e,c={root:["root",o&&"disabled",i&&"error",r&&`size${Ce(r)}`,n&&"contained",s&&"focused",a&&"filled",l&&"required"]};return rt(c,i$e,t)},s$e=oe("p",{name:"MuiFormHelperText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.size&&t[`size${Ce(n.size)}`],n.contained&&t.contained,n.filled&&t.filled]}})(Je(({theme:e})=>({color:(e.vars||e).palette.text.secondary,...e.typography.caption,textAlign:"left",marginTop:3,marginRight:0,marginBottom:0,marginLeft:0,[`&.${_6.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${_6.error}`]:{color:(e.vars||e).palette.error.main},variants:[{props:{size:"small"},style:{marginTop:4}},{props:({ownerState:t})=>t.contained,style:{marginLeft:14,marginRight:14}}]}))),lk=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiFormHelperText"}),{children:o,className:i,component:a="p",disabled:s,error:l,filled:c,focused:u,margin:d,required:f,variant:p,...h}=r,m=Fa(),y=Cp({props:r,muiFormControl:m,states:["variant","size","disabled","error","filled","focused","required"]}),w={...r,component:a,contained:y.variant==="filled"||y.variant==="outlined",variant:y.variant,size:y.size,disabled:y.disabled,error:y.error,filled:y.filled,focused:y.focused,required:y.required};delete w.ownerState;const x=a$e(w);return R.jsx(s$e,{as:a,className:de(x.root,i),ref:n,...h,ownerState:w,children:o===" "?N6||(N6=R.jsx("span",{className:"notranslate",children:"​"})):o})});function l$e(e){return nt("MuiFormLabel",e)}const ux=it("MuiFormLabel",["root","colorSecondary","focused","disabled","error","filled","required","asterisk"]),c$e=e=>{const{classes:t,color:n,focused:r,disabled:o,error:i,filled:a,required:s}=e,l={root:["root",`color${Ce(n)}`,o&&"disabled",i&&"error",a&&"filled",r&&"focused",s&&"required"],asterisk:["asterisk",i&&"error"]};return rt(l,l$e,t)},u$e=oe("label",{name:"MuiFormLabel",slot:"Root",overridesResolver:({ownerState:e},t)=>({...t.root,...e.color==="secondary"&&t.colorSecondary,...e.filled&&t.filled})})(Je(({theme:e})=>({color:(e.vars||e).palette.text.secondary,...e.typography.body1,lineHeight:"1.4375em",padding:0,position:"relative",variants:[...Object.entries(e.palette).filter(Kn()).map(([t])=>({props:{color:t},style:{[`&.${ux.focused}`]:{color:(e.vars||e).palette[t].main}}})),{props:{},style:{[`&.${ux.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${ux.error}`]:{color:(e.vars||e).palette.error.main}}}]}))),d$e=oe("span",{name:"MuiFormLabel",slot:"Asterisk",overridesResolver:(e,t)=>t.asterisk})(Je(({theme:e})=>({[`&.${ux.error}`]:{color:(e.vars||e).palette.error.main}}))),f$e=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiFormLabel"}),{children:o,className:i,color:a,component:s="label",disabled:l,error:c,filled:u,focused:d,required:f,...p}=r,h=Fa(),m=Cp({props:r,muiFormControl:h,states:["color","required","focused","disabled","error","filled"]}),y={...r,color:m.color||"primary",component:s,disabled:m.disabled,error:m.error,filled:m.filled,focused:m.focused,required:m.required},w=c$e(y);return R.jsxs(u$e,{as:s,ownerState:y,className:de(w.root,i),ref:n,...p,children:[o,m.required&&R.jsxs(d$e,{ownerState:y,"aria-hidden":!0,className:w.asterisk,children:[" ","*"]})]})}),Oe=L1e({createStyledComponent:oe("div",{name:"MuiGrid2",slot:"Root",overridesResolver:(e,t)=>t.root}),componentName:"MuiGrid2",useThemeProps:e=>at({props:e,name:"MuiGrid2"})});function cN(e){return`scale(${e}, ${e**2})`}const p$e={entering:{opacity:1,transform:cN(1)},entered:{opacity:1,transform:"none"}},rD=typeof navigator<"u"&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),ap=v.forwardRef(function(t,n){const{addEndListener:r,appear:o=!0,children:i,easing:a,in:s,onEnter:l,onEntered:c,onEntering:u,onExit:d,onExited:f,onExiting:p,style:h,timeout:m="auto",TransitionComponent:y=ks,...w}=t,x=kf(),C=v.useRef(),E=Ro(),P=v.useRef(null),T=Rr(P,mp(i),n),I=D=>_=>{if(D){const z=P.current;_===void 0?D(z):D(z,_)}},A=I(u),k=I((D,_)=>{LB(D);const{duration:z,delay:F,easing:V}=ip({style:h,timeout:m,easing:a},{mode:"enter"});let U;m==="auto"?(U=E.transitions.getAutoHeightDuration(D.clientHeight),C.current=U):U=z,D.style.transition=[E.transitions.create("opacity",{duration:U,delay:F}),E.transitions.create("transform",{duration:rD?U:U*.666,delay:F,easing:V})].join(","),l&&l(D,_)}),O=I(c),$=I(p),N=I(D=>{const{duration:_,delay:z,easing:F}=ip({style:h,timeout:m,easing:a},{mode:"exit"});let V;m==="auto"?(V=E.transitions.getAutoHeightDuration(D.clientHeight),C.current=V):V=_,D.style.transition=[E.transitions.create("opacity",{duration:V,delay:z}),E.transitions.create("transform",{duration:rD?V:V*.666,delay:rD?z:z||V*.333,easing:F})].join(","),D.style.opacity=0,D.style.transform=cN(.75),d&&d(D)}),L=I(f),j=D=>{m==="auto"&&x.start(C.current||0,D),r&&r(P.current,D)};return R.jsx(y,{appear:o,in:s,nodeRef:P,onEnter:k,onEntered:O,onEntering:A,onExit:N,onExited:L,onExiting:$,addEndListener:j,timeout:m==="auto"?null:m,...w,children:(D,_)=>v.cloneElement(i,{style:{opacity:0,transform:cN(.75),visibility:D==="exited"&&!s?"hidden":void 0,...p$e[D],...h,...i.props.style},ref:T,..._})})});ap&&(ap.muiSupportAuto=!0);function h$e(e){return nt("MuiImageList",e)}it("MuiImageList",["root","masonry","quilted","standard","woven"]);const Lne=v.createContext({}),g$e=e=>{const{classes:t,variant:n}=e;return rt({root:["root",n]},h$e,t)},m$e=oe("ul",{name:"MuiImageList",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant]]}})({display:"grid",overflowY:"auto",listStyle:"none",padding:0,WebkitOverflowScrolling:"touch",variants:[{props:{variant:"masonry"},style:{display:"block"}}]}),Fne=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiImageList"}),{children:o,className:i,cols:a=2,component:s="ul",rowHeight:l="auto",gap:c=4,style:u,variant:d="standard",...f}=r,p=v.useMemo(()=>({rowHeight:l,gap:c,variant:d}),[l,c,d]),h=d==="masonry"?{columnCount:a,columnGap:c,...u}:{gridTemplateColumns:`repeat(${a}, 1fr)`,gap:c,...u},m={...r,component:s,gap:c,rowHeight:l,variant:d},y=g$e(m);return R.jsx(m$e,{as:s,className:de(y.root,y[d],i),ref:n,style:h,ownerState:m,...f,children:R.jsx(Lne.Provider,{value:p,children:o})})});function y$e(e){return nt("MuiImageListItem",e)}const oD=it("MuiImageListItem",["root","img","standard","woven","masonry","quilted"]),v$e=e=>{const{classes:t,variant:n}=e;return rt({root:["root",n],img:["img"]},y$e,t)},b$e=oe("li",{name:"MuiImageListItem",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${oD.img}`]:t.img},t.root,t[n.variant]]}})({display:"block",position:"relative",[`& .${oD.img}`]:{objectFit:"cover",width:"100%",height:"100%",display:"block"},variants:[{props:{variant:"standard"},style:{display:"flex",flexDirection:"column"}},{props:{variant:"woven"},style:{height:"100%",alignSelf:"center","&:nth-of-type(even)":{height:"70%"}}},{props:{variant:"standard"},style:{[`& .${oD.img}`]:{height:"auto",flexGrow:1}}}]}),jne=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiImageListItem"}),{children:o,className:i,cols:a=1,component:s="li",rows:l=1,style:c,...u}=r,{rowHeight:d="auto",gap:f,variant:p}=v.useContext(Lne);let h="auto";p==="woven"?h=void 0:d!=="auto"&&(h=d*l+f*(l-1));const m={...r,cols:a,component:s,gap:f,rowHeight:d,rows:l,variant:p},y=v$e(m);return R.jsx(b$e,{as:s,className:de(y.root,y[p],i),ref:n,style:{height:h,gridColumnEnd:p!=="masonry"?`span ${a}`:void 0,gridRowEnd:p!=="masonry"?`span ${l}`:void 0,marginBottom:p==="masonry"?f:void 0,breakInside:p==="masonry"?"avoid":void 0,...c},ownerState:m,...u,children:v.Children.map(o,w=>v.isValidElement(w)?w.type==="img"||My(w,["Image"])?v.cloneElement(w,{className:de(y.img,w.props.className)}):w:null)})});function w$e(e){return nt("MuiImageListItemBar",e)}it("MuiImageListItemBar",["root","positionBottom","positionTop","positionBelow","actionPositionLeft","actionPositionRight","titleWrap","titleWrapBottom","titleWrapTop","titleWrapBelow","titleWrapActionPosLeft","titleWrapActionPosRight","title","subtitle","actionIcon","actionIconActionPosLeft","actionIconActionPosRight"]);const x$e=e=>{const{classes:t,position:n,actionIcon:r,actionPosition:o}=e,i={root:["root",`position${Ce(n)}`,`actionPosition${Ce(o)}`],titleWrap:["titleWrap",`titleWrap${Ce(n)}`,r&&`titleWrapActionPos${Ce(o)}`],title:["title"],subtitle:["subtitle"],actionIcon:["actionIcon",`actionIconActionPos${Ce(o)}`]};return rt(i,w$e,t)},S$e=oe("div",{name:"MuiImageListItemBar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`position${Ce(n.position)}`]]}})(Je(({theme:e})=>({position:"absolute",left:0,right:0,background:"rgba(0, 0, 0, 0.5)",display:"flex",alignItems:"center",fontFamily:e.typography.fontFamily,variants:[{props:{position:"bottom"},style:{bottom:0}},{props:{position:"top"},style:{top:0}},{props:{position:"below"},style:{position:"relative",background:"transparent",alignItems:"normal"}}]}))),C$e=oe("div",{name:"MuiImageListItemBar",slot:"TitleWrap",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.titleWrap,t[`titleWrap${Ce(n.position)}`],n.actionIcon&&t[`titleWrapActionPos${Ce(n.actionPosition)}`]]}})(Je(({theme:e})=>({flexGrow:1,padding:"12px 16px",color:(e.vars||e).palette.common.white,overflow:"hidden",variants:[{props:{position:"below"},style:{padding:"6px 0 12px",color:"inherit"}},{props:({ownerState:t})=>t.actionIcon&&t.actionPosition==="left",style:{paddingLeft:0}},{props:({ownerState:t})=>t.actionIcon&&t.actionPosition==="right",style:{paddingRight:0}}]}))),E$e=oe("div",{name:"MuiImageListItemBar",slot:"Title",overridesResolver:(e,t)=>t.title})(Je(({theme:e})=>({fontSize:e.typography.pxToRem(16),lineHeight:"24px",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"}))),P$e=oe("div",{name:"MuiImageListItemBar",slot:"Subtitle",overridesResolver:(e,t)=>t.subtitle})(Je(({theme:e})=>({fontSize:e.typography.pxToRem(12),lineHeight:1,textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"}))),T$e=oe("div",{name:"MuiImageListItemBar",slot:"ActionIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.actionIcon,t[`actionIconActionPos${Ce(n.actionPosition)}`]]}})({variants:[{props:{actionPosition:"left"},style:{order:-1}}]}),I$e=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiImageListItemBar"}),{actionIcon:o,actionPosition:i="right",className:a,subtitle:s,title:l,position:c="bottom",...u}=r,d={...r,position:c,actionPosition:i},f=x$e(d);return R.jsxs(S$e,{ownerState:d,className:de(f.root,a),ref:n,...u,children:[R.jsxs(C$e,{ownerState:d,className:f.titleWrap,children:[R.jsx(E$e,{className:f.title,children:l}),s?R.jsx(P$e,{className:f.subtitle,children:s}):null]}),o?R.jsx(T$e,{ownerState:d,className:f.actionIcon,children:o}):null]})}),O$e=e=>{const{classes:t,disableUnderline:n}=e,o=rt({root:["root",!n&&"underline"],input:["input"]},ake,t);return{...t,...o}},A$e=oe(nk,{shouldForwardProp:e=>xi(e)||e==="classes",name:"MuiInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...ek(e,t),!n.disableUnderline&&t.underline]}})(Je(({theme:e})=>{let n=e.palette.mode==="light"?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return e.vars&&(n=`rgba(${e.vars.palette.common.onBackgroundChannel} / ${e.vars.opacity.inputUnderline})`),{position:"relative",variants:[{props:({ownerState:r})=>r.formControl,style:{"label + &":{marginTop:16}}},{props:({ownerState:r})=>!r.disableUnderline,style:{"&::after":{left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${yf.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${yf.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${n}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${yf.disabled}, .${yf.error}):before`]:{borderBottom:`2px solid ${(e.vars||e).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${n}`}},[`&.${yf.disabled}:before`]:{borderBottomStyle:"dotted"}}},...Object.entries(e.palette).filter(Kn()).map(([r])=>({props:{color:r,disableUnderline:!1},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[r].main}`}}}))]}})),k$e=oe(rk,{name:"MuiInput",slot:"Input",overridesResolver:tk})({}),nI=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiInput"}),{disableUnderline:o=!1,components:i={},componentsProps:a,fullWidth:s=!1,inputComponent:l="input",multiline:c=!1,slotProps:u,slots:d={},type:f="text",...p}=r,h=O$e(r),y={root:{ownerState:{disableUnderline:o}}},w=u??a?Oo(u??a,y):y,x=d.root??i.Root??A$e,C=d.input??i.Input??k$e;return R.jsx(Pb,{slots:{root:x,input:C},slotProps:w,fullWidth:s,inputComponent:l,multiline:c,ref:n,type:f,...p,classes:h})});nI&&(nI.muiName="Input");function M$e(e){return nt("MuiInputAdornment",e)}const L6=it("MuiInputAdornment",["root","filled","standard","outlined","positionStart","positionEnd","disablePointerEvents","hiddenLabel","sizeSmall"]);var F6;const R$e=(e,t)=>{const{ownerState:n}=e;return[t.root,t[`position${Ce(n.position)}`],n.disablePointerEvents===!0&&t.disablePointerEvents,t[n.variant]]},$$e=e=>{const{classes:t,disablePointerEvents:n,hiddenLabel:r,position:o,size:i,variant:a}=e,s={root:["root",n&&"disablePointerEvents",o&&`position${Ce(o)}`,a,r&&"hiddenLabel",i&&`size${Ce(i)}`]};return rt(s,M$e,t)},D$e=oe("div",{name:"MuiInputAdornment",slot:"Root",overridesResolver:R$e})(Je(({theme:e})=>({display:"flex",maxHeight:"2em",alignItems:"center",whiteSpace:"nowrap",color:(e.vars||e).palette.action.active,variants:[{props:{variant:"filled"},style:{[`&.${L6.positionStart}&:not(.${L6.hiddenLabel})`]:{marginTop:16}}},{props:{position:"start"},style:{marginRight:8}},{props:{position:"end"},style:{marginLeft:8}},{props:{disablePointerEvents:!0},style:{pointerEvents:"none"}}]}))),So=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiInputAdornment"}),{children:o,className:i,component:a="div",disablePointerEvents:s=!1,disableTypography:l=!1,position:c,variant:u,...d}=r,f=Fa()||{};let p=u;u&&f.variant,f&&!p&&(p=f.variant);const h={...r,hiddenLabel:f.hiddenLabel,size:f.size,disablePointerEvents:s,position:c,variant:p},m=$$e(h);return R.jsx(ZA.Provider,{value:null,children:R.jsx(D$e,{as:a,ownerState:h,className:de(m.root,i),ref:n,...d,children:typeof o=="string"&&!l?R.jsx(st,{color:"textSecondary",children:o}):R.jsxs(v.Fragment,{children:[c==="start"?F6||(F6=R.jsx("span",{className:"notranslate",children:"​"})):null,o]})})})});function _$e(e){return nt("MuiInputLabel",e)}it("MuiInputLabel",["root","focused","disabled","error","required","asterisk","formControl","sizeSmall","shrink","animated","standard","filled","outlined"]);const N$e=e=>{const{classes:t,formControl:n,size:r,shrink:o,disableAnimation:i,variant:a,required:s}=e,l={root:["root",n&&"formControl",!i&&"animated",o&&"shrink",r&&r!=="normal"&&`size${Ce(r)}`,a],asterisk:[s&&"asterisk"]},c=rt(l,_$e,t);return{...t,...c}},L$e=oe(f$e,{shouldForwardProp:e=>xi(e)||e==="classes",name:"MuiInputLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${ux.asterisk}`]:t.asterisk},t.root,n.formControl&&t.formControl,n.size==="small"&&t.sizeSmall,n.shrink&&t.shrink,!n.disableAnimation&&t.animated,n.focused&&t.focused,t[n.variant]]}})(Je(({theme:e})=>({display:"block",transformOrigin:"top left",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"100%",variants:[{props:({ownerState:t})=>t.formControl,style:{position:"absolute",left:0,top:0,transform:"translate(0, 20px) scale(1)"}},{props:{size:"small"},style:{transform:"translate(0, 17px) scale(1)"}},{props:({ownerState:t})=>t.shrink,style:{transform:"translate(0, -1.5px) scale(0.75)",transformOrigin:"top left",maxWidth:"133%"}},{props:({ownerState:t})=>!t.disableAnimation,style:{transition:e.transitions.create(["color","transform","max-width"],{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut})}},{props:{variant:"filled"},style:{zIndex:1,pointerEvents:"none",transform:"translate(12px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"}},{props:{variant:"filled",size:"small"},style:{transform:"translate(12px, 13px) scale(1)"}},{props:({variant:t,ownerState:n})=>t==="filled"&&n.shrink,style:{userSelect:"none",pointerEvents:"auto",transform:"translate(12px, 7px) scale(0.75)",maxWidth:"calc(133% - 24px)"}},{props:({variant:t,ownerState:n,size:r})=>t==="filled"&&n.shrink&&r==="small",style:{transform:"translate(12px, 4px) scale(0.75)"}},{props:{variant:"outlined"},style:{zIndex:1,pointerEvents:"none",transform:"translate(14px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"}},{props:{variant:"outlined",size:"small"},style:{transform:"translate(14px, 9px) scale(1)"}},{props:({variant:t,ownerState:n})=>t==="outlined"&&n.shrink,style:{userSelect:"none",pointerEvents:"auto",maxWidth:"calc(133% - 32px)",transform:"translate(14px, -9px) scale(0.75)"}}]}))),Ng=v.forwardRef(function(t,n){const r=at({name:"MuiInputLabel",props:t}),{disableAnimation:o=!1,margin:i,shrink:a,variant:s,className:l,...c}=r,u=Fa();let d=a;typeof d>"u"&&u&&(d=u.filled||u.focused||u.adornedStart);const f=Cp({props:r,muiFormControl:u,states:["size","variant","required","focused"]}),p={...r,disableAnimation:o,formControl:u,shrink:d,size:f.size,variant:f.variant,required:f.required,focused:f.focused},h=N$e(p);return R.jsx(L$e,{"data-shrink":d,ref:n,className:de(h.root,l),...c,ownerState:p,classes:h})});function F$e(e){return nt("MuiLinearProgress",e)}it("MuiLinearProgress",["root","colorPrimary","colorSecondary","determinate","indeterminate","buffer","query","dashed","dashedColorPrimary","dashedColorSecondary","bar","barColorPrimary","barColorSecondary","bar1Indeterminate","bar1Determinate","bar1Buffer","bar2Indeterminate","bar2Buffer"]);const uN=4,dN=xu` +`,XMe=typeof pN!="string"?vp` + animation: ${pN} 1.4s linear infinite; + `:null,JMe=typeof hN!="string"?vp` + animation: ${hN} 1.4s ease-in-out infinite; + `:null,ZMe=e=>{const{classes:t,variant:n,color:r,disableShrink:o}=e,i={root:["root",n,`color${Ce(r)}`],svg:["svg"],circle:["circle",`circle${Ce(n)}`,o&&"circleDisableShrink"]};return rt(i,QMe,t)},eRe=re("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`color${Ce(n.color)}`]]}})(Je(({theme:e})=>({display:"inline-block",variants:[{props:{variant:"determinate"},style:{transition:e.transitions.create("transform")}},{props:{variant:"indeterminate"},style:XMe||{animation:`${pN} 1.4s linear infinite`}},...Object.entries(e.palette).filter(Kn()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}}))]}))),tRe=re("svg",{name:"MuiCircularProgress",slot:"Svg",overridesResolver:(e,t)=>t.svg})({display:"block"}),nRe=re("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.circle,t[`circle${Ce(n.variant)}`],n.disableShrink&&t.circleDisableShrink]}})(Je(({theme:e})=>({stroke:"currentColor",variants:[{props:{variant:"determinate"},style:{transition:e.transitions.create("stroke-dashoffset")}},{props:{variant:"indeterminate"},style:{strokeDasharray:"80px, 200px",strokeDashoffset:0}},{props:({ownerState:t})=>t.variant==="indeterminate"&&!t.disableShrink,style:JMe||{animation:`${hN} 1.4s ease-in-out infinite`}}]}))),gk=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiCircularProgress"}),{className:o,color:i="primary",disableShrink:a=!1,size:s=40,style:l,thickness:c=3.6,value:u=0,variant:d="indeterminate",...f}=r,p={...r,color:i,disableShrink:a,size:s,thickness:c,value:u,variant:d},h=ZMe(p),m={},y={},w={};if(d==="determinate"){const x=2*Math.PI*((ef-c)/2);m.strokeDasharray=x.toFixed(3),w["aria-valuenow"]=Math.round(u),m.strokeDashoffset=`${((100-u)/100*x).toFixed(3)}px`,y.transform="rotate(-90deg)"}return R.jsx(eRe,{className:de(h.root,o),style:{width:s,height:s,...y,...l},ownerState:p,ref:n,role:"progressbar",...w,...f,children:R.jsx(tRe,{className:h.svg,ownerState:p,viewBox:`${ef/2} ${ef/2} ${ef} ${ef}`,children:R.jsx(nRe,{className:h.circle,style:m,ownerState:p,cx:ef,cy:ef,r:(ef-c)/2,fill:"none",strokeWidth:c})})})});function $6(e){return e.substring(2).toLowerCase()}function rRe(e,t){return t.documentElement.clientWidth(setTimeout(()=>{l.current=!0},0),()=>{l.current=!1}),[]);const u=Rr(bp(t),s),d=ei(h=>{const m=c.current;c.current=!1;const y=bi(s.current);if(!l.current||!s.current||"clientX"in h&&rRe(h,y))return;if(a.current){a.current=!1;return}let w;h.composedPath?w=h.composedPath().includes(s.current):w=!y.documentElement.contains(h.target)||s.current.contains(h.target),!w&&(n||!m)&&o(h)}),f=h=>m=>{c.current=!0;const y=t.props[h];y&&y(m)},p={ref:u};return i!==!1&&(p[i]=f(i)),v.useEffect(()=>{if(i!==!1){const h=$6(i),m=bi(s.current),y=()=>{a.current=!0};return m.addEventListener(h,d),m.addEventListener("touchmove",y),()=>{m.removeEventListener(h,d),m.removeEventListener("touchmove",y)}}},[d,i]),r!==!1&&(p[r]=f(r)),v.useEffect(()=>{if(r!==!1){const h=$6(r),m=bi(s.current);return m.addEventListener(h,d),()=>{m.removeEventListener(h,d)}}},[d,r]),R.jsx(v.Fragment,{children:v.cloneElement(t,p)})}const kc=M1e({createStyledComponent:re("div",{name:"MuiContainer",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`maxWidth${Ce(String(n.maxWidth))}`],n.fixed&&t.fixed,n.disableGutters&&t.disableGutters]}}),useThemeProps:e=>at({props:e,name:"MuiContainer"})});function oRe(e){const t=bi(e);return t.body===e?Es(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}function px(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function D6(e){return parseInt(Es(e).getComputedStyle(e).paddingRight,10)||0}function iRe(e){const n=["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].includes(e.tagName),r=e.tagName==="INPUT"&&e.getAttribute("type")==="hidden";return n||r}function _6(e,t,n,r,o){const i=[t,n,...r];[].forEach.call(e.children,a=>{const s=!i.includes(a),l=!iRe(a);s&&l&&px(a,o)})}function sD(e,t){let n=-1;return e.some((r,o)=>t(r)?(n=o,!0):!1),n}function aRe(e,t){const n=[],r=e.container;if(!t.disableScrollLock){if(oRe(r)){const a=BZ(Es(r));n.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight=`${D6(r)+a}px`;const s=bi(r).querySelectorAll(".mui-fixed");[].forEach.call(s,l=>{n.push({value:l.style.paddingRight,property:"padding-right",el:l}),l.style.paddingRight=`${D6(l)+a}px`})}let i;if(r.parentNode instanceof DocumentFragment)i=bi(r).body;else{const a=r.parentElement,s=Es(r);i=(a==null?void 0:a.nodeName)==="HTML"&&s.getComputedStyle(a).overflowY==="scroll"?a:r}n.push({value:i.style.overflow,property:"overflow",el:i},{value:i.style.overflowX,property:"overflow-x",el:i},{value:i.style.overflowY,property:"overflow-y",el:i}),i.style.overflow="hidden"}return()=>{n.forEach(({value:i,el:a,property:s})=>{i?a.style.setProperty(s,i):a.style.removeProperty(s)})}}function sRe(e){const t=[];return[].forEach.call(e.children,n=>{n.getAttribute("aria-hidden")==="true"&&t.push(n)}),t}class lRe{constructor(){this.modals=[],this.containers=[]}add(t,n){let r=this.modals.indexOf(t);if(r!==-1)return r;r=this.modals.length,this.modals.push(t),t.modalRef&&px(t.modalRef,!1);const o=sRe(n);_6(n,t.mount,t.modalRef,o,!0);const i=sD(this.containers,a=>a.container===n);return i!==-1?(this.containers[i].modals.push(t),r):(this.containers.push({modals:[t],container:n,restore:null,hiddenSiblings:o}),r)}mount(t,n){const r=sD(this.containers,i=>i.modals.includes(t)),o=this.containers[r];o.restore||(o.restore=aRe(o,n))}remove(t,n=!0){const r=this.modals.indexOf(t);if(r===-1)return r;const o=sD(this.containers,a=>a.modals.includes(t)),i=this.containers[o];if(i.modals.splice(i.modals.indexOf(t),1),this.modals.splice(r,1),i.modals.length===0)i.restore&&i.restore(),t.modalRef&&px(t.modalRef,n),_6(i.container,t.mount,t.modalRef,i.hiddenSiblings,!1),this.containers.splice(o,1);else{const a=i.modals[i.modals.length-1];a.modalRef&&px(a.modalRef,!1)}return r}isTopModal(t){return this.modals.length>0&&this.modals[this.modals.length-1]===t}}const cRe=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function uRe(e){const t=parseInt(e.getAttribute("tabindex")||"",10);return Number.isNaN(t)?e.contentEditable==="true"||(e.nodeName==="AUDIO"||e.nodeName==="VIDEO"||e.nodeName==="DETAILS")&&e.getAttribute("tabindex")===null?0:e.tabIndex:t}function dRe(e){if(e.tagName!=="INPUT"||e.type!=="radio"||!e.name)return!1;const t=r=>e.ownerDocument.querySelector(`input[type="radio"]${r}`);let n=t(`[name="${e.name}"]:checked`);return n||(n=t(`[name="${e.name}"]`)),n!==e}function fRe(e){return!(e.disabled||e.tagName==="INPUT"&&e.type==="hidden"||dRe(e))}function pRe(e){const t=[],n=[];return Array.from(e.querySelectorAll(cRe)).forEach((r,o)=>{const i=uRe(r);i===-1||!fRe(r)||(i===0?t.push(r):n.push({documentOrder:o,tabIndex:i,node:r}))}),n.sort((r,o)=>r.tabIndex===o.tabIndex?r.documentOrder-o.documentOrder:r.tabIndex-o.tabIndex).map(r=>r.node).concat(t)}function hRe(){return!0}function tz(e){const{children:t,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:o=!1,getTabbable:i=pRe,isEnabled:a=hRe,open:s}=e,l=v.useRef(!1),c=v.useRef(null),u=v.useRef(null),d=v.useRef(null),f=v.useRef(null),p=v.useRef(!1),h=v.useRef(null),m=Rr(bp(t),h),y=v.useRef(null);v.useEffect(()=>{!s||!h.current||(p.current=!n)},[n,s]),v.useEffect(()=>{if(!s||!h.current)return;const S=bi(h.current);return h.current.contains(S.activeElement)||(h.current.hasAttribute("tabIndex")||h.current.setAttribute("tabIndex","-1"),p.current&&h.current.focus()),()=>{o||(d.current&&d.current.focus&&(l.current=!0,d.current.focus()),d.current=null)}},[s]),v.useEffect(()=>{if(!s||!h.current)return;const S=bi(h.current),E=I=>{y.current=I,!(r||!a()||I.key!=="Tab")&&S.activeElement===h.current&&I.shiftKey&&(l.current=!0,u.current&&u.current.focus())},P=()=>{var k,O;const I=h.current;if(I===null)return;if(!S.hasFocus()||!a()||l.current){l.current=!1;return}if(I.contains(S.activeElement)||r&&S.activeElement!==c.current&&S.activeElement!==u.current)return;if(S.activeElement!==f.current)f.current=null;else if(f.current!==null)return;if(!p.current)return;let A=[];if((S.activeElement===c.current||S.activeElement===u.current)&&(A=i(h.current)),A.length>0){const $=!!((k=y.current)!=null&&k.shiftKey&&((O=y.current)==null?void 0:O.key)==="Tab"),N=A[0],L=A[A.length-1];typeof N!="string"&&typeof L!="string"&&($?L.focus():N.focus())}else I.focus()};S.addEventListener("focusin",P),S.addEventListener("keydown",E,!0);const T=setInterval(()=>{S.activeElement&&S.activeElement.tagName==="BODY"&&P()},50);return()=>{clearInterval(T),S.removeEventListener("focusin",P),S.removeEventListener("keydown",E,!0)}},[n,r,o,a,s,i]);const w=S=>{d.current===null&&(d.current=S.relatedTarget),p.current=!0,f.current=S.target;const E=t.props.onFocus;E&&E(S)},x=S=>{d.current===null&&(d.current=S.relatedTarget),p.current=!0};return R.jsxs(v.Fragment,{children:[R.jsx("div",{tabIndex:s?0:-1,onFocus:x,ref:c,"data-testid":"sentinelStart"}),v.cloneElement(t,{ref:m,onFocus:w}),R.jsx("div",{tabIndex:s?0:-1,onFocus:x,ref:u,"data-testid":"sentinelEnd"})]})}function gRe(e){return typeof e=="function"?e():e}function mRe(e){return e?e.props.hasOwnProperty("in"):!1}const ZE=new lRe;function yRe(e){const{container:t,disableEscapeKeyDown:n=!1,disableScrollLock:r=!1,closeAfterTransition:o=!1,onTransitionEnter:i,onTransitionExited:a,children:s,onClose:l,open:c,rootRef:u}=e,d=v.useRef({}),f=v.useRef(null),p=v.useRef(null),h=Rr(p,u),[m,y]=v.useState(!c),w=mRe(s);let x=!0;(e["aria-hidden"]==="false"||e["aria-hidden"]===!1)&&(x=!1);const S=()=>bi(f.current),E=()=>(d.current.modalRef=p.current,d.current.mount=f.current,d.current),P=()=>{ZE.mount(E(),{disableScrollLock:r}),p.current&&(p.current.scrollTop=0)},T=ei(()=>{const D=gRe(t)||S().body;ZE.add(E(),D),p.current&&P()}),I=()=>ZE.isTopModal(E()),A=ei(D=>{f.current=D,D&&(c&&I()?P():p.current&&px(p.current,x))}),k=v.useCallback(()=>{ZE.remove(E(),x)},[x]);v.useEffect(()=>()=>{k()},[k]),v.useEffect(()=>{c?T():(!w||!o)&&k()},[c,k,w,o,T]);const O=D=>_=>{var z;(z=D.onKeyDown)==null||z.call(D,_),!(_.key!=="Escape"||_.which===229||!I())&&(n||(_.stopPropagation(),l&&l(_,"escapeKeyDown")))},$=D=>_=>{var z;(z=D.onClick)==null||z.call(D,_),_.target===_.currentTarget&&l&&l(_,"backdropClick")};return{getRootProps:(D={})=>{const _=RT(e);delete _.onTransitionEnter,delete _.onTransitionExited;const z={..._,...D};return{role:"presentation",...z,onKeyDown:O(z),ref:h}},getBackdropProps:(D={})=>{const _=D;return{"aria-hidden":!0,..._,onClick:$(_),open:c}},getTransitionProps:()=>{const D=()=>{y(!1),i&&i()},_=()=>{y(!0),a&&a(),o&&k()};return{onEnter:A4(D,s==null?void 0:s.props.onEnter),onExited:A4(_,s==null?void 0:s.props.onExited)}},rootRef:h,portalRef:A,isTopModal:I,exited:m,hasTransition:w}}function vRe(e){return nt("MuiModal",e)}it("MuiModal",["root","hidden","backdrop"]);const bRe=e=>{const{open:t,exited:n,classes:r}=e;return rt({root:["root",!t&&n&&"hidden"],backdrop:["backdrop"]},vRe,r)},wRe=re("div",{name:"MuiModal",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.open&&n.exited&&t.hidden]}})(Je(({theme:e})=>({position:"fixed",zIndex:(e.vars||e).zIndex.modal,right:0,bottom:0,top:0,left:0,variants:[{props:({ownerState:t})=>!t.open&&t.exited,style:{visibility:"hidden"}}]}))),xRe=re(Dne,{name:"MuiModal",slot:"Backdrop",overridesResolver:(e,t)=>t.backdrop})({zIndex:-1}),Ab=v.forwardRef(function(t,n){const r=at({name:"MuiModal",props:t}),{BackdropComponent:o=xRe,BackdropProps:i,classes:a,className:s,closeAfterTransition:l=!1,children:c,container:u,component:d,components:f={},componentsProps:p={},disableAutoFocus:h=!1,disableEnforceFocus:m=!1,disableEscapeKeyDown:y=!1,disablePortal:w=!1,disableRestoreFocus:x=!1,disableScrollLock:S=!1,hideBackdrop:E=!1,keepMounted:P=!1,onBackdropClick:T,onClose:I,onTransitionEnter:A,onTransitionExited:k,open:O,slotProps:$={},slots:N={},theme:L,...j}=r,D={...r,closeAfterTransition:l,disableAutoFocus:h,disableEnforceFocus:m,disableEscapeKeyDown:y,disablePortal:w,disableRestoreFocus:x,disableScrollLock:S,hideBackdrop:E,keepMounted:P},{getRootProps:_,getBackdropProps:z,getTransitionProps:F,portalRef:V,isTopModal:U,exited:K,hasTransition:X}=yRe({...D,rootRef:n}),ie={...D,exited:K},ee=bRe(ie),Q={};if(c.props.tabIndex===void 0&&(Q.tabIndex="-1"),X){const{onEnter:Z,onExited:ce}=F();Q.onEnter=Z,Q.onExited=ce}const te={...j,slots:{root:f.Root,backdrop:f.Backdrop,...N},slotProps:{...p,...$}},[pe,ae]=Cr("root",{elementType:wRe,externalForwardedProps:te,getSlotProps:_,additionalProps:{ref:n,as:d},ownerState:ie,className:de(s,ee==null?void 0:ee.root,!ie.open&&ie.exited&&(ee==null?void 0:ee.hidden))}),[se,oe]=Cr("backdrop",{elementType:o,externalForwardedProps:te,additionalProps:i,getSlotProps:Z=>z({...Z,onClick:ce=>{T&&T(ce),Z!=null&&Z.onClick&&Z.onClick(ce)}}),className:de(i==null?void 0:i.className,ee==null?void 0:ee.backdrop),ownerState:ie}),fe=Rr(i==null?void 0:i.ref,oe.ref);return!P&&!O&&(!X||K)?null:R.jsx(Rne,{ref:V,container:u,disablePortal:w,children:R.jsxs(pe,{...ae,children:[!E&&o?R.jsx(se,{...oe,ref:fe}):null,R.jsx(tz,{disableEnforceFocus:m,disableAutoFocus:h,disableRestoreFocus:x,isEnabled:U,open:O,children:v.cloneElement(c,Q)})]})})});function SRe(e){return nt("MuiDialog",e)}const hx=it("MuiDialog",["root","scrollPaper","scrollBody","container","paper","paperScrollPaper","paperScrollBody","paperWidthFalse","paperWidthXs","paperWidthSm","paperWidthMd","paperWidthLg","paperWidthXl","paperFullWidth","paperFullScreen"]),jne=v.createContext({}),CRe=re(Dne,{name:"MuiDialog",slot:"Backdrop",overrides:(e,t)=>t.backdrop})({zIndex:-1}),ERe=e=>{const{classes:t,scroll:n,maxWidth:r,fullWidth:o,fullScreen:i}=e,a={root:["root"],container:["container",`scroll${Ce(n)}`],paper:["paper",`paperScroll${Ce(n)}`,`paperWidth${Ce(String(r))}`,o&&"paperFullWidth",i&&"paperFullScreen"]};return rt(a,SRe,t)},PRe=re(Ab,{name:"MuiDialog",slot:"Root",overridesResolver:(e,t)=>t.root})({"@media print":{position:"absolute !important"}}),TRe=re("div",{name:"MuiDialog",slot:"Container",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.container,t[`scroll${Ce(n.scroll)}`]]}})({height:"100%","@media print":{height:"auto"},outline:0,variants:[{props:{scroll:"paper"},style:{display:"flex",justifyContent:"center",alignItems:"center"}},{props:{scroll:"body"},style:{overflowY:"auto",overflowX:"hidden",textAlign:"center","&::after":{content:'""',display:"inline-block",verticalAlign:"middle",height:"100%",width:"0"}}}]}),IRe=re(ro,{name:"MuiDialog",slot:"Paper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.paper,t[`scrollPaper${Ce(n.scroll)}`],t[`paperWidth${Ce(String(n.maxWidth))}`],n.fullWidth&&t.paperFullWidth,n.fullScreen&&t.paperFullScreen]}})(Je(({theme:e})=>({margin:32,position:"relative",overflowY:"auto","@media print":{overflowY:"visible",boxShadow:"none"},variants:[{props:{scroll:"paper"},style:{display:"flex",flexDirection:"column",maxHeight:"calc(100% - 64px)"}},{props:{scroll:"body"},style:{display:"inline-block",verticalAlign:"middle",textAlign:"initial"}},{props:({ownerState:t})=>!t.maxWidth,style:{maxWidth:"calc(100% - 64px)"}},{props:{maxWidth:"xs"},style:{maxWidth:e.breakpoints.unit==="px"?Math.max(e.breakpoints.values.xs,444):`max(${e.breakpoints.values.xs}${e.breakpoints.unit}, 444px)`,[`&.${hx.paperScrollBody}`]:{[e.breakpoints.down(Math.max(e.breakpoints.values.xs,444)+32*2)]:{maxWidth:"calc(100% - 64px)"}}}},...Object.keys(e.breakpoints.values).filter(t=>t!=="xs").map(t=>({props:{maxWidth:t},style:{maxWidth:`${e.breakpoints.values[t]}${e.breakpoints.unit}`,[`&.${hx.paperScrollBody}`]:{[e.breakpoints.down(e.breakpoints.values[t]+32*2)]:{maxWidth:"calc(100% - 64px)"}}}})),{props:({ownerState:t})=>t.fullWidth,style:{width:"calc(100% - 64px)"}},{props:({ownerState:t})=>t.fullScreen,style:{margin:0,width:"100%",maxWidth:"100%",height:"100%",maxHeight:"none",borderRadius:0,[`&.${hx.paperScrollBody}`]:{margin:0,maxWidth:"100%"}}}]}))),zC=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiDialog"}),o=no(),i={enter:o.transitions.duration.enteringScreen,exit:o.transitions.duration.leavingScreen},{"aria-describedby":a,"aria-labelledby":s,"aria-modal":l=!0,BackdropComponent:c,BackdropProps:u,children:d,className:f,disableEscapeKeyDown:p=!1,fullScreen:h=!1,fullWidth:m=!1,maxWidth:y="sm",onBackdropClick:w,onClick:x,onClose:S,open:E,PaperComponent:P=ro,PaperProps:T={},scroll:I="paper",TransitionComponent:A=Ob,transitionDuration:k=i,TransitionProps:O,...$}=r,N={...r,disableEscapeKeyDown:p,fullScreen:h,fullWidth:m,maxWidth:y,scroll:I},L=ERe(N),j=v.useRef(),D=V=>{j.current=V.target===V.currentTarget},_=V=>{x&&x(V),j.current&&(j.current=null,w&&w(V),S&&S(V,"backdropClick"))},z=ip(s),F=v.useMemo(()=>({titleId:z}),[z]);return R.jsx(PRe,{className:de(L.root,f),closeAfterTransition:!0,components:{Backdrop:CRe},componentsProps:{backdrop:{transitionDuration:k,as:c,...u}},disableEscapeKeyDown:p,onClose:S,open:E,ref:n,onClick:_,ownerState:N,...$,children:R.jsx(A,{appear:!0,in:E,timeout:k,role:"presentation",...O,children:R.jsx(TRe,{className:de(L.container),onMouseDown:D,ownerState:N,children:R.jsx(IRe,{as:P,elevation:24,role:"dialog","aria-describedby":a,"aria-labelledby":z,"aria-modal":l,...T,className:de(L.paper,T.className),ownerState:N,children:R.jsx(jne.Provider,{value:F,children:d})})})})})});function ORe(e){return nt("MuiDialogActions",e)}it("MuiDialogActions",["root","spacing"]);const ARe=e=>{const{classes:t,disableSpacing:n}=e;return rt({root:["root",!n&&"spacing"]},ORe,t)},kRe=re("div",{name:"MuiDialogActions",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableSpacing&&t.spacing]}})({display:"flex",alignItems:"center",padding:8,justifyContent:"flex-end",flex:"0 0 auto",variants:[{props:({ownerState:e})=>!e.disableSpacing,style:{"& > :not(style) ~ :not(style)":{marginLeft:8}}}]}),VC=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiDialogActions"}),{className:o,disableSpacing:i=!1,...a}=r,s={...r,disableSpacing:i},l=ARe(s);return R.jsx(kRe,{className:de(l.root,o),ownerState:s,ref:n,...a})});function MRe(e){return nt("MuiDialogContent",e)}it("MuiDialogContent",["root","dividers"]);function RRe(e){return nt("MuiDialogTitle",e)}const $Re=it("MuiDialogTitle",["root"]),DRe=e=>{const{classes:t,dividers:n}=e;return rt({root:["root",n&&"dividers"]},MRe,t)},_Re=re("div",{name:"MuiDialogContent",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.dividers&&t.dividers]}})(Je(({theme:e})=>({flex:"1 1 auto",WebkitOverflowScrolling:"touch",overflowY:"auto",padding:"20px 24px",variants:[{props:({ownerState:t})=>t.dividers,style:{padding:"16px 24px",borderTop:`1px solid ${(e.vars||e).palette.divider}`,borderBottom:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:t})=>!t.dividers,style:{[`.${$Re.root} + &`]:{paddingTop:0}}}]}))),Ov=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiDialogContent"}),{className:o,dividers:i=!1,...a}=r,s={...r,dividers:i},l=DRe(s);return R.jsx(_Re,{className:de(l.root,o),ownerState:s,ref:n,...a})});function NRe(e){return nt("MuiDialogContentText",e)}it("MuiDialogContentText",["root"]);const LRe=e=>{const{classes:t}=e,r=rt({root:["root"]},NRe,t);return{...t,...r}},FRe=re(ot,{shouldForwardProp:e=>ai(e)||e==="classes",name:"MuiDialogContentText",slot:"Root",overridesResolver:(e,t)=>t.root})({}),jRe=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiDialogContentText"}),{children:o,className:i,...a}=r,s=LRe(a);return R.jsx(FRe,{component:"p",variant:"body1",color:"textSecondary",ref:n,ownerState:a,className:de(s.root,i),...r,classes:s})}),BRe=e=>{const{classes:t}=e;return rt({root:["root"]},RRe,t)},zRe=re(ot,{name:"MuiDialogTitle",slot:"Root",overridesResolver:(e,t)=>t.root})({padding:"16px 24px",flex:"0 0 auto"}),mk=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiDialogTitle"}),{className:o,id:i,...a}=r,s=r,l=BRe(s),{titleId:c=i}=v.useContext(jne);return R.jsx(zRe,{component:"h2",className:de(l.root,o),ownerState:s,ref:n,variant:"h6",id:i??c,...a})});function VRe(e){return nt("MuiDivider",e)}const N6=it("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]),HRe=e=>{const{absolute:t,children:n,classes:r,flexItem:o,light:i,orientation:a,textAlign:s,variant:l}=e;return rt({root:["root",t&&"absolute",l,i&&"light",a==="vertical"&&"vertical",o&&"flexItem",n&&"withChildren",n&&a==="vertical"&&"withChildrenVertical",s==="right"&&a!=="vertical"&&"textAlignRight",s==="left"&&a!=="vertical"&&"textAlignLeft"],wrapper:["wrapper",a==="vertical"&&"wrapperVertical"]},VRe,r)},URe=re("div",{name:"MuiDivider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.absolute&&t.absolute,t[n.variant],n.light&&t.light,n.orientation==="vertical"&&t.vertical,n.flexItem&&t.flexItem,n.children&&t.withChildren,n.children&&n.orientation==="vertical"&&t.withChildrenVertical,n.textAlign==="right"&&n.orientation!=="vertical"&&t.textAlignRight,n.textAlign==="left"&&n.orientation!=="vertical"&&t.textAlignLeft]}})(Je(({theme:e})=>({margin:0,flexShrink:0,borderWidth:0,borderStyle:"solid",borderColor:(e.vars||e).palette.divider,borderBottomWidth:"thin",variants:[{props:{absolute:!0},style:{position:"absolute",bottom:0,left:0,width:"100%"}},{props:{light:!0},style:{borderColor:e.vars?`rgba(${e.vars.palette.dividerChannel} / 0.08)`:St(e.palette.divider,.08)}},{props:{variant:"inset"},style:{marginLeft:72}},{props:{variant:"middle",orientation:"horizontal"},style:{marginLeft:e.spacing(2),marginRight:e.spacing(2)}},{props:{variant:"middle",orientation:"vertical"},style:{marginTop:e.spacing(1),marginBottom:e.spacing(1)}},{props:{orientation:"vertical"},style:{height:"100%",borderBottomWidth:0,borderRightWidth:"thin"}},{props:{flexItem:!0},style:{alignSelf:"stretch",height:"auto"}},{props:({ownerState:t})=>!!t.children,style:{display:"flex",textAlign:"center",border:0,borderTopStyle:"solid",borderLeftStyle:"solid","&::before, &::after":{content:'""',alignSelf:"center"}}},{props:({ownerState:t})=>t.children&&t.orientation!=="vertical",style:{"&::before, &::after":{width:"100%",borderTop:`thin solid ${(e.vars||e).palette.divider}`,borderTopStyle:"inherit"}}},{props:({ownerState:t})=>t.orientation==="vertical"&&t.children,style:{flexDirection:"column","&::before, &::after":{height:"100%",borderLeft:`thin solid ${(e.vars||e).palette.divider}`,borderLeftStyle:"inherit"}}},{props:({ownerState:t})=>t.textAlign==="right"&&t.orientation!=="vertical",style:{"&::before":{width:"90%"},"&::after":{width:"10%"}}},{props:({ownerState:t})=>t.textAlign==="left"&&t.orientation!=="vertical",style:{"&::before":{width:"10%"},"&::after":{width:"90%"}}}]}))),WRe=re("span",{name:"MuiDivider",slot:"Wrapper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.wrapper,n.orientation==="vertical"&&t.wrapperVertical]}})(Je(({theme:e})=>({display:"inline-block",paddingLeft:`calc(${e.spacing(1)} * 1.2)`,paddingRight:`calc(${e.spacing(1)} * 1.2)`,whiteSpace:"nowrap",variants:[{props:{orientation:"vertical"},style:{paddingTop:`calc(${e.spacing(1)} * 1.2)`,paddingBottom:`calc(${e.spacing(1)} * 1.2)`}}]}))),Is=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiDivider"}),{absolute:o=!1,children:i,className:a,orientation:s="horizontal",component:l=i||s==="vertical"?"div":"hr",flexItem:c=!1,light:u=!1,role:d=l!=="hr"?"separator":void 0,textAlign:f="center",variant:p="fullWidth",...h}=r,m={...r,absolute:o,component:l,flexItem:c,light:u,orientation:s,role:d,textAlign:f,variant:p},y=HRe(m);return R.jsx(URe,{as:l,className:de(y.root,a),role:d,ref:n,ownerState:m,"aria-orientation":d==="separator"&&(l!=="hr"||s==="vertical")?s:void 0,...h,children:i?R.jsx(WRe,{className:y.wrapper,ownerState:m,children:i}):null})});Is&&(Is.muiSkipListHighlight=!0);function GRe(e,t,n){const r=t.getBoundingClientRect(),o=n&&n.getBoundingClientRect(),i=Es(t);let a;if(t.fakeTransform)a=t.fakeTransform;else{const c=i.getComputedStyle(t);a=c.getPropertyValue("-webkit-transform")||c.getPropertyValue("transform")}let s=0,l=0;if(a&&a!=="none"&&typeof a=="string"){const c=a.split("(")[1].split(")")[0].split(",");s=parseInt(c[4],10),l=parseInt(c[5],10)}return e==="left"?o?`translateX(${o.right+s-r.left}px)`:`translateX(${i.innerWidth+s-r.left}px)`:e==="right"?o?`translateX(-${r.right-o.left-s}px)`:`translateX(-${r.left+r.width-s}px)`:e==="up"?o?`translateY(${o.bottom+l-r.top}px)`:`translateY(${i.innerHeight+l-r.top}px)`:o?`translateY(-${r.top-o.top+r.height-l}px)`:`translateY(-${r.top+r.height-l}px)`}function qRe(e){return typeof e=="function"?e():e}function eP(e,t,n){const r=qRe(n),o=GRe(e,t,r);o&&(t.style.webkitTransform=o,t.style.transform=o)}const KRe=v.forwardRef(function(t,n){const r=no(),o={enter:r.transitions.easing.easeOut,exit:r.transitions.easing.sharp},i={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:a,appear:s=!0,children:l,container:c,direction:u="down",easing:d=o,in:f,onEnter:p,onEntered:h,onEntering:m,onExit:y,onExited:w,onExiting:x,style:S,timeout:E=i,TransitionComponent:P=$s,...T}=t,I=v.useRef(null),A=Rr(bp(l),I,n),k=F=>V=>{F&&(V===void 0?F(I.current):F(I.current,V))},O=k((F,V)=>{eP(u,F,c),VB(F),p&&p(F,V)}),$=k((F,V)=>{const U=lp({timeout:E,style:S,easing:d},{mode:"enter"});F.style.webkitTransition=r.transitions.create("-webkit-transform",{...U}),F.style.transition=r.transitions.create("transform",{...U}),F.style.webkitTransform="none",F.style.transform="none",m&&m(F,V)}),N=k(h),L=k(x),j=k(F=>{const V=lp({timeout:E,style:S,easing:d},{mode:"exit"});F.style.webkitTransition=r.transitions.create("-webkit-transform",V),F.style.transition=r.transitions.create("transform",V),eP(u,F,c),y&&y(F)}),D=k(F=>{F.style.webkitTransition="",F.style.transition="",w&&w(F)}),_=F=>{a&&a(I.current,F)},z=v.useCallback(()=>{I.current&&eP(u,I.current,c)},[u,c]);return v.useEffect(()=>{if(f||u==="down"||u==="right")return;const F=MC(()=>{I.current&&eP(u,I.current,c)}),V=Es(I.current);return V.addEventListener("resize",F),()=>{F.clear(),V.removeEventListener("resize",F)}},[u,f,c]),v.useEffect(()=>{f||z()},[f,z]),R.jsx(P,{nodeRef:I,onEnter:O,onEntered:N,onEntering:$,onExit:j,onExited:D,onExiting:L,addEndListener:_,appear:s,in:f,timeout:E,...T,children:(F,V)=>v.cloneElement(l,{ref:A,style:{visibility:F==="exited"&&!f?"hidden":void 0,...S,...l.props.style},...V})})});function YRe(e){return nt("MuiDrawer",e)}it("MuiDrawer",["root","docked","paper","paperAnchorLeft","paperAnchorRight","paperAnchorTop","paperAnchorBottom","paperAnchorDockedLeft","paperAnchorDockedRight","paperAnchorDockedTop","paperAnchorDockedBottom","modal"]);const Bne=(e,t)=>{const{ownerState:n}=e;return[t.root,(n.variant==="permanent"||n.variant==="persistent")&&t.docked,t.modal]},QRe=e=>{const{classes:t,anchor:n,variant:r}=e,o={root:["root"],docked:[(r==="permanent"||r==="persistent")&&"docked"],modal:["modal"],paper:["paper",`paperAnchor${Ce(n)}`,r!=="temporary"&&`paperAnchorDocked${Ce(n)}`]};return rt(o,YRe,t)},XRe=re(Ab,{name:"MuiDrawer",slot:"Root",overridesResolver:Bne})(Je(({theme:e})=>({zIndex:(e.vars||e).zIndex.drawer}))),L6=re("div",{shouldForwardProp:ai,name:"MuiDrawer",slot:"Docked",skipVariantsResolver:!1,overridesResolver:Bne})({flex:"0 0 auto"}),JRe=re(ro,{name:"MuiDrawer",slot:"Paper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.paper,t[`paperAnchor${Ce(n.anchor)}`],n.variant!=="temporary"&&t[`paperAnchorDocked${Ce(n.anchor)}`]]}})(Je(({theme:e})=>({overflowY:"auto",display:"flex",flexDirection:"column",height:"100%",flex:"1 0 auto",zIndex:(e.vars||e).zIndex.drawer,WebkitOverflowScrolling:"touch",position:"fixed",top:0,outline:0,variants:[{props:{anchor:"left"},style:{left:0}},{props:{anchor:"top"},style:{top:0,left:0,right:0,height:"auto",maxHeight:"100%"}},{props:{anchor:"right"},style:{right:0}},{props:{anchor:"bottom"},style:{top:"auto",left:0,bottom:0,right:0,height:"auto",maxHeight:"100%"}},{props:({ownerState:t})=>t.anchor==="left"&&t.variant!=="temporary",style:{borderRight:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:t})=>t.anchor==="top"&&t.variant!=="temporary",style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:t})=>t.anchor==="right"&&t.variant!=="temporary",style:{borderLeft:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:t})=>t.anchor==="bottom"&&t.variant!=="temporary",style:{borderTop:`1px solid ${(e.vars||e).palette.divider}`}}]}))),zne={left:"right",right:"left",top:"down",bottom:"up"};function ZRe(e){return["left","right"].includes(e)}function e$e({direction:e},t){return e==="rtl"&&ZRe(t)?zne[t]:t}const t$e=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiDrawer"}),o=no(),i=dr(),a={enter:o.transitions.duration.enteringScreen,exit:o.transitions.duration.leavingScreen},{anchor:s="left",BackdropProps:l,children:c,className:u,elevation:d=16,hideBackdrop:f=!1,ModalProps:{BackdropProps:p,...h}={},onClose:m,open:y=!1,PaperProps:w={},SlideProps:x,TransitionComponent:S=KRe,transitionDuration:E=a,variant:P="temporary",...T}=r,I=v.useRef(!1);v.useEffect(()=>{I.current=!0},[]);const A=e$e({direction:i?"rtl":"ltr"},s),O={...r,anchor:s,elevation:d,open:y,variant:P,...T},$=QRe(O),N=R.jsx(JRe,{elevation:P==="temporary"?d:0,square:!0,...w,className:de($.paper,w.className),ownerState:O,children:c});if(P==="permanent")return R.jsx(L6,{className:de($.root,$.docked,u),ownerState:O,ref:n,...T,children:N});const L=R.jsx(S,{in:y,direction:zne[A],timeout:E,appear:I.current,...x,children:N});return P==="persistent"?R.jsx(L6,{className:de($.root,$.docked,u),ownerState:O,ref:n,...T,children:L}):R.jsx(XRe,{BackdropProps:{...l,...p,transitionDuration:E},className:de($.root,$.modal,u),open:y,ownerState:O,onClose:m,hideBackdrop:f,ref:n,...T,...h,children:L})});function n$e(e){return nt("MuiFab",e)}const F6=it("MuiFab",["root","primary","secondary","extended","circular","focusVisible","disabled","colorInherit","sizeSmall","sizeMedium","sizeLarge","info","error","warning","success"]),r$e=e=>{const{color:t,variant:n,classes:r,size:o}=e,i={root:["root",n,`size${Ce(o)}`,t==="inherit"?"colorInherit":t]},a=rt(i,n$e,r);return{...r,...a}},o$e=re(ca,{name:"MuiFab",slot:"Root",shouldForwardProp:e=>ai(e)||e==="classes",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`size${Ce(n.size)}`],n.color==="inherit"&&t.colorInherit,t[Ce(n.size)],t[n.color]]}})(Je(({theme:e})=>{var t,n;return{...e.typography.button,minHeight:36,transition:e.transitions.create(["background-color","box-shadow","border-color"],{duration:e.transitions.duration.short}),borderRadius:"50%",padding:0,minWidth:0,width:56,height:56,zIndex:(e.vars||e).zIndex.fab,boxShadow:(e.vars||e).shadows[6],"&:active":{boxShadow:(e.vars||e).shadows[12]},color:e.vars?e.vars.palette.text.primary:(n=(t=e.palette).getContrastText)==null?void 0:n.call(t,e.palette.grey[300]),backgroundColor:(e.vars||e).palette.grey[300],"&:hover":{backgroundColor:(e.vars||e).palette.grey.A100,"@media (hover: none)":{backgroundColor:(e.vars||e).palette.grey[300]},textDecoration:"none"},[`&.${F6.focusVisible}`]:{boxShadow:(e.vars||e).shadows[6]},variants:[{props:{size:"small"},style:{width:40,height:40}},{props:{size:"medium"},style:{width:48,height:48}},{props:{variant:"extended"},style:{borderRadius:48/2,padding:"0 16px",width:"auto",minHeight:"auto",minWidth:48,height:48}},{props:{variant:"extended",size:"small"},style:{width:"auto",padding:"0 8px",borderRadius:34/2,minWidth:34,height:34}},{props:{variant:"extended",size:"medium"},style:{width:"auto",padding:"0 16px",borderRadius:40/2,minWidth:40,height:40}},{props:{color:"inherit"},style:{color:"inherit"}}]}}),Je(({theme:e})=>({variants:[...Object.entries(e.palette).filter(Kn(["dark","contrastText"])).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].contrastText,backgroundColor:(e.vars||e).palette[t].main,"&:hover":{backgroundColor:(e.vars||e).palette[t].dark,"@media (hover: none)":{backgroundColor:(e.vars||e).palette[t].main}}}}))]})),Je(({theme:e})=>({[`&.${F6.disabled}`]:{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground}}))),Ng=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiFab"}),{children:o,className:i,color:a="default",component:s="button",disabled:l=!1,disableFocusRipple:c=!1,focusVisibleClassName:u,size:d="large",variant:f="circular",...p}=r,h={...r,color:a,component:s,disabled:l,disableFocusRipple:c,size:d,variant:f},m=r$e(h);return R.jsx(o$e,{className:de(m.root,i),component:s,disabled:l,focusRipple:!c,focusVisibleClassName:de(m.focusVisible,u),ownerState:h,ref:n,...p,classes:m,children:o})}),i$e=e=>{const{classes:t,disableUnderline:n,startAdornment:r,endAdornment:o,size:i,hiddenLabel:a,multiline:s}=e,l={root:["root",!n&&"underline",r&&"adornedStart",o&&"adornedEnd",i==="small"&&`size${Ce(i)}`,a&&"hiddenLabel",s&&"multiline"],input:["input"]},c=rt(l,yke,t);return{...t,...c}},a$e=re(pk,{shouldForwardProp:e=>ai(e)||e==="classes",name:"MuiFilledInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...dk(e,t),!n.disableUnderline&&t.underline]}})(Je(({theme:e})=>{const t=e.palette.mode==="light",n=t?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",r=t?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",o=t?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",i=t?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return{position:"relative",backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r,borderTopLeftRadius:(e.vars||e).shape.borderRadius,borderTopRightRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),"&:hover":{backgroundColor:e.vars?e.vars.palette.FilledInput.hoverBg:o,"@media (hover: none)":{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r}},[`&.${as.focused}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r},[`&.${as.disabled}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.disabledBg:i},variants:[{props:({ownerState:a})=>!a.disableUnderline,style:{"&::after":{left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${as.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${as.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / ${e.vars.opacity.inputUnderline})`:n}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${as.disabled}, .${as.error}):before`]:{borderBottom:`1px solid ${(e.vars||e).palette.text.primary}`},[`&.${as.disabled}:before`]:{borderBottomStyle:"dotted"}}},...Object.entries(e.palette).filter(Kn()).map(([a])=>{var s;return{props:{disableUnderline:!1,color:a},style:{"&::after":{borderBottom:`2px solid ${(s=(e.vars||e).palette[a])==null?void 0:s.main}`}}}}),{props:({ownerState:a})=>a.startAdornment,style:{paddingLeft:12}},{props:({ownerState:a})=>a.endAdornment,style:{paddingRight:12}},{props:({ownerState:a})=>a.multiline,style:{padding:"25px 12px 8px"}},{props:({ownerState:a,size:s})=>a.multiline&&s==="small",style:{paddingTop:21,paddingBottom:4}},{props:({ownerState:a})=>a.multiline&&a.hiddenLabel,style:{paddingTop:16,paddingBottom:17}},{props:({ownerState:a})=>a.multiline&&a.hiddenLabel&&a.size==="small",style:{paddingTop:8,paddingBottom:9}}]}})),s$e=re(hk,{name:"MuiFilledInput",slot:"Input",overridesResolver:fk})(Je(({theme:e})=>({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12,...!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:e.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:e.palette.mode==="light"?null:"#fff",caretColor:e.palette.mode==="light"?null:"#fff",borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"}},...e.vars&&{"&:-webkit-autofill":{borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},variants:[{props:{size:"small"},style:{paddingTop:21,paddingBottom:4}},{props:({ownerState:t})=>t.hiddenLabel,style:{paddingTop:16,paddingBottom:17}},{props:({ownerState:t})=>t.startAdornment,style:{paddingLeft:0}},{props:({ownerState:t})=>t.endAdornment,style:{paddingRight:0}},{props:({ownerState:t})=>t.hiddenLabel&&t.size==="small",style:{paddingTop:8,paddingBottom:9}},{props:({ownerState:t})=>t.multiline,style:{paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0}}]}))),pI=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiFilledInput"}),{disableUnderline:o=!1,components:i={},componentsProps:a,fullWidth:s=!1,hiddenLabel:l,inputComponent:c="input",multiline:u=!1,slotProps:d,slots:f={},type:p="text",...h}=r,m={...r,disableUnderline:o,fullWidth:s,inputComponent:c,multiline:u,type:p},y=i$e(r),w={root:{ownerState:m},input:{ownerState:m}},x=d??a?Ao(w,d??a):w,S=f.root??i.Root??a$e,E=f.input??i.Input??s$e;return R.jsx(Ib,{slots:{root:S,input:E},componentsProps:x,fullWidth:s,inputComponent:c,multiline:u,ref:n,type:p,...h,classes:y})});pI&&(pI.muiName="Input");function l$e(e){return nt("MuiFormControl",e)}it("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);const c$e=e=>{const{classes:t,margin:n,fullWidth:r}=e,o={root:["root",n!=="none"&&`margin${Ce(n)}`,r&&"fullWidth"]};return rt(o,l$e,t)},u$e=re("div",{name:"MuiFormControl",slot:"Root",overridesResolver:({ownerState:e},t)=>({...t.root,...t[`margin${Ce(e.margin)}`],...e.fullWidth&&t.fullWidth})})({display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top",variants:[{props:{margin:"normal"},style:{marginTop:16,marginBottom:8}},{props:{margin:"dense"},style:{marginTop:8,marginBottom:4}},{props:{fullWidth:!0},style:{width:"100%"}}]}),kb=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiFormControl"}),{children:o,className:i,color:a="primary",component:s="div",disabled:l=!1,error:c=!1,focused:u,fullWidth:d=!1,hiddenLabel:f=!1,margin:p="none",required:h=!1,size:m="medium",variant:y="outlined",...w}=r,x={...r,color:a,component:s,disabled:l,error:c,fullWidth:d,hiddenLabel:f,margin:p,required:h,size:m,variant:y},S=c$e(x),[E,P]=v.useState(()=>{let L=!1;return o&&v.Children.forEach(o,j=>{if(!Ry(j,["Input","Select"]))return;const D=Ry(j,["Select"])?j.props.input:j;D&&fke(D.props)&&(L=!0)}),L}),[T,I]=v.useState(()=>{let L=!1;return o&&v.Children.forEach(o,j=>{Ry(j,["Input","Select"])&&(dI(j.props,!0)||dI(j.props.inputProps,!0))&&(L=!0)}),L}),[A,k]=v.useState(!1);l&&A&&k(!1);const O=u!==void 0&&!l?u:A;let $;v.useRef(!1);const N=v.useMemo(()=>({adornedStart:E,setAdornedStart:P,color:a,disabled:l,error:c,filled:T,focused:O,fullWidth:d,hiddenLabel:f,size:m,onBlur:()=>{k(!1)},onEmpty:()=>{I(!1)},onFilled:()=>{I(!0)},onFocus:()=>{k(!0)},registerEffect:$,required:h,variant:y}),[E,a,l,c,T,O,d,f,$,h,m,y]);return R.jsx(uk.Provider,{value:N,children:R.jsx(u$e,{as:s,ownerState:x,className:de(S.root,i),ref:n,...w,children:o})})});function d$e(e){return nt("MuiFormControlLabel",e)}const Hw=it("MuiFormControlLabel",["root","labelPlacementStart","labelPlacementTop","labelPlacementBottom","disabled","label","error","required","asterisk"]),f$e=e=>{const{classes:t,disabled:n,labelPlacement:r,error:o,required:i}=e,a={root:["root",n&&"disabled",`labelPlacement${Ce(r)}`,o&&"error",i&&"required"],label:["label",n&&"disabled"],asterisk:["asterisk",o&&"error"]};return rt(a,d$e,t)},p$e=re("label",{name:"MuiFormControlLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${Hw.label}`]:t.label},t.root,t[`labelPlacement${Ce(n.labelPlacement)}`]]}})(Je(({theme:e})=>({display:"inline-flex",alignItems:"center",cursor:"pointer",verticalAlign:"middle",WebkitTapHighlightColor:"transparent",marginLeft:-11,marginRight:16,[`&.${Hw.disabled}`]:{cursor:"default"},[`& .${Hw.label}`]:{[`&.${Hw.disabled}`]:{color:(e.vars||e).palette.text.disabled}},variants:[{props:{labelPlacement:"start"},style:{flexDirection:"row-reverse",marginRight:-11}},{props:{labelPlacement:"top"},style:{flexDirection:"column-reverse"}},{props:{labelPlacement:"bottom"},style:{flexDirection:"column"}},{props:({labelPlacement:t})=>t==="start"||t==="top"||t==="bottom",style:{marginLeft:16}}]}))),h$e=re("span",{name:"MuiFormControlLabel",slot:"Asterisk",overridesResolver:(e,t)=>t.asterisk})(Je(({theme:e})=>({[`&.${Hw.error}`]:{color:(e.vars||e).palette.error.main}}))),Mc=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiFormControlLabel"}),{checked:o,className:i,componentsProps:a={},control:s,disabled:l,disableTypography:c,inputRef:u,label:d,labelPlacement:f="end",name:p,onChange:h,required:m,slots:y={},slotProps:w={},value:x,...S}=r,E=Ba(),P=l??s.props.disabled??(E==null?void 0:E.disabled),T=m??s.props.required,I={disabled:P,required:T};["checked","name","onChange","value","inputRef"].forEach(D=>{typeof s.props[D]>"u"&&typeof r[D]<"u"&&(I[D]=r[D])});const A=Tp({props:r,muiFormControl:E,states:["error"]}),k={...r,disabled:P,labelPlacement:f,required:T,error:A.error},O=f$e(k),$={slots:y,slotProps:{...a,...w}},[N,L]=Cr("typography",{elementType:ot,externalForwardedProps:$,ownerState:k});let j=d;return j!=null&&j.type!==ot&&!c&&(j=R.jsx(N,{component:"span",...L,className:de(O.label,L==null?void 0:L.className),children:j})),R.jsxs(p$e,{className:de(O.root,i),ownerState:k,ref:n,...S,children:[v.cloneElement(s,I),T?R.jsxs("div",{children:[j,R.jsxs(h$e,{ownerState:k,"aria-hidden":!0,className:O.asterisk,children:[" ","*"]})]}):j]})});function g$e(e){return nt("MuiFormGroup",e)}it("MuiFormGroup",["root","row","error"]);const m$e=e=>{const{classes:t,row:n,error:r}=e;return rt({root:["root",n&&"row",r&&"error"]},g$e,t)},y$e=re("div",{name:"MuiFormGroup",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.row&&t.row]}})({display:"flex",flexDirection:"column",flexWrap:"wrap",variants:[{props:{row:!0},style:{flexDirection:"row"}}]}),yk=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiFormGroup"}),{className:o,row:i=!1,...a}=r,s=Ba(),l=Tp({props:r,muiFormControl:s,states:["error"]}),c={...r,row:i,error:l.error},u=m$e(c);return R.jsx(y$e,{className:de(u.root,o),ownerState:c,ref:n,...a})});function v$e(e){return nt("MuiFormHelperText",e)}const j6=it("MuiFormHelperText",["root","error","disabled","sizeSmall","sizeMedium","contained","focused","filled","required"]);var B6;const b$e=e=>{const{classes:t,contained:n,size:r,disabled:o,error:i,filled:a,focused:s,required:l}=e,c={root:["root",o&&"disabled",i&&"error",r&&`size${Ce(r)}`,n&&"contained",s&&"focused",a&&"filled",l&&"required"]};return rt(c,v$e,t)},w$e=re("p",{name:"MuiFormHelperText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.size&&t[`size${Ce(n.size)}`],n.contained&&t.contained,n.filled&&t.filled]}})(Je(({theme:e})=>({color:(e.vars||e).palette.text.secondary,...e.typography.caption,textAlign:"left",marginTop:3,marginRight:0,marginBottom:0,marginLeft:0,[`&.${j6.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${j6.error}`]:{color:(e.vars||e).palette.error.main},variants:[{props:{size:"small"},style:{marginTop:4}},{props:({ownerState:t})=>t.contained,style:{marginLeft:14,marginRight:14}}]}))),HC=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiFormHelperText"}),{children:o,className:i,component:a="p",disabled:s,error:l,filled:c,focused:u,margin:d,required:f,variant:p,...h}=r,m=Ba(),y=Tp({props:r,muiFormControl:m,states:["variant","size","disabled","error","filled","focused","required"]}),w={...r,component:a,contained:y.variant==="filled"||y.variant==="outlined",variant:y.variant,size:y.size,disabled:y.disabled,error:y.error,filled:y.filled,focused:y.focused,required:y.required};delete w.ownerState;const x=b$e(w);return R.jsx(w$e,{as:a,className:de(x.root,i),ref:n,...h,ownerState:w,children:o===" "?B6||(B6=R.jsx("span",{className:"notranslate",children:"​"})):o})});function x$e(e){return nt("MuiFormLabel",e)}const gx=it("MuiFormLabel",["root","colorSecondary","focused","disabled","error","filled","required","asterisk"]),S$e=e=>{const{classes:t,color:n,focused:r,disabled:o,error:i,filled:a,required:s}=e,l={root:["root",`color${Ce(n)}`,o&&"disabled",i&&"error",a&&"filled",r&&"focused",s&&"required"],asterisk:["asterisk",i&&"error"]};return rt(l,x$e,t)},C$e=re("label",{name:"MuiFormLabel",slot:"Root",overridesResolver:({ownerState:e},t)=>({...t.root,...e.color==="secondary"&&t.colorSecondary,...e.filled&&t.filled})})(Je(({theme:e})=>({color:(e.vars||e).palette.text.secondary,...e.typography.body1,lineHeight:"1.4375em",padding:0,position:"relative",variants:[...Object.entries(e.palette).filter(Kn()).map(([t])=>({props:{color:t},style:{[`&.${gx.focused}`]:{color:(e.vars||e).palette[t].main}}})),{props:{},style:{[`&.${gx.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${gx.error}`]:{color:(e.vars||e).palette.error.main}}}]}))),E$e=re("span",{name:"MuiFormLabel",slot:"Asterisk",overridesResolver:(e,t)=>t.asterisk})(Je(({theme:e})=>({[`&.${gx.error}`]:{color:(e.vars||e).palette.error.main}}))),P$e=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiFormLabel"}),{children:o,className:i,color:a,component:s="label",disabled:l,error:c,filled:u,focused:d,required:f,...p}=r,h=Ba(),m=Tp({props:r,muiFormControl:h,states:["color","required","focused","disabled","error","filled"]}),y={...r,color:m.color||"primary",component:s,disabled:m.disabled,error:m.error,filled:m.filled,focused:m.focused,required:m.required},w=S$e(y);return R.jsxs(C$e,{as:s,ownerState:y,className:de(w.root,i),ref:n,...p,children:[o,m.required&&R.jsxs(E$e,{ownerState:y,"aria-hidden":!0,className:w.asterisk,children:[" ","*"]})]})}),z6=v.createContext();function T$e(e){return nt("MuiGrid",e)}const I$e=[0,1,2,3,4,5,6,7,8,9,10],O$e=["column-reverse","column","row-reverse","row"],A$e=["nowrap","wrap-reverse","wrap"],ew=["auto",!0,1,2,3,4,5,6,7,8,9,10,11,12],sS=it("MuiGrid",["root","container","item","zeroMinWidth",...I$e.map(e=>`spacing-xs-${e}`),...O$e.map(e=>`direction-xs-${e}`),...A$e.map(e=>`wrap-xs-${e}`),...ew.map(e=>`grid-xs-${e}`),...ew.map(e=>`grid-sm-${e}`),...ew.map(e=>`grid-md-${e}`),...ew.map(e=>`grid-lg-${e}`),...ew.map(e=>`grid-xl-${e}`)]);function k$e({theme:e,ownerState:t}){let n;return e.breakpoints.keys.reduce((r,o)=>{let i={};if(t[o]&&(n=t[o]),!n)return r;if(n===!0)i={flexBasis:0,flexGrow:1,maxWidth:"100%"};else if(n==="auto")i={flexBasis:"auto",flexGrow:0,flexShrink:0,maxWidth:"none",width:"auto"};else{const a=Yh({values:t.columns,breakpoints:e.breakpoints.values}),s=typeof a=="object"?a[o]:a;if(s==null)return r;const l=`${Math.round(n/s*1e8)/1e6}%`;let c={};if(t.container&&t.item&&t.columnSpacing!==0){const u=e.spacing(t.columnSpacing);if(u!=="0px"){const d=`calc(${l} + ${u})`;c={flexBasis:d,maxWidth:d}}}i={flexBasis:l,flexGrow:0,maxWidth:l,...c}}return e.breakpoints.values[o]===0?Object.assign(r,i):r[e.breakpoints.up(o)]=i,r},{})}function M$e({theme:e,ownerState:t}){const n=Yh({values:t.direction,breakpoints:e.breakpoints.values});return Na({theme:e},n,r=>{const o={flexDirection:r};return r.startsWith("column")&&(o[`& > .${sS.item}`]={maxWidth:"none"}),o})}function Vne({breakpoints:e,values:t}){let n="";Object.keys(t).forEach(o=>{n===""&&t[o]!==0&&(n=o)});const r=Object.keys(e).sort((o,i)=>e[o]-e[i]);return r.slice(0,r.indexOf(n))}function R$e({theme:e,ownerState:t}){const{container:n,rowSpacing:r}=t;let o={};if(n&&r!==0){const i=Yh({values:r,breakpoints:e.breakpoints.values});let a;typeof i=="object"&&(a=Vne({breakpoints:e.breakpoints.values,values:i})),o=Na({theme:e},i,(s,l)=>{const c=e.spacing(s);return c!=="0px"?{marginTop:e.spacing(-s),[`& > .${sS.item}`]:{paddingTop:c}}:a!=null&&a.includes(l)?{}:{marginTop:0,[`& > .${sS.item}`]:{paddingTop:0}}})}return o}function $$e({theme:e,ownerState:t}){const{container:n,columnSpacing:r}=t;let o={};if(n&&r!==0){const i=Yh({values:r,breakpoints:e.breakpoints.values});let a;typeof i=="object"&&(a=Vne({breakpoints:e.breakpoints.values,values:i})),o=Na({theme:e},i,(s,l)=>{const c=e.spacing(s);if(c!=="0px"){const u=e.spacing(-s);return{width:`calc(100% + ${c})`,marginLeft:u,[`& > .${sS.item}`]:{paddingLeft:c}}}return a!=null&&a.includes(l)?{}:{width:"100%",marginLeft:0,[`& > .${sS.item}`]:{paddingLeft:0}}})}return o}function D$e(e,t,n={}){if(!e||e<=0)return[];if(typeof e=="string"&&!Number.isNaN(Number(e))||typeof e=="number")return[n[`spacing-xs-${String(e)}`]];const r=[];return t.forEach(o=>{const i=e[o];Number(i)>0&&r.push(n[`spacing-${o}-${String(i)}`])}),r}const _$e=re("div",{name:"MuiGrid",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e,{container:r,direction:o,item:i,spacing:a,wrap:s,zeroMinWidth:l,breakpoints:c}=n;let u=[];r&&(u=D$e(a,c,t));const d=[];return c.forEach(f=>{const p=n[f];p&&d.push(t[`grid-${f}-${String(p)}`])}),[t.root,r&&t.container,i&&t.item,l&&t.zeroMinWidth,...u,o!=="row"&&t[`direction-xs-${String(o)}`],s!=="wrap"&&t[`wrap-xs-${String(s)}`],...d]}})(({ownerState:e})=>({boxSizing:"border-box",...e.container&&{display:"flex",flexWrap:"wrap",width:"100%"},...e.item&&{margin:0},...e.zeroMinWidth&&{minWidth:0},...e.wrap!=="wrap"&&{flexWrap:e.wrap}}),M$e,R$e,$$e,k$e);function N$e(e,t){if(!e||e<=0)return[];if(typeof e=="string"&&!Number.isNaN(Number(e))||typeof e=="number")return[`spacing-xs-${String(e)}`];const n=[];return t.forEach(r=>{const o=e[r];if(Number(o)>0){const i=`spacing-${r}-${String(o)}`;n.push(i)}}),n}const L$e=e=>{const{classes:t,container:n,direction:r,item:o,spacing:i,wrap:a,zeroMinWidth:s,breakpoints:l}=e;let c=[];n&&(c=N$e(i,l));const u=[];l.forEach(f=>{const p=e[f];p&&u.push(`grid-${f}-${String(p)}`)});const d={root:["root",n&&"container",o&&"item",s&&"zeroMinWidth",...c,r!=="row"&&`direction-xs-${String(r)}`,a!=="wrap"&&`wrap-xs-${String(a)}`,...u]};return rt(d,T$e,t)},lD=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiGrid"}),{breakpoints:o}=no(),i=AC(r),{className:a,columns:s,columnSpacing:l,component:c="div",container:u=!1,direction:d="row",item:f=!1,rowSpacing:p,spacing:h=0,wrap:m="wrap",zeroMinWidth:y=!1,...w}=i,x=p||h,S=l||h,E=v.useContext(z6),P=u?s||12:E,T={},I={...w};o.keys.forEach(O=>{w[O]!=null&&(T[O]=w[O],delete I[O])});const A={...i,columns:P,container:u,direction:d,item:f,rowSpacing:x,columnSpacing:S,wrap:m,zeroMinWidth:y,spacing:h,...T,breakpoints:o.keys},k=L$e(A);return R.jsx(z6.Provider,{value:P,children:R.jsx(_$e,{ownerState:A,className:de(k.root,a),as:c,ref:n,...I})})}),Oe=G1e({createStyledComponent:re("div",{name:"MuiGrid2",slot:"Root",overridesResolver:(e,t)=>t.root}),componentName:"MuiGrid2",useThemeProps:e=>at({props:e,name:"MuiGrid2"})});function gN(e){return`scale(${e}, ${e**2})`}const F$e={entering:{opacity:1,transform:gN(1)},entered:{opacity:1,transform:"none"}},cD=typeof navigator<"u"&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),cp=v.forwardRef(function(t,n){const{addEndListener:r,appear:o=!0,children:i,easing:a,in:s,onEnter:l,onEntered:c,onEntering:u,onExit:d,onExited:f,onExiting:p,style:h,timeout:m="auto",TransitionComponent:y=$s,...w}=t,x=Mf(),S=v.useRef(),E=no(),P=v.useRef(null),T=Rr(P,bp(i),n),I=D=>_=>{if(D){const z=P.current;_===void 0?D(z):D(z,_)}},A=I(u),k=I((D,_)=>{VB(D);const{duration:z,delay:F,easing:V}=lp({style:h,timeout:m,easing:a},{mode:"enter"});let U;m==="auto"?(U=E.transitions.getAutoHeightDuration(D.clientHeight),S.current=U):U=z,D.style.transition=[E.transitions.create("opacity",{duration:U,delay:F}),E.transitions.create("transform",{duration:cD?U:U*.666,delay:F,easing:V})].join(","),l&&l(D,_)}),O=I(c),$=I(p),N=I(D=>{const{duration:_,delay:z,easing:F}=lp({style:h,timeout:m,easing:a},{mode:"exit"});let V;m==="auto"?(V=E.transitions.getAutoHeightDuration(D.clientHeight),S.current=V):V=_,D.style.transition=[E.transitions.create("opacity",{duration:V,delay:z}),E.transitions.create("transform",{duration:cD?V:V*.666,delay:cD?z:z||V*.333,easing:F})].join(","),D.style.opacity=0,D.style.transform=gN(.75),d&&d(D)}),L=I(f),j=D=>{m==="auto"&&x.start(S.current||0,D),r&&r(P.current,D)};return R.jsx(y,{appear:o,in:s,nodeRef:P,onEnter:k,onEntered:O,onEntering:A,onExit:N,onExited:L,onExiting:$,addEndListener:j,timeout:m==="auto"?null:m,...w,children:(D,_)=>v.cloneElement(i,{style:{opacity:0,transform:gN(.75),visibility:D==="exited"&&!s?"hidden":void 0,...F$e[D],...h,...i.props.style},ref:T,..._})})});cp&&(cp.muiSupportAuto=!0);function j$e(e){return nt("MuiImageList",e)}it("MuiImageList",["root","masonry","quilted","standard","woven"]);const Hne=v.createContext({}),B$e=e=>{const{classes:t,variant:n}=e;return rt({root:["root",n]},j$e,t)},z$e=re("ul",{name:"MuiImageList",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant]]}})({display:"grid",overflowY:"auto",listStyle:"none",padding:0,WebkitOverflowScrolling:"touch",variants:[{props:{variant:"masonry"},style:{display:"block"}}]}),Une=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiImageList"}),{children:o,className:i,cols:a=2,component:s="ul",rowHeight:l="auto",gap:c=4,style:u,variant:d="standard",...f}=r,p=v.useMemo(()=>({rowHeight:l,gap:c,variant:d}),[l,c,d]),h=d==="masonry"?{columnCount:a,columnGap:c,...u}:{gridTemplateColumns:`repeat(${a}, 1fr)`,gap:c,...u},m={...r,component:s,gap:c,rowHeight:l,variant:d},y=B$e(m);return R.jsx(z$e,{as:s,className:de(y.root,y[d],i),ref:n,style:h,ownerState:m,...f,children:R.jsx(Hne.Provider,{value:p,children:o})})});function V$e(e){return nt("MuiImageListItem",e)}const uD=it("MuiImageListItem",["root","img","standard","woven","masonry","quilted"]),H$e=e=>{const{classes:t,variant:n}=e;return rt({root:["root",n],img:["img"]},V$e,t)},U$e=re("li",{name:"MuiImageListItem",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${uD.img}`]:t.img},t.root,t[n.variant]]}})({display:"block",position:"relative",[`& .${uD.img}`]:{objectFit:"cover",width:"100%",height:"100%",display:"block"},variants:[{props:{variant:"standard"},style:{display:"flex",flexDirection:"column"}},{props:{variant:"woven"},style:{height:"100%",alignSelf:"center","&:nth-of-type(even)":{height:"70%"}}},{props:{variant:"standard"},style:{[`& .${uD.img}`]:{height:"auto",flexGrow:1}}}]}),Wne=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiImageListItem"}),{children:o,className:i,cols:a=1,component:s="li",rows:l=1,style:c,...u}=r,{rowHeight:d="auto",gap:f,variant:p}=v.useContext(Hne);let h="auto";p==="woven"?h=void 0:d!=="auto"&&(h=d*l+f*(l-1));const m={...r,cols:a,component:s,gap:f,rowHeight:d,rows:l,variant:p},y=H$e(m);return R.jsx(U$e,{as:s,className:de(y.root,y[p],i),ref:n,style:{height:h,gridColumnEnd:p!=="masonry"?`span ${a}`:void 0,gridRowEnd:p!=="masonry"?`span ${l}`:void 0,marginBottom:p==="masonry"?f:void 0,breakInside:p==="masonry"?"avoid":void 0,...c},ownerState:m,...u,children:v.Children.map(o,w=>v.isValidElement(w)?w.type==="img"||Ry(w,["Image"])?v.cloneElement(w,{className:de(y.img,w.props.className)}):w:null)})});function W$e(e){return nt("MuiImageListItemBar",e)}it("MuiImageListItemBar",["root","positionBottom","positionTop","positionBelow","actionPositionLeft","actionPositionRight","titleWrap","titleWrapBottom","titleWrapTop","titleWrapBelow","titleWrapActionPosLeft","titleWrapActionPosRight","title","subtitle","actionIcon","actionIconActionPosLeft","actionIconActionPosRight"]);const G$e=e=>{const{classes:t,position:n,actionIcon:r,actionPosition:o}=e,i={root:["root",`position${Ce(n)}`,`actionPosition${Ce(o)}`],titleWrap:["titleWrap",`titleWrap${Ce(n)}`,r&&`titleWrapActionPos${Ce(o)}`],title:["title"],subtitle:["subtitle"],actionIcon:["actionIcon",`actionIconActionPos${Ce(o)}`]};return rt(i,W$e,t)},q$e=re("div",{name:"MuiImageListItemBar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`position${Ce(n.position)}`]]}})(Je(({theme:e})=>({position:"absolute",left:0,right:0,background:"rgba(0, 0, 0, 0.5)",display:"flex",alignItems:"center",fontFamily:e.typography.fontFamily,variants:[{props:{position:"bottom"},style:{bottom:0}},{props:{position:"top"},style:{top:0}},{props:{position:"below"},style:{position:"relative",background:"transparent",alignItems:"normal"}}]}))),K$e=re("div",{name:"MuiImageListItemBar",slot:"TitleWrap",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.titleWrap,t[`titleWrap${Ce(n.position)}`],n.actionIcon&&t[`titleWrapActionPos${Ce(n.actionPosition)}`]]}})(Je(({theme:e})=>({flexGrow:1,padding:"12px 16px",color:(e.vars||e).palette.common.white,overflow:"hidden",variants:[{props:{position:"below"},style:{padding:"6px 0 12px",color:"inherit"}},{props:({ownerState:t})=>t.actionIcon&&t.actionPosition==="left",style:{paddingLeft:0}},{props:({ownerState:t})=>t.actionIcon&&t.actionPosition==="right",style:{paddingRight:0}}]}))),Y$e=re("div",{name:"MuiImageListItemBar",slot:"Title",overridesResolver:(e,t)=>t.title})(Je(({theme:e})=>({fontSize:e.typography.pxToRem(16),lineHeight:"24px",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"}))),Q$e=re("div",{name:"MuiImageListItemBar",slot:"Subtitle",overridesResolver:(e,t)=>t.subtitle})(Je(({theme:e})=>({fontSize:e.typography.pxToRem(12),lineHeight:1,textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"}))),X$e=re("div",{name:"MuiImageListItemBar",slot:"ActionIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.actionIcon,t[`actionIconActionPos${Ce(n.actionPosition)}`]]}})({variants:[{props:{actionPosition:"left"},style:{order:-1}}]}),J$e=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiImageListItemBar"}),{actionIcon:o,actionPosition:i="right",className:a,subtitle:s,title:l,position:c="bottom",...u}=r,d={...r,position:c,actionPosition:i},f=G$e(d);return R.jsxs(q$e,{ownerState:d,className:de(f.root,a),ref:n,...u,children:[R.jsxs(K$e,{ownerState:d,className:f.titleWrap,children:[R.jsx(Y$e,{className:f.title,children:l}),s?R.jsx(Q$e,{className:f.subtitle,children:s}):null]}),o?R.jsx(X$e,{ownerState:d,className:f.actionIcon,children:o}):null]})}),Z$e=e=>{const{classes:t,disableUnderline:n}=e,o=rt({root:["root",!n&&"underline"],input:["input"]},gke,t);return{...t,...o}},eDe=re(pk,{shouldForwardProp:e=>ai(e)||e==="classes",name:"MuiInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...dk(e,t),!n.disableUnderline&&t.underline]}})(Je(({theme:e})=>{let n=e.palette.mode==="light"?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return e.vars&&(n=`rgba(${e.vars.palette.common.onBackgroundChannel} / ${e.vars.opacity.inputUnderline})`),{position:"relative",variants:[{props:({ownerState:r})=>r.formControl,style:{"label + &":{marginTop:16}}},{props:({ownerState:r})=>!r.disableUnderline,style:{"&::after":{left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${vf.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${vf.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${n}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${vf.disabled}, .${vf.error}):before`]:{borderBottom:`2px solid ${(e.vars||e).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${n}`}},[`&.${vf.disabled}:before`]:{borderBottomStyle:"dotted"}}},...Object.entries(e.palette).filter(Kn()).map(([r])=>({props:{color:r,disableUnderline:!1},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[r].main}`}}}))]}})),tDe=re(hk,{name:"MuiInput",slot:"Input",overridesResolver:fk})({}),hI=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiInput"}),{disableUnderline:o=!1,components:i={},componentsProps:a,fullWidth:s=!1,inputComponent:l="input",multiline:c=!1,slotProps:u,slots:d={},type:f="text",...p}=r,h=Z$e(r),y={root:{ownerState:{disableUnderline:o}}},w=u??a?Ao(u??a,y):y,x=d.root??i.Root??eDe,S=d.input??i.Input??tDe;return R.jsx(Ib,{slots:{root:x,input:S},slotProps:w,fullWidth:s,inputComponent:l,multiline:c,ref:n,type:f,...p,classes:h})});hI&&(hI.muiName="Input");function nDe(e){return nt("MuiInputAdornment",e)}const V6=it("MuiInputAdornment",["root","filled","standard","outlined","positionStart","positionEnd","disablePointerEvents","hiddenLabel","sizeSmall"]);var H6;const rDe=(e,t)=>{const{ownerState:n}=e;return[t.root,t[`position${Ce(n.position)}`],n.disablePointerEvents===!0&&t.disablePointerEvents,t[n.variant]]},oDe=e=>{const{classes:t,disablePointerEvents:n,hiddenLabel:r,position:o,size:i,variant:a}=e,s={root:["root",n&&"disablePointerEvents",o&&`position${Ce(o)}`,a,r&&"hiddenLabel",i&&`size${Ce(i)}`]};return rt(s,nDe,t)},iDe=re("div",{name:"MuiInputAdornment",slot:"Root",overridesResolver:rDe})(Je(({theme:e})=>({display:"flex",maxHeight:"2em",alignItems:"center",whiteSpace:"nowrap",color:(e.vars||e).palette.action.active,variants:[{props:{variant:"filled"},style:{[`&.${V6.positionStart}&:not(.${V6.hiddenLabel})`]:{marginTop:16}}},{props:{position:"start"},style:{marginRight:8}},{props:{position:"end"},style:{marginLeft:8}},{props:{disablePointerEvents:!0},style:{pointerEvents:"none"}}]}))),Co=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiInputAdornment"}),{children:o,className:i,component:a="div",disablePointerEvents:s=!1,disableTypography:l=!1,position:c,variant:u,...d}=r,f=Ba()||{};let p=u;u&&f.variant,f&&!p&&(p=f.variant);const h={...r,hiddenLabel:f.hiddenLabel,size:f.size,disablePointerEvents:s,position:c,variant:p},m=oDe(h);return R.jsx(uk.Provider,{value:null,children:R.jsx(iDe,{as:a,ownerState:h,className:de(m.root,i),ref:n,...d,children:typeof o=="string"&&!l?R.jsx(ot,{color:"textSecondary",children:o}):R.jsxs(v.Fragment,{children:[c==="start"?H6||(H6=R.jsx("span",{className:"notranslate",children:"​"})):null,o]})})})});function aDe(e){return nt("MuiInputLabel",e)}it("MuiInputLabel",["root","focused","disabled","error","required","asterisk","formControl","sizeSmall","shrink","animated","standard","filled","outlined"]);const sDe=e=>{const{classes:t,formControl:n,size:r,shrink:o,disableAnimation:i,variant:a,required:s}=e,l={root:["root",n&&"formControl",!i&&"animated",o&&"shrink",r&&r!=="normal"&&`size${Ce(r)}`,a],asterisk:[s&&"asterisk"]},c=rt(l,aDe,t);return{...t,...c}},lDe=re(P$e,{shouldForwardProp:e=>ai(e)||e==="classes",name:"MuiInputLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${gx.asterisk}`]:t.asterisk},t.root,n.formControl&&t.formControl,n.size==="small"&&t.sizeSmall,n.shrink&&t.shrink,!n.disableAnimation&&t.animated,n.focused&&t.focused,t[n.variant]]}})(Je(({theme:e})=>({display:"block",transformOrigin:"top left",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"100%",variants:[{props:({ownerState:t})=>t.formControl,style:{position:"absolute",left:0,top:0,transform:"translate(0, 20px) scale(1)"}},{props:{size:"small"},style:{transform:"translate(0, 17px) scale(1)"}},{props:({ownerState:t})=>t.shrink,style:{transform:"translate(0, -1.5px) scale(0.75)",transformOrigin:"top left",maxWidth:"133%"}},{props:({ownerState:t})=>!t.disableAnimation,style:{transition:e.transitions.create(["color","transform","max-width"],{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut})}},{props:{variant:"filled"},style:{zIndex:1,pointerEvents:"none",transform:"translate(12px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"}},{props:{variant:"filled",size:"small"},style:{transform:"translate(12px, 13px) scale(1)"}},{props:({variant:t,ownerState:n})=>t==="filled"&&n.shrink,style:{userSelect:"none",pointerEvents:"auto",transform:"translate(12px, 7px) scale(0.75)",maxWidth:"calc(133% - 24px)"}},{props:({variant:t,ownerState:n,size:r})=>t==="filled"&&n.shrink&&r==="small",style:{transform:"translate(12px, 4px) scale(0.75)"}},{props:{variant:"outlined"},style:{zIndex:1,pointerEvents:"none",transform:"translate(14px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"}},{props:{variant:"outlined",size:"small"},style:{transform:"translate(14px, 9px) scale(1)"}},{props:({variant:t,ownerState:n})=>t==="outlined"&&n.shrink,style:{userSelect:"none",pointerEvents:"auto",maxWidth:"calc(133% - 32px)",transform:"translate(14px, -9px) scale(0.75)"}}]}))),Mb=v.forwardRef(function(t,n){const r=at({name:"MuiInputLabel",props:t}),{disableAnimation:o=!1,margin:i,shrink:a,variant:s,className:l,...c}=r,u=Ba();let d=a;typeof d>"u"&&u&&(d=u.filled||u.focused||u.adornedStart);const f=Tp({props:r,muiFormControl:u,states:["size","variant","required","focused"]}),p={...r,disableAnimation:o,formControl:u,shrink:d,size:f.size,variant:f.variant,required:f.required,focused:f.focused},h=sDe(p);return R.jsx(lDe,{"data-shrink":d,ref:n,className:de(h.root,l),...c,ownerState:p,classes:h})});function cDe(e){return nt("MuiLinearProgress",e)}it("MuiLinearProgress",["root","colorPrimary","colorSecondary","determinate","indeterminate","buffer","query","dashed","dashedColorPrimary","dashedColorSecondary","bar","barColorPrimary","barColorSecondary","bar1Indeterminate","bar1Determinate","bar1Buffer","bar2Indeterminate","bar2Buffer"]);const mN=4,yN=Cu` 0% { left: -35%; right: 100%; @@ -209,9 +209,9 @@ Error generating stack: `+i.message+` left: 100%; right: -90%; } -`,j$e=typeof dN!="string"?gp` - animation: ${dN} 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite; - `:null,fN=xu` +`,uDe=typeof yN!="string"?vp` + animation: ${yN} 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite; + `:null,vN=Cu` 0% { left: -200%; right: 100%; @@ -226,9 +226,9 @@ Error generating stack: `+i.message+` left: 107%; right: -8%; } -`,B$e=typeof fN!="string"?gp` - animation: ${fN} 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) 1.15s infinite; - `:null,pN=xu` +`,dDe=typeof vN!="string"?vp` + animation: ${vN} 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) 1.15s infinite; + `:null,bN=Cu` 0% { opacity: 1; background-position: 0 -23px; @@ -243,9 +243,9 @@ Error generating stack: `+i.message+` opacity: 1; background-position: -200px -23px; } -`,z$e=typeof pN!="string"?gp` - animation: ${pN} 3s infinite linear; - `:null,V$e=e=>{const{classes:t,variant:n,color:r}=e,o={root:["root",`color${Ce(r)}`,n],dashed:["dashed",`dashedColor${Ce(r)}`],bar1:["bar",`barColor${Ce(r)}`,(n==="indeterminate"||n==="query")&&"bar1Indeterminate",n==="determinate"&&"bar1Determinate",n==="buffer"&&"bar1Buffer"],bar2:["bar",n!=="buffer"&&`barColor${Ce(r)}`,n==="buffer"&&`color${Ce(r)}`,(n==="indeterminate"||n==="query")&&"bar2Indeterminate",n==="buffer"&&"bar2Buffer"]};return rt(o,F$e,t)},JB=(e,t)=>e.vars?e.vars.palette.LinearProgress[`${t}Bg`]:e.palette.mode==="light"?wd(e.palette[t].main,.62):bd(e.palette[t].main,.5),H$e=oe("span",{name:"MuiLinearProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`color${Ce(n.color)}`],t[n.variant]]}})(Je(({theme:e})=>({position:"relative",overflow:"hidden",display:"block",height:4,zIndex:0,"@media print":{colorAdjust:"exact"},variants:[...Object.entries(e.palette).filter(Kn()).map(([t])=>({props:{color:t},style:{backgroundColor:JB(e,t)}})),{props:({ownerState:t})=>t.color==="inherit"&&t.variant!=="buffer",style:{"&::before":{content:'""',position:"absolute",left:0,top:0,right:0,bottom:0,backgroundColor:"currentColor",opacity:.3}}},{props:{variant:"buffer"},style:{backgroundColor:"transparent"}},{props:{variant:"query"},style:{transform:"rotate(180deg)"}}]}))),U$e=oe("span",{name:"MuiLinearProgress",slot:"Dashed",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.dashed,t[`dashedColor${Ce(n.color)}`]]}})(Je(({theme:e})=>({position:"absolute",marginTop:0,height:"100%",width:"100%",backgroundSize:"10px 10px",backgroundPosition:"0 -23px",variants:[{props:{color:"inherit"},style:{opacity:.3,backgroundImage:"radial-gradient(currentColor 0%, currentColor 16%, transparent 42%)"}},...Object.entries(e.palette).filter(Kn()).map(([t])=>{const n=JB(e,t);return{props:{color:t},style:{backgroundImage:`radial-gradient(${n} 0%, ${n} 16%, transparent 42%)`}}})]})),z$e||{animation:`${pN} 3s infinite linear`}),W$e=oe("span",{name:"MuiLinearProgress",slot:"Bar1",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.bar,t[`barColor${Ce(n.color)}`],(n.variant==="indeterminate"||n.variant==="query")&&t.bar1Indeterminate,n.variant==="determinate"&&t.bar1Determinate,n.variant==="buffer"&&t.bar1Buffer]}})(Je(({theme:e})=>({width:"100%",position:"absolute",left:0,bottom:0,top:0,transition:"transform 0.2s linear",transformOrigin:"left",variants:[{props:{color:"inherit"},style:{backgroundColor:"currentColor"}},...Object.entries(e.palette).filter(Kn()).map(([t])=>({props:{color:t},style:{backgroundColor:(e.vars||e).palette[t].main}})),{props:{variant:"determinate"},style:{transition:`transform .${uN}s linear`}},{props:{variant:"buffer"},style:{zIndex:1,transition:`transform .${uN}s linear`}},{props:({ownerState:t})=>t.variant==="indeterminate"||t.variant==="query",style:{width:"auto"}},{props:({ownerState:t})=>t.variant==="indeterminate"||t.variant==="query",style:j$e||{animation:`${dN} 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite`}}]}))),G$e=oe("span",{name:"MuiLinearProgress",slot:"Bar2",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.bar,t[`barColor${Ce(n.color)}`],(n.variant==="indeterminate"||n.variant==="query")&&t.bar2Indeterminate,n.variant==="buffer"&&t.bar2Buffer]}})(Je(({theme:e})=>({width:"100%",position:"absolute",left:0,bottom:0,top:0,transition:"transform 0.2s linear",transformOrigin:"left",variants:[...Object.entries(e.palette).filter(Kn()).map(([t])=>({props:{color:t},style:{"--LinearProgressBar2-barColor":(e.vars||e).palette[t].main}})),{props:({ownerState:t})=>t.variant!=="buffer"&&t.color!=="inherit",style:{backgroundColor:"var(--LinearProgressBar2-barColor, currentColor)"}},{props:({ownerState:t})=>t.variant!=="buffer"&&t.color==="inherit",style:{backgroundColor:"currentColor"}},{props:{color:"inherit"},style:{opacity:.3}},...Object.entries(e.palette).filter(Kn()).map(([t])=>({props:{color:t,variant:"buffer"},style:{backgroundColor:JB(e,t),transition:`transform .${uN}s linear`}})),{props:({ownerState:t})=>t.variant==="indeterminate"||t.variant==="query",style:{width:"auto"}},{props:({ownerState:t})=>t.variant==="indeterminate"||t.variant==="query",style:B$e||{animation:`${fN} 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) 1.15s infinite`}}]}))),Bne=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiLinearProgress"}),{className:o,color:i="primary",value:a,valueBuffer:s,variant:l="indeterminate",...c}=r,u={...r,color:i,variant:l},d=V$e(u),f=dr(),p={},h={bar1:{},bar2:{}};if((l==="determinate"||l==="buffer")&&a!==void 0){p["aria-valuenow"]=Math.round(a),p["aria-valuemin"]=0,p["aria-valuemax"]=100;let m=a-100;f&&(m=-m),h.bar1.transform=`translateX(${m}%)`}if(l==="buffer"&&s!==void 0){let m=(s||0)-100;f&&(m=-m),h.bar2.transform=`translateX(${m}%)`}return R.jsxs(H$e,{className:de(d.root,o),ownerState:u,role:"progressbar",...p,ref:n,...c,children:[l==="buffer"?R.jsx(U$e,{className:d.dashed,ownerState:u}):null,R.jsx(W$e,{className:d.bar1,ownerState:u,style:h.bar1}),l==="determinate"?null:R.jsx(G$e,{className:d.bar2,ownerState:u,style:h.bar2})]})}),wl=v.createContext({});function q$e(e){return nt("MuiList",e)}it("MuiList",["root","padding","dense","subheader"]);const K$e=e=>{const{classes:t,disablePadding:n,dense:r,subheader:o}=e;return rt({root:["root",!n&&"padding",r&&"dense",o&&"subheader"]},q$e,t)},Y$e=oe("ul",{name:"MuiList",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disablePadding&&t.padding,n.dense&&t.dense,n.subheader&&t.subheader]}})({listStyle:"none",margin:0,padding:0,position:"relative",variants:[{props:({ownerState:e})=>!e.disablePadding,style:{paddingTop:8,paddingBottom:8}},{props:({ownerState:e})=>e.subheader,style:{paddingTop:0}}]}),Ll=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiList"}),{children:o,className:i,component:a="ul",dense:s=!1,disablePadding:l=!1,subheader:c,...u}=r,d=v.useMemo(()=>({dense:s}),[s]),f={...r,component:a,dense:s,disablePadding:l},p=K$e(f);return R.jsx(wl.Provider,{value:d,children:R.jsxs(Y$e,{as:a,className:de(p.root,i),ref:n,ownerState:f,...u,children:[c,o]})})});function Q$e(e){return nt("MuiListItem",e)}it("MuiListItem",["root","container","dense","alignItemsFlexStart","divider","gutters","padding","secondaryAction"]);function X$e(e){return nt("MuiListItemButton",e)}const Qm=it("MuiListItemButton",["root","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","selected"]),J$e=(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.alignItems==="flex-start"&&t.alignItemsFlexStart,n.divider&&t.divider,!n.disableGutters&&t.gutters]},Z$e=e=>{const{alignItems:t,classes:n,dense:r,disabled:o,disableGutters:i,divider:a,selected:s}=e,c=rt({root:["root",r&&"dense",!i&&"gutters",a&&"divider",o&&"disabled",t==="flex-start"&&"alignItemsFlexStart",s&&"selected"]},X$e,n);return{...n,...c}},eDe=oe(la,{shouldForwardProp:e=>xi(e)||e==="classes",name:"MuiListItemButton",slot:"Root",overridesResolver:J$e})(Je(({theme:e})=>({display:"flex",flexGrow:1,justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minWidth:0,boxSizing:"border-box",textAlign:"left",paddingTop:8,paddingBottom:8,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Qm.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:xt(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${Qm.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:xt(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${Qm.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:xt(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:xt(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${Qm.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${Qm.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},variants:[{props:({ownerState:t})=>t.divider,style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"}},{props:{alignItems:"flex-start"},style:{alignItems:"flex-start"}},{props:({ownerState:t})=>!t.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:t})=>t.dense,style:{paddingTop:4,paddingBottom:4}}]}))),Ep=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiListItemButton"}),{alignItems:o="center",autoFocus:i=!1,component:a="div",children:s,dense:l=!1,disableGutters:c=!1,divider:u=!1,focusVisibleClassName:d,selected:f=!1,className:p,...h}=r,m=v.useContext(wl),y=v.useMemo(()=>({dense:l||m.dense||!1,alignItems:o,disableGutters:c}),[o,m.dense,l,c]),w=v.useRef(null);xs(()=>{i&&w.current&&w.current.focus()},[i]);const x={...r,alignItems:o,dense:y.dense,disableGutters:c,divider:u,selected:f},C=Z$e(x),E=Rr(w,n);return R.jsx(wl.Provider,{value:y,children:R.jsx(eDe,{ref:E,href:h.href||h.to,component:(h.href||h.to)&&a==="div"?"button":a,focusVisibleClassName:de(C.focusVisible,d),ownerState:x,className:de(C.root,p),...h,classes:C,children:s})})});function tDe(e){return nt("MuiListItemSecondaryAction",e)}it("MuiListItemSecondaryAction",["root","disableGutters"]);const nDe=e=>{const{disableGutters:t,classes:n}=e;return rt({root:["root",t&&"disableGutters"]},tDe,n)},rDe=oe("div",{name:"MuiListItemSecondaryAction",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.disableGutters&&t.disableGutters]}})({position:"absolute",right:16,top:"50%",transform:"translateY(-50%)",variants:[{props:({ownerState:e})=>e.disableGutters,style:{right:0}}]}),zne=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiListItemSecondaryAction"}),{className:o,...i}=r,a=v.useContext(wl),s={...r,disableGutters:a.disableGutters},l=nDe(s);return R.jsx(rDe,{className:de(l.root,o),ownerState:s,ref:n,...i})});zne.muiName="ListItemSecondaryAction";const oDe=(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.alignItems==="flex-start"&&t.alignItemsFlexStart,n.divider&&t.divider,!n.disableGutters&&t.gutters,!n.disablePadding&&t.padding,n.hasSecondaryAction&&t.secondaryAction]},iDe=e=>{const{alignItems:t,classes:n,dense:r,disableGutters:o,disablePadding:i,divider:a,hasSecondaryAction:s}=e;return rt({root:["root",r&&"dense",!o&&"gutters",!i&&"padding",a&&"divider",t==="flex-start"&&"alignItemsFlexStart",s&&"secondaryAction"],container:["container"]},Q$e,n)},aDe=oe("div",{name:"MuiListItem",slot:"Root",overridesResolver:oDe})(Je(({theme:e})=>({display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",width:"100%",boxSizing:"border-box",textAlign:"left",variants:[{props:({ownerState:t})=>!t.disablePadding,style:{paddingTop:8,paddingBottom:8}},{props:({ownerState:t})=>!t.disablePadding&&t.dense,style:{paddingTop:4,paddingBottom:4}},{props:({ownerState:t})=>!t.disablePadding&&!t.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:t})=>!t.disablePadding&&!!t.secondaryAction,style:{paddingRight:48}},{props:({ownerState:t})=>!!t.secondaryAction,style:{[`& > .${Qm.root}`]:{paddingRight:48}}},{props:{alignItems:"flex-start"},style:{alignItems:"flex-start"}},{props:({ownerState:t})=>t.divider,style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"}},{props:({ownerState:t})=>t.button,style:{transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}}}},{props:({ownerState:t})=>t.hasSecondaryAction,style:{paddingRight:48}}]}))),sDe=oe("li",{name:"MuiListItem",slot:"Container",overridesResolver:(e,t)=>t.container})({position:"relative"}),Ps=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiListItem"}),{alignItems:o="center",children:i,className:a,component:s,components:l={},componentsProps:c={},ContainerComponent:u="li",ContainerProps:{className:d,...f}={},dense:p=!1,disableGutters:h=!1,disablePadding:m=!1,divider:y=!1,secondaryAction:w,slotProps:x={},slots:C={},...E}=r,P=v.useContext(wl),T=v.useMemo(()=>({dense:p||P.dense||!1,alignItems:o,disableGutters:h}),[o,P.dense,p,h]),I=v.useRef(null),A=v.Children.toArray(i),k=A.length&&My(A[A.length-1],["ListItemSecondaryAction"]),O={...r,alignItems:o,dense:T.dense,disableGutters:h,disablePadding:m,divider:y,hasSecondaryAction:k},$=iDe(O),N=Rr(I,n),L=C.root||l.Root||aDe,j=x.root||c.root||{},D={className:de($.root,j.className,a),...E};let _=s||"li";return k?(_=!D.component&&!s?"div":_,u==="li"&&(_==="li"?_="div":D.component==="li"&&(D.component="div")),R.jsx(wl.Provider,{value:T,children:R.jsxs(sDe,{as:u,className:de($.container,d),ref:N,ownerState:O,...f,children:[R.jsx(L,{...j,...!Tv(L)&&{as:_,ownerState:{...O,...j.ownerState}},...D,children:A}),A.pop()]})})):R.jsx(wl.Provider,{value:T,children:R.jsxs(L,{...j,as:_,ref:N,...!Tv(L)&&{ownerState:{...O,...j.ownerState}},...D,children:[A,w&&R.jsx(zne,{children:w})]})})});function lDe(e){return nt("MuiListItemAvatar",e)}it("MuiListItemAvatar",["root","alignItemsFlexStart"]);const cDe=e=>{const{alignItems:t,classes:n}=e;return rt({root:["root",t==="flex-start"&&"alignItemsFlexStart"]},lDe,n)},uDe=oe("div",{name:"MuiListItemAvatar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.alignItems==="flex-start"&&t.alignItemsFlexStart]}})({minWidth:56,flexShrink:0,variants:[{props:{alignItems:"flex-start"},style:{marginTop:8}}]}),ZB=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiListItemAvatar"}),{className:o,...i}=r,a=v.useContext(wl),s={...r,alignItems:a.alignItems},l=cDe(s);return R.jsx(uDe,{className:de(l.root,o),ownerState:s,ref:n,...i})});function dDe(e){return nt("MuiListItemIcon",e)}const j6=it("MuiListItemIcon",["root","alignItemsFlexStart"]),fDe=e=>{const{alignItems:t,classes:n}=e;return rt({root:["root",t==="flex-start"&&"alignItemsFlexStart"]},dDe,n)},pDe=oe("div",{name:"MuiListItemIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.alignItems==="flex-start"&&t.alignItemsFlexStart]}})(Je(({theme:e})=>({minWidth:56,color:(e.vars||e).palette.action.active,flexShrink:0,display:"inline-flex",variants:[{props:{alignItems:"flex-start"},style:{marginTop:8}}]}))),aa=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiListItemIcon"}),{className:o,...i}=r,a=v.useContext(wl),s={...r,alignItems:a.alignItems},l=fDe(s);return R.jsx(pDe,{className:de(l.root,o),ownerState:s,ref:n,...i})});function hDe(e){return nt("MuiListItemText",e)}const yy=it("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]),gDe=e=>{const{classes:t,inset:n,primary:r,secondary:o,dense:i}=e;return rt({root:["root",n&&"inset",i&&"dense",r&&o&&"multiline"],primary:["primary"],secondary:["secondary"]},hDe,t)},mDe=oe("div",{name:"MuiListItemText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${yy.primary}`]:t.primary},{[`& .${yy.secondary}`]:t.secondary},t.root,n.inset&&t.inset,n.primary&&n.secondary&&t.multiline,n.dense&&t.dense]}})({flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4,[`.${QT.root}:where(& .${yy.primary})`]:{display:"block"},[`.${QT.root}:where(& .${yy.secondary})`]:{display:"block"},variants:[{props:({ownerState:e})=>e.primary&&e.secondary,style:{marginTop:6,marginBottom:6}},{props:({ownerState:e})=>e.inset,style:{paddingLeft:56}}]}),Ao=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiListItemText"}),{children:o,className:i,disableTypography:a=!1,inset:s=!1,primary:l,primaryTypographyProps:c,secondary:u,secondaryTypographyProps:d,...f}=r,{dense:p}=v.useContext(wl);let h=l??o,m=u;const y={...r,disableTypography:a,inset:s,primary:!!h,secondary:!!m,dense:p},w=gDe(y);return h!=null&&h.type!==st&&!a&&(h=R.jsx(st,{variant:p?"body2":"body1",className:w.primary,component:c!=null&&c.variant?void 0:"span",...c,children:h})),m!=null&&m.type!==st&&!a&&(m=R.jsx(st,{variant:"body2",className:w.secondary,color:"textSecondary",...d,children:m})),R.jsxs(mDe,{className:de(w.root,i),ownerState:y,ref:n,...f,children:[h,m]})});function iD(e,t,n){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:n?null:e.firstChild}function B6(e,t,n){return e===t?n?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:n?null:e.lastChild}function Vne(e,t){if(t===void 0)return!0;let n=e.innerText;return n===void 0&&(n=e.textContent),n=n.trim().toLowerCase(),n.length===0?!1:t.repeating?n[0]===t.keys[0]:n.startsWith(t.keys.join(""))}function Q0(e,t,n,r,o,i){let a=!1,s=o(e,t,t?n:!1);for(;s;){if(s===e.firstChild){if(a)return!1;a=!0}const l=r?!1:s.disabled||s.getAttribute("aria-disabled")==="true";if(!s.hasAttribute("tabindex")||!Vne(s,i)||l)s=o(e,s,n);else return s.focus(),!0}return!1}const _C=v.forwardRef(function(t,n){const{actions:r,autoFocus:o=!1,autoFocusItem:i=!1,children:a,className:s,disabledItemsFocusable:l=!1,disableListWrap:c=!1,onKeyDown:u,variant:d="selectedMenu",...f}=t,p=v.useRef(null),h=v.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});xs(()=>{o&&p.current.focus()},[o]),v.useImperativeHandle(r,()=>({adjustStyleForScrollbar:(C,{direction:E})=>{const P=!p.current.style.width;if(C.clientHeight{const E=p.current,P=C.key;if(C.ctrlKey||C.metaKey||C.altKey){u&&u(C);return}const I=yi(E).activeElement;if(P==="ArrowDown")C.preventDefault(),Q0(E,I,c,l,iD);else if(P==="ArrowUp")C.preventDefault(),Q0(E,I,c,l,B6);else if(P==="Home")C.preventDefault(),Q0(E,null,c,l,iD);else if(P==="End")C.preventDefault(),Q0(E,null,c,l,B6);else if(P.length===1){const A=h.current,k=P.toLowerCase(),O=performance.now();A.keys.length>0&&(O-A.lastTime>500?(A.keys=[],A.repeating=!0,A.previousKeyMatched=!0):A.repeating&&k!==A.keys[0]&&(A.repeating=!1)),A.lastTime=O,A.keys.push(k);const $=I&&!A.repeating&&Vne(I,A);A.previousKeyMatched&&($||Q0(E,I,!1,l,iD,A))?C.preventDefault():A.previousKeyMatched=!1}u&&u(C)},y=Rr(p,n);let w=-1;v.Children.forEach(a,(C,E)=>{if(!v.isValidElement(C)){w===E&&(w+=1,w>=a.length&&(w=-1));return}C.props.disabled||(d==="selectedMenu"&&C.props.selected||w===-1)&&(w=E),w===E&&(C.props.disabled||C.props.muiSkipListHighlight||C.type.muiSkipListHighlight)&&(w+=1,w>=a.length&&(w=-1))});const x=v.Children.map(a,(C,E)=>{if(E===w){const P={};return i&&(P.autoFocus=!0),C.props.tabIndex===void 0&&d==="selectedMenu"&&(P.tabIndex=0),v.cloneElement(C,P)}return C});return R.jsx(Ll,{role:"menu",ref:y,className:s,onKeyDown:m,tabIndex:o?0:-1,...f,children:x})});function yDe(e){return nt("MuiPopover",e)}it("MuiPopover",["root","paper"]);function z6(e,t){let n=0;return typeof t=="number"?n=t:t==="center"?n=e.height/2:t==="bottom"&&(n=e.height),n}function V6(e,t){let n=0;return typeof t=="number"?n=t:t==="center"?n=e.width/2:t==="right"&&(n=e.width),n}function H6(e){return[e.horizontal,e.vertical].map(t=>typeof t=="number"?`${t}px`:t).join(" ")}function aD(e){return typeof e=="function"?e():e}const vDe=e=>{const{classes:t}=e;return rt({root:["root"],paper:["paper"]},yDe,t)},bDe=oe(Ib,{name:"MuiPopover",slot:"Root",overridesResolver:(e,t)=>t.root})({}),Hne=oe(to,{name:"MuiPopover",slot:"Paper",overridesResolver:(e,t)=>t.paper})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),wDe=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiPopover"}),{action:o,anchorEl:i,anchorOrigin:a={vertical:"top",horizontal:"left"},anchorPosition:s,anchorReference:l="anchorEl",children:c,className:u,container:d,elevation:f=8,marginThreshold:p=16,open:h,PaperProps:m={},slots:y={},slotProps:w={},transformOrigin:x={vertical:"top",horizontal:"left"},TransitionComponent:C=ap,transitionDuration:E="auto",TransitionProps:{onEntering:P,...T}={},disableScrollLock:I=!1,...A}=r,k=(w==null?void 0:w.paper)??m,O=v.useRef(),$={...r,anchorOrigin:a,anchorReference:l,elevation:f,marginThreshold:p,externalPaperSlotProps:k,transformOrigin:x,TransitionComponent:C,transitionDuration:E,TransitionProps:T},N=vDe($),L=v.useCallback(()=>{if(l==="anchorPosition")return s;const re=aD(i),Z=(re&&re.nodeType===1?re:yi(O.current).body).getBoundingClientRect();return{top:Z.top+z6(Z,a.vertical),left:Z.left+V6(Z,a.horizontal)}},[i,a.horizontal,a.vertical,s,l]),j=v.useCallback(re=>({vertical:z6(re,x.vertical),horizontal:V6(re,x.horizontal)}),[x.horizontal,x.vertical]),D=v.useCallback(re=>{const fe={width:re.offsetWidth,height:re.offsetHeight},Z=j(fe);if(l==="none")return{top:null,left:null,transformOrigin:H6(Z)};const ce=L();let ge=ce.top-Z.vertical,we=ce.left-Z.horizontal;const me=ge+fe.height,Se=we+fe.width,xe=Ss(aD(i)),ke=xe.innerHeight-p,De=xe.innerWidth-p;if(p!==null&&geke){const _e=me-ke;ge-=_e,Z.vertical+=_e}if(p!==null&&weDe){const _e=Se-De;we-=_e,Z.horizontal+=_e}return{top:`${Math.round(ge)}px`,left:`${Math.round(we)}px`,transformOrigin:H6(Z)}},[i,l,L,j,p]),[_,z]=v.useState(h),F=v.useCallback(()=>{const re=O.current;if(!re)return;const fe=D(re);fe.top!==null&&re.style.setProperty("top",fe.top),fe.left!==null&&(re.style.left=fe.left),re.style.transformOrigin=fe.transformOrigin,z(!0)},[D]);v.useEffect(()=>(I&&window.addEventListener("scroll",F),()=>window.removeEventListener("scroll",F)),[i,I,F]);const V=(re,fe)=>{P&&P(re,fe),F()},U=()=>{z(!1)};v.useEffect(()=>{h&&F()}),v.useImperativeHandle(o,()=>h?{updatePosition:()=>{F()}}:null,[h,F]),v.useEffect(()=>{if(!h)return;const re=PC(()=>{F()}),fe=Ss(i);return fe.addEventListener("resize",re),()=>{re.clear(),fe.removeEventListener("resize",re)}},[i,h,F]);let q=E;E==="auto"&&!C.muiSupportAuto&&(q=void 0);const X=d||(i?yi(aD(i)).body:void 0),ie={slots:y,slotProps:{...w,paper:k}},[ee,Q]=Cr("paper",{elementType:Hne,externalForwardedProps:ie,additionalProps:{elevation:f,className:de(N.paper,k==null?void 0:k.className),style:_?k.style:{...k.style,opacity:0}},ownerState:$}),[te,{slotProps:pe,...ae}]=Cr("root",{elementType:bDe,externalForwardedProps:ie,additionalProps:{slotProps:{backdrop:{invisible:!0}},container:X,open:h},ownerState:$,className:de(N.root,u)}),se=Rr(O,Q.ref);return R.jsx(te,{...ae,...!Tv(te)&&{slotProps:pe,disableScrollLock:I},...A,ref:n,children:R.jsx(C,{appear:!0,in:h,onEntering:V,onExited:U,timeout:q,...T,children:R.jsx(ee,{...Q,ref:se,children:c})})})});function xDe(e){return nt("MuiMenu",e)}it("MuiMenu",["root","paper","list"]);const SDe={vertical:"top",horizontal:"right"},CDe={vertical:"top",horizontal:"left"},EDe=e=>{const{classes:t}=e;return rt({root:["root"],paper:["paper"],list:["list"]},xDe,t)},PDe=oe(wDe,{shouldForwardProp:e=>xi(e)||e==="classes",name:"MuiMenu",slot:"Root",overridesResolver:(e,t)=>t.root})({}),TDe=oe(Hne,{name:"MuiMenu",slot:"Paper",overridesResolver:(e,t)=>t.paper})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),IDe=oe(_C,{name:"MuiMenu",slot:"List",overridesResolver:(e,t)=>t.list})({outline:0}),Rs=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiMenu"}),{autoFocus:o=!0,children:i,className:a,disableAutoFocusItem:s=!1,MenuListProps:l={},onClose:c,open:u,PaperProps:d={},PopoverClasses:f,transitionDuration:p="auto",TransitionProps:{onEntering:h,...m}={},variant:y="selectedMenu",slots:w={},slotProps:x={},...C}=r,E=dr(),P={...r,autoFocus:o,disableAutoFocusItem:s,MenuListProps:l,onEntering:h,PaperProps:d,transitionDuration:p,TransitionProps:m,variant:y},T=EDe(P),I=o&&!s&&u,A=v.useRef(null),k=(_,z)=>{A.current&&A.current.adjustStyleForScrollbar(_,{direction:E?"rtl":"ltr"}),h&&h(_,z)},O=_=>{_.key==="Tab"&&(_.preventDefault(),c&&c(_,"tabKeyDown"))};let $=-1;v.Children.map(i,(_,z)=>{v.isValidElement(_)&&(_.props.disabled||(y==="selectedMenu"&&_.props.selected||$===-1)&&($=z))});const N=w.paper??TDe,L=x.paper??d,j=hu({elementType:w.root,externalSlotProps:x.root,ownerState:P,className:[T.root,a]}),D=hu({elementType:N,externalSlotProps:L,ownerState:P,className:T.paper});return R.jsx(PDe,{onClose:c,anchorOrigin:{vertical:"bottom",horizontal:E?"right":"left"},transformOrigin:E?SDe:CDe,slots:{paper:N,root:w.root},slotProps:{root:j,paper:D},open:u,ref:n,transitionDuration:p,TransitionProps:{onEntering:k,...m},ownerState:P,...C,classes:f,children:R.jsx(IDe,{onKeyDown:O,actions:A,autoFocus:o&&($===-1||s),autoFocusItem:I,variant:y,...l,className:de(T.list,l.className),children:i})})});function ODe(e){return nt("MuiMenuItem",e)}const X0=it("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]),ADe=(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.divider&&t.divider,!n.disableGutters&&t.gutters]},kDe=e=>{const{disabled:t,dense:n,divider:r,disableGutters:o,selected:i,classes:a}=e,l=rt({root:["root",n&&"dense",t&&"disabled",!o&&"gutters",r&&"divider",i&&"selected"]},ODe,a);return{...a,...l}},MDe=oe(la,{shouldForwardProp:e=>xi(e)||e==="classes",name:"MuiMenuItem",slot:"Root",overridesResolver:ADe})(Je(({theme:e})=>({...e.typography.body1,display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",whiteSpace:"nowrap","&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${X0.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:xt(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${X0.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:xt(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${X0.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:xt(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:xt(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${X0.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${X0.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`& + .${R6.root}`]:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},[`& + .${R6.inset}`]:{marginLeft:52},[`& .${yy.root}`]:{marginTop:0,marginBottom:0},[`& .${yy.inset}`]:{paddingLeft:36},[`& .${j6.root}`]:{minWidth:36},variants:[{props:({ownerState:t})=>!t.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:t})=>t.divider,style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"}},{props:({ownerState:t})=>!t.dense,style:{[e.breakpoints.up("sm")]:{minHeight:"auto"}}},{props:({ownerState:t})=>t.dense,style:{minHeight:32,paddingTop:4,paddingBottom:4,...e.typography.body2,[`& .${j6.root} svg`]:{fontSize:"1.25rem"}}}]}))),en=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiMenuItem"}),{autoFocus:o=!1,component:i="li",dense:a=!1,divider:s=!1,disableGutters:l=!1,focusVisibleClassName:c,role:u="menuitem",tabIndex:d,className:f,...p}=r,h=v.useContext(wl),m=v.useMemo(()=>({dense:a||h.dense||!1,disableGutters:l}),[h.dense,a,l]),y=v.useRef(null);xs(()=>{o&&y.current&&y.current.focus()},[o]);const w={...r,dense:m.dense,divider:s,disableGutters:l},x=kDe(r),C=Rr(y,n);let E;return r.disabled||(E=d!==void 0?d:-1),R.jsx(wl.Provider,{value:m,children:R.jsx(MDe,{ref:C,role:u,tabIndex:E,component:i,focusVisibleClassName:de(x.focusVisible,c),className:de(x.root,f),...p,ownerState:w,classes:x})})});function RDe(e){return nt("MuiNativeSelect",e)}const ez=it("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),$De=e=>{const{classes:t,variant:n,disabled:r,multiple:o,open:i,error:a}=e,s={select:["select",n,r&&"disabled",o&&"multiple",a&&"error"],icon:["icon",`icon${Ce(n)}`,i&&"iconOpen",r&&"disabled"]};return rt(s,RDe,t)},Une=oe("select")(({theme:e})=>({MozAppearance:"none",WebkitAppearance:"none",userSelect:"none",borderRadius:0,cursor:"pointer","&:focus":{borderRadius:0},[`&.${ez.disabled}`]:{cursor:"default"},"&[multiple]":{height:"auto"},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:(e.vars||e).palette.background.paper},variants:[{props:({ownerState:t})=>t.variant!=="filled"&&t.variant!=="outlined",style:{"&&&":{paddingRight:24,minWidth:16}}},{props:{variant:"filled"},style:{"&&&":{paddingRight:32}}},{props:{variant:"outlined"},style:{borderRadius:(e.vars||e).shape.borderRadius,"&:focus":{borderRadius:(e.vars||e).shape.borderRadius},"&&&":{paddingRight:32}}}]})),DDe=oe(Une,{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:xi,overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.select,t[n.variant],n.error&&t.error,{[`&.${ez.multiple}`]:t.multiple}]}})({}),Wne=oe("svg")(({theme:e})=>({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:(e.vars||e).palette.action.active,[`&.${ez.disabled}`]:{color:(e.vars||e).palette.action.disabled},variants:[{props:({ownerState:t})=>t.open,style:{transform:"rotate(180deg)"}},{props:{variant:"filled"},style:{right:7}},{props:{variant:"outlined"},style:{right:7}}]})),_De=oe(Wne,{name:"MuiNativeSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${Ce(n.variant)}`],n.open&&t.iconOpen]}})({}),NDe=v.forwardRef(function(t,n){const{className:r,disabled:o,error:i,IconComponent:a,inputRef:s,variant:l="standard",...c}=t,u={...t,disabled:o,variant:l,error:i},d=$De(u);return R.jsxs(v.Fragment,{children:[R.jsx(DDe,{ownerState:u,className:de(d.select,r),disabled:o,ref:s||n,...c}),t.multiple?null:R.jsx(_De,{as:a,ownerState:u,className:d.icon})]})});var U6;const LDe=oe("fieldset",{shouldForwardProp:xi})({textAlign:"left",position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden",minWidth:"0%"}),FDe=oe("legend",{shouldForwardProp:xi})(Je(({theme:e})=>({float:"unset",width:"auto",overflow:"hidden",variants:[{props:({ownerState:t})=>!t.withLabel,style:{padding:0,lineHeight:"11px",transition:e.transitions.create("width",{duration:150,easing:e.transitions.easing.easeOut})}},{props:({ownerState:t})=>t.withLabel,style:{display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:e.transitions.create("max-width",{duration:50,easing:e.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}}},{props:({ownerState:t})=>t.withLabel&&t.notched,style:{maxWidth:"100%",transition:e.transitions.create("max-width",{duration:100,easing:e.transitions.easing.easeOut,delay:50})}}]})));function jDe(e){const{children:t,classes:n,className:r,label:o,notched:i,...a}=e,s=o!=null&&o!=="",l={...e,notched:i,withLabel:s};return R.jsx(LDe,{"aria-hidden":!0,className:r,ownerState:l,...a,children:R.jsx(FDe,{ownerState:l,children:s?R.jsx("span",{children:o}):U6||(U6=R.jsx("span",{className:"notranslate",children:"​"}))})})}const BDe=e=>{const{classes:t}=e,r=rt({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},ske,t);return{...t,...r}},zDe=oe(nk,{shouldForwardProp:e=>xi(e)||e==="classes",name:"MuiOutlinedInput",slot:"Root",overridesResolver:ek})(Je(({theme:e})=>{const t=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{position:"relative",borderRadius:(e.vars||e).shape.borderRadius,[`&:hover .${Js.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${Js.notchedOutline}`]:{borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:t}},[`&.${Js.focused} .${Js.notchedOutline}`]:{borderWidth:2},variants:[...Object.entries(e.palette).filter(Kn()).map(([n])=>({props:{color:n},style:{[`&.${Js.focused} .${Js.notchedOutline}`]:{borderColor:(e.vars||e).palette[n].main}}})),{props:{},style:{[`&.${Js.error} .${Js.notchedOutline}`]:{borderColor:(e.vars||e).palette.error.main},[`&.${Js.disabled} .${Js.notchedOutline}`]:{borderColor:(e.vars||e).palette.action.disabled}}},{props:({ownerState:n})=>n.startAdornment,style:{paddingLeft:14}},{props:({ownerState:n})=>n.endAdornment,style:{paddingRight:14}},{props:({ownerState:n})=>n.multiline,style:{padding:"16.5px 14px"}},{props:({ownerState:n,size:r})=>n.multiline&&r==="small",style:{padding:"8.5px 14px"}}]}})),VDe=oe(jDe,{name:"MuiOutlinedInput",slot:"NotchedOutline",overridesResolver:(e,t)=>t.notchedOutline})(Je(({theme:e})=>{const t=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:t}})),HDe=oe(rk,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:tk})(Je(({theme:e})=>({padding:"16.5px 14px",...!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:e.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:e.palette.mode==="light"?null:"#fff",caretColor:e.palette.mode==="light"?null:"#fff",borderRadius:"inherit"}},...e.vars&&{"&:-webkit-autofill":{borderRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},variants:[{props:{size:"small"},style:{padding:"8.5px 14px"}},{props:({ownerState:t})=>t.multiline,style:{padding:0}},{props:({ownerState:t})=>t.startAdornment,style:{paddingLeft:0}},{props:({ownerState:t})=>t.endAdornment,style:{paddingRight:0}}]}))),rI=v.forwardRef(function(t,n){var r;const o=at({props:t,name:"MuiOutlinedInput"}),{components:i={},fullWidth:a=!1,inputComponent:s="input",label:l,multiline:c=!1,notched:u,slots:d={},type:f="text",...p}=o,h=BDe(o),m=Fa(),y=Cp({props:o,muiFormControl:m,states:["color","disabled","error","focused","hiddenLabel","size","required"]}),w={...o,color:y.color||"primary",disabled:y.disabled,error:y.error,focused:y.focused,formControl:m,fullWidth:a,hiddenLabel:y.hiddenLabel,multiline:c,size:y.size,type:f},x=d.root??i.Root??zDe,C=d.input??i.Input??HDe;return R.jsx(Pb,{slots:{root:x,input:C},renderSuffix:E=>R.jsx(VDe,{ownerState:w,className:h.notchedOutline,label:l!=null&&l!==""&&y.required?r||(r=R.jsxs(v.Fragment,{children:[l," ","*"]})):l,notched:typeof u<"u"?u:!!(E.startAdornment||E.filled||E.focused)}),fullWidth:a,inputComponent:s,multiline:c,ref:n,type:f,...p,classes:{...h,notchedOutline:null}})});rI&&(rI.muiName="Input");function UDe(e){return nt("MuiPagination",e)}it("MuiPagination",["root","ul","outlined","text"]);function WDe(e={}){const{boundaryCount:t=1,componentName:n="usePagination",count:r=1,defaultPage:o=1,disabled:i=!1,hideNextButton:a=!1,hidePrevButton:s=!1,onChange:l,page:c,showFirstButton:u=!1,showLastButton:d=!1,siblingCount:f=1,...p}=e,[h,m]=id({controlled:c,default:o,name:n,state:"page"}),y=(k,O)=>{c||m(O),l&&l(k,O)},w=(k,O)=>{const $=O-k+1;return Array.from({length:$},(N,L)=>k+L)},x=w(1,Math.min(t,r)),C=w(Math.max(r-t+1,t+1),r),E=Math.max(Math.min(h-f,r-t-f*2-1),t+2),P=Math.min(Math.max(h+f,t+f*2+2),r-t-1),T=[...u?["first"]:[],...s?[]:["previous"],...x,...E>t+2?["start-ellipsis"]:t+1t?[r-t]:[],...C,...a?[]:["next"],...d?["last"]:[]],I=k=>{switch(k){case"first":return 1;case"previous":return h-1;case"next":return h+1;case"last":return r;default:return null}};return{items:T.map(k=>typeof k=="number"?{onClick:O=>{y(O,k)},type:"page",page:k,selected:k===h,disabled:i,"aria-current":k===h?"true":void 0}:{onClick:O=>{y(O,I(k))},type:k,page:I(k),selected:!1,disabled:i||!k.includes("ellipsis")&&(k==="next"||k==="last"?h>=r:h<=1)}),...p}}function GDe(e){return nt("MuiPaginationItem",e)}const Gi=it("MuiPaginationItem",["root","page","sizeSmall","sizeLarge","text","textPrimary","textSecondary","outlined","outlinedPrimary","outlinedSecondary","rounded","ellipsis","firstLast","previousNext","focusVisible","disabled","selected","icon","colorPrimary","colorSecondary"]),Gne=ct(R.jsx("path",{d:"M18.41 16.59L13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z"}),"FirstPage"),qne=ct(R.jsx("path",{d:"M5.59 7.41L10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z"}),"LastPage"),qDe=ct(R.jsx("path",{d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"}),"NavigateBefore"),KDe=ct(R.jsx("path",{d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"NavigateNext"),Kne=(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`size${Ce(n.size)}`],n.variant==="text"&&t[`text${Ce(n.color)}`],n.variant==="outlined"&&t[`outlined${Ce(n.color)}`],n.shape==="rounded"&&t.rounded,n.type==="page"&&t.page,(n.type==="start-ellipsis"||n.type==="end-ellipsis")&&t.ellipsis,(n.type==="previous"||n.type==="next")&&t.previousNext,(n.type==="first"||n.type==="last")&&t.firstLast]},YDe=e=>{const{classes:t,color:n,disabled:r,selected:o,size:i,shape:a,type:s,variant:l}=e,c={root:["root",`size${Ce(i)}`,l,a,n!=="standard"&&`color${Ce(n)}`,n!=="standard"&&`${l}${Ce(n)}`,r&&"disabled",o&&"selected",{page:"page",first:"firstLast",last:"firstLast","start-ellipsis":"ellipsis","end-ellipsis":"ellipsis",previous:"previousNext",next:"previousNext"}[s]],icon:["icon"]};return rt(c,GDe,t)},QDe=oe("div",{name:"MuiPaginationItem",slot:"Root",overridesResolver:Kne})(Je(({theme:e})=>({...e.typography.body2,borderRadius:32/2,textAlign:"center",boxSizing:"border-box",minWidth:32,padding:"0 6px",margin:"0 3px",color:(e.vars||e).palette.text.primary,height:"auto",[`&.${Gi.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},variants:[{props:{size:"small"},style:{minWidth:26,borderRadius:26/2,margin:"0 1px",padding:"0 4px"}},{props:{size:"large"},style:{minWidth:40,borderRadius:40/2,padding:"0 10px",fontSize:e.typography.pxToRem(15)}}]}))),XDe=oe(la,{name:"MuiPaginationItem",slot:"Root",overridesResolver:Kne})(Je(({theme:e})=>({...e.typography.body2,borderRadius:32/2,textAlign:"center",boxSizing:"border-box",minWidth:32,height:32,padding:"0 6px",margin:"0 3px",color:(e.vars||e).palette.text.primary,[`&.${Gi.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${Gi.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},transition:e.transitions.create(["color","background-color"],{duration:e.transitions.duration.short}),"&:hover":{backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Gi.selected}`]:{backgroundColor:(e.vars||e).palette.action.selected,"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:xt(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:(e.vars||e).palette.action.selected}},[`&.${Gi.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:xt(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)},[`&.${Gi.disabled}`]:{opacity:1,color:(e.vars||e).palette.action.disabled,backgroundColor:(e.vars||e).palette.action.selected}},variants:[{props:{size:"small"},style:{minWidth:26,height:26,borderRadius:26/2,margin:"0 1px",padding:"0 4px"}},{props:{size:"large"},style:{minWidth:40,height:40,borderRadius:40/2,padding:"0 10px",fontSize:e.typography.pxToRem(15)}},{props:{shape:"rounded"},style:{borderRadius:(e.vars||e).shape.borderRadius}},{props:{variant:"outlined"},style:{border:e.vars?`1px solid rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:`1px solid ${e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"}`,[`&.${Gi.selected}`]:{[`&.${Gi.disabled}`]:{borderColor:(e.vars||e).palette.action.disabledBackground,color:(e.vars||e).palette.action.disabled}}}},{props:{variant:"text"},style:{[`&.${Gi.selected}`]:{[`&.${Gi.disabled}`]:{color:(e.vars||e).palette.action.disabled}}}},...Object.entries(e.palette).filter(Kn(["dark","contrastText"])).map(([t])=>({props:{variant:"text",color:t},style:{[`&.${Gi.selected}`]:{color:(e.vars||e).palette[t].contrastText,backgroundColor:(e.vars||e).palette[t].main,"&:hover":{backgroundColor:(e.vars||e).palette[t].dark,"@media (hover: none)":{backgroundColor:(e.vars||e).palette[t].main}},[`&.${Gi.focusVisible}`]:{backgroundColor:(e.vars||e).palette[t].dark},[`&.${Gi.disabled}`]:{color:(e.vars||e).palette.action.disabled}}}})),...Object.entries(e.palette).filter(Kn(["light"])).map(([t])=>({props:{variant:"outlined",color:t},style:{[`&.${Gi.selected}`]:{color:(e.vars||e).palette[t].main,border:`1px solid ${e.vars?`rgba(${e.vars.palette[t].mainChannel} / 0.5)`:xt(e.palette[t].main,.5)}`,backgroundColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / ${e.vars.palette.action.activatedOpacity})`:xt(e.palette[t].main,e.palette.action.activatedOpacity),"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / calc(${e.vars.palette.action.activatedOpacity} + ${e.vars.palette.action.focusOpacity}))`:xt(e.palette[t].main,e.palette.action.activatedOpacity+e.palette.action.focusOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Gi.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / calc(${e.vars.palette.action.activatedOpacity} + ${e.vars.palette.action.focusOpacity}))`:xt(e.palette[t].main,e.palette.action.activatedOpacity+e.palette.action.focusOpacity)}}}}))]}))),JDe=oe("div",{name:"MuiPaginationItem",slot:"Icon",overridesResolver:(e,t)=>t.icon})(Je(({theme:e})=>({fontSize:e.typography.pxToRem(20),margin:"0 -8px",variants:[{props:{size:"small"},style:{fontSize:e.typography.pxToRem(18)}},{props:{size:"large"},style:{fontSize:e.typography.pxToRem(22)}}]}))),ZDe=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiPaginationItem"}),{className:o,color:i="standard",component:a,components:s={},disabled:l=!1,page:c,selected:u=!1,shape:d="circular",size:f="medium",slots:p={},slotProps:h={},type:m="page",variant:y="text",...w}=r,x={...r,color:i,disabled:l,selected:u,shape:d,size:f,type:m,variant:y},C=dr(),E=YDe(x),P={slots:{previous:p.previous??s.previous,next:p.next??s.next,first:p.first??s.first,last:p.last??s.last},slotProps:h},[T,I]=Cr("previous",{elementType:qDe,externalForwardedProps:P,ownerState:x}),[A,k]=Cr("next",{elementType:KDe,externalForwardedProps:P,ownerState:x}),[O,$]=Cr("first",{elementType:Gne,externalForwardedProps:P,ownerState:x}),[N,L]=Cr("last",{elementType:qne,externalForwardedProps:P,ownerState:x}),j=C?{previous:"next",next:"previous",first:"last",last:"first"}[m]:m,D={previous:T,next:A,first:O,last:N}[j],_={previous:I,next:k,first:$,last:L}[j];return m==="start-ellipsis"||m==="end-ellipsis"?R.jsx(QDe,{ref:n,ownerState:x,className:de(E.root,o),children:"…"}):R.jsxs(XDe,{ref:n,ownerState:x,component:a,disabled:l,className:de(E.root,o),...w,children:[m==="page"&&c,D?R.jsx(JDe,{..._,className:E.icon,as:D}):null]})}),e_e=e=>{const{classes:t,variant:n}=e;return rt({root:["root",n],ul:["ul"]},UDe,t)},t_e=oe("nav",{name:"MuiPagination",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant]]}})({}),n_e=oe("ul",{name:"MuiPagination",slot:"Ul",overridesResolver:(e,t)=>t.ul})({display:"flex",flexWrap:"wrap",alignItems:"center",padding:0,margin:0,listStyle:"none"});function r_e(e,t,n){return e==="page"?`${n?"":"Go to "}page ${t}`:`Go to ${e} page`}const o_e=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiPagination"}),{boundaryCount:o=1,className:i,color:a="standard",count:s=1,defaultPage:l=1,disabled:c=!1,getItemAriaLabel:u=r_e,hideNextButton:d=!1,hidePrevButton:f=!1,onChange:p,page:h,renderItem:m=O=>R.jsx(ZDe,{...O}),shape:y="circular",showFirstButton:w=!1,showLastButton:x=!1,siblingCount:C=1,size:E="medium",variant:P="text",...T}=r,{items:I}=WDe({...r,componentName:"Pagination"}),A={...r,boundaryCount:o,color:a,count:s,defaultPage:l,disabled:c,getItemAriaLabel:u,hideNextButton:d,hidePrevButton:f,renderItem:m,shape:y,showFirstButton:w,showLastButton:x,siblingCount:C,size:E,variant:P},k=e_e(A);return R.jsx(t_e,{"aria-label":"pagination navigation",className:de(k.root,i),ownerState:A,ref:n,...T,children:R.jsx(n_e,{className:k.ul,ownerState:A,children:I.map((O,$)=>R.jsx("li",{children:m({...O,color:a,"aria-label":u(O.type,O.page,O.selected),shape:y,size:E,variant:P})},$))})})});function i_e(e){return nt("MuiSelect",e)}const J0=it("MuiSelect",["root","select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]);var W6;const a_e=oe(Une,{name:"MuiSelect",slot:"Select",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`&.${J0.select}`]:t.select},{[`&.${J0.select}`]:t[n.variant]},{[`&.${J0.error}`]:t.error},{[`&.${J0.multiple}`]:t.multiple}]}})({[`&.${J0.select}`]:{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}),s_e=oe(Wne,{name:"MuiSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${Ce(n.variant)}`],n.open&&t.iconOpen]}})({}),l_e=oe("input",{shouldForwardProp:e=>JZ(e)&&e!=="classes",name:"MuiSelect",slot:"NativeInput",overridesResolver:(e,t)=>t.nativeInput})({bottom:0,left:0,position:"absolute",opacity:0,pointerEvents:"none",width:"100%",boxSizing:"border-box"});function G6(e,t){return typeof t=="object"&&t!==null?e===t:String(e)===String(t)}function c_e(e){return e==null||typeof e=="string"&&!e.trim()}const u_e=e=>{const{classes:t,variant:n,disabled:r,multiple:o,open:i,error:a}=e,s={select:["select",n,r&&"disabled",o&&"multiple",a&&"error"],icon:["icon",`icon${Ce(n)}`,i&&"iconOpen",r&&"disabled"],nativeInput:["nativeInput"]};return rt(s,i_e,t)},d_e=v.forwardRef(function(t,n){var On;const{"aria-describedby":r,"aria-label":o,autoFocus:i,autoWidth:a,children:s,className:l,defaultOpen:c,defaultValue:u,disabled:d,displayEmpty:f,error:p=!1,IconComponent:h,inputRef:m,labelId:y,MenuProps:w={},multiple:x,name:C,onBlur:E,onChange:P,onClose:T,onFocus:I,onOpen:A,open:k,readOnly:O,renderValue:$,SelectDisplayProps:N={},tabIndex:L,type:j,value:D,variant:_="standard",...z}=t,[F,V]=id({controlled:D,default:u,name:"Select"}),[U,q]=id({controlled:k,default:c,name:"Select"}),X=v.useRef(null),ie=v.useRef(null),[ee,Q]=v.useState(null),{current:te}=v.useRef(k!=null),[pe,ae]=v.useState(),se=Rr(n,m),re=v.useCallback(Ke=>{ie.current=Ke,Ke&&Q(Ke)},[]),fe=ee==null?void 0:ee.parentNode;v.useImperativeHandle(se,()=>({focus:()=>{ie.current.focus()},node:X.current,value:F}),[F]),v.useEffect(()=>{c&&U&&ee&&!te&&(ae(a?null:fe.clientWidth),ie.current.focus())},[ee,a]),v.useEffect(()=>{i&&ie.current.focus()},[i]),v.useEffect(()=>{if(!y)return;const Ke=yi(ie.current).getElementById(y);if(Ke){const $e=()=>{getSelection().isCollapsed&&ie.current.focus()};return Ke.addEventListener("click",$e),()=>{Ke.removeEventListener("click",$e)}}},[y]);const Z=(Ke,$e)=>{Ke?A&&A($e):T&&T($e),te||(ae(a?null:fe.clientWidth),q(Ke))},ce=Ke=>{Ke.button===0&&(Ke.preventDefault(),ie.current.focus(),Z(!0,Ke))},ge=Ke=>{Z(!1,Ke)},we=v.Children.toArray(s),me=Ke=>{const $e=we.find(Qe=>Qe.props.value===Ke.target.value);$e!==void 0&&(V($e.props.value),P&&P(Ke,$e))},Se=Ke=>$e=>{let Qe;if($e.currentTarget.hasAttribute("tabindex")){if(x){Qe=Array.isArray(F)?F.slice():[];const Et=F.indexOf(Ke.props.value);Et===-1?Qe.push(Ke.props.value):Qe.splice(Et,1)}else Qe=Ke.props.value;if(Ke.props.onClick&&Ke.props.onClick($e),F!==Qe&&(V(Qe),P)){const Et=$e.nativeEvent||$e,Xt=new Et.constructor(Et.type,Et);Object.defineProperty(Xt,"target",{writable:!0,value:{value:Qe,name:C}}),P(Xt,Ke)}x||Z(!1,$e)}},xe=Ke=>{O||[" ","ArrowUp","ArrowDown","Enter"].includes(Ke.key)&&(Ke.preventDefault(),Z(!0,Ke))},ke=ee!==null&&U,De=Ke=>{!ke&&E&&(Object.defineProperty(Ke,"target",{writable:!0,value:{value:F,name:C}}),E(Ke))};delete z["aria-invalid"];let _e,ye;const Pe=[];let Ae=!1;(ZT({value:F})||f)&&($?_e=$(F):Ae=!0);const Me=we.map(Ke=>{if(!v.isValidElement(Ke))return null;let $e;if(x){if(!Array.isArray(F))throw new Error(vd(2));$e=F.some(Qe=>G6(Qe,Ke.props.value)),$e&&Ae&&Pe.push(Ke.props.children)}else $e=G6(F,Ke.props.value),$e&&Ae&&(ye=Ke.props.children);return v.cloneElement(Ke,{"aria-selected":$e?"true":"false",onClick:Se(Ke),onKeyUp:Qe=>{Qe.key===" "&&Qe.preventDefault(),Ke.props.onKeyUp&&Ke.props.onKeyUp(Qe)},role:"option",selected:$e,value:void 0,"data-value":Ke.props.value})});Ae&&(x?Pe.length===0?_e=null:_e=Pe.reduce((Ke,$e,Qe)=>(Ke.push($e),Qe{const{classes:t}=e;return t},tz={name:"MuiSelect",overridesResolver:(e,t)=>t.root,shouldForwardProp:e=>xi(e)&&e!=="variant",slot:"Root"},p_e=oe(nI,tz)(""),h_e=oe(rI,tz)(""),g_e=oe(tI,tz)(""),Pp=v.forwardRef(function(t,n){const r=at({name:"MuiSelect",props:t}),{autoWidth:o=!1,children:i,classes:a={},className:s,defaultOpen:l=!1,displayEmpty:c=!1,IconComponent:u=One,id:d,input:f,inputProps:p,label:h,labelId:m,MenuProps:y,multiple:w=!1,native:x=!1,onClose:C,onOpen:E,open:P,renderValue:T,SelectDisplayProps:I,variant:A="outlined",...k}=r,O=x?NDe:d_e,$=Fa(),N=Cp({props:r,muiFormControl:$,states:["variant","error"]}),L=N.variant||A,j={...r,variant:L,classes:a},D=f_e(j),{root:_,...z}=D,F=f||{standard:R.jsx(p_e,{ownerState:j}),outlined:R.jsx(h_e,{label:h,ownerState:j}),filled:R.jsx(g_e,{ownerState:j})}[L],V=Rr(n,mp(F));return R.jsx(v.Fragment,{children:v.cloneElement(F,{inputComponent:O,inputProps:{children:i,error:N.error,IconComponent:u,variant:L,type:void 0,multiple:w,...x?{id:d}:{autoWidth:o,defaultOpen:l,displayEmpty:c,labelId:m,MenuProps:y,onClose:C,onOpen:E,open:P,renderValue:T,SelectDisplayProps:{id:d,...I}},...p,classes:p?Oo(z,p.classes):z,...f?f.props.inputProps:{}},...(w&&x||c)&&L==="outlined"?{notched:!0}:{},ref:V,className:de(F.props.className,s,D.root),...!f&&{variant:L},...k})})});Pp.muiName="Select";function m_e(e){return nt("MuiSkeleton",e)}it("MuiSkeleton",["root","text","rectangular","rounded","circular","pulse","wave","withChildren","fitContent","heightAuto"]);const y_e=e=>{const{classes:t,variant:n,animation:r,hasChildren:o,width:i,height:a}=e;return rt({root:["root",n,r,o&&"withChildren",o&&!i&&"fitContent",o&&!a&&"heightAuto"]},m_e,t)},hN=xu` +`,fDe=typeof bN!="string"?vp` + animation: ${bN} 3s infinite linear; + `:null,pDe=e=>{const{classes:t,variant:n,color:r}=e,o={root:["root",`color${Ce(r)}`,n],dashed:["dashed",`dashedColor${Ce(r)}`],bar1:["bar",`barColor${Ce(r)}`,(n==="indeterminate"||n==="query")&&"bar1Indeterminate",n==="determinate"&&"bar1Determinate",n==="buffer"&&"bar1Buffer"],bar2:["bar",n!=="buffer"&&`barColor${Ce(r)}`,n==="buffer"&&`color${Ce(r)}`,(n==="indeterminate"||n==="query")&&"bar2Indeterminate",n==="buffer"&&"bar2Buffer"]};return rt(o,cDe,t)},nz=(e,t)=>e.vars?e.vars.palette.LinearProgress[`${t}Bg`]:e.palette.mode==="light"?xd(e.palette[t].main,.62):wd(e.palette[t].main,.5),hDe=re("span",{name:"MuiLinearProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`color${Ce(n.color)}`],t[n.variant]]}})(Je(({theme:e})=>({position:"relative",overflow:"hidden",display:"block",height:4,zIndex:0,"@media print":{colorAdjust:"exact"},variants:[...Object.entries(e.palette).filter(Kn()).map(([t])=>({props:{color:t},style:{backgroundColor:nz(e,t)}})),{props:({ownerState:t})=>t.color==="inherit"&&t.variant!=="buffer",style:{"&::before":{content:'""',position:"absolute",left:0,top:0,right:0,bottom:0,backgroundColor:"currentColor",opacity:.3}}},{props:{variant:"buffer"},style:{backgroundColor:"transparent"}},{props:{variant:"query"},style:{transform:"rotate(180deg)"}}]}))),gDe=re("span",{name:"MuiLinearProgress",slot:"Dashed",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.dashed,t[`dashedColor${Ce(n.color)}`]]}})(Je(({theme:e})=>({position:"absolute",marginTop:0,height:"100%",width:"100%",backgroundSize:"10px 10px",backgroundPosition:"0 -23px",variants:[{props:{color:"inherit"},style:{opacity:.3,backgroundImage:"radial-gradient(currentColor 0%, currentColor 16%, transparent 42%)"}},...Object.entries(e.palette).filter(Kn()).map(([t])=>{const n=nz(e,t);return{props:{color:t},style:{backgroundImage:`radial-gradient(${n} 0%, ${n} 16%, transparent 42%)`}}})]})),fDe||{animation:`${bN} 3s infinite linear`}),mDe=re("span",{name:"MuiLinearProgress",slot:"Bar1",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.bar,t[`barColor${Ce(n.color)}`],(n.variant==="indeterminate"||n.variant==="query")&&t.bar1Indeterminate,n.variant==="determinate"&&t.bar1Determinate,n.variant==="buffer"&&t.bar1Buffer]}})(Je(({theme:e})=>({width:"100%",position:"absolute",left:0,bottom:0,top:0,transition:"transform 0.2s linear",transformOrigin:"left",variants:[{props:{color:"inherit"},style:{backgroundColor:"currentColor"}},...Object.entries(e.palette).filter(Kn()).map(([t])=>({props:{color:t},style:{backgroundColor:(e.vars||e).palette[t].main}})),{props:{variant:"determinate"},style:{transition:`transform .${mN}s linear`}},{props:{variant:"buffer"},style:{zIndex:1,transition:`transform .${mN}s linear`}},{props:({ownerState:t})=>t.variant==="indeterminate"||t.variant==="query",style:{width:"auto"}},{props:({ownerState:t})=>t.variant==="indeterminate"||t.variant==="query",style:uDe||{animation:`${yN} 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite`}}]}))),yDe=re("span",{name:"MuiLinearProgress",slot:"Bar2",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.bar,t[`barColor${Ce(n.color)}`],(n.variant==="indeterminate"||n.variant==="query")&&t.bar2Indeterminate,n.variant==="buffer"&&t.bar2Buffer]}})(Je(({theme:e})=>({width:"100%",position:"absolute",left:0,bottom:0,top:0,transition:"transform 0.2s linear",transformOrigin:"left",variants:[...Object.entries(e.palette).filter(Kn()).map(([t])=>({props:{color:t},style:{"--LinearProgressBar2-barColor":(e.vars||e).palette[t].main}})),{props:({ownerState:t})=>t.variant!=="buffer"&&t.color!=="inherit",style:{backgroundColor:"var(--LinearProgressBar2-barColor, currentColor)"}},{props:({ownerState:t})=>t.variant!=="buffer"&&t.color==="inherit",style:{backgroundColor:"currentColor"}},{props:{color:"inherit"},style:{opacity:.3}},...Object.entries(e.palette).filter(Kn()).map(([t])=>({props:{color:t,variant:"buffer"},style:{backgroundColor:nz(e,t),transition:`transform .${mN}s linear`}})),{props:({ownerState:t})=>t.variant==="indeterminate"||t.variant==="query",style:{width:"auto"}},{props:({ownerState:t})=>t.variant==="indeterminate"||t.variant==="query",style:dDe||{animation:`${vN} 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) 1.15s infinite`}}]}))),Gne=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiLinearProgress"}),{className:o,color:i="primary",value:a,valueBuffer:s,variant:l="indeterminate",...c}=r,u={...r,color:i,variant:l},d=pDe(u),f=dr(),p={},h={bar1:{},bar2:{}};if((l==="determinate"||l==="buffer")&&a!==void 0){p["aria-valuenow"]=Math.round(a),p["aria-valuemin"]=0,p["aria-valuemax"]=100;let m=a-100;f&&(m=-m),h.bar1.transform=`translateX(${m}%)`}if(l==="buffer"&&s!==void 0){let m=(s||0)-100;f&&(m=-m),h.bar2.transform=`translateX(${m}%)`}return R.jsxs(hDe,{className:de(d.root,o),ownerState:u,role:"progressbar",...p,ref:n,...c,children:[l==="buffer"?R.jsx(gDe,{className:d.dashed,ownerState:u}):null,R.jsx(mDe,{className:d.bar1,ownerState:u,style:h.bar1}),l==="determinate"?null:R.jsx(yDe,{className:d.bar2,ownerState:u,style:h.bar2})]})}),Cl=v.createContext({});function vDe(e){return nt("MuiList",e)}it("MuiList",["root","padding","dense","subheader"]);const bDe=e=>{const{classes:t,disablePadding:n,dense:r,subheader:o}=e;return rt({root:["root",!n&&"padding",r&&"dense",o&&"subheader"]},vDe,t)},wDe=re("ul",{name:"MuiList",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disablePadding&&t.padding,n.dense&&t.dense,n.subheader&&t.subheader]}})({listStyle:"none",margin:0,padding:0,position:"relative",variants:[{props:({ownerState:e})=>!e.disablePadding,style:{paddingTop:8,paddingBottom:8}},{props:({ownerState:e})=>e.subheader,style:{paddingTop:0}}]}),Bl=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiList"}),{children:o,className:i,component:a="ul",dense:s=!1,disablePadding:l=!1,subheader:c,...u}=r,d=v.useMemo(()=>({dense:s}),[s]),f={...r,component:a,dense:s,disablePadding:l},p=bDe(f);return R.jsx(Cl.Provider,{value:d,children:R.jsxs(wDe,{as:a,className:de(p.root,i),ref:n,ownerState:f,...u,children:[c,o]})})});function xDe(e){return nt("MuiListItem",e)}it("MuiListItem",["root","container","dense","alignItemsFlexStart","divider","gutters","padding","secondaryAction"]);function SDe(e){return nt("MuiListItemButton",e)}const Xm=it("MuiListItemButton",["root","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","selected"]),CDe=(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.alignItems==="flex-start"&&t.alignItemsFlexStart,n.divider&&t.divider,!n.disableGutters&&t.gutters]},EDe=e=>{const{alignItems:t,classes:n,dense:r,disabled:o,disableGutters:i,divider:a,selected:s}=e,c=rt({root:["root",r&&"dense",!i&&"gutters",a&&"divider",o&&"disabled",t==="flex-start"&&"alignItemsFlexStart",s&&"selected"]},SDe,n);return{...n,...c}},PDe=re(ca,{shouldForwardProp:e=>ai(e)||e==="classes",name:"MuiListItemButton",slot:"Root",overridesResolver:CDe})(Je(({theme:e})=>({display:"flex",flexGrow:1,justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minWidth:0,boxSizing:"border-box",textAlign:"left",paddingTop:8,paddingBottom:8,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Xm.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:St(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${Xm.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:St(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${Xm.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:St(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:St(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${Xm.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${Xm.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},variants:[{props:({ownerState:t})=>t.divider,style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"}},{props:{alignItems:"flex-start"},style:{alignItems:"flex-start"}},{props:({ownerState:t})=>!t.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:t})=>t.dense,style:{paddingTop:4,paddingBottom:4}}]}))),Ip=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiListItemButton"}),{alignItems:o="center",autoFocus:i=!1,component:a="div",children:s,dense:l=!1,disableGutters:c=!1,divider:u=!1,focusVisibleClassName:d,selected:f=!1,className:p,...h}=r,m=v.useContext(Cl),y=v.useMemo(()=>({dense:l||m.dense||!1,alignItems:o,disableGutters:c}),[o,m.dense,l,c]),w=v.useRef(null);Cs(()=>{i&&w.current&&w.current.focus()},[i]);const x={...r,alignItems:o,dense:y.dense,disableGutters:c,divider:u,selected:f},S=EDe(x),E=Rr(w,n);return R.jsx(Cl.Provider,{value:y,children:R.jsx(PDe,{ref:E,href:h.href||h.to,component:(h.href||h.to)&&a==="div"?"button":a,focusVisibleClassName:de(S.focusVisible,d),ownerState:x,className:de(S.root,p),...h,classes:S,children:s})})});function TDe(e){return nt("MuiListItemSecondaryAction",e)}it("MuiListItemSecondaryAction",["root","disableGutters"]);const IDe=e=>{const{disableGutters:t,classes:n}=e;return rt({root:["root",t&&"disableGutters"]},TDe,n)},ODe=re("div",{name:"MuiListItemSecondaryAction",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.disableGutters&&t.disableGutters]}})({position:"absolute",right:16,top:"50%",transform:"translateY(-50%)",variants:[{props:({ownerState:e})=>e.disableGutters,style:{right:0}}]}),qne=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiListItemSecondaryAction"}),{className:o,...i}=r,a=v.useContext(Cl),s={...r,disableGutters:a.disableGutters},l=IDe(s);return R.jsx(ODe,{className:de(l.root,o),ownerState:s,ref:n,...i})});qne.muiName="ListItemSecondaryAction";const ADe=(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.alignItems==="flex-start"&&t.alignItemsFlexStart,n.divider&&t.divider,!n.disableGutters&&t.gutters,!n.disablePadding&&t.padding,n.hasSecondaryAction&&t.secondaryAction]},kDe=e=>{const{alignItems:t,classes:n,dense:r,disableGutters:o,disablePadding:i,divider:a,hasSecondaryAction:s}=e;return rt({root:["root",r&&"dense",!o&&"gutters",!i&&"padding",a&&"divider",t==="flex-start"&&"alignItemsFlexStart",s&&"secondaryAction"],container:["container"]},xDe,n)},MDe=re("div",{name:"MuiListItem",slot:"Root",overridesResolver:ADe})(Je(({theme:e})=>({display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",width:"100%",boxSizing:"border-box",textAlign:"left",variants:[{props:({ownerState:t})=>!t.disablePadding,style:{paddingTop:8,paddingBottom:8}},{props:({ownerState:t})=>!t.disablePadding&&t.dense,style:{paddingTop:4,paddingBottom:4}},{props:({ownerState:t})=>!t.disablePadding&&!t.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:t})=>!t.disablePadding&&!!t.secondaryAction,style:{paddingRight:48}},{props:({ownerState:t})=>!!t.secondaryAction,style:{[`& > .${Xm.root}`]:{paddingRight:48}}},{props:{alignItems:"flex-start"},style:{alignItems:"flex-start"}},{props:({ownerState:t})=>t.divider,style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"}},{props:({ownerState:t})=>t.button,style:{transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}}}},{props:({ownerState:t})=>t.hasSecondaryAction,style:{paddingRight:48}}]}))),RDe=re("li",{name:"MuiListItem",slot:"Container",overridesResolver:(e,t)=>t.container})({position:"relative"}),Os=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiListItem"}),{alignItems:o="center",children:i,className:a,component:s,components:l={},componentsProps:c={},ContainerComponent:u="li",ContainerProps:{className:d,...f}={},dense:p=!1,disableGutters:h=!1,disablePadding:m=!1,divider:y=!1,secondaryAction:w,slotProps:x={},slots:S={},...E}=r,P=v.useContext(Cl),T=v.useMemo(()=>({dense:p||P.dense||!1,alignItems:o,disableGutters:h}),[o,P.dense,p,h]),I=v.useRef(null),A=v.Children.toArray(i),k=A.length&&Ry(A[A.length-1],["ListItemSecondaryAction"]),O={...r,alignItems:o,dense:T.dense,disableGutters:h,disablePadding:m,divider:y,hasSecondaryAction:k},$=kDe(O),N=Rr(I,n),L=S.root||l.Root||MDe,j=x.root||c.root||{},D={className:de($.root,j.className,a),...E};let _=s||"li";return k?(_=!D.component&&!s?"div":_,u==="li"&&(_==="li"?_="div":D.component==="li"&&(D.component="div")),R.jsx(Cl.Provider,{value:T,children:R.jsxs(RDe,{as:u,className:de($.container,d),ref:N,ownerState:O,...f,children:[R.jsx(L,{...j,...!Iv(L)&&{as:_,ownerState:{...O,...j.ownerState}},...D,children:A}),A.pop()]})})):R.jsx(Cl.Provider,{value:T,children:R.jsxs(L,{...j,as:_,ref:N,...!Iv(L)&&{ownerState:{...O,...j.ownerState}},...D,children:[A,w&&R.jsx(qne,{children:w})]})})});function $De(e){return nt("MuiListItemAvatar",e)}it("MuiListItemAvatar",["root","alignItemsFlexStart"]);const DDe=e=>{const{alignItems:t,classes:n}=e;return rt({root:["root",t==="flex-start"&&"alignItemsFlexStart"]},$De,n)},_De=re("div",{name:"MuiListItemAvatar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.alignItems==="flex-start"&&t.alignItemsFlexStart]}})({minWidth:56,flexShrink:0,variants:[{props:{alignItems:"flex-start"},style:{marginTop:8}}]}),rz=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiListItemAvatar"}),{className:o,...i}=r,a=v.useContext(Cl),s={...r,alignItems:a.alignItems},l=DDe(s);return R.jsx(_De,{className:de(l.root,o),ownerState:s,ref:n,...i})});function NDe(e){return nt("MuiListItemIcon",e)}const U6=it("MuiListItemIcon",["root","alignItemsFlexStart"]),LDe=e=>{const{alignItems:t,classes:n}=e;return rt({root:["root",t==="flex-start"&&"alignItemsFlexStart"]},NDe,n)},FDe=re("div",{name:"MuiListItemIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.alignItems==="flex-start"&&t.alignItemsFlexStart]}})(Je(({theme:e})=>({minWidth:56,color:(e.vars||e).palette.action.active,flexShrink:0,display:"inline-flex",variants:[{props:{alignItems:"flex-start"},style:{marginTop:8}}]}))),sa=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiListItemIcon"}),{className:o,...i}=r,a=v.useContext(Cl),s={...r,alignItems:a.alignItems},l=LDe(s);return R.jsx(FDe,{className:de(l.root,o),ownerState:s,ref:n,...i})});function jDe(e){return nt("MuiListItemText",e)}const vy=it("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]),BDe=e=>{const{classes:t,inset:n,primary:r,secondary:o,dense:i}=e;return rt({root:["root",n&&"inset",i&&"dense",r&&o&&"multiline"],primary:["primary"],secondary:["secondary"]},jDe,t)},zDe=re("div",{name:"MuiListItemText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${vy.primary}`]:t.primary},{[`& .${vy.secondary}`]:t.secondary},t.root,n.inset&&t.inset,n.primary&&n.secondary&&t.multiline,n.dense&&t.dense]}})({flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4,[`.${lI.root}:where(& .${vy.primary})`]:{display:"block"},[`.${lI.root}:where(& .${vy.secondary})`]:{display:"block"},variants:[{props:({ownerState:e})=>e.primary&&e.secondary,style:{marginTop:6,marginBottom:6}},{props:({ownerState:e})=>e.inset,style:{paddingLeft:56}}]}),ko=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiListItemText"}),{children:o,className:i,disableTypography:a=!1,inset:s=!1,primary:l,primaryTypographyProps:c,secondary:u,secondaryTypographyProps:d,...f}=r,{dense:p}=v.useContext(Cl);let h=l??o,m=u;const y={...r,disableTypography:a,inset:s,primary:!!h,secondary:!!m,dense:p},w=BDe(y);return h!=null&&h.type!==ot&&!a&&(h=R.jsx(ot,{variant:p?"body2":"body1",className:w.primary,component:c!=null&&c.variant?void 0:"span",...c,children:h})),m!=null&&m.type!==ot&&!a&&(m=R.jsx(ot,{variant:"body2",className:w.secondary,color:"textSecondary",...d,children:m})),R.jsxs(zDe,{className:de(w.root,i),ownerState:y,ref:n,...f,children:[h,m]})});function dD(e,t,n){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:n?null:e.firstChild}function W6(e,t,n){return e===t?n?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:n?null:e.lastChild}function Kne(e,t){if(t===void 0)return!0;let n=e.innerText;return n===void 0&&(n=e.textContent),n=n.trim().toLowerCase(),n.length===0?!1:t.repeating?n[0]===t.keys[0]:n.startsWith(t.keys.join(""))}function tw(e,t,n,r,o,i){let a=!1,s=o(e,t,t?n:!1);for(;s;){if(s===e.firstChild){if(a)return!1;a=!0}const l=r?!1:s.disabled||s.getAttribute("aria-disabled")==="true";if(!s.hasAttribute("tabindex")||!Kne(s,i)||l)s=o(e,s,n);else return s.focus(),!0}return!1}const UC=v.forwardRef(function(t,n){const{actions:r,autoFocus:o=!1,autoFocusItem:i=!1,children:a,className:s,disabledItemsFocusable:l=!1,disableListWrap:c=!1,onKeyDown:u,variant:d="selectedMenu",...f}=t,p=v.useRef(null),h=v.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});Cs(()=>{o&&p.current.focus()},[o]),v.useImperativeHandle(r,()=>({adjustStyleForScrollbar:(S,{direction:E})=>{const P=!p.current.style.width;if(S.clientHeight{const E=p.current,P=S.key;if(S.ctrlKey||S.metaKey||S.altKey){u&&u(S);return}const I=bi(E).activeElement;if(P==="ArrowDown")S.preventDefault(),tw(E,I,c,l,dD);else if(P==="ArrowUp")S.preventDefault(),tw(E,I,c,l,W6);else if(P==="Home")S.preventDefault(),tw(E,null,c,l,dD);else if(P==="End")S.preventDefault(),tw(E,null,c,l,W6);else if(P.length===1){const A=h.current,k=P.toLowerCase(),O=performance.now();A.keys.length>0&&(O-A.lastTime>500?(A.keys=[],A.repeating=!0,A.previousKeyMatched=!0):A.repeating&&k!==A.keys[0]&&(A.repeating=!1)),A.lastTime=O,A.keys.push(k);const $=I&&!A.repeating&&Kne(I,A);A.previousKeyMatched&&($||tw(E,I,!1,l,dD,A))?S.preventDefault():A.previousKeyMatched=!1}u&&u(S)},y=Rr(p,n);let w=-1;v.Children.forEach(a,(S,E)=>{if(!v.isValidElement(S)){w===E&&(w+=1,w>=a.length&&(w=-1));return}S.props.disabled||(d==="selectedMenu"&&S.props.selected||w===-1)&&(w=E),w===E&&(S.props.disabled||S.props.muiSkipListHighlight||S.type.muiSkipListHighlight)&&(w+=1,w>=a.length&&(w=-1))});const x=v.Children.map(a,(S,E)=>{if(E===w){const P={};return i&&(P.autoFocus=!0),S.props.tabIndex===void 0&&d==="selectedMenu"&&(P.tabIndex=0),v.cloneElement(S,P)}return S});return R.jsx(Bl,{role:"menu",ref:y,className:s,onKeyDown:m,tabIndex:o?0:-1,...f,children:x})});function VDe(e){return nt("MuiPopover",e)}it("MuiPopover",["root","paper"]);function G6(e,t){let n=0;return typeof t=="number"?n=t:t==="center"?n=e.height/2:t==="bottom"&&(n=e.height),n}function q6(e,t){let n=0;return typeof t=="number"?n=t:t==="center"?n=e.width/2:t==="right"&&(n=e.width),n}function K6(e){return[e.horizontal,e.vertical].map(t=>typeof t=="number"?`${t}px`:t).join(" ")}function fD(e){return typeof e=="function"?e():e}const HDe=e=>{const{classes:t}=e;return rt({root:["root"],paper:["paper"]},VDe,t)},UDe=re(Ab,{name:"MuiPopover",slot:"Root",overridesResolver:(e,t)=>t.root})({}),Yne=re(ro,{name:"MuiPopover",slot:"Paper",overridesResolver:(e,t)=>t.paper})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),WDe=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiPopover"}),{action:o,anchorEl:i,anchorOrigin:a={vertical:"top",horizontal:"left"},anchorPosition:s,anchorReference:l="anchorEl",children:c,className:u,container:d,elevation:f=8,marginThreshold:p=16,open:h,PaperProps:m={},slots:y={},slotProps:w={},transformOrigin:x={vertical:"top",horizontal:"left"},TransitionComponent:S=cp,transitionDuration:E="auto",TransitionProps:{onEntering:P,...T}={},disableScrollLock:I=!1,...A}=r,k=(w==null?void 0:w.paper)??m,O=v.useRef(),$={...r,anchorOrigin:a,anchorReference:l,elevation:f,marginThreshold:p,externalPaperSlotProps:k,transformOrigin:x,TransitionComponent:S,transitionDuration:E,TransitionProps:T},N=HDe($),L=v.useCallback(()=>{if(l==="anchorPosition")return s;const oe=fD(i),Z=(oe&&oe.nodeType===1?oe:bi(O.current).body).getBoundingClientRect();return{top:Z.top+G6(Z,a.vertical),left:Z.left+q6(Z,a.horizontal)}},[i,a.horizontal,a.vertical,s,l]),j=v.useCallback(oe=>({vertical:G6(oe,x.vertical),horizontal:q6(oe,x.horizontal)}),[x.horizontal,x.vertical]),D=v.useCallback(oe=>{const fe={width:oe.offsetWidth,height:oe.offsetHeight},Z=j(fe);if(l==="none")return{top:null,left:null,transformOrigin:K6(Z)};const ce=L();let ge=ce.top-Z.vertical,we=ce.left-Z.horizontal;const me=ge+fe.height,Se=we+fe.width,xe=Es(fD(i)),ke=xe.innerHeight-p,De=xe.innerWidth-p;if(p!==null&&geke){const _e=me-ke;ge-=_e,Z.vertical+=_e}if(p!==null&&weDe){const _e=Se-De;we-=_e,Z.horizontal+=_e}return{top:`${Math.round(ge)}px`,left:`${Math.round(we)}px`,transformOrigin:K6(Z)}},[i,l,L,j,p]),[_,z]=v.useState(h),F=v.useCallback(()=>{const oe=O.current;if(!oe)return;const fe=D(oe);fe.top!==null&&oe.style.setProperty("top",fe.top),fe.left!==null&&(oe.style.left=fe.left),oe.style.transformOrigin=fe.transformOrigin,z(!0)},[D]);v.useEffect(()=>(I&&window.addEventListener("scroll",F),()=>window.removeEventListener("scroll",F)),[i,I,F]);const V=(oe,fe)=>{P&&P(oe,fe),F()},U=()=>{z(!1)};v.useEffect(()=>{h&&F()}),v.useImperativeHandle(o,()=>h?{updatePosition:()=>{F()}}:null,[h,F]),v.useEffect(()=>{if(!h)return;const oe=MC(()=>{F()}),fe=Es(i);return fe.addEventListener("resize",oe),()=>{oe.clear(),fe.removeEventListener("resize",oe)}},[i,h,F]);let K=E;E==="auto"&&!S.muiSupportAuto&&(K=void 0);const X=d||(i?bi(fD(i)).body:void 0),ie={slots:y,slotProps:{...w,paper:k}},[ee,Q]=Cr("paper",{elementType:Yne,externalForwardedProps:ie,additionalProps:{elevation:f,className:de(N.paper,k==null?void 0:k.className),style:_?k.style:{...k.style,opacity:0}},ownerState:$}),[te,{slotProps:pe,...ae}]=Cr("root",{elementType:UDe,externalForwardedProps:ie,additionalProps:{slotProps:{backdrop:{invisible:!0}},container:X,open:h},ownerState:$,className:de(N.root,u)}),se=Rr(O,Q.ref);return R.jsx(te,{...ae,...!Iv(te)&&{slotProps:pe,disableScrollLock:I},...A,ref:n,children:R.jsx(S,{appear:!0,in:h,onEntering:V,onExited:U,timeout:K,...T,children:R.jsx(ee,{...Q,ref:se,children:c})})})});function GDe(e){return nt("MuiMenu",e)}it("MuiMenu",["root","paper","list"]);const qDe={vertical:"top",horizontal:"right"},KDe={vertical:"top",horizontal:"left"},YDe=e=>{const{classes:t}=e;return rt({root:["root"],paper:["paper"],list:["list"]},GDe,t)},QDe=re(WDe,{shouldForwardProp:e=>ai(e)||e==="classes",name:"MuiMenu",slot:"Root",overridesResolver:(e,t)=>t.root})({}),XDe=re(Yne,{name:"MuiMenu",slot:"Paper",overridesResolver:(e,t)=>t.paper})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),JDe=re(UC,{name:"MuiMenu",slot:"List",overridesResolver:(e,t)=>t.list})({outline:0}),_s=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiMenu"}),{autoFocus:o=!0,children:i,className:a,disableAutoFocusItem:s=!1,MenuListProps:l={},onClose:c,open:u,PaperProps:d={},PopoverClasses:f,transitionDuration:p="auto",TransitionProps:{onEntering:h,...m}={},variant:y="selectedMenu",slots:w={},slotProps:x={},...S}=r,E=dr(),P={...r,autoFocus:o,disableAutoFocusItem:s,MenuListProps:l,onEntering:h,PaperProps:d,transitionDuration:p,TransitionProps:m,variant:y},T=YDe(P),I=o&&!s&&u,A=v.useRef(null),k=(_,z)=>{A.current&&A.current.adjustStyleForScrollbar(_,{direction:E?"rtl":"ltr"}),h&&h(_,z)},O=_=>{_.key==="Tab"&&(_.preventDefault(),c&&c(_,"tabKeyDown"))};let $=-1;v.Children.map(i,(_,z)=>{v.isValidElement(_)&&(_.props.disabled||(y==="selectedMenu"&&_.props.selected||$===-1)&&($=z))});const N=w.paper??XDe,L=x.paper??d,j=mu({elementType:w.root,externalSlotProps:x.root,ownerState:P,className:[T.root,a]}),D=mu({elementType:N,externalSlotProps:L,ownerState:P,className:T.paper});return R.jsx(QDe,{onClose:c,anchorOrigin:{vertical:"bottom",horizontal:E?"right":"left"},transformOrigin:E?qDe:KDe,slots:{paper:N,root:w.root},slotProps:{root:j,paper:D},open:u,ref:n,transitionDuration:p,TransitionProps:{onEntering:k,...m},ownerState:P,...S,classes:f,children:R.jsx(JDe,{onKeyDown:O,actions:A,autoFocus:o&&($===-1||s),autoFocusItem:I,variant:y,...l,className:de(T.list,l.className),children:i})})});function ZDe(e){return nt("MuiMenuItem",e)}const nw=it("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]),e_e=(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.divider&&t.divider,!n.disableGutters&&t.gutters]},t_e=e=>{const{disabled:t,dense:n,divider:r,disableGutters:o,selected:i,classes:a}=e,l=rt({root:["root",n&&"dense",t&&"disabled",!o&&"gutters",r&&"divider",i&&"selected"]},ZDe,a);return{...a,...l}},n_e=re(ca,{shouldForwardProp:e=>ai(e)||e==="classes",name:"MuiMenuItem",slot:"Root",overridesResolver:e_e})(Je(({theme:e})=>({...e.typography.body1,display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",whiteSpace:"nowrap","&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${nw.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:St(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${nw.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:St(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${nw.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:St(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:St(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${nw.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${nw.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`& + .${N6.root}`]:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},[`& + .${N6.inset}`]:{marginLeft:52},[`& .${vy.root}`]:{marginTop:0,marginBottom:0},[`& .${vy.inset}`]:{paddingLeft:36},[`& .${U6.root}`]:{minWidth:36},variants:[{props:({ownerState:t})=>!t.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:t})=>t.divider,style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"}},{props:({ownerState:t})=>!t.dense,style:{[e.breakpoints.up("sm")]:{minHeight:"auto"}}},{props:({ownerState:t})=>t.dense,style:{minHeight:32,paddingTop:4,paddingBottom:4,...e.typography.body2,[`& .${U6.root} svg`]:{fontSize:"1.25rem"}}}]}))),rn=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiMenuItem"}),{autoFocus:o=!1,component:i="li",dense:a=!1,divider:s=!1,disableGutters:l=!1,focusVisibleClassName:c,role:u="menuitem",tabIndex:d,className:f,...p}=r,h=v.useContext(Cl),m=v.useMemo(()=>({dense:a||h.dense||!1,disableGutters:l}),[h.dense,a,l]),y=v.useRef(null);Cs(()=>{o&&y.current&&y.current.focus()},[o]);const w={...r,dense:m.dense,divider:s,disableGutters:l},x=t_e(r),S=Rr(y,n);let E;return r.disabled||(E=d!==void 0?d:-1),R.jsx(Cl.Provider,{value:m,children:R.jsx(n_e,{ref:S,role:u,tabIndex:E,component:i,focusVisibleClassName:de(x.focusVisible,c),className:de(x.root,f),...p,ownerState:w,classes:x})})});function r_e(e){return nt("MuiNativeSelect",e)}const oz=it("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),o_e=e=>{const{classes:t,variant:n,disabled:r,multiple:o,open:i,error:a}=e,s={select:["select",n,r&&"disabled",o&&"multiple",a&&"error"],icon:["icon",`icon${Ce(n)}`,i&&"iconOpen",r&&"disabled"]};return rt(s,r_e,t)},Qne=re("select")(({theme:e})=>({MozAppearance:"none",WebkitAppearance:"none",userSelect:"none",borderRadius:0,cursor:"pointer","&:focus":{borderRadius:0},[`&.${oz.disabled}`]:{cursor:"default"},"&[multiple]":{height:"auto"},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:(e.vars||e).palette.background.paper},variants:[{props:({ownerState:t})=>t.variant!=="filled"&&t.variant!=="outlined",style:{"&&&":{paddingRight:24,minWidth:16}}},{props:{variant:"filled"},style:{"&&&":{paddingRight:32}}},{props:{variant:"outlined"},style:{borderRadius:(e.vars||e).shape.borderRadius,"&:focus":{borderRadius:(e.vars||e).shape.borderRadius},"&&&":{paddingRight:32}}}]})),i_e=re(Qne,{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:ai,overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.select,t[n.variant],n.error&&t.error,{[`&.${oz.multiple}`]:t.multiple}]}})({}),Xne=re("svg")(({theme:e})=>({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:(e.vars||e).palette.action.active,[`&.${oz.disabled}`]:{color:(e.vars||e).palette.action.disabled},variants:[{props:({ownerState:t})=>t.open,style:{transform:"rotate(180deg)"}},{props:{variant:"filled"},style:{right:7}},{props:{variant:"outlined"},style:{right:7}}]})),a_e=re(Xne,{name:"MuiNativeSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${Ce(n.variant)}`],n.open&&t.iconOpen]}})({}),s_e=v.forwardRef(function(t,n){const{className:r,disabled:o,error:i,IconComponent:a,inputRef:s,variant:l="standard",...c}=t,u={...t,disabled:o,variant:l,error:i},d=o_e(u);return R.jsxs(v.Fragment,{children:[R.jsx(i_e,{ownerState:u,className:de(d.select,r),disabled:o,ref:s||n,...c}),t.multiple?null:R.jsx(a_e,{as:a,ownerState:u,className:d.icon})]})});var Y6;const l_e=re("fieldset",{shouldForwardProp:ai})({textAlign:"left",position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden",minWidth:"0%"}),c_e=re("legend",{shouldForwardProp:ai})(Je(({theme:e})=>({float:"unset",width:"auto",overflow:"hidden",variants:[{props:({ownerState:t})=>!t.withLabel,style:{padding:0,lineHeight:"11px",transition:e.transitions.create("width",{duration:150,easing:e.transitions.easing.easeOut})}},{props:({ownerState:t})=>t.withLabel,style:{display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:e.transitions.create("max-width",{duration:50,easing:e.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}}},{props:({ownerState:t})=>t.withLabel&&t.notched,style:{maxWidth:"100%",transition:e.transitions.create("max-width",{duration:100,easing:e.transitions.easing.easeOut,delay:50})}}]})));function u_e(e){const{children:t,classes:n,className:r,label:o,notched:i,...a}=e,s=o!=null&&o!=="",l={...e,notched:i,withLabel:s};return R.jsx(l_e,{"aria-hidden":!0,className:r,ownerState:l,...a,children:R.jsx(c_e,{ownerState:l,children:s?R.jsx("span",{children:o}):Y6||(Y6=R.jsx("span",{className:"notranslate",children:"​"}))})})}const d_e=e=>{const{classes:t}=e,r=rt({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},mke,t);return{...t,...r}},f_e=re(pk,{shouldForwardProp:e=>ai(e)||e==="classes",name:"MuiOutlinedInput",slot:"Root",overridesResolver:dk})(Je(({theme:e})=>{const t=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{position:"relative",borderRadius:(e.vars||e).shape.borderRadius,[`&:hover .${tl.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${tl.notchedOutline}`]:{borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:t}},[`&.${tl.focused} .${tl.notchedOutline}`]:{borderWidth:2},variants:[...Object.entries(e.palette).filter(Kn()).map(([n])=>({props:{color:n},style:{[`&.${tl.focused} .${tl.notchedOutline}`]:{borderColor:(e.vars||e).palette[n].main}}})),{props:{},style:{[`&.${tl.error} .${tl.notchedOutline}`]:{borderColor:(e.vars||e).palette.error.main},[`&.${tl.disabled} .${tl.notchedOutline}`]:{borderColor:(e.vars||e).palette.action.disabled}}},{props:({ownerState:n})=>n.startAdornment,style:{paddingLeft:14}},{props:({ownerState:n})=>n.endAdornment,style:{paddingRight:14}},{props:({ownerState:n})=>n.multiline,style:{padding:"16.5px 14px"}},{props:({ownerState:n,size:r})=>n.multiline&&r==="small",style:{padding:"8.5px 14px"}}]}})),p_e=re(u_e,{name:"MuiOutlinedInput",slot:"NotchedOutline",overridesResolver:(e,t)=>t.notchedOutline})(Je(({theme:e})=>{const t=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:t}})),h_e=re(hk,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:fk})(Je(({theme:e})=>({padding:"16.5px 14px",...!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:e.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:e.palette.mode==="light"?null:"#fff",caretColor:e.palette.mode==="light"?null:"#fff",borderRadius:"inherit"}},...e.vars&&{"&:-webkit-autofill":{borderRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},variants:[{props:{size:"small"},style:{padding:"8.5px 14px"}},{props:({ownerState:t})=>t.multiline,style:{padding:0}},{props:({ownerState:t})=>t.startAdornment,style:{paddingLeft:0}},{props:({ownerState:t})=>t.endAdornment,style:{paddingRight:0}}]}))),gI=v.forwardRef(function(t,n){var r;const o=at({props:t,name:"MuiOutlinedInput"}),{components:i={},fullWidth:a=!1,inputComponent:s="input",label:l,multiline:c=!1,notched:u,slots:d={},type:f="text",...p}=o,h=d_e(o),m=Ba(),y=Tp({props:o,muiFormControl:m,states:["color","disabled","error","focused","hiddenLabel","size","required"]}),w={...o,color:y.color||"primary",disabled:y.disabled,error:y.error,focused:y.focused,formControl:m,fullWidth:a,hiddenLabel:y.hiddenLabel,multiline:c,size:y.size,type:f},x=d.root??i.Root??f_e,S=d.input??i.Input??h_e;return R.jsx(Ib,{slots:{root:x,input:S},renderSuffix:E=>R.jsx(p_e,{ownerState:w,className:h.notchedOutline,label:l!=null&&l!==""&&y.required?r||(r=R.jsxs(v.Fragment,{children:[l," ","*"]})):l,notched:typeof u<"u"?u:!!(E.startAdornment||E.filled||E.focused)}),fullWidth:a,inputComponent:s,multiline:c,ref:n,type:f,...p,classes:{...h,notchedOutline:null}})});gI&&(gI.muiName="Input");function g_e(e){return nt("MuiPagination",e)}it("MuiPagination",["root","ul","outlined","text"]);function m_e(e={}){const{boundaryCount:t=1,componentName:n="usePagination",count:r=1,defaultPage:o=1,disabled:i=!1,hideNextButton:a=!1,hidePrevButton:s=!1,onChange:l,page:c,showFirstButton:u=!1,showLastButton:d=!1,siblingCount:f=1,...p}=e,[h,m]=ad({controlled:c,default:o,name:n,state:"page"}),y=(k,O)=>{c||m(O),l&&l(k,O)},w=(k,O)=>{const $=O-k+1;return Array.from({length:$},(N,L)=>k+L)},x=w(1,Math.min(t,r)),S=w(Math.max(r-t+1,t+1),r),E=Math.max(Math.min(h-f,r-t-f*2-1),t+2),P=Math.min(Math.max(h+f,t+f*2+2),r-t-1),T=[...u?["first"]:[],...s?[]:["previous"],...x,...E>t+2?["start-ellipsis"]:t+1t?[r-t]:[],...S,...a?[]:["next"],...d?["last"]:[]],I=k=>{switch(k){case"first":return 1;case"previous":return h-1;case"next":return h+1;case"last":return r;default:return null}};return{items:T.map(k=>typeof k=="number"?{onClick:O=>{y(O,k)},type:"page",page:k,selected:k===h,disabled:i,"aria-current":k===h?"true":void 0}:{onClick:O=>{y(O,I(k))},type:k,page:I(k),selected:!1,disabled:i||!k.includes("ellipsis")&&(k==="next"||k==="last"?h>=r:h<=1)}),...p}}function y_e(e){return nt("MuiPaginationItem",e)}const Gi=it("MuiPaginationItem",["root","page","sizeSmall","sizeLarge","text","textPrimary","textSecondary","outlined","outlinedPrimary","outlinedSecondary","rounded","ellipsis","firstLast","previousNext","focusVisible","disabled","selected","icon","colorPrimary","colorSecondary"]),Jne=ct(R.jsx("path",{d:"M18.41 16.59L13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z"}),"FirstPage"),Zne=ct(R.jsx("path",{d:"M5.59 7.41L10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z"}),"LastPage"),v_e=ct(R.jsx("path",{d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"}),"NavigateBefore"),b_e=ct(R.jsx("path",{d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"NavigateNext"),ere=(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`size${Ce(n.size)}`],n.variant==="text"&&t[`text${Ce(n.color)}`],n.variant==="outlined"&&t[`outlined${Ce(n.color)}`],n.shape==="rounded"&&t.rounded,n.type==="page"&&t.page,(n.type==="start-ellipsis"||n.type==="end-ellipsis")&&t.ellipsis,(n.type==="previous"||n.type==="next")&&t.previousNext,(n.type==="first"||n.type==="last")&&t.firstLast]},w_e=e=>{const{classes:t,color:n,disabled:r,selected:o,size:i,shape:a,type:s,variant:l}=e,c={root:["root",`size${Ce(i)}`,l,a,n!=="standard"&&`color${Ce(n)}`,n!=="standard"&&`${l}${Ce(n)}`,r&&"disabled",o&&"selected",{page:"page",first:"firstLast",last:"firstLast","start-ellipsis":"ellipsis","end-ellipsis":"ellipsis",previous:"previousNext",next:"previousNext"}[s]],icon:["icon"]};return rt(c,y_e,t)},x_e=re("div",{name:"MuiPaginationItem",slot:"Root",overridesResolver:ere})(Je(({theme:e})=>({...e.typography.body2,borderRadius:32/2,textAlign:"center",boxSizing:"border-box",minWidth:32,padding:"0 6px",margin:"0 3px",color:(e.vars||e).palette.text.primary,height:"auto",[`&.${Gi.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},variants:[{props:{size:"small"},style:{minWidth:26,borderRadius:26/2,margin:"0 1px",padding:"0 4px"}},{props:{size:"large"},style:{minWidth:40,borderRadius:40/2,padding:"0 10px",fontSize:e.typography.pxToRem(15)}}]}))),S_e=re(ca,{name:"MuiPaginationItem",slot:"Root",overridesResolver:ere})(Je(({theme:e})=>({...e.typography.body2,borderRadius:32/2,textAlign:"center",boxSizing:"border-box",minWidth:32,height:32,padding:"0 6px",margin:"0 3px",color:(e.vars||e).palette.text.primary,[`&.${Gi.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${Gi.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},transition:e.transitions.create(["color","background-color"],{duration:e.transitions.duration.short}),"&:hover":{backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Gi.selected}`]:{backgroundColor:(e.vars||e).palette.action.selected,"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:St(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:(e.vars||e).palette.action.selected}},[`&.${Gi.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:St(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)},[`&.${Gi.disabled}`]:{opacity:1,color:(e.vars||e).palette.action.disabled,backgroundColor:(e.vars||e).palette.action.selected}},variants:[{props:{size:"small"},style:{minWidth:26,height:26,borderRadius:26/2,margin:"0 1px",padding:"0 4px"}},{props:{size:"large"},style:{minWidth:40,height:40,borderRadius:40/2,padding:"0 10px",fontSize:e.typography.pxToRem(15)}},{props:{shape:"rounded"},style:{borderRadius:(e.vars||e).shape.borderRadius}},{props:{variant:"outlined"},style:{border:e.vars?`1px solid rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:`1px solid ${e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"}`,[`&.${Gi.selected}`]:{[`&.${Gi.disabled}`]:{borderColor:(e.vars||e).palette.action.disabledBackground,color:(e.vars||e).palette.action.disabled}}}},{props:{variant:"text"},style:{[`&.${Gi.selected}`]:{[`&.${Gi.disabled}`]:{color:(e.vars||e).palette.action.disabled}}}},...Object.entries(e.palette).filter(Kn(["dark","contrastText"])).map(([t])=>({props:{variant:"text",color:t},style:{[`&.${Gi.selected}`]:{color:(e.vars||e).palette[t].contrastText,backgroundColor:(e.vars||e).palette[t].main,"&:hover":{backgroundColor:(e.vars||e).palette[t].dark,"@media (hover: none)":{backgroundColor:(e.vars||e).palette[t].main}},[`&.${Gi.focusVisible}`]:{backgroundColor:(e.vars||e).palette[t].dark},[`&.${Gi.disabled}`]:{color:(e.vars||e).palette.action.disabled}}}})),...Object.entries(e.palette).filter(Kn(["light"])).map(([t])=>({props:{variant:"outlined",color:t},style:{[`&.${Gi.selected}`]:{color:(e.vars||e).palette[t].main,border:`1px solid ${e.vars?`rgba(${e.vars.palette[t].mainChannel} / 0.5)`:St(e.palette[t].main,.5)}`,backgroundColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / ${e.vars.palette.action.activatedOpacity})`:St(e.palette[t].main,e.palette.action.activatedOpacity),"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / calc(${e.vars.palette.action.activatedOpacity} + ${e.vars.palette.action.focusOpacity}))`:St(e.palette[t].main,e.palette.action.activatedOpacity+e.palette.action.focusOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Gi.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / calc(${e.vars.palette.action.activatedOpacity} + ${e.vars.palette.action.focusOpacity}))`:St(e.palette[t].main,e.palette.action.activatedOpacity+e.palette.action.focusOpacity)}}}}))]}))),C_e=re("div",{name:"MuiPaginationItem",slot:"Icon",overridesResolver:(e,t)=>t.icon})(Je(({theme:e})=>({fontSize:e.typography.pxToRem(20),margin:"0 -8px",variants:[{props:{size:"small"},style:{fontSize:e.typography.pxToRem(18)}},{props:{size:"large"},style:{fontSize:e.typography.pxToRem(22)}}]}))),E_e=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiPaginationItem"}),{className:o,color:i="standard",component:a,components:s={},disabled:l=!1,page:c,selected:u=!1,shape:d="circular",size:f="medium",slots:p={},slotProps:h={},type:m="page",variant:y="text",...w}=r,x={...r,color:i,disabled:l,selected:u,shape:d,size:f,type:m,variant:y},S=dr(),E=w_e(x),P={slots:{previous:p.previous??s.previous,next:p.next??s.next,first:p.first??s.first,last:p.last??s.last},slotProps:h},[T,I]=Cr("previous",{elementType:v_e,externalForwardedProps:P,ownerState:x}),[A,k]=Cr("next",{elementType:b_e,externalForwardedProps:P,ownerState:x}),[O,$]=Cr("first",{elementType:Jne,externalForwardedProps:P,ownerState:x}),[N,L]=Cr("last",{elementType:Zne,externalForwardedProps:P,ownerState:x}),j=S?{previous:"next",next:"previous",first:"last",last:"first"}[m]:m,D={previous:T,next:A,first:O,last:N}[j],_={previous:I,next:k,first:$,last:L}[j];return m==="start-ellipsis"||m==="end-ellipsis"?R.jsx(x_e,{ref:n,ownerState:x,className:de(E.root,o),children:"…"}):R.jsxs(S_e,{ref:n,ownerState:x,component:a,disabled:l,className:de(E.root,o),...w,children:[m==="page"&&c,D?R.jsx(C_e,{..._,className:E.icon,as:D}):null]})}),P_e=e=>{const{classes:t,variant:n}=e;return rt({root:["root",n],ul:["ul"]},g_e,t)},T_e=re("nav",{name:"MuiPagination",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant]]}})({}),I_e=re("ul",{name:"MuiPagination",slot:"Ul",overridesResolver:(e,t)=>t.ul})({display:"flex",flexWrap:"wrap",alignItems:"center",padding:0,margin:0,listStyle:"none"});function O_e(e,t,n){return e==="page"?`${n?"":"Go to "}page ${t}`:`Go to ${e} page`}const A_e=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiPagination"}),{boundaryCount:o=1,className:i,color:a="standard",count:s=1,defaultPage:l=1,disabled:c=!1,getItemAriaLabel:u=O_e,hideNextButton:d=!1,hidePrevButton:f=!1,onChange:p,page:h,renderItem:m=O=>R.jsx(E_e,{...O}),shape:y="circular",showFirstButton:w=!1,showLastButton:x=!1,siblingCount:S=1,size:E="medium",variant:P="text",...T}=r,{items:I}=m_e({...r,componentName:"Pagination"}),A={...r,boundaryCount:o,color:a,count:s,defaultPage:l,disabled:c,getItemAriaLabel:u,hideNextButton:d,hidePrevButton:f,renderItem:m,shape:y,showFirstButton:w,showLastButton:x,siblingCount:S,size:E,variant:P},k=P_e(A);return R.jsx(T_e,{"aria-label":"pagination navigation",className:de(k.root,i),ownerState:A,ref:n,...T,children:R.jsx(I_e,{className:k.ul,ownerState:A,children:I.map((O,$)=>R.jsx("li",{children:m({...O,color:a,"aria-label":u(O.type,O.page,O.selected),shape:y,size:E,variant:P})},$))})})});function k_e(e){return nt("MuiSelect",e)}const rw=it("MuiSelect",["root","select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]);var Q6;const M_e=re(Qne,{name:"MuiSelect",slot:"Select",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`&.${rw.select}`]:t.select},{[`&.${rw.select}`]:t[n.variant]},{[`&.${rw.error}`]:t.error},{[`&.${rw.multiple}`]:t.multiple}]}})({[`&.${rw.select}`]:{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}),R_e=re(Xne,{name:"MuiSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${Ce(n.variant)}`],n.open&&t.iconOpen]}})({}),$_e=re("input",{shouldForwardProp:e=>ree(e)&&e!=="classes",name:"MuiSelect",slot:"NativeInput",overridesResolver:(e,t)=>t.nativeInput})({bottom:0,left:0,position:"absolute",opacity:0,pointerEvents:"none",width:"100%",boxSizing:"border-box"});function X6(e,t){return typeof t=="object"&&t!==null?e===t:String(e)===String(t)}function D_e(e){return e==null||typeof e=="string"&&!e.trim()}const __e=e=>{const{classes:t,variant:n,disabled:r,multiple:o,open:i,error:a}=e,s={select:["select",n,r&&"disabled",o&&"multiple",a&&"error"],icon:["icon",`icon${Ce(n)}`,i&&"iconOpen",r&&"disabled"],nativeInput:["nativeInput"]};return rt(s,k_e,t)},N_e=v.forwardRef(function(t,n){var An;const{"aria-describedby":r,"aria-label":o,autoFocus:i,autoWidth:a,children:s,className:l,defaultOpen:c,defaultValue:u,disabled:d,displayEmpty:f,error:p=!1,IconComponent:h,inputRef:m,labelId:y,MenuProps:w={},multiple:x,name:S,onBlur:E,onChange:P,onClose:T,onFocus:I,onOpen:A,open:k,readOnly:O,renderValue:$,SelectDisplayProps:N={},tabIndex:L,type:j,value:D,variant:_="standard",...z}=t,[F,V]=ad({controlled:D,default:u,name:"Select"}),[U,K]=ad({controlled:k,default:c,name:"Select"}),X=v.useRef(null),ie=v.useRef(null),[ee,Q]=v.useState(null),{current:te}=v.useRef(k!=null),[pe,ae]=v.useState(),se=Rr(n,m),oe=v.useCallback(Ke=>{ie.current=Ke,Ke&&Q(Ke)},[]),fe=ee==null?void 0:ee.parentNode;v.useImperativeHandle(se,()=>({focus:()=>{ie.current.focus()},node:X.current,value:F}),[F]),v.useEffect(()=>{c&&U&&ee&&!te&&(ae(a?null:fe.clientWidth),ie.current.focus())},[ee,a]),v.useEffect(()=>{i&&ie.current.focus()},[i]),v.useEffect(()=>{if(!y)return;const Ke=bi(ie.current).getElementById(y);if(Ke){const $e=()=>{getSelection().isCollapsed&&ie.current.focus()};return Ke.addEventListener("click",$e),()=>{Ke.removeEventListener("click",$e)}}},[y]);const Z=(Ke,$e)=>{Ke?A&&A($e):T&&T($e),te||(ae(a?null:fe.clientWidth),K(Ke))},ce=Ke=>{Ke.button===0&&(Ke.preventDefault(),ie.current.focus(),Z(!0,Ke))},ge=Ke=>{Z(!1,Ke)},we=v.Children.toArray(s),me=Ke=>{const $e=we.find(Qe=>Qe.props.value===Ke.target.value);$e!==void 0&&(V($e.props.value),P&&P(Ke,$e))},Se=Ke=>$e=>{let Qe;if($e.currentTarget.hasAttribute("tabindex")){if(x){Qe=Array.isArray(F)?F.slice():[];const Tt=F.indexOf(Ke.props.value);Tt===-1?Qe.push(Ke.props.value):Qe.splice(Tt,1)}else Qe=Ke.props.value;if(Ke.props.onClick&&Ke.props.onClick($e),F!==Qe&&(V(Qe),P)){const Tt=$e.nativeEvent||$e,Xt=new Tt.constructor(Tt.type,Tt);Object.defineProperty(Xt,"target",{writable:!0,value:{value:Qe,name:S}}),P(Xt,Ke)}x||Z(!1,$e)}},xe=Ke=>{O||[" ","ArrowUp","ArrowDown","Enter"].includes(Ke.key)&&(Ke.preventDefault(),Z(!0,Ke))},ke=ee!==null&&U,De=Ke=>{!ke&&E&&(Object.defineProperty(Ke,"target",{writable:!0,value:{value:F,name:S}}),E(Ke))};delete z["aria-invalid"];let _e,ye;const Pe=[];let Ae=!1;(dI({value:F})||f)&&($?_e=$(F):Ae=!0);const Me=we.map(Ke=>{if(!v.isValidElement(Ke))return null;let $e;if(x){if(!Array.isArray(F))throw new Error(bd(2));$e=F.some(Qe=>X6(Qe,Ke.props.value)),$e&&Ae&&Pe.push(Ke.props.children)}else $e=X6(F,Ke.props.value),$e&&Ae&&(ye=Ke.props.children);return v.cloneElement(Ke,{"aria-selected":$e?"true":"false",onClick:Se(Ke),onKeyUp:Qe=>{Qe.key===" "&&Qe.preventDefault(),Ke.props.onKeyUp&&Ke.props.onKeyUp(Qe)},role:"option",selected:$e,value:void 0,"data-value":Ke.props.value})});Ae&&(x?Pe.length===0?_e=null:_e=Pe.reduce((Ke,$e,Qe)=>(Ke.push($e),Qe{const{classes:t}=e;return t},iz={name:"MuiSelect",overridesResolver:(e,t)=>t.root,shouldForwardProp:e=>ai(e)&&e!=="variant",slot:"Root"},F_e=re(hI,iz)(""),j_e=re(gI,iz)(""),B_e=re(pI,iz)(""),Lg=v.forwardRef(function(t,n){const r=at({name:"MuiSelect",props:t}),{autoWidth:o=!1,children:i,classes:a={},className:s,defaultOpen:l=!1,displayEmpty:c=!1,IconComponent:u=$ne,id:d,input:f,inputProps:p,label:h,labelId:m,MenuProps:y,multiple:w=!1,native:x=!1,onClose:S,onOpen:E,open:P,renderValue:T,SelectDisplayProps:I,variant:A="outlined",...k}=r,O=x?s_e:N_e,$=Ba(),N=Tp({props:r,muiFormControl:$,states:["variant","error"]}),L=N.variant||A,j={...r,variant:L,classes:a},D=L_e(j),{root:_,...z}=D,F=f||{standard:R.jsx(F_e,{ownerState:j}),outlined:R.jsx(j_e,{label:h,ownerState:j}),filled:R.jsx(B_e,{ownerState:j})}[L],V=Rr(n,bp(F));return R.jsx(v.Fragment,{children:v.cloneElement(F,{inputComponent:O,inputProps:{children:i,error:N.error,IconComponent:u,variant:L,type:void 0,multiple:w,...x?{id:d}:{autoWidth:o,defaultOpen:l,displayEmpty:c,labelId:m,MenuProps:y,onClose:S,onOpen:E,open:P,renderValue:T,SelectDisplayProps:{id:d,...I}},...p,classes:p?Ao(z,p.classes):z,...f?f.props.inputProps:{}},...(w&&x||c)&&L==="outlined"?{notched:!0}:{},ref:V,className:de(F.props.className,s,D.root),...!f&&{variant:L},...k})})});Lg.muiName="Select";function z_e(e){return nt("MuiSkeleton",e)}it("MuiSkeleton",["root","text","rectangular","rounded","circular","pulse","wave","withChildren","fitContent","heightAuto"]);const V_e=e=>{const{classes:t,variant:n,animation:r,hasChildren:o,width:i,height:a}=e;return rt({root:["root",n,r,o&&"withChildren",o&&!i&&"fitContent",o&&!a&&"heightAuto"]},z_e,t)},wN=Cu` 0% { opacity: 1; } @@ -257,7 +257,7 @@ Error generating stack: `+i.message+` 100% { opacity: 1; } -`,gN=xu` +`,xN=Cu` 0% { transform: translateX(-100%); } @@ -270,69 +270,69 @@ Error generating stack: `+i.message+` 100% { transform: translateX(100%); } -`,v_e=typeof hN!="string"?gp` - animation: ${hN} 2s ease-in-out 0.5s infinite; - `:null,b_e=typeof gN!="string"?gp` +`,H_e=typeof wN!="string"?vp` + animation: ${wN} 2s ease-in-out 0.5s infinite; + `:null,U_e=typeof xN!="string"?vp` &::after { - animation: ${gN} 2s linear 0.5s infinite; + animation: ${xN} 2s linear 0.5s infinite; } - `:null,w_e=oe("span",{name:"MuiSkeleton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],n.animation!==!1&&t[n.animation],n.hasChildren&&t.withChildren,n.hasChildren&&!n.width&&t.fitContent,n.hasChildren&&!n.height&&t.heightAuto]}})(Je(({theme:e})=>{const t=wEe(e.shape.borderRadius)||"px",n=xEe(e.shape.borderRadius);return{display:"block",backgroundColor:e.vars?e.vars.palette.Skeleton.bg:xt(e.palette.text.primary,e.palette.mode==="light"?.11:.13),height:"1.2em",variants:[{props:{variant:"text"},style:{marginTop:0,marginBottom:0,height:"auto",transformOrigin:"0 55%",transform:"scale(1, 0.60)",borderRadius:`${n}${t}/${Math.round(n/.6*10)/10}${t}`,"&:empty:before":{content:'"\\00a0"'}}},{props:{variant:"circular"},style:{borderRadius:"50%"}},{props:{variant:"rounded"},style:{borderRadius:(e.vars||e).shape.borderRadius}},{props:({ownerState:r})=>r.hasChildren,style:{"& > *":{visibility:"hidden"}}},{props:({ownerState:r})=>r.hasChildren&&!r.width,style:{maxWidth:"fit-content"}},{props:({ownerState:r})=>r.hasChildren&&!r.height,style:{height:"auto"}},{props:{animation:"pulse"},style:v_e||{animation:`${hN} 2s ease-in-out 0.5s infinite`}},{props:{animation:"wave"},style:{position:"relative",overflow:"hidden",WebkitMaskImage:"-webkit-radial-gradient(white, black)","&::after":{background:`linear-gradient( + `:null,W_e=re("span",{name:"MuiSkeleton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],n.animation!==!1&&t[n.animation],n.hasChildren&&t.withChildren,n.hasChildren&&!n.width&&t.fitContent,n.hasChildren&&!n.height&&t.heightAuto]}})(Je(({theme:e})=>{const t=AEe(e.shape.borderRadius)||"px",n=kEe(e.shape.borderRadius);return{display:"block",backgroundColor:e.vars?e.vars.palette.Skeleton.bg:St(e.palette.text.primary,e.palette.mode==="light"?.11:.13),height:"1.2em",variants:[{props:{variant:"text"},style:{marginTop:0,marginBottom:0,height:"auto",transformOrigin:"0 55%",transform:"scale(1, 0.60)",borderRadius:`${n}${t}/${Math.round(n/.6*10)/10}${t}`,"&:empty:before":{content:'"\\00a0"'}}},{props:{variant:"circular"},style:{borderRadius:"50%"}},{props:{variant:"rounded"},style:{borderRadius:(e.vars||e).shape.borderRadius}},{props:({ownerState:r})=>r.hasChildren,style:{"& > *":{visibility:"hidden"}}},{props:({ownerState:r})=>r.hasChildren&&!r.width,style:{maxWidth:"fit-content"}},{props:({ownerState:r})=>r.hasChildren&&!r.height,style:{height:"auto"}},{props:{animation:"pulse"},style:H_e||{animation:`${wN} 2s ease-in-out 0.5s infinite`}},{props:{animation:"wave"},style:{position:"relative",overflow:"hidden",WebkitMaskImage:"-webkit-radial-gradient(white, black)","&::after":{background:`linear-gradient( 90deg, transparent, ${(e.vars||e).palette.action.hover}, transparent - )`,content:'""',position:"absolute",transform:"translateX(-100%)",bottom:0,left:0,right:0,top:0}}},{props:{animation:"wave"},style:b_e||{"&::after":{animation:`${gN} 2s linear 0.5s infinite`}}}]}})),QP=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiSkeleton"}),{animation:o="pulse",className:i,component:a="span",height:s,style:l,variant:c="text",width:u,...d}=r,f={...r,animation:o,component:a,variant:c,hasChildren:!!d.children},p=y_e(f);return R.jsx(w_e,{as:a,ref:n,className:de(p.root,i),ownerState:f,...d,style:{width:u,height:s,...l}})});function x_e(e={}){const{autoHideDuration:t=null,disableWindowBlurListener:n=!1,onClose:r,open:o,resumeHideDuration:i}=e,a=kf();v.useEffect(()=>{if(!o)return;function w(x){x.defaultPrevented||x.key==="Escape"&&(r==null||r(x,"escapeKeyDown"))}return document.addEventListener("keydown",w),()=>{document.removeEventListener("keydown",w)}},[o,r]);const s=ei((w,x)=>{r==null||r(w,x)}),l=ei(w=>{!r||w==null||a.start(w,()=>{s(null,"timeout")})});v.useEffect(()=>(o&&l(t),a.clear),[o,t,l,a]);const c=w=>{r==null||r(w,"clickaway")},u=a.clear,d=v.useCallback(()=>{t!=null&&l(i??t*.5)},[t,i,l]),f=w=>x=>{const C=w.onBlur;C==null||C(x),d()},p=w=>x=>{const C=w.onFocus;C==null||C(x),u()},h=w=>x=>{const C=w.onMouseEnter;C==null||C(x),u()},m=w=>x=>{const C=w.onMouseLeave;C==null||C(x),d()};return v.useEffect(()=>{if(!n&&o)return window.addEventListener("focus",d),window.addEventListener("blur",u),()=>{window.removeEventListener("focus",d),window.removeEventListener("blur",u)}},[n,o,d,u]),{getRootProps:(w={})=>{const x={...wT(e),...wT(w)};return{role:"presentation",...w,...x,onBlur:f(x),onFocus:p(x),onMouseEnter:h(x),onMouseLeave:m(x)}},onClickAway:c}}function S_e(e){return nt("MuiSnackbarContent",e)}it("MuiSnackbarContent",["root","message","action"]);const C_e=e=>{const{classes:t}=e;return rt({root:["root"],action:["action"],message:["message"]},S_e,t)},E_e=oe(to,{name:"MuiSnackbarContent",slot:"Root",overridesResolver:(e,t)=>t.root})(Je(({theme:e})=>{const t=e.palette.mode==="light"?.8:.98,n=MZ(e.palette.background.default,t);return{...e.typography.body2,color:e.vars?e.vars.palette.SnackbarContent.color:e.palette.getContrastText(n),backgroundColor:e.vars?e.vars.palette.SnackbarContent.bg:n,display:"flex",alignItems:"center",flexWrap:"wrap",padding:"6px 16px",borderRadius:(e.vars||e).shape.borderRadius,flexGrow:1,[e.breakpoints.up("sm")]:{flexGrow:"initial",minWidth:288}}})),P_e=oe("div",{name:"MuiSnackbarContent",slot:"Message",overridesResolver:(e,t)=>t.message})({padding:"8px 0"}),T_e=oe("div",{name:"MuiSnackbarContent",slot:"Action",overridesResolver:(e,t)=>t.action})({display:"flex",alignItems:"center",marginLeft:"auto",paddingLeft:16,marginRight:-8}),I_e=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiSnackbarContent"}),{action:o,className:i,message:a,role:s="alert",...l}=r,c=r,u=C_e(c);return R.jsxs(E_e,{role:s,square:!0,elevation:6,className:de(u.root,i),ownerState:c,ref:n,...l,children:[R.jsx(P_e,{className:u.message,ownerState:c,children:a}),o?R.jsx(T_e,{className:u.action,ownerState:c,children:o}):null]})});function O_e(e){return nt("MuiSnackbar",e)}it("MuiSnackbar",["root","anchorOriginTopCenter","anchorOriginBottomCenter","anchorOriginTopRight","anchorOriginBottomRight","anchorOriginTopLeft","anchorOriginBottomLeft"]);const A_e=e=>{const{classes:t,anchorOrigin:n}=e,r={root:["root",`anchorOrigin${Ce(n.vertical)}${Ce(n.horizontal)}`]};return rt(r,O_e,t)},q6=oe("div",{name:"MuiSnackbar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`anchorOrigin${Ce(n.anchorOrigin.vertical)}${Ce(n.anchorOrigin.horizontal)}`]]}})(Je(({theme:e})=>({zIndex:(e.vars||e).zIndex.snackbar,position:"fixed",display:"flex",left:8,right:8,justifyContent:"center",alignItems:"center",variants:[{props:({ownerState:t})=>t.anchorOrigin.vertical==="top",style:{top:8,[e.breakpoints.up("sm")]:{top:24}}},{props:({ownerState:t})=>t.anchorOrigin.vertical!=="top",style:{bottom:8,[e.breakpoints.up("sm")]:{bottom:24}}},{props:({ownerState:t})=>t.anchorOrigin.horizontal==="left",style:{justifyContent:"flex-start",[e.breakpoints.up("sm")]:{left:24,right:"auto"}}},{props:({ownerState:t})=>t.anchorOrigin.horizontal==="right",style:{justifyContent:"flex-end",[e.breakpoints.up("sm")]:{right:24,left:"auto"}}},{props:({ownerState:t})=>t.anchorOrigin.horizontal==="center",style:{[e.breakpoints.up("sm")]:{left:"50%",right:"auto",transform:"translateX(-50%)"}}}]}))),nz=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiSnackbar"}),o=Ro(),i={enter:o.transitions.duration.enteringScreen,exit:o.transitions.duration.leavingScreen},{action:a,anchorOrigin:{vertical:s,horizontal:l}={vertical:"bottom",horizontal:"left"},autoHideDuration:c=null,children:u,className:d,ClickAwayListenerProps:f,ContentProps:p,disableWindowBlurListener:h=!1,message:m,onBlur:y,onClose:w,onFocus:x,onMouseEnter:C,onMouseLeave:E,open:P,resumeHideDuration:T,TransitionComponent:I=ap,transitionDuration:A=i,TransitionProps:{onEnter:k,onExited:O,...$}={},...N}=r,L={...r,anchorOrigin:{vertical:s,horizontal:l},autoHideDuration:c,disableWindowBlurListener:h,TransitionComponent:I,transitionDuration:A},j=A_e(L),{getRootProps:D,onClickAway:_}=x_e({...L}),[z,F]=v.useState(!0),V=hu({elementType:q6,getSlotProps:D,externalForwardedProps:N,ownerState:L,additionalProps:{ref:n},className:[j.root,d]}),U=X=>{F(!0),O&&O(X)},q=(X,ie)=>{F(!1),k&&k(X,ie)};return!P&&z?null:R.jsx(YB,{onClickAway:_,...f,children:R.jsx(q6,{...V,children:R.jsx(I,{appear:!0,in:P,timeout:A,direction:s==="top"?"down":"up",onEnter:q,onExited:U,...$,children:u||R.jsx(I_e,{message:m,action:a,...p})})})})});function k_e(e){return nt("MuiTooltip",e)}const Yr=it("MuiTooltip",["popper","popperInteractive","popperArrow","popperClose","tooltip","tooltipArrow","touch","tooltipPlacementLeft","tooltipPlacementRight","tooltipPlacementTop","tooltipPlacementBottom","arrow"]);function M_e(e){return Math.round(e*1e5)/1e5}const R_e=e=>{const{classes:t,disableInteractive:n,arrow:r,touch:o,placement:i}=e,a={popper:["popper",!n&&"popperInteractive",r&&"popperArrow"],tooltip:["tooltip",r&&"tooltipArrow",o&&"touch",`tooltipPlacement${Ce(i.split("-")[0])}`],arrow:["arrow"]};return rt(a,k_e,t)},$_e=oe(Sp,{name:"MuiTooltip",slot:"Popper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.popper,!n.disableInteractive&&t.popperInteractive,n.arrow&&t.popperArrow,!n.open&&t.popperClose]}})(Je(({theme:e})=>({zIndex:(e.vars||e).zIndex.tooltip,pointerEvents:"none",variants:[{props:({ownerState:t})=>!t.disableInteractive,style:{pointerEvents:"auto"}},{props:({open:t})=>!t,style:{pointerEvents:"none"}},{props:({ownerState:t})=>t.arrow,style:{[`&[data-popper-placement*="bottom"] .${Yr.arrow}`]:{top:0,marginTop:"-0.71em","&::before":{transformOrigin:"0 100%"}},[`&[data-popper-placement*="top"] .${Yr.arrow}`]:{bottom:0,marginBottom:"-0.71em","&::before":{transformOrigin:"100% 0"}},[`&[data-popper-placement*="right"] .${Yr.arrow}`]:{height:"1em",width:"0.71em","&::before":{transformOrigin:"100% 100%"}},[`&[data-popper-placement*="left"] .${Yr.arrow}`]:{height:"1em",width:"0.71em","&::before":{transformOrigin:"0 0"}}}},{props:({ownerState:t})=>t.arrow&&!t.isRtl,style:{[`&[data-popper-placement*="right"] .${Yr.arrow}`]:{left:0,marginLeft:"-0.71em"}}},{props:({ownerState:t})=>t.arrow&&!!t.isRtl,style:{[`&[data-popper-placement*="right"] .${Yr.arrow}`]:{right:0,marginRight:"-0.71em"}}},{props:({ownerState:t})=>t.arrow&&!t.isRtl,style:{[`&[data-popper-placement*="left"] .${Yr.arrow}`]:{right:0,marginRight:"-0.71em"}}},{props:({ownerState:t})=>t.arrow&&!!t.isRtl,style:{[`&[data-popper-placement*="left"] .${Yr.arrow}`]:{left:0,marginLeft:"-0.71em"}}}]}))),D_e=oe("div",{name:"MuiTooltip",slot:"Tooltip",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.tooltip,n.touch&&t.touch,n.arrow&&t.tooltipArrow,t[`tooltipPlacement${Ce(n.placement.split("-")[0])}`]]}})(Je(({theme:e})=>({backgroundColor:e.vars?e.vars.palette.Tooltip.bg:xt(e.palette.grey[700],.92),borderRadius:(e.vars||e).shape.borderRadius,color:(e.vars||e).palette.common.white,fontFamily:e.typography.fontFamily,padding:"4px 8px",fontSize:e.typography.pxToRem(11),maxWidth:300,margin:2,wordWrap:"break-word",fontWeight:e.typography.fontWeightMedium,[`.${Yr.popper}[data-popper-placement*="left"] &`]:{transformOrigin:"right center"},[`.${Yr.popper}[data-popper-placement*="right"] &`]:{transformOrigin:"left center"},[`.${Yr.popper}[data-popper-placement*="top"] &`]:{transformOrigin:"center bottom",marginBottom:"14px"},[`.${Yr.popper}[data-popper-placement*="bottom"] &`]:{transformOrigin:"center top",marginTop:"14px"},variants:[{props:({ownerState:t})=>t.arrow,style:{position:"relative",margin:0}},{props:({ownerState:t})=>t.touch,style:{padding:"8px 16px",fontSize:e.typography.pxToRem(14),lineHeight:`${M_e(16/14)}em`,fontWeight:e.typography.fontWeightRegular}},{props:({ownerState:t})=>!t.isRtl,style:{[`.${Yr.popper}[data-popper-placement*="left"] &`]:{marginRight:"14px"},[`.${Yr.popper}[data-popper-placement*="right"] &`]:{marginLeft:"14px"}}},{props:({ownerState:t})=>!t.isRtl&&t.touch,style:{[`.${Yr.popper}[data-popper-placement*="left"] &`]:{marginRight:"24px"},[`.${Yr.popper}[data-popper-placement*="right"] &`]:{marginLeft:"24px"}}},{props:({ownerState:t})=>!!t.isRtl,style:{[`.${Yr.popper}[data-popper-placement*="left"] &`]:{marginLeft:"14px"},[`.${Yr.popper}[data-popper-placement*="right"] &`]:{marginRight:"14px"}}},{props:({ownerState:t})=>!!t.isRtl&&t.touch,style:{[`.${Yr.popper}[data-popper-placement*="left"] &`]:{marginLeft:"24px"},[`.${Yr.popper}[data-popper-placement*="right"] &`]:{marginRight:"24px"}}},{props:({ownerState:t})=>t.touch,style:{[`.${Yr.popper}[data-popper-placement*="top"] &`]:{marginBottom:"24px"}}},{props:({ownerState:t})=>t.touch,style:{[`.${Yr.popper}[data-popper-placement*="bottom"] &`]:{marginTop:"24px"}}}]}))),__e=oe("span",{name:"MuiTooltip",slot:"Arrow",overridesResolver:(e,t)=>t.arrow})(Je(({theme:e})=>({overflow:"hidden",position:"absolute",width:"1em",height:"0.71em",boxSizing:"border-box",color:e.vars?e.vars.palette.Tooltip.bg:xt(e.palette.grey[700],.9),"&::before":{content:'""',margin:"auto",display:"block",width:"100%",height:"100%",backgroundColor:"currentColor",transform:"rotate(45deg)"}})));let UE=!1;const K6=new $Z;let Z0={x:0,y:0};function WE(e,t){return(n,...r)=>{t&&t(n,...r),e(n,...r)}}const kc=v.forwardRef(function(t,n){var no,Bi,Ds;const r=at({props:t,name:"MuiTooltip"}),{arrow:o=!1,children:i,classes:a,components:s={},componentsProps:l={},describeChild:c=!1,disableFocusListener:u=!1,disableHoverListener:d=!1,disableInteractive:f=!1,disableTouchListener:p=!1,enterDelay:h=100,enterNextDelay:m=0,enterTouchDelay:y=700,followCursor:w=!1,id:x,leaveDelay:C=0,leaveTouchDelay:E=1500,onClose:P,onOpen:T,open:I,placement:A="bottom",PopperComponent:k,PopperProps:O={},slotProps:$={},slots:N={},title:L,TransitionComponent:j=ap,TransitionProps:D,..._}=r,z=v.isValidElement(i)?i:R.jsx("span",{children:i}),F=Ro(),V=dr(),[U,q]=v.useState(),[X,ie]=v.useState(null),ee=v.useRef(!1),Q=f||w,te=kf(),pe=kf(),ae=kf(),se=kf(),[re,fe]=id({controlled:I,default:!1,name:"Tooltip",state:"open"});let Z=re;const ce=np(x),ge=v.useRef(),we=ei(()=>{ge.current!==void 0&&(document.body.style.WebkitUserSelect=ge.current,ge.current=void 0),se.clear()});v.useEffect(()=>we,[we]);const me=tn=>{K6.clear(),UE=!0,fe(!0),T&&!Z&&T(tn)},Se=ei(tn=>{K6.start(800+C,()=>{UE=!1}),fe(!1),P&&Z&&P(tn),te.start(F.transitions.duration.shortest,()=>{ee.current=!1})}),xe=tn=>{ee.current&&tn.type!=="touchstart"||(U&&U.removeAttribute("title"),pe.clear(),ae.clear(),h||UE&&m?pe.start(UE?m:h,()=>{me(tn)}):me(tn))},ke=tn=>{pe.clear(),ae.start(C,()=>{Se(tn)})},[,De]=v.useState(!1),_e=tn=>{bT(tn.target)||(De(!1),ke(tn))},ye=tn=>{U||q(tn.currentTarget),bT(tn.target)&&(De(!0),xe(tn))},Pe=tn=>{ee.current=!0;const ai=z.props;ai.onTouchStart&&ai.onTouchStart(tn)},Ae=tn=>{Pe(tn),ae.clear(),te.clear(),we(),ge.current=document.body.style.WebkitUserSelect,document.body.style.WebkitUserSelect="none",se.start(y,()=>{document.body.style.WebkitUserSelect=ge.current,xe(tn)})},Me=tn=>{z.props.onTouchEnd&&z.props.onTouchEnd(tn),we(),ae.start(E,()=>{Se(tn)})};v.useEffect(()=>{if(!Z)return;function tn(ai){ai.key==="Escape"&&Se(ai)}return document.addEventListener("keydown",tn),()=>{document.removeEventListener("keydown",tn)}},[Se,Z]);const We=Rr(mp(z),q,n);!L&&L!==0&&(Z=!1);const He=v.useRef(),Xe=tn=>{const ai=z.props;ai.onMouseMove&&ai.onMouseMove(tn),Z0={x:tn.clientX,y:tn.clientY},He.current&&He.current.update()},ht={},ot=typeof L=="string";c?(ht.title=!Z&&ot&&!d?L:null,ht["aria-describedby"]=Z?ce:null):(ht["aria-label"]=ot?L:null,ht["aria-labelledby"]=Z&&!ot?ce:null);const et={...ht,..._,...z.props,className:de(_.className,z.props.className),onTouchStart:Pe,ref:We,...w?{onMouseMove:Xe}:{}},St={};p||(et.onTouchStart=Ae,et.onTouchEnd=Me),d||(et.onMouseOver=WE(xe,et.onMouseOver),et.onMouseLeave=WE(ke,et.onMouseLeave),Q||(St.onMouseOver=xe,St.onMouseLeave=ke)),u||(et.onFocus=WE(ye,et.onFocus),et.onBlur=WE(_e,et.onBlur),Q||(St.onFocus=ye,St.onBlur=_e));const On=v.useMemo(()=>{var ai;let tn=[{name:"arrow",enabled:!!X,options:{element:X,padding:4}}];return(ai=O.popperOptions)!=null&&ai.modifiers&&(tn=tn.concat(O.popperOptions.modifiers)),{...O.popperOptions,modifiers:tn}},[X,O]),Ke={...r,isRtl:V,arrow:o,disableInteractive:Q,placement:A,PopperComponentProp:k,touch:ee.current},$e=R_e(Ke),Qe=N.popper??s.Popper??$_e,Et=N.transition??s.Transition??j??ap,Xt=N.tooltip??s.Tooltip??D_e,$t=N.arrow??s.Arrow??__e,bn=ry(Qe,{...O,...$.popper??l.popper,className:de($e.popper,O==null?void 0:O.className,(no=$.popper??l.popper)==null?void 0:no.className)},Ke),Gn=ry(Et,{...D,...$.transition??l.transition},Ke),Jn=ry(Xt,{...$.tooltip??l.tooltip,className:de($e.tooltip,(Bi=$.tooltip??l.tooltip)==null?void 0:Bi.className)},Ke),Do=ry($t,{...$.arrow??l.arrow,className:de($e.arrow,(Ds=$.arrow??l.arrow)==null?void 0:Ds.className)},Ke);return R.jsxs(v.Fragment,{children:[v.cloneElement(z,et),R.jsx(Qe,{as:k??Sp,placement:A,anchorEl:w?{getBoundingClientRect:()=>({top:Z0.y,left:Z0.x,right:Z0.x,bottom:Z0.y,width:0,height:0})}:U,popperRef:He,open:U?Z:!1,id:ce,transition:!0,...St,...bn,popperOptions:On,children:({TransitionProps:tn})=>R.jsx(Et,{timeout:F.transitions.duration.shorter,...tn,...Gn,children:R.jsxs(Xt,{...Jn,children:[L,o?R.jsx($t,{...Do,ref:ie}):null]})})})]})}),Wt=U1e({createStyledComponent:oe("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root}),useThemeProps:e=>at({props:e,name:"MuiStack"})}),NC=v.createContext({}),ck=v.createContext({});function N_e(e){return nt("MuiStep",e)}it("MuiStep",["root","horizontal","vertical","alternativeLabel","completed"]);const L_e=e=>{const{classes:t,orientation:n,alternativeLabel:r,completed:o}=e;return rt({root:["root",n,r&&"alternativeLabel",o&&"completed"]},N_e,t)},F_e=oe("div",{name:"MuiStep",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.orientation],n.alternativeLabel&&t.alternativeLabel,n.completed&&t.completed]}})({variants:[{props:{orientation:"horizontal"},style:{paddingLeft:8,paddingRight:8}},{props:{alternativeLabel:!0},style:{flex:1,position:"relative"}}]}),Am=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiStep"}),{active:o,children:i,className:a,component:s="div",completed:l,disabled:c,expanded:u=!1,index:d,last:f,...p}=r,{activeStep:h,connector:m,alternativeLabel:y,orientation:w,nonLinear:x}=v.useContext(NC);let[C=!1,E=!1,P=!1]=[o,l,c];h===d?C=o!==void 0?o:!0:!x&&h>d?E=l!==void 0?l:!0:!x&&h({index:d,last:f,expanded:u,icon:d+1,active:C,completed:E,disabled:P}),[d,f,u,C,E,P]),I={...r,active:C,orientation:w,alternativeLabel:y,completed:E,disabled:P,expanded:u,component:s},A=L_e(I),k=R.jsxs(F_e,{as:s,className:de(A.root,a),ref:n,ownerState:I,...p,children:[m&&y&&d!==0?m:null,i]});return R.jsx(ck.Provider,{value:T,children:m&&!y&&d!==0?R.jsxs(v.Fragment,{children:[m,k]}):k})}),j_e=ct(R.jsx("path",{d:"M12 0a12 12 0 1 0 0 24 12 12 0 0 0 0-24zm-2 17l-5-5 1.4-1.4 3.6 3.6 7.6-7.6L19 8l-9 9z"}),"CheckCircle"),B_e=ct(R.jsx("path",{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"}),"Warning");function z_e(e){return nt("MuiStepIcon",e)}const sD=it("MuiStepIcon",["root","active","completed","error","text"]);var Y6;const V_e=e=>{const{classes:t,active:n,completed:r,error:o}=e;return rt({root:["root",n&&"active",r&&"completed",o&&"error"],text:["text"]},z_e,t)},lD=oe(Nx,{name:"MuiStepIcon",slot:"Root",overridesResolver:(e,t)=>t.root})(Je(({theme:e})=>({display:"block",transition:e.transitions.create("color",{duration:e.transitions.duration.shortest}),color:(e.vars||e).palette.text.disabled,[`&.${sD.completed}`]:{color:(e.vars||e).palette.primary.main},[`&.${sD.active}`]:{color:(e.vars||e).palette.primary.main},[`&.${sD.error}`]:{color:(e.vars||e).palette.error.main}}))),H_e=oe("text",{name:"MuiStepIcon",slot:"Text",overridesResolver:(e,t)=>t.text})(Je(({theme:e})=>({fill:(e.vars||e).palette.primary.contrastText,fontSize:e.typography.caption.fontSize,fontFamily:e.typography.fontFamily}))),U_e=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiStepIcon"}),{active:o=!1,className:i,completed:a=!1,error:s=!1,icon:l,...c}=r,u={...r,active:o,completed:a,error:s},d=V_e(u);if(typeof l=="number"||typeof l=="string"){const f=de(i,d.root);return s?R.jsx(lD,{as:B_e,className:f,ref:n,ownerState:u,...c}):a?R.jsx(lD,{as:j_e,className:f,ref:n,ownerState:u,...c}):R.jsxs(lD,{className:f,ref:n,ownerState:u,...c,children:[Y6||(Y6=R.jsx("circle",{cx:"12",cy:"12",r:"12"})),R.jsx(H_e,{className:d.text,x:"12",y:"12",textAnchor:"middle",dominantBaseline:"central",ownerState:u,children:l})]})}return l});function W_e(e){return nt("MuiStepLabel",e)}const $f=it("MuiStepLabel",["root","horizontal","vertical","label","active","completed","error","disabled","iconContainer","alternativeLabel","labelContainer"]),G_e=e=>{const{classes:t,orientation:n,active:r,completed:o,error:i,disabled:a,alternativeLabel:s}=e;return rt({root:["root",n,i&&"error",a&&"disabled",s&&"alternativeLabel"],label:["label",r&&"active",o&&"completed",i&&"error",a&&"disabled",s&&"alternativeLabel"],iconContainer:["iconContainer",r&&"active",o&&"completed",i&&"error",a&&"disabled",s&&"alternativeLabel"],labelContainer:["labelContainer",s&&"alternativeLabel"]},W_e,t)},q_e=oe("span",{name:"MuiStepLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.orientation]]}})({display:"flex",alignItems:"center",[`&.${$f.alternativeLabel}`]:{flexDirection:"column"},[`&.${$f.disabled}`]:{cursor:"default"},variants:[{props:{orientation:"vertical"},style:{textAlign:"left",padding:"8px 0"}}]}),K_e=oe("span",{name:"MuiStepLabel",slot:"Label",overridesResolver:(e,t)=>t.label})(Je(({theme:e})=>({...e.typography.body2,display:"block",transition:e.transitions.create("color",{duration:e.transitions.duration.shortest}),[`&.${$f.active}`]:{color:(e.vars||e).palette.text.primary,fontWeight:500},[`&.${$f.completed}`]:{color:(e.vars||e).palette.text.primary,fontWeight:500},[`&.${$f.alternativeLabel}`]:{marginTop:16},[`&.${$f.error}`]:{color:(e.vars||e).palette.error.main}}))),Y_e=oe("span",{name:"MuiStepLabel",slot:"IconContainer",overridesResolver:(e,t)=>t.iconContainer})({flexShrink:0,display:"flex",paddingRight:8,[`&.${$f.alternativeLabel}`]:{paddingRight:0}}),Q_e=oe("span",{name:"MuiStepLabel",slot:"LabelContainer",overridesResolver:(e,t)=>t.labelContainer})(Je(({theme:e})=>({width:"100%",color:(e.vars||e).palette.text.secondary,[`&.${$f.alternativeLabel}`]:{textAlign:"center"}}))),df=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiStepLabel"}),{children:o,className:i,componentsProps:a={},error:s=!1,icon:l,optional:c,slots:u={},slotProps:d={},StepIconComponent:f,StepIconProps:p,...h}=r,{alternativeLabel:m,orientation:y}=v.useContext(NC),{active:w,disabled:x,completed:C,icon:E}=v.useContext(ck),P=l||E;let T=f;P&&!T&&(T=U_e);const I={...r,active:w,alternativeLabel:m,completed:C,disabled:x,error:s,orientation:y},A=G_e(I),k={slots:u,slotProps:{stepIcon:p,...a,...d}},[O,$]=Cr("label",{elementType:K_e,externalForwardedProps:k,ownerState:I}),[N,L]=Cr("stepIcon",{elementType:T,externalForwardedProps:k,ownerState:I});return R.jsxs(q_e,{className:de(A.root,i),ref:n,ownerState:I,...h,children:[P||N?R.jsx(Y_e,{className:A.iconContainer,ownerState:I,children:R.jsx(N,{completed:C,active:w,error:s,icon:P,...L})}):null,R.jsxs(Q_e,{className:A.labelContainer,ownerState:I,children:[o?R.jsx(O,{...$,className:de(A.label,$==null?void 0:$.className),children:o}):null,c]})]})});df&&(df.muiName="StepLabel");function X_e(e){return nt("MuiStepConnector",e)}it("MuiStepConnector",["root","horizontal","vertical","alternativeLabel","active","completed","disabled","line","lineHorizontal","lineVertical"]);const J_e=e=>{const{classes:t,orientation:n,alternativeLabel:r,active:o,completed:i,disabled:a}=e,s={root:["root",n,r&&"alternativeLabel",o&&"active",i&&"completed",a&&"disabled"],line:["line",`line${Ce(n)}`]};return rt(s,X_e,t)},Z_e=oe("div",{name:"MuiStepConnector",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.orientation],n.alternativeLabel&&t.alternativeLabel,n.completed&&t.completed]}})({flex:"1 1 auto",variants:[{props:{orientation:"vertical"},style:{marginLeft:12}},{props:{alternativeLabel:!0},style:{position:"absolute",top:12,left:"calc(-50% + 20px)",right:"calc(50% + 20px)"}}]}),e2e=oe("span",{name:"MuiStepConnector",slot:"Line",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.line,t[`line${Ce(n.orientation)}`]]}})(Je(({theme:e})=>{const t=e.palette.mode==="light"?e.palette.grey[400]:e.palette.grey[600];return{display:"block",borderColor:e.vars?e.vars.palette.StepConnector.border:t,variants:[{props:{orientation:"horizontal"},style:{borderTopStyle:"solid",borderTopWidth:1}},{props:{orientation:"vertical"},style:{borderLeftStyle:"solid",borderLeftWidth:1,minHeight:24}}]}})),t2e=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiStepConnector"}),{className:o,...i}=r,{alternativeLabel:a,orientation:s="horizontal"}=v.useContext(NC),{active:l,disabled:c,completed:u}=v.useContext(ck),d={...r,alternativeLabel:a,orientation:s,active:l,completed:u,disabled:c},f=J_e(d);return R.jsx(Z_e,{className:de(f.root,o),ref:n,ownerState:d,...i,children:R.jsx(e2e,{className:f.line,ownerState:d})})});function n2e(e){return nt("MuiStepContent",e)}it("MuiStepContent",["root","last","transition"]);const r2e=e=>{const{classes:t,last:n}=e;return rt({root:["root",n&&"last"],transition:["transition"]},n2e,t)},o2e=oe("div",{name:"MuiStepContent",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.last&&t.last]}})(Je(({theme:e})=>({marginLeft:12,paddingLeft:20,paddingRight:8,borderLeft:e.vars?`1px solid ${e.vars.palette.StepContent.border}`:`1px solid ${e.palette.mode==="light"?e.palette.grey[400]:e.palette.grey[600]}`,variants:[{props:{last:!0},style:{borderLeft:"none"}}]}))),i2e=oe(vl,{name:"MuiStepContent",slot:"Transition",overridesResolver:(e,t)=>t.transition})({}),km=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiStepContent"}),{children:o,className:i,TransitionComponent:a=vl,transitionDuration:s="auto",TransitionProps:l,...c}=r;v.useContext(NC);const{active:u,last:d,expanded:f}=v.useContext(ck),p={...r,last:d},h=r2e(p);let m=s;return s==="auto"&&!a.muiSupportAuto&&(m=void 0),R.jsx(o2e,{className:de(h.root,i),ref:n,ownerState:p,...c,children:R.jsx(i2e,{as:a,in:u||f,className:h.transition,ownerState:p,timeout:m,unmountOnExit:!0,...l,children:o})})});function a2e(e){return nt("MuiStepper",e)}it("MuiStepper",["root","horizontal","vertical","nonLinear","alternativeLabel"]);const s2e=e=>{const{orientation:t,nonLinear:n,alternativeLabel:r,classes:o}=e;return rt({root:["root",t,n&&"nonLinear",r&&"alternativeLabel"]},a2e,o)},l2e=oe("div",{name:"MuiStepper",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.orientation],n.alternativeLabel&&t.alternativeLabel,n.nonLinear&&t.nonLinear]}})({display:"flex",variants:[{props:{orientation:"horizontal"},style:{flexDirection:"row",alignItems:"center"}},{props:{orientation:"vertical"},style:{flexDirection:"column"}},{props:{alternativeLabel:!0},style:{alignItems:"flex-start"}}]}),c2e=R.jsx(t2e,{}),u2e=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiStepper"}),{activeStep:o=0,alternativeLabel:i=!1,children:a,className:s,component:l="div",connector:c=c2e,nonLinear:u=!1,orientation:d="horizontal",...f}=r,p={...r,nonLinear:u,alternativeLabel:i,orientation:d,component:l},h=s2e(p),m=v.Children.toArray(a).filter(Boolean),y=m.map((x,C)=>v.cloneElement(x,{index:C,last:C+1===m.length,...x.props})),w=v.useMemo(()=>({activeStep:o,alternativeLabel:i,connector:c,nonLinear:u,orientation:d}),[o,i,c,u,d]);return R.jsx(NC.Provider,{value:w,children:R.jsx(l2e,{as:l,ownerState:p,className:de(h.root,s),ref:n,...f,children:y})})});function d2e(e){return nt("MuiSwitch",e)}const Ki=it("MuiSwitch",["root","edgeStart","edgeEnd","switchBase","colorPrimary","colorSecondary","sizeSmall","sizeMedium","checked","disabled","input","thumb","track"]),f2e=e=>{const{classes:t,edge:n,size:r,color:o,checked:i,disabled:a}=e,s={root:["root",n&&`edge${Ce(n)}`,`size${Ce(r)}`],switchBase:["switchBase",`color${Ce(o)}`,i&&"checked",a&&"disabled"],thumb:["thumb"],track:["track"],input:["input"]},l=rt(s,d2e,t);return{...t,...l}},p2e=oe("span",{name:"MuiSwitch",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.edge&&t[`edge${Ce(n.edge)}`],t[`size${Ce(n.size)}`]]}})({display:"inline-flex",width:34+12*2,height:14+12*2,overflow:"hidden",padding:12,boxSizing:"border-box",position:"relative",flexShrink:0,zIndex:0,verticalAlign:"middle","@media print":{colorAdjust:"exact"},variants:[{props:{edge:"start"},style:{marginLeft:-8}},{props:{edge:"end"},style:{marginRight:-8}},{props:{size:"small"},style:{width:40,height:24,padding:7,[`& .${Ki.thumb}`]:{width:16,height:16},[`& .${Ki.switchBase}`]:{padding:4,[`&.${Ki.checked}`]:{transform:"translateX(16px)"}}}}]}),h2e=oe($ne,{name:"MuiSwitch",slot:"SwitchBase",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.switchBase,{[`& .${Ki.input}`]:t.input},n.color!=="default"&&t[`color${Ce(n.color)}`]]}})(Je(({theme:e})=>({position:"absolute",top:0,left:0,zIndex:1,color:e.vars?e.vars.palette.Switch.defaultColor:`${e.palette.mode==="light"?e.palette.common.white:e.palette.grey[300]}`,transition:e.transitions.create(["left","transform"],{duration:e.transitions.duration.shortest}),[`&.${Ki.checked}`]:{transform:"translateX(20px)"},[`&.${Ki.disabled}`]:{color:e.vars?e.vars.palette.Switch.defaultDisabledColor:`${e.palette.mode==="light"?e.palette.grey[100]:e.palette.grey[600]}`},[`&.${Ki.checked} + .${Ki.track}`]:{opacity:.5},[`&.${Ki.disabled} + .${Ki.track}`]:{opacity:e.vars?e.vars.opacity.switchTrackDisabled:`${e.palette.mode==="light"?.12:.2}`},[`& .${Ki.input}`]:{left:"-100%",width:"300%"}})),Je(({theme:e})=>({"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:xt(e.palette.action.active,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},variants:[...Object.entries(e.palette).filter(Kn(["light"])).map(([t])=>({props:{color:t},style:{[`&.${Ki.checked}`]:{color:(e.vars||e).palette[t].main,"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:xt(e.palette[t].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Ki.disabled}`]:{color:e.vars?e.vars.palette.Switch[`${t}DisabledColor`]:`${e.palette.mode==="light"?wd(e.palette[t].main,.62):bd(e.palette[t].main,.55)}`}},[`&.${Ki.checked} + .${Ki.track}`]:{backgroundColor:(e.vars||e).palette[t].main}}}))]}))),g2e=oe("span",{name:"MuiSwitch",slot:"Track",overridesResolver:(e,t)=>t.track})(Je(({theme:e})=>({height:"100%",width:"100%",borderRadius:14/2,zIndex:-1,transition:e.transitions.create(["opacity","background-color"],{duration:e.transitions.duration.shortest}),backgroundColor:e.vars?e.vars.palette.common.onBackground:`${e.palette.mode==="light"?e.palette.common.black:e.palette.common.white}`,opacity:e.vars?e.vars.opacity.switchTrack:`${e.palette.mode==="light"?.38:.3}`}))),m2e=oe("span",{name:"MuiSwitch",slot:"Thumb",overridesResolver:(e,t)=>t.thumb})(Je(({theme:e})=>({boxShadow:(e.vars||e).shadows[1],backgroundColor:"currentColor",width:20,height:20,borderRadius:"50%"}))),Fl=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiSwitch"}),{className:o,color:i="primary",edge:a=!1,size:s="medium",sx:l,...c}=r,u={...r,color:i,edge:a,size:s},d=f2e(u),f=R.jsx(m2e,{className:d.thumb,ownerState:u});return R.jsxs(p2e,{className:de(d.root,o),sx:l,ownerState:u,children:[R.jsx(h2e,{type:"checkbox",icon:f,checkedIcon:f,ref:n,ownerState:u,...c,classes:{...d,root:d.switchBase}}),R.jsx(g2e,{className:d.track,ownerState:u})]})});function y2e(e){return nt("MuiTab",e)}const Us=it("MuiTab",["root","labelIcon","textColorInherit","textColorPrimary","textColorSecondary","selected","disabled","fullWidth","wrapped","iconWrapper","icon"]),v2e=e=>{const{classes:t,textColor:n,fullWidth:r,wrapped:o,icon:i,label:a,selected:s,disabled:l}=e,c={root:["root",i&&a&&"labelIcon",`textColor${Ce(n)}`,r&&"fullWidth",o&&"wrapped",s&&"selected",l&&"disabled"],icon:["iconWrapper","icon"]};return rt(c,y2e,t)},b2e=oe(la,{name:"MuiTab",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.label&&n.icon&&t.labelIcon,t[`textColor${Ce(n.textColor)}`],n.fullWidth&&t.fullWidth,n.wrapped&&t.wrapped,{[`& .${Us.iconWrapper}`]:t.iconWrapper},{[`& .${Us.icon}`]:t.icon}]}})(Je(({theme:e})=>({...e.typography.button,maxWidth:360,minWidth:90,position:"relative",minHeight:48,flexShrink:0,padding:"12px 16px",overflow:"hidden",whiteSpace:"normal",textAlign:"center",lineHeight:1.25,variants:[{props:({ownerState:t})=>t.label&&(t.iconPosition==="top"||t.iconPosition==="bottom"),style:{flexDirection:"column"}},{props:({ownerState:t})=>t.label&&t.iconPosition!=="top"&&t.iconPosition!=="bottom",style:{flexDirection:"row"}},{props:({ownerState:t})=>t.icon&&t.label,style:{minHeight:72,paddingTop:9,paddingBottom:9}},{props:({ownerState:t,iconPosition:n})=>t.icon&&t.label&&n==="top",style:{[`& > .${Us.icon}`]:{marginBottom:6}}},{props:({ownerState:t,iconPosition:n})=>t.icon&&t.label&&n==="bottom",style:{[`& > .${Us.icon}`]:{marginTop:6}}},{props:({ownerState:t,iconPosition:n})=>t.icon&&t.label&&n==="start",style:{[`& > .${Us.icon}`]:{marginRight:e.spacing(1)}}},{props:({ownerState:t,iconPosition:n})=>t.icon&&t.label&&n==="end",style:{[`& > .${Us.icon}`]:{marginLeft:e.spacing(1)}}},{props:{textColor:"inherit"},style:{color:"inherit",opacity:.6,[`&.${Us.selected}`]:{opacity:1},[`&.${Us.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity}}},{props:{textColor:"primary"},style:{color:(e.vars||e).palette.text.secondary,[`&.${Us.selected}`]:{color:(e.vars||e).palette.primary.main},[`&.${Us.disabled}`]:{color:(e.vars||e).palette.text.disabled}}},{props:{textColor:"secondary"},style:{color:(e.vars||e).palette.text.secondary,[`&.${Us.selected}`]:{color:(e.vars||e).palette.secondary.main},[`&.${Us.disabled}`]:{color:(e.vars||e).palette.text.disabled}}},{props:({ownerState:t})=>t.fullWidth,style:{flexShrink:1,flexGrow:1,flexBasis:0,maxWidth:"none"}},{props:({ownerState:t})=>t.wrapped,style:{fontSize:e.typography.pxToRem(12)}}]}))),Q6=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiTab"}),{className:o,disabled:i=!1,disableFocusRipple:a=!1,fullWidth:s,icon:l,iconPosition:c="top",indicator:u,label:d,onChange:f,onClick:p,onFocus:h,selected:m,selectionFollowsFocus:y,textColor:w="inherit",value:x,wrapped:C=!1,...E}=r,P={...r,disabled:i,disableFocusRipple:a,selected:m,icon:!!l,iconPosition:c,label:!!d,fullWidth:s,textColor:w,wrapped:C},T=v2e(P),I=l&&d&&v.isValidElement(l)?v.cloneElement(l,{className:de(T.icon,l.props.className)}):l,A=O=>{!m&&f&&f(O,x),p&&p(O)},k=O=>{y&&!m&&f&&f(O,x),h&&h(O)};return R.jsxs(b2e,{focusRipple:!a,className:de(T.root,o),ref:n,role:"tab","aria-selected":m,disabled:i,onClick:A,onFocus:k,ownerState:P,tabIndex:m?0:-1,...E,children:[c==="top"||c==="start"?R.jsxs(v.Fragment,{children:[I,d]}):R.jsxs(v.Fragment,{children:[d,I]}),u]})}),Yne=v.createContext();function w2e(e){return nt("MuiTable",e)}it("MuiTable",["root","stickyHeader"]);const x2e=e=>{const{classes:t,stickyHeader:n}=e;return rt({root:["root",n&&"stickyHeader"]},w2e,t)},S2e=oe("table",{name:"MuiTable",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.stickyHeader&&t.stickyHeader]}})(Je(({theme:e})=>({display:"table",width:"100%",borderCollapse:"collapse",borderSpacing:0,"& caption":{...e.typography.body2,padding:e.spacing(2),color:(e.vars||e).palette.text.secondary,textAlign:"left",captionSide:"bottom"},variants:[{props:({ownerState:t})=>t.stickyHeader,style:{borderCollapse:"separate"}}]}))),X6="table",Ml=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiTable"}),{className:o,component:i=X6,padding:a="normal",size:s="medium",stickyHeader:l=!1,...c}=r,u={...r,component:i,padding:a,size:s,stickyHeader:l},d=x2e(u),f=v.useMemo(()=>({padding:a,size:s,stickyHeader:l}),[a,s,l]);return R.jsx(Yne.Provider,{value:f,children:R.jsx(S2e,{as:i,role:i===X6?null:"table",ref:n,className:de(d.root,o),ownerState:u,...c})})}),uk=v.createContext();function C2e(e){return nt("MuiTableBody",e)}it("MuiTableBody",["root"]);const E2e=e=>{const{classes:t}=e;return rt({root:["root"]},C2e,t)},P2e=oe("tbody",{name:"MuiTableBody",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"table-row-group"}),T2e={variant:"body"},J6="tbody",Rl=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiTableBody"}),{className:o,component:i=J6,...a}=r,s={...r,component:i},l=E2e(s);return R.jsx(uk.Provider,{value:T2e,children:R.jsx(P2e,{className:de(l.root,o),as:i,ref:n,role:i===J6?null:"rowgroup",ownerState:s,...a})})});function I2e(e){return nt("MuiTableCell",e)}const O2e=it("MuiTableCell",["root","head","body","footer","sizeSmall","sizeMedium","paddingCheckbox","paddingNone","alignLeft","alignCenter","alignRight","alignJustify","stickyHeader"]),A2e=e=>{const{classes:t,variant:n,align:r,padding:o,size:i,stickyHeader:a}=e,s={root:["root",n,a&&"stickyHeader",r!=="inherit"&&`align${Ce(r)}`,o!=="normal"&&`padding${Ce(o)}`,`size${Ce(i)}`]};return rt(s,I2e,t)},k2e=oe("td",{name:"MuiTableCell",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`size${Ce(n.size)}`],n.padding!=="normal"&&t[`padding${Ce(n.padding)}`],n.align!=="inherit"&&t[`align${Ce(n.align)}`],n.stickyHeader&&t.stickyHeader]}})(Je(({theme:e})=>({...e.typography.body2,display:"table-cell",verticalAlign:"inherit",borderBottom:e.vars?`1px solid ${e.vars.palette.TableCell.border}`:`1px solid - ${e.palette.mode==="light"?wd(xt(e.palette.divider,1),.88):bd(xt(e.palette.divider,1),.68)}`,textAlign:"left",padding:16,variants:[{props:{variant:"head"},style:{color:(e.vars||e).palette.text.primary,lineHeight:e.typography.pxToRem(24),fontWeight:e.typography.fontWeightMedium}},{props:{variant:"body"},style:{color:(e.vars||e).palette.text.primary}},{props:{variant:"footer"},style:{color:(e.vars||e).palette.text.secondary,lineHeight:e.typography.pxToRem(21),fontSize:e.typography.pxToRem(12)}},{props:{size:"small"},style:{padding:"6px 16px",[`&.${O2e.paddingCheckbox}`]:{width:24,padding:"0 12px 0 16px","& > *":{padding:0}}}},{props:{padding:"checkbox"},style:{width:48,padding:"0 0 0 4px"}},{props:{padding:"none"},style:{padding:0}},{props:{align:"left"},style:{textAlign:"left"}},{props:{align:"center"},style:{textAlign:"center"}},{props:{align:"right"},style:{textAlign:"right",flexDirection:"row-reverse"}},{props:{align:"justify"},style:{textAlign:"justify"}},{props:({ownerState:t})=>t.stickyHeader,style:{position:"sticky",top:0,zIndex:2,backgroundColor:(e.vars||e).palette.background.default}}]}))),Ie=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiTableCell"}),{align:o="inherit",className:i,component:a,padding:s,scope:l,size:c,sortDirection:u,variant:d,...f}=r,p=v.useContext(Yne),h=v.useContext(uk),m=h&&h.variant==="head";let y;a?y=a:y=m?"th":"td";let w=l;y==="td"?w=void 0:!w&&m&&(w="col");const x=d||h&&h.variant,C={...r,align:o,component:y,padding:s||(p&&p.padding?p.padding:"normal"),size:c||(p&&p.size?p.size:"medium"),sortDirection:u,stickyHeader:x==="head"&&p&&p.stickyHeader,variant:x},E=A2e(C);let P=null;return u&&(P=u==="asc"?"ascending":"descending"),R.jsx(k2e,{as:y,ref:n,className:de(E.root,i),"aria-sort":P,scope:w,ownerState:C,...f})});function M2e(e){return nt("MuiTableContainer",e)}it("MuiTableContainer",["root"]);const R2e=e=>{const{classes:t}=e;return rt({root:["root"]},M2e,t)},$2e=oe("div",{name:"MuiTableContainer",slot:"Root",overridesResolver:(e,t)=>t.root})({width:"100%",overflowX:"auto"}),Mc=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiTableContainer"}),{className:o,component:i="div",...a}=r,s={...r,component:i},l=R2e(s);return R.jsx($2e,{ref:n,as:i,className:de(l.root,o),ownerState:s,...a})});function D2e(e){return nt("MuiTableHead",e)}it("MuiTableHead",["root"]);const _2e=e=>{const{classes:t}=e;return rt({root:["root"]},D2e,t)},N2e=oe("thead",{name:"MuiTableHead",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"table-header-group"}),L2e={variant:"head"},Z6="thead",Cu=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiTableHead"}),{className:o,component:i=Z6,...a}=r,s={...r,component:i},l=_2e(s);return R.jsx(uk.Provider,{value:L2e,children:R.jsx(N2e,{as:i,className:de(l.root,o),ref:n,role:i===Z6?null:"rowgroup",ownerState:s,...a})})});function F2e(e){return nt("MuiToolbar",e)}it("MuiToolbar",["root","gutters","regular","dense"]);const j2e=e=>{const{classes:t,disableGutters:n,variant:r}=e;return rt({root:["root",!n&&"gutters",r]},F2e,t)},B2e=oe("div",{name:"MuiToolbar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableGutters&&t.gutters,t[n.variant]]}})(Je(({theme:e})=>({position:"relative",display:"flex",alignItems:"center",variants:[{props:({ownerState:t})=>!t.disableGutters,style:{paddingLeft:e.spacing(2),paddingRight:e.spacing(2),[e.breakpoints.up("sm")]:{paddingLeft:e.spacing(3),paddingRight:e.spacing(3)}}},{props:{variant:"dense"},style:{minHeight:48}},{props:{variant:"regular"},style:e.mixins.toolbar}]}))),Qne=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiToolbar"}),{className:o,component:i="div",disableGutters:a=!1,variant:s="regular",...l}=r,c={...r,component:i,disableGutters:a,variant:s},u=j2e(c);return R.jsx(B2e,{as:i,className:de(u.root,o),ref:n,ownerState:c,...l})}),Xne=ct(R.jsx("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"}),"KeyboardArrowLeft"),Jne=ct(R.jsx("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"}),"KeyboardArrowRight"),z2e=v.forwardRef(function(t,n){const{backIconButtonProps:r,count:o,disabled:i=!1,getItemAriaLabel:a,nextIconButtonProps:s,onPageChange:l,page:c,rowsPerPage:u,showFirstButton:d,showLastButton:f,slots:p={},slotProps:h={},...m}=t,y=dr(),w=q=>{l(q,0)},x=q=>{l(q,c-1)},C=q=>{l(q,c+1)},E=q=>{l(q,Math.max(0,Math.ceil(o/u)-1))},P=p.firstButton??vn,T=p.lastButton??vn,I=p.nextButton??vn,A=p.previousButton??vn,k=p.firstButtonIcon??Gne,O=p.lastButtonIcon??qne,$=p.nextButtonIcon??Jne,N=p.previousButtonIcon??Xne,L=y?T:P,j=y?I:A,D=y?A:I,_=y?P:T,z=y?h.lastButton:h.firstButton,F=y?h.nextButton:h.previousButton,V=y?h.previousButton:h.nextButton,U=y?h.firstButton:h.lastButton;return R.jsxs("div",{ref:n,...m,children:[d&&R.jsx(L,{onClick:w,disabled:i||c===0,"aria-label":a("first",c),title:a("first",c),...z,children:y?R.jsx(O,{...h.lastButtonIcon}):R.jsx(k,{...h.firstButtonIcon})}),R.jsx(j,{onClick:x,disabled:i||c===0,color:"inherit","aria-label":a("previous",c),title:a("previous",c),...F??r,children:y?R.jsx($,{...h.nextButtonIcon}):R.jsx(N,{...h.previousButtonIcon})}),R.jsx(D,{onClick:C,disabled:i||(o!==-1?c>=Math.ceil(o/u)-1:!1),color:"inherit","aria-label":a("next",c),title:a("next",c),...V??s,children:y?R.jsx(N,{...h.previousButtonIcon}):R.jsx($,{...h.nextButtonIcon})}),f&&R.jsx(_,{onClick:E,disabled:i||c>=Math.ceil(o/u)-1,"aria-label":a("last",c),title:a("last",c),...U,children:y?R.jsx(k,{...h.firstButtonIcon}):R.jsx(O,{...h.lastButtonIcon})})]})});function V2e(e){return nt("MuiTablePagination",e)}const Xh=it("MuiTablePagination",["root","toolbar","spacer","selectLabel","selectRoot","select","selectIcon","input","menuItem","displayedRows","actions"]);var eG;const H2e=oe(Ie,{name:"MuiTablePagination",slot:"Root",overridesResolver:(e,t)=>t.root})(Je(({theme:e})=>({overflow:"auto",color:(e.vars||e).palette.text.primary,fontSize:e.typography.pxToRem(14),"&:last-child":{padding:0}}))),U2e=oe(Qne,{name:"MuiTablePagination",slot:"Toolbar",overridesResolver:(e,t)=>({[`& .${Xh.actions}`]:t.actions,...t.toolbar})})(Je(({theme:e})=>({minHeight:52,paddingRight:2,[`${e.breakpoints.up("xs")} and (orientation: landscape)`]:{minHeight:52},[e.breakpoints.up("sm")]:{minHeight:52,paddingRight:2},[`& .${Xh.actions}`]:{flexShrink:0,marginLeft:20}}))),W2e=oe("div",{name:"MuiTablePagination",slot:"Spacer",overridesResolver:(e,t)=>t.spacer})({flex:"1 1 100%"}),G2e=oe("p",{name:"MuiTablePagination",slot:"SelectLabel",overridesResolver:(e,t)=>t.selectLabel})(Je(({theme:e})=>({...e.typography.body2,flexShrink:0}))),q2e=oe(Pp,{name:"MuiTablePagination",slot:"Select",overridesResolver:(e,t)=>({[`& .${Xh.selectIcon}`]:t.selectIcon,[`& .${Xh.select}`]:t.select,...t.input,...t.selectRoot})})({color:"inherit",fontSize:"inherit",flexShrink:0,marginRight:32,marginLeft:8,[`& .${Xh.select}`]:{paddingLeft:8,paddingRight:24,textAlign:"right",textAlignLast:"right"}}),K2e=oe(en,{name:"MuiTablePagination",slot:"MenuItem",overridesResolver:(e,t)=>t.menuItem})({}),Y2e=oe("p",{name:"MuiTablePagination",slot:"DisplayedRows",overridesResolver:(e,t)=>t.displayedRows})(Je(({theme:e})=>({...e.typography.body2,flexShrink:0})));function Q2e({from:e,to:t,count:n}){return`${e}–${t} of ${n!==-1?n:`more than ${t}`}`}function X2e(e){return`Go to ${e} page`}const J2e=e=>{const{classes:t}=e;return rt({root:["root"],toolbar:["toolbar"],spacer:["spacer"],selectLabel:["selectLabel"],select:["select"],input:["input"],selectIcon:["selectIcon"],menuItem:["menuItem"],displayedRows:["displayedRows"],actions:["actions"]},V2e,t)},rz=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiTablePagination"}),{ActionsComponent:o=z2e,backIconButtonProps:i,className:a,colSpan:s,component:l=Ie,count:c,disabled:u=!1,getItemAriaLabel:d=X2e,labelDisplayedRows:f=Q2e,labelRowsPerPage:p="Rows per page:",nextIconButtonProps:h,onPageChange:m,onRowsPerPageChange:y,page:w,rowsPerPage:x,rowsPerPageOptions:C=[10,25,50,100],SelectProps:E={},showFirstButton:P=!1,showLastButton:T=!1,slotProps:I={},slots:A={},...k}=r,O=r,$=J2e(O),N=(I==null?void 0:I.select)??E,L=N.native?"option":K2e;let j;(l===Ie||l==="td")&&(j=s||1e3);const D=np(N.id),_=np(N.labelId),z=()=>c===-1?(w+1)*x:x===-1?c:Math.min(c,(w+1)*x);return R.jsx(H2e,{colSpan:j,ref:n,as:l,ownerState:O,className:de($.root,a),...k,children:R.jsxs(U2e,{className:$.toolbar,children:[R.jsx(W2e,{className:$.spacer}),C.length>1&&R.jsx(G2e,{className:$.selectLabel,id:_,children:p}),C.length>1&&R.jsx(q2e,{variant:"standard",...!N.variant&&{input:eG||(eG=R.jsx(Pb,{}))},value:x,onChange:y,id:D,labelId:_,...N,classes:{...N.classes,root:de($.input,$.selectRoot,(N.classes||{}).root),select:de($.select,(N.classes||{}).select),icon:de($.selectIcon,(N.classes||{}).icon)},disabled:u,children:C.map(F=>v.createElement(L,{...!Tv(L)&&{ownerState:O},className:$.menuItem,key:F.label?F.label:F,value:F.value?F.value:F},F.label?F.label:F))}),R.jsx(Y2e,{className:$.displayedRows,children:f({from:c===0?0:w*x+1,to:z(),count:c===-1?-1:c,page:w})}),R.jsx(o,{className:$.actions,backIconButtonProps:i,count:c,nextIconButtonProps:h,onPageChange:m,page:w,rowsPerPage:x,showFirstButton:P,showLastButton:T,slotProps:I.actions,slots:A.actions,getItemAriaLabel:d,disabled:u})]})})});function Z2e(e){return nt("MuiTableRow",e)}const tG=it("MuiTableRow",["root","selected","hover","head","footer"]),eNe=e=>{const{classes:t,selected:n,hover:r,head:o,footer:i}=e;return rt({root:["root",n&&"selected",r&&"hover",o&&"head",i&&"footer"]},Z2e,t)},tNe=oe("tr",{name:"MuiTableRow",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.head&&t.head,n.footer&&t.footer]}})(Je(({theme:e})=>({color:"inherit",display:"table-row",verticalAlign:"middle",outline:0,[`&.${tG.hover}:hover`]:{backgroundColor:(e.vars||e).palette.action.hover},[`&.${tG.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:xt(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}))`:xt(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity)}}}))),nG="tr",Ht=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiTableRow"}),{className:o,component:i=nG,hover:a=!1,selected:s=!1,...l}=r,c=v.useContext(uk),u={...r,component:i,hover:a,selected:s,head:c&&c.variant==="head",footer:c&&c.variant==="footer"},d=eNe(u);return R.jsx(tNe,{as:i,ref:n,className:de(d.root,o),role:i===nG?null:"row",ownerState:u,...l})});function nNe(e){return(1+Math.sin(Math.PI*e-Math.PI/2))/2}function rNe(e,t,n,r={},o=()=>{}){const{ease:i=nNe,duration:a=300}=r;let s=null;const l=t[e];let c=!1;const u=()=>{c=!0},d=f=>{if(c){o(new Error("Animation cancelled"));return}s===null&&(s=f);const p=Math.min(1,(f-s)/a);if(t[e]=i(p)*(n-l)+l,p>=1){requestAnimationFrame(()=>{o(null)});return}requestAnimationFrame(d)};return l===n?(o(new Error("Element already at target position")),u):(requestAnimationFrame(d),u)}const oNe={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll"};function iNe(e){const{onChange:t,...n}=e,r=v.useRef(),o=v.useRef(null),i=()=>{r.current=o.current.offsetHeight-o.current.clientHeight};return xs(()=>{const a=PC(()=>{const l=r.current;i(),l!==r.current&&t(r.current)}),s=Ss(o.current);return s.addEventListener("resize",a),()=>{a.clear(),s.removeEventListener("resize",a)}},[t]),v.useEffect(()=>{i(),t(r.current)},[t]),R.jsx("div",{style:oNe,ref:o,...n})}function aNe(e){return nt("MuiTabScrollButton",e)}const sNe=it("MuiTabScrollButton",["root","vertical","horizontal","disabled"]),lNe=e=>{const{classes:t,orientation:n,disabled:r}=e;return rt({root:["root",n,r&&"disabled"]},aNe,t)},cNe=oe(la,{name:"MuiTabScrollButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.orientation&&t[n.orientation]]}})({width:40,flexShrink:0,opacity:.8,[`&.${sNe.disabled}`]:{opacity:0},variants:[{props:{orientation:"vertical"},style:{width:"100%",height:40,"& svg":{transform:"var(--TabScrollButton-svgRotate)"}}}]}),uNe=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiTabScrollButton"}),{className:o,slots:i={},slotProps:a={},direction:s,orientation:l,disabled:c,...u}=r,d=dr(),f={isRtl:d,...r},p=lNe(f),h=i.StartScrollButtonIcon??Xne,m=i.EndScrollButtonIcon??Jne,y=hu({elementType:h,externalSlotProps:a.startScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:f}),w=hu({elementType:m,externalSlotProps:a.endScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:f});return R.jsx(cNe,{component:"div",className:de(p.root,o),ref:n,role:null,ownerState:f,tabIndex:null,...u,style:{...u.style,...l==="vertical"&&{"--TabScrollButton-svgRotate":`rotate(${d?-90:90}deg)`}},children:s==="left"?R.jsx(h,{...y}):R.jsx(m,{...w})})});function dNe(e){return nt("MuiTabs",e)}const XP=it("MuiTabs",["root","vertical","flexContainer","flexContainerVertical","centered","scroller","fixed","scrollableX","scrollableY","hideScrollbar","scrollButtons","scrollButtonsHideMobile","indicator"]),rG=(e,t)=>e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:e.firstChild,oG=(e,t)=>e===t?e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:e.lastChild,GE=(e,t,n)=>{let r=!1,o=n(e,t);for(;o;){if(o===e.firstChild){if(r)return;r=!0}const i=o.disabled||o.getAttribute("aria-disabled")==="true";if(!o.hasAttribute("tabindex")||i)o=n(e,o);else{o.focus();return}}},fNe=e=>{const{vertical:t,fixed:n,hideScrollbar:r,scrollableX:o,scrollableY:i,centered:a,scrollButtonsHideMobile:s,classes:l}=e;return rt({root:["root",t&&"vertical"],scroller:["scroller",n&&"fixed",r&&"hideScrollbar",o&&"scrollableX",i&&"scrollableY"],flexContainer:["flexContainer",t&&"flexContainerVertical",a&&"centered"],indicator:["indicator"],scrollButtons:["scrollButtons",s&&"scrollButtonsHideMobile"],scrollableX:[o&&"scrollableX"],hideScrollbar:[r&&"hideScrollbar"]},dNe,l)},pNe=oe("div",{name:"MuiTabs",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${XP.scrollButtons}`]:t.scrollButtons},{[`& .${XP.scrollButtons}`]:n.scrollButtonsHideMobile&&t.scrollButtonsHideMobile},t.root,n.vertical&&t.vertical]}})(Je(({theme:e})=>({overflow:"hidden",minHeight:48,WebkitOverflowScrolling:"touch",display:"flex",variants:[{props:({ownerState:t})=>t.vertical,style:{flexDirection:"column"}},{props:({ownerState:t})=>t.scrollButtonsHideMobile,style:{[`& .${XP.scrollButtons}`]:{[e.breakpoints.down("sm")]:{display:"none"}}}}]}))),hNe=oe("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]}})({position:"relative",display:"inline-block",flex:"1 1 auto",whiteSpace:"nowrap",variants:[{props:({ownerState:e})=>e.fixed,style:{overflowX:"hidden",width:"100%"}},{props:({ownerState:e})=>e.hideScrollbar,style:{scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}},{props:({ownerState:e})=>e.scrollableX,style:{overflowX:"auto",overflowY:"hidden"}},{props:({ownerState:e})=>e.scrollableY,style:{overflowY:"auto",overflowX:"hidden"}}]}),gNe=oe("div",{name:"MuiTabs",slot:"FlexContainer",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.flexContainer,n.vertical&&t.flexContainerVertical,n.centered&&t.centered]}})({display:"flex",variants:[{props:({ownerState:e})=>e.vertical,style:{flexDirection:"column"}},{props:({ownerState:e})=>e.centered,style:{justifyContent:"center"}}]}),mNe=oe("span",{name:"MuiTabs",slot:"Indicator",overridesResolver:(e,t)=>t.indicator})(Je(({theme:e})=>({position:"absolute",height:2,bottom:0,width:"100%",transition:e.transitions.create(),variants:[{props:{indicatorColor:"primary"},style:{backgroundColor:(e.vars||e).palette.primary.main}},{props:{indicatorColor:"secondary"},style:{backgroundColor:(e.vars||e).palette.secondary.main}},{props:({ownerState:t})=>t.vertical,style:{height:"100%",width:2,right:0}}]}))),yNe=oe(iNe)({overflowX:"auto",overflowY:"hidden",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}),iG={},vNe=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiTabs"}),o=Ro(),i=dr(),{"aria-label":a,"aria-labelledby":s,action:l,centered:c=!1,children:u,className:d,component:f="div",allowScrollButtonsMobile:p=!1,indicatorColor:h="primary",onChange:m,orientation:y="horizontal",ScrollButtonComponent:w=uNe,scrollButtons:x="auto",selectionFollowsFocus:C,slots:E={},slotProps:P={},TabIndicatorProps:T={},TabScrollButtonProps:I={},textColor:A="primary",value:k,variant:O="standard",visibleScrollbar:$=!1,...N}=r,L=O==="scrollable",j=y==="vertical",D=j?"scrollTop":"scrollLeft",_=j?"top":"left",z=j?"bottom":"right",F=j?"clientHeight":"clientWidth",V=j?"height":"width",U={...r,component:f,allowScrollButtonsMobile:p,indicatorColor:h,orientation:y,vertical:j,scrollButtons:x,textColor:A,variant:O,visibleScrollbar:$,fixed:!L,hideScrollbar:L&&!$,scrollableX:L&&!j,scrollableY:L&&j,centered:c&&!L,scrollButtonsHideMobile:!p},q=fNe(U),X=hu({elementType:E.StartScrollButtonIcon,externalSlotProps:P.startScrollButtonIcon,ownerState:U}),ie=hu({elementType:E.EndScrollButtonIcon,externalSlotProps:P.endScrollButtonIcon,ownerState:U}),[ee,Q]=v.useState(!1),[te,pe]=v.useState(iG),[ae,se]=v.useState(!1),[re,fe]=v.useState(!1),[Z,ce]=v.useState(!1),[ge,we]=v.useState({overflow:"hidden",scrollbarWidth:0}),me=new Map,Se=v.useRef(null),xe=v.useRef(null),ke=()=>{const $e=Se.current;let Qe;if($e){const Xt=$e.getBoundingClientRect();Qe={clientWidth:$e.clientWidth,scrollLeft:$e.scrollLeft,scrollTop:$e.scrollTop,scrollWidth:$e.scrollWidth,top:Xt.top,bottom:Xt.bottom,left:Xt.left,right:Xt.right}}let Et;if($e&&k!==!1){const Xt=xe.current.children;if(Xt.length>0){const $t=Xt[me.get(k)];Et=$t?$t.getBoundingClientRect():null}}return{tabsMeta:Qe,tabMeta:Et}},De=ei(()=>{const{tabsMeta:$e,tabMeta:Qe}=ke();let Et=0,Xt;j?(Xt="top",Qe&&$e&&(Et=Qe.top-$e.top+$e.scrollTop)):(Xt=i?"right":"left",Qe&&$e&&(Et=(i?-1:1)*(Qe[Xt]-$e[Xt]+$e.scrollLeft)));const $t={[Xt]:Et,[V]:Qe?Qe[V]:0};if(typeof te[Xt]!="number"||typeof te[V]!="number")pe($t);else{const bn=Math.abs(te[Xt]-$t[Xt]),Gn=Math.abs(te[V]-$t[V]);(bn>=1||Gn>=1)&&pe($t)}}),_e=($e,{animation:Qe=!0}={})=>{Qe?rNe(D,Se.current,$e,{duration:o.transitions.duration.standard}):Se.current[D]=$e},ye=$e=>{let Qe=Se.current[D];j?Qe+=$e:Qe+=$e*(i?-1:1),_e(Qe)},Pe=()=>{const $e=Se.current[F];let Qe=0;const Et=Array.from(xe.current.children);for(let Xt=0;Xt$e){Xt===0&&(Qe=$e);break}Qe+=$t[F]}return Qe},Ae=()=>{ye(-1*Pe())},Me=()=>{ye(Pe())},We=v.useCallback($e=>{we({overflow:null,scrollbarWidth:$e})},[]),He=()=>{const $e={};$e.scrollbarSizeListener=L?R.jsx(yNe,{onChange:We,className:de(q.scrollableX,q.hideScrollbar)}):null;const Et=L&&(x==="auto"&&(ae||re)||x===!0);return $e.scrollButtonStart=Et?R.jsx(w,{slots:{StartScrollButtonIcon:E.StartScrollButtonIcon},slotProps:{startScrollButtonIcon:X},orientation:y,direction:i?"right":"left",onClick:Ae,disabled:!ae,...I,className:de(q.scrollButtons,I.className)}):null,$e.scrollButtonEnd=Et?R.jsx(w,{slots:{EndScrollButtonIcon:E.EndScrollButtonIcon},slotProps:{endScrollButtonIcon:ie},orientation:y,direction:i?"left":"right",onClick:Me,disabled:!re,...I,className:de(q.scrollButtons,I.className)}):null,$e},Xe=ei($e=>{const{tabsMeta:Qe,tabMeta:Et}=ke();if(!(!Et||!Qe)){if(Et[_]Qe[z]){const Xt=Qe[D]+(Et[z]-Qe[z]);_e(Xt,{animation:$e})}}}),ht=ei(()=>{L&&x!==!1&&ce(!Z)});v.useEffect(()=>{const $e=PC(()=>{Se.current&&De()});let Qe;const Et=bn=>{bn.forEach(Gn=>{Gn.removedNodes.forEach(Jn=>{Qe==null||Qe.unobserve(Jn)}),Gn.addedNodes.forEach(Jn=>{Qe==null||Qe.observe(Jn)})}),$e(),ht()},Xt=Ss(Se.current);Xt.addEventListener("resize",$e);let $t;return typeof ResizeObserver<"u"&&(Qe=new ResizeObserver($e),Array.from(xe.current.children).forEach(bn=>{Qe.observe(bn)})),typeof MutationObserver<"u"&&($t=new MutationObserver(Et),$t.observe(xe.current,{childList:!0})),()=>{$e.clear(),Xt.removeEventListener("resize",$e),$t==null||$t.disconnect(),Qe==null||Qe.disconnect()}},[De,ht]),v.useEffect(()=>{const $e=Array.from(xe.current.children),Qe=$e.length;if(typeof IntersectionObserver<"u"&&Qe>0&&L&&x!==!1){const Et=$e[0],Xt=$e[Qe-1],$t={root:Se.current,threshold:.99},bn=no=>{se(!no[0].isIntersecting)},Gn=new IntersectionObserver(bn,$t);Gn.observe(Et);const Jn=no=>{fe(!no[0].isIntersecting)},Do=new IntersectionObserver(Jn,$t);return Do.observe(Xt),()=>{Gn.disconnect(),Do.disconnect()}}},[L,x,Z,u==null?void 0:u.length]),v.useEffect(()=>{Q(!0)},[]),v.useEffect(()=>{De()}),v.useEffect(()=>{Xe(iG!==te)},[Xe,te]),v.useImperativeHandle(l,()=>({updateIndicator:De,updateScrollButtons:ht}),[De,ht]);const ot=R.jsx(mNe,{...T,className:de(q.indicator,T.className),ownerState:U,style:{...te,...T.style}});let et=0;const St=v.Children.map(u,$e=>{if(!v.isValidElement($e))return null;const Qe=$e.props.value===void 0?et:$e.props.value;me.set(Qe,et);const Et=Qe===k;return et+=1,v.cloneElement($e,{fullWidth:O==="fullWidth",indicator:Et&&!ee&&ot,selected:Et,selectionFollowsFocus:C,onChange:m,textColor:A,value:Qe,...et===1&&k===!1&&!$e.props.tabIndex?{tabIndex:0}:{}})}),On=$e=>{const Qe=xe.current,Et=yi(Qe).activeElement;if(Et.getAttribute("role")!=="tab")return;let $t=y==="horizontal"?"ArrowLeft":"ArrowUp",bn=y==="horizontal"?"ArrowRight":"ArrowDown";switch(y==="horizontal"&&i&&($t="ArrowRight",bn="ArrowLeft"),$e.key){case $t:$e.preventDefault(),GE(Qe,Et,oG);break;case bn:$e.preventDefault(),GE(Qe,Et,rG);break;case"Home":$e.preventDefault(),GE(Qe,null,rG);break;case"End":$e.preventDefault(),GE(Qe,null,oG);break}},Ke=He();return R.jsxs(pNe,{className:de(q.root,d),ownerState:U,ref:n,as:f,...N,children:[Ke.scrollButtonStart,Ke.scrollbarSizeListener,R.jsxs(hNe,{className:q.scroller,ownerState:U,style:{overflow:ge.overflow,[j?`margin${i?"Left":"Right"}`:"marginBottom"]:$?void 0:-ge.scrollbarWidth},ref:Se,children:[R.jsx(gNe,{"aria-label":a,"aria-labelledby":s,"aria-orientation":y==="vertical"?"vertical":null,className:q.flexContainer,ownerState:U,onKeyDown:On,ref:xe,role:"tablist",children:St}),ee&&ot]}),Ke.scrollButtonEnd]})});function bNe(e){return nt("MuiTextField",e)}it("MuiTextField",["root"]);const wNe={standard:nI,filled:tI,outlined:rI},xNe=e=>{const{classes:t}=e;return rt({root:["root"]},bNe,t)},SNe=oe(_g,{name:"MuiTextField",slot:"Root",overridesResolver:(e,t)=>t.root})({}),nn=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiTextField"}),{autoComplete:o,autoFocus:i=!1,children:a,className:s,color:l="primary",defaultValue:c,disabled:u=!1,error:d=!1,FormHelperTextProps:f,fullWidth:p=!1,helperText:h,id:m,InputLabelProps:y,inputProps:w,InputProps:x,inputRef:C,label:E,maxRows:P,minRows:T,multiline:I=!1,name:A,onBlur:k,onChange:O,onFocus:$,placeholder:N,required:L=!1,rows:j,select:D=!1,SelectProps:_,slots:z={},slotProps:F={},type:V,value:U,variant:q="outlined",...X}=r,ie={...r,autoFocus:i,color:l,disabled:u,error:d,fullWidth:p,multiline:I,required:L,select:D,variant:q},ee=xNe(ie),Q=np(m),te=h&&Q?`${Q}-helper-text`:void 0,pe=E&&Q?`${Q}-label`:void 0,ae=wNe[q],se={slots:z,slotProps:{input:x,inputLabel:y,htmlInput:w,formHelperText:f,select:_,...F}},re={},fe=se.slotProps.inputLabel;q==="outlined"&&(fe&&typeof fe.shrink<"u"&&(re.notched=fe.shrink),re.label=E),D&&((!_||!_.native)&&(re.id=void 0),re["aria-describedby"]=void 0);const[Z,ce]=Cr("input",{elementType:ae,externalForwardedProps:se,additionalProps:re,ownerState:ie}),[ge,we]=Cr("inputLabel",{elementType:Ng,externalForwardedProps:se,ownerState:ie}),[me,Se]=Cr("htmlInput",{elementType:"input",externalForwardedProps:se,ownerState:ie}),[xe,ke]=Cr("formHelperText",{elementType:lk,externalForwardedProps:se,ownerState:ie}),[De,_e]=Cr("select",{elementType:Pp,externalForwardedProps:se,ownerState:ie}),ye=R.jsx(Z,{"aria-describedby":te,autoComplete:o,autoFocus:i,defaultValue:c,fullWidth:p,multiline:I,name:A,rows:j,maxRows:P,minRows:T,type:V,value:U,id:Q,inputRef:C,onBlur:k,onChange:O,onFocus:$,placeholder:N,inputProps:Se,slots:{input:z.htmlInput?me:void 0},...ce});return R.jsxs(SNe,{className:de(ee.root,s),disabled:u,error:d,fullWidth:p,ref:n,required:L,color:l,variant:q,ownerState:ie,...X,children:[E!=null&&E!==""&&R.jsx(ge,{htmlFor:Q,id:pe,...we,children:E}),D?R.jsx(De,{"aria-describedby":te,id:Q,labelId:pe,value:U,input:ye,..._e,children:a}):ye,h&&R.jsx(xe,{id:te,...ke,children:h})]})});function CNe(e){return nt("MuiToggleButton",e)}const $h=it("MuiToggleButton",["root","disabled","selected","standard","primary","secondary","sizeSmall","sizeMedium","sizeLarge","fullWidth"]),Zne=v.createContext({}),ere=v.createContext(void 0);function ENe(e,t){return t===void 0||e===void 0?!1:Array.isArray(t)?t.includes(e):e===t}const PNe=e=>{const{classes:t,fullWidth:n,selected:r,disabled:o,size:i,color:a}=e,s={root:["root",r&&"selected",o&&"disabled",n&&"fullWidth",`size${Ce(i)}`,a]};return rt(s,CNe,t)},TNe=oe(la,{name:"MuiToggleButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`size${Ce(n.size)}`]]}})(Je(({theme:e})=>({...e.typography.button,borderRadius:(e.vars||e).shape.borderRadius,padding:11,border:`1px solid ${(e.vars||e).palette.divider}`,color:(e.vars||e).palette.action.active,[`&.${$h.disabled}`]:{color:(e.vars||e).palette.action.disabled,border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`},"&:hover":{textDecoration:"none",backgroundColor:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.hoverOpacity})`:xt(e.palette.text.primary,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},variants:[{props:{color:"standard"},style:{[`&.${$h.selected}`]:{color:(e.vars||e).palette.text.primary,backgroundColor:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.selectedOpacity})`:xt(e.palette.text.primary,e.palette.action.selectedOpacity),"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:xt(e.palette.text.primary,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.selectedOpacity})`:xt(e.palette.text.primary,e.palette.action.selectedOpacity)}}}}},...Object.entries(e.palette).filter(Kn()).map(([t])=>({props:{color:t},style:{[`&.${$h.selected}`]:{color:(e.vars||e).palette[t].main,backgroundColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / ${e.vars.palette.action.selectedOpacity})`:xt(e.palette[t].main,e.palette.action.selectedOpacity),"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:xt(e.palette[t].main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / ${e.vars.palette.action.selectedOpacity})`:xt(e.palette[t].main,e.palette.action.selectedOpacity)}}}}})),{props:{fullWidth:!0},style:{width:"100%"}},{props:{size:"small"},style:{padding:7,fontSize:e.typography.pxToRem(13)}},{props:{size:"large"},style:{padding:15,fontSize:e.typography.pxToRem(15)}}]}))),ew=v.forwardRef(function(t,n){const{value:r,...o}=v.useContext(Zne),i=v.useContext(ere),a=sg({...o,selected:ENe(t.value,r)},t),s=at({props:a,name:"MuiToggleButton"}),{children:l,className:c,color:u="standard",disabled:d=!1,disableFocusRipple:f=!1,fullWidth:p=!1,onChange:h,onClick:m,selected:y,size:w="medium",value:x,...C}=s,E={...s,color:u,disabled:d,disableFocusRipple:f,fullWidth:p,size:w},P=PNe(E),T=A=>{m&&(m(A,x),A.defaultPrevented)||h&&h(A,x)},I=i||"";return R.jsx(TNe,{className:de(o.className,P.root,c,I),disabled:d,focusRipple:!f,ref:n,onClick:T,onChange:h,value:x,ownerState:E,"aria-pressed":y,...C,children:l})});function INe(e){return nt("MuiToggleButtonGroup",e)}const Dr=it("MuiToggleButtonGroup",["root","selected","horizontal","vertical","disabled","grouped","groupedHorizontal","groupedVertical","fullWidth","firstButton","lastButton","middleButton"]),ONe=e=>{const{classes:t,orientation:n,fullWidth:r,disabled:o}=e,i={root:["root",n,r&&"fullWidth"],grouped:["grouped",`grouped${Ce(n)}`,o&&"disabled"],firstButton:["firstButton"],lastButton:["lastButton"],middleButton:["middleButton"]};return rt(i,INe,t)},ANe=oe("div",{name:"MuiToggleButtonGroup",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${Dr.grouped}`]:t.grouped},{[`& .${Dr.grouped}`]:t[`grouped${Ce(n.orientation)}`]},{[`& .${Dr.firstButton}`]:t.firstButton},{[`& .${Dr.lastButton}`]:t.lastButton},{[`& .${Dr.middleButton}`]:t.middleButton},t.root,n.orientation==="vertical"&&t.vertical,n.fullWidth&&t.fullWidth]}})(Je(({theme:e})=>({display:"inline-flex",borderRadius:(e.vars||e).shape.borderRadius,variants:[{props:{orientation:"vertical"},style:{flexDirection:"column",[`& .${Dr.grouped}`]:{[`&.${Dr.selected} + .${Dr.grouped}.${Dr.selected}`]:{borderTop:0,marginTop:0}},[`& .${Dr.firstButton},& .${Dr.middleButton}`]:{borderBottomLeftRadius:0,borderBottomRightRadius:0},[`& .${Dr.lastButton},& .${Dr.middleButton}`]:{marginTop:-1,borderTop:"1px solid transparent",borderTopLeftRadius:0,borderTopRightRadius:0},[`& .${Dr.lastButton}.${$h.disabled},& .${Dr.middleButton}.${$h.disabled}`]:{borderTop:"1px solid transparent"}}},{props:{fullWidth:!0},style:{width:"100%"}},{props:{orientation:"horizontal"},style:{[`& .${Dr.grouped}`]:{[`&.${Dr.selected} + .${Dr.grouped}.${Dr.selected}`]:{borderLeft:0,marginLeft:0}},[`& .${Dr.firstButton},& .${Dr.middleButton}`]:{borderTopRightRadius:0,borderBottomRightRadius:0},[`& .${Dr.lastButton},& .${Dr.middleButton}`]:{marginLeft:-1,borderLeft:"1px solid transparent",borderTopLeftRadius:0,borderBottomLeftRadius:0},[`& .${Dr.lastButton}.${$h.disabled},& .${Dr.middleButton}.${$h.disabled}`]:{borderLeft:"1px solid transparent"}}}]}))),kNe=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiToggleButtonGroup"}),{children:o,className:i,color:a="standard",disabled:s=!1,exclusive:l=!1,fullWidth:c=!1,onChange:u,orientation:d="horizontal",size:f="medium",value:p,...h}=r,m={...r,disabled:s,fullWidth:c,orientation:d,size:f},y=ONe(m),w=v.useCallback((I,A)=>{if(!u)return;const k=p&&p.indexOf(A);let O;p&&k>=0?(O=p.slice(),O.splice(k,1)):O=p?p.concat(A):[A],u(I,O)},[u,p]),x=v.useCallback((I,A)=>{u&&u(I,p===A?null:A)},[u,p]),C=v.useMemo(()=>({className:y.grouped,onChange:l?x:w,value:p,size:f,fullWidth:c,color:a,disabled:s}),[y.grouped,l,x,w,p,f,c,a,s]),E=NZ(o),P=E.length,T=I=>{const A=I===0,k=I===P-1;return A&&k?"":A?y.firstButton:k?y.lastButton:y.middleButton};return R.jsx(ANe,{role:"group",className:de(y.root,i),ref:n,ownerState:m,...h,children:R.jsx(Zne.Provider,{value:C,children:E.map((I,A)=>R.jsx(ere.Provider,{value:T(A),children:I},A))})})}),MNe=(...e)=>{console!=null&&console.warn&&(Jh(e[0])&&(e[0]=`react-i18next:: ${e[0]}`),console.warn(...e))},aG={},mN=(...e)=>{Jh(e[0])&&aG[e[0]]||(Jh(e[0])&&(aG[e[0]]=new Date),MNe(...e))},tre=(e,t)=>()=>{if(e.isInitialized)t();else{const n=()=>{setTimeout(()=>{e.off("initialized",n)},0),t()};e.on("initialized",n)}},sG=(e,t,n)=>{e.loadNamespaces(t,tre(e,n))},lG=(e,t,n,r)=>{Jh(n)&&(n=[n]),n.forEach(o=>{e.options.ns.indexOf(o)<0&&e.options.ns.push(o)}),e.loadLanguages(t,tre(e,r))},RNe=(e,t,n={})=>!t.languages||!t.languages.length?(mN("i18n.languages were undefined or empty",t.languages),!0):t.hasLoadedNamespace(e,{lng:n.lng,precheck:(r,o)=>{var i;if(((i=n.bindI18n)==null?void 0:i.indexOf("languageChanging"))>-1&&r.services.backendConnector.backend&&r.isLanguageChangingTo&&!o(r.isLanguageChangingTo,e))return!1}}),Jh=e=>typeof e=="string",$Ne=e=>typeof e=="object"&&e!==null,DNe=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,_Ne={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},NNe=e=>_Ne[e],LNe=e=>e.replace(DNe,NNe);let yN={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:LNe};const FNe=(e={})=>{yN={...yN,...e}},jNe=()=>yN;let nre;const BNe=e=>{nre=e},zNe=()=>nre,VNe={type:"3rdParty",init(e){FNe(e.options.react),BNe(e)}},HNe=v.createContext();class UNe{constructor(){this.usedNamespaces={}}addUsedNamespaces(t){t.forEach(n=>{this.usedNamespaces[n]||(this.usedNamespaces[n]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const WNe=(e,t)=>{const n=v.useRef();return v.useEffect(()=>{n.current=e},[e,t]),n.current},rre=(e,t,n,r)=>e.getFixedT(t,n,r),GNe=(e,t,n,r)=>v.useCallback(rre(e,t,n,r),[e,t,n,r]),Le=(e,t={})=>{var E,P,T,I;const{i18n:n}=t,{i18n:r,defaultNS:o}=v.useContext(HNe)||{},i=n||r||zNe();if(i&&!i.reportNamespaces&&(i.reportNamespaces=new UNe),!i){mN("You will need to pass in an i18next instance by using initReactI18next");const A=(O,$)=>Jh($)?$:$Ne($)&&Jh($.defaultValue)?$.defaultValue:Array.isArray(O)?O[O.length-1]:O,k=[A,{},!1];return k.t=A,k.i18n={},k.ready=!1,k}(E=i.options.react)!=null&&E.wait&&mN("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const a={...jNe(),...i.options.react,...t},{useSuspense:s,keyPrefix:l}=a;let c=o||((P=i.options)==null?void 0:P.defaultNS);c=Jh(c)?[c]:c||["translation"],(I=(T=i.reportNamespaces).addUsedNamespaces)==null||I.call(T,c);const u=(i.isInitialized||i.initializedStoreOnce)&&c.every(A=>RNe(A,i,a)),d=GNe(i,t.lng||null,a.nsMode==="fallback"?c:c[0],l),f=()=>d,p=()=>rre(i,t.lng||null,a.nsMode==="fallback"?c:c[0],l),[h,m]=v.useState(f);let y=c.join();t.lng&&(y=`${t.lng}${y}`);const w=WNe(y),x=v.useRef(!0);v.useEffect(()=>{const{bindI18n:A,bindI18nStore:k}=a;x.current=!0,!u&&!s&&(t.lng?lG(i,t.lng,c,()=>{x.current&&m(p)}):sG(i,c,()=>{x.current&&m(p)})),u&&w&&w!==y&&x.current&&m(p);const O=()=>{x.current&&m(p)};return A&&(i==null||i.on(A,O)),k&&(i==null||i.store.on(k,O)),()=>{x.current=!1,i&&(A==null||A.split(" ").forEach($=>i.off($,O))),k&&i&&k.split(" ").forEach($=>i.store.off($,O))}},[i,y]),v.useEffect(()=>{x.current&&u&&m(f)},[i,l,u]);const C=[h,i,u];if(C.t=h,C.i18n=i,C.ready=u,u||!u&&!s)return C;throw new Promise(A=>{t.lng?lG(i,t.lng,c,()=>A()):sG(i,c,()=>A())})},gs=()=>{const[e]=Le();return b(on,{sx:{textAlign:"center"},children:e("loading")})},ho=()=>b(on,{sx:{height:200,alignItems:"center",mt:2},component:Wt,direction:"column",justifyContent:"center",children:b(ok,{})}),sd=()=>b(ok,{size:20}),ore=ct(R.jsx("path",{d:"m12 8-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z"}),"ExpandLess"),Ob=ct(R.jsx("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore"),LC=ct(R.jsx("path",{d:"M9 4v1.38c-.83-.33-1.72-.5-2.61-.5-1.79 0-3.58.68-4.95 2.05l3.33 3.33h1.11v1.11c.86.86 1.98 1.31 3.11 1.36V15H6v3c0 1.1.9 2 2 2h10c1.66 0 3-1.34 3-3V4zm-1.11 6.41V8.26H5.61L4.57 7.22a5.07 5.07 0 0 1 1.82-.34c1.34 0 2.59.52 3.54 1.46l1.41 1.41-.2.2c-.51.51-1.19.8-1.92.8-.47 0-.93-.12-1.33-.34M19 17c0 .55-.45 1-1 1s-1-.45-1-1v-2h-6v-2.59c.57-.23 1.1-.57 1.56-1.03l.2-.2L15.59 14H17v-1.41l-6-5.97V6h8z"}),"HistoryEdu"),Rd=ct(R.jsx("path",{d:"M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2M8.5 13.5l2.5 3.01L14.5 12l4.5 6H5z"}),"Photo"),FC=ct(R.jsx("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close"),Fi=({title:e,subtitle:t,isOpen:n,closeFn:r,children:o})=>b(Ib,{open:n,onClose:r,"aria-labelledby":"modal-modal-title","aria-describedby":"modal-modal-description",children:K(bo,{sx:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",p:2,minWidth:"400px"},children:[b(Su,{title:e,subheader:t,action:b(FC,{onClick:r})}),b(_i,{children:o}),b(Ms,{})]})}),dk=e=>{const[t]=Le(),n=e.height?e.height:"50vh";return b(wt,{children:K(on,{sx:{height:n,display:"flex",alignItems:"center",flexDirection:"column",justifyContent:"center"},children:[b(st,{variant:"h6",mr:3,children:t("nothingHereYet")}),b(st,{mr:3,children:t("nothingHereYetAction")})]})})},oz=e=>{const[t]=Le(),[n,r]=Y.useState(!1),o=()=>r(!0),i=()=>r(!1),a=e.link!==void 0?b(dt,{size:"small",variant:"contained",href:e.link,children:t("add")}):b(dt,{size:"small",variant:"contained",onClick:o,children:t("add")});return K(wt,{children:[K(bo,{children:[b(Su,{title:e.title,subheader:".",sx:{paddingBottom:0}}),b(_i,{sx:{paddingTop:0,height:"500px"},children:b(dk,{})}),b(Ms,{children:a})]}),b(Fi,{title:t("add"),isOpen:n,closeFn:i,children:e.modalContent})]})};function ire(e,t){return function(){return e.apply(t,arguments)}}const{toString:qNe}=Object.prototype,{getPrototypeOf:iz}=Object,fk=(e=>t=>{const n=qNe.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),$c=e=>(e=e.toLowerCase(),t=>fk(t)===e),pk=e=>t=>typeof t===e,{isArray:Ab}=Array,rS=pk("undefined");function KNe(e){return e!==null&&!rS(e)&&e.constructor!==null&&!rS(e.constructor)&&ms(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const are=$c("ArrayBuffer");function YNe(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&are(e.buffer),t}const QNe=pk("string"),ms=pk("function"),sre=pk("number"),hk=e=>e!==null&&typeof e=="object",XNe=e=>e===!0||e===!1,JP=e=>{if(fk(e)!=="object")return!1;const t=iz(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},JNe=$c("Date"),ZNe=$c("File"),eLe=$c("Blob"),tLe=$c("FileList"),nLe=e=>hk(e)&&ms(e.pipe),rLe=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||ms(e.append)&&((t=fk(e))==="formdata"||t==="object"&&ms(e.toString)&&e.toString()==="[object FormData]"))},oLe=$c("URLSearchParams"),[iLe,aLe,sLe,lLe]=["ReadableStream","Request","Response","Headers"].map($c),cLe=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function jC(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,o;if(typeof e!="object"&&(e=[e]),Ab(e))for(r=0,o=e.length;r0;)if(o=n[r],t===o.toLowerCase())return o;return null}const Dh=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,cre=e=>!rS(e)&&e!==Dh;function vN(){const{caseless:e}=cre(this)&&this||{},t={},n=(r,o)=>{const i=e&&lre(t,o)||o;JP(t[i])&&JP(r)?t[i]=vN(t[i],r):JP(r)?t[i]=vN({},r):Ab(r)?t[i]=r.slice():t[i]=r};for(let r=0,o=arguments.length;r(jC(t,(o,i)=>{n&&ms(o)?e[i]=ire(o,n):e[i]=o},{allOwnKeys:r}),e),dLe=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),fLe=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},pLe=(e,t,n,r)=>{let o,i,a;const s={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),i=o.length;i-- >0;)a=o[i],(!r||r(a,e,t))&&!s[a]&&(t[a]=e[a],s[a]=!0);e=n!==!1&&iz(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},hLe=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},gLe=e=>{if(!e)return null;if(Ab(e))return e;let t=e.length;if(!sre(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},mLe=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&iz(Uint8Array)),yLe=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let o;for(;(o=r.next())&&!o.done;){const i=o.value;t.call(e,i[0],i[1])}},vLe=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},bLe=$c("HTMLFormElement"),wLe=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),cG=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),xLe=$c("RegExp"),ure=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};jC(n,(o,i)=>{let a;(a=t(o,i,e))!==!1&&(r[i]=a||o)}),Object.defineProperties(e,r)},SLe=e=>{ure(e,(t,n)=>{if(ms(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(ms(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},CLe=(e,t)=>{const n={},r=o=>{o.forEach(i=>{n[i]=!0})};return Ab(e)?r(e):r(String(e).split(t)),n},ELe=()=>{},PLe=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t,cD="abcdefghijklmnopqrstuvwxyz",uG="0123456789",dre={DIGIT:uG,ALPHA:cD,ALPHA_DIGIT:cD+cD.toUpperCase()+uG},TLe=(e=16,t=dre.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};function ILe(e){return!!(e&&ms(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const OLe=e=>{const t=new Array(10),n=(r,o)=>{if(hk(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[o]=r;const i=Ab(r)?[]:{};return jC(r,(a,s)=>{const l=n(a,o+1);!rS(l)&&(i[s]=l)}),t[o]=void 0,i}}return r};return n(e,0)},ALe=$c("AsyncFunction"),kLe=e=>e&&(hk(e)||ms(e))&&ms(e.then)&&ms(e.catch),fre=((e,t)=>e?setImmediate:t?((n,r)=>(Dh.addEventListener("message",({source:o,data:i})=>{o===Dh&&i===n&&r.length&&r.shift()()},!1),o=>{r.push(o),Dh.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",ms(Dh.postMessage)),MLe=typeof queueMicrotask<"u"?queueMicrotask.bind(Dh):typeof process<"u"&&process.nextTick||fre,Ne={isArray:Ab,isArrayBuffer:are,isBuffer:KNe,isFormData:rLe,isArrayBufferView:YNe,isString:QNe,isNumber:sre,isBoolean:XNe,isObject:hk,isPlainObject:JP,isReadableStream:iLe,isRequest:aLe,isResponse:sLe,isHeaders:lLe,isUndefined:rS,isDate:JNe,isFile:ZNe,isBlob:eLe,isRegExp:xLe,isFunction:ms,isStream:nLe,isURLSearchParams:oLe,isTypedArray:mLe,isFileList:tLe,forEach:jC,merge:vN,extend:uLe,trim:cLe,stripBOM:dLe,inherits:fLe,toFlatObject:pLe,kindOf:fk,kindOfTest:$c,endsWith:hLe,toArray:gLe,forEachEntry:yLe,matchAll:vLe,isHTMLForm:bLe,hasOwnProperty:cG,hasOwnProp:cG,reduceDescriptors:ure,freezeMethods:SLe,toObjectSet:CLe,toCamelCase:wLe,noop:ELe,toFiniteNumber:PLe,findKey:lre,global:Dh,isContextDefined:cre,ALPHABET:dre,generateString:TLe,isSpecCompliantForm:ILe,toJSONObject:OLe,isAsyncFn:ALe,isThenable:kLe,setImmediate:fre,asap:MLe};function fn(e,t,n,r,o){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),r&&(this.request=r),o&&(this.response=o,this.status=o.status?o.status:null)}Ne.inherits(fn,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:Ne.toJSONObject(this.config),code:this.code,status:this.status}}});const pre=fn.prototype,hre={};["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=>{hre[e]={value:e}});Object.defineProperties(fn,hre);Object.defineProperty(pre,"isAxiosError",{value:!0});fn.from=(e,t,n,r,o,i)=>{const a=Object.create(pre);return Ne.toFlatObject(e,a,function(l){return l!==Error.prototype},s=>s!=="isAxiosError"),fn.call(a,e.message,t,n,r,o),a.cause=e,a.name=e.name,i&&Object.assign(a,i),a};const RLe=null;function bN(e){return Ne.isPlainObject(e)||Ne.isArray(e)}function gre(e){return Ne.endsWith(e,"[]")?e.slice(0,-2):e}function dG(e,t,n){return e?e.concat(t).map(function(o,i){return o=gre(o),!n&&i?"["+o+"]":o}).join(n?".":""):t}function $Le(e){return Ne.isArray(e)&&!e.some(bN)}const DLe=Ne.toFlatObject(Ne,{},null,function(t){return/^is[A-Z]/.test(t)});function gk(e,t,n){if(!Ne.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=Ne.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,y){return!Ne.isUndefined(y[m])});const r=n.metaTokens,o=n.visitor||u,i=n.dots,a=n.indexes,l=(n.Blob||typeof Blob<"u"&&Blob)&&Ne.isSpecCompliantForm(t);if(!Ne.isFunction(o))throw new TypeError("visitor must be a function");function c(h){if(h===null)return"";if(Ne.isDate(h))return h.toISOString();if(!l&&Ne.isBlob(h))throw new fn("Blob is not supported. Use a Buffer instead.");return Ne.isArrayBuffer(h)||Ne.isTypedArray(h)?l&&typeof Blob=="function"?new Blob([h]):Buffer.from(h):h}function u(h,m,y){let w=h;if(h&&!y&&typeof h=="object"){if(Ne.endsWith(m,"{}"))m=r?m:m.slice(0,-2),h=JSON.stringify(h);else if(Ne.isArray(h)&&$Le(h)||(Ne.isFileList(h)||Ne.endsWith(m,"[]"))&&(w=Ne.toArray(h)))return m=gre(m),w.forEach(function(C,E){!(Ne.isUndefined(C)||C===null)&&t.append(a===!0?dG([m],E,i):a===null?m:m+"[]",c(C))}),!1}return bN(h)?!0:(t.append(dG(y,m,i),c(h)),!1)}const d=[],f=Object.assign(DLe,{defaultVisitor:u,convertValue:c,isVisitable:bN});function p(h,m){if(!Ne.isUndefined(h)){if(d.indexOf(h)!==-1)throw Error("Circular reference detected in "+m.join("."));d.push(h),Ne.forEach(h,function(w,x){(!(Ne.isUndefined(w)||w===null)&&o.call(t,w,Ne.isString(x)?x.trim():x,m,f))===!0&&p(w,m?m.concat(x):[x])}),d.pop()}}if(!Ne.isObject(e))throw new TypeError("data must be an object");return p(e),t}function fG(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function az(e,t){this._pairs=[],e&&gk(e,this,t)}const mre=az.prototype;mre.append=function(t,n){this._pairs.push([t,n])};mre.toString=function(t){const n=t?function(r){return t.call(this,r,fG)}:fG;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function _Le(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function yre(e,t,n){if(!t)return e;const r=n&&n.encode||_Le,o=n&&n.serialize;let i;if(o?i=o(t,n):i=Ne.isURLSearchParams(t)?t.toString():new az(t,n).toString(r),i){const a=e.indexOf("#");a!==-1&&(e=e.slice(0,a)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class pG{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){Ne.forEach(this.handlers,function(r){r!==null&&t(r)})}}const vre={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},NLe=typeof URLSearchParams<"u"?URLSearchParams:az,LLe=typeof FormData<"u"?FormData:null,FLe=typeof Blob<"u"?Blob:null,jLe={isBrowser:!0,classes:{URLSearchParams:NLe,FormData:LLe,Blob:FLe},protocols:["http","https","file","blob","url","data"]},sz=typeof window<"u"&&typeof document<"u",wN=typeof navigator=="object"&&navigator||void 0,BLe=sz&&(!wN||["ReactNative","NativeScript","NS"].indexOf(wN.product)<0),zLe=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",VLe=sz&&window.location.href||"http://localhost",HLe=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:sz,hasStandardBrowserEnv:BLe,hasStandardBrowserWebWorkerEnv:zLe,navigator:wN,origin:VLe},Symbol.toStringTag,{value:"Module"})),Ra={...HLe,...jLe};function ULe(e,t){return gk(e,new Ra.classes.URLSearchParams,Object.assign({visitor:function(n,r,o,i){return Ra.isNode&&Ne.isBuffer(n)?(this.append(r,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},t))}function WLe(e){return Ne.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function GLe(e){const t={},n=Object.keys(e);let r;const o=n.length;let i;for(r=0;r=n.length;return a=!a&&Ne.isArray(o)?o.length:a,l?(Ne.hasOwnProp(o,a)?o[a]=[o[a],r]:o[a]=r,!s):((!o[a]||!Ne.isObject(o[a]))&&(o[a]=[]),t(n,r,o[a],i)&&Ne.isArray(o[a])&&(o[a]=GLe(o[a])),!s)}if(Ne.isFormData(e)&&Ne.isFunction(e.entries)){const n={};return Ne.forEachEntry(e,(r,o)=>{t(WLe(r),o,n,0)}),n}return null}function qLe(e,t,n){if(Ne.isString(e))try{return(t||JSON.parse)(e),Ne.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(0,JSON.stringify)(e)}const BC={transitional:vre,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,i=Ne.isObject(t);if(i&&Ne.isHTMLForm(t)&&(t=new FormData(t)),Ne.isFormData(t))return o?JSON.stringify(bre(t)):t;if(Ne.isArrayBuffer(t)||Ne.isBuffer(t)||Ne.isStream(t)||Ne.isFile(t)||Ne.isBlob(t)||Ne.isReadableStream(t))return t;if(Ne.isArrayBufferView(t))return t.buffer;if(Ne.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let s;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return ULe(t,this.formSerializer).toString();if((s=Ne.isFileList(t))||r.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return gk(s?{"files[]":t}:t,l&&new l,this.formSerializer)}}return i||o?(n.setContentType("application/json",!1),qLe(t)):t}],transformResponse:[function(t){const n=this.transitional||BC.transitional,r=n&&n.forcedJSONParsing,o=this.responseType==="json";if(Ne.isResponse(t)||Ne.isReadableStream(t))return t;if(t&&Ne.isString(t)&&(r&&!this.responseType||o)){const a=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(t)}catch(s){if(a)throw s.name==="SyntaxError"?fn.from(s,fn.ERR_BAD_RESPONSE,this,null,this.response):s}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Ra.classes.FormData,Blob:Ra.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Ne.forEach(["delete","get","head","post","put","patch"],e=>{BC.headers[e]={}});const KLe=Ne.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"]),YLe=e=>{const t={};let n,r,o;return e&&e.split(` -`).forEach(function(a){o=a.indexOf(":"),n=a.substring(0,o).trim().toLowerCase(),r=a.substring(o+1).trim(),!(!n||t[n]&&KLe[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},hG=Symbol("internals");function tw(e){return e&&String(e).trim().toLowerCase()}function ZP(e){return e===!1||e==null?e:Ne.isArray(e)?e.map(ZP):String(e)}function QLe(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const XLe=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function uD(e,t,n,r,o){if(Ne.isFunction(r))return r.call(this,t,n);if(o&&(t=n),!!Ne.isString(t)){if(Ne.isString(r))return t.indexOf(r)!==-1;if(Ne.isRegExp(r))return r.test(t)}}function JLe(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function ZLe(e,t){const n=Ne.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(o,i,a){return this[r].call(this,t,o,i,a)},configurable:!0})})}class $a{constructor(t){t&&this.set(t)}set(t,n,r){const o=this;function i(s,l,c){const u=tw(l);if(!u)throw new Error("header name must be a non-empty string");const d=Ne.findKey(o,u);(!d||o[d]===void 0||c===!0||c===void 0&&o[d]!==!1)&&(o[d||l]=ZP(s))}const a=(s,l)=>Ne.forEach(s,(c,u)=>i(c,u,l));if(Ne.isPlainObject(t)||t instanceof this.constructor)a(t,n);else if(Ne.isString(t)&&(t=t.trim())&&!XLe(t))a(YLe(t),n);else if(Ne.isHeaders(t))for(const[s,l]of t.entries())i(l,s,r);else t!=null&&i(n,t,r);return this}get(t,n){if(t=tw(t),t){const r=Ne.findKey(this,t);if(r){const o=this[r];if(!n)return o;if(n===!0)return QLe(o);if(Ne.isFunction(n))return n.call(this,o,r);if(Ne.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=tw(t),t){const r=Ne.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||uD(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let o=!1;function i(a){if(a=tw(a),a){const s=Ne.findKey(r,a);s&&(!n||uD(r,r[s],s,n))&&(delete r[s],o=!0)}}return Ne.isArray(t)?t.forEach(i):i(t),o}clear(t){const n=Object.keys(this);let r=n.length,o=!1;for(;r--;){const i=n[r];(!t||uD(this,this[i],i,t,!0))&&(delete this[i],o=!0)}return o}normalize(t){const n=this,r={};return Ne.forEach(this,(o,i)=>{const a=Ne.findKey(r,i);if(a){n[a]=ZP(o),delete n[i];return}const s=t?JLe(i):String(i).trim();s!==i&&delete n[i],n[s]=ZP(o),r[s]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return Ne.forEach(this,(r,o)=>{r!=null&&r!==!1&&(n[o]=t&&Ne.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(` -`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(o=>r.set(o)),r}static accessor(t){const r=(this[hG]=this[hG]={accessors:{}}).accessors,o=this.prototype;function i(a){const s=tw(a);r[s]||(ZLe(o,a),r[s]=!0)}return Ne.isArray(t)?t.forEach(i):i(t),this}}$a.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);Ne.reduceDescriptors($a.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});Ne.freezeMethods($a);function dD(e,t){const n=this||BC,r=t||n,o=$a.from(r.headers);let i=r.data;return Ne.forEach(e,function(s){i=s.call(n,i,o.normalize(),t?t.status:void 0)}),o.normalize(),i}function wre(e){return!!(e&&e.__CANCEL__)}function kb(e,t,n){fn.call(this,e??"canceled",fn.ERR_CANCELED,t,n),this.name="CanceledError"}Ne.inherits(kb,fn,{__CANCEL__:!0});function xre(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new fn("Request failed with status code "+n.status,[fn.ERR_BAD_REQUEST,fn.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function eFe(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function tFe(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o=0,i=0,a;return t=t!==void 0?t:1e3,function(l){const c=Date.now(),u=r[i];a||(a=c),n[o]=l,r[o]=c;let d=i,f=0;for(;d!==o;)f+=n[d++],d=d%e;if(o=(o+1)%e,o===i&&(i=(i+1)%e),c-a{n=u,o=null,i&&(clearTimeout(i),i=null),e.apply(null,c)};return[(...c)=>{const u=Date.now(),d=u-n;d>=r?a(c,u):(o=c,i||(i=setTimeout(()=>{i=null,a(o)},r-d)))},()=>o&&a(o)]}const oI=(e,t,n=3)=>{let r=0;const o=tFe(50,250);return nFe(i=>{const a=i.loaded,s=i.lengthComputable?i.total:void 0,l=a-r,c=o(l),u=a<=s;r=a;const d={loaded:a,total:s,progress:s?a/s:void 0,bytes:l,rate:c||void 0,estimated:c&&s&&u?(s-a)/c:void 0,event:i,lengthComputable:s!=null,[t?"download":"upload"]:!0};e(d)},n)},gG=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},mG=e=>(...t)=>Ne.asap(()=>e(...t)),rFe=Ra.hasStandardBrowserEnv?function(){const t=Ra.navigator&&/(msie|trident)/i.test(Ra.navigator.userAgent),n=document.createElement("a");let r;function o(i){let a=i;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 r=o(window.location.href),function(a){const s=Ne.isString(a)?o(a):a;return s.protocol===r.protocol&&s.host===r.host}}():function(){return function(){return!0}}(),oFe=Ra.hasStandardBrowserEnv?{write(e,t,n,r,o,i){const a=[e+"="+encodeURIComponent(t)];Ne.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),Ne.isString(r)&&a.push("path="+r),Ne.isString(o)&&a.push("domain="+o),i===!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 iFe(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function aFe(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Sre(e,t){return e&&!iFe(t)?aFe(e,t):t}const yG=e=>e instanceof $a?{...e}:e;function mg(e,t){t=t||{};const n={};function r(c,u,d){return Ne.isPlainObject(c)&&Ne.isPlainObject(u)?Ne.merge.call({caseless:d},c,u):Ne.isPlainObject(u)?Ne.merge({},u):Ne.isArray(u)?u.slice():u}function o(c,u,d){if(Ne.isUndefined(u)){if(!Ne.isUndefined(c))return r(void 0,c,d)}else return r(c,u,d)}function i(c,u){if(!Ne.isUndefined(u))return r(void 0,u)}function a(c,u){if(Ne.isUndefined(u)){if(!Ne.isUndefined(c))return r(void 0,c)}else return r(void 0,u)}function s(c,u,d){if(d in t)return r(c,u);if(d in e)return r(void 0,c)}const l={url:i,method:i,data:i,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:s,headers:(c,u)=>o(yG(c),yG(u),!0)};return Ne.forEach(Object.keys(Object.assign({},e,t)),function(u){const d=l[u]||o,f=d(e[u],t[u],u);Ne.isUndefined(f)&&d!==s||(n[u]=f)}),n}const Cre=e=>{const t=mg({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:i,headers:a,auth:s}=t;t.headers=a=$a.from(a),t.url=yre(Sre(t.baseURL,t.url),e.params,e.paramsSerializer),s&&a.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?unescape(encodeURIComponent(s.password)):"")));let l;if(Ne.isFormData(n)){if(Ra.hasStandardBrowserEnv||Ra.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if((l=a.getContentType())!==!1){const[c,...u]=l?l.split(";").map(d=>d.trim()).filter(Boolean):[];a.setContentType([c||"multipart/form-data",...u].join("; "))}}if(Ra.hasStandardBrowserEnv&&(r&&Ne.isFunction(r)&&(r=r(t)),r||r!==!1&&rFe(t.url))){const c=o&&i&&oFe.read(i);c&&a.set(o,c)}return t},sFe=typeof XMLHttpRequest<"u",lFe=sFe&&function(e){return new Promise(function(n,r){const o=Cre(e);let i=o.data;const a=$a.from(o.headers).normalize();let{responseType:s,onUploadProgress:l,onDownloadProgress:c}=o,u,d,f,p,h;function m(){p&&p(),h&&h(),o.cancelToken&&o.cancelToken.unsubscribe(u),o.signal&&o.signal.removeEventListener("abort",u)}let y=new XMLHttpRequest;y.open(o.method.toUpperCase(),o.url,!0),y.timeout=o.timeout;function w(){if(!y)return;const C=$a.from("getAllResponseHeaders"in y&&y.getAllResponseHeaders()),P={data:!s||s==="text"||s==="json"?y.responseText:y.response,status:y.status,statusText:y.statusText,headers:C,config:e,request:y};xre(function(I){n(I),m()},function(I){r(I),m()},P),y=null}"onloadend"in y?y.onloadend=w:y.onreadystatechange=function(){!y||y.readyState!==4||y.status===0&&!(y.responseURL&&y.responseURL.indexOf("file:")===0)||setTimeout(w)},y.onabort=function(){y&&(r(new fn("Request aborted",fn.ECONNABORTED,e,y)),y=null)},y.onerror=function(){r(new fn("Network Error",fn.ERR_NETWORK,e,y)),y=null},y.ontimeout=function(){let E=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const P=o.transitional||vre;o.timeoutErrorMessage&&(E=o.timeoutErrorMessage),r(new fn(E,P.clarifyTimeoutError?fn.ETIMEDOUT:fn.ECONNABORTED,e,y)),y=null},i===void 0&&a.setContentType(null),"setRequestHeader"in y&&Ne.forEach(a.toJSON(),function(E,P){y.setRequestHeader(P,E)}),Ne.isUndefined(o.withCredentials)||(y.withCredentials=!!o.withCredentials),s&&s!=="json"&&(y.responseType=o.responseType),c&&([f,h]=oI(c,!0),y.addEventListener("progress",f)),l&&y.upload&&([d,p]=oI(l),y.upload.addEventListener("progress",d),y.upload.addEventListener("loadend",p)),(o.cancelToken||o.signal)&&(u=C=>{y&&(r(!C||C.type?new kb(null,e,y):C),y.abort(),y=null)},o.cancelToken&&o.cancelToken.subscribe(u),o.signal&&(o.signal.aborted?u():o.signal.addEventListener("abort",u)));const x=eFe(o.url);if(x&&Ra.protocols.indexOf(x)===-1){r(new fn("Unsupported protocol "+x+":",fn.ERR_BAD_REQUEST,e));return}y.send(i||null)})},cFe=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,o;const i=function(c){if(!o){o=!0,s();const u=c instanceof Error?c:this.reason;r.abort(u instanceof fn?u:new kb(u instanceof Error?u.message:u))}};let a=t&&setTimeout(()=>{a=null,i(new fn(`timeout ${t} of ms exceeded`,fn.ETIMEDOUT))},t);const s=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(c=>{c.unsubscribe?c.unsubscribe(i):c.removeEventListener("abort",i)}),e=null)};e.forEach(c=>c.addEventListener("abort",i));const{signal:l}=r;return l.unsubscribe=()=>Ne.asap(s),l}},uFe=function*(e,t){let n=e.byteLength;if(n{const o=dFe(e,t);let i=0,a,s=l=>{a||(a=!0,r&&r(l))};return new ReadableStream({async pull(l){try{const{done:c,value:u}=await o.next();if(c){s(),l.close();return}let d=u.byteLength;if(n){let f=i+=d;n(f)}l.enqueue(new Uint8Array(u))}catch(c){throw s(c),c}},cancel(l){return s(l),o.return()}},{highWaterMark:2})},mk=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Ere=mk&&typeof ReadableStream=="function",pFe=mk&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),Pre=(e,...t)=>{try{return!!e(...t)}catch{return!1}},hFe=Ere&&Pre(()=>{let e=!1;const t=new Request(Ra.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),bG=64*1024,xN=Ere&&Pre(()=>Ne.isReadableStream(new Response("").body)),iI={stream:xN&&(e=>e.body)};mk&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!iI[t]&&(iI[t]=Ne.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new fn(`Response type '${t}' is not supported`,fn.ERR_NOT_SUPPORT,r)})})})(new Response);const gFe=async e=>{if(e==null)return 0;if(Ne.isBlob(e))return e.size;if(Ne.isSpecCompliantForm(e))return(await new Request(Ra.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(Ne.isArrayBufferView(e)||Ne.isArrayBuffer(e))return e.byteLength;if(Ne.isURLSearchParams(e)&&(e=e+""),Ne.isString(e))return(await pFe(e)).byteLength},mFe=async(e,t)=>{const n=Ne.toFiniteNumber(e.getContentLength());return n??gFe(t)},yFe=mk&&(async e=>{let{url:t,method:n,data:r,signal:o,cancelToken:i,timeout:a,onDownloadProgress:s,onUploadProgress:l,responseType:c,headers:u,withCredentials:d="same-origin",fetchOptions:f}=Cre(e);c=c?(c+"").toLowerCase():"text";let p=cFe([o,i&&i.toAbortSignal()],a),h;const m=p&&p.unsubscribe&&(()=>{p.unsubscribe()});let y;try{if(l&&hFe&&n!=="get"&&n!=="head"&&(y=await mFe(u,r))!==0){let P=new Request(t,{method:"POST",body:r,duplex:"half"}),T;if(Ne.isFormData(r)&&(T=P.headers.get("content-type"))&&u.setContentType(T),P.body){const[I,A]=gG(y,oI(mG(l)));r=vG(P.body,bG,I,A)}}Ne.isString(d)||(d=d?"include":"omit");const w="credentials"in Request.prototype;h=new Request(t,{...f,signal:p,method:n.toUpperCase(),headers:u.normalize().toJSON(),body:r,duplex:"half",credentials:w?d:void 0});let x=await fetch(h);const C=xN&&(c==="stream"||c==="response");if(xN&&(s||C&&m)){const P={};["status","statusText","headers"].forEach(k=>{P[k]=x[k]});const T=Ne.toFiniteNumber(x.headers.get("content-length")),[I,A]=s&&gG(T,oI(mG(s),!0))||[];x=new Response(vG(x.body,bG,I,()=>{A&&A(),m&&m()}),P)}c=c||"text";let E=await iI[Ne.findKey(iI,c)||"text"](x,e);return!C&&m&&m(),await new Promise((P,T)=>{xre(P,T,{data:E,headers:$a.from(x.headers),status:x.status,statusText:x.statusText,config:e,request:h})})}catch(w){throw m&&m(),w&&w.name==="TypeError"&&/fetch/i.test(w.message)?Object.assign(new fn("Network Error",fn.ERR_NETWORK,e,h),{cause:w.cause||w}):fn.from(w,w&&w.code,e,h)}}),SN={http:RLe,xhr:lFe,fetch:yFe};Ne.forEach(SN,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const wG=e=>`- ${e}`,vFe=e=>Ne.isFunction(e)||e===null||e===!1,Tre={getAdapter:e=>{e=Ne.isArray(e)?e:[e];const{length:t}=e;let n,r;const o={};for(let i=0;i`adapter ${s} `+(l===!1?"is not supported by the environment":"is not available in the build"));let a=t?i.length>1?`since : -`+i.map(wG).join(` -`):" "+wG(i[0]):"as no adapter specified";throw new fn("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return r},adapters:SN};function fD(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new kb(null,e)}function xG(e){return fD(e),e.headers=$a.from(e.headers),e.data=dD.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Tre.getAdapter(e.adapter||BC.adapter)(e).then(function(r){return fD(e),r.data=dD.call(e,e.transformResponse,r),r.headers=$a.from(r.headers),r},function(r){return wre(r)||(fD(e),r&&r.response&&(r.response.data=dD.call(e,e.transformResponse,r.response),r.response.headers=$a.from(r.response.headers))),Promise.reject(r)})}const Ire="1.7.7",lz={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{lz[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const SG={};lz.transitional=function(t,n,r){function o(i,a){return"[Axios v"+Ire+"] Transitional option '"+i+"'"+a+(r?". "+r:"")}return(i,a,s)=>{if(t===!1)throw new fn(o(a," has been removed"+(n?" in "+n:"")),fn.ERR_DEPRECATED);return n&&!SG[a]&&(SG[a]=!0,console.warn(o(a," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(i,a,s):!0}};function bFe(e,t,n){if(typeof e!="object")throw new fn("options must be an object",fn.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const i=r[o],a=t[i];if(a){const s=e[i],l=s===void 0||a(s,i,e);if(l!==!0)throw new fn("option "+i+" must be "+l,fn.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new fn("Unknown option "+i,fn.ERR_BAD_OPTION)}}const CN={assertOptions:bFe,validators:lz},ef=CN.validators;class Zh{constructor(t){this.defaults=t,this.interceptors={request:new pG,response:new pG}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let o;Error.captureStackTrace?Error.captureStackTrace(o={}):o=new Error;const i=o.stack?o.stack.replace(/^.+\n/,""):"";try{r.stack?i&&!String(r.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(r.stack+=` -`+i):r.stack=i}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=mg(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:i}=n;r!==void 0&&CN.assertOptions(r,{silentJSONParsing:ef.transitional(ef.boolean),forcedJSONParsing:ef.transitional(ef.boolean),clarifyTimeoutError:ef.transitional(ef.boolean)},!1),o!=null&&(Ne.isFunction(o)?n.paramsSerializer={serialize:o}:CN.assertOptions(o,{encode:ef.function,serialize:ef.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let a=i&&Ne.merge(i.common,i[n.method]);i&&Ne.forEach(["delete","get","head","post","put","patch","common"],h=>{delete i[h]}),n.headers=$a.concat(a,i);const s=[];let l=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(n)===!1||(l=l&&m.synchronous,s.unshift(m.fulfilled,m.rejected))});const c=[];this.interceptors.response.forEach(function(m){c.push(m.fulfilled,m.rejected)});let u,d=0,f;if(!l){const h=[xG.bind(this),void 0];for(h.unshift.apply(h,s),h.push.apply(h,c),f=h.length,u=Promise.resolve(n);d{if(!r._listeners)return;let i=r._listeners.length;for(;i-- >0;)r._listeners[i](o);r._listeners=null}),this.promise.then=o=>{let i;const a=new Promise(s=>{r.subscribe(s),i=s}).then(o);return a.cancel=function(){r.unsubscribe(i)},a},t(function(i,a,s){r.reason||(r.reason=new kb(i,a,s),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new cz(function(o){t=o}),cancel:t}}}function wFe(e){return function(n){return e.apply(null,n)}}function xFe(e){return Ne.isObject(e)&&e.isAxiosError===!0}const EN={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(EN).forEach(([e,t])=>{EN[t]=e});function Ore(e){const t=new Zh(e),n=ire(Zh.prototype.request,t);return Ne.extend(n,Zh.prototype,t,{allOwnKeys:!0}),Ne.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return Ore(mg(e,o))},n}const tt=Ore(BC);tt.Axios=Zh;tt.CanceledError=kb;tt.CancelToken=cz;tt.isCancel=wre;tt.VERSION=Ire;tt.toFormData=gk;tt.AxiosError=fn;tt.Cancel=tt.CanceledError;tt.all=function(t){return Promise.all(t)};tt.spread=wFe;tt.isAxiosError=xFe;tt.mergeConfig=mg;tt.AxiosHeaders=$a;tt.formToJSON=e=>bre(Ne.isHTMLForm(e)?new FormData(e):e);tt.getAdapter=Tre.getAdapter;tt.HttpStatusCode=EN;tt.default=tt;const By={protein:4,carbohydrates:4,fat:9};class ss{constructor(t){Tt(this,"bodyWeight",0);Tt(this,"energy",0);Tt(this,"protein",0);Tt(this,"carbohydrates",0);Tt(this,"carbohydratesSugar",0);Tt(this,"fat",0);Tt(this,"fatSaturated",0);Tt(this,"fiber",0);Tt(this,"sodium",0);this.energy=(t==null?void 0:t.energy)??0,this.protein=(t==null?void 0:t.protein)??0,this.carbohydrates=(t==null?void 0:t.carbohydrates)??0,this.carbohydratesSugar=(t==null?void 0:t.carbohydratesSugar)??0,this.fat=(t==null?void 0:t.fat)??0,this.fatSaturated=(t==null?void 0:t.fatSaturated)??0,this.fiber=(t==null?void 0:t.fiber)??0,this.sodium=(t==null?void 0:t.sodium)??0,this.bodyWeight=(t==null?void 0:t.bodyWeight)??0}get energyKj(){return this.energy*4.184}get isEmpty(){return this.energy===0&&this.protein===0&&this.carbohydrates===0&&this.fat===0}get percent(){return{protein:this.protein>0?this.protein*By.protein/this.energy*100:0,carbohydrates:this.carbohydrates>0?this.carbohydrates*By.carbohydrates/this.energy*100:0,fat:this.fat>0?this.fat*By.fat/this.energy*100:0}}get perBodyKg(){return{protein:this.bodyWeight>0?this.protein/this.bodyWeight:0,carbohydrates:this.bodyWeight>0?this.carbohydrates/this.bodyWeight:0,fat:this.bodyWeight>0?this.fat/this.bodyWeight:0}}static fromIngredient(t,n,r){const o=new ss,i=r===null?n:n*r.amount*r.grams;return o.energy=t.energy*i/100,o.protein=t.protein*i/100,o.carbohydrates=t.carbohydrates*i/100,o.carbohydratesSugar=t.carbohydratesSugar?t.carbohydratesSugar*i/100:0,o.fat=t.fat*i/100,o.fatSaturated=t.fatSaturated?t.fatSaturated*i/100:0,o.fiber=t.fiber?t.fiber*i/100:0,o.sodium=t.sodium?t.sodium*i/100:0,o}add(t){return this.energy+=t.energy,this.protein+=t.protein,this.carbohydrates+=t.carbohydrates,this.carbohydratesSugar+=t.carbohydratesSugar,this.fat+=t.fat,this.fatSaturated+=t.fatSaturated,this.fiber+=t.fiber,this.sodium+=t.sodium,this}toString(){return`e: ${this.energy}, p: ${this.protein}, c: ${this.carbohydrates}, cS: ${this.carbohydratesSugar}, f: ${this.fat}, fS: ${this.fatSaturated}, fi: ${this.fiber}, s: ${this.sodium}`}equals(t){return this.energy===t.energy&&this.protein===t.protein&&this.carbohydrates===t.carbohydrates&&this.carbohydratesSugar===t.carbohydratesSugar&&this.fat===t.fat&&this.fatSaturated===t.fatSaturated&&this.fiber===t.fiber&&this.sodium===t.sodium}}function gi(e){return e.toISOString().split("T")[0]}function PN(e,t){return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()}function aI(e,t){return e==null?null:e.toLocaleTimeString(t?[t]:[],{hour:"2-digit",minute:"2-digit"})}function SFe(e){if(e==null)return null;const[t,n]=e.toTimeString().split(":");return`${t}:${n}`}function CFe(e){if(e==null)return null;const[t,n]=e.split(":"),r=new Date;return r.setHours(parseInt(t)),r.setMinutes(parseInt(n)),r}function EFe(e,t=new Date){const r={lastWeek:()=>t.setDate(t.getDate()-7),lastMonth:()=>t.setMonth(t.getMonth()-1),lastHalfYear:()=>t.setMonth(t.getMonth()-6),lastYear:()=>t.setFullYear(t.getFullYear()-1),"":void 0}[e];if(r)r();else return;return gi(t)}class Are{constructor(t,n,r,o){Tt(this,"items",[]);Tt(this,"diaryEntries",[]);this.id=t,this.order=n,this.time=r,this.name=o}get timeHHMMLocale(){return aI(this.time)}get displayName(){return this.name?this.name:this.timeHHMMLocale}get diaryEntriesToday(){return this.diaryEntries.filter(t=>PN(t.datetime,new Date))}get plannedNutritionalValues(){const t=new ss;for(const n of this.items)t.add(n.nutritionalValues);return t}get loggedNutritionalValuesToday(){const t=new ss;for(const n of this.diaryEntriesToday)t.add(n.nutritionalValues);return t}}class uz{fromJson(t){return new Are(t.id,t.order,CFe(t.time),t.name)}toJson(t){return{name:t.name,order:t.order,time:aI(t.time)}}}const eT=-1;class PFe{constructor(t,n,r,o=!1,i=null,a=null,s=null,l=null,c=null,u=null,d=null){Tt(this,"meals",[]);Tt(this,"diaryEntries",[]);this.id=t,this.creationDate=n,this.description=r,this.onlyLogging=o,this.goalEnergy=i,this.goalProtein=a,this.goalCarbohydrates=s,this.goalFiber=l,this.goalSodium=c,this.goalFat=u,this.goalFatsSaturated=d}get hasAnyGoals(){return this.goalEnergy!==null||this.goalProtein!==null||this.goalCarbohydrates!==null||this.goalFat!==null}get hasAnyAdvancedGoals(){return this.goalFiber!==null||this.goalSodium!==null||this.goalFatsSaturated!==null}get hasAnyPlanned(){return this.hasAnyGoals||this.plannedNutritionalValues.energy>0}get plannedNutritionalValues(){if(this.hasAnyGoals)return new ss({energy:this.goalEnergy,carbohydrates:this.goalCarbohydrates,protein:this.goalProtein,fat:this.goalFat});const t=new ss;for(const n of this.meals)t.add(n.plannedNutritionalValues);return t}get loggedNutritionalValues7DayAvg(){const t=new Date,n=new Date(t.getTime()-7*24*60*60*1e3),r=this.diaryEntries.filter(o=>o.datetime>=n);return this.getAverageNutritionalValuesFromDiaryEntries(r)}get loggedNutritionalValuesToday(){const t=this.diaryEntries.filter(n=>PN(n.datetime,new Date));return this.getNutritionalValuesFromDiaryEntries(t)}get groupDiaryEntries(){return this.diaryEntries.reduce((t,n)=>{const r=n.datetime.toISOString().split("T")[0],o=t.get(r)||{entries:[],nutritionalValues:new ss};return o.entries.push(n),o.nutritionalValues.add(n.nutritionalValues),t.set(r,o),t},new Map)}get percentageValuesLoggedToday(){return new ss({protein:this.loggedNutritionalValuesToday.protein/this.plannedNutritionalValues.protein*100,carbohydrates:this.loggedNutritionalValuesToday.carbohydrates/this.plannedNutritionalValues.carbohydrates*100,fat:this.loggedNutritionalValuesToday.fat/this.plannedNutritionalValues.fat*100})}pseudoMealOthers(t){const n=new Are(eT,-1,null,t);return n.diaryEntries=this.diaryEntries.filter(r=>r.mealId===null),n}loggedNutritionalValuesDate(t){return this.getNutritionalValuesFromDiaryEntries(this.loggedEntriesDate(t))}loggedEntriesDate(t){return this.diaryEntries.filter(n=>PN(n.datetime,t))}getAverageNutritionalValuesFromDiaryEntries(t){const n=t.length,r=this.getNutritionalValuesFromDiaryEntries(t);return n===0||(r.energy=r.energy/n,r.protein=r.protein/n,r.carbohydrates=r.carbohydrates/n,r.carbohydratesSugar=r.carbohydratesSugar/n,r.fat=r.fat/n,r.fatSaturated=r.fatSaturated/n,r.fiber=r.fiber/n,r.sodium=r.sodium/n),r}getNutritionalValuesFromDiaryEntries(t){return t.reduce((n,r)=>n.add(r.nutritionalValues),new ss)}}class yk{fromJson(t){return new PFe(t.id,new Date(t.creation_date),t.description,t.only_logging,t.goal_energy,t.goal_protein,t.goal_carbohydrates,t.goal_fiber,t.goal_fat)}toJson(t){return{description:t.description}}}class TFe{constructor(t,n,r,o,i,a,s,l){this.id=t,this.uuid=n,this.url=r,this.created=o,this.lastUpdate=i,this.size=a,this.width=s,this.height=l}}class IFe{fromJson(t){return new TFe(t.id,t.uuid,t.image,new Date(t.created),new Date(t.last_update),t.size,t.width,t.height)}}class OFe{constructor(t,n,r,o,i,a,s,l,c,u,d,f,p=null){this.id=t,this.uuid=n,this.code=r,this.name=o,this.energy=i,this.protein=a,this.carbohydrates=s,this.carbohydratesSugar=l,this.fat=c,this.fatSaturated=u,this.fiber=d,this.sodium=f,this.image=p}}class AFe{fromJson(t){return new OFe(t.id,t.uuid,t.code,t.name,t.energy,parseFloat(t.protein),parseFloat(t.carbohydrates),t.carbohydrates_sugar===null?null:parseFloat(t.carbohydrates_sugar),parseFloat(t.fat),t.fat_saturated===null?null:parseFloat(t.fat_saturated),t.fiber===null?null:parseFloat(t.fiber),t.sodium===null?null:parseFloat(t.sodium),t.image===null?null:new IFe().fromJson(t.image))}}var dz={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1,VITE_API_SERVER:""};const kFe="/static/react",fz="",MFe=dz.TIME_ZONE,RFe=dz.MIN_ACCOUNT_AGE_TO_TRUST,$Fe="",DFe=dz.VITE_API_KEY,Iv=2,_Fe="en",NFe=RFe||21,CG=2,EG=16,LFe=12,FFe=1,kre=1,Mre=2,vk="r",jFe="exercises",BFe="variations",zFe="detail",VFe="languages",HFe="categories",UFe="equipment",WFe="muscles",GFe="permission",qFe="profile",Mb="measurements",Rb="measurements-categories";var It=(e=>(e.ROUTINE_OVERVIEW="routine-overview",e.ROUTINE_DETAIL="routine-detail",e.ROUTINE_LOGS="routine-logs",e.ROUTINES_ACTIVE="routines-active",e.ROUTINES_SHALLOW="routines-shallow",e.NUTRITIONAL_PLANS="nutritional-plans",e.NUTRITIONAL_PLAN="nutritional-plan",e.NUTRITIONAL_PLAN_LAST="nutritional-plan-last",e.INGREDIENT="ingredient",e.BODY_WEIGHT="body-weight",e.ROUTINE_WEIGHT_UNITS="weight-units",e.ROUTINE_REP_UNITS="rep-units",e))(It||{}),Ft=(e=>(e.MEAL="meal",e.MEAL_ITEM="mealitem",e.NUTRITIONAL_DIARY="nutritiondiary",e.INGREDIENT_PATH="ingredientinfo",e.INGREDIENT_SEARCH_PATH="ingredient/search",e.INGREDIENT_WEIGHT_UNIT="ingredientweightunit",e.ROUTINE="routine",e.WEIGHT_CONFIG="weight-config",e.MAX_WEIGHT_CONFIG="max-weight-config",e.REPS_CONFIG="reps-config",e.MAX_REPS_CONFIG="max-reps-config",e.RIR_CONFIG="rir-config",e.NR_OF_SETS_CONFIG="sets-config",e.REST_CONFIG="rest-config",e.MAX_REST_CONFIG="max-rest-config",e.DAY="day",e.SLOT="slot",e.SLOT_ENTRY="slot-entry",e))(Ft||{});const Rre="999",KFe=["#2a4c7d","#5b5291","#8e5298","#bf5092","#e7537e","#ff6461","#ff813d","#ffa600"],YFe=["#2a4c7d","#825298","#d45089","#ff6a59","#ffa600"],QFe=["#2a4c7d","#d45089","#ffa600"],PG={pageSizeOptions:[5,10,25,50,100],pageSize:10},XFe=MFe||"Europe/Berlin",Ov="en",pz=3e3,JFe=500;var $re={exports:{}};(function(e){(function(t){let n;function r(u,d){const f=u.charCodeAt(d);if(isNaN(f))throw new RangeError("Index "+d+' out of range for string "'+u+'"; please open an issue at https://github.com/Trott/slug/issues/new');if(f<55296||f>57343)return[u.charAt(d),d];if(f>=55296&&f<=56319){if(u.length<=d+1)return[" ",d];const h=u.charCodeAt(d+1);return h<56320||h>57343?[" ",d]:[u.charAt(d)+u.charAt(d+1),d+1]}if(d===0)return[" ",d];const p=u.charCodeAt(d-1);if(p<55296||p>56319)return[" ",d];throw new Error('String "'+u+'" reaches code believed to be unreachable; please open an issue at https://github.com/Trott/slug/issues/new')}typeof window<"u"?window.btoa?n=function(u){return btoa(unescape(encodeURIComponent(u)))}:n=function(u){const d=unescape(encodeURIComponent(u+""));let f="";for(let p,h,m=0,y="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";d.charAt(m|0)||(y="=",m%1);f+=y.charAt(63&p>>8-m%1*8)){if(h=d.charCodeAt(m+=3/4),h>255)throw new Error("'btoa' failed: The string to be encoded contains characters outside of the Latin1 range.");p=p<<8|h}return f}:n=function(u){return Buffer.from(u).toString("base64")};function o(u,d){let f=s(u,d);if((d&&d.fallback!==void 0?d.fallback:o.defaults.fallback)===!0&&f===""){let h="";for(let m=0;m1?f[d[h]]=u[d[h]]:p[d[h]]=u[d[h]];Object.assign(o.charmap,p),Object.assign(o.multicharmap,f)},o.setLocale=function(u){a=i[u]||{}},e.exports?e.exports=o:t.slug=o})(ea)})($re);var ZFe=$re.exports;const Dre=Bn(ZFe);function pt(e,t){t=t||{};const r=[t.server||$Fe,"api","v2",e];if(t.id&&r.push(t.id.toString()),t.objectMethod&&r.push(t.objectMethod),r.push(""),t.query){const o=[];for(const i in t.query)t.query.hasOwnProperty(i)&&o.push(`${encodeURIComponent(i)}=${encodeURIComponent(t.query[i])}`);r.pop(),r.push(`?${o.join("&")}`)}return r.join("/")}var _n=(e=>(e[e.DASHBOARD=0]="DASHBOARD",e[e.ROUTINE_OVERVIEW=1]="ROUTINE_OVERVIEW",e[e.ROUTINE_DETAIL=2]="ROUTINE_DETAIL",e[e.ROUTINE_EDIT=3]="ROUTINE_EDIT",e[e.ROUTINE_DETAIL_TABLE=4]="ROUTINE_DETAIL_TABLE",e[e.ROUTINE_EDIT_PROGRESSION=5]="ROUTINE_EDIT_PROGRESSION",e[e.ROUTINE_ADD=6]="ROUTINE_ADD",e[e.ROUTINE_DELETE=7]="ROUTINE_DELETE",e[e.ROUTINE_ADD_LOG=8]="ROUTINE_ADD_LOG",e[e.ROUTINE_EDIT_LOG=9]="ROUTINE_EDIT_LOG",e[e.ROUTINE_DELETE_LOG=10]="ROUTINE_DELETE_LOG",e[e.ROUTINE_EDIT_DAY=11]="ROUTINE_EDIT_DAY",e[e.ROUTINE_ADD_DAY=12]="ROUTINE_ADD_DAY",e[e.ROUTINE_DELETE_DAY=13]="ROUTINE_DELETE_DAY",e[e.ROUTINE_ADD_SET=14]="ROUTINE_ADD_SET",e[e.ROUTINE_EDIT_SET=15]="ROUTINE_EDIT_SET",e[e.ROUTINE_DELETE_SET=16]="ROUTINE_DELETE_SET",e[e.EXERCISE_DETAIL=17]="EXERCISE_DETAIL",e[e.EXERCISE_OVERVIEW=18]="EXERCISE_OVERVIEW",e[e.EXERCISE_CONTRIBUTE=19]="EXERCISE_CONTRIBUTE",e[e.WEIGHT_OVERVIEW=20]="WEIGHT_OVERVIEW",e[e.WEIGHT_ADD=21]="WEIGHT_ADD",e[e.MEASUREMENT_OVERVIEW=22]="MEASUREMENT_OVERVIEW",e[e.MEASUREMENT_DETAIL=23]="MEASUREMENT_DETAIL",e[e.NUTRITION_OVERVIEW=24]="NUTRITION_OVERVIEW",e[e.NUTRITION_DETAIL=25]="NUTRITION_DETAIL",e[e.NUTRITION_PLAN_PDF=26]="NUTRITION_PLAN_PDF",e[e.NUTRITION_PLAN_COPY=27]="NUTRITION_PLAN_COPY",e[e.NUTRITION_DIARY=28]="NUTRITION_DIARY",e[e.INGREDIENT_DETAIL=29]="INGREDIENT_DETAIL",e))(_n||{});function Fn(e,t,n){t=t||"en-us";const r=t.split("-")[0];switch(e){case 1:return`/${r}/routine/overview`;case 2:return`/${r}/routine/${n.id}/view`;case 4:return`/${r}/routine/${n.id}/table`;case 3:return`/${r}/routine/${n.id}/edit`;case 5:return`/${r}/routine/${n.id}/edit/progression/${n.id2}`;case 6:return`/${r}/routine/add`;case 12:return`/${r}/routine/day/${n.id}/add`;case 8:return`/${r}/routine/day/${n.id}/log/add`;case 9:return`/${r}/routine/log/${n.id}/edit`;case 10:return`/${r}/routine/log/${n.id}/delete`;case 11:return`/${r}/routine/day/${n.id}/edit`;case 13:return`/${r}/routine/day/${n.id}/delete`;case 14:return`/${r}/routine/set/${n.id}/add`;case 15:return`/${r}/routine/set/${n.id}/edit`;case 16:return`/${r}/routine/set/${n.id}/delete`;case 19:return`/${r}/exercise/contribute`;case 17:return n.slug?`/${r}/exercise/${n.id}/view-base/${Dre(n.slug)}`:`/${r}/exercise/${n.id}/view-base`;case 18:return`/${r}/exercise/overview`;case 20:return`/${r}/weight/overview`;case 21:return`/${r}/weight/add`;case 22:return`/${r}/measurement/overview`;case 23:return`/${r}/measurement/category/${n.id}`;case 24:return`/${r}/nutrition/overview`;case 25:return`/${r}/nutrition/${n.id}/view`;case 28:return`/${r}/nutrition/${n.id}/${n.date}`;case 26:return`/${r}/nutrition/${n.id}/pdf`;case 27:return`/${r}/nutrition/${n.id}/copy`;case 29:return`/${r}/nutrition/ingredient/${n.id}/view`;case 0:default:return"/"}}function eje(e){let t=null;if(document.cookie&&document.cookie!==""){const n=document.cookie.split(";");for(let r=0;r{if(e.length===0)return[];const t=pt(Ft.INGREDIENT_PATH,{query:{id__in:e.join(",")}}),n=new AFe,r=[];for await(const o of zC(t,gt()))for(const i of o)r.push(n.fromJson(i));return r},tje=async(e,t,n=!0)=>{const r=[t];t!==Ov&&n&&r.push(Ov);const o=pt(Ft.INGREDIENT_SEARCH_PATH,{query:{term:e,language:r.join(",")}}),{data:i}=await tt.get(o);return i.suggestions};class nje{constructor(t,n,r,o,i,a,s){Tt(this,"ingredient",null);Tt(this,"weightUnit",null);this.id=t,this.ingredientId=n,this.weightUnitId=r,this.amount=o,this.order=i,a&&(this.ingredient=a),s&&(this.weightUnit=s)}get amountString(){var t;return this.amount.toFixed().toString()+(this.weightUnitId!==null?` ${(t=this.weightUnit)==null?void 0:t.name}`:"g")}get nutritionalValues(){return this.ingredient?ss.fromIngredient(this.ingredient,this.amount,this.weightUnit):new ss}}class hz{fromJson(t){return new nje(t.id,t.ingredient,t.weight_unit,parseFloat(t.amount),t.order)}toJson(t){return{ingredient:t.ingredientId,weight_unit:t.weightUnitId,amount:t.amount.toString(),order:t.order}}}class rje{constructor(t,n,r,o=""){this.id=t,this.amount=n,this.grams=r,this.name=o}}class oje{fromJson(t){return new rje(t.id,parseFloat(t.amount),t.gram)}}const Nre=async e=>{if(e===null)return null;const{data:t}=await tt.get(pt(Ft.INGREDIENT_WEIGHT_UNIT,{id:e}),{headers:gt()});return new oje().fromJson(t)},ije=async e=>{const t=await tt.post(pt(Ft.MEAL),e,{headers:gt()});return new uz().fromJson(t.data)},aje=async e=>{const t=await tt.patch(pt(Ft.MEAL,{id:e.id}),e,{headers:gt()});return new uz().fromJson(t.data)},sje=async e=>{await tt.delete(pt(Ft.MEAL,{id:e}),{headers:gt()})},lje=async e=>{let t=[];const n=new uz,r=new hz,{data:o}=await tt.get(pt(Ft.MEAL,{query:{plan:e}}),{headers:gt()}),i=o.results.map(a=>n.fromJson(a));for(const a of i){t=[];const{data:s}=await tt.get(pt(Ft.MEAL_ITEM,{query:{meal:a.id}}),{headers:gt()}),l=s.results.map(u=>r.fromJson(u));for(const u of l)t.push(u.ingredientId);const c=await _re(t);for(const u of l)u.weightUnit=await Nre(u.weightUnitId),u.ingredient=c.find(d=>d.id===u.ingredientId);a.items=l}return i};class cje{constructor(t,n,r,o,i,a,s,l,c){Tt(this,"ingredient",null);Tt(this,"weightUnit",null);this.id=t,this.planId=n,this.mealId=r,this.ingredientId=o,this.weightUnitId=i,this.amount=a,this.datetime=s,l&&(this.ingredient=l),c&&(this.weightUnit=c)}get amountString(){var t;return this.amount.toFixed().toString()+(this.weightUnitId!==null?` ${(t=this.weightUnit)==null?void 0:t.name}`:"g")}get nutritionalValues(){return this.ingredient?ss.fromIngredient(this.ingredient,this.amount,this.weightUnit):(console.log("Diary entry has no ingredient, returning empty NutritionalValues object"),new ss)}}class gz{fromJson(t){return new cje(t.id,t.plan,t.meal,t.ingredient,t.weight_unit,parseFloat(t.amount),new Date(t.datetime))}toJson(t){return{plan:t.planId,meal:t.mealId,ingredient:t.ingredientId,weight_unit:t.weightUnitId,amount:t.amount.toString(),datetime:t.datetime.toISOString()}}}const uje=async(e,t)=>{const n=new gz,r={plan:e,limit:Rre};t&&(r.datetime__date=gi(t));const o=pt(Ft.NUTRITIONAL_DIARY,{query:r}),i=[];for await(const a of zC(o,gt()))for(const s of a){let l=n.fromJson(s);l.weightUnit=await Nre(l.weightUnitId),i.push(l)}return i},Lre=async e=>{const t=await tt.post(pt(Ft.NUTRITIONAL_DIARY),e,{headers:gt()});return new gz().fromJson(t.data)},dje=async e=>{const t=await tt.patch(pt(Ft.NUTRITIONAL_DIARY,{id:e.id}),e,{headers:gt()});return new gz().fromJson(t.data)},$b="nutritionplan",fje=async()=>{const{data:e}=await tt.get(pt($b),{headers:gt()}),t=new yk;return e.results.map(n=>t.fromJson(n))},pje=async()=>{const{data:e}=await tt.get(pt($b,{query:{limit:"1"}}),{headers:gt()});return e.count===0?null:await mz(e.results[0].id)},mz=async(e,t)=>{if(e===null)return null;const{data:n}=await tt.get(pt($b,{id:e}),{headers:gt()}),r=[],i=new yk().fromJson(n),a=await Promise.all([lje(e),uje(e,t)]);i.meals=a[0],i.diaryEntries=a[1],i.diaryEntries.forEach(l=>{r.includes(l.ingredientId)||r.push(l.ingredientId)});const s=await _re(r);return i.diaryEntries.forEach(l=>{l.ingredient=s.find(c=>c.id===l.ingredientId)}),i.meals.forEach(l=>{l.diaryEntries=i.diaryEntries.filter(c=>c.mealId===l.id)}),i},hje=async e=>{const t=await tt.post(pt($b),e,{headers:gt()});return new yk().fromJson(t.data)},gje=async e=>{const t=await tt.patch(pt($b,{id:e.id}),e,{headers:gt()});return new yk().fromJson(t.data)},mje=async e=>{await tt.delete(pt($b,{id:e}),{headers:gt()})};function yje(){return fo({queryKey:[It.NUTRITIONAL_PLANS],queryFn:()=>fje()})}function vje(){return fo({queryKey:[It.NUTRITIONAL_PLAN,"last"],queryFn:()=>pje()})}function bje(e){return fo({queryKey:[It.NUTRITIONAL_PLAN,e],queryFn:()=>mz(e)})}function wje(e,t,n=!0){return fo({queryKey:[It.NUTRITIONAL_PLAN,e,t],queryFn:()=>mz(e,new Date(t)),enabled:n})}const xje=()=>{const e=Lt();return jt({mutationFn:t=>hje(t),onSuccess:()=>{e.invalidateQueries({queryKey:[It.NUTRITIONAL_PLANS]}),e.invalidateQueries({queryKey:[It.NUTRITIONAL_PLAN]})}})},Sje=e=>{const t=Lt();return jt({mutationFn:n=>mje(n),onSuccess:()=>{t.invalidateQueries({queryKey:[It.NUTRITIONAL_PLANS]}),t.invalidateQueries({queryKey:[It.NUTRITIONAL_PLAN,e]})}})},Cje=e=>{const t=Lt();return jt({mutationFn:n=>gje(n),onSuccess:()=>{t.invalidateQueries({queryKey:[It.NUTRITIONAL_PLAN,e]}),t.invalidateQueries({queryKey:[It.NUTRITIONAL_PLANS]})}})},Eje=e=>{const t=Lt();return jt({mutationFn:n=>Lre(n),onSuccess:()=>t.invalidateQueries({queryKey:[It.NUTRITIONAL_PLAN,e]})})},Fre=e=>{const t=Lt();return jt({mutationFn:n=>Promise.all(n.map(r=>Lre(r))),onSuccess:()=>t.invalidateQueries({queryKey:[It.NUTRITIONAL_PLAN,e]})})},Pje=e=>{const t=Lt();return jt({mutationFn:n=>dje(n),onSuccess:()=>t.invalidateQueries({queryKey:[It.NUTRITIONAL_PLAN,e]})})},Tje=e=>{const t=Lt();return jt({mutationFn:n=>ije(n),onSuccess:()=>{t.invalidateQueries({queryKey:[It.NUTRITIONAL_PLAN,e]})}})},Ije=e=>{const t=Lt();return jt({mutationFn:n=>sje(n),onSuccess:()=>{t.invalidateQueries({queryKey:[It.NUTRITIONAL_PLAN,e]})}})},Oje=e=>{const t=Lt();return jt({mutationFn:n=>aje(n),onSuccess:()=>{t.invalidateQueries({queryKey:[It.NUTRITIONAL_PLAN,e]})}})},Aje=async e=>{const t=await tt.post(pt(Ft.MEAL_ITEM),e,{headers:gt()});return new hz().fromJson(t.data)},kje=async e=>{const t=await tt.patch(pt(Ft.MEAL_ITEM,{id:e.id}),e,{headers:gt()});return new hz().fromJson(t.data)},Mje=async e=>{await tt.delete(pt(Ft.MEAL_ITEM,{id:e}),{headers:gt()})},Rje=e=>{const t=Lt();return jt({mutationFn:n=>Aje(n),onSuccess:()=>{t.invalidateQueries({queryKey:[It.NUTRITIONAL_PLAN,e]})}})},$je=e=>{const t=Lt();return jt({mutationFn:n=>kje(n),onSuccess:()=>{t.invalidateQueries({queryKey:[It.NUTRITIONAL_PLAN,e]})}})},Dje=e=>{const t=Lt();return jt({mutationFn:n=>Mje(n),onSuccess:()=>{t.invalidateQueries({queryKey:[It.NUTRITIONAL_PLAN,e]})}})};class jre{constructor(t,n,r){this.date=t,this.weight=n,this.id=r}}class yz{fromJson(t){return new jre(new Date(t.date),parseFloat(t.weight),t.id)}toJson(t){return{id:t.id,date:gi(t.date),weight:t.weight}}}const bk="weightentry",_je=async(e="")=>{const t=EFe(e),n=pt(bk,{query:{ordering:"-date",limit:900,...t&&{date__gte:t}}}),{data:r}=await tt.get(n,{headers:gt()}),o=new yz;return r.results.map(i=>o.fromJson(i))},Nje=async e=>(await tt.delete(pt(bk,{id:e}),{headers:gt()})).status,Lje=async e=>{const t=new yz,n=await tt.patch(pt(bk,{id:e.id}),t.toJson(e),{headers:gt()});return t.fromJson(n)},Fje=async e=>{const t=new yz,n=await tt.post(pt(bk),t.toJson(e),{headers:gt()});return t.fromJson(n.data)},jje=22;function Bje(e,t=jje){return e.length>t?e.slice(0,t)+"…":e}function zje(e){return e.toLowerCase().replace(/\s/g,"_").replace("(","_").replace(")","_").replace("-","_")}function Na(e){return`server.${zje(e)}`}class Vje{constructor(t,n,r,o){this.id=t,this.name=n,this.nameEn=r,this.isFront=o}getName(t){return this.nameEn?`${this.name} (${t(Na(this.nameEn))})`:this.name}}class Bre{fromJson(t){return new Vje(t.id,t.name,t.name_en,t.is_front)}toJson(t){return{}}}const Hje="muscle",Uje=async()=>{const e=pt(Hje),{data:t}=await tt.get(e,{headers:gt()}),n=new Bre;return t.results.map(r=>n.fromJson(r))};class Wje{constructor(t,n){this.id=t,this.name=n}}class zre{fromJson(t){return new Wje(t.id,t.name)}toJson(t){return{id:t.id,name:t.name}}}const Gje="equipment",qje=async()=>{const e=pt(Gje),{data:t}=await tt.get(e,{headers:gt()}),n=new zre;return t.results.map(r=>n.fromJson(r))};class Kje{constructor(t,n){this.id=t,this.name=n}}class Vre{fromJson(t){return new Kje(t.id,t.name)}toJson(t){return{id:t.id,name:t.name}}}const Yje="exercisecategory",Qje=async()=>{const e=pt(Yje),{data:t}=await tt.get(e,{headers:gt()}),n=new Vre;return t.results.map(r=>n.fromJson(r))};var Xu=(e=>(e[e.LINE_ART=1]="LINE_ART",e[e.THREE_D=2]="THREE_D",e[e.LOW_POLY=3]="LOW_POLY",e[e.PHOTO=4]="PHOTO",e[e.OTHER=5]="OTHER",e))(Xu||{});class Xje{constructor(t,n,r,o){this.id=t,this.uuid=n,this.url=r,this.isMain=o}}class TN{fromJson(t){return new Xje(t.id,t.uuid,t.image,t.is_main)}toJson(t){return{id:t.id,image:t.url,is_front:t.isMain}}}class Jje{constructor(t,n,r){this.id=t,this.uuid=n,this.alias=r}}class Hre{fromJson(t){return new Jje(t.id,t.uuid,t.alias)}toJson(t){return{id:t.id,name:t.alias}}}class IN{constructor(t,n,r){this.id=t,this.exercise=n,this.note=r}}class Ure{fromJson(t){return new IN(t.id,t.exercise,t.comment)}toJson(t){return{id:t.id,comment:t.note,exercise:t.exercise}}}class Wre{constructor(t,n,r,o,i,a,s,l){Tt(this,"notes",[]);Tt(this,"aliases",[]);Tt(this,"authors",[]);this.id=t,this.uuid=n,this.name=r,this.description=o,this.language=i,a&&(this.notes=a),s&&(this.aliases=s),l&&(this.authors=l)}get nameLong(){return Bje(this.name)}get nameSlug(){return Dre(this.name)}}class vz{fromJson(t){var n,r;return new Wre(t.id,t.uuid,t.name,t.description,t.language,(n=t.notes)==null?void 0:n.map(o=>new Ure().fromJson(o)),(r=t.aliases)==null?void 0:r.map(o=>new Hre().fromJson(o)),t.author_history)}toJson(t){return{id:t.id,uuid:t.uuid,name:t.name,description:t.description,language:t.language}}}class Zje{constructor(t,n,r,o){this.id=t,this.uuid=n,this.url=r,this.isMain=o}}class Gre{fromJson(t){return new Zje(t.id,t.uuid,t.video,t.is_main)}toJson(t){return{id:t.id,video:t.url}}}class eBe{constructor(t,n,r,o,i,a,s,l,c,u,d){Tt(this,"translations",[]);Tt(this,"videos",[]);Tt(this,"authors",[]);this.id=t,this.uuid=n,this.category=r,this.equipment=o,this.muscles=i,this.musclesSecondary=a,this.images=s,this.variationId=l,c&&(this.translations=c),u&&(this.videos=u),d&&(this.authors=d)}getTranslation(t){const n=t!=null?t.id:Iv;let r=this.translations.find(o=>o.language===n);return r||(r=this.translations.find(o=>o.language===Iv)),r||this.translations[0]}get availableLanguages(){return this.translations.map(t=>t.language)}get mainImage(){return this.images.find(t=>t.isMain)}get sideImages(){return this.images.filter(t=>!t.isMain)}}class qre{fromJson(t){const n=new Vre,r=new zre,o=new Bre,i=new TN,a=new vz,s=new Gre,l=new eBe(t.id,t.uuid,n.fromJson(t.category),t.equipment.map(c=>r.fromJson(c)),t.muscles.map(c=>o.fromJson(c)),t.muscles_secondary.map(c=>o.fromJson(c)),t.images.map(c=>i.fromJson(c)),t.variations,t.translations.map(c=>a.fromJson(c)),t.videos.map(c=>s.fromJson(c)),t.author_history);if(l.translations.some(c=>c.language===Iv)||console.info(`No english translation found for exercise base ${l.uuid}!`),l.translations.length===0)throw new Error(`No translations found for exercise base ${l.uuid}!`);return l}toJson(t){return{id:t.id,uuid:t.uuid,category:t.category.id,equipment:t.equipment.map(n=>n.id),muscles:t.muscles.map(n=>n.id),muscles_secondary:t.musclesSecondary.map(n=>n.id),images:t.images.map(n=>new TN().toJson(n))}}}const bz="exercisebaseinfo",wz="exercise-base";function Kre(e){const t=new qre,n=[];for(const r of e.results)try{n.push(t.fromJson(r))}catch(o){console.error("An error happened, skipping base:",o)}return n}const tBe=async()=>{const e=pt(bz,{query:{limit:900}}),t=await tt.get(e,{headers:gt()});return Kre(t.data)},wk=async e=>{const t=new qre,n=pt(bz,{id:e}),r=await tt.get(n,{headers:gt()});return t.fromJson(r.data)},nBe=async e=>{if(!e)return[];const t=pt(bz,{query:{variations:e}}),n=await tt.get(t,{headers:gt()});return Kre(n.data)},rBe=async(e,t,n,r,o,i)=>{const a=pt(wz),s={category:e,equipment:t,muscles:n,muscles_secondary:r,variation_id:o,license_author:i};return(await tt.post(a,s,{headers:gt()})).data.id},xz=async(e,t)=>{const n=pt(wz,{id:e});return(await tt.patch(n,t,{headers:gt()})).status},TG=async(e,t)=>{const r=pt(wz,t===void 0?{id:e}:{id:e,query:{replaced_by:t}});return(await tt.delete(r,{headers:gt()})).status},Sz="exercise-translation",oBe="exercise/search",iBe=async(e,t=_Fe,n=!0)=>{const r=[t];t!==Ov&&n&&r.push(Ov);const o=pt(oBe,{query:{term:e,language:r.join(",")}}),{data:i}=await tt.get(o);return i.suggestions},ON=async(e,t,n,r,o)=>{const i=pt(Sz),a={exercise_base:e,language:t,name:n,description:r,license_author:o},s=await tt.post(i,a,{headers:gt()});return new vz().fromJson(s.data)},aBe=async(e,t,n,r,o)=>{const i=pt(Sz,{id:e}),a={exercise_base:t,language:n,name:r,description:o},s=await tt.patch(i,a,{headers:gt()});return new vz().fromJson(s.data)},sBe=async e=>{const t=pt(Sz,{id:e});return(await tt.delete(t,{headers:gt()})).status};class Yre{constructor(t,n,r){this.id=t,this.nameShort=n,this.nameLong=r}}class lBe{fromJson(t){return new Yre(t.id,t.short_name,t.full_name)}toJson(t){return{}}}const cBe="language",uBe=async()=>{const e=pt(cBe),{data:t}=await tt.get(e,{headers:gt()}),n=new lBe;return t.results.map(r=>n.fromJson(r))},Db=(e,t)=>{const n=e.split("-")[0],r=t.find(o=>o.nameShort===n);if(r)return r},Qre="exerciseimage",Xre=async e=>{const t=pt(Qre),n=gt();n["Content-Type"]="multipart/form-data";const r=await tt.post(t,{exercise_base:e.exerciseId,image:e.image,license_title:e.imageData.title,license_object_url:e.imageData.objectUrl,license_author:e.imageData.author,license_author_url:e.imageData.authorUrl,license_derivative_source_url:e.imageData.derivativeSourceUrl,style:e.imageData.style},{headers:n});return new TN().fromJson(r.data)},dBe=async e=>{const t=pt(Qre,{id:e}),n=gt();return(await tt.delete(t,{headers:n})).status},Jre="exercisealias",AN=async(e,t)=>{const n=pt(Jre),r=await tt.post(n,{exercise:e,alias:t},{headers:gt()});return new Hre().fromJson(r.data)},fBe=async e=>(await tt.delete(pt(Jre,{id:e}),{headers:gt()})).status,Zre="video",pBe=async(e,t,n)=>{const r=pt(Zre),o=gt();o["Content-Type"]="multipart/form-data";const i=await tt.post(r,{exercise_base:e,license_author:t,video:n},{headers:o});return new Gre().fromJson(i.data)},hBe=async e=>{const t=pt(Zre,{id:e}),n=gt();return(await tt.delete(t,{headers:n})).status};class gBe{constructor(t,n,r,o,i,a,s,l){this.id=t,this.slotEntryId=n,this.iteration=r,this.trigger=o,this.value=i,this.operation=a,this.step=s,this.needLogToApply=l}get replace(){return this.operation==="r"}}class Uc{constructor(){Tt(this,"fromJson",t=>new gBe(t.id,t.slot_entry,t.iteration,t.trigger,parseFloat(t.value),t.operation,t.step,t.need_log_to_apply));Tt(this,"toJson",t=>({slot_entry:t.slotEntryId,iteration:t.iteration,trigger:t.trigger,value:t.value,operation:t.operation,step:t.step,need_log_to_apply:t.needLogToApply}))}}class mBe{constructor(t,n,r,o,i,a,s,l,c,u,d,f){Tt(this,"weightConfigs",[]);Tt(this,"maxWeightConfigs",[]);Tt(this,"repsConfigs",[]);Tt(this,"maxRepsConfigs",[]);Tt(this,"restTimeConfigs",[]);Tt(this,"maxRestTimeConfigs",[]);Tt(this,"nrOfSetsConfigs",[]);Tt(this,"rirConfigs",[]);Tt(this,"exercise");this.id=t,this.slotId=n,this.exerciseId=r,this.repetitionUnitId=o,this.repetitionRounding=i,this.weightUnitId=a,this.weightRounding=s,this.order=l,this.comment=c,this.type=u,this.config=d,f!==void 0&&(this.weightConfigs=f.weightConfigs??[],this.maxWeightConfigs=f.maxWeightConfigs??[],this.repsConfigs=f.repsConfigs??[],this.maxRepsConfigs=f.maxRepsConfigs??[],this.restTimeConfigs=f.restTimeConfigs??[],this.maxRestTimeConfigs=f.maxRestTimeConfigs??[],this.nrOfSetsConfigs=f.nrOfSetsConfigs??[],this.rirConfigs=f.rirConfigs??[])}}class Cz{constructor(){Tt(this,"fromJson",t=>{let n={weightConfigs:[],maxWeightConfigs:[],repsConfigs:[],maxRepsConfigs:[],restTimeConfigs:[],maxRestTimeConfigs:[],nrOfSetsConfigs:[],rirConfigs:[]};return t.hasOwnProperty("weight_configs")&&(n.weightConfigs=t.weight_configs.map(r=>new Uc().fromJson(r))),t.hasOwnProperty("max_weight_configs")&&(n.maxWeightConfigs=t.max_weight_configs.map(r=>new Uc().fromJson(r))),t.hasOwnProperty("reps_configs")&&(n.repsConfigs=t.reps_configs.map(r=>new Uc().fromJson(r))),t.hasOwnProperty("max_reps_configs")&&(n.maxRepsConfigs=t.max_reps_configs.map(r=>new Uc().fromJson(r))),t.hasOwnProperty("set_nr_configs")&&(n.nrOfSetsConfigs=t.set_nr_configs.map(r=>new Uc().fromJson(r))),t.hasOwnProperty("rest_configs")&&(n.restTimeConfigs=t.rest_configs.map(r=>new Uc().fromJson(r))),t.hasOwnProperty("max_rest_configs")&&(n.maxRestTimeConfigs=t.max_rest_configs.map(r=>new Uc().fromJson(r))),t.hasOwnProperty("rir_configs")&&(n.rirConfigs=t.rir_configs.map(r=>new Uc().fromJson(r))),new mBe(t.id,t.slot,t.exercise,t.repetition_unit,t.repetition_rounding,t.weight_unit,t.weight_rounding,t.order,t.comment,t.type,t.config,n)});Tt(this,"toJson",t=>({slot:t.slotId,exercise:t.exerciseId,repetition_unit:t.repetitionUnitId,repetition_rounding:t.repetitionRounding,weight_unit:t.weightUnitId,weight_rounding:t.weightRounding,order:t.order,comment:t.comment,type:t.type,config:t.config}))}}class yBe{constructor(t,n,r,o,i,a){Tt(this,"configs",[]);this.id=t,this.dayId=n,this.order=r,this.comment=o,this.config=i,a&&(this.configs=a)}}class Ez{constructor(){Tt(this,"fromJson",t=>new yBe(t.id,t.day,t.order,t.comment,t.config,t.hasOwnProperty("entries")?t.entries.map(n=>new Cz().fromJson(n)):[]))}toJson(t){return{id:t.id,day:t.dayId,order:t.order,comment:t.order,config:t.config}}}class vBe{constructor(t,n,r,o,i,a,s,l,c){Tt(this,"slots",[]);this.id=t,this.order=n,this.name=r,this.description=o,this.isRest=i,this.needLogsToAdvance=a,this.type=s,this.config=l,c&&(this.slots=c)}get isSpecialType(){return this.type!=="custom"}}class xk{constructor(){Tt(this,"fromJson",t=>new vBe(t.id,t.order,t.name,t.description,t.is_rest,t.need_logs_to_advance,t.type,t.config,t.hasOwnProperty("slots")?t.slots.map(n=>new Ez().fromJson(n)):[]));Tt(this,"toJson",t=>({order:t.order,description:t.description,is_rest:t.isRest,need_logs_to_advance:t.needLogsToAdvance,type:t.type,config:t.config}))}}class bBe{constructor(t,n,r,o,i,a,s,l){Tt(this,"days",[]);Tt(this,"logData",[]);Tt(this,"dayDataCurrentIteration",[]);Tt(this,"dayDataAllIterations",[]);this.id=t,this.name=n,this.description=r,this.created=o,this.start=i,this.end=a,this.fitInWeek=s,l&&(this.days=l)}get groupedDayDataByIteration(){const t={};for(const n of this.dayDataAllIterations)t[n.iteration]||(t[n.iteration]=[]),t[n.iteration].push(n);return t}}class Sk{fromJson(t){return new bBe(t.id,t.name,t.description,new Date(t.created),new Date(t.start),new Date(t.end),t.fit_in_week)}toJson(t){return{id:t.id,name:t.name,description:t.description,start:gi(t.start),end:gi(t.end),fit_in_week:t.fitInWeek}}}class wBe{constructor(t,n,r,o,i,a,s,l,c,u,d,f,p,h,m,y,w,x,C){Tt(this,"exercise");this.exerciseId=t,this.slotEntryId=n,this.type=r,this.nrOfSets=o,this.weight=i,this.maxWeight=a,this.weightUnitId=s,this.weightRounding=l,this.reps=c,this.maxReps=u,this.repsUnitId=d,this.repsRounding=f,this.rir=p,this.rpe=h,this.restTime=m,this.maxRestTime=y,this.textRepr=w,this.comment=x,this.exercise=C}get isSpecialType(){return this.type!=="normal"}}class xBe{constructor(){Tt(this,"fromJson",t=>new wBe(t.exercise,t.slot_entry_id,t.type,t.sets,t.weight!==null?parseFloat(t.weight):null,t.max_weight!==null?parseFloat(t.max_weight):null,t.weight_unit,parseFloat(t.weight_rounding),t.reps!==null?parseFloat(t.reps):null,t.max_reps!==null?parseFloat(t.max_reps):null,t.reps_unit,parseFloat(t.reps_rounding),t.rir!==null?parseFloat(t.rir):null,t.rpe!==null?parseFloat(t.rpe):null,t.rest!==null?parseFloat(t.rest):null,t.max_rest!==null?parseFloat(t.max_rest):null,t.text_repr,t.comment))}}class SBe{constructor(t,n,r,o,i){Tt(this,"exercises",[]);this.comment=t,this.isSuperset=n,this.exerciseIds=r,this.setConfigs=o,i&&(this.exercises=i)}}class CBe{constructor(){Tt(this,"fromJson",t=>new SBe(t.comment,t.is_superset,t.exercises,t.sets.map(n=>new xBe().fromJson(n))))}}class EBe{constructor(t,n,r,o,i){Tt(this,"slots",[]);this.iteration=t,this.date=n,this.label=r,this.day=o,i&&(this.slots=i)}}class eoe{constructor(){Tt(this,"fromJson",t=>new EBe(t.iteration,new Date(t.date),t.label,t.day!=null?new xk().fromJson(t.day):null,t.slots.map(n=>new CBe().fromJson(n))))}}class PBe{constructor(t,n,r,o,i,a,s,l,c,u,d,f,p){this.id=t,this.date=n,this.iteration=r,this.exerciseId=o,this.slotEntryId=i,this.repetitionUnitId=a,this.reps=s,this.weight=l,this.weightUnitId=c,this.rir=u,this.repetitionUnitObj=d,this.weightUnitObj=f,this.exerciseObj=p,d&&(this.repetitionUnitObj=d),f&&(this.weightUnitObj=f),p&&(this.exerciseObj=p)}get rirString(){return this.rir===null||this.rir===""?"-/-":this.rir}}class toe{fromJson(t){return new PBe(t.id,new Date(t.date),t.iteration,t.exercise_base,t.set_config,t.repetition_unit,t.reps,t.weight===null?null:Number.parseFloat(t.weight),t.weight_unit,t.rir)}toJson(t){return{id:t.id,iteration:t.iteration,set_config:t.slotEntryId,exercise_base:t.exerciseId,repetition_unit:t.repetitionUnitId,reps:t.reps,weight:t.weight,weight_unit:t.weightUnitId,rir:t.rir}}}class TBe{constructor(t,n,r,o,i,a,s,l){Tt(this,"logs",[]);this.id=t,this.dayId=n,this.date=r,this.notes=o,this.impression=i,this.timeStart=a,this.timeEnd=s,this.dayObj=l,l&&(this.dayObj=l)}}class IBe{fromJson(t){return new TBe(t.id,t.day,t.date,t.notes,t.impression,t.time_start,t.time_end)}toJson(t){return{id:t.id,day:t.dayId,notes:t.notes,impression:t.impression,time_start:t.timeStart,time_end:t.timeEnd}}}class OBe{constructor(t,n){this.session=t,this.logs=n}}class ABe{constructor(){Tt(this,"fromJson",t=>new OBe(new IBe().fromJson(t.session),t.logs.map(n=>new toe().fromJson(n))))}}class kBe{constructor(t,n){Tt(this,"id");Tt(this,"name");this.id=t,this.name=n}}class MBe{fromJson(t){return new kBe(t.id,t.name)}toJson(t){return{}}}class RBe{constructor(t,n){Tt(this,"id");Tt(this,"name");this.id=t,this.name=n}}class $Be{fromJson(t){return new RBe(t.id,t.name)}toJson(t){return{}}}const DBe="setting-repetitionunit",_Be="setting-weightunit",Pz=async()=>{const e=pt(DBe),{data:t}=await tt.get(e,{headers:gt()}),n=new MBe;return t.results.map(r=>n.fromJson(r))},Tz=async()=>{const e=pt(_Be),{data:t}=await tt.get(e,{headers:gt()}),n=new $Be;return t.results.map(r=>n.fromJson(r))},NBe="structure",LBe="logs",FBe="current-iteration-display",jBe="date-sequence-display",BBe=e=>new Sk().fromJson(e);let ah={};const noe=async e=>{var c,u;const t=new Sk,n=await tt.get(pt(Ft.ROUTINE,{id:e}),{headers:gt()}),r=t.fromJson(n.data),o=await Promise.all([Pz(),Tz(),GBe(e),qBe(e),KBe(e),YBe(e)]);o[0],o[1];const i=o[2],a=o[3],s=o[4],l=o[5];for(const d of i)for(const f of d.slots)for(const p of f.exerciseIds)p in ah||(ah[p]=await wk(p));for(const d of i)for(const f of d.slots){for(const p of f.setConfigs)p.exercise=ah[p.exerciseId];for(const p of f.exerciseIds)(c=f.exercises)==null||c.push(ah[p])}for(const d of a)for(const f of d.slots){for(const p of f.setConfigs)p.exercise=ah[p.exerciseId];for(const p of f.exerciseIds)(u=f.exercises)==null||u.push(ah[p])}for(const d of s)for(const f of d.slots)for(const p of f.configs)p.exercise=ah[p.exerciseId];return r.dayDataCurrentIteration=i,r.dayDataAllIterations=a,r.logData=l,r.days=s,r},zBe=async()=>{const e=pt(Ft.ROUTINE,{query:{limit:"1"}}),t=await tt.get(e,{headers:gt()});return t.data.count===0?null:await noe(t.data.results[0].id)},VBe=async e=>await noe(e),HBe=async()=>{const e=pt(Ft.ROUTINE),t=await tt.get(e,{headers:gt()}),n=[];for(const r of t.data.results)n.push(await BBe(r));return n},UBe=async e=>{const t=await tt.post(pt(Ft.ROUTINE),e,{headers:gt()});return new Sk().fromJson(t.data)},WBe=async e=>{const t=await tt.patch(pt(Ft.ROUTINE,{id:e.id}),e,{headers:gt()});return new Sk().fromJson(t.data)},GBe=async e=>{const t=await tt.get(pt(Ft.ROUTINE,{id:e,objectMethod:FBe}),{headers:gt()}),n=new eoe;return t.data.map(r=>n.fromJson(r))},qBe=async e=>{const t=await tt.get(pt(Ft.ROUTINE,{id:e,objectMethod:jBe}),{headers:gt()}),n=new eoe;return t.data.map(r=>n.fromJson(r))},KBe=async e=>{const t=await tt.get(pt(Ft.ROUTINE,{id:e,objectMethod:NBe}),{headers:gt()}),n=new xk;return t.data.days.map(r=>n.fromJson(r))},YBe=async e=>{const t=await tt.get(pt(Ft.ROUTINE,{id:e,objectMethod:LBe}),{headers:gt()}),n=new ABe;return t.data.map(r=>n.fromJson(r))};class QBe{constructor(t,n,r,o){Tt(this,"entries",[]);this.id=t,this.name=n,this.unit=r,o&&(this.entries=o)}}class Ck{fromJson(t){return new QBe(t.id,t.name,t.unit)}toJson(t){return{id:t.id,name:t.name,unit:t.unit}}}class XBe{constructor(t,n,r,o,i){this.id=t,this.category=n,this.date=r,this.value=o,this.notes=i}}class Ek{fromJson(t){return new XBe(t.id,t.category,new Date(t.date),t.value,t.notes)}toJson(t){return{id:t.id,category:t.category,date:t.date,value:t.value,notes:t.notes}}}const VC="measurement-category",HC="measurement",JBe=async()=>{const e=new Ck,t=new Ek,{data:n}=await tt.get(pt(VC),{headers:gt()}),r=n.results.map(s=>e.fromJson(s)),o=r.map(async s=>{const l=[],c=pt(HC,{query:{category:s.id}});for await(const u of zC(c,gt()))for(const d of u)l.push(t.fromJson(d));return l}),i=await Promise.all(o);let a;return i.forEach(s=>{s.length>0&&(a=s[0].category,r.findLast(l=>l.id===a).entries=s)}),r},ZBe=async e=>{const{data:t}=await tt.get(pt(VC,{id:e}),{headers:gt()}),n=new Ck().fromJson(t),r=new Ek,o=[],i=pt(HC,{query:{category:n.id}});for await(const a of zC(i,gt()))for(const s of a)o.push(r.fromJson(s));return n.entries=o,n},eze=async e=>{const t=await tt.post(pt(VC),{name:e.name,unit:e.unit},{headers:gt()});return new Ck().fromJson(t.data)},tze=async e=>{const t=await tt.patch(pt(VC,{id:e.id}),{name:e.name,unit:e.unit},{headers:gt()});return new Ck().fromJson(t.data)},nze=async e=>{await tt.delete(pt(VC,{id:e}),{headers:gt()})},rze=async e=>{await tt.delete(pt(HC,{id:e}),{headers:gt()})},oze=async e=>{const t=await tt.patch(pt(HC,{id:e.id}),{date:gi(e.date),value:e.value,notes:e.notes},{headers:gt()});return new Ek().fromJson(t.data)},ize=async e=>{const t=await tt.post(pt(HC),{category:e.categoryId,date:gi(e.date),value:e.value,notes:e.notes},{headers:gt()});return new Ek().fromJson(t.data)},aze="workoutlog",sze=async(e,t=!1)=>{const n=new toe,r=pt(aze,{query:{workout:e.toString(),limit:Rre,ordering:"-date"}}),o=await Promise.all([Pz(),Tz()]),i=o[0],a=o[1],s=new Map,l=[];for await(const c of zC(r))for(const u of c){const d=n.fromJson(u);d.repetitionUnitObj=i.find(f=>f.id===d.repetitionUnitId),d.weightUnitObj=a.find(f=>f.id===d.weightUnitId),t&&(s.get(d.exerciseId)===void 0&&s.set(d.exerciseId,await wk(d.exerciseId)),d.exerciseObj=s.get(d.exerciseId)),l.push(d)}return l},lze=async e=>{const t=await tt.patch(pt(Ft.SLOT_ENTRY,{id:e.id}),e,{headers:gt()});return new Cz().fromJson(t.data)},cze=async e=>{await tt.delete(pt(Ft.SLOT_ENTRY,{id:e}),{headers:gt()})},uze=async e=>{const t=await tt.post(pt(Ft.SLOT_ENTRY),e,{headers:gt()});return new Cz().fromJson(t.data)},dze=async e=>{const t=await tt.patch(pt(Ft.DAY,{id:e.id}),e,{headers:gt()});return new xk().fromJson(t.data)},fze=async e=>{for(const t of e)await tt.patch(pt(Ft.DAY,{id:t.id}),{order:t.order},{headers:gt()})},pze=async e=>{const t=await tt.post(pt(Ft.DAY),e,{headers:gt()});return new xk().fromJson(t.data)},hze=async e=>{await tt.delete(pt(Ft.DAY,{id:e}),{headers:gt()})},gze=async e=>{const t=await tt.post(pt(Ft.SLOT),e,{headers:gt()});return new Ez().fromJson(t.data)},mze=async e=>{const t=await tt.patch(pt(Ft.SLOT,{id:e.id}),e,{headers:gt()});return new Ez().fromJson(t.data)},yze=async e=>{for(const t of e)await tt.patch(pt(Ft.SLOT,{id:t.id}),{order:t.order},{headers:gt()})},vze=async e=>{await tt.delete(pt(Ft.SLOT,{id:e}),{headers:gt()})},Tp=async(e,t)=>{const n=await tt.patch(pt(t,{id:e.id}),e,{headers:gt()});return new Uc().fromJson(n.data)},Ip=async(e,t)=>{const n=await tt.post(pt(t),e,{headers:gt()});return new Uc().fromJson(n.data)},Op=async(e,t)=>await tt.delete(pt(t,{id:e}),{headers:gt()}),bze=async e=>await Tp(e,Ft.WEIGHT_CONFIG),wze=async e=>await Ip(e,Ft.WEIGHT_CONFIG),xze=async e=>await Op(e,Ft.WEIGHT_CONFIG),Sze=async e=>await Tp(e,Ft.MAX_WEIGHT_CONFIG),Cze=async e=>await Ip(e,Ft.MAX_WEIGHT_CONFIG),Eze=async e=>await Op(e,Ft.MAX_WEIGHT_CONFIG),Pze=async e=>await Tp(e,Ft.REPS_CONFIG),Tze=async e=>await Ip(e,Ft.REPS_CONFIG),Ize=async e=>await Op(e,Ft.REPS_CONFIG),Oze=async e=>await Tp(e,Ft.MAX_REPS_CONFIG),Aze=async e=>await Ip(e,Ft.MAX_REPS_CONFIG),kze=async e=>await Op(e,Ft.MAX_REPS_CONFIG),Mze=async e=>await Tp(e,Ft.NR_OF_SETS_CONFIG),Rze=async e=>await Ip(e,Ft.NR_OF_SETS_CONFIG),$ze=async e=>await Op(e,Ft.NR_OF_SETS_CONFIG),Dze=async e=>await Tp(e,Ft.RIR_CONFIG),_ze=async e=>await Ip(e,Ft.RIR_CONFIG),Nze=async e=>await Op(e,Ft.RIR_CONFIG),Lze=async e=>await Tp(e,Ft.REST_CONFIG),Fze=async e=>await Ip(e,Ft.REST_CONFIG),jze=async e=>await Op(e,Ft.REST_CONFIG),Bze=async e=>await Tp(e,Ft.MAX_REST_CONFIG),zze=async e=>await Ip(e,Ft.MAX_REST_CONFIG),Vze=async e=>await Op(e,Ft.MAX_REST_CONFIG);function Mi(e,t){return e.toLocaleString(t,{maximumFractionDigits:0})}function roe(e,t,n){return e.toLocaleString(t,{maximumFractionDigits:0,unit:n.valueOf(),style:"unit"})}function An(e,t){return roe(e,t,"gram")}function pD(e,t){return roe(e,t,"percent")}const zy=e=>{const{i18n:t}=Le(),n=e.planned>0;return K(wt,{children:[b(Bne,{variant:"determinate",value:e.percentage<100?e.percentage:100}),K(st,{variant:"caption",children:[e.title," — ",An(e.logged,t.language),n&&K(wt,{children:[" / ",An(e.planned,t.language)]})]})]})};var Hze=Array.isArray,ja=Hze,Uze=typeof ea=="object"&&ea&&ea.Object===Object&&ea,ooe=Uze,Wze=ooe,Gze=typeof self=="object"&&self&&self.Object===Object&&self,qze=Wze||Gze||Function("return this")(),Eu=qze,Kze=Eu,Yze=Kze.Symbol,UC=Yze,IG=UC,ioe=Object.prototype,Qze=ioe.hasOwnProperty,Xze=ioe.toString,nw=IG?IG.toStringTag:void 0;function Jze(e){var t=Qze.call(e,nw),n=e[nw];try{e[nw]=void 0;var r=!0}catch{}var o=Xze.call(e);return r&&(t?e[nw]=n:delete e[nw]),o}var Zze=Jze,eVe=Object.prototype,tVe=eVe.toString;function nVe(e){return tVe.call(e)}var rVe=nVe,OG=UC,oVe=Zze,iVe=rVe,aVe="[object Null]",sVe="[object Undefined]",AG=OG?OG.toStringTag:void 0;function lVe(e){return e==null?e===void 0?sVe:aVe:AG&&AG in Object(e)?oVe(e):iVe(e)}var $d=lVe;function cVe(e){return e!=null&&typeof e=="object"}var Dd=cVe,uVe=$d,dVe=Dd,fVe="[object Symbol]";function pVe(e){return typeof e=="symbol"||dVe(e)&&uVe(e)==fVe}var _b=pVe,hVe=ja,gVe=_b,mVe=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,yVe=/^\w*$/;function vVe(e,t){if(hVe(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||gVe(e)?!0:yVe.test(e)||!mVe.test(e)||t!=null&&e in Object(t)}var Iz=vVe;function bVe(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Ap=bVe;const Nb=Bn(Ap);var wVe=$d,xVe=Ap,SVe="[object AsyncFunction]",CVe="[object Function]",EVe="[object GeneratorFunction]",PVe="[object Proxy]";function TVe(e){if(!xVe(e))return!1;var t=wVe(e);return t==CVe||t==EVe||t==SVe||t==PVe}var Oz=TVe;const Jt=Bn(Oz);var IVe=Eu,OVe=IVe["__core-js_shared__"],AVe=OVe,hD=AVe,kG=function(){var e=/[^.]+$/.exec(hD&&hD.keys&&hD.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function kVe(e){return!!kG&&kG in e}var MVe=kVe,RVe=Function.prototype,$Ve=RVe.toString;function DVe(e){if(e!=null){try{return $Ve.call(e)}catch{}try{return e+""}catch{}}return""}var aoe=DVe,_Ve=Oz,NVe=MVe,LVe=Ap,FVe=aoe,jVe=/[\\^$.*+?()[\]{}|]/g,BVe=/^\[object .+?Constructor\]$/,zVe=Function.prototype,VVe=Object.prototype,HVe=zVe.toString,UVe=VVe.hasOwnProperty,WVe=RegExp("^"+HVe.call(UVe).replace(jVe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function GVe(e){if(!LVe(e)||NVe(e))return!1;var t=_Ve(e)?WVe:BVe;return t.test(FVe(e))}var qVe=GVe;function KVe(e,t){return e==null?void 0:e[t]}var YVe=KVe,QVe=qVe,XVe=YVe;function JVe(e,t){var n=XVe(e,t);return QVe(n)?n:void 0}var Lg=JVe,ZVe=Lg,eHe=ZVe(Object,"create"),Pk=eHe,MG=Pk;function tHe(){this.__data__=MG?MG(null):{},this.size=0}var nHe=tHe;function rHe(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var oHe=rHe,iHe=Pk,aHe="__lodash_hash_undefined__",sHe=Object.prototype,lHe=sHe.hasOwnProperty;function cHe(e){var t=this.__data__;if(iHe){var n=t[e];return n===aHe?void 0:n}return lHe.call(t,e)?t[e]:void 0}var uHe=cHe,dHe=Pk,fHe=Object.prototype,pHe=fHe.hasOwnProperty;function hHe(e){var t=this.__data__;return dHe?t[e]!==void 0:pHe.call(t,e)}var gHe=hHe,mHe=Pk,yHe="__lodash_hash_undefined__";function vHe(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=mHe&&t===void 0?yHe:t,this}var bHe=vHe,wHe=nHe,xHe=oHe,SHe=uHe,CHe=gHe,EHe=bHe;function Lb(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t-1}var zHe=BHe,VHe=Tk;function HHe(e,t){var n=this.__data__,r=VHe(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var UHe=HHe,WHe=IHe,GHe=_He,qHe=FHe,KHe=zHe,YHe=UHe;function Fb(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t0?1:-1},_h=function(t){return WC(t)&&t.indexOf("%")===t.length-1},ut=function(t){return hUe(t)&&!Bb(t)},zo=function(t){return ut(t)||WC(t)},vUe=0,kp=function(t){var n=++vUe;return"".concat(t||"").concat(n)},na=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!ut(t)&&!WC(t))return r;var i;if(_h(t)){var a=t.indexOf("%");i=n*parseFloat(t.slice(0,a))/100}else i=+t;return Bb(i)&&(i=r),o&&i>n&&(i=n),i},vf=function(t){if(!t)return null;var n=Object.keys(t);return n&&n.length?t[n[0]]:null},bUe=function(t){if(!Array.isArray(t))return!1;for(var n=t.length,r={},o=0;o=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function TUe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function MN(e){"@babel/helpers - typeof";return MN=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},MN(e)}var FG={click:"onClick",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",mouseout:"onMouseOut",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",touchcancel:"onTouchCancel",touchend:"onTouchEnd",touchmove:"onTouchMove",touchstart:"onTouchStart"},ld=function(t){return typeof t=="string"?t:t?t.displayName||t.name||"Component":""},jG=null,mD=null,Nz=function e(t){if(t===jG&&Array.isArray(mD))return mD;var n=[];return v.Children.forEach(t,function(r){Kt(r)||($Ce.isFragment(r)?n=n.concat(e(r.props.children)):n.push(r))}),mD=n,jG=t,n};function sa(e,t){var n=[],r=[];return Array.isArray(t)?r=t.map(function(o){return ld(o)}):r=[ld(t)],Nz(e).forEach(function(o){var i=ys(o,"type.displayName")||ys(o,"type.name");r.indexOf(i)!==-1&&n.push(o)}),n}function ts(e,t){var n=sa(e,t);return n&&n[0]}var BG=function(t){if(!t||!t.props)return!1;var n=t.props,r=n.width,o=n.height;return!(!ut(r)||r<=0||!ut(o)||o<=0)},IUe=["a","altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColormatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-url","foreignObject","g","glyph","glyphRef","hkern","image","line","lineGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","script","set","stop","style","svg","switch","symbol","text","textPath","title","tref","tspan","use","view","vkern"],OUe=function(t){return t&&t.type&&WC(t.type)&&IUe.indexOf(t.type)>=0},hoe=function(t){return t&&MN(t)==="object"&&"clipDot"in t},AUe=function(t,n,r,o){var i,a=(i=gD==null?void 0:gD[o])!==null&&i!==void 0?i:[];return!Jt(t)&&(o&&a.includes(n)||SUe.includes(n))||r&&_z.includes(n)},_t=function(t,n,r){if(!t||typeof t=="function"||typeof t=="boolean")return null;var o=t;if(v.isValidElement(t)&&(o=t.props),!Nb(o))return null;var i={};return Object.keys(o).forEach(function(a){var s;AUe((s=o)===null||s===void 0?void 0:s[a],a,n,r)&&(i[a]=o[a])}),i},RN=function e(t,n){if(t===n)return!0;var r=v.Children.count(t);if(r!==v.Children.count(n))return!1;if(r===0)return!0;if(r===1)return zG(Array.isArray(t)?t[0]:t,Array.isArray(n)?n[0]:n);for(var o=0;o=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function DUe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function DN(e){var t=e.children,n=e.width,r=e.height,o=e.viewBox,i=e.className,a=e.style,s=e.title,l=e.desc,c=$Ue(e,RUe),u=o||{width:n,height:r,x:0,y:0},d=de("recharts-surface",i);return Y.createElement("svg",$N({},_t(c,!0,"svg"),{className:d,width:n,height:r,style:a,viewBox:"".concat(u.x," ").concat(u.y," ").concat(u.width," ").concat(u.height)}),Y.createElement("title",null,s),Y.createElement("desc",null,l),t)}var _Ue=["children","className"];function _N(){return _N=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function LUe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var pn=Y.forwardRef(function(e,t){var n=e.children,r=e.className,o=NUe(e,_Ue),i=de("recharts-layer",r);return Y.createElement("g",_N({className:i},_t(o,!0),{ref:t}),n)}),xc=function(t,n){for(var r=arguments.length,o=new Array(r>2?r-2:0),i=2;io?0:o+t),n=n>o?o:n,n<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var i=Array(o);++r=r?e:BUe(e,t,n)}var VUe=zUe,HUe="\\ud800-\\udfff",UUe="\\u0300-\\u036f",WUe="\\ufe20-\\ufe2f",GUe="\\u20d0-\\u20ff",qUe=UUe+WUe+GUe,KUe="\\ufe0e\\ufe0f",YUe="\\u200d",QUe=RegExp("["+YUe+HUe+qUe+KUe+"]");function XUe(e){return QUe.test(e)}var goe=XUe;function JUe(e){return e.split("")}var ZUe=JUe,moe="\\ud800-\\udfff",e3e="\\u0300-\\u036f",t3e="\\ufe20-\\ufe2f",n3e="\\u20d0-\\u20ff",r3e=e3e+t3e+n3e,o3e="\\ufe0e\\ufe0f",i3e="["+moe+"]",NN="["+r3e+"]",LN="\\ud83c[\\udffb-\\udfff]",a3e="(?:"+NN+"|"+LN+")",yoe="[^"+moe+"]",voe="(?:\\ud83c[\\udde6-\\uddff]){2}",boe="[\\ud800-\\udbff][\\udc00-\\udfff]",s3e="\\u200d",woe=a3e+"?",xoe="["+o3e+"]?",l3e="(?:"+s3e+"(?:"+[yoe,voe,boe].join("|")+")"+xoe+woe+")*",c3e=xoe+woe+l3e,u3e="(?:"+[yoe+NN+"?",NN,voe,boe,i3e].join("|")+")",d3e=RegExp(LN+"(?="+LN+")|"+u3e+c3e,"g");function f3e(e){return e.match(d3e)||[]}var p3e=f3e,h3e=ZUe,g3e=goe,m3e=p3e;function y3e(e){return g3e(e)?m3e(e):h3e(e)}var v3e=y3e,b3e=VUe,w3e=goe,x3e=v3e,S3e=uoe;function C3e(e){return function(t){t=S3e(t);var n=w3e(t)?x3e(t):void 0,r=n?n[0]:t.charAt(0),o=n?b3e(n,1).join(""):t.slice(1);return r[e]()+o}}var E3e=C3e,P3e=E3e,T3e=P3e("toUpperCase"),I3e=T3e;const kk=Bn(I3e);function Or(e){return function(){return e}}const Soe=Math.cos,cI=Math.sin,Dc=Math.sqrt,uI=Math.PI,Mk=2*uI,FN=Math.PI,jN=2*FN,Sh=1e-6,O3e=jN-Sh;function Coe(e){this._+=e[0];for(let t=1,n=e.length;t=0))throw new Error(`invalid digits: ${e}`);if(t>15)return Coe;const n=10**t;return function(r){this._+=r[0];for(let o=1,i=r.length;oSh)if(!(Math.abs(d*l-c*u)>Sh)||!i)this._append`L${this._x1=t},${this._y1=n}`;else{let p=r-a,h=o-s,m=l*l+c*c,y=p*p+h*h,w=Math.sqrt(m),x=Math.sqrt(f),C=i*Math.tan((FN-Math.acos((m+f-y)/(2*w*x)))/2),E=C/x,P=C/w;Math.abs(E-1)>Sh&&this._append`L${t+E*u},${n+E*d}`,this._append`A${i},${i},0,0,${+(d*p>u*h)},${this._x1=t+P*l},${this._y1=n+P*c}`}}arc(t,n,r,o,i,a){if(t=+t,n=+n,r=+r,a=!!a,r<0)throw new Error(`negative radius: ${r}`);let s=r*Math.cos(o),l=r*Math.sin(o),c=t+s,u=n+l,d=1^a,f=a?o-i:i-o;this._x1===null?this._append`M${c},${u}`:(Math.abs(this._x1-c)>Sh||Math.abs(this._y1-u)>Sh)&&this._append`L${c},${u}`,r&&(f<0&&(f=f%jN+jN),f>O3e?this._append`A${r},${r},0,1,${d},${t-s},${n-l}A${r},${r},0,1,${d},${this._x1=c},${this._y1=u}`:f>Sh&&this._append`A${r},${r},0,${+(f>=FN)},${d},${this._x1=t+r*Math.cos(i)},${this._y1=n+r*Math.sin(i)}`)}rect(t,n,r,o){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${r=+r}v${+o}h${-r}Z`}toString(){return this._}}function Lz(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{const r=Math.floor(n);if(!(r>=0))throw new RangeError(`invalid digits: ${n}`);t=r}return e},()=>new k3e(t)}function Fz(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Eoe(e){this._context=e}Eoe.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function Rk(e){return new Eoe(e)}function Poe(e){return e[0]}function Toe(e){return e[1]}function Ioe(e,t){var n=Or(!0),r=null,o=Rk,i=null,a=Lz(s);e=typeof e=="function"?e:e===void 0?Poe:Or(e),t=typeof t=="function"?t:t===void 0?Toe:Or(t);function s(l){var c,u=(l=Fz(l)).length,d,f=!1,p;for(r==null&&(i=o(p=a())),c=0;c<=u;++c)!(c=p;--h)s.point(C[h],E[h]);s.lineEnd(),s.areaEnd()}w&&(C[f]=+e(y,f,d),E[f]=+t(y,f,d),s.point(r?+r(y,f,d):C[f],n?+n(y,f,d):E[f]))}if(x)return s=null,x+""||null}function u(){return Ioe().defined(o).curve(a).context(i)}return c.x=function(d){return arguments.length?(e=typeof d=="function"?d:Or(+d),r=null,c):e},c.x0=function(d){return arguments.length?(e=typeof d=="function"?d:Or(+d),c):e},c.x1=function(d){return arguments.length?(r=d==null?null:typeof d=="function"?d:Or(+d),c):r},c.y=function(d){return arguments.length?(t=typeof d=="function"?d:Or(+d),n=null,c):t},c.y0=function(d){return arguments.length?(t=typeof d=="function"?d:Or(+d),c):t},c.y1=function(d){return arguments.length?(n=d==null?null:typeof d=="function"?d:Or(+d),c):n},c.lineX0=c.lineY0=function(){return u().x(e).y(t)},c.lineY1=function(){return u().x(e).y(n)},c.lineX1=function(){return u().x(r).y(t)},c.defined=function(d){return arguments.length?(o=typeof d=="function"?d:Or(!!d),c):o},c.curve=function(d){return arguments.length?(a=d,i!=null&&(s=a(i)),c):a},c.context=function(d){return arguments.length?(d==null?i=s=null:s=a(i=d),c):i},c}class Ooe{constructor(t,n){this._context=t,this._x=n}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,n){switch(t=+t,n=+n,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,n,t,n):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n)/2,t,this._y0,t,n);break}}this._x0=t,this._y0=n}}function M3e(e){return new Ooe(e,!0)}function R3e(e){return new Ooe(e,!1)}const jz={draw(e,t){const n=Dc(t/uI);e.moveTo(n,0),e.arc(0,0,n,0,Mk)}},$3e={draw(e,t){const n=Dc(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}},Aoe=Dc(1/3),D3e=Aoe*2,_3e={draw(e,t){const n=Dc(t/D3e),r=n*Aoe;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},N3e={draw(e,t){const n=Dc(t),r=-n/2;e.rect(r,r,n,n)}},L3e=.8908130915292852,koe=cI(uI/10)/cI(7*uI/10),F3e=cI(Mk/10)*koe,j3e=-Soe(Mk/10)*koe,B3e={draw(e,t){const n=Dc(t*L3e),r=F3e*n,o=j3e*n;e.moveTo(0,-n),e.lineTo(r,o);for(let i=1;i<5;++i){const a=Mk*i/5,s=Soe(a),l=cI(a);e.lineTo(l*n,-s*n),e.lineTo(s*r-l*o,l*r+s*o)}e.closePath()}},yD=Dc(3),z3e={draw(e,t){const n=-Dc(t/(yD*3));e.moveTo(0,n*2),e.lineTo(-yD*n,-n),e.lineTo(yD*n,-n),e.closePath()}},Ws=-.5,Gs=Dc(3)/2,BN=1/Dc(12),V3e=(BN/2+1)*3,H3e={draw(e,t){const n=Dc(t/V3e),r=n/2,o=n*BN,i=r,a=n*BN+n,s=-i,l=a;e.moveTo(r,o),e.lineTo(i,a),e.lineTo(s,l),e.lineTo(Ws*r-Gs*o,Gs*r+Ws*o),e.lineTo(Ws*i-Gs*a,Gs*i+Ws*a),e.lineTo(Ws*s-Gs*l,Gs*s+Ws*l),e.lineTo(Ws*r+Gs*o,Ws*o-Gs*r),e.lineTo(Ws*i+Gs*a,Ws*a-Gs*i),e.lineTo(Ws*s+Gs*l,Ws*l-Gs*s),e.closePath()}};function U3e(e,t){let n=null,r=Lz(o);e=typeof e=="function"?e:Or(e||jz),t=typeof t=="function"?t:Or(t===void 0?64:+t);function o(){let i;if(n||(n=i=r()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),i)return n=null,i+""||null}return o.type=function(i){return arguments.length?(e=typeof i=="function"?i:Or(i),o):e},o.size=function(i){return arguments.length?(t=typeof i=="function"?i:Or(+i),o):t},o.context=function(i){return arguments.length?(n=i??null,o):n},o}function dI(){}function fI(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function Moe(e){this._context=e}Moe.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:fI(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:fI(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function W3e(e){return new Moe(e)}function Roe(e){this._context=e}Roe.prototype={areaStart:dI,areaEnd:dI,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:fI(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function G3e(e){return new Roe(e)}function $oe(e){this._context=e}$oe.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:fI(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function q3e(e){return new $oe(e)}function Doe(e){this._context=e}Doe.prototype={areaStart:dI,areaEnd:dI,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function K3e(e){return new Doe(e)}function HG(e){return e<0?-1:1}function UG(e,t,n){var r=e._x1-e._x0,o=t-e._x1,i=(e._y1-e._y0)/(r||o<0&&-0),a=(n-e._y1)/(o||r<0&&-0),s=(i*o+a*r)/(r+o);return(HG(i)+HG(a))*Math.min(Math.abs(i),Math.abs(a),.5*Math.abs(s))||0}function WG(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function vD(e,t,n){var r=e._x0,o=e._y0,i=e._x1,a=e._y1,s=(i-r)/3;e._context.bezierCurveTo(r+s,o+s*t,i-s,a-s*n,i,a)}function pI(e){this._context=e}pI.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:vD(this,this._t0,WG(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,vD(this,WG(this,n=UG(this,e,t)),n);break;default:vD(this,this._t0,n=UG(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function _oe(e){this._context=new Noe(e)}(_oe.prototype=Object.create(pI.prototype)).point=function(e,t){pI.prototype.point.call(this,t,e)};function Noe(e){this._context=e}Noe.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,o,i){this._context.bezierCurveTo(t,e,r,n,i,o)}};function Y3e(e){return new pI(e)}function Q3e(e){return new _oe(e)}function Loe(e){this._context=e}Loe.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=GG(e),o=GG(t),i=0,a=1;a=0;--t)o[t]=(a[t]-o[t+1])/i[t];for(i[n-1]=(e[n]+o[n-1])/2,t=0;t=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}break}}this._x=e,this._y=t}};function J3e(e){return new $k(e,.5)}function Z3e(e){return new $k(e,0)}function e4e(e){return new $k(e,1)}function Av(e,t){if((a=e.length)>1)for(var n=1,r,o,i=e[t[0]],a,s=i.length;n=0;)n[t]=t;return n}function t4e(e,t){return e[t]}function n4e(e){const t=[];return t.key=e,t}function r4e(){var e=Or([]),t=zN,n=Av,r=t4e;function o(i){var a=Array.from(e.apply(this,arguments),n4e),s,l=a.length,c=-1,u;for(const d of i)for(s=0,++c;s0){for(var n,r,o=0,i=e[0].length,a;o0){for(var n=0,r=e[t[0]],o,i=r.length;n0)||!((i=(o=e[t[0]]).length)>0))){for(var n=0,r=1,o,i,a;r=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function f4e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var Foe={symbolCircle:jz,symbolCross:$3e,symbolDiamond:_3e,symbolSquare:N3e,symbolStar:B3e,symbolTriangle:z3e,symbolWye:H3e},p4e=Math.PI/180,h4e=function(t){var n="symbol".concat(kk(t));return Foe[n]||jz},g4e=function(t,n,r){if(n==="area")return t;switch(r){case"cross":return 5*t*t/9;case"diamond":return .5*t*t/Math.sqrt(3);case"square":return t*t;case"star":{var o=18*p4e;return 1.25*t*t*(Math.tan(o)-Math.tan(o*2)*Math.pow(Math.tan(o),2))}case"triangle":return Math.sqrt(3)*t*t/4;case"wye":return(21-10*Math.sqrt(3))*t*t/8;default:return Math.PI*t*t/4}},m4e=function(t,n){Foe["symbol".concat(kk(t))]=n},Dk=function(t){var n=t.type,r=n===void 0?"circle":n,o=t.size,i=o===void 0?64:o,a=t.sizeType,s=a===void 0?"area":a,l=d4e(t,s4e),c=KG(KG({},l),{},{type:r,size:i,sizeType:s}),u=function(){var y=h4e(r),w=U3e().type(y).size(g4e(i,s,r));return w()},d=c.className,f=c.cx,p=c.cy,h=_t(c,!0);return f===+f&&p===+p&&i===+i?Y.createElement("path",VN({},h,{className:de("recharts-symbols",d),transform:"translate(".concat(f,", ").concat(p,")"),d:u()})):null};Dk.registerSymbol=m4e;function kv(e){"@babel/helpers - typeof";return kv=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},kv(e)}function HN(){return HN=Object.assign?Object.assign.bind():function(e){for(var t=1;t{if(!o)return;function w(x){x.defaultPrevented||x.key==="Escape"&&(r==null||r(x,"escapeKeyDown"))}return document.addEventListener("keydown",w),()=>{document.removeEventListener("keydown",w)}},[o,r]);const s=ei((w,x)=>{r==null||r(w,x)}),l=ei(w=>{!r||w==null||a.start(w,()=>{s(null,"timeout")})});v.useEffect(()=>(o&&l(t),a.clear),[o,t,l,a]);const c=w=>{r==null||r(w,"clickaway")},u=a.clear,d=v.useCallback(()=>{t!=null&&l(i??t*.5)},[t,i,l]),f=w=>x=>{const S=w.onBlur;S==null||S(x),d()},p=w=>x=>{const S=w.onFocus;S==null||S(x),u()},h=w=>x=>{const S=w.onMouseEnter;S==null||S(x),u()},m=w=>x=>{const S=w.onMouseLeave;S==null||S(x),d()};return v.useEffect(()=>{if(!n&&o)return window.addEventListener("focus",d),window.addEventListener("blur",u),()=>{window.removeEventListener("focus",d),window.removeEventListener("blur",u)}},[n,o,d,u]),{getRootProps:(w={})=>{const x={...RT(e),...RT(w)};return{role:"presentation",...w,...x,onBlur:f(x),onFocus:p(x),onMouseEnter:h(x),onMouseLeave:m(x)}},onClickAway:c}}function q_e(e){return nt("MuiSnackbarContent",e)}it("MuiSnackbarContent",["root","message","action"]);const K_e=e=>{const{classes:t}=e;return rt({root:["root"],action:["action"],message:["message"]},q_e,t)},Y_e=re(ro,{name:"MuiSnackbarContent",slot:"Root",overridesResolver:(e,t)=>t.root})(Je(({theme:e})=>{const t=e.palette.mode==="light"?.8:.98,n=NZ(e.palette.background.default,t);return{...e.typography.body2,color:e.vars?e.vars.palette.SnackbarContent.color:e.palette.getContrastText(n),backgroundColor:e.vars?e.vars.palette.SnackbarContent.bg:n,display:"flex",alignItems:"center",flexWrap:"wrap",padding:"6px 16px",borderRadius:(e.vars||e).shape.borderRadius,flexGrow:1,[e.breakpoints.up("sm")]:{flexGrow:"initial",minWidth:288}}})),Q_e=re("div",{name:"MuiSnackbarContent",slot:"Message",overridesResolver:(e,t)=>t.message})({padding:"8px 0"}),X_e=re("div",{name:"MuiSnackbarContent",slot:"Action",overridesResolver:(e,t)=>t.action})({display:"flex",alignItems:"center",marginLeft:"auto",paddingLeft:16,marginRight:-8}),J_e=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiSnackbarContent"}),{action:o,className:i,message:a,role:s="alert",...l}=r,c=r,u=K_e(c);return R.jsxs(Y_e,{role:s,square:!0,elevation:6,className:de(u.root,i),ownerState:c,ref:n,...l,children:[R.jsx(Q_e,{className:u.message,ownerState:c,children:a}),o?R.jsx(X_e,{className:u.action,ownerState:c,children:o}):null]})});function Z_e(e){return nt("MuiSnackbar",e)}it("MuiSnackbar",["root","anchorOriginTopCenter","anchorOriginBottomCenter","anchorOriginTopRight","anchorOriginBottomRight","anchorOriginTopLeft","anchorOriginBottomLeft"]);const e2e=e=>{const{classes:t,anchorOrigin:n}=e,r={root:["root",`anchorOrigin${Ce(n.vertical)}${Ce(n.horizontal)}`]};return rt(r,Z_e,t)},J6=re("div",{name:"MuiSnackbar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`anchorOrigin${Ce(n.anchorOrigin.vertical)}${Ce(n.anchorOrigin.horizontal)}`]]}})(Je(({theme:e})=>({zIndex:(e.vars||e).zIndex.snackbar,position:"fixed",display:"flex",left:8,right:8,justifyContent:"center",alignItems:"center",variants:[{props:({ownerState:t})=>t.anchorOrigin.vertical==="top",style:{top:8,[e.breakpoints.up("sm")]:{top:24}}},{props:({ownerState:t})=>t.anchorOrigin.vertical!=="top",style:{bottom:8,[e.breakpoints.up("sm")]:{bottom:24}}},{props:({ownerState:t})=>t.anchorOrigin.horizontal==="left",style:{justifyContent:"flex-start",[e.breakpoints.up("sm")]:{left:24,right:"auto"}}},{props:({ownerState:t})=>t.anchorOrigin.horizontal==="right",style:{justifyContent:"flex-end",[e.breakpoints.up("sm")]:{right:24,left:"auto"}}},{props:({ownerState:t})=>t.anchorOrigin.horizontal==="center",style:{[e.breakpoints.up("sm")]:{left:"50%",right:"auto",transform:"translateX(-50%)"}}}]}))),az=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiSnackbar"}),o=no(),i={enter:o.transitions.duration.enteringScreen,exit:o.transitions.duration.leavingScreen},{action:a,anchorOrigin:{vertical:s,horizontal:l}={vertical:"bottom",horizontal:"left"},autoHideDuration:c=null,children:u,className:d,ClickAwayListenerProps:f,ContentProps:p,disableWindowBlurListener:h=!1,message:m,onBlur:y,onClose:w,onFocus:x,onMouseEnter:S,onMouseLeave:E,open:P,resumeHideDuration:T,TransitionComponent:I=cp,transitionDuration:A=i,TransitionProps:{onEnter:k,onExited:O,...$}={},...N}=r,L={...r,anchorOrigin:{vertical:s,horizontal:l},autoHideDuration:c,disableWindowBlurListener:h,TransitionComponent:I,transitionDuration:A},j=e2e(L),{getRootProps:D,onClickAway:_}=G_e({...L}),[z,F]=v.useState(!0),V=mu({elementType:J6,getSlotProps:D,externalForwardedProps:N,ownerState:L,additionalProps:{ref:n},className:[j.root,d]}),U=X=>{F(!0),O&&O(X)},K=(X,ie)=>{F(!1),k&&k(X,ie)};return!P&&z?null:R.jsx(ez,{onClickAway:_,...f,children:R.jsx(J6,{...V,children:R.jsx(I,{appear:!0,in:P,timeout:A,direction:s==="top"?"down":"up",onEnter:K,onExited:U,...$,children:u||R.jsx(J_e,{message:m,action:a,...p})})})})});function t2e(e){return nt("MuiTooltip",e)}const Yr=it("MuiTooltip",["popper","popperInteractive","popperArrow","popperClose","tooltip","tooltipArrow","touch","tooltipPlacementLeft","tooltipPlacementRight","tooltipPlacementTop","tooltipPlacementBottom","arrow"]);function n2e(e){return Math.round(e*1e5)/1e5}const r2e=e=>{const{classes:t,disableInteractive:n,arrow:r,touch:o,placement:i}=e,a={popper:["popper",!n&&"popperInteractive",r&&"popperArrow"],tooltip:["tooltip",r&&"tooltipArrow",o&&"touch",`tooltipPlacement${Ce(i.split("-")[0])}`],arrow:["arrow"]};return rt(a,t2e,t)},o2e=re(Pp,{name:"MuiTooltip",slot:"Popper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.popper,!n.disableInteractive&&t.popperInteractive,n.arrow&&t.popperArrow,!n.open&&t.popperClose]}})(Je(({theme:e})=>({zIndex:(e.vars||e).zIndex.tooltip,pointerEvents:"none",variants:[{props:({ownerState:t})=>!t.disableInteractive,style:{pointerEvents:"auto"}},{props:({open:t})=>!t,style:{pointerEvents:"none"}},{props:({ownerState:t})=>t.arrow,style:{[`&[data-popper-placement*="bottom"] .${Yr.arrow}`]:{top:0,marginTop:"-0.71em","&::before":{transformOrigin:"0 100%"}},[`&[data-popper-placement*="top"] .${Yr.arrow}`]:{bottom:0,marginBottom:"-0.71em","&::before":{transformOrigin:"100% 0"}},[`&[data-popper-placement*="right"] .${Yr.arrow}`]:{height:"1em",width:"0.71em","&::before":{transformOrigin:"100% 100%"}},[`&[data-popper-placement*="left"] .${Yr.arrow}`]:{height:"1em",width:"0.71em","&::before":{transformOrigin:"0 0"}}}},{props:({ownerState:t})=>t.arrow&&!t.isRtl,style:{[`&[data-popper-placement*="right"] .${Yr.arrow}`]:{left:0,marginLeft:"-0.71em"}}},{props:({ownerState:t})=>t.arrow&&!!t.isRtl,style:{[`&[data-popper-placement*="right"] .${Yr.arrow}`]:{right:0,marginRight:"-0.71em"}}},{props:({ownerState:t})=>t.arrow&&!t.isRtl,style:{[`&[data-popper-placement*="left"] .${Yr.arrow}`]:{right:0,marginRight:"-0.71em"}}},{props:({ownerState:t})=>t.arrow&&!!t.isRtl,style:{[`&[data-popper-placement*="left"] .${Yr.arrow}`]:{left:0,marginLeft:"-0.71em"}}}]}))),i2e=re("div",{name:"MuiTooltip",slot:"Tooltip",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.tooltip,n.touch&&t.touch,n.arrow&&t.tooltipArrow,t[`tooltipPlacement${Ce(n.placement.split("-")[0])}`]]}})(Je(({theme:e})=>({backgroundColor:e.vars?e.vars.palette.Tooltip.bg:St(e.palette.grey[700],.92),borderRadius:(e.vars||e).shape.borderRadius,color:(e.vars||e).palette.common.white,fontFamily:e.typography.fontFamily,padding:"4px 8px",fontSize:e.typography.pxToRem(11),maxWidth:300,margin:2,wordWrap:"break-word",fontWeight:e.typography.fontWeightMedium,[`.${Yr.popper}[data-popper-placement*="left"] &`]:{transformOrigin:"right center"},[`.${Yr.popper}[data-popper-placement*="right"] &`]:{transformOrigin:"left center"},[`.${Yr.popper}[data-popper-placement*="top"] &`]:{transformOrigin:"center bottom",marginBottom:"14px"},[`.${Yr.popper}[data-popper-placement*="bottom"] &`]:{transformOrigin:"center top",marginTop:"14px"},variants:[{props:({ownerState:t})=>t.arrow,style:{position:"relative",margin:0}},{props:({ownerState:t})=>t.touch,style:{padding:"8px 16px",fontSize:e.typography.pxToRem(14),lineHeight:`${n2e(16/14)}em`,fontWeight:e.typography.fontWeightRegular}},{props:({ownerState:t})=>!t.isRtl,style:{[`.${Yr.popper}[data-popper-placement*="left"] &`]:{marginRight:"14px"},[`.${Yr.popper}[data-popper-placement*="right"] &`]:{marginLeft:"14px"}}},{props:({ownerState:t})=>!t.isRtl&&t.touch,style:{[`.${Yr.popper}[data-popper-placement*="left"] &`]:{marginRight:"24px"},[`.${Yr.popper}[data-popper-placement*="right"] &`]:{marginLeft:"24px"}}},{props:({ownerState:t})=>!!t.isRtl,style:{[`.${Yr.popper}[data-popper-placement*="left"] &`]:{marginLeft:"14px"},[`.${Yr.popper}[data-popper-placement*="right"] &`]:{marginRight:"14px"}}},{props:({ownerState:t})=>!!t.isRtl&&t.touch,style:{[`.${Yr.popper}[data-popper-placement*="left"] &`]:{marginLeft:"24px"},[`.${Yr.popper}[data-popper-placement*="right"] &`]:{marginRight:"24px"}}},{props:({ownerState:t})=>t.touch,style:{[`.${Yr.popper}[data-popper-placement*="top"] &`]:{marginBottom:"24px"}}},{props:({ownerState:t})=>t.touch,style:{[`.${Yr.popper}[data-popper-placement*="bottom"] &`]:{marginTop:"24px"}}}]}))),a2e=re("span",{name:"MuiTooltip",slot:"Arrow",overridesResolver:(e,t)=>t.arrow})(Je(({theme:e})=>({overflow:"hidden",position:"absolute",width:"1em",height:"0.71em",boxSizing:"border-box",color:e.vars?e.vars.palette.Tooltip.bg:St(e.palette.grey[700],.9),"&::before":{content:'""',margin:"auto",display:"block",width:"100%",height:"100%",backgroundColor:"currentColor",transform:"rotate(45deg)"}})));let tP=!1;const Z6=new FZ;let ow={x:0,y:0};function nP(e,t){return(n,...r)=>{t&&t(n,...r),e(n,...r)}}const Rc=v.forwardRef(function(t,n){var oo,Bi,Ls;const r=at({props:t,name:"MuiTooltip"}),{arrow:o=!1,children:i,classes:a,components:s={},componentsProps:l={},describeChild:c=!1,disableFocusListener:u=!1,disableHoverListener:d=!1,disableInteractive:f=!1,disableTouchListener:p=!1,enterDelay:h=100,enterNextDelay:m=0,enterTouchDelay:y=700,followCursor:w=!1,id:x,leaveDelay:S=0,leaveTouchDelay:E=1500,onClose:P,onOpen:T,open:I,placement:A="bottom",PopperComponent:k,PopperProps:O={},slotProps:$={},slots:N={},title:L,TransitionComponent:j=cp,TransitionProps:D,..._}=r,z=v.isValidElement(i)?i:R.jsx("span",{children:i}),F=no(),V=dr(),[U,K]=v.useState(),[X,ie]=v.useState(null),ee=v.useRef(!1),Q=f||w,te=Mf(),pe=Mf(),ae=Mf(),se=Mf(),[oe,fe]=ad({controlled:I,default:!1,name:"Tooltip",state:"open"});let Z=oe;const ce=ip(x),ge=v.useRef(),we=ei(()=>{ge.current!==void 0&&(document.body.style.WebkitUserSelect=ge.current,ge.current=void 0),se.clear()});v.useEffect(()=>we,[we]);const me=tn=>{Z6.clear(),tP=!0,fe(!0),T&&!Z&&T(tn)},Se=ei(tn=>{Z6.start(800+S,()=>{tP=!1}),fe(!1),P&&Z&&P(tn),te.start(F.transitions.duration.shortest,()=>{ee.current=!1})}),xe=tn=>{ee.current&&tn.type!=="touchstart"||(U&&U.removeAttribute("title"),pe.clear(),ae.clear(),h||tP&&m?pe.start(tP?m:h,()=>{me(tn)}):me(tn))},ke=tn=>{pe.clear(),ae.start(S,()=>{Se(tn)})},[,De]=v.useState(!1),_e=tn=>{MT(tn.target)||(De(!1),ke(tn))},ye=tn=>{U||K(tn.currentTarget),MT(tn.target)&&(De(!0),xe(tn))},Pe=tn=>{ee.current=!0;const li=z.props;li.onTouchStart&&li.onTouchStart(tn)},Ae=tn=>{Pe(tn),ae.clear(),te.clear(),we(),ge.current=document.body.style.WebkitUserSelect,document.body.style.WebkitUserSelect="none",se.start(y,()=>{document.body.style.WebkitUserSelect=ge.current,xe(tn)})},Me=tn=>{z.props.onTouchEnd&&z.props.onTouchEnd(tn),we(),ae.start(E,()=>{Se(tn)})};v.useEffect(()=>{if(!Z)return;function tn(li){li.key==="Escape"&&Se(li)}return document.addEventListener("keydown",tn),()=>{document.removeEventListener("keydown",tn)}},[Se,Z]);const We=Rr(bp(z),K,n);!L&&L!==0&&(Z=!1);const He=v.useRef(),Xe=tn=>{const li=z.props;li.onMouseMove&&li.onMouseMove(tn),ow={x:tn.clientX,y:tn.clientY},He.current&&He.current.update()},gt={},st=typeof L=="string";c?(gt.title=!Z&&st&&!d?L:null,gt["aria-describedby"]=Z?ce:null):(gt["aria-label"]=st?L:null,gt["aria-labelledby"]=Z&&!st?ce:null);const et={...gt,..._,...z.props,className:de(_.className,z.props.className),onTouchStart:Pe,ref:We,...w?{onMouseMove:Xe}:{}},Et={};p||(et.onTouchStart=Ae,et.onTouchEnd=Me),d||(et.onMouseOver=nP(xe,et.onMouseOver),et.onMouseLeave=nP(ke,et.onMouseLeave),Q||(Et.onMouseOver=xe,Et.onMouseLeave=ke)),u||(et.onFocus=nP(ye,et.onFocus),et.onBlur=nP(_e,et.onBlur),Q||(Et.onFocus=ye,Et.onBlur=_e));const An=v.useMemo(()=>{var li;let tn=[{name:"arrow",enabled:!!X,options:{element:X,padding:4}}];return(li=O.popperOptions)!=null&&li.modifiers&&(tn=tn.concat(O.popperOptions.modifiers)),{...O.popperOptions,modifiers:tn}},[X,O]),Ke={...r,isRtl:V,arrow:o,disableInteractive:Q,placement:A,PopperComponentProp:k,touch:ee.current},$e=r2e(Ke),Qe=N.popper??s.Popper??o2e,Tt=N.transition??s.Transition??j??cp,Xt=N.tooltip??s.Tooltip??i2e,$t=N.arrow??s.Arrow??a2e,bn=oy(Qe,{...O,...$.popper??l.popper,className:de($e.popper,O==null?void 0:O.className,(oo=$.popper??l.popper)==null?void 0:oo.className)},Ke),Gn=oy(Tt,{...D,...$.transition??l.transition},Ke),Jn=oy(Xt,{...$.tooltip??l.tooltip,className:de($e.tooltip,(Bi=$.tooltip??l.tooltip)==null?void 0:Bi.className)},Ke),Do=oy($t,{...$.arrow??l.arrow,className:de($e.arrow,(Ls=$.arrow??l.arrow)==null?void 0:Ls.className)},Ke);return R.jsxs(v.Fragment,{children:[v.cloneElement(z,et),R.jsx(Qe,{as:k??Pp,placement:A,anchorEl:w?{getBoundingClientRect:()=>({top:ow.y,left:ow.x,right:ow.x,bottom:ow.y,width:0,height:0})}:U,popperRef:He,open:U?Z:!1,id:ce,transition:!0,...Et,...bn,popperOptions:An,children:({TransitionProps:tn})=>R.jsx(Tt,{timeout:F.transitions.duration.shorter,...tn,...Gn,children:R.jsxs(Xt,{...Jn,children:[L,o?R.jsx($t,{...Do,ref:ie}):null]})})})]})}),Wt=Z1e({createStyledComponent:re("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root}),useThemeProps:e=>at({props:e,name:"MuiStack"})}),WC=v.createContext({}),vk=v.createContext({});function s2e(e){return nt("MuiStep",e)}it("MuiStep",["root","horizontal","vertical","alternativeLabel","completed"]);const l2e=e=>{const{classes:t,orientation:n,alternativeLabel:r,completed:o}=e;return rt({root:["root",n,r&&"alternativeLabel",o&&"completed"]},s2e,t)},c2e=re("div",{name:"MuiStep",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.orientation],n.alternativeLabel&&t.alternativeLabel,n.completed&&t.completed]}})({variants:[{props:{orientation:"horizontal"},style:{paddingLeft:8,paddingRight:8}},{props:{alternativeLabel:!0},style:{flex:1,position:"relative"}}]}),km=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiStep"}),{active:o,children:i,className:a,component:s="div",completed:l,disabled:c,expanded:u=!1,index:d,last:f,...p}=r,{activeStep:h,connector:m,alternativeLabel:y,orientation:w,nonLinear:x}=v.useContext(WC);let[S=!1,E=!1,P=!1]=[o,l,c];h===d?S=o!==void 0?o:!0:!x&&h>d?E=l!==void 0?l:!0:!x&&h({index:d,last:f,expanded:u,icon:d+1,active:S,completed:E,disabled:P}),[d,f,u,S,E,P]),I={...r,active:S,orientation:w,alternativeLabel:y,completed:E,disabled:P,expanded:u,component:s},A=l2e(I),k=R.jsxs(c2e,{as:s,className:de(A.root,a),ref:n,ownerState:I,...p,children:[m&&y&&d!==0?m:null,i]});return R.jsx(vk.Provider,{value:T,children:m&&!y&&d!==0?R.jsxs(v.Fragment,{children:[m,k]}):k})}),u2e=ct(R.jsx("path",{d:"M12 0a12 12 0 1 0 0 24 12 12 0 0 0 0-24zm-2 17l-5-5 1.4-1.4 3.6 3.6 7.6-7.6L19 8l-9 9z"}),"CheckCircle"),d2e=ct(R.jsx("path",{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"}),"Warning");function f2e(e){return nt("MuiStepIcon",e)}const pD=it("MuiStepIcon",["root","active","completed","error","text"]);var eG;const p2e=e=>{const{classes:t,active:n,completed:r,error:o}=e;return rt({root:["root",n&&"active",r&&"completed",o&&"error"],text:["text"]},f2e,t)},hD=re(zx,{name:"MuiStepIcon",slot:"Root",overridesResolver:(e,t)=>t.root})(Je(({theme:e})=>({display:"block",transition:e.transitions.create("color",{duration:e.transitions.duration.shortest}),color:(e.vars||e).palette.text.disabled,[`&.${pD.completed}`]:{color:(e.vars||e).palette.primary.main},[`&.${pD.active}`]:{color:(e.vars||e).palette.primary.main},[`&.${pD.error}`]:{color:(e.vars||e).palette.error.main}}))),h2e=re("text",{name:"MuiStepIcon",slot:"Text",overridesResolver:(e,t)=>t.text})(Je(({theme:e})=>({fill:(e.vars||e).palette.primary.contrastText,fontSize:e.typography.caption.fontSize,fontFamily:e.typography.fontFamily}))),g2e=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiStepIcon"}),{active:o=!1,className:i,completed:a=!1,error:s=!1,icon:l,...c}=r,u={...r,active:o,completed:a,error:s},d=p2e(u);if(typeof l=="number"||typeof l=="string"){const f=de(i,d.root);return s?R.jsx(hD,{as:d2e,className:f,ref:n,ownerState:u,...c}):a?R.jsx(hD,{as:u2e,className:f,ref:n,ownerState:u,...c}):R.jsxs(hD,{className:f,ref:n,ownerState:u,...c,children:[eG||(eG=R.jsx("circle",{cx:"12",cy:"12",r:"12"})),R.jsx(h2e,{className:d.text,x:"12",y:"12",textAnchor:"middle",dominantBaseline:"central",ownerState:u,children:l})]})}return l});function m2e(e){return nt("MuiStepLabel",e)}const Df=it("MuiStepLabel",["root","horizontal","vertical","label","active","completed","error","disabled","iconContainer","alternativeLabel","labelContainer"]),y2e=e=>{const{classes:t,orientation:n,active:r,completed:o,error:i,disabled:a,alternativeLabel:s}=e;return rt({root:["root",n,i&&"error",a&&"disabled",s&&"alternativeLabel"],label:["label",r&&"active",o&&"completed",i&&"error",a&&"disabled",s&&"alternativeLabel"],iconContainer:["iconContainer",r&&"active",o&&"completed",i&&"error",a&&"disabled",s&&"alternativeLabel"],labelContainer:["labelContainer",s&&"alternativeLabel"]},m2e,t)},v2e=re("span",{name:"MuiStepLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.orientation]]}})({display:"flex",alignItems:"center",[`&.${Df.alternativeLabel}`]:{flexDirection:"column"},[`&.${Df.disabled}`]:{cursor:"default"},variants:[{props:{orientation:"vertical"},style:{textAlign:"left",padding:"8px 0"}}]}),b2e=re("span",{name:"MuiStepLabel",slot:"Label",overridesResolver:(e,t)=>t.label})(Je(({theme:e})=>({...e.typography.body2,display:"block",transition:e.transitions.create("color",{duration:e.transitions.duration.shortest}),[`&.${Df.active}`]:{color:(e.vars||e).palette.text.primary,fontWeight:500},[`&.${Df.completed}`]:{color:(e.vars||e).palette.text.primary,fontWeight:500},[`&.${Df.alternativeLabel}`]:{marginTop:16},[`&.${Df.error}`]:{color:(e.vars||e).palette.error.main}}))),w2e=re("span",{name:"MuiStepLabel",slot:"IconContainer",overridesResolver:(e,t)=>t.iconContainer})({flexShrink:0,display:"flex",paddingRight:8,[`&.${Df.alternativeLabel}`]:{paddingRight:0}}),x2e=re("span",{name:"MuiStepLabel",slot:"LabelContainer",overridesResolver:(e,t)=>t.labelContainer})(Je(({theme:e})=>({width:"100%",color:(e.vars||e).palette.text.secondary,[`&.${Df.alternativeLabel}`]:{textAlign:"center"}}))),ff=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiStepLabel"}),{children:o,className:i,componentsProps:a={},error:s=!1,icon:l,optional:c,slots:u={},slotProps:d={},StepIconComponent:f,StepIconProps:p,...h}=r,{alternativeLabel:m,orientation:y}=v.useContext(WC),{active:w,disabled:x,completed:S,icon:E}=v.useContext(vk),P=l||E;let T=f;P&&!T&&(T=g2e);const I={...r,active:w,alternativeLabel:m,completed:S,disabled:x,error:s,orientation:y},A=y2e(I),k={slots:u,slotProps:{stepIcon:p,...a,...d}},[O,$]=Cr("label",{elementType:b2e,externalForwardedProps:k,ownerState:I}),[N,L]=Cr("stepIcon",{elementType:T,externalForwardedProps:k,ownerState:I});return R.jsxs(v2e,{className:de(A.root,i),ref:n,ownerState:I,...h,children:[P||N?R.jsx(w2e,{className:A.iconContainer,ownerState:I,children:R.jsx(N,{completed:S,active:w,error:s,icon:P,...L})}):null,R.jsxs(x2e,{className:A.labelContainer,ownerState:I,children:[o?R.jsx(O,{...$,className:de(A.label,$==null?void 0:$.className),children:o}):null,c]})]})});ff&&(ff.muiName="StepLabel");function S2e(e){return nt("MuiStepConnector",e)}it("MuiStepConnector",["root","horizontal","vertical","alternativeLabel","active","completed","disabled","line","lineHorizontal","lineVertical"]);const C2e=e=>{const{classes:t,orientation:n,alternativeLabel:r,active:o,completed:i,disabled:a}=e,s={root:["root",n,r&&"alternativeLabel",o&&"active",i&&"completed",a&&"disabled"],line:["line",`line${Ce(n)}`]};return rt(s,S2e,t)},E2e=re("div",{name:"MuiStepConnector",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.orientation],n.alternativeLabel&&t.alternativeLabel,n.completed&&t.completed]}})({flex:"1 1 auto",variants:[{props:{orientation:"vertical"},style:{marginLeft:12}},{props:{alternativeLabel:!0},style:{position:"absolute",top:12,left:"calc(-50% + 20px)",right:"calc(50% + 20px)"}}]}),P2e=re("span",{name:"MuiStepConnector",slot:"Line",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.line,t[`line${Ce(n.orientation)}`]]}})(Je(({theme:e})=>{const t=e.palette.mode==="light"?e.palette.grey[400]:e.palette.grey[600];return{display:"block",borderColor:e.vars?e.vars.palette.StepConnector.border:t,variants:[{props:{orientation:"horizontal"},style:{borderTopStyle:"solid",borderTopWidth:1}},{props:{orientation:"vertical"},style:{borderLeftStyle:"solid",borderLeftWidth:1,minHeight:24}}]}})),T2e=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiStepConnector"}),{className:o,...i}=r,{alternativeLabel:a,orientation:s="horizontal"}=v.useContext(WC),{active:l,disabled:c,completed:u}=v.useContext(vk),d={...r,alternativeLabel:a,orientation:s,active:l,completed:u,disabled:c},f=C2e(d);return R.jsx(E2e,{className:de(f.root,o),ref:n,ownerState:d,...i,children:R.jsx(P2e,{className:f.line,ownerState:d})})});function I2e(e){return nt("MuiStepContent",e)}it("MuiStepContent",["root","last","transition"]);const O2e=e=>{const{classes:t,last:n}=e;return rt({root:["root",n&&"last"],transition:["transition"]},I2e,t)},A2e=re("div",{name:"MuiStepContent",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.last&&t.last]}})(Je(({theme:e})=>({marginLeft:12,paddingLeft:20,paddingRight:8,borderLeft:e.vars?`1px solid ${e.vars.palette.StepContent.border}`:`1px solid ${e.palette.mode==="light"?e.palette.grey[400]:e.palette.grey[600]}`,variants:[{props:{last:!0},style:{borderLeft:"none"}}]}))),k2e=re(xl,{name:"MuiStepContent",slot:"Transition",overridesResolver:(e,t)=>t.transition})({}),Mm=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiStepContent"}),{children:o,className:i,TransitionComponent:a=xl,transitionDuration:s="auto",TransitionProps:l,...c}=r;v.useContext(WC);const{active:u,last:d,expanded:f}=v.useContext(vk),p={...r,last:d},h=O2e(p);let m=s;return s==="auto"&&!a.muiSupportAuto&&(m=void 0),R.jsx(A2e,{className:de(h.root,i),ref:n,ownerState:p,...c,children:R.jsx(k2e,{as:a,in:u||f,className:h.transition,ownerState:p,timeout:m,unmountOnExit:!0,...l,children:o})})});function M2e(e){return nt("MuiStepper",e)}it("MuiStepper",["root","horizontal","vertical","nonLinear","alternativeLabel"]);const R2e=e=>{const{orientation:t,nonLinear:n,alternativeLabel:r,classes:o}=e;return rt({root:["root",t,n&&"nonLinear",r&&"alternativeLabel"]},M2e,o)},$2e=re("div",{name:"MuiStepper",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.orientation],n.alternativeLabel&&t.alternativeLabel,n.nonLinear&&t.nonLinear]}})({display:"flex",variants:[{props:{orientation:"horizontal"},style:{flexDirection:"row",alignItems:"center"}},{props:{orientation:"vertical"},style:{flexDirection:"column"}},{props:{alternativeLabel:!0},style:{alignItems:"flex-start"}}]}),D2e=R.jsx(T2e,{}),_2e=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiStepper"}),{activeStep:o=0,alternativeLabel:i=!1,children:a,className:s,component:l="div",connector:c=D2e,nonLinear:u=!1,orientation:d="horizontal",...f}=r,p={...r,nonLinear:u,alternativeLabel:i,orientation:d,component:l},h=R2e(p),m=v.Children.toArray(a).filter(Boolean),y=m.map((x,S)=>v.cloneElement(x,{index:S,last:S+1===m.length,...x.props})),w=v.useMemo(()=>({activeStep:o,alternativeLabel:i,connector:c,nonLinear:u,orientation:d}),[o,i,c,u,d]);return R.jsx(WC.Provider,{value:w,children:R.jsx($2e,{as:l,ownerState:p,className:de(h.root,s),ref:n,...f,children:y})})});function N2e(e){return nt("MuiSwitch",e)}const Ki=it("MuiSwitch",["root","edgeStart","edgeEnd","switchBase","colorPrimary","colorSecondary","sizeSmall","sizeMedium","checked","disabled","input","thumb","track"]),L2e=e=>{const{classes:t,edge:n,size:r,color:o,checked:i,disabled:a}=e,s={root:["root",n&&`edge${Ce(n)}`,`size${Ce(r)}`],switchBase:["switchBase",`color${Ce(o)}`,i&&"checked",a&&"disabled"],thumb:["thumb"],track:["track"],input:["input"]},l=rt(s,N2e,t);return{...t,...l}},F2e=re("span",{name:"MuiSwitch",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.edge&&t[`edge${Ce(n.edge)}`],t[`size${Ce(n.size)}`]]}})({display:"inline-flex",width:34+12*2,height:14+12*2,overflow:"hidden",padding:12,boxSizing:"border-box",position:"relative",flexShrink:0,zIndex:0,verticalAlign:"middle","@media print":{colorAdjust:"exact"},variants:[{props:{edge:"start"},style:{marginLeft:-8}},{props:{edge:"end"},style:{marginRight:-8}},{props:{size:"small"},style:{width:40,height:24,padding:7,[`& .${Ki.thumb}`]:{width:16,height:16},[`& .${Ki.switchBase}`]:{padding:4,[`&.${Ki.checked}`]:{transform:"translateX(16px)"}}}}]}),j2e=re(Fne,{name:"MuiSwitch",slot:"SwitchBase",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.switchBase,{[`& .${Ki.input}`]:t.input},n.color!=="default"&&t[`color${Ce(n.color)}`]]}})(Je(({theme:e})=>({position:"absolute",top:0,left:0,zIndex:1,color:e.vars?e.vars.palette.Switch.defaultColor:`${e.palette.mode==="light"?e.palette.common.white:e.palette.grey[300]}`,transition:e.transitions.create(["left","transform"],{duration:e.transitions.duration.shortest}),[`&.${Ki.checked}`]:{transform:"translateX(20px)"},[`&.${Ki.disabled}`]:{color:e.vars?e.vars.palette.Switch.defaultDisabledColor:`${e.palette.mode==="light"?e.palette.grey[100]:e.palette.grey[600]}`},[`&.${Ki.checked} + .${Ki.track}`]:{opacity:.5},[`&.${Ki.disabled} + .${Ki.track}`]:{opacity:e.vars?e.vars.opacity.switchTrackDisabled:`${e.palette.mode==="light"?.12:.2}`},[`& .${Ki.input}`]:{left:"-100%",width:"300%"}})),Je(({theme:e})=>({"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:St(e.palette.action.active,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},variants:[...Object.entries(e.palette).filter(Kn(["light"])).map(([t])=>({props:{color:t},style:{[`&.${Ki.checked}`]:{color:(e.vars||e).palette[t].main,"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:St(e.palette[t].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Ki.disabled}`]:{color:e.vars?e.vars.palette.Switch[`${t}DisabledColor`]:`${e.palette.mode==="light"?xd(e.palette[t].main,.62):wd(e.palette[t].main,.55)}`}},[`&.${Ki.checked} + .${Ki.track}`]:{backgroundColor:(e.vars||e).palette[t].main}}}))]}))),B2e=re("span",{name:"MuiSwitch",slot:"Track",overridesResolver:(e,t)=>t.track})(Je(({theme:e})=>({height:"100%",width:"100%",borderRadius:14/2,zIndex:-1,transition:e.transitions.create(["opacity","background-color"],{duration:e.transitions.duration.shortest}),backgroundColor:e.vars?e.vars.palette.common.onBackground:`${e.palette.mode==="light"?e.palette.common.black:e.palette.common.white}`,opacity:e.vars?e.vars.opacity.switchTrack:`${e.palette.mode==="light"?.38:.3}`}))),z2e=re("span",{name:"MuiSwitch",slot:"Thumb",overridesResolver:(e,t)=>t.thumb})(Je(({theme:e})=>({boxShadow:(e.vars||e).shadows[1],backgroundColor:"currentColor",width:20,height:20,borderRadius:"50%"}))),La=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiSwitch"}),{className:o,color:i="primary",edge:a=!1,size:s="medium",sx:l,...c}=r,u={...r,color:i,edge:a,size:s},d=L2e(u),f=R.jsx(z2e,{className:d.thumb,ownerState:u});return R.jsxs(F2e,{className:de(d.root,o),sx:l,ownerState:u,children:[R.jsx(j2e,{type:"checkbox",icon:f,checkedIcon:f,ref:n,ownerState:u,...c,classes:{...d,root:d.switchBase}}),R.jsx(B2e,{className:d.track,ownerState:u})]})});function V2e(e){return nt("MuiTab",e)}const qs=it("MuiTab",["root","labelIcon","textColorInherit","textColorPrimary","textColorSecondary","selected","disabled","fullWidth","wrapped","iconWrapper","icon"]),H2e=e=>{const{classes:t,textColor:n,fullWidth:r,wrapped:o,icon:i,label:a,selected:s,disabled:l}=e,c={root:["root",i&&a&&"labelIcon",`textColor${Ce(n)}`,r&&"fullWidth",o&&"wrapped",s&&"selected",l&&"disabled"],icon:["iconWrapper","icon"]};return rt(c,V2e,t)},U2e=re(ca,{name:"MuiTab",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.label&&n.icon&&t.labelIcon,t[`textColor${Ce(n.textColor)}`],n.fullWidth&&t.fullWidth,n.wrapped&&t.wrapped,{[`& .${qs.iconWrapper}`]:t.iconWrapper},{[`& .${qs.icon}`]:t.icon}]}})(Je(({theme:e})=>({...e.typography.button,maxWidth:360,minWidth:90,position:"relative",minHeight:48,flexShrink:0,padding:"12px 16px",overflow:"hidden",whiteSpace:"normal",textAlign:"center",lineHeight:1.25,variants:[{props:({ownerState:t})=>t.label&&(t.iconPosition==="top"||t.iconPosition==="bottom"),style:{flexDirection:"column"}},{props:({ownerState:t})=>t.label&&t.iconPosition!=="top"&&t.iconPosition!=="bottom",style:{flexDirection:"row"}},{props:({ownerState:t})=>t.icon&&t.label,style:{minHeight:72,paddingTop:9,paddingBottom:9}},{props:({ownerState:t,iconPosition:n})=>t.icon&&t.label&&n==="top",style:{[`& > .${qs.icon}`]:{marginBottom:6}}},{props:({ownerState:t,iconPosition:n})=>t.icon&&t.label&&n==="bottom",style:{[`& > .${qs.icon}`]:{marginTop:6}}},{props:({ownerState:t,iconPosition:n})=>t.icon&&t.label&&n==="start",style:{[`& > .${qs.icon}`]:{marginRight:e.spacing(1)}}},{props:({ownerState:t,iconPosition:n})=>t.icon&&t.label&&n==="end",style:{[`& > .${qs.icon}`]:{marginLeft:e.spacing(1)}}},{props:{textColor:"inherit"},style:{color:"inherit",opacity:.6,[`&.${qs.selected}`]:{opacity:1},[`&.${qs.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity}}},{props:{textColor:"primary"},style:{color:(e.vars||e).palette.text.secondary,[`&.${qs.selected}`]:{color:(e.vars||e).palette.primary.main},[`&.${qs.disabled}`]:{color:(e.vars||e).palette.text.disabled}}},{props:{textColor:"secondary"},style:{color:(e.vars||e).palette.text.secondary,[`&.${qs.selected}`]:{color:(e.vars||e).palette.secondary.main},[`&.${qs.disabled}`]:{color:(e.vars||e).palette.text.disabled}}},{props:({ownerState:t})=>t.fullWidth,style:{flexShrink:1,flexGrow:1,flexBasis:0,maxWidth:"none"}},{props:({ownerState:t})=>t.wrapped,style:{fontSize:e.typography.pxToRem(12)}}]}))),tG=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiTab"}),{className:o,disabled:i=!1,disableFocusRipple:a=!1,fullWidth:s,icon:l,iconPosition:c="top",indicator:u,label:d,onChange:f,onClick:p,onFocus:h,selected:m,selectionFollowsFocus:y,textColor:w="inherit",value:x,wrapped:S=!1,...E}=r,P={...r,disabled:i,disableFocusRipple:a,selected:m,icon:!!l,iconPosition:c,label:!!d,fullWidth:s,textColor:w,wrapped:S},T=H2e(P),I=l&&d&&v.isValidElement(l)?v.cloneElement(l,{className:de(T.icon,l.props.className)}):l,A=O=>{!m&&f&&f(O,x),p&&p(O)},k=O=>{y&&!m&&f&&f(O,x),h&&h(O)};return R.jsxs(U2e,{focusRipple:!a,className:de(T.root,o),ref:n,role:"tab","aria-selected":m,disabled:i,onClick:A,onFocus:k,ownerState:P,tabIndex:m?0:-1,...E,children:[c==="top"||c==="start"?R.jsxs(v.Fragment,{children:[I,d]}):R.jsxs(v.Fragment,{children:[d,I]}),u]})}),tre=v.createContext();function W2e(e){return nt("MuiTable",e)}it("MuiTable",["root","stickyHeader"]);const G2e=e=>{const{classes:t,stickyHeader:n}=e;return rt({root:["root",n&&"stickyHeader"]},W2e,t)},q2e=re("table",{name:"MuiTable",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.stickyHeader&&t.stickyHeader]}})(Je(({theme:e})=>({display:"table",width:"100%",borderCollapse:"collapse",borderSpacing:0,"& caption":{...e.typography.body2,padding:e.spacing(2),color:(e.vars||e).palette.text.secondary,textAlign:"left",captionSide:"bottom"},variants:[{props:({ownerState:t})=>t.stickyHeader,style:{borderCollapse:"separate"}}]}))),nG="table",$l=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiTable"}),{className:o,component:i=nG,padding:a="normal",size:s="medium",stickyHeader:l=!1,...c}=r,u={...r,component:i,padding:a,size:s,stickyHeader:l},d=G2e(u),f=v.useMemo(()=>({padding:a,size:s,stickyHeader:l}),[a,s,l]);return R.jsx(tre.Provider,{value:f,children:R.jsx(q2e,{as:i,role:i===nG?null:"table",ref:n,className:de(d.root,o),ownerState:u,...c})})}),bk=v.createContext();function K2e(e){return nt("MuiTableBody",e)}it("MuiTableBody",["root"]);const Y2e=e=>{const{classes:t}=e;return rt({root:["root"]},K2e,t)},Q2e=re("tbody",{name:"MuiTableBody",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"table-row-group"}),X2e={variant:"body"},rG="tbody",Dl=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiTableBody"}),{className:o,component:i=rG,...a}=r,s={...r,component:i},l=Y2e(s);return R.jsx(bk.Provider,{value:X2e,children:R.jsx(Q2e,{className:de(l.root,o),as:i,ref:n,role:i===rG?null:"rowgroup",ownerState:s,...a})})});function J2e(e){return nt("MuiTableCell",e)}const Z2e=it("MuiTableCell",["root","head","body","footer","sizeSmall","sizeMedium","paddingCheckbox","paddingNone","alignLeft","alignCenter","alignRight","alignJustify","stickyHeader"]),eNe=e=>{const{classes:t,variant:n,align:r,padding:o,size:i,stickyHeader:a}=e,s={root:["root",n,a&&"stickyHeader",r!=="inherit"&&`align${Ce(r)}`,o!=="normal"&&`padding${Ce(o)}`,`size${Ce(i)}`]};return rt(s,J2e,t)},tNe=re("td",{name:"MuiTableCell",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`size${Ce(n.size)}`],n.padding!=="normal"&&t[`padding${Ce(n.padding)}`],n.align!=="inherit"&&t[`align${Ce(n.align)}`],n.stickyHeader&&t.stickyHeader]}})(Je(({theme:e})=>({...e.typography.body2,display:"table-cell",verticalAlign:"inherit",borderBottom:e.vars?`1px solid ${e.vars.palette.TableCell.border}`:`1px solid + ${e.palette.mode==="light"?xd(St(e.palette.divider,1),.88):wd(St(e.palette.divider,1),.68)}`,textAlign:"left",padding:16,variants:[{props:{variant:"head"},style:{color:(e.vars||e).palette.text.primary,lineHeight:e.typography.pxToRem(24),fontWeight:e.typography.fontWeightMedium}},{props:{variant:"body"},style:{color:(e.vars||e).palette.text.primary}},{props:{variant:"footer"},style:{color:(e.vars||e).palette.text.secondary,lineHeight:e.typography.pxToRem(21),fontSize:e.typography.pxToRem(12)}},{props:{size:"small"},style:{padding:"6px 16px",[`&.${Z2e.paddingCheckbox}`]:{width:24,padding:"0 12px 0 16px","& > *":{padding:0}}}},{props:{padding:"checkbox"},style:{width:48,padding:"0 0 0 4px"}},{props:{padding:"none"},style:{padding:0}},{props:{align:"left"},style:{textAlign:"left"}},{props:{align:"center"},style:{textAlign:"center"}},{props:{align:"right"},style:{textAlign:"right",flexDirection:"row-reverse"}},{props:{align:"justify"},style:{textAlign:"justify"}},{props:({ownerState:t})=>t.stickyHeader,style:{position:"sticky",top:0,zIndex:2,backgroundColor:(e.vars||e).palette.background.default}}]}))),Ie=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiTableCell"}),{align:o="inherit",className:i,component:a,padding:s,scope:l,size:c,sortDirection:u,variant:d,...f}=r,p=v.useContext(tre),h=v.useContext(bk),m=h&&h.variant==="head";let y;a?y=a:y=m?"th":"td";let w=l;y==="td"?w=void 0:!w&&m&&(w="col");const x=d||h&&h.variant,S={...r,align:o,component:y,padding:s||(p&&p.padding?p.padding:"normal"),size:c||(p&&p.size?p.size:"medium"),sortDirection:u,stickyHeader:x==="head"&&p&&p.stickyHeader,variant:x},E=eNe(S);let P=null;return u&&(P=u==="asc"?"ascending":"descending"),R.jsx(tNe,{as:y,ref:n,className:de(E.root,i),"aria-sort":P,scope:w,ownerState:S,...f})});function nNe(e){return nt("MuiTableContainer",e)}it("MuiTableContainer",["root"]);const rNe=e=>{const{classes:t}=e;return rt({root:["root"]},nNe,t)},oNe=re("div",{name:"MuiTableContainer",slot:"Root",overridesResolver:(e,t)=>t.root})({width:"100%",overflowX:"auto"}),$c=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiTableContainer"}),{className:o,component:i="div",...a}=r,s={...r,component:i},l=rNe(s);return R.jsx(oNe,{ref:n,as:i,className:de(l.root,o),ownerState:s,...a})});function iNe(e){return nt("MuiTableHead",e)}it("MuiTableHead",["root"]);const aNe=e=>{const{classes:t}=e;return rt({root:["root"]},iNe,t)},sNe=re("thead",{name:"MuiTableHead",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"table-header-group"}),lNe={variant:"head"},oG="thead",Eu=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiTableHead"}),{className:o,component:i=oG,...a}=r,s={...r,component:i},l=aNe(s);return R.jsx(bk.Provider,{value:lNe,children:R.jsx(sNe,{as:i,className:de(l.root,o),ref:n,role:i===oG?null:"rowgroup",ownerState:s,...a})})});function cNe(e){return nt("MuiToolbar",e)}it("MuiToolbar",["root","gutters","regular","dense"]);const uNe=e=>{const{classes:t,disableGutters:n,variant:r}=e;return rt({root:["root",!n&&"gutters",r]},cNe,t)},dNe=re("div",{name:"MuiToolbar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableGutters&&t.gutters,t[n.variant]]}})(Je(({theme:e})=>({position:"relative",display:"flex",alignItems:"center",variants:[{props:({ownerState:t})=>!t.disableGutters,style:{paddingLeft:e.spacing(2),paddingRight:e.spacing(2),[e.breakpoints.up("sm")]:{paddingLeft:e.spacing(3),paddingRight:e.spacing(3)}}},{props:{variant:"dense"},style:{minHeight:48}},{props:{variant:"regular"},style:e.mixins.toolbar}]}))),nre=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiToolbar"}),{className:o,component:i="div",disableGutters:a=!1,variant:s="regular",...l}=r,c={...r,component:i,disableGutters:a,variant:s},u=uNe(c);return R.jsx(dNe,{as:i,className:de(u.root,o),ref:n,ownerState:c,...l})}),rre=ct(R.jsx("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"}),"KeyboardArrowLeft"),ore=ct(R.jsx("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"}),"KeyboardArrowRight"),fNe=v.forwardRef(function(t,n){const{backIconButtonProps:r,count:o,disabled:i=!1,getItemAriaLabel:a,nextIconButtonProps:s,onPageChange:l,page:c,rowsPerPage:u,showFirstButton:d,showLastButton:f,slots:p={},slotProps:h={},...m}=t,y=dr(),w=K=>{l(K,0)},x=K=>{l(K,c-1)},S=K=>{l(K,c+1)},E=K=>{l(K,Math.max(0,Math.ceil(o/u)-1))},P=p.firstButton??vn,T=p.lastButton??vn,I=p.nextButton??vn,A=p.previousButton??vn,k=p.firstButtonIcon??Jne,O=p.lastButtonIcon??Zne,$=p.nextButtonIcon??ore,N=p.previousButtonIcon??rre,L=y?T:P,j=y?I:A,D=y?A:I,_=y?P:T,z=y?h.lastButton:h.firstButton,F=y?h.nextButton:h.previousButton,V=y?h.previousButton:h.nextButton,U=y?h.firstButton:h.lastButton;return R.jsxs("div",{ref:n,...m,children:[d&&R.jsx(L,{onClick:w,disabled:i||c===0,"aria-label":a("first",c),title:a("first",c),...z,children:y?R.jsx(O,{...h.lastButtonIcon}):R.jsx(k,{...h.firstButtonIcon})}),R.jsx(j,{onClick:x,disabled:i||c===0,color:"inherit","aria-label":a("previous",c),title:a("previous",c),...F??r,children:y?R.jsx($,{...h.nextButtonIcon}):R.jsx(N,{...h.previousButtonIcon})}),R.jsx(D,{onClick:S,disabled:i||(o!==-1?c>=Math.ceil(o/u)-1:!1),color:"inherit","aria-label":a("next",c),title:a("next",c),...V??s,children:y?R.jsx(N,{...h.previousButtonIcon}):R.jsx($,{...h.nextButtonIcon})}),f&&R.jsx(_,{onClick:E,disabled:i||c>=Math.ceil(o/u)-1,"aria-label":a("last",c),title:a("last",c),...U,children:y?R.jsx(k,{...h.firstButtonIcon}):R.jsx(O,{...h.lastButtonIcon})})]})});function pNe(e){return nt("MuiTablePagination",e)}const Zh=it("MuiTablePagination",["root","toolbar","spacer","selectLabel","selectRoot","select","selectIcon","input","menuItem","displayedRows","actions"]);var iG;const hNe=re(Ie,{name:"MuiTablePagination",slot:"Root",overridesResolver:(e,t)=>t.root})(Je(({theme:e})=>({overflow:"auto",color:(e.vars||e).palette.text.primary,fontSize:e.typography.pxToRem(14),"&:last-child":{padding:0}}))),gNe=re(nre,{name:"MuiTablePagination",slot:"Toolbar",overridesResolver:(e,t)=>({[`& .${Zh.actions}`]:t.actions,...t.toolbar})})(Je(({theme:e})=>({minHeight:52,paddingRight:2,[`${e.breakpoints.up("xs")} and (orientation: landscape)`]:{minHeight:52},[e.breakpoints.up("sm")]:{minHeight:52,paddingRight:2},[`& .${Zh.actions}`]:{flexShrink:0,marginLeft:20}}))),mNe=re("div",{name:"MuiTablePagination",slot:"Spacer",overridesResolver:(e,t)=>t.spacer})({flex:"1 1 100%"}),yNe=re("p",{name:"MuiTablePagination",slot:"SelectLabel",overridesResolver:(e,t)=>t.selectLabel})(Je(({theme:e})=>({...e.typography.body2,flexShrink:0}))),vNe=re(Lg,{name:"MuiTablePagination",slot:"Select",overridesResolver:(e,t)=>({[`& .${Zh.selectIcon}`]:t.selectIcon,[`& .${Zh.select}`]:t.select,...t.input,...t.selectRoot})})({color:"inherit",fontSize:"inherit",flexShrink:0,marginRight:32,marginLeft:8,[`& .${Zh.select}`]:{paddingLeft:8,paddingRight:24,textAlign:"right",textAlignLast:"right"}}),bNe=re(rn,{name:"MuiTablePagination",slot:"MenuItem",overridesResolver:(e,t)=>t.menuItem})({}),wNe=re("p",{name:"MuiTablePagination",slot:"DisplayedRows",overridesResolver:(e,t)=>t.displayedRows})(Je(({theme:e})=>({...e.typography.body2,flexShrink:0})));function xNe({from:e,to:t,count:n}){return`${e}–${t} of ${n!==-1?n:`more than ${t}`}`}function SNe(e){return`Go to ${e} page`}const CNe=e=>{const{classes:t}=e;return rt({root:["root"],toolbar:["toolbar"],spacer:["spacer"],selectLabel:["selectLabel"],select:["select"],input:["input"],selectIcon:["selectIcon"],menuItem:["menuItem"],displayedRows:["displayedRows"],actions:["actions"]},pNe,t)},sz=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiTablePagination"}),{ActionsComponent:o=fNe,backIconButtonProps:i,className:a,colSpan:s,component:l=Ie,count:c,disabled:u=!1,getItemAriaLabel:d=SNe,labelDisplayedRows:f=xNe,labelRowsPerPage:p="Rows per page:",nextIconButtonProps:h,onPageChange:m,onRowsPerPageChange:y,page:w,rowsPerPage:x,rowsPerPageOptions:S=[10,25,50,100],SelectProps:E={},showFirstButton:P=!1,showLastButton:T=!1,slotProps:I={},slots:A={},...k}=r,O=r,$=CNe(O),N=(I==null?void 0:I.select)??E,L=N.native?"option":bNe;let j;(l===Ie||l==="td")&&(j=s||1e3);const D=ip(N.id),_=ip(N.labelId),z=()=>c===-1?(w+1)*x:x===-1?c:Math.min(c,(w+1)*x);return R.jsx(hNe,{colSpan:j,ref:n,as:l,ownerState:O,className:de($.root,a),...k,children:R.jsxs(gNe,{className:$.toolbar,children:[R.jsx(mNe,{className:$.spacer}),S.length>1&&R.jsx(yNe,{className:$.selectLabel,id:_,children:p}),S.length>1&&R.jsx(vNe,{variant:"standard",...!N.variant&&{input:iG||(iG=R.jsx(Ib,{}))},value:x,onChange:y,id:D,labelId:_,...N,classes:{...N.classes,root:de($.input,$.selectRoot,(N.classes||{}).root),select:de($.select,(N.classes||{}).select),icon:de($.selectIcon,(N.classes||{}).icon)},disabled:u,children:S.map(F=>v.createElement(L,{...!Iv(L)&&{ownerState:O},className:$.menuItem,key:F.label?F.label:F,value:F.value?F.value:F},F.label?F.label:F))}),R.jsx(wNe,{className:$.displayedRows,children:f({from:c===0?0:w*x+1,to:z(),count:c===-1?-1:c,page:w})}),R.jsx(o,{className:$.actions,backIconButtonProps:i,count:c,nextIconButtonProps:h,onPageChange:m,page:w,rowsPerPage:x,showFirstButton:P,showLastButton:T,slotProps:I.actions,slots:A.actions,getItemAriaLabel:d,disabled:u})]})})});function ENe(e){return nt("MuiTableRow",e)}const aG=it("MuiTableRow",["root","selected","hover","head","footer"]),PNe=e=>{const{classes:t,selected:n,hover:r,head:o,footer:i}=e;return rt({root:["root",n&&"selected",r&&"hover",o&&"head",i&&"footer"]},ENe,t)},TNe=re("tr",{name:"MuiTableRow",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.head&&t.head,n.footer&&t.footer]}})(Je(({theme:e})=>({color:"inherit",display:"table-row",verticalAlign:"middle",outline:0,[`&.${aG.hover}:hover`]:{backgroundColor:(e.vars||e).palette.action.hover},[`&.${aG.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:St(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}))`:St(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity)}}}))),sG="tr",Ht=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiTableRow"}),{className:o,component:i=sG,hover:a=!1,selected:s=!1,...l}=r,c=v.useContext(bk),u={...r,component:i,hover:a,selected:s,head:c&&c.variant==="head",footer:c&&c.variant==="footer"},d=PNe(u);return R.jsx(TNe,{as:i,ref:n,className:de(d.root,o),role:i===sG?null:"row",ownerState:u,...l})});function INe(e){return(1+Math.sin(Math.PI*e-Math.PI/2))/2}function ONe(e,t,n,r={},o=()=>{}){const{ease:i=INe,duration:a=300}=r;let s=null;const l=t[e];let c=!1;const u=()=>{c=!0},d=f=>{if(c){o(new Error("Animation cancelled"));return}s===null&&(s=f);const p=Math.min(1,(f-s)/a);if(t[e]=i(p)*(n-l)+l,p>=1){requestAnimationFrame(()=>{o(null)});return}requestAnimationFrame(d)};return l===n?(o(new Error("Element already at target position")),u):(requestAnimationFrame(d),u)}const ANe={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll"};function kNe(e){const{onChange:t,...n}=e,r=v.useRef(),o=v.useRef(null),i=()=>{r.current=o.current.offsetHeight-o.current.clientHeight};return Cs(()=>{const a=MC(()=>{const l=r.current;i(),l!==r.current&&t(r.current)}),s=Es(o.current);return s.addEventListener("resize",a),()=>{a.clear(),s.removeEventListener("resize",a)}},[t]),v.useEffect(()=>{i(),t(r.current)},[t]),R.jsx("div",{style:ANe,ref:o,...n})}function MNe(e){return nt("MuiTabScrollButton",e)}const RNe=it("MuiTabScrollButton",["root","vertical","horizontal","disabled"]),$Ne=e=>{const{classes:t,orientation:n,disabled:r}=e;return rt({root:["root",n,r&&"disabled"]},MNe,t)},DNe=re(ca,{name:"MuiTabScrollButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.orientation&&t[n.orientation]]}})({width:40,flexShrink:0,opacity:.8,[`&.${RNe.disabled}`]:{opacity:0},variants:[{props:{orientation:"vertical"},style:{width:"100%",height:40,"& svg":{transform:"var(--TabScrollButton-svgRotate)"}}}]}),_Ne=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiTabScrollButton"}),{className:o,slots:i={},slotProps:a={},direction:s,orientation:l,disabled:c,...u}=r,d=dr(),f={isRtl:d,...r},p=$Ne(f),h=i.StartScrollButtonIcon??rre,m=i.EndScrollButtonIcon??ore,y=mu({elementType:h,externalSlotProps:a.startScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:f}),w=mu({elementType:m,externalSlotProps:a.endScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:f});return R.jsx(DNe,{component:"div",className:de(p.root,o),ref:n,role:null,ownerState:f,tabIndex:null,...u,style:{...u.style,...l==="vertical"&&{"--TabScrollButton-svgRotate":`rotate(${d?-90:90}deg)`}},children:s==="left"?R.jsx(h,{...y}):R.jsx(m,{...w})})});function NNe(e){return nt("MuiTabs",e)}const lT=it("MuiTabs",["root","vertical","flexContainer","flexContainerVertical","centered","scroller","fixed","scrollableX","scrollableY","hideScrollbar","scrollButtons","scrollButtonsHideMobile","indicator"]),lG=(e,t)=>e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:e.firstChild,cG=(e,t)=>e===t?e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:e.lastChild,rP=(e,t,n)=>{let r=!1,o=n(e,t);for(;o;){if(o===e.firstChild){if(r)return;r=!0}const i=o.disabled||o.getAttribute("aria-disabled")==="true";if(!o.hasAttribute("tabindex")||i)o=n(e,o);else{o.focus();return}}},LNe=e=>{const{vertical:t,fixed:n,hideScrollbar:r,scrollableX:o,scrollableY:i,centered:a,scrollButtonsHideMobile:s,classes:l}=e;return rt({root:["root",t&&"vertical"],scroller:["scroller",n&&"fixed",r&&"hideScrollbar",o&&"scrollableX",i&&"scrollableY"],flexContainer:["flexContainer",t&&"flexContainerVertical",a&&"centered"],indicator:["indicator"],scrollButtons:["scrollButtons",s&&"scrollButtonsHideMobile"],scrollableX:[o&&"scrollableX"],hideScrollbar:[r&&"hideScrollbar"]},NNe,l)},FNe=re("div",{name:"MuiTabs",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${lT.scrollButtons}`]:t.scrollButtons},{[`& .${lT.scrollButtons}`]:n.scrollButtonsHideMobile&&t.scrollButtonsHideMobile},t.root,n.vertical&&t.vertical]}})(Je(({theme:e})=>({overflow:"hidden",minHeight:48,WebkitOverflowScrolling:"touch",display:"flex",variants:[{props:({ownerState:t})=>t.vertical,style:{flexDirection:"column"}},{props:({ownerState:t})=>t.scrollButtonsHideMobile,style:{[`& .${lT.scrollButtons}`]:{[e.breakpoints.down("sm")]:{display:"none"}}}}]}))),jNe=re("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]}})({position:"relative",display:"inline-block",flex:"1 1 auto",whiteSpace:"nowrap",variants:[{props:({ownerState:e})=>e.fixed,style:{overflowX:"hidden",width:"100%"}},{props:({ownerState:e})=>e.hideScrollbar,style:{scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}},{props:({ownerState:e})=>e.scrollableX,style:{overflowX:"auto",overflowY:"hidden"}},{props:({ownerState:e})=>e.scrollableY,style:{overflowY:"auto",overflowX:"hidden"}}]}),BNe=re("div",{name:"MuiTabs",slot:"FlexContainer",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.flexContainer,n.vertical&&t.flexContainerVertical,n.centered&&t.centered]}})({display:"flex",variants:[{props:({ownerState:e})=>e.vertical,style:{flexDirection:"column"}},{props:({ownerState:e})=>e.centered,style:{justifyContent:"center"}}]}),zNe=re("span",{name:"MuiTabs",slot:"Indicator",overridesResolver:(e,t)=>t.indicator})(Je(({theme:e})=>({position:"absolute",height:2,bottom:0,width:"100%",transition:e.transitions.create(),variants:[{props:{indicatorColor:"primary"},style:{backgroundColor:(e.vars||e).palette.primary.main}},{props:{indicatorColor:"secondary"},style:{backgroundColor:(e.vars||e).palette.secondary.main}},{props:({ownerState:t})=>t.vertical,style:{height:"100%",width:2,right:0}}]}))),VNe=re(kNe)({overflowX:"auto",overflowY:"hidden",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}),uG={},HNe=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiTabs"}),o=no(),i=dr(),{"aria-label":a,"aria-labelledby":s,action:l,centered:c=!1,children:u,className:d,component:f="div",allowScrollButtonsMobile:p=!1,indicatorColor:h="primary",onChange:m,orientation:y="horizontal",ScrollButtonComponent:w=_Ne,scrollButtons:x="auto",selectionFollowsFocus:S,slots:E={},slotProps:P={},TabIndicatorProps:T={},TabScrollButtonProps:I={},textColor:A="primary",value:k,variant:O="standard",visibleScrollbar:$=!1,...N}=r,L=O==="scrollable",j=y==="vertical",D=j?"scrollTop":"scrollLeft",_=j?"top":"left",z=j?"bottom":"right",F=j?"clientHeight":"clientWidth",V=j?"height":"width",U={...r,component:f,allowScrollButtonsMobile:p,indicatorColor:h,orientation:y,vertical:j,scrollButtons:x,textColor:A,variant:O,visibleScrollbar:$,fixed:!L,hideScrollbar:L&&!$,scrollableX:L&&!j,scrollableY:L&&j,centered:c&&!L,scrollButtonsHideMobile:!p},K=LNe(U),X=mu({elementType:E.StartScrollButtonIcon,externalSlotProps:P.startScrollButtonIcon,ownerState:U}),ie=mu({elementType:E.EndScrollButtonIcon,externalSlotProps:P.endScrollButtonIcon,ownerState:U}),[ee,Q]=v.useState(!1),[te,pe]=v.useState(uG),[ae,se]=v.useState(!1),[oe,fe]=v.useState(!1),[Z,ce]=v.useState(!1),[ge,we]=v.useState({overflow:"hidden",scrollbarWidth:0}),me=new Map,Se=v.useRef(null),xe=v.useRef(null),ke=()=>{const $e=Se.current;let Qe;if($e){const Xt=$e.getBoundingClientRect();Qe={clientWidth:$e.clientWidth,scrollLeft:$e.scrollLeft,scrollTop:$e.scrollTop,scrollWidth:$e.scrollWidth,top:Xt.top,bottom:Xt.bottom,left:Xt.left,right:Xt.right}}let Tt;if($e&&k!==!1){const Xt=xe.current.children;if(Xt.length>0){const $t=Xt[me.get(k)];Tt=$t?$t.getBoundingClientRect():null}}return{tabsMeta:Qe,tabMeta:Tt}},De=ei(()=>{const{tabsMeta:$e,tabMeta:Qe}=ke();let Tt=0,Xt;j?(Xt="top",Qe&&$e&&(Tt=Qe.top-$e.top+$e.scrollTop)):(Xt=i?"right":"left",Qe&&$e&&(Tt=(i?-1:1)*(Qe[Xt]-$e[Xt]+$e.scrollLeft)));const $t={[Xt]:Tt,[V]:Qe?Qe[V]:0};if(typeof te[Xt]!="number"||typeof te[V]!="number")pe($t);else{const bn=Math.abs(te[Xt]-$t[Xt]),Gn=Math.abs(te[V]-$t[V]);(bn>=1||Gn>=1)&&pe($t)}}),_e=($e,{animation:Qe=!0}={})=>{Qe?ONe(D,Se.current,$e,{duration:o.transitions.duration.standard}):Se.current[D]=$e},ye=$e=>{let Qe=Se.current[D];j?Qe+=$e:Qe+=$e*(i?-1:1),_e(Qe)},Pe=()=>{const $e=Se.current[F];let Qe=0;const Tt=Array.from(xe.current.children);for(let Xt=0;Xt$e){Xt===0&&(Qe=$e);break}Qe+=$t[F]}return Qe},Ae=()=>{ye(-1*Pe())},Me=()=>{ye(Pe())},We=v.useCallback($e=>{we({overflow:null,scrollbarWidth:$e})},[]),He=()=>{const $e={};$e.scrollbarSizeListener=L?R.jsx(VNe,{onChange:We,className:de(K.scrollableX,K.hideScrollbar)}):null;const Tt=L&&(x==="auto"&&(ae||oe)||x===!0);return $e.scrollButtonStart=Tt?R.jsx(w,{slots:{StartScrollButtonIcon:E.StartScrollButtonIcon},slotProps:{startScrollButtonIcon:X},orientation:y,direction:i?"right":"left",onClick:Ae,disabled:!ae,...I,className:de(K.scrollButtons,I.className)}):null,$e.scrollButtonEnd=Tt?R.jsx(w,{slots:{EndScrollButtonIcon:E.EndScrollButtonIcon},slotProps:{endScrollButtonIcon:ie},orientation:y,direction:i?"left":"right",onClick:Me,disabled:!oe,...I,className:de(K.scrollButtons,I.className)}):null,$e},Xe=ei($e=>{const{tabsMeta:Qe,tabMeta:Tt}=ke();if(!(!Tt||!Qe)){if(Tt[_]Qe[z]){const Xt=Qe[D]+(Tt[z]-Qe[z]);_e(Xt,{animation:$e})}}}),gt=ei(()=>{L&&x!==!1&&ce(!Z)});v.useEffect(()=>{const $e=MC(()=>{Se.current&&De()});let Qe;const Tt=bn=>{bn.forEach(Gn=>{Gn.removedNodes.forEach(Jn=>{Qe==null||Qe.unobserve(Jn)}),Gn.addedNodes.forEach(Jn=>{Qe==null||Qe.observe(Jn)})}),$e(),gt()},Xt=Es(Se.current);Xt.addEventListener("resize",$e);let $t;return typeof ResizeObserver<"u"&&(Qe=new ResizeObserver($e),Array.from(xe.current.children).forEach(bn=>{Qe.observe(bn)})),typeof MutationObserver<"u"&&($t=new MutationObserver(Tt),$t.observe(xe.current,{childList:!0})),()=>{$e.clear(),Xt.removeEventListener("resize",$e),$t==null||$t.disconnect(),Qe==null||Qe.disconnect()}},[De,gt]),v.useEffect(()=>{const $e=Array.from(xe.current.children),Qe=$e.length;if(typeof IntersectionObserver<"u"&&Qe>0&&L&&x!==!1){const Tt=$e[0],Xt=$e[Qe-1],$t={root:Se.current,threshold:.99},bn=oo=>{se(!oo[0].isIntersecting)},Gn=new IntersectionObserver(bn,$t);Gn.observe(Tt);const Jn=oo=>{fe(!oo[0].isIntersecting)},Do=new IntersectionObserver(Jn,$t);return Do.observe(Xt),()=>{Gn.disconnect(),Do.disconnect()}}},[L,x,Z,u==null?void 0:u.length]),v.useEffect(()=>{Q(!0)},[]),v.useEffect(()=>{De()}),v.useEffect(()=>{Xe(uG!==te)},[Xe,te]),v.useImperativeHandle(l,()=>({updateIndicator:De,updateScrollButtons:gt}),[De,gt]);const st=R.jsx(zNe,{...T,className:de(K.indicator,T.className),ownerState:U,style:{...te,...T.style}});let et=0;const Et=v.Children.map(u,$e=>{if(!v.isValidElement($e))return null;const Qe=$e.props.value===void 0?et:$e.props.value;me.set(Qe,et);const Tt=Qe===k;return et+=1,v.cloneElement($e,{fullWidth:O==="fullWidth",indicator:Tt&&!ee&&st,selected:Tt,selectionFollowsFocus:S,onChange:m,textColor:A,value:Qe,...et===1&&k===!1&&!$e.props.tabIndex?{tabIndex:0}:{}})}),An=$e=>{const Qe=xe.current,Tt=bi(Qe).activeElement;if(Tt.getAttribute("role")!=="tab")return;let $t=y==="horizontal"?"ArrowLeft":"ArrowUp",bn=y==="horizontal"?"ArrowRight":"ArrowDown";switch(y==="horizontal"&&i&&($t="ArrowRight",bn="ArrowLeft"),$e.key){case $t:$e.preventDefault(),rP(Qe,Tt,cG);break;case bn:$e.preventDefault(),rP(Qe,Tt,lG);break;case"Home":$e.preventDefault(),rP(Qe,null,lG);break;case"End":$e.preventDefault(),rP(Qe,null,cG);break}},Ke=He();return R.jsxs(FNe,{className:de(K.root,d),ownerState:U,ref:n,as:f,...N,children:[Ke.scrollButtonStart,Ke.scrollbarSizeListener,R.jsxs(jNe,{className:K.scroller,ownerState:U,style:{overflow:ge.overflow,[j?`margin${i?"Left":"Right"}`:"marginBottom"]:$?void 0:-ge.scrollbarWidth},ref:Se,children:[R.jsx(BNe,{"aria-label":a,"aria-labelledby":s,"aria-orientation":y==="vertical"?"vertical":null,className:K.flexContainer,ownerState:U,onKeyDown:An,ref:xe,role:"tablist",children:Et}),ee&&st]}),Ke.scrollButtonEnd]})});function UNe(e){return nt("MuiTextField",e)}it("MuiTextField",["root"]);const WNe={standard:hI,filled:pI,outlined:gI},GNe=e=>{const{classes:t}=e;return rt({root:["root"]},UNe,t)},qNe=re(kb,{name:"MuiTextField",slot:"Root",overridesResolver:(e,t)=>t.root})({}),nn=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiTextField"}),{autoComplete:o,autoFocus:i=!1,children:a,className:s,color:l="primary",defaultValue:c,disabled:u=!1,error:d=!1,FormHelperTextProps:f,fullWidth:p=!1,helperText:h,id:m,InputLabelProps:y,inputProps:w,InputProps:x,inputRef:S,label:E,maxRows:P,minRows:T,multiline:I=!1,name:A,onBlur:k,onChange:O,onFocus:$,placeholder:N,required:L=!1,rows:j,select:D=!1,SelectProps:_,slots:z={},slotProps:F={},type:V,value:U,variant:K="outlined",...X}=r,ie={...r,autoFocus:i,color:l,disabled:u,error:d,fullWidth:p,multiline:I,required:L,select:D,variant:K},ee=GNe(ie),Q=ip(m),te=h&&Q?`${Q}-helper-text`:void 0,pe=E&&Q?`${Q}-label`:void 0,ae=WNe[K],se={slots:z,slotProps:{input:x,inputLabel:y,htmlInput:w,formHelperText:f,select:_,...F}},oe={},fe=se.slotProps.inputLabel;K==="outlined"&&(fe&&typeof fe.shrink<"u"&&(oe.notched=fe.shrink),oe.label=E),D&&((!_||!_.native)&&(oe.id=void 0),oe["aria-describedby"]=void 0);const[Z,ce]=Cr("input",{elementType:ae,externalForwardedProps:se,additionalProps:oe,ownerState:ie}),[ge,we]=Cr("inputLabel",{elementType:Mb,externalForwardedProps:se,ownerState:ie}),[me,Se]=Cr("htmlInput",{elementType:"input",externalForwardedProps:se,ownerState:ie}),[xe,ke]=Cr("formHelperText",{elementType:HC,externalForwardedProps:se,ownerState:ie}),[De,_e]=Cr("select",{elementType:Lg,externalForwardedProps:se,ownerState:ie}),ye=R.jsx(Z,{"aria-describedby":te,autoComplete:o,autoFocus:i,defaultValue:c,fullWidth:p,multiline:I,name:A,rows:j,maxRows:P,minRows:T,type:V,value:U,id:Q,inputRef:S,onBlur:k,onChange:O,onFocus:$,placeholder:N,inputProps:Se,slots:{input:z.htmlInput?me:void 0},...ce});return R.jsxs(qNe,{className:de(ee.root,s),disabled:u,error:d,fullWidth:p,ref:n,required:L,color:l,variant:K,ownerState:ie,...X,children:[E!=null&&E!==""&&R.jsx(ge,{htmlFor:Q,id:pe,...we,children:E}),D?R.jsx(De,{"aria-describedby":te,id:Q,labelId:pe,value:U,input:ye,..._e,children:a}):ye,h&&R.jsx(xe,{id:te,...ke,children:h})]})});function KNe(e){return nt("MuiToggleButton",e)}const Dh=it("MuiToggleButton",["root","disabled","selected","standard","primary","secondary","sizeSmall","sizeMedium","sizeLarge","fullWidth"]),ire=v.createContext({}),are=v.createContext(void 0);function YNe(e,t){return t===void 0||e===void 0?!1:Array.isArray(t)?t.includes(e):e===t}const QNe=e=>{const{classes:t,fullWidth:n,selected:r,disabled:o,size:i,color:a}=e,s={root:["root",r&&"selected",o&&"disabled",n&&"fullWidth",`size${Ce(i)}`,a]};return rt(s,KNe,t)},XNe=re(ca,{name:"MuiToggleButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`size${Ce(n.size)}`]]}})(Je(({theme:e})=>({...e.typography.button,borderRadius:(e.vars||e).shape.borderRadius,padding:11,border:`1px solid ${(e.vars||e).palette.divider}`,color:(e.vars||e).palette.action.active,[`&.${Dh.disabled}`]:{color:(e.vars||e).palette.action.disabled,border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`},"&:hover":{textDecoration:"none",backgroundColor:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.hoverOpacity})`:St(e.palette.text.primary,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},variants:[{props:{color:"standard"},style:{[`&.${Dh.selected}`]:{color:(e.vars||e).palette.text.primary,backgroundColor:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.selectedOpacity})`:St(e.palette.text.primary,e.palette.action.selectedOpacity),"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:St(e.palette.text.primary,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.selectedOpacity})`:St(e.palette.text.primary,e.palette.action.selectedOpacity)}}}}},...Object.entries(e.palette).filter(Kn()).map(([t])=>({props:{color:t},style:{[`&.${Dh.selected}`]:{color:(e.vars||e).palette[t].main,backgroundColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / ${e.vars.palette.action.selectedOpacity})`:St(e.palette[t].main,e.palette.action.selectedOpacity),"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:St(e.palette[t].main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / ${e.vars.palette.action.selectedOpacity})`:St(e.palette[t].main,e.palette.action.selectedOpacity)}}}}})),{props:{fullWidth:!0},style:{width:"100%"}},{props:{size:"small"},style:{padding:7,fontSize:e.typography.pxToRem(13)}},{props:{size:"large"},style:{padding:15,fontSize:e.typography.pxToRem(15)}}]}))),iw=v.forwardRef(function(t,n){const{value:r,...o}=v.useContext(ire),i=v.useContext(are),a=cg({...o,selected:YNe(t.value,r)},t),s=at({props:a,name:"MuiToggleButton"}),{children:l,className:c,color:u="standard",disabled:d=!1,disableFocusRipple:f=!1,fullWidth:p=!1,onChange:h,onClick:m,selected:y,size:w="medium",value:x,...S}=s,E={...s,color:u,disabled:d,disableFocusRipple:f,fullWidth:p,size:w},P=QNe(E),T=A=>{m&&(m(A,x),A.defaultPrevented)||h&&h(A,x)},I=i||"";return R.jsx(XNe,{className:de(o.className,P.root,c,I),disabled:d,focusRipple:!f,ref:n,onClick:T,onChange:h,value:x,ownerState:E,"aria-pressed":y,...S,children:l})});function JNe(e){return nt("MuiToggleButtonGroup",e)}const Dr=it("MuiToggleButtonGroup",["root","selected","horizontal","vertical","disabled","grouped","groupedHorizontal","groupedVertical","fullWidth","firstButton","lastButton","middleButton"]),ZNe=e=>{const{classes:t,orientation:n,fullWidth:r,disabled:o}=e,i={root:["root",n,r&&"fullWidth"],grouped:["grouped",`grouped${Ce(n)}`,o&&"disabled"],firstButton:["firstButton"],lastButton:["lastButton"],middleButton:["middleButton"]};return rt(i,JNe,t)},eLe=re("div",{name:"MuiToggleButtonGroup",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${Dr.grouped}`]:t.grouped},{[`& .${Dr.grouped}`]:t[`grouped${Ce(n.orientation)}`]},{[`& .${Dr.firstButton}`]:t.firstButton},{[`& .${Dr.lastButton}`]:t.lastButton},{[`& .${Dr.middleButton}`]:t.middleButton},t.root,n.orientation==="vertical"&&t.vertical,n.fullWidth&&t.fullWidth]}})(Je(({theme:e})=>({display:"inline-flex",borderRadius:(e.vars||e).shape.borderRadius,variants:[{props:{orientation:"vertical"},style:{flexDirection:"column",[`& .${Dr.grouped}`]:{[`&.${Dr.selected} + .${Dr.grouped}.${Dr.selected}`]:{borderTop:0,marginTop:0}},[`& .${Dr.firstButton},& .${Dr.middleButton}`]:{borderBottomLeftRadius:0,borderBottomRightRadius:0},[`& .${Dr.lastButton},& .${Dr.middleButton}`]:{marginTop:-1,borderTop:"1px solid transparent",borderTopLeftRadius:0,borderTopRightRadius:0},[`& .${Dr.lastButton}.${Dh.disabled},& .${Dr.middleButton}.${Dh.disabled}`]:{borderTop:"1px solid transparent"}}},{props:{fullWidth:!0},style:{width:"100%"}},{props:{orientation:"horizontal"},style:{[`& .${Dr.grouped}`]:{[`&.${Dr.selected} + .${Dr.grouped}.${Dr.selected}`]:{borderLeft:0,marginLeft:0}},[`& .${Dr.firstButton},& .${Dr.middleButton}`]:{borderTopRightRadius:0,borderBottomRightRadius:0},[`& .${Dr.lastButton},& .${Dr.middleButton}`]:{marginLeft:-1,borderLeft:"1px solid transparent",borderTopLeftRadius:0,borderBottomLeftRadius:0},[`& .${Dr.lastButton}.${Dh.disabled},& .${Dr.middleButton}.${Dh.disabled}`]:{borderLeft:"1px solid transparent"}}}]}))),tLe=v.forwardRef(function(t,n){const r=at({props:t,name:"MuiToggleButtonGroup"}),{children:o,className:i,color:a="standard",disabled:s=!1,exclusive:l=!1,fullWidth:c=!1,onChange:u,orientation:d="horizontal",size:f="medium",value:p,...h}=r,m={...r,disabled:s,fullWidth:c,orientation:d,size:f},y=ZNe(m),w=v.useCallback((I,A)=>{if(!u)return;const k=p&&p.indexOf(A);let O;p&&k>=0?(O=p.slice(),O.splice(k,1)):O=p?p.concat(A):[A],u(I,O)},[u,p]),x=v.useCallback((I,A)=>{u&&u(I,p===A?null:A)},[u,p]),S=v.useMemo(()=>({className:y.grouped,onChange:l?x:w,value:p,size:f,fullWidth:c,color:a,disabled:s}),[y.grouped,l,x,w,p,f,c,a,s]),E=zZ(o),P=E.length,T=I=>{const A=I===0,k=I===P-1;return A&&k?"":A?y.firstButton:k?y.lastButton:y.middleButton};return R.jsx(eLe,{role:"group",className:de(y.root,i),ref:n,ownerState:m,...h,children:R.jsx(ire.Provider,{value:S,children:E.map((I,A)=>R.jsx(are.Provider,{value:T(A),children:I},A))})})}),nLe=(...e)=>{console!=null&&console.warn&&(eg(e[0])&&(e[0]=`react-i18next:: ${e[0]}`),console.warn(...e))},dG={},SN=(...e)=>{eg(e[0])&&dG[e[0]]||(eg(e[0])&&(dG[e[0]]=new Date),nLe(...e))},sre=(e,t)=>()=>{if(e.isInitialized)t();else{const n=()=>{setTimeout(()=>{e.off("initialized",n)},0),t()};e.on("initialized",n)}},fG=(e,t,n)=>{e.loadNamespaces(t,sre(e,n))},pG=(e,t,n,r)=>{eg(n)&&(n=[n]),n.forEach(o=>{e.options.ns.indexOf(o)<0&&e.options.ns.push(o)}),e.loadLanguages(t,sre(e,r))},rLe=(e,t,n={})=>!t.languages||!t.languages.length?(SN("i18n.languages were undefined or empty",t.languages),!0):t.hasLoadedNamespace(e,{lng:n.lng,precheck:(r,o)=>{var i;if(((i=n.bindI18n)==null?void 0:i.indexOf("languageChanging"))>-1&&r.services.backendConnector.backend&&r.isLanguageChangingTo&&!o(r.isLanguageChangingTo,e))return!1}}),eg=e=>typeof e=="string",oLe=e=>typeof e=="object"&&e!==null,iLe=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,aLe={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},sLe=e=>aLe[e],lLe=e=>e.replace(iLe,sLe);let CN={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:lLe};const cLe=(e={})=>{CN={...CN,...e}},uLe=()=>CN;let lre;const dLe=e=>{lre=e},fLe=()=>lre,pLe={type:"3rdParty",init(e){cLe(e.options.react),dLe(e)}},hLe=v.createContext();class gLe{constructor(){this.usedNamespaces={}}addUsedNamespaces(t){t.forEach(n=>{this.usedNamespaces[n]||(this.usedNamespaces[n]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const mLe=(e,t)=>{const n=v.useRef();return v.useEffect(()=>{n.current=e},[e,t]),n.current},cre=(e,t,n,r)=>e.getFixedT(t,n,r),yLe=(e,t,n,r)=>v.useCallback(cre(e,t,n,r),[e,t,n,r]),Le=(e,t={})=>{var E,P,T,I;const{i18n:n}=t,{i18n:r,defaultNS:o}=v.useContext(hLe)||{},i=n||r||fLe();if(i&&!i.reportNamespaces&&(i.reportNamespaces=new gLe),!i){SN("You will need to pass in an i18next instance by using initReactI18next");const A=(O,$)=>eg($)?$:oLe($)&&eg($.defaultValue)?$.defaultValue:Array.isArray(O)?O[O.length-1]:O,k=[A,{},!1];return k.t=A,k.i18n={},k.ready=!1,k}(E=i.options.react)!=null&&E.wait&&SN("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const a={...uLe(),...i.options.react,...t},{useSuspense:s,keyPrefix:l}=a;let c=o||((P=i.options)==null?void 0:P.defaultNS);c=eg(c)?[c]:c||["translation"],(I=(T=i.reportNamespaces).addUsedNamespaces)==null||I.call(T,c);const u=(i.isInitialized||i.initializedStoreOnce)&&c.every(A=>rLe(A,i,a)),d=yLe(i,t.lng||null,a.nsMode==="fallback"?c:c[0],l),f=()=>d,p=()=>cre(i,t.lng||null,a.nsMode==="fallback"?c:c[0],l),[h,m]=v.useState(f);let y=c.join();t.lng&&(y=`${t.lng}${y}`);const w=mLe(y),x=v.useRef(!0);v.useEffect(()=>{const{bindI18n:A,bindI18nStore:k}=a;x.current=!0,!u&&!s&&(t.lng?pG(i,t.lng,c,()=>{x.current&&m(p)}):fG(i,c,()=>{x.current&&m(p)})),u&&w&&w!==y&&x.current&&m(p);const O=()=>{x.current&&m(p)};return A&&(i==null||i.on(A,O)),k&&(i==null||i.store.on(k,O)),()=>{x.current=!1,i&&(A==null||A.split(" ").forEach($=>i.off($,O))),k&&i&&k.split(" ").forEach($=>i.store.off($,O))}},[i,y]),v.useEffect(()=>{x.current&&u&&m(f)},[i,l,u]);const S=[h,i,u];if(S.t=h,S.i18n=i,S.ready=u,u||!u&&!s)return S;throw new Promise(A=>{t.lng?pG(i,t.lng,c,()=>A()):fG(i,c,()=>A())})},ys=()=>{const[e]=Le();return b(en,{sx:{textAlign:"center"},children:e("loading")})},mo=()=>b(en,{sx:{height:200,alignItems:"center",mt:2},component:Wt,direction:"column",justifyContent:"center",children:b(gk,{})}),ld=()=>b(gk,{size:20}),ure=ct(R.jsx("path",{d:"m12 8-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z"}),"ExpandLess"),Rb=ct(R.jsx("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore"),GC=ct(R.jsx("path",{d:"M9 4v1.38c-.83-.33-1.72-.5-2.61-.5-1.79 0-3.58.68-4.95 2.05l3.33 3.33h1.11v1.11c.86.86 1.98 1.31 3.11 1.36V15H6v3c0 1.1.9 2 2 2h10c1.66 0 3-1.34 3-3V4zm-1.11 6.41V8.26H5.61L4.57 7.22a5.07 5.07 0 0 1 1.82-.34c1.34 0 2.59.52 3.54 1.46l1.41 1.41-.2.2c-.51.51-1.19.8-1.92.8-.47 0-.93-.12-1.33-.34M19 17c0 .55-.45 1-1 1s-1-.45-1-1v-2h-6v-2.59c.57-.23 1.1-.57 1.56-1.03l.2-.2L15.59 14H17v-1.41l-6-5.97V6h8z"}),"HistoryEdu"),Rd=ct(R.jsx("path",{d:"M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2M8.5 13.5l2.5 3.01L14.5 12l4.5 6H5z"}),"Photo"),qC=ct(R.jsx("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close"),Fi=({title:e,subtitle:t,isOpen:n,closeFn:r,children:o})=>b(Ab,{open:n,onClose:r,"aria-labelledby":"modal-modal-title","aria-describedby":"modal-modal-description",children:G(to,{sx:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",p:2,minWidth:"400px"},children:[b(jl,{title:e,subheader:t,action:b(qC,{onClick:r})}),b(ni,{children:o}),b(Ds,{})]})}),KC=e=>{const[t]=Le(),n=e.height?e.height:"50vh";return b(wt,{children:G(en,{sx:{height:n,display:"flex",alignItems:"center",flexDirection:"column",justifyContent:"center"},children:[b(ot,{variant:"h6",mr:3,children:t("nothingHereYet")}),b(ot,{mr:3,children:t("nothingHereYetAction")})]})})},lz=e=>{const[t]=Le(),[n,r]=Y.useState(!1),o=()=>r(!0),i=()=>r(!1),a=e.link!==void 0?b(dt,{size:"small",variant:"contained",href:e.link,children:t("add")}):b(dt,{size:"small",variant:"contained",onClick:o,children:t("add")});return G(wt,{children:[G(to,{children:[b(jl,{title:e.title,subheader:".",sx:{paddingBottom:0}}),b(ni,{sx:{paddingTop:0,height:"500px"},children:b(KC,{})}),b(Ds,{children:a})]}),b(Fi,{title:t("add"),isOpen:n,closeFn:i,children:e.modalContent})]})};function dre(e,t){return function(){return e.apply(t,arguments)}}const{toString:vLe}=Object.prototype,{getPrototypeOf:cz}=Object,wk=(e=>t=>{const n=vLe.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),_c=e=>(e=e.toLowerCase(),t=>wk(t)===e),xk=e=>t=>typeof t===e,{isArray:$b}=Array,lS=xk("undefined");function bLe(e){return e!==null&&!lS(e)&&e.constructor!==null&&!lS(e.constructor)&&vs(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const fre=_c("ArrayBuffer");function wLe(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&fre(e.buffer),t}const xLe=xk("string"),vs=xk("function"),pre=xk("number"),Sk=e=>e!==null&&typeof e=="object",SLe=e=>e===!0||e===!1,cT=e=>{if(wk(e)!=="object")return!1;const t=cz(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},CLe=_c("Date"),ELe=_c("File"),PLe=_c("Blob"),TLe=_c("FileList"),ILe=e=>Sk(e)&&vs(e.pipe),OLe=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||vs(e.append)&&((t=wk(e))==="formdata"||t==="object"&&vs(e.toString)&&e.toString()==="[object FormData]"))},ALe=_c("URLSearchParams"),[kLe,MLe,RLe,$Le]=["ReadableStream","Request","Response","Headers"].map(_c),DLe=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function YC(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,o;if(typeof e!="object"&&(e=[e]),$b(e))for(r=0,o=e.length;r0;)if(o=n[r],t===o.toLowerCase())return o;return null}const _h=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,gre=e=>!lS(e)&&e!==_h;function EN(){const{caseless:e}=gre(this)&&this||{},t={},n=(r,o)=>{const i=e&&hre(t,o)||o;cT(t[i])&&cT(r)?t[i]=EN(t[i],r):cT(r)?t[i]=EN({},r):$b(r)?t[i]=r.slice():t[i]=r};for(let r=0,o=arguments.length;r(YC(t,(o,i)=>{n&&vs(o)?e[i]=dre(o,n):e[i]=o},{allOwnKeys:r}),e),NLe=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),LLe=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},FLe=(e,t,n,r)=>{let o,i,a;const s={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),i=o.length;i-- >0;)a=o[i],(!r||r(a,e,t))&&!s[a]&&(t[a]=e[a],s[a]=!0);e=n!==!1&&cz(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},jLe=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},BLe=e=>{if(!e)return null;if($b(e))return e;let t=e.length;if(!pre(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},zLe=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&cz(Uint8Array)),VLe=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let o;for(;(o=r.next())&&!o.done;){const i=o.value;t.call(e,i[0],i[1])}},HLe=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},ULe=_c("HTMLFormElement"),WLe=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),hG=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),GLe=_c("RegExp"),mre=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};YC(n,(o,i)=>{let a;(a=t(o,i,e))!==!1&&(r[i]=a||o)}),Object.defineProperties(e,r)},qLe=e=>{mre(e,(t,n)=>{if(vs(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(vs(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},KLe=(e,t)=>{const n={},r=o=>{o.forEach(i=>{n[i]=!0})};return $b(e)?r(e):r(String(e).split(t)),n},YLe=()=>{},QLe=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t,gD="abcdefghijklmnopqrstuvwxyz",gG="0123456789",yre={DIGIT:gG,ALPHA:gD,ALPHA_DIGIT:gD+gD.toUpperCase()+gG},XLe=(e=16,t=yre.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};function JLe(e){return!!(e&&vs(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const ZLe=e=>{const t=new Array(10),n=(r,o)=>{if(Sk(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[o]=r;const i=$b(r)?[]:{};return YC(r,(a,s)=>{const l=n(a,o+1);!lS(l)&&(i[s]=l)}),t[o]=void 0,i}}return r};return n(e,0)},eFe=_c("AsyncFunction"),tFe=e=>e&&(Sk(e)||vs(e))&&vs(e.then)&&vs(e.catch),vre=((e,t)=>e?setImmediate:t?((n,r)=>(_h.addEventListener("message",({source:o,data:i})=>{o===_h&&i===n&&r.length&&r.shift()()},!1),o=>{r.push(o),_h.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",vs(_h.postMessage)),nFe=typeof queueMicrotask<"u"?queueMicrotask.bind(_h):typeof process<"u"&&process.nextTick||vre,Ne={isArray:$b,isArrayBuffer:fre,isBuffer:bLe,isFormData:OLe,isArrayBufferView:wLe,isString:xLe,isNumber:pre,isBoolean:SLe,isObject:Sk,isPlainObject:cT,isReadableStream:kLe,isRequest:MLe,isResponse:RLe,isHeaders:$Le,isUndefined:lS,isDate:CLe,isFile:ELe,isBlob:PLe,isRegExp:GLe,isFunction:vs,isStream:ILe,isURLSearchParams:ALe,isTypedArray:zLe,isFileList:TLe,forEach:YC,merge:EN,extend:_Le,trim:DLe,stripBOM:NLe,inherits:LLe,toFlatObject:FLe,kindOf:wk,kindOfTest:_c,endsWith:jLe,toArray:BLe,forEachEntry:VLe,matchAll:HLe,isHTMLForm:ULe,hasOwnProperty:hG,hasOwnProp:hG,reduceDescriptors:mre,freezeMethods:qLe,toObjectSet:KLe,toCamelCase:WLe,noop:YLe,toFiniteNumber:QLe,findKey:hre,global:_h,isContextDefined:gre,ALPHABET:yre,generateString:XLe,isSpecCompliantForm:JLe,toJSONObject:ZLe,isAsyncFn:eFe,isThenable:tFe,setImmediate:vre,asap:nFe};function fn(e,t,n,r,o){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),r&&(this.request=r),o&&(this.response=o,this.status=o.status?o.status:null)}Ne.inherits(fn,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:Ne.toJSONObject(this.config),code:this.code,status:this.status}}});const bre=fn.prototype,wre={};["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=>{wre[e]={value:e}});Object.defineProperties(fn,wre);Object.defineProperty(bre,"isAxiosError",{value:!0});fn.from=(e,t,n,r,o,i)=>{const a=Object.create(bre);return Ne.toFlatObject(e,a,function(l){return l!==Error.prototype},s=>s!=="isAxiosError"),fn.call(a,e.message,t,n,r,o),a.cause=e,a.name=e.name,i&&Object.assign(a,i),a};const rFe=null;function PN(e){return Ne.isPlainObject(e)||Ne.isArray(e)}function xre(e){return Ne.endsWith(e,"[]")?e.slice(0,-2):e}function mG(e,t,n){return e?e.concat(t).map(function(o,i){return o=xre(o),!n&&i?"["+o+"]":o}).join(n?".":""):t}function oFe(e){return Ne.isArray(e)&&!e.some(PN)}const iFe=Ne.toFlatObject(Ne,{},null,function(t){return/^is[A-Z]/.test(t)});function Ck(e,t,n){if(!Ne.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=Ne.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,y){return!Ne.isUndefined(y[m])});const r=n.metaTokens,o=n.visitor||u,i=n.dots,a=n.indexes,l=(n.Blob||typeof Blob<"u"&&Blob)&&Ne.isSpecCompliantForm(t);if(!Ne.isFunction(o))throw new TypeError("visitor must be a function");function c(h){if(h===null)return"";if(Ne.isDate(h))return h.toISOString();if(!l&&Ne.isBlob(h))throw new fn("Blob is not supported. Use a Buffer instead.");return Ne.isArrayBuffer(h)||Ne.isTypedArray(h)?l&&typeof Blob=="function"?new Blob([h]):Buffer.from(h):h}function u(h,m,y){let w=h;if(h&&!y&&typeof h=="object"){if(Ne.endsWith(m,"{}"))m=r?m:m.slice(0,-2),h=JSON.stringify(h);else if(Ne.isArray(h)&&oFe(h)||(Ne.isFileList(h)||Ne.endsWith(m,"[]"))&&(w=Ne.toArray(h)))return m=xre(m),w.forEach(function(S,E){!(Ne.isUndefined(S)||S===null)&&t.append(a===!0?mG([m],E,i):a===null?m:m+"[]",c(S))}),!1}return PN(h)?!0:(t.append(mG(y,m,i),c(h)),!1)}const d=[],f=Object.assign(iFe,{defaultVisitor:u,convertValue:c,isVisitable:PN});function p(h,m){if(!Ne.isUndefined(h)){if(d.indexOf(h)!==-1)throw Error("Circular reference detected in "+m.join("."));d.push(h),Ne.forEach(h,function(w,x){(!(Ne.isUndefined(w)||w===null)&&o.call(t,w,Ne.isString(x)?x.trim():x,m,f))===!0&&p(w,m?m.concat(x):[x])}),d.pop()}}if(!Ne.isObject(e))throw new TypeError("data must be an object");return p(e),t}function yG(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function uz(e,t){this._pairs=[],e&&Ck(e,this,t)}const Sre=uz.prototype;Sre.append=function(t,n){this._pairs.push([t,n])};Sre.toString=function(t){const n=t?function(r){return t.call(this,r,yG)}:yG;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function aFe(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Cre(e,t,n){if(!t)return e;const r=n&&n.encode||aFe,o=n&&n.serialize;let i;if(o?i=o(t,n):i=Ne.isURLSearchParams(t)?t.toString():new uz(t,n).toString(r),i){const a=e.indexOf("#");a!==-1&&(e=e.slice(0,a)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class vG{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){Ne.forEach(this.handlers,function(r){r!==null&&t(r)})}}const Ere={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},sFe=typeof URLSearchParams<"u"?URLSearchParams:uz,lFe=typeof FormData<"u"?FormData:null,cFe=typeof Blob<"u"?Blob:null,uFe={isBrowser:!0,classes:{URLSearchParams:sFe,FormData:lFe,Blob:cFe},protocols:["http","https","file","blob","url","data"]},dz=typeof window<"u"&&typeof document<"u",TN=typeof navigator=="object"&&navigator||void 0,dFe=dz&&(!TN||["ReactNative","NativeScript","NS"].indexOf(TN.product)<0),fFe=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",pFe=dz&&window.location.href||"http://localhost",hFe=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:dz,hasStandardBrowserEnv:dFe,hasStandardBrowserWebWorkerEnv:fFe,navigator:TN,origin:pFe},Symbol.toStringTag,{value:"Module"})),$a={...hFe,...uFe};function gFe(e,t){return Ck(e,new $a.classes.URLSearchParams,Object.assign({visitor:function(n,r,o,i){return $a.isNode&&Ne.isBuffer(n)?(this.append(r,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},t))}function mFe(e){return Ne.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function yFe(e){const t={},n=Object.keys(e);let r;const o=n.length;let i;for(r=0;r=n.length;return a=!a&&Ne.isArray(o)?o.length:a,l?(Ne.hasOwnProp(o,a)?o[a]=[o[a],r]:o[a]=r,!s):((!o[a]||!Ne.isObject(o[a]))&&(o[a]=[]),t(n,r,o[a],i)&&Ne.isArray(o[a])&&(o[a]=yFe(o[a])),!s)}if(Ne.isFormData(e)&&Ne.isFunction(e.entries)){const n={};return Ne.forEachEntry(e,(r,o)=>{t(mFe(r),o,n,0)}),n}return null}function vFe(e,t,n){if(Ne.isString(e))try{return(t||JSON.parse)(e),Ne.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(0,JSON.stringify)(e)}const QC={transitional:Ere,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,i=Ne.isObject(t);if(i&&Ne.isHTMLForm(t)&&(t=new FormData(t)),Ne.isFormData(t))return o?JSON.stringify(Pre(t)):t;if(Ne.isArrayBuffer(t)||Ne.isBuffer(t)||Ne.isStream(t)||Ne.isFile(t)||Ne.isBlob(t)||Ne.isReadableStream(t))return t;if(Ne.isArrayBufferView(t))return t.buffer;if(Ne.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let s;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return gFe(t,this.formSerializer).toString();if((s=Ne.isFileList(t))||r.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return Ck(s?{"files[]":t}:t,l&&new l,this.formSerializer)}}return i||o?(n.setContentType("application/json",!1),vFe(t)):t}],transformResponse:[function(t){const n=this.transitional||QC.transitional,r=n&&n.forcedJSONParsing,o=this.responseType==="json";if(Ne.isResponse(t)||Ne.isReadableStream(t))return t;if(t&&Ne.isString(t)&&(r&&!this.responseType||o)){const a=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(t)}catch(s){if(a)throw s.name==="SyntaxError"?fn.from(s,fn.ERR_BAD_RESPONSE,this,null,this.response):s}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:$a.classes.FormData,Blob:$a.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Ne.forEach(["delete","get","head","post","put","patch"],e=>{QC.headers[e]={}});const bFe=Ne.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"]),wFe=e=>{const t={};let n,r,o;return e&&e.split(` +`).forEach(function(a){o=a.indexOf(":"),n=a.substring(0,o).trim().toLowerCase(),r=a.substring(o+1).trim(),!(!n||t[n]&&bFe[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},bG=Symbol("internals");function aw(e){return e&&String(e).trim().toLowerCase()}function uT(e){return e===!1||e==null?e:Ne.isArray(e)?e.map(uT):String(e)}function xFe(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const SFe=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function mD(e,t,n,r,o){if(Ne.isFunction(r))return r.call(this,t,n);if(o&&(t=n),!!Ne.isString(t)){if(Ne.isString(r))return t.indexOf(r)!==-1;if(Ne.isRegExp(r))return r.test(t)}}function CFe(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function EFe(e,t){const n=Ne.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(o,i,a){return this[r].call(this,t,o,i,a)},configurable:!0})})}class Da{constructor(t){t&&this.set(t)}set(t,n,r){const o=this;function i(s,l,c){const u=aw(l);if(!u)throw new Error("header name must be a non-empty string");const d=Ne.findKey(o,u);(!d||o[d]===void 0||c===!0||c===void 0&&o[d]!==!1)&&(o[d||l]=uT(s))}const a=(s,l)=>Ne.forEach(s,(c,u)=>i(c,u,l));if(Ne.isPlainObject(t)||t instanceof this.constructor)a(t,n);else if(Ne.isString(t)&&(t=t.trim())&&!SFe(t))a(wFe(t),n);else if(Ne.isHeaders(t))for(const[s,l]of t.entries())i(l,s,r);else t!=null&&i(n,t,r);return this}get(t,n){if(t=aw(t),t){const r=Ne.findKey(this,t);if(r){const o=this[r];if(!n)return o;if(n===!0)return xFe(o);if(Ne.isFunction(n))return n.call(this,o,r);if(Ne.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=aw(t),t){const r=Ne.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||mD(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let o=!1;function i(a){if(a=aw(a),a){const s=Ne.findKey(r,a);s&&(!n||mD(r,r[s],s,n))&&(delete r[s],o=!0)}}return Ne.isArray(t)?t.forEach(i):i(t),o}clear(t){const n=Object.keys(this);let r=n.length,o=!1;for(;r--;){const i=n[r];(!t||mD(this,this[i],i,t,!0))&&(delete this[i],o=!0)}return o}normalize(t){const n=this,r={};return Ne.forEach(this,(o,i)=>{const a=Ne.findKey(r,i);if(a){n[a]=uT(o),delete n[i];return}const s=t?CFe(i):String(i).trim();s!==i&&delete n[i],n[s]=uT(o),r[s]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return Ne.forEach(this,(r,o)=>{r!=null&&r!==!1&&(n[o]=t&&Ne.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(` +`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(o=>r.set(o)),r}static accessor(t){const r=(this[bG]=this[bG]={accessors:{}}).accessors,o=this.prototype;function i(a){const s=aw(a);r[s]||(EFe(o,a),r[s]=!0)}return Ne.isArray(t)?t.forEach(i):i(t),this}}Da.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);Ne.reduceDescriptors(Da.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});Ne.freezeMethods(Da);function yD(e,t){const n=this||QC,r=t||n,o=Da.from(r.headers);let i=r.data;return Ne.forEach(e,function(s){i=s.call(n,i,o.normalize(),t?t.status:void 0)}),o.normalize(),i}function Tre(e){return!!(e&&e.__CANCEL__)}function Db(e,t,n){fn.call(this,e??"canceled",fn.ERR_CANCELED,t,n),this.name="CanceledError"}Ne.inherits(Db,fn,{__CANCEL__:!0});function Ire(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new fn("Request failed with status code "+n.status,[fn.ERR_BAD_REQUEST,fn.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function PFe(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function TFe(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o=0,i=0,a;return t=t!==void 0?t:1e3,function(l){const c=Date.now(),u=r[i];a||(a=c),n[o]=l,r[o]=c;let d=i,f=0;for(;d!==o;)f+=n[d++],d=d%e;if(o=(o+1)%e,o===i&&(i=(i+1)%e),c-a{n=u,o=null,i&&(clearTimeout(i),i=null),e.apply(null,c)};return[(...c)=>{const u=Date.now(),d=u-n;d>=r?a(c,u):(o=c,i||(i=setTimeout(()=>{i=null,a(o)},r-d)))},()=>o&&a(o)]}const mI=(e,t,n=3)=>{let r=0;const o=TFe(50,250);return IFe(i=>{const a=i.loaded,s=i.lengthComputable?i.total:void 0,l=a-r,c=o(l),u=a<=s;r=a;const d={loaded:a,total:s,progress:s?a/s:void 0,bytes:l,rate:c||void 0,estimated:c&&s&&u?(s-a)/c:void 0,event:i,lengthComputable:s!=null,[t?"download":"upload"]:!0};e(d)},n)},wG=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},xG=e=>(...t)=>Ne.asap(()=>e(...t)),OFe=$a.hasStandardBrowserEnv?function(){const t=$a.navigator&&/(msie|trident)/i.test($a.navigator.userAgent),n=document.createElement("a");let r;function o(i){let a=i;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 r=o(window.location.href),function(a){const s=Ne.isString(a)?o(a):a;return s.protocol===r.protocol&&s.host===r.host}}():function(){return function(){return!0}}(),AFe=$a.hasStandardBrowserEnv?{write(e,t,n,r,o,i){const a=[e+"="+encodeURIComponent(t)];Ne.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),Ne.isString(r)&&a.push("path="+r),Ne.isString(o)&&a.push("domain="+o),i===!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 kFe(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function MFe(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Ore(e,t){return e&&!kFe(t)?MFe(e,t):t}const SG=e=>e instanceof Da?{...e}:e;function vg(e,t){t=t||{};const n={};function r(c,u,d){return Ne.isPlainObject(c)&&Ne.isPlainObject(u)?Ne.merge.call({caseless:d},c,u):Ne.isPlainObject(u)?Ne.merge({},u):Ne.isArray(u)?u.slice():u}function o(c,u,d){if(Ne.isUndefined(u)){if(!Ne.isUndefined(c))return r(void 0,c,d)}else return r(c,u,d)}function i(c,u){if(!Ne.isUndefined(u))return r(void 0,u)}function a(c,u){if(Ne.isUndefined(u)){if(!Ne.isUndefined(c))return r(void 0,c)}else return r(void 0,u)}function s(c,u,d){if(d in t)return r(c,u);if(d in e)return r(void 0,c)}const l={url:i,method:i,data:i,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:s,headers:(c,u)=>o(SG(c),SG(u),!0)};return Ne.forEach(Object.keys(Object.assign({},e,t)),function(u){const d=l[u]||o,f=d(e[u],t[u],u);Ne.isUndefined(f)&&d!==s||(n[u]=f)}),n}const Are=e=>{const t=vg({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:i,headers:a,auth:s}=t;t.headers=a=Da.from(a),t.url=Cre(Ore(t.baseURL,t.url),e.params,e.paramsSerializer),s&&a.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?unescape(encodeURIComponent(s.password)):"")));let l;if(Ne.isFormData(n)){if($a.hasStandardBrowserEnv||$a.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if((l=a.getContentType())!==!1){const[c,...u]=l?l.split(";").map(d=>d.trim()).filter(Boolean):[];a.setContentType([c||"multipart/form-data",...u].join("; "))}}if($a.hasStandardBrowserEnv&&(r&&Ne.isFunction(r)&&(r=r(t)),r||r!==!1&&OFe(t.url))){const c=o&&i&&AFe.read(i);c&&a.set(o,c)}return t},RFe=typeof XMLHttpRequest<"u",$Fe=RFe&&function(e){return new Promise(function(n,r){const o=Are(e);let i=o.data;const a=Da.from(o.headers).normalize();let{responseType:s,onUploadProgress:l,onDownloadProgress:c}=o,u,d,f,p,h;function m(){p&&p(),h&&h(),o.cancelToken&&o.cancelToken.unsubscribe(u),o.signal&&o.signal.removeEventListener("abort",u)}let y=new XMLHttpRequest;y.open(o.method.toUpperCase(),o.url,!0),y.timeout=o.timeout;function w(){if(!y)return;const S=Da.from("getAllResponseHeaders"in y&&y.getAllResponseHeaders()),P={data:!s||s==="text"||s==="json"?y.responseText:y.response,status:y.status,statusText:y.statusText,headers:S,config:e,request:y};Ire(function(I){n(I),m()},function(I){r(I),m()},P),y=null}"onloadend"in y?y.onloadend=w:y.onreadystatechange=function(){!y||y.readyState!==4||y.status===0&&!(y.responseURL&&y.responseURL.indexOf("file:")===0)||setTimeout(w)},y.onabort=function(){y&&(r(new fn("Request aborted",fn.ECONNABORTED,e,y)),y=null)},y.onerror=function(){r(new fn("Network Error",fn.ERR_NETWORK,e,y)),y=null},y.ontimeout=function(){let E=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const P=o.transitional||Ere;o.timeoutErrorMessage&&(E=o.timeoutErrorMessage),r(new fn(E,P.clarifyTimeoutError?fn.ETIMEDOUT:fn.ECONNABORTED,e,y)),y=null},i===void 0&&a.setContentType(null),"setRequestHeader"in y&&Ne.forEach(a.toJSON(),function(E,P){y.setRequestHeader(P,E)}),Ne.isUndefined(o.withCredentials)||(y.withCredentials=!!o.withCredentials),s&&s!=="json"&&(y.responseType=o.responseType),c&&([f,h]=mI(c,!0),y.addEventListener("progress",f)),l&&y.upload&&([d,p]=mI(l),y.upload.addEventListener("progress",d),y.upload.addEventListener("loadend",p)),(o.cancelToken||o.signal)&&(u=S=>{y&&(r(!S||S.type?new Db(null,e,y):S),y.abort(),y=null)},o.cancelToken&&o.cancelToken.subscribe(u),o.signal&&(o.signal.aborted?u():o.signal.addEventListener("abort",u)));const x=PFe(o.url);if(x&&$a.protocols.indexOf(x)===-1){r(new fn("Unsupported protocol "+x+":",fn.ERR_BAD_REQUEST,e));return}y.send(i||null)})},DFe=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,o;const i=function(c){if(!o){o=!0,s();const u=c instanceof Error?c:this.reason;r.abort(u instanceof fn?u:new Db(u instanceof Error?u.message:u))}};let a=t&&setTimeout(()=>{a=null,i(new fn(`timeout ${t} of ms exceeded`,fn.ETIMEDOUT))},t);const s=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(c=>{c.unsubscribe?c.unsubscribe(i):c.removeEventListener("abort",i)}),e=null)};e.forEach(c=>c.addEventListener("abort",i));const{signal:l}=r;return l.unsubscribe=()=>Ne.asap(s),l}},_Fe=function*(e,t){let n=e.byteLength;if(n{const o=NFe(e,t);let i=0,a,s=l=>{a||(a=!0,r&&r(l))};return new ReadableStream({async pull(l){try{const{done:c,value:u}=await o.next();if(c){s(),l.close();return}let d=u.byteLength;if(n){let f=i+=d;n(f)}l.enqueue(new Uint8Array(u))}catch(c){throw s(c),c}},cancel(l){return s(l),o.return()}},{highWaterMark:2})},Ek=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",kre=Ek&&typeof ReadableStream=="function",FFe=Ek&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),Mre=(e,...t)=>{try{return!!e(...t)}catch{return!1}},jFe=kre&&Mre(()=>{let e=!1;const t=new Request($a.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),EG=64*1024,IN=kre&&Mre(()=>Ne.isReadableStream(new Response("").body)),yI={stream:IN&&(e=>e.body)};Ek&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!yI[t]&&(yI[t]=Ne.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new fn(`Response type '${t}' is not supported`,fn.ERR_NOT_SUPPORT,r)})})})(new Response);const BFe=async e=>{if(e==null)return 0;if(Ne.isBlob(e))return e.size;if(Ne.isSpecCompliantForm(e))return(await new Request($a.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(Ne.isArrayBufferView(e)||Ne.isArrayBuffer(e))return e.byteLength;if(Ne.isURLSearchParams(e)&&(e=e+""),Ne.isString(e))return(await FFe(e)).byteLength},zFe=async(e,t)=>{const n=Ne.toFiniteNumber(e.getContentLength());return n??BFe(t)},VFe=Ek&&(async e=>{let{url:t,method:n,data:r,signal:o,cancelToken:i,timeout:a,onDownloadProgress:s,onUploadProgress:l,responseType:c,headers:u,withCredentials:d="same-origin",fetchOptions:f}=Are(e);c=c?(c+"").toLowerCase():"text";let p=DFe([o,i&&i.toAbortSignal()],a),h;const m=p&&p.unsubscribe&&(()=>{p.unsubscribe()});let y;try{if(l&&jFe&&n!=="get"&&n!=="head"&&(y=await zFe(u,r))!==0){let P=new Request(t,{method:"POST",body:r,duplex:"half"}),T;if(Ne.isFormData(r)&&(T=P.headers.get("content-type"))&&u.setContentType(T),P.body){const[I,A]=wG(y,mI(xG(l)));r=CG(P.body,EG,I,A)}}Ne.isString(d)||(d=d?"include":"omit");const w="credentials"in Request.prototype;h=new Request(t,{...f,signal:p,method:n.toUpperCase(),headers:u.normalize().toJSON(),body:r,duplex:"half",credentials:w?d:void 0});let x=await fetch(h);const S=IN&&(c==="stream"||c==="response");if(IN&&(s||S&&m)){const P={};["status","statusText","headers"].forEach(k=>{P[k]=x[k]});const T=Ne.toFiniteNumber(x.headers.get("content-length")),[I,A]=s&&wG(T,mI(xG(s),!0))||[];x=new Response(CG(x.body,EG,I,()=>{A&&A(),m&&m()}),P)}c=c||"text";let E=await yI[Ne.findKey(yI,c)||"text"](x,e);return!S&&m&&m(),await new Promise((P,T)=>{Ire(P,T,{data:E,headers:Da.from(x.headers),status:x.status,statusText:x.statusText,config:e,request:h})})}catch(w){throw m&&m(),w&&w.name==="TypeError"&&/fetch/i.test(w.message)?Object.assign(new fn("Network Error",fn.ERR_NETWORK,e,h),{cause:w.cause||w}):fn.from(w,w&&w.code,e,h)}}),ON={http:rFe,xhr:$Fe,fetch:VFe};Ne.forEach(ON,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const PG=e=>`- ${e}`,HFe=e=>Ne.isFunction(e)||e===null||e===!1,Rre={getAdapter:e=>{e=Ne.isArray(e)?e:[e];const{length:t}=e;let n,r;const o={};for(let i=0;i`adapter ${s} `+(l===!1?"is not supported by the environment":"is not available in the build"));let a=t?i.length>1?`since : +`+i.map(PG).join(` +`):" "+PG(i[0]):"as no adapter specified";throw new fn("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return r},adapters:ON};function vD(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Db(null,e)}function TG(e){return vD(e),e.headers=Da.from(e.headers),e.data=yD.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Rre.getAdapter(e.adapter||QC.adapter)(e).then(function(r){return vD(e),r.data=yD.call(e,e.transformResponse,r),r.headers=Da.from(r.headers),r},function(r){return Tre(r)||(vD(e),r&&r.response&&(r.response.data=yD.call(e,e.transformResponse,r.response),r.response.headers=Da.from(r.response.headers))),Promise.reject(r)})}const $re="1.7.7",fz={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{fz[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const IG={};fz.transitional=function(t,n,r){function o(i,a){return"[Axios v"+$re+"] Transitional option '"+i+"'"+a+(r?". "+r:"")}return(i,a,s)=>{if(t===!1)throw new fn(o(a," has been removed"+(n?" in "+n:"")),fn.ERR_DEPRECATED);return n&&!IG[a]&&(IG[a]=!0,console.warn(o(a," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(i,a,s):!0}};function UFe(e,t,n){if(typeof e!="object")throw new fn("options must be an object",fn.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const i=r[o],a=t[i];if(a){const s=e[i],l=s===void 0||a(s,i,e);if(l!==!0)throw new fn("option "+i+" must be "+l,fn.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new fn("Unknown option "+i,fn.ERR_BAD_OPTION)}}const AN={assertOptions:UFe,validators:fz},tf=AN.validators;class tg{constructor(t){this.defaults=t,this.interceptors={request:new vG,response:new vG}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let o;Error.captureStackTrace?Error.captureStackTrace(o={}):o=new Error;const i=o.stack?o.stack.replace(/^.+\n/,""):"";try{r.stack?i&&!String(r.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(r.stack+=` +`+i):r.stack=i}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=vg(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:i}=n;r!==void 0&&AN.assertOptions(r,{silentJSONParsing:tf.transitional(tf.boolean),forcedJSONParsing:tf.transitional(tf.boolean),clarifyTimeoutError:tf.transitional(tf.boolean)},!1),o!=null&&(Ne.isFunction(o)?n.paramsSerializer={serialize:o}:AN.assertOptions(o,{encode:tf.function,serialize:tf.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let a=i&&Ne.merge(i.common,i[n.method]);i&&Ne.forEach(["delete","get","head","post","put","patch","common"],h=>{delete i[h]}),n.headers=Da.concat(a,i);const s=[];let l=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(n)===!1||(l=l&&m.synchronous,s.unshift(m.fulfilled,m.rejected))});const c=[];this.interceptors.response.forEach(function(m){c.push(m.fulfilled,m.rejected)});let u,d=0,f;if(!l){const h=[TG.bind(this),void 0];for(h.unshift.apply(h,s),h.push.apply(h,c),f=h.length,u=Promise.resolve(n);d{if(!r._listeners)return;let i=r._listeners.length;for(;i-- >0;)r._listeners[i](o);r._listeners=null}),this.promise.then=o=>{let i;const a=new Promise(s=>{r.subscribe(s),i=s}).then(o);return a.cancel=function(){r.unsubscribe(i)},a},t(function(i,a,s){r.reason||(r.reason=new Db(i,a,s),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new pz(function(o){t=o}),cancel:t}}}function WFe(e){return function(n){return e.apply(null,n)}}function GFe(e){return Ne.isObject(e)&&e.isAxiosError===!0}const kN={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(kN).forEach(([e,t])=>{kN[t]=e});function Dre(e){const t=new tg(e),n=dre(tg.prototype.request,t);return Ne.extend(n,tg.prototype,t,{allOwnKeys:!0}),Ne.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return Dre(vg(e,o))},n}const tt=Dre(QC);tt.Axios=tg;tt.CanceledError=Db;tt.CancelToken=pz;tt.isCancel=Tre;tt.VERSION=$re;tt.toFormData=Ck;tt.AxiosError=fn;tt.Cancel=tt.CanceledError;tt.all=function(t){return Promise.all(t)};tt.spread=WFe;tt.isAxiosError=GFe;tt.mergeConfig=vg;tt.AxiosHeaders=Da;tt.formToJSON=e=>Pre(Ne.isHTMLForm(e)?new FormData(e):e);tt.getAdapter=Rre.getAdapter;tt.HttpStatusCode=kN;tt.default=tt;const zy={protein:4,carbohydrates:4,fat:9};class cs{constructor(t){mt(this,"bodyWeight",0);mt(this,"energy",0);mt(this,"protein",0);mt(this,"carbohydrates",0);mt(this,"carbohydratesSugar",0);mt(this,"fat",0);mt(this,"fatSaturated",0);mt(this,"fiber",0);mt(this,"sodium",0);this.energy=(t==null?void 0:t.energy)??0,this.protein=(t==null?void 0:t.protein)??0,this.carbohydrates=(t==null?void 0:t.carbohydrates)??0,this.carbohydratesSugar=(t==null?void 0:t.carbohydratesSugar)??0,this.fat=(t==null?void 0:t.fat)??0,this.fatSaturated=(t==null?void 0:t.fatSaturated)??0,this.fiber=(t==null?void 0:t.fiber)??0,this.sodium=(t==null?void 0:t.sodium)??0,this.bodyWeight=(t==null?void 0:t.bodyWeight)??0}get energyKj(){return this.energy*4.184}get isEmpty(){return this.energy===0&&this.protein===0&&this.carbohydrates===0&&this.fat===0}get percent(){return{protein:this.protein>0?this.protein*zy.protein/this.energy*100:0,carbohydrates:this.carbohydrates>0?this.carbohydrates*zy.carbohydrates/this.energy*100:0,fat:this.fat>0?this.fat*zy.fat/this.energy*100:0}}get perBodyKg(){return{protein:this.bodyWeight>0?this.protein/this.bodyWeight:0,carbohydrates:this.bodyWeight>0?this.carbohydrates/this.bodyWeight:0,fat:this.bodyWeight>0?this.fat/this.bodyWeight:0}}static fromIngredient(t,n,r){const o=new cs,i=r===null?n:n*r.amount*r.grams;return o.energy=t.energy*i/100,o.protein=t.protein*i/100,o.carbohydrates=t.carbohydrates*i/100,o.carbohydratesSugar=t.carbohydratesSugar?t.carbohydratesSugar*i/100:0,o.fat=t.fat*i/100,o.fatSaturated=t.fatSaturated?t.fatSaturated*i/100:0,o.fiber=t.fiber?t.fiber*i/100:0,o.sodium=t.sodium?t.sodium*i/100:0,o}add(t){return this.energy+=t.energy,this.protein+=t.protein,this.carbohydrates+=t.carbohydrates,this.carbohydratesSugar+=t.carbohydratesSugar,this.fat+=t.fat,this.fatSaturated+=t.fatSaturated,this.fiber+=t.fiber,this.sodium+=t.sodium,this}toString(){return`e: ${this.energy}, p: ${this.protein}, c: ${this.carbohydrates}, cS: ${this.carbohydratesSugar}, f: ${this.fat}, fS: ${this.fatSaturated}, fi: ${this.fiber}, s: ${this.sodium}`}equals(t){return this.energy===t.energy&&this.protein===t.protein&&this.carbohydrates===t.carbohydrates&&this.carbohydratesSugar===t.carbohydratesSugar&&this.fat===t.fat&&this.fatSaturated===t.fatSaturated&&this.fiber===t.fiber&&this.sodium===t.sodium}}function yi(e){return e.toISOString().split("T")[0]}function Kf(e,t){return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()}function vI(e,t){return e==null?null:e.toLocaleTimeString(t?[t]:[],{hour:"2-digit",minute:"2-digit"})}function qFe(e){if(e==null)return null;const[t,n]=e.toTimeString().split(":");return`${t}:${n}`}function KFe(e){if(e==null)return null;const[t,n]=e.split(":"),r=new Date;return r.setHours(parseInt(t)),r.setMinutes(parseInt(n)),r}function YFe(e,t=new Date){const r={lastWeek:()=>t.setDate(t.getDate()-7),lastMonth:()=>t.setMonth(t.getMonth()-1),lastHalfYear:()=>t.setMonth(t.getMonth()-6),lastYear:()=>t.setFullYear(t.getFullYear()-1),"":void 0}[e];if(r)r();else return;return yi(t)}class _re{constructor(t,n,r,o){mt(this,"items",[]);mt(this,"diaryEntries",[]);this.id=t,this.order=n,this.time=r,this.name=o}get timeHHMMLocale(){return vI(this.time)}get displayName(){return this.name?this.name:this.timeHHMMLocale}get diaryEntriesToday(){return this.diaryEntries.filter(t=>Kf(t.datetime,new Date))}get plannedNutritionalValues(){const t=new cs;for(const n of this.items)t.add(n.nutritionalValues);return t}get loggedNutritionalValuesToday(){const t=new cs;for(const n of this.diaryEntriesToday)t.add(n.nutritionalValues);return t}}class hz{fromJson(t){return new _re(t.id,t.order,KFe(t.time),t.name)}toJson(t){return{name:t.name,order:t.order,time:vI(t.time)}}}const dT=-1;class QFe{constructor(t,n,r,o=!1,i=null,a=null,s=null,l=null,c=null,u=null,d=null){mt(this,"meals",[]);mt(this,"diaryEntries",[]);this.id=t,this.creationDate=n,this.description=r,this.onlyLogging=o,this.goalEnergy=i,this.goalProtein=a,this.goalCarbohydrates=s,this.goalFiber=l,this.goalSodium=c,this.goalFat=u,this.goalFatsSaturated=d}get hasAnyGoals(){return this.goalEnergy!==null||this.goalProtein!==null||this.goalCarbohydrates!==null||this.goalFat!==null}get hasAnyAdvancedGoals(){return this.goalFiber!==null||this.goalSodium!==null||this.goalFatsSaturated!==null}get hasAnyPlanned(){return this.hasAnyGoals||this.plannedNutritionalValues.energy>0}get plannedNutritionalValues(){if(this.hasAnyGoals)return new cs({energy:this.goalEnergy,carbohydrates:this.goalCarbohydrates,protein:this.goalProtein,fat:this.goalFat});const t=new cs;for(const n of this.meals)t.add(n.plannedNutritionalValues);return t}get loggedNutritionalValues7DayAvg(){const t=new Date,n=new Date(t.getTime()-7*24*60*60*1e3),r=this.diaryEntries.filter(o=>o.datetime>=n);return this.getAverageNutritionalValuesFromDiaryEntries(r)}get loggedNutritionalValuesToday(){const t=this.diaryEntries.filter(n=>Kf(n.datetime,new Date));return this.getNutritionalValuesFromDiaryEntries(t)}get groupDiaryEntries(){return this.diaryEntries.reduce((t,n)=>{const r=n.datetime.toISOString().split("T")[0],o=t.get(r)||{entries:[],nutritionalValues:new cs};return o.entries.push(n),o.nutritionalValues.add(n.nutritionalValues),t.set(r,o),t},new Map)}get percentageValuesLoggedToday(){return new cs({protein:this.loggedNutritionalValuesToday.protein/this.plannedNutritionalValues.protein*100,carbohydrates:this.loggedNutritionalValuesToday.carbohydrates/this.plannedNutritionalValues.carbohydrates*100,fat:this.loggedNutritionalValuesToday.fat/this.plannedNutritionalValues.fat*100})}pseudoMealOthers(t){const n=new _re(dT,-1,null,t);return n.diaryEntries=this.diaryEntries.filter(r=>r.mealId===null),n}loggedNutritionalValuesDate(t){return this.getNutritionalValuesFromDiaryEntries(this.loggedEntriesDate(t))}loggedEntriesDate(t){return this.diaryEntries.filter(n=>Kf(n.datetime,t))}getAverageNutritionalValuesFromDiaryEntries(t){const n=t.length,r=this.getNutritionalValuesFromDiaryEntries(t);return n===0||(r.energy=r.energy/n,r.protein=r.protein/n,r.carbohydrates=r.carbohydrates/n,r.carbohydratesSugar=r.carbohydratesSugar/n,r.fat=r.fat/n,r.fatSaturated=r.fatSaturated/n,r.fiber=r.fiber/n,r.sodium=r.sodium/n),r}getNutritionalValuesFromDiaryEntries(t){return t.reduce((n,r)=>n.add(r.nutritionalValues),new cs)}}class Pk{fromJson(t){return new QFe(t.id,new Date(t.creation_date),t.description,t.only_logging,t.goal_energy,t.goal_protein,t.goal_carbohydrates,t.goal_fiber,t.goal_fat)}toJson(t){return{description:t.description}}}class XFe{constructor(t,n,r,o,i,a,s,l){this.id=t,this.uuid=n,this.url=r,this.created=o,this.lastUpdate=i,this.size=a,this.width=s,this.height=l}}class JFe{fromJson(t){return new XFe(t.id,t.uuid,t.image,new Date(t.created),new Date(t.last_update),t.size,t.width,t.height)}}class ZFe{constructor(t,n,r,o,i,a,s,l,c,u,d,f,p=null){this.id=t,this.uuid=n,this.code=r,this.name=o,this.energy=i,this.protein=a,this.carbohydrates=s,this.carbohydratesSugar=l,this.fat=c,this.fatSaturated=u,this.fiber=d,this.sodium=f,this.image=p}}class eje{fromJson(t){return new ZFe(t.id,t.uuid,t.code,t.name,t.energy,parseFloat(t.protein),parseFloat(t.carbohydrates),t.carbohydrates_sugar===null?null:parseFloat(t.carbohydrates_sugar),parseFloat(t.fat),t.fat_saturated===null?null:parseFloat(t.fat_saturated),t.fiber===null?null:parseFloat(t.fiber),t.sodium===null?null:parseFloat(t.sodium),t.image===null?null:new JFe().fromJson(t.image))}}var gz={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1,VITE_API_SERVER:""};const tje="/static/react",mz="",nje=gz.TIME_ZONE,rje=gz.MIN_ACCOUNT_AGE_TO_TRUST,oje="",ije=gz.VITE_API_KEY,Av=2,aje="en",sje=rje||21,OG=2,AG=16,lje=12,cje=1,Nre=1,Lre=2,Tk="r",uje="exercises",dje="variations",fje="detail",pje="languages",hje="categories",gje="equipment",mje="muscles",yje="permission",vje="profile",_b="measurements",Nb="measurements-categories";var Ct=(e=>(e.ROUTINE_OVERVIEW="routine-overview",e.ROUTINE_DETAIL="routine-detail",e.ROUTINE_LOGS="routine-logs",e.ROUTINE_STATS="routine-stats",e.ROUTINES_ACTIVE="routines-active",e.ROUTINES_SHALLOW="routines-shallow",e.NUTRITIONAL_PLANS="nutritional-plans",e.NUTRITIONAL_PLAN="nutritional-plan",e.NUTRITIONAL_PLAN_LAST="nutritional-plan-last",e.INGREDIENT="ingredient",e.BODY_WEIGHT="body-weight",e.ROUTINE_WEIGHT_UNITS="weight-units",e.ROUTINE_REP_UNITS="rep-units",e))(Ct||{}),Nt=(e=>(e.MEAL="meal",e.MEAL_ITEM="mealitem",e.NUTRITIONAL_DIARY="nutritiondiary",e.INGREDIENT_PATH="ingredientinfo",e.INGREDIENT_SEARCH_PATH="ingredient/search",e.INGREDIENT_WEIGHT_UNIT="ingredientweightunit",e.ROUTINE="routine",e.WEIGHT_CONFIG="weight-config",e.MAX_WEIGHT_CONFIG="max-weight-config",e.REPS_CONFIG="reps-config",e.MAX_REPS_CONFIG="max-reps-config",e.RIR_CONFIG="rir-config",e.NR_OF_SETS_CONFIG="sets-config",e.REST_CONFIG="rest-config",e.MAX_REST_CONFIG="max-rest-config",e.DAY="day",e.SLOT="slot",e.SLOT_ENTRY="slot-entry",e))(Nt||{});const Fre="999",bje=["#2a4c7d","#5b5291","#8e5298","#bf5092","#e7537e","#ff6461","#ff813d","#ffa600"],wje=["#2a4c7d","#825298","#d45089","#ff6a59","#ffa600"],xje=["#2a4c7d","#d45089","#ffa600"],kG={pageSizeOptions:[5,10,25,50,100],pageSize:10},Sje=nje||"Europe/Berlin",kv="en",yz=3e3,Cje=500;var jre={exports:{}};(function(e){(function(t){let n;function r(u,d){const f=u.charCodeAt(d);if(isNaN(f))throw new RangeError("Index "+d+' out of range for string "'+u+'"; please open an issue at https://github.com/Trott/slug/issues/new');if(f<55296||f>57343)return[u.charAt(d),d];if(f>=55296&&f<=56319){if(u.length<=d+1)return[" ",d];const h=u.charCodeAt(d+1);return h<56320||h>57343?[" ",d]:[u.charAt(d)+u.charAt(d+1),d+1]}if(d===0)return[" ",d];const p=u.charCodeAt(d-1);if(p<55296||p>56319)return[" ",d];throw new Error('String "'+u+'" reaches code believed to be unreachable; please open an issue at https://github.com/Trott/slug/issues/new')}typeof window<"u"?window.btoa?n=function(u){return btoa(unescape(encodeURIComponent(u)))}:n=function(u){const d=unescape(encodeURIComponent(u+""));let f="";for(let p,h,m=0,y="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";d.charAt(m|0)||(y="=",m%1);f+=y.charAt(63&p>>8-m%1*8)){if(h=d.charCodeAt(m+=3/4),h>255)throw new Error("'btoa' failed: The string to be encoded contains characters outside of the Latin1 range.");p=p<<8|h}return f}:n=function(u){return Buffer.from(u).toString("base64")};function o(u,d){let f=s(u,d);if((d&&d.fallback!==void 0?d.fallback:o.defaults.fallback)===!0&&f===""){let h="";for(let m=0;m1?f[d[h]]=u[d[h]]:p[d[h]]=u[d[h]];Object.assign(o.charmap,p),Object.assign(o.multicharmap,f)},o.setLocale=function(u){a=i[u]||{}},e.exports?e.exports=o:t.slug=o})(ea)})(jre);var Eje=jre.exports;const Bre=Bn(Eje);function ft(e,t){t=t||{};const r=[t.server||oje,"api","v2",e];if(t.id&&r.push(t.id.toString()),t.objectMethod&&r.push(t.objectMethod),r.push(""),t.query){const o=[];for(const i in t.query)t.query.hasOwnProperty(i)&&o.push(`${encodeURIComponent(i)}=${encodeURIComponent(t.query[i])}`);r.pop(),r.push(`?${o.join("&")}`)}return r.join("/")}var Tn=(e=>(e[e.DASHBOARD=0]="DASHBOARD",e[e.ROUTINE_OVERVIEW=1]="ROUTINE_OVERVIEW",e[e.ROUTINE_DETAIL=2]="ROUTINE_DETAIL",e[e.ROUTINE_EDIT=3]="ROUTINE_EDIT",e[e.ROUTINE_DETAIL_TABLE=4]="ROUTINE_DETAIL_TABLE",e[e.ROUTINE_EDIT_PROGRESSION=5]="ROUTINE_EDIT_PROGRESSION",e[e.ROUTINE_ADD=6]="ROUTINE_ADD",e[e.ROUTINE_DELETE=7]="ROUTINE_DELETE",e[e.ROUTINE_ADD_LOG=8]="ROUTINE_ADD_LOG",e[e.ROUTINE_EDIT_LOG=9]="ROUTINE_EDIT_LOG",e[e.ROUTINE_DELETE_LOG=10]="ROUTINE_DELETE_LOG",e[e.ROUTINE_EDIT_DAY=11]="ROUTINE_EDIT_DAY",e[e.ROUTINE_ADD_DAY=12]="ROUTINE_ADD_DAY",e[e.ROUTINE_DELETE_DAY=13]="ROUTINE_DELETE_DAY",e[e.ROUTINE_ADD_SET=14]="ROUTINE_ADD_SET",e[e.ROUTINE_EDIT_SET=15]="ROUTINE_EDIT_SET",e[e.ROUTINE_DELETE_SET=16]="ROUTINE_DELETE_SET",e[e.EXERCISE_DETAIL=17]="EXERCISE_DETAIL",e[e.EXERCISE_OVERVIEW=18]="EXERCISE_OVERVIEW",e[e.EXERCISE_CONTRIBUTE=19]="EXERCISE_CONTRIBUTE",e[e.WEIGHT_OVERVIEW=20]="WEIGHT_OVERVIEW",e[e.WEIGHT_ADD=21]="WEIGHT_ADD",e[e.MEASUREMENT_OVERVIEW=22]="MEASUREMENT_OVERVIEW",e[e.MEASUREMENT_DETAIL=23]="MEASUREMENT_DETAIL",e[e.NUTRITION_OVERVIEW=24]="NUTRITION_OVERVIEW",e[e.NUTRITION_DETAIL=25]="NUTRITION_DETAIL",e[e.NUTRITION_PLAN_PDF=26]="NUTRITION_PLAN_PDF",e[e.NUTRITION_PLAN_COPY=27]="NUTRITION_PLAN_COPY",e[e.NUTRITION_DIARY=28]="NUTRITION_DIARY",e[e.INGREDIENT_DETAIL=29]="INGREDIENT_DETAIL",e[e.CALENDAR=30]="CALENDAR",e))(Tn||{});function Mn(e,t,n){t=t||"en-us";const r=t.split("-")[0];switch(e){case 1:return`/${r}/routine/overview`;case 2:return`/${r}/routine/${n.id}/view`;case 4:return`/${r}/routine/${n.id}/table`;case 3:return`/${r}/routine/${n.id}/edit`;case 5:return`/${r}/routine/${n.id}/edit/progression/${n.id2}`;case 6:return`/${r}/routine/add`;case 12:return`/${r}/routine/day/${n.id}/add`;case 8:return`/${r}/routine/day/${n.id}/log/add`;case 9:return`/${r}/routine/log/${n.id}/edit`;case 10:return`/${r}/routine/log/${n.id}/delete`;case 11:return`/${r}/routine/day/${n.id}/edit`;case 13:return`/${r}/routine/day/${n.id}/delete`;case 14:return`/${r}/routine/set/${n.id}/add`;case 15:return`/${r}/routine/set/${n.id}/edit`;case 16:return`/${r}/routine/set/${n.id}/delete`;case 30:return`/${r}/routine/calendar`;case 19:return`/${r}/exercise/contribute`;case 17:return n.slug?`/${r}/exercise/${n.id}/view-base/${Bre(n.slug)}`:`/${r}/exercise/${n.id}/view-base`;case 18:return`/${r}/exercise/overview`;case 20:return`/${r}/weight/overview`;case 21:return`/${r}/weight/add`;case 22:return`/${r}/measurement/overview`;case 23:return`/${r}/measurement/category/${n.id}`;case 24:return`/${r}/nutrition/overview`;case 25:return`/${r}/nutrition/${n.id}/view`;case 28:return`/${r}/nutrition/${n.id}/${n.date}`;case 26:return`/${r}/nutrition/${n.id}/pdf`;case 27:return`/${r}/nutrition/${n.id}/copy`;case 29:return`/${r}/nutrition/ingredient/${n.id}/view`;case 0:default:return"/"}}function Pje(e){let t=null;if(document.cookie&&document.cookie!==""){const n=document.cookie.split(";");for(let r=0;r{if(e.length===0)return[];const t=ft(Nt.INGREDIENT_PATH,{query:{id__in:e.join(",")}}),n=new eje,r=[];for await(const o of XC(t,ht()))for(const i of o)r.push(n.fromJson(i));return r},Tje=async(e,t,n=!0)=>{const r=[t];t!==kv&&n&&r.push(kv);const o=ft(Nt.INGREDIENT_SEARCH_PATH,{query:{term:e,language:r.join(",")}}),{data:i}=await tt.get(o);return i.suggestions};class Ije{constructor(t,n,r,o,i,a,s){mt(this,"ingredient",null);mt(this,"weightUnit",null);this.id=t,this.ingredientId=n,this.weightUnitId=r,this.amount=o,this.order=i,a&&(this.ingredient=a),s&&(this.weightUnit=s)}get amountString(){var t;return this.amount.toFixed().toString()+(this.weightUnitId!==null?` ${(t=this.weightUnit)==null?void 0:t.name}`:"g")}get nutritionalValues(){return this.ingredient?cs.fromIngredient(this.ingredient,this.amount,this.weightUnit):new cs}}class vz{fromJson(t){return new Ije(t.id,t.ingredient,t.weight_unit,parseFloat(t.amount),t.order)}toJson(t){return{ingredient:t.ingredientId,weight_unit:t.weightUnitId,amount:t.amount.toString(),order:t.order}}}class Oje{constructor(t,n,r,o=""){this.id=t,this.amount=n,this.grams=r,this.name=o}}class Aje{fromJson(t){return new Oje(t.id,parseFloat(t.amount),t.gram)}}const Vre=async e=>{if(e===null)return null;const{data:t}=await tt.get(ft(Nt.INGREDIENT_WEIGHT_UNIT,{id:e}),{headers:ht()});return new Aje().fromJson(t)},kje=async e=>{const t=await tt.post(ft(Nt.MEAL),e,{headers:ht()});return new hz().fromJson(t.data)},Mje=async e=>{const t=await tt.patch(ft(Nt.MEAL,{id:e.id}),e,{headers:ht()});return new hz().fromJson(t.data)},Rje=async e=>{await tt.delete(ft(Nt.MEAL,{id:e}),{headers:ht()})},$je=async e=>{let t=[];const n=new hz,r=new vz,{data:o}=await tt.get(ft(Nt.MEAL,{query:{plan:e}}),{headers:ht()}),i=o.results.map(a=>n.fromJson(a));for(const a of i){t=[];const{data:s}=await tt.get(ft(Nt.MEAL_ITEM,{query:{meal:a.id}}),{headers:ht()}),l=s.results.map(u=>r.fromJson(u));for(const u of l)t.push(u.ingredientId);const c=await zre(t);for(const u of l)u.weightUnit=await Vre(u.weightUnitId),u.ingredient=c.find(d=>d.id===u.ingredientId);a.items=l}return i};class Dje{constructor(t,n,r,o,i,a,s,l,c){mt(this,"ingredient",null);mt(this,"weightUnit",null);this.id=t,this.planId=n,this.mealId=r,this.ingredientId=o,this.weightUnitId=i,this.amount=a,this.datetime=s,l&&(this.ingredient=l),c&&(this.weightUnit=c)}get amountString(){var t;return this.amount.toFixed().toString()+(this.weightUnitId!==null?` ${(t=this.weightUnit)==null?void 0:t.name}`:"g")}get nutritionalValues(){return this.ingredient?cs.fromIngredient(this.ingredient,this.amount,this.weightUnit):(console.log("Diary entry has no ingredient, returning empty NutritionalValues object"),new cs)}}class bz{fromJson(t){return new Dje(t.id,t.plan,t.meal,t.ingredient,t.weight_unit,parseFloat(t.amount),new Date(t.datetime))}toJson(t){return{plan:t.planId,meal:t.mealId,ingredient:t.ingredientId,weight_unit:t.weightUnitId,amount:t.amount.toString(),datetime:t.datetime.toISOString()}}}const _je=async(e,t)=>{const n=new bz,r={plan:e,limit:Fre};t&&(r.datetime__date=yi(t));const o=ft(Nt.NUTRITIONAL_DIARY,{query:r}),i=[];for await(const a of XC(o,ht()))for(const s of a){let l=n.fromJson(s);l.weightUnit=await Vre(l.weightUnitId),i.push(l)}return i},Hre=async e=>{const t=await tt.post(ft(Nt.NUTRITIONAL_DIARY),e,{headers:ht()});return new bz().fromJson(t.data)},Nje=async e=>{const t=await tt.patch(ft(Nt.NUTRITIONAL_DIARY,{id:e.id}),e,{headers:ht()});return new bz().fromJson(t.data)},Lb="nutritionplan",Lje=async()=>{const{data:e}=await tt.get(ft(Lb),{headers:ht()}),t=new Pk;return e.results.map(n=>t.fromJson(n))},Fje=async()=>{const{data:e}=await tt.get(ft(Lb,{query:{limit:"1"}}),{headers:ht()});return e.count===0?null:await wz(e.results[0].id)},wz=async(e,t)=>{if(e===null)return null;const{data:n}=await tt.get(ft(Lb,{id:e}),{headers:ht()}),r=[],i=new Pk().fromJson(n),a=await Promise.all([$je(e),_je(e,t)]);i.meals=a[0],i.diaryEntries=a[1],i.diaryEntries.forEach(l=>{r.includes(l.ingredientId)||r.push(l.ingredientId)});const s=await zre(r);return i.diaryEntries.forEach(l=>{l.ingredient=s.find(c=>c.id===l.ingredientId)}),i.meals.forEach(l=>{l.diaryEntries=i.diaryEntries.filter(c=>c.mealId===l.id)}),i},jje=async e=>{const t=await tt.post(ft(Lb),e,{headers:ht()});return new Pk().fromJson(t.data)},Bje=async e=>{const t=await tt.patch(ft(Lb,{id:e.id}),e,{headers:ht()});return new Pk().fromJson(t.data)},zje=async e=>{await tt.delete(ft(Lb,{id:e}),{headers:ht()})};function Vje(){return ho({queryKey:[Ct.NUTRITIONAL_PLANS],queryFn:()=>Lje()})}function Hje(){return ho({queryKey:[Ct.NUTRITIONAL_PLAN,"last"],queryFn:()=>Fje()})}function Uje(e){return ho({queryKey:[Ct.NUTRITIONAL_PLAN,e],queryFn:()=>wz(e)})}function Wje(e,t,n=!0){return ho({queryKey:[Ct.NUTRITIONAL_PLAN,e,t],queryFn:()=>wz(e,new Date(t)),enabled:n})}const Gje=()=>{const e=Lt();return jt({mutationFn:t=>jje(t),onSuccess:()=>{e.invalidateQueries({queryKey:[Ct.NUTRITIONAL_PLANS]}),e.invalidateQueries({queryKey:[Ct.NUTRITIONAL_PLAN]})}})},qje=e=>{const t=Lt();return jt({mutationFn:n=>zje(n),onSuccess:()=>{t.invalidateQueries({queryKey:[Ct.NUTRITIONAL_PLANS]}),t.invalidateQueries({queryKey:[Ct.NUTRITIONAL_PLAN,e]})}})},Kje=e=>{const t=Lt();return jt({mutationFn:n=>Bje(n),onSuccess:()=>{t.invalidateQueries({queryKey:[Ct.NUTRITIONAL_PLAN,e]}),t.invalidateQueries({queryKey:[Ct.NUTRITIONAL_PLANS]})}})},Yje=e=>{const t=Lt();return jt({mutationFn:n=>Hre(n),onSuccess:()=>t.invalidateQueries({queryKey:[Ct.NUTRITIONAL_PLAN,e]})})},Ure=e=>{const t=Lt();return jt({mutationFn:n=>Promise.all(n.map(r=>Hre(r))),onSuccess:()=>t.invalidateQueries({queryKey:[Ct.NUTRITIONAL_PLAN,e]})})},Qje=e=>{const t=Lt();return jt({mutationFn:n=>Nje(n),onSuccess:()=>t.invalidateQueries({queryKey:[Ct.NUTRITIONAL_PLAN,e]})})},Xje=e=>{const t=Lt();return jt({mutationFn:n=>kje(n),onSuccess:()=>{t.invalidateQueries({queryKey:[Ct.NUTRITIONAL_PLAN,e]})}})},Jje=e=>{const t=Lt();return jt({mutationFn:n=>Rje(n),onSuccess:()=>{t.invalidateQueries({queryKey:[Ct.NUTRITIONAL_PLAN,e]})}})},Zje=e=>{const t=Lt();return jt({mutationFn:n=>Mje(n),onSuccess:()=>{t.invalidateQueries({queryKey:[Ct.NUTRITIONAL_PLAN,e]})}})},eBe=async e=>{const t=await tt.post(ft(Nt.MEAL_ITEM),e,{headers:ht()});return new vz().fromJson(t.data)},tBe=async e=>{const t=await tt.patch(ft(Nt.MEAL_ITEM,{id:e.id}),e,{headers:ht()});return new vz().fromJson(t.data)},nBe=async e=>{await tt.delete(ft(Nt.MEAL_ITEM,{id:e}),{headers:ht()})},rBe=e=>{const t=Lt();return jt({mutationFn:n=>eBe(n),onSuccess:()=>{t.invalidateQueries({queryKey:[Ct.NUTRITIONAL_PLAN,e]})}})},oBe=e=>{const t=Lt();return jt({mutationFn:n=>tBe(n),onSuccess:()=>{t.invalidateQueries({queryKey:[Ct.NUTRITIONAL_PLAN,e]})}})},iBe=e=>{const t=Lt();return jt({mutationFn:n=>nBe(n),onSuccess:()=>{t.invalidateQueries({queryKey:[Ct.NUTRITIONAL_PLAN,e]})}})};class Wre{constructor(t,n,r){this.date=t,this.weight=n,this.id=r}}class xz{fromJson(t){return new Wre(new Date(t.date),parseFloat(t.weight),t.id)}toJson(t){return{id:t.id,date:yi(t.date),weight:t.weight}}}const Ik="weightentry",aBe=async(e="")=>{const t=YFe(e),n=ft(Ik,{query:{ordering:"-date",limit:900,...t&&{date__gte:t}}}),{data:r}=await tt.get(n,{headers:ht()}),o=new xz;return r.results.map(i=>o.fromJson(i))},sBe=async e=>(await tt.delete(ft(Ik,{id:e}),{headers:ht()})).status,lBe=async e=>{const t=new xz,n=await tt.patch(ft(Ik,{id:e.id}),t.toJson(e),{headers:ht()});return t.fromJson(n)},cBe=async e=>{const t=new xz,n=await tt.post(ft(Ik),t.toJson(e),{headers:ht()});return t.fromJson(n.data)},uBe=22;function dBe(e,t=uBe){return e.length>t?e.slice(0,t)+"…":e}function fBe(e){return e.toLowerCase().replace(/\s/g,"_").replace("(","_").replace(")","_").replace("-","_")}function Fa(e){return`server.${fBe(e)}`}class pBe{constructor(t,n,r,o){this.id=t,this.name=n,this.nameEn=r,this.isFront=o}getName(t){return this.nameEn?`${this.name} (${t(Fa(this.nameEn))})`:this.name}}class Gre{fromJson(t){return new pBe(t.id,t.name,t.name_en,t.is_front)}toJson(t){return{}}}const hBe="muscle",gBe=async()=>{const e=ft(hBe),{data:t}=await tt.get(e,{headers:ht()}),n=new Gre;return t.results.map(r=>n.fromJson(r))};class mBe{constructor(t,n){this.id=t,this.name=n}}class qre{fromJson(t){return new mBe(t.id,t.name)}toJson(t){return{id:t.id,name:t.name}}}const yBe="equipment",vBe=async()=>{const e=ft(yBe),{data:t}=await tt.get(e,{headers:ht()}),n=new qre;return t.results.map(r=>n.fromJson(r))};class bBe{constructor(t,n){this.id=t,this.name=n}}class Kre{fromJson(t){return new bBe(t.id,t.name)}toJson(t){return{id:t.id,name:t.name}}}const wBe="exercisecategory",xBe=async()=>{const e=ft(wBe),{data:t}=await tt.get(e,{headers:ht()}),n=new Kre;return t.results.map(r=>n.fromJson(r))};var Ju=(e=>(e[e.LINE_ART=1]="LINE_ART",e[e.THREE_D=2]="THREE_D",e[e.LOW_POLY=3]="LOW_POLY",e[e.PHOTO=4]="PHOTO",e[e.OTHER=5]="OTHER",e))(Ju||{});class SBe{constructor(t,n,r,o){this.id=t,this.uuid=n,this.url=r,this.isMain=o}}class MN{fromJson(t){return new SBe(t.id,t.uuid,t.image,t.is_main)}toJson(t){return{id:t.id,image:t.url,is_front:t.isMain}}}class CBe{constructor(t,n,r){this.id=t,this.uuid=n,this.alias=r}}class Yre{fromJson(t){return new CBe(t.id,t.uuid,t.alias)}toJson(t){return{id:t.id,name:t.alias}}}class RN{constructor(t,n,r){this.id=t,this.exercise=n,this.note=r}}class Qre{fromJson(t){return new RN(t.id,t.exercise,t.comment)}toJson(t){return{id:t.id,comment:t.note,exercise:t.exercise}}}class Xre{constructor(t,n,r,o,i,a,s,l){mt(this,"notes",[]);mt(this,"aliases",[]);mt(this,"authors",[]);this.id=t,this.uuid=n,this.name=r,this.description=o,this.language=i,a&&(this.notes=a),s&&(this.aliases=s),l&&(this.authors=l)}get nameLong(){return dBe(this.name)}get nameSlug(){return Bre(this.name)}}class Sz{fromJson(t){var n,r;return new Xre(t.id,t.uuid,t.name,t.description,t.language,(n=t.notes)==null?void 0:n.map(o=>new Qre().fromJson(o)),(r=t.aliases)==null?void 0:r.map(o=>new Yre().fromJson(o)),t.author_history)}toJson(t){return{id:t.id,uuid:t.uuid,name:t.name,description:t.description,language:t.language}}}class EBe{constructor(t,n,r,o){this.id=t,this.uuid=n,this.url=r,this.isMain=o}}class Jre{fromJson(t){return new EBe(t.id,t.uuid,t.video,t.is_main)}toJson(t){return{id:t.id,video:t.url}}}class PBe{constructor(t,n,r,o,i,a,s,l,c,u,d){mt(this,"translations",[]);mt(this,"videos",[]);mt(this,"authors",[]);this.id=t,this.uuid=n,this.category=r,this.equipment=o,this.muscles=i,this.musclesSecondary=a,this.images=s,this.variationId=l,c&&(this.translations=c),u&&(this.videos=u),d&&(this.authors=d)}getTranslation(t){const n=t!=null?t.id:Av;let r=this.translations.find(o=>o.language===n);return r||(r=this.translations.find(o=>o.language===Av)),r||this.translations[0]}get availableLanguages(){return this.translations.map(t=>t.language)}get mainImage(){return this.images.find(t=>t.isMain)}get sideImages(){return this.images.filter(t=>!t.isMain)}}class Zre{fromJson(t){const n=new Kre,r=new qre,o=new Gre,i=new MN,a=new Sz,s=new Jre,l=new PBe(t.id,t.uuid,n.fromJson(t.category),t.equipment.map(c=>r.fromJson(c)),t.muscles.map(c=>o.fromJson(c)),t.muscles_secondary.map(c=>o.fromJson(c)),t.images.map(c=>i.fromJson(c)),t.variations,t.translations.map(c=>a.fromJson(c)),t.videos.map(c=>s.fromJson(c)),t.author_history);if(l.translations.some(c=>c.language===Av)||console.info(`No english translation found for exercise base ${l.uuid}!`),l.translations.length===0)throw new Error(`No translations found for exercise base ${l.uuid}!`);return l}toJson(t){return{id:t.id,uuid:t.uuid,category:t.category.id,equipment:t.equipment.map(n=>n.id),muscles:t.muscles.map(n=>n.id),muscles_secondary:t.musclesSecondary.map(n=>n.id),images:t.images.map(n=>new MN().toJson(n))}}}const Cz="exercisebaseinfo",Ez="exercise-base";function eoe(e){const t=new Zre,n=[];for(const r of e.results)try{n.push(t.fromJson(r))}catch(o){console.error("An error happened, skipping base:",o)}return n}const TBe=async()=>{const e=ft(Cz,{query:{limit:900}}),t=await tt.get(e,{headers:ht()});return eoe(t.data)},Ok=async e=>{const t=new Zre,n=ft(Cz,{id:e}),r=await tt.get(n,{headers:ht()});return t.fromJson(r.data)},IBe=async e=>{if(!e)return[];const t=ft(Cz,{query:{variations:e}}),n=await tt.get(t,{headers:ht()});return eoe(n.data)},OBe=async(e,t,n,r,o,i)=>{const a=ft(Ez),s={category:e,equipment:t,muscles:n,muscles_secondary:r,variation_id:o,license_author:i};return(await tt.post(a,s,{headers:ht()})).data.id},Pz=async(e,t)=>{const n=ft(Ez,{id:e});return(await tt.patch(n,t,{headers:ht()})).status},MG=async(e,t)=>{const r=ft(Ez,t===void 0?{id:e}:{id:e,query:{replaced_by:t}});return(await tt.delete(r,{headers:ht()})).status},Tz="exercise-translation",ABe="exercise/search",kBe=async(e,t=aje,n=!0)=>{const r=[t];t!==kv&&n&&r.push(kv);const o=ft(ABe,{query:{term:e,language:r.join(",")}}),{data:i}=await tt.get(o);return i.suggestions},$N=async(e,t,n,r,o)=>{const i=ft(Tz),a={exercise_base:e,language:t,name:n,description:r,license_author:o},s=await tt.post(i,a,{headers:ht()});return new Sz().fromJson(s.data)},MBe=async(e,t,n,r,o)=>{const i=ft(Tz,{id:e}),a={exercise_base:t,language:n,name:r,description:o},s=await tt.patch(i,a,{headers:ht()});return new Sz().fromJson(s.data)},RBe=async e=>{const t=ft(Tz,{id:e});return(await tt.delete(t,{headers:ht()})).status};class toe{constructor(t,n,r){this.id=t,this.nameShort=n,this.nameLong=r}}class $Be{fromJson(t){return new toe(t.id,t.short_name,t.full_name)}toJson(t){return{}}}const DBe="language",_Be=async()=>{const e=ft(DBe),{data:t}=await tt.get(e,{headers:ht()}),n=new $Be;return t.results.map(r=>n.fromJson(r))},Fb=(e,t)=>{const n=e.split("-")[0],r=t.find(o=>o.nameShort===n);if(r)return r},noe="exerciseimage",roe=async e=>{const t=ft(noe),n=ht();n["Content-Type"]="multipart/form-data";const r=await tt.post(t,{exercise_base:e.exerciseId,image:e.image,license_title:e.imageData.title,license_object_url:e.imageData.objectUrl,license_author:e.imageData.author,license_author_url:e.imageData.authorUrl,license_derivative_source_url:e.imageData.derivativeSourceUrl,style:e.imageData.style},{headers:n});return new MN().fromJson(r.data)},NBe=async e=>{const t=ft(noe,{id:e}),n=ht();return(await tt.delete(t,{headers:n})).status},ooe="exercisealias",DN=async(e,t)=>{const n=ft(ooe),r=await tt.post(n,{exercise:e,alias:t},{headers:ht()});return new Yre().fromJson(r.data)},LBe=async e=>(await tt.delete(ft(ooe,{id:e}),{headers:ht()})).status,ioe="video",FBe=async(e,t,n)=>{const r=ft(ioe),o=ht();o["Content-Type"]="multipart/form-data";const i=await tt.post(r,{exercise_base:e,license_author:t,video:n},{headers:o});return new Jre().fromJson(i.data)},jBe=async e=>{const t=ft(ioe,{id:e}),n=ht();return(await tt.delete(t,{headers:n})).status};class BBe{constructor(t,n,r,o,i,a,s,l){this.id=t,this.slotEntryId=n,this.iteration=r,this.trigger=o,this.value=i,this.operation=a,this.step=s,this.needLogToApply=l}get replace(){return this.operation==="r"}}class Gc{constructor(){mt(this,"fromJson",t=>new BBe(t.id,t.slot_entry,t.iteration,t.trigger,parseFloat(t.value),t.operation,t.step,t.need_log_to_apply));mt(this,"toJson",t=>({slot_entry:t.slotEntryId,iteration:t.iteration,trigger:t.trigger,value:t.value,operation:t.operation,step:t.step,need_log_to_apply:t.needLogToApply}))}}class zBe{constructor(t,n,r,o,i,a,s,l,c,u,d,f){mt(this,"weightConfigs",[]);mt(this,"maxWeightConfigs",[]);mt(this,"repsConfigs",[]);mt(this,"maxRepsConfigs",[]);mt(this,"restTimeConfigs",[]);mt(this,"maxRestTimeConfigs",[]);mt(this,"nrOfSetsConfigs",[]);mt(this,"rirConfigs",[]);mt(this,"exercise");this.id=t,this.slotId=n,this.exerciseId=r,this.repetitionUnitId=o,this.repetitionRounding=i,this.weightUnitId=a,this.weightRounding=s,this.order=l,this.comment=c,this.type=u,this.config=d,f!==void 0&&(this.weightConfigs=f.weightConfigs??[],this.maxWeightConfigs=f.maxWeightConfigs??[],this.repsConfigs=f.repsConfigs??[],this.maxRepsConfigs=f.maxRepsConfigs??[],this.restTimeConfigs=f.restTimeConfigs??[],this.maxRestTimeConfigs=f.maxRestTimeConfigs??[],this.nrOfSetsConfigs=f.nrOfSetsConfigs??[],this.rirConfigs=f.rirConfigs??[])}}class Iz{constructor(){mt(this,"fromJson",t=>{let n={weightConfigs:[],maxWeightConfigs:[],repsConfigs:[],maxRepsConfigs:[],restTimeConfigs:[],maxRestTimeConfigs:[],nrOfSetsConfigs:[],rirConfigs:[]};return t.hasOwnProperty("weight_configs")&&(n.weightConfigs=t.weight_configs.map(r=>new Gc().fromJson(r))),t.hasOwnProperty("max_weight_configs")&&(n.maxWeightConfigs=t.max_weight_configs.map(r=>new Gc().fromJson(r))),t.hasOwnProperty("reps_configs")&&(n.repsConfigs=t.reps_configs.map(r=>new Gc().fromJson(r))),t.hasOwnProperty("max_reps_configs")&&(n.maxRepsConfigs=t.max_reps_configs.map(r=>new Gc().fromJson(r))),t.hasOwnProperty("set_nr_configs")&&(n.nrOfSetsConfigs=t.set_nr_configs.map(r=>new Gc().fromJson(r))),t.hasOwnProperty("rest_configs")&&(n.restTimeConfigs=t.rest_configs.map(r=>new Gc().fromJson(r))),t.hasOwnProperty("max_rest_configs")&&(n.maxRestTimeConfigs=t.max_rest_configs.map(r=>new Gc().fromJson(r))),t.hasOwnProperty("rir_configs")&&(n.rirConfigs=t.rir_configs.map(r=>new Gc().fromJson(r))),new zBe(t.id,t.slot,t.exercise,t.repetition_unit,t.repetition_rounding,t.weight_unit,t.weight_rounding,t.order,t.comment,t.type,t.config,n)});mt(this,"toJson",t=>({slot:t.slotId,exercise:t.exerciseId,repetition_unit:t.repetitionUnitId,repetition_rounding:t.repetitionRounding,weight_unit:t.weightUnitId,weight_rounding:t.weightRounding,order:t.order,comment:t.comment,type:t.type,config:t.config}))}}class VBe{constructor(t,n,r,o,i,a){mt(this,"configs",[]);this.id=t,this.dayId=n,this.order=r,this.comment=o,this.config=i,a&&(this.configs=a)}}class Oz{constructor(){mt(this,"fromJson",t=>new VBe(t.id,t.day,t.order,t.comment,t.config,t.hasOwnProperty("entries")?t.entries.map(n=>new Iz().fromJson(n)):[]))}toJson(t){return{id:t.id,day:t.dayId,order:t.order,comment:t.order,config:t.config}}}class HBe{constructor(t,n,r,o,i,a,s,l,c){mt(this,"slots",[]);this.id=t,this.order=n,this.name=r,this.description=o,this.isRest=i,this.needLogsToAdvance=a,this.type=s,this.config=l,c&&(this.slots=c)}get isSpecialType(){return this.type!=="custom"}}class Ak{constructor(){mt(this,"fromJson",t=>new HBe(t.id,t.order,t.name,t.description,t.is_rest,t.need_logs_to_advance,t.type,t.config,t.hasOwnProperty("slots")?t.slots.map(n=>new Oz().fromJson(n)):[]));mt(this,"toJson",t=>({order:t.order,description:t.description,is_rest:t.isRest,need_logs_to_advance:t.needLogsToAdvance,type:t.type,config:t.config}))}}class aoe{constructor(t){mt(this,"exercises",{});mt(this,"muscle",{});mt(this,"upper_body",0);mt(this,"lower_body",0);mt(this,"total",0);Object.assign(this,t)}}class fT{constructor(t){mt(this,"mesocycle",new aoe);mt(this,"iteration",{});mt(this,"weekly",{});mt(this,"daily",{});Object.assign(this,t)}}class soe{constructor(t){mt(this,"volume",new fT);mt(this,"intensity",new fT);mt(this,"sets",new fT);Object.assign(this,t)}}class UBe{fromJson(t){const n=o=>{const i={};for(const s in o.exercises)i[parseInt(s)]=parseFloat(o.exercises[s]);const a={};for(const s in o.muscle)a[parseInt(s)]=parseFloat(o.muscle[s]);return new aoe({exercises:i,muscle:a,upper_body:parseFloat(o.upper_body),lower_body:parseFloat(o.lower_body),total:parseFloat(o.total)})},r=o=>{const i={};for(const l in o.iteration)i[l]=n(o.iteration[l]);const a={};for(const l in o.weekly)a[l]=n(o.weekly[l]);const s={};for(const l in o.daily)s[l]=n(o.daily[l]);return new fT({mesocycle:n(o.mesocycle),iteration:i,weekly:a,daily:s})};return new soe({volume:r(t.volume),intensity:r(t.intensity),sets:r(t.sets)})}}class WBe{constructor(t,n,r,o,i,a,s,l){mt(this,"days",[]);mt(this,"logData",[]);mt(this,"dayDataCurrentIteration",[]);mt(this,"dayDataAllIterations",[]);mt(this,"stats",new soe);this.id=t,this.name=n,this.description=r,this.created=o,this.start=i,this.end=a,this.fitInWeek=s,l&&(this.days=l)}get groupedDayDataByIteration(){const t={};for(const n of this.dayDataAllIterations)t[n.iteration]||(t[n.iteration]=[]),t[n.iteration].push(n);return t}}class kk{fromJson(t){return new WBe(t.id,t.name,t.description,new Date(t.created),new Date(t.start),new Date(t.end),t.fit_in_week)}toJson(t){return{id:t.id,name:t.name,description:t.description,start:yi(t.start),end:yi(t.end),fit_in_week:t.fitInWeek}}}class GBe{constructor(t,n,r,o,i,a,s,l,c,u,d,f,p,h,m,y,w,x,S){mt(this,"exercise");this.exerciseId=t,this.slotEntryId=n,this.type=r,this.nrOfSets=o,this.weight=i,this.maxWeight=a,this.weightUnitId=s,this.weightRounding=l,this.reps=c,this.maxReps=u,this.repsUnitId=d,this.repsRounding=f,this.rir=p,this.rpe=h,this.restTime=m,this.maxRestTime=y,this.textRepr=w,this.comment=x,this.exercise=S}get isSpecialType(){return this.type!=="normal"}}class qBe{constructor(){mt(this,"fromJson",t=>new GBe(t.exercise,t.slot_entry_id,t.type,t.sets,t.weight!==null?parseFloat(t.weight):null,t.max_weight!==null?parseFloat(t.max_weight):null,t.weight_unit,parseFloat(t.weight_rounding),t.reps!==null?parseFloat(t.reps):null,t.max_reps!==null?parseFloat(t.max_reps):null,t.reps_unit,parseFloat(t.reps_rounding),t.rir!==null?parseFloat(t.rir):null,t.rpe!==null?parseFloat(t.rpe):null,t.rest!==null?parseFloat(t.rest):null,t.max_rest!==null?parseFloat(t.max_rest):null,t.text_repr,t.comment))}}class KBe{constructor(t,n,r,o,i){mt(this,"exercises",[]);this.comment=t,this.isSuperset=n,this.exerciseIds=r,this.setConfigs=o,i&&(this.exercises=i)}}class YBe{constructor(){mt(this,"fromJson",t=>new KBe(t.comment,t.is_superset,t.exercises,t.sets.map(n=>new qBe().fromJson(n))))}}class QBe{constructor(t,n,r,o,i){mt(this,"slots",[]);this.iteration=t,this.date=n,this.label=r,this.day=o,i&&(this.slots=i)}}class loe{constructor(){mt(this,"fromJson",t=>new QBe(t.iteration,new Date(t.date),t.label,t.day!=null?new Ak().fromJson(t.day):null,t.slots.map(n=>new YBe().fromJson(n))))}}class XBe{constructor(t,n,r,o,i,a,s,l,c,u,d,f,p){this.id=t,this.date=n,this.iteration=r,this.exerciseId=o,this.slotEntryId=i,this.repetitionUnitId=a,this.reps=s,this.weight=l,this.weightUnitId=c,this.rir=u,this.repetitionUnitObj=d,this.weightUnitObj=f,this.exerciseObj=p,d&&(this.repetitionUnitObj=d),f&&(this.weightUnitObj=f),p&&(this.exerciseObj=p)}get rirString(){return this.rir===null||this.rir===""?"-/-":this.rir}}class coe{fromJson(t){return new XBe(t.id,new Date(t.date),t.iteration,t.exercise_base,t.set_config,t.repetition_unit,t.reps,t.weight===null?null:Number.parseFloat(t.weight),t.weight_unit,t.rir)}toJson(t){return{id:t.id,iteration:t.iteration,set_config:t.slotEntryId,exercise_base:t.exerciseId,repetition_unit:t.repetitionUnitId,reps:t.reps,weight:t.weight,weight_unit:t.weightUnitId,rir:t.rir}}}class JBe{constructor(t,n,r,o,i,a,s,l){mt(this,"logs",[]);this.id=t,this.dayId=n,this.date=r,this.notes=o,this.impression=i,this.timeStart=a,this.timeEnd=s,this.dayObj=l,l&&(this.dayObj=l)}}class ZBe{fromJson(t){return new JBe(t.id,t.day,t.date,t.notes,t.impression,t.time_start,t.time_end)}toJson(t){return{id:t.id,day:t.dayId,notes:t.notes,impression:t.impression,time_start:t.timeStart,time_end:t.timeEnd}}}class eze{constructor(t,n){this.session=t,this.logs=n}}class tze{constructor(){mt(this,"fromJson",t=>new eze(new ZBe().fromJson(t.session),t.logs.map(n=>new coe().fromJson(n))))}}class nze{constructor(t,n){mt(this,"id");mt(this,"name");this.id=t,this.name=n}}class rze{fromJson(t){return new nze(t.id,t.name)}toJson(t){return{}}}class oze{constructor(t,n){mt(this,"id");mt(this,"name");this.id=t,this.name=n}}class ize{fromJson(t){return new oze(t.id,t.name)}toJson(t){return{}}}const aze="setting-repetitionunit",sze="setting-weightunit",Az=async()=>{const e=ft(aze),{data:t}=await tt.get(e,{headers:ht()}),n=new rze;return t.results.map(r=>n.fromJson(r))},kz=async()=>{const e=ft(sze),{data:t}=await tt.get(e,{headers:ht()}),n=new ize;return t.results.map(r=>n.fromJson(r))},lze="structure",cze="logs",uze="stats",dze="current-iteration-display",fze="date-sequence-display",pze=e=>new kk().fromJson(e);let sh={};const uoe=async e=>{var u,d;const t=new kk,n=await tt.get(ft(Nt.ROUTINE,{id:e}),{headers:ht()}),r=t.fromJson(n.data),o=await Promise.all([Az(),kz(),wze(e),xze(e),Sze(e),Cze(e),Eze(e)]);o[0],o[1];const i=o[2],a=o[3],s=o[4],l=o[5],c=o[6];for(const f of i)for(const p of f.slots)for(const h of p.exerciseIds)h in sh||(sh[h]=await Ok(h));for(const f of i)for(const p of f.slots){for(const h of p.setConfigs)h.exercise=sh[h.exerciseId];for(const h of p.exerciseIds)(u=p.exercises)==null||u.push(sh[h])}for(const f of a)for(const p of f.slots){for(const h of p.setConfigs)h.exercise=sh[h.exerciseId];for(const h of p.exerciseIds)(d=p.exercises)==null||d.push(sh[h])}for(const f of s)for(const p of f.slots)for(const h of p.configs)h.exercise=sh[h.exerciseId];return r.dayDataCurrentIteration=i,r.dayDataAllIterations=a,r.logData=l,r.days=s,r.stats=c,r},hze=async()=>{const e=ft(Nt.ROUTINE,{query:{limit:"1"}}),t=await tt.get(e,{headers:ht()});return t.data.count===0?null:await uoe(t.data.results[0].id)},gze=async e=>await uoe(e),mze=async()=>{const e=ft(Nt.ROUTINE),t=await tt.get(e,{headers:ht()}),n=[];for(const r of t.data.results)n.push(await pze(r));return n},yze=async e=>{const t=await tt.post(ft(Nt.ROUTINE),e,{headers:ht()});return new kk().fromJson(t.data)},vze=async e=>{const t=await tt.patch(ft(Nt.ROUTINE,{id:e.id}),e,{headers:ht()});return new kk().fromJson(t.data)},bze=async e=>(await tt.delete(ft(Nt.ROUTINE,{id:e}),{headers:ht()})).status,wze=async e=>{const t=await tt.get(ft(Nt.ROUTINE,{id:e,objectMethod:dze}),{headers:ht()}),n=new loe;return t.data.map(r=>n.fromJson(r))},xze=async e=>{const t=await tt.get(ft(Nt.ROUTINE,{id:e,objectMethod:fze}),{headers:ht()}),n=new loe;return t.data.map(r=>n.fromJson(r))},Sze=async e=>{const t=await tt.get(ft(Nt.ROUTINE,{id:e,objectMethod:lze}),{headers:ht()}),n=new Ak;return t.data.days.map(r=>n.fromJson(r))},Cze=async e=>{const t=await tt.get(ft(Nt.ROUTINE,{id:e,objectMethod:cze}),{headers:ht()}),n=new tze;return t.data.map(r=>n.fromJson(r))},Eze=async e=>{const t=await tt.get(ft(Nt.ROUTINE,{id:e,objectMethod:uze}),{headers:ht()});return new UBe().fromJson(t.data)};class Pze{constructor(t,n,r,o){mt(this,"entries",[]);this.id=t,this.name=n,this.unit=r,o&&(this.entries=o)}}class Mk{fromJson(t){return new Pze(t.id,t.name,t.unit)}toJson(t){return{id:t.id,name:t.name,unit:t.unit}}}class Tze{constructor(t,n,r,o,i){this.id=t,this.category=n,this.date=r,this.value=o,this.notes=i}}class Rk{fromJson(t){return new Tze(t.id,t.category,new Date(t.date),t.value,t.notes)}toJson(t){return{id:t.id,category:t.category,date:t.date,value:t.value,notes:t.notes}}}const JC="measurement-category",ZC="measurement",Ize=async()=>{const e=new Mk,t=new Rk,{data:n}=await tt.get(ft(JC),{headers:ht()}),r=n.results.map(s=>e.fromJson(s)),o=r.map(async s=>{const l=[],c=ft(ZC,{query:{category:s.id}});for await(const u of XC(c,ht()))for(const d of u)l.push(t.fromJson(d));return l}),i=await Promise.all(o);let a;return i.forEach(s=>{s.length>0&&(a=s[0].category,r.findLast(l=>l.id===a).entries=s)}),r},Oze=async e=>{const{data:t}=await tt.get(ft(JC,{id:e}),{headers:ht()}),n=new Mk().fromJson(t),r=new Rk,o=[],i=ft(ZC,{query:{category:n.id}});for await(const a of XC(i,ht()))for(const s of a)o.push(r.fromJson(s));return n.entries=o,n},Aze=async e=>{const t=await tt.post(ft(JC),{name:e.name,unit:e.unit},{headers:ht()});return new Mk().fromJson(t.data)},kze=async e=>{const t=await tt.patch(ft(JC,{id:e.id}),{name:e.name,unit:e.unit},{headers:ht()});return new Mk().fromJson(t.data)},Mze=async e=>{await tt.delete(ft(JC,{id:e}),{headers:ht()})},Rze=async e=>{await tt.delete(ft(ZC,{id:e}),{headers:ht()})},$ze=async e=>{const t=await tt.patch(ft(ZC,{id:e.id}),{date:yi(e.date),value:e.value,notes:e.notes},{headers:ht()});return new Rk().fromJson(t.data)},Dze=async e=>{const t=await tt.post(ft(ZC),{category:e.categoryId,date:yi(e.date),value:e.value,notes:e.notes},{headers:ht()});return new Rk().fromJson(t.data)},_ze="workoutlog",Nze=async(e,t=!1)=>{const n=new coe,r=ft(_ze,{query:{workout:e.toString(),limit:Fre,ordering:"-date"}}),o=await Promise.all([Az(),kz()]),i=o[0],a=o[1],s=new Map,l=[];for await(const c of XC(r))for(const u of c){const d=n.fromJson(u);d.repetitionUnitObj=i.find(f=>f.id===d.repetitionUnitId),d.weightUnitObj=a.find(f=>f.id===d.weightUnitId),t&&(s.get(d.exerciseId)===void 0&&s.set(d.exerciseId,await Ok(d.exerciseId)),d.exerciseObj=s.get(d.exerciseId)),l.push(d)}return l},Lze=async e=>{const t=await tt.patch(ft(Nt.SLOT_ENTRY,{id:e.id}),e,{headers:ht()});return new Iz().fromJson(t.data)},Fze=async e=>{await tt.delete(ft(Nt.SLOT_ENTRY,{id:e}),{headers:ht()})},jze=async e=>{const t=await tt.post(ft(Nt.SLOT_ENTRY),e,{headers:ht()});return new Iz().fromJson(t.data)},Bze=async e=>{const t=await tt.patch(ft(Nt.DAY,{id:e.id}),e,{headers:ht()});return new Ak().fromJson(t.data)},zze=async e=>{for(const t of e)await tt.patch(ft(Nt.DAY,{id:t.id}),{order:t.order},{headers:ht()})},Vze=async e=>{const t=await tt.post(ft(Nt.DAY),e,{headers:ht()});return new Ak().fromJson(t.data)},Hze=async e=>{await tt.delete(ft(Nt.DAY,{id:e}),{headers:ht()})},Uze=async e=>{const t=await tt.post(ft(Nt.SLOT),e,{headers:ht()});return new Oz().fromJson(t.data)},Wze=async e=>{const t=await tt.patch(ft(Nt.SLOT,{id:e.id}),e,{headers:ht()});return new Oz().fromJson(t.data)},Gze=async e=>{for(const t of e)await tt.patch(ft(Nt.SLOT,{id:t.id}),{order:t.order},{headers:ht()})},qze=async e=>{await tt.delete(ft(Nt.SLOT,{id:e}),{headers:ht()})},Op=async(e,t)=>{const n=await tt.patch(ft(t,{id:e.id}),e,{headers:ht()});return new Gc().fromJson(n.data)},Ap=async(e,t)=>{const n=await tt.post(ft(t),e,{headers:ht()});return new Gc().fromJson(n.data)},kp=async(e,t)=>await tt.delete(ft(t,{id:e}),{headers:ht()}),Kze=async e=>await Op(e,Nt.WEIGHT_CONFIG),Yze=async e=>await Ap(e,Nt.WEIGHT_CONFIG),Qze=async e=>await kp(e,Nt.WEIGHT_CONFIG),Xze=async e=>await Op(e,Nt.MAX_WEIGHT_CONFIG),Jze=async e=>await Ap(e,Nt.MAX_WEIGHT_CONFIG),Zze=async e=>await kp(e,Nt.MAX_WEIGHT_CONFIG),eVe=async e=>await Op(e,Nt.REPS_CONFIG),tVe=async e=>await Ap(e,Nt.REPS_CONFIG),nVe=async e=>await kp(e,Nt.REPS_CONFIG),rVe=async e=>await Op(e,Nt.MAX_REPS_CONFIG),oVe=async e=>await Ap(e,Nt.MAX_REPS_CONFIG),iVe=async e=>await kp(e,Nt.MAX_REPS_CONFIG),aVe=async e=>await Op(e,Nt.NR_OF_SETS_CONFIG),sVe=async e=>await Ap(e,Nt.NR_OF_SETS_CONFIG),lVe=async e=>await kp(e,Nt.NR_OF_SETS_CONFIG),cVe=async e=>await Op(e,Nt.RIR_CONFIG),uVe=async e=>await Ap(e,Nt.RIR_CONFIG),dVe=async e=>await kp(e,Nt.RIR_CONFIG),fVe=async e=>await Op(e,Nt.REST_CONFIG),pVe=async e=>await Ap(e,Nt.REST_CONFIG),hVe=async e=>await kp(e,Nt.REST_CONFIG),gVe=async e=>await Op(e,Nt.MAX_REST_CONFIG),mVe=async e=>await Ap(e,Nt.MAX_REST_CONFIG),yVe=async e=>await kp(e,Nt.MAX_REST_CONFIG);function Ri(e,t){return e.toLocaleString(t,{maximumFractionDigits:0})}function doe(e,t,n){return e.toLocaleString(t,{maximumFractionDigits:0,unit:n.valueOf(),style:"unit"})}function kn(e,t){return doe(e,t,"gram")}function bD(e,t){return doe(e,t,"percent")}const Vy=e=>{const{i18n:t}=Le(),n=e.planned>0;return G(wt,{children:[b(Gne,{variant:"determinate",value:e.percentage<100?e.percentage:100}),G(ot,{variant:"caption",children:[e.title," — ",kn(e.logged,t.language),n&&G(wt,{children:[" / ",kn(e.planned,t.language)]})]})]})};var vVe=Array.isArray,za=vVe,bVe=typeof ea=="object"&&ea&&ea.Object===Object&&ea,foe=bVe,wVe=foe,xVe=typeof self=="object"&&self&&self.Object===Object&&self,SVe=wVe||xVe||Function("return this")(),Pu=SVe,CVe=Pu,EVe=CVe.Symbol,e1=EVe,RG=e1,poe=Object.prototype,PVe=poe.hasOwnProperty,TVe=poe.toString,sw=RG?RG.toStringTag:void 0;function IVe(e){var t=PVe.call(e,sw),n=e[sw];try{e[sw]=void 0;var r=!0}catch{}var o=TVe.call(e);return r&&(t?e[sw]=n:delete e[sw]),o}var OVe=IVe,AVe=Object.prototype,kVe=AVe.toString;function MVe(e){return kVe.call(e)}var RVe=MVe,$G=e1,$Ve=OVe,DVe=RVe,_Ve="[object Null]",NVe="[object Undefined]",DG=$G?$G.toStringTag:void 0;function LVe(e){return e==null?e===void 0?NVe:_Ve:DG&&DG in Object(e)?$Ve(e):DVe(e)}var $d=LVe;function FVe(e){return e!=null&&typeof e=="object"}var Dd=FVe,jVe=$d,BVe=Dd,zVe="[object Symbol]";function VVe(e){return typeof e=="symbol"||BVe(e)&&jVe(e)==zVe}var jb=VVe,HVe=za,UVe=jb,WVe=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,GVe=/^\w*$/;function qVe(e,t){if(HVe(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||UVe(e)?!0:GVe.test(e)||!WVe.test(e)||t!=null&&e in Object(t)}var Mz=qVe;function KVe(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Mp=KVe;const Bb=Bn(Mp);var YVe=$d,QVe=Mp,XVe="[object AsyncFunction]",JVe="[object Function]",ZVe="[object GeneratorFunction]",e5e="[object Proxy]";function t5e(e){if(!QVe(e))return!1;var t=YVe(e);return t==JVe||t==ZVe||t==XVe||t==e5e}var Rz=t5e;const Jt=Bn(Rz);var n5e=Pu,r5e=n5e["__core-js_shared__"],o5e=r5e,wD=o5e,_G=function(){var e=/[^.]+$/.exec(wD&&wD.keys&&wD.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function i5e(e){return!!_G&&_G in e}var a5e=i5e,s5e=Function.prototype,l5e=s5e.toString;function c5e(e){if(e!=null){try{return l5e.call(e)}catch{}try{return e+""}catch{}}return""}var hoe=c5e,u5e=Rz,d5e=a5e,f5e=Mp,p5e=hoe,h5e=/[\\^$.*+?()[\]{}|]/g,g5e=/^\[object .+?Constructor\]$/,m5e=Function.prototype,y5e=Object.prototype,v5e=m5e.toString,b5e=y5e.hasOwnProperty,w5e=RegExp("^"+v5e.call(b5e).replace(h5e,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function x5e(e){if(!f5e(e)||d5e(e))return!1;var t=u5e(e)?w5e:g5e;return t.test(p5e(e))}var S5e=x5e;function C5e(e,t){return e==null?void 0:e[t]}var E5e=C5e,P5e=S5e,T5e=E5e;function I5e(e,t){var n=T5e(e,t);return P5e(n)?n:void 0}var Fg=I5e,O5e=Fg,A5e=O5e(Object,"create"),$k=A5e,NG=$k;function k5e(){this.__data__=NG?NG(null):{},this.size=0}var M5e=k5e;function R5e(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var $5e=R5e,D5e=$k,_5e="__lodash_hash_undefined__",N5e=Object.prototype,L5e=N5e.hasOwnProperty;function F5e(e){var t=this.__data__;if(D5e){var n=t[e];return n===_5e?void 0:n}return L5e.call(t,e)?t[e]:void 0}var j5e=F5e,B5e=$k,z5e=Object.prototype,V5e=z5e.hasOwnProperty;function H5e(e){var t=this.__data__;return B5e?t[e]!==void 0:V5e.call(t,e)}var U5e=H5e,W5e=$k,G5e="__lodash_hash_undefined__";function q5e(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=W5e&&t===void 0?G5e:t,this}var K5e=q5e,Y5e=M5e,Q5e=$5e,X5e=j5e,J5e=U5e,Z5e=K5e;function zb(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t-1}var mHe=gHe,yHe=Dk;function vHe(e,t){var n=this.__data__,r=yHe(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var bHe=vHe,wHe=nHe,xHe=uHe,SHe=pHe,CHe=mHe,EHe=bHe;function Vb(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t0?1:-1},Nh=function(t){return t1(t)&&t.indexOf("%")===t.length-1},ut=function(t){return HUe(t)&&!Ub(t)},zo=function(t){return ut(t)||t1(t)},qUe=0,Rp=function(t){var n=++qUe;return"".concat(t||"").concat(n)},na=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!ut(t)&&!t1(t))return r;var i;if(Nh(t)){var a=t.indexOf("%");i=n*parseFloat(t.slice(0,a))/100}else i=+t;return Ub(i)&&(i=r),o&&i>n&&(i=n),i},bf=function(t){if(!t)return null;var n=Object.keys(t);return n&&n.length?t[n[0]]:null},KUe=function(t){if(!Array.isArray(t))return!1;for(var n=t.length,r={},o=0;o=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function t3e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function NN(e){"@babel/helpers - typeof";return NN=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},NN(e)}var HG={click:"onClick",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",mouseout:"onMouseOut",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",touchcancel:"onTouchCancel",touchend:"onTouchEnd",touchmove:"onTouchMove",touchstart:"onTouchStart"},cd=function(t){return typeof t=="string"?t:t?t.displayName||t.name||"Component":""},UG=null,SD=null,Bz=function e(t){if(t===UG&&Array.isArray(SD))return SD;var n=[];return v.Children.forEach(t,function(r){Kt(r)||(VCe.isFragment(r)?n=n.concat(e(r.props.children)):n.push(r))}),SD=n,UG=t,n};function la(e,t){var n=[],r=[];return Array.isArray(t)?r=t.map(function(o){return cd(o)}):r=[cd(t)],Bz(e).forEach(function(o){var i=bs(o,"type.displayName")||bs(o,"type.name");r.indexOf(i)!==-1&&n.push(o)}),n}function rs(e,t){var n=la(e,t);return n&&n[0]}var WG=function(t){if(!t||!t.props)return!1;var n=t.props,r=n.width,o=n.height;return!(!ut(r)||r<=0||!ut(o)||o<=0)},n3e=["a","altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColormatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-url","foreignObject","g","glyph","glyphRef","hkern","image","line","lineGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","script","set","stop","style","svg","switch","symbol","text","textPath","title","tref","tspan","use","view","vkern"],r3e=function(t){return t&&t.type&&t1(t.type)&&n3e.indexOf(t.type)>=0},Soe=function(t){return t&&NN(t)==="object"&&"clipDot"in t},o3e=function(t,n,r,o){var i,a=(i=xD==null?void 0:xD[o])!==null&&i!==void 0?i:[];return!Jt(t)&&(o&&a.includes(n)||XUe.includes(n))||r&&jz.includes(n)},_t=function(t,n,r){if(!t||typeof t=="function"||typeof t=="boolean")return null;var o=t;if(v.isValidElement(t)&&(o=t.props),!Bb(o))return null;var i={};return Object.keys(o).forEach(function(a){var s;o3e((s=o)===null||s===void 0?void 0:s[a],a,n,r)&&(i[a]=o[a])}),i},LN=function e(t,n){if(t===n)return!0;var r=v.Children.count(t);if(r!==v.Children.count(n))return!1;if(r===0)return!0;if(r===1)return GG(Array.isArray(t)?t[0]:t,Array.isArray(n)?n[0]:n);for(var o=0;o=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function c3e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function jN(e){var t=e.children,n=e.width,r=e.height,o=e.viewBox,i=e.className,a=e.style,s=e.title,l=e.desc,c=l3e(e,s3e),u=o||{width:n,height:r,x:0,y:0},d=de("recharts-surface",i);return Y.createElement("svg",FN({},_t(c,!0,"svg"),{className:d,width:n,height:r,style:a,viewBox:"".concat(u.x," ").concat(u.y," ").concat(u.width," ").concat(u.height)}),Y.createElement("title",null,s),Y.createElement("desc",null,l),t)}var u3e=["children","className"];function BN(){return BN=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function f3e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var pn=Y.forwardRef(function(e,t){var n=e.children,r=e.className,o=d3e(e,u3e),i=de("recharts-layer",r);return Y.createElement("g",BN({className:i},_t(o,!0),{ref:t}),n)}),Cc=function(t,n){for(var r=arguments.length,o=new Array(r>2?r-2:0),i=2;io?0:o+t),n=n>o?o:n,n<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var i=Array(o);++r=r?e:g3e(e,t,n)}var y3e=m3e,v3e="\\ud800-\\udfff",b3e="\\u0300-\\u036f",w3e="\\ufe20-\\ufe2f",x3e="\\u20d0-\\u20ff",S3e=b3e+w3e+x3e,C3e="\\ufe0e\\ufe0f",E3e="\\u200d",P3e=RegExp("["+E3e+v3e+S3e+C3e+"]");function T3e(e){return P3e.test(e)}var Coe=T3e;function I3e(e){return e.split("")}var O3e=I3e,Eoe="\\ud800-\\udfff",A3e="\\u0300-\\u036f",k3e="\\ufe20-\\ufe2f",M3e="\\u20d0-\\u20ff",R3e=A3e+k3e+M3e,$3e="\\ufe0e\\ufe0f",D3e="["+Eoe+"]",zN="["+R3e+"]",VN="\\ud83c[\\udffb-\\udfff]",_3e="(?:"+zN+"|"+VN+")",Poe="[^"+Eoe+"]",Toe="(?:\\ud83c[\\udde6-\\uddff]){2}",Ioe="[\\ud800-\\udbff][\\udc00-\\udfff]",N3e="\\u200d",Ooe=_3e+"?",Aoe="["+$3e+"]?",L3e="(?:"+N3e+"(?:"+[Poe,Toe,Ioe].join("|")+")"+Aoe+Ooe+")*",F3e=Aoe+Ooe+L3e,j3e="(?:"+[Poe+zN+"?",zN,Toe,Ioe,D3e].join("|")+")",B3e=RegExp(VN+"(?="+VN+")|"+j3e+F3e,"g");function z3e(e){return e.match(B3e)||[]}var V3e=z3e,H3e=O3e,U3e=Coe,W3e=V3e;function G3e(e){return U3e(e)?W3e(e):H3e(e)}var q3e=G3e,K3e=y3e,Y3e=Coe,Q3e=q3e,X3e=voe;function J3e(e){return function(t){t=X3e(t);var n=Y3e(t)?Q3e(t):void 0,r=n?n[0]:t.charAt(0),o=n?K3e(n,1).join(""):t.slice(1);return r[e]()+o}}var Z3e=J3e,e4e=Z3e,t4e=e4e("toUpperCase"),n4e=t4e;const Fk=Bn(n4e);function Or(e){return function(){return e}}const koe=Math.cos,xI=Math.sin,Nc=Math.sqrt,SI=Math.PI,jk=2*SI,HN=Math.PI,UN=2*HN,Ch=1e-6,r4e=UN-Ch;function Moe(e){this._+=e[0];for(let t=1,n=e.length;t=0))throw new Error(`invalid digits: ${e}`);if(t>15)return Moe;const n=10**t;return function(r){this._+=r[0];for(let o=1,i=r.length;oCh)if(!(Math.abs(d*l-c*u)>Ch)||!i)this._append`L${this._x1=t},${this._y1=n}`;else{let p=r-a,h=o-s,m=l*l+c*c,y=p*p+h*h,w=Math.sqrt(m),x=Math.sqrt(f),S=i*Math.tan((HN-Math.acos((m+f-y)/(2*w*x)))/2),E=S/x,P=S/w;Math.abs(E-1)>Ch&&this._append`L${t+E*u},${n+E*d}`,this._append`A${i},${i},0,0,${+(d*p>u*h)},${this._x1=t+P*l},${this._y1=n+P*c}`}}arc(t,n,r,o,i,a){if(t=+t,n=+n,r=+r,a=!!a,r<0)throw new Error(`negative radius: ${r}`);let s=r*Math.cos(o),l=r*Math.sin(o),c=t+s,u=n+l,d=1^a,f=a?o-i:i-o;this._x1===null?this._append`M${c},${u}`:(Math.abs(this._x1-c)>Ch||Math.abs(this._y1-u)>Ch)&&this._append`L${c},${u}`,r&&(f<0&&(f=f%UN+UN),f>r4e?this._append`A${r},${r},0,1,${d},${t-s},${n-l}A${r},${r},0,1,${d},${this._x1=c},${this._y1=u}`:f>Ch&&this._append`A${r},${r},0,${+(f>=HN)},${d},${this._x1=t+r*Math.cos(i)},${this._y1=n+r*Math.sin(i)}`)}rect(t,n,r,o){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${r=+r}v${+o}h${-r}Z`}toString(){return this._}}function zz(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{const r=Math.floor(n);if(!(r>=0))throw new RangeError(`invalid digits: ${n}`);t=r}return e},()=>new i4e(t)}function Vz(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Roe(e){this._context=e}Roe.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function Bk(e){return new Roe(e)}function $oe(e){return e[0]}function Doe(e){return e[1]}function _oe(e,t){var n=Or(!0),r=null,o=Bk,i=null,a=zz(s);e=typeof e=="function"?e:e===void 0?$oe:Or(e),t=typeof t=="function"?t:t===void 0?Doe:Or(t);function s(l){var c,u=(l=Vz(l)).length,d,f=!1,p;for(r==null&&(i=o(p=a())),c=0;c<=u;++c)!(c=p;--h)s.point(S[h],E[h]);s.lineEnd(),s.areaEnd()}w&&(S[f]=+e(y,f,d),E[f]=+t(y,f,d),s.point(r?+r(y,f,d):S[f],n?+n(y,f,d):E[f]))}if(x)return s=null,x+""||null}function u(){return _oe().defined(o).curve(a).context(i)}return c.x=function(d){return arguments.length?(e=typeof d=="function"?d:Or(+d),r=null,c):e},c.x0=function(d){return arguments.length?(e=typeof d=="function"?d:Or(+d),c):e},c.x1=function(d){return arguments.length?(r=d==null?null:typeof d=="function"?d:Or(+d),c):r},c.y=function(d){return arguments.length?(t=typeof d=="function"?d:Or(+d),n=null,c):t},c.y0=function(d){return arguments.length?(t=typeof d=="function"?d:Or(+d),c):t},c.y1=function(d){return arguments.length?(n=d==null?null:typeof d=="function"?d:Or(+d),c):n},c.lineX0=c.lineY0=function(){return u().x(e).y(t)},c.lineY1=function(){return u().x(e).y(n)},c.lineX1=function(){return u().x(r).y(t)},c.defined=function(d){return arguments.length?(o=typeof d=="function"?d:Or(!!d),c):o},c.curve=function(d){return arguments.length?(a=d,i!=null&&(s=a(i)),c):a},c.context=function(d){return arguments.length?(d==null?i=s=null:s=a(i=d),c):i},c}class Noe{constructor(t,n){this._context=t,this._x=n}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,n){switch(t=+t,n=+n,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,n,t,n):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n)/2,t,this._y0,t,n);break}}this._x0=t,this._y0=n}}function a4e(e){return new Noe(e,!0)}function s4e(e){return new Noe(e,!1)}const Hz={draw(e,t){const n=Nc(t/SI);e.moveTo(n,0),e.arc(0,0,n,0,jk)}},l4e={draw(e,t){const n=Nc(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}},Loe=Nc(1/3),c4e=Loe*2,u4e={draw(e,t){const n=Nc(t/c4e),r=n*Loe;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},d4e={draw(e,t){const n=Nc(t),r=-n/2;e.rect(r,r,n,n)}},f4e=.8908130915292852,Foe=xI(SI/10)/xI(7*SI/10),p4e=xI(jk/10)*Foe,h4e=-koe(jk/10)*Foe,g4e={draw(e,t){const n=Nc(t*f4e),r=p4e*n,o=h4e*n;e.moveTo(0,-n),e.lineTo(r,o);for(let i=1;i<5;++i){const a=jk*i/5,s=koe(a),l=xI(a);e.lineTo(l*n,-s*n),e.lineTo(s*r-l*o,l*r+s*o)}e.closePath()}},CD=Nc(3),m4e={draw(e,t){const n=-Nc(t/(CD*3));e.moveTo(0,n*2),e.lineTo(-CD*n,-n),e.lineTo(CD*n,-n),e.closePath()}},Ks=-.5,Ys=Nc(3)/2,WN=1/Nc(12),y4e=(WN/2+1)*3,v4e={draw(e,t){const n=Nc(t/y4e),r=n/2,o=n*WN,i=r,a=n*WN+n,s=-i,l=a;e.moveTo(r,o),e.lineTo(i,a),e.lineTo(s,l),e.lineTo(Ks*r-Ys*o,Ys*r+Ks*o),e.lineTo(Ks*i-Ys*a,Ys*i+Ks*a),e.lineTo(Ks*s-Ys*l,Ys*s+Ks*l),e.lineTo(Ks*r+Ys*o,Ks*o-Ys*r),e.lineTo(Ks*i+Ys*a,Ks*a-Ys*i),e.lineTo(Ks*s+Ys*l,Ks*l-Ys*s),e.closePath()}};function b4e(e,t){let n=null,r=zz(o);e=typeof e=="function"?e:Or(e||Hz),t=typeof t=="function"?t:Or(t===void 0?64:+t);function o(){let i;if(n||(n=i=r()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),i)return n=null,i+""||null}return o.type=function(i){return arguments.length?(e=typeof i=="function"?i:Or(i),o):e},o.size=function(i){return arguments.length?(t=typeof i=="function"?i:Or(+i),o):t},o.context=function(i){return arguments.length?(n=i??null,o):n},o}function CI(){}function EI(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function joe(e){this._context=e}joe.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:EI(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:EI(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function w4e(e){return new joe(e)}function Boe(e){this._context=e}Boe.prototype={areaStart:CI,areaEnd:CI,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:EI(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function x4e(e){return new Boe(e)}function zoe(e){this._context=e}zoe.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:EI(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function S4e(e){return new zoe(e)}function Voe(e){this._context=e}Voe.prototype={areaStart:CI,areaEnd:CI,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function C4e(e){return new Voe(e)}function KG(e){return e<0?-1:1}function YG(e,t,n){var r=e._x1-e._x0,o=t-e._x1,i=(e._y1-e._y0)/(r||o<0&&-0),a=(n-e._y1)/(o||r<0&&-0),s=(i*o+a*r)/(r+o);return(KG(i)+KG(a))*Math.min(Math.abs(i),Math.abs(a),.5*Math.abs(s))||0}function QG(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function ED(e,t,n){var r=e._x0,o=e._y0,i=e._x1,a=e._y1,s=(i-r)/3;e._context.bezierCurveTo(r+s,o+s*t,i-s,a-s*n,i,a)}function PI(e){this._context=e}PI.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:ED(this,this._t0,QG(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,ED(this,QG(this,n=YG(this,e,t)),n);break;default:ED(this,this._t0,n=YG(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function Hoe(e){this._context=new Uoe(e)}(Hoe.prototype=Object.create(PI.prototype)).point=function(e,t){PI.prototype.point.call(this,t,e)};function Uoe(e){this._context=e}Uoe.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,o,i){this._context.bezierCurveTo(t,e,r,n,i,o)}};function E4e(e){return new PI(e)}function P4e(e){return new Hoe(e)}function Woe(e){this._context=e}Woe.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=XG(e),o=XG(t),i=0,a=1;a=0;--t)o[t]=(a[t]-o[t+1])/i[t];for(i[n-1]=(e[n]+o[n-1])/2,t=0;t=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}break}}this._x=e,this._y=t}};function I4e(e){return new zk(e,.5)}function O4e(e){return new zk(e,0)}function A4e(e){return new zk(e,1)}function Mv(e,t){if((a=e.length)>1)for(var n=1,r,o,i=e[t[0]],a,s=i.length;n=0;)n[t]=t;return n}function k4e(e,t){return e[t]}function M4e(e){const t=[];return t.key=e,t}function R4e(){var e=Or([]),t=GN,n=Mv,r=k4e;function o(i){var a=Array.from(e.apply(this,arguments),M4e),s,l=a.length,c=-1,u;for(const d of i)for(s=0,++c;s0){for(var n,r,o=0,i=e[0].length,a;o0){for(var n=0,r=e[t[0]],o,i=r.length;n0)||!((i=(o=e[t[0]]).length)>0))){for(var n=0,r=1,o,i,a;r=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function z4e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var Goe={symbolCircle:Hz,symbolCross:l4e,symbolDiamond:u4e,symbolSquare:d4e,symbolStar:g4e,symbolTriangle:m4e,symbolWye:v4e},V4e=Math.PI/180,H4e=function(t){var n="symbol".concat(Fk(t));return Goe[n]||Hz},U4e=function(t,n,r){if(n==="area")return t;switch(r){case"cross":return 5*t*t/9;case"diamond":return .5*t*t/Math.sqrt(3);case"square":return t*t;case"star":{var o=18*V4e;return 1.25*t*t*(Math.tan(o)-Math.tan(o*2)*Math.pow(Math.tan(o),2))}case"triangle":return Math.sqrt(3)*t*t/4;case"wye":return(21-10*Math.sqrt(3))*t*t/8;default:return Math.PI*t*t/4}},W4e=function(t,n){Goe["symbol".concat(Fk(t))]=n},Vk=function(t){var n=t.type,r=n===void 0?"circle":n,o=t.size,i=o===void 0?64:o,a=t.sizeType,s=a===void 0?"area":a,l=B4e(t,N4e),c=ZG(ZG({},l),{},{type:r,size:i,sizeType:s}),u=function(){var y=H4e(r),w=b4e().type(y).size(U4e(i,s,r));return w()},d=c.className,f=c.cx,p=c.cy,h=_t(c,!0);return f===+f&&p===+p&&i===+i?Y.createElement("path",qN({},h,{className:de("recharts-symbols",d),transform:"translate(".concat(f,", ").concat(p,")"),d:u()})):null};Vk.registerSymbol=W4e;function Rv(e){"@babel/helpers - typeof";return Rv=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Rv(e)}function KN(){return KN=Object.assign?Object.assign.bind():function(e){for(var t=1;t`);var x=p.inactive?c:p.color;return Y.createElement("li",HN({className:y,style:d,key:"legend-item-".concat(h)},sp(r.props,p,h)),Y.createElement(DN,{width:a,height:a,viewBox:u,style:f},r.renderIcon(p)),Y.createElement("span",{className:"recharts-legend-item-text",style:{color:x}},m?m(w,p,h):w))})}},{key:"render",value:function(){var r=this.props,o=r.payload,i=r.layout,a=r.align;if(!o||!o.length)return null;var s={padding:0,margin:0,textAlign:i==="horizontal"?a:"left"};return Y.createElement("ul",{className:"recharts-default-legend",style:s},this.renderItems())}}])}(v.PureComponent);iS(Bz,"displayName","Legend");iS(Bz,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var T4e=Ik;function I4e(){this.__data__=new T4e,this.size=0}var O4e=I4e;function A4e(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}var k4e=A4e;function M4e(e){return this.__data__.get(e)}var R4e=M4e;function $4e(e){return this.__data__.has(e)}var D4e=$4e,_4e=Ik,N4e=kz,L4e=Mz,F4e=200;function j4e(e,t){var n=this.__data__;if(n instanceof _4e){var r=n.__data__;if(!N4e||r.lengths))return!1;var c=i.get(e),u=i.get(t);if(c&&u)return c==t&&u==e;var d=-1,f=!0,p=n&sWe?new rWe:void 0;for(i.set(e,t),i.set(t,e);++d-1&&e%1==0&&e-1&&e%1==0&&e<=d6e}var Uz=f6e,p6e=$d,h6e=Uz,g6e=Dd,m6e="[object Arguments]",y6e="[object Array]",v6e="[object Boolean]",b6e="[object Date]",w6e="[object Error]",x6e="[object Function]",S6e="[object Map]",C6e="[object Number]",E6e="[object Object]",P6e="[object RegExp]",T6e="[object Set]",I6e="[object String]",O6e="[object WeakMap]",A6e="[object ArrayBuffer]",k6e="[object DataView]",M6e="[object Float32Array]",R6e="[object Float64Array]",$6e="[object Int8Array]",D6e="[object Int16Array]",_6e="[object Int32Array]",N6e="[object Uint8Array]",L6e="[object Uint8ClampedArray]",F6e="[object Uint16Array]",j6e="[object Uint32Array]",Nr={};Nr[M6e]=Nr[R6e]=Nr[$6e]=Nr[D6e]=Nr[_6e]=Nr[N6e]=Nr[L6e]=Nr[F6e]=Nr[j6e]=!0;Nr[m6e]=Nr[y6e]=Nr[A6e]=Nr[v6e]=Nr[k6e]=Nr[b6e]=Nr[w6e]=Nr[x6e]=Nr[S6e]=Nr[C6e]=Nr[E6e]=Nr[P6e]=Nr[T6e]=Nr[I6e]=Nr[O6e]=!1;function B6e(e){return g6e(e)&&h6e(e.length)&&!!Nr[p6e(e)]}var z6e=B6e;function V6e(e){return function(t){return e(t)}}var Yoe=V6e,yI={exports:{}};yI.exports;(function(e,t){var n=ooe,r=t&&!t.nodeType&&t,o=r&&!0&&e&&!e.nodeType&&e,i=o&&o.exports===r,a=i&&n.process,s=function(){try{var l=o&&o.require&&o.require("util").types;return l||a&&a.binding&&a.binding("util")}catch{}}();e.exports=s})(yI,yI.exports);var H6e=yI.exports,U6e=z6e,W6e=Yoe,t8=H6e,n8=t8&&t8.isTypedArray,G6e=n8?W6e(n8):U6e,Qoe=G6e,q6e=QWe,K6e=Vz,Y6e=ja,Q6e=Koe,X6e=Hz,J6e=Qoe,Z6e=Object.prototype,eGe=Z6e.hasOwnProperty;function tGe(e,t){var n=Y6e(e),r=!n&&K6e(e),o=!n&&!r&&Q6e(e),i=!n&&!r&&!o&&J6e(e),a=n||r||o||i,s=a?q6e(e.length,String):[],l=s.length;for(var c in e)(t||eGe.call(e,c))&&!(a&&(c=="length"||o&&(c=="offset"||c=="parent")||i&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||X6e(c,l)))&&s.push(c);return s}var nGe=tGe,rGe=Object.prototype;function oGe(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||rGe;return e===n}var iGe=oGe;function aGe(e,t){return function(n){return e(t(n))}}var Xoe=aGe,sGe=Xoe,lGe=sGe(Object.keys,Object),cGe=lGe,uGe=iGe,dGe=cGe,fGe=Object.prototype,pGe=fGe.hasOwnProperty;function hGe(e){if(!uGe(e))return dGe(e);var t=[];for(var n in Object(e))pGe.call(e,n)&&n!="constructor"&&t.push(n);return t}var gGe=hGe,mGe=Oz,yGe=Uz;function vGe(e){return e!=null&&yGe(e.length)&&!mGe(e)}var GC=vGe,bGe=nGe,wGe=gGe,xGe=GC;function SGe(e){return xGe(e)?bGe(e):wGe(e)}var _k=SGe,CGe=FWe,EGe=KWe,PGe=_k;function TGe(e){return CGe(e,PGe,EGe)}var IGe=TGe,r8=IGe,OGe=1,AGe=Object.prototype,kGe=AGe.hasOwnProperty;function MGe(e,t,n,r,o,i){var a=n&OGe,s=r8(e),l=s.length,c=r8(t),u=c.length;if(l!=u&&!a)return!1;for(var d=l;d--;){var f=s[d];if(!(a?f in t:kGe.call(t,f)))return!1}var p=i.get(e),h=i.get(t);if(p&&h)return p==t&&h==e;var m=!0;i.set(e,t),i.set(t,e);for(var y=a;++d-1}var A9e=O9e;function k9e(e,t,n){for(var r=-1,o=e==null?0:e.length;++r=W9e){var c=t?null:H9e(e);if(c)return U9e(c);a=!1,o=V9e,l=new j9e}else l=t?[]:s;e:for(;++r=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function sqe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function lqe(e){return e.value}function cqe(e,t){if(Y.isValidElement(e))return Y.cloneElement(e,t);if(typeof e=="function")return Y.createElement(e,t);t.ref;var n=aqe(t,J9e);return Y.createElement(Bz,n)}var b8=1,cd=function(e){function t(){var n;Z9e(this,t);for(var r=arguments.length,o=new Array(r),i=0;ib8||Math.abs(o.height-this.lastBoundingBox.height)>b8)&&(this.lastBoundingBox.width=o.width,this.lastBoundingBox.height=o.height,r&&r(o)):(this.lastBoundingBox.width!==-1||this.lastBoundingBox.height!==-1)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,r&&r(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?Vu({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(r){var o=this.props,i=o.layout,a=o.align,s=o.verticalAlign,l=o.margin,c=o.chartWidth,u=o.chartHeight,d,f;if(!r||(r.left===void 0||r.left===null)&&(r.right===void 0||r.right===null))if(a==="center"&&i==="vertical"){var p=this.getBBoxSnapshot();d={left:((c||0)-p.width)/2}}else d=a==="right"?{right:l&&l.right||0}:{left:l&&l.left||0};if(!r||(r.top===void 0||r.top===null)&&(r.bottom===void 0||r.bottom===null))if(s==="middle"){var h=this.getBBoxSnapshot();f={top:((u||0)-h.height)/2}}else f=s==="bottom"?{bottom:l&&l.bottom||0}:{top:l&&l.top||0};return Vu(Vu({},d),f)}},{key:"render",value:function(){var r=this,o=this.props,i=o.content,a=o.width,s=o.height,l=o.wrapperStyle,c=o.payloadUniqBy,u=o.payload,d=Vu(Vu({position:"absolute",width:a||"auto",height:s||"auto"},this.getDefaultPosition(l)),l);return Y.createElement("div",{className:"recharts-legend-wrapper",style:d,ref:function(p){r.wrapperNode=p}},cqe(i,Vu(Vu({},this.props),{},{payload:oie(u,c,lqe)})))}}],[{key:"getWithHeight",value:function(r,o){var i=Vu(Vu({},this.defaultProps),r.props),a=i.layout;return a==="vertical"&&ut(r.props.height)?{height:r.props.height}:a==="horizontal"?{width:r.props.width||o}:null}}])}(v.PureComponent);Nk(cd,"displayName","Legend");Nk(cd,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var w8=UC,uqe=Vz,dqe=ja,x8=w8?w8.isConcatSpreadable:void 0;function fqe(e){return dqe(e)||uqe(e)||!!(x8&&e&&e[x8])}var pqe=fqe,hqe=Goe,gqe=pqe;function sie(e,t,n,r,o){var i=-1,a=e.length;for(n||(n=gqe),o||(o=[]);++i0&&n(s)?t>1?sie(s,t-1,n,r,o):hqe(o,s):r||(o[o.length]=s)}return o}var lie=sie;function mqe(e){return function(t,n,r){for(var o=-1,i=Object(t),a=r(t),s=a.length;s--;){var l=a[e?s:++o];if(n(i[l],l,i)===!1)break}return t}}var yqe=mqe,vqe=yqe,bqe=vqe(),wqe=bqe,xqe=wqe,Sqe=_k;function Cqe(e,t){return e&&xqe(e,t,Sqe)}var cie=Cqe,Eqe=GC;function Pqe(e,t){return function(n,r){if(n==null)return n;if(!Eqe(n))return e(n,r);for(var o=n.length,i=t?o:-1,a=Object(n);(t?i--:++it||i&&a&&l&&!s&&!c||r&&a&&l||!n&&l||!o)return 1;if(!r&&!i&&!c&&e=s)return l;var c=n[r];return l*(c=="desc"?-1:1)}}return e.index-t.index}var jqe=Fqe,SD=$z,Bqe=Dz,zqe=Pu,Vqe=uie,Hqe=Dqe,Uqe=Yoe,Wqe=jqe,Gqe=Hb,qqe=ja;function Kqe(e,t,n){t.length?t=SD(t,function(i){return qqe(i)?function(a){return Bqe(a,i.length===1?i[0]:i)}:i}):t=[Gqe];var r=-1;t=SD(t,Uqe(zqe));var o=Vqe(e,function(i,a,s){var l=SD(t,function(c){return c(i)});return{criteria:l,index:++r,value:i}});return Hqe(o,function(i,a){return Wqe(i,a,n)})}var Yqe=Kqe;function Qqe(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var Xqe=Qqe,Jqe=Xqe,C8=Math.max;function Zqe(e,t,n){return t=C8(t===void 0?e.length-1:t,0),function(){for(var r=arguments,o=-1,i=C8(r.length-t,0),a=Array(i);++o0){if(++t>=c7e)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var p7e=f7e,h7e=l7e,g7e=p7e,m7e=g7e(h7e),y7e=m7e,v7e=Hb,b7e=e7e,w7e=y7e;function x7e(e,t){return w7e(b7e(e,t,v7e),e+"")}var S7e=x7e,C7e=Az,E7e=GC,P7e=Hz,T7e=Ap;function I7e(e,t,n){if(!T7e(n))return!1;var r=typeof t;return(r=="number"?E7e(n)&&P7e(t,n.length):r=="string"&&t in n)?C7e(n[t],e):!1}var Lk=I7e,O7e=lie,A7e=Yqe,k7e=S7e,P8=Lk,M7e=k7e(function(e,t){if(e==null)return[];var n=t.length;return n>1&&P8(e,t[0],t[1])?t=[]:n>2&&P8(t[0],t[1],t[2])&&(t=[t[0]]),A7e(e,O7e(t,1),[])}),R7e=M7e;const qz=Bn(R7e);function aS(e){"@babel/helpers - typeof";return aS=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},aS(e)}function XN(){return XN=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=t.x),"".concat(rw,"-left"),ut(n)&&t&&ut(t.x)&&n=t.y),"".concat(rw,"-top"),ut(r)&&t&&ut(t.y)&&rm?Math.max(u,l[r]):Math.max(d,l[r])}function q7e(e){var t=e.translateX,n=e.translateY,r=e.useTranslate3d;return{transform:r?"translate3d(".concat(t,"px, ").concat(n,"px, 0)"):"translate(".concat(t,"px, ").concat(n,"px)")}}function K7e(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.offsetTopLeft,o=e.position,i=e.reverseDirection,a=e.tooltipBox,s=e.useTranslate3d,l=e.viewBox,c,u,d;return a.height>0&&a.width>0&&n?(u=O8({allowEscapeViewBox:t,coordinate:n,key:"x",offsetTopLeft:r,position:o,reverseDirection:i,tooltipDimension:a.width,viewBox:l,viewBoxDimension:l.width}),d=O8({allowEscapeViewBox:t,coordinate:n,key:"y",offsetTopLeft:r,position:o,reverseDirection:i,tooltipDimension:a.height,viewBox:l,viewBoxDimension:l.height}),c=q7e({translateX:u,translateY:d,useTranslate3d:s})):c=W7e,{cssProperties:c,cssClasses:G7e({translateX:u,translateY:d,coordinate:n})}}function Rv(e){"@babel/helpers - typeof";return Rv=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Rv(e)}function A8(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function k8(e){for(var t=1;tM8||Math.abs(r.height-this.state.lastBoundingBox.height)>M8)&&this.setState({lastBoundingBox:{width:r.width,height:r.height}})}else(this.state.lastBoundingBox.width!==-1||this.state.lastBoundingBox.height!==-1)&&this.setState({lastBoundingBox:{width:-1,height:-1}})}},{key:"componentDidMount",value:function(){document.addEventListener("keydown",this.handleKeyDown),this.updateBBox()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.handleKeyDown)}},{key:"componentDidUpdate",value:function(){var r,o;this.props.active&&this.updateBBox(),this.state.dismissed&&(((r=this.props.coordinate)===null||r===void 0?void 0:r.x)!==this.state.dismissedAtCoordinate.x||((o=this.props.coordinate)===null||o===void 0?void 0:o.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var r=this,o=this.props,i=o.active,a=o.allowEscapeViewBox,s=o.animationDuration,l=o.animationEasing,c=o.children,u=o.coordinate,d=o.hasPayload,f=o.isAnimationActive,p=o.offset,h=o.position,m=o.reverseDirection,y=o.useTranslate3d,w=o.viewBox,x=o.wrapperStyle,C=K7e({allowEscapeViewBox:a,coordinate:u,offsetTopLeft:p,position:h,reverseDirection:m,tooltipBox:this.state.lastBoundingBox,useTranslate3d:y,viewBox:w}),E=C.cssClasses,P=C.cssProperties,T=k8(k8({transition:f&&i?"transform ".concat(s,"ms ").concat(l):void 0},P),{},{pointerEvents:"none",visibility:!this.state.dismissed&&i&&d?"visible":"hidden",position:"absolute",top:0,left:0},x);return Y.createElement("div",{tabIndex:-1,className:E,style:T,ref:function(A){r.wrapperNode=A}},c)}}])}(v.PureComponent),oKe=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},xl={isSsr:oKe(),get:function(t){return xl[t]},set:function(t,n){if(typeof t=="string")xl[t]=n;else{var r=Object.keys(t);r&&r.length&&r.forEach(function(o){xl[o]=t[o]})}}};function $v(e){"@babel/helpers - typeof";return $v=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},$v(e)}function R8(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function $8(e){for(var t=1;t0;return Y.createElement(rKe,{allowEscapeViewBox:a,animationDuration:s,animationEasing:l,isAnimationActive:f,active:i,coordinate:u,hasPayload:T,offset:p,position:y,reverseDirection:w,useTranslate3d:x,viewBox:C,wrapperStyle:E},hKe(c,$8($8({},this.props),{},{payload:P})))}}])}(v.PureComponent);Kz(is,"displayName","Tooltip");Kz(is,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!xl.isSsr,itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,viewBox:{x:0,y:0,height:0,width:0},wrapperStyle:{}});var gKe=Eu,mKe=function(){return gKe.Date.now()},yKe=mKe,vKe=/\s/;function bKe(e){for(var t=e.length;t--&&vKe.test(e.charAt(t)););return t}var wKe=bKe,xKe=wKe,SKe=/^\s+/;function CKe(e){return e&&e.slice(0,xKe(e)+1).replace(SKe,"")}var EKe=CKe,PKe=EKe,D8=Ap,TKe=_b,_8=NaN,IKe=/^[-+]0x[0-9a-f]+$/i,OKe=/^0b[01]+$/i,AKe=/^0o[0-7]+$/i,kKe=parseInt;function MKe(e){if(typeof e=="number")return e;if(TKe(e))return _8;if(D8(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=D8(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=PKe(e);var n=OKe.test(e);return n||AKe.test(e)?kKe(e.slice(2),n?2:8):IKe.test(e)?_8:+e}var mie=MKe,RKe=Ap,ED=yKe,N8=mie,$Ke="Expected a function",DKe=Math.max,_Ke=Math.min;function NKe(e,t,n){var r,o,i,a,s,l,c=0,u=!1,d=!1,f=!0;if(typeof e!="function")throw new TypeError($Ke);t=N8(t)||0,RKe(n)&&(u=!!n.leading,d="maxWait"in n,i=d?DKe(N8(n.maxWait)||0,t):i,f="trailing"in n?!!n.trailing:f);function p(T){var I=r,A=o;return r=o=void 0,c=T,a=e.apply(A,I),a}function h(T){return c=T,s=setTimeout(w,t),u?p(T):a}function m(T){var I=T-l,A=T-c,k=t-I;return d?_Ke(k,i-A):k}function y(T){var I=T-l,A=T-c;return l===void 0||I>=t||I<0||d&&A>=i}function w(){var T=ED();if(y(T))return x(T);s=setTimeout(w,m(T))}function x(T){return s=void 0,f&&r?p(T):(r=o=void 0,a)}function C(){s!==void 0&&clearTimeout(s),c=0,r=l=o=s=void 0}function E(){return s===void 0?a:x(ED())}function P(){var T=ED(),I=y(T);if(r=arguments,o=this,l=T,I){if(s===void 0)return h(l);if(d)return clearTimeout(s),s=setTimeout(w,t),p(l)}return s===void 0&&(s=setTimeout(w,t)),a}return P.cancel=C,P.flush=E,P}var LKe=NKe,FKe=LKe,jKe=Ap,BKe="Expected a function";function zKe(e,t,n){var r=!0,o=!0;if(typeof e!="function")throw new TypeError(BKe);return jKe(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),FKe(e,t,{leading:r,maxWait:t,trailing:o})}var VKe=zKe;const Fk=Bn(VKe);function lS(e){"@babel/helpers - typeof";return lS=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},lS(e)}function L8(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function QE(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&(L=Fk(L,m,{trailing:!0,leading:!1}));var j=new ResizeObserver(L),D=P.current.getBoundingClientRect(),_=D.width,z=D.height;return $(_,z),j.observe(P.current),function(){j.disconnect()}},[$,m]);var N=v.useMemo(function(){var L=k.containerWidth,j=k.containerHeight;if(L<0||j<0)return null;xc(_h(a)||_h(l),`The width(%s) and height(%s) are both fixed numbers, - maybe you don't need to use a ResponsiveContainer.`,a,l),xc(!n||n>0,"The aspect(%s) must be greater than zero.",n);var D=_h(a)?L:a,_=_h(l)?j:l;n&&n>0&&(D?_=D/n:_&&(D=_*n),f&&_>f&&(_=f)),xc(D>0||_>0,`The width(%s) and height(%s) of chart should be greater than 0, + H`).concat(Qs,"M").concat(2*s,",").concat(i,` + A`).concat(a,",").concat(a,",0,1,1,").concat(s,",").concat(i),className:"recharts-legend-icon"});if(r.type==="rect")return Y.createElement("path",{stroke:"none",fill:l,d:"M0,".concat(Qs/8,"h").concat(Qs,"v").concat(Qs*3/4,"h").concat(-Qs,"z"),className:"recharts-legend-icon"});if(Y.isValidElement(r.legendIcon)){var c=G4e({},r);return delete c.legendIcon,Y.cloneElement(r.legendIcon,c)}return Y.createElement(Vk,{fill:l,cx:i,cy:i,size:Qs,sizeType:"diameter",type:r.type})}},{key:"renderItems",value:function(){var r=this,o=this.props,i=o.payload,a=o.iconSize,s=o.layout,l=o.formatter,c=o.inactiveColor,u={x:0,y:0,width:Qs,height:Qs},d={display:s==="horizontal"?"inline-block":"block",marginRight:10},f={display:"inline-block",verticalAlign:"middle",marginRight:4};return i.map(function(p,h){var m=p.formatter||l,y=de(uS(uS({"recharts-legend-item":!0},"legend-item-".concat(h),!0),"inactive",p.inactive));if(p.type==="none")return null;var w=Jt(p.value)?null:p.value;Cc(!Jt(p.value),`The name property is also required when using a function for the dataKey of a chart's cartesian components. Ex: `);var x=p.inactive?c:p.color;return Y.createElement("li",KN({className:y,style:d,key:"legend-item-".concat(h)},up(r.props,p,h)),Y.createElement(jN,{width:a,height:a,viewBox:u,style:f},r.renderIcon(p)),Y.createElement("span",{className:"recharts-legend-item-text",style:{color:x}},m?m(w,p,h):w))})}},{key:"render",value:function(){var r=this.props,o=r.payload,i=r.layout,a=r.align;if(!o||!o.length)return null;var s={padding:0,margin:0,textAlign:i==="horizontal"?a:"left"};return Y.createElement("ul",{className:"recharts-default-legend",style:s},this.renderItems())}}])}(v.PureComponent);uS(Uz,"displayName","Legend");uS(Uz,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var tWe=_k;function nWe(){this.__data__=new tWe,this.size=0}var rWe=nWe;function oWe(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}var iWe=oWe;function aWe(e){return this.__data__.get(e)}var sWe=aWe;function lWe(e){return this.__data__.has(e)}var cWe=lWe,uWe=_k,dWe=Dz,fWe=_z,pWe=200;function hWe(e,t){var n=this.__data__;if(n instanceof uWe){var r=n.__data__;if(!dWe||r.lengths))return!1;var c=i.get(e),u=i.get(t);if(c&&u)return c==t&&u==e;var d=-1,f=!0,p=n&NWe?new RWe:void 0;for(i.set(e,t),i.set(t,e);++d-1&&e%1==0&&e-1&&e%1==0&&e<=B6e}var Kz=z6e,V6e=$d,H6e=Kz,U6e=Dd,W6e="[object Arguments]",G6e="[object Array]",q6e="[object Boolean]",K6e="[object Date]",Y6e="[object Error]",Q6e="[object Function]",X6e="[object Map]",J6e="[object Number]",Z6e="[object Object]",eGe="[object RegExp]",tGe="[object Set]",nGe="[object String]",rGe="[object WeakMap]",oGe="[object ArrayBuffer]",iGe="[object DataView]",aGe="[object Float32Array]",sGe="[object Float64Array]",lGe="[object Int8Array]",cGe="[object Int16Array]",uGe="[object Int32Array]",dGe="[object Uint8Array]",fGe="[object Uint8ClampedArray]",pGe="[object Uint16Array]",hGe="[object Uint32Array]",Nr={};Nr[aGe]=Nr[sGe]=Nr[lGe]=Nr[cGe]=Nr[uGe]=Nr[dGe]=Nr[fGe]=Nr[pGe]=Nr[hGe]=!0;Nr[W6e]=Nr[G6e]=Nr[oGe]=Nr[q6e]=Nr[iGe]=Nr[K6e]=Nr[Y6e]=Nr[Q6e]=Nr[X6e]=Nr[J6e]=Nr[Z6e]=Nr[eGe]=Nr[tGe]=Nr[nGe]=Nr[rGe]=!1;function gGe(e){return U6e(e)&&H6e(e.length)&&!!Nr[V6e(e)]}var mGe=gGe;function yGe(e){return function(t){return e(t)}}var rie=yGe,AI={exports:{}};AI.exports;(function(e,t){var n=foe,r=t&&!t.nodeType&&t,o=r&&!0&&e&&!e.nodeType&&e,i=o&&o.exports===r,a=i&&n.process,s=function(){try{var l=o&&o.require&&o.require("util").types;return l||a&&a.binding&&a.binding("util")}catch{}}();e.exports=s})(AI,AI.exports);var vGe=AI.exports,bGe=mGe,wGe=rie,a8=vGe,s8=a8&&a8.isTypedArray,xGe=s8?wGe(s8):bGe,oie=xGe,SGe=P6e,CGe=Gz,EGe=za,PGe=nie,TGe=qz,IGe=oie,OGe=Object.prototype,AGe=OGe.hasOwnProperty;function kGe(e,t){var n=EGe(e),r=!n&&CGe(e),o=!n&&!r&&PGe(e),i=!n&&!r&&!o&&IGe(e),a=n||r||o||i,s=a?SGe(e.length,String):[],l=s.length;for(var c in e)(t||AGe.call(e,c))&&!(a&&(c=="length"||o&&(c=="offset"||c=="parent")||i&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||TGe(c,l)))&&s.push(c);return s}var MGe=kGe,RGe=Object.prototype;function $Ge(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||RGe;return e===n}var DGe=$Ge;function _Ge(e,t){return function(n){return e(t(n))}}var iie=_Ge,NGe=iie,LGe=NGe(Object.keys,Object),FGe=LGe,jGe=DGe,BGe=FGe,zGe=Object.prototype,VGe=zGe.hasOwnProperty;function HGe(e){if(!jGe(e))return BGe(e);var t=[];for(var n in Object(e))VGe.call(e,n)&&n!="constructor"&&t.push(n);return t}var UGe=HGe,WGe=Rz,GGe=Kz;function qGe(e){return e!=null&&GGe(e.length)&&!WGe(e)}var n1=qGe,KGe=MGe,YGe=UGe,QGe=n1;function XGe(e){return QGe(e)?KGe(e):YGe(e)}var Hk=XGe,JGe=p6e,ZGe=C6e,e8e=Hk;function t8e(e){return JGe(e,e8e,ZGe)}var n8e=t8e,l8=n8e,r8e=1,o8e=Object.prototype,i8e=o8e.hasOwnProperty;function a8e(e,t,n,r,o,i){var a=n&r8e,s=l8(e),l=s.length,c=l8(t),u=c.length;if(l!=u&&!a)return!1;for(var d=l;d--;){var f=s[d];if(!(a?f in t:i8e.call(t,f)))return!1}var p=i.get(e),h=i.get(t);if(p&&h)return p==t&&h==e;var m=!0;i.set(e,t),i.set(t,e);for(var y=a;++d-1}var oqe=rqe;function iqe(e,t,n){for(var r=-1,o=e==null?0:e.length;++r=wqe){var c=t?null:vqe(e);if(c)return bqe(c);a=!1,o=yqe,l=new hqe}else l=t?[]:s;e:for(;++r=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Nqe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Lqe(e){return e.value}function Fqe(e,t){if(Y.isValidElement(e))return Y.cloneElement(e,t);if(typeof e=="function")return Y.createElement(e,t);t.ref;var n=_qe(t,Iqe);return Y.createElement(Uz,n)}var E8=1,ud=function(e){function t(){var n;Oqe(this,t);for(var r=arguments.length,o=new Array(r),i=0;iE8||Math.abs(o.height-this.lastBoundingBox.height)>E8)&&(this.lastBoundingBox.width=o.width,this.lastBoundingBox.height=o.height,r&&r(o)):(this.lastBoundingBox.width!==-1||this.lastBoundingBox.height!==-1)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,r&&r(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?Hu({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(r){var o=this.props,i=o.layout,a=o.align,s=o.verticalAlign,l=o.margin,c=o.chartWidth,u=o.chartHeight,d,f;if(!r||(r.left===void 0||r.left===null)&&(r.right===void 0||r.right===null))if(a==="center"&&i==="vertical"){var p=this.getBBoxSnapshot();d={left:((c||0)-p.width)/2}}else d=a==="right"?{right:l&&l.right||0}:{left:l&&l.left||0};if(!r||(r.top===void 0||r.top===null)&&(r.bottom===void 0||r.bottom===null))if(s==="middle"){var h=this.getBBoxSnapshot();f={top:((u||0)-h.height)/2}}else f=s==="bottom"?{bottom:l&&l.bottom||0}:{top:l&&l.top||0};return Hu(Hu({},d),f)}},{key:"render",value:function(){var r=this,o=this.props,i=o.content,a=o.width,s=o.height,l=o.wrapperStyle,c=o.payloadUniqBy,u=o.payload,d=Hu(Hu({position:"absolute",width:a||"auto",height:s||"auto"},this.getDefaultPosition(l)),l);return Y.createElement("div",{className:"recharts-legend-wrapper",style:d,ref:function(p){r.wrapperNode=p}},Fqe(i,Hu(Hu({},this.props),{},{payload:fie(u,c,Lqe)})))}}],[{key:"getWithHeight",value:function(r,o){var i=Hu(Hu({},this.defaultProps),r.props),a=i.layout;return a==="vertical"&&ut(r.props.height)?{height:r.props.height}:a==="horizontal"?{width:r.props.width||o}:null}}])}(v.PureComponent);Uk(ud,"displayName","Legend");Uk(ud,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var P8=e1,jqe=Gz,Bqe=za,T8=P8?P8.isConcatSpreadable:void 0;function zqe(e){return Bqe(e)||jqe(e)||!!(T8&&e&&e[T8])}var Vqe=zqe,Hqe=eie,Uqe=Vqe;function gie(e,t,n,r,o){var i=-1,a=e.length;for(n||(n=Uqe),o||(o=[]);++i0&&n(s)?t>1?gie(s,t-1,n,r,o):Hqe(o,s):r||(o[o.length]=s)}return o}var mie=gie;function Wqe(e){return function(t,n,r){for(var o=-1,i=Object(t),a=r(t),s=a.length;s--;){var l=a[e?s:++o];if(n(i[l],l,i)===!1)break}return t}}var Gqe=Wqe,qqe=Gqe,Kqe=qqe(),Yqe=Kqe,Qqe=Yqe,Xqe=Hk;function Jqe(e,t){return e&&Qqe(e,t,Xqe)}var yie=Jqe,Zqe=n1;function e7e(e,t){return function(n,r){if(n==null)return n;if(!Zqe(n))return e(n,r);for(var o=n.length,i=t?o:-1,a=Object(n);(t?i--:++it||i&&a&&l&&!s&&!c||r&&a&&l||!n&&l||!o)return 1;if(!r&&!i&&!c&&e=s)return l;var c=n[r];return l*(c=="desc"?-1:1)}}return e.index-t.index}var h7e=p7e,OD=Lz,g7e=Fz,m7e=Tu,y7e=vie,v7e=c7e,b7e=rie,w7e=h7e,x7e=qb,S7e=za;function C7e(e,t,n){t.length?t=OD(t,function(i){return S7e(i)?function(a){return g7e(a,i.length===1?i[0]:i)}:i}):t=[x7e];var r=-1;t=OD(t,b7e(m7e));var o=y7e(e,function(i,a,s){var l=OD(t,function(c){return c(i)});return{criteria:l,index:++r,value:i}});return v7e(o,function(i,a){return w7e(i,a,n)})}var E7e=C7e;function P7e(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var T7e=P7e,I7e=T7e,O8=Math.max;function O7e(e,t,n){return t=O8(t===void 0?e.length-1:t,0),function(){for(var r=arguments,o=-1,i=O8(r.length-t,0),a=Array(i);++o0){if(++t>=F7e)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var V7e=z7e,H7e=L7e,U7e=V7e,W7e=U7e(H7e),G7e=W7e,q7e=qb,K7e=A7e,Y7e=G7e;function Q7e(e,t){return Y7e(K7e(e,t,q7e),e+"")}var X7e=Q7e,J7e=$z,Z7e=n1,eKe=qz,tKe=Mp;function nKe(e,t,n){if(!tKe(n))return!1;var r=typeof t;return(r=="number"?Z7e(n)&&eKe(t,n.length):r=="string"&&t in n)?J7e(n[t],e):!1}var Wk=nKe,rKe=mie,oKe=E7e,iKe=X7e,k8=Wk,aKe=iKe(function(e,t){if(e==null)return[];var n=t.length;return n>1&&k8(e,t[0],t[1])?t=[]:n>2&&k8(t[0],t[1],t[2])&&(t=[t[0]]),oKe(e,rKe(t,1),[])}),sKe=aKe;const Xz=Bn(sKe);function dS(e){"@babel/helpers - typeof";return dS=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},dS(e)}function nL(){return nL=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=t.x),"".concat(lw,"-left"),ut(n)&&t&&ut(t.x)&&n=t.y),"".concat(lw,"-top"),ut(r)&&t&&ut(t.y)&&rm?Math.max(u,l[r]):Math.max(d,l[r])}function SKe(e){var t=e.translateX,n=e.translateY,r=e.useTranslate3d;return{transform:r?"translate3d(".concat(t,"px, ").concat(n,"px, 0)"):"translate(".concat(t,"px, ").concat(n,"px)")}}function CKe(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.offsetTopLeft,o=e.position,i=e.reverseDirection,a=e.tooltipBox,s=e.useTranslate3d,l=e.viewBox,c,u,d;return a.height>0&&a.width>0&&n?(u=$8({allowEscapeViewBox:t,coordinate:n,key:"x",offsetTopLeft:r,position:o,reverseDirection:i,tooltipDimension:a.width,viewBox:l,viewBoxDimension:l.width}),d=$8({allowEscapeViewBox:t,coordinate:n,key:"y",offsetTopLeft:r,position:o,reverseDirection:i,tooltipDimension:a.height,viewBox:l,viewBoxDimension:l.height}),c=SKe({translateX:u,translateY:d,useTranslate3d:s})):c=wKe,{cssProperties:c,cssClasses:xKe({translateX:u,translateY:d,coordinate:n})}}function Dv(e){"@babel/helpers - typeof";return Dv=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Dv(e)}function D8(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function _8(e){for(var t=1;tN8||Math.abs(r.height-this.state.lastBoundingBox.height)>N8)&&this.setState({lastBoundingBox:{width:r.width,height:r.height}})}else(this.state.lastBoundingBox.width!==-1||this.state.lastBoundingBox.height!==-1)&&this.setState({lastBoundingBox:{width:-1,height:-1}})}},{key:"componentDidMount",value:function(){document.addEventListener("keydown",this.handleKeyDown),this.updateBBox()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.handleKeyDown)}},{key:"componentDidUpdate",value:function(){var r,o;this.props.active&&this.updateBBox(),this.state.dismissed&&(((r=this.props.coordinate)===null||r===void 0?void 0:r.x)!==this.state.dismissedAtCoordinate.x||((o=this.props.coordinate)===null||o===void 0?void 0:o.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var r=this,o=this.props,i=o.active,a=o.allowEscapeViewBox,s=o.animationDuration,l=o.animationEasing,c=o.children,u=o.coordinate,d=o.hasPayload,f=o.isAnimationActive,p=o.offset,h=o.position,m=o.reverseDirection,y=o.useTranslate3d,w=o.viewBox,x=o.wrapperStyle,S=CKe({allowEscapeViewBox:a,coordinate:u,offsetTopLeft:p,position:h,reverseDirection:m,tooltipBox:this.state.lastBoundingBox,useTranslate3d:y,viewBox:w}),E=S.cssClasses,P=S.cssProperties,T=_8(_8({transition:f&&i?"transform ".concat(s,"ms ").concat(l):void 0},P),{},{pointerEvents:"none",visibility:!this.state.dismissed&&i&&d?"visible":"hidden",position:"absolute",top:0,left:0},x);return Y.createElement("div",{tabIndex:-1,className:E,style:T,ref:function(A){r.wrapperNode=A}},c)}}])}(v.PureComponent),$Ke=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},El={isSsr:$Ke(),get:function(t){return El[t]},set:function(t,n){if(typeof t=="string")El[t]=n;else{var r=Object.keys(t);r&&r.length&&r.forEach(function(o){El[o]=t[o]})}}};function _v(e){"@babel/helpers - typeof";return _v=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_v(e)}function L8(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function F8(e){for(var t=1;t0;return Y.createElement(RKe,{allowEscapeViewBox:a,animationDuration:s,animationEasing:l,isAnimationActive:f,active:i,coordinate:u,hasPayload:T,offset:p,position:y,reverseDirection:w,useTranslate3d:x,viewBox:S,wrapperStyle:E},HKe(c,F8(F8({},this.props),{},{payload:P})))}}])}(v.PureComponent);Jz(ss,"displayName","Tooltip");Jz(ss,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!El.isSsr,itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,viewBox:{x:0,y:0,height:0,width:0},wrapperStyle:{}});var UKe=Pu,WKe=function(){return UKe.Date.now()},GKe=WKe,qKe=/\s/;function KKe(e){for(var t=e.length;t--&&qKe.test(e.charAt(t)););return t}var YKe=KKe,QKe=YKe,XKe=/^\s+/;function JKe(e){return e&&e.slice(0,QKe(e)+1).replace(XKe,"")}var ZKe=JKe,eYe=ZKe,j8=Mp,tYe=jb,B8=NaN,nYe=/^[-+]0x[0-9a-f]+$/i,rYe=/^0b[01]+$/i,oYe=/^0o[0-7]+$/i,iYe=parseInt;function aYe(e){if(typeof e=="number")return e;if(tYe(e))return B8;if(j8(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=j8(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=eYe(e);var n=rYe.test(e);return n||oYe.test(e)?iYe(e.slice(2),n?2:8):nYe.test(e)?B8:+e}var Eie=aYe,sYe=Mp,kD=GKe,z8=Eie,lYe="Expected a function",cYe=Math.max,uYe=Math.min;function dYe(e,t,n){var r,o,i,a,s,l,c=0,u=!1,d=!1,f=!0;if(typeof e!="function")throw new TypeError(lYe);t=z8(t)||0,sYe(n)&&(u=!!n.leading,d="maxWait"in n,i=d?cYe(z8(n.maxWait)||0,t):i,f="trailing"in n?!!n.trailing:f);function p(T){var I=r,A=o;return r=o=void 0,c=T,a=e.apply(A,I),a}function h(T){return c=T,s=setTimeout(w,t),u?p(T):a}function m(T){var I=T-l,A=T-c,k=t-I;return d?uYe(k,i-A):k}function y(T){var I=T-l,A=T-c;return l===void 0||I>=t||I<0||d&&A>=i}function w(){var T=kD();if(y(T))return x(T);s=setTimeout(w,m(T))}function x(T){return s=void 0,f&&r?p(T):(r=o=void 0,a)}function S(){s!==void 0&&clearTimeout(s),c=0,r=l=o=s=void 0}function E(){return s===void 0?a:x(kD())}function P(){var T=kD(),I=y(T);if(r=arguments,o=this,l=T,I){if(s===void 0)return h(l);if(d)return clearTimeout(s),s=setTimeout(w,t),p(l)}return s===void 0&&(s=setTimeout(w,t)),a}return P.cancel=S,P.flush=E,P}var fYe=dYe,pYe=fYe,hYe=Mp,gYe="Expected a function";function mYe(e,t,n){var r=!0,o=!0;if(typeof e!="function")throw new TypeError(gYe);return hYe(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),pYe(e,t,{leading:r,maxWait:t,trailing:o})}var yYe=mYe;const Gk=Bn(yYe);function pS(e){"@babel/helpers - typeof";return pS=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},pS(e)}function V8(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function sP(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&(L=Gk(L,m,{trailing:!0,leading:!1}));var j=new ResizeObserver(L),D=P.current.getBoundingClientRect(),_=D.width,z=D.height;return $(_,z),j.observe(P.current),function(){j.disconnect()}},[$,m]);var N=v.useMemo(function(){var L=k.containerWidth,j=k.containerHeight;if(L<0||j<0)return null;Cc(Nh(a)||Nh(l),`The width(%s) and height(%s) are both fixed numbers, + maybe you don't need to use a ResponsiveContainer.`,a,l),Cc(!n||n>0,"The aspect(%s) must be greater than zero.",n);var D=Nh(a)?L:a,_=Nh(l)?j:l;n&&n>0&&(D?_=D/n:_&&(D=_*n),f&&_>f&&(_=f)),Cc(D>0||_>0,`The width(%s) and height(%s) of chart should be greater than 0, please check the style of container, or the props width(%s) and height(%s), or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the - height and width.`,D,_,a,l,u,d,n);var z=!Array.isArray(p)&&ld(p.type).endsWith("Chart");return Y.Children.map(p,function(F){return Y.isValidElement(F)?v.cloneElement(F,QE({width:D,height:_},z?{style:QE({height:"100%",width:"100%",maxHeight:_,maxWidth:D},F.props.style)}:{})):F})},[n,p,l,f,d,u,k,a]);return Y.createElement("div",{id:y?"".concat(y):void 0,className:de("recharts-responsive-container",w),style:QE(QE({},E),{},{width:a,height:l,minWidth:u,minHeight:d,maxHeight:f}),ref:P},N)}),Ub=function(t){return null};Ub.displayName="Cell";function cS(e){"@babel/helpers - typeof";return cS=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},cS(e)}function j8(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function tL(e){for(var t=1;t1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||xl.isSsr)return{width:0,height:0};var r=nYe(n),o=JSON.stringify({text:t,copyStyle:r});if(Mm.widthCache[o])return Mm.widthCache[o];try{var i=document.getElementById(B8);i||(i=document.createElement("span"),i.setAttribute("id",B8),i.setAttribute("aria-hidden","true"),document.body.appendChild(i));var a=tL(tL({},tYe),r);Object.assign(i.style,a),i.textContent="".concat(t);var s=i.getBoundingClientRect(),l={width:s.width,height:s.height};return Mm.widthCache[o]=l,++Mm.cacheCount>eYe&&(Mm.cacheCount=0,Mm.widthCache={}),l}catch{return{width:0,height:0}}},rYe=function(t){return{top:t.top+window.scrollY-document.documentElement.clientTop,left:t.left+window.scrollX-document.documentElement.clientLeft}};function uS(e){"@babel/helpers - typeof";return uS=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},uS(e)}function xI(e,t){return sYe(e)||aYe(e,t)||iYe(e,t)||oYe()}function oYe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function iYe(e,t){if(e){if(typeof e=="string")return z8(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return z8(e,t)}}function z8(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function xYe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function q8(e,t){return PYe(e)||EYe(e,t)||CYe(e,t)||SYe()}function SYe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function CYe(e,t){if(e){if(typeof e=="string")return K8(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return K8(e,t)}}function K8(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&arguments[0]!==void 0?arguments[0]:[];return D.reduce(function(_,z){var F=z.word,V=z.width,U=_[_.length-1];if(U&&(o==null||i||U.width+V+rz.width?_:z})};if(!u)return p;for(var m="…",y=function(D){var _=d.slice(0,D),z=wie({breakAll:c,style:l,children:_+m}).wordsWithComputedWidth,F=f(z),V=F.length>a||h(F).width>Number(o);return[V,F]},w=0,x=d.length-1,C=0,E;w<=x&&C<=d.length-1;){var P=Math.floor((w+x)/2),T=P-1,I=y(T),A=q8(I,2),k=A[0],O=A[1],$=y(P),N=q8($,1),L=N[0];if(!k&&!L&&(w=P+1),k&&L&&(x=P-1),!k&&L){E=O;break}C++}return E||p},Y8=function(t){var n=Kt(t)?[]:t.toString().split(bie);return[{words:n}]},IYe=function(t){var n=t.width,r=t.scaleToFit,o=t.children,i=t.style,a=t.breakAll,s=t.maxLines;if((n||r)&&!xl.isSsr){var l,c,u=wie({breakAll:a,children:o,style:i});if(u){var d=u.wordsWithComputedWidth,f=u.spaceWidth;l=d,c=f}else return Y8(o);return TYe({breakAll:a,children:o,maxLines:s,style:i},l,c,n,r)}return Y8(o)},Q8="#808080",yg=function(t){var n=t.x,r=n===void 0?0:n,o=t.y,i=o===void 0?0:o,a=t.lineHeight,s=a===void 0?"1em":a,l=t.capHeight,c=l===void 0?"0.71em":l,u=t.scaleToFit,d=u===void 0?!1:u,f=t.textAnchor,p=f===void 0?"start":f,h=t.verticalAnchor,m=h===void 0?"end":h,y=t.fill,w=y===void 0?Q8:y,x=G8(t,bYe),C=v.useMemo(function(){return IYe({breakAll:x.breakAll,children:x.children,maxLines:x.maxLines,scaleToFit:d,style:x.style,width:x.width})},[x.breakAll,x.children,x.maxLines,d,x.style,x.width]),E=x.dx,P=x.dy,T=x.angle,I=x.className,A=x.breakAll,k=G8(x,wYe);if(!zo(r)||!zo(i))return null;var O=r+(ut(E)?E:0),$=i+(ut(P)?P:0),N;switch(m){case"start":N=PD("calc(".concat(c,")"));break;case"middle":N=PD("calc(".concat((C.length-1)/2," * -").concat(s," + (").concat(c," / 2))"));break;default:N=PD("calc(".concat(C.length-1," * -").concat(s,")"));break}var L=[];if(d){var j=C[0].width,D=x.width;L.push("scale(".concat((ut(D)?D/j:1)/j,")"))}return T&&L.push("rotate(".concat(T,", ").concat(O,", ").concat($,")")),L.length&&(k.transform=L.join(" ")),Y.createElement("text",nL({},_t(k,!0),{x:O,y:$,className:de("recharts-text",I),textAnchor:p,fill:w.includes("url")?Q8:w}),C.map(function(_,z){var F=_.words.join(A?"":" ");return Y.createElement("tspan",{x:O,dy:z===0?N:s,key:"".concat(F,"-").concat(z)},F)}))};function qf(e,t){return e==null||t==null?NaN:et?1:e>=t?0:NaN}function OYe(e,t){return e==null||t==null?NaN:te?1:t>=e?0:NaN}function Yz(e){let t,n,r;e.length!==2?(t=qf,n=(s,l)=>qf(e(s),l),r=(s,l)=>e(s)-l):(t=e===qf||e===OYe?e:AYe,n=e,r=e);function o(s,l,c=0,u=s.length){if(c>>1;n(s[d],l)<0?c=d+1:u=d}while(c>>1;n(s[d],l)<=0?c=d+1:u=d}while(cc&&r(s[d-1],l)>-r(s[d],l)?d-1:d}return{left:o,center:a,right:i}}function AYe(){return 0}function xie(e){return e===null?NaN:+e}function*kYe(e,t){for(let n of e)n!=null&&(n=+n)>=n&&(yield n)}const MYe=Yz(qf),qC=MYe.right;Yz(xie).center;class X8 extends Map{constructor(t,n=DYe){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),t!=null)for(const[r,o]of t)this.set(r,o)}get(t){return super.get(J8(this,t))}has(t){return super.has(J8(this,t))}set(t,n){return super.set(RYe(this,t),n)}delete(t){return super.delete($Ye(this,t))}}function J8({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function RYe({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function $Ye({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function DYe(e){return e!==null&&typeof e=="object"?e.valueOf():e}function _Ye(e=qf){if(e===qf)return Sie;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,n)=>{const r=e(t,n);return r||r===0?r:(e(n,n)===0)-(e(t,t)===0)}}function Sie(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(et?1:0)}const NYe=Math.sqrt(50),LYe=Math.sqrt(10),FYe=Math.sqrt(2);function SI(e,t,n){const r=(t-e)/Math.max(0,n),o=Math.floor(Math.log10(r)),i=r/Math.pow(10,o),a=i>=NYe?10:i>=LYe?5:i>=FYe?2:1;let s,l,c;return o<0?(c=Math.pow(10,-o)/a,s=Math.round(e*c),l=Math.round(t*c),s/ct&&--l,c=-c):(c=Math.pow(10,o)*a,s=Math.round(e/c),l=Math.round(t/c),s*ct&&--l),l0))return[];if(e===t)return[e];const r=t=o))return[];const s=i-o+1,l=new Array(s);if(r)if(a<0)for(let c=0;c=r)&&(n=r);return n}function e9(e,t){let n;for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);return n}function Cie(e,t,n=0,r=1/0,o){if(t=Math.floor(t),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(e.length-1,r)),!(n<=t&&t<=r))return e;for(o=o===void 0?Sie:_Ye(o);r>n;){if(r-n>600){const l=r-n+1,c=t-n+1,u=Math.log(l),d=.5*Math.exp(2*u/3),f=.5*Math.sqrt(u*d*(l-d)/l)*(c-l/2<0?-1:1),p=Math.max(n,Math.floor(t-c*d/l+f)),h=Math.min(r,Math.floor(t+(l-c)*d/l+f));Cie(e,t,p,h,o)}const i=e[t];let a=n,s=r;for(ow(e,n,t),o(e[r],i)>0&&ow(e,n,r);a0;)--s}o(e[n],i)===0?ow(e,n,s):(++s,ow(e,s,r)),s<=t&&(n=s+1),t<=s&&(r=s-1)}return e}function ow(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function jYe(e,t,n){if(e=Float64Array.from(kYe(e)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return e9(e);if(t>=1)return Z8(e);var r,o=(r-1)*t,i=Math.floor(o),a=Z8(Cie(e,i).subarray(0,i+1)),s=e9(e.subarray(i+1));return a+(s-a)*(o-i)}}function BYe(e,t,n=xie){if(!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,o=(r-1)*t,i=Math.floor(o),a=+n(e[i],i,e),s=+n(e[i+1],i+1,e);return a+(s-a)*(o-i)}}function zYe(e,t,n){e=+e,t=+t,n=(o=arguments.length)<2?(t=e,e=0,1):o<3?1:+n;for(var r=-1,o=Math.max(0,Math.ceil((t-e)/n))|0,i=new Array(o);++r>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?JE(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?JE(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=HYe.exec(e))?new Ta(t[1],t[2],t[3],1):(t=UYe.exec(e))?new Ta(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=WYe.exec(e))?JE(t[1],t[2],t[3],t[4]):(t=GYe.exec(e))?JE(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=qYe.exec(e))?s9(t[1],t[2]/100,t[3]/100,1):(t=KYe.exec(e))?s9(t[1],t[2]/100,t[3]/100,t[4]):t9.hasOwnProperty(e)?o9(t9[e]):e==="transparent"?new Ta(NaN,NaN,NaN,0):null}function o9(e){return new Ta(e>>16&255,e>>8&255,e&255,1)}function JE(e,t,n,r){return r<=0&&(e=t=n=NaN),new Ta(e,t,n,r)}function XYe(e){return e instanceof KC||(e=hS(e)),e?(e=e.rgb(),new Ta(e.r,e.g,e.b,e.opacity)):new Ta}function sL(e,t,n,r){return arguments.length===1?XYe(e):new Ta(e,t,n,r??1)}function Ta(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}Xz(Ta,sL,Pie(KC,{brighter(e){return e=e==null?CI:Math.pow(CI,e),new Ta(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?fS:Math.pow(fS,e),new Ta(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Ta(eg(this.r),eg(this.g),eg(this.b),EI(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:i9,formatHex:i9,formatHex8:JYe,formatRgb:a9,toString:a9}));function i9(){return`#${Nh(this.r)}${Nh(this.g)}${Nh(this.b)}`}function JYe(){return`#${Nh(this.r)}${Nh(this.g)}${Nh(this.b)}${Nh((isNaN(this.opacity)?1:this.opacity)*255)}`}function a9(){const e=EI(this.opacity);return`${e===1?"rgb(":"rgba("}${eg(this.r)}, ${eg(this.g)}, ${eg(this.b)}${e===1?")":`, ${e})`}`}function EI(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function eg(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Nh(e){return e=eg(e),(e<16?"0":"")+e.toString(16)}function s9(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new fc(e,t,n,r)}function Tie(e){if(e instanceof fc)return new fc(e.h,e.s,e.l,e.opacity);if(e instanceof KC||(e=hS(e)),!e)return new fc;if(e instanceof fc)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,o=Math.min(t,n,r),i=Math.max(t,n,r),a=NaN,s=i-o,l=(i+o)/2;return s?(t===i?a=(n-r)/s+(n0&&l<1?0:a,new fc(a,s,l,e.opacity)}function ZYe(e,t,n,r){return arguments.length===1?Tie(e):new fc(e,t,n,r??1)}function fc(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}Xz(fc,ZYe,Pie(KC,{brighter(e){return e=e==null?CI:Math.pow(CI,e),new fc(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?fS:Math.pow(fS,e),new fc(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,o=2*n-r;return new Ta(TD(e>=240?e-240:e+120,o,r),TD(e,o,r),TD(e<120?e+240:e-120,o,r),this.opacity)},clamp(){return new fc(l9(this.h),ZE(this.s),ZE(this.l),EI(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=EI(this.opacity);return`${e===1?"hsl(":"hsla("}${l9(this.h)}, ${ZE(this.s)*100}%, ${ZE(this.l)*100}%${e===1?")":`, ${e})`}`}}));function l9(e){return e=(e||0)%360,e<0?e+360:e}function ZE(e){return Math.max(0,Math.min(1,e||0))}function TD(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const Jz=e=>()=>e;function eQe(e,t){return function(n){return e+n*t}}function tQe(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function nQe(e){return(e=+e)==1?Iie:function(t,n){return n-t?tQe(t,n,e):Jz(isNaN(t)?n:t)}}function Iie(e,t){var n=t-e;return n?eQe(e,n):Jz(isNaN(e)?t:e)}const c9=function e(t){var n=nQe(t);function r(o,i){var a=n((o=sL(o)).r,(i=sL(i)).r),s=n(o.g,i.g),l=n(o.b,i.b),c=Iie(o.opacity,i.opacity);return function(u){return o.r=a(u),o.g=s(u),o.b=l(u),o.opacity=c(u),o+""}}return r.gamma=e,r}(1);function rQe(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),o;return function(i){for(o=0;on&&(i=t.slice(n,i),s[a]?s[a]+=i:s[++a]=i),(r=r[0])===(o=o[0])?s[a]?s[a]+=o:s[++a]=o:(s[++a]=null,l.push({i:a,x:PI(r,o)})),n=ID.lastIndex;return nt&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function hQe(e,t,n){var r=e[0],o=e[1],i=t[0],a=t[1];return o2?gQe:hQe,l=c=null,d}function d(f){return f==null||isNaN(f=+f)?i:(l||(l=s(e.map(r),t,n)))(r(a(f)))}return d.invert=function(f){return a(o((c||(c=s(t,e.map(r),PI)))(f)))},d.domain=function(f){return arguments.length?(e=Array.from(f,TI),u()):e.slice()},d.range=function(f){return arguments.length?(t=Array.from(f),u()):t.slice()},d.rangeRound=function(f){return t=Array.from(f),n=Zz,u()},d.clamp=function(f){return arguments.length?(a=f?!0:ra,u()):a!==ra},d.interpolate=function(f){return arguments.length?(n=f,u()):n},d.unknown=function(f){return arguments.length?(i=f,d):i},function(f,p){return r=f,o=p,u()}}function eV(){return jk()(ra,ra)}function mQe(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function II(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function Dv(e){return e=II(Math.abs(e)),e?e[1]:NaN}function yQe(e,t){return function(n,r){for(var o=n.length,i=[],a=0,s=e[0],l=0;o>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),i.push(n.substring(o-=s,o+s)),!((l+=s+1)>r));)s=e[a=(a+1)%e.length];return i.reverse().join(t)}}function vQe(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var bQe=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function gS(e){if(!(t=bQe.exec(e)))throw new Error("invalid format: "+e);var t;return new tV({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}gS.prototype=tV.prototype;function tV(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}tV.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function wQe(e){e:for(var t=e.length,n=1,r=-1,o;n0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(o+1):e}var Oie;function xQe(e,t){var n=II(e,t);if(!n)return e+"";var r=n[0],o=n[1],i=o-(Oie=Math.max(-8,Math.min(8,Math.floor(o/3)))*3)+1,a=r.length;return i===a?r:i>a?r+new Array(i-a+1).join("0"):i>0?r.slice(0,i)+"."+r.slice(i):"0."+new Array(1-i).join("0")+II(e,Math.max(0,t+i-1))[0]}function d9(e,t){var n=II(e,t);if(!n)return e+"";var r=n[0],o=n[1];return o<0?"0."+new Array(-o).join("0")+r:r.length>o+1?r.slice(0,o+1)+"."+r.slice(o+1):r+new Array(o-r.length+2).join("0")}const f9={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:mQe,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>d9(e*100,t),r:d9,s:xQe,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function p9(e){return e}var h9=Array.prototype.map,g9=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function SQe(e){var t=e.grouping===void 0||e.thousands===void 0?p9:yQe(h9.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",r=e.currency===void 0?"":e.currency[1]+"",o=e.decimal===void 0?".":e.decimal+"",i=e.numerals===void 0?p9:vQe(h9.call(e.numerals,String)),a=e.percent===void 0?"%":e.percent+"",s=e.minus===void 0?"−":e.minus+"",l=e.nan===void 0?"NaN":e.nan+"";function c(d){d=gS(d);var f=d.fill,p=d.align,h=d.sign,m=d.symbol,y=d.zero,w=d.width,x=d.comma,C=d.precision,E=d.trim,P=d.type;P==="n"?(x=!0,P="g"):f9[P]||(C===void 0&&(C=12),E=!0,P="g"),(y||f==="0"&&p==="=")&&(y=!0,f="0",p="=");var T=m==="$"?n:m==="#"&&/[boxX]/.test(P)?"0"+P.toLowerCase():"",I=m==="$"?r:/[%p]/.test(P)?a:"",A=f9[P],k=/[defgprs%]/.test(P);C=C===void 0?6:/[gprs]/.test(P)?Math.max(1,Math.min(21,C)):Math.max(0,Math.min(20,C));function O($){var N=T,L=I,j,D,_;if(P==="c")L=A($)+L,$="";else{$=+$;var z=$<0||1/$<0;if($=isNaN($)?l:A(Math.abs($),C),E&&($=wQe($)),z&&+$==0&&h!=="+"&&(z=!1),N=(z?h==="("?h:s:h==="-"||h==="("?"":h)+N,L=(P==="s"?g9[8+Oie/3]:"")+L+(z&&h==="("?")":""),k){for(j=-1,D=$.length;++j_||_>57){L=(_===46?o+$.slice(j+1):$.slice(j))+L,$=$.slice(0,j);break}}}x&&!y&&($=t($,1/0));var F=N.length+$.length+L.length,V=F>1)+N+$+L+V.slice(F);break;default:$=V+N+$+L;break}return i($)}return O.toString=function(){return d+""},O}function u(d,f){var p=c((d=gS(d),d.type="f",d)),h=Math.max(-8,Math.min(8,Math.floor(Dv(f)/3)))*3,m=Math.pow(10,-h),y=g9[8+h/3];return function(w){return p(m*w)+y}}return{format:c,formatPrefix:u}}var eP,nV,Aie;CQe({thousands:",",grouping:[3],currency:["$",""]});function CQe(e){return eP=SQe(e),nV=eP.format,Aie=eP.formatPrefix,eP}function EQe(e){return Math.max(0,-Dv(Math.abs(e)))}function PQe(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Dv(t)/3)))*3-Dv(Math.abs(e)))}function TQe(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Dv(t)-Dv(e))+1}function kie(e,t,n,r){var o=iL(e,t,n),i;switch(r=gS(r??",f"),r.type){case"s":{var a=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(i=PQe(o,a))&&(r.precision=i),Aie(r,a)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(i=TQe(o,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=i-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(i=EQe(o))&&(r.precision=i-(r.type==="%")*2);break}}return nV(r)}function Rp(e){var t=e.domain;return e.ticks=function(n){var r=t();return rL(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var o=t();return kie(o[0],o[o.length-1],n??10,r)},e.nice=function(n){n==null&&(n=10);var r=t(),o=0,i=r.length-1,a=r[o],s=r[i],l,c,u=10;for(s0;){if(c=oL(a,s,n),c===l)return r[o]=a,r[i]=s,t(r);if(c>0)a=Math.floor(a/c)*c,s=Math.ceil(s/c)*c;else if(c<0)a=Math.ceil(a*c)/c,s=Math.floor(s*c)/c;else break;l=c}return e},e}function OI(){var e=eV();return e.copy=function(){return YC(e,OI())},jl.apply(e,arguments),Rp(e)}function Mie(e){var t;function n(r){return r==null||isNaN(r=+r)?t:r}return n.invert=n,n.domain=n.range=function(r){return arguments.length?(e=Array.from(r,TI),n):e.slice()},n.unknown=function(r){return arguments.length?(t=r,n):t},n.copy=function(){return Mie(e).unknown(t)},e=arguments.length?Array.from(e,TI):[0,1],Rp(n)}function Rie(e,t){e=e.slice();var n=0,r=e.length-1,o=e[n],i=e[r],a;return iMath.pow(e,t)}function MQe(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function v9(e){return(t,n)=>-e(-t,n)}function rV(e){const t=e(m9,y9),n=t.domain;let r=10,o,i;function a(){return o=MQe(r),i=kQe(r),n()[0]<0?(o=v9(o),i=v9(i),e(IQe,OQe)):e(m9,y9),t}return t.base=function(s){return arguments.length?(r=+s,a()):r},t.domain=function(s){return arguments.length?(n(s),a()):n()},t.ticks=s=>{const l=n();let c=l[0],u=l[l.length-1];const d=u0){for(;f<=p;++f)for(h=1;hu)break;w.push(m)}}else for(;f<=p;++f)for(h=r-1;h>=1;--h)if(m=f>0?h/i(-f):h*i(f),!(mu)break;w.push(m)}w.length*2{if(s==null&&(s=10),l==null&&(l=r===10?"s":","),typeof l!="function"&&(!(r%1)&&(l=gS(l)).precision==null&&(l.trim=!0),l=nV(l)),s===1/0)return l;const c=Math.max(1,r*s/t.ticks().length);return u=>{let d=u/i(Math.round(o(u)));return d*rn(Rie(n(),{floor:s=>i(Math.floor(o(s))),ceil:s=>i(Math.ceil(o(s)))})),t}function $ie(){const e=rV(jk()).domain([1,10]);return e.copy=()=>YC(e,$ie()).base(e.base()),jl.apply(e,arguments),e}function b9(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function w9(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function oV(e){var t=1,n=e(b9(t),w9(t));return n.constant=function(r){return arguments.length?e(b9(t=+r),w9(t)):t},Rp(n)}function Die(){var e=oV(jk());return e.copy=function(){return YC(e,Die()).constant(e.constant())},jl.apply(e,arguments)}function x9(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function RQe(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function $Qe(e){return e<0?-e*e:e*e}function iV(e){var t=e(ra,ra),n=1;function r(){return n===1?e(ra,ra):n===.5?e(RQe,$Qe):e(x9(n),x9(1/n))}return t.exponent=function(o){return arguments.length?(n=+o,r()):n},Rp(t)}function aV(){var e=iV(jk());return e.copy=function(){return YC(e,aV()).exponent(e.exponent())},jl.apply(e,arguments),e}function DQe(){return aV.apply(null,arguments).exponent(.5)}function S9(e){return Math.sign(e)*e*e}function _Qe(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function _ie(){var e=eV(),t=[0,1],n=!1,r;function o(i){var a=_Qe(e(i));return isNaN(a)?r:n?Math.round(a):a}return o.invert=function(i){return e.invert(S9(i))},o.domain=function(i){return arguments.length?(e.domain(i),o):e.domain()},o.range=function(i){return arguments.length?(e.range((t=Array.from(i,TI)).map(S9)),o):t.slice()},o.rangeRound=function(i){return o.range(i).round(!0)},o.round=function(i){return arguments.length?(n=!!i,o):n},o.clamp=function(i){return arguments.length?(e.clamp(i),o):e.clamp()},o.unknown=function(i){return arguments.length?(r=i,o):r},o.copy=function(){return _ie(e.domain(),t).round(n).clamp(e.clamp()).unknown(r)},jl.apply(o,arguments),Rp(o)}function Nie(){var e=[],t=[],n=[],r;function o(){var a=0,s=Math.max(1,t.length);for(n=new Array(s-1);++a0?n[s-1]:e[0],s=n?[r[n-1],t]:[r[c-1],r[c]]},a.unknown=function(l){return arguments.length&&(i=l),a},a.thresholds=function(){return r.slice()},a.copy=function(){return Lie().domain([e,t]).range(o).unknown(i)},jl.apply(Rp(a),arguments)}function Fie(){var e=[.5],t=[0,1],n,r=1;function o(i){return i!=null&&i<=i?t[qC(e,i,0,r)]:n}return o.domain=function(i){return arguments.length?(e=Array.from(i),r=Math.min(e.length,t.length-1),o):e.slice()},o.range=function(i){return arguments.length?(t=Array.from(i),r=Math.min(e.length,t.length-1),o):t.slice()},o.invertExtent=function(i){var a=t.indexOf(i);return[e[a-1],e[a]]},o.unknown=function(i){return arguments.length?(n=i,o):n},o.copy=function(){return Fie().domain(e).range(t).unknown(n)},jl.apply(o,arguments)}const OD=new Date,AD=new Date;function Uo(e,t,n,r){function o(i){return e(i=arguments.length===0?new Date:new Date(+i)),i}return o.floor=i=>(e(i=new Date(+i)),i),o.ceil=i=>(e(i=new Date(i-1)),t(i,1),e(i),i),o.round=i=>{const a=o(i),s=o.ceil(i);return i-a(t(i=new Date(+i),a==null?1:Math.floor(a)),i),o.range=(i,a,s)=>{const l=[];if(i=o.ceil(i),s=s==null?1:Math.floor(s),!(i0))return l;let c;do l.push(c=new Date(+i)),t(i,s),e(i);while(cUo(a=>{if(a>=a)for(;e(a),!i(a);)a.setTime(a-1)},(a,s)=>{if(a>=a)if(s<0)for(;++s<=0;)for(;t(a,-1),!i(a););else for(;--s>=0;)for(;t(a,1),!i(a););}),n&&(o.count=(i,a)=>(OD.setTime(+i),AD.setTime(+a),e(OD),e(AD),Math.floor(n(OD,AD))),o.every=i=>(i=Math.floor(i),!isFinite(i)||!(i>0)?null:i>1?o.filter(r?a=>r(a)%i===0:a=>o.count(0,a)%i===0):o)),o}const AI=Uo(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);AI.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Uo(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):AI);AI.range;const nd=1e3,fl=nd*60,rd=fl*60,Id=rd*24,sV=Id*7,C9=Id*30,kD=Id*365,Lh=Uo(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*nd)},(e,t)=>(t-e)/nd,e=>e.getUTCSeconds());Lh.range;const lV=Uo(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*nd)},(e,t)=>{e.setTime(+e+t*fl)},(e,t)=>(t-e)/fl,e=>e.getMinutes());lV.range;const cV=Uo(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*fl)},(e,t)=>(t-e)/fl,e=>e.getUTCMinutes());cV.range;const uV=Uo(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*nd-e.getMinutes()*fl)},(e,t)=>{e.setTime(+e+t*rd)},(e,t)=>(t-e)/rd,e=>e.getHours());uV.range;const dV=Uo(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*rd)},(e,t)=>(t-e)/rd,e=>e.getUTCHours());dV.range;const QC=Uo(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*fl)/Id,e=>e.getDate()-1);QC.range;const Bk=Uo(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Id,e=>e.getUTCDate()-1);Bk.range;const jie=Uo(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Id,e=>Math.floor(e/Id));jie.range;function Fg(e){return Uo(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,n)=>{t.setDate(t.getDate()+n*7)},(t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*fl)/sV)}const zk=Fg(0),kI=Fg(1),NQe=Fg(2),LQe=Fg(3),_v=Fg(4),FQe=Fg(5),jQe=Fg(6);zk.range;kI.range;NQe.range;LQe.range;_v.range;FQe.range;jQe.range;function jg(e){return Uo(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCDate(t.getUTCDate()+n*7)},(t,n)=>(n-t)/sV)}const Vk=jg(0),MI=jg(1),BQe=jg(2),zQe=jg(3),Nv=jg(4),VQe=jg(5),HQe=jg(6);Vk.range;MI.range;BQe.range;zQe.range;Nv.range;VQe.range;HQe.range;const fV=Uo(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());fV.range;const pV=Uo(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());pV.range;const Od=Uo(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());Od.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Uo(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)});Od.range;const Ad=Uo(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());Ad.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Uo(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)});Ad.range;function Bie(e,t,n,r,o,i){const a=[[Lh,1,nd],[Lh,5,5*nd],[Lh,15,15*nd],[Lh,30,30*nd],[i,1,fl],[i,5,5*fl],[i,15,15*fl],[i,30,30*fl],[o,1,rd],[o,3,3*rd],[o,6,6*rd],[o,12,12*rd],[r,1,Id],[r,2,2*Id],[n,1,sV],[t,1,C9],[t,3,3*C9],[e,1,kD]];function s(c,u,d){const f=uy).right(a,f);if(p===a.length)return e.every(iL(c/kD,u/kD,d));if(p===0)return AI.every(Math.max(iL(c,u,d),1));const[h,m]=a[f/a[p-1][2]53)return null;"w"in Z||(Z.w=1),"Z"in Z?(ge=RD(iw(Z.y,0,1)),we=ge.getUTCDay(),ge=we>4||we===0?MI.ceil(ge):MI(ge),ge=Bk.offset(ge,(Z.V-1)*7),Z.y=ge.getUTCFullYear(),Z.m=ge.getUTCMonth(),Z.d=ge.getUTCDate()+(Z.w+6)%7):(ge=MD(iw(Z.y,0,1)),we=ge.getDay(),ge=we>4||we===0?kI.ceil(ge):kI(ge),ge=QC.offset(ge,(Z.V-1)*7),Z.y=ge.getFullYear(),Z.m=ge.getMonth(),Z.d=ge.getDate()+(Z.w+6)%7)}else("W"in Z||"U"in Z)&&("w"in Z||(Z.w="u"in Z?Z.u%7:"W"in Z?1:0),we="Z"in Z?RD(iw(Z.y,0,1)).getUTCDay():MD(iw(Z.y,0,1)).getDay(),Z.m=0,Z.d="W"in Z?(Z.w+6)%7+Z.W*7-(we+5)%7:Z.w+Z.U*7-(we+6)%7);return"Z"in Z?(Z.H+=Z.Z/100|0,Z.M+=Z.Z%100,RD(Z)):MD(Z)}}function A(se,re,fe,Z){for(var ce=0,ge=re.length,we=fe.length,me,Se;ce=we)return-1;if(me=re.charCodeAt(ce++),me===37){if(me=re.charAt(ce++),Se=P[me in E9?re.charAt(ce++):me],!Se||(Z=Se(se,fe,Z))<0)return-1}else if(me!=fe.charCodeAt(Z++))return-1}return Z}function k(se,re,fe){var Z=c.exec(re.slice(fe));return Z?(se.p=u.get(Z[0].toLowerCase()),fe+Z[0].length):-1}function O(se,re,fe){var Z=p.exec(re.slice(fe));return Z?(se.w=h.get(Z[0].toLowerCase()),fe+Z[0].length):-1}function $(se,re,fe){var Z=d.exec(re.slice(fe));return Z?(se.w=f.get(Z[0].toLowerCase()),fe+Z[0].length):-1}function N(se,re,fe){var Z=w.exec(re.slice(fe));return Z?(se.m=x.get(Z[0].toLowerCase()),fe+Z[0].length):-1}function L(se,re,fe){var Z=m.exec(re.slice(fe));return Z?(se.m=y.get(Z[0].toLowerCase()),fe+Z[0].length):-1}function j(se,re,fe){return A(se,t,re,fe)}function D(se,re,fe){return A(se,n,re,fe)}function _(se,re,fe){return A(se,r,re,fe)}function z(se){return a[se.getDay()]}function F(se){return i[se.getDay()]}function V(se){return l[se.getMonth()]}function U(se){return s[se.getMonth()]}function q(se){return o[+(se.getHours()>=12)]}function X(se){return 1+~~(se.getMonth()/3)}function ie(se){return a[se.getUTCDay()]}function ee(se){return i[se.getUTCDay()]}function Q(se){return l[se.getUTCMonth()]}function te(se){return s[se.getUTCMonth()]}function pe(se){return o[+(se.getUTCHours()>=12)]}function ae(se){return 1+~~(se.getUTCMonth()/3)}return{format:function(se){var re=T(se+="",C);return re.toString=function(){return se},re},parse:function(se){var re=I(se+="",!1);return re.toString=function(){return se},re},utcFormat:function(se){var re=T(se+="",E);return re.toString=function(){return se},re},utcParse:function(se){var re=I(se+="",!0);return re.toString=function(){return se},re}}}var E9={"-":"",_:" ",0:"0"},ii=/^\s*\d+/,YQe=/^%/,QQe=/[\\^$*+?|[\]().{}]/g;function Qn(e,t,n){var r=e<0?"-":"",o=(r?-e:e)+"",i=o.length;return r+(i[t.toLowerCase(),n]))}function JQe(e,t,n){var r=ii.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function ZQe(e,t,n){var r=ii.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function eXe(e,t,n){var r=ii.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function tXe(e,t,n){var r=ii.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function nXe(e,t,n){var r=ii.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function P9(e,t,n){var r=ii.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function T9(e,t,n){var r=ii.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function rXe(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function oXe(e,t,n){var r=ii.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function iXe(e,t,n){var r=ii.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function I9(e,t,n){var r=ii.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function aXe(e,t,n){var r=ii.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function O9(e,t,n){var r=ii.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function sXe(e,t,n){var r=ii.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function lXe(e,t,n){var r=ii.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function cXe(e,t,n){var r=ii.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function uXe(e,t,n){var r=ii.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function dXe(e,t,n){var r=YQe.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function fXe(e,t,n){var r=ii.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function pXe(e,t,n){var r=ii.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function A9(e,t){return Qn(e.getDate(),t,2)}function hXe(e,t){return Qn(e.getHours(),t,2)}function gXe(e,t){return Qn(e.getHours()%12||12,t,2)}function mXe(e,t){return Qn(1+QC.count(Od(e),e),t,3)}function zie(e,t){return Qn(e.getMilliseconds(),t,3)}function yXe(e,t){return zie(e,t)+"000"}function vXe(e,t){return Qn(e.getMonth()+1,t,2)}function bXe(e,t){return Qn(e.getMinutes(),t,2)}function wXe(e,t){return Qn(e.getSeconds(),t,2)}function xXe(e){var t=e.getDay();return t===0?7:t}function SXe(e,t){return Qn(zk.count(Od(e)-1,e),t,2)}function Vie(e){var t=e.getDay();return t>=4||t===0?_v(e):_v.ceil(e)}function CXe(e,t){return e=Vie(e),Qn(_v.count(Od(e),e)+(Od(e).getDay()===4),t,2)}function EXe(e){return e.getDay()}function PXe(e,t){return Qn(kI.count(Od(e)-1,e),t,2)}function TXe(e,t){return Qn(e.getFullYear()%100,t,2)}function IXe(e,t){return e=Vie(e),Qn(e.getFullYear()%100,t,2)}function OXe(e,t){return Qn(e.getFullYear()%1e4,t,4)}function AXe(e,t){var n=e.getDay();return e=n>=4||n===0?_v(e):_v.ceil(e),Qn(e.getFullYear()%1e4,t,4)}function kXe(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Qn(t/60|0,"0",2)+Qn(t%60,"0",2)}function k9(e,t){return Qn(e.getUTCDate(),t,2)}function MXe(e,t){return Qn(e.getUTCHours(),t,2)}function RXe(e,t){return Qn(e.getUTCHours()%12||12,t,2)}function $Xe(e,t){return Qn(1+Bk.count(Ad(e),e),t,3)}function Hie(e,t){return Qn(e.getUTCMilliseconds(),t,3)}function DXe(e,t){return Hie(e,t)+"000"}function _Xe(e,t){return Qn(e.getUTCMonth()+1,t,2)}function NXe(e,t){return Qn(e.getUTCMinutes(),t,2)}function LXe(e,t){return Qn(e.getUTCSeconds(),t,2)}function FXe(e){var t=e.getUTCDay();return t===0?7:t}function jXe(e,t){return Qn(Vk.count(Ad(e)-1,e),t,2)}function Uie(e){var t=e.getUTCDay();return t>=4||t===0?Nv(e):Nv.ceil(e)}function BXe(e,t){return e=Uie(e),Qn(Nv.count(Ad(e),e)+(Ad(e).getUTCDay()===4),t,2)}function zXe(e){return e.getUTCDay()}function VXe(e,t){return Qn(MI.count(Ad(e)-1,e),t,2)}function HXe(e,t){return Qn(e.getUTCFullYear()%100,t,2)}function UXe(e,t){return e=Uie(e),Qn(e.getUTCFullYear()%100,t,2)}function WXe(e,t){return Qn(e.getUTCFullYear()%1e4,t,4)}function GXe(e,t){var n=e.getUTCDay();return e=n>=4||n===0?Nv(e):Nv.ceil(e),Qn(e.getUTCFullYear()%1e4,t,4)}function qXe(){return"+0000"}function M9(){return"%"}function R9(e){return+e}function $9(e){return Math.floor(+e/1e3)}var Rm,Wie,Gie;KXe({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function KXe(e){return Rm=KQe(e),Wie=Rm.format,Rm.parse,Gie=Rm.utcFormat,Rm.utcParse,Rm}function YXe(e){return new Date(e)}function QXe(e){return e instanceof Date?+e:+new Date(+e)}function hV(e,t,n,r,o,i,a,s,l,c){var u=eV(),d=u.invert,f=u.domain,p=c(".%L"),h=c(":%S"),m=c("%I:%M"),y=c("%I %p"),w=c("%a %d"),x=c("%b %d"),C=c("%B"),E=c("%Y");function P(T){return(l(T)t(o/(e.length-1)))},n.quantiles=function(r){return Array.from({length:r+1},(o,i)=>jYe(e,i/r))},n.copy=function(){return Qie(t).domain(e)},_d.apply(n,arguments)}function Uk(){var e=0,t=.5,n=1,r=1,o,i,a,s,l,c=ra,u,d=!1,f;function p(m){return isNaN(m=+m)?f:(m=.5+((m=+u(m))-i)*(r*mt}var eae=rJe,oJe=Wk,iJe=eae,aJe=Hb;function sJe(e){return e&&e.length?oJe(e,aJe,iJe):void 0}var lJe=sJe;const Df=Bn(lJe);function cJe(e,t){return ee.e^i.s<0?1:-1;for(r=i.d.length,o=e.d.length,t=0,n=re.d[t]^i.s<0?1:-1;return r===o?0:r>o^i.s<0?1:-1};Rt.decimalPlaces=Rt.dp=function(){var e=this,t=e.d.length-1,n=(t-e.e)*Fr;if(t=e.d[t],t)for(;t%10==0;t/=10)n--;return n<0?0:n};Rt.dividedBy=Rt.div=function(e){return ud(this,new this.constructor(e))};Rt.dividedToIntegerBy=Rt.idiv=function(e){var t=this,n=t.constructor;return Er(ud(t,new n(e),0,1),n.precision)};Rt.equals=Rt.eq=function(e){return!this.cmp(e)};Rt.exponent=function(){return ko(this)};Rt.greaterThan=Rt.gt=function(e){return this.cmp(e)>0};Rt.greaterThanOrEqualTo=Rt.gte=function(e){return this.cmp(e)>=0};Rt.isInteger=Rt.isint=function(){return this.e>this.d.length-2};Rt.isNegative=Rt.isneg=function(){return this.s<0};Rt.isPositive=Rt.ispos=function(){return this.s>0};Rt.isZero=function(){return this.s===0};Rt.lessThan=Rt.lt=function(e){return this.cmp(e)<0};Rt.lessThanOrEqualTo=Rt.lte=function(e){return this.cmp(e)<1};Rt.logarithm=Rt.log=function(e){var t,n=this,r=n.constructor,o=r.precision,i=o+5;if(e===void 0)e=new r(10);else if(e=new r(e),e.s<1||e.eq(ls))throw Error($l+"NaN");if(n.s<1)throw Error($l+(n.s?"NaN":"-Infinity"));return n.eq(ls)?new r(0):(qr=!1,t=ud(mS(n,i),mS(e,i),i),qr=!0,Er(t,o))};Rt.minus=Rt.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?iae(t,e):rae(t,(e.s=-e.s,e))};Rt.modulo=Rt.mod=function(e){var t,n=this,r=n.constructor,o=r.precision;if(e=new r(e),!e.s)throw Error($l+"NaN");return n.s?(qr=!1,t=ud(n,e,0,1).times(e),qr=!0,n.minus(t)):Er(new r(n),o)};Rt.naturalExponential=Rt.exp=function(){return oae(this)};Rt.naturalLogarithm=Rt.ln=function(){return mS(this)};Rt.negated=Rt.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};Rt.plus=Rt.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?rae(t,e):iae(t,(e.s=-e.s,e))};Rt.precision=Rt.sd=function(e){var t,n,r,o=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(tg+e);if(t=ko(o)+1,r=o.d.length-1,n=r*Fr+1,r=o.d[r],r){for(;r%10==0;r/=10)n--;for(r=o.d[0];r>=10;r/=10)n++}return e&&t>n?t:n};Rt.squareRoot=Rt.sqrt=function(){var e,t,n,r,o,i,a,s=this,l=s.constructor;if(s.s<1){if(!s.s)return new l(0);throw Error($l+"NaN")}for(e=ko(s),qr=!1,o=Math.sqrt(+s),o==0||o==1/0?(t=tu(s.d),(t.length+e)%2==0&&(t+="0"),o=Math.sqrt(t),e=qb((e+1)/2)-(e<0||e%2),o==1/0?t="5e"+e:(t=o.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),r=new l(t)):r=new l(o.toString()),n=l.precision,o=a=n+3;;)if(i=r,r=i.plus(ud(s,i,a+2)).times(.5),tu(i.d).slice(0,a)===(t=tu(r.d)).slice(0,a)){if(t=t.slice(a-3,a+1),o==a&&t=="4999"){if(Er(i,n+1,0),i.times(i).eq(s)){r=i;break}}else if(t!="9999")break;a+=4}return qr=!0,Er(r,n)};Rt.times=Rt.mul=function(e){var t,n,r,o,i,a,s,l,c,u=this,d=u.constructor,f=u.d,p=(e=new d(e)).d;if(!u.s||!e.s)return new d(0);for(e.s*=u.s,n=u.e+e.e,l=f.length,c=p.length,l=0;){for(t=0,o=l+r;o>r;)s=i[o]+p[r]*f[o-r-1]+t,i[o--]=s%Qo|0,t=s/Qo|0;i[o]=(i[o]+t)%Qo|0}for(;!i[--a];)i.pop();return t?++n:i.shift(),e.d=i,e.e=n,qr?Er(e,d.precision):e};Rt.toDecimalPlaces=Rt.todp=function(e,t){var n=this,r=n.constructor;return n=new r(n),e===void 0?n:(vu(e,0,Gb),t===void 0?t=r.rounding:vu(t,0,8),Er(n,e+ko(n)+1,t))};Rt.toExponential=function(e,t){var n,r=this,o=r.constructor;return e===void 0?n=vg(r,!0):(vu(e,0,Gb),t===void 0?t=o.rounding:vu(t,0,8),r=Er(new o(r),e+1,t),n=vg(r,!0,e+1)),n};Rt.toFixed=function(e,t){var n,r,o=this,i=o.constructor;return e===void 0?vg(o):(vu(e,0,Gb),t===void 0?t=i.rounding:vu(t,0,8),r=Er(new i(o),e+ko(o)+1,t),n=vg(r.abs(),!1,e+ko(r)+1),o.isneg()&&!o.isZero()?"-"+n:n)};Rt.toInteger=Rt.toint=function(){var e=this,t=e.constructor;return Er(new t(e),ko(e)+1,t.rounding)};Rt.toNumber=function(){return+this};Rt.toPower=Rt.pow=function(e){var t,n,r,o,i,a,s=this,l=s.constructor,c=12,u=+(e=new l(e));if(!e.s)return new l(ls);if(s=new l(s),!s.s){if(e.s<1)throw Error($l+"Infinity");return s}if(s.eq(ls))return s;if(r=l.precision,e.eq(ls))return Er(s,r);if(t=e.e,n=e.d.length-1,a=t>=n,i=s.s,a){if((n=u<0?-u:u)<=nae){for(o=new l(ls),t=Math.ceil(r/Fr+4),qr=!1;n%2&&(o=o.times(s),N9(o.d,t)),n=qb(n/2),n!==0;)s=s.times(s),N9(s.d,t);return qr=!0,e.s<0?new l(ls).div(o):Er(o,r)}}else if(i<0)throw Error($l+"NaN");return i=i<0&&e.d[Math.max(t,n)]&1?-1:1,s.s=1,qr=!1,o=e.times(mS(s,r+c)),qr=!0,o=oae(o),o.s=i,o};Rt.toPrecision=function(e,t){var n,r,o=this,i=o.constructor;return e===void 0?(n=ko(o),r=vg(o,n<=i.toExpNeg||n>=i.toExpPos)):(vu(e,1,Gb),t===void 0?t=i.rounding:vu(t,0,8),o=Er(new i(o),e,t),n=ko(o),r=vg(o,e<=n||n<=i.toExpNeg,e)),r};Rt.toSignificantDigits=Rt.tosd=function(e,t){var n=this,r=n.constructor;return e===void 0?(e=r.precision,t=r.rounding):(vu(e,1,Gb),t===void 0?t=r.rounding:vu(t,0,8)),Er(new r(n),e,t)};Rt.toString=Rt.valueOf=Rt.val=Rt.toJSON=Rt[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=ko(e),n=e.constructor;return vg(e,t<=n.toExpNeg||t>=n.toExpPos)};function rae(e,t){var n,r,o,i,a,s,l,c,u=e.constructor,d=u.precision;if(!e.s||!t.s)return t.s||(t=new u(e)),qr?Er(t,d):t;if(l=e.d,c=t.d,a=e.e,o=t.e,l=l.slice(),i=a-o,i){for(i<0?(r=l,i=-i,s=c.length):(r=c,o=a,s=l.length),a=Math.ceil(d/Fr),s=a>s?a+1:s+1,i>s&&(i=s,r.length=1),r.reverse();i--;)r.push(0);r.reverse()}for(s=l.length,i=c.length,s-i<0&&(i=s,r=c,c=l,l=r),n=0;i;)n=(l[--i]=l[i]+c[i]+n)/Qo|0,l[i]%=Qo;for(n&&(l.unshift(n),++o),s=l.length;l[--s]==0;)l.pop();return t.d=l,t.e=o,qr?Er(t,d):t}function vu(e,t,n){if(e!==~~e||en)throw Error(tg+e)}function tu(e){var t,n,r,o=e.length-1,i="",a=e[0];if(o>0){for(i+=a,t=1;ta?1:-1;else for(s=l=0;so[s]?1:-1;break}return l}function n(r,o,i){for(var a=0;i--;)r[i]-=a,a=r[i]1;)r.shift()}return function(r,o,i,a){var s,l,c,u,d,f,p,h,m,y,w,x,C,E,P,T,I,A,k=r.constructor,O=r.s==o.s?1:-1,$=r.d,N=o.d;if(!r.s)return new k(r);if(!o.s)throw Error($l+"Division by zero");for(l=r.e-o.e,I=N.length,P=$.length,p=new k(O),h=p.d=[],c=0;N[c]==($[c]||0);)++c;if(N[c]>($[c]||0)&&--l,i==null?x=i=k.precision:a?x=i+(ko(r)-ko(o))+1:x=i,x<0)return new k(0);if(x=x/Fr+2|0,c=0,I==1)for(u=0,N=N[0],x++;(c1&&(N=e(N,u),$=e($,u),I=N.length,P=$.length),E=I,m=$.slice(0,I),y=m.length;y=Qo/2&&++T;do u=0,s=t(N,m,I,y),s<0?(w=m[0],I!=y&&(w=w*Qo+(m[1]||0)),u=w/T|0,u>1?(u>=Qo&&(u=Qo-1),d=e(N,u),f=d.length,y=m.length,s=t(d,m,f,y),s==1&&(u--,n(d,I16)throw Error(yV+ko(e));if(!e.s)return new u(ls);for(t==null?(qr=!1,s=d):s=t,a=new u(.03125);e.abs().gte(.1);)e=e.times(a),c+=5;for(r=Math.log(Eh(2,c))/Math.LN10*2+5|0,s+=r,n=o=i=new u(ls),u.precision=s;;){if(o=Er(o.times(e),s),n=n.times(++l),a=i.plus(ud(o,n,s)),tu(a.d).slice(0,s)===tu(i.d).slice(0,s)){for(;c--;)i=Er(i.times(i),s);return u.precision=d,t==null?(qr=!0,Er(i,d)):i}i=a}}function ko(e){for(var t=e.e*Fr,n=e.d[0];n>=10;n/=10)t++;return t}function $D(e,t,n){if(t>e.LN10.sd())throw qr=!0,n&&(e.precision=n),Error($l+"LN10 precision limit exceeded");return Er(new e(e.LN10),t)}function ff(e){for(var t="";e--;)t+="0";return t}function mS(e,t){var n,r,o,i,a,s,l,c,u,d=1,f=10,p=e,h=p.d,m=p.constructor,y=m.precision;if(p.s<1)throw Error($l+(p.s?"NaN":"-Infinity"));if(p.eq(ls))return new m(0);if(t==null?(qr=!1,c=y):c=t,p.eq(10))return t==null&&(qr=!0),$D(m,c);if(c+=f,m.precision=c,n=tu(h),r=n.charAt(0),i=ko(p),Math.abs(i)<15e14){for(;r<7&&r!=1||r==1&&n.charAt(1)>3;)p=p.times(e),n=tu(p.d),r=n.charAt(0),d++;i=ko(p),r>1?(p=new m("0."+n),i++):p=new m(r+"."+n.slice(1))}else return l=$D(m,c+2,y).times(i+""),p=mS(new m(r+"."+n.slice(1)),c-f).plus(l),m.precision=y,t==null?(qr=!0,Er(p,y)):p;for(s=a=p=ud(p.minus(ls),p.plus(ls),c),u=Er(p.times(p),c),o=3;;){if(a=Er(a.times(u),c),l=s.plus(ud(a,new m(o),c)),tu(l.d).slice(0,c)===tu(s.d).slice(0,c))return s=s.times(2),i!==0&&(s=s.plus($D(m,c+2,y).times(i+""))),s=ud(s,new m(d),c),m.precision=y,t==null?(qr=!0,Er(s,y)):s;s=l,o+=2}}function _9(e,t){var n,r,o;for((n=t.indexOf("."))>-1&&(t=t.replace(".","")),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;t.charCodeAt(r)===48;)++r;for(o=t.length;t.charCodeAt(o-1)===48;)--o;if(t=t.slice(r,o),t){if(o-=r,n=n-r-1,e.e=qb(n/Fr),e.d=[],r=(n+1)%Fr,n<0&&(r+=Fr),rRI||e.e<-RI))throw Error(yV+n)}else e.s=0,e.e=0,e.d=[0];return e}function Er(e,t,n){var r,o,i,a,s,l,c,u,d=e.d;for(a=1,i=d[0];i>=10;i/=10)a++;if(r=t-a,r<0)r+=Fr,o=t,c=d[u=0];else{if(u=Math.ceil((r+1)/Fr),i=d.length,u>=i)return e;for(c=i=d[u],a=1;i>=10;i/=10)a++;r%=Fr,o=r-Fr+a}if(n!==void 0&&(i=Eh(10,a-o-1),s=c/i%10|0,l=t<0||d[u+1]!==void 0||c%i,l=n<4?(s||l)&&(n==0||n==(e.s<0?3:2)):s>5||s==5&&(n==4||l||n==6&&(r>0?o>0?c/Eh(10,a-o):0:d[u-1])%10&1||n==(e.s<0?8:7))),t<1||!d[0])return l?(i=ko(e),d.length=1,t=t-i-1,d[0]=Eh(10,(Fr-t%Fr)%Fr),e.e=qb(-t/Fr)||0):(d.length=1,d[0]=e.e=e.s=0),e;if(r==0?(d.length=u,i=1,u--):(d.length=u+1,i=Eh(10,Fr-r),d[u]=o>0?(c/Eh(10,a-o)%Eh(10,o)|0)*i:0),l)for(;;)if(u==0){(d[0]+=i)==Qo&&(d[0]=1,++e.e);break}else{if(d[u]+=i,d[u]!=Qo)break;d[u--]=0,i=1}for(r=d.length;d[--r]===0;)d.pop();if(qr&&(e.e>RI||e.e<-RI))throw Error(yV+ko(e));return e}function iae(e,t){var n,r,o,i,a,s,l,c,u,d,f=e.constructor,p=f.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new f(e),qr?Er(t,p):t;if(l=e.d,d=t.d,r=t.e,c=e.e,l=l.slice(),a=c-r,a){for(u=a<0,u?(n=l,a=-a,s=d.length):(n=d,r=c,s=l.length),o=Math.max(Math.ceil(p/Fr),s)+2,a>o&&(a=o,n.length=1),n.reverse(),o=a;o--;)n.push(0);n.reverse()}else{for(o=l.length,s=d.length,u=o0;--o)l[s++]=0;for(o=d.length;o>a;){if(l[--o]0?i=i.charAt(0)+"."+i.slice(1)+ff(r):a>1&&(i=i.charAt(0)+"."+i.slice(1)),i=i+(o<0?"e":"e+")+o):o<0?(i="0."+ff(-o-1)+i,n&&(r=n-a)>0&&(i+=ff(r))):o>=a?(i+=ff(o+1-a),n&&(r=n-o-1)>0&&(i=i+"."+ff(r))):((r=o+1)0&&(o+1===a&&(i+="."),i+=ff(r))),e.s<0?"-"+i:i}function N9(e,t){if(e.length>t)return e.length=t,!0}function aae(e){var t,n,r;function o(i){var a=this;if(!(a instanceof o))return new o(i);if(a.constructor=o,i instanceof o){a.s=i.s,a.e=i.e,a.d=(i=i.d)?i.slice():i;return}if(typeof i=="number"){if(i*0!==0)throw Error(tg+i);if(i>0)a.s=1;else if(i<0)i=-i,a.s=-1;else{a.s=0,a.e=0,a.d=[0];return}if(i===~~i&&i<1e7){a.e=0,a.d=[i];return}return _9(a,i.toString())}else if(typeof i!="string")throw Error(tg+i);if(i.charCodeAt(0)===45?(i=i.slice(1),a.s=-1):a.s=1,kJe.test(i))_9(a,i);else throw Error(tg+i)}if(o.prototype=Rt,o.ROUND_UP=0,o.ROUND_DOWN=1,o.ROUND_CEIL=2,o.ROUND_FLOOR=3,o.ROUND_HALF_UP=4,o.ROUND_HALF_DOWN=5,o.ROUND_HALF_EVEN=6,o.ROUND_HALF_CEIL=7,o.ROUND_HALF_FLOOR=8,o.clone=aae,o.config=o.set=MJe,e===void 0&&(e={}),e)for(r=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t=o[t+1]&&r<=o[t+2])this[n]=r;else throw Error(tg+n+": "+r);if((r=e[n="LN10"])!==void 0)if(r==Math.LN10)this[n]=new this(r);else throw Error(tg+n+": "+r);return this}var vV=aae(AJe);ls=new vV(1);const vr=vV;function RJe(e){return NJe(e)||_Je(e)||DJe(e)||$Je()}function $Je(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function DJe(e,t){if(e){if(typeof e=="string")return uL(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return uL(e,t)}}function _Je(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function NJe(e){if(Array.isArray(e))return uL(e)}function uL(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=t?n.apply(void 0,o):e(t-a,L9(function(){for(var s=arguments.length,l=new Array(s),c=0;ce.length)&&(t=e.length);for(var n=0,r=new Array(t);n"u"||!(Symbol.iterator in Object(e)))){var n=[],r=!0,o=!1,i=void 0;try{for(var a=e[Symbol.iterator](),s;!(r=(s=a.next()).done)&&(n.push(s.value),!(t&&n.length===t));r=!0);}catch(l){o=!0,i=l}finally{try{!r&&a.return!=null&&a.return()}finally{if(o)throw i}}return n}}function XJe(e){if(Array.isArray(e))return e}function dae(e){var t=yS(e,2),n=t[0],r=t[1],o=n,i=r;return n>r&&(o=r,i=n),[o,i]}function fae(e,t,n){if(e.lte(0))return new vr(0);var r=Kk.getDigitCount(e.toNumber()),o=new vr(10).pow(r),i=e.div(o),a=r!==1?.05:.1,s=new vr(Math.ceil(i.div(a).toNumber())).add(n).mul(a),l=s.mul(o);return t?l:new vr(Math.ceil(l))}function JJe(e,t,n){var r=1,o=new vr(e);if(!o.isint()&&n){var i=Math.abs(e);i<1?(r=new vr(10).pow(Kk.getDigitCount(e)-1),o=new vr(Math.floor(o.div(r).toNumber())).mul(r)):i>1&&(o=new vr(Math.floor(e)))}else e===0?o=new vr(Math.floor((t-1)/2)):n||(o=new vr(Math.floor(e)));var a=Math.floor((t-1)/2),s=BJe(jJe(function(l){return o.add(new vr(l-a).mul(r)).toNumber()}),dL);return s(0,t)}function pae(e,t,n,r){var o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((t-e)/(n-1)))return{step:new vr(0),tickMin:new vr(0),tickMax:new vr(0)};var i=fae(new vr(t).sub(e).div(n-1),r,o),a;e<=0&&t>=0?a=new vr(0):(a=new vr(e).add(t).div(2),a=a.sub(new vr(a).mod(i)));var s=Math.ceil(a.sub(e).div(i).toNumber()),l=Math.ceil(new vr(t).sub(a).div(i).toNumber()),c=s+l+1;return c>n?pae(e,t,n,r,o+1):(c0?l+(n-c):l,s=t>0?s:s+(n-c)),{step:i,tickMin:a.sub(new vr(s).mul(i)),tickMax:a.add(new vr(l).mul(i))})}function ZJe(e){var t=yS(e,2),n=t[0],r=t[1],o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,a=Math.max(o,2),s=dae([n,r]),l=yS(s,2),c=l[0],u=l[1];if(c===-1/0||u===1/0){var d=u===1/0?[c].concat(pL(dL(0,o-1).map(function(){return 1/0}))):[].concat(pL(dL(0,o-1).map(function(){return-1/0})),[u]);return n>r?fL(d):d}if(c===u)return JJe(c,o,i);var f=pae(c,u,a,i),p=f.step,h=f.tickMin,m=f.tickMax,y=Kk.rangeStep(h,m.add(new vr(.1).mul(p)),p);return n>r?fL(y):y}function eZe(e,t){var n=yS(e,2),r=n[0],o=n[1],i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,a=dae([r,o]),s=yS(a,2),l=s[0],c=s[1];if(l===-1/0||c===1/0)return[r,o];if(l===c)return[l];var u=Math.max(t,2),d=fae(new vr(c).sub(l).div(u-1),i,0),f=[].concat(pL(Kk.rangeStep(new vr(l),new vr(c).sub(new vr(.99).mul(d)),d)),[c]);return r>o?fL(f):f}var tZe=cae(ZJe),nZe=cae(eZe),rZe="Invariant failed";function cp(e,t){throw new Error(rZe)}var oZe=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function Lv(e){"@babel/helpers - typeof";return Lv=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Lv(e)}function $I(){return $I=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function dZe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function fZe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function pZe(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&arguments[1]!==void 0?arguments[1]:[],o=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0,a=-1,s=(n=r==null?void 0:r.length)!==null&&n!==void 0?n:0;if(s<=1)return 0;if(i&&i.axisType==="angleAxis"&&Math.abs(Math.abs(i.range[1]-i.range[0])-360)<=1e-6)for(var l=i.range,c=0;c0?o[c-1].coordinate:o[s-1].coordinate,d=o[c].coordinate,f=c>=s-1?o[0].coordinate:o[c+1].coordinate,p=void 0;if(ta(d-u)!==ta(f-d)){var h=[];if(ta(f-d)===ta(l[1]-l[0])){p=f;var m=d+l[1]-l[0];h[0]=Math.min(m,(m+u)/2),h[1]=Math.max(m,(m+u)/2)}else{p=u;var y=f+l[1]-l[0];h[0]=Math.min(d,(y+d)/2),h[1]=Math.max(d,(y+d)/2)}var w=[Math.min(d,(p+d)/2),Math.max(d,(p+d)/2)];if(t>w[0]&&t<=w[1]||t>=h[0]&&t<=h[1]){a=o[c].index;break}}else{var x=Math.min(u,f),C=Math.max(u,f);if(t>(x+d)/2&&t<=(C+d)/2){a=o[c].index;break}}}else for(var E=0;E0&&E(r[E].coordinate+r[E-1].coordinate)/2&&t<=(r[E].coordinate+r[E+1].coordinate)/2||E===s-1&&t>(r[E].coordinate+r[E-1].coordinate)/2){a=r[E].index;break}return a},bV=function(t){var n,r=t,o=r.type.displayName,i=(n=t.type)!==null&&n!==void 0&&n.defaultProps?uo(uo({},t.type.defaultProps),t.props):t.props,a=i.stroke,s=i.fill,l;switch(o){case"Line":l=a;break;case"Area":case"Radar":l=a&&a!=="none"?a:s;break;default:l=s;break}return l},kZe=function(t){var n=t.barSize,r=t.totalSize,o=t.stackGroups,i=o===void 0?{}:o;if(!i)return{};for(var a={},s=Object.keys(i),l=0,c=s.length;l=0});if(w&&w.length){var x=w[0].type.defaultProps,C=x!==void 0?uo(uo({},x),w[0].props):w[0].props,E=C.barSize,P=C[y];a[P]||(a[P]=[]);var T=Kt(E)?n:E;a[P].push({item:w[0],stackList:w.slice(1),barSize:Kt(T)?void 0:na(T,r,0)})}}return a},MZe=function(t){var n=t.barGap,r=t.barCategoryGap,o=t.bandSize,i=t.sizeList,a=i===void 0?[]:i,s=t.maxBarSize,l=a.length;if(l<1)return null;var c=na(n,o,0,!0),u,d=[];if(a[0].barSize===+a[0].barSize){var f=!1,p=o/l,h=a.reduce(function(E,P){return E+P.barSize||0},0);h+=(l-1)*c,h>=o&&(h-=(l-1)*c,c=0),h>=o&&p>0&&(f=!0,p*=.9,h=l*p);var m=(o-h)/2>>0,y={offset:m-c,size:0};u=a.reduce(function(E,P){var T={item:P.item,position:{offset:y.offset+y.size+c,size:f?p:P.barSize}},I=[].concat(B9(E),[T]);return y=I[I.length-1].position,P.stackList&&P.stackList.length&&P.stackList.forEach(function(A){I.push({item:A,position:y})}),I},d)}else{var w=na(r,o,0,!0);o-2*w-(l-1)*c<=0&&(c=0);var x=(o-2*w-(l-1)*c)/l;x>1&&(x>>=0);var C=s===+s?Math.min(x,s):x;u=a.reduce(function(E,P,T){var I=[].concat(B9(E),[{item:P.item,position:{offset:w+(x+c)*T+(x-C)/2,size:C}}]);return P.stackList&&P.stackList.length&&P.stackList.forEach(function(A){I.push({item:A,position:I[I.length-1].position})}),I},d)}return u},RZe=function(t,n,r,o){var i=r.children,a=r.width,s=r.margin,l=a-(s.left||0)-(s.right||0),c=yae({children:i,legendWidth:l});if(c){var u=o||{},d=u.width,f=u.height,p=c.align,h=c.verticalAlign,m=c.layout;if((m==="vertical"||m==="horizontal"&&h==="middle")&&p!=="center"&&ut(t[p]))return uo(uo({},t),{},Uy({},p,t[p]+(d||0)));if((m==="horizontal"||m==="vertical"&&p==="center")&&h!=="middle"&&ut(t[h]))return uo(uo({},t),{},Uy({},h,t[h]+(f||0)))}return t},$Ze=function(t,n,r){return Kt(n)?!0:t==="horizontal"?n==="yAxis":t==="vertical"||r==="x"?n==="xAxis":r==="y"?n==="yAxis":!0},vae=function(t,n,r,o,i){var a=n.props.children,s=sa(a,Kb).filter(function(c){return $Ze(o,i,c.props.direction)});if(s&&s.length){var l=s.map(function(c){return c.props.dataKey});return t.reduce(function(c,u){var d=jr(u,r);if(Kt(d))return c;var f=Array.isArray(d)?[Gk(d),Df(d)]:[d,d],p=l.reduce(function(h,m){var y=jr(u,m,0),w=f[0]-Math.abs(Array.isArray(y)?y[0]:y),x=f[1]+Math.abs(Array.isArray(y)?y[1]:y);return[Math.min(w,h[0]),Math.max(x,h[1])]},[1/0,-1/0]);return[Math.min(p[0],c[0]),Math.max(p[1],c[1])]},[1/0,-1/0])}return null},DZe=function(t,n,r,o,i){var a=n.map(function(s){return vae(t,s,r,i,o)}).filter(function(s){return!Kt(s)});return a&&a.length?a.reduce(function(s,l){return[Math.min(s[0],l[0]),Math.max(s[1],l[1])]},[1/0,-1/0]):null},bae=function(t,n,r,o,i){var a=n.map(function(l){var c=l.props.dataKey;return r==="number"&&c&&vae(t,l,c,o)||px(t,c,r,i)});if(r==="number")return a.reduce(function(l,c){return[Math.min(l[0],c[0]),Math.max(l[1],c[1])]},[1/0,-1/0]);var s={};return a.reduce(function(l,c){for(var u=0,d=c.length;u=2?ta(s[0]-s[1])*2*c:c,n&&(t.ticks||t.niceTicks)){var u=(t.ticks||t.niceTicks).map(function(d){var f=i?i.indexOf(d):d;return{coordinate:o(f)+c,value:d,offset:c}});return u.filter(function(d){return!Bb(d.coordinate)})}return t.isCategorical&&t.categoricalDomain?t.categoricalDomain.map(function(d,f){return{coordinate:o(d)+c,value:d,index:f,offset:c}}):o.ticks&&!r?o.ticks(t.tickCount).map(function(d){return{coordinate:o(d)+c,value:d,offset:c}}):o.domain().map(function(d,f){return{coordinate:o(d)+c,value:i?i[d]:d,index:f,offset:c}})},DD=new WeakMap,tP=function(t,n){if(typeof n!="function")return t;DD.has(t)||DD.set(t,new WeakMap);var r=DD.get(t);if(r.has(n))return r.get(n);var o=function(){t.apply(void 0,arguments),n.apply(void 0,arguments)};return r.set(n,o),o},Sae=function(t,n,r){var o=t.scale,i=t.type,a=t.layout,s=t.axisType;if(o==="auto")return a==="radial"&&s==="radiusAxis"?{scale:dS(),realScaleType:"band"}:a==="radial"&&s==="angleAxis"?{scale:OI(),realScaleType:"linear"}:i==="category"&&n&&(n.indexOf("LineChart")>=0||n.indexOf("AreaChart")>=0||n.indexOf("ComposedChart")>=0&&!r)?{scale:fx(),realScaleType:"point"}:i==="category"?{scale:dS(),realScaleType:"band"}:{scale:OI(),realScaleType:"linear"};if(WC(o)){var l="scale".concat(kk(o));return{scale:(D9[l]||fx)(),realScaleType:D9[l]?l:"point"}}return Jt(o)?{scale:o}:{scale:fx(),realScaleType:"point"}},V9=1e-4,Cae=function(t){var n=t.domain();if(!(!n||n.length<=2)){var r=n.length,o=t.range(),i=Math.min(o[0],o[1])-V9,a=Math.max(o[0],o[1])+V9,s=t(n[0]),l=t(n[r-1]);(sa||la)&&t.domain([n[0],n[r-1]])}},_Ze=function(t,n){if(!t)return null;for(var r=0,o=t.length;ro)&&(i[1]=o),i[0]>o&&(i[0]=o),i[1]=0?(t[s][r][0]=i,t[s][r][1]=i+l,i=t[s][r][1]):(t[s][r][0]=a,t[s][r][1]=a+l,a=t[s][r][1])}},FZe=function(t){var n=t.length;if(!(n<=0))for(var r=0,o=t[0].length;r=0?(t[a][r][0]=i,t[a][r][1]=i+s,i=t[a][r][1]):(t[a][r][0]=0,t[a][r][1]=0)}},jZe={sign:LZe,expand:o4e,none:Av,silhouette:i4e,wiggle:a4e,positive:FZe},BZe=function(t,n,r){var o=n.map(function(s){return s.props.dataKey}),i=jZe[r],a=r4e().keys(o).value(function(s,l){return+jr(s,l,0)}).order(zN).offset(i);return a(t)},zZe=function(t,n,r,o,i,a){if(!t)return null;var s=a?n.reverse():n,l={},c=s.reduce(function(d,f){var p,h=(p=f.type)!==null&&p!==void 0&&p.defaultProps?uo(uo({},f.type.defaultProps),f.props):f.props,m=h.stackId,y=h.hide;if(y)return d;var w=h[r],x=d[w]||{hasStack:!1,stackGroups:{}};if(zo(m)){var C=x.stackGroups[m]||{numericAxisId:r,cateAxisId:o,items:[]};C.items.push(f),x.hasStack=!0,x.stackGroups[m]=C}else x.stackGroups[kp("_stackId_")]={numericAxisId:r,cateAxisId:o,items:[f]};return uo(uo({},d),{},Uy({},w,x))},l),u={};return Object.keys(c).reduce(function(d,f){var p=c[f];if(p.hasStack){var h={};p.stackGroups=Object.keys(p.stackGroups).reduce(function(m,y){var w=p.stackGroups[y];return uo(uo({},m),{},Uy({},y,{numericAxisId:r,cateAxisId:o,items:w.items,stackedData:BZe(t,w.items,i)}))},h)}return uo(uo({},d),{},Uy({},f,p))},u)},Eae=function(t,n){var r=n.realScaleType,o=n.type,i=n.tickCount,a=n.originalDomain,s=n.allowDecimals,l=r||n.scale;if(l!=="auto"&&l!=="linear")return null;if(i&&o==="number"&&a&&(a[0]==="auto"||a[1]==="auto")){var c=t.domain();if(!c.length)return null;var u=tZe(c,i,s);return t.domain([Gk(u),Df(u)]),{niceTicks:u}}if(i&&o==="number"){var d=t.domain(),f=nZe(d,i,s);return{niceTicks:f}}return null};function Fv(e){var t=e.axis,n=e.ticks,r=e.bandSize,o=e.entry,i=e.index,a=e.dataKey;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!Kt(o[t.dataKey])){var s=sI(n,"value",o[t.dataKey]);if(s)return s.coordinate+r/2}return n[i]?n[i].coordinate+r/2:null}var l=jr(o,Kt(a)?t.dataKey:a);return Kt(l)?null:t.scale(l)}var H9=function(t){var n=t.axis,r=t.ticks,o=t.offset,i=t.bandSize,a=t.entry,s=t.index;if(n.type==="category")return r[s]?r[s].coordinate+o:null;var l=jr(a,n.dataKey,n.domain[s]);return Kt(l)?null:n.scale(l)-i/2+o},VZe=function(t){var n=t.numericAxis,r=n.scale.domain();if(n.type==="number"){var o=Math.min(r[0],r[1]),i=Math.max(r[0],r[1]);return o<=0&&i>=0?0:i<0?i:o}return r[0]},HZe=function(t,n){var r,o=(r=t.type)!==null&&r!==void 0&&r.defaultProps?uo(uo({},t.type.defaultProps),t.props):t.props,i=o.stackId;if(zo(i)){var a=n[i];if(a){var s=a.items.indexOf(t);return s>=0?a.stackedData[s]:null}}return null},UZe=function(t){return t.reduce(function(n,r){return[Gk(r.concat([n[0]]).filter(ut)),Df(r.concat([n[1]]).filter(ut))]},[1/0,-1/0])},Pae=function(t,n,r){return Object.keys(t).reduce(function(o,i){var a=t[i],s=a.stackedData,l=s.reduce(function(c,u){var d=UZe(u.slice(n,r+1));return[Math.min(c[0],d[0]),Math.max(c[1],d[1])]},[1/0,-1/0]);return[Math.min(l[0],o[0]),Math.max(l[1],o[1])]},[1/0,-1/0]).map(function(o){return o===1/0||o===-1/0?0:o})},U9=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,W9=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,yL=function(t,n,r){if(Jt(t))return t(n,r);if(!Array.isArray(t))return n;var o=[];if(ut(t[0]))o[0]=r?t[0]:Math.min(t[0],n[0]);else if(U9.test(t[0])){var i=+U9.exec(t[0])[1];o[0]=n[0]-i}else Jt(t[0])?o[0]=t[0](n[0]):o[0]=n[0];if(ut(t[1]))o[1]=r?t[1]:Math.max(t[1],n[1]);else if(W9.test(t[1])){var a=+W9.exec(t[1])[1];o[1]=n[1]+a}else Jt(t[1])?o[1]=t[1](n[1]):o[1]=n[1];return o},_I=function(t,n,r){if(t&&t.scale&&t.scale.bandwidth){var o=t.scale.bandwidth();if(!r||o>0)return o}if(t&&n&&n.length>=2){for(var i=qz(n,function(d){return d.coordinate}),a=1/0,s=1,l=i.length;se.length)&&(t=e.length);for(var n=0,r=new Array(t);n2&&arguments[2]!==void 0?arguments[2]:{top:0,right:0,bottom:0,left:0};return Math.min(Math.abs(t-(r.left||0)-(r.right||0)),Math.abs(n-(r.top||0)-(r.bottom||0)))/2},ZZe=function(t,n,r,o,i){var a=t.width,s=t.height,l=t.startAngle,c=t.endAngle,u=na(t.cx,a,a/2),d=na(t.cy,s,s/2),f=Oae(a,s,r),p=na(t.innerRadius,f,0),h=na(t.outerRadius,f,f*.8),m=Object.keys(n);return m.reduce(function(y,w){var x=n[w],C=x.domain,E=x.reversed,P;if(Kt(x.range))o==="angleAxis"?P=[l,c]:o==="radiusAxis"&&(P=[p,h]),E&&(P=[P[1],P[0]]);else{P=x.range;var T=P,I=qZe(T,2);l=I[0],c=I[1]}var A=Sae(x,i),k=A.realScaleType,O=A.scale;O.domain(C).range(P),Cae(O);var $=Eae(O,Ku(Ku({},x),{},{realScaleType:k})),N=Ku(Ku(Ku({},x),$),{},{range:P,radius:h,realScaleType:k,scale:O,cx:u,cy:d,innerRadius:p,outerRadius:h,startAngle:l,endAngle:c});return Ku(Ku({},y),{},Iae({},w,N))},{})},eet=function(t,n){var r=t.x,o=t.y,i=n.x,a=n.y;return Math.sqrt(Math.pow(r-i,2)+Math.pow(o-a,2))},tet=function(t,n){var r=t.x,o=t.y,i=n.cx,a=n.cy,s=eet({x:r,y:o},{x:i,y:a});if(s<=0)return{radius:s};var l=(r-i)/s,c=Math.acos(l);return o>a&&(c=2*Math.PI-c),{radius:s,angle:JZe(c),angleInRadian:c}},net=function(t){var n=t.startAngle,r=t.endAngle,o=Math.floor(n/360),i=Math.floor(r/360),a=Math.min(o,i);return{startAngle:n-a*360,endAngle:r-a*360}},ret=function(t,n){var r=n.startAngle,o=n.endAngle,i=Math.floor(r/360),a=Math.floor(o/360),s=Math.min(i,a);return t+s*360},Y9=function(t,n){var r=t.x,o=t.y,i=tet({x:r,y:o},n),a=i.radius,s=i.angle,l=n.innerRadius,c=n.outerRadius;if(ac)return!1;if(a===0)return!0;var u=net(n),d=u.startAngle,f=u.endAngle,p=s,h;if(d<=f){for(;p>f;)p-=360;for(;p=d&&p<=f}else{for(;p>d;)p-=360;for(;p=f&&p<=d}return h?Ku(Ku({},n),{},{radius:a,angle:ret(p,n)}):null},Aae=function(t){return!v.isValidElement(t)&&!Jt(t)&&typeof t!="boolean"?t.className:""};function xS(e){"@babel/helpers - typeof";return xS=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},xS(e)}var oet=["offset"];function iet(e){return uet(e)||cet(e)||set(e)||aet()}function aet(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function set(e,t){if(e){if(typeof e=="string")return vL(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return vL(e,t)}}function cet(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function uet(e){if(Array.isArray(e))return vL(e)}function vL(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function fet(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Q9(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Lo(e){for(var t=1;t=0?1:-1,C,E;o==="insideStart"?(C=p+x*a,E=m):o==="insideEnd"?(C=h-x*a,E=!m):o==="end"&&(C=h+x*a,E=m),E=w<=0?E:!E;var P=Mr(c,u,y,C),T=Mr(c,u,y,C+(E?1:-1)*359),I="M".concat(P.x,",").concat(P.y,` + height and width.`,D,_,a,l,u,d,n);var z=!Array.isArray(p)&&cd(p.type).endsWith("Chart");return Y.Children.map(p,function(F){return Y.isValidElement(F)?v.cloneElement(F,sP({width:D,height:_},z?{style:sP({height:"100%",width:"100%",maxHeight:_,maxWidth:D},F.props.style)}:{})):F})},[n,p,l,f,d,u,k,a]);return Y.createElement("div",{id:y?"".concat(y):void 0,className:de("recharts-responsive-container",w),style:sP(sP({},E),{},{width:a,height:l,minWidth:u,minHeight:d,maxHeight:f}),ref:P},N)}),Kb=function(t){return null};Kb.displayName="Cell";function hS(e){"@babel/helpers - typeof";return hS=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},hS(e)}function U8(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function aL(e){for(var t=1;t1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||El.isSsr)return{width:0,height:0};var r=MYe(n),o=JSON.stringify({text:t,copyStyle:r});if(Rm.widthCache[o])return Rm.widthCache[o];try{var i=document.getElementById(W8);i||(i=document.createElement("span"),i.setAttribute("id",W8),i.setAttribute("aria-hidden","true"),document.body.appendChild(i));var a=aL(aL({},kYe),r);Object.assign(i.style,a),i.textContent="".concat(t);var s=i.getBoundingClientRect(),l={width:s.width,height:s.height};return Rm.widthCache[o]=l,++Rm.cacheCount>AYe&&(Rm.cacheCount=0,Rm.widthCache={}),l}catch{return{width:0,height:0}}},RYe=function(t){return{top:t.top+window.scrollY-document.documentElement.clientTop,left:t.left+window.scrollX-document.documentElement.clientLeft}};function gS(e){"@babel/helpers - typeof";return gS=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},gS(e)}function $I(e,t){return NYe(e)||_Ye(e,t)||DYe(e,t)||$Ye()}function $Ye(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function DYe(e,t){if(e){if(typeof e=="string")return G8(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return G8(e,t)}}function G8(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function QYe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function J8(e,t){return eQe(e)||ZYe(e,t)||JYe(e,t)||XYe()}function XYe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function JYe(e,t){if(e){if(typeof e=="string")return Z8(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Z8(e,t)}}function Z8(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&arguments[0]!==void 0?arguments[0]:[];return D.reduce(function(_,z){var F=z.word,V=z.width,U=_[_.length-1];if(U&&(o==null||i||U.width+V+rz.width?_:z})};if(!u)return p;for(var m="…",y=function(D){var _=d.slice(0,D),z=Oie({breakAll:c,style:l,children:_+m}).wordsWithComputedWidth,F=f(z),V=F.length>a||h(F).width>Number(o);return[V,F]},w=0,x=d.length-1,S=0,E;w<=x&&S<=d.length-1;){var P=Math.floor((w+x)/2),T=P-1,I=y(T),A=J8(I,2),k=A[0],O=A[1],$=y(P),N=J8($,1),L=N[0];if(!k&&!L&&(w=P+1),k&&L&&(x=P-1),!k&&L){E=O;break}S++}return E||p},e9=function(t){var n=Kt(t)?[]:t.toString().split(Iie);return[{words:n}]},nQe=function(t){var n=t.width,r=t.scaleToFit,o=t.children,i=t.style,a=t.breakAll,s=t.maxLines;if((n||r)&&!El.isSsr){var l,c,u=Oie({breakAll:a,children:o,style:i});if(u){var d=u.wordsWithComputedWidth,f=u.spaceWidth;l=d,c=f}else return e9(o);return tQe({breakAll:a,children:o,maxLines:s,style:i},l,c,n,r)}return e9(o)},t9="#808080",bg=function(t){var n=t.x,r=n===void 0?0:n,o=t.y,i=o===void 0?0:o,a=t.lineHeight,s=a===void 0?"1em":a,l=t.capHeight,c=l===void 0?"0.71em":l,u=t.scaleToFit,d=u===void 0?!1:u,f=t.textAnchor,p=f===void 0?"start":f,h=t.verticalAnchor,m=h===void 0?"end":h,y=t.fill,w=y===void 0?t9:y,x=X8(t,KYe),S=v.useMemo(function(){return nQe({breakAll:x.breakAll,children:x.children,maxLines:x.maxLines,scaleToFit:d,style:x.style,width:x.width})},[x.breakAll,x.children,x.maxLines,d,x.style,x.width]),E=x.dx,P=x.dy,T=x.angle,I=x.className,A=x.breakAll,k=X8(x,YYe);if(!zo(r)||!zo(i))return null;var O=r+(ut(E)?E:0),$=i+(ut(P)?P:0),N;switch(m){case"start":N=MD("calc(".concat(c,")"));break;case"middle":N=MD("calc(".concat((S.length-1)/2," * -").concat(s," + (").concat(c," / 2))"));break;default:N=MD("calc(".concat(S.length-1," * -").concat(s,")"));break}var L=[];if(d){var j=S[0].width,D=x.width;L.push("scale(".concat((ut(D)?D/j:1)/j,")"))}return T&&L.push("rotate(".concat(T,", ").concat(O,", ").concat($,")")),L.length&&(k.transform=L.join(" ")),Y.createElement("text",sL({},_t(k,!0),{x:O,y:$,className:de("recharts-text",I),textAnchor:p,fill:w.includes("url")?t9:w}),S.map(function(_,z){var F=_.words.join(A?"":" ");return Y.createElement("tspan",{x:O,dy:z===0?N:s,key:"".concat(F,"-").concat(z)},F)}))};function Yf(e,t){return e==null||t==null?NaN:et?1:e>=t?0:NaN}function rQe(e,t){return e==null||t==null?NaN:te?1:t>=e?0:NaN}function Zz(e){let t,n,r;e.length!==2?(t=Yf,n=(s,l)=>Yf(e(s),l),r=(s,l)=>e(s)-l):(t=e===Yf||e===rQe?e:oQe,n=e,r=e);function o(s,l,c=0,u=s.length){if(c>>1;n(s[d],l)<0?c=d+1:u=d}while(c>>1;n(s[d],l)<=0?c=d+1:u=d}while(cc&&r(s[d-1],l)>-r(s[d],l)?d-1:d}return{left:o,center:a,right:i}}function oQe(){return 0}function Aie(e){return e===null?NaN:+e}function*iQe(e,t){for(let n of e)n!=null&&(n=+n)>=n&&(yield n)}const aQe=Zz(Yf),r1=aQe.right;Zz(Aie).center;class n9 extends Map{constructor(t,n=cQe){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),t!=null)for(const[r,o]of t)this.set(r,o)}get(t){return super.get(r9(this,t))}has(t){return super.has(r9(this,t))}set(t,n){return super.set(sQe(this,t),n)}delete(t){return super.delete(lQe(this,t))}}function r9({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function sQe({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function lQe({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function cQe(e){return e!==null&&typeof e=="object"?e.valueOf():e}function uQe(e=Yf){if(e===Yf)return kie;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,n)=>{const r=e(t,n);return r||r===0?r:(e(n,n)===0)-(e(t,t)===0)}}function kie(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(et?1:0)}const dQe=Math.sqrt(50),fQe=Math.sqrt(10),pQe=Math.sqrt(2);function DI(e,t,n){const r=(t-e)/Math.max(0,n),o=Math.floor(Math.log10(r)),i=r/Math.pow(10,o),a=i>=dQe?10:i>=fQe?5:i>=pQe?2:1;let s,l,c;return o<0?(c=Math.pow(10,-o)/a,s=Math.round(e*c),l=Math.round(t*c),s/ct&&--l,c=-c):(c=Math.pow(10,o)*a,s=Math.round(e/c),l=Math.round(t/c),s*ct&&--l),l0))return[];if(e===t)return[e];const r=t=o))return[];const s=i-o+1,l=new Array(s);if(r)if(a<0)for(let c=0;c=r)&&(n=r);return n}function i9(e,t){let n;for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);return n}function Mie(e,t,n=0,r=1/0,o){if(t=Math.floor(t),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(e.length-1,r)),!(n<=t&&t<=r))return e;for(o=o===void 0?kie:uQe(o);r>n;){if(r-n>600){const l=r-n+1,c=t-n+1,u=Math.log(l),d=.5*Math.exp(2*u/3),f=.5*Math.sqrt(u*d*(l-d)/l)*(c-l/2<0?-1:1),p=Math.max(n,Math.floor(t-c*d/l+f)),h=Math.min(r,Math.floor(t+(l-c)*d/l+f));Mie(e,t,p,h,o)}const i=e[t];let a=n,s=r;for(cw(e,n,t),o(e[r],i)>0&&cw(e,n,r);a0;)--s}o(e[n],i)===0?cw(e,n,s):(++s,cw(e,s,r)),s<=t&&(n=s+1),t<=s&&(r=s-1)}return e}function cw(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function hQe(e,t,n){if(e=Float64Array.from(iQe(e)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return i9(e);if(t>=1)return o9(e);var r,o=(r-1)*t,i=Math.floor(o),a=o9(Mie(e,i).subarray(0,i+1)),s=i9(e.subarray(i+1));return a+(s-a)*(o-i)}}function gQe(e,t,n=Aie){if(!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,o=(r-1)*t,i=Math.floor(o),a=+n(e[i],i,e),s=+n(e[i+1],i+1,e);return a+(s-a)*(o-i)}}function mQe(e,t,n){e=+e,t=+t,n=(o=arguments.length)<2?(t=e,e=0,1):o<3?1:+n;for(var r=-1,o=Math.max(0,Math.ceil((t-e)/n))|0,i=new Array(o);++r>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?cP(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?cP(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=vQe.exec(e))?new Ia(t[1],t[2],t[3],1):(t=bQe.exec(e))?new Ia(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=wQe.exec(e))?cP(t[1],t[2],t[3],t[4]):(t=xQe.exec(e))?cP(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=SQe.exec(e))?f9(t[1],t[2]/100,t[3]/100,1):(t=CQe.exec(e))?f9(t[1],t[2]/100,t[3]/100,t[4]):a9.hasOwnProperty(e)?c9(a9[e]):e==="transparent"?new Ia(NaN,NaN,NaN,0):null}function c9(e){return new Ia(e>>16&255,e>>8&255,e&255,1)}function cP(e,t,n,r){return r<=0&&(e=t=n=NaN),new Ia(e,t,n,r)}function TQe(e){return e instanceof o1||(e=bS(e)),e?(e=e.rgb(),new Ia(e.r,e.g,e.b,e.opacity)):new Ia}function fL(e,t,n,r){return arguments.length===1?TQe(e):new Ia(e,t,n,r??1)}function Ia(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}tV(Ia,fL,$ie(o1,{brighter(e){return e=e==null?_I:Math.pow(_I,e),new Ia(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?yS:Math.pow(yS,e),new Ia(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Ia(ng(this.r),ng(this.g),ng(this.b),NI(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:u9,formatHex:u9,formatHex8:IQe,formatRgb:d9,toString:d9}));function u9(){return`#${Lh(this.r)}${Lh(this.g)}${Lh(this.b)}`}function IQe(){return`#${Lh(this.r)}${Lh(this.g)}${Lh(this.b)}${Lh((isNaN(this.opacity)?1:this.opacity)*255)}`}function d9(){const e=NI(this.opacity);return`${e===1?"rgb(":"rgba("}${ng(this.r)}, ${ng(this.g)}, ${ng(this.b)}${e===1?")":`, ${e})`}`}function NI(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function ng(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Lh(e){return e=ng(e),(e<16?"0":"")+e.toString(16)}function f9(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new hc(e,t,n,r)}function Die(e){if(e instanceof hc)return new hc(e.h,e.s,e.l,e.opacity);if(e instanceof o1||(e=bS(e)),!e)return new hc;if(e instanceof hc)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,o=Math.min(t,n,r),i=Math.max(t,n,r),a=NaN,s=i-o,l=(i+o)/2;return s?(t===i?a=(n-r)/s+(n0&&l<1?0:a,new hc(a,s,l,e.opacity)}function OQe(e,t,n,r){return arguments.length===1?Die(e):new hc(e,t,n,r??1)}function hc(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}tV(hc,OQe,$ie(o1,{brighter(e){return e=e==null?_I:Math.pow(_I,e),new hc(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?yS:Math.pow(yS,e),new hc(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,o=2*n-r;return new Ia(RD(e>=240?e-240:e+120,o,r),RD(e,o,r),RD(e<120?e+240:e-120,o,r),this.opacity)},clamp(){return new hc(p9(this.h),uP(this.s),uP(this.l),NI(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=NI(this.opacity);return`${e===1?"hsl(":"hsla("}${p9(this.h)}, ${uP(this.s)*100}%, ${uP(this.l)*100}%${e===1?")":`, ${e})`}`}}));function p9(e){return e=(e||0)%360,e<0?e+360:e}function uP(e){return Math.max(0,Math.min(1,e||0))}function RD(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const nV=e=>()=>e;function AQe(e,t){return function(n){return e+n*t}}function kQe(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function MQe(e){return(e=+e)==1?_ie:function(t,n){return n-t?kQe(t,n,e):nV(isNaN(t)?n:t)}}function _ie(e,t){var n=t-e;return n?AQe(e,n):nV(isNaN(e)?t:e)}const h9=function e(t){var n=MQe(t);function r(o,i){var a=n((o=fL(o)).r,(i=fL(i)).r),s=n(o.g,i.g),l=n(o.b,i.b),c=_ie(o.opacity,i.opacity);return function(u){return o.r=a(u),o.g=s(u),o.b=l(u),o.opacity=c(u),o+""}}return r.gamma=e,r}(1);function RQe(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),o;return function(i){for(o=0;on&&(i=t.slice(n,i),s[a]?s[a]+=i:s[++a]=i),(r=r[0])===(o=o[0])?s[a]?s[a]+=o:s[++a]=o:(s[++a]=null,l.push({i:a,x:LI(r,o)})),n=$D.lastIndex;return nt&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function HQe(e,t,n){var r=e[0],o=e[1],i=t[0],a=t[1];return o2?UQe:HQe,l=c=null,d}function d(f){return f==null||isNaN(f=+f)?i:(l||(l=s(e.map(r),t,n)))(r(a(f)))}return d.invert=function(f){return a(o((c||(c=s(t,e.map(r),LI)))(f)))},d.domain=function(f){return arguments.length?(e=Array.from(f,FI),u()):e.slice()},d.range=function(f){return arguments.length?(t=Array.from(f),u()):t.slice()},d.rangeRound=function(f){return t=Array.from(f),n=rV,u()},d.clamp=function(f){return arguments.length?(a=f?!0:ra,u()):a!==ra},d.interpolate=function(f){return arguments.length?(n=f,u()):n},d.unknown=function(f){return arguments.length?(i=f,d):i},function(f,p){return r=f,o=p,u()}}function oV(){return qk()(ra,ra)}function WQe(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function jI(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function Nv(e){return e=jI(Math.abs(e)),e?e[1]:NaN}function GQe(e,t){return function(n,r){for(var o=n.length,i=[],a=0,s=e[0],l=0;o>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),i.push(n.substring(o-=s,o+s)),!((l+=s+1)>r));)s=e[a=(a+1)%e.length];return i.reverse().join(t)}}function qQe(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var KQe=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function wS(e){if(!(t=KQe.exec(e)))throw new Error("invalid format: "+e);var t;return new iV({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}wS.prototype=iV.prototype;function iV(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}iV.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function YQe(e){e:for(var t=e.length,n=1,r=-1,o;n0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(o+1):e}var Nie;function QQe(e,t){var n=jI(e,t);if(!n)return e+"";var r=n[0],o=n[1],i=o-(Nie=Math.max(-8,Math.min(8,Math.floor(o/3)))*3)+1,a=r.length;return i===a?r:i>a?r+new Array(i-a+1).join("0"):i>0?r.slice(0,i)+"."+r.slice(i):"0."+new Array(1-i).join("0")+jI(e,Math.max(0,t+i-1))[0]}function m9(e,t){var n=jI(e,t);if(!n)return e+"";var r=n[0],o=n[1];return o<0?"0."+new Array(-o).join("0")+r:r.length>o+1?r.slice(0,o+1)+"."+r.slice(o+1):r+new Array(o-r.length+2).join("0")}const y9={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:WQe,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>m9(e*100,t),r:m9,s:QQe,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function v9(e){return e}var b9=Array.prototype.map,w9=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function XQe(e){var t=e.grouping===void 0||e.thousands===void 0?v9:GQe(b9.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",r=e.currency===void 0?"":e.currency[1]+"",o=e.decimal===void 0?".":e.decimal+"",i=e.numerals===void 0?v9:qQe(b9.call(e.numerals,String)),a=e.percent===void 0?"%":e.percent+"",s=e.minus===void 0?"−":e.minus+"",l=e.nan===void 0?"NaN":e.nan+"";function c(d){d=wS(d);var f=d.fill,p=d.align,h=d.sign,m=d.symbol,y=d.zero,w=d.width,x=d.comma,S=d.precision,E=d.trim,P=d.type;P==="n"?(x=!0,P="g"):y9[P]||(S===void 0&&(S=12),E=!0,P="g"),(y||f==="0"&&p==="=")&&(y=!0,f="0",p="=");var T=m==="$"?n:m==="#"&&/[boxX]/.test(P)?"0"+P.toLowerCase():"",I=m==="$"?r:/[%p]/.test(P)?a:"",A=y9[P],k=/[defgprs%]/.test(P);S=S===void 0?6:/[gprs]/.test(P)?Math.max(1,Math.min(21,S)):Math.max(0,Math.min(20,S));function O($){var N=T,L=I,j,D,_;if(P==="c")L=A($)+L,$="";else{$=+$;var z=$<0||1/$<0;if($=isNaN($)?l:A(Math.abs($),S),E&&($=YQe($)),z&&+$==0&&h!=="+"&&(z=!1),N=(z?h==="("?h:s:h==="-"||h==="("?"":h)+N,L=(P==="s"?w9[8+Nie/3]:"")+L+(z&&h==="("?")":""),k){for(j=-1,D=$.length;++j_||_>57){L=(_===46?o+$.slice(j+1):$.slice(j))+L,$=$.slice(0,j);break}}}x&&!y&&($=t($,1/0));var F=N.length+$.length+L.length,V=F>1)+N+$+L+V.slice(F);break;default:$=V+N+$+L;break}return i($)}return O.toString=function(){return d+""},O}function u(d,f){var p=c((d=wS(d),d.type="f",d)),h=Math.max(-8,Math.min(8,Math.floor(Nv(f)/3)))*3,m=Math.pow(10,-h),y=w9[8+h/3];return function(w){return p(m*w)+y}}return{format:c,formatPrefix:u}}var dP,aV,Lie;JQe({thousands:",",grouping:[3],currency:["$",""]});function JQe(e){return dP=XQe(e),aV=dP.format,Lie=dP.formatPrefix,dP}function ZQe(e){return Math.max(0,-Nv(Math.abs(e)))}function eXe(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Nv(t)/3)))*3-Nv(Math.abs(e)))}function tXe(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Nv(t)-Nv(e))+1}function Fie(e,t,n,r){var o=uL(e,t,n),i;switch(r=wS(r??",f"),r.type){case"s":{var a=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(i=eXe(o,a))&&(r.precision=i),Lie(r,a)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(i=tXe(o,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=i-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(i=ZQe(o))&&(r.precision=i-(r.type==="%")*2);break}}return aV(r)}function Dp(e){var t=e.domain;return e.ticks=function(n){var r=t();return lL(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var o=t();return Fie(o[0],o[o.length-1],n??10,r)},e.nice=function(n){n==null&&(n=10);var r=t(),o=0,i=r.length-1,a=r[o],s=r[i],l,c,u=10;for(s0;){if(c=cL(a,s,n),c===l)return r[o]=a,r[i]=s,t(r);if(c>0)a=Math.floor(a/c)*c,s=Math.ceil(s/c)*c;else if(c<0)a=Math.ceil(a*c)/c,s=Math.floor(s*c)/c;else break;l=c}return e},e}function BI(){var e=oV();return e.copy=function(){return i1(e,BI())},zl.apply(e,arguments),Dp(e)}function jie(e){var t;function n(r){return r==null||isNaN(r=+r)?t:r}return n.invert=n,n.domain=n.range=function(r){return arguments.length?(e=Array.from(r,FI),n):e.slice()},n.unknown=function(r){return arguments.length?(t=r,n):t},n.copy=function(){return jie(e).unknown(t)},e=arguments.length?Array.from(e,FI):[0,1],Dp(n)}function Bie(e,t){e=e.slice();var n=0,r=e.length-1,o=e[n],i=e[r],a;return iMath.pow(e,t)}function aXe(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function C9(e){return(t,n)=>-e(-t,n)}function sV(e){const t=e(x9,S9),n=t.domain;let r=10,o,i;function a(){return o=aXe(r),i=iXe(r),n()[0]<0?(o=C9(o),i=C9(i),e(nXe,rXe)):e(x9,S9),t}return t.base=function(s){return arguments.length?(r=+s,a()):r},t.domain=function(s){return arguments.length?(n(s),a()):n()},t.ticks=s=>{const l=n();let c=l[0],u=l[l.length-1];const d=u0){for(;f<=p;++f)for(h=1;hu)break;w.push(m)}}else for(;f<=p;++f)for(h=r-1;h>=1;--h)if(m=f>0?h/i(-f):h*i(f),!(mu)break;w.push(m)}w.length*2{if(s==null&&(s=10),l==null&&(l=r===10?"s":","),typeof l!="function"&&(!(r%1)&&(l=wS(l)).precision==null&&(l.trim=!0),l=aV(l)),s===1/0)return l;const c=Math.max(1,r*s/t.ticks().length);return u=>{let d=u/i(Math.round(o(u)));return d*rn(Bie(n(),{floor:s=>i(Math.floor(o(s))),ceil:s=>i(Math.ceil(o(s)))})),t}function zie(){const e=sV(qk()).domain([1,10]);return e.copy=()=>i1(e,zie()).base(e.base()),zl.apply(e,arguments),e}function E9(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function P9(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function lV(e){var t=1,n=e(E9(t),P9(t));return n.constant=function(r){return arguments.length?e(E9(t=+r),P9(t)):t},Dp(n)}function Vie(){var e=lV(qk());return e.copy=function(){return i1(e,Vie()).constant(e.constant())},zl.apply(e,arguments)}function T9(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function sXe(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function lXe(e){return e<0?-e*e:e*e}function cV(e){var t=e(ra,ra),n=1;function r(){return n===1?e(ra,ra):n===.5?e(sXe,lXe):e(T9(n),T9(1/n))}return t.exponent=function(o){return arguments.length?(n=+o,r()):n},Dp(t)}function uV(){var e=cV(qk());return e.copy=function(){return i1(e,uV()).exponent(e.exponent())},zl.apply(e,arguments),e}function cXe(){return uV.apply(null,arguments).exponent(.5)}function I9(e){return Math.sign(e)*e*e}function uXe(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function Hie(){var e=oV(),t=[0,1],n=!1,r;function o(i){var a=uXe(e(i));return isNaN(a)?r:n?Math.round(a):a}return o.invert=function(i){return e.invert(I9(i))},o.domain=function(i){return arguments.length?(e.domain(i),o):e.domain()},o.range=function(i){return arguments.length?(e.range((t=Array.from(i,FI)).map(I9)),o):t.slice()},o.rangeRound=function(i){return o.range(i).round(!0)},o.round=function(i){return arguments.length?(n=!!i,o):n},o.clamp=function(i){return arguments.length?(e.clamp(i),o):e.clamp()},o.unknown=function(i){return arguments.length?(r=i,o):r},o.copy=function(){return Hie(e.domain(),t).round(n).clamp(e.clamp()).unknown(r)},zl.apply(o,arguments),Dp(o)}function Uie(){var e=[],t=[],n=[],r;function o(){var a=0,s=Math.max(1,t.length);for(n=new Array(s-1);++a0?n[s-1]:e[0],s=n?[r[n-1],t]:[r[c-1],r[c]]},a.unknown=function(l){return arguments.length&&(i=l),a},a.thresholds=function(){return r.slice()},a.copy=function(){return Wie().domain([e,t]).range(o).unknown(i)},zl.apply(Dp(a),arguments)}function Gie(){var e=[.5],t=[0,1],n,r=1;function o(i){return i!=null&&i<=i?t[r1(e,i,0,r)]:n}return o.domain=function(i){return arguments.length?(e=Array.from(i),r=Math.min(e.length,t.length-1),o):e.slice()},o.range=function(i){return arguments.length?(t=Array.from(i),r=Math.min(e.length,t.length-1),o):t.slice()},o.invertExtent=function(i){var a=t.indexOf(i);return[e[a-1],e[a]]},o.unknown=function(i){return arguments.length?(n=i,o):n},o.copy=function(){return Gie().domain(e).range(t).unknown(n)},zl.apply(o,arguments)}const DD=new Date,_D=new Date;function Uo(e,t,n,r){function o(i){return e(i=arguments.length===0?new Date:new Date(+i)),i}return o.floor=i=>(e(i=new Date(+i)),i),o.ceil=i=>(e(i=new Date(i-1)),t(i,1),e(i),i),o.round=i=>{const a=o(i),s=o.ceil(i);return i-a(t(i=new Date(+i),a==null?1:Math.floor(a)),i),o.range=(i,a,s)=>{const l=[];if(i=o.ceil(i),s=s==null?1:Math.floor(s),!(i0))return l;let c;do l.push(c=new Date(+i)),t(i,s),e(i);while(cUo(a=>{if(a>=a)for(;e(a),!i(a);)a.setTime(a-1)},(a,s)=>{if(a>=a)if(s<0)for(;++s<=0;)for(;t(a,-1),!i(a););else for(;--s>=0;)for(;t(a,1),!i(a););}),n&&(o.count=(i,a)=>(DD.setTime(+i),_D.setTime(+a),e(DD),e(_D),Math.floor(n(DD,_D))),o.every=i=>(i=Math.floor(i),!isFinite(i)||!(i>0)?null:i>1?o.filter(r?a=>r(a)%i===0:a=>o.count(0,a)%i===0):o)),o}const zI=Uo(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);zI.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Uo(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):zI);zI.range;const rd=1e3,gl=rd*60,od=gl*60,Id=od*24,dV=Id*7,O9=Id*30,ND=Id*365,Fh=Uo(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*rd)},(e,t)=>(t-e)/rd,e=>e.getUTCSeconds());Fh.range;const fV=Uo(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*rd)},(e,t)=>{e.setTime(+e+t*gl)},(e,t)=>(t-e)/gl,e=>e.getMinutes());fV.range;const pV=Uo(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*gl)},(e,t)=>(t-e)/gl,e=>e.getUTCMinutes());pV.range;const hV=Uo(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*rd-e.getMinutes()*gl)},(e,t)=>{e.setTime(+e+t*od)},(e,t)=>(t-e)/od,e=>e.getHours());hV.range;const gV=Uo(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*od)},(e,t)=>(t-e)/od,e=>e.getUTCHours());gV.range;const a1=Uo(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*gl)/Id,e=>e.getDate()-1);a1.range;const Kk=Uo(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Id,e=>e.getUTCDate()-1);Kk.range;const qie=Uo(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Id,e=>Math.floor(e/Id));qie.range;function jg(e){return Uo(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,n)=>{t.setDate(t.getDate()+n*7)},(t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*gl)/dV)}const Yk=jg(0),VI=jg(1),dXe=jg(2),fXe=jg(3),Lv=jg(4),pXe=jg(5),hXe=jg(6);Yk.range;VI.range;dXe.range;fXe.range;Lv.range;pXe.range;hXe.range;function Bg(e){return Uo(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCDate(t.getUTCDate()+n*7)},(t,n)=>(n-t)/dV)}const Qk=Bg(0),HI=Bg(1),gXe=Bg(2),mXe=Bg(3),Fv=Bg(4),yXe=Bg(5),vXe=Bg(6);Qk.range;HI.range;gXe.range;mXe.range;Fv.range;yXe.range;vXe.range;const mV=Uo(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());mV.range;const yV=Uo(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());yV.range;const Od=Uo(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());Od.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Uo(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)});Od.range;const Ad=Uo(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());Ad.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Uo(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)});Ad.range;function Kie(e,t,n,r,o,i){const a=[[Fh,1,rd],[Fh,5,5*rd],[Fh,15,15*rd],[Fh,30,30*rd],[i,1,gl],[i,5,5*gl],[i,15,15*gl],[i,30,30*gl],[o,1,od],[o,3,3*od],[o,6,6*od],[o,12,12*od],[r,1,Id],[r,2,2*Id],[n,1,dV],[t,1,O9],[t,3,3*O9],[e,1,ND]];function s(c,u,d){const f=uy).right(a,f);if(p===a.length)return e.every(uL(c/ND,u/ND,d));if(p===0)return zI.every(Math.max(uL(c,u,d),1));const[h,m]=a[f/a[p-1][2]53)return null;"w"in Z||(Z.w=1),"Z"in Z?(ge=FD(uw(Z.y,0,1)),we=ge.getUTCDay(),ge=we>4||we===0?HI.ceil(ge):HI(ge),ge=Kk.offset(ge,(Z.V-1)*7),Z.y=ge.getUTCFullYear(),Z.m=ge.getUTCMonth(),Z.d=ge.getUTCDate()+(Z.w+6)%7):(ge=LD(uw(Z.y,0,1)),we=ge.getDay(),ge=we>4||we===0?VI.ceil(ge):VI(ge),ge=a1.offset(ge,(Z.V-1)*7),Z.y=ge.getFullYear(),Z.m=ge.getMonth(),Z.d=ge.getDate()+(Z.w+6)%7)}else("W"in Z||"U"in Z)&&("w"in Z||(Z.w="u"in Z?Z.u%7:"W"in Z?1:0),we="Z"in Z?FD(uw(Z.y,0,1)).getUTCDay():LD(uw(Z.y,0,1)).getDay(),Z.m=0,Z.d="W"in Z?(Z.w+6)%7+Z.W*7-(we+5)%7:Z.w+Z.U*7-(we+6)%7);return"Z"in Z?(Z.H+=Z.Z/100|0,Z.M+=Z.Z%100,FD(Z)):LD(Z)}}function A(se,oe,fe,Z){for(var ce=0,ge=oe.length,we=fe.length,me,Se;ce=we)return-1;if(me=oe.charCodeAt(ce++),me===37){if(me=oe.charAt(ce++),Se=P[me in A9?oe.charAt(ce++):me],!Se||(Z=Se(se,fe,Z))<0)return-1}else if(me!=fe.charCodeAt(Z++))return-1}return Z}function k(se,oe,fe){var Z=c.exec(oe.slice(fe));return Z?(se.p=u.get(Z[0].toLowerCase()),fe+Z[0].length):-1}function O(se,oe,fe){var Z=p.exec(oe.slice(fe));return Z?(se.w=h.get(Z[0].toLowerCase()),fe+Z[0].length):-1}function $(se,oe,fe){var Z=d.exec(oe.slice(fe));return Z?(se.w=f.get(Z[0].toLowerCase()),fe+Z[0].length):-1}function N(se,oe,fe){var Z=w.exec(oe.slice(fe));return Z?(se.m=x.get(Z[0].toLowerCase()),fe+Z[0].length):-1}function L(se,oe,fe){var Z=m.exec(oe.slice(fe));return Z?(se.m=y.get(Z[0].toLowerCase()),fe+Z[0].length):-1}function j(se,oe,fe){return A(se,t,oe,fe)}function D(se,oe,fe){return A(se,n,oe,fe)}function _(se,oe,fe){return A(se,r,oe,fe)}function z(se){return a[se.getDay()]}function F(se){return i[se.getDay()]}function V(se){return l[se.getMonth()]}function U(se){return s[se.getMonth()]}function K(se){return o[+(se.getHours()>=12)]}function X(se){return 1+~~(se.getMonth()/3)}function ie(se){return a[se.getUTCDay()]}function ee(se){return i[se.getUTCDay()]}function Q(se){return l[se.getUTCMonth()]}function te(se){return s[se.getUTCMonth()]}function pe(se){return o[+(se.getUTCHours()>=12)]}function ae(se){return 1+~~(se.getUTCMonth()/3)}return{format:function(se){var oe=T(se+="",S);return oe.toString=function(){return se},oe},parse:function(se){var oe=I(se+="",!1);return oe.toString=function(){return se},oe},utcFormat:function(se){var oe=T(se+="",E);return oe.toString=function(){return se},oe},utcParse:function(se){var oe=I(se+="",!0);return oe.toString=function(){return se},oe}}}var A9={"-":"",_:" ",0:"0"},si=/^\s*\d+/,EXe=/^%/,PXe=/[\\^$*+?|[\]().{}]/g;function Qn(e,t,n){var r=e<0?"-":"",o=(r?-e:e)+"",i=o.length;return r+(i[t.toLowerCase(),n]))}function IXe(e,t,n){var r=si.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function OXe(e,t,n){var r=si.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function AXe(e,t,n){var r=si.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function kXe(e,t,n){var r=si.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function MXe(e,t,n){var r=si.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function k9(e,t,n){var r=si.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function M9(e,t,n){var r=si.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function RXe(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function $Xe(e,t,n){var r=si.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function DXe(e,t,n){var r=si.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function R9(e,t,n){var r=si.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function _Xe(e,t,n){var r=si.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function $9(e,t,n){var r=si.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function NXe(e,t,n){var r=si.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function LXe(e,t,n){var r=si.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function FXe(e,t,n){var r=si.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function jXe(e,t,n){var r=si.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function BXe(e,t,n){var r=EXe.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function zXe(e,t,n){var r=si.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function VXe(e,t,n){var r=si.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function D9(e,t){return Qn(e.getDate(),t,2)}function HXe(e,t){return Qn(e.getHours(),t,2)}function UXe(e,t){return Qn(e.getHours()%12||12,t,2)}function WXe(e,t){return Qn(1+a1.count(Od(e),e),t,3)}function Yie(e,t){return Qn(e.getMilliseconds(),t,3)}function GXe(e,t){return Yie(e,t)+"000"}function qXe(e,t){return Qn(e.getMonth()+1,t,2)}function KXe(e,t){return Qn(e.getMinutes(),t,2)}function YXe(e,t){return Qn(e.getSeconds(),t,2)}function QXe(e){var t=e.getDay();return t===0?7:t}function XXe(e,t){return Qn(Yk.count(Od(e)-1,e),t,2)}function Qie(e){var t=e.getDay();return t>=4||t===0?Lv(e):Lv.ceil(e)}function JXe(e,t){return e=Qie(e),Qn(Lv.count(Od(e),e)+(Od(e).getDay()===4),t,2)}function ZXe(e){return e.getDay()}function eJe(e,t){return Qn(VI.count(Od(e)-1,e),t,2)}function tJe(e,t){return Qn(e.getFullYear()%100,t,2)}function nJe(e,t){return e=Qie(e),Qn(e.getFullYear()%100,t,2)}function rJe(e,t){return Qn(e.getFullYear()%1e4,t,4)}function oJe(e,t){var n=e.getDay();return e=n>=4||n===0?Lv(e):Lv.ceil(e),Qn(e.getFullYear()%1e4,t,4)}function iJe(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Qn(t/60|0,"0",2)+Qn(t%60,"0",2)}function _9(e,t){return Qn(e.getUTCDate(),t,2)}function aJe(e,t){return Qn(e.getUTCHours(),t,2)}function sJe(e,t){return Qn(e.getUTCHours()%12||12,t,2)}function lJe(e,t){return Qn(1+Kk.count(Ad(e),e),t,3)}function Xie(e,t){return Qn(e.getUTCMilliseconds(),t,3)}function cJe(e,t){return Xie(e,t)+"000"}function uJe(e,t){return Qn(e.getUTCMonth()+1,t,2)}function dJe(e,t){return Qn(e.getUTCMinutes(),t,2)}function fJe(e,t){return Qn(e.getUTCSeconds(),t,2)}function pJe(e){var t=e.getUTCDay();return t===0?7:t}function hJe(e,t){return Qn(Qk.count(Ad(e)-1,e),t,2)}function Jie(e){var t=e.getUTCDay();return t>=4||t===0?Fv(e):Fv.ceil(e)}function gJe(e,t){return e=Jie(e),Qn(Fv.count(Ad(e),e)+(Ad(e).getUTCDay()===4),t,2)}function mJe(e){return e.getUTCDay()}function yJe(e,t){return Qn(HI.count(Ad(e)-1,e),t,2)}function vJe(e,t){return Qn(e.getUTCFullYear()%100,t,2)}function bJe(e,t){return e=Jie(e),Qn(e.getUTCFullYear()%100,t,2)}function wJe(e,t){return Qn(e.getUTCFullYear()%1e4,t,4)}function xJe(e,t){var n=e.getUTCDay();return e=n>=4||n===0?Fv(e):Fv.ceil(e),Qn(e.getUTCFullYear()%1e4,t,4)}function SJe(){return"+0000"}function N9(){return"%"}function L9(e){return+e}function F9(e){return Math.floor(+e/1e3)}var $m,Zie,eae;CJe({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function CJe(e){return $m=CXe(e),Zie=$m.format,$m.parse,eae=$m.utcFormat,$m.utcParse,$m}function EJe(e){return new Date(e)}function PJe(e){return e instanceof Date?+e:+new Date(+e)}function vV(e,t,n,r,o,i,a,s,l,c){var u=oV(),d=u.invert,f=u.domain,p=c(".%L"),h=c(":%S"),m=c("%I:%M"),y=c("%I %p"),w=c("%a %d"),x=c("%b %d"),S=c("%B"),E=c("%Y");function P(T){return(l(T)t(o/(e.length-1)))},n.quantiles=function(r){return Array.from({length:r+1},(o,i)=>hQe(e,i/r))},n.copy=function(){return oae(t).domain(e)},_d.apply(n,arguments)}function Jk(){var e=0,t=.5,n=1,r=1,o,i,a,s,l,c=ra,u,d=!1,f;function p(m){return isNaN(m=+m)?f:(m=.5+((m=+u(m))-i)*(r*mt}var lae=RJe,$Je=Zk,DJe=lae,_Je=qb;function NJe(e){return e&&e.length?$Je(e,_Je,DJe):void 0}var LJe=NJe;const _f=Bn(LJe);function FJe(e,t){return ee.e^i.s<0?1:-1;for(r=i.d.length,o=e.d.length,t=0,n=re.d[t]^i.s<0?1:-1;return r===o?0:r>o^i.s<0?1:-1};Rt.decimalPlaces=Rt.dp=function(){var e=this,t=e.d.length-1,n=(t-e.e)*Fr;if(t=e.d[t],t)for(;t%10==0;t/=10)n--;return n<0?0:n};Rt.dividedBy=Rt.div=function(e){return dd(this,new this.constructor(e))};Rt.dividedToIntegerBy=Rt.idiv=function(e){var t=this,n=t.constructor;return Er(dd(t,new n(e),0,1),n.precision)};Rt.equals=Rt.eq=function(e){return!this.cmp(e)};Rt.exponent=function(){return Mo(this)};Rt.greaterThan=Rt.gt=function(e){return this.cmp(e)>0};Rt.greaterThanOrEqualTo=Rt.gte=function(e){return this.cmp(e)>=0};Rt.isInteger=Rt.isint=function(){return this.e>this.d.length-2};Rt.isNegative=Rt.isneg=function(){return this.s<0};Rt.isPositive=Rt.ispos=function(){return this.s>0};Rt.isZero=function(){return this.s===0};Rt.lessThan=Rt.lt=function(e){return this.cmp(e)<0};Rt.lessThanOrEqualTo=Rt.lte=function(e){return this.cmp(e)<1};Rt.logarithm=Rt.log=function(e){var t,n=this,r=n.constructor,o=r.precision,i=o+5;if(e===void 0)e=new r(10);else if(e=new r(e),e.s<1||e.eq(us))throw Error(_l+"NaN");if(n.s<1)throw Error(_l+(n.s?"NaN":"-Infinity"));return n.eq(us)?new r(0):(qr=!1,t=dd(xS(n,i),xS(e,i),i),qr=!0,Er(t,o))};Rt.minus=Rt.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?pae(t,e):dae(t,(e.s=-e.s,e))};Rt.modulo=Rt.mod=function(e){var t,n=this,r=n.constructor,o=r.precision;if(e=new r(e),!e.s)throw Error(_l+"NaN");return n.s?(qr=!1,t=dd(n,e,0,1).times(e),qr=!0,n.minus(t)):Er(new r(n),o)};Rt.naturalExponential=Rt.exp=function(){return fae(this)};Rt.naturalLogarithm=Rt.ln=function(){return xS(this)};Rt.negated=Rt.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};Rt.plus=Rt.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?dae(t,e):pae(t,(e.s=-e.s,e))};Rt.precision=Rt.sd=function(e){var t,n,r,o=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(rg+e);if(t=Mo(o)+1,r=o.d.length-1,n=r*Fr+1,r=o.d[r],r){for(;r%10==0;r/=10)n--;for(r=o.d[0];r>=10;r/=10)n++}return e&&t>n?t:n};Rt.squareRoot=Rt.sqrt=function(){var e,t,n,r,o,i,a,s=this,l=s.constructor;if(s.s<1){if(!s.s)return new l(0);throw Error(_l+"NaN")}for(e=Mo(s),qr=!1,o=Math.sqrt(+s),o==0||o==1/0?(t=ru(s.d),(t.length+e)%2==0&&(t+="0"),o=Math.sqrt(t),e=Xb((e+1)/2)-(e<0||e%2),o==1/0?t="5e"+e:(t=o.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),r=new l(t)):r=new l(o.toString()),n=l.precision,o=a=n+3;;)if(i=r,r=i.plus(dd(s,i,a+2)).times(.5),ru(i.d).slice(0,a)===(t=ru(r.d)).slice(0,a)){if(t=t.slice(a-3,a+1),o==a&&t=="4999"){if(Er(i,n+1,0),i.times(i).eq(s)){r=i;break}}else if(t!="9999")break;a+=4}return qr=!0,Er(r,n)};Rt.times=Rt.mul=function(e){var t,n,r,o,i,a,s,l,c,u=this,d=u.constructor,f=u.d,p=(e=new d(e)).d;if(!u.s||!e.s)return new d(0);for(e.s*=u.s,n=u.e+e.e,l=f.length,c=p.length,l=0;){for(t=0,o=l+r;o>r;)s=i[o]+p[r]*f[o-r-1]+t,i[o--]=s%Qo|0,t=s/Qo|0;i[o]=(i[o]+t)%Qo|0}for(;!i[--a];)i.pop();return t?++n:i.shift(),e.d=i,e.e=n,qr?Er(e,d.precision):e};Rt.toDecimalPlaces=Rt.todp=function(e,t){var n=this,r=n.constructor;return n=new r(n),e===void 0?n:(wu(e,0,Qb),t===void 0?t=r.rounding:wu(t,0,8),Er(n,e+Mo(n)+1,t))};Rt.toExponential=function(e,t){var n,r=this,o=r.constructor;return e===void 0?n=wg(r,!0):(wu(e,0,Qb),t===void 0?t=o.rounding:wu(t,0,8),r=Er(new o(r),e+1,t),n=wg(r,!0,e+1)),n};Rt.toFixed=function(e,t){var n,r,o=this,i=o.constructor;return e===void 0?wg(o):(wu(e,0,Qb),t===void 0?t=i.rounding:wu(t,0,8),r=Er(new i(o),e+Mo(o)+1,t),n=wg(r.abs(),!1,e+Mo(r)+1),o.isneg()&&!o.isZero()?"-"+n:n)};Rt.toInteger=Rt.toint=function(){var e=this,t=e.constructor;return Er(new t(e),Mo(e)+1,t.rounding)};Rt.toNumber=function(){return+this};Rt.toPower=Rt.pow=function(e){var t,n,r,o,i,a,s=this,l=s.constructor,c=12,u=+(e=new l(e));if(!e.s)return new l(us);if(s=new l(s),!s.s){if(e.s<1)throw Error(_l+"Infinity");return s}if(s.eq(us))return s;if(r=l.precision,e.eq(us))return Er(s,r);if(t=e.e,n=e.d.length-1,a=t>=n,i=s.s,a){if((n=u<0?-u:u)<=uae){for(o=new l(us),t=Math.ceil(r/Fr+4),qr=!1;n%2&&(o=o.times(s),z9(o.d,t)),n=Xb(n/2),n!==0;)s=s.times(s),z9(s.d,t);return qr=!0,e.s<0?new l(us).div(o):Er(o,r)}}else if(i<0)throw Error(_l+"NaN");return i=i<0&&e.d[Math.max(t,n)]&1?-1:1,s.s=1,qr=!1,o=e.times(xS(s,r+c)),qr=!0,o=fae(o),o.s=i,o};Rt.toPrecision=function(e,t){var n,r,o=this,i=o.constructor;return e===void 0?(n=Mo(o),r=wg(o,n<=i.toExpNeg||n>=i.toExpPos)):(wu(e,1,Qb),t===void 0?t=i.rounding:wu(t,0,8),o=Er(new i(o),e,t),n=Mo(o),r=wg(o,e<=n||n<=i.toExpNeg,e)),r};Rt.toSignificantDigits=Rt.tosd=function(e,t){var n=this,r=n.constructor;return e===void 0?(e=r.precision,t=r.rounding):(wu(e,1,Qb),t===void 0?t=r.rounding:wu(t,0,8)),Er(new r(n),e,t)};Rt.toString=Rt.valueOf=Rt.val=Rt.toJSON=Rt[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=Mo(e),n=e.constructor;return wg(e,t<=n.toExpNeg||t>=n.toExpPos)};function dae(e,t){var n,r,o,i,a,s,l,c,u=e.constructor,d=u.precision;if(!e.s||!t.s)return t.s||(t=new u(e)),qr?Er(t,d):t;if(l=e.d,c=t.d,a=e.e,o=t.e,l=l.slice(),i=a-o,i){for(i<0?(r=l,i=-i,s=c.length):(r=c,o=a,s=l.length),a=Math.ceil(d/Fr),s=a>s?a+1:s+1,i>s&&(i=s,r.length=1),r.reverse();i--;)r.push(0);r.reverse()}for(s=l.length,i=c.length,s-i<0&&(i=s,r=c,c=l,l=r),n=0;i;)n=(l[--i]=l[i]+c[i]+n)/Qo|0,l[i]%=Qo;for(n&&(l.unshift(n),++o),s=l.length;l[--s]==0;)l.pop();return t.d=l,t.e=o,qr?Er(t,d):t}function wu(e,t,n){if(e!==~~e||en)throw Error(rg+e)}function ru(e){var t,n,r,o=e.length-1,i="",a=e[0];if(o>0){for(i+=a,t=1;ta?1:-1;else for(s=l=0;so[s]?1:-1;break}return l}function n(r,o,i){for(var a=0;i--;)r[i]-=a,a=r[i]1;)r.shift()}return function(r,o,i,a){var s,l,c,u,d,f,p,h,m,y,w,x,S,E,P,T,I,A,k=r.constructor,O=r.s==o.s?1:-1,$=r.d,N=o.d;if(!r.s)return new k(r);if(!o.s)throw Error(_l+"Division by zero");for(l=r.e-o.e,I=N.length,P=$.length,p=new k(O),h=p.d=[],c=0;N[c]==($[c]||0);)++c;if(N[c]>($[c]||0)&&--l,i==null?x=i=k.precision:a?x=i+(Mo(r)-Mo(o))+1:x=i,x<0)return new k(0);if(x=x/Fr+2|0,c=0,I==1)for(u=0,N=N[0],x++;(c1&&(N=e(N,u),$=e($,u),I=N.length,P=$.length),E=I,m=$.slice(0,I),y=m.length;y=Qo/2&&++T;do u=0,s=t(N,m,I,y),s<0?(w=m[0],I!=y&&(w=w*Qo+(m[1]||0)),u=w/T|0,u>1?(u>=Qo&&(u=Qo-1),d=e(N,u),f=d.length,y=m.length,s=t(d,m,f,y),s==1&&(u--,n(d,I16)throw Error(xV+Mo(e));if(!e.s)return new u(us);for(t==null?(qr=!1,s=d):s=t,a=new u(.03125);e.abs().gte(.1);)e=e.times(a),c+=5;for(r=Math.log(Ph(2,c))/Math.LN10*2+5|0,s+=r,n=o=i=new u(us),u.precision=s;;){if(o=Er(o.times(e),s),n=n.times(++l),a=i.plus(dd(o,n,s)),ru(a.d).slice(0,s)===ru(i.d).slice(0,s)){for(;c--;)i=Er(i.times(i),s);return u.precision=d,t==null?(qr=!0,Er(i,d)):i}i=a}}function Mo(e){for(var t=e.e*Fr,n=e.d[0];n>=10;n/=10)t++;return t}function jD(e,t,n){if(t>e.LN10.sd())throw qr=!0,n&&(e.precision=n),Error(_l+"LN10 precision limit exceeded");return Er(new e(e.LN10),t)}function pf(e){for(var t="";e--;)t+="0";return t}function xS(e,t){var n,r,o,i,a,s,l,c,u,d=1,f=10,p=e,h=p.d,m=p.constructor,y=m.precision;if(p.s<1)throw Error(_l+(p.s?"NaN":"-Infinity"));if(p.eq(us))return new m(0);if(t==null?(qr=!1,c=y):c=t,p.eq(10))return t==null&&(qr=!0),jD(m,c);if(c+=f,m.precision=c,n=ru(h),r=n.charAt(0),i=Mo(p),Math.abs(i)<15e14){for(;r<7&&r!=1||r==1&&n.charAt(1)>3;)p=p.times(e),n=ru(p.d),r=n.charAt(0),d++;i=Mo(p),r>1?(p=new m("0."+n),i++):p=new m(r+"."+n.slice(1))}else return l=jD(m,c+2,y).times(i+""),p=xS(new m(r+"."+n.slice(1)),c-f).plus(l),m.precision=y,t==null?(qr=!0,Er(p,y)):p;for(s=a=p=dd(p.minus(us),p.plus(us),c),u=Er(p.times(p),c),o=3;;){if(a=Er(a.times(u),c),l=s.plus(dd(a,new m(o),c)),ru(l.d).slice(0,c)===ru(s.d).slice(0,c))return s=s.times(2),i!==0&&(s=s.plus(jD(m,c+2,y).times(i+""))),s=dd(s,new m(d),c),m.precision=y,t==null?(qr=!0,Er(s,y)):s;s=l,o+=2}}function B9(e,t){var n,r,o;for((n=t.indexOf("."))>-1&&(t=t.replace(".","")),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;t.charCodeAt(r)===48;)++r;for(o=t.length;t.charCodeAt(o-1)===48;)--o;if(t=t.slice(r,o),t){if(o-=r,n=n-r-1,e.e=Xb(n/Fr),e.d=[],r=(n+1)%Fr,n<0&&(r+=Fr),rUI||e.e<-UI))throw Error(xV+n)}else e.s=0,e.e=0,e.d=[0];return e}function Er(e,t,n){var r,o,i,a,s,l,c,u,d=e.d;for(a=1,i=d[0];i>=10;i/=10)a++;if(r=t-a,r<0)r+=Fr,o=t,c=d[u=0];else{if(u=Math.ceil((r+1)/Fr),i=d.length,u>=i)return e;for(c=i=d[u],a=1;i>=10;i/=10)a++;r%=Fr,o=r-Fr+a}if(n!==void 0&&(i=Ph(10,a-o-1),s=c/i%10|0,l=t<0||d[u+1]!==void 0||c%i,l=n<4?(s||l)&&(n==0||n==(e.s<0?3:2)):s>5||s==5&&(n==4||l||n==6&&(r>0?o>0?c/Ph(10,a-o):0:d[u-1])%10&1||n==(e.s<0?8:7))),t<1||!d[0])return l?(i=Mo(e),d.length=1,t=t-i-1,d[0]=Ph(10,(Fr-t%Fr)%Fr),e.e=Xb(-t/Fr)||0):(d.length=1,d[0]=e.e=e.s=0),e;if(r==0?(d.length=u,i=1,u--):(d.length=u+1,i=Ph(10,Fr-r),d[u]=o>0?(c/Ph(10,a-o)%Ph(10,o)|0)*i:0),l)for(;;)if(u==0){(d[0]+=i)==Qo&&(d[0]=1,++e.e);break}else{if(d[u]+=i,d[u]!=Qo)break;d[u--]=0,i=1}for(r=d.length;d[--r]===0;)d.pop();if(qr&&(e.e>UI||e.e<-UI))throw Error(xV+Mo(e));return e}function pae(e,t){var n,r,o,i,a,s,l,c,u,d,f=e.constructor,p=f.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new f(e),qr?Er(t,p):t;if(l=e.d,d=t.d,r=t.e,c=e.e,l=l.slice(),a=c-r,a){for(u=a<0,u?(n=l,a=-a,s=d.length):(n=d,r=c,s=l.length),o=Math.max(Math.ceil(p/Fr),s)+2,a>o&&(a=o,n.length=1),n.reverse(),o=a;o--;)n.push(0);n.reverse()}else{for(o=l.length,s=d.length,u=o0;--o)l[s++]=0;for(o=d.length;o>a;){if(l[--o]0?i=i.charAt(0)+"."+i.slice(1)+pf(r):a>1&&(i=i.charAt(0)+"."+i.slice(1)),i=i+(o<0?"e":"e+")+o):o<0?(i="0."+pf(-o-1)+i,n&&(r=n-a)>0&&(i+=pf(r))):o>=a?(i+=pf(o+1-a),n&&(r=n-o-1)>0&&(i=i+"."+pf(r))):((r=o+1)0&&(o+1===a&&(i+="."),i+=pf(r))),e.s<0?"-"+i:i}function z9(e,t){if(e.length>t)return e.length=t,!0}function hae(e){var t,n,r;function o(i){var a=this;if(!(a instanceof o))return new o(i);if(a.constructor=o,i instanceof o){a.s=i.s,a.e=i.e,a.d=(i=i.d)?i.slice():i;return}if(typeof i=="number"){if(i*0!==0)throw Error(rg+i);if(i>0)a.s=1;else if(i<0)i=-i,a.s=-1;else{a.s=0,a.e=0,a.d=[0];return}if(i===~~i&&i<1e7){a.e=0,a.d=[i];return}return B9(a,i.toString())}else if(typeof i!="string")throw Error(rg+i);if(i.charCodeAt(0)===45?(i=i.slice(1),a.s=-1):a.s=1,iZe.test(i))B9(a,i);else throw Error(rg+i)}if(o.prototype=Rt,o.ROUND_UP=0,o.ROUND_DOWN=1,o.ROUND_CEIL=2,o.ROUND_FLOOR=3,o.ROUND_HALF_UP=4,o.ROUND_HALF_DOWN=5,o.ROUND_HALF_EVEN=6,o.ROUND_HALF_CEIL=7,o.ROUND_HALF_FLOOR=8,o.clone=hae,o.config=o.set=aZe,e===void 0&&(e={}),e)for(r=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t=o[t+1]&&r<=o[t+2])this[n]=r;else throw Error(rg+n+": "+r);if((r=e[n="LN10"])!==void 0)if(r==Math.LN10)this[n]=new this(r);else throw Error(rg+n+": "+r);return this}var SV=hae(oZe);us=new SV(1);const vr=SV;function sZe(e){return dZe(e)||uZe(e)||cZe(e)||lZe()}function lZe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function cZe(e,t){if(e){if(typeof e=="string")return gL(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return gL(e,t)}}function uZe(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function dZe(e){if(Array.isArray(e))return gL(e)}function gL(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=t?n.apply(void 0,o):e(t-a,V9(function(){for(var s=arguments.length,l=new Array(s),c=0;ce.length)&&(t=e.length);for(var n=0,r=new Array(t);n"u"||!(Symbol.iterator in Object(e)))){var n=[],r=!0,o=!1,i=void 0;try{for(var a=e[Symbol.iterator](),s;!(r=(s=a.next()).done)&&(n.push(s.value),!(t&&n.length===t));r=!0);}catch(l){o=!0,i=l}finally{try{!r&&a.return!=null&&a.return()}finally{if(o)throw i}}return n}}function TZe(e){if(Array.isArray(e))return e}function bae(e){var t=SS(e,2),n=t[0],r=t[1],o=n,i=r;return n>r&&(o=r,i=n),[o,i]}function wae(e,t,n){if(e.lte(0))return new vr(0);var r=nM.getDigitCount(e.toNumber()),o=new vr(10).pow(r),i=e.div(o),a=r!==1?.05:.1,s=new vr(Math.ceil(i.div(a).toNumber())).add(n).mul(a),l=s.mul(o);return t?l:new vr(Math.ceil(l))}function IZe(e,t,n){var r=1,o=new vr(e);if(!o.isint()&&n){var i=Math.abs(e);i<1?(r=new vr(10).pow(nM.getDigitCount(e)-1),o=new vr(Math.floor(o.div(r).toNumber())).mul(r)):i>1&&(o=new vr(Math.floor(e)))}else e===0?o=new vr(Math.floor((t-1)/2)):n||(o=new vr(Math.floor(e)));var a=Math.floor((t-1)/2),s=gZe(hZe(function(l){return o.add(new vr(l-a).mul(r)).toNumber()}),mL);return s(0,t)}function xae(e,t,n,r){var o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((t-e)/(n-1)))return{step:new vr(0),tickMin:new vr(0),tickMax:new vr(0)};var i=wae(new vr(t).sub(e).div(n-1),r,o),a;e<=0&&t>=0?a=new vr(0):(a=new vr(e).add(t).div(2),a=a.sub(new vr(a).mod(i)));var s=Math.ceil(a.sub(e).div(i).toNumber()),l=Math.ceil(new vr(t).sub(a).div(i).toNumber()),c=s+l+1;return c>n?xae(e,t,n,r,o+1):(c0?l+(n-c):l,s=t>0?s:s+(n-c)),{step:i,tickMin:a.sub(new vr(s).mul(i)),tickMax:a.add(new vr(l).mul(i))})}function OZe(e){var t=SS(e,2),n=t[0],r=t[1],o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,a=Math.max(o,2),s=bae([n,r]),l=SS(s,2),c=l[0],u=l[1];if(c===-1/0||u===1/0){var d=u===1/0?[c].concat(vL(mL(0,o-1).map(function(){return 1/0}))):[].concat(vL(mL(0,o-1).map(function(){return-1/0})),[u]);return n>r?yL(d):d}if(c===u)return IZe(c,o,i);var f=xae(c,u,a,i),p=f.step,h=f.tickMin,m=f.tickMax,y=nM.rangeStep(h,m.add(new vr(.1).mul(p)),p);return n>r?yL(y):y}function AZe(e,t){var n=SS(e,2),r=n[0],o=n[1],i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,a=bae([r,o]),s=SS(a,2),l=s[0],c=s[1];if(l===-1/0||c===1/0)return[r,o];if(l===c)return[l];var u=Math.max(t,2),d=wae(new vr(c).sub(l).div(u-1),i,0),f=[].concat(vL(nM.rangeStep(new vr(l),new vr(c).sub(new vr(.99).mul(d)),d)),[c]);return r>o?yL(f):f}var kZe=yae(OZe),MZe=yae(AZe),RZe="Invariant failed";function fp(e,t){throw new Error(RZe)}var $Ze=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function jv(e){"@babel/helpers - typeof";return jv=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},jv(e)}function WI(){return WI=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function BZe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function zZe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function VZe(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&arguments[1]!==void 0?arguments[1]:[],o=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0,a=-1,s=(n=r==null?void 0:r.length)!==null&&n!==void 0?n:0;if(s<=1)return 0;if(i&&i.axisType==="angleAxis"&&Math.abs(Math.abs(i.range[1]-i.range[0])-360)<=1e-6)for(var l=i.range,c=0;c0?o[c-1].coordinate:o[s-1].coordinate,d=o[c].coordinate,f=c>=s-1?o[0].coordinate:o[c+1].coordinate,p=void 0;if(ta(d-u)!==ta(f-d)){var h=[];if(ta(f-d)===ta(l[1]-l[0])){p=f;var m=d+l[1]-l[0];h[0]=Math.min(m,(m+u)/2),h[1]=Math.max(m,(m+u)/2)}else{p=u;var y=f+l[1]-l[0];h[0]=Math.min(d,(y+d)/2),h[1]=Math.max(d,(y+d)/2)}var w=[Math.min(d,(p+d)/2),Math.max(d,(p+d)/2)];if(t>w[0]&&t<=w[1]||t>=h[0]&&t<=h[1]){a=o[c].index;break}}else{var x=Math.min(u,f),S=Math.max(u,f);if(t>(x+d)/2&&t<=(S+d)/2){a=o[c].index;break}}}else for(var E=0;E0&&E(r[E].coordinate+r[E-1].coordinate)/2&&t<=(r[E].coordinate+r[E+1].coordinate)/2||E===s-1&&t>(r[E].coordinate+r[E-1].coordinate)/2){a=r[E].index;break}return a},CV=function(t){var n,r=t,o=r.type.displayName,i=(n=t.type)!==null&&n!==void 0&&n.defaultProps?po(po({},t.type.defaultProps),t.props):t.props,a=i.stroke,s=i.fill,l;switch(o){case"Line":l=a;break;case"Area":case"Radar":l=a&&a!=="none"?a:s;break;default:l=s;break}return l},iet=function(t){var n=t.barSize,r=t.totalSize,o=t.stackGroups,i=o===void 0?{}:o;if(!i)return{};for(var a={},s=Object.keys(i),l=0,c=s.length;l=0});if(w&&w.length){var x=w[0].type.defaultProps,S=x!==void 0?po(po({},x),w[0].props):w[0].props,E=S.barSize,P=S[y];a[P]||(a[P]=[]);var T=Kt(E)?n:E;a[P].push({item:w[0],stackList:w.slice(1),barSize:Kt(T)?void 0:na(T,r,0)})}}return a},aet=function(t){var n=t.barGap,r=t.barCategoryGap,o=t.bandSize,i=t.sizeList,a=i===void 0?[]:i,s=t.maxBarSize,l=a.length;if(l<1)return null;var c=na(n,o,0,!0),u,d=[];if(a[0].barSize===+a[0].barSize){var f=!1,p=o/l,h=a.reduce(function(E,P){return E+P.barSize||0},0);h+=(l-1)*c,h>=o&&(h-=(l-1)*c,c=0),h>=o&&p>0&&(f=!0,p*=.9,h=l*p);var m=(o-h)/2>>0,y={offset:m-c,size:0};u=a.reduce(function(E,P){var T={item:P.item,position:{offset:y.offset+y.size+c,size:f?p:P.barSize}},I=[].concat(W9(E),[T]);return y=I[I.length-1].position,P.stackList&&P.stackList.length&&P.stackList.forEach(function(A){I.push({item:A,position:y})}),I},d)}else{var w=na(r,o,0,!0);o-2*w-(l-1)*c<=0&&(c=0);var x=(o-2*w-(l-1)*c)/l;x>1&&(x>>=0);var S=s===+s?Math.min(x,s):x;u=a.reduce(function(E,P,T){var I=[].concat(W9(E),[{item:P.item,position:{offset:w+(x+c)*T+(x-S)/2,size:S}}]);return P.stackList&&P.stackList.length&&P.stackList.forEach(function(A){I.push({item:A,position:I[I.length-1].position})}),I},d)}return u},set=function(t,n,r,o){var i=r.children,a=r.width,s=r.margin,l=a-(s.left||0)-(s.right||0),c=Pae({children:i,legendWidth:l});if(c){var u=o||{},d=u.width,f=u.height,p=c.align,h=c.verticalAlign,m=c.layout;if((m==="vertical"||m==="horizontal"&&h==="middle")&&p!=="center"&&ut(t[p]))return po(po({},t),{},Wy({},p,t[p]+(d||0)));if((m==="horizontal"||m==="vertical"&&p==="center")&&h!=="middle"&&ut(t[h]))return po(po({},t),{},Wy({},h,t[h]+(f||0)))}return t},cet=function(t,n,r){return Kt(n)?!0:t==="horizontal"?n==="yAxis":t==="vertical"||r==="x"?n==="xAxis":r==="y"?n==="yAxis":!0},Tae=function(t,n,r,o,i){var a=n.props.children,s=la(a,Jb).filter(function(c){return cet(o,i,c.props.direction)});if(s&&s.length){var l=s.map(function(c){return c.props.dataKey});return t.reduce(function(c,u){var d=jr(u,r);if(Kt(d))return c;var f=Array.isArray(d)?[eM(d),_f(d)]:[d,d],p=l.reduce(function(h,m){var y=jr(u,m,0),w=f[0]-Math.abs(Array.isArray(y)?y[0]:y),x=f[1]+Math.abs(Array.isArray(y)?y[1]:y);return[Math.min(w,h[0]),Math.max(x,h[1])]},[1/0,-1/0]);return[Math.min(p[0],c[0]),Math.max(p[1],c[1])]},[1/0,-1/0])}return null},uet=function(t,n,r,o,i){var a=n.map(function(s){return Tae(t,s,r,i,o)}).filter(function(s){return!Kt(s)});return a&&a.length?a.reduce(function(s,l){return[Math.min(s[0],l[0]),Math.max(s[1],l[1])]},[1/0,-1/0]):null},Iae=function(t,n,r,o,i){var a=n.map(function(l){var c=l.props.dataKey;return r==="number"&&c&&Tae(t,l,c,o)||vx(t,c,r,i)});if(r==="number")return a.reduce(function(l,c){return[Math.min(l[0],c[0]),Math.max(l[1],c[1])]},[1/0,-1/0]);var s={};return a.reduce(function(l,c){for(var u=0,d=c.length;u=2?ta(s[0]-s[1])*2*c:c,n&&(t.ticks||t.niceTicks)){var u=(t.ticks||t.niceTicks).map(function(d){var f=i?i.indexOf(d):d;return{coordinate:o(f)+c,value:d,offset:c}});return u.filter(function(d){return!Ub(d.coordinate)})}return t.isCategorical&&t.categoricalDomain?t.categoricalDomain.map(function(d,f){return{coordinate:o(d)+c,value:d,index:f,offset:c}}):o.ticks&&!r?o.ticks(t.tickCount).map(function(d){return{coordinate:o(d)+c,value:d,offset:c}}):o.domain().map(function(d,f){return{coordinate:o(d)+c,value:i?i[d]:d,index:f,offset:c}})},BD=new WeakMap,fP=function(t,n){if(typeof n!="function")return t;BD.has(t)||BD.set(t,new WeakMap);var r=BD.get(t);if(r.has(n))return r.get(n);var o=function(){t.apply(void 0,arguments),n.apply(void 0,arguments)};return r.set(n,o),o},kae=function(t,n,r){var o=t.scale,i=t.type,a=t.layout,s=t.axisType;if(o==="auto")return a==="radial"&&s==="radiusAxis"?{scale:mS(),realScaleType:"band"}:a==="radial"&&s==="angleAxis"?{scale:BI(),realScaleType:"linear"}:i==="category"&&n&&(n.indexOf("LineChart")>=0||n.indexOf("AreaChart")>=0||n.indexOf("ComposedChart")>=0&&!r)?{scale:yx(),realScaleType:"point"}:i==="category"?{scale:mS(),realScaleType:"band"}:{scale:BI(),realScaleType:"linear"};if(t1(o)){var l="scale".concat(Fk(o));return{scale:(j9[l]||yx)(),realScaleType:j9[l]?l:"point"}}return Jt(o)?{scale:o}:{scale:yx(),realScaleType:"point"}},q9=1e-4,Mae=function(t){var n=t.domain();if(!(!n||n.length<=2)){var r=n.length,o=t.range(),i=Math.min(o[0],o[1])-q9,a=Math.max(o[0],o[1])+q9,s=t(n[0]),l=t(n[r-1]);(sa||la)&&t.domain([n[0],n[r-1]])}},det=function(t,n){if(!t)return null;for(var r=0,o=t.length;ro)&&(i[1]=o),i[0]>o&&(i[0]=o),i[1]=0?(t[s][r][0]=i,t[s][r][1]=i+l,i=t[s][r][1]):(t[s][r][0]=a,t[s][r][1]=a+l,a=t[s][r][1])}},het=function(t){var n=t.length;if(!(n<=0))for(var r=0,o=t[0].length;r=0?(t[a][r][0]=i,t[a][r][1]=i+s,i=t[a][r][1]):(t[a][r][0]=0,t[a][r][1]=0)}},get={sign:pet,expand:$4e,none:Mv,silhouette:D4e,wiggle:_4e,positive:het},met=function(t,n,r){var o=n.map(function(s){return s.props.dataKey}),i=get[r],a=R4e().keys(o).value(function(s,l){return+jr(s,l,0)}).order(GN).offset(i);return a(t)},yet=function(t,n,r,o,i,a){if(!t)return null;var s=a?n.reverse():n,l={},c=s.reduce(function(d,f){var p,h=(p=f.type)!==null&&p!==void 0&&p.defaultProps?po(po({},f.type.defaultProps),f.props):f.props,m=h.stackId,y=h.hide;if(y)return d;var w=h[r],x=d[w]||{hasStack:!1,stackGroups:{}};if(zo(m)){var S=x.stackGroups[m]||{numericAxisId:r,cateAxisId:o,items:[]};S.items.push(f),x.hasStack=!0,x.stackGroups[m]=S}else x.stackGroups[Rp("_stackId_")]={numericAxisId:r,cateAxisId:o,items:[f]};return po(po({},d),{},Wy({},w,x))},l),u={};return Object.keys(c).reduce(function(d,f){var p=c[f];if(p.hasStack){var h={};p.stackGroups=Object.keys(p.stackGroups).reduce(function(m,y){var w=p.stackGroups[y];return po(po({},m),{},Wy({},y,{numericAxisId:r,cateAxisId:o,items:w.items,stackedData:met(t,w.items,i)}))},h)}return po(po({},d),{},Wy({},f,p))},u)},Rae=function(t,n){var r=n.realScaleType,o=n.type,i=n.tickCount,a=n.originalDomain,s=n.allowDecimals,l=r||n.scale;if(l!=="auto"&&l!=="linear")return null;if(i&&o==="number"&&a&&(a[0]==="auto"||a[1]==="auto")){var c=t.domain();if(!c.length)return null;var u=kZe(c,i,s);return t.domain([eM(u),_f(u)]),{niceTicks:u}}if(i&&o==="number"){var d=t.domain(),f=MZe(d,i,s);return{niceTicks:f}}return null};function Bv(e){var t=e.axis,n=e.ticks,r=e.bandSize,o=e.entry,i=e.index,a=e.dataKey;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!Kt(o[t.dataKey])){var s=bI(n,"value",o[t.dataKey]);if(s)return s.coordinate+r/2}return n[i]?n[i].coordinate+r/2:null}var l=jr(o,Kt(a)?t.dataKey:a);return Kt(l)?null:t.scale(l)}var K9=function(t){var n=t.axis,r=t.ticks,o=t.offset,i=t.bandSize,a=t.entry,s=t.index;if(n.type==="category")return r[s]?r[s].coordinate+o:null;var l=jr(a,n.dataKey,n.domain[s]);return Kt(l)?null:n.scale(l)-i/2+o},vet=function(t){var n=t.numericAxis,r=n.scale.domain();if(n.type==="number"){var o=Math.min(r[0],r[1]),i=Math.max(r[0],r[1]);return o<=0&&i>=0?0:i<0?i:o}return r[0]},bet=function(t,n){var r,o=(r=t.type)!==null&&r!==void 0&&r.defaultProps?po(po({},t.type.defaultProps),t.props):t.props,i=o.stackId;if(zo(i)){var a=n[i];if(a){var s=a.items.indexOf(t);return s>=0?a.stackedData[s]:null}}return null},wet=function(t){return t.reduce(function(n,r){return[eM(r.concat([n[0]]).filter(ut)),_f(r.concat([n[1]]).filter(ut))]},[1/0,-1/0])},$ae=function(t,n,r){return Object.keys(t).reduce(function(o,i){var a=t[i],s=a.stackedData,l=s.reduce(function(c,u){var d=wet(u.slice(n,r+1));return[Math.min(c[0],d[0]),Math.max(c[1],d[1])]},[1/0,-1/0]);return[Math.min(l[0],o[0]),Math.max(l[1],o[1])]},[1/0,-1/0]).map(function(o){return o===1/0||o===-1/0?0:o})},Y9=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Q9=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,SL=function(t,n,r){if(Jt(t))return t(n,r);if(!Array.isArray(t))return n;var o=[];if(ut(t[0]))o[0]=r?t[0]:Math.min(t[0],n[0]);else if(Y9.test(t[0])){var i=+Y9.exec(t[0])[1];o[0]=n[0]-i}else Jt(t[0])?o[0]=t[0](n[0]):o[0]=n[0];if(ut(t[1]))o[1]=r?t[1]:Math.max(t[1],n[1]);else if(Q9.test(t[1])){var a=+Q9.exec(t[1])[1];o[1]=n[1]+a}else Jt(t[1])?o[1]=t[1](n[1]):o[1]=n[1];return o},qI=function(t,n,r){if(t&&t.scale&&t.scale.bandwidth){var o=t.scale.bandwidth();if(!r||o>0)return o}if(t&&n&&n.length>=2){for(var i=Xz(n,function(d){return d.coordinate}),a=1/0,s=1,l=i.length;se.length)&&(t=e.length);for(var n=0,r=new Array(t);n2&&arguments[2]!==void 0?arguments[2]:{top:0,right:0,bottom:0,left:0};return Math.min(Math.abs(t-(r.left||0)-(r.right||0)),Math.abs(n-(r.top||0)-(r.bottom||0)))/2},ket=function(t,n,r,o,i){var a=t.width,s=t.height,l=t.startAngle,c=t.endAngle,u=na(t.cx,a,a/2),d=na(t.cy,s,s/2),f=Nae(a,s,r),p=na(t.innerRadius,f,0),h=na(t.outerRadius,f,f*.8),m=Object.keys(n);return m.reduce(function(y,w){var x=n[w],S=x.domain,E=x.reversed,P;if(Kt(x.range))o==="angleAxis"?P=[l,c]:o==="radiusAxis"&&(P=[p,h]),E&&(P=[P[1],P[0]]);else{P=x.range;var T=P,I=Eet(T,2);l=I[0],c=I[1]}var A=kae(x,i),k=A.realScaleType,O=A.scale;O.domain(S).range(P),Mae(O);var $=Rae(O,Yu(Yu({},x),{},{realScaleType:k})),N=Yu(Yu(Yu({},x),$),{},{range:P,radius:h,realScaleType:k,scale:O,cx:u,cy:d,innerRadius:p,outerRadius:h,startAngle:l,endAngle:c});return Yu(Yu({},y),{},_ae({},w,N))},{})},Met=function(t,n){var r=t.x,o=t.y,i=n.x,a=n.y;return Math.sqrt(Math.pow(r-i,2)+Math.pow(o-a,2))},Ret=function(t,n){var r=t.x,o=t.y,i=n.cx,a=n.cy,s=Met({x:r,y:o},{x:i,y:a});if(s<=0)return{radius:s};var l=(r-i)/s,c=Math.acos(l);return o>a&&(c=2*Math.PI-c),{radius:s,angle:Aet(c),angleInRadian:c}},$et=function(t){var n=t.startAngle,r=t.endAngle,o=Math.floor(n/360),i=Math.floor(r/360),a=Math.min(o,i);return{startAngle:n-a*360,endAngle:r-a*360}},Det=function(t,n){var r=n.startAngle,o=n.endAngle,i=Math.floor(r/360),a=Math.floor(o/360),s=Math.min(i,a);return t+s*360},eq=function(t,n){var r=t.x,o=t.y,i=Ret({x:r,y:o},n),a=i.radius,s=i.angle,l=n.innerRadius,c=n.outerRadius;if(ac)return!1;if(a===0)return!0;var u=$et(n),d=u.startAngle,f=u.endAngle,p=s,h;if(d<=f){for(;p>f;)p-=360;for(;p=d&&p<=f}else{for(;p>d;)p-=360;for(;p=f&&p<=d}return h?Yu(Yu({},n),{},{radius:a,angle:Det(p,n)}):null},Lae=function(t){return!v.isValidElement(t)&&!Jt(t)&&typeof t!="boolean"?t.className:""};function TS(e){"@babel/helpers - typeof";return TS=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},TS(e)}var _et=["offset"];function Net(e){return Bet(e)||jet(e)||Fet(e)||Let()}function Let(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Fet(e,t){if(e){if(typeof e=="string")return CL(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return CL(e,t)}}function jet(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Bet(e){if(Array.isArray(e))return CL(e)}function CL(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Vet(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function tq(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Lo(e){for(var t=1;t=0?1:-1,S,E;o==="insideStart"?(S=p+x*a,E=m):o==="insideEnd"?(S=h-x*a,E=!m):o==="end"&&(S=h+x*a,E=m),E=w<=0?E:!E;var P=Mr(c,u,y,S),T=Mr(c,u,y,S+(E?1:-1)*359),I="M".concat(P.x,",").concat(P.y,` A`).concat(y,",").concat(y,",0,1,").concat(E?0:1,`, - `).concat(T.x,",").concat(T.y),A=Kt(t.id)?kp("recharts-radial-line-"):t.id;return Y.createElement("text",SS({},r,{dominantBaseline:"central",className:de("recharts-radial-bar-label",s)}),Y.createElement("defs",null,Y.createElement("path",{id:A,d:I})),Y.createElement("textPath",{xlinkHref:"#".concat(A)},n))},bet=function(t){var n=t.viewBox,r=t.offset,o=t.position,i=n,a=i.cx,s=i.cy,l=i.innerRadius,c=i.outerRadius,u=i.startAngle,d=i.endAngle,f=(u+d)/2;if(o==="outside"){var p=Mr(a,s,c+r,f),h=p.x,m=p.y;return{x:h,y:m,textAnchor:h>=a?"start":"end",verticalAnchor:"middle"}}if(o==="center")return{x:a,y:s,textAnchor:"middle",verticalAnchor:"middle"};if(o==="centerTop")return{x:a,y:s,textAnchor:"middle",verticalAnchor:"start"};if(o==="centerBottom")return{x:a,y:s,textAnchor:"middle",verticalAnchor:"end"};var y=(l+c)/2,w=Mr(a,s,y,f),x=w.x,C=w.y;return{x,y:C,textAnchor:"middle",verticalAnchor:"middle"}},wet=function(t){var n=t.viewBox,r=t.parentViewBox,o=t.offset,i=t.position,a=n,s=a.x,l=a.y,c=a.width,u=a.height,d=u>=0?1:-1,f=d*o,p=d>0?"end":"start",h=d>0?"start":"end",m=c>=0?1:-1,y=m*o,w=m>0?"end":"start",x=m>0?"start":"end";if(i==="top"){var C={x:s+c/2,y:l-d*o,textAnchor:"middle",verticalAnchor:p};return Lo(Lo({},C),r?{height:Math.max(l-r.y,0),width:c}:{})}if(i==="bottom"){var E={x:s+c/2,y:l+u+f,textAnchor:"middle",verticalAnchor:h};return Lo(Lo({},E),r?{height:Math.max(r.y+r.height-(l+u),0),width:c}:{})}if(i==="left"){var P={x:s-y,y:l+u/2,textAnchor:w,verticalAnchor:"middle"};return Lo(Lo({},P),r?{width:Math.max(P.x-r.x,0),height:u}:{})}if(i==="right"){var T={x:s+c+y,y:l+u/2,textAnchor:x,verticalAnchor:"middle"};return Lo(Lo({},T),r?{width:Math.max(r.x+r.width-T.x,0),height:u}:{})}var I=r?{width:c,height:u}:{};return i==="insideLeft"?Lo({x:s+y,y:l+u/2,textAnchor:x,verticalAnchor:"middle"},I):i==="insideRight"?Lo({x:s+c-y,y:l+u/2,textAnchor:w,verticalAnchor:"middle"},I):i==="insideTop"?Lo({x:s+c/2,y:l+f,textAnchor:"middle",verticalAnchor:h},I):i==="insideBottom"?Lo({x:s+c/2,y:l+u-f,textAnchor:"middle",verticalAnchor:p},I):i==="insideTopLeft"?Lo({x:s+y,y:l+f,textAnchor:x,verticalAnchor:h},I):i==="insideTopRight"?Lo({x:s+c-y,y:l+f,textAnchor:w,verticalAnchor:h},I):i==="insideBottomLeft"?Lo({x:s+y,y:l+u-f,textAnchor:x,verticalAnchor:p},I):i==="insideBottomRight"?Lo({x:s+c-y,y:l+u-f,textAnchor:w,verticalAnchor:p},I):Nb(i)&&(ut(i.x)||_h(i.x))&&(ut(i.y)||_h(i.y))?Lo({x:s+na(i.x,c),y:l+na(i.y,u),textAnchor:"end",verticalAnchor:"end"},I):Lo({x:s+c/2,y:l+u/2,textAnchor:"middle",verticalAnchor:"middle"},I)},xet=function(t){return"cx"in t&&ut(t.cx)};function Zo(e){var t=e.offset,n=t===void 0?5:t,r=det(e,oet),o=Lo({offset:n},r),i=o.viewBox,a=o.position,s=o.value,l=o.children,c=o.content,u=o.className,d=u===void 0?"":u,f=o.textBreakAll;if(!i||Kt(s)&&Kt(l)&&!v.isValidElement(c)&&!Jt(c))return null;if(v.isValidElement(c))return v.cloneElement(c,o);var p;if(Jt(c)){if(p=v.createElement(c,o),v.isValidElement(p))return p}else p=met(o);var h=xet(i),m=_t(o,!0);if(h&&(a==="insideStart"||a==="insideEnd"||a==="end"))return vet(o,p,m);var y=h?bet(o):wet(o);return Y.createElement(yg,SS({className:de("recharts-label",d)},m,y,{breakAll:f}),p)}Zo.displayName="Label";var kae=function(t){var n=t.cx,r=t.cy,o=t.angle,i=t.startAngle,a=t.endAngle,s=t.r,l=t.radius,c=t.innerRadius,u=t.outerRadius,d=t.x,f=t.y,p=t.top,h=t.left,m=t.width,y=t.height,w=t.clockWise,x=t.labelViewBox;if(x)return x;if(ut(m)&&ut(y)){if(ut(d)&&ut(f))return{x:d,y:f,width:m,height:y};if(ut(p)&&ut(h))return{x:p,y:h,width:m,height:y}}return ut(d)&&ut(f)?{x:d,y:f,width:0,height:0}:ut(n)&&ut(r)?{cx:n,cy:r,startAngle:i||o||0,endAngle:a||o||0,innerRadius:c||0,outerRadius:u||l||s||0,clockWise:w}:t.viewBox?t.viewBox:{}},Cet=function(t,n){return t?t===!0?Y.createElement(Zo,{key:"label-implicit",viewBox:n}):zo(t)?Y.createElement(Zo,{key:"label-implicit",viewBox:n,value:t}):v.isValidElement(t)?t.type===Zo?v.cloneElement(t,{key:"label-implicit",viewBox:n}):Y.createElement(Zo,{key:"label-implicit",content:t,viewBox:n}):Jt(t)?Y.createElement(Zo,{key:"label-implicit",content:t,viewBox:n}):Nb(t)?Y.createElement(Zo,SS({viewBox:n},t,{key:"label-implicit"})):null:null},Eet=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!t||!t.children&&r&&!t.label)return null;var o=t.children,i=kae(t),a=sa(o,Zo).map(function(l,c){return v.cloneElement(l,{viewBox:n||i,key:"label-".concat(c)})});if(!r)return a;var s=Cet(t.label,n||i);return[s].concat(iet(a))};Zo.parseViewBox=kae;Zo.renderCallByParent=Eet;function Pet(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var Tet=Pet;const Iet=Bn(Tet);function CS(e){"@babel/helpers - typeof";return CS=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},CS(e)}var Oet=["valueAccessor"],Aet=["data","dataKey","clockWise","id","textBreakAll"];function ket(e){return Det(e)||$et(e)||Ret(e)||Met()}function Met(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ret(e,t){if(e){if(typeof e=="string")return bL(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return bL(e,t)}}function $et(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Det(e){if(Array.isArray(e))return bL(e)}function bL(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Fet(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var jet=function(t){return Array.isArray(t.value)?Iet(t.value):t.value};function Sc(e){var t=e.valueAccessor,n=t===void 0?jet:t,r=Z9(e,Oet),o=r.data,i=r.dataKey,a=r.clockWise,s=r.id,l=r.textBreakAll,c=Z9(r,Aet);return!o||!o.length?null:Y.createElement(pn,{className:"recharts-label-list"},o.map(function(u,d){var f=Kt(i)?n(u,d):jr(u&&u.payload,i),p=Kt(s)?{}:{id:"".concat(s,"-").concat(d)};return Y.createElement(Zo,LI({},_t(u,!0),c,p,{parentViewBox:u.parentViewBox,value:f,textBreakAll:l,viewBox:Zo.parseViewBox(Kt(a)?u:J9(J9({},u),{},{clockWise:a})),key:"label-".concat(d),index:d}))}))}Sc.displayName="LabelList";function Bet(e,t){return e?e===!0?Y.createElement(Sc,{key:"labelList-implicit",data:t}):Y.isValidElement(e)||Jt(e)?Y.createElement(Sc,{key:"labelList-implicit",data:t,content:e}):Nb(e)?Y.createElement(Sc,LI({data:t},e,{key:"labelList-implicit"})):null:null}function zet(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!e||!e.children&&n&&!e.label)return null;var r=e.children,o=sa(r,Sc).map(function(a,s){return v.cloneElement(a,{data:t,key:"labelList-".concat(s)})});if(!n)return o;var i=Bet(e.label,t);return[i].concat(ket(o))}Sc.renderCallByParent=zet;function ES(e){"@babel/helpers - typeof";return ES=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ES(e)}function wL(){return wL=Object.assign?Object.assign.bind():function(e){for(var t=1;t=a?"start":"end",verticalAnchor:"middle"}}if(o==="center")return{x:a,y:s,textAnchor:"middle",verticalAnchor:"middle"};if(o==="centerTop")return{x:a,y:s,textAnchor:"middle",verticalAnchor:"start"};if(o==="centerBottom")return{x:a,y:s,textAnchor:"middle",verticalAnchor:"end"};var y=(l+c)/2,w=Mr(a,s,y,f),x=w.x,S=w.y;return{x,y:S,textAnchor:"middle",verticalAnchor:"middle"}},Qet=function(t){var n=t.viewBox,r=t.parentViewBox,o=t.offset,i=t.position,a=n,s=a.x,l=a.y,c=a.width,u=a.height,d=u>=0?1:-1,f=d*o,p=d>0?"end":"start",h=d>0?"start":"end",m=c>=0?1:-1,y=m*o,w=m>0?"end":"start",x=m>0?"start":"end";if(i==="top"){var S={x:s+c/2,y:l-d*o,textAnchor:"middle",verticalAnchor:p};return Lo(Lo({},S),r?{height:Math.max(l-r.y,0),width:c}:{})}if(i==="bottom"){var E={x:s+c/2,y:l+u+f,textAnchor:"middle",verticalAnchor:h};return Lo(Lo({},E),r?{height:Math.max(r.y+r.height-(l+u),0),width:c}:{})}if(i==="left"){var P={x:s-y,y:l+u/2,textAnchor:w,verticalAnchor:"middle"};return Lo(Lo({},P),r?{width:Math.max(P.x-r.x,0),height:u}:{})}if(i==="right"){var T={x:s+c+y,y:l+u/2,textAnchor:x,verticalAnchor:"middle"};return Lo(Lo({},T),r?{width:Math.max(r.x+r.width-T.x,0),height:u}:{})}var I=r?{width:c,height:u}:{};return i==="insideLeft"?Lo({x:s+y,y:l+u/2,textAnchor:x,verticalAnchor:"middle"},I):i==="insideRight"?Lo({x:s+c-y,y:l+u/2,textAnchor:w,verticalAnchor:"middle"},I):i==="insideTop"?Lo({x:s+c/2,y:l+f,textAnchor:"middle",verticalAnchor:h},I):i==="insideBottom"?Lo({x:s+c/2,y:l+u-f,textAnchor:"middle",verticalAnchor:p},I):i==="insideTopLeft"?Lo({x:s+y,y:l+f,textAnchor:x,verticalAnchor:h},I):i==="insideTopRight"?Lo({x:s+c-y,y:l+f,textAnchor:w,verticalAnchor:h},I):i==="insideBottomLeft"?Lo({x:s+y,y:l+u-f,textAnchor:x,verticalAnchor:p},I):i==="insideBottomRight"?Lo({x:s+c-y,y:l+u-f,textAnchor:w,verticalAnchor:p},I):Bb(i)&&(ut(i.x)||Nh(i.x))&&(ut(i.y)||Nh(i.y))?Lo({x:s+na(i.x,c),y:l+na(i.y,u),textAnchor:"end",verticalAnchor:"end"},I):Lo({x:s+c/2,y:l+u/2,textAnchor:"middle",verticalAnchor:"middle"},I)},Xet=function(t){return"cx"in t&&ut(t.cx)};function Zo(e){var t=e.offset,n=t===void 0?5:t,r=zet(e,_et),o=Lo({offset:n},r),i=o.viewBox,a=o.position,s=o.value,l=o.children,c=o.content,u=o.className,d=u===void 0?"":u,f=o.textBreakAll;if(!i||Kt(s)&&Kt(l)&&!v.isValidElement(c)&&!Jt(c))return null;if(v.isValidElement(c))return v.cloneElement(c,o);var p;if(Jt(c)){if(p=v.createElement(c,o),v.isValidElement(p))return p}else p=Get(o);var h=Xet(i),m=_t(o,!0);if(h&&(a==="insideStart"||a==="insideEnd"||a==="end"))return Ket(o,p,m);var y=h?Yet(o):Qet(o);return Y.createElement(bg,IS({className:de("recharts-label",d)},m,y,{breakAll:f}),p)}Zo.displayName="Label";var Fae=function(t){var n=t.cx,r=t.cy,o=t.angle,i=t.startAngle,a=t.endAngle,s=t.r,l=t.radius,c=t.innerRadius,u=t.outerRadius,d=t.x,f=t.y,p=t.top,h=t.left,m=t.width,y=t.height,w=t.clockWise,x=t.labelViewBox;if(x)return x;if(ut(m)&&ut(y)){if(ut(d)&&ut(f))return{x:d,y:f,width:m,height:y};if(ut(p)&&ut(h))return{x:p,y:h,width:m,height:y}}return ut(d)&&ut(f)?{x:d,y:f,width:0,height:0}:ut(n)&&ut(r)?{cx:n,cy:r,startAngle:i||o||0,endAngle:a||o||0,innerRadius:c||0,outerRadius:u||l||s||0,clockWise:w}:t.viewBox?t.viewBox:{}},Jet=function(t,n){return t?t===!0?Y.createElement(Zo,{key:"label-implicit",viewBox:n}):zo(t)?Y.createElement(Zo,{key:"label-implicit",viewBox:n,value:t}):v.isValidElement(t)?t.type===Zo?v.cloneElement(t,{key:"label-implicit",viewBox:n}):Y.createElement(Zo,{key:"label-implicit",content:t,viewBox:n}):Jt(t)?Y.createElement(Zo,{key:"label-implicit",content:t,viewBox:n}):Bb(t)?Y.createElement(Zo,IS({viewBox:n},t,{key:"label-implicit"})):null:null},Zet=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!t||!t.children&&r&&!t.label)return null;var o=t.children,i=Fae(t),a=la(o,Zo).map(function(l,c){return v.cloneElement(l,{viewBox:n||i,key:"label-".concat(c)})});if(!r)return a;var s=Jet(t.label,n||i);return[s].concat(Net(a))};Zo.parseViewBox=Fae;Zo.renderCallByParent=Zet;function ett(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var ttt=ett;const ntt=Bn(ttt);function OS(e){"@babel/helpers - typeof";return OS=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},OS(e)}var rtt=["valueAccessor"],ott=["data","dataKey","clockWise","id","textBreakAll"];function itt(e){return ctt(e)||ltt(e)||stt(e)||att()}function att(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function stt(e,t){if(e){if(typeof e=="string")return EL(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return EL(e,t)}}function ltt(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function ctt(e){if(Array.isArray(e))return EL(e)}function EL(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function ptt(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var htt=function(t){return Array.isArray(t.value)?ntt(t.value):t.value};function Ec(e){var t=e.valueAccessor,n=t===void 0?htt:t,r=oq(e,rtt),o=r.data,i=r.dataKey,a=r.clockWise,s=r.id,l=r.textBreakAll,c=oq(r,ott);return!o||!o.length?null:Y.createElement(pn,{className:"recharts-label-list"},o.map(function(u,d){var f=Kt(i)?n(u,d):jr(u&&u.payload,i),p=Kt(s)?{}:{id:"".concat(s,"-").concat(d)};return Y.createElement(Zo,YI({},_t(u,!0),c,p,{parentViewBox:u.parentViewBox,value:f,textBreakAll:l,viewBox:Zo.parseViewBox(Kt(a)?u:rq(rq({},u),{},{clockWise:a})),key:"label-".concat(d),index:d}))}))}Ec.displayName="LabelList";function gtt(e,t){return e?e===!0?Y.createElement(Ec,{key:"labelList-implicit",data:t}):Y.isValidElement(e)||Jt(e)?Y.createElement(Ec,{key:"labelList-implicit",data:t,content:e}):Bb(e)?Y.createElement(Ec,YI({data:t},e,{key:"labelList-implicit"})):null:null}function mtt(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!e||!e.children&&n&&!e.label)return null;var r=e.children,o=la(r,Ec).map(function(a,s){return v.cloneElement(a,{data:t,key:"labelList-".concat(s)})});if(!n)return o;var i=gtt(e.label,t);return[i].concat(itt(o))}Ec.renderCallByParent=mtt;function AS(e){"@babel/helpers - typeof";return AS=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},AS(e)}function PL(){return PL=Object.assign?Object.assign.bind():function(e){for(var t=1;t180),",").concat(+(a>c),`, `).concat(d.x,",").concat(d.y,` `);if(o>0){var p=Mr(n,r,o,a),h=Mr(n,r,o,c);f+="L ".concat(h.x,",").concat(h.y,` A `).concat(o,",").concat(o,`,0, `).concat(+(Math.abs(l)>180),",").concat(+(a<=c),`, - `).concat(p.x,",").concat(p.y," Z")}else f+="L ".concat(n,",").concat(r," Z");return f},Get=function(t){var n=t.cx,r=t.cy,o=t.innerRadius,i=t.outerRadius,a=t.cornerRadius,s=t.forceCornerRadius,l=t.cornerIsExternal,c=t.startAngle,u=t.endAngle,d=ta(u-c),f=nP({cx:n,cy:r,radius:i,angle:c,sign:d,cornerRadius:a,cornerIsExternal:l}),p=f.circleTangency,h=f.lineTangency,m=f.theta,y=nP({cx:n,cy:r,radius:i,angle:u,sign:-d,cornerRadius:a,cornerIsExternal:l}),w=y.circleTangency,x=y.lineTangency,C=y.theta,E=l?Math.abs(c-u):Math.abs(c-u)-m-C;if(E<0)return s?"M ".concat(h.x,",").concat(h.y,` + `).concat(p.x,",").concat(p.y," Z")}else f+="L ".concat(n,",").concat(r," Z");return f},xtt=function(t){var n=t.cx,r=t.cy,o=t.innerRadius,i=t.outerRadius,a=t.cornerRadius,s=t.forceCornerRadius,l=t.cornerIsExternal,c=t.startAngle,u=t.endAngle,d=ta(u-c),f=pP({cx:n,cy:r,radius:i,angle:c,sign:d,cornerRadius:a,cornerIsExternal:l}),p=f.circleTangency,h=f.lineTangency,m=f.theta,y=pP({cx:n,cy:r,radius:i,angle:u,sign:-d,cornerRadius:a,cornerIsExternal:l}),w=y.circleTangency,x=y.lineTangency,S=y.theta,E=l?Math.abs(c-u):Math.abs(c-u)-m-S;if(E<0)return s?"M ".concat(h.x,",").concat(h.y,` a`).concat(a,",").concat(a,",0,0,1,").concat(a*2,`,0 a`).concat(a,",").concat(a,",0,0,1,").concat(-a*2,`,0 - `):Mae({cx:n,cy:r,innerRadius:o,outerRadius:i,startAngle:c,endAngle:u});var P="M ".concat(h.x,",").concat(h.y,` + `):jae({cx:n,cy:r,innerRadius:o,outerRadius:i,startAngle:c,endAngle:u});var P="M ".concat(h.x,",").concat(h.y,` A`).concat(a,",").concat(a,",0,0,").concat(+(d<0),",").concat(p.x,",").concat(p.y,` A`).concat(i,",").concat(i,",0,").concat(+(E>180),",").concat(+(d<0),",").concat(w.x,",").concat(w.y,` A`).concat(a,",").concat(a,",0,0,").concat(+(d<0),",").concat(x.x,",").concat(x.y,` - `);if(o>0){var T=nP({cx:n,cy:r,radius:o,angle:c,sign:d,isExternal:!0,cornerRadius:a,cornerIsExternal:l}),I=T.circleTangency,A=T.lineTangency,k=T.theta,O=nP({cx:n,cy:r,radius:o,angle:u,sign:-d,isExternal:!0,cornerRadius:a,cornerIsExternal:l}),$=O.circleTangency,N=O.lineTangency,L=O.theta,j=l?Math.abs(c-u):Math.abs(c-u)-k-L;if(j<0&&a===0)return"".concat(P,"L").concat(n,",").concat(r,"Z");P+="L".concat(N.x,",").concat(N.y,` + `);if(o>0){var T=pP({cx:n,cy:r,radius:o,angle:c,sign:d,isExternal:!0,cornerRadius:a,cornerIsExternal:l}),I=T.circleTangency,A=T.lineTangency,k=T.theta,O=pP({cx:n,cy:r,radius:o,angle:u,sign:-d,isExternal:!0,cornerRadius:a,cornerIsExternal:l}),$=O.circleTangency,N=O.lineTangency,L=O.theta,j=l?Math.abs(c-u):Math.abs(c-u)-k-L;if(j<0&&a===0)return"".concat(P,"L").concat(n,",").concat(r,"Z");P+="L".concat(N.x,",").concat(N.y,` A`).concat(a,",").concat(a,",0,0,").concat(+(d<0),",").concat($.x,",").concat($.y,` A`).concat(o,",").concat(o,",0,").concat(+(j>180),",").concat(+(d>0),",").concat(I.x,",").concat(I.y,` - A`).concat(a,",").concat(a,",0,0,").concat(+(d<0),",").concat(A.x,",").concat(A.y,"Z")}else P+="L".concat(n,",").concat(r,"Z");return P},qet={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},Rae=function(t){var n=tq(tq({},qet),t),r=n.cx,o=n.cy,i=n.innerRadius,a=n.outerRadius,s=n.cornerRadius,l=n.forceCornerRadius,c=n.cornerIsExternal,u=n.startAngle,d=n.endAngle,f=n.className;if(a0&&Math.abs(u-d)<360?y=Get({cx:r,cy:o,innerRadius:i,outerRadius:a,cornerRadius:Math.min(m,h/2),forceCornerRadius:l,cornerIsExternal:c,startAngle:u,endAngle:d}):y=Mae({cx:r,cy:o,innerRadius:i,outerRadius:a,startAngle:u,endAngle:d}),Y.createElement("path",wL({},_t(n,!0),{className:p,d:y,role:"img"}))};function PS(e){"@babel/helpers - typeof";return PS=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},PS(e)}function xL(){return xL=Object.assign?Object.assign.bind():function(e){for(var t=1;t0;)if(!n.equals(e[r],t[r],r,r,e,t,n))return!1;return!0}function rtt(e,t){return Yb(e.getTime(),t.getTime())}function cq(e,t,n){if(e.size!==t.size)return!1;for(var r={},o=e.entries(),i=0,a,s;(a=o.next())&&!a.done;){for(var l=t.entries(),c=!1,u=0;(s=l.next())&&!s.done;){var d=a.value,f=d[0],p=d[1],h=s.value,m=h[0],y=h[1];!c&&!r[u]&&(c=n.equals(f,m,i,u,e,t,n)&&n.equals(p,y,f,m,e,t,n))&&(r[u]=!0),u++}if(!c)return!1;i++}return!0}function ott(e,t,n){var r=lq(e),o=r.length;if(lq(t).length!==o)return!1;for(var i;o-- >0;)if(i=r[o],i===Dae&&(e.$$typeof||t.$$typeof)&&e.$$typeof!==t.$$typeof||!$ae(t,i)||!n.equals(e[i],t[i],i,i,e,t,n))return!1;return!0}function uw(e,t,n){var r=aq(e),o=r.length;if(aq(t).length!==o)return!1;for(var i,a,s;o-- >0;)if(i=r[o],i===Dae&&(e.$$typeof||t.$$typeof)&&e.$$typeof!==t.$$typeof||!$ae(t,i)||!n.equals(e[i],t[i],i,i,e,t,n)||(a=sq(e,i),s=sq(t,i),(a||s)&&(!a||!s||a.configurable!==s.configurable||a.enumerable!==s.enumerable||a.writable!==s.writable)))return!1;return!0}function itt(e,t){return Yb(e.valueOf(),t.valueOf())}function att(e,t){return e.source===t.source&&e.flags===t.flags}function uq(e,t,n){if(e.size!==t.size)return!1;for(var r={},o=e.values(),i,a;(i=o.next())&&!i.done;){for(var s=t.values(),l=!1,c=0;(a=s.next())&&!a.done;)!l&&!r[c]&&(l=n.equals(i.value,a.value,i.value,a.value,e,t,n))&&(r[c]=!0),c++;if(!l)return!1}return!0}function stt(e,t){var n=e.length;if(t.length!==n)return!1;for(;n-- >0;)if(e[n]!==t[n])return!1;return!0}var ltt="[object Arguments]",ctt="[object Boolean]",utt="[object Date]",dtt="[object Map]",ftt="[object Number]",ptt="[object Object]",htt="[object RegExp]",gtt="[object Set]",mtt="[object String]",ytt=Array.isArray,dq=typeof ArrayBuffer=="function"&&ArrayBuffer.isView?ArrayBuffer.isView:null,fq=Object.assign,vtt=Object.prototype.toString.call.bind(Object.prototype.toString);function btt(e){var t=e.areArraysEqual,n=e.areDatesEqual,r=e.areMapsEqual,o=e.areObjectsEqual,i=e.arePrimitiveWrappersEqual,a=e.areRegExpsEqual,s=e.areSetsEqual,l=e.areTypedArraysEqual;return function(u,d,f){if(u===d)return!0;if(u==null||d==null||typeof u!="object"||typeof d!="object")return u!==u&&d!==d;var p=u.constructor;if(p!==d.constructor)return!1;if(p===Object)return o(u,d,f);if(ytt(u))return t(u,d,f);if(dq!=null&&dq(u))return l(u,d,f);if(p===Date)return n(u,d,f);if(p===RegExp)return a(u,d,f);if(p===Map)return r(u,d,f);if(p===Set)return s(u,d,f);var h=vtt(u);return h===utt?n(u,d,f):h===htt?a(u,d,f):h===dtt?r(u,d,f):h===gtt?s(u,d,f):h===ptt?typeof u.then!="function"&&typeof d.then!="function"&&o(u,d,f):h===ltt?o(u,d,f):h===ctt||h===ftt||h===mtt?i(u,d,f):!1}}function wtt(e){var t=e.circular,n=e.createCustomConfig,r=e.strict,o={areArraysEqual:r?uw:ntt,areDatesEqual:rtt,areMapsEqual:r?iq(cq,uw):cq,areObjectsEqual:r?uw:ott,arePrimitiveWrappersEqual:itt,areRegExpsEqual:att,areSetsEqual:r?iq(uq,uw):uq,areTypedArraysEqual:r?uw:stt};if(n&&(o=fq({},o,n(o))),t){var i=oP(o.areArraysEqual),a=oP(o.areMapsEqual),s=oP(o.areObjectsEqual),l=oP(o.areSetsEqual);o=fq({},o,{areArraysEqual:i,areMapsEqual:a,areObjectsEqual:s,areSetsEqual:l})}return o}function xtt(e){return function(t,n,r,o,i,a,s){return e(t,n,s)}}function Stt(e){var t=e.circular,n=e.comparator,r=e.createState,o=e.equals,i=e.strict;if(r)return function(l,c){var u=r(),d=u.cache,f=d===void 0?t?new WeakMap:void 0:d,p=u.meta;return n(l,c,{cache:f,equals:o,meta:p,strict:i})};if(t)return function(l,c){return n(l,c,{cache:new WeakMap,equals:o,meta:void 0,strict:i})};var a={cache:void 0,equals:o,meta:void 0,strict:i};return function(l,c){return n(l,c,a)}}var Ctt=Dp();Dp({strict:!0});Dp({circular:!0});Dp({circular:!0,strict:!0});Dp({createInternalComparator:function(){return Yb}});Dp({strict:!0,createInternalComparator:function(){return Yb}});Dp({circular:!0,createInternalComparator:function(){return Yb}});Dp({circular:!0,createInternalComparator:function(){return Yb},strict:!0});function Dp(e){e===void 0&&(e={});var t=e.circular,n=t===void 0?!1:t,r=e.createInternalComparator,o=e.createState,i=e.strict,a=i===void 0?!1:i,s=wtt(e),l=btt(s),c=r?r(l):xtt(l);return Stt({circular:n,comparator:l,createState:o,equals:c,strict:a})}function Ett(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function pq(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=-1,r=function o(i){n<0&&(n=i),i-n>t?(e(i),n=-1):Ett(o)};requestAnimationFrame(r)}function SL(e){"@babel/helpers - typeof";return SL=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},SL(e)}function Ptt(e){return Att(e)||Ott(e)||Itt(e)||Ttt()}function Ttt(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Itt(e,t){if(e){if(typeof e=="string")return hq(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return hq(e,t)}}function hq(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n1?1:w<0?0:w},m=function(w){for(var x=w>1?1:w,C=x,E=0;E<8;++E){var P=d(C)-x,T=p(C);if(Math.abs(P-x)0&&arguments[0]!==void 0?arguments[0]:{},n=t.stiff,r=n===void 0?100:n,o=t.damping,i=o===void 0?8:o,a=t.dt,s=a===void 0?17:a,l=function(u,d,f){var p=-(u-d)*r,h=f*i,m=f+(p-h)*s/1e3,y=f*s/1e3+u;return Math.abs(y-d)e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function ant(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i=0)&&(n[o]=e[o]);return n}function _D(e){return unt(e)||cnt(e)||lnt(e)||snt()}function snt(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function lnt(e,t){if(e){if(typeof e=="string")return IL(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return IL(e,t)}}function cnt(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function unt(e){if(Array.isArray(e))return IL(e)}function IL(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function BI(e){return BI=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},BI(e)}var Dl=function(e){gnt(n,e);var t=mnt(n);function n(r,o){var i;dnt(this,n),i=t.call(this,r,o);var a=i.props,s=a.isActive,l=a.attributeName,c=a.from,u=a.to,d=a.steps,f=a.children,p=a.duration;if(i.handleStyleChange=i.handleStyleChange.bind(kL(i)),i.changeStyle=i.changeStyle.bind(kL(i)),!s||p<=0)return i.state={style:{}},typeof f=="function"&&(i.state={style:u}),AL(i);if(d&&d.length)i.state={style:d[0].style};else if(c){if(typeof f=="function")return i.state={style:c},AL(i);i.state={style:l?jw({},l,c):c}}else i.state={style:{}};return i}return pnt(n,[{key:"componentDidMount",value:function(){var o=this.props,i=o.isActive,a=o.canBegin;this.mounted=!0,!(!i||!a)&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(o){var i=this.props,a=i.isActive,s=i.canBegin,l=i.attributeName,c=i.shouldReAnimate,u=i.to,d=i.from,f=this.state.style;if(s){if(!a){var p={style:l?jw({},l,u):u};this.state&&f&&(l&&f[l]!==u||!l&&f!==u)&&this.setState(p);return}if(!(Ctt(o.to,u)&&o.canBegin&&o.isActive)){var h=!o.canBegin||!o.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var m=h||c?d:o.to;if(this.state&&f){var y={style:l?jw({},l,m):m};(l&&f[l]!==m||!l&&f!==m)&&this.setState(y)}this.runAnimation(Xl(Xl({},this.props),{},{from:m,begin:0}))}}}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var o=this.props.onAnimationEnd;this.unSubscribe&&this.unSubscribe(),this.manager&&(this.manager.stop(),this.manager=null),this.stopJSAnimation&&this.stopJSAnimation(),o&&o()}},{key:"handleStyleChange",value:function(o){this.changeStyle(o)}},{key:"changeStyle",value:function(o){this.mounted&&this.setState({style:o})}},{key:"runJSAnimation",value:function(o){var i=this,a=o.from,s=o.to,l=o.duration,c=o.easing,u=o.begin,d=o.onAnimationEnd,f=o.onAnimationStart,p=rnt(a,s,Gtt(c),l,this.changeStyle),h=function(){i.stopJSAnimation=p()};this.manager.start([f,u,h,l,d])}},{key:"runStepAnimation",value:function(o){var i=this,a=o.steps,s=o.begin,l=o.onAnimationStart,c=a[0],u=c.style,d=c.duration,f=d===void 0?0:d,p=function(m,y,w){if(w===0)return m;var x=y.duration,C=y.easing,E=C===void 0?"ease":C,P=y.style,T=y.properties,I=y.onAnimationEnd,A=w>0?a[w-1]:y,k=T||Object.keys(P);if(typeof E=="function"||E==="spring")return[].concat(_D(m),[i.runJSAnimation.bind(i,{from:A.style,to:P,duration:x,easing:E}),x]);var O=yq(k,x,E),$=Xl(Xl(Xl({},A.style),P),{},{transition:O});return[].concat(_D(m),[$,x,I]).filter(Dtt)};return this.manager.start([l].concat(_D(a.reduce(p,[u,Math.max(f,s)])),[o.onAnimationEnd]))}},{key:"runAnimation",value:function(o){this.manager||(this.manager=ktt());var i=o.begin,a=o.duration,s=o.attributeName,l=o.to,c=o.easing,u=o.onAnimationStart,d=o.onAnimationEnd,f=o.steps,p=o.children,h=this.manager;if(this.unSubscribe=h.subscribe(this.handleStyleChange),typeof c=="function"||typeof p=="function"||c==="spring"){this.runJSAnimation(o);return}if(f.length>1){this.runStepAnimation(o);return}var m=s?jw({},s,l):l,y=yq(Object.keys(m),a,c);h.start([u,i,Xl(Xl({},m),{},{transition:y}),a,d])}},{key:"render",value:function(){var o=this.props,i=o.children;o.begin;var a=o.duration;o.attributeName,o.easing;var s=o.isActive;o.steps,o.from,o.to,o.canBegin,o.onAnimationEnd,o.shouldReAnimate,o.onAnimationReStart;var l=int(o,ont),c=v.Children.count(i),u=this.state.style;if(typeof i=="function")return i(u);if(!s||c===0||a<=0)return i;var d=function(p){var h=p.props,m=h.style,y=m===void 0?{}:m,w=h.className,x=v.cloneElement(p,Xl(Xl({},l),{},{style:Xl(Xl({},y),u),className:w}));return x};return c===1?d(v.Children.only(i)):Y.createElement("div",null,v.Children.map(i,function(f){return d(f)}))}}]),n}(v.PureComponent);Dl.displayName="Animate";Dl.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};Dl.propTypes={from:B.oneOfType([B.object,B.string]),to:B.oneOfType([B.object,B.string]),attributeName:B.string,duration:B.number,begin:B.number,easing:B.oneOfType([B.string,B.func]),steps:B.arrayOf(B.shape({duration:B.number.isRequired,style:B.object.isRequired,easing:B.oneOfType([B.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),B.func]),properties:B.arrayOf("string"),onAnimationEnd:B.func})),children:B.oneOfType([B.node,B.func]),isActive:B.bool,canBegin:B.bool,onAnimationEnd:B.func,shouldReAnimate:B.bool,onAnimationStart:B.func,onAnimationReStart:B.func};B.object,B.object,B.object,B.element;B.object,B.object,B.object,B.oneOfType([B.array,B.element]),B.any;function OS(e){"@babel/helpers - typeof";return OS=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},OS(e)}function zI(){return zI=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0?1:-1,l=r>=0?1:-1,c=o>=0&&r>=0||o<0&&r<0?1:0,u;if(a>0&&i instanceof Array){for(var d=[0,0,0,0],f=0,p=4;fa?a:i[f];u="M".concat(t,",").concat(n+s*d[0]),d[0]>0&&(u+="A ".concat(d[0],",").concat(d[0],",0,0,").concat(c,",").concat(t+l*d[0],",").concat(n)),u+="L ".concat(t+r-l*d[1],",").concat(n),d[1]>0&&(u+="A ".concat(d[1],",").concat(d[1],",0,0,").concat(c,`, + A`).concat(a,",").concat(a,",0,0,").concat(+(d<0),",").concat(A.x,",").concat(A.y,"Z")}else P+="L".concat(n,",").concat(r,"Z");return P},Stt={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},Bae=function(t){var n=aq(aq({},Stt),t),r=n.cx,o=n.cy,i=n.innerRadius,a=n.outerRadius,s=n.cornerRadius,l=n.forceCornerRadius,c=n.cornerIsExternal,u=n.startAngle,d=n.endAngle,f=n.className;if(a0&&Math.abs(u-d)<360?y=xtt({cx:r,cy:o,innerRadius:i,outerRadius:a,cornerRadius:Math.min(m,h/2),forceCornerRadius:l,cornerIsExternal:c,startAngle:u,endAngle:d}):y=jae({cx:r,cy:o,innerRadius:i,outerRadius:a,startAngle:u,endAngle:d}),Y.createElement("path",PL({},_t(n,!0),{className:p,d:y,role:"img"}))};function kS(e){"@babel/helpers - typeof";return kS=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},kS(e)}function TL(){return TL=Object.assign?Object.assign.bind():function(e){for(var t=1;t0;)if(!n.equals(e[r],t[r],r,r,e,t,n))return!1;return!0}function Rtt(e,t){return Zb(e.getTime(),t.getTime())}function hq(e,t,n){if(e.size!==t.size)return!1;for(var r={},o=e.entries(),i=0,a,s;(a=o.next())&&!a.done;){for(var l=t.entries(),c=!1,u=0;(s=l.next())&&!s.done;){var d=a.value,f=d[0],p=d[1],h=s.value,m=h[0],y=h[1];!c&&!r[u]&&(c=n.equals(f,m,i,u,e,t,n)&&n.equals(p,y,f,m,e,t,n))&&(r[u]=!0),u++}if(!c)return!1;i++}return!0}function $tt(e,t,n){var r=pq(e),o=r.length;if(pq(t).length!==o)return!1;for(var i;o-- >0;)if(i=r[o],i===Vae&&(e.$$typeof||t.$$typeof)&&e.$$typeof!==t.$$typeof||!zae(t,i)||!n.equals(e[i],t[i],i,i,e,t,n))return!1;return!0}function gw(e,t,n){var r=dq(e),o=r.length;if(dq(t).length!==o)return!1;for(var i,a,s;o-- >0;)if(i=r[o],i===Vae&&(e.$$typeof||t.$$typeof)&&e.$$typeof!==t.$$typeof||!zae(t,i)||!n.equals(e[i],t[i],i,i,e,t,n)||(a=fq(e,i),s=fq(t,i),(a||s)&&(!a||!s||a.configurable!==s.configurable||a.enumerable!==s.enumerable||a.writable!==s.writable)))return!1;return!0}function Dtt(e,t){return Zb(e.valueOf(),t.valueOf())}function _tt(e,t){return e.source===t.source&&e.flags===t.flags}function gq(e,t,n){if(e.size!==t.size)return!1;for(var r={},o=e.values(),i,a;(i=o.next())&&!i.done;){for(var s=t.values(),l=!1,c=0;(a=s.next())&&!a.done;)!l&&!r[c]&&(l=n.equals(i.value,a.value,i.value,a.value,e,t,n))&&(r[c]=!0),c++;if(!l)return!1}return!0}function Ntt(e,t){var n=e.length;if(t.length!==n)return!1;for(;n-- >0;)if(e[n]!==t[n])return!1;return!0}var Ltt="[object Arguments]",Ftt="[object Boolean]",jtt="[object Date]",Btt="[object Map]",ztt="[object Number]",Vtt="[object Object]",Htt="[object RegExp]",Utt="[object Set]",Wtt="[object String]",Gtt=Array.isArray,mq=typeof ArrayBuffer=="function"&&ArrayBuffer.isView?ArrayBuffer.isView:null,yq=Object.assign,qtt=Object.prototype.toString.call.bind(Object.prototype.toString);function Ktt(e){var t=e.areArraysEqual,n=e.areDatesEqual,r=e.areMapsEqual,o=e.areObjectsEqual,i=e.arePrimitiveWrappersEqual,a=e.areRegExpsEqual,s=e.areSetsEqual,l=e.areTypedArraysEqual;return function(u,d,f){if(u===d)return!0;if(u==null||d==null||typeof u!="object"||typeof d!="object")return u!==u&&d!==d;var p=u.constructor;if(p!==d.constructor)return!1;if(p===Object)return o(u,d,f);if(Gtt(u))return t(u,d,f);if(mq!=null&&mq(u))return l(u,d,f);if(p===Date)return n(u,d,f);if(p===RegExp)return a(u,d,f);if(p===Map)return r(u,d,f);if(p===Set)return s(u,d,f);var h=qtt(u);return h===jtt?n(u,d,f):h===Htt?a(u,d,f):h===Btt?r(u,d,f):h===Utt?s(u,d,f):h===Vtt?typeof u.then!="function"&&typeof d.then!="function"&&o(u,d,f):h===Ltt?o(u,d,f):h===Ftt||h===ztt||h===Wtt?i(u,d,f):!1}}function Ytt(e){var t=e.circular,n=e.createCustomConfig,r=e.strict,o={areArraysEqual:r?gw:Mtt,areDatesEqual:Rtt,areMapsEqual:r?uq(hq,gw):hq,areObjectsEqual:r?gw:$tt,arePrimitiveWrappersEqual:Dtt,areRegExpsEqual:_tt,areSetsEqual:r?uq(gq,gw):gq,areTypedArraysEqual:r?gw:Ntt};if(n&&(o=yq({},o,n(o))),t){var i=gP(o.areArraysEqual),a=gP(o.areMapsEqual),s=gP(o.areObjectsEqual),l=gP(o.areSetsEqual);o=yq({},o,{areArraysEqual:i,areMapsEqual:a,areObjectsEqual:s,areSetsEqual:l})}return o}function Qtt(e){return function(t,n,r,o,i,a,s){return e(t,n,s)}}function Xtt(e){var t=e.circular,n=e.comparator,r=e.createState,o=e.equals,i=e.strict;if(r)return function(l,c){var u=r(),d=u.cache,f=d===void 0?t?new WeakMap:void 0:d,p=u.meta;return n(l,c,{cache:f,equals:o,meta:p,strict:i})};if(t)return function(l,c){return n(l,c,{cache:new WeakMap,equals:o,meta:void 0,strict:i})};var a={cache:void 0,equals:o,meta:void 0,strict:i};return function(l,c){return n(l,c,a)}}var Jtt=Np();Np({strict:!0});Np({circular:!0});Np({circular:!0,strict:!0});Np({createInternalComparator:function(){return Zb}});Np({strict:!0,createInternalComparator:function(){return Zb}});Np({circular:!0,createInternalComparator:function(){return Zb}});Np({circular:!0,createInternalComparator:function(){return Zb},strict:!0});function Np(e){e===void 0&&(e={});var t=e.circular,n=t===void 0?!1:t,r=e.createInternalComparator,o=e.createState,i=e.strict,a=i===void 0?!1:i,s=Ytt(e),l=Ktt(s),c=r?r(l):Qtt(l);return Xtt({circular:n,comparator:l,createState:o,equals:c,strict:a})}function Ztt(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function vq(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=-1,r=function o(i){n<0&&(n=i),i-n>t?(e(i),n=-1):Ztt(o)};requestAnimationFrame(r)}function IL(e){"@babel/helpers - typeof";return IL=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},IL(e)}function ent(e){return ont(e)||rnt(e)||nnt(e)||tnt()}function tnt(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function nnt(e,t){if(e){if(typeof e=="string")return bq(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return bq(e,t)}}function bq(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n1?1:w<0?0:w},m=function(w){for(var x=w>1?1:w,S=x,E=0;E<8;++E){var P=d(S)-x,T=p(S);if(Math.abs(P-x)0&&arguments[0]!==void 0?arguments[0]:{},n=t.stiff,r=n===void 0?100:n,o=t.damping,i=o===void 0?8:o,a=t.dt,s=a===void 0?17:a,l=function(u,d,f){var p=-(u-d)*r,h=f*i,m=f+(p-h)*s/1e3,y=f*s/1e3+u;return Math.abs(y-d)e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function _nt(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i=0)&&(n[o]=e[o]);return n}function zD(e){return jnt(e)||Fnt(e)||Lnt(e)||Nnt()}function Nnt(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Lnt(e,t){if(e){if(typeof e=="string")return RL(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return RL(e,t)}}function Fnt(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function jnt(e){if(Array.isArray(e))return RL(e)}function RL(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function JI(e){return JI=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},JI(e)}var Nl=function(e){Unt(n,e);var t=Wnt(n);function n(r,o){var i;Bnt(this,n),i=t.call(this,r,o);var a=i.props,s=a.isActive,l=a.attributeName,c=a.from,u=a.to,d=a.steps,f=a.children,p=a.duration;if(i.handleStyleChange=i.handleStyleChange.bind(_L(i)),i.changeStyle=i.changeStyle.bind(_L(i)),!s||p<=0)return i.state={style:{}},typeof f=="function"&&(i.state={style:u}),DL(i);if(d&&d.length)i.state={style:d[0].style};else if(c){if(typeof f=="function")return i.state={style:c},DL(i);i.state={style:l?Uw({},l,c):c}}else i.state={style:{}};return i}return Vnt(n,[{key:"componentDidMount",value:function(){var o=this.props,i=o.isActive,a=o.canBegin;this.mounted=!0,!(!i||!a)&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(o){var i=this.props,a=i.isActive,s=i.canBegin,l=i.attributeName,c=i.shouldReAnimate,u=i.to,d=i.from,f=this.state.style;if(s){if(!a){var p={style:l?Uw({},l,u):u};this.state&&f&&(l&&f[l]!==u||!l&&f!==u)&&this.setState(p);return}if(!(Jtt(o.to,u)&&o.canBegin&&o.isActive)){var h=!o.canBegin||!o.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var m=h||c?d:o.to;if(this.state&&f){var y={style:l?Uw({},l,m):m};(l&&f[l]!==m||!l&&f!==m)&&this.setState(y)}this.runAnimation(Zl(Zl({},this.props),{},{from:m,begin:0}))}}}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var o=this.props.onAnimationEnd;this.unSubscribe&&this.unSubscribe(),this.manager&&(this.manager.stop(),this.manager=null),this.stopJSAnimation&&this.stopJSAnimation(),o&&o()}},{key:"handleStyleChange",value:function(o){this.changeStyle(o)}},{key:"changeStyle",value:function(o){this.mounted&&this.setState({style:o})}},{key:"runJSAnimation",value:function(o){var i=this,a=o.from,s=o.to,l=o.duration,c=o.easing,u=o.begin,d=o.onAnimationEnd,f=o.onAnimationStart,p=Rnt(a,s,xnt(c),l,this.changeStyle),h=function(){i.stopJSAnimation=p()};this.manager.start([f,u,h,l,d])}},{key:"runStepAnimation",value:function(o){var i=this,a=o.steps,s=o.begin,l=o.onAnimationStart,c=a[0],u=c.style,d=c.duration,f=d===void 0?0:d,p=function(m,y,w){if(w===0)return m;var x=y.duration,S=y.easing,E=S===void 0?"ease":S,P=y.style,T=y.properties,I=y.onAnimationEnd,A=w>0?a[w-1]:y,k=T||Object.keys(P);if(typeof E=="function"||E==="spring")return[].concat(zD(m),[i.runJSAnimation.bind(i,{from:A.style,to:P,duration:x,easing:E}),x]);var O=Sq(k,x,E),$=Zl(Zl(Zl({},A.style),P),{},{transition:O});return[].concat(zD(m),[$,x,I]).filter(cnt)};return this.manager.start([l].concat(zD(a.reduce(p,[u,Math.max(f,s)])),[o.onAnimationEnd]))}},{key:"runAnimation",value:function(o){this.manager||(this.manager=int());var i=o.begin,a=o.duration,s=o.attributeName,l=o.to,c=o.easing,u=o.onAnimationStart,d=o.onAnimationEnd,f=o.steps,p=o.children,h=this.manager;if(this.unSubscribe=h.subscribe(this.handleStyleChange),typeof c=="function"||typeof p=="function"||c==="spring"){this.runJSAnimation(o);return}if(f.length>1){this.runStepAnimation(o);return}var m=s?Uw({},s,l):l,y=Sq(Object.keys(m),a,c);h.start([u,i,Zl(Zl({},m),{},{transition:y}),a,d])}},{key:"render",value:function(){var o=this.props,i=o.children;o.begin;var a=o.duration;o.attributeName,o.easing;var s=o.isActive;o.steps,o.from,o.to,o.canBegin,o.onAnimationEnd,o.shouldReAnimate,o.onAnimationReStart;var l=Dnt(o,$nt),c=v.Children.count(i),u=this.state.style;if(typeof i=="function")return i(u);if(!s||c===0||a<=0)return i;var d=function(p){var h=p.props,m=h.style,y=m===void 0?{}:m,w=h.className,x=v.cloneElement(p,Zl(Zl({},l),{},{style:Zl(Zl({},y),u),className:w}));return x};return c===1?d(v.Children.only(i)):Y.createElement("div",null,v.Children.map(i,function(f){return d(f)}))}}]),n}(v.PureComponent);Nl.displayName="Animate";Nl.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};Nl.propTypes={from:B.oneOfType([B.object,B.string]),to:B.oneOfType([B.object,B.string]),attributeName:B.string,duration:B.number,begin:B.number,easing:B.oneOfType([B.string,B.func]),steps:B.arrayOf(B.shape({duration:B.number.isRequired,style:B.object.isRequired,easing:B.oneOfType([B.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),B.func]),properties:B.arrayOf("string"),onAnimationEnd:B.func})),children:B.oneOfType([B.node,B.func]),isActive:B.bool,canBegin:B.bool,onAnimationEnd:B.func,shouldReAnimate:B.bool,onAnimationStart:B.func,onAnimationReStart:B.func};B.object,B.object,B.object,B.element;B.object,B.object,B.object,B.oneOfType([B.array,B.element]),B.any;function $S(e){"@babel/helpers - typeof";return $S=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},$S(e)}function ZI(){return ZI=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0?1:-1,l=r>=0?1:-1,c=o>=0&&r>=0||o<0&&r<0?1:0,u;if(a>0&&i instanceof Array){for(var d=[0,0,0,0],f=0,p=4;fa?a:i[f];u="M".concat(t,",").concat(n+s*d[0]),d[0]>0&&(u+="A ".concat(d[0],",").concat(d[0],",0,0,").concat(c,",").concat(t+l*d[0],",").concat(n)),u+="L ".concat(t+r-l*d[1],",").concat(n),d[1]>0&&(u+="A ".concat(d[1],",").concat(d[1],",0,0,").concat(c,`, `).concat(t+r,",").concat(n+s*d[1])),u+="L ".concat(t+r,",").concat(n+o-s*d[2]),d[2]>0&&(u+="A ".concat(d[2],",").concat(d[2],",0,0,").concat(c,`, `).concat(t+r-l*d[2],",").concat(n+o)),u+="L ".concat(t+l*d[3],",").concat(n+o),d[3]>0&&(u+="A ".concat(d[3],",").concat(d[3],",0,0,").concat(c,`, `).concat(t,",").concat(n+o-s*d[3])),u+="Z"}else if(a>0&&i===+i&&i>0){var h=Math.min(a,i);u="M ".concat(t,",").concat(n+s*h,` @@ -342,24 +342,24 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho L `).concat(t+r,",").concat(n+o-s*h,` A `).concat(h,",").concat(h,",0,0,").concat(c,",").concat(t+r-l*h,",").concat(n+o,` L `).concat(t+l*h,",").concat(n+o,` - A `).concat(h,",").concat(h,",0,0,").concat(c,",").concat(t,",").concat(n+o-s*h," Z")}else u="M ".concat(t,",").concat(n," h ").concat(r," v ").concat(o," h ").concat(-r," Z");return u},Tnt=function(t,n){if(!t||!n)return!1;var r=t.x,o=t.y,i=n.x,a=n.y,s=n.width,l=n.height;if(Math.abs(s)>0&&Math.abs(l)>0){var c=Math.min(i,i+s),u=Math.max(i,i+s),d=Math.min(a,a+l),f=Math.max(a,a+l);return r>=c&&r<=u&&o>=d&&o<=f}return!1},Int={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},wV=function(t){var n=Pq(Pq({},Int),t),r=v.useRef(),o=v.useState(-1),i=vnt(o,2),a=i[0],s=i[1];v.useEffect(function(){if(r.current&&r.current.getTotalLength)try{var E=r.current.getTotalLength();E&&s(E)}catch{}},[]);var l=n.x,c=n.y,u=n.width,d=n.height,f=n.radius,p=n.className,h=n.animationEasing,m=n.animationDuration,y=n.animationBegin,w=n.isAnimationActive,x=n.isUpdateAnimationActive;if(l!==+l||c!==+c||u!==+u||d!==+d||u===0||d===0)return null;var C=de("recharts-rectangle",p);return x?Y.createElement(Dl,{canBegin:a>0,from:{width:u,height:d,x:l,y:c},to:{width:u,height:d,x:l,y:c},duration:m,animationEasing:h,isActive:x},function(E){var P=E.width,T=E.height,I=E.x,A=E.y;return Y.createElement(Dl,{canBegin:a>0,from:"0px ".concat(a===-1?1:a,"px"),to:"".concat(a,"px 0px"),attributeName:"strokeDasharray",begin:y,duration:m,isActive:w,easing:h},Y.createElement("path",zI({},_t(n,!0),{className:C,d:Tq(I,A,P,T,f),ref:r})))}):Y.createElement("path",zI({},_t(n,!0),{className:C,d:Tq(l,c,u,d,f)}))},Ont=["points","className","baseLinePoints","connectNulls"];function by(){return by=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function knt(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Iq(e){return Dnt(e)||$nt(e)||Rnt(e)||Mnt()}function Mnt(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Rnt(e,t){if(e){if(typeof e=="string")return ML(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ML(e,t)}}function $nt(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Dnt(e){if(Array.isArray(e))return ML(e)}function ML(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&arguments[0]!==void 0?arguments[0]:[],n=[[]];return t.forEach(function(r){Oq(r)?n[n.length-1].push(r):n[n.length-1].length>0&&n.push([])}),Oq(t[0])&&n[n.length-1].push(t[0]),n[n.length-1].length<=0&&(n=n.slice(0,-1)),n},gx=function(t,n){var r=_nt(t);n&&(r=[r.reduce(function(i,a){return[].concat(Iq(i),Iq(a))},[])]);var o=r.map(function(i){return i.reduce(function(a,s,l){return"".concat(a).concat(l===0?"M":"L").concat(s.x,",").concat(s.y)},"")}).join("");return r.length===1?"".concat(o,"Z"):o},Nnt=function(t,n,r){var o=gx(t,r);return"".concat(o.slice(-1)==="Z"?o.slice(0,-1):o,"L").concat(gx(n.reverse(),r).slice(1))},Lnt=function(t){var n=t.points,r=t.className,o=t.baseLinePoints,i=t.connectNulls,a=Ant(t,Ont);if(!n||!n.length)return null;var s=de("recharts-polygon",r);if(o&&o.length){var l=a.stroke&&a.stroke!=="none",c=Nnt(n,o,i);return Y.createElement("g",{className:s},Y.createElement("path",by({},_t(a,!0),{fill:c.slice(-1)==="Z"?a.fill:"none",stroke:"none",d:c})),l?Y.createElement("path",by({},_t(a,!0),{fill:"none",d:gx(n,i)})):null,l?Y.createElement("path",by({},_t(a,!0),{fill:"none",d:gx(o,i)})):null)}var u=gx(n,i);return Y.createElement("path",by({},_t(a,!0),{fill:u.slice(-1)==="Z"?a.fill:"none",className:s,d:u}))};function RL(){return RL=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Unt(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var Wnt=function(t,n,r,o,i,a){return"M".concat(t,",").concat(i,"v").concat(o,"M").concat(a,",").concat(n,"h").concat(r)},Gnt=function(t){var n=t.x,r=n===void 0?0:n,o=t.y,i=o===void 0?0:o,a=t.top,s=a===void 0?0:a,l=t.left,c=l===void 0?0:l,u=t.width,d=u===void 0?0:u,f=t.height,p=f===void 0?0:f,h=t.className,m=Hnt(t,Fnt),y=jnt({x:r,y:i,top:s,left:c,width:d,height:p},m);return!ut(r)||!ut(i)||!ut(d)||!ut(p)||!ut(s)||!ut(c)?null:Y.createElement("path",$L({},_t(y,!0),{className:de("recharts-cross",h),d:Wnt(r,i,d,p,s,c)}))},qnt=Wk,Knt=eae,Ynt=Pu;function Qnt(e,t){return e&&e.length?qnt(e,Ynt(t),Knt):void 0}var Xnt=Qnt;const Jnt=Bn(Xnt);var Znt=Wk,ert=Pu,trt=tae;function nrt(e,t){return e&&e.length?Znt(e,ert(t),trt):void 0}var rrt=nrt;const ort=Bn(rrt);var irt=["cx","cy","angle","ticks","axisLine"],art=["ticks","tick","angle","tickFormatter","stroke"];function Bv(e){"@babel/helpers - typeof";return Bv=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Bv(e)}function mx(){return mx=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function srt(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function lrt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Rq(e,t){for(var n=0;n_q?a=o==="outer"?"start":"end":i<-_q?a=o==="outer"?"end":"start":a="middle",a}},{key:"renderAxisLine",value:function(){var r=this.props,o=r.cx,i=r.cy,a=r.radius,s=r.axisLine,l=r.axisLineType,c=ch(ch({},_t(this.props,!1)),{},{fill:"none"},_t(s,!1));if(l==="circle")return Y.createElement(XC,Ih({className:"recharts-polar-angle-axis-line"},c,{cx:o,cy:i,r:a}));var u=this.props.ticks,d=u.map(function(f){return Mr(o,i,a,f.coordinate)});return Y.createElement(Lnt,Ih({className:"recharts-polar-angle-axis-line"},c,{points:d}))}},{key:"renderTicks",value:function(){var r=this,o=this.props,i=o.ticks,a=o.tick,s=o.tickLine,l=o.tickFormatter,c=o.stroke,u=_t(this.props,!1),d=_t(a,!1),f=ch(ch({},u),{},{fill:"none"},_t(s,!1)),p=i.map(function(h,m){var y=r.getTickLineCoord(h),w=r.getTickTextAnchor(h),x=ch(ch(ch({textAnchor:w},u),{},{stroke:"none",fill:c},d),{},{index:m,payload:h,x:y.x2,y:y.y2});return Y.createElement(pn,Ih({className:de("recharts-polar-angle-axis-tick",Aae(a)),key:"tick-".concat(h.coordinate)},sp(r.props,h,m)),s&&Y.createElement("line",Ih({className:"recharts-polar-angle-axis-tick-line"},f,y)),a&&t.renderTickItem(a,x,l?l(h.value,m):h.value))});return Y.createElement(pn,{className:"recharts-polar-angle-axis-ticks"},p)}},{key:"render",value:function(){var r=this.props,o=r.ticks,i=r.radius,a=r.axisLine;return i<=0||!o||!o.length?null:Y.createElement(pn,{className:de("recharts-polar-angle-axis",this.props.className)},a&&this.renderAxisLine(),this.renderTicks())}}],[{key:"renderTickItem",value:function(r,o,i){var a;return Y.isValidElement(r)?a=Y.cloneElement(r,o):Jt(r)?a=r(o):a=Y.createElement(yg,Ih({},o,{className:"recharts-polar-angle-axis-tick-value"}),i),a}}])}(v.PureComponent);Xk(Jk,"displayName","PolarAngleAxis");Xk(Jk,"axisType","angleAxis");Xk(Jk,"defaultProps",{type:"category",angleAxisId:0,scale:"auto",cx:0,cy:0,orientation:"outer",axisLine:!0,tickLine:!0,tickSize:8,tick:!0,hide:!1,allowDuplicatedCategory:!0});var Crt=Xoe,Ert=Crt(Object.getPrototypeOf,Object),Prt=Ert,Trt=$d,Irt=Prt,Ort=Dd,Art="[object Object]",krt=Function.prototype,Mrt=Object.prototype,Wae=krt.toString,Rrt=Mrt.hasOwnProperty,$rt=Wae.call(Object);function Drt(e){if(!Ort(e)||Trt(e)!=Art)return!1;var t=Irt(e);if(t===null)return!0;var n=Rrt.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&Wae.call(n)==$rt}var _rt=Drt;const Nrt=Bn(_rt);var Lrt=$d,Frt=Dd,jrt="[object Boolean]";function Brt(e){return e===!0||e===!1||Frt(e)&&Lrt(e)==jrt}var zrt=Brt;const Vrt=Bn(zrt);function kS(e){"@babel/helpers - typeof";return kS=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},kS(e)}function UI(){return UI=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n0,from:{upperWidth:0,lowerWidth:0,height:f,x:l,y:c},to:{upperWidth:u,lowerWidth:d,height:f,x:l,y:c},duration:m,animationEasing:h,isActive:w},function(C){var E=C.upperWidth,P=C.lowerWidth,T=C.height,I=C.x,A=C.y;return Y.createElement(Dl,{canBegin:a>0,from:"0px ".concat(a===-1?1:a,"px"),to:"".concat(a,"px 0px"),attributeName:"strokeDasharray",begin:y,duration:m,easing:h},Y.createElement("path",UI({},_t(n,!0),{className:x,d:jq(I,A,E,P,T),ref:r})))}):Y.createElement("g",null,Y.createElement("path",UI({},_t(n,!0),{className:x,d:jq(l,c,u,d,f)})))},Zrt=["option","shapeType","propTransformer","activeClassName","isActive"];function MS(e){"@babel/helpers - typeof";return MS=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},MS(e)}function eot(e,t){if(e==null)return{};var n=tot(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function tot(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Bq(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function WI(e){for(var t=1;t0?ys(C,"paddingAngle",0):0;if(P){var I=Jr(P.endAngle-P.startAngle,C.endAngle-C.startAngle),A=Ir(Ir({},C),{},{startAngle:x+T,endAngle:x+I(m)+T});y.push(A),x=A.endAngle}else{var k=C.endAngle,O=C.startAngle,$=Jr(0,k-O),N=$(m),L=Ir(Ir({},C),{},{startAngle:x+T,endAngle:x+N+T});y.push(L),x=L.endAngle}}),Y.createElement(pn,null,r.renderSectorsStatically(y))})}},{key:"attachKeyboardHandlers",value:function(r){var o=this;r.onkeydown=function(i){if(!i.altKey)switch(i.key){case"ArrowLeft":{var a=++o.state.sectorToFocus%o.sectorRefs.length;o.sectorRefs[a].focus(),o.setState({sectorToFocus:a});break}case"ArrowRight":{var s=--o.state.sectorToFocus<0?o.sectorRefs.length-1:o.state.sectorToFocus%o.sectorRefs.length;o.sectorRefs[s].focus(),o.setState({sectorToFocus:s});break}case"Escape":{o.sectorRefs[o.state.sectorToFocus].blur(),o.setState({sectorToFocus:0});break}}}}},{key:"renderSectors",value:function(){var r=this.props,o=r.sectors,i=r.isAnimationActive,a=this.state.prevSectors;return i&&o&&o.length&&(!a||!lp(a,o))?this.renderSectorsWithAnimation():this.renderSectorsStatically(o)}},{key:"componentDidMount",value:function(){this.pieRef&&this.attachKeyboardHandlers(this.pieRef)}},{key:"render",value:function(){var r=this,o=this.props,i=o.hide,a=o.sectors,s=o.className,l=o.label,c=o.cx,u=o.cy,d=o.innerRadius,f=o.outerRadius,p=o.isAnimationActive,h=this.state.isAnimationFinished;if(i||!a||!a.length||!ut(c)||!ut(u)||!ut(d)||!ut(f))return null;var m=de("recharts-pie",s);return Y.createElement(pn,{tabIndex:this.props.rootTabIndex,className:m,ref:function(w){r.pieRef=w}},this.renderSectors(),l&&this.renderLabels(a),Zo.renderCallByParent(this.props,null,!1),(!p||h)&&Sc.renderCallByParent(this.props,a,!1))}}],[{key:"getDerivedStateFromProps",value:function(r,o){return o.prevIsAnimationActive!==r.isAnimationActive?{prevIsAnimationActive:r.isAnimationActive,prevAnimationId:r.animationId,curSectors:r.sectors,prevSectors:[],isAnimationFinished:!0}:r.isAnimationActive&&r.animationId!==o.prevAnimationId?{prevAnimationId:r.animationId,curSectors:r.sectors,prevSectors:o.curSectors,isAnimationFinished:!0}:r.sectors!==o.curSectors?{curSectors:r.sectors,isAnimationFinished:!0}:null}},{key:"getTextAnchor",value:function(r,o){return r>o?"start":r=360?x:x-1)*l,E=y-x*p-C,P=o.reduce(function(A,k){var O=jr(k,w,0);return A+(ut(O)?O:0)},0),T;if(P>0){var I;T=o.map(function(A,k){var O=jr(A,w,0),$=jr(A,u,k),N=(ut(O)?O:0)/P,L;k?L=I.endAngle+ta(m)*l*(O!==0?1:0):L=a;var j=L+ta(m)*((O!==0?p:0)+N*E),D=(L+j)/2,_=(h.innerRadius+h.outerRadius)/2,z=[{name:$,value:O,payload:A,dataKey:w,type:f}],F=Mr(h.cx,h.cy,_,D);return I=Ir(Ir(Ir({percent:N,cornerRadius:i,name:$,tooltipPayload:z,midAngle:D,middleRadius:_,tooltipPosition:F},A),h),{},{value:jr(A,w),startAngle:L,endAngle:j,payload:A,paddingAngle:ta(m)*l}),I})}return Ir(Ir({},h),{},{sectors:T,data:o})});var Sot=Math.ceil,Cot=Math.max;function Eot(e,t,n,r){for(var o=-1,i=Cot(Sot((t-e)/(n||1)),0),a=Array(i);i--;)a[r?i:++o]=e,e+=n;return a}var Pot=Eot,Tot=mie,Uq=1/0,Iot=17976931348623157e292;function Oot(e){if(!e)return e===0?e:0;if(e=Tot(e),e===Uq||e===-Uq){var t=e<0?-1:1;return t*Iot}return e===e?e:0}var Kae=Oot,Aot=Pot,kot=Lk,ND=Kae;function Mot(e){return function(t,n,r){return r&&typeof r!="number"&&kot(t,n,r)&&(n=r=void 0),t=ND(t),n===void 0?(n=t,t=0):n=ND(n),r=r===void 0?t0&&r.handleDrag(o.changedTouches[0])}),Xa(r,"handleDragEnd",function(){r.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var o=r.props,i=o.endIndex,a=o.onDragEnd,s=o.startIndex;a==null||a({endIndex:i,startIndex:s})}),r.detachDragEndListener()}),Xa(r,"handleLeaveWrapper",function(){(r.state.isTravellerMoving||r.state.isSlideMoving)&&(r.leaveTimer=window.setTimeout(r.handleDragEnd,r.props.leaveTimeOut))}),Xa(r,"handleEnterSlideOrTraveller",function(){r.setState({isTextActive:!0})}),Xa(r,"handleLeaveSlideOrTraveller",function(){r.setState({isTextActive:!1})}),Xa(r,"handleSlideDragStart",function(o){var i=Yq(o)?o.changedTouches[0]:o;r.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:i.pageX}),r.attachDragEndListener()}),r.travellerDragStartHandlers={startX:r.handleTravellerDragStart.bind(r,"startX"),endX:r.handleTravellerDragStart.bind(r,"endX")},r.state={},r}return Wot(t,e),zot(t,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(r){var o=r.startX,i=r.endX,a=this.state.scaleValues,s=this.props,l=s.gap,c=s.data,u=c.length-1,d=Math.min(o,i),f=Math.max(o,i),p=t.getIndexInRange(a,d),h=t.getIndexInRange(a,f);return{startIndex:p-p%l,endIndex:h===u?u:h-h%l}}},{key:"getTextOfTick",value:function(r){var o=this.props,i=o.data,a=o.tickFormatter,s=o.dataKey,l=jr(i[r],s,r);return Jt(a)?a(l,r):l}},{key:"attachDragEndListener",value:function(){window.addEventListener("mouseup",this.handleDragEnd,!0),window.addEventListener("touchend",this.handleDragEnd,!0),window.addEventListener("mousemove",this.handleDrag,!0)}},{key:"detachDragEndListener",value:function(){window.removeEventListener("mouseup",this.handleDragEnd,!0),window.removeEventListener("touchend",this.handleDragEnd,!0),window.removeEventListener("mousemove",this.handleDrag,!0)}},{key:"handleSlideDrag",value:function(r){var o=this.state,i=o.slideMoveStartX,a=o.startX,s=o.endX,l=this.props,c=l.x,u=l.width,d=l.travellerWidth,f=l.startIndex,p=l.endIndex,h=l.onChange,m=r.pageX-i;m>0?m=Math.min(m,c+u-d-s,c+u-d-a):m<0&&(m=Math.max(m,c-a,c-s));var y=this.getIndex({startX:a+m,endX:s+m});(y.startIndex!==f||y.endIndex!==p)&&h&&h(y),this.setState({startX:a+m,endX:s+m,slideMoveStartX:r.pageX})}},{key:"handleTravellerDragStart",value:function(r,o){var i=Yq(o)?o.changedTouches[0]:o;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:r,brushMoveStartX:i.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(r){var o=this.state,i=o.brushMoveStartX,a=o.movingTravellerId,s=o.endX,l=o.startX,c=this.state[a],u=this.props,d=u.x,f=u.width,p=u.travellerWidth,h=u.onChange,m=u.gap,y=u.data,w={startX:this.state.startX,endX:this.state.endX},x=r.pageX-i;x>0?x=Math.min(x,d+f-p-c):x<0&&(x=Math.max(x,d-c)),w[a]=c+x;var C=this.getIndex(w),E=C.startIndex,P=C.endIndex,T=function(){var A=y.length-1;return a==="startX"&&(s>l?E%m===0:P%m===0)||sl?P%m===0:E%m===0)||s>l&&P===A};this.setState(Xa(Xa({},a,c+x),"brushMoveStartX",r.pageX),function(){h&&T()&&h(C)})}},{key:"handleTravellerMoveKeyboard",value:function(r,o){var i=this,a=this.state,s=a.scaleValues,l=a.startX,c=a.endX,u=this.state[o],d=s.indexOf(u);if(d!==-1){var f=d+r;if(!(f===-1||f>=s.length)){var p=s[f];o==="startX"&&p>=c||o==="endX"&&p<=l||this.setState(Xa({},o,p),function(){i.props.onChange(i.getIndex({startX:i.state.startX,endX:i.state.endX}))})}}}},{key:"renderBackground",value:function(){var r=this.props,o=r.x,i=r.y,a=r.width,s=r.height,l=r.fill,c=r.stroke;return Y.createElement("rect",{stroke:c,fill:l,x:o,y:i,width:a,height:s})}},{key:"renderPanorama",value:function(){var r=this.props,o=r.x,i=r.y,a=r.width,s=r.height,l=r.data,c=r.children,u=r.padding,d=v.Children.only(c);return d?Y.cloneElement(d,{x:o,y:i,width:a,height:s,margin:u,compact:!0,data:l}):null}},{key:"renderTravellerLayer",value:function(r,o){var i,a,s=this,l=this.props,c=l.y,u=l.travellerWidth,d=l.height,f=l.traveller,p=l.ariaLabel,h=l.data,m=l.startIndex,y=l.endIndex,w=Math.max(r,this.props.x),x=LD(LD({},_t(this.props,!1)),{},{x:w,y:c,width:u,height:d}),C=p||"Min value: ".concat((i=h[m])===null||i===void 0?void 0:i.name,", Max value: ").concat((a=h[y])===null||a===void 0?void 0:a.name);return Y.createElement(pn,{tabIndex:0,role:"slider","aria-label":C,"aria-valuenow":r,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[o],onTouchStart:this.travellerDragStartHandlers[o],onKeyDown:function(P){["ArrowLeft","ArrowRight"].includes(P.key)&&(P.preventDefault(),P.stopPropagation(),s.handleTravellerMoveKeyboard(P.key==="ArrowRight"?1:-1,o))},onFocus:function(){s.setState({isTravellerFocused:!0})},onBlur:function(){s.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},t.renderTraveller(f,x))}},{key:"renderSlide",value:function(r,o){var i=this.props,a=i.y,s=i.height,l=i.stroke,c=i.travellerWidth,u=Math.min(r,o)+c,d=Math.max(Math.abs(o-r)-c,0);return Y.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:l,fillOpacity:.2,x:u,y:a,width:d,height:s})}},{key:"renderText",value:function(){var r=this.props,o=r.startIndex,i=r.endIndex,a=r.y,s=r.height,l=r.travellerWidth,c=r.stroke,u=this.state,d=u.startX,f=u.endX,p=5,h={pointerEvents:"none",fill:c};return Y.createElement(pn,{className:"recharts-brush-texts"},Y.createElement(yg,YI({textAnchor:"end",verticalAnchor:"middle",x:Math.min(d,f)-p,y:a+s/2},h),this.getTextOfTick(o)),Y.createElement(yg,YI({textAnchor:"start",verticalAnchor:"middle",x:Math.max(d,f)+l+p,y:a+s/2},h),this.getTextOfTick(i)))}},{key:"render",value:function(){var r=this.props,o=r.data,i=r.className,a=r.children,s=r.x,l=r.y,c=r.width,u=r.height,d=r.alwaysShowText,f=this.state,p=f.startX,h=f.endX,m=f.isTextActive,y=f.isSlideMoving,w=f.isTravellerMoving,x=f.isTravellerFocused;if(!o||!o.length||!ut(s)||!ut(l)||!ut(c)||!ut(u)||c<=0||u<=0)return null;var C=de("recharts-brush",i),E=Y.Children.count(a)===1,P=jot("userSelect","none");return Y.createElement(pn,{className:C,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:P},this.renderBackground(),E&&this.renderPanorama(),this.renderSlide(p,h),this.renderTravellerLayer(p,"startX"),this.renderTravellerLayer(h,"endX"),(m||y||w||x||d)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(r){var o=r.x,i=r.y,a=r.width,s=r.height,l=r.stroke,c=Math.floor(i+s/2)-1;return Y.createElement(Y.Fragment,null,Y.createElement("rect",{x:o,y:i,width:a,height:s,fill:l,stroke:"none"}),Y.createElement("line",{x1:o+1,y1:c,x2:o+a-1,y2:c,fill:"none",stroke:"#fff"}),Y.createElement("line",{x1:o+1,y1:c+2,x2:o+a-1,y2:c+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(r,o){var i;return Y.isValidElement(r)?i=Y.cloneElement(r,o):Jt(r)?i=r(o):i=t.renderDefaultTraveller(o),i}},{key:"getDerivedStateFromProps",value:function(r,o){var i=r.data,a=r.width,s=r.x,l=r.travellerWidth,c=r.updateId,u=r.startIndex,d=r.endIndex;if(i!==o.prevData||c!==o.prevUpdateId)return LD({prevData:i,prevTravellerWidth:l,prevUpdateId:c,prevX:s,prevWidth:a},i&&i.length?qot({data:i,width:a,x:s,travellerWidth:l,startIndex:u,endIndex:d}):{scale:null,scaleValues:null});if(o.scale&&(a!==o.prevWidth||s!==o.prevX||l!==o.prevTravellerWidth)){o.scale.range([s,s+a-l]);var f=o.scale.domain().map(function(p){return o.scale(p)});return{prevData:i,prevTravellerWidth:l,prevUpdateId:c,prevX:s,prevWidth:a,startX:o.scale(r.startIndex),endX:o.scale(r.endIndex),scaleValues:f}}return null}},{key:"getIndexInRange",value:function(r,o){for(var i=r.length,a=0,s=i-1;s-a>1;){var l=Math.floor((a+s)/2);r[l]>o?s=l:a=l}return o>=r[s]?s:a}}])}(v.PureComponent);Xa(Uv,"displayName","Brush");Xa(Uv,"defaultProps",{height:40,travellerWidth:5,gap:1,fill:"#fff",stroke:"#666",padding:{top:1,right:1,bottom:1,left:1},leaveTimeOut:1e3,alwaysShowText:!1});var Kot=Gz;function Yot(e,t){var n;return Kot(e,function(r,o,i){return n=t(r,o,i),!n}),!!n}var Qot=Yot,Xot=Hoe,Jot=Pu,Zot=Qot,eit=ja,tit=Lk;function nit(e,t,n){var r=eit(e)?Xot:Zot;return n&&tit(e,t,n)&&(t=void 0),r(e,Jot(t))}var rit=nit;const oit=Bn(rit);var cu=function(t,n){var r=t.alwaysShow,o=t.ifOverflow;return r&&(o="extendDomain"),o===n},Qq=die;function iit(e,t,n){t=="__proto__"&&Qq?Qq(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var ait=iit,sit=ait,lit=cie,cit=Pu;function uit(e,t){var n={};return t=cit(t),lit(e,function(r,o,i){sit(n,o,t(r,o,i))}),n}var dit=uit;const fit=Bn(dit);function pit(e,t){for(var n=-1,r=e==null?0:e.length;++n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function kit(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Mit(e,t){var n=e.x,r=e.y,o=Ait(e,Pit),i="".concat(n),a=parseInt(i,10),s="".concat(r),l=parseInt(s,10),c="".concat(t.height||o.height),u=parseInt(c,10),d="".concat(t.width||o.width),f=parseInt(d,10);return dw(dw(dw(dw(dw({},t),o),a?{x:a}:{}),l?{y:l}:{}),{},{height:u,width:f,name:t.name,radius:t.radius})}function Jq(e){return Y.createElement(GI,FL({shapeType:"rectangle",propTransformer:Mit,activeClassName:"recharts-active-bar"},e))}var Rit=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return function(r,o){if(typeof t=="number")return t;var i=typeof r=="number";return i?t(r,o):(i||cp(),n)}},$it=["value","background"],Zae;function Wv(e){"@babel/helpers - typeof";return Wv=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Wv(e)}function Dit(e,t){if(e==null)return{};var n=_it(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function _it(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function XI(){return XI=Object.assign?Object.assign.bind():function(e){for(var t=1;t0&&Math.abs(D)0&&Math.abs(j)0&&(L=Math.min((ee||0)-(j[Q-1]||0),L))}),Number.isFinite(L)){var D=L/N,_=m.layout==="vertical"?r.height:r.width;if(m.padding==="gap"&&(I=D*_/2),m.padding==="no-gap"){var z=na(t.barCategoryGap,D*_),F=D*_/2;I=F-z-(F-z)/_*z}}}o==="xAxis"?A=[r.left+(C.left||0)+(I||0),r.left+r.width-(C.right||0)-(I||0)]:o==="yAxis"?A=l==="horizontal"?[r.top+r.height-(C.bottom||0),r.top+(C.top||0)]:[r.top+(C.top||0)+(I||0),r.top+r.height-(C.bottom||0)-(I||0)]:A=m.range,P&&(A=[A[1],A[0]]);var V=Sae(m,i,f),U=V.scale,q=V.realScaleType;U.domain(w).range(A),Cae(U);var X=Eae(U,ac(ac({},m),{},{realScaleType:q}));o==="xAxis"?($=y==="top"&&!E||y==="bottom"&&E,k=r.left,O=d[T]-$*m.height):o==="yAxis"&&($=y==="left"&&!E||y==="right"&&E,k=d[T]-$*m.width,O=r.top);var ie=ac(ac(ac({},m),X),{},{realScaleType:q,x:k,y:O,scale:U,width:o==="xAxis"?r.width:m.width,height:o==="yAxis"?r.height:m.height});return ie.bandSize=_I(ie,X),!m.hide&&o==="xAxis"?d[T]+=($?-1:1)*ie.height:m.hide||(d[T]+=($?-1:1)*ie.width),ac(ac({},p),{},tM({},h,ie))},{})},rse=function(t,n){var r=t.x,o=t.y,i=n.x,a=n.y;return{x:Math.min(r,i),y:Math.min(o,a),width:Math.abs(i-r),height:Math.abs(a-o)}},Git=function(t){var n=t.x1,r=t.y1,o=t.x2,i=t.y2;return rse({x:n,y:r},{x:o,y:i})},ose=function(){function e(t){Hit(this,e),this.scale=t}return Uit(e,[{key:"domain",get:function(){return this.scale.domain}},{key:"range",get:function(){return this.scale.range}},{key:"rangeMin",get:function(){return this.range()[0]}},{key:"rangeMax",get:function(){return this.range()[1]}},{key:"bandwidth",get:function(){return this.scale.bandwidth}},{key:"apply",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=r.bandAware,i=r.position;if(n!==void 0){if(i)switch(i){case"start":return this.scale(n);case"middle":{var a=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+a}case"end":{var s=this.bandwidth?this.bandwidth():0;return this.scale(n)+s}default:return this.scale(n)}if(o){var l=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+l}return this.scale(n)}}},{key:"isInRange",value:function(n){var r=this.range(),o=r[0],i=r[r.length-1];return o<=i?n>=o&&n<=i:n>=i&&n<=o}}],[{key:"create",value:function(n){return new e(n)}}])}();tM(ose,"EPS",1e-4);var xV=function(t){var n=Object.keys(t).reduce(function(r,o){return ac(ac({},r),{},tM({},o,ose.create(t[o])))},{});return ac(ac({},n),{},{apply:function(o){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=i.bandAware,s=i.position;return fit(o,function(l,c){return n[c].apply(l,{bandAware:a,position:s})})},isInRange:function(o){return Jae(o,function(i,a){return n[a].isInRange(i)})}})};function qit(e){return(e%180+180)%180}var Kit=function(t){var n=t.width,r=t.height,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,i=qit(o),a=i*Math.PI/180,s=Math.atan(r/n),l=a>s&&a-1?o[i?t[a]:a]:void 0}}var Zit=Jit,eat=Kae;function tat(e){var t=eat(e),n=t%1;return t===t?n?t-n:t:0}var nat=tat,rat=rie,oat=Pu,iat=nat,aat=Math.max;function sat(e,t,n){var r=e==null?0:e.length;if(!r)return-1;var o=n==null?0:iat(n);return o<0&&(o=aat(r+o,0)),rat(e,oat(t),o)}var lat=sat,cat=Zit,uat=lat,dat=cat(uat),fat=dat;const pat=Bn(fat);var hat=P5e(function(e){return{x:e.left,y:e.top,width:e.width,height:e.height}},function(e){return["l",e.left,"t",e.top,"w",e.width,"h",e.height].join("")}),SV=v.createContext(void 0),CV=v.createContext(void 0),ise=v.createContext(void 0),ase=v.createContext({}),sse=v.createContext(void 0),lse=v.createContext(0),cse=v.createContext(0),r7=function(t){var n=t.state,r=n.xAxisMap,o=n.yAxisMap,i=n.offset,a=t.clipPathId,s=t.children,l=t.width,c=t.height,u=hat(i);return Y.createElement(SV.Provider,{value:r},Y.createElement(CV.Provider,{value:o},Y.createElement(ase.Provider,{value:i},Y.createElement(ise.Provider,{value:u},Y.createElement(sse.Provider,{value:a},Y.createElement(lse.Provider,{value:c},Y.createElement(cse.Provider,{value:l},s)))))))},gat=function(){return v.useContext(sse)},use=function(t){var n=v.useContext(SV);n==null&&cp();var r=n[t];return r==null&&cp(),r},mat=function(){var t=v.useContext(SV);return vf(t)},yat=function(){var t=v.useContext(CV),n=pat(t,function(r){return Jae(r.domain,Number.isFinite)});return n||vf(t)},dse=function(t){var n=v.useContext(CV);n==null&&cp();var r=n[t];return r==null&&cp(),r},vat=function(){var t=v.useContext(ise);return t},bat=function(){return v.useContext(ase)},EV=function(){return v.useContext(cse)},PV=function(){return v.useContext(lse)};function Gv(e){"@babel/helpers - typeof";return Gv=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Gv(e)}function wat(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function xat(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);ne*o)return!1;var i=n();return e*(t-e*i/2-r)>=0&&e*(t+e*i/2-o)<=0}function nst(e,t){return vse(e,t+1)}function rst(e,t,n,r,o){for(var i=(r||[]).slice(),a=t.start,s=t.end,l=0,c=1,u=a,d=function(){var h=r==null?void 0:r[l];if(h===void 0)return{v:vse(r,c)};var m=l,y,w=function(){return y===void 0&&(y=n(h,m)),y},x=h.coordinate,C=l===0||nO(e,x,w,u,s);C||(l=0,u=a,c+=1),C&&(u=x+e*(w()/2+o),l+=c)},f;c<=i.length;)if(f=d(),f)return f.v;return[]}function NS(e){"@babel/helpers - typeof";return NS=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},NS(e)}function d7(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Oi(e){for(var t=1;t0?p.coordinate-y*e:p.coordinate})}else i[f]=p=Oi(Oi({},p),{},{tickCoord:p.coordinate});var w=nO(e,p.tickCoord,m,s,l);w&&(l=p.tickCoord-e*(m()/2+o),i[f]=Oi(Oi({},p),{},{isShow:!0}))},u=a-1;u>=0;u--)c(u);return i}function lst(e,t,n,r,o,i){var a=(r||[]).slice(),s=a.length,l=t.start,c=t.end;if(i){var u=r[s-1],d=n(u,s-1),f=e*(u.coordinate+e*d/2-c);a[s-1]=u=Oi(Oi({},u),{},{tickCoord:f>0?u.coordinate-f*e:u.coordinate});var p=nO(e,u.tickCoord,function(){return d},l,c);p&&(c=u.tickCoord-e*(d/2+o),a[s-1]=Oi(Oi({},u),{},{isShow:!0}))}for(var h=i?s-1:s,m=function(x){var C=a[x],E,P=function(){return E===void 0&&(E=n(C,x)),E};if(x===0){var T=e*(C.coordinate-e*P()/2-l);a[x]=C=Oi(Oi({},C),{},{tickCoord:T<0?C.coordinate-T*e:C.coordinate})}else a[x]=C=Oi(Oi({},C),{},{tickCoord:C.coordinate});var I=nO(e,C.tickCoord,P,l,c);I&&(l=C.tickCoord+e*(P()/2+o),a[x]=Oi(Oi({},C),{},{isShow:!0}))},y=0;y=2?ta(o[1].coordinate-o[0].coordinate):1,w=tst(i,y,p);return l==="equidistantPreserveStart"?rst(y,w,m,o,a):(l==="preserveStart"||l==="preserveStartEnd"?f=lst(y,w,m,o,a,l==="preserveStartEnd"):f=sst(y,w,m,o,a),f.filter(function(x){return x.isShow}))}var cst=["viewBox"],ust=["viewBox"],dst=["ticks"];function Yv(e){"@babel/helpers - typeof";return Yv=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Yv(e)}function xy(){return xy=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function fst(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function pst(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p7(e,t){for(var n=0;n0?l(this.props):l(p)),a<=0||s<=0||!h||!h.length?null:Y.createElement(pn,{className:de("recharts-cartesian-axis",c),ref:function(y){r.layerReference=y}},i&&this.renderAxisLine(),this.renderTicks(h,this.state.fontSize,this.state.letterSpacing),Zo.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(r,o,i){var a;return Y.isValidElement(r)?a=Y.cloneElement(r,o):Jt(r)?a=r(o):a=Y.createElement(yg,xy({},o,{className:"recharts-cartesian-axis-tick-value"}),i),a}}])}(v.Component);AV(Qb,"displayName","CartesianAxis");AV(Qb,"defaultProps",{x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd"});var wst=["x1","y1","x2","y2","key"],xst=["offset"];function bg(e){"@babel/helpers - typeof";return bg=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},bg(e)}function h7(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Ri(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Pst(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var Tst=function(t){var n=t.fill;if(!n||n==="none")return null;var r=t.fillOpacity,o=t.x,i=t.y,a=t.width,s=t.height,l=t.ry;return Y.createElement("rect",{x:o,y:i,ry:l,width:a,height:s,stroke:"none",fill:n,fillOpacity:r,className:"recharts-cartesian-grid-bg"})};function xse(e,t){var n;if(Y.isValidElement(e))n=Y.cloneElement(e,t);else if(Jt(e))n=e(t);else{var r=t.x1,o=t.y1,i=t.x2,a=t.y2,s=t.key,l=g7(t,wst),c=_t(l,!1);c.offset;var u=g7(c,xst);n=Y.createElement("line",Fh({},u,{x1:r,y1:o,x2:i,y2:a,fill:"none",key:s}))}return n}function Ist(e){var t=e.x,n=e.width,r=e.horizontal,o=r===void 0?!0:r,i=e.horizontalPoints;if(!o||!i||!i.length)return null;var a=i.map(function(s,l){var c=Ri(Ri({},e),{},{x1:t,y1:s,x2:t+n,y2:s,key:"line-".concat(l),index:l});return xse(o,c)});return Y.createElement("g",{className:"recharts-cartesian-grid-horizontal"},a)}function Ost(e){var t=e.y,n=e.height,r=e.vertical,o=r===void 0?!0:r,i=e.verticalPoints;if(!o||!i||!i.length)return null;var a=i.map(function(s,l){var c=Ri(Ri({},e),{},{x1:s,y1:t,x2:s,y2:t+n,key:"line-".concat(l),index:l});return xse(o,c)});return Y.createElement("g",{className:"recharts-cartesian-grid-vertical"},a)}function Ast(e){var t=e.horizontalFill,n=e.fillOpacity,r=e.x,o=e.y,i=e.width,a=e.height,s=e.horizontalPoints,l=e.horizontal,c=l===void 0?!0:l;if(!c||!t||!t.length)return null;var u=s.map(function(f){return Math.round(f+o-o)}).sort(function(f,p){return f-p});o!==u[0]&&u.unshift(0);var d=u.map(function(f,p){var h=!u[p+1],m=h?o+a-f:u[p+1]-f;if(m<=0)return null;var y=p%t.length;return Y.createElement("rect",{key:"react-".concat(p),y:f,x:r,height:m,width:i,stroke:"none",fill:t[y],fillOpacity:n,className:"recharts-cartesian-grid-bg"})});return Y.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},d)}function kst(e){var t=e.vertical,n=t===void 0?!0:t,r=e.verticalFill,o=e.fillOpacity,i=e.x,a=e.y,s=e.width,l=e.height,c=e.verticalPoints;if(!n||!r||!r.length)return null;var u=c.map(function(f){return Math.round(f+i-i)}).sort(function(f,p){return f-p});i!==u[0]&&u.unshift(0);var d=u.map(function(f,p){var h=!u[p+1],m=h?i+s-f:u[p+1]-f;if(m<=0)return null;var y=p%r.length;return Y.createElement("rect",{key:"react-".concat(p),x:f,y:a,width:m,height:l,stroke:"none",fill:r[y],fillOpacity:o,className:"recharts-cartesian-grid-bg"})});return Y.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},d)}var Mst=function(t,n){var r=t.xAxis,o=t.width,i=t.height,a=t.offset;return xae(OV(Ri(Ri(Ri({},Qb.defaultProps),r),{},{ticks:od(r,!0),viewBox:{x:0,y:0,width:o,height:i}})),a.left,a.left+a.width,n)},Rst=function(t,n){var r=t.yAxis,o=t.width,i=t.height,a=t.offset;return xae(OV(Ri(Ri(Ri({},Qb.defaultProps),r),{},{ticks:od(r,!0),viewBox:{x:0,y:0,width:o,height:i}})),a.top,a.top+a.height,n)},$m={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function Bg(e){var t,n,r,o,i,a,s=EV(),l=PV(),c=bat(),u=Ri(Ri({},e),{},{stroke:(t=e.stroke)!==null&&t!==void 0?t:$m.stroke,fill:(n=e.fill)!==null&&n!==void 0?n:$m.fill,horizontal:(r=e.horizontal)!==null&&r!==void 0?r:$m.horizontal,horizontalFill:(o=e.horizontalFill)!==null&&o!==void 0?o:$m.horizontalFill,vertical:(i=e.vertical)!==null&&i!==void 0?i:$m.vertical,verticalFill:(a=e.verticalFill)!==null&&a!==void 0?a:$m.verticalFill,x:ut(e.x)?e.x:c.left,y:ut(e.y)?e.y:c.top,width:ut(e.width)?e.width:c.width,height:ut(e.height)?e.height:c.height}),d=u.x,f=u.y,p=u.width,h=u.height,m=u.syncWithTicks,y=u.horizontalValues,w=u.verticalValues,x=mat(),C=yat();if(!ut(p)||p<=0||!ut(h)||h<=0||!ut(d)||d!==+d||!ut(f)||f!==+f)return null;var E=u.verticalCoordinatesGenerator||Mst,P=u.horizontalCoordinatesGenerator||Rst,T=u.horizontalPoints,I=u.verticalPoints;if((!T||!T.length)&&Jt(P)){var A=y&&y.length,k=P({yAxis:C?Ri(Ri({},C),{},{ticks:A?y:C.ticks}):void 0,width:s,height:l,offset:c},A?!0:m);xc(Array.isArray(k),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(bg(k),"]")),Array.isArray(k)&&(T=k)}if((!I||!I.length)&&Jt(E)){var O=w&&w.length,$=E({xAxis:x?Ri(Ri({},x),{},{ticks:O?w:x.ticks}):void 0,width:s,height:l,offset:c},O?!0:m);xc(Array.isArray($),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(bg($),"]")),Array.isArray($)&&(I=$)}return Y.createElement("g",{className:"recharts-cartesian-grid"},Y.createElement(Tst,{fill:u.fill,fillOpacity:u.fillOpacity,x:u.x,y:u.y,width:u.width,height:u.height,ry:u.ry}),Y.createElement(Ist,Fh({},u,{offset:c,horizontalPoints:T,xAxis:x,yAxis:C})),Y.createElement(Ost,Fh({},u,{offset:c,verticalPoints:I,xAxis:x,yAxis:C})),Y.createElement(Ast,Fh({},u,{horizontalPoints:T})),Y.createElement(kst,Fh({},u,{verticalPoints:I})))}Bg.displayName="CartesianGrid";var $st=["type","layout","connectNulls","ref"],Dst=["key"];function Qv(e){"@babel/helpers - typeof";return Qv=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Qv(e)}function m7(e,t){if(e==null)return{};var n=_st(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function _st(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function yx(){return yx=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);nd){p=[].concat(Dm(l.slice(0,h)),[d-m]);break}var y=p.length%2===0?[0,f]:[f];return[].concat(Dm(t.repeat(l,u)),Dm(p),y).map(function(w){return"".concat(w,"px")}).join(", ")}),sc(n,"id",kp("recharts-line-")),sc(n,"pathRef",function(a){n.mainCurve=a}),sc(n,"handleAnimationEnd",function(){n.setState({isAnimationFinished:!0}),n.props.onAnimationEnd&&n.props.onAnimationEnd()}),sc(n,"handleAnimationStart",function(){n.setState({isAnimationFinished:!1}),n.props.onAnimationStart&&n.props.onAnimationStart()}),n}return Wst(t,e),zst(t,[{key:"componentDidMount",value:function(){if(this.props.isAnimationActive){var r=this.getTotalLength();this.setState({totalLength:r})}}},{key:"componentDidUpdate",value:function(){if(this.props.isAnimationActive){var r=this.getTotalLength();r!==this.state.totalLength&&this.setState({totalLength:r})}}},{key:"getTotalLength",value:function(){var r=this.mainCurve;try{return r&&r.getTotalLength&&r.getTotalLength()||0}catch{return 0}}},{key:"renderErrorBar",value:function(r,o){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var i=this.props,a=i.points,s=i.xAxis,l=i.yAxis,c=i.layout,u=i.children,d=sa(u,Kb);if(!d)return null;var f=function(m,y){return{x:m.x,y:m.y,value:m.value,errorVal:jr(m.payload,y)}},p={clipPath:r?"url(#clipPath-".concat(o,")"):null};return Y.createElement(pn,p,d.map(function(h){return Y.cloneElement(h,{key:"bar-".concat(h.props.dataKey),data:a,xAxis:s,yAxis:l,layout:c,dataPointFormatter:f})}))}},{key:"renderDots",value:function(r,o,i){var a=this.props.isAnimationActive;if(a&&!this.state.isAnimationFinished)return null;var s=this.props,l=s.dot,c=s.points,u=s.dataKey,d=_t(this.props,!1),f=_t(l,!0),p=c.map(function(m,y){var w=Ya(Ya(Ya({key:"dot-".concat(y),r:3},d),f),{},{value:m.value,dataKey:u,cx:m.x,cy:m.y,index:y,payload:m.payload});return t.renderDotItem(l,w)}),h={clipPath:r?"url(#clipPath-".concat(o?"":"dots-").concat(i,")"):null};return Y.createElement(pn,yx({className:"recharts-line-dots",key:"dots"},h),p)}},{key:"renderCurveStatically",value:function(r,o,i,a){var s=this.props,l=s.type,c=s.layout,u=s.connectNulls;s.ref;var d=m7(s,$st),f=Ya(Ya(Ya({},_t(d,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:o?"url(#clipPath-".concat(i,")"):null,points:r},a),{},{type:l,layout:c,connectNulls:u});return Y.createElement(Kf,yx({},f,{pathRef:this.pathRef}))}},{key:"renderCurveWithAnimation",value:function(r,o){var i=this,a=this.props,s=a.points,l=a.strokeDasharray,c=a.isAnimationActive,u=a.animationBegin,d=a.animationDuration,f=a.animationEasing,p=a.animationId,h=a.animateNewValues,m=a.width,y=a.height,w=this.state,x=w.prevPoints,C=w.totalLength;return Y.createElement(Dl,{begin:u,duration:d,isActive:c,easing:f,from:{t:0},to:{t:1},key:"line-".concat(p),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(E){var P=E.t;if(x){var T=x.length/s.length,I=s.map(function(N,L){var j=Math.floor(L*T);if(x[j]){var D=x[j],_=Jr(D.x,N.x),z=Jr(D.y,N.y);return Ya(Ya({},N),{},{x:_(P),y:z(P)})}if(h){var F=Jr(m*2,N.x),V=Jr(y/2,N.y);return Ya(Ya({},N),{},{x:F(P),y:V(P)})}return Ya(Ya({},N),{},{x:N.x,y:N.y})});return i.renderCurveStatically(I,r,o)}var A=Jr(0,C),k=A(P),O;if(l){var $="".concat(l).split(/[,\s]+/gim).map(function(N){return parseFloat(N)});O=i.getStrokeDasharray(k,C,$)}else O=i.generateSimpleStrokeDasharray(C,k);return i.renderCurveStatically(s,r,o,{strokeDasharray:O})})}},{key:"renderCurve",value:function(r,o){var i=this.props,a=i.points,s=i.isAnimationActive,l=this.state,c=l.prevPoints,u=l.totalLength;return s&&a&&a.length&&(!c&&u>0||!lp(c,a))?this.renderCurveWithAnimation(r,o):this.renderCurveStatically(a,r,o)}},{key:"render",value:function(){var r,o=this.props,i=o.hide,a=o.dot,s=o.points,l=o.className,c=o.xAxis,u=o.yAxis,d=o.top,f=o.left,p=o.width,h=o.height,m=o.isAnimationActive,y=o.id;if(i||!s||!s.length)return null;var w=this.state.isAnimationFinished,x=s.length===1,C=de("recharts-line",l),E=c&&c.allowDataOverflow,P=u&&u.allowDataOverflow,T=E||P,I=Kt(y)?this.id:y,A=(r=_t(a,!1))!==null&&r!==void 0?r:{r:3,strokeWidth:2},k=A.r,O=k===void 0?3:k,$=A.strokeWidth,N=$===void 0?2:$,L=hoe(a)?a:{},j=L.clipDot,D=j===void 0?!0:j,_=O*2+N;return Y.createElement(pn,{className:C},E||P?Y.createElement("defs",null,Y.createElement("clipPath",{id:"clipPath-".concat(I)},Y.createElement("rect",{x:E?f:f-p/2,y:P?d:d-h/2,width:E?p:p*2,height:P?h:h*2})),!D&&Y.createElement("clipPath",{id:"clipPath-dots-".concat(I)},Y.createElement("rect",{x:f-_/2,y:d-_/2,width:p+_,height:h+_}))):null,!x&&this.renderCurve(T,I),this.renderErrorBar(T,I),(x||a)&&this.renderDots(T,D,I),(!m||w)&&Sc.renderCallByParent(this.props,s))}}],[{key:"getDerivedStateFromProps",value:function(r,o){return r.animationId!==o.prevAnimationId?{prevAnimationId:r.animationId,curPoints:r.points,prevPoints:o.curPoints}:r.points!==o.curPoints?{curPoints:r.points}:null}},{key:"repeat",value:function(r,o){for(var i=r.length%2!==0?[].concat(Dm(r),[0]):r,a=[],s=0;s=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Yst(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function jh(){return jh=Object.assign?Object.assign.bind():function(e){for(var t=1;t0||!lp(u,a)||!lp(d,s))?this.renderAreaWithAnimation(r,o):this.renderAreaStatically(a,s,r,o)}},{key:"render",value:function(){var r,o=this.props,i=o.hide,a=o.dot,s=o.points,l=o.className,c=o.top,u=o.left,d=o.xAxis,f=o.yAxis,p=o.width,h=o.height,m=o.isAnimationActive,y=o.id;if(i||!s||!s.length)return null;var w=this.state.isAnimationFinished,x=s.length===1,C=de("recharts-area",l),E=d&&d.allowDataOverflow,P=f&&f.allowDataOverflow,T=E||P,I=Kt(y)?this.id:y,A=(r=_t(a,!1))!==null&&r!==void 0?r:{r:3,strokeWidth:2},k=A.r,O=k===void 0?3:k,$=A.strokeWidth,N=$===void 0?2:$,L=hoe(a)?a:{},j=L.clipDot,D=j===void 0?!0:j,_=O*2+N;return Y.createElement(pn,{className:C},E||P?Y.createElement("defs",null,Y.createElement("clipPath",{id:"clipPath-".concat(I)},Y.createElement("rect",{x:E?u:u-p/2,y:P?c:c-h/2,width:E?p:p*2,height:P?h:h*2})),!D&&Y.createElement("clipPath",{id:"clipPath-dots-".concat(I)},Y.createElement("rect",{x:u-_/2,y:c-_/2,width:p+_,height:h+_}))):null,x?null:this.renderArea(T,I),(a||x)&&this.renderDots(T,D,I),(!m||w)&&Sc.renderCallByParent(this.props,s))}}],[{key:"getDerivedStateFromProps",value:function(r,o){return r.animationId!==o.prevAnimationId?{prevAnimationId:r.animationId,curPoints:r.points,curBaseLine:r.baseLine,prevPoints:o.curPoints,prevBaseLine:o.curBaseLine}:r.points!==o.curPoints||r.baseLine!==o.curBaseLine?{curPoints:r.points,curBaseLine:r.baseLine}:null}}])}(v.PureComponent);Ese=_p;nu(_p,"displayName","Area");nu(_p,"defaultProps",{stroke:"#3182bd",fill:"#3182bd",fillOpacity:.6,xAxisId:0,yAxisId:0,legendType:"line",connectNulls:!1,points:[],dot:!1,activeDot:!0,hide:!1,isAnimationActive:!xl.isSsr,animationBegin:0,animationDuration:1500,animationEasing:"ease"});nu(_p,"getBaseValue",function(e,t,n,r){var o=e.layout,i=e.baseValue,a=t.props.baseValue,s=a??i;if(ut(s)&&typeof s=="number")return s;var l=o==="horizontal"?r:n,c=l.scale.domain();if(l.type==="number"){var u=Math.max(c[0],c[1]),d=Math.min(c[0],c[1]);return s==="dataMin"?d:s==="dataMax"||u<0?u:Math.max(Math.min(c[0],c[1]),0)}return s==="dataMin"?c[0]:s==="dataMax"?c[1]:c[0]});nu(_p,"getComposedData",function(e){var t=e.props,n=e.item,r=e.xAxis,o=e.yAxis,i=e.xAxisTicks,a=e.yAxisTicks,s=e.bandSize,l=e.dataKey,c=e.stackedData,u=e.dataStartIndex,d=e.displayedData,f=e.offset,p=t.layout,h=c&&c.length,m=Ese.getBaseValue(t,n,r,o),y=p==="horizontal",w=!1,x=d.map(function(E,P){var T;h?T=c[u+P]:(T=jr(E,l),Array.isArray(T)?w=!0:T=[m,T]);var I=T[1]==null||h&&jr(E,l)==null;return y?{x:Fv({axis:r,ticks:i,bandSize:s,entry:E,index:P}),y:I?null:o.scale(T[1]),value:T,payload:E}:{x:I?null:r.scale(T[1]),y:Fv({axis:o,ticks:a,bandSize:s,entry:E,index:P}),value:T,payload:E}}),C;return h||w?C=x.map(function(E){var P=Array.isArray(E.value)?E.value[0]:null;return y?{x:E.x,y:P!=null&&E.y!=null?o.scale(P):null}:{x:P!=null?r.scale(P):null,y:E.y}}):C=y?o.scale(m):r.scale(m),of({points:x,baseLine:C,layout:p,isRange:w},f)});nu(_p,"renderDotItem",function(e,t){var n;if(Y.isValidElement(e))n=Y.cloneElement(e,t);else if(Jt(e))n=e(t);else{var r=de("recharts-area-dot",typeof e!="boolean"?e.className:""),o=t.key,i=Pse(t,Kst);n=Y.createElement(XC,jh({},i,{key:o,className:r}))}return n});function Jv(e){"@babel/helpers - typeof";return Jv=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Jv(e)}function rlt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function olt(e,t){for(var n=0;n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function plt(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function hlt(e){var t=e.option,n=e.isActive,r=flt(e,dlt);return typeof t=="string"?Y.createElement(GI,vx({option:Y.createElement(Dk,vx({type:t},r)),isActive:n,shapeType:"symbols"},r)):Y.createElement(GI,vx({option:t,isActive:n,shapeType:"symbols"},r))}function Zv(e){"@babel/helpers - typeof";return Zv=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Zv(e)}function bx(){return bx=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function cct(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function uct(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function dct(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n0?a:t&&t.length&&ut(o)&&ut(i)?t.slice(o,i+1):[]};function Gse(e){return e==="number"?[0,"auto"]:void 0}var aF=function(t,n,r,o){var i=t.graphicalItems,a=t.tooltipAxis,s=sM(n,t);return r<0||!i||!i.length||r>=s.length?null:i.reduce(function(l,c){var u,d=(u=c.props.data)!==null&&u!==void 0?u:n;d&&t.dataStartIndex+t.dataEndIndex!==0&&t.dataEndIndex-t.dataStartIndex>=r&&(d=d.slice(t.dataStartIndex,t.dataEndIndex+1));var f;if(a.dataKey&&!a.allowDuplicatedCategory){var p=d===void 0?s:d;f=sI(p,a.dataKey,o)}else f=d&&d[r]||s[r];return f?[].concat(rb(l),[Tae(c,f)]):l},[])},O7=function(t,n,r,o){var i=o||{x:t.chartX,y:t.chartY},a=Cct(i,r),s=t.orderedTooltipTicks,l=t.tooltipAxis,c=t.tooltipTicks,u=AZe(a,s,c,l);if(u>=0&&c){var d=c[u]&&c[u].value,f=aF(t,n,u,d),p=Ect(r,s,u,i);return{activeTooltipIndex:u,activeLabel:d,activePayload:f,activeCoordinate:p}}return null},Pct=function(t,n){var r=n.axes,o=n.graphicalItems,i=n.axisType,a=n.axisIdKey,s=n.stackGroups,l=n.dataStartIndex,c=n.dataEndIndex,u=t.layout,d=t.children,f=t.stackOffset,p=wae(u,i);return r.reduce(function(h,m){var y,w=m.type.defaultProps!==void 0?Be(Be({},m.type.defaultProps),m.props):m.props,x=w.type,C=w.dataKey,E=w.allowDataOverflow,P=w.allowDuplicatedCategory,T=w.scale,I=w.ticks,A=w.includeHidden,k=w[a];if(h[k])return h;var O=sM(t.data,{graphicalItems:o.filter(function(X){var ie,ee=a in X.props?X.props[a]:(ie=X.type.defaultProps)===null||ie===void 0?void 0:ie[a];return ee===k}),dataStartIndex:l,dataEndIndex:c}),$=O.length,N,L,j;Xlt(w.domain,E,x)&&(N=yL(w.domain,null,E),p&&(x==="number"||T!=="auto")&&(j=px(O,C,"category")));var D=Gse(x);if(!N||N.length===0){var _,z=(_=w.domain)!==null&&_!==void 0?_:D;if(C){if(N=px(O,C,x),x==="category"&&p){var F=bUe(N);P&&F?(L=N,N=KI(0,$)):P||(N=G9(z,N,m).reduce(function(X,ie){return X.indexOf(ie)>=0?X:[].concat(rb(X),[ie])},[]))}else if(x==="category")P?N=N.filter(function(X){return X!==""&&!Kt(X)}):N=G9(z,N,m).reduce(function(X,ie){return X.indexOf(ie)>=0||ie===""||Kt(ie)?X:[].concat(rb(X),[ie])},[]);else if(x==="number"){var V=DZe(O,o.filter(function(X){var ie,ee,Q=a in X.props?X.props[a]:(ie=X.type.defaultProps)===null||ie===void 0?void 0:ie[a],te="hide"in X.props?X.props.hide:(ee=X.type.defaultProps)===null||ee===void 0?void 0:ee.hide;return Q===k&&(A||!te)}),C,i,u);V&&(N=V)}p&&(x==="number"||T!=="auto")&&(j=px(O,C,"category"))}else p?N=KI(0,$):s&&s[k]&&s[k].hasStack&&x==="number"?N=f==="expand"?[0,1]:Pae(s[k].stackGroups,l,c):N=bae(O,o.filter(function(X){var ie=a in X.props?X.props[a]:X.type.defaultProps[a],ee="hide"in X.props?X.props.hide:X.type.defaultProps.hide;return ie===k&&(A||!ee)}),x,u,!0);if(x==="number")N=rF(d,N,k,i,I),z&&(N=yL(z,N,E));else if(x==="category"&&z){var U=z,q=N.every(function(X){return U.indexOf(X)>=0});q&&(N=U)}}return Be(Be({},h),{},Zt({},k,Be(Be({},w),{},{axisType:i,domain:N,categoricalDomain:j,duplicateDomain:L,originalDomain:(y=w.domain)!==null&&y!==void 0?y:D,isCategorical:p,layout:u})))},{})},Tct=function(t,n){var r=n.graphicalItems,o=n.Axis,i=n.axisType,a=n.axisIdKey,s=n.stackGroups,l=n.dataStartIndex,c=n.dataEndIndex,u=t.layout,d=t.children,f=sM(t.data,{graphicalItems:r,dataStartIndex:l,dataEndIndex:c}),p=f.length,h=wae(u,i),m=-1;return r.reduce(function(y,w){var x=w.type.defaultProps!==void 0?Be(Be({},w.type.defaultProps),w.props):w.props,C=x[a],E=Gse("number");if(!y[C]){m++;var P;return h?P=KI(0,p):s&&s[C]&&s[C].hasStack?(P=Pae(s[C].stackGroups,l,c),P=rF(d,P,C,i)):(P=yL(E,bae(f,r.filter(function(T){var I,A,k=a in T.props?T.props[a]:(I=T.type.defaultProps)===null||I===void 0?void 0:I[a],O="hide"in T.props?T.props.hide:(A=T.type.defaultProps)===null||A===void 0?void 0:A.hide;return k===C&&!O}),"number",u),o.defaultProps.allowDataOverflow),P=rF(d,P,C,i)),Be(Be({},y),{},Zt({},C,Be(Be({axisType:i},o.defaultProps),{},{hide:!0,orientation:ys(xct,"".concat(i,".").concat(m%2),null),domain:P,originalDomain:E,isCategorical:h,layout:u})))}return y},{})},Ict=function(t,n){var r=n.axisType,o=r===void 0?"xAxis":r,i=n.AxisComp,a=n.graphicalItems,s=n.stackGroups,l=n.dataStartIndex,c=n.dataEndIndex,u=t.children,d="".concat(o,"Id"),f=sa(u,i),p={};return f&&f.length?p=Pct(t,{axes:f,graphicalItems:a,axisType:o,axisIdKey:d,stackGroups:s,dataStartIndex:l,dataEndIndex:c}):a&&a.length&&(p=Tct(t,{Axis:i,graphicalItems:a,axisType:o,axisIdKey:d,stackGroups:s,dataStartIndex:l,dataEndIndex:c})),p},Oct=function(t){var n=vf(t),r=od(n,!1,!0);return{tooltipTicks:r,orderedTooltipTicks:qz(r,function(o){return o.coordinate}),tooltipAxis:n,tooltipAxisBandSize:_I(n,r)}},A7=function(t){var n=t.children,r=t.defaultShowTooltip,o=ts(n,Uv),i=0,a=0;return t.data&&t.data.length!==0&&(a=t.data.length-1),o&&o.props&&(o.props.startIndex>=0&&(i=o.props.startIndex),o.props.endIndex>=0&&(a=o.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:i,dataEndIndex:a,activeTooltipIndex:-1,isTooltipActive:!!r}},Act=function(t){return!t||!t.length?!1:t.some(function(n){var r=ld(n&&n.type);return r&&r.indexOf("Bar")>=0})},k7=function(t){return t==="horizontal"?{numericAxisName:"yAxis",cateAxisName:"xAxis"}:t==="vertical"?{numericAxisName:"xAxis",cateAxisName:"yAxis"}:t==="centric"?{numericAxisName:"radiusAxis",cateAxisName:"angleAxis"}:{numericAxisName:"angleAxis",cateAxisName:"radiusAxis"}},kct=function(t,n){var r=t.props,o=t.graphicalItems,i=t.xAxisMap,a=i===void 0?{}:i,s=t.yAxisMap,l=s===void 0?{}:s,c=r.width,u=r.height,d=r.children,f=r.margin||{},p=ts(d,Uv),h=ts(d,cd),m=Object.keys(l).reduce(function(P,T){var I=l[T],A=I.orientation;return!I.mirror&&!I.hide?Be(Be({},P),{},Zt({},A,P[A]+I.width)):P},{left:f.left||0,right:f.right||0}),y=Object.keys(a).reduce(function(P,T){var I=a[T],A=I.orientation;return!I.mirror&&!I.hide?Be(Be({},P),{},Zt({},A,ys(P,"".concat(A))+I.height)):P},{top:f.top||0,bottom:f.bottom||0}),w=Be(Be({},y),m),x=w.bottom;p&&(w.bottom+=p.props.height||Uv.defaultProps.height),h&&n&&(w=RZe(w,o,r,n));var C=c-w.left-w.right,E=u-w.top-w.bottom;return Be(Be({brushBottom:x},w),{},{width:Math.max(C,0),height:Math.max(E,0)})},Mct=function(t,n){if(n==="xAxis")return t[n].width;if(n==="yAxis")return t[n].height},e1=function(t){var n=t.chartName,r=t.GraphicalChild,o=t.defaultTooltipEventType,i=o===void 0?"axis":o,a=t.validateTooltipEventTypes,s=a===void 0?["axis"]:a,l=t.axisComponents,c=t.legendContent,u=t.formatAxisMap,d=t.defaultProps,f=function(w,x){var C=x.graphicalItems,E=x.stackGroups,P=x.offset,T=x.updateId,I=x.dataStartIndex,A=x.dataEndIndex,k=w.barSize,O=w.layout,$=w.barGap,N=w.barCategoryGap,L=w.maxBarSize,j=k7(O),D=j.numericAxisName,_=j.cateAxisName,z=Act(C),F=[];return C.forEach(function(V,U){var q=sM(w.data,{graphicalItems:[V],dataStartIndex:I,dataEndIndex:A}),X=V.type.defaultProps!==void 0?Be(Be({},V.type.defaultProps),V.props):V.props,ie=X.dataKey,ee=X.maxBarSize,Q=X["".concat(D,"Id")],te=X["".concat(_,"Id")],pe={},ae=l.reduce(function(_e,ye){var Pe=x["".concat(ye.axisType,"Map")],Ae=X["".concat(ye.axisType,"Id")];Pe&&Pe[Ae]||ye.axisType==="zAxis"||cp();var Me=Pe[Ae];return Be(Be({},_e),{},Zt(Zt({},ye.axisType,Me),"".concat(ye.axisType,"Ticks"),od(Me)))},pe),se=ae[_],re=ae["".concat(_,"Ticks")],fe=E&&E[Q]&&E[Q].hasStack&&HZe(V,E[Q].stackGroups),Z=ld(V.type).indexOf("Bar")>=0,ce=_I(se,re),ge=[],we=z&&kZe({barSize:k,stackGroups:E,totalSize:Mct(ae,_)});if(Z){var me,Se,xe=Kt(ee)?L:ee,ke=(me=(Se=_I(se,re,!0))!==null&&Se!==void 0?Se:xe)!==null&&me!==void 0?me:0;ge=MZe({barGap:$,barCategoryGap:N,bandSize:ke!==ce?ke:ce,sizeList:we[te],maxBarSize:xe}),ke!==ce&&(ge=ge.map(function(_e){return Be(Be({},_e),{},{position:Be(Be({},_e.position),{},{offset:_e.position.offset-ke/2})})}))}var De=V&&V.type&&V.type.getComposedData;De&&F.push({props:Be(Be({},De(Be(Be({},ae),{},{displayedData:q,props:w,dataKey:ie,item:V,bandSize:ce,barPosition:ge,offset:P,stackedData:fe,layout:O,dataStartIndex:I,dataEndIndex:A}))),{},Zt(Zt(Zt({key:V.key||"item-".concat(U)},D,ae[D]),_,ae[_]),"animationId",T)),childIndex:MUe(V,w.children),item:V})}),F},p=function(w,x){var C=w.props,E=w.dataStartIndex,P=w.dataEndIndex,T=w.updateId;if(!BG({props:C}))return null;var I=C.children,A=C.layout,k=C.stackOffset,O=C.data,$=C.reverseStackOrder,N=k7(A),L=N.numericAxisName,j=N.cateAxisName,D=sa(I,r),_=zZe(O,D,"".concat(L,"Id"),"".concat(j,"Id"),k,$),z=l.reduce(function(X,ie){var ee="".concat(ie.axisType,"Map");return Be(Be({},X),{},Zt({},ee,Ict(C,Be(Be({},ie),{},{graphicalItems:D,stackGroups:ie.axisType===L&&_,dataStartIndex:E,dataEndIndex:P}))))},{}),F=kct(Be(Be({},z),{},{props:C,graphicalItems:D}),x==null?void 0:x.legendBBox);Object.keys(z).forEach(function(X){z[X]=u(C,z[X],F,X.replace("Map",""),n)});var V=z["".concat(j,"Map")],U=Oct(V),q=f(C,Be(Be({},z),{},{dataStartIndex:E,dataEndIndex:P,updateId:T,graphicalItems:D,stackGroups:_,offset:F}));return Be(Be({formattedGraphicalItems:q,graphicalItems:D,offset:F,stackGroups:_},U),z)},h=function(y){function w(x){var C,E,P;return uct(this,w),P=pct(this,w,[x]),Zt(P,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),Zt(P,"accessibilityManager",new Qlt),Zt(P,"handleLegendBBoxUpdate",function(T){if(T){var I=P.state,A=I.dataStartIndex,k=I.dataEndIndex,O=I.updateId;P.setState(Be({legendBBox:T},p({props:P.props,dataStartIndex:A,dataEndIndex:k,updateId:O},Be(Be({},P.state),{},{legendBBox:T}))))}}),Zt(P,"handleReceiveSyncEvent",function(T,I,A){if(P.props.syncId===T){if(A===P.eventEmitterSymbol&&typeof P.props.syncMethod!="function")return;P.applySyncEvent(I)}}),Zt(P,"handleBrushChange",function(T){var I=T.startIndex,A=T.endIndex;if(I!==P.state.dataStartIndex||A!==P.state.dataEndIndex){var k=P.state.updateId;P.setState(function(){return Be({dataStartIndex:I,dataEndIndex:A},p({props:P.props,dataStartIndex:I,dataEndIndex:A,updateId:k},P.state))}),P.triggerSyncEvent({dataStartIndex:I,dataEndIndex:A})}}),Zt(P,"handleMouseEnter",function(T){var I=P.getMouseInfo(T);if(I){var A=Be(Be({},I),{},{isTooltipActive:!0});P.setState(A),P.triggerSyncEvent(A);var k=P.props.onMouseEnter;Jt(k)&&k(A,T)}}),Zt(P,"triggeredAfterMouseMove",function(T){var I=P.getMouseInfo(T),A=I?Be(Be({},I),{},{isTooltipActive:!0}):{isTooltipActive:!1};P.setState(A),P.triggerSyncEvent(A);var k=P.props.onMouseMove;Jt(k)&&k(A,T)}),Zt(P,"handleItemMouseEnter",function(T){P.setState(function(){return{isTooltipActive:!0,activeItem:T,activePayload:T.tooltipPayload,activeCoordinate:T.tooltipPosition||{x:T.cx,y:T.cy}}})}),Zt(P,"handleItemMouseLeave",function(){P.setState(function(){return{isTooltipActive:!1}})}),Zt(P,"handleMouseMove",function(T){T.persist(),P.throttleTriggeredAfterMouseMove(T)}),Zt(P,"handleMouseLeave",function(T){P.throttleTriggeredAfterMouseMove.cancel();var I={isTooltipActive:!1};P.setState(I),P.triggerSyncEvent(I);var A=P.props.onMouseLeave;Jt(A)&&A(I,T)}),Zt(P,"handleOuterEvent",function(T){var I=kUe(T),A=ys(P.props,"".concat(I));if(I&&Jt(A)){var k,O;/.*touch.*/i.test(I)?O=P.getMouseInfo(T.changedTouches[0]):O=P.getMouseInfo(T),A((k=O)!==null&&k!==void 0?k:{},T)}}),Zt(P,"handleClick",function(T){var I=P.getMouseInfo(T);if(I){var A=Be(Be({},I),{},{isTooltipActive:!0});P.setState(A),P.triggerSyncEvent(A);var k=P.props.onClick;Jt(k)&&k(A,T)}}),Zt(P,"handleMouseDown",function(T){var I=P.props.onMouseDown;if(Jt(I)){var A=P.getMouseInfo(T);I(A,T)}}),Zt(P,"handleMouseUp",function(T){var I=P.props.onMouseUp;if(Jt(I)){var A=P.getMouseInfo(T);I(A,T)}}),Zt(P,"handleTouchMove",function(T){T.changedTouches!=null&&T.changedTouches.length>0&&P.throttleTriggeredAfterMouseMove(T.changedTouches[0])}),Zt(P,"handleTouchStart",function(T){T.changedTouches!=null&&T.changedTouches.length>0&&P.handleMouseDown(T.changedTouches[0])}),Zt(P,"handleTouchEnd",function(T){T.changedTouches!=null&&T.changedTouches.length>0&&P.handleMouseUp(T.changedTouches[0])}),Zt(P,"triggerSyncEvent",function(T){P.props.syncId!==void 0&&jD.emit(BD,P.props.syncId,T,P.eventEmitterSymbol)}),Zt(P,"applySyncEvent",function(T){var I=P.props,A=I.layout,k=I.syncMethod,O=P.state.updateId,$=T.dataStartIndex,N=T.dataEndIndex;if(T.dataStartIndex!==void 0||T.dataEndIndex!==void 0)P.setState(Be({dataStartIndex:$,dataEndIndex:N},p({props:P.props,dataStartIndex:$,dataEndIndex:N,updateId:O},P.state)));else if(T.activeTooltipIndex!==void 0){var L=T.chartX,j=T.chartY,D=T.activeTooltipIndex,_=P.state,z=_.offset,F=_.tooltipTicks;if(!z)return;if(typeof k=="function")D=k(F,T);else if(k==="value"){D=-1;for(var V=0;V=0){var fe,Z;if(L.dataKey&&!L.allowDuplicatedCategory){var ce=typeof L.dataKey=="function"?re:"payload.".concat(L.dataKey.toString());fe=sI(V,ce,D),Z=U&&q&&sI(q,ce,D)}else fe=V==null?void 0:V[j],Z=U&&q&&q[j];if(te||Q){var ge=T.props.activeIndex!==void 0?T.props.activeIndex:j;return[v.cloneElement(T,Be(Be(Be({},k.props),ae),{},{activeIndex:ge})),null,null]}if(!Kt(fe))return[se].concat(rb(P.renderActivePoints({item:k,activePoint:fe,basePoint:Z,childIndex:j,isRange:U})))}else{var we,me=(we=P.getItemByXY(P.state.activeCoordinate))!==null&&we!==void 0?we:{graphicalItem:se},Se=me.graphicalItem,xe=Se.item,ke=xe===void 0?T:xe,De=Se.childIndex,_e=Be(Be(Be({},k.props),ae),{},{activeIndex:De});return[v.cloneElement(ke,_e),null,null]}return U?[se,null,null]:[se,null]}),Zt(P,"renderCustomized",function(T,I,A){return v.cloneElement(T,Be(Be({key:"recharts-customized-".concat(A)},P.props),P.state))}),Zt(P,"renderMap",{CartesianGrid:{handler:aP,once:!0},ReferenceArea:{handler:P.renderReferenceElement},ReferenceLine:{handler:aP},ReferenceDot:{handler:P.renderReferenceElement},XAxis:{handler:aP},YAxis:{handler:aP},Brush:{handler:P.renderBrush,once:!0},Bar:{handler:P.renderGraphicChild},Line:{handler:P.renderGraphicChild},Area:{handler:P.renderGraphicChild},Radar:{handler:P.renderGraphicChild},RadialBar:{handler:P.renderGraphicChild},Scatter:{handler:P.renderGraphicChild},Pie:{handler:P.renderGraphicChild},Funnel:{handler:P.renderGraphicChild},Tooltip:{handler:P.renderCursor,once:!0},PolarGrid:{handler:P.renderPolarGrid,once:!0},PolarAngleAxis:{handler:P.renderPolarAxis},PolarRadiusAxis:{handler:P.renderPolarAxis},Customized:{handler:P.renderCustomized}}),P.clipPathId="".concat((C=x.id)!==null&&C!==void 0?C:kp("recharts"),"-clip"),P.throttleTriggeredAfterMouseMove=Fk(P.triggeredAfterMouseMove,(E=x.throttleDelay)!==null&&E!==void 0?E:1e3/60),P.state={},P}return mct(w,y),fct(w,[{key:"componentDidMount",value:function(){var C,E;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(C=this.props.margin.left)!==null&&C!==void 0?C:0,top:(E=this.props.margin.top)!==null&&E!==void 0?E:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var C=this.props,E=C.children,P=C.data,T=C.height,I=C.layout,A=ts(E,is);if(A){var k=A.props.defaultIndex;if(!(typeof k!="number"||k<0||k>this.state.tooltipTicks.length-1)){var O=this.state.tooltipTicks[k]&&this.state.tooltipTicks[k].value,$=aF(this.state,P,k,O),N=this.state.tooltipTicks[k].coordinate,L=(this.state.offset.top+T)/2,j=I==="horizontal",D=j?{x:N,y:L}:{y:N,x:L},_=this.state.formattedGraphicalItems.find(function(F){var V=F.item;return V.type.name==="Scatter"});_&&(D=Be(Be({},D),_.props.points[k].tooltipPosition),$=_.props.points[k].tooltipPayload);var z={activeTooltipIndex:k,isTooltipActive:!0,activeLabel:O,activePayload:$,activeCoordinate:D};this.setState(z),this.renderCursor(A),this.accessibilityManager.setIndex(k)}}}},{key:"getSnapshotBeforeUpdate",value:function(C,E){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==E.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==C.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==C.margin){var P,T;this.accessibilityManager.setDetails({offset:{left:(P=this.props.margin.left)!==null&&P!==void 0?P:0,top:(T=this.props.margin.top)!==null&&T!==void 0?T:0}})}return null}},{key:"componentDidUpdate",value:function(C){RN([ts(C.children,is)],[ts(this.props.children,is)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var C=ts(this.props.children,is);if(C&&typeof C.props.shared=="boolean"){var E=C.props.shared?"axis":"item";return s.indexOf(E)>=0?E:i}return i}},{key:"getMouseInfo",value:function(C){if(!this.container)return null;var E=this.container,P=E.getBoundingClientRect(),T=rYe(P),I={chartX:Math.round(C.pageX-T.left),chartY:Math.round(C.pageY-T.top)},A=P.width/E.offsetWidth||1,k=this.inRange(I.chartX,I.chartY,A);if(!k)return null;var O=this.state,$=O.xAxisMap,N=O.yAxisMap,L=this.getTooltipEventType();if(L!=="axis"&&$&&N){var j=vf($).scale,D=vf(N).scale,_=j&&j.invert?j.invert(I.chartX):null,z=D&&D.invert?D.invert(I.chartY):null;return Be(Be({},I),{},{xValue:_,yValue:z})}var F=O7(this.state,this.props.data,this.props.layout,k);return F?Be(Be({},I),F):null}},{key:"inRange",value:function(C,E){var P=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,T=this.props.layout,I=C/P,A=E/P;if(T==="horizontal"||T==="vertical"){var k=this.state.offset,O=I>=k.left&&I<=k.left+k.width&&A>=k.top&&A<=k.top+k.height;return O?{x:I,y:A}:null}var $=this.state,N=$.angleAxisMap,L=$.radiusAxisMap;if(N&&L){var j=vf(N);return Y9({x:I,y:A},j)}return null}},{key:"parseEventsOfWrapper",value:function(){var C=this.props.children,E=this.getTooltipEventType(),P=ts(C,is),T={};P&&E==="axis"&&(P.props.trigger==="click"?T={onClick:this.handleClick}:T={onMouseEnter:this.handleMouseEnter,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd});var I=lI(this.props,this.handleOuterEvent);return Be(Be({},I),T)}},{key:"addListener",value:function(){jD.on(BD,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){jD.removeListener(BD,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(C,E,P){for(var T=this.state.formattedGraphicalItems,I=0,A=T.length;I{const t=e.planned.energy>0?e.logged.energy/e.planned.energy*100:100,n=e.planned.energy>0?e.planned.energy-e.logged.energy:e.logged.energy,r=Ro(),[o,i]=Le(),a=[{name:"",value:t},{name:"",value:t<100?100-t:0}],s=[r.palette.primary.main,"#C5C5C5"];return K(Wt,{direction:"row",children:[b(Mp,{width:"50%",height:140,children:K(Yse,{children:[b(Tu,{height:100,data:a,startAngle:200,endAngle:-20,innerRadius:60,outerRadius:70,paddingAngle:2,dataKey:"value",children:a.map((l,c)=>b(Ub,{fill:s[c%s.length]},`cell-${c}`))}),K("g",{children:[b("text",{x:"50%",y:"45%",fontSize:"1.25em",textAnchor:"middle",children:o("nutrition.valueEnergyKcal",{value:Mi(n,i.language)})}),b("text",{x:"50%",y:"60%",fontSize:"1em",textAnchor:"middle",children:e.planned.energy>0&&o(t<100?"nutrition.valueRemaining":"nutrition.valueTooMany")})]})]})}),K(Wt,{width:"50%",spacing:1,children:[b(zy,{title:o("nutrition.protein"),percentage:e.percentage.protein,logged:e.logged.protein,planned:e.planned.protein}),b(zy,{title:o("nutrition.carbohydrates"),percentage:e.percentage.carbohydrates,logged:e.logged.carbohydrates,planned:e.planned.carbohydrates}),b(zy,{title:o("nutrition.fat"),percentage:e.percentage.fat,logged:e.logged.fat,planned:e.planned.fat})]})]})};function ue(){return ue=Object.assign?Object.assign.bind():function(e){for(var t=1;tn.searchParams.append("args[]",r)),`Minified MUI error #${e}; visit ${n} for the full message.`}const Jb=B.oneOfType([B.func,B.object]);function Nct(e){if(typeof e!="string")throw new Error(_ct(7));return e.charAt(0).toUpperCase()+e.slice(1)}function VD(e){return e&&e.ownerDocument||document}function Lct(e,t){typeof e=="function"?e(t):e&&(e.current=t)}const bu=typeof window<"u"?v.useLayoutEffect:v.useEffect;let M7=0;function Fct(e){const[t,n]=v.useState(e),r=e||t;return v.useEffect(()=>{t==null&&(M7+=1,n(`mui-${M7}`))},[t]),r}const jct={...yd},R7=jct.useId;function Zb(e){if(R7!==void 0){const t=R7();return e??t}return Fct(e)}function wg({controlled:e,default:t,name:n,state:r="value"}){const{current:o}=v.useRef(e!==void 0),[i,a]=v.useState(t),s=o?e:i,l=v.useCallback(c=>{o||a(c)},[]);return[s,l]}function kt(e){const t=v.useRef(e);return bu(()=>{t.current=e}),v.useRef((...n)=>(0,t.current)(...n)).current}function ca(...e){return v.useMemo(()=>e.every(t=>t==null)?null:t=>{e.forEach(n=>{Lct(n,t)})},e)}const Bct={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px"};function zn(e,t,n=void 0){const r={};for(const o in e){const i=e[o];let a="",s=!0;for(let l=0;le,zct=()=>{let e=$7;return{configure(t){e=t},generate(t){return e(t)},reset(){e=$7}}},Vct=zct(),Hct={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function Wn(e,t,n="Mui"){const r=Hct[t];return r?`${n}-${r}`:`${Vct.generate(e)}-${t}`}function Xn(e,t,n="Mui"){const r={};return t.forEach(o=>{r[o]=Wn(e,o,n)}),r}function Uct(e){return typeof e=="string"}function Wct(e,t,n){return e===void 0||Uct(e)?t:{...t,ownerState:{...t.ownerState,...n}}}function Gct(e,t=[]){if(e===void 0)return{};const n={};return Object.keys(e).filter(r=>r.match(/^on[A-Z]/)&&typeof e[r]=="function"&&!t.includes(r)).forEach(r=>{n[r]=e[r]}),n}function D7(e){if(e===void 0)return{};const t={};return Object.keys(e).filter(n=>!(n.match(/^on[A-Z]/)&&typeof e[n]=="function")).forEach(n=>{t[n]=e[n]}),t}function qct(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:o,className:i}=e;if(!t){const p=de(n==null?void 0:n.className,i,o==null?void 0:o.className,r==null?void 0:r.className),h={...n==null?void 0:n.style,...o==null?void 0:o.style,...r==null?void 0:r.style},m={...n,...o,...r};return p.length>0&&(m.className=p),Object.keys(h).length>0&&(m.style=h),{props:m,internalRef:void 0}}const a=Gct({...o,...r}),s=D7(r),l=D7(o),c=t(a),u=de(c==null?void 0:c.className,n==null?void 0:n.className,i,o==null?void 0:o.className,r==null?void 0:r.className),d={...c==null?void 0:c.style,...n==null?void 0:n.style,...o==null?void 0:o.style,...r==null?void 0:r.style},f={...c,...n,...l,...s};return u.length>0&&(f.className=u),Object.keys(d).length>0&&(f.style=d),{props:f,internalRef:c.ref}}function up(e,t,n){return typeof e=="function"?e(t,n):e}function Yn(e){var d;const{elementType:t,externalSlotProps:n,ownerState:r,skipResolvingSlotProps:o=!1,...i}=e,a=o?{}:up(n,r),{props:s,internalRef:l}=qct({...i,externalSlotProps:a}),c=ca(l,a==null?void 0:a.ref,(d=e.additionalProps)==null?void 0:d.ref);return Wct(t,{...s,ref:c},r)}const Kct=["localeText"],sF=v.createContext(null),xg=function(t){const{localeText:n}=t,r=Vt(t,Kct),{utils:o,localeText:i}=v.useContext(sF)??{utils:void 0,localeText:void 0},a=cn({props:r,name:"MuiLocalizationProvider"}),{children:s,dateAdapter:l,dateFormats:c,dateLibInstance:u,adapterLocale:d,localeText:f}=a,p=v.useMemo(()=>ue({},f,i,n),[f,i,n]),h=v.useMemo(()=>{if(!l)return o||null;const w=new l({locale:d,formats:c,instance:u});if(!w.isMUIAdapter)throw new Error(["MUI X: The date adapter should be imported from `@mui/x-date-pickers` or `@mui/x-date-pickers-pro`, not from `@date-io`","For example, `import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs'` instead of `import AdapterDayjs from '@date-io/dayjs'`","More information on the installation documentation: https://mui.com/x/react-date-pickers/getting-started/#installation"].join(` -`));return w},[l,d,c,u,o]),m=v.useMemo(()=>h?{minDate:h.date("1900-01-01T00:00:00.000"),maxDate:h.date("2099-12-31T00:00:00.000")}:null,[h]),y=v.useMemo(()=>({utils:h,defaultDates:m,localeText:p}),[m,h,p]);return R.jsx(sF.Provider,{value:y,children:s})},Yct=e=>({components:{MuiLocalizationProvider:{defaultProps:{localeText:ue({},e)}}}}),e0=e=>{const{utils:t,formatKey:n,contextTranslation:r,propsTranslation:o}=e;return i=>{const a=i!==null&&t.isValid(i)?t.format(i,n):null;return(o??r)(i,t,a)}},Qse={previousMonth:"Previous month",nextMonth:"Next month",openPreviousView:"Open previous view",openNextView:"Open next view",calendarViewSwitchingButtonAriaLabel:e=>e==="year"?"year view is open, switch to calendar view":"calendar view is open, switch to year view",start:"Start",end:"End",startDate:"Start date",startTime:"Start time",endDate:"End date",endTime:"End time",cancelButtonLabel:"Cancel",clearButtonLabel:"Clear",okButtonLabel:"OK",todayButtonLabel:"Today",datePickerToolbarTitle:"Select date",dateTimePickerToolbarTitle:"Select date & time",timePickerToolbarTitle:"Select time",dateRangePickerToolbarTitle:"Select date range",clockLabelText:(e,t,n,r)=>`Select ${e}. ${!r&&(t===null||!n.isValid(t))?"No time selected":`Selected time is ${r??n.format(t,"fullTime")}`}`,hoursClockNumberText:e=>`${e} hours`,minutesClockNumberText:e=>`${e} minutes`,secondsClockNumberText:e=>`${e} seconds`,selectViewText:e=>`Select ${e}`,calendarWeekNumberHeaderLabel:"Week number",calendarWeekNumberHeaderText:"#",calendarWeekNumberAriaLabelText:e=>`Week ${e}`,calendarWeekNumberText:e=>`${e}`,openDatePickerDialogue:(e,t,n)=>n||e!==null&&t.isValid(e)?`Choose date, selected date is ${n??t.format(e,"fullDate")}`:"Choose date",openTimePickerDialogue:(e,t,n)=>n||e!==null&&t.isValid(e)?`Choose time, selected time is ${n??t.format(e,"fullTime")}`:"Choose time",fieldClearLabel:"Clear",timeTableLabel:"pick time",dateTableLabel:"pick date",fieldYearPlaceholder:e=>"Y".repeat(e.digitAmount),fieldMonthPlaceholder:e=>e.contentType==="letter"?"MMMM":"MM",fieldDayPlaceholder:()=>"DD",fieldWeekDayPlaceholder:e=>e.contentType==="letter"?"EEEE":"EE",fieldHoursPlaceholder:()=>"hh",fieldMinutesPlaceholder:()=>"mm",fieldSecondsPlaceholder:()=>"ss",fieldMeridiemPlaceholder:()=>"aa",year:"Year",month:"Month",day:"Day",weekDay:"Week day",hours:"Hours",minutes:"Minutes",seconds:"Seconds",meridiem:"Meridiem",empty:"Empty"},Qct=Qse;Yct(Qse);const zg=()=>{const e=v.useContext(sF);if(e===null)throw new Error(["MUI X: Can not find the date and time pickers localization context.","It looks like you forgot to wrap your component in LocalizationProvider.","This can also happen if you are bundling multiple versions of the `@mui/x-date-pickers` package"].join(` + A `).concat(h,",").concat(h,",0,0,").concat(c,",").concat(t,",").concat(n+o-s*h," Z")}else u="M ".concat(t,",").concat(n," h ").concat(r," v ").concat(o," h ").concat(-r," Z");return u},trt=function(t,n){if(!t||!n)return!1;var r=t.x,o=t.y,i=n.x,a=n.y,s=n.width,l=n.height;if(Math.abs(s)>0&&Math.abs(l)>0){var c=Math.min(i,i+s),u=Math.max(i,i+s),d=Math.min(a,a+l),f=Math.max(a,a+l);return r>=c&&r<=u&&o>=d&&o<=f}return!1},nrt={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},EV=function(t){var n=kq(kq({},nrt),t),r=v.useRef(),o=v.useState(-1),i=qnt(o,2),a=i[0],s=i[1];v.useEffect(function(){if(r.current&&r.current.getTotalLength)try{var E=r.current.getTotalLength();E&&s(E)}catch{}},[]);var l=n.x,c=n.y,u=n.width,d=n.height,f=n.radius,p=n.className,h=n.animationEasing,m=n.animationDuration,y=n.animationBegin,w=n.isAnimationActive,x=n.isUpdateAnimationActive;if(l!==+l||c!==+c||u!==+u||d!==+d||u===0||d===0)return null;var S=de("recharts-rectangle",p);return x?Y.createElement(Nl,{canBegin:a>0,from:{width:u,height:d,x:l,y:c},to:{width:u,height:d,x:l,y:c},duration:m,animationEasing:h,isActive:x},function(E){var P=E.width,T=E.height,I=E.x,A=E.y;return Y.createElement(Nl,{canBegin:a>0,from:"0px ".concat(a===-1?1:a,"px"),to:"".concat(a,"px 0px"),attributeName:"strokeDasharray",begin:y,duration:m,isActive:w,easing:h},Y.createElement("path",ZI({},_t(n,!0),{className:S,d:Mq(I,A,P,T,f),ref:r})))}):Y.createElement("path",ZI({},_t(n,!0),{className:S,d:Mq(l,c,u,d,f)}))},rrt=["points","className","baseLinePoints","connectNulls"];function wy(){return wy=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function irt(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Rq(e){return crt(e)||lrt(e)||srt(e)||art()}function art(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function srt(e,t){if(e){if(typeof e=="string")return NL(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return NL(e,t)}}function lrt(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function crt(e){if(Array.isArray(e))return NL(e)}function NL(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&arguments[0]!==void 0?arguments[0]:[],n=[[]];return t.forEach(function(r){$q(r)?n[n.length-1].push(r):n[n.length-1].length>0&&n.push([])}),$q(t[0])&&n[n.length-1].push(t[0]),n[n.length-1].length<=0&&(n=n.slice(0,-1)),n},wx=function(t,n){var r=urt(t);n&&(r=[r.reduce(function(i,a){return[].concat(Rq(i),Rq(a))},[])]);var o=r.map(function(i){return i.reduce(function(a,s,l){return"".concat(a).concat(l===0?"M":"L").concat(s.x,",").concat(s.y)},"")}).join("");return r.length===1?"".concat(o,"Z"):o},drt=function(t,n,r){var o=wx(t,r);return"".concat(o.slice(-1)==="Z"?o.slice(0,-1):o,"L").concat(wx(n.reverse(),r).slice(1))},frt=function(t){var n=t.points,r=t.className,o=t.baseLinePoints,i=t.connectNulls,a=ort(t,rrt);if(!n||!n.length)return null;var s=de("recharts-polygon",r);if(o&&o.length){var l=a.stroke&&a.stroke!=="none",c=drt(n,o,i);return Y.createElement("g",{className:s},Y.createElement("path",wy({},_t(a,!0),{fill:c.slice(-1)==="Z"?a.fill:"none",stroke:"none",d:c})),l?Y.createElement("path",wy({},_t(a,!0),{fill:"none",d:wx(n,i)})):null,l?Y.createElement("path",wy({},_t(a,!0),{fill:"none",d:wx(o,i)})):null)}var u=wx(n,i);return Y.createElement("path",wy({},_t(a,!0),{fill:u.slice(-1)==="Z"?a.fill:"none",className:s,d:u}))};function LL(){return LL=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function brt(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var wrt=function(t,n,r,o,i,a){return"M".concat(t,",").concat(i,"v").concat(o,"M").concat(a,",").concat(n,"h").concat(r)},xrt=function(t){var n=t.x,r=n===void 0?0:n,o=t.y,i=o===void 0?0:o,a=t.top,s=a===void 0?0:a,l=t.left,c=l===void 0?0:l,u=t.width,d=u===void 0?0:u,f=t.height,p=f===void 0?0:f,h=t.className,m=vrt(t,prt),y=hrt({x:r,y:i,top:s,left:c,width:d,height:p},m);return!ut(r)||!ut(i)||!ut(d)||!ut(p)||!ut(s)||!ut(c)?null:Y.createElement("path",FL({},_t(y,!0),{className:de("recharts-cross",h),d:wrt(r,i,d,p,s,c)}))},Srt=Zk,Crt=lae,Ert=Tu;function Prt(e,t){return e&&e.length?Srt(e,Ert(t),Crt):void 0}var Trt=Prt;const Irt=Bn(Trt);var Ort=Zk,Art=Tu,krt=cae;function Mrt(e,t){return e&&e.length?Ort(e,Art(t),krt):void 0}var Rrt=Mrt;const $rt=Bn(Rrt);var Drt=["cx","cy","angle","ticks","axisLine"],_rt=["ticks","tick","angle","tickFormatter","stroke"];function Vv(e){"@babel/helpers - typeof";return Vv=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Vv(e)}function xx(){return xx=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Nrt(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Lrt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Lq(e,t){for(var n=0;nBq?a=o==="outer"?"start":"end":i<-Bq?a=o==="outer"?"end":"start":a="middle",a}},{key:"renderAxisLine",value:function(){var r=this.props,o=r.cx,i=r.cy,a=r.radius,s=r.axisLine,l=r.axisLineType,c=uh(uh({},_t(this.props,!1)),{},{fill:"none"},_t(s,!1));if(l==="circle")return Y.createElement(s1,Oh({className:"recharts-polar-angle-axis-line"},c,{cx:o,cy:i,r:a}));var u=this.props.ticks,d=u.map(function(f){return Mr(o,i,a,f.coordinate)});return Y.createElement(frt,Oh({className:"recharts-polar-angle-axis-line"},c,{points:d}))}},{key:"renderTicks",value:function(){var r=this,o=this.props,i=o.ticks,a=o.tick,s=o.tickLine,l=o.tickFormatter,c=o.stroke,u=_t(this.props,!1),d=_t(a,!1),f=uh(uh({},u),{},{fill:"none"},_t(s,!1)),p=i.map(function(h,m){var y=r.getTickLineCoord(h),w=r.getTickTextAnchor(h),x=uh(uh(uh({textAnchor:w},u),{},{stroke:"none",fill:c},d),{},{index:m,payload:h,x:y.x2,y:y.y2});return Y.createElement(pn,Oh({className:de("recharts-polar-angle-axis-tick",Lae(a)),key:"tick-".concat(h.coordinate)},up(r.props,h,m)),s&&Y.createElement("line",Oh({className:"recharts-polar-angle-axis-tick-line"},f,y)),a&&t.renderTickItem(a,x,l?l(h.value,m):h.value))});return Y.createElement(pn,{className:"recharts-polar-angle-axis-ticks"},p)}},{key:"render",value:function(){var r=this.props,o=r.ticks,i=r.radius,a=r.axisLine;return i<=0||!o||!o.length?null:Y.createElement(pn,{className:de("recharts-polar-angle-axis",this.props.className)},a&&this.renderAxisLine(),this.renderTicks())}}],[{key:"renderTickItem",value:function(r,o,i){var a;return Y.isValidElement(r)?a=Y.cloneElement(r,o):Jt(r)?a=r(o):a=Y.createElement(bg,Oh({},o,{className:"recharts-polar-angle-axis-tick-value"}),i),a}}])}(v.PureComponent);iM(aM,"displayName","PolarAngleAxis");iM(aM,"axisType","angleAxis");iM(aM,"defaultProps",{type:"category",angleAxisId:0,scale:"auto",cx:0,cy:0,orientation:"outer",axisLine:!0,tickLine:!0,tickSize:8,tick:!0,hide:!1,allowDuplicatedCategory:!0});var Jrt=iie,Zrt=Jrt(Object.getPrototypeOf,Object),eot=Zrt,tot=$d,not=eot,rot=Dd,oot="[object Object]",iot=Function.prototype,aot=Object.prototype,Zae=iot.toString,sot=aot.hasOwnProperty,lot=Zae.call(Object);function cot(e){if(!rot(e)||tot(e)!=oot)return!1;var t=not(e);if(t===null)return!0;var n=sot.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&Zae.call(n)==lot}var uot=cot;const dot=Bn(uot);var fot=$d,pot=Dd,hot="[object Boolean]";function got(e){return e===!0||e===!1||pot(e)&&fot(e)==hot}var mot=got;const yot=Bn(mot);function _S(e){"@babel/helpers - typeof";return _S=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_S(e)}function nO(){return nO=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n0,from:{upperWidth:0,lowerWidth:0,height:f,x:l,y:c},to:{upperWidth:u,lowerWidth:d,height:f,x:l,y:c},duration:m,animationEasing:h,isActive:w},function(S){var E=S.upperWidth,P=S.lowerWidth,T=S.height,I=S.x,A=S.y;return Y.createElement(Nl,{canBegin:a>0,from:"0px ".concat(a===-1?1:a,"px"),to:"".concat(a,"px 0px"),attributeName:"strokeDasharray",begin:y,duration:m,easing:h},Y.createElement("path",nO({},_t(n,!0),{className:x,d:Uq(I,A,E,P,T),ref:r})))}):Y.createElement("g",null,Y.createElement("path",nO({},_t(n,!0),{className:x,d:Uq(l,c,u,d,f)})))},Oot=["option","shapeType","propTransformer","activeClassName","isActive"];function NS(e){"@babel/helpers - typeof";return NS=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},NS(e)}function Aot(e,t){if(e==null)return{};var n=kot(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function kot(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Wq(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function rO(e){for(var t=1;t0?bs(S,"paddingAngle",0):0;if(P){var I=Jr(P.endAngle-P.startAngle,S.endAngle-S.startAngle),A=Ir(Ir({},S),{},{startAngle:x+T,endAngle:x+I(m)+T});y.push(A),x=A.endAngle}else{var k=S.endAngle,O=S.startAngle,$=Jr(0,k-O),N=$(m),L=Ir(Ir({},S),{},{startAngle:x+T,endAngle:x+N+T});y.push(L),x=L.endAngle}}),Y.createElement(pn,null,r.renderSectorsStatically(y))})}},{key:"attachKeyboardHandlers",value:function(r){var o=this;r.onkeydown=function(i){if(!i.altKey)switch(i.key){case"ArrowLeft":{var a=++o.state.sectorToFocus%o.sectorRefs.length;o.sectorRefs[a].focus(),o.setState({sectorToFocus:a});break}case"ArrowRight":{var s=--o.state.sectorToFocus<0?o.sectorRefs.length-1:o.state.sectorToFocus%o.sectorRefs.length;o.sectorRefs[s].focus(),o.setState({sectorToFocus:s});break}case"Escape":{o.sectorRefs[o.state.sectorToFocus].blur(),o.setState({sectorToFocus:0});break}}}}},{key:"renderSectors",value:function(){var r=this.props,o=r.sectors,i=r.isAnimationActive,a=this.state.prevSectors;return i&&o&&o.length&&(!a||!dp(a,o))?this.renderSectorsWithAnimation():this.renderSectorsStatically(o)}},{key:"componentDidMount",value:function(){this.pieRef&&this.attachKeyboardHandlers(this.pieRef)}},{key:"render",value:function(){var r=this,o=this.props,i=o.hide,a=o.sectors,s=o.className,l=o.label,c=o.cx,u=o.cy,d=o.innerRadius,f=o.outerRadius,p=o.isAnimationActive,h=this.state.isAnimationFinished;if(i||!a||!a.length||!ut(c)||!ut(u)||!ut(d)||!ut(f))return null;var m=de("recharts-pie",s);return Y.createElement(pn,{tabIndex:this.props.rootTabIndex,className:m,ref:function(w){r.pieRef=w}},this.renderSectors(),l&&this.renderLabels(a),Zo.renderCallByParent(this.props,null,!1),(!p||h)&&Ec.renderCallByParent(this.props,a,!1))}}],[{key:"getDerivedStateFromProps",value:function(r,o){return o.prevIsAnimationActive!==r.isAnimationActive?{prevIsAnimationActive:r.isAnimationActive,prevAnimationId:r.animationId,curSectors:r.sectors,prevSectors:[],isAnimationFinished:!0}:r.isAnimationActive&&r.animationId!==o.prevAnimationId?{prevAnimationId:r.animationId,curSectors:r.sectors,prevSectors:o.curSectors,isAnimationFinished:!0}:r.sectors!==o.curSectors?{curSectors:r.sectors,isAnimationFinished:!0}:null}},{key:"getTextAnchor",value:function(r,o){return r>o?"start":r=360?x:x-1)*l,E=y-x*p-S,P=o.reduce(function(A,k){var O=jr(k,w,0);return A+(ut(O)?O:0)},0),T;if(P>0){var I;T=o.map(function(A,k){var O=jr(A,w,0),$=jr(A,u,k),N=(ut(O)?O:0)/P,L;k?L=I.endAngle+ta(m)*l*(O!==0?1:0):L=a;var j=L+ta(m)*((O!==0?p:0)+N*E),D=(L+j)/2,_=(h.innerRadius+h.outerRadius)/2,z=[{name:$,value:O,payload:A,dataKey:w,type:f}],F=Mr(h.cx,h.cy,_,D);return I=Ir(Ir(Ir({percent:N,cornerRadius:i,name:$,tooltipPayload:z,midAngle:D,middleRadius:_,tooltipPosition:F},A),h),{},{value:jr(A,w),startAngle:L,endAngle:j,payload:A,paddingAngle:ta(m)*l}),I})}return Ir(Ir({},h),{},{sectors:T,data:o})});var Xot=Math.ceil,Jot=Math.max;function Zot(e,t,n,r){for(var o=-1,i=Jot(Xot((t-e)/(n||1)),0),a=Array(i);i--;)a[r?i:++o]=e,e+=n;return a}var eit=Zot,tit=Eie,Yq=1/0,nit=17976931348623157e292;function rit(e){if(!e)return e===0?e:0;if(e=tit(e),e===Yq||e===-Yq){var t=e<0?-1:1;return t*nit}return e===e?e:0}var nse=rit,oit=eit,iit=Wk,VD=nse;function ait(e){return function(t,n,r){return r&&typeof r!="number"&&iit(t,n,r)&&(n=r=void 0),t=VD(t),n===void 0?(n=t,t=0):n=VD(n),r=r===void 0?t0&&r.handleDrag(o.changedTouches[0])}),Za(r,"handleDragEnd",function(){r.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var o=r.props,i=o.endIndex,a=o.onDragEnd,s=o.startIndex;a==null||a({endIndex:i,startIndex:s})}),r.detachDragEndListener()}),Za(r,"handleLeaveWrapper",function(){(r.state.isTravellerMoving||r.state.isSlideMoving)&&(r.leaveTimer=window.setTimeout(r.handleDragEnd,r.props.leaveTimeOut))}),Za(r,"handleEnterSlideOrTraveller",function(){r.setState({isTextActive:!0})}),Za(r,"handleLeaveSlideOrTraveller",function(){r.setState({isTextActive:!1})}),Za(r,"handleSlideDragStart",function(o){var i=e7(o)?o.changedTouches[0]:o;r.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:i.pageX}),r.attachDragEndListener()}),r.travellerDragStartHandlers={startX:r.handleTravellerDragStart.bind(r,"startX"),endX:r.handleTravellerDragStart.bind(r,"endX")},r.state={},r}return wit(t,e),mit(t,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(r){var o=r.startX,i=r.endX,a=this.state.scaleValues,s=this.props,l=s.gap,c=s.data,u=c.length-1,d=Math.min(o,i),f=Math.max(o,i),p=t.getIndexInRange(a,d),h=t.getIndexInRange(a,f);return{startIndex:p-p%l,endIndex:h===u?u:h-h%l}}},{key:"getTextOfTick",value:function(r){var o=this.props,i=o.data,a=o.tickFormatter,s=o.dataKey,l=jr(i[r],s,r);return Jt(a)?a(l,r):l}},{key:"attachDragEndListener",value:function(){window.addEventListener("mouseup",this.handleDragEnd,!0),window.addEventListener("touchend",this.handleDragEnd,!0),window.addEventListener("mousemove",this.handleDrag,!0)}},{key:"detachDragEndListener",value:function(){window.removeEventListener("mouseup",this.handleDragEnd,!0),window.removeEventListener("touchend",this.handleDragEnd,!0),window.removeEventListener("mousemove",this.handleDrag,!0)}},{key:"handleSlideDrag",value:function(r){var o=this.state,i=o.slideMoveStartX,a=o.startX,s=o.endX,l=this.props,c=l.x,u=l.width,d=l.travellerWidth,f=l.startIndex,p=l.endIndex,h=l.onChange,m=r.pageX-i;m>0?m=Math.min(m,c+u-d-s,c+u-d-a):m<0&&(m=Math.max(m,c-a,c-s));var y=this.getIndex({startX:a+m,endX:s+m});(y.startIndex!==f||y.endIndex!==p)&&h&&h(y),this.setState({startX:a+m,endX:s+m,slideMoveStartX:r.pageX})}},{key:"handleTravellerDragStart",value:function(r,o){var i=e7(o)?o.changedTouches[0]:o;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:r,brushMoveStartX:i.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(r){var o=this.state,i=o.brushMoveStartX,a=o.movingTravellerId,s=o.endX,l=o.startX,c=this.state[a],u=this.props,d=u.x,f=u.width,p=u.travellerWidth,h=u.onChange,m=u.gap,y=u.data,w={startX:this.state.startX,endX:this.state.endX},x=r.pageX-i;x>0?x=Math.min(x,d+f-p-c):x<0&&(x=Math.max(x,d-c)),w[a]=c+x;var S=this.getIndex(w),E=S.startIndex,P=S.endIndex,T=function(){var A=y.length-1;return a==="startX"&&(s>l?E%m===0:P%m===0)||sl?P%m===0:E%m===0)||s>l&&P===A};this.setState(Za(Za({},a,c+x),"brushMoveStartX",r.pageX),function(){h&&T()&&h(S)})}},{key:"handleTravellerMoveKeyboard",value:function(r,o){var i=this,a=this.state,s=a.scaleValues,l=a.startX,c=a.endX,u=this.state[o],d=s.indexOf(u);if(d!==-1){var f=d+r;if(!(f===-1||f>=s.length)){var p=s[f];o==="startX"&&p>=c||o==="endX"&&p<=l||this.setState(Za({},o,p),function(){i.props.onChange(i.getIndex({startX:i.state.startX,endX:i.state.endX}))})}}}},{key:"renderBackground",value:function(){var r=this.props,o=r.x,i=r.y,a=r.width,s=r.height,l=r.fill,c=r.stroke;return Y.createElement("rect",{stroke:c,fill:l,x:o,y:i,width:a,height:s})}},{key:"renderPanorama",value:function(){var r=this.props,o=r.x,i=r.y,a=r.width,s=r.height,l=r.data,c=r.children,u=r.padding,d=v.Children.only(c);return d?Y.cloneElement(d,{x:o,y:i,width:a,height:s,margin:u,compact:!0,data:l}):null}},{key:"renderTravellerLayer",value:function(r,o){var i,a,s=this,l=this.props,c=l.y,u=l.travellerWidth,d=l.height,f=l.traveller,p=l.ariaLabel,h=l.data,m=l.startIndex,y=l.endIndex,w=Math.max(r,this.props.x),x=HD(HD({},_t(this.props,!1)),{},{x:w,y:c,width:u,height:d}),S=p||"Min value: ".concat((i=h[m])===null||i===void 0?void 0:i.name,", Max value: ").concat((a=h[y])===null||a===void 0?void 0:a.name);return Y.createElement(pn,{tabIndex:0,role:"slider","aria-label":S,"aria-valuenow":r,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[o],onTouchStart:this.travellerDragStartHandlers[o],onKeyDown:function(P){["ArrowLeft","ArrowRight"].includes(P.key)&&(P.preventDefault(),P.stopPropagation(),s.handleTravellerMoveKeyboard(P.key==="ArrowRight"?1:-1,o))},onFocus:function(){s.setState({isTravellerFocused:!0})},onBlur:function(){s.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},t.renderTraveller(f,x))}},{key:"renderSlide",value:function(r,o){var i=this.props,a=i.y,s=i.height,l=i.stroke,c=i.travellerWidth,u=Math.min(r,o)+c,d=Math.max(Math.abs(o-r)-c,0);return Y.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:l,fillOpacity:.2,x:u,y:a,width:d,height:s})}},{key:"renderText",value:function(){var r=this.props,o=r.startIndex,i=r.endIndex,a=r.y,s=r.height,l=r.travellerWidth,c=r.stroke,u=this.state,d=u.startX,f=u.endX,p=5,h={pointerEvents:"none",fill:c};return Y.createElement(pn,{className:"recharts-brush-texts"},Y.createElement(bg,sO({textAnchor:"end",verticalAnchor:"middle",x:Math.min(d,f)-p,y:a+s/2},h),this.getTextOfTick(o)),Y.createElement(bg,sO({textAnchor:"start",verticalAnchor:"middle",x:Math.max(d,f)+l+p,y:a+s/2},h),this.getTextOfTick(i)))}},{key:"render",value:function(){var r=this.props,o=r.data,i=r.className,a=r.children,s=r.x,l=r.y,c=r.width,u=r.height,d=r.alwaysShowText,f=this.state,p=f.startX,h=f.endX,m=f.isTextActive,y=f.isSlideMoving,w=f.isTravellerMoving,x=f.isTravellerFocused;if(!o||!o.length||!ut(s)||!ut(l)||!ut(c)||!ut(u)||c<=0||u<=0)return null;var S=de("recharts-brush",i),E=Y.Children.count(a)===1,P=hit("userSelect","none");return Y.createElement(pn,{className:S,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:P},this.renderBackground(),E&&this.renderPanorama(),this.renderSlide(p,h),this.renderTravellerLayer(p,"startX"),this.renderTravellerLayer(h,"endX"),(m||y||w||x||d)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(r){var o=r.x,i=r.y,a=r.width,s=r.height,l=r.stroke,c=Math.floor(i+s/2)-1;return Y.createElement(Y.Fragment,null,Y.createElement("rect",{x:o,y:i,width:a,height:s,fill:l,stroke:"none"}),Y.createElement("line",{x1:o+1,y1:c,x2:o+a-1,y2:c,fill:"none",stroke:"#fff"}),Y.createElement("line",{x1:o+1,y1:c+2,x2:o+a-1,y2:c+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(r,o){var i;return Y.isValidElement(r)?i=Y.cloneElement(r,o):Jt(r)?i=r(o):i=t.renderDefaultTraveller(o),i}},{key:"getDerivedStateFromProps",value:function(r,o){var i=r.data,a=r.width,s=r.x,l=r.travellerWidth,c=r.updateId,u=r.startIndex,d=r.endIndex;if(i!==o.prevData||c!==o.prevUpdateId)return HD({prevData:i,prevTravellerWidth:l,prevUpdateId:c,prevX:s,prevWidth:a},i&&i.length?Sit({data:i,width:a,x:s,travellerWidth:l,startIndex:u,endIndex:d}):{scale:null,scaleValues:null});if(o.scale&&(a!==o.prevWidth||s!==o.prevX||l!==o.prevTravellerWidth)){o.scale.range([s,s+a-l]);var f=o.scale.domain().map(function(p){return o.scale(p)});return{prevData:i,prevTravellerWidth:l,prevUpdateId:c,prevX:s,prevWidth:a,startX:o.scale(r.startIndex),endX:o.scale(r.endIndex),scaleValues:f}}return null}},{key:"getIndexInRange",value:function(r,o){for(var i=r.length,a=0,s=i-1;s-a>1;){var l=Math.floor((a+s)/2);r[l]>o?s=l:a=l}return o>=r[s]?s:a}}])}(v.PureComponent);Za(Gv,"displayName","Brush");Za(Gv,"defaultProps",{height:40,travellerWidth:5,gap:1,fill:"#fff",stroke:"#666",padding:{top:1,right:1,bottom:1,left:1},leaveTimeOut:1e3,alwaysShowText:!1});var Cit=Qz;function Eit(e,t){var n;return Cit(e,function(r,o,i){return n=t(r,o,i),!n}),!!n}var Pit=Eit,Tit=Xoe,Iit=Tu,Oit=Pit,Ait=za,kit=Wk;function Mit(e,t,n){var r=Ait(e)?Tit:Oit;return n&&kit(e,t,n)&&(t=void 0),r(e,Iit(t))}var Rit=Mit;const $it=Bn(Rit);var du=function(t,n){var r=t.alwaysShow,o=t.ifOverflow;return r&&(o="extendDomain"),o===n},t7=bie;function Dit(e,t,n){t=="__proto__"&&t7?t7(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var _it=Dit,Nit=_it,Lit=yie,Fit=Tu;function jit(e,t){var n={};return t=Fit(t),Lit(e,function(r,o,i){Nit(n,o,t(r,o,i))}),n}var Bit=jit;const zit=Bn(Bit);function Vit(e,t){for(var n=-1,r=e==null?0:e.length;++n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function iat(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function aat(e,t){var n=e.x,r=e.y,o=oat(e,eat),i="".concat(n),a=parseInt(i,10),s="".concat(r),l=parseInt(s,10),c="".concat(t.height||o.height),u=parseInt(c,10),d="".concat(t.width||o.width),f=parseInt(d,10);return mw(mw(mw(mw(mw({},t),o),a?{x:a}:{}),l?{y:l}:{}),{},{height:u,width:f,name:t.name,radius:t.radius})}function r7(e){return Y.createElement(oO,HL({shapeType:"rectangle",propTransformer:aat,activeClassName:"recharts-active-bar"},e))}var sat=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return function(r,o){if(typeof t=="number")return t;var i=typeof r=="number";return i?t(r,o):(i||fp(),n)}},lat=["value","background"],sse;function qv(e){"@babel/helpers - typeof";return qv=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},qv(e)}function cat(e,t){if(e==null)return{};var n=uat(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function uat(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function cO(){return cO=Object.assign?Object.assign.bind():function(e){for(var t=1;t0&&Math.abs(D)0&&Math.abs(j)0&&(L=Math.min((ee||0)-(j[Q-1]||0),L))}),Number.isFinite(L)){var D=L/N,_=m.layout==="vertical"?r.height:r.width;if(m.padding==="gap"&&(I=D*_/2),m.padding==="no-gap"){var z=na(t.barCategoryGap,D*_),F=D*_/2;I=F-z-(F-z)/_*z}}}o==="xAxis"?A=[r.left+(S.left||0)+(I||0),r.left+r.width-(S.right||0)-(I||0)]:o==="yAxis"?A=l==="horizontal"?[r.top+r.height-(S.bottom||0),r.top+(S.top||0)]:[r.top+(S.top||0)+(I||0),r.top+r.height-(S.bottom||0)-(I||0)]:A=m.range,P&&(A=[A[1],A[0]]);var V=kae(m,i,f),U=V.scale,K=V.realScaleType;U.domain(w).range(A),Mae(U);var X=Rae(U,lc(lc({},m),{},{realScaleType:K}));o==="xAxis"?($=y==="top"&&!E||y==="bottom"&&E,k=r.left,O=d[T]-$*m.height):o==="yAxis"&&($=y==="left"&&!E||y==="right"&&E,k=d[T]-$*m.width,O=r.top);var ie=lc(lc(lc({},m),X),{},{realScaleType:K,x:k,y:O,scale:U,width:o==="xAxis"?r.width:m.width,height:o==="yAxis"?r.height:m.height});return ie.bandSize=qI(ie,X),!m.hide&&o==="xAxis"?d[T]+=($?-1:1)*ie.height:m.hide||(d[T]+=($?-1:1)*ie.width),lc(lc({},p),{},cM({},h,ie))},{})},dse=function(t,n){var r=t.x,o=t.y,i=n.x,a=n.y;return{x:Math.min(r,i),y:Math.min(o,a),width:Math.abs(i-r),height:Math.abs(a-o)}},xat=function(t){var n=t.x1,r=t.y1,o=t.x2,i=t.y2;return dse({x:n,y:r},{x:o,y:i})},fse=function(){function e(t){vat(this,e),this.scale=t}return bat(e,[{key:"domain",get:function(){return this.scale.domain}},{key:"range",get:function(){return this.scale.range}},{key:"rangeMin",get:function(){return this.range()[0]}},{key:"rangeMax",get:function(){return this.range()[1]}},{key:"bandwidth",get:function(){return this.scale.bandwidth}},{key:"apply",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=r.bandAware,i=r.position;if(n!==void 0){if(i)switch(i){case"start":return this.scale(n);case"middle":{var a=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+a}case"end":{var s=this.bandwidth?this.bandwidth():0;return this.scale(n)+s}default:return this.scale(n)}if(o){var l=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+l}return this.scale(n)}}},{key:"isInRange",value:function(n){var r=this.range(),o=r[0],i=r[r.length-1];return o<=i?n>=o&&n<=i:n>=i&&n<=o}}],[{key:"create",value:function(n){return new e(n)}}])}();cM(fse,"EPS",1e-4);var PV=function(t){var n=Object.keys(t).reduce(function(r,o){return lc(lc({},r),{},cM({},o,fse.create(t[o])))},{});return lc(lc({},n),{},{apply:function(o){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=i.bandAware,s=i.position;return zit(o,function(l,c){return n[c].apply(l,{bandAware:a,position:s})})},isInRange:function(o){return ase(o,function(i,a){return n[a].isInRange(i)})}})};function Sat(e){return(e%180+180)%180}var Cat=function(t){var n=t.width,r=t.height,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,i=Sat(o),a=i*Math.PI/180,s=Math.atan(r/n),l=a>s&&a-1?o[i?t[a]:a]:void 0}}var Oat=Iat,Aat=nse;function kat(e){var t=Aat(e),n=t%1;return t===t?n?t-n:t:0}var Mat=kat,Rat=die,$at=Tu,Dat=Mat,_at=Math.max;function Nat(e,t,n){var r=e==null?0:e.length;if(!r)return-1;var o=n==null?0:Dat(n);return o<0&&(o=_at(r+o,0)),Rat(e,$at(t),o)}var Lat=Nat,Fat=Oat,jat=Lat,Bat=Fat(jat),zat=Bat;const Vat=Bn(zat);var Hat=eUe(function(e){return{x:e.left,y:e.top,width:e.width,height:e.height}},function(e){return["l",e.left,"t",e.top,"w",e.width,"h",e.height].join("")}),TV=v.createContext(void 0),IV=v.createContext(void 0),pse=v.createContext(void 0),hse=v.createContext({}),gse=v.createContext(void 0),mse=v.createContext(0),yse=v.createContext(0),l7=function(t){var n=t.state,r=n.xAxisMap,o=n.yAxisMap,i=n.offset,a=t.clipPathId,s=t.children,l=t.width,c=t.height,u=Hat(i);return Y.createElement(TV.Provider,{value:r},Y.createElement(IV.Provider,{value:o},Y.createElement(hse.Provider,{value:i},Y.createElement(pse.Provider,{value:u},Y.createElement(gse.Provider,{value:a},Y.createElement(mse.Provider,{value:c},Y.createElement(yse.Provider,{value:l},s)))))))},Uat=function(){return v.useContext(gse)},vse=function(t){var n=v.useContext(TV);n==null&&fp();var r=n[t];return r==null&&fp(),r},Wat=function(){var t=v.useContext(TV);return bf(t)},Gat=function(){var t=v.useContext(IV),n=Vat(t,function(r){return ase(r.domain,Number.isFinite)});return n||bf(t)},bse=function(t){var n=v.useContext(IV);n==null&&fp();var r=n[t];return r==null&&fp(),r},qat=function(){var t=v.useContext(pse);return t},Kat=function(){return v.useContext(hse)},OV=function(){return v.useContext(yse)},AV=function(){return v.useContext(mse)};function Kv(e){"@babel/helpers - typeof";return Kv=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Kv(e)}function Yat(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Qat(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);ne*o)return!1;var i=n();return e*(t-e*i/2-r)>=0&&e*(t+e*i/2-o)<=0}function Mst(e,t){return Tse(e,t+1)}function Rst(e,t,n,r,o){for(var i=(r||[]).slice(),a=t.start,s=t.end,l=0,c=1,u=a,d=function(){var h=r==null?void 0:r[l];if(h===void 0)return{v:Tse(r,c)};var m=l,y,w=function(){return y===void 0&&(y=n(h,m)),y},x=h.coordinate,S=l===0||hO(e,x,w,u,s);S||(l=0,u=a,c+=1),S&&(u=x+e*(w()/2+o),l+=c)},f;c<=i.length;)if(f=d(),f)return f.v;return[]}function zS(e){"@babel/helpers - typeof";return zS=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},zS(e)}function m7(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Ai(e){for(var t=1;t0?p.coordinate-y*e:p.coordinate})}else i[f]=p=Ai(Ai({},p),{},{tickCoord:p.coordinate});var w=hO(e,p.tickCoord,m,s,l);w&&(l=p.tickCoord-e*(m()/2+o),i[f]=Ai(Ai({},p),{},{isShow:!0}))},u=a-1;u>=0;u--)c(u);return i}function Lst(e,t,n,r,o,i){var a=(r||[]).slice(),s=a.length,l=t.start,c=t.end;if(i){var u=r[s-1],d=n(u,s-1),f=e*(u.coordinate+e*d/2-c);a[s-1]=u=Ai(Ai({},u),{},{tickCoord:f>0?u.coordinate-f*e:u.coordinate});var p=hO(e,u.tickCoord,function(){return d},l,c);p&&(c=u.tickCoord-e*(d/2+o),a[s-1]=Ai(Ai({},u),{},{isShow:!0}))}for(var h=i?s-1:s,m=function(x){var S=a[x],E,P=function(){return E===void 0&&(E=n(S,x)),E};if(x===0){var T=e*(S.coordinate-e*P()/2-l);a[x]=S=Ai(Ai({},S),{},{tickCoord:T<0?S.coordinate-T*e:S.coordinate})}else a[x]=S=Ai(Ai({},S),{},{tickCoord:S.coordinate});var I=hO(e,S.tickCoord,P,l,c);I&&(l=S.tickCoord+e*(P()/2+o),a[x]=Ai(Ai({},S),{},{isShow:!0}))},y=0;y=2?ta(o[1].coordinate-o[0].coordinate):1,w=kst(i,y,p);return l==="equidistantPreserveStart"?Rst(y,w,m,o,a):(l==="preserveStart"||l==="preserveStartEnd"?f=Lst(y,w,m,o,a,l==="preserveStartEnd"):f=Nst(y,w,m,o,a),f.filter(function(x){return x.isShow}))}var Fst=["viewBox"],jst=["viewBox"],Bst=["ticks"];function Xv(e){"@babel/helpers - typeof";return Xv=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Xv(e)}function Sy(){return Sy=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function zst(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Vst(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function v7(e,t){for(var n=0;n0?l(this.props):l(p)),a<=0||s<=0||!h||!h.length?null:Y.createElement(pn,{className:de("recharts-cartesian-axis",c),ref:function(y){r.layerReference=y}},i&&this.renderAxisLine(),this.renderTicks(h,this.state.fontSize,this.state.letterSpacing),Zo.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(r,o,i){var a;return Y.isValidElement(r)?a=Y.cloneElement(r,o):Jt(r)?a=r(o):a=Y.createElement(bg,Sy({},o,{className:"recharts-cartesian-axis-tick-value"}),i),a}}])}(v.Component);$V(e0,"displayName","CartesianAxis");$V(e0,"defaultProps",{x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd"});var Yst=["x1","y1","x2","y2","key"],Qst=["offset"];function xg(e){"@babel/helpers - typeof";return xg=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},xg(e)}function b7(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function $i(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function elt(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var tlt=function(t){var n=t.fill;if(!n||n==="none")return null;var r=t.fillOpacity,o=t.x,i=t.y,a=t.width,s=t.height,l=t.ry;return Y.createElement("rect",{x:o,y:i,ry:l,width:a,height:s,stroke:"none",fill:n,fillOpacity:r,className:"recharts-cartesian-grid-bg"})};function Ase(e,t){var n;if(Y.isValidElement(e))n=Y.cloneElement(e,t);else if(Jt(e))n=e(t);else{var r=t.x1,o=t.y1,i=t.x2,a=t.y2,s=t.key,l=w7(t,Yst),c=_t(l,!1);c.offset;var u=w7(c,Qst);n=Y.createElement("line",jh({},u,{x1:r,y1:o,x2:i,y2:a,fill:"none",key:s}))}return n}function nlt(e){var t=e.x,n=e.width,r=e.horizontal,o=r===void 0?!0:r,i=e.horizontalPoints;if(!o||!i||!i.length)return null;var a=i.map(function(s,l){var c=$i($i({},e),{},{x1:t,y1:s,x2:t+n,y2:s,key:"line-".concat(l),index:l});return Ase(o,c)});return Y.createElement("g",{className:"recharts-cartesian-grid-horizontal"},a)}function rlt(e){var t=e.y,n=e.height,r=e.vertical,o=r===void 0?!0:r,i=e.verticalPoints;if(!o||!i||!i.length)return null;var a=i.map(function(s,l){var c=$i($i({},e),{},{x1:s,y1:t,x2:s,y2:t+n,key:"line-".concat(l),index:l});return Ase(o,c)});return Y.createElement("g",{className:"recharts-cartesian-grid-vertical"},a)}function olt(e){var t=e.horizontalFill,n=e.fillOpacity,r=e.x,o=e.y,i=e.width,a=e.height,s=e.horizontalPoints,l=e.horizontal,c=l===void 0?!0:l;if(!c||!t||!t.length)return null;var u=s.map(function(f){return Math.round(f+o-o)}).sort(function(f,p){return f-p});o!==u[0]&&u.unshift(0);var d=u.map(function(f,p){var h=!u[p+1],m=h?o+a-f:u[p+1]-f;if(m<=0)return null;var y=p%t.length;return Y.createElement("rect",{key:"react-".concat(p),y:f,x:r,height:m,width:i,stroke:"none",fill:t[y],fillOpacity:n,className:"recharts-cartesian-grid-bg"})});return Y.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},d)}function ilt(e){var t=e.vertical,n=t===void 0?!0:t,r=e.verticalFill,o=e.fillOpacity,i=e.x,a=e.y,s=e.width,l=e.height,c=e.verticalPoints;if(!n||!r||!r.length)return null;var u=c.map(function(f){return Math.round(f+i-i)}).sort(function(f,p){return f-p});i!==u[0]&&u.unshift(0);var d=u.map(function(f,p){var h=!u[p+1],m=h?i+s-f:u[p+1]-f;if(m<=0)return null;var y=p%r.length;return Y.createElement("rect",{key:"react-".concat(p),x:f,y:a,width:m,height:l,stroke:"none",fill:r[y],fillOpacity:o,className:"recharts-cartesian-grid-bg"})});return Y.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},d)}var alt=function(t,n){var r=t.xAxis,o=t.width,i=t.height,a=t.offset;return Aae(RV($i($i($i({},e0.defaultProps),r),{},{ticks:id(r,!0),viewBox:{x:0,y:0,width:o,height:i}})),a.left,a.left+a.width,n)},slt=function(t,n){var r=t.yAxis,o=t.width,i=t.height,a=t.offset;return Aae(RV($i($i($i({},e0.defaultProps),r),{},{ticks:id(r,!0),viewBox:{x:0,y:0,width:o,height:i}})),a.top,a.top+a.height,n)},Dm={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function zg(e){var t,n,r,o,i,a,s=OV(),l=AV(),c=Kat(),u=$i($i({},e),{},{stroke:(t=e.stroke)!==null&&t!==void 0?t:Dm.stroke,fill:(n=e.fill)!==null&&n!==void 0?n:Dm.fill,horizontal:(r=e.horizontal)!==null&&r!==void 0?r:Dm.horizontal,horizontalFill:(o=e.horizontalFill)!==null&&o!==void 0?o:Dm.horizontalFill,vertical:(i=e.vertical)!==null&&i!==void 0?i:Dm.vertical,verticalFill:(a=e.verticalFill)!==null&&a!==void 0?a:Dm.verticalFill,x:ut(e.x)?e.x:c.left,y:ut(e.y)?e.y:c.top,width:ut(e.width)?e.width:c.width,height:ut(e.height)?e.height:c.height}),d=u.x,f=u.y,p=u.width,h=u.height,m=u.syncWithTicks,y=u.horizontalValues,w=u.verticalValues,x=Wat(),S=Gat();if(!ut(p)||p<=0||!ut(h)||h<=0||!ut(d)||d!==+d||!ut(f)||f!==+f)return null;var E=u.verticalCoordinatesGenerator||alt,P=u.horizontalCoordinatesGenerator||slt,T=u.horizontalPoints,I=u.verticalPoints;if((!T||!T.length)&&Jt(P)){var A=y&&y.length,k=P({yAxis:S?$i($i({},S),{},{ticks:A?y:S.ticks}):void 0,width:s,height:l,offset:c},A?!0:m);Cc(Array.isArray(k),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(xg(k),"]")),Array.isArray(k)&&(T=k)}if((!I||!I.length)&&Jt(E)){var O=w&&w.length,$=E({xAxis:x?$i($i({},x),{},{ticks:O?w:x.ticks}):void 0,width:s,height:l,offset:c},O?!0:m);Cc(Array.isArray($),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(xg($),"]")),Array.isArray($)&&(I=$)}return Y.createElement("g",{className:"recharts-cartesian-grid"},Y.createElement(tlt,{fill:u.fill,fillOpacity:u.fillOpacity,x:u.x,y:u.y,width:u.width,height:u.height,ry:u.ry}),Y.createElement(nlt,jh({},u,{offset:c,horizontalPoints:T,xAxis:x,yAxis:S})),Y.createElement(rlt,jh({},u,{offset:c,verticalPoints:I,xAxis:x,yAxis:S})),Y.createElement(olt,jh({},u,{horizontalPoints:T})),Y.createElement(ilt,jh({},u,{verticalPoints:I})))}zg.displayName="CartesianGrid";var llt=["type","layout","connectNulls","ref"],clt=["key"];function Jv(e){"@babel/helpers - typeof";return Jv=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Jv(e)}function x7(e,t){if(e==null)return{};var n=ult(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function ult(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Sx(){return Sx=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);nd){p=[].concat(_m(l.slice(0,h)),[d-m]);break}var y=p.length%2===0?[0,f]:[f];return[].concat(_m(t.repeat(l,u)),_m(p),y).map(function(w){return"".concat(w,"px")}).join(", ")}),cc(n,"id",Rp("recharts-line-")),cc(n,"pathRef",function(a){n.mainCurve=a}),cc(n,"handleAnimationEnd",function(){n.setState({isAnimationFinished:!0}),n.props.onAnimationEnd&&n.props.onAnimationEnd()}),cc(n,"handleAnimationStart",function(){n.setState({isAnimationFinished:!1}),n.props.onAnimationStart&&n.props.onAnimationStart()}),n}return wlt(t,e),mlt(t,[{key:"componentDidMount",value:function(){if(this.props.isAnimationActive){var r=this.getTotalLength();this.setState({totalLength:r})}}},{key:"componentDidUpdate",value:function(){if(this.props.isAnimationActive){var r=this.getTotalLength();r!==this.state.totalLength&&this.setState({totalLength:r})}}},{key:"getTotalLength",value:function(){var r=this.mainCurve;try{return r&&r.getTotalLength&&r.getTotalLength()||0}catch{return 0}}},{key:"renderErrorBar",value:function(r,o){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var i=this.props,a=i.points,s=i.xAxis,l=i.yAxis,c=i.layout,u=i.children,d=la(u,Jb);if(!d)return null;var f=function(m,y){return{x:m.x,y:m.y,value:m.value,errorVal:jr(m.payload,y)}},p={clipPath:r?"url(#clipPath-".concat(o,")"):null};return Y.createElement(pn,p,d.map(function(h){return Y.cloneElement(h,{key:"bar-".concat(h.props.dataKey),data:a,xAxis:s,yAxis:l,layout:c,dataPointFormatter:f})}))}},{key:"renderDots",value:function(r,o,i){var a=this.props.isAnimationActive;if(a&&!this.state.isAnimationFinished)return null;var s=this.props,l=s.dot,c=s.points,u=s.dataKey,d=_t(this.props,!1),f=_t(l,!0),p=c.map(function(m,y){var w=Xa(Xa(Xa({key:"dot-".concat(y),r:3},d),f),{},{value:m.value,dataKey:u,cx:m.x,cy:m.y,index:y,payload:m.payload});return t.renderDotItem(l,w)}),h={clipPath:r?"url(#clipPath-".concat(o?"":"dots-").concat(i,")"):null};return Y.createElement(pn,Sx({className:"recharts-line-dots",key:"dots"},h),p)}},{key:"renderCurveStatically",value:function(r,o,i,a){var s=this.props,l=s.type,c=s.layout,u=s.connectNulls;s.ref;var d=x7(s,llt),f=Xa(Xa(Xa({},_t(d,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:o?"url(#clipPath-".concat(i,")"):null,points:r},a),{},{type:l,layout:c,connectNulls:u});return Y.createElement(Qf,Sx({},f,{pathRef:this.pathRef}))}},{key:"renderCurveWithAnimation",value:function(r,o){var i=this,a=this.props,s=a.points,l=a.strokeDasharray,c=a.isAnimationActive,u=a.animationBegin,d=a.animationDuration,f=a.animationEasing,p=a.animationId,h=a.animateNewValues,m=a.width,y=a.height,w=this.state,x=w.prevPoints,S=w.totalLength;return Y.createElement(Nl,{begin:u,duration:d,isActive:c,easing:f,from:{t:0},to:{t:1},key:"line-".concat(p),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(E){var P=E.t;if(x){var T=x.length/s.length,I=s.map(function(N,L){var j=Math.floor(L*T);if(x[j]){var D=x[j],_=Jr(D.x,N.x),z=Jr(D.y,N.y);return Xa(Xa({},N),{},{x:_(P),y:z(P)})}if(h){var F=Jr(m*2,N.x),V=Jr(y/2,N.y);return Xa(Xa({},N),{},{x:F(P),y:V(P)})}return Xa(Xa({},N),{},{x:N.x,y:N.y})});return i.renderCurveStatically(I,r,o)}var A=Jr(0,S),k=A(P),O;if(l){var $="".concat(l).split(/[,\s]+/gim).map(function(N){return parseFloat(N)});O=i.getStrokeDasharray(k,S,$)}else O=i.generateSimpleStrokeDasharray(S,k);return i.renderCurveStatically(s,r,o,{strokeDasharray:O})})}},{key:"renderCurve",value:function(r,o){var i=this.props,a=i.points,s=i.isAnimationActive,l=this.state,c=l.prevPoints,u=l.totalLength;return s&&a&&a.length&&(!c&&u>0||!dp(c,a))?this.renderCurveWithAnimation(r,o):this.renderCurveStatically(a,r,o)}},{key:"render",value:function(){var r,o=this.props,i=o.hide,a=o.dot,s=o.points,l=o.className,c=o.xAxis,u=o.yAxis,d=o.top,f=o.left,p=o.width,h=o.height,m=o.isAnimationActive,y=o.id;if(i||!s||!s.length)return null;var w=this.state.isAnimationFinished,x=s.length===1,S=de("recharts-line",l),E=c&&c.allowDataOverflow,P=u&&u.allowDataOverflow,T=E||P,I=Kt(y)?this.id:y,A=(r=_t(a,!1))!==null&&r!==void 0?r:{r:3,strokeWidth:2},k=A.r,O=k===void 0?3:k,$=A.strokeWidth,N=$===void 0?2:$,L=Soe(a)?a:{},j=L.clipDot,D=j===void 0?!0:j,_=O*2+N;return Y.createElement(pn,{className:S},E||P?Y.createElement("defs",null,Y.createElement("clipPath",{id:"clipPath-".concat(I)},Y.createElement("rect",{x:E?f:f-p/2,y:P?d:d-h/2,width:E?p:p*2,height:P?h:h*2})),!D&&Y.createElement("clipPath",{id:"clipPath-dots-".concat(I)},Y.createElement("rect",{x:f-_/2,y:d-_/2,width:p+_,height:h+_}))):null,!x&&this.renderCurve(T,I),this.renderErrorBar(T,I),(x||a)&&this.renderDots(T,D,I),(!m||w)&&Ec.renderCallByParent(this.props,s))}}],[{key:"getDerivedStateFromProps",value:function(r,o){return r.animationId!==o.prevAnimationId?{prevAnimationId:r.animationId,curPoints:r.points,prevPoints:o.curPoints}:r.points!==o.curPoints?{curPoints:r.points}:null}},{key:"repeat",value:function(r,o){for(var i=r.length%2!==0?[].concat(_m(r),[0]):r,a=[],s=0;s=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Elt(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Bh(){return Bh=Object.assign?Object.assign.bind():function(e){for(var t=1;t0||!dp(u,a)||!dp(d,s))?this.renderAreaWithAnimation(r,o):this.renderAreaStatically(a,s,r,o)}},{key:"render",value:function(){var r,o=this.props,i=o.hide,a=o.dot,s=o.points,l=o.className,c=o.top,u=o.left,d=o.xAxis,f=o.yAxis,p=o.width,h=o.height,m=o.isAnimationActive,y=o.id;if(i||!s||!s.length)return null;var w=this.state.isAnimationFinished,x=s.length===1,S=de("recharts-area",l),E=d&&d.allowDataOverflow,P=f&&f.allowDataOverflow,T=E||P,I=Kt(y)?this.id:y,A=(r=_t(a,!1))!==null&&r!==void 0?r:{r:3,strokeWidth:2},k=A.r,O=k===void 0?3:k,$=A.strokeWidth,N=$===void 0?2:$,L=Soe(a)?a:{},j=L.clipDot,D=j===void 0?!0:j,_=O*2+N;return Y.createElement(pn,{className:S},E||P?Y.createElement("defs",null,Y.createElement("clipPath",{id:"clipPath-".concat(I)},Y.createElement("rect",{x:E?u:u-p/2,y:P?c:c-h/2,width:E?p:p*2,height:P?h:h*2})),!D&&Y.createElement("clipPath",{id:"clipPath-dots-".concat(I)},Y.createElement("rect",{x:u-_/2,y:c-_/2,width:p+_,height:h+_}))):null,x?null:this.renderArea(T,I),(a||x)&&this.renderDots(T,D,I),(!m||w)&&Ec.renderCallByParent(this.props,s))}}],[{key:"getDerivedStateFromProps",value:function(r,o){return r.animationId!==o.prevAnimationId?{prevAnimationId:r.animationId,curPoints:r.points,curBaseLine:r.baseLine,prevPoints:o.curPoints,prevBaseLine:o.curBaseLine}:r.points!==o.curPoints||r.baseLine!==o.curBaseLine?{curPoints:r.points,curBaseLine:r.baseLine}:null}}])}(v.PureComponent);Rse=Lp;ou(Lp,"displayName","Area");ou(Lp,"defaultProps",{stroke:"#3182bd",fill:"#3182bd",fillOpacity:.6,xAxisId:0,yAxisId:0,legendType:"line",connectNulls:!1,points:[],dot:!1,activeDot:!0,hide:!1,isAnimationActive:!El.isSsr,animationBegin:0,animationDuration:1500,animationEasing:"ease"});ou(Lp,"getBaseValue",function(e,t,n,r){var o=e.layout,i=e.baseValue,a=t.props.baseValue,s=a??i;if(ut(s)&&typeof s=="number")return s;var l=o==="horizontal"?r:n,c=l.scale.domain();if(l.type==="number"){var u=Math.max(c[0],c[1]),d=Math.min(c[0],c[1]);return s==="dataMin"?d:s==="dataMax"||u<0?u:Math.max(Math.min(c[0],c[1]),0)}return s==="dataMin"?c[0]:s==="dataMax"?c[1]:c[0]});ou(Lp,"getComposedData",function(e){var t=e.props,n=e.item,r=e.xAxis,o=e.yAxis,i=e.xAxisTicks,a=e.yAxisTicks,s=e.bandSize,l=e.dataKey,c=e.stackedData,u=e.dataStartIndex,d=e.displayedData,f=e.offset,p=t.layout,h=c&&c.length,m=Rse.getBaseValue(t,n,r,o),y=p==="horizontal",w=!1,x=d.map(function(E,P){var T;h?T=c[u+P]:(T=jr(E,l),Array.isArray(T)?w=!0:T=[m,T]);var I=T[1]==null||h&&jr(E,l)==null;return y?{x:Bv({axis:r,ticks:i,bandSize:s,entry:E,index:P}),y:I?null:o.scale(T[1]),value:T,payload:E}:{x:I?null:r.scale(T[1]),y:Bv({axis:o,ticks:a,bandSize:s,entry:E,index:P}),value:T,payload:E}}),S;return h||w?S=x.map(function(E){var P=Array.isArray(E.value)?E.value[0]:null;return y?{x:E.x,y:P!=null&&E.y!=null?o.scale(P):null}:{x:P!=null?r.scale(P):null,y:E.y}}):S=y?o.scale(m):r.scale(m),af({points:x,baseLine:S,layout:p,isRange:w},f)});ou(Lp,"renderDotItem",function(e,t){var n;if(Y.isValidElement(e))n=Y.cloneElement(e,t);else if(Jt(e))n=e(t);else{var r=de("recharts-area-dot",typeof e!="boolean"?e.className:""),o=t.key,i=$se(t,Clt);n=Y.createElement(s1,Bh({},i,{key:o,className:r}))}return n});function eb(e){"@babel/helpers - typeof";return eb=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},eb(e)}function Rlt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function $lt(e,t){for(var n=0;n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Vlt(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Hlt(e){var t=e.option,n=e.isActive,r=zlt(e,Blt);return typeof t=="string"?Y.createElement(oO,Cx({option:Y.createElement(Vk,Cx({type:t},r)),isActive:n,shapeType:"symbols"},r)):Y.createElement(oO,Cx({option:t,isActive:n,shapeType:"symbols"},r))}function tb(e){"@babel/helpers - typeof";return tb=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},tb(e)}function Ex(){return Ex=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Fct(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function jct(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Bct(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n0?a:t&&t.length&&ut(o)&&ut(i)?t.slice(o,i+1):[]};function ele(e){return e==="number"?[0,"auto"]:void 0}var dF=function(t,n,r,o){var i=t.graphicalItems,a=t.tooltipAxis,s=gM(n,t);return r<0||!i||!i.length||r>=s.length?null:i.reduce(function(l,c){var u,d=(u=c.props.data)!==null&&u!==void 0?u:n;d&&t.dataStartIndex+t.dataEndIndex!==0&&t.dataEndIndex-t.dataStartIndex>=r&&(d=d.slice(t.dataStartIndex,t.dataEndIndex+1));var f;if(a.dataKey&&!a.allowDuplicatedCategory){var p=d===void 0?s:d;f=bI(p,a.dataKey,o)}else f=d&&d[r]||s[r];return f?[].concat(ib(l),[Dae(c,f)]):l},[])},$7=function(t,n,r,o){var i=o||{x:t.chartX,y:t.chartY},a=Jct(i,r),s=t.orderedTooltipTicks,l=t.tooltipAxis,c=t.tooltipTicks,u=oet(a,s,c,l);if(u>=0&&c){var d=c[u]&&c[u].value,f=dF(t,n,u,d),p=Zct(r,s,u,i);return{activeTooltipIndex:u,activeLabel:d,activePayload:f,activeCoordinate:p}}return null},eut=function(t,n){var r=n.axes,o=n.graphicalItems,i=n.axisType,a=n.axisIdKey,s=n.stackGroups,l=n.dataStartIndex,c=n.dataEndIndex,u=t.layout,d=t.children,f=t.stackOffset,p=Oae(u,i);return r.reduce(function(h,m){var y,w=m.type.defaultProps!==void 0?Be(Be({},m.type.defaultProps),m.props):m.props,x=w.type,S=w.dataKey,E=w.allowDataOverflow,P=w.allowDuplicatedCategory,T=w.scale,I=w.ticks,A=w.includeHidden,k=w[a];if(h[k])return h;var O=gM(t.data,{graphicalItems:o.filter(function(X){var ie,ee=a in X.props?X.props[a]:(ie=X.type.defaultProps)===null||ie===void 0?void 0:ie[a];return ee===k}),dataStartIndex:l,dataEndIndex:c}),$=O.length,N,L,j;Tct(w.domain,E,x)&&(N=SL(w.domain,null,E),p&&(x==="number"||T!=="auto")&&(j=vx(O,S,"category")));var D=ele(x);if(!N||N.length===0){var _,z=(_=w.domain)!==null&&_!==void 0?_:D;if(S){if(N=vx(O,S,x),x==="category"&&p){var F=KUe(N);P&&F?(L=N,N=aO(0,$)):P||(N=X9(z,N,m).reduce(function(X,ie){return X.indexOf(ie)>=0?X:[].concat(ib(X),[ie])},[]))}else if(x==="category")P?N=N.filter(function(X){return X!==""&&!Kt(X)}):N=X9(z,N,m).reduce(function(X,ie){return X.indexOf(ie)>=0||ie===""||Kt(ie)?X:[].concat(ib(X),[ie])},[]);else if(x==="number"){var V=uet(O,o.filter(function(X){var ie,ee,Q=a in X.props?X.props[a]:(ie=X.type.defaultProps)===null||ie===void 0?void 0:ie[a],te="hide"in X.props?X.props.hide:(ee=X.type.defaultProps)===null||ee===void 0?void 0:ee.hide;return Q===k&&(A||!te)}),S,i,u);V&&(N=V)}p&&(x==="number"||T!=="auto")&&(j=vx(O,S,"category"))}else p?N=aO(0,$):s&&s[k]&&s[k].hasStack&&x==="number"?N=f==="expand"?[0,1]:$ae(s[k].stackGroups,l,c):N=Iae(O,o.filter(function(X){var ie=a in X.props?X.props[a]:X.type.defaultProps[a],ee="hide"in X.props?X.props.hide:X.type.defaultProps.hide;return ie===k&&(A||!ee)}),x,u,!0);if(x==="number")N=lF(d,N,k,i,I),z&&(N=SL(z,N,E));else if(x==="category"&&z){var U=z,K=N.every(function(X){return U.indexOf(X)>=0});K&&(N=U)}}return Be(Be({},h),{},Zt({},k,Be(Be({},w),{},{axisType:i,domain:N,categoricalDomain:j,duplicateDomain:L,originalDomain:(y=w.domain)!==null&&y!==void 0?y:D,isCategorical:p,layout:u})))},{})},tut=function(t,n){var r=n.graphicalItems,o=n.Axis,i=n.axisType,a=n.axisIdKey,s=n.stackGroups,l=n.dataStartIndex,c=n.dataEndIndex,u=t.layout,d=t.children,f=gM(t.data,{graphicalItems:r,dataStartIndex:l,dataEndIndex:c}),p=f.length,h=Oae(u,i),m=-1;return r.reduce(function(y,w){var x=w.type.defaultProps!==void 0?Be(Be({},w.type.defaultProps),w.props):w.props,S=x[a],E=ele("number");if(!y[S]){m++;var P;return h?P=aO(0,p):s&&s[S]&&s[S].hasStack?(P=$ae(s[S].stackGroups,l,c),P=lF(d,P,S,i)):(P=SL(E,Iae(f,r.filter(function(T){var I,A,k=a in T.props?T.props[a]:(I=T.type.defaultProps)===null||I===void 0?void 0:I[a],O="hide"in T.props?T.props.hide:(A=T.type.defaultProps)===null||A===void 0?void 0:A.hide;return k===S&&!O}),"number",u),o.defaultProps.allowDataOverflow),P=lF(d,P,S,i)),Be(Be({},y),{},Zt({},S,Be(Be({axisType:i},o.defaultProps),{},{hide:!0,orientation:bs(Qct,"".concat(i,".").concat(m%2),null),domain:P,originalDomain:E,isCategorical:h,layout:u})))}return y},{})},nut=function(t,n){var r=n.axisType,o=r===void 0?"xAxis":r,i=n.AxisComp,a=n.graphicalItems,s=n.stackGroups,l=n.dataStartIndex,c=n.dataEndIndex,u=t.children,d="".concat(o,"Id"),f=la(u,i),p={};return f&&f.length?p=eut(t,{axes:f,graphicalItems:a,axisType:o,axisIdKey:d,stackGroups:s,dataStartIndex:l,dataEndIndex:c}):a&&a.length&&(p=tut(t,{Axis:i,graphicalItems:a,axisType:o,axisIdKey:d,stackGroups:s,dataStartIndex:l,dataEndIndex:c})),p},rut=function(t){var n=bf(t),r=id(n,!1,!0);return{tooltipTicks:r,orderedTooltipTicks:Xz(r,function(o){return o.coordinate}),tooltipAxis:n,tooltipAxisBandSize:qI(n,r)}},D7=function(t){var n=t.children,r=t.defaultShowTooltip,o=rs(n,Gv),i=0,a=0;return t.data&&t.data.length!==0&&(a=t.data.length-1),o&&o.props&&(o.props.startIndex>=0&&(i=o.props.startIndex),o.props.endIndex>=0&&(a=o.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:i,dataEndIndex:a,activeTooltipIndex:-1,isTooltipActive:!!r}},out=function(t){return!t||!t.length?!1:t.some(function(n){var r=cd(n&&n.type);return r&&r.indexOf("Bar")>=0})},_7=function(t){return t==="horizontal"?{numericAxisName:"yAxis",cateAxisName:"xAxis"}:t==="vertical"?{numericAxisName:"xAxis",cateAxisName:"yAxis"}:t==="centric"?{numericAxisName:"radiusAxis",cateAxisName:"angleAxis"}:{numericAxisName:"angleAxis",cateAxisName:"radiusAxis"}},iut=function(t,n){var r=t.props,o=t.graphicalItems,i=t.xAxisMap,a=i===void 0?{}:i,s=t.yAxisMap,l=s===void 0?{}:s,c=r.width,u=r.height,d=r.children,f=r.margin||{},p=rs(d,Gv),h=rs(d,ud),m=Object.keys(l).reduce(function(P,T){var I=l[T],A=I.orientation;return!I.mirror&&!I.hide?Be(Be({},P),{},Zt({},A,P[A]+I.width)):P},{left:f.left||0,right:f.right||0}),y=Object.keys(a).reduce(function(P,T){var I=a[T],A=I.orientation;return!I.mirror&&!I.hide?Be(Be({},P),{},Zt({},A,bs(P,"".concat(A))+I.height)):P},{top:f.top||0,bottom:f.bottom||0}),w=Be(Be({},y),m),x=w.bottom;p&&(w.bottom+=p.props.height||Gv.defaultProps.height),h&&n&&(w=set(w,o,r,n));var S=c-w.left-w.right,E=u-w.top-w.bottom;return Be(Be({brushBottom:x},w),{},{width:Math.max(S,0),height:Math.max(E,0)})},aut=function(t,n){if(n==="xAxis")return t[n].width;if(n==="yAxis")return t[n].height},u1=function(t){var n=t.chartName,r=t.GraphicalChild,o=t.defaultTooltipEventType,i=o===void 0?"axis":o,a=t.validateTooltipEventTypes,s=a===void 0?["axis"]:a,l=t.axisComponents,c=t.legendContent,u=t.formatAxisMap,d=t.defaultProps,f=function(w,x){var S=x.graphicalItems,E=x.stackGroups,P=x.offset,T=x.updateId,I=x.dataStartIndex,A=x.dataEndIndex,k=w.barSize,O=w.layout,$=w.barGap,N=w.barCategoryGap,L=w.maxBarSize,j=_7(O),D=j.numericAxisName,_=j.cateAxisName,z=out(S),F=[];return S.forEach(function(V,U){var K=gM(w.data,{graphicalItems:[V],dataStartIndex:I,dataEndIndex:A}),X=V.type.defaultProps!==void 0?Be(Be({},V.type.defaultProps),V.props):V.props,ie=X.dataKey,ee=X.maxBarSize,Q=X["".concat(D,"Id")],te=X["".concat(_,"Id")],pe={},ae=l.reduce(function(_e,ye){var Pe=x["".concat(ye.axisType,"Map")],Ae=X["".concat(ye.axisType,"Id")];Pe&&Pe[Ae]||ye.axisType==="zAxis"||fp();var Me=Pe[Ae];return Be(Be({},_e),{},Zt(Zt({},ye.axisType,Me),"".concat(ye.axisType,"Ticks"),id(Me)))},pe),se=ae[_],oe=ae["".concat(_,"Ticks")],fe=E&&E[Q]&&E[Q].hasStack&&bet(V,E[Q].stackGroups),Z=cd(V.type).indexOf("Bar")>=0,ce=qI(se,oe),ge=[],we=z&&iet({barSize:k,stackGroups:E,totalSize:aut(ae,_)});if(Z){var me,Se,xe=Kt(ee)?L:ee,ke=(me=(Se=qI(se,oe,!0))!==null&&Se!==void 0?Se:xe)!==null&&me!==void 0?me:0;ge=aet({barGap:$,barCategoryGap:N,bandSize:ke!==ce?ke:ce,sizeList:we[te],maxBarSize:xe}),ke!==ce&&(ge=ge.map(function(_e){return Be(Be({},_e),{},{position:Be(Be({},_e.position),{},{offset:_e.position.offset-ke/2})})}))}var De=V&&V.type&&V.type.getComposedData;De&&F.push({props:Be(Be({},De(Be(Be({},ae),{},{displayedData:K,props:w,dataKey:ie,item:V,bandSize:ce,barPosition:ge,offset:P,stackedData:fe,layout:O,dataStartIndex:I,dataEndIndex:A}))),{},Zt(Zt(Zt({key:V.key||"item-".concat(U)},D,ae[D]),_,ae[_]),"animationId",T)),childIndex:a3e(V,w.children),item:V})}),F},p=function(w,x){var S=w.props,E=w.dataStartIndex,P=w.dataEndIndex,T=w.updateId;if(!WG({props:S}))return null;var I=S.children,A=S.layout,k=S.stackOffset,O=S.data,$=S.reverseStackOrder,N=_7(A),L=N.numericAxisName,j=N.cateAxisName,D=la(I,r),_=yet(O,D,"".concat(L,"Id"),"".concat(j,"Id"),k,$),z=l.reduce(function(X,ie){var ee="".concat(ie.axisType,"Map");return Be(Be({},X),{},Zt({},ee,nut(S,Be(Be({},ie),{},{graphicalItems:D,stackGroups:ie.axisType===L&&_,dataStartIndex:E,dataEndIndex:P}))))},{}),F=iut(Be(Be({},z),{},{props:S,graphicalItems:D}),x==null?void 0:x.legendBBox);Object.keys(z).forEach(function(X){z[X]=u(S,z[X],F,X.replace("Map",""),n)});var V=z["".concat(j,"Map")],U=rut(V),K=f(S,Be(Be({},z),{},{dataStartIndex:E,dataEndIndex:P,updateId:T,graphicalItems:D,stackGroups:_,offset:F}));return Be(Be({formattedGraphicalItems:K,graphicalItems:D,offset:F,stackGroups:_},U),z)},h=function(y){function w(x){var S,E,P;return jct(this,w),P=Vct(this,w,[x]),Zt(P,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),Zt(P,"accessibilityManager",new Pct),Zt(P,"handleLegendBBoxUpdate",function(T){if(T){var I=P.state,A=I.dataStartIndex,k=I.dataEndIndex,O=I.updateId;P.setState(Be({legendBBox:T},p({props:P.props,dataStartIndex:A,dataEndIndex:k,updateId:O},Be(Be({},P.state),{},{legendBBox:T}))))}}),Zt(P,"handleReceiveSyncEvent",function(T,I,A){if(P.props.syncId===T){if(A===P.eventEmitterSymbol&&typeof P.props.syncMethod!="function")return;P.applySyncEvent(I)}}),Zt(P,"handleBrushChange",function(T){var I=T.startIndex,A=T.endIndex;if(I!==P.state.dataStartIndex||A!==P.state.dataEndIndex){var k=P.state.updateId;P.setState(function(){return Be({dataStartIndex:I,dataEndIndex:A},p({props:P.props,dataStartIndex:I,dataEndIndex:A,updateId:k},P.state))}),P.triggerSyncEvent({dataStartIndex:I,dataEndIndex:A})}}),Zt(P,"handleMouseEnter",function(T){var I=P.getMouseInfo(T);if(I){var A=Be(Be({},I),{},{isTooltipActive:!0});P.setState(A),P.triggerSyncEvent(A);var k=P.props.onMouseEnter;Jt(k)&&k(A,T)}}),Zt(P,"triggeredAfterMouseMove",function(T){var I=P.getMouseInfo(T),A=I?Be(Be({},I),{},{isTooltipActive:!0}):{isTooltipActive:!1};P.setState(A),P.triggerSyncEvent(A);var k=P.props.onMouseMove;Jt(k)&&k(A,T)}),Zt(P,"handleItemMouseEnter",function(T){P.setState(function(){return{isTooltipActive:!0,activeItem:T,activePayload:T.tooltipPayload,activeCoordinate:T.tooltipPosition||{x:T.cx,y:T.cy}}})}),Zt(P,"handleItemMouseLeave",function(){P.setState(function(){return{isTooltipActive:!1}})}),Zt(P,"handleMouseMove",function(T){T.persist(),P.throttleTriggeredAfterMouseMove(T)}),Zt(P,"handleMouseLeave",function(T){P.throttleTriggeredAfterMouseMove.cancel();var I={isTooltipActive:!1};P.setState(I),P.triggerSyncEvent(I);var A=P.props.onMouseLeave;Jt(A)&&A(I,T)}),Zt(P,"handleOuterEvent",function(T){var I=i3e(T),A=bs(P.props,"".concat(I));if(I&&Jt(A)){var k,O;/.*touch.*/i.test(I)?O=P.getMouseInfo(T.changedTouches[0]):O=P.getMouseInfo(T),A((k=O)!==null&&k!==void 0?k:{},T)}}),Zt(P,"handleClick",function(T){var I=P.getMouseInfo(T);if(I){var A=Be(Be({},I),{},{isTooltipActive:!0});P.setState(A),P.triggerSyncEvent(A);var k=P.props.onClick;Jt(k)&&k(A,T)}}),Zt(P,"handleMouseDown",function(T){var I=P.props.onMouseDown;if(Jt(I)){var A=P.getMouseInfo(T);I(A,T)}}),Zt(P,"handleMouseUp",function(T){var I=P.props.onMouseUp;if(Jt(I)){var A=P.getMouseInfo(T);I(A,T)}}),Zt(P,"handleTouchMove",function(T){T.changedTouches!=null&&T.changedTouches.length>0&&P.throttleTriggeredAfterMouseMove(T.changedTouches[0])}),Zt(P,"handleTouchStart",function(T){T.changedTouches!=null&&T.changedTouches.length>0&&P.handleMouseDown(T.changedTouches[0])}),Zt(P,"handleTouchEnd",function(T){T.changedTouches!=null&&T.changedTouches.length>0&&P.handleMouseUp(T.changedTouches[0])}),Zt(P,"triggerSyncEvent",function(T){P.props.syncId!==void 0&&WD.emit(GD,P.props.syncId,T,P.eventEmitterSymbol)}),Zt(P,"applySyncEvent",function(T){var I=P.props,A=I.layout,k=I.syncMethod,O=P.state.updateId,$=T.dataStartIndex,N=T.dataEndIndex;if(T.dataStartIndex!==void 0||T.dataEndIndex!==void 0)P.setState(Be({dataStartIndex:$,dataEndIndex:N},p({props:P.props,dataStartIndex:$,dataEndIndex:N,updateId:O},P.state)));else if(T.activeTooltipIndex!==void 0){var L=T.chartX,j=T.chartY,D=T.activeTooltipIndex,_=P.state,z=_.offset,F=_.tooltipTicks;if(!z)return;if(typeof k=="function")D=k(F,T);else if(k==="value"){D=-1;for(var V=0;V=0){var fe,Z;if(L.dataKey&&!L.allowDuplicatedCategory){var ce=typeof L.dataKey=="function"?oe:"payload.".concat(L.dataKey.toString());fe=bI(V,ce,D),Z=U&&K&&bI(K,ce,D)}else fe=V==null?void 0:V[j],Z=U&&K&&K[j];if(te||Q){var ge=T.props.activeIndex!==void 0?T.props.activeIndex:j;return[v.cloneElement(T,Be(Be(Be({},k.props),ae),{},{activeIndex:ge})),null,null]}if(!Kt(fe))return[se].concat(ib(P.renderActivePoints({item:k,activePoint:fe,basePoint:Z,childIndex:j,isRange:U})))}else{var we,me=(we=P.getItemByXY(P.state.activeCoordinate))!==null&&we!==void 0?we:{graphicalItem:se},Se=me.graphicalItem,xe=Se.item,ke=xe===void 0?T:xe,De=Se.childIndex,_e=Be(Be(Be({},k.props),ae),{},{activeIndex:De});return[v.cloneElement(ke,_e),null,null]}return U?[se,null,null]:[se,null]}),Zt(P,"renderCustomized",function(T,I,A){return v.cloneElement(T,Be(Be({key:"recharts-customized-".concat(A)},P.props),P.state))}),Zt(P,"renderMap",{CartesianGrid:{handler:yP,once:!0},ReferenceArea:{handler:P.renderReferenceElement},ReferenceLine:{handler:yP},ReferenceDot:{handler:P.renderReferenceElement},XAxis:{handler:yP},YAxis:{handler:yP},Brush:{handler:P.renderBrush,once:!0},Bar:{handler:P.renderGraphicChild},Line:{handler:P.renderGraphicChild},Area:{handler:P.renderGraphicChild},Radar:{handler:P.renderGraphicChild},RadialBar:{handler:P.renderGraphicChild},Scatter:{handler:P.renderGraphicChild},Pie:{handler:P.renderGraphicChild},Funnel:{handler:P.renderGraphicChild},Tooltip:{handler:P.renderCursor,once:!0},PolarGrid:{handler:P.renderPolarGrid,once:!0},PolarAngleAxis:{handler:P.renderPolarAxis},PolarRadiusAxis:{handler:P.renderPolarAxis},Customized:{handler:P.renderCustomized}}),P.clipPathId="".concat((S=x.id)!==null&&S!==void 0?S:Rp("recharts"),"-clip"),P.throttleTriggeredAfterMouseMove=Gk(P.triggeredAfterMouseMove,(E=x.throttleDelay)!==null&&E!==void 0?E:1e3/60),P.state={},P}return Wct(w,y),zct(w,[{key:"componentDidMount",value:function(){var S,E;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(S=this.props.margin.left)!==null&&S!==void 0?S:0,top:(E=this.props.margin.top)!==null&&E!==void 0?E:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var S=this.props,E=S.children,P=S.data,T=S.height,I=S.layout,A=rs(E,ss);if(A){var k=A.props.defaultIndex;if(!(typeof k!="number"||k<0||k>this.state.tooltipTicks.length-1)){var O=this.state.tooltipTicks[k]&&this.state.tooltipTicks[k].value,$=dF(this.state,P,k,O),N=this.state.tooltipTicks[k].coordinate,L=(this.state.offset.top+T)/2,j=I==="horizontal",D=j?{x:N,y:L}:{y:N,x:L},_=this.state.formattedGraphicalItems.find(function(F){var V=F.item;return V.type.name==="Scatter"});_&&(D=Be(Be({},D),_.props.points[k].tooltipPosition),$=_.props.points[k].tooltipPayload);var z={activeTooltipIndex:k,isTooltipActive:!0,activeLabel:O,activePayload:$,activeCoordinate:D};this.setState(z),this.renderCursor(A),this.accessibilityManager.setIndex(k)}}}},{key:"getSnapshotBeforeUpdate",value:function(S,E){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==E.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==S.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==S.margin){var P,T;this.accessibilityManager.setDetails({offset:{left:(P=this.props.margin.left)!==null&&P!==void 0?P:0,top:(T=this.props.margin.top)!==null&&T!==void 0?T:0}})}return null}},{key:"componentDidUpdate",value:function(S){LN([rs(S.children,ss)],[rs(this.props.children,ss)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var S=rs(this.props.children,ss);if(S&&typeof S.props.shared=="boolean"){var E=S.props.shared?"axis":"item";return s.indexOf(E)>=0?E:i}return i}},{key:"getMouseInfo",value:function(S){if(!this.container)return null;var E=this.container,P=E.getBoundingClientRect(),T=RYe(P),I={chartX:Math.round(S.pageX-T.left),chartY:Math.round(S.pageY-T.top)},A=P.width/E.offsetWidth||1,k=this.inRange(I.chartX,I.chartY,A);if(!k)return null;var O=this.state,$=O.xAxisMap,N=O.yAxisMap,L=this.getTooltipEventType();if(L!=="axis"&&$&&N){var j=bf($).scale,D=bf(N).scale,_=j&&j.invert?j.invert(I.chartX):null,z=D&&D.invert?D.invert(I.chartY):null;return Be(Be({},I),{},{xValue:_,yValue:z})}var F=$7(this.state,this.props.data,this.props.layout,k);return F?Be(Be({},I),F):null}},{key:"inRange",value:function(S,E){var P=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,T=this.props.layout,I=S/P,A=E/P;if(T==="horizontal"||T==="vertical"){var k=this.state.offset,O=I>=k.left&&I<=k.left+k.width&&A>=k.top&&A<=k.top+k.height;return O?{x:I,y:A}:null}var $=this.state,N=$.angleAxisMap,L=$.radiusAxisMap;if(N&&L){var j=bf(N);return eq({x:I,y:A},j)}return null}},{key:"parseEventsOfWrapper",value:function(){var S=this.props.children,E=this.getTooltipEventType(),P=rs(S,ss),T={};P&&E==="axis"&&(P.props.trigger==="click"?T={onClick:this.handleClick}:T={onMouseEnter:this.handleMouseEnter,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd});var I=wI(this.props,this.handleOuterEvent);return Be(Be({},I),T)}},{key:"addListener",value:function(){WD.on(GD,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){WD.removeListener(GD,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(S,E,P){for(var T=this.state.formattedGraphicalItems,I=0,A=T.length;I{const t=e.planned.energy>0?e.logged.energy/e.planned.energy*100:100,n=e.planned.energy>0?e.planned.energy-e.logged.energy:e.logged.energy,r=no(),[o,i]=Le(),a=[{name:"",value:t},{name:"",value:t<100?100-t:0}],s=[r.palette.primary.main,"#C5C5C5"];return G(Wt,{direction:"row",children:[b($p,{width:"50%",height:140,children:G(rle,{children:[b(Iu,{height:100,data:a,startAngle:200,endAngle:-20,innerRadius:60,outerRadius:70,paddingAngle:2,dataKey:"value",children:a.map((l,c)=>b(Kb,{fill:s[c%s.length]},`cell-${c}`))}),G("g",{children:[b("text",{x:"50%",y:"45%",fontSize:"1.25em",textAnchor:"middle",children:o("nutrition.valueEnergyKcal",{value:Ri(n,i.language)})}),b("text",{x:"50%",y:"60%",fontSize:"1em",textAnchor:"middle",children:e.planned.energy>0&&o(t<100?"nutrition.valueRemaining":"nutrition.valueTooMany")})]})]})}),G(Wt,{width:"50%",spacing:1,children:[b(Vy,{title:o("nutrition.protein"),percentage:e.percentage.protein,logged:e.logged.protein,planned:e.planned.protein}),b(Vy,{title:o("nutrition.carbohydrates"),percentage:e.percentage.carbohydrates,logged:e.logged.carbohydrates,planned:e.planned.carbohydrates}),b(Vy,{title:o("nutrition.fat"),percentage:e.percentage.fat,logged:e.logged.fat,planned:e.planned.fat})]})]})};function ue(){return ue=Object.assign?Object.assign.bind():function(e){for(var t=1;tn.searchParams.append("args[]",r)),`Minified MUI error #${e}; visit ${n} for the full message.`}const n0=B.oneOfType([B.func,B.object]);function dut(e){if(typeof e!="string")throw new Error(uut(7));return e.charAt(0).toUpperCase()+e.slice(1)}function KD(e){return e&&e.ownerDocument||document}function fut(e,t){typeof e=="function"?e(t):e&&(e.current=t)}const xu=typeof window<"u"?v.useLayoutEffect:v.useEffect;let N7=0;function put(e){const[t,n]=v.useState(e),r=e||t;return v.useEffect(()=>{t==null&&(N7+=1,n(`mui-${N7}`))},[t]),r}const hut={...vd},L7=hut.useId;function r0(e){if(L7!==void 0){const t=L7();return e??t}return put(e)}function Sg({controlled:e,default:t,name:n,state:r="value"}){const{current:o}=v.useRef(e!==void 0),[i,a]=v.useState(t),s=o?e:i,l=v.useCallback(c=>{o||a(c)},[]);return[s,l]}function kt(e){const t=v.useRef(e);return xu(()=>{t.current=e}),v.useRef((...n)=>(0,t.current)(...n)).current}function ua(...e){return v.useMemo(()=>e.every(t=>t==null)?null:t=>{e.forEach(n=>{fut(n,t)})},e)}const gut={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px"};function zn(e,t,n=void 0){const r={};for(const o in e){const i=e[o];let a="",s=!0;for(let l=0;le,mut=()=>{let e=F7;return{configure(t){e=t},generate(t){return e(t)},reset(){e=F7}}},yut=mut(),vut={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function Wn(e,t,n="Mui"){const r=vut[t];return r?`${n}-${r}`:`${yut.generate(e)}-${t}`}function Xn(e,t,n="Mui"){const r={};return t.forEach(o=>{r[o]=Wn(e,o,n)}),r}function but(e){return typeof e=="string"}function wut(e,t,n){return e===void 0||but(e)?t:{...t,ownerState:{...t.ownerState,...n}}}function xut(e,t=[]){if(e===void 0)return{};const n={};return Object.keys(e).filter(r=>r.match(/^on[A-Z]/)&&typeof e[r]=="function"&&!t.includes(r)).forEach(r=>{n[r]=e[r]}),n}function j7(e){if(e===void 0)return{};const t={};return Object.keys(e).filter(n=>!(n.match(/^on[A-Z]/)&&typeof e[n]=="function")).forEach(n=>{t[n]=e[n]}),t}function Sut(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:o,className:i}=e;if(!t){const p=de(n==null?void 0:n.className,i,o==null?void 0:o.className,r==null?void 0:r.className),h={...n==null?void 0:n.style,...o==null?void 0:o.style,...r==null?void 0:r.style},m={...n,...o,...r};return p.length>0&&(m.className=p),Object.keys(h).length>0&&(m.style=h),{props:m,internalRef:void 0}}const a=xut({...o,...r}),s=j7(r),l=j7(o),c=t(a),u=de(c==null?void 0:c.className,n==null?void 0:n.className,i,o==null?void 0:o.className,r==null?void 0:r.className),d={...c==null?void 0:c.style,...n==null?void 0:n.style,...o==null?void 0:o.style,...r==null?void 0:r.style},f={...c,...n,...l,...s};return u.length>0&&(f.className=u),Object.keys(d).length>0&&(f.style=d),{props:f,internalRef:c.ref}}function pp(e,t,n){return typeof e=="function"?e(t,n):e}function Yn(e){var d;const{elementType:t,externalSlotProps:n,ownerState:r,skipResolvingSlotProps:o=!1,...i}=e,a=o?{}:pp(n,r),{props:s,internalRef:l}=Sut({...i,externalSlotProps:a}),c=ua(l,a==null?void 0:a.ref,(d=e.additionalProps)==null?void 0:d.ref);return wut(t,{...s,ref:c},r)}const Cut=["localeText"],fF=v.createContext(null),Cg=function(t){const{localeText:n}=t,r=zt(t,Cut),{utils:o,localeText:i}=v.useContext(fF)??{utils:void 0,localeText:void 0},a=cn({props:r,name:"MuiLocalizationProvider"}),{children:s,dateAdapter:l,dateFormats:c,dateLibInstance:u,adapterLocale:d,localeText:f}=a,p=v.useMemo(()=>ue({},f,i,n),[f,i,n]),h=v.useMemo(()=>{if(!l)return o||null;const w=new l({locale:d,formats:c,instance:u});if(!w.isMUIAdapter)throw new Error(["MUI X: The date adapter should be imported from `@mui/x-date-pickers` or `@mui/x-date-pickers-pro`, not from `@date-io`","For example, `import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs'` instead of `import AdapterDayjs from '@date-io/dayjs'`","More information on the installation documentation: https://mui.com/x/react-date-pickers/getting-started/#installation"].join(` +`));return w},[l,d,c,u,o]),m=v.useMemo(()=>h?{minDate:h.date("1900-01-01T00:00:00.000"),maxDate:h.date("2099-12-31T00:00:00.000")}:null,[h]),y=v.useMemo(()=>({utils:h,defaultDates:m,localeText:p}),[m,h,p]);return R.jsx(fF.Provider,{value:y,children:s})},Eut=e=>({components:{MuiLocalizationProvider:{defaultProps:{localeText:ue({},e)}}}}),o0=e=>{const{utils:t,formatKey:n,contextTranslation:r,propsTranslation:o}=e;return i=>{const a=i!==null&&t.isValid(i)?t.format(i,n):null;return(o??r)(i,t,a)}},ole={previousMonth:"Previous month",nextMonth:"Next month",openPreviousView:"Open previous view",openNextView:"Open next view",calendarViewSwitchingButtonAriaLabel:e=>e==="year"?"year view is open, switch to calendar view":"calendar view is open, switch to year view",start:"Start",end:"End",startDate:"Start date",startTime:"Start time",endDate:"End date",endTime:"End time",cancelButtonLabel:"Cancel",clearButtonLabel:"Clear",okButtonLabel:"OK",todayButtonLabel:"Today",datePickerToolbarTitle:"Select date",dateTimePickerToolbarTitle:"Select date & time",timePickerToolbarTitle:"Select time",dateRangePickerToolbarTitle:"Select date range",clockLabelText:(e,t,n,r)=>`Select ${e}. ${!r&&(t===null||!n.isValid(t))?"No time selected":`Selected time is ${r??n.format(t,"fullTime")}`}`,hoursClockNumberText:e=>`${e} hours`,minutesClockNumberText:e=>`${e} minutes`,secondsClockNumberText:e=>`${e} seconds`,selectViewText:e=>`Select ${e}`,calendarWeekNumberHeaderLabel:"Week number",calendarWeekNumberHeaderText:"#",calendarWeekNumberAriaLabelText:e=>`Week ${e}`,calendarWeekNumberText:e=>`${e}`,openDatePickerDialogue:(e,t,n)=>n||e!==null&&t.isValid(e)?`Choose date, selected date is ${n??t.format(e,"fullDate")}`:"Choose date",openTimePickerDialogue:(e,t,n)=>n||e!==null&&t.isValid(e)?`Choose time, selected time is ${n??t.format(e,"fullTime")}`:"Choose time",fieldClearLabel:"Clear",timeTableLabel:"pick time",dateTableLabel:"pick date",fieldYearPlaceholder:e=>"Y".repeat(e.digitAmount),fieldMonthPlaceholder:e=>e.contentType==="letter"?"MMMM":"MM",fieldDayPlaceholder:()=>"DD",fieldWeekDayPlaceholder:e=>e.contentType==="letter"?"EEEE":"EE",fieldHoursPlaceholder:()=>"hh",fieldMinutesPlaceholder:()=>"mm",fieldSecondsPlaceholder:()=>"ss",fieldMeridiemPlaceholder:()=>"aa",year:"Year",month:"Month",day:"Day",weekDay:"Week day",hours:"Hours",minutes:"Minutes",seconds:"Seconds",meridiem:"Meridiem",empty:"Empty"},Put=ole;Eut(ole);const Vg=()=>{const e=v.useContext(fF);if(e===null)throw new Error(["MUI X: Can not find the date and time pickers localization context.","It looks like you forgot to wrap your component in LocalizationProvider.","This can also happen if you are bundling multiple versions of the `@mui/x-date-pickers` package"].join(` `));if(e.utils===null)throw new Error(["MUI X: Can not find the date and time pickers adapter from its localization context.","It looks like you forgot to pass a `dateAdapter` to your LocalizationProvider."].join(` -`));const t=v.useMemo(()=>ue({},Qct,e.localeText),[e.localeText]);return v.useMemo(()=>ue({},e,{localeText:t}),[e,t])},Cn=()=>zg().utils,Vg=()=>zg().defaultDates,Hg=e=>{const t=Cn(),n=v.useRef();return n.current===void 0&&(n.current=t.date(void 0,e)),n.current},$o=()=>zg().localeText,Xct=ct(R.jsx("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown"),Jct=ct(R.jsx("path",{d:"M15.41 16.59L10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z"}),"ArrowLeft"),Zct=ct(R.jsx("path",{d:"M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"}),"ArrowRight"),Xse=ct(R.jsx("path",{d:"M17 12h-5v5h5v-5zM16 1v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2h-1V1h-2zm3 18H5V8h14v11z"}),"Calendar"),eut=ct(R.jsxs(v.Fragment,{children:[R.jsx("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),R.jsx("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]}),"Clock"),tut=ct(R.jsx("path",{d:"M9 11H7v2h2v-2zm4 0h-2v2h2v-2zm4 0h-2v2h2v-2zm2-7h-1V2h-2v2H8V2H6v2H5c-1.11 0-1.99.9-1.99 2L3 20c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 16H5V9h14v11z"}),"DateRange"),nut=ct(R.jsxs(v.Fragment,{children:[R.jsx("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),R.jsx("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]}),"Time"),rut=ct(R.jsx("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Clear");function out(e){return Wn("MuiPickersArrowSwitcher",e)}Xn("MuiPickersArrowSwitcher",["root","spacer","button","previousIconButton","nextIconButton","leftArrowIcon","rightArrowIcon"]);const iut=["children","className","slots","slotProps","isNextDisabled","isNextHidden","onGoToNext","nextLabel","isPreviousDisabled","isPreviousHidden","onGoToPrevious","previousLabel","labelId"],aut=["ownerState"],sut=["ownerState"],lut=oe("div",{name:"MuiPickersArrowSwitcher",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex"}),cut=oe("div",{name:"MuiPickersArrowSwitcher",slot:"Spacer",overridesResolver:(e,t)=>t.spacer})(({theme:e})=>({width:e.spacing(3)})),_7=oe(vn,{name:"MuiPickersArrowSwitcher",slot:"Button",overridesResolver:(e,t)=>t.button})({variants:[{props:{hidden:!0},style:{visibility:"hidden"}}]}),uut=e=>{const{classes:t}=e;return zn({root:["root"],spacer:["spacer"],button:["button"],previousIconButton:["previousIconButton"],nextIconButton:["nextIconButton"],leftArrowIcon:["leftArrowIcon"],rightArrowIcon:["rightArrowIcon"]},out,t)},Jse=v.forwardRef(function(t,n){const r=dr(),o=cn({props:t,name:"MuiPickersArrowSwitcher"}),{children:i,className:a,slots:s,slotProps:l,isNextDisabled:c,isNextHidden:u,onGoToNext:d,nextLabel:f,isPreviousDisabled:p,isPreviousHidden:h,onGoToPrevious:m,previousLabel:y,labelId:w}=o,x=Vt(o,iut),C=o,E=uut(C),P={isDisabled:c,isHidden:u,goTo:d,label:f},T={isDisabled:p,isHidden:h,goTo:m,label:y},I=(s==null?void 0:s.previousIconButton)??_7,A=Yn({elementType:I,externalSlotProps:l==null?void 0:l.previousIconButton,additionalProps:{size:"medium",title:T.label,"aria-label":T.label,disabled:T.isDisabled,edge:"end",onClick:T.goTo},ownerState:ue({},C,{hidden:T.isHidden}),className:de(E.button,E.previousIconButton)}),k=(s==null?void 0:s.nextIconButton)??_7,O=Yn({elementType:k,externalSlotProps:l==null?void 0:l.nextIconButton,additionalProps:{size:"medium",title:P.label,"aria-label":P.label,disabled:P.isDisabled,edge:"start",onClick:P.goTo},ownerState:ue({},C,{hidden:P.isHidden}),className:de(E.button,E.nextIconButton)}),$=(s==null?void 0:s.leftArrowIcon)??Jct,N=Yn({elementType:$,externalSlotProps:l==null?void 0:l.leftArrowIcon,additionalProps:{fontSize:"inherit"},ownerState:C,className:E.leftArrowIcon}),L=Vt(N,aut),j=(s==null?void 0:s.rightArrowIcon)??Zct,D=Yn({elementType:j,externalSlotProps:l==null?void 0:l.rightArrowIcon,additionalProps:{fontSize:"inherit"},ownerState:C,className:E.rightArrowIcon}),_=Vt(D,sut);return R.jsxs(lut,ue({ref:n,className:de(E.root,a),ownerState:C},x,{children:[R.jsx(I,ue({},A,{children:r?R.jsx(j,ue({},_)):R.jsx($,ue({},L))})),i?R.jsx(st,{variant:"subtitle1",component:"span",id:w,children:i}):R.jsx(cut,{className:E.spacer,ownerState:C}),R.jsx(k,ue({},O,{children:r?R.jsx($,ue({},L)):R.jsx(j,ue({},_))}))]}))}),eu=(e,t)=>e.length!==t.length?!1:t.every(n=>e.includes(n)),kV=({openTo:e,defaultOpenTo:t,views:n,defaultViews:r})=>{const o=n??r;let i;if(e!=null)i=e;else if(o.includes(t))i=t;else if(o.length>0)i=o[0];else throw new Error("MUI X: The `views` prop must contain at least one view.");return{views:o,openTo:i}},Zse=["hours","minutes","seconds"],ob=e=>Zse.includes(e),Bw=e=>Zse.includes(e)||e==="meridiem",dut=(e,t)=>e?t.getHours(e)>=12?"pm":"am":null,jS=(e,t,n)=>n&&(e>=12?"pm":"am")!==t?t==="am"?e-12:e+12:e,fut=(e,t,n,r)=>{const o=jS(r.getHours(e),t,n);return r.setHours(e,o)},N7=(e,t)=>t.getHours(e)*3600+t.getMinutes(e)*60+t.getSeconds(e),t1=(e,t)=>(n,r)=>e?t.isAfter(n,r):N7(n,t)>N7(r,t),dO=(e,{format:t,views:n,ampm:r})=>{if(t!=null)return t;const o=e.formats;return eu(n,["hours"])?r?`${o.hours12h} ${o.meridiem}`:o.hours24h:eu(n,["minutes"])?o.minutes:eu(n,["seconds"])?o.seconds:eu(n,["minutes","seconds"])?`${o.minutes}:${o.seconds}`:eu(n,["hours","minutes","seconds"])?r?`${o.hours12h}:${o.minutes}:${o.seconds} ${o.meridiem}`:`${o.hours24h}:${o.minutes}:${o.seconds}`:r?`${o.hours12h}:${o.minutes} ${o.meridiem}`:`${o.hours24h}:${o.minutes}`};function n1({onChange:e,onViewChange:t,openTo:n,view:r,views:o,autoFocus:i,focusedView:a,onFocusedViewChange:s}){const l=v.useRef(n),c=v.useRef(o),u=v.useRef(o.includes(n)?n:o[0]),[d,f]=wg({name:"useViews",state:"view",controlled:r,default:u.current}),p=v.useRef(i?d:null),[h,m]=wg({name:"useViews",state:"focusedView",controlled:a,default:p.current});v.useEffect(()=>{(l.current&&l.current!==n||c.current&&c.current.some(I=>!o.includes(I)))&&(f(o.includes(n)?n:o[0]),c.current=o,l.current=n)},[n,f,d,o]);const y=o.indexOf(d),w=o[y-1]??null,x=o[y+1]??null,C=kt((I,A)=>{m(A?I:k=>I===k?null:k),s==null||s(I,A)}),E=kt(I=>{C(I,!0),I!==d&&(f(I),t&&t(I))}),P=kt(()=>{x&&E(x)}),T=kt((I,A,k)=>{const O=A==="finish",$=k?o.indexOf(k){const i=o.date(void 0,r),a=o.startOfMonth(t&&o.isBefore(i,n)?i:n);return!o.isAfter(a,e)},[t,n,e,o,r])}function hut(e,{disablePast:t,minDate:n,timezone:r}){const o=Cn();return v.useMemo(()=>{const i=o.date(void 0,r),a=o.startOfMonth(t&&o.isAfter(i,n)?i:n);return!o.isBefore(a,e)},[t,n,e,o,r])}function lM(e,t,n,r){const o=Cn(),i=dut(e,o),a=v.useCallback(s=>{const l=e==null?null:fut(e,s,!!t,o);n(l,r??"partial")},[t,e,n,r,o]);return{meridiemMode:i,handleMeridiemChange:a}}const BS=36,cM=2,uM=320,gut=280,dM=336,ele=232,zw=48,fM=oe("div")({overflow:"hidden",width:uM,maxHeight:dM,display:"flex",flexDirection:"column",margin:"0 auto"});function mut(e){return Wn("MuiTimeClock",e)}Xn("MuiTimeClock",["root","arrowSwitcher"]);const ib=220,dd=36,zS={x:ib/2,y:ib/2},tle={x:zS.x,y:0},yut=tle.x-zS.x,vut=tle.y-zS.y,but=e=>e*(180/Math.PI),nle=(e,t,n)=>{const r=t-zS.x,o=n-zS.y,i=Math.atan2(yut,vut)-Math.atan2(r,o);let a=but(i);a=Math.round(a/e)*e,a%=360;const s=Math.floor(a/e)||0,l=r**2+o**2,c=Math.sqrt(l);return{value:s,distance:c}},wut=(e,t,n=1)=>{const r=n*6;let{value:o}=nle(r,e,t);return o=o*n%60,o},xut=(e,t,n)=>{const{value:r,distance:o}=nle(30,e,t);let i=r||12;return n?i%=12:o{const{classes:t}=e;return zn({root:["root"],thumb:["thumb"]},Sut,t)},Put=oe("div",{name:"MuiClockPointer",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({width:2,backgroundColor:(e.vars||e).palette.primary.main,position:"absolute",left:"calc(50% - 1px)",bottom:"50%",transformOrigin:"center bottom 0px",variants:[{props:{shouldAnimate:!0},style:{transition:e.transitions.create(["transform","height"])}}]})),Tut=oe("div",{name:"MuiClockPointer",slot:"Thumb",overridesResolver:(e,t)=>t.thumb})(({theme:e})=>({width:4,height:4,backgroundColor:(e.vars||e).palette.primary.contrastText,borderRadius:"50%",position:"absolute",top:-21,left:`calc(50% - ${dd/2}px)`,border:`${(dd-4)/2}px solid ${(e.vars||e).palette.primary.main}`,boxSizing:"content-box",variants:[{props:{hasSelected:!0},style:{backgroundColor:(e.vars||e).palette.primary.main}}]}));function Iut(e){const t=cn({props:e,name:"MuiClockPointer"}),{className:n,isInner:r,type:o,viewValue:i}=t,a=Vt(t,Cut),s=v.useRef(o);v.useEffect(()=>{s.current=o},[o]);const l=ue({},t,{shouldAnimate:s.current!==o}),c=Eut(l),u=()=>{let f=360/(o==="hours"?12:60)*i;return o==="hours"&&i>12&&(f-=360),{height:Math.round((r?.26:.4)*ib),transform:`rotateZ(${f}deg)`}};return R.jsx(Put,ue({style:u(),className:de(c.root,n),ownerState:l},a,{children:R.jsx(Tut,{ownerState:l,className:c.thumb})}))}function Out(e){return Wn("MuiClock",e)}Xn("MuiClock",["root","clock","wrapper","squareMask","pin","amButton","pmButton","meridiemText","selected"]);const fO=(e,t,n)=>{let r=t;return r=e.setHours(r,e.getHours(n)),r=e.setMinutes(r,e.getMinutes(n)),r=e.setSeconds(r,e.getSeconds(n)),r=e.setMilliseconds(r,e.getMilliseconds(n)),r},wx=({date:e,disableFuture:t,disablePast:n,maxDate:r,minDate:o,isDateDisabled:i,utils:a,timezone:s})=>{const l=fO(a,a.date(void 0,s),e);n&&a.isBefore(o,l)&&(o=l),t&&a.isAfter(r,l)&&(r=l);let c=e,u=e;for(a.isBefore(e,o)&&(c=o,u=null),a.isAfter(e,r)&&(u&&(u=r),c=null);c||u;){if(c&&a.isAfter(c,r)&&(c=null),u&&a.isBefore(u,o)&&(u=null),c){if(!i(c))return c;c=a.addDays(c,1)}if(u){if(!i(u))return u;u=a.addDays(u,-1)}}return null},Aut=(e,t)=>t==null||!e.isValid(t)?null:t,Li=(e,t,n)=>t==null||!e.isValid(t)?n:t,kut=(e,t,n)=>!e.isValid(t)&&t!=null&&!e.isValid(n)&&n!=null?!0:e.isEqual(t,n),MV=(e,t)=>{const r=[e.startOfYear(t)];for(;r.length<12;){const o=r[r.length-1];r.push(e.addMonths(o,1))}return r},RV=(e,t,n)=>n==="date"?e.startOfDay(e.date(void 0,t)):e.date(void 0,t),hc=(e,t)=>{const n=e.setHours(e.date(),t==="am"?2:14);return e.format(n,"meridiem")},Mut=["year","month","day"],ab=e=>Mut.includes(e),VS=(e,{format:t,views:n},r)=>{if(t!=null)return t;const o=e.formats;return eu(n,["year"])?o.year:eu(n,["month"])?o.month:eu(n,["day"])?o.dayOfMonth:eu(n,["month","year"])?`${o.month} ${o.year}`:eu(n,["day","month"])?`${o.month} ${o.dayOfMonth}`:r?/en/.test(e.getCurrentLocaleCode())?o.normalDateWithWeekday:o.normalDate:o.keyboardDate},Rut=(e,t)=>{const n=e.startOfWeek(t);return[0,1,2,3,4,5,6].map(r=>e.addDays(n,r))},$ut=e=>{const{classes:t,meridiemMode:n}=e;return zn({root:["root"],clock:["clock"],wrapper:["wrapper"],squareMask:["squareMask"],pin:["pin"],amButton:["amButton",n==="am"&&"selected"],pmButton:["pmButton",n==="pm"&&"selected"],meridiemText:["meridiemText"]},Out,t)},Dut=oe("div",{name:"MuiClock",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({display:"flex",justifyContent:"center",alignItems:"center",margin:e.spacing(2)})),_ut=oe("div",{name:"MuiClock",slot:"Clock",overridesResolver:(e,t)=>t.clock})({backgroundColor:"rgba(0,0,0,.07)",borderRadius:"50%",height:220,width:220,flexShrink:0,position:"relative",pointerEvents:"none"}),Nut=oe("div",{name:"MuiClock",slot:"Wrapper",overridesResolver:(e,t)=>t.wrapper})({"&:focus":{outline:"none"}}),Lut=oe("div",{name:"MuiClock",slot:"SquareMask",overridesResolver:(e,t)=>t.squareMask})({width:"100%",height:"100%",position:"absolute",pointerEvents:"auto",outline:0,touchAction:"none",userSelect:"none",variants:[{props:{disabled:!1},style:{"@media (pointer: fine)":{cursor:"pointer",borderRadius:"50%"},"&:active":{cursor:"move"}}}]}),Fut=oe("div",{name:"MuiClock",slot:"Pin",overridesResolver:(e,t)=>t.pin})(({theme:e})=>({width:6,height:6,borderRadius:"50%",backgroundColor:(e.vars||e).palette.primary.main,position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)"})),rle=(e,t)=>({zIndex:1,bottom:8,paddingLeft:4,paddingRight:4,width:dd,variants:[{props:{meridiemMode:t},style:{backgroundColor:(e.vars||e).palette.primary.main,color:(e.vars||e).palette.primary.contrastText,"&:hover":{backgroundColor:(e.vars||e).palette.primary.light}}}]}),jut=oe(vn,{name:"MuiClock",slot:"AmButton",overridesResolver:(e,t)=>t.amButton})(({theme:e})=>ue({},rle(e,"am"),{position:"absolute",left:8})),But=oe(vn,{name:"MuiClock",slot:"PmButton",overridesResolver:(e,t)=>t.pmButton})(({theme:e})=>ue({},rle(e,"pm"),{position:"absolute",right:8})),L7=oe(st,{name:"MuiClock",slot:"meridiemText",overridesResolver:(e,t)=>t.meridiemText})({overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"});function zut(e){const t=cn({props:e,name:"MuiClock"}),{ampm:n,ampmInClock:r,autoFocus:o,children:i,value:a,handleMeridiemChange:s,isTimeDisabled:l,meridiemMode:c,minutesStep:u=1,onChange:d,selectedId:f,type:p,viewValue:h,disabled:m=!1,readOnly:y,className:w}=t,x=t,C=Cn(),E=$o(),P=v.useRef(!1),T=$ut(x),I=l(h,p),A=!n&&p==="hours"&&(h<1||h>12),k=(V,U)=>{m||y||l(V,p)||d(V,U)},O=(V,U)=>{let{offsetX:q,offsetY:X}=V;if(q===void 0){const ee=V.target.getBoundingClientRect();q=V.changedTouches[0].clientX-ee.left,X=V.changedTouches[0].clientY-ee.top}const ie=p==="seconds"||p==="minutes"?wut(q,X,u):xut(q,X,!!n);k(ie,U)},$=V=>{P.current=!0,O(V,"shallow")},N=V=>{P.current&&(O(V,"finish"),P.current=!1)},L=V=>{V.buttons>0&&O(V.nativeEvent,"shallow")},j=V=>{P.current&&(P.current=!1),O(V.nativeEvent,"finish")},D=v.useMemo(()=>p==="hours"?!0:h%5===0,[p,h]),_=p==="minutes"?u:1,z=v.useRef(null);bu(()=>{o&&z.current.focus()},[o]);const F=V=>{if(!P.current)switch(V.key){case"Home":k(0,"partial"),V.preventDefault();break;case"End":k(p==="minutes"?59:23,"partial"),V.preventDefault();break;case"ArrowUp":k(h+_,"partial"),V.preventDefault();break;case"ArrowDown":k(h-_,"partial"),V.preventDefault();break;case"PageUp":k(h+5,"partial"),V.preventDefault();break;case"PageDown":k(h-5,"partial"),V.preventDefault();break;case"Enter":case" ":k(h,"finish"),V.preventDefault();break}};return R.jsxs(Dut,{className:de(T.root,w),children:[R.jsxs(_ut,{className:T.clock,children:[R.jsx(Lut,{onTouchMove:$,onTouchStart:$,onTouchEnd:N,onMouseUp:j,onMouseMove:L,ownerState:{disabled:m},className:T.squareMask}),!I&&R.jsxs(v.Fragment,{children:[R.jsx(Fut,{className:T.pin}),a!=null&&R.jsx(Iut,{type:p,viewValue:h,isInner:A,hasSelected:D})]}),R.jsx(Nut,{"aria-activedescendant":f,"aria-label":E.clockLabelText(p,a,C,a==null?null:C.format(a,"fullTime")),ref:z,role:"listbox",onKeyDown:F,tabIndex:0,className:T.wrapper,children:i})]}),n&&r&&R.jsxs(v.Fragment,{children:[R.jsx(jut,{onClick:y?void 0:()=>s("am"),disabled:m||c===null,ownerState:x,className:T.amButton,title:hc(C,"am"),children:R.jsx(L7,{variant:"caption",className:T.meridiemText,children:hc(C,"am")})}),R.jsx(But,{disabled:m||c===null,onClick:y?void 0:()=>s("pm"),ownerState:x,className:T.pmButton,title:hc(C,"pm"),children:R.jsx(L7,{variant:"caption",className:T.meridiemText,children:hc(C,"pm")})})]})]})}function Vut(e){return Wn("MuiClockNumber",e)}const sP=Xn("MuiClockNumber",["root","selected","disabled"]),Hut=["className","disabled","index","inner","label","selected"],Uut=e=>{const{classes:t,selected:n,disabled:r}=e;return zn({root:["root",n&&"selected",r&&"disabled"]},Vut,t)},Wut=oe("span",{name:"MuiClockNumber",slot:"Root",overridesResolver:(e,t)=>[t.root,{[`&.${sP.disabled}`]:t.disabled},{[`&.${sP.selected}`]:t.selected}]})(({theme:e})=>({height:dd,width:dd,position:"absolute",left:`calc((100% - ${dd}px) / 2)`,display:"inline-flex",justifyContent:"center",alignItems:"center",borderRadius:"50%",color:(e.vars||e).palette.text.primary,fontFamily:e.typography.fontFamily,"&:focused":{backgroundColor:(e.vars||e).palette.background.paper},[`&.${sP.selected}`]:{color:(e.vars||e).palette.primary.contrastText},[`&.${sP.disabled}`]:{pointerEvents:"none",color:(e.vars||e).palette.text.disabled},variants:[{props:{inner:!0},style:ue({},e.typography.body2,{color:(e.vars||e).palette.text.secondary})}]}));function ole(e){const t=cn({props:e,name:"MuiClockNumber"}),{className:n,disabled:r,index:o,inner:i,label:a,selected:s}=t,l=Vt(t,Hut),c=t,u=Uut(c),d=o%12/12*Math.PI*2-Math.PI/2,f=(ib-dd-2)/2*(i?.65:1),p=Math.round(Math.cos(d)*f),h=Math.round(Math.sin(d)*f);return R.jsx(Wut,ue({className:de(u.root,n),"aria-disabled":r?!0:void 0,"aria-selected":s?!0:void 0,role:"option",style:{transform:`translate(${p}px, ${h+(ib-dd)/2}px`},ownerState:c},l,{children:a}))}const Gut=({ampm:e,value:t,getClockNumberText:n,isDisabled:r,selectedId:o,utils:i})=>{const a=t?i.getHours(t):null,s=[],l=e?1:0,c=e?12:23,u=d=>a===null?!1:e?d===12?a===12||a===0:a===d||a-12===d:a===d;for(let d=l;d<=c;d+=1){let f=d.toString();d===0&&(f="00");const p=!e&&(d===0||d>12);f=i.formatNumber(f);const h=u(d);s.push(R.jsx(ole,{id:h?o:void 0,index:d,inner:p,selected:h,disabled:r(d),label:f,"aria-label":n(f)},d))}return s},F7=({utils:e,value:t,isDisabled:n,getClockNumberText:r,selectedId:o})=>{const i=e.formatNumber;return[[5,i("05")],[10,i("10")],[15,i("15")],[20,i("20")],[25,i("25")],[30,i("30")],[35,i("35")],[40,i("40")],[45,i("45")],[50,i("50")],[55,i("55")],[0,i("00")]].map(([a,s],l)=>{const c=a===t;return R.jsx(ole,{label:s,id:c?o:void 0,index:l+1,inner:!1,disabled:n(a),selected:c,"aria-label":r(s)},a)})},$V=({timezone:e,value:t,defaultValue:n,onChange:r,valueManager:o})=>{const i=Cn(),a=v.useRef(n),s=t??a.current??o.emptyValue,l=v.useMemo(()=>o.getTimezone(i,s),[i,o,s]),c=kt(p=>l==null?p:o.setTimezone(i,l,p)),u=e??l??"default",d=v.useMemo(()=>o.setTimezone(i,u,s),[o,i,u,s]),f=kt((p,...h)=>{const m=c(p);r==null||r(m,...h)});return{value:d,handleValueChange:f,timezone:u}},t0=({name:e,timezone:t,value:n,defaultValue:r,onChange:o,valueManager:i})=>{const[a,s]=wg({name:e,state:"value",controlled:n,default:r??i.emptyValue}),l=kt((c,...u)=>{s(c),o==null||o(c,...u)});return $V({timezone:t,value:a,defaultValue:void 0,onChange:l,valueManager:i})},dc={year:1,month:2,day:3,hours:4,minutes:5,seconds:6,milliseconds:7},qut=e=>Math.max(...e.map(t=>dc[t.type]??1)),fw=(e,t,n)=>{if(t===dc.year)return e.startOfYear(n);if(t===dc.month)return e.startOfMonth(n);if(t===dc.day)return e.startOfDay(n);let r=n;return t{let i=o?o():fw(t,n,RV(t,r));e.minDate!=null&&t.isAfterDay(e.minDate,i)&&(i=fw(t,n,e.minDate)),e.maxDate!=null&&t.isBeforeDay(e.maxDate,i)&&(i=fw(t,n,e.maxDate));const a=t1(e.disableIgnoringDatePartForTimeValidation??!1,t);return e.minTime!=null&&a(e.minTime,i)&&(i=fw(t,n,e.disableIgnoringDatePartForTimeValidation?e.minTime:fO(t,i,e.minTime))),e.maxTime!=null&&a(i,e.maxTime)&&(i=fw(t,n,e.disableIgnoringDatePartForTimeValidation?e.maxTime:fO(t,i,e.maxTime))),i},ile=(e,t)=>{const n=e.formatTokenMap[t];if(n==null)throw new Error([`MUI X: The token "${t}" is not supported by the Date and Time Pickers.`,"Please try using another token or open an issue on https://github.com/mui/mui-x/issues/new/choose if you think it should be supported."].join(` -`));return typeof n=="string"?{type:n,contentType:n==="meridiem"?"letter":"digit",maxLength:void 0}:{type:n.sectionType,contentType:n.contentType,maxLength:n.maxLength}},Yut=e=>{switch(e){case"ArrowUp":return 1;case"ArrowDown":return-1;case"PageUp":return 5;case"PageDown":return-5;default:return 0}},pM=(e,t)=>{const n=[],r=e.date(void 0,"default"),o=e.startOfWeek(r),i=e.endOfWeek(r);let a=o;for(;e.isBefore(a,i);)n.push(a),a=e.addDays(a,1);return n.map(s=>e.formatByString(s,t))},ale=(e,t,n,r)=>{switch(n){case"month":return MV(e,e.date(void 0,t)).map(o=>e.formatByString(o,r));case"weekDay":return pM(e,r);case"meridiem":{const o=e.date(void 0,t);return[e.startOfDay(o),e.endOfDay(o)].map(i=>e.formatByString(i,r))}default:return[]}},j7="s",Qut=["0","1","2","3","4","5","6","7","8","9"],Xut=e=>{const t=e.date(void 0);return e.formatByString(e.setSeconds(t,0),j7)==="0"?Qut:Array.from({length:10}).map((r,o)=>e.formatByString(e.setSeconds(t,o),j7))},Sg=(e,t)=>{if(t[0]==="0")return e;const n=[];let r="";for(let o=0;o-1&&(n.push(i.toString()),r="")}return n.join("")},DV=(e,t)=>t[0]==="0"?e:e.split("").map(n=>t[Number(n)]).join(""),B7=(e,t)=>{const n=Sg(e,t);return n!==" "&&!Number.isNaN(Number(n))},sle=(e,t)=>{let n=e;for(n=Number(n).toString();n.length{if(o.type==="day"&&o.contentType==="digit-with-letter"){const a=e.setDate(n.longestMonth,t);return e.formatByString(a,o.format)}let i=t.toString();return o.hasLeadingZerosInInput&&(i=sle(i,o.maxLength)),DV(i,r)},Jut=(e,t,n,r,o,i,a,s)=>{const l=Yut(r),c=r==="Home",u=r==="End",d=n.value===""||c||u,f=()=>{const h=o[n.type]({currentDate:a,format:n.format,contentType:n.contentType}),m=C=>lle(e,C,h,i,n),y=n.type==="minutes"&&(s!=null&&s.minutesStep)?s.minutesStep:1;let x=parseInt(Sg(n.value,i),10)+l*y;if(d){if(n.type==="year"&&!u&&!c)return e.formatByString(e.date(void 0,t),n.format);l>0||c?x=h.minimum:x=h.maximum}return x%y!==0&&((l<0||c)&&(x+=y-(y+x)%y),(l>0||u)&&(x-=x%y)),x>h.maximum?m(h.minimum+(x-h.maximum-1)%(h.maximum-h.minimum+1)):x{const h=ale(e,t,n.type,n.format);if(h.length===0)return n.value;if(d)return l>0||c?h[0]:h[h.length-1];const w=((h.indexOf(n.value)+l)%h.length+h.length)%h.length;return h[w]};return n.contentType==="digit"||n.contentType==="digit-with-letter"?f():p()},_V=(e,t,n)=>{let r=e.value||e.placeholder;const o=t==="non-input"?e.hasLeadingZerosInFormat:e.hasLeadingZerosInInput;return t==="non-input"&&e.hasLeadingZerosInInput&&!e.hasLeadingZerosInFormat&&(r=Number(Sg(r,n)).toString()),["input-rtl","input-ltr"].includes(t)&&e.contentType==="digit"&&!o&&r.length===1&&(r=`${r}‎`),t==="input-rtl"&&(r=`⁨${r}⁩`),r},z7=(e,t,n,r)=>e.formatByString(e.parse(t,n),r),cle=(e,t)=>e.formatByString(e.date(void 0,"system"),t).length===4,ule=(e,t,n,r)=>{if(t!=="digit")return!1;const o=e.date(void 0,"default");switch(n){case"year":return cle(e,r)?e.formatByString(e.setYear(o,1),r)==="0001":e.formatByString(e.setYear(o,2001),r)==="01";case"month":return e.formatByString(e.startOfYear(o),r).length>1;case"day":return e.formatByString(e.startOfMonth(o),r).length>1;case"weekDay":return e.formatByString(e.startOfWeek(o),r).length>1;case"hours":return e.formatByString(e.setHours(o,1),r).length>1;case"minutes":return e.formatByString(e.setMinutes(o,1),r).length>1;case"seconds":return e.formatByString(e.setSeconds(o,1),r).length>1;default:throw new Error("Invalid section type")}},Zut=(e,t,n)=>{const r=t.some(l=>l.type==="day"),o=[],i=[];for(let l=0;le.map(t=>`${t.startSeparator}${t.value||t.placeholder}${t.endSeparator}`).join(""),tdt=(e,t,n)=>{const o=e.map(i=>{const a=_V(i,n?"input-rtl":"input-ltr",t);return`${i.startSeparator}${a}${i.endSeparator}`}).join("");return n?`⁦${o}⁩`:o},ndt=(e,t,n)=>{const r=e.date(void 0,n),o=e.endOfYear(r),i=e.endOfDay(r),{maxDaysInMonth:a,longestMonth:s}=MV(e,r).reduce((l,c)=>{const u=e.getDaysInMonth(c);return u>l.maxDaysInMonth?{maxDaysInMonth:u,longestMonth:c}:l},{maxDaysInMonth:0,longestMonth:null});return{year:({format:l})=>({minimum:0,maximum:cle(e,l)?9999:99}),month:()=>({minimum:1,maximum:e.getMonth(o)+1}),day:({currentDate:l})=>({minimum:1,maximum:l!=null&&e.isValid(l)?e.getDaysInMonth(l):a,longestMonth:s}),weekDay:({format:l,contentType:c})=>{if(c==="digit"){const u=pM(e,l).map(Number);return{minimum:Math.min(...u),maximum:Math.max(...u)}}return{minimum:1,maximum:7}},hours:({format:l})=>{const c=e.getHours(i);return Sg(e.formatByString(e.endOfDay(r),l),t)!==c.toString()?{minimum:1,maximum:Number(Sg(e.formatByString(e.startOfDay(r),l),t))}:{minimum:0,maximum:c}},minutes:()=>({minimum:0,maximum:e.getMinutes(i)}),seconds:()=>({minimum:0,maximum:e.getSeconds(i)}),meridiem:()=>({minimum:0,maximum:1}),empty:()=>({minimum:0,maximum:0})}},rdt=(e,t,n,r)=>{switch(t.type){case"year":return e.setYear(r,e.getYear(n));case"month":return e.setMonth(r,e.getMonth(n));case"weekDay":{const o=pM(e,t.format),i=e.formatByString(n,t.format),a=o.indexOf(i),l=o.indexOf(t.value)-a;return e.addDays(n,l)}case"day":return e.setDate(r,e.getDate(n));case"meridiem":{const o=e.getHours(n)<12,i=e.getHours(r);return o&&i>=12?e.addHours(r,-12):!o&&i<12?e.addHours(r,12):r}case"hours":return e.setHours(r,e.getHours(n));case"minutes":return e.setMinutes(r,e.getMinutes(n));case"seconds":return e.setSeconds(r,e.getSeconds(n));default:return r}},V7={year:1,month:2,day:3,weekDay:4,hours:5,minutes:6,seconds:7,meridiem:8,empty:9},H7=(e,t,n,r,o)=>[...n].sort((i,a)=>V7[i.type]-V7[a.type]).reduce((i,a)=>!o||a.modified?rdt(e,a,t,i):i,r),odt=()=>navigator.userAgent.toLowerCase().includes("android"),idt=(e,t)=>{const n={};if(!t)return e.forEach((l,c)=>{const u=c===0?null:c-1,d=c===e.length-1?null:c+1;n[c]={leftIndex:u,rightIndex:d}}),{neighbors:n,startIndex:0,endIndex:e.length-1};const r={},o={};let i=0,a=0,s=e.length-1;for(;s>=0;){a=e.findIndex((l,c)=>{var u;return c>=i&&((u=l.endSeparator)==null?void 0:u.includes(" "))&&l.endSeparator!==" / "}),a===-1&&(a=e.length-1);for(let l=a;l>=i;l-=1)o[l]=s,r[s]=l,s-=1;i=a+1}return e.forEach((l,c)=>{const u=o[c],d=u===0?null:r[u-1],f=u===e.length-1?null:r[u+1];n[c]={leftIndex:d,rightIndex:f}}),{neighbors:n,startIndex:r[0],endIndex:r[e.length-1]}},lF=(e,t)=>e==null?null:e==="all"?"all":typeof e=="string"?t.findIndex(n=>n.type===e):e,adt=(e,t)=>{if(e.value)switch(e.type){case"month":{if(e.contentType==="digit")return t.format(t.setMonth(t.date(),Number(e.value)-1),"month");const n=t.parse(e.value,e.format);return n?t.format(n,"month"):void 0}case"day":return e.contentType==="digit"?t.format(t.setDate(t.startOfYear(t.date()),Number(e.value)),"dayOfMonthFull"):e.value;case"weekDay":return;default:return}},sdt=(e,t)=>{if(e.value)switch(e.type){case"weekDay":return e.contentType==="letter"?void 0:Number(e.value);case"meridiem":{const n=t.parse(`01:00 ${e.value}`,`${t.formats.hours12h}:${t.formats.minutes} ${e.format}`);return n?t.getHours(n)>=12?1:0:void 0}case"day":return e.contentType==="digit-with-letter"?parseInt(e.value,10):Number(e.value);case"month":{if(e.contentType==="digit")return Number(e.value);const n=t.parse(e.value,e.format);return n?t.getMonth(n)+1:void 0}default:return e.contentType!=="letter"?Number(e.value):void 0}},ldt=["value","referenceDate"],po={emptyValue:null,getTodayValue:RV,getInitialReferenceValue:e=>{let{value:t,referenceDate:n}=e,r=Vt(e,ldt);return t!=null&&r.utils.isValid(t)?t:n??Kut(r)},cleanValue:Aut,areValuesEqual:kut,isSameError:(e,t)=>e===t,hasError:e=>e!=null,defaultErrorState:null,getTimezone:(e,t)=>t==null||!e.isValid(t)?null:e.getTimezone(t),setTimezone:(e,t,n)=>n==null?null:e.setTimezone(n,t)},NV={updateReferenceValue:(e,t,n)=>t==null||!e.isValid(t)?n:t,getSectionsFromValue:(e,t,n,r)=>!e.isValid(t)&&!!n?n:r(t),getV7HiddenInputValueFromSections:edt,getV6InputValueFromSections:tdt,getActiveDateManager:(e,t)=>({date:t.value,referenceDate:t.referenceValue,getSections:n=>n,getNewValuesFromNewActiveDate:n=>({value:n,referenceValue:n==null||!e.isValid(n)?t.referenceValue:n})}),parseValueStr:(e,t,n)=>n(e.trim(),t)},LV=({value:e,referenceDate:t,utils:n,props:r,timezone:o})=>{const i=v.useMemo(()=>po.getInitialReferenceValue({value:e,utils:n,props:r,referenceDate:t,granularity:dc.day,timezone:o,getTodayDate:()=>RV(n,o,"date")}),[]);return e??i},cdt=["ampm","ampmInClock","autoFocus","slots","slotProps","value","defaultValue","referenceDate","disableIgnoringDatePartForTimeValidation","maxTime","minTime","disableFuture","disablePast","minutesStep","shouldDisableTime","showViewSwitcher","onChange","view","views","openTo","onViewChange","focusedView","onFocusedViewChange","className","disabled","readOnly","timezone"],udt=e=>{const{classes:t}=e;return zn({root:["root"],arrowSwitcher:["arrowSwitcher"]},mut,t)},ddt=oe(fM,{name:"MuiTimeClock",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",flexDirection:"column",position:"relative"}),fdt=oe(Jse,{name:"MuiTimeClock",slot:"ArrowSwitcher",overridesResolver:(e,t)=>t.arrowSwitcher})({position:"absolute",right:12,top:15}),pdt=["hours","minutes"],hdt=v.forwardRef(function(t,n){const r=Cn(),o=cn({props:t,name:"MuiTimeClock"}),{ampm:i=r.is12HourCycleInCurrentLocale(),ampmInClock:a=!1,autoFocus:s,slots:l,slotProps:c,value:u,defaultValue:d,referenceDate:f,disableIgnoringDatePartForTimeValidation:p=!1,maxTime:h,minTime:m,disableFuture:y,disablePast:w,minutesStep:x=1,shouldDisableTime:C,showViewSwitcher:E,onChange:P,view:T,views:I=pdt,openTo:A,onViewChange:k,focusedView:O,onFocusedViewChange:$,className:N,disabled:L,readOnly:j,timezone:D}=o,_=Vt(o,cdt),{value:z,handleValueChange:F,timezone:V}=t0({name:"TimeClock",timezone:D,value:u,defaultValue:d,onChange:P,valueManager:po}),U=LV({value:z,referenceDate:f,utils:r,props:o,timezone:V}),q=$o(),X=Hg(V),{view:ie,setView:ee,previousView:Q,nextView:te,setValueAndGoToNextView:pe}=n1({view:T,views:I,openTo:A,onViewChange:k,onChange:F,focusedView:O,onFocusedViewChange:$}),{meridiemMode:ae,handleMeridiemChange:se}=lM(U,i,pe),re=v.useCallback((we,me)=>{const Se=t1(p,r),xe=me==="hours"||me==="minutes"&&I.includes("seconds"),ke=({start:_e,end:ye})=>!(m&&Se(m,ye)||h&&Se(_e,h)||y&&Se(_e,X)||w&&Se(X,xe?ye:_e)),De=(_e,ye=1)=>{if(_e%ye!==0)return!1;if(C)switch(me){case"hours":return!C(r.setHours(U,_e),"hours");case"minutes":return!C(r.setMinutes(U,_e),"minutes");case"seconds":return!C(r.setSeconds(U,_e),"seconds");default:return!1}return!0};switch(me){case"hours":{const _e=jS(we,ae,i),ye=r.setHours(U,_e),Pe=r.setSeconds(r.setMinutes(ye,0),0),Ae=r.setSeconds(r.setMinutes(ye,59),59);return!ke({start:Pe,end:Ae})||!De(_e)}case"minutes":{const _e=r.setMinutes(U,we),ye=r.setSeconds(_e,0),Pe=r.setSeconds(_e,59);return!ke({start:ye,end:Pe})||!De(we,x)}case"seconds":{const _e=r.setSeconds(U,we);return!ke({start:_e,end:_e})||!De(we)}default:throw new Error("not supported")}},[i,U,p,h,ae,m,x,C,r,y,w,X,I]),fe=Zb(),Z=v.useMemo(()=>{switch(ie){case"hours":{const we=(me,Se)=>{const xe=jS(me,ae,i);pe(r.setHours(U,xe),Se,"hours")};return{onChange:we,viewValue:r.getHours(U),children:Gut({value:z,utils:r,ampm:i,onChange:we,getClockNumberText:q.hoursClockNumberText,isDisabled:me=>L||re(me,"hours"),selectedId:fe})}}case"minutes":{const we=r.getMinutes(U),me=(Se,xe)=>{pe(r.setMinutes(U,Se),xe,"minutes")};return{viewValue:we,onChange:me,children:F7({utils:r,value:we,onChange:me,getClockNumberText:q.minutesClockNumberText,isDisabled:Se=>L||re(Se,"minutes"),selectedId:fe})}}case"seconds":{const we=r.getSeconds(U),me=(Se,xe)=>{pe(r.setSeconds(U,Se),xe,"seconds")};return{viewValue:we,onChange:me,children:F7({utils:r,value:we,onChange:me,getClockNumberText:q.secondsClockNumberText,isDisabled:Se=>L||re(Se,"seconds"),selectedId:fe})}}default:throw new Error("You must provide the type for ClockView")}},[ie,r,z,i,q.hoursClockNumberText,q.minutesClockNumberText,q.secondsClockNumberText,ae,pe,U,re,fe,L]),ce=o,ge=udt(ce);return R.jsxs(ddt,ue({ref:n,className:de(ge.root,N),ownerState:ce},_,{children:[R.jsx(zut,ue({autoFocus:s??!!O,ampmInClock:a&&I.includes("hours"),value:z,type:ie,ampm:i,minutesStep:x,isTimeDisabled:re,meridiemMode:ae,handleMeridiemChange:se,selectedId:fe,disabled:L,readOnly:j},Z)),E&&R.jsx(fdt,{className:ge.arrowSwitcher,slots:l,slotProps:c,onGoToPrevious:()=>ee(Q),isPreviousDisabled:!Q,previousLabel:q.openPreviousView,onGoToNext:()=>ee(te),isNextDisabled:!te,nextLabel:q.openNextView,ownerState:ce})]}))});function gdt(e){return Wn("MuiDigitalClock",e)}const mdt=Xn("MuiDigitalClock",["root","list","item"]);function Xm(e,t){return Array.isArray(t)?t.every(n=>e.indexOf(n)!==-1):e.indexOf(t)!==-1}const ydt=(e,t)=>n=>{(n.key==="Enter"||n.key===" ")&&(e(n),n.preventDefault(),n.stopPropagation())},xa=(e=document)=>{const t=e.activeElement;return t?t.shadowRoot?xa(t.shadowRoot):t:null},pO=e=>Array.from(e.children).indexOf(xa(document)),FV="@media (pointer: fine)",vdt=["ampm","timeStep","autoFocus","slots","slotProps","value","defaultValue","referenceDate","disableIgnoringDatePartForTimeValidation","maxTime","minTime","disableFuture","disablePast","minutesStep","shouldDisableTime","onChange","view","openTo","onViewChange","focusedView","onFocusedViewChange","className","disabled","readOnly","views","skipDisabled","timezone"],bdt=e=>{const{classes:t}=e;return zn({root:["root"],list:["list"],item:["item"]},gdt,t)},wdt=oe(fM,{name:"MuiDigitalClock",slot:"Root",overridesResolver:(e,t)=>t.root})({overflowY:"auto",width:"100%","@media (prefers-reduced-motion: no-preference)":{scrollBehavior:"auto"},maxHeight:ele,variants:[{props:{alreadyRendered:!0},style:{"@media (prefers-reduced-motion: no-preference)":{scrollBehavior:"smooth"}}}]}),xdt=oe(_C,{name:"MuiDigitalClock",slot:"List",overridesResolver:(e,t)=>t.list})({padding:0}),Sdt=oe(en,{name:"MuiDigitalClock",slot:"Item",overridesResolver:(e,t)=>t.item})(({theme:e})=>({padding:"8px 16px",margin:"2px 4px","&:first-of-type":{marginTop:4},"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.hoverOpacity})`:xt(e.palette.primary.main,e.palette.action.hoverOpacity)},"&.Mui-selected":{backgroundColor:(e.vars||e).palette.primary.main,color:(e.vars||e).palette.primary.contrastText,"&:focus-visible, &:hover":{backgroundColor:(e.vars||e).palette.primary.dark}},"&.Mui-focusVisible":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.focusOpacity})`:xt(e.palette.primary.main,e.palette.action.focusOpacity)}})),Cdt=v.forwardRef(function(t,n){const r=Cn(),o=v.useRef(null),i=ca(n,o),a=v.useRef(null),s=cn({props:t,name:"MuiDigitalClock"}),{ampm:l=r.is12HourCycleInCurrentLocale(),timeStep:c=30,autoFocus:u,slots:d,slotProps:f,value:p,defaultValue:h,referenceDate:m,disableIgnoringDatePartForTimeValidation:y=!1,maxTime:w,minTime:x,disableFuture:C,disablePast:E,minutesStep:P=1,shouldDisableTime:T,onChange:I,view:A,openTo:k,onViewChange:O,focusedView:$,onFocusedViewChange:N,className:L,disabled:j,readOnly:D,views:_=["hours"],skipDisabled:z=!1,timezone:F}=s,V=Vt(s,vdt),{value:U,handleValueChange:q,timezone:X}=t0({name:"DigitalClock",timezone:F,value:p,defaultValue:h,onChange:I,valueManager:po}),ie=$o(),ee=Hg(X),Q=v.useMemo(()=>ue({},s,{alreadyRendered:!!o.current}),[s]),te=bdt(Q),pe=(d==null?void 0:d.digitalClockItem)??Sdt,ae=Yn({elementType:pe,externalSlotProps:f==null?void 0:f.digitalClockItem,ownerState:{},className:te.item}),se=LV({value:U,referenceDate:m,utils:r,props:s,timezone:X}),re=kt(Se=>q(Se,"finish","hours")),{setValueAndGoToNextView:fe}=n1({view:A,views:_,openTo:k,onViewChange:O,onChange:re,focusedView:$,onFocusedViewChange:N}),Z=kt(Se=>{fe(Se,"finish")});v.useEffect(()=>{if(o.current===null)return;const Se=o.current.querySelector('[role="listbox"] [role="option"][tabindex="0"], [role="listbox"] [role="option"][aria-selected="true"]');if(!Se)return;const xe=Se.offsetTop;(u||$)&&Se.focus(),o.current.scrollTop=xe-4});const ce=v.useCallback(Se=>{const xe=t1(y,r),ke=()=>!(x&&xe(x,Se)||w&&xe(Se,w)||C&&xe(Se,ee)||E&&xe(ee,Se)),De=()=>r.getMinutes(Se)%P!==0?!1:T?!T(Se,"hours"):!0;return!ke()||!De()},[y,r,x,w,C,ee,E,P,T]),ge=v.useMemo(()=>{const Se=[];let ke=r.startOfDay(se);for(;r.isSameDay(se,ke);)Se.push(ke),ke=r.addMinutes(ke,c);return Se},[se,c,r]),we=ge.findIndex(Se=>r.isEqual(Se,se)),me=Se=>{switch(Se.key){case"PageUp":{const xe=pO(a.current)-5,ke=a.current.children,De=Math.max(0,xe),_e=ke[De];_e&&_e.focus(),Se.preventDefault();break}case"PageDown":{const xe=pO(a.current)+5,ke=a.current.children,De=Math.min(ke.length-1,xe),_e=ke[De];_e&&_e.focus(),Se.preventDefault();break}}};return R.jsx(wdt,ue({ref:i,className:de(te.root,L),ownerState:Q},V,{children:R.jsx(xdt,{ref:a,role:"listbox","aria-label":ie.timePickerToolbarTitle,className:te.list,onKeyDown:me,children:ge.map((Se,xe)=>{if(z&&ce(Se))return null;const ke=r.isEqual(Se,U),De=r.format(Se,l?"fullTime12h":"fullTime24h"),_e=we===xe||we===-1&&xe===0?0:-1;return R.jsx(pe,ue({onClick:()=>!D&&Z(Se),selected:ke,disabled:j||ce(Se),disableRipple:D,role:"option","aria-disabled":D,"aria-selected":ke,tabIndex:_e},ae,{children:De}),`${Se.valueOf()}-${De}`)})})}))});function Edt(e){return Wn("MuiMultiSectionDigitalClock",e)}const U7=Xn("MuiMultiSectionDigitalClock",["root"]);function Pdt(e){return Wn("MuiMultiSectionDigitalClockSection",e)}const Tdt=Xn("MuiMultiSectionDigitalClockSection",["root","item"]),Idt=["autoFocus","onChange","className","disabled","readOnly","items","active","slots","slotProps","skipDisabled"],Odt=e=>{const{classes:t}=e;return zn({root:["root"],item:["item"]},Pdt,t)},Adt=oe(_C,{name:"MuiMultiSectionDigitalClockSection",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({maxHeight:ele,width:56,padding:0,overflow:"hidden","@media (prefers-reduced-motion: no-preference)":{scrollBehavior:"auto"},"@media (pointer: fine)":{"&:hover":{overflowY:"auto"}},"@media (pointer: none), (pointer: coarse)":{overflowY:"auto"},"&:not(:first-of-type)":{borderLeft:`1px solid ${(e.vars||e).palette.divider}`},"&::after":{display:"block",content:'""',height:"calc(100% - 40px - 6px)"},variants:[{props:{alreadyRendered:!0},style:{"@media (prefers-reduced-motion: no-preference)":{scrollBehavior:"smooth"}}}]})),kdt=oe(en,{name:"MuiMultiSectionDigitalClockSection",slot:"Item",overridesResolver:(e,t)=>t.item})(({theme:e})=>({padding:8,margin:"2px 4px",width:zw,justifyContent:"center","&:first-of-type":{marginTop:4},"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.hoverOpacity})`:xt(e.palette.primary.main,e.palette.action.hoverOpacity)},"&.Mui-selected":{backgroundColor:(e.vars||e).palette.primary.main,color:(e.vars||e).palette.primary.contrastText,"&:focus-visible, &:hover":{backgroundColor:(e.vars||e).palette.primary.dark}},"&.Mui-focusVisible":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.focusOpacity})`:xt(e.palette.primary.main,e.palette.action.focusOpacity)}})),Mdt=v.forwardRef(function(t,n){const r=v.useRef(null),o=ca(n,r),i=v.useRef(null),a=cn({props:t,name:"MuiMultiSectionDigitalClockSection"}),{autoFocus:s,onChange:l,className:c,disabled:u,readOnly:d,items:f,active:p,slots:h,slotProps:m,skipDisabled:y}=a,w=Vt(a,Idt),x=v.useMemo(()=>ue({},a,{alreadyRendered:!!r.current}),[a]),C=Odt(x),E=(h==null?void 0:h.digitalClockSectionItem)??kdt;v.useEffect(()=>{if(r.current===null)return;const I=r.current.querySelector('[role="option"][tabindex="0"], [role="option"][aria-selected="true"]');if(p&&s&&I&&I.focus(),!I||i.current===I)return;i.current=I;const A=I.offsetTop;r.current.scrollTop=A-4});const P=f.findIndex(I=>I.isFocused(I.value)),T=I=>{switch(I.key){case"PageUp":{const A=pO(r.current)-5,k=r.current.children,O=Math.max(0,A),$=k[O];$&&$.focus(),I.preventDefault();break}case"PageDown":{const A=pO(r.current)+5,k=r.current.children,O=Math.min(k.length-1,A),$=k[O];$&&$.focus(),I.preventDefault();break}}};return R.jsx(Adt,ue({ref:o,className:de(C.root,c),ownerState:x,autoFocusItem:s&&p,role:"listbox",onKeyDown:T},w,{children:f.map((I,A)=>{var L;const k=(L=I.isDisabled)==null?void 0:L.call(I,I.value),O=u||k;if(y&&O)return null;const $=I.isSelected(I.value),N=P===A||P===-1&&A===0?0:-1;return R.jsx(E,ue({onClick:()=>!d&&l(I.value),selected:$,disabled:O,disableRipple:d,role:"option","aria-disabled":d||O||void 0,"aria-label":I.ariaLabel,"aria-selected":$,tabIndex:N,className:C.item},m==null?void 0:m.digitalClockSectionItem,{children:I.label}),I.label)})}))}),Rdt=({now:e,value:t,utils:n,ampm:r,isDisabled:o,resolveAriaLabel:i,timeStep:a,valueOrReferenceDate:s})=>{const l=t?n.getHours(t):null,c=[],u=(p,h)=>{const m=h??l;return m===null?!1:r?p===12?m===12||m===0:m===p||m-12===p:m===p},d=p=>u(p,n.getHours(s)),f=r?11:23;for(let p=0;p<=f;p+=a){let h=n.format(n.setHours(e,p),r?"hours12h":"hours24h");const m=i(parseInt(h,10).toString());h=n.formatNumber(h),c.push({value:p,label:h,isSelected:u,isDisabled:o,isFocused:d,ariaLabel:m})}return c},W7=({value:e,utils:t,isDisabled:n,timeStep:r,resolveLabel:o,resolveAriaLabel:i,hasValue:a=!0})=>{const s=c=>e===null?!1:a&&e===c,l=c=>e===c;return[...Array.from({length:Math.ceil(60/r)},(c,u)=>{const d=r*u;return{value:d,label:t.formatNumber(o(d)),isDisabled:n,isSelected:s,isFocused:l,ariaLabel:i(d.toString())}})]},$dt=["ampm","timeSteps","autoFocus","slots","slotProps","value","defaultValue","referenceDate","disableIgnoringDatePartForTimeValidation","maxTime","minTime","disableFuture","disablePast","minutesStep","shouldDisableTime","onChange","view","views","openTo","onViewChange","focusedView","onFocusedViewChange","className","disabled","readOnly","skipDisabled","timezone"],Ddt=e=>{const{classes:t}=e;return zn({root:["root"]},Edt,t)},_dt=oe(fM,{name:"MuiMultiSectionDigitalClock",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({display:"flex",flexDirection:"row",width:"100%",borderBottom:`1px solid ${(e.vars||e).palette.divider}`})),Ndt=v.forwardRef(function(t,n){const r=Cn(),o=dr(),i=cn({props:t,name:"MuiMultiSectionDigitalClock"}),{ampm:a=r.is12HourCycleInCurrentLocale(),timeSteps:s,autoFocus:l,slots:c,slotProps:u,value:d,defaultValue:f,referenceDate:p,disableIgnoringDatePartForTimeValidation:h=!1,maxTime:m,minTime:y,disableFuture:w,disablePast:x,minutesStep:C=1,shouldDisableTime:E,onChange:P,view:T,views:I=["hours","minutes"],openTo:A,onViewChange:k,focusedView:O,onFocusedViewChange:$,className:N,disabled:L,readOnly:j,skipDisabled:D=!1,timezone:_}=i,z=Vt(i,$dt),{value:F,handleValueChange:V,timezone:U}=t0({name:"MultiSectionDigitalClock",timezone:_,value:d,defaultValue:f,onChange:P,valueManager:po}),q=$o(),X=Hg(U),ie=v.useMemo(()=>ue({hours:1,minutes:5,seconds:5},s),[s]),ee=LV({value:F,referenceDate:p,utils:r,props:i,timezone:U}),Q=kt((ke,De,_e)=>V(ke,De,_e)),te=v.useMemo(()=>!a||!I.includes("hours")||I.includes("meridiem")?I:[...I,"meridiem"],[a,I]),{view:pe,setValueAndGoToNextView:ae,focusedView:se}=n1({view:T,views:te,openTo:A,onViewChange:k,onChange:Q,focusedView:O,onFocusedViewChange:$}),re=kt(ke=>{ae(ke,"finish","meridiem")}),{meridiemMode:fe,handleMeridiemChange:Z}=lM(ee,a,re,"finish"),ce=v.useCallback((ke,De)=>{const _e=t1(h,r),ye=De==="hours"||De==="minutes"&&te.includes("seconds"),Pe=({start:Me,end:We})=>!(y&&_e(y,We)||m&&_e(Me,m)||w&&_e(Me,X)||x&&_e(X,ye?We:Me)),Ae=(Me,We=1)=>{if(Me%We!==0)return!1;if(E)switch(De){case"hours":return!E(r.setHours(ee,Me),"hours");case"minutes":return!E(r.setMinutes(ee,Me),"minutes");case"seconds":return!E(r.setSeconds(ee,Me),"seconds");default:return!1}return!0};switch(De){case"hours":{const Me=jS(ke,fe,a),We=r.setHours(ee,Me),He=r.setSeconds(r.setMinutes(We,0),0),Xe=r.setSeconds(r.setMinutes(We,59),59);return!Pe({start:He,end:Xe})||!Ae(Me)}case"minutes":{const Me=r.setMinutes(ee,ke),We=r.setSeconds(Me,0),He=r.setSeconds(Me,59);return!Pe({start:We,end:He})||!Ae(ke,C)}case"seconds":{const Me=r.setSeconds(ee,ke);return!Pe({start:Me,end:Me})||!Ae(ke)}default:throw new Error("not supported")}},[a,ee,h,m,fe,y,C,E,r,w,x,X,te]),ge=v.useCallback(ke=>{switch(ke){case"hours":return{onChange:De=>{const _e=jS(De,fe,a);ae(r.setHours(ee,_e),"finish","hours")},items:Rdt({now:X,value:F,ampm:a,utils:r,isDisabled:De=>ce(De,"hours"),timeStep:ie.hours,resolveAriaLabel:q.hoursClockNumberText,valueOrReferenceDate:ee})};case"minutes":return{onChange:De=>{ae(r.setMinutes(ee,De),"finish","minutes")},items:W7({value:r.getMinutes(ee),utils:r,isDisabled:De=>ce(De,"minutes"),resolveLabel:De=>r.format(r.setMinutes(X,De),"minutes"),timeStep:ie.minutes,hasValue:!!F,resolveAriaLabel:q.minutesClockNumberText})};case"seconds":return{onChange:De=>{ae(r.setSeconds(ee,De),"finish","seconds")},items:W7({value:r.getSeconds(ee),utils:r,isDisabled:De=>ce(De,"seconds"),resolveLabel:De=>r.format(r.setSeconds(X,De),"seconds"),timeStep:ie.seconds,hasValue:!!F,resolveAriaLabel:q.secondsClockNumberText})};case"meridiem":{const De=hc(r,"am"),_e=hc(r,"pm");return{onChange:Z,items:[{value:"am",label:De,isSelected:()=>!!F&&fe==="am",isFocused:()=>!!ee&&fe==="am",ariaLabel:De},{value:"pm",label:_e,isSelected:()=>!!F&&fe==="pm",isFocused:()=>!!ee&&fe==="pm",ariaLabel:_e}]}}default:throw new Error(`Unknown view: ${ke} found.`)}},[X,F,a,r,ie.hours,ie.minutes,ie.seconds,q.hoursClockNumberText,q.minutesClockNumberText,q.secondsClockNumberText,fe,ae,ee,ce,Z]),we=v.useMemo(()=>{if(!o)return te;const ke=te.filter(De=>De!=="meridiem");return ke.reverse(),te.includes("meridiem")&&ke.push("meridiem"),ke},[o,te]),me=v.useMemo(()=>te.reduce((ke,De)=>ue({},ke,{[De]:ge(De)}),{}),[te,ge]),Se=i,xe=Ddt(Se);return R.jsx(_dt,ue({ref:n,className:de(xe.root,N),ownerState:Se,role:"group"},z,{children:we.map(ke=>R.jsx(Mdt,{items:me[ke].items,onChange:me[ke].onChange,active:pe===ke,autoFocus:l??se===ke,disabled:L,readOnly:j,slots:c,slotProps:u,skipDisabled:D,"aria-label":q.selectViewText(ke)},ke))}))});function Ldt(e){return Wn("MuiPickersDay",e)}const uh=Xn("MuiPickersDay",["root","dayWithMargin","dayOutsideMonth","hiddenDaySpacingFiller","today","selected","disabled"]),Fdt=["autoFocus","className","day","disabled","disableHighlightToday","disableMargin","hidden","isAnimating","onClick","onDaySelect","onFocus","onBlur","onKeyDown","onMouseDown","onMouseEnter","outsideCurrentMonth","selected","showDaysOutsideCurrentMonth","children","today","isFirstVisibleCell","isLastVisibleCell"],jdt=e=>{const{selected:t,disableMargin:n,disableHighlightToday:r,today:o,disabled:i,outsideCurrentMonth:a,showDaysOutsideCurrentMonth:s,classes:l}=e,c=a&&!s;return zn({root:["root",t&&!c&&"selected",i&&"disabled",!n&&"dayWithMargin",!r&&o&&"today",a&&s&&"dayOutsideMonth",c&&"hiddenDaySpacingFiller"],hiddenDaySpacingFiller:["hiddenDaySpacingFiller"]},Ldt,l)},dle=({theme:e})=>ue({},e.typography.caption,{width:BS,height:BS,borderRadius:"50%",padding:0,backgroundColor:"transparent",transition:e.transitions.create("background-color",{duration:e.transitions.duration.short}),color:(e.vars||e).palette.text.primary,"@media (pointer: fine)":{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.hoverOpacity})`:xt(e.palette.primary.main,e.palette.action.hoverOpacity)}},"&:focus":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.focusOpacity})`:xt(e.palette.primary.main,e.palette.action.focusOpacity),[`&.${uh.selected}`]:{willChange:"background-color",backgroundColor:(e.vars||e).palette.primary.dark}},[`&.${uh.selected}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.main,fontWeight:e.typography.fontWeightMedium,"&:hover":{willChange:"background-color",backgroundColor:(e.vars||e).palette.primary.dark}},[`&.${uh.disabled}:not(.${uh.selected})`]:{color:(e.vars||e).palette.text.disabled},[`&.${uh.disabled}&.${uh.selected}`]:{opacity:.6},variants:[{props:{disableMargin:!1},style:{margin:`0 ${cM}px`}},{props:{outsideCurrentMonth:!0,showDaysOutsideCurrentMonth:!0},style:{color:(e.vars||e).palette.text.secondary}},{props:{disableHighlightToday:!1,today:!0},style:{[`&:not(.${uh.selected})`]:{border:`1px solid ${(e.vars||e).palette.text.secondary}`}}}]}),fle=(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableMargin&&t.dayWithMargin,!n.disableHighlightToday&&n.today&&t.today,!n.outsideCurrentMonth&&n.showDaysOutsideCurrentMonth&&t.dayOutsideMonth,n.outsideCurrentMonth&&!n.showDaysOutsideCurrentMonth&&t.hiddenDaySpacingFiller]},Bdt=oe(la,{name:"MuiPickersDay",slot:"Root",overridesResolver:fle})(dle),zdt=oe("div",{name:"MuiPickersDay",slot:"Root",overridesResolver:fle})(({theme:e})=>ue({},dle({theme:e}),{opacity:0,pointerEvents:"none"})),pw=()=>{},Vdt=v.forwardRef(function(t,n){const r=cn({props:t,name:"MuiPickersDay"}),{autoFocus:o=!1,className:i,day:a,disabled:s=!1,disableHighlightToday:l=!1,disableMargin:c=!1,isAnimating:u,onClick:d,onDaySelect:f,onFocus:p=pw,onBlur:h=pw,onKeyDown:m=pw,onMouseDown:y=pw,onMouseEnter:w=pw,outsideCurrentMonth:x,selected:C=!1,showDaysOutsideCurrentMonth:E=!1,children:P,today:T=!1}=r,I=Vt(r,Fdt),A=ue({},r,{autoFocus:o,disabled:s,disableHighlightToday:l,disableMargin:c,selected:C,showDaysOutsideCurrentMonth:E,today:T}),k=jdt(A),O=Cn(),$=v.useRef(null),N=ca($,n);bu(()=>{o&&!s&&!u&&!x&&$.current.focus()},[o,s,u,x]);const L=D=>{y(D),x&&D.preventDefault()},j=D=>{s||f(a),x&&D.currentTarget.focus(),d&&d(D)};return x&&!E?R.jsx(zdt,{className:de(k.root,k.hiddenDaySpacingFiller,i),ownerState:A,role:I.role}):R.jsx(Bdt,ue({className:de(k.root,i),ref:N,centerRipple:!0,disabled:s,tabIndex:C?0:-1,onKeyDown:D=>m(D,a),onFocus:D=>p(D,a),onBlur:D=>h(D,a),onMouseEnter:D=>w(D,a),onClick:j,onMouseDown:L},I,{ownerState:A,children:P||O.format(a,"dayOfMonth")}))}),Hdt=v.memo(Vdt),n0=({props:e,value:t,timezone:n,adapter:r})=>{if(t===null)return null;const{shouldDisableDate:o,shouldDisableMonth:i,shouldDisableYear:a,disablePast:s,disableFuture:l}=e,c=r.utils.date(void 0,n),u=Li(r.utils,e.minDate,r.defaultDates.minDate),d=Li(r.utils,e.maxDate,r.defaultDates.maxDate);switch(!0){case!r.utils.isValid(t):return"invalidDate";case!!(o&&o(t)):return"shouldDisableDate";case!!(i&&i(t)):return"shouldDisableMonth";case!!(a&&a(t)):return"shouldDisableYear";case!!(l&&r.utils.isAfterDay(t,c)):return"disableFuture";case!!(s&&r.utils.isBeforeDay(t,c)):return"disablePast";case!!(u&&r.utils.isBeforeDay(t,u)):return"minDate";case!!(d&&r.utils.isAfterDay(t,d)):return"maxDate";default:return null}};n0.valueManager=po;const r1=({adapter:e,value:t,timezone:n,props:r})=>{if(t===null)return null;const{minTime:o,maxTime:i,minutesStep:a,shouldDisableTime:s,disableIgnoringDatePartForTimeValidation:l=!1,disablePast:c,disableFuture:u}=r,d=e.utils.date(void 0,n),f=t1(l,e.utils);switch(!0){case!e.utils.isValid(t):return"invalidDate";case!!(o&&f(o,t)):return"minTime";case!!(i&&f(t,i)):return"maxTime";case!!(u&&e.utils.isAfter(t,d)):return"disableFuture";case!!(c&&e.utils.isBefore(t,d)):return"disablePast";case!!(s&&s(t,"hours")):return"shouldDisableTime-hours";case!!(s&&s(t,"minutes")):return"shouldDisableTime-minutes";case!!(s&&s(t,"seconds")):return"shouldDisableTime-seconds";case!!(a&&e.utils.getMinutes(t)%a!==0):return"minutesStep";default:return null}};r1.valueManager=po;const hM=({adapter:e,value:t,timezone:n,props:r})=>{const o=n0({adapter:e,value:t,timezone:n,props:r});return o!==null?o:r1({adapter:e,value:t,timezone:n,props:r})};hM.valueManager=po;const cF=["disablePast","disableFuture","minDate","maxDate","shouldDisableDate","shouldDisableMonth","shouldDisableYear"],uF=["disablePast","disableFuture","minTime","maxTime","shouldDisableTime","minutesStep","ampm","disableIgnoringDatePartForTimeValidation"],ple=["minDateTime","maxDateTime"],Udt=[...cF,...uF,...ple],r0=e=>Udt.reduce((t,n)=>(e.hasOwnProperty(n)&&(t[n]=e[n]),t),{});function hle(e){const{props:t,validator:n,value:r,timezone:o,onError:i}=e,a=zg(),s=v.useRef(n.valueManager.defaultErrorState),l=n({adapter:a,value:r,timezone:o,props:t}),c=n.valueManager.hasError(l);v.useEffect(()=>{i&&!n.valueManager.isSameError(l,s.current)&&i(l,r),s.current=l},[n,i,l,r]);const u=kt(d=>n({adapter:a,value:d,timezone:o,props:t}));return{validationError:l,hasValidationError:c,getValidationErrorForNewValue:u}}const Wdt=({utils:e,format:t})=>{let n=10,r=t,o=e.expandFormat(t);for(;o!==r;)if(r=o,o=e.expandFormat(r),n-=1,n<0)throw new Error("MUI X: The format expansion seems to be in an infinite loop. Please open an issue with the format passed to the picker component.");return o},Gdt=({utils:e,expandedFormat:t})=>{const n=[],{start:r,end:o}=e.escapedCharacters,i=new RegExp(`(\\${r}[^\\${o}]*\\${o})+`,"g");let a=null;for(;a=i.exec(t);)n.push({start:a.index,end:i.lastIndex-1});return n},qdt=(e,t,n,r)=>{switch(n.type){case"year":return t.fieldYearPlaceholder({digitAmount:e.formatByString(e.date(void 0,"default"),r).length,format:r});case"month":return t.fieldMonthPlaceholder({contentType:n.contentType,format:r});case"day":return t.fieldDayPlaceholder({format:r});case"weekDay":return t.fieldWeekDayPlaceholder({contentType:n.contentType,format:r});case"hours":return t.fieldHoursPlaceholder({format:r});case"minutes":return t.fieldMinutesPlaceholder({format:r});case"seconds":return t.fieldSecondsPlaceholder({format:r});case"meridiem":return t.fieldMeridiemPlaceholder({format:r});default:return r}},Kdt=({utils:e,date:t,shouldRespectLeadingZeros:n,localeText:r,localizedDigits:o,now:i,token:a,startSeparator:s})=>{if(a==="")throw new Error("MUI X: Should not call `commitToken` with an empty token");const l=ile(e,a),c=ule(e,l.contentType,l.type,a),u=n?c:l.contentType==="digit",d=t!=null&&e.isValid(t);let f=d?e.formatByString(t,a):"",p=null;if(u)if(c)p=f===""?e.formatByString(i,a).length:f.length;else{if(l.maxLength==null)throw new Error(`MUI X: The token ${a} should have a 'maxDigitNumber' property on it's adapter`);p=l.maxLength,d&&(f=DV(sle(Sg(f,o),p),o))}return ue({},l,{format:a,maxLength:p,value:f,placeholder:qdt(e,r,l,a),hasLeadingZerosInFormat:c,hasLeadingZerosInInput:u,startSeparator:s,endSeparator:"",modified:!1})},Ydt=e=>{var p;const{utils:t,expandedFormat:n,escapedParts:r}=e,o=t.date(void 0),i=[];let a="";const s=Object.keys(t.formatTokenMap).sort((h,m)=>m.length-h.length),l=/^([a-zA-Z]+)/,c=new RegExp(`^(${s.join("|")})*$`),u=new RegExp(`^(${s.join("|")})`),d=h=>r.find(m=>m.start<=h&&m.end>=h);let f=0;for(;f0;){const x=u.exec(w)[1];w=w.slice(x.length),i.push(Kdt(ue({},e,{now:o,token:x,startSeparator:a}))),a=""}f+=y.length}else{const w=n[f];m&&(h==null?void 0:h.start)===f||(h==null?void 0:h.end)===f||(i.length===0?a+=w:i[i.length-1].endSeparator+=w),f+=1}}return i.length===0&&a.length>0&&i.push({type:"empty",contentType:"letter",maxLength:null,format:"",value:"",placeholder:"",hasLeadingZerosInFormat:!1,hasLeadingZerosInInput:!1,startSeparator:a,endSeparator:"",modified:!1}),i},Qdt=({isRtl:e,formatDensity:t,sections:n})=>n.map(r=>{const o=i=>{let a=i;return e&&a!==null&&a.includes(" ")&&(a=`⁩${a}⁦`),t==="spacious"&&["/",".","-"].includes(a)&&(a=` ${a} `),a};return r.startSeparator=o(r.startSeparator),r.endSeparator=o(r.endSeparator),r}),G7=e=>{let t=Wdt(e);e.isRtl&&e.enableAccessibleFieldDOMStructure&&(t=t.split(" ").reverse().join(" "));const n=Gdt(ue({},e,{expandedFormat:t})),r=Ydt(ue({},e,{expandedFormat:t,escapedParts:n}));return Qdt(ue({},e,{sections:r}))},Xdt=e=>{const t=Cn(),n=$o(),r=zg(),o=dr(),{valueManager:i,fieldValueManager:a,valueType:s,validator:l,internalProps:c,internalProps:{value:u,defaultValue:d,referenceDate:f,onChange:p,format:h,formatDensity:m="dense",selectedSections:y,onSelectedSectionsChange:w,shouldRespectLeadingZeros:x=!1,timezone:C,enableAccessibleFieldDOMStructure:E=!1}}=e,{timezone:P,value:T,handleValueChange:I}=$V({timezone:C,value:u,defaultValue:d,onChange:p,valueManager:i}),A=v.useMemo(()=>Xut(t),[t]),k=v.useMemo(()=>ndt(t,A,P),[t,A,P]),O=v.useCallback((Q,te=null)=>a.getSectionsFromValue(t,Q,te,pe=>G7({utils:t,localeText:n,localizedDigits:A,format:h,date:pe,formatDensity:m,shouldRespectLeadingZeros:x,enableAccessibleFieldDOMStructure:E,isRtl:o})),[a,h,n,A,o,x,t,m,E]),[$,N]=v.useState(()=>{const Q=O(T),te={sections:Q,value:T,referenceValue:i.emptyValue,tempValueStrAndroid:null},pe=qut(Q),ae=i.getInitialReferenceValue({referenceDate:f,value:T,utils:t,props:c,granularity:pe,timezone:P});return ue({},te,{referenceValue:ae})}),[L,j]=wg({controlled:y,default:null,name:"useField",state:"selectedSections"}),D=Q=>{j(Q),w==null||w(Q)},_=v.useMemo(()=>lF(L,$.sections),[L,$.sections]),z=_==="all"?0:_,F=({value:Q,referenceValue:te,sections:pe})=>{if(N(se=>ue({},se,{sections:pe,value:Q,referenceValue:te,tempValueStrAndroid:null})),i.areValuesEqual(t,$.value,Q))return;const ae={validationError:l({adapter:r,value:Q,timezone:P,props:c})};I(Q,ae)},V=(Q,te)=>{const pe=[...$.sections];return pe[Q]=ue({},pe[Q],{value:te,modified:!0}),pe},U=()=>{F({value:i.emptyValue,referenceValue:$.referenceValue,sections:O(i.emptyValue)})},q=()=>{if(z==null)return;const Q=$.sections[z],te=a.getActiveDateManager(t,$,Q),ae=te.getSections($.sections).filter(Z=>Z.value!=="").length===(Q.value===""?0:1),se=V(z,""),re=ae?null:t.getInvalidDate(),fe=te.getNewValuesFromNewActiveDate(re);F(ue({},fe,{sections:se}))},X=Q=>{const te=(se,re)=>{const fe=t.parse(se,h);if(fe==null||!t.isValid(fe))return null;const Z=G7({utils:t,localeText:n,localizedDigits:A,format:h,date:fe,formatDensity:m,shouldRespectLeadingZeros:x,enableAccessibleFieldDOMStructure:E,isRtl:o});return H7(t,fe,Z,re,!1)},pe=a.parseValueStr(Q,$.referenceValue,te),ae=a.updateReferenceValue(t,pe,$.referenceValue);F({value:pe,referenceValue:ae,sections:O(pe,$.sections)})},ie=({activeSection:Q,newSectionValue:te,shouldGoToNextSection:pe})=>{pe&&z<$.sections.length-1&&D(z+1);const ae=a.getActiveDateManager(t,$,Q),se=V(z,te),re=ae.getSections(se),fe=Zut(t,re,A);let Z,ce;if(fe!=null&&t.isValid(fe)){const ge=H7(t,fe,re,ae.referenceDate,!0);Z=ae.getNewValuesFromNewActiveDate(ge),ce=!0}else Z=ae.getNewValuesFromNewActiveDate(fe),ce=(fe!=null&&!t.isValid(fe))!=(ae.date!=null&&!t.isValid(ae.date));return ce?F(ue({},Z,{sections:se})):N(ge=>ue({},ge,Z,{sections:se,tempValueStrAndroid:null}))},ee=Q=>N(te=>ue({},te,{tempValueStrAndroid:Q}));return v.useEffect(()=>{const Q=O($.value);N(te=>ue({},te,{sections:Q}))},[h,t.locale,o]),v.useEffect(()=>{let Q;i.areValuesEqual(t,$.value,T)?Q=i.getTimezone(t,$.value)!==i.getTimezone(t,T):Q=!0,Q&&N(te=>ue({},te,{value:T,referenceValue:a.updateReferenceValue(t,T,te.referenceValue),sections:O(T)}))},[T]),{state:$,activeSectionIndex:z,parsedSelectedSections:_,setSelectedSections:D,clearValue:U,clearActiveSection:q,updateSectionValue:ie,updateValueFromValueStr:X,setTempAndroidValueStr:ee,getSectionsFromValue:O,sectionsValueBoundaries:k,localizedDigits:A,timezone:P}},Jdt=5e3,_m=e=>e.saveQuery!=null,Zdt=({sections:e,updateSectionValue:t,sectionsValueBoundaries:n,localizedDigits:r,setTempAndroidValueStr:o,timezone:i})=>{const a=Cn(),[s,l]=v.useState(null),c=kt(()=>l(null));v.useEffect(()=>{var h;s!=null&&((h=e[s.sectionIndex])==null?void 0:h.type)!==s.sectionType&&c()},[e,s,c]),v.useEffect(()=>{if(s!=null){const h=setTimeout(()=>c(),Jdt);return()=>{clearTimeout(h)}}return()=>{}},[s,c]);const u=({keyPressed:h,sectionIndex:m},y,w)=>{const x=h.toLowerCase(),C=e[m];if(s!=null&&(!w||w(s.value))&&s.sectionIndex===m){const P=`${s.value}${x}`,T=y(P,C);if(!_m(T))return l({sectionIndex:m,value:P,sectionType:C.type}),T}const E=y(x,C);return _m(E)&&!E.saveQuery?(c(),null):(l({sectionIndex:m,value:x,sectionType:C.type}),_m(E)?null:E)},d=h=>{const m=(x,C,E)=>{const P=C.filter(T=>T.toLowerCase().startsWith(E));return P.length===0?{saveQuery:!1}:{sectionValue:P[0],shouldGoToNextSection:P.length===1}},y=(x,C,E,P)=>{const T=I=>ale(a,i,C.type,I);if(C.contentType==="letter")return m(C.format,T(C.format),x);if(E&&P!=null&&ile(a,E).contentType==="letter"){const I=T(E),A=m(E,I,x);return _m(A)?{saveQuery:!1}:ue({},A,{sectionValue:P(A.sectionValue,I)})}return{saveQuery:!1}};return u(h,(x,C)=>{switch(C.type){case"month":{const E=P=>z7(a,P,a.formats.month,C.format);return y(x,C,a.formats.month,E)}case"weekDay":{const E=(P,T)=>T.indexOf(P).toString();return y(x,C,a.formats.weekday,E)}case"meridiem":return y(x,C);default:return{saveQuery:!1}}})},f=h=>{const m=(w,x)=>{const C=Sg(w,r),E=Number(C),P=n[x.type]({currentDate:null,format:x.format,contentType:x.contentType});if(E>P.maximum)return{saveQuery:!1};if(EP.maximum||C.length===P.maximum.toString().length;return{sectionValue:lle(a,E,P,r,x),shouldGoToNextSection:T}};return u(h,(w,x)=>{if(x.contentType==="digit"||x.contentType==="digit-with-letter")return m(w,x);if(x.type==="month"){const C=ule(a,"digit","month","MM"),E=m(w,{type:x.type,format:"MM",hasLeadingZerosInFormat:C,hasLeadingZerosInInput:!0,contentType:"digit",maxLength:2});if(_m(E))return E;const P=z7(a,E.sectionValue,"MM",x.format);return ue({},E,{sectionValue:P})}if(x.type==="weekDay"){const C=m(w,x);if(_m(C))return C;const E=pM(a,x.format)[Number(C.sectionValue)-1];return ue({},C,{sectionValue:E})}return{saveQuery:!1}},w=>B7(w,r))};return{applyCharacterEditing:kt(h=>{const m=e[h.sectionIndex],w=B7(h.keyPressed,r)?f(ue({},h,{keyPressed:DV(h.keyPressed,r)})):d(h);if(w==null){o(null);return}t({activeSection:m,newSectionValue:w.sectionValue,shouldGoToNextSection:w.shouldGoToNextSection})}),resetCharacterQuery:c}},eft=e=>{const{internalProps:{disabled:t,readOnly:n=!1},forwardedProps:{sectionListRef:r,onBlur:o,onClick:i,onFocus:a,onInput:s,onPaste:l,focused:c,autoFocus:u=!1},fieldValueManager:d,applyCharacterEditing:f,resetCharacterQuery:p,setSelectedSections:h,parsedSelectedSections:m,state:y,clearActiveSection:w,clearValue:x,updateSectionValue:C,updateValueFromValueStr:E,sectionOrder:P,areAllSectionsEmpty:T,sectionsValueBoundaries:I}=e,A=v.useRef(null),k=ca(r,A),O=$o(),$=Cn(),N=Zb(),[L,j]=v.useState(!1),D=v.useMemo(()=>({syncSelectionToDOM:()=>{if(!A.current)return;const ce=document.getSelection();if(!ce)return;if(m==null){ce.rangeCount>0&&A.current.getRoot().contains(ce.getRangeAt(0).startContainer)&&ce.removeAllRanges(),L&&A.current.getRoot().blur();return}if(!A.current.getRoot().contains(xa(document)))return;const ge=new window.Range;let we;m==="all"?we=A.current.getRoot():y.sections[m].type==="empty"?we=A.current.getSectionContainer(m):we=A.current.getSectionContent(m),ge.selectNodeContents(we),we.focus(),ce.removeAllRanges(),ce.addRange(ge)},getActiveSectionIndexFromDOM:()=>{const ce=xa(document);return!ce||!A.current||!A.current.getRoot().contains(ce)?null:A.current.getSectionIndexFromDOMElement(ce)},focusField:(ce=0)=>{if(!A.current)return;const ge=lF(ce,y.sections);j(!0),A.current.getSectionContent(ge).focus()},setSelectedSections:ce=>{if(!A.current)return;const ge=lF(ce,y.sections);j((ge==="all"?0:ge)!==null),h(ce)},isFieldFocused:()=>{const ce=xa(document);return!!A.current&&A.current.getRoot().contains(ce)}}),[m,h,y.sections,L]),_=kt(ce=>{if(!A.current)return;const ge=y.sections[ce];A.current.getSectionContent(ce).innerHTML=ge.value||ge.placeholder,D.syncSelectionToDOM()}),z=kt((ce,...ge)=>{ce.isDefaultPrevented()||!A.current||(j(!0),i==null||i(ce,...ge),m==="all"?setTimeout(()=>{const we=document.getSelection().getRangeAt(0).startOffset;if(we===0){h(P.startIndex);return}let me=0,Se=0;for(;Se{if(s==null||s(ce),!A.current||m!=="all")return;const we=ce.target.textContent??"";A.current.getRoot().innerHTML=y.sections.map(me=>`${me.startSeparator}${me.value||me.placeholder}${me.endSeparator}`).join(""),D.syncSelectionToDOM(),we.length===0||we.charCodeAt(0)===10?(p(),x(),h("all")):we.length>1?E(we):f({keyPressed:we,sectionIndex:0})}),V=kt(ce=>{if(l==null||l(ce),n||m!=="all"){ce.preventDefault();return}const ge=ce.clipboardData.getData("text");ce.preventDefault(),p(),E(ge)}),U=kt((...ce)=>{if(a==null||a(...ce),L||!A.current)return;j(!0),A.current.getSectionIndexFromDOMElement(xa(document))!=null||h(P.startIndex)}),q=kt((...ce)=>{o==null||o(...ce),setTimeout(()=>{if(!A.current)return;const ge=xa(document);!A.current.getRoot().contains(ge)&&(j(!1),h(null))})}),X=kt(ce=>ge=>{ge.isDefaultPrevented()||h(ce)}),ie=kt(ce=>{ce.preventDefault()}),ee=kt(ce=>()=>{h(ce)}),Q=kt(ce=>{if(ce.preventDefault(),n||t||typeof m!="number")return;const ge=y.sections[m],we=ce.clipboardData.getData("text"),me=/^[a-zA-Z]+$/.test(we),Se=/^[0-9]+$/.test(we),xe=/^(([a-zA-Z]+)|)([0-9]+)(([a-zA-Z]+)|)$/.test(we);ge.contentType==="letter"&&me||ge.contentType==="digit"&&Se||ge.contentType==="digit-with-letter"&&xe?(p(),C({activeSection:ge,newSectionValue:we,shouldGoToNextSection:!0})):!me&&!Se&&(p(),E(we))}),te=kt(ce=>{ce.preventDefault(),ce.dataTransfer.dropEffect="none"}),pe=kt(ce=>{if(!A.current)return;const ge=ce.target,we=ge.textContent??"",me=A.current.getSectionIndexFromDOMElement(ge),Se=y.sections[me];if(n||!A.current){_(me);return}if(we.length===0){if(Se.value===""){_(me);return}const xe=ce.nativeEvent.inputType;if(xe==="insertParagraph"||xe==="insertLineBreak"){_(me);return}p(),w();return}f({keyPressed:we,sectionIndex:me}),_(me)});bu(()=>{if(!(!L||!A.current)){if(m==="all")A.current.getRoot().focus();else if(typeof m=="number"){const ce=A.current.getSectionContent(m);ce&&ce.focus()}}},[m,L]);const ae=v.useMemo(()=>y.sections.reduce((ce,ge)=>(ce[ge.type]=I[ge.type]({currentDate:null,contentType:ge.contentType,format:ge.format}),ce),{}),[I,y.sections]),se=m==="all",re=v.useMemo(()=>y.sections.map((ce,ge)=>{const we=!se&&!t&&!n;return{container:{"data-sectionindex":ge,onClick:X(ge)},content:{tabIndex:se||ge>0?-1:0,contentEditable:!se&&!t&&!n,role:"spinbutton",id:`${N}-${ce.type}`,"aria-labelledby":`${N}-${ce.type}`,"aria-readonly":n,"aria-valuenow":sdt(ce,$),"aria-valuemin":ae[ce.type].minimum,"aria-valuemax":ae[ce.type].maximum,"aria-valuetext":ce.value?adt(ce,$):O.empty,"aria-label":O[ce.type],"aria-disabled":t,spellCheck:we?!1:void 0,autoCapitalize:we?"off":void 0,autoCorrect:we?"off":void 0,[parseInt(v.version,10)>=17?"enterKeyHint":"enterkeyhint"]:we?"next":void 0,children:ce.value||ce.placeholder,onInput:pe,onPaste:Q,onFocus:ee(ge),onDragOver:te,onMouseUp:ie,inputMode:ce.contentType==="letter"?"text":"numeric"},before:{children:ce.startSeparator},after:{children:ce.endSeparator}}}),[y.sections,ee,Q,te,pe,X,ie,t,n,se,O,$,ae,N]),fe=kt(ce=>{E(ce.target.value)}),Z=v.useMemo(()=>T?"":d.getV7HiddenInputValueFromSections(y.sections),[T,y.sections,d]);return v.useEffect(()=>{if(A.current==null)throw new Error(["MUI X: The `sectionListRef` prop has not been initialized by `PickersSectionList`","You probably tried to pass a component to the `textField` slot that contains an `` element instead of a `PickersSectionList`.","","If you want to keep using an `` HTML element for the editing, please remove the `enableAccessibleFieldDOMStructure` prop from your picker or field component:","","","","Learn more about the field accessible DOM structure on the MUI documentation: https://mui.com/x/react-date-pickers/fields/#fields-to-edit-a-single-element"].join(` -`));u&&A.current&&A.current.getSectionContent(P.startIndex).focus()},[]),{interactions:D,returnedValue:{autoFocus:u,readOnly:n,focused:c??L,sectionListRef:k,onBlur:q,onClick:z,onFocus:U,onInput:F,onPaste:V,enableAccessibleFieldDOMStructure:!0,elements:re,tabIndex:m===0?-1:0,contentEditable:se,value:Z,onChange:fe,areAllSectionsEmpty:T}}},Cy=e=>e.replace(/[\u2066\u2067\u2068\u2069]/g,""),tft=(e,t,n)=>{let r=0,o=n?1:0;const i=[];for(let a=0;a{const t=dr(),n=v.useRef(),r=v.useRef(),{forwardedProps:{onFocus:o,onClick:i,onPaste:a,onBlur:s,inputRef:l,placeholder:c},internalProps:{readOnly:u=!1,disabled:d=!1},parsedSelectedSections:f,activeSectionIndex:p,state:h,fieldValueManager:m,valueManager:y,applyCharacterEditing:w,resetCharacterQuery:x,updateSectionValue:C,updateValueFromValueStr:E,clearActiveSection:P,clearValue:T,setTempAndroidValueStr:I,setSelectedSections:A,getSectionsFromValue:k,areAllSectionsEmpty:O,localizedDigits:$}=e,N=v.useRef(null),L=ca(l,N),j=v.useMemo(()=>tft(h.sections,$,t),[h.sections,$,t]),D=v.useMemo(()=>({syncSelectionToDOM:()=>{if(!N.current)return;if(f==null){N.current.scrollLeft&&(N.current.scrollLeft=0);return}if(N.current!==xa(document))return;const pe=N.current.scrollTop;if(f==="all")N.current.select();else{const ae=j[f],se=ae.type==="empty"?ae.startInInput-ae.startSeparator.length:ae.startInInput,re=ae.type==="empty"?ae.endInInput+ae.endSeparator.length:ae.endInInput;(se!==N.current.selectionStart||re!==N.current.selectionEnd)&&N.current===xa(document)&&N.current.setSelectionRange(se,re),clearTimeout(r.current),r.current=setTimeout(()=>{N.current&&N.current===xa(document)&&N.current.selectionStart===N.current.selectionEnd&&(N.current.selectionStart!==se||N.current.selectionEnd!==re)&&D.syncSelectionToDOM()})}N.current.scrollTop=pe},getActiveSectionIndexFromDOM:()=>{const pe=N.current.selectionStart??0,ae=N.current.selectionEnd??0;if(pe===0&&ae===0)return null;const se=pe<=j[0].startInInput?1:j.findIndex(re=>re.startInInput-re.startSeparator.length>pe);return se===-1?j.length-1:se-1},focusField:(pe=0)=>{var ae;(ae=N.current)==null||ae.focus(),A(pe)},setSelectedSections:pe=>A(pe),isFieldFocused:()=>N.current===xa(document)}),[N,f,j,A]),_=()=>{const pe=N.current.selectionStart??0;let ae;pe<=j[0].startInInput||pe>=j[j.length-1].endInInput?ae=1:ae=j.findIndex(re=>re.startInInput-re.startSeparator.length>pe);const se=ae===-1?j.length-1:ae-1;A(se)},z=kt((...pe)=>{o==null||o(...pe);const ae=N.current;clearTimeout(n.current),n.current=setTimeout(()=>{!ae||ae!==N.current||p==null&&(ae.value.length&&Number(ae.selectionEnd)-Number(ae.selectionStart)===ae.value.length?A("all"):_())})}),F=kt((pe,...ae)=>{pe.isDefaultPrevented()||(i==null||i(pe,...ae),_())}),V=kt(pe=>{if(a==null||a(pe),pe.preventDefault(),u||d)return;const ae=pe.clipboardData.getData("text");if(typeof f=="number"){const se=h.sections[f],re=/^[a-zA-Z]+$/.test(ae),fe=/^[0-9]+$/.test(ae),Z=/^(([a-zA-Z]+)|)([0-9]+)(([a-zA-Z]+)|)$/.test(ae);if(se.contentType==="letter"&&re||se.contentType==="digit"&&fe||se.contentType==="digit-with-letter"&&Z){x(),C({activeSection:se,newSectionValue:ae,shouldGoToNextSection:!0});return}if(re||fe)return}x(),E(ae)}),U=kt((...pe)=>{s==null||s(...pe),A(null)}),q=kt(pe=>{if(u)return;const ae=pe.target.value;if(ae===""){x(),T();return}const se=pe.nativeEvent.data,re=se&&se.length>1,fe=re?se:ae,Z=Cy(fe);if(p==null||re){E(re?se:Z);return}let ce;if(f==="all"&&Z.length===1)ce=Z;else{const ge=Cy(m.getV6InputValueFromSections(j,$,t));let we=-1,me=-1;for(let De=0;DeSe.end)return;const ke=Z.length-ge.length+Se.end-Cy(Se.endSeparator||"").length;ce=Z.slice(Se.start+Cy(Se.startSeparator||"").length,ke)}if(ce.length===0){odt()&&I(fe),x(),P();return}w({keyPressed:ce,sectionIndex:p})}),X=v.useMemo(()=>c!==void 0?c:m.getV6InputValueFromSections(k(y.emptyValue),$,t),[c,m,k,y.emptyValue,$,t]),ie=v.useMemo(()=>h.tempValueStrAndroid??m.getV6InputValueFromSections(h.sections,$,t),[h.sections,m,h.tempValueStrAndroid,$,t]);v.useEffect(()=>(N.current&&N.current===xa(document)&&A("all"),()=>{clearTimeout(n.current),clearTimeout(r.current)}),[]);const ee=v.useMemo(()=>p==null||h.sections[p].contentType==="letter"?"text":"numeric",[p,h.sections]),te=!(N.current&&N.current===xa(document))&&O;return{interactions:D,returnedValue:{readOnly:u,onBlur:U,onClick:F,onFocus:z,onPaste:V,inputRef:L,enableAccessibleFieldDOMStructure:!1,placeholder:X,inputMode:ee,autoComplete:"off",value:te?"":ie,onChange:q}}},jV=e=>{const t=Cn(),{internalProps:n,internalProps:{unstableFieldRef:r,minutesStep:o,enableAccessibleFieldDOMStructure:i=!1,disabled:a=!1,readOnly:s=!1},forwardedProps:{onKeyDown:l,error:c,clearable:u,onClear:d},fieldValueManager:f,valueManager:p,validator:h}=e,m=dr(),y=Xdt(e),{state:w,activeSectionIndex:x,parsedSelectedSections:C,setSelectedSections:E,clearValue:P,clearActiveSection:T,updateSectionValue:I,setTempAndroidValueStr:A,sectionsValueBoundaries:k,localizedDigits:O,timezone:$}=y,N=Zdt({sections:w.sections,updateSectionValue:I,sectionsValueBoundaries:k,localizedDigits:O,setTempAndroidValueStr:A,timezone:$}),{resetCharacterQuery:L}=N,j=p.areValuesEqual(t,w.value,p.emptyValue),D=i?eft:nft,_=v.useMemo(()=>idt(w.sections,m&&!i),[w.sections,m,i]),{returnedValue:z,interactions:F}=D(ue({},e,y,N,{areAllSectionsEmpty:j,sectionOrder:_})),V=kt(Q=>{if(l==null||l(Q),!a)switch(!0){case((Q.ctrlKey||Q.metaKey)&&String.fromCharCode(Q.keyCode)==="A"&&!Q.shiftKey&&!Q.altKey):{Q.preventDefault(),E("all");break}case Q.key==="ArrowRight":{if(Q.preventDefault(),C==null)E(_.startIndex);else if(C==="all")E(_.endIndex);else{const te=_.neighbors[C].rightIndex;te!==null&&E(te)}break}case Q.key==="ArrowLeft":{if(Q.preventDefault(),C==null)E(_.endIndex);else if(C==="all")E(_.startIndex);else{const te=_.neighbors[C].leftIndex;te!==null&&E(te)}break}case Q.key==="Delete":{if(Q.preventDefault(),s)break;C==null||C==="all"?P():T(),L();break}case["ArrowUp","ArrowDown","Home","End","PageUp","PageDown"].includes(Q.key):{if(Q.preventDefault(),s||x==null)break;const te=w.sections[x],pe=f.getActiveDateManager(t,w,te),ae=Jut(t,$,te,Q.key,k,O,pe.date,{minutesStep:o});I({activeSection:te,newSectionValue:ae,shouldGoToNextSection:!1});break}}});bu(()=>{F.syncSelectionToDOM()});const{hasValidationError:U}=hle({props:n,validator:h,timezone:$,value:w.value,onError:n.onError}),q=v.useMemo(()=>c!==void 0?c:U,[U,c]);v.useEffect(()=>{!q&&x==null&&L()},[w.referenceValue,x,q]),v.useEffect(()=>{w.tempValueStrAndroid!=null&&x!=null&&(L(),T())},[w.sections]),v.useImperativeHandle(r,()=>({getSections:()=>w.sections,getActiveSectionIndex:F.getActiveSectionIndexFromDOM,setSelectedSections:F.setSelectedSections,focusField:F.focusField,isFieldFocused:F.isFieldFocused}));const X=kt((Q,...te)=>{Q.preventDefault(),d==null||d(Q,...te),P(),F.isFieldFocused()?E(_.startIndex):F.focusField(0)}),ie={onKeyDown:V,onClear:X,error:q,clearable:!!(u&&!j&&!s&&!a)},ee={disabled:a,readOnly:s};return ue({},e.forwardedProps,ie,ee,z)},rft=["clearable","onClear","InputProps","sx","slots","slotProps"],oft=["ownerState"],BV=e=>{const t=$o(),{clearable:n,onClear:r,InputProps:o,sx:i,slots:a,slotProps:s}=e,l=Vt(e,rft),c=(a==null?void 0:a.clearButton)??vn,u=Yn({elementType:c,externalSlotProps:s==null?void 0:s.clearButton,ownerState:{},className:"clearButton",additionalProps:{title:t.fieldClearLabel}}),d=Vt(u,oft),f=(a==null?void 0:a.clearIcon)??rut,p=Yn({elementType:f,externalSlotProps:s==null?void 0:s.clearIcon,ownerState:{}});return ue({},l,{InputProps:ue({},o,{endAdornment:R.jsxs(v.Fragment,{children:[n&&R.jsx(So,{position:"end",sx:{marginRight:o!=null&&o.endAdornment?-1:-1.5},children:R.jsx(c,ue({},d,{onClick:r,children:R.jsx(f,ue({fontSize:"small"},p))}))}),o==null?void 0:o.endAdornment]})}),sx:[{"& .clearButton":{opacity:1},"@media (pointer: fine)":{"& .clearButton":{opacity:0},"&:hover, &:focus-within":{".clearButton":{opacity:1}}}},...Array.isArray(i)?i:[i]]})},ift=["value","defaultValue","referenceDate","format","formatDensity","onChange","timezone","onError","shouldRespectLeadingZeros","selectedSections","onSelectedSectionsChange","unstableFieldRef","enableAccessibleFieldDOMStructure","disabled","readOnly","dateSeparator"],zV=(e,t)=>v.useMemo(()=>{const n=ue({},e),r={},o=i=>{n.hasOwnProperty(i)&&(r[i]=n[i],delete n[i])};return ift.forEach(o),t==="date"?cF.forEach(o):t==="time"?uF.forEach(o):t==="date-time"&&(cF.forEach(o),uF.forEach(o),ple.forEach(o)),{forwardedProps:n,internalProps:r}},[e,t]),aft=v.createContext(null);function gle(e){const{contextValue:t,localeText:n,children:r}=e;return R.jsx(aft.Provider,{value:t,children:R.jsx(xg,{localeText:n,children:r})})}const sft=e=>{const t=Cn(),n=Vg();return ue({},e,{disablePast:e.disablePast??!1,disableFuture:e.disableFuture??!1,format:e.format??t.formats.keyboardDate,minDate:Li(t,e.minDate,n.minDate),maxDate:Li(t,e.maxDate,n.maxDate)})},lft=e=>{const t=Cn(),r=e.ampm??t.is12HourCycleInCurrentLocale()?t.formats.fullTime12h:t.formats.fullTime24h;return ue({},e,{disablePast:e.disablePast??!1,disableFuture:e.disableFuture??!1,format:e.format??r})},cft=e=>{const t=Cn(),n=Vg(),o=e.ampm??t.is12HourCycleInCurrentLocale()?t.formats.keyboardDateTime12h:t.formats.keyboardDateTime24h;return ue({},e,{disablePast:e.disablePast??!1,disableFuture:e.disableFuture??!1,format:e.format??o,disableIgnoringDatePartForTimeValidation:!!(e.minDateTime||e.maxDateTime),minDate:Li(t,e.minDateTime??e.minDate,n.minDate),maxDate:Li(t,e.maxDateTime??e.maxDate,n.maxDate),minTime:e.minDateTime??e.minTime,maxTime:e.maxDateTime??e.maxTime})},uft=e=>{const t=sft(e),{forwardedProps:n,internalProps:r}=zV(t,"date");return jV({forwardedProps:n,internalProps:r,valueManager:po,fieldValueManager:NV,validator:n0,valueType:"date"})};function dft(e){return Wn("MuiPickersTextField",e)}Xn("MuiPickersTextField",["root","focused","disabled","error","required"]);function fft(e){return Wn("MuiPickersInputBase",e)}const Wy=Xn("MuiPickersInputBase",["root","focused","disabled","error","notchedOutline","sectionContent","sectionBefore","sectionAfter","adornedStart","adornedEnd","input"]);function pft(e){return Wn("MuiPickersSectionList",e)}const hw=Xn("MuiPickersSectionList",["root","section","sectionContent"]),hft=["slots","slotProps","elements","sectionListRef"],mle=oe("div",{name:"MuiPickersSectionList",slot:"Root",overridesResolver:(e,t)=>t.root})({direction:"ltr /*! @noflip */",outline:"none"}),yle=oe("span",{name:"MuiPickersSectionList",slot:"Section",overridesResolver:(e,t)=>t.section})({}),vle=oe("span",{name:"MuiPickersSectionList",slot:"SectionSeparator",overridesResolver:(e,t)=>t.sectionSeparator})({whiteSpace:"pre"}),ble=oe("span",{name:"MuiPickersSectionList",slot:"SectionContent",overridesResolver:(e,t)=>t.sectionContent})({outline:"none"}),gft=e=>{const{classes:t}=e;return zn({root:["root"],section:["section"],sectionContent:["sectionContent"]},pft,t)};function mft(e){const{slots:t,slotProps:n,element:r,classes:o}=e,i=(t==null?void 0:t.section)??yle,a=Yn({elementType:i,externalSlotProps:n==null?void 0:n.section,externalForwardedProps:r.container,className:o.section,ownerState:{}}),s=(t==null?void 0:t.sectionContent)??ble,l=Yn({elementType:s,externalSlotProps:n==null?void 0:n.sectionContent,externalForwardedProps:r.content,additionalProps:{suppressContentEditableWarning:!0},className:o.sectionContent,ownerState:{}}),c=(t==null?void 0:t.sectionSeparator)??vle,u=Yn({elementType:c,externalSlotProps:n==null?void 0:n.sectionSeparator,externalForwardedProps:r.before,ownerState:{position:"before"}}),d=Yn({elementType:c,externalSlotProps:n==null?void 0:n.sectionSeparator,externalForwardedProps:r.after,ownerState:{position:"after"}});return R.jsxs(i,ue({},a,{children:[R.jsx(c,ue({},u)),R.jsx(s,ue({},l)),R.jsx(c,ue({},d))]}))}const yft=v.forwardRef(function(t,n){const r=cn({props:t,name:"MuiPickersSectionList"}),{slots:o,slotProps:i,elements:a,sectionListRef:s}=r,l=Vt(r,hft),c=gft(r),u=v.useRef(null),d=ca(n,u),f=m=>{if(!u.current)throw new Error(`MUI X: Cannot call sectionListRef.${m} before the mount of the component.`);return u.current};v.useImperativeHandle(s,()=>({getRoot(){return f("getRoot")},getSectionContainer(m){return f("getSectionContainer").querySelector(`.${hw.section}[data-sectionindex="${m}"]`)},getSectionContent(m){return f("getSectionContent").querySelector(`.${hw.section}[data-sectionindex="${m}"] .${hw.sectionContent}`)},getSectionIndexFromDOMElement(m){const y=f("getSectionIndexFromDOMElement");if(m==null||!y.contains(m))return null;let w=null;return m.classList.contains(hw.section)?w=m:m.classList.contains(hw.sectionContent)&&(w=m.parentElement),w==null?null:Number(w.dataset.sectionindex)}}));const p=(o==null?void 0:o.root)??mle,h=Yn({elementType:p,externalSlotProps:i==null?void 0:i.root,externalForwardedProps:l,additionalProps:{ref:d,suppressContentEditableWarning:!0},className:c.root,ownerState:{}});return R.jsx(p,ue({},h,{children:h.contentEditable?a.map(({content:m,before:y,after:w})=>`${y.children}${m.children}${w.children}`).join(""):R.jsx(v.Fragment,{children:a.map((m,y)=>R.jsx(mft,{slots:o,slotProps:i,element:m,classes:c},y))})}))}),vft=["elements","areAllSectionsEmpty","defaultValue","label","value","onChange","id","autoFocus","endAdornment","startAdornment","renderSuffix","slots","slotProps","contentEditable","tabIndex","onInput","onPaste","onKeyDown","fullWidth","name","readOnly","inputProps","inputRef","sectionListRef"],bft=e=>Math.round(e*1e5)/1e5,gM=oe("div",{name:"MuiPickersInputBase",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>ue({},e.typography.body1,{color:(e.vars||e).palette.text.primary,cursor:"text",padding:0,display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",boxSizing:"border-box",letterSpacing:`${bft(.15/16)}em`,variants:[{props:{fullWidth:!0},style:{width:"100%"}}]})),VV=oe(mle,{name:"MuiPickersInputBase",slot:"SectionsContainer",overridesResolver:(e,t)=>t.sectionsContainer})(({theme:e})=>({padding:"4px 0 5px",fontFamily:e.typography.fontFamily,fontSize:"inherit",lineHeight:"1.4375em",flexGrow:1,outline:"none",display:"flex",flexWrap:"nowrap",overflow:"hidden",letterSpacing:"inherit",width:"182px",variants:[{props:{isRtl:!0},style:{textAlign:"right /*! @noflip */"}},{props:{size:"small"},style:{paddingTop:1}},{props:{adornedStart:!1,focused:!1,filled:!1},style:{color:"currentColor",opacity:0}},{props:({adornedStart:t,focused:n,filled:r,label:o})=>!t&&!n&&!r&&o==null,style:e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:e.palette.mode==="light"?.42:.5}}]})),wft=oe(yle,{name:"MuiPickersInputBase",slot:"Section",overridesResolver:(e,t)=>t.section})(({theme:e})=>({fontFamily:e.typography.fontFamily,fontSize:"inherit",letterSpacing:"inherit",lineHeight:"1.4375em",display:"flex"})),xft=oe(ble,{name:"MuiPickersInputBase",slot:"SectionContent",overridesResolver:(e,t)=>t.content})(({theme:e})=>({fontFamily:e.typography.fontFamily,lineHeight:"1.4375em",letterSpacing:"inherit",width:"fit-content",outline:"none"})),Sft=oe(vle,{name:"MuiPickersInputBase",slot:"Separator",overridesResolver:(e,t)=>t.separator})(()=>({whiteSpace:"pre",letterSpacing:"inherit"})),Cft=oe("input",{name:"MuiPickersInputBase",slot:"Input",overridesResolver:(e,t)=>t.hiddenInput})(ue({},Bct)),Eft=e=>{const{focused:t,disabled:n,error:r,classes:o,fullWidth:i,readOnly:a,color:s,size:l,endAdornment:c,startAdornment:u}=e,d={root:["root",t&&!n&&"focused",n&&"disabled",a&&"readOnly",r&&"error",i&&"fullWidth",`color${Nct(s)}`,l==="small"&&"inputSizeSmall",!!u&&"adornedStart",!!c&&"adornedEnd"],notchedOutline:["notchedOutline"],input:["input"],sectionsContainer:["sectionsContainer"],sectionContent:["sectionContent"],sectionBefore:["sectionBefore"],sectionAfter:["sectionAfter"]};return zn(d,fft,o)},HV=v.forwardRef(function(t,n){const r=cn({props:t,name:"MuiPickersInputBase"}),{elements:o,areAllSectionsEmpty:i,value:a,onChange:s,id:l,endAdornment:c,startAdornment:u,renderSuffix:d,slots:f,slotProps:p,contentEditable:h,tabIndex:m,onInput:y,onPaste:w,onKeyDown:x,name:C,readOnly:E,inputProps:P,inputRef:T,sectionListRef:I}=r,A=Vt(r,vft),k=v.useRef(null),O=ca(n,k),$=ca(P==null?void 0:P.ref,T),N=dr(),L=Fa();if(!L)throw new Error("MUI X: PickersInputBase should always be used inside a PickersTextField component");const j=U=>{var q;if(L.disabled){U.stopPropagation();return}(q=L.onFocus)==null||q.call(L,U)};v.useEffect(()=>{L&&L.setAdornedStart(!!u)},[L,u]),v.useEffect(()=>{L&&(i?L.onEmpty():L.onFilled())},[L,i]);const D=ue({},r,L,{isRtl:N}),_=Eft(D),z=(f==null?void 0:f.root)||gM,F=Yn({elementType:z,externalSlotProps:p==null?void 0:p.root,externalForwardedProps:A,additionalProps:{"aria-invalid":L.error,ref:O},className:_.root,ownerState:D}),V=(f==null?void 0:f.input)||VV;return R.jsxs(z,ue({},F,{children:[u,R.jsx(yft,{sectionListRef:I,elements:o,contentEditable:h,tabIndex:m,className:_.sectionsContainer,onFocus:j,onBlur:L.onBlur,onInput:y,onPaste:w,onKeyDown:x,slots:{root:V,section:wft,sectionContent:xft,sectionSeparator:Sft},slotProps:{root:{ownerState:D},sectionContent:{className:Wy.sectionContent},sectionSeparator:({position:U})=>({className:U==="before"?Wy.sectionBefore:Wy.sectionAfter})}}),c,d?d(ue({},L)):null,R.jsx(Cft,ue({name:C,className:_.input,value:a,onChange:s,id:l,"aria-hidden":"true",tabIndex:-1,readOnly:E,required:L.required,disabled:L.disabled},P,{ref:$}))]}))});function Pft(e){return Wn("MuiPickersOutlinedInput",e)}const Jl=ue({},Wy,Xn("MuiPickersOutlinedInput",["root","notchedOutline","input"])),Tft=["children","className","label","notched","shrink"],Ift=oe("fieldset",{name:"MuiPickersOutlinedInput",slot:"NotchedOutline",overridesResolver:(e,t)=>t.notchedOutline})(({theme:e})=>{const t=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{textAlign:"left",position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden",minWidth:"0%",borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:t}}),q7=oe("span")(({theme:e})=>({fontFamily:e.typography.fontFamily,fontSize:"inherit"})),Oft=oe("legend")(({theme:e})=>({float:"unset",width:"auto",overflow:"hidden",variants:[{props:{withLabel:!1},style:{padding:0,lineHeight:"11px",transition:e.transitions.create("width",{duration:150,easing:e.transitions.easing.easeOut})}},{props:{withLabel:!0},style:{display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:e.transitions.create("max-width",{duration:50,easing:e.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}}},{props:{withLabel:!0,notched:!0},style:{maxWidth:"100%",transition:e.transitions.create("max-width",{duration:100,easing:e.transitions.easing.easeOut,delay:50})}}]}));function Aft(e){const{className:t,label:n}=e,r=Vt(e,Tft),o=n!=null&&n!=="",i=ue({},e,{withLabel:o});return R.jsx(Ift,ue({"aria-hidden":!0,className:t},r,{ownerState:i,children:R.jsx(Oft,{ownerState:i,children:o?R.jsx(q7,{children:n}):R.jsx(q7,{className:"notranslate",children:"​"})})}))}const kft=["label","autoFocus","ownerState","notched"],Mft=oe(gM,{name:"MuiPickersOutlinedInput",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>{const t=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{padding:"0 14px",borderRadius:(e.vars||e).shape.borderRadius,[`&:hover .${Jl.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${Jl.notchedOutline}`]:{borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:t}},[`&.${Jl.focused} .${Jl.notchedOutline}`]:{borderStyle:"solid",borderWidth:2},[`&.${Jl.disabled}`]:{[`& .${Jl.notchedOutline}`]:{borderColor:(e.vars||e).palette.action.disabled},"*":{color:(e.vars||e).palette.action.disabled}},[`&.${Jl.error} .${Jl.notchedOutline}`]:{borderColor:(e.vars||e).palette.error.main},variants:Object.keys((e.vars??e).palette).filter(n=>{var r;return((r=(e.vars??e).palette[n])==null?void 0:r.main)??!1}).map(n=>({props:{color:n},style:{[`&.${Jl.focused}:not(.${Jl.error}) .${Jl.notchedOutline}`]:{borderColor:(e.vars||e).palette[n].main}}}))}}),Rft=oe(VV,{name:"MuiPickersOutlinedInput",slot:"SectionsContainer",overridesResolver:(e,t)=>t.sectionsContainer})({padding:"16.5px 0",variants:[{props:{size:"small"},style:{padding:"8.5px 0"}}]}),$ft=e=>{const{classes:t}=e,r=zn({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},Pft,t);return ue({},t,r)},wle=v.forwardRef(function(t,n){const r=cn({props:t,name:"MuiPickersOutlinedInput"}),{label:o,ownerState:i,notched:a}=r,s=Vt(r,kft),l=Fa(),c=ue({},r,i,l,{color:(l==null?void 0:l.color)||"primary"}),u=$ft(c);return R.jsx(HV,ue({slots:{root:Mft,input:Rft},renderSuffix:d=>R.jsx(Aft,{shrink:!!(a||d.adornedStart||d.focused||d.filled),notched:!!(a||d.adornedStart||d.focused||d.filled),className:u.notchedOutline,label:o!=null&&o!==""&&(l!=null&&l.required)?R.jsxs(v.Fragment,{children:[o," ","*"]}):o,ownerState:c})},s,{label:o,classes:u,ref:n}))});wle.muiName="Input";function Dft(e){return Wn("MuiPickersFilledInput",e)}const dh=ue({},Wy,Xn("MuiPickersFilledInput",["root","underline","input"])),_ft=["label","autoFocus","disableUnderline","ownerState"],Nft=oe(gM,{name:"MuiPickersFilledInput",slot:"Root",overridesResolver:(e,t)=>t.root,shouldForwardProp:e=>NP(e)&&e!=="disableUnderline"})(({theme:e})=>{const t=e.palette.mode==="light",n=t?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",r=t?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",o=t?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",i=t?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r,borderTopLeftRadius:(e.vars||e).shape.borderRadius,borderTopRightRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),"&:hover":{backgroundColor:e.vars?e.vars.palette.FilledInput.hoverBg:o,"@media (hover: none)":{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r}},[`&.${dh.focused}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r},[`&.${dh.disabled}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.disabledBg:i},variants:[...Object.keys((e.vars??e).palette).filter(a=>(e.vars??e).palette[a].main).map(a=>{var s;return{props:{color:a,disableUnderline:!1},style:{"&::after":{borderBottom:`2px solid ${(s=(e.vars||e).palette[a])==null?void 0:s.main}`}}}}),{props:{disableUnderline:!1},style:{"&::after":{left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${dh.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${dh.error}`]:{"&:before, &:after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / ${e.vars.opacity.inputUnderline})`:n}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${dh.disabled}, .${dh.error}):before`]:{borderBottom:`1px solid ${(e.vars||e).palette.text.primary}`},[`&.${dh.disabled}:before`]:{borderBottomStyle:"dotted"}}},{props:({startAdornment:a})=>!!a,style:{paddingLeft:12}},{props:({endAdornment:a})=>!!a,style:{paddingRight:12}}]}}),Lft=oe(VV,{name:"MuiPickersFilledInput",slot:"sectionsContainer",overridesResolver:(e,t)=>t.sectionsContainer})({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12,variants:[{props:{size:"small"},style:{paddingTop:21,paddingBottom:4}},{props:({startAdornment:e})=>!!e,style:{paddingLeft:0}},{props:({endAdornment:e})=>!!e,style:{paddingRight:0}},{props:{hiddenLabel:!0},style:{paddingTop:16,paddingBottom:17}},{props:{hiddenLabel:!0,size:"small"},style:{paddingTop:8,paddingBottom:9}}]}),Fft=e=>{const{classes:t,disableUnderline:n}=e,o=zn({root:["root",!n&&"underline"],input:["input"]},Dft,t);return ue({},t,o)},xle=v.forwardRef(function(t,n){const r=cn({props:t,name:"MuiPickersFilledInput"}),{label:o,disableUnderline:i=!1,ownerState:a}=r,s=Vt(r,_ft),l=Fa(),c=ue({},r,a,l,{color:(l==null?void 0:l.color)||"primary"}),u=Fft(c);return R.jsx(HV,ue({slots:{root:Nft,input:Lft},slotProps:{root:{disableUnderline:i}}},s,{label:o,classes:u,ref:n}))});xle.muiName="Input";function jft(e){return Wn("MuiPickersFilledInput",e)}const gw=ue({},Wy,Xn("MuiPickersInput",["root","input"])),Bft=["label","autoFocus","disableUnderline","ownerState"],zft=oe(gM,{name:"MuiPickersInput",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>{let n=e.palette.mode==="light"?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return e.vars&&(n=`rgba(${e.vars.palette.common.onBackgroundChannel} / ${e.vars.opacity.inputUnderline})`),{"label + &":{marginTop:16},variants:[...Object.keys((e.vars??e).palette).filter(r=>(e.vars??e).palette[r].main).map(r=>({props:{color:r},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[r].main}`}}})),{props:{disableUnderline:!1},style:{"&::after":{background:"red",left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${gw.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${gw.error}`]:{"&:before, &:after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${n}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${gw.disabled}, .${gw.error}):before`]:{borderBottom:`2px solid ${(e.vars||e).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${n}`}},[`&.${gw.disabled}:before`]:{borderBottomStyle:"dotted"}}}]}}),Vft=e=>{const{classes:t,disableUnderline:n}=e,o=zn({root:["root",!n&&"underline"],input:["input"]},jft,t);return ue({},t,o)},Sle=v.forwardRef(function(t,n){const r=cn({props:t,name:"MuiPickersInput"}),{label:o,disableUnderline:i=!1,ownerState:a}=r,s=Vt(r,Bft),l=Fa(),c=ue({},r,a,l,{disableUnderline:i,color:(l==null?void 0:l.color)||"primary"}),u=Vft(c);return R.jsx(HV,ue({slots:{root:zft}},s,{label:o,classes:u,ref:n}))});Sle.muiName="Input";const Hft=["onFocus","onBlur","className","color","disabled","error","variant","required","InputProps","inputProps","inputRef","sectionListRef","elements","areAllSectionsEmpty","onClick","onKeyDown","onKeyUp","onPaste","onInput","endAdornment","startAdornment","tabIndex","contentEditable","focused","value","onChange","fullWidth","id","name","helperText","FormHelperTextProps","label","InputLabelProps"],Uft={standard:Sle,filled:xle,outlined:wle},Wft=oe(_g,{name:"MuiPickersTextField",slot:"Root",overridesResolver:(e,t)=>t.root})({}),Gft=e=>{const{focused:t,disabled:n,classes:r,required:o}=e;return zn({root:["root",t&&!n&&"focused",n&&"disabled",o&&"required"]},dft,r)},UV=v.forwardRef(function(t,n){const r=cn({props:t,name:"MuiPickersTextField"}),{onFocus:o,onBlur:i,className:a,color:s="primary",disabled:l=!1,error:c=!1,variant:u="outlined",required:d=!1,InputProps:f,inputProps:p,inputRef:h,sectionListRef:m,elements:y,areAllSectionsEmpty:w,onClick:x,onKeyDown:C,onKeyUp:E,onPaste:P,onInput:T,endAdornment:I,startAdornment:A,tabIndex:k,contentEditable:O,focused:$,value:N,onChange:L,fullWidth:j,id:D,name:_,helperText:z,FormHelperTextProps:F,label:V,InputLabelProps:U}=r,q=Vt(r,Hft),X=v.useRef(null),ie=ca(n,X),ee=Zb(D),Q=z&&ee?`${ee}-helper-text`:void 0,te=V&&ee?`${ee}-label`:void 0,pe=ue({},r,{color:s,disabled:l,error:c,focused:$,required:d,variant:u}),ae=Gft(pe),se=Uft[u];return R.jsxs(Wft,ue({className:de(ae.root,a),ref:ie,focused:$,onFocus:o,onBlur:i,disabled:l,variant:u,error:c,color:s,fullWidth:j,required:d,ownerState:pe},q,{children:[R.jsx(Ng,ue({htmlFor:ee,id:te},U,{children:V})),R.jsx(se,ue({elements:y,areAllSectionsEmpty:w,onClick:x,onKeyDown:C,onKeyUp:E,onInput:T,onPaste:P,endAdornment:I,startAdornment:A,tabIndex:k,contentEditable:O,value:N,onChange:L,id:ee,fullWidth:j,inputProps:p,inputRef:h,sectionListRef:m,label:V,name:_,role:"group","aria-labelledby":te},f)),z&&R.jsx(lk,ue({id:Q},F,{children:z}))]}))}),qft=["enableAccessibleFieldDOMStructure"],Kft=["InputProps","readOnly"],Yft=["onPaste","onKeyDown","inputMode","readOnly","InputProps","inputProps","inputRef"],WV=e=>{let{enableAccessibleFieldDOMStructure:t}=e,n=Vt(e,qft);if(t){const{InputProps:d,readOnly:f}=n,p=Vt(n,Kft);return ue({},p,{InputProps:ue({},d??{},{readOnly:f})})}const{onPaste:r,onKeyDown:o,inputMode:i,readOnly:a,InputProps:s,inputProps:l,inputRef:c}=n,u=Vt(n,Yft);return ue({},u,{InputProps:ue({},s??{},{readOnly:a}),inputProps:ue({},l??{},{inputMode:i,onPaste:r,onKeyDown:o,ref:c})})},Qft=["slots","slotProps","InputProps","inputProps"],Cle=v.forwardRef(function(t,n){const r=cn({props:t,name:"MuiDateField"}),{slots:o,slotProps:i,InputProps:a,inputProps:s}=r,l=Vt(r,Qft),c=r,u=(o==null?void 0:o.textField)??(t.enableAccessibleFieldDOMStructure?UV:nn),d=Yn({elementType:u,externalSlotProps:i==null?void 0:i.textField,externalForwardedProps:l,additionalProps:{ref:n},ownerState:c});d.inputProps=ue({},s,d.inputProps),d.InputProps=ue({},a,d.InputProps);const f=uft(d),p=WV(f),h=BV(ue({},p,{slots:o,slotProps:i}));return R.jsx(u,ue({},h))}),Xft=e=>{const t=lft(e),{forwardedProps:n,internalProps:r}=zV(t,"time");return jV({forwardedProps:n,internalProps:r,valueManager:po,fieldValueManager:NV,validator:r1,valueType:"time"})},Jft=["slots","slotProps","InputProps","inputProps"],Ele=v.forwardRef(function(t,n){const r=cn({props:t,name:"MuiTimeField"}),{slots:o,slotProps:i,InputProps:a,inputProps:s}=r,l=Vt(r,Jft),c=r,u=(o==null?void 0:o.textField)??(t.enableAccessibleFieldDOMStructure?UV:nn),d=Yn({elementType:u,externalSlotProps:i==null?void 0:i.textField,externalForwardedProps:l,ownerState:c,additionalProps:{ref:n}});d.inputProps=ue({},s,d.inputProps),d.InputProps=ue({},a,d.InputProps);const f=Xft(d),p=WV(f),h=BV(ue({},p,{slots:o,slotProps:i}));return R.jsx(u,ue({},h))}),Zft=e=>{const t=cft(e),{forwardedProps:n,internalProps:r}=zV(t,"date-time");return jV({forwardedProps:n,internalProps:r,valueManager:po,fieldValueManager:NV,validator:hM,valueType:"date-time"})},ept=["slots","slotProps","InputProps","inputProps"],Ple=v.forwardRef(function(t,n){const r=cn({props:t,name:"MuiDateTimeField"}),{slots:o,slotProps:i,InputProps:a,inputProps:s}=r,l=Vt(r,ept),c=r,u=(o==null?void 0:o.textField)??(t.enableAccessibleFieldDOMStructure?UV:nn),d=Yn({elementType:u,externalSlotProps:i==null?void 0:i.textField,externalForwardedProps:l,ownerState:c,additionalProps:{ref:n}});d.inputProps=ue({},s,d.inputProps),d.InputProps=ue({},a,d.InputProps);const f=Zft(d),p=WV(f),h=BV(ue({},p,{slots:o,slotProps:i}));return R.jsx(u,ue({},h))}),Tle=({shouldDisableDate:e,shouldDisableMonth:t,shouldDisableYear:n,minDate:r,maxDate:o,disableFuture:i,disablePast:a,timezone:s})=>{const l=zg();return v.useCallback(c=>n0({adapter:l,value:c,timezone:s,props:{shouldDisableDate:e,shouldDisableMonth:t,shouldDisableYear:n,minDate:r,maxDate:o,disableFuture:i,disablePast:a}})!==null,[l,e,t,n,r,o,i,a,s])},tpt=(e,t,n)=>(r,o)=>{switch(o.type){case"changeMonth":return ue({},r,{slideDirection:o.direction,currentMonth:o.newMonth,isMonthSwitchingAnimating:!e});case"changeMonthTimezone":{const i=o.newTimezone;if(n.getTimezone(r.currentMonth)===i)return r;let a=n.setTimezone(r.currentMonth,i);return n.getMonth(a)!==n.getMonth(r.currentMonth)&&(a=n.setMonth(a,n.getMonth(r.currentMonth))),ue({},r,{currentMonth:a})}case"finishMonthSwitchingAnimation":return ue({},r,{isMonthSwitchingAnimating:!1});case"changeFocusedDay":{if(r.focusedDay!=null&&o.focusedDay!=null&&n.isSameDay(o.focusedDay,r.focusedDay))return r;const i=o.focusedDay!=null&&!t&&!n.isSameMonth(r.currentMonth,o.focusedDay);return ue({},r,{focusedDay:o.focusedDay,isMonthSwitchingAnimating:i&&!e&&!o.withoutMonthSwitchingAnimation,currentMonth:i?n.startOfMonth(o.focusedDay):r.currentMonth,slideDirection:o.focusedDay!=null&&n.isAfterDay(o.focusedDay,r.currentMonth)?"left":"right"})}default:throw new Error("missing support")}},npt=e=>{const{value:t,referenceDate:n,disableFuture:r,disablePast:o,disableSwitchToMonthOnDayFocus:i=!1,maxDate:a,minDate:s,onMonthChange:l,reduceAnimations:c,shouldDisableDate:u,timezone:d}=e,f=Cn(),p=v.useRef(tpt(!!c,i,f)).current,h=v.useMemo(()=>po.getInitialReferenceValue({value:t,utils:f,timezone:d,props:e,referenceDate:n,granularity:dc.day}),[n,d]),[m,y]=v.useReducer(p,{isMonthSwitchingAnimating:!1,focusedDay:h,currentMonth:f.startOfMonth(h),slideDirection:"left"});v.useEffect(()=>{y({type:"changeMonthTimezone",newTimezone:f.getTimezone(h)})},[h,f]);const w=v.useCallback(T=>{y(ue({type:"changeMonth"},T)),l&&l(T.newMonth)},[l]),x=v.useCallback(T=>{const I=T;f.isSameMonth(I,m.currentMonth)||w({newMonth:f.startOfMonth(I),direction:f.isAfterDay(I,m.currentMonth)?"left":"right"})},[m.currentMonth,w,f]),C=Tle({shouldDisableDate:u,minDate:s,maxDate:a,disableFuture:r,disablePast:o,timezone:d}),E=v.useCallback(()=>{y({type:"finishMonthSwitchingAnimation"})},[]),P=kt((T,I)=>{C(T)||y({type:"changeFocusedDay",focusedDay:T,withoutMonthSwitchingAnimation:I})});return{referenceDate:h,calendarState:m,changeMonth:x,changeFocusedDay:P,isDateDisabled:C,onMonthSwitchingAnimationEnd:E,handleChangeMonth:w}},rpt=e=>Wn("MuiPickersFadeTransitionGroup",e);Xn("MuiPickersFadeTransitionGroup",["root"]);const opt=e=>{const{classes:t}=e;return zn({root:["root"]},rpt,t)},ipt=oe(RC,{name:"MuiPickersFadeTransitionGroup",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"block",position:"relative"});function Ile(e){const t=cn({props:e,name:"MuiPickersFadeTransitionGroup"}),{children:n,className:r,reduceAnimations:o,transKey:i}=t,a=opt(t),s=Ro();return o?n:R.jsx(ipt,{className:de(a.root,r),children:R.jsx(Tb,{appear:!1,mountOnEnter:!0,unmountOnExit:!0,timeout:{appear:s.transitions.duration.enteringScreen,enter:s.transitions.duration.enteringScreen,exit:0},children:n},i)})}const apt=e=>Wn("MuiPickersSlideTransition",e),Ks=Xn("MuiPickersSlideTransition",["root","slideEnter-left","slideEnter-right","slideEnterActive","slideExit","slideExitActiveLeft-left","slideExitActiveLeft-right"]),spt=["children","className","reduceAnimations","slideDirection","transKey","classes"],lpt=e=>{const{classes:t,slideDirection:n}=e,r={root:["root"],exit:["slideExit"],enterActive:["slideEnterActive"],enter:[`slideEnter-${n}`],exitActive:[`slideExitActiveLeft-${n}`]};return zn(r,apt,t)},cpt=oe(RC,{name:"MuiPickersSlideTransition",slot:"Root",overridesResolver:(e,t)=>[t.root,{[`.${Ks["slideEnter-left"]}`]:t["slideEnter-left"]},{[`.${Ks["slideEnter-right"]}`]:t["slideEnter-right"]},{[`.${Ks.slideEnterActive}`]:t.slideEnterActive},{[`.${Ks.slideExit}`]:t.slideExit},{[`.${Ks["slideExitActiveLeft-left"]}`]:t["slideExitActiveLeft-left"]},{[`.${Ks["slideExitActiveLeft-right"]}`]:t["slideExitActiveLeft-right"]}]})(({theme:e})=>{const t=e.transitions.create("transform",{duration:e.transitions.duration.complex,easing:"cubic-bezier(0.35, 0.8, 0.4, 1)"});return{display:"block",position:"relative",overflowX:"hidden","& > *":{position:"absolute",top:0,right:0,left:0},[`& .${Ks["slideEnter-left"]}`]:{willChange:"transform",transform:"translate(100%)",zIndex:1},[`& .${Ks["slideEnter-right"]}`]:{willChange:"transform",transform:"translate(-100%)",zIndex:1},[`& .${Ks.slideEnterActive}`]:{transform:"translate(0%)",transition:t},[`& .${Ks.slideExit}`]:{transform:"translate(0%)"},[`& .${Ks["slideExitActiveLeft-left"]}`]:{willChange:"transform",transform:"translate(-100%)",transition:t,zIndex:0},[`& .${Ks["slideExitActiveLeft-right"]}`]:{willChange:"transform",transform:"translate(100%)",transition:t,zIndex:0}}});function upt(e){const t=cn({props:e,name:"MuiPickersSlideTransition"}),{children:n,className:r,reduceAnimations:o,transKey:i}=t,a=Vt(t,spt),s=lpt(t),l=Ro();if(o)return R.jsx("div",{className:de(s.root,r),children:n});const c={exit:s.exit,enterActive:s.enterActive,enter:s.enter,exitActive:s.exitActive};return R.jsx(cpt,{className:de(s.root,r),childFactory:u=>v.cloneElement(u,{classNames:c}),role:"presentation",children:R.jsx(_B,ue({mountOnEnter:!0,unmountOnExit:!0,timeout:l.transitions.duration.complex,classNames:c},a,{children:n}),i)})}const dpt=e=>Wn("MuiDayCalendar",e);Xn("MuiDayCalendar",["root","header","weekDayLabel","loadingContainer","slideTransition","monthContainer","weekContainer","weekNumberLabel","weekNumber"]);const fpt=["parentProps","day","focusableDay","selectedDays","isDateDisabled","currentMonthNumber","isViewFocused"],ppt=["ownerState"],hpt=e=>{const{classes:t}=e;return zn({root:["root"],header:["header"],weekDayLabel:["weekDayLabel"],loadingContainer:["loadingContainer"],slideTransition:["slideTransition"],monthContainer:["monthContainer"],weekContainer:["weekContainer"],weekNumberLabel:["weekNumberLabel"],weekNumber:["weekNumber"]},dpt,t)},Ole=(BS+cM*2)*6,gpt=oe("div",{name:"MuiDayCalendar",slot:"Root",overridesResolver:(e,t)=>t.root})({}),mpt=oe("div",{name:"MuiDayCalendar",slot:"Header",overridesResolver:(e,t)=>t.header})({display:"flex",justifyContent:"center",alignItems:"center"}),ypt=oe(st,{name:"MuiDayCalendar",slot:"WeekDayLabel",overridesResolver:(e,t)=>t.weekDayLabel})(({theme:e})=>({width:36,height:40,margin:"0 2px",textAlign:"center",display:"flex",justifyContent:"center",alignItems:"center",color:(e.vars||e).palette.text.secondary})),vpt=oe(st,{name:"MuiDayCalendar",slot:"WeekNumberLabel",overridesResolver:(e,t)=>t.weekNumberLabel})(({theme:e})=>({width:36,height:40,margin:"0 2px",textAlign:"center",display:"flex",justifyContent:"center",alignItems:"center",color:e.palette.text.disabled})),bpt=oe(st,{name:"MuiDayCalendar",slot:"WeekNumber",overridesResolver:(e,t)=>t.weekNumber})(({theme:e})=>ue({},e.typography.caption,{width:BS,height:BS,padding:0,margin:`0 ${cM}px`,color:e.palette.text.disabled,fontSize:"0.75rem",alignItems:"center",justifyContent:"center",display:"inline-flex"})),wpt=oe("div",{name:"MuiDayCalendar",slot:"LoadingContainer",overridesResolver:(e,t)=>t.loadingContainer})({display:"flex",justifyContent:"center",alignItems:"center",minHeight:Ole}),xpt=oe(upt,{name:"MuiDayCalendar",slot:"SlideTransition",overridesResolver:(e,t)=>t.slideTransition})({minHeight:Ole}),Spt=oe("div",{name:"MuiDayCalendar",slot:"MonthContainer",overridesResolver:(e,t)=>t.monthContainer})({overflow:"hidden"}),Cpt=oe("div",{name:"MuiDayCalendar",slot:"WeekContainer",overridesResolver:(e,t)=>t.weekContainer})({margin:`${cM}px 0`,display:"flex",justifyContent:"center"});function Ept(e){let{parentProps:t,day:n,focusableDay:r,selectedDays:o,isDateDisabled:i,currentMonthNumber:a,isViewFocused:s}=e,l=Vt(e,fpt);const{disabled:c,disableHighlightToday:u,isMonthSwitchingAnimating:d,showDaysOutsideCurrentMonth:f,slots:p,slotProps:h,timezone:m}=t,y=Cn(),w=Hg(m),x=r!==null&&y.isSameDay(n,r),C=o.some(N=>y.isSameDay(N,n)),E=y.isSameDay(n,w),P=(p==null?void 0:p.day)??Hdt,T=Yn({elementType:P,externalSlotProps:h==null?void 0:h.day,additionalProps:ue({disableHighlightToday:u,showDaysOutsideCurrentMonth:f,role:"gridcell",isAnimating:d,"data-timestamp":y.toJsDate(n).valueOf()},l),ownerState:ue({},t,{day:n,selected:C})}),I=Vt(T,ppt),A=v.useMemo(()=>c||i(n),[c,i,n]),k=v.useMemo(()=>y.getMonth(n)!==a,[y,n,a]),O=v.useMemo(()=>{const N=y.startOfMonth(y.setMonth(n,a));return f?y.isSameDay(n,y.startOfWeek(N)):y.isSameDay(n,N)},[a,n,f,y]),$=v.useMemo(()=>{const N=y.endOfMonth(y.setMonth(n,a));return f?y.isSameDay(n,y.endOfWeek(N)):y.isSameDay(n,N)},[a,n,f,y]);return R.jsx(P,ue({},I,{day:n,disabled:A,autoFocus:s&&x,today:E,outsideCurrentMonth:k,isFirstVisibleCell:O,isLastVisibleCell:$,selected:C,tabIndex:x?0:-1,"aria-selected":C,"aria-current":E?"date":void 0}))}function Ppt(e){const t=cn({props:e,name:"MuiDayCalendar"}),n=Cn(),{onFocusedDayChange:r,className:o,currentMonth:i,selectedDays:a,focusedDay:s,loading:l,onSelectedDaysChange:c,onMonthSwitchingAnimationEnd:u,readOnly:d,reduceAnimations:f,renderLoading:p=()=>R.jsx("span",{children:"..."}),slideDirection:h,TransitionProps:m,disablePast:y,disableFuture:w,minDate:x,maxDate:C,shouldDisableDate:E,shouldDisableMonth:P,shouldDisableYear:T,dayOfWeekFormatter:I=me=>n.format(me,"weekdayShort").charAt(0).toUpperCase(),hasFocus:A,onFocusedViewChange:k,gridLabelId:O,displayWeekNumber:$,fixedWeekNumber:N,autoFocus:L,timezone:j}=t,D=Hg(j),_=hpt(t),z=dr(),F=Tle({shouldDisableDate:E,shouldDisableMonth:P,shouldDisableYear:T,minDate:x,maxDate:C,disablePast:y,disableFuture:w,timezone:j}),V=$o(),[U,q]=wg({name:"DayCalendar",state:"hasFocus",controlled:A,default:L??!1}),[X,ie]=v.useState(()=>s||D),ee=kt(me=>{d||c(me)}),Q=me=>{F(me)||(r(me),ie(me),k==null||k(!0),q(!0))},te=kt((me,Se)=>{switch(me.key){case"ArrowUp":Q(n.addDays(Se,-7)),me.preventDefault();break;case"ArrowDown":Q(n.addDays(Se,7)),me.preventDefault();break;case"ArrowLeft":{const xe=n.addDays(Se,z?1:-1),ke=n.addMonths(Se,z?1:-1),De=wx({utils:n,date:xe,minDate:z?xe:n.startOfMonth(ke),maxDate:z?n.endOfMonth(ke):xe,isDateDisabled:F,timezone:j});Q(De||xe),me.preventDefault();break}case"ArrowRight":{const xe=n.addDays(Se,z?-1:1),ke=n.addMonths(Se,z?-1:1),De=wx({utils:n,date:xe,minDate:z?n.startOfMonth(ke):xe,maxDate:z?xe:n.endOfMonth(ke),isDateDisabled:F,timezone:j});Q(De||xe),me.preventDefault();break}case"Home":Q(n.startOfWeek(Se)),me.preventDefault();break;case"End":Q(n.endOfWeek(Se)),me.preventDefault();break;case"PageUp":Q(n.addMonths(Se,1)),me.preventDefault();break;case"PageDown":Q(n.addMonths(Se,-1)),me.preventDefault();break}}),pe=kt((me,Se)=>Q(Se)),ae=kt((me,Se)=>{U&&n.isSameDay(X,Se)&&(k==null||k(!1))}),se=n.getMonth(i),re=n.getYear(i),fe=v.useMemo(()=>a.filter(me=>!!me).map(me=>n.startOfDay(me)),[n,a]),Z=`${re}-${se}`,ce=v.useMemo(()=>v.createRef(),[Z]),ge=v.useMemo(()=>{const me=n.startOfMonth(i),Se=n.endOfMonth(i);return F(X)||n.isAfterDay(X,Se)||n.isBeforeDay(X,me)?wx({utils:n,date:X,minDate:me,maxDate:Se,disablePast:y,disableFuture:w,isDateDisabled:F,timezone:j}):X},[i,w,y,X,F,n,j]),we=v.useMemo(()=>{const me=n.getWeekArray(i);let Se=n.addMonths(i,1);for(;N&&me.length{me.lengthR.jsx(ypt,{variant:"caption",role:"columnheader","aria-label":n.format(me,"weekday"),className:_.weekDayLabel,children:I(me)},Se.toString()))]}),l?R.jsx(wpt,{className:_.loadingContainer,children:p()}):R.jsx(xpt,ue({transKey:Z,onExited:u,reduceAnimations:f,slideDirection:h,className:de(o,_.slideTransition)},m,{nodeRef:ce,children:R.jsx(Spt,{ref:ce,role:"rowgroup",className:_.monthContainer,children:we.map((me,Se)=>R.jsxs(Cpt,{role:"row",className:_.weekContainer,"aria-rowindex":Se+1,children:[$&&R.jsx(bpt,{className:_.weekNumber,role:"rowheader","aria-label":V.calendarWeekNumberAriaLabelText(n.getWeekNumber(me[0])),children:V.calendarWeekNumberText(n.getWeekNumber(me[0]))}),me.map((xe,ke)=>R.jsx(Ept,{parentProps:t,day:xe,selectedDays:fe,focusableDay:ge,onKeyDown:te,onFocus:pe,onBlur:ae,onDaySelect:ee,isDateDisabled:F,currentMonthNumber:se,isViewFocused:U,"aria-colindex":ke+1},xe.toString()))]},`week-${me[0]}`))})}))]})}function Tpt(e){return Wn("MuiPickersMonth",e)}const lP=Xn("MuiPickersMonth",["root","monthButton","disabled","selected"]),Ipt=["autoFocus","className","children","disabled","selected","value","tabIndex","onClick","onKeyDown","onFocus","onBlur","aria-current","aria-label","monthsPerRow","slots","slotProps"],Opt=e=>{const{disabled:t,selected:n,classes:r}=e;return zn({root:["root"],monthButton:["monthButton",t&&"disabled",n&&"selected"]},Tpt,r)},Apt=oe("div",{name:"MuiPickersMonth",slot:"Root",overridesResolver:(e,t)=>[t.root]})({display:"flex",alignItems:"center",justifyContent:"center",flexBasis:"33.3%",variants:[{props:{monthsPerRow:4},style:{flexBasis:"25%"}}]}),kpt=oe("button",{name:"MuiPickersMonth",slot:"MonthButton",overridesResolver:(e,t)=>[t.monthButton,{[`&.${lP.disabled}`]:t.disabled},{[`&.${lP.selected}`]:t.selected}]})(({theme:e})=>ue({color:"unset",backgroundColor:"transparent",border:0,outline:0},e.typography.subtitle1,{margin:"8px 0",height:36,width:72,borderRadius:18,cursor:"pointer","&:focus":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:xt(e.palette.action.active,e.palette.action.hoverOpacity)},"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:xt(e.palette.action.active,e.palette.action.hoverOpacity)},"&:disabled":{cursor:"auto",pointerEvents:"none"},[`&.${lP.disabled}`]:{color:(e.vars||e).palette.text.secondary},[`&.${lP.selected}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.main,"&:focus, &:hover":{backgroundColor:(e.vars||e).palette.primary.dark}}})),Mpt=v.memo(function(t){const n=cn({props:t,name:"MuiPickersMonth"}),{autoFocus:r,className:o,children:i,disabled:a,selected:s,value:l,tabIndex:c,onClick:u,onKeyDown:d,onFocus:f,onBlur:p,"aria-current":h,"aria-label":m,slots:y,slotProps:w}=n,x=Vt(n,Ipt),C=v.useRef(null),E=Opt(n);bu(()=>{var I;r&&((I=C.current)==null||I.focus())},[r]);const P=(y==null?void 0:y.monthButton)??kpt,T=Yn({elementType:P,externalSlotProps:w==null?void 0:w.monthButton,additionalProps:{children:i,disabled:a,tabIndex:c,ref:C,type:"button",role:"radio","aria-current":h,"aria-checked":s,"aria-label":m,onClick:I=>u(I,l),onKeyDown:I=>d(I,l),onFocus:I=>f(I,l),onBlur:I=>p(I,l)},ownerState:n,className:E.monthButton});return R.jsx(Apt,ue({className:de(E.root,o),ownerState:n},x,{children:R.jsx(P,ue({},T))}))});function Rpt(e){return Wn("MuiMonthCalendar",e)}Xn("MuiMonthCalendar",["root"]);const $pt=["className","value","defaultValue","referenceDate","disabled","disableFuture","disablePast","maxDate","minDate","onChange","shouldDisableMonth","readOnly","disableHighlightToday","autoFocus","onMonthFocus","hasFocus","onFocusedViewChange","monthsPerRow","timezone","gridLabelId","slots","slotProps"],Dpt=e=>{const{classes:t}=e;return zn({root:["root"]},Rpt,t)};function _pt(e,t){const n=Cn(),r=Vg(),o=cn({props:e,name:t});return ue({disableFuture:!1,disablePast:!1},o,{minDate:Li(n,o.minDate,r.minDate),maxDate:Li(n,o.maxDate,r.maxDate)})}const Npt=oe("div",{name:"MuiMonthCalendar",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",flexWrap:"wrap",alignContent:"stretch",padding:"0 4px",width:uM,boxSizing:"border-box"}),Lpt=v.forwardRef(function(t,n){const r=_pt(t,"MuiMonthCalendar"),{className:o,value:i,defaultValue:a,referenceDate:s,disabled:l,disableFuture:c,disablePast:u,maxDate:d,minDate:f,onChange:p,shouldDisableMonth:h,readOnly:m,autoFocus:y=!1,onMonthFocus:w,hasFocus:x,onFocusedViewChange:C,monthsPerRow:E=3,timezone:P,gridLabelId:T,slots:I,slotProps:A}=r,k=Vt(r,$pt),{value:O,handleValueChange:$,timezone:N}=t0({name:"MonthCalendar",timezone:P,value:i,defaultValue:a,onChange:p,valueManager:po}),L=Hg(N),j=dr(),D=Cn(),_=v.useMemo(()=>po.getInitialReferenceValue({value:O,utils:D,props:r,timezone:N,referenceDate:s,granularity:dc.month}),[]),z=r,F=Dpt(z),V=v.useMemo(()=>D.getMonth(L),[D,L]),U=v.useMemo(()=>O!=null?D.getMonth(O):null,[O,D]),[q,X]=v.useState(()=>U||D.getMonth(_)),[ie,ee]=wg({name:"MonthCalendar",state:"hasFocus",controlled:x,default:y??!1}),Q=kt(Z=>{ee(Z),C&&C(Z)}),te=v.useCallback(Z=>{const ce=D.startOfMonth(u&&D.isAfter(L,f)?L:f),ge=D.startOfMonth(c&&D.isBefore(L,d)?L:d),we=D.startOfMonth(Z);return D.isBefore(we,ce)||D.isAfter(we,ge)?!0:h?h(we):!1},[c,u,d,f,L,h,D]),pe=kt((Z,ce)=>{if(m)return;const ge=D.setMonth(O??_,ce);$(ge)}),ae=kt(Z=>{te(D.setMonth(O??_,Z))||(X(Z),Q(!0),w&&w(Z))});v.useEffect(()=>{X(Z=>U!==null&&Z!==U?U:Z)},[U]);const se=kt((Z,ce)=>{switch(Z.key){case"ArrowUp":ae((12+ce-3)%12),Z.preventDefault();break;case"ArrowDown":ae((12+ce+3)%12),Z.preventDefault();break;case"ArrowLeft":ae((12+ce+(j?1:-1))%12),Z.preventDefault();break;case"ArrowRight":ae((12+ce+(j?-1:1))%12),Z.preventDefault();break}}),re=kt((Z,ce)=>{ae(ce)}),fe=kt((Z,ce)=>{q===ce&&Q(!1)});return R.jsx(Npt,ue({ref:n,className:de(F.root,o),ownerState:z,role:"radiogroup","aria-labelledby":T},k,{children:MV(D,O??_).map(Z=>{const ce=D.getMonth(Z),ge=D.format(Z,"monthShort"),we=D.format(Z,"month"),me=ce===U,Se=l||te(Z);return R.jsx(Mpt,{selected:me,value:ce,onClick:pe,onKeyDown:se,autoFocus:ie&&ce===q,disabled:Se,tabIndex:ce===q&&!Se?0:-1,onFocus:re,onBlur:fe,"aria-current":V===ce?"date":void 0,"aria-label":we,monthsPerRow:E,slots:I,slotProps:A,children:ge},ge)})}))});function Fpt(e){return Wn("MuiPickersYear",e)}const cP=Xn("MuiPickersYear",["root","yearButton","selected","disabled"]),jpt=["autoFocus","className","children","disabled","selected","value","tabIndex","onClick","onKeyDown","onFocus","onBlur","aria-current","yearsPerRow","slots","slotProps"],Bpt=e=>{const{disabled:t,selected:n,classes:r}=e;return zn({root:["root"],yearButton:["yearButton",t&&"disabled",n&&"selected"]},Fpt,r)},zpt=oe("div",{name:"MuiPickersYear",slot:"Root",overridesResolver:(e,t)=>[t.root]})({display:"flex",alignItems:"center",justifyContent:"center",flexBasis:"33.3%",variants:[{props:{yearsPerRow:4},style:{flexBasis:"25%"}}]}),Vpt=oe("button",{name:"MuiPickersYear",slot:"YearButton",overridesResolver:(e,t)=>[t.yearButton,{[`&.${cP.disabled}`]:t.disabled},{[`&.${cP.selected}`]:t.selected}]})(({theme:e})=>ue({color:"unset",backgroundColor:"transparent",border:0,outline:0},e.typography.subtitle1,{margin:"6px 0",height:36,width:72,borderRadius:18,cursor:"pointer","&:focus":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.focusOpacity})`:xt(e.palette.action.active,e.palette.action.focusOpacity)},"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:xt(e.palette.action.active,e.palette.action.hoverOpacity)},"&:disabled":{cursor:"auto",pointerEvents:"none"},[`&.${cP.disabled}`]:{color:(e.vars||e).palette.text.secondary},[`&.${cP.selected}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.main,"&:focus, &:hover":{backgroundColor:(e.vars||e).palette.primary.dark}}})),Hpt=v.memo(function(t){const n=cn({props:t,name:"MuiPickersYear"}),{autoFocus:r,className:o,children:i,disabled:a,selected:s,value:l,tabIndex:c,onClick:u,onKeyDown:d,onFocus:f,onBlur:p,"aria-current":h,slots:m,slotProps:y}=n,w=Vt(n,jpt),x=v.useRef(null),C=Bpt(n);bu(()=>{var T;r&&((T=x.current)==null||T.focus())},[r]);const E=(m==null?void 0:m.yearButton)??Vpt,P=Yn({elementType:E,externalSlotProps:y==null?void 0:y.yearButton,additionalProps:{children:i,disabled:a,tabIndex:c,ref:x,type:"button",role:"radio","aria-current":h,"aria-checked":s,onClick:T=>u(T,l),onKeyDown:T=>d(T,l),onFocus:T=>f(T,l),onBlur:T=>p(T,l)},ownerState:n,className:C.yearButton});return R.jsx(zpt,ue({className:de(C.root,o),ownerState:n},w,{children:R.jsx(E,ue({},P))}))});function Upt(e){return Wn("MuiYearCalendar",e)}Xn("MuiYearCalendar",["root"]);const Wpt=["autoFocus","className","value","defaultValue","referenceDate","disabled","disableFuture","disablePast","maxDate","minDate","onChange","readOnly","shouldDisableYear","disableHighlightToday","onYearFocus","hasFocus","onFocusedViewChange","yearsOrder","yearsPerRow","timezone","gridLabelId","slots","slotProps"],Gpt=e=>{const{classes:t}=e;return zn({root:["root"]},Upt,t)};function qpt(e,t){const n=Cn(),r=Vg(),o=cn({props:e,name:t});return ue({disablePast:!1,disableFuture:!1},o,{yearsPerRow:o.yearsPerRow??3,minDate:Li(n,o.minDate,r.minDate),maxDate:Li(n,o.maxDate,r.maxDate)})}const Kpt=oe("div",{name:"MuiYearCalendar",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",flexDirection:"row",flexWrap:"wrap",overflowY:"auto",height:"100%",padding:"0 4px",width:uM,maxHeight:gut,boxSizing:"border-box",position:"relative"}),Ypt=v.forwardRef(function(t,n){const r=qpt(t,"MuiYearCalendar"),{autoFocus:o,className:i,value:a,defaultValue:s,referenceDate:l,disabled:c,disableFuture:u,disablePast:d,maxDate:f,minDate:p,onChange:h,readOnly:m,shouldDisableYear:y,onYearFocus:w,hasFocus:x,onFocusedViewChange:C,yearsOrder:E="asc",yearsPerRow:P,timezone:T,gridLabelId:I,slots:A,slotProps:k}=r,O=Vt(r,Wpt),{value:$,handleValueChange:N,timezone:L}=t0({name:"YearCalendar",timezone:T,value:a,defaultValue:s,onChange:h,valueManager:po}),j=Hg(L),D=dr(),_=Cn(),z=v.useMemo(()=>po.getInitialReferenceValue({value:$,utils:_,props:r,timezone:L,referenceDate:l,granularity:dc.year}),[]),F=r,V=Gpt(F),U=v.useMemo(()=>_.getYear(j),[_,j]),q=v.useMemo(()=>$!=null?_.getYear($):null,[$,_]),[X,ie]=v.useState(()=>q||_.getYear(z)),[ee,Q]=wg({name:"YearCalendar",state:"hasFocus",controlled:x,default:o??!1}),te=kt(xe=>{Q(xe),C&&C(xe)}),pe=v.useCallback(xe=>{if(d&&_.isBeforeYear(xe,j)||u&&_.isAfterYear(xe,j)||p&&_.isBeforeYear(xe,p)||f&&_.isAfterYear(xe,f))return!0;if(!y)return!1;const ke=_.startOfYear(xe);return y(ke)},[u,d,f,p,j,y,_]),ae=kt((xe,ke)=>{if(m)return;const De=_.setYear($??z,ke);N(De)}),se=kt(xe=>{pe(_.setYear($??z,xe))||(ie(xe),te(!0),w==null||w(xe))});v.useEffect(()=>{ie(xe=>q!==null&&xe!==q?q:xe)},[q]);const re=E!=="desc"?P*1:P*-1,fe=D&&E==="asc"||!D&&E==="desc"?-1:1,Z=kt((xe,ke)=>{switch(xe.key){case"ArrowUp":se(ke-re),xe.preventDefault();break;case"ArrowDown":se(ke+re),xe.preventDefault();break;case"ArrowLeft":se(ke-fe),xe.preventDefault();break;case"ArrowRight":se(ke+fe),xe.preventDefault();break}}),ce=kt((xe,ke)=>{se(ke)}),ge=kt((xe,ke)=>{X===ke&&te(!1)}),we=v.useRef(null),me=ca(n,we);v.useEffect(()=>{if(o||we.current===null)return;const xe=we.current.querySelector('[tabindex="0"]');if(!xe)return;const ke=xe.offsetHeight,De=xe.offsetTop,_e=we.current.clientHeight,ye=we.current.scrollTop,Pe=De+ke;ke>_e||De{const ke=_.getYear(xe),De=ke===q,_e=c||pe(xe);return R.jsx(Hpt,{selected:De,value:ke,onClick:ae,onKeyDown:Z,autoFocus:ee&&ke===X,disabled:_e,tabIndex:ke===X&&!_e?0:-1,onFocus:ce,onBlur:ge,"aria-current":U===ke?"date":void 0,yearsPerRow:P,slots:A,slotProps:k,children:_.format(xe,"year")},_.format(xe,"year"))})}))}),Qpt=e=>Wn("MuiPickersCalendarHeader",e),Xpt=Xn("MuiPickersCalendarHeader",["root","labelContainer","label","switchViewButton","switchViewIcon"]),Jpt=["slots","slotProps","currentMonth","disabled","disableFuture","disablePast","maxDate","minDate","onMonthChange","onViewChange","view","reduceAnimations","views","labelId","className","timezone","format"],Zpt=["ownerState"],eht=e=>{const{classes:t}=e;return zn({root:["root"],labelContainer:["labelContainer"],label:["label"],switchViewButton:["switchViewButton"],switchViewIcon:["switchViewIcon"]},Qpt,t)},tht=oe("div",{name:"MuiPickersCalendarHeader",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",alignItems:"center",marginTop:12,marginBottom:4,paddingLeft:24,paddingRight:12,maxHeight:40,minHeight:40}),nht=oe("div",{name:"MuiPickersCalendarHeader",slot:"LabelContainer",overridesResolver:(e,t)=>t.labelContainer})(({theme:e})=>ue({display:"flex",overflow:"hidden",alignItems:"center",cursor:"pointer",marginRight:"auto"},e.typography.body1,{fontWeight:e.typography.fontWeightMedium})),rht=oe("div",{name:"MuiPickersCalendarHeader",slot:"Label",overridesResolver:(e,t)=>t.label})({marginRight:6}),oht=oe(vn,{name:"MuiPickersCalendarHeader",slot:"SwitchViewButton",overridesResolver:(e,t)=>t.switchViewButton})({marginRight:"auto",variants:[{props:{view:"year"},style:{[`.${Xpt.switchViewIcon}`]:{transform:"rotate(180deg)"}}}]}),iht=oe(Xct,{name:"MuiPickersCalendarHeader",slot:"SwitchViewIcon",overridesResolver:(e,t)=>t.switchViewIcon})(({theme:e})=>({willChange:"transform",transition:e.transitions.create("transform"),transform:"rotate(0deg)"})),aht=v.forwardRef(function(t,n){const r=$o(),o=Cn(),i=cn({props:t,name:"MuiPickersCalendarHeader"}),{slots:a,slotProps:s,currentMonth:l,disabled:c,disableFuture:u,disablePast:d,maxDate:f,minDate:p,onMonthChange:h,onViewChange:m,view:y,reduceAnimations:w,views:x,labelId:C,className:E,timezone:P,format:T=`${o.formats.month} ${o.formats.year}`}=i,I=Vt(i,Jpt),A=i,k=eht(i),O=(a==null?void 0:a.switchViewButton)??oht,$=Yn({elementType:O,externalSlotProps:s==null?void 0:s.switchViewButton,additionalProps:{size:"small","aria-label":r.calendarViewSwitchingButtonAriaLabel(y)},ownerState:A,className:k.switchViewButton}),N=(a==null?void 0:a.switchViewIcon)??iht,L=Yn({elementType:N,externalSlotProps:s==null?void 0:s.switchViewIcon,ownerState:A,className:k.switchViewIcon}),j=Vt(L,Zpt),D=()=>h(o.addMonths(l,1),"left"),_=()=>h(o.addMonths(l,-1),"right"),z=put(l,{disableFuture:u,maxDate:f,timezone:P}),F=hut(l,{disablePast:d,minDate:p,timezone:P}),V=()=>{if(!(x.length===1||!m||c))if(x.length===2)m(x.find(q=>q!==y)||x[0]);else{const q=x.indexOf(y)!==0?0:1;m(x[q])}};if(x.length===1&&x[0]==="year")return null;const U=o.formatByString(l,T);return R.jsxs(tht,ue({},I,{ownerState:A,className:de(k.root,E),ref:n,children:[R.jsxs(nht,{role:"presentation",onClick:V,ownerState:A,"aria-live":"polite",className:k.labelContainer,children:[R.jsx(Ile,{reduceAnimations:w,transKey:U,children:R.jsx(rht,{id:C,ownerState:A,className:k.label,children:U})}),x.length>1&&!c&&R.jsx(O,ue({},$,{children:R.jsx(N,ue({},j))}))]}),R.jsx(Tb,{in:y==="day",children:R.jsx(Jse,{slots:a,slotProps:s,onGoToPrevious:_,isPreviousDisabled:F,previousLabel:r.previousMonth,onGoToNext:D,isNextDisabled:z,nextLabel:r.nextMonth})})]}))}),sht="@media (prefers-reduced-motion: reduce)",Gy=typeof navigator<"u"&&navigator.userAgent.match(/android\s(\d+)|OS\s(\d+)/i),K7=Gy&&Gy[1]?parseInt(Gy[1],10):null,Y7=Gy&&Gy[2]?parseInt(Gy[2],10):null,lht=K7&&K7<10||Y7&&Y7<13||!1,Ale=()=>CC(sht,{defaultMatches:!1})||lht,cht=e=>Wn("MuiDateCalendar",e);Xn("MuiDateCalendar",["root","viewTransitionContainer"]);const uht=["autoFocus","onViewChange","value","defaultValue","referenceDate","disableFuture","disablePast","onChange","onYearChange","onMonthChange","reduceAnimations","shouldDisableDate","shouldDisableMonth","shouldDisableYear","view","views","openTo","className","disabled","readOnly","minDate","maxDate","disableHighlightToday","focusedView","onFocusedViewChange","showDaysOutsideCurrentMonth","fixedWeekNumber","dayOfWeekFormatter","slots","slotProps","loading","renderLoading","displayWeekNumber","yearsOrder","yearsPerRow","monthsPerRow","timezone"],dht=e=>{const{classes:t}=e;return zn({root:["root"],viewTransitionContainer:["viewTransitionContainer"]},cht,t)};function fht(e,t){const n=Cn(),r=Vg(),o=Ale(),i=cn({props:e,name:t});return ue({},i,{loading:i.loading??!1,disablePast:i.disablePast??!1,disableFuture:i.disableFuture??!1,openTo:i.openTo??"day",views:i.views??["year","day"],reduceAnimations:i.reduceAnimations??o,renderLoading:i.renderLoading??(()=>R.jsx("span",{children:"..."})),minDate:Li(n,i.minDate,r.minDate),maxDate:Li(n,i.maxDate,r.maxDate)})}const pht=oe(fM,{name:"MuiDateCalendar",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",flexDirection:"column",height:dM}),hht=oe(Ile,{name:"MuiDateCalendar",slot:"ViewTransitionContainer",overridesResolver:(e,t)=>t.viewTransitionContainer})({}),ght=v.forwardRef(function(t,n){const r=Cn(),o=Zb(),i=fht(t,"MuiDateCalendar"),{autoFocus:a,onViewChange:s,value:l,defaultValue:c,referenceDate:u,disableFuture:d,disablePast:f,onChange:p,onYearChange:h,onMonthChange:m,reduceAnimations:y,shouldDisableDate:w,shouldDisableMonth:x,shouldDisableYear:C,view:E,views:P,openTo:T,className:I,disabled:A,readOnly:k,minDate:O,maxDate:$,disableHighlightToday:N,focusedView:L,onFocusedViewChange:j,showDaysOutsideCurrentMonth:D,fixedWeekNumber:_,dayOfWeekFormatter:z,slots:F,slotProps:V,loading:U,renderLoading:q,displayWeekNumber:X,yearsOrder:ie,yearsPerRow:ee,monthsPerRow:Q,timezone:te}=i,pe=Vt(i,uht),{value:ae,handleValueChange:se,timezone:re}=t0({name:"DateCalendar",timezone:te,value:l,defaultValue:c,onChange:p,valueManager:po}),{view:fe,setView:Z,focusedView:ce,setFocusedView:ge,goToNextView:we,setValueAndGoToNextView:me}=n1({view:E,views:P,openTo:T,onChange:se,onViewChange:s,autoFocus:a,focusedView:L,onFocusedViewChange:j}),{referenceDate:Se,calendarState:xe,changeFocusedDay:ke,changeMonth:De,handleChangeMonth:_e,isDateDisabled:ye,onMonthSwitchingAnimationEnd:Pe}=npt({value:ae,referenceDate:u,reduceAnimations:y,onMonthChange:m,minDate:O,maxDate:$,shouldDisableDate:w,disablePast:f,disableFuture:d,timezone:re}),Ae=A&&ae||O,Me=A&&ae||$,We=`${o}-grid-label`,He=ce!==null,Xe=(F==null?void 0:F.calendarHeader)??aht,ht=Yn({elementType:Xe,externalSlotProps:V==null?void 0:V.calendarHeader,additionalProps:{views:P,view:fe,currentMonth:xe.currentMonth,onViewChange:Z,onMonthChange:($t,bn)=>_e({newMonth:$t,direction:bn}),minDate:Ae,maxDate:Me,disabled:A,disablePast:f,disableFuture:d,reduceAnimations:y,timezone:re,labelId:We},ownerState:i}),ot=kt($t=>{const bn=r.startOfMonth($t),Gn=r.endOfMonth($t),Jn=ye($t)?wx({utils:r,date:$t,minDate:r.isBefore(O,bn)?bn:O,maxDate:r.isAfter($,Gn)?Gn:$,disablePast:f,disableFuture:d,isDateDisabled:ye,timezone:re}):$t;Jn?(me(Jn,"finish"),m==null||m(bn)):(we(),De(bn)),ke(Jn,!0)}),et=kt($t=>{const bn=r.startOfYear($t),Gn=r.endOfYear($t),Jn=ye($t)?wx({utils:r,date:$t,minDate:r.isBefore(O,bn)?bn:O,maxDate:r.isAfter($,Gn)?Gn:$,disablePast:f,disableFuture:d,isDateDisabled:ye,timezone:re}):$t;Jn?(me(Jn,"finish"),h==null||h(Jn)):(we(),De(bn)),ke(Jn,!0)}),St=kt($t=>se($t&&fO(r,$t,ae??Se),"finish",fe));v.useEffect(()=>{ae!=null&&r.isValid(ae)&&De(ae)},[ae]);const On=i,Ke=dht(On),$e={disablePast:f,disableFuture:d,maxDate:$,minDate:O},Qe={disableHighlightToday:N,readOnly:k,disabled:A,timezone:re,gridLabelId:We,slots:F,slotProps:V},Et=v.useRef(fe);v.useEffect(()=>{Et.current!==fe&&(ce===Et.current&&ge(fe,!0),Et.current=fe)},[ce,ge,fe]);const Xt=v.useMemo(()=>[ae],[ae]);return R.jsxs(pht,ue({ref:n,className:de(Ke.root,I),ownerState:On},pe,{children:[R.jsx(Xe,ue({},ht,{slots:F,slotProps:V})),R.jsx(hht,{reduceAnimations:y,className:Ke.viewTransitionContainer,transKey:fe,ownerState:On,children:R.jsxs("div",{children:[fe==="year"&&R.jsx(Ypt,ue({},$e,Qe,{value:ae,onChange:et,shouldDisableYear:C,hasFocus:He,onFocusedViewChange:$t=>ge("year",$t),yearsOrder:ie,yearsPerRow:ee,referenceDate:Se})),fe==="month"&&R.jsx(Lpt,ue({},$e,Qe,{hasFocus:He,className:I,value:ae,onChange:ot,shouldDisableMonth:x,onFocusedViewChange:$t=>ge("month",$t),monthsPerRow:Q,referenceDate:Se})),fe==="day"&&R.jsx(Ppt,ue({},xe,$e,Qe,{onMonthSwitchingAnimationEnd:Pe,onFocusedDayChange:ke,reduceAnimations:y,selectedDays:Xt,onSelectedDaysChange:St,shouldDisableDate:w,shouldDisableMonth:x,shouldDisableYear:C,hasFocus:He,onFocusedViewChange:$t=>ge("day",$t),showDaysOutsideCurrentMonth:D,fixedWeekNumber:_,dayOfWeekFormatter:z,displayWeekNumber:X,loading:U,renderLoading:q}))]})})]}))});function kle(e){return Wn("MuiPickersToolbar",e)}const mht=Xn("MuiPickersToolbar",["root","content"]),yht=["children","className","toolbarTitle","hidden","titleId","isLandscape","classes","landscapeDirection"],vht=e=>{const{classes:t,isLandscape:n}=e;return zn({root:["root"],content:["content"],penIconButton:["penIconButton",n&&"penIconButtonLandscape"]},kle,t)},bht=oe("div",{name:"MuiPickersToolbar",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({display:"flex",flexDirection:"column",alignItems:"flex-start",justifyContent:"space-between",padding:e.spacing(2,3),variants:[{props:{isLandscape:!0},style:{height:"auto",maxWidth:160,padding:16,justifyContent:"flex-start",flexWrap:"wrap"}}]})),wht=oe("div",{name:"MuiPickersToolbar",slot:"Content",overridesResolver:(e,t)=>t.content})({display:"flex",flexWrap:"wrap",width:"100%",flex:1,justifyContent:"space-between",alignItems:"center",flexDirection:"row",variants:[{props:{isLandscape:!0},style:{justifyContent:"flex-start",alignItems:"flex-start",flexDirection:"column"}},{props:{isLandscape:!0,landscapeDirection:"row"},style:{flexDirection:"row"}}]}),GV=v.forwardRef(function(t,n){const r=cn({props:t,name:"MuiPickersToolbar"}),{children:o,className:i,toolbarTitle:a,hidden:s,titleId:l}=r,c=Vt(r,yht),u=r,d=vht(u);return s?null:R.jsxs(bht,ue({ref:n,className:de(d.root,i),ownerState:u},c,{children:[R.jsx(st,{color:"text.secondary",variant:"overline",id:l,children:a}),R.jsx(wht,{className:d.content,ownerState:u,children:o})]}))});function xht(e){return Wn("MuiDatePickerToolbar",e)}Xn("MuiDatePickerToolbar",["root","title"]);const Sht=["value","isLandscape","onChange","toolbarFormat","toolbarPlaceholder","views","className","onViewChange","view"],Cht=e=>{const{classes:t}=e;return zn({root:["root"],title:["title"]},xht,t)},Eht=oe(GV,{name:"MuiDatePickerToolbar",slot:"Root",overridesResolver:(e,t)=>t.root})({}),Pht=oe(st,{name:"MuiDatePickerToolbar",slot:"Title",overridesResolver:(e,t)=>t.title})({variants:[{props:{isLandscape:!0},style:{margin:"auto 16px auto auto"}}]}),Tht=v.forwardRef(function(t,n){const r=cn({props:t,name:"MuiDatePickerToolbar"}),{value:o,isLandscape:i,toolbarFormat:a,toolbarPlaceholder:s="––",views:l,className:c}=r,u=Vt(r,Sht),d=Cn(),f=$o(),p=Cht(r),h=v.useMemo(()=>{if(!o)return s;const y=VS(d,{format:a,views:l},!0);return d.formatByString(o,y)},[o,a,s,d,l]),m=r;return R.jsx(Eht,ue({ref:n,toolbarTitle:f.datePickerToolbarTitle,isLandscape:i,className:de(p.root,c)},u,{children:R.jsx(Pht,{variant:"h4",align:i?"left":"center",ownerState:m,className:p.title,children:h})}))});function Mle(e,t){const n=Cn(),r=Vg(),o=cn({props:e,name:t}),i=v.useMemo(()=>{var a;return((a=o.localeText)==null?void 0:a.toolbarTitle)==null?o.localeText:ue({},o.localeText,{datePickerToolbarTitle:o.localeText.toolbarTitle})},[o.localeText]);return ue({},o,{localeText:i},kV({views:o.views,openTo:o.openTo,defaultViews:["year","day"],defaultOpenTo:"day"}),{disableFuture:o.disableFuture??!1,disablePast:o.disablePast??!1,minDate:Li(n,o.minDate,r.minDate),maxDate:Li(n,o.maxDate,r.maxDate),slots:ue({toolbar:Tht},o.slots)})}function Iht(e){return Wn("MuiPickersPopper",e)}Xn("MuiPickersPopper",["root","paper"]);const Oht=["PaperComponent","popperPlacement","ownerState","children","paperSlotProps","paperClasses","onPaperClick","onPaperTouchStart"],Aht=e=>{const{classes:t}=e;return zn({root:["root"],paper:["paper"]},Iht,t)},kht=oe(Sp,{name:"MuiPickersPopper",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({zIndex:e.zIndex.modal})),Mht=oe(to,{name:"MuiPickersPopper",slot:"Paper",overridesResolver:(e,t)=>t.paper})({outline:0,transformOrigin:"top center",variants:[{props:({placement:e})=>["top","top-start","top-end"].includes(e),style:{transformOrigin:"bottom center"}}]});function Rht(e,t){return t.documentElement.clientWidth{if(!e)return;function l(){i.current=!0}return document.addEventListener("mousedown",l,!0),document.addEventListener("touchstart",l,!0),()=>{document.removeEventListener("mousedown",l,!0),document.removeEventListener("touchstart",l,!0),i.current=!1}},[e]);const a=kt(l=>{if(!i.current)return;const c=r.current;r.current=!1;const u=VD(o.current);if(!o.current||"clientX"in l&&Rht(l,u))return;if(n.current){n.current=!1;return}let d;l.composedPath?d=l.composedPath().indexOf(o.current)>-1:d=!u.documentElement.contains(l.target)||o.current.contains(l.target),!d&&!c&&t(l)}),s=()=>{r.current=!0};return v.useEffect(()=>{if(e){const l=VD(o.current),c=()=>{n.current=!0};return l.addEventListener("touchstart",a),l.addEventListener("touchmove",c),()=>{l.removeEventListener("touchstart",a),l.removeEventListener("touchmove",c)}}},[e,a]),v.useEffect(()=>{if(e){const l=VD(o.current);return l.addEventListener("click",a),()=>{l.removeEventListener("click",a),r.current=!1}}},[e,a]),[o,s,s]}const Dht=v.forwardRef((e,t)=>{const{PaperComponent:n,popperPlacement:r,ownerState:o,children:i,paperSlotProps:a,paperClasses:s,onPaperClick:l,onPaperTouchStart:c}=e,u=Vt(e,Oht),d=ue({},o,{placement:r}),f=Yn({elementType:n,externalSlotProps:a,additionalProps:{tabIndex:-1,elevation:8,ref:t},className:s,ownerState:d});return R.jsx(n,ue({},u,f,{onClick:p=>{var h;l(p),(h=f.onClick)==null||h.call(f,p)},onTouchStart:p=>{var h;c(p),(h=f.onTouchStart)==null||h.call(f,p)},ownerState:d,children:i}))});function _ht(e){const t=cn({props:e,name:"MuiPickersPopper"}),{anchorEl:n,children:r,containerRef:o=null,shouldRestoreFocus:i,onBlur:a,onDismiss:s,open:l,role:c,placement:u,slots:d,slotProps:f,reduceAnimations:p}=t;v.useEffect(()=>{function D(_){l&&_.key==="Escape"&&s()}return document.addEventListener("keydown",D),()=>{document.removeEventListener("keydown",D)}},[s,l]);const h=v.useRef(null);v.useEffect(()=>{c==="tooltip"||i&&!i()||(l?h.current=xa(document):h.current&&h.current instanceof HTMLElement&&setTimeout(()=>{h.current instanceof HTMLElement&&h.current.focus()}))},[l,c,i]);const[m,y,w]=$ht(l,a??s),x=v.useRef(null),C=ca(x,o),E=ca(C,m),P=t,T=Aht(P),I=Ale(),A=p??I,k=D=>{D.key==="Escape"&&(D.stopPropagation(),s())},O=(d==null?void 0:d.desktopTransition)??A?Tb:ap,$=(d==null?void 0:d.desktopTrapFocus)??QB,N=(d==null?void 0:d.desktopPaper)??Mht,L=(d==null?void 0:d.popper)??kht,j=Yn({elementType:L,externalSlotProps:f==null?void 0:f.popper,additionalProps:{transition:!0,role:c,open:l,anchorEl:n,placement:u,onKeyDown:k},className:T.root,ownerState:t});return R.jsx(L,ue({},j,{children:({TransitionProps:D,placement:_})=>R.jsx($,ue({open:l,disableAutoFocus:!0,disableRestoreFocus:!0,disableEnforceFocus:c==="tooltip",isEnabled:()=>!0},f==null?void 0:f.desktopTrapFocus,{children:R.jsx(O,ue({},D,f==null?void 0:f.desktopTransition,{children:R.jsx(Dht,{PaperComponent:N,ownerState:P,popperPlacement:_,ref:E,onPaperClick:y,onPaperTouchStart:w,paperClasses:T.paper,paperSlotProps:f==null?void 0:f.desktopPaper,children:r})}))}))}))}const Nht=({open:e,onOpen:t,onClose:n})=>{const r=v.useRef(typeof e=="boolean").current,[o,i]=v.useState(!1);v.useEffect(()=>{if(r){if(typeof e!="boolean")throw new Error("You must not mix controlling and uncontrolled mode for `open` prop");i(e)}},[r,e]);const a=v.useCallback(s=>{r||i(s),s&&t&&t(),!s&&n&&n()},[r,t,n]);return{isOpen:o,setIsOpen:a}},Lht=e=>{const{action:t,hasChanged:n,dateState:r,isControlled:o}=e,i=!o&&!r.hasBeenModifiedSinceMount;return t.name==="setValueFromField"?!0:t.name==="setValueFromAction"?i&&["accept","today","clear"].includes(t.pickerAction)?!0:n(r.lastPublishedValue):t.name==="setValueFromView"&&t.selectionState!=="shallow"||t.name==="setValueFromShortcut"?i?!0:n(r.lastPublishedValue):!1},Fht=e=>{const{action:t,hasChanged:n,dateState:r,isControlled:o,closeOnSelect:i}=e,a=!o&&!r.hasBeenModifiedSinceMount;return t.name==="setValueFromAction"?a&&["accept","today","clear"].includes(t.pickerAction)?!0:n(r.lastCommittedValue):t.name==="setValueFromView"&&t.selectionState==="finish"&&i?a?!0:n(r.lastCommittedValue):t.name==="setValueFromShortcut"?t.changeImportance==="accept"&&n(r.lastCommittedValue):!1},jht=e=>{const{action:t,closeOnSelect:n}=e;return t.name==="setValueFromAction"?!0:t.name==="setValueFromView"?t.selectionState==="finish"&&n:t.name==="setValueFromShortcut"?t.changeImportance==="accept":!1},Bht=({props:e,valueManager:t,valueType:n,wrapperVariant:r,validator:o})=>{const{onAccept:i,onChange:a,value:s,defaultValue:l,closeOnSelect:c=r==="desktop",timezone:u}=e,{current:d}=v.useRef(l),{current:f}=v.useRef(s!==void 0),p=Cn(),h=zg(),{isOpen:m,setIsOpen:y}=Nht(e),{timezone:w,value:x,handleValueChange:C}=$V({timezone:u,value:s,defaultValue:d,onChange:a,valueManager:t}),[E,P]=v.useState(()=>{let Q;return x!==void 0?Q=x:d!==void 0?Q=d:Q=t.emptyValue,{draft:Q,lastPublishedValue:Q,lastCommittedValue:Q,lastControlledValue:x,hasBeenModifiedSinceMount:!1}}),{getValidationErrorForNewValue:T}=hle({props:e,validator:o,timezone:w,value:E.draft,onError:e.onError}),I=kt(Q=>{const te={action:Q,dateState:E,hasChanged:Z=>!t.areValuesEqual(p,Q.value,Z),isControlled:f,closeOnSelect:c},pe=Lht(te),ae=Fht(te),se=jht(te);P(Z=>ue({},Z,{draft:Q.value,lastPublishedValue:pe?Q.value:Z.lastPublishedValue,lastCommittedValue:ae?Q.value:Z.lastCommittedValue,hasBeenModifiedSinceMount:!0}));let re=null;const fe=()=>(re||(re={validationError:Q.name==="setValueFromField"?Q.context.validationError:T(Q.value)},Q.name==="setValueFromShortcut"&&(re.shortcut=Q.shortcut)),re);pe&&C(Q.value,fe()),ae&&i&&i(Q.value,fe()),se&&y(!1)});if(x!==void 0&&(E.lastControlledValue===void 0||!t.areValuesEqual(p,E.lastControlledValue,x))){const Q=t.areValuesEqual(p,E.draft,x);P(te=>ue({},te,{lastControlledValue:x},Q?{}:{lastCommittedValue:x,lastPublishedValue:x,draft:x,hasBeenModifiedSinceMount:!0}))}const A=kt(()=>{I({value:t.emptyValue,name:"setValueFromAction",pickerAction:"clear"})}),k=kt(()=>{I({value:E.lastPublishedValue,name:"setValueFromAction",pickerAction:"accept"})}),O=kt(()=>{I({value:E.lastPublishedValue,name:"setValueFromAction",pickerAction:"dismiss"})}),$=kt(()=>{I({value:E.lastCommittedValue,name:"setValueFromAction",pickerAction:"cancel"})}),N=kt(()=>{I({value:t.getTodayValue(p,w,n),name:"setValueFromAction",pickerAction:"today"})}),L=kt(Q=>{Q.preventDefault(),y(!0)}),j=kt(Q=>{Q==null||Q.preventDefault(),y(!1)}),D=kt((Q,te="partial")=>I({name:"setValueFromView",value:Q,selectionState:te})),_=kt((Q,te,pe)=>I({name:"setValueFromShortcut",value:Q,changeImportance:te,shortcut:pe})),z=kt((Q,te)=>I({name:"setValueFromField",value:Q,context:te})),F={onClear:A,onAccept:k,onDismiss:O,onCancel:$,onSetToday:N,onOpen:L,onClose:j},V={value:E.draft,onChange:z},U=v.useMemo(()=>t.cleanValue(p,E.draft),[p,t,E.draft]),q={value:U,onChange:D,onClose:j,open:m},ie=ue({},F,{value:U,onChange:D,onSelectShortcut:_,isValid:Q=>{const te=o({adapter:h,value:Q,timezone:w,props:e});return!t.hasError(te)}}),ee=v.useMemo(()=>({onOpen:L,onClose:j,open:m}),[m,j,L]);return{open:m,fieldProps:V,viewProps:q,layoutProps:ie,actions:F,contextValue:ee}},zht=["className","sx"],Vht=({props:e,propsFromPickerValue:t,additionalViewProps:n,autoFocusView:r,rendererInterceptor:o,fieldRef:i})=>{const{onChange:a,open:s,onClose:l}=t,{view:c,views:u,openTo:d,onViewChange:f,viewRenderers:p,timezone:h}=e,m=Vt(e,zht),{view:y,setView:w,defaultView:x,focusedView:C,setFocusedView:E,setValueAndGoToNextView:P}=n1({view:c,views:u,openTo:d,onChange:a,onViewChange:f,autoFocus:r}),{hasUIView:T,viewModeLookup:I}=v.useMemo(()=>u.reduce((j,D)=>{let _;return p[D]!=null?_="UI":_="field",j.viewModeLookup[D]=_,_==="UI"&&(j.hasUIView=!0),j},{hasUIView:!1,viewModeLookup:{}}),[p,u]),A=v.useMemo(()=>u.reduce((j,D)=>p[D]!=null&&ob(D)?j+1:j,0),[p,u]),k=I[y],O=kt(()=>k==="UI"),[$,N]=v.useState(k==="UI"?y:null);return $!==y&&I[y]==="UI"&&N(y),bu(()=>{k==="field"&&s&&(l(),setTimeout(()=>{var j,D;(j=i==null?void 0:i.current)==null||j.setSelectedSections(y),(D=i==null?void 0:i.current)==null||D.focusField(y)}))},[y]),bu(()=>{if(!s)return;let j=y;k==="field"&&$!=null&&(j=$),j!==x&&I[j]==="UI"&&I[x]==="UI"&&(j=x),j!==y&&w(j),E(j,!0)},[s]),{hasUIView:T,shouldRestoreFocus:O,layoutProps:{views:u,view:$,onViewChange:w},renderCurrentView:()=>{if($==null)return null;const j=p[$];if(j==null)return null;const D=ue({},m,n,t,{views:u,timezone:h,onChange:P,view:$,onViewChange:w,focusedView:C,onFocusedViewChange:E,showViewSwitcher:A>1,timeViewsCount:A});return o?o(p,$,D):j(D)}}};function Q7(){return typeof window>"u"?"portrait":window.screen&&window.screen.orientation&&window.screen.orientation.angle?Math.abs(window.screen.orientation.angle)===90?"landscape":"portrait":window.orientation&&Math.abs(Number(window.orientation))===90?"landscape":"portrait"}const Hht=(e,t)=>{const[n,r]=v.useState(Q7);return bu(()=>{const i=()=>{r(Q7())};return window.addEventListener("orientationchange",i),()=>{window.removeEventListener("orientationchange",i)}},[]),Xm(e,["hours","minutes","seconds"])?!1:(t||n)==="landscape"},Uht=({props:e,propsFromPickerValue:t,propsFromPickerViews:n,wrapperVariant:r})=>{const{orientation:o}=e,i=Hht(n.views,o),a=dr();return{layoutProps:ue({},n,t,{isLandscape:i,isRtl:a,wrapperVariant:r,disabled:e.disabled,readOnly:e.readOnly})}};function Wht(e){const{props:t,pickerValueResponse:n}=e;return v.useMemo(()=>({value:n.viewProps.value,open:n.open,disabled:t.disabled??!1,readOnly:t.readOnly??!1}),[n.viewProps.value,n.open,t.disabled,t.readOnly])}const Rle=({props:e,valueManager:t,valueType:n,wrapperVariant:r,additionalViewProps:o,validator:i,autoFocusView:a,rendererInterceptor:s,fieldRef:l})=>{const c=Bht({props:e,valueManager:t,valueType:n,wrapperVariant:r,validator:i}),u=Vht({props:e,additionalViewProps:o,autoFocusView:a,fieldRef:l,propsFromPickerValue:c.viewProps,rendererInterceptor:s}),d=Uht({props:e,wrapperVariant:r,propsFromPickerValue:c.layoutProps,propsFromPickerViews:u.layoutProps}),f=Wht({props:e,pickerValueResponse:c});return{open:c.open,actions:c.actions,fieldProps:c.fieldProps,renderCurrentView:u.renderCurrentView,hasUIView:u.hasUIView,shouldRestoreFocus:u.shouldRestoreFocus,layoutProps:d.layoutProps,contextValue:c.contextValue,ownerState:f}};function $le(e){return Wn("MuiPickersLayout",e)}const lc=Xn("MuiPickersLayout",["root","landscape","contentWrapper","toolbar","actionBar","tabs","shortcuts"]),Ght=["onAccept","onClear","onCancel","onSetToday","actions"];function qht(e){const{onAccept:t,onClear:n,onCancel:r,onSetToday:o,actions:i}=e,a=Vt(e,Ght),s=$o();if(i==null||i.length===0)return null;const l=i==null?void 0:i.map(c=>{switch(c){case"clear":return R.jsx(dt,{onClick:n,children:s.clearButtonLabel},c);case"cancel":return R.jsx(dt,{onClick:r,children:s.cancelButtonLabel},c);case"accept":return R.jsx(dt,{onClick:t,children:s.okButtonLabel},c);case"today":return R.jsx(dt,{onClick:o,children:s.todayButtonLabel},c);default:return null}});return R.jsx(ak,ue({},a,{children:l}))}const Kht=["items","changeImportance","isLandscape","onChange","isValid"],Yht=["getValue"];function Qht(e){const{items:t,changeImportance:n="accept",onChange:r,isValid:o}=e,i=Vt(e,Kht);if(t==null||t.length===0)return null;const a=t.map(s=>{let{getValue:l}=s,c=Vt(s,Yht);const u=l({isValid:o});return ue({},c,{label:c.label,onClick:()=>{r(u,n,c)},disabled:!o(u)})});return R.jsx(Ll,ue({dense:!0,sx:[{maxHeight:dM,maxWidth:200,overflow:"auto"},...Array.isArray(i.sx)?i.sx:[i.sx]]},i,{children:a.map(s=>R.jsx(Ps,{children:R.jsx(mu,ue({},s))},s.id??s.label))}))}function Xht(e){return e.view!==null}const Jht=e=>{const{classes:t,isLandscape:n}=e;return zn({root:["root",n&&"landscape"],contentWrapper:["contentWrapper"],toolbar:["toolbar"],actionBar:["actionBar"],tabs:["tabs"],landscape:["landscape"],shortcuts:["shortcuts"]},$le,t)},Dle=e=>{const{wrapperVariant:t,onAccept:n,onClear:r,onCancel:o,onSetToday:i,view:a,views:s,onViewChange:l,value:c,onChange:u,onSelectShortcut:d,isValid:f,isLandscape:p,disabled:h,readOnly:m,children:y,slots:w,slotProps:x}=e,C=Jht(e),E=(w==null?void 0:w.actionBar)??qht,P=Yn({elementType:E,externalSlotProps:x==null?void 0:x.actionBar,additionalProps:{onAccept:n,onClear:r,onCancel:o,onSetToday:i,actions:t==="desktop"?[]:["cancel","accept"]},className:C.actionBar,ownerState:ue({},e,{wrapperVariant:t})}),T=R.jsx(E,ue({},P)),I=w==null?void 0:w.toolbar,A=Yn({elementType:I,externalSlotProps:x==null?void 0:x.toolbar,additionalProps:{isLandscape:p,onChange:u,value:c,view:a,onViewChange:l,views:s,disabled:h,readOnly:m},className:C.toolbar,ownerState:ue({},e,{wrapperVariant:t})}),k=Xht(A)&&I?R.jsx(I,ue({},A)):null,O=y,$=w==null?void 0:w.tabs,N=a&&$?R.jsx($,ue({view:a,onViewChange:l,className:C.tabs},x==null?void 0:x.tabs)):null,L=(w==null?void 0:w.shortcuts)??Qht,j=Yn({elementType:L,externalSlotProps:x==null?void 0:x.shortcuts,additionalProps:{isValid:f,isLandscape:p,onChange:d},className:C.shortcuts,ownerState:{isValid:f,isLandscape:p,onChange:d,wrapperVariant:t}}),D=a&&L?R.jsx(L,ue({},j)):null;return{toolbar:k,content:O,tabs:N,actionBar:T,shortcuts:D}},Zht=e=>{const{isLandscape:t,classes:n}=e;return zn({root:["root",t&&"landscape"],contentWrapper:["contentWrapper"]},$le,n)},_le=oe("div",{name:"MuiPickersLayout",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"grid",gridAutoColumns:"max-content auto max-content",gridAutoRows:"max-content auto max-content",[`& .${lc.actionBar}`]:{gridColumn:"1 / 4",gridRow:3},variants:[{props:{isLandscape:!0},style:{[`& .${lc.toolbar}`]:{gridColumn:1,gridRow:"2 / 3"},[`.${lc.shortcuts}`]:{gridColumn:"2 / 4",gridRow:1}}},{props:{isLandscape:!0,isRtl:!0},style:{[`& .${lc.toolbar}`]:{gridColumn:3}}},{props:{isLandscape:!1},style:{[`& .${lc.toolbar}`]:{gridColumn:"2 / 4",gridRow:1},[`& .${lc.shortcuts}`]:{gridColumn:1,gridRow:"2 / 3"}}},{props:{isLandscape:!1,isRtl:!0},style:{[`& .${lc.shortcuts}`]:{gridColumn:3}}}]}),Nle=oe("div",{name:"MuiPickersLayout",slot:"ContentWrapper",overridesResolver:(e,t)=>t.contentWrapper})({gridColumn:2,gridRow:2,display:"flex",flexDirection:"column"}),Lle=v.forwardRef(function(t,n){const r=cn({props:t,name:"MuiPickersLayout"}),{toolbar:o,content:i,tabs:a,actionBar:s,shortcuts:l}=Dle(r),{sx:c,className:u,isLandscape:d,wrapperVariant:f}=r,p=Zht(r);return R.jsxs(_le,{ref:n,sx:c,className:de(p.root,u),ownerState:r,children:[d?l:o,d?o:l,R.jsx(Nle,{className:p.contentWrapper,children:f==="desktop"?R.jsxs(v.Fragment,{children:[i,a]}):R.jsxs(v.Fragment,{children:[a,i]})}),s]})}),egt=["props","getOpenDialogAriaText"],tgt=["ownerState"],ngt=["ownerState"],qV=e=>{var we;let{props:t,getOpenDialogAriaText:n}=e,r=Vt(e,egt);const{slots:o,slotProps:i,className:a,sx:s,format:l,formatDensity:c,enableAccessibleFieldDOMStructure:u,selectedSections:d,onSelectedSectionsChange:f,timezone:p,name:h,label:m,inputRef:y,readOnly:w,disabled:x,autoFocus:C,localeText:E,reduceAnimations:P}=t,T=v.useRef(null),I=v.useRef(null),A=Zb(),k=((we=i==null?void 0:i.toolbar)==null?void 0:we.hidden)??!1,{open:O,actions:$,hasUIView:N,layoutProps:L,renderCurrentView:j,shouldRestoreFocus:D,fieldProps:_,contextValue:z,ownerState:F}=Rle(ue({},r,{props:t,fieldRef:I,autoFocusView:!0,additionalViewProps:{},wrapperVariant:"desktop"})),V=o.inputAdornment??So,U=Yn({elementType:V,externalSlotProps:i==null?void 0:i.inputAdornment,additionalProps:{position:"end"},ownerState:t}),q=Vt(U,tgt),X=o.openPickerButton??vn,ie=Yn({elementType:X,externalSlotProps:i==null?void 0:i.openPickerButton,additionalProps:{disabled:x||w,onClick:O?$.onClose:$.onOpen,"aria-label":n(_.value),edge:q.position},ownerState:t}),ee=Vt(ie,ngt),Q=o.openPickerIcon,te=Yn({elementType:Q,externalSlotProps:i==null?void 0:i.openPickerIcon,ownerState:F}),pe=o.field,ae=Yn({elementType:pe,externalSlotProps:i==null?void 0:i.field,additionalProps:ue({},_,k&&{id:A},{readOnly:w,disabled:x,className:a,sx:s,format:l,formatDensity:c,enableAccessibleFieldDOMStructure:u,selectedSections:d,onSelectedSectionsChange:f,timezone:p,label:m,name:h,autoFocus:C&&!t.open,focused:O?!0:void 0},y?{inputRef:y}:{}),ownerState:t});N&&(ae.InputProps=ue({},ae.InputProps,{ref:T},!t.disableOpenPicker&&{[`${q.position}Adornment`]:R.jsx(V,ue({},q,{children:R.jsx(X,ue({},ee,{children:R.jsx(Q,ue({},te))}))}))}));const se=ue({textField:o.textField,clearIcon:o.clearIcon,clearButton:o.clearButton},ae.slots),re=o.layout??Lle;let fe=A;k&&(m?fe=`${A}-label`:fe=void 0);const Z=ue({},i,{toolbar:ue({},i==null?void 0:i.toolbar,{titleId:A}),popper:ue({"aria-labelledby":fe},i==null?void 0:i.popper)}),ce=ca(I,ae.unstableFieldRef);return{renderPicker:()=>R.jsxs(gle,{contextValue:z,localeText:E,children:[R.jsx(pe,ue({},ae,{slots:se,slotProps:Z,unstableFieldRef:ce})),R.jsx(_ht,ue({role:"dialog",placement:"bottom-start",anchorEl:T.current},$,{open:O,slots:o,slotProps:Z,shouldRestoreFocus:D,reduceAnimations:P,children:R.jsx(re,ue({},L,Z==null?void 0:Z.layout,{slots:o,slotProps:Z,children:j()}))}))]})}},Sl=({view:e,onViewChange:t,views:n,focusedView:r,onFocusedViewChange:o,value:i,defaultValue:a,referenceDate:s,onChange:l,className:c,classes:u,disableFuture:d,disablePast:f,minDate:p,maxDate:h,shouldDisableDate:m,shouldDisableMonth:y,shouldDisableYear:w,reduceAnimations:x,onMonthChange:C,monthsPerRow:E,onYearChange:P,yearsOrder:T,yearsPerRow:I,slots:A,slotProps:k,loading:O,renderLoading:$,disableHighlightToday:N,readOnly:L,disabled:j,showDaysOutsideCurrentMonth:D,dayOfWeekFormatter:_,sx:z,autoFocus:F,fixedWeekNumber:V,displayWeekNumber:U,timezone:q})=>R.jsx(ght,{view:e,onViewChange:t,views:n.filter(ab),focusedView:r&&ab(r)?r:null,onFocusedViewChange:o,value:i,defaultValue:a,referenceDate:s,onChange:l,className:c,classes:u,disableFuture:d,disablePast:f,minDate:p,maxDate:h,shouldDisableDate:m,shouldDisableMonth:y,shouldDisableYear:w,reduceAnimations:x,onMonthChange:C,monthsPerRow:E,onYearChange:P,yearsOrder:T,yearsPerRow:I,slots:A,slotProps:k,loading:O,renderLoading:$,disableHighlightToday:N,readOnly:L,disabled:j,showDaysOutsideCurrentMonth:D,dayOfWeekFormatter:_,sx:z,autoFocus:F,fixedWeekNumber:V,displayWeekNumber:U,timezone:q}),Fle=v.forwardRef(function(t,n){var c,u;const r=$o(),o=Cn(),i=Mle(t,"MuiDesktopDatePicker"),a=ue({day:Sl,month:Sl,year:Sl},i.viewRenderers),s=ue({},i,{viewRenderers:a,format:VS(o,i,!1),yearsPerRow:i.yearsPerRow??4,slots:ue({openPickerIcon:Xse,field:Cle},i.slots),slotProps:ue({},i.slotProps,{field:d=>{var f;return ue({},up((f=i.slotProps)==null?void 0:f.field,d),r0(i),{ref:n})},toolbar:ue({hidden:!0},(c=i.slotProps)==null?void 0:c.toolbar)})}),{renderPicker:l}=qV({props:s,valueManager:po,valueType:"date",getOpenDialogAriaText:e0({utils:o,formatKey:"fullDate",contextTranslation:r.openDatePickerDialogue,propsTranslation:(u=s.localeText)==null?void 0:u.openDatePickerDialogue}),validator:n0});return l()});Fle.propTypes={autoFocus:B.bool,className:B.string,closeOnSelect:B.bool,dayOfWeekFormatter:B.func,defaultValue:B.object,disabled:B.bool,disableFuture:B.bool,disableHighlightToday:B.bool,disableOpenPicker:B.bool,disablePast:B.bool,displayWeekNumber:B.bool,enableAccessibleFieldDOMStructure:B.any,fixedWeekNumber:B.number,format:B.string,formatDensity:B.oneOf(["dense","spacious"]),inputRef:Jb,label:B.node,loading:B.bool,localeText:B.object,maxDate:B.object,minDate:B.object,monthsPerRow:B.oneOf([3,4]),name:B.string,onAccept:B.func,onChange:B.func,onClose:B.func,onError:B.func,onMonthChange:B.func,onOpen:B.func,onSelectedSectionsChange:B.func,onViewChange:B.func,onYearChange:B.func,open:B.bool,openTo:B.oneOf(["day","month","year"]),orientation:B.oneOf(["landscape","portrait"]),readOnly:B.bool,reduceAnimations:B.bool,referenceDate:B.object,renderLoading:B.func,selectedSections:B.oneOfType([B.oneOf(["all","day","empty","hours","meridiem","minutes","month","seconds","weekDay","year"]),B.number]),shouldDisableDate:B.func,shouldDisableMonth:B.func,shouldDisableYear:B.func,showDaysOutsideCurrentMonth:B.bool,slotProps:B.object,slots:B.object,sx:B.oneOfType([B.arrayOf(B.oneOfType([B.func,B.object,B.bool])),B.func,B.object]),timezone:B.string,value:B.object,view:B.oneOf(["day","month","year"]),viewRenderers:B.shape({day:B.func,month:B.func,year:B.func}),views:B.arrayOf(B.oneOf(["day","month","year"]).isRequired),yearsOrder:B.oneOf(["asc","desc"]),yearsPerRow:B.oneOf([3,4])};const rgt=oe(ik)({[`& .${cx.container}`]:{outline:0},[`& .${cx.paper}`]:{outline:0,minWidth:uM}}),ogt=oe(nS)({"&:first-of-type":{padding:0}});function igt(e){const{children:t,onDismiss:n,open:r,slots:o,slotProps:i}=e,a=(o==null?void 0:o.dialog)??rgt,s=(o==null?void 0:o.mobileTransition)??Tb;return R.jsx(a,ue({open:r,onClose:n},i==null?void 0:i.dialog,{TransitionComponent:s,TransitionProps:i==null?void 0:i.mobileTransition,PaperComponent:o==null?void 0:o.mobilePaper,PaperProps:i==null?void 0:i.mobilePaper,children:R.jsx(ogt,{children:t})}))}const agt=["props","getOpenDialogAriaText"],KV=e=>{var q;let{props:t,getOpenDialogAriaText:n}=e,r=Vt(e,agt);const{slots:o,slotProps:i,className:a,sx:s,format:l,formatDensity:c,enableAccessibleFieldDOMStructure:u,selectedSections:d,onSelectedSectionsChange:f,timezone:p,name:h,label:m,inputRef:y,readOnly:w,disabled:x,localeText:C}=t,E=v.useRef(null),P=Zb(),T=((q=i==null?void 0:i.toolbar)==null?void 0:q.hidden)??!1,{open:I,actions:A,layoutProps:k,renderCurrentView:O,fieldProps:$,contextValue:N}=Rle(ue({},r,{props:t,fieldRef:E,autoFocusView:!0,additionalViewProps:{},wrapperVariant:"mobile"})),L=o.field,j=Yn({elementType:L,externalSlotProps:i==null?void 0:i.field,additionalProps:ue({},$,T&&{id:P},!(x||w)&&{onClick:A.onOpen,onKeyDown:ydt(A.onOpen)},{readOnly:w??!0,disabled:x,className:a,sx:s,format:l,formatDensity:c,enableAccessibleFieldDOMStructure:u,selectedSections:d,onSelectedSectionsChange:f,timezone:p,label:m,name:h},y?{inputRef:y}:{}),ownerState:t});j.inputProps=ue({},j.inputProps,{"aria-label":n($.value)});const D=ue({textField:o.textField},j.slots),_=o.layout??Lle;let z=P;T&&(m?z=`${P}-label`:z=void 0);const F=ue({},i,{toolbar:ue({},i==null?void 0:i.toolbar,{titleId:P}),mobilePaper:ue({"aria-labelledby":z},i==null?void 0:i.mobilePaper)}),V=ca(E,j.unstableFieldRef);return{renderPicker:()=>R.jsxs(gle,{contextValue:N,localeText:C,children:[R.jsx(L,ue({},j,{slots:D,slotProps:F,unstableFieldRef:V})),R.jsx(igt,ue({},A,{open:I,slots:o,slotProps:F,children:R.jsx(_,ue({},k,F==null?void 0:F.layout,{slots:o,slotProps:F,children:O()}))}))]})}},jle=v.forwardRef(function(t,n){var c,u;const r=$o(),o=Cn(),i=Mle(t,"MuiMobileDatePicker"),a=ue({day:Sl,month:Sl,year:Sl},i.viewRenderers),s=ue({},i,{viewRenderers:a,format:VS(o,i,!1),slots:ue({field:Cle},i.slots),slotProps:ue({},i.slotProps,{field:d=>{var f;return ue({},up((f=i.slotProps)==null?void 0:f.field,d),r0(i),{ref:n})},toolbar:ue({hidden:!1},(c=i.slotProps)==null?void 0:c.toolbar)})}),{renderPicker:l}=KV({props:s,valueManager:po,valueType:"date",getOpenDialogAriaText:e0({utils:o,formatKey:"fullDate",contextTranslation:r.openDatePickerDialogue,propsTranslation:(u=s.localeText)==null?void 0:u.openDatePickerDialogue}),validator:n0});return l()});jle.propTypes={autoFocus:B.bool,className:B.string,closeOnSelect:B.bool,dayOfWeekFormatter:B.func,defaultValue:B.object,disabled:B.bool,disableFuture:B.bool,disableHighlightToday:B.bool,disableOpenPicker:B.bool,disablePast:B.bool,displayWeekNumber:B.bool,enableAccessibleFieldDOMStructure:B.any,fixedWeekNumber:B.number,format:B.string,formatDensity:B.oneOf(["dense","spacious"]),inputRef:Jb,label:B.node,loading:B.bool,localeText:B.object,maxDate:B.object,minDate:B.object,monthsPerRow:B.oneOf([3,4]),name:B.string,onAccept:B.func,onChange:B.func,onClose:B.func,onError:B.func,onMonthChange:B.func,onOpen:B.func,onSelectedSectionsChange:B.func,onViewChange:B.func,onYearChange:B.func,open:B.bool,openTo:B.oneOf(["day","month","year"]),orientation:B.oneOf(["landscape","portrait"]),readOnly:B.bool,reduceAnimations:B.bool,referenceDate:B.object,renderLoading:B.func,selectedSections:B.oneOfType([B.oneOf(["all","day","empty","hours","meridiem","minutes","month","seconds","weekDay","year"]),B.number]),shouldDisableDate:B.func,shouldDisableMonth:B.func,shouldDisableYear:B.func,showDaysOutsideCurrentMonth:B.bool,slotProps:B.object,slots:B.object,sx:B.oneOfType([B.arrayOf(B.oneOfType([B.func,B.object,B.bool])),B.func,B.object]),timezone:B.string,value:B.object,view:B.oneOf(["day","month","year"]),viewRenderers:B.shape({day:B.func,month:B.func,year:B.func}),views:B.arrayOf(B.oneOf(["day","month","year"]).isRequired),yearsOrder:B.oneOf(["asc","desc"]),yearsPerRow:B.oneOf([3,4])};const sgt=["desktopModeMediaQuery"],hO=v.forwardRef(function(t,n){const r=cn({props:t,name:"MuiDatePicker"}),{desktopModeMediaQuery:o=FV}=r,i=Vt(r,sgt);return CC(o,{defaultMatches:!0})?R.jsx(Fle,ue({ref:n},i)):R.jsx(jle,ue({ref:n},i))});function lgt(e){return Wn("MuiPickersToolbarText",e)}const dF=Xn("MuiPickersToolbarText",["root","selected"]),cgt=["className","selected","value"],ugt=e=>{const{classes:t,selected:n}=e;return zn({root:["root",n&&"selected"]},lgt,t)},dgt=oe(st,{name:"MuiPickersToolbarText",slot:"Root",overridesResolver:(e,t)=>[t.root,{[`&.${dF.selected}`]:t.selected}]})(({theme:e})=>({transition:e.transitions.create("color"),color:(e.vars||e).palette.text.secondary,[`&.${dF.selected}`]:{color:(e.vars||e).palette.text.primary}})),YV=v.forwardRef(function(t,n){const r=cn({props:t,name:"MuiPickersToolbarText"}),{className:o,value:i}=r,a=Vt(r,cgt),s=ugt(r);return R.jsx(dgt,ue({ref:n,className:de(s.root,o),component:"span"},a,{children:i}))}),fgt=["align","className","selected","typographyClassName","value","variant","width"],pgt=e=>{const{classes:t}=e;return zn({root:["root"]},kle,t)},hgt=oe(dt,{name:"MuiPickersToolbarButton",slot:"Root",overridesResolver:(e,t)=>t.root})({padding:0,minWidth:16,textTransform:"none"}),ns=v.forwardRef(function(t,n){const r=cn({props:t,name:"MuiPickersToolbarButton"}),{align:o,className:i,selected:a,typographyClassName:s,value:l,variant:c,width:u}=r,d=Vt(r,fgt),f=pgt(r);return R.jsx(hgt,ue({variant:"text",ref:n,className:de(f.root,i)},u?{sx:{width:u}}:{},d,{children:R.jsx(YV,{align:o,className:s,variant:c,value:l,selected:a})}))});function ggt(e){return Wn("MuiTimePickerToolbar",e)}const xx=Xn("MuiTimePickerToolbar",["root","separator","hourMinuteLabel","hourMinuteLabelLandscape","hourMinuteLabelReverse","ampmSelection","ampmLandscape","ampmLabel"]),mgt=["ampm","ampmInClock","value","isLandscape","onChange","view","onViewChange","views","disabled","readOnly","className"],ygt=e=>{const{isLandscape:t,classes:n,isRtl:r}=e;return zn({root:["root"],separator:["separator"],hourMinuteLabel:["hourMinuteLabel",t&&"hourMinuteLabelLandscape",r&&"hourMinuteLabelReverse"],ampmSelection:["ampmSelection",t&&"ampmLandscape"],ampmLabel:["ampmLabel"]},ggt,n)},vgt=oe(GV,{name:"MuiTimePickerToolbar",slot:"Root",overridesResolver:(e,t)=>t.root})({}),bgt=oe(YV,{name:"MuiTimePickerToolbar",slot:"Separator",overridesResolver:(e,t)=>t.separator})({outline:0,margin:"0 4px 0 2px",cursor:"default"}),wgt=oe("div",{name:"MuiTimePickerToolbar",slot:"HourMinuteLabel",overridesResolver:(e,t)=>[{[`&.${xx.hourMinuteLabelLandscape}`]:t.hourMinuteLabelLandscape,[`&.${xx.hourMinuteLabelReverse}`]:t.hourMinuteLabelReverse},t.hourMinuteLabel]})({display:"flex",justifyContent:"flex-end",alignItems:"flex-end",variants:[{props:{isRtl:!0},style:{flexDirection:"row-reverse"}},{props:{isLandscape:!0},style:{marginTop:"auto"}}]}),xgt=oe("div",{name:"MuiTimePickerToolbar",slot:"AmPmSelection",overridesResolver:(e,t)=>[{[`.${xx.ampmLabel}`]:t.ampmLabel},{[`&.${xx.ampmLandscape}`]:t.ampmLandscape},t.ampmSelection]})({display:"flex",flexDirection:"column",marginRight:"auto",marginLeft:12,[`& .${xx.ampmLabel}`]:{fontSize:17},variants:[{props:{isLandscape:!0},style:{margin:"4px 0 auto",flexDirection:"row",justifyContent:"space-around",flexBasis:"100%"}}]});function Sgt(e){const t=cn({props:e,name:"MuiTimePickerToolbar"}),{ampm:n,ampmInClock:r,value:o,isLandscape:i,onChange:a,view:s,onViewChange:l,views:c,disabled:u,readOnly:d,className:f}=t,p=Vt(t,mgt),h=Cn(),m=$o(),y=dr(),w=!!(n&&!r&&c.includes("hours")),{meridiemMode:x,handleMeridiemChange:C}=lM(o,n,a),E=A=>n?h.format(A,"hours12h"):h.format(A,"hours24h"),P=ue({},t,{isRtl:y}),T=ygt(P),I=R.jsx(bgt,{tabIndex:-1,value:":",variant:"h3",selected:!1,className:T.separator});return R.jsxs(vgt,ue({landscapeDirection:"row",toolbarTitle:m.timePickerToolbarTitle,isLandscape:i,ownerState:P,className:de(T.root,f)},p,{children:[R.jsxs(wgt,{className:T.hourMinuteLabel,ownerState:P,children:[Xm(c,"hours")&&R.jsx(ns,{tabIndex:-1,variant:"h3",onClick:()=>l("hours"),selected:s==="hours",value:o?E(o):"--"}),Xm(c,["hours","minutes"])&&I,Xm(c,"minutes")&&R.jsx(ns,{tabIndex:-1,variant:"h3",onClick:()=>l("minutes"),selected:s==="minutes",value:o?h.format(o,"minutes"):"--"}),Xm(c,["minutes","seconds"])&&I,Xm(c,"seconds")&&R.jsx(ns,{variant:"h3",onClick:()=>l("seconds"),selected:s==="seconds",value:o?h.format(o,"seconds"):"--"})]}),w&&R.jsxs(xgt,{className:T.ampmSelection,ownerState:P,children:[R.jsx(ns,{disableRipple:!0,variant:"subtitle2",selected:x==="am",typographyClassName:T.ampmLabel,value:hc(h,"am"),onClick:d?void 0:()=>C("am"),disabled:u}),R.jsx(ns,{disableRipple:!0,variant:"subtitle2",selected:x==="pm",typographyClassName:T.ampmLabel,value:hc(h,"pm"),onClick:d?void 0:()=>C("pm"),disabled:u})]})]}))}function Ble(e,t){var a;const n=Cn(),r=cn({props:e,name:t}),o=r.ampm??n.is12HourCycleInCurrentLocale(),i=v.useMemo(()=>{var s;return((s=r.localeText)==null?void 0:s.toolbarTitle)==null?r.localeText:ue({},r.localeText,{timePickerToolbarTitle:r.localeText.toolbarTitle})},[r.localeText]);return ue({},r,{ampm:o,localeText:i},kV({views:r.views,openTo:r.openTo,defaultViews:["hours","minutes"],defaultOpenTo:"hours"}),{disableFuture:r.disableFuture??!1,disablePast:r.disablePast??!1,slots:ue({toolbar:Sgt},r.slots),slotProps:ue({},r.slotProps,{toolbar:ue({ampm:o,ampmInClock:r.ampmInClock},(a=r.slotProps)==null?void 0:a.toolbar)})})}const qy=({view:e,onViewChange:t,focusedView:n,onFocusedViewChange:r,views:o,value:i,defaultValue:a,referenceDate:s,onChange:l,className:c,classes:u,disableFuture:d,disablePast:f,minTime:p,maxTime:h,shouldDisableTime:m,minutesStep:y,ampm:w,ampmInClock:x,slots:C,slotProps:E,readOnly:P,disabled:T,sx:I,autoFocus:A,showViewSwitcher:k,disableIgnoringDatePartForTimeValidation:O,timezone:$})=>R.jsx(hdt,{view:e,onViewChange:t,focusedView:n&&ob(n)?n:null,onFocusedViewChange:r,views:o.filter(ob),value:i,defaultValue:a,referenceDate:s,onChange:l,className:c,classes:u,disableFuture:d,disablePast:f,minTime:p,maxTime:h,shouldDisableTime:m,minutesStep:y,ampm:w,ampmInClock:x,slots:C,slotProps:E,readOnly:P,disabled:T,sx:I,autoFocus:A,showViewSwitcher:k,disableIgnoringDatePartForTimeValidation:O,timezone:$}),zle=({view:e,onViewChange:t,focusedView:n,onFocusedViewChange:r,views:o,value:i,defaultValue:a,referenceDate:s,onChange:l,className:c,classes:u,disableFuture:d,disablePast:f,minTime:p,maxTime:h,shouldDisableTime:m,minutesStep:y,ampm:w,slots:x,slotProps:C,readOnly:E,disabled:P,sx:T,autoFocus:I,disableIgnoringDatePartForTimeValidation:A,timeSteps:k,skipDisabled:O,timezone:$})=>R.jsx(Cdt,{view:e,onViewChange:t,focusedView:n,onFocusedViewChange:r,views:o.filter(ob),value:i,defaultValue:a,referenceDate:s,onChange:l,className:c,classes:u,disableFuture:d,disablePast:f,minTime:p,maxTime:h,shouldDisableTime:m,minutesStep:y,ampm:w,slots:x,slotProps:C,readOnly:E,disabled:P,sx:T,autoFocus:I,disableIgnoringDatePartForTimeValidation:A,timeStep:k==null?void 0:k.minutes,skipDisabled:O,timezone:$}),gO=({view:e,onViewChange:t,focusedView:n,onFocusedViewChange:r,views:o,value:i,defaultValue:a,referenceDate:s,onChange:l,className:c,classes:u,disableFuture:d,disablePast:f,minTime:p,maxTime:h,shouldDisableTime:m,minutesStep:y,ampm:w,slots:x,slotProps:C,readOnly:E,disabled:P,sx:T,autoFocus:I,disableIgnoringDatePartForTimeValidation:A,timeSteps:k,skipDisabled:O,timezone:$})=>R.jsx(Ndt,{view:e,onViewChange:t,focusedView:n,onFocusedViewChange:r,views:o.filter(ob),value:i,defaultValue:a,referenceDate:s,onChange:l,className:c,classes:u,disableFuture:d,disablePast:f,minTime:p,maxTime:h,shouldDisableTime:m,minutesStep:y,ampm:w,slots:x,slotProps:C,readOnly:E,disabled:P,sx:T,autoFocus:I,disableIgnoringDatePartForTimeValidation:A,timeSteps:k,skipDisabled:O,timezone:$}),Cgt=["views","format"],Vle=(e,t,n)=>{let{views:r,format:o}=t,i=Vt(t,Cgt);if(o)return o;const a=[],s=[];if(r.forEach(u=>{ob(u)?s.push(u):ab(u)&&a.push(u)}),s.length===0)return VS(e,ue({views:a},i),!1);if(a.length===0)return dO(e,ue({views:s},i));const l=dO(e,ue({views:s},i));return`${VS(e,ue({views:a},i),!1)} ${l}`},Egt=(e,t,n)=>n?t.filter(r=>!Bw(r)||r==="hours"):e?[...t,"meridiem"]:t,Pgt=(e,t)=>24*60/((e.hours??1)*(e.minutes??5))<=t;function Hle({thresholdToRenderTimeInASingleColumn:e,ampm:t,timeSteps:n,views:r}){const o=e??24,i=ue({hours:1,minutes:5,seconds:5},n),a=Pgt(i,o);return{thresholdToRenderTimeInASingleColumn:o,timeSteps:i,shouldRenderTimeInASingleColumn:a,views:Egt(t,r,a)}}const Ule=v.forwardRef(function(t,n){var w,x,C,E;const r=$o(),o=Cn(),i=Ble(t,"MuiDesktopTimePicker"),{shouldRenderTimeInASingleColumn:a,views:s,timeSteps:l}=Hle(i),c=a?zle:gO,u=ue({hours:c,minutes:c,seconds:c,meridiem:c},i.viewRenderers),d=i.ampmInClock??!0,f=a?[]:["accept"],h=((w=u.hours)==null?void 0:w.name)===gO.name?s:s.filter(P=>P!=="meridiem"),m=ue({},i,{ampmInClock:d,timeSteps:l,viewRenderers:u,format:dO(o,i),views:a?["hours"]:h,slots:ue({field:Ele,openPickerIcon:eut},i.slots),slotProps:ue({},i.slotProps,{field:P=>{var T;return ue({},up((T=i.slotProps)==null?void 0:T.field,P),r0(i),{ref:n})},toolbar:ue({hidden:!0,ampmInClock:d},(x=i.slotProps)==null?void 0:x.toolbar),actionBar:ue({actions:f},(C=i.slotProps)==null?void 0:C.actionBar)})}),{renderPicker:y}=qV({props:m,valueManager:po,valueType:"time",getOpenDialogAriaText:e0({utils:o,formatKey:"fullTime",contextTranslation:r.openTimePickerDialogue,propsTranslation:(E=m.localeText)==null?void 0:E.openTimePickerDialogue}),validator:r1});return y()});Ule.propTypes={ampm:B.bool,ampmInClock:B.bool,autoFocus:B.bool,className:B.string,closeOnSelect:B.bool,defaultValue:B.object,disabled:B.bool,disableFuture:B.bool,disableIgnoringDatePartForTimeValidation:B.bool,disableOpenPicker:B.bool,disablePast:B.bool,enableAccessibleFieldDOMStructure:B.any,format:B.string,formatDensity:B.oneOf(["dense","spacious"]),inputRef:Jb,label:B.node,localeText:B.object,maxTime:B.object,minTime:B.object,minutesStep:B.number,name:B.string,onAccept:B.func,onChange:B.func,onClose:B.func,onError:B.func,onOpen:B.func,onSelectedSectionsChange:B.func,onViewChange:B.func,open:B.bool,openTo:B.oneOf(["hours","meridiem","minutes","seconds"]),orientation:B.oneOf(["landscape","portrait"]),readOnly:B.bool,reduceAnimations:B.bool,referenceDate:B.object,selectedSections:B.oneOfType([B.oneOf(["all","day","empty","hours","meridiem","minutes","month","seconds","weekDay","year"]),B.number]),shouldDisableTime:B.func,skipDisabled:B.bool,slotProps:B.object,slots:B.object,sx:B.oneOfType([B.arrayOf(B.oneOfType([B.func,B.object,B.bool])),B.func,B.object]),thresholdToRenderTimeInASingleColumn:B.number,timeSteps:B.shape({hours:B.number,minutes:B.number,seconds:B.number}),timezone:B.string,value:B.object,view:B.oneOf(["hours","meridiem","minutes","seconds"]),viewRenderers:B.shape({hours:B.func,meridiem:B.func,minutes:B.func,seconds:B.func}),views:B.arrayOf(B.oneOf(["hours","minutes","seconds"]).isRequired)};const Wle=v.forwardRef(function(t,n){var u,d;const r=$o(),o=Cn(),i=Ble(t,"MuiMobileTimePicker"),a=ue({hours:qy,minutes:qy,seconds:qy},i.viewRenderers),s=i.ampmInClock??!1,l=ue({},i,{ampmInClock:s,viewRenderers:a,format:dO(o,i),slots:ue({field:Ele},i.slots),slotProps:ue({},i.slotProps,{field:f=>{var p;return ue({},up((p=i.slotProps)==null?void 0:p.field,f),r0(i),{ref:n})},toolbar:ue({hidden:!1,ampmInClock:s},(u=i.slotProps)==null?void 0:u.toolbar)})}),{renderPicker:c}=KV({props:l,valueManager:po,valueType:"time",getOpenDialogAriaText:e0({utils:o,formatKey:"fullTime",contextTranslation:r.openTimePickerDialogue,propsTranslation:(d=l.localeText)==null?void 0:d.openTimePickerDialogue}),validator:r1});return c()});Wle.propTypes={ampm:B.bool,ampmInClock:B.bool,autoFocus:B.bool,className:B.string,closeOnSelect:B.bool,defaultValue:B.object,disabled:B.bool,disableFuture:B.bool,disableIgnoringDatePartForTimeValidation:B.bool,disableOpenPicker:B.bool,disablePast:B.bool,enableAccessibleFieldDOMStructure:B.any,format:B.string,formatDensity:B.oneOf(["dense","spacious"]),inputRef:Jb,label:B.node,localeText:B.object,maxTime:B.object,minTime:B.object,minutesStep:B.number,name:B.string,onAccept:B.func,onChange:B.func,onClose:B.func,onError:B.func,onOpen:B.func,onSelectedSectionsChange:B.func,onViewChange:B.func,open:B.bool,openTo:B.oneOf(["hours","minutes","seconds"]),orientation:B.oneOf(["landscape","portrait"]),readOnly:B.bool,reduceAnimations:B.bool,referenceDate:B.object,selectedSections:B.oneOfType([B.oneOf(["all","day","empty","hours","meridiem","minutes","month","seconds","weekDay","year"]),B.number]),shouldDisableTime:B.func,slotProps:B.object,slots:B.object,sx:B.oneOfType([B.arrayOf(B.oneOfType([B.func,B.object,B.bool])),B.func,B.object]),timezone:B.string,value:B.object,view:B.oneOf(["hours","minutes","seconds"]),viewRenderers:B.shape({hours:B.func,minutes:B.func,seconds:B.func}),views:B.arrayOf(B.oneOf(["hours","minutes","seconds"]).isRequired)};const Tgt=["desktopModeMediaQuery"],Igt=v.forwardRef(function(t,n){const r=cn({props:t,name:"MuiTimePicker"}),{desktopModeMediaQuery:o=FV}=r,i=Vt(r,Tgt);return CC(o,{defaultMatches:!0})?R.jsx(Ule,ue({ref:n},i)):R.jsx(Wle,ue({ref:n},i))});function Ogt(e){return Wn("MuiDateTimePickerTabs",e)}Xn("MuiDateTimePickerTabs",["root"]);const Agt=e=>ab(e)?"date":"time",kgt=e=>e==="date"?"day":"hours",Mgt=e=>{const{classes:t}=e;return zn({root:["root"]},Ogt,t)},Rgt=oe(vNe,{name:"MuiDateTimePickerTabs",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({boxShadow:`0 -1px 0 0 inset ${(e.vars||e).palette.divider}`,"&:last-child":{boxShadow:`0 1px 0 0 inset ${(e.vars||e).palette.divider}`,[`& .${XP.indicator}`]:{bottom:"auto",top:0}}})),$gt=function(t){const n=cn({props:t,name:"MuiDateTimePickerTabs"}),{dateIcon:r=R.jsx(tut,{}),onViewChange:o,timeIcon:i=R.jsx(nut,{}),view:a,hidden:s=typeof window>"u"||window.innerHeight<667,className:l,sx:c}=n,u=$o(),d=Mgt(n),f=(p,h)=>{o(kgt(h))};return s?null:R.jsxs(Rgt,{ownerState:n,variant:"fullWidth",value:Agt(a),onChange:f,className:de(l,d.root),sx:c,children:[R.jsx(Q6,{value:"date","aria-label":u.dateTableLabel,icon:R.jsx(v.Fragment,{children:r})}),R.jsx(Q6,{value:"time","aria-label":u.timeTableLabel,icon:R.jsx(v.Fragment,{children:i})})]})};function Dgt(e){return Wn("MuiDateTimePickerToolbar",e)}const HD=Xn("MuiDateTimePickerToolbar",["root","dateContainer","timeContainer","timeDigitsContainer","separator","timeLabelReverse","ampmSelection","ampmLandscape","ampmLabel"]),_gt=["ampm","ampmInClock","value","onChange","view","isLandscape","onViewChange","toolbarFormat","toolbarPlaceholder","views","disabled","readOnly","toolbarVariant","toolbarTitle","className"],Ngt=e=>{const{classes:t,isLandscape:n,isRtl:r}=e;return zn({root:["root"],dateContainer:["dateContainer"],timeContainer:["timeContainer",r&&"timeLabelReverse"],timeDigitsContainer:["timeDigitsContainer",r&&"timeLabelReverse"],separator:["separator"],ampmSelection:["ampmSelection",n&&"ampmLandscape"],ampmLabel:["ampmLabel"]},Dgt,t)},Lgt=oe(GV,{name:"MuiDateTimePickerToolbar",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({paddingLeft:16,paddingRight:16,justifyContent:"space-around",position:"relative",variants:[{props:{toolbarVariant:"desktop"},style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,[`& .${mht.content} .${dF.selected}`]:{color:(e.vars||e).palette.primary.main,fontWeight:e.typography.fontWeightBold}}},{props:{toolbarVariant:"desktop",isLandscape:!0},style:{borderRight:`1px solid ${(e.vars||e).palette.divider}`}},{props:{toolbarVariant:"desktop",isLandscape:!1},style:{paddingLeft:24,paddingRight:0}}]})),Fgt=oe("div",{name:"MuiDateTimePickerToolbar",slot:"DateContainer",overridesResolver:(e,t)=>t.dateContainer})({display:"flex",flexDirection:"column",alignItems:"flex-start"}),jgt=oe("div",{name:"MuiDateTimePickerToolbar",slot:"TimeContainer",overridesResolver:(e,t)=>t.timeContainer})({display:"flex",flexDirection:"row",variants:[{props:{isRtl:!0},style:{flexDirection:"row-reverse"}},{props:{toolbarVariant:"desktop",isLandscape:!1},style:{gap:9,marginRight:4,alignSelf:"flex-end"}},{props:({isLandscape:e,toolbarVariant:t})=>e&&t!=="desktop",style:{flexDirection:"column"}},{props:({isLandscape:e,toolbarVariant:t,isRtl:n})=>e&&t!=="desktop"&&n,style:{flexDirection:"column-reverse"}}]}),Bgt=oe("div",{name:"MuiDateTimePickerToolbar",slot:"TimeDigitsContainer",overridesResolver:(e,t)=>t.timeDigitsContainer})({display:"flex",variants:[{props:{isRtl:!0},style:{flexDirection:"row-reverse"}},{props:{toolbarVariant:"desktop"},style:{gap:1.5}}]}),X7=oe(YV,{name:"MuiDateTimePickerToolbar",slot:"Separator",overridesResolver:(e,t)=>t.separator})({margin:"0 4px 0 2px",cursor:"default",variants:[{props:{toolbarVariant:"desktop"},style:{margin:0}}]}),zgt=oe("div",{name:"MuiDateTimePickerToolbar",slot:"AmPmSelection",overridesResolver:(e,t)=>[{[`.${HD.ampmLabel}`]:t.ampmLabel},{[`&.${HD.ampmLandscape}`]:t.ampmLandscape},t.ampmSelection]})({display:"flex",flexDirection:"column",marginRight:"auto",marginLeft:12,[`& .${HD.ampmLabel}`]:{fontSize:17},variants:[{props:{isLandscape:!0},style:{margin:"4px 0 auto",flexDirection:"row",justifyContent:"space-around",width:"100%"}}]});function Vgt(e){const t=cn({props:e,name:"MuiDateTimePickerToolbar"}),{ampm:n,ampmInClock:r,value:o,onChange:i,view:a,isLandscape:s,onViewChange:l,toolbarFormat:c,toolbarPlaceholder:u="––",views:d,disabled:f,readOnly:p,toolbarVariant:h="mobile",toolbarTitle:m,className:y}=t,w=Vt(t,_gt),x=dr(),C=ue({},t,{isRtl:x}),E=Cn(),{meridiemMode:P,handleMeridiemChange:T}=lM(o,n,i),I=!!(n&&!r),A=h==="desktop",k=$o(),O=Ngt(C),$=m??k.dateTimePickerToolbarTitle,N=j=>n?E.format(j,"hours12h"):E.format(j,"hours24h"),L=v.useMemo(()=>o?c?E.formatByString(o,c):E.format(o,"shortDate"):u,[o,c,u,E]);return R.jsxs(Lgt,ue({isLandscape:s,className:de(O.root,y),toolbarTitle:$},w,{ownerState:C,children:[R.jsxs(Fgt,{className:O.dateContainer,ownerState:C,children:[d.includes("year")&&R.jsx(ns,{tabIndex:-1,variant:"subtitle1",onClick:()=>l("year"),selected:a==="year",value:o?E.format(o,"year"):"–"}),d.includes("day")&&R.jsx(ns,{tabIndex:-1,variant:A?"h5":"h4",onClick:()=>l("day"),selected:a==="day",value:L})]}),R.jsxs(jgt,{className:O.timeContainer,ownerState:C,children:[R.jsxs(Bgt,{className:O.timeDigitsContainer,ownerState:C,children:[d.includes("hours")&&R.jsxs(v.Fragment,{children:[R.jsx(ns,{variant:A?"h5":"h3",width:A&&!s?zw:void 0,onClick:()=>l("hours"),selected:a==="hours",value:o?N(o):"--"}),R.jsx(X7,{variant:A?"h5":"h3",value:":",className:O.separator,ownerState:C}),R.jsx(ns,{variant:A?"h5":"h3",width:A&&!s?zw:void 0,onClick:()=>l("minutes"),selected:a==="minutes"||!d.includes("minutes")&&a==="hours",value:o?E.format(o,"minutes"):"--",disabled:!d.includes("minutes")})]}),d.includes("seconds")&&R.jsxs(v.Fragment,{children:[R.jsx(X7,{variant:A?"h5":"h3",value:":",className:O.separator,ownerState:C}),R.jsx(ns,{variant:A?"h5":"h3",width:A&&!s?zw:void 0,onClick:()=>l("seconds"),selected:a==="seconds",value:o?E.format(o,"seconds"):"--"})]})]}),I&&!A&&R.jsxs(zgt,{className:O.ampmSelection,ownerState:C,children:[R.jsx(ns,{variant:"subtitle2",selected:P==="am",typographyClassName:O.ampmLabel,value:hc(E,"am"),onClick:p?void 0:()=>T("am"),disabled:f}),R.jsx(ns,{variant:"subtitle2",selected:P==="pm",typographyClassName:O.ampmLabel,value:hc(E,"pm"),onClick:p?void 0:()=>T("pm"),disabled:f})]}),n&&A&&R.jsx(ns,{variant:"h5",onClick:()=>l("meridiem"),selected:a==="meridiem",value:o&&P?hc(E,P):"--",width:zw})]})]}))}function Gle(e,t){var s;const n=Cn(),r=Vg(),o=cn({props:e,name:t}),i=o.ampm??n.is12HourCycleInCurrentLocale(),a=v.useMemo(()=>{var l;return((l=o.localeText)==null?void 0:l.toolbarTitle)==null?o.localeText:ue({},o.localeText,{dateTimePickerToolbarTitle:o.localeText.toolbarTitle})},[o.localeText]);return ue({},o,kV({views:o.views,openTo:o.openTo,defaultViews:["year","day","hours","minutes"],defaultOpenTo:"day"}),{ampm:i,localeText:a,orientation:o.orientation??"portrait",disableIgnoringDatePartForTimeValidation:o.disableIgnoringDatePartForTimeValidation??!!(o.minDateTime||o.maxDateTime||o.disablePast||o.disableFuture),disableFuture:o.disableFuture??!1,disablePast:o.disablePast??!1,minDate:Li(n,o.minDateTime??o.minDate,r.minDate),maxDate:Li(n,o.maxDateTime??o.maxDate,r.maxDate),minTime:o.minDateTime??o.minTime,maxTime:o.maxDateTime??o.maxTime,slots:ue({toolbar:Vgt,tabs:$gt},o.slots),slotProps:ue({},o.slotProps,{toolbar:ue({ampm:i},(s=o.slotProps)==null?void 0:s.toolbar)})})}const Hgt=v.forwardRef(function(t,n){var m;const r=dr(),{toolbar:o,tabs:i,content:a,actionBar:s,shortcuts:l}=Dle(t),{sx:c,className:u,isLandscape:d,classes:f}=t,p=s&&(((m=s.props.actions)==null?void 0:m.length)??0)>0,h=ue({},t,{isRtl:r});return R.jsxs(_le,{ref:n,className:de(lc.root,f==null?void 0:f.root,u),sx:[{[`& .${lc.tabs}`]:{gridRow:4,gridColumn:"1 / 4"},[`& .${lc.actionBar}`]:{gridRow:5}},...Array.isArray(c)?c:[c]],ownerState:h,children:[d?l:o,d?o:l,R.jsxs(Nle,{className:de(lc.contentWrapper,f==null?void 0:f.contentWrapper),sx:{display:"grid"},children:[a,i,p&&R.jsx(kl,{sx:{gridRow:3,gridColumn:"1 / 4"}})]}),s]})}),Ugt=["openTo","focusedView","timeViewsCount"],Wgt=function(t,n,r){var u,d;const{openTo:o,focusedView:i,timeViewsCount:a}=r,s=Vt(r,Ugt),l=ue({},s,{focusedView:null,sx:[{[`&.${U7.root}`]:{borderBottom:0},[`&.${U7.root}, .${Tdt.root}, &.${mdt.root}`]:{maxHeight:dM}}]}),c=Bw(n);return R.jsxs(v.Fragment,{children:[(u=t[c?"day":n])==null?void 0:u.call(t,ue({},r,{view:c?"day":n,focusedView:i&&ab(i)?i:null,views:r.views.filter(ab),sx:[{gridColumn:1},...l.sx]})),a>0&&R.jsxs(v.Fragment,{children:[R.jsx(kl,{orientation:"vertical",sx:{gridColumn:2}}),(d=t[c?n:"hours"])==null?void 0:d.call(t,ue({},l,{view:c?n:"hours",focusedView:i&&Bw(i)?i:null,openTo:Bw(o)?o:"hours",views:r.views.filter(Bw),sx:[{gridColumn:3},...l.sx]}))]})]})},qle=v.forwardRef(function(t,n){var x,C,E,P;const r=$o(),o=Cn(),i=Gle(t,"MuiDesktopDateTimePicker"),{shouldRenderTimeInASingleColumn:a,thresholdToRenderTimeInASingleColumn:s,views:l,timeSteps:c}=Hle(i),u=a?zle:gO,d=ue({day:Sl,month:Sl,year:Sl,hours:u,minutes:u,seconds:u,meridiem:u},i.viewRenderers),f=i.ampmInClock??!0,h=((x=d.hours)==null?void 0:x.name)===gO.name?l:l.filter(T=>T!=="meridiem"),m=a?[]:["accept"],y=ue({},i,{viewRenderers:d,format:Vle(o,i),views:h,yearsPerRow:i.yearsPerRow??4,ampmInClock:f,timeSteps:c,thresholdToRenderTimeInASingleColumn:s,shouldRenderTimeInASingleColumn:a,slots:ue({field:Ple,layout:Hgt,openPickerIcon:Xse},i.slots),slotProps:ue({},i.slotProps,{field:T=>{var I;return ue({},up((I=i.slotProps)==null?void 0:I.field,T),r0(i),{ref:n})},toolbar:ue({hidden:!0,ampmInClock:f,toolbarVariant:"desktop"},(C=i.slotProps)==null?void 0:C.toolbar),tabs:ue({hidden:!0},(E=i.slotProps)==null?void 0:E.tabs),actionBar:T=>{var I;return ue({actions:m},up((I=i.slotProps)==null?void 0:I.actionBar,T))}})}),{renderPicker:w}=qV({props:y,valueManager:po,valueType:"date-time",getOpenDialogAriaText:e0({utils:o,formatKey:"fullDate",contextTranslation:r.openDatePickerDialogue,propsTranslation:(P=y.localeText)==null?void 0:P.openDatePickerDialogue}),validator:hM,rendererInterceptor:Wgt});return w()});qle.propTypes={ampm:B.bool,ampmInClock:B.bool,autoFocus:B.bool,className:B.string,closeOnSelect:B.bool,dayOfWeekFormatter:B.func,defaultValue:B.object,disabled:B.bool,disableFuture:B.bool,disableHighlightToday:B.bool,disableIgnoringDatePartForTimeValidation:B.bool,disableOpenPicker:B.bool,disablePast:B.bool,displayWeekNumber:B.bool,enableAccessibleFieldDOMStructure:B.any,fixedWeekNumber:B.number,format:B.string,formatDensity:B.oneOf(["dense","spacious"]),inputRef:Jb,label:B.node,loading:B.bool,localeText:B.object,maxDate:B.object,maxDateTime:B.object,maxTime:B.object,minDate:B.object,minDateTime:B.object,minTime:B.object,minutesStep:B.number,monthsPerRow:B.oneOf([3,4]),name:B.string,onAccept:B.func,onChange:B.func,onClose:B.func,onError:B.func,onMonthChange:B.func,onOpen:B.func,onSelectedSectionsChange:B.func,onViewChange:B.func,onYearChange:B.func,open:B.bool,openTo:B.oneOf(["day","hours","meridiem","minutes","month","seconds","year"]),orientation:B.oneOf(["landscape","portrait"]),readOnly:B.bool,reduceAnimations:B.bool,referenceDate:B.object,renderLoading:B.func,selectedSections:B.oneOfType([B.oneOf(["all","day","empty","hours","meridiem","minutes","month","seconds","weekDay","year"]),B.number]),shouldDisableDate:B.func,shouldDisableMonth:B.func,shouldDisableTime:B.func,shouldDisableYear:B.func,showDaysOutsideCurrentMonth:B.bool,skipDisabled:B.bool,slotProps:B.object,slots:B.object,sx:B.oneOfType([B.arrayOf(B.oneOfType([B.func,B.object,B.bool])),B.func,B.object]),thresholdToRenderTimeInASingleColumn:B.number,timeSteps:B.shape({hours:B.number,minutes:B.number,seconds:B.number}),timezone:B.string,value:B.object,view:B.oneOf(["day","hours","meridiem","minutes","month","seconds","year"]),viewRenderers:B.shape({day:B.func,hours:B.func,meridiem:B.func,minutes:B.func,month:B.func,seconds:B.func,year:B.func}),views:B.arrayOf(B.oneOf(["day","hours","minutes","month","seconds","year"]).isRequired),yearsOrder:B.oneOf(["asc","desc"]),yearsPerRow:B.oneOf([3,4])};const Kle=v.forwardRef(function(t,n){var u,d,f;const r=$o(),o=Cn(),i=Gle(t,"MuiMobileDateTimePicker"),a=ue({day:Sl,month:Sl,year:Sl,hours:qy,minutes:qy,seconds:qy},i.viewRenderers),s=i.ampmInClock??!1,l=ue({},i,{viewRenderers:a,format:Vle(o,i),ampmInClock:s,slots:ue({field:Ple},i.slots),slotProps:ue({},i.slotProps,{field:p=>{var h;return ue({},up((h=i.slotProps)==null?void 0:h.field,p),r0(i),{ref:n})},toolbar:ue({hidden:!1,ampmInClock:s},(u=i.slotProps)==null?void 0:u.toolbar),tabs:ue({hidden:!1},(d=i.slotProps)==null?void 0:d.tabs)})}),{renderPicker:c}=KV({props:l,valueManager:po,valueType:"date-time",getOpenDialogAriaText:e0({utils:o,formatKey:"fullDate",contextTranslation:r.openDatePickerDialogue,propsTranslation:(f=l.localeText)==null?void 0:f.openDatePickerDialogue}),validator:hM});return c()});Kle.propTypes={ampm:B.bool,ampmInClock:B.bool,autoFocus:B.bool,className:B.string,closeOnSelect:B.bool,dayOfWeekFormatter:B.func,defaultValue:B.object,disabled:B.bool,disableFuture:B.bool,disableHighlightToday:B.bool,disableIgnoringDatePartForTimeValidation:B.bool,disableOpenPicker:B.bool,disablePast:B.bool,displayWeekNumber:B.bool,enableAccessibleFieldDOMStructure:B.any,fixedWeekNumber:B.number,format:B.string,formatDensity:B.oneOf(["dense","spacious"]),inputRef:Jb,label:B.node,loading:B.bool,localeText:B.object,maxDate:B.object,maxDateTime:B.object,maxTime:B.object,minDate:B.object,minDateTime:B.object,minTime:B.object,minutesStep:B.number,monthsPerRow:B.oneOf([3,4]),name:B.string,onAccept:B.func,onChange:B.func,onClose:B.func,onError:B.func,onMonthChange:B.func,onOpen:B.func,onSelectedSectionsChange:B.func,onViewChange:B.func,onYearChange:B.func,open:B.bool,openTo:B.oneOf(["day","hours","minutes","month","seconds","year"]),orientation:B.oneOf(["landscape","portrait"]),readOnly:B.bool,reduceAnimations:B.bool,referenceDate:B.object,renderLoading:B.func,selectedSections:B.oneOfType([B.oneOf(["all","day","empty","hours","meridiem","minutes","month","seconds","weekDay","year"]),B.number]),shouldDisableDate:B.func,shouldDisableMonth:B.func,shouldDisableTime:B.func,shouldDisableYear:B.func,showDaysOutsideCurrentMonth:B.bool,slotProps:B.object,slots:B.object,sx:B.oneOfType([B.arrayOf(B.oneOfType([B.func,B.object,B.bool])),B.func,B.object]),timezone:B.string,value:B.object,view:B.oneOf(["day","hours","minutes","month","seconds","year"]),viewRenderers:B.shape({day:B.func,hours:B.func,minutes:B.func,month:B.func,seconds:B.func,year:B.func}),views:B.arrayOf(B.oneOf(["day","hours","minutes","month","seconds","year"]).isRequired),yearsOrder:B.oneOf(["asc","desc"]),yearsPerRow:B.oneOf([3,4])};const Ggt=["desktopModeMediaQuery"],qgt=v.forwardRef(function(t,n){const r=cn({props:t,name:"MuiDateTimePicker"}),{desktopModeMediaQuery:o=FV}=r,i=Vt(r,Ggt);return CC(o,{defaultMatches:!0})?R.jsx(qle,ue({ref:n},i)):R.jsx(Kle,ue({ref:n},i))});class Ug extends Error{}class Kgt extends Ug{constructor(t){super(`Invalid DateTime: ${t.toMessage()}`)}}class Ygt extends Ug{constructor(t){super(`Invalid Interval: ${t.toMessage()}`)}}class Qgt extends Ug{constructor(t){super(`Invalid Duration: ${t.toMessage()}`)}}class Ey extends Ug{}class Yle extends Ug{constructor(t){super(`Invalid unit ${t}`)}}class Ai extends Ug{}class tf extends Ug{constructor(){super("Zone is an abstract class")}}const vt="numeric",Rc="short",vs="long",mO={year:vt,month:vt,day:vt},Qle={year:vt,month:Rc,day:vt},Xgt={year:vt,month:Rc,day:vt,weekday:Rc},Xle={year:vt,month:vs,day:vt},Jle={year:vt,month:vs,day:vt,weekday:vs},Zle={hour:vt,minute:vt},ece={hour:vt,minute:vt,second:vt},tce={hour:vt,minute:vt,second:vt,timeZoneName:Rc},nce={hour:vt,minute:vt,second:vt,timeZoneName:vs},rce={hour:vt,minute:vt,hourCycle:"h23"},oce={hour:vt,minute:vt,second:vt,hourCycle:"h23"},ice={hour:vt,minute:vt,second:vt,hourCycle:"h23",timeZoneName:Rc},ace={hour:vt,minute:vt,second:vt,hourCycle:"h23",timeZoneName:vs},sce={year:vt,month:vt,day:vt,hour:vt,minute:vt},lce={year:vt,month:vt,day:vt,hour:vt,minute:vt,second:vt},cce={year:vt,month:Rc,day:vt,hour:vt,minute:vt},uce={year:vt,month:Rc,day:vt,hour:vt,minute:vt,second:vt},Jgt={year:vt,month:Rc,day:vt,weekday:Rc,hour:vt,minute:vt},dce={year:vt,month:vs,day:vt,hour:vt,minute:vt,timeZoneName:Rc},fce={year:vt,month:vs,day:vt,hour:vt,minute:vt,second:vt,timeZoneName:Rc},pce={year:vt,month:vs,day:vt,weekday:vs,hour:vt,minute:vt,timeZoneName:vs},hce={year:vt,month:vs,day:vt,weekday:vs,hour:vt,minute:vt,second:vt,timeZoneName:vs};class o1{get type(){throw new tf}get name(){throw new tf}get ianaName(){return this.name}get isUniversal(){throw new tf}offsetName(t,n){throw new tf}formatOffset(t,n){throw new tf}offset(t){throw new tf}equals(t){throw new tf}get isValid(){throw new tf}}let UD=null;class mM extends o1{static get instance(){return UD===null&&(UD=new mM),UD}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(t,{format:n,locale:r}){return Cce(t,n,r)}formatOffset(t,n){return Sx(this.offset(t),n)}offset(t){return-new Date(t).getTimezoneOffset()}equals(t){return t.type==="system"}get isValid(){return!0}}let nT={};function Zgt(e){return nT[e]||(nT[e]=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"})),nT[e]}const emt={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function tmt(e,t){const n=e.format(t).replace(/\u200E/g,""),r=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(n),[,o,i,a,s,l,c,u]=r;return[a,o,i,s,l,c,u]}function nmt(e,t){const n=e.formatToParts(t),r=[];for(let o=0;o=0?h:1e3+h,(f-p)/(60*1e3)}equals(t){return t.type==="iana"&&t.name===this.name}get isValid(){return this.valid}}let J7={};function rmt(e,t={}){const n=JSON.stringify([e,t]);let r=J7[n];return r||(r=new Intl.ListFormat(e,t),J7[n]=r),r}let fF={};function pF(e,t={}){const n=JSON.stringify([e,t]);let r=fF[n];return r||(r=new Intl.DateTimeFormat(e,t),fF[n]=r),r}let hF={};function omt(e,t={}){const n=JSON.stringify([e,t]);let r=hF[n];return r||(r=new Intl.NumberFormat(e,t),hF[n]=r),r}let gF={};function imt(e,t={}){const{base:n,...r}=t,o=JSON.stringify([e,r]);let i=gF[o];return i||(i=new Intl.RelativeTimeFormat(e,t),gF[o]=i),i}let Vw=null;function amt(){return Vw||(Vw=new Intl.DateTimeFormat().resolvedOptions().locale,Vw)}let Z7={};function smt(e){let t=Z7[e];if(!t){const n=new Intl.Locale(e);t="getWeekInfo"in n?n.getWeekInfo():n.weekInfo,Z7[e]=t}return t}function lmt(e){const t=e.indexOf("-x-");t!==-1&&(e=e.substring(0,t));const n=e.indexOf("-u-");if(n===-1)return[e];{let r,o;try{r=pF(e).resolvedOptions(),o=e}catch{const l=e.substring(0,n);r=pF(l).resolvedOptions(),o=l}const{numberingSystem:i,calendar:a}=r;return[o,i,a]}}function cmt(e,t,n){return(n||t)&&(e.includes("-u-")||(e+="-u"),n&&(e+=`-ca-${n}`),t&&(e+=`-nu-${t}`)),e}function umt(e){const t=[];for(let n=1;n<=12;n++){const r=yt.utc(2009,n,1);t.push(e(r))}return t}function dmt(e){const t=[];for(let n=1;n<=7;n++){const r=yt.utc(2016,11,13+n);t.push(e(r))}return t}function dP(e,t,n,r){const o=e.listingMode();return o==="error"?null:o==="en"?n(t):r(t)}function fmt(e){return e.numberingSystem&&e.numberingSystem!=="latn"?!1:e.numberingSystem==="latn"||!e.locale||e.locale.startsWith("en")||new Intl.DateTimeFormat(e.intl).resolvedOptions().numberingSystem==="latn"}class pmt{constructor(t,n,r){this.padTo=r.padTo||0,this.floor=r.floor||!1;const{padTo:o,floor:i,...a}=r;if(!n||Object.keys(a).length>0){const s={useGrouping:!1,...r};r.padTo>0&&(s.minimumIntegerDigits=r.padTo),this.inf=omt(t,s)}}format(t){if(this.inf){const n=this.floor?Math.floor(t):t;return this.inf.format(n)}else{const n=this.floor?Math.floor(t):eH(t,3);return Co(n,this.padTo)}}}class hmt{constructor(t,n,r){this.opts=r,this.originalZone=void 0;let o;if(this.opts.timeZone)this.dt=t;else if(t.zone.type==="fixed"){const a=-1*(t.offset/60),s=a>=0?`Etc/GMT+${a}`:`Etc/GMT${a}`;t.offset!==0&&kd.create(s).valid?(o=s,this.dt=t):(o="UTC",this.dt=t.offset===0?t:t.setZone("UTC").plus({minutes:t.offset}),this.originalZone=t.zone)}else t.zone.type==="system"?this.dt=t:t.zone.type==="iana"?(this.dt=t,o=t.zone.name):(o="UTC",this.dt=t.setZone("UTC").plus({minutes:t.offset}),this.originalZone=t.zone);const i={...this.opts};i.timeZone=i.timeZone||o,this.dtf=pF(n,i)}format(){return this.originalZone?this.formatToParts().map(({value:t})=>t).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){const t=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?t.map(n=>{if(n.type==="timeZoneName"){const r=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...n,value:r}}else return n}):t}resolvedOptions(){return this.dtf.resolvedOptions()}}class gmt{constructor(t,n,r){this.opts={style:"long",...r},!n&&xce()&&(this.rtf=imt(t,r))}format(t,n){return this.rtf?this.rtf.format(t,n):Fmt(n,t,this.opts.numeric,this.opts.style!=="long")}formatToParts(t,n){return this.rtf?this.rtf.formatToParts(t,n):[]}}const mmt={firstDay:1,minimalDays:4,weekend:[6,7]};class lr{static fromOpts(t){return lr.create(t.locale,t.numberingSystem,t.outputCalendar,t.weekSettings,t.defaultToEN)}static create(t,n,r,o,i=!1){const a=t||Qr.defaultLocale,s=a||(i?"en-US":amt()),l=n||Qr.defaultNumberingSystem,c=r||Qr.defaultOutputCalendar,u=mF(o)||Qr.defaultWeekSettings;return new lr(s,l,c,u,a)}static resetCache(){Vw=null,fF={},hF={},gF={}}static fromObject({locale:t,numberingSystem:n,outputCalendar:r,weekSettings:o}={}){return lr.create(t,n,r,o)}constructor(t,n,r,o,i){const[a,s,l]=lmt(t);this.locale=a,this.numberingSystem=n||s||null,this.outputCalendar=r||l||null,this.weekSettings=o,this.intl=cmt(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=i,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=fmt(this)),this.fastNumbersCached}listingMode(){const t=this.isEnglish(),n=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return t&&n?"en":"intl"}clone(t){return!t||Object.getOwnPropertyNames(t).length===0?this:lr.create(t.locale||this.specifiedLocale,t.numberingSystem||this.numberingSystem,t.outputCalendar||this.outputCalendar,mF(t.weekSettings)||this.weekSettings,t.defaultToEN||!1)}redefaultToEN(t={}){return this.clone({...t,defaultToEN:!0})}redefaultToSystem(t={}){return this.clone({...t,defaultToEN:!1})}months(t,n=!1){return dP(this,t,Tce,()=>{const r=n?{month:t,day:"numeric"}:{month:t},o=n?"format":"standalone";return this.monthsCache[o][t]||(this.monthsCache[o][t]=umt(i=>this.extract(i,r,"month"))),this.monthsCache[o][t]})}weekdays(t,n=!1){return dP(this,t,Ace,()=>{const r=n?{weekday:t,year:"numeric",month:"long",day:"numeric"}:{weekday:t},o=n?"format":"standalone";return this.weekdaysCache[o][t]||(this.weekdaysCache[o][t]=dmt(i=>this.extract(i,r,"weekday"))),this.weekdaysCache[o][t]})}meridiems(){return dP(this,void 0,()=>kce,()=>{if(!this.meridiemCache){const t={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[yt.utc(2016,11,13,9),yt.utc(2016,11,13,19)].map(n=>this.extract(n,t,"dayperiod"))}return this.meridiemCache})}eras(t){return dP(this,t,Mce,()=>{const n={era:t};return this.eraCache[t]||(this.eraCache[t]=[yt.utc(-40,1,1),yt.utc(2017,1,1)].map(r=>this.extract(r,n,"era"))),this.eraCache[t]})}extract(t,n,r){const o=this.dtFormatter(t,n),i=o.formatToParts(),a=i.find(s=>s.type.toLowerCase()===r);return a?a.value:null}numberFormatter(t={}){return new pmt(this.intl,t.forceSimple||this.fastNumbers,t)}dtFormatter(t,n={}){return new hmt(t,this.intl,n)}relFormatter(t={}){return new gmt(this.intl,this.isEnglish(),t)}listFormatter(t={}){return rmt(this.intl,t)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:Sce()?smt(this.locale):mmt}getStartOfWeek(){return this.getWeekSettings().firstDay}getMinDaysInFirstWeek(){return this.getWeekSettings().minimalDays}getWeekendDays(){return this.getWeekSettings().weekend}equals(t){return this.locale===t.locale&&this.numberingSystem===t.numberingSystem&&this.outputCalendar===t.outputCalendar}toString(){return`Locale(${this.locale}, ${this.numberingSystem}, ${this.outputCalendar})`}}let WD=null;class oa extends o1{static get utcInstance(){return WD===null&&(WD=new oa(0)),WD}static instance(t){return t===0?oa.utcInstance:new oa(t)}static parseSpecifier(t){if(t){const n=t.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(n)return new oa(bM(n[1],n[2]))}return null}constructor(t){super(),this.fixed=t}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${Sx(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${Sx(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(t,n){return Sx(this.fixed,n)}get isUniversal(){return!0}offset(){return this.fixed}equals(t){return t.type==="fixed"&&t.fixed===this.fixed}get isValid(){return!0}}class ymt extends o1{constructor(t){super(),this.zoneName=t}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}}function bf(e,t){if(rn(e)||e===null)return t;if(e instanceof o1)return e;if(Cmt(e)){const n=e.toLowerCase();return n==="default"?t:n==="local"||n==="system"?mM.instance:n==="utc"||n==="gmt"?oa.utcInstance:oa.parseSpecifier(n)||kd.create(e)}else return Yf(e)?oa.instance(e):typeof e=="object"&&"offset"in e&&typeof e.offset=="function"?e:new ymt(e)}const QV={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},eK={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},vmt=QV.hanidec.replace(/[\[|\]]/g,"").split("");function bmt(e){let t=parseInt(e,10);if(isNaN(t)){t="";for(let n=0;n=i&&r<=a&&(t+=r-i)}}return parseInt(t,10)}else return t}let Jm={};function wmt(){Jm={}}function Zl({numberingSystem:e},t=""){const n=e||"latn";return Jm[n]||(Jm[n]={}),Jm[n][t]||(Jm[n][t]=new RegExp(`${QV[n]}${t}`)),Jm[n][t]}let tK=()=>Date.now(),nK="system",rK=null,oK=null,iK=null,aK=60,sK,lK=null;class Qr{static get now(){return tK}static set now(t){tK=t}static set defaultZone(t){nK=t}static get defaultZone(){return bf(nK,mM.instance)}static get defaultLocale(){return rK}static set defaultLocale(t){rK=t}static get defaultNumberingSystem(){return oK}static set defaultNumberingSystem(t){oK=t}static get defaultOutputCalendar(){return iK}static set defaultOutputCalendar(t){iK=t}static get defaultWeekSettings(){return lK}static set defaultWeekSettings(t){lK=mF(t)}static get twoDigitCutoffYear(){return aK}static set twoDigitCutoffYear(t){aK=t%100}static get throwOnInvalid(){return sK}static set throwOnInvalid(t){sK=t}static resetCaches(){lr.resetCache(),kd.resetCache(),yt.resetCache(),wmt()}}class gc{constructor(t,n){this.reason=t,this.explanation=n}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}const gce=[0,31,59,90,120,151,181,212,243,273,304,334],mce=[0,31,60,91,121,152,182,213,244,274,305,335];function pl(e,t){return new gc("unit out of range",`you specified ${t} (of type ${typeof t}) as a ${e}, which is invalid`)}function XV(e,t,n){const r=new Date(Date.UTC(e,t-1,n));e<100&&e>=0&&r.setUTCFullYear(r.getUTCFullYear()-1900);const o=r.getUTCDay();return o===0?7:o}function yce(e,t,n){return n+(i1(e)?mce:gce)[t-1]}function vce(e,t){const n=i1(e)?mce:gce,r=n.findIndex(i=>iHS(r,t,n)?(c=r+1,l=1):c=r,{weekYear:c,weekNumber:l,weekday:s,...wM(e)}}function cK(e,t=4,n=1){const{weekYear:r,weekNumber:o,weekday:i}=e,a=JV(XV(r,1,t),n),s=Ky(r);let l=o*7+i-a-7+t,c;l<1?(c=r-1,l+=Ky(c)):l>s?(c=r+1,l-=Ky(r)):c=r;const{month:u,day:d}=vce(c,l);return{year:c,month:u,day:d,...wM(e)}}function GD(e){const{year:t,month:n,day:r}=e,o=yce(t,n,r);return{year:t,ordinal:o,...wM(e)}}function uK(e){const{year:t,ordinal:n}=e,{month:r,day:o}=vce(t,n);return{year:t,month:r,day:o,...wM(e)}}function dK(e,t){if(!rn(e.localWeekday)||!rn(e.localWeekNumber)||!rn(e.localWeekYear)){if(!rn(e.weekday)||!rn(e.weekNumber)||!rn(e.weekYear))throw new Ey("Cannot mix locale-based week fields with ISO-based week fields");return rn(e.localWeekday)||(e.weekday=e.localWeekday),rn(e.localWeekNumber)||(e.weekNumber=e.localWeekNumber),rn(e.localWeekYear)||(e.weekYear=e.localWeekYear),delete e.localWeekday,delete e.localWeekNumber,delete e.localWeekYear,{minDaysInFirstWeek:t.getMinDaysInFirstWeek(),startOfWeek:t.getStartOfWeek()}}else return{minDaysInFirstWeek:4,startOfWeek:1}}function xmt(e,t=4,n=1){const r=yM(e.weekYear),o=hl(e.weekNumber,1,HS(e.weekYear,t,n)),i=hl(e.weekday,1,7);return r?o?i?!1:pl("weekday",e.weekday):pl("week",e.weekNumber):pl("weekYear",e.weekYear)}function Smt(e){const t=yM(e.year),n=hl(e.ordinal,1,Ky(e.year));return t?n?!1:pl("ordinal",e.ordinal):pl("year",e.year)}function bce(e){const t=yM(e.year),n=hl(e.month,1,12),r=hl(e.day,1,vO(e.year,e.month));return t?n?r?!1:pl("day",e.day):pl("month",e.month):pl("year",e.year)}function wce(e){const{hour:t,minute:n,second:r,millisecond:o}=e,i=hl(t,0,23)||t===24&&n===0&&r===0&&o===0,a=hl(n,0,59),s=hl(r,0,59),l=hl(o,0,999);return i?a?s?l?!1:pl("millisecond",o):pl("second",r):pl("minute",n):pl("hour",t)}function rn(e){return typeof e>"u"}function Yf(e){return typeof e=="number"}function yM(e){return typeof e=="number"&&e%1===0}function Cmt(e){return typeof e=="string"}function Emt(e){return Object.prototype.toString.call(e)==="[object Date]"}function xce(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function Sce(){try{return typeof Intl<"u"&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch{return!1}}function Pmt(e){return Array.isArray(e)?e:[e]}function fK(e,t,n){if(e.length!==0)return e.reduce((r,o)=>{const i=[t(o),o];return r&&n(r[0],i[0])===r[0]?r:i},null)[1]}function Tmt(e,t){return t.reduce((n,r)=>(n[r]=e[r],n),{})}function sb(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function mF(e){if(e==null)return null;if(typeof e!="object")throw new Ai("Week settings must be an object");if(!hl(e.firstDay,1,7)||!hl(e.minimalDays,1,7)||!Array.isArray(e.weekend)||e.weekend.some(t=>!hl(t,1,7)))throw new Ai("Invalid week settings");return{firstDay:e.firstDay,minimalDays:e.minimalDays,weekend:Array.from(e.weekend)}}function hl(e,t,n){return yM(e)&&e>=t&&e<=n}function Imt(e,t){return e-t*Math.floor(e/t)}function Co(e,t=2){const n=e<0;let r;return n?r="-"+(""+-e).padStart(t,"0"):r=(""+e).padStart(t,"0"),r}function pf(e){if(!(rn(e)||e===null||e===""))return parseInt(e,10)}function fh(e){if(!(rn(e)||e===null||e===""))return parseFloat(e)}function ZV(e){if(!(rn(e)||e===null||e==="")){const t=parseFloat("0."+e)*1e3;return Math.floor(t)}}function eH(e,t,n=!1){const r=10**t;return(n?Math.trunc:Math.round)(e*r)/r}function i1(e){return e%4===0&&(e%100!==0||e%400===0)}function Ky(e){return i1(e)?366:365}function vO(e,t){const n=Imt(t-1,12)+1,r=e+(t-n)/12;return n===2?i1(r)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][n-1]}function vM(e){let t=Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute,e.second,e.millisecond);return e.year<100&&e.year>=0&&(t=new Date(t),t.setUTCFullYear(e.year,e.month-1,e.day)),+t}function pK(e,t,n){return-JV(XV(e,1,t),n)+t-1}function HS(e,t=4,n=1){const r=pK(e,t,n),o=pK(e+1,t,n);return(Ky(e)-r+o)/7}function yF(e){return e>99?e:e>Qr.twoDigitCutoffYear?1900+e:2e3+e}function Cce(e,t,n,r=null){const o=new Date(e),i={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};r&&(i.timeZone=r);const a={timeZoneName:t,...i},s=new Intl.DateTimeFormat(n,a).formatToParts(o).find(l=>l.type.toLowerCase()==="timezonename");return s?s.value:null}function bM(e,t){let n=parseInt(e,10);Number.isNaN(n)&&(n=0);const r=parseInt(t,10)||0,o=n<0||Object.is(n,-0)?-r:r;return n*60+o}function Ece(e){const t=Number(e);if(typeof e=="boolean"||e===""||Number.isNaN(t))throw new Ai(`Invalid unit value ${e}`);return t}function bO(e,t){const n={};for(const r in e)if(sb(e,r)){const o=e[r];if(o==null)continue;n[t(r)]=Ece(o)}return n}function Sx(e,t){const n=Math.trunc(Math.abs(e/60)),r=Math.trunc(Math.abs(e%60)),o=e>=0?"+":"-";switch(t){case"short":return`${o}${Co(n,2)}:${Co(r,2)}`;case"narrow":return`${o}${n}${r>0?`:${r}`:""}`;case"techie":return`${o}${Co(n,2)}${Co(r,2)}`;default:throw new RangeError(`Value format ${t} is out of range for property format`)}}function wM(e){return Tmt(e,["hour","minute","second","millisecond"])}const Omt=["January","February","March","April","May","June","July","August","September","October","November","December"],Pce=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Amt=["J","F","M","A","M","J","J","A","S","O","N","D"];function Tce(e){switch(e){case"narrow":return[...Amt];case"short":return[...Pce];case"long":return[...Omt];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}const Ice=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],Oce=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],kmt=["M","T","W","T","F","S","S"];function Ace(e){switch(e){case"narrow":return[...kmt];case"short":return[...Oce];case"long":return[...Ice];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const kce=["AM","PM"],Mmt=["Before Christ","Anno Domini"],Rmt=["BC","AD"],$mt=["B","A"];function Mce(e){switch(e){case"narrow":return[...$mt];case"short":return[...Rmt];case"long":return[...Mmt];default:return null}}function Dmt(e){return kce[e.hour<12?0:1]}function _mt(e,t){return Ace(t)[e.weekday-1]}function Nmt(e,t){return Tce(t)[e.month-1]}function Lmt(e,t){return Mce(t)[e.year<0?0:1]}function Fmt(e,t,n="always",r=!1){const o={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},i=["hours","minutes","seconds"].indexOf(e)===-1;if(n==="auto"&&i){const d=e==="days";switch(t){case 1:return d?"tomorrow":`next ${o[e][0]}`;case-1:return d?"yesterday":`last ${o[e][0]}`;case 0:return d?"today":`this ${o[e][0]}`}}const a=Object.is(t,-0)||t<0,s=Math.abs(t),l=s===1,c=o[e],u=r?l?c[1]:c[2]||c[1]:l?o[e][0]:e;return a?`${s} ${u} ago`:`in ${s} ${u}`}function hK(e,t){let n="";for(const r of e)r.literal?n+=r.val:n+=t(r.val);return n}const jmt={D:mO,DD:Qle,DDD:Xle,DDDD:Jle,t:Zle,tt:ece,ttt:tce,tttt:nce,T:rce,TT:oce,TTT:ice,TTTT:ace,f:sce,ff:cce,fff:dce,ffff:pce,F:lce,FF:uce,FFF:fce,FFFF:hce};let pc=class Hw{static create(t,n={}){return new Hw(t,n)}static parseFormat(t){let n=null,r="",o=!1;const i=[];for(let a=0;a0&&i.push({literal:o||/^\s+$/.test(r),val:r}),n=null,r="",o=!o):o||s===n?r+=s:(r.length>0&&i.push({literal:/^\s+$/.test(r),val:r}),r=s,n=s)}return r.length>0&&i.push({literal:o||/^\s+$/.test(r),val:r}),i}static macroTokenToFormatOpts(t){return jmt[t]}constructor(t,n){this.opts=n,this.loc=t,this.systemLoc=null}formatWithSystemDefault(t,n){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(t,{...this.opts,...n}).format()}dtFormatter(t,n={}){return this.loc.dtFormatter(t,{...this.opts,...n})}formatDateTime(t,n){return this.dtFormatter(t,n).format()}formatDateTimeParts(t,n){return this.dtFormatter(t,n).formatToParts()}formatInterval(t,n){return this.dtFormatter(t.start,n).dtf.formatRange(t.start.toJSDate(),t.end.toJSDate())}resolvedOptions(t,n){return this.dtFormatter(t,n).resolvedOptions()}num(t,n=0){if(this.opts.forceSimple)return Co(t,n);const r={...this.opts};return n>0&&(r.padTo=n),this.loc.numberFormatter(r).format(t)}formatDateTimeFromString(t,n){const r=this.loc.listingMode()==="en",o=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",i=(p,h)=>this.loc.extract(t,p,h),a=p=>t.isOffsetFixed&&t.offset===0&&p.allowZ?"Z":t.isValid?t.zone.formatOffset(t.ts,p.format):"",s=()=>r?Dmt(t):i({hour:"numeric",hourCycle:"h12"},"dayperiod"),l=(p,h)=>r?Nmt(t,p):i(h?{month:p}:{month:p,day:"numeric"},"month"),c=(p,h)=>r?_mt(t,p):i(h?{weekday:p}:{weekday:p,month:"long",day:"numeric"},"weekday"),u=p=>{const h=Hw.macroTokenToFormatOpts(p);return h?this.formatWithSystemDefault(t,h):p},d=p=>r?Lmt(t,p):i({era:p},"era"),f=p=>{switch(p){case"S":return this.num(t.millisecond);case"u":case"SSS":return this.num(t.millisecond,3);case"s":return this.num(t.second);case"ss":return this.num(t.second,2);case"uu":return this.num(Math.floor(t.millisecond/10),2);case"uuu":return this.num(Math.floor(t.millisecond/100));case"m":return this.num(t.minute);case"mm":return this.num(t.minute,2);case"h":return this.num(t.hour%12===0?12:t.hour%12);case"hh":return this.num(t.hour%12===0?12:t.hour%12,2);case"H":return this.num(t.hour);case"HH":return this.num(t.hour,2);case"Z":return a({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return a({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return a({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return t.zone.offsetName(t.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return t.zone.offsetName(t.ts,{format:"long",locale:this.loc.locale});case"z":return t.zoneName;case"a":return s();case"d":return o?i({day:"numeric"},"day"):this.num(t.day);case"dd":return o?i({day:"2-digit"},"day"):this.num(t.day,2);case"c":return this.num(t.weekday);case"ccc":return c("short",!0);case"cccc":return c("long",!0);case"ccccc":return c("narrow",!0);case"E":return this.num(t.weekday);case"EEE":return c("short",!1);case"EEEE":return c("long",!1);case"EEEEE":return c("narrow",!1);case"L":return o?i({month:"numeric",day:"numeric"},"month"):this.num(t.month);case"LL":return o?i({month:"2-digit",day:"numeric"},"month"):this.num(t.month,2);case"LLL":return l("short",!0);case"LLLL":return l("long",!0);case"LLLLL":return l("narrow",!0);case"M":return o?i({month:"numeric"},"month"):this.num(t.month);case"MM":return o?i({month:"2-digit"},"month"):this.num(t.month,2);case"MMM":return l("short",!1);case"MMMM":return l("long",!1);case"MMMMM":return l("narrow",!1);case"y":return o?i({year:"numeric"},"year"):this.num(t.year);case"yy":return o?i({year:"2-digit"},"year"):this.num(t.year.toString().slice(-2),2);case"yyyy":return o?i({year:"numeric"},"year"):this.num(t.year,4);case"yyyyyy":return o?i({year:"numeric"},"year"):this.num(t.year,6);case"G":return d("short");case"GG":return d("long");case"GGGGG":return d("narrow");case"kk":return this.num(t.weekYear.toString().slice(-2),2);case"kkkk":return this.num(t.weekYear,4);case"W":return this.num(t.weekNumber);case"WW":return this.num(t.weekNumber,2);case"n":return this.num(t.localWeekNumber);case"nn":return this.num(t.localWeekNumber,2);case"ii":return this.num(t.localWeekYear.toString().slice(-2),2);case"iiii":return this.num(t.localWeekYear,4);case"o":return this.num(t.ordinal);case"ooo":return this.num(t.ordinal,3);case"q":return this.num(t.quarter);case"qq":return this.num(t.quarter,2);case"X":return this.num(Math.floor(t.ts/1e3));case"x":return this.num(t.ts);default:return u(p)}};return hK(Hw.parseFormat(n),f)}formatDurationFromString(t,n){const r=l=>{switch(l[0]){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":return"hour";case"d":return"day";case"w":return"week";case"M":return"month";case"y":return"year";default:return null}},o=l=>c=>{const u=r(c);return u?this.num(l.get(u),c.length):c},i=Hw.parseFormat(n),a=i.reduce((l,{literal:c,val:u})=>c?l:l.concat(u),[]),s=t.shiftTo(...a.map(r).filter(l=>l));return hK(i,o(s))}};const Rce=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function o0(...e){const t=e.reduce((n,r)=>n+r.source,"");return RegExp(`^${t}$`)}function i0(...e){return t=>e.reduce(([n,r,o],i)=>{const[a,s,l]=i(t,o);return[{...n,...a},s||r,l]},[{},null,1]).slice(0,2)}function a0(e,...t){if(e==null)return[null,null];for(const[n,r]of t){const o=n.exec(e);if(o)return r(o)}return[null,null]}function $ce(...e){return(t,n)=>{const r={};let o;for(o=0;op!==void 0&&(h||p&&u)?-p:p;return[{years:f(fh(n)),months:f(fh(r)),weeks:f(fh(o)),days:f(fh(i)),hours:f(fh(a)),minutes:f(fh(s)),seconds:f(fh(l),l==="-0"),milliseconds:f(ZV(c),d)}]}const Jmt={GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function rH(e,t,n,r,o,i,a){const s={year:t.length===2?yF(pf(t)):pf(t),month:Pce.indexOf(n)+1,day:pf(r),hour:pf(o),minute:pf(i)};return a&&(s.second=pf(a)),e&&(s.weekday=e.length>3?Ice.indexOf(e)+1:Oce.indexOf(e)+1),s}const Zmt=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function eyt(e){const[,t,n,r,o,i,a,s,l,c,u,d]=e,f=rH(t,o,r,n,i,a,s);let p;return l?p=Jmt[l]:c?p=0:p=bM(u,d),[f,new oa(p)]}function tyt(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}const nyt=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,ryt=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,oyt=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function gK(e){const[,t,n,r,o,i,a,s]=e;return[rH(t,o,r,n,i,a,s),oa.utcInstance]}function iyt(e){const[,t,n,r,o,i,a,s]=e;return[rH(t,s,n,r,o,i,a),oa.utcInstance]}const ayt=o0(zmt,nH),syt=o0(Vmt,nH),lyt=o0(Hmt,nH),cyt=o0(_ce),Lce=i0(Kmt,s0,a1,s1),uyt=i0(Umt,s0,a1,s1),dyt=i0(Wmt,s0,a1,s1),fyt=i0(s0,a1,s1);function pyt(e){return a0(e,[ayt,Lce],[syt,uyt],[lyt,dyt],[cyt,fyt])}function hyt(e){return a0(tyt(e),[Zmt,eyt])}function gyt(e){return a0(e,[nyt,gK],[ryt,gK],[oyt,iyt])}function myt(e){return a0(e,[Qmt,Xmt])}const yyt=i0(s0);function vyt(e){return a0(e,[Ymt,yyt])}const byt=o0(Gmt,qmt),wyt=o0(Nce),xyt=i0(s0,a1,s1);function Syt(e){return a0(e,[byt,Lce],[wyt,xyt])}const mK="Invalid Duration",Fce={weeks:{days:7,hours:7*24,minutes:7*24*60,seconds:7*24*60*60,milliseconds:7*24*60*60*1e3},days:{hours:24,minutes:24*60,seconds:24*60*60,milliseconds:24*60*60*1e3},hours:{minutes:60,seconds:60*60,milliseconds:60*60*1e3},minutes:{seconds:60,milliseconds:60*1e3},seconds:{milliseconds:1e3}},Cyt={years:{quarters:4,months:12,weeks:52,days:365,hours:365*24,minutes:365*24*60,seconds:365*24*60*60,milliseconds:365*24*60*60*1e3},quarters:{months:3,weeks:13,days:91,hours:91*24,minutes:91*24*60,seconds:91*24*60*60,milliseconds:91*24*60*60*1e3},months:{weeks:4,days:30,hours:30*24,minutes:30*24*60,seconds:30*24*60*60,milliseconds:30*24*60*60*1e3},...Fce},Ys=146097/400,Nm=146097/4800,Eyt={years:{quarters:4,months:12,weeks:Ys/7,days:Ys,hours:Ys*24,minutes:Ys*24*60,seconds:Ys*24*60*60,milliseconds:Ys*24*60*60*1e3},quarters:{months:3,weeks:Ys/28,days:Ys/4,hours:Ys*24/4,minutes:Ys*24*60/4,seconds:Ys*24*60*60/4,milliseconds:Ys*24*60*60*1e3/4},months:{weeks:Nm/7,days:Nm,hours:Nm*24,minutes:Nm*24*60,seconds:Nm*24*60*60,milliseconds:Nm*24*60*60*1e3},...Fce},Bh=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],Pyt=Bh.slice(0).reverse();function nf(e,t,n=!1){const r={values:n?t.values:{...e.values,...t.values||{}},loc:e.loc.clone(t.loc),conversionAccuracy:t.conversionAccuracy||e.conversionAccuracy,matrix:t.matrix||e.matrix};return new Vn(r)}function jce(e,t){let n=t.milliseconds??0;for(const r of Pyt.slice(1))t[r]&&(n+=t[r]*e[r].milliseconds);return n}function yK(e,t){const n=jce(e,t)<0?-1:1;Bh.reduceRight((r,o)=>{if(rn(t[o]))return r;if(r){const i=t[r]*n,a=e[o][r],s=Math.floor(i/a);t[o]+=s*n,t[r]-=s*a*n}return o},null),Bh.reduce((r,o)=>{if(rn(t[o]))return r;if(r){const i=t[r]%1;t[r]-=i,t[o]+=i*e[r][o]}return o},null)}function Tyt(e){const t={};for(const[n,r]of Object.entries(e))r!==0&&(t[n]=r);return t}class Vn{constructor(t){const n=t.conversionAccuracy==="longterm"||!1;let r=n?Eyt:Cyt;t.matrix&&(r=t.matrix),this.values=t.values,this.loc=t.loc||lr.create(),this.conversionAccuracy=n?"longterm":"casual",this.invalid=t.invalid||null,this.matrix=r,this.isLuxonDuration=!0}static fromMillis(t,n){return Vn.fromObject({milliseconds:t},n)}static fromObject(t,n={}){if(t==null||typeof t!="object")throw new Ai(`Duration.fromObject: argument expected to be an object, got ${t===null?"null":typeof t}`);return new Vn({values:bO(t,Vn.normalizeUnit),loc:lr.fromObject(n),conversionAccuracy:n.conversionAccuracy,matrix:n.matrix})}static fromDurationLike(t){if(Yf(t))return Vn.fromMillis(t);if(Vn.isDuration(t))return t;if(typeof t=="object")return Vn.fromObject(t);throw new Ai(`Unknown duration argument ${t} of type ${typeof t}`)}static fromISO(t,n){const[r]=myt(t);return r?Vn.fromObject(r,n):Vn.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static fromISOTime(t,n){const[r]=vyt(t);return r?Vn.fromObject(r,n):Vn.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static invalid(t,n=null){if(!t)throw new Ai("need to specify a reason the Duration is invalid");const r=t instanceof gc?t:new gc(t,n);if(Qr.throwOnInvalid)throw new Qgt(r);return new Vn({invalid:r})}static normalizeUnit(t){const n={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[t&&t.toLowerCase()];if(!n)throw new Yle(t);return n}static isDuration(t){return t&&t.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(t,n={}){const r={...n,floor:n.round!==!1&&n.floor!==!1};return this.isValid?pc.create(this.loc,r).formatDurationFromString(this,t):mK}toHuman(t={}){if(!this.isValid)return mK;const n=Bh.map(r=>{const o=this.values[r];return rn(o)?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...t,unit:r.slice(0,-1)}).format(o)}).filter(r=>r);return this.loc.listFormatter({type:"conjunction",style:t.listStyle||"narrow",...t}).format(n)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let t="P";return this.years!==0&&(t+=this.years+"Y"),(this.months!==0||this.quarters!==0)&&(t+=this.months+this.quarters*3+"M"),this.weeks!==0&&(t+=this.weeks+"W"),this.days!==0&&(t+=this.days+"D"),(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)&&(t+="T"),this.hours!==0&&(t+=this.hours+"H"),this.minutes!==0&&(t+=this.minutes+"M"),(this.seconds!==0||this.milliseconds!==0)&&(t+=eH(this.seconds+this.milliseconds/1e3,3)+"S"),t==="P"&&(t+="T0S"),t}toISOTime(t={}){if(!this.isValid)return null;const n=this.toMillis();return n<0||n>=864e5?null:(t={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...t,includeOffset:!1},yt.fromMillis(n,{zone:"UTC"}).toISOTime(t))}toJSON(){return this.toISO()}toString(){return this.toISO()}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Duration { values: ${JSON.stringify(this.values)} }`:`Duration { Invalid, reason: ${this.invalidReason} }`}toMillis(){return this.isValid?jce(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(t){if(!this.isValid)return this;const n=Vn.fromDurationLike(t),r={};for(const o of Bh)(sb(n.values,o)||sb(this.values,o))&&(r[o]=n.get(o)+this.get(o));return nf(this,{values:r},!0)}minus(t){if(!this.isValid)return this;const n=Vn.fromDurationLike(t);return this.plus(n.negate())}mapUnits(t){if(!this.isValid)return this;const n={};for(const r of Object.keys(this.values))n[r]=Ece(t(this.values[r],r));return nf(this,{values:n},!0)}get(t){return this[Vn.normalizeUnit(t)]}set(t){if(!this.isValid)return this;const n={...this.values,...bO(t,Vn.normalizeUnit)};return nf(this,{values:n})}reconfigure({locale:t,numberingSystem:n,conversionAccuracy:r,matrix:o}={}){const a={loc:this.loc.clone({locale:t,numberingSystem:n}),matrix:o,conversionAccuracy:r};return nf(this,a)}as(t){return this.isValid?this.shiftTo(t).get(t):NaN}normalize(){if(!this.isValid)return this;const t=this.toObject();return yK(this.matrix,t),nf(this,{values:t},!0)}rescale(){if(!this.isValid)return this;const t=Tyt(this.normalize().shiftToAll().toObject());return nf(this,{values:t},!0)}shiftTo(...t){if(!this.isValid)return this;if(t.length===0)return this;t=t.map(a=>Vn.normalizeUnit(a));const n={},r={},o=this.toObject();let i;for(const a of Bh)if(t.indexOf(a)>=0){i=a;let s=0;for(const c in r)s+=this.matrix[c][a]*r[c],r[c]=0;Yf(o[a])&&(s+=o[a]);const l=Math.trunc(s);n[a]=l,r[a]=(s*1e3-l*1e3)/1e3}else Yf(o[a])&&(r[a]=o[a]);for(const a in r)r[a]!==0&&(n[i]+=a===i?r[a]:r[a]/this.matrix[i][a]);return yK(this.matrix,n),nf(this,{values:n},!0)}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;const t={};for(const n of Object.keys(this.values))t[n]=this.values[n]===0?0:-this.values[n];return nf(this,{values:t},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(t){if(!this.isValid||!t.isValid||!this.loc.equals(t.loc))return!1;function n(r,o){return r===void 0||r===0?o===void 0||o===0:r===o}for(const r of Bh)if(!n(this.values[r],t.values[r]))return!1;return!0}}const Lm="Invalid Interval";function Iyt(e,t){return!e||!e.isValid?lo.invalid("missing or invalid start"):!t||!t.isValid?lo.invalid("missing or invalid end"):tt:!1}isBefore(t){return this.isValid?this.e<=t:!1}contains(t){return this.isValid?this.s<=t&&this.e>t:!1}set({start:t,end:n}={}){return this.isValid?lo.fromDateTimes(t||this.s,n||this.e):this}splitAt(...t){if(!this.isValid)return[];const n=t.map(mw).filter(a=>this.contains(a)).sort((a,s)=>a.toMillis()-s.toMillis()),r=[];let{s:o}=this,i=0;for(;o+this.e?this.e:a;r.push(lo.fromDateTimes(o,s)),o=s,i+=1}return r}splitBy(t){const n=Vn.fromDurationLike(t);if(!this.isValid||!n.isValid||n.as("milliseconds")===0)return[];let{s:r}=this,o=1,i;const a=[];for(;rl*o));i=+s>+this.e?this.e:s,a.push(lo.fromDateTimes(r,i)),r=i,o+=1}return a}divideEqually(t){return this.isValid?this.splitBy(this.length()/t).slice(0,t):[]}overlaps(t){return this.e>t.s&&this.s=t.e:!1}equals(t){return!this.isValid||!t.isValid?!1:this.s.equals(t.s)&&this.e.equals(t.e)}intersection(t){if(!this.isValid)return this;const n=this.s>t.s?this.s:t.s,r=this.e=r?null:lo.fromDateTimes(n,r)}union(t){if(!this.isValid)return this;const n=this.st.e?this.e:t.e;return lo.fromDateTimes(n,r)}static merge(t){const[n,r]=t.sort((o,i)=>o.s-i.s).reduce(([o,i],a)=>i?i.overlaps(a)||i.abutsStart(a)?[o,i.union(a)]:[o.concat([i]),a]:[o,a],[[],null]);return r&&n.push(r),n}static xor(t){let n=null,r=0;const o=[],i=t.map(l=>[{time:l.s,type:"s"},{time:l.e,type:"e"}]),a=Array.prototype.concat(...i),s=a.sort((l,c)=>l.time-c.time);for(const l of s)r+=l.type==="s"?1:-1,r===1?n=l.time:(n&&+n!=+l.time&&o.push(lo.fromDateTimes(n,l.time)),n=null);return lo.merge(o)}difference(...t){return lo.xor([this].concat(t)).map(n=>this.intersection(n)).filter(n=>n&&!n.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:Lm}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`:`Interval { Invalid, reason: ${this.invalidReason} }`}toLocaleString(t=mO,n={}){return this.isValid?pc.create(this.s.loc.clone(n),t).formatInterval(this):Lm}toISO(t){return this.isValid?`${this.s.toISO(t)}/${this.e.toISO(t)}`:Lm}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:Lm}toISOTime(t){return this.isValid?`${this.s.toISOTime(t)}/${this.e.toISOTime(t)}`:Lm}toFormat(t,{separator:n=" – "}={}){return this.isValid?`${this.s.toFormat(t)}${n}${this.e.toFormat(t)}`:Lm}toDuration(t,n){return this.isValid?this.e.diff(this.s,t,n):Vn.invalid(this.invalidReason)}mapEndpoints(t){return lo.fromDateTimes(t(this.s),t(this.e))}}class Uw{static hasDST(t=Qr.defaultZone){const n=yt.now().setZone(t).set({month:12});return!t.isUniversal&&n.offset!==n.set({month:6}).offset}static isValidIANAZone(t){return kd.isValidZone(t)}static normalizeZone(t){return bf(t,Qr.defaultZone)}static getStartOfWeek({locale:t=null,locObj:n=null}={}){return(n||lr.create(t)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:t=null,locObj:n=null}={}){return(n||lr.create(t)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:t=null,locObj:n=null}={}){return(n||lr.create(t)).getWeekendDays().slice()}static months(t="long",{locale:n=null,numberingSystem:r=null,locObj:o=null,outputCalendar:i="gregory"}={}){return(o||lr.create(n,r,i)).months(t)}static monthsFormat(t="long",{locale:n=null,numberingSystem:r=null,locObj:o=null,outputCalendar:i="gregory"}={}){return(o||lr.create(n,r,i)).months(t,!0)}static weekdays(t="long",{locale:n=null,numberingSystem:r=null,locObj:o=null}={}){return(o||lr.create(n,r,null)).weekdays(t)}static weekdaysFormat(t="long",{locale:n=null,numberingSystem:r=null,locObj:o=null}={}){return(o||lr.create(n,r,null)).weekdays(t,!0)}static meridiems({locale:t=null}={}){return lr.create(t).meridiems()}static eras(t="short",{locale:n=null}={}){return lr.create(n,null,"gregory").eras(t)}static features(){return{relative:xce(),localeWeek:Sce()}}}function vK(e,t){const n=o=>o.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),r=n(t)-n(e);return Math.floor(Vn.fromMillis(r).as("days"))}function Oyt(e,t,n){const r=[["years",(l,c)=>c.year-l.year],["quarters",(l,c)=>c.quarter-l.quarter+(c.year-l.year)*4],["months",(l,c)=>c.month-l.month+(c.year-l.year)*12],["weeks",(l,c)=>{const u=vK(l,c);return(u-u%7)/7}],["days",vK]],o={},i=e;let a,s;for(const[l,c]of r)n.indexOf(l)>=0&&(a=l,o[l]=c(e,t),s=i.plus(o),s>t?(o[l]--,e=i.plus(o),e>t&&(s=e,o[l]--,e=i.plus(o))):e=s);return[e,o,s,a]}function Ayt(e,t,n,r){let[o,i,a,s]=Oyt(e,t,n);const l=t-o,c=n.filter(d=>["hours","minutes","seconds","milliseconds"].indexOf(d)>=0);c.length===0&&(a0?Vn.fromMillis(l,r).shiftTo(...c).plus(u):u}const kyt="missing Intl.DateTimeFormat.formatToParts support";function tr(e,t=n=>n){return{regex:e,deser:([n])=>t(bmt(n))}}const Myt=" ",Bce=`[ ${Myt}]`,zce=new RegExp(Bce,"g");function Ryt(e){return e.replace(/\./g,"\\.?").replace(zce,Bce)}function bK(e){return e.replace(/\./g,"").replace(zce," ").toLowerCase()}function ec(e,t){return e===null?null:{regex:RegExp(e.map(Ryt).join("|")),deser:([n])=>e.findIndex(r=>bK(n)===bK(r))+t}}function wK(e,t){return{regex:e,deser:([,n,r])=>bM(n,r),groups:t}}function fP(e){return{regex:e,deser:([t])=>t}}function $yt(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function Dyt(e,t){const n=Zl(t),r=Zl(t,"{2}"),o=Zl(t,"{3}"),i=Zl(t,"{4}"),a=Zl(t,"{6}"),s=Zl(t,"{1,2}"),l=Zl(t,"{1,3}"),c=Zl(t,"{1,6}"),u=Zl(t,"{1,9}"),d=Zl(t,"{2,4}"),f=Zl(t,"{4,6}"),p=y=>({regex:RegExp($yt(y.val)),deser:([w])=>w,literal:!0}),m=(y=>{if(e.literal)return p(y);switch(y.val){case"G":return ec(t.eras("short"),0);case"GG":return ec(t.eras("long"),0);case"y":return tr(c);case"yy":return tr(d,yF);case"yyyy":return tr(i);case"yyyyy":return tr(f);case"yyyyyy":return tr(a);case"M":return tr(s);case"MM":return tr(r);case"MMM":return ec(t.months("short",!0),1);case"MMMM":return ec(t.months("long",!0),1);case"L":return tr(s);case"LL":return tr(r);case"LLL":return ec(t.months("short",!1),1);case"LLLL":return ec(t.months("long",!1),1);case"d":return tr(s);case"dd":return tr(r);case"o":return tr(l);case"ooo":return tr(o);case"HH":return tr(r);case"H":return tr(s);case"hh":return tr(r);case"h":return tr(s);case"mm":return tr(r);case"m":return tr(s);case"q":return tr(s);case"qq":return tr(r);case"s":return tr(s);case"ss":return tr(r);case"S":return tr(l);case"SSS":return tr(o);case"u":return fP(u);case"uu":return fP(s);case"uuu":return tr(n);case"a":return ec(t.meridiems(),0);case"kkkk":return tr(i);case"kk":return tr(d,yF);case"W":return tr(s);case"WW":return tr(r);case"E":case"c":return tr(n);case"EEE":return ec(t.weekdays("short",!1),1);case"EEEE":return ec(t.weekdays("long",!1),1);case"ccc":return ec(t.weekdays("short",!0),1);case"cccc":return ec(t.weekdays("long",!0),1);case"Z":case"ZZ":return wK(new RegExp(`([+-]${s.source})(?::(${r.source}))?`),2);case"ZZZ":return wK(new RegExp(`([+-]${s.source})(${r.source})?`),2);case"z":return fP(/[a-z_+-/]{1,256}?/i);case" ":return fP(/[^\S\n\r]/);default:return p(y)}})(e)||{invalidReason:kyt};return m.token=e,m}const _yt={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour12:{numeric:"h","2-digit":"hh"},hour24:{numeric:"H","2-digit":"HH"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"},timeZoneName:{long:"ZZZZZ",short:"ZZZ"}};function Nyt(e,t,n){const{type:r,value:o}=e;if(r==="literal"){const l=/^\s+$/.test(o);return{literal:!l,val:l?" ":o}}const i=t[r];let a=r;r==="hour"&&(t.hour12!=null?a=t.hour12?"hour12":"hour24":t.hourCycle!=null?t.hourCycle==="h11"||t.hourCycle==="h12"?a="hour12":a="hour24":a=n.hour12?"hour12":"hour24");let s=_yt[a];if(typeof s=="object"&&(s=s[i]),s)return{literal:!1,val:s}}function Lyt(e){return[`^${e.map(n=>n.regex).reduce((n,r)=>`${n}(${r.source})`,"")}$`,e]}function Fyt(e,t,n){const r=e.match(t);if(r){const o={};let i=1;for(const a in n)if(sb(n,a)){const s=n[a],l=s.groups?s.groups+1:1;!s.literal&&s.token&&(o[s.token.val[0]]=s.deser(r.slice(i,i+l))),i+=l}return[r,o]}else return[r,{}]}function jyt(e){const t=i=>{switch(i){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}};let n=null,r;return rn(e.z)||(n=kd.create(e.z)),rn(e.Z)||(n||(n=new oa(e.Z)),r=e.Z),rn(e.q)||(e.M=(e.q-1)*3+1),rn(e.h)||(e.h<12&&e.a===1?e.h+=12:e.h===12&&e.a===0&&(e.h=0)),e.G===0&&e.y&&(e.y=-e.y),rn(e.u)||(e.S=ZV(e.u)),[Object.keys(e).reduce((i,a)=>{const s=t(a);return s&&(i[s]=e[a]),i},{}),n,r]}let qD=null;function Byt(){return qD||(qD=yt.fromMillis(1555555555555)),qD}function zyt(e,t){if(e.literal)return e;const n=pc.macroTokenToFormatOpts(e.val),r=Wce(n,t);return r==null||r.includes(void 0)?e:r}function Vce(e,t){return Array.prototype.concat(...e.map(n=>zyt(n,t)))}class Hce{constructor(t,n){if(this.locale=t,this.format=n,this.tokens=Vce(pc.parseFormat(n),t),this.units=this.tokens.map(r=>Dyt(r,t)),this.disqualifyingUnit=this.units.find(r=>r.invalidReason),!this.disqualifyingUnit){const[r,o]=Lyt(this.units);this.regex=RegExp(r,"i"),this.handlers=o}}explainFromTokens(t){if(this.isValid){const[n,r]=Fyt(t,this.regex,this.handlers),[o,i,a]=r?jyt(r):[null,null,void 0];if(sb(r,"a")&&sb(r,"H"))throw new Ey("Can't include meridiem when specifying 24-hour format");return{input:t,tokens:this.tokens,regex:this.regex,rawMatches:n,matches:r,result:o,zone:i,specificOffset:a}}else return{input:t,tokens:this.tokens,invalidReason:this.invalidReason}}get isValid(){return!this.disqualifyingUnit}get invalidReason(){return this.disqualifyingUnit?this.disqualifyingUnit.invalidReason:null}}function Uce(e,t,n){return new Hce(e,n).explainFromTokens(t)}function Vyt(e,t,n){const{result:r,zone:o,specificOffset:i,invalidReason:a}=Uce(e,t,n);return[r,o,i,a]}function Wce(e,t){if(!e)return null;const r=pc.create(t,e).dtFormatter(Byt()),o=r.formatToParts(),i=r.resolvedOptions();return o.map(a=>Nyt(a,e,i))}const KD="Invalid DateTime",xK=864e13;function Ww(e){return new gc("unsupported zone",`the zone "${e.name}" is not supported`)}function YD(e){return e.weekData===null&&(e.weekData=yO(e.c)),e.weekData}function QD(e){return e.localWeekData===null&&(e.localWeekData=yO(e.c,e.loc.getMinDaysInFirstWeek(),e.loc.getStartOfWeek())),e.localWeekData}function ph(e,t){const n={ts:e.ts,zone:e.zone,c:e.c,o:e.o,loc:e.loc,invalid:e.invalid};return new yt({...n,...t,old:n})}function Gce(e,t,n){let r=e-t*60*1e3;const o=n.offset(r);if(t===o)return[r,t];r-=(o-t)*60*1e3;const i=n.offset(r);return o===i?[r,o]:[e-Math.min(o,i)*60*1e3,Math.max(o,i)]}function pP(e,t){e+=t*60*1e3;const n=new Date(e);return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:n.getUTCHours(),minute:n.getUTCMinutes(),second:n.getUTCSeconds(),millisecond:n.getUTCMilliseconds()}}function rT(e,t,n){return Gce(vM(e),t,n)}function SK(e,t){const n=e.o,r=e.c.year+Math.trunc(t.years),o=e.c.month+Math.trunc(t.months)+Math.trunc(t.quarters)*3,i={...e.c,year:r,month:o,day:Math.min(e.c.day,vO(r,o))+Math.trunc(t.days)+Math.trunc(t.weeks)*7},a=Vn.fromObject({years:t.years-Math.trunc(t.years),quarters:t.quarters-Math.trunc(t.quarters),months:t.months-Math.trunc(t.months),weeks:t.weeks-Math.trunc(t.weeks),days:t.days-Math.trunc(t.days),hours:t.hours,minutes:t.minutes,seconds:t.seconds,milliseconds:t.milliseconds}).as("milliseconds"),s=vM(i);let[l,c]=Gce(s,n,e.zone);return a!==0&&(l+=a,c=e.zone.offset(l)),{ts:l,o:c}}function Fm(e,t,n,r,o,i){const{setZone:a,zone:s}=n;if(e&&Object.keys(e).length!==0||t){const l=t||s,c=yt.fromObject(e,{...n,zone:l,specificOffset:i});return a?c:c.setZone(s)}else return yt.invalid(new gc("unparsable",`the input "${o}" can't be parsed as ${r}`))}function hP(e,t,n=!0){return e.isValid?pc.create(lr.create("en-US"),{allowZ:n,forceSimple:!0}).formatDateTimeFromString(e,t):null}function XD(e,t){const n=e.c.year>9999||e.c.year<0;let r="";return n&&e.c.year>=0&&(r+="+"),r+=Co(e.c.year,n?6:4),t?(r+="-",r+=Co(e.c.month),r+="-",r+=Co(e.c.day)):(r+=Co(e.c.month),r+=Co(e.c.day)),r}function CK(e,t,n,r,o,i){let a=Co(e.c.hour);return t?(a+=":",a+=Co(e.c.minute),(e.c.millisecond!==0||e.c.second!==0||!n)&&(a+=":")):a+=Co(e.c.minute),(e.c.millisecond!==0||e.c.second!==0||!n)&&(a+=Co(e.c.second),(e.c.millisecond!==0||!r)&&(a+=".",a+=Co(e.c.millisecond,3))),o&&(e.isOffsetFixed&&e.offset===0&&!i?a+="Z":e.o<0?(a+="-",a+=Co(Math.trunc(-e.o/60)),a+=":",a+=Co(Math.trunc(-e.o%60))):(a+="+",a+=Co(Math.trunc(e.o/60)),a+=":",a+=Co(Math.trunc(e.o%60)))),i&&(a+="["+e.zone.ianaName+"]"),a}const qce={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},Hyt={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},Uyt={ordinal:1,hour:0,minute:0,second:0,millisecond:0},Kce=["year","month","day","hour","minute","second","millisecond"],Wyt=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],Gyt=["year","ordinal","hour","minute","second","millisecond"];function qyt(e){const t={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[e.toLowerCase()];if(!t)throw new Yle(e);return t}function EK(e){switch(e.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return qyt(e)}}function Kyt(e){return iT[e]||(oT===void 0&&(oT=Qr.now()),iT[e]=e.offset(oT)),iT[e]}function PK(e,t){const n=bf(t.zone,Qr.defaultZone);if(!n.isValid)return yt.invalid(Ww(n));const r=lr.fromObject(t);let o,i;if(rn(e.year))o=Qr.now();else{for(const l of Kce)rn(e[l])&&(e[l]=qce[l]);const a=bce(e)||wce(e);if(a)return yt.invalid(a);const s=Kyt(n);[o,i]=rT(e,s,n)}return new yt({ts:o,zone:n,loc:r,o:i})}function TK(e,t,n){const r=rn(n.round)?!0:n.round,o=(a,s)=>(a=eH(a,r||n.calendary?0:2,!0),t.loc.clone(n).relFormatter(n).format(a,s)),i=a=>n.calendary?t.hasSame(e,a)?0:t.startOf(a).diff(e.startOf(a),a).get(a):t.diff(e,a).get(a);if(n.unit)return o(i(n.unit),n.unit);for(const a of n.units){const s=i(a);if(Math.abs(s)>=1)return o(s,a)}return o(e>t?-0:0,n.units[n.units.length-1])}function IK(e){let t={},n;return e.length>0&&typeof e[e.length-1]=="object"?(t=e[e.length-1],n=Array.from(e).slice(0,e.length-1)):n=Array.from(e),[t,n]}let oT,iT={};class yt{constructor(t){const n=t.zone||Qr.defaultZone;let r=t.invalid||(Number.isNaN(t.ts)?new gc("invalid input"):null)||(n.isValid?null:Ww(n));this.ts=rn(t.ts)?Qr.now():t.ts;let o=null,i=null;if(!r)if(t.old&&t.old.ts===this.ts&&t.old.zone.equals(n))[o,i]=[t.old.c,t.old.o];else{const s=Yf(t.o)&&!t.old?t.o:n.offset(this.ts);o=pP(this.ts,s),r=Number.isNaN(o.year)?new gc("invalid input"):null,o=r?null:o,i=r?null:s}this._zone=n,this.loc=t.loc||lr.create(),this.invalid=r,this.weekData=null,this.localWeekData=null,this.c=o,this.o=i,this.isLuxonDateTime=!0}static now(){return new yt({})}static local(){const[t,n]=IK(arguments),[r,o,i,a,s,l,c]=n;return PK({year:r,month:o,day:i,hour:a,minute:s,second:l,millisecond:c},t)}static utc(){const[t,n]=IK(arguments),[r,o,i,a,s,l,c]=n;return t.zone=oa.utcInstance,PK({year:r,month:o,day:i,hour:a,minute:s,second:l,millisecond:c},t)}static fromJSDate(t,n={}){const r=Emt(t)?t.valueOf():NaN;if(Number.isNaN(r))return yt.invalid("invalid input");const o=bf(n.zone,Qr.defaultZone);return o.isValid?new yt({ts:r,zone:o,loc:lr.fromObject(n)}):yt.invalid(Ww(o))}static fromMillis(t,n={}){if(Yf(t))return t<-xK||t>xK?yt.invalid("Timestamp out of range"):new yt({ts:t,zone:bf(n.zone,Qr.defaultZone),loc:lr.fromObject(n)});throw new Ai(`fromMillis requires a numerical input, but received a ${typeof t} with value ${t}`)}static fromSeconds(t,n={}){if(Yf(t))return new yt({ts:t*1e3,zone:bf(n.zone,Qr.defaultZone),loc:lr.fromObject(n)});throw new Ai("fromSeconds requires a numerical input")}static fromObject(t,n={}){t=t||{};const r=bf(n.zone,Qr.defaultZone);if(!r.isValid)return yt.invalid(Ww(r));const o=lr.fromObject(n),i=bO(t,EK),{minDaysInFirstWeek:a,startOfWeek:s}=dK(i,o),l=Qr.now(),c=rn(n.specificOffset)?r.offset(l):n.specificOffset,u=!rn(i.ordinal),d=!rn(i.year),f=!rn(i.month)||!rn(i.day),p=d||f,h=i.weekYear||i.weekNumber;if((p||u)&&h)throw new Ey("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(f&&u)throw new Ey("Can't mix ordinal dates with month/day");const m=h||i.weekday&&!p;let y,w,x=pP(l,c);m?(y=Wyt,w=Hyt,x=yO(x,a,s)):u?(y=Gyt,w=Uyt,x=GD(x)):(y=Kce,w=qce);let C=!1;for(const O of y){const $=i[O];rn($)?C?i[O]=w[O]:i[O]=x[O]:C=!0}const E=m?xmt(i,a,s):u?Smt(i):bce(i),P=E||wce(i);if(P)return yt.invalid(P);const T=m?cK(i,a,s):u?uK(i):i,[I,A]=rT(T,c,r),k=new yt({ts:I,zone:r,o:A,loc:o});return i.weekday&&p&&t.weekday!==k.weekday?yt.invalid("mismatched weekday",`you can't specify both a weekday of ${i.weekday} and a date of ${k.toISO()}`):k.isValid?k:yt.invalid(k.invalid)}static fromISO(t,n={}){const[r,o]=pyt(t);return Fm(r,o,n,"ISO 8601",t)}static fromRFC2822(t,n={}){const[r,o]=hyt(t);return Fm(r,o,n,"RFC 2822",t)}static fromHTTP(t,n={}){const[r,o]=gyt(t);return Fm(r,o,n,"HTTP",n)}static fromFormat(t,n,r={}){if(rn(t)||rn(n))throw new Ai("fromFormat requires an input string and a format");const{locale:o=null,numberingSystem:i=null}=r,a=lr.fromOpts({locale:o,numberingSystem:i,defaultToEN:!0}),[s,l,c,u]=Vyt(a,t,n);return u?yt.invalid(u):Fm(s,l,r,`format ${n}`,t,c)}static fromString(t,n,r={}){return yt.fromFormat(t,n,r)}static fromSQL(t,n={}){const[r,o]=Syt(t);return Fm(r,o,n,"SQL",t)}static invalid(t,n=null){if(!t)throw new Ai("need to specify a reason the DateTime is invalid");const r=t instanceof gc?t:new gc(t,n);if(Qr.throwOnInvalid)throw new Kgt(r);return new yt({invalid:r})}static isDateTime(t){return t&&t.isLuxonDateTime||!1}static parseFormatForOpts(t,n={}){const r=Wce(t,lr.fromObject(n));return r?r.map(o=>o?o.val:null).join(""):null}static expandFormat(t,n={}){return Vce(pc.parseFormat(t),lr.fromObject(n)).map(o=>o.val).join("")}static resetCache(){oT=void 0,iT={}}get(t){return this[t]}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?YD(this).weekYear:NaN}get weekNumber(){return this.isValid?YD(this).weekNumber:NaN}get weekday(){return this.isValid?YD(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?QD(this).weekday:NaN}get localWeekNumber(){return this.isValid?QD(this).weekNumber:NaN}get localWeekYear(){return this.isValid?QD(this).weekYear:NaN}get ordinal(){return this.isValid?GD(this.c).ordinal:NaN}get monthShort(){return this.isValid?Uw.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?Uw.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?Uw.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?Uw.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return this.isOffsetFixed?!1:this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset}getPossibleOffsets(){if(!this.isValid||this.isOffsetFixed)return[this];const t=864e5,n=6e4,r=vM(this.c),o=this.zone.offset(r-t),i=this.zone.offset(r+t),a=this.zone.offset(r-o*n),s=this.zone.offset(r-i*n);if(a===s)return[this];const l=r-a*n,c=r-s*n,u=pP(l,a),d=pP(c,s);return u.hour===d.hour&&u.minute===d.minute&&u.second===d.second&&u.millisecond===d.millisecond?[ph(this,{ts:l}),ph(this,{ts:c})]:[this]}get isInLeapYear(){return i1(this.year)}get daysInMonth(){return vO(this.year,this.month)}get daysInYear(){return this.isValid?Ky(this.year):NaN}get weeksInWeekYear(){return this.isValid?HS(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?HS(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(t={}){const{locale:n,numberingSystem:r,calendar:o}=pc.create(this.loc.clone(t),t).resolvedOptions(this);return{locale:n,numberingSystem:r,outputCalendar:o}}toUTC(t=0,n={}){return this.setZone(oa.instance(t),n)}toLocal(){return this.setZone(Qr.defaultZone)}setZone(t,{keepLocalTime:n=!1,keepCalendarTime:r=!1}={}){if(t=bf(t,Qr.defaultZone),t.equals(this.zone))return this;if(t.isValid){let o=this.ts;if(n||r){const i=t.offset(this.ts),a=this.toObject();[o]=rT(a,i,t)}return ph(this,{ts:o,zone:t})}else return yt.invalid(Ww(t))}reconfigure({locale:t,numberingSystem:n,outputCalendar:r}={}){const o=this.loc.clone({locale:t,numberingSystem:n,outputCalendar:r});return ph(this,{loc:o})}setLocale(t){return this.reconfigure({locale:t})}set(t){if(!this.isValid)return this;const n=bO(t,EK),{minDaysInFirstWeek:r,startOfWeek:o}=dK(n,this.loc),i=!rn(n.weekYear)||!rn(n.weekNumber)||!rn(n.weekday),a=!rn(n.ordinal),s=!rn(n.year),l=!rn(n.month)||!rn(n.day),c=s||l,u=n.weekYear||n.weekNumber;if((c||a)&&u)throw new Ey("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(l&&a)throw new Ey("Can't mix ordinal dates with month/day");let d;i?d=cK({...yO(this.c,r,o),...n},r,o):rn(n.ordinal)?(d={...this.toObject(),...n},rn(n.day)&&(d.day=Math.min(vO(d.year,d.month),d.day))):d=uK({...GD(this.c),...n});const[f,p]=rT(d,this.o,this.zone);return ph(this,{ts:f,o:p})}plus(t){if(!this.isValid)return this;const n=Vn.fromDurationLike(t);return ph(this,SK(this,n))}minus(t){if(!this.isValid)return this;const n=Vn.fromDurationLike(t).negate();return ph(this,SK(this,n))}startOf(t,{useLocaleWeeks:n=!1}={}){if(!this.isValid)return this;const r={},o=Vn.normalizeUnit(t);switch(o){case"years":r.month=1;case"quarters":case"months":r.day=1;case"weeks":case"days":r.hour=0;case"hours":r.minute=0;case"minutes":r.second=0;case"seconds":r.millisecond=0;break}if(o==="weeks")if(n){const i=this.loc.getStartOfWeek(),{weekday:a}=this;athis.valueOf(),s=a?this:t,l=a?t:this,c=Ayt(s,l,i,o);return a?c.negate():c}diffNow(t="milliseconds",n={}){return this.diff(yt.now(),t,n)}until(t){return this.isValid?lo.fromDateTimes(this,t):this}hasSame(t,n,r){if(!this.isValid)return!1;const o=t.valueOf(),i=this.setZone(t.zone,{keepLocalTime:!0});return i.startOf(n,r)<=o&&o<=i.endOf(n,r)}equals(t){return this.isValid&&t.isValid&&this.valueOf()===t.valueOf()&&this.zone.equals(t.zone)&&this.loc.equals(t.loc)}toRelative(t={}){if(!this.isValid)return null;const n=t.base||yt.fromObject({},{zone:this.zone}),r=t.padding?thisn.valueOf(),Math.min)}static max(...t){if(!t.every(yt.isDateTime))throw new Ai("max requires all arguments be DateTimes");return fK(t,n=>n.valueOf(),Math.max)}static fromFormatExplain(t,n,r={}){const{locale:o=null,numberingSystem:i=null}=r,a=lr.fromOpts({locale:o,numberingSystem:i,defaultToEN:!0});return Uce(a,t,n)}static fromStringExplain(t,n,r={}){return yt.fromFormatExplain(t,n,r)}static buildFormatParser(t,n={}){const{locale:r=null,numberingSystem:o=null}=n,i=lr.fromOpts({locale:r,numberingSystem:o,defaultToEN:!0});return new Hce(i,t)}static fromFormatParser(t,n,r={}){if(rn(t)||rn(n))throw new Ai("fromFormatParser requires an input string and a format parser");const{locale:o=null,numberingSystem:i=null}=r,a=lr.fromOpts({locale:o,numberingSystem:i,defaultToEN:!0});if(!a.equals(n.locale))throw new Ai(`fromFormatParser called with a locale of ${a}, but the format parser was created for ${n.locale}`);const{result:s,zone:l,specificOffset:c,invalidReason:u}=n.explainFromTokens(t);return u?yt.invalid(u):Fm(s,l,r,`format ${n.format}`,t,c)}static get DATE_SHORT(){return mO}static get DATE_MED(){return Qle}static get DATE_MED_WITH_WEEKDAY(){return Xgt}static get DATE_FULL(){return Xle}static get DATE_HUGE(){return Jle}static get TIME_SIMPLE(){return Zle}static get TIME_WITH_SECONDS(){return ece}static get TIME_WITH_SHORT_OFFSET(){return tce}static get TIME_WITH_LONG_OFFSET(){return nce}static get TIME_24_SIMPLE(){return rce}static get TIME_24_WITH_SECONDS(){return oce}static get TIME_24_WITH_SHORT_OFFSET(){return ice}static get TIME_24_WITH_LONG_OFFSET(){return ace}static get DATETIME_SHORT(){return sce}static get DATETIME_SHORT_WITH_SECONDS(){return lce}static get DATETIME_MED(){return cce}static get DATETIME_MED_WITH_SECONDS(){return uce}static get DATETIME_MED_WITH_WEEKDAY(){return Jgt}static get DATETIME_FULL(){return dce}static get DATETIME_FULL_WITH_SECONDS(){return fce}static get DATETIME_HUGE(){return pce}static get DATETIME_HUGE_WITH_SECONDS(){return hce}}function mw(e){if(yt.isDateTime(e))return e;if(e&&e.valueOf&&Yf(e.valueOf()))return yt.fromJSDate(e);if(e&&typeof e=="object")return yt.fromObject(e);throw new Ai(`Unknown datetime argument: ${e}, of type ${typeof e}`)}const Yyt={y:{sectionType:"year",contentType:"digit",maxLength:4},yy:"year",yyyy:{sectionType:"year",contentType:"digit",maxLength:4},L:{sectionType:"month",contentType:"digit",maxLength:2},LL:"month",LLL:{sectionType:"month",contentType:"letter"},LLLL:{sectionType:"month",contentType:"letter"},M:{sectionType:"month",contentType:"digit",maxLength:2},MM:"month",MMM:{sectionType:"month",contentType:"letter"},MMMM:{sectionType:"month",contentType:"letter"},d:{sectionType:"day",contentType:"digit",maxLength:2},dd:"day",c:{sectionType:"weekDay",contentType:"digit",maxLength:1},ccc:{sectionType:"weekDay",contentType:"letter"},cccc:{sectionType:"weekDay",contentType:"letter"},E:{sectionType:"weekDay",contentType:"digit",maxLength:2},EEE:{sectionType:"weekDay",contentType:"letter"},EEEE:{sectionType:"weekDay",contentType:"letter"},a:"meridiem",H:{sectionType:"hours",contentType:"digit",maxLength:2},HH:"hours",h:{sectionType:"hours",contentType:"digit",maxLength:2},hh:"hours",m:{sectionType:"minutes",contentType:"digit",maxLength:2},mm:"minutes",s:{sectionType:"seconds",contentType:"digit",maxLength:2},ss:"seconds"},Qyt={year:"yyyy",month:"LLLL",monthShort:"MMM",dayOfMonth:"d",dayOfMonthFull:"d",weekday:"cccc",weekdayShort:"ccccc",hours24h:"HH",hours12h:"hh",meridiem:"a",minutes:"mm",seconds:"ss",fullDate:"DD",keyboardDate:"D",shortDate:"MMM d",normalDate:"d MMMM",normalDateWithWeekday:"EEE, MMM d",fullTime:"t",fullTime12h:"hh:mm a",fullTime24h:"HH:mm",keyboardDateTime:"D t",keyboardDateTime12h:"D hh:mm a",keyboardDateTime24h:"D T"};class lb{constructor({locale:t,formats:n}={}){this.isMUIAdapter=!0,this.isTimezoneCompatible=!0,this.lib="luxon",this.locale=void 0,this.formats=void 0,this.escapedCharacters={start:"'",end:"'"},this.formatTokenMap=Yyt,this.setLocaleToValue=r=>{const o=this.getCurrentLocaleCode();return o===r.locale?r:r.setLocale(o)},this.date=(r,o="default")=>r===null?null:typeof r>"u"?yt.fromJSDate(new Date,{locale:this.locale,zone:o}):yt.fromISO(r,{locale:this.locale,zone:o}),this.getInvalidDate=()=>yt.fromJSDate(new Date("Invalid Date")),this.getTimezone=r=>r.zone.type==="system"?"system":r.zoneName,this.setTimezone=(r,o)=>r.zone.equals(Uw.normalizeZone(o))?r:r.setZone(o),this.toJsDate=r=>r.toJSDate(),this.parse=(r,o)=>r===""?null:yt.fromFormat(r,o,{locale:this.locale}),this.getCurrentLocaleCode=()=>this.locale,this.is12HourCycleInCurrentLocale=()=>{var r,o;return typeof Intl>"u"||typeof Intl.DateTimeFormat>"u"?!0:!!((o=(r=new Intl.DateTimeFormat(this.locale,{hour:"numeric"}))==null?void 0:r.resolvedOptions())!=null&&o.hour12)},this.expandFormat=r=>{const o=/''|'(''|[^'])+('|$)|[^']*/g,i=[...Object.keys(this.formatTokenMap),"yyyyy"],a=new RegExp(`^(${i.join("|")})+$`),s=/(?:^|[^a-z])([a-z]+)(?:[^a-z]|$)|([a-z]+)/gi;return r.match(o).map(l=>l[0]==="'"?l:yt.expandFormat(l,{locale:this.locale}).replace(s,(d,f,p)=>{const h=f||p;return a.test(h)?d:`'${d}'`})).join("").replace("yyyyy","yyyy")},this.isValid=r=>r===null?!1:r.isValid,this.format=(r,o)=>this.formatByString(r,this.formats[o]),this.formatByString=(r,o)=>r.setLocale(this.locale).toFormat(o),this.formatNumber=r=>r,this.isEqual=(r,o)=>r===null&&o===null?!0:r===null||o===null?!1:+r==+o,this.isSameYear=(r,o)=>{const i=this.setTimezone(o,this.getTimezone(r));return r.hasSame(i,"year")},this.isSameMonth=(r,o)=>{const i=this.setTimezone(o,this.getTimezone(r));return r.hasSame(i,"month")},this.isSameDay=(r,o)=>{const i=this.setTimezone(o,this.getTimezone(r));return r.hasSame(i,"day")},this.isSameHour=(r,o)=>{const i=this.setTimezone(o,this.getTimezone(r));return r.hasSame(i,"hour")},this.isAfter=(r,o)=>r>o,this.isAfterYear=(r,o)=>{const i=this.setTimezone(o,this.getTimezone(r));return r.diff(this.endOfYear(i),"years").toObject().years>0},this.isAfterDay=(r,o)=>{const i=this.setTimezone(o,this.getTimezone(r));return r.diff(this.endOfDay(i),"days").toObject().days>0},this.isBefore=(r,o)=>r{const i=this.setTimezone(o,this.getTimezone(r));return r.diff(this.startOfYear(i),"years").toObject().years<0},this.isBeforeDay=(r,o)=>{const i=this.setTimezone(o,this.getTimezone(r));return r.diff(this.startOfDay(i),"days").toObject().days<0},this.isWithinRange=(r,[o,i])=>this.isEqual(r,o)||this.isEqual(r,i)||this.isAfter(r,o)&&this.isBefore(r,i),this.startOfYear=r=>r.startOf("year"),this.startOfMonth=r=>r.startOf("month"),this.startOfWeek=r=>this.setLocaleToValue(r).startOf("week",{useLocaleWeeks:!0}),this.startOfDay=r=>r.startOf("day"),this.endOfYear=r=>r.endOf("year"),this.endOfMonth=r=>r.endOf("month"),this.endOfWeek=r=>this.setLocaleToValue(r).endOf("week",{useLocaleWeeks:!0}),this.endOfDay=r=>r.endOf("day"),this.addYears=(r,o)=>r.plus({years:o}),this.addMonths=(r,o)=>r.plus({months:o}),this.addWeeks=(r,o)=>r.plus({weeks:o}),this.addDays=(r,o)=>r.plus({days:o}),this.addHours=(r,o)=>r.plus({hours:o}),this.addMinutes=(r,o)=>r.plus({minutes:o}),this.addSeconds=(r,o)=>r.plus({seconds:o}),this.getYear=r=>r.get("year"),this.getMonth=r=>r.get("month")-1,this.getDate=r=>r.get("day"),this.getHours=r=>r.get("hour"),this.getMinutes=r=>r.get("minute"),this.getSeconds=r=>r.get("second"),this.getMilliseconds=r=>r.get("millisecond"),this.setYear=(r,o)=>r.set({year:o}),this.setMonth=(r,o)=>r.set({month:o+1}),this.setDate=(r,o)=>r.set({day:o}),this.setHours=(r,o)=>r.set({hour:o}),this.setMinutes=(r,o)=>r.set({minute:o}),this.setSeconds=(r,o)=>r.set({second:o}),this.setMilliseconds=(r,o)=>r.set({millisecond:o}),this.getDaysInMonth=r=>r.daysInMonth,this.getWeekArray=r=>{const o=this.startOfWeek(this.startOfMonth(r)),i=this.endOfWeek(this.endOfMonth(r)),{days:a}=i.diff(o,"days").toObject(),s=[];return new Array(Math.round(a)).fill(0).map((l,c)=>c).map(l=>o.plus({days:l})).forEach((l,c)=>{if(c===0||c%7===0&&c>6){s.push([l]);return}s[s.length-1].push(l)}),s},this.getWeekNumber=r=>r.localWeekNumber??r.weekNumber,this.getDayOfWeek=r=>r.weekday,this.getYearRange=([r,o])=>{const i=this.startOfYear(r),a=this.endOfYear(o),s=[];let l=i;for(;this.isBefore(l,a);)s.push(l),l=this.addYears(l,1);return s},this.locale=t||"en-US",this.formats=ue({},Qyt,n)}}const oH=ct(R.jsx("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14"}),"Search");function iH({callback:e,initialIngredient:t}){const n=t?{value:t,data:{id:-1,name:t,image:null,image_thumbnail:null}}:null,[r,o]=v.useState(!0),[i,a]=v.useState(n),[s,l]=v.useState(""),[c,u]=v.useState([]),[d,f]=Le(),p=v.useMemo(()=>Fk(h=>tje(h,f.language,r).then(m=>u(m)),200),[f.language,r]);return v.useEffect(()=>{if(s===""){u(i?[i]:[]);return}return p(s),()=>{}},[i,s,p]),K(Wt,{children:[b(Ic,{id:"ingredient-autocomplete",getOptionLabel:h=>h.value,"data-testid":"autocomplete",filterOptions:h=>h,options:c,autoComplete:!0,includeInputInList:!0,filterSelectedOptions:!0,value:i,noOptionsText:d("noResults"),isOptionEqualToValue:(h,m)=>h.value===m.value,onChange:(h,m)=>{u(m?[m,...c]:c),a(m),e(m)},onInputChange:(h,m)=>{l(m)},renderInput:h=>b(nn,{...h,label:d("nutrition.searchIngredientName"),fullWidth:!0,InputProps:{...h.InputProps,startAdornment:K(wt,{children:[b(So,{position:"start",children:b(oH,{})}),h.InputProps.startAdornment]})}}),renderOption:(h,m)=>cZ("li",{...h,key:`ingredient-${m.data.id}`},K(Ps,{disablePadding:!0,component:"div",children:[b(aa,{children:b(Oc,{alt:"",src:`${fz}${m.data.image}`,variant:"rounded",children:b(Rd,{})})}),b(Ao,{primary:m.value,primaryTypographyProps:{style:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}}})]}))}),f.language!==Ov&&b(sk,{children:b(Td,{control:b(Fl,{checked:r,onChange:(h,m)=>o(m)}),label:d("alsoSearchEnglish")})})]})}var Xyt=function(t){return Jyt(t)&&!Zyt(t)};function Jyt(e){return!!e&&typeof e=="object"}function Zyt(e){var t=Object.prototype.toString.call(e);return t==="[object RegExp]"||t==="[object Date]"||nvt(e)}var evt=typeof Symbol=="function"&&Symbol.for,tvt=evt?Symbol.for("react.element"):60103;function nvt(e){return e.$$typeof===tvt}function rvt(e){return Array.isArray(e)?[]:{}}function wO(e,t){return t.clone!==!1&&t.isMergeableObject(e)?US(rvt(e),e,t):e}function ovt(e,t,n){return e.concat(t).map(function(r){return wO(r,n)})}function ivt(e,t,n){var r={};return n.isMergeableObject(e)&&Object.keys(e).forEach(function(o){r[o]=wO(e[o],n)}),Object.keys(t).forEach(function(o){!n.isMergeableObject(t[o])||!e[o]?r[o]=wO(t[o],n):r[o]=US(e[o],t[o],n)}),r}function US(e,t,n){n=n||{},n.arrayMerge=n.arrayMerge||ovt,n.isMergeableObject=n.isMergeableObject||Xyt;var r=Array.isArray(t),o=Array.isArray(e),i=r===o;return i?r?n.arrayMerge(e,t,n):ivt(e,t,n):wO(t,n)}US.all=function(t,n){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(r,o){return US(r,o,n)},{})};var vF=US,Yce=typeof global=="object"&&global&&global.Object===Object&&global,avt=typeof self=="object"&&self&&self.Object===Object&&self,Iu=Yce||avt||Function("return this")(),dp=Iu.Symbol,Qce=Object.prototype,svt=Qce.hasOwnProperty,lvt=Qce.toString,yw=dp?dp.toStringTag:void 0;function cvt(e){var t=svt.call(e,yw),n=e[yw];try{e[yw]=void 0;var r=!0}catch{}var o=lvt.call(e);return r&&(t?e[yw]=n:delete e[yw]),o}var uvt=Object.prototype,dvt=uvt.toString;function fvt(e){return dvt.call(e)}var pvt="[object Null]",hvt="[object Undefined]",OK=dp?dp.toStringTag:void 0;function Wg(e){return e==null?e===void 0?hvt:pvt:OK&&OK in Object(e)?cvt(e):fvt(e)}function Xce(e,t){return function(n){return e(t(n))}}var aH=Xce(Object.getPrototypeOf,Object);function Gg(e){return e!=null&&typeof e=="object"}var gvt="[object Object]",mvt=Function.prototype,yvt=Object.prototype,Jce=mvt.toString,vvt=yvt.hasOwnProperty,bvt=Jce.call(Object);function AK(e){if(!Gg(e)||Wg(e)!=gvt)return!1;var t=aH(e);if(t===null)return!0;var n=vvt.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&Jce.call(n)==bvt}function wvt(){this.__data__=[],this.size=0}function Zce(e,t){return e===t||e!==e&&t!==t}function xM(e,t){for(var n=e.length;n--;)if(Zce(e[n][0],t))return n;return-1}var xvt=Array.prototype,Svt=xvt.splice;function Cvt(e){var t=this.__data__,n=xM(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():Svt.call(t,n,1),--this.size,!0}function Evt(e){var t=this.__data__,n=xM(t,e);return n<0?void 0:t[n][1]}function Pvt(e){return xM(this.__data__,e)>-1}function Tvt(e,t){var n=this.__data__,r=xM(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function Nd(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t-1&&e%1==0&&e-1&&e%1==0&&e<=Tbt}var Ibt="[object Arguments]",Obt="[object Array]",Abt="[object Boolean]",kbt="[object Date]",Mbt="[object Error]",Rbt="[object Function]",$bt="[object Map]",Dbt="[object Number]",_bt="[object Object]",Nbt="[object RegExp]",Lbt="[object Set]",Fbt="[object String]",jbt="[object WeakMap]",Bbt="[object ArrayBuffer]",zbt="[object DataView]",Vbt="[object Float32Array]",Hbt="[object Float64Array]",Ubt="[object Int8Array]",Wbt="[object Int16Array]",Gbt="[object Int32Array]",qbt="[object Uint8Array]",Kbt="[object Uint8ClampedArray]",Ybt="[object Uint16Array]",Qbt="[object Uint32Array]",Lr={};Lr[Vbt]=Lr[Hbt]=Lr[Ubt]=Lr[Wbt]=Lr[Gbt]=Lr[qbt]=Lr[Kbt]=Lr[Ybt]=Lr[Qbt]=!0;Lr[Ibt]=Lr[Obt]=Lr[Bbt]=Lr[Abt]=Lr[zbt]=Lr[kbt]=Lr[Mbt]=Lr[Rbt]=Lr[$bt]=Lr[Dbt]=Lr[_bt]=Lr[Nbt]=Lr[Lbt]=Lr[Fbt]=Lr[jbt]=!1;function Xbt(e){return Gg(e)&&aue(e.length)&&!!Lr[Wg(e)]}function sH(e){return function(t){return e(t)}}var sue=typeof ds=="object"&&ds&&!ds.nodeType&&ds,Cx=sue&&typeof fs=="object"&&fs&&!fs.nodeType&&fs,Jbt=Cx&&Cx.exports===sue,ZD=Jbt&&Yce.process,cb=function(){try{var e=Cx&&Cx.require&&Cx.require("util").types;return e||ZD&&ZD.binding&&ZD.binding("util")}catch{}}(),_K=cb&&cb.isTypedArray,Zbt=_K?sH(_K):Xbt,e0t=Object.prototype,t0t=e0t.hasOwnProperty;function lue(e,t){var n=c1(e),r=!n&&bbt(e),o=!n&&!r&&iue(e),i=!n&&!r&&!o&&Zbt(e),a=n||r||o||i,s=a?gbt(e.length,String):[],l=s.length;for(var c in e)(t||t0t.call(e,c))&&!(a&&(c=="length"||o&&(c=="offset"||c=="parent")||i&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||Pbt(c,l)))&&s.push(c);return s}var n0t=Object.prototype;function lH(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||n0t;return e===n}var r0t=Xce(Object.keys,Object),o0t=Object.prototype,i0t=o0t.hasOwnProperty;function a0t(e){if(!lH(e))return r0t(e);var t=[];for(var n in Object(e))i0t.call(e,n)&&n!="constructor"&&t.push(n);return t}function cue(e){return e!=null&&aue(e.length)&&!eue(e)}function cH(e){return cue(e)?lue(e):a0t(e)}function s0t(e,t){return e&&CM(t,cH(t),e)}function l0t(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var c0t=Object.prototype,u0t=c0t.hasOwnProperty;function d0t(e){if(!l1(e))return l0t(e);var t=lH(e),n=[];for(var r in e)r=="constructor"&&(t||!u0t.call(e,r))||n.push(r);return n}function uH(e){return cue(e)?lue(e,!0):d0t(e)}function f0t(e,t){return e&&CM(t,uH(t),e)}var uue=typeof ds=="object"&&ds&&!ds.nodeType&&ds,NK=uue&&typeof fs=="object"&&fs&&!fs.nodeType&&fs,p0t=NK&&NK.exports===uue,LK=p0t?Iu.Buffer:void 0,FK=LK?LK.allocUnsafe:void 0;function h0t(e,t){if(t)return e.slice();var n=e.length,r=FK?FK(n):new e.constructor(n);return e.copy(r),r}function due(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n=0)&&(n[o]=e[o]);return n}var EM=v.createContext(void 0);EM.displayName="FormikContext";var ext=EM.Provider;EM.Consumer;function Cue(){var e=v.useContext(EM);return e}var Zs=function(t){return typeof t=="function"},u1=function(t){return t!==null&&typeof t=="object"},txt=function(t){return String(Math.floor(Number(t)))===t},e_=function(t){return Object.prototype.toString.call(t)==="[object String]"},nxt=function(t){return v.Children.count(t)===0},t_=function(t){return u1(t)&&Zs(t.then)};function Qa(e,t,n,r){r===void 0&&(r=0);for(var o=xue(t);e&&r=0?[]:{}}}return(i===0?e:o)[a[i]]===n?e:(n===void 0?delete o[a[i]]:o[a[i]]=n,i===0&&n===void 0&&delete r[a[i]],r)}function Eue(e,t,n,r){n===void 0&&(n=new WeakMap),r===void 0&&(r={});for(var o=0,i=Object.keys(e);o0?Pe.map(function(Me){return O(Me,Qa(ye,Me))}):[Promise.resolve("DO_NOT_DELETE_YOU_WILL_BE_FIRED")];return Promise.all(Ae).then(function(Me){return Me.reduce(function(We,He,Xe){return He==="DO_NOT_DELETE_YOU_WILL_BE_FIRED"||He&&(We=ng(We,Pe[Xe],He)),We},{})})},[O]),N=v.useCallback(function(ye){return Promise.all([$(ye),f.validationSchema?k(ye):{},f.validate?A(ye):{}]).then(function(Pe){var Ae=Pe[0],Me=Pe[1],We=Pe[2],He=vF.all([Ae,Me,We],{arrayMerge:sxt});return He})},[f.validate,f.validationSchema,$,A,k]),L=Qs(function(ye){return ye===void 0&&(ye=T.values),I({type:"SET_ISVALIDATING",payload:!0}),N(ye).then(function(Pe){return w.current&&(I({type:"SET_ISVALIDATING",payload:!1}),I({type:"SET_ERRORS",payload:Pe})),Pe})});v.useEffect(function(){a&&w.current===!0&&Ph(p.current,f.initialValues)&&L(p.current)},[a,L]);var j=v.useCallback(function(ye){var Pe=ye&&ye.values?ye.values:p.current,Ae=ye&&ye.errors?ye.errors:h.current?h.current:f.initialErrors||{},Me=ye&&ye.touched?ye.touched:m.current?m.current:f.initialTouched||{},We=ye&&ye.status?ye.status:y.current?y.current:f.initialStatus;p.current=Pe,h.current=Ae,m.current=Me,y.current=We;var He=function(){I({type:"RESET_FORM",payload:{isSubmitting:!!ye&&!!ye.isSubmitting,errors:Ae,touched:Me,status:We,values:Pe,isValidating:!!ye&&!!ye.isValidating,submitCount:ye&&ye.submitCount&&typeof ye.submitCount=="number"?ye.submitCount:0}})};if(f.onReset){var Xe=f.onReset(T.values,ce);t_(Xe)?Xe.then(He):He()}else He()},[f.initialErrors,f.initialStatus,f.initialTouched,f.onReset]);v.useEffect(function(){w.current===!0&&!Ph(p.current,f.initialValues)&&c&&(p.current=f.initialValues,j(),a&&L(p.current))},[c,f.initialValues,j,a,L]),v.useEffect(function(){c&&w.current===!0&&!Ph(h.current,f.initialErrors)&&(h.current=f.initialErrors||hh,I({type:"SET_ERRORS",payload:f.initialErrors||hh}))},[c,f.initialErrors]),v.useEffect(function(){c&&w.current===!0&&!Ph(m.current,f.initialTouched)&&(m.current=f.initialTouched||mP,I({type:"SET_TOUCHED",payload:f.initialTouched||mP}))},[c,f.initialTouched]),v.useEffect(function(){c&&w.current===!0&&!Ph(y.current,f.initialStatus)&&(y.current=f.initialStatus,I({type:"SET_STATUS",payload:f.initialStatus}))},[c,f.initialStatus,f.initialTouched]);var D=Qs(function(ye){if(x.current[ye]&&Zs(x.current[ye].validate)){var Pe=Qa(T.values,ye),Ae=x.current[ye].validate(Pe);return t_(Ae)?(I({type:"SET_ISVALIDATING",payload:!0}),Ae.then(function(Me){return Me}).then(function(Me){I({type:"SET_FIELD_ERROR",payload:{field:ye,value:Me}}),I({type:"SET_ISVALIDATING",payload:!1})})):(I({type:"SET_FIELD_ERROR",payload:{field:ye,value:Ae}}),Promise.resolve(Ae))}else if(f.validationSchema)return I({type:"SET_ISVALIDATING",payload:!0}),k(T.values,ye).then(function(Me){return Me}).then(function(Me){I({type:"SET_FIELD_ERROR",payload:{field:ye,value:Qa(Me,ye)}}),I({type:"SET_ISVALIDATING",payload:!1})});return Promise.resolve()}),_=v.useCallback(function(ye,Pe){var Ae=Pe.validate;x.current[ye]={validate:Ae}},[]),z=v.useCallback(function(ye){delete x.current[ye]},[]),F=Qs(function(ye,Pe){I({type:"SET_TOUCHED",payload:ye});var Ae=Pe===void 0?o:Pe;return Ae?L(T.values):Promise.resolve()}),V=v.useCallback(function(ye){I({type:"SET_ERRORS",payload:ye})},[]),U=Qs(function(ye,Pe){var Ae=Zs(ye)?ye(T.values):ye;I({type:"SET_VALUES",payload:Ae});var Me=Pe===void 0?n:Pe;return Me?L(Ae):Promise.resolve()}),q=v.useCallback(function(ye,Pe){I({type:"SET_FIELD_ERROR",payload:{field:ye,value:Pe}})},[]),X=Qs(function(ye,Pe,Ae){I({type:"SET_FIELD_VALUE",payload:{field:ye,value:Pe}});var Me=Ae===void 0?n:Ae;return Me?L(ng(T.values,ye,Pe)):Promise.resolve()}),ie=v.useCallback(function(ye,Pe){var Ae=Pe,Me=ye,We;if(!e_(ye)){ye.persist&&ye.persist();var He=ye.target?ye.target:ye.currentTarget,Xe=He.type,ht=He.name,ot=He.id,et=He.value,St=He.checked,On=He.outerHTML,Ke=He.options,$e=He.multiple;Ae=Pe||ht||ot,Me=/number|range/.test(Xe)?(We=parseFloat(et),isNaN(We)?"":We):/checkbox/.test(Xe)?cxt(Qa(T.values,Ae),St,et):Ke&&$e?lxt(Ke):et}Ae&&X(Ae,Me)},[X,T.values]),ee=Qs(function(ye){if(e_(ye))return function(Pe){return ie(Pe,ye)};ie(ye)}),Q=Qs(function(ye,Pe,Ae){Pe===void 0&&(Pe=!0),I({type:"SET_FIELD_TOUCHED",payload:{field:ye,value:Pe}});var Me=Ae===void 0?o:Ae;return Me?L(T.values):Promise.resolve()}),te=v.useCallback(function(ye,Pe){ye.persist&&ye.persist();var Ae=ye.target,Me=Ae.name,We=Ae.id,He=Ae.outerHTML,Xe=Pe||Me||We;Q(Xe,!0)},[Q]),pe=Qs(function(ye){if(e_(ye))return function(Pe){return te(Pe,ye)};te(ye)}),ae=v.useCallback(function(ye){Zs(ye)?I({type:"SET_FORMIK_STATE",payload:ye}):I({type:"SET_FORMIK_STATE",payload:function(){return ye}})},[]),se=v.useCallback(function(ye){I({type:"SET_STATUS",payload:ye})},[]),re=v.useCallback(function(ye){I({type:"SET_ISSUBMITTING",payload:ye})},[]),fe=Qs(function(){return I({type:"SUBMIT_ATTEMPT"}),L().then(function(ye){var Pe=ye instanceof Error,Ae=!Pe&&Object.keys(ye).length===0;if(Ae){var Me;try{if(Me=ge(),Me===void 0)return}catch(We){throw We}return Promise.resolve(Me).then(function(We){return w.current&&I({type:"SUBMIT_SUCCESS"}),We}).catch(function(We){if(w.current)throw I({type:"SUBMIT_FAILURE"}),We})}else if(w.current&&(I({type:"SUBMIT_FAILURE"}),Pe))throw ye})}),Z=Qs(function(ye){ye&&ye.preventDefault&&Zs(ye.preventDefault)&&ye.preventDefault(),ye&&ye.stopPropagation&&Zs(ye.stopPropagation)&&ye.stopPropagation(),fe().catch(function(Pe){console.warn("Warning: An unhandled error was caught from submitForm()",Pe)})}),ce={resetForm:j,validateForm:L,validateField:D,setErrors:V,setFieldError:q,setFieldTouched:Q,setFieldValue:X,setStatus:se,setSubmitting:re,setTouched:F,setValues:U,setFormikState:ae,submitForm:fe},ge=Qs(function(){return u(T.values,ce)}),we=Qs(function(ye){ye&&ye.preventDefault&&Zs(ye.preventDefault)&&ye.preventDefault(),ye&&ye.stopPropagation&&Zs(ye.stopPropagation)&&ye.stopPropagation(),j()}),me=v.useCallback(function(ye){return{value:Qa(T.values,ye),error:Qa(T.errors,ye),touched:!!Qa(T.touched,ye),initialValue:Qa(p.current,ye),initialTouched:!!Qa(m.current,ye),initialError:Qa(h.current,ye)}},[T.errors,T.touched,T.values]),Se=v.useCallback(function(ye){return{setValue:function(Ae,Me){return X(ye,Ae,Me)},setTouched:function(Ae,Me){return Q(ye,Ae,Me)},setError:function(Ae){return q(ye,Ae)}}},[X,Q,q]),xe=v.useCallback(function(ye){var Pe=u1(ye),Ae=Pe?ye.name:ye,Me=Qa(T.values,Ae),We={name:Ae,value:Me,onChange:ee,onBlur:pe};if(Pe){var He=ye.type,Xe=ye.value,ht=ye.as,ot=ye.multiple;He==="checkbox"?Xe===void 0?We.checked=!!Me:(We.checked=!!(Array.isArray(Me)&&~Me.indexOf(Xe)),We.value=Xe):He==="radio"?(We.checked=Me===Xe,We.value=Xe):ht==="select"&&ot&&(We.value=We.value||[],We.multiple=!0)}return We},[pe,ee,T.values]),ke=v.useMemo(function(){return!Ph(p.current,T.values)},[p.current,T.values]),De=v.useMemo(function(){return typeof s<"u"?ke?T.errors&&Object.keys(T.errors).length===0:s!==!1&&Zs(s)?s(f):s:T.errors&&Object.keys(T.errors).length===0},[s,ke,T.errors,f]),_e=Yo({},T,{initialValues:p.current,initialErrors:h.current,initialTouched:m.current,initialStatus:y.current,handleBlur:pe,handleChange:ee,handleReset:we,handleSubmit:Z,resetForm:j,setErrors:V,setFormikState:ae,setFieldTouched:Q,setFieldValue:X,setFieldError:q,setStatus:se,setSubmitting:re,setTouched:F,setValues:U,submitForm:fe,validateForm:L,validateField:D,isValid:De,dirty:ke,unregisterField:z,registerField:_,getFieldProps:xe,getFieldMeta:me,getFieldHelpers:Se,validateOnBlur:o,validateOnChange:n,validateOnMount:a});return _e}function Ba(e){var t=oxt(e),n=e.component,r=e.children,o=e.render,i=e.innerRef;return v.useImperativeHandle(i,function(){return t}),v.createElement(ext,{value:t},n?v.createElement(n,t):o?o(t):r?Zs(r)?r(t):nxt(r)?null:v.Children.only(r):null)}function ixt(e){var t={};if(e.inner){if(e.inner.length===0)return ng(t,e.path,e.message);for(var o=e.inner,n=Array.isArray(o),r=0,o=n?o:o[Symbol.iterator]();;){var i;if(n){if(r>=o.length)break;i=o[r++]}else{if(r=o.next(),r.done)break;i=r.value}var a=i;Qa(t,a.path)||(t=ng(t,a.path,a.message))}}return t}function axt(e,t,n,r){n===void 0&&(n=!1);var o=EF(e);return t[n?"validateSync":"validate"](o,{abortEarly:!1,context:o})}function EF(e){var t=Array.isArray(e)?[]:{};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=String(n);Array.isArray(e[r])===!0?t[r]=e[r].map(function(o){return Array.isArray(o)===!0||AK(o)?EF(o):o!==""?o:void 0}):AK(e[r])?t[r]=EF(e[r]):t[r]=e[r]!==""?e[r]:void 0}return t}function sxt(e,t,n){var r=e.slice();return t.forEach(function(i,a){if(typeof r[a]>"u"){var s=n.clone!==!1,l=s&&n.isMergeableObject(i);r[a]=l?vF(Array.isArray(i)?[]:{},i,n):i}else n.isMergeableObject(i)?r[a]=vF(e[a],i,n):e.indexOf(i)===-1&&r.push(i)}),r}function lxt(e){return Array.from(e).filter(function(t){return t.selected}).map(function(t){return t.value})}function cxt(e,t,n){if(typeof e=="boolean")return!!t;var r=[],o=!1,i=-1;if(Array.isArray(e))r=e,i=e.indexOf(n),o=i>=0;else if(!n||n=="true"||n=="false")return!!t;return t&&n&&!o?r.concat(n):o?r.slice(0,i).concat(r.slice(i+1)):r}var uxt=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?v.useLayoutEffect:v.useEffect;function Qs(e){var t=v.useRef(e);return uxt(function(){t.current=e}),v.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o=this._maxSize&&this.clear(),e in this._values||this._size++,this._values[e]=t};var dxt=/[^.^\]^[]+|(?=\[\]|\.\.)/g,Pue=/^\d+$/,fxt=/^\d/,pxt=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,hxt=/^\s*(['"]?)(.*?)(\1)\s*$/,gH=512,nY=new Yg(gH),rY=new Yg(gH),oY=new Yg(gH),rg={Cache:Yg,split:PF,normalizePath:n_,setter:function(e){var t=n_(e);return rY.get(e)||rY.set(e,function(r,o){for(var i=0,a=t.length,s=r;ie.match(bxt)||[],TM=e=>e[0].toUpperCase()+e.slice(1),yH=(e,t)=>PM(e).join(t).toLowerCase(),Tue=e=>PM(e).reduce((t,n)=>`${t}${t?n[0].toUpperCase()+n.slice(1).toLowerCase():n.toLowerCase()}`,""),wxt=e=>TM(Tue(e)),xxt=e=>yH(e,"_"),Sxt=e=>yH(e,"-"),Cxt=e=>TM(yH(e," ")),Ext=e=>PM(e).map(TM).join(" ");var r_={words:PM,upperFirst:TM,camelCase:Tue,pascalCase:wxt,snakeCase:xxt,kebabCase:Sxt,sentenceCase:Cxt,titleCase:Ext},vH={exports:{}};vH.exports=function(e){return Iue(Pxt(e),e)};vH.exports.array=Iue;function Iue(e,t){var n=e.length,r=new Array(n),o={},i=n,a=Txt(t),s=Ixt(e);for(t.forEach(function(c){if(!s.has(c[0])||!s.has(c[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});i--;)o[i]||l(e[i],i,new Set);return r;function l(c,u,d){if(d.has(c)){var f;try{f=", node was:"+JSON.stringify(c)}catch{f=""}throw new Error("Cyclic dependency"+f)}if(!s.has(c))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(c));if(!o[u]){o[u]=!0;var p=a.get(c)||new Set;if(p=Array.from(p),u=p.length){d.add(c);do{var h=p[--u];l(h,s.get(h),d)}while(u);d.delete(c)}r[--n]=c}}}function Pxt(e){for(var t=new Set,n=0,r=e.length;n"",Dxt=/^Symbol\((.*)\)(.*)$/;function _xt(e){return e!=+e?"NaN":e===0&&1/e<0?"-0":""+e}function iY(e,t=!1){if(e==null||e===!0||e===!1)return""+e;const n=typeof e;if(n==="number")return _xt(e);if(n==="string")return t?`"${e}"`:e;if(n==="function")return"[Function "+(e.name||"anonymous")+"]";if(n==="symbol")return $xt.call(e).replace(Dxt,"Symbol($1)");const r=kxt.call(e).slice(8,-1);return r==="Date"?isNaN(e.getTime())?""+e:e.toISOString(e):r==="Error"||e instanceof Error?"["+Mxt.call(e)+"]":r==="RegExp"?Rxt.call(e):null}function fd(e,t){let n=iY(e,t);return n!==null?n:JSON.stringify(e,function(r,o){let i=iY(this[r],t);return i!==null?i:o},2)}function Oue(e){return e==null?[]:[].concat(e)}let Aue,kue,Mue,Nxt=/\$\{\s*(\w+)\s*\}/g;Aue=Symbol.toStringTag;class aY{constructor(t,n,r,o){this.name=void 0,this.message=void 0,this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=void 0,this.inner=void 0,this[Aue]="Error",this.name="ValidationError",this.value=n,this.path=r,this.type=o,this.errors=[],this.inner=[],Oue(t).forEach(i=>{if(Sa.isError(i)){this.errors.push(...i.errors);const a=i.inner.length?i.inner:[i];this.inner.push(...a)}else this.errors.push(i)}),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0]}}kue=Symbol.hasInstance;Mue=Symbol.toStringTag;class Sa extends Error{static formatError(t,n){const r=n.label||n.path||"this";return r!==n.path&&(n=Object.assign({},n,{path:r})),typeof t=="string"?t.replace(Nxt,(o,i)=>fd(n[i])):typeof t=="function"?t(n):t}static isError(t){return t&&t.name==="ValidationError"}constructor(t,n,r,o,i){const a=new aY(t,n,r,o);if(i)return a;super(),this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=[],this.inner=[],this[Mue]="Error",this.name=a.name,this.message=a.message,this.type=a.type,this.value=a.value,this.path=a.path,this.errors=a.errors,this.inner=a.inner,Error.captureStackTrace&&Error.captureStackTrace(this,Sa)}static[kue](t){return aY[Symbol.hasInstance](t)||super[Symbol.hasInstance](t)}}let Wc={default:"${path} is invalid",required:"${path} is a required field",defined:"${path} must be defined",notNull:"${path} cannot be null",oneOf:"${path} must be one of the following values: ${values}",notOneOf:"${path} must not be one of the following values: ${values}",notType:({path:e,type:t,value:n,originalValue:r})=>{const o=r!=null&&r!==n?` (cast from the value \`${fd(r,!0)}\`).`:".";return t!=="mixed"?`${e} must be a \`${t}\` type, but the final value was: \`${fd(n,!0)}\``+o:`${e} must match the configured type. The validated value was: \`${fd(n,!0)}\``+o}},ya={length:"${path} must be exactly ${length} characters",min:"${path} must be at least ${min} characters",max:"${path} must be at most ${max} characters",matches:'${path} must match the following: "${regex}"',email:"${path} must be a valid email",url:"${path} must be a valid URL",uuid:"${path} must be a valid UUID",datetime:"${path} must be a valid ISO date-time",datetime_precision:"${path} must be a valid ISO date-time with a sub-second precision of exactly ${precision} digits",datetime_offset:'${path} must be a valid ISO date-time with UTC "Z" timezone',trim:"${path} must be a trimmed string",lowercase:"${path} must be a lowercase string",uppercase:"${path} must be a upper case string"},af={min:"${path} must be greater than or equal to ${min}",max:"${path} must be less than or equal to ${max}",lessThan:"${path} must be less than ${less}",moreThan:"${path} must be greater than ${more}",positive:"${path} must be a positive number",negative:"${path} must be a negative number",integer:"${path} must be an integer"},TF={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},IF={isValue:"${path} field must be ${value}"},OF={noUnknown:"${path} field has unspecified keys: ${unknown}"},aT={min:"${path} field must have at least ${min} items",max:"${path} field must have less than or equal to ${max} items",length:"${path} must have ${length} items"},Lxt={notType:e=>{const{path:t,value:n,spec:r}=e,o=r.types.length;if(Array.isArray(n)){if(n.lengtho)return`${t} tuple value has too many items, expected a length of ${o} but got ${n.length} for value: \`${fd(n,!0)}\``}return Sa.formatError(Wc.notType,e)}};Object.assign(Object.create(null),{mixed:Wc,string:ya,number:af,date:TF,object:OF,array:aT,boolean:IF,tuple:Lxt});const IM=e=>e&&e.__isYupSchema__;class xO{static fromOptions(t,n){if(!n.then&&!n.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:r,then:o,otherwise:i}=n,a=typeof r=="function"?r:(...s)=>s.every(l=>l===r);return new xO(t,(s,l)=>{var c;let u=a(...s)?o:i;return(c=u==null?void 0:u(l))!=null?c:l})}constructor(t,n){this.fn=void 0,this.refs=t,this.refs=t,this.fn=n}resolve(t,n){let r=this.refs.map(i=>i.getValue(n==null?void 0:n.value,n==null?void 0:n.parent,n==null?void 0:n.context)),o=this.fn(r,t,n);if(o===void 0||o===t)return t;if(!IM(o))throw new TypeError("conditions must return a schema object");return o.resolve(n)}}const yP={context:"$",value:"."};function Fxt(e,t){return new Lp(e,t)}class Lp{constructor(t,n={}){if(this.key=void 0,this.isContext=void 0,this.isValue=void 0,this.isSibling=void 0,this.path=void 0,this.getter=void 0,this.map=void 0,typeof t!="string")throw new TypeError("ref must be a string, got: "+t);if(this.key=t.trim(),t==="")throw new TypeError("ref must be a non-empty string");this.isContext=this.key[0]===yP.context,this.isValue=this.key[0]===yP.value,this.isSibling=!this.isContext&&!this.isValue;let r=this.isContext?yP.context:this.isValue?yP.value:"";this.path=this.key.slice(r.length),this.getter=this.path&&rg.getter(this.path,!0),this.map=n.map}getValue(t,n,r){let o=this.isContext?r:this.isValue?t:n;return this.getter&&(o=this.getter(o||{})),this.map&&(o=this.map(o)),o}cast(t,n){return this.getValue(t,n==null?void 0:n.parent,n==null?void 0:n.context)}resolve(){return this}describe(){return{type:"ref",key:this.key}}toString(){return`Ref(${this.key})`}static isRef(t){return t&&t.__isYupRef}}Lp.prototype.__isYupRef=!0;const mc=e=>e==null;function jm(e){function t({value:n,path:r="",options:o,originalValue:i,schema:a},s,l){const{name:c,test:u,params:d,message:f,skipAbsent:p}=e;let{parent:h,context:m,abortEarly:y=a.spec.abortEarly,disableStackTrace:w=a.spec.disableStackTrace}=o;function x($){return Lp.isRef($)?$.getValue(n,h,m):$}function C($={}){const N=Object.assign({value:n,originalValue:i,label:a.spec.label,path:$.path||r,spec:a.spec,disableStackTrace:$.disableStackTrace||w},d,$.params);for(const j of Object.keys(N))N[j]=x(N[j]);const L=new Sa(Sa.formatError($.message||f,N),n,N.path,$.type||c,N.disableStackTrace);return L.params=N,L}const E=y?s:l;let P={path:r,parent:h,type:c,from:o.from,createError:C,resolve:x,options:o,originalValue:i,schema:a};const T=$=>{Sa.isError($)?E($):$?l(null):E(C())},I=$=>{Sa.isError($)?E($):s($)};if(p&&mc(n))return T(!0);let k;try{var O;if(k=u.call(P,n,P),typeof((O=k)==null?void 0:O.then)=="function"){if(o.sync)throw new Error(`Validation test of type: "${P.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(k).then(T,I)}}catch($){I($);return}T(k)}return t.OPTIONS=e,t}function jxt(e,t,n,r=n){let o,i,a;return t?(rg.forEach(t,(s,l,c)=>{let u=l?s.slice(1,s.length-1):s;e=e.resolve({context:r,parent:o,value:n});let d=e.type==="tuple",f=c?parseInt(u,10):0;if(e.innerType||d){if(d&&!c)throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part "${a}" must contain an index to the tuple element, e.g. "${a}[0]"`);if(n&&f>=n.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${s}, in the path: ${t}. because there is no value at that index. `);o=n,n=n&&n[f],e=d?e.spec.types[f]:e.innerType}if(!c){if(!e.fields||!e.fields[u])throw new Error(`The schema does not contain the path: ${t}. (failed at: ${a} which is a type: "${e.type}")`);o=n,n=n&&n[u],e=e.fields[u]}i=u,a=l?"["+s+"]":"."+s}),{schema:e,parent:o,parentPath:i}):{parent:o,parentPath:t,schema:e}}class SO extends Set{describe(){const t=[];for(const n of this.values())t.push(Lp.isRef(n)?n.describe():n);return t}resolveAll(t){let n=[];for(const r of this.values())n.push(t(r));return n}clone(){return new SO(this.values())}merge(t,n){const r=this.clone();return t.forEach(o=>r.add(o)),n.forEach(o=>r.delete(o)),r}}function Py(e,t=new Map){if(IM(e)||!e||typeof e!="object")return e;if(t.has(e))return t.get(e);let n;if(e instanceof Date)n=new Date(e.getTime()),t.set(e,n);else if(e instanceof RegExp)n=new RegExp(e),t.set(e,n);else if(Array.isArray(e)){n=new Array(e.length),t.set(e,n);for(let r=0;r{this.typeError(Wc.notType)}),this.type=t.type,this._typeCheck=t.check,this.spec=Object.assign({strip:!1,strict:!1,abortEarly:!0,recursive:!0,disableStackTrace:!1,nullable:!1,optional:!0,coerce:!0},t==null?void 0:t.spec),this.withMutation(n=>{n.nonNullable()})}get _type(){return this.type}clone(t){if(this._mutate)return t&&Object.assign(this.spec,t),this;const n=Object.create(Object.getPrototypeOf(this));return n.type=this.type,n._typeCheck=this._typeCheck,n._whitelist=this._whitelist.clone(),n._blacklist=this._blacklist.clone(),n.internalTests=Object.assign({},this.internalTests),n.exclusiveTests=Object.assign({},this.exclusiveTests),n.deps=[...this.deps],n.conditions=[...this.conditions],n.tests=[...this.tests],n.transforms=[...this.transforms],n.spec=Py(Object.assign({},this.spec,t)),n}label(t){let n=this.clone();return n.spec.label=t,n}meta(...t){if(t.length===0)return this.spec.meta;let n=this.clone();return n.spec.meta=Object.assign(n.spec.meta||{},t[0]),n}withMutation(t){let n=this._mutate;this._mutate=!0;let r=t(this);return this._mutate=n,r}concat(t){if(!t||t===this)return this;if(t.type!==this.type&&this.type!=="mixed")throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${t.type}`);let n=this,r=t.clone();const o=Object.assign({},n.spec,r.spec);return r.spec=o,r.internalTests=Object.assign({},n.internalTests,r.internalTests),r._whitelist=n._whitelist.merge(t._whitelist,t._blacklist),r._blacklist=n._blacklist.merge(t._blacklist,t._whitelist),r.tests=n.tests,r.exclusiveTests=n.exclusiveTests,r.withMutation(i=>{t.tests.forEach(a=>{i.test(a.OPTIONS)})}),r.transforms=[...n.transforms,...r.transforms],r}isType(t){return t==null?!!(this.spec.nullable&&t===null||this.spec.optional&&t===void 0):this._typeCheck(t)}resolve(t){let n=this;if(n.conditions.length){let r=n.conditions;n=n.clone(),n.conditions=[],n=r.reduce((o,i)=>i.resolve(o,t),n),n=n.resolve(t)}return n}resolveOptions(t){var n,r,o,i;return Object.assign({},t,{from:t.from||[],strict:(n=t.strict)!=null?n:this.spec.strict,abortEarly:(r=t.abortEarly)!=null?r:this.spec.abortEarly,recursive:(o=t.recursive)!=null?o:this.spec.recursive,disableStackTrace:(i=t.disableStackTrace)!=null?i:this.spec.disableStackTrace})}cast(t,n={}){let r=this.resolve(Object.assign({value:t},n)),o=n.assert==="ignore-optionality",i=r._cast(t,n);if(n.assert!==!1&&!r.isType(i)){if(o&&mc(i))return i;let a=fd(t),s=fd(i);throw new TypeError(`The value of ${n.path||"field"} could not be cast to a value that satisfies the schema type: "${r.type}". +`));const t=v.useMemo(()=>ue({},Put,e.localeText),[e.localeText]);return v.useMemo(()=>ue({},e,{localeText:t}),[e,t])},Cn=()=>Vg().utils,Hg=()=>Vg().defaultDates,Ug=e=>{const t=Cn(),n=v.useRef();return n.current===void 0&&(n.current=t.date(void 0,e)),n.current},$o=()=>Vg().localeText,Tut=ct(R.jsx("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown"),Iut=ct(R.jsx("path",{d:"M15.41 16.59L10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z"}),"ArrowLeft"),Out=ct(R.jsx("path",{d:"M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"}),"ArrowRight"),ile=ct(R.jsx("path",{d:"M17 12h-5v5h5v-5zM16 1v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2h-1V1h-2zm3 18H5V8h14v11z"}),"Calendar"),Aut=ct(R.jsxs(v.Fragment,{children:[R.jsx("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),R.jsx("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]}),"Clock"),kut=ct(R.jsx("path",{d:"M9 11H7v2h2v-2zm4 0h-2v2h2v-2zm4 0h-2v2h2v-2zm2-7h-1V2h-2v2H8V2H6v2H5c-1.11 0-1.99.9-1.99 2L3 20c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 16H5V9h14v11z"}),"DateRange"),Mut=ct(R.jsxs(v.Fragment,{children:[R.jsx("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),R.jsx("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]}),"Time"),Rut=ct(R.jsx("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Clear");function $ut(e){return Wn("MuiPickersArrowSwitcher",e)}Xn("MuiPickersArrowSwitcher",["root","spacer","button","previousIconButton","nextIconButton","leftArrowIcon","rightArrowIcon"]);const Dut=["children","className","slots","slotProps","isNextDisabled","isNextHidden","onGoToNext","nextLabel","isPreviousDisabled","isPreviousHidden","onGoToPrevious","previousLabel","labelId"],_ut=["ownerState"],Nut=["ownerState"],Lut=re("div",{name:"MuiPickersArrowSwitcher",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex"}),Fut=re("div",{name:"MuiPickersArrowSwitcher",slot:"Spacer",overridesResolver:(e,t)=>t.spacer})(({theme:e})=>({width:e.spacing(3)})),B7=re(vn,{name:"MuiPickersArrowSwitcher",slot:"Button",overridesResolver:(e,t)=>t.button})({variants:[{props:{hidden:!0},style:{visibility:"hidden"}}]}),jut=e=>{const{classes:t}=e;return zn({root:["root"],spacer:["spacer"],button:["button"],previousIconButton:["previousIconButton"],nextIconButton:["nextIconButton"],leftArrowIcon:["leftArrowIcon"],rightArrowIcon:["rightArrowIcon"]},$ut,t)},ale=v.forwardRef(function(t,n){const r=dr(),o=cn({props:t,name:"MuiPickersArrowSwitcher"}),{children:i,className:a,slots:s,slotProps:l,isNextDisabled:c,isNextHidden:u,onGoToNext:d,nextLabel:f,isPreviousDisabled:p,isPreviousHidden:h,onGoToPrevious:m,previousLabel:y,labelId:w}=o,x=zt(o,Dut),S=o,E=jut(S),P={isDisabled:c,isHidden:u,goTo:d,label:f},T={isDisabled:p,isHidden:h,goTo:m,label:y},I=(s==null?void 0:s.previousIconButton)??B7,A=Yn({elementType:I,externalSlotProps:l==null?void 0:l.previousIconButton,additionalProps:{size:"medium",title:T.label,"aria-label":T.label,disabled:T.isDisabled,edge:"end",onClick:T.goTo},ownerState:ue({},S,{hidden:T.isHidden}),className:de(E.button,E.previousIconButton)}),k=(s==null?void 0:s.nextIconButton)??B7,O=Yn({elementType:k,externalSlotProps:l==null?void 0:l.nextIconButton,additionalProps:{size:"medium",title:P.label,"aria-label":P.label,disabled:P.isDisabled,edge:"start",onClick:P.goTo},ownerState:ue({},S,{hidden:P.isHidden}),className:de(E.button,E.nextIconButton)}),$=(s==null?void 0:s.leftArrowIcon)??Iut,N=Yn({elementType:$,externalSlotProps:l==null?void 0:l.leftArrowIcon,additionalProps:{fontSize:"inherit"},ownerState:S,className:E.leftArrowIcon}),L=zt(N,_ut),j=(s==null?void 0:s.rightArrowIcon)??Out,D=Yn({elementType:j,externalSlotProps:l==null?void 0:l.rightArrowIcon,additionalProps:{fontSize:"inherit"},ownerState:S,className:E.rightArrowIcon}),_=zt(D,Nut);return R.jsxs(Lut,ue({ref:n,className:de(E.root,a),ownerState:S},x,{children:[R.jsx(I,ue({},A,{children:r?R.jsx(j,ue({},_)):R.jsx($,ue({},L))})),i?R.jsx(ot,{variant:"subtitle1",component:"span",id:w,children:i}):R.jsx(Fut,{className:E.spacer,ownerState:S}),R.jsx(k,ue({},O,{children:r?R.jsx($,ue({},L)):R.jsx(j,ue({},_))}))]}))}),nu=(e,t)=>e.length!==t.length?!1:t.every(n=>e.includes(n)),DV=({openTo:e,defaultOpenTo:t,views:n,defaultViews:r})=>{const o=n??r;let i;if(e!=null)i=e;else if(o.includes(t))i=t;else if(o.length>0)i=o[0];else throw new Error("MUI X: The `views` prop must contain at least one view.");return{views:o,openTo:i}},sle=["hours","minutes","seconds"],ab=e=>sle.includes(e),Ww=e=>sle.includes(e)||e==="meridiem",But=(e,t)=>e?t.getHours(e)>=12?"pm":"am":null,US=(e,t,n)=>n&&(e>=12?"pm":"am")!==t?t==="am"?e-12:e+12:e,zut=(e,t,n,r)=>{const o=US(r.getHours(e),t,n);return r.setHours(e,o)},z7=(e,t)=>t.getHours(e)*3600+t.getMinutes(e)*60+t.getSeconds(e),d1=(e,t)=>(n,r)=>e?t.isAfter(n,r):z7(n,t)>z7(r,t),CO=(e,{format:t,views:n,ampm:r})=>{if(t!=null)return t;const o=e.formats;return nu(n,["hours"])?r?`${o.hours12h} ${o.meridiem}`:o.hours24h:nu(n,["minutes"])?o.minutes:nu(n,["seconds"])?o.seconds:nu(n,["minutes","seconds"])?`${o.minutes}:${o.seconds}`:nu(n,["hours","minutes","seconds"])?r?`${o.hours12h}:${o.minutes}:${o.seconds} ${o.meridiem}`:`${o.hours24h}:${o.minutes}:${o.seconds}`:r?`${o.hours12h}:${o.minutes} ${o.meridiem}`:`${o.hours24h}:${o.minutes}`};function f1({onChange:e,onViewChange:t,openTo:n,view:r,views:o,autoFocus:i,focusedView:a,onFocusedViewChange:s}){const l=v.useRef(n),c=v.useRef(o),u=v.useRef(o.includes(n)?n:o[0]),[d,f]=Sg({name:"useViews",state:"view",controlled:r,default:u.current}),p=v.useRef(i?d:null),[h,m]=Sg({name:"useViews",state:"focusedView",controlled:a,default:p.current});v.useEffect(()=>{(l.current&&l.current!==n||c.current&&c.current.some(I=>!o.includes(I)))&&(f(o.includes(n)?n:o[0]),c.current=o,l.current=n)},[n,f,d,o]);const y=o.indexOf(d),w=o[y-1]??null,x=o[y+1]??null,S=kt((I,A)=>{m(A?I:k=>I===k?null:k),s==null||s(I,A)}),E=kt(I=>{S(I,!0),I!==d&&(f(I),t&&t(I))}),P=kt(()=>{x&&E(x)}),T=kt((I,A,k)=>{const O=A==="finish",$=k?o.indexOf(k){const i=o.date(void 0,r),a=o.startOfMonth(t&&o.isBefore(i,n)?i:n);return!o.isAfter(a,e)},[t,n,e,o,r])}function Hut(e,{disablePast:t,minDate:n,timezone:r}){const o=Cn();return v.useMemo(()=>{const i=o.date(void 0,r),a=o.startOfMonth(t&&o.isAfter(i,n)?i:n);return!o.isBefore(a,e)},[t,n,e,o,r])}function mM(e,t,n,r){const o=Cn(),i=But(e,o),a=v.useCallback(s=>{const l=e==null?null:zut(e,s,!!t,o);n(l,r??"partial")},[t,e,n,r,o]);return{meridiemMode:i,handleMeridiemChange:a}}const WS=36,yM=2,vM=320,Uut=280,bM=336,lle=232,Gw=48,wM=re("div")({overflow:"hidden",width:vM,maxHeight:bM,display:"flex",flexDirection:"column",margin:"0 auto"});function Wut(e){return Wn("MuiTimeClock",e)}Xn("MuiTimeClock",["root","arrowSwitcher"]);const sb=220,fd=36,GS={x:sb/2,y:sb/2},cle={x:GS.x,y:0},Gut=cle.x-GS.x,qut=cle.y-GS.y,Kut=e=>e*(180/Math.PI),ule=(e,t,n)=>{const r=t-GS.x,o=n-GS.y,i=Math.atan2(Gut,qut)-Math.atan2(r,o);let a=Kut(i);a=Math.round(a/e)*e,a%=360;const s=Math.floor(a/e)||0,l=r**2+o**2,c=Math.sqrt(l);return{value:s,distance:c}},Yut=(e,t,n=1)=>{const r=n*6;let{value:o}=ule(r,e,t);return o=o*n%60,o},Qut=(e,t,n)=>{const{value:r,distance:o}=ule(30,e,t);let i=r||12;return n?i%=12:o{const{classes:t}=e;return zn({root:["root"],thumb:["thumb"]},Xut,t)},edt=re("div",{name:"MuiClockPointer",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({width:2,backgroundColor:(e.vars||e).palette.primary.main,position:"absolute",left:"calc(50% - 1px)",bottom:"50%",transformOrigin:"center bottom 0px",variants:[{props:{shouldAnimate:!0},style:{transition:e.transitions.create(["transform","height"])}}]})),tdt=re("div",{name:"MuiClockPointer",slot:"Thumb",overridesResolver:(e,t)=>t.thumb})(({theme:e})=>({width:4,height:4,backgroundColor:(e.vars||e).palette.primary.contrastText,borderRadius:"50%",position:"absolute",top:-21,left:`calc(50% - ${fd/2}px)`,border:`${(fd-4)/2}px solid ${(e.vars||e).palette.primary.main}`,boxSizing:"content-box",variants:[{props:{hasSelected:!0},style:{backgroundColor:(e.vars||e).palette.primary.main}}]}));function ndt(e){const t=cn({props:e,name:"MuiClockPointer"}),{className:n,isInner:r,type:o,viewValue:i}=t,a=zt(t,Jut),s=v.useRef(o);v.useEffect(()=>{s.current=o},[o]);const l=ue({},t,{shouldAnimate:s.current!==o}),c=Zut(l),u=()=>{let f=360/(o==="hours"?12:60)*i;return o==="hours"&&i>12&&(f-=360),{height:Math.round((r?.26:.4)*sb),transform:`rotateZ(${f}deg)`}};return R.jsx(edt,ue({style:u(),className:de(c.root,n),ownerState:l},a,{children:R.jsx(tdt,{ownerState:l,className:c.thumb})}))}function rdt(e){return Wn("MuiClock",e)}Xn("MuiClock",["root","clock","wrapper","squareMask","pin","amButton","pmButton","meridiemText","selected"]);const EO=(e,t,n)=>{let r=t;return r=e.setHours(r,e.getHours(n)),r=e.setMinutes(r,e.getMinutes(n)),r=e.setSeconds(r,e.getSeconds(n)),r=e.setMilliseconds(r,e.getMilliseconds(n)),r},Px=({date:e,disableFuture:t,disablePast:n,maxDate:r,minDate:o,isDateDisabled:i,utils:a,timezone:s})=>{const l=EO(a,a.date(void 0,s),e);n&&a.isBefore(o,l)&&(o=l),t&&a.isAfter(r,l)&&(r=l);let c=e,u=e;for(a.isBefore(e,o)&&(c=o,u=null),a.isAfter(e,r)&&(u&&(u=r),c=null);c||u;){if(c&&a.isAfter(c,r)&&(c=null),u&&a.isBefore(u,o)&&(u=null),c){if(!i(c))return c;c=a.addDays(c,1)}if(u){if(!i(u))return u;u=a.addDays(u,-1)}}return null},odt=(e,t)=>t==null||!e.isValid(t)?null:t,Li=(e,t,n)=>t==null||!e.isValid(t)?n:t,idt=(e,t,n)=>!e.isValid(t)&&t!=null&&!e.isValid(n)&&n!=null?!0:e.isEqual(t,n),_V=(e,t)=>{const r=[e.startOfYear(t)];for(;r.length<12;){const o=r[r.length-1];r.push(e.addMonths(o,1))}return r},NV=(e,t,n)=>n==="date"?e.startOfDay(e.date(void 0,t)):e.date(void 0,t),mc=(e,t)=>{const n=e.setHours(e.date(),t==="am"?2:14);return e.format(n,"meridiem")},adt=["year","month","day"],lb=e=>adt.includes(e),qS=(e,{format:t,views:n},r)=>{if(t!=null)return t;const o=e.formats;return nu(n,["year"])?o.year:nu(n,["month"])?o.month:nu(n,["day"])?o.dayOfMonth:nu(n,["month","year"])?`${o.month} ${o.year}`:nu(n,["day","month"])?`${o.month} ${o.dayOfMonth}`:r?/en/.test(e.getCurrentLocaleCode())?o.normalDateWithWeekday:o.normalDate:o.keyboardDate},sdt=(e,t)=>{const n=e.startOfWeek(t);return[0,1,2,3,4,5,6].map(r=>e.addDays(n,r))},ldt=e=>{const{classes:t,meridiemMode:n}=e;return zn({root:["root"],clock:["clock"],wrapper:["wrapper"],squareMask:["squareMask"],pin:["pin"],amButton:["amButton",n==="am"&&"selected"],pmButton:["pmButton",n==="pm"&&"selected"],meridiemText:["meridiemText"]},rdt,t)},cdt=re("div",{name:"MuiClock",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({display:"flex",justifyContent:"center",alignItems:"center",margin:e.spacing(2)})),udt=re("div",{name:"MuiClock",slot:"Clock",overridesResolver:(e,t)=>t.clock})({backgroundColor:"rgba(0,0,0,.07)",borderRadius:"50%",height:220,width:220,flexShrink:0,position:"relative",pointerEvents:"none"}),ddt=re("div",{name:"MuiClock",slot:"Wrapper",overridesResolver:(e,t)=>t.wrapper})({"&:focus":{outline:"none"}}),fdt=re("div",{name:"MuiClock",slot:"SquareMask",overridesResolver:(e,t)=>t.squareMask})({width:"100%",height:"100%",position:"absolute",pointerEvents:"auto",outline:0,touchAction:"none",userSelect:"none",variants:[{props:{disabled:!1},style:{"@media (pointer: fine)":{cursor:"pointer",borderRadius:"50%"},"&:active":{cursor:"move"}}}]}),pdt=re("div",{name:"MuiClock",slot:"Pin",overridesResolver:(e,t)=>t.pin})(({theme:e})=>({width:6,height:6,borderRadius:"50%",backgroundColor:(e.vars||e).palette.primary.main,position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)"})),dle=(e,t)=>({zIndex:1,bottom:8,paddingLeft:4,paddingRight:4,width:fd,variants:[{props:{meridiemMode:t},style:{backgroundColor:(e.vars||e).palette.primary.main,color:(e.vars||e).palette.primary.contrastText,"&:hover":{backgroundColor:(e.vars||e).palette.primary.light}}}]}),hdt=re(vn,{name:"MuiClock",slot:"AmButton",overridesResolver:(e,t)=>t.amButton})(({theme:e})=>ue({},dle(e,"am"),{position:"absolute",left:8})),gdt=re(vn,{name:"MuiClock",slot:"PmButton",overridesResolver:(e,t)=>t.pmButton})(({theme:e})=>ue({},dle(e,"pm"),{position:"absolute",right:8})),V7=re(ot,{name:"MuiClock",slot:"meridiemText",overridesResolver:(e,t)=>t.meridiemText})({overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"});function mdt(e){const t=cn({props:e,name:"MuiClock"}),{ampm:n,ampmInClock:r,autoFocus:o,children:i,value:a,handleMeridiemChange:s,isTimeDisabled:l,meridiemMode:c,minutesStep:u=1,onChange:d,selectedId:f,type:p,viewValue:h,disabled:m=!1,readOnly:y,className:w}=t,x=t,S=Cn(),E=$o(),P=v.useRef(!1),T=ldt(x),I=l(h,p),A=!n&&p==="hours"&&(h<1||h>12),k=(V,U)=>{m||y||l(V,p)||d(V,U)},O=(V,U)=>{let{offsetX:K,offsetY:X}=V;if(K===void 0){const ee=V.target.getBoundingClientRect();K=V.changedTouches[0].clientX-ee.left,X=V.changedTouches[0].clientY-ee.top}const ie=p==="seconds"||p==="minutes"?Yut(K,X,u):Qut(K,X,!!n);k(ie,U)},$=V=>{P.current=!0,O(V,"shallow")},N=V=>{P.current&&(O(V,"finish"),P.current=!1)},L=V=>{V.buttons>0&&O(V.nativeEvent,"shallow")},j=V=>{P.current&&(P.current=!1),O(V.nativeEvent,"finish")},D=v.useMemo(()=>p==="hours"?!0:h%5===0,[p,h]),_=p==="minutes"?u:1,z=v.useRef(null);xu(()=>{o&&z.current.focus()},[o]);const F=V=>{if(!P.current)switch(V.key){case"Home":k(0,"partial"),V.preventDefault();break;case"End":k(p==="minutes"?59:23,"partial"),V.preventDefault();break;case"ArrowUp":k(h+_,"partial"),V.preventDefault();break;case"ArrowDown":k(h-_,"partial"),V.preventDefault();break;case"PageUp":k(h+5,"partial"),V.preventDefault();break;case"PageDown":k(h-5,"partial"),V.preventDefault();break;case"Enter":case" ":k(h,"finish"),V.preventDefault();break}};return R.jsxs(cdt,{className:de(T.root,w),children:[R.jsxs(udt,{className:T.clock,children:[R.jsx(fdt,{onTouchMove:$,onTouchStart:$,onTouchEnd:N,onMouseUp:j,onMouseMove:L,ownerState:{disabled:m},className:T.squareMask}),!I&&R.jsxs(v.Fragment,{children:[R.jsx(pdt,{className:T.pin}),a!=null&&R.jsx(ndt,{type:p,viewValue:h,isInner:A,hasSelected:D})]}),R.jsx(ddt,{"aria-activedescendant":f,"aria-label":E.clockLabelText(p,a,S,a==null?null:S.format(a,"fullTime")),ref:z,role:"listbox",onKeyDown:F,tabIndex:0,className:T.wrapper,children:i})]}),n&&r&&R.jsxs(v.Fragment,{children:[R.jsx(hdt,{onClick:y?void 0:()=>s("am"),disabled:m||c===null,ownerState:x,className:T.amButton,title:mc(S,"am"),children:R.jsx(V7,{variant:"caption",className:T.meridiemText,children:mc(S,"am")})}),R.jsx(gdt,{disabled:m||c===null,onClick:y?void 0:()=>s("pm"),ownerState:x,className:T.pmButton,title:mc(S,"pm"),children:R.jsx(V7,{variant:"caption",className:T.meridiemText,children:mc(S,"pm")})})]})]})}function ydt(e){return Wn("MuiClockNumber",e)}const vP=Xn("MuiClockNumber",["root","selected","disabled"]),vdt=["className","disabled","index","inner","label","selected"],bdt=e=>{const{classes:t,selected:n,disabled:r}=e;return zn({root:["root",n&&"selected",r&&"disabled"]},ydt,t)},wdt=re("span",{name:"MuiClockNumber",slot:"Root",overridesResolver:(e,t)=>[t.root,{[`&.${vP.disabled}`]:t.disabled},{[`&.${vP.selected}`]:t.selected}]})(({theme:e})=>({height:fd,width:fd,position:"absolute",left:`calc((100% - ${fd}px) / 2)`,display:"inline-flex",justifyContent:"center",alignItems:"center",borderRadius:"50%",color:(e.vars||e).palette.text.primary,fontFamily:e.typography.fontFamily,"&:focused":{backgroundColor:(e.vars||e).palette.background.paper},[`&.${vP.selected}`]:{color:(e.vars||e).palette.primary.contrastText},[`&.${vP.disabled}`]:{pointerEvents:"none",color:(e.vars||e).palette.text.disabled},variants:[{props:{inner:!0},style:ue({},e.typography.body2,{color:(e.vars||e).palette.text.secondary})}]}));function fle(e){const t=cn({props:e,name:"MuiClockNumber"}),{className:n,disabled:r,index:o,inner:i,label:a,selected:s}=t,l=zt(t,vdt),c=t,u=bdt(c),d=o%12/12*Math.PI*2-Math.PI/2,f=(sb-fd-2)/2*(i?.65:1),p=Math.round(Math.cos(d)*f),h=Math.round(Math.sin(d)*f);return R.jsx(wdt,ue({className:de(u.root,n),"aria-disabled":r?!0:void 0,"aria-selected":s?!0:void 0,role:"option",style:{transform:`translate(${p}px, ${h+(sb-fd)/2}px`},ownerState:c},l,{children:a}))}const xdt=({ampm:e,value:t,getClockNumberText:n,isDisabled:r,selectedId:o,utils:i})=>{const a=t?i.getHours(t):null,s=[],l=e?1:0,c=e?12:23,u=d=>a===null?!1:e?d===12?a===12||a===0:a===d||a-12===d:a===d;for(let d=l;d<=c;d+=1){let f=d.toString();d===0&&(f="00");const p=!e&&(d===0||d>12);f=i.formatNumber(f);const h=u(d);s.push(R.jsx(fle,{id:h?o:void 0,index:d,inner:p,selected:h,disabled:r(d),label:f,"aria-label":n(f)},d))}return s},H7=({utils:e,value:t,isDisabled:n,getClockNumberText:r,selectedId:o})=>{const i=e.formatNumber;return[[5,i("05")],[10,i("10")],[15,i("15")],[20,i("20")],[25,i("25")],[30,i("30")],[35,i("35")],[40,i("40")],[45,i("45")],[50,i("50")],[55,i("55")],[0,i("00")]].map(([a,s],l)=>{const c=a===t;return R.jsx(fle,{label:s,id:c?o:void 0,index:l+1,inner:!1,disabled:n(a),selected:c,"aria-label":r(s)},a)})},LV=({timezone:e,value:t,defaultValue:n,onChange:r,valueManager:o})=>{const i=Cn(),a=v.useRef(n),s=t??a.current??o.emptyValue,l=v.useMemo(()=>o.getTimezone(i,s),[i,o,s]),c=kt(p=>l==null?p:o.setTimezone(i,l,p)),u=e??l??"default",d=v.useMemo(()=>o.setTimezone(i,u,s),[o,i,u,s]),f=kt((p,...h)=>{const m=c(p);r==null||r(m,...h)});return{value:d,handleValueChange:f,timezone:u}},i0=({name:e,timezone:t,value:n,defaultValue:r,onChange:o,valueManager:i})=>{const[a,s]=Sg({name:e,state:"value",controlled:n,default:r??i.emptyValue}),l=kt((c,...u)=>{s(c),o==null||o(c,...u)});return LV({timezone:t,value:a,defaultValue:void 0,onChange:l,valueManager:i})},pc={year:1,month:2,day:3,hours:4,minutes:5,seconds:6,milliseconds:7},Sdt=e=>Math.max(...e.map(t=>pc[t.type]??1)),yw=(e,t,n)=>{if(t===pc.year)return e.startOfYear(n);if(t===pc.month)return e.startOfMonth(n);if(t===pc.day)return e.startOfDay(n);let r=n;return t{let i=o?o():yw(t,n,NV(t,r));e.minDate!=null&&t.isAfterDay(e.minDate,i)&&(i=yw(t,n,e.minDate)),e.maxDate!=null&&t.isBeforeDay(e.maxDate,i)&&(i=yw(t,n,e.maxDate));const a=d1(e.disableIgnoringDatePartForTimeValidation??!1,t);return e.minTime!=null&&a(e.minTime,i)&&(i=yw(t,n,e.disableIgnoringDatePartForTimeValidation?e.minTime:EO(t,i,e.minTime))),e.maxTime!=null&&a(i,e.maxTime)&&(i=yw(t,n,e.disableIgnoringDatePartForTimeValidation?e.maxTime:EO(t,i,e.maxTime))),i},ple=(e,t)=>{const n=e.formatTokenMap[t];if(n==null)throw new Error([`MUI X: The token "${t}" is not supported by the Date and Time Pickers.`,"Please try using another token or open an issue on https://github.com/mui/mui-x/issues/new/choose if you think it should be supported."].join(` +`));return typeof n=="string"?{type:n,contentType:n==="meridiem"?"letter":"digit",maxLength:void 0}:{type:n.sectionType,contentType:n.contentType,maxLength:n.maxLength}},Edt=e=>{switch(e){case"ArrowUp":return 1;case"ArrowDown":return-1;case"PageUp":return 5;case"PageDown":return-5;default:return 0}},xM=(e,t)=>{const n=[],r=e.date(void 0,"default"),o=e.startOfWeek(r),i=e.endOfWeek(r);let a=o;for(;e.isBefore(a,i);)n.push(a),a=e.addDays(a,1);return n.map(s=>e.formatByString(s,t))},hle=(e,t,n,r)=>{switch(n){case"month":return _V(e,e.date(void 0,t)).map(o=>e.formatByString(o,r));case"weekDay":return xM(e,r);case"meridiem":{const o=e.date(void 0,t);return[e.startOfDay(o),e.endOfDay(o)].map(i=>e.formatByString(i,r))}default:return[]}},U7="s",Pdt=["0","1","2","3","4","5","6","7","8","9"],Tdt=e=>{const t=e.date(void 0);return e.formatByString(e.setSeconds(t,0),U7)==="0"?Pdt:Array.from({length:10}).map((r,o)=>e.formatByString(e.setSeconds(t,o),U7))},Eg=(e,t)=>{if(t[0]==="0")return e;const n=[];let r="";for(let o=0;o-1&&(n.push(i.toString()),r="")}return n.join("")},FV=(e,t)=>t[0]==="0"?e:e.split("").map(n=>t[Number(n)]).join(""),W7=(e,t)=>{const n=Eg(e,t);return n!==" "&&!Number.isNaN(Number(n))},gle=(e,t)=>{let n=e;for(n=Number(n).toString();n.length{if(o.type==="day"&&o.contentType==="digit-with-letter"){const a=e.setDate(n.longestMonth,t);return e.formatByString(a,o.format)}let i=t.toString();return o.hasLeadingZerosInInput&&(i=gle(i,o.maxLength)),FV(i,r)},Idt=(e,t,n,r,o,i,a,s)=>{const l=Edt(r),c=r==="Home",u=r==="End",d=n.value===""||c||u,f=()=>{const h=o[n.type]({currentDate:a,format:n.format,contentType:n.contentType}),m=S=>mle(e,S,h,i,n),y=n.type==="minutes"&&(s!=null&&s.minutesStep)?s.minutesStep:1;let x=parseInt(Eg(n.value,i),10)+l*y;if(d){if(n.type==="year"&&!u&&!c)return e.formatByString(e.date(void 0,t),n.format);l>0||c?x=h.minimum:x=h.maximum}return x%y!==0&&((l<0||c)&&(x+=y-(y+x)%y),(l>0||u)&&(x-=x%y)),x>h.maximum?m(h.minimum+(x-h.maximum-1)%(h.maximum-h.minimum+1)):x{const h=hle(e,t,n.type,n.format);if(h.length===0)return n.value;if(d)return l>0||c?h[0]:h[h.length-1];const w=((h.indexOf(n.value)+l)%h.length+h.length)%h.length;return h[w]};return n.contentType==="digit"||n.contentType==="digit-with-letter"?f():p()},jV=(e,t,n)=>{let r=e.value||e.placeholder;const o=t==="non-input"?e.hasLeadingZerosInFormat:e.hasLeadingZerosInInput;return t==="non-input"&&e.hasLeadingZerosInInput&&!e.hasLeadingZerosInFormat&&(r=Number(Eg(r,n)).toString()),["input-rtl","input-ltr"].includes(t)&&e.contentType==="digit"&&!o&&r.length===1&&(r=`${r}‎`),t==="input-rtl"&&(r=`⁨${r}⁩`),r},G7=(e,t,n,r)=>e.formatByString(e.parse(t,n),r),yle=(e,t)=>e.formatByString(e.date(void 0,"system"),t).length===4,vle=(e,t,n,r)=>{if(t!=="digit")return!1;const o=e.date(void 0,"default");switch(n){case"year":return yle(e,r)?e.formatByString(e.setYear(o,1),r)==="0001":e.formatByString(e.setYear(o,2001),r)==="01";case"month":return e.formatByString(e.startOfYear(o),r).length>1;case"day":return e.formatByString(e.startOfMonth(o),r).length>1;case"weekDay":return e.formatByString(e.startOfWeek(o),r).length>1;case"hours":return e.formatByString(e.setHours(o,1),r).length>1;case"minutes":return e.formatByString(e.setMinutes(o,1),r).length>1;case"seconds":return e.formatByString(e.setSeconds(o,1),r).length>1;default:throw new Error("Invalid section type")}},Odt=(e,t,n)=>{const r=t.some(l=>l.type==="day"),o=[],i=[];for(let l=0;le.map(t=>`${t.startSeparator}${t.value||t.placeholder}${t.endSeparator}`).join(""),kdt=(e,t,n)=>{const o=e.map(i=>{const a=jV(i,n?"input-rtl":"input-ltr",t);return`${i.startSeparator}${a}${i.endSeparator}`}).join("");return n?`⁦${o}⁩`:o},Mdt=(e,t,n)=>{const r=e.date(void 0,n),o=e.endOfYear(r),i=e.endOfDay(r),{maxDaysInMonth:a,longestMonth:s}=_V(e,r).reduce((l,c)=>{const u=e.getDaysInMonth(c);return u>l.maxDaysInMonth?{maxDaysInMonth:u,longestMonth:c}:l},{maxDaysInMonth:0,longestMonth:null});return{year:({format:l})=>({minimum:0,maximum:yle(e,l)?9999:99}),month:()=>({minimum:1,maximum:e.getMonth(o)+1}),day:({currentDate:l})=>({minimum:1,maximum:l!=null&&e.isValid(l)?e.getDaysInMonth(l):a,longestMonth:s}),weekDay:({format:l,contentType:c})=>{if(c==="digit"){const u=xM(e,l).map(Number);return{minimum:Math.min(...u),maximum:Math.max(...u)}}return{minimum:1,maximum:7}},hours:({format:l})=>{const c=e.getHours(i);return Eg(e.formatByString(e.endOfDay(r),l),t)!==c.toString()?{minimum:1,maximum:Number(Eg(e.formatByString(e.startOfDay(r),l),t))}:{minimum:0,maximum:c}},minutes:()=>({minimum:0,maximum:e.getMinutes(i)}),seconds:()=>({minimum:0,maximum:e.getSeconds(i)}),meridiem:()=>({minimum:0,maximum:1}),empty:()=>({minimum:0,maximum:0})}},Rdt=(e,t,n,r)=>{switch(t.type){case"year":return e.setYear(r,e.getYear(n));case"month":return e.setMonth(r,e.getMonth(n));case"weekDay":{const o=xM(e,t.format),i=e.formatByString(n,t.format),a=o.indexOf(i),l=o.indexOf(t.value)-a;return e.addDays(n,l)}case"day":return e.setDate(r,e.getDate(n));case"meridiem":{const o=e.getHours(n)<12,i=e.getHours(r);return o&&i>=12?e.addHours(r,-12):!o&&i<12?e.addHours(r,12):r}case"hours":return e.setHours(r,e.getHours(n));case"minutes":return e.setMinutes(r,e.getMinutes(n));case"seconds":return e.setSeconds(r,e.getSeconds(n));default:return r}},q7={year:1,month:2,day:3,weekDay:4,hours:5,minutes:6,seconds:7,meridiem:8,empty:9},K7=(e,t,n,r,o)=>[...n].sort((i,a)=>q7[i.type]-q7[a.type]).reduce((i,a)=>!o||a.modified?Rdt(e,a,t,i):i,r),$dt=()=>navigator.userAgent.toLowerCase().includes("android"),Ddt=(e,t)=>{const n={};if(!t)return e.forEach((l,c)=>{const u=c===0?null:c-1,d=c===e.length-1?null:c+1;n[c]={leftIndex:u,rightIndex:d}}),{neighbors:n,startIndex:0,endIndex:e.length-1};const r={},o={};let i=0,a=0,s=e.length-1;for(;s>=0;){a=e.findIndex((l,c)=>{var u;return c>=i&&((u=l.endSeparator)==null?void 0:u.includes(" "))&&l.endSeparator!==" / "}),a===-1&&(a=e.length-1);for(let l=a;l>=i;l-=1)o[l]=s,r[s]=l,s-=1;i=a+1}return e.forEach((l,c)=>{const u=o[c],d=u===0?null:r[u-1],f=u===e.length-1?null:r[u+1];n[c]={leftIndex:d,rightIndex:f}}),{neighbors:n,startIndex:r[0],endIndex:r[e.length-1]}},pF=(e,t)=>e==null?null:e==="all"?"all":typeof e=="string"?t.findIndex(n=>n.type===e):e,_dt=(e,t)=>{if(e.value)switch(e.type){case"month":{if(e.contentType==="digit")return t.format(t.setMonth(t.date(),Number(e.value)-1),"month");const n=t.parse(e.value,e.format);return n?t.format(n,"month"):void 0}case"day":return e.contentType==="digit"?t.format(t.setDate(t.startOfYear(t.date()),Number(e.value)),"dayOfMonthFull"):e.value;case"weekDay":return;default:return}},Ndt=(e,t)=>{if(e.value)switch(e.type){case"weekDay":return e.contentType==="letter"?void 0:Number(e.value);case"meridiem":{const n=t.parse(`01:00 ${e.value}`,`${t.formats.hours12h}:${t.formats.minutes} ${e.format}`);return n?t.getHours(n)>=12?1:0:void 0}case"day":return e.contentType==="digit-with-letter"?parseInt(e.value,10):Number(e.value);case"month":{if(e.contentType==="digit")return Number(e.value);const n=t.parse(e.value,e.format);return n?t.getMonth(n)+1:void 0}default:return e.contentType!=="letter"?Number(e.value):void 0}},Ldt=["value","referenceDate"],go={emptyValue:null,getTodayValue:NV,getInitialReferenceValue:e=>{let{value:t,referenceDate:n}=e,r=zt(e,Ldt);return t!=null&&r.utils.isValid(t)?t:n??Cdt(r)},cleanValue:odt,areValuesEqual:idt,isSameError:(e,t)=>e===t,hasError:e=>e!=null,defaultErrorState:null,getTimezone:(e,t)=>t==null||!e.isValid(t)?null:e.getTimezone(t),setTimezone:(e,t,n)=>n==null?null:e.setTimezone(n,t)},BV={updateReferenceValue:(e,t,n)=>t==null||!e.isValid(t)?n:t,getSectionsFromValue:(e,t,n,r)=>!e.isValid(t)&&!!n?n:r(t),getV7HiddenInputValueFromSections:Adt,getV6InputValueFromSections:kdt,getActiveDateManager:(e,t)=>({date:t.value,referenceDate:t.referenceValue,getSections:n=>n,getNewValuesFromNewActiveDate:n=>({value:n,referenceValue:n==null||!e.isValid(n)?t.referenceValue:n})}),parseValueStr:(e,t,n)=>n(e.trim(),t)},zV=({value:e,referenceDate:t,utils:n,props:r,timezone:o})=>{const i=v.useMemo(()=>go.getInitialReferenceValue({value:e,utils:n,props:r,referenceDate:t,granularity:pc.day,timezone:o,getTodayDate:()=>NV(n,o,"date")}),[]);return e??i},Fdt=["ampm","ampmInClock","autoFocus","slots","slotProps","value","defaultValue","referenceDate","disableIgnoringDatePartForTimeValidation","maxTime","minTime","disableFuture","disablePast","minutesStep","shouldDisableTime","showViewSwitcher","onChange","view","views","openTo","onViewChange","focusedView","onFocusedViewChange","className","disabled","readOnly","timezone"],jdt=e=>{const{classes:t}=e;return zn({root:["root"],arrowSwitcher:["arrowSwitcher"]},Wut,t)},Bdt=re(wM,{name:"MuiTimeClock",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",flexDirection:"column",position:"relative"}),zdt=re(ale,{name:"MuiTimeClock",slot:"ArrowSwitcher",overridesResolver:(e,t)=>t.arrowSwitcher})({position:"absolute",right:12,top:15}),Vdt=["hours","minutes"],Hdt=v.forwardRef(function(t,n){const r=Cn(),o=cn({props:t,name:"MuiTimeClock"}),{ampm:i=r.is12HourCycleInCurrentLocale(),ampmInClock:a=!1,autoFocus:s,slots:l,slotProps:c,value:u,defaultValue:d,referenceDate:f,disableIgnoringDatePartForTimeValidation:p=!1,maxTime:h,minTime:m,disableFuture:y,disablePast:w,minutesStep:x=1,shouldDisableTime:S,showViewSwitcher:E,onChange:P,view:T,views:I=Vdt,openTo:A,onViewChange:k,focusedView:O,onFocusedViewChange:$,className:N,disabled:L,readOnly:j,timezone:D}=o,_=zt(o,Fdt),{value:z,handleValueChange:F,timezone:V}=i0({name:"TimeClock",timezone:D,value:u,defaultValue:d,onChange:P,valueManager:go}),U=zV({value:z,referenceDate:f,utils:r,props:o,timezone:V}),K=$o(),X=Ug(V),{view:ie,setView:ee,previousView:Q,nextView:te,setValueAndGoToNextView:pe}=f1({view:T,views:I,openTo:A,onViewChange:k,onChange:F,focusedView:O,onFocusedViewChange:$}),{meridiemMode:ae,handleMeridiemChange:se}=mM(U,i,pe),oe=v.useCallback((we,me)=>{const Se=d1(p,r),xe=me==="hours"||me==="minutes"&&I.includes("seconds"),ke=({start:_e,end:ye})=>!(m&&Se(m,ye)||h&&Se(_e,h)||y&&Se(_e,X)||w&&Se(X,xe?ye:_e)),De=(_e,ye=1)=>{if(_e%ye!==0)return!1;if(S)switch(me){case"hours":return!S(r.setHours(U,_e),"hours");case"minutes":return!S(r.setMinutes(U,_e),"minutes");case"seconds":return!S(r.setSeconds(U,_e),"seconds");default:return!1}return!0};switch(me){case"hours":{const _e=US(we,ae,i),ye=r.setHours(U,_e),Pe=r.setSeconds(r.setMinutes(ye,0),0),Ae=r.setSeconds(r.setMinutes(ye,59),59);return!ke({start:Pe,end:Ae})||!De(_e)}case"minutes":{const _e=r.setMinutes(U,we),ye=r.setSeconds(_e,0),Pe=r.setSeconds(_e,59);return!ke({start:ye,end:Pe})||!De(we,x)}case"seconds":{const _e=r.setSeconds(U,we);return!ke({start:_e,end:_e})||!De(we)}default:throw new Error("not supported")}},[i,U,p,h,ae,m,x,S,r,y,w,X,I]),fe=r0(),Z=v.useMemo(()=>{switch(ie){case"hours":{const we=(me,Se)=>{const xe=US(me,ae,i);pe(r.setHours(U,xe),Se,"hours")};return{onChange:we,viewValue:r.getHours(U),children:xdt({value:z,utils:r,ampm:i,onChange:we,getClockNumberText:K.hoursClockNumberText,isDisabled:me=>L||oe(me,"hours"),selectedId:fe})}}case"minutes":{const we=r.getMinutes(U),me=(Se,xe)=>{pe(r.setMinutes(U,Se),xe,"minutes")};return{viewValue:we,onChange:me,children:H7({utils:r,value:we,onChange:me,getClockNumberText:K.minutesClockNumberText,isDisabled:Se=>L||oe(Se,"minutes"),selectedId:fe})}}case"seconds":{const we=r.getSeconds(U),me=(Se,xe)=>{pe(r.setSeconds(U,Se),xe,"seconds")};return{viewValue:we,onChange:me,children:H7({utils:r,value:we,onChange:me,getClockNumberText:K.secondsClockNumberText,isDisabled:Se=>L||oe(Se,"seconds"),selectedId:fe})}}default:throw new Error("You must provide the type for ClockView")}},[ie,r,z,i,K.hoursClockNumberText,K.minutesClockNumberText,K.secondsClockNumberText,ae,pe,U,oe,fe,L]),ce=o,ge=jdt(ce);return R.jsxs(Bdt,ue({ref:n,className:de(ge.root,N),ownerState:ce},_,{children:[R.jsx(mdt,ue({autoFocus:s??!!O,ampmInClock:a&&I.includes("hours"),value:z,type:ie,ampm:i,minutesStep:x,isTimeDisabled:oe,meridiemMode:ae,handleMeridiemChange:se,selectedId:fe,disabled:L,readOnly:j},Z)),E&&R.jsx(zdt,{className:ge.arrowSwitcher,slots:l,slotProps:c,onGoToPrevious:()=>ee(Q),isPreviousDisabled:!Q,previousLabel:K.openPreviousView,onGoToNext:()=>ee(te),isNextDisabled:!te,nextLabel:K.openNextView,ownerState:ce})]}))});function Udt(e){return Wn("MuiDigitalClock",e)}const Wdt=Xn("MuiDigitalClock",["root","list","item"]);function Jm(e,t){return Array.isArray(t)?t.every(n=>e.indexOf(n)!==-1):e.indexOf(t)!==-1}const Gdt=(e,t)=>n=>{(n.key==="Enter"||n.key===" ")&&(e(n),n.preventDefault(),n.stopPropagation())},Sa=(e=document)=>{const t=e.activeElement;return t?t.shadowRoot?Sa(t.shadowRoot):t:null},PO=e=>Array.from(e.children).indexOf(Sa(document)),VV="@media (pointer: fine)",qdt=["ampm","timeStep","autoFocus","slots","slotProps","value","defaultValue","referenceDate","disableIgnoringDatePartForTimeValidation","maxTime","minTime","disableFuture","disablePast","minutesStep","shouldDisableTime","onChange","view","openTo","onViewChange","focusedView","onFocusedViewChange","className","disabled","readOnly","views","skipDisabled","timezone"],Kdt=e=>{const{classes:t}=e;return zn({root:["root"],list:["list"],item:["item"]},Udt,t)},Ydt=re(wM,{name:"MuiDigitalClock",slot:"Root",overridesResolver:(e,t)=>t.root})({overflowY:"auto",width:"100%","@media (prefers-reduced-motion: no-preference)":{scrollBehavior:"auto"},maxHeight:lle,variants:[{props:{alreadyRendered:!0},style:{"@media (prefers-reduced-motion: no-preference)":{scrollBehavior:"smooth"}}}]}),Qdt=re(UC,{name:"MuiDigitalClock",slot:"List",overridesResolver:(e,t)=>t.list})({padding:0}),Xdt=re(rn,{name:"MuiDigitalClock",slot:"Item",overridesResolver:(e,t)=>t.item})(({theme:e})=>({padding:"8px 16px",margin:"2px 4px","&:first-of-type":{marginTop:4},"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.hoverOpacity})`:St(e.palette.primary.main,e.palette.action.hoverOpacity)},"&.Mui-selected":{backgroundColor:(e.vars||e).palette.primary.main,color:(e.vars||e).palette.primary.contrastText,"&:focus-visible, &:hover":{backgroundColor:(e.vars||e).palette.primary.dark}},"&.Mui-focusVisible":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.focusOpacity})`:St(e.palette.primary.main,e.palette.action.focusOpacity)}})),Jdt=v.forwardRef(function(t,n){const r=Cn(),o=v.useRef(null),i=ua(n,o),a=v.useRef(null),s=cn({props:t,name:"MuiDigitalClock"}),{ampm:l=r.is12HourCycleInCurrentLocale(),timeStep:c=30,autoFocus:u,slots:d,slotProps:f,value:p,defaultValue:h,referenceDate:m,disableIgnoringDatePartForTimeValidation:y=!1,maxTime:w,minTime:x,disableFuture:S,disablePast:E,minutesStep:P=1,shouldDisableTime:T,onChange:I,view:A,openTo:k,onViewChange:O,focusedView:$,onFocusedViewChange:N,className:L,disabled:j,readOnly:D,views:_=["hours"],skipDisabled:z=!1,timezone:F}=s,V=zt(s,qdt),{value:U,handleValueChange:K,timezone:X}=i0({name:"DigitalClock",timezone:F,value:p,defaultValue:h,onChange:I,valueManager:go}),ie=$o(),ee=Ug(X),Q=v.useMemo(()=>ue({},s,{alreadyRendered:!!o.current}),[s]),te=Kdt(Q),pe=(d==null?void 0:d.digitalClockItem)??Xdt,ae=Yn({elementType:pe,externalSlotProps:f==null?void 0:f.digitalClockItem,ownerState:{},className:te.item}),se=zV({value:U,referenceDate:m,utils:r,props:s,timezone:X}),oe=kt(Se=>K(Se,"finish","hours")),{setValueAndGoToNextView:fe}=f1({view:A,views:_,openTo:k,onViewChange:O,onChange:oe,focusedView:$,onFocusedViewChange:N}),Z=kt(Se=>{fe(Se,"finish")});v.useEffect(()=>{if(o.current===null)return;const Se=o.current.querySelector('[role="listbox"] [role="option"][tabindex="0"], [role="listbox"] [role="option"][aria-selected="true"]');if(!Se)return;const xe=Se.offsetTop;(u||$)&&Se.focus(),o.current.scrollTop=xe-4});const ce=v.useCallback(Se=>{const xe=d1(y,r),ke=()=>!(x&&xe(x,Se)||w&&xe(Se,w)||S&&xe(Se,ee)||E&&xe(ee,Se)),De=()=>r.getMinutes(Se)%P!==0?!1:T?!T(Se,"hours"):!0;return!ke()||!De()},[y,r,x,w,S,ee,E,P,T]),ge=v.useMemo(()=>{const Se=[];let ke=r.startOfDay(se);for(;r.isSameDay(se,ke);)Se.push(ke),ke=r.addMinutes(ke,c);return Se},[se,c,r]),we=ge.findIndex(Se=>r.isEqual(Se,se)),me=Se=>{switch(Se.key){case"PageUp":{const xe=PO(a.current)-5,ke=a.current.children,De=Math.max(0,xe),_e=ke[De];_e&&_e.focus(),Se.preventDefault();break}case"PageDown":{const xe=PO(a.current)+5,ke=a.current.children,De=Math.min(ke.length-1,xe),_e=ke[De];_e&&_e.focus(),Se.preventDefault();break}}};return R.jsx(Ydt,ue({ref:i,className:de(te.root,L),ownerState:Q},V,{children:R.jsx(Qdt,{ref:a,role:"listbox","aria-label":ie.timePickerToolbarTitle,className:te.list,onKeyDown:me,children:ge.map((Se,xe)=>{if(z&&ce(Se))return null;const ke=r.isEqual(Se,U),De=r.format(Se,l?"fullTime12h":"fullTime24h"),_e=we===xe||we===-1&&xe===0?0:-1;return R.jsx(pe,ue({onClick:()=>!D&&Z(Se),selected:ke,disabled:j||ce(Se),disableRipple:D,role:"option","aria-disabled":D,"aria-selected":ke,tabIndex:_e},ae,{children:De}),`${Se.valueOf()}-${De}`)})})}))});function Zdt(e){return Wn("MuiMultiSectionDigitalClock",e)}const Y7=Xn("MuiMultiSectionDigitalClock",["root"]);function eft(e){return Wn("MuiMultiSectionDigitalClockSection",e)}const tft=Xn("MuiMultiSectionDigitalClockSection",["root","item"]),nft=["autoFocus","onChange","className","disabled","readOnly","items","active","slots","slotProps","skipDisabled"],rft=e=>{const{classes:t}=e;return zn({root:["root"],item:["item"]},eft,t)},oft=re(UC,{name:"MuiMultiSectionDigitalClockSection",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({maxHeight:lle,width:56,padding:0,overflow:"hidden","@media (prefers-reduced-motion: no-preference)":{scrollBehavior:"auto"},"@media (pointer: fine)":{"&:hover":{overflowY:"auto"}},"@media (pointer: none), (pointer: coarse)":{overflowY:"auto"},"&:not(:first-of-type)":{borderLeft:`1px solid ${(e.vars||e).palette.divider}`},"&::after":{display:"block",content:'""',height:"calc(100% - 40px - 6px)"},variants:[{props:{alreadyRendered:!0},style:{"@media (prefers-reduced-motion: no-preference)":{scrollBehavior:"smooth"}}}]})),ift=re(rn,{name:"MuiMultiSectionDigitalClockSection",slot:"Item",overridesResolver:(e,t)=>t.item})(({theme:e})=>({padding:8,margin:"2px 4px",width:Gw,justifyContent:"center","&:first-of-type":{marginTop:4},"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.hoverOpacity})`:St(e.palette.primary.main,e.palette.action.hoverOpacity)},"&.Mui-selected":{backgroundColor:(e.vars||e).palette.primary.main,color:(e.vars||e).palette.primary.contrastText,"&:focus-visible, &:hover":{backgroundColor:(e.vars||e).palette.primary.dark}},"&.Mui-focusVisible":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.focusOpacity})`:St(e.palette.primary.main,e.palette.action.focusOpacity)}})),aft=v.forwardRef(function(t,n){const r=v.useRef(null),o=ua(n,r),i=v.useRef(null),a=cn({props:t,name:"MuiMultiSectionDigitalClockSection"}),{autoFocus:s,onChange:l,className:c,disabled:u,readOnly:d,items:f,active:p,slots:h,slotProps:m,skipDisabled:y}=a,w=zt(a,nft),x=v.useMemo(()=>ue({},a,{alreadyRendered:!!r.current}),[a]),S=rft(x),E=(h==null?void 0:h.digitalClockSectionItem)??ift;v.useEffect(()=>{if(r.current===null)return;const I=r.current.querySelector('[role="option"][tabindex="0"], [role="option"][aria-selected="true"]');if(p&&s&&I&&I.focus(),!I||i.current===I)return;i.current=I;const A=I.offsetTop;r.current.scrollTop=A-4});const P=f.findIndex(I=>I.isFocused(I.value)),T=I=>{switch(I.key){case"PageUp":{const A=PO(r.current)-5,k=r.current.children,O=Math.max(0,A),$=k[O];$&&$.focus(),I.preventDefault();break}case"PageDown":{const A=PO(r.current)+5,k=r.current.children,O=Math.min(k.length-1,A),$=k[O];$&&$.focus(),I.preventDefault();break}}};return R.jsx(oft,ue({ref:o,className:de(S.root,c),ownerState:x,autoFocusItem:s&&p,role:"listbox",onKeyDown:T},w,{children:f.map((I,A)=>{var L;const k=(L=I.isDisabled)==null?void 0:L.call(I,I.value),O=u||k;if(y&&O)return null;const $=I.isSelected(I.value),N=P===A||P===-1&&A===0?0:-1;return R.jsx(E,ue({onClick:()=>!d&&l(I.value),selected:$,disabled:O,disableRipple:d,role:"option","aria-disabled":d||O||void 0,"aria-label":I.ariaLabel,"aria-selected":$,tabIndex:N,className:S.item},m==null?void 0:m.digitalClockSectionItem,{children:I.label}),I.label)})}))}),sft=({now:e,value:t,utils:n,ampm:r,isDisabled:o,resolveAriaLabel:i,timeStep:a,valueOrReferenceDate:s})=>{const l=t?n.getHours(t):null,c=[],u=(p,h)=>{const m=h??l;return m===null?!1:r?p===12?m===12||m===0:m===p||m-12===p:m===p},d=p=>u(p,n.getHours(s)),f=r?11:23;for(let p=0;p<=f;p+=a){let h=n.format(n.setHours(e,p),r?"hours12h":"hours24h");const m=i(parseInt(h,10).toString());h=n.formatNumber(h),c.push({value:p,label:h,isSelected:u,isDisabled:o,isFocused:d,ariaLabel:m})}return c},Q7=({value:e,utils:t,isDisabled:n,timeStep:r,resolveLabel:o,resolveAriaLabel:i,hasValue:a=!0})=>{const s=c=>e===null?!1:a&&e===c,l=c=>e===c;return[...Array.from({length:Math.ceil(60/r)},(c,u)=>{const d=r*u;return{value:d,label:t.formatNumber(o(d)),isDisabled:n,isSelected:s,isFocused:l,ariaLabel:i(d.toString())}})]},lft=["ampm","timeSteps","autoFocus","slots","slotProps","value","defaultValue","referenceDate","disableIgnoringDatePartForTimeValidation","maxTime","minTime","disableFuture","disablePast","minutesStep","shouldDisableTime","onChange","view","views","openTo","onViewChange","focusedView","onFocusedViewChange","className","disabled","readOnly","skipDisabled","timezone"],cft=e=>{const{classes:t}=e;return zn({root:["root"]},Zdt,t)},uft=re(wM,{name:"MuiMultiSectionDigitalClock",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({display:"flex",flexDirection:"row",width:"100%",borderBottom:`1px solid ${(e.vars||e).palette.divider}`})),dft=v.forwardRef(function(t,n){const r=Cn(),o=dr(),i=cn({props:t,name:"MuiMultiSectionDigitalClock"}),{ampm:a=r.is12HourCycleInCurrentLocale(),timeSteps:s,autoFocus:l,slots:c,slotProps:u,value:d,defaultValue:f,referenceDate:p,disableIgnoringDatePartForTimeValidation:h=!1,maxTime:m,minTime:y,disableFuture:w,disablePast:x,minutesStep:S=1,shouldDisableTime:E,onChange:P,view:T,views:I=["hours","minutes"],openTo:A,onViewChange:k,focusedView:O,onFocusedViewChange:$,className:N,disabled:L,readOnly:j,skipDisabled:D=!1,timezone:_}=i,z=zt(i,lft),{value:F,handleValueChange:V,timezone:U}=i0({name:"MultiSectionDigitalClock",timezone:_,value:d,defaultValue:f,onChange:P,valueManager:go}),K=$o(),X=Ug(U),ie=v.useMemo(()=>ue({hours:1,minutes:5,seconds:5},s),[s]),ee=zV({value:F,referenceDate:p,utils:r,props:i,timezone:U}),Q=kt((ke,De,_e)=>V(ke,De,_e)),te=v.useMemo(()=>!a||!I.includes("hours")||I.includes("meridiem")?I:[...I,"meridiem"],[a,I]),{view:pe,setValueAndGoToNextView:ae,focusedView:se}=f1({view:T,views:te,openTo:A,onViewChange:k,onChange:Q,focusedView:O,onFocusedViewChange:$}),oe=kt(ke=>{ae(ke,"finish","meridiem")}),{meridiemMode:fe,handleMeridiemChange:Z}=mM(ee,a,oe,"finish"),ce=v.useCallback((ke,De)=>{const _e=d1(h,r),ye=De==="hours"||De==="minutes"&&te.includes("seconds"),Pe=({start:Me,end:We})=>!(y&&_e(y,We)||m&&_e(Me,m)||w&&_e(Me,X)||x&&_e(X,ye?We:Me)),Ae=(Me,We=1)=>{if(Me%We!==0)return!1;if(E)switch(De){case"hours":return!E(r.setHours(ee,Me),"hours");case"minutes":return!E(r.setMinutes(ee,Me),"minutes");case"seconds":return!E(r.setSeconds(ee,Me),"seconds");default:return!1}return!0};switch(De){case"hours":{const Me=US(ke,fe,a),We=r.setHours(ee,Me),He=r.setSeconds(r.setMinutes(We,0),0),Xe=r.setSeconds(r.setMinutes(We,59),59);return!Pe({start:He,end:Xe})||!Ae(Me)}case"minutes":{const Me=r.setMinutes(ee,ke),We=r.setSeconds(Me,0),He=r.setSeconds(Me,59);return!Pe({start:We,end:He})||!Ae(ke,S)}case"seconds":{const Me=r.setSeconds(ee,ke);return!Pe({start:Me,end:Me})||!Ae(ke)}default:throw new Error("not supported")}},[a,ee,h,m,fe,y,S,E,r,w,x,X,te]),ge=v.useCallback(ke=>{switch(ke){case"hours":return{onChange:De=>{const _e=US(De,fe,a);ae(r.setHours(ee,_e),"finish","hours")},items:sft({now:X,value:F,ampm:a,utils:r,isDisabled:De=>ce(De,"hours"),timeStep:ie.hours,resolveAriaLabel:K.hoursClockNumberText,valueOrReferenceDate:ee})};case"minutes":return{onChange:De=>{ae(r.setMinutes(ee,De),"finish","minutes")},items:Q7({value:r.getMinutes(ee),utils:r,isDisabled:De=>ce(De,"minutes"),resolveLabel:De=>r.format(r.setMinutes(X,De),"minutes"),timeStep:ie.minutes,hasValue:!!F,resolveAriaLabel:K.minutesClockNumberText})};case"seconds":return{onChange:De=>{ae(r.setSeconds(ee,De),"finish","seconds")},items:Q7({value:r.getSeconds(ee),utils:r,isDisabled:De=>ce(De,"seconds"),resolveLabel:De=>r.format(r.setSeconds(X,De),"seconds"),timeStep:ie.seconds,hasValue:!!F,resolveAriaLabel:K.secondsClockNumberText})};case"meridiem":{const De=mc(r,"am"),_e=mc(r,"pm");return{onChange:Z,items:[{value:"am",label:De,isSelected:()=>!!F&&fe==="am",isFocused:()=>!!ee&&fe==="am",ariaLabel:De},{value:"pm",label:_e,isSelected:()=>!!F&&fe==="pm",isFocused:()=>!!ee&&fe==="pm",ariaLabel:_e}]}}default:throw new Error(`Unknown view: ${ke} found.`)}},[X,F,a,r,ie.hours,ie.minutes,ie.seconds,K.hoursClockNumberText,K.minutesClockNumberText,K.secondsClockNumberText,fe,ae,ee,ce,Z]),we=v.useMemo(()=>{if(!o)return te;const ke=te.filter(De=>De!=="meridiem");return ke.reverse(),te.includes("meridiem")&&ke.push("meridiem"),ke},[o,te]),me=v.useMemo(()=>te.reduce((ke,De)=>ue({},ke,{[De]:ge(De)}),{}),[te,ge]),Se=i,xe=cft(Se);return R.jsx(uft,ue({ref:n,className:de(xe.root,N),ownerState:Se,role:"group"},z,{children:we.map(ke=>R.jsx(aft,{items:me[ke].items,onChange:me[ke].onChange,active:pe===ke,autoFocus:l??se===ke,disabled:L,readOnly:j,slots:c,slotProps:u,skipDisabled:D,"aria-label":K.selectViewText(ke)},ke))}))});function fft(e){return Wn("MuiPickersDay",e)}const dh=Xn("MuiPickersDay",["root","dayWithMargin","dayOutsideMonth","hiddenDaySpacingFiller","today","selected","disabled"]),pft=["autoFocus","className","day","disabled","disableHighlightToday","disableMargin","hidden","isAnimating","onClick","onDaySelect","onFocus","onBlur","onKeyDown","onMouseDown","onMouseEnter","outsideCurrentMonth","selected","showDaysOutsideCurrentMonth","children","today","isFirstVisibleCell","isLastVisibleCell"],hft=e=>{const{selected:t,disableMargin:n,disableHighlightToday:r,today:o,disabled:i,outsideCurrentMonth:a,showDaysOutsideCurrentMonth:s,classes:l}=e,c=a&&!s;return zn({root:["root",t&&!c&&"selected",i&&"disabled",!n&&"dayWithMargin",!r&&o&&"today",a&&s&&"dayOutsideMonth",c&&"hiddenDaySpacingFiller"],hiddenDaySpacingFiller:["hiddenDaySpacingFiller"]},fft,l)},ble=({theme:e})=>ue({},e.typography.caption,{width:WS,height:WS,borderRadius:"50%",padding:0,backgroundColor:"transparent",transition:e.transitions.create("background-color",{duration:e.transitions.duration.short}),color:(e.vars||e).palette.text.primary,"@media (pointer: fine)":{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.hoverOpacity})`:St(e.palette.primary.main,e.palette.action.hoverOpacity)}},"&:focus":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.focusOpacity})`:St(e.palette.primary.main,e.palette.action.focusOpacity),[`&.${dh.selected}`]:{willChange:"background-color",backgroundColor:(e.vars||e).palette.primary.dark}},[`&.${dh.selected}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.main,fontWeight:e.typography.fontWeightMedium,"&:hover":{willChange:"background-color",backgroundColor:(e.vars||e).palette.primary.dark}},[`&.${dh.disabled}:not(.${dh.selected})`]:{color:(e.vars||e).palette.text.disabled},[`&.${dh.disabled}&.${dh.selected}`]:{opacity:.6},variants:[{props:{disableMargin:!1},style:{margin:`0 ${yM}px`}},{props:{outsideCurrentMonth:!0,showDaysOutsideCurrentMonth:!0},style:{color:(e.vars||e).palette.text.secondary}},{props:{disableHighlightToday:!1,today:!0},style:{[`&:not(.${dh.selected})`]:{border:`1px solid ${(e.vars||e).palette.text.secondary}`}}}]}),wle=(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableMargin&&t.dayWithMargin,!n.disableHighlightToday&&n.today&&t.today,!n.outsideCurrentMonth&&n.showDaysOutsideCurrentMonth&&t.dayOutsideMonth,n.outsideCurrentMonth&&!n.showDaysOutsideCurrentMonth&&t.hiddenDaySpacingFiller]},gft=re(ca,{name:"MuiPickersDay",slot:"Root",overridesResolver:wle})(ble),mft=re("div",{name:"MuiPickersDay",slot:"Root",overridesResolver:wle})(({theme:e})=>ue({},ble({theme:e}),{opacity:0,pointerEvents:"none"})),vw=()=>{},yft=v.forwardRef(function(t,n){const r=cn({props:t,name:"MuiPickersDay"}),{autoFocus:o=!1,className:i,day:a,disabled:s=!1,disableHighlightToday:l=!1,disableMargin:c=!1,isAnimating:u,onClick:d,onDaySelect:f,onFocus:p=vw,onBlur:h=vw,onKeyDown:m=vw,onMouseDown:y=vw,onMouseEnter:w=vw,outsideCurrentMonth:x,selected:S=!1,showDaysOutsideCurrentMonth:E=!1,children:P,today:T=!1}=r,I=zt(r,pft),A=ue({},r,{autoFocus:o,disabled:s,disableHighlightToday:l,disableMargin:c,selected:S,showDaysOutsideCurrentMonth:E,today:T}),k=hft(A),O=Cn(),$=v.useRef(null),N=ua($,n);xu(()=>{o&&!s&&!u&&!x&&$.current.focus()},[o,s,u,x]);const L=D=>{y(D),x&&D.preventDefault()},j=D=>{s||f(a),x&&D.currentTarget.focus(),d&&d(D)};return x&&!E?R.jsx(mft,{className:de(k.root,k.hiddenDaySpacingFiller,i),ownerState:A,role:I.role}):R.jsx(gft,ue({className:de(k.root,i),ref:N,centerRipple:!0,disabled:s,tabIndex:S?0:-1,onKeyDown:D=>m(D,a),onFocus:D=>p(D,a),onBlur:D=>h(D,a),onMouseEnter:D=>w(D,a),onClick:j,onMouseDown:L},I,{ownerState:A,children:P||O.format(a,"dayOfMonth")}))}),vft=v.memo(yft),a0=({props:e,value:t,timezone:n,adapter:r})=>{if(t===null)return null;const{shouldDisableDate:o,shouldDisableMonth:i,shouldDisableYear:a,disablePast:s,disableFuture:l}=e,c=r.utils.date(void 0,n),u=Li(r.utils,e.minDate,r.defaultDates.minDate),d=Li(r.utils,e.maxDate,r.defaultDates.maxDate);switch(!0){case!r.utils.isValid(t):return"invalidDate";case!!(o&&o(t)):return"shouldDisableDate";case!!(i&&i(t)):return"shouldDisableMonth";case!!(a&&a(t)):return"shouldDisableYear";case!!(l&&r.utils.isAfterDay(t,c)):return"disableFuture";case!!(s&&r.utils.isBeforeDay(t,c)):return"disablePast";case!!(u&&r.utils.isBeforeDay(t,u)):return"minDate";case!!(d&&r.utils.isAfterDay(t,d)):return"maxDate";default:return null}};a0.valueManager=go;const p1=({adapter:e,value:t,timezone:n,props:r})=>{if(t===null)return null;const{minTime:o,maxTime:i,minutesStep:a,shouldDisableTime:s,disableIgnoringDatePartForTimeValidation:l=!1,disablePast:c,disableFuture:u}=r,d=e.utils.date(void 0,n),f=d1(l,e.utils);switch(!0){case!e.utils.isValid(t):return"invalidDate";case!!(o&&f(o,t)):return"minTime";case!!(i&&f(t,i)):return"maxTime";case!!(u&&e.utils.isAfter(t,d)):return"disableFuture";case!!(c&&e.utils.isBefore(t,d)):return"disablePast";case!!(s&&s(t,"hours")):return"shouldDisableTime-hours";case!!(s&&s(t,"minutes")):return"shouldDisableTime-minutes";case!!(s&&s(t,"seconds")):return"shouldDisableTime-seconds";case!!(a&&e.utils.getMinutes(t)%a!==0):return"minutesStep";default:return null}};p1.valueManager=go;const SM=({adapter:e,value:t,timezone:n,props:r})=>{const o=a0({adapter:e,value:t,timezone:n,props:r});return o!==null?o:p1({adapter:e,value:t,timezone:n,props:r})};SM.valueManager=go;const hF=["disablePast","disableFuture","minDate","maxDate","shouldDisableDate","shouldDisableMonth","shouldDisableYear"],gF=["disablePast","disableFuture","minTime","maxTime","shouldDisableTime","minutesStep","ampm","disableIgnoringDatePartForTimeValidation"],xle=["minDateTime","maxDateTime"],bft=[...hF,...gF,...xle],s0=e=>bft.reduce((t,n)=>(e.hasOwnProperty(n)&&(t[n]=e[n]),t),{});function Sle(e){const{props:t,validator:n,value:r,timezone:o,onError:i}=e,a=Vg(),s=v.useRef(n.valueManager.defaultErrorState),l=n({adapter:a,value:r,timezone:o,props:t}),c=n.valueManager.hasError(l);v.useEffect(()=>{i&&!n.valueManager.isSameError(l,s.current)&&i(l,r),s.current=l},[n,i,l,r]);const u=kt(d=>n({adapter:a,value:d,timezone:o,props:t}));return{validationError:l,hasValidationError:c,getValidationErrorForNewValue:u}}const wft=({utils:e,format:t})=>{let n=10,r=t,o=e.expandFormat(t);for(;o!==r;)if(r=o,o=e.expandFormat(r),n-=1,n<0)throw new Error("MUI X: The format expansion seems to be in an infinite loop. Please open an issue with the format passed to the picker component.");return o},xft=({utils:e,expandedFormat:t})=>{const n=[],{start:r,end:o}=e.escapedCharacters,i=new RegExp(`(\\${r}[^\\${o}]*\\${o})+`,"g");let a=null;for(;a=i.exec(t);)n.push({start:a.index,end:i.lastIndex-1});return n},Sft=(e,t,n,r)=>{switch(n.type){case"year":return t.fieldYearPlaceholder({digitAmount:e.formatByString(e.date(void 0,"default"),r).length,format:r});case"month":return t.fieldMonthPlaceholder({contentType:n.contentType,format:r});case"day":return t.fieldDayPlaceholder({format:r});case"weekDay":return t.fieldWeekDayPlaceholder({contentType:n.contentType,format:r});case"hours":return t.fieldHoursPlaceholder({format:r});case"minutes":return t.fieldMinutesPlaceholder({format:r});case"seconds":return t.fieldSecondsPlaceholder({format:r});case"meridiem":return t.fieldMeridiemPlaceholder({format:r});default:return r}},Cft=({utils:e,date:t,shouldRespectLeadingZeros:n,localeText:r,localizedDigits:o,now:i,token:a,startSeparator:s})=>{if(a==="")throw new Error("MUI X: Should not call `commitToken` with an empty token");const l=ple(e,a),c=vle(e,l.contentType,l.type,a),u=n?c:l.contentType==="digit",d=t!=null&&e.isValid(t);let f=d?e.formatByString(t,a):"",p=null;if(u)if(c)p=f===""?e.formatByString(i,a).length:f.length;else{if(l.maxLength==null)throw new Error(`MUI X: The token ${a} should have a 'maxDigitNumber' property on it's adapter`);p=l.maxLength,d&&(f=FV(gle(Eg(f,o),p),o))}return ue({},l,{format:a,maxLength:p,value:f,placeholder:Sft(e,r,l,a),hasLeadingZerosInFormat:c,hasLeadingZerosInInput:u,startSeparator:s,endSeparator:"",modified:!1})},Eft=e=>{var p;const{utils:t,expandedFormat:n,escapedParts:r}=e,o=t.date(void 0),i=[];let a="";const s=Object.keys(t.formatTokenMap).sort((h,m)=>m.length-h.length),l=/^([a-zA-Z]+)/,c=new RegExp(`^(${s.join("|")})*$`),u=new RegExp(`^(${s.join("|")})`),d=h=>r.find(m=>m.start<=h&&m.end>=h);let f=0;for(;f0;){const x=u.exec(w)[1];w=w.slice(x.length),i.push(Cft(ue({},e,{now:o,token:x,startSeparator:a}))),a=""}f+=y.length}else{const w=n[f];m&&(h==null?void 0:h.start)===f||(h==null?void 0:h.end)===f||(i.length===0?a+=w:i[i.length-1].endSeparator+=w),f+=1}}return i.length===0&&a.length>0&&i.push({type:"empty",contentType:"letter",maxLength:null,format:"",value:"",placeholder:"",hasLeadingZerosInFormat:!1,hasLeadingZerosInInput:!1,startSeparator:a,endSeparator:"",modified:!1}),i},Pft=({isRtl:e,formatDensity:t,sections:n})=>n.map(r=>{const o=i=>{let a=i;return e&&a!==null&&a.includes(" ")&&(a=`⁩${a}⁦`),t==="spacious"&&["/",".","-"].includes(a)&&(a=` ${a} `),a};return r.startSeparator=o(r.startSeparator),r.endSeparator=o(r.endSeparator),r}),X7=e=>{let t=wft(e);e.isRtl&&e.enableAccessibleFieldDOMStructure&&(t=t.split(" ").reverse().join(" "));const n=xft(ue({},e,{expandedFormat:t})),r=Eft(ue({},e,{expandedFormat:t,escapedParts:n}));return Pft(ue({},e,{sections:r}))},Tft=e=>{const t=Cn(),n=$o(),r=Vg(),o=dr(),{valueManager:i,fieldValueManager:a,valueType:s,validator:l,internalProps:c,internalProps:{value:u,defaultValue:d,referenceDate:f,onChange:p,format:h,formatDensity:m="dense",selectedSections:y,onSelectedSectionsChange:w,shouldRespectLeadingZeros:x=!1,timezone:S,enableAccessibleFieldDOMStructure:E=!1}}=e,{timezone:P,value:T,handleValueChange:I}=LV({timezone:S,value:u,defaultValue:d,onChange:p,valueManager:i}),A=v.useMemo(()=>Tdt(t),[t]),k=v.useMemo(()=>Mdt(t,A,P),[t,A,P]),O=v.useCallback((Q,te=null)=>a.getSectionsFromValue(t,Q,te,pe=>X7({utils:t,localeText:n,localizedDigits:A,format:h,date:pe,formatDensity:m,shouldRespectLeadingZeros:x,enableAccessibleFieldDOMStructure:E,isRtl:o})),[a,h,n,A,o,x,t,m,E]),[$,N]=v.useState(()=>{const Q=O(T),te={sections:Q,value:T,referenceValue:i.emptyValue,tempValueStrAndroid:null},pe=Sdt(Q),ae=i.getInitialReferenceValue({referenceDate:f,value:T,utils:t,props:c,granularity:pe,timezone:P});return ue({},te,{referenceValue:ae})}),[L,j]=Sg({controlled:y,default:null,name:"useField",state:"selectedSections"}),D=Q=>{j(Q),w==null||w(Q)},_=v.useMemo(()=>pF(L,$.sections),[L,$.sections]),z=_==="all"?0:_,F=({value:Q,referenceValue:te,sections:pe})=>{if(N(se=>ue({},se,{sections:pe,value:Q,referenceValue:te,tempValueStrAndroid:null})),i.areValuesEqual(t,$.value,Q))return;const ae={validationError:l({adapter:r,value:Q,timezone:P,props:c})};I(Q,ae)},V=(Q,te)=>{const pe=[...$.sections];return pe[Q]=ue({},pe[Q],{value:te,modified:!0}),pe},U=()=>{F({value:i.emptyValue,referenceValue:$.referenceValue,sections:O(i.emptyValue)})},K=()=>{if(z==null)return;const Q=$.sections[z],te=a.getActiveDateManager(t,$,Q),ae=te.getSections($.sections).filter(Z=>Z.value!=="").length===(Q.value===""?0:1),se=V(z,""),oe=ae?null:t.getInvalidDate(),fe=te.getNewValuesFromNewActiveDate(oe);F(ue({},fe,{sections:se}))},X=Q=>{const te=(se,oe)=>{const fe=t.parse(se,h);if(fe==null||!t.isValid(fe))return null;const Z=X7({utils:t,localeText:n,localizedDigits:A,format:h,date:fe,formatDensity:m,shouldRespectLeadingZeros:x,enableAccessibleFieldDOMStructure:E,isRtl:o});return K7(t,fe,Z,oe,!1)},pe=a.parseValueStr(Q,$.referenceValue,te),ae=a.updateReferenceValue(t,pe,$.referenceValue);F({value:pe,referenceValue:ae,sections:O(pe,$.sections)})},ie=({activeSection:Q,newSectionValue:te,shouldGoToNextSection:pe})=>{pe&&z<$.sections.length-1&&D(z+1);const ae=a.getActiveDateManager(t,$,Q),se=V(z,te),oe=ae.getSections(se),fe=Odt(t,oe,A);let Z,ce;if(fe!=null&&t.isValid(fe)){const ge=K7(t,fe,oe,ae.referenceDate,!0);Z=ae.getNewValuesFromNewActiveDate(ge),ce=!0}else Z=ae.getNewValuesFromNewActiveDate(fe),ce=(fe!=null&&!t.isValid(fe))!=(ae.date!=null&&!t.isValid(ae.date));return ce?F(ue({},Z,{sections:se})):N(ge=>ue({},ge,Z,{sections:se,tempValueStrAndroid:null}))},ee=Q=>N(te=>ue({},te,{tempValueStrAndroid:Q}));return v.useEffect(()=>{const Q=O($.value);N(te=>ue({},te,{sections:Q}))},[h,t.locale,o]),v.useEffect(()=>{let Q;i.areValuesEqual(t,$.value,T)?Q=i.getTimezone(t,$.value)!==i.getTimezone(t,T):Q=!0,Q&&N(te=>ue({},te,{value:T,referenceValue:a.updateReferenceValue(t,T,te.referenceValue),sections:O(T)}))},[T]),{state:$,activeSectionIndex:z,parsedSelectedSections:_,setSelectedSections:D,clearValue:U,clearActiveSection:K,updateSectionValue:ie,updateValueFromValueStr:X,setTempAndroidValueStr:ee,getSectionsFromValue:O,sectionsValueBoundaries:k,localizedDigits:A,timezone:P}},Ift=5e3,Nm=e=>e.saveQuery!=null,Oft=({sections:e,updateSectionValue:t,sectionsValueBoundaries:n,localizedDigits:r,setTempAndroidValueStr:o,timezone:i})=>{const a=Cn(),[s,l]=v.useState(null),c=kt(()=>l(null));v.useEffect(()=>{var h;s!=null&&((h=e[s.sectionIndex])==null?void 0:h.type)!==s.sectionType&&c()},[e,s,c]),v.useEffect(()=>{if(s!=null){const h=setTimeout(()=>c(),Ift);return()=>{clearTimeout(h)}}return()=>{}},[s,c]);const u=({keyPressed:h,sectionIndex:m},y,w)=>{const x=h.toLowerCase(),S=e[m];if(s!=null&&(!w||w(s.value))&&s.sectionIndex===m){const P=`${s.value}${x}`,T=y(P,S);if(!Nm(T))return l({sectionIndex:m,value:P,sectionType:S.type}),T}const E=y(x,S);return Nm(E)&&!E.saveQuery?(c(),null):(l({sectionIndex:m,value:x,sectionType:S.type}),Nm(E)?null:E)},d=h=>{const m=(x,S,E)=>{const P=S.filter(T=>T.toLowerCase().startsWith(E));return P.length===0?{saveQuery:!1}:{sectionValue:P[0],shouldGoToNextSection:P.length===1}},y=(x,S,E,P)=>{const T=I=>hle(a,i,S.type,I);if(S.contentType==="letter")return m(S.format,T(S.format),x);if(E&&P!=null&&ple(a,E).contentType==="letter"){const I=T(E),A=m(E,I,x);return Nm(A)?{saveQuery:!1}:ue({},A,{sectionValue:P(A.sectionValue,I)})}return{saveQuery:!1}};return u(h,(x,S)=>{switch(S.type){case"month":{const E=P=>G7(a,P,a.formats.month,S.format);return y(x,S,a.formats.month,E)}case"weekDay":{const E=(P,T)=>T.indexOf(P).toString();return y(x,S,a.formats.weekday,E)}case"meridiem":return y(x,S);default:return{saveQuery:!1}}})},f=h=>{const m=(w,x)=>{const S=Eg(w,r),E=Number(S),P=n[x.type]({currentDate:null,format:x.format,contentType:x.contentType});if(E>P.maximum)return{saveQuery:!1};if(EP.maximum||S.length===P.maximum.toString().length;return{sectionValue:mle(a,E,P,r,x),shouldGoToNextSection:T}};return u(h,(w,x)=>{if(x.contentType==="digit"||x.contentType==="digit-with-letter")return m(w,x);if(x.type==="month"){const S=vle(a,"digit","month","MM"),E=m(w,{type:x.type,format:"MM",hasLeadingZerosInFormat:S,hasLeadingZerosInInput:!0,contentType:"digit",maxLength:2});if(Nm(E))return E;const P=G7(a,E.sectionValue,"MM",x.format);return ue({},E,{sectionValue:P})}if(x.type==="weekDay"){const S=m(w,x);if(Nm(S))return S;const E=xM(a,x.format)[Number(S.sectionValue)-1];return ue({},S,{sectionValue:E})}return{saveQuery:!1}},w=>W7(w,r))};return{applyCharacterEditing:kt(h=>{const m=e[h.sectionIndex],w=W7(h.keyPressed,r)?f(ue({},h,{keyPressed:FV(h.keyPressed,r)})):d(h);if(w==null){o(null);return}t({activeSection:m,newSectionValue:w.sectionValue,shouldGoToNextSection:w.shouldGoToNextSection})}),resetCharacterQuery:c}},Aft=e=>{const{internalProps:{disabled:t,readOnly:n=!1},forwardedProps:{sectionListRef:r,onBlur:o,onClick:i,onFocus:a,onInput:s,onPaste:l,focused:c,autoFocus:u=!1},fieldValueManager:d,applyCharacterEditing:f,resetCharacterQuery:p,setSelectedSections:h,parsedSelectedSections:m,state:y,clearActiveSection:w,clearValue:x,updateSectionValue:S,updateValueFromValueStr:E,sectionOrder:P,areAllSectionsEmpty:T,sectionsValueBoundaries:I}=e,A=v.useRef(null),k=ua(r,A),O=$o(),$=Cn(),N=r0(),[L,j]=v.useState(!1),D=v.useMemo(()=>({syncSelectionToDOM:()=>{if(!A.current)return;const ce=document.getSelection();if(!ce)return;if(m==null){ce.rangeCount>0&&A.current.getRoot().contains(ce.getRangeAt(0).startContainer)&&ce.removeAllRanges(),L&&A.current.getRoot().blur();return}if(!A.current.getRoot().contains(Sa(document)))return;const ge=new window.Range;let we;m==="all"?we=A.current.getRoot():y.sections[m].type==="empty"?we=A.current.getSectionContainer(m):we=A.current.getSectionContent(m),ge.selectNodeContents(we),we.focus(),ce.removeAllRanges(),ce.addRange(ge)},getActiveSectionIndexFromDOM:()=>{const ce=Sa(document);return!ce||!A.current||!A.current.getRoot().contains(ce)?null:A.current.getSectionIndexFromDOMElement(ce)},focusField:(ce=0)=>{if(!A.current)return;const ge=pF(ce,y.sections);j(!0),A.current.getSectionContent(ge).focus()},setSelectedSections:ce=>{if(!A.current)return;const ge=pF(ce,y.sections);j((ge==="all"?0:ge)!==null),h(ce)},isFieldFocused:()=>{const ce=Sa(document);return!!A.current&&A.current.getRoot().contains(ce)}}),[m,h,y.sections,L]),_=kt(ce=>{if(!A.current)return;const ge=y.sections[ce];A.current.getSectionContent(ce).innerHTML=ge.value||ge.placeholder,D.syncSelectionToDOM()}),z=kt((ce,...ge)=>{ce.isDefaultPrevented()||!A.current||(j(!0),i==null||i(ce,...ge),m==="all"?setTimeout(()=>{const we=document.getSelection().getRangeAt(0).startOffset;if(we===0){h(P.startIndex);return}let me=0,Se=0;for(;Se{if(s==null||s(ce),!A.current||m!=="all")return;const we=ce.target.textContent??"";A.current.getRoot().innerHTML=y.sections.map(me=>`${me.startSeparator}${me.value||me.placeholder}${me.endSeparator}`).join(""),D.syncSelectionToDOM(),we.length===0||we.charCodeAt(0)===10?(p(),x(),h("all")):we.length>1?E(we):f({keyPressed:we,sectionIndex:0})}),V=kt(ce=>{if(l==null||l(ce),n||m!=="all"){ce.preventDefault();return}const ge=ce.clipboardData.getData("text");ce.preventDefault(),p(),E(ge)}),U=kt((...ce)=>{if(a==null||a(...ce),L||!A.current)return;j(!0),A.current.getSectionIndexFromDOMElement(Sa(document))!=null||h(P.startIndex)}),K=kt((...ce)=>{o==null||o(...ce),setTimeout(()=>{if(!A.current)return;const ge=Sa(document);!A.current.getRoot().contains(ge)&&(j(!1),h(null))})}),X=kt(ce=>ge=>{ge.isDefaultPrevented()||h(ce)}),ie=kt(ce=>{ce.preventDefault()}),ee=kt(ce=>()=>{h(ce)}),Q=kt(ce=>{if(ce.preventDefault(),n||t||typeof m!="number")return;const ge=y.sections[m],we=ce.clipboardData.getData("text"),me=/^[a-zA-Z]+$/.test(we),Se=/^[0-9]+$/.test(we),xe=/^(([a-zA-Z]+)|)([0-9]+)(([a-zA-Z]+)|)$/.test(we);ge.contentType==="letter"&&me||ge.contentType==="digit"&&Se||ge.contentType==="digit-with-letter"&&xe?(p(),S({activeSection:ge,newSectionValue:we,shouldGoToNextSection:!0})):!me&&!Se&&(p(),E(we))}),te=kt(ce=>{ce.preventDefault(),ce.dataTransfer.dropEffect="none"}),pe=kt(ce=>{if(!A.current)return;const ge=ce.target,we=ge.textContent??"",me=A.current.getSectionIndexFromDOMElement(ge),Se=y.sections[me];if(n||!A.current){_(me);return}if(we.length===0){if(Se.value===""){_(me);return}const xe=ce.nativeEvent.inputType;if(xe==="insertParagraph"||xe==="insertLineBreak"){_(me);return}p(),w();return}f({keyPressed:we,sectionIndex:me}),_(me)});xu(()=>{if(!(!L||!A.current)){if(m==="all")A.current.getRoot().focus();else if(typeof m=="number"){const ce=A.current.getSectionContent(m);ce&&ce.focus()}}},[m,L]);const ae=v.useMemo(()=>y.sections.reduce((ce,ge)=>(ce[ge.type]=I[ge.type]({currentDate:null,contentType:ge.contentType,format:ge.format}),ce),{}),[I,y.sections]),se=m==="all",oe=v.useMemo(()=>y.sections.map((ce,ge)=>{const we=!se&&!t&&!n;return{container:{"data-sectionindex":ge,onClick:X(ge)},content:{tabIndex:se||ge>0?-1:0,contentEditable:!se&&!t&&!n,role:"spinbutton",id:`${N}-${ce.type}`,"aria-labelledby":`${N}-${ce.type}`,"aria-readonly":n,"aria-valuenow":Ndt(ce,$),"aria-valuemin":ae[ce.type].minimum,"aria-valuemax":ae[ce.type].maximum,"aria-valuetext":ce.value?_dt(ce,$):O.empty,"aria-label":O[ce.type],"aria-disabled":t,spellCheck:we?!1:void 0,autoCapitalize:we?"off":void 0,autoCorrect:we?"off":void 0,[parseInt(v.version,10)>=17?"enterKeyHint":"enterkeyhint"]:we?"next":void 0,children:ce.value||ce.placeholder,onInput:pe,onPaste:Q,onFocus:ee(ge),onDragOver:te,onMouseUp:ie,inputMode:ce.contentType==="letter"?"text":"numeric"},before:{children:ce.startSeparator},after:{children:ce.endSeparator}}}),[y.sections,ee,Q,te,pe,X,ie,t,n,se,O,$,ae,N]),fe=kt(ce=>{E(ce.target.value)}),Z=v.useMemo(()=>T?"":d.getV7HiddenInputValueFromSections(y.sections),[T,y.sections,d]);return v.useEffect(()=>{if(A.current==null)throw new Error(["MUI X: The `sectionListRef` prop has not been initialized by `PickersSectionList`","You probably tried to pass a component to the `textField` slot that contains an `` element instead of a `PickersSectionList`.","","If you want to keep using an `` HTML element for the editing, please remove the `enableAccessibleFieldDOMStructure` prop from your picker or field component:","","","","Learn more about the field accessible DOM structure on the MUI documentation: https://mui.com/x/react-date-pickers/fields/#fields-to-edit-a-single-element"].join(` +`));u&&A.current&&A.current.getSectionContent(P.startIndex).focus()},[]),{interactions:D,returnedValue:{autoFocus:u,readOnly:n,focused:c??L,sectionListRef:k,onBlur:K,onClick:z,onFocus:U,onInput:F,onPaste:V,enableAccessibleFieldDOMStructure:!0,elements:oe,tabIndex:m===0?-1:0,contentEditable:se,value:Z,onChange:fe,areAllSectionsEmpty:T}}},Ey=e=>e.replace(/[\u2066\u2067\u2068\u2069]/g,""),kft=(e,t,n)=>{let r=0,o=n?1:0;const i=[];for(let a=0;a{const t=dr(),n=v.useRef(),r=v.useRef(),{forwardedProps:{onFocus:o,onClick:i,onPaste:a,onBlur:s,inputRef:l,placeholder:c},internalProps:{readOnly:u=!1,disabled:d=!1},parsedSelectedSections:f,activeSectionIndex:p,state:h,fieldValueManager:m,valueManager:y,applyCharacterEditing:w,resetCharacterQuery:x,updateSectionValue:S,updateValueFromValueStr:E,clearActiveSection:P,clearValue:T,setTempAndroidValueStr:I,setSelectedSections:A,getSectionsFromValue:k,areAllSectionsEmpty:O,localizedDigits:$}=e,N=v.useRef(null),L=ua(l,N),j=v.useMemo(()=>kft(h.sections,$,t),[h.sections,$,t]),D=v.useMemo(()=>({syncSelectionToDOM:()=>{if(!N.current)return;if(f==null){N.current.scrollLeft&&(N.current.scrollLeft=0);return}if(N.current!==Sa(document))return;const pe=N.current.scrollTop;if(f==="all")N.current.select();else{const ae=j[f],se=ae.type==="empty"?ae.startInInput-ae.startSeparator.length:ae.startInInput,oe=ae.type==="empty"?ae.endInInput+ae.endSeparator.length:ae.endInInput;(se!==N.current.selectionStart||oe!==N.current.selectionEnd)&&N.current===Sa(document)&&N.current.setSelectionRange(se,oe),clearTimeout(r.current),r.current=setTimeout(()=>{N.current&&N.current===Sa(document)&&N.current.selectionStart===N.current.selectionEnd&&(N.current.selectionStart!==se||N.current.selectionEnd!==oe)&&D.syncSelectionToDOM()})}N.current.scrollTop=pe},getActiveSectionIndexFromDOM:()=>{const pe=N.current.selectionStart??0,ae=N.current.selectionEnd??0;if(pe===0&&ae===0)return null;const se=pe<=j[0].startInInput?1:j.findIndex(oe=>oe.startInInput-oe.startSeparator.length>pe);return se===-1?j.length-1:se-1},focusField:(pe=0)=>{var ae;(ae=N.current)==null||ae.focus(),A(pe)},setSelectedSections:pe=>A(pe),isFieldFocused:()=>N.current===Sa(document)}),[N,f,j,A]),_=()=>{const pe=N.current.selectionStart??0;let ae;pe<=j[0].startInInput||pe>=j[j.length-1].endInInput?ae=1:ae=j.findIndex(oe=>oe.startInInput-oe.startSeparator.length>pe);const se=ae===-1?j.length-1:ae-1;A(se)},z=kt((...pe)=>{o==null||o(...pe);const ae=N.current;clearTimeout(n.current),n.current=setTimeout(()=>{!ae||ae!==N.current||p==null&&(ae.value.length&&Number(ae.selectionEnd)-Number(ae.selectionStart)===ae.value.length?A("all"):_())})}),F=kt((pe,...ae)=>{pe.isDefaultPrevented()||(i==null||i(pe,...ae),_())}),V=kt(pe=>{if(a==null||a(pe),pe.preventDefault(),u||d)return;const ae=pe.clipboardData.getData("text");if(typeof f=="number"){const se=h.sections[f],oe=/^[a-zA-Z]+$/.test(ae),fe=/^[0-9]+$/.test(ae),Z=/^(([a-zA-Z]+)|)([0-9]+)(([a-zA-Z]+)|)$/.test(ae);if(se.contentType==="letter"&&oe||se.contentType==="digit"&&fe||se.contentType==="digit-with-letter"&&Z){x(),S({activeSection:se,newSectionValue:ae,shouldGoToNextSection:!0});return}if(oe||fe)return}x(),E(ae)}),U=kt((...pe)=>{s==null||s(...pe),A(null)}),K=kt(pe=>{if(u)return;const ae=pe.target.value;if(ae===""){x(),T();return}const se=pe.nativeEvent.data,oe=se&&se.length>1,fe=oe?se:ae,Z=Ey(fe);if(p==null||oe){E(oe?se:Z);return}let ce;if(f==="all"&&Z.length===1)ce=Z;else{const ge=Ey(m.getV6InputValueFromSections(j,$,t));let we=-1,me=-1;for(let De=0;DeSe.end)return;const ke=Z.length-ge.length+Se.end-Ey(Se.endSeparator||"").length;ce=Z.slice(Se.start+Ey(Se.startSeparator||"").length,ke)}if(ce.length===0){$dt()&&I(fe),x(),P();return}w({keyPressed:ce,sectionIndex:p})}),X=v.useMemo(()=>c!==void 0?c:m.getV6InputValueFromSections(k(y.emptyValue),$,t),[c,m,k,y.emptyValue,$,t]),ie=v.useMemo(()=>h.tempValueStrAndroid??m.getV6InputValueFromSections(h.sections,$,t),[h.sections,m,h.tempValueStrAndroid,$,t]);v.useEffect(()=>(N.current&&N.current===Sa(document)&&A("all"),()=>{clearTimeout(n.current),clearTimeout(r.current)}),[]);const ee=v.useMemo(()=>p==null||h.sections[p].contentType==="letter"?"text":"numeric",[p,h.sections]),te=!(N.current&&N.current===Sa(document))&&O;return{interactions:D,returnedValue:{readOnly:u,onBlur:U,onClick:F,onFocus:z,onPaste:V,inputRef:L,enableAccessibleFieldDOMStructure:!1,placeholder:X,inputMode:ee,autoComplete:"off",value:te?"":ie,onChange:K}}},HV=e=>{const t=Cn(),{internalProps:n,internalProps:{unstableFieldRef:r,minutesStep:o,enableAccessibleFieldDOMStructure:i=!1,disabled:a=!1,readOnly:s=!1},forwardedProps:{onKeyDown:l,error:c,clearable:u,onClear:d},fieldValueManager:f,valueManager:p,validator:h}=e,m=dr(),y=Tft(e),{state:w,activeSectionIndex:x,parsedSelectedSections:S,setSelectedSections:E,clearValue:P,clearActiveSection:T,updateSectionValue:I,setTempAndroidValueStr:A,sectionsValueBoundaries:k,localizedDigits:O,timezone:$}=y,N=Oft({sections:w.sections,updateSectionValue:I,sectionsValueBoundaries:k,localizedDigits:O,setTempAndroidValueStr:A,timezone:$}),{resetCharacterQuery:L}=N,j=p.areValuesEqual(t,w.value,p.emptyValue),D=i?Aft:Mft,_=v.useMemo(()=>Ddt(w.sections,m&&!i),[w.sections,m,i]),{returnedValue:z,interactions:F}=D(ue({},e,y,N,{areAllSectionsEmpty:j,sectionOrder:_})),V=kt(Q=>{if(l==null||l(Q),!a)switch(!0){case((Q.ctrlKey||Q.metaKey)&&String.fromCharCode(Q.keyCode)==="A"&&!Q.shiftKey&&!Q.altKey):{Q.preventDefault(),E("all");break}case Q.key==="ArrowRight":{if(Q.preventDefault(),S==null)E(_.startIndex);else if(S==="all")E(_.endIndex);else{const te=_.neighbors[S].rightIndex;te!==null&&E(te)}break}case Q.key==="ArrowLeft":{if(Q.preventDefault(),S==null)E(_.endIndex);else if(S==="all")E(_.startIndex);else{const te=_.neighbors[S].leftIndex;te!==null&&E(te)}break}case Q.key==="Delete":{if(Q.preventDefault(),s)break;S==null||S==="all"?P():T(),L();break}case["ArrowUp","ArrowDown","Home","End","PageUp","PageDown"].includes(Q.key):{if(Q.preventDefault(),s||x==null)break;const te=w.sections[x],pe=f.getActiveDateManager(t,w,te),ae=Idt(t,$,te,Q.key,k,O,pe.date,{minutesStep:o});I({activeSection:te,newSectionValue:ae,shouldGoToNextSection:!1});break}}});xu(()=>{F.syncSelectionToDOM()});const{hasValidationError:U}=Sle({props:n,validator:h,timezone:$,value:w.value,onError:n.onError}),K=v.useMemo(()=>c!==void 0?c:U,[U,c]);v.useEffect(()=>{!K&&x==null&&L()},[w.referenceValue,x,K]),v.useEffect(()=>{w.tempValueStrAndroid!=null&&x!=null&&(L(),T())},[w.sections]),v.useImperativeHandle(r,()=>({getSections:()=>w.sections,getActiveSectionIndex:F.getActiveSectionIndexFromDOM,setSelectedSections:F.setSelectedSections,focusField:F.focusField,isFieldFocused:F.isFieldFocused}));const X=kt((Q,...te)=>{Q.preventDefault(),d==null||d(Q,...te),P(),F.isFieldFocused()?E(_.startIndex):F.focusField(0)}),ie={onKeyDown:V,onClear:X,error:K,clearable:!!(u&&!j&&!s&&!a)},ee={disabled:a,readOnly:s};return ue({},e.forwardedProps,ie,ee,z)},Rft=["clearable","onClear","InputProps","sx","slots","slotProps"],$ft=["ownerState"],UV=e=>{const t=$o(),{clearable:n,onClear:r,InputProps:o,sx:i,slots:a,slotProps:s}=e,l=zt(e,Rft),c=(a==null?void 0:a.clearButton)??vn,u=Yn({elementType:c,externalSlotProps:s==null?void 0:s.clearButton,ownerState:{},className:"clearButton",additionalProps:{title:t.fieldClearLabel}}),d=zt(u,$ft),f=(a==null?void 0:a.clearIcon)??Rut,p=Yn({elementType:f,externalSlotProps:s==null?void 0:s.clearIcon,ownerState:{}});return ue({},l,{InputProps:ue({},o,{endAdornment:R.jsxs(v.Fragment,{children:[n&&R.jsx(Co,{position:"end",sx:{marginRight:o!=null&&o.endAdornment?-1:-1.5},children:R.jsx(c,ue({},d,{onClick:r,children:R.jsx(f,ue({fontSize:"small"},p))}))}),o==null?void 0:o.endAdornment]})}),sx:[{"& .clearButton":{opacity:1},"@media (pointer: fine)":{"& .clearButton":{opacity:0},"&:hover, &:focus-within":{".clearButton":{opacity:1}}}},...Array.isArray(i)?i:[i]]})},Dft=["value","defaultValue","referenceDate","format","formatDensity","onChange","timezone","onError","shouldRespectLeadingZeros","selectedSections","onSelectedSectionsChange","unstableFieldRef","enableAccessibleFieldDOMStructure","disabled","readOnly","dateSeparator"],WV=(e,t)=>v.useMemo(()=>{const n=ue({},e),r={},o=i=>{n.hasOwnProperty(i)&&(r[i]=n[i],delete n[i])};return Dft.forEach(o),t==="date"?hF.forEach(o):t==="time"?gF.forEach(o):t==="date-time"&&(hF.forEach(o),gF.forEach(o),xle.forEach(o)),{forwardedProps:n,internalProps:r}},[e,t]),_ft=v.createContext(null);function Cle(e){const{contextValue:t,localeText:n,children:r}=e;return R.jsx(_ft.Provider,{value:t,children:R.jsx(Cg,{localeText:n,children:r})})}const Nft=e=>{const t=Cn(),n=Hg();return ue({},e,{disablePast:e.disablePast??!1,disableFuture:e.disableFuture??!1,format:e.format??t.formats.keyboardDate,minDate:Li(t,e.minDate,n.minDate),maxDate:Li(t,e.maxDate,n.maxDate)})},Lft=e=>{const t=Cn(),r=e.ampm??t.is12HourCycleInCurrentLocale()?t.formats.fullTime12h:t.formats.fullTime24h;return ue({},e,{disablePast:e.disablePast??!1,disableFuture:e.disableFuture??!1,format:e.format??r})},Fft=e=>{const t=Cn(),n=Hg(),o=e.ampm??t.is12HourCycleInCurrentLocale()?t.formats.keyboardDateTime12h:t.formats.keyboardDateTime24h;return ue({},e,{disablePast:e.disablePast??!1,disableFuture:e.disableFuture??!1,format:e.format??o,disableIgnoringDatePartForTimeValidation:!!(e.minDateTime||e.maxDateTime),minDate:Li(t,e.minDateTime??e.minDate,n.minDate),maxDate:Li(t,e.maxDateTime??e.maxDate,n.maxDate),minTime:e.minDateTime??e.minTime,maxTime:e.maxDateTime??e.maxTime})},jft=e=>{const t=Nft(e),{forwardedProps:n,internalProps:r}=WV(t,"date");return HV({forwardedProps:n,internalProps:r,valueManager:go,fieldValueManager:BV,validator:a0,valueType:"date"})};function Bft(e){return Wn("MuiPickersTextField",e)}Xn("MuiPickersTextField",["root","focused","disabled","error","required"]);function zft(e){return Wn("MuiPickersInputBase",e)}const Gy=Xn("MuiPickersInputBase",["root","focused","disabled","error","notchedOutline","sectionContent","sectionBefore","sectionAfter","adornedStart","adornedEnd","input"]);function Vft(e){return Wn("MuiPickersSectionList",e)}const bw=Xn("MuiPickersSectionList",["root","section","sectionContent"]),Hft=["slots","slotProps","elements","sectionListRef"],Ele=re("div",{name:"MuiPickersSectionList",slot:"Root",overridesResolver:(e,t)=>t.root})({direction:"ltr /*! @noflip */",outline:"none"}),Ple=re("span",{name:"MuiPickersSectionList",slot:"Section",overridesResolver:(e,t)=>t.section})({}),Tle=re("span",{name:"MuiPickersSectionList",slot:"SectionSeparator",overridesResolver:(e,t)=>t.sectionSeparator})({whiteSpace:"pre"}),Ile=re("span",{name:"MuiPickersSectionList",slot:"SectionContent",overridesResolver:(e,t)=>t.sectionContent})({outline:"none"}),Uft=e=>{const{classes:t}=e;return zn({root:["root"],section:["section"],sectionContent:["sectionContent"]},Vft,t)};function Wft(e){const{slots:t,slotProps:n,element:r,classes:o}=e,i=(t==null?void 0:t.section)??Ple,a=Yn({elementType:i,externalSlotProps:n==null?void 0:n.section,externalForwardedProps:r.container,className:o.section,ownerState:{}}),s=(t==null?void 0:t.sectionContent)??Ile,l=Yn({elementType:s,externalSlotProps:n==null?void 0:n.sectionContent,externalForwardedProps:r.content,additionalProps:{suppressContentEditableWarning:!0},className:o.sectionContent,ownerState:{}}),c=(t==null?void 0:t.sectionSeparator)??Tle,u=Yn({elementType:c,externalSlotProps:n==null?void 0:n.sectionSeparator,externalForwardedProps:r.before,ownerState:{position:"before"}}),d=Yn({elementType:c,externalSlotProps:n==null?void 0:n.sectionSeparator,externalForwardedProps:r.after,ownerState:{position:"after"}});return R.jsxs(i,ue({},a,{children:[R.jsx(c,ue({},u)),R.jsx(s,ue({},l)),R.jsx(c,ue({},d))]}))}const Gft=v.forwardRef(function(t,n){const r=cn({props:t,name:"MuiPickersSectionList"}),{slots:o,slotProps:i,elements:a,sectionListRef:s}=r,l=zt(r,Hft),c=Uft(r),u=v.useRef(null),d=ua(n,u),f=m=>{if(!u.current)throw new Error(`MUI X: Cannot call sectionListRef.${m} before the mount of the component.`);return u.current};v.useImperativeHandle(s,()=>({getRoot(){return f("getRoot")},getSectionContainer(m){return f("getSectionContainer").querySelector(`.${bw.section}[data-sectionindex="${m}"]`)},getSectionContent(m){return f("getSectionContent").querySelector(`.${bw.section}[data-sectionindex="${m}"] .${bw.sectionContent}`)},getSectionIndexFromDOMElement(m){const y=f("getSectionIndexFromDOMElement");if(m==null||!y.contains(m))return null;let w=null;return m.classList.contains(bw.section)?w=m:m.classList.contains(bw.sectionContent)&&(w=m.parentElement),w==null?null:Number(w.dataset.sectionindex)}}));const p=(o==null?void 0:o.root)??Ele,h=Yn({elementType:p,externalSlotProps:i==null?void 0:i.root,externalForwardedProps:l,additionalProps:{ref:d,suppressContentEditableWarning:!0},className:c.root,ownerState:{}});return R.jsx(p,ue({},h,{children:h.contentEditable?a.map(({content:m,before:y,after:w})=>`${y.children}${m.children}${w.children}`).join(""):R.jsx(v.Fragment,{children:a.map((m,y)=>R.jsx(Wft,{slots:o,slotProps:i,element:m,classes:c},y))})}))}),qft=["elements","areAllSectionsEmpty","defaultValue","label","value","onChange","id","autoFocus","endAdornment","startAdornment","renderSuffix","slots","slotProps","contentEditable","tabIndex","onInput","onPaste","onKeyDown","fullWidth","name","readOnly","inputProps","inputRef","sectionListRef"],Kft=e=>Math.round(e*1e5)/1e5,CM=re("div",{name:"MuiPickersInputBase",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>ue({},e.typography.body1,{color:(e.vars||e).palette.text.primary,cursor:"text",padding:0,display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",boxSizing:"border-box",letterSpacing:`${Kft(.15/16)}em`,variants:[{props:{fullWidth:!0},style:{width:"100%"}}]})),GV=re(Ele,{name:"MuiPickersInputBase",slot:"SectionsContainer",overridesResolver:(e,t)=>t.sectionsContainer})(({theme:e})=>({padding:"4px 0 5px",fontFamily:e.typography.fontFamily,fontSize:"inherit",lineHeight:"1.4375em",flexGrow:1,outline:"none",display:"flex",flexWrap:"nowrap",overflow:"hidden",letterSpacing:"inherit",width:"182px",variants:[{props:{isRtl:!0},style:{textAlign:"right /*! @noflip */"}},{props:{size:"small"},style:{paddingTop:1}},{props:{adornedStart:!1,focused:!1,filled:!1},style:{color:"currentColor",opacity:0}},{props:({adornedStart:t,focused:n,filled:r,label:o})=>!t&&!n&&!r&&o==null,style:e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:e.palette.mode==="light"?.42:.5}}]})),Yft=re(Ple,{name:"MuiPickersInputBase",slot:"Section",overridesResolver:(e,t)=>t.section})(({theme:e})=>({fontFamily:e.typography.fontFamily,fontSize:"inherit",letterSpacing:"inherit",lineHeight:"1.4375em",display:"flex"})),Qft=re(Ile,{name:"MuiPickersInputBase",slot:"SectionContent",overridesResolver:(e,t)=>t.content})(({theme:e})=>({fontFamily:e.typography.fontFamily,lineHeight:"1.4375em",letterSpacing:"inherit",width:"fit-content",outline:"none"})),Xft=re(Tle,{name:"MuiPickersInputBase",slot:"Separator",overridesResolver:(e,t)=>t.separator})(()=>({whiteSpace:"pre",letterSpacing:"inherit"})),Jft=re("input",{name:"MuiPickersInputBase",slot:"Input",overridesResolver:(e,t)=>t.hiddenInput})(ue({},gut)),Zft=e=>{const{focused:t,disabled:n,error:r,classes:o,fullWidth:i,readOnly:a,color:s,size:l,endAdornment:c,startAdornment:u}=e,d={root:["root",t&&!n&&"focused",n&&"disabled",a&&"readOnly",r&&"error",i&&"fullWidth",`color${dut(s)}`,l==="small"&&"inputSizeSmall",!!u&&"adornedStart",!!c&&"adornedEnd"],notchedOutline:["notchedOutline"],input:["input"],sectionsContainer:["sectionsContainer"],sectionContent:["sectionContent"],sectionBefore:["sectionBefore"],sectionAfter:["sectionAfter"]};return zn(d,zft,o)},qV=v.forwardRef(function(t,n){const r=cn({props:t,name:"MuiPickersInputBase"}),{elements:o,areAllSectionsEmpty:i,value:a,onChange:s,id:l,endAdornment:c,startAdornment:u,renderSuffix:d,slots:f,slotProps:p,contentEditable:h,tabIndex:m,onInput:y,onPaste:w,onKeyDown:x,name:S,readOnly:E,inputProps:P,inputRef:T,sectionListRef:I}=r,A=zt(r,qft),k=v.useRef(null),O=ua(n,k),$=ua(P==null?void 0:P.ref,T),N=dr(),L=Ba();if(!L)throw new Error("MUI X: PickersInputBase should always be used inside a PickersTextField component");const j=U=>{var K;if(L.disabled){U.stopPropagation();return}(K=L.onFocus)==null||K.call(L,U)};v.useEffect(()=>{L&&L.setAdornedStart(!!u)},[L,u]),v.useEffect(()=>{L&&(i?L.onEmpty():L.onFilled())},[L,i]);const D=ue({},r,L,{isRtl:N}),_=Zft(D),z=(f==null?void 0:f.root)||CM,F=Yn({elementType:z,externalSlotProps:p==null?void 0:p.root,externalForwardedProps:A,additionalProps:{"aria-invalid":L.error,ref:O},className:_.root,ownerState:D}),V=(f==null?void 0:f.input)||GV;return R.jsxs(z,ue({},F,{children:[u,R.jsx(Gft,{sectionListRef:I,elements:o,contentEditable:h,tabIndex:m,className:_.sectionsContainer,onFocus:j,onBlur:L.onBlur,onInput:y,onPaste:w,onKeyDown:x,slots:{root:V,section:Yft,sectionContent:Qft,sectionSeparator:Xft},slotProps:{root:{ownerState:D},sectionContent:{className:Gy.sectionContent},sectionSeparator:({position:U})=>({className:U==="before"?Gy.sectionBefore:Gy.sectionAfter})}}),c,d?d(ue({},L)):null,R.jsx(Jft,ue({name:S,className:_.input,value:a,onChange:s,id:l,"aria-hidden":"true",tabIndex:-1,readOnly:E,required:L.required,disabled:L.disabled},P,{ref:$}))]}))});function ept(e){return Wn("MuiPickersOutlinedInput",e)}const ec=ue({},Gy,Xn("MuiPickersOutlinedInput",["root","notchedOutline","input"])),tpt=["children","className","label","notched","shrink"],npt=re("fieldset",{name:"MuiPickersOutlinedInput",slot:"NotchedOutline",overridesResolver:(e,t)=>t.notchedOutline})(({theme:e})=>{const t=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{textAlign:"left",position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden",minWidth:"0%",borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:t}}),J7=re("span")(({theme:e})=>({fontFamily:e.typography.fontFamily,fontSize:"inherit"})),rpt=re("legend")(({theme:e})=>({float:"unset",width:"auto",overflow:"hidden",variants:[{props:{withLabel:!1},style:{padding:0,lineHeight:"11px",transition:e.transitions.create("width",{duration:150,easing:e.transitions.easing.easeOut})}},{props:{withLabel:!0},style:{display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:e.transitions.create("max-width",{duration:50,easing:e.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}}},{props:{withLabel:!0,notched:!0},style:{maxWidth:"100%",transition:e.transitions.create("max-width",{duration:100,easing:e.transitions.easing.easeOut,delay:50})}}]}));function opt(e){const{className:t,label:n}=e,r=zt(e,tpt),o=n!=null&&n!=="",i=ue({},e,{withLabel:o});return R.jsx(npt,ue({"aria-hidden":!0,className:t},r,{ownerState:i,children:R.jsx(rpt,{ownerState:i,children:o?R.jsx(J7,{children:n}):R.jsx(J7,{className:"notranslate",children:"​"})})}))}const ipt=["label","autoFocus","ownerState","notched"],apt=re(CM,{name:"MuiPickersOutlinedInput",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>{const t=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{padding:"0 14px",borderRadius:(e.vars||e).shape.borderRadius,[`&:hover .${ec.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${ec.notchedOutline}`]:{borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:t}},[`&.${ec.focused} .${ec.notchedOutline}`]:{borderStyle:"solid",borderWidth:2},[`&.${ec.disabled}`]:{[`& .${ec.notchedOutline}`]:{borderColor:(e.vars||e).palette.action.disabled},"*":{color:(e.vars||e).palette.action.disabled}},[`&.${ec.error} .${ec.notchedOutline}`]:{borderColor:(e.vars||e).palette.error.main},variants:Object.keys((e.vars??e).palette).filter(n=>{var r;return((r=(e.vars??e).palette[n])==null?void 0:r.main)??!1}).map(n=>({props:{color:n},style:{[`&.${ec.focused}:not(.${ec.error}) .${ec.notchedOutline}`]:{borderColor:(e.vars||e).palette[n].main}}}))}}),spt=re(GV,{name:"MuiPickersOutlinedInput",slot:"SectionsContainer",overridesResolver:(e,t)=>t.sectionsContainer})({padding:"16.5px 0",variants:[{props:{size:"small"},style:{padding:"8.5px 0"}}]}),lpt=e=>{const{classes:t}=e,r=zn({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},ept,t);return ue({},t,r)},Ole=v.forwardRef(function(t,n){const r=cn({props:t,name:"MuiPickersOutlinedInput"}),{label:o,ownerState:i,notched:a}=r,s=zt(r,ipt),l=Ba(),c=ue({},r,i,l,{color:(l==null?void 0:l.color)||"primary"}),u=lpt(c);return R.jsx(qV,ue({slots:{root:apt,input:spt},renderSuffix:d=>R.jsx(opt,{shrink:!!(a||d.adornedStart||d.focused||d.filled),notched:!!(a||d.adornedStart||d.focused||d.filled),className:u.notchedOutline,label:o!=null&&o!==""&&(l!=null&&l.required)?R.jsxs(v.Fragment,{children:[o," ","*"]}):o,ownerState:c})},s,{label:o,classes:u,ref:n}))});Ole.muiName="Input";function cpt(e){return Wn("MuiPickersFilledInput",e)}const fh=ue({},Gy,Xn("MuiPickersFilledInput",["root","underline","input"])),upt=["label","autoFocus","disableUnderline","ownerState"],dpt=re(CM,{name:"MuiPickersFilledInput",slot:"Root",overridesResolver:(e,t)=>t.root,shouldForwardProp:e=>qP(e)&&e!=="disableUnderline"})(({theme:e})=>{const t=e.palette.mode==="light",n=t?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",r=t?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",o=t?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",i=t?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r,borderTopLeftRadius:(e.vars||e).shape.borderRadius,borderTopRightRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),"&:hover":{backgroundColor:e.vars?e.vars.palette.FilledInput.hoverBg:o,"@media (hover: none)":{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r}},[`&.${fh.focused}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r},[`&.${fh.disabled}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.disabledBg:i},variants:[...Object.keys((e.vars??e).palette).filter(a=>(e.vars??e).palette[a].main).map(a=>{var s;return{props:{color:a,disableUnderline:!1},style:{"&::after":{borderBottom:`2px solid ${(s=(e.vars||e).palette[a])==null?void 0:s.main}`}}}}),{props:{disableUnderline:!1},style:{"&::after":{left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${fh.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${fh.error}`]:{"&:before, &:after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / ${e.vars.opacity.inputUnderline})`:n}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${fh.disabled}, .${fh.error}):before`]:{borderBottom:`1px solid ${(e.vars||e).palette.text.primary}`},[`&.${fh.disabled}:before`]:{borderBottomStyle:"dotted"}}},{props:({startAdornment:a})=>!!a,style:{paddingLeft:12}},{props:({endAdornment:a})=>!!a,style:{paddingRight:12}}]}}),fpt=re(GV,{name:"MuiPickersFilledInput",slot:"sectionsContainer",overridesResolver:(e,t)=>t.sectionsContainer})({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12,variants:[{props:{size:"small"},style:{paddingTop:21,paddingBottom:4}},{props:({startAdornment:e})=>!!e,style:{paddingLeft:0}},{props:({endAdornment:e})=>!!e,style:{paddingRight:0}},{props:{hiddenLabel:!0},style:{paddingTop:16,paddingBottom:17}},{props:{hiddenLabel:!0,size:"small"},style:{paddingTop:8,paddingBottom:9}}]}),ppt=e=>{const{classes:t,disableUnderline:n}=e,o=zn({root:["root",!n&&"underline"],input:["input"]},cpt,t);return ue({},t,o)},Ale=v.forwardRef(function(t,n){const r=cn({props:t,name:"MuiPickersFilledInput"}),{label:o,disableUnderline:i=!1,ownerState:a}=r,s=zt(r,upt),l=Ba(),c=ue({},r,a,l,{color:(l==null?void 0:l.color)||"primary"}),u=ppt(c);return R.jsx(qV,ue({slots:{root:dpt,input:fpt},slotProps:{root:{disableUnderline:i}}},s,{label:o,classes:u,ref:n}))});Ale.muiName="Input";function hpt(e){return Wn("MuiPickersFilledInput",e)}const ww=ue({},Gy,Xn("MuiPickersInput",["root","input"])),gpt=["label","autoFocus","disableUnderline","ownerState"],mpt=re(CM,{name:"MuiPickersInput",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>{let n=e.palette.mode==="light"?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return e.vars&&(n=`rgba(${e.vars.palette.common.onBackgroundChannel} / ${e.vars.opacity.inputUnderline})`),{"label + &":{marginTop:16},variants:[...Object.keys((e.vars??e).palette).filter(r=>(e.vars??e).palette[r].main).map(r=>({props:{color:r},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[r].main}`}}})),{props:{disableUnderline:!1},style:{"&::after":{background:"red",left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${ww.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${ww.error}`]:{"&:before, &:after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${n}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${ww.disabled}, .${ww.error}):before`]:{borderBottom:`2px solid ${(e.vars||e).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${n}`}},[`&.${ww.disabled}:before`]:{borderBottomStyle:"dotted"}}}]}}),ypt=e=>{const{classes:t,disableUnderline:n}=e,o=zn({root:["root",!n&&"underline"],input:["input"]},hpt,t);return ue({},t,o)},kle=v.forwardRef(function(t,n){const r=cn({props:t,name:"MuiPickersInput"}),{label:o,disableUnderline:i=!1,ownerState:a}=r,s=zt(r,gpt),l=Ba(),c=ue({},r,a,l,{disableUnderline:i,color:(l==null?void 0:l.color)||"primary"}),u=ypt(c);return R.jsx(qV,ue({slots:{root:mpt}},s,{label:o,classes:u,ref:n}))});kle.muiName="Input";const vpt=["onFocus","onBlur","className","color","disabled","error","variant","required","InputProps","inputProps","inputRef","sectionListRef","elements","areAllSectionsEmpty","onClick","onKeyDown","onKeyUp","onPaste","onInput","endAdornment","startAdornment","tabIndex","contentEditable","focused","value","onChange","fullWidth","id","name","helperText","FormHelperTextProps","label","InputLabelProps"],bpt={standard:kle,filled:Ale,outlined:Ole},wpt=re(kb,{name:"MuiPickersTextField",slot:"Root",overridesResolver:(e,t)=>t.root})({}),xpt=e=>{const{focused:t,disabled:n,classes:r,required:o}=e;return zn({root:["root",t&&!n&&"focused",n&&"disabled",o&&"required"]},Bft,r)},KV=v.forwardRef(function(t,n){const r=cn({props:t,name:"MuiPickersTextField"}),{onFocus:o,onBlur:i,className:a,color:s="primary",disabled:l=!1,error:c=!1,variant:u="outlined",required:d=!1,InputProps:f,inputProps:p,inputRef:h,sectionListRef:m,elements:y,areAllSectionsEmpty:w,onClick:x,onKeyDown:S,onKeyUp:E,onPaste:P,onInput:T,endAdornment:I,startAdornment:A,tabIndex:k,contentEditable:O,focused:$,value:N,onChange:L,fullWidth:j,id:D,name:_,helperText:z,FormHelperTextProps:F,label:V,InputLabelProps:U}=r,K=zt(r,vpt),X=v.useRef(null),ie=ua(n,X),ee=r0(D),Q=z&&ee?`${ee}-helper-text`:void 0,te=V&&ee?`${ee}-label`:void 0,pe=ue({},r,{color:s,disabled:l,error:c,focused:$,required:d,variant:u}),ae=xpt(pe),se=bpt[u];return R.jsxs(wpt,ue({className:de(ae.root,a),ref:ie,focused:$,onFocus:o,onBlur:i,disabled:l,variant:u,error:c,color:s,fullWidth:j,required:d,ownerState:pe},K,{children:[R.jsx(Mb,ue({htmlFor:ee,id:te},U,{children:V})),R.jsx(se,ue({elements:y,areAllSectionsEmpty:w,onClick:x,onKeyDown:S,onKeyUp:E,onInput:T,onPaste:P,endAdornment:I,startAdornment:A,tabIndex:k,contentEditable:O,value:N,onChange:L,id:ee,fullWidth:j,inputProps:p,inputRef:h,sectionListRef:m,label:V,name:_,role:"group","aria-labelledby":te},f)),z&&R.jsx(HC,ue({id:Q},F,{children:z}))]}))}),Spt=["enableAccessibleFieldDOMStructure"],Cpt=["InputProps","readOnly"],Ept=["onPaste","onKeyDown","inputMode","readOnly","InputProps","inputProps","inputRef"],YV=e=>{let{enableAccessibleFieldDOMStructure:t}=e,n=zt(e,Spt);if(t){const{InputProps:d,readOnly:f}=n,p=zt(n,Cpt);return ue({},p,{InputProps:ue({},d??{},{readOnly:f})})}const{onPaste:r,onKeyDown:o,inputMode:i,readOnly:a,InputProps:s,inputProps:l,inputRef:c}=n,u=zt(n,Ept);return ue({},u,{InputProps:ue({},s??{},{readOnly:a}),inputProps:ue({},l??{},{inputMode:i,onPaste:r,onKeyDown:o,ref:c})})},Ppt=["slots","slotProps","InputProps","inputProps"],Mle=v.forwardRef(function(t,n){const r=cn({props:t,name:"MuiDateField"}),{slots:o,slotProps:i,InputProps:a,inputProps:s}=r,l=zt(r,Ppt),c=r,u=(o==null?void 0:o.textField)??(t.enableAccessibleFieldDOMStructure?KV:nn),d=Yn({elementType:u,externalSlotProps:i==null?void 0:i.textField,externalForwardedProps:l,additionalProps:{ref:n},ownerState:c});d.inputProps=ue({},s,d.inputProps),d.InputProps=ue({},a,d.InputProps);const f=jft(d),p=YV(f),h=UV(ue({},p,{slots:o,slotProps:i}));return R.jsx(u,ue({},h))}),Tpt=e=>{const t=Lft(e),{forwardedProps:n,internalProps:r}=WV(t,"time");return HV({forwardedProps:n,internalProps:r,valueManager:go,fieldValueManager:BV,validator:p1,valueType:"time"})},Ipt=["slots","slotProps","InputProps","inputProps"],Rle=v.forwardRef(function(t,n){const r=cn({props:t,name:"MuiTimeField"}),{slots:o,slotProps:i,InputProps:a,inputProps:s}=r,l=zt(r,Ipt),c=r,u=(o==null?void 0:o.textField)??(t.enableAccessibleFieldDOMStructure?KV:nn),d=Yn({elementType:u,externalSlotProps:i==null?void 0:i.textField,externalForwardedProps:l,ownerState:c,additionalProps:{ref:n}});d.inputProps=ue({},s,d.inputProps),d.InputProps=ue({},a,d.InputProps);const f=Tpt(d),p=YV(f),h=UV(ue({},p,{slots:o,slotProps:i}));return R.jsx(u,ue({},h))}),Opt=e=>{const t=Fft(e),{forwardedProps:n,internalProps:r}=WV(t,"date-time");return HV({forwardedProps:n,internalProps:r,valueManager:go,fieldValueManager:BV,validator:SM,valueType:"date-time"})},Apt=["slots","slotProps","InputProps","inputProps"],$le=v.forwardRef(function(t,n){const r=cn({props:t,name:"MuiDateTimeField"}),{slots:o,slotProps:i,InputProps:a,inputProps:s}=r,l=zt(r,Apt),c=r,u=(o==null?void 0:o.textField)??(t.enableAccessibleFieldDOMStructure?KV:nn),d=Yn({elementType:u,externalSlotProps:i==null?void 0:i.textField,externalForwardedProps:l,ownerState:c,additionalProps:{ref:n}});d.inputProps=ue({},s,d.inputProps),d.InputProps=ue({},a,d.InputProps);const f=Opt(d),p=YV(f),h=UV(ue({},p,{slots:o,slotProps:i}));return R.jsx(u,ue({},h))}),Dle=({shouldDisableDate:e,shouldDisableMonth:t,shouldDisableYear:n,minDate:r,maxDate:o,disableFuture:i,disablePast:a,timezone:s})=>{const l=Vg();return v.useCallback(c=>a0({adapter:l,value:c,timezone:s,props:{shouldDisableDate:e,shouldDisableMonth:t,shouldDisableYear:n,minDate:r,maxDate:o,disableFuture:i,disablePast:a}})!==null,[l,e,t,n,r,o,i,a,s])},kpt=(e,t,n)=>(r,o)=>{switch(o.type){case"changeMonth":return ue({},r,{slideDirection:o.direction,currentMonth:o.newMonth,isMonthSwitchingAnimating:!e});case"changeMonthTimezone":{const i=o.newTimezone;if(n.getTimezone(r.currentMonth)===i)return r;let a=n.setTimezone(r.currentMonth,i);return n.getMonth(a)!==n.getMonth(r.currentMonth)&&(a=n.setMonth(a,n.getMonth(r.currentMonth))),ue({},r,{currentMonth:a})}case"finishMonthSwitchingAnimation":return ue({},r,{isMonthSwitchingAnimating:!1});case"changeFocusedDay":{if(r.focusedDay!=null&&o.focusedDay!=null&&n.isSameDay(o.focusedDay,r.focusedDay))return r;const i=o.focusedDay!=null&&!t&&!n.isSameMonth(r.currentMonth,o.focusedDay);return ue({},r,{focusedDay:o.focusedDay,isMonthSwitchingAnimating:i&&!e&&!o.withoutMonthSwitchingAnimation,currentMonth:i?n.startOfMonth(o.focusedDay):r.currentMonth,slideDirection:o.focusedDay!=null&&n.isAfterDay(o.focusedDay,r.currentMonth)?"left":"right"})}default:throw new Error("missing support")}},Mpt=e=>{const{value:t,referenceDate:n,disableFuture:r,disablePast:o,disableSwitchToMonthOnDayFocus:i=!1,maxDate:a,minDate:s,onMonthChange:l,reduceAnimations:c,shouldDisableDate:u,timezone:d}=e,f=Cn(),p=v.useRef(kpt(!!c,i,f)).current,h=v.useMemo(()=>go.getInitialReferenceValue({value:t,utils:f,timezone:d,props:e,referenceDate:n,granularity:pc.day}),[n,d]),[m,y]=v.useReducer(p,{isMonthSwitchingAnimating:!1,focusedDay:h,currentMonth:f.startOfMonth(h),slideDirection:"left"});v.useEffect(()=>{y({type:"changeMonthTimezone",newTimezone:f.getTimezone(h)})},[h,f]);const w=v.useCallback(T=>{y(ue({type:"changeMonth"},T)),l&&l(T.newMonth)},[l]),x=v.useCallback(T=>{const I=T;f.isSameMonth(I,m.currentMonth)||w({newMonth:f.startOfMonth(I),direction:f.isAfterDay(I,m.currentMonth)?"left":"right"})},[m.currentMonth,w,f]),S=Dle({shouldDisableDate:u,minDate:s,maxDate:a,disableFuture:r,disablePast:o,timezone:d}),E=v.useCallback(()=>{y({type:"finishMonthSwitchingAnimation"})},[]),P=kt((T,I)=>{S(T)||y({type:"changeFocusedDay",focusedDay:T,withoutMonthSwitchingAnimation:I})});return{referenceDate:h,calendarState:m,changeMonth:x,changeFocusedDay:P,isDateDisabled:S,onMonthSwitchingAnimationEnd:E,handleChangeMonth:w}},Rpt=e=>Wn("MuiPickersFadeTransitionGroup",e);Xn("MuiPickersFadeTransitionGroup",["root"]);const $pt=e=>{const{classes:t}=e;return zn({root:["root"]},Rpt,t)},Dpt=re(FC,{name:"MuiPickersFadeTransitionGroup",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"block",position:"relative"});function _le(e){const t=cn({props:e,name:"MuiPickersFadeTransitionGroup"}),{children:n,className:r,reduceAnimations:o,transKey:i}=t,a=$pt(t),s=no();return o?n:R.jsx(Dpt,{className:de(a.root,r),children:R.jsx(Ob,{appear:!1,mountOnEnter:!0,unmountOnExit:!0,timeout:{appear:s.transitions.duration.enteringScreen,enter:s.transitions.duration.enteringScreen,exit:0},children:n},i)})}const _pt=e=>Wn("MuiPickersSlideTransition",e),Xs=Xn("MuiPickersSlideTransition",["root","slideEnter-left","slideEnter-right","slideEnterActive","slideExit","slideExitActiveLeft-left","slideExitActiveLeft-right"]),Npt=["children","className","reduceAnimations","slideDirection","transKey","classes"],Lpt=e=>{const{classes:t,slideDirection:n}=e,r={root:["root"],exit:["slideExit"],enterActive:["slideEnterActive"],enter:[`slideEnter-${n}`],exitActive:[`slideExitActiveLeft-${n}`]};return zn(r,_pt,t)},Fpt=re(FC,{name:"MuiPickersSlideTransition",slot:"Root",overridesResolver:(e,t)=>[t.root,{[`.${Xs["slideEnter-left"]}`]:t["slideEnter-left"]},{[`.${Xs["slideEnter-right"]}`]:t["slideEnter-right"]},{[`.${Xs.slideEnterActive}`]:t.slideEnterActive},{[`.${Xs.slideExit}`]:t.slideExit},{[`.${Xs["slideExitActiveLeft-left"]}`]:t["slideExitActiveLeft-left"]},{[`.${Xs["slideExitActiveLeft-right"]}`]:t["slideExitActiveLeft-right"]}]})(({theme:e})=>{const t=e.transitions.create("transform",{duration:e.transitions.duration.complex,easing:"cubic-bezier(0.35, 0.8, 0.4, 1)"});return{display:"block",position:"relative",overflowX:"hidden","& > *":{position:"absolute",top:0,right:0,left:0},[`& .${Xs["slideEnter-left"]}`]:{willChange:"transform",transform:"translate(100%)",zIndex:1},[`& .${Xs["slideEnter-right"]}`]:{willChange:"transform",transform:"translate(-100%)",zIndex:1},[`& .${Xs.slideEnterActive}`]:{transform:"translate(0%)",transition:t},[`& .${Xs.slideExit}`]:{transform:"translate(0%)"},[`& .${Xs["slideExitActiveLeft-left"]}`]:{willChange:"transform",transform:"translate(-100%)",transition:t,zIndex:0},[`& .${Xs["slideExitActiveLeft-right"]}`]:{willChange:"transform",transform:"translate(100%)",transition:t,zIndex:0}}});function jpt(e){const t=cn({props:e,name:"MuiPickersSlideTransition"}),{children:n,className:r,reduceAnimations:o,transKey:i}=t,a=zt(t,Npt),s=Lpt(t),l=no();if(o)return R.jsx("div",{className:de(s.root,r),children:n});const c={exit:s.exit,enterActive:s.enterActive,enter:s.enter,exitActive:s.exitActive};return R.jsx(Fpt,{className:de(s.root,r),childFactory:u=>v.cloneElement(u,{classNames:c}),role:"presentation",children:R.jsx(BB,ue({mountOnEnter:!0,unmountOnExit:!0,timeout:l.transitions.duration.complex,classNames:c},a,{children:n}),i)})}const Bpt=e=>Wn("MuiDayCalendar",e);Xn("MuiDayCalendar",["root","header","weekDayLabel","loadingContainer","slideTransition","monthContainer","weekContainer","weekNumberLabel","weekNumber"]);const zpt=["parentProps","day","focusableDay","selectedDays","isDateDisabled","currentMonthNumber","isViewFocused"],Vpt=["ownerState"],Hpt=e=>{const{classes:t}=e;return zn({root:["root"],header:["header"],weekDayLabel:["weekDayLabel"],loadingContainer:["loadingContainer"],slideTransition:["slideTransition"],monthContainer:["monthContainer"],weekContainer:["weekContainer"],weekNumberLabel:["weekNumberLabel"],weekNumber:["weekNumber"]},Bpt,t)},Nle=(WS+yM*2)*6,Upt=re("div",{name:"MuiDayCalendar",slot:"Root",overridesResolver:(e,t)=>t.root})({}),Wpt=re("div",{name:"MuiDayCalendar",slot:"Header",overridesResolver:(e,t)=>t.header})({display:"flex",justifyContent:"center",alignItems:"center"}),Gpt=re(ot,{name:"MuiDayCalendar",slot:"WeekDayLabel",overridesResolver:(e,t)=>t.weekDayLabel})(({theme:e})=>({width:36,height:40,margin:"0 2px",textAlign:"center",display:"flex",justifyContent:"center",alignItems:"center",color:(e.vars||e).palette.text.secondary})),qpt=re(ot,{name:"MuiDayCalendar",slot:"WeekNumberLabel",overridesResolver:(e,t)=>t.weekNumberLabel})(({theme:e})=>({width:36,height:40,margin:"0 2px",textAlign:"center",display:"flex",justifyContent:"center",alignItems:"center",color:e.palette.text.disabled})),Kpt=re(ot,{name:"MuiDayCalendar",slot:"WeekNumber",overridesResolver:(e,t)=>t.weekNumber})(({theme:e})=>ue({},e.typography.caption,{width:WS,height:WS,padding:0,margin:`0 ${yM}px`,color:e.palette.text.disabled,fontSize:"0.75rem",alignItems:"center",justifyContent:"center",display:"inline-flex"})),Ypt=re("div",{name:"MuiDayCalendar",slot:"LoadingContainer",overridesResolver:(e,t)=>t.loadingContainer})({display:"flex",justifyContent:"center",alignItems:"center",minHeight:Nle}),Qpt=re(jpt,{name:"MuiDayCalendar",slot:"SlideTransition",overridesResolver:(e,t)=>t.slideTransition})({minHeight:Nle}),Xpt=re("div",{name:"MuiDayCalendar",slot:"MonthContainer",overridesResolver:(e,t)=>t.monthContainer})({overflow:"hidden"}),Jpt=re("div",{name:"MuiDayCalendar",slot:"WeekContainer",overridesResolver:(e,t)=>t.weekContainer})({margin:`${yM}px 0`,display:"flex",justifyContent:"center"});function Zpt(e){let{parentProps:t,day:n,focusableDay:r,selectedDays:o,isDateDisabled:i,currentMonthNumber:a,isViewFocused:s}=e,l=zt(e,zpt);const{disabled:c,disableHighlightToday:u,isMonthSwitchingAnimating:d,showDaysOutsideCurrentMonth:f,slots:p,slotProps:h,timezone:m}=t,y=Cn(),w=Ug(m),x=r!==null&&y.isSameDay(n,r),S=o.some(N=>y.isSameDay(N,n)),E=y.isSameDay(n,w),P=(p==null?void 0:p.day)??vft,T=Yn({elementType:P,externalSlotProps:h==null?void 0:h.day,additionalProps:ue({disableHighlightToday:u,showDaysOutsideCurrentMonth:f,role:"gridcell",isAnimating:d,"data-timestamp":y.toJsDate(n).valueOf()},l),ownerState:ue({},t,{day:n,selected:S})}),I=zt(T,Vpt),A=v.useMemo(()=>c||i(n),[c,i,n]),k=v.useMemo(()=>y.getMonth(n)!==a,[y,n,a]),O=v.useMemo(()=>{const N=y.startOfMonth(y.setMonth(n,a));return f?y.isSameDay(n,y.startOfWeek(N)):y.isSameDay(n,N)},[a,n,f,y]),$=v.useMemo(()=>{const N=y.endOfMonth(y.setMonth(n,a));return f?y.isSameDay(n,y.endOfWeek(N)):y.isSameDay(n,N)},[a,n,f,y]);return R.jsx(P,ue({},I,{day:n,disabled:A,autoFocus:s&&x,today:E,outsideCurrentMonth:k,isFirstVisibleCell:O,isLastVisibleCell:$,selected:S,tabIndex:x?0:-1,"aria-selected":S,"aria-current":E?"date":void 0}))}function eht(e){const t=cn({props:e,name:"MuiDayCalendar"}),n=Cn(),{onFocusedDayChange:r,className:o,currentMonth:i,selectedDays:a,focusedDay:s,loading:l,onSelectedDaysChange:c,onMonthSwitchingAnimationEnd:u,readOnly:d,reduceAnimations:f,renderLoading:p=()=>R.jsx("span",{children:"..."}),slideDirection:h,TransitionProps:m,disablePast:y,disableFuture:w,minDate:x,maxDate:S,shouldDisableDate:E,shouldDisableMonth:P,shouldDisableYear:T,dayOfWeekFormatter:I=me=>n.format(me,"weekdayShort").charAt(0).toUpperCase(),hasFocus:A,onFocusedViewChange:k,gridLabelId:O,displayWeekNumber:$,fixedWeekNumber:N,autoFocus:L,timezone:j}=t,D=Ug(j),_=Hpt(t),z=dr(),F=Dle({shouldDisableDate:E,shouldDisableMonth:P,shouldDisableYear:T,minDate:x,maxDate:S,disablePast:y,disableFuture:w,timezone:j}),V=$o(),[U,K]=Sg({name:"DayCalendar",state:"hasFocus",controlled:A,default:L??!1}),[X,ie]=v.useState(()=>s||D),ee=kt(me=>{d||c(me)}),Q=me=>{F(me)||(r(me),ie(me),k==null||k(!0),K(!0))},te=kt((me,Se)=>{switch(me.key){case"ArrowUp":Q(n.addDays(Se,-7)),me.preventDefault();break;case"ArrowDown":Q(n.addDays(Se,7)),me.preventDefault();break;case"ArrowLeft":{const xe=n.addDays(Se,z?1:-1),ke=n.addMonths(Se,z?1:-1),De=Px({utils:n,date:xe,minDate:z?xe:n.startOfMonth(ke),maxDate:z?n.endOfMonth(ke):xe,isDateDisabled:F,timezone:j});Q(De||xe),me.preventDefault();break}case"ArrowRight":{const xe=n.addDays(Se,z?-1:1),ke=n.addMonths(Se,z?-1:1),De=Px({utils:n,date:xe,minDate:z?n.startOfMonth(ke):xe,maxDate:z?xe:n.endOfMonth(ke),isDateDisabled:F,timezone:j});Q(De||xe),me.preventDefault();break}case"Home":Q(n.startOfWeek(Se)),me.preventDefault();break;case"End":Q(n.endOfWeek(Se)),me.preventDefault();break;case"PageUp":Q(n.addMonths(Se,1)),me.preventDefault();break;case"PageDown":Q(n.addMonths(Se,-1)),me.preventDefault();break}}),pe=kt((me,Se)=>Q(Se)),ae=kt((me,Se)=>{U&&n.isSameDay(X,Se)&&(k==null||k(!1))}),se=n.getMonth(i),oe=n.getYear(i),fe=v.useMemo(()=>a.filter(me=>!!me).map(me=>n.startOfDay(me)),[n,a]),Z=`${oe}-${se}`,ce=v.useMemo(()=>v.createRef(),[Z]),ge=v.useMemo(()=>{const me=n.startOfMonth(i),Se=n.endOfMonth(i);return F(X)||n.isAfterDay(X,Se)||n.isBeforeDay(X,me)?Px({utils:n,date:X,minDate:me,maxDate:Se,disablePast:y,disableFuture:w,isDateDisabled:F,timezone:j}):X},[i,w,y,X,F,n,j]),we=v.useMemo(()=>{const me=n.getWeekArray(i);let Se=n.addMonths(i,1);for(;N&&me.length{me.lengthR.jsx(Gpt,{variant:"caption",role:"columnheader","aria-label":n.format(me,"weekday"),className:_.weekDayLabel,children:I(me)},Se.toString()))]}),l?R.jsx(Ypt,{className:_.loadingContainer,children:p()}):R.jsx(Qpt,ue({transKey:Z,onExited:u,reduceAnimations:f,slideDirection:h,className:de(o,_.slideTransition)},m,{nodeRef:ce,children:R.jsx(Xpt,{ref:ce,role:"rowgroup",className:_.monthContainer,children:we.map((me,Se)=>R.jsxs(Jpt,{role:"row",className:_.weekContainer,"aria-rowindex":Se+1,children:[$&&R.jsx(Kpt,{className:_.weekNumber,role:"rowheader","aria-label":V.calendarWeekNumberAriaLabelText(n.getWeekNumber(me[0])),children:V.calendarWeekNumberText(n.getWeekNumber(me[0]))}),me.map((xe,ke)=>R.jsx(Zpt,{parentProps:t,day:xe,selectedDays:fe,focusableDay:ge,onKeyDown:te,onFocus:pe,onBlur:ae,onDaySelect:ee,isDateDisabled:F,currentMonthNumber:se,isViewFocused:U,"aria-colindex":ke+1},xe.toString()))]},`week-${me[0]}`))})}))]})}function tht(e){return Wn("MuiPickersMonth",e)}const bP=Xn("MuiPickersMonth",["root","monthButton","disabled","selected"]),nht=["autoFocus","className","children","disabled","selected","value","tabIndex","onClick","onKeyDown","onFocus","onBlur","aria-current","aria-label","monthsPerRow","slots","slotProps"],rht=e=>{const{disabled:t,selected:n,classes:r}=e;return zn({root:["root"],monthButton:["monthButton",t&&"disabled",n&&"selected"]},tht,r)},oht=re("div",{name:"MuiPickersMonth",slot:"Root",overridesResolver:(e,t)=>[t.root]})({display:"flex",alignItems:"center",justifyContent:"center",flexBasis:"33.3%",variants:[{props:{monthsPerRow:4},style:{flexBasis:"25%"}}]}),iht=re("button",{name:"MuiPickersMonth",slot:"MonthButton",overridesResolver:(e,t)=>[t.monthButton,{[`&.${bP.disabled}`]:t.disabled},{[`&.${bP.selected}`]:t.selected}]})(({theme:e})=>ue({color:"unset",backgroundColor:"transparent",border:0,outline:0},e.typography.subtitle1,{margin:"8px 0",height:36,width:72,borderRadius:18,cursor:"pointer","&:focus":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:St(e.palette.action.active,e.palette.action.hoverOpacity)},"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:St(e.palette.action.active,e.palette.action.hoverOpacity)},"&:disabled":{cursor:"auto",pointerEvents:"none"},[`&.${bP.disabled}`]:{color:(e.vars||e).palette.text.secondary},[`&.${bP.selected}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.main,"&:focus, &:hover":{backgroundColor:(e.vars||e).palette.primary.dark}}})),aht=v.memo(function(t){const n=cn({props:t,name:"MuiPickersMonth"}),{autoFocus:r,className:o,children:i,disabled:a,selected:s,value:l,tabIndex:c,onClick:u,onKeyDown:d,onFocus:f,onBlur:p,"aria-current":h,"aria-label":m,slots:y,slotProps:w}=n,x=zt(n,nht),S=v.useRef(null),E=rht(n);xu(()=>{var I;r&&((I=S.current)==null||I.focus())},[r]);const P=(y==null?void 0:y.monthButton)??iht,T=Yn({elementType:P,externalSlotProps:w==null?void 0:w.monthButton,additionalProps:{children:i,disabled:a,tabIndex:c,ref:S,type:"button",role:"radio","aria-current":h,"aria-checked":s,"aria-label":m,onClick:I=>u(I,l),onKeyDown:I=>d(I,l),onFocus:I=>f(I,l),onBlur:I=>p(I,l)},ownerState:n,className:E.monthButton});return R.jsx(oht,ue({className:de(E.root,o),ownerState:n},x,{children:R.jsx(P,ue({},T))}))});function sht(e){return Wn("MuiMonthCalendar",e)}Xn("MuiMonthCalendar",["root"]);const lht=["className","value","defaultValue","referenceDate","disabled","disableFuture","disablePast","maxDate","minDate","onChange","shouldDisableMonth","readOnly","disableHighlightToday","autoFocus","onMonthFocus","hasFocus","onFocusedViewChange","monthsPerRow","timezone","gridLabelId","slots","slotProps"],cht=e=>{const{classes:t}=e;return zn({root:["root"]},sht,t)};function uht(e,t){const n=Cn(),r=Hg(),o=cn({props:e,name:t});return ue({disableFuture:!1,disablePast:!1},o,{minDate:Li(n,o.minDate,r.minDate),maxDate:Li(n,o.maxDate,r.maxDate)})}const dht=re("div",{name:"MuiMonthCalendar",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",flexWrap:"wrap",alignContent:"stretch",padding:"0 4px",width:vM,boxSizing:"border-box"}),fht=v.forwardRef(function(t,n){const r=uht(t,"MuiMonthCalendar"),{className:o,value:i,defaultValue:a,referenceDate:s,disabled:l,disableFuture:c,disablePast:u,maxDate:d,minDate:f,onChange:p,shouldDisableMonth:h,readOnly:m,autoFocus:y=!1,onMonthFocus:w,hasFocus:x,onFocusedViewChange:S,monthsPerRow:E=3,timezone:P,gridLabelId:T,slots:I,slotProps:A}=r,k=zt(r,lht),{value:O,handleValueChange:$,timezone:N}=i0({name:"MonthCalendar",timezone:P,value:i,defaultValue:a,onChange:p,valueManager:go}),L=Ug(N),j=dr(),D=Cn(),_=v.useMemo(()=>go.getInitialReferenceValue({value:O,utils:D,props:r,timezone:N,referenceDate:s,granularity:pc.month}),[]),z=r,F=cht(z),V=v.useMemo(()=>D.getMonth(L),[D,L]),U=v.useMemo(()=>O!=null?D.getMonth(O):null,[O,D]),[K,X]=v.useState(()=>U||D.getMonth(_)),[ie,ee]=Sg({name:"MonthCalendar",state:"hasFocus",controlled:x,default:y??!1}),Q=kt(Z=>{ee(Z),S&&S(Z)}),te=v.useCallback(Z=>{const ce=D.startOfMonth(u&&D.isAfter(L,f)?L:f),ge=D.startOfMonth(c&&D.isBefore(L,d)?L:d),we=D.startOfMonth(Z);return D.isBefore(we,ce)||D.isAfter(we,ge)?!0:h?h(we):!1},[c,u,d,f,L,h,D]),pe=kt((Z,ce)=>{if(m)return;const ge=D.setMonth(O??_,ce);$(ge)}),ae=kt(Z=>{te(D.setMonth(O??_,Z))||(X(Z),Q(!0),w&&w(Z))});v.useEffect(()=>{X(Z=>U!==null&&Z!==U?U:Z)},[U]);const se=kt((Z,ce)=>{switch(Z.key){case"ArrowUp":ae((12+ce-3)%12),Z.preventDefault();break;case"ArrowDown":ae((12+ce+3)%12),Z.preventDefault();break;case"ArrowLeft":ae((12+ce+(j?1:-1))%12),Z.preventDefault();break;case"ArrowRight":ae((12+ce+(j?-1:1))%12),Z.preventDefault();break}}),oe=kt((Z,ce)=>{ae(ce)}),fe=kt((Z,ce)=>{K===ce&&Q(!1)});return R.jsx(dht,ue({ref:n,className:de(F.root,o),ownerState:z,role:"radiogroup","aria-labelledby":T},k,{children:_V(D,O??_).map(Z=>{const ce=D.getMonth(Z),ge=D.format(Z,"monthShort"),we=D.format(Z,"month"),me=ce===U,Se=l||te(Z);return R.jsx(aht,{selected:me,value:ce,onClick:pe,onKeyDown:se,autoFocus:ie&&ce===K,disabled:Se,tabIndex:ce===K&&!Se?0:-1,onFocus:oe,onBlur:fe,"aria-current":V===ce?"date":void 0,"aria-label":we,monthsPerRow:E,slots:I,slotProps:A,children:ge},ge)})}))});function pht(e){return Wn("MuiPickersYear",e)}const wP=Xn("MuiPickersYear",["root","yearButton","selected","disabled"]),hht=["autoFocus","className","children","disabled","selected","value","tabIndex","onClick","onKeyDown","onFocus","onBlur","aria-current","yearsPerRow","slots","slotProps"],ght=e=>{const{disabled:t,selected:n,classes:r}=e;return zn({root:["root"],yearButton:["yearButton",t&&"disabled",n&&"selected"]},pht,r)},mht=re("div",{name:"MuiPickersYear",slot:"Root",overridesResolver:(e,t)=>[t.root]})({display:"flex",alignItems:"center",justifyContent:"center",flexBasis:"33.3%",variants:[{props:{yearsPerRow:4},style:{flexBasis:"25%"}}]}),yht=re("button",{name:"MuiPickersYear",slot:"YearButton",overridesResolver:(e,t)=>[t.yearButton,{[`&.${wP.disabled}`]:t.disabled},{[`&.${wP.selected}`]:t.selected}]})(({theme:e})=>ue({color:"unset",backgroundColor:"transparent",border:0,outline:0},e.typography.subtitle1,{margin:"6px 0",height:36,width:72,borderRadius:18,cursor:"pointer","&:focus":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.focusOpacity})`:St(e.palette.action.active,e.palette.action.focusOpacity)},"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:St(e.palette.action.active,e.palette.action.hoverOpacity)},"&:disabled":{cursor:"auto",pointerEvents:"none"},[`&.${wP.disabled}`]:{color:(e.vars||e).palette.text.secondary},[`&.${wP.selected}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.main,"&:focus, &:hover":{backgroundColor:(e.vars||e).palette.primary.dark}}})),vht=v.memo(function(t){const n=cn({props:t,name:"MuiPickersYear"}),{autoFocus:r,className:o,children:i,disabled:a,selected:s,value:l,tabIndex:c,onClick:u,onKeyDown:d,onFocus:f,onBlur:p,"aria-current":h,slots:m,slotProps:y}=n,w=zt(n,hht),x=v.useRef(null),S=ght(n);xu(()=>{var T;r&&((T=x.current)==null||T.focus())},[r]);const E=(m==null?void 0:m.yearButton)??yht,P=Yn({elementType:E,externalSlotProps:y==null?void 0:y.yearButton,additionalProps:{children:i,disabled:a,tabIndex:c,ref:x,type:"button",role:"radio","aria-current":h,"aria-checked":s,onClick:T=>u(T,l),onKeyDown:T=>d(T,l),onFocus:T=>f(T,l),onBlur:T=>p(T,l)},ownerState:n,className:S.yearButton});return R.jsx(mht,ue({className:de(S.root,o),ownerState:n},w,{children:R.jsx(E,ue({},P))}))});function bht(e){return Wn("MuiYearCalendar",e)}Xn("MuiYearCalendar",["root"]);const wht=["autoFocus","className","value","defaultValue","referenceDate","disabled","disableFuture","disablePast","maxDate","minDate","onChange","readOnly","shouldDisableYear","disableHighlightToday","onYearFocus","hasFocus","onFocusedViewChange","yearsOrder","yearsPerRow","timezone","gridLabelId","slots","slotProps"],xht=e=>{const{classes:t}=e;return zn({root:["root"]},bht,t)};function Sht(e,t){const n=Cn(),r=Hg(),o=cn({props:e,name:t});return ue({disablePast:!1,disableFuture:!1},o,{yearsPerRow:o.yearsPerRow??3,minDate:Li(n,o.minDate,r.minDate),maxDate:Li(n,o.maxDate,r.maxDate)})}const Cht=re("div",{name:"MuiYearCalendar",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",flexDirection:"row",flexWrap:"wrap",overflowY:"auto",height:"100%",padding:"0 4px",width:vM,maxHeight:Uut,boxSizing:"border-box",position:"relative"}),Eht=v.forwardRef(function(t,n){const r=Sht(t,"MuiYearCalendar"),{autoFocus:o,className:i,value:a,defaultValue:s,referenceDate:l,disabled:c,disableFuture:u,disablePast:d,maxDate:f,minDate:p,onChange:h,readOnly:m,shouldDisableYear:y,onYearFocus:w,hasFocus:x,onFocusedViewChange:S,yearsOrder:E="asc",yearsPerRow:P,timezone:T,gridLabelId:I,slots:A,slotProps:k}=r,O=zt(r,wht),{value:$,handleValueChange:N,timezone:L}=i0({name:"YearCalendar",timezone:T,value:a,defaultValue:s,onChange:h,valueManager:go}),j=Ug(L),D=dr(),_=Cn(),z=v.useMemo(()=>go.getInitialReferenceValue({value:$,utils:_,props:r,timezone:L,referenceDate:l,granularity:pc.year}),[]),F=r,V=xht(F),U=v.useMemo(()=>_.getYear(j),[_,j]),K=v.useMemo(()=>$!=null?_.getYear($):null,[$,_]),[X,ie]=v.useState(()=>K||_.getYear(z)),[ee,Q]=Sg({name:"YearCalendar",state:"hasFocus",controlled:x,default:o??!1}),te=kt(xe=>{Q(xe),S&&S(xe)}),pe=v.useCallback(xe=>{if(d&&_.isBeforeYear(xe,j)||u&&_.isAfterYear(xe,j)||p&&_.isBeforeYear(xe,p)||f&&_.isAfterYear(xe,f))return!0;if(!y)return!1;const ke=_.startOfYear(xe);return y(ke)},[u,d,f,p,j,y,_]),ae=kt((xe,ke)=>{if(m)return;const De=_.setYear($??z,ke);N(De)}),se=kt(xe=>{pe(_.setYear($??z,xe))||(ie(xe),te(!0),w==null||w(xe))});v.useEffect(()=>{ie(xe=>K!==null&&xe!==K?K:xe)},[K]);const oe=E!=="desc"?P*1:P*-1,fe=D&&E==="asc"||!D&&E==="desc"?-1:1,Z=kt((xe,ke)=>{switch(xe.key){case"ArrowUp":se(ke-oe),xe.preventDefault();break;case"ArrowDown":se(ke+oe),xe.preventDefault();break;case"ArrowLeft":se(ke-fe),xe.preventDefault();break;case"ArrowRight":se(ke+fe),xe.preventDefault();break}}),ce=kt((xe,ke)=>{se(ke)}),ge=kt((xe,ke)=>{X===ke&&te(!1)}),we=v.useRef(null),me=ua(n,we);v.useEffect(()=>{if(o||we.current===null)return;const xe=we.current.querySelector('[tabindex="0"]');if(!xe)return;const ke=xe.offsetHeight,De=xe.offsetTop,_e=we.current.clientHeight,ye=we.current.scrollTop,Pe=De+ke;ke>_e||De{const ke=_.getYear(xe),De=ke===K,_e=c||pe(xe);return R.jsx(vht,{selected:De,value:ke,onClick:ae,onKeyDown:Z,autoFocus:ee&&ke===X,disabled:_e,tabIndex:ke===X&&!_e?0:-1,onFocus:ce,onBlur:ge,"aria-current":U===ke?"date":void 0,yearsPerRow:P,slots:A,slotProps:k,children:_.format(xe,"year")},_.format(xe,"year"))})}))}),Pht=e=>Wn("MuiPickersCalendarHeader",e),Tht=Xn("MuiPickersCalendarHeader",["root","labelContainer","label","switchViewButton","switchViewIcon"]),Iht=["slots","slotProps","currentMonth","disabled","disableFuture","disablePast","maxDate","minDate","onMonthChange","onViewChange","view","reduceAnimations","views","labelId","className","timezone","format"],Oht=["ownerState"],Aht=e=>{const{classes:t}=e;return zn({root:["root"],labelContainer:["labelContainer"],label:["label"],switchViewButton:["switchViewButton"],switchViewIcon:["switchViewIcon"]},Pht,t)},kht=re("div",{name:"MuiPickersCalendarHeader",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",alignItems:"center",marginTop:12,marginBottom:4,paddingLeft:24,paddingRight:12,maxHeight:40,minHeight:40}),Mht=re("div",{name:"MuiPickersCalendarHeader",slot:"LabelContainer",overridesResolver:(e,t)=>t.labelContainer})(({theme:e})=>ue({display:"flex",overflow:"hidden",alignItems:"center",cursor:"pointer",marginRight:"auto"},e.typography.body1,{fontWeight:e.typography.fontWeightMedium})),Rht=re("div",{name:"MuiPickersCalendarHeader",slot:"Label",overridesResolver:(e,t)=>t.label})({marginRight:6}),$ht=re(vn,{name:"MuiPickersCalendarHeader",slot:"SwitchViewButton",overridesResolver:(e,t)=>t.switchViewButton})({marginRight:"auto",variants:[{props:{view:"year"},style:{[`.${Tht.switchViewIcon}`]:{transform:"rotate(180deg)"}}}]}),Dht=re(Tut,{name:"MuiPickersCalendarHeader",slot:"SwitchViewIcon",overridesResolver:(e,t)=>t.switchViewIcon})(({theme:e})=>({willChange:"transform",transition:e.transitions.create("transform"),transform:"rotate(0deg)"})),_ht=v.forwardRef(function(t,n){const r=$o(),o=Cn(),i=cn({props:t,name:"MuiPickersCalendarHeader"}),{slots:a,slotProps:s,currentMonth:l,disabled:c,disableFuture:u,disablePast:d,maxDate:f,minDate:p,onMonthChange:h,onViewChange:m,view:y,reduceAnimations:w,views:x,labelId:S,className:E,timezone:P,format:T=`${o.formats.month} ${o.formats.year}`}=i,I=zt(i,Iht),A=i,k=Aht(i),O=(a==null?void 0:a.switchViewButton)??$ht,$=Yn({elementType:O,externalSlotProps:s==null?void 0:s.switchViewButton,additionalProps:{size:"small","aria-label":r.calendarViewSwitchingButtonAriaLabel(y)},ownerState:A,className:k.switchViewButton}),N=(a==null?void 0:a.switchViewIcon)??Dht,L=Yn({elementType:N,externalSlotProps:s==null?void 0:s.switchViewIcon,ownerState:A,className:k.switchViewIcon}),j=zt(L,Oht),D=()=>h(o.addMonths(l,1),"left"),_=()=>h(o.addMonths(l,-1),"right"),z=Vut(l,{disableFuture:u,maxDate:f,timezone:P}),F=Hut(l,{disablePast:d,minDate:p,timezone:P}),V=()=>{if(!(x.length===1||!m||c))if(x.length===2)m(x.find(K=>K!==y)||x[0]);else{const K=x.indexOf(y)!==0?0:1;m(x[K])}};if(x.length===1&&x[0]==="year")return null;const U=o.formatByString(l,T);return R.jsxs(kht,ue({},I,{ownerState:A,className:de(k.root,E),ref:n,children:[R.jsxs(Mht,{role:"presentation",onClick:V,ownerState:A,"aria-live":"polite",className:k.labelContainer,children:[R.jsx(_le,{reduceAnimations:w,transKey:U,children:R.jsx(Rht,{id:S,ownerState:A,className:k.label,children:U})}),x.length>1&&!c&&R.jsx(O,ue({},$,{children:R.jsx(N,ue({},j))}))]}),R.jsx(Ob,{in:y==="day",children:R.jsx(ale,{slots:a,slotProps:s,onGoToPrevious:_,isPreviousDisabled:F,previousLabel:r.previousMonth,onGoToNext:D,isNextDisabled:z,nextLabel:r.nextMonth})})]}))}),Nht="@media (prefers-reduced-motion: reduce)",qy=typeof navigator<"u"&&navigator.userAgent.match(/android\s(\d+)|OS\s(\d+)/i),Z7=qy&&qy[1]?parseInt(qy[1],10):null,eK=qy&&qy[2]?parseInt(qy[2],10):null,Lht=Z7&&Z7<10||eK&&eK<13||!1,Lle=()=>op(Nht,{defaultMatches:!1})||Lht,Fht=e=>Wn("MuiDateCalendar",e);Xn("MuiDateCalendar",["root","viewTransitionContainer"]);const jht=["autoFocus","onViewChange","value","defaultValue","referenceDate","disableFuture","disablePast","onChange","onYearChange","onMonthChange","reduceAnimations","shouldDisableDate","shouldDisableMonth","shouldDisableYear","view","views","openTo","className","disabled","readOnly","minDate","maxDate","disableHighlightToday","focusedView","onFocusedViewChange","showDaysOutsideCurrentMonth","fixedWeekNumber","dayOfWeekFormatter","slots","slotProps","loading","renderLoading","displayWeekNumber","yearsOrder","yearsPerRow","monthsPerRow","timezone"],Bht=e=>{const{classes:t}=e;return zn({root:["root"],viewTransitionContainer:["viewTransitionContainer"]},Fht,t)};function zht(e,t){const n=Cn(),r=Hg(),o=Lle(),i=cn({props:e,name:t});return ue({},i,{loading:i.loading??!1,disablePast:i.disablePast??!1,disableFuture:i.disableFuture??!1,openTo:i.openTo??"day",views:i.views??["year","day"],reduceAnimations:i.reduceAnimations??o,renderLoading:i.renderLoading??(()=>R.jsx("span",{children:"..."})),minDate:Li(n,i.minDate,r.minDate),maxDate:Li(n,i.maxDate,r.maxDate)})}const Vht=re(wM,{name:"MuiDateCalendar",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",flexDirection:"column",height:bM}),Hht=re(_le,{name:"MuiDateCalendar",slot:"ViewTransitionContainer",overridesResolver:(e,t)=>t.viewTransitionContainer})({}),Uht=v.forwardRef(function(t,n){const r=Cn(),o=r0(),i=zht(t,"MuiDateCalendar"),{autoFocus:a,onViewChange:s,value:l,defaultValue:c,referenceDate:u,disableFuture:d,disablePast:f,onChange:p,onYearChange:h,onMonthChange:m,reduceAnimations:y,shouldDisableDate:w,shouldDisableMonth:x,shouldDisableYear:S,view:E,views:P,openTo:T,className:I,disabled:A,readOnly:k,minDate:O,maxDate:$,disableHighlightToday:N,focusedView:L,onFocusedViewChange:j,showDaysOutsideCurrentMonth:D,fixedWeekNumber:_,dayOfWeekFormatter:z,slots:F,slotProps:V,loading:U,renderLoading:K,displayWeekNumber:X,yearsOrder:ie,yearsPerRow:ee,monthsPerRow:Q,timezone:te}=i,pe=zt(i,jht),{value:ae,handleValueChange:se,timezone:oe}=i0({name:"DateCalendar",timezone:te,value:l,defaultValue:c,onChange:p,valueManager:go}),{view:fe,setView:Z,focusedView:ce,setFocusedView:ge,goToNextView:we,setValueAndGoToNextView:me}=f1({view:E,views:P,openTo:T,onChange:se,onViewChange:s,autoFocus:a,focusedView:L,onFocusedViewChange:j}),{referenceDate:Se,calendarState:xe,changeFocusedDay:ke,changeMonth:De,handleChangeMonth:_e,isDateDisabled:ye,onMonthSwitchingAnimationEnd:Pe}=Mpt({value:ae,referenceDate:u,reduceAnimations:y,onMonthChange:m,minDate:O,maxDate:$,shouldDisableDate:w,disablePast:f,disableFuture:d,timezone:oe}),Ae=A&&ae||O,Me=A&&ae||$,We=`${o}-grid-label`,He=ce!==null,Xe=(F==null?void 0:F.calendarHeader)??_ht,gt=Yn({elementType:Xe,externalSlotProps:V==null?void 0:V.calendarHeader,additionalProps:{views:P,view:fe,currentMonth:xe.currentMonth,onViewChange:Z,onMonthChange:($t,bn)=>_e({newMonth:$t,direction:bn}),minDate:Ae,maxDate:Me,disabled:A,disablePast:f,disableFuture:d,reduceAnimations:y,timezone:oe,labelId:We},ownerState:i}),st=kt($t=>{const bn=r.startOfMonth($t),Gn=r.endOfMonth($t),Jn=ye($t)?Px({utils:r,date:$t,minDate:r.isBefore(O,bn)?bn:O,maxDate:r.isAfter($,Gn)?Gn:$,disablePast:f,disableFuture:d,isDateDisabled:ye,timezone:oe}):$t;Jn?(me(Jn,"finish"),m==null||m(bn)):(we(),De(bn)),ke(Jn,!0)}),et=kt($t=>{const bn=r.startOfYear($t),Gn=r.endOfYear($t),Jn=ye($t)?Px({utils:r,date:$t,minDate:r.isBefore(O,bn)?bn:O,maxDate:r.isAfter($,Gn)?Gn:$,disablePast:f,disableFuture:d,isDateDisabled:ye,timezone:oe}):$t;Jn?(me(Jn,"finish"),h==null||h(Jn)):(we(),De(bn)),ke(Jn,!0)}),Et=kt($t=>se($t&&EO(r,$t,ae??Se),"finish",fe));v.useEffect(()=>{ae!=null&&r.isValid(ae)&&De(ae)},[ae]);const An=i,Ke=Bht(An),$e={disablePast:f,disableFuture:d,maxDate:$,minDate:O},Qe={disableHighlightToday:N,readOnly:k,disabled:A,timezone:oe,gridLabelId:We,slots:F,slotProps:V},Tt=v.useRef(fe);v.useEffect(()=>{Tt.current!==fe&&(ce===Tt.current&&ge(fe,!0),Tt.current=fe)},[ce,ge,fe]);const Xt=v.useMemo(()=>[ae],[ae]);return R.jsxs(Vht,ue({ref:n,className:de(Ke.root,I),ownerState:An},pe,{children:[R.jsx(Xe,ue({},gt,{slots:F,slotProps:V})),R.jsx(Hht,{reduceAnimations:y,className:Ke.viewTransitionContainer,transKey:fe,ownerState:An,children:R.jsxs("div",{children:[fe==="year"&&R.jsx(Eht,ue({},$e,Qe,{value:ae,onChange:et,shouldDisableYear:S,hasFocus:He,onFocusedViewChange:$t=>ge("year",$t),yearsOrder:ie,yearsPerRow:ee,referenceDate:Se})),fe==="month"&&R.jsx(fht,ue({},$e,Qe,{hasFocus:He,className:I,value:ae,onChange:st,shouldDisableMonth:x,onFocusedViewChange:$t=>ge("month",$t),monthsPerRow:Q,referenceDate:Se})),fe==="day"&&R.jsx(eht,ue({},xe,$e,Qe,{onMonthSwitchingAnimationEnd:Pe,onFocusedDayChange:ke,reduceAnimations:y,selectedDays:Xt,onSelectedDaysChange:Et,shouldDisableDate:w,shouldDisableMonth:x,shouldDisableYear:S,hasFocus:He,onFocusedViewChange:$t=>ge("day",$t),showDaysOutsideCurrentMonth:D,fixedWeekNumber:_,dayOfWeekFormatter:z,displayWeekNumber:X,loading:U,renderLoading:K}))]})})]}))});function Fle(e){return Wn("MuiPickersToolbar",e)}const Wht=Xn("MuiPickersToolbar",["root","content"]),Ght=["children","className","toolbarTitle","hidden","titleId","isLandscape","classes","landscapeDirection"],qht=e=>{const{classes:t,isLandscape:n}=e;return zn({root:["root"],content:["content"],penIconButton:["penIconButton",n&&"penIconButtonLandscape"]},Fle,t)},Kht=re("div",{name:"MuiPickersToolbar",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({display:"flex",flexDirection:"column",alignItems:"flex-start",justifyContent:"space-between",padding:e.spacing(2,3),variants:[{props:{isLandscape:!0},style:{height:"auto",maxWidth:160,padding:16,justifyContent:"flex-start",flexWrap:"wrap"}}]})),Yht=re("div",{name:"MuiPickersToolbar",slot:"Content",overridesResolver:(e,t)=>t.content})({display:"flex",flexWrap:"wrap",width:"100%",flex:1,justifyContent:"space-between",alignItems:"center",flexDirection:"row",variants:[{props:{isLandscape:!0},style:{justifyContent:"flex-start",alignItems:"flex-start",flexDirection:"column"}},{props:{isLandscape:!0,landscapeDirection:"row"},style:{flexDirection:"row"}}]}),QV=v.forwardRef(function(t,n){const r=cn({props:t,name:"MuiPickersToolbar"}),{children:o,className:i,toolbarTitle:a,hidden:s,titleId:l}=r,c=zt(r,Ght),u=r,d=qht(u);return s?null:R.jsxs(Kht,ue({ref:n,className:de(d.root,i),ownerState:u},c,{children:[R.jsx(ot,{color:"text.secondary",variant:"overline",id:l,children:a}),R.jsx(Yht,{className:d.content,ownerState:u,children:o})]}))});function Qht(e){return Wn("MuiDatePickerToolbar",e)}Xn("MuiDatePickerToolbar",["root","title"]);const Xht=["value","isLandscape","onChange","toolbarFormat","toolbarPlaceholder","views","className","onViewChange","view"],Jht=e=>{const{classes:t}=e;return zn({root:["root"],title:["title"]},Qht,t)},Zht=re(QV,{name:"MuiDatePickerToolbar",slot:"Root",overridesResolver:(e,t)=>t.root})({}),egt=re(ot,{name:"MuiDatePickerToolbar",slot:"Title",overridesResolver:(e,t)=>t.title})({variants:[{props:{isLandscape:!0},style:{margin:"auto 16px auto auto"}}]}),tgt=v.forwardRef(function(t,n){const r=cn({props:t,name:"MuiDatePickerToolbar"}),{value:o,isLandscape:i,toolbarFormat:a,toolbarPlaceholder:s="––",views:l,className:c}=r,u=zt(r,Xht),d=Cn(),f=$o(),p=Jht(r),h=v.useMemo(()=>{if(!o)return s;const y=qS(d,{format:a,views:l},!0);return d.formatByString(o,y)},[o,a,s,d,l]),m=r;return R.jsx(Zht,ue({ref:n,toolbarTitle:f.datePickerToolbarTitle,isLandscape:i,className:de(p.root,c)},u,{children:R.jsx(egt,{variant:"h4",align:i?"left":"center",ownerState:m,className:p.title,children:h})}))});function jle(e,t){const n=Cn(),r=Hg(),o=cn({props:e,name:t}),i=v.useMemo(()=>{var a;return((a=o.localeText)==null?void 0:a.toolbarTitle)==null?o.localeText:ue({},o.localeText,{datePickerToolbarTitle:o.localeText.toolbarTitle})},[o.localeText]);return ue({},o,{localeText:i},DV({views:o.views,openTo:o.openTo,defaultViews:["year","day"],defaultOpenTo:"day"}),{disableFuture:o.disableFuture??!1,disablePast:o.disablePast??!1,minDate:Li(n,o.minDate,r.minDate),maxDate:Li(n,o.maxDate,r.maxDate),slots:ue({toolbar:tgt},o.slots)})}function ngt(e){return Wn("MuiPickersPopper",e)}Xn("MuiPickersPopper",["root","paper"]);const rgt=["PaperComponent","popperPlacement","ownerState","children","paperSlotProps","paperClasses","onPaperClick","onPaperTouchStart"],ogt=e=>{const{classes:t}=e;return zn({root:["root"],paper:["paper"]},ngt,t)},igt=re(Pp,{name:"MuiPickersPopper",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({zIndex:e.zIndex.modal})),agt=re(ro,{name:"MuiPickersPopper",slot:"Paper",overridesResolver:(e,t)=>t.paper})({outline:0,transformOrigin:"top center",variants:[{props:({placement:e})=>["top","top-start","top-end"].includes(e),style:{transformOrigin:"bottom center"}}]});function sgt(e,t){return t.documentElement.clientWidth{if(!e)return;function l(){i.current=!0}return document.addEventListener("mousedown",l,!0),document.addEventListener("touchstart",l,!0),()=>{document.removeEventListener("mousedown",l,!0),document.removeEventListener("touchstart",l,!0),i.current=!1}},[e]);const a=kt(l=>{if(!i.current)return;const c=r.current;r.current=!1;const u=KD(o.current);if(!o.current||"clientX"in l&&sgt(l,u))return;if(n.current){n.current=!1;return}let d;l.composedPath?d=l.composedPath().indexOf(o.current)>-1:d=!u.documentElement.contains(l.target)||o.current.contains(l.target),!d&&!c&&t(l)}),s=()=>{r.current=!0};return v.useEffect(()=>{if(e){const l=KD(o.current),c=()=>{n.current=!0};return l.addEventListener("touchstart",a),l.addEventListener("touchmove",c),()=>{l.removeEventListener("touchstart",a),l.removeEventListener("touchmove",c)}}},[e,a]),v.useEffect(()=>{if(e){const l=KD(o.current);return l.addEventListener("click",a),()=>{l.removeEventListener("click",a),r.current=!1}}},[e,a]),[o,s,s]}const cgt=v.forwardRef((e,t)=>{const{PaperComponent:n,popperPlacement:r,ownerState:o,children:i,paperSlotProps:a,paperClasses:s,onPaperClick:l,onPaperTouchStart:c}=e,u=zt(e,rgt),d=ue({},o,{placement:r}),f=Yn({elementType:n,externalSlotProps:a,additionalProps:{tabIndex:-1,elevation:8,ref:t},className:s,ownerState:d});return R.jsx(n,ue({},u,f,{onClick:p=>{var h;l(p),(h=f.onClick)==null||h.call(f,p)},onTouchStart:p=>{var h;c(p),(h=f.onTouchStart)==null||h.call(f,p)},ownerState:d,children:i}))});function ugt(e){const t=cn({props:e,name:"MuiPickersPopper"}),{anchorEl:n,children:r,containerRef:o=null,shouldRestoreFocus:i,onBlur:a,onDismiss:s,open:l,role:c,placement:u,slots:d,slotProps:f,reduceAnimations:p}=t;v.useEffect(()=>{function D(_){l&&_.key==="Escape"&&s()}return document.addEventListener("keydown",D),()=>{document.removeEventListener("keydown",D)}},[s,l]);const h=v.useRef(null);v.useEffect(()=>{c==="tooltip"||i&&!i()||(l?h.current=Sa(document):h.current&&h.current instanceof HTMLElement&&setTimeout(()=>{h.current instanceof HTMLElement&&h.current.focus()}))},[l,c,i]);const[m,y,w]=lgt(l,a??s),x=v.useRef(null),S=ua(x,o),E=ua(S,m),P=t,T=ogt(P),I=Lle(),A=p??I,k=D=>{D.key==="Escape"&&(D.stopPropagation(),s())},O=(d==null?void 0:d.desktopTransition)??A?Ob:cp,$=(d==null?void 0:d.desktopTrapFocus)??tz,N=(d==null?void 0:d.desktopPaper)??agt,L=(d==null?void 0:d.popper)??igt,j=Yn({elementType:L,externalSlotProps:f==null?void 0:f.popper,additionalProps:{transition:!0,role:c,open:l,anchorEl:n,placement:u,onKeyDown:k},className:T.root,ownerState:t});return R.jsx(L,ue({},j,{children:({TransitionProps:D,placement:_})=>R.jsx($,ue({open:l,disableAutoFocus:!0,disableRestoreFocus:!0,disableEnforceFocus:c==="tooltip",isEnabled:()=>!0},f==null?void 0:f.desktopTrapFocus,{children:R.jsx(O,ue({},D,f==null?void 0:f.desktopTransition,{children:R.jsx(cgt,{PaperComponent:N,ownerState:P,popperPlacement:_,ref:E,onPaperClick:y,onPaperTouchStart:w,paperClasses:T.paper,paperSlotProps:f==null?void 0:f.desktopPaper,children:r})}))}))}))}const dgt=({open:e,onOpen:t,onClose:n})=>{const r=v.useRef(typeof e=="boolean").current,[o,i]=v.useState(!1);v.useEffect(()=>{if(r){if(typeof e!="boolean")throw new Error("You must not mix controlling and uncontrolled mode for `open` prop");i(e)}},[r,e]);const a=v.useCallback(s=>{r||i(s),s&&t&&t(),!s&&n&&n()},[r,t,n]);return{isOpen:o,setIsOpen:a}},fgt=e=>{const{action:t,hasChanged:n,dateState:r,isControlled:o}=e,i=!o&&!r.hasBeenModifiedSinceMount;return t.name==="setValueFromField"?!0:t.name==="setValueFromAction"?i&&["accept","today","clear"].includes(t.pickerAction)?!0:n(r.lastPublishedValue):t.name==="setValueFromView"&&t.selectionState!=="shallow"||t.name==="setValueFromShortcut"?i?!0:n(r.lastPublishedValue):!1},pgt=e=>{const{action:t,hasChanged:n,dateState:r,isControlled:o,closeOnSelect:i}=e,a=!o&&!r.hasBeenModifiedSinceMount;return t.name==="setValueFromAction"?a&&["accept","today","clear"].includes(t.pickerAction)?!0:n(r.lastCommittedValue):t.name==="setValueFromView"&&t.selectionState==="finish"&&i?a?!0:n(r.lastCommittedValue):t.name==="setValueFromShortcut"?t.changeImportance==="accept"&&n(r.lastCommittedValue):!1},hgt=e=>{const{action:t,closeOnSelect:n}=e;return t.name==="setValueFromAction"?!0:t.name==="setValueFromView"?t.selectionState==="finish"&&n:t.name==="setValueFromShortcut"?t.changeImportance==="accept":!1},ggt=({props:e,valueManager:t,valueType:n,wrapperVariant:r,validator:o})=>{const{onAccept:i,onChange:a,value:s,defaultValue:l,closeOnSelect:c=r==="desktop",timezone:u}=e,{current:d}=v.useRef(l),{current:f}=v.useRef(s!==void 0),p=Cn(),h=Vg(),{isOpen:m,setIsOpen:y}=dgt(e),{timezone:w,value:x,handleValueChange:S}=LV({timezone:u,value:s,defaultValue:d,onChange:a,valueManager:t}),[E,P]=v.useState(()=>{let Q;return x!==void 0?Q=x:d!==void 0?Q=d:Q=t.emptyValue,{draft:Q,lastPublishedValue:Q,lastCommittedValue:Q,lastControlledValue:x,hasBeenModifiedSinceMount:!1}}),{getValidationErrorForNewValue:T}=Sle({props:e,validator:o,timezone:w,value:E.draft,onError:e.onError}),I=kt(Q=>{const te={action:Q,dateState:E,hasChanged:Z=>!t.areValuesEqual(p,Q.value,Z),isControlled:f,closeOnSelect:c},pe=fgt(te),ae=pgt(te),se=hgt(te);P(Z=>ue({},Z,{draft:Q.value,lastPublishedValue:pe?Q.value:Z.lastPublishedValue,lastCommittedValue:ae?Q.value:Z.lastCommittedValue,hasBeenModifiedSinceMount:!0}));let oe=null;const fe=()=>(oe||(oe={validationError:Q.name==="setValueFromField"?Q.context.validationError:T(Q.value)},Q.name==="setValueFromShortcut"&&(oe.shortcut=Q.shortcut)),oe);pe&&S(Q.value,fe()),ae&&i&&i(Q.value,fe()),se&&y(!1)});if(x!==void 0&&(E.lastControlledValue===void 0||!t.areValuesEqual(p,E.lastControlledValue,x))){const Q=t.areValuesEqual(p,E.draft,x);P(te=>ue({},te,{lastControlledValue:x},Q?{}:{lastCommittedValue:x,lastPublishedValue:x,draft:x,hasBeenModifiedSinceMount:!0}))}const A=kt(()=>{I({value:t.emptyValue,name:"setValueFromAction",pickerAction:"clear"})}),k=kt(()=>{I({value:E.lastPublishedValue,name:"setValueFromAction",pickerAction:"accept"})}),O=kt(()=>{I({value:E.lastPublishedValue,name:"setValueFromAction",pickerAction:"dismiss"})}),$=kt(()=>{I({value:E.lastCommittedValue,name:"setValueFromAction",pickerAction:"cancel"})}),N=kt(()=>{I({value:t.getTodayValue(p,w,n),name:"setValueFromAction",pickerAction:"today"})}),L=kt(Q=>{Q.preventDefault(),y(!0)}),j=kt(Q=>{Q==null||Q.preventDefault(),y(!1)}),D=kt((Q,te="partial")=>I({name:"setValueFromView",value:Q,selectionState:te})),_=kt((Q,te,pe)=>I({name:"setValueFromShortcut",value:Q,changeImportance:te,shortcut:pe})),z=kt((Q,te)=>I({name:"setValueFromField",value:Q,context:te})),F={onClear:A,onAccept:k,onDismiss:O,onCancel:$,onSetToday:N,onOpen:L,onClose:j},V={value:E.draft,onChange:z},U=v.useMemo(()=>t.cleanValue(p,E.draft),[p,t,E.draft]),K={value:U,onChange:D,onClose:j,open:m},ie=ue({},F,{value:U,onChange:D,onSelectShortcut:_,isValid:Q=>{const te=o({adapter:h,value:Q,timezone:w,props:e});return!t.hasError(te)}}),ee=v.useMemo(()=>({onOpen:L,onClose:j,open:m}),[m,j,L]);return{open:m,fieldProps:V,viewProps:K,layoutProps:ie,actions:F,contextValue:ee}},mgt=["className","sx"],ygt=({props:e,propsFromPickerValue:t,additionalViewProps:n,autoFocusView:r,rendererInterceptor:o,fieldRef:i})=>{const{onChange:a,open:s,onClose:l}=t,{view:c,views:u,openTo:d,onViewChange:f,viewRenderers:p,timezone:h}=e,m=zt(e,mgt),{view:y,setView:w,defaultView:x,focusedView:S,setFocusedView:E,setValueAndGoToNextView:P}=f1({view:c,views:u,openTo:d,onChange:a,onViewChange:f,autoFocus:r}),{hasUIView:T,viewModeLookup:I}=v.useMemo(()=>u.reduce((j,D)=>{let _;return p[D]!=null?_="UI":_="field",j.viewModeLookup[D]=_,_==="UI"&&(j.hasUIView=!0),j},{hasUIView:!1,viewModeLookup:{}}),[p,u]),A=v.useMemo(()=>u.reduce((j,D)=>p[D]!=null&&ab(D)?j+1:j,0),[p,u]),k=I[y],O=kt(()=>k==="UI"),[$,N]=v.useState(k==="UI"?y:null);return $!==y&&I[y]==="UI"&&N(y),xu(()=>{k==="field"&&s&&(l(),setTimeout(()=>{var j,D;(j=i==null?void 0:i.current)==null||j.setSelectedSections(y),(D=i==null?void 0:i.current)==null||D.focusField(y)}))},[y]),xu(()=>{if(!s)return;let j=y;k==="field"&&$!=null&&(j=$),j!==x&&I[j]==="UI"&&I[x]==="UI"&&(j=x),j!==y&&w(j),E(j,!0)},[s]),{hasUIView:T,shouldRestoreFocus:O,layoutProps:{views:u,view:$,onViewChange:w},renderCurrentView:()=>{if($==null)return null;const j=p[$];if(j==null)return null;const D=ue({},m,n,t,{views:u,timezone:h,onChange:P,view:$,onViewChange:w,focusedView:S,onFocusedViewChange:E,showViewSwitcher:A>1,timeViewsCount:A});return o?o(p,$,D):j(D)}}};function tK(){return typeof window>"u"?"portrait":window.screen&&window.screen.orientation&&window.screen.orientation.angle?Math.abs(window.screen.orientation.angle)===90?"landscape":"portrait":window.orientation&&Math.abs(Number(window.orientation))===90?"landscape":"portrait"}const vgt=(e,t)=>{const[n,r]=v.useState(tK);return xu(()=>{const i=()=>{r(tK())};return window.addEventListener("orientationchange",i),()=>{window.removeEventListener("orientationchange",i)}},[]),Jm(e,["hours","minutes","seconds"])?!1:(t||n)==="landscape"},bgt=({props:e,propsFromPickerValue:t,propsFromPickerViews:n,wrapperVariant:r})=>{const{orientation:o}=e,i=vgt(n.views,o),a=dr();return{layoutProps:ue({},n,t,{isLandscape:i,isRtl:a,wrapperVariant:r,disabled:e.disabled,readOnly:e.readOnly})}};function wgt(e){const{props:t,pickerValueResponse:n}=e;return v.useMemo(()=>({value:n.viewProps.value,open:n.open,disabled:t.disabled??!1,readOnly:t.readOnly??!1}),[n.viewProps.value,n.open,t.disabled,t.readOnly])}const Ble=({props:e,valueManager:t,valueType:n,wrapperVariant:r,additionalViewProps:o,validator:i,autoFocusView:a,rendererInterceptor:s,fieldRef:l})=>{const c=ggt({props:e,valueManager:t,valueType:n,wrapperVariant:r,validator:i}),u=ygt({props:e,additionalViewProps:o,autoFocusView:a,fieldRef:l,propsFromPickerValue:c.viewProps,rendererInterceptor:s}),d=bgt({props:e,wrapperVariant:r,propsFromPickerValue:c.layoutProps,propsFromPickerViews:u.layoutProps}),f=wgt({props:e,pickerValueResponse:c});return{open:c.open,actions:c.actions,fieldProps:c.fieldProps,renderCurrentView:u.renderCurrentView,hasUIView:u.hasUIView,shouldRestoreFocus:u.shouldRestoreFocus,layoutProps:d.layoutProps,contextValue:c.contextValue,ownerState:f}};function zle(e){return Wn("MuiPickersLayout",e)}const uc=Xn("MuiPickersLayout",["root","landscape","contentWrapper","toolbar","actionBar","tabs","shortcuts"]),xgt=["onAccept","onClear","onCancel","onSetToday","actions"];function Sgt(e){const{onAccept:t,onClear:n,onCancel:r,onSetToday:o,actions:i}=e,a=zt(e,xgt),s=$o();if(i==null||i.length===0)return null;const l=i==null?void 0:i.map(c=>{switch(c){case"clear":return R.jsx(dt,{onClick:n,children:s.clearButtonLabel},c);case"cancel":return R.jsx(dt,{onClick:r,children:s.cancelButtonLabel},c);case"accept":return R.jsx(dt,{onClick:t,children:s.okButtonLabel},c);case"today":return R.jsx(dt,{onClick:o,children:s.todayButtonLabel},c);default:return null}});return R.jsx(VC,ue({},a,{children:l}))}const Cgt=["items","changeImportance","isLandscape","onChange","isValid"],Egt=["getValue"];function Pgt(e){const{items:t,changeImportance:n="accept",onChange:r,isValid:o}=e,i=zt(e,Cgt);if(t==null||t.length===0)return null;const a=t.map(s=>{let{getValue:l}=s,c=zt(s,Egt);const u=l({isValid:o});return ue({},c,{label:c.label,onClick:()=>{r(u,n,c)},disabled:!o(u)})});return R.jsx(Bl,ue({dense:!0,sx:[{maxHeight:bM,maxWidth:200,overflow:"auto"},...Array.isArray(i.sx)?i.sx:[i.sx]]},i,{children:a.map(s=>R.jsx(Os,{children:R.jsx(vu,ue({},s))},s.id??s.label))}))}function Tgt(e){return e.view!==null}const Igt=e=>{const{classes:t,isLandscape:n}=e;return zn({root:["root",n&&"landscape"],contentWrapper:["contentWrapper"],toolbar:["toolbar"],actionBar:["actionBar"],tabs:["tabs"],landscape:["landscape"],shortcuts:["shortcuts"]},zle,t)},Vle=e=>{const{wrapperVariant:t,onAccept:n,onClear:r,onCancel:o,onSetToday:i,view:a,views:s,onViewChange:l,value:c,onChange:u,onSelectShortcut:d,isValid:f,isLandscape:p,disabled:h,readOnly:m,children:y,slots:w,slotProps:x}=e,S=Igt(e),E=(w==null?void 0:w.actionBar)??Sgt,P=Yn({elementType:E,externalSlotProps:x==null?void 0:x.actionBar,additionalProps:{onAccept:n,onClear:r,onCancel:o,onSetToday:i,actions:t==="desktop"?[]:["cancel","accept"]},className:S.actionBar,ownerState:ue({},e,{wrapperVariant:t})}),T=R.jsx(E,ue({},P)),I=w==null?void 0:w.toolbar,A=Yn({elementType:I,externalSlotProps:x==null?void 0:x.toolbar,additionalProps:{isLandscape:p,onChange:u,value:c,view:a,onViewChange:l,views:s,disabled:h,readOnly:m},className:S.toolbar,ownerState:ue({},e,{wrapperVariant:t})}),k=Tgt(A)&&I?R.jsx(I,ue({},A)):null,O=y,$=w==null?void 0:w.tabs,N=a&&$?R.jsx($,ue({view:a,onViewChange:l,className:S.tabs},x==null?void 0:x.tabs)):null,L=(w==null?void 0:w.shortcuts)??Pgt,j=Yn({elementType:L,externalSlotProps:x==null?void 0:x.shortcuts,additionalProps:{isValid:f,isLandscape:p,onChange:d},className:S.shortcuts,ownerState:{isValid:f,isLandscape:p,onChange:d,wrapperVariant:t}}),D=a&&L?R.jsx(L,ue({},j)):null;return{toolbar:k,content:O,tabs:N,actionBar:T,shortcuts:D}},Ogt=e=>{const{isLandscape:t,classes:n}=e;return zn({root:["root",t&&"landscape"],contentWrapper:["contentWrapper"]},zle,n)},Hle=re("div",{name:"MuiPickersLayout",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"grid",gridAutoColumns:"max-content auto max-content",gridAutoRows:"max-content auto max-content",[`& .${uc.actionBar}`]:{gridColumn:"1 / 4",gridRow:3},variants:[{props:{isLandscape:!0},style:{[`& .${uc.toolbar}`]:{gridColumn:1,gridRow:"2 / 3"},[`.${uc.shortcuts}`]:{gridColumn:"2 / 4",gridRow:1}}},{props:{isLandscape:!0,isRtl:!0},style:{[`& .${uc.toolbar}`]:{gridColumn:3}}},{props:{isLandscape:!1},style:{[`& .${uc.toolbar}`]:{gridColumn:"2 / 4",gridRow:1},[`& .${uc.shortcuts}`]:{gridColumn:1,gridRow:"2 / 3"}}},{props:{isLandscape:!1,isRtl:!0},style:{[`& .${uc.shortcuts}`]:{gridColumn:3}}}]}),Ule=re("div",{name:"MuiPickersLayout",slot:"ContentWrapper",overridesResolver:(e,t)=>t.contentWrapper})({gridColumn:2,gridRow:2,display:"flex",flexDirection:"column"}),Wle=v.forwardRef(function(t,n){const r=cn({props:t,name:"MuiPickersLayout"}),{toolbar:o,content:i,tabs:a,actionBar:s,shortcuts:l}=Vle(r),{sx:c,className:u,isLandscape:d,wrapperVariant:f}=r,p=Ogt(r);return R.jsxs(Hle,{ref:n,sx:c,className:de(p.root,u),ownerState:r,children:[d?l:o,d?o:l,R.jsx(Ule,{className:p.contentWrapper,children:f==="desktop"?R.jsxs(v.Fragment,{children:[i,a]}):R.jsxs(v.Fragment,{children:[a,i]})}),s]})}),Agt=["props","getOpenDialogAriaText"],kgt=["ownerState"],Mgt=["ownerState"],XV=e=>{var we;let{props:t,getOpenDialogAriaText:n}=e,r=zt(e,Agt);const{slots:o,slotProps:i,className:a,sx:s,format:l,formatDensity:c,enableAccessibleFieldDOMStructure:u,selectedSections:d,onSelectedSectionsChange:f,timezone:p,name:h,label:m,inputRef:y,readOnly:w,disabled:x,autoFocus:S,localeText:E,reduceAnimations:P}=t,T=v.useRef(null),I=v.useRef(null),A=r0(),k=((we=i==null?void 0:i.toolbar)==null?void 0:we.hidden)??!1,{open:O,actions:$,hasUIView:N,layoutProps:L,renderCurrentView:j,shouldRestoreFocus:D,fieldProps:_,contextValue:z,ownerState:F}=Ble(ue({},r,{props:t,fieldRef:I,autoFocusView:!0,additionalViewProps:{},wrapperVariant:"desktop"})),V=o.inputAdornment??Co,U=Yn({elementType:V,externalSlotProps:i==null?void 0:i.inputAdornment,additionalProps:{position:"end"},ownerState:t}),K=zt(U,kgt),X=o.openPickerButton??vn,ie=Yn({elementType:X,externalSlotProps:i==null?void 0:i.openPickerButton,additionalProps:{disabled:x||w,onClick:O?$.onClose:$.onOpen,"aria-label":n(_.value),edge:K.position},ownerState:t}),ee=zt(ie,Mgt),Q=o.openPickerIcon,te=Yn({elementType:Q,externalSlotProps:i==null?void 0:i.openPickerIcon,ownerState:F}),pe=o.field,ae=Yn({elementType:pe,externalSlotProps:i==null?void 0:i.field,additionalProps:ue({},_,k&&{id:A},{readOnly:w,disabled:x,className:a,sx:s,format:l,formatDensity:c,enableAccessibleFieldDOMStructure:u,selectedSections:d,onSelectedSectionsChange:f,timezone:p,label:m,name:h,autoFocus:S&&!t.open,focused:O?!0:void 0},y?{inputRef:y}:{}),ownerState:t});N&&(ae.InputProps=ue({},ae.InputProps,{ref:T},!t.disableOpenPicker&&{[`${K.position}Adornment`]:R.jsx(V,ue({},K,{children:R.jsx(X,ue({},ee,{children:R.jsx(Q,ue({},te))}))}))}));const se=ue({textField:o.textField,clearIcon:o.clearIcon,clearButton:o.clearButton},ae.slots),oe=o.layout??Wle;let fe=A;k&&(m?fe=`${A}-label`:fe=void 0);const Z=ue({},i,{toolbar:ue({},i==null?void 0:i.toolbar,{titleId:A}),popper:ue({"aria-labelledby":fe},i==null?void 0:i.popper)}),ce=ua(I,ae.unstableFieldRef);return{renderPicker:()=>R.jsxs(Cle,{contextValue:z,localeText:E,children:[R.jsx(pe,ue({},ae,{slots:se,slotProps:Z,unstableFieldRef:ce})),R.jsx(ugt,ue({role:"dialog",placement:"bottom-start",anchorEl:T.current},$,{open:O,slots:o,slotProps:Z,shouldRestoreFocus:D,reduceAnimations:P,children:R.jsx(oe,ue({},L,Z==null?void 0:Z.layout,{slots:o,slotProps:Z,children:j()}))}))]})}},Pl=({view:e,onViewChange:t,views:n,focusedView:r,onFocusedViewChange:o,value:i,defaultValue:a,referenceDate:s,onChange:l,className:c,classes:u,disableFuture:d,disablePast:f,minDate:p,maxDate:h,shouldDisableDate:m,shouldDisableMonth:y,shouldDisableYear:w,reduceAnimations:x,onMonthChange:S,monthsPerRow:E,onYearChange:P,yearsOrder:T,yearsPerRow:I,slots:A,slotProps:k,loading:O,renderLoading:$,disableHighlightToday:N,readOnly:L,disabled:j,showDaysOutsideCurrentMonth:D,dayOfWeekFormatter:_,sx:z,autoFocus:F,fixedWeekNumber:V,displayWeekNumber:U,timezone:K})=>R.jsx(Uht,{view:e,onViewChange:t,views:n.filter(lb),focusedView:r&&lb(r)?r:null,onFocusedViewChange:o,value:i,defaultValue:a,referenceDate:s,onChange:l,className:c,classes:u,disableFuture:d,disablePast:f,minDate:p,maxDate:h,shouldDisableDate:m,shouldDisableMonth:y,shouldDisableYear:w,reduceAnimations:x,onMonthChange:S,monthsPerRow:E,onYearChange:P,yearsOrder:T,yearsPerRow:I,slots:A,slotProps:k,loading:O,renderLoading:$,disableHighlightToday:N,readOnly:L,disabled:j,showDaysOutsideCurrentMonth:D,dayOfWeekFormatter:_,sx:z,autoFocus:F,fixedWeekNumber:V,displayWeekNumber:U,timezone:K}),Gle=v.forwardRef(function(t,n){var c,u;const r=$o(),o=Cn(),i=jle(t,"MuiDesktopDatePicker"),a=ue({day:Pl,month:Pl,year:Pl},i.viewRenderers),s=ue({},i,{viewRenderers:a,format:qS(o,i,!1),yearsPerRow:i.yearsPerRow??4,slots:ue({openPickerIcon:ile,field:Mle},i.slots),slotProps:ue({},i.slotProps,{field:d=>{var f;return ue({},pp((f=i.slotProps)==null?void 0:f.field,d),s0(i),{ref:n})},toolbar:ue({hidden:!0},(c=i.slotProps)==null?void 0:c.toolbar)})}),{renderPicker:l}=XV({props:s,valueManager:go,valueType:"date",getOpenDialogAriaText:o0({utils:o,formatKey:"fullDate",contextTranslation:r.openDatePickerDialogue,propsTranslation:(u=s.localeText)==null?void 0:u.openDatePickerDialogue}),validator:a0});return l()});Gle.propTypes={autoFocus:B.bool,className:B.string,closeOnSelect:B.bool,dayOfWeekFormatter:B.func,defaultValue:B.object,disabled:B.bool,disableFuture:B.bool,disableHighlightToday:B.bool,disableOpenPicker:B.bool,disablePast:B.bool,displayWeekNumber:B.bool,enableAccessibleFieldDOMStructure:B.any,fixedWeekNumber:B.number,format:B.string,formatDensity:B.oneOf(["dense","spacious"]),inputRef:n0,label:B.node,loading:B.bool,localeText:B.object,maxDate:B.object,minDate:B.object,monthsPerRow:B.oneOf([3,4]),name:B.string,onAccept:B.func,onChange:B.func,onClose:B.func,onError:B.func,onMonthChange:B.func,onOpen:B.func,onSelectedSectionsChange:B.func,onViewChange:B.func,onYearChange:B.func,open:B.bool,openTo:B.oneOf(["day","month","year"]),orientation:B.oneOf(["landscape","portrait"]),readOnly:B.bool,reduceAnimations:B.bool,referenceDate:B.object,renderLoading:B.func,selectedSections:B.oneOfType([B.oneOf(["all","day","empty","hours","meridiem","minutes","month","seconds","weekDay","year"]),B.number]),shouldDisableDate:B.func,shouldDisableMonth:B.func,shouldDisableYear:B.func,showDaysOutsideCurrentMonth:B.bool,slotProps:B.object,slots:B.object,sx:B.oneOfType([B.arrayOf(B.oneOfType([B.func,B.object,B.bool])),B.func,B.object]),timezone:B.string,value:B.object,view:B.oneOf(["day","month","year"]),viewRenderers:B.shape({day:B.func,month:B.func,year:B.func}),views:B.arrayOf(B.oneOf(["day","month","year"]).isRequired),yearsOrder:B.oneOf(["asc","desc"]),yearsPerRow:B.oneOf([3,4])};const Rgt=re(zC)({[`& .${hx.container}`]:{outline:0},[`& .${hx.paper}`]:{outline:0,minWidth:vM}}),$gt=re(Ov)({"&:first-of-type":{padding:0}});function Dgt(e){const{children:t,onDismiss:n,open:r,slots:o,slotProps:i}=e,a=(o==null?void 0:o.dialog)??Rgt,s=(o==null?void 0:o.mobileTransition)??Ob;return R.jsx(a,ue({open:r,onClose:n},i==null?void 0:i.dialog,{TransitionComponent:s,TransitionProps:i==null?void 0:i.mobileTransition,PaperComponent:o==null?void 0:o.mobilePaper,PaperProps:i==null?void 0:i.mobilePaper,children:R.jsx($gt,{children:t})}))}const _gt=["props","getOpenDialogAriaText"],JV=e=>{var K;let{props:t,getOpenDialogAriaText:n}=e,r=zt(e,_gt);const{slots:o,slotProps:i,className:a,sx:s,format:l,formatDensity:c,enableAccessibleFieldDOMStructure:u,selectedSections:d,onSelectedSectionsChange:f,timezone:p,name:h,label:m,inputRef:y,readOnly:w,disabled:x,localeText:S}=t,E=v.useRef(null),P=r0(),T=((K=i==null?void 0:i.toolbar)==null?void 0:K.hidden)??!1,{open:I,actions:A,layoutProps:k,renderCurrentView:O,fieldProps:$,contextValue:N}=Ble(ue({},r,{props:t,fieldRef:E,autoFocusView:!0,additionalViewProps:{},wrapperVariant:"mobile"})),L=o.field,j=Yn({elementType:L,externalSlotProps:i==null?void 0:i.field,additionalProps:ue({},$,T&&{id:P},!(x||w)&&{onClick:A.onOpen,onKeyDown:Gdt(A.onOpen)},{readOnly:w??!0,disabled:x,className:a,sx:s,format:l,formatDensity:c,enableAccessibleFieldDOMStructure:u,selectedSections:d,onSelectedSectionsChange:f,timezone:p,label:m,name:h},y?{inputRef:y}:{}),ownerState:t});j.inputProps=ue({},j.inputProps,{"aria-label":n($.value)});const D=ue({textField:o.textField},j.slots),_=o.layout??Wle;let z=P;T&&(m?z=`${P}-label`:z=void 0);const F=ue({},i,{toolbar:ue({},i==null?void 0:i.toolbar,{titleId:P}),mobilePaper:ue({"aria-labelledby":z},i==null?void 0:i.mobilePaper)}),V=ua(E,j.unstableFieldRef);return{renderPicker:()=>R.jsxs(Cle,{contextValue:N,localeText:S,children:[R.jsx(L,ue({},j,{slots:D,slotProps:F,unstableFieldRef:V})),R.jsx(Dgt,ue({},A,{open:I,slots:o,slotProps:F,children:R.jsx(_,ue({},k,F==null?void 0:F.layout,{slots:o,slotProps:F,children:O()}))}))]})}},qle=v.forwardRef(function(t,n){var c,u;const r=$o(),o=Cn(),i=jle(t,"MuiMobileDatePicker"),a=ue({day:Pl,month:Pl,year:Pl},i.viewRenderers),s=ue({},i,{viewRenderers:a,format:qS(o,i,!1),slots:ue({field:Mle},i.slots),slotProps:ue({},i.slotProps,{field:d=>{var f;return ue({},pp((f=i.slotProps)==null?void 0:f.field,d),s0(i),{ref:n})},toolbar:ue({hidden:!1},(c=i.slotProps)==null?void 0:c.toolbar)})}),{renderPicker:l}=JV({props:s,valueManager:go,valueType:"date",getOpenDialogAriaText:o0({utils:o,formatKey:"fullDate",contextTranslation:r.openDatePickerDialogue,propsTranslation:(u=s.localeText)==null?void 0:u.openDatePickerDialogue}),validator:a0});return l()});qle.propTypes={autoFocus:B.bool,className:B.string,closeOnSelect:B.bool,dayOfWeekFormatter:B.func,defaultValue:B.object,disabled:B.bool,disableFuture:B.bool,disableHighlightToday:B.bool,disableOpenPicker:B.bool,disablePast:B.bool,displayWeekNumber:B.bool,enableAccessibleFieldDOMStructure:B.any,fixedWeekNumber:B.number,format:B.string,formatDensity:B.oneOf(["dense","spacious"]),inputRef:n0,label:B.node,loading:B.bool,localeText:B.object,maxDate:B.object,minDate:B.object,monthsPerRow:B.oneOf([3,4]),name:B.string,onAccept:B.func,onChange:B.func,onClose:B.func,onError:B.func,onMonthChange:B.func,onOpen:B.func,onSelectedSectionsChange:B.func,onViewChange:B.func,onYearChange:B.func,open:B.bool,openTo:B.oneOf(["day","month","year"]),orientation:B.oneOf(["landscape","portrait"]),readOnly:B.bool,reduceAnimations:B.bool,referenceDate:B.object,renderLoading:B.func,selectedSections:B.oneOfType([B.oneOf(["all","day","empty","hours","meridiem","minutes","month","seconds","weekDay","year"]),B.number]),shouldDisableDate:B.func,shouldDisableMonth:B.func,shouldDisableYear:B.func,showDaysOutsideCurrentMonth:B.bool,slotProps:B.object,slots:B.object,sx:B.oneOfType([B.arrayOf(B.oneOfType([B.func,B.object,B.bool])),B.func,B.object]),timezone:B.string,value:B.object,view:B.oneOf(["day","month","year"]),viewRenderers:B.shape({day:B.func,month:B.func,year:B.func}),views:B.arrayOf(B.oneOf(["day","month","year"]).isRequired),yearsOrder:B.oneOf(["asc","desc"]),yearsPerRow:B.oneOf([3,4])};const Ngt=["desktopModeMediaQuery"],TO=v.forwardRef(function(t,n){const r=cn({props:t,name:"MuiDatePicker"}),{desktopModeMediaQuery:o=VV}=r,i=zt(r,Ngt);return op(o,{defaultMatches:!0})?R.jsx(Gle,ue({ref:n},i)):R.jsx(qle,ue({ref:n},i))});function Lgt(e){return Wn("MuiPickersToolbarText",e)}const mF=Xn("MuiPickersToolbarText",["root","selected"]),Fgt=["className","selected","value"],jgt=e=>{const{classes:t,selected:n}=e;return zn({root:["root",n&&"selected"]},Lgt,t)},Bgt=re(ot,{name:"MuiPickersToolbarText",slot:"Root",overridesResolver:(e,t)=>[t.root,{[`&.${mF.selected}`]:t.selected}]})(({theme:e})=>({transition:e.transitions.create("color"),color:(e.vars||e).palette.text.secondary,[`&.${mF.selected}`]:{color:(e.vars||e).palette.text.primary}})),ZV=v.forwardRef(function(t,n){const r=cn({props:t,name:"MuiPickersToolbarText"}),{className:o,value:i}=r,a=zt(r,Fgt),s=jgt(r);return R.jsx(Bgt,ue({ref:n,className:de(s.root,o),component:"span"},a,{children:i}))}),zgt=["align","className","selected","typographyClassName","value","variant","width"],Vgt=e=>{const{classes:t}=e;return zn({root:["root"]},Fle,t)},Hgt=re(dt,{name:"MuiPickersToolbarButton",slot:"Root",overridesResolver:(e,t)=>t.root})({padding:0,minWidth:16,textTransform:"none"}),os=v.forwardRef(function(t,n){const r=cn({props:t,name:"MuiPickersToolbarButton"}),{align:o,className:i,selected:a,typographyClassName:s,value:l,variant:c,width:u}=r,d=zt(r,zgt),f=Vgt(r);return R.jsx(Hgt,ue({variant:"text",ref:n,className:de(f.root,i)},u?{sx:{width:u}}:{},d,{children:R.jsx(ZV,{align:o,className:s,variant:c,value:l,selected:a})}))});function Ugt(e){return Wn("MuiTimePickerToolbar",e)}const Tx=Xn("MuiTimePickerToolbar",["root","separator","hourMinuteLabel","hourMinuteLabelLandscape","hourMinuteLabelReverse","ampmSelection","ampmLandscape","ampmLabel"]),Wgt=["ampm","ampmInClock","value","isLandscape","onChange","view","onViewChange","views","disabled","readOnly","className"],Ggt=e=>{const{isLandscape:t,classes:n,isRtl:r}=e;return zn({root:["root"],separator:["separator"],hourMinuteLabel:["hourMinuteLabel",t&&"hourMinuteLabelLandscape",r&&"hourMinuteLabelReverse"],ampmSelection:["ampmSelection",t&&"ampmLandscape"],ampmLabel:["ampmLabel"]},Ugt,n)},qgt=re(QV,{name:"MuiTimePickerToolbar",slot:"Root",overridesResolver:(e,t)=>t.root})({}),Kgt=re(ZV,{name:"MuiTimePickerToolbar",slot:"Separator",overridesResolver:(e,t)=>t.separator})({outline:0,margin:"0 4px 0 2px",cursor:"default"}),Ygt=re("div",{name:"MuiTimePickerToolbar",slot:"HourMinuteLabel",overridesResolver:(e,t)=>[{[`&.${Tx.hourMinuteLabelLandscape}`]:t.hourMinuteLabelLandscape,[`&.${Tx.hourMinuteLabelReverse}`]:t.hourMinuteLabelReverse},t.hourMinuteLabel]})({display:"flex",justifyContent:"flex-end",alignItems:"flex-end",variants:[{props:{isRtl:!0},style:{flexDirection:"row-reverse"}},{props:{isLandscape:!0},style:{marginTop:"auto"}}]}),Qgt=re("div",{name:"MuiTimePickerToolbar",slot:"AmPmSelection",overridesResolver:(e,t)=>[{[`.${Tx.ampmLabel}`]:t.ampmLabel},{[`&.${Tx.ampmLandscape}`]:t.ampmLandscape},t.ampmSelection]})({display:"flex",flexDirection:"column",marginRight:"auto",marginLeft:12,[`& .${Tx.ampmLabel}`]:{fontSize:17},variants:[{props:{isLandscape:!0},style:{margin:"4px 0 auto",flexDirection:"row",justifyContent:"space-around",flexBasis:"100%"}}]});function Xgt(e){const t=cn({props:e,name:"MuiTimePickerToolbar"}),{ampm:n,ampmInClock:r,value:o,isLandscape:i,onChange:a,view:s,onViewChange:l,views:c,disabled:u,readOnly:d,className:f}=t,p=zt(t,Wgt),h=Cn(),m=$o(),y=dr(),w=!!(n&&!r&&c.includes("hours")),{meridiemMode:x,handleMeridiemChange:S}=mM(o,n,a),E=A=>n?h.format(A,"hours12h"):h.format(A,"hours24h"),P=ue({},t,{isRtl:y}),T=Ggt(P),I=R.jsx(Kgt,{tabIndex:-1,value:":",variant:"h3",selected:!1,className:T.separator});return R.jsxs(qgt,ue({landscapeDirection:"row",toolbarTitle:m.timePickerToolbarTitle,isLandscape:i,ownerState:P,className:de(T.root,f)},p,{children:[R.jsxs(Ygt,{className:T.hourMinuteLabel,ownerState:P,children:[Jm(c,"hours")&&R.jsx(os,{tabIndex:-1,variant:"h3",onClick:()=>l("hours"),selected:s==="hours",value:o?E(o):"--"}),Jm(c,["hours","minutes"])&&I,Jm(c,"minutes")&&R.jsx(os,{tabIndex:-1,variant:"h3",onClick:()=>l("minutes"),selected:s==="minutes",value:o?h.format(o,"minutes"):"--"}),Jm(c,["minutes","seconds"])&&I,Jm(c,"seconds")&&R.jsx(os,{variant:"h3",onClick:()=>l("seconds"),selected:s==="seconds",value:o?h.format(o,"seconds"):"--"})]}),w&&R.jsxs(Qgt,{className:T.ampmSelection,ownerState:P,children:[R.jsx(os,{disableRipple:!0,variant:"subtitle2",selected:x==="am",typographyClassName:T.ampmLabel,value:mc(h,"am"),onClick:d?void 0:()=>S("am"),disabled:u}),R.jsx(os,{disableRipple:!0,variant:"subtitle2",selected:x==="pm",typographyClassName:T.ampmLabel,value:mc(h,"pm"),onClick:d?void 0:()=>S("pm"),disabled:u})]})]}))}function Kle(e,t){var a;const n=Cn(),r=cn({props:e,name:t}),o=r.ampm??n.is12HourCycleInCurrentLocale(),i=v.useMemo(()=>{var s;return((s=r.localeText)==null?void 0:s.toolbarTitle)==null?r.localeText:ue({},r.localeText,{timePickerToolbarTitle:r.localeText.toolbarTitle})},[r.localeText]);return ue({},r,{ampm:o,localeText:i},DV({views:r.views,openTo:r.openTo,defaultViews:["hours","minutes"],defaultOpenTo:"hours"}),{disableFuture:r.disableFuture??!1,disablePast:r.disablePast??!1,slots:ue({toolbar:Xgt},r.slots),slotProps:ue({},r.slotProps,{toolbar:ue({ampm:o,ampmInClock:r.ampmInClock},(a=r.slotProps)==null?void 0:a.toolbar)})})}const Ky=({view:e,onViewChange:t,focusedView:n,onFocusedViewChange:r,views:o,value:i,defaultValue:a,referenceDate:s,onChange:l,className:c,classes:u,disableFuture:d,disablePast:f,minTime:p,maxTime:h,shouldDisableTime:m,minutesStep:y,ampm:w,ampmInClock:x,slots:S,slotProps:E,readOnly:P,disabled:T,sx:I,autoFocus:A,showViewSwitcher:k,disableIgnoringDatePartForTimeValidation:O,timezone:$})=>R.jsx(Hdt,{view:e,onViewChange:t,focusedView:n&&ab(n)?n:null,onFocusedViewChange:r,views:o.filter(ab),value:i,defaultValue:a,referenceDate:s,onChange:l,className:c,classes:u,disableFuture:d,disablePast:f,minTime:p,maxTime:h,shouldDisableTime:m,minutesStep:y,ampm:w,ampmInClock:x,slots:S,slotProps:E,readOnly:P,disabled:T,sx:I,autoFocus:A,showViewSwitcher:k,disableIgnoringDatePartForTimeValidation:O,timezone:$}),Yle=({view:e,onViewChange:t,focusedView:n,onFocusedViewChange:r,views:o,value:i,defaultValue:a,referenceDate:s,onChange:l,className:c,classes:u,disableFuture:d,disablePast:f,minTime:p,maxTime:h,shouldDisableTime:m,minutesStep:y,ampm:w,slots:x,slotProps:S,readOnly:E,disabled:P,sx:T,autoFocus:I,disableIgnoringDatePartForTimeValidation:A,timeSteps:k,skipDisabled:O,timezone:$})=>R.jsx(Jdt,{view:e,onViewChange:t,focusedView:n,onFocusedViewChange:r,views:o.filter(ab),value:i,defaultValue:a,referenceDate:s,onChange:l,className:c,classes:u,disableFuture:d,disablePast:f,minTime:p,maxTime:h,shouldDisableTime:m,minutesStep:y,ampm:w,slots:x,slotProps:S,readOnly:E,disabled:P,sx:T,autoFocus:I,disableIgnoringDatePartForTimeValidation:A,timeStep:k==null?void 0:k.minutes,skipDisabled:O,timezone:$}),IO=({view:e,onViewChange:t,focusedView:n,onFocusedViewChange:r,views:o,value:i,defaultValue:a,referenceDate:s,onChange:l,className:c,classes:u,disableFuture:d,disablePast:f,minTime:p,maxTime:h,shouldDisableTime:m,minutesStep:y,ampm:w,slots:x,slotProps:S,readOnly:E,disabled:P,sx:T,autoFocus:I,disableIgnoringDatePartForTimeValidation:A,timeSteps:k,skipDisabled:O,timezone:$})=>R.jsx(dft,{view:e,onViewChange:t,focusedView:n,onFocusedViewChange:r,views:o.filter(ab),value:i,defaultValue:a,referenceDate:s,onChange:l,className:c,classes:u,disableFuture:d,disablePast:f,minTime:p,maxTime:h,shouldDisableTime:m,minutesStep:y,ampm:w,slots:x,slotProps:S,readOnly:E,disabled:P,sx:T,autoFocus:I,disableIgnoringDatePartForTimeValidation:A,timeSteps:k,skipDisabled:O,timezone:$}),Jgt=["views","format"],Qle=(e,t,n)=>{let{views:r,format:o}=t,i=zt(t,Jgt);if(o)return o;const a=[],s=[];if(r.forEach(u=>{ab(u)?s.push(u):lb(u)&&a.push(u)}),s.length===0)return qS(e,ue({views:a},i),!1);if(a.length===0)return CO(e,ue({views:s},i));const l=CO(e,ue({views:s},i));return`${qS(e,ue({views:a},i),!1)} ${l}`},Zgt=(e,t,n)=>n?t.filter(r=>!Ww(r)||r==="hours"):e?[...t,"meridiem"]:t,emt=(e,t)=>24*60/((e.hours??1)*(e.minutes??5))<=t;function Xle({thresholdToRenderTimeInASingleColumn:e,ampm:t,timeSteps:n,views:r}){const o=e??24,i=ue({hours:1,minutes:5,seconds:5},n),a=emt(i,o);return{thresholdToRenderTimeInASingleColumn:o,timeSteps:i,shouldRenderTimeInASingleColumn:a,views:Zgt(t,r,a)}}const Jle=v.forwardRef(function(t,n){var w,x,S,E;const r=$o(),o=Cn(),i=Kle(t,"MuiDesktopTimePicker"),{shouldRenderTimeInASingleColumn:a,views:s,timeSteps:l}=Xle(i),c=a?Yle:IO,u=ue({hours:c,minutes:c,seconds:c,meridiem:c},i.viewRenderers),d=i.ampmInClock??!0,f=a?[]:["accept"],h=((w=u.hours)==null?void 0:w.name)===IO.name?s:s.filter(P=>P!=="meridiem"),m=ue({},i,{ampmInClock:d,timeSteps:l,viewRenderers:u,format:CO(o,i),views:a?["hours"]:h,slots:ue({field:Rle,openPickerIcon:Aut},i.slots),slotProps:ue({},i.slotProps,{field:P=>{var T;return ue({},pp((T=i.slotProps)==null?void 0:T.field,P),s0(i),{ref:n})},toolbar:ue({hidden:!0,ampmInClock:d},(x=i.slotProps)==null?void 0:x.toolbar),actionBar:ue({actions:f},(S=i.slotProps)==null?void 0:S.actionBar)})}),{renderPicker:y}=XV({props:m,valueManager:go,valueType:"time",getOpenDialogAriaText:o0({utils:o,formatKey:"fullTime",contextTranslation:r.openTimePickerDialogue,propsTranslation:(E=m.localeText)==null?void 0:E.openTimePickerDialogue}),validator:p1});return y()});Jle.propTypes={ampm:B.bool,ampmInClock:B.bool,autoFocus:B.bool,className:B.string,closeOnSelect:B.bool,defaultValue:B.object,disabled:B.bool,disableFuture:B.bool,disableIgnoringDatePartForTimeValidation:B.bool,disableOpenPicker:B.bool,disablePast:B.bool,enableAccessibleFieldDOMStructure:B.any,format:B.string,formatDensity:B.oneOf(["dense","spacious"]),inputRef:n0,label:B.node,localeText:B.object,maxTime:B.object,minTime:B.object,minutesStep:B.number,name:B.string,onAccept:B.func,onChange:B.func,onClose:B.func,onError:B.func,onOpen:B.func,onSelectedSectionsChange:B.func,onViewChange:B.func,open:B.bool,openTo:B.oneOf(["hours","meridiem","minutes","seconds"]),orientation:B.oneOf(["landscape","portrait"]),readOnly:B.bool,reduceAnimations:B.bool,referenceDate:B.object,selectedSections:B.oneOfType([B.oneOf(["all","day","empty","hours","meridiem","minutes","month","seconds","weekDay","year"]),B.number]),shouldDisableTime:B.func,skipDisabled:B.bool,slotProps:B.object,slots:B.object,sx:B.oneOfType([B.arrayOf(B.oneOfType([B.func,B.object,B.bool])),B.func,B.object]),thresholdToRenderTimeInASingleColumn:B.number,timeSteps:B.shape({hours:B.number,minutes:B.number,seconds:B.number}),timezone:B.string,value:B.object,view:B.oneOf(["hours","meridiem","minutes","seconds"]),viewRenderers:B.shape({hours:B.func,meridiem:B.func,minutes:B.func,seconds:B.func}),views:B.arrayOf(B.oneOf(["hours","minutes","seconds"]).isRequired)};const Zle=v.forwardRef(function(t,n){var u,d;const r=$o(),o=Cn(),i=Kle(t,"MuiMobileTimePicker"),a=ue({hours:Ky,minutes:Ky,seconds:Ky},i.viewRenderers),s=i.ampmInClock??!1,l=ue({},i,{ampmInClock:s,viewRenderers:a,format:CO(o,i),slots:ue({field:Rle},i.slots),slotProps:ue({},i.slotProps,{field:f=>{var p;return ue({},pp((p=i.slotProps)==null?void 0:p.field,f),s0(i),{ref:n})},toolbar:ue({hidden:!1,ampmInClock:s},(u=i.slotProps)==null?void 0:u.toolbar)})}),{renderPicker:c}=JV({props:l,valueManager:go,valueType:"time",getOpenDialogAriaText:o0({utils:o,formatKey:"fullTime",contextTranslation:r.openTimePickerDialogue,propsTranslation:(d=l.localeText)==null?void 0:d.openTimePickerDialogue}),validator:p1});return c()});Zle.propTypes={ampm:B.bool,ampmInClock:B.bool,autoFocus:B.bool,className:B.string,closeOnSelect:B.bool,defaultValue:B.object,disabled:B.bool,disableFuture:B.bool,disableIgnoringDatePartForTimeValidation:B.bool,disableOpenPicker:B.bool,disablePast:B.bool,enableAccessibleFieldDOMStructure:B.any,format:B.string,formatDensity:B.oneOf(["dense","spacious"]),inputRef:n0,label:B.node,localeText:B.object,maxTime:B.object,minTime:B.object,minutesStep:B.number,name:B.string,onAccept:B.func,onChange:B.func,onClose:B.func,onError:B.func,onOpen:B.func,onSelectedSectionsChange:B.func,onViewChange:B.func,open:B.bool,openTo:B.oneOf(["hours","minutes","seconds"]),orientation:B.oneOf(["landscape","portrait"]),readOnly:B.bool,reduceAnimations:B.bool,referenceDate:B.object,selectedSections:B.oneOfType([B.oneOf(["all","day","empty","hours","meridiem","minutes","month","seconds","weekDay","year"]),B.number]),shouldDisableTime:B.func,slotProps:B.object,slots:B.object,sx:B.oneOfType([B.arrayOf(B.oneOfType([B.func,B.object,B.bool])),B.func,B.object]),timezone:B.string,value:B.object,view:B.oneOf(["hours","minutes","seconds"]),viewRenderers:B.shape({hours:B.func,minutes:B.func,seconds:B.func}),views:B.arrayOf(B.oneOf(["hours","minutes","seconds"]).isRequired)};const tmt=["desktopModeMediaQuery"],nmt=v.forwardRef(function(t,n){const r=cn({props:t,name:"MuiTimePicker"}),{desktopModeMediaQuery:o=VV}=r,i=zt(r,tmt);return op(o,{defaultMatches:!0})?R.jsx(Jle,ue({ref:n},i)):R.jsx(Zle,ue({ref:n},i))});function rmt(e){return Wn("MuiDateTimePickerTabs",e)}Xn("MuiDateTimePickerTabs",["root"]);const omt=e=>lb(e)?"date":"time",imt=e=>e==="date"?"day":"hours",amt=e=>{const{classes:t}=e;return zn({root:["root"]},rmt,t)},smt=re(HNe,{name:"MuiDateTimePickerTabs",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({boxShadow:`0 -1px 0 0 inset ${(e.vars||e).palette.divider}`,"&:last-child":{boxShadow:`0 1px 0 0 inset ${(e.vars||e).palette.divider}`,[`& .${lT.indicator}`]:{bottom:"auto",top:0}}})),lmt=function(t){const n=cn({props:t,name:"MuiDateTimePickerTabs"}),{dateIcon:r=R.jsx(kut,{}),onViewChange:o,timeIcon:i=R.jsx(Mut,{}),view:a,hidden:s=typeof window>"u"||window.innerHeight<667,className:l,sx:c}=n,u=$o(),d=amt(n),f=(p,h)=>{o(imt(h))};return s?null:R.jsxs(smt,{ownerState:n,variant:"fullWidth",value:omt(a),onChange:f,className:de(l,d.root),sx:c,children:[R.jsx(tG,{value:"date","aria-label":u.dateTableLabel,icon:R.jsx(v.Fragment,{children:r})}),R.jsx(tG,{value:"time","aria-label":u.timeTableLabel,icon:R.jsx(v.Fragment,{children:i})})]})};function cmt(e){return Wn("MuiDateTimePickerToolbar",e)}const YD=Xn("MuiDateTimePickerToolbar",["root","dateContainer","timeContainer","timeDigitsContainer","separator","timeLabelReverse","ampmSelection","ampmLandscape","ampmLabel"]),umt=["ampm","ampmInClock","value","onChange","view","isLandscape","onViewChange","toolbarFormat","toolbarPlaceholder","views","disabled","readOnly","toolbarVariant","toolbarTitle","className"],dmt=e=>{const{classes:t,isLandscape:n,isRtl:r}=e;return zn({root:["root"],dateContainer:["dateContainer"],timeContainer:["timeContainer",r&&"timeLabelReverse"],timeDigitsContainer:["timeDigitsContainer",r&&"timeLabelReverse"],separator:["separator"],ampmSelection:["ampmSelection",n&&"ampmLandscape"],ampmLabel:["ampmLabel"]},cmt,t)},fmt=re(QV,{name:"MuiDateTimePickerToolbar",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({paddingLeft:16,paddingRight:16,justifyContent:"space-around",position:"relative",variants:[{props:{toolbarVariant:"desktop"},style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,[`& .${Wht.content} .${mF.selected}`]:{color:(e.vars||e).palette.primary.main,fontWeight:e.typography.fontWeightBold}}},{props:{toolbarVariant:"desktop",isLandscape:!0},style:{borderRight:`1px solid ${(e.vars||e).palette.divider}`}},{props:{toolbarVariant:"desktop",isLandscape:!1},style:{paddingLeft:24,paddingRight:0}}]})),pmt=re("div",{name:"MuiDateTimePickerToolbar",slot:"DateContainer",overridesResolver:(e,t)=>t.dateContainer})({display:"flex",flexDirection:"column",alignItems:"flex-start"}),hmt=re("div",{name:"MuiDateTimePickerToolbar",slot:"TimeContainer",overridesResolver:(e,t)=>t.timeContainer})({display:"flex",flexDirection:"row",variants:[{props:{isRtl:!0},style:{flexDirection:"row-reverse"}},{props:{toolbarVariant:"desktop",isLandscape:!1},style:{gap:9,marginRight:4,alignSelf:"flex-end"}},{props:({isLandscape:e,toolbarVariant:t})=>e&&t!=="desktop",style:{flexDirection:"column"}},{props:({isLandscape:e,toolbarVariant:t,isRtl:n})=>e&&t!=="desktop"&&n,style:{flexDirection:"column-reverse"}}]}),gmt=re("div",{name:"MuiDateTimePickerToolbar",slot:"TimeDigitsContainer",overridesResolver:(e,t)=>t.timeDigitsContainer})({display:"flex",variants:[{props:{isRtl:!0},style:{flexDirection:"row-reverse"}},{props:{toolbarVariant:"desktop"},style:{gap:1.5}}]}),nK=re(ZV,{name:"MuiDateTimePickerToolbar",slot:"Separator",overridesResolver:(e,t)=>t.separator})({margin:"0 4px 0 2px",cursor:"default",variants:[{props:{toolbarVariant:"desktop"},style:{margin:0}}]}),mmt=re("div",{name:"MuiDateTimePickerToolbar",slot:"AmPmSelection",overridesResolver:(e,t)=>[{[`.${YD.ampmLabel}`]:t.ampmLabel},{[`&.${YD.ampmLandscape}`]:t.ampmLandscape},t.ampmSelection]})({display:"flex",flexDirection:"column",marginRight:"auto",marginLeft:12,[`& .${YD.ampmLabel}`]:{fontSize:17},variants:[{props:{isLandscape:!0},style:{margin:"4px 0 auto",flexDirection:"row",justifyContent:"space-around",width:"100%"}}]});function ymt(e){const t=cn({props:e,name:"MuiDateTimePickerToolbar"}),{ampm:n,ampmInClock:r,value:o,onChange:i,view:a,isLandscape:s,onViewChange:l,toolbarFormat:c,toolbarPlaceholder:u="––",views:d,disabled:f,readOnly:p,toolbarVariant:h="mobile",toolbarTitle:m,className:y}=t,w=zt(t,umt),x=dr(),S=ue({},t,{isRtl:x}),E=Cn(),{meridiemMode:P,handleMeridiemChange:T}=mM(o,n,i),I=!!(n&&!r),A=h==="desktop",k=$o(),O=dmt(S),$=m??k.dateTimePickerToolbarTitle,N=j=>n?E.format(j,"hours12h"):E.format(j,"hours24h"),L=v.useMemo(()=>o?c?E.formatByString(o,c):E.format(o,"shortDate"):u,[o,c,u,E]);return R.jsxs(fmt,ue({isLandscape:s,className:de(O.root,y),toolbarTitle:$},w,{ownerState:S,children:[R.jsxs(pmt,{className:O.dateContainer,ownerState:S,children:[d.includes("year")&&R.jsx(os,{tabIndex:-1,variant:"subtitle1",onClick:()=>l("year"),selected:a==="year",value:o?E.format(o,"year"):"–"}),d.includes("day")&&R.jsx(os,{tabIndex:-1,variant:A?"h5":"h4",onClick:()=>l("day"),selected:a==="day",value:L})]}),R.jsxs(hmt,{className:O.timeContainer,ownerState:S,children:[R.jsxs(gmt,{className:O.timeDigitsContainer,ownerState:S,children:[d.includes("hours")&&R.jsxs(v.Fragment,{children:[R.jsx(os,{variant:A?"h5":"h3",width:A&&!s?Gw:void 0,onClick:()=>l("hours"),selected:a==="hours",value:o?N(o):"--"}),R.jsx(nK,{variant:A?"h5":"h3",value:":",className:O.separator,ownerState:S}),R.jsx(os,{variant:A?"h5":"h3",width:A&&!s?Gw:void 0,onClick:()=>l("minutes"),selected:a==="minutes"||!d.includes("minutes")&&a==="hours",value:o?E.format(o,"minutes"):"--",disabled:!d.includes("minutes")})]}),d.includes("seconds")&&R.jsxs(v.Fragment,{children:[R.jsx(nK,{variant:A?"h5":"h3",value:":",className:O.separator,ownerState:S}),R.jsx(os,{variant:A?"h5":"h3",width:A&&!s?Gw:void 0,onClick:()=>l("seconds"),selected:a==="seconds",value:o?E.format(o,"seconds"):"--"})]})]}),I&&!A&&R.jsxs(mmt,{className:O.ampmSelection,ownerState:S,children:[R.jsx(os,{variant:"subtitle2",selected:P==="am",typographyClassName:O.ampmLabel,value:mc(E,"am"),onClick:p?void 0:()=>T("am"),disabled:f}),R.jsx(os,{variant:"subtitle2",selected:P==="pm",typographyClassName:O.ampmLabel,value:mc(E,"pm"),onClick:p?void 0:()=>T("pm"),disabled:f})]}),n&&A&&R.jsx(os,{variant:"h5",onClick:()=>l("meridiem"),selected:a==="meridiem",value:o&&P?mc(E,P):"--",width:Gw})]})]}))}function ece(e,t){var s;const n=Cn(),r=Hg(),o=cn({props:e,name:t}),i=o.ampm??n.is12HourCycleInCurrentLocale(),a=v.useMemo(()=>{var l;return((l=o.localeText)==null?void 0:l.toolbarTitle)==null?o.localeText:ue({},o.localeText,{dateTimePickerToolbarTitle:o.localeText.toolbarTitle})},[o.localeText]);return ue({},o,DV({views:o.views,openTo:o.openTo,defaultViews:["year","day","hours","minutes"],defaultOpenTo:"day"}),{ampm:i,localeText:a,orientation:o.orientation??"portrait",disableIgnoringDatePartForTimeValidation:o.disableIgnoringDatePartForTimeValidation??!!(o.minDateTime||o.maxDateTime||o.disablePast||o.disableFuture),disableFuture:o.disableFuture??!1,disablePast:o.disablePast??!1,minDate:Li(n,o.minDateTime??o.minDate,r.minDate),maxDate:Li(n,o.maxDateTime??o.maxDate,r.maxDate),minTime:o.minDateTime??o.minTime,maxTime:o.maxDateTime??o.maxTime,slots:ue({toolbar:ymt,tabs:lmt},o.slots),slotProps:ue({},o.slotProps,{toolbar:ue({ampm:i},(s=o.slotProps)==null?void 0:s.toolbar)})})}const vmt=v.forwardRef(function(t,n){var m;const r=dr(),{toolbar:o,tabs:i,content:a,actionBar:s,shortcuts:l}=Vle(t),{sx:c,className:u,isLandscape:d,classes:f}=t,p=s&&(((m=s.props.actions)==null?void 0:m.length)??0)>0,h=ue({},t,{isRtl:r});return R.jsxs(Hle,{ref:n,className:de(uc.root,f==null?void 0:f.root,u),sx:[{[`& .${uc.tabs}`]:{gridRow:4,gridColumn:"1 / 4"},[`& .${uc.actionBar}`]:{gridRow:5}},...Array.isArray(c)?c:[c]],ownerState:h,children:[d?l:o,d?o:l,R.jsxs(Ule,{className:de(uc.contentWrapper,f==null?void 0:f.contentWrapper),sx:{display:"grid"},children:[a,i,p&&R.jsx(Is,{sx:{gridRow:3,gridColumn:"1 / 4"}})]}),s]})}),bmt=["openTo","focusedView","timeViewsCount"],wmt=function(t,n,r){var u,d;const{openTo:o,focusedView:i,timeViewsCount:a}=r,s=zt(r,bmt),l=ue({},s,{focusedView:null,sx:[{[`&.${Y7.root}`]:{borderBottom:0},[`&.${Y7.root}, .${tft.root}, &.${Wdt.root}`]:{maxHeight:bM}}]}),c=Ww(n);return R.jsxs(v.Fragment,{children:[(u=t[c?"day":n])==null?void 0:u.call(t,ue({},r,{view:c?"day":n,focusedView:i&&lb(i)?i:null,views:r.views.filter(lb),sx:[{gridColumn:1},...l.sx]})),a>0&&R.jsxs(v.Fragment,{children:[R.jsx(Is,{orientation:"vertical",sx:{gridColumn:2}}),(d=t[c?n:"hours"])==null?void 0:d.call(t,ue({},l,{view:c?n:"hours",focusedView:i&&Ww(i)?i:null,openTo:Ww(o)?o:"hours",views:r.views.filter(Ww),sx:[{gridColumn:3},...l.sx]}))]})]})},tce=v.forwardRef(function(t,n){var x,S,E,P;const r=$o(),o=Cn(),i=ece(t,"MuiDesktopDateTimePicker"),{shouldRenderTimeInASingleColumn:a,thresholdToRenderTimeInASingleColumn:s,views:l,timeSteps:c}=Xle(i),u=a?Yle:IO,d=ue({day:Pl,month:Pl,year:Pl,hours:u,minutes:u,seconds:u,meridiem:u},i.viewRenderers),f=i.ampmInClock??!0,h=((x=d.hours)==null?void 0:x.name)===IO.name?l:l.filter(T=>T!=="meridiem"),m=a?[]:["accept"],y=ue({},i,{viewRenderers:d,format:Qle(o,i),views:h,yearsPerRow:i.yearsPerRow??4,ampmInClock:f,timeSteps:c,thresholdToRenderTimeInASingleColumn:s,shouldRenderTimeInASingleColumn:a,slots:ue({field:$le,layout:vmt,openPickerIcon:ile},i.slots),slotProps:ue({},i.slotProps,{field:T=>{var I;return ue({},pp((I=i.slotProps)==null?void 0:I.field,T),s0(i),{ref:n})},toolbar:ue({hidden:!0,ampmInClock:f,toolbarVariant:"desktop"},(S=i.slotProps)==null?void 0:S.toolbar),tabs:ue({hidden:!0},(E=i.slotProps)==null?void 0:E.tabs),actionBar:T=>{var I;return ue({actions:m},pp((I=i.slotProps)==null?void 0:I.actionBar,T))}})}),{renderPicker:w}=XV({props:y,valueManager:go,valueType:"date-time",getOpenDialogAriaText:o0({utils:o,formatKey:"fullDate",contextTranslation:r.openDatePickerDialogue,propsTranslation:(P=y.localeText)==null?void 0:P.openDatePickerDialogue}),validator:SM,rendererInterceptor:wmt});return w()});tce.propTypes={ampm:B.bool,ampmInClock:B.bool,autoFocus:B.bool,className:B.string,closeOnSelect:B.bool,dayOfWeekFormatter:B.func,defaultValue:B.object,disabled:B.bool,disableFuture:B.bool,disableHighlightToday:B.bool,disableIgnoringDatePartForTimeValidation:B.bool,disableOpenPicker:B.bool,disablePast:B.bool,displayWeekNumber:B.bool,enableAccessibleFieldDOMStructure:B.any,fixedWeekNumber:B.number,format:B.string,formatDensity:B.oneOf(["dense","spacious"]),inputRef:n0,label:B.node,loading:B.bool,localeText:B.object,maxDate:B.object,maxDateTime:B.object,maxTime:B.object,minDate:B.object,minDateTime:B.object,minTime:B.object,minutesStep:B.number,monthsPerRow:B.oneOf([3,4]),name:B.string,onAccept:B.func,onChange:B.func,onClose:B.func,onError:B.func,onMonthChange:B.func,onOpen:B.func,onSelectedSectionsChange:B.func,onViewChange:B.func,onYearChange:B.func,open:B.bool,openTo:B.oneOf(["day","hours","meridiem","minutes","month","seconds","year"]),orientation:B.oneOf(["landscape","portrait"]),readOnly:B.bool,reduceAnimations:B.bool,referenceDate:B.object,renderLoading:B.func,selectedSections:B.oneOfType([B.oneOf(["all","day","empty","hours","meridiem","minutes","month","seconds","weekDay","year"]),B.number]),shouldDisableDate:B.func,shouldDisableMonth:B.func,shouldDisableTime:B.func,shouldDisableYear:B.func,showDaysOutsideCurrentMonth:B.bool,skipDisabled:B.bool,slotProps:B.object,slots:B.object,sx:B.oneOfType([B.arrayOf(B.oneOfType([B.func,B.object,B.bool])),B.func,B.object]),thresholdToRenderTimeInASingleColumn:B.number,timeSteps:B.shape({hours:B.number,minutes:B.number,seconds:B.number}),timezone:B.string,value:B.object,view:B.oneOf(["day","hours","meridiem","minutes","month","seconds","year"]),viewRenderers:B.shape({day:B.func,hours:B.func,meridiem:B.func,minutes:B.func,month:B.func,seconds:B.func,year:B.func}),views:B.arrayOf(B.oneOf(["day","hours","minutes","month","seconds","year"]).isRequired),yearsOrder:B.oneOf(["asc","desc"]),yearsPerRow:B.oneOf([3,4])};const nce=v.forwardRef(function(t,n){var u,d,f;const r=$o(),o=Cn(),i=ece(t,"MuiMobileDateTimePicker"),a=ue({day:Pl,month:Pl,year:Pl,hours:Ky,minutes:Ky,seconds:Ky},i.viewRenderers),s=i.ampmInClock??!1,l=ue({},i,{viewRenderers:a,format:Qle(o,i),ampmInClock:s,slots:ue({field:$le},i.slots),slotProps:ue({},i.slotProps,{field:p=>{var h;return ue({},pp((h=i.slotProps)==null?void 0:h.field,p),s0(i),{ref:n})},toolbar:ue({hidden:!1,ampmInClock:s},(u=i.slotProps)==null?void 0:u.toolbar),tabs:ue({hidden:!1},(d=i.slotProps)==null?void 0:d.tabs)})}),{renderPicker:c}=JV({props:l,valueManager:go,valueType:"date-time",getOpenDialogAriaText:o0({utils:o,formatKey:"fullDate",contextTranslation:r.openDatePickerDialogue,propsTranslation:(f=l.localeText)==null?void 0:f.openDatePickerDialogue}),validator:SM});return c()});nce.propTypes={ampm:B.bool,ampmInClock:B.bool,autoFocus:B.bool,className:B.string,closeOnSelect:B.bool,dayOfWeekFormatter:B.func,defaultValue:B.object,disabled:B.bool,disableFuture:B.bool,disableHighlightToday:B.bool,disableIgnoringDatePartForTimeValidation:B.bool,disableOpenPicker:B.bool,disablePast:B.bool,displayWeekNumber:B.bool,enableAccessibleFieldDOMStructure:B.any,fixedWeekNumber:B.number,format:B.string,formatDensity:B.oneOf(["dense","spacious"]),inputRef:n0,label:B.node,loading:B.bool,localeText:B.object,maxDate:B.object,maxDateTime:B.object,maxTime:B.object,minDate:B.object,minDateTime:B.object,minTime:B.object,minutesStep:B.number,monthsPerRow:B.oneOf([3,4]),name:B.string,onAccept:B.func,onChange:B.func,onClose:B.func,onError:B.func,onMonthChange:B.func,onOpen:B.func,onSelectedSectionsChange:B.func,onViewChange:B.func,onYearChange:B.func,open:B.bool,openTo:B.oneOf(["day","hours","minutes","month","seconds","year"]),orientation:B.oneOf(["landscape","portrait"]),readOnly:B.bool,reduceAnimations:B.bool,referenceDate:B.object,renderLoading:B.func,selectedSections:B.oneOfType([B.oneOf(["all","day","empty","hours","meridiem","minutes","month","seconds","weekDay","year"]),B.number]),shouldDisableDate:B.func,shouldDisableMonth:B.func,shouldDisableTime:B.func,shouldDisableYear:B.func,showDaysOutsideCurrentMonth:B.bool,slotProps:B.object,slots:B.object,sx:B.oneOfType([B.arrayOf(B.oneOfType([B.func,B.object,B.bool])),B.func,B.object]),timezone:B.string,value:B.object,view:B.oneOf(["day","hours","minutes","month","seconds","year"]),viewRenderers:B.shape({day:B.func,hours:B.func,minutes:B.func,month:B.func,seconds:B.func,year:B.func}),views:B.arrayOf(B.oneOf(["day","hours","minutes","month","seconds","year"]).isRequired),yearsOrder:B.oneOf(["asc","desc"]),yearsPerRow:B.oneOf([3,4])};const xmt=["desktopModeMediaQuery"],Smt=v.forwardRef(function(t,n){const r=cn({props:t,name:"MuiDateTimePicker"}),{desktopModeMediaQuery:o=VV}=r,i=zt(r,xmt);return op(o,{defaultMatches:!0})?R.jsx(tce,ue({ref:n},i)):R.jsx(nce,ue({ref:n},i))});class Wg extends Error{}class Cmt extends Wg{constructor(t){super(`Invalid DateTime: ${t.toMessage()}`)}}class Emt extends Wg{constructor(t){super(`Invalid Interval: ${t.toMessage()}`)}}class Pmt extends Wg{constructor(t){super(`Invalid Duration: ${t.toMessage()}`)}}class Py extends Wg{}class rce extends Wg{constructor(t){super(`Invalid unit ${t}`)}}class ki extends Wg{}class nf extends Wg{constructor(){super("Zone is an abstract class")}}const bt="numeric",Dc="short",ws="long",OO={year:bt,month:bt,day:bt},oce={year:bt,month:Dc,day:bt},Tmt={year:bt,month:Dc,day:bt,weekday:Dc},ice={year:bt,month:ws,day:bt},ace={year:bt,month:ws,day:bt,weekday:ws},sce={hour:bt,minute:bt},lce={hour:bt,minute:bt,second:bt},cce={hour:bt,minute:bt,second:bt,timeZoneName:Dc},uce={hour:bt,minute:bt,second:bt,timeZoneName:ws},dce={hour:bt,minute:bt,hourCycle:"h23"},fce={hour:bt,minute:bt,second:bt,hourCycle:"h23"},pce={hour:bt,minute:bt,second:bt,hourCycle:"h23",timeZoneName:Dc},hce={hour:bt,minute:bt,second:bt,hourCycle:"h23",timeZoneName:ws},gce={year:bt,month:bt,day:bt,hour:bt,minute:bt},mce={year:bt,month:bt,day:bt,hour:bt,minute:bt,second:bt},yce={year:bt,month:Dc,day:bt,hour:bt,minute:bt},vce={year:bt,month:Dc,day:bt,hour:bt,minute:bt,second:bt},Imt={year:bt,month:Dc,day:bt,weekday:Dc,hour:bt,minute:bt},bce={year:bt,month:ws,day:bt,hour:bt,minute:bt,timeZoneName:Dc},wce={year:bt,month:ws,day:bt,hour:bt,minute:bt,second:bt,timeZoneName:Dc},xce={year:bt,month:ws,day:bt,weekday:ws,hour:bt,minute:bt,timeZoneName:ws},Sce={year:bt,month:ws,day:bt,weekday:ws,hour:bt,minute:bt,second:bt,timeZoneName:ws};class h1{get type(){throw new nf}get name(){throw new nf}get ianaName(){return this.name}get isUniversal(){throw new nf}offsetName(t,n){throw new nf}formatOffset(t,n){throw new nf}offset(t){throw new nf}equals(t){throw new nf}get isValid(){throw new nf}}let QD=null;class EM extends h1{static get instance(){return QD===null&&(QD=new EM),QD}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(t,{format:n,locale:r}){return Mce(t,n,r)}formatOffset(t,n){return Ix(this.offset(t),n)}offset(t){return-new Date(t).getTimezoneOffset()}equals(t){return t.type==="system"}get isValid(){return!0}}let hT={};function Omt(e){return hT[e]||(hT[e]=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"})),hT[e]}const Amt={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function kmt(e,t){const n=e.format(t).replace(/\u200E/g,""),r=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(n),[,o,i,a,s,l,c,u]=r;return[a,o,i,s,l,c,u]}function Mmt(e,t){const n=e.formatToParts(t),r=[];for(let o=0;o=0?h:1e3+h,(f-p)/(60*1e3)}equals(t){return t.type==="iana"&&t.name===this.name}get isValid(){return this.valid}}let rK={};function Rmt(e,t={}){const n=JSON.stringify([e,t]);let r=rK[n];return r||(r=new Intl.ListFormat(e,t),rK[n]=r),r}let yF={};function vF(e,t={}){const n=JSON.stringify([e,t]);let r=yF[n];return r||(r=new Intl.DateTimeFormat(e,t),yF[n]=r),r}let bF={};function $mt(e,t={}){const n=JSON.stringify([e,t]);let r=bF[n];return r||(r=new Intl.NumberFormat(e,t),bF[n]=r),r}let wF={};function Dmt(e,t={}){const{base:n,...r}=t,o=JSON.stringify([e,r]);let i=wF[o];return i||(i=new Intl.RelativeTimeFormat(e,t),wF[o]=i),i}let qw=null;function _mt(){return qw||(qw=new Intl.DateTimeFormat().resolvedOptions().locale,qw)}let oK={};function Nmt(e){let t=oK[e];if(!t){const n=new Intl.Locale(e);t="getWeekInfo"in n?n.getWeekInfo():n.weekInfo,oK[e]=t}return t}function Lmt(e){const t=e.indexOf("-x-");t!==-1&&(e=e.substring(0,t));const n=e.indexOf("-u-");if(n===-1)return[e];{let r,o;try{r=vF(e).resolvedOptions(),o=e}catch{const l=e.substring(0,n);r=vF(l).resolvedOptions(),o=l}const{numberingSystem:i,calendar:a}=r;return[o,i,a]}}function Fmt(e,t,n){return(n||t)&&(e.includes("-u-")||(e+="-u"),n&&(e+=`-ca-${n}`),t&&(e+=`-nu-${t}`)),e}function jmt(e){const t=[];for(let n=1;n<=12;n++){const r=vt.utc(2009,n,1);t.push(e(r))}return t}function Bmt(e){const t=[];for(let n=1;n<=7;n++){const r=vt.utc(2016,11,13+n);t.push(e(r))}return t}function SP(e,t,n,r){const o=e.listingMode();return o==="error"?null:o==="en"?n(t):r(t)}function zmt(e){return e.numberingSystem&&e.numberingSystem!=="latn"?!1:e.numberingSystem==="latn"||!e.locale||e.locale.startsWith("en")||new Intl.DateTimeFormat(e.intl).resolvedOptions().numberingSystem==="latn"}class Vmt{constructor(t,n,r){this.padTo=r.padTo||0,this.floor=r.floor||!1;const{padTo:o,floor:i,...a}=r;if(!n||Object.keys(a).length>0){const s={useGrouping:!1,...r};r.padTo>0&&(s.minimumIntegerDigits=r.padTo),this.inf=$mt(t,s)}}format(t){if(this.inf){const n=this.floor?Math.floor(t):t;return this.inf.format(n)}else{const n=this.floor?Math.floor(t):o5(t,3);return Eo(n,this.padTo)}}}class Hmt{constructor(t,n,r){this.opts=r,this.originalZone=void 0;let o;if(this.opts.timeZone)this.dt=t;else if(t.zone.type==="fixed"){const a=-1*(t.offset/60),s=a>=0?`Etc/GMT+${a}`:`Etc/GMT${a}`;t.offset!==0&&kd.create(s).valid?(o=s,this.dt=t):(o="UTC",this.dt=t.offset===0?t:t.setZone("UTC").plus({minutes:t.offset}),this.originalZone=t.zone)}else t.zone.type==="system"?this.dt=t:t.zone.type==="iana"?(this.dt=t,o=t.zone.name):(o="UTC",this.dt=t.setZone("UTC").plus({minutes:t.offset}),this.originalZone=t.zone);const i={...this.opts};i.timeZone=i.timeZone||o,this.dtf=vF(n,i)}format(){return this.originalZone?this.formatToParts().map(({value:t})=>t).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){const t=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?t.map(n=>{if(n.type==="timeZoneName"){const r=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...n,value:r}}else return n}):t}resolvedOptions(){return this.dtf.resolvedOptions()}}class Umt{constructor(t,n,r){this.opts={style:"long",...r},!n&&Ace()&&(this.rtf=Dmt(t,r))}format(t,n){return this.rtf?this.rtf.format(t,n):pyt(n,t,this.opts.numeric,this.opts.style!=="long")}formatToParts(t,n){return this.rtf?this.rtf.formatToParts(t,n):[]}}const Wmt={firstDay:1,minimalDays:4,weekend:[6,7]};class lr{static fromOpts(t){return lr.create(t.locale,t.numberingSystem,t.outputCalendar,t.weekSettings,t.defaultToEN)}static create(t,n,r,o,i=!1){const a=t||Qr.defaultLocale,s=a||(i?"en-US":_mt()),l=n||Qr.defaultNumberingSystem,c=r||Qr.defaultOutputCalendar,u=xF(o)||Qr.defaultWeekSettings;return new lr(s,l,c,u,a)}static resetCache(){qw=null,yF={},bF={},wF={}}static fromObject({locale:t,numberingSystem:n,outputCalendar:r,weekSettings:o}={}){return lr.create(t,n,r,o)}constructor(t,n,r,o,i){const[a,s,l]=Lmt(t);this.locale=a,this.numberingSystem=n||s||null,this.outputCalendar=r||l||null,this.weekSettings=o,this.intl=Fmt(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=i,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=zmt(this)),this.fastNumbersCached}listingMode(){const t=this.isEnglish(),n=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return t&&n?"en":"intl"}clone(t){return!t||Object.getOwnPropertyNames(t).length===0?this:lr.create(t.locale||this.specifiedLocale,t.numberingSystem||this.numberingSystem,t.outputCalendar||this.outputCalendar,xF(t.weekSettings)||this.weekSettings,t.defaultToEN||!1)}redefaultToEN(t={}){return this.clone({...t,defaultToEN:!0})}redefaultToSystem(t={}){return this.clone({...t,defaultToEN:!1})}months(t,n=!1){return SP(this,t,Dce,()=>{const r=n?{month:t,day:"numeric"}:{month:t},o=n?"format":"standalone";return this.monthsCache[o][t]||(this.monthsCache[o][t]=jmt(i=>this.extract(i,r,"month"))),this.monthsCache[o][t]})}weekdays(t,n=!1){return SP(this,t,Lce,()=>{const r=n?{weekday:t,year:"numeric",month:"long",day:"numeric"}:{weekday:t},o=n?"format":"standalone";return this.weekdaysCache[o][t]||(this.weekdaysCache[o][t]=Bmt(i=>this.extract(i,r,"weekday"))),this.weekdaysCache[o][t]})}meridiems(){return SP(this,void 0,()=>Fce,()=>{if(!this.meridiemCache){const t={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[vt.utc(2016,11,13,9),vt.utc(2016,11,13,19)].map(n=>this.extract(n,t,"dayperiod"))}return this.meridiemCache})}eras(t){return SP(this,t,jce,()=>{const n={era:t};return this.eraCache[t]||(this.eraCache[t]=[vt.utc(-40,1,1),vt.utc(2017,1,1)].map(r=>this.extract(r,n,"era"))),this.eraCache[t]})}extract(t,n,r){const o=this.dtFormatter(t,n),i=o.formatToParts(),a=i.find(s=>s.type.toLowerCase()===r);return a?a.value:null}numberFormatter(t={}){return new Vmt(this.intl,t.forceSimple||this.fastNumbers,t)}dtFormatter(t,n={}){return new Hmt(t,this.intl,n)}relFormatter(t={}){return new Umt(this.intl,this.isEnglish(),t)}listFormatter(t={}){return Rmt(this.intl,t)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:kce()?Nmt(this.locale):Wmt}getStartOfWeek(){return this.getWeekSettings().firstDay}getMinDaysInFirstWeek(){return this.getWeekSettings().minimalDays}getWeekendDays(){return this.getWeekSettings().weekend}equals(t){return this.locale===t.locale&&this.numberingSystem===t.numberingSystem&&this.outputCalendar===t.outputCalendar}toString(){return`Locale(${this.locale}, ${this.numberingSystem}, ${this.outputCalendar})`}}let XD=null;class oa extends h1{static get utcInstance(){return XD===null&&(XD=new oa(0)),XD}static instance(t){return t===0?oa.utcInstance:new oa(t)}static parseSpecifier(t){if(t){const n=t.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(n)return new oa(IM(n[1],n[2]))}return null}constructor(t){super(),this.fixed=t}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${Ix(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${Ix(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(t,n){return Ix(this.fixed,n)}get isUniversal(){return!0}offset(){return this.fixed}equals(t){return t.type==="fixed"&&t.fixed===this.fixed}get isValid(){return!0}}class Gmt extends h1{constructor(t){super(),this.zoneName=t}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}}function wf(e,t){if(on(e)||e===null)return t;if(e instanceof h1)return e;if(Jmt(e)){const n=e.toLowerCase();return n==="default"?t:n==="local"||n==="system"?EM.instance:n==="utc"||n==="gmt"?oa.utcInstance:oa.parseSpecifier(n)||kd.create(e)}else return Xf(e)?oa.instance(e):typeof e=="object"&&"offset"in e&&typeof e.offset=="function"?e:new Gmt(e)}const e5={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},iK={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},qmt=e5.hanidec.replace(/[\[|\]]/g,"").split("");function Kmt(e){let t=parseInt(e,10);if(isNaN(t)){t="";for(let n=0;n=i&&r<=a&&(t+=r-i)}}return parseInt(t,10)}else return t}let Zm={};function Ymt(){Zm={}}function tc({numberingSystem:e},t=""){const n=e||"latn";return Zm[n]||(Zm[n]={}),Zm[n][t]||(Zm[n][t]=new RegExp(`${e5[n]}${t}`)),Zm[n][t]}let aK=()=>Date.now(),sK="system",lK=null,cK=null,uK=null,dK=60,fK,pK=null;class Qr{static get now(){return aK}static set now(t){aK=t}static set defaultZone(t){sK=t}static get defaultZone(){return wf(sK,EM.instance)}static get defaultLocale(){return lK}static set defaultLocale(t){lK=t}static get defaultNumberingSystem(){return cK}static set defaultNumberingSystem(t){cK=t}static get defaultOutputCalendar(){return uK}static set defaultOutputCalendar(t){uK=t}static get defaultWeekSettings(){return pK}static set defaultWeekSettings(t){pK=xF(t)}static get twoDigitCutoffYear(){return dK}static set twoDigitCutoffYear(t){dK=t%100}static get throwOnInvalid(){return fK}static set throwOnInvalid(t){fK=t}static resetCaches(){lr.resetCache(),kd.resetCache(),vt.resetCache(),Ymt()}}class yc{constructor(t,n){this.reason=t,this.explanation=n}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}const Cce=[0,31,59,90,120,151,181,212,243,273,304,334],Ece=[0,31,60,91,121,152,182,213,244,274,305,335];function ml(e,t){return new yc("unit out of range",`you specified ${t} (of type ${typeof t}) as a ${e}, which is invalid`)}function t5(e,t,n){const r=new Date(Date.UTC(e,t-1,n));e<100&&e>=0&&r.setUTCFullYear(r.getUTCFullYear()-1900);const o=r.getUTCDay();return o===0?7:o}function Pce(e,t,n){return n+(g1(e)?Ece:Cce)[t-1]}function Tce(e,t){const n=g1(e)?Ece:Cce,r=n.findIndex(i=>iKS(r,t,n)?(c=r+1,l=1):c=r,{weekYear:c,weekNumber:l,weekday:s,...OM(e)}}function hK(e,t=4,n=1){const{weekYear:r,weekNumber:o,weekday:i}=e,a=n5(t5(r,1,t),n),s=Yy(r);let l=o*7+i-a-7+t,c;l<1?(c=r-1,l+=Yy(c)):l>s?(c=r+1,l-=Yy(r)):c=r;const{month:u,day:d}=Tce(c,l);return{year:c,month:u,day:d,...OM(e)}}function JD(e){const{year:t,month:n,day:r}=e,o=Pce(t,n,r);return{year:t,ordinal:o,...OM(e)}}function gK(e){const{year:t,ordinal:n}=e,{month:r,day:o}=Tce(t,n);return{year:t,month:r,day:o,...OM(e)}}function mK(e,t){if(!on(e.localWeekday)||!on(e.localWeekNumber)||!on(e.localWeekYear)){if(!on(e.weekday)||!on(e.weekNumber)||!on(e.weekYear))throw new Py("Cannot mix locale-based week fields with ISO-based week fields");return on(e.localWeekday)||(e.weekday=e.localWeekday),on(e.localWeekNumber)||(e.weekNumber=e.localWeekNumber),on(e.localWeekYear)||(e.weekYear=e.localWeekYear),delete e.localWeekday,delete e.localWeekNumber,delete e.localWeekYear,{minDaysInFirstWeek:t.getMinDaysInFirstWeek(),startOfWeek:t.getStartOfWeek()}}else return{minDaysInFirstWeek:4,startOfWeek:1}}function Qmt(e,t=4,n=1){const r=PM(e.weekYear),o=yl(e.weekNumber,1,KS(e.weekYear,t,n)),i=yl(e.weekday,1,7);return r?o?i?!1:ml("weekday",e.weekday):ml("week",e.weekNumber):ml("weekYear",e.weekYear)}function Xmt(e){const t=PM(e.year),n=yl(e.ordinal,1,Yy(e.year));return t?n?!1:ml("ordinal",e.ordinal):ml("year",e.year)}function Ice(e){const t=PM(e.year),n=yl(e.month,1,12),r=yl(e.day,1,kO(e.year,e.month));return t?n?r?!1:ml("day",e.day):ml("month",e.month):ml("year",e.year)}function Oce(e){const{hour:t,minute:n,second:r,millisecond:o}=e,i=yl(t,0,23)||t===24&&n===0&&r===0&&o===0,a=yl(n,0,59),s=yl(r,0,59),l=yl(o,0,999);return i?a?s?l?!1:ml("millisecond",o):ml("second",r):ml("minute",n):ml("hour",t)}function on(e){return typeof e>"u"}function Xf(e){return typeof e=="number"}function PM(e){return typeof e=="number"&&e%1===0}function Jmt(e){return typeof e=="string"}function Zmt(e){return Object.prototype.toString.call(e)==="[object Date]"}function Ace(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function kce(){try{return typeof Intl<"u"&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch{return!1}}function eyt(e){return Array.isArray(e)?e:[e]}function yK(e,t,n){if(e.length!==0)return e.reduce((r,o)=>{const i=[t(o),o];return r&&n(r[0],i[0])===r[0]?r:i},null)[1]}function tyt(e,t){return t.reduce((n,r)=>(n[r]=e[r],n),{})}function cb(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function xF(e){if(e==null)return null;if(typeof e!="object")throw new ki("Week settings must be an object");if(!yl(e.firstDay,1,7)||!yl(e.minimalDays,1,7)||!Array.isArray(e.weekend)||e.weekend.some(t=>!yl(t,1,7)))throw new ki("Invalid week settings");return{firstDay:e.firstDay,minimalDays:e.minimalDays,weekend:Array.from(e.weekend)}}function yl(e,t,n){return PM(e)&&e>=t&&e<=n}function nyt(e,t){return e-t*Math.floor(e/t)}function Eo(e,t=2){const n=e<0;let r;return n?r="-"+(""+-e).padStart(t,"0"):r=(""+e).padStart(t,"0"),r}function hf(e){if(!(on(e)||e===null||e===""))return parseInt(e,10)}function ph(e){if(!(on(e)||e===null||e===""))return parseFloat(e)}function r5(e){if(!(on(e)||e===null||e==="")){const t=parseFloat("0."+e)*1e3;return Math.floor(t)}}function o5(e,t,n=!1){const r=10**t;return(n?Math.trunc:Math.round)(e*r)/r}function g1(e){return e%4===0&&(e%100!==0||e%400===0)}function Yy(e){return g1(e)?366:365}function kO(e,t){const n=nyt(t-1,12)+1,r=e+(t-n)/12;return n===2?g1(r)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][n-1]}function TM(e){let t=Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute,e.second,e.millisecond);return e.year<100&&e.year>=0&&(t=new Date(t),t.setUTCFullYear(e.year,e.month-1,e.day)),+t}function vK(e,t,n){return-n5(t5(e,1,t),n)+t-1}function KS(e,t=4,n=1){const r=vK(e,t,n),o=vK(e+1,t,n);return(Yy(e)-r+o)/7}function SF(e){return e>99?e:e>Qr.twoDigitCutoffYear?1900+e:2e3+e}function Mce(e,t,n,r=null){const o=new Date(e),i={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};r&&(i.timeZone=r);const a={timeZoneName:t,...i},s=new Intl.DateTimeFormat(n,a).formatToParts(o).find(l=>l.type.toLowerCase()==="timezonename");return s?s.value:null}function IM(e,t){let n=parseInt(e,10);Number.isNaN(n)&&(n=0);const r=parseInt(t,10)||0,o=n<0||Object.is(n,-0)?-r:r;return n*60+o}function Rce(e){const t=Number(e);if(typeof e=="boolean"||e===""||Number.isNaN(t))throw new ki(`Invalid unit value ${e}`);return t}function MO(e,t){const n={};for(const r in e)if(cb(e,r)){const o=e[r];if(o==null)continue;n[t(r)]=Rce(o)}return n}function Ix(e,t){const n=Math.trunc(Math.abs(e/60)),r=Math.trunc(Math.abs(e%60)),o=e>=0?"+":"-";switch(t){case"short":return`${o}${Eo(n,2)}:${Eo(r,2)}`;case"narrow":return`${o}${n}${r>0?`:${r}`:""}`;case"techie":return`${o}${Eo(n,2)}${Eo(r,2)}`;default:throw new RangeError(`Value format ${t} is out of range for property format`)}}function OM(e){return tyt(e,["hour","minute","second","millisecond"])}const ryt=["January","February","March","April","May","June","July","August","September","October","November","December"],$ce=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],oyt=["J","F","M","A","M","J","J","A","S","O","N","D"];function Dce(e){switch(e){case"narrow":return[...oyt];case"short":return[...$ce];case"long":return[...ryt];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}const _ce=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],Nce=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],iyt=["M","T","W","T","F","S","S"];function Lce(e){switch(e){case"narrow":return[...iyt];case"short":return[...Nce];case"long":return[..._ce];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const Fce=["AM","PM"],ayt=["Before Christ","Anno Domini"],syt=["BC","AD"],lyt=["B","A"];function jce(e){switch(e){case"narrow":return[...lyt];case"short":return[...syt];case"long":return[...ayt];default:return null}}function cyt(e){return Fce[e.hour<12?0:1]}function uyt(e,t){return Lce(t)[e.weekday-1]}function dyt(e,t){return Dce(t)[e.month-1]}function fyt(e,t){return jce(t)[e.year<0?0:1]}function pyt(e,t,n="always",r=!1){const o={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},i=["hours","minutes","seconds"].indexOf(e)===-1;if(n==="auto"&&i){const d=e==="days";switch(t){case 1:return d?"tomorrow":`next ${o[e][0]}`;case-1:return d?"yesterday":`last ${o[e][0]}`;case 0:return d?"today":`this ${o[e][0]}`}}const a=Object.is(t,-0)||t<0,s=Math.abs(t),l=s===1,c=o[e],u=r?l?c[1]:c[2]||c[1]:l?o[e][0]:e;return a?`${s} ${u} ago`:`in ${s} ${u}`}function bK(e,t){let n="";for(const r of e)r.literal?n+=r.val:n+=t(r.val);return n}const hyt={D:OO,DD:oce,DDD:ice,DDDD:ace,t:sce,tt:lce,ttt:cce,tttt:uce,T:dce,TT:fce,TTT:pce,TTTT:hce,f:gce,ff:yce,fff:bce,ffff:xce,F:mce,FF:vce,FFF:wce,FFFF:Sce};let gc=class Kw{static create(t,n={}){return new Kw(t,n)}static parseFormat(t){let n=null,r="",o=!1;const i=[];for(let a=0;a0&&i.push({literal:o||/^\s+$/.test(r),val:r}),n=null,r="",o=!o):o||s===n?r+=s:(r.length>0&&i.push({literal:/^\s+$/.test(r),val:r}),r=s,n=s)}return r.length>0&&i.push({literal:o||/^\s+$/.test(r),val:r}),i}static macroTokenToFormatOpts(t){return hyt[t]}constructor(t,n){this.opts=n,this.loc=t,this.systemLoc=null}formatWithSystemDefault(t,n){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(t,{...this.opts,...n}).format()}dtFormatter(t,n={}){return this.loc.dtFormatter(t,{...this.opts,...n})}formatDateTime(t,n){return this.dtFormatter(t,n).format()}formatDateTimeParts(t,n){return this.dtFormatter(t,n).formatToParts()}formatInterval(t,n){return this.dtFormatter(t.start,n).dtf.formatRange(t.start.toJSDate(),t.end.toJSDate())}resolvedOptions(t,n){return this.dtFormatter(t,n).resolvedOptions()}num(t,n=0){if(this.opts.forceSimple)return Eo(t,n);const r={...this.opts};return n>0&&(r.padTo=n),this.loc.numberFormatter(r).format(t)}formatDateTimeFromString(t,n){const r=this.loc.listingMode()==="en",o=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",i=(p,h)=>this.loc.extract(t,p,h),a=p=>t.isOffsetFixed&&t.offset===0&&p.allowZ?"Z":t.isValid?t.zone.formatOffset(t.ts,p.format):"",s=()=>r?cyt(t):i({hour:"numeric",hourCycle:"h12"},"dayperiod"),l=(p,h)=>r?dyt(t,p):i(h?{month:p}:{month:p,day:"numeric"},"month"),c=(p,h)=>r?uyt(t,p):i(h?{weekday:p}:{weekday:p,month:"long",day:"numeric"},"weekday"),u=p=>{const h=Kw.macroTokenToFormatOpts(p);return h?this.formatWithSystemDefault(t,h):p},d=p=>r?fyt(t,p):i({era:p},"era"),f=p=>{switch(p){case"S":return this.num(t.millisecond);case"u":case"SSS":return this.num(t.millisecond,3);case"s":return this.num(t.second);case"ss":return this.num(t.second,2);case"uu":return this.num(Math.floor(t.millisecond/10),2);case"uuu":return this.num(Math.floor(t.millisecond/100));case"m":return this.num(t.minute);case"mm":return this.num(t.minute,2);case"h":return this.num(t.hour%12===0?12:t.hour%12);case"hh":return this.num(t.hour%12===0?12:t.hour%12,2);case"H":return this.num(t.hour);case"HH":return this.num(t.hour,2);case"Z":return a({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return a({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return a({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return t.zone.offsetName(t.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return t.zone.offsetName(t.ts,{format:"long",locale:this.loc.locale});case"z":return t.zoneName;case"a":return s();case"d":return o?i({day:"numeric"},"day"):this.num(t.day);case"dd":return o?i({day:"2-digit"},"day"):this.num(t.day,2);case"c":return this.num(t.weekday);case"ccc":return c("short",!0);case"cccc":return c("long",!0);case"ccccc":return c("narrow",!0);case"E":return this.num(t.weekday);case"EEE":return c("short",!1);case"EEEE":return c("long",!1);case"EEEEE":return c("narrow",!1);case"L":return o?i({month:"numeric",day:"numeric"},"month"):this.num(t.month);case"LL":return o?i({month:"2-digit",day:"numeric"},"month"):this.num(t.month,2);case"LLL":return l("short",!0);case"LLLL":return l("long",!0);case"LLLLL":return l("narrow",!0);case"M":return o?i({month:"numeric"},"month"):this.num(t.month);case"MM":return o?i({month:"2-digit"},"month"):this.num(t.month,2);case"MMM":return l("short",!1);case"MMMM":return l("long",!1);case"MMMMM":return l("narrow",!1);case"y":return o?i({year:"numeric"},"year"):this.num(t.year);case"yy":return o?i({year:"2-digit"},"year"):this.num(t.year.toString().slice(-2),2);case"yyyy":return o?i({year:"numeric"},"year"):this.num(t.year,4);case"yyyyyy":return o?i({year:"numeric"},"year"):this.num(t.year,6);case"G":return d("short");case"GG":return d("long");case"GGGGG":return d("narrow");case"kk":return this.num(t.weekYear.toString().slice(-2),2);case"kkkk":return this.num(t.weekYear,4);case"W":return this.num(t.weekNumber);case"WW":return this.num(t.weekNumber,2);case"n":return this.num(t.localWeekNumber);case"nn":return this.num(t.localWeekNumber,2);case"ii":return this.num(t.localWeekYear.toString().slice(-2),2);case"iiii":return this.num(t.localWeekYear,4);case"o":return this.num(t.ordinal);case"ooo":return this.num(t.ordinal,3);case"q":return this.num(t.quarter);case"qq":return this.num(t.quarter,2);case"X":return this.num(Math.floor(t.ts/1e3));case"x":return this.num(t.ts);default:return u(p)}};return bK(Kw.parseFormat(n),f)}formatDurationFromString(t,n){const r=l=>{switch(l[0]){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":return"hour";case"d":return"day";case"w":return"week";case"M":return"month";case"y":return"year";default:return null}},o=l=>c=>{const u=r(c);return u?this.num(l.get(u),c.length):c},i=Kw.parseFormat(n),a=i.reduce((l,{literal:c,val:u})=>c?l:l.concat(u),[]),s=t.shiftTo(...a.map(r).filter(l=>l));return bK(i,o(s))}};const Bce=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function l0(...e){const t=e.reduce((n,r)=>n+r.source,"");return RegExp(`^${t}$`)}function c0(...e){return t=>e.reduce(([n,r,o],i)=>{const[a,s,l]=i(t,o);return[{...n,...a},s||r,l]},[{},null,1]).slice(0,2)}function u0(e,...t){if(e==null)return[null,null];for(const[n,r]of t){const o=n.exec(e);if(o)return r(o)}return[null,null]}function zce(...e){return(t,n)=>{const r={};let o;for(o=0;op!==void 0&&(h||p&&u)?-p:p;return[{years:f(ph(n)),months:f(ph(r)),weeks:f(ph(o)),days:f(ph(i)),hours:f(ph(a)),minutes:f(ph(s)),seconds:f(ph(l),l==="-0"),milliseconds:f(r5(c),d)}]}const Iyt={GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function s5(e,t,n,r,o,i,a){const s={year:t.length===2?SF(hf(t)):hf(t),month:$ce.indexOf(n)+1,day:hf(r),hour:hf(o),minute:hf(i)};return a&&(s.second=hf(a)),e&&(s.weekday=e.length>3?_ce.indexOf(e)+1:Nce.indexOf(e)+1),s}const Oyt=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function Ayt(e){const[,t,n,r,o,i,a,s,l,c,u,d]=e,f=s5(t,o,r,n,i,a,s);let p;return l?p=Iyt[l]:c?p=0:p=IM(u,d),[f,new oa(p)]}function kyt(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}const Myt=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,Ryt=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,$yt=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function wK(e){const[,t,n,r,o,i,a,s]=e;return[s5(t,o,r,n,i,a,s),oa.utcInstance]}function Dyt(e){const[,t,n,r,o,i,a,s]=e;return[s5(t,s,n,r,o,i,a),oa.utcInstance]}const _yt=l0(myt,a5),Nyt=l0(yyt,a5),Lyt=l0(vyt,a5),Fyt=l0(Hce),Wce=c0(Cyt,d0,m1,y1),jyt=c0(byt,d0,m1,y1),Byt=c0(wyt,d0,m1,y1),zyt=c0(d0,m1,y1);function Vyt(e){return u0(e,[_yt,Wce],[Nyt,jyt],[Lyt,Byt],[Fyt,zyt])}function Hyt(e){return u0(kyt(e),[Oyt,Ayt])}function Uyt(e){return u0(e,[Myt,wK],[Ryt,wK],[$yt,Dyt])}function Wyt(e){return u0(e,[Pyt,Tyt])}const Gyt=c0(d0);function qyt(e){return u0(e,[Eyt,Gyt])}const Kyt=l0(xyt,Syt),Yyt=l0(Uce),Qyt=c0(d0,m1,y1);function Xyt(e){return u0(e,[Kyt,Wce],[Yyt,Qyt])}const xK="Invalid Duration",Gce={weeks:{days:7,hours:7*24,minutes:7*24*60,seconds:7*24*60*60,milliseconds:7*24*60*60*1e3},days:{hours:24,minutes:24*60,seconds:24*60*60,milliseconds:24*60*60*1e3},hours:{minutes:60,seconds:60*60,milliseconds:60*60*1e3},minutes:{seconds:60,milliseconds:60*1e3},seconds:{milliseconds:1e3}},Jyt={years:{quarters:4,months:12,weeks:52,days:365,hours:365*24,minutes:365*24*60,seconds:365*24*60*60,milliseconds:365*24*60*60*1e3},quarters:{months:3,weeks:13,days:91,hours:91*24,minutes:91*24*60,seconds:91*24*60*60,milliseconds:91*24*60*60*1e3},months:{weeks:4,days:30,hours:30*24,minutes:30*24*60,seconds:30*24*60*60,milliseconds:30*24*60*60*1e3},...Gce},Js=146097/400,Lm=146097/4800,Zyt={years:{quarters:4,months:12,weeks:Js/7,days:Js,hours:Js*24,minutes:Js*24*60,seconds:Js*24*60*60,milliseconds:Js*24*60*60*1e3},quarters:{months:3,weeks:Js/28,days:Js/4,hours:Js*24/4,minutes:Js*24*60/4,seconds:Js*24*60*60/4,milliseconds:Js*24*60*60*1e3/4},months:{weeks:Lm/7,days:Lm,hours:Lm*24,minutes:Lm*24*60,seconds:Lm*24*60*60,milliseconds:Lm*24*60*60*1e3},...Gce},zh=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],evt=zh.slice(0).reverse();function rf(e,t,n=!1){const r={values:n?t.values:{...e.values,...t.values||{}},loc:e.loc.clone(t.loc),conversionAccuracy:t.conversionAccuracy||e.conversionAccuracy,matrix:t.matrix||e.matrix};return new Vn(r)}function qce(e,t){let n=t.milliseconds??0;for(const r of evt.slice(1))t[r]&&(n+=t[r]*e[r].milliseconds);return n}function SK(e,t){const n=qce(e,t)<0?-1:1;zh.reduceRight((r,o)=>{if(on(t[o]))return r;if(r){const i=t[r]*n,a=e[o][r],s=Math.floor(i/a);t[o]+=s*n,t[r]-=s*a*n}return o},null),zh.reduce((r,o)=>{if(on(t[o]))return r;if(r){const i=t[r]%1;t[r]-=i,t[o]+=i*e[r][o]}return o},null)}function tvt(e){const t={};for(const[n,r]of Object.entries(e))r!==0&&(t[n]=r);return t}class Vn{constructor(t){const n=t.conversionAccuracy==="longterm"||!1;let r=n?Zyt:Jyt;t.matrix&&(r=t.matrix),this.values=t.values,this.loc=t.loc||lr.create(),this.conversionAccuracy=n?"longterm":"casual",this.invalid=t.invalid||null,this.matrix=r,this.isLuxonDuration=!0}static fromMillis(t,n){return Vn.fromObject({milliseconds:t},n)}static fromObject(t,n={}){if(t==null||typeof t!="object")throw new ki(`Duration.fromObject: argument expected to be an object, got ${t===null?"null":typeof t}`);return new Vn({values:MO(t,Vn.normalizeUnit),loc:lr.fromObject(n),conversionAccuracy:n.conversionAccuracy,matrix:n.matrix})}static fromDurationLike(t){if(Xf(t))return Vn.fromMillis(t);if(Vn.isDuration(t))return t;if(typeof t=="object")return Vn.fromObject(t);throw new ki(`Unknown duration argument ${t} of type ${typeof t}`)}static fromISO(t,n){const[r]=Wyt(t);return r?Vn.fromObject(r,n):Vn.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static fromISOTime(t,n){const[r]=qyt(t);return r?Vn.fromObject(r,n):Vn.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static invalid(t,n=null){if(!t)throw new ki("need to specify a reason the Duration is invalid");const r=t instanceof yc?t:new yc(t,n);if(Qr.throwOnInvalid)throw new Pmt(r);return new Vn({invalid:r})}static normalizeUnit(t){const n={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[t&&t.toLowerCase()];if(!n)throw new rce(t);return n}static isDuration(t){return t&&t.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(t,n={}){const r={...n,floor:n.round!==!1&&n.floor!==!1};return this.isValid?gc.create(this.loc,r).formatDurationFromString(this,t):xK}toHuman(t={}){if(!this.isValid)return xK;const n=zh.map(r=>{const o=this.values[r];return on(o)?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...t,unit:r.slice(0,-1)}).format(o)}).filter(r=>r);return this.loc.listFormatter({type:"conjunction",style:t.listStyle||"narrow",...t}).format(n)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let t="P";return this.years!==0&&(t+=this.years+"Y"),(this.months!==0||this.quarters!==0)&&(t+=this.months+this.quarters*3+"M"),this.weeks!==0&&(t+=this.weeks+"W"),this.days!==0&&(t+=this.days+"D"),(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)&&(t+="T"),this.hours!==0&&(t+=this.hours+"H"),this.minutes!==0&&(t+=this.minutes+"M"),(this.seconds!==0||this.milliseconds!==0)&&(t+=o5(this.seconds+this.milliseconds/1e3,3)+"S"),t==="P"&&(t+="T0S"),t}toISOTime(t={}){if(!this.isValid)return null;const n=this.toMillis();return n<0||n>=864e5?null:(t={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...t,includeOffset:!1},vt.fromMillis(n,{zone:"UTC"}).toISOTime(t))}toJSON(){return this.toISO()}toString(){return this.toISO()}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Duration { values: ${JSON.stringify(this.values)} }`:`Duration { Invalid, reason: ${this.invalidReason} }`}toMillis(){return this.isValid?qce(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(t){if(!this.isValid)return this;const n=Vn.fromDurationLike(t),r={};for(const o of zh)(cb(n.values,o)||cb(this.values,o))&&(r[o]=n.get(o)+this.get(o));return rf(this,{values:r},!0)}minus(t){if(!this.isValid)return this;const n=Vn.fromDurationLike(t);return this.plus(n.negate())}mapUnits(t){if(!this.isValid)return this;const n={};for(const r of Object.keys(this.values))n[r]=Rce(t(this.values[r],r));return rf(this,{values:n},!0)}get(t){return this[Vn.normalizeUnit(t)]}set(t){if(!this.isValid)return this;const n={...this.values,...MO(t,Vn.normalizeUnit)};return rf(this,{values:n})}reconfigure({locale:t,numberingSystem:n,conversionAccuracy:r,matrix:o}={}){const a={loc:this.loc.clone({locale:t,numberingSystem:n}),matrix:o,conversionAccuracy:r};return rf(this,a)}as(t){return this.isValid?this.shiftTo(t).get(t):NaN}normalize(){if(!this.isValid)return this;const t=this.toObject();return SK(this.matrix,t),rf(this,{values:t},!0)}rescale(){if(!this.isValid)return this;const t=tvt(this.normalize().shiftToAll().toObject());return rf(this,{values:t},!0)}shiftTo(...t){if(!this.isValid)return this;if(t.length===0)return this;t=t.map(a=>Vn.normalizeUnit(a));const n={},r={},o=this.toObject();let i;for(const a of zh)if(t.indexOf(a)>=0){i=a;let s=0;for(const c in r)s+=this.matrix[c][a]*r[c],r[c]=0;Xf(o[a])&&(s+=o[a]);const l=Math.trunc(s);n[a]=l,r[a]=(s*1e3-l*1e3)/1e3}else Xf(o[a])&&(r[a]=o[a]);for(const a in r)r[a]!==0&&(n[i]+=a===i?r[a]:r[a]/this.matrix[i][a]);return SK(this.matrix,n),rf(this,{values:n},!0)}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;const t={};for(const n of Object.keys(this.values))t[n]=this.values[n]===0?0:-this.values[n];return rf(this,{values:t},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(t){if(!this.isValid||!t.isValid||!this.loc.equals(t.loc))return!1;function n(r,o){return r===void 0||r===0?o===void 0||o===0:r===o}for(const r of zh)if(!n(this.values[r],t.values[r]))return!1;return!0}}const Fm="Invalid Interval";function nvt(e,t){return!e||!e.isValid?uo.invalid("missing or invalid start"):!t||!t.isValid?uo.invalid("missing or invalid end"):tt:!1}isBefore(t){return this.isValid?this.e<=t:!1}contains(t){return this.isValid?this.s<=t&&this.e>t:!1}set({start:t,end:n}={}){return this.isValid?uo.fromDateTimes(t||this.s,n||this.e):this}splitAt(...t){if(!this.isValid)return[];const n=t.map(xw).filter(a=>this.contains(a)).sort((a,s)=>a.toMillis()-s.toMillis()),r=[];let{s:o}=this,i=0;for(;o+this.e?this.e:a;r.push(uo.fromDateTimes(o,s)),o=s,i+=1}return r}splitBy(t){const n=Vn.fromDurationLike(t);if(!this.isValid||!n.isValid||n.as("milliseconds")===0)return[];let{s:r}=this,o=1,i;const a=[];for(;rl*o));i=+s>+this.e?this.e:s,a.push(uo.fromDateTimes(r,i)),r=i,o+=1}return a}divideEqually(t){return this.isValid?this.splitBy(this.length()/t).slice(0,t):[]}overlaps(t){return this.e>t.s&&this.s=t.e:!1}equals(t){return!this.isValid||!t.isValid?!1:this.s.equals(t.s)&&this.e.equals(t.e)}intersection(t){if(!this.isValid)return this;const n=this.s>t.s?this.s:t.s,r=this.e=r?null:uo.fromDateTimes(n,r)}union(t){if(!this.isValid)return this;const n=this.st.e?this.e:t.e;return uo.fromDateTimes(n,r)}static merge(t){const[n,r]=t.sort((o,i)=>o.s-i.s).reduce(([o,i],a)=>i?i.overlaps(a)||i.abutsStart(a)?[o,i.union(a)]:[o.concat([i]),a]:[o,a],[[],null]);return r&&n.push(r),n}static xor(t){let n=null,r=0;const o=[],i=t.map(l=>[{time:l.s,type:"s"},{time:l.e,type:"e"}]),a=Array.prototype.concat(...i),s=a.sort((l,c)=>l.time-c.time);for(const l of s)r+=l.type==="s"?1:-1,r===1?n=l.time:(n&&+n!=+l.time&&o.push(uo.fromDateTimes(n,l.time)),n=null);return uo.merge(o)}difference(...t){return uo.xor([this].concat(t)).map(n=>this.intersection(n)).filter(n=>n&&!n.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:Fm}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`:`Interval { Invalid, reason: ${this.invalidReason} }`}toLocaleString(t=OO,n={}){return this.isValid?gc.create(this.s.loc.clone(n),t).formatInterval(this):Fm}toISO(t){return this.isValid?`${this.s.toISO(t)}/${this.e.toISO(t)}`:Fm}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:Fm}toISOTime(t){return this.isValid?`${this.s.toISOTime(t)}/${this.e.toISOTime(t)}`:Fm}toFormat(t,{separator:n=" – "}={}){return this.isValid?`${this.s.toFormat(t)}${n}${this.e.toFormat(t)}`:Fm}toDuration(t,n){return this.isValid?this.e.diff(this.s,t,n):Vn.invalid(this.invalidReason)}mapEndpoints(t){return uo.fromDateTimes(t(this.s),t(this.e))}}class Yw{static hasDST(t=Qr.defaultZone){const n=vt.now().setZone(t).set({month:12});return!t.isUniversal&&n.offset!==n.set({month:6}).offset}static isValidIANAZone(t){return kd.isValidZone(t)}static normalizeZone(t){return wf(t,Qr.defaultZone)}static getStartOfWeek({locale:t=null,locObj:n=null}={}){return(n||lr.create(t)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:t=null,locObj:n=null}={}){return(n||lr.create(t)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:t=null,locObj:n=null}={}){return(n||lr.create(t)).getWeekendDays().slice()}static months(t="long",{locale:n=null,numberingSystem:r=null,locObj:o=null,outputCalendar:i="gregory"}={}){return(o||lr.create(n,r,i)).months(t)}static monthsFormat(t="long",{locale:n=null,numberingSystem:r=null,locObj:o=null,outputCalendar:i="gregory"}={}){return(o||lr.create(n,r,i)).months(t,!0)}static weekdays(t="long",{locale:n=null,numberingSystem:r=null,locObj:o=null}={}){return(o||lr.create(n,r,null)).weekdays(t)}static weekdaysFormat(t="long",{locale:n=null,numberingSystem:r=null,locObj:o=null}={}){return(o||lr.create(n,r,null)).weekdays(t,!0)}static meridiems({locale:t=null}={}){return lr.create(t).meridiems()}static eras(t="short",{locale:n=null}={}){return lr.create(n,null,"gregory").eras(t)}static features(){return{relative:Ace(),localeWeek:kce()}}}function CK(e,t){const n=o=>o.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),r=n(t)-n(e);return Math.floor(Vn.fromMillis(r).as("days"))}function rvt(e,t,n){const r=[["years",(l,c)=>c.year-l.year],["quarters",(l,c)=>c.quarter-l.quarter+(c.year-l.year)*4],["months",(l,c)=>c.month-l.month+(c.year-l.year)*12],["weeks",(l,c)=>{const u=CK(l,c);return(u-u%7)/7}],["days",CK]],o={},i=e;let a,s;for(const[l,c]of r)n.indexOf(l)>=0&&(a=l,o[l]=c(e,t),s=i.plus(o),s>t?(o[l]--,e=i.plus(o),e>t&&(s=e,o[l]--,e=i.plus(o))):e=s);return[e,o,s,a]}function ovt(e,t,n,r){let[o,i,a,s]=rvt(e,t,n);const l=t-o,c=n.filter(d=>["hours","minutes","seconds","milliseconds"].indexOf(d)>=0);c.length===0&&(a0?Vn.fromMillis(l,r).shiftTo(...c).plus(u):u}const ivt="missing Intl.DateTimeFormat.formatToParts support";function tr(e,t=n=>n){return{regex:e,deser:([n])=>t(Kmt(n))}}const avt=" ",Kce=`[ ${avt}]`,Yce=new RegExp(Kce,"g");function svt(e){return e.replace(/\./g,"\\.?").replace(Yce,Kce)}function EK(e){return e.replace(/\./g,"").replace(Yce," ").toLowerCase()}function nc(e,t){return e===null?null:{regex:RegExp(e.map(svt).join("|")),deser:([n])=>e.findIndex(r=>EK(n)===EK(r))+t}}function PK(e,t){return{regex:e,deser:([,n,r])=>IM(n,r),groups:t}}function CP(e){return{regex:e,deser:([t])=>t}}function lvt(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function cvt(e,t){const n=tc(t),r=tc(t,"{2}"),o=tc(t,"{3}"),i=tc(t,"{4}"),a=tc(t,"{6}"),s=tc(t,"{1,2}"),l=tc(t,"{1,3}"),c=tc(t,"{1,6}"),u=tc(t,"{1,9}"),d=tc(t,"{2,4}"),f=tc(t,"{4,6}"),p=y=>({regex:RegExp(lvt(y.val)),deser:([w])=>w,literal:!0}),m=(y=>{if(e.literal)return p(y);switch(y.val){case"G":return nc(t.eras("short"),0);case"GG":return nc(t.eras("long"),0);case"y":return tr(c);case"yy":return tr(d,SF);case"yyyy":return tr(i);case"yyyyy":return tr(f);case"yyyyyy":return tr(a);case"M":return tr(s);case"MM":return tr(r);case"MMM":return nc(t.months("short",!0),1);case"MMMM":return nc(t.months("long",!0),1);case"L":return tr(s);case"LL":return tr(r);case"LLL":return nc(t.months("short",!1),1);case"LLLL":return nc(t.months("long",!1),1);case"d":return tr(s);case"dd":return tr(r);case"o":return tr(l);case"ooo":return tr(o);case"HH":return tr(r);case"H":return tr(s);case"hh":return tr(r);case"h":return tr(s);case"mm":return tr(r);case"m":return tr(s);case"q":return tr(s);case"qq":return tr(r);case"s":return tr(s);case"ss":return tr(r);case"S":return tr(l);case"SSS":return tr(o);case"u":return CP(u);case"uu":return CP(s);case"uuu":return tr(n);case"a":return nc(t.meridiems(),0);case"kkkk":return tr(i);case"kk":return tr(d,SF);case"W":return tr(s);case"WW":return tr(r);case"E":case"c":return tr(n);case"EEE":return nc(t.weekdays("short",!1),1);case"EEEE":return nc(t.weekdays("long",!1),1);case"ccc":return nc(t.weekdays("short",!0),1);case"cccc":return nc(t.weekdays("long",!0),1);case"Z":case"ZZ":return PK(new RegExp(`([+-]${s.source})(?::(${r.source}))?`),2);case"ZZZ":return PK(new RegExp(`([+-]${s.source})(${r.source})?`),2);case"z":return CP(/[a-z_+-/]{1,256}?/i);case" ":return CP(/[^\S\n\r]/);default:return p(y)}})(e)||{invalidReason:ivt};return m.token=e,m}const uvt={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour12:{numeric:"h","2-digit":"hh"},hour24:{numeric:"H","2-digit":"HH"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"},timeZoneName:{long:"ZZZZZ",short:"ZZZ"}};function dvt(e,t,n){const{type:r,value:o}=e;if(r==="literal"){const l=/^\s+$/.test(o);return{literal:!l,val:l?" ":o}}const i=t[r];let a=r;r==="hour"&&(t.hour12!=null?a=t.hour12?"hour12":"hour24":t.hourCycle!=null?t.hourCycle==="h11"||t.hourCycle==="h12"?a="hour12":a="hour24":a=n.hour12?"hour12":"hour24");let s=uvt[a];if(typeof s=="object"&&(s=s[i]),s)return{literal:!1,val:s}}function fvt(e){return[`^${e.map(n=>n.regex).reduce((n,r)=>`${n}(${r.source})`,"")}$`,e]}function pvt(e,t,n){const r=e.match(t);if(r){const o={};let i=1;for(const a in n)if(cb(n,a)){const s=n[a],l=s.groups?s.groups+1:1;!s.literal&&s.token&&(o[s.token.val[0]]=s.deser(r.slice(i,i+l))),i+=l}return[r,o]}else return[r,{}]}function hvt(e){const t=i=>{switch(i){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}};let n=null,r;return on(e.z)||(n=kd.create(e.z)),on(e.Z)||(n||(n=new oa(e.Z)),r=e.Z),on(e.q)||(e.M=(e.q-1)*3+1),on(e.h)||(e.h<12&&e.a===1?e.h+=12:e.h===12&&e.a===0&&(e.h=0)),e.G===0&&e.y&&(e.y=-e.y),on(e.u)||(e.S=r5(e.u)),[Object.keys(e).reduce((i,a)=>{const s=t(a);return s&&(i[s]=e[a]),i},{}),n,r]}let ZD=null;function gvt(){return ZD||(ZD=vt.fromMillis(1555555555555)),ZD}function mvt(e,t){if(e.literal)return e;const n=gc.macroTokenToFormatOpts(e.val),r=Zce(n,t);return r==null||r.includes(void 0)?e:r}function Qce(e,t){return Array.prototype.concat(...e.map(n=>mvt(n,t)))}class Xce{constructor(t,n){if(this.locale=t,this.format=n,this.tokens=Qce(gc.parseFormat(n),t),this.units=this.tokens.map(r=>cvt(r,t)),this.disqualifyingUnit=this.units.find(r=>r.invalidReason),!this.disqualifyingUnit){const[r,o]=fvt(this.units);this.regex=RegExp(r,"i"),this.handlers=o}}explainFromTokens(t){if(this.isValid){const[n,r]=pvt(t,this.regex,this.handlers),[o,i,a]=r?hvt(r):[null,null,void 0];if(cb(r,"a")&&cb(r,"H"))throw new Py("Can't include meridiem when specifying 24-hour format");return{input:t,tokens:this.tokens,regex:this.regex,rawMatches:n,matches:r,result:o,zone:i,specificOffset:a}}else return{input:t,tokens:this.tokens,invalidReason:this.invalidReason}}get isValid(){return!this.disqualifyingUnit}get invalidReason(){return this.disqualifyingUnit?this.disqualifyingUnit.invalidReason:null}}function Jce(e,t,n){return new Xce(e,n).explainFromTokens(t)}function yvt(e,t,n){const{result:r,zone:o,specificOffset:i,invalidReason:a}=Jce(e,t,n);return[r,o,i,a]}function Zce(e,t){if(!e)return null;const r=gc.create(t,e).dtFormatter(gvt()),o=r.formatToParts(),i=r.resolvedOptions();return o.map(a=>dvt(a,e,i))}const e_="Invalid DateTime",TK=864e13;function Qw(e){return new yc("unsupported zone",`the zone "${e.name}" is not supported`)}function t_(e){return e.weekData===null&&(e.weekData=AO(e.c)),e.weekData}function n_(e){return e.localWeekData===null&&(e.localWeekData=AO(e.c,e.loc.getMinDaysInFirstWeek(),e.loc.getStartOfWeek())),e.localWeekData}function hh(e,t){const n={ts:e.ts,zone:e.zone,c:e.c,o:e.o,loc:e.loc,invalid:e.invalid};return new vt({...n,...t,old:n})}function eue(e,t,n){let r=e-t*60*1e3;const o=n.offset(r);if(t===o)return[r,t];r-=(o-t)*60*1e3;const i=n.offset(r);return o===i?[r,o]:[e-Math.min(o,i)*60*1e3,Math.max(o,i)]}function EP(e,t){e+=t*60*1e3;const n=new Date(e);return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:n.getUTCHours(),minute:n.getUTCMinutes(),second:n.getUTCSeconds(),millisecond:n.getUTCMilliseconds()}}function gT(e,t,n){return eue(TM(e),t,n)}function IK(e,t){const n=e.o,r=e.c.year+Math.trunc(t.years),o=e.c.month+Math.trunc(t.months)+Math.trunc(t.quarters)*3,i={...e.c,year:r,month:o,day:Math.min(e.c.day,kO(r,o))+Math.trunc(t.days)+Math.trunc(t.weeks)*7},a=Vn.fromObject({years:t.years-Math.trunc(t.years),quarters:t.quarters-Math.trunc(t.quarters),months:t.months-Math.trunc(t.months),weeks:t.weeks-Math.trunc(t.weeks),days:t.days-Math.trunc(t.days),hours:t.hours,minutes:t.minutes,seconds:t.seconds,milliseconds:t.milliseconds}).as("milliseconds"),s=TM(i);let[l,c]=eue(s,n,e.zone);return a!==0&&(l+=a,c=e.zone.offset(l)),{ts:l,o:c}}function jm(e,t,n,r,o,i){const{setZone:a,zone:s}=n;if(e&&Object.keys(e).length!==0||t){const l=t||s,c=vt.fromObject(e,{...n,zone:l,specificOffset:i});return a?c:c.setZone(s)}else return vt.invalid(new yc("unparsable",`the input "${o}" can't be parsed as ${r}`))}function PP(e,t,n=!0){return e.isValid?gc.create(lr.create("en-US"),{allowZ:n,forceSimple:!0}).formatDateTimeFromString(e,t):null}function r_(e,t){const n=e.c.year>9999||e.c.year<0;let r="";return n&&e.c.year>=0&&(r+="+"),r+=Eo(e.c.year,n?6:4),t?(r+="-",r+=Eo(e.c.month),r+="-",r+=Eo(e.c.day)):(r+=Eo(e.c.month),r+=Eo(e.c.day)),r}function OK(e,t,n,r,o,i){let a=Eo(e.c.hour);return t?(a+=":",a+=Eo(e.c.minute),(e.c.millisecond!==0||e.c.second!==0||!n)&&(a+=":")):a+=Eo(e.c.minute),(e.c.millisecond!==0||e.c.second!==0||!n)&&(a+=Eo(e.c.second),(e.c.millisecond!==0||!r)&&(a+=".",a+=Eo(e.c.millisecond,3))),o&&(e.isOffsetFixed&&e.offset===0&&!i?a+="Z":e.o<0?(a+="-",a+=Eo(Math.trunc(-e.o/60)),a+=":",a+=Eo(Math.trunc(-e.o%60))):(a+="+",a+=Eo(Math.trunc(e.o/60)),a+=":",a+=Eo(Math.trunc(e.o%60)))),i&&(a+="["+e.zone.ianaName+"]"),a}const tue={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},vvt={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},bvt={ordinal:1,hour:0,minute:0,second:0,millisecond:0},nue=["year","month","day","hour","minute","second","millisecond"],wvt=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],xvt=["year","ordinal","hour","minute","second","millisecond"];function Svt(e){const t={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[e.toLowerCase()];if(!t)throw new rce(e);return t}function AK(e){switch(e.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return Svt(e)}}function Cvt(e){return yT[e]||(mT===void 0&&(mT=Qr.now()),yT[e]=e.offset(mT)),yT[e]}function kK(e,t){const n=wf(t.zone,Qr.defaultZone);if(!n.isValid)return vt.invalid(Qw(n));const r=lr.fromObject(t);let o,i;if(on(e.year))o=Qr.now();else{for(const l of nue)on(e[l])&&(e[l]=tue[l]);const a=Ice(e)||Oce(e);if(a)return vt.invalid(a);const s=Cvt(n);[o,i]=gT(e,s,n)}return new vt({ts:o,zone:n,loc:r,o:i})}function MK(e,t,n){const r=on(n.round)?!0:n.round,o=(a,s)=>(a=o5(a,r||n.calendary?0:2,!0),t.loc.clone(n).relFormatter(n).format(a,s)),i=a=>n.calendary?t.hasSame(e,a)?0:t.startOf(a).diff(e.startOf(a),a).get(a):t.diff(e,a).get(a);if(n.unit)return o(i(n.unit),n.unit);for(const a of n.units){const s=i(a);if(Math.abs(s)>=1)return o(s,a)}return o(e>t?-0:0,n.units[n.units.length-1])}function RK(e){let t={},n;return e.length>0&&typeof e[e.length-1]=="object"?(t=e[e.length-1],n=Array.from(e).slice(0,e.length-1)):n=Array.from(e),[t,n]}let mT,yT={};class vt{constructor(t){const n=t.zone||Qr.defaultZone;let r=t.invalid||(Number.isNaN(t.ts)?new yc("invalid input"):null)||(n.isValid?null:Qw(n));this.ts=on(t.ts)?Qr.now():t.ts;let o=null,i=null;if(!r)if(t.old&&t.old.ts===this.ts&&t.old.zone.equals(n))[o,i]=[t.old.c,t.old.o];else{const s=Xf(t.o)&&!t.old?t.o:n.offset(this.ts);o=EP(this.ts,s),r=Number.isNaN(o.year)?new yc("invalid input"):null,o=r?null:o,i=r?null:s}this._zone=n,this.loc=t.loc||lr.create(),this.invalid=r,this.weekData=null,this.localWeekData=null,this.c=o,this.o=i,this.isLuxonDateTime=!0}static now(){return new vt({})}static local(){const[t,n]=RK(arguments),[r,o,i,a,s,l,c]=n;return kK({year:r,month:o,day:i,hour:a,minute:s,second:l,millisecond:c},t)}static utc(){const[t,n]=RK(arguments),[r,o,i,a,s,l,c]=n;return t.zone=oa.utcInstance,kK({year:r,month:o,day:i,hour:a,minute:s,second:l,millisecond:c},t)}static fromJSDate(t,n={}){const r=Zmt(t)?t.valueOf():NaN;if(Number.isNaN(r))return vt.invalid("invalid input");const o=wf(n.zone,Qr.defaultZone);return o.isValid?new vt({ts:r,zone:o,loc:lr.fromObject(n)}):vt.invalid(Qw(o))}static fromMillis(t,n={}){if(Xf(t))return t<-TK||t>TK?vt.invalid("Timestamp out of range"):new vt({ts:t,zone:wf(n.zone,Qr.defaultZone),loc:lr.fromObject(n)});throw new ki(`fromMillis requires a numerical input, but received a ${typeof t} with value ${t}`)}static fromSeconds(t,n={}){if(Xf(t))return new vt({ts:t*1e3,zone:wf(n.zone,Qr.defaultZone),loc:lr.fromObject(n)});throw new ki("fromSeconds requires a numerical input")}static fromObject(t,n={}){t=t||{};const r=wf(n.zone,Qr.defaultZone);if(!r.isValid)return vt.invalid(Qw(r));const o=lr.fromObject(n),i=MO(t,AK),{minDaysInFirstWeek:a,startOfWeek:s}=mK(i,o),l=Qr.now(),c=on(n.specificOffset)?r.offset(l):n.specificOffset,u=!on(i.ordinal),d=!on(i.year),f=!on(i.month)||!on(i.day),p=d||f,h=i.weekYear||i.weekNumber;if((p||u)&&h)throw new Py("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(f&&u)throw new Py("Can't mix ordinal dates with month/day");const m=h||i.weekday&&!p;let y,w,x=EP(l,c);m?(y=wvt,w=vvt,x=AO(x,a,s)):u?(y=xvt,w=bvt,x=JD(x)):(y=nue,w=tue);let S=!1;for(const O of y){const $=i[O];on($)?S?i[O]=w[O]:i[O]=x[O]:S=!0}const E=m?Qmt(i,a,s):u?Xmt(i):Ice(i),P=E||Oce(i);if(P)return vt.invalid(P);const T=m?hK(i,a,s):u?gK(i):i,[I,A]=gT(T,c,r),k=new vt({ts:I,zone:r,o:A,loc:o});return i.weekday&&p&&t.weekday!==k.weekday?vt.invalid("mismatched weekday",`you can't specify both a weekday of ${i.weekday} and a date of ${k.toISO()}`):k.isValid?k:vt.invalid(k.invalid)}static fromISO(t,n={}){const[r,o]=Vyt(t);return jm(r,o,n,"ISO 8601",t)}static fromRFC2822(t,n={}){const[r,o]=Hyt(t);return jm(r,o,n,"RFC 2822",t)}static fromHTTP(t,n={}){const[r,o]=Uyt(t);return jm(r,o,n,"HTTP",n)}static fromFormat(t,n,r={}){if(on(t)||on(n))throw new ki("fromFormat requires an input string and a format");const{locale:o=null,numberingSystem:i=null}=r,a=lr.fromOpts({locale:o,numberingSystem:i,defaultToEN:!0}),[s,l,c,u]=yvt(a,t,n);return u?vt.invalid(u):jm(s,l,r,`format ${n}`,t,c)}static fromString(t,n,r={}){return vt.fromFormat(t,n,r)}static fromSQL(t,n={}){const[r,o]=Xyt(t);return jm(r,o,n,"SQL",t)}static invalid(t,n=null){if(!t)throw new ki("need to specify a reason the DateTime is invalid");const r=t instanceof yc?t:new yc(t,n);if(Qr.throwOnInvalid)throw new Cmt(r);return new vt({invalid:r})}static isDateTime(t){return t&&t.isLuxonDateTime||!1}static parseFormatForOpts(t,n={}){const r=Zce(t,lr.fromObject(n));return r?r.map(o=>o?o.val:null).join(""):null}static expandFormat(t,n={}){return Qce(gc.parseFormat(t),lr.fromObject(n)).map(o=>o.val).join("")}static resetCache(){mT=void 0,yT={}}get(t){return this[t]}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?t_(this).weekYear:NaN}get weekNumber(){return this.isValid?t_(this).weekNumber:NaN}get weekday(){return this.isValid?t_(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?n_(this).weekday:NaN}get localWeekNumber(){return this.isValid?n_(this).weekNumber:NaN}get localWeekYear(){return this.isValid?n_(this).weekYear:NaN}get ordinal(){return this.isValid?JD(this.c).ordinal:NaN}get monthShort(){return this.isValid?Yw.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?Yw.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?Yw.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?Yw.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return this.isOffsetFixed?!1:this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset}getPossibleOffsets(){if(!this.isValid||this.isOffsetFixed)return[this];const t=864e5,n=6e4,r=TM(this.c),o=this.zone.offset(r-t),i=this.zone.offset(r+t),a=this.zone.offset(r-o*n),s=this.zone.offset(r-i*n);if(a===s)return[this];const l=r-a*n,c=r-s*n,u=EP(l,a),d=EP(c,s);return u.hour===d.hour&&u.minute===d.minute&&u.second===d.second&&u.millisecond===d.millisecond?[hh(this,{ts:l}),hh(this,{ts:c})]:[this]}get isInLeapYear(){return g1(this.year)}get daysInMonth(){return kO(this.year,this.month)}get daysInYear(){return this.isValid?Yy(this.year):NaN}get weeksInWeekYear(){return this.isValid?KS(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?KS(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(t={}){const{locale:n,numberingSystem:r,calendar:o}=gc.create(this.loc.clone(t),t).resolvedOptions(this);return{locale:n,numberingSystem:r,outputCalendar:o}}toUTC(t=0,n={}){return this.setZone(oa.instance(t),n)}toLocal(){return this.setZone(Qr.defaultZone)}setZone(t,{keepLocalTime:n=!1,keepCalendarTime:r=!1}={}){if(t=wf(t,Qr.defaultZone),t.equals(this.zone))return this;if(t.isValid){let o=this.ts;if(n||r){const i=t.offset(this.ts),a=this.toObject();[o]=gT(a,i,t)}return hh(this,{ts:o,zone:t})}else return vt.invalid(Qw(t))}reconfigure({locale:t,numberingSystem:n,outputCalendar:r}={}){const o=this.loc.clone({locale:t,numberingSystem:n,outputCalendar:r});return hh(this,{loc:o})}setLocale(t){return this.reconfigure({locale:t})}set(t){if(!this.isValid)return this;const n=MO(t,AK),{minDaysInFirstWeek:r,startOfWeek:o}=mK(n,this.loc),i=!on(n.weekYear)||!on(n.weekNumber)||!on(n.weekday),a=!on(n.ordinal),s=!on(n.year),l=!on(n.month)||!on(n.day),c=s||l,u=n.weekYear||n.weekNumber;if((c||a)&&u)throw new Py("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(l&&a)throw new Py("Can't mix ordinal dates with month/day");let d;i?d=hK({...AO(this.c,r,o),...n},r,o):on(n.ordinal)?(d={...this.toObject(),...n},on(n.day)&&(d.day=Math.min(kO(d.year,d.month),d.day))):d=gK({...JD(this.c),...n});const[f,p]=gT(d,this.o,this.zone);return hh(this,{ts:f,o:p})}plus(t){if(!this.isValid)return this;const n=Vn.fromDurationLike(t);return hh(this,IK(this,n))}minus(t){if(!this.isValid)return this;const n=Vn.fromDurationLike(t).negate();return hh(this,IK(this,n))}startOf(t,{useLocaleWeeks:n=!1}={}){if(!this.isValid)return this;const r={},o=Vn.normalizeUnit(t);switch(o){case"years":r.month=1;case"quarters":case"months":r.day=1;case"weeks":case"days":r.hour=0;case"hours":r.minute=0;case"minutes":r.second=0;case"seconds":r.millisecond=0;break}if(o==="weeks")if(n){const i=this.loc.getStartOfWeek(),{weekday:a}=this;athis.valueOf(),s=a?this:t,l=a?t:this,c=ovt(s,l,i,o);return a?c.negate():c}diffNow(t="milliseconds",n={}){return this.diff(vt.now(),t,n)}until(t){return this.isValid?uo.fromDateTimes(this,t):this}hasSame(t,n,r){if(!this.isValid)return!1;const o=t.valueOf(),i=this.setZone(t.zone,{keepLocalTime:!0});return i.startOf(n,r)<=o&&o<=i.endOf(n,r)}equals(t){return this.isValid&&t.isValid&&this.valueOf()===t.valueOf()&&this.zone.equals(t.zone)&&this.loc.equals(t.loc)}toRelative(t={}){if(!this.isValid)return null;const n=t.base||vt.fromObject({},{zone:this.zone}),r=t.padding?thisn.valueOf(),Math.min)}static max(...t){if(!t.every(vt.isDateTime))throw new ki("max requires all arguments be DateTimes");return yK(t,n=>n.valueOf(),Math.max)}static fromFormatExplain(t,n,r={}){const{locale:o=null,numberingSystem:i=null}=r,a=lr.fromOpts({locale:o,numberingSystem:i,defaultToEN:!0});return Jce(a,t,n)}static fromStringExplain(t,n,r={}){return vt.fromFormatExplain(t,n,r)}static buildFormatParser(t,n={}){const{locale:r=null,numberingSystem:o=null}=n,i=lr.fromOpts({locale:r,numberingSystem:o,defaultToEN:!0});return new Xce(i,t)}static fromFormatParser(t,n,r={}){if(on(t)||on(n))throw new ki("fromFormatParser requires an input string and a format parser");const{locale:o=null,numberingSystem:i=null}=r,a=lr.fromOpts({locale:o,numberingSystem:i,defaultToEN:!0});if(!a.equals(n.locale))throw new ki(`fromFormatParser called with a locale of ${a}, but the format parser was created for ${n.locale}`);const{result:s,zone:l,specificOffset:c,invalidReason:u}=n.explainFromTokens(t);return u?vt.invalid(u):jm(s,l,r,`format ${n.format}`,t,c)}static get DATE_SHORT(){return OO}static get DATE_MED(){return oce}static get DATE_MED_WITH_WEEKDAY(){return Tmt}static get DATE_FULL(){return ice}static get DATE_HUGE(){return ace}static get TIME_SIMPLE(){return sce}static get TIME_WITH_SECONDS(){return lce}static get TIME_WITH_SHORT_OFFSET(){return cce}static get TIME_WITH_LONG_OFFSET(){return uce}static get TIME_24_SIMPLE(){return dce}static get TIME_24_WITH_SECONDS(){return fce}static get TIME_24_WITH_SHORT_OFFSET(){return pce}static get TIME_24_WITH_LONG_OFFSET(){return hce}static get DATETIME_SHORT(){return gce}static get DATETIME_SHORT_WITH_SECONDS(){return mce}static get DATETIME_MED(){return yce}static get DATETIME_MED_WITH_SECONDS(){return vce}static get DATETIME_MED_WITH_WEEKDAY(){return Imt}static get DATETIME_FULL(){return bce}static get DATETIME_FULL_WITH_SECONDS(){return wce}static get DATETIME_HUGE(){return xce}static get DATETIME_HUGE_WITH_SECONDS(){return Sce}}function xw(e){if(vt.isDateTime(e))return e;if(e&&e.valueOf&&Xf(e.valueOf()))return vt.fromJSDate(e);if(e&&typeof e=="object")return vt.fromObject(e);throw new ki(`Unknown datetime argument: ${e}, of type ${typeof e}`)}const Evt={y:{sectionType:"year",contentType:"digit",maxLength:4},yy:"year",yyyy:{sectionType:"year",contentType:"digit",maxLength:4},L:{sectionType:"month",contentType:"digit",maxLength:2},LL:"month",LLL:{sectionType:"month",contentType:"letter"},LLLL:{sectionType:"month",contentType:"letter"},M:{sectionType:"month",contentType:"digit",maxLength:2},MM:"month",MMM:{sectionType:"month",contentType:"letter"},MMMM:{sectionType:"month",contentType:"letter"},d:{sectionType:"day",contentType:"digit",maxLength:2},dd:"day",c:{sectionType:"weekDay",contentType:"digit",maxLength:1},ccc:{sectionType:"weekDay",contentType:"letter"},cccc:{sectionType:"weekDay",contentType:"letter"},E:{sectionType:"weekDay",contentType:"digit",maxLength:2},EEE:{sectionType:"weekDay",contentType:"letter"},EEEE:{sectionType:"weekDay",contentType:"letter"},a:"meridiem",H:{sectionType:"hours",contentType:"digit",maxLength:2},HH:"hours",h:{sectionType:"hours",contentType:"digit",maxLength:2},hh:"hours",m:{sectionType:"minutes",contentType:"digit",maxLength:2},mm:"minutes",s:{sectionType:"seconds",contentType:"digit",maxLength:2},ss:"seconds"},Pvt={year:"yyyy",month:"LLLL",monthShort:"MMM",dayOfMonth:"d",dayOfMonthFull:"d",weekday:"cccc",weekdayShort:"ccccc",hours24h:"HH",hours12h:"hh",meridiem:"a",minutes:"mm",seconds:"ss",fullDate:"DD",keyboardDate:"D",shortDate:"MMM d",normalDate:"d MMMM",normalDateWithWeekday:"EEE, MMM d",fullTime:"t",fullTime12h:"hh:mm a",fullTime24h:"HH:mm",keyboardDateTime:"D t",keyboardDateTime12h:"D hh:mm a",keyboardDateTime24h:"D T"};class ub{constructor({locale:t,formats:n}={}){this.isMUIAdapter=!0,this.isTimezoneCompatible=!0,this.lib="luxon",this.locale=void 0,this.formats=void 0,this.escapedCharacters={start:"'",end:"'"},this.formatTokenMap=Evt,this.setLocaleToValue=r=>{const o=this.getCurrentLocaleCode();return o===r.locale?r:r.setLocale(o)},this.date=(r,o="default")=>r===null?null:typeof r>"u"?vt.fromJSDate(new Date,{locale:this.locale,zone:o}):vt.fromISO(r,{locale:this.locale,zone:o}),this.getInvalidDate=()=>vt.fromJSDate(new Date("Invalid Date")),this.getTimezone=r=>r.zone.type==="system"?"system":r.zoneName,this.setTimezone=(r,o)=>r.zone.equals(Yw.normalizeZone(o))?r:r.setZone(o),this.toJsDate=r=>r.toJSDate(),this.parse=(r,o)=>r===""?null:vt.fromFormat(r,o,{locale:this.locale}),this.getCurrentLocaleCode=()=>this.locale,this.is12HourCycleInCurrentLocale=()=>{var r,o;return typeof Intl>"u"||typeof Intl.DateTimeFormat>"u"?!0:!!((o=(r=new Intl.DateTimeFormat(this.locale,{hour:"numeric"}))==null?void 0:r.resolvedOptions())!=null&&o.hour12)},this.expandFormat=r=>{const o=/''|'(''|[^'])+('|$)|[^']*/g,i=[...Object.keys(this.formatTokenMap),"yyyyy"],a=new RegExp(`^(${i.join("|")})+$`),s=/(?:^|[^a-z])([a-z]+)(?:[^a-z]|$)|([a-z]+)/gi;return r.match(o).map(l=>l[0]==="'"?l:vt.expandFormat(l,{locale:this.locale}).replace(s,(d,f,p)=>{const h=f||p;return a.test(h)?d:`'${d}'`})).join("").replace("yyyyy","yyyy")},this.isValid=r=>r===null?!1:r.isValid,this.format=(r,o)=>this.formatByString(r,this.formats[o]),this.formatByString=(r,o)=>r.setLocale(this.locale).toFormat(o),this.formatNumber=r=>r,this.isEqual=(r,o)=>r===null&&o===null?!0:r===null||o===null?!1:+r==+o,this.isSameYear=(r,o)=>{const i=this.setTimezone(o,this.getTimezone(r));return r.hasSame(i,"year")},this.isSameMonth=(r,o)=>{const i=this.setTimezone(o,this.getTimezone(r));return r.hasSame(i,"month")},this.isSameDay=(r,o)=>{const i=this.setTimezone(o,this.getTimezone(r));return r.hasSame(i,"day")},this.isSameHour=(r,o)=>{const i=this.setTimezone(o,this.getTimezone(r));return r.hasSame(i,"hour")},this.isAfter=(r,o)=>r>o,this.isAfterYear=(r,o)=>{const i=this.setTimezone(o,this.getTimezone(r));return r.diff(this.endOfYear(i),"years").toObject().years>0},this.isAfterDay=(r,o)=>{const i=this.setTimezone(o,this.getTimezone(r));return r.diff(this.endOfDay(i),"days").toObject().days>0},this.isBefore=(r,o)=>r{const i=this.setTimezone(o,this.getTimezone(r));return r.diff(this.startOfYear(i),"years").toObject().years<0},this.isBeforeDay=(r,o)=>{const i=this.setTimezone(o,this.getTimezone(r));return r.diff(this.startOfDay(i),"days").toObject().days<0},this.isWithinRange=(r,[o,i])=>this.isEqual(r,o)||this.isEqual(r,i)||this.isAfter(r,o)&&this.isBefore(r,i),this.startOfYear=r=>r.startOf("year"),this.startOfMonth=r=>r.startOf("month"),this.startOfWeek=r=>this.setLocaleToValue(r).startOf("week",{useLocaleWeeks:!0}),this.startOfDay=r=>r.startOf("day"),this.endOfYear=r=>r.endOf("year"),this.endOfMonth=r=>r.endOf("month"),this.endOfWeek=r=>this.setLocaleToValue(r).endOf("week",{useLocaleWeeks:!0}),this.endOfDay=r=>r.endOf("day"),this.addYears=(r,o)=>r.plus({years:o}),this.addMonths=(r,o)=>r.plus({months:o}),this.addWeeks=(r,o)=>r.plus({weeks:o}),this.addDays=(r,o)=>r.plus({days:o}),this.addHours=(r,o)=>r.plus({hours:o}),this.addMinutes=(r,o)=>r.plus({minutes:o}),this.addSeconds=(r,o)=>r.plus({seconds:o}),this.getYear=r=>r.get("year"),this.getMonth=r=>r.get("month")-1,this.getDate=r=>r.get("day"),this.getHours=r=>r.get("hour"),this.getMinutes=r=>r.get("minute"),this.getSeconds=r=>r.get("second"),this.getMilliseconds=r=>r.get("millisecond"),this.setYear=(r,o)=>r.set({year:o}),this.setMonth=(r,o)=>r.set({month:o+1}),this.setDate=(r,o)=>r.set({day:o}),this.setHours=(r,o)=>r.set({hour:o}),this.setMinutes=(r,o)=>r.set({minute:o}),this.setSeconds=(r,o)=>r.set({second:o}),this.setMilliseconds=(r,o)=>r.set({millisecond:o}),this.getDaysInMonth=r=>r.daysInMonth,this.getWeekArray=r=>{const o=this.startOfWeek(this.startOfMonth(r)),i=this.endOfWeek(this.endOfMonth(r)),{days:a}=i.diff(o,"days").toObject(),s=[];return new Array(Math.round(a)).fill(0).map((l,c)=>c).map(l=>o.plus({days:l})).forEach((l,c)=>{if(c===0||c%7===0&&c>6){s.push([l]);return}s[s.length-1].push(l)}),s},this.getWeekNumber=r=>r.localWeekNumber??r.weekNumber,this.getDayOfWeek=r=>r.weekday,this.getYearRange=([r,o])=>{const i=this.startOfYear(r),a=this.endOfYear(o),s=[];let l=i;for(;this.isBefore(l,a);)s.push(l),l=this.addYears(l,1);return s},this.locale=t||"en-US",this.formats=ue({},Pvt,n)}}const l5=ct(R.jsx("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14"}),"Search");function c5({callback:e,initialIngredient:t}){const n=t?{value:t,data:{id:-1,name:t,image:null,image_thumbnail:null}}:null,[r,o]=v.useState(!0),[i,a]=v.useState(n),[s,l]=v.useState(""),[c,u]=v.useState([]),[d,f]=Le(),p=v.useMemo(()=>Gk(h=>Tje(h,f.language,r).then(m=>u(m)),200),[f.language,r]);return v.useEffect(()=>{if(s===""){u(i?[i]:[]);return}return p(s),()=>{}},[i,s,p]),G(Wt,{children:[b(Oc,{id:"ingredient-autocomplete",getOptionLabel:h=>h.value,"data-testid":"autocomplete",filterOptions:h=>h,options:c,autoComplete:!0,includeInputInList:!0,filterSelectedOptions:!0,value:i,noOptionsText:d("noResults"),isOptionEqualToValue:(h,m)=>h.value===m.value,onChange:(h,m)=>{u(m?[m,...c]:c),a(m),e(m)},onInputChange:(h,m)=>{l(m)},renderInput:h=>b(nn,{...h,label:d("nutrition.searchIngredientName"),fullWidth:!0,InputProps:{...h.InputProps,startAdornment:G(wt,{children:[b(Co,{position:"start",children:b(l5,{})}),h.InputProps.startAdornment]})}}),renderOption:(h,m)=>hZ("li",{...h,key:`ingredient-${m.data.id}`},G(Os,{disablePadding:!0,component:"div",children:[b(sa,{children:b(Ac,{alt:"",src:`${mz}${m.data.image}`,variant:"rounded",children:b(Rd,{})})}),b(ko,{primary:m.value,primaryTypographyProps:{style:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}}})]}))}),f.language!==kv&&b(yk,{children:b(Mc,{control:b(La,{checked:r,onChange:(h,m)=>o(m)}),label:d("alsoSearchEnglish")})})]})}var Tvt=function(t){return Ivt(t)&&!Ovt(t)};function Ivt(e){return!!e&&typeof e=="object"}function Ovt(e){var t=Object.prototype.toString.call(e);return t==="[object RegExp]"||t==="[object Date]"||Mvt(e)}var Avt=typeof Symbol=="function"&&Symbol.for,kvt=Avt?Symbol.for("react.element"):60103;function Mvt(e){return e.$$typeof===kvt}function Rvt(e){return Array.isArray(e)?[]:{}}function RO(e,t){return t.clone!==!1&&t.isMergeableObject(e)?YS(Rvt(e),e,t):e}function $vt(e,t,n){return e.concat(t).map(function(r){return RO(r,n)})}function Dvt(e,t,n){var r={};return n.isMergeableObject(e)&&Object.keys(e).forEach(function(o){r[o]=RO(e[o],n)}),Object.keys(t).forEach(function(o){!n.isMergeableObject(t[o])||!e[o]?r[o]=RO(t[o],n):r[o]=YS(e[o],t[o],n)}),r}function YS(e,t,n){n=n||{},n.arrayMerge=n.arrayMerge||$vt,n.isMergeableObject=n.isMergeableObject||Tvt;var r=Array.isArray(t),o=Array.isArray(e),i=r===o;return i?r?n.arrayMerge(e,t,n):Dvt(e,t,n):RO(t,n)}YS.all=function(t,n){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(r,o){return YS(r,o,n)},{})};var CF=YS,rue=typeof global=="object"&&global&&global.Object===Object&&global,_vt=typeof self=="object"&&self&&self.Object===Object&&self,Ou=rue||_vt||Function("return this")(),hp=Ou.Symbol,oue=Object.prototype,Nvt=oue.hasOwnProperty,Lvt=oue.toString,Sw=hp?hp.toStringTag:void 0;function Fvt(e){var t=Nvt.call(e,Sw),n=e[Sw];try{e[Sw]=void 0;var r=!0}catch{}var o=Lvt.call(e);return r&&(t?e[Sw]=n:delete e[Sw]),o}var jvt=Object.prototype,Bvt=jvt.toString;function zvt(e){return Bvt.call(e)}var Vvt="[object Null]",Hvt="[object Undefined]",$K=hp?hp.toStringTag:void 0;function Gg(e){return e==null?e===void 0?Hvt:Vvt:$K&&$K in Object(e)?Fvt(e):zvt(e)}function iue(e,t){return function(n){return e(t(n))}}var u5=iue(Object.getPrototypeOf,Object);function qg(e){return e!=null&&typeof e=="object"}var Uvt="[object Object]",Wvt=Function.prototype,Gvt=Object.prototype,aue=Wvt.toString,qvt=Gvt.hasOwnProperty,Kvt=aue.call(Object);function DK(e){if(!qg(e)||Gg(e)!=Uvt)return!1;var t=u5(e);if(t===null)return!0;var n=qvt.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&aue.call(n)==Kvt}function Yvt(){this.__data__=[],this.size=0}function sue(e,t){return e===t||e!==e&&t!==t}function AM(e,t){for(var n=e.length;n--;)if(sue(e[n][0],t))return n;return-1}var Qvt=Array.prototype,Xvt=Qvt.splice;function Jvt(e){var t=this.__data__,n=AM(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():Xvt.call(t,n,1),--this.size,!0}function Zvt(e){var t=this.__data__,n=AM(t,e);return n<0?void 0:t[n][1]}function ebt(e){return AM(this.__data__,e)>-1}function tbt(e,t){var n=this.__data__,r=AM(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function Nd(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t-1&&e%1==0&&e-1&&e%1==0&&e<=t0t}var n0t="[object Arguments]",r0t="[object Array]",o0t="[object Boolean]",i0t="[object Date]",a0t="[object Error]",s0t="[object Function]",l0t="[object Map]",c0t="[object Number]",u0t="[object Object]",d0t="[object RegExp]",f0t="[object Set]",p0t="[object String]",h0t="[object WeakMap]",g0t="[object ArrayBuffer]",m0t="[object DataView]",y0t="[object Float32Array]",v0t="[object Float64Array]",b0t="[object Int8Array]",w0t="[object Int16Array]",x0t="[object Int32Array]",S0t="[object Uint8Array]",C0t="[object Uint8ClampedArray]",E0t="[object Uint16Array]",P0t="[object Uint32Array]",Lr={};Lr[y0t]=Lr[v0t]=Lr[b0t]=Lr[w0t]=Lr[x0t]=Lr[S0t]=Lr[C0t]=Lr[E0t]=Lr[P0t]=!0;Lr[n0t]=Lr[r0t]=Lr[g0t]=Lr[o0t]=Lr[m0t]=Lr[i0t]=Lr[a0t]=Lr[s0t]=Lr[l0t]=Lr[c0t]=Lr[u0t]=Lr[d0t]=Lr[f0t]=Lr[p0t]=Lr[h0t]=!1;function T0t(e){return qg(e)&&hue(e.length)&&!!Lr[Gg(e)]}function d5(e){return function(t){return e(t)}}var gue=typeof ps=="object"&&ps&&!ps.nodeType&&ps,Ox=gue&&typeof hs=="object"&&hs&&!hs.nodeType&&hs,I0t=Ox&&Ox.exports===gue,i_=I0t&&rue.process,db=function(){try{var e=Ox&&Ox.require&&Ox.require("util").types;return e||i_&&i_.binding&&i_.binding("util")}catch{}}(),BK=db&&db.isTypedArray,O0t=BK?d5(BK):T0t,A0t=Object.prototype,k0t=A0t.hasOwnProperty;function mue(e,t){var n=b1(e),r=!n&&Kbt(e),o=!n&&!r&&pue(e),i=!n&&!r&&!o&&O0t(e),a=n||r||o||i,s=a?Ubt(e.length,String):[],l=s.length;for(var c in e)(t||k0t.call(e,c))&&!(a&&(c=="length"||o&&(c=="offset"||c=="parent")||i&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||e0t(c,l)))&&s.push(c);return s}var M0t=Object.prototype;function f5(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||M0t;return e===n}var R0t=iue(Object.keys,Object),$0t=Object.prototype,D0t=$0t.hasOwnProperty;function _0t(e){if(!f5(e))return R0t(e);var t=[];for(var n in Object(e))D0t.call(e,n)&&n!="constructor"&&t.push(n);return t}function yue(e){return e!=null&&hue(e.length)&&!lue(e)}function p5(e){return yue(e)?mue(e):_0t(e)}function N0t(e,t){return e&&MM(t,p5(t),e)}function L0t(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var F0t=Object.prototype,j0t=F0t.hasOwnProperty;function B0t(e){if(!v1(e))return L0t(e);var t=f5(e),n=[];for(var r in e)r=="constructor"&&(t||!j0t.call(e,r))||n.push(r);return n}function h5(e){return yue(e)?mue(e,!0):B0t(e)}function z0t(e,t){return e&&MM(t,h5(t),e)}var vue=typeof ps=="object"&&ps&&!ps.nodeType&&ps,zK=vue&&typeof hs=="object"&&hs&&!hs.nodeType&&hs,V0t=zK&&zK.exports===vue,VK=V0t?Ou.Buffer:void 0,HK=VK?VK.allocUnsafe:void 0;function H0t(e,t){if(t)return e.slice();var n=e.length,r=HK?HK(n):new e.constructor(n);return e.copy(r),r}function bue(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n=0)&&(n[o]=e[o]);return n}var RM=v.createContext(void 0);RM.displayName="FormikContext";var Axt=RM.Provider;RM.Consumer;function Mue(){var e=v.useContext(RM);return e}var nl=function(t){return typeof t=="function"},w1=function(t){return t!==null&&typeof t=="object"},kxt=function(t){return String(Math.floor(Number(t)))===t},a_=function(t){return Object.prototype.toString.call(t)==="[object String]"},Mxt=function(t){return v.Children.count(t)===0},s_=function(t){return w1(t)&&nl(t.then)};function Ja(e,t,n,r){r===void 0&&(r=0);for(var o=Aue(t);e&&r=0?[]:{}}}return(i===0?e:o)[a[i]]===n?e:(n===void 0?delete o[a[i]]:o[a[i]]=n,i===0&&n===void 0&&delete r[a[i]],r)}function Rue(e,t,n,r){n===void 0&&(n=new WeakMap),r===void 0&&(r={});for(var o=0,i=Object.keys(e);o0?Pe.map(function(Me){return O(Me,Ja(ye,Me))}):[Promise.resolve("DO_NOT_DELETE_YOU_WILL_BE_FIRED")];return Promise.all(Ae).then(function(Me){return Me.reduce(function(We,He,Xe){return He==="DO_NOT_DELETE_YOU_WILL_BE_FIRED"||He&&(We=og(We,Pe[Xe],He)),We},{})})},[O]),N=v.useCallback(function(ye){return Promise.all([$(ye),f.validationSchema?k(ye):{},f.validate?A(ye):{}]).then(function(Pe){var Ae=Pe[0],Me=Pe[1],We=Pe[2],He=CF.all([Ae,Me,We],{arrayMerge:Nxt});return He})},[f.validate,f.validationSchema,$,A,k]),L=Zs(function(ye){return ye===void 0&&(ye=T.values),I({type:"SET_ISVALIDATING",payload:!0}),N(ye).then(function(Pe){return w.current&&(I({type:"SET_ISVALIDATING",payload:!1}),I({type:"SET_ERRORS",payload:Pe})),Pe})});v.useEffect(function(){a&&w.current===!0&&Th(p.current,f.initialValues)&&L(p.current)},[a,L]);var j=v.useCallback(function(ye){var Pe=ye&&ye.values?ye.values:p.current,Ae=ye&&ye.errors?ye.errors:h.current?h.current:f.initialErrors||{},Me=ye&&ye.touched?ye.touched:m.current?m.current:f.initialTouched||{},We=ye&&ye.status?ye.status:y.current?y.current:f.initialStatus;p.current=Pe,h.current=Ae,m.current=Me,y.current=We;var He=function(){I({type:"RESET_FORM",payload:{isSubmitting:!!ye&&!!ye.isSubmitting,errors:Ae,touched:Me,status:We,values:Pe,isValidating:!!ye&&!!ye.isValidating,submitCount:ye&&ye.submitCount&&typeof ye.submitCount=="number"?ye.submitCount:0}})};if(f.onReset){var Xe=f.onReset(T.values,ce);s_(Xe)?Xe.then(He):He()}else He()},[f.initialErrors,f.initialStatus,f.initialTouched,f.onReset]);v.useEffect(function(){w.current===!0&&!Th(p.current,f.initialValues)&&c&&(p.current=f.initialValues,j(),a&&L(p.current))},[c,f.initialValues,j,a,L]),v.useEffect(function(){c&&w.current===!0&&!Th(h.current,f.initialErrors)&&(h.current=f.initialErrors||gh,I({type:"SET_ERRORS",payload:f.initialErrors||gh}))},[c,f.initialErrors]),v.useEffect(function(){c&&w.current===!0&&!Th(m.current,f.initialTouched)&&(m.current=f.initialTouched||IP,I({type:"SET_TOUCHED",payload:f.initialTouched||IP}))},[c,f.initialTouched]),v.useEffect(function(){c&&w.current===!0&&!Th(y.current,f.initialStatus)&&(y.current=f.initialStatus,I({type:"SET_STATUS",payload:f.initialStatus}))},[c,f.initialStatus,f.initialTouched]);var D=Zs(function(ye){if(x.current[ye]&&nl(x.current[ye].validate)){var Pe=Ja(T.values,ye),Ae=x.current[ye].validate(Pe);return s_(Ae)?(I({type:"SET_ISVALIDATING",payload:!0}),Ae.then(function(Me){return Me}).then(function(Me){I({type:"SET_FIELD_ERROR",payload:{field:ye,value:Me}}),I({type:"SET_ISVALIDATING",payload:!1})})):(I({type:"SET_FIELD_ERROR",payload:{field:ye,value:Ae}}),Promise.resolve(Ae))}else if(f.validationSchema)return I({type:"SET_ISVALIDATING",payload:!0}),k(T.values,ye).then(function(Me){return Me}).then(function(Me){I({type:"SET_FIELD_ERROR",payload:{field:ye,value:Ja(Me,ye)}}),I({type:"SET_ISVALIDATING",payload:!1})});return Promise.resolve()}),_=v.useCallback(function(ye,Pe){var Ae=Pe.validate;x.current[ye]={validate:Ae}},[]),z=v.useCallback(function(ye){delete x.current[ye]},[]),F=Zs(function(ye,Pe){I({type:"SET_TOUCHED",payload:ye});var Ae=Pe===void 0?o:Pe;return Ae?L(T.values):Promise.resolve()}),V=v.useCallback(function(ye){I({type:"SET_ERRORS",payload:ye})},[]),U=Zs(function(ye,Pe){var Ae=nl(ye)?ye(T.values):ye;I({type:"SET_VALUES",payload:Ae});var Me=Pe===void 0?n:Pe;return Me?L(Ae):Promise.resolve()}),K=v.useCallback(function(ye,Pe){I({type:"SET_FIELD_ERROR",payload:{field:ye,value:Pe}})},[]),X=Zs(function(ye,Pe,Ae){I({type:"SET_FIELD_VALUE",payload:{field:ye,value:Pe}});var Me=Ae===void 0?n:Ae;return Me?L(og(T.values,ye,Pe)):Promise.resolve()}),ie=v.useCallback(function(ye,Pe){var Ae=Pe,Me=ye,We;if(!a_(ye)){ye.persist&&ye.persist();var He=ye.target?ye.target:ye.currentTarget,Xe=He.type,gt=He.name,st=He.id,et=He.value,Et=He.checked,An=He.outerHTML,Ke=He.options,$e=He.multiple;Ae=Pe||gt||st,Me=/number|range/.test(Xe)?(We=parseFloat(et),isNaN(We)?"":We):/checkbox/.test(Xe)?Fxt(Ja(T.values,Ae),Et,et):Ke&&$e?Lxt(Ke):et}Ae&&X(Ae,Me)},[X,T.values]),ee=Zs(function(ye){if(a_(ye))return function(Pe){return ie(Pe,ye)};ie(ye)}),Q=Zs(function(ye,Pe,Ae){Pe===void 0&&(Pe=!0),I({type:"SET_FIELD_TOUCHED",payload:{field:ye,value:Pe}});var Me=Ae===void 0?o:Ae;return Me?L(T.values):Promise.resolve()}),te=v.useCallback(function(ye,Pe){ye.persist&&ye.persist();var Ae=ye.target,Me=Ae.name,We=Ae.id,He=Ae.outerHTML,Xe=Pe||Me||We;Q(Xe,!0)},[Q]),pe=Zs(function(ye){if(a_(ye))return function(Pe){return te(Pe,ye)};te(ye)}),ae=v.useCallback(function(ye){nl(ye)?I({type:"SET_FORMIK_STATE",payload:ye}):I({type:"SET_FORMIK_STATE",payload:function(){return ye}})},[]),se=v.useCallback(function(ye){I({type:"SET_STATUS",payload:ye})},[]),oe=v.useCallback(function(ye){I({type:"SET_ISSUBMITTING",payload:ye})},[]),fe=Zs(function(){return I({type:"SUBMIT_ATTEMPT"}),L().then(function(ye){var Pe=ye instanceof Error,Ae=!Pe&&Object.keys(ye).length===0;if(Ae){var Me;try{if(Me=ge(),Me===void 0)return}catch(We){throw We}return Promise.resolve(Me).then(function(We){return w.current&&I({type:"SUBMIT_SUCCESS"}),We}).catch(function(We){if(w.current)throw I({type:"SUBMIT_FAILURE"}),We})}else if(w.current&&(I({type:"SUBMIT_FAILURE"}),Pe))throw ye})}),Z=Zs(function(ye){ye&&ye.preventDefault&&nl(ye.preventDefault)&&ye.preventDefault(),ye&&ye.stopPropagation&&nl(ye.stopPropagation)&&ye.stopPropagation(),fe().catch(function(Pe){console.warn("Warning: An unhandled error was caught from submitForm()",Pe)})}),ce={resetForm:j,validateForm:L,validateField:D,setErrors:V,setFieldError:K,setFieldTouched:Q,setFieldValue:X,setStatus:se,setSubmitting:oe,setTouched:F,setValues:U,setFormikState:ae,submitForm:fe},ge=Zs(function(){return u(T.values,ce)}),we=Zs(function(ye){ye&&ye.preventDefault&&nl(ye.preventDefault)&&ye.preventDefault(),ye&&ye.stopPropagation&&nl(ye.stopPropagation)&&ye.stopPropagation(),j()}),me=v.useCallback(function(ye){return{value:Ja(T.values,ye),error:Ja(T.errors,ye),touched:!!Ja(T.touched,ye),initialValue:Ja(p.current,ye),initialTouched:!!Ja(m.current,ye),initialError:Ja(h.current,ye)}},[T.errors,T.touched,T.values]),Se=v.useCallback(function(ye){return{setValue:function(Ae,Me){return X(ye,Ae,Me)},setTouched:function(Ae,Me){return Q(ye,Ae,Me)},setError:function(Ae){return K(ye,Ae)}}},[X,Q,K]),xe=v.useCallback(function(ye){var Pe=w1(ye),Ae=Pe?ye.name:ye,Me=Ja(T.values,Ae),We={name:Ae,value:Me,onChange:ee,onBlur:pe};if(Pe){var He=ye.type,Xe=ye.value,gt=ye.as,st=ye.multiple;He==="checkbox"?Xe===void 0?We.checked=!!Me:(We.checked=!!(Array.isArray(Me)&&~Me.indexOf(Xe)),We.value=Xe):He==="radio"?(We.checked=Me===Xe,We.value=Xe):gt==="select"&&st&&(We.value=We.value||[],We.multiple=!0)}return We},[pe,ee,T.values]),ke=v.useMemo(function(){return!Th(p.current,T.values)},[p.current,T.values]),De=v.useMemo(function(){return typeof s<"u"?ke?T.errors&&Object.keys(T.errors).length===0:s!==!1&&nl(s)?s(f):s:T.errors&&Object.keys(T.errors).length===0},[s,ke,T.errors,f]),_e=Yo({},T,{initialValues:p.current,initialErrors:h.current,initialTouched:m.current,initialStatus:y.current,handleBlur:pe,handleChange:ee,handleReset:we,handleSubmit:Z,resetForm:j,setErrors:V,setFormikState:ae,setFieldTouched:Q,setFieldValue:X,setFieldError:K,setStatus:se,setSubmitting:oe,setTouched:F,setValues:U,submitForm:fe,validateForm:L,validateField:D,isValid:De,dirty:ke,unregisterField:z,registerField:_,getFieldProps:xe,getFieldMeta:me,getFieldHelpers:Se,validateOnBlur:o,validateOnChange:n,validateOnMount:a});return _e}function Va(e){var t=$xt(e),n=e.component,r=e.children,o=e.render,i=e.innerRef;return v.useImperativeHandle(i,function(){return t}),v.createElement(Axt,{value:t},n?v.createElement(n,t):o?o(t):r?nl(r)?r(t):Mxt(r)?null:v.Children.only(r):null)}function Dxt(e){var t={};if(e.inner){if(e.inner.length===0)return og(t,e.path,e.message);for(var o=e.inner,n=Array.isArray(o),r=0,o=n?o:o[Symbol.iterator]();;){var i;if(n){if(r>=o.length)break;i=o[r++]}else{if(r=o.next(),r.done)break;i=r.value}var a=i;Ja(t,a.path)||(t=og(t,a.path,a.message))}}return t}function _xt(e,t,n,r){n===void 0&&(n=!1);var o=AF(e);return t[n?"validateSync":"validate"](o,{abortEarly:!1,context:o})}function AF(e){var t=Array.isArray(e)?[]:{};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=String(n);Array.isArray(e[r])===!0?t[r]=e[r].map(function(o){return Array.isArray(o)===!0||DK(o)?AF(o):o!==""?o:void 0}):DK(e[r])?t[r]=AF(e[r]):t[r]=e[r]!==""?e[r]:void 0}return t}function Nxt(e,t,n){var r=e.slice();return t.forEach(function(i,a){if(typeof r[a]>"u"){var s=n.clone!==!1,l=s&&n.isMergeableObject(i);r[a]=l?CF(Array.isArray(i)?[]:{},i,n):i}else n.isMergeableObject(i)?r[a]=CF(e[a],i,n):e.indexOf(i)===-1&&r.push(i)}),r}function Lxt(e){return Array.from(e).filter(function(t){return t.selected}).map(function(t){return t.value})}function Fxt(e,t,n){if(typeof e=="boolean")return!!t;var r=[],o=!1,i=-1;if(Array.isArray(e))r=e,i=e.indexOf(n),o=i>=0;else if(!n||n=="true"||n=="false")return!!t;return t&&n&&!o?r.concat(n):o?r.slice(0,i).concat(r.slice(i+1)):r}var jxt=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?v.useLayoutEffect:v.useEffect;function Zs(e){var t=v.useRef(e);return jxt(function(){t.current=e}),v.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o=this._maxSize&&this.clear(),e in this._values||this._size++,this._values[e]=t};var Bxt=/[^.^\]^[]+|(?=\[\]|\.\.)/g,$ue=/^\d+$/,zxt=/^\d/,Vxt=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,Hxt=/^\s*(['"]?)(.*?)(\1)\s*$/,b5=512,sY=new Qg(b5),lY=new Qg(b5),cY=new Qg(b5),ig={Cache:Qg,split:kF,normalizePath:l_,setter:function(e){var t=l_(e);return lY.get(e)||lY.set(e,function(r,o){for(var i=0,a=t.length,s=r;ie.match(Kxt)||[],DM=e=>e[0].toUpperCase()+e.slice(1),x5=(e,t)=>$M(e).join(t).toLowerCase(),Due=e=>$M(e).reduce((t,n)=>`${t}${t?n[0].toUpperCase()+n.slice(1).toLowerCase():n.toLowerCase()}`,""),Yxt=e=>DM(Due(e)),Qxt=e=>x5(e,"_"),Xxt=e=>x5(e,"-"),Jxt=e=>DM(x5(e," ")),Zxt=e=>$M(e).map(DM).join(" ");var c_={words:$M,upperFirst:DM,camelCase:Due,pascalCase:Yxt,snakeCase:Qxt,kebabCase:Xxt,sentenceCase:Jxt,titleCase:Zxt},S5={exports:{}};S5.exports=function(e){return _ue(eSt(e),e)};S5.exports.array=_ue;function _ue(e,t){var n=e.length,r=new Array(n),o={},i=n,a=tSt(t),s=nSt(e);for(t.forEach(function(c){if(!s.has(c[0])||!s.has(c[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});i--;)o[i]||l(e[i],i,new Set);return r;function l(c,u,d){if(d.has(c)){var f;try{f=", node was:"+JSON.stringify(c)}catch{f=""}throw new Error("Cyclic dependency"+f)}if(!s.has(c))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(c));if(!o[u]){o[u]=!0;var p=a.get(c)||new Set;if(p=Array.from(p),u=p.length){d.add(c);do{var h=p[--u];l(h,s.get(h),d)}while(u);d.delete(c)}r[--n]=c}}}function eSt(e){for(var t=new Set,n=0,r=e.length;n"",cSt=/^Symbol\((.*)\)(.*)$/;function uSt(e){return e!=+e?"NaN":e===0&&1/e<0?"-0":""+e}function uY(e,t=!1){if(e==null||e===!0||e===!1)return""+e;const n=typeof e;if(n==="number")return uSt(e);if(n==="string")return t?`"${e}"`:e;if(n==="function")return"[Function "+(e.name||"anonymous")+"]";if(n==="symbol")return lSt.call(e).replace(cSt,"Symbol($1)");const r=iSt.call(e).slice(8,-1);return r==="Date"?isNaN(e.getTime())?""+e:e.toISOString(e):r==="Error"||e instanceof Error?"["+aSt.call(e)+"]":r==="RegExp"?sSt.call(e):null}function pd(e,t){let n=uY(e,t);return n!==null?n:JSON.stringify(e,function(r,o){let i=uY(this[r],t);return i!==null?i:o},2)}function Nue(e){return e==null?[]:[].concat(e)}let Lue,Fue,jue,dSt=/\$\{\s*(\w+)\s*\}/g;Lue=Symbol.toStringTag;class dY{constructor(t,n,r,o){this.name=void 0,this.message=void 0,this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=void 0,this.inner=void 0,this[Lue]="Error",this.name="ValidationError",this.value=n,this.path=r,this.type=o,this.errors=[],this.inner=[],Nue(t).forEach(i=>{if(Ca.isError(i)){this.errors.push(...i.errors);const a=i.inner.length?i.inner:[i];this.inner.push(...a)}else this.errors.push(i)}),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0]}}Fue=Symbol.hasInstance;jue=Symbol.toStringTag;class Ca extends Error{static formatError(t,n){const r=n.label||n.path||"this";return r!==n.path&&(n=Object.assign({},n,{path:r})),typeof t=="string"?t.replace(dSt,(o,i)=>pd(n[i])):typeof t=="function"?t(n):t}static isError(t){return t&&t.name==="ValidationError"}constructor(t,n,r,o,i){const a=new dY(t,n,r,o);if(i)return a;super(),this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=[],this.inner=[],this[jue]="Error",this.name=a.name,this.message=a.message,this.type=a.type,this.value=a.value,this.path=a.path,this.errors=a.errors,this.inner=a.inner,Error.captureStackTrace&&Error.captureStackTrace(this,Ca)}static[Fue](t){return dY[Symbol.hasInstance](t)||super[Symbol.hasInstance](t)}}let qc={default:"${path} is invalid",required:"${path} is a required field",defined:"${path} must be defined",notNull:"${path} cannot be null",oneOf:"${path} must be one of the following values: ${values}",notOneOf:"${path} must not be one of the following values: ${values}",notType:({path:e,type:t,value:n,originalValue:r})=>{const o=r!=null&&r!==n?` (cast from the value \`${pd(r,!0)}\`).`:".";return t!=="mixed"?`${e} must be a \`${t}\` type, but the final value was: \`${pd(n,!0)}\``+o:`${e} must match the configured type. The validated value was: \`${pd(n,!0)}\``+o}},va={length:"${path} must be exactly ${length} characters",min:"${path} must be at least ${min} characters",max:"${path} must be at most ${max} characters",matches:'${path} must match the following: "${regex}"',email:"${path} must be a valid email",url:"${path} must be a valid URL",uuid:"${path} must be a valid UUID",datetime:"${path} must be a valid ISO date-time",datetime_precision:"${path} must be a valid ISO date-time with a sub-second precision of exactly ${precision} digits",datetime_offset:'${path} must be a valid ISO date-time with UTC "Z" timezone',trim:"${path} must be a trimmed string",lowercase:"${path} must be a lowercase string",uppercase:"${path} must be a upper case string"},sf={min:"${path} must be greater than or equal to ${min}",max:"${path} must be less than or equal to ${max}",lessThan:"${path} must be less than ${less}",moreThan:"${path} must be greater than ${more}",positive:"${path} must be a positive number",negative:"${path} must be a negative number",integer:"${path} must be an integer"},MF={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},RF={isValue:"${path} field must be ${value}"},$F={noUnknown:"${path} field has unspecified keys: ${unknown}"},vT={min:"${path} field must have at least ${min} items",max:"${path} field must have less than or equal to ${max} items",length:"${path} must have ${length} items"},fSt={notType:e=>{const{path:t,value:n,spec:r}=e,o=r.types.length;if(Array.isArray(n)){if(n.lengtho)return`${t} tuple value has too many items, expected a length of ${o} but got ${n.length} for value: \`${pd(n,!0)}\``}return Ca.formatError(qc.notType,e)}};Object.assign(Object.create(null),{mixed:qc,string:va,number:sf,date:MF,object:$F,array:vT,boolean:RF,tuple:fSt});const _M=e=>e&&e.__isYupSchema__;class $O{static fromOptions(t,n){if(!n.then&&!n.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:r,then:o,otherwise:i}=n,a=typeof r=="function"?r:(...s)=>s.every(l=>l===r);return new $O(t,(s,l)=>{var c;let u=a(...s)?o:i;return(c=u==null?void 0:u(l))!=null?c:l})}constructor(t,n){this.fn=void 0,this.refs=t,this.refs=t,this.fn=n}resolve(t,n){let r=this.refs.map(i=>i.getValue(n==null?void 0:n.value,n==null?void 0:n.parent,n==null?void 0:n.context)),o=this.fn(r,t,n);if(o===void 0||o===t)return t;if(!_M(o))throw new TypeError("conditions must return a schema object");return o.resolve(n)}}const OP={context:"$",value:"."};function pSt(e,t){return new jp(e,t)}class jp{constructor(t,n={}){if(this.key=void 0,this.isContext=void 0,this.isValue=void 0,this.isSibling=void 0,this.path=void 0,this.getter=void 0,this.map=void 0,typeof t!="string")throw new TypeError("ref must be a string, got: "+t);if(this.key=t.trim(),t==="")throw new TypeError("ref must be a non-empty string");this.isContext=this.key[0]===OP.context,this.isValue=this.key[0]===OP.value,this.isSibling=!this.isContext&&!this.isValue;let r=this.isContext?OP.context:this.isValue?OP.value:"";this.path=this.key.slice(r.length),this.getter=this.path&&ig.getter(this.path,!0),this.map=n.map}getValue(t,n,r){let o=this.isContext?r:this.isValue?t:n;return this.getter&&(o=this.getter(o||{})),this.map&&(o=this.map(o)),o}cast(t,n){return this.getValue(t,n==null?void 0:n.parent,n==null?void 0:n.context)}resolve(){return this}describe(){return{type:"ref",key:this.key}}toString(){return`Ref(${this.key})`}static isRef(t){return t&&t.__isYupRef}}jp.prototype.__isYupRef=!0;const vc=e=>e==null;function Bm(e){function t({value:n,path:r="",options:o,originalValue:i,schema:a},s,l){const{name:c,test:u,params:d,message:f,skipAbsent:p}=e;let{parent:h,context:m,abortEarly:y=a.spec.abortEarly,disableStackTrace:w=a.spec.disableStackTrace}=o;function x($){return jp.isRef($)?$.getValue(n,h,m):$}function S($={}){const N=Object.assign({value:n,originalValue:i,label:a.spec.label,path:$.path||r,spec:a.spec,disableStackTrace:$.disableStackTrace||w},d,$.params);for(const j of Object.keys(N))N[j]=x(N[j]);const L=new Ca(Ca.formatError($.message||f,N),n,N.path,$.type||c,N.disableStackTrace);return L.params=N,L}const E=y?s:l;let P={path:r,parent:h,type:c,from:o.from,createError:S,resolve:x,options:o,originalValue:i,schema:a};const T=$=>{Ca.isError($)?E($):$?l(null):E(S())},I=$=>{Ca.isError($)?E($):s($)};if(p&&vc(n))return T(!0);let k;try{var O;if(k=u.call(P,n,P),typeof((O=k)==null?void 0:O.then)=="function"){if(o.sync)throw new Error(`Validation test of type: "${P.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(k).then(T,I)}}catch($){I($);return}T(k)}return t.OPTIONS=e,t}function hSt(e,t,n,r=n){let o,i,a;return t?(ig.forEach(t,(s,l,c)=>{let u=l?s.slice(1,s.length-1):s;e=e.resolve({context:r,parent:o,value:n});let d=e.type==="tuple",f=c?parseInt(u,10):0;if(e.innerType||d){if(d&&!c)throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part "${a}" must contain an index to the tuple element, e.g. "${a}[0]"`);if(n&&f>=n.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${s}, in the path: ${t}. because there is no value at that index. `);o=n,n=n&&n[f],e=d?e.spec.types[f]:e.innerType}if(!c){if(!e.fields||!e.fields[u])throw new Error(`The schema does not contain the path: ${t}. (failed at: ${a} which is a type: "${e.type}")`);o=n,n=n&&n[u],e=e.fields[u]}i=u,a=l?"["+s+"]":"."+s}),{schema:e,parent:o,parentPath:i}):{parent:o,parentPath:t,schema:e}}class DO extends Set{describe(){const t=[];for(const n of this.values())t.push(jp.isRef(n)?n.describe():n);return t}resolveAll(t){let n=[];for(const r of this.values())n.push(t(r));return n}clone(){return new DO(this.values())}merge(t,n){const r=this.clone();return t.forEach(o=>r.add(o)),n.forEach(o=>r.delete(o)),r}}function Ty(e,t=new Map){if(_M(e)||!e||typeof e!="object")return e;if(t.has(e))return t.get(e);let n;if(e instanceof Date)n=new Date(e.getTime()),t.set(e,n);else if(e instanceof RegExp)n=new RegExp(e),t.set(e,n);else if(Array.isArray(e)){n=new Array(e.length),t.set(e,n);for(let r=0;r{this.typeError(qc.notType)}),this.type=t.type,this._typeCheck=t.check,this.spec=Object.assign({strip:!1,strict:!1,abortEarly:!0,recursive:!0,disableStackTrace:!1,nullable:!1,optional:!0,coerce:!0},t==null?void 0:t.spec),this.withMutation(n=>{n.nonNullable()})}get _type(){return this.type}clone(t){if(this._mutate)return t&&Object.assign(this.spec,t),this;const n=Object.create(Object.getPrototypeOf(this));return n.type=this.type,n._typeCheck=this._typeCheck,n._whitelist=this._whitelist.clone(),n._blacklist=this._blacklist.clone(),n.internalTests=Object.assign({},this.internalTests),n.exclusiveTests=Object.assign({},this.exclusiveTests),n.deps=[...this.deps],n.conditions=[...this.conditions],n.tests=[...this.tests],n.transforms=[...this.transforms],n.spec=Ty(Object.assign({},this.spec,t)),n}label(t){let n=this.clone();return n.spec.label=t,n}meta(...t){if(t.length===0)return this.spec.meta;let n=this.clone();return n.spec.meta=Object.assign(n.spec.meta||{},t[0]),n}withMutation(t){let n=this._mutate;this._mutate=!0;let r=t(this);return this._mutate=n,r}concat(t){if(!t||t===this)return this;if(t.type!==this.type&&this.type!=="mixed")throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${t.type}`);let n=this,r=t.clone();const o=Object.assign({},n.spec,r.spec);return r.spec=o,r.internalTests=Object.assign({},n.internalTests,r.internalTests),r._whitelist=n._whitelist.merge(t._whitelist,t._blacklist),r._blacklist=n._blacklist.merge(t._blacklist,t._whitelist),r.tests=n.tests,r.exclusiveTests=n.exclusiveTests,r.withMutation(i=>{t.tests.forEach(a=>{i.test(a.OPTIONS)})}),r.transforms=[...n.transforms,...r.transforms],r}isType(t){return t==null?!!(this.spec.nullable&&t===null||this.spec.optional&&t===void 0):this._typeCheck(t)}resolve(t){let n=this;if(n.conditions.length){let r=n.conditions;n=n.clone(),n.conditions=[],n=r.reduce((o,i)=>i.resolve(o,t),n),n=n.resolve(t)}return n}resolveOptions(t){var n,r,o,i;return Object.assign({},t,{from:t.from||[],strict:(n=t.strict)!=null?n:this.spec.strict,abortEarly:(r=t.abortEarly)!=null?r:this.spec.abortEarly,recursive:(o=t.recursive)!=null?o:this.spec.recursive,disableStackTrace:(i=t.disableStackTrace)!=null?i:this.spec.disableStackTrace})}cast(t,n={}){let r=this.resolve(Object.assign({value:t},n)),o=n.assert==="ignore-optionality",i=r._cast(t,n);if(n.assert!==!1&&!r.isType(i)){if(o&&vc(i))return i;let a=pd(t),s=pd(i);throw new TypeError(`The value of ${n.path||"field"} could not be cast to a value that satisfies the schema type: "${r.type}". attempted value: ${a} -`+(s!==a?`result of cast: ${s}`:""))}return i}_cast(t,n){let r=t===void 0?t:this.transforms.reduce((o,i)=>i.call(this,o,t,this),t);return r===void 0&&(r=this.getDefault(n)),r}_validate(t,n={},r,o){let{path:i,originalValue:a=t,strict:s=this.spec.strict}=n,l=t;s||(l=this._cast(l,Object.assign({assert:!1},n)));let c=[];for(let u of Object.values(this.internalTests))u&&c.push(u);this.runTests({path:i,value:l,originalValue:a,options:n,tests:c},r,u=>{if(u.length)return o(u,l);this.runTests({path:i,value:l,originalValue:a,options:n,tests:this.tests},r,o)})}runTests(t,n,r){let o=!1,{tests:i,value:a,originalValue:s,path:l,options:c}=t,u=m=>{o||(o=!0,n(m,a))},d=m=>{o||(o=!0,r(m,a))},f=i.length,p=[];if(!f)return d([]);let h={value:a,originalValue:s,path:l,options:c,schema:this};for(let m=0;mthis.resolve(u)._validate(c,u,f,p)}validate(t,n){var r;let o=this.resolve(Object.assign({},n,{value:t})),i=(r=n==null?void 0:n.disableStackTrace)!=null?r:o.spec.disableStackTrace;return new Promise((a,s)=>o._validate(t,n,(l,c)=>{Sa.isError(l)&&(l.value=c),s(l)},(l,c)=>{l.length?s(new Sa(l,c,void 0,void 0,i)):a(c)}))}validateSync(t,n){var r;let o=this.resolve(Object.assign({},n,{value:t})),i,a=(r=n==null?void 0:n.disableStackTrace)!=null?r:o.spec.disableStackTrace;return o._validate(t,Object.assign({},n,{sync:!0}),(s,l)=>{throw Sa.isError(s)&&(s.value=l),s},(s,l)=>{if(s.length)throw new Sa(s,t,void 0,void 0,a);i=l}),i}isValid(t,n){return this.validate(t,n).then(()=>!0,r=>{if(Sa.isError(r))return!1;throw r})}isValidSync(t,n){try{return this.validateSync(t,n),!0}catch(r){if(Sa.isError(r))return!1;throw r}}_getDefault(t){let n=this.spec.default;return n==null?n:typeof n=="function"?n.call(this,t):Py(n)}getDefault(t){return this.resolve(t||{})._getDefault(t)}default(t){return arguments.length===0?this._getDefault():this.clone({default:t})}strict(t=!0){return this.clone({strict:t})}nullability(t,n){const r=this.clone({nullable:t});return r.internalTests.nullable=jm({message:n,name:"nullable",test(o){return o===null?this.schema.spec.nullable:!0}}),r}optionality(t,n){const r=this.clone({optional:t});return r.internalTests.optionality=jm({message:n,name:"optionality",test(o){return o===void 0?this.schema.spec.optional:!0}}),r}optional(){return this.optionality(!0)}defined(t=Wc.defined){return this.optionality(!1,t)}nullable(){return this.nullability(!0)}nonNullable(t=Wc.notNull){return this.nullability(!1,t)}required(t=Wc.required){return this.clone().withMutation(n=>n.nonNullable(t).defined(t))}notRequired(){return this.clone().withMutation(t=>t.nullable().optional())}transform(t){let n=this.clone();return n.transforms.push(t),n}test(...t){let n;if(t.length===1?typeof t[0]=="function"?n={test:t[0]}:n=t[0]:t.length===2?n={name:t[0],test:t[1]}:n={name:t[0],message:t[1],test:t[2]},n.message===void 0&&(n.message=Wc.default),typeof n.test!="function")throw new TypeError("`test` is a required parameters");let r=this.clone(),o=jm(n),i=n.exclusive||n.name&&r.exclusiveTests[n.name]===!0;if(n.exclusive&&!n.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return n.name&&(r.exclusiveTests[n.name]=!!n.exclusive),r.tests=r.tests.filter(a=>!(a.OPTIONS.name===n.name&&(i||a.OPTIONS.test===o.OPTIONS.test))),r.tests.push(o),r}when(t,n){!Array.isArray(t)&&typeof t!="string"&&(n=t,t=".");let r=this.clone(),o=Oue(t).map(i=>new Lp(i));return o.forEach(i=>{i.isSibling&&r.deps.push(i.key)}),r.conditions.push(typeof n=="function"?new xO(o,n):xO.fromOptions(o,n)),r}typeError(t){let n=this.clone();return n.internalTests.typeError=jm({message:t,name:"typeError",skipAbsent:!0,test(r){return this.schema._typeCheck(r)?!0:this.createError({params:{type:this.schema.type}})}}),n}oneOf(t,n=Wc.oneOf){let r=this.clone();return t.forEach(o=>{r._whitelist.add(o),r._blacklist.delete(o)}),r.internalTests.whiteList=jm({message:n,name:"oneOf",skipAbsent:!0,test(o){let i=this.schema._whitelist,a=i.resolveAll(this.resolve);return a.includes(o)?!0:this.createError({params:{values:Array.from(i).join(", "),resolved:a}})}}),r}notOneOf(t,n=Wc.notOneOf){let r=this.clone();return t.forEach(o=>{r._blacklist.add(o),r._whitelist.delete(o)}),r.internalTests.blacklist=jm({message:n,name:"notOneOf",test(o){let i=this.schema._blacklist,a=i.resolveAll(this.resolve);return a.includes(o)?this.createError({params:{values:Array.from(i).join(", "),resolved:a}}):!0}}),r}strip(t=!0){let n=this.clone();return n.spec.strip=t,n}describe(t){const n=(t?this.resolve(t):this).clone(),{label:r,meta:o,optional:i,nullable:a}=n.spec;return{meta:o,label:r,optional:i,nullable:a,default:n.getDefault(t),type:n.type,oneOf:n._whitelist.describe(),notOneOf:n._blacklist.describe(),tests:n.tests.map(l=>({name:l.OPTIONS.name,params:l.OPTIONS.params})).filter((l,c,u)=>u.findIndex(d=>d.name===l.name)===c)}}}Ts.prototype.__isYupSchema__=!0;for(const e of["validate","validateSync"])Ts.prototype[`${e}At`]=function(t,n,r={}){const{parent:o,parentPath:i,schema:a}=jxt(this,t,n,r.context);return a[e](o&&o[i],Object.assign({},r,{parent:o,path:t}))};for(const e of["equals","is"])Ts.prototype[e]=Ts.prototype.oneOf;for(const e of["not","nope"])Ts.prototype[e]=Ts.prototype.notOneOf;function OM(){return new Rue}class Rue extends Ts{constructor(){super({type:"boolean",check(t){return t instanceof Boolean&&(t=t.valueOf()),typeof t=="boolean"}}),this.withMutation(()=>{this.transform((t,n,r)=>{if(r.spec.coerce&&!r.isType(t)){if(/^(true|1)$/i.test(String(t)))return!0;if(/^(false|0)$/i.test(String(t)))return!1}return t})})}isTrue(t=IF.isValue){return this.test({message:t,name:"is-value",exclusive:!0,params:{value:"true"},test(n){return mc(n)||n===!0}})}isFalse(t=IF.isValue){return this.test({message:t,name:"is-value",exclusive:!0,params:{value:"false"},test(n){return mc(n)||n===!1}})}default(t){return super.default(t)}defined(t){return super.defined(t)}optional(){return super.optional()}required(t){return super.required(t)}notRequired(){return super.notRequired()}nullable(){return super.nullable()}nonNullable(t){return super.nonNullable(t)}strip(t){return super.strip(t)}}OM.prototype=Rue.prototype;const Bxt=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function zxt(e){const t=AF(e);if(!t)return Date.parse?Date.parse(e):Number.NaN;if(t.z===void 0&&t.plusMinus===void 0)return new Date(t.year,t.month,t.day,t.hour,t.minute,t.second,t.millisecond).valueOf();let n=0;return t.z!=="Z"&&t.plusMinus!==void 0&&(n=t.hourOffset*60+t.minuteOffset,t.plusMinus==="+"&&(n=0-n)),Date.UTC(t.year,t.month,t.day,t.hour,t.minute+n,t.second,t.millisecond)}function AF(e){var t,n;const r=Bxt.exec(e);return r?{year:Hu(r[1]),month:Hu(r[2],1)-1,day:Hu(r[3],1),hour:Hu(r[4]),minute:Hu(r[5]),second:Hu(r[6]),millisecond:r[7]?Hu(r[7].substring(0,3)):0,precision:(t=(n=r[7])==null?void 0:n.length)!=null?t:void 0,z:r[8]||void 0,plusMinus:r[9]||void 0,hourOffset:Hu(r[10]),minuteOffset:Hu(r[11])}:null}function Hu(e,t=0){return Number(e)||t}let Vxt=/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,Hxt=/^((https?|ftp):)?\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,Uxt=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,Wxt="^\\d{4}-\\d{2}-\\d{2}",Gxt="\\d{2}:\\d{2}:\\d{2}",qxt="(([+-]\\d{2}(:?\\d{2})?)|Z)",Kxt=new RegExp(`${Wxt}T${Gxt}(\\.\\d+)?${qxt}$`),Yxt=e=>mc(e)||e===e.trim(),Qxt={}.toString();function La(){return new $ue}class $ue extends Ts{constructor(){super({type:"string",check(t){return t instanceof String&&(t=t.valueOf()),typeof t=="string"}}),this.withMutation(()=>{this.transform((t,n,r)=>{if(!r.spec.coerce||r.isType(t)||Array.isArray(t))return t;const o=t!=null&&t.toString?t.toString():t;return o===Qxt?t:o})})}required(t){return super.required(t).withMutation(n=>n.test({message:t||Wc.required,name:"required",skipAbsent:!0,test:r=>!!r.length}))}notRequired(){return super.notRequired().withMutation(t=>(t.tests=t.tests.filter(n=>n.OPTIONS.name!=="required"),t))}length(t,n=ya.length){return this.test({message:n,name:"length",exclusive:!0,params:{length:t},skipAbsent:!0,test(r){return r.length===this.resolve(t)}})}min(t,n=ya.min){return this.test({message:n,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(r){return r.length>=this.resolve(t)}})}max(t,n=ya.max){return this.test({name:"max",exclusive:!0,message:n,params:{max:t},skipAbsent:!0,test(r){return r.length<=this.resolve(t)}})}matches(t,n){let r=!1,o,i;return n&&(typeof n=="object"?{excludeEmptyString:r=!1,message:o,name:i}=n:o=n),this.test({name:i||"matches",message:o||ya.matches,params:{regex:t},skipAbsent:!0,test:a=>a===""&&r||a.search(t)!==-1})}email(t=ya.email){return this.matches(Vxt,{name:"email",message:t,excludeEmptyString:!0})}url(t=ya.url){return this.matches(Hxt,{name:"url",message:t,excludeEmptyString:!0})}uuid(t=ya.uuid){return this.matches(Uxt,{name:"uuid",message:t,excludeEmptyString:!1})}datetime(t){let n="",r,o;return t&&(typeof t=="object"?{message:n="",allowOffset:r=!1,precision:o=void 0}=t:n=t),this.matches(Kxt,{name:"datetime",message:n||ya.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:n||ya.datetime_offset,params:{allowOffset:r},skipAbsent:!0,test:i=>{if(!i||r)return!0;const a=AF(i);return a?!!a.z:!1}}).test({name:"datetime_precision",message:n||ya.datetime_precision,params:{precision:o},skipAbsent:!0,test:i=>{if(!i||o==null)return!0;const a=AF(i);return a?a.precision===o:!1}})}ensure(){return this.default("").transform(t=>t===null?"":t)}trim(t=ya.trim){return this.transform(n=>n!=null?n.trim():n).test({message:t,name:"trim",test:Yxt})}lowercase(t=ya.lowercase){return this.transform(n=>mc(n)?n:n.toLowerCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:n=>mc(n)||n===n.toLowerCase()})}uppercase(t=ya.uppercase){return this.transform(n=>mc(n)?n:n.toUpperCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:n=>mc(n)||n===n.toUpperCase()})}}La.prototype=$ue.prototype;let Xxt=e=>e!=+e;function Ea(){return new Due}class Due extends Ts{constructor(){super({type:"number",check(t){return t instanceof Number&&(t=t.valueOf()),typeof t=="number"&&!Xxt(t)}}),this.withMutation(()=>{this.transform((t,n,r)=>{if(!r.spec.coerce)return t;let o=t;if(typeof o=="string"){if(o=o.replace(/\s/g,""),o==="")return NaN;o=+o}return r.isType(o)||o===null?o:parseFloat(o)})})}min(t,n=af.min){return this.test({message:n,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(r){return r>=this.resolve(t)}})}max(t,n=af.max){return this.test({message:n,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(r){return r<=this.resolve(t)}})}lessThan(t,n=af.lessThan){return this.test({message:n,name:"max",exclusive:!0,params:{less:t},skipAbsent:!0,test(r){return rthis.resolve(t)}})}positive(t=af.positive){return this.moreThan(0,t)}negative(t=af.negative){return this.lessThan(0,t)}integer(t=af.integer){return this.test({name:"integer",message:t,skipAbsent:!0,test:n=>Number.isInteger(n)})}truncate(){return this.transform(t=>mc(t)?t:t|0)}round(t){var n;let r=["ceil","floor","round","trunc"];if(t=((n=t)==null?void 0:n.toLowerCase())||"round",t==="trunc")return this.truncate();if(r.indexOf(t.toLowerCase())===-1)throw new TypeError("Only valid options for round() are: "+r.join(", "));return this.transform(o=>mc(o)?o:Math[t](o))}}Ea.prototype=Due.prototype;let _ue=new Date(""),Jxt=e=>Object.prototype.toString.call(e)==="[object Date]";function Eg(){return new d1}class d1 extends Ts{constructor(){super({type:"date",check(t){return Jxt(t)&&!isNaN(t.getTime())}}),this.withMutation(()=>{this.transform((t,n,r)=>!r.spec.coerce||r.isType(t)||t===null?t:(t=zxt(t),isNaN(t)?d1.INVALID_DATE:new Date(t)))})}prepareParam(t,n){let r;if(Lp.isRef(t))r=t;else{let o=this.cast(t);if(!this._typeCheck(o))throw new TypeError(`\`${n}\` must be a Date or a value that can be \`cast()\` to a Date`);r=o}return r}min(t,n=TF.min){let r=this.prepareParam(t,"min");return this.test({message:n,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(o){return o>=this.resolve(r)}})}max(t,n=TF.max){let r=this.prepareParam(t,"max");return this.test({message:n,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(o){return o<=this.resolve(r)}})}}d1.INVALID_DATE=_ue;Eg.prototype=d1.prototype;Eg.INVALID_DATE=_ue;function Zxt(e,t=[]){let n=[],r=new Set,o=new Set(t.map(([a,s])=>`${a}-${s}`));function i(a,s){let l=rg.split(a)[0];r.add(l),o.has(`${s}-${l}`)||n.push([s,l])}for(const a of Object.keys(e)){let s=e[a];r.add(a),Lp.isRef(s)&&s.isSibling?i(s.path,a):IM(s)&&"deps"in s&&s.deps.forEach(l=>i(l,a))}return Axt.array(Array.from(r),n).reverse()}function sY(e,t){let n=1/0;return e.some((r,o)=>{var i;if((i=t.path)!=null&&i.includes(r))return n=o,!0}),n}function Nue(e){return(t,n)=>sY(e,t)-sY(e,n)}const Lue=(e,t,n)=>{if(typeof e!="string")return e;let r=e;try{r=JSON.parse(e)}catch{}return n.isType(r)?r:e};function sT(e){if("fields"in e){const t={};for(const[n,r]of Object.entries(e.fields))t[n]=sT(r);return e.setFields(t)}if(e.type==="array"){const t=e.optional();return t.innerType&&(t.innerType=sT(t.innerType)),t}return e.type==="tuple"?e.optional().clone({types:e.spec.types.map(sT)}):"optional"in e?e.optional():e}const eSt=(e,t)=>{const n=[...rg.normalizePath(t)];if(n.length===1)return n[0]in e;let r=n.pop(),o=rg.getter(rg.join(n),!0)(e);return!!(o&&r in o)};let lY=e=>Object.prototype.toString.call(e)==="[object Object]";function tSt(e,t){let n=Object.keys(e.fields);return Object.keys(t).filter(r=>n.indexOf(r)===-1)}const nSt=Nue([]);function za(e){return new Fue(e)}class Fue extends Ts{constructor(t){super({type:"object",check(n){return lY(n)||typeof n=="function"}}),this.fields=Object.create(null),this._sortErrors=nSt,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{t&&this.shape(t)})}_cast(t,n={}){var r;let o=super._cast(t,n);if(o===void 0)return this.getDefault(n);if(!this._typeCheck(o))return o;let i=this.fields,a=(r=n.stripUnknown)!=null?r:this.spec.noUnknown,s=[].concat(this._nodes,Object.keys(o).filter(d=>!this._nodes.includes(d))),l={},c=Object.assign({},n,{parent:l,__validating:n.__validating||!1}),u=!1;for(const d of s){let f=i[d],p=d in o;if(f){let h,m=o[d];c.path=(n.path?`${n.path}.`:"")+d,f=f.resolve({value:m,context:n.context,parent:l});let y=f instanceof Ts?f.spec:void 0,w=y==null?void 0:y.strict;if(y!=null&&y.strip){u=u||d in o;continue}h=!n.__validating||!w?f.cast(o[d],c):o[d],h!==void 0&&(l[d]=h)}else p&&!a&&(l[d]=o[d]);(p!==d in l||l[d]!==o[d])&&(u=!0)}return u?l:o}_validate(t,n={},r,o){let{from:i=[],originalValue:a=t,recursive:s=this.spec.recursive}=n;n.from=[{schema:this,value:a},...i],n.__validating=!0,n.originalValue=a,super._validate(t,n,r,(l,c)=>{if(!s||!lY(c)){o(l,c);return}a=a||c;let u=[];for(let d of this._nodes){let f=this.fields[d];!f||Lp.isRef(f)||u.push(f.asNestedTest({options:n,key:d,parent:c,parentPath:n.path,originalParent:a}))}this.runTests({tests:u,value:c,originalValue:a,options:n},r,d=>{o(d.sort(this._sortErrors).concat(l),c)})})}clone(t){const n=super.clone(t);return n.fields=Object.assign({},this.fields),n._nodes=this._nodes,n._excludedEdges=this._excludedEdges,n._sortErrors=this._sortErrors,n}concat(t){let n=super.concat(t),r=n.fields;for(let[o,i]of Object.entries(this.fields)){const a=r[o];r[o]=a===void 0?i:a}return n.withMutation(o=>o.setFields(r,[...this._excludedEdges,...t._excludedEdges]))}_getDefault(t){if("default"in this.spec)return super._getDefault(t);if(!this._nodes.length)return;let n={};return this._nodes.forEach(r=>{var o;const i=this.fields[r];let a=t;(o=a)!=null&&o.value&&(a=Object.assign({},a,{parent:a.value,value:a.value[r]})),n[r]=i&&"getDefault"in i?i.getDefault(a):void 0}),n}setFields(t,n){let r=this.clone();return r.fields=t,r._nodes=Zxt(t,n),r._sortErrors=Nue(Object.keys(t)),n&&(r._excludedEdges=n),r}shape(t,n=[]){return this.clone().withMutation(r=>{let o=r._excludedEdges;return n.length&&(Array.isArray(n[0])||(n=[n]),o=[...r._excludedEdges,...n]),r.setFields(Object.assign(r.fields,t),o)})}partial(){const t={};for(const[n,r]of Object.entries(this.fields))t[n]="optional"in r&&r.optional instanceof Function?r.optional():r;return this.setFields(t)}deepPartial(){return sT(this)}pick(t){const n={};for(const r of t)this.fields[r]&&(n[r]=this.fields[r]);return this.setFields(n,this._excludedEdges.filter(([r,o])=>t.includes(r)&&t.includes(o)))}omit(t){const n=[];for(const r of Object.keys(this.fields))t.includes(r)||n.push(r);return this.pick(n)}from(t,n,r){let o=rg.getter(t,!0);return this.transform(i=>{if(!i)return i;let a=i;return eSt(i,t)&&(a=Object.assign({},i),r||delete a[t],a[n]=o(i)),a})}json(){return this.transform(Lue)}noUnknown(t=!0,n=OF.noUnknown){typeof t!="boolean"&&(n=t,t=!0);let r=this.test({name:"noUnknown",exclusive:!0,message:n,test(o){if(o==null)return!0;const i=tSt(this.schema,o);return!t||i.length===0||this.createError({params:{unknown:i.join(", ")}})}});return r.spec.noUnknown=t,r}unknown(t=!0,n=OF.noUnknown){return this.noUnknown(!t,n)}transformKeys(t){return this.transform(n=>{if(!n)return n;const r={};for(const o of Object.keys(n))r[t(o)]=n[o];return r})}camelCase(){return this.transformKeys(r_.camelCase)}snakeCase(){return this.transformKeys(r_.snakeCase)}constantCase(){return this.transformKeys(t=>r_.snakeCase(t).toUpperCase())}describe(t){const n=(t?this.resolve(t):this).clone(),r=super.describe(t);r.fields={};for(const[i,a]of Object.entries(n.fields)){var o;let s=t;(o=s)!=null&&o.value&&(s=Object.assign({},s,{parent:s.value,value:s.value[i]})),r.fields[i]=a.describe(s)}return r}}za.prototype=Fue.prototype;function bH(e){return new jue(e)}class jue extends Ts{constructor(t){super({type:"array",spec:{types:t},check(n){return Array.isArray(n)}}),this.innerType=void 0,this.innerType=t}_cast(t,n){const r=super._cast(t,n);if(!this._typeCheck(r)||!this.innerType)return r;let o=!1;const i=r.map((a,s)=>{const l=this.innerType.cast(a,Object.assign({},n,{path:`${n.path||""}[${s}]`}));return l!==a&&(o=!0),l});return o?i:r}_validate(t,n={},r,o){var i;let a=this.innerType,s=(i=n.recursive)!=null?i:this.spec.recursive;n.originalValue!=null&&n.originalValue,super._validate(t,n,r,(l,c)=>{var u;if(!s||!a||!this._typeCheck(c)){o(l,c);return}let d=new Array(c.length);for(let p=0;po(p.concat(l),c))})}clone(t){const n=super.clone(t);return n.innerType=this.innerType,n}json(){return this.transform(Lue)}concat(t){let n=super.concat(t);return n.innerType=this.innerType,t.innerType&&(n.innerType=n.innerType?n.innerType.concat(t.innerType):t.innerType),n}of(t){let n=this.clone();if(!IM(t))throw new TypeError("`array.of()` sub-schema must be a valid yup schema not: "+fd(t));return n.innerType=t,n.spec=Object.assign({},n.spec,{types:t}),n}length(t,n=aT.length){return this.test({message:n,name:"length",exclusive:!0,params:{length:t},skipAbsent:!0,test(r){return r.length===this.resolve(t)}})}min(t,n){return n=n||aT.min,this.test({message:n,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(r){return r.length>=this.resolve(t)}})}max(t,n){return n=n||aT.max,this.test({message:n,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(r){return r.length<=this.resolve(t)}})}ensure(){return this.default(()=>[]).transform((t,n)=>this._typeCheck(t)?t:n==null?[]:[].concat(n))}compact(t){let n=t?(r,o,i)=>!t(r,o,i):r=>!!r;return this.transform(r=>r!=null?r.filter(n):r)}describe(t){const n=(t?this.resolve(t):this).clone(),r=super.describe(t);if(n.innerType){var o;let i=t;(o=i)!=null&&o.value&&(i=Object.assign({},i,{parent:i.value,value:i.value[0]})),r.innerType=n.innerType.describe(i)}return r}}bH.prototype=jue.prototype;const wH=({planId:e,entry:t,mealId:n,meals:r,closeFn:o})=>{const i=n===void 0?null:n,a=r===void 0?[]:r,[s,l]=Le(),c=Eje(e),u=Pje(e),[d,f]=v.useState(t?yt.fromJSDate(t.datetime):yt.now()),[p,h]=v.useState(i),m=za({amount:Ea().required(s("forms.fieldRequired")).max(1e3,s("forms.maxValue",{value:"1000"})).min(1,s("forms.minValue",{value:"1"})),ingredient:Ea().required(s("forms.fieldRequired")),datetime:Eg().required(s("forms.fieldRequired"))});return b(Ba,{initialValues:{datetime:new Date,amount:0,ingredient:0},validationSchema:m,onSubmit:async y=>{const w={...y,plan:e,meal:p,weight_unit:null,datetime:y.datetime.toISOString()};t?u.mutate({...w,id:t.id}):c.mutate(w),o&&o()},children:y=>b(fa,{children:K(Wt,{spacing:2,children:[b(iH,{callback:w=>y.setFieldValue("ingredient",w==null?void 0:w.data.id)}),b(nn,{fullWidth:!0,id:"amount",label:"amount",InputProps:{endAdornment:b(So,{position:"end",children:s("nutrition.gramShort")})},error:y.touched.amount&&!!y.errors.amount,helperText:y.touched.amount&&y.errors.amount,...y.getFieldProps("amount")}),a.length>0&&b(Ic,{value:p,options:a.map(w=>w.id),getOptionLabel:w=>a.find(x=>x.id===w).displayName,onChange:(w,x)=>h(x),renderInput:w=>b(nn,{label:s("nutrition.meal"),value:p,...w})}),b(xg,{dateAdapter:lb,adapterLocale:l.language,children:b(qgt,{format:"yyyy-MM-dd HH:mm",label:s("date"),value:d,disableFuture:!0,onChange:w=>{y.setFieldValue("datetime",w==null?void 0:w.toJSDate()),f(w)},shouldDisableDate:w=>(t&&gi(t.datetime)===gi(w.toJSDate()),!1)})}),K(Wt,{direction:"row",justifyContent:"end",spacing:2,children:[o!==void 0&&b(dt,{color:"primary",variant:"outlined",onClick:()=>o(),children:s("close")}),b(dt,{color:"primary",variant:"contained",type:"submit",children:s("submit")})]})]})})})},xH=({plan:e,closeFn:t})=>{const[n]=Le(),r=xje(),o=Cje(e==null?void 0:e.id),[i,a]=v.useState(e==null?void 0:e.hasAnyGoals),s=za({description:La().required().max(25,n("forms.maxLength",{chars:"25"})).min(3,n("forms.minLength",{chars:"3"})),only_logging:OM(),goal_energy:Ea().notRequired().positive().max(6e3,n("forms.maxValue",{value:"6000kcal"})),goal_protein:Ea().notRequired().positive().max(500,n("forms.maxValue",{value:"500"})),goal_carbohydrates:Ea().notRequired().positive().max(750,n("forms.maxValue",{value:"750"})),goal_fiber:Ea().notRequired().positive().max(500,n("forms.maxValue",{value:"500"})),goal_fat:Ea().notRequired().positive().max(500,n("forms.maxValue",{value:"500"}))});return b(Ba,{initialValues:{description:e?e.description:n("nutrition.plan"),only_logging:e?e.onlyLogging:!0,goal_energy:e?e.goalEnergy:null,goal_protein:e?e.goalProtein:null,goal_carbohydrates:e?e.goalCarbohydrates:null,goal_fiber:e?e.goalFiber:null,goal_fat:e?e.goalFat:null},validationSchema:s,onSubmit:async l=>{l.goal_energy=l.goal_energy?l.goal_energy:null,l.goal_protein=l.goal_protein?l.goal_protein:null,l.goal_carbohydrates=l.goal_carbohydrates?l.goal_carbohydrates:null,l.goal_fiber=l.goal_fiber?l.goal_fiber:null,l.goal_fat=l.goal_fat?l.goal_fat:null,e?o.mutate({...l,id:e.id}):r.mutate(l),t&&t()},children:l=>b(fa,{children:K(Wt,{spacing:2,children:[b(nn,{fullWidth:!0,id:"description",label:n("description"),error:l.touched.description&&!!l.errors.description,helperText:l.touched.description&&l.errors.description,...l.getFieldProps("description")}),b(sk,{children:b(Td,{label:n("nutrition.onlyLoggingHelpText"),control:b(Fl,{id:"onlyLogging",checked:l.values.only_logging,...l.getFieldProps("only_logging")})})}),K(_g,{fullWidth:!0,children:[b(Ng,{id:"demo-simple-select-label",children:"Goal Setting"}),K(Pp,{labelId:"demo-simple-select-label",id:"demo-simple-select",value:10,label:"Goal setting",onChange:()=>{},children:[b(en,{value:10,children:"Based on my meals"}),b(en,{value:20,children:"Set basic macros"}),b(en,{value:30,children:"Set advanced macros"})]})]}),i&&K(wt,{children:[b(nn,{fullWidth:!0,id:"energy",label:n("nutrition.goalEnergy"),error:l.touched.goal_energy&&!!l.errors.goal_energy,helperText:l.touched.goal_energy&&l.errors.goal_energy,...l.getFieldProps("goal_energy"),InputProps:{endAdornment:b(So,{position:"end",children:n("nutrition.kcal")})}}),K(Oe,{container:!0,spacing:1,children:[b(Oe,{size:4,children:b(nn,{id:"protein",label:n("nutrition.goalProtein"),error:l.touched.goal_protein&&!!l.errors.goal_protein,helperText:l.touched.goal_protein&&l.errors.goal_protein,...l.getFieldProps("goal_protein"),InputProps:{startAdornment:b(So,{position:"start",children:l.values.goal_protein!==null&&l.values.goal_protein!==void 0?n("nutrition.valueEnergyKcal",{value:l.values.goal_protein*By.protein}):""}),endAdornment:b(So,{position:"end",children:n("nutrition.gramShort")})}})}),b(Oe,{size:4,children:b(nn,{id:"carbohydrates",label:n("nutrition.goalCarbohydrates"),error:l.touched.goal_carbohydrates&&!!l.errors.goal_carbohydrates,helperText:l.touched.goal_carbohydrates&&l.errors.goal_carbohydrates,...l.getFieldProps("goal_carbohydrates"),InputProps:{startAdornment:b(So,{position:"start",children:l.values.goal_carbohydrates!==null&&l.values.goal_carbohydrates!==void 0?n("nutrition.valueEnergyKcal",{value:l.values.goal_carbohydrates*By.carbohydrates}):""}),endAdornment:b(So,{position:"end",children:n("nutrition.gramShort")})}})}),b(Oe,{size:4,children:b(nn,{id:"fat",label:n("nutrition.goalFat"),error:l.touched.goal_fat&&!!l.errors.goal_fat,helperText:l.touched.goal_fat&&l.errors.goal_fat,...l.getFieldProps("goal_fat"),InputProps:{startAdornment:b(So,{position:"start",children:l.values.goal_fat!==null&&l.values.goal_fat!==void 0?n("nutrition.valueEnergyKcal",{value:l.values.goal_fat*By.fat}):""}),endAdornment:b(So,{position:"end",children:n("nutrition.gramShort")})}})})]}),b(Oe,{container:!0,spacing:1,children:b(Oe,{size:4,children:b(nn,{id:"fiber",label:n("nutrition.goalFiber"),error:l.touched.goal_fiber&&!!l.errors.goal_fiber,helperText:l.touched.goal_fiber&&l.errors.goal_fiber,...l.getFieldProps("goal_fiber"),InputProps:{startAdornment:b(So,{position:"start",children:n("nutrition.valueEnergyKcal",{value:0})}),endAdornment:b(So,{position:"end",children:n("nutrition.gramShort")})}})})})]}),b(Wt,{direction:"row",justifyContent:"end",sx:{mt:2},children:b(dt,{color:"primary",variant:"contained",type:"submit",sx:{mt:2},children:n("submit")})})]})})})},Bue=()=>{const[e]=Le(),t=vje();return t.isLoading?b(ho,{}):t.data!==null?b(rSt,{plan:t.data}):b(oz,{title:e("nutritionalPlan"),modalContent:b(xH,{}),modalTitle:e("add")})};function rSt(e){const[t,n]=Le(),[r,o]=Y.useState(!1),i=()=>o(!0),a=()=>o(!1);return K(wt,{children:[K(bo,{children:[b(Su,{title:t("nutritionalPlan"),subheader:e.plan.description}),K(_i,{sx:{height:"500px",overflow:"auto"},children:[b(Dct,{percentage:e.plan.percentageValuesLoggedToday,planned:e.plan.plannedNutritionalValues,logged:e.plan.loggedNutritionalValuesToday}),b(Ll,{children:e.plan.meals.map(s=>b(oSt,{meal:s,planId:e.plan.id},s.id))})]}),K(Ms,{sx:{justifyContent:"space-between",alignItems:"flex-start"},children:[b(dt,{size:"small",href:Fn(_n.NUTRITION_DETAIL,n.language,{id:e.plan.id}),children:t("seeDetails")}),b(kc,{title:t("nutrition.logThisMealItem"),children:b(vn,{onClick:i,children:b(LC,{})})})]})]}),b(Fi,{title:t("nutrition.addNutritionalDiary"),isOpen:r,closeFn:a,children:b(wH,{closeFn:a,planId:e.plan.id,meals:e.plan.meals})})]})}const oSt=e=>{const[t,n]=Le(),r=Fre(e.planId),[o,i]=v.useState(!1),[a,s]=Y.useState(!1),l=()=>i(!o),c=(p,h)=>{h!=="clickaway"&&s(!1)},u=p=>{const h=[{plan:e.planId,meal:e.meal.id,mealItem:p.id,ingredient:p.ingredientId,weight_unit:p.weightUnitId,datetime:new Date().toISOString(),amount:p.amount}];r.mutate(h),s(!0)},d=e.meal.name?e.meal.name:aI(e.meal.time,n.language),f=e.meal.name?aI(e.meal.time,n.language):null;return K(wt,{children:[K(Ep,{onClick:l,selected:o,children:[b(aa,{children:o?b(ore,{}):b(Ob,{})}),b(Ao,{primary:d,secondary:f})]}),b(vl,{in:o,timeout:"auto",unmountOnExit:!0,children:b(Ll,{children:e.meal.items.map(p=>{var h,m,y,w;return K(Ps,{secondaryAction:b(kc,{title:t("nutrition.logThisMealItem"),children:b(vn,{edge:"end",onClick:()=>u(p),children:b(LC,{})})}),children:[b(ZB,{children:b(Oc,{alt:(h=p.ingredient)==null?void 0:h.name,src:(y=(m=p.ingredient)==null?void 0:m.image)==null?void 0:y.url,sx:{width:45,height:45},children:b(Rd,{})})}),b(Ao,{primary:(w=p.ingredient)==null?void 0:w.name,secondary:An(p.amount,n.language)})]},p.id)})})}),b(nz,{open:a,autoHideDuration:pz,onClose:c,children:b(Il,{onClose:c,severity:"success",sx:{width:"100%"},children:t("nutrition.diaryEntrySaved")})})]})},SH=e=>{if(e.query.isLoading)return b(ho,{});if(e.query.isError)return b(on,{sx:{height:200,alignItems:"center",mt:2},component:Wt,direction:"column",justifyContent:"center",children:K(Il,{severity:"error",children:["Error while fetching data: ",e.query.error.message]})});if(e.query.isSuccess)return e.child},iSt=e=>{var r;const t=e.avatarSize||40,n=e.iconSize||40;return b(Oc,{sx:{height:t,width:t},src:(r=e.image)==null?void 0:r.url,children:b(Rd,{sx:{height:n,width:n}})})};function zue(){return fo({queryKey:[jFe],queryFn:tBe})}function AM(){return fo({queryKey:[HFe],queryFn:Qje})}function f1(){return fo({queryKey:[WFe],queryFn:Uje})}function kM(){return fo({queryKey:[UFe],queryFn:qje})}function Fp(){return fo({queryKey:[VFe],queryFn:uBe})}function Qg(e){return fo({queryKey:[It.ROUTINE_DETAIL,e],queryFn:()=>VBe(e)})}function aSt(){return fo({queryKey:[It.ROUTINES_SHALLOW],queryFn:HBe})}function sSt(){return fo({queryKey:[It.ROUTINES_ACTIVE],queryFn:zBe})}const lSt=()=>{const e=Lt();return jt({mutationFn:t=>UBe(t),onSuccess:()=>e.invalidateQueries({queryKey:[It.ROUTINE_OVERVIEW]})})},cSt=e=>{const t=Lt();return jt({mutationFn:n=>WBe(n),onSuccess:()=>{t.invalidateQueries({queryKey:[It.ROUTINE_OVERVIEW]}),t.invalidateQueries({queryKey:[It.ROUTINE_DETAIL,e]})}})},uSt=e=>{const t=Lt();return jt({mutationFn:n=>bze(n),onSuccess:()=>t.invalidateQueries({queryKey:[It.ROUTINE_DETAIL,e]})})},dSt=e=>{const t=Lt();return jt({mutationFn:n=>wze(n),onSuccess:()=>t.invalidateQueries({queryKey:[It.ROUTINE_DETAIL,e]})})},fSt=e=>{const t=Lt();return jt({mutationFn:n=>xze(n),onSuccess:()=>t.invalidateQueries({queryKey:[It.ROUTINE_DETAIL,e]})})},pSt=e=>{const t=Lt();return jt({mutationFn:n=>Sze(n),onSuccess:()=>t.invalidateQueries({queryKey:[It.ROUTINE_DETAIL,e]})})},hSt=e=>{const t=Lt();return jt({mutationFn:n=>Cze(n),onSuccess:()=>t.invalidateQueries({queryKey:[It.ROUTINE_DETAIL,e]})})},gSt=e=>{const t=Lt();return jt({mutationFn:n=>Eze(n),onSuccess:()=>t.invalidateQueries({queryKey:[It.ROUTINE_DETAIL,e]})})},mSt=e=>{const t=Lt();return jt({mutationFn:n=>Pze(n),onSuccess:()=>t.invalidateQueries({queryKey:[It.ROUTINE_DETAIL,e]})})},ySt=e=>{const t=Lt();return jt({mutationFn:n=>Tze(n),onSuccess:()=>t.invalidateQueries({queryKey:[It.ROUTINE_DETAIL,e]})})},vSt=e=>{const t=Lt();return jt({mutationFn:n=>Ize(n),onSuccess:()=>t.invalidateQueries({queryKey:[It.ROUTINE_DETAIL,e]})})},bSt=e=>{const t=Lt();return jt({mutationFn:n=>Oze(n),onSuccess:()=>t.invalidateQueries({queryKey:[It.ROUTINE_DETAIL,e]})})},wSt=e=>{const t=Lt();return jt({mutationFn:n=>Aze(n),onSuccess:()=>t.invalidateQueries({queryKey:[It.ROUTINE_DETAIL,e]})})},xSt=e=>{const t=Lt();return jt({mutationFn:n=>kze(n),onSuccess:()=>t.invalidateQueries({queryKey:[It.ROUTINE_DETAIL,e]})})},SSt=e=>{const t=Lt();return jt({mutationFn:n=>Mze(n),onSuccess:()=>t.invalidateQueries({queryKey:[It.ROUTINE_DETAIL,e]})})},CSt=e=>{const t=Lt();return jt({mutationFn:n=>Rze(n),onSuccess:()=>t.invalidateQueries({queryKey:[It.ROUTINE_DETAIL,e]})})},ESt=e=>{const t=Lt();return jt({mutationFn:n=>$ze(n),onSuccess:()=>t.invalidateQueries({queryKey:[It.ROUTINE_DETAIL,e]})})},Vue=e=>{const t=Lt();return jt({mutationFn:n=>Dze(n),onSuccess:()=>t.invalidateQueries({queryKey:[It.ROUTINE_DETAIL,e]})})},Hue=e=>{const t=Lt();return jt({mutationFn:n=>_ze(n),onSuccess:()=>t.invalidateQueries({queryKey:[It.ROUTINE_DETAIL,e]})})},Uue=e=>{const t=Lt();return jt({mutationFn:n=>Nze(n),onSuccess:()=>t.invalidateQueries({queryKey:[It.ROUTINE_DETAIL,e]})})},PSt=e=>{const t=Lt();return jt({mutationFn:n=>Lze(n),onSuccess:()=>t.invalidateQueries({queryKey:[It.ROUTINE_DETAIL,e]})})},TSt=e=>{const t=Lt();return jt({mutationFn:n=>Fze(n),onSuccess:()=>t.invalidateQueries({queryKey:[It.ROUTINE_DETAIL,e]})})},ISt=e=>{const t=Lt();return jt({mutationFn:n=>jze(n),onSuccess:()=>t.invalidateQueries({queryKey:[It.ROUTINE_DETAIL,e]})})},OSt=e=>{const t=Lt();return jt({mutationFn:n=>Bze(n),onSuccess:()=>t.invalidateQueries({queryKey:[It.ROUTINE_DETAIL,e]})})},ASt=e=>{const t=Lt();return jt({mutationFn:n=>zze(n),onSuccess:()=>t.invalidateQueries({queryKey:[It.ROUTINE_DETAIL,e]})})},kSt=e=>{const t=Lt();return jt({mutationFn:n=>Vze(n),onSuccess:()=>t.invalidateQueries({queryKey:[It.ROUTINE_DETAIL,e]})})},MSt=e=>{const t=Lt();return jt({mutationFn:n=>dze(n),onSuccess:()=>t.invalidateQueries({queryKey:[It.ROUTINE_DETAIL,e]})})},RSt=e=>{const t=Lt();return jt({mutationFn:n=>fze(n),onSuccess:()=>t.invalidateQueries({queryKey:[It.ROUTINE_DETAIL,e]})})},$St=e=>{const t=Lt();return jt({mutationFn:n=>pze(n),onSuccess:()=>t.invalidateQueries({queryKey:[It.ROUTINE_DETAIL,e]})})},DSt=e=>{const t=Lt();return jt({mutationFn:n=>hze(n),onSuccess:()=>t.invalidateQueries({queryKey:[It.ROUTINE_DETAIL,e]})})};function _St(e,t=!1){return fo({queryKey:[It.ROUTINE_LOGS,e,t],queryFn:()=>sze(e,t)})}const MM=e=>{const t=Lt();return jt({mutationFn:n=>lze(n),onSuccess:()=>t.invalidateQueries({queryKey:[It.ROUTINE_DETAIL,e]})})},NSt=e=>{const t=Lt();return jt({mutationFn:n=>uze(n),onSuccess:()=>t.invalidateQueries({queryKey:[It.ROUTINE_DETAIL,e]})})},LSt=e=>{const t=Lt();return jt({mutationFn:n=>cze(n),onSuccess:()=>t.invalidateQueries({queryKey:[It.ROUTINE_DETAIL,e]})})},FSt=()=>fo({queryKey:[It.ROUTINE_WEIGHT_UNITS],queryFn:Tz}),jSt=()=>fo({queryKey:[It.ROUTINE_REP_UNITS],queryFn:Pz}),BSt=e=>{const t=Lt();return jt({mutationFn:n=>gze(n),onSuccess:()=>t.invalidateQueries({queryKey:[It.ROUTINE_DETAIL,e]})})},zSt=e=>{const t=Lt();return jt({mutationFn:n=>mze(n),onSuccess:()=>t.invalidateQueries({queryKey:[It.ROUTINE_DETAIL,e]})})},VSt=e=>{const t=Lt();return jt({mutationFn:n=>yze(n),onSuccess:()=>t.invalidateQueries({queryKey:[It.ROUTINE_DETAIL,e]})})},HSt=e=>{const t=Lt();return jt({mutationFn:n=>vze(n),onSuccess:()=>t.invalidateQueries({queryKey:[It.ROUTINE_DETAIL,e]})})};/** +`+(s!==a?`result of cast: ${s}`:""))}return i}_cast(t,n){let r=t===void 0?t:this.transforms.reduce((o,i)=>i.call(this,o,t,this),t);return r===void 0&&(r=this.getDefault(n)),r}_validate(t,n={},r,o){let{path:i,originalValue:a=t,strict:s=this.spec.strict}=n,l=t;s||(l=this._cast(l,Object.assign({assert:!1},n)));let c=[];for(let u of Object.values(this.internalTests))u&&c.push(u);this.runTests({path:i,value:l,originalValue:a,options:n,tests:c},r,u=>{if(u.length)return o(u,l);this.runTests({path:i,value:l,originalValue:a,options:n,tests:this.tests},r,o)})}runTests(t,n,r){let o=!1,{tests:i,value:a,originalValue:s,path:l,options:c}=t,u=m=>{o||(o=!0,n(m,a))},d=m=>{o||(o=!0,r(m,a))},f=i.length,p=[];if(!f)return d([]);let h={value:a,originalValue:s,path:l,options:c,schema:this};for(let m=0;mthis.resolve(u)._validate(c,u,f,p)}validate(t,n){var r;let o=this.resolve(Object.assign({},n,{value:t})),i=(r=n==null?void 0:n.disableStackTrace)!=null?r:o.spec.disableStackTrace;return new Promise((a,s)=>o._validate(t,n,(l,c)=>{Ca.isError(l)&&(l.value=c),s(l)},(l,c)=>{l.length?s(new Ca(l,c,void 0,void 0,i)):a(c)}))}validateSync(t,n){var r;let o=this.resolve(Object.assign({},n,{value:t})),i,a=(r=n==null?void 0:n.disableStackTrace)!=null?r:o.spec.disableStackTrace;return o._validate(t,Object.assign({},n,{sync:!0}),(s,l)=>{throw Ca.isError(s)&&(s.value=l),s},(s,l)=>{if(s.length)throw new Ca(s,t,void 0,void 0,a);i=l}),i}isValid(t,n){return this.validate(t,n).then(()=>!0,r=>{if(Ca.isError(r))return!1;throw r})}isValidSync(t,n){try{return this.validateSync(t,n),!0}catch(r){if(Ca.isError(r))return!1;throw r}}_getDefault(t){let n=this.spec.default;return n==null?n:typeof n=="function"?n.call(this,t):Ty(n)}getDefault(t){return this.resolve(t||{})._getDefault(t)}default(t){return arguments.length===0?this._getDefault():this.clone({default:t})}strict(t=!0){return this.clone({strict:t})}nullability(t,n){const r=this.clone({nullable:t});return r.internalTests.nullable=Bm({message:n,name:"nullable",test(o){return o===null?this.schema.spec.nullable:!0}}),r}optionality(t,n){const r=this.clone({optional:t});return r.internalTests.optionality=Bm({message:n,name:"optionality",test(o){return o===void 0?this.schema.spec.optional:!0}}),r}optional(){return this.optionality(!0)}defined(t=qc.defined){return this.optionality(!1,t)}nullable(){return this.nullability(!0)}nonNullable(t=qc.notNull){return this.nullability(!1,t)}required(t=qc.required){return this.clone().withMutation(n=>n.nonNullable(t).defined(t))}notRequired(){return this.clone().withMutation(t=>t.nullable().optional())}transform(t){let n=this.clone();return n.transforms.push(t),n}test(...t){let n;if(t.length===1?typeof t[0]=="function"?n={test:t[0]}:n=t[0]:t.length===2?n={name:t[0],test:t[1]}:n={name:t[0],message:t[1],test:t[2]},n.message===void 0&&(n.message=qc.default),typeof n.test!="function")throw new TypeError("`test` is a required parameters");let r=this.clone(),o=Bm(n),i=n.exclusive||n.name&&r.exclusiveTests[n.name]===!0;if(n.exclusive&&!n.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return n.name&&(r.exclusiveTests[n.name]=!!n.exclusive),r.tests=r.tests.filter(a=>!(a.OPTIONS.name===n.name&&(i||a.OPTIONS.test===o.OPTIONS.test))),r.tests.push(o),r}when(t,n){!Array.isArray(t)&&typeof t!="string"&&(n=t,t=".");let r=this.clone(),o=Nue(t).map(i=>new jp(i));return o.forEach(i=>{i.isSibling&&r.deps.push(i.key)}),r.conditions.push(typeof n=="function"?new $O(o,n):$O.fromOptions(o,n)),r}typeError(t){let n=this.clone();return n.internalTests.typeError=Bm({message:t,name:"typeError",skipAbsent:!0,test(r){return this.schema._typeCheck(r)?!0:this.createError({params:{type:this.schema.type}})}}),n}oneOf(t,n=qc.oneOf){let r=this.clone();return t.forEach(o=>{r._whitelist.add(o),r._blacklist.delete(o)}),r.internalTests.whiteList=Bm({message:n,name:"oneOf",skipAbsent:!0,test(o){let i=this.schema._whitelist,a=i.resolveAll(this.resolve);return a.includes(o)?!0:this.createError({params:{values:Array.from(i).join(", "),resolved:a}})}}),r}notOneOf(t,n=qc.notOneOf){let r=this.clone();return t.forEach(o=>{r._blacklist.add(o),r._whitelist.delete(o)}),r.internalTests.blacklist=Bm({message:n,name:"notOneOf",test(o){let i=this.schema._blacklist,a=i.resolveAll(this.resolve);return a.includes(o)?this.createError({params:{values:Array.from(i).join(", "),resolved:a}}):!0}}),r}strip(t=!0){let n=this.clone();return n.spec.strip=t,n}describe(t){const n=(t?this.resolve(t):this).clone(),{label:r,meta:o,optional:i,nullable:a}=n.spec;return{meta:o,label:r,optional:i,nullable:a,default:n.getDefault(t),type:n.type,oneOf:n._whitelist.describe(),notOneOf:n._blacklist.describe(),tests:n.tests.map(l=>({name:l.OPTIONS.name,params:l.OPTIONS.params})).filter((l,c,u)=>u.findIndex(d=>d.name===l.name)===c)}}}As.prototype.__isYupSchema__=!0;for(const e of["validate","validateSync"])As.prototype[`${e}At`]=function(t,n,r={}){const{parent:o,parentPath:i,schema:a}=hSt(this,t,n,r.context);return a[e](o&&o[i],Object.assign({},r,{parent:o,path:t}))};for(const e of["equals","is"])As.prototype[e]=As.prototype.oneOf;for(const e of["not","nope"])As.prototype[e]=As.prototype.notOneOf;function JS(){return new Bue}class Bue extends As{constructor(){super({type:"boolean",check(t){return t instanceof Boolean&&(t=t.valueOf()),typeof t=="boolean"}}),this.withMutation(()=>{this.transform((t,n,r)=>{if(r.spec.coerce&&!r.isType(t)){if(/^(true|1)$/i.test(String(t)))return!0;if(/^(false|0)$/i.test(String(t)))return!1}return t})})}isTrue(t=RF.isValue){return this.test({message:t,name:"is-value",exclusive:!0,params:{value:"true"},test(n){return vc(n)||n===!0}})}isFalse(t=RF.isValue){return this.test({message:t,name:"is-value",exclusive:!0,params:{value:"false"},test(n){return vc(n)||n===!1}})}default(t){return super.default(t)}defined(t){return super.defined(t)}optional(){return super.optional()}required(t){return super.required(t)}notRequired(){return super.notRequired()}nullable(){return super.nullable()}nonNullable(t){return super.nonNullable(t)}strip(t){return super.strip(t)}}JS.prototype=Bue.prototype;const gSt=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function mSt(e){const t=DF(e);if(!t)return Date.parse?Date.parse(e):Number.NaN;if(t.z===void 0&&t.plusMinus===void 0)return new Date(t.year,t.month,t.day,t.hour,t.minute,t.second,t.millisecond).valueOf();let n=0;return t.z!=="Z"&&t.plusMinus!==void 0&&(n=t.hourOffset*60+t.minuteOffset,t.plusMinus==="+"&&(n=0-n)),Date.UTC(t.year,t.month,t.day,t.hour,t.minute+n,t.second,t.millisecond)}function DF(e){var t,n;const r=gSt.exec(e);return r?{year:Uu(r[1]),month:Uu(r[2],1)-1,day:Uu(r[3],1),hour:Uu(r[4]),minute:Uu(r[5]),second:Uu(r[6]),millisecond:r[7]?Uu(r[7].substring(0,3)):0,precision:(t=(n=r[7])==null?void 0:n.length)!=null?t:void 0,z:r[8]||void 0,plusMinus:r[9]||void 0,hourOffset:Uu(r[10]),minuteOffset:Uu(r[11])}:null}function Uu(e,t=0){return Number(e)||t}let ySt=/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,vSt=/^((https?|ftp):)?\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,bSt=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,wSt="^\\d{4}-\\d{2}-\\d{2}",xSt="\\d{2}:\\d{2}:\\d{2}",SSt="(([+-]\\d{2}(:?\\d{2})?)|Z)",CSt=new RegExp(`${wSt}T${xSt}(\\.\\d+)?${SSt}$`),ESt=e=>vc(e)||e===e.trim(),PSt={}.toString();function ja(){return new zue}class zue extends As{constructor(){super({type:"string",check(t){return t instanceof String&&(t=t.valueOf()),typeof t=="string"}}),this.withMutation(()=>{this.transform((t,n,r)=>{if(!r.spec.coerce||r.isType(t)||Array.isArray(t))return t;const o=t!=null&&t.toString?t.toString():t;return o===PSt?t:o})})}required(t){return super.required(t).withMutation(n=>n.test({message:t||qc.required,name:"required",skipAbsent:!0,test:r=>!!r.length}))}notRequired(){return super.notRequired().withMutation(t=>(t.tests=t.tests.filter(n=>n.OPTIONS.name!=="required"),t))}length(t,n=va.length){return this.test({message:n,name:"length",exclusive:!0,params:{length:t},skipAbsent:!0,test(r){return r.length===this.resolve(t)}})}min(t,n=va.min){return this.test({message:n,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(r){return r.length>=this.resolve(t)}})}max(t,n=va.max){return this.test({name:"max",exclusive:!0,message:n,params:{max:t},skipAbsent:!0,test(r){return r.length<=this.resolve(t)}})}matches(t,n){let r=!1,o,i;return n&&(typeof n=="object"?{excludeEmptyString:r=!1,message:o,name:i}=n:o=n),this.test({name:i||"matches",message:o||va.matches,params:{regex:t},skipAbsent:!0,test:a=>a===""&&r||a.search(t)!==-1})}email(t=va.email){return this.matches(ySt,{name:"email",message:t,excludeEmptyString:!0})}url(t=va.url){return this.matches(vSt,{name:"url",message:t,excludeEmptyString:!0})}uuid(t=va.uuid){return this.matches(bSt,{name:"uuid",message:t,excludeEmptyString:!1})}datetime(t){let n="",r,o;return t&&(typeof t=="object"?{message:n="",allowOffset:r=!1,precision:o=void 0}=t:n=t),this.matches(CSt,{name:"datetime",message:n||va.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:n||va.datetime_offset,params:{allowOffset:r},skipAbsent:!0,test:i=>{if(!i||r)return!0;const a=DF(i);return a?!!a.z:!1}}).test({name:"datetime_precision",message:n||va.datetime_precision,params:{precision:o},skipAbsent:!0,test:i=>{if(!i||o==null)return!0;const a=DF(i);return a?a.precision===o:!1}})}ensure(){return this.default("").transform(t=>t===null?"":t)}trim(t=va.trim){return this.transform(n=>n!=null?n.trim():n).test({message:t,name:"trim",test:ESt})}lowercase(t=va.lowercase){return this.transform(n=>vc(n)?n:n.toLowerCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:n=>vc(n)||n===n.toLowerCase()})}uppercase(t=va.uppercase){return this.transform(n=>vc(n)?n:n.toUpperCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:n=>vc(n)||n===n.toUpperCase()})}}ja.prototype=zue.prototype;let TSt=e=>e!=+e;function Pa(){return new Vue}class Vue extends As{constructor(){super({type:"number",check(t){return t instanceof Number&&(t=t.valueOf()),typeof t=="number"&&!TSt(t)}}),this.withMutation(()=>{this.transform((t,n,r)=>{if(!r.spec.coerce)return t;let o=t;if(typeof o=="string"){if(o=o.replace(/\s/g,""),o==="")return NaN;o=+o}return r.isType(o)||o===null?o:parseFloat(o)})})}min(t,n=sf.min){return this.test({message:n,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(r){return r>=this.resolve(t)}})}max(t,n=sf.max){return this.test({message:n,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(r){return r<=this.resolve(t)}})}lessThan(t,n=sf.lessThan){return this.test({message:n,name:"max",exclusive:!0,params:{less:t},skipAbsent:!0,test(r){return rthis.resolve(t)}})}positive(t=sf.positive){return this.moreThan(0,t)}negative(t=sf.negative){return this.lessThan(0,t)}integer(t=sf.integer){return this.test({name:"integer",message:t,skipAbsent:!0,test:n=>Number.isInteger(n)})}truncate(){return this.transform(t=>vc(t)?t:t|0)}round(t){var n;let r=["ceil","floor","round","trunc"];if(t=((n=t)==null?void 0:n.toLowerCase())||"round",t==="trunc")return this.truncate();if(r.indexOf(t.toLowerCase())===-1)throw new TypeError("Only valid options for round() are: "+r.join(", "));return this.transform(o=>vc(o)?o:Math[t](o))}}Pa.prototype=Vue.prototype;let Hue=new Date(""),ISt=e=>Object.prototype.toString.call(e)==="[object Date]";function Tg(){return new x1}class x1 extends As{constructor(){super({type:"date",check(t){return ISt(t)&&!isNaN(t.getTime())}}),this.withMutation(()=>{this.transform((t,n,r)=>!r.spec.coerce||r.isType(t)||t===null?t:(t=mSt(t),isNaN(t)?x1.INVALID_DATE:new Date(t)))})}prepareParam(t,n){let r;if(jp.isRef(t))r=t;else{let o=this.cast(t);if(!this._typeCheck(o))throw new TypeError(`\`${n}\` must be a Date or a value that can be \`cast()\` to a Date`);r=o}return r}min(t,n=MF.min){let r=this.prepareParam(t,"min");return this.test({message:n,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(o){return o>=this.resolve(r)}})}max(t,n=MF.max){let r=this.prepareParam(t,"max");return this.test({message:n,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(o){return o<=this.resolve(r)}})}}x1.INVALID_DATE=Hue;Tg.prototype=x1.prototype;Tg.INVALID_DATE=Hue;function OSt(e,t=[]){let n=[],r=new Set,o=new Set(t.map(([a,s])=>`${a}-${s}`));function i(a,s){let l=ig.split(a)[0];r.add(l),o.has(`${s}-${l}`)||n.push([s,l])}for(const a of Object.keys(e)){let s=e[a];r.add(a),jp.isRef(s)&&s.isSibling?i(s.path,a):_M(s)&&"deps"in s&&s.deps.forEach(l=>i(l,a))}return oSt.array(Array.from(r),n).reverse()}function fY(e,t){let n=1/0;return e.some((r,o)=>{var i;if((i=t.path)!=null&&i.includes(r))return n=o,!0}),n}function Uue(e){return(t,n)=>fY(e,t)-fY(e,n)}const Wue=(e,t,n)=>{if(typeof e!="string")return e;let r=e;try{r=JSON.parse(e)}catch{}return n.isType(r)?r:e};function bT(e){if("fields"in e){const t={};for(const[n,r]of Object.entries(e.fields))t[n]=bT(r);return e.setFields(t)}if(e.type==="array"){const t=e.optional();return t.innerType&&(t.innerType=bT(t.innerType)),t}return e.type==="tuple"?e.optional().clone({types:e.spec.types.map(bT)}):"optional"in e?e.optional():e}const ASt=(e,t)=>{const n=[...ig.normalizePath(t)];if(n.length===1)return n[0]in e;let r=n.pop(),o=ig.getter(ig.join(n),!0)(e);return!!(o&&r in o)};let pY=e=>Object.prototype.toString.call(e)==="[object Object]";function kSt(e,t){let n=Object.keys(e.fields);return Object.keys(t).filter(r=>n.indexOf(r)===-1)}const MSt=Uue([]);function Ha(e){return new Gue(e)}class Gue extends As{constructor(t){super({type:"object",check(n){return pY(n)||typeof n=="function"}}),this.fields=Object.create(null),this._sortErrors=MSt,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{t&&this.shape(t)})}_cast(t,n={}){var r;let o=super._cast(t,n);if(o===void 0)return this.getDefault(n);if(!this._typeCheck(o))return o;let i=this.fields,a=(r=n.stripUnknown)!=null?r:this.spec.noUnknown,s=[].concat(this._nodes,Object.keys(o).filter(d=>!this._nodes.includes(d))),l={},c=Object.assign({},n,{parent:l,__validating:n.__validating||!1}),u=!1;for(const d of s){let f=i[d],p=d in o;if(f){let h,m=o[d];c.path=(n.path?`${n.path}.`:"")+d,f=f.resolve({value:m,context:n.context,parent:l});let y=f instanceof As?f.spec:void 0,w=y==null?void 0:y.strict;if(y!=null&&y.strip){u=u||d in o;continue}h=!n.__validating||!w?f.cast(o[d],c):o[d],h!==void 0&&(l[d]=h)}else p&&!a&&(l[d]=o[d]);(p!==d in l||l[d]!==o[d])&&(u=!0)}return u?l:o}_validate(t,n={},r,o){let{from:i=[],originalValue:a=t,recursive:s=this.spec.recursive}=n;n.from=[{schema:this,value:a},...i],n.__validating=!0,n.originalValue=a,super._validate(t,n,r,(l,c)=>{if(!s||!pY(c)){o(l,c);return}a=a||c;let u=[];for(let d of this._nodes){let f=this.fields[d];!f||jp.isRef(f)||u.push(f.asNestedTest({options:n,key:d,parent:c,parentPath:n.path,originalParent:a}))}this.runTests({tests:u,value:c,originalValue:a,options:n},r,d=>{o(d.sort(this._sortErrors).concat(l),c)})})}clone(t){const n=super.clone(t);return n.fields=Object.assign({},this.fields),n._nodes=this._nodes,n._excludedEdges=this._excludedEdges,n._sortErrors=this._sortErrors,n}concat(t){let n=super.concat(t),r=n.fields;for(let[o,i]of Object.entries(this.fields)){const a=r[o];r[o]=a===void 0?i:a}return n.withMutation(o=>o.setFields(r,[...this._excludedEdges,...t._excludedEdges]))}_getDefault(t){if("default"in this.spec)return super._getDefault(t);if(!this._nodes.length)return;let n={};return this._nodes.forEach(r=>{var o;const i=this.fields[r];let a=t;(o=a)!=null&&o.value&&(a=Object.assign({},a,{parent:a.value,value:a.value[r]})),n[r]=i&&"getDefault"in i?i.getDefault(a):void 0}),n}setFields(t,n){let r=this.clone();return r.fields=t,r._nodes=OSt(t,n),r._sortErrors=Uue(Object.keys(t)),n&&(r._excludedEdges=n),r}shape(t,n=[]){return this.clone().withMutation(r=>{let o=r._excludedEdges;return n.length&&(Array.isArray(n[0])||(n=[n]),o=[...r._excludedEdges,...n]),r.setFields(Object.assign(r.fields,t),o)})}partial(){const t={};for(const[n,r]of Object.entries(this.fields))t[n]="optional"in r&&r.optional instanceof Function?r.optional():r;return this.setFields(t)}deepPartial(){return bT(this)}pick(t){const n={};for(const r of t)this.fields[r]&&(n[r]=this.fields[r]);return this.setFields(n,this._excludedEdges.filter(([r,o])=>t.includes(r)&&t.includes(o)))}omit(t){const n=[];for(const r of Object.keys(this.fields))t.includes(r)||n.push(r);return this.pick(n)}from(t,n,r){let o=ig.getter(t,!0);return this.transform(i=>{if(!i)return i;let a=i;return ASt(i,t)&&(a=Object.assign({},i),r||delete a[t],a[n]=o(i)),a})}json(){return this.transform(Wue)}noUnknown(t=!0,n=$F.noUnknown){typeof t!="boolean"&&(n=t,t=!0);let r=this.test({name:"noUnknown",exclusive:!0,message:n,test(o){if(o==null)return!0;const i=kSt(this.schema,o);return!t||i.length===0||this.createError({params:{unknown:i.join(", ")}})}});return r.spec.noUnknown=t,r}unknown(t=!0,n=$F.noUnknown){return this.noUnknown(!t,n)}transformKeys(t){return this.transform(n=>{if(!n)return n;const r={};for(const o of Object.keys(n))r[t(o)]=n[o];return r})}camelCase(){return this.transformKeys(c_.camelCase)}snakeCase(){return this.transformKeys(c_.snakeCase)}constantCase(){return this.transformKeys(t=>c_.snakeCase(t).toUpperCase())}describe(t){const n=(t?this.resolve(t):this).clone(),r=super.describe(t);r.fields={};for(const[i,a]of Object.entries(n.fields)){var o;let s=t;(o=s)!=null&&o.value&&(s=Object.assign({},s,{parent:s.value,value:s.value[i]})),r.fields[i]=a.describe(s)}return r}}Ha.prototype=Gue.prototype;function C5(e){return new que(e)}class que extends As{constructor(t){super({type:"array",spec:{types:t},check(n){return Array.isArray(n)}}),this.innerType=void 0,this.innerType=t}_cast(t,n){const r=super._cast(t,n);if(!this._typeCheck(r)||!this.innerType)return r;let o=!1;const i=r.map((a,s)=>{const l=this.innerType.cast(a,Object.assign({},n,{path:`${n.path||""}[${s}]`}));return l!==a&&(o=!0),l});return o?i:r}_validate(t,n={},r,o){var i;let a=this.innerType,s=(i=n.recursive)!=null?i:this.spec.recursive;n.originalValue!=null&&n.originalValue,super._validate(t,n,r,(l,c)=>{var u;if(!s||!a||!this._typeCheck(c)){o(l,c);return}let d=new Array(c.length);for(let p=0;po(p.concat(l),c))})}clone(t){const n=super.clone(t);return n.innerType=this.innerType,n}json(){return this.transform(Wue)}concat(t){let n=super.concat(t);return n.innerType=this.innerType,t.innerType&&(n.innerType=n.innerType?n.innerType.concat(t.innerType):t.innerType),n}of(t){let n=this.clone();if(!_M(t))throw new TypeError("`array.of()` sub-schema must be a valid yup schema not: "+pd(t));return n.innerType=t,n.spec=Object.assign({},n.spec,{types:t}),n}length(t,n=vT.length){return this.test({message:n,name:"length",exclusive:!0,params:{length:t},skipAbsent:!0,test(r){return r.length===this.resolve(t)}})}min(t,n){return n=n||vT.min,this.test({message:n,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(r){return r.length>=this.resolve(t)}})}max(t,n){return n=n||vT.max,this.test({message:n,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(r){return r.length<=this.resolve(t)}})}ensure(){return this.default(()=>[]).transform((t,n)=>this._typeCheck(t)?t:n==null?[]:[].concat(n))}compact(t){let n=t?(r,o,i)=>!t(r,o,i):r=>!!r;return this.transform(r=>r!=null?r.filter(n):r)}describe(t){const n=(t?this.resolve(t):this).clone(),r=super.describe(t);if(n.innerType){var o;let i=t;(o=i)!=null&&o.value&&(i=Object.assign({},i,{parent:i.value,value:i.value[0]})),r.innerType=n.innerType.describe(i)}return r}}C5.prototype=que.prototype;const E5=({planId:e,entry:t,mealId:n,meals:r,closeFn:o})=>{const i=n===void 0?null:n,a=r===void 0?[]:r,[s,l]=Le(),c=Yje(e),u=Qje(e),[d,f]=v.useState(t?vt.fromJSDate(t.datetime):vt.now()),[p,h]=v.useState(i),m=Ha({amount:Pa().required(s("forms.fieldRequired")).max(1e3,s("forms.maxValue",{value:"1000"})).min(1,s("forms.minValue",{value:"1"})),ingredient:Pa().required(s("forms.fieldRequired")),datetime:Tg().required(s("forms.fieldRequired"))});return b(Va,{initialValues:{datetime:new Date,amount:0,ingredient:0},validationSchema:m,onSubmit:async y=>{const w={...y,plan:e,meal:p,weight_unit:null,datetime:y.datetime.toISOString()};t?u.mutate({...w,id:t.id}):c.mutate(w),o&&o()},children:y=>b(pa,{children:G(Wt,{spacing:2,children:[b(c5,{callback:w=>y.setFieldValue("ingredient",w==null?void 0:w.data.id)}),b(nn,{fullWidth:!0,id:"amount",label:"amount",InputProps:{endAdornment:b(Co,{position:"end",children:s("nutrition.gramShort")})},error:y.touched.amount&&!!y.errors.amount,helperText:y.touched.amount&&y.errors.amount,...y.getFieldProps("amount")}),a.length>0&&b(Oc,{value:p,options:a.map(w=>w.id),getOptionLabel:w=>a.find(x=>x.id===w).displayName,onChange:(w,x)=>h(x),renderInput:w=>b(nn,{label:s("nutrition.meal"),value:p,...w})}),b(Cg,{dateAdapter:ub,adapterLocale:l.language,children:b(Smt,{format:"yyyy-MM-dd HH:mm",label:s("date"),value:d,disableFuture:!0,onChange:w=>{y.setFieldValue("datetime",w==null?void 0:w.toJSDate()),f(w)},shouldDisableDate:w=>(t&&yi(t.datetime)===yi(w.toJSDate()),!1)})}),G(Wt,{direction:"row",justifyContent:"end",spacing:2,children:[o!==void 0&&b(dt,{color:"primary",variant:"outlined",onClick:()=>o(),children:s("close")}),b(dt,{color:"primary",variant:"contained",type:"submit",children:s("submit")})]})]})})})},P5=({plan:e,closeFn:t})=>{const[n]=Le(),r=Gje(),o=Kje(e==null?void 0:e.id),[i,a]=v.useState(e==null?void 0:e.hasAnyGoals),s=Ha({description:ja().required().max(25,n("forms.maxLength",{chars:"25"})).min(3,n("forms.minLength",{chars:"3"})),only_logging:JS(),goal_energy:Pa().notRequired().positive().max(6e3,n("forms.maxValue",{value:"6000kcal"})),goal_protein:Pa().notRequired().positive().max(500,n("forms.maxValue",{value:"500"})),goal_carbohydrates:Pa().notRequired().positive().max(750,n("forms.maxValue",{value:"750"})),goal_fiber:Pa().notRequired().positive().max(500,n("forms.maxValue",{value:"500"})),goal_fat:Pa().notRequired().positive().max(500,n("forms.maxValue",{value:"500"}))});return b(Va,{initialValues:{description:e?e.description:n("nutrition.plan"),only_logging:e?e.onlyLogging:!0,goal_energy:e?e.goalEnergy:null,goal_protein:e?e.goalProtein:null,goal_carbohydrates:e?e.goalCarbohydrates:null,goal_fiber:e?e.goalFiber:null,goal_fat:e?e.goalFat:null},validationSchema:s,onSubmit:async l=>{l.goal_energy=l.goal_energy?l.goal_energy:null,l.goal_protein=l.goal_protein?l.goal_protein:null,l.goal_carbohydrates=l.goal_carbohydrates?l.goal_carbohydrates:null,l.goal_fiber=l.goal_fiber?l.goal_fiber:null,l.goal_fat=l.goal_fat?l.goal_fat:null,e?o.mutate({...l,id:e.id}):r.mutate(l),t&&t()},children:l=>b(pa,{children:G(Wt,{spacing:2,children:[b(nn,{fullWidth:!0,id:"description",label:n("description"),error:l.touched.description&&!!l.errors.description,helperText:l.touched.description&&l.errors.description,...l.getFieldProps("description")}),b(yk,{children:b(Mc,{label:n("nutrition.onlyLoggingHelpText"),control:b(La,{id:"onlyLogging",checked:l.values.only_logging,...l.getFieldProps("only_logging")})})}),b(Mc,{label:n("nutrition.useGoalsHelpText"),control:b(La,{id:"goalEnergy",checked:i,onChange:()=>a(!i)})}),b(HC,{children:n("nutrition.useGoalsHelpTextLong")}),i&&G(wt,{children:[b(nn,{fullWidth:!0,id:"energy",label:n("nutrition.goalEnergy"),error:l.touched.goal_energy&&!!l.errors.goal_energy,helperText:l.touched.goal_energy&&l.errors.goal_energy,...l.getFieldProps("goal_energy"),InputProps:{endAdornment:b(Co,{position:"end",children:n("nutrition.kcal")})}}),G(Oe,{container:!0,spacing:1,children:[b(Oe,{size:4,children:b(nn,{id:"protein",label:n("nutrition.goalProtein"),error:l.touched.goal_protein&&!!l.errors.goal_protein,helperText:l.touched.goal_protein&&l.errors.goal_protein,...l.getFieldProps("goal_protein"),InputProps:{startAdornment:b(Co,{position:"start",children:l.values.goal_protein!==null&&l.values.goal_protein!==void 0?n("nutrition.valueEnergyKcal",{value:l.values.goal_protein*zy.protein}):""}),endAdornment:b(Co,{position:"end",children:n("nutrition.gramShort")})}})}),b(Oe,{size:4,children:b(nn,{id:"carbohydrates",label:n("nutrition.goalCarbohydrates"),error:l.touched.goal_carbohydrates&&!!l.errors.goal_carbohydrates,helperText:l.touched.goal_carbohydrates&&l.errors.goal_carbohydrates,...l.getFieldProps("goal_carbohydrates"),InputProps:{startAdornment:b(Co,{position:"start",children:l.values.goal_carbohydrates!==null&&l.values.goal_carbohydrates!==void 0?n("nutrition.valueEnergyKcal",{value:l.values.goal_carbohydrates*zy.carbohydrates}):""}),endAdornment:b(Co,{position:"end",children:n("nutrition.gramShort")})}})}),b(Oe,{size:4,children:b(nn,{id:"fat",label:n("nutrition.goalFat"),error:l.touched.goal_fat&&!!l.errors.goal_fat,helperText:l.touched.goal_fat&&l.errors.goal_fat,...l.getFieldProps("goal_fat"),InputProps:{startAdornment:b(Co,{position:"start",children:l.values.goal_fat!==null&&l.values.goal_fat!==void 0?n("nutrition.valueEnergyKcal",{value:l.values.goal_fat*zy.fat}):""}),endAdornment:b(Co,{position:"end",children:n("nutrition.gramShort")})}})})]}),b(Oe,{container:!0,spacing:1,children:b(Oe,{size:4,children:b(nn,{id:"fiber",label:n("nutrition.goalFiber"),error:l.touched.goal_fiber&&!!l.errors.goal_fiber,helperText:l.touched.goal_fiber&&l.errors.goal_fiber,...l.getFieldProps("goal_fiber"),InputProps:{startAdornment:b(Co,{position:"start",children:n("nutrition.valueEnergyKcal",{value:0})}),endAdornment:b(Co,{position:"end",children:n("nutrition.gramShort")})}})})})]}),b(Wt,{direction:"row",justifyContent:"end",sx:{mt:2},children:b(dt,{color:"primary",variant:"contained",type:"submit",sx:{mt:2},children:n("submit")})})]})})})},Kue=()=>{const[e]=Le(),t=Hje();return t.isLoading?b(mo,{}):t.data!==null?b(RSt,{plan:t.data}):b(lz,{title:e("nutritionalPlan"),modalContent:b(P5,{}),modalTitle:e("add")})};function RSt(e){const[t,n]=Le(),[r,o]=Y.useState(!1),i=()=>o(!0),a=()=>o(!1);return G(wt,{children:[G(to,{children:[b(jl,{title:t("nutritionalPlan"),subheader:e.plan.description}),G(ni,{sx:{height:"500px",overflow:"auto"},children:[b(cut,{percentage:e.plan.percentageValuesLoggedToday,planned:e.plan.plannedNutritionalValues,logged:e.plan.loggedNutritionalValuesToday}),b(Bl,{children:e.plan.meals.map(s=>b($St,{meal:s,planId:e.plan.id},s.id))})]}),G(Ds,{sx:{justifyContent:"space-between",alignItems:"flex-start"},children:[b(dt,{size:"small",href:Mn(Tn.NUTRITION_DETAIL,n.language,{id:e.plan.id}),children:t("seeDetails")}),b(Rc,{title:t("nutrition.logThisMealItem"),children:b(vn,{onClick:i,children:b(GC,{})})})]})]}),b(Fi,{title:t("nutrition.addNutritionalDiary"),isOpen:r,closeFn:a,children:b(E5,{closeFn:a,planId:e.plan.id,meals:e.plan.meals})})]})}const $St=e=>{const[t,n]=Le(),r=Ure(e.planId),[o,i]=v.useState(!1),[a,s]=Y.useState(!1),l=()=>i(!o),c=(p,h)=>{h!=="clickaway"&&s(!1)},u=p=>{const h=[{plan:e.planId,meal:e.meal.id,mealItem:p.id,ingredient:p.ingredientId,weight_unit:p.weightUnitId,datetime:new Date().toISOString(),amount:p.amount}];r.mutate(h),s(!0)},d=e.meal.name?e.meal.name:vI(e.meal.time,n.language),f=e.meal.name?vI(e.meal.time,n.language):null;return G(wt,{children:[G(Ip,{onClick:l,selected:o,children:[b(sa,{children:o?b(ure,{}):b(Rb,{})}),b(ko,{primary:d,secondary:f})]}),b(xl,{in:o,timeout:"auto",unmountOnExit:!0,children:b(Bl,{children:e.meal.items.map(p=>{var h,m,y,w;return G(Os,{secondaryAction:b(Rc,{title:t("nutrition.logThisMealItem"),children:b(vn,{edge:"end",onClick:()=>u(p),children:b(GC,{})})}),children:[b(rz,{children:b(Ac,{alt:(h=p.ingredient)==null?void 0:h.name,src:(y=(m=p.ingredient)==null?void 0:m.image)==null?void 0:y.url,sx:{width:45,height:45},children:b(Rd,{})})}),b(ko,{primary:(w=p.ingredient)==null?void 0:w.name,secondary:kn(p.amount,n.language)})]},p.id)})})}),b(az,{open:a,autoHideDuration:yz,onClose:c,children:b(kl,{onClose:c,severity:"success",sx:{width:"100%"},children:t("nutrition.diaryEntrySaved")})})]})};function Xg(e){return ho({queryKey:[Ct.ROUTINE_DETAIL,e],queryFn:()=>gze(e)})}function DSt(){return ho({queryKey:[Ct.ROUTINES_SHALLOW],queryFn:mze})}function _St(){return ho({queryKey:[Ct.ROUTINES_ACTIVE],queryFn:hze})}const NSt=()=>{const e=Lt();return jt({mutationFn:t=>yze(t),onSuccess:()=>e.invalidateQueries({queryKey:[Ct.ROUTINE_OVERVIEW]})})},LSt=e=>{const t=Lt();return jt({mutationFn:n=>vze(n),onSuccess:()=>{t.invalidateQueries({queryKey:[Ct.ROUTINE_OVERVIEW]}),t.invalidateQueries({queryKey:[Ct.ROUTINE_DETAIL,e]})}})},FSt=e=>{const t=Lt();return jt({mutationFn:()=>bze(e),onSuccess:()=>{t.invalidateQueries({queryKey:[Ct.ROUTINE_OVERVIEW]}),t.invalidateQueries({queryKey:[Ct.ROUTINE_DETAIL,e]})}})},jSt=e=>{const t=Lt();return jt({mutationFn:n=>Kze(n),onSuccess:()=>t.invalidateQueries({queryKey:[Ct.ROUTINE_DETAIL,e]})})},BSt=e=>{const t=Lt();return jt({mutationFn:n=>Yze(n),onSuccess:()=>t.invalidateQueries({queryKey:[Ct.ROUTINE_DETAIL,e]})})},zSt=e=>{const t=Lt();return jt({mutationFn:n=>Qze(n),onSuccess:()=>t.invalidateQueries({queryKey:[Ct.ROUTINE_DETAIL,e]})})},VSt=e=>{const t=Lt();return jt({mutationFn:n=>Xze(n),onSuccess:()=>t.invalidateQueries({queryKey:[Ct.ROUTINE_DETAIL,e]})})},HSt=e=>{const t=Lt();return jt({mutationFn:n=>Jze(n),onSuccess:()=>t.invalidateQueries({queryKey:[Ct.ROUTINE_DETAIL,e]})})},USt=e=>{const t=Lt();return jt({mutationFn:n=>Zze(n),onSuccess:()=>t.invalidateQueries({queryKey:[Ct.ROUTINE_DETAIL,e]})})},WSt=e=>{const t=Lt();return jt({mutationFn:n=>eVe(n),onSuccess:()=>t.invalidateQueries({queryKey:[Ct.ROUTINE_DETAIL,e]})})},GSt=e=>{const t=Lt();return jt({mutationFn:n=>tVe(n),onSuccess:()=>t.invalidateQueries({queryKey:[Ct.ROUTINE_DETAIL,e]})})},qSt=e=>{const t=Lt();return jt({mutationFn:n=>nVe(n),onSuccess:()=>t.invalidateQueries({queryKey:[Ct.ROUTINE_DETAIL,e]})})},KSt=e=>{const t=Lt();return jt({mutationFn:n=>rVe(n),onSuccess:()=>t.invalidateQueries({queryKey:[Ct.ROUTINE_DETAIL,e]})})},YSt=e=>{const t=Lt();return jt({mutationFn:n=>oVe(n),onSuccess:()=>t.invalidateQueries({queryKey:[Ct.ROUTINE_DETAIL,e]})})},QSt=e=>{const t=Lt();return jt({mutationFn:n=>iVe(n),onSuccess:()=>t.invalidateQueries({queryKey:[Ct.ROUTINE_DETAIL,e]})})},XSt=e=>{const t=Lt();return jt({mutationFn:n=>aVe(n),onSuccess:()=>t.invalidateQueries({queryKey:[Ct.ROUTINE_DETAIL,e]})})},JSt=e=>{const t=Lt();return jt({mutationFn:n=>sVe(n),onSuccess:()=>t.invalidateQueries({queryKey:[Ct.ROUTINE_DETAIL,e]})})},ZSt=e=>{const t=Lt();return jt({mutationFn:n=>lVe(n),onSuccess:()=>t.invalidateQueries({queryKey:[Ct.ROUTINE_DETAIL,e]})})},Yue=e=>{const t=Lt();return jt({mutationFn:n=>cVe(n),onSuccess:()=>t.invalidateQueries({queryKey:[Ct.ROUTINE_DETAIL,e]})})},Que=e=>{const t=Lt();return jt({mutationFn:n=>uVe(n),onSuccess:()=>t.invalidateQueries({queryKey:[Ct.ROUTINE_DETAIL,e]})})},Xue=e=>{const t=Lt();return jt({mutationFn:n=>dVe(n),onSuccess:()=>t.invalidateQueries({queryKey:[Ct.ROUTINE_DETAIL,e]})})},eCt=e=>{const t=Lt();return jt({mutationFn:n=>fVe(n),onSuccess:()=>t.invalidateQueries({queryKey:[Ct.ROUTINE_DETAIL,e]})})},tCt=e=>{const t=Lt();return jt({mutationFn:n=>pVe(n),onSuccess:()=>t.invalidateQueries({queryKey:[Ct.ROUTINE_DETAIL,e]})})},nCt=e=>{const t=Lt();return jt({mutationFn:n=>hVe(n),onSuccess:()=>t.invalidateQueries({queryKey:[Ct.ROUTINE_DETAIL,e]})})},rCt=e=>{const t=Lt();return jt({mutationFn:n=>gVe(n),onSuccess:()=>t.invalidateQueries({queryKey:[Ct.ROUTINE_DETAIL,e]})})},oCt=e=>{const t=Lt();return jt({mutationFn:n=>mVe(n),onSuccess:()=>t.invalidateQueries({queryKey:[Ct.ROUTINE_DETAIL,e]})})},iCt=e=>{const t=Lt();return jt({mutationFn:n=>yVe(n),onSuccess:()=>t.invalidateQueries({queryKey:[Ct.ROUTINE_DETAIL,e]})})},aCt=e=>{const t=Lt();return jt({mutationFn:n=>Bze(n),onSuccess:()=>t.invalidateQueries({queryKey:[Ct.ROUTINE_DETAIL,e]})})},sCt=e=>{const t=Lt();return jt({mutationFn:n=>zze(n),onSuccess:()=>t.invalidateQueries({queryKey:[Ct.ROUTINE_DETAIL,e]})})},lCt=e=>{const t=Lt();return jt({mutationFn:n=>Vze(n),onSuccess:()=>t.invalidateQueries({queryKey:[Ct.ROUTINE_DETAIL,e]})})},cCt=e=>{const t=Lt();return jt({mutationFn:n=>Hze(n),onSuccess:()=>t.invalidateQueries({queryKey:[Ct.ROUTINE_DETAIL,e]})})};function uCt(e,t=!1){return ho({queryKey:[Ct.ROUTINE_LOGS,e,t],queryFn:()=>Nze(e,t)})}const NM=e=>{const t=Lt();return jt({mutationFn:n=>Lze(n),onSuccess:()=>t.invalidateQueries({queryKey:[Ct.ROUTINE_DETAIL,e]})})},dCt=e=>{const t=Lt();return jt({mutationFn:n=>jze(n),onSuccess:()=>t.invalidateQueries({queryKey:[Ct.ROUTINE_DETAIL,e]})})},fCt=e=>{const t=Lt();return jt({mutationFn:n=>Fze(n),onSuccess:()=>t.invalidateQueries({queryKey:[Ct.ROUTINE_DETAIL,e]})})},pCt=()=>ho({queryKey:[Ct.ROUTINE_WEIGHT_UNITS],queryFn:kz}),hCt=()=>ho({queryKey:[Ct.ROUTINE_REP_UNITS],queryFn:Az}),gCt=e=>{const t=Lt();return jt({mutationFn:n=>Uze(n),onSuccess:()=>t.invalidateQueries({queryKey:[Ct.ROUTINE_DETAIL,e]})})},mCt=e=>{const t=Lt();return jt({mutationFn:n=>Wze(n),onSuccess:()=>t.invalidateQueries({queryKey:[Ct.ROUTINE_DETAIL,e]})})},yCt=e=>{const t=Lt();return jt({mutationFn:n=>Gze(n),onSuccess:()=>t.invalidateQueries({queryKey:[Ct.ROUTINE_DETAIL,e]})})},vCt=e=>{const t=Lt();return jt({mutationFn:n=>qze(n),onSuccess:()=>t.invalidateQueries({queryKey:[Ct.ROUTINE_DETAIL,e]})})},T5=e=>{if(e.query.isLoading)return b(mo,{});if(e.query.isError)return b(en,{sx:{height:200,alignItems:"center",mt:2},component:Wt,direction:"column",justifyContent:"center",children:G(kl,{severity:"error",children:["Error while fetching data: ",e.query.error.message]})});if(e.query.isSuccess)return e.child},bCt=e=>{var r;const t=e.avatarSize||40,n=e.iconSize||40;return b(Ac,{sx:{height:t,width:t},src:(r=e.image)==null?void 0:r.url,children:b(Rd,{sx:{height:n,width:n}})})};function Jue(){return ho({queryKey:[uje],queryFn:TBe})}function LM(){return ho({queryKey:[hje],queryFn:xBe})}function S1(){return ho({queryKey:[mje],queryFn:gBe})}function FM(){return ho({queryKey:[gje],queryFn:vBe})}function Bp(){return ho({queryKey:[pje],queryFn:_Be})}/** * @remix-run/router v1.21.0 * * Copyright (c) Remix Software Inc. @@ -368,7 +368,7 @@ attempted value: ${a} * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function qS(){return qS=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function Wue(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function WSt(){return Math.random().toString(36).substr(2,8)}function uY(e,t){return{usr:e.state,key:e.key,idx:t}}function kF(e,t,n,r){return n===void 0&&(n=null),qS({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?c0(t):t,{state:n,key:t&&t.key||r||WSt()})}function CO(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function c0(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function GSt(e,t,n,r){r===void 0&&(r={});let{window:o=document.defaultView,v5Compat:i=!1}=r,a=o.history,s=Lf.Pop,l=null,c=u();c==null&&(c=0,a.replaceState(qS({},a.state,{idx:c}),""));function u(){return(a.state||{idx:null}).idx}function d(){s=Lf.Pop;let y=u(),w=y==null?null:y-c;c=y,l&&l({action:s,location:m.location,delta:w})}function f(y,w){s=Lf.Push;let x=kF(m.location,y,w);c=u()+1;let C=uY(x,c),E=m.createHref(x);try{a.pushState(C,"",E)}catch(P){if(P instanceof DOMException&&P.name==="DataCloneError")throw P;o.location.assign(E)}i&&l&&l({action:s,location:m.location,delta:1})}function p(y,w){s=Lf.Replace;let x=kF(m.location,y,w);c=u();let C=uY(x,c),E=m.createHref(x);a.replaceState(C,"",E),i&&l&&l({action:s,location:m.location,delta:0})}function h(y){let w=o.location.origin!=="null"?o.location.origin:o.location.href,x=typeof y=="string"?y:CO(y);return x=x.replace(/ $/,"%20"),Mo(w,"No window.location.(origin|href) available to create URL for href: "+x),new URL(x,w)}let m={get action(){return s},get location(){return e(o,a)},listen(y){if(l)throw new Error("A history only accepts one active listener");return o.addEventListener(cY,d),l=y,()=>{o.removeEventListener(cY,d),l=null}},createHref(y){return t(o,y)},createURL:h,encodeLocation(y){let w=h(y);return{pathname:w.pathname,search:w.search,hash:w.hash}},push:f,replace:p,go(y){return a.go(y)}};return m}var dY;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(dY||(dY={}));function qSt(e,t,n){return n===void 0&&(n="/"),KSt(e,t,n,!1)}function KSt(e,t,n,r){let o=typeof t=="string"?c0(t):t,i=CH(o.pathname||"/",n);if(i==null)return null;let a=Gue(e);YSt(a);let s=null;for(let l=0;s==null&&l{let l={relativePath:s===void 0?i.path||"":s,caseSensitive:i.caseSensitive===!0,childrenIndex:a,route:i};l.relativePath.startsWith("/")&&(Mo(l.relativePath.startsWith(r),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(r.length));let c=Qf([r,l.relativePath]),u=n.concat(l);i.children&&i.children.length>0&&(Mo(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+c+'".')),Gue(i.children,t,u,c)),!(i.path==null&&!i.index)&&t.push({path:c,score:nCt(c,i.index),routesMeta:u})};return e.forEach((i,a)=>{var s;if(i.path===""||!((s=i.path)!=null&&s.includes("?")))o(i,a);else for(let l of que(i.path))o(i,a,l)}),t}function que(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,o=n.endsWith("?"),i=n.replace(/\?$/,"");if(r.length===0)return o?[i,""]:[i];let a=que(r.join("/")),s=[];return s.push(...a.map(l=>l===""?i:[i,l].join("/"))),o&&s.push(...a),s.map(l=>e.startsWith("/")&&l===""?"/":l)}function YSt(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:rCt(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const QSt=/^:[\w-]+$/,XSt=3,JSt=2,ZSt=1,eCt=10,tCt=-2,fY=e=>e==="*";function nCt(e,t){let n=e.split("/"),r=n.length;return n.some(fY)&&(r+=tCt),t&&(r+=JSt),n.filter(o=>!fY(o)).reduce((o,i)=>o+(QSt.test(i)?XSt:i===""?ZSt:eCt),r)}function rCt(e,t){return e.length===t.length&&e.slice(0,-1).every((r,o)=>r===t[o])?e[e.length-1]-t[t.length-1]:0}function oCt(e,t,n){let{routesMeta:r}=e,o={},i="/",a=[];for(let s=0;s{let{paramName:f,isOptional:p}=u;if(f==="*"){let m=s[d]||"";a=i.slice(0,i.length-m.length).replace(/(.)\/+$/,"$1")}const h=s[d];return p&&!h?c[f]=void 0:c[f]=(h||"").replace(/%2F/g,"/"),c},{}),pathname:i,pathnameBase:a,pattern:e}}function iCt(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),Wue(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(a,s,l)=>(r.push({paramName:s,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),o+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":e!==""&&e!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),r]}function aCt(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Wue(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function CH(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function sCt(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:o=""}=typeof e=="string"?c0(e):e;return{pathname:n?n.startsWith("/")?n:lCt(n,t):t,search:dCt(r),hash:fCt(o)}}function lCt(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(o=>{o===".."?n.length>1&&n.pop():o!=="."&&n.push(o)}),n.length>1?n.join("/"):"/"}function o_(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function cCt(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Kue(e,t){let n=cCt(e);return t?n.map((r,o)=>o===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function Yue(e,t,n,r){r===void 0&&(r=!1);let o;typeof e=="string"?o=c0(e):(o=qS({},e),Mo(!o.pathname||!o.pathname.includes("?"),o_("?","pathname","search",o)),Mo(!o.pathname||!o.pathname.includes("#"),o_("#","pathname","hash",o)),Mo(!o.search||!o.search.includes("#"),o_("#","search","hash",o)));let i=e===""||o.pathname==="",a=i?"/":o.pathname,s;if(a==null)s=n;else{let d=t.length-1;if(!r&&a.startsWith("..")){let f=a.split("/");for(;f[0]==="..";)f.shift(),d-=1;o.pathname=f.join("/")}s=d>=0?t[d]:"/"}let l=sCt(o,s),c=a&&a!=="/"&&a.endsWith("/"),u=(i||a===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(c||u)&&(l.pathname+="/"),l}const Qf=e=>e.join("/").replace(/\/\/+/g,"/"),uCt=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),dCt=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,fCt=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function pCt(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const Que=["post","put","patch","delete"];new Set(Que);const hCt=["get",...Que];new Set(hCt);/** + */function ZS(){return ZS=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function Zue(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function xCt(){return Math.random().toString(36).substr(2,8)}function gY(e,t){return{usr:e.state,key:e.key,idx:t}}function _F(e,t,n,r){return n===void 0&&(n=null),ZS({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?p0(t):t,{state:n,key:t&&t.key||r||xCt()})}function _O(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function p0(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function SCt(e,t,n,r){r===void 0&&(r={});let{window:o=document.defaultView,v5Compat:i=!1}=r,a=o.history,s=Ff.Pop,l=null,c=u();c==null&&(c=0,a.replaceState(ZS({},a.state,{idx:c}),""));function u(){return(a.state||{idx:null}).idx}function d(){s=Ff.Pop;let y=u(),w=y==null?null:y-c;c=y,l&&l({action:s,location:m.location,delta:w})}function f(y,w){s=Ff.Push;let x=_F(m.location,y,w);c=u()+1;let S=gY(x,c),E=m.createHref(x);try{a.pushState(S,"",E)}catch(P){if(P instanceof DOMException&&P.name==="DataCloneError")throw P;o.location.assign(E)}i&&l&&l({action:s,location:m.location,delta:1})}function p(y,w){s=Ff.Replace;let x=_F(m.location,y,w);c=u();let S=gY(x,c),E=m.createHref(x);a.replaceState(S,"",E),i&&l&&l({action:s,location:m.location,delta:0})}function h(y){let w=o.location.origin!=="null"?o.location.origin:o.location.href,x=typeof y=="string"?y:_O(y);return x=x.replace(/ $/,"%20"),Ro(w,"No window.location.(origin|href) available to create URL for href: "+x),new URL(x,w)}let m={get action(){return s},get location(){return e(o,a)},listen(y){if(l)throw new Error("A history only accepts one active listener");return o.addEventListener(hY,d),l=y,()=>{o.removeEventListener(hY,d),l=null}},createHref(y){return t(o,y)},createURL:h,encodeLocation(y){let w=h(y);return{pathname:w.pathname,search:w.search,hash:w.hash}},push:f,replace:p,go(y){return a.go(y)}};return m}var mY;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(mY||(mY={}));function CCt(e,t,n){return n===void 0&&(n="/"),ECt(e,t,n,!1)}function ECt(e,t,n,r){let o=typeof t=="string"?p0(t):t,i=I5(o.pathname||"/",n);if(i==null)return null;let a=ede(e);PCt(a);let s=null;for(let l=0;s==null&&l{let l={relativePath:s===void 0?i.path||"":s,caseSensitive:i.caseSensitive===!0,childrenIndex:a,route:i};l.relativePath.startsWith("/")&&(Ro(l.relativePath.startsWith(r),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(r.length));let c=Jf([r,l.relativePath]),u=n.concat(l);i.children&&i.children.length>0&&(Ro(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+c+'".')),ede(i.children,t,u,c)),!(i.path==null&&!i.index)&&t.push({path:c,score:RCt(c,i.index),routesMeta:u})};return e.forEach((i,a)=>{var s;if(i.path===""||!((s=i.path)!=null&&s.includes("?")))o(i,a);else for(let l of tde(i.path))o(i,a,l)}),t}function tde(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,o=n.endsWith("?"),i=n.replace(/\?$/,"");if(r.length===0)return o?[i,""]:[i];let a=tde(r.join("/")),s=[];return s.push(...a.map(l=>l===""?i:[i,l].join("/"))),o&&s.push(...a),s.map(l=>e.startsWith("/")&&l===""?"/":l)}function PCt(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:$Ct(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const TCt=/^:[\w-]+$/,ICt=3,OCt=2,ACt=1,kCt=10,MCt=-2,yY=e=>e==="*";function RCt(e,t){let n=e.split("/"),r=n.length;return n.some(yY)&&(r+=MCt),t&&(r+=OCt),n.filter(o=>!yY(o)).reduce((o,i)=>o+(TCt.test(i)?ICt:i===""?ACt:kCt),r)}function $Ct(e,t){return e.length===t.length&&e.slice(0,-1).every((r,o)=>r===t[o])?e[e.length-1]-t[t.length-1]:0}function DCt(e,t,n){let{routesMeta:r}=e,o={},i="/",a=[];for(let s=0;s{let{paramName:f,isOptional:p}=u;if(f==="*"){let m=s[d]||"";a=i.slice(0,i.length-m.length).replace(/(.)\/+$/,"$1")}const h=s[d];return p&&!h?c[f]=void 0:c[f]=(h||"").replace(/%2F/g,"/"),c},{}),pathname:i,pathnameBase:a,pattern:e}}function _Ct(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),Zue(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(a,s,l)=>(r.push({paramName:s,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),o+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":e!==""&&e!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),r]}function NCt(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Zue(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function I5(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function LCt(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:o=""}=typeof e=="string"?p0(e):e;return{pathname:n?n.startsWith("/")?n:FCt(n,t):t,search:zCt(r),hash:VCt(o)}}function FCt(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(o=>{o===".."?n.length>1&&n.pop():o!=="."&&n.push(o)}),n.length>1?n.join("/"):"/"}function u_(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function jCt(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function nde(e,t){let n=jCt(e);return t?n.map((r,o)=>o===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function rde(e,t,n,r){r===void 0&&(r=!1);let o;typeof e=="string"?o=p0(e):(o=ZS({},e),Ro(!o.pathname||!o.pathname.includes("?"),u_("?","pathname","search",o)),Ro(!o.pathname||!o.pathname.includes("#"),u_("#","pathname","hash",o)),Ro(!o.search||!o.search.includes("#"),u_("#","search","hash",o)));let i=e===""||o.pathname==="",a=i?"/":o.pathname,s;if(a==null)s=n;else{let d=t.length-1;if(!r&&a.startsWith("..")){let f=a.split("/");for(;f[0]==="..";)f.shift(),d-=1;o.pathname=f.join("/")}s=d>=0?t[d]:"/"}let l=LCt(o,s),c=a&&a!=="/"&&a.endsWith("/"),u=(i||a===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(c||u)&&(l.pathname+="/"),l}const Jf=e=>e.join("/").replace(/\/\/+/g,"/"),BCt=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),zCt=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,VCt=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function HCt(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const ode=["post","put","patch","delete"];new Set(ode);const UCt=["get",...ode];new Set(UCt);/** * React Router v6.28.0 * * Copyright (c) Remix Software Inc. @@ -377,7 +377,7 @@ attempted value: ${a} * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function KS(){return KS=Object.assign?Object.assign.bind():function(e){for(var t=1;t{s.current=!0}),v.useCallback(function(c,u){if(u===void 0&&(u={}),!s.current)return;if(typeof c=="number"){r.go(c);return}let d=Yue(c,JSON.parse(a),i,u.relative==="path");e==null&&t!=="/"&&(d.pathname=d.pathname==="/"?t:Qf([t,d.pathname])),(u.replace?r.replace:r.push)(d,u.state,u)},[t,r,a,i,e])}function _c(){let{matches:e}=v.useContext(jp),t=e[e.length-1];return t?t.params:{}}function Zue(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=v.useContext(Xg),{matches:o}=v.useContext(jp),{pathname:i}=$M(),a=JSON.stringify(Kue(o,r.v7_relativeSplatPath));return v.useMemo(()=>Yue(e,JSON.parse(a),i,n==="path"),[e,a,i,n])}function vCt(e,t){return bCt(e,t)}function bCt(e,t,n,r){p1()||Mo(!1);let{navigator:o}=v.useContext(Xg),{matches:i}=v.useContext(jp),a=i[i.length-1],s=a?a.params:{};a&&a.pathname;let l=a?a.pathnameBase:"/";a&&a.route;let c=$M(),u;if(t){var d;let y=typeof t=="string"?c0(t):t;l==="/"||(d=y.pathname)!=null&&d.startsWith(l)||Mo(!1),u=y}else u=c;let f=u.pathname||"/",p=f;if(l!=="/"){let y=l.replace(/^\//,"").split("/");p="/"+f.replace(/^\//,"").split("/").slice(y.length).join("/")}let h=qSt(e,{pathname:p}),m=ECt(h&&h.map(y=>Object.assign({},y,{params:Object.assign({},s,y.params),pathname:Qf([l,o.encodeLocation?o.encodeLocation(y.pathname).pathname:y.pathname]),pathnameBase:y.pathnameBase==="/"?l:Qf([l,o.encodeLocation?o.encodeLocation(y.pathnameBase).pathname:y.pathnameBase])})),i,n,r);return t&&m?v.createElement(RM.Provider,{value:{location:KS({pathname:"/",search:"",hash:"",state:null,key:"default"},u),navigationType:Lf.Pop}},m):m}function wCt(){let e=OCt(),t=pCt(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,o={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return v.createElement(v.Fragment,null,v.createElement("h2",null,"Unexpected Application Error!"),v.createElement("h3",{style:{fontStyle:"italic"}},t),n?v.createElement("pre",{style:o},n):null,null)}const xCt=v.createElement(wCt,null);class SCt extends v.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?v.createElement(jp.Provider,{value:this.props.routeContext},v.createElement(Xue.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function CCt(e){let{routeContext:t,match:n,children:r}=e,o=v.useContext(EH);return o&&o.static&&o.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=n.route.id),v.createElement(jp.Provider,{value:t},r)}function ECt(e,t,n,r){var o;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var i;if(!n)return null;if(n.errors)e=n.matches;else if((i=r)!=null&&i.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let a=e,s=(o=n)==null?void 0:o.errors;if(s!=null){let u=a.findIndex(d=>d.route.id&&(s==null?void 0:s[d.route.id])!==void 0);u>=0||Mo(!1),a=a.slice(0,Math.min(a.length,u+1))}let l=!1,c=-1;if(n&&r&&r.v7_partialHydration)for(let u=0;u=0?a=a.slice(0,c+1):a=[a[0]];break}}}return a.reduceRight((u,d,f)=>{let p,h=!1,m=null,y=null;n&&(p=s&&d.route.id?s[d.route.id]:void 0,m=d.route.errorElement||xCt,l&&(c<0&&f===0?(h=!0,y=null):c===f&&(h=!0,y=d.route.hydrateFallbackElement||null)));let w=t.concat(a.slice(0,f+1)),x=()=>{let C;return p?C=m:h?C=y:d.route.Component?C=v.createElement(d.route.Component,null):d.route.element?C=d.route.element:C=u,v.createElement(CCt,{match:d,routeContext:{outlet:u,matches:w,isDataRoute:n!=null},children:C})};return n&&(d.route.ErrorBoundary||d.route.errorElement||f===0)?v.createElement(SCt,{location:n.location,revalidation:n.revalidation,component:m,error:p,children:x(),routeContext:{outlet:null,matches:w,isDataRoute:!0}}):x()},null)}var ede=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(ede||{}),EO=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(EO||{});function PCt(e){let t=v.useContext(EH);return t||Mo(!1),t}function TCt(e){let t=v.useContext(gCt);return t||Mo(!1),t}function ICt(e){let t=v.useContext(jp);return t||Mo(!1),t}function tde(e){let t=ICt(),n=t.matches[t.matches.length-1];return n.route.id||Mo(!1),n.route.id}function OCt(){var e;let t=v.useContext(Xue),n=TCt(EO.UseRouteError),r=tde(EO.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function ACt(){let{router:e}=PCt(ede.UseNavigateStable),t=tde(EO.UseNavigateStable),n=v.useRef(!1);return Jue(()=>{n.current=!0}),v.useCallback(function(o,i){i===void 0&&(i={}),n.current&&(typeof o=="number"?e.navigate(o):e.navigate(o,KS({fromRouteId:t},i)))},[e,t])}const hY={};function kCt(e,t){hY[t]||(hY[t]=!0,console.warn(t))}const gY=(e,t,n)=>kCt(e,"⚠️ React Router Future Flag Warning: "+t+". "+("You can use the `"+e+"` future flag to opt-in early. ")+("For more information, see "+n+"."));function MCt(e,t){e!=null&&e.v7_startTransition||gY("v7_startTransition","React Router will begin wrapping state updates in `React.startTransition` in v7","https://reactrouter.com/v6/upgrading/future#v7_starttransition"),!(e!=null&&e.v7_relativeSplatPath)&&!t&&gY("v7_relativeSplatPath","Relative route resolution within Splat routes is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_relativesplatpath")}function Bt(e){Mo(!1)}function RCt(e){let{basename:t="/",children:n=null,location:r,navigationType:o=Lf.Pop,navigator:i,static:a=!1,future:s}=e;p1()&&Mo(!1);let l=t.replace(/^\/*/,"/"),c=v.useMemo(()=>({basename:l,navigator:i,static:a,future:KS({v7_relativeSplatPath:!1},s)}),[l,s,i,a]);typeof r=="string"&&(r=c0(r));let{pathname:u="/",search:d="",hash:f="",state:p=null,key:h="default"}=r,m=v.useMemo(()=>{let y=CH(u,l);return y==null?null:{location:{pathname:y,search:d,hash:f,state:p,key:h},navigationType:o}},[l,u,d,f,p,h,o]);return m==null?null:v.createElement(Xg.Provider,{value:c},v.createElement(RM.Provider,{children:n,value:m}))}function $Ct(e){let{children:t,location:n}=e;return vCt(MF(t),n)}new Promise(()=>{});function MF(e,t){t===void 0&&(t=[]);let n=[];return v.Children.forEach(e,(r,o)=>{if(!v.isValidElement(r))return;let i=[...t,o];if(r.type===v.Fragment){n.push.apply(n,MF(r.props.children,i));return}r.type!==Bt&&Mo(!1),!r.props.index||!r.props.children||Mo(!1);let a={id:r.props.id||i.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(a.children=MF(r.props.children,i)),n.push(a)}),n}/** + */function eC(){return eC=Object.assign?Object.assign.bind():function(e){for(var t=1;t{s.current=!0}),v.useCallback(function(c,u){if(u===void 0&&(u={}),!s.current)return;if(typeof c=="number"){r.go(c);return}let d=rde(c,JSON.parse(a),i,u.relative==="path");e==null&&t!=="/"&&(d.pathname=d.pathname==="/"?t:Jf([t,d.pathname])),(u.replace?r.replace:r.push)(d,u.state,u)},[t,r,a,i,e])}function Lc(){let{matches:e}=v.useContext(zp),t=e[e.length-1];return t?t.params:{}}function sde(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=v.useContext(Jg),{matches:o}=v.useContext(zp),{pathname:i}=BM(),a=JSON.stringify(nde(o,r.v7_relativeSplatPath));return v.useMemo(()=>rde(e,JSON.parse(a),i,n==="path"),[e,a,i,n])}function KCt(e,t){return YCt(e,t)}function YCt(e,t,n,r){C1()||Ro(!1);let{navigator:o}=v.useContext(Jg),{matches:i}=v.useContext(zp),a=i[i.length-1],s=a?a.params:{};a&&a.pathname;let l=a?a.pathnameBase:"/";a&&a.route;let c=BM(),u;if(t){var d;let y=typeof t=="string"?p0(t):t;l==="/"||(d=y.pathname)!=null&&d.startsWith(l)||Ro(!1),u=y}else u=c;let f=u.pathname||"/",p=f;if(l!=="/"){let y=l.replace(/^\//,"").split("/");p="/"+f.replace(/^\//,"").split("/").slice(y.length).join("/")}let h=CCt(e,{pathname:p}),m=e1t(h&&h.map(y=>Object.assign({},y,{params:Object.assign({},s,y.params),pathname:Jf([l,o.encodeLocation?o.encodeLocation(y.pathname).pathname:y.pathname]),pathnameBase:y.pathnameBase==="/"?l:Jf([l,o.encodeLocation?o.encodeLocation(y.pathnameBase).pathname:y.pathnameBase])})),i,n,r);return t&&m?v.createElement(jM.Provider,{value:{location:eC({pathname:"/",search:"",hash:"",state:null,key:"default"},u),navigationType:Ff.Pop}},m):m}function QCt(){let e=o1t(),t=HCt(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,o={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return v.createElement(v.Fragment,null,v.createElement("h2",null,"Unexpected Application Error!"),v.createElement("h3",{style:{fontStyle:"italic"}},t),n?v.createElement("pre",{style:o},n):null,null)}const XCt=v.createElement(QCt,null);class JCt extends v.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?v.createElement(zp.Provider,{value:this.props.routeContext},v.createElement(ide.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function ZCt(e){let{routeContext:t,match:n,children:r}=e,o=v.useContext(O5);return o&&o.static&&o.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=n.route.id),v.createElement(zp.Provider,{value:t},r)}function e1t(e,t,n,r){var o;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var i;if(!n)return null;if(n.errors)e=n.matches;else if((i=r)!=null&&i.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let a=e,s=(o=n)==null?void 0:o.errors;if(s!=null){let u=a.findIndex(d=>d.route.id&&(s==null?void 0:s[d.route.id])!==void 0);u>=0||Ro(!1),a=a.slice(0,Math.min(a.length,u+1))}let l=!1,c=-1;if(n&&r&&r.v7_partialHydration)for(let u=0;u=0?a=a.slice(0,c+1):a=[a[0]];break}}}return a.reduceRight((u,d,f)=>{let p,h=!1,m=null,y=null;n&&(p=s&&d.route.id?s[d.route.id]:void 0,m=d.route.errorElement||XCt,l&&(c<0&&f===0?(h=!0,y=null):c===f&&(h=!0,y=d.route.hydrateFallbackElement||null)));let w=t.concat(a.slice(0,f+1)),x=()=>{let S;return p?S=m:h?S=y:d.route.Component?S=v.createElement(d.route.Component,null):d.route.element?S=d.route.element:S=u,v.createElement(ZCt,{match:d,routeContext:{outlet:u,matches:w,isDataRoute:n!=null},children:S})};return n&&(d.route.ErrorBoundary||d.route.errorElement||f===0)?v.createElement(JCt,{location:n.location,revalidation:n.revalidation,component:m,error:p,children:x(),routeContext:{outlet:null,matches:w,isDataRoute:!0}}):x()},null)}var lde=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(lde||{}),NO=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(NO||{});function t1t(e){let t=v.useContext(O5);return t||Ro(!1),t}function n1t(e){let t=v.useContext(WCt);return t||Ro(!1),t}function r1t(e){let t=v.useContext(zp);return t||Ro(!1),t}function cde(e){let t=r1t(),n=t.matches[t.matches.length-1];return n.route.id||Ro(!1),n.route.id}function o1t(){var e;let t=v.useContext(ide),n=n1t(NO.UseRouteError),r=cde(NO.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function i1t(){let{router:e}=t1t(lde.UseNavigateStable),t=cde(NO.UseNavigateStable),n=v.useRef(!1);return ade(()=>{n.current=!0}),v.useCallback(function(o,i){i===void 0&&(i={}),n.current&&(typeof o=="number"?e.navigate(o):e.navigate(o,eC({fromRouteId:t},i)))},[e,t])}const bY={};function a1t(e,t){bY[t]||(bY[t]=!0,console.warn(t))}const wY=(e,t,n)=>a1t(e,"⚠️ React Router Future Flag Warning: "+t+". "+("You can use the `"+e+"` future flag to opt-in early. ")+("For more information, see "+n+"."));function s1t(e,t){e!=null&&e.v7_startTransition||wY("v7_startTransition","React Router will begin wrapping state updates in `React.startTransition` in v7","https://reactrouter.com/v6/upgrading/future#v7_starttransition"),!(e!=null&&e.v7_relativeSplatPath)&&!t&&wY("v7_relativeSplatPath","Relative route resolution within Splat routes is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_relativesplatpath")}function Vt(e){Ro(!1)}function l1t(e){let{basename:t="/",children:n=null,location:r,navigationType:o=Ff.Pop,navigator:i,static:a=!1,future:s}=e;C1()&&Ro(!1);let l=t.replace(/^\/*/,"/"),c=v.useMemo(()=>({basename:l,navigator:i,static:a,future:eC({v7_relativeSplatPath:!1},s)}),[l,s,i,a]);typeof r=="string"&&(r=p0(r));let{pathname:u="/",search:d="",hash:f="",state:p=null,key:h="default"}=r,m=v.useMemo(()=>{let y=I5(u,l);return y==null?null:{location:{pathname:y,search:d,hash:f,state:p,key:h},navigationType:o}},[l,u,d,f,p,h,o]);return m==null?null:v.createElement(Jg.Provider,{value:c},v.createElement(jM.Provider,{children:n,value:m}))}function c1t(e){let{children:t,location:n}=e;return KCt(NF(t),n)}new Promise(()=>{});function NF(e,t){t===void 0&&(t=[]);let n=[];return v.Children.forEach(e,(r,o)=>{if(!v.isValidElement(r))return;let i=[...t,o];if(r.type===v.Fragment){n.push.apply(n,NF(r.props.children,i));return}r.type!==Vt&&Ro(!1),!r.props.index||!r.props.children||Ro(!1);let a={id:r.props.id||i.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(a.children=NF(r.props.children,i)),n.push(a)}),n}/** * React Router DOM v6.28.0 * * Copyright (c) Remix Software Inc. @@ -386,47 +386,47 @@ attempted value: ${a} * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function RF(){return RF=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(n[o]=e[o]);return n}function _Ct(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function NCt(e,t){return e.button===0&&(!t||t==="_self")&&!_Ct(e)}const LCt=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],FCt="6";try{window.__reactRouterVersion=FCt}catch{}const jCt="startTransition",mY=yd[jCt];function PH(e){let{basename:t,children:n,future:r,window:o}=e,i=v.useRef();i.current==null&&(i.current=USt({window:o,v5Compat:!0}));let a=i.current,[s,l]=v.useState({action:a.action,location:a.location}),{v7_startTransition:c}=r||{},u=v.useCallback(d=>{c&&mY?mY(()=>l(d)):l(d)},[l,c]);return v.useLayoutEffect(()=>a.listen(u),[a,u]),v.useEffect(()=>MCt(r),[r]),v.createElement(RCt,{basename:t,children:n,location:s.location,navigationType:s.action,navigator:a,future:r})}const BCt=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",zCt=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Da=v.forwardRef(function(t,n){let{onClick:r,relative:o,reloadDocument:i,replace:a,state:s,target:l,to:c,preventScrollReset:u,viewTransition:d}=t,f=DCt(t,LCt),{basename:p}=v.useContext(Xg),h,m=!1;if(typeof c=="string"&&zCt.test(c)&&(h=c,BCt))try{let C=new URL(window.location.href),E=c.startsWith("//")?new URL(C.protocol+c):new URL(c),P=CH(E.pathname,p);E.origin===C.origin&&P!=null?c=P+E.search+E.hash:m=!0}catch{}let y=mCt(c,{relative:o}),w=VCt(c,{replace:a,state:s,target:l,preventScrollReset:u,relative:o,viewTransition:d});function x(C){r&&r(C),C.defaultPrevented||w(C)}return v.createElement("a",RF({},f,{href:h||y,onClick:m||i?r:x,ref:n,target:l}))});var yY;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(yY||(yY={}));var vY;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(vY||(vY={}));function VCt(e,t){let{target:n,replace:r,state:o,preventScrollReset:i,relative:a,viewTransition:s}=t===void 0?{}:t,l=Bp(),c=$M(),u=Zue(e,{relative:a});return v.useCallback(d=>{if(NCt(d,n)){d.preventDefault();let f=r!==void 0?r:CO(c)===CO(u);l(e,{replace:f,state:o,preventScrollReset:i,relative:a,viewTransition:s})}},[c,l,u,r,o,n,e,i,a,s])}const HCt=()=>{var r,o;const e=_c(),t=e.routineId?parseInt(e.routineId):0,n=Qg(t);return b(Ac,{maxWidth:"lg",children:b(SH,{query:n,child:n.isSuccess&&K(wt,{children:[((r=n.data)==null?void 0:r.description)!==""&&b(st,{variant:"caption",sx:{whiteSpace:"pre-line"},children:(o=n.data)==null?void 0:o.description}),b(Wt,{spacing:2,sx:{mt:2},children:n.data.dayDataCurrentIteration.map((i,a)=>b(rde,{dayData:i},`dayDetails-${a}`))})]})})})};function nde(e){var o;const{i18n:t}=Le(),n=Fp();let r;return n.isSuccess&&(r=Db(t.language,n.data)),b(Oe,{container:!0,alignItems:"center",justifyContent:"center",sx:{height:e.rowHeight,marginBottom:e.marginBottom},children:b(Oe,{size:12,children:K(Wt,{spacing:0,children:[b(st,{variant:"h6",children:e.showExercise?(o=e.setConfigData.exercise)==null?void 0:o.getTranslation(r).name:""}),K("div",{children:[e.setConfigData.textRepr,e.setConfigData.isSpecialType&&b(mu,{label:e.setConfigData.type,color:"info",size:"small",sx:{marginLeft:"0.5em"}})]}),b(st,{variant:"caption",children:e.setConfigData.comment})]})})})}function UCt(e){return K(Oe,{container:!0,justifyContent:"space-between",alignItems:"flex-start",children:[b(Oe,{size:1,children:b(Wt,{divider:b(on,{height:"10px"}),children:e.slotData.exercises.map((t,n)=>b(iSt,{image:t.mainImage,iconSize:40,avatarSize:50},n))})}),b(Oe,{size:11,children:e.slotData.setConfigs.map((t,n)=>{var o;const r=n===0||t.exerciseId!==((o=e.slotData.setConfigs[n-1])==null?void 0:o.exerciseId);return b(nde,{setConfigData:t,marginBottom:"1em",showExercise:r},n)})})]})}const rde=e=>{var l;const[t,n]=Y.useState(null),r=!!t,o=()=>{n(null)},[i,a]=Le(),s=()=>window.location.href=Fn(_n.ROUTINE_ADD_LOG,a.language,{id:1});return K(bo,{sx:{minWidth:275},children:[b(Su,{sx:{bgcolor:"lightgray"},action:e.dayData.day!==null&&e.dayData.day.isSpecialType?b(mu,{label:e.dayData.day.type,color:"info",size:"small",sx:{marginLeft:"0.5em"}}):null,title:e.dayData.day===null||e.dayData.day.isRest?i("routines.restDay"):e.dayData.day.name,subheader:(l=e.dayData.day)==null?void 0:l.description}),b(Rs,{id:"basic-menu",anchorEl:t,open:r,onClose:o,MenuListProps:{"aria-labelledby":"basic-button"},children:b(en,{onClick:s,children:i("routines.addWeightLog")})}),b(_i,{sx:{padding:0},children:e.dayData.slots.length>0&&b(Wt,{children:e.dayData.slots.map((c,u)=>{var d;return K("div",{children:[b(on,{padding:1,children:b(UCt,{slotData:c,index:u})}),b(kl,{})]},`SlotDataList-${(d=e.dayData.day)==null?void 0:d.id}-${u}`)})})})]})},ode=()=>{const[e,t]=Le(),n=sSt();return n.isLoading?b(ho,{}):n.data!==null?b(WCt,{routine:n.data}):b(oz,{title:e("routines.routine"),link:Fn(_n.ROUTINE_ADD,t.language)})},WCt=e=>{const[t,n]=Le();return K(bo,{children:[b(Su,{title:t("routines.routine"),subheader:e.routine.name??"."}),b(_i,{sx:{height:"510px",overflow:"auto"},children:b(Ll,{children:e.routine.dayDataCurrentIteration.map((r,o)=>b(GCt,{dayData:r},o))})}),b(Ms,{children:b(dt,{size:"small",href:Fn(_n.ROUTINE_DETAIL,n.language,{id:e.routine.id}),children:t("seeDetails")})})]})},GCt=e=>{var i,a,s;const[t,n]=v.useState(!1),[r]=Le();return K(wt,{children:[K(Ep,{onClick:()=>n(!t),selected:t,disabled:(i=e.dayData.day)==null?void 0:i.isRest,children:[b(aa,{children:t?b(ore,{}):b(Ob,{})}),b(Ao,{primary:(a=e.dayData.day)!=null&&a.isRest?r("routines.restDay"):(s=e.dayData.day)==null?void 0:s.name})]}),b(vl,{in:t,timeout:"auto",unmountOnExit:!0,children:e.dayData.slots.map((l,c)=>b("div",{children:l.setConfigs.map((u,d)=>b(nde,{setConfigData:u,rowHeight:"70px",showExercise:!0},d))},c))})]})},Vo=ct(R.jsx("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"}),"Add");function DM(e="lastWeek"){return fo({queryKey:[It.BODY_WEIGHT,e],queryFn:()=>_je(e)})}const qCt=()=>{const e=Lt();return jt({mutationFn:t=>Nje(t),onSuccess:()=>e.invalidateQueries({queryKey:[It.BODY_WEIGHT]})})},KCt=()=>{const e=Lt();return jt({mutationFn:t=>Fje(t),onError:t=>{console.log(t)},onSuccess:()=>e.invalidateQueries({queryKey:[It.BODY_WEIGHT]})})},YCt=()=>{const e=Lt();return jt({mutationFn:t=>Lje(t),onSuccess:()=>{e.invalidateQueries({queryKey:[It.BODY_WEIGHT]})}})},u0=({weightEntry:e,closeFn:t})=>{const n=DM(),r=KCt(),o=YCt(),[i,a]=v.useState(e?yt.fromJSDate(e.date):yt.now),[s,l]=Le(),c=za({weight:Ea().min(30,"Min weight is 30 kg").max(300,"Max weight is 300 kg").required("Weight field is required")});return n.isLoading?b(ho,{}):b(Ba,{initialValues:{weight:e?e.weight:0,date:gi(e?e.date:new Date)},validationSchema:c,onSubmit:async u=>{if(e){e.weight=u.weight,e.date=new Date(u.date);try{o.mutate(e)}catch{}}else{e=new jre(new Date(u.date),u.weight);try{r.mutate(e)}catch{}}t&&t()},children:u=>b(fa,{children:K(Wt,{spacing:2,children:[b(nn,{fullWidth:!0,id:"weight",label:s("weight"),error:u.touched.weight&&!!u.touched.weight,helperText:u.touched.weight&&u.errors.weight,...u.getFieldProps("weight")}),b(xg,{dateAdapter:lb,adapterLocale:l.language,children:b(hO,{format:"yyyy-MM-dd",label:s("date"),value:i,slotProps:{textField:{variant:"outlined"}},disableFuture:!0,onChange:d=>{d&&u.setFieldValue("date",d.toJSDate()),a(d)},shouldDisableDate:d=>e&&gi(e.date)===d.toISODate()?!1:d?n.data.some(f=>gi(f.date)===d.toISODate()):!1})}),b(Wt,{direction:"row",justifyContent:"end",sx:{mt:2},children:b(dt,{color:"primary",variant:"contained",type:"submit",sx:{mt:2},children:s("submit")})})]})})})},QCt=["checked","disabled","error","focused","focusVisible","required","expanded","selected"];function XCt(e={}){const{disableGlobal:t=!1,productionPrefix:n="jss",seed:r=""}=e,o=r===""?"":`${r}-`;let i=0;const a=()=>(i+=1,i);return(s,l)=>{const c=l.options.name;if(c&&c.startsWith("Mui")&&!l.options.link&&!t){if(QCt.includes(s.key))return`Mui-${s.key}`;const u=`${o}${c}-${s.key}`;return!l.options.theme[BZ]||r!==""?u:`${u}-${a()}`}return`${o}${n}${a()}`}}var bY=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},h1=(typeof window>"u"?"undefined":bY(window))==="object"&&(typeof document>"u"?"undefined":bY(document))==="object"&&document.nodeType===9;function YS(e){"@babel/helpers - typeof";return YS=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},YS(e)}function JCt(e,t){if(YS(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(YS(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function ZCt(e){var t=JCt(e,"string");return YS(t)=="symbol"?t:t+""}function e1t(e,t){for(var n=0;n<+~=|^:(),"'`\s])/g,xY=typeof CSS<"u"&&CSS.escape,IH=function(e){return xY?xY(e):e.replace(n1t,"\\$1")},ade=function(){function e(n,r,o){this.type="style",this.isProcessed=!1;var i=o.sheet,a=o.Renderer;this.key=n,this.options=o,this.style=r,i?this.renderer=i.renderer:a&&(this.renderer=new a)}var t=e.prototype;return t.prop=function(r,o,i){if(o===void 0)return this.style[r];var a=i?i.force:!1;if(!a&&this.style[r]===o)return this;var s=o;(!i||i.process!==!1)&&(s=this.options.jss.plugins.onChangeValue(o,r,this));var l=s==null||s===!1,c=r in this.style;if(l&&!c&&!a)return this;var u=l&&c;if(u?delete this.style[r]:this.style[r]=s,this.renderable&&this.renderer)return u?this.renderer.removeProperty(this.renderable,r):this.renderer.setProperty(this.renderable,r,s),this;var d=this.options.sheet;return d&&d.attached,this},e}(),DF=function(e){IC(t,e);function t(r,o,i){var a;a=e.call(this,r,o,i)||this;var s=i.selector,l=i.scoped,c=i.sheet,u=i.generateId;return s?a.selectorText=s:l!==!1&&(a.id=u(eN(eN(a)),c),a.selectorText="."+IH(a.id)),a}var n=t.prototype;return n.applyTo=function(o){var i=this.renderer;if(i){var a=this.toJSON();for(var s in a)i.setProperty(o,s,a[s])}return this},n.toJSON=function(){var o={};for(var i in this.style){var a=this.style[i];typeof a!="object"?o[i]=a:Array.isArray(a)&&(o[i]=og(a))}return o},n.toString=function(o){var i=this.options.sheet,a=i?i.options.link:!1,s=a?Gr({},o,{allowEmpty:!0}):o;return QS(this.selectorText,this.style,s)},ide(t,[{key:"selector",set:function(o){if(o!==this.selectorText){this.selectorText=o;var i=this.renderer,a=this.renderable;if(!(!a||!i)){var s=i.setSelector(a,o);s||i.replaceRule(a,this)}}},get:function(){return this.selectorText}}]),t}(ade),r1t={onCreateRule:function(t,n,r){return t[0]==="@"||r.parent&&r.parent.type==="keyframes"?null:new DF(t,n,r)}},i_={indent:1,children:!0},o1t=/@([\w-]+)/,i1t=function(){function e(n,r,o){this.type="conditional",this.isProcessed=!1,this.key=n;var i=n.match(o1t);this.at=i?i[1]:"unknown",this.query=o.name||"@"+this.at,this.options=o,this.rules=new _M(Gr({},o,{parent:this}));for(var a in r)this.rules.add(a,r[a]);this.rules.process()}var t=e.prototype;return t.getRule=function(r){return this.rules.get(r)},t.indexOf=function(r){return this.rules.indexOf(r)},t.addRule=function(r,o,i){var a=this.rules.add(r,o,i);return a?(this.options.jss.plugins.onProcessRule(a),a):null},t.replaceRule=function(r,o,i){var a=this.rules.replace(r,o,i);return a&&this.options.jss.plugins.onProcessRule(a),a},t.toString=function(r){r===void 0&&(r=i_);var o=d0(r),i=o.linebreak;if(r.indent==null&&(r.indent=i_.indent),r.children==null&&(r.children=i_.children),r.children===!1)return this.query+" {}";var a=this.rules.toString(r);return a?this.query+" {"+i+a+i+"}":""},e}(),a1t=/@container|@media|@supports\s+/,s1t={onCreateRule:function(t,n,r){return a1t.test(t)?new i1t(t,n,r):null}},a_={indent:1,children:!0},l1t=/@keyframes\s+([\w-]+)/,_F=function(){function e(n,r,o){this.type="keyframes",this.at="@keyframes",this.isProcessed=!1;var i=n.match(l1t);i&&i[1]?this.name=i[1]:this.name="noname",this.key=this.type+"-"+this.name,this.options=o;var a=o.scoped,s=o.sheet,l=o.generateId;this.id=a===!1?this.name:IH(l(this,s)),this.rules=new _M(Gr({},o,{parent:this}));for(var c in r)this.rules.add(c,r[c],Gr({},o,{parent:this}));this.rules.process()}var t=e.prototype;return t.toString=function(r){r===void 0&&(r=a_);var o=d0(r),i=o.linebreak;if(r.indent==null&&(r.indent=a_.indent),r.children==null&&(r.children=a_.children),r.children===!1)return this.at+" "+this.id+" {}";var a=this.rules.toString(r);return a&&(a=""+i+a+i),this.at+" "+this.id+" {"+a+"}"},e}(),c1t=/@keyframes\s+/,u1t=/\$([\w-]+)/g,NF=function(t,n){return typeof t=="string"?t.replace(u1t,function(r,o){return o in n?n[o]:r}):t},SY=function(t,n,r){var o=t[n],i=NF(o,r);i!==o&&(t[n]=i)},d1t={onCreateRule:function(t,n,r){return typeof t=="string"&&c1t.test(t)?new _F(t,n,r):null},onProcessStyle:function(t,n,r){return n.type!=="style"||!r||("animation-name"in t&&SY(t,"animation-name",r.keyframes),"animation"in t&&SY(t,"animation",r.keyframes)),t},onChangeValue:function(t,n,r){var o=r.options.sheet;if(!o)return t;switch(n){case"animation":return NF(t,o.keyframes);case"animation-name":return NF(t,o.keyframes);default:return t}}},f1t=function(e){IC(t,e);function t(){return e.apply(this,arguments)||this}var n=t.prototype;return n.toString=function(o){var i=this.options.sheet,a=i?i.options.link:!1,s=a?Gr({},o,{allowEmpty:!0}):o;return QS(this.key,this.style,s)},t}(ade),p1t={onCreateRule:function(t,n,r){return r.parent&&r.parent.type==="keyframes"?new f1t(t,n,r):null}},h1t=function(){function e(n,r,o){this.type="font-face",this.at="@font-face",this.isProcessed=!1,this.key=n,this.style=r,this.options=o}var t=e.prototype;return t.toString=function(r){var o=d0(r),i=o.linebreak;if(Array.isArray(this.style)){for(var a="",s=0;s=this.index){o.push(r);return}for(var a=0;ai){o.splice(a,0,r);return}}},t.reset=function(){this.registry=[]},t.remove=function(r){var o=this.registry.indexOf(r);this.registry.splice(o,1)},t.toString=function(r){for(var o=r===void 0?{}:r,i=o.attached,a=NA(o,["attached"]),s=d0(a),l=s.linebreak,c="",u=0;u-1?o.substr(0,i-1):o;t.style.setProperty(n,a,i>-1?"important":"")}}catch{return!1}return!0},I1t=function(t,n){try{t.attributeStyleMap?t.attributeStyleMap.delete(n):t.style.removeProperty(n)}catch{}},O1t=function(t,n){return t.selectorText=n,t.selectorText===n},cde=lde(function(){return document.querySelector("head")});function A1t(e,t){for(var n=0;nt.index&&r.options.insertionPoint===t.insertionPoint)return r}return null}function k1t(e,t){for(var n=e.length-1;n>=0;n--){var r=e[n];if(r.attached&&r.options.insertionPoint===t.insertionPoint)return r}return null}function M1t(e){for(var t=cde(),n=0;n0){var n=A1t(t,e);if(n&&n.renderer)return{parent:n.renderer.element.parentNode,node:n.renderer.element};if(n=k1t(t,e),n&&n.renderer)return{parent:n.renderer.element.parentNode,node:n.renderer.element.nextSibling}}var r=e.insertionPoint;if(r&&typeof r=="string"){var o=M1t(r);if(o)return{parent:o.parentNode,node:o.nextSibling}}return!1}function $1t(e,t){var n=t.insertionPoint,r=R1t(t);if(r!==!1&&r.parent){r.parent.insertBefore(e,r.node);return}if(n&&typeof n.nodeType=="number"){var o=n,i=o.parentNode;i&&i.insertBefore(e,o.nextSibling);return}cde().appendChild(e)}var D1t=lde(function(){var e=document.querySelector('meta[property="csp-nonce"]');return e?e.getAttribute("content"):null}),IY=function(t,n,r){try{"insertRule"in t?t.insertRule(n,r):"appendRule"in t&&t.appendRule(n)}catch{return!1}return t.cssRules[r]},OY=function(t,n){var r=t.cssRules.length;return n===void 0||n>r?r:n},_1t=function(){var t=document.createElement("style");return t.textContent=` -`,t},N1t=function(){function e(n){this.getPropertyValue=P1t,this.setProperty=T1t,this.removeProperty=I1t,this.setSelector=O1t,this.hasInsertedRules=!1,this.cssRules=[],n&&Px.add(n),this.sheet=n;var r=this.sheet?this.sheet.options:{},o=r.media,i=r.meta,a=r.element;this.element=a||_1t(),this.element.setAttribute("data-jss",""),o&&this.element.setAttribute("media",o),i&&this.element.setAttribute("data-meta",i);var s=D1t();s&&this.element.setAttribute("nonce",s)}var t=e.prototype;return t.attach=function(){if(!(this.element.parentNode||!this.sheet)){$1t(this.element,this.sheet.options);var r=!!(this.sheet&&this.sheet.deployed);this.hasInsertedRules&&r&&(this.hasInsertedRules=!1,this.deploy())}},t.detach=function(){if(this.sheet){var r=this.element.parentNode;r&&r.removeChild(this.element),this.sheet.options.link&&(this.cssRules=[],this.element.textContent=` + */function LF(){return LF=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(n[o]=e[o]);return n}function d1t(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function f1t(e,t){return e.button===0&&(!t||t==="_self")&&!d1t(e)}const p1t=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],h1t="6";try{window.__reactRouterVersion=h1t}catch{}const g1t="startTransition",xY=vd[g1t];function A5(e){let{basename:t,children:n,future:r,window:o}=e,i=v.useRef();i.current==null&&(i.current=wCt({window:o,v5Compat:!0}));let a=i.current,[s,l]=v.useState({action:a.action,location:a.location}),{v7_startTransition:c}=r||{},u=v.useCallback(d=>{c&&xY?xY(()=>l(d)):l(d)},[l,c]);return v.useLayoutEffect(()=>a.listen(u),[a,u]),v.useEffect(()=>s1t(r),[r]),v.createElement(l1t,{basename:t,children:n,location:s.location,navigationType:s.action,navigator:a,future:r})}const m1t=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",y1t=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ia=v.forwardRef(function(t,n){let{onClick:r,relative:o,reloadDocument:i,replace:a,state:s,target:l,to:c,preventScrollReset:u,viewTransition:d}=t,f=u1t(t,p1t),{basename:p}=v.useContext(Jg),h,m=!1;if(typeof c=="string"&&y1t.test(c)&&(h=c,m1t))try{let S=new URL(window.location.href),E=c.startsWith("//")?new URL(S.protocol+c):new URL(c),P=I5(E.pathname,p);E.origin===S.origin&&P!=null?c=P+E.search+E.hash:m=!0}catch{}let y=GCt(c,{relative:o}),w=v1t(c,{replace:a,state:s,target:l,preventScrollReset:u,relative:o,viewTransition:d});function x(S){r&&r(S),S.defaultPrevented||w(S)}return v.createElement("a",LF({},f,{href:h||y,onClick:m||i?r:x,ref:n,target:l}))});var SY;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(SY||(SY={}));var CY;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(CY||(CY={}));function v1t(e,t){let{target:n,replace:r,state:o,preventScrollReset:i,relative:a,viewTransition:s}=t===void 0?{}:t,l=Ld(),c=BM(),u=sde(e,{relative:a});return v.useCallback(d=>{if(f1t(d,n)){d.preventDefault();let f=r!==void 0?r:_O(c)===_O(u);l(e,{replace:f,state:o,preventScrollReset:i,relative:a,viewTransition:s})}},[c,l,u,r,o,n,e,i,a,s])}const b1t=()=>{var r,o;const e=Lc(),t=e.routineId?parseInt(e.routineId):0,n=Xg(t);return b(kc,{maxWidth:"lg",children:b(T5,{query:n,child:n.isSuccess&&G(wt,{children:[((r=n.data)==null?void 0:r.description)!==""&&b(ot,{variant:"body2",sx:{whiteSpace:"pre-line"},children:(o=n.data)==null?void 0:o.description}),b(Wt,{spacing:2,sx:{mt:2},children:n.data.dayDataCurrentIteration.filter(i=>i.day!==null).map((i,a)=>b(dde,{dayData:i},`dayDetails-${a}`))})]})})})};function ude(e){var o;const{i18n:t}=Le(),n=Bp();let r;return n.isSuccess&&(r=Fb(t.language,n.data)),b(Oe,{container:!0,alignItems:"center",justifyContent:"center",sx:{height:e.rowHeight,marginBottom:e.marginBottom},children:b(Oe,{size:12,children:G(Wt,{spacing:0,children:[b(ot,{variant:"h6",children:e.showExercise?(o=e.setConfigData.exercise)==null?void 0:o.getTranslation(r).name:""}),G("div",{children:[e.setConfigData.textRepr,e.setConfigData.isSpecialType&&b(vu,{label:e.setConfigData.type,color:"info",size:"small",sx:{marginLeft:"0.5em"}})]}),b(ot,{variant:"caption",children:e.setConfigData.comment})]})})})}function w1t(e){return G(Oe,{container:!0,justifyContent:"space-between",alignItems:"flex-start",children:[b(Oe,{size:1,children:b(Wt,{divider:b(en,{height:"10px"}),children:e.slotData.exercises.map((t,n)=>b(bCt,{image:t.mainImage,iconSize:40,avatarSize:50},n))})}),b(Oe,{size:11,children:e.slotData.setConfigs.map((t,n)=>{var o;const r=n===0||t.exerciseId!==((o=e.slotData.setConfigs[n-1])==null?void 0:o.exerciseId);return b(ude,{setConfigData:t,marginBottom:"1em",showExercise:r},n)})})]})}const dde=e=>{var l;const[t,n]=Y.useState(null),r=!!t,o=()=>{n(null)},[i,a]=Le(),s=()=>window.location.href=Mn(Tn.ROUTINE_ADD_LOG,a.language,{id:e.dayData.day.id});return G(to,{sx:{minWidth:275},children:[b(jl,{sx:{bgcolor:"lightgray"},action:e.dayData.day.isSpecialType?b(vu,{label:e.dayData.day.type,color:"info",size:"small",sx:{marginLeft:"0.5em"}}):null,title:e.dayData.day.isRest?i("routines.restDay"):e.dayData.day.name,subheader:(l=e.dayData.day)==null?void 0:l.description}),b(_s,{id:"basic-menu",anchorEl:t,open:r,onClose:o,MenuListProps:{"aria-labelledby":"basic-button"},children:b(rn,{onClick:s,children:i("routines.addWeightLog")})}),b(ni,{sx:{padding:0,marginBottom:0},children:e.dayData.slots.length>0&&b(Wt,{children:e.dayData.slots.map((c,u)=>G("div",{children:[b(en,{padding:1,children:b(w1t,{slotData:c,index:u})}),b(Is,{})]},`SlotDataList-${e.dayData.day.id}-${u}`))})})]})},fde=()=>{const[e,t]=Le(),n=_St();return n.isLoading?b(mo,{}):n.data!==null?b(x1t,{routine:n.data}):b(lz,{title:e("routines.routine"),link:Mn(Tn.ROUTINE_ADD,t.language)})},x1t=e=>{const[t,n]=Le();return G(to,{children:[b(jl,{title:t("routines.routine"),subheader:e.routine.name??"."}),b(ni,{sx:{height:"510px",overflow:"auto"},children:b(Bl,{children:e.routine.dayDataCurrentIteration.map((r,o)=>b(S1t,{dayData:r},o))})}),b(Ds,{children:b(dt,{size:"small",href:Mn(Tn.ROUTINE_DETAIL,n.language,{id:e.routine.id}),children:t("seeDetails")})})]})},S1t=e=>{var i,a,s;const[t,n]=v.useState(!1),[r]=Le();return G(wt,{children:[G(Ip,{onClick:()=>n(!t),selected:t,disabled:(i=e.dayData.day)==null?void 0:i.isRest,children:[b(sa,{children:t?b(ure,{}):b(Rb,{})}),b(ko,{primary:(a=e.dayData.day)!=null&&a.isRest?r("routines.restDay"):(s=e.dayData.day)==null?void 0:s.name})]}),b(xl,{in:t,timeout:"auto",unmountOnExit:!0,children:e.dayData.slots.map((l,c)=>b("div",{children:l.setConfigs.map((u,d)=>b(ude,{setConfigData:u,rowHeight:"70px",showExercise:!0},d))},c))})]})},Vo=ct(R.jsx("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"}),"Add");function E1(e="lastWeek"){return ho({queryKey:[Ct.BODY_WEIGHT,e],queryFn:()=>aBe(e)})}const C1t=()=>{const e=Lt();return jt({mutationFn:t=>sBe(t),onSuccess:()=>e.invalidateQueries({queryKey:[Ct.BODY_WEIGHT]})})},E1t=()=>{const e=Lt();return jt({mutationFn:t=>cBe(t),onError:t=>{console.log(t)},onSuccess:()=>e.invalidateQueries({queryKey:[Ct.BODY_WEIGHT]})})},P1t=()=>{const e=Lt();return jt({mutationFn:t=>lBe(t),onSuccess:()=>{e.invalidateQueries({queryKey:[Ct.BODY_WEIGHT]})}})},h0=({weightEntry:e,closeFn:t})=>{const n=E1(),r=E1t(),o=P1t(),[i,a]=v.useState(e?vt.fromJSDate(e.date):vt.now),[s,l]=Le(),c=Ha({weight:Pa().min(30,"Min weight is 30 kg").max(300,"Max weight is 300 kg").required("Weight field is required")});return n.isLoading?b(mo,{}):b(Va,{initialValues:{weight:e?e.weight:0,date:yi(e?e.date:new Date)},validationSchema:c,onSubmit:async u=>{if(e){e.weight=u.weight,e.date=new Date(u.date);try{o.mutate(e)}catch{}}else{e=new Wre(new Date(u.date),u.weight);try{r.mutate(e)}catch{}}t&&t()},children:u=>b(pa,{children:G(Wt,{spacing:2,children:[b(nn,{fullWidth:!0,id:"weight",label:s("weight"),error:u.touched.weight&&!!u.touched.weight,helperText:u.touched.weight&&u.errors.weight,...u.getFieldProps("weight")}),b(Cg,{dateAdapter:ub,adapterLocale:l.language,children:b(TO,{format:"yyyy-MM-dd",label:s("date"),value:i,slotProps:{textField:{variant:"outlined"}},disableFuture:!0,onChange:d=>{d&&u.setFieldValue("date",d.toJSDate()),a(d)},shouldDisableDate:d=>e&&yi(e.date)===d.toISODate()?!1:d?n.data.some(f=>yi(f.date)===d.toISODate()):!1})}),b(Wt,{direction:"row",justifyContent:"end",sx:{mt:2},children:b(dt,{color:"primary",variant:"contained",type:"submit",sx:{mt:2},children:s("submit")})})]})})})},T1t=["checked","disabled","error","focused","focusVisible","required","expanded","selected"];function I1t(e={}){const{disableGlobal:t=!1,productionPrefix:n="jss",seed:r=""}=e,o=r===""?"":`${r}-`;let i=0;const a=()=>(i+=1,i);return(s,l)=>{const c=l.options.name;if(c&&c.startsWith("Mui")&&!l.options.link&&!t){if(T1t.includes(s.key))return`Mui-${s.key}`;const u=`${o}${c}-${s.key}`;return!l.options.theme[WZ]||r!==""?u:`${u}-${a()}`}return`${o}${n}${a()}`}}var EY=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},P1=(typeof window>"u"?"undefined":EY(window))==="object"&&(typeof document>"u"?"undefined":EY(document))==="object"&&document.nodeType===9;function tC(e){"@babel/helpers - typeof";return tC=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},tC(e)}function O1t(e,t){if(tC(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(tC(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function A1t(e){var t=O1t(e,"string");return tC(t)=="symbol"?t:t+""}function k1t(e,t){for(var n=0;n<+~=|^:(),"'`\s])/g,TY=typeof CSS<"u"&&CSS.escape,M5=function(e){return TY?TY(e):e.replace(R1t,"\\$1")},hde=function(){function e(n,r,o){this.type="style",this.isProcessed=!1;var i=o.sheet,a=o.Renderer;this.key=n,this.options=o,this.style=r,i?this.renderer=i.renderer:a&&(this.renderer=new a)}var t=e.prototype;return t.prop=function(r,o,i){if(o===void 0)return this.style[r];var a=i?i.force:!1;if(!a&&this.style[r]===o)return this;var s=o;(!i||i.process!==!1)&&(s=this.options.jss.plugins.onChangeValue(o,r,this));var l=s==null||s===!1,c=r in this.style;if(l&&!c&&!a)return this;var u=l&&c;if(u?delete this.style[r]:this.style[r]=s,this.renderable&&this.renderer)return u?this.renderer.removeProperty(this.renderable,r):this.renderer.setProperty(this.renderable,r,s),this;var d=this.options.sheet;return d&&d.attached,this},e}(),jF=function(e){$C(t,e);function t(r,o,i){var a;a=e.call(this,r,o,i)||this;var s=i.selector,l=i.scoped,c=i.sheet,u=i.generateId;return s?a.selectorText=s:l!==!1&&(a.id=u(aN(aN(a)),c),a.selectorText="."+M5(a.id)),a}var n=t.prototype;return n.applyTo=function(o){var i=this.renderer;if(i){var a=this.toJSON();for(var s in a)i.setProperty(o,s,a[s])}return this},n.toJSON=function(){var o={};for(var i in this.style){var a=this.style[i];typeof a!="object"?o[i]=a:Array.isArray(a)&&(o[i]=ag(a))}return o},n.toString=function(o){var i=this.options.sheet,a=i?i.options.link:!1,s=a?Gr({},o,{allowEmpty:!0}):o;return nC(this.selectorText,this.style,s)},pde(t,[{key:"selector",set:function(o){if(o!==this.selectorText){this.selectorText=o;var i=this.renderer,a=this.renderable;if(!(!a||!i)){var s=i.setSelector(a,o);s||i.replaceRule(a,this)}}},get:function(){return this.selectorText}}]),t}(hde),$1t={onCreateRule:function(t,n,r){return t[0]==="@"||r.parent&&r.parent.type==="keyframes"?null:new jF(t,n,r)}},d_={indent:1,children:!0},D1t=/@([\w-]+)/,_1t=function(){function e(n,r,o){this.type="conditional",this.isProcessed=!1,this.key=n;var i=n.match(D1t);this.at=i?i[1]:"unknown",this.query=o.name||"@"+this.at,this.options=o,this.rules=new zM(Gr({},o,{parent:this}));for(var a in r)this.rules.add(a,r[a]);this.rules.process()}var t=e.prototype;return t.getRule=function(r){return this.rules.get(r)},t.indexOf=function(r){return this.rules.indexOf(r)},t.addRule=function(r,o,i){var a=this.rules.add(r,o,i);return a?(this.options.jss.plugins.onProcessRule(a),a):null},t.replaceRule=function(r,o,i){var a=this.rules.replace(r,o,i);return a&&this.options.jss.plugins.onProcessRule(a),a},t.toString=function(r){r===void 0&&(r=d_);var o=g0(r),i=o.linebreak;if(r.indent==null&&(r.indent=d_.indent),r.children==null&&(r.children=d_.children),r.children===!1)return this.query+" {}";var a=this.rules.toString(r);return a?this.query+" {"+i+a+i+"}":""},e}(),N1t=/@container|@media|@supports\s+/,L1t={onCreateRule:function(t,n,r){return N1t.test(t)?new _1t(t,n,r):null}},f_={indent:1,children:!0},F1t=/@keyframes\s+([\w-]+)/,BF=function(){function e(n,r,o){this.type="keyframes",this.at="@keyframes",this.isProcessed=!1;var i=n.match(F1t);i&&i[1]?this.name=i[1]:this.name="noname",this.key=this.type+"-"+this.name,this.options=o;var a=o.scoped,s=o.sheet,l=o.generateId;this.id=a===!1?this.name:M5(l(this,s)),this.rules=new zM(Gr({},o,{parent:this}));for(var c in r)this.rules.add(c,r[c],Gr({},o,{parent:this}));this.rules.process()}var t=e.prototype;return t.toString=function(r){r===void 0&&(r=f_);var o=g0(r),i=o.linebreak;if(r.indent==null&&(r.indent=f_.indent),r.children==null&&(r.children=f_.children),r.children===!1)return this.at+" "+this.id+" {}";var a=this.rules.toString(r);return a&&(a=""+i+a+i),this.at+" "+this.id+" {"+a+"}"},e}(),j1t=/@keyframes\s+/,B1t=/\$([\w-]+)/g,zF=function(t,n){return typeof t=="string"?t.replace(B1t,function(r,o){return o in n?n[o]:r}):t},IY=function(t,n,r){var o=t[n],i=zF(o,r);i!==o&&(t[n]=i)},z1t={onCreateRule:function(t,n,r){return typeof t=="string"&&j1t.test(t)?new BF(t,n,r):null},onProcessStyle:function(t,n,r){return n.type!=="style"||!r||("animation-name"in t&&IY(t,"animation-name",r.keyframes),"animation"in t&&IY(t,"animation",r.keyframes)),t},onChangeValue:function(t,n,r){var o=r.options.sheet;if(!o)return t;switch(n){case"animation":return zF(t,o.keyframes);case"animation-name":return zF(t,o.keyframes);default:return t}}},V1t=function(e){$C(t,e);function t(){return e.apply(this,arguments)||this}var n=t.prototype;return n.toString=function(o){var i=this.options.sheet,a=i?i.options.link:!1,s=a?Gr({},o,{allowEmpty:!0}):o;return nC(this.key,this.style,s)},t}(hde),H1t={onCreateRule:function(t,n,r){return r.parent&&r.parent.type==="keyframes"?new V1t(t,n,r):null}},U1t=function(){function e(n,r,o){this.type="font-face",this.at="@font-face",this.isProcessed=!1,this.key=n,this.style=r,this.options=o}var t=e.prototype;return t.toString=function(r){var o=g0(r),i=o.linebreak;if(Array.isArray(this.style)){for(var a="",s=0;s=this.index){o.push(r);return}for(var a=0;ai){o.splice(a,0,r);return}}},t.reset=function(){this.registry=[]},t.remove=function(r){var o=this.registry.indexOf(r);this.registry.splice(o,1)},t.toString=function(r){for(var o=r===void 0?{}:r,i=o.attached,a=qA(o,["attached"]),s=g0(a),l=s.linebreak,c="",u=0;u-1?o.substr(0,i-1):o;t.style.setProperty(n,a,i>-1?"important":"")}}catch{return!1}return!0},rEt=function(t,n){try{t.attributeStyleMap?t.attributeStyleMap.delete(n):t.style.removeProperty(n)}catch{}},oEt=function(t,n){return t.selectorText=n,t.selectorText===n},yde=mde(function(){return document.querySelector("head")});function iEt(e,t){for(var n=0;nt.index&&r.options.insertionPoint===t.insertionPoint)return r}return null}function aEt(e,t){for(var n=e.length-1;n>=0;n--){var r=e[n];if(r.attached&&r.options.insertionPoint===t.insertionPoint)return r}return null}function sEt(e){for(var t=yde(),n=0;n0){var n=iEt(t,e);if(n&&n.renderer)return{parent:n.renderer.element.parentNode,node:n.renderer.element};if(n=aEt(t,e),n&&n.renderer)return{parent:n.renderer.element.parentNode,node:n.renderer.element.nextSibling}}var r=e.insertionPoint;if(r&&typeof r=="string"){var o=sEt(r);if(o)return{parent:o.parentNode,node:o.nextSibling}}return!1}function cEt(e,t){var n=t.insertionPoint,r=lEt(t);if(r!==!1&&r.parent){r.parent.insertBefore(e,r.node);return}if(n&&typeof n.nodeType=="number"){var o=n,i=o.parentNode;i&&i.insertBefore(e,o.nextSibling);return}yde().appendChild(e)}var uEt=mde(function(){var e=document.querySelector('meta[property="csp-nonce"]');return e?e.getAttribute("content"):null}),RY=function(t,n,r){try{"insertRule"in t?t.insertRule(n,r):"appendRule"in t&&t.appendRule(n)}catch{return!1}return t.cssRules[r]},$Y=function(t,n){var r=t.cssRules.length;return n===void 0||n>r?r:n},dEt=function(){var t=document.createElement("style");return t.textContent=` +`,t},fEt=function(){function e(n){this.getPropertyValue=tEt,this.setProperty=nEt,this.removeProperty=rEt,this.setSelector=oEt,this.hasInsertedRules=!1,this.cssRules=[],n&&kx.add(n),this.sheet=n;var r=this.sheet?this.sheet.options:{},o=r.media,i=r.meta,a=r.element;this.element=a||dEt(),this.element.setAttribute("data-jss",""),o&&this.element.setAttribute("media",o),i&&this.element.setAttribute("data-meta",i);var s=uEt();s&&this.element.setAttribute("nonce",s)}var t=e.prototype;return t.attach=function(){if(!(this.element.parentNode||!this.sheet)){cEt(this.element,this.sheet.options);var r=!!(this.sheet&&this.sheet.deployed);this.hasInsertedRules&&r&&(this.hasInsertedRules=!1,this.deploy())}},t.detach=function(){if(this.sheet){var r=this.element.parentNode;r&&r.removeChild(this.element),this.sheet.options.link&&(this.cssRules=[],this.element.textContent=` `)}},t.deploy=function(){var r=this.sheet;if(r){if(r.options.link){this.insertRules(r.rules);return}this.element.textContent=` `+r.toString()+` -`}},t.insertRules=function(r,o){for(var i=0;ie.length)&&(t=e.length);for(var n=0,r=Array(t);n-1){var i=vde[t];if(!Array.isArray(i))return hn.js+fp(i)in n?hn.css+i:!1;if(!o)return!1;for(var a=0;ar?1:-1:n.length-r.length};return{onProcessStyle:function(n,r){if(r.type!=="style")return n;for(var o={},i=Object.keys(n).sort(e),a=0;a"u"?null:NEt(),LEt()]}}function wde(e={}){const{baseClasses:t,newClasses:n,Component:r}=e;if(!n)return t;const o={...t};return Object.keys(n).forEach(i=>{n[i]&&(o[i]=`${t[i]} ${n[i]}`)}),o}const Ty={set:(e,t,n,r)=>{let o=e.get(t);o||(o=new Map,e.set(t,o)),o.set(n,r)},get:(e,t,n)=>{const r=e.get(t);return r?r.get(n):void 0},delete:(e,t,n)=>{e.get(t).delete(n)}};function jEt(){const e=$A();return(e==null?void 0:e.$$material)??e}const BEt=ude(FEt()),zEt=XCt(),VEt=new Map,HEt={disableGeneration:!1,generateClassName:zEt,jss:BEt,sheetsCache:null,sheetsManager:VEt,sheetsRegistry:null},UEt=v.createContext(HEt);let RY=-1e9;function WEt(){return RY+=1,RY}function $Y(e){return e.length===0}function GEt(e){const{variant:t,...n}=e;let r=t||"";return Object.keys(n).sort().forEach(o=>{o==="color"?r+=$Y(r)?e[o]:Ce(e[o]):r+=`${$Y(r)?o:Ce(o)}${Ce(e[o].toString())}`}),r}const qEt={};function KEt(e){const t=typeof e=="function";return{create:(n,r)=>{let o;try{o=t?e(n):e}catch(l){throw l}if(!r||!n.components||!n.components[r]||!n.components[r].styleOverrides&&!n.components[r].variants)return o;const i=n.components[r].styleOverrides||{},a=n.components[r].variants||[],s={...o};return Object.keys(i).forEach(l=>{s[l]=Oo(s[l]||{},i[l])}),a.forEach(l=>{const c=GEt(l.props);s[c]=Oo(s[c]||{},l.style)}),s},options:{}}}function YEt({state:e,stylesOptions:t},n,r){if(t.disableGeneration)return n||{};e.cacheClasses||(e.cacheClasses={value:null,lastProp:null,lastJSS:{}});let o=!1;return e.classes!==e.cacheClasses.lastJSS&&(e.cacheClasses.lastJSS=e.classes,o=!0),n!==e.cacheClasses.lastProp&&(e.cacheClasses.lastProp=n,o=!0),o&&(e.cacheClasses.value=wde({baseClasses:e.cacheClasses.lastJSS,newClasses:n,Component:r})),e.cacheClasses.value}function QEt({state:e,theme:t,stylesOptions:n,stylesCreator:r,name:o},i){if(n.disableGeneration)return;let a=Ty.get(n.sheetsManager,r,t);a||(a={refs:0,staticSheet:null,dynamicStyles:null},Ty.set(n.sheetsManager,r,t,a));const s={...r.options,...n,theme:t,flip:typeof n.flip=="boolean"?n.flip:t.direction==="rtl"};s.generateId=s.serverGenerateClassName||s.generateClassName;const l=n.sheetsRegistry;if(a.refs===0){let c;n.sheetsCache&&(c=Ty.get(n.sheetsCache,r,t));const u=r.create(t,o);c||(c=n.jss.createStyleSheet(u,{link:!1,...s}),c.attach(),n.sheetsCache&&Ty.set(n.sheetsCache,r,t,c)),l&&l.add(c),a.staticSheet=c,a.dynamicStyles=dde(u)}if(a.dynamicStyles){const c=n.jss.createStyleSheet(a.dynamicStyles,{link:!0,...s});c.update(i),c.attach(),e.dynamicSheet=c,e.classes=wde({baseClasses:a.staticSheet.classes,newClasses:c.classes}),l&&l.add(c)}else e.classes=a.staticSheet.classes;a.refs+=1}function XEt({state:e},t){e.dynamicSheet&&e.dynamicSheet.update(t)}function JEt({state:e,theme:t,stylesOptions:n,stylesCreator:r}){if(n.disableGeneration)return;const o=Ty.get(n.sheetsManager,r,t);o.refs-=1;const i=n.sheetsRegistry;o.refs===0&&(Ty.delete(n.sheetsManager,r,t),n.jss.removeStyleSheet(o.staticSheet),i&&i.remove(o.staticSheet)),e.dynamicSheet&&(n.jss.removeStyleSheet(e.dynamicSheet),i&&i.remove(e.dynamicSheet))}function ZEt(e,t){const n=v.useRef([]);let r;const o=v.useMemo(()=>({}),t);n.current!==o&&(n.current=o,r=e()),v.useEffect(()=>()=>{r&&r()},[o])}function xde(e,t={}){const{name:n,classNamePrefix:r,Component:o,defaultTheme:i=qEt,...a}=t,s=KEt(e),l=n||r||"makeStyles";return s.options={index:WEt(),name:n,meta:l,classNamePrefix:l},(u={})=>{const d=jEt()||i,f={...v.useContext(UEt),...a},p=v.useRef(),h=v.useRef();return ZEt(()=>{const y={name:n,state:{},stylesCreator:s,stylesOptions:f,theme:d};return QEt(y,u),h.current=!1,p.current=y,()=>{JEt(y)}},[d,s]),v.useEffect(()=>{h.current&&XEt(p.current,u),h.current=!0}),YEt(p.current,u.classes,o)}}const ePt=xde(e=>({table:{"& .MuiPaper-root":{border:"1px solid #bababa"}}})),tPt=({weights:e})=>{const[t]=Le(),n=ePt(),o=e.slice(0,5);return b("div",{className:n.table,children:b(Mc,{children:K(Ml,{size:"small",children:[b(Cu,{children:K(Ht,{children:[b(Ie,{align:"center",children:t("date")}),b(Ie,{align:"center",children:t("weight")})]})}),b(Rl,{children:o.map(i=>K(Ht,{children:[b(Ie,{align:"center",children:i.date.toLocaleDateString()}),b(Ie,{align:"center",children:i.weight})]},i.date.toLocaleDateString()))})]})})})},nPt=({active:e,payload:t,label:n})=>{const[r,o]=Le();return e&&t&&t.length?K(to,{style:{padding:8},children:[b("p",{children:b("strong",{children:new Date(n).toLocaleDateString(o.language)})}),K("p",{children:[r("weight"),": ",t[0].value]})]}):null},Sde=({weights:e,height:t})=>{t=t||300;const r=Ro(),[o,i]=Le(),[a,s]=Y.useState(!1),[l,c]=Y.useState(),u=()=>s(!1),d=[...e].sort((p,h)=>p.date.getTime()-h.date.getTime()).map(p=>({date:p.date.getTime(),weight:p.weight,entry:p}));function f(p,h){c(h.payload.entry),s(!0)}return K("div",{children:[l&&b(Fi,{title:o("edit"),isOpen:a,closeFn:u,children:b(u0,{weightEntry:l})}),b(Mp,{height:t,children:K(qse,{data:d,children:[b(Xb,{type:"monotone",dataKey:"weight",stroke:r.palette.secondary.main,strokeWidth:2,dot:d.length>30?!1:{strokeWidth:1,r:4},activeDot:{stroke:"black",strokeWidth:1,r:6,onClick:f}}),b(Bg,{stroke:"#ccc",strokeDasharray:"5 5"}),b(Bl,{dataKey:"date",type:"number",domain:["dataMin","dataMax"],tickFormatter:p=>new Date(p).toLocaleDateString(i.language)}),b(zl,{domain:["auto","auto"]}),b(is,{content:b(nPt,{})})]})})]})},Cde=()=>{var n,r;const[e]=Le(),t=DM("lastYear");return t.isLoading?b(ho,{}):((n=t.data)==null?void 0:n.length)!==void 0&&((r=t.data)==null?void 0:r.length)>0?b(rPt,{entries:t.data}):b(oz,{title:e("weight"),modalContent:b(u0,{})})},rPt=e=>{const[t,n]=Y.useState(!1),r=()=>n(!0),o=()=>n(!1),[i,a]=Le();return K(wt,{children:[K(bo,{children:[b(Su,{title:i("weight"),subheader:"."}),K(_i,{sx:{height:"500px",overflow:"auto"},children:[b(Sde,{weights:e.entries,height:200}),b(on,{sx:{mt:2},children:b(tPt,{weights:e.entries})})]}),K(Ms,{sx:{justifyContent:"space-between",alignItems:"flex-start"},children:[b(dt,{size:"small",href:Fn(_n.WEIGHT_OVERVIEW,a.language),children:i("seeDetails")}),b(kc,{title:i("addEntry"),children:b(vn,{onClick:r,children:b(Vo,{})})})]})]}),b(Fi,{title:i("add"),isOpen:t,closeFn:o,children:b(u0,{closeFn:o})})]})},oPt=()=>{const[e,t]=Le();return b(iH,{callback:r=>{r!==null&&(window.location.href=Fn(_n.INGREDIENT_DETAIL,t.language,{id:r.data.id}))}})},iPt=()=>b("div",{children:"About Page"});function kH(e){const[t]=Le(),[n,r,o]=$s(e.fieldName);return b(Ic,{multiple:!0,freeSolo:!0,id:e.fieldName,value:n.value,options:n.value,onChange:(i,a)=>{o.setValue(a)},renderTags:(i,a)=>i.map((s,l)=>b(mu,{label:s,...a({index:l})})),onBlur:n.onBlur,renderInput:i=>b(nn,{...i,id:"exerciseAliases",variant:"standard",label:t("exercises.alternativeNames"),error:r.touched&&!!r.error,helperText:r.touched&&r.error,value:n.value})})}function aPt(e){const[t]=Le(),[n,r,o]=$s(e.fieldName);return b(Ic,{multiple:!0,id:e.fieldName,options:e.options.map(i=>i.id),getOptionLabel:i=>t(Na(e.options.find(a=>a.id===i).name)),...n,onChange:(i,a)=>{o.setValue(a)},renderInput:i=>b(nn,{variant:"standard",label:t("exercises.equipment"),value:n.value,...i})})}function MH(e){const[t]=Le(),[n,r]=$s(e.fieldName);return b(nn,{fullWidth:!0,id:e.fieldName,label:t("name"),variant:"standard",error:r.touched&&!!r.error,helperText:r.touched&&r.error,...n})}function sPt(e){const[t]=Le(),[n,r]=$s(e.fieldName);return K(_g,{fullWidth:!0,children:[b(Ng,{id:"label-category",children:t("category")}),b(Pp,{labelId:"label-category",id:"category",label:t("category"),error:r.touched&&!!r.error,...n,children:e.options}),r.touched&&!!r.error&&b(lk,{error:!0,children:r.error})]})}const Ede=5,Pde=40,RH=e=>La().min(Ede,e("forms.valueTooShort")).max(Pde,e("forms.valueTooLong")).required(e("forms.fieldRequired")),$H=e=>bH().ensure().compact().of(La().min(Ede,e("forms.valueTooShort")).max(Pde,e("forms.valueTooLong"))),DH=e=>La().min(40,e("forms.valueTooShort")).required(e("forms.fieldRequired")),Tde=e=>bH().ensure().compact().of(La().min(15,e("forms.valueTooShort"))),lPt=e=>Ea().required(e("forms.fieldRequired")),Pg=({primaryMuscles:e,secondaryMuscles:t,isFront:n})=>{const r=[];r.push(...e.filter(i=>i.isFront===n).map(i=>`/muscles/main/muscle-${i.id}.svg`)),r.push(...t.filter(i=>i.isFront===n).map(i=>`/muscles/secondary/muscle-${i.id}.svg`)),r.push(n?"/muscles/muscular_system_front.svg":"/muscles/muscular_system_back.svg");const o=r.map(i=>`url(${kFe}${i})`).join(", ");return b("div",{style:{height:"400px",width:"200px",backgroundImage:o,backgroundRepeat:"no-repeat"}})};var Ide=(e=>(e[e.SET_NOTIFICATION=0]="SET_NOTIFICATION",e))(Ide||{}),jn=(e=>(e[e.RESET=0]="RESET",e[e.SET_NAME_EN=1]="SET_NAME_EN",e[e.SET_ALIASES_EN=2]="SET_ALIASES_EN",e[e.SET_DESCRIPTION_EN=3]="SET_DESCRIPTION_EN",e[e.SET_NOTES_EN=4]="SET_NOTES_EN",e[e.SET_CATEGORY=5]="SET_CATEGORY",e[e.SET_EQUIPMENT=6]="SET_EQUIPMENT",e[e.SET_PRIMARY_MUSCLES=7]="SET_PRIMARY_MUSCLES",e[e.SET_MUSCLES_SECONDARY=8]="SET_MUSCLES_SECONDARY",e[e.SET_VARIATION_ID=9]="SET_VARIATION_ID",e[e.SET_NEW_VARIATION_BASE_ID=10]="SET_NEW_VARIATION_BASE_ID",e[e.SET_LANGUAGE=11]="SET_LANGUAGE",e[e.SET_NAME_I18N=12]="SET_NAME_I18N",e[e.SET_ALIASES_I18N=13]="SET_ALIASES_I18N",e[e.SET_DESCRIPTION_I18N=14]="SET_DESCRIPTION_I18N",e[e.SET_NOTES_I18N=15]="SET_NOTES_I18N",e[e.SET_IMAGES=16]="SET_IMAGES",e))(jn||{});const DY=e=>({type:Ide.SET_NOTIFICATION,payload:e}),_Y={notification:{notify:!1,message:"",severity:void 0,title:"",type:void 0}},cPt=v.createContext([_Y,()=>_Y]),uPt=()=>v.useContext(cPt),dPt=e=>({type:jn.SET_NAME_EN,payload:e}),fPt=e=>({type:jn.SET_DESCRIPTION_EN,payload:e}),pPt=e=>({type:jn.SET_NOTES_EN,payload:e}),hPt=e=>({type:jn.SET_ALIASES_EN,payload:e}),gPt=e=>({type:jn.SET_NAME_I18N,payload:e}),mPt=e=>({type:jn.SET_DESCRIPTION_I18N,payload:e}),yPt=e=>({type:jn.SET_NOTES_I18N,payload:e}),vPt=e=>({type:jn.SET_ALIASES_I18N,payload:e}),bPt=e=>({type:jn.SET_CATEGORY,payload:e}),wPt=e=>({type:jn.SET_EQUIPMENT,payload:e}),xPt=e=>({type:jn.SET_PRIMARY_MUSCLES,payload:e}),SPt=e=>({type:jn.SET_MUSCLES_SECONDARY,payload:e}),CPt=e=>({type:jn.SET_VARIATION_ID,payload:e}),EPt=e=>({type:jn.SET_NEW_VARIATION_BASE_ID,payload:e}),PPt=e=>({type:jn.SET_LANGUAGE,payload:e}),TPt=e=>({type:jn.SET_IMAGES,payload:e}),IPt=(e,t)=>{if(t===void 0)return e;switch(t.type){case jn.RESET:return TO;case jn.SET_NAME_EN:return{...e,nameEn:t.payload};case jn.SET_DESCRIPTION_EN:return{...e,descriptionEn:t.payload};case jn.SET_NOTES_EN:return{...e,notesEn:t.payload};case jn.SET_ALIASES_EN:return{...e,alternativeNamesEn:t.payload};case jn.SET_CATEGORY:return{...e,category:t.payload};case jn.SET_EQUIPMENT:return{...e,equipment:t.payload};case jn.SET_PRIMARY_MUSCLES:return{...e,muscles:t.payload};case jn.SET_MUSCLES_SECONDARY:return{...e,musclesSecondary:t.payload};case jn.SET_VARIATION_ID:return{...e,variationId:t.payload};case jn.SET_NEW_VARIATION_BASE_ID:return{...e,newVariationBaseId:t.payload};case jn.SET_LANGUAGE:return{...e,languageId:t.payload};case jn.SET_NAME_I18N:return{...e,nameI18n:t.payload};case jn.SET_DESCRIPTION_I18N:return{...e,descriptionI18n:t.payload};case jn.SET_NOTES_I18N:return{...e,notesI18n:t.payload};case jn.SET_ALIASES_I18N:return{...e,alternativeNamesI18n:t.payload};case jn.SET_IMAGES:return{...e,images:t.payload};default:return e}},TO={category:null,muscles:[],musclesSecondary:[],variationId:null,newVariationBaseId:null,languageId:null,equipment:[],nameEn:"",descriptionEn:"",alternativeNamesEn:[],notesEn:[],nameI18n:"",alternativeNamesI18n:[],descriptionI18n:"",notesI18n:[],images:[]},Ode=v.createContext([TO,()=>TO]),OPt=({children:e})=>{const[t,n]=v.useReducer(IPt,TO);return b(Ode.Provider,{value:[t,n],children:e})},f0=()=>v.useContext(Ode),APt=({onContinue:e})=>{const[t]=Le(),[n,r]=f0(),[o,i]=v.useState(n.muscles),[a,s]=v.useState(n.musclesSecondary);v.useEffect(()=>{r(xPt(o))},[r,o]),v.useEffect(()=>{r(SPt(a))},[r,a]);const l=AM(),c=f1(),u=kM(),d=za({nameEn:RH(t),newAlternativeNameEn:$H(t),category:lPt(t)});return b(Ba,{initialValues:{nameEn:n.nameEn,newAlternativeNameEn:n.alternativeNamesEn,category:n.category!==null?n.category:"",muscles:n.muscles,equipment:n.equipment,musclesSecondary:n.musclesSecondary},validationSchema:d,onSubmit:f=>{r(dPt(f.nameEn)),r(bPt(f.category)),r(hPt(f.newAlternativeNameEn)),r(wPt(f.equipment)),e()},children:f=>K(fa,{children:[K(Wt,{spacing:2,children:[b(MH,{fieldName:"nameEn"}),b(kH,{fieldName:"newAlternativeNameEn"}),l.isLoading?K(on,{children:[" ",b(gs,{})," "]}):b(sPt,{fieldName:"category",options:l.data.map(p=>b(en,{value:p.id,children:t(Na(p.name))},p.id))}),u.isLoading?K(on,{children:[" ",b(gs,{})," "]}):b(aPt,{fieldName:"equipment",options:u.data}),c.isLoading?K(on,{children:[" ",b(gs,{})," "]}):K(wt,{children:[b(Ic,{multiple:!0,id:"muscles",options:c.data.map(p=>p.id),getOptionDisabled:p=>a.includes(p),getOptionLabel:p=>c.data.find(h=>h.id===p).getName(t),value:o,onChange:(p,h)=>{i(h)},renderInput:p=>b(nn,{...p,variant:"standard",label:t("exercises.muscles"),value:f.getFieldProps("muscles").value,onChange:h=>{f.setFieldValue(f.getFieldProps("muscles").name,h.target.value)}})}),b(Ic,{multiple:!0,id:"secondary-muscles",options:c.data.map(p=>p.id),getOptionDisabled:p=>o.includes(p),getOptionLabel:p=>c.data.find(h=>h.id===p).getName(t),value:a,onChange:(p,h)=>{s(h)},renderInput:p=>b(nn,{...p,variant:"standard",label:t("exercises.secondaryMuscles"),value:f.getFieldProps("muscles").value})})]}),K(Oe,{container:!0,children:[b(Oe,{display:"flex",justifyContent:"center",size:6,children:b(Pg,{primaryMuscles:o.map(p=>c.data.find(h=>h.id===p)),secondaryMuscles:a.map(p=>c.data.find(h=>h.id===p)),isFront:!0})}),b(Oe,{display:"flex",justifyContent:"center",size:6,children:b(Pg,{primaryMuscles:o.map(p=>c.data.find(h=>h.id===p)),secondaryMuscles:a.map(p=>c.data.find(h=>h.id===p)),isFront:!1})})]})]}),b(Oe,{container:!0,children:b(Oe,{display:"flex",justifyContent:"end",size:12,children:b(on,{sx:{mb:2},children:b("div",{children:b(dt,{variant:"contained",type:"submit",sx:{mt:1,mr:1},children:t("continue")})})})})})]})})};function kPt(e,t){const n=new Map;return e.forEach(r=>{const o=t(r),i=n.get(o);i?i.push(r):n.set(o,[r])}),n}const NY=({exercises:e})=>{const r=e[0].variationId,o=e[0].id,[i,a]=f0(),[s,l]=v.useState(!1),[c,u]=v.useState(i.variationId),[d,f]=v.useState(i.newVariationBaseId);v.useEffect(()=>{a(CPt(c))},[a,c]),v.useEffect(()=>{a(EPt(d))},[a,d]);const p=(m,y)=>()=>{m!==null?(y=null,m===i.variationId&&(m=null)):(m=null,y===i.newVariationBaseId&&(y=null)),u(m),f(y)};let h;return r===null?h=i.newVariationBaseId===o:h=r===i.variationId,b(Ps,{disableGutters:!0,children:b(Ep,{onClick:p(r,o),children:K(Oe,{container:!0,children:[b(Oe,{display:"flex",justifyContent:"start",alignItems:"center",size:{xs:12,sm:3},children:b(Dke,{max:4,spacing:"small",children:e.map(m=>m.mainImage?b(Oc,{src:m.mainImage.url},m.id):b(Oc,{children:b(Rd,{})},m.id))})}),K(Oe,{size:{xs:10,sm:7},children:[e.slice(0,s?e.length:5).map(m=>b("p",{style:{margin:0},children:m.getTranslation().name},m.id)),!s&&e.length>5?b(Ob,{onMouseEnter:()=>l(!0)}):null]}),b(Oe,{display:"flex",justifyContent:"end",size:{xs:2,sm:2},children:b(Fl,{edge:"start",checked:h,tabIndex:-1,disableRipple:!0},`variation-${r}`)}),b(Oe,{size:12,children:b(kl,{sx:{pt:1}})})]})})})},MPt=({onContinue:e,onBack:t})=>{const[n]=Le(),r=zue(),[o,i]=v.useState("");let a=[],s=new Map;return r.isSuccess&&(a=r.data,o!==""&&(a=a.filter(l=>l.getTranslation().name.toLowerCase().includes(o.toLowerCase())))),s=kPt(a.filter(l=>l.variationId!==null),l=>l.variationId),K(wt,{children:[K(Oe,{container:!0,children:[b(Oe,{size:{xs:12,sm:6},children:b(st,{children:n("exercises.whatVariationsExist")})}),b(Oe,{display:"flex",justifyContent:"end",size:{xs:12,sm:6},children:b(nn,{label:n("exercises.filterVariations"),variant:"standard",onChange:l=>i(l.target.value),InputProps:{startAdornment:b(So,{position:"start",children:b(oH,{})})}})})]}),r.isLoading?b(ho,{}):b(to,{elevation:2,sx:{mt:2},children:K(Ll,{style:{maxHeight:"400px",overflowY:"scroll"},children:[a.filter(l=>l.variationId===null).map(l=>b(NY,{exercises:[l]},"base-"+l.id)),[...s.keys()].map(l=>b(NY,{exercises:s.get(l)},"variation-"+l))]})}),K(Il,{severity:"info",variant:"filled",sx:{mt:2},children:[b(XT,{children:n("exercises.identicalExercise")}),n("exercises.identicalExercisePleaseDiscard")]}),b(Oe,{container:!0,children:b(Oe,{display:"flex",justifyContent:"end",size:12,children:b(on,{sx:{mb:2},children:K("div",{children:[b(dt,{disabled:!1,onClick:t,sx:{mt:1,mr:1},children:n("goBack")}),b(dt,{variant:"contained",onClick:e,sx:{mt:1,mr:1},children:n("continue")})]})})})})]})};class RPt{constructor(t,n,r,o,i,a,s){this.username=t,this.email=n,this.emailVerified=r,this.dateJoined=o,this.isTrustworthy=i,this.useMetric=a,this.height=s}}class $Pt{constructor(){Tt(this,"fromJson",t=>new RPt(t.username,t.email,t.email_verified,new Date(t.date_joined),t.is_trustworthy,t.weight_unit==="kg",t.height));Tt(this,"toJson",t=>({email:t.email,height:t.height,weight_unit:t.useMetric?"kg":"lb"}))}}const DPt="userprofile",_Pt=async()=>{const e=pt(DPt),t=new $Pt;try{const n=await tt.get(e,{headers:gt()});return t.fromJson(n.data)}catch{return null}};function Vl(){return fo({queryKey:[qFe],queryFn:_Pt})}function NPt(e){const{t}=Le(),[n,r]=Y.useState(e.initial.toString()),o=AM(),i=Vl(),a=async s=>{r(s.target.value),await xz(e.exerciseId,{category:parseInt(s.target.value),license_author:i.data.username})};return o.isSuccess?K(_g,{fullWidth:!0,children:[b(Ng,{id:"label-category",children:t("category")}),b(Pp,{labelId:"label-category",id:"category",label:t("category"),value:n,onChange:a,children:o.data.map(s=>b(en,{value:s.id,children:t(Na(s.name))},s.id))})]}):null}function LPt(e){const{t}=Le(),[n,r]=Y.useState(e.initial),o=kM(),i=Vl(),a=async s=>{r(s),await xz(e.exerciseId,{equipment:s,license_author:i.data.username})};return o.isSuccess?b(Ic,{multiple:!0,value:n,options:o.data.map(s=>s.id),getOptionLabel:s=>t(Na(o.data.find(l=>l.id===s).name)),onChange:(s,l)=>a(l),renderInput:s=>b(nn,{variant:"standard",label:t("exercises.equipment"),value:n,...s})}):null}var Di=function(){return Di=Object.assign||function(t){for(var n,r=1,o=arguments.length;r0)return e.getRangeAt(0).startContainer.parentNode||void 0}function LY(e){return e?e.replace(/ |\u202F|\u00A0/g," "):""}function jPt(e){var t=document.createTextNode("");e.appendChild(t);var n=document.activeElement===e;if(t!==null&&t.nodeValue!==null&&n){var r=window.getSelection();if(r!==null){var o=document.createRange();o.setStart(t,t.nodeValue.length),o.collapse(!0),r.removeAllRanges(),r.addRange(o)}e instanceof HTMLElement&&e.focus()}}function FY(e){if(e){var t=e.textContent,n=/[\u0591-\u07FF\uFB1D-\uFDFD\uFE70-\uFEFC]/;e.style.direction=t&&n.test(t[0])?"rtl":"ltr"}}var BPt=Y.memo(Y.forwardRef(function(t,n){var r=t.className,o=t.disabled,i=t.tagName,a=t.value,s=a===void 0?"":a,l=_H(t,["className","disabled","tagName","value"]),c=Y.useRef(),u=Y.useRef(s),d=Y.useRef(l);return Y.useEffect(function(){d.current=l;var f=c.current;f&&LY(u.current)!==LY(s)&&(u.current=s,f.innerHTML=s,jPt(f))}),Y.useMemo(function(){function f(h){c.current=h,FY(h),typeof n=="function"?n(h):typeof n=="object"&&n&&(n.current=h)}function p(h){var m,y,w=c.current;if(w){var x=w.innerHTML;x!==u.current&&((y=(m=d.current).onChange)===null||y===void 0||y.call(m,Di(Di({},h),{target:{value:x,name:l.name}}))),FY(w),u.current=x}}return Y.createElement(i||"div",Di(Di({},l),{className:r,contentEditable:!o,dangerouslySetInnerHTML:{__html:s},onBlur:function(h){return(d.current.onBlur||p)(h)},onInput:p,onKeyDown:function(h){return(d.current.onKeyDown||p)(h)},onKeyUp:function(h){return(d.current.onKeyUp||p)(h)},ref:f}))},[r,o,i])})),Ade=Y.createContext(void 0);function zPt(e){var t=e.children,n=Y.useState({htmlMode:!1,update:i}),r=n[0],o=n[1];function i(a){o(function(s){return Di(Di(Di({},s),a),{date:Date.now()})})}return Y.createElement(Ade.Provider,{value:r},t)}function NH(){var e=Y.useContext(Ade);if(!e)throw new Error("You should wrap your component by EditorProvider");return e}function VPt(e){var t=_H(e,[]);return Y.createElement("textarea",Di({},t))}var jY=[],bw=[];function HPt(e,t){if(e&&typeof document<"u"){var n,r=t.prepend===!0?"prepend":"append",o=t.singleTag===!0,i=typeof t.container=="string"?document.querySelector(t.container):document.getElementsByTagName("head")[0];if(o){var a=jY.indexOf(i);a===-1&&(a=jY.push(i)-1,bw[a]={}),n=bw[a]&&bw[a][r]?bw[a][r]:bw[a][r]=s()}else n=s();e.charCodeAt(0)===65279&&(e=e.substring(1)),n.styleSheet?n.styleSheet.cssText+=e:n.appendChild(document.createTextNode(e))}function s(){var l=document.createElement("style");if(l.setAttribute("type","text/css"),t.attributes)for(var c=Object.keys(t.attributes),u=0;ur.setValue(o.target.value)})}),n.touched&&!!n.error&&b(lk,{error:!0,children:n.error})]})}const kde=ct(R.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m5 11h-4v4h-2v-4H7v-2h4V7h2v4h4z"}),"AddCircle"),rTt=({image:e,canDelete:t})=>{const[n]=Le();return K(bo,{children:[b(yu,{component:"img",image:e.url,sx:{height:120},alt:""}),b(Ms,{children:t&&b(dt,{color:"primary",onClick:()=>dBe(e.id),children:n("delete")})})]})},oTt=({exerciseId:e})=>{const[t]=Le(),n=Vl(),r=async o=>{var a;if(!((a=o.target.files)!=null&&a.length))return;const[i]=o.target.files;n.isSuccess&&await Xre({exerciseId:e,image:i,imageData:{url:"",file:i,author:"",authorUrl:"",title:"",objectUrl:"",derivativeSourceUrl:"",style:""}})};return K(bo,{children:[b(yu,{children:b(on,{sx:{backgroundColor:"lightgray",height:120},display:"flex",alignItems:"center",justifyContent:"center",children:b(kde,{sx:{fontSize:80,color:"gray"}})})}),b(Ms,{children:K(dt,{component:"label",children:[t("add"),b("input",{style:{display:"none"},id:"camera-input",type:"file",accept:"image/*",capture:"environment",onChange:r})]})})]})};function zY(e){const{t}=Le(),n=f1(),r=async o=>{e.setValue(o),await xz(e.exerciseId,e.isMain?{muscles:o}:{muscles_secondary:o})};return n.isSuccess?b(Ic,{multiple:!0,options:n.data.map(o=>o.id),getOptionDisabled:o=>e.blocked.includes(o),getOptionLabel:o=>n.data.find(i=>i.id===o).getName(t),value:e.value,onChange:(o,i)=>r(i),renderInput:o=>b(nn,{...o,variant:"standard",label:t(e.isMain?"exercises.muscles":"exercises.secondaryMuscles"),value:e.value})}):null}const iTt=({video:e,canDelete:t})=>{const[n]=Le();return K(bo,{children:[b(yu,{component:"video",src:e.url,sx:{height:120},controls:!0,preload:"metadata"}),b(Ms,{children:t&&b(dt,{color:"primary",onClick:()=>hBe(e.id),children:n("delete")})})]})},aTt=({exerciseId:e})=>{const[t]=Le(),n=Vl(),r=async o=>{var a;if(!((a=o.target.files)!=null&&a.length))return;const[i]=o.target.files;n.isSuccess&&await pBe(e,n.data.username,i)};return K(bo,{children:[b(yu,{children:b(on,{sx:{backgroundColor:"lightgray",height:120},display:"flex",alignItems:"center",justifyContent:"center",children:b(kde,{sx:{fontSize:80,color:"gray"}})})}),b(Ms,{children:K(dt,{component:"label",children:[t("add"),b("input",{style:{display:"none"},id:"camera-input",type:"file",accept:"video/*",capture:"environment",onChange:r})]})})]})},sTt="check-permission",lTt=async e=>{const t=pt(sTt,{query:{permission:e}}),n=await tt.get(t,{headers:gt()});return n.status===400?!1:n.data.result};function Qy(e){return fo({queryKey:[GFe,e],queryFn:()=>lTt(e.valueOf())})}var ig=(e=>(e.EDIT_EXERCISE="exercises.change_exercise",e.DELETE_EXERCISE="exercises.delete_exercise",e.EDIT_IMAGE="exercises.change_exerciseimage",e.DELETE_IMAGE="exercises.delete_exerciseimage",e.EDIT_VIDEO="exercises.change_exercisevideo",e.DELETE_VIDEO="exercises.delete_exercisevideo",e))(ig||{});const cTt=({exercise:e,language:t})=>{const[n]=Le(),[r,o]=Y.useState(!1),[i,a]=Y.useState(e.muscles.map(C=>C.id)),[s,l]=Y.useState(e.musclesSecondary.map(C=>C.id)),c=e.getTranslation(t),d=t.id!==c.language?new Wre(null,null,"","",t.id):c,f=e.getTranslation(),p=Qy(ig.DELETE_IMAGE),h=Qy(ig.DELETE_VIDEO),m=Qy(ig.EDIT_EXERCISE),y=f1(),w=Vl(),x=za({name:RH(n),alternativeNames:$H(n),description:DH(n)});return K(wt,{children:[b(Ba,{initialValues:{name:d.name,alternativeNames:d.aliases.map(C=>C.alias),description:d.description},enableReinitialize:!0,validationSchema:x,onSubmit:async C=>{const E=d.id?await aBe(d.id,e.id,d.language,C.name,C.description):await ON(e.id,t.id,C.name,C.description,w.data.username),P=d.aliases.map(k=>k.alias),T=C.alternativeNames,I=T.filter(k=>!P.includes(k));let A=P.filter(k=>!T.includes(k));I.forEach(k=>{AN(E.id,k)}),A.forEach(k=>{fBe(d.aliases.find(O=>O.alias===k).id)}),o(!0)},children:b(fa,{children:K(Oe,{container:!0,children:[r&&K(Oe,{size:12,children:[b(Il,{severity:"success",action:b(vn,{"aria-label":"close",size:"small",color:"inherit",onClick:()=>{o(!1)},children:b(FC,{fontSize:"inherit"})}),children:n("exercises.successfullyUpdated")}),b(fi,{})]}),b(Oe,{size:6,children:b(st,{variant:"h5",children:n("English")})}),b(Oe,{size:6,children:K(st,{variant:"h5",children:[t.nameLong," (",t.nameShort,")"]})}),K(Oe,{size:12,children:[b(fi,{}),b(st,{variant:"h6",children:n("name")})]}),K(Oe,{size:6,children:[f.name,b("ul",{children:f.aliases.map(C=>b("li",{children:C.alias},C.id))})]}),K(Oe,{size:6,children:[b(on,{mb:2,children:b(MH,{fieldName:"name"})}),b(kH,{fieldName:"alternativeNames"})]}),b(Oe,{size:12,children:b(fi,{})}),b(Oe,{size:12,children:b(st,{variant:"h6",children:n("exercises.description")})}),b(Oe,{size:{xs:12,md:6},children:b("div",{dangerouslySetInnerHTML:{__html:f.description}})}),b(Oe,{size:{xs:12,md:6},children:b(LH,{fieldName:"description"})}),K(Oe,{size:12,children:[b(fi,{}),b(dt,{variant:"contained",type:"submit",sx:{mt:1,mr:1},children:n("save")})]})]})})}),b(fi,{}),b(st,{variant:"h5",children:n("exercises.basics")}),p.isSuccess&&K(wt,{children:[b(fi,{}),b(st,{variant:"h6",children:n("images")}),K(Oe,{container:!0,spacing:2,mt:2,children:[b(Oe,{size:{md:3},children:b(oTt,{exerciseId:e.id})},"add"),e.images.map(C=>b(Oe,{size:{md:3},children:b(rTt,{image:C,canDelete:p.data})},C.id))]})]}),h.isSuccess&&K(wt,{children:[b(fi,{}),b(st,{variant:"h6",children:n("videos")}),K(Oe,{container:!0,spacing:2,mt:2,children:[h.data&&b(Oe,{size:{md:3},children:b(aTt,{exerciseId:e.id})},"add"),e.videos.map(C=>b(Oe,{size:{md:3},children:b(iTt,{video:C,canDelete:h.data})},C.id))]})]}),m.isSuccess&&m.data&&y.isSuccess&&K(wt,{children:[b(fi,{}),b(NPt,{exerciseId:e.id,initial:e.category.id}),b(LPt,{exerciseId:e.id,initial:e.equipment.map(C=>C.id)}),K(Oe,{container:!0,mt:1,children:[K(Oe,{size:{sm:7},children:[b(zY,{exerciseId:e.id,value:i,setValue:a,blocked:s,isMain:!0}),b(zY,{exerciseId:e.id,value:s,setValue:l,blocked:i,isMain:!1})]}),b(Oe,{size:{sm:5},children:K(Oe,{container:!0,children:[b(Oe,{display:"flex",justifyContent:"center",size:6,children:b(Pg,{primaryMuscles:i.map(C=>y.data.find(E=>E.id===C)),secondaryMuscles:s.map(C=>y.data.find(E=>E.id===C)),isFront:!0})}),b(Oe,{display:"flex",justifyContent:"center",size:6,children:b(Pg,{primaryMuscles:i.map(C=>y.data.find(E=>E.id===C)),secondaryMuscles:s.map(C=>y.data.find(E=>E.id===C)),isFront:!1})})]})})]})]})]})},uTt=e=>{const t=e.backgroundColor||"lightgray",n=e.iconColor||"gray",r=e.height||200;return b(on,{sx:{backgroundColor:t,height:r},display:"flex",alignItems:"center",justifyContent:"center",children:b(Rd,{sx:{fontSize:80,color:n}})})},Mde=({exercise:e,language:t})=>{const n=t?e.getTranslation(t):e.getTranslation(new Yre(Iv,"en","English")),[r,o]=Le();return b(bo,{sx:{width:"100%"},children:K(Rne,{href:Fn(_n.EXERCISE_DETAIL,o.language,{id:e.id,slug:n.nameSlug}),sx:{minHeight:330},children:[e.mainImage?b(yu,{component:"img",image:e.mainImage.url,sx:{height:200},alt:""}):b(yu,{children:b(uTt,{})}),K(_i,{children:[b(kc,{title:n.name,placement:"top",arrow:!0,children:b(st,{gutterBottom:!0,variant:"h6",component:"div",noWrap:!0,children:n.name})}),b(mu,{label:r(Na(e.category.name)),sx:{position:"absolute",top:8,left:8},color:"primary",size:"small"},e.category.id),e.equipment.map(i=>b(st,{display:"inline",mr:1,children:r(Na(i.name))},i.id)),e.equipment.length===0&&b(st,{color:"text.secondary",display:"inline",mr:1,children:r("exercises.noEquipment")})]})]})},e.id)},dTt=({mainImage:e,sideImages:t})=>K(Oe,{container:!0,spacing:1,children:[e&&b(Oe,{size:12,children:b(bo,{children:b(yu,{component:"img",image:e.url,alt:""})})}),t.map(n=>b(Oe,{size:6,children:b(bo,{children:b(yu,{component:"img",image:n.url,sx:{height:120},alt:""})})},n.id))]}),fTt=({videos:e})=>b(Oe,{container:!0,spacing:1,children:e.map(t=>b(Oe,{size:6,children:b(bo,{children:b(yu,{component:"video",src:t.url,sx:{height:120},controls:!0,muted:!0,preload:"metadata"})})},t.id))});function FH(){var r,o;const e=Vl(),t=Qy(ig.EDIT_EXERCISE),n={canContribute:!1,anonymous:!0,emailVerified:!1,admin:!1};if(e.isSuccess&&t.isSuccess){if(e.data===null)return n;n.anonymous=!1,(r=e.data)!=null&&r.emailVerified&&(n.emailVerified=!0),t.data&&(n.admin=!0),(n.admin||(o=e.data)!=null&&o.isTrustworthy)&&(n.canContribute=!0)}return n}const pTt=({setEditMode:e})=>{const[t]=Le();return K(on,{mb:2,paddingY:2,sx:{width:"100%",backgroundColor:"#ebebeb",textAlign:"center"},children:[b(st,{variant:"h5",children:t("exercises.exerciseNotTranslated")}),b(st,{gutterBottom:!0,variant:"body1",component:"div",children:t("exercises.exerciseNotTranslatedBody")}),b(dt,{variant:"contained",onClick:()=>e(!0),children:t("exercises.translateExerciseNow")})]})},hTt=({exercise:e,variations:t,language:n,setEditMode:r})=>{var l;const[o]=Le(),i=FH(),a=e.getTranslation(n),s=n&&n.id!==a.language;return K(Oe,{container:!0,children:[s&&i.canContribute&&b(Oe,{order:{xs:2,sm:1},size:{xs:12,sm:7,md:12},children:b(pTt,{setEditMode:r})}),K(Oe,{order:{xs:2,sm:1},size:{xs:12,sm:7,md:8},children:[(a==null?void 0:a.aliases.length)>0&&K(wt,{children:[K("p",{children:[o("exercises.alsoKnownAs"),"  ",(l=a==null?void 0:a.aliases)==null?void 0:l.map(c=>c.alias).join(", ")]}),b(fi,{})]}),b(st,{variant:"h5",children:o("exercises.description")}),b("div",{dangerouslySetInnerHTML:{__html:a==null?void 0:a.description}}),b(fi,{}),(a==null?void 0:a.notes.length)>0&&b(st,{variant:"h5",children:o("exercises.notes")}),b("ul",{children:a==null?void 0:a.notes.map(c=>b("li",{children:c.note},c.id))}),b(fi,{}),b(st,{variant:"h5",children:o("exercises.muscles")}),K(Oe,{container:!0,children:[b(Oe,{order:{xs:1},size:{xs:6,md:3},children:b(Pg,{primaryMuscles:e.muscles,secondaryMuscles:e.musclesSecondary,isFront:!0})}),K(Oe,{order:{xs:2,md:3},size:{xs:6,md:3},children:[b("h3",{children:o("exercises.primaryMuscles")}),b("ul",{children:e.muscles.map(c=>b("li",{children:c.getName(o)},c.id))})]}),b(Oe,{order:{xs:3,md:2},size:{xs:6,md:3},children:b(Pg,{primaryMuscles:e.muscles,secondaryMuscles:e.musclesSecondary,isFront:!1})}),K(Oe,{order:{xs:4},size:{xs:6,md:3},children:[b("h3",{children:o("exercises.secondaryMuscles")}),b("ul",{children:e.musclesSecondary.map(c=>b("li",{children:c.getName(o)},c.id))})]})]}),b(fi,{})]}),K(Oe,{order:{xs:1,sm:2},size:{xs:12,sm:5,md:4},children:[b(dTt,{mainImage:e.mainImage,sideImages:e.sideImages}),b(fi,{}),b(fTt,{videos:e.videos})]}),K(Oe,{order:{xs:3},size:12,children:[b(kl,{}),b(fi,{}),t.length>0&&b(st,{variant:"h5",children:o("exercises.variations")}),b(Oe,{container:!0,spacing:2,children:t.map(c=>b(Oe,{size:{xs:6,md:2},children:b(Mde,{exercise:c,language:n},c.id)},c.id))})]}),b(Oe,{order:{xs:4},size:12,children:K(st,{variant:"caption",display:"block",mt:2,children:["The text on this page is available under the ",b("a",{href:"https://creativecommons.org/licenses/by-sa/4.0/deed",children:"CC BY-SA 4 License"}),"."]})})]})};var IO={exports:{}};/** + */vde();var wde=Date.now(),p_="fnValues"+wde,h_="fnStyle"+ ++wde,gEt=function(){return{onCreateRule:function(n,r,o){if(typeof r!="function")return null;var i=k5(n,{},o);return i[h_]=r,i},onProcessStyle:function(n,r){if(p_ in r||h_ in r)return n;var o={};for(var i in n){var a=n[i];typeof a=="function"&&(delete n[i],o[i]=a)}return r[p_]=o,n},onUpdate:function(n,r,o,i){var a=r,s=a[h_];s&&(a.style=s(n)||{});var l=a[p_];if(l)for(var c in l)a.prop(c,l[c](n),i)}}},Zf="@global",UF="@global ",mEt=function(){function e(n,r,o){this.type="global",this.at=Zf,this.isProcessed=!1,this.key=n,this.options=o,this.rules=new zM(Gr({},o,{parent:this}));for(var i in r)this.rules.add(i,r[i]);this.rules.process()}var t=e.prototype;return t.getRule=function(r){return this.rules.get(r)},t.addRule=function(r,o,i){var a=this.rules.add(r,o,i);return a&&this.options.jss.plugins.onProcessRule(a),a},t.replaceRule=function(r,o,i){var a=this.rules.replace(r,o,i);return a&&this.options.jss.plugins.onProcessRule(a),a},t.indexOf=function(r){return this.rules.indexOf(r)},t.toString=function(r){return this.rules.toString(r)},e}(),yEt=function(){function e(n,r,o){this.type="global",this.at=Zf,this.isProcessed=!1,this.key=n,this.options=o;var i=n.substr(UF.length);this.rule=o.jss.createRule(i,r,Gr({},o,{parent:this}))}var t=e.prototype;return t.toString=function(r){return this.rule?this.rule.toString(r):""},e}(),vEt=/\s*,\s*/g;function xde(e,t){for(var n=e.split(vEt),r="",o=0;oe.length)&&(t=e.length);for(var n=0,r=Array(t);n-1){var i=Tde[t];if(!Array.isArray(i))return hn.js+gp(i)in n?hn.css+i:!1;if(!o)return!1;for(var a=0;ar?1:-1:n.length-r.length};return{onProcessStyle:function(n,r){if(r.type!=="style")return n;for(var o={},i=Object.keys(n).sort(e),a=0;a"u"?null:fPt(),pPt()]}}function Ode(e={}){const{baseClasses:t,newClasses:n,Component:r}=e;if(!n)return t;const o={...t};return Object.keys(n).forEach(i=>{n[i]&&(o[i]=`${t[i]} ${n[i]}`)}),o}const Iy={set:(e,t,n,r)=>{let o=e.get(t);o||(o=new Map,e.set(t,o)),o.set(n,r)},get:(e,t,n)=>{const r=e.get(t);return r?r.get(n):void 0},delete:(e,t,n)=>{e.get(t).delete(n)}};function gPt(){const e=UA();return(e==null?void 0:e.$$material)??e}const mPt=vde(hPt()),yPt=I1t(),vPt=new Map,bPt={disableGeneration:!1,generateClassName:yPt,jss:mPt,sheetsCache:null,sheetsManager:vPt,sheetsRegistry:null},wPt=v.createContext(bPt);let LY=-1e9;function xPt(){return LY+=1,LY}function FY(e){return e.length===0}function SPt(e){const{variant:t,...n}=e;let r=t||"";return Object.keys(n).sort().forEach(o=>{o==="color"?r+=FY(r)?e[o]:Ce(e[o]):r+=`${FY(r)?o:Ce(o)}${Ce(e[o].toString())}`}),r}const CPt={};function EPt(e){const t=typeof e=="function";return{create:(n,r)=>{let o;try{o=t?e(n):e}catch(l){throw l}if(!r||!n.components||!n.components[r]||!n.components[r].styleOverrides&&!n.components[r].variants)return o;const i=n.components[r].styleOverrides||{},a=n.components[r].variants||[],s={...o};return Object.keys(i).forEach(l=>{s[l]=Ao(s[l]||{},i[l])}),a.forEach(l=>{const c=SPt(l.props);s[c]=Ao(s[c]||{},l.style)}),s},options:{}}}function PPt({state:e,stylesOptions:t},n,r){if(t.disableGeneration)return n||{};e.cacheClasses||(e.cacheClasses={value:null,lastProp:null,lastJSS:{}});let o=!1;return e.classes!==e.cacheClasses.lastJSS&&(e.cacheClasses.lastJSS=e.classes,o=!0),n!==e.cacheClasses.lastProp&&(e.cacheClasses.lastProp=n,o=!0),o&&(e.cacheClasses.value=Ode({baseClasses:e.cacheClasses.lastJSS,newClasses:n,Component:r})),e.cacheClasses.value}function TPt({state:e,theme:t,stylesOptions:n,stylesCreator:r,name:o},i){if(n.disableGeneration)return;let a=Iy.get(n.sheetsManager,r,t);a||(a={refs:0,staticSheet:null,dynamicStyles:null},Iy.set(n.sheetsManager,r,t,a));const s={...r.options,...n,theme:t,flip:typeof n.flip=="boolean"?n.flip:t.direction==="rtl"};s.generateId=s.serverGenerateClassName||s.generateClassName;const l=n.sheetsRegistry;if(a.refs===0){let c;n.sheetsCache&&(c=Iy.get(n.sheetsCache,r,t));const u=r.create(t,o);c||(c=n.jss.createStyleSheet(u,{link:!1,...s}),c.attach(),n.sheetsCache&&Iy.set(n.sheetsCache,r,t,c)),l&&l.add(c),a.staticSheet=c,a.dynamicStyles=bde(u)}if(a.dynamicStyles){const c=n.jss.createStyleSheet(a.dynamicStyles,{link:!0,...s});c.update(i),c.attach(),e.dynamicSheet=c,e.classes=Ode({baseClasses:a.staticSheet.classes,newClasses:c.classes}),l&&l.add(c)}else e.classes=a.staticSheet.classes;a.refs+=1}function IPt({state:e},t){e.dynamicSheet&&e.dynamicSheet.update(t)}function OPt({state:e,theme:t,stylesOptions:n,stylesCreator:r}){if(n.disableGeneration)return;const o=Iy.get(n.sheetsManager,r,t);o.refs-=1;const i=n.sheetsRegistry;o.refs===0&&(Iy.delete(n.sheetsManager,r,t),n.jss.removeStyleSheet(o.staticSheet),i&&i.remove(o.staticSheet)),e.dynamicSheet&&(n.jss.removeStyleSheet(e.dynamicSheet),i&&i.remove(e.dynamicSheet))}function APt(e,t){const n=v.useRef([]);let r;const o=v.useMemo(()=>({}),t);n.current!==o&&(n.current=o,r=e()),v.useEffect(()=>()=>{r&&r()},[o])}function Ade(e,t={}){const{name:n,classNamePrefix:r,Component:o,defaultTheme:i=CPt,...a}=t,s=EPt(e),l=n||r||"makeStyles";return s.options={index:xPt(),name:n,meta:l,classNamePrefix:l},(u={})=>{const d=gPt()||i,f={...v.useContext(wPt),...a},p=v.useRef(),h=v.useRef();return APt(()=>{const y={name:n,state:{},stylesCreator:s,stylesOptions:f,theme:d};return TPt(y,u),h.current=!1,p.current=y,()=>{OPt(y)}},[d,s]),v.useEffect(()=>{h.current&&IPt(p.current,u),h.current=!0}),PPt(p.current,u.classes,o)}}const kPt=Ade(e=>({table:{"& .MuiPaper-root":{border:"1px solid #bababa"}}})),MPt=({weights:e})=>{const[t]=Le(),n=kPt(),o=e.slice(0,5);return b("div",{className:n.table,children:b($c,{children:G($l,{size:"small",children:[b(Eu,{children:G(Ht,{children:[b(Ie,{align:"center",children:t("date")}),b(Ie,{align:"center",children:t("weight")})]})}),b(Dl,{children:o.map(i=>G(Ht,{children:[b(Ie,{align:"center",children:i.date.toLocaleDateString()}),b(Ie,{align:"center",children:i.weight})]},i.date.toLocaleDateString()))})]})})})},RPt=({active:e,payload:t,label:n})=>{const[r,o]=Le();return e&&t&&t.length?G(ro,{style:{padding:8},children:[b("p",{children:b("strong",{children:new Date(n).toLocaleDateString(o.language)})}),G("p",{children:[r("weight"),": ",t[0].value]})]}):null},kde=({weights:e,height:t})=>{t=t||300;const r=no(),[o,i]=Le(),[a,s]=Y.useState(!1),[l,c]=Y.useState(),u=()=>s(!1),d=[...e].sort((p,h)=>p.date.getTime()-h.date.getTime()).map(p=>({date:p.date.getTime(),weight:p.weight,entry:p}));function f(p,h){c(h.payload.entry),s(!0)}return G("div",{children:[l&&b(Fi,{title:o("edit"),isOpen:a,closeFn:u,children:b(h0,{weightEntry:l})}),b($p,{height:t,children:G(tle,{data:d,children:[b(t0,{type:"monotone",dataKey:"weight",stroke:r.palette.secondary.main,strokeWidth:2,dot:d.length>30?!1:{strokeWidth:1,r:4},activeDot:{stroke:"black",strokeWidth:1,r:6,onClick:f}}),b(zg,{stroke:"#ccc",strokeDasharray:"5 5"}),b(Vl,{dataKey:"date",type:"number",domain:["dataMin","dataMax"],tickFormatter:p=>new Date(p).toLocaleDateString(i.language)}),b(Hl,{domain:["auto","auto"]}),b(ss,{content:b(RPt,{})})]})})]})},Mde=()=>{var n,r;const[e]=Le(),t=E1("lastYear");return t.isLoading?b(mo,{}):((n=t.data)==null?void 0:n.length)!==void 0&&((r=t.data)==null?void 0:r.length)>0?b($Pt,{entries:t.data}):b(lz,{title:e("weight"),modalContent:b(h0,{})})},$Pt=e=>{const[t,n]=Y.useState(!1),r=()=>n(!0),o=()=>n(!1),[i,a]=Le();return G(wt,{children:[G(to,{children:[b(jl,{title:i("weight"),subheader:"."}),G(ni,{sx:{height:"500px",overflow:"auto"},children:[b(kde,{weights:e.entries,height:200}),b(en,{sx:{mt:2},children:b(MPt,{weights:e.entries})})]}),G(Ds,{sx:{justifyContent:"space-between",alignItems:"flex-start"},children:[b(dt,{size:"small",href:Mn(Tn.WEIGHT_OVERVIEW,a.language),children:i("seeDetails")}),b(Rc,{title:i("addEntry"),children:b(vn,{onClick:r,children:b(Vo,{})})})]})]}),b(Fi,{title:i("add"),isOpen:t,closeFn:o,children:b(h0,{closeFn:o})})]})},DPt=()=>{const[e,t]=Le();return b(c5,{callback:r=>{r!==null&&(window.location.href=Mn(Tn.INGREDIENT_DETAIL,t.language,{id:r.data.id}))}})},_Pt=()=>b("div",{children:"About Page"});function D5(e){const[t]=Le(),[n,r,o]=Ns(e.fieldName);return b(Oc,{multiple:!0,freeSolo:!0,id:e.fieldName,value:n.value,options:n.value,onChange:(i,a)=>{o.setValue(a)},renderTags:(i,a)=>i.map((s,l)=>b(vu,{label:s,...a({index:l})})),onBlur:n.onBlur,renderInput:i=>b(nn,{...i,id:"exerciseAliases",variant:"standard",label:t("exercises.alternativeNames"),error:r.touched&&!!r.error,helperText:r.touched&&r.error,value:n.value})})}function NPt(e){const[t]=Le(),[n,r,o]=Ns(e.fieldName);return b(Oc,{multiple:!0,id:e.fieldName,options:e.options.map(i=>i.id),getOptionLabel:i=>t(Fa(e.options.find(a=>a.id===i).name)),...n,onChange:(i,a)=>{o.setValue(a)},renderInput:i=>b(nn,{variant:"standard",label:t("exercises.equipment"),value:n.value,...i})})}function _5(e){const[t]=Le(),[n,r]=Ns(e.fieldName);return b(nn,{fullWidth:!0,id:e.fieldName,label:t("name"),variant:"standard",error:r.touched&&!!r.error,helperText:r.touched&&r.error,...n})}function LPt(e){const[t]=Le(),[n,r]=Ns(e.fieldName);return G(kb,{fullWidth:!0,children:[b(Mb,{id:"label-category",children:t("category")}),b(Lg,{labelId:"label-category",id:"category",label:t("category"),error:r.touched&&!!r.error,...n,children:e.options}),r.touched&&!!r.error&&b(HC,{error:!0,children:r.error})]})}const Rde=5,$de=40,N5=e=>ja().min(Rde,e("forms.valueTooShort")).max($de,e("forms.valueTooLong")).required(e("forms.fieldRequired")),L5=e=>C5().ensure().compact().of(ja().min(Rde,e("forms.valueTooShort")).max($de,e("forms.valueTooLong"))),F5=e=>ja().min(40,e("forms.valueTooShort")).required(e("forms.fieldRequired")),Dde=e=>C5().ensure().compact().of(ja().min(15,e("forms.valueTooShort"))),FPt=e=>Pa().required(e("forms.fieldRequired")),Ig=({primaryMuscles:e,secondaryMuscles:t,isFront:n})=>{const r=[];r.push(...e.filter(i=>i.isFront===n).map(i=>`/muscles/main/muscle-${i.id}.svg`)),r.push(...t.filter(i=>i.isFront===n).map(i=>`/muscles/secondary/muscle-${i.id}.svg`)),r.push(n?"/muscles/muscular_system_front.svg":"/muscles/muscular_system_back.svg");const o=r.map(i=>`url(${tje}${i})`).join(", ");return b("div",{style:{height:"400px",width:"200px",backgroundImage:o,backgroundRepeat:"no-repeat"}})};var _de=(e=>(e[e.SET_NOTIFICATION=0]="SET_NOTIFICATION",e))(_de||{}),jn=(e=>(e[e.RESET=0]="RESET",e[e.SET_NAME_EN=1]="SET_NAME_EN",e[e.SET_ALIASES_EN=2]="SET_ALIASES_EN",e[e.SET_DESCRIPTION_EN=3]="SET_DESCRIPTION_EN",e[e.SET_NOTES_EN=4]="SET_NOTES_EN",e[e.SET_CATEGORY=5]="SET_CATEGORY",e[e.SET_EQUIPMENT=6]="SET_EQUIPMENT",e[e.SET_PRIMARY_MUSCLES=7]="SET_PRIMARY_MUSCLES",e[e.SET_MUSCLES_SECONDARY=8]="SET_MUSCLES_SECONDARY",e[e.SET_VARIATION_ID=9]="SET_VARIATION_ID",e[e.SET_NEW_VARIATION_BASE_ID=10]="SET_NEW_VARIATION_BASE_ID",e[e.SET_LANGUAGE=11]="SET_LANGUAGE",e[e.SET_NAME_I18N=12]="SET_NAME_I18N",e[e.SET_ALIASES_I18N=13]="SET_ALIASES_I18N",e[e.SET_DESCRIPTION_I18N=14]="SET_DESCRIPTION_I18N",e[e.SET_NOTES_I18N=15]="SET_NOTES_I18N",e[e.SET_IMAGES=16]="SET_IMAGES",e))(jn||{});const jY=e=>({type:_de.SET_NOTIFICATION,payload:e}),BY={notification:{notify:!1,message:"",severity:void 0,title:"",type:void 0}},jPt=v.createContext([BY,()=>BY]),BPt=()=>v.useContext(jPt),zPt=e=>({type:jn.SET_NAME_EN,payload:e}),VPt=e=>({type:jn.SET_DESCRIPTION_EN,payload:e}),HPt=e=>({type:jn.SET_NOTES_EN,payload:e}),UPt=e=>({type:jn.SET_ALIASES_EN,payload:e}),WPt=e=>({type:jn.SET_NAME_I18N,payload:e}),GPt=e=>({type:jn.SET_DESCRIPTION_I18N,payload:e}),qPt=e=>({type:jn.SET_NOTES_I18N,payload:e}),KPt=e=>({type:jn.SET_ALIASES_I18N,payload:e}),YPt=e=>({type:jn.SET_CATEGORY,payload:e}),QPt=e=>({type:jn.SET_EQUIPMENT,payload:e}),XPt=e=>({type:jn.SET_PRIMARY_MUSCLES,payload:e}),JPt=e=>({type:jn.SET_MUSCLES_SECONDARY,payload:e}),ZPt=e=>({type:jn.SET_VARIATION_ID,payload:e}),eTt=e=>({type:jn.SET_NEW_VARIATION_BASE_ID,payload:e}),tTt=e=>({type:jn.SET_LANGUAGE,payload:e}),nTt=e=>({type:jn.SET_IMAGES,payload:e}),rTt=(e,t)=>{if(t===void 0)return e;switch(t.type){case jn.RESET:return FO;case jn.SET_NAME_EN:return{...e,nameEn:t.payload};case jn.SET_DESCRIPTION_EN:return{...e,descriptionEn:t.payload};case jn.SET_NOTES_EN:return{...e,notesEn:t.payload};case jn.SET_ALIASES_EN:return{...e,alternativeNamesEn:t.payload};case jn.SET_CATEGORY:return{...e,category:t.payload};case jn.SET_EQUIPMENT:return{...e,equipment:t.payload};case jn.SET_PRIMARY_MUSCLES:return{...e,muscles:t.payload};case jn.SET_MUSCLES_SECONDARY:return{...e,musclesSecondary:t.payload};case jn.SET_VARIATION_ID:return{...e,variationId:t.payload};case jn.SET_NEW_VARIATION_BASE_ID:return{...e,newVariationBaseId:t.payload};case jn.SET_LANGUAGE:return{...e,languageId:t.payload};case jn.SET_NAME_I18N:return{...e,nameI18n:t.payload};case jn.SET_DESCRIPTION_I18N:return{...e,descriptionI18n:t.payload};case jn.SET_NOTES_I18N:return{...e,notesI18n:t.payload};case jn.SET_ALIASES_I18N:return{...e,alternativeNamesI18n:t.payload};case jn.SET_IMAGES:return{...e,images:t.payload};default:return e}},FO={category:null,muscles:[],musclesSecondary:[],variationId:null,newVariationBaseId:null,languageId:null,equipment:[],nameEn:"",descriptionEn:"",alternativeNamesEn:[],notesEn:[],nameI18n:"",alternativeNamesI18n:[],descriptionI18n:"",notesI18n:[],images:[]},Nde=v.createContext([FO,()=>FO]),oTt=({children:e})=>{const[t,n]=v.useReducer(rTt,FO);return b(Nde.Provider,{value:[t,n],children:e})},m0=()=>v.useContext(Nde),iTt=({onContinue:e})=>{const[t]=Le(),[n,r]=m0(),[o,i]=v.useState(n.muscles),[a,s]=v.useState(n.musclesSecondary);v.useEffect(()=>{r(XPt(o))},[r,o]),v.useEffect(()=>{r(JPt(a))},[r,a]);const l=LM(),c=S1(),u=FM(),d=Ha({nameEn:N5(t),newAlternativeNameEn:L5(t),category:FPt(t)});return b(Va,{initialValues:{nameEn:n.nameEn,newAlternativeNameEn:n.alternativeNamesEn,category:n.category!==null?n.category:"",muscles:n.muscles,equipment:n.equipment,musclesSecondary:n.musclesSecondary},validationSchema:d,onSubmit:f=>{r(zPt(f.nameEn)),r(YPt(f.category)),r(UPt(f.newAlternativeNameEn)),r(QPt(f.equipment)),e()},children:f=>G(pa,{children:[G(Wt,{spacing:2,children:[b(_5,{fieldName:"nameEn"}),b(D5,{fieldName:"newAlternativeNameEn"}),l.isLoading?G(en,{children:[" ",b(ys,{})," "]}):b(LPt,{fieldName:"category",options:l.data.map(p=>b(rn,{value:p.id,children:t(Fa(p.name))},p.id))}),u.isLoading?G(en,{children:[" ",b(ys,{})," "]}):b(NPt,{fieldName:"equipment",options:u.data}),c.isLoading?G(en,{children:[" ",b(ys,{})," "]}):G(wt,{children:[b(Oc,{multiple:!0,id:"muscles",options:c.data.map(p=>p.id),getOptionDisabled:p=>a.includes(p),getOptionLabel:p=>c.data.find(h=>h.id===p).getName(t),value:o,onChange:(p,h)=>{i(h)},renderInput:p=>b(nn,{...p,variant:"standard",label:t("exercises.muscles"),value:f.getFieldProps("muscles").value,onChange:h=>{f.setFieldValue(f.getFieldProps("muscles").name,h.target.value)}})}),b(Oc,{multiple:!0,id:"secondary-muscles",options:c.data.map(p=>p.id),getOptionDisabled:p=>o.includes(p),getOptionLabel:p=>c.data.find(h=>h.id===p).getName(t),value:a,onChange:(p,h)=>{s(h)},renderInput:p=>b(nn,{...p,variant:"standard",label:t("exercises.secondaryMuscles"),value:f.getFieldProps("muscles").value})})]}),G(Oe,{container:!0,children:[b(Oe,{display:"flex",justifyContent:"center",size:6,children:b(Ig,{primaryMuscles:o.map(p=>c.data.find(h=>h.id===p)),secondaryMuscles:a.map(p=>c.data.find(h=>h.id===p)),isFront:!0})}),b(Oe,{display:"flex",justifyContent:"center",size:6,children:b(Ig,{primaryMuscles:o.map(p=>c.data.find(h=>h.id===p)),secondaryMuscles:a.map(p=>c.data.find(h=>h.id===p)),isFront:!1})})]})]}),b(Oe,{container:!0,children:b(Oe,{display:"flex",justifyContent:"end",size:12,children:b(en,{sx:{mb:2},children:b("div",{children:b(dt,{variant:"contained",type:"submit",sx:{mt:1,mr:1},children:t("continue")})})})})})]})})};function aTt(e,t){const n=new Map;return e.forEach(r=>{const o=t(r),i=n.get(o);i?i.push(r):n.set(o,[r])}),n}const zY=({exercises:e})=>{const r=e[0].variationId,o=e[0].id,[i,a]=m0(),[s,l]=v.useState(!1),[c,u]=v.useState(i.variationId),[d,f]=v.useState(i.newVariationBaseId);v.useEffect(()=>{a(ZPt(c))},[a,c]),v.useEffect(()=>{a(eTt(d))},[a,d]);const p=(m,y)=>()=>{m!==null?(y=null,m===i.variationId&&(m=null)):(m=null,y===i.newVariationBaseId&&(y=null)),u(m),f(y)};let h;return r===null?h=i.newVariationBaseId===o:h=r===i.variationId,b(Os,{disableGutters:!0,children:b(Ip,{onClick:p(r,o),children:G(Oe,{container:!0,children:[b(Oe,{display:"flex",justifyContent:"start",alignItems:"center",size:{xs:12,sm:3},children:b(Hke,{max:4,spacing:"small",children:e.map(m=>m.mainImage?b(Ac,{src:m.mainImage.url},m.id):b(Ac,{children:b(Rd,{})},m.id))})}),G(Oe,{size:{xs:10,sm:7},children:[e.slice(0,s?e.length:5).map(m=>b("p",{style:{margin:0},children:m.getTranslation().name},m.id)),!s&&e.length>5?b(Rb,{onMouseEnter:()=>l(!0)}):null]}),b(Oe,{display:"flex",justifyContent:"end",size:{xs:2,sm:2},children:b(La,{edge:"start",checked:h,tabIndex:-1,disableRipple:!0},`variation-${r}`)}),b(Oe,{size:12,children:b(Is,{sx:{pt:1}})})]})})})},sTt=({onContinue:e,onBack:t})=>{const[n]=Le(),r=Jue(),[o,i]=v.useState("");let a=[],s=new Map;return r.isSuccess&&(a=r.data,o!==""&&(a=a.filter(l=>l.getTranslation().name.toLowerCase().includes(o.toLowerCase())))),s=aTt(a.filter(l=>l.variationId!==null),l=>l.variationId),G(wt,{children:[G(Oe,{container:!0,children:[b(Oe,{size:{xs:12,sm:6},children:b(ot,{children:n("exercises.whatVariationsExist")})}),b(Oe,{display:"flex",justifyContent:"end",size:{xs:12,sm:6},children:b(nn,{label:n("exercises.filterVariations"),variant:"standard",onChange:l=>i(l.target.value),InputProps:{startAdornment:b(Co,{position:"start",children:b(l5,{})})}})})]}),r.isLoading?b(mo,{}):b(ro,{elevation:2,sx:{mt:2},children:G(Bl,{style:{maxHeight:"400px",overflowY:"scroll"},children:[a.filter(l=>l.variationId===null).map(l=>b(zY,{exercises:[l]},"base-"+l.id)),[...s.keys()].map(l=>b(zY,{exercises:s.get(l)},"variation-"+l))]})}),G(kl,{severity:"info",variant:"filled",sx:{mt:2},children:[b(cI,{children:n("exercises.identicalExercise")}),n("exercises.identicalExercisePleaseDiscard")]}),b(Oe,{container:!0,children:b(Oe,{display:"flex",justifyContent:"end",size:12,children:b(en,{sx:{mb:2},children:G("div",{children:[b(dt,{disabled:!1,onClick:t,sx:{mt:1,mr:1},children:n("goBack")}),b(dt,{variant:"contained",onClick:e,sx:{mt:1,mr:1},children:n("continue")})]})})})})]})};class lTt{constructor(t,n,r,o,i,a,s){this.username=t,this.email=n,this.emailVerified=r,this.dateJoined=o,this.isTrustworthy=i,this.useMetric=a,this.height=s}}class cTt{constructor(){mt(this,"fromJson",t=>new lTt(t.username,t.email,t.email_verified,new Date(t.date_joined),t.is_trustworthy,t.weight_unit==="kg",t.height));mt(this,"toJson",t=>({email:t.email,height:t.height,weight_unit:t.useMetric?"kg":"lb"}))}}const uTt="userprofile",dTt=async()=>{const e=ft(uTt),t=new cTt;try{const n=await tt.get(e,{headers:ht()});return t.fromJson(n.data)}catch{return null}};function Ul(){return ho({queryKey:[vje],queryFn:dTt})}function fTt(e){const{t}=Le(),[n,r]=Y.useState(e.initial.toString()),o=LM(),i=Ul(),a=async s=>{r(s.target.value),await Pz(e.exerciseId,{category:parseInt(s.target.value),license_author:i.data.username})};return o.isSuccess?G(kb,{fullWidth:!0,children:[b(Mb,{id:"label-category",children:t("category")}),b(Lg,{labelId:"label-category",id:"category",label:t("category"),value:n,onChange:a,children:o.data.map(s=>b(rn,{value:s.id,children:t(Fa(s.name))},s.id))})]}):null}function pTt(e){const{t}=Le(),[n,r]=Y.useState(e.initial),o=FM(),i=Ul(),a=async s=>{r(s),await Pz(e.exerciseId,{equipment:s,license_author:i.data.username})};return o.isSuccess?b(Oc,{multiple:!0,value:n,options:o.data.map(s=>s.id),getOptionLabel:s=>t(Fa(o.data.find(l=>l.id===s).name)),onChange:(s,l)=>a(l),renderInput:s=>b(nn,{variant:"standard",label:t("exercises.equipment"),value:n,...s})}):null}var _i=function(){return _i=Object.assign||function(t){for(var n,r=1,o=arguments.length;r0)return e.getRangeAt(0).startContainer.parentNode||void 0}function VY(e){return e?e.replace(/ |\u202F|\u00A0/g," "):""}function gTt(e){var t=document.createTextNode("");e.appendChild(t);var n=document.activeElement===e;if(t!==null&&t.nodeValue!==null&&n){var r=window.getSelection();if(r!==null){var o=document.createRange();o.setStart(t,t.nodeValue.length),o.collapse(!0),r.removeAllRanges(),r.addRange(o)}e instanceof HTMLElement&&e.focus()}}function HY(e){if(e){var t=e.textContent,n=/[\u0591-\u07FF\uFB1D-\uFDFD\uFE70-\uFEFC]/;e.style.direction=t&&n.test(t[0])?"rtl":"ltr"}}var mTt=Y.memo(Y.forwardRef(function(t,n){var r=t.className,o=t.disabled,i=t.tagName,a=t.value,s=a===void 0?"":a,l=j5(t,["className","disabled","tagName","value"]),c=Y.useRef(),u=Y.useRef(s),d=Y.useRef(l);return Y.useEffect(function(){d.current=l;var f=c.current;f&&VY(u.current)!==VY(s)&&(u.current=s,f.innerHTML=s,gTt(f))}),Y.useMemo(function(){function f(h){c.current=h,HY(h),typeof n=="function"?n(h):typeof n=="object"&&n&&(n.current=h)}function p(h){var m,y,w=c.current;if(w){var x=w.innerHTML;x!==u.current&&((y=(m=d.current).onChange)===null||y===void 0||y.call(m,_i(_i({},h),{target:{value:x,name:l.name}}))),HY(w),u.current=x}}return Y.createElement(i||"div",_i(_i({},l),{className:r,contentEditable:!o,dangerouslySetInnerHTML:{__html:s},onBlur:function(h){return(d.current.onBlur||p)(h)},onInput:p,onKeyDown:function(h){return(d.current.onKeyDown||p)(h)},onKeyUp:function(h){return(d.current.onKeyUp||p)(h)},ref:f}))},[r,o,i])})),Lde=Y.createContext(void 0);function yTt(e){var t=e.children,n=Y.useState({htmlMode:!1,update:i}),r=n[0],o=n[1];function i(a){o(function(s){return _i(_i(_i({},s),a),{date:Date.now()})})}return Y.createElement(Lde.Provider,{value:r},t)}function B5(){var e=Y.useContext(Lde);if(!e)throw new Error("You should wrap your component by EditorProvider");return e}function vTt(e){var t=j5(e,[]);return Y.createElement("textarea",_i({},t))}var UY=[],Ew=[];function bTt(e,t){if(e&&typeof document<"u"){var n,r=t.prepend===!0?"prepend":"append",o=t.singleTag===!0,i=typeof t.container=="string"?document.querySelector(t.container):document.getElementsByTagName("head")[0];if(o){var a=UY.indexOf(i);a===-1&&(a=UY.push(i)-1,Ew[a]={}),n=Ew[a]&&Ew[a][r]?Ew[a][r]:Ew[a][r]=s()}else n=s();e.charCodeAt(0)===65279&&(e=e.substring(1)),n.styleSheet?n.styleSheet.cssText+=e:n.appendChild(document.createTextNode(e))}function s(){var l=document.createElement("style");if(l.setAttribute("type","text/css"),t.attributes)for(var c=Object.keys(t.attributes),u=0;ur.setValue(o.target.value)})}),n.touched&&!!n.error&&b(HC,{error:!0,children:n.error})]})}const Fde=ct(R.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m5 11h-4v4h-2v-4H7v-2h4V7h2v4h4z"}),"AddCircle"),$Tt=({image:e,canDelete:t})=>{const[n]=Le();return G(to,{children:[b(bu,{component:"img",image:e.url,sx:{height:120},alt:""}),b(Ds,{children:t&&b(dt,{color:"primary",onClick:()=>NBe(e.id),children:n("delete")})})]})},DTt=({exerciseId:e})=>{const[t]=Le(),n=Ul(),r=async o=>{var a;if(!((a=o.target.files)!=null&&a.length))return;const[i]=o.target.files;n.isSuccess&&await roe({exerciseId:e,image:i,imageData:{url:"",file:i,author:"",authorUrl:"",title:"",objectUrl:"",derivativeSourceUrl:"",style:""}})};return G(to,{children:[b(bu,{children:b(en,{sx:{backgroundColor:"lightgray",height:120},display:"flex",alignItems:"center",justifyContent:"center",children:b(Fde,{sx:{fontSize:80,color:"gray"}})})}),b(Ds,{children:G(dt,{component:"label",children:[t("add"),b("input",{style:{display:"none"},id:"camera-input",type:"file",accept:"image/*",capture:"environment",onChange:r})]})})]})};function GY(e){const{t}=Le(),n=S1(),r=async o=>{e.setValue(o),await Pz(e.exerciseId,e.isMain?{muscles:o}:{muscles_secondary:o})};return n.isSuccess?b(Oc,{multiple:!0,options:n.data.map(o=>o.id),getOptionDisabled:o=>e.blocked.includes(o),getOptionLabel:o=>n.data.find(i=>i.id===o).getName(t),value:e.value,onChange:(o,i)=>r(i),renderInput:o=>b(nn,{...o,variant:"standard",label:t(e.isMain?"exercises.muscles":"exercises.secondaryMuscles"),value:e.value})}):null}const _Tt=({video:e,canDelete:t})=>{const[n]=Le();return G(to,{children:[b(bu,{component:"video",src:e.url,sx:{height:120},controls:!0,preload:"metadata"}),b(Ds,{children:t&&b(dt,{color:"primary",onClick:()=>jBe(e.id),children:n("delete")})})]})},NTt=({exerciseId:e})=>{const[t]=Le(),n=Ul(),r=async o=>{var a;if(!((a=o.target.files)!=null&&a.length))return;const[i]=o.target.files;n.isSuccess&&await FBe(e,n.data.username,i)};return G(to,{children:[b(bu,{children:b(en,{sx:{backgroundColor:"lightgray",height:120},display:"flex",alignItems:"center",justifyContent:"center",children:b(Fde,{sx:{fontSize:80,color:"gray"}})})}),b(Ds,{children:G(dt,{component:"label",children:[t("add"),b("input",{style:{display:"none"},id:"camera-input",type:"file",accept:"video/*",capture:"environment",onChange:r})]})})]})},LTt="check-permission",FTt=async e=>{const t=ft(LTt,{query:{permission:e}}),n=await tt.get(t,{headers:ht()});return n.status===400?!1:n.data.result};function Xy(e){return ho({queryKey:[yje,e],queryFn:()=>FTt(e.valueOf())})}var sg=(e=>(e.EDIT_EXERCISE="exercises.change_exercise",e.DELETE_EXERCISE="exercises.delete_exercise",e.EDIT_IMAGE="exercises.change_exerciseimage",e.DELETE_IMAGE="exercises.delete_exerciseimage",e.EDIT_VIDEO="exercises.change_exercisevideo",e.DELETE_VIDEO="exercises.delete_exercisevideo",e))(sg||{});const jTt=({exercise:e,language:t})=>{const[n]=Le(),[r,o]=Y.useState(!1),[i,a]=Y.useState(e.muscles.map(S=>S.id)),[s,l]=Y.useState(e.musclesSecondary.map(S=>S.id)),c=e.getTranslation(t),d=t.id!==c.language?new Xre(null,null,"","",t.id):c,f=e.getTranslation(),p=Xy(sg.DELETE_IMAGE),h=Xy(sg.DELETE_VIDEO),m=Xy(sg.EDIT_EXERCISE),y=S1(),w=Ul(),x=Ha({name:N5(n),alternativeNames:L5(n),description:F5(n)});return G(wt,{children:[b(Va,{initialValues:{name:d.name,alternativeNames:d.aliases.map(S=>S.alias),description:d.description},enableReinitialize:!0,validationSchema:x,onSubmit:async S=>{const E=d.id?await MBe(d.id,e.id,d.language,S.name,S.description):await $N(e.id,t.id,S.name,S.description,w.data.username),P=d.aliases.map(k=>k.alias),T=S.alternativeNames,I=T.filter(k=>!P.includes(k));let A=P.filter(k=>!T.includes(k));I.forEach(k=>{DN(E.id,k)}),A.forEach(k=>{LBe(d.aliases.find(O=>O.alias===k).id)}),o(!0)},children:b(pa,{children:G(Oe,{container:!0,children:[r&&G(Oe,{size:12,children:[b(kl,{severity:"success",action:b(vn,{"aria-label":"close",size:"small",color:"inherit",onClick:()=>{o(!1)},children:b(qC,{fontSize:"inherit"})}),children:n("exercises.successfullyUpdated")}),b(hi,{})]}),b(Oe,{size:6,children:b(ot,{variant:"h5",children:n("English")})}),b(Oe,{size:6,children:G(ot,{variant:"h5",children:[t.nameLong," (",t.nameShort,")"]})}),G(Oe,{size:12,children:[b(hi,{}),b(ot,{variant:"h6",children:n("name")})]}),G(Oe,{size:6,children:[f.name,b("ul",{children:f.aliases.map(S=>b("li",{children:S.alias},S.id))})]}),G(Oe,{size:6,children:[b(en,{mb:2,children:b(_5,{fieldName:"name"})}),b(D5,{fieldName:"alternativeNames"})]}),b(Oe,{size:12,children:b(hi,{})}),b(Oe,{size:12,children:b(ot,{variant:"h6",children:n("exercises.description")})}),b(Oe,{size:{xs:12,md:6},children:b("div",{dangerouslySetInnerHTML:{__html:f.description}})}),b(Oe,{size:{xs:12,md:6},children:b(z5,{fieldName:"description"})}),G(Oe,{size:12,children:[b(hi,{}),b(dt,{variant:"contained",type:"submit",sx:{mt:1,mr:1},children:n("save")})]})]})})}),b(hi,{}),b(ot,{variant:"h5",children:n("exercises.basics")}),p.isSuccess&&G(wt,{children:[b(hi,{}),b(ot,{variant:"h6",children:n("images")}),G(Oe,{container:!0,spacing:2,mt:2,children:[b(Oe,{size:{md:3},children:b(DTt,{exerciseId:e.id})},"add"),e.images.map(S=>b(Oe,{size:{md:3},children:b($Tt,{image:S,canDelete:p.data})},S.id))]})]}),h.isSuccess&&G(wt,{children:[b(hi,{}),b(ot,{variant:"h6",children:n("videos")}),G(Oe,{container:!0,spacing:2,mt:2,children:[h.data&&b(Oe,{size:{md:3},children:b(NTt,{exerciseId:e.id})},"add"),e.videos.map(S=>b(Oe,{size:{md:3},children:b(_Tt,{video:S,canDelete:h.data})},S.id))]})]}),m.isSuccess&&m.data&&y.isSuccess&&G(wt,{children:[b(hi,{}),b(fTt,{exerciseId:e.id,initial:e.category.id}),b(pTt,{exerciseId:e.id,initial:e.equipment.map(S=>S.id)}),G(Oe,{container:!0,mt:1,children:[G(Oe,{size:{sm:7},children:[b(GY,{exerciseId:e.id,value:i,setValue:a,blocked:s,isMain:!0}),b(GY,{exerciseId:e.id,value:s,setValue:l,blocked:i,isMain:!1})]}),b(Oe,{size:{sm:5},children:G(Oe,{container:!0,children:[b(Oe,{display:"flex",justifyContent:"center",size:6,children:b(Ig,{primaryMuscles:i.map(S=>y.data.find(E=>E.id===S)),secondaryMuscles:s.map(S=>y.data.find(E=>E.id===S)),isFront:!0})}),b(Oe,{display:"flex",justifyContent:"center",size:6,children:b(Ig,{primaryMuscles:i.map(S=>y.data.find(E=>E.id===S)),secondaryMuscles:s.map(S=>y.data.find(E=>E.id===S)),isFront:!1})})]})})]})]})]})},BTt=e=>{const t=e.backgroundColor||"lightgray",n=e.iconColor||"gray",r=e.height||200;return b(en,{sx:{backgroundColor:t,height:r},display:"flex",alignItems:"center",justifyContent:"center",children:b(Rd,{sx:{fontSize:80,color:n}})})},jde=({exercise:e,language:t})=>{const n=t?e.getTranslation(t):e.getTranslation(new toe(Av,"en","English")),[r,o]=Le();return b(to,{sx:{width:"100%"},children:G(Lne,{href:Mn(Tn.EXERCISE_DETAIL,o.language,{id:e.id,slug:n.nameSlug}),sx:{minHeight:330},children:[e.mainImage?b(bu,{component:"img",image:e.mainImage.url,sx:{height:200},alt:""}):b(bu,{children:b(BTt,{})}),G(ni,{children:[b(Rc,{title:n.name,placement:"top",arrow:!0,children:b(ot,{gutterBottom:!0,variant:"h6",component:"div",noWrap:!0,children:n.name})}),b(vu,{label:r(Fa(e.category.name)),sx:{position:"absolute",top:8,left:8},color:"primary",size:"small"},e.category.id),e.equipment.map(i=>b(ot,{display:"inline",mr:1,children:r(Fa(i.name))},i.id)),e.equipment.length===0&&b(ot,{color:"text.secondary",display:"inline",mr:1,children:r("exercises.noEquipment")})]})]})},e.id)},zTt=({mainImage:e,sideImages:t})=>G(Oe,{container:!0,spacing:1,children:[e&&b(Oe,{size:12,children:b(to,{children:b(bu,{component:"img",image:e.url,alt:""})})}),t.map(n=>b(Oe,{size:6,children:b(to,{children:b(bu,{component:"img",image:n.url,sx:{height:120},alt:""})})},n.id))]}),VTt=({videos:e})=>b(Oe,{container:!0,spacing:1,children:e.map(t=>b(Oe,{size:6,children:b(to,{children:b(bu,{component:"video",src:t.url,sx:{height:120},controls:!0,muted:!0,preload:"metadata"})})},t.id))});function V5(){var r,o;const e=Ul(),t=Xy(sg.EDIT_EXERCISE),n={canContribute:!1,anonymous:!0,emailVerified:!1,admin:!1};if(e.isSuccess&&t.isSuccess){if(e.data===null)return n;n.anonymous=!1,(r=e.data)!=null&&r.emailVerified&&(n.emailVerified=!0),t.data&&(n.admin=!0),(n.admin||(o=e.data)!=null&&o.isTrustworthy)&&(n.canContribute=!0)}return n}const HTt=({setEditMode:e})=>{const[t]=Le();return G(en,{mb:2,paddingY:2,sx:{width:"100%",backgroundColor:"#ebebeb",textAlign:"center"},children:[b(ot,{variant:"h5",children:t("exercises.exerciseNotTranslated")}),b(ot,{gutterBottom:!0,variant:"body1",component:"div",children:t("exercises.exerciseNotTranslatedBody")}),b(dt,{variant:"contained",onClick:()=>e(!0),children:t("exercises.translateExerciseNow")})]})},UTt=({exercise:e,variations:t,language:n,setEditMode:r})=>{var l;const[o]=Le(),i=V5(),a=e.getTranslation(n),s=n&&n.id!==a.language;return G(Oe,{container:!0,children:[s&&i.canContribute&&b(Oe,{order:{xs:2,sm:1},size:{xs:12,sm:7,md:12},children:b(HTt,{setEditMode:r})}),G(Oe,{order:{xs:2,sm:1},size:{xs:12,sm:7,md:8},children:[(a==null?void 0:a.aliases.length)>0&&G(wt,{children:[G("p",{children:[o("exercises.alsoKnownAs"),"  ",(l=a==null?void 0:a.aliases)==null?void 0:l.map(c=>c.alias).join(", ")]}),b(hi,{})]}),b(ot,{variant:"h5",children:o("exercises.description")}),b("div",{dangerouslySetInnerHTML:{__html:a==null?void 0:a.description}}),b(hi,{}),(a==null?void 0:a.notes.length)>0&&b(ot,{variant:"h5",children:o("exercises.notes")}),b("ul",{children:a==null?void 0:a.notes.map(c=>b("li",{children:c.note},c.id))}),b(hi,{}),b(ot,{variant:"h5",children:o("exercises.muscles")}),G(Oe,{container:!0,children:[b(Oe,{order:{xs:1},size:{xs:6,md:3},children:b(Ig,{primaryMuscles:e.muscles,secondaryMuscles:e.musclesSecondary,isFront:!0})}),G(Oe,{order:{xs:2,md:3},size:{xs:6,md:3},children:[b("h3",{children:o("exercises.primaryMuscles")}),b("ul",{children:e.muscles.map(c=>b("li",{children:c.getName(o)},c.id))})]}),b(Oe,{order:{xs:3,md:2},size:{xs:6,md:3},children:b(Ig,{primaryMuscles:e.muscles,secondaryMuscles:e.musclesSecondary,isFront:!1})}),G(Oe,{order:{xs:4},size:{xs:6,md:3},children:[b("h3",{children:o("exercises.secondaryMuscles")}),b("ul",{children:e.musclesSecondary.map(c=>b("li",{children:c.getName(o)},c.id))})]})]}),b(hi,{})]}),G(Oe,{order:{xs:1,sm:2},size:{xs:12,sm:5,md:4},children:[b(zTt,{mainImage:e.mainImage,sideImages:e.sideImages}),b(hi,{}),b(VTt,{videos:e.videos})]}),G(Oe,{order:{xs:3},size:12,children:[b(Is,{}),b(hi,{}),t.length>0&&b(ot,{variant:"h5",children:o("exercises.variations")}),b(Oe,{container:!0,spacing:2,children:t.map(c=>b(Oe,{size:{xs:6,md:2},children:b(jde,{exercise:c,language:n},c.id)},c.id))})]}),b(Oe,{order:{xs:4},size:12,children:G(ot,{variant:"caption",display:"block",mt:2,children:["The text on this page is available under the ",b("a",{href:"https://creativecommons.org/licenses/by-sa/4.0/deed",children:"CC BY-SA 4 License"}),"."]})})]})};var jO={exports:{}};/** * @license * Lodash * Copyright OpenJS Foundation and other contributors * Released under MIT license * Based on Underscore.js 1.8.3 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - */IO.exports;(function(e,t){(function(){var n,r="4.17.21",o=200,i="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",a="Expected a function",s="Invalid `variable` option passed into `_.template`",l="__lodash_hash_undefined__",c=500,u="__lodash_placeholder__",d=1,f=2,p=4,h=1,m=2,y=1,w=2,x=4,C=8,E=16,P=32,T=64,I=128,A=256,k=512,O=30,$="...",N=800,L=16,j=1,D=2,_=3,z=1/0,F=9007199254740991,V=17976931348623157e292,U=NaN,q=4294967295,X=q-1,ie=q>>>1,ee=[["ary",I],["bind",y],["bindKey",w],["curry",C],["curryRight",E],["flip",k],["partial",P],["partialRight",T],["rearg",A]],Q="[object Arguments]",te="[object Array]",pe="[object AsyncFunction]",ae="[object Boolean]",se="[object Date]",re="[object DOMException]",fe="[object Error]",Z="[object Function]",ce="[object GeneratorFunction]",ge="[object Map]",we="[object Number]",me="[object Null]",Se="[object Object]",xe="[object Promise]",ke="[object Proxy]",De="[object RegExp]",_e="[object Set]",ye="[object String]",Pe="[object Symbol]",Ae="[object Undefined]",Me="[object WeakMap]",We="[object WeakSet]",He="[object ArrayBuffer]",Xe="[object DataView]",ht="[object Float32Array]",ot="[object Float64Array]",et="[object Int8Array]",St="[object Int16Array]",On="[object Int32Array]",Ke="[object Uint8Array]",$e="[object Uint8ClampedArray]",Qe="[object Uint16Array]",Et="[object Uint32Array]",Xt=/\b__p \+= '';/g,$t=/\b(__p \+=) '' \+/g,bn=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Gn=/&(?:amp|lt|gt|quot|#39);/g,Jn=/[&<>"']/g,Do=RegExp(Gn.source),no=RegExp(Jn.source),Bi=/<%-([\s\S]+?)%>/g,Ds=/<%([\s\S]+?)%>/g,tn=/<%=([\s\S]+?)%>/g,ai=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,tm=/^\w*$/,zd=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ku=/[\\^$.*+?()[\]{}|]/g,Gp=RegExp(ku.source),qp=/^\s+/,C0=/\s/,nm=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,O1=/\{\n\/\* \[wrapped with (.+)\] \*/,Kp=/,? & /,Go=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ro=/[()=,{}\[\]\/\s]/,Wl=/\\(\\)?/g,Ue=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Fe=/\w*$/,Pt=/^[-+]0x[0-9a-f]+$/i,un=/^0b[01]+$/i,gn=/^\[object .+?Constructor\]$/,Vr=/^0o[0-7]+$/i,Zn=/^(?:0|[1-9]\d*)$/,Va=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Mu=/($^)/,_5=/['\n\r\u2028\u2029\\]/g,rm="\\ud800-\\udfff",A1="\\u0300-\\u036f",om="\\ufe20-\\ufe2f",im="\\u20d0-\\u20ff",am=A1+om+im,Yp="\\u2700-\\u27bf",$n="a-z\\xdf-\\xf6\\xf8-\\xff",_s="\\xac\\xb1\\xd7\\xf7",Nc="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Qp="\\u2000-\\u206f",aR=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",N5="A-Z\\xc0-\\xd6\\xd8-\\xde",L5="\\ufe0e\\ufe0f",F5=_s+Nc+Qp+aR,sR="['’]",Vhe="["+rm+"]",j5="["+F5+"]",k1="["+am+"]",B5="\\d+",Hhe="["+Yp+"]",z5="["+$n+"]",V5="[^"+rm+F5+B5+Yp+$n+N5+"]",lR="\\ud83c[\\udffb-\\udfff]",Uhe="(?:"+k1+"|"+lR+")",H5="[^"+rm+"]",cR="(?:\\ud83c[\\udde6-\\uddff]){2}",uR="[\\ud800-\\udbff][\\udc00-\\udfff]",sm="["+N5+"]",U5="\\u200d",W5="(?:"+z5+"|"+V5+")",Whe="(?:"+sm+"|"+V5+")",G5="(?:"+sR+"(?:d|ll|m|re|s|t|ve))?",q5="(?:"+sR+"(?:D|LL|M|RE|S|T|VE))?",K5=Uhe+"?",Y5="["+L5+"]?",Ghe="(?:"+U5+"(?:"+[H5,cR,uR].join("|")+")"+Y5+K5+")*",qhe="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Khe="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Q5=Y5+K5+Ghe,Yhe="(?:"+[Hhe,cR,uR].join("|")+")"+Q5,Qhe="(?:"+[H5+k1+"?",k1,cR,uR,Vhe].join("|")+")",Xhe=RegExp(sR,"g"),Jhe=RegExp(k1,"g"),dR=RegExp(lR+"(?="+lR+")|"+Qhe+Q5,"g"),Zhe=RegExp([sm+"?"+z5+"+"+G5+"(?="+[j5,sm,"$"].join("|")+")",Whe+"+"+q5+"(?="+[j5,sm+W5,"$"].join("|")+")",sm+"?"+W5+"+"+G5,sm+"+"+q5,Khe,qhe,B5,Yhe].join("|"),"g"),ege=RegExp("["+U5+rm+am+L5+"]"),tge=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,nge=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],rge=-1,$r={};$r[ht]=$r[ot]=$r[et]=$r[St]=$r[On]=$r[Ke]=$r[$e]=$r[Qe]=$r[Et]=!0,$r[Q]=$r[te]=$r[He]=$r[ae]=$r[Xe]=$r[se]=$r[fe]=$r[Z]=$r[ge]=$r[we]=$r[Se]=$r[De]=$r[_e]=$r[ye]=$r[Me]=!1;var Pr={};Pr[Q]=Pr[te]=Pr[He]=Pr[Xe]=Pr[ae]=Pr[se]=Pr[ht]=Pr[ot]=Pr[et]=Pr[St]=Pr[On]=Pr[ge]=Pr[we]=Pr[Se]=Pr[De]=Pr[_e]=Pr[ye]=Pr[Pe]=Pr[Ke]=Pr[$e]=Pr[Qe]=Pr[Et]=!0,Pr[fe]=Pr[Z]=Pr[Me]=!1;var oge={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},ige={"&":"&","<":"<",">":">",'"':""","'":"'"},age={"&":"&","<":"<",">":">",""":'"',"'":"'"},sge={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},lge=parseFloat,cge=parseInt,X5=typeof ea=="object"&&ea&&ea.Object===Object&&ea,uge=typeof self=="object"&&self&&self.Object===Object&&self,si=X5||uge||Function("return this")(),fR=t&&!t.nodeType&&t,Xp=fR&&!0&&e&&!e.nodeType&&e,J5=Xp&&Xp.exports===fR,pR=J5&&X5.process,Ns=function(){try{var Ee=Xp&&Xp.require&&Xp.require("util").types;return Ee||pR&&pR.binding&&pR.binding("util")}catch{}}(),Z5=Ns&&Ns.isArrayBuffer,eU=Ns&&Ns.isDate,tU=Ns&&Ns.isMap,nU=Ns&&Ns.isRegExp,rU=Ns&&Ns.isSet,oU=Ns&&Ns.isTypedArray;function Ha(Ee,ze,Re){switch(Re.length){case 0:return Ee.call(ze);case 1:return Ee.call(ze,Re[0]);case 2:return Ee.call(ze,Re[0],Re[1]);case 3:return Ee.call(ze,Re[0],Re[1],Re[2])}return Ee.apply(ze,Re)}function dge(Ee,ze,Re,At){for(var sn=-1,er=Ee==null?0:Ee.length;++sn-1}function hR(Ee,ze,Re){for(var At=-1,sn=Ee==null?0:Ee.length;++At-1;);return Re}function fU(Ee,ze){for(var Re=Ee.length;Re--&&lm(ze,Ee[Re],0)>-1;);return Re}function wge(Ee,ze){for(var Re=Ee.length,At=0;Re--;)Ee[Re]===ze&&++At;return At}var xge=vR(oge),Sge=vR(ige);function Cge(Ee){return"\\"+sge[Ee]}function Ege(Ee,ze){return Ee==null?n:Ee[ze]}function cm(Ee){return ege.test(Ee)}function Pge(Ee){return tge.test(Ee)}function Tge(Ee){for(var ze,Re=[];!(ze=Ee.next()).done;)Re.push(ze.value);return Re}function SR(Ee){var ze=-1,Re=Array(Ee.size);return Ee.forEach(function(At,sn){Re[++ze]=[sn,At]}),Re}function pU(Ee,ze){return function(Re){return Ee(ze(Re))}}function Ud(Ee,ze){for(var Re=-1,At=Ee.length,sn=0,er=[];++Re-1}function pme(g,S){var M=this.__data__,H=K1(M,g);return H<0?(++this.size,M.push([g,S])):M[H][1]=S,this}Ru.prototype.clear=cme,Ru.prototype.delete=ume,Ru.prototype.get=dme,Ru.prototype.has=fme,Ru.prototype.set=pme;function $u(g){var S=-1,M=g==null?0:g.length;for(this.clear();++S=S?g:S)),g}function Bs(g,S,M,H,G,ne){var he,ve=S&d,Te=S&f,Ge=S&p;if(M&&(he=G?M(g,H,G,ne):M(g)),he!==n)return he;if(!Kr(g))return g;var qe=dn(g);if(qe){if(he=yye(g),!ve)return pa(g,he)}else{var Ze=Ci(g),mt=Ze==Z||Ze==ce;if(Qd(g))return YU(g,ve);if(Ze==Se||Ze==Q||mt&&!G){if(he=Te||mt?{}:h3(g),!ve)return Te?aye(g,Ame(he,g)):iye(g,PU(he,g))}else{if(!Pr[Ze])return G?g:{};he=vye(g,Ze,ve)}}ne||(ne=new ql);var Nt=ne.get(g);if(Nt)return Nt;ne.set(g,he),H3(g)?g.forEach(function(Qt){he.add(Bs(Qt,S,M,Qt,g,ne))}):z3(g)&&g.forEach(function(Qt,kn){he.set(kn,Bs(Qt,S,M,kn,g,ne))});var Yt=Ge?Te?KR:qR:Te?ga:qo,wn=qe?n:Yt(g);return Ls(wn||g,function(Qt,kn){wn&&(kn=Qt,Qt=g[kn]),k0(he,kn,Bs(Qt,S,M,kn,g,ne))}),he}function kme(g){var S=qo(g);return function(M){return TU(M,g,S)}}function TU(g,S,M){var H=M.length;if(g==null)return!H;for(g=wr(g);H--;){var G=M[H],ne=S[G],he=g[G];if(he===n&&!(G in g)||!ne(he))return!1}return!0}function IU(g,S,M){if(typeof g!="function")throw new Fs(a);return L0(function(){g.apply(n,M)},S)}function M0(g,S,M,H){var G=-1,ne=M1,he=!0,ve=g.length,Te=[],Ge=S.length;if(!ve)return Te;M&&(S=Hr(S,Ua(M))),H?(ne=hR,he=!1):S.length>=o&&(ne=E0,he=!1,S=new eh(S));e:for(;++GG?0:G+M),H=H===n||H>G?G:mn(H),H<0&&(H+=G),H=M>H?0:W3(H);M0&&M(ve)?S>1?li(ve,S-1,M,H,G):Hd(G,ve):H||(G[G.length]=ve)}return G}var AR=t3(),kU=t3(!0);function Lc(g,S){return g&&AR(g,S,qo)}function kR(g,S){return g&&kU(g,S,qo)}function Q1(g,S){return Vd(S,function(M){return Fu(g[M])})}function nh(g,S){S=Kd(S,g);for(var M=0,H=S.length;g!=null&&MS}function $me(g,S){return g!=null&&fr.call(g,S)}function Dme(g,S){return g!=null&&S in wr(g)}function _me(g,S,M){return g>=Si(S,M)&&g=120&&qe.length>=120)?new eh(he&&qe):n}qe=g[0];var Ze=-1,mt=ve[0];e:for(;++Ze-1;)ve!==g&&z1.call(ve,Te,1),z1.call(g,Te,1);return g}function zU(g,S){for(var M=g?S.length:0,H=M-1;M--;){var G=S[M];if(M==H||G!==ne){var ne=G;Lu(G)?z1.call(g,G,1):BR(g,G)}}return g}function LR(g,S){return g+U1(xU()*(S-g+1))}function Kme(g,S,M,H){for(var G=-1,ne=No(H1((S-g)/(M||1)),0),he=Re(ne);ne--;)he[H?ne:++G]=g,g+=M;return he}function FR(g,S){var M="";if(!g||S<1||S>F)return M;do S%2&&(M+=g),S=U1(S/2),S&&(g+=g);while(S);return M}function Pn(g,S){return t$(y3(g,S,ma),g+"")}function Yme(g){return EU(wm(g))}function Qme(g,S){var M=wm(g);return sE(M,th(S,0,M.length))}function D0(g,S,M,H){if(!Kr(g))return g;S=Kd(S,g);for(var G=-1,ne=S.length,he=ne-1,ve=g;ve!=null&&++GG?0:G+S),M=M>G?G:M,M<0&&(M+=G),G=S>M?0:M-S>>>0,S>>>=0;for(var ne=Re(G);++H>>1,he=g[ne];he!==null&&!Ga(he)&&(M?he<=S:he=o){var Ge=S?null:uye(g);if(Ge)return $1(Ge);he=!1,G=E0,Te=new eh}else Te=S?[]:ve;e:for(;++H=H?g:zs(g,S,M)}var KU=zge||function(g){return si.clearTimeout(g)};function YU(g,S){if(S)return g.slice();var M=g.length,H=mU?mU(M):new g.constructor(M);return g.copy(H),H}function UR(g){var S=new g.constructor(g.byteLength);return new j1(S).set(new j1(g)),S}function tye(g,S){var M=S?UR(g.buffer):g.buffer;return new g.constructor(M,g.byteOffset,g.byteLength)}function nye(g){var S=new g.constructor(g.source,Fe.exec(g));return S.lastIndex=g.lastIndex,S}function rye(g){return A0?wr(A0.call(g)):{}}function QU(g,S){var M=S?UR(g.buffer):g.buffer;return new g.constructor(M,g.byteOffset,g.length)}function XU(g,S){if(g!==S){var M=g!==n,H=g===null,G=g===g,ne=Ga(g),he=S!==n,ve=S===null,Te=S===S,Ge=Ga(S);if(!ve&&!Ge&&!ne&&g>S||ne&&he&&Te&&!ve&&!Ge||H&&he&&Te||!M&&Te||!G)return 1;if(!H&&!ne&&!Ge&&g=ve)return Te;var Ge=M[H];return Te*(Ge=="desc"?-1:1)}}return g.index-S.index}function JU(g,S,M,H){for(var G=-1,ne=g.length,he=M.length,ve=-1,Te=S.length,Ge=No(ne-he,0),qe=Re(Te+Ge),Ze=!H;++ve1?M[G-1]:n,he=G>2?M[2]:n;for(ne=g.length>3&&typeof ne=="function"?(G--,ne):n,he&&Vi(M[0],M[1],he)&&(ne=G<3?n:ne,G=1),S=wr(S);++H-1?G[ne?S[he]:he]:n}}function o3(g){return Nu(function(S){var M=S.length,H=M,G=js.prototype.thru;for(g&&S.reverse();H--;){var ne=S[H];if(typeof ne!="function")throw new Fs(a);if(G&&!he&&iE(ne)=="wrapper")var he=new js([],!0)}for(H=he?H:M;++H1&&Nn.reverse(),qe&&Teve))return!1;var Ge=ne.get(g),qe=ne.get(S);if(Ge&&qe)return Ge==S&&qe==g;var Ze=-1,mt=!0,Nt=M&m?new eh:n;for(ne.set(g,S),ne.set(S,g);++Ze1?"& ":"")+S[H],S=S.join(M>2?", ":" "),g.replace(nm,`{ -/* [wrapped with `+S+`] */ -`)}function wye(g){return dn(g)||ih(g)||!!(bU&&g&&g[bU])}function Lu(g,S){var M=typeof g;return S=S??F,!!S&&(M=="number"||M!="symbol"&&Zn.test(g))&&g>-1&&g%1==0&&g0){if(++S>=N)return arguments[0]}else S=0;return g.apply(n,arguments)}}function sE(g,S){var M=-1,H=g.length,G=H-1;for(S=S===n?H:S;++M1?g[S-1]:n;return M=typeof M=="function"?(g.pop(),M):n,A3(g,M)});function k3(g){var S=J(g);return S.__chain__=!0,S}function Mve(g,S){return S(g),g}function lE(g,S){return S(g)}var Rve=Nu(function(g){var S=g.length,M=S?g[0]:0,H=this.__wrapped__,G=function(ne){return OR(ne,g)};return S>1||this.__actions__.length||!(H instanceof Dn)||!Lu(M)?this.thru(G):(H=H.slice(M,+M+(S?1:0)),H.__actions__.push({func:lE,args:[G],thisArg:n}),new js(H,this.__chain__).thru(function(ne){return S&&!ne.length&&ne.push(n),ne}))});function $ve(){return k3(this)}function Dve(){return new js(this.value(),this.__chain__)}function _ve(){this.__values__===n&&(this.__values__=U3(this.value()));var g=this.__index__>=this.__values__.length,S=g?n:this.__values__[this.__index__++];return{done:g,value:S}}function Nve(){return this}function Lve(g){for(var S,M=this;M instanceof q1;){var H=C3(M);H.__index__=0,H.__values__=n,S?G.__wrapped__=H:S=H;var G=H;M=M.__wrapped__}return G.__wrapped__=g,S}function Fve(){var g=this.__wrapped__;if(g instanceof Dn){var S=g;return this.__actions__.length&&(S=new Dn(this)),S=S.reverse(),S.__actions__.push({func:lE,args:[n$],thisArg:n}),new js(S,this.__chain__)}return this.thru(n$)}function jve(){return GU(this.__wrapped__,this.__actions__)}var Bve=eE(function(g,S,M){fr.call(g,M)?++g[M]:Du(g,M,1)});function zve(g,S,M){var H=dn(g)?iU:Mme;return M&&Vi(g,S,M)&&(S=n),H(g,Gt(S,3))}function Vve(g,S){var M=dn(g)?Vd:AU;return M(g,Gt(S,3))}var Hve=r3(E3),Uve=r3(P3);function Wve(g,S){return li(cE(g,S),1)}function Gve(g,S){return li(cE(g,S),z)}function qve(g,S,M){return M=M===n?1:mn(M),li(cE(g,S),M)}function M3(g,S){var M=dn(g)?Ls:Gd;return M(g,Gt(S,3))}function R3(g,S){var M=dn(g)?fge:OU;return M(g,Gt(S,3))}var Kve=eE(function(g,S,M){fr.call(g,M)?g[M].push(S):Du(g,M,[S])});function Yve(g,S,M,H){g=ha(g)?g:wm(g),M=M&&!H?mn(M):0;var G=g.length;return M<0&&(M=No(G+M,0)),hE(g)?M<=G&&g.indexOf(S,M)>-1:!!G&&lm(g,S,M)>-1}var Qve=Pn(function(g,S,M){var H=-1,G=typeof S=="function",ne=ha(g)?Re(g.length):[];return Gd(g,function(he){ne[++H]=G?Ha(S,he,M):R0(he,S,M)}),ne}),Xve=eE(function(g,S,M){Du(g,M,S)});function cE(g,S){var M=dn(g)?Hr:_U;return M(g,Gt(S,3))}function Jve(g,S,M,H){return g==null?[]:(dn(S)||(S=S==null?[]:[S]),M=H?n:M,dn(M)||(M=M==null?[]:[M]),jU(g,S,M))}var Zve=eE(function(g,S,M){g[M?0:1].push(S)},function(){return[[],[]]});function ebe(g,S,M){var H=dn(g)?gR:cU,G=arguments.length<3;return H(g,Gt(S,4),M,G,Gd)}function tbe(g,S,M){var H=dn(g)?pge:cU,G=arguments.length<3;return H(g,Gt(S,4),M,G,OU)}function nbe(g,S){var M=dn(g)?Vd:AU;return M(g,fE(Gt(S,3)))}function rbe(g){var S=dn(g)?EU:Yme;return S(g)}function obe(g,S,M){(M?Vi(g,S,M):S===n)?S=1:S=mn(S);var H=dn(g)?Tme:Qme;return H(g,S)}function ibe(g){var S=dn(g)?Ime:Jme;return S(g)}function abe(g){if(g==null)return 0;if(ha(g))return hE(g)?um(g):g.length;var S=Ci(g);return S==ge||S==_e?g.size:DR(g).length}function sbe(g,S,M){var H=dn(g)?mR:Zme;return M&&Vi(g,S,M)&&(S=n),H(g,Gt(S,3))}var lbe=Pn(function(g,S){if(g==null)return[];var M=S.length;return M>1&&Vi(g,S[0],S[1])?S=[]:M>2&&Vi(S[0],S[1],S[2])&&(S=[S[0]]),jU(g,li(S,1),[])}),uE=Vge||function(){return si.Date.now()};function cbe(g,S){if(typeof S!="function")throw new Fs(a);return g=mn(g),function(){if(--g<1)return S.apply(this,arguments)}}function $3(g,S,M){return S=M?n:S,S=g&&S==null?g.length:S,_u(g,I,n,n,n,n,S)}function D3(g,S){var M;if(typeof S!="function")throw new Fs(a);return g=mn(g),function(){return--g>0&&(M=S.apply(this,arguments)),g<=1&&(S=n),M}}var o$=Pn(function(g,S,M){var H=y;if(M.length){var G=Ud(M,vm(o$));H|=P}return _u(g,H,S,M,G)}),_3=Pn(function(g,S,M){var H=y|w;if(M.length){var G=Ud(M,vm(_3));H|=P}return _u(S,H,g,M,G)});function N3(g,S,M){S=M?n:S;var H=_u(g,C,n,n,n,n,n,S);return H.placeholder=N3.placeholder,H}function L3(g,S,M){S=M?n:S;var H=_u(g,E,n,n,n,n,n,S);return H.placeholder=L3.placeholder,H}function F3(g,S,M){var H,G,ne,he,ve,Te,Ge=0,qe=!1,Ze=!1,mt=!0;if(typeof g!="function")throw new Fs(a);S=Hs(S)||0,Kr(M)&&(qe=!!M.leading,Ze="maxWait"in M,ne=Ze?No(Hs(M.maxWait)||0,S):ne,mt="trailing"in M?!!M.trailing:mt);function Nt(mo){var Yl=H,Bu=G;return H=G=n,Ge=mo,he=g.apply(Bu,Yl),he}function Yt(mo){return Ge=mo,ve=L0(kn,S),qe?Nt(mo):he}function wn(mo){var Yl=mo-Te,Bu=mo-Ge,r4=S-Yl;return Ze?Si(r4,ne-Bu):r4}function Qt(mo){var Yl=mo-Te,Bu=mo-Ge;return Te===n||Yl>=S||Yl<0||Ze&&Bu>=ne}function kn(){var mo=uE();if(Qt(mo))return Nn(mo);ve=L0(kn,wn(mo))}function Nn(mo){return ve=n,mt&&H?Nt(mo):(H=G=n,he)}function qa(){ve!==n&&KU(ve),Ge=0,H=Te=G=ve=n}function Hi(){return ve===n?he:Nn(uE())}function Ka(){var mo=uE(),Yl=Qt(mo);if(H=arguments,G=this,Te=mo,Yl){if(ve===n)return Yt(Te);if(Ze)return KU(ve),ve=L0(kn,S),Nt(Te)}return ve===n&&(ve=L0(kn,S)),he}return Ka.cancel=qa,Ka.flush=Hi,Ka}var ube=Pn(function(g,S){return IU(g,1,S)}),dbe=Pn(function(g,S,M){return IU(g,Hs(S)||0,M)});function fbe(g){return _u(g,k)}function dE(g,S){if(typeof g!="function"||S!=null&&typeof S!="function")throw new Fs(a);var M=function(){var H=arguments,G=S?S.apply(this,H):H[0],ne=M.cache;if(ne.has(G))return ne.get(G);var he=g.apply(this,H);return M.cache=ne.set(G,he)||ne,he};return M.cache=new(dE.Cache||$u),M}dE.Cache=$u;function fE(g){if(typeof g!="function")throw new Fs(a);return function(){var S=arguments;switch(S.length){case 0:return!g.call(this);case 1:return!g.call(this,S[0]);case 2:return!g.call(this,S[0],S[1]);case 3:return!g.call(this,S[0],S[1],S[2])}return!g.apply(this,S)}}function pbe(g){return D3(2,g)}var hbe=eye(function(g,S){S=S.length==1&&dn(S[0])?Hr(S[0],Ua(Gt())):Hr(li(S,1),Ua(Gt()));var M=S.length;return Pn(function(H){for(var G=-1,ne=Si(H.length,M);++G=S}),ih=RU(function(){return arguments}())?RU:function(g){return oo(g)&&fr.call(g,"callee")&&!vU.call(g,"callee")},dn=Re.isArray,Abe=Z5?Ua(Z5):Lme;function ha(g){return g!=null&&pE(g.length)&&!Fu(g)}function go(g){return oo(g)&&ha(g)}function kbe(g){return g===!0||g===!1||oo(g)&&zi(g)==ae}var Qd=Uge||m$,Mbe=eU?Ua(eU):Fme;function Rbe(g){return oo(g)&&g.nodeType===1&&!F0(g)}function $be(g){if(g==null)return!0;if(ha(g)&&(dn(g)||typeof g=="string"||typeof g.splice=="function"||Qd(g)||bm(g)||ih(g)))return!g.length;var S=Ci(g);if(S==ge||S==_e)return!g.size;if(N0(g))return!DR(g).length;for(var M in g)if(fr.call(g,M))return!1;return!0}function Dbe(g,S){return $0(g,S)}function _be(g,S,M){M=typeof M=="function"?M:n;var H=M?M(g,S):n;return H===n?$0(g,S,n,M):!!H}function a$(g){if(!oo(g))return!1;var S=zi(g);return S==fe||S==re||typeof g.message=="string"&&typeof g.name=="string"&&!F0(g)}function Nbe(g){return typeof g=="number"&&wU(g)}function Fu(g){if(!Kr(g))return!1;var S=zi(g);return S==Z||S==ce||S==pe||S==ke}function B3(g){return typeof g=="number"&&g==mn(g)}function pE(g){return typeof g=="number"&&g>-1&&g%1==0&&g<=F}function Kr(g){var S=typeof g;return g!=null&&(S=="object"||S=="function")}function oo(g){return g!=null&&typeof g=="object"}var z3=tU?Ua(tU):Bme;function Lbe(g,S){return g===S||$R(g,S,QR(S))}function Fbe(g,S,M){return M=typeof M=="function"?M:n,$R(g,S,QR(S),M)}function jbe(g){return V3(g)&&g!=+g}function Bbe(g){if(Cye(g))throw new sn(i);return $U(g)}function zbe(g){return g===null}function Vbe(g){return g==null}function V3(g){return typeof g=="number"||oo(g)&&zi(g)==we}function F0(g){if(!oo(g)||zi(g)!=Se)return!1;var S=B1(g);if(S===null)return!0;var M=fr.call(S,"constructor")&&S.constructor;return typeof M=="function"&&M instanceof M&&N1.call(M)==Fge}var s$=nU?Ua(nU):zme;function Hbe(g){return B3(g)&&g>=-F&&g<=F}var H3=rU?Ua(rU):Vme;function hE(g){return typeof g=="string"||!dn(g)&&oo(g)&&zi(g)==ye}function Ga(g){return typeof g=="symbol"||oo(g)&&zi(g)==Pe}var bm=oU?Ua(oU):Hme;function Ube(g){return g===n}function Wbe(g){return oo(g)&&Ci(g)==Me}function Gbe(g){return oo(g)&&zi(g)==We}var qbe=oE(_R),Kbe=oE(function(g,S){return g<=S});function U3(g){if(!g)return[];if(ha(g))return hE(g)?Gl(g):pa(g);if(P0&&g[P0])return Tge(g[P0]());var S=Ci(g),M=S==ge?SR:S==_e?$1:wm;return M(g)}function ju(g){if(!g)return g===0?g:0;if(g=Hs(g),g===z||g===-z){var S=g<0?-1:1;return S*V}return g===g?g:0}function mn(g){var S=ju(g),M=S%1;return S===S?M?S-M:S:0}function W3(g){return g?th(mn(g),0,q):0}function Hs(g){if(typeof g=="number")return g;if(Ga(g))return U;if(Kr(g)){var S=typeof g.valueOf=="function"?g.valueOf():g;g=Kr(S)?S+"":S}if(typeof g!="string")return g===0?g:+g;g=uU(g);var M=un.test(g);return M||Vr.test(g)?cge(g.slice(2),M?2:8):Pt.test(g)?U:+g}function G3(g){return Fc(g,ga(g))}function Ybe(g){return g?th(mn(g),-F,F):g===0?g:0}function ir(g){return g==null?"":Wa(g)}var Qbe=mm(function(g,S){if(N0(S)||ha(S)){Fc(S,qo(S),g);return}for(var M in S)fr.call(S,M)&&k0(g,M,S[M])}),q3=mm(function(g,S){Fc(S,ga(S),g)}),gE=mm(function(g,S,M,H){Fc(S,ga(S),g,H)}),Xbe=mm(function(g,S,M,H){Fc(S,qo(S),g,H)}),Jbe=Nu(OR);function Zbe(g,S){var M=gm(g);return S==null?M:PU(M,S)}var e0e=Pn(function(g,S){g=wr(g);var M=-1,H=S.length,G=H>2?S[2]:n;for(G&&Vi(S[0],S[1],G)&&(H=1);++M1),ne}),Fc(g,KR(g),M),H&&(M=Bs(M,d|f|p,dye));for(var G=S.length;G--;)BR(M,S[G]);return M});function v0e(g,S){return Y3(g,fE(Gt(S)))}var b0e=Nu(function(g,S){return g==null?{}:Gme(g,S)});function Y3(g,S){if(g==null)return{};var M=Hr(KR(g),function(H){return[H]});return S=Gt(S),BU(g,M,function(H,G){return S(H,G[0])})}function w0e(g,S,M){S=Kd(S,g);var H=-1,G=S.length;for(G||(G=1,g=n);++HS){var H=g;g=S,S=H}if(M||g%1||S%1){var G=xU();return Si(g+G*(S-g+lge("1e-"+((G+"").length-1))),S)}return LR(g,S)}var M0e=ym(function(g,S,M){return S=S.toLowerCase(),g+(M?J3(S):S)});function J3(g){return u$(ir(g).toLowerCase())}function Z3(g){return g=ir(g),g&&g.replace(Va,xge).replace(Jhe,"")}function R0e(g,S,M){g=ir(g),S=Wa(S);var H=g.length;M=M===n?H:th(mn(M),0,H);var G=M;return M-=S.length,M>=0&&g.slice(M,G)==S}function $0e(g){return g=ir(g),g&&no.test(g)?g.replace(Jn,Sge):g}function D0e(g){return g=ir(g),g&&Gp.test(g)?g.replace(ku,"\\$&"):g}var _0e=ym(function(g,S,M){return g+(M?"-":"")+S.toLowerCase()}),N0e=ym(function(g,S,M){return g+(M?" ":"")+S.toLowerCase()}),L0e=n3("toLowerCase");function F0e(g,S,M){g=ir(g),S=mn(S);var H=S?um(g):0;if(!S||H>=S)return g;var G=(S-H)/2;return rE(U1(G),M)+g+rE(H1(G),M)}function j0e(g,S,M){g=ir(g),S=mn(S);var H=S?um(g):0;return S&&H>>0,M?(g=ir(g),g&&(typeof S=="string"||S!=null&&!s$(S))&&(S=Wa(S),!S&&cm(g))?Yd(Gl(g),0,M):g.split(S,M)):[]}var G0e=ym(function(g,S,M){return g+(M?" ":"")+u$(S)});function q0e(g,S,M){return g=ir(g),M=M==null?0:th(mn(M),0,g.length),S=Wa(S),g.slice(M,M+S.length)==S}function K0e(g,S,M){var H=J.templateSettings;M&&Vi(g,S,M)&&(S=n),g=ir(g),S=gE({},S,H,c3);var G=gE({},S.imports,H.imports,c3),ne=qo(G),he=xR(G,ne),ve,Te,Ge=0,qe=S.interpolate||Mu,Ze="__p += '",mt=CR((S.escape||Mu).source+"|"+qe.source+"|"+(qe===tn?Ue:Mu).source+"|"+(S.evaluate||Mu).source+"|$","g"),Nt="//# sourceURL="+(fr.call(S,"sourceURL")?(S.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++rge+"]")+` -`;g.replace(mt,function(Qt,kn,Nn,qa,Hi,Ka){return Nn||(Nn=qa),Ze+=g.slice(Ge,Ka).replace(_5,Cge),kn&&(ve=!0,Ze+=`' + -__e(`+kn+`) + + */jO.exports;(function(e,t){(function(){var n,r="4.17.21",o=200,i="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",a="Expected a function",s="Invalid `variable` option passed into `_.template`",l="__lodash_hash_undefined__",c=500,u="__lodash_placeholder__",d=1,f=2,p=4,h=1,m=2,y=1,w=2,x=4,S=8,E=16,P=32,T=64,I=128,A=256,k=512,O=30,$="...",N=800,L=16,j=1,D=2,_=3,z=1/0,F=9007199254740991,V=17976931348623157e292,U=NaN,K=4294967295,X=K-1,ie=K>>>1,ee=[["ary",I],["bind",y],["bindKey",w],["curry",S],["curryRight",E],["flip",k],["partial",P],["partialRight",T],["rearg",A]],Q="[object Arguments]",te="[object Array]",pe="[object AsyncFunction]",ae="[object Boolean]",se="[object Date]",oe="[object DOMException]",fe="[object Error]",Z="[object Function]",ce="[object GeneratorFunction]",ge="[object Map]",we="[object Number]",me="[object Null]",Se="[object Object]",xe="[object Promise]",ke="[object Proxy]",De="[object RegExp]",_e="[object Set]",ye="[object String]",Pe="[object Symbol]",Ae="[object Undefined]",Me="[object WeakMap]",We="[object WeakSet]",He="[object ArrayBuffer]",Xe="[object DataView]",gt="[object Float32Array]",st="[object Float64Array]",et="[object Int8Array]",Et="[object Int16Array]",An="[object Int32Array]",Ke="[object Uint8Array]",$e="[object Uint8ClampedArray]",Qe="[object Uint16Array]",Tt="[object Uint32Array]",Xt=/\b__p \+= '';/g,$t=/\b(__p \+=) '' \+/g,bn=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Gn=/&(?:amp|lt|gt|quot|#39);/g,Jn=/[&<>"']/g,Do=RegExp(Gn.source),oo=RegExp(Jn.source),Bi=/<%-([\s\S]+?)%>/g,Ls=/<%([\s\S]+?)%>/g,tn=/<%=([\s\S]+?)%>/g,li=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,nm=/^\w*$/,Vd=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Mu=/[\\^$.*+?()[\]{}|]/g,qp=RegExp(Mu.source),Kp=/^\s+/,I0=/\s/,rm=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,j1=/\{\n\/\* \[wrapped with (.+)\] \*/,Yp=/,? & /,Go=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,io=/[()=,{}\[\]\/\s]/,ql=/\\(\\)?/g,Ue=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Fe=/\w*$/,It=/^[-+]0x[0-9a-f]+$/i,un=/^0b[01]+$/i,gn=/^\[object .+?Constructor\]$/,Vr=/^0o[0-7]+$/i,Zn=/^(?:0|[1-9]\d*)$/,Ua=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Ru=/($^)/,jH=/['\n\r\u2028\u2029\\]/g,om="\\ud800-\\udfff",B1="\\u0300-\\u036f",im="\\ufe20-\\ufe2f",am="\\u20d0-\\u20ff",sm=B1+im+am,Qp="\\u2700-\\u27bf",_n="a-z\\xdf-\\xf6\\xf8-\\xff",Fs="\\xac\\xb1\\xd7\\xf7",Fc="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Xp="\\u2000-\\u206f",fR=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",BH="A-Z\\xc0-\\xd6\\xd8-\\xde",zH="\\ufe0e\\ufe0f",VH=Fs+Fc+Xp+fR,pR="['’]",Xhe="["+om+"]",HH="["+VH+"]",z1="["+sm+"]",UH="\\d+",Jhe="["+Qp+"]",WH="["+_n+"]",GH="[^"+om+VH+UH+Qp+_n+BH+"]",hR="\\ud83c[\\udffb-\\udfff]",Zhe="(?:"+z1+"|"+hR+")",qH="[^"+om+"]",gR="(?:\\ud83c[\\udde6-\\uddff]){2}",mR="[\\ud800-\\udbff][\\udc00-\\udfff]",lm="["+BH+"]",KH="\\u200d",YH="(?:"+WH+"|"+GH+")",ege="(?:"+lm+"|"+GH+")",QH="(?:"+pR+"(?:d|ll|m|re|s|t|ve))?",XH="(?:"+pR+"(?:D|LL|M|RE|S|T|VE))?",JH=Zhe+"?",ZH="["+zH+"]?",tge="(?:"+KH+"(?:"+[qH,gR,mR].join("|")+")"+ZH+JH+")*",nge="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",rge="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",eU=ZH+JH+tge,oge="(?:"+[Jhe,gR,mR].join("|")+")"+eU,ige="(?:"+[qH+z1+"?",z1,gR,mR,Xhe].join("|")+")",age=RegExp(pR,"g"),sge=RegExp(z1,"g"),yR=RegExp(hR+"(?="+hR+")|"+ige+eU,"g"),lge=RegExp([lm+"?"+WH+"+"+QH+"(?="+[HH,lm,"$"].join("|")+")",ege+"+"+XH+"(?="+[HH,lm+YH,"$"].join("|")+")",lm+"?"+YH+"+"+QH,lm+"+"+XH,rge,nge,UH,oge].join("|"),"g"),cge=RegExp("["+KH+om+sm+zH+"]"),uge=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,dge=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],fge=-1,$r={};$r[gt]=$r[st]=$r[et]=$r[Et]=$r[An]=$r[Ke]=$r[$e]=$r[Qe]=$r[Tt]=!0,$r[Q]=$r[te]=$r[He]=$r[ae]=$r[Xe]=$r[se]=$r[fe]=$r[Z]=$r[ge]=$r[we]=$r[Se]=$r[De]=$r[_e]=$r[ye]=$r[Me]=!1;var Pr={};Pr[Q]=Pr[te]=Pr[He]=Pr[Xe]=Pr[ae]=Pr[se]=Pr[gt]=Pr[st]=Pr[et]=Pr[Et]=Pr[An]=Pr[ge]=Pr[we]=Pr[Se]=Pr[De]=Pr[_e]=Pr[ye]=Pr[Pe]=Pr[Ke]=Pr[$e]=Pr[Qe]=Pr[Tt]=!0,Pr[fe]=Pr[Z]=Pr[Me]=!1;var pge={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},hge={"&":"&","<":"<",">":">",'"':""","'":"'"},gge={"&":"&","<":"<",">":">",""":'"',"'":"'"},mge={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},yge=parseFloat,vge=parseInt,tU=typeof ea=="object"&&ea&&ea.Object===Object&&ea,bge=typeof self=="object"&&self&&self.Object===Object&&self,ci=tU||bge||Function("return this")(),vR=t&&!t.nodeType&&t,Jp=vR&&!0&&e&&!e.nodeType&&e,nU=Jp&&Jp.exports===vR,bR=nU&&tU.process,js=function(){try{var Ee=Jp&&Jp.require&&Jp.require("util").types;return Ee||bR&&bR.binding&&bR.binding("util")}catch{}}(),rU=js&&js.isArrayBuffer,oU=js&&js.isDate,iU=js&&js.isMap,aU=js&&js.isRegExp,sU=js&&js.isSet,lU=js&&js.isTypedArray;function Wa(Ee,ze,Re){switch(Re.length){case 0:return Ee.call(ze);case 1:return Ee.call(ze,Re[0]);case 2:return Ee.call(ze,Re[0],Re[1]);case 3:return Ee.call(ze,Re[0],Re[1],Re[2])}return Ee.apply(ze,Re)}function wge(Ee,ze,Re,At){for(var sn=-1,er=Ee==null?0:Ee.length;++sn-1}function wR(Ee,ze,Re){for(var At=-1,sn=Ee==null?0:Ee.length;++At-1;);return Re}function mU(Ee,ze){for(var Re=Ee.length;Re--&&cm(ze,Ee[Re],0)>-1;);return Re}function Age(Ee,ze){for(var Re=Ee.length,At=0;Re--;)Ee[Re]===ze&&++At;return At}var kge=ER(pge),Mge=ER(hge);function Rge(Ee){return"\\"+mge[Ee]}function $ge(Ee,ze){return Ee==null?n:Ee[ze]}function um(Ee){return cge.test(Ee)}function Dge(Ee){return uge.test(Ee)}function _ge(Ee){for(var ze,Re=[];!(ze=Ee.next()).done;)Re.push(ze.value);return Re}function OR(Ee){var ze=-1,Re=Array(Ee.size);return Ee.forEach(function(At,sn){Re[++ze]=[sn,At]}),Re}function yU(Ee,ze){return function(Re){return Ee(ze(Re))}}function Wd(Ee,ze){for(var Re=-1,At=Ee.length,sn=0,er=[];++Re-1}function Sme(g,C){var M=this.__data__,H=iE(M,g);return H<0?(++this.size,M.push([g,C])):M[H][1]=C,this}$u.prototype.clear=vme,$u.prototype.delete=bme,$u.prototype.get=wme,$u.prototype.has=xme,$u.prototype.set=Sme;function Du(g){var C=-1,M=g==null?0:g.length;for(this.clear();++C=C?g:C)),g}function Hs(g,C,M,H,q,ne){var he,ve=C&d,Te=C&f,Ge=C&p;if(M&&(he=q?M(g,H,q,ne):M(g)),he!==n)return he;if(!Kr(g))return g;var qe=dn(g);if(qe){if(he=Tye(g),!ve)return ha(g,he)}else{var Ze=Ei(g),yt=Ze==Z||Ze==ce;if(Xd(g))return ZU(g,ve);if(Ze==Se||Ze==Q||yt&&!q){if(he=Te||yt?{}:v3(g),!ve)return Te?gye(g,Fme(he,g)):hye(g,AU(he,g))}else{if(!Pr[Ze])return q?g:{};he=Iye(g,Ze,ve)}}ne||(ne=new Yl);var Ft=ne.get(g);if(Ft)return Ft;ne.set(g,he),q3(g)?g.forEach(function(Qt){he.add(Hs(Qt,C,M,Qt,g,ne))}):W3(g)&&g.forEach(function(Qt,Rn){he.set(Rn,Hs(Qt,C,M,Rn,g,ne))});var Yt=Ge?Te?e$:ZR:Te?ma:qo,wn=qe?n:Yt(g);return Bs(wn||g,function(Qt,Rn){wn&&(Rn=Qt,Qt=g[Rn]),D0(he,Rn,Hs(Qt,C,M,Rn,g,ne))}),he}function jme(g){var C=qo(g);return function(M){return kU(M,g,C)}}function kU(g,C,M){var H=M.length;if(g==null)return!H;for(g=wr(g);H--;){var q=M[H],ne=C[q],he=g[q];if(he===n&&!(q in g)||!ne(he))return!1}return!0}function MU(g,C,M){if(typeof g!="function")throw new zs(a);return z0(function(){g.apply(n,M)},C)}function _0(g,C,M,H){var q=-1,ne=V1,he=!0,ve=g.length,Te=[],Ge=C.length;if(!ve)return Te;M&&(C=Hr(C,Ga(M))),H?(ne=wR,he=!1):C.length>=o&&(ne=O0,he=!1,C=new th(C));e:for(;++qq?0:q+M),H=H===n||H>q?q:mn(H),H<0&&(H+=q),H=M>H?0:Y3(H);M0&&M(ve)?C>1?ui(ve,C-1,M,H,q):Ud(q,ve):H||(q[q.length]=ve)}return q}var _R=i3(),DU=i3(!0);function jc(g,C){return g&&_R(g,C,qo)}function NR(g,C){return g&&DU(g,C,qo)}function sE(g,C){return Hd(C,function(M){return ju(g[M])})}function rh(g,C){C=Yd(C,g);for(var M=0,H=C.length;g!=null&&MC}function Vme(g,C){return g!=null&&fr.call(g,C)}function Hme(g,C){return g!=null&&C in wr(g)}function Ume(g,C,M){return g>=Ci(C,M)&&g=120&&qe.length>=120)?new th(he&&qe):n}qe=g[0];var Ze=-1,yt=ve[0];e:for(;++Ze-1;)ve!==g&&J1.call(ve,Te,1),J1.call(g,Te,1);return g}function WU(g,C){for(var M=g?C.length:0,H=M-1;M--;){var q=C[M];if(M==H||q!==ne){var ne=q;Fu(q)?J1.call(g,q,1):GR(g,q)}}return g}function HR(g,C){return g+tE(PU()*(C-g+1))}function rye(g,C,M,H){for(var q=-1,ne=No(eE((C-g)/(M||1)),0),he=Re(ne);ne--;)he[H?ne:++q]=g,g+=M;return he}function UR(g,C){var M="";if(!g||C<1||C>F)return M;do C%2&&(M+=g),C=tE(C/2),C&&(g+=g);while(C);return M}function Pn(g,C){return s$(x3(g,C,ya),g+"")}function oye(g){return OU(xm(g))}function iye(g,C){var M=xm(g);return vE(M,nh(C,0,M.length))}function F0(g,C,M,H){if(!Kr(g))return g;C=Yd(C,g);for(var q=-1,ne=C.length,he=ne-1,ve=g;ve!=null&&++qq?0:q+C),M=M>q?q:M,M<0&&(M+=q),q=C>M?0:M-C>>>0,C>>>=0;for(var ne=Re(q);++H>>1,he=g[ne];he!==null&&!Ka(he)&&(M?he<=C:he=o){var Ge=C?null:bye(g);if(Ge)return U1(Ge);he=!1,q=O0,Te=new th}else Te=C?[]:ve;e:for(;++H=H?g:Us(g,C,M)}var JU=Qge||function(g){return ci.clearTimeout(g)};function ZU(g,C){if(C)return g.slice();var M=g.length,H=wU?wU(M):new g.constructor(M);return g.copy(H),H}function QR(g){var C=new g.constructor(g.byteLength);return new Q1(C).set(new Q1(g)),C}function uye(g,C){var M=C?QR(g.buffer):g.buffer;return new g.constructor(M,g.byteOffset,g.byteLength)}function dye(g){var C=new g.constructor(g.source,Fe.exec(g));return C.lastIndex=g.lastIndex,C}function fye(g){return $0?wr($0.call(g)):{}}function e3(g,C){var M=C?QR(g.buffer):g.buffer;return new g.constructor(M,g.byteOffset,g.length)}function t3(g,C){if(g!==C){var M=g!==n,H=g===null,q=g===g,ne=Ka(g),he=C!==n,ve=C===null,Te=C===C,Ge=Ka(C);if(!ve&&!Ge&&!ne&&g>C||ne&&he&&Te&&!ve&&!Ge||H&&he&&Te||!M&&Te||!q)return 1;if(!H&&!ne&&!Ge&&g=ve)return Te;var Ge=M[H];return Te*(Ge=="desc"?-1:1)}}return g.index-C.index}function n3(g,C,M,H){for(var q=-1,ne=g.length,he=M.length,ve=-1,Te=C.length,Ge=No(ne-he,0),qe=Re(Te+Ge),Ze=!H;++ve1?M[q-1]:n,he=q>2?M[2]:n;for(ne=g.length>3&&typeof ne=="function"?(q--,ne):n,he&&Vi(M[0],M[1],he)&&(ne=q<3?n:ne,q=1),C=wr(C);++H-1?q[ne?C[he]:he]:n}}function l3(g){return Lu(function(C){var M=C.length,H=M,q=Vs.prototype.thru;for(g&&C.reverse();H--;){var ne=C[H];if(typeof ne!="function")throw new zs(a);if(q&&!he&&mE(ne)=="wrapper")var he=new Vs([],!0)}for(H=he?H:M;++H1&&Ln.reverse(),qe&&Teve))return!1;var Ge=ne.get(g),qe=ne.get(C);if(Ge&&qe)return Ge==C&&qe==g;var Ze=-1,yt=!0,Ft=M&m?new th:n;for(ne.set(g,C),ne.set(C,g);++Ze1?"& ":"")+C[H],C=C.join(M>2?", ":" "),g.replace(rm,`{ +/* [wrapped with `+C+`] */ +`)}function Aye(g){return dn(g)||ah(g)||!!(CU&&g&&g[CU])}function Fu(g,C){var M=typeof g;return C=C??F,!!C&&(M=="number"||M!="symbol"&&Zn.test(g))&&g>-1&&g%1==0&&g0){if(++C>=N)return arguments[0]}else C=0;return g.apply(n,arguments)}}function vE(g,C){var M=-1,H=g.length,q=H-1;for(C=C===n?H:C;++M1?g[C-1]:n;return M=typeof M=="function"?(g.pop(),M):n,$3(g,M)});function D3(g){var C=J(g);return C.__chain__=!0,C}function Bve(g,C){return C(g),g}function bE(g,C){return C(g)}var zve=Lu(function(g){var C=g.length,M=C?g[0]:0,H=this.__wrapped__,q=function(ne){return DR(ne,g)};return C>1||this.__actions__.length||!(H instanceof Nn)||!Fu(M)?this.thru(q):(H=H.slice(M,+M+(C?1:0)),H.__actions__.push({func:bE,args:[q],thisArg:n}),new Vs(H,this.__chain__).thru(function(ne){return C&&!ne.length&&ne.push(n),ne}))});function Vve(){return D3(this)}function Hve(){return new Vs(this.value(),this.__chain__)}function Uve(){this.__values__===n&&(this.__values__=K3(this.value()));var g=this.__index__>=this.__values__.length,C=g?n:this.__values__[this.__index__++];return{done:g,value:C}}function Wve(){return this}function Gve(g){for(var C,M=this;M instanceof oE;){var H=I3(M);H.__index__=0,H.__values__=n,C?q.__wrapped__=H:C=H;var q=H;M=M.__wrapped__}return q.__wrapped__=g,C}function qve(){var g=this.__wrapped__;if(g instanceof Nn){var C=g;return this.__actions__.length&&(C=new Nn(this)),C=C.reverse(),C.__actions__.push({func:bE,args:[l$],thisArg:n}),new Vs(C,this.__chain__)}return this.thru(l$)}function Kve(){return QU(this.__wrapped__,this.__actions__)}var Yve=dE(function(g,C,M){fr.call(g,M)?++g[M]:_u(g,M,1)});function Qve(g,C,M){var H=dn(g)?cU:Bme;return M&&Vi(g,C,M)&&(C=n),H(g,Gt(C,3))}function Xve(g,C){var M=dn(g)?Hd:$U;return M(g,Gt(C,3))}var Jve=s3(O3),Zve=s3(A3);function ebe(g,C){return ui(wE(g,C),1)}function tbe(g,C){return ui(wE(g,C),z)}function nbe(g,C,M){return M=M===n?1:mn(M),ui(wE(g,C),M)}function _3(g,C){var M=dn(g)?Bs:qd;return M(g,Gt(C,3))}function N3(g,C){var M=dn(g)?xge:RU;return M(g,Gt(C,3))}var rbe=dE(function(g,C,M){fr.call(g,M)?g[M].push(C):_u(g,M,[C])});function obe(g,C,M,H){g=ga(g)?g:xm(g),M=M&&!H?mn(M):0;var q=g.length;return M<0&&(M=No(q+M,0)),PE(g)?M<=q&&g.indexOf(C,M)>-1:!!q&&cm(g,C,M)>-1}var ibe=Pn(function(g,C,M){var H=-1,q=typeof C=="function",ne=ga(g)?Re(g.length):[];return qd(g,function(he){ne[++H]=q?Wa(C,he,M):N0(he,C,M)}),ne}),abe=dE(function(g,C,M){_u(g,M,C)});function wE(g,C){var M=dn(g)?Hr:jU;return M(g,Gt(C,3))}function sbe(g,C,M,H){return g==null?[]:(dn(C)||(C=C==null?[]:[C]),M=H?n:M,dn(M)||(M=M==null?[]:[M]),HU(g,C,M))}var lbe=dE(function(g,C,M){g[M?0:1].push(C)},function(){return[[],[]]});function cbe(g,C,M){var H=dn(g)?xR:pU,q=arguments.length<3;return H(g,Gt(C,4),M,q,qd)}function ube(g,C,M){var H=dn(g)?Sge:pU,q=arguments.length<3;return H(g,Gt(C,4),M,q,RU)}function dbe(g,C){var M=dn(g)?Hd:$U;return M(g,CE(Gt(C,3)))}function fbe(g){var C=dn(g)?OU:oye;return C(g)}function pbe(g,C,M){(M?Vi(g,C,M):C===n)?C=1:C=mn(C);var H=dn(g)?_me:iye;return H(g,C)}function hbe(g){var C=dn(g)?Nme:sye;return C(g)}function gbe(g){if(g==null)return 0;if(ga(g))return PE(g)?dm(g):g.length;var C=Ei(g);return C==ge||C==_e?g.size:BR(g).length}function mbe(g,C,M){var H=dn(g)?SR:lye;return M&&Vi(g,C,M)&&(C=n),H(g,Gt(C,3))}var ybe=Pn(function(g,C){if(g==null)return[];var M=C.length;return M>1&&Vi(g,C[0],C[1])?C=[]:M>2&&Vi(C[0],C[1],C[2])&&(C=[C[0]]),HU(g,ui(C,1),[])}),xE=Xge||function(){return ci.Date.now()};function vbe(g,C){if(typeof C!="function")throw new zs(a);return g=mn(g),function(){if(--g<1)return C.apply(this,arguments)}}function L3(g,C,M){return C=M?n:C,C=g&&C==null?g.length:C,Nu(g,I,n,n,n,n,C)}function F3(g,C){var M;if(typeof C!="function")throw new zs(a);return g=mn(g),function(){return--g>0&&(M=C.apply(this,arguments)),g<=1&&(C=n),M}}var u$=Pn(function(g,C,M){var H=y;if(M.length){var q=Wd(M,bm(u$));H|=P}return Nu(g,H,C,M,q)}),j3=Pn(function(g,C,M){var H=y|w;if(M.length){var q=Wd(M,bm(j3));H|=P}return Nu(C,H,g,M,q)});function B3(g,C,M){C=M?n:C;var H=Nu(g,S,n,n,n,n,n,C);return H.placeholder=B3.placeholder,H}function z3(g,C,M){C=M?n:C;var H=Nu(g,E,n,n,n,n,n,C);return H.placeholder=z3.placeholder,H}function V3(g,C,M){var H,q,ne,he,ve,Te,Ge=0,qe=!1,Ze=!1,yt=!0;if(typeof g!="function")throw new zs(a);C=Gs(C)||0,Kr(M)&&(qe=!!M.leading,Ze="maxWait"in M,ne=Ze?No(Gs(M.maxWait)||0,C):ne,yt="trailing"in M?!!M.trailing:yt);function Ft(vo){var Xl=H,zu=q;return H=q=n,Ge=vo,he=g.apply(zu,Xl),he}function Yt(vo){return Ge=vo,ve=z0(Rn,C),qe?Ft(vo):he}function wn(vo){var Xl=vo-Te,zu=vo-Ge,s4=C-Xl;return Ze?Ci(s4,ne-zu):s4}function Qt(vo){var Xl=vo-Te,zu=vo-Ge;return Te===n||Xl>=C||Xl<0||Ze&&zu>=ne}function Rn(){var vo=xE();if(Qt(vo))return Ln(vo);ve=z0(Rn,wn(vo))}function Ln(vo){return ve=n,yt&&H?Ft(vo):(H=q=n,he)}function Ya(){ve!==n&&JU(ve),Ge=0,H=Te=q=ve=n}function Hi(){return ve===n?he:Ln(xE())}function Qa(){var vo=xE(),Xl=Qt(vo);if(H=arguments,q=this,Te=vo,Xl){if(ve===n)return Yt(Te);if(Ze)return JU(ve),ve=z0(Rn,C),Ft(Te)}return ve===n&&(ve=z0(Rn,C)),he}return Qa.cancel=Ya,Qa.flush=Hi,Qa}var bbe=Pn(function(g,C){return MU(g,1,C)}),wbe=Pn(function(g,C,M){return MU(g,Gs(C)||0,M)});function xbe(g){return Nu(g,k)}function SE(g,C){if(typeof g!="function"||C!=null&&typeof C!="function")throw new zs(a);var M=function(){var H=arguments,q=C?C.apply(this,H):H[0],ne=M.cache;if(ne.has(q))return ne.get(q);var he=g.apply(this,H);return M.cache=ne.set(q,he)||ne,he};return M.cache=new(SE.Cache||Du),M}SE.Cache=Du;function CE(g){if(typeof g!="function")throw new zs(a);return function(){var C=arguments;switch(C.length){case 0:return!g.call(this);case 1:return!g.call(this,C[0]);case 2:return!g.call(this,C[0],C[1]);case 3:return!g.call(this,C[0],C[1],C[2])}return!g.apply(this,C)}}function Sbe(g){return F3(2,g)}var Cbe=cye(function(g,C){C=C.length==1&&dn(C[0])?Hr(C[0],Ga(Gt())):Hr(ui(C,1),Ga(Gt()));var M=C.length;return Pn(function(H){for(var q=-1,ne=Ci(H.length,M);++q=C}),ah=NU(function(){return arguments}())?NU:function(g){return ao(g)&&fr.call(g,"callee")&&!SU.call(g,"callee")},dn=Re.isArray,Fbe=rU?Ga(rU):Gme;function ga(g){return g!=null&&EE(g.length)&&!ju(g)}function yo(g){return ao(g)&&ga(g)}function jbe(g){return g===!0||g===!1||ao(g)&&zi(g)==ae}var Xd=Zge||S$,Bbe=oU?Ga(oU):qme;function zbe(g){return ao(g)&&g.nodeType===1&&!V0(g)}function Vbe(g){if(g==null)return!0;if(ga(g)&&(dn(g)||typeof g=="string"||typeof g.splice=="function"||Xd(g)||wm(g)||ah(g)))return!g.length;var C=Ei(g);if(C==ge||C==_e)return!g.size;if(B0(g))return!BR(g).length;for(var M in g)if(fr.call(g,M))return!1;return!0}function Hbe(g,C){return L0(g,C)}function Ube(g,C,M){M=typeof M=="function"?M:n;var H=M?M(g,C):n;return H===n?L0(g,C,n,M):!!H}function f$(g){if(!ao(g))return!1;var C=zi(g);return C==fe||C==oe||typeof g.message=="string"&&typeof g.name=="string"&&!V0(g)}function Wbe(g){return typeof g=="number"&&EU(g)}function ju(g){if(!Kr(g))return!1;var C=zi(g);return C==Z||C==ce||C==pe||C==ke}function U3(g){return typeof g=="number"&&g==mn(g)}function EE(g){return typeof g=="number"&&g>-1&&g%1==0&&g<=F}function Kr(g){var C=typeof g;return g!=null&&(C=="object"||C=="function")}function ao(g){return g!=null&&typeof g=="object"}var W3=iU?Ga(iU):Yme;function Gbe(g,C){return g===C||jR(g,C,n$(C))}function qbe(g,C,M){return M=typeof M=="function"?M:n,jR(g,C,n$(C),M)}function Kbe(g){return G3(g)&&g!=+g}function Ybe(g){if(Rye(g))throw new sn(i);return LU(g)}function Qbe(g){return g===null}function Xbe(g){return g==null}function G3(g){return typeof g=="number"||ao(g)&&zi(g)==we}function V0(g){if(!ao(g)||zi(g)!=Se)return!1;var C=X1(g);if(C===null)return!0;var M=fr.call(C,"constructor")&&C.constructor;return typeof M=="function"&&M instanceof M&&q1.call(M)==qge}var p$=aU?Ga(aU):Qme;function Jbe(g){return U3(g)&&g>=-F&&g<=F}var q3=sU?Ga(sU):Xme;function PE(g){return typeof g=="string"||!dn(g)&&ao(g)&&zi(g)==ye}function Ka(g){return typeof g=="symbol"||ao(g)&&zi(g)==Pe}var wm=lU?Ga(lU):Jme;function Zbe(g){return g===n}function e0e(g){return ao(g)&&Ei(g)==Me}function t0e(g){return ao(g)&&zi(g)==We}var n0e=gE(zR),r0e=gE(function(g,C){return g<=C});function K3(g){if(!g)return[];if(ga(g))return PE(g)?Kl(g):ha(g);if(A0&&g[A0])return _ge(g[A0]());var C=Ei(g),M=C==ge?OR:C==_e?U1:xm;return M(g)}function Bu(g){if(!g)return g===0?g:0;if(g=Gs(g),g===z||g===-z){var C=g<0?-1:1;return C*V}return g===g?g:0}function mn(g){var C=Bu(g),M=C%1;return C===C?M?C-M:C:0}function Y3(g){return g?nh(mn(g),0,K):0}function Gs(g){if(typeof g=="number")return g;if(Ka(g))return U;if(Kr(g)){var C=typeof g.valueOf=="function"?g.valueOf():g;g=Kr(C)?C+"":C}if(typeof g!="string")return g===0?g:+g;g=hU(g);var M=un.test(g);return M||Vr.test(g)?vge(g.slice(2),M?2:8):It.test(g)?U:+g}function Q3(g){return Bc(g,ma(g))}function o0e(g){return g?nh(mn(g),-F,F):g===0?g:0}function ir(g){return g==null?"":qa(g)}var i0e=ym(function(g,C){if(B0(C)||ga(C)){Bc(C,qo(C),g);return}for(var M in C)fr.call(C,M)&&D0(g,M,C[M])}),X3=ym(function(g,C){Bc(C,ma(C),g)}),TE=ym(function(g,C,M,H){Bc(C,ma(C),g,H)}),a0e=ym(function(g,C,M,H){Bc(C,qo(C),g,H)}),s0e=Lu(DR);function l0e(g,C){var M=mm(g);return C==null?M:AU(M,C)}var c0e=Pn(function(g,C){g=wr(g);var M=-1,H=C.length,q=H>2?C[2]:n;for(q&&Vi(C[0],C[1],q)&&(H=1);++M1),ne}),Bc(g,e$(g),M),H&&(M=Hs(M,d|f|p,wye));for(var q=C.length;q--;)GR(M,C[q]);return M});function I0e(g,C){return Z3(g,CE(Gt(C)))}var O0e=Lu(function(g,C){return g==null?{}:tye(g,C)});function Z3(g,C){if(g==null)return{};var M=Hr(e$(g),function(H){return[H]});return C=Gt(C),UU(g,M,function(H,q){return C(H,q[0])})}function A0e(g,C,M){C=Yd(C,g);var H=-1,q=C.length;for(q||(q=1,g=n);++HC){var H=g;g=C,C=H}if(M||g%1||C%1){var q=PU();return Ci(g+q*(C-g+yge("1e-"+((q+"").length-1))),C)}return HR(g,C)}var B0e=vm(function(g,C,M){return C=C.toLowerCase(),g+(M?n4(C):C)});function n4(g){return m$(ir(g).toLowerCase())}function r4(g){return g=ir(g),g&&g.replace(Ua,kge).replace(sge,"")}function z0e(g,C,M){g=ir(g),C=qa(C);var H=g.length;M=M===n?H:nh(mn(M),0,H);var q=M;return M-=C.length,M>=0&&g.slice(M,q)==C}function V0e(g){return g=ir(g),g&&oo.test(g)?g.replace(Jn,Mge):g}function H0e(g){return g=ir(g),g&&qp.test(g)?g.replace(Mu,"\\$&"):g}var U0e=vm(function(g,C,M){return g+(M?"-":"")+C.toLowerCase()}),W0e=vm(function(g,C,M){return g+(M?" ":"")+C.toLowerCase()}),G0e=a3("toLowerCase");function q0e(g,C,M){g=ir(g),C=mn(C);var H=C?dm(g):0;if(!C||H>=C)return g;var q=(C-H)/2;return hE(tE(q),M)+g+hE(eE(q),M)}function K0e(g,C,M){g=ir(g),C=mn(C);var H=C?dm(g):0;return C&&H>>0,M?(g=ir(g),g&&(typeof C=="string"||C!=null&&!p$(C))&&(C=qa(C),!C&&um(g))?Qd(Kl(g),0,M):g.split(C,M)):[]}var twe=vm(function(g,C,M){return g+(M?" ":"")+m$(C)});function nwe(g,C,M){return g=ir(g),M=M==null?0:nh(mn(M),0,g.length),C=qa(C),g.slice(M,M+C.length)==C}function rwe(g,C,M){var H=J.templateSettings;M&&Vi(g,C,M)&&(C=n),g=ir(g),C=TE({},C,H,p3);var q=TE({},C.imports,H.imports,p3),ne=qo(q),he=IR(q,ne),ve,Te,Ge=0,qe=C.interpolate||Ru,Ze="__p += '",yt=AR((C.escape||Ru).source+"|"+qe.source+"|"+(qe===tn?Ue:Ru).source+"|"+(C.evaluate||Ru).source+"|$","g"),Ft="//# sourceURL="+(fr.call(C,"sourceURL")?(C.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++fge+"]")+` +`;g.replace(yt,function(Qt,Rn,Ln,Ya,Hi,Qa){return Ln||(Ln=Ya),Ze+=g.slice(Ge,Qa).replace(jH,Rge),Rn&&(ve=!0,Ze+=`' + +__e(`+Rn+`) + '`),Hi&&(Te=!0,Ze+=`'; `+Hi+`; -__p += '`),Nn&&(Ze+=`' + -((__t = (`+Nn+`)) == null ? '' : __t) + -'`),Ge=Ka+Qt.length,Qt}),Ze+=`'; -`;var Yt=fr.call(S,"variable")&&S.variable;if(!Yt)Ze=`with (obj) { +__p += '`),Ln&&(Ze+=`' + +((__t = (`+Ln+`)) == null ? '' : __t) + +'`),Ge=Qa+Qt.length,Qt}),Ze+=`'; +`;var Yt=fr.call(C,"variable")&&C.variable;if(!Yt)Ze=`with (obj) { `+Ze+` } -`;else if(ro.test(Yt))throw new sn(s);Ze=(Te?Ze.replace(Xt,""):Ze).replace($t,"$1").replace(bn,"$1;"),Ze="function("+(Yt||"obj")+`) { +`;else if(io.test(Yt))throw new sn(s);Ze=(Te?Ze.replace(Xt,""):Ze).replace($t,"$1").replace(bn,"$1;"),Ze="function("+(Yt||"obj")+`) { `+(Yt?"":`obj || (obj = {}); `)+"var __t, __p = ''"+(ve?", __e = _.escape":"")+(Te?`, __j = Array.prototype.join; function print() { __p += __j.call(arguments, '') } `:`; `)+Ze+`return __p -}`;var wn=t4(function(){return er(ne,Nt+"return "+Ze).apply(n,he)});if(wn.source=Ze,a$(wn))throw wn;return wn}function Y0e(g){return ir(g).toLowerCase()}function Q0e(g){return ir(g).toUpperCase()}function X0e(g,S,M){if(g=ir(g),g&&(M||S===n))return uU(g);if(!g||!(S=Wa(S)))return g;var H=Gl(g),G=Gl(S),ne=dU(H,G),he=fU(H,G)+1;return Yd(H,ne,he).join("")}function J0e(g,S,M){if(g=ir(g),g&&(M||S===n))return g.slice(0,hU(g)+1);if(!g||!(S=Wa(S)))return g;var H=Gl(g),G=fU(H,Gl(S))+1;return Yd(H,0,G).join("")}function Z0e(g,S,M){if(g=ir(g),g&&(M||S===n))return g.replace(qp,"");if(!g||!(S=Wa(S)))return g;var H=Gl(g),G=dU(H,Gl(S));return Yd(H,G).join("")}function ewe(g,S){var M=O,H=$;if(Kr(S)){var G="separator"in S?S.separator:G;M="length"in S?mn(S.length):M,H="omission"in S?Wa(S.omission):H}g=ir(g);var ne=g.length;if(cm(g)){var he=Gl(g);ne=he.length}if(M>=ne)return g;var ve=M-um(H);if(ve<1)return H;var Te=he?Yd(he,0,ve).join(""):g.slice(0,ve);if(G===n)return Te+H;if(he&&(ve+=Te.length-ve),s$(G)){if(g.slice(ve).search(G)){var Ge,qe=Te;for(G.global||(G=CR(G.source,ir(Fe.exec(G))+"g")),G.lastIndex=0;Ge=G.exec(qe);)var Ze=Ge.index;Te=Te.slice(0,Ze===n?ve:Ze)}}else if(g.indexOf(Wa(G),ve)!=ve){var mt=Te.lastIndexOf(G);mt>-1&&(Te=Te.slice(0,mt))}return Te+H}function twe(g){return g=ir(g),g&&Do.test(g)?g.replace(Gn,kge):g}var nwe=ym(function(g,S,M){return g+(M?" ":"")+S.toUpperCase()}),u$=n3("toUpperCase");function e4(g,S,M){return g=ir(g),S=M?n:S,S===n?Pge(g)?$ge(g):mge(g):g.match(S)||[]}var t4=Pn(function(g,S){try{return Ha(g,n,S)}catch(M){return a$(M)?M:new sn(M)}}),rwe=Nu(function(g,S){return Ls(S,function(M){M=jc(M),Du(g,M,o$(g[M],g))}),g});function owe(g){var S=g==null?0:g.length,M=Gt();return g=S?Hr(g,function(H){if(typeof H[1]!="function")throw new Fs(a);return[M(H[0]),H[1]]}):[],Pn(function(H){for(var G=-1;++GF)return[];var M=q,H=Si(g,q);S=Gt(S),g-=q;for(var G=wR(H,S);++M0||S<0)?new Dn(M):(g<0?M=M.takeRight(-g):g&&(M=M.drop(g)),S!==n&&(S=mn(S),M=S<0?M.dropRight(-S):M.take(S-g)),M)},Dn.prototype.takeRightWhile=function(g){return this.reverse().takeWhile(g).reverse()},Dn.prototype.toArray=function(){return this.take(q)},Lc(Dn.prototype,function(g,S){var M=/^(?:filter|find|map|reject)|While$/.test(S),H=/^(?:head|last)$/.test(S),G=J[H?"take"+(S=="last"?"Right":""):S],ne=H||/^find/.test(S);G&&(J.prototype[S]=function(){var he=this.__wrapped__,ve=H?[1]:arguments,Te=he instanceof Dn,Ge=ve[0],qe=Te||dn(he),Ze=function(kn){var Nn=G.apply(J,Hd([kn],ve));return H&&mt?Nn[0]:Nn};qe&&M&&typeof Ge=="function"&&Ge.length!=1&&(Te=qe=!1);var mt=this.__chain__,Nt=!!this.__actions__.length,Yt=ne&&!mt,wn=Te&&!Nt;if(!ne&&qe){he=wn?he:new Dn(this);var Qt=g.apply(he,ve);return Qt.__actions__.push({func:lE,args:[Ze],thisArg:n}),new js(Qt,mt)}return Yt&&wn?g.apply(this,ve):(Qt=this.thru(Ze),Yt?H?Qt.value()[0]:Qt.value():Qt)})}),Ls(["pop","push","shift","sort","splice","unshift"],function(g){var S=D1[g],M=/^(?:push|sort|unshift)$/.test(g)?"tap":"thru",H=/^(?:pop|shift)$/.test(g);J.prototype[g]=function(){var G=arguments;if(H&&!this.__chain__){var ne=this.value();return S.apply(dn(ne)?ne:[],G)}return this[M](function(he){return S.apply(dn(he)?he:[],G)})}}),Lc(Dn.prototype,function(g,S){var M=J[S];if(M){var H=M.name+"";fr.call(hm,H)||(hm[H]=[]),hm[H].push({name:S,func:M})}}),hm[tE(n,w).name]=[{name:"wrapper",func:n}],Dn.prototype.clone=tme,Dn.prototype.reverse=nme,Dn.prototype.value=rme,J.prototype.at=Rve,J.prototype.chain=$ve,J.prototype.commit=Dve,J.prototype.next=_ve,J.prototype.plant=Lve,J.prototype.reverse=Fve,J.prototype.toJSON=J.prototype.valueOf=J.prototype.value=jve,J.prototype.first=J.prototype.head,P0&&(J.prototype[P0]=Nve),J},dm=Dge();Xp?((Xp.exports=dm)._=dm,fR._=dm):si._=dm}).call(ea)})(IO,IO.exports);var gTt=IO.exports;const jH=ct(R.jsx("path",{d:"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2"}),"MoreVert"),mTt=ct(R.jsx("path",{d:"M18.4 10.6C16.55 8.99 14.15 8 11.5 8c-4.65 0-8.58 3.03-9.96 7.22L3.9 16c1.05-3.19 4.05-5.5 7.6-5.5 1.95 0 3.73.72 5.12 1.88L13 16h9V7z"}),"Redo"),yTt=ct(R.jsx("path",{d:"m7 10 5 5 5-5z"}),"ArrowDropDown"),vTt=ct(R.jsx("path",{d:"M6.23 20.23 8 22l10-10L8 2 6.23 3.77 14.46 12z"}),"ArrowForwardIos"),bTt=ct(R.jsx("path",{d:"m19 8-4 4h3c0 3.31-2.69 6-6 6-1.01 0-1.97-.25-2.8-.7l-1.46 1.46C8.97 19.54 10.43 20 12 20c4.42 0 8-3.58 8-8h3zM6 12c0-3.31 2.69-6 6-6 1.01 0 1.97.25 2.8.7l1.46-1.46C15.03 4.46 13.57 4 12 4c-4.42 0-8 3.58-8 8H1l4 4 4-4z"}),"Cached"),wTt=ct([R.jsx("circle",{cx:"12",cy:"12",r:"3.2"},"0"),R.jsx("path",{d:"M9 2 7.17 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2h-3.17L15 2zm3 15c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5"},"1")],"CameraAlt"),Rde=ct(R.jsx("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"ChevronRight"),xTt=ct(R.jsx("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Clear"),STt=ct(R.jsx("path",{d:"M22 16V4c0-1.1-.9-2-2-2H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2m-11-4 2.03 2.71L16 11l4 5H8zM2 6v14c0 1.1.9 2 2 2h14v-2H4V6z"}),"Collections"),CTt=ct(R.jsx("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2m0 16H8V7h11z"}),"ContentCopy"),g1=ct(R.jsx("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM19 4h-3.5l-1-1h-5l-1 1H5v2h14z"}),"Delete"),ETt=ct(R.jsx("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM8 9h8v10H8zm7.5-5-1-1h-5l-1 1H5v2h14V4z"}),"DeleteOutline"),$de=ct(R.jsx("path",{d:"M16 9v10H8V9zm-1.5-6h-5l-1 1H5v2h14V4h-3.5zM18 7H6v12c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2z"}),"DeleteOutlined"),PTt=ct(R.jsx("path",{d:"M20 9H4v2h16zM4 15h16v-2H4z"}),"DragHandle"),NM=ct(R.jsx("path",{d:"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.996.996 0 0 0-1.41 0l-1.83 1.83 3.75 3.75z"}),"Edit"),Dde=ct(R.jsx("path",{d:"m12.126 8.125 1.937-1.937 3.747 3.747-1.937 1.938zM20.71 5.63l-2.34-2.34a1 1 0 0 0-1.41 0l-1.83 1.83 3.75 3.75L20.71 7a1 1 0 0 0 0-1.37M2 5l6.63 6.63L3 17.25V21h3.75l5.63-5.62L18 21l2-2L4 3z"}),"EditOff"),TTt=ct(R.jsx("path",{d:"M4.25 5.61C6.27 8.2 10 13 10 13v6c0 .55.45 1 1 1h2c.55 0 1-.45 1-1v-6s3.72-4.8 5.74-7.39c.51-.66.04-1.61-.79-1.61H5.04c-.83 0-1.3.95-.79 1.61"}),"FilterAlt"),ITt=ct(R.jsx("path",{d:"M7 13c1.66 0 3-1.34 3-3S8.66 7 7 7s-3 1.34-3 3 1.34 3 3 3m12-6h-8v7H3V5H1v15h2v-3h18v3h2v-9c0-2.21-1.79-4-4-4"}),"Hotel"),_de=ct(R.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 15h-2v-6h2zm0-8h-2V7h2z"}),"Info"),Nde=ct(R.jsx("path",{d:"M11 7h2v2h-2zm0 4h2v6h-2zm1-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8"}),"InfoOutlined"),OTt=ct(R.jsx("path",{d:"m14 6-3.75 5 2.85 3.8-1.6 1.2C9.81 13.75 7 10 7 10l-6 8h22z"}),"Landscape"),ATt=ct(R.jsx("path",{d:"m14 6-4.22 5.63 1.25 1.67L14 9.33 19 16h-8.46l-4.01-5.37L1 18h22zM5 16l1.52-2.03L8.04 16z"}),"LandscapeOutlined"),kTt=ct([R.jsx("path",{d:"M5 16h3.04l-1.52-2.03z",opacity:".3"},"0"),R.jsx("path",{d:"m9.78 11.63 1.25 1.67L14 9.33 19 16h-8.46l-4.01-5.37L1 18h22L14 6zM5 16l1.52-2.03L8.04 16z"},"1")],"LandscapeTwoTone"),MTt=ct(R.jsx("path",{d:"M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2"}),"MoreHoriz"),RTt=ct(R.jsx("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"NavigateNext"),$Tt=ct([R.jsx("circle",{cx:"12",cy:"12",r:"3.2"},"0"),R.jsx("path",{d:"M9 2 7.17 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2h-3.17L15 2zm3 15c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5"},"1")],"PhotoCamera"),DTt=ct(R.jsx("path",{d:"M17 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V7zm-5 16c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3m3-10H5V5h10z"}),"Save"),BH=ct(R.jsx("path",{d:"M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6"}),"Settings"),_Tt=ct(R.jsx("path",{d:"M21 5.47 12 12 7.62 7.62 3 11V8.52L7.83 5l4.38 4.38L21 3zM21 15h-4.7l-4.17 3.34L6 12.41l-3 2.13V17l2.8-2 6.2 6 5-4h4z"}),"SsidChart");function XS({callback:e}){const[t,n]=v.useState(null),[r,o]=v.useState(""),[i,a]=v.useState(!0),[s,l]=v.useState([]),[c,u]=Le(),d=v.useMemo(()=>Fk(f=>iBe(f,u.language,i).then(p=>l(p)),200),[u.language,i]);return v.useEffect(()=>{if(r===""){l(t?[t]:[]);return}return d(r),()=>{}},[t,r,d]),K(wt,{children:[b(Ic,{id:"exercise-name-autocomplete",getOptionLabel:f=>f.value,"data-testid":"autocomplete",filterOptions:f=>f,options:s,autoComplete:!0,includeInputInList:!0,filterSelectedOptions:!0,value:t,noOptionsText:c("noResults"),isOptionEqualToValue:(f,p)=>f.value===p.value,onChange:(f,p)=>{l(p?[p,...s]:s),n(p),e(p)},onInputChange:(f,p)=>{o(p)},renderInput:f=>b(nn,{...f,label:c("exercises.searchExerciseName"),fullWidth:!0,InputProps:{...f.InputProps,startAdornment:K(wt,{children:[b(So,{position:"start",children:b(oH,{})}),f.InputProps.startAdornment]})}}),renderOption:(f,p)=>cZ("li",{...f,key:`exercise-${p.data.base_id}-${p.data.id}`,"data-testid":`autocompleter-result-${p.data.base_id}`},K(Ps,{disablePadding:!0,component:"div",children:[b(aa,{children:p.data.image?b(Oc,{alt:"",src:`${fz}${p.data.image}`,variant:"rounded"}):b(Rd,{fontSize:"large"})}),b(Ao,{primary:p.value,primaryTypographyProps:{style:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}},secondary:p.data.category})]}))}),u.language!==Ov&&b(sk,{children:b(Td,{control:b(Fl,{checked:i,onChange:(f,p)=>a(p)}),label:c("alsoSearchEnglish")})})]})}function NTt(e){var d,f;const[t,n]=Y.useState(null),[r,o]=Y.useState(null),[i]=Le(),a=Bp(),s=()=>{o(null),n(null)},l=async()=>{var p;await sBe((p=e.currentExercise.getTranslation(e.currentLanguage))==null?void 0:p.id),e.onClose(),e.onChangeLanguage()},c=async(p=!1)=>{p?await TG(e.currentExercise.id,r==null?void 0:r.uuid):await TG(e.currentExercise.id),e.onClose(),a("../overview")},u=async p=>{const h=p!==void 0?p:t;if(h!==null)try{const m=await wk(h);o(m)}catch{o(null)}};return K(wt,{children:[b(XB,{id:"alert-dialog-title",children:i("delete")}),K(nS,{children:[b("p",{children:i("exercises.deleteExerciseBody",{name:(d=e.currentExercise.getTranslation(e.currentLanguage))==null?void 0:d.name,language:(f=e.currentLanguage)==null?void 0:f.nameLong})}),b("p",{children:i("cannotBeUndone")}),b("p",{children:b("b",{children:i("exercises.replacements")})}),b("p",{children:i("exercises.replacementsInfoText")}),b("p",{children:i("exercises.replacementsSearch")}),b(XS,{callback:p=>{p!==null&&(n(p.data.base_id),u(p.data.base_id))}}),b(nn,{"data-testid":"exercise-id-field",id:"foo",label:"Exercise ID",onBlur:()=>u(),onChange:async p=>{n(p.target.value!==""?parseInt(p.target.value):null)},value:t??"",InputProps:{endAdornment:b(So,{position:"start",children:b(vn,{onClick:()=>u(),children:b(bTt,{})})})},fullWidth:!0,variant:"standard"}),r===null&&b(wt,{children:b("p",{children:b("i",{children:i("exercises.noReplacementSelected")})})}),r!==null&&K(wt,{children:[K("p",{children:["Selected exercise for replacement:",b(kc,{title:i("copyToClipboard"),children:b(vn,{onClick:()=>navigator.clipboard.writeText(r.id.toString()),children:b(CTt,{})})})]}),K(Ps,{disablePadding:!0,children:[b(ZB,{children:b(Oc,{children:r.mainImage?b(Oc,{alt:"",src:`${fz}${r.mainImage.url}`,variant:"rounded"}):b(Rd,{})})}),b(Ao,{primary:r.getTranslation().name,secondary:`${r.id} (${r.uuid})`}),b(vn,{onClick:s,children:b(xTt,{})})]})]})]}),K(ak,{children:[b(dt,{onClick:()=>e.onClose(),children:i("cancel")}),b(dt,{"data-testid":"button-delete-translation",size:"small",onClick:l,variant:"contained",children:i("exercises.deleteTranslation")}),b(dt,{"data-testid":"button-delete-all",size:"small",onClick:()=>c(),variant:"contained",children:i("exercises.deleteExerciseFull")}),b(dt,{"data-testid":"button-delete-and-replace",size:"small",disabled:r===null,onClick:()=>c(!0),variant:"contained",children:i("exercises.deleteExerciseReplace")})]})]})}const LTt="_root_l288f_1",FTt="_detail_language_l288f_4",jTt="_detail_l288f_4",BTt="_detail_arrow_l288f_18",zTt="_languages_l288f_28",VTt="_language_l288f_28",HTt="_language_menu_l288f_40",UTt="_header_l288f_52",WTt="_toolbar_l288f_55",GTt="_dots_l288f_68",gh={root:LTt,detail_language:FTt,detail:jTt,detail_arrow:BTt,languages:zTt,language:VTt,language_menu:HTt,header:UTt,toolbar:WTt,dots:GTt},qTt=({exercise:e,languages:t,changeLanguage:n,language:r,setEditMode:o,editMode:i})=>{var P,T,I;const[a,s]=v.useState(null),[l,c]=Y.useState(!1),u=!!a,[d]=Le(),f=Qy(ig.DELETE_EXERCISE),p=Qy(ig.EDIT_EXERCISE),h=Vl(),m=h.isSuccess&&h.data===null;let y=!1;h.isSuccess&&p.isSuccess&&(y=p.data||h.data!==null&&h.data.isTrustworthy);const w=A=>{s(A.currentTarget)},x=()=>{s(null)},C=A=>{n(A),x()},E=t.map(A=>K(en,{onClick:()=>C(A),selected:(r==null?void 0:r.id)===A.id,children:[b(Ao,{children:A.nameLong}),b(aa,{children:e.availableLanguages.includes(A.id)?b(mTt,{}):b(Vo,{})})]},A.nameShort));return b(Oe,{container:!0,children:b(Oe,{size:12,children:K("div",{className:gh.root,children:[b(ik,{open:l,onClose:()=>c(!1),children:b(NTt,{onClose:()=>c(!1),onChangeLanguage:()=>n(t[0]),currentExercise:e,currentLanguage:r})}),K("div",{className:gh.detail_language,children:[K("div",{className:gh.detail,children:[b(Da,{to:"../overview",children:d("exercises.exercises")})," > ",(P=e.getTranslation(r))==null?void 0:P.name]}),b("div",{className:gh.languages,children:K("div",{className:gh.language,children:[b(dt,{size:"small",id:"basic-button",onClick:w,startIcon:b(jH,{}),children:r==null?void 0:r.nameLong}),K(Rs,{id:"basic-menu",anchorEl:a,open:u,onClose:x,MenuListProps:{"aria-labelledby":"basic-button"},sx:{padding:20},children:[b(en,{disabled:!0,children:d("exercises.changeExerciseLanguage")}),b(kl,{}),E]})]})})]}),K("div",{className:gh.header,children:[b(st,{gutterBottom:!0,variant:"h2",margin:0,sx:{mt:2},children:(T=e.getTranslation(r))==null?void 0:T.name}),!m&&K("nav",{className:gh.toolbar,children:[f.isSuccess&&f.data&&(r==null?void 0:r.id)===((I=e.getTranslation(r))==null?void 0:I.language)&&b(dt,{onClick:()=>c(!0),children:d("delete")}),y&&b(dt,{onClick:()=>o(!0),disabled:i,children:"EDIT"}),b(dt,{onClick:()=>o(!1),disabled:!i,children:"VIEW"})]})]}),K(Wt,{direction:"row",spacing:1,mt:2,children:[b(mu,{label:d(Na(e.category.name)),size:"small"}),e.equipment.map(A=>b(mu,{label:d(Na(A.name)),variant:"outlined",size:"small"},A.id))]})]})})})},fi=()=>b(on,{sx:{height:40}}),KTt=()=>{var m;const[e,t]=v.useState(),[n,r]=v.useState(),[o,i]=v.useState(!1),a=_c(),s=a.baseID?gTt.parseInt(a.baseID):0;Le();const l=Bp(),c=Fp(),u=fo({queryKey:[zFe,s],queryFn:()=>wk(s),enabled:c.isSuccess}),d=fo({queryKey:[BFe,(m=u.data)==null?void 0:m.variationId],queryFn:()=>{var y;return nBe((y=u.data)==null?void 0:y.variationId)},enabled:u.isSuccess});if(u.isError||c.isError||d.isError)return l("/not-found"),null;const f=y=>{var x;const w=Db(y.nameShort,c.data);t(w),r((x=u.data)==null?void 0:x.getTranslation(y))},p=d.isSuccess?d.data.filter(y=>y.id!==s):[];let h;return u.isSuccess&&c.isSuccess&&(h=o?b(cTt,{exercise:u.data,language:e}):b(hTt,{exercise:u.data,language:e,variations:p,setEditMode:i})),K(wt,{children:[u.isSuccess&&c.isSuccess&&b(Ac,{children:b(qTt,{exercise:u.data,languages:c.data,changeLanguage:f,language:e,setEditMode:i,editMode:o})}),b(fi,{}),K(Ac,{maxWidth:"lg",children:[u.isLoading&&c.isLoading&&b(gs,{}),h]})]})};function Lde(e){const[t]=Le(),[n,r,o]=$s(e.fieldName),[i,a]=v.useState(""),s=u=>{o.setValue(n.value.filter((d,f)=>f!==u))},l=(u,d)=>{n.value[u]=d,o.setValue(n.value)},c=()=>{n.value.push(i),o.setValue(n.value),a("")};return K(wt,{children:[b(Oe,{size:12,children:b(nn,{fullWidth:!0,label:t("exercises.newNote"),sx:{mb:3},variant:"standard",value:i,onChange:u=>a(u.target.value),error:r.touched&&!!r.error,helperText:r.touched&&r.error?r.error:t("exercises.notesHelpText"),InputProps:{endAdornment:b(So,{position:"end",children:b(vn,{onClick:c,children:b(Vo,{})})})}})}),n.value.map((u,d)=>b(nn,{fullWidth:!0,value:u,onChange:f=>l(d,f.target.value),sx:{mt:2},variant:"standard",error:r.touched&&!!r.error,InputProps:{endAdornment:b(So,{position:"end",children:b(vn,{onClick:()=>s(d),children:b(g1,{})})})}},d))]})}const YTt=({onContinue:e,onBack:t})=>{const[n]=Le(),[r,o]=f0(),i=za({description:DH(n),notes:Tde(n)});return b(Ba,{initialValues:{description:r.descriptionEn,notes:r.notesEn},validationSchema:i,onSubmit:a=>{o(fPt(a.description)),o(pPt(a.notes)),e()},children:b(fa,{children:K(Wt,{children:[b(LH,{fieldName:"description"}),b(fi,{}),b(Lde,{fieldName:"notes"}),b(Oe,{container:!0,children:b(Oe,{display:"flex",justifyContent:"end",size:12,children:b(on,{sx:{mb:2},children:K("div",{children:[b(dt,{onClick:t,sx:{mt:1,mr:1},children:n("goBack")}),b(dt,{variant:"contained",type:"submit",sx:{mt:1,mr:1},children:n("continue")})]})})})})]})})})},QTt=({onContinue:e,onBack:t})=>{const[n]=Le(),r=Fp(),[o,i]=f0(),[a,s]=v.useState(o.languageId!==null),l=za(a?{description:DH(n),name:RH(n),alternativeNames:$H(n),notes:Tde(n),language:Ea().required()}:{});return b(Ba,{initialValues:{name:o.nameI18n,alternativeNames:o.alternativeNamesI18n,description:o.descriptionI18n,language:o.languageId===null?"":o.languageId,notes:o.notesI18n},validationSchema:l,onSubmit:c=>{i(gPt(c.name)),i(mPt(c.description)),i(vPt(c.alternativeNames)),i(PPt(c.language===""?null:c.language)),i(yPt(c.notes)),e()},children:c=>K(fa,{children:[K(Wt,{spacing:2,children:[b(sk,{children:b(Td,{checked:a,onClick:()=>s(!a),control:b(Fl,{}),label:n("exercises.translateExerciseNow")})}),a&&K(wt,{children:[r.isLoading?b(on,{children:b(gs,{})}):K(_g,{fullWidth:!0,children:[b(Ng,{id:"label-language",children:n("language")}),b(Pp,{labelId:"label-language",id:"language",value:c.getFieldProps("language").value,onChange:u=>{c.setFieldValue(c.getFieldProps("language").name,u.target.value)},label:n("language"),error:!!(c.touched.language&&c.errors.language),children:r.data.filter(u=>u.id!==Iv).map(u=>K(en,{value:u.id,children:[u.nameShort," - ",u.nameLong]},u.id))})]}),b(MH,{fieldName:"name"}),b(kH,{fieldName:"alternativeNames"}),b(LH,{fieldName:"description"}),b(fi,{}),b(Lde,{fieldName:"notes"})]})]}),b(Oe,{container:!0,children:b(Oe,{display:"flex",justifyContent:"end",size:12,children:b(on,{sx:{mb:2},children:K("div",{children:[b(dt,{onClick:t,sx:{mt:1,mr:1},children:n("goBack")}),b(dt,{variant:"contained",type:"submit",sx:{mt:1,mr:1},children:n("continue")})]})})})})]})})};function XTt(e){const[t]=Le(),[n,r]=$s(e.fieldName);return b(nn,{fullWidth:!0,id:e.fieldName,label:t("licenses.authors"),variant:"standard",error:r.touched&&!!r.error,helperText:r.touched&&r.error,...n})}function JTt(e){const[t]=Le(),[n,r]=$s(e.fieldName);return b(nn,{fullWidth:!0,id:e.fieldName,label:t("licenses.authorProfile"),variant:"standard",placeholder:"https://",error:r.touched&&!!r.error,helperText:r.touched&&r.error,...n})}function ZTt(e){const[t]=Le(),[n,r]=$s(e.fieldName);return b(nn,{fullWidth:!0,id:e.fieldName,label:t("licenses.derivativeSourceUrl"),variant:"standard",placeholder:"https://",error:r.touched&&!!r.error,helperText:t("licenses.derivativeSourceUrlHelper")||r.touched&&r.error,...n})}function eIt(e){const[t]=Le(),[n,r]=$s(e.fieldName);return b(nn,{fullWidth:!0,id:e.fieldName,label:t("licenses.originalObjectUrl"),variant:"standard",placeholder:"https://",error:r.touched&&!!r.error,helperText:r.touched&&r.error,...n})}function tIt(e){const[t]=Le(),[n,r]=$s(e.fieldName);return b(nn,{fullWidth:!0,id:e.fieldName,label:t("licenses.originalTitle"),variant:"standard",error:r.touched&&!!r.error,helperText:r.touched&&r.error,...n})}function nIt(e){const[t]=Le(),[n,r]=v.useState(Xu.PHOTO),[o,i,a]=$s(e.fieldName);return K(kNe,{value:n,exclusive:!0,fullWidth:!0,onChange:(l,c)=>{r(c),a.setValue(c)},"aria-label":"text alignment",children:[b(ew,{value:Xu.PHOTO,children:K(Wt,{justifyContent:"center",alignItems:"center",children:[b($Tt,{}),b(st,{variant:"caption",children:t("exercises.imageStylePhoto")})]})}),b(ew,{value:Xu.THREE_D,children:K(Wt,{justifyContent:"center",alignItems:"center",children:[b(OTt,{}),b(st,{variant:"caption",children:t("exercises.imageStyle3D")})]})}),b(ew,{value:Xu.LINE_ART,children:K(Wt,{justifyContent:"center",alignItems:"center",children:[b(ATt,{}),b(st,{variant:"caption",children:t("exercises.imageStyleLine")})]})}),b(ew,{value:Xu.LOW_POLY,children:K(Wt,{justifyContent:"center",alignItems:"center",children:[b(kTt,{}),b(st,{variant:"caption",children:t("exercises.imageStyleLowPoly")})]})}),b(ew,{value:Xu.OTHER,children:K(Wt,{justifyContent:"center",alignItems:"center",children:[b(MTt,{}),b(st,{variant:"caption",children:t("exercises.imageStyleOther")})]})})]})}const rIt=({onContinue:e,onBack:t})=>{const[n]=Le(),r=Vl(),[o,i]=f0(),[a,s]=v.useState(o.images),[l,c]=v.useState(void 0),[u,d]=Y.useState(!1),f=()=>d(!1);v.useEffect(()=>{i(TPt(a))},[i,a]);const p=x=>{var P;if(!((P=x.target.files)!=null&&P.length))return;const[C]=x.target.files,E=URL.createObjectURL(C);d(!0),c({url:E,file:C,author:"",authorUrl:"",title:"",derivativeSourceUrl:"",objectUrl:"",style:Xu.PHOTO.toString()})},h=x=>{s(a.concat({url:l==null?void 0:l.url,file:l==null?void 0:l.file,author:x.author,authorUrl:x.authorUrl,title:x.title,derivativeSourceUrl:x.derivativeSourceUrl,objectUrl:x.objectUrl,style:x.imageStyle.toString()})),f()},m=x=>{const C=a.filter(E=>E.url!==x);s(C)},y=()=>{e()};return K("div",{children:[b(Ib,{open:u,onClose:f,"aria-labelledby":"modal-modal-title","aria-describedby":"modal-modal-description",children:K(on,{sx:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:600,bgcolor:"background.paper",boxShadow:24,p:4},children:[b(st,{id:"modal-modal-title",variant:"h6",component:"h2",children:n("exercises.imageDetails")}),K(Oe,{container:!0,spacing:2,children:[b(Oe,{size:4,children:l&&b("img",{style:{width:"100%"},src:l.url,alt:"",loading:"lazy"})}),b(Oe,{size:8,children:b(Ba,{initialValues:{title:"",objectUrl:"",author:r.isSuccess?r.data.username:"",authorUrl:"",derivativeSourceUrl:"",imageStyle:Xu.PHOTO},onSubmit:x=>{console.log(x),h(x)},children:x=>K(fa,{children:[K(Wt,{spacing:2,children:[b(tIt,{fieldName:"title"}),b(eIt,{fieldName:"objectUrl"}),b(XTt,{fieldName:"author"}),b(JTt,{fieldName:"authorUrl"}),b(ZTt,{fieldName:"derivativeSourceUrl"}),b(nIt,{fieldName:"imageStyle"}),K(Il,{icon:b(_de,{fontSize:"inherit"}),severity:"info",children:["By submitting this image, you agree to release it under the ",b("a",{href:"https://creativecommons.org/licenses/by-sa/4.0/",target:"_blank",rel:"noreferrer",children:"CC BY-SA 4.0"})," license. The image must be either your own work or the author must have released in under a license compatible with CC BY-SA 4.0."]})]}),b(Wt,{direction:"row",justifyContent:"end",sx:{mt:2},children:b(dt,{color:"primary",variant:"contained",type:"submit",sx:{mt:2},children:n("add")})})]})})})]})]})}),b(st,{children:n("exercises.compatibleImagesCC")}),K(Wt,{direction:"row",justifyContent:"center",children:[K("div",{children:[b("label",{htmlFor:"camera-input",children:b(wTt,{fontSize:"large",sx:{m:2}})}),b("input",{style:{display:"none"},id:"camera-input",type:"file",accept:"image/*",capture:"environment",onChange:p})]}),K("div",{children:[b("label",{htmlFor:"image-input",children:b(STt,{fontSize:"large",sx:{m:2}})}),b("input",{type:"file",accept:"image/*",name:"image-file",id:"image-input",style:{display:"none"},onChange:p})]})]}),b(Fne,{cols:3,style:{maxHeight:"400px"},children:a.map(x=>K(jne,{children:[b("img",{style:{maxHeight:"400px",maxWidth:"400px"},src:x.url,alt:"",loading:"lazy"}),b(I$e,{title:x.title,subtitle:x.author,actionIcon:b(vn,{onClick:()=>m(x.url),sx:{color:"white"},children:b(ETt,{})})})]},x.url))}),b(st,{children:n("forms.supportedImageFormats")}),b(Oe,{container:!0,children:b(Oe,{display:"flex",justifyContent:"end",size:12,children:b(on,{sx:{mb:2},children:K(wt,{children:[b(dt,{onClick:t,sx:{mt:1,mr:1},children:n("goBack")}),b(dt,{variant:"contained",onClick:y,sx:{mt:1,mr:1},children:n("continue")})]})})})})]})},oIt="exercisecomment",VY=async e=>{const t=new Ure,n=pt(oIt),r=await tt.post(n,t.toJson(e),{headers:gt()});return t.fromJson(r.data)},iIt="variation",aIt=async()=>{const e=pt(iIt);return(await tt.post(e,{},{headers:gt()})).data.id},sIt=({onBack:e})=>{const[t,n]=Le(),[r]=f0(),o=Bp(),i=AM(),a=Fp(),s=f1(),l=kM(),c=Vl(),[u,d]=v.useState("initial"),f=async()=>{d("loading");let h;r.newVariationBaseId!==null?h=await aIt():h=r.variationId;const m=await rBe(r.category,r.equipment,r.muscles,r.musclesSecondary,h,c.data.username),y=await ON(m,Iv,r.nameEn,r.descriptionEn,c.data.username);for(const w of r.alternativeNamesEn)await AN(y.id,w);for(const w of r.images)await Xre({exerciseId:m,image:w.file,imageData:w});for(const w of r.notesEn)await VY(new IN(null,y.id,w));if(r.languageId!==null){const w=await ON(m,r.languageId,r.nameI18n,r.descriptionI18n,c.data.username);for(const x of r.alternativeNamesI18n)await AN(w.id,x);for(const x of r.notesI18n)await VY(new IN(null,w.id,x))}console.log("Exercise created"),d("done")},p=()=>{o(Fn(_n.EXERCISE_OVERVIEW,n.language))};return l.isLoading||a.isLoading||s.isLoading||i.isLoading?b(ho,{}):K(wt,{children:[b(st,{variant:"h6",children:t("exercises.step1HeaderBasics")}),b(Mc,{children:b(Ml,{children:K(Rl,{children:[K(Ht,{children:[b(Ie,{children:t("name")}),b(Ie,{children:r.nameEn})]}),K(Ht,{children:[b(Ie,{children:t("exercises.alternativeNames")}),b(Ie,{children:r.alternativeNamesEn.join(", ")})]}),K(Ht,{children:[b(Ie,{children:t("description")}),b(Ie,{children:r.descriptionEn})]}),K(Ht,{children:[b(Ie,{children:t("exercises.notes")}),b(Ie,{children:r.notesEn.map(h=>K(wt,{children:[h,b("br",{})]}))})]}),K(Ht,{children:[b(Ie,{children:t("category")}),b(Ie,{children:t(Na(i.data.find(h=>h.id===r.category).name))})]}),K(Ht,{children:[b(Ie,{children:t("exercises.equipment")}),b(Ie,{children:r.equipment.map(h=>t(Na(l.data.find(m=>m.id===h).name))).join(", ")})]}),K(Ht,{children:[b(Ie,{children:t("exercises.muscles")}),b(Ie,{children:r.muscles.map(h=>s.data.find(m=>m.id===h).getName(t)).join(", ")})]}),K(Ht,{children:[b(Ie,{children:t("exercises.secondaryMuscles")}),b(Ie,{children:r.musclesSecondary.map(h=>s.data.find(m=>m.id===h).getName(t)).join(", ")})]}),K(Ht,{children:[b(Ie,{children:t("exercises.variations")}),K(Ie,{children:[r.variationId," / ",r.newVariationBaseId]})]})]})})}),r.images.length>0&&b(Fne,{cols:3,style:{maxHeight:"200px"},children:r.images.map(h=>b(jne,{children:b("img",{style:{maxHeight:"200px",maxWidth:"200px"},src:h.url,alt:"",loading:"lazy"})},h.url))}),r.languageId!==null&&K(wt,{children:[b(st,{variant:"h6",sx:{mt:3},children:a.data.find(h=>h.id===r.languageId).nameLong}),b(Mc,{children:b(Ml,{children:K(Rl,{children:[K(Ht,{children:[b(Ie,{children:t("name")}),b(Ie,{children:r.nameI18n})]}),K(Ht,{children:[b(Ie,{children:t("exercises.alternativeNames")}),b(Ie,{children:r.alternativeNamesI18n.join(", ")})]}),K(Ht,{children:[b(Ie,{children:t("description")}),b(Ie,{children:r.descriptionI18n})]}),K(Ht,{children:[b(Ie,{children:t("exercises.notes")}),b(Ie,{children:r.notesI18n.map(h=>K(wt,{children:[h,b("br",{})]}))})]})]})})})]}),u!=="done"?b(Il,{severity:"info",sx:{mt:2},children:t("exercises.checkInformationBeforeSubmitting")}):K(Il,{severity:"success",sx:{mt:2},children:[b(XT,{children:t("success")}),t("exercises.cacheWarning")]}),b(Oe,{container:!0,children:b(Oe,{display:"flex",justifyContent:"end",size:12,children:b(on,{sx:{mb:2},children:K("div",{children:[u!=="done"&&b(dt,{onClick:e,sx:{mt:1,mr:1},children:t("goBack")}),u!=="done"&&b(dt,{variant:"contained",disabled:u!=="initial",onClick:f,sx:{mt:1,mr:1},color:"info",children:t("exercises.submitExercise")}),u==="done"&&K(dt,{variant:"contained",onClick:p,sx:{mt:1,mr:1},color:"success",children:[t("overview"),b(RTt,{})]})]})})})})]})},lIt=()=>{const[e]=Le(),[t,n]=Y.useState(0),r=()=>{n(i=>i+1)},o=()=>{n(i=>i-1)};return b(OPt,{children:K(Ac,{maxWidth:"md",children:[b(Wt,{direction:"row",children:b(st,{gutterBottom:!0,variant:"h3",component:"div",children:e("exercises.contributeExercise")})}),b(on,{children:K(u2e,{activeStep:t,orientation:"vertical",children:[K(Am,{children:[b(df,{children:e("exercises.step1HeaderBasics")}),b(km,{children:b(APt,{onContinue:r,onBack:o})})]},1),K(Am,{children:[b(df,{children:e("exercises.variations")}),b(km,{children:b(MPt,{onContinue:r,onBack:o})})]},2),K(Am,{children:[b(df,{children:e("description")}),b(km,{children:b(YTt,{onContinue:r,onBack:o})})]},3),K(Am,{children:[b(df,{children:e("translation")}),b(km,{children:b(QTt,{onContinue:r,onBack:o})})]},4),K(Am,{children:[b(df,{children:e("images")}),b(km,{children:b(rIt,{onContinue:r,onBack:o})})]},5),K(Am,{children:[b(df,{children:e("overview")}),b(km,{children:b(sIt,{onBack:o})})]},6)]})})]})})},cIt=()=>{const[e]=Le(),t=FH();return K(Ac,{maxWidth:"md",children:[b(st,{variant:"h3",children:e("exercises.notEnoughRightsHeader")}),K(on,{marginTop:4,padding:4,sx:{width:"100%",backgroundColor:"#ebebeb",textAlign:"center"},children:[b(st,{mb:2,children:e("exercises.notEnoughRights",{days:NFe})}),!t.anonymous&&!t.emailVerified&&b(dt,{variant:"contained",href:"/user/preferences",endIcon:b(vTt,{}),children:e("preferences")})]})]})},uIt=()=>{const e=FH();return b(wt,{children:e.canContribute?b(lIt,{}):b(cIt,{})})},dIt=()=>b("div",{children:"Add Weight Page"}),fIt=()=>b("div",{children:"Calendar Page"}),pIt=()=>b("div",{children:"Calories Calculator Page"}),hIt=()=>b("div",{children:"Equipments Page"}),gIt=()=>b("div",{children:"Gallery Page"}),mIt=()=>b("div",{children:"Ingredients Page"}),yIt=()=>b("div",{children:"Login Page"}),vIt=()=>b("div",{children:"Preferences Page"}),bIt=()=>b("div",{children:"Public Template"}),wIt=()=>b("div",{children:"RestApi Page"}),xIt=()=>b("div",{children:"Your Template"}),SIt=({weight:e})=>{const t=qCt(),[n]=Le(),[r,o]=Y.useState(null),[i,a]=Y.useState(!1),s=!!r,l=h=>{o(h.currentTarget)},c=()=>{u(),f()},u=()=>{o(null)},d=()=>{t.mutate(e.id),o(null)},f=()=>a(!0),p=()=>a(!1);return K("div",{children:[b(dt,{onClick:l,children:b(yTt,{})}),K(Rs,{anchorEl:r,open:s,onClose:u,MenuListProps:{"aria-labelledby":"basic-button"},children:[b(en,{onClick:c,children:n("edit")}),b(en,{onClick:d,children:n("delete")})]}),b(Fi,{title:n("edit"),isOpen:i,closeFn:p,children:b(u0,{weightEntry:e,closeFn:p})})]})},CIt=()=>{const[e]=Le(),[t,n]=Y.useState(!1),r=()=>n(!0),o=()=>n(!1);return K("div",{children:[b(Dg,{color:"primary","aria-label":"add",onClick:r,sx:{position:"fixed",bottom:"5rem",right:i=>i.spacing(2),zIndex:9},children:b(Vo,{})}),b(Fi,{title:e("add"),isOpen:t,closeFn:o,children:b(u0,{closeFn:o})})]})},EIt=e=>e.map((t,n)=>n===0?{entry:t,change:0,days:Math.abs(t.date.getTime()-t.date.getTime())/(1e3*60*60*24)}:{entry:t,change:e[n].weight-e[n-1].weight,days:Math.abs(t.date.getTime()-e[n-1].date.getTime())/(1e3*60*60*24)}),PIt=xde(e=>({table:{"& .MuiPaper-root":{border:"1px solid #bababa"}}})),TIt=({weights:e})=>{const t=[10,50,100],[n]=Le(),r=PIt(),o=EIt(e),[i,a]=v.useState(t[0]),[s,l]=v.useState(0),c=(d,f)=>{l(f)},u=d=>{a(parseInt(d.target.value,10)),l(0)};return K("div",{className:r.table,children:[K(Mc,{children:[K(Ml,{sx:{minWidth:650},"aria-label":"simple table",children:[b(Cu,{children:K(Ht,{children:[b(Ie,{align:"center",children:n("date")}),b(Ie,{align:"center",children:n("weight")}),b(Ie,{align:"center",children:n("difference")}),b(Ie,{align:"center",children:n("days")}),b(Ie,{align:"center"})]})}),b(Rl,{children:o.slice(s*i,s*i+i).map(d=>K(Ht,{sx:{"&:last-child td, &:last-child th":{border:0}},children:[b(Ie,{component:"th",scope:"row",align:"center",children:d.entry.date.toLocaleDateString()}),b(Ie,{align:"center",children:d.entry.weight}),b(Ie,{align:"center",children:+d.change.toFixed(2)}),b(Ie,{align:"center",children:d.days}),b(Ie,{align:"center",children:b(SIt,{weight:d.entry})})]},d.entry.date.toLocaleDateString()))})]}),b(rz,{rowsPerPageOptions:t,component:"div",count:o.length,rowsPerPage:i,page:s,onPageChange:c,onRowsPerPageChange:u})]}),b(CIt,{})]})},IIt=()=>{const[e]=Le(),[t,n]=v.useState(!1),r=()=>n(!0),o=()=>n(!1);return K("div",{children:[b(Dg,{color:"secondary","aria-label":"add",onClick:r,sx:{position:"fixed",bottom:"5rem",right:i=>i.spacing(2),zIndex:9},children:b(Vo,{})}),b(Fi,{title:e("add"),isOpen:t,closeFn:o,children:b(u0,{closeFn:o})})]})},OIt=({currentFilter:e,onFilterChange:t})=>{const[n]=Le(),r=Ro(),o=i=>{e!==i&&t(i)};return K(aN,{variant:"outlined",sx:{mb:2},children:[b(dt,{onClick:()=>o(""),color:e===""?"primary":"inherit",variant:e===""?"contained":"outlined",sx:{fontFamily:r.typography.fontFamily},children:n("all")}),b(dt,{onClick:()=>o("lastYear"),color:e==="lastYear"?"primary":"inherit",variant:e==="lastYear"?"contained":"outlined",sx:{fontFamily:r.typography.fontFamily},children:n("lastYear")}),b(dt,{onClick:()=>o("lastHalfYear"),color:e==="lastHalfYear"?"primary":"inherit",variant:e==="lastHalfYear"?"contained":"outlined",sx:{fontFamily:r.typography.fontFamily},children:n("lastHalfYear")}),b(dt,{onClick:()=>o("lastMonth"),color:e==="lastMonth"?"primary":"inherit",variant:e==="lastMonth"?"contained":"outlined",sx:{fontFamily:r.typography.fontFamily},children:n("lastMonth")}),b(dt,{onClick:()=>o("lastWeek"),color:e==="lastWeek"?"primary":"inherit",variant:e==="lastWeek"?"contained":"outlined",sx:{fontFamily:r.typography.fontFamily},children:n("lastWeek")})]})},Ld=e=>K(Ac,{maxWidth:"lg",children:[K(Oe,{container:!0,spacing:2,children:[b(Oe,{sx:{mb:2},size:8,children:K(Wt,{direction:"row",justifyContent:"space-between",alignItems:"center",children:[b(st,{gutterBottom:!0,variant:"h3",children:e.title}),e.optionsMenu]})}),b(Oe,{size:{xs:12,sm:8},children:e.mainContent}),b(Oe,{size:{xs:12,sm:4},children:e.sideBar})]}),e.fab]}),AIt=()=>{const[e]=Le(),[t,n]=v.useState("lastYear"),r=DM(t),o=i=>{n(i)};return r.isLoading?b(ho,{}):b(Ld,{title:e("weight"),mainContent:K(Wt,{spacing:2,children:[b(OIt,{currentFilter:t,onFilterChange:o}),r.data.length===0&&b(dk,{}),r.data.length!==0&&K(wt,{children:[b(Sde,{weights:r.data}),b(on,{sx:{mt:4}}),b(TIt,{weights:r.data})]})]}),fab:b(IIt,{})})},kIt=()=>{const{i18n:e}=Le(),[t,n]=Y.useState(null);return K(wt,{children:[b(dt,{color:"inherit",onClick:r=>n(r.currentTarget),children:"Routines"}),K(Rs,{anchorEl:t,open:!!t,onClose:()=>n(null),children:[b(en,{component:Da,to:Fn(_n.ROUTINE_OVERVIEW,e.language),children:"Routine overview"}),b(en,{component:Da,to:Fn(_n.EXERCISE_OVERVIEW,e.language),children:"Exercise overview"}),b(en,{component:Da,to:Fn(_n.EXERCISE_CONTRIBUTE,e.language),children:"Contribute exercise"})]})]})},MIt=()=>{const{i18n:e}=Le(),[t,n]=Y.useState(null);return K(wt,{children:[b(dt,{color:"inherit",onClick:r=>n(r.currentTarget),children:"Weight"}),K(Rs,{anchorEl:t,open:!!t,onClose:()=>n(null),children:[b(en,{component:Da,to:Fn(_n.WEIGHT_OVERVIEW,e.language),children:"Weight overview"}),b(en,{component:Da,to:Fn(_n.WEIGHT_ADD,e.language),children:"Add weight entry"})]})]})},RIt=()=>{const{i18n:e}=Le(),[t,n]=Y.useState(null);return K(wt,{children:[b(dt,{color:"inherit",onClick:r=>n(r.currentTarget),children:"Measurements"}),b(Rs,{anchorEl:t,open:!!t,onClose:()=>n(null),children:b(en,{component:Da,to:Fn(_n.MEASUREMENT_OVERVIEW,e.language),children:"Overview"})})]})},$It=()=>{const{i18n:e}=Le(),[t,n]=Y.useState(null);return K(wt,{children:[b(dt,{color:"inherit",onClick:r=>n(r.currentTarget),children:"Nutrition"}),b(Rs,{anchorEl:t,open:!!t,onClose:()=>n(null),children:b(en,{component:Da,to:Fn(_n.NUTRITION_OVERVIEW,e.language),children:"Overview"})})]})},DIt=()=>b(TOe,{position:"static",children:K(Qne,{children:[b(st,{variant:"h6",component:"div",mr:3,children:"wger"}),b(kIt,{}),b(MIt,{}),b(RIt,{}),b($It,{})]})}),Fde=()=>b(AIt,{}),_It=()=>b("div",{children:"Workout Page"}),NIt=()=>b("div",{children:"Workout Schedule"});var Fd,HY=Eb;Fd=HY.createRoot,HY.hydrateRoot;const LIt=()=>K(Oe,{container:!0,spacing:2,children:[b(Oe,{size:{xs:12,sm:4},children:b(ode,{})}),b(Oe,{size:{xs:12,sm:4},children:b(Bue,{})}),b(Oe,{size:{xs:12,sm:4},children:b(Cde,{})})]}),m1=v.createContext({}),jde=()=>{const{data:e,isLoading:t}=AM(),{selectedCategories:n,setSelectedCategories:r}=v.useContext(m1),[o]=Le(),i=a=>()=>{const s=n.indexOf(a),l=[...n];s===-1?l.push(a):l.splice(s,1),r(l)};return t?b(ho,{}):b(Ll,{children:e.map(a=>{const s=`checkbox-list-label-${a.id}`;return b(Ps,{disablePadding:!0,children:K(Ep,{role:void 0,onClick:i(a),dense:!0,children:[b(aa,{children:b(Fl,{edge:"start",checked:n.indexOf(a)!==-1,tabIndex:-1,disableRipple:!0,inputProps:{"aria-labelledby":s}},`category-${a.id}`)}),b(Ao,{id:s,primary:o(Na(a.name))})]})},a.id)})})},FIt=()=>{const[e]=Le();return K(FB,{children:[b(BB,{expandIcon:b(Ob,{}),children:e("category")}),b(jB,{children:b(jde,{})})]})},jIt=()=>{const[e]=Le();return b("div",{"data-testid":"categories",children:K(to,{children:[b(st,{gutterBottom:!0,variant:"h6",m:2,children:e("category")}),b(jde,{})]})})},Bde=()=>{const{data:e,isLoading:t}=kM(),{selectedEquipment:n,setSelectedEquipment:r}=v.useContext(m1),[o]=Le(),i=a=>()=>{const s=n.indexOf(a),l=[...n];s===-1?l.push(a):l.splice(s,1),r(l)};return t?b(ho,{}):b(Ll,{sx:{maxHeight:"500px",overflowY:"auto"},children:e.map(a=>{const s=`checkbox-list-label-${a.id}`;return b(Ps,{disablePadding:!0,children:K(Ep,{role:void 0,onClick:i(a),dense:!0,children:[b(aa,{children:b(Fl,{edge:"start",checked:n.indexOf(a)!==-1,tabIndex:-1,disableRipple:!0,inputProps:{"aria-labelledby":s}},`muscle-${a.id}`)}),b(Ao,{id:s,primary:o(Na(a.name))})]})},a.id)})})},BIt=()=>{const[e]=Le();return K(FB,{children:[b(BB,{expandIcon:b(Ob,{}),children:e("exercises.equipment")}),b(jB,{children:b(Bde,{})})]})},zIt=()=>{const[e]=Le();return b("div",{"data-testid":"equipment",children:K(to,{sx:{mt:2},children:[b(st,{gutterBottom:!0,variant:"h6",m:2,children:e("exercises.equipment")}),b(Bde,{})]})})},VIt=oe(({className:e,...t})=>b(kc,{...t,classes:{popper:e}}))(({theme:e})=>({[`& .${Yr.tooltip}`]:{backgroundColor:"rgb(245, 245, 245)",color:"rgba(0, 0, 0, 0.87)",boxShadow:e.shadows[1],fontSize:11}})),zde=()=>{const{data:e,isLoading:t}=f1(),{selectedMuscles:n,setSelectedMuscles:r}=v.useContext(m1),[o]=Le(),i=a=>()=>{const s=n.indexOf(a),l=[...n];s===-1?l.push(a):l.splice(s,1),r(l)};return t?b(ho,{}):b(Ll,{sx:{maxHeight:"500px",overflowY:"auto"},children:e.map(a=>{const s=`checkbox-list-label-${a.id}`;return b(Ps,{disablePadding:!0,secondaryAction:b(VIt,{title:b(Pg,{primaryMuscles:[a],secondaryMuscles:[],isFront:a.isFront}),placement:"right",arrow:!0,children:b(vn,{edge:"end","aria-label":"comments",children:b(Nde,{})})}),children:K(Ep,{role:void 0,onClick:i(a),dense:!0,children:[b(aa,{children:b(Fl,{edge:"start",checked:n.indexOf(a)!==-1,tabIndex:-1,disableRipple:!0,inputProps:{"aria-labelledby":s}},`muscle-${a.id}`)}),b(Ao,{id:s,primary:a.name,secondary:a.nameEn!==""?o(Na(a.nameEn)):""})]})},a.id)})})},HIt=()=>{const[e]=Le();return K(FB,{children:[b(BB,{expandIcon:b(Ob,{}),children:e("exercises.muscles")}),b(jB,{children:b(zde,{})})]})},UIt=()=>{const[e]=Le();return b("div",{"data-testid":"muscles",children:K(to,{sx:{mt:2},children:[b(st,{gutterBottom:!0,variant:"h6",m:2,children:e("exercises.muscles")}),b(zde,{})]})})},WIt=({exercises:e})=>{const t=Fp(),[n,r]=Le();let o;return t.isSuccess&&(o=Db(r.language,t.data)),b(Oe,{container:!0,spacing:1,children:e.map(i=>b(Oe,{sx:{display:"flex"},size:{xs:6,md:4},children:b(Mde,{exercise:i,language:o})},i.id))})},GIt=()=>b(Oe,{container:!0,spacing:1,children:Array.apply(null,Array(21)).map((e,t)=>b(Oe,{sx:{display:"flex"},size:4,children:K(bo,{children:[b(yu,{children:b(QP,{variant:"rectangular",width:250,height:150})}),b(_i,{children:K(on,{sx:{pt:.5},children:[b(QP,{width:"60%"}),b(QP,{})]})})]})},t))}),qIt=({children:e})=>{const[t]=Le(),[n,r]=v.useState(!1),o=i=>()=>{r(i)};return K(wt,{children:[b(dt,{onClick:o(!0),children:b(TTt,{})}),K(VRe,{open:n,onClose:o(!1),anchor:"right",children:[K(Wt,{direction:"row",justifyContent:"space-between",alignItems:"center",children:[b(st,{gutterBottom:!0,variant:"h6",m:2,children:t("filters")}),b(dt,{onClick:o(!1),children:b(FC,{})})]}),b(kl,{}),e]})]})},KIt=()=>{const[e,t]=Le();return K(on,{marginTop:4,padding:4,sx:{width:"100%",backgroundColor:"#ebebeb",textAlign:"center"},children:[b(st,{gutterBottom:!0,variant:"h4",component:"div",children:e("exercises.missingExercise")}),b(st,{gutterBottom:!0,variant:"body1",component:"div",children:e("exercises.missingExerciseDescription")}),b(Da,{to:Fn(_n.EXERCISE_CONTRIBUTE,t.language),children:e("exercises.contributeExercise")})]})},YIt=()=>{const e=zue(),[t,n]=Le(),r=Bp(),{selectedCategories:o,selectedEquipment:i,selectedMuscles:a}=v.useContext(m1),s=CC("(max-width:600px)"),[l,c]=Y.useState(1),u=(y,w)=>{c(w),window.scrollTo({top:0,behavior:"smooth"})};let d=v.useMemo(()=>{let y=e.data||[];return o.length>0&&(y=y.filter(w=>o.some(x=>w.category.id===x.id))),i.length>0&&(y=y.filter(w=>w.equipment.some(x=>i.some(C=>C.id===x.id)))),a.length>0&&(y=y.filter(w=>w.muscles.some(x=>a.some(C=>C.id===x.id)))),y},[e.data,o,i,a]);const f=21,p=Math.ceil(d.length/f),h=d.slice((l-1)*f,l*f),m=y=>{y&&r(Fn(_n.EXERCISE_DETAIL,n.language,{id:y.data.base_id}))};return b(Ac,{maxWidth:"lg",children:K(Oe,{container:!0,spacing:2,mt:2,children:[b(Oe,{size:{xs:10,sm:6},children:b(st,{gutterBottom:!0,variant:"h3",component:"div",children:t("exercises.exercises")})}),s?K(wt,{children:[b(Oe,{size:{xs:2,sm:6},children:b(dt,{variant:"contained",onClick:()=>r(Fn(_n.EXERCISE_CONTRIBUTE,n.language)),children:b(Vo,{})})}),b(Oe,{flexGrow:1,size:{sm:6},children:b(XS,{callback:m})}),b(Oe,{display:"flex",justifyContent:"center",alignItems:"center",size:{xs:2,sm:6},children:K(qIt,{children:[b(FIt,{}),b(BIt,{}),b(HIt,{})]})})]}):K(wt,{children:[b(Oe,{size:{xs:12,sm:3},children:b(XS,{callback:m})}),b(Oe,{size:{xs:12,sm:3},children:b(dt,{variant:"contained",startIcon:b(Vo,{}),onClick:()=>r(Fn(_n.EXERCISE_CONTRIBUTE,n.language)),children:t("exercises.contributeExercise")})})]}),!s&&b(Oe,{size:{xs:12,sm:3},children:K(Oe,{container:!0,spacing:1,children:[b(Oe,{size:{xs:6,sm:12},children:b(jIt,{})}),b(Oe,{size:{xs:6,sm:12},children:b(zIt,{})}),b(Oe,{size:12,children:b(UIt,{})})]})}),K(Oe,{size:{xs:12,sm:9},children:[e.isLoading?b(GIt,{}):K(wt,{children:[b(WIt,{exercises:h}),b(Wt,{spacing:2,alignItems:"center",sx:{mt:2},children:b(o_e,{count:p,color:"primary",page:l,onChange:u})})]}),b(KIt,{})]})]})})},UY=()=>{const[e,t]=v.useState([]),[n,r]=v.useState([]),[o,i]=Y.useState([]);return b(m1.Provider,{value:{selectedEquipment:e,setSelectedEquipment:t,selectedMuscles:n,setSelectedMuscles:r,selectedCategories:o,setSelectedCategories:i},children:b(YIt,{})})};function QIt(){return fo({queryKey:[Rb],queryFn:JBe})}const XIt=()=>{const e=Lt();return jt({mutationFn:t=>eze(t),onSuccess:()=>e.invalidateQueries({queryKey:[Rb]})})},JIt=e=>{const t=Lt();return jt({mutationFn:n=>tze(n),onSuccess:()=>{t.invalidateQueries({queryKey:[Mb,e]}),t.invalidateQueries({queryKey:[Rb]})}})},ZIt=e=>{const t=Lt();return jt({mutationFn:n=>nze(n),onSuccess:()=>{t.invalidateQueries({queryKey:[Mb,e]}),t.invalidateQueries({queryKey:[Rb]})}})};function Vde(e){return fo({queryKey:[Mb,e],queryFn:()=>ZBe(e)})}const eOt=()=>{const e=Lt();return jt({mutationFn:t=>ize(t),onError:t=>{console.log(t)},onSuccess:()=>{e.invalidateQueries({queryKey:[Mb]}),e.invalidateQueries({queryKey:[Rb]})}})},Hde=()=>{const e=Lt();return jt({mutationFn:t=>oze(t),onSuccess:()=>{e.invalidateQueries({queryKey:[Mb]}),e.invalidateQueries({queryKey:[Rb]})}})},tOt=()=>{const e=Lt();return jt({mutationFn:t=>rze(t),onSuccess:()=>e.invalidateQueries({queryKey:[Mb]})})},Ude=v.createContext(void 0);function En(){const e=v.useContext(Ude);if(e===void 0)throw new Error(["MUI X: Could not find the Data Grid context.","It looks like you rendered your component outside of a DataGrid, DataGridPro or DataGridPremium parent component.","This can also happen if you are bundling multiple versions of the Data Grid."].join(` -`));return e}const Wde=v.createContext(void 0),Ot=()=>{const e=v.useContext(Wde);if(!e)throw new Error("MUI X: useGridRootProps should only be used inside the DataGrid, DataGridPro or DataGridPremium component.");return e};function W(){return W=Object.assign?Object.assign.bind():function(e){for(var t=1;tn.searchParams.append("args[]",r)),`Minified MUI error #${e}; visit ${n} for the full message.`}function y1(e){if(typeof e!="string")throw new Error(nOt(7));return e.charAt(0).toUpperCase()+e.slice(1)}function Jf(e){return e&&e.ownerDocument||document}function rOt(e){return Jf(e).defaultView||window}function oOt(e,t){typeof e=="function"?e(t):e&&(e.current=t)}const Ho=typeof window<"u"?v.useLayoutEffect:v.useEffect;let WY=0;function iOt(e){const[t,n]=v.useState(e),r=t;return v.useEffect(()=>{t==null&&(WY+=1,n(`mui-${WY}`))},[t]),r}const aOt={...yd},GY=aOt.useId;function To(e){return GY!==void 0?GY():iOt(e)}function Ar(e){const t=v.useRef(e);return Ho(()=>{t.current=e}),v.useRef((...n)=>(0,t.current)(...n)).current}function Jg(...e){return v.useMemo(()=>e.every(t=>t==null)?null:t=>{e.forEach(n=>{oOt(n,t)})},e)}const qY={};function Au(e,t){const n=v.useRef(qY);return n.current===qY&&(n.current=e(t)),n}const sOt=[];function LM(e){v.useEffect(e,sOt)}class zH{constructor(){Tt(this,"currentId",null);Tt(this,"clear",()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)});Tt(this,"disposeEffect",()=>this.clear)}static create(){return new zH}start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,n()},t)}}function p0(){const e=Au(zH.create).current;return LM(e.disposeEffect),e}function Gde(e,t){const n={...t};for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)){const o=r;if(o==="components"||o==="slots")n[o]={...e[o],...n[o]};else if(o==="componentsProps"||o==="slotProps"){const i=e[o],a=t[o];if(!a)n[o]=i||{};else if(!i)n[o]=a;else{n[o]={...a};for(const s in i)if(Object.prototype.hasOwnProperty.call(i,s)){const l=s;n[o][l]=Gde(i[l],a[l])}}}else n[o]===void 0&&(n[o]=e[o])}return n}const KY=e=>e,lOt=()=>{let e=KY;return{configure(t){e=t},generate(t){return e(t)},reset(){e=KY}}},cOt=lOt(),uOt={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function qde(e,t,n="Mui"){const r=uOt[t];return r?`${n}-${r}`:`${cOt.generate(e)}-${t}`}function Kde(e,t,n="Mui"){const r={};return t.forEach(o=>{r[o]=qde(e,o,n)}),r}const dOt=Object.is;function Yde(e,t){if(e===t)return!0;if(!(e instanceof Object)||!(t instanceof Object))return!1;let n=0,r=0;for(const o in e)if(n+=1,!dOt(e[o],t[o])||!(o in t))return!1;for(const o in t)r+=1;return n===r}function zp(e){return v.memo(e,Yde)}const fOt={noRowsLabel:"No rows",noResultsOverlayLabel:"No results found.",toolbarDensity:"Density",toolbarDensityLabel:"Density",toolbarDensityCompact:"Compact",toolbarDensityStandard:"Standard",toolbarDensityComfortable:"Comfortable",toolbarColumns:"Columns",toolbarColumnsLabel:"Select columns",toolbarFilters:"Filters",toolbarFiltersLabel:"Show filters",toolbarFiltersTooltipHide:"Hide filters",toolbarFiltersTooltipShow:"Show filters",toolbarFiltersTooltipActive:e=>e!==1?`${e} active filters`:`${e} active filter`,toolbarQuickFilterPlaceholder:"Search…",toolbarQuickFilterLabel:"Search",toolbarQuickFilterDeleteIconLabel:"Clear",toolbarExport:"Export",toolbarExportLabel:"Export",toolbarExportCSV:"Download as CSV",toolbarExportPrint:"Print",toolbarExportExcel:"Download as Excel",columnsManagementSearchTitle:"Search",columnsManagementNoColumns:"No columns",columnsManagementShowHideAllText:"Show/Hide All",columnsManagementReset:"Reset",filterPanelAddFilter:"Add filter",filterPanelRemoveAll:"Remove all",filterPanelDeleteIconLabel:"Delete",filterPanelLogicOperator:"Logic operator",filterPanelOperator:"Operator",filterPanelOperatorAnd:"And",filterPanelOperatorOr:"Or",filterPanelColumns:"Columns",filterPanelInputLabel:"Value",filterPanelInputPlaceholder:"Filter value",filterOperatorContains:"contains",filterOperatorDoesNotContain:"does not contain",filterOperatorEquals:"equals",filterOperatorDoesNotEqual:"does not equal",filterOperatorStartsWith:"starts with",filterOperatorEndsWith:"ends with",filterOperatorIs:"is",filterOperatorNot:"is not",filterOperatorAfter:"is after",filterOperatorOnOrAfter:"is on or after",filterOperatorBefore:"is before",filterOperatorOnOrBefore:"is on or before",filterOperatorIsEmpty:"is empty",filterOperatorIsNotEmpty:"is not empty",filterOperatorIsAnyOf:"is any of","filterOperator=":"=","filterOperator!=":"!=","filterOperator>":">","filterOperator>=":">=","filterOperator<":"<","filterOperator<=":"<=",headerFilterOperatorContains:"Contains",headerFilterOperatorDoesNotContain:"Does not contain",headerFilterOperatorEquals:"Equals",headerFilterOperatorDoesNotEqual:"Does not equal",headerFilterOperatorStartsWith:"Starts with",headerFilterOperatorEndsWith:"Ends with",headerFilterOperatorIs:"Is",headerFilterOperatorNot:"Is not",headerFilterOperatorAfter:"Is after",headerFilterOperatorOnOrAfter:"Is on or after",headerFilterOperatorBefore:"Is before",headerFilterOperatorOnOrBefore:"Is on or before",headerFilterOperatorIsEmpty:"Is empty",headerFilterOperatorIsNotEmpty:"Is not empty",headerFilterOperatorIsAnyOf:"Is any of","headerFilterOperator=":"Equals","headerFilterOperator!=":"Not equals","headerFilterOperator>":"Greater than","headerFilterOperator>=":"Greater than or equal to","headerFilterOperator<":"Less than","headerFilterOperator<=":"Less than or equal to",filterValueAny:"any",filterValueTrue:"true",filterValueFalse:"false",columnMenuLabel:"Menu",columnMenuShowColumns:"Show columns",columnMenuManageColumns:"Manage columns",columnMenuFilter:"Filter",columnMenuHideColumn:"Hide column",columnMenuUnsort:"Unsort",columnMenuSortAsc:"Sort by ASC",columnMenuSortDesc:"Sort by DESC",columnHeaderFiltersTooltipActive:e=>e!==1?`${e} active filters`:`${e} active filter`,columnHeaderFiltersLabel:"Show filters",columnHeaderSortIconLabel:"Sort",footerRowSelected:e=>e!==1?`${e.toLocaleString()} rows selected`:`${e.toLocaleString()} row selected`,footerTotalRows:"Total Rows:",footerTotalVisibleRows:(e,t)=>`${e.toLocaleString()} of ${t.toLocaleString()}`,checkboxSelectionHeaderName:"Checkbox selection",checkboxSelectionSelectAllRows:"Select all rows",checkboxSelectionUnselectAllRows:"Unselect all rows",checkboxSelectionSelectRow:"Select row",checkboxSelectionUnselectRow:"Unselect row",booleanCellTrueLabel:"yes",booleanCellFalseLabel:"no",actionsCellMore:"more",pinToLeft:"Pin to left",pinToRight:"Pin to right",unpin:"Unpin",treeDataGroupingHeaderName:"Group",treeDataExpand:"see children",treeDataCollapse:"hide children",groupingColumnHeaderName:"Group",groupColumn:e=>`Group by ${e}`,unGroupColumn:e=>`Stop grouping by ${e}`,detailPanelToggle:"Detail panel toggle",expandDetailPanel:"Expand",collapseDetailPanel:"Collapse",MuiTablePagination:{},rowReorderingHeaderName:"Row reordering",aggregationMenuItemHeader:"Aggregation",aggregationFunctionLabelSum:"sum",aggregationFunctionLabelAvg:"avg",aggregationFunctionLabelMin:"min",aggregationFunctionLabelMax:"max",aggregationFunctionLabelSize:"size"};function In(e){return qde("MuiDataGrid",e)}const le=Kde("MuiDataGrid",["actionsCell","aggregationColumnHeader","aggregationColumnHeader--alignLeft","aggregationColumnHeader--alignCenter","aggregationColumnHeader--alignRight","aggregationColumnHeaderLabel","autoHeight","autosizing","booleanCell","cell--editable","cell--editing","cell--flex","cell--textCenter","cell--textLeft","cell--textRight","cell--rangeTop","cell--rangeBottom","cell--rangeLeft","cell--rangeRight","cell--pinnedLeft","cell--pinnedRight","cell--selectionMode","cell","cellCheckbox","cellEmpty","cellSkeleton","cellOffsetLeft","checkboxInput","columnHeader","columnHeader--alignCenter","columnHeader--alignLeft","columnHeader--alignRight","columnHeader--dragging","columnHeader--moving","columnHeader--numeric","columnHeader--sortable","columnHeader--sorted","columnHeader--filtered","columnHeader--pinnedLeft","columnHeader--pinnedRight","columnHeader--last","columnHeader--lastUnpinned","columnHeader--siblingFocused","columnHeaderCheckbox","columnHeaderDraggableContainer","columnHeaderTitle","columnHeaderTitleContainer","columnHeaderTitleContainerContent","columnHeader--filledGroup","columnHeader--emptyGroup","columnHeaders","columnSeparator--resizable","columnSeparator--resizing","columnSeparator--sideLeft","columnSeparator--sideRight","columnSeparator","columnsManagement","columnsManagementRow","columnsManagementHeader","columnsManagementFooter","container--top","container--bottom","detailPanel","detailPanels","detailPanelToggleCell","detailPanelToggleCell--expanded","footerCell","panel","panelHeader","panelWrapper","panelContent","panelFooter","paper","editBooleanCell","editInputCell","filler","filler--borderBottom","filler--pinnedLeft","filler--pinnedRight","filterForm","filterFormDeleteIcon","filterFormLogicOperatorInput","filterFormColumnInput","filterFormOperatorInput","filterFormValueInput","filterIcon","footerContainer","headerFilterRow","iconButtonContainer","iconSeparator","main","main--hasPinnedRight","main--hasSkeletonLoadingOverlay","menu","menuIcon","menuIconButton","menuOpen","menuList","overlay","overlayWrapper","overlayWrapperInner","root","root--densityStandard","root--densityComfortable","root--densityCompact","root--disableUserSelection","root--noToolbar","row","row--editable","row--editing","row--firstVisible","row--lastVisible","row--dragging","row--dynamicHeight","row--detailPanelExpanded","row--borderBottom","rowReorderCellPlaceholder","rowCount","rowReorderCellContainer","rowReorderCell","rowReorderCell--draggable","rowSkeleton","scrollArea--left","scrollArea--right","scrollArea","scrollbar","scrollbar--vertical","scrollbar--horizontal","scrollbarFiller","scrollbarFiller--header","scrollbarFiller--borderTop","scrollbarFiller--borderBottom","scrollbarFiller--pinnedRight","selectedRowCount","sortIcon","toolbarContainer","toolbarFilterList","virtualScroller","virtualScroller--hasScrollX","virtualScrollerContent","virtualScrollerContent--overflowed","virtualScrollerRenderZone","pinnedColumns","withVerticalBorder","withBorderColor","cell--withRightBorder","cell--withLeftBorder","columnHeader--withRightBorder","columnHeader--withLeftBorder","treeDataGroupingCell","treeDataGroupingCellToggle","treeDataGroupingCellLoadingContainer","groupingCriteriaCell","groupingCriteriaCellToggle","groupingCriteriaCellLoadingContainer","pinnedRows","pinnedRows--top","pinnedRows--bottom","pinnedRowsRenderZone"]),YY=1e3;class pOt{constructor(t=YY){this.timeouts=new Map,this.cleanupTimeout=YY,this.cleanupTimeout=t}register(t,n,r){this.timeouts||(this.timeouts=new Map);const o=setTimeout(()=>{typeof n=="function"&&n(),this.timeouts.delete(r.cleanupToken)},this.cleanupTimeout);this.timeouts.set(r.cleanupToken,o)}unregister(t){const n=this.timeouts.get(t.cleanupToken);n&&(this.timeouts.delete(t.cleanupToken),clearTimeout(n))}reset(){this.timeouts&&(this.timeouts.forEach((t,n)=>{this.unregister({cleanupToken:n})}),this.timeouts=void 0)}}class hOt{constructor(){this.registry=new FinalizationRegistry(t=>{typeof t=="function"&&t()})}register(t,n,r){this.registry.register(t,n,r)}unregister(t){this.registry.unregister(t)}reset(){}}var Cl=function(e){return e.DataGrid="DataGrid",e.DataGridPro="DataGridPro",e.DataGridPremium="DataGridPremium",e}(Cl||{});class gOt{}function mOt(e){let t=0;return function(r,o,i,a){e.registry===null&&(e.registry=typeof FinalizationRegistry<"u"?new hOt:new pOt);const[s]=v.useState(new gOt),l=v.useRef(null),c=v.useRef();c.current=i;const u=v.useRef(null);if(!l.current&&c.current){const d=(f,p,h)=>{var m;p.defaultMuiPrevented||(m=c.current)==null||m.call(c,f,p,h)};l.current=r.current.subscribeEvent(o,d,a),t+=1,u.current={cleanupToken:t},e.registry.register(s,()=>{var f;(f=l.current)==null||f.call(l),l.current=null,u.current=null},u.current)}else!c.current&&l.current&&(l.current(),l.current=null,u.current&&(e.registry.unregister(u.current),u.current=null));v.useEffect(()=>{if(!l.current&&c.current){const d=(f,p,h)=>{var m;p.defaultMuiPrevented||(m=c.current)==null||m.call(c,f,p,h)};l.current=r.current.subscribeEvent(o,d,a)}return u.current&&e.registry&&(e.registry.unregister(u.current),u.current=null),()=>{var d;(d=l.current)==null||d.call(l),l.current=null}},[r,o,a])}}const yOt={registry:null},bt=mOt(yOt),vOt={isFirst:!0};function yr(e,t,n){bt(e,t,n,vOt)}function bOt(e){return e.acceptsApiRef}function QY(e,t){return bOt(t)?t(e):t(e.current.state)}const wOt=Object.is,Qde=Yde,xOt=()=>({state:null,equals:null,selector:null}),Ye=(e,t,n=wOt)=>{const r=Au(xOt),o=r.current.selector!==null,[i,a]=v.useState(o?null:QY(e,t));return r.current.state=i,r.current.equals=n,r.current.selector=t,LM(()=>e.current.store.subscribe(()=>{const s=QY(e,r.current.selector);r.current.equals(r.current.state,s)||(r.current.state=s,a(s))})),i},wi=e=>e.dimensions;var OO=Symbol("NOT_FOUND");function SOt(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function COt(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function EOt(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(n=>typeof n=="function")){const n=e.map(r=>typeof r=="function"?`function ${r.name||"unnamed"}()`:typeof r).join(", ");throw new TypeError(`${t}[${n}]`)}}var XY=e=>Array.isArray(e)?e:[e];function POt(e){const t=Array.isArray(e[0])?e[0]:e;return EOt(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function TOt(e,t){const n=[],{length:r}=e;for(let o=0;ot(s,c.key));if(l>-1){const c=n[l];return l>0&&(n.splice(l,1),n.unshift(c)),c.value}return OO}function o(s,l){r(s)===OO&&(n.unshift({key:s,value:l}),n.length>e&&n.pop())}function i(){return n}function a(){n=[]}return{get:r,put:o,getEntries:i,clear:a}}var AOt=(e,t)=>e===t;function kOt(e){return function(n,r){if(n===null||r===null||n.length!==r.length)return!1;const{length:o}=n;for(let i=0;ii(p.value,u));f&&(u=f.value,s!==0&&s--)}l.put(arguments,u)}return u}return c.clearCache=()=>{l.clear(),c.resetResultsCount()},c.resultsCount=()=>s,c.resetResultsCount=()=>{s=0},c}var MOt=class{constructor(e){this.value=e}deref(){return this.value}},ROt=typeof WeakRef<"u"?WeakRef:MOt,$Ot=0,JY=1;function bP(){return{s:$Ot,v:void 0,o:null,p:null}}function Jde(e,t={}){let n=bP();const{resultEqualityCheck:r}=t;let o,i=0;function a(){var d;let s=n;const{length:l}=arguments;for(let f=0,p=l;f{n=bP(),a.resetResultsCount()},a.resultsCount=()=>i,a.resetResultsCount=()=>{i=0},a}function Zde(e,...t){const n=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,r=(...o)=>{let i=0,a=0,s,l={},c=o.pop();typeof c=="object"&&(l=c,c=o.pop()),SOt(c,`createSelector expects an output function after the inputs, but received: [${typeof c}]`);const u={...n,...l},{memoize:d,memoizeOptions:f=[],argsMemoize:p=Jde,argsMemoizeOptions:h=[],devModeChecks:m={}}=u,y=XY(f),w=XY(h),x=POt(o),C=d(function(){return i++,c.apply(null,arguments)},...y),E=p(function(){a++;const T=TOt(x,arguments);return s=C.apply(null,T),s},...w);return Object.assign(E,{resultFunc:c,memoizedResultFunc:C,dependencies:x,dependencyRecomputations:()=>a,resetDependencyRecomputations:()=>{a=0},lastResult:()=>s,recomputations:()=>i,resetRecomputations:()=>{i=0},memoize:d,argsMemoize:p})};return Object.assign(r,{withTypes:()=>r}),r}var DOt=Zde(Jde),_Ot=Object.assign((e,t=DOt)=>{COt(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);const n=Object.keys(e),r=n.map(i=>e[i]);return t(r,(...i)=>i.reduce((a,s,l)=>(a[n[l]]=s,a),{}))},{withTypes:()=>_Ot});const NOt=Zde({memoize:Xde,memoizeOptions:{maxSize:1,equalityCheck:Object.is}}),ZY=new WeakMap;function Zm(e){return"current"in e&&"instanceId"in e.current}const ey={id:"default"},Ut=(e,t,n,r,o,i,...a)=>{if(a.length>0)throw new Error("Unsupported number of selectors");let s;if(e&&t&&n&&r&&o&&i)s=(l,c)=>{const u=Zm(l),d=c??(u?l.current.instanceId:ey),f=u?l.current.state:l,p=e(f,d),h=t(f,d),m=n(f,d),y=r(f,d),w=o(f,d);return i(p,h,m,y,w)};else if(e&&t&&n&&r&&o)s=(l,c)=>{const u=Zm(l),d=c??(u?l.current.instanceId:ey),f=u?l.current.state:l,p=e(f,d),h=t(f,d),m=n(f,d),y=r(f,d);return o(p,h,m,y)};else if(e&&t&&n&&r)s=(l,c)=>{const u=Zm(l),d=c??(u?l.current.instanceId:ey),f=u?l.current.state:l,p=e(f,d),h=t(f,d),m=n(f,d);return r(p,h,m)};else if(e&&t&&n)s=(l,c)=>{const u=Zm(l),d=c??(u?l.current.instanceId:ey),f=u?l.current.state:l,p=e(f,d),h=t(f,d);return n(p,h)};else if(e&&t)s=(l,c)=>{const u=Zm(l),d=c??(u?l.current.instanceId:ey),f=u?l.current.state:l,p=e(f,d);return t(p)};else throw new Error("Missing arguments");return s.acceptsApiRef=!0,s},mr=(...e)=>{const t=(n,r)=>{const o=Zm(n),i=o?n.current.instanceId:r??ey,a=o?n.current.state:n,s=ZY.get(i),l=s??new Map,c=l==null?void 0:l.get(e);if(l&&c)return c(a,i);const u=NOt(...e);return s||ZY.set(i,l),l.set(e,u),u(a,i)};return t.acceptsApiRef=!0,t},LOt=.7,FOt=1.3,jOt={compact:LOt,comfortable:FOt,standard:1},Iy=e=>e.density,v1=Ut(Iy,e=>jOt[e]);let br=function(e){return e.LEFT="left",e.RIGHT="right",e}({});const HF={left:[],right:[]},BOt=e=>e.isRtl,du=e=>e.columns,pd=Ut(du,e=>e.orderedFields),jd=Ut(du,e=>e.lookup),Cc=mr(pd,jd,(e,t)=>e.map(n=>t[n])),gl=Ut(du,e=>e.columnVisibilityModel),Io=mr(Cc,gl,(e,t)=>e.filter(n=>t[n.field]!==!1)),h0=mr(Io,e=>e.map(t=>t.field)),zOt=e=>e.pinnedColumns,b1=mr(du,zOt,h0,BOt,(e,t,n,r)=>{const o=VOt(t,n,r);return{left:o.left.map(a=>e.lookup[a]),right:o.right.map(a=>e.lookup[a])}});function VOt(e,t,n){var s,l;if(!Array.isArray(e.left)&&!Array.isArray(e.right)||((s=e.left)==null?void 0:s.length)===0&&((l=e.right)==null?void 0:l.length)===0)return HF;const r=(c,u)=>Array.isArray(c)?c.filter(d=>u.includes(d)):[],o=r(e.left,t),i=t.filter(c=>!o.includes(c)),a=r(e.right,i);return n?{left:a,right:o}:{left:o,right:a}}const Vp=mr(Io,e=>{const t=[];let n=0;for(let r=0;r{const n=e.length;return n===0?0:t[n-1]+e[n-1].computedWidth}),efe=mr(Cc,e=>e.filter(t=>t.filterable)),HOt=mr(Cc,e=>e.reduce((t,n)=>(n.filterable&&(t[n.field]=n),t),{})),UOt=mr(Cc,e=>e.some(t=>t.colSpan!==void 0));function Dt(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}const WOt=["id","value","formattedValue","api","field","row","rowNode","colDef","cellMode","isEditable","tabIndex","hasFocus","isValidating","debounceMs","isProcessingProps","onValueChange"],GOt=e=>{const{classes:t}=e;return Tn({root:["editInputCell"]},In,t)},qOt=oe(Pb,{name:"MuiDataGrid",slot:"EditInputCell",overridesResolver:(e,t)=>t.editInputCell})(({theme:e})=>W({},e.typography.body2,{padding:"1px 0","& input":{padding:"0 16px",height:"100%"}})),KOt=v.forwardRef((e,t)=>{const n=Ot(),{id:r,value:o,field:i,colDef:a,hasFocus:s,debounceMs:l=200,isProcessingProps:c,onValueChange:u}=e,d=Dt(e,WOt),f=En(),p=v.useRef(),[h,m]=v.useState(o),y=GOt(n),w=v.useCallback(async C=>{const E=C.target.value;u&&await u(C,E);const P=f.current.getColumn(i);let T=E;P.valueParser&&(T=P.valueParser(E,f.current.getRow(r),P,f)),m(T),f.current.setEditCellValue({id:r,field:i,value:T,debounceMs:l,unstable_skipValueParser:!0},C)},[f,l,i,r,u]),x=f.current.unstable_getEditCellMeta(r,i);return v.useEffect(()=>{(x==null?void 0:x.changeReason)!=="debouncedSetEditCellValue"&&m(o)},[x,o]),Ho(()=>{s&&p.current.focus()},[s]),R.jsx(qOt,W({ref:t,inputRef:p,className:y.root,ownerState:n,fullWidth:!0,type:a.type==="number"?a.type:"text",value:h??"",onChange:w,endAdornment:c?R.jsx(n.slots.loadIcon,{fontSize:"small",color:"action"}):void 0},d))}),YOt=e=>R.jsx(KOt,W({},e)),tfe=(e,t)=>t&&e.length>1?[e[0]]:e,eQ=(e,t)=>n=>W({},n,{sorting:W({},n.sorting,{sortModel:tfe(e,t)})}),QOt=e=>e==="desc",XOt=(e,t)=>{const n=t.current.getColumn(e.field);if(!n||e.sort===null)return null;let r;return n.getSortComparator?r=n.getSortComparator(e.sort):r=QOt(e.sort)?(...i)=>-1*n.sortComparator(...i):n.sortComparator,r?{getSortCellParams:i=>({id:i,field:n.field,rowNode:t.current.getRowNode(i),value:t.current.getCellValue(i,n.field),api:t.current}),comparator:r}:null},JOt=(e,t,n)=>e.reduce((r,o,i)=>{if(r!==0)return r;const a=t.params[i],s=n.params[i];return r=o.comparator(a.value,s.value,a,s),r},0),ZOt=(e,t)=>{const n=e.map(r=>XOt(r,t)).filter(r=>!!r);return n.length===0?null:r=>r.map(o=>({node:o,params:n.map(i=>i.getSortCellParams(o.id))})).sort((o,i)=>JOt(n,o,i)).map(o=>o.node.id)},tQ=(e,t)=>{const n=e.indexOf(t);return!t||n===-1||n+1===e.length?e[0]:e[n+1]},HH=(e,t)=>e==null&&t!=null?-1:t==null&&e!=null?1:e==null&&t==null?0:null,eAt=new Intl.Collator,tAt=(e,t)=>{const n=HH(e,t);return n!==null?n:typeof e=="string"?eAt.compare(e.toString(),t.toString()):e-t},nfe=(e,t)=>{const n=HH(e,t);return n!==null?n:Number(e)-Number(t)},rfe=(e,t)=>{const n=HH(e,t);return n!==null?n:e>t?1:e{const{value:T}=P.target;h(String(T)),y(!0),f.start(x.filterDebounceMs,()=>{const I=W({},t,{value:r==="number"?Number(T):T,fromInput:w});n(I),y(!1)})},[f,x.filterDebounceMs,t,r,w,n]);return v.useEffect(()=>{(t.fromInput!==w||t.value===void 0)&&h(String(t.value??""))},[w,t]),R.jsx(x.slots.baseTextField,W({id:w,label:o.current.getLocaleText("filterPanelInputLabel"),placeholder:o.current.getLocaleText("filterPanelInputPlaceholder"),value:p,onChange:C,variant:u,type:r||"text",InputProps:W({},m||l?{endAdornment:m?R.jsx(x.slots.loadIcon,{fontSize:"small",color:"action"}):l}:{},{disabled:s},c,{inputProps:W({tabIndex:a},c==null?void 0:c.inputProps)}),InputLabelProps:{shrink:!0},inputRef:i},d,(E=x.slotProps)==null?void 0:E.baseTextField))}function rAt(e){return typeof e=="number"&&!Number.isNaN(e)}function ofe(e){return typeof e=="function"}function UH(e){return typeof e=="object"&&e!==null}function oAt(){try{const e="__some_random_key_you_are_not_going_to_use__";return window.localStorage.setItem(e,e),window.localStorage.removeItem(e),!0}catch{return!1}}function AO(e){return e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}const fu=(e,t,n)=>Math.max(t,Math.min(n,e));function nQ(e,t){return Array.from({length:t-e}).map((n,r)=>e+r)}function Xy(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;if(Array.isArray(e)){const o=e.length;if(o!==t.length)return!1;for(let i=0;i{let t=e+=1831565813;return t=Math.imul(t^t>>>15,t|1),t^=t+Math.imul(t^t>>>7,t|61),((t^t>>>14)>>>0)/4294967296}}function aAt(e){const t=iAt(e);return(n,r)=>n+(r-n)*t()}function ife(e){return typeof structuredClone=="function"?structuredClone(e):JSON.parse(JSON.stringify(e))}const sAt=["item","applyValue","type","apiRef","focusElementRef","color","error","helperText","size","variant"],lAt=["key"];function afe(e){const{item:t,applyValue:n,type:r,apiRef:o,focusElementRef:i,color:a,error:s,helperText:l,size:c,variant:u="standard"}=e,d=Dt(e,sAt),f={color:a,error:s,helperText:l,size:c,variant:u},[p,h]=v.useState(t.value||[]),m=To(),y=Ot();v.useEffect(()=>{const x=t.value??[];h(x.map(String))},[t.value]);const w=v.useCallback((x,C)=>{h(C.map(String)),n(W({},t,{value:[...C.map(E=>r==="number"?Number(E):E)]}))},[n,t,r]);return R.jsx(Ic,W({multiple:!0,freeSolo:!0,options:[],filterOptions:(x,C)=>{const{inputValue:E}=C;return E==null||E===""?[]:[E]},id:m,value:p,onChange:w,renderTags:(x,C)=>x.map((E,P)=>{const T=C({index:P}),{key:I}=T,A=Dt(T,lAt);return R.jsx(y.slots.baseChip,W({variant:"outlined",size:"small",label:E},A),I)}),renderInput:x=>{var C;return R.jsx(y.slots.baseTextField,W({},x,{label:o.current.getLocaleText("filterPanelInputLabel"),placeholder:o.current.getLocaleText("filterPanelInputPlaceholder"),InputLabelProps:W({},x.InputLabelProps,{shrink:!0}),inputRef:i,type:r||"text"},f,(C=y.slotProps)==null?void 0:C.baseTextField))}},d))}var wu=function(e){return e.Cell="cell",e.Row="row",e}(wu||{}),ar=function(e){return e.Edit="edit",e.View="view",e}(ar||{}),qn=function(e){return e.Edit="edit",e.View="view",e}(qn||{}),Zi=function(e){return e.And="and",e.Or="or",e}(Zi||{}),Gu=function(e){return e.enterKeyDown="enterKeyDown",e.cellDoubleClick="cellDoubleClick",e.printableKeyDown="printableKeyDown",e.deleteKeyDown="deleteKeyDown",e.pasteKeyDown="pasteKeyDown",e}(Gu||{}),rc=function(e){return e.cellFocusOut="cellFocusOut",e.escapeKeyDown="escapeKeyDown",e.enterKeyDown="enterKeyDown",e.tabKeyDown="tabKeyDown",e.shiftTabKeyDown="shiftTabKeyDown",e}(rc||{}),lf=function(e){return e.enterKeyDown="enterKeyDown",e.cellDoubleClick="cellDoubleClick",e.printableKeyDown="printableKeyDown",e.deleteKeyDown="deleteKeyDown",e}(lf||{}),tc=function(e){return e.rowFocusOut="rowFocusOut",e.escapeKeyDown="escapeKeyDown",e.enterKeyDown="enterKeyDown",e.tabKeyDown="tabKeyDown",e.shiftTabKeyDown="shiftTabKeyDown",e}(tc||{});function sfe(e){return e.field!==void 0}const JS=()=>({items:[],logicOperator:Zi.And,quickFilterValues:[],quickFilterLogicOperator:Zi.And});function lfe(e){return{current:e.current.getPublicApi()}}let ww;function cAt(){if(ww!==void 0)return ww;try{ww=new Function("return true")()}catch{ww=!1}return ww}const UF=(e,t)=>{const n=W({},e);if(n.id==null&&(n.id=Math.round(Math.random()*1e5)),n.operator==null){const r=jd(t)[n.field];n.operator=r&&r.filterOperators[0].value}return n},WH=(e,t,n)=>{const r=e.items.length>1;let o;r&&t?o=[e.items[0]]:o=e.items;const i=r&&o.some(s=>s.id==null);return o.some(s=>s.operator==null)||i?W({},e,{items:o.map(s=>UF(s,n))}):e.items!==o?W({},e,{items:o}):e},rQ=(e,t,n)=>r=>W({},r,{filterModel:WH(e,t,n)}),ZS=e=>typeof e=="string"?e.normalize("NFD").replace(/[\u0300-\u036f]/g,""):e,cfe=(e,t)=>{var u;if(!e.field||!e.operator)return null;const n=t.current.getColumn(e.field);if(!n)return null;let r;if(n.valueParser){const d=n.valueParser;r=Array.isArray(e.value)?(u=e.value)==null?void 0:u.map(f=>d(f,void 0,n,t)):d(e.value,void 0,n,t)}else r=e.value;const{ignoreDiacritics:o}=t.current.rootProps;o&&(r=ZS(r));const i=W({},e,{value:r}),a=n.filterOperators;if(!(a!=null&&a.length))throw new Error(`MUI X: No filter operators found for column '${n.field}'.`);const s=a.find(d=>d.value===i.operator);if(!s)throw new Error(`MUI X: No filter operator found for column '${n.field}' and operator value '${i.operator}'.`);const l=lfe(t),c=s.getApplyFilterFn(i,n);return typeof c!="function"?null:{item:i,fn:d=>{let f=t.current.getRowValue(d,n);return o&&(f=ZS(f)),c(f,d,n,l)}}};let oQ=1;const uAt=(e,t,n)=>{const{items:r}=e,o=r.map(s=>cfe(s,t)).filter(s=>!!s);if(o.length===0)return null;if(n||!cAt())return(s,l)=>{const c={};for(let u=0;u=ne)return g;var ve=M-dm(H);if(ve<1)return H;var Te=he?Qd(he,0,ve).join(""):g.slice(0,ve);if(q===n)return Te+H;if(he&&(ve+=Te.length-ve),p$(q)){if(g.slice(ve).search(q)){var Ge,qe=Te;for(q.global||(q=AR(q.source,ir(Fe.exec(q))+"g")),q.lastIndex=0;Ge=q.exec(qe);)var Ze=Ge.index;Te=Te.slice(0,Ze===n?ve:Ze)}}else if(g.indexOf(qa(q),ve)!=ve){var yt=Te.lastIndexOf(q);yt>-1&&(Te=Te.slice(0,yt))}return Te+H}function uwe(g){return g=ir(g),g&&Do.test(g)?g.replace(Gn,jge):g}var dwe=vm(function(g,C,M){return g+(M?" ":"")+C.toUpperCase()}),m$=a3("toUpperCase");function o4(g,C,M){return g=ir(g),C=M?n:C,C===n?Dge(g)?Vge(g):Pge(g):g.match(C)||[]}var i4=Pn(function(g,C){try{return Wa(g,n,C)}catch(M){return f$(M)?M:new sn(M)}}),fwe=Lu(function(g,C){return Bs(C,function(M){M=zc(M),_u(g,M,u$(g[M],g))}),g});function pwe(g){var C=g==null?0:g.length,M=Gt();return g=C?Hr(g,function(H){if(typeof H[1]!="function")throw new zs(a);return[M(H[0]),H[1]]}):[],Pn(function(H){for(var q=-1;++qF)return[];var M=K,H=Ci(g,K);C=Gt(C),g-=K;for(var q=TR(H,C);++M0||C<0)?new Nn(M):(g<0?M=M.takeRight(-g):g&&(M=M.drop(g)),C!==n&&(C=mn(C),M=C<0?M.dropRight(-C):M.take(C-g)),M)},Nn.prototype.takeRightWhile=function(g){return this.reverse().takeWhile(g).reverse()},Nn.prototype.toArray=function(){return this.take(K)},jc(Nn.prototype,function(g,C){var M=/^(?:filter|find|map|reject)|While$/.test(C),H=/^(?:head|last)$/.test(C),q=J[H?"take"+(C=="last"?"Right":""):C],ne=H||/^find/.test(C);q&&(J.prototype[C]=function(){var he=this.__wrapped__,ve=H?[1]:arguments,Te=he instanceof Nn,Ge=ve[0],qe=Te||dn(he),Ze=function(Rn){var Ln=q.apply(J,Ud([Rn],ve));return H&&yt?Ln[0]:Ln};qe&&M&&typeof Ge=="function"&&Ge.length!=1&&(Te=qe=!1);var yt=this.__chain__,Ft=!!this.__actions__.length,Yt=ne&&!yt,wn=Te&&!Ft;if(!ne&&qe){he=wn?he:new Nn(this);var Qt=g.apply(he,ve);return Qt.__actions__.push({func:bE,args:[Ze],thisArg:n}),new Vs(Qt,yt)}return Yt&&wn?g.apply(this,ve):(Qt=this.thru(Ze),Yt?H?Qt.value()[0]:Qt.value():Qt)})}),Bs(["pop","push","shift","sort","splice","unshift"],function(g){var C=W1[g],M=/^(?:push|sort|unshift)$/.test(g)?"tap":"thru",H=/^(?:pop|shift)$/.test(g);J.prototype[g]=function(){var q=arguments;if(H&&!this.__chain__){var ne=this.value();return C.apply(dn(ne)?ne:[],q)}return this[M](function(he){return C.apply(dn(he)?he:[],q)})}}),jc(Nn.prototype,function(g,C){var M=J[C];if(M){var H=M.name+"";fr.call(gm,H)||(gm[H]=[]),gm[H].push({name:C,func:M})}}),gm[fE(n,w).name]=[{name:"wrapper",func:n}],Nn.prototype.clone=ume,Nn.prototype.reverse=dme,Nn.prototype.value=fme,J.prototype.at=zve,J.prototype.chain=Vve,J.prototype.commit=Hve,J.prototype.next=Uve,J.prototype.plant=Gve,J.prototype.reverse=qve,J.prototype.toJSON=J.prototype.valueOf=J.prototype.value=Kve,J.prototype.first=J.prototype.head,A0&&(J.prototype[A0]=Wve),J},fm=Hge();Jp?((Jp.exports=fm)._=fm,vR._=fm):ci._=fm}).call(ea)})(jO,jO.exports);var WTt=jO.exports;const H5=ct(R.jsx("path",{d:"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2"}),"MoreVert"),GTt=ct(R.jsx("path",{d:"M18.4 10.6C16.55 8.99 14.15 8 11.5 8c-4.65 0-8.58 3.03-9.96 7.22L3.9 16c1.05-3.19 4.05-5.5 7.6-5.5 1.95 0 3.73.72 5.12 1.88L13 16h9V7z"}),"Redo"),qTt=ct(R.jsx("path",{d:"m7 10 5 5 5-5z"}),"ArrowDropDown"),KTt=ct(R.jsx("path",{d:"M6.23 20.23 8 22l10-10L8 2 6.23 3.77 14.46 12z"}),"ArrowForwardIos"),YTt=ct(R.jsx("path",{d:"m19 8-4 4h3c0 3.31-2.69 6-6 6-1.01 0-1.97-.25-2.8-.7l-1.46 1.46C8.97 19.54 10.43 20 12 20c4.42 0 8-3.58 8-8h3zM6 12c0-3.31 2.69-6 6-6 1.01 0 1.97.25 2.8.7l1.46-1.46C15.03 4.46 13.57 4 12 4c-4.42 0-8 3.58-8 8H1l4 4 4-4z"}),"Cached"),QTt=ct(R.jsx("path",{d:"M19 4h-1V2h-2v2H8V2H6v2H5c-1.11 0-1.99.9-1.99 2L3 20c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2m0 16H5V10h14zM9 14H7v-2h2zm4 0h-2v-2h2zm4 0h-2v-2h2zm-8 4H7v-2h2zm4 0h-2v-2h2zm4 0h-2v-2h2z"}),"CalendarMonth"),XTt=ct([R.jsx("circle",{cx:"12",cy:"12",r:"3.2"},"0"),R.jsx("path",{d:"M9 2 7.17 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2h-3.17L15 2zm3 15c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5"},"1")],"CameraAlt"),Bde=ct(R.jsx("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"ChevronRight"),JTt=ct(R.jsx("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Clear"),ZTt=ct(R.jsx("path",{d:"M22 16V4c0-1.1-.9-2-2-2H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2m-11-4 2.03 2.71L16 11l4 5H8zM2 6v14c0 1.1.9 2 2 2h14v-2H4V6z"}),"Collections"),eIt=ct(R.jsx("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2m0 16H8V7h11z"}),"ContentCopy"),T1=ct(R.jsx("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM19 4h-3.5l-1-1h-5l-1 1H5v2h14z"}),"Delete"),tIt=ct(R.jsx("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM8 9h8v10H8zm7.5-5-1-1h-5l-1 1H5v2h14V4z"}),"DeleteOutline"),zde=ct(R.jsx("path",{d:"M16 9v10H8V9zm-1.5-6h-5l-1 1H5v2h14V4h-3.5zM18 7H6v12c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2z"}),"DeleteOutlined"),nIt=ct(R.jsx("path",{d:"M20 9H4v2h16zM4 15h16v-2H4z"}),"DragHandle"),VM=ct(R.jsx("path",{d:"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.996.996 0 0 0-1.41 0l-1.83 1.83 3.75 3.75z"}),"Edit"),Vde=ct(R.jsx("path",{d:"m12.126 8.125 1.937-1.937 3.747 3.747-1.937 1.938zM20.71 5.63l-2.34-2.34a1 1 0 0 0-1.41 0l-1.83 1.83 3.75 3.75L20.71 7a1 1 0 0 0 0-1.37M2 5l6.63 6.63L3 17.25V21h3.75l5.63-5.62L18 21l2-2L4 3z"}),"EditOff"),rIt=ct(R.jsx("path",{d:"M4.25 5.61C6.27 8.2 10 13 10 13v6c0 .55.45 1 1 1h2c.55 0 1-.45 1-1v-6s3.72-4.8 5.74-7.39c.51-.66.04-1.61-.79-1.61H5.04c-.83 0-1.3.95-.79 1.61"}),"FilterAlt"),oIt=ct(R.jsx("path",{d:"M7 13c1.66 0 3-1.34 3-3S8.66 7 7 7s-3 1.34-3 3 1.34 3 3 3m12-6h-8v7H3V5H1v15h2v-3h18v3h2v-9c0-2.21-1.79-4-4-4"}),"Hotel"),Hde=ct(R.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 15h-2v-6h2zm0-8h-2V7h2z"}),"Info"),Ude=ct(R.jsx("path",{d:"M11 7h2v2h-2zm0 4h2v6h-2zm1-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8"}),"InfoOutlined"),iIt=ct(R.jsx("path",{d:"m14 6-3.75 5 2.85 3.8-1.6 1.2C9.81 13.75 7 10 7 10l-6 8h22z"}),"Landscape"),aIt=ct(R.jsx("path",{d:"m14 6-4.22 5.63 1.25 1.67L14 9.33 19 16h-8.46l-4.01-5.37L1 18h22zM5 16l1.52-2.03L8.04 16z"}),"LandscapeOutlined"),sIt=ct([R.jsx("path",{d:"M5 16h3.04l-1.52-2.03z",opacity:".3"},"0"),R.jsx("path",{d:"m9.78 11.63 1.25 1.67L14 9.33 19 16h-8.46l-4.01-5.37L1 18h22L14 6zM5 16l1.52-2.03L8.04 16z"},"1")],"LandscapeTwoTone"),lIt=ct(R.jsx("path",{d:"M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2"}),"MoreHoriz"),cIt=ct(R.jsx("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"NavigateNext"),uIt=ct([R.jsx("circle",{cx:"12",cy:"12",r:"3.2"},"0"),R.jsx("path",{d:"M9 2 7.17 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2h-3.17L15 2zm3 15c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5"},"1")],"PhotoCamera"),dIt=ct(R.jsx("path",{d:"M17 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V7zm-5 16c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3m3-10H5V5h10z"}),"Save"),U5=ct(R.jsx("path",{d:"M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6"}),"Settings"),fIt=ct(R.jsx("path",{d:"M21 5.47 12 12 7.62 7.62 3 11V8.52L7.83 5l4.38 4.38L21 3zM21 15h-4.7l-4.17 3.34L6 12.41l-3 2.13V17l2.8-2 6.2 6 5-4h4z"}),"SsidChart");function rC({callback:e}){const[t,n]=v.useState(null),[r,o]=v.useState(""),[i,a]=v.useState(!0),[s,l]=v.useState([]),[c,u]=Le(),d=v.useMemo(()=>Gk(f=>kBe(f,u.language,i).then(p=>l(p)),200),[u.language,i]);return v.useEffect(()=>{if(r===""){l(t?[t]:[]);return}return d(r),()=>{}},[t,r,d]),G(wt,{children:[b(Oc,{id:"exercise-name-autocomplete",getOptionLabel:f=>f.value,"data-testid":"autocomplete",filterOptions:f=>f,options:s,autoComplete:!0,includeInputInList:!0,filterSelectedOptions:!0,value:t,noOptionsText:c("noResults"),isOptionEqualToValue:(f,p)=>f.value===p.value,onChange:(f,p)=>{l(p?[p,...s]:s),n(p),e(p)},onInputChange:(f,p)=>{o(p)},renderInput:f=>b(nn,{...f,label:c("exercises.searchExerciseName"),fullWidth:!0,InputProps:{...f.InputProps,startAdornment:G(wt,{children:[b(Co,{position:"start",children:b(l5,{})}),f.InputProps.startAdornment]})}}),renderOption:(f,p)=>hZ("li",{...f,key:`exercise-${p.data.base_id}-${p.data.id}`,"data-testid":`autocompleter-result-${p.data.base_id}`},G(Os,{disablePadding:!0,component:"div",children:[b(sa,{children:p.data.image?b(Ac,{alt:"",src:`${mz}${p.data.image}`,variant:"rounded"}):b(Rd,{fontSize:"large"})}),b(ko,{primary:p.value,primaryTypographyProps:{style:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}},secondary:p.data.category})]}))}),u.language!==kv&&b(yk,{children:b(Mc,{control:b(La,{checked:i,onChange:(f,p)=>a(p)}),label:c("alsoSearchEnglish")})})]})}function pIt(e){var d,f;const[t,n]=Y.useState(null),[r,o]=Y.useState(null),[i]=Le(),a=Ld(),s=()=>{o(null),n(null)},l=async()=>{var p;await RBe((p=e.currentExercise.getTranslation(e.currentLanguage))==null?void 0:p.id),e.onClose(),e.onChangeLanguage()},c=async(p=!1)=>{p?await MG(e.currentExercise.id,r==null?void 0:r.uuid):await MG(e.currentExercise.id),e.onClose(),a("../overview")},u=async p=>{const h=p!==void 0?p:t;if(h!==null)try{const m=await Ok(h);o(m)}catch{o(null)}};return G(wt,{children:[b(mk,{id:"alert-dialog-title",children:i("delete")}),G(Ov,{children:[b("p",{children:i("exercises.deleteExerciseBody",{name:(d=e.currentExercise.getTranslation(e.currentLanguage))==null?void 0:d.name,language:(f=e.currentLanguage)==null?void 0:f.nameLong})}),b("p",{children:i("cannotBeUndone")}),b("p",{children:b("b",{children:i("exercises.replacements")})}),b("p",{children:i("exercises.replacementsInfoText")}),b("p",{children:i("exercises.replacementsSearch")}),b(rC,{callback:p=>{p!==null&&(n(p.data.base_id),u(p.data.base_id))}}),b(nn,{"data-testid":"exercise-id-field",id:"foo",label:"Exercise ID",onBlur:()=>u(),onChange:async p=>{n(p.target.value!==""?parseInt(p.target.value):null)},value:t??"",InputProps:{endAdornment:b(Co,{position:"start",children:b(vn,{onClick:()=>u(),children:b(YTt,{})})})},fullWidth:!0,variant:"standard"}),r===null&&b(wt,{children:b("p",{children:b("i",{children:i("exercises.noReplacementSelected")})})}),r!==null&&G(wt,{children:[G("p",{children:["Selected exercise for replacement:",b(Rc,{title:i("copyToClipboard"),children:b(vn,{onClick:()=>navigator.clipboard.writeText(r.id.toString()),children:b(eIt,{})})})]}),G(Os,{disablePadding:!0,children:[b(rz,{children:b(Ac,{children:r.mainImage?b(Ac,{alt:"",src:`${mz}${r.mainImage.url}`,variant:"rounded"}):b(Rd,{})})}),b(ko,{primary:r.getTranslation().name,secondary:`${r.id} (${r.uuid})`}),b(vn,{onClick:s,children:b(JTt,{})})]})]})]}),G(VC,{children:[b(dt,{onClick:()=>e.onClose(),children:i("cancel")}),b(dt,{"data-testid":"button-delete-translation",size:"small",onClick:l,variant:"contained",children:i("exercises.deleteTranslation")}),b(dt,{"data-testid":"button-delete-all",size:"small",onClick:()=>c(),variant:"contained",children:i("exercises.deleteExerciseFull")}),b(dt,{"data-testid":"button-delete-and-replace",size:"small",disabled:r===null,onClick:()=>c(!0),variant:"contained",children:i("exercises.deleteExerciseReplace")})]})]})}const hIt="_root_l288f_1",gIt="_detail_language_l288f_4",mIt="_detail_l288f_4",yIt="_detail_arrow_l288f_18",vIt="_languages_l288f_28",bIt="_language_l288f_28",wIt="_language_menu_l288f_40",xIt="_header_l288f_52",SIt="_toolbar_l288f_55",CIt="_dots_l288f_68",mh={root:hIt,detail_language:gIt,detail:mIt,detail_arrow:yIt,languages:vIt,language:bIt,language_menu:wIt,header:xIt,toolbar:SIt,dots:CIt},EIt=({exercise:e,languages:t,changeLanguage:n,language:r,setEditMode:o,editMode:i})=>{var P,T,I;const[a,s]=v.useState(null),[l,c]=Y.useState(!1),u=!!a,[d]=Le(),f=Xy(sg.DELETE_EXERCISE),p=Xy(sg.EDIT_EXERCISE),h=Ul(),m=h.isSuccess&&h.data===null;let y=!1;h.isSuccess&&p.isSuccess&&(y=p.data||h.data!==null&&h.data.isTrustworthy);const w=A=>{s(A.currentTarget)},x=()=>{s(null)},S=A=>{n(A),x()},E=t.map(A=>G(rn,{onClick:()=>S(A),selected:(r==null?void 0:r.id)===A.id,children:[b(ko,{children:A.nameLong}),b(sa,{children:e.availableLanguages.includes(A.id)?b(GTt,{}):b(Vo,{})})]},A.nameShort));return b(Oe,{container:!0,children:b(Oe,{size:12,children:G("div",{className:mh.root,children:[b(zC,{open:l,onClose:()=>c(!1),children:b(pIt,{onClose:()=>c(!1),onChangeLanguage:()=>n(t[0]),currentExercise:e,currentLanguage:r})}),G("div",{className:mh.detail_language,children:[G("div",{className:mh.detail,children:[b(ia,{to:"../overview",children:d("exercises.exercises")})," > ",(P=e.getTranslation(r))==null?void 0:P.name]}),b("div",{className:mh.languages,children:G("div",{className:mh.language,children:[b(dt,{size:"small",id:"basic-button",onClick:w,startIcon:b(H5,{}),children:r==null?void 0:r.nameLong}),G(_s,{id:"basic-menu",anchorEl:a,open:u,onClose:x,MenuListProps:{"aria-labelledby":"basic-button"},sx:{padding:20},children:[b(rn,{disabled:!0,children:d("exercises.changeExerciseLanguage")}),b(Is,{}),E]})]})})]}),G("div",{className:mh.header,children:[b(ot,{gutterBottom:!0,variant:"h2",margin:0,sx:{mt:2},children:(T=e.getTranslation(r))==null?void 0:T.name}),!m&&G("nav",{className:mh.toolbar,children:[f.isSuccess&&f.data&&(r==null?void 0:r.id)===((I=e.getTranslation(r))==null?void 0:I.language)&&b(dt,{onClick:()=>c(!0),children:d("delete")}),y&&b(dt,{onClick:()=>o(!0),disabled:i,children:"EDIT"}),b(dt,{onClick:()=>o(!1),disabled:!i,children:"VIEW"})]})]}),G(Wt,{direction:"row",spacing:1,mt:2,children:[b(vu,{label:d(Fa(e.category.name)),size:"small"}),e.equipment.map(A=>b(vu,{label:d(Fa(A.name)),variant:"outlined",size:"small"},A.id))]})]})})})},hi=()=>b(en,{sx:{height:40}}),PIt=()=>{var m;const[e,t]=v.useState(),[n,r]=v.useState(),[o,i]=v.useState(!1),a=Lc(),s=a.baseID?WTt.parseInt(a.baseID):0;Le();const l=Ld(),c=Bp(),u=ho({queryKey:[fje,s],queryFn:()=>Ok(s),enabled:c.isSuccess}),d=ho({queryKey:[dje,(m=u.data)==null?void 0:m.variationId],queryFn:()=>{var y;return IBe((y=u.data)==null?void 0:y.variationId)},enabled:u.isSuccess});if(u.isError||c.isError||d.isError)return l("/not-found"),null;const f=y=>{var x;const w=Fb(y.nameShort,c.data);t(w),r((x=u.data)==null?void 0:x.getTranslation(y))},p=d.isSuccess?d.data.filter(y=>y.id!==s):[];let h;return u.isSuccess&&c.isSuccess&&(h=o?b(jTt,{exercise:u.data,language:e}):b(UTt,{exercise:u.data,language:e,variations:p,setEditMode:i})),G(wt,{children:[u.isSuccess&&c.isSuccess&&b(kc,{children:b(EIt,{exercise:u.data,languages:c.data,changeLanguage:f,language:e,setEditMode:i,editMode:o})}),b(hi,{}),G(kc,{maxWidth:"lg",children:[u.isLoading&&c.isLoading&&b(ys,{}),h]})]})};function Wde(e){const[t]=Le(),[n,r,o]=Ns(e.fieldName),[i,a]=v.useState(""),s=u=>{o.setValue(n.value.filter((d,f)=>f!==u))},l=(u,d)=>{n.value[u]=d,o.setValue(n.value)},c=()=>{n.value.push(i),o.setValue(n.value),a("")};return G(wt,{children:[b(Oe,{size:12,children:b(nn,{fullWidth:!0,label:t("exercises.newNote"),sx:{mb:3},variant:"standard",value:i,onChange:u=>a(u.target.value),error:r.touched&&!!r.error,helperText:r.touched&&r.error?r.error:t("exercises.notesHelpText"),InputProps:{endAdornment:b(Co,{position:"end",children:b(vn,{onClick:c,children:b(Vo,{})})})}})}),n.value.map((u,d)=>b(nn,{fullWidth:!0,value:u,onChange:f=>l(d,f.target.value),sx:{mt:2},variant:"standard",error:r.touched&&!!r.error,InputProps:{endAdornment:b(Co,{position:"end",children:b(vn,{onClick:()=>s(d),children:b(T1,{})})})}},d))]})}const TIt=({onContinue:e,onBack:t})=>{const[n]=Le(),[r,o]=m0(),i=Ha({description:F5(n),notes:Dde(n)});return b(Va,{initialValues:{description:r.descriptionEn,notes:r.notesEn},validationSchema:i,onSubmit:a=>{o(VPt(a.description)),o(HPt(a.notes)),e()},children:b(pa,{children:G(Wt,{children:[b(z5,{fieldName:"description"}),b(hi,{}),b(Wde,{fieldName:"notes"}),b(Oe,{container:!0,children:b(Oe,{display:"flex",justifyContent:"end",size:12,children:b(en,{sx:{mb:2},children:G("div",{children:[b(dt,{onClick:t,sx:{mt:1,mr:1},children:n("goBack")}),b(dt,{variant:"contained",type:"submit",sx:{mt:1,mr:1},children:n("continue")})]})})})})]})})})},IIt=({onContinue:e,onBack:t})=>{const[n]=Le(),r=Bp(),[o,i]=m0(),[a,s]=v.useState(o.languageId!==null),l=Ha(a?{description:F5(n),name:N5(n),alternativeNames:L5(n),notes:Dde(n),language:Pa().required()}:{});return b(Va,{initialValues:{name:o.nameI18n,alternativeNames:o.alternativeNamesI18n,description:o.descriptionI18n,language:o.languageId===null?"":o.languageId,notes:o.notesI18n},validationSchema:l,onSubmit:c=>{i(WPt(c.name)),i(GPt(c.description)),i(KPt(c.alternativeNames)),i(tTt(c.language===""?null:c.language)),i(qPt(c.notes)),e()},children:c=>G(pa,{children:[G(Wt,{spacing:2,children:[b(yk,{children:b(Mc,{checked:a,onClick:()=>s(!a),control:b(La,{}),label:n("exercises.translateExerciseNow")})}),a&&G(wt,{children:[r.isLoading?b(en,{children:b(ys,{})}):G(kb,{fullWidth:!0,children:[b(Mb,{id:"label-language",children:n("language")}),b(Lg,{labelId:"label-language",id:"language",value:c.getFieldProps("language").value,onChange:u=>{c.setFieldValue(c.getFieldProps("language").name,u.target.value)},label:n("language"),error:!!(c.touched.language&&c.errors.language),children:r.data.filter(u=>u.id!==Av).map(u=>G(rn,{value:u.id,children:[u.nameShort," - ",u.nameLong]},u.id))})]}),b(_5,{fieldName:"name"}),b(D5,{fieldName:"alternativeNames"}),b(z5,{fieldName:"description"}),b(hi,{}),b(Wde,{fieldName:"notes"})]})]}),b(Oe,{container:!0,children:b(Oe,{display:"flex",justifyContent:"end",size:12,children:b(en,{sx:{mb:2},children:G("div",{children:[b(dt,{onClick:t,sx:{mt:1,mr:1},children:n("goBack")}),b(dt,{variant:"contained",type:"submit",sx:{mt:1,mr:1},children:n("continue")})]})})})})]})})};function OIt(e){const[t]=Le(),[n,r]=Ns(e.fieldName);return b(nn,{fullWidth:!0,id:e.fieldName,label:t("licenses.authors"),variant:"standard",error:r.touched&&!!r.error,helperText:r.touched&&r.error,...n})}function AIt(e){const[t]=Le(),[n,r]=Ns(e.fieldName);return b(nn,{fullWidth:!0,id:e.fieldName,label:t("licenses.authorProfile"),variant:"standard",placeholder:"https://",error:r.touched&&!!r.error,helperText:r.touched&&r.error,...n})}function kIt(e){const[t]=Le(),[n,r]=Ns(e.fieldName);return b(nn,{fullWidth:!0,id:e.fieldName,label:t("licenses.derivativeSourceUrl"),variant:"standard",placeholder:"https://",error:r.touched&&!!r.error,helperText:t("licenses.derivativeSourceUrlHelper")||r.touched&&r.error,...n})}function MIt(e){const[t]=Le(),[n,r]=Ns(e.fieldName);return b(nn,{fullWidth:!0,id:e.fieldName,label:t("licenses.originalObjectUrl"),variant:"standard",placeholder:"https://",error:r.touched&&!!r.error,helperText:r.touched&&r.error,...n})}function RIt(e){const[t]=Le(),[n,r]=Ns(e.fieldName);return b(nn,{fullWidth:!0,id:e.fieldName,label:t("licenses.originalTitle"),variant:"standard",error:r.touched&&!!r.error,helperText:r.touched&&r.error,...n})}function $It(e){const[t]=Le(),[n,r]=v.useState(Ju.PHOTO),[o,i,a]=Ns(e.fieldName);return G(tLe,{value:n,exclusive:!0,fullWidth:!0,onChange:(l,c)=>{r(c),a.setValue(c)},"aria-label":"text alignment",children:[b(iw,{value:Ju.PHOTO,children:G(Wt,{justifyContent:"center",alignItems:"center",children:[b(uIt,{}),b(ot,{variant:"caption",children:t("exercises.imageStylePhoto")})]})}),b(iw,{value:Ju.THREE_D,children:G(Wt,{justifyContent:"center",alignItems:"center",children:[b(iIt,{}),b(ot,{variant:"caption",children:t("exercises.imageStyle3D")})]})}),b(iw,{value:Ju.LINE_ART,children:G(Wt,{justifyContent:"center",alignItems:"center",children:[b(aIt,{}),b(ot,{variant:"caption",children:t("exercises.imageStyleLine")})]})}),b(iw,{value:Ju.LOW_POLY,children:G(Wt,{justifyContent:"center",alignItems:"center",children:[b(sIt,{}),b(ot,{variant:"caption",children:t("exercises.imageStyleLowPoly")})]})}),b(iw,{value:Ju.OTHER,children:G(Wt,{justifyContent:"center",alignItems:"center",children:[b(lIt,{}),b(ot,{variant:"caption",children:t("exercises.imageStyleOther")})]})})]})}const DIt=({onContinue:e,onBack:t})=>{const[n]=Le(),r=Ul(),[o,i]=m0(),[a,s]=v.useState(o.images),[l,c]=v.useState(void 0),[u,d]=Y.useState(!1),f=()=>d(!1);v.useEffect(()=>{i(nTt(a))},[i,a]);const p=x=>{var P;if(!((P=x.target.files)!=null&&P.length))return;const[S]=x.target.files,E=URL.createObjectURL(S);d(!0),c({url:E,file:S,author:"",authorUrl:"",title:"",derivativeSourceUrl:"",objectUrl:"",style:Ju.PHOTO.toString()})},h=x=>{s(a.concat({url:l==null?void 0:l.url,file:l==null?void 0:l.file,author:x.author,authorUrl:x.authorUrl,title:x.title,derivativeSourceUrl:x.derivativeSourceUrl,objectUrl:x.objectUrl,style:x.imageStyle.toString()})),f()},m=x=>{const S=a.filter(E=>E.url!==x);s(S)},y=()=>{e()};return G("div",{children:[b(Ab,{open:u,onClose:f,"aria-labelledby":"modal-modal-title","aria-describedby":"modal-modal-description",children:G(en,{sx:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:600,bgcolor:"background.paper",boxShadow:24,p:4},children:[b(ot,{id:"modal-modal-title",variant:"h6",component:"h2",children:n("exercises.imageDetails")}),G(Oe,{container:!0,spacing:2,children:[b(Oe,{size:4,children:l&&b("img",{style:{width:"100%"},src:l.url,alt:"",loading:"lazy"})}),b(Oe,{size:8,children:b(Va,{initialValues:{title:"",objectUrl:"",author:r.isSuccess?r.data.username:"",authorUrl:"",derivativeSourceUrl:"",imageStyle:Ju.PHOTO},onSubmit:x=>{console.log(x),h(x)},children:x=>G(pa,{children:[G(Wt,{spacing:2,children:[b(RIt,{fieldName:"title"}),b(MIt,{fieldName:"objectUrl"}),b(OIt,{fieldName:"author"}),b(AIt,{fieldName:"authorUrl"}),b(kIt,{fieldName:"derivativeSourceUrl"}),b($It,{fieldName:"imageStyle"}),G(kl,{icon:b(Hde,{fontSize:"inherit"}),severity:"info",children:["By submitting this image, you agree to release it under the ",b("a",{href:"https://creativecommons.org/licenses/by-sa/4.0/",target:"_blank",rel:"noreferrer",children:"CC BY-SA 4.0"})," license. The image must be either your own work or the author must have released in under a license compatible with CC BY-SA 4.0."]})]}),b(Wt,{direction:"row",justifyContent:"end",sx:{mt:2},children:b(dt,{color:"primary",variant:"contained",type:"submit",sx:{mt:2},children:n("add")})})]})})})]})]})}),b(ot,{children:n("exercises.compatibleImagesCC")}),G(Wt,{direction:"row",justifyContent:"center",children:[G("div",{children:[b("label",{htmlFor:"camera-input",children:b(XTt,{fontSize:"large",sx:{m:2}})}),b("input",{style:{display:"none"},id:"camera-input",type:"file",accept:"image/*",capture:"environment",onChange:p})]}),G("div",{children:[b("label",{htmlFor:"image-input",children:b(ZTt,{fontSize:"large",sx:{m:2}})}),b("input",{type:"file",accept:"image/*",name:"image-file",id:"image-input",style:{display:"none"},onChange:p})]})]}),b(Une,{cols:3,style:{maxHeight:"400px"},children:a.map(x=>G(Wne,{children:[b("img",{style:{maxHeight:"400px",maxWidth:"400px"},src:x.url,alt:"",loading:"lazy"}),b(J$e,{title:x.title,subtitle:x.author,actionIcon:b(vn,{onClick:()=>m(x.url),sx:{color:"white"},children:b(tIt,{})})})]},x.url))}),b(ot,{children:n("forms.supportedImageFormats")}),b(Oe,{container:!0,children:b(Oe,{display:"flex",justifyContent:"end",size:12,children:b(en,{sx:{mb:2},children:G(wt,{children:[b(dt,{onClick:t,sx:{mt:1,mr:1},children:n("goBack")}),b(dt,{variant:"contained",onClick:y,sx:{mt:1,mr:1},children:n("continue")})]})})})})]})},_It="exercisecomment",qY=async e=>{const t=new Qre,n=ft(_It),r=await tt.post(n,t.toJson(e),{headers:ht()});return t.fromJson(r.data)},NIt="variation",LIt=async()=>{const e=ft(NIt);return(await tt.post(e,{},{headers:ht()})).data.id},FIt=({onBack:e})=>{const[t,n]=Le(),[r]=m0(),o=Ld(),i=LM(),a=Bp(),s=S1(),l=FM(),c=Ul(),[u,d]=v.useState("initial"),f=async()=>{d("loading");let h;r.newVariationBaseId!==null?h=await LIt():h=r.variationId;const m=await OBe(r.category,r.equipment,r.muscles,r.musclesSecondary,h,c.data.username),y=await $N(m,Av,r.nameEn,r.descriptionEn,c.data.username);for(const w of r.alternativeNamesEn)await DN(y.id,w);for(const w of r.images)await roe({exerciseId:m,image:w.file,imageData:w});for(const w of r.notesEn)await qY(new RN(null,y.id,w));if(r.languageId!==null){const w=await $N(m,r.languageId,r.nameI18n,r.descriptionI18n,c.data.username);for(const x of r.alternativeNamesI18n)await DN(w.id,x);for(const x of r.notesI18n)await qY(new RN(null,w.id,x))}console.log("Exercise created"),d("done")},p=()=>{o(Mn(Tn.EXERCISE_OVERVIEW,n.language))};return l.isLoading||a.isLoading||s.isLoading||i.isLoading?b(mo,{}):G(wt,{children:[b(ot,{variant:"h6",children:t("exercises.step1HeaderBasics")}),b($c,{children:b($l,{children:G(Dl,{children:[G(Ht,{children:[b(Ie,{children:t("name")}),b(Ie,{children:r.nameEn})]}),G(Ht,{children:[b(Ie,{children:t("exercises.alternativeNames")}),b(Ie,{children:r.alternativeNamesEn.join(", ")})]}),G(Ht,{children:[b(Ie,{children:t("description")}),b(Ie,{children:r.descriptionEn})]}),G(Ht,{children:[b(Ie,{children:t("exercises.notes")}),b(Ie,{children:r.notesEn.map(h=>G(wt,{children:[h,b("br",{})]}))})]}),G(Ht,{children:[b(Ie,{children:t("category")}),b(Ie,{children:t(Fa(i.data.find(h=>h.id===r.category).name))})]}),G(Ht,{children:[b(Ie,{children:t("exercises.equipment")}),b(Ie,{children:r.equipment.map(h=>t(Fa(l.data.find(m=>m.id===h).name))).join(", ")})]}),G(Ht,{children:[b(Ie,{children:t("exercises.muscles")}),b(Ie,{children:r.muscles.map(h=>s.data.find(m=>m.id===h).getName(t)).join(", ")})]}),G(Ht,{children:[b(Ie,{children:t("exercises.secondaryMuscles")}),b(Ie,{children:r.musclesSecondary.map(h=>s.data.find(m=>m.id===h).getName(t)).join(", ")})]}),G(Ht,{children:[b(Ie,{children:t("exercises.variations")}),G(Ie,{children:[r.variationId," / ",r.newVariationBaseId]})]})]})})}),r.images.length>0&&b(Une,{cols:3,style:{maxHeight:"200px"},children:r.images.map(h=>b(Wne,{children:b("img",{style:{maxHeight:"200px",maxWidth:"200px"},src:h.url,alt:"",loading:"lazy"})},h.url))}),r.languageId!==null&&G(wt,{children:[b(ot,{variant:"h6",sx:{mt:3},children:a.data.find(h=>h.id===r.languageId).nameLong}),b($c,{children:b($l,{children:G(Dl,{children:[G(Ht,{children:[b(Ie,{children:t("name")}),b(Ie,{children:r.nameI18n})]}),G(Ht,{children:[b(Ie,{children:t("exercises.alternativeNames")}),b(Ie,{children:r.alternativeNamesI18n.join(", ")})]}),G(Ht,{children:[b(Ie,{children:t("description")}),b(Ie,{children:r.descriptionI18n})]}),G(Ht,{children:[b(Ie,{children:t("exercises.notes")}),b(Ie,{children:r.notesI18n.map(h=>G(wt,{children:[h,b("br",{})]}))})]})]})})})]}),u!=="done"?b(kl,{severity:"info",sx:{mt:2},children:t("exercises.checkInformationBeforeSubmitting")}):G(kl,{severity:"success",sx:{mt:2},children:[b(cI,{children:t("success")}),t("exercises.cacheWarning")]}),b(Oe,{container:!0,children:b(Oe,{display:"flex",justifyContent:"end",size:12,children:b(en,{sx:{mb:2},children:G("div",{children:[u!=="done"&&b(dt,{onClick:e,sx:{mt:1,mr:1},children:t("goBack")}),u!=="done"&&b(dt,{variant:"contained",disabled:u!=="initial",onClick:f,sx:{mt:1,mr:1},color:"info",children:t("exercises.submitExercise")}),u==="done"&&G(dt,{variant:"contained",onClick:p,sx:{mt:1,mr:1},color:"success",children:[t("overview"),b(cIt,{})]})]})})})})]})},jIt=()=>{const[e]=Le(),[t,n]=Y.useState(0),r=()=>{n(i=>i+1)},o=()=>{n(i=>i-1)};return b(oTt,{children:G(kc,{maxWidth:"md",children:[b(Wt,{direction:"row",children:b(ot,{gutterBottom:!0,variant:"h3",component:"div",children:e("exercises.contributeExercise")})}),b(en,{children:G(_2e,{activeStep:t,orientation:"vertical",children:[G(km,{children:[b(ff,{children:e("exercises.step1HeaderBasics")}),b(Mm,{children:b(iTt,{onContinue:r,onBack:o})})]},1),G(km,{children:[b(ff,{children:e("exercises.variations")}),b(Mm,{children:b(sTt,{onContinue:r,onBack:o})})]},2),G(km,{children:[b(ff,{children:e("description")}),b(Mm,{children:b(TIt,{onContinue:r,onBack:o})})]},3),G(km,{children:[b(ff,{children:e("translation")}),b(Mm,{children:b(IIt,{onContinue:r,onBack:o})})]},4),G(km,{children:[b(ff,{children:e("images")}),b(Mm,{children:b(DIt,{onContinue:r,onBack:o})})]},5),G(km,{children:[b(ff,{children:e("overview")}),b(Mm,{children:b(FIt,{onBack:o})})]},6)]})})]})})},BIt=()=>{const[e]=Le(),t=V5();return G(kc,{maxWidth:"md",children:[b(ot,{variant:"h3",children:e("exercises.notEnoughRightsHeader")}),G(en,{marginTop:4,padding:4,sx:{width:"100%",backgroundColor:"#ebebeb",textAlign:"center"},children:[b(ot,{mb:2,children:e("exercises.notEnoughRights",{days:sje})}),!t.anonymous&&!t.emailVerified&&b(dt,{variant:"contained",href:"/user/preferences",endIcon:b(KTt,{}),children:e("preferences")})]})]})},zIt=()=>{const e=V5();return b(wt,{children:e.canContribute?b(jIt,{}):b(BIt,{})})},VIt=()=>b("div",{children:"Add Weight Page"}),HIt=({currentMonth:e,currentYear:t,onPrevMonth:n,onNextMonth:r})=>{const{i18n:o}=Le(),i=Array.from({length:12},(a,s)=>new Date(2024,s,1).toLocaleString(o.language,{month:"long"}));return G("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",width:"100%",paddingBottom:"3%"},children:[b(dt,{variant:"outlined",onClick:n,children:"<"}),G(ot,{variant:"h5",children:[i[e]," ",t]}),b(dt,{variant:"outlined",onClick:r,children:">"})]})},UIt=({day:e,currentMonth:t,currentDate:n,selectedDay:r,onClick:o})=>{const i=no(),a=op(i.breakpoints.down("sm")),s=op(i.breakpoints.down("md")),l=Kf(e.date,r.date),c=Kf(e.date,n),u=e.date.getMonth()===t&&(e.date.getDate()<=n.getDate()||e.date.getMonth()l||c?"white":u?d?"#E53945":"black":"gray",p=()=>a?35:s?40:50,h=()=>a?8:s?9:10,m=()=>e.measurements.length>0||e.weightEntry!==void 0,y=()=>{u&&o(e)},w=p(),x=h();return G("div",{style:{position:"relative",width:`${w}px`,height:`${w+x/2}px`,display:"flex",flexDirection:"column",alignItems:"center"},children:[b("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",width:`${w}px`,height:`${w}px`,fontSize:a?"0.8rem":s?"0.9rem":"1rem",color:l||c?"white":f(),backgroundColor:l?"#E53945":c?"#FEC107":"transparent",borderRadius:"50%",fontWeight:"bold",cursor:u?"pointer":"default",opacity:e.date.getMonth()!==t?.25:1},onClick:y,children:e.date.getDate()}),m()&&b("div",{style:{width:`${x}px`,height:`${x}px`,backgroundColor:"black",borderRadius:"50%",position:"absolute",bottom:0,left:"50%",transform:"translateX(-50%)",zIndex:2}})]})},WIt=({days:e,currentMonth:t,currentDate:n,selectedDay:r,onDayClick:o})=>{const{i18n:i}=Le(),a=Array.from({length:7},(s,l)=>new Date(1970,0,l+5).toLocaleString(i.language,{weekday:"short"}));return G(lD,{container:!0,spacing:1,rowSpacing:2,children:[a.map((s,l)=>b(lD,{item:!0,xs:12/7,children:b(ot,{variant:"body1",sx:{fontWeight:"bold",textAlign:"center"},children:s})},`weekday-${l}`)),e.map((s,l)=>b(lD,{item:!0,xs:12/7,sx:{display:"flex",justifyContent:"center"},children:b(UIt,{day:s,currentMonth:t,currentDate:n,selectedDay:r,onClick:o})},`day-${l}`))]})},GIt=({selectedDay:e})=>{const[t]=Le(),n=t("no_entries_for_day");return G(to,{sx:{width:{xs:"auto",md:"65%"},height:{xs:"60%",md:"100%"},m:{xs:0,sm:1,md:2},p:{xs:1,sm:1.5,md:2}},children:[b(jl,{title:G(ot,{variant:"h5",component:"div",sx:{fontWeight:"bold"},children:[t("entries")," - ",e.date.toLocaleDateString()]})}),G(ni,{sx:{flex:1,overflow:"auto",display:"flex",flexDirection:"column",gap:2},children:[G("div",{className:"flex items-center gap-2",children:[G("span",{className:"font-extrabold",children:[t("weight"),": "]}),b("span",{className:`${e.weightEntry?"text-xl font-semibold":"text-gray-500"}`,children:e.weightEntry?`${e.weightEntry.weight.toFixed(1)} kg`:n})]}),G("div",{className:"flex flex-col gap-1",children:[G("span",{className:"font-bold",children:[t("measurements.measurements"),": "]}),e.measurements.length===0?b("span",{className:"text-gray-500 mt-1",children:n}):b("div",{className:"flex flex-col gap-0.5",children:e.measurements.map(r=>G("div",{children:[r.name,": ",r.value," ",r.unit]},r.name))})]})]})]})};class qIt{constructor(t,n,r,o){this.name=t,this.unit=n,this.value=r,this.date=o}}function Gde(){return ho({queryKey:[Nb],queryFn:Ize})}const KIt=()=>{const e=Lt();return jt({mutationFn:t=>Aze(t),onSuccess:()=>e.invalidateQueries({queryKey:[Nb]})})},YIt=e=>{const t=Lt();return jt({mutationFn:n=>kze(n),onSuccess:()=>{t.invalidateQueries({queryKey:[_b,e]}),t.invalidateQueries({queryKey:[Nb]})}})},QIt=e=>{const t=Lt();return jt({mutationFn:n=>Mze(n),onSuccess:()=>{t.invalidateQueries({queryKey:[_b,e]}),t.invalidateQueries({queryKey:[Nb]})}})};function qde(e){return ho({queryKey:[_b,e],queryFn:()=>Oze(e)})}const XIt=()=>{const e=Lt();return jt({mutationFn:t=>Dze(t),onError:t=>{console.log(t)},onSuccess:()=>{e.invalidateQueries({queryKey:[_b]}),e.invalidateQueries({queryKey:[Nb]})}})},Kde=()=>{const e=Lt();return jt({mutationFn:t=>$ze(t),onSuccess:()=>{e.invalidateQueries({queryKey:[_b]}),e.invalidateQueries({queryKey:[Nb]})}})},JIt=()=>{const e=Lt();return jt({mutationFn:t=>Rze(t),onSuccess:()=>e.invalidateQueries({queryKey:[_b]})})};function ZIt(){const t=Gde().data;return(t==null?void 0:t.flatMap(n=>n.entries.map(r=>new qIt(n.name,n.unit,r.value,r.date))))??[]}const eOt=()=>{const[e]=Le(),n=E1().data,r=ZIt(),o=(S,E)=>{const P=new Date(S,E,1),T=[];let A=new Date(S,E,1).getDay();A=A===0?6:A-1;for(let $=0;$Kf($.date,P)),measurements:r.filter($=>Kf($.date,P))}),P.setDate(P.getDate()+1);A=new Date(S,E+1,0).getDay();const O=A===0?0:7-A;for(let $=1;$<=O;$++)T.push({date:new Date(S,E+1,$),weightEntry:void 0,measurements:[]});return T},i=new Date,a={date:i,weightEntry:void 0,measurements:[]},[s,l]=v.useState(i.getMonth()),[c,u]=v.useState(i.getFullYear()),d=o(c,s),[f,p]=v.useState(d.find(S=>Kf(S.date,i))||a),h=no(),m=op(h.breakpoints.down("sm"));v.useEffect(()=>{l(f.date.getMonth()),u(f.date.getFullYear())},[f]);const y=S=>{p(S)},w=()=>{s===0?(l(11),u(c-1)):l(s-1)},x=()=>{(sb("div",{children:b(eOt,{})}),nOt=()=>b("div",{children:"Calories Calculator Page"}),rOt=()=>b("div",{children:"Equipments Page"}),oOt=()=>b("div",{children:"Gallery Page"}),iOt=()=>b("div",{children:"Ingredients Page"}),aOt=()=>b("div",{children:"Login Page"}),sOt=()=>b("div",{children:"Preferences Page"}),lOt=()=>b("div",{children:"Public Template"}),cOt=()=>b("div",{children:"RestApi Page"}),uOt=()=>b("div",{children:"Your Template"}),dOt=({weight:e})=>{const t=C1t(),[n]=Le(),[r,o]=Y.useState(null),[i,a]=Y.useState(!1),s=!!r,l=h=>{o(h.currentTarget)},c=()=>{u(),f()},u=()=>{o(null)},d=()=>{t.mutate(e.id),o(null)},f=()=>a(!0),p=()=>a(!1);return G("div",{children:[b(dt,{onClick:l,children:b(qTt,{})}),G(_s,{anchorEl:r,open:s,onClose:u,MenuListProps:{"aria-labelledby":"basic-button"},children:[b(rn,{onClick:c,children:n("edit")}),b(rn,{onClick:d,children:n("delete")})]}),b(Fi,{title:n("edit"),isOpen:i,closeFn:p,children:b(h0,{weightEntry:e,closeFn:p})})]})},fOt=()=>{const[e]=Le(),[t,n]=Y.useState(!1),r=()=>n(!0),o=()=>n(!1);return G("div",{children:[b(Ng,{color:"primary","aria-label":"add",onClick:r,sx:{position:"fixed",bottom:"5rem",right:i=>i.spacing(2),zIndex:9},children:b(Vo,{})}),b(Fi,{title:e("add"),isOpen:t,closeFn:o,children:b(h0,{closeFn:o})})]})},pOt=e=>e.map((t,n)=>n===0?{entry:t,change:0,days:Math.abs(t.date.getTime()-t.date.getTime())/(1e3*60*60*24)}:{entry:t,change:e[n].weight-e[n-1].weight,days:Math.abs(t.date.getTime()-e[n-1].date.getTime())/(1e3*60*60*24)}),hOt=Ade(e=>({table:{"& .MuiPaper-root":{border:"1px solid #bababa"}}})),gOt=({weights:e})=>{const t=[10,50,100],[n]=Le(),r=hOt(),o=pOt(e),[i,a]=v.useState(t[0]),[s,l]=v.useState(0),c=(d,f)=>{l(f)},u=d=>{a(parseInt(d.target.value,10)),l(0)};return G("div",{className:r.table,children:[G($c,{children:[G($l,{sx:{minWidth:650},"aria-label":"simple table",children:[b(Eu,{children:G(Ht,{children:[b(Ie,{align:"center",children:n("date")}),b(Ie,{align:"center",children:n("weight")}),b(Ie,{align:"center",children:n("difference")}),b(Ie,{align:"center",children:n("days")}),b(Ie,{align:"center"})]})}),b(Dl,{children:o.slice(s*i,s*i+i).map(d=>G(Ht,{sx:{"&:last-child td, &:last-child th":{border:0}},children:[b(Ie,{component:"th",scope:"row",align:"center",children:d.entry.date.toLocaleDateString()}),b(Ie,{align:"center",children:d.entry.weight}),b(Ie,{align:"center",children:+d.change.toFixed(2)}),b(Ie,{align:"center",children:d.days}),b(Ie,{align:"center",children:b(dOt,{weight:d.entry})})]},d.entry.date.toLocaleDateString()))})]}),b(sz,{rowsPerPageOptions:t,component:"div",count:o.length,rowsPerPage:i,page:s,onPageChange:c,onRowsPerPageChange:u})]}),b(fOt,{})]})},mOt=()=>{const[e]=Le(),[t,n]=v.useState(!1),r=()=>n(!0),o=()=>n(!1);return G("div",{children:[b(Ng,{color:"secondary","aria-label":"add",onClick:r,sx:{position:"fixed",bottom:"5rem",right:i=>i.spacing(2),zIndex:9},children:b(Vo,{})}),b(Fi,{title:e("add"),isOpen:t,closeFn:o,children:b(h0,{closeFn:o})})]})},yOt=({currentFilter:e,onFilterChange:t})=>{const[n]=Le(),r=no(),o=i=>{e!==i&&t(i)};return G(fN,{variant:"outlined",sx:{mb:2},children:[b(dt,{onClick:()=>o(""),color:e===""?"primary":"inherit",variant:e===""?"contained":"outlined",sx:{fontFamily:r.typography.fontFamily},children:n("all")}),b(dt,{onClick:()=>o("lastYear"),color:e==="lastYear"?"primary":"inherit",variant:e==="lastYear"?"contained":"outlined",sx:{fontFamily:r.typography.fontFamily},children:n("lastYear")}),b(dt,{onClick:()=>o("lastHalfYear"),color:e==="lastHalfYear"?"primary":"inherit",variant:e==="lastHalfYear"?"contained":"outlined",sx:{fontFamily:r.typography.fontFamily},children:n("lastHalfYear")}),b(dt,{onClick:()=>o("lastMonth"),color:e==="lastMonth"?"primary":"inherit",variant:e==="lastMonth"?"contained":"outlined",sx:{fontFamily:r.typography.fontFamily},children:n("lastMonth")}),b(dt,{onClick:()=>o("lastWeek"),color:e==="lastWeek"?"primary":"inherit",variant:e==="lastWeek"?"contained":"outlined",sx:{fontFamily:r.typography.fontFamily},children:n("lastWeek")})]})},Fd=e=>G(kc,{maxWidth:"lg",children:[G(Oe,{container:!0,spacing:2,children:[b(Oe,{sx:{mb:2},size:8,children:G(Wt,{direction:"row",justifyContent:"space-between",alignItems:"center",children:[b(ot,{gutterBottom:!0,variant:"h3",children:e.title}),e.optionsMenu]})}),b(Oe,{size:{xs:12,sm:8},children:e.mainContent}),b(Oe,{size:{xs:12,sm:4},children:e.sideBar})]}),e.fab]}),vOt=()=>{const[e]=Le(),[t,n]=v.useState("lastYear"),r=E1(t),o=i=>{n(i)};return r.isLoading?b(mo,{}):b(Fd,{title:e("weight"),mainContent:G(Wt,{spacing:2,children:[b(yOt,{currentFilter:t,onFilterChange:o}),r.data.length===0&&b(KC,{}),r.data.length!==0&&G(wt,{children:[b(kde,{weights:r.data}),b(en,{sx:{mt:4}}),b(gOt,{weights:r.data})]})]}),fab:b(mOt,{})})},bOt=()=>{const{i18n:e}=Le(),[t,n]=Y.useState(null);return G(wt,{children:[b(dt,{color:"inherit",onClick:r=>n(r.currentTarget),children:"Weight"}),G(_s,{anchorEl:t,open:!!t,onClose:()=>n(null),children:[b(rn,{component:ia,to:Mn(Tn.WEIGHT_OVERVIEW,e.language),children:"Weight overview"}),b(rn,{component:ia,to:Mn(Tn.WEIGHT_ADD,e.language),children:"Add weight entry"})]})]})},wOt=()=>{const{i18n:e}=Le(),[t,n]=Y.useState(null);return G(wt,{children:[b(dt,{color:"inherit",onClick:r=>n(r.currentTarget),children:"Measurements"}),b(_s,{anchorEl:t,open:!!t,onClose:()=>n(null),children:b(rn,{component:ia,to:Mn(Tn.MEASUREMENT_OVERVIEW,e.language),children:"Overview"})})]})},xOt=()=>{const{i18n:e}=Le(),[t,n]=Y.useState(null);return G(wt,{children:[b(dt,{color:"inherit",onClick:r=>n(r.currentTarget),children:"Nutrition"}),b(_s,{anchorEl:t,open:!!t,onClose:()=>n(null),children:b(rn,{component:ia,to:Mn(Tn.NUTRITION_OVERVIEW,e.language),children:"Overview"})})]})},SOt=()=>{const{i18n:e}=Le(),[t,n]=Y.useState(null);return G(wt,{children:[b(dt,{color:"inherit",onClick:r=>n(r.currentTarget),children:"Routines"}),G(_s,{anchorEl:t,open:!!t,onClose:()=>n(null),children:[b(rn,{component:ia,to:Mn(Tn.ROUTINE_OVERVIEW,e.language),children:"Routine overview"}),b(rn,{component:ia,to:Mn(Tn.EXERCISE_OVERVIEW,e.language),children:"Exercise overview"}),b(rn,{component:ia,to:Mn(Tn.EXERCISE_CONTRIBUTE,e.language),children:"Contribute exercise"}),b(rn,{component:ia,to:Mn(Tn.CALENDAR,e.language),children:"Calendar"})]})]})},COt=()=>b(_Oe,{position:"static",children:G(nre,{children:[b(ot,{variant:"h6",component:"div",mr:3,children:"wger"}),b(SOt,{}),b(bOt,{}),b(wOt,{}),b(xOt,{})]})}),Yde=()=>b(vOt,{}),EOt=()=>b("div",{children:"Workout Page"}),POt=()=>b("div",{children:"Workout Schedule"});var jd,KY=Tb;jd=KY.createRoot,KY.hydrateRoot;const TOt=()=>G(Oe,{container:!0,spacing:2,children:[b(Oe,{size:{xs:12,sm:4},children:b(fde,{})}),b(Oe,{size:{xs:12,sm:4},children:b(Kue,{})}),b(Oe,{size:{xs:12,sm:4},children:b(Mde,{})})]}),I1=v.createContext({}),Qde=()=>{const{data:e,isLoading:t}=LM(),{selectedCategories:n,setSelectedCategories:r}=v.useContext(I1),[o]=Le(),i=a=>()=>{const s=n.indexOf(a),l=[...n];s===-1?l.push(a):l.splice(s,1),r(l)};return t?b(mo,{}):b(Bl,{children:e.map(a=>{const s=`checkbox-list-label-${a.id}`;return b(Os,{disablePadding:!0,children:G(Ip,{role:void 0,onClick:i(a),dense:!0,children:[b(sa,{children:b(La,{edge:"start",checked:n.indexOf(a)!==-1,tabIndex:-1,disableRipple:!0,inputProps:{"aria-labelledby":s}},`category-${a.id}`)}),b(ko,{id:s,primary:o(Fa(a.name))})]})},a.id)})})},IOt=()=>{const[e]=Le();return G(HB,{children:[b(WB,{expandIcon:b(Rb,{}),children:e("category")}),b(UB,{children:b(Qde,{})})]})},OOt=()=>{const[e]=Le();return b("div",{"data-testid":"categories",children:G(ro,{children:[b(ot,{gutterBottom:!0,variant:"h6",m:2,children:e("category")}),b(Qde,{})]})})},Xde=()=>{const{data:e,isLoading:t}=FM(),{selectedEquipment:n,setSelectedEquipment:r}=v.useContext(I1),[o]=Le(),i=a=>()=>{const s=n.indexOf(a),l=[...n];s===-1?l.push(a):l.splice(s,1),r(l)};return t?b(mo,{}):b(Bl,{sx:{maxHeight:"500px",overflowY:"auto"},children:e.map(a=>{const s=`checkbox-list-label-${a.id}`;return b(Os,{disablePadding:!0,children:G(Ip,{role:void 0,onClick:i(a),dense:!0,children:[b(sa,{children:b(La,{edge:"start",checked:n.indexOf(a)!==-1,tabIndex:-1,disableRipple:!0,inputProps:{"aria-labelledby":s}},`muscle-${a.id}`)}),b(ko,{id:s,primary:o(Fa(a.name))})]})},a.id)})})},AOt=()=>{const[e]=Le();return G(HB,{children:[b(WB,{expandIcon:b(Rb,{}),children:e("exercises.equipment")}),b(UB,{children:b(Xde,{})})]})},kOt=()=>{const[e]=Le();return b("div",{"data-testid":"equipment",children:G(ro,{sx:{mt:2},children:[b(ot,{gutterBottom:!0,variant:"h6",m:2,children:e("exercises.equipment")}),b(Xde,{})]})})},MOt=re(({className:e,...t})=>b(Rc,{...t,classes:{popper:e}}))(({theme:e})=>({[`& .${Yr.tooltip}`]:{backgroundColor:"rgb(245, 245, 245)",color:"rgba(0, 0, 0, 0.87)",boxShadow:e.shadows[1],fontSize:11}})),Jde=()=>{const{data:e,isLoading:t}=S1(),{selectedMuscles:n,setSelectedMuscles:r}=v.useContext(I1),[o]=Le(),i=a=>()=>{const s=n.indexOf(a),l=[...n];s===-1?l.push(a):l.splice(s,1),r(l)};return t?b(mo,{}):b(Bl,{sx:{maxHeight:"500px",overflowY:"auto"},children:e.map(a=>{const s=`checkbox-list-label-${a.id}`;return b(Os,{disablePadding:!0,secondaryAction:b(MOt,{title:b(Ig,{primaryMuscles:[a],secondaryMuscles:[],isFront:a.isFront}),placement:"right",arrow:!0,children:b(vn,{edge:"end","aria-label":"comments",children:b(Ude,{})})}),children:G(Ip,{role:void 0,onClick:i(a),dense:!0,children:[b(sa,{children:b(La,{edge:"start",checked:n.indexOf(a)!==-1,tabIndex:-1,disableRipple:!0,inputProps:{"aria-labelledby":s}},`muscle-${a.id}`)}),b(ko,{id:s,primary:a.name,secondary:a.nameEn!==""?o(Fa(a.nameEn)):""})]})},a.id)})})},ROt=()=>{const[e]=Le();return G(HB,{children:[b(WB,{expandIcon:b(Rb,{}),children:e("exercises.muscles")}),b(UB,{children:b(Jde,{})})]})},$Ot=()=>{const[e]=Le();return b("div",{"data-testid":"muscles",children:G(ro,{sx:{mt:2},children:[b(ot,{gutterBottom:!0,variant:"h6",m:2,children:e("exercises.muscles")}),b(Jde,{})]})})},DOt=({exercises:e})=>{const t=Bp(),[n,r]=Le();let o;return t.isSuccess&&(o=Fb(r.language,t.data)),b(Oe,{container:!0,spacing:1,children:e.map(i=>b(Oe,{sx:{display:"flex"},size:{xs:6,md:4},children:b(jde,{exercise:i,language:o})},i.id))})},_Ot=()=>b(Oe,{container:!0,spacing:1,children:Array.apply(null,Array(21)).map((e,t)=>b(Oe,{sx:{display:"flex"},size:4,children:G(to,{children:[b(bu,{children:b(sT,{variant:"rectangular",width:250,height:150})}),b(ni,{children:G(en,{sx:{pt:.5},children:[b(sT,{width:"60%"}),b(sT,{})]})})]})},t))}),NOt=({children:e})=>{const[t]=Le(),[n,r]=v.useState(!1),o=i=>()=>{r(i)};return G(wt,{children:[b(dt,{onClick:o(!0),children:b(rIt,{})}),G(t$e,{open:n,onClose:o(!1),anchor:"right",children:[G(Wt,{direction:"row",justifyContent:"space-between",alignItems:"center",children:[b(ot,{gutterBottom:!0,variant:"h6",m:2,children:t("filters")}),b(dt,{onClick:o(!1),children:b(qC,{})})]}),b(Is,{}),e]})]})},LOt=()=>{const[e,t]=Le();return G(en,{marginTop:4,padding:4,sx:{width:"100%",backgroundColor:"#ebebeb",textAlign:"center"},children:[b(ot,{gutterBottom:!0,variant:"h4",component:"div",children:e("exercises.missingExercise")}),b(ot,{gutterBottom:!0,variant:"body1",component:"div",children:e("exercises.missingExerciseDescription")}),b(ia,{to:Mn(Tn.EXERCISE_CONTRIBUTE,t.language),children:e("exercises.contributeExercise")})]})},FOt=()=>{const e=Jue(),[t,n]=Le(),r=Ld(),{selectedCategories:o,selectedEquipment:i,selectedMuscles:a}=v.useContext(I1),s=op("(max-width:600px)"),[l,c]=Y.useState(1),u=(y,w)=>{c(w),window.scrollTo({top:0,behavior:"smooth"})};let d=v.useMemo(()=>{let y=e.data||[];return o.length>0&&(y=y.filter(w=>o.some(x=>w.category.id===x.id))),i.length>0&&(y=y.filter(w=>w.equipment.some(x=>i.some(S=>S.id===x.id)))),a.length>0&&(y=y.filter(w=>w.muscles.some(x=>a.some(S=>S.id===x.id)))),y},[e.data,o,i,a]);const f=21,p=Math.ceil(d.length/f),h=d.slice((l-1)*f,l*f),m=y=>{y&&r(Mn(Tn.EXERCISE_DETAIL,n.language,{id:y.data.base_id}))};return b(kc,{maxWidth:"lg",children:G(Oe,{container:!0,spacing:2,mt:2,children:[b(Oe,{size:{xs:10,sm:6},children:b(ot,{gutterBottom:!0,variant:"h3",component:"div",children:t("exercises.exercises")})}),s?G(wt,{children:[b(Oe,{size:{xs:2,sm:6},children:b(dt,{variant:"contained",onClick:()=>r(Mn(Tn.EXERCISE_CONTRIBUTE,n.language)),children:b(Vo,{})})}),b(Oe,{flexGrow:1,size:{sm:6},children:b(rC,{callback:m})}),b(Oe,{display:"flex",justifyContent:"center",alignItems:"center",size:{xs:2,sm:6},children:G(NOt,{children:[b(IOt,{}),b(AOt,{}),b(ROt,{})]})})]}):G(wt,{children:[b(Oe,{size:{xs:12,sm:3},children:b(rC,{callback:m})}),b(Oe,{size:{xs:12,sm:3},children:b(dt,{variant:"contained",startIcon:b(Vo,{}),onClick:()=>r(Mn(Tn.EXERCISE_CONTRIBUTE,n.language)),children:t("exercises.contributeExercise")})})]}),!s&&b(Oe,{size:{xs:12,sm:3},children:G(Oe,{container:!0,spacing:1,children:[b(Oe,{size:{xs:6,sm:12},children:b(OOt,{})}),b(Oe,{size:{xs:6,sm:12},children:b(kOt,{})}),b(Oe,{size:12,children:b($Ot,{})})]})}),G(Oe,{size:{xs:12,sm:9},children:[e.isLoading?b(_Ot,{}):G(wt,{children:[b(DOt,{exercises:h}),b(Wt,{spacing:2,alignItems:"center",sx:{mt:2},children:b(A_e,{count:p,color:"primary",page:l,onChange:u})})]}),b(LOt,{})]})]})})},YY=()=>{const[e,t]=v.useState([]),[n,r]=v.useState([]),[o,i]=Y.useState([]);return b(I1.Provider,{value:{selectedEquipment:e,setSelectedEquipment:t,selectedMuscles:n,setSelectedMuscles:r,selectedCategories:o,setSelectedCategories:i},children:b(FOt,{})})},Zde=v.createContext(void 0);function En(){const e=v.useContext(Zde);if(e===void 0)throw new Error(["MUI X: Could not find the Data Grid context.","It looks like you rendered your component outside of a DataGrid, DataGridPro or DataGridPremium parent component.","This can also happen if you are bundling multiple versions of the Data Grid."].join(` +`));return e}const efe=v.createContext(void 0),Ot=()=>{const e=v.useContext(efe);if(!e)throw new Error("MUI X: useGridRootProps should only be used inside the DataGrid, DataGridPro or DataGridPremium component.");return e};function W(){return W=Object.assign?Object.assign.bind():function(e){for(var t=1;tn.searchParams.append("args[]",r)),`Minified MUI error #${e}; visit ${n} for the full message.`}function O1(e){if(typeof e!="string")throw new Error(jOt(7));return e.charAt(0).toUpperCase()+e.slice(1)}function ep(e){return e&&e.ownerDocument||document}function BOt(e){return ep(e).defaultView||window}function zOt(e,t){typeof e=="function"?e(t):e&&(e.current=t)}const Ho=typeof window<"u"?v.useLayoutEffect:v.useEffect;let QY=0;function VOt(e){const[t,n]=v.useState(e),r=t;return v.useEffect(()=>{t==null&&(QY+=1,n(`mui-${QY}`))},[t]),r}const HOt={...vd},XY=HOt.useId;function Io(e){return XY!==void 0?XY():VOt(e)}function Ar(e){const t=v.useRef(e);return Ho(()=>{t.current=e}),v.useRef((...n)=>(0,t.current)(...n)).current}function Zg(...e){return v.useMemo(()=>e.every(t=>t==null)?null:t=>{e.forEach(n=>{zOt(n,t)})},e)}const JY={};function ku(e,t){const n=v.useRef(JY);return n.current===JY&&(n.current=e(t)),n}const UOt=[];function HM(e){v.useEffect(e,UOt)}class W5{constructor(){mt(this,"currentId",null);mt(this,"clear",()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)});mt(this,"disposeEffect",()=>this.clear)}static create(){return new W5}start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,n()},t)}}function y0(){const e=ku(W5.create).current;return HM(e.disposeEffect),e}function tfe(e,t){const n={...t};for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)){const o=r;if(o==="components"||o==="slots")n[o]={...e[o],...n[o]};else if(o==="componentsProps"||o==="slotProps"){const i=e[o],a=t[o];if(!a)n[o]=i||{};else if(!i)n[o]=a;else{n[o]={...a};for(const s in i)if(Object.prototype.hasOwnProperty.call(i,s)){const l=s;n[o][l]=tfe(i[l],a[l])}}}else n[o]===void 0&&(n[o]=e[o])}return n}const ZY=e=>e,WOt=()=>{let e=ZY;return{configure(t){e=t},generate(t){return e(t)},reset(){e=ZY}}},GOt=WOt(),qOt={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function nfe(e,t,n="Mui"){const r=qOt[t];return r?`${n}-${r}`:`${GOt.generate(e)}-${t}`}function rfe(e,t,n="Mui"){const r={};return t.forEach(o=>{r[o]=nfe(e,o,n)}),r}const KOt=Object.is;function ofe(e,t){if(e===t)return!0;if(!(e instanceof Object)||!(t instanceof Object))return!1;let n=0,r=0;for(const o in e)if(n+=1,!KOt(e[o],t[o])||!(o in t))return!1;for(const o in t)r+=1;return n===r}function Vp(e){return v.memo(e,ofe)}const YOt={noRowsLabel:"No rows",noResultsOverlayLabel:"No results found.",toolbarDensity:"Density",toolbarDensityLabel:"Density",toolbarDensityCompact:"Compact",toolbarDensityStandard:"Standard",toolbarDensityComfortable:"Comfortable",toolbarColumns:"Columns",toolbarColumnsLabel:"Select columns",toolbarFilters:"Filters",toolbarFiltersLabel:"Show filters",toolbarFiltersTooltipHide:"Hide filters",toolbarFiltersTooltipShow:"Show filters",toolbarFiltersTooltipActive:e=>e!==1?`${e} active filters`:`${e} active filter`,toolbarQuickFilterPlaceholder:"Search…",toolbarQuickFilterLabel:"Search",toolbarQuickFilterDeleteIconLabel:"Clear",toolbarExport:"Export",toolbarExportLabel:"Export",toolbarExportCSV:"Download as CSV",toolbarExportPrint:"Print",toolbarExportExcel:"Download as Excel",columnsManagementSearchTitle:"Search",columnsManagementNoColumns:"No columns",columnsManagementShowHideAllText:"Show/Hide All",columnsManagementReset:"Reset",filterPanelAddFilter:"Add filter",filterPanelRemoveAll:"Remove all",filterPanelDeleteIconLabel:"Delete",filterPanelLogicOperator:"Logic operator",filterPanelOperator:"Operator",filterPanelOperatorAnd:"And",filterPanelOperatorOr:"Or",filterPanelColumns:"Columns",filterPanelInputLabel:"Value",filterPanelInputPlaceholder:"Filter value",filterOperatorContains:"contains",filterOperatorDoesNotContain:"does not contain",filterOperatorEquals:"equals",filterOperatorDoesNotEqual:"does not equal",filterOperatorStartsWith:"starts with",filterOperatorEndsWith:"ends with",filterOperatorIs:"is",filterOperatorNot:"is not",filterOperatorAfter:"is after",filterOperatorOnOrAfter:"is on or after",filterOperatorBefore:"is before",filterOperatorOnOrBefore:"is on or before",filterOperatorIsEmpty:"is empty",filterOperatorIsNotEmpty:"is not empty",filterOperatorIsAnyOf:"is any of","filterOperator=":"=","filterOperator!=":"!=","filterOperator>":">","filterOperator>=":">=","filterOperator<":"<","filterOperator<=":"<=",headerFilterOperatorContains:"Contains",headerFilterOperatorDoesNotContain:"Does not contain",headerFilterOperatorEquals:"Equals",headerFilterOperatorDoesNotEqual:"Does not equal",headerFilterOperatorStartsWith:"Starts with",headerFilterOperatorEndsWith:"Ends with",headerFilterOperatorIs:"Is",headerFilterOperatorNot:"Is not",headerFilterOperatorAfter:"Is after",headerFilterOperatorOnOrAfter:"Is on or after",headerFilterOperatorBefore:"Is before",headerFilterOperatorOnOrBefore:"Is on or before",headerFilterOperatorIsEmpty:"Is empty",headerFilterOperatorIsNotEmpty:"Is not empty",headerFilterOperatorIsAnyOf:"Is any of","headerFilterOperator=":"Equals","headerFilterOperator!=":"Not equals","headerFilterOperator>":"Greater than","headerFilterOperator>=":"Greater than or equal to","headerFilterOperator<":"Less than","headerFilterOperator<=":"Less than or equal to",filterValueAny:"any",filterValueTrue:"true",filterValueFalse:"false",columnMenuLabel:"Menu",columnMenuShowColumns:"Show columns",columnMenuManageColumns:"Manage columns",columnMenuFilter:"Filter",columnMenuHideColumn:"Hide column",columnMenuUnsort:"Unsort",columnMenuSortAsc:"Sort by ASC",columnMenuSortDesc:"Sort by DESC",columnHeaderFiltersTooltipActive:e=>e!==1?`${e} active filters`:`${e} active filter`,columnHeaderFiltersLabel:"Show filters",columnHeaderSortIconLabel:"Sort",footerRowSelected:e=>e!==1?`${e.toLocaleString()} rows selected`:`${e.toLocaleString()} row selected`,footerTotalRows:"Total Rows:",footerTotalVisibleRows:(e,t)=>`${e.toLocaleString()} of ${t.toLocaleString()}`,checkboxSelectionHeaderName:"Checkbox selection",checkboxSelectionSelectAllRows:"Select all rows",checkboxSelectionUnselectAllRows:"Unselect all rows",checkboxSelectionSelectRow:"Select row",checkboxSelectionUnselectRow:"Unselect row",booleanCellTrueLabel:"yes",booleanCellFalseLabel:"no",actionsCellMore:"more",pinToLeft:"Pin to left",pinToRight:"Pin to right",unpin:"Unpin",treeDataGroupingHeaderName:"Group",treeDataExpand:"see children",treeDataCollapse:"hide children",groupingColumnHeaderName:"Group",groupColumn:e=>`Group by ${e}`,unGroupColumn:e=>`Stop grouping by ${e}`,detailPanelToggle:"Detail panel toggle",expandDetailPanel:"Expand",collapseDetailPanel:"Collapse",MuiTablePagination:{},rowReorderingHeaderName:"Row reordering",aggregationMenuItemHeader:"Aggregation",aggregationFunctionLabelSum:"sum",aggregationFunctionLabelAvg:"avg",aggregationFunctionLabelMin:"min",aggregationFunctionLabelMax:"max",aggregationFunctionLabelSize:"size"};function On(e){return nfe("MuiDataGrid",e)}const le=rfe("MuiDataGrid",["actionsCell","aggregationColumnHeader","aggregationColumnHeader--alignLeft","aggregationColumnHeader--alignCenter","aggregationColumnHeader--alignRight","aggregationColumnHeaderLabel","autoHeight","autosizing","booleanCell","cell--editable","cell--editing","cell--flex","cell--textCenter","cell--textLeft","cell--textRight","cell--rangeTop","cell--rangeBottom","cell--rangeLeft","cell--rangeRight","cell--pinnedLeft","cell--pinnedRight","cell--selectionMode","cell","cellCheckbox","cellEmpty","cellSkeleton","cellOffsetLeft","checkboxInput","columnHeader","columnHeader--alignCenter","columnHeader--alignLeft","columnHeader--alignRight","columnHeader--dragging","columnHeader--moving","columnHeader--numeric","columnHeader--sortable","columnHeader--sorted","columnHeader--filtered","columnHeader--pinnedLeft","columnHeader--pinnedRight","columnHeader--last","columnHeader--lastUnpinned","columnHeader--siblingFocused","columnHeaderCheckbox","columnHeaderDraggableContainer","columnHeaderTitle","columnHeaderTitleContainer","columnHeaderTitleContainerContent","columnHeader--filledGroup","columnHeader--emptyGroup","columnHeaders","columnSeparator--resizable","columnSeparator--resizing","columnSeparator--sideLeft","columnSeparator--sideRight","columnSeparator","columnsManagement","columnsManagementRow","columnsManagementHeader","columnsManagementFooter","container--top","container--bottom","detailPanel","detailPanels","detailPanelToggleCell","detailPanelToggleCell--expanded","footerCell","panel","panelHeader","panelWrapper","panelContent","panelFooter","paper","editBooleanCell","editInputCell","filler","filler--borderBottom","filler--pinnedLeft","filler--pinnedRight","filterForm","filterFormDeleteIcon","filterFormLogicOperatorInput","filterFormColumnInput","filterFormOperatorInput","filterFormValueInput","filterIcon","footerContainer","headerFilterRow","iconButtonContainer","iconSeparator","main","main--hasPinnedRight","main--hasSkeletonLoadingOverlay","menu","menuIcon","menuIconButton","menuOpen","menuList","overlay","overlayWrapper","overlayWrapperInner","root","root--densityStandard","root--densityComfortable","root--densityCompact","root--disableUserSelection","root--noToolbar","row","row--editable","row--editing","row--firstVisible","row--lastVisible","row--dragging","row--dynamicHeight","row--detailPanelExpanded","row--borderBottom","rowReorderCellPlaceholder","rowCount","rowReorderCellContainer","rowReorderCell","rowReorderCell--draggable","rowSkeleton","scrollArea--left","scrollArea--right","scrollArea","scrollbar","scrollbar--vertical","scrollbar--horizontal","scrollbarFiller","scrollbarFiller--header","scrollbarFiller--borderTop","scrollbarFiller--borderBottom","scrollbarFiller--pinnedRight","selectedRowCount","sortIcon","toolbarContainer","toolbarFilterList","virtualScroller","virtualScroller--hasScrollX","virtualScrollerContent","virtualScrollerContent--overflowed","virtualScrollerRenderZone","pinnedColumns","withVerticalBorder","withBorderColor","cell--withRightBorder","cell--withLeftBorder","columnHeader--withRightBorder","columnHeader--withLeftBorder","treeDataGroupingCell","treeDataGroupingCellToggle","treeDataGroupingCellLoadingContainer","groupingCriteriaCell","groupingCriteriaCellToggle","groupingCriteriaCellLoadingContainer","pinnedRows","pinnedRows--top","pinnedRows--bottom","pinnedRowsRenderZone"]),eQ=1e3;class QOt{constructor(t=eQ){this.timeouts=new Map,this.cleanupTimeout=eQ,this.cleanupTimeout=t}register(t,n,r){this.timeouts||(this.timeouts=new Map);const o=setTimeout(()=>{typeof n=="function"&&n(),this.timeouts.delete(r.cleanupToken)},this.cleanupTimeout);this.timeouts.set(r.cleanupToken,o)}unregister(t){const n=this.timeouts.get(t.cleanupToken);n&&(this.timeouts.delete(t.cleanupToken),clearTimeout(n))}reset(){this.timeouts&&(this.timeouts.forEach((t,n)=>{this.unregister({cleanupToken:n})}),this.timeouts=void 0)}}class XOt{constructor(){this.registry=new FinalizationRegistry(t=>{typeof t=="function"&&t()})}register(t,n,r){this.registry.register(t,n,r)}unregister(t){this.registry.unregister(t)}reset(){}}var Tl=function(e){return e.DataGrid="DataGrid",e.DataGridPro="DataGridPro",e.DataGridPremium="DataGridPremium",e}(Tl||{});class JOt{}function ZOt(e){let t=0;return function(r,o,i,a){e.registry===null&&(e.registry=typeof FinalizationRegistry<"u"?new XOt:new QOt);const[s]=v.useState(new JOt),l=v.useRef(null),c=v.useRef();c.current=i;const u=v.useRef(null);if(!l.current&&c.current){const d=(f,p,h)=>{var m;p.defaultMuiPrevented||(m=c.current)==null||m.call(c,f,p,h)};l.current=r.current.subscribeEvent(o,d,a),t+=1,u.current={cleanupToken:t},e.registry.register(s,()=>{var f;(f=l.current)==null||f.call(l),l.current=null,u.current=null},u.current)}else!c.current&&l.current&&(l.current(),l.current=null,u.current&&(e.registry.unregister(u.current),u.current=null));v.useEffect(()=>{if(!l.current&&c.current){const d=(f,p,h)=>{var m;p.defaultMuiPrevented||(m=c.current)==null||m.call(c,f,p,h)};l.current=r.current.subscribeEvent(o,d,a)}return u.current&&e.registry&&(e.registry.unregister(u.current),u.current=null),()=>{var d;(d=l.current)==null||d.call(l),l.current=null}},[r,o,a])}}const eAt={registry:null},xt=ZOt(eAt),tAt={isFirst:!0};function yr(e,t,n){xt(e,t,n,tAt)}function nAt(e){return e.acceptsApiRef}function tQ(e,t){return nAt(t)?t(e):t(e.current.state)}const rAt=Object.is,ife=ofe,oAt=()=>({state:null,equals:null,selector:null}),Ye=(e,t,n=rAt)=>{const r=ku(oAt),o=r.current.selector!==null,[i,a]=v.useState(o?null:tQ(e,t));return r.current.state=i,r.current.equals=n,r.current.selector=t,HM(()=>e.current.store.subscribe(()=>{const s=tQ(e,r.current.selector);r.current.equals(r.current.state,s)||(r.current.state=s,a(s))})),i},Si=e=>e.dimensions;var BO=Symbol("NOT_FOUND");function iAt(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function aAt(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function sAt(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(n=>typeof n=="function")){const n=e.map(r=>typeof r=="function"?`function ${r.name||"unnamed"}()`:typeof r).join(", ");throw new TypeError(`${t}[${n}]`)}}var nQ=e=>Array.isArray(e)?e:[e];function lAt(e){const t=Array.isArray(e[0])?e[0]:e;return sAt(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function cAt(e,t){const n=[],{length:r}=e;for(let o=0;ot(s,c.key));if(l>-1){const c=n[l];return l>0&&(n.splice(l,1),n.unshift(c)),c.value}return BO}function o(s,l){r(s)===BO&&(n.unshift({key:s,value:l}),n.length>e&&n.pop())}function i(){return n}function a(){n=[]}return{get:r,put:o,getEntries:i,clear:a}}var fAt=(e,t)=>e===t;function pAt(e){return function(n,r){if(n===null||r===null||n.length!==r.length)return!1;const{length:o}=n;for(let i=0;ii(p.value,u));f&&(u=f.value,s!==0&&s--)}l.put(arguments,u)}return u}return c.clearCache=()=>{l.clear(),c.resetResultsCount()},c.resultsCount=()=>s,c.resetResultsCount=()=>{s=0},c}var hAt=class{constructor(e){this.value=e}deref(){return this.value}},gAt=typeof WeakRef<"u"?WeakRef:hAt,mAt=0,rQ=1;function kP(){return{s:mAt,v:void 0,o:null,p:null}}function sfe(e,t={}){let n=kP();const{resultEqualityCheck:r}=t;let o,i=0;function a(){var d;let s=n;const{length:l}=arguments;for(let f=0,p=l;f{n=kP(),a.resetResultsCount()},a.resultsCount=()=>i,a.resetResultsCount=()=>{i=0},a}function lfe(e,...t){const n=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,r=(...o)=>{let i=0,a=0,s,l={},c=o.pop();typeof c=="object"&&(l=c,c=o.pop()),iAt(c,`createSelector expects an output function after the inputs, but received: [${typeof c}]`);const u={...n,...l},{memoize:d,memoizeOptions:f=[],argsMemoize:p=sfe,argsMemoizeOptions:h=[],devModeChecks:m={}}=u,y=nQ(f),w=nQ(h),x=lAt(o),S=d(function(){return i++,c.apply(null,arguments)},...y),E=p(function(){a++;const T=cAt(x,arguments);return s=S.apply(null,T),s},...w);return Object.assign(E,{resultFunc:c,memoizedResultFunc:S,dependencies:x,dependencyRecomputations:()=>a,resetDependencyRecomputations:()=>{a=0},lastResult:()=>s,recomputations:()=>i,resetRecomputations:()=>{i=0},memoize:d,argsMemoize:p})};return Object.assign(r,{withTypes:()=>r}),r}var yAt=lfe(sfe),vAt=Object.assign((e,t=yAt)=>{aAt(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);const n=Object.keys(e),r=n.map(i=>e[i]);return t(r,(...i)=>i.reduce((a,s,l)=>(a[n[l]]=s,a),{}))},{withTypes:()=>vAt});const bAt=lfe({memoize:afe,memoizeOptions:{maxSize:1,equalityCheck:Object.is}}),oQ=new WeakMap;function ey(e){return"current"in e&&"instanceId"in e.current}const ty={id:"default"},Ut=(e,t,n,r,o,i,...a)=>{if(a.length>0)throw new Error("Unsupported number of selectors");let s;if(e&&t&&n&&r&&o&&i)s=(l,c)=>{const u=ey(l),d=c??(u?l.current.instanceId:ty),f=u?l.current.state:l,p=e(f,d),h=t(f,d),m=n(f,d),y=r(f,d),w=o(f,d);return i(p,h,m,y,w)};else if(e&&t&&n&&r&&o)s=(l,c)=>{const u=ey(l),d=c??(u?l.current.instanceId:ty),f=u?l.current.state:l,p=e(f,d),h=t(f,d),m=n(f,d),y=r(f,d);return o(p,h,m,y)};else if(e&&t&&n&&r)s=(l,c)=>{const u=ey(l),d=c??(u?l.current.instanceId:ty),f=u?l.current.state:l,p=e(f,d),h=t(f,d),m=n(f,d);return r(p,h,m)};else if(e&&t&&n)s=(l,c)=>{const u=ey(l),d=c??(u?l.current.instanceId:ty),f=u?l.current.state:l,p=e(f,d),h=t(f,d);return n(p,h)};else if(e&&t)s=(l,c)=>{const u=ey(l),d=c??(u?l.current.instanceId:ty),f=u?l.current.state:l,p=e(f,d);return t(p)};else throw new Error("Missing arguments");return s.acceptsApiRef=!0,s},mr=(...e)=>{const t=(n,r)=>{const o=ey(n),i=o?n.current.instanceId:r??ty,a=o?n.current.state:n,s=oQ.get(i),l=s??new Map,c=l==null?void 0:l.get(e);if(l&&c)return c(a,i);const u=bAt(...e);return s||oQ.set(i,l),l.set(e,u),u(a,i)};return t.acceptsApiRef=!0,t},wAt=.7,xAt=1.3,SAt={compact:wAt,comfortable:xAt,standard:1},Oy=e=>e.density,A1=Ut(Oy,e=>SAt[e]);let br=function(e){return e.LEFT="left",e.RIGHT="right",e}({});const KF={left:[],right:[]},CAt=e=>e.isRtl,pu=e=>e.columns,hd=Ut(pu,e=>e.orderedFields),Bd=Ut(pu,e=>e.lookup),Pc=mr(hd,Bd,(e,t)=>e.map(n=>t[n])),vl=Ut(pu,e=>e.columnVisibilityModel),Oo=mr(Pc,vl,(e,t)=>e.filter(n=>t[n.field]!==!1)),v0=mr(Oo,e=>e.map(t=>t.field)),EAt=e=>e.pinnedColumns,k1=mr(pu,EAt,v0,CAt,(e,t,n,r)=>{const o=PAt(t,n,r);return{left:o.left.map(a=>e.lookup[a]),right:o.right.map(a=>e.lookup[a])}});function PAt(e,t,n){var s,l;if(!Array.isArray(e.left)&&!Array.isArray(e.right)||((s=e.left)==null?void 0:s.length)===0&&((l=e.right)==null?void 0:l.length)===0)return KF;const r=(c,u)=>Array.isArray(c)?c.filter(d=>u.includes(d)):[],o=r(e.left,t),i=t.filter(c=>!o.includes(c)),a=r(e.right,i);return n?{left:a,right:o}:{left:o,right:a}}const Hp=mr(Oo,e=>{const t=[];let n=0;for(let r=0;r{const n=e.length;return n===0?0:t[n-1]+e[n-1].computedWidth}),cfe=mr(Pc,e=>e.filter(t=>t.filterable)),TAt=mr(Pc,e=>e.reduce((t,n)=>(n.filterable&&(t[n.field]=n),t),{})),IAt=mr(Pc,e=>e.some(t=>t.colSpan!==void 0));function Dt(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}const OAt=["id","value","formattedValue","api","field","row","rowNode","colDef","cellMode","isEditable","tabIndex","hasFocus","isValidating","debounceMs","isProcessingProps","onValueChange"],AAt=e=>{const{classes:t}=e;return In({root:["editInputCell"]},On,t)},kAt=re(Ib,{name:"MuiDataGrid",slot:"EditInputCell",overridesResolver:(e,t)=>t.editInputCell})(({theme:e})=>W({},e.typography.body2,{padding:"1px 0","& input":{padding:"0 16px",height:"100%"}})),MAt=v.forwardRef((e,t)=>{const n=Ot(),{id:r,value:o,field:i,colDef:a,hasFocus:s,debounceMs:l=200,isProcessingProps:c,onValueChange:u}=e,d=Dt(e,OAt),f=En(),p=v.useRef(),[h,m]=v.useState(o),y=AAt(n),w=v.useCallback(async S=>{const E=S.target.value;u&&await u(S,E);const P=f.current.getColumn(i);let T=E;P.valueParser&&(T=P.valueParser(E,f.current.getRow(r),P,f)),m(T),f.current.setEditCellValue({id:r,field:i,value:T,debounceMs:l,unstable_skipValueParser:!0},S)},[f,l,i,r,u]),x=f.current.unstable_getEditCellMeta(r,i);return v.useEffect(()=>{(x==null?void 0:x.changeReason)!=="debouncedSetEditCellValue"&&m(o)},[x,o]),Ho(()=>{s&&p.current.focus()},[s]),R.jsx(kAt,W({ref:t,inputRef:p,className:y.root,ownerState:n,fullWidth:!0,type:a.type==="number"?a.type:"text",value:h??"",onChange:w,endAdornment:c?R.jsx(n.slots.loadIcon,{fontSize:"small",color:"action"}):void 0},d))}),RAt=e=>R.jsx(MAt,W({},e)),ufe=(e,t)=>t&&e.length>1?[e[0]]:e,iQ=(e,t)=>n=>W({},n,{sorting:W({},n.sorting,{sortModel:ufe(e,t)})}),$At=e=>e==="desc",DAt=(e,t)=>{const n=t.current.getColumn(e.field);if(!n||e.sort===null)return null;let r;return n.getSortComparator?r=n.getSortComparator(e.sort):r=$At(e.sort)?(...i)=>-1*n.sortComparator(...i):n.sortComparator,r?{getSortCellParams:i=>({id:i,field:n.field,rowNode:t.current.getRowNode(i),value:t.current.getCellValue(i,n.field),api:t.current}),comparator:r}:null},_At=(e,t,n)=>e.reduce((r,o,i)=>{if(r!==0)return r;const a=t.params[i],s=n.params[i];return r=o.comparator(a.value,s.value,a,s),r},0),NAt=(e,t)=>{const n=e.map(r=>DAt(r,t)).filter(r=>!!r);return n.length===0?null:r=>r.map(o=>({node:o,params:n.map(i=>i.getSortCellParams(o.id))})).sort((o,i)=>_At(n,o,i)).map(o=>o.node.id)},aQ=(e,t)=>{const n=e.indexOf(t);return!t||n===-1||n+1===e.length?e[0]:e[n+1]},q5=(e,t)=>e==null&&t!=null?-1:t==null&&e!=null?1:e==null&&t==null?0:null,LAt=new Intl.Collator,FAt=(e,t)=>{const n=q5(e,t);return n!==null?n:typeof e=="string"?LAt.compare(e.toString(),t.toString()):e-t},dfe=(e,t)=>{const n=q5(e,t);return n!==null?n:Number(e)-Number(t)},ffe=(e,t)=>{const n=q5(e,t);return n!==null?n:e>t?1:e{const{value:T}=P.target;h(String(T)),y(!0),f.start(x.filterDebounceMs,()=>{const I=W({},t,{value:r==="number"?Number(T):T,fromInput:w});n(I),y(!1)})},[f,x.filterDebounceMs,t,r,w,n]);return v.useEffect(()=>{(t.fromInput!==w||t.value===void 0)&&h(String(t.value??""))},[w,t]),R.jsx(x.slots.baseTextField,W({id:w,label:o.current.getLocaleText("filterPanelInputLabel"),placeholder:o.current.getLocaleText("filterPanelInputPlaceholder"),value:p,onChange:S,variant:u,type:r||"text",InputProps:W({},m||l?{endAdornment:m?R.jsx(x.slots.loadIcon,{fontSize:"small",color:"action"}):l}:{},{disabled:s},c,{inputProps:W({tabIndex:a},c==null?void 0:c.inputProps)}),InputLabelProps:{shrink:!0},inputRef:i},d,(E=x.slotProps)==null?void 0:E.baseTextField))}function BAt(e){return typeof e=="number"&&!Number.isNaN(e)}function pfe(e){return typeof e=="function"}function K5(e){return typeof e=="object"&&e!==null}function zAt(){try{const e="__some_random_key_you_are_not_going_to_use__";return window.localStorage.setItem(e,e),window.localStorage.removeItem(e),!0}catch{return!1}}function zO(e){return e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}const hu=(e,t,n)=>Math.max(t,Math.min(n,e));function sQ(e,t){return Array.from({length:t-e}).map((n,r)=>e+r)}function Jy(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;if(Array.isArray(e)){const o=e.length;if(o!==t.length)return!1;for(let i=0;i{let t=e+=1831565813;return t=Math.imul(t^t>>>15,t|1),t^=t+Math.imul(t^t>>>7,t|61),((t^t>>>14)>>>0)/4294967296}}function HAt(e){const t=VAt(e);return(n,r)=>n+(r-n)*t()}function hfe(e){return typeof structuredClone=="function"?structuredClone(e):JSON.parse(JSON.stringify(e))}const UAt=["item","applyValue","type","apiRef","focusElementRef","color","error","helperText","size","variant"],WAt=["key"];function gfe(e){const{item:t,applyValue:n,type:r,apiRef:o,focusElementRef:i,color:a,error:s,helperText:l,size:c,variant:u="standard"}=e,d=Dt(e,UAt),f={color:a,error:s,helperText:l,size:c,variant:u},[p,h]=v.useState(t.value||[]),m=Io(),y=Ot();v.useEffect(()=>{const x=t.value??[];h(x.map(String))},[t.value]);const w=v.useCallback((x,S)=>{h(S.map(String)),n(W({},t,{value:[...S.map(E=>r==="number"?Number(E):E)]}))},[n,t,r]);return R.jsx(Oc,W({multiple:!0,freeSolo:!0,options:[],filterOptions:(x,S)=>{const{inputValue:E}=S;return E==null||E===""?[]:[E]},id:m,value:p,onChange:w,renderTags:(x,S)=>x.map((E,P)=>{const T=S({index:P}),{key:I}=T,A=Dt(T,WAt);return R.jsx(y.slots.baseChip,W({variant:"outlined",size:"small",label:E},A),I)}),renderInput:x=>{var S;return R.jsx(y.slots.baseTextField,W({},x,{label:o.current.getLocaleText("filterPanelInputLabel"),placeholder:o.current.getLocaleText("filterPanelInputPlaceholder"),InputLabelProps:W({},x.InputLabelProps,{shrink:!0}),inputRef:i,type:r||"text"},f,(S=y.slotProps)==null?void 0:S.baseTextField))}},d))}var Su=function(e){return e.Cell="cell",e.Row="row",e}(Su||{}),ar=function(e){return e.Edit="edit",e.View="view",e}(ar||{}),qn=function(e){return e.Edit="edit",e.View="view",e}(qn||{}),Zi=function(e){return e.And="and",e.Or="or",e}(Zi||{}),qu=function(e){return e.enterKeyDown="enterKeyDown",e.cellDoubleClick="cellDoubleClick",e.printableKeyDown="printableKeyDown",e.deleteKeyDown="deleteKeyDown",e.pasteKeyDown="pasteKeyDown",e}(qu||{}),ic=function(e){return e.cellFocusOut="cellFocusOut",e.escapeKeyDown="escapeKeyDown",e.enterKeyDown="enterKeyDown",e.tabKeyDown="tabKeyDown",e.shiftTabKeyDown="shiftTabKeyDown",e}(ic||{}),cf=function(e){return e.enterKeyDown="enterKeyDown",e.cellDoubleClick="cellDoubleClick",e.printableKeyDown="printableKeyDown",e.deleteKeyDown="deleteKeyDown",e}(cf||{}),rc=function(e){return e.rowFocusOut="rowFocusOut",e.escapeKeyDown="escapeKeyDown",e.enterKeyDown="enterKeyDown",e.tabKeyDown="tabKeyDown",e.shiftTabKeyDown="shiftTabKeyDown",e}(rc||{});function mfe(e){return e.field!==void 0}const oC=()=>({items:[],logicOperator:Zi.And,quickFilterValues:[],quickFilterLogicOperator:Zi.And});function yfe(e){return{current:e.current.getPublicApi()}}let Pw;function GAt(){if(Pw!==void 0)return Pw;try{Pw=new Function("return true")()}catch{Pw=!1}return Pw}const YF=(e,t)=>{const n=W({},e);if(n.id==null&&(n.id=Math.round(Math.random()*1e5)),n.operator==null){const r=Bd(t)[n.field];n.operator=r&&r.filterOperators[0].value}return n},Y5=(e,t,n)=>{const r=e.items.length>1;let o;r&&t?o=[e.items[0]]:o=e.items;const i=r&&o.some(s=>s.id==null);return o.some(s=>s.operator==null)||i?W({},e,{items:o.map(s=>YF(s,n))}):e.items!==o?W({},e,{items:o}):e},lQ=(e,t,n)=>r=>W({},r,{filterModel:Y5(e,t,n)}),iC=e=>typeof e=="string"?e.normalize("NFD").replace(/[\u0300-\u036f]/g,""):e,vfe=(e,t)=>{var u;if(!e.field||!e.operator)return null;const n=t.current.getColumn(e.field);if(!n)return null;let r;if(n.valueParser){const d=n.valueParser;r=Array.isArray(e.value)?(u=e.value)==null?void 0:u.map(f=>d(f,void 0,n,t)):d(e.value,void 0,n,t)}else r=e.value;const{ignoreDiacritics:o}=t.current.rootProps;o&&(r=iC(r));const i=W({},e,{value:r}),a=n.filterOperators;if(!(a!=null&&a.length))throw new Error(`MUI X: No filter operators found for column '${n.field}'.`);const s=a.find(d=>d.value===i.operator);if(!s)throw new Error(`MUI X: No filter operator found for column '${n.field}' and operator value '${i.operator}'.`);const l=yfe(t),c=s.getApplyFilterFn(i,n);return typeof c!="function"?null:{item:i,fn:d=>{let f=t.current.getRowValue(d,n);return o&&(f=iC(f)),c(f,d,n,l)}}};let cQ=1;const qAt=(e,t,n)=>{const{items:r}=e,o=r.map(s=>vfe(s,t)).filter(s=>!!s);if(o.length===0)return null;if(n||!GAt())return(s,l)=>{const c={};for(let u=0;u`const shouldApply${l} = !shouldApplyFilter || shouldApplyFilter(${JSON.stringify(s.item.field)});`).join(` `)} @@ -435,32 +435,32 @@ ${o.map((s,l)=>` ${JSON.stringify(String(s.item.id))}: !shouldApply${l} ? false `)} }; -return result$$;`.replaceAll("$$",String(oQ)));return oQ+=1,(s,l)=>i(o,s,l)},ufe=e=>e.quickFilterExcludeHiddenColumns??!0,dAt=(e,t)=>{var s;const n=((s=e.quickFilterValues)==null?void 0:s.filter(Boolean))??[];if(n.length===0)return null;const r=ufe(e)?h0(t):pd(t),o=[],{ignoreDiacritics:i}=t.current.rootProps,a=lfe(t);return r.forEach(l=>{const c=t.current.getColumn(l),u=c==null?void 0:c.getApplyQuickFilterFn;u&&o.push({column:c,appliers:n.map(d=>{const f=i?ZS(d):d;return{fn:u(f,c,a)}})})}),function(c,u){const d={};e:for(let f=0;f{const r=uAt(e,t,n),o=dAt(e,t);return function(a,s,l){l.passingFilterItems=(r==null?void 0:r(a,s))??null,l.passingQuickFilterValues=(o==null?void 0:o(a,s))??null}},iQ=e=>e!=null,pAt=(e,t,n)=>(e.cleanedFilterItems||(e.cleanedFilterItems=n.filter(r=>cfe(r,t)!==null)),e.cleanedFilterItems),hAt=(e,t,n,r,o)=>{const i=pAt(o,r,n.items),a=e.filter(iQ),s=t.filter(iQ);if(a.length>0){const l=u=>a.some(d=>d[u.id]);if((n.logicOperator??JS().logicOperator)===Zi.And){if(!i.every(l))return!1}else if(!i.some(l))return!1}if(s.length>0&&n.quickFilterValues!=null){const l=u=>s.some(d=>d[u]);if((n.quickFilterLogicOperator??JS().quickFilterLogicOperator)===Zi.And){if(!n.quickFilterValues.every(l))return!1}else if(!n.quickFilterValues.some(l))return!1}return!0},gAt=e=>{if(!e)return null;const t=new RegExp(AO(e),"i");return(n,r,o,i)=>{let a=i.current.getRowFormattedValue(r,o);return i.current.ignoreDiacritics&&(a=ZS(a)),a!=null?t.test(a.toString()):!1}},aQ=(e,t)=>n=>{if(!n.value)return null;const r=e?n.value:n.value.trim(),o=new RegExp(AO(r),"i");return i=>{if(i==null)return t;const a=o.test(String(i));return t?!a:a}},sQ=(e,t)=>n=>{if(!n.value)return null;const r=e?n.value:n.value.trim(),o=new Intl.Collator(void 0,{sensitivity:"base",usage:"search"});return i=>{if(i==null)return t;const a=o.compare(r,i.toString())===0;return t?!a:a}},lQ=e=>()=>t=>{const n=t===""||t==null;return e?!n:n},mAt=(e=!1)=>[{value:"contains",getApplyFilterFn:aQ(e,!1),InputComponent:cl},{value:"doesNotContain",getApplyFilterFn:aQ(e,!0),InputComponent:cl},{value:"equals",getApplyFilterFn:sQ(e,!1),InputComponent:cl},{value:"doesNotEqual",getApplyFilterFn:sQ(e,!0),InputComponent:cl},{value:"startsWith",getApplyFilterFn:t=>{if(!t.value)return null;const n=e?t.value:t.value.trim(),r=new RegExp(`^${AO(n)}.*$`,"i");return o=>o!=null?r.test(o.toString()):!1},InputComponent:cl},{value:"endsWith",getApplyFilterFn:t=>{if(!t.value)return null;const n=e?t.value:t.value.trim(),r=new RegExp(`.*${AO(n)}$`,"i");return o=>o!=null?r.test(o.toString()):!1},InputComponent:cl},{value:"isEmpty",getApplyFilterFn:lQ(!1),requiresFilterValue:!1},{value:"isNotEmpty",getApplyFilterFn:lQ(!0),requiresFilterValue:!1},{value:"isAnyOf",getApplyFilterFn:t=>{if(!Array.isArray(t.value)||t.value.length===0)return null;const n=e?t.value:t.value.map(o=>o.trim()),r=new Intl.Collator(void 0,{sensitivity:"base",usage:"search"});return o=>o!=null?n.some(i=>r.compare(i,o.toString()||"")===0):!1},InputComponent:afe}],Ec={width:100,minWidth:50,maxWidth:1/0,hideable:!0,sortable:!0,resizable:!0,filterable:!0,groupable:!0,pinnable:!0,aggregable:!0,editable:!1,sortComparator:tAt,type:"string",align:"left",filterOperators:mAt(),renderEditCell:YOt,getApplyQuickFilterFn:gAt},yAt=["open","target","onClose","children","position","className","onExited"],vAt=e=>{const{classes:t}=e;return Tn({root:["menu"]},In,t)},bAt=oe(Sp,{name:"MuiDataGrid",slot:"Menu",overridesResolver:(e,t)=>t.menu})(({theme:e})=>({zIndex:e.zIndex.modal,[`& .${le.menuList}`]:{outline:0}})),wAt={"bottom-start":"top left","bottom-end":"top right"};function dfe(e){var m;const{open:t,target:n,onClose:r,children:o,position:i,className:a,onExited:s}=e,l=Dt(e,yAt),c=En(),u=Ot(),d=vAt(u),f=v.useRef(null);Ho(()=>{var y,w;t?f.current=document.activeElement instanceof HTMLElement?document.activeElement:null:((w=(y=f.current)==null?void 0:y.focus)==null||w.call(y),f.current=null)},[t]),v.useEffect(()=>{const y=t?"menuOpen":"menuClose";c.current.publishEvent(y,{target:n})},[c,t,n]);const p=y=>w=>{y&&y(),s&&s(w)},h=y=>{y.target&&(n===y.target||n!=null&&n.contains(y.target))||r(y)};return R.jsx(bAt,W({as:u.slots.basePopper,className:de(d.root,a),ownerState:u,open:t,anchorEl:n,transition:!0,placement:i},l,(m=u.slotProps)==null?void 0:m.basePopper,{children:({TransitionProps:y,placement:w})=>R.jsx(YB,{onClickAway:h,mouseEvent:"onMouseDown",children:R.jsx(ap,W({},y,{style:{transformOrigin:wAt[w]},onExited:p(y==null?void 0:y.onExited),children:R.jsx(to,{children:o})}))})}))}const xAt=["api","colDef","id","hasFocus","isEditable","field","value","formattedValue","row","rowNode","cellMode","tabIndex","position","focusElementRef"],SAt=e=>typeof e.getActions=="function";function CAt(e){var D;const{colDef:t,id:n,hasFocus:r,tabIndex:o,position:i="bottom-end",focusElementRef:a}=e,s=Dt(e,xAt),[l,c]=v.useState(-1),[u,d]=v.useState(!1),f=En(),p=v.useRef(null),h=v.useRef(null),m=v.useRef(!1),y=v.useRef({}),w=dr(),x=To(),C=To(),E=Ot();if(!SAt(t))throw new Error("MUI X: Missing the `getActions` property in the `GridColDef`.");const P=t.getActions(f.current.getRowParams(n)),T=P.filter(_=>!_.props.showInMenu),I=P.filter(_=>_.props.showInMenu),A=T.length+(I.length?1:0);v.useLayoutEffect(()=>{r||Object.entries(y.current).forEach(([_,z])=>{z==null||z.stop({},()=>{delete y.current[_]})})},[r]),v.useEffect(()=>{if(l<0||!p.current||l>=p.current.children.length)return;p.current.children[l].focus({preventScroll:!0})},[l]),v.useEffect(()=>{r||(c(-1),m.current=!1)},[r]),v.useImperativeHandle(a,()=>({focus(){if(!m.current){const _=P.findIndex(z=>!z.props.disabled);c(_)}}}),[P]),v.useEffect(()=>{l>=A&&c(A-1)},[l,A]);const k=()=>{d(!0),c(A-1),m.current=!0},O=()=>{d(!1)},$=_=>z=>{y.current[_]=z},N=(_,z)=>F=>{c(_),m.current=!0,z&&z(F)},L=_=>{if(A<=1)return;const z=(V,U)=>{var ie;if(V<0||V>P.length)return V;const X=(U==="left"?-1:1)*(w?-1:1);return(ie=P[V+X])!=null&&ie.props.disabled?z(V+X,U):V+X};let F=l;_.key==="ArrowRight"?F=z(l,"right"):_.key==="ArrowLeft"&&(F=z(l,"left")),!(F<0||F>=A)&&F!==l&&(_.preventDefault(),_.stopPropagation(),c(F))},j=_=>{_.key==="Tab"&&_.preventDefault(),["Tab","Escape"].includes(_.key)&&O()};return R.jsxs("div",W({role:"menu",ref:p,tabIndex:-1,className:le.actionsCell,onKeyDown:L},s,{children:[T.map((_,z)=>v.cloneElement(_,{key:z,touchRippleRef:$(z),onClick:N(z,_.props.onClick),tabIndex:l===z?o:-1})),I.length>0&&C&&R.jsx(E.slots.baseIconButton,W({ref:h,id:C,"aria-label":f.current.getLocaleText("actionsCellMore"),"aria-haspopup":"menu","aria-expanded":u,"aria-controls":u?x:void 0,role:"menuitem",size:"small",onClick:k,touchRippleRef:$(C),tabIndex:l===T.length?o:-1},(D=E.slotProps)==null?void 0:D.baseIconButton,{children:R.jsx(E.slots.moreActionsIcon,{fontSize:"small"})})),I.length>0&&R.jsx(dfe,{open:u,target:h.current,position:i,onClose:O,children:R.jsx(_C,{id:x,className:le.menuList,onKeyDown:j,"aria-labelledby":C,variant:"menu",autoFocusItem:!0,children:I.map((_,z)=>v.cloneElement(_,{key:z,closeMenu:O}))})})]}))}const EAt=e=>R.jsx(CAt,W({},e)),FM="actions",PAt=W({},Ec,{sortable:!1,filterable:!1,aggregable:!1,width:100,display:"flex",align:"center",headerAlign:"center",headerName:"",disableColumnMenu:!0,disableExport:!0,renderCell:EAt,getApplyQuickFilterFn:void 0}),Hl=e=>e.rows,jM=Ut(Hl,e=>e.totalRowCount),TAt=Ut(Hl,e=>e.loading),IAt=Ut(Hl,e=>e.totalTopLevelRowCount),Ff=Ut(Hl,e=>e.dataRowIdToModelLookup),kO=Ut(Hl,e=>e.dataRowIdToIdLookup),$i=Ut(Hl,e=>e.tree),OAt=Ut(Hl,e=>e.groupsToFetch),AAt=Ut(Hl,e=>e.groupingName),cQ=Ut(Hl,e=>e.treeDepths),g0=mr(Hl,e=>{const t=Object.entries(e.treeDepths);return t.length===0?1:t.filter(([,n])=>n>0).map(([n])=>Number(n)).sort((n,r)=>r-n)[0]+1}),wP=Ut(Hl,e=>e.dataRowIds),kAt=Ut(Hl,e=>e==null?void 0:e.additionalRowGroups),Zg=mr(kAt,e=>{var n,r;const t=e==null?void 0:e.pinnedRows;return{bottom:((n=t==null?void 0:t.bottom)==null?void 0:n.map(o=>({id:o.id,model:o.model??{}})))??[],top:((r=t==null?void 0:t.top)==null?void 0:r.map(o=>({id:o.id,model:o.model??{}})))??[]}}),MAt=Ut(Zg,e=>{var t,n;return(((t=e==null?void 0:e.top)==null?void 0:t.length)||0)+(((n=e==null?void 0:e.bottom)==null?void 0:n.length)||0)}),hi="auto-generated-group-node-root",Jy=Symbol("mui.id_autogenerated"),RAt=()=>({type:"group",id:hi,depth:-1,groupingField:null,groupingKey:null,isAutoGenerated:!0,children:[],childrenFromPath:{},childrenExpanded:!0,parent:null});function $At(e,t,n="A row was provided without id in the rows prop:"){if(e==null)throw new Error(["MUI X: The Data Grid component requires all rows to have a unique `id` property.","Alternatively, you can use the `getRowId` prop to specify a custom id for each row.",n,JSON.stringify(t)].join(` -`))}const BM=(e,t,n)=>{const r=t?t(e):e.id;return $At(r,e,n),r},lT=({rows:e,getRowId:t,loading:n,rowCount:r})=>{const o={type:"full",rows:[]},i={},a={};for(let s=0;s{const n=e[hi];return Math.max(t,n.children.length+(n.footerId==null?0:1))},pfe=({apiRef:e,rowCountProp:t=0,loadingProp:n,previousTree:r,previousTreeDepths:o,previousGroupsToFetch:i})=>{const a=e.current.caches.rows,{tree:s,treeDepths:l,dataRowIds:c,groupingName:u,groupsToFetch:d=[]}=e.current.applyStrategyProcessor("rowTreeCreation",{previousTree:r,previousTreeDepths:o,updates:a.updates,dataRowIdToIdLookup:a.dataRowIdToIdLookup,dataRowIdToModelLookup:a.dataRowIdToModelLookup,previousGroupsToFetch:i}),f=e.current.unstable_applyPipeProcessors("hydrateRows",{tree:s,treeDepths:l,dataRowIdToIdLookup:a.dataRowIdToIdLookup,dataRowIds:c,dataRowIdToModelLookup:a.dataRowIdToModelLookup});return e.current.caches.rows.updates={type:"partial",actions:{insert:[],modify:[],remove:[]},idToActionLookup:{}},W({},f,{totalRowCount:Math.max(t,f.dataRowIds.length),totalTopLevelRowCount:ffe({tree:f.tree,rowCountProp:t}),groupingName:u,loading:n,groupsToFetch:d})},ub=e=>e.type==="skeletonRow"||e.type==="footer"||e.type==="group"&&e.isAutoGenerated||e.type==="pinnedRow"&&e.isAutoGenerated,GH=(e,t,n)=>{const r=e[t];if(r.type!=="group")return[];const o=[];for(let i=0;i{if(e.updates.type==="full")throw new Error("MUI X: Unable to prepare a partial update if a full update is not applied yet.");const o=new Map;n.forEach(u=>{const d=BM(u,t,"A row was provided without id when calling updateRows():");o.has(d)?o.set(d,W({},o.get(d),u)):o.set(d,u)});const i={type:"partial",actions:{insert:[...e.updates.actions.insert??[]],modify:[...e.updates.actions.modify??[]],remove:[...e.updates.actions.remove??[]]},idToActionLookup:W({},e.updates.idToActionLookup),groupKeys:r},a=W({},e.dataRowIdToModelLookup),s=W({},e.dataRowIdToIdLookup),l={insert:{},modify:{},remove:{}};o.forEach((u,d)=>{const f=i.idToActionLookup[d];if(u._action==="delete"){if(f==="remove"||!a[d])return;f!=null&&(l[f][d]=!0),i.actions.remove.push(d),delete a[d],delete s[d];return}const p=a[d];if(p){f==="remove"?(l.remove[d]=!0,i.actions.modify.push(d)):f==null&&i.actions.modify.push(d),a[d]=W({},p,u);return}f==="remove"?(l.remove[d]=!0,i.actions.insert.push(d)):f==null&&i.actions.insert.push(d),a[d]=u,s[d]=d});const c=Object.keys(l);for(let u=0;u0&&(i.actions[d]=i.actions[d].filter(p=>!f[p]))}return{dataRowIdToModelLookup:a,dataRowIdToIdLookup:s,updates:i,rowsBeforePartialUpdates:e.rowsBeforePartialUpdates,loadingPropBeforePartialUpdates:e.loadingPropBeforePartialUpdates,rowCountPropBeforePartialUpdates:e.rowCountPropBeforePartialUpdates}};function DAt(e){var o,i;const t=Zg(e),n=((o=t==null?void 0:t.top)==null?void 0:o.reduce((a,s)=>(a+=e.current.unstable_getRowHeight(s.id),a),0))||0,r=((i=t==null?void 0:t.bottom)==null?void 0:i.reduce((a,s)=>(a+=e.current.unstable_getRowHeight(s.id),a),0))||0;return{top:n,bottom:r}}function hfe(e){return`var(--DataGrid-overlayHeight, ${2*wi(e.current.state).rowHeight}px)`}function dQ(e,t,n){const r=[];return t.forEach(o=>{const i=BM(o,n,"A row was provided without id when calling updateRows():"),a=e.current.getRowNode(i);if((a==null?void 0:a.type)==="pinnedRow"){const s=e.current.caches.pinnedRows,l=s.idLookup[i];l&&(s.idLookup[i]=W({},l,o))}else r.push(o)}),r}const gfe=(e,t,n)=>typeof e=="number"&&e>0?e:t,_At="__tree_data_group__",mfe="__row_group_by_columns_group__",zM="__detail_panel_toggle__",NAt=["id","value","formattedValue","api","field","row","rowNode","colDef","cellMode","isEditable","hasFocus","tabIndex","hideDescendantCount"],LAt=e=>{const{classes:t}=e;return Tn({root:["booleanCell"]},In,t)};function FAt(e){const{value:t,rowNode:n}=e,r=Dt(e,NAt),o=En(),i=Ot(),a={classes:i.classes},s=LAt(a),c=Ye(o,g0)>0&&n.type==="group"&&i.treeData===!1,u=v.useMemo(()=>t?i.slots.booleanCellTrueIcon:i.slots.booleanCellFalseIcon,[i.slots.booleanCellFalseIcon,i.slots.booleanCellTrueIcon,t]);return c&&t===void 0?null:R.jsx(u,W({fontSize:"small",className:s.root,titleAccess:o.current.getLocaleText(t?"booleanCellTrueLabel":"booleanCellFalseLabel"),"data-value":!!t},r))}const jAt=v.memo(FAt),BAt=e=>e.field!==mfe&&ub(e.rowNode)?"":R.jsx(jAt,W({},e)),zAt=["id","value","formattedValue","api","field","row","rowNode","colDef","cellMode","isEditable","tabIndex","className","hasFocus","isValidating","isProcessingProps","error","onValueChange"],VAt=e=>{const{classes:t}=e;return Tn({root:["editBooleanCell"]},In,t)};function HAt(e){var w;const{id:t,value:n,field:r,className:o,hasFocus:i,onValueChange:a}=e,s=Dt(e,zAt),l=En(),c=v.useRef(null),u=To(),[d,f]=v.useState(n),p=Ot(),h={classes:p.classes},m=VAt(h),y=v.useCallback(async x=>{const C=x.target.checked;a&&await a(x,C),f(C),await l.current.setEditCellValue({id:t,field:r,value:C},x)},[l,r,t,a]);return v.useEffect(()=>{f(n)},[n]),Ho(()=>{i&&c.current.focus()},[i]),R.jsx("label",W({htmlFor:u,className:de(m.root,o)},s,{children:R.jsx(p.slots.baseCheckbox,W({id:u,inputRef:c,checked:!!d,onChange:y,size:"small"},(w=p.slotProps)==null?void 0:w.baseCheckbox))}))}const UAt=e=>R.jsx(HAt,W({},e)),WAt=["item","applyValue","apiRef","focusElementRef","isFilterActive","clearButton","tabIndex","label","variant","InputLabelProps"],cT=e=>{if(String(e).toLowerCase()==="true")return!0;if(String(e).toLowerCase()==="false")return!1},GAt=oe("div")({display:"flex",alignItems:"center",width:"100%","& button":{margin:"auto 0px 5px 5px"}});function qAt(e){var E,P,T;const{item:t,applyValue:n,apiRef:r,focusElementRef:o,clearButton:i,tabIndex:a,label:s,variant:l="standard"}=e,c=Dt(e,WAt),[u,d]=v.useState(cT(t.value)),f=Ot(),p=To(),h=To(),m=((E=f.slotProps)==null?void 0:E.baseSelect)||{},y=m.native??!1,w=((P=f.slotProps)==null?void 0:P.baseSelectOption)||{},x=v.useCallback(I=>{const A=cT(I.target.value);d(A),n(W({},t,{value:A}))},[n,t]);v.useEffect(()=>{d(cT(t.value))},[t.value]);const C=s??r.current.getLocaleText("filterPanelInputLabel");return R.jsxs(GAt,{children:[R.jsxs(f.slots.baseFormControl,{fullWidth:!0,children:[R.jsx(f.slots.baseInputLabel,W({},(T=f.slotProps)==null?void 0:T.baseInputLabel,{id:p,shrink:!0,variant:l,children:C})),R.jsxs(f.slots.baseSelect,W({labelId:p,id:h,label:C,value:u===void 0?"":String(u),onChange:x,variant:l,notched:l==="outlined"?!0:void 0,native:y,displayEmpty:!0,inputProps:{ref:o,tabIndex:a}},c,m,{children:[R.jsx(f.slots.baseSelectOption,W({},w,{native:y,value:"",children:r.current.getLocaleText("filterValueAny")})),R.jsx(f.slots.baseSelectOption,W({},w,{native:y,value:"true",children:r.current.getLocaleText("filterValueTrue")})),R.jsx(f.slots.baseSelectOption,W({},w,{native:y,value:"false",children:r.current.getLocaleText("filterValueFalse")}))]}))]}),i]})}const KAt=()=>[{value:"is",getApplyFilterFn:e=>{const t=cT(e.value);return t===void 0?null:n=>!!n===t},InputComponent:qAt}],YAt=(e,t,n,r)=>e?r.current.getLocaleText("booleanCellTrueLabel"):r.current.getLocaleText("booleanCellFalseLabel"),QAt=e=>{switch(e.toLowerCase().trim()){case"true":case"yes":case"1":return!0;case"false":case"no":case"0":case"null":case"undefined":return!1;default:return}},yfe=W({},Ec,{type:"boolean",display:"flex",align:"center",headerAlign:"center",renderCell:BAt,renderEditCell:UAt,sortComparator:nfe,valueFormatter:YAt,filterOperators:KAt(),getApplyQuickFilterFn:void 0,aggregable:!1,pastedValueParser:e=>QAt(e)}),vfe=e=>e.sorting,w1=Ut(vfe,e=>e.sortedRows),qH=mr(w1,Ff,$i,(e,t,n)=>e.reduce((r,o)=>{const i=t[o];i&&r.push({id:o,model:i});const a=n[o];return a&&ub(a)&&r.push({id:o,model:{[Jy]:o}}),r},[])),rl=Ut(vfe,e=>e.sortModel),XAt=mr(rl,e=>e.reduce((n,r,o)=>(n[r.field]={sortDirection:r.sort,sortIndex:e.length>1?o+1:void 0},n),{})),VM=e=>e.filter,di=Ut(VM,e=>e.filterModel);Ut(di,e=>e.quickFilterValues);const JAt=e=>e.visibleRowsLookup,m0=Ut(VM,e=>e.filteredRowsLookup);Ut(VM,e=>e.filteredChildrenCountLookup);Ut(VM,e=>e.filteredDescendantCountLookup);const Hp=mr(JAt,qH,(e,t)=>t.filter(n=>e[n.id]!==!1)),Zy=mr(Hp,e=>e.map(t=>t.id)),bfe=mr(m0,qH,(e,t)=>t.filter(n=>e[n.id]!==!1)),wfe=mr(bfe,e=>e.map(t=>t.id));mr(Zy,$i,(e,t)=>{const n={};let r=0;return e.reduce((o,i)=>{const a=t[i];return n[a.depth]||(n[a.depth]=0),a.depth>r&&(n[a.depth]=0),r=a.depth,n[a.depth]+=1,o[i]=n[a.depth],o},{})});const xfe=mr(Hp,$i,g0,(e,t,n)=>n<2?e:e.filter(r=>{var o;return((o=t[r.id])==null?void 0:o.depth)===0})),KH=Ut(Hp,e=>e.length),YH=Ut(xfe,e=>e.length),ZAt=Ut(bfe,e=>e.length);Ut(ZAt,YH,(e,t)=>e-t);const ekt=mr(di,jd,(e,t)=>{var n;return(n=e.items)==null?void 0:n.filter(r=>{var a,s;if(!r.field)return!1;const o=t[r.field];if(!(o!=null&&o.filterOperators)||((a=o==null?void 0:o.filterOperators)==null?void 0:a.length)===0)return!1;const i=o.filterOperators.find(l=>l.value===r.operator);return i?!i.InputComponent||r.value!=null&&((s=r.value)==null?void 0:s.toString())!=="":!1})}),tkt=mr(ekt,e=>e.reduce((n,r)=>(n[r.field]?n[r.field].push(r):n[r.field]=[r],n),{})),ol=e=>e.rowSelection,nkt=Ut(ol,e=>e.length),rkt=mr(ol,Ff,(e,t)=>new Map(e.map(n=>[n,t[n]]))),hd=mr(ol,e=>e.reduce((t,n)=>(t[n]=n,t),{}));function Sfe(e,t){var l;const n=$i(e),r=w1(e),o=m0(e),i=n[t];if(!i||i.type!=="group")return[];const a=[],s=r.findIndex(c=>c===t)+1;for(let c=s;ci.depth;c+=1){const u=r[c];o[u]!==!1&&e.current.isRowSelectable(u)&&a.push(u)}return a}function okt(e,t){return Ut($i,w1,m0,hd,(n,r,o,i)=>{var u;const a=n[e];if(!a||a.type!=="group")return{isIndeterminate:!1,isChecked:i[e]===e};if(i[e]===e)return{isIndeterminate:!1,isChecked:!0};let s=0,l=0;const c=r.findIndex(d=>d===e)+1;for(let d=c;da.depth;d+=1){const f=r[d];o[f]!==!1&&(s+=1,i[f]!==void 0&&(l+=1))}return{isIndeterminate:l>0&&(l0:i[e]===e}})}function QH(e){return e.signature===Cl.DataGrid?e.checkboxSelection&&e.disableMultipleRowSelection!==!0:!e.disableMultipleRowSelection}const ikt=(e,t)=>{const n=[];let r=t;for(;r!=null&&r!==hi;){const o=e[r];if(!o)return n;n.push(r),r=o.parent}return n},akt=(e,t,n)=>{const r=e[n];if(!r)return[];const o=r.parent;return o==null?[]:e[o].children.filter(a=>a!==n&&t[a])},xP=(e,t,n,r,o,i)=>{const a=m0(e),s=hd(e),l=new Set([]);if(!(!r&&!o)){if(r){const c=t[n];(c==null?void 0:c.type)==="group"&&Sfe(e,n).forEach(d=>{i(d),l.add(d)})}if(o){const c=d=>{if(s[d]!==d&&!l.has(d))return!1;const f=t[d];return(f==null?void 0:f.type)!=="group"?!0:f.children.every(c)},u=d=>{const f=akt(t,a,d);if(f.length===0||f.every(c)){const h=t[d].parent;h!=null&&h!==hi&&e.current.isRowSelectable(h)&&(i(h),l.add(h),u(h))}};u(n)}}},fQ=(e,t,n,r,o,i)=>{const a=hd(e);if(!(!o&&!r)&&(o&&ikt(t,n).forEach(l=>{a[l]===l&&i(l)}),r)){const s=t[n];(s==null?void 0:s.type)==="group"&&Sfe(e,n).forEach(c=>{i(c)})}},skt=["field","id","formattedValue","row","rowNode","colDef","isEditable","cellMode","hasFocus","tabIndex","api"],lkt=e=>{const{classes:t}=e;return Tn({root:["checkboxInput"]},In,t)},ckt=v.forwardRef(function(t,n){var A,k;const{field:r,id:o,rowNode:i,hasFocus:a,tabIndex:s}=t,l=Dt(t,skt),c=En(),u=Ot(),d={classes:u.classes},f=lkt(d),p=v.useRef(null),h=v.useRef(null),m=Jg(p,n),y=O=>{const $={value:O.target.checked,id:o};c.current.publishEvent("rowSelectionCheckboxChange",$,O)};v.useLayoutEffect(()=>{if(s===0){const O=c.current.getCellElement(o,r);O&&(O.tabIndex=-1)}},[c,s,o,r]),v.useEffect(()=>{var O;if(a){const $=(O=p.current)==null?void 0:O.querySelector("input");$==null||$.focus({preventScroll:!0})}else h.current&&h.current.stop({})},[a]);const w=v.useCallback(O=>{O.key===" "&&O.stopPropagation()},[]),x=c.current.isRowSelectable(o),C=okt(o,((A=u.rowSelectionPropagation)==null?void 0:A.parents)??!1),{isIndeterminate:E,isChecked:P}=Ye(c,C);if(i.type==="footer"||i.type==="pinnedRow")return null;const T=c.current.getLocaleText(P?"checkboxSelectionUnselectRow":"checkboxSelectionSelectRow"),I=u.indeterminateCheckboxAction==="select"?P&&!E:P;return R.jsx(u.slots.baseCheckbox,W({ref:m,tabIndex:s,checked:I,onChange:y,className:f.root,inputProps:{"aria-label":T},onKeyDown:w,indeterminate:E,disabled:!x,touchRippleRef:h},(k=u.slotProps)==null?void 0:k.baseCheckbox,l))}),ukt=ckt,HM=e=>e.focus,Za=Ut(HM,e=>e.cell),dkt=Ut(HM,e=>e.columnHeader);Ut(HM,e=>e.columnHeaderFilter);const MO=Ut(HM,e=>e.columnGroupHeader),UM=e=>e.tabIndex,XH=Ut(UM,e=>e.cell),Cfe=Ut(UM,e=>e.columnHeader);Ut(UM,e=>e.columnHeaderFilter);const fkt=Ut(UM,e=>e.columnGroupHeader);function ln(e,t,n){const r=v.useRef(!0);Ho(()=>{r.current=!1,e.current.register(n,t)},[e,n,t]),r.current&&e.current.register(n,t)}function Wo(e,t){const n=v.useRef(null);if(n.current)return n.current;const r=e.current.getLogger(t);return n.current=r,r}const Efe=(e,t,n,r,o)=>{const i=Wo(e,"useNativeEventListener"),[a,s]=v.useState(!1),l=v.useRef(r),c=ofe(t)?t():(t==null?void 0:t.current)??null,u=v.useCallback(d=>l.current&&l.current(d),[]);v.useEffect(()=>{l.current=r},[r]),v.useEffect(()=>{if(c&&n&&!a){i.debug(`Binding native ${n} event`),c.addEventListener(n,u,o),s(!0);const d=()=>{i.debug(`Clearing native ${n} event`),c.removeEventListener(n,u,o)};e.current.subscribeEvent("unmount",d)}},[c,u,n,a,i,o,e])},x1=e=>{const t=v.useRef(!0);t.current&&(t.current=!1,e())},pkt=()=>{},hkt=(e,t)=>{const n=v.useRef(!1);Ho(()=>n.current||!e?pkt:(n.current=!0,t()),[n.current||e])},gkt=100,mkt=e=>e?0:100,Pfe=(e,t,n)=>t>0&&e>0?Math.ceil(e/t):e===-1?n+2:0,Tfe=e=>({page:0,pageSize:e?0:100}),ykt=(e,t=0)=>t===0?e:Math.max(Math.min(e,t-1),0),Ife=(e,t)=>{if(t===Cl.DataGrid&&e>gkt)throw new Error(["MUI X: `pageSize` cannot exceed 100 in the MIT version of the DataGrid.","You need to upgrade to DataGridPro or DataGridPremium component to unlock this feature."].join(` -`))},vkt=-1,WM=e=>e.pagination,Ji=Ut(WM,e=>e.paginationModel),Oy=Ut(WM,e=>e.rowCount),Kw=Ut(WM,e=>e.meta),bkt=Ut(Ji,e=>e.page),wkt=Ut(Ji,e=>e.pageSize),Ofe=Ut(Ji,Oy,(e,t)=>Pfe(t,e.pageSize,e.page)),JH=mr(Ji,$i,g0,Hp,xfe,(e,t,n,r,o)=>{var p;const i=o.length,a=Math.min(e.pageSize*e.page,i-1),s=e.pageSize===vkt?i-1:Math.min(a+e.pageSize-1,i-1);if(a===-1||s===-1)return null;if(n<2)return{firstRowIndex:a,lastRowIndex:s};const l=o[a],c=s-a+1,u=r.findIndex(h=>h.id===l.id);let d=u,f=0;for(;d0)&&(d+=1),m===0&&(f+=1))}return{firstRowIndex:u,lastRowIndex:d-1}}),xkt=mr(Hp,JH,(e,t)=>t?e.slice(t.firstRowIndex,t.lastRowIndex+1):[]),Afe=mr(Zy,JH,(e,t)=>t?e.slice(t.firstRowIndex,t.lastRowIndex+1):[]),Skt=["field","colDef"],Ckt=e=>{const{classes:t}=e;return Tn({root:["checkboxInput"]},In,t)},Ekt=v.forwardRef(function(t,n){var A;const r=Dt(t,Skt),[,o]=v.useState(!1),i=En(),a=Ot(),s={classes:a.classes},l=Ckt(s),c=Ye(i,Cfe),u=Ye(i,ol),d=Ye(i,Zy),f=Ye(i,Afe),p=v.useMemo(()=>typeof a.isRowSelectable!="function"?u:u.filter(k=>i.current.getRow(k)?a.isRowSelectable(i.current.getRowParams(k)):!1),[i,a.isRowSelectable,u]),h=v.useMemo(()=>(!a.pagination||!a.checkboxSelectionVisibleOnly?d:f).reduce((O,$)=>(O[$]=!0,O),{}),[a.pagination,a.checkboxSelectionVisibleOnly,f,d]),m=v.useMemo(()=>p.filter(k=>h[k]).length,[p,h]),y=m>0&&m0,x=k=>{const O={value:k.target.checked};i.current.publishEvent("headerSelectionCheckboxChange",O)},C=c!==null&&c.field===t.field?0:-1;v.useLayoutEffect(()=>{const k=i.current.getColumnHeaderElement(t.field);C===0&&k&&(k.tabIndex=-1)},[C,i,t.field]);const E=v.useCallback(k=>{k.key===" "&&i.current.publishEvent("headerSelectionCheckboxChange",{value:!w})},[i,w]),P=v.useCallback(()=>{o(k=>!k)},[]);v.useEffect(()=>i.current.subscribeEvent("rowSelectionChange",P),[i,P]);const T=i.current.getLocaleText(w?"checkboxSelectionUnselectAllRows":"checkboxSelectionSelectAllRows"),I=a.indeterminateCheckboxAction==="select"?w&&!y:w;return R.jsx(a.slots.baseCheckbox,W({ref:n,indeterminate:y,checked:I,onChange:x,className:l.root,inputProps:{"aria-label":T},tabIndex:C,onKeyDown:E,disabled:!QH(a)},(A=a.slotProps)==null?void 0:A.baseCheckbox,r))}),Yu="__check__",y0=W({},yfe,{type:"custom",field:Yu,width:50,resizable:!1,sortable:!1,filterable:!1,aggregable:!1,disableColumnMenu:!0,disableReorder:!0,disableExport:!0,getApplyQuickFilterFn:void 0,display:"flex",valueGetter:(e,t,n,r)=>{const o=hd(r),i=r.current.getRowId(t);return o[i]!==void 0},renderHeader:e=>R.jsx(Ekt,W({},e)),renderCell:e=>R.jsx(ukt,W({},e))}),Pkt=["item","applyValue","type","apiRef","focusElementRef","InputProps","isFilterActive","clearButton","tabIndex","disabled"];function pQ(e,t){if(e==null)return"";const n=new Date(e);return Number.isNaN(n.getTime())?"":t==="date"?n.toISOString().substring(0,10):t==="datetime-local"?(n.setMinutes(n.getMinutes()-n.getTimezoneOffset()),n.toISOString().substring(0,19)):n.toISOString().substring(0,10)}function Vm(e){var C;const{item:t,applyValue:n,type:r,apiRef:o,focusElementRef:i,InputProps:a,clearButton:s,tabIndex:l,disabled:c}=e,u=Dt(e,Pkt),d=p0(),[f,p]=v.useState(()=>pQ(t.value,r)),[h,m]=v.useState(!1),y=To(),w=Ot(),x=v.useCallback(E=>{d.clear();const P=E.target.value;p(P),m(!0),d.start(w.filterDebounceMs,()=>{const T=new Date(P);n(W({},t,{value:Number.isNaN(T.getTime())?void 0:T})),m(!1)})},[n,t,w.filterDebounceMs,d]);return v.useEffect(()=>{const E=pQ(t.value,r);p(E)},[t.value,r]),R.jsx(w.slots.baseTextField,W({fullWidth:!0,id:y,label:o.current.getLocaleText("filterPanelInputLabel"),placeholder:o.current.getLocaleText("filterPanelInputPlaceholder"),value:f,onChange:x,variant:"standard",type:r||"text",InputLabelProps:{shrink:!0},inputRef:i,InputProps:W({},h||s?{endAdornment:h?R.jsx(w.slots.loadIcon,{fontSize:"small",color:"action"}):s}:{},{disabled:c},a,{inputProps:W({max:r==="datetime-local"?"9999-12-31T23:59":"9999-12-31",tabIndex:l},a==null?void 0:a.inputProps)})},u,(C=w.slotProps)==null?void 0:C.baseTextField))}function Hm(e,t,n,r){if(!e.value)return null;const o=new Date(e.value);n?o.setSeconds(0,0):(o.setMinutes(o.getMinutes()+o.getTimezoneOffset()),o.setHours(0,0,0,0));const i=o.getTime();return a=>{if(!a)return!1;if(r)return t(a.getTime(),i);const s=new Date(a);return n?s.setSeconds(0,0):s.setHours(0,0,0,0),t(s.getTime(),i)}}const kfe=e=>[{value:"is",getApplyFilterFn:t=>Hm(t,(n,r)=>n===r,e),InputComponent:Vm,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"not",getApplyFilterFn:t=>Hm(t,(n,r)=>n!==r,e),InputComponent:Vm,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"after",getApplyFilterFn:t=>Hm(t,(n,r)=>n>r,e),InputComponent:Vm,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"onOrAfter",getApplyFilterFn:t=>Hm(t,(n,r)=>n>=r,e),InputComponent:Vm,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"before",getApplyFilterFn:t=>Hm(t,(n,r)=>nHm(t,(n,r)=>n<=r,e),InputComponent:Vm,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"isEmpty",getApplyFilterFn:()=>t=>t==null,requiresFilterValue:!1},{value:"isNotEmpty",getApplyFilterFn:()=>t=>t!=null,requiresFilterValue:!1}],Tkt=["id","value","formattedValue","api","field","row","rowNode","colDef","cellMode","isEditable","tabIndex","hasFocus","inputProps","isValidating","isProcessingProps","onValueChange"],Ikt=oe(Pb)({fontSize:"inherit"}),Okt=e=>{const{classes:t}=e;return Tn({root:["editInputCell"]},In,t)};function Akt(e){const{id:t,value:n,field:r,colDef:o,hasFocus:i,inputProps:a,onValueChange:s}=e,l=Dt(e,Tkt),c=o.type==="dateTime",u=En(),d=v.useRef(),f=v.useMemo(()=>{let E;n==null?E=null:n instanceof Date?E=n:E=new Date((n??"").toString());let P;return E==null||Number.isNaN(E.getTime())?P="":P=new Date(E.getTime()-E.getTimezoneOffset()*60*1e3).toISOString().substr(0,c?16:10),{parsed:E,formatted:P}},[n,c]),[p,h]=v.useState(f),y={classes:Ot().classes},w=Okt(y),x=v.useCallback(E=>{if(E==="")return null;const[P,T]=E.split("T"),[I,A,k]=P.split("-"),O=new Date;if(O.setFullYear(Number(I),Number(A)-1,Number(k)),O.setHours(0,0,0,0),T){const[$,N]=T.split(":");O.setHours(Number($),Number(N),0,0)}return O},[]),C=v.useCallback(async E=>{const P=E.target.value,T=x(P);s&&await s(E,T),h({parsed:T,formatted:P}),u.current.setEditCellValue({id:t,field:r,value:T},E)},[u,r,t,s,x]);return v.useEffect(()=>{h(E=>{var P,T;return f.parsed!==E.parsed&&((P=f.parsed)==null?void 0:P.getTime())!==((T=E.parsed)==null?void 0:T.getTime())?f:E})},[f]),Ho(()=>{i&&d.current.focus()},[i]),R.jsx(Ikt,W({inputRef:d,fullWidth:!0,className:w.root,type:c?"datetime-local":"date",inputProps:W({max:c?"9999-12-31T23:59":"9999-12-31"},a),value:p.formatted,onChange:C},l))}const Mfe=e=>R.jsx(Akt,W({},e));function Rfe({value:e,columnType:t,rowId:n,field:r}){if(!(e instanceof Date))throw new Error([`MUI X: \`${t}\` column type only accepts \`Date\` objects as values.`,"Use `valueGetter` to transform the value into a `Date` object.",`Row ID: ${n}, field: "${r}".`].join(` -`))}const kkt=(e,t,n,r)=>{if(!e)return"";const o=r.current.getRowId(t);return Rfe({value:e,columnType:"date",rowId:o,field:n.field}),e.toLocaleDateString()},Mkt=(e,t,n,r)=>{if(!e)return"";const o=r.current.getRowId(t);return Rfe({value:e,columnType:"dateTime",rowId:o,field:n.field}),e.toLocaleString()},Rkt=W({},Ec,{type:"date",sortComparator:rfe,valueFormatter:kkt,filterOperators:kfe(),renderEditCell:Mfe,pastedValueParser:e=>new Date(e)}),$kt=W({},Ec,{type:"dateTime",sortComparator:rfe,valueFormatter:Mkt,filterOperators:kfe(!0),renderEditCell:Mfe,pastedValueParser:e=>new Date(e)}),hf=e=>e==null?null:Number(e),Dkt=e=>e==null||Number.isNaN(e)||e===""?null:t=>hf(t)===hf(e),_kt=()=>[{value:"=",getApplyFilterFn:e=>e.value==null||Number.isNaN(e.value)?null:t=>hf(t)===e.value,InputComponent:cl,InputComponentProps:{type:"number"}},{value:"!=",getApplyFilterFn:e=>e.value==null||Number.isNaN(e.value)?null:t=>hf(t)!==e.value,InputComponent:cl,InputComponentProps:{type:"number"}},{value:">",getApplyFilterFn:e=>e.value==null||Number.isNaN(e.value)?null:t=>t==null?!1:hf(t)>e.value,InputComponent:cl,InputComponentProps:{type:"number"}},{value:">=",getApplyFilterFn:e=>e.value==null||Number.isNaN(e.value)?null:t=>t==null?!1:hf(t)>=e.value,InputComponent:cl,InputComponentProps:{type:"number"}},{value:"<",getApplyFilterFn:e=>e.value==null||Number.isNaN(e.value)?null:t=>t==null?!1:hf(t)e.value==null||Number.isNaN(e.value)?null:t=>t==null?!1:hf(t)<=e.value,InputComponent:cl,InputComponentProps:{type:"number"}},{value:"isEmpty",getApplyFilterFn:()=>e=>e==null,requiresFilterValue:!1},{value:"isNotEmpty",getApplyFilterFn:()=>e=>e!=null,requiresFilterValue:!1},{value:"isAnyOf",getApplyFilterFn:e=>!Array.isArray(e.value)||e.value.length===0?null:t=>t!=null&&e.value.includes(Number(t)),InputComponent:afe,InputComponentProps:{type:"number"}}],Nkt=W({},Ec,{type:"number",align:"right",headerAlign:"right",sortComparator:nfe,valueParser:e=>e===""?null:Number(e),valueFormatter:e=>rAt(e)?e.toLocaleString():e||"",filterOperators:_kt(),getApplyQuickFilterFn:Dkt});function db(e){return(e==null?void 0:e.type)==="singleSelect"}function Tg(e,t){if(e)return typeof e.valueOptions=="function"?e.valueOptions(W({field:e.field},t)):e.valueOptions}function RO(e,t,n){if(t===void 0)return;const r=t.find(o=>{const i=n(o);return String(i)===String(e)});return n(r)}const Lkt=["id","value","formattedValue","api","field","row","rowNode","colDef","cellMode","isEditable","tabIndex","className","hasFocus","isValidating","isProcessingProps","error","onValueChange","initialOpen"],Fkt=["MenuProps"];function jkt(e){return!!e.key}function Bkt(e){var N,L;const t=Ot(),{id:n,value:r,field:o,row:i,colDef:a,hasFocus:s,error:l,onValueChange:c,initialOpen:u=t.editMode===wu.Cell}=e,d=Dt(e,Lkt),f=En(),p=v.useRef(),h=v.useRef(),[m,y]=v.useState(u),x=(((N=t.slotProps)==null?void 0:N.baseSelect)||{}).native??!1,C=((L=t.slotProps)==null?void 0:L.baseSelect)||{},{MenuProps:E}=C,P=Dt(C,Fkt);if(Ho(()=>{var j;s&&((j=h.current)==null||j.focus())},[s]),!db(a))return null;const T=Tg(a,{id:n,row:i});if(!T)return null;const I=a.getOptionValue,A=a.getOptionLabel,k=async j=>{if(!db(a)||!T)return;y(!1);const D=j.target,_=RO(D.value,T,I);c&&await c(j,_),await f.current.setEditCellValue({id:n,field:o,value:_},j)},O=(j,D)=>{if(t.editMode===wu.Row){y(!1);return}if(D==="backdropClick"||j.key==="Escape"){const _=f.current.getCellParams(n,o);f.current.publishEvent("cellEditStop",W({},_,{reason:j.key==="Escape"?rc.escapeKeyDown:rc.cellFocusOut}))}},$=j=>{jkt(j)&&j.key==="Enter"||y(!0)};return!T||!a?null:R.jsx(t.slots.baseSelect,W({ref:p,inputRef:h,value:r,onChange:k,open:m,onOpen:$,MenuProps:W({onClose:O},E),error:l,native:x,fullWidth:!0},d,P,{children:T.map(j=>{var _;const D=I(j);return v.createElement(t.slots.baseSelectOption,W({},((_=t.slotProps)==null?void 0:_.baseSelectOption)||{},{native:x,key:D,value:D}),A(j))})}))}const zkt=e=>R.jsx(Bkt,W({},e)),Vkt=["item","applyValue","type","apiRef","focusElementRef","placeholder","tabIndex","label","variant","isFilterActive","clearButton","InputLabelProps"],Hkt=({column:e,OptionComponent:t,getOptionLabel:n,getOptionValue:r,isSelectNative:o,baseSelectOptionProps:i})=>["",...Tg(e)||[]].map(s=>{const l=r(s);let c=n(s);return c===""&&(c=" "),v.createElement(t,W({},i,{native:o,key:l,value:l}),c)}),Ukt=oe("div")({display:"flex",alignItems:"flex-end",width:"100%","& button":{margin:"auto 0px 5px 5px"}});function hQ(e){var I,A,k,O,$;const{item:t,applyValue:n,type:r,apiRef:o,focusElementRef:i,placeholder:a,tabIndex:s,label:l,variant:c="standard",clearButton:u}=e,d=Dt(e,Vkt),f=t.value??"",p=To(),h=To(),m=Ot(),y=((A=(I=m.slotProps)==null?void 0:I.baseSelect)==null?void 0:A.native)??!1;let w=null;if(t.field){const N=o.current.getColumn(t.field);db(N)&&(w=N)}const x=w==null?void 0:w.getOptionValue,C=w==null?void 0:w.getOptionLabel,E=v.useMemo(()=>Tg(w),[w]),P=v.useCallback(N=>{let L=N.target.value;L=RO(L,E,x),n(W({},t,{value:L}))},[E,x,n,t]);if(!db(w))return null;const T=l??o.current.getLocaleText("filterPanelInputLabel");return R.jsxs(Ukt,{children:[R.jsxs(m.slots.baseFormControl,{fullWidth:!0,children:[R.jsx(m.slots.baseInputLabel,W({},(k=m.slotProps)==null?void 0:k.baseInputLabel,{id:h,htmlFor:p,shrink:!0,variant:c,children:T})),R.jsx(m.slots.baseSelect,W({id:p,label:T,labelId:h,value:f,onChange:P,variant:c,type:r||"text",inputProps:{tabIndex:s,ref:i,placeholder:a??o.current.getLocaleText("filterPanelInputPlaceholder")},native:y,notched:c==="outlined"?!0:void 0},d,(O=m.slotProps)==null?void 0:O.baseSelect,{children:Hkt({column:w,OptionComponent:m.slots.baseSelectOption,getOptionLabel:C,getOptionValue:x,isSelectNative:y,baseSelectOptionProps:($=m.slotProps)==null?void 0:$.baseSelectOption})}))]}),u]})}const Wkt=["item","applyValue","type","apiRef","focusElementRef","color","error","helperText","size","variant"],Gkt=["key"],qkt=yne();function Kkt(e){const{item:t,applyValue:n,apiRef:r,focusElementRef:o,color:i,error:a,helperText:s,size:l,variant:c="standard"}=e,u=Dt(e,Wkt),d={color:i,error:a,helperText:s,size:l,variant:c},f=To(),p=Ot();let h=null;if(t.field){const P=r.current.getColumn(t.field);db(P)&&(h=P)}const m=h==null?void 0:h.getOptionValue,y=h==null?void 0:h.getOptionLabel,w=v.useCallback((P,T)=>m(P)===m(T),[m]),x=v.useMemo(()=>Tg(h)||[],[h]),C=v.useMemo(()=>Array.isArray(t.value)?t.value.reduce((P,T)=>{const I=x.find(A=>m(A)===T);return I!=null&&P.push(I),P},[]):[],[m,t.value,x]),E=v.useCallback((P,T)=>{n(W({},t,{value:T.map(m)}))},[n,t,m]);return R.jsx(Ic,W({multiple:!0,options:x,isOptionEqualToValue:w,filterOptions:qkt,id:f,value:C,onChange:E,getOptionLabel:y,renderTags:(P,T)=>P.map((I,A)=>{const k=T({index:A}),{key:O}=k,$=Dt(k,Gkt);return R.jsx(p.slots.baseChip,W({variant:"outlined",size:"small",label:y(I)},$),O)}),renderInput:P=>{var T;return R.jsx(p.slots.baseTextField,W({},P,{label:r.current.getLocaleText("filterPanelInputLabel"),placeholder:r.current.getLocaleText("filterPanelInputPlaceholder"),InputLabelProps:W({},P.InputLabelProps,{shrink:!0}),inputRef:o,type:"singleSelect"},d,(T=p.slotProps)==null?void 0:T.baseTextField))}},u))}const Um=e=>e==null||!UH(e)?e:e.value,Ykt=()=>[{value:"is",getApplyFilterFn:e=>e.value==null||e.value===""?null:t=>Um(t)===Um(e.value),InputComponent:hQ},{value:"not",getApplyFilterFn:e=>e.value==null||e.value===""?null:t=>Um(t)!==Um(e.value),InputComponent:hQ},{value:"isAnyOf",getApplyFilterFn:e=>{if(!Array.isArray(e.value)||e.value.length===0)return null;const t=e.value.map(Um);return n=>t.includes(Um(n))},InputComponent:Kkt}],Qkt=e=>typeof e[0]=="object",Xkt=e=>UH(e)?e.value:e,Jkt=e=>UH(e)?e.label:String(e),Zkt=W({},Ec,{type:"singleSelect",getOptionLabel:Jkt,getOptionValue:Xkt,valueFormatter(e,t,n,r){const o=r.current.getRowId(t);if(!db(n))return"";const i=Tg(n,{id:o,row:t});if(e==null)return"";if(!i)return e;if(!Qkt(i))return n.getOptionLabel(e);const a=i.find(s=>n.getOptionValue(s)===e);return a?n.getOptionLabel(a):""},renderEditCell:zkt,filterOperators:Ykt(),pastedValueParser:(e,t,n)=>{const r=n,o=Tg(r)||[],i=r.getOptionValue;if(o.find(s=>i(s)===e))return e}}),eMt="string",tMt=()=>({string:Ec,number:Nkt,date:Rkt,dateTime:$kt,boolean:yfe,singleSelect:Zkt,[FM]:PAt,custom:Ec}),ZH=e=>e.headerFiltering,nMt=Ut(ZH,e=>(e==null?void 0:e.enabled)??!1),rMt=Ut(ZH,e=>e.editing),oMt=Ut(ZH,e=>e.menuOpen),GM=e=>e.columnGrouping,$fe=mr(GM,e=>(e==null?void 0:e.unwrappedGroupingModel)??{}),Dfe=mr(GM,e=>(e==null?void 0:e.lookup)??{}),iMt=mr(GM,e=>(e==null?void 0:e.headerStructure)??[]),S1=Ut(GM,e=>(e==null?void 0:e.maxDepth)??0),_fe=["maxWidth","minWidth","width","flex"],g_=tMt();function aMt({initialFreeSpace:e,totalFlexUnits:t,flexColumns:n}){const r=new Set(n.map(a=>a.field)),o={all:{},frozenFields:[],freeze:a=>{const s=o.all[a];s&&s.frozen!==!0&&(o.all[a].frozen=!0,o.frozenFields.push(a))}};function i(){if(o.frozenFields.length===r.size)return;const a={min:{},max:{}};let s=e,l=t,c=0;o.frozenFields.forEach(u=>{s-=o.all[u].computedWidth,l-=o.all[u].flex});for(let u=0;ud.maxWidth&&(c+=d.maxWidth-p,p=d.maxWidth,a.max[d.field]=!0),o.all[d.field]={frozen:!1,computedWidth:p,flex:d.flex}}c<0?Object.keys(a.max).forEach(u=>{o.freeze(u)}):c>0?Object.keys(a.min).forEach(u=>{o.freeze(u)}):n.forEach(({field:u})=>{o.freeze(u)}),i()}return i(),o.all}const WF=(e,t)=>{const n={};let r=0,o=0;const i=[];e.orderedFields.forEach(l=>{let c=e.lookup[l],u=0,d=!1;e.columnVisibilityModel[l]!==!1&&(c.flex&&c.flex>0?(r+=c.flex,d=!0):u=fu(c.width||Ec.width,c.minWidth||Ec.minWidth,c.maxWidth||Ec.maxWidth),o+=u),c.computedWidth!==u&&(c=W({},c,{computedWidth:u})),d&&i.push(c),n[l]=c});const a=t===void 0?0:t.viewportOuterSize.width-(t.hasScrollY?t.scrollbarSize:0),s=Math.max(a-o,0);if(r>0&&a>0){const l=aMt({initialFreeSpace:s,totalFlexUnits:r,flexColumns:i});Object.keys(l).forEach(c=>{n[c].computedWidth=l[c].computedWidth})}return W({},e,{lookup:n})},sMt=(e,t)=>{if(!t)return e;const{orderedFields:n=[],dimensions:r={}}=t,o=Object.keys(r);if(o.length===0&&n.length===0)return e;const i={},a=[];for(let u=0;u!i[u])],l=W({},e.lookup);for(let u=0;u{f[p]=h===-1?1/0:h}),l[d]=f}return W({},e,{orderedFields:s,lookup:l})};function gQ(e){let t=g_[eMt];return e&&g_[e]&&(t=g_[e]),t}const ty=({apiRef:e,columnsToUpsert:t,initialState:n,columnVisibilityModel:r=gl(e),keepOnlyColumnsToUpsert:o=!1})=>{var u,d;const i=!e.current.state.columns;let a;if(i)a={orderedFields:[],lookup:{},columnVisibilityModel:r};else{const f=du(e.current.state);a={orderedFields:o?[]:[...f.orderedFields],lookup:W({},f.lookup),columnVisibilityModel:r}}let s={};o&&!i&&(s=Object.keys(a.lookup).reduce((f,p)=>W({},f,{[p]:!1}),{})),t.forEach(f=>{const{field:p}=f;s[p]=!0;let h=a.lookup[p];h==null?(h=W({},gQ(f.type),{field:p,hasBeenResized:!1}),a.orderedFields.push(p)):o&&a.orderedFields.push(p),h&&h.type!==f.type&&(h=W({},gQ(f.type),{field:p}));let m=h.hasBeenResized;_fe.forEach(y=>{f[y]!==void 0&&(m=!0,f[y]===-1&&(f[y]=1/0))}),a.lookup[p]=Gde(h,W({},f,{hasBeenResized:m}))}),o&&!i&&Object.keys(a.lookup).forEach(f=>{s[f]||delete a.lookup[f]});const l=e.current.unstable_applyPipeProcessors("hydrateColumns",a),c=sMt(l,n);return WF(c,((d=(u=e.current).getRootDimensions)==null?void 0:d.call(u))??void 0)};function lMt({firstColumnToRender:e,apiRef:t,firstRowToRender:n,lastRowToRender:r,visibleRows:o}){let i=e;for(let a=n;a{const{scrollDirection:t,classes:n}=e,r={root:["scrollArea",`scrollArea--${t}`]};return Tn(r,In,n)},dMt=or("div",{name:"MuiDataGrid",slot:"ScrollArea",overridesResolver:(e,t)=>[{[`&.${le["scrollArea--left"]}`]:t["scrollArea--left"]},{[`&.${le["scrollArea--right"]}`]:t["scrollArea--right"]},t.scrollArea]})(()=>({position:"absolute",top:0,zIndex:101,width:20,bottom:0,[`&.${le["scrollArea--left"]}`]:{left:0},[`&.${le["scrollArea--right"]}`]:{right:0}}));function fMt(e){const{scrollDirection:t}=e,n=v.useRef(null),r=En(),o=p0(),i=Ye(r,v1),a=Ye(r,VH),s=Ye(r,wi),l=v.useRef({left:0,top:0}),c=()=>{if(t==="left")return l.current.left>0;if(t==="right"){const A=a-s.viewportInnerSize.width;return l.current.left{l.current=A,p(c)},P=Ar(A=>{let k;if(A.preventDefault(),t==="left")k=A.clientX-n.current.getBoundingClientRect().right;else if(t==="right")k=Math.max(1,A.clientX-n.current.getBoundingClientRect().left);else throw new Error("MUI X: Wrong drag direction");k=(k-mQ)*cMt+mQ,o.start(0,()=>{r.current.scroll({left:l.current.left+k,top:l.current.top})})}),T=Ar(()=>{d(!0)}),I=Ar(()=>{d(!1)});return bt(r,"scrollPositionChange",E),bt(r,"columnHeaderDragStart",T),bt(r,"columnHeaderDragEnd",I),!u||!f?null:R.jsx(dMt,{ref:n,className:de(y.root),ownerState:m,onDragOver:P,style:C})}const yQ=zp(fMt),pMt=typeof window<"u"?v.useLayoutEffect:v.useEffect,hMt=()=>{};function gMt(e,t,n){const r=v.useRef(null);r.current=t,pMt(()=>{if(typeof ResizeObserver>"u")return hMt;const o=e.current,i=new ResizeObserver(a=>{r.current(a)});return o&&i.observe(o),()=>{i.disconnect()}},[e,n])}const Nfe=v.createContext(void 0);function Ul(){const e=v.useContext(Nfe);if(e===void 0)throw new Error(["MUI X: Could not find the Data Grid private context.","It looks like you rendered your component outside of a DataGrid, DataGridPro or DataGridPremium parent component.","This can also happen if you are bundling multiple versions of the Data Grid."].join(` -`));return e}const ev=(e,t)=>{let n,r;return t.pagination&&t.paginationMode==="client"?(r=JH(e),n=xkt(e)):(n=Hp(e),n.length===0?r=null:r={firstRowIndex:0,lastRowIndex:n.length-1}),{rows:n,range:r}},Up=(e,t)=>{const n=ev(e,t);return v.useMemo(()=>({rows:n.rows,range:n.range}),[n.rows,n.range])},mMt=typeof navigator<"u"?navigator.userAgent.toLowerCase():"empty",yMt=mMt.includes("firefox"),v0=e=>e.rowsMeta,qM=e=>e.virtualization;Ut(qM,e=>e.enabled);const t5=Ut(qM,e=>e.enabledForColumns),vMt=Ut(qM,e=>e.enabledForRows),KM=Ut(qM,e=>e.renderContext),bMt=mr(e=>e.virtualization.renderContext.firstColumnIndex,e=>e.virtualization.renderContext.lastColumnIndex,(e,t)=>({firstColumnIndex:e,lastColumnIndex:t})),Lfe={firstRowIndex:0,lastRowIndex:0,firstColumnIndex:0,lastColumnIndex:0},wMt=(e,t)=>{const{disableVirtualization:n,autoHeight:r}=t;return W({},e,{virtualization:{enabled:!n,enabledForColumns:!n,enabledForRows:!n&&!r,renderContext:Lfe}})};function xMt(e,t){const n=i=>{e.current.setState(a=>W({},a,{virtualization:W({},a.virtualization,{enabled:i,enabledForColumns:i,enabledForRows:i&&!t.autoHeight})}))};ln(e,{unstable_setVirtualization:n,unstable_setColumnVirtualization:i=>{e.current.setState(a=>W({},a,{virtualization:W({},a.virtualization,{enabledForColumns:i})}))}},"public"),v.useEffect(()=>{n(!t.disableVirtualization)},[t.disableVirtualization,t.autoHeight])}const n5=e=>e.rowSpanning,Ffe=Ut(n5,e=>e.hiddenCells),SMt=Ut(n5,e=>e.spannedCells),CMt=Ut(n5,e=>e.hiddenCellOriginMap),fb=e=>e.listViewColumn,m_=50;var yo=function(e){return e[e.NONE=0]="NONE",e[e.UP=1]="UP",e[e.DOWN=2]="DOWN",e[e.LEFT=3]="LEFT",e[e.RIGHT=4]="RIGHT",e}(yo||{});const vQ={top:0,left:0},EMt=Object.freeze(new Map),PMt=(e,t,n,r,o)=>({direction:yo.NONE,buffer:Bfe(e,yo.NONE,t,n,r,o)});let GF=!1;try{typeof window<"u"&&(GF=/jsdom/.test(window.navigator.userAgent))}catch{}const TMt=()=>{const e=Ul(),t=Ot(),{unstable_listView:n}=t,r=Ye(e,()=>n?[fb(e.current.state)]:Io(e)),o=Ye(e,vMt)&&!GF,i=Ye(e,t5)&&!GF,a=Ye(e,wi),s=a.viewportOuterSize,l=Ye(e,Zg),c=Ye(e,b1),u=n?{left:[],right:[]}:c,d=l.bottom.length>0,[f,p]=v.useState(EMt),h=dr(),m=Ye(e,Za),y=Ye(e,XH),w=Ye(e,v0),x=Ye(e,hd),C=Up(e,t),E=e.current.rootElementRef,P=e.current.mainElementRef,T=e.current.virtualScrollerRef,I=e.current.virtualScrollbarVerticalRef,A=e.current.virtualScrollbarHorizontalRef,k=a.contentSize.height,O=a.columnsTotalWidth,$=Ye(e,UOt);gMt(P,()=>e.current.resize());const N=v.useRef(vQ),L=v.useRef(vQ),j=v.useRef(Lfe),D=Ye(e,KM),_=p0(),z=v.useRef(void 0),F=Au(()=>PMt(h,t.rowBufferPx,t.columnBufferPx,a.rowHeight*15,m_*6)).current,V={rowIndex:v.useMemo(()=>m?C.rows.findIndex(re=>re.id===m.id):-1,[m,C.rows]),columnIndex:v.useMemo(()=>m?r.findIndex(re=>re.field===m.field):-1,[m,r])},U=v.useCallback(re=>{if(AMt(re,e.current.state.virtualization.renderContext))return;const fe=re.firstRowIndex!==j.current.firstRowIndex||re.lastRowIndex!==j.current.lastRowIndex;e.current.setState(Z=>W({},Z,{virtualization:W({},Z.virtualization,{renderContext:re})})),a.isReady&&fe&&(j.current=re,e.current.publishEvent("renderedRowsIntervalChange",re)),L.current=N.current},[e,a.isReady]),q=Ar(()=>{const re={top:T.current.scrollTop,left:T.current.scrollLeft},fe=re.left-N.current.left,Z=re.top-N.current.top,ce=fe!==0||Z!==0;N.current=re;const ge=ce?kMt(fe,Z):yo.NONE,we=Math.abs(N.current.top-L.current.top),me=Math.abs(N.current.left-L.current.left),Se=we>=a.rowHeight||me>=m_,xe=F.direction!==ge;if(!(Se||xe))return D;if(xe)switch(ge){case yo.NONE:case yo.LEFT:case yo.RIGHT:z.current=void 0;break;default:z.current=D;break}F.direction=ge,F.buffer=Bfe(h,ge,t.rowBufferPx,t.columnBufferPx,a.rowHeight*15,m_*6);const De=y_(e,t,o,i),_e=v_(De,N.current,F);return Eb.flushSync(()=>{U(_e)}),_.start(1e3,q),_e}),X=()=>{const re=y_(e,t,o,i),fe=v_(re,N.current,F);z.current=void 0,U(fe)},ie=Ar(re=>{const{scrollTop:fe,scrollLeft:Z}=re.currentTarget;if(fe<0||!h&&Z<0||h&&Z>0)return;const ce=q();e.current.publishEvent("scrollPositionChange",{top:fe,left:Z,renderContext:ce})}),ee=Ar(re=>{e.current.publishEvent("virtualScrollerWheel",{},re)}),Q=Ar(re=>{e.current.publishEvent("virtualScrollerTouchMove",{},re)}),te=(re={})=>{var Pe;if(!re.rows&&!C.range)return[];const fe=re.renderContext??D,Z=!d&&re.position===void 0||d&&re.position==="bottom",ce=re.position!==void 0;let ge;switch(re.position){case"top":ge=0;break;case"bottom":ge=l.top.length+C.rows.length;break;case void 0:ge=l.top.length;break}const we=re.rows??C.rows,me=fe.firstRowIndex,Se=Math.min(fe.lastRowIndex,we.length),xe=re.rows?nQ(0,re.rows.length):nQ(me,Se);let ke=-1;!ce&&V.rowIndex!==-1&&(V.rowIndex=Se&&(ke=V.rowIndex,xe.push(ke)));const De=[],_e=(Pe=t.slotProps)==null?void 0:Pe.row,ye=Vp(e);return xe.forEach(Ae=>{var Gn,Jn,Do;const{id:Me,model:We}=we[Ae],He=(((Gn=C==null?void 0:C.range)==null?void 0:Gn.firstRowIndex)||0)+ge+Ae;if($){const no=u.left.length,Bi=r.length-u.right.length;e.current.calculateColSpan({rowId:Me,minFirstColumn:no,maxLastColumn:Bi,columns:r}),u.left.length>0&&e.current.calculateColSpan({rowId:Me,minFirstColumn:0,maxLastColumn:u.left.length,columns:r}),u.right.length>0&&e.current.calculateColSpan({rowId:Me,minFirstColumn:r.length-u.right.length,maxLastColumn:r.length,columns:r})}const Xe=(m==null?void 0:m.id)===Me,ht=e.current.rowHasAutoHeight(Me)?"auto":e.current.unstable_getRowHeight(Me);let ot;x[Me]==null?ot=!1:ot=e.current.isRowSelectable(Me);let et=!1;re.position===void 0&&(et=Ae===0);let St=!1;const On=Ae===we.length-1;if(Z)if(ce)St=On;else{const no=C.rows.length-1;Ae===no&&(St=!0)}const $e=Ae===ke;let Qe=null;y!==null&&y.id===Me&&(Qe=e.current.getCellParams(Me,y.field).cellMode==="view"?y.field:null);let Et=fe;!ce&&z.current&&Ae>=z.current.firstRowIndex&&Aes.width,ae=v.useMemo(()=>({overflowX:!pe||n?"hidden":void 0,overflowY:t.autoHeight?"hidden":void 0}),[pe,t.autoHeight,n]),se=v.useMemo(()=>{const re={width:pe?O:"auto",flexBasis:k,flexShrink:0};return t.autoHeight&&C.rows.length===0&&(re.flexBasis=hfe(e)),re},[e,O,k,pe,t.autoHeight,C.rows.length]);return v.useEffect(()=>{e.current.publishEvent("virtualScrollerContentSizeChange")},[e,se]),Ho(()=>{e.current.resize()},[e,w.currentPageTotalHeight]),Ho(()=>{i&&(T.current.scrollLeft=0),o&&(T.current.scrollTop=0)},[i,o,E,T]),Ho(()=>{n&&(T.current.scrollLeft=0)},[n,T]),hkt(s.width!==0,()=>{const re=y_(e,t,o,i),fe=v_(re,N.current,F);U(fe),e.current.publishEvent("scrollPositionChange",{top:N.current.top,left:N.current.left,renderContext:fe})}),e.current.register("private",{updateRenderContext:X}),bt(e,"columnsChange",X),bt(e,"filteredRowsSet",X),bt(e,"rowExpansionChange",X),{renderContext:D,setPanels:p,getRows:te,getContainerProps:()=>({ref:P}),getScrollerProps:()=>({ref:T,onScroll:ie,onWheel:ee,onTouchMove:Q,style:ae,role:"presentation",tabIndex:yMt?-1:void 0}),getContentProps:()=>({style:se,role:"presentation"}),getRenderZoneProps:()=>({role:"rowgroup"}),getScrollbarVerticalProps:()=>({ref:I,role:"presentation"}),getScrollbarHorizontalProps:()=>({ref:A,role:"presentation"})}};function y_(e,t,n,r){const o=wi(e.current.state),i=ev(e,t),a=t.unstable_listView?[fb(e.current.state)]:Io(e),s=CMt(e),l=e.current.state.rows.dataRowIds.at(-1),c=a.at(-1);return{enabledForRows:n,enabledForColumns:r,apiRef:e,autoHeight:t.autoHeight,rowBufferPx:t.rowBufferPx,columnBufferPx:t.columnBufferPx,leftPinnedWidth:o.leftPinnedWidth,columnsTotalWidth:o.columnsTotalWidth,viewportInnerWidth:o.viewportInnerSize.width,viewportInnerHeight:o.viewportInnerSize.height,lastRowHeight:l!==void 0?e.current.unstable_getRowHeight(l):0,lastColumnWidth:(c==null?void 0:c.computedWidth)??0,rowsMeta:v0(e.current.state),columnPositions:Vp(e),rows:i.rows,range:i.range,pinnedColumns:b1(e),visibleColumns:a,hiddenCellsOriginMap:s,listView:t.unstable_listView??!1}}function v_(e,t,n){const r={firstRowIndex:0,lastRowIndex:e.rows.length,firstColumnIndex:0,lastColumnIndex:e.visibleColumns.length},{top:o,left:i}=t,a=Math.abs(i)+e.leftPinnedWidth;if(e.enabledForRows){let l=Math.min(bQ(e,o,{atStart:!0,lastPosition:e.rowsMeta.positions[e.rowsMeta.positions.length-1]+e.lastRowHeight}),e.rowsMeta.positions.length-1);const c=e.hiddenCellsOriginMap[l];if(c){const d=Math.min(...Object.values(c));l=Math.min(l,d)}const u=e.autoHeight?l+e.rows.length:bQ(e,o+e.viewportInnerHeight);r.firstRowIndex=l,r.lastRowIndex=u}if(e.enabledForColumns){let l=0,c=e.columnPositions.length,u=!1;const[d,f]=qF({firstIndex:r.firstRowIndex,lastIndex:r.lastRowIndex,minFirstIndex:0,maxLastIndex:e.rows.length,bufferBefore:n.buffer.rowBefore,bufferAfter:n.buffer.rowAfter,positions:e.rowsMeta.positions,lastSize:e.lastRowHeight});for(let p=d;p=e.range.lastRowIndex);const i=fu(r-(((s=e.range)==null?void 0:s.firstRowIndex)||0),0,e.rowsMeta.positions.length);return o||e.rowsMeta.positions[i]>=t?pp(t,e.rowsMeta.positions,n):OMt(t,e.rowsMeta.positions,i,n)}function IMt(e,t,n){const[r,o]=qF({firstIndex:t.firstRowIndex,lastIndex:t.lastRowIndex,minFirstIndex:0,maxLastIndex:e.rows.length,bufferBefore:n.buffer.rowBefore,bufferAfter:n.buffer.rowAfter,positions:e.rowsMeta.positions,lastSize:e.lastRowHeight}),[i,a]=qF({firstIndex:t.firstColumnIndex,lastIndex:t.lastColumnIndex,minFirstIndex:e.pinnedColumns.left.length,maxLastIndex:e.visibleColumns.length-e.pinnedColumns.right.length,bufferBefore:n.buffer.columnBefore,bufferAfter:n.buffer.columnAfter,positions:e.columnPositions,lastSize:e.lastColumnWidth}),s=lMt({firstColumnToRender:i,apiRef:e.apiRef,firstRowToRender:r,lastRowToRender:o,visibleRows:e.rows});return{firstRowIndex:r,lastRowIndex:o,firstColumnIndex:s,lastColumnIndex:a}}function pp(e,t,n=void 0,r=0,o=t.length){if(t.length<=0)return-1;if(r>=o)return r;const i=r+Math.floor((o-r)/2),a=t[i];let s;if(n!=null&&n.atStart){const l=(i===t.length-1?n.lastPosition:t[i+1])-a;s=e-l=Math.abs(e)?t>0?yo.DOWN:yo.UP:e>0?yo.RIGHT:yo.LEFT}function Bfe(e,t,n,r,o,i){if(e)switch(t){case yo.LEFT:t=yo.RIGHT;break;case yo.RIGHT:t=yo.LEFT;break}switch(t){case yo.NONE:return{rowAfter:n,rowBefore:n,columnAfter:r,columnBefore:r};case yo.LEFT:return{rowAfter:0,rowBefore:0,columnAfter:0,columnBefore:i};case yo.RIGHT:return{rowAfter:0,rowBefore:0,columnAfter:i,columnBefore:0};case yo.UP:return{rowAfter:0,rowBefore:o,columnAfter:0,columnBefore:0};case yo.DOWN:return{rowAfter:o,rowBefore:0,columnAfter:0,columnBefore:0};default:throw new Error("unreachable")}}const MMt=()=>{var u,d;const e=En(),t=Ot(),n=Ye(e,jM),r=Ye(e,KH),o=n===0,i=Ye(e,TAt),a=!i&&o,s=!i&&n>0&&r===0;let l=null,c=null;return a&&(l="noRowsOverlay"),s&&(l="noResultsOverlay"),i&&(l="loadingOverlay",c=((d=(u=t.slotProps)==null?void 0:u.loadingOverlay)==null?void 0:d[o?"noRowsVariant":"variant"])||null),{overlayType:l,loadingOverlayVariant:c}},RMt=or("div",{name:"MuiDataGrid",slot:"OverlayWrapper",shouldForwardProp:e=>e!=="overlayType"&&e!=="loadingOverlayVariant",overridesResolver:(e,t)=>t.overlayWrapper})(({overlayType:e,loadingOverlayVariant:t})=>t!=="skeleton"?{position:"sticky",top:"var(--DataGrid-headersTotalHeight)",left:0,width:0,height:0,zIndex:e==="loadingOverlay"?5:4}:{}),$Mt=or("div",{name:"MuiDataGrid",slot:"OverlayWrapperInner",shouldForwardProp:e=>e!=="overlayType"&&e!=="loadingOverlayVariant",overridesResolver:(e,t)=>t.overlayWrapperInner})({}),DMt=e=>{const{classes:t}=e;return Tn({root:["overlayWrapper"],inner:["overlayWrapperInner"]},In,t)};function _Mt(e){const t=En(),n=Ot(),r=Up(t,n),o=Ye(t,wi);let i=o.viewportOuterSize.height-o.topContainerHeight-o.bottomContainerHeight-(o.hasScrollX?o.scrollbarSize:0);(n.autoHeight&&r.rows.length===0||i===0)&&(i=hfe(t));const a=DMt(W({},e,{classes:n.classes}));return R.jsx(RMt,W({className:de(a.root)},e,{children:R.jsx($Mt,W({className:de(a.inner),style:{height:i,width:o.viewportOuterSize.width}},e))}))}function NMt(e){var i,a;const{overlayType:t}=e,n=Ot();if(!t)return null;const r=(i=n.slots)==null?void 0:i[t],o=(a=n.slotProps)==null?void 0:a[t];return R.jsx(_Mt,W({},e,{children:R.jsx(r,W({},o))}))}const uT=e=>e.columnMenu;function LMt(){var y;const e=Ul(),t=Ot(),n=Ye(e,Io),r=Ye(e,tkt),o=Ye(e,XAt),i=Ye(e,Cfe),a=Ye(e,XH),s=Ye(e,fkt),l=Ye(e,dkt),c=Ye(e,MO),u=Ye(e,S1),d=Ye(e,uT),f=Ye(e,gl),p=Ye(e,iMt),h=!(s===null&&i===null&&a===null),m=e.current.columnHeadersContainerRef;return R.jsx(t.slots.columnHeaders,W({ref:m,visibleColumns:n,filterColumnLookup:r,sortColumnLookup:o,columnHeaderTabIndexState:i,columnGroupHeaderTabIndexState:s,columnHeaderFocus:l,columnGroupHeaderFocus:c,headerGroupingMaxDepth:u,columnMenuState:d,columnVisibility:f,columnGroupsHeaderStructure:p,hasOtherElementInTabSequence:h},(y=t.slotProps)==null?void 0:y.columnHeaders))}const FMt=zp(LMt),zfe=v.createContext(void 0),Vfe=()=>{const e=v.useContext(zfe);if(e===void 0)throw new Error(["MUI X: Could not find the Data Grid configuration context.","It looks like you rendered your component outside of a DataGrid, DataGridPro or DataGridPremium parent component.","This can also happen if you are bundling multiple versions of the Data Grid."].join(` -`));return e},jMt=or("div")({position:"absolute",top:"var(--DataGrid-headersTotalHeight)",left:0,width:"calc(100% - (var(--DataGrid-hasScrollY) * var(--DataGrid-scrollbarSize)))"}),BMt=or("div",{name:"MuiDataGrid",slot:"Main",overridesResolver:(e,t)=>t.main})({flexGrow:1,position:"relative",overflow:"hidden",display:"flex",flexDirection:"column"}),zMt=v.forwardRef((e,t)=>{const n=Ot(),o=Vfe().hooks.useGridAriaAttributes();return R.jsxs(BMt,W({ref:t,ownerState:n,className:e.className,tabIndex:-1},o,{children:[R.jsx(jMt,{role:"presentation","data-id":"gridPanelAnchor"}),e.children]}))}),VMt=()=>Tn({root:["topContainer"]},In,{}),HMt=or("div")({position:"sticky",zIndex:4,top:0});function UMt(e){const t=VMt();return R.jsx(HMt,W({},e,{className:de(t.root,le["container--top"]),role:"presentation"}))}const WMt=()=>Tn({root:["bottomContainer"]},In,{}),GMt=or("div")({position:"sticky",zIndex:4,bottom:"calc(var(--DataGrid-hasScrollX) * var(--DataGrid-scrollbarSize))"});function qMt(e){const t=WMt();return R.jsx(GMt,W({},e,{className:de(t.root,le["container--bottom"]),role:"presentation"}))}const KMt=(e,t)=>{const{classes:n}=e;return Tn({root:["virtualScrollerContent",t&&"virtualScrollerContent--overflowed"]},In,n)},YMt=or("div",{name:"MuiDataGrid",slot:"VirtualScrollerContent",overridesResolver:(e,t)=>t.virtualScrollerContent})({}),QMt=v.forwardRef(function(t,n){var a;const r=Ot(),o=!r.autoHeight&&((a=t.style)==null?void 0:a.minHeight)==="auto",i=KMt(r,o);return R.jsx(YMt,W({ref:n},t,{ownerState:r,className:de(i.root,t.className)}))}),XMt=or("div")({display:"flex",flexDirection:"row",width:"var(--DataGrid-rowWidth)",boxSizing:"border-box"}),Hfe=or("div")({position:"sticky",height:"100%",boxSizing:"border-box",borderTop:"1px solid var(--rowBorderColor)",backgroundColor:"var(--DataGrid-pinnedBackground)"}),JMt=or(Hfe)({left:0,borderRight:"1px solid var(--rowBorderColor)"}),ZMt=or(Hfe)({right:0,borderLeft:"1px solid var(--rowBorderColor)"}),eRt=or("div")({flexGrow:1,borderTop:"1px solid var(--rowBorderColor)"});function tRt({rowsLength:e}){const t=En(),{viewportOuterSize:n,minimumSize:r,hasScrollX:o,hasScrollY:i,scrollbarSize:a,leftPinnedWidth:s,rightPinnedWidth:l}=Ye(t,wi),c=o?a:0,u=n.height-r.height>0;return c===0&&!u?null:R.jsxs(XMt,{className:le.filler,role:"presentation",style:{height:c,"--rowBorderColor":e===0?"transparent":"var(--DataGrid-rowBorderColor)"},children:[s>0&&R.jsx(JMt,{className:le["filler--pinnedLeft"],style:{width:s}}),R.jsx(eRt,{}),l>0&&R.jsx(ZMt,{className:le["filler--pinnedRight"],style:{width:l+(i?a:0)}})]})}const nRt=zp(tRt),rRt=["className"],oRt=e=>{const{classes:t}=e;return Tn({root:["virtualScrollerRenderZone"]},In,t)},iRt=or("div",{name:"MuiDataGrid",slot:"VirtualScrollerRenderZone",overridesResolver:(e,t)=>t.virtualScrollerRenderZone})({position:"absolute",display:"flex",flexDirection:"column"}),aRt=v.forwardRef(function(t,n){const{className:r}=t,o=Dt(t,rRt),i=En(),a=Ot(),s=oRt(a),l=Ye(i,()=>{const c=KM(i);return v0(i.current.state).positions[c.firstRowIndex]??0});return R.jsx(iRt,W({ref:n,className:de(s.root,r),ownerState:a,style:{transform:`translate3d(0, ${l}px, 0)`}},o))}),sRt={includeHeaders:!0,includeOutliers:!1,outliersFactor:1.5,expand:!1},Xo=e=>e.editRows,eC=e=>e.preferencePanel;var Ig=function(e){return e.filters="filters",e.columns="columns",e}(Ig||{});const lRt=(e,t)=>{const{classes:n}=e,r={root:["scrollbar",`scrollbar--${t}`],content:["scrollbarContent"]};return Tn(r,In,n)},Ufe=or("div")({position:"absolute",display:"inline-block",zIndex:6,"--size":"calc(max(var(--DataGrid-scrollbarSize), 14px))"}),cRt=or(Ufe)({width:"var(--size)",height:"calc(var(--DataGrid-hasScrollY) * (100% - var(--DataGrid-topContainerHeight) - var(--DataGrid-bottomContainerHeight) - var(--DataGrid-hasScrollX) * var(--DataGrid-scrollbarSize)))",overflowY:"auto",overflowX:"hidden",outline:0,"& > div":{width:"var(--size)"},top:"var(--DataGrid-topContainerHeight)",right:"0px"}),uRt=or(Ufe)({width:"100%",height:"var(--size)",overflowY:"hidden",overflowX:"auto",outline:0,"& > div":{height:"var(--size)"},bottom:"0px"}),wQ=v.forwardRef(function(t,n){const r=Ul(),o=Ot(),i=v.useRef(!1),a=v.useRef(0),s=v.useRef(null),l=v.useRef(null),c=lRt(o,t.position),u=Ye(r,wi),d=t.position==="vertical"?"height":"width",f=t.position==="vertical"?"scrollTop":"scrollLeft",p=t.position==="vertical"?u.hasScrollX:u.hasScrollY,h=u.minimumSize[d]+(p?u.scrollbarSize:0),y=(t.position==="vertical"?u.viewportInnerSize.height:u.viewportOuterSize.width)*(h/u.viewportOuterSize[d]),w=Ar(()=>{const E=r.current.virtualScrollerRef.current,P=s.current;if(!P||E[f]===a.current)return;if(a.current=E[f],i.current){i.current=!1;return}i.current=!0;const T=E[f]/h;P[f]=T*y}),x=Ar(()=>{const E=r.current.virtualScrollerRef.current,P=s.current;if(!P)return;if(i.current){i.current=!1;return}i.current=!0;const T=P[f]/y;E[f]=T*h});LM(()=>{const E=r.current.virtualScrollerRef.current,P=s.current;return E.addEventListener("scroll",w,{capture:!0}),P.addEventListener("scroll",x,{capture:!0}),()=>{E.removeEventListener("scroll",w,{capture:!0}),P.removeEventListener("scroll",x,{capture:!0})}}),v.useEffect(()=>{l.current.style.setProperty(d,`${y}px`)},[y,d]);const C=t.position==="vertical"?cRt:uRt;return R.jsx(C,{ref:Jg(n,s),className:c.root,style:t.position==="vertical"&&o.unstable_listView?{height:"100%",top:0}:void 0,tabIndex:-1,"aria-hidden":"true",children:R.jsx("div",{ref:l,className:c.content})})}),dRt=(e,t,n)=>{const{classes:r}=e,o={root:["main",t.rightPinnedWidth>0&&"main--hasPinnedRight",n==="skeleton"&&"main--hasSkeletonLoadingOverlay"],scroller:["virtualScroller",t.hasScrollX&&"virtualScroller--hasScrollX"]};return Tn(o,In,r)},fRt=or("div",{name:"MuiDataGrid",slot:"VirtualScroller",overridesResolver:(e,t)=>t.virtualScroller})({position:"relative",height:"100%",flexGrow:1,overflow:"scroll",scrollbarWidth:"none",display:"flex",flexDirection:"column","&::-webkit-scrollbar":{display:"none"},"@media print":{overflow:"hidden"},zIndex:0});function pRt(e){const t=En(),n=Ot(),r=Ye(t,wi),o=MMt(),i=dRt(n,r,o.loadingOverlayVariant),a=TMt(),{getContainerProps:s,getScrollerProps:l,getContentProps:c,getRenderZoneProps:u,getScrollbarVerticalProps:d,getScrollbarHorizontalProps:f,getRows:p}=a,h=p();return R.jsxs(zMt,W({className:i.root},s(),{children:[R.jsx(yQ,{scrollDirection:"left"}),R.jsx(yQ,{scrollDirection:"right"}),R.jsxs(fRt,W({className:i.scroller},l(),{ownerState:n,children:[R.jsxs(UMt,{children:[!n.unstable_listView&&R.jsx(FMt,{}),R.jsx(n.slots.pinnedRows,{position:"top",virtualScroller:a})]}),R.jsx(NMt,W({},o)),R.jsx(QMt,W({},c(),{children:R.jsxs(aRt,W({},u(),{children:[h,R.jsx(n.slots.detailPanels,{virtualScroller:a})]}))})),R.jsx(nRt,{rowsLength:h.length}),R.jsx(qMt,{children:R.jsx(n.slots.pinnedRows,{position:"bottom",virtualScroller:a})})]})),r.hasScrollY&&R.jsx(wQ,W({position:"vertical"},d())),r.hasScrollX&&!n.unstable_listView&&R.jsx(wQ,W({position:"horizontal"},f())),e.children]}))}function hRt(){var t;const e=Ot();return e.hideFooter?null:R.jsx(e.slots.footer,W({},(t=e.slotProps)==null?void 0:t.footer))}let b_;function gRt(){return b_===void 0&&document.createElement("div").focus({get preventScroll(){return b_=!0,!1}}),b_}function mRt(e){return e.scrollHeight>e.clientHeight||e.scrollWidth>e.clientWidth}function $O(e,t){return e.closest(`.${t}`)}function Bd(e){return e.replace(/["\\]/g,"\\$&")}function yRt(e,t){return e.querySelector(`[role="columnheader"][data-field="${Bd(t)}"]`)}function Wfe(e){return`.${le.row}[data-id="${Bd(String(e))}"]`}function vRt(e,t){return e.querySelector(Wfe(t))}function bRt(e,{id:t,field:n}){const r=Wfe(t),o=`.${le.cell}[data-field="${Bd(n)}"]`,i=`${r} ${o}`;return e.querySelector(i)}function C1(e){return e.target.nodeType===1&&!e.currentTarget.contains(e.target)}function wRt(e){return e.getAttribute("data-field")}function xRt(e,t){return e.querySelector(`[data-field="${Bd(t)}"]`)}function SRt(e){return e.getAttribute("data-fields").slice(2,-2).split("-|-")}function CRt(e,t){return Array.from(e.querySelectorAll(`[data-fields*="|-${Bd(t)}-|"]`)??[])}function ERt(e,t){var a;if(!$O(e,le.root))throw new Error("MUI X: The root element is not found.");const r=e.getAttribute("aria-colindex");if(!r)return[];const o=Number(r)-1,i=[];return(a=t.virtualScrollerRef)!=null&&a.current?(Kfe(t).forEach(s=>{const l=s.getAttribute("data-id");if(!l)return;let c=o;const u=t.unstable_getCellColSpanInfo(l,o);u&&u.spannedByColSpan&&(c=u.leftVisibleCellIndex);const d=s.querySelector(`[data-colindex="${c}"]`);d&&i.push(d)}),i):[]}function xQ(e,t){return e.rootElementRef.current.querySelector(`.${le[t]}`)}const Gfe=({api:e,colIndex:t,position:n,filterFn:r})=>{if(t===null)return[];const o=[];return Kfe(e).forEach(i=>{i.getAttribute("data-id")&&i.querySelectorAll(`.${le[n==="left"?"cell--pinnedLeft":"cell--pinnedRight"]}`).forEach(s=>{const l=b0(s);l!==null&&r(l)&&o.push(s)})}),o};function PRt(e,t,n){const r=b0(t);return Gfe({api:e,colIndex:r,position:n?"right":"left",filterFn:o=>n?or})}function TRt(e,t,n){const r=b0(t);return Gfe({api:e,colIndex:r,position:n?"left":"right",filterFn:o=>n?o>r:o{var i;if(!((i=e.columnHeadersContainerRef)!=null&&i.current))return[];if(t===null)return[];const o=[];return e.columnHeadersContainerRef.current.querySelectorAll(`.${le[n==="left"?"columnHeader--pinnedLeft":"columnHeader--pinnedRight"]}`).forEach(a=>{const s=b0(a);s!==null&&r(s)&&o.push(a)}),o};function IRt(e,t,n){const r=b0(t);return qfe({api:e,position:n?"right":"left",colIndex:r,filterFn:o=>n?or})}function ORt(e,t,n){const r=b0(t);return qfe({api:e,position:n?"left":"right",colIndex:r,filterFn:o=>n?o>r:o div > [data-field="${Bd(t)}"][role="columnheader"]`)}function kRt(e,t){const n=e.virtualScrollerRef.current;return Array.from(n.querySelectorAll(`:scope > div > div > div > [data-field="${Bd(t)}"][role="gridcell"]`))}function Kfe(e){return e.virtualScrollerRef.current.querySelectorAll(`:scope > div > div > .${le.row}`)}function b0(e){const t=e.getAttribute("aria-colindex");return t?Number(t)-1:null}class dT extends Error{}function MRt(e,t){const n=v.useCallback(f=>({field:f,colDef:e.current.getColumn(f)}),[e]),r=v.useCallback(f=>{const p=e.current.getRow(f);if(!p)throw new dT(`No row with id #${f} found`);return{id:f,columns:e.current.getAllColumns(),row:p}},[e]),o=v.useCallback((f,p)=>{const h=t.unstable_listView?fb(e.current.state):e.current.getColumn(p),m=e.current.getRow(f),y=e.current.getRowNode(f);if(!m||!y)throw new dT(`No row with id #${f} found`);const w=m[p],x=h!=null&&h.valueGetter?h.valueGetter(w,m,h,e):w,C=Za(e),E=XH(e),P={id:f,field:p,row:m,rowNode:y,colDef:h,cellMode:e.current.getCellMode(f,p),hasFocus:C!==null&&C.field===p&&C.id===f,tabIndex:E&&E.field===p&&E.id===f?0:-1,value:x,formattedValue:x,isEditable:!1,api:{}};return h&&h.valueFormatter&&(P.formattedValue=h.valueFormatter(x,m,h,e)),P.isEditable=h&&e.current.isCellEditable(P),P},[e,t.unstable_listView]),i=v.useCallback((f,p)=>{const h=e.current.getColumn(p),m=e.current.getRow(f);if(!m)throw new dT(`No row with id #${f} found`);return!h||!h.valueGetter?m[p]:h.valueGetter(m[h.field],m,h,e)},[e]),a=v.useCallback((f,p)=>{const h=p.field;if(!p||!p.valueGetter)return f[h];const m=f[p.field];return p.valueGetter(m,f,p,e)},[e]),s=v.useCallback((f,p)=>{const h=a(f,p);return!p||!p.valueFormatter?h:p.valueFormatter(h,f,p,e)},[e,a]),l=v.useCallback(f=>e.current.rootElementRef.current?yRt(e.current.rootElementRef.current,f):null,[e]),c=v.useCallback(f=>e.current.rootElementRef.current?vRt(e.current.rootElementRef.current,f):null,[e]),u=v.useCallback((f,p)=>e.current.rootElementRef.current?bRt(e.current.rootElementRef.current,{id:f,field:p}):null,[e]);ln(e,{getCellValue:i,getCellParams:o,getCellElement:u,getRowValue:a,getRowFormattedValue:s,getRowParams:r,getRowElement:c,getColumnHeaderParams:n,getColumnHeaderElement:l},"public")}const YM=(e,t,n,r,o)=>{const i=t===n-1;return e===br.LEFT&&i?!0:r?e===br.LEFT?!0:e===br.RIGHT?!i:!i||o:!1},QM=(e,t)=>e===br.RIGHT&&t===0,RRt=["column","rowId","editCellState","align","children","colIndex","width","className","style","gridHasScrollX","colSpan","disableDragEvents","isNotVisible","pinnedOffset","pinnedPosition","sectionIndex","sectionLength","gridHasFiller","onClick","onDoubleClick","onMouseDown","onMouseUp","onMouseOver","onKeyDown","onKeyUp","onDragEnter","onDragOver"],$Rt=["changeReason","unstable_updateValueOnRender"];let Ca=function(e){return e[e.NONE=0]="NONE",e[e.LEFT=1]="LEFT",e[e.RIGHT=2]="RIGHT",e[e.VIRTUAL=3]="VIRTUAL",e}({});const Yfe={[Ca.LEFT]:br.LEFT,[Ca.RIGHT]:br.RIGHT,[Ca.NONE]:void 0,[Ca.VIRTUAL]:void 0},SQ={id:-1,field:"__unset__",row:{},rowNode:{id:-1,depth:0,type:"leaf",parent:-1,groupingKey:null},colDef:{type:"string",field:"__unset__",computedWidth:0},cellMode:ar.View,hasFocus:!1,tabIndex:-1,value:null,formattedValue:"__unset__",isEditable:!1,api:{}},DRt=e=>{const{align:t,showLeftBorder:n,showRightBorder:r,pinnedPosition:o,isEditable:i,isSelected:a,isSelectionMode:s,classes:l}=e,c={root:["cell",`cell--text${y1(t)}`,a&&"selected",i&&"cell--editable",n&&"cell--withLeftBorder",r&&"cell--withRightBorder",o===Ca.LEFT&&"cell--pinnedLeft",o===Ca.RIGHT&&"cell--pinnedRight",s&&!i&&"cell--selectionMode"]};return Tn(c,In,l)},_Rt=v.forwardRef(function(t,n){var et,St,On;const{column:r,rowId:o,editCellState:i,align:a,colIndex:s,width:l,className:c,style:u,colSpan:d,disableDragEvents:f,isNotVisible:p,pinnedOffset:h,pinnedPosition:m,sectionIndex:y,sectionLength:w,gridHasFiller:x,onClick:C,onDoubleClick:E,onMouseDown:P,onMouseUp:T,onMouseOver:I,onKeyDown:A,onKeyUp:k,onDragEnter:O,onDragOver:$}=t,N=Dt(t,RRt),L=En(),j=Ot(),D=dr(),_=r.field,z=Ye(L,()=>{try{const Ke=L.current.getCellParams(o,_);return Ke.api=L.current,Ke}catch(Ke){if(Ke instanceof dT)return SQ;throw Ke}},Qde),F=Ye(L,()=>L.current.unstable_applyPipeProcessors("isCellSelected",!1,{id:o,field:_})),V=Ye(L,Ffe),U=Ye(L,SMt),{cellMode:q,hasFocus:X,isEditable:ie=!1,value:ee}=z,Q=r.type==="actions"&&((et=r.getActions)==null?void 0:et.call(r,L.current.getRowParams(o)).some(Ke=>!Ke.props.disabled)),te=(q==="view"||!ie)&&!Q?z.tabIndex:-1,{classes:pe,getCellClassName:ae}=j,re=[Ye(L,()=>L.current.unstable_applyPipeProcessors("cellClassName",[],{id:o,field:_}).filter(Boolean).join(" "))];r.cellClassName&&re.push(typeof r.cellClassName=="function"?r.cellClassName(z):r.cellClassName),r.display==="flex"&&re.push(le["cell--flex"]),ae&&re.push(ae(z));const fe=z.formattedValue??ee,Z=v.useRef(null),ce=Jg(n,Z),ge=v.useRef(null),we=j.cellSelection??!1,me=Yfe[m],Se=QM(me,y),xe=YM(me,y,w,j.showCellVerticalBorder,x),ke={align:a,showLeftBorder:Se,showRightBorder:xe,isEditable:ie,classes:j.classes,pinnedPosition:m,isSelected:F,isSelectionMode:we},De=DRt(ke),_e=v.useCallback(Ke=>$e=>{const Qe=L.current.getCellParams(o,_||"");L.current.publishEvent(Ke,Qe,$e),T&&T($e)},[L,_,T,o]),ye=v.useCallback(Ke=>$e=>{const Qe=L.current.getCellParams(o,_||"");L.current.publishEvent(Ke,Qe,$e),P&&P($e)},[L,_,P,o]),Pe=v.useCallback((Ke,$e)=>Qe=>{if(!L.current.getRow(o))return;const Et=L.current.getCellParams(o,_||"");L.current.publishEvent(Ke,Et,Qe),$e&&$e(Qe)},[L,_,o]),Ae=((St=V[o])==null?void 0:St[_])??!1,Me=((On=U[o])==null?void 0:On[_])??1,We=v.useMemo(()=>{if(p)return{padding:0,opacity:0,width:0,border:0};const Ke=W({"--width":`${l}px`},u),$e=m===Ca.LEFT,Qe=m===Ca.RIGHT;if($e||Qe){let Et=$e?"left":"right";D&&(Et=$e?"right":"left"),Ke[Et]=h}return Me>1&&(Ke.height=`calc(var(--height) * ${Me})`,Ke.zIndex=5),Ke},[l,p,u,h,m,D,Me]);if(v.useEffect(()=>{if(!X||q===ar.Edit)return;const Ke=Jf(L.current.rootElementRef.current);if(Z.current&&!Z.current.contains(Ke.activeElement)){const $e=Z.current.querySelector('[tabindex="0"]'),Qe=ge.current||$e||Z.current;if(gRt())Qe.focus({preventScroll:!0});else{const Et=L.current.getScrollPosition();Qe.focus(),L.current.scroll(Et)}}},[X,q,L]),Ae)return R.jsx("div",{"data-colindex":s,role:"presentation",style:W({width:"var(--width)"},We)});if(z===SQ)return null;let He=N.onFocus,Xe,ht;if(i===null&&r.renderCell&&(Xe=r.renderCell(z)),i!==null&&r.renderEditCell){const Ke=L.current.getRowWithUpdatedValues(o,r.field),$e=Dt(i,$Rt),Qe=r.valueFormatter?r.valueFormatter(i.value,Ke,r,L):z.formattedValue,Et=W({},z,{row:Ke,formattedValue:Qe},$e);Xe=r.renderEditCell(Et),re.push(le["cell--editing"]),re.push(pe==null?void 0:pe["cell--editing"])}if(Xe===void 0){const Ke=fe==null?void 0:fe.toString();Xe=Ke,ht=Ke}v.isValidElement(Xe)&&Q&&(Xe=v.cloneElement(Xe,{focusElementRef:ge}));const ot=f?null:{onDragEnter:Pe("cellDragEnter",O),onDragOver:Pe("cellDragOver",$)};return R.jsx("div",W({ref:ce,className:de(De.root,re,c),role:"gridcell","data-field":_,"data-colindex":s,"aria-colindex":s+1,"aria-colspan":d,"aria-rowspan":Me,style:We,title:ht,tabIndex:te,onClick:Pe("cellClick",C),onDoubleClick:Pe("cellDoubleClick",E),onMouseOver:Pe("cellMouseOver",I),onMouseDown:ye("cellMouseDown"),onMouseUp:_e("cellMouseUp"),onKeyDown:Pe("cellKeyDown",A),onKeyUp:Pe("cellKeyUp",k)},ot,N,{onFocus:He,children:Xe}))}),NRt=zp(_Rt),LRt=["label","icon","showInMenu","onClick"],FRt=["label","icon","showInMenu","onClick","closeMenuOnClick","closeMenu"],SP=v.forwardRef((e,t)=>{var u;const n=Ot();if(!e.showInMenu){const{label:d,icon:f,onClick:p}=e,h=Dt(e,LRt),m=y=>{p==null||p(y)};return R.jsx(n.slots.baseIconButton,W({ref:t,size:"small",role:"menuitem","aria-label":d},h,{onClick:m},(u=n.slotProps)==null?void 0:u.baseIconButton,{children:v.cloneElement(f,{fontSize:"small"})}))}const{label:r,icon:o,onClick:i,closeMenuOnClick:a=!0,closeMenu:s}=e,l=Dt(e,FRt),c=d=>{i==null||i(d),a&&(s==null||s())};return R.jsxs(en,W({ref:t},l,{onClick:c,children:[o&&R.jsx(aa,{children:o}),r]}))}),jRt=["field","type","align","width","height","empty","style","className"],CQ="1.3em",BRt="1.2em",EQ=[40,80],zRt={number:[40,60],string:[40,80],date:[40,60],dateTime:[60,80],singleSelect:[40,80]},VRt=e=>{const{align:t,classes:n,empty:r}=e,o={root:["cell","cellSkeleton",`cell--text${t?y1(t):"Left"}`,r&&"cellEmpty"]};return Tn(o,In,n)},HRt=aAt(12345);function URt(e){const{field:t,type:n,align:r,width:o,height:i,empty:a=!1,style:s,className:l}=e,c=Dt(e,jRt),d={classes:Ot().classes,align:r,empty:a},f=VRt(d),p=v.useMemo(()=>{if(n==="boolean"||n==="actions")return{variant:"circular",width:CQ,height:CQ};const[m,y]=n?zRt[n]??EQ:EQ;return{variant:"text",width:`${Math.round(HRt(m,y))}%`,height:BRt}},[n]);return R.jsx("div",W({"data-field":t,className:de(f.root,l),style:W({height:i,maxWidth:o,minWidth:o},s)},c,{children:!a&&R.jsx(QP,W({},p))}))}const WRt=zp(URt);function GRt(e){return e.vars?e.vars.palette.TableCell.border:e.palette.mode==="light"?wd(xt(e.palette.divider,1),.88):bd(xt(e.palette.divider,1),.68)}const PQ={[`& .${le.iconButtonContainer}`]:{visibility:"visible",width:"auto"},[`& .${le.menuIcon}`]:{width:"auto",visibility:"visible"}},qRt=10,CP=-5,Wm=1,TQ={width:3,rx:1.5,x:10.5},KRt="/* emotion-disable-server-rendering-unsafe-selector-warning-please-do-not-use-this-the-warning-exists-for-a-reason */",YRt=oe("div",{name:"MuiDataGrid",slot:"Root",overridesResolver:(e,t)=>[{[`&.${le.autoHeight}`]:t.autoHeight},{[`&.${le.aggregationColumnHeader}`]:t.aggregationColumnHeader},{[`&.${le["aggregationColumnHeader--alignLeft"]}`]:t["aggregationColumnHeader--alignLeft"]},{[`&.${le["aggregationColumnHeader--alignCenter"]}`]:t["aggregationColumnHeader--alignCenter"]},{[`&.${le["aggregationColumnHeader--alignRight"]}`]:t["aggregationColumnHeader--alignRight"]},{[`&.${le.aggregationColumnHeaderLabel}`]:t.aggregationColumnHeaderLabel},{[`&.${le["root--disableUserSelection"]} .${le.cell}`]:t["root--disableUserSelection"]},{[`&.${le.autosizing}`]:t.autosizing},{[`& .${le.editBooleanCell}`]:t.editBooleanCell},{[`& .${le.cell}`]:t.cell},{[`& .${le["cell--editing"]}`]:t["cell--editing"]},{[`& .${le["cell--textCenter"]}`]:t["cell--textCenter"]},{[`& .${le["cell--textLeft"]}`]:t["cell--textLeft"]},{[`& .${le["cell--textRight"]}`]:t["cell--textRight"]},{[`& .${le["cell--rangeTop"]}`]:t["cell--rangeTop"]},{[`& .${le["cell--rangeBottom"]}`]:t["cell--rangeBottom"]},{[`& .${le["cell--rangeLeft"]}`]:t["cell--rangeLeft"]},{[`& .${le["cell--rangeRight"]}`]:t["cell--rangeRight"]},{[`& .${le["cell--withRightBorder"]}`]:t["cell--withRightBorder"]},{[`& .${le.cellCheckbox}`]:t.cellCheckbox},{[`& .${le.cellSkeleton}`]:t.cellSkeleton},{[`& .${le.checkboxInput}`]:t.checkboxInput},{[`& .${le["columnHeader--alignCenter"]}`]:t["columnHeader--alignCenter"]},{[`& .${le["columnHeader--alignLeft"]}`]:t["columnHeader--alignLeft"]},{[`& .${le["columnHeader--alignRight"]}`]:t["columnHeader--alignRight"]},{[`& .${le["columnHeader--dragging"]}`]:t["columnHeader--dragging"]},{[`& .${le["columnHeader--moving"]}`]:t["columnHeader--moving"]},{[`& .${le["columnHeader--numeric"]}`]:t["columnHeader--numeric"]},{[`& .${le["columnHeader--sortable"]}`]:t["columnHeader--sortable"]},{[`& .${le["columnHeader--sorted"]}`]:t["columnHeader--sorted"]},{[`& .${le["columnHeader--withRightBorder"]}`]:t["columnHeader--withRightBorder"]},{[`& .${le.columnHeader}`]:t.columnHeader},{[`& .${le.headerFilterRow}`]:t.headerFilterRow},{[`& .${le.columnHeaderCheckbox}`]:t.columnHeaderCheckbox},{[`& .${le.columnHeaderDraggableContainer}`]:t.columnHeaderDraggableContainer},{[`& .${le.columnHeaderTitleContainer}`]:t.columnHeaderTitleContainer},{[`& .${le["columnSeparator--resizable"]}`]:t["columnSeparator--resizable"]},{[`& .${le["columnSeparator--resizing"]}`]:t["columnSeparator--resizing"]},{[`& .${le.columnSeparator}`]:t.columnSeparator},{[`& .${le.filterIcon}`]:t.filterIcon},{[`& .${le.iconSeparator}`]:t.iconSeparator},{[`& .${le.menuIcon}`]:t.menuIcon},{[`& .${le.menuIconButton}`]:t.menuIconButton},{[`& .${le.menuOpen}`]:t.menuOpen},{[`& .${le.menuList}`]:t.menuList},{[`& .${le["row--editable"]}`]:t["row--editable"]},{[`& .${le["row--editing"]}`]:t["row--editing"]},{[`& .${le["row--dragging"]}`]:t["row--dragging"]},{[`& .${le.row}`]:t.row},{[`& .${le.rowReorderCellPlaceholder}`]:t.rowReorderCellPlaceholder},{[`& .${le.rowReorderCell}`]:t.rowReorderCell},{[`& .${le["rowReorderCell--draggable"]}`]:t["rowReorderCell--draggable"]},{[`& .${le.sortIcon}`]:t.sortIcon},{[`& .${le.withBorderColor}`]:t.withBorderColor},{[`& .${le.treeDataGroupingCell}`]:t.treeDataGroupingCell},{[`& .${le.treeDataGroupingCellToggle}`]:t.treeDataGroupingCellToggle},{[`& .${le.treeDataGroupingCellLoadingContainer}`]:t.treeDataGroupingCellLoadingContainer},{[`& .${le.groupingCriteriaCellLoadingContainer}`]:t.groupingCriteriaCellLoadingContainer},{[`& .${le.detailPanelToggleCell}`]:t.detailPanelToggleCell},{[`& .${le["detailPanelToggleCell--expanded"]}`]:t["detailPanelToggleCell--expanded"]},t.root]})(({theme:e})=>{var A,k;const t=Ul(),n=Ye(t,wi),r=GRt(e),o=e.shape.borderRadius,i=e.vars?e.vars.palette.background.default:((A=e.mixins.MuiDataGrid)==null?void 0:A.containerBackground)??e.palette.background.default,a=((k=e.mixins.MuiDataGrid)==null?void 0:k.pinnedBackground)??i,s=e.vars?`rgba(${e.vars.palette.background.defaultChannel} / ${e.vars.palette.action.disabledOpacity})`:xt(e.palette.background.default,e.palette.action.disabledOpacity),l=(e.vars||e).palette.action.hoverOpacity,c=(e.vars||e).palette.action.hover,u=(e.vars||e).palette.action.selectedOpacity,d=e.vars?`calc(${l} + ${u})`:l+u,f=e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${u})`:xt(e.palette.primary.main,u),p=e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${d})`:xt(e.palette.primary.main,d),h=e.vars?JRt:QRt,m=O=>({[`& .${le["cell--pinnedLeft"]}, & .${le["cell--pinnedRight"]}`]:{backgroundColor:O,"&.Mui-selected":{backgroundColor:h(O,f,u),"&:hover":{backgroundColor:h(O,f,d)}}}}),y=h(a,c,l),w=m(y),x=h(a,f,u),C=m(x),E=h(a,p,d),P=m(E),T={backgroundColor:f,"&:hover":{backgroundColor:p,"@media (hover: none)":{backgroundColor:f}}};return W({"--unstable_DataGrid-radius":typeof o=="number"?`${o}px`:o,"--unstable_DataGrid-headWeight":e.typography.fontWeightMedium,"--unstable_DataGrid-overlayBackground":s,"--DataGrid-containerBackground":i,"--DataGrid-pinnedBackground":a,"--DataGrid-rowBorderColor":r,"--DataGrid-cellOffsetMultiplier":2,"--DataGrid-width":"0px","--DataGrid-hasScrollX":"0","--DataGrid-hasScrollY":"0","--DataGrid-scrollbarSize":"10px","--DataGrid-rowWidth":"0px","--DataGrid-columnsTotalWidth":"0px","--DataGrid-leftPinnedWidth":"0px","--DataGrid-rightPinnedWidth":"0px","--DataGrid-headerHeight":"0px","--DataGrid-headersTotalHeight":"0px","--DataGrid-topContainerHeight":"0px","--DataGrid-bottomContainerHeight":"0px",flex:1,boxSizing:"border-box",position:"relative",borderWidth:"1px",borderStyle:"solid",borderColor:r,borderRadius:"var(--unstable_DataGrid-radius)",color:(e.vars||e).palette.text.primary},e.typography.body2,{outline:"none",height:"100%",display:"flex",minWidth:0,minHeight:0,flexDirection:"column",overflow:"hidden",overflowAnchor:"none",[`.${le.main} > *:first-child${KRt}`]:{borderTopLeftRadius:"var(--unstable_DataGrid-radius)",borderTopRightRadius:"var(--unstable_DataGrid-radius)"},[`&.${le.autoHeight}`]:{height:"auto"},[`&.${le.autosizing}`]:{[`& .${le.columnHeaderTitleContainerContent} > *`]:{overflow:"visible !important"},"@media (hover: hover)":{[`& .${le.iconButtonContainer}`]:{width:"0 !important",visibility:"hidden !important"},[`& .${le.menuIcon}`]:{width:"0 !important",visibility:"hidden !important"}},[`& .${le.cell}`]:{overflow:"visible !important",whiteSpace:"nowrap",minWidth:"max-content !important",maxWidth:"max-content !important"},[`& .${le.groupingCriteriaCell}`]:{width:"unset"},[`& .${le.treeDataGroupingCell}`]:{width:"unset"}},[`& .${le.columnHeader}, & .${le.cell}`]:{WebkitTapHighlightColor:"transparent",padding:"0 10px",boxSizing:"border-box"},[`& .${le.columnHeader}:focus-within, & .${le.cell}:focus-within`]:{outline:`solid ${e.vars?`rgba(${e.vars.palette.primary.mainChannel} / 0.5)`:xt(e.palette.primary.main,.5)} ${Wm}px`,outlineOffset:Wm*-1},[`& .${le.columnHeader}:focus, & .${le.cell}:focus`]:{outline:`solid ${e.palette.primary.main} ${Wm}px`,outlineOffset:Wm*-1},[`& .${le.columnHeader}:focus, +return result$$;`.replaceAll("$$",String(cQ)));return cQ+=1,(s,l)=>i(o,s,l)},bfe=e=>e.quickFilterExcludeHiddenColumns??!0,KAt=(e,t)=>{var s;const n=((s=e.quickFilterValues)==null?void 0:s.filter(Boolean))??[];if(n.length===0)return null;const r=bfe(e)?v0(t):hd(t),o=[],{ignoreDiacritics:i}=t.current.rootProps,a=yfe(t);return r.forEach(l=>{const c=t.current.getColumn(l),u=c==null?void 0:c.getApplyQuickFilterFn;u&&o.push({column:c,appliers:n.map(d=>{const f=i?iC(d):d;return{fn:u(f,c,a)}})})}),function(c,u){const d={};e:for(let f=0;f{const r=qAt(e,t,n),o=KAt(e,t);return function(a,s,l){l.passingFilterItems=(r==null?void 0:r(a,s))??null,l.passingQuickFilterValues=(o==null?void 0:o(a,s))??null}},uQ=e=>e!=null,QAt=(e,t,n)=>(e.cleanedFilterItems||(e.cleanedFilterItems=n.filter(r=>vfe(r,t)!==null)),e.cleanedFilterItems),XAt=(e,t,n,r,o)=>{const i=QAt(o,r,n.items),a=e.filter(uQ),s=t.filter(uQ);if(a.length>0){const l=u=>a.some(d=>d[u.id]);if((n.logicOperator??oC().logicOperator)===Zi.And){if(!i.every(l))return!1}else if(!i.some(l))return!1}if(s.length>0&&n.quickFilterValues!=null){const l=u=>s.some(d=>d[u]);if((n.quickFilterLogicOperator??oC().quickFilterLogicOperator)===Zi.And){if(!n.quickFilterValues.every(l))return!1}else if(!n.quickFilterValues.some(l))return!1}return!0},JAt=e=>{if(!e)return null;const t=new RegExp(zO(e),"i");return(n,r,o,i)=>{let a=i.current.getRowFormattedValue(r,o);return i.current.ignoreDiacritics&&(a=iC(a)),a!=null?t.test(a.toString()):!1}},dQ=(e,t)=>n=>{if(!n.value)return null;const r=e?n.value:n.value.trim(),o=new RegExp(zO(r),"i");return i=>{if(i==null)return t;const a=o.test(String(i));return t?!a:a}},fQ=(e,t)=>n=>{if(!n.value)return null;const r=e?n.value:n.value.trim(),o=new Intl.Collator(void 0,{sensitivity:"base",usage:"search"});return i=>{if(i==null)return t;const a=o.compare(r,i.toString())===0;return t?!a:a}},pQ=e=>()=>t=>{const n=t===""||t==null;return e?!n:n},ZAt=(e=!1)=>[{value:"contains",getApplyFilterFn:dQ(e,!1),InputComponent:fl},{value:"doesNotContain",getApplyFilterFn:dQ(e,!0),InputComponent:fl},{value:"equals",getApplyFilterFn:fQ(e,!1),InputComponent:fl},{value:"doesNotEqual",getApplyFilterFn:fQ(e,!0),InputComponent:fl},{value:"startsWith",getApplyFilterFn:t=>{if(!t.value)return null;const n=e?t.value:t.value.trim(),r=new RegExp(`^${zO(n)}.*$`,"i");return o=>o!=null?r.test(o.toString()):!1},InputComponent:fl},{value:"endsWith",getApplyFilterFn:t=>{if(!t.value)return null;const n=e?t.value:t.value.trim(),r=new RegExp(`.*${zO(n)}$`,"i");return o=>o!=null?r.test(o.toString()):!1},InputComponent:fl},{value:"isEmpty",getApplyFilterFn:pQ(!1),requiresFilterValue:!1},{value:"isNotEmpty",getApplyFilterFn:pQ(!0),requiresFilterValue:!1},{value:"isAnyOf",getApplyFilterFn:t=>{if(!Array.isArray(t.value)||t.value.length===0)return null;const n=e?t.value:t.value.map(o=>o.trim()),r=new Intl.Collator(void 0,{sensitivity:"base",usage:"search"});return o=>o!=null?n.some(i=>r.compare(i,o.toString()||"")===0):!1},InputComponent:gfe}],Tc={width:100,minWidth:50,maxWidth:1/0,hideable:!0,sortable:!0,resizable:!0,filterable:!0,groupable:!0,pinnable:!0,aggregable:!0,editable:!1,sortComparator:FAt,type:"string",align:"left",filterOperators:ZAt(),renderEditCell:RAt,getApplyQuickFilterFn:JAt},ekt=["open","target","onClose","children","position","className","onExited"],tkt=e=>{const{classes:t}=e;return In({root:["menu"]},On,t)},nkt=re(Pp,{name:"MuiDataGrid",slot:"Menu",overridesResolver:(e,t)=>t.menu})(({theme:e})=>({zIndex:e.zIndex.modal,[`& .${le.menuList}`]:{outline:0}})),rkt={"bottom-start":"top left","bottom-end":"top right"};function wfe(e){var m;const{open:t,target:n,onClose:r,children:o,position:i,className:a,onExited:s}=e,l=Dt(e,ekt),c=En(),u=Ot(),d=tkt(u),f=v.useRef(null);Ho(()=>{var y,w;t?f.current=document.activeElement instanceof HTMLElement?document.activeElement:null:((w=(y=f.current)==null?void 0:y.focus)==null||w.call(y),f.current=null)},[t]),v.useEffect(()=>{const y=t?"menuOpen":"menuClose";c.current.publishEvent(y,{target:n})},[c,t,n]);const p=y=>w=>{y&&y(),s&&s(w)},h=y=>{y.target&&(n===y.target||n!=null&&n.contains(y.target))||r(y)};return R.jsx(nkt,W({as:u.slots.basePopper,className:de(d.root,a),ownerState:u,open:t,anchorEl:n,transition:!0,placement:i},l,(m=u.slotProps)==null?void 0:m.basePopper,{children:({TransitionProps:y,placement:w})=>R.jsx(ez,{onClickAway:h,mouseEvent:"onMouseDown",children:R.jsx(cp,W({},y,{style:{transformOrigin:rkt[w]},onExited:p(y==null?void 0:y.onExited),children:R.jsx(ro,{children:o})}))})}))}const okt=["api","colDef","id","hasFocus","isEditable","field","value","formattedValue","row","rowNode","cellMode","tabIndex","position","focusElementRef"],ikt=e=>typeof e.getActions=="function";function akt(e){var D;const{colDef:t,id:n,hasFocus:r,tabIndex:o,position:i="bottom-end",focusElementRef:a}=e,s=Dt(e,okt),[l,c]=v.useState(-1),[u,d]=v.useState(!1),f=En(),p=v.useRef(null),h=v.useRef(null),m=v.useRef(!1),y=v.useRef({}),w=dr(),x=Io(),S=Io(),E=Ot();if(!ikt(t))throw new Error("MUI X: Missing the `getActions` property in the `GridColDef`.");const P=t.getActions(f.current.getRowParams(n)),T=P.filter(_=>!_.props.showInMenu),I=P.filter(_=>_.props.showInMenu),A=T.length+(I.length?1:0);v.useLayoutEffect(()=>{r||Object.entries(y.current).forEach(([_,z])=>{z==null||z.stop({},()=>{delete y.current[_]})})},[r]),v.useEffect(()=>{if(l<0||!p.current||l>=p.current.children.length)return;p.current.children[l].focus({preventScroll:!0})},[l]),v.useEffect(()=>{r||(c(-1),m.current=!1)},[r]),v.useImperativeHandle(a,()=>({focus(){if(!m.current){const _=P.findIndex(z=>!z.props.disabled);c(_)}}}),[P]),v.useEffect(()=>{l>=A&&c(A-1)},[l,A]);const k=()=>{d(!0),c(A-1),m.current=!0},O=()=>{d(!1)},$=_=>z=>{y.current[_]=z},N=(_,z)=>F=>{c(_),m.current=!0,z&&z(F)},L=_=>{if(A<=1)return;const z=(V,U)=>{var ie;if(V<0||V>P.length)return V;const X=(U==="left"?-1:1)*(w?-1:1);return(ie=P[V+X])!=null&&ie.props.disabled?z(V+X,U):V+X};let F=l;_.key==="ArrowRight"?F=z(l,"right"):_.key==="ArrowLeft"&&(F=z(l,"left")),!(F<0||F>=A)&&F!==l&&(_.preventDefault(),_.stopPropagation(),c(F))},j=_=>{_.key==="Tab"&&_.preventDefault(),["Tab","Escape"].includes(_.key)&&O()};return R.jsxs("div",W({role:"menu",ref:p,tabIndex:-1,className:le.actionsCell,onKeyDown:L},s,{children:[T.map((_,z)=>v.cloneElement(_,{key:z,touchRippleRef:$(z),onClick:N(z,_.props.onClick),tabIndex:l===z?o:-1})),I.length>0&&S&&R.jsx(E.slots.baseIconButton,W({ref:h,id:S,"aria-label":f.current.getLocaleText("actionsCellMore"),"aria-haspopup":"menu","aria-expanded":u,"aria-controls":u?x:void 0,role:"menuitem",size:"small",onClick:k,touchRippleRef:$(S),tabIndex:l===T.length?o:-1},(D=E.slotProps)==null?void 0:D.baseIconButton,{children:R.jsx(E.slots.moreActionsIcon,{fontSize:"small"})})),I.length>0&&R.jsx(wfe,{open:u,target:h.current,position:i,onClose:O,children:R.jsx(UC,{id:x,className:le.menuList,onKeyDown:j,"aria-labelledby":S,variant:"menu",autoFocusItem:!0,children:I.map((_,z)=>v.cloneElement(_,{key:z,closeMenu:O}))})})]}))}const skt=e=>R.jsx(akt,W({},e)),UM="actions",lkt=W({},Tc,{sortable:!1,filterable:!1,aggregable:!1,width:100,display:"flex",align:"center",headerAlign:"center",headerName:"",disableColumnMenu:!0,disableExport:!0,renderCell:skt,getApplyQuickFilterFn:void 0}),Wl=e=>e.rows,WM=Ut(Wl,e=>e.totalRowCount),ckt=Ut(Wl,e=>e.loading),ukt=Ut(Wl,e=>e.totalTopLevelRowCount),jf=Ut(Wl,e=>e.dataRowIdToModelLookup),VO=Ut(Wl,e=>e.dataRowIdToIdLookup),Di=Ut(Wl,e=>e.tree),dkt=Ut(Wl,e=>e.groupsToFetch),fkt=Ut(Wl,e=>e.groupingName),hQ=Ut(Wl,e=>e.treeDepths),b0=mr(Wl,e=>{const t=Object.entries(e.treeDepths);return t.length===0?1:t.filter(([,n])=>n>0).map(([n])=>Number(n)).sort((n,r)=>r-n)[0]+1}),MP=Ut(Wl,e=>e.dataRowIds),pkt=Ut(Wl,e=>e==null?void 0:e.additionalRowGroups),em=mr(pkt,e=>{var n,r;const t=e==null?void 0:e.pinnedRows;return{bottom:((n=t==null?void 0:t.bottom)==null?void 0:n.map(o=>({id:o.id,model:o.model??{}})))??[],top:((r=t==null?void 0:t.top)==null?void 0:r.map(o=>({id:o.id,model:o.model??{}})))??[]}}),hkt=Ut(em,e=>{var t,n;return(((t=e==null?void 0:e.top)==null?void 0:t.length)||0)+(((n=e==null?void 0:e.bottom)==null?void 0:n.length)||0)}),mi="auto-generated-group-node-root",Zy=Symbol("mui.id_autogenerated"),gkt=()=>({type:"group",id:mi,depth:-1,groupingField:null,groupingKey:null,isAutoGenerated:!0,children:[],childrenFromPath:{},childrenExpanded:!0,parent:null});function mkt(e,t,n="A row was provided without id in the rows prop:"){if(e==null)throw new Error(["MUI X: The Data Grid component requires all rows to have a unique `id` property.","Alternatively, you can use the `getRowId` prop to specify a custom id for each row.",n,JSON.stringify(t)].join(` +`))}const GM=(e,t,n)=>{const r=t?t(e):e.id;return mkt(r,e,n),r},wT=({rows:e,getRowId:t,loading:n,rowCount:r})=>{const o={type:"full",rows:[]},i={},a={};for(let s=0;s{const n=e[mi];return Math.max(t,n.children.length+(n.footerId==null?0:1))},Sfe=({apiRef:e,rowCountProp:t=0,loadingProp:n,previousTree:r,previousTreeDepths:o,previousGroupsToFetch:i})=>{const a=e.current.caches.rows,{tree:s,treeDepths:l,dataRowIds:c,groupingName:u,groupsToFetch:d=[]}=e.current.applyStrategyProcessor("rowTreeCreation",{previousTree:r,previousTreeDepths:o,updates:a.updates,dataRowIdToIdLookup:a.dataRowIdToIdLookup,dataRowIdToModelLookup:a.dataRowIdToModelLookup,previousGroupsToFetch:i}),f=e.current.unstable_applyPipeProcessors("hydrateRows",{tree:s,treeDepths:l,dataRowIdToIdLookup:a.dataRowIdToIdLookup,dataRowIds:c,dataRowIdToModelLookup:a.dataRowIdToModelLookup});return e.current.caches.rows.updates={type:"partial",actions:{insert:[],modify:[],remove:[]},idToActionLookup:{}},W({},f,{totalRowCount:Math.max(t,f.dataRowIds.length),totalTopLevelRowCount:xfe({tree:f.tree,rowCountProp:t}),groupingName:u,loading:n,groupsToFetch:d})},fb=e=>e.type==="skeletonRow"||e.type==="footer"||e.type==="group"&&e.isAutoGenerated||e.type==="pinnedRow"&&e.isAutoGenerated,Q5=(e,t,n)=>{const r=e[t];if(r.type!=="group")return[];const o=[];for(let i=0;i{if(e.updates.type==="full")throw new Error("MUI X: Unable to prepare a partial update if a full update is not applied yet.");const o=new Map;n.forEach(u=>{const d=GM(u,t,"A row was provided without id when calling updateRows():");o.has(d)?o.set(d,W({},o.get(d),u)):o.set(d,u)});const i={type:"partial",actions:{insert:[...e.updates.actions.insert??[]],modify:[...e.updates.actions.modify??[]],remove:[...e.updates.actions.remove??[]]},idToActionLookup:W({},e.updates.idToActionLookup),groupKeys:r},a=W({},e.dataRowIdToModelLookup),s=W({},e.dataRowIdToIdLookup),l={insert:{},modify:{},remove:{}};o.forEach((u,d)=>{const f=i.idToActionLookup[d];if(u._action==="delete"){if(f==="remove"||!a[d])return;f!=null&&(l[f][d]=!0),i.actions.remove.push(d),delete a[d],delete s[d];return}const p=a[d];if(p){f==="remove"?(l.remove[d]=!0,i.actions.modify.push(d)):f==null&&i.actions.modify.push(d),a[d]=W({},p,u);return}f==="remove"?(l.remove[d]=!0,i.actions.insert.push(d)):f==null&&i.actions.insert.push(d),a[d]=u,s[d]=d});const c=Object.keys(l);for(let u=0;u0&&(i.actions[d]=i.actions[d].filter(p=>!f[p]))}return{dataRowIdToModelLookup:a,dataRowIdToIdLookup:s,updates:i,rowsBeforePartialUpdates:e.rowsBeforePartialUpdates,loadingPropBeforePartialUpdates:e.loadingPropBeforePartialUpdates,rowCountPropBeforePartialUpdates:e.rowCountPropBeforePartialUpdates}};function ykt(e){var o,i;const t=em(e),n=((o=t==null?void 0:t.top)==null?void 0:o.reduce((a,s)=>(a+=e.current.unstable_getRowHeight(s.id),a),0))||0,r=((i=t==null?void 0:t.bottom)==null?void 0:i.reduce((a,s)=>(a+=e.current.unstable_getRowHeight(s.id),a),0))||0;return{top:n,bottom:r}}function Cfe(e){return`var(--DataGrid-overlayHeight, ${2*Si(e.current.state).rowHeight}px)`}function mQ(e,t,n){const r=[];return t.forEach(o=>{const i=GM(o,n,"A row was provided without id when calling updateRows():"),a=e.current.getRowNode(i);if((a==null?void 0:a.type)==="pinnedRow"){const s=e.current.caches.pinnedRows,l=s.idLookup[i];l&&(s.idLookup[i]=W({},l,o))}else r.push(o)}),r}const Efe=(e,t,n)=>typeof e=="number"&&e>0?e:t,vkt="__tree_data_group__",Pfe="__row_group_by_columns_group__",qM="__detail_panel_toggle__",bkt=["id","value","formattedValue","api","field","row","rowNode","colDef","cellMode","isEditable","hasFocus","tabIndex","hideDescendantCount"],wkt=e=>{const{classes:t}=e;return In({root:["booleanCell"]},On,t)};function xkt(e){const{value:t,rowNode:n}=e,r=Dt(e,bkt),o=En(),i=Ot(),a={classes:i.classes},s=wkt(a),c=Ye(o,b0)>0&&n.type==="group"&&i.treeData===!1,u=v.useMemo(()=>t?i.slots.booleanCellTrueIcon:i.slots.booleanCellFalseIcon,[i.slots.booleanCellFalseIcon,i.slots.booleanCellTrueIcon,t]);return c&&t===void 0?null:R.jsx(u,W({fontSize:"small",className:s.root,titleAccess:o.current.getLocaleText(t?"booleanCellTrueLabel":"booleanCellFalseLabel"),"data-value":!!t},r))}const Skt=v.memo(xkt),Ckt=e=>e.field!==Pfe&&fb(e.rowNode)?"":R.jsx(Skt,W({},e)),Ekt=["id","value","formattedValue","api","field","row","rowNode","colDef","cellMode","isEditable","tabIndex","className","hasFocus","isValidating","isProcessingProps","error","onValueChange"],Pkt=e=>{const{classes:t}=e;return In({root:["editBooleanCell"]},On,t)};function Tkt(e){var w;const{id:t,value:n,field:r,className:o,hasFocus:i,onValueChange:a}=e,s=Dt(e,Ekt),l=En(),c=v.useRef(null),u=Io(),[d,f]=v.useState(n),p=Ot(),h={classes:p.classes},m=Pkt(h),y=v.useCallback(async x=>{const S=x.target.checked;a&&await a(x,S),f(S),await l.current.setEditCellValue({id:t,field:r,value:S},x)},[l,r,t,a]);return v.useEffect(()=>{f(n)},[n]),Ho(()=>{i&&c.current.focus()},[i]),R.jsx("label",W({htmlFor:u,className:de(m.root,o)},s,{children:R.jsx(p.slots.baseCheckbox,W({id:u,inputRef:c,checked:!!d,onChange:y,size:"small"},(w=p.slotProps)==null?void 0:w.baseCheckbox))}))}const Ikt=e=>R.jsx(Tkt,W({},e)),Okt=["item","applyValue","apiRef","focusElementRef","isFilterActive","clearButton","tabIndex","label","variant","InputLabelProps"],xT=e=>{if(String(e).toLowerCase()==="true")return!0;if(String(e).toLowerCase()==="false")return!1},Akt=re("div")({display:"flex",alignItems:"center",width:"100%","& button":{margin:"auto 0px 5px 5px"}});function kkt(e){var E,P,T;const{item:t,applyValue:n,apiRef:r,focusElementRef:o,clearButton:i,tabIndex:a,label:s,variant:l="standard"}=e,c=Dt(e,Okt),[u,d]=v.useState(xT(t.value)),f=Ot(),p=Io(),h=Io(),m=((E=f.slotProps)==null?void 0:E.baseSelect)||{},y=m.native??!1,w=((P=f.slotProps)==null?void 0:P.baseSelectOption)||{},x=v.useCallback(I=>{const A=xT(I.target.value);d(A),n(W({},t,{value:A}))},[n,t]);v.useEffect(()=>{d(xT(t.value))},[t.value]);const S=s??r.current.getLocaleText("filterPanelInputLabel");return R.jsxs(Akt,{children:[R.jsxs(f.slots.baseFormControl,{fullWidth:!0,children:[R.jsx(f.slots.baseInputLabel,W({},(T=f.slotProps)==null?void 0:T.baseInputLabel,{id:p,shrink:!0,variant:l,children:S})),R.jsxs(f.slots.baseSelect,W({labelId:p,id:h,label:S,value:u===void 0?"":String(u),onChange:x,variant:l,notched:l==="outlined"?!0:void 0,native:y,displayEmpty:!0,inputProps:{ref:o,tabIndex:a}},c,m,{children:[R.jsx(f.slots.baseSelectOption,W({},w,{native:y,value:"",children:r.current.getLocaleText("filterValueAny")})),R.jsx(f.slots.baseSelectOption,W({},w,{native:y,value:"true",children:r.current.getLocaleText("filterValueTrue")})),R.jsx(f.slots.baseSelectOption,W({},w,{native:y,value:"false",children:r.current.getLocaleText("filterValueFalse")}))]}))]}),i]})}const Mkt=()=>[{value:"is",getApplyFilterFn:e=>{const t=xT(e.value);return t===void 0?null:n=>!!n===t},InputComponent:kkt}],Rkt=(e,t,n,r)=>e?r.current.getLocaleText("booleanCellTrueLabel"):r.current.getLocaleText("booleanCellFalseLabel"),$kt=e=>{switch(e.toLowerCase().trim()){case"true":case"yes":case"1":return!0;case"false":case"no":case"0":case"null":case"undefined":return!1;default:return}},Tfe=W({},Tc,{type:"boolean",display:"flex",align:"center",headerAlign:"center",renderCell:Ckt,renderEditCell:Ikt,sortComparator:dfe,valueFormatter:Rkt,filterOperators:Mkt(),getApplyQuickFilterFn:void 0,aggregable:!1,pastedValueParser:e=>$kt(e)}),Ife=e=>e.sorting,M1=Ut(Ife,e=>e.sortedRows),X5=mr(M1,jf,Di,(e,t,n)=>e.reduce((r,o)=>{const i=t[o];i&&r.push({id:o,model:i});const a=n[o];return a&&fb(a)&&r.push({id:o,model:{[Zy]:o}}),r},[])),al=Ut(Ife,e=>e.sortModel),Dkt=mr(al,e=>e.reduce((n,r,o)=>(n[r.field]={sortDirection:r.sort,sortIndex:e.length>1?o+1:void 0},n),{})),KM=e=>e.filter,pi=Ut(KM,e=>e.filterModel);Ut(pi,e=>e.quickFilterValues);const _kt=e=>e.visibleRowsLookup,w0=Ut(KM,e=>e.filteredRowsLookup);Ut(KM,e=>e.filteredChildrenCountLookup);Ut(KM,e=>e.filteredDescendantCountLookup);const Up=mr(_kt,X5,(e,t)=>t.filter(n=>e[n.id]!==!1)),ev=mr(Up,e=>e.map(t=>t.id)),Ofe=mr(w0,X5,(e,t)=>t.filter(n=>e[n.id]!==!1)),Afe=mr(Ofe,e=>e.map(t=>t.id));mr(ev,Di,(e,t)=>{const n={};let r=0;return e.reduce((o,i)=>{const a=t[i];return n[a.depth]||(n[a.depth]=0),a.depth>r&&(n[a.depth]=0),r=a.depth,n[a.depth]+=1,o[i]=n[a.depth],o},{})});const kfe=mr(Up,Di,b0,(e,t,n)=>n<2?e:e.filter(r=>{var o;return((o=t[r.id])==null?void 0:o.depth)===0})),J5=Ut(Up,e=>e.length),Z5=Ut(kfe,e=>e.length),Nkt=Ut(Ofe,e=>e.length);Ut(Nkt,Z5,(e,t)=>e-t);const Lkt=mr(pi,Bd,(e,t)=>{var n;return(n=e.items)==null?void 0:n.filter(r=>{var a,s;if(!r.field)return!1;const o=t[r.field];if(!(o!=null&&o.filterOperators)||((a=o==null?void 0:o.filterOperators)==null?void 0:a.length)===0)return!1;const i=o.filterOperators.find(l=>l.value===r.operator);return i?!i.InputComponent||r.value!=null&&((s=r.value)==null?void 0:s.toString())!=="":!1})}),Fkt=mr(Lkt,e=>e.reduce((n,r)=>(n[r.field]?n[r.field].push(r):n[r.field]=[r],n),{})),sl=e=>e.rowSelection,jkt=Ut(sl,e=>e.length),Bkt=mr(sl,jf,(e,t)=>new Map(e.map(n=>[n,t[n]]))),gd=mr(sl,e=>e.reduce((t,n)=>(t[n]=n,t),{}));function Mfe(e,t){var l;const n=Di(e),r=M1(e),o=w0(e),i=n[t];if(!i||i.type!=="group")return[];const a=[],s=r.findIndex(c=>c===t)+1;for(let c=s;ci.depth;c+=1){const u=r[c];o[u]!==!1&&e.current.isRowSelectable(u)&&a.push(u)}return a}function zkt(e,t){return Ut(Di,M1,w0,gd,(n,r,o,i)=>{var u;const a=n[e];if(!a||a.type!=="group")return{isIndeterminate:!1,isChecked:i[e]===e};if(i[e]===e)return{isIndeterminate:!1,isChecked:!0};let s=0,l=0;const c=r.findIndex(d=>d===e)+1;for(let d=c;da.depth;d+=1){const f=r[d];o[f]!==!1&&(s+=1,i[f]!==void 0&&(l+=1))}return{isIndeterminate:l>0&&(l0:i[e]===e}})}function eH(e){return e.signature===Tl.DataGrid?e.checkboxSelection&&e.disableMultipleRowSelection!==!0:!e.disableMultipleRowSelection}const Vkt=(e,t)=>{const n=[];let r=t;for(;r!=null&&r!==mi;){const o=e[r];if(!o)return n;n.push(r),r=o.parent}return n},Hkt=(e,t,n)=>{const r=e[n];if(!r)return[];const o=r.parent;return o==null?[]:e[o].children.filter(a=>a!==n&&t[a])},RP=(e,t,n,r,o,i)=>{const a=w0(e),s=gd(e),l=new Set([]);if(!(!r&&!o)){if(r){const c=t[n];(c==null?void 0:c.type)==="group"&&Mfe(e,n).forEach(d=>{i(d),l.add(d)})}if(o){const c=d=>{if(s[d]!==d&&!l.has(d))return!1;const f=t[d];return(f==null?void 0:f.type)!=="group"?!0:f.children.every(c)},u=d=>{const f=Hkt(t,a,d);if(f.length===0||f.every(c)){const h=t[d].parent;h!=null&&h!==mi&&e.current.isRowSelectable(h)&&(i(h),l.add(h),u(h))}};u(n)}}},yQ=(e,t,n,r,o,i)=>{const a=gd(e);if(!(!o&&!r)&&(o&&Vkt(t,n).forEach(l=>{a[l]===l&&i(l)}),r)){const s=t[n];(s==null?void 0:s.type)==="group"&&Mfe(e,n).forEach(c=>{i(c)})}},Ukt=["field","id","formattedValue","row","rowNode","colDef","isEditable","cellMode","hasFocus","tabIndex","api"],Wkt=e=>{const{classes:t}=e;return In({root:["checkboxInput"]},On,t)},Gkt=v.forwardRef(function(t,n){var A,k;const{field:r,id:o,rowNode:i,hasFocus:a,tabIndex:s}=t,l=Dt(t,Ukt),c=En(),u=Ot(),d={classes:u.classes},f=Wkt(d),p=v.useRef(null),h=v.useRef(null),m=Zg(p,n),y=O=>{const $={value:O.target.checked,id:o};c.current.publishEvent("rowSelectionCheckboxChange",$,O)};v.useLayoutEffect(()=>{if(s===0){const O=c.current.getCellElement(o,r);O&&(O.tabIndex=-1)}},[c,s,o,r]),v.useEffect(()=>{var O;if(a){const $=(O=p.current)==null?void 0:O.querySelector("input");$==null||$.focus({preventScroll:!0})}else h.current&&h.current.stop({})},[a]);const w=v.useCallback(O=>{O.key===" "&&O.stopPropagation()},[]),x=c.current.isRowSelectable(o),S=zkt(o,((A=u.rowSelectionPropagation)==null?void 0:A.parents)??!1),{isIndeterminate:E,isChecked:P}=Ye(c,S);if(i.type==="footer"||i.type==="pinnedRow")return null;const T=c.current.getLocaleText(P?"checkboxSelectionUnselectRow":"checkboxSelectionSelectRow"),I=u.indeterminateCheckboxAction==="select"?P&&!E:P;return R.jsx(u.slots.baseCheckbox,W({ref:m,tabIndex:s,checked:I,onChange:y,className:f.root,inputProps:{"aria-label":T},onKeyDown:w,indeterminate:E,disabled:!x,touchRippleRef:h},(k=u.slotProps)==null?void 0:k.baseCheckbox,l))}),qkt=Gkt,YM=e=>e.focus,ts=Ut(YM,e=>e.cell),Kkt=Ut(YM,e=>e.columnHeader);Ut(YM,e=>e.columnHeaderFilter);const HO=Ut(YM,e=>e.columnGroupHeader),QM=e=>e.tabIndex,tH=Ut(QM,e=>e.cell),Rfe=Ut(QM,e=>e.columnHeader);Ut(QM,e=>e.columnHeaderFilter);const Ykt=Ut(QM,e=>e.columnGroupHeader);function ln(e,t,n){const r=v.useRef(!0);Ho(()=>{r.current=!1,e.current.register(n,t)},[e,n,t]),r.current&&e.current.register(n,t)}function Wo(e,t){const n=v.useRef(null);if(n.current)return n.current;const r=e.current.getLogger(t);return n.current=r,r}const $fe=(e,t,n,r,o)=>{const i=Wo(e,"useNativeEventListener"),[a,s]=v.useState(!1),l=v.useRef(r),c=pfe(t)?t():(t==null?void 0:t.current)??null,u=v.useCallback(d=>l.current&&l.current(d),[]);v.useEffect(()=>{l.current=r},[r]),v.useEffect(()=>{if(c&&n&&!a){i.debug(`Binding native ${n} event`),c.addEventListener(n,u,o),s(!0);const d=()=>{i.debug(`Clearing native ${n} event`),c.removeEventListener(n,u,o)};e.current.subscribeEvent("unmount",d)}},[c,u,n,a,i,o,e])},R1=e=>{const t=v.useRef(!0);t.current&&(t.current=!1,e())},Qkt=()=>{},Xkt=(e,t)=>{const n=v.useRef(!1);Ho(()=>n.current||!e?Qkt:(n.current=!0,t()),[n.current||e])},Jkt=100,Zkt=e=>e?0:100,Dfe=(e,t,n)=>t>0&&e>0?Math.ceil(e/t):e===-1?n+2:0,_fe=e=>({page:0,pageSize:e?0:100}),eMt=(e,t=0)=>t===0?e:Math.max(Math.min(e,t-1),0),Nfe=(e,t)=>{if(t===Tl.DataGrid&&e>Jkt)throw new Error(["MUI X: `pageSize` cannot exceed 100 in the MIT version of the DataGrid.","You need to upgrade to DataGridPro or DataGridPremium component to unlock this feature."].join(` +`))},tMt=-1,XM=e=>e.pagination,Ji=Ut(XM,e=>e.paginationModel),Ay=Ut(XM,e=>e.rowCount),Zw=Ut(XM,e=>e.meta),nMt=Ut(Ji,e=>e.page),rMt=Ut(Ji,e=>e.pageSize),Lfe=Ut(Ji,Ay,(e,t)=>Dfe(t,e.pageSize,e.page)),nH=mr(Ji,Di,b0,Up,kfe,(e,t,n,r,o)=>{var p;const i=o.length,a=Math.min(e.pageSize*e.page,i-1),s=e.pageSize===tMt?i-1:Math.min(a+e.pageSize-1,i-1);if(a===-1||s===-1)return null;if(n<2)return{firstRowIndex:a,lastRowIndex:s};const l=o[a],c=s-a+1,u=r.findIndex(h=>h.id===l.id);let d=u,f=0;for(;d0)&&(d+=1),m===0&&(f+=1))}return{firstRowIndex:u,lastRowIndex:d-1}}),oMt=mr(Up,nH,(e,t)=>t?e.slice(t.firstRowIndex,t.lastRowIndex+1):[]),Ffe=mr(ev,nH,(e,t)=>t?e.slice(t.firstRowIndex,t.lastRowIndex+1):[]),iMt=["field","colDef"],aMt=e=>{const{classes:t}=e;return In({root:["checkboxInput"]},On,t)},sMt=v.forwardRef(function(t,n){var A;const r=Dt(t,iMt),[,o]=v.useState(!1),i=En(),a=Ot(),s={classes:a.classes},l=aMt(s),c=Ye(i,Rfe),u=Ye(i,sl),d=Ye(i,ev),f=Ye(i,Ffe),p=v.useMemo(()=>typeof a.isRowSelectable!="function"?u:u.filter(k=>i.current.getRow(k)?a.isRowSelectable(i.current.getRowParams(k)):!1),[i,a.isRowSelectable,u]),h=v.useMemo(()=>(!a.pagination||!a.checkboxSelectionVisibleOnly?d:f).reduce((O,$)=>(O[$]=!0,O),{}),[a.pagination,a.checkboxSelectionVisibleOnly,f,d]),m=v.useMemo(()=>p.filter(k=>h[k]).length,[p,h]),y=m>0&&m0,x=k=>{const O={value:k.target.checked};i.current.publishEvent("headerSelectionCheckboxChange",O)},S=c!==null&&c.field===t.field?0:-1;v.useLayoutEffect(()=>{const k=i.current.getColumnHeaderElement(t.field);S===0&&k&&(k.tabIndex=-1)},[S,i,t.field]);const E=v.useCallback(k=>{k.key===" "&&i.current.publishEvent("headerSelectionCheckboxChange",{value:!w})},[i,w]),P=v.useCallback(()=>{o(k=>!k)},[]);v.useEffect(()=>i.current.subscribeEvent("rowSelectionChange",P),[i,P]);const T=i.current.getLocaleText(w?"checkboxSelectionUnselectAllRows":"checkboxSelectionSelectAllRows"),I=a.indeterminateCheckboxAction==="select"?w&&!y:w;return R.jsx(a.slots.baseCheckbox,W({ref:n,indeterminate:y,checked:I,onChange:x,className:l.root,inputProps:{"aria-label":T},tabIndex:S,onKeyDown:E,disabled:!eH(a)},(A=a.slotProps)==null?void 0:A.baseCheckbox,r))}),Qu="__check__",x0=W({},Tfe,{type:"custom",field:Qu,width:50,resizable:!1,sortable:!1,filterable:!1,aggregable:!1,disableColumnMenu:!0,disableReorder:!0,disableExport:!0,getApplyQuickFilterFn:void 0,display:"flex",valueGetter:(e,t,n,r)=>{const o=gd(r),i=r.current.getRowId(t);return o[i]!==void 0},renderHeader:e=>R.jsx(sMt,W({},e)),renderCell:e=>R.jsx(qkt,W({},e))}),lMt=["item","applyValue","type","apiRef","focusElementRef","InputProps","isFilterActive","clearButton","tabIndex","disabled"];function vQ(e,t){if(e==null)return"";const n=new Date(e);return Number.isNaN(n.getTime())?"":t==="date"?n.toISOString().substring(0,10):t==="datetime-local"?(n.setMinutes(n.getMinutes()-n.getTimezoneOffset()),n.toISOString().substring(0,19)):n.toISOString().substring(0,10)}function Hm(e){var S;const{item:t,applyValue:n,type:r,apiRef:o,focusElementRef:i,InputProps:a,clearButton:s,tabIndex:l,disabled:c}=e,u=Dt(e,lMt),d=y0(),[f,p]=v.useState(()=>vQ(t.value,r)),[h,m]=v.useState(!1),y=Io(),w=Ot(),x=v.useCallback(E=>{d.clear();const P=E.target.value;p(P),m(!0),d.start(w.filterDebounceMs,()=>{const T=new Date(P);n(W({},t,{value:Number.isNaN(T.getTime())?void 0:T})),m(!1)})},[n,t,w.filterDebounceMs,d]);return v.useEffect(()=>{const E=vQ(t.value,r);p(E)},[t.value,r]),R.jsx(w.slots.baseTextField,W({fullWidth:!0,id:y,label:o.current.getLocaleText("filterPanelInputLabel"),placeholder:o.current.getLocaleText("filterPanelInputPlaceholder"),value:f,onChange:x,variant:"standard",type:r||"text",InputLabelProps:{shrink:!0},inputRef:i,InputProps:W({},h||s?{endAdornment:h?R.jsx(w.slots.loadIcon,{fontSize:"small",color:"action"}):s}:{},{disabled:c},a,{inputProps:W({max:r==="datetime-local"?"9999-12-31T23:59":"9999-12-31",tabIndex:l},a==null?void 0:a.inputProps)})},u,(S=w.slotProps)==null?void 0:S.baseTextField))}function Um(e,t,n,r){if(!e.value)return null;const o=new Date(e.value);n?o.setSeconds(0,0):(o.setMinutes(o.getMinutes()+o.getTimezoneOffset()),o.setHours(0,0,0,0));const i=o.getTime();return a=>{if(!a)return!1;if(r)return t(a.getTime(),i);const s=new Date(a);return n?s.setSeconds(0,0):s.setHours(0,0,0,0),t(s.getTime(),i)}}const jfe=e=>[{value:"is",getApplyFilterFn:t=>Um(t,(n,r)=>n===r,e),InputComponent:Hm,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"not",getApplyFilterFn:t=>Um(t,(n,r)=>n!==r,e),InputComponent:Hm,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"after",getApplyFilterFn:t=>Um(t,(n,r)=>n>r,e),InputComponent:Hm,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"onOrAfter",getApplyFilterFn:t=>Um(t,(n,r)=>n>=r,e),InputComponent:Hm,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"before",getApplyFilterFn:t=>Um(t,(n,r)=>nUm(t,(n,r)=>n<=r,e),InputComponent:Hm,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"isEmpty",getApplyFilterFn:()=>t=>t==null,requiresFilterValue:!1},{value:"isNotEmpty",getApplyFilterFn:()=>t=>t!=null,requiresFilterValue:!1}],cMt=["id","value","formattedValue","api","field","row","rowNode","colDef","cellMode","isEditable","tabIndex","hasFocus","inputProps","isValidating","isProcessingProps","onValueChange"],uMt=re(Ib)({fontSize:"inherit"}),dMt=e=>{const{classes:t}=e;return In({root:["editInputCell"]},On,t)};function fMt(e){const{id:t,value:n,field:r,colDef:o,hasFocus:i,inputProps:a,onValueChange:s}=e,l=Dt(e,cMt),c=o.type==="dateTime",u=En(),d=v.useRef(),f=v.useMemo(()=>{let E;n==null?E=null:n instanceof Date?E=n:E=new Date((n??"").toString());let P;return E==null||Number.isNaN(E.getTime())?P="":P=new Date(E.getTime()-E.getTimezoneOffset()*60*1e3).toISOString().substr(0,c?16:10),{parsed:E,formatted:P}},[n,c]),[p,h]=v.useState(f),y={classes:Ot().classes},w=dMt(y),x=v.useCallback(E=>{if(E==="")return null;const[P,T]=E.split("T"),[I,A,k]=P.split("-"),O=new Date;if(O.setFullYear(Number(I),Number(A)-1,Number(k)),O.setHours(0,0,0,0),T){const[$,N]=T.split(":");O.setHours(Number($),Number(N),0,0)}return O},[]),S=v.useCallback(async E=>{const P=E.target.value,T=x(P);s&&await s(E,T),h({parsed:T,formatted:P}),u.current.setEditCellValue({id:t,field:r,value:T},E)},[u,r,t,s,x]);return v.useEffect(()=>{h(E=>{var P,T;return f.parsed!==E.parsed&&((P=f.parsed)==null?void 0:P.getTime())!==((T=E.parsed)==null?void 0:T.getTime())?f:E})},[f]),Ho(()=>{i&&d.current.focus()},[i]),R.jsx(uMt,W({inputRef:d,fullWidth:!0,className:w.root,type:c?"datetime-local":"date",inputProps:W({max:c?"9999-12-31T23:59":"9999-12-31"},a),value:p.formatted,onChange:S},l))}const Bfe=e=>R.jsx(fMt,W({},e));function zfe({value:e,columnType:t,rowId:n,field:r}){if(!(e instanceof Date))throw new Error([`MUI X: \`${t}\` column type only accepts \`Date\` objects as values.`,"Use `valueGetter` to transform the value into a `Date` object.",`Row ID: ${n}, field: "${r}".`].join(` +`))}const pMt=(e,t,n,r)=>{if(!e)return"";const o=r.current.getRowId(t);return zfe({value:e,columnType:"date",rowId:o,field:n.field}),e.toLocaleDateString()},hMt=(e,t,n,r)=>{if(!e)return"";const o=r.current.getRowId(t);return zfe({value:e,columnType:"dateTime",rowId:o,field:n.field}),e.toLocaleString()},gMt=W({},Tc,{type:"date",sortComparator:ffe,valueFormatter:pMt,filterOperators:jfe(),renderEditCell:Bfe,pastedValueParser:e=>new Date(e)}),mMt=W({},Tc,{type:"dateTime",sortComparator:ffe,valueFormatter:hMt,filterOperators:jfe(!0),renderEditCell:Bfe,pastedValueParser:e=>new Date(e)}),gf=e=>e==null?null:Number(e),yMt=e=>e==null||Number.isNaN(e)||e===""?null:t=>gf(t)===gf(e),vMt=()=>[{value:"=",getApplyFilterFn:e=>e.value==null||Number.isNaN(e.value)?null:t=>gf(t)===e.value,InputComponent:fl,InputComponentProps:{type:"number"}},{value:"!=",getApplyFilterFn:e=>e.value==null||Number.isNaN(e.value)?null:t=>gf(t)!==e.value,InputComponent:fl,InputComponentProps:{type:"number"}},{value:">",getApplyFilterFn:e=>e.value==null||Number.isNaN(e.value)?null:t=>t==null?!1:gf(t)>e.value,InputComponent:fl,InputComponentProps:{type:"number"}},{value:">=",getApplyFilterFn:e=>e.value==null||Number.isNaN(e.value)?null:t=>t==null?!1:gf(t)>=e.value,InputComponent:fl,InputComponentProps:{type:"number"}},{value:"<",getApplyFilterFn:e=>e.value==null||Number.isNaN(e.value)?null:t=>t==null?!1:gf(t)e.value==null||Number.isNaN(e.value)?null:t=>t==null?!1:gf(t)<=e.value,InputComponent:fl,InputComponentProps:{type:"number"}},{value:"isEmpty",getApplyFilterFn:()=>e=>e==null,requiresFilterValue:!1},{value:"isNotEmpty",getApplyFilterFn:()=>e=>e!=null,requiresFilterValue:!1},{value:"isAnyOf",getApplyFilterFn:e=>!Array.isArray(e.value)||e.value.length===0?null:t=>t!=null&&e.value.includes(Number(t)),InputComponent:gfe,InputComponentProps:{type:"number"}}],bMt=W({},Tc,{type:"number",align:"right",headerAlign:"right",sortComparator:dfe,valueParser:e=>e===""?null:Number(e),valueFormatter:e=>BAt(e)?e.toLocaleString():e||"",filterOperators:vMt(),getApplyQuickFilterFn:yMt});function pb(e){return(e==null?void 0:e.type)==="singleSelect"}function Og(e,t){if(e)return typeof e.valueOptions=="function"?e.valueOptions(W({field:e.field},t)):e.valueOptions}function UO(e,t,n){if(t===void 0)return;const r=t.find(o=>{const i=n(o);return String(i)===String(e)});return n(r)}const wMt=["id","value","formattedValue","api","field","row","rowNode","colDef","cellMode","isEditable","tabIndex","className","hasFocus","isValidating","isProcessingProps","error","onValueChange","initialOpen"],xMt=["MenuProps"];function SMt(e){return!!e.key}function CMt(e){var N,L;const t=Ot(),{id:n,value:r,field:o,row:i,colDef:a,hasFocus:s,error:l,onValueChange:c,initialOpen:u=t.editMode===Su.Cell}=e,d=Dt(e,wMt),f=En(),p=v.useRef(),h=v.useRef(),[m,y]=v.useState(u),x=(((N=t.slotProps)==null?void 0:N.baseSelect)||{}).native??!1,S=((L=t.slotProps)==null?void 0:L.baseSelect)||{},{MenuProps:E}=S,P=Dt(S,xMt);if(Ho(()=>{var j;s&&((j=h.current)==null||j.focus())},[s]),!pb(a))return null;const T=Og(a,{id:n,row:i});if(!T)return null;const I=a.getOptionValue,A=a.getOptionLabel,k=async j=>{if(!pb(a)||!T)return;y(!1);const D=j.target,_=UO(D.value,T,I);c&&await c(j,_),await f.current.setEditCellValue({id:n,field:o,value:_},j)},O=(j,D)=>{if(t.editMode===Su.Row){y(!1);return}if(D==="backdropClick"||j.key==="Escape"){const _=f.current.getCellParams(n,o);f.current.publishEvent("cellEditStop",W({},_,{reason:j.key==="Escape"?ic.escapeKeyDown:ic.cellFocusOut}))}},$=j=>{SMt(j)&&j.key==="Enter"||y(!0)};return!T||!a?null:R.jsx(t.slots.baseSelect,W({ref:p,inputRef:h,value:r,onChange:k,open:m,onOpen:$,MenuProps:W({onClose:O},E),error:l,native:x,fullWidth:!0},d,P,{children:T.map(j=>{var _;const D=I(j);return v.createElement(t.slots.baseSelectOption,W({},((_=t.slotProps)==null?void 0:_.baseSelectOption)||{},{native:x,key:D,value:D}),A(j))})}))}const EMt=e=>R.jsx(CMt,W({},e)),PMt=["item","applyValue","type","apiRef","focusElementRef","placeholder","tabIndex","label","variant","isFilterActive","clearButton","InputLabelProps"],TMt=({column:e,OptionComponent:t,getOptionLabel:n,getOptionValue:r,isSelectNative:o,baseSelectOptionProps:i})=>["",...Og(e)||[]].map(s=>{const l=r(s);let c=n(s);return c===""&&(c=" "),v.createElement(t,W({},i,{native:o,key:l,value:l}),c)}),IMt=re("div")({display:"flex",alignItems:"flex-end",width:"100%","& button":{margin:"auto 0px 5px 5px"}});function bQ(e){var I,A,k,O,$;const{item:t,applyValue:n,type:r,apiRef:o,focusElementRef:i,placeholder:a,tabIndex:s,label:l,variant:c="standard",clearButton:u}=e,d=Dt(e,PMt),f=t.value??"",p=Io(),h=Io(),m=Ot(),y=((A=(I=m.slotProps)==null?void 0:I.baseSelect)==null?void 0:A.native)??!1;let w=null;if(t.field){const N=o.current.getColumn(t.field);pb(N)&&(w=N)}const x=w==null?void 0:w.getOptionValue,S=w==null?void 0:w.getOptionLabel,E=v.useMemo(()=>Og(w),[w]),P=v.useCallback(N=>{let L=N.target.value;L=UO(L,E,x),n(W({},t,{value:L}))},[E,x,n,t]);if(!pb(w))return null;const T=l??o.current.getLocaleText("filterPanelInputLabel");return R.jsxs(IMt,{children:[R.jsxs(m.slots.baseFormControl,{fullWidth:!0,children:[R.jsx(m.slots.baseInputLabel,W({},(k=m.slotProps)==null?void 0:k.baseInputLabel,{id:h,htmlFor:p,shrink:!0,variant:c,children:T})),R.jsx(m.slots.baseSelect,W({id:p,label:T,labelId:h,value:f,onChange:P,variant:c,type:r||"text",inputProps:{tabIndex:s,ref:i,placeholder:a??o.current.getLocaleText("filterPanelInputPlaceholder")},native:y,notched:c==="outlined"?!0:void 0},d,(O=m.slotProps)==null?void 0:O.baseSelect,{children:TMt({column:w,OptionComponent:m.slots.baseSelectOption,getOptionLabel:S,getOptionValue:x,isSelectNative:y,baseSelectOptionProps:($=m.slotProps)==null?void 0:$.baseSelectOption})}))]}),u]})}const OMt=["item","applyValue","type","apiRef","focusElementRef","color","error","helperText","size","variant"],AMt=["key"],kMt=Sne();function MMt(e){const{item:t,applyValue:n,apiRef:r,focusElementRef:o,color:i,error:a,helperText:s,size:l,variant:c="standard"}=e,u=Dt(e,OMt),d={color:i,error:a,helperText:s,size:l,variant:c},f=Io(),p=Ot();let h=null;if(t.field){const P=r.current.getColumn(t.field);pb(P)&&(h=P)}const m=h==null?void 0:h.getOptionValue,y=h==null?void 0:h.getOptionLabel,w=v.useCallback((P,T)=>m(P)===m(T),[m]),x=v.useMemo(()=>Og(h)||[],[h]),S=v.useMemo(()=>Array.isArray(t.value)?t.value.reduce((P,T)=>{const I=x.find(A=>m(A)===T);return I!=null&&P.push(I),P},[]):[],[m,t.value,x]),E=v.useCallback((P,T)=>{n(W({},t,{value:T.map(m)}))},[n,t,m]);return R.jsx(Oc,W({multiple:!0,options:x,isOptionEqualToValue:w,filterOptions:kMt,id:f,value:S,onChange:E,getOptionLabel:y,renderTags:(P,T)=>P.map((I,A)=>{const k=T({index:A}),{key:O}=k,$=Dt(k,AMt);return R.jsx(p.slots.baseChip,W({variant:"outlined",size:"small",label:y(I)},$),O)}),renderInput:P=>{var T;return R.jsx(p.slots.baseTextField,W({},P,{label:r.current.getLocaleText("filterPanelInputLabel"),placeholder:r.current.getLocaleText("filterPanelInputPlaceholder"),InputLabelProps:W({},P.InputLabelProps,{shrink:!0}),inputRef:o,type:"singleSelect"},d,(T=p.slotProps)==null?void 0:T.baseTextField))}},u))}const Wm=e=>e==null||!K5(e)?e:e.value,RMt=()=>[{value:"is",getApplyFilterFn:e=>e.value==null||e.value===""?null:t=>Wm(t)===Wm(e.value),InputComponent:bQ},{value:"not",getApplyFilterFn:e=>e.value==null||e.value===""?null:t=>Wm(t)!==Wm(e.value),InputComponent:bQ},{value:"isAnyOf",getApplyFilterFn:e=>{if(!Array.isArray(e.value)||e.value.length===0)return null;const t=e.value.map(Wm);return n=>t.includes(Wm(n))},InputComponent:MMt}],$Mt=e=>typeof e[0]=="object",DMt=e=>K5(e)?e.value:e,_Mt=e=>K5(e)?e.label:String(e),NMt=W({},Tc,{type:"singleSelect",getOptionLabel:_Mt,getOptionValue:DMt,valueFormatter(e,t,n,r){const o=r.current.getRowId(t);if(!pb(n))return"";const i=Og(n,{id:o,row:t});if(e==null)return"";if(!i)return e;if(!$Mt(i))return n.getOptionLabel(e);const a=i.find(s=>n.getOptionValue(s)===e);return a?n.getOptionLabel(a):""},renderEditCell:EMt,filterOperators:RMt(),pastedValueParser:(e,t,n)=>{const r=n,o=Og(r)||[],i=r.getOptionValue;if(o.find(s=>i(s)===e))return e}}),LMt="string",FMt=()=>({string:Tc,number:bMt,date:gMt,dateTime:mMt,boolean:Tfe,singleSelect:NMt,[UM]:lkt,custom:Tc}),rH=e=>e.headerFiltering,jMt=Ut(rH,e=>(e==null?void 0:e.enabled)??!1),BMt=Ut(rH,e=>e.editing),zMt=Ut(rH,e=>e.menuOpen),JM=e=>e.columnGrouping,Vfe=mr(JM,e=>(e==null?void 0:e.unwrappedGroupingModel)??{}),Hfe=mr(JM,e=>(e==null?void 0:e.lookup)??{}),VMt=mr(JM,e=>(e==null?void 0:e.headerStructure)??[]),$1=Ut(JM,e=>(e==null?void 0:e.maxDepth)??0),Ufe=["maxWidth","minWidth","width","flex"],x_=FMt();function HMt({initialFreeSpace:e,totalFlexUnits:t,flexColumns:n}){const r=new Set(n.map(a=>a.field)),o={all:{},frozenFields:[],freeze:a=>{const s=o.all[a];s&&s.frozen!==!0&&(o.all[a].frozen=!0,o.frozenFields.push(a))}};function i(){if(o.frozenFields.length===r.size)return;const a={min:{},max:{}};let s=e,l=t,c=0;o.frozenFields.forEach(u=>{s-=o.all[u].computedWidth,l-=o.all[u].flex});for(let u=0;ud.maxWidth&&(c+=d.maxWidth-p,p=d.maxWidth,a.max[d.field]=!0),o.all[d.field]={frozen:!1,computedWidth:p,flex:d.flex}}c<0?Object.keys(a.max).forEach(u=>{o.freeze(u)}):c>0?Object.keys(a.min).forEach(u=>{o.freeze(u)}):n.forEach(({field:u})=>{o.freeze(u)}),i()}return i(),o.all}const QF=(e,t)=>{const n={};let r=0,o=0;const i=[];e.orderedFields.forEach(l=>{let c=e.lookup[l],u=0,d=!1;e.columnVisibilityModel[l]!==!1&&(c.flex&&c.flex>0?(r+=c.flex,d=!0):u=hu(c.width||Tc.width,c.minWidth||Tc.minWidth,c.maxWidth||Tc.maxWidth),o+=u),c.computedWidth!==u&&(c=W({},c,{computedWidth:u})),d&&i.push(c),n[l]=c});const a=t===void 0?0:t.viewportOuterSize.width-(t.hasScrollY?t.scrollbarSize:0),s=Math.max(a-o,0);if(r>0&&a>0){const l=HMt({initialFreeSpace:s,totalFlexUnits:r,flexColumns:i});Object.keys(l).forEach(c=>{n[c].computedWidth=l[c].computedWidth})}return W({},e,{lookup:n})},UMt=(e,t)=>{if(!t)return e;const{orderedFields:n=[],dimensions:r={}}=t,o=Object.keys(r);if(o.length===0&&n.length===0)return e;const i={},a=[];for(let u=0;u!i[u])],l=W({},e.lookup);for(let u=0;u{f[p]=h===-1?1/0:h}),l[d]=f}return W({},e,{orderedFields:s,lookup:l})};function wQ(e){let t=x_[LMt];return e&&x_[e]&&(t=x_[e]),t}const ny=({apiRef:e,columnsToUpsert:t,initialState:n,columnVisibilityModel:r=vl(e),keepOnlyColumnsToUpsert:o=!1})=>{var u,d;const i=!e.current.state.columns;let a;if(i)a={orderedFields:[],lookup:{},columnVisibilityModel:r};else{const f=pu(e.current.state);a={orderedFields:o?[]:[...f.orderedFields],lookup:W({},f.lookup),columnVisibilityModel:r}}let s={};o&&!i&&(s=Object.keys(a.lookup).reduce((f,p)=>W({},f,{[p]:!1}),{})),t.forEach(f=>{const{field:p}=f;s[p]=!0;let h=a.lookup[p];h==null?(h=W({},wQ(f.type),{field:p,hasBeenResized:!1}),a.orderedFields.push(p)):o&&a.orderedFields.push(p),h&&h.type!==f.type&&(h=W({},wQ(f.type),{field:p}));let m=h.hasBeenResized;Ufe.forEach(y=>{f[y]!==void 0&&(m=!0,f[y]===-1&&(f[y]=1/0))}),a.lookup[p]=tfe(h,W({},f,{hasBeenResized:m}))}),o&&!i&&Object.keys(a.lookup).forEach(f=>{s[f]||delete a.lookup[f]});const l=e.current.unstable_applyPipeProcessors("hydrateColumns",a),c=UMt(l,n);return QF(c,((d=(u=e.current).getRootDimensions)==null?void 0:d.call(u))??void 0)};function WMt({firstColumnToRender:e,apiRef:t,firstRowToRender:n,lastRowToRender:r,visibleRows:o}){let i=e;for(let a=n;a{const{scrollDirection:t,classes:n}=e,r={root:["scrollArea",`scrollArea--${t}`]};return In(r,On,n)},KMt=or("div",{name:"MuiDataGrid",slot:"ScrollArea",overridesResolver:(e,t)=>[{[`&.${le["scrollArea--left"]}`]:t["scrollArea--left"]},{[`&.${le["scrollArea--right"]}`]:t["scrollArea--right"]},t.scrollArea]})(()=>({position:"absolute",top:0,zIndex:101,width:20,bottom:0,[`&.${le["scrollArea--left"]}`]:{left:0},[`&.${le["scrollArea--right"]}`]:{right:0}}));function YMt(e){const{scrollDirection:t}=e,n=v.useRef(null),r=En(),o=y0(),i=Ye(r,A1),a=Ye(r,G5),s=Ye(r,Si),l=v.useRef({left:0,top:0}),c=()=>{if(t==="left")return l.current.left>0;if(t==="right"){const A=a-s.viewportInnerSize.width;return l.current.left{l.current=A,p(c)},P=Ar(A=>{let k;if(A.preventDefault(),t==="left")k=A.clientX-n.current.getBoundingClientRect().right;else if(t==="right")k=Math.max(1,A.clientX-n.current.getBoundingClientRect().left);else throw new Error("MUI X: Wrong drag direction");k=(k-xQ)*GMt+xQ,o.start(0,()=>{r.current.scroll({left:l.current.left+k,top:l.current.top})})}),T=Ar(()=>{d(!0)}),I=Ar(()=>{d(!1)});return xt(r,"scrollPositionChange",E),xt(r,"columnHeaderDragStart",T),xt(r,"columnHeaderDragEnd",I),!u||!f?null:R.jsx(KMt,{ref:n,className:de(y.root),ownerState:m,onDragOver:P,style:S})}const SQ=Vp(YMt),QMt=typeof window<"u"?v.useLayoutEffect:v.useEffect,XMt=()=>{};function JMt(e,t,n){const r=v.useRef(null);r.current=t,QMt(()=>{if(typeof ResizeObserver>"u")return XMt;const o=e.current,i=new ResizeObserver(a=>{r.current(a)});return o&&i.observe(o),()=>{i.disconnect()}},[e,n])}const Wfe=v.createContext(void 0);function Gl(){const e=v.useContext(Wfe);if(e===void 0)throw new Error(["MUI X: Could not find the Data Grid private context.","It looks like you rendered your component outside of a DataGrid, DataGridPro or DataGridPremium parent component.","This can also happen if you are bundling multiple versions of the Data Grid."].join(` +`));return e}const tv=(e,t)=>{let n,r;return t.pagination&&t.paginationMode==="client"?(r=nH(e),n=oMt(e)):(n=Up(e),n.length===0?r=null:r={firstRowIndex:0,lastRowIndex:n.length-1}),{rows:n,range:r}},Wp=(e,t)=>{const n=tv(e,t);return v.useMemo(()=>({rows:n.rows,range:n.range}),[n.rows,n.range])},ZMt=typeof navigator<"u"?navigator.userAgent.toLowerCase():"empty",eRt=ZMt.includes("firefox"),S0=e=>e.rowsMeta,ZM=e=>e.virtualization;Ut(ZM,e=>e.enabled);const iH=Ut(ZM,e=>e.enabledForColumns),tRt=Ut(ZM,e=>e.enabledForRows),eR=Ut(ZM,e=>e.renderContext),nRt=mr(e=>e.virtualization.renderContext.firstColumnIndex,e=>e.virtualization.renderContext.lastColumnIndex,(e,t)=>({firstColumnIndex:e,lastColumnIndex:t})),Gfe={firstRowIndex:0,lastRowIndex:0,firstColumnIndex:0,lastColumnIndex:0},rRt=(e,t)=>{const{disableVirtualization:n,autoHeight:r}=t;return W({},e,{virtualization:{enabled:!n,enabledForColumns:!n,enabledForRows:!n&&!r,renderContext:Gfe}})};function oRt(e,t){const n=i=>{e.current.setState(a=>W({},a,{virtualization:W({},a.virtualization,{enabled:i,enabledForColumns:i,enabledForRows:i&&!t.autoHeight})}))};ln(e,{unstable_setVirtualization:n,unstable_setColumnVirtualization:i=>{e.current.setState(a=>W({},a,{virtualization:W({},a.virtualization,{enabledForColumns:i})}))}},"public"),v.useEffect(()=>{n(!t.disableVirtualization)},[t.disableVirtualization,t.autoHeight])}const aH=e=>e.rowSpanning,qfe=Ut(aH,e=>e.hiddenCells),iRt=Ut(aH,e=>e.spannedCells),aRt=Ut(aH,e=>e.hiddenCellOriginMap),hb=e=>e.listViewColumn,S_=50;var bo=function(e){return e[e.NONE=0]="NONE",e[e.UP=1]="UP",e[e.DOWN=2]="DOWN",e[e.LEFT=3]="LEFT",e[e.RIGHT=4]="RIGHT",e}(bo||{});const CQ={top:0,left:0},sRt=Object.freeze(new Map),lRt=(e,t,n,r,o)=>({direction:bo.NONE,buffer:Yfe(e,bo.NONE,t,n,r,o)});let XF=!1;try{typeof window<"u"&&(XF=/jsdom/.test(window.navigator.userAgent))}catch{}const cRt=()=>{const e=Gl(),t=Ot(),{unstable_listView:n}=t,r=Ye(e,()=>n?[hb(e.current.state)]:Oo(e)),o=Ye(e,tRt)&&!XF,i=Ye(e,iH)&&!XF,a=Ye(e,Si),s=a.viewportOuterSize,l=Ye(e,em),c=Ye(e,k1),u=n?{left:[],right:[]}:c,d=l.bottom.length>0,[f,p]=v.useState(sRt),h=dr(),m=Ye(e,ts),y=Ye(e,tH),w=Ye(e,S0),x=Ye(e,gd),S=Wp(e,t),E=e.current.rootElementRef,P=e.current.mainElementRef,T=e.current.virtualScrollerRef,I=e.current.virtualScrollbarVerticalRef,A=e.current.virtualScrollbarHorizontalRef,k=a.contentSize.height,O=a.columnsTotalWidth,$=Ye(e,IAt);JMt(P,()=>e.current.resize());const N=v.useRef(CQ),L=v.useRef(CQ),j=v.useRef(Gfe),D=Ye(e,eR),_=y0(),z=v.useRef(void 0),F=ku(()=>lRt(h,t.rowBufferPx,t.columnBufferPx,a.rowHeight*15,S_*6)).current,V={rowIndex:v.useMemo(()=>m?S.rows.findIndex(oe=>oe.id===m.id):-1,[m,S.rows]),columnIndex:v.useMemo(()=>m?r.findIndex(oe=>oe.field===m.field):-1,[m,r])},U=v.useCallback(oe=>{if(fRt(oe,e.current.state.virtualization.renderContext))return;const fe=oe.firstRowIndex!==j.current.firstRowIndex||oe.lastRowIndex!==j.current.lastRowIndex;e.current.setState(Z=>W({},Z,{virtualization:W({},Z.virtualization,{renderContext:oe})})),a.isReady&&fe&&(j.current=oe,e.current.publishEvent("renderedRowsIntervalChange",oe)),L.current=N.current},[e,a.isReady]),K=Ar(()=>{const oe={top:T.current.scrollTop,left:T.current.scrollLeft},fe=oe.left-N.current.left,Z=oe.top-N.current.top,ce=fe!==0||Z!==0;N.current=oe;const ge=ce?pRt(fe,Z):bo.NONE,we=Math.abs(N.current.top-L.current.top),me=Math.abs(N.current.left-L.current.left),Se=we>=a.rowHeight||me>=S_,xe=F.direction!==ge;if(!(Se||xe))return D;if(xe)switch(ge){case bo.NONE:case bo.LEFT:case bo.RIGHT:z.current=void 0;break;default:z.current=D;break}F.direction=ge,F.buffer=Yfe(h,ge,t.rowBufferPx,t.columnBufferPx,a.rowHeight*15,S_*6);const De=C_(e,t,o,i),_e=E_(De,N.current,F);return Tb.flushSync(()=>{U(_e)}),_.start(1e3,K),_e}),X=()=>{const oe=C_(e,t,o,i),fe=E_(oe,N.current,F);z.current=void 0,U(fe)},ie=Ar(oe=>{const{scrollTop:fe,scrollLeft:Z}=oe.currentTarget;if(fe<0||!h&&Z<0||h&&Z>0)return;const ce=K();e.current.publishEvent("scrollPositionChange",{top:fe,left:Z,renderContext:ce})}),ee=Ar(oe=>{e.current.publishEvent("virtualScrollerWheel",{},oe)}),Q=Ar(oe=>{e.current.publishEvent("virtualScrollerTouchMove",{},oe)}),te=(oe={})=>{var Pe;if(!oe.rows&&!S.range)return[];const fe=oe.renderContext??D,Z=!d&&oe.position===void 0||d&&oe.position==="bottom",ce=oe.position!==void 0;let ge;switch(oe.position){case"top":ge=0;break;case"bottom":ge=l.top.length+S.rows.length;break;case void 0:ge=l.top.length;break}const we=oe.rows??S.rows,me=fe.firstRowIndex,Se=Math.min(fe.lastRowIndex,we.length),xe=oe.rows?sQ(0,oe.rows.length):sQ(me,Se);let ke=-1;!ce&&V.rowIndex!==-1&&(V.rowIndex=Se&&(ke=V.rowIndex,xe.push(ke)));const De=[],_e=(Pe=t.slotProps)==null?void 0:Pe.row,ye=Hp(e);return xe.forEach(Ae=>{var Gn,Jn,Do;const{id:Me,model:We}=we[Ae],He=(((Gn=S==null?void 0:S.range)==null?void 0:Gn.firstRowIndex)||0)+ge+Ae;if($){const oo=u.left.length,Bi=r.length-u.right.length;e.current.calculateColSpan({rowId:Me,minFirstColumn:oo,maxLastColumn:Bi,columns:r}),u.left.length>0&&e.current.calculateColSpan({rowId:Me,minFirstColumn:0,maxLastColumn:u.left.length,columns:r}),u.right.length>0&&e.current.calculateColSpan({rowId:Me,minFirstColumn:r.length-u.right.length,maxLastColumn:r.length,columns:r})}const Xe=(m==null?void 0:m.id)===Me,gt=e.current.rowHasAutoHeight(Me)?"auto":e.current.unstable_getRowHeight(Me);let st;x[Me]==null?st=!1:st=e.current.isRowSelectable(Me);let et=!1;oe.position===void 0&&(et=Ae===0);let Et=!1;const An=Ae===we.length-1;if(Z)if(ce)Et=An;else{const oo=S.rows.length-1;Ae===oo&&(Et=!0)}const $e=Ae===ke;let Qe=null;y!==null&&y.id===Me&&(Qe=e.current.getCellParams(Me,y.field).cellMode==="view"?y.field:null);let Tt=fe;!ce&&z.current&&Ae>=z.current.firstRowIndex&&Aes.width,ae=v.useMemo(()=>({overflowX:!pe||n?"hidden":void 0,overflowY:t.autoHeight?"hidden":void 0}),[pe,t.autoHeight,n]),se=v.useMemo(()=>{const oe={width:pe?O:"auto",flexBasis:k,flexShrink:0};return t.autoHeight&&S.rows.length===0&&(oe.flexBasis=Cfe(e)),oe},[e,O,k,pe,t.autoHeight,S.rows.length]);return v.useEffect(()=>{e.current.publishEvent("virtualScrollerContentSizeChange")},[e,se]),Ho(()=>{e.current.resize()},[e,w.currentPageTotalHeight]),Ho(()=>{i&&(T.current.scrollLeft=0),o&&(T.current.scrollTop=0)},[i,o,E,T]),Ho(()=>{n&&(T.current.scrollLeft=0)},[n,T]),Xkt(s.width!==0,()=>{const oe=C_(e,t,o,i),fe=E_(oe,N.current,F);U(fe),e.current.publishEvent("scrollPositionChange",{top:N.current.top,left:N.current.left,renderContext:fe})}),e.current.register("private",{updateRenderContext:X}),xt(e,"columnsChange",X),xt(e,"filteredRowsSet",X),xt(e,"rowExpansionChange",X),{renderContext:D,setPanels:p,getRows:te,getContainerProps:()=>({ref:P}),getScrollerProps:()=>({ref:T,onScroll:ie,onWheel:ee,onTouchMove:Q,style:ae,role:"presentation",tabIndex:eRt?-1:void 0}),getContentProps:()=>({style:se,role:"presentation"}),getRenderZoneProps:()=>({role:"rowgroup"}),getScrollbarVerticalProps:()=>({ref:I,role:"presentation"}),getScrollbarHorizontalProps:()=>({ref:A,role:"presentation"})}};function C_(e,t,n,r){const o=Si(e.current.state),i=tv(e,t),a=t.unstable_listView?[hb(e.current.state)]:Oo(e),s=aRt(e),l=e.current.state.rows.dataRowIds.at(-1),c=a.at(-1);return{enabledForRows:n,enabledForColumns:r,apiRef:e,autoHeight:t.autoHeight,rowBufferPx:t.rowBufferPx,columnBufferPx:t.columnBufferPx,leftPinnedWidth:o.leftPinnedWidth,columnsTotalWidth:o.columnsTotalWidth,viewportInnerWidth:o.viewportInnerSize.width,viewportInnerHeight:o.viewportInnerSize.height,lastRowHeight:l!==void 0?e.current.unstable_getRowHeight(l):0,lastColumnWidth:(c==null?void 0:c.computedWidth)??0,rowsMeta:S0(e.current.state),columnPositions:Hp(e),rows:i.rows,range:i.range,pinnedColumns:k1(e),visibleColumns:a,hiddenCellsOriginMap:s,listView:t.unstable_listView??!1}}function E_(e,t,n){const r={firstRowIndex:0,lastRowIndex:e.rows.length,firstColumnIndex:0,lastColumnIndex:e.visibleColumns.length},{top:o,left:i}=t,a=Math.abs(i)+e.leftPinnedWidth;if(e.enabledForRows){let l=Math.min(EQ(e,o,{atStart:!0,lastPosition:e.rowsMeta.positions[e.rowsMeta.positions.length-1]+e.lastRowHeight}),e.rowsMeta.positions.length-1);const c=e.hiddenCellsOriginMap[l];if(c){const d=Math.min(...Object.values(c));l=Math.min(l,d)}const u=e.autoHeight?l+e.rows.length:EQ(e,o+e.viewportInnerHeight);r.firstRowIndex=l,r.lastRowIndex=u}if(e.enabledForColumns){let l=0,c=e.columnPositions.length,u=!1;const[d,f]=JF({firstIndex:r.firstRowIndex,lastIndex:r.lastRowIndex,minFirstIndex:0,maxLastIndex:e.rows.length,bufferBefore:n.buffer.rowBefore,bufferAfter:n.buffer.rowAfter,positions:e.rowsMeta.positions,lastSize:e.lastRowHeight});for(let p=d;p=e.range.lastRowIndex);const i=hu(r-(((s=e.range)==null?void 0:s.firstRowIndex)||0),0,e.rowsMeta.positions.length);return o||e.rowsMeta.positions[i]>=t?mp(t,e.rowsMeta.positions,n):dRt(t,e.rowsMeta.positions,i,n)}function uRt(e,t,n){const[r,o]=JF({firstIndex:t.firstRowIndex,lastIndex:t.lastRowIndex,minFirstIndex:0,maxLastIndex:e.rows.length,bufferBefore:n.buffer.rowBefore,bufferAfter:n.buffer.rowAfter,positions:e.rowsMeta.positions,lastSize:e.lastRowHeight}),[i,a]=JF({firstIndex:t.firstColumnIndex,lastIndex:t.lastColumnIndex,minFirstIndex:e.pinnedColumns.left.length,maxLastIndex:e.visibleColumns.length-e.pinnedColumns.right.length,bufferBefore:n.buffer.columnBefore,bufferAfter:n.buffer.columnAfter,positions:e.columnPositions,lastSize:e.lastColumnWidth}),s=WMt({firstColumnToRender:i,apiRef:e.apiRef,firstRowToRender:r,lastRowToRender:o,visibleRows:e.rows});return{firstRowIndex:r,lastRowIndex:o,firstColumnIndex:s,lastColumnIndex:a}}function mp(e,t,n=void 0,r=0,o=t.length){if(t.length<=0)return-1;if(r>=o)return r;const i=r+Math.floor((o-r)/2),a=t[i];let s;if(n!=null&&n.atStart){const l=(i===t.length-1?n.lastPosition:t[i+1])-a;s=e-l=Math.abs(e)?t>0?bo.DOWN:bo.UP:e>0?bo.RIGHT:bo.LEFT}function Yfe(e,t,n,r,o,i){if(e)switch(t){case bo.LEFT:t=bo.RIGHT;break;case bo.RIGHT:t=bo.LEFT;break}switch(t){case bo.NONE:return{rowAfter:n,rowBefore:n,columnAfter:r,columnBefore:r};case bo.LEFT:return{rowAfter:0,rowBefore:0,columnAfter:0,columnBefore:i};case bo.RIGHT:return{rowAfter:0,rowBefore:0,columnAfter:i,columnBefore:0};case bo.UP:return{rowAfter:0,rowBefore:o,columnAfter:0,columnBefore:0};case bo.DOWN:return{rowAfter:o,rowBefore:0,columnAfter:0,columnBefore:0};default:throw new Error("unreachable")}}const hRt=()=>{var u,d;const e=En(),t=Ot(),n=Ye(e,WM),r=Ye(e,J5),o=n===0,i=Ye(e,ckt),a=!i&&o,s=!i&&n>0&&r===0;let l=null,c=null;return a&&(l="noRowsOverlay"),s&&(l="noResultsOverlay"),i&&(l="loadingOverlay",c=((d=(u=t.slotProps)==null?void 0:u.loadingOverlay)==null?void 0:d[o?"noRowsVariant":"variant"])||null),{overlayType:l,loadingOverlayVariant:c}},gRt=or("div",{name:"MuiDataGrid",slot:"OverlayWrapper",shouldForwardProp:e=>e!=="overlayType"&&e!=="loadingOverlayVariant",overridesResolver:(e,t)=>t.overlayWrapper})(({overlayType:e,loadingOverlayVariant:t})=>t!=="skeleton"?{position:"sticky",top:"var(--DataGrid-headersTotalHeight)",left:0,width:0,height:0,zIndex:e==="loadingOverlay"?5:4}:{}),mRt=or("div",{name:"MuiDataGrid",slot:"OverlayWrapperInner",shouldForwardProp:e=>e!=="overlayType"&&e!=="loadingOverlayVariant",overridesResolver:(e,t)=>t.overlayWrapperInner})({}),yRt=e=>{const{classes:t}=e;return In({root:["overlayWrapper"],inner:["overlayWrapperInner"]},On,t)};function vRt(e){const t=En(),n=Ot(),r=Wp(t,n),o=Ye(t,Si);let i=o.viewportOuterSize.height-o.topContainerHeight-o.bottomContainerHeight-(o.hasScrollX?o.scrollbarSize:0);(n.autoHeight&&r.rows.length===0||i===0)&&(i=Cfe(t));const a=yRt(W({},e,{classes:n.classes}));return R.jsx(gRt,W({className:de(a.root)},e,{children:R.jsx(mRt,W({className:de(a.inner),style:{height:i,width:o.viewportOuterSize.width}},e))}))}function bRt(e){var i,a;const{overlayType:t}=e,n=Ot();if(!t)return null;const r=(i=n.slots)==null?void 0:i[t],o=(a=n.slotProps)==null?void 0:a[t];return R.jsx(vRt,W({},e,{children:R.jsx(r,W({},o))}))}const ST=e=>e.columnMenu;function wRt(){var y;const e=Gl(),t=Ot(),n=Ye(e,Oo),r=Ye(e,Fkt),o=Ye(e,Dkt),i=Ye(e,Rfe),a=Ye(e,tH),s=Ye(e,Ykt),l=Ye(e,Kkt),c=Ye(e,HO),u=Ye(e,$1),d=Ye(e,ST),f=Ye(e,vl),p=Ye(e,VMt),h=!(s===null&&i===null&&a===null),m=e.current.columnHeadersContainerRef;return R.jsx(t.slots.columnHeaders,W({ref:m,visibleColumns:n,filterColumnLookup:r,sortColumnLookup:o,columnHeaderTabIndexState:i,columnGroupHeaderTabIndexState:s,columnHeaderFocus:l,columnGroupHeaderFocus:c,headerGroupingMaxDepth:u,columnMenuState:d,columnVisibility:f,columnGroupsHeaderStructure:p,hasOtherElementInTabSequence:h},(y=t.slotProps)==null?void 0:y.columnHeaders))}const xRt=Vp(wRt),Qfe=v.createContext(void 0),Xfe=()=>{const e=v.useContext(Qfe);if(e===void 0)throw new Error(["MUI X: Could not find the Data Grid configuration context.","It looks like you rendered your component outside of a DataGrid, DataGridPro or DataGridPremium parent component.","This can also happen if you are bundling multiple versions of the Data Grid."].join(` +`));return e},SRt=or("div")({position:"absolute",top:"var(--DataGrid-headersTotalHeight)",left:0,width:"calc(100% - (var(--DataGrid-hasScrollY) * var(--DataGrid-scrollbarSize)))"}),CRt=or("div",{name:"MuiDataGrid",slot:"Main",overridesResolver:(e,t)=>t.main})({flexGrow:1,position:"relative",overflow:"hidden",display:"flex",flexDirection:"column"}),ERt=v.forwardRef((e,t)=>{const n=Ot(),o=Xfe().hooks.useGridAriaAttributes();return R.jsxs(CRt,W({ref:t,ownerState:n,className:e.className,tabIndex:-1},o,{children:[R.jsx(SRt,{role:"presentation","data-id":"gridPanelAnchor"}),e.children]}))}),PRt=()=>In({root:["topContainer"]},On,{}),TRt=or("div")({position:"sticky",zIndex:4,top:0});function IRt(e){const t=PRt();return R.jsx(TRt,W({},e,{className:de(t.root,le["container--top"]),role:"presentation"}))}const ORt=()=>In({root:["bottomContainer"]},On,{}),ARt=or("div")({position:"sticky",zIndex:4,bottom:"calc(var(--DataGrid-hasScrollX) * var(--DataGrid-scrollbarSize))"});function kRt(e){const t=ORt();return R.jsx(ARt,W({},e,{className:de(t.root,le["container--bottom"]),role:"presentation"}))}const MRt=(e,t)=>{const{classes:n}=e;return In({root:["virtualScrollerContent",t&&"virtualScrollerContent--overflowed"]},On,n)},RRt=or("div",{name:"MuiDataGrid",slot:"VirtualScrollerContent",overridesResolver:(e,t)=>t.virtualScrollerContent})({}),$Rt=v.forwardRef(function(t,n){var a;const r=Ot(),o=!r.autoHeight&&((a=t.style)==null?void 0:a.minHeight)==="auto",i=MRt(r,o);return R.jsx(RRt,W({ref:n},t,{ownerState:r,className:de(i.root,t.className)}))}),DRt=or("div")({display:"flex",flexDirection:"row",width:"var(--DataGrid-rowWidth)",boxSizing:"border-box"}),Jfe=or("div")({position:"sticky",height:"100%",boxSizing:"border-box",borderTop:"1px solid var(--rowBorderColor)",backgroundColor:"var(--DataGrid-pinnedBackground)"}),_Rt=or(Jfe)({left:0,borderRight:"1px solid var(--rowBorderColor)"}),NRt=or(Jfe)({right:0,borderLeft:"1px solid var(--rowBorderColor)"}),LRt=or("div")({flexGrow:1,borderTop:"1px solid var(--rowBorderColor)"});function FRt({rowsLength:e}){const t=En(),{viewportOuterSize:n,minimumSize:r,hasScrollX:o,hasScrollY:i,scrollbarSize:a,leftPinnedWidth:s,rightPinnedWidth:l}=Ye(t,Si),c=o?a:0,u=n.height-r.height>0;return c===0&&!u?null:R.jsxs(DRt,{className:le.filler,role:"presentation",style:{height:c,"--rowBorderColor":e===0?"transparent":"var(--DataGrid-rowBorderColor)"},children:[s>0&&R.jsx(_Rt,{className:le["filler--pinnedLeft"],style:{width:s}}),R.jsx(LRt,{}),l>0&&R.jsx(NRt,{className:le["filler--pinnedRight"],style:{width:l+(i?a:0)}})]})}const jRt=Vp(FRt),BRt=["className"],zRt=e=>{const{classes:t}=e;return In({root:["virtualScrollerRenderZone"]},On,t)},VRt=or("div",{name:"MuiDataGrid",slot:"VirtualScrollerRenderZone",overridesResolver:(e,t)=>t.virtualScrollerRenderZone})({position:"absolute",display:"flex",flexDirection:"column"}),HRt=v.forwardRef(function(t,n){const{className:r}=t,o=Dt(t,BRt),i=En(),a=Ot(),s=zRt(a),l=Ye(i,()=>{const c=eR(i);return S0(i.current.state).positions[c.firstRowIndex]??0});return R.jsx(VRt,W({ref:n,className:de(s.root,r),ownerState:a,style:{transform:`translate3d(0, ${l}px, 0)`}},o))}),URt={includeHeaders:!0,includeOutliers:!1,outliersFactor:1.5,expand:!1},Xo=e=>e.editRows,aC=e=>e.preferencePanel;var Ag=function(e){return e.filters="filters",e.columns="columns",e}(Ag||{});const WRt=(e,t)=>{const{classes:n}=e,r={root:["scrollbar",`scrollbar--${t}`],content:["scrollbarContent"]};return In(r,On,n)},Zfe=or("div")({position:"absolute",display:"inline-block",zIndex:6,"--size":"calc(max(var(--DataGrid-scrollbarSize), 14px))"}),GRt=or(Zfe)({width:"var(--size)",height:"calc(var(--DataGrid-hasScrollY) * (100% - var(--DataGrid-topContainerHeight) - var(--DataGrid-bottomContainerHeight) - var(--DataGrid-hasScrollX) * var(--DataGrid-scrollbarSize)))",overflowY:"auto",overflowX:"hidden",outline:0,"& > div":{width:"var(--size)"},top:"var(--DataGrid-topContainerHeight)",right:"0px"}),qRt=or(Zfe)({width:"100%",height:"var(--size)",overflowY:"hidden",overflowX:"auto",outline:0,"& > div":{height:"var(--size)"},bottom:"0px"}),PQ=v.forwardRef(function(t,n){const r=Gl(),o=Ot(),i=v.useRef(!1),a=v.useRef(0),s=v.useRef(null),l=v.useRef(null),c=WRt(o,t.position),u=Ye(r,Si),d=t.position==="vertical"?"height":"width",f=t.position==="vertical"?"scrollTop":"scrollLeft",p=t.position==="vertical"?u.hasScrollX:u.hasScrollY,h=u.minimumSize[d]+(p?u.scrollbarSize:0),y=(t.position==="vertical"?u.viewportInnerSize.height:u.viewportOuterSize.width)*(h/u.viewportOuterSize[d]),w=Ar(()=>{const E=r.current.virtualScrollerRef.current,P=s.current;if(!P||E[f]===a.current)return;if(a.current=E[f],i.current){i.current=!1;return}i.current=!0;const T=E[f]/h;P[f]=T*y}),x=Ar(()=>{const E=r.current.virtualScrollerRef.current,P=s.current;if(!P)return;if(i.current){i.current=!1;return}i.current=!0;const T=P[f]/y;E[f]=T*h});HM(()=>{const E=r.current.virtualScrollerRef.current,P=s.current;return E.addEventListener("scroll",w,{capture:!0}),P.addEventListener("scroll",x,{capture:!0}),()=>{E.removeEventListener("scroll",w,{capture:!0}),P.removeEventListener("scroll",x,{capture:!0})}}),v.useEffect(()=>{l.current.style.setProperty(d,`${y}px`)},[y,d]);const S=t.position==="vertical"?GRt:qRt;return R.jsx(S,{ref:Zg(n,s),className:c.root,style:t.position==="vertical"&&o.unstable_listView?{height:"100%",top:0}:void 0,tabIndex:-1,"aria-hidden":"true",children:R.jsx("div",{ref:l,className:c.content})})}),KRt=(e,t,n)=>{const{classes:r}=e,o={root:["main",t.rightPinnedWidth>0&&"main--hasPinnedRight",n==="skeleton"&&"main--hasSkeletonLoadingOverlay"],scroller:["virtualScroller",t.hasScrollX&&"virtualScroller--hasScrollX"]};return In(o,On,r)},YRt=or("div",{name:"MuiDataGrid",slot:"VirtualScroller",overridesResolver:(e,t)=>t.virtualScroller})({position:"relative",height:"100%",flexGrow:1,overflow:"scroll",scrollbarWidth:"none",display:"flex",flexDirection:"column","&::-webkit-scrollbar":{display:"none"},"@media print":{overflow:"hidden"},zIndex:0});function QRt(e){const t=En(),n=Ot(),r=Ye(t,Si),o=hRt(),i=KRt(n,r,o.loadingOverlayVariant),a=cRt(),{getContainerProps:s,getScrollerProps:l,getContentProps:c,getRenderZoneProps:u,getScrollbarVerticalProps:d,getScrollbarHorizontalProps:f,getRows:p}=a,h=p();return R.jsxs(ERt,W({className:i.root},s(),{children:[R.jsx(SQ,{scrollDirection:"left"}),R.jsx(SQ,{scrollDirection:"right"}),R.jsxs(YRt,W({className:i.scroller},l(),{ownerState:n,children:[R.jsxs(IRt,{children:[!n.unstable_listView&&R.jsx(xRt,{}),R.jsx(n.slots.pinnedRows,{position:"top",virtualScroller:a})]}),R.jsx(bRt,W({},o)),R.jsx($Rt,W({},c(),{children:R.jsxs(HRt,W({},u(),{children:[h,R.jsx(n.slots.detailPanels,{virtualScroller:a})]}))})),R.jsx(jRt,{rowsLength:h.length}),R.jsx(kRt,{children:R.jsx(n.slots.pinnedRows,{position:"bottom",virtualScroller:a})})]})),r.hasScrollY&&R.jsx(PQ,W({position:"vertical"},d())),r.hasScrollX&&!n.unstable_listView&&R.jsx(PQ,W({position:"horizontal"},f())),e.children]}))}function XRt(){var t;const e=Ot();return e.hideFooter?null:R.jsx(e.slots.footer,W({},(t=e.slotProps)==null?void 0:t.footer))}let P_;function JRt(){return P_===void 0&&document.createElement("div").focus({get preventScroll(){return P_=!0,!1}}),P_}function ZRt(e){return e.scrollHeight>e.clientHeight||e.scrollWidth>e.clientWidth}function WO(e,t){return e.closest(`.${t}`)}function zd(e){return e.replace(/["\\]/g,"\\$&")}function e$t(e,t){return e.querySelector(`[role="columnheader"][data-field="${zd(t)}"]`)}function epe(e){return`.${le.row}[data-id="${zd(String(e))}"]`}function t$t(e,t){return e.querySelector(epe(t))}function n$t(e,{id:t,field:n}){const r=epe(t),o=`.${le.cell}[data-field="${zd(n)}"]`,i=`${r} ${o}`;return e.querySelector(i)}function D1(e){return e.target.nodeType===1&&!e.currentTarget.contains(e.target)}function r$t(e){return e.getAttribute("data-field")}function o$t(e,t){return e.querySelector(`[data-field="${zd(t)}"]`)}function i$t(e){return e.getAttribute("data-fields").slice(2,-2).split("-|-")}function a$t(e,t){return Array.from(e.querySelectorAll(`[data-fields*="|-${zd(t)}-|"]`)??[])}function s$t(e,t){var a;if(!WO(e,le.root))throw new Error("MUI X: The root element is not found.");const r=e.getAttribute("aria-colindex");if(!r)return[];const o=Number(r)-1,i=[];return(a=t.virtualScrollerRef)!=null&&a.current?(rpe(t).forEach(s=>{const l=s.getAttribute("data-id");if(!l)return;let c=o;const u=t.unstable_getCellColSpanInfo(l,o);u&&u.spannedByColSpan&&(c=u.leftVisibleCellIndex);const d=s.querySelector(`[data-colindex="${c}"]`);d&&i.push(d)}),i):[]}function TQ(e,t){return e.rootElementRef.current.querySelector(`.${le[t]}`)}const tpe=({api:e,colIndex:t,position:n,filterFn:r})=>{if(t===null)return[];const o=[];return rpe(e).forEach(i=>{i.getAttribute("data-id")&&i.querySelectorAll(`.${le[n==="left"?"cell--pinnedLeft":"cell--pinnedRight"]}`).forEach(s=>{const l=C0(s);l!==null&&r(l)&&o.push(s)})}),o};function l$t(e,t,n){const r=C0(t);return tpe({api:e,colIndex:r,position:n?"right":"left",filterFn:o=>n?or})}function c$t(e,t,n){const r=C0(t);return tpe({api:e,colIndex:r,position:n?"left":"right",filterFn:o=>n?o>r:o{var i;if(!((i=e.columnHeadersContainerRef)!=null&&i.current))return[];if(t===null)return[];const o=[];return e.columnHeadersContainerRef.current.querySelectorAll(`.${le[n==="left"?"columnHeader--pinnedLeft":"columnHeader--pinnedRight"]}`).forEach(a=>{const s=C0(a);s!==null&&r(s)&&o.push(a)}),o};function u$t(e,t,n){const r=C0(t);return npe({api:e,position:n?"right":"left",colIndex:r,filterFn:o=>n?or})}function d$t(e,t,n){const r=C0(t);return npe({api:e,position:n?"left":"right",colIndex:r,filterFn:o=>n?o>r:o div > [data-field="${zd(t)}"][role="columnheader"]`)}function p$t(e,t){const n=e.virtualScrollerRef.current;return Array.from(n.querySelectorAll(`:scope > div > div > div > [data-field="${zd(t)}"][role="gridcell"]`))}function rpe(e){return e.virtualScrollerRef.current.querySelectorAll(`:scope > div > div > .${le.row}`)}function C0(e){const t=e.getAttribute("aria-colindex");return t?Number(t)-1:null}class CT extends Error{}function h$t(e,t){const n=v.useCallback(f=>({field:f,colDef:e.current.getColumn(f)}),[e]),r=v.useCallback(f=>{const p=e.current.getRow(f);if(!p)throw new CT(`No row with id #${f} found`);return{id:f,columns:e.current.getAllColumns(),row:p}},[e]),o=v.useCallback((f,p)=>{const h=t.unstable_listView?hb(e.current.state):e.current.getColumn(p),m=e.current.getRow(f),y=e.current.getRowNode(f);if(!m||!y)throw new CT(`No row with id #${f} found`);const w=m[p],x=h!=null&&h.valueGetter?h.valueGetter(w,m,h,e):w,S=ts(e),E=tH(e),P={id:f,field:p,row:m,rowNode:y,colDef:h,cellMode:e.current.getCellMode(f,p),hasFocus:S!==null&&S.field===p&&S.id===f,tabIndex:E&&E.field===p&&E.id===f?0:-1,value:x,formattedValue:x,isEditable:!1,api:{}};return h&&h.valueFormatter&&(P.formattedValue=h.valueFormatter(x,m,h,e)),P.isEditable=h&&e.current.isCellEditable(P),P},[e,t.unstable_listView]),i=v.useCallback((f,p)=>{const h=e.current.getColumn(p),m=e.current.getRow(f);if(!m)throw new CT(`No row with id #${f} found`);return!h||!h.valueGetter?m[p]:h.valueGetter(m[h.field],m,h,e)},[e]),a=v.useCallback((f,p)=>{const h=p.field;if(!p||!p.valueGetter)return f[h];const m=f[p.field];return p.valueGetter(m,f,p,e)},[e]),s=v.useCallback((f,p)=>{const h=a(f,p);return!p||!p.valueFormatter?h:p.valueFormatter(h,f,p,e)},[e,a]),l=v.useCallback(f=>e.current.rootElementRef.current?e$t(e.current.rootElementRef.current,f):null,[e]),c=v.useCallback(f=>e.current.rootElementRef.current?t$t(e.current.rootElementRef.current,f):null,[e]),u=v.useCallback((f,p)=>e.current.rootElementRef.current?n$t(e.current.rootElementRef.current,{id:f,field:p}):null,[e]);ln(e,{getCellValue:i,getCellParams:o,getCellElement:u,getRowValue:a,getRowFormattedValue:s,getRowParams:r,getRowElement:c,getColumnHeaderParams:n,getColumnHeaderElement:l},"public")}const tR=(e,t,n,r,o)=>{const i=t===n-1;return e===br.LEFT&&i?!0:r?e===br.LEFT?!0:e===br.RIGHT?!i:!i||o:!1},nR=(e,t)=>e===br.RIGHT&&t===0,g$t=["column","rowId","editCellState","align","children","colIndex","width","className","style","gridHasScrollX","colSpan","disableDragEvents","isNotVisible","pinnedOffset","pinnedPosition","sectionIndex","sectionLength","gridHasFiller","onClick","onDoubleClick","onMouseDown","onMouseUp","onMouseOver","onKeyDown","onKeyUp","onDragEnter","onDragOver"],m$t=["changeReason","unstable_updateValueOnRender"];let Ea=function(e){return e[e.NONE=0]="NONE",e[e.LEFT=1]="LEFT",e[e.RIGHT=2]="RIGHT",e[e.VIRTUAL=3]="VIRTUAL",e}({});const ope={[Ea.LEFT]:br.LEFT,[Ea.RIGHT]:br.RIGHT,[Ea.NONE]:void 0,[Ea.VIRTUAL]:void 0},IQ={id:-1,field:"__unset__",row:{},rowNode:{id:-1,depth:0,type:"leaf",parent:-1,groupingKey:null},colDef:{type:"string",field:"__unset__",computedWidth:0},cellMode:ar.View,hasFocus:!1,tabIndex:-1,value:null,formattedValue:"__unset__",isEditable:!1,api:{}},y$t=e=>{const{align:t,showLeftBorder:n,showRightBorder:r,pinnedPosition:o,isEditable:i,isSelected:a,isSelectionMode:s,classes:l}=e,c={root:["cell",`cell--text${O1(t)}`,a&&"selected",i&&"cell--editable",n&&"cell--withLeftBorder",r&&"cell--withRightBorder",o===Ea.LEFT&&"cell--pinnedLeft",o===Ea.RIGHT&&"cell--pinnedRight",s&&!i&&"cell--selectionMode"]};return In(c,On,l)},v$t=v.forwardRef(function(t,n){var et,Et,An;const{column:r,rowId:o,editCellState:i,align:a,colIndex:s,width:l,className:c,style:u,colSpan:d,disableDragEvents:f,isNotVisible:p,pinnedOffset:h,pinnedPosition:m,sectionIndex:y,sectionLength:w,gridHasFiller:x,onClick:S,onDoubleClick:E,onMouseDown:P,onMouseUp:T,onMouseOver:I,onKeyDown:A,onKeyUp:k,onDragEnter:O,onDragOver:$}=t,N=Dt(t,g$t),L=En(),j=Ot(),D=dr(),_=r.field,z=Ye(L,()=>{try{const Ke=L.current.getCellParams(o,_);return Ke.api=L.current,Ke}catch(Ke){if(Ke instanceof CT)return IQ;throw Ke}},ife),F=Ye(L,()=>L.current.unstable_applyPipeProcessors("isCellSelected",!1,{id:o,field:_})),V=Ye(L,qfe),U=Ye(L,iRt),{cellMode:K,hasFocus:X,isEditable:ie=!1,value:ee}=z,Q=r.type==="actions"&&((et=r.getActions)==null?void 0:et.call(r,L.current.getRowParams(o)).some(Ke=>!Ke.props.disabled)),te=(K==="view"||!ie)&&!Q?z.tabIndex:-1,{classes:pe,getCellClassName:ae}=j,oe=[Ye(L,()=>L.current.unstable_applyPipeProcessors("cellClassName",[],{id:o,field:_}).filter(Boolean).join(" "))];r.cellClassName&&oe.push(typeof r.cellClassName=="function"?r.cellClassName(z):r.cellClassName),r.display==="flex"&&oe.push(le["cell--flex"]),ae&&oe.push(ae(z));const fe=z.formattedValue??ee,Z=v.useRef(null),ce=Zg(n,Z),ge=v.useRef(null),we=j.cellSelection??!1,me=ope[m],Se=nR(me,y),xe=tR(me,y,w,j.showCellVerticalBorder,x),ke={align:a,showLeftBorder:Se,showRightBorder:xe,isEditable:ie,classes:j.classes,pinnedPosition:m,isSelected:F,isSelectionMode:we},De=y$t(ke),_e=v.useCallback(Ke=>$e=>{const Qe=L.current.getCellParams(o,_||"");L.current.publishEvent(Ke,Qe,$e),T&&T($e)},[L,_,T,o]),ye=v.useCallback(Ke=>$e=>{const Qe=L.current.getCellParams(o,_||"");L.current.publishEvent(Ke,Qe,$e),P&&P($e)},[L,_,P,o]),Pe=v.useCallback((Ke,$e)=>Qe=>{if(!L.current.getRow(o))return;const Tt=L.current.getCellParams(o,_||"");L.current.publishEvent(Ke,Tt,Qe),$e&&$e(Qe)},[L,_,o]),Ae=((Et=V[o])==null?void 0:Et[_])??!1,Me=((An=U[o])==null?void 0:An[_])??1,We=v.useMemo(()=>{if(p)return{padding:0,opacity:0,width:0,border:0};const Ke=W({"--width":`${l}px`},u),$e=m===Ea.LEFT,Qe=m===Ea.RIGHT;if($e||Qe){let Tt=$e?"left":"right";D&&(Tt=$e?"right":"left"),Ke[Tt]=h}return Me>1&&(Ke.height=`calc(var(--height) * ${Me})`,Ke.zIndex=5),Ke},[l,p,u,h,m,D,Me]);if(v.useEffect(()=>{if(!X||K===ar.Edit)return;const Ke=ep(L.current.rootElementRef.current);if(Z.current&&!Z.current.contains(Ke.activeElement)){const $e=Z.current.querySelector('[tabindex="0"]'),Qe=ge.current||$e||Z.current;if(JRt())Qe.focus({preventScroll:!0});else{const Tt=L.current.getScrollPosition();Qe.focus(),L.current.scroll(Tt)}}},[X,K,L]),Ae)return R.jsx("div",{"data-colindex":s,role:"presentation",style:W({width:"var(--width)"},We)});if(z===IQ)return null;let He=N.onFocus,Xe,gt;if(i===null&&r.renderCell&&(Xe=r.renderCell(z)),i!==null&&r.renderEditCell){const Ke=L.current.getRowWithUpdatedValues(o,r.field),$e=Dt(i,m$t),Qe=r.valueFormatter?r.valueFormatter(i.value,Ke,r,L):z.formattedValue,Tt=W({},z,{row:Ke,formattedValue:Qe},$e);Xe=r.renderEditCell(Tt),oe.push(le["cell--editing"]),oe.push(pe==null?void 0:pe["cell--editing"])}if(Xe===void 0){const Ke=fe==null?void 0:fe.toString();Xe=Ke,gt=Ke}v.isValidElement(Xe)&&Q&&(Xe=v.cloneElement(Xe,{focusElementRef:ge}));const st=f?null:{onDragEnter:Pe("cellDragEnter",O),onDragOver:Pe("cellDragOver",$)};return R.jsx("div",W({ref:ce,className:de(De.root,oe,c),role:"gridcell","data-field":_,"data-colindex":s,"aria-colindex":s+1,"aria-colspan":d,"aria-rowspan":Me,style:We,title:gt,tabIndex:te,onClick:Pe("cellClick",S),onDoubleClick:Pe("cellDoubleClick",E),onMouseOver:Pe("cellMouseOver",I),onMouseDown:ye("cellMouseDown"),onMouseUp:_e("cellMouseUp"),onKeyDown:Pe("cellKeyDown",A),onKeyUp:Pe("cellKeyUp",k)},st,N,{onFocus:He,children:Xe}))}),b$t=Vp(v$t),w$t=["label","icon","showInMenu","onClick"],x$t=["label","icon","showInMenu","onClick","closeMenuOnClick","closeMenu"],$P=v.forwardRef((e,t)=>{var u;const n=Ot();if(!e.showInMenu){const{label:d,icon:f,onClick:p}=e,h=Dt(e,w$t),m=y=>{p==null||p(y)};return R.jsx(n.slots.baseIconButton,W({ref:t,size:"small",role:"menuitem","aria-label":d},h,{onClick:m},(u=n.slotProps)==null?void 0:u.baseIconButton,{children:v.cloneElement(f,{fontSize:"small"})}))}const{label:r,icon:o,onClick:i,closeMenuOnClick:a=!0,closeMenu:s}=e,l=Dt(e,x$t),c=d=>{i==null||i(d),a&&(s==null||s())};return R.jsxs(rn,W({ref:t},l,{onClick:c,children:[o&&R.jsx(sa,{children:o}),r]}))}),S$t=["field","type","align","width","height","empty","style","className"],OQ="1.3em",C$t="1.2em",AQ=[40,80],E$t={number:[40,60],string:[40,80],date:[40,60],dateTime:[60,80],singleSelect:[40,80]},P$t=e=>{const{align:t,classes:n,empty:r}=e,o={root:["cell","cellSkeleton",`cell--text${t?O1(t):"Left"}`,r&&"cellEmpty"]};return In(o,On,n)},T$t=HAt(12345);function I$t(e){const{field:t,type:n,align:r,width:o,height:i,empty:a=!1,style:s,className:l}=e,c=Dt(e,S$t),d={classes:Ot().classes,align:r,empty:a},f=P$t(d),p=v.useMemo(()=>{if(n==="boolean"||n==="actions")return{variant:"circular",width:OQ,height:OQ};const[m,y]=n?E$t[n]??AQ:AQ;return{variant:"text",width:`${Math.round(T$t(m,y))}%`,height:C$t}},[n]);return R.jsx("div",W({"data-field":t,className:de(f.root,l),style:W({height:i,maxWidth:o,minWidth:o},s)},c,{children:!a&&R.jsx(sT,W({},p))}))}const O$t=Vp(I$t);function A$t(e){return e.vars?e.vars.palette.TableCell.border:e.palette.mode==="light"?xd(St(e.palette.divider,1),.88):wd(St(e.palette.divider,1),.68)}const kQ={[`& .${le.iconButtonContainer}`]:{visibility:"visible",width:"auto"},[`& .${le.menuIcon}`]:{width:"auto",visibility:"visible"}},k$t=10,DP=-5,Gm=1,MQ={width:3,rx:1.5,x:10.5},M$t="/* emotion-disable-server-rendering-unsafe-selector-warning-please-do-not-use-this-the-warning-exists-for-a-reason */",R$t=re("div",{name:"MuiDataGrid",slot:"Root",overridesResolver:(e,t)=>[{[`&.${le.autoHeight}`]:t.autoHeight},{[`&.${le.aggregationColumnHeader}`]:t.aggregationColumnHeader},{[`&.${le["aggregationColumnHeader--alignLeft"]}`]:t["aggregationColumnHeader--alignLeft"]},{[`&.${le["aggregationColumnHeader--alignCenter"]}`]:t["aggregationColumnHeader--alignCenter"]},{[`&.${le["aggregationColumnHeader--alignRight"]}`]:t["aggregationColumnHeader--alignRight"]},{[`&.${le.aggregationColumnHeaderLabel}`]:t.aggregationColumnHeaderLabel},{[`&.${le["root--disableUserSelection"]} .${le.cell}`]:t["root--disableUserSelection"]},{[`&.${le.autosizing}`]:t.autosizing},{[`& .${le.editBooleanCell}`]:t.editBooleanCell},{[`& .${le.cell}`]:t.cell},{[`& .${le["cell--editing"]}`]:t["cell--editing"]},{[`& .${le["cell--textCenter"]}`]:t["cell--textCenter"]},{[`& .${le["cell--textLeft"]}`]:t["cell--textLeft"]},{[`& .${le["cell--textRight"]}`]:t["cell--textRight"]},{[`& .${le["cell--rangeTop"]}`]:t["cell--rangeTop"]},{[`& .${le["cell--rangeBottom"]}`]:t["cell--rangeBottom"]},{[`& .${le["cell--rangeLeft"]}`]:t["cell--rangeLeft"]},{[`& .${le["cell--rangeRight"]}`]:t["cell--rangeRight"]},{[`& .${le["cell--withRightBorder"]}`]:t["cell--withRightBorder"]},{[`& .${le.cellCheckbox}`]:t.cellCheckbox},{[`& .${le.cellSkeleton}`]:t.cellSkeleton},{[`& .${le.checkboxInput}`]:t.checkboxInput},{[`& .${le["columnHeader--alignCenter"]}`]:t["columnHeader--alignCenter"]},{[`& .${le["columnHeader--alignLeft"]}`]:t["columnHeader--alignLeft"]},{[`& .${le["columnHeader--alignRight"]}`]:t["columnHeader--alignRight"]},{[`& .${le["columnHeader--dragging"]}`]:t["columnHeader--dragging"]},{[`& .${le["columnHeader--moving"]}`]:t["columnHeader--moving"]},{[`& .${le["columnHeader--numeric"]}`]:t["columnHeader--numeric"]},{[`& .${le["columnHeader--sortable"]}`]:t["columnHeader--sortable"]},{[`& .${le["columnHeader--sorted"]}`]:t["columnHeader--sorted"]},{[`& .${le["columnHeader--withRightBorder"]}`]:t["columnHeader--withRightBorder"]},{[`& .${le.columnHeader}`]:t.columnHeader},{[`& .${le.headerFilterRow}`]:t.headerFilterRow},{[`& .${le.columnHeaderCheckbox}`]:t.columnHeaderCheckbox},{[`& .${le.columnHeaderDraggableContainer}`]:t.columnHeaderDraggableContainer},{[`& .${le.columnHeaderTitleContainer}`]:t.columnHeaderTitleContainer},{[`& .${le["columnSeparator--resizable"]}`]:t["columnSeparator--resizable"]},{[`& .${le["columnSeparator--resizing"]}`]:t["columnSeparator--resizing"]},{[`& .${le.columnSeparator}`]:t.columnSeparator},{[`& .${le.filterIcon}`]:t.filterIcon},{[`& .${le.iconSeparator}`]:t.iconSeparator},{[`& .${le.menuIcon}`]:t.menuIcon},{[`& .${le.menuIconButton}`]:t.menuIconButton},{[`& .${le.menuOpen}`]:t.menuOpen},{[`& .${le.menuList}`]:t.menuList},{[`& .${le["row--editable"]}`]:t["row--editable"]},{[`& .${le["row--editing"]}`]:t["row--editing"]},{[`& .${le["row--dragging"]}`]:t["row--dragging"]},{[`& .${le.row}`]:t.row},{[`& .${le.rowReorderCellPlaceholder}`]:t.rowReorderCellPlaceholder},{[`& .${le.rowReorderCell}`]:t.rowReorderCell},{[`& .${le["rowReorderCell--draggable"]}`]:t["rowReorderCell--draggable"]},{[`& .${le.sortIcon}`]:t.sortIcon},{[`& .${le.withBorderColor}`]:t.withBorderColor},{[`& .${le.treeDataGroupingCell}`]:t.treeDataGroupingCell},{[`& .${le.treeDataGroupingCellToggle}`]:t.treeDataGroupingCellToggle},{[`& .${le.treeDataGroupingCellLoadingContainer}`]:t.treeDataGroupingCellLoadingContainer},{[`& .${le.groupingCriteriaCellLoadingContainer}`]:t.groupingCriteriaCellLoadingContainer},{[`& .${le.detailPanelToggleCell}`]:t.detailPanelToggleCell},{[`& .${le["detailPanelToggleCell--expanded"]}`]:t["detailPanelToggleCell--expanded"]},t.root]})(({theme:e})=>{var A,k;const t=Gl(),n=Ye(t,Si),r=A$t(e),o=e.shape.borderRadius,i=e.vars?e.vars.palette.background.default:((A=e.mixins.MuiDataGrid)==null?void 0:A.containerBackground)??e.palette.background.default,a=((k=e.mixins.MuiDataGrid)==null?void 0:k.pinnedBackground)??i,s=e.vars?`rgba(${e.vars.palette.background.defaultChannel} / ${e.vars.palette.action.disabledOpacity})`:St(e.palette.background.default,e.palette.action.disabledOpacity),l=(e.vars||e).palette.action.hoverOpacity,c=(e.vars||e).palette.action.hover,u=(e.vars||e).palette.action.selectedOpacity,d=e.vars?`calc(${l} + ${u})`:l+u,f=e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${u})`:St(e.palette.primary.main,u),p=e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${d})`:St(e.palette.primary.main,d),h=e.vars?_$t:$$t,m=O=>({[`& .${le["cell--pinnedLeft"]}, & .${le["cell--pinnedRight"]}`]:{backgroundColor:O,"&.Mui-selected":{backgroundColor:h(O,f,u),"&:hover":{backgroundColor:h(O,f,d)}}}}),y=h(a,c,l),w=m(y),x=h(a,f,u),S=m(x),E=h(a,p,d),P=m(E),T={backgroundColor:f,"&:hover":{backgroundColor:p,"@media (hover: none)":{backgroundColor:f}}};return W({"--unstable_DataGrid-radius":typeof o=="number"?`${o}px`:o,"--unstable_DataGrid-headWeight":e.typography.fontWeightMedium,"--unstable_DataGrid-overlayBackground":s,"--DataGrid-containerBackground":i,"--DataGrid-pinnedBackground":a,"--DataGrid-rowBorderColor":r,"--DataGrid-cellOffsetMultiplier":2,"--DataGrid-width":"0px","--DataGrid-hasScrollX":"0","--DataGrid-hasScrollY":"0","--DataGrid-scrollbarSize":"10px","--DataGrid-rowWidth":"0px","--DataGrid-columnsTotalWidth":"0px","--DataGrid-leftPinnedWidth":"0px","--DataGrid-rightPinnedWidth":"0px","--DataGrid-headerHeight":"0px","--DataGrid-headersTotalHeight":"0px","--DataGrid-topContainerHeight":"0px","--DataGrid-bottomContainerHeight":"0px",flex:1,boxSizing:"border-box",position:"relative",borderWidth:"1px",borderStyle:"solid",borderColor:r,borderRadius:"var(--unstable_DataGrid-radius)",color:(e.vars||e).palette.text.primary},e.typography.body2,{outline:"none",height:"100%",display:"flex",minWidth:0,minHeight:0,flexDirection:"column",overflow:"hidden",overflowAnchor:"none",[`.${le.main} > *:first-child${M$t}`]:{borderTopLeftRadius:"var(--unstable_DataGrid-radius)",borderTopRightRadius:"var(--unstable_DataGrid-radius)"},[`&.${le.autoHeight}`]:{height:"auto"},[`&.${le.autosizing}`]:{[`& .${le.columnHeaderTitleContainerContent} > *`]:{overflow:"visible !important"},"@media (hover: hover)":{[`& .${le.iconButtonContainer}`]:{width:"0 !important",visibility:"hidden !important"},[`& .${le.menuIcon}`]:{width:"0 !important",visibility:"hidden !important"}},[`& .${le.cell}`]:{overflow:"visible !important",whiteSpace:"nowrap",minWidth:"max-content !important",maxWidth:"max-content !important"},[`& .${le.groupingCriteriaCell}`]:{width:"unset"},[`& .${le.treeDataGroupingCell}`]:{width:"unset"}},[`& .${le.columnHeader}, & .${le.cell}`]:{WebkitTapHighlightColor:"transparent",padding:"0 10px",boxSizing:"border-box"},[`& .${le.columnHeader}:focus-within, & .${le.cell}:focus-within`]:{outline:`solid ${e.vars?`rgba(${e.vars.palette.primary.mainChannel} / 0.5)`:St(e.palette.primary.main,.5)} ${Gm}px`,outlineOffset:Gm*-1},[`& .${le.columnHeader}:focus, & .${le.cell}:focus`]:{outline:`solid ${e.palette.primary.main} ${Gm}px`,outlineOffset:Gm*-1},[`& .${le.columnHeader}:focus, & .${le["columnHeader--withLeftBorder"]}, & .${le["columnHeader--withRightBorder"]}, & .${le["columnHeader--siblingFocused"]}, & .${le["virtualScroller--hasScrollX"]} .${le["columnHeader--lastUnpinned"]}, & .${le["virtualScroller--hasScrollX"]} .${le["columnHeader--last"]} - `]:{[`& .${le.columnSeparator}`]:{opacity:0},"@media (hover: none)":{[`& .${le["columnSeparator--resizable"]}`]:{opacity:1}},[`& .${le["columnSeparator--resizable"]}:hover`]:{opacity:1}},[`&.${le["root--noToolbar"]} [aria-rowindex="1"] [aria-colindex="1"]`]:{borderTopLeftRadius:"calc(var(--unstable_DataGrid-radius) - 1px)"},[`&.${le["root--noToolbar"]} [aria-rowindex="1"] .${le["columnHeader--last"]}`]:{borderTopRightRadius:n.hasScrollX&&(!n.hasScrollY||n.scrollbarSize===0)?"calc(var(--unstable_DataGrid-radius) - 1px)":void 0},[`& .${le.columnHeaderCheckbox}, & .${le.cellCheckbox}`]:{padding:0,justifyContent:"center",alignItems:"center"},[`& .${le.columnHeader}`]:{position:"relative",display:"flex",alignItems:"center"},[`& .${le["virtualScroller--hasScrollX"]} .${le["columnHeader--last"]}`]:{overflow:"hidden"},[`& .${le["columnHeader--sorted"]} .${le.iconButtonContainer}, & .${le["columnHeader--filtered"]} .${le.iconButtonContainer}`]:{visibility:"visible",width:"auto"},[`& .${le.columnHeader}:not(.${le["columnHeader--sorted"]}) .${le.sortIcon}`]:{opacity:0,transition:e.transitions.create(["opacity"],{duration:e.transitions.duration.shorter})},[`& .${le.columnHeaderTitleContainer}`]:{display:"flex",alignItems:"center",gap:e.spacing(.25),minWidth:0,flex:1,whiteSpace:"nowrap",overflow:"hidden"},[`& .${le.columnHeaderTitleContainerContent}`]:{overflow:"hidden",display:"flex",alignItems:"center"},[`& .${le["columnHeader--filledGroup"]} .${le.columnHeaderTitleContainer}`]:{borderBottomWidth:"1px",borderBottomStyle:"solid",boxSizing:"border-box"},[`& .${le.sortIcon}, & .${le.filterIcon}`]:{fontSize:"inherit"},[`& .${le["columnHeader--sortable"]}`]:{cursor:"pointer"},[`& .${le["columnHeader--alignCenter"]} .${le.columnHeaderTitleContainer}`]:{justifyContent:"center"},[`& .${le["columnHeader--alignRight"]} .${le.columnHeaderDraggableContainer}, & .${le["columnHeader--alignRight"]} .${le.columnHeaderTitleContainer}`]:{flexDirection:"row-reverse"},[`& .${le["columnHeader--alignCenter"]} .${le.menuIcon}`]:{marginLeft:"auto"},[`& .${le["columnHeader--alignRight"]} .${le.menuIcon}`]:{marginRight:"auto",marginLeft:-5},[`& .${le["columnHeader--moving"]}`]:{backgroundColor:(e.vars||e).palette.action.hover},[`& .${le["columnHeader--pinnedLeft"]}, & .${le["columnHeader--pinnedRight"]}`]:{position:"sticky",zIndex:4,background:"var(--DataGrid-pinnedBackground)"},[`& .${le.columnSeparator}`]:{position:"absolute",overflow:"hidden",zIndex:3,display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",maxWidth:qRt,color:r},[`& .${le.columnHeaders}`]:{width:"var(--DataGrid-rowWidth)"},"@media (hover: hover)":{[`& .${le.columnHeader}:hover`]:PQ,[`& .${le.columnHeader}:not(.${le["columnHeader--sorted"]}):hover .${le.sortIcon}`]:{opacity:.5}},"@media (hover: none)":{[`& .${le.columnHeader}`]:PQ,[`& .${le.columnHeader}:focus, - & .${le["columnHeader--siblingFocused"]}`]:{[`.${le["columnSeparator--resizable"]}`]:{color:(e.vars||e).palette.primary.main}}},[`& .${le["columnSeparator--sideLeft"]}`]:{left:CP},[`& .${le["columnSeparator--sideRight"]}`]:{right:CP},[`& .${le["columnHeader--withRightBorder"]} .${le["columnSeparator--sideLeft"]}`]:{left:CP-.5},[`& .${le["columnHeader--withRightBorder"]} .${le["columnSeparator--sideRight"]}`]:{right:CP-.5},[`& .${le["columnSeparator--resizable"]}`]:{cursor:"col-resize",touchAction:"none",[`&.${le["columnSeparator--resizing"]}`]:{color:(e.vars||e).palette.primary.main},"@media (hover: none)":{[`& .${le.iconSeparator} rect`]:TQ},"@media (hover: hover)":{"&:hover":{color:(e.vars||e).palette.primary.main,[`& .${le.iconSeparator} rect`]:TQ}},"& svg":{pointerEvents:"none"}},[`& .${le.iconSeparator}`]:{color:"inherit",transition:e.transitions.create(["color","width"],{duration:e.transitions.duration.shortest})},[`& .${le.menuIcon}`]:{width:0,visibility:"hidden",fontSize:20,marginRight:-5,display:"flex",alignItems:"center"},[`.${le.menuOpen}`]:{visibility:"visible",width:"auto"},[`& .${le.headerFilterRow}`]:{[`& .${le.columnHeader}`]:{boxSizing:"border-box",borderBottom:"1px solid var(--DataGrid-rowBorderColor)"}},[`& .${le["row--borderBottom"]} .${le.columnHeader}, + `]:{[`& .${le.columnSeparator}`]:{opacity:0},"@media (hover: none)":{[`& .${le["columnSeparator--resizable"]}`]:{opacity:1}},[`& .${le["columnSeparator--resizable"]}:hover`]:{opacity:1}},[`&.${le["root--noToolbar"]} [aria-rowindex="1"] [aria-colindex="1"]`]:{borderTopLeftRadius:"calc(var(--unstable_DataGrid-radius) - 1px)"},[`&.${le["root--noToolbar"]} [aria-rowindex="1"] .${le["columnHeader--last"]}`]:{borderTopRightRadius:n.hasScrollX&&(!n.hasScrollY||n.scrollbarSize===0)?"calc(var(--unstable_DataGrid-radius) - 1px)":void 0},[`& .${le.columnHeaderCheckbox}, & .${le.cellCheckbox}`]:{padding:0,justifyContent:"center",alignItems:"center"},[`& .${le.columnHeader}`]:{position:"relative",display:"flex",alignItems:"center"},[`& .${le["virtualScroller--hasScrollX"]} .${le["columnHeader--last"]}`]:{overflow:"hidden"},[`& .${le["columnHeader--sorted"]} .${le.iconButtonContainer}, & .${le["columnHeader--filtered"]} .${le.iconButtonContainer}`]:{visibility:"visible",width:"auto"},[`& .${le.columnHeader}:not(.${le["columnHeader--sorted"]}) .${le.sortIcon}`]:{opacity:0,transition:e.transitions.create(["opacity"],{duration:e.transitions.duration.shorter})},[`& .${le.columnHeaderTitleContainer}`]:{display:"flex",alignItems:"center",gap:e.spacing(.25),minWidth:0,flex:1,whiteSpace:"nowrap",overflow:"hidden"},[`& .${le.columnHeaderTitleContainerContent}`]:{overflow:"hidden",display:"flex",alignItems:"center"},[`& .${le["columnHeader--filledGroup"]} .${le.columnHeaderTitleContainer}`]:{borderBottomWidth:"1px",borderBottomStyle:"solid",boxSizing:"border-box"},[`& .${le.sortIcon}, & .${le.filterIcon}`]:{fontSize:"inherit"},[`& .${le["columnHeader--sortable"]}`]:{cursor:"pointer"},[`& .${le["columnHeader--alignCenter"]} .${le.columnHeaderTitleContainer}`]:{justifyContent:"center"},[`& .${le["columnHeader--alignRight"]} .${le.columnHeaderDraggableContainer}, & .${le["columnHeader--alignRight"]} .${le.columnHeaderTitleContainer}`]:{flexDirection:"row-reverse"},[`& .${le["columnHeader--alignCenter"]} .${le.menuIcon}`]:{marginLeft:"auto"},[`& .${le["columnHeader--alignRight"]} .${le.menuIcon}`]:{marginRight:"auto",marginLeft:-5},[`& .${le["columnHeader--moving"]}`]:{backgroundColor:(e.vars||e).palette.action.hover},[`& .${le["columnHeader--pinnedLeft"]}, & .${le["columnHeader--pinnedRight"]}`]:{position:"sticky",zIndex:4,background:"var(--DataGrid-pinnedBackground)"},[`& .${le.columnSeparator}`]:{position:"absolute",overflow:"hidden",zIndex:3,display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",maxWidth:k$t,color:r},[`& .${le.columnHeaders}`]:{width:"var(--DataGrid-rowWidth)"},"@media (hover: hover)":{[`& .${le.columnHeader}:hover`]:kQ,[`& .${le.columnHeader}:not(.${le["columnHeader--sorted"]}):hover .${le.sortIcon}`]:{opacity:.5}},"@media (hover: none)":{[`& .${le.columnHeader}`]:kQ,[`& .${le.columnHeader}:focus, + & .${le["columnHeader--siblingFocused"]}`]:{[`.${le["columnSeparator--resizable"]}`]:{color:(e.vars||e).palette.primary.main}}},[`& .${le["columnSeparator--sideLeft"]}`]:{left:DP},[`& .${le["columnSeparator--sideRight"]}`]:{right:DP},[`& .${le["columnHeader--withRightBorder"]} .${le["columnSeparator--sideLeft"]}`]:{left:DP-.5},[`& .${le["columnHeader--withRightBorder"]} .${le["columnSeparator--sideRight"]}`]:{right:DP-.5},[`& .${le["columnSeparator--resizable"]}`]:{cursor:"col-resize",touchAction:"none",[`&.${le["columnSeparator--resizing"]}`]:{color:(e.vars||e).palette.primary.main},"@media (hover: none)":{[`& .${le.iconSeparator} rect`]:MQ},"@media (hover: hover)":{"&:hover":{color:(e.vars||e).palette.primary.main,[`& .${le.iconSeparator} rect`]:MQ}},"& svg":{pointerEvents:"none"}},[`& .${le.iconSeparator}`]:{color:"inherit",transition:e.transitions.create(["color","width"],{duration:e.transitions.duration.shortest})},[`& .${le.menuIcon}`]:{width:0,visibility:"hidden",fontSize:20,marginRight:-5,display:"flex",alignItems:"center"},[`.${le.menuOpen}`]:{visibility:"visible",width:"auto"},[`& .${le.headerFilterRow}`]:{[`& .${le.columnHeader}`]:{boxSizing:"border-box",borderBottom:"1px solid var(--DataGrid-rowBorderColor)"}},[`& .${le["row--borderBottom"]} .${le.columnHeader}, & .${le["row--borderBottom"]} .${le.filler}, - & .${le["row--borderBottom"]} .${le.scrollbarFiller}`]:{borderBottom:"1px solid var(--DataGrid-rowBorderColor)"},[`& .${le["row--borderBottom"]} .${le.cell}`]:{borderBottom:"1px solid var(--rowBorderColor)"},[`.${le.row}`]:{display:"flex",width:"var(--DataGrid-rowWidth)",breakInside:"avoid","--rowBorderColor":"var(--DataGrid-rowBorderColor)",[`&.${le["row--firstVisible"]}`]:{"--rowBorderColor":"transparent"},"&:hover":{backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${le.rowSkeleton}:hover`]:{backgroundColor:"transparent"},"&.Mui-selected":T},[`& .${le["container--top"]}, & .${le["container--bottom"]}`]:{"[role=row]":{background:"var(--DataGrid-containerBackground)"}},[`& .${le.cell}`]:{flex:"0 0 auto",height:"var(--height)",width:"var(--width)",lineHeight:"calc(var(--height) - 1px)",boxSizing:"border-box",borderTop:"1px solid var(--rowBorderColor)",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis","&.Mui-selected":T},[`& .${le["virtualScrollerContent--overflowed"]} .${le["row--lastVisible"]} .${le.cell}`]:{borderTopColor:"transparent"},[`& .${le["pinnedRows--top"]} :first-of-type`]:{[`& .${le.cell}, .${le.scrollbarFiller}`]:{borderTop:"none"}},[`&.${le["root--disableUserSelection"]} .${le.cell}`]:{userSelect:"none"},[`& .${le["row--dynamicHeight"]} > .${le.cell}`]:{whiteSpace:"initial",lineHeight:"inherit"},[`& .${le.cellEmpty}`]:{padding:0,height:"unset"},[`& .${le.cell}.${le["cell--selectionMode"]}`]:{cursor:"default"},[`& .${le.cell}.${le["cell--editing"]}`]:{padding:1,display:"flex",boxShadow:e.shadows[2],backgroundColor:(e.vars||e).palette.background.paper,"&:focus-within":{outline:`${Wm}px solid ${(e.vars||e).palette.primary.main}`,outlineOffset:Wm*-1}},[`& .${le["row--editing"]}`]:{boxShadow:e.shadows[2]},[`& .${le["row--editing"]} .${le.cell}`]:{boxShadow:e.shadows[0],backgroundColor:(e.vars||e).palette.background.paper},[`& .${le.editBooleanCell}`]:{display:"flex",height:"100%",width:"100%",alignItems:"center",justifyContent:"center"},[`& .${le.booleanCell}[data-value="true"]`]:{color:(e.vars||e).palette.text.secondary},[`& .${le.booleanCell}[data-value="false"]`]:{color:(e.vars||e).palette.text.disabled},[`& .${le.actionsCell}`]:{display:"inline-flex",alignItems:"center",gridGap:e.spacing(1)},[`& .${le.rowReorderCell}`]:{display:"inline-flex",flex:1,alignItems:"center",justifyContent:"center",opacity:(e.vars||e).palette.action.disabledOpacity},[`& .${le["rowReorderCell--draggable"]}`]:{cursor:"move",opacity:1},[`& .${le.rowReorderCellContainer}`]:{padding:0,display:"flex",alignItems:"stretch"},[`.${le.withBorderColor}`]:{borderColor:r},[`& .${le["cell--withLeftBorder"]}, & .${le["columnHeader--withLeftBorder"]}`]:{borderLeftColor:"var(--DataGrid-rowBorderColor)",borderLeftWidth:"1px",borderLeftStyle:"solid"},[`& .${le["cell--withRightBorder"]}, & .${le["columnHeader--withRightBorder"]}`]:{borderRightColor:"var(--DataGrid-rowBorderColor)",borderRightWidth:"1px",borderRightStyle:"solid"},[`& .${le["cell--flex"]}`]:{display:"flex",alignItems:"center",lineHeight:"inherit"},[`& .${le["cell--textLeft"]}`]:{textAlign:"left",justifyContent:"flex-start"},[`& .${le["cell--textRight"]}`]:{textAlign:"right",justifyContent:"flex-end"},[`& .${le["cell--textCenter"]}`]:{textAlign:"center",justifyContent:"center"},[`& .${le["cell--pinnedLeft"]}, & .${le["cell--pinnedRight"]}`]:{position:"sticky",zIndex:3,background:"var(--DataGrid-pinnedBackground)","&.Mui-selected":{backgroundColor:x}},[`& .${le.virtualScrollerContent} .${le.row}`]:{"&:hover":w,"&.Mui-selected":C,"&.Mui-selected:hover":P},[`& .${le.cellOffsetLeft}`]:{flex:"0 0 auto",display:"inline-block"},[`& .${le.cellSkeleton}`]:{flex:"0 0 auto",height:"100%",display:"inline-flex",alignItems:"center"},[`& .${le.columnHeaderDraggableContainer}`]:{display:"flex",width:"100%",height:"100%"},[`& .${le.rowReorderCellPlaceholder}`]:{display:"none"},[`& .${le["columnHeader--dragging"]}, & .${le["row--dragging"]}`]:{background:(e.vars||e).palette.background.paper,padding:"0 12px",borderRadius:"var(--unstable_DataGrid-radius)",opacity:(e.vars||e).palette.action.disabledOpacity},[`& .${le["row--dragging"]}`]:{background:(e.vars||e).palette.background.paper,padding:"0 12px",borderRadius:"var(--unstable_DataGrid-radius)",opacity:(e.vars||e).palette.action.disabledOpacity,[`& .${le.rowReorderCellPlaceholder}`]:{display:"flex"}},[`& .${le.treeDataGroupingCell}`]:{display:"flex",alignItems:"center",width:"100%"},[`& .${le.treeDataGroupingCellToggle}`]:{flex:"0 0 28px",alignSelf:"stretch",marginRight:e.spacing(2)},[`& .${le.treeDataGroupingCellLoadingContainer}, .${le.groupingCriteriaCellLoadingContainer}`]:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"},[`& .${le.groupingCriteriaCell}`]:{display:"flex",alignItems:"center",width:"100%"},[`& .${le.groupingCriteriaCellToggle}`]:{flex:"0 0 28px",alignSelf:"stretch",marginRight:e.spacing(2)},[`.${le.scrollbarFiller}`]:{minWidth:"calc(var(--DataGrid-hasScrollY) * var(--DataGrid-scrollbarSize))",alignSelf:"stretch",[`&.${le["scrollbarFiller--borderTop"]}`]:{borderTop:"1px solid var(--DataGrid-rowBorderColor)"},[`&.${le["scrollbarFiller--borderBottom"]}`]:{borderBottom:"1px solid var(--DataGrid-rowBorderColor)"},[`&.${le["scrollbarFiller--pinnedRight"]}`]:{backgroundColor:"var(--DataGrid-pinnedBackground)",position:"sticky",right:0}},[`& .${le.filler}`]:{flex:"1 0 auto"},[`& .${le["filler--borderBottom"]}`]:{borderBottom:"1px solid var(--DataGrid-rowBorderColor)"},[`& .${le["main--hasSkeletonLoadingOverlay"]}`]:{[`& .${le.virtualScrollerContent}`]:{position:"fixed",visibility:"hidden"},[`& .${le["scrollbar--vertical"]}, & .${le.pinnedRows}, & .${le.virtualScroller} > .${le.filler}`]:{display:"none"}}})});function QRt(e,t,n,r=1){const o=(l,c)=>Math.round((l**(1/r)*(1-n)+c**(1/r)*n)**r),i=pu(e),a=pu(t),s=[o(i.values[0],a.values[0]),o(i.values[1],a.values[1]),o(i.values[2],a.values[2])];return EC({type:"rgb",values:s})}const XRt=e=>`rgb(from ${e} r g b / 1)`;function JRt(e,t,n){return`color-mix(in srgb,${e}, ${XRt(t)} calc(${n} * 100%))`}const ZRt=["className"],e$t=(e,t)=>{const{autoHeight:n,classes:r,showCellVerticalBorder:o}=e,i={root:["root",n&&"autoHeight",`root--density${y1(t)}`,e.slots.toolbar===null&&"root--noToolbar","withBorderColor",o&&"withVerticalBorder"]};return Tn(i,In,r)},t$t=v.forwardRef(function(t,n){const r=Ot(),{className:o}=t,i=Dt(t,ZRt),a=Ul(),s=Ye(a,Iy),l=a.current.rootElementRef,c=Jg(l,n),u=r,d=e$t(u,s),[f,p]=v.useState(!1);return Ho(()=>{p(!0)},[]),f?R.jsx(YRt,W({ref:c,className:de(d.root,o),ownerState:u},i)):null}),n$t=["className"],r$t=e=>{const{classes:t}=e;return Tn({root:["footerContainer","withBorderColor"]},In,t)},o$t=or("div",{name:"MuiDataGrid",slot:"FooterContainer",overridesResolver:(e,t)=>t.footerContainer})({display:"flex",justifyContent:"space-between",alignItems:"center",minHeight:52,borderTop:"1px solid"}),i$t=v.forwardRef(function(t,n){const{className:r}=t,o=Dt(t,n$t),i=Ot(),a=r$t(i);return R.jsx(o$t,W({ref:n,className:de(a.root,r),ownerState:i},o))}),a$t=["className"],s$t=e=>{const{classes:t}=e;return Tn({root:["overlay"]},In,t)},l$t=or("div",{name:"MuiDataGrid",slot:"Overlay",overridesResolver:(e,t)=>t.overlay})({width:"100%",height:"100%",display:"flex",alignSelf:"center",alignItems:"center",justifyContent:"center",backgroundColor:"var(--unstable_DataGrid-overlayBackground)"}),r5=v.forwardRef(function(t,n){const{className:r}=t,o=Dt(t,a$t),i=Ot(),a=s$t(i);return R.jsx(l$t,W({ref:n,className:de(a.root,r),ownerState:i},o))}),c$t=e=>{const{classes:t,open:n}=e;return Tn({root:["menuIcon",n&&"menuOpen"],button:["menuIconButton"]},In,t)},u$t=v.memo(e=>{var d,f;const{colDef:t,open:n,columnMenuId:r,columnMenuButtonId:o,iconButtonRef:i}=e,a=En(),s=Ot(),l=W({},e,{classes:s.classes}),c=c$t(l),u=v.useCallback(p=>{p.preventDefault(),p.stopPropagation(),a.current.toggleColumnMenu(t.field)},[a,t.field]);return R.jsx("div",{className:c.root,children:R.jsx(s.slots.baseTooltip,W({title:a.current.getLocaleText("columnMenuLabel"),enterDelay:1e3},(d=s.slotProps)==null?void 0:d.baseTooltip,{children:R.jsx(s.slots.baseIconButton,W({ref:i,tabIndex:-1,className:c.button,"aria-label":a.current.getLocaleText("columnMenuLabel"),size:"small",onClick:u,"aria-haspopup":"menu","aria-expanded":n,"aria-controls":n?r:void 0,id:o},(f=s.slotProps)==null?void 0:f.baseIconButton,{children:R.jsx(s.slots.columnMenuIcon,{fontSize:"inherit"})}))}))})});function d$t({columnMenuId:e,columnMenuButtonId:t,ContentComponent:n,contentComponentProps:r,field:o,open:i,target:a,onExited:s}){const l=En(),c=l.current.getColumn(o),u=Ar(d=>{d&&(d.stopPropagation(),a!=null&&a.contains(d.target))||l.current.hideColumnMenu()});return!a||!c?null:R.jsx(dfe,{placement:`bottom-${c.align==="right"?"start":"end"}`,open:i,target:a,onClose:u,onExited:s,children:R.jsx(n,W({colDef:c,hideMenu:u,open:i,id:e,labelledby:t},r))})}const f$t=["className","aria-label"],p$t=e=>{const{classes:t}=e;return Tn({root:["columnHeaderTitle"]},In,t)},h$t=or("div",{name:"MuiDataGrid",slot:"ColumnHeaderTitle",overridesResolver:(e,t)=>t.columnHeaderTitle})({textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",fontWeight:"var(--unstable_DataGrid-headWeight)",lineHeight:"normal"}),g$t=v.forwardRef(function(t,n){const{className:r}=t,o=Dt(t,f$t),i=Ot(),a=p$t(i);return R.jsx(h$t,W({ref:n,className:de(a.root,r),ownerState:i},o))});function m$t(e){var l;const{label:t,description:n}=e,r=Ot(),o=v.useRef(null),[i,a]=v.useState(""),s=v.useCallback(()=>{if(!n&&(o!=null&&o.current)){const c=mRt(o.current);a(c?t:"")}},[n,t]);return R.jsx(r.slots.baseTooltip,W({title:n||i},(l=r.slotProps)==null?void 0:l.baseTooltip,{children:R.jsx(g$t,{onMouseOver:s,ref:o,children:t})}))}const y$t=["resizable","resizing","height","side"];var o5=function(e){return e.Left="left",e.Right="right",e}(o5||{});const v$t=e=>{const{resizable:t,resizing:n,classes:r,side:o}=e,i={root:["columnSeparator",t&&"columnSeparator--resizable",n&&"columnSeparator--resizing",o&&`columnSeparator--side${y1(o)}`],icon:["iconSeparator"]};return Tn(i,In,r)};function b$t(e){const{height:t,side:n=o5.Right}=e,r=Dt(e,y$t),o=Ot(),i=W({},e,{side:n,classes:o.classes}),a=v$t(i),s=v.useCallback(l=>{l.preventDefault(),l.stopPropagation()},[]);return R.jsx("div",W({className:a.root,style:{minHeight:t}},r,{onClick:s,children:R.jsx(o.slots.columnResizeIcon,{className:a.icon})}))}const w$t=v.memo(b$t),x$t=["classes","columnMenuOpen","colIndex","height","isResizing","sortDirection","hasFocus","tabIndex","separatorSide","isDraggable","headerComponent","description","elementId","width","columnMenuIconButton","columnMenu","columnTitleIconButtons","headerClassName","label","resizable","draggableContainerProps","columnHeaderSeparatorProps","style"],Qfe=v.forwardRef(function(t,n){const{classes:r,colIndex:o,height:i,isResizing:a,sortDirection:s,hasFocus:l,tabIndex:c,separatorSide:u,isDraggable:d,headerComponent:f,description:p,width:h,columnMenuIconButton:m=null,columnMenu:y=null,columnTitleIconButtons:w=null,headerClassName:x,label:C,resizable:E,draggableContainerProps:P,columnHeaderSeparatorProps:T,style:I}=t,A=Dt(t,x$t),k=Ul(),O=Ot(),$=v.useRef(null),N=Jg($,n);let L="none";return s!=null&&(L=s==="asc"?"ascending":"descending"),v.useLayoutEffect(()=>{var D;const j=k.current.state.columnMenu;if(l&&!j.open){const z=$.current.querySelector('[tabindex="0"]')||$.current;z==null||z.focus(),(D=k.current.columnHeadersContainerRef)!=null&&D.current&&(k.current.columnHeadersContainerRef.current.scrollLeft=0)}},[k,l]),R.jsxs("div",W({ref:N,className:de(r.root,x),style:W({},I,{height:i,width:h}),role:"columnheader",tabIndex:c,"aria-colindex":o+1,"aria-sort":L},A,{children:[R.jsxs("div",W({className:r.draggableContainer,draggable:d,role:"presentation"},P,{children:[R.jsxs("div",{className:r.titleContainer,role:"presentation",children:[R.jsx("div",{className:r.titleContainerContent,children:f!==void 0?f:R.jsx(m$t,{label:C,description:p,columnWidth:h})}),w]}),m]})),R.jsx(w$t,W({resizable:!O.disableColumnResize&&!!E,resizing:a,height:i,side:u},T)),y]}))}),S$t=e=>{const{colDef:t,classes:n,isDragging:r,sortDirection:o,showRightBorder:i,showLeftBorder:a,filterItemsCounter:s,pinnedPosition:l,isLastUnpinned:c,isSiblingFocused:u}=e,d=o!=null,f=s!=null&&s>0,p=t.type==="number",h={root:["columnHeader",t.headerAlign==="left"&&"columnHeader--alignLeft",t.headerAlign==="center"&&"columnHeader--alignCenter",t.headerAlign==="right"&&"columnHeader--alignRight",t.sortable&&"columnHeader--sortable",r&&"columnHeader--moving",d&&"columnHeader--sorted",f&&"columnHeader--filtered",p&&"columnHeader--numeric","withBorderColor",i&&"columnHeader--withRightBorder",a&&"columnHeader--withLeftBorder",l==="left"&&"columnHeader--pinnedLeft",l==="right"&&"columnHeader--pinnedRight",c&&"columnHeader--lastUnpinned",u&&"columnHeader--siblingFocused"],draggableContainer:["columnHeaderDraggableContainer"],titleContainer:["columnHeaderTitleContainer"],titleContainerContent:["columnHeaderTitleContainerContent"]};return Tn(h,In,n)};function C$t(e){var se,re,fe;const{colDef:t,columnMenuOpen:n,colIndex:r,headerHeight:o,isResizing:i,isLast:a,sortDirection:s,sortIndex:l,filterItemsCounter:c,hasFocus:u,tabIndex:d,disableReorder:f,separatorSide:p,style:h,pinnedPosition:m,indexInSection:y,sectionLength:w,gridHasFiller:x}=e,C=Ul(),E=Ot(),P=v.useRef(null),T=To(),I=To(),A=v.useRef(null),[k,O]=v.useState(n),$=v.useMemo(()=>!E.disableColumnReorder&&!f&&!t.disableReorder,[E.disableColumnReorder,f,t.disableReorder]);let N;t.renderHeader&&(N=t.renderHeader(C.current.getColumnHeaderParams(t.field)));const L=QM(m,y),j=YM(m,y,w,E.showColumnVerticalBorder,x),D=W({},e,{classes:E.classes,showRightBorder:j,showLeftBorder:L}),_=S$t(D),z=v.useCallback(Z=>ce=>{C1(ce)||C.current.publishEvent(Z,C.current.getColumnHeaderParams(t.field),ce)},[C,t.field]),F=v.useMemo(()=>({onClick:z("columnHeaderClick"),onContextMenu:z("columnHeaderContextMenu"),onDoubleClick:z("columnHeaderDoubleClick"),onMouseOver:z("columnHeaderOver"),onMouseOut:z("columnHeaderOut"),onMouseEnter:z("columnHeaderEnter"),onMouseLeave:z("columnHeaderLeave"),onKeyDown:z("columnHeaderKeyDown"),onFocus:z("columnHeaderFocus"),onBlur:z("columnHeaderBlur")}),[z]),V=v.useMemo(()=>$?{onDragStart:z("columnHeaderDragStart"),onDragEnter:z("columnHeaderDragEnter"),onDragOver:z("columnHeaderDragOver"),onDragEnd:z("columnHeaderDragEnd")}:{},[$,z]),U=v.useMemo(()=>({onMouseDown:z("columnSeparatorMouseDown"),onDoubleClick:z("columnSeparatorDoubleClick")}),[z]);v.useEffect(()=>{k||O(n)},[k,n]);const q=v.useCallback(()=>{O(!1)},[]),X=!E.disableColumnMenu&&!t.disableColumnMenu&&R.jsx(u$t,{colDef:t,columnMenuId:T,columnMenuButtonId:I,open:k,iconButtonRef:A}),ie=R.jsx(d$t,{columnMenuId:T,columnMenuButtonId:I,field:t.field,open:n,target:A.current,ContentComponent:E.slots.columnMenu,contentComponentProps:(se=E.slotProps)==null?void 0:se.columnMenu,onExited:q}),ee=t.sortingOrder??E.sortingOrder,Q=(t.sortable||s!=null)&&!t.hideSortIcons&&!E.disableColumnSorting,te=R.jsxs(v.Fragment,{children:[!E.disableColumnFilter&&R.jsx(E.slots.columnHeaderFilterIconButton,W({field:t.field,counter:c},(re=E.slotProps)==null?void 0:re.columnHeaderFilterIconButton)),Q&&R.jsx(E.slots.columnHeaderSortIcon,W({field:t.field,direction:s,index:l,sortingOrder:ee,disabled:!t.sortable},(fe=E.slotProps)==null?void 0:fe.columnHeaderSortIcon))]});v.useLayoutEffect(()=>{var ce;const Z=C.current.state.columnMenu;if(u&&!Z.open){const we=P.current.querySelector('[tabindex="0"]')||P.current;we==null||we.focus(),(ce=C.current.columnHeadersContainerRef)!=null&&ce.current&&(C.current.columnHeadersContainerRef.current.scrollLeft=0)}},[C,u]);const pe=typeof t.headerClassName=="function"?t.headerClassName({field:t.field,colDef:t}):t.headerClassName,ae=t.headerName??t.field;return R.jsx(Qfe,W({ref:P,classes:_,columnMenuOpen:n,colIndex:r,height:o,isResizing:i,sortDirection:s,hasFocus:u,tabIndex:d,separatorSide:p,isDraggable:$,headerComponent:N,description:t.description,elementId:t.field,width:t.computedWidth,columnMenuIconButton:X,columnTitleIconButtons:te,headerClassName:de(pe,a&&le["columnHeader--last"]),label:ae,resizable:!E.disableColumnResize&&!!t.resizable,"data-field":t.field,columnMenu:ie,draggableContainerProps:V,columnHeaderSeparatorProps:U,style:h},F))}const E$t=zp(C$t),P$t=["className"],T$t=e=>{const{classes:t}=e;return Tn({root:["iconButtonContainer"]},In,t)},I$t=or("div",{name:"MuiDataGrid",slot:"IconButtonContainer",overridesResolver:(e,t)=>t.iconButtonContainer})(()=>({display:"flex",visibility:"hidden",width:0})),Xfe=v.forwardRef(function(t,n){const{className:r}=t,o=Dt(t,P$t),i=Ot(),a=T$t(i);return R.jsx(I$t,W({ref:n,className:de(a.root,r),ownerState:i},o))}),O$t=["direction","index","sortingOrder","disabled"],A$t=e=>{const{classes:t}=e;return Tn({icon:["sortIcon"]},In,t)};function k$t(e,t,n,r){let o;const i={};return t==="asc"?o=e.columnSortedAscendingIcon:t==="desc"?o=e.columnSortedDescendingIcon:(o=e.columnUnsortedIcon,i.sortingOrder=r),o?R.jsx(o,W({fontSize:"small",className:n},i)):null}function M$t(e){var f;const{direction:t,index:n,sortingOrder:r,disabled:o}=e,i=Dt(e,O$t),a=En(),s=Ot(),l=W({},e,{classes:s.classes}),c=A$t(l),u=k$t(s.slots,t,c.icon,r);if(!u)return null;const d=R.jsx(s.slots.baseIconButton,W({tabIndex:-1,"aria-label":a.current.getLocaleText("columnHeaderSortIconLabel"),title:a.current.getLocaleText("columnHeaderSortIconLabel"),size:"small",disabled:o},(f=s.slotProps)==null?void 0:f.baseIconButton,i,{children:u}));return R.jsxs(Xfe,{children:[n!=null&&R.jsx(s.slots.baseBadge,{badgeContent:n,color:"default",overlap:"circular",children:d}),n==null&&d]})}const R$t=v.memo(M$t),$$t=e=>{const{classes:t}=e;return Tn({icon:["filterIcon"]},In,t)};function D$t(e){var h,m;const{counter:t,field:n,onClick:r}=e,o=En(),i=Ot(),a=W({},e,{classes:i.classes}),s=$$t(a),l=Ye(o,eC),c=To(),u=To(),d=v.useCallback(y=>{y.preventDefault(),y.stopPropagation();const{open:w,openedPanelValue:x}=eC(o.current.state);w&&x===Ig.filters?o.current.hideFilterPanel():o.current.showFilterPanel(void 0,u,c),r&&r(o.current.getColumnHeaderParams(n),y)},[o,n,r,u,c]);if(!t)return null;const f=l.open&&l.labelId===c,p=R.jsx(i.slots.baseIconButton,W({id:c,onClick:d,color:"default","aria-label":o.current.getLocaleText("columnHeaderFiltersLabel"),size:"small",tabIndex:-1,"aria-haspopup":"menu","aria-expanded":f,"aria-controls":f?u:void 0},(h=i.slotProps)==null?void 0:h.baseIconButton,{children:R.jsx(i.slots.columnFilteredIcon,{className:s.icon,fontSize:"small"})}));return R.jsx(i.slots.baseTooltip,W({title:o.current.getLocaleText("columnHeaderFiltersTooltipActive")(t),enterDelay:1e3},(m=i.slotProps)==null?void 0:m.baseTooltip,{children:R.jsxs(Xfe,{children:[t>1&&R.jsx(i.slots.baseBadge,{badgeContent:t,color:"default",children:p}),t===1&&p]})}))}const IQ=ct(R.jsx("path",{d:"M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z"}),"ArrowUpward"),OQ=ct(R.jsx("path",{d:"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z"}),"ArrowDownward"),AQ=ct(R.jsx("path",{d:"M8.59 16.59 13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"}),"KeyboardArrowRight"),kQ=ct(R.jsx("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore"),_$t=ct(R.jsx("path",{d:"M10 18h4v-2h-4v2zM3 6v2h18V6H3zm3 7h12v-2H6v2z"}),"FilterList"),MQ=ct(R.jsx("path",{d:"M4.25 5.61C6.27 8.2 10 13 10 13v6c0 .55.45 1 1 1h2c.55 0 1-.45 1-1v-6s3.72-4.8 5.74-7.39c.51-.66.04-1.61-.79-1.61H5.04c-.83 0-1.3.95-.79 1.61z"}),"FilterAlt"),N$t=ct(R.jsx("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"}),"Search");ct(R.jsx("path",{d:"M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z"}),"Menu");ct(R.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckCircle");const L$t=ct(R.jsx("path",{d:"M6 5H3c-.55 0-1 .45-1 1v12c0 .55.45 1 1 1h3c.55 0 1-.45 1-1V6c0-.55-.45-1-1-1zm14 0h-3c-.55 0-1 .45-1 1v12c0 .55.45 1 1 1h3c.55 0 1-.45 1-1V6c0-.55-.45-1-1-1zm-7 0h-3c-.55 0-1 .45-1 1v12c0 .55.45 1 1 1h3c.55 0 1-.45 1-1V6c0-.55-.45-1-1-1z"}),"ColumnIcon"),F$t=ct(R.jsx("rect",{width:"1",height:"24",x:"11.5",rx:"0.5"}),"Separator"),j$t=ct(R.jsx("path",{d:"M4 15h16v-2H4v2zm0 4h16v-2H4v2zm0-8h16V9H4v2zm0-6v2h16V5H4z"}),"ViewHeadline"),B$t=ct(R.jsx("path",{d:"M21,8H3V4h18V8z M21,10H3v4h18V10z M21,16H3v4h18V16z"}),"TableRows"),z$t=ct(R.jsx("path",{d:"M4 18h17v-6H4v6zM4 5v6h17V5H4z"}),"ViewStream"),V$t=ct(R.jsx("path",{d:"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"}),"TripleDotsVertical"),w_=ct(R.jsx("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close"),RQ=ct(R.jsx("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"}),"Add"),H$t=ct(R.jsx("path",{d:"M19 13H5v-2h14v2z"}),"Remove"),U$t=ct(R.jsx("path",{d:"M12 4V1L8 5l4 4V6c3.31 0 6 2.69 6 6 0 1.01-.25 1.97-.7 2.8l1.46 1.46C19.54 15.03 20 13.57 20 12c0-4.42-3.58-8-8-8zm0 14c-3.31 0-6-2.69-6-6 0-1.01.25-1.97.7-2.8L5.24 7.74C4.46 8.97 4 10.43 4 12c0 4.42 3.58 8 8 8v3l4-4-4-4v3z"}),"Load"),$Q=ct(R.jsx("path",{d:"M11 18c0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2 2 .9 2 2zm-2-8c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0-6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm6 4c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"}),"Drag"),W$t=ct(R.jsx("path",{d:"M19 12v7H5v-7H3v7c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-7h-2zm-6 .67l2.59-2.58L17 11.5l-5 5-5-5 1.41-1.41L11 12.67V3h2z"}),"SaveAlt"),G$t=ct(R.jsx("path",{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"}),"Check"),q$t=ct(R.jsx("path",{d:"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"}),"MoreVert"),K$t=ct(R.jsx("path",{d:"M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7zM2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3 2 4.27zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2zm4.31-.78l3.15 3.15.02-.16c0-1.66-1.34-3-3-3l-.17.01z"}),"VisibilityOff"),Y$t=ct(R.jsx("g",{children:R.jsx("path",{d:"M14.67,5v14H9.33V5H14.67z M15.67,19H21V5h-5.33V19z M8.33,19V5H3v14H8.33z"})}),"ViewColumn"),Q$t=ct(R.jsx("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Clear");ct(R.jsx("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z"}),"Delete");const X$t=ct(R.jsx("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zm2.46-7.12l1.41-1.41L12 12.59l2.12-2.12 1.41 1.41L13.41 14l2.12 2.12-1.41 1.41L12 15.41l-2.12 2.12-1.41-1.41L10.59 14l-2.13-2.12zM15.5 4l-1-1h-5l-1 1H5v2h14V4z"}),"Delete");function Jfe(e){return e.key.length===1&&!e.ctrlKey&&!e.metaKey}const DO=e=>e.indexOf("Arrow")===0||e.indexOf("Page")===0||e===" "||e==="Home"||e==="End",J$t=e=>!!e.key,Z$t=e=>e==="Tab"||e==="Escape";function Zfe(e){return(e.ctrlKey||e.metaKey)&&String.fromCharCode(e.keyCode)==="V"&&!e.shiftKey&&!e.altKey}function eDt(e){return(e.ctrlKey||e.metaKey)&&String.fromCharCode(e.keyCode)==="C"&&!e.shiftKey&&!e.altKey}const tDt=["hideMenu","colDef","id","labelledby","className","children","open"],nDt=oe(_C)(()=>({minWidth:248})),rDt=v.forwardRef(function(t,n){const{hideMenu:r,id:o,labelledby:i,className:a,children:s,open:l}=t,c=Dt(t,tDt),u=v.useCallback(d=>{d.key==="Tab"&&d.preventDefault(),Z$t(d.key)&&r(d)},[r]);return R.jsx(nDt,W({id:o,ref:n,className:de(le.menuList,a),"aria-labelledby":i,onKeyDown:u,autoFocus:l},c,{children:s}))}),oDt=["displayOrder"],iDt=e=>{const t=Ul(),n=Ot(),{defaultSlots:r,defaultSlotProps:o,slots:i={},slotProps:a={},hideMenu:s,colDef:l,addDividers:c=!0}=e,u=v.useMemo(()=>W({},r,i),[r,i]),d=v.useMemo(()=>{if(!a||Object.keys(a).length===0)return o;const h=W({},a);return Object.entries(o).forEach(([m,y])=>{h[m]=W({},y,a[m]||{})}),h},[o,a]),f=t.current.unstable_applyPipeProcessors("columnMenu",[],e.colDef),p=v.useMemo(()=>{const h=Object.keys(r);return Object.keys(i).filter(m=>!h.includes(m))},[i,r]);return v.useMemo(()=>{const y=Array.from(new Set([...f,...p])).filter(w=>u[w]!=null).sort((w,x)=>{const C=d[w],E=d[x],P=Number.isFinite(C==null?void 0:C.displayOrder)?C.displayOrder:100,T=Number.isFinite(E==null?void 0:E.displayOrder)?E.displayOrder:100;return P-T});return y.reduce((w,x,C)=>{let E={colDef:l,onClick:s};const P=d[x];if(P){const T=Dt(P,oDt);E=W({},E,T)}return c&&C!==y.length-1?[...w,[u[x],E],[n.slots.baseDivider,{}]]:[...w,[u[x],E]]},[])},[c,l,f,s,u,d,p,n.slots.baseDivider])};function aDt(e){const{colDef:t,onClick:n}=e,r=En(),o=Ot(),s=Io(r).filter(c=>c.disableColumnMenu!==!0).length===1,l=v.useCallback(c=>{s||(r.current.setColumnVisibility(t.field,!1),n(c))},[r,t.field,n,s]);return o.disableColumnSelector||t.hideable===!1?null:R.jsxs(en,{onClick:l,disabled:s,children:[R.jsx(aa,{children:R.jsx(o.slots.columnMenuHideIcon,{fontSize:"small"})}),R.jsx(Ao,{children:r.current.getLocaleText("columnMenuHideColumn")})]})}function sDt(e){const{onClick:t}=e,n=En(),r=Ot(),o=v.useCallback(i=>{t(i),n.current.showPreferences(Ig.columns)},[n,t]);return r.disableColumnSelector?null:R.jsxs(en,{onClick:o,children:[R.jsx(aa,{children:R.jsx(r.slots.columnMenuManageColumnsIcon,{fontSize:"small"})}),R.jsx(Ao,{children:n.current.getLocaleText("columnMenuManageColumns")})]})}function lDt(e){return R.jsxs(v.Fragment,{children:[R.jsx(aDt,W({},e)),R.jsx(sDt,W({},e))]})}function cDt(e){const{colDef:t,onClick:n}=e,r=En(),o=Ot(),i=v.useCallback(a=>{n(a),r.current.showFilterPanel(t.field)},[r,t.field,n]);return o.disableColumnFilter||!t.filterable?null:R.jsxs(en,{onClick:i,children:[R.jsx(aa,{children:R.jsx(o.slots.columnMenuFilterIcon,{fontSize:"small"})}),R.jsx(Ao,{children:r.current.getLocaleText("columnMenuFilter")})]})}function uDt(e){const{colDef:t,onClick:n}=e,r=En(),o=Ye(r,rl),i=Ot(),a=v.useMemo(()=>{if(!t)return null;const u=o.find(d=>d.field===t.field);return u==null?void 0:u.sort},[t,o]),s=t.sortingOrder??i.sortingOrder,l=v.useCallback(u=>{n(u);const d=u.currentTarget.getAttribute("data-value")||null;r.current.sortColumn(t.field,d===a?null:d)},[r,t,n,a]);if(i.disableColumnSorting||!t||!t.sortable||!s.some(u=>!!u))return null;const c=u=>{const d=r.current.getLocaleText(u);return typeof d=="function"?d(t):d};return R.jsxs(v.Fragment,{children:[s.includes("asc")&&a!=="asc"?R.jsxs(en,{onClick:l,"data-value":"asc",children:[R.jsx(aa,{children:R.jsx(i.slots.columnMenuSortAscendingIcon,{fontSize:"small"})}),R.jsx(Ao,{children:c("columnMenuSortAsc")})]}):null,s.includes("desc")&&a!=="desc"?R.jsxs(en,{onClick:l,"data-value":"desc",children:[R.jsx(aa,{children:R.jsx(i.slots.columnMenuSortDescendingIcon,{fontSize:"small"})}),R.jsx(Ao,{children:c("columnMenuSortDesc")})]}):null,s.includes(null)&&a!=null?R.jsxs(en,{onClick:l,children:[R.jsx(aa,{}),R.jsx(Ao,{children:r.current.getLocaleText("columnMenuUnsort")})]}):null]})}const dDt=["defaultSlots","defaultSlotProps","slots","slotProps"],fDt={columnMenuSortItem:uDt,columnMenuFilterItem:cDt,columnMenuColumnsItem:lDt},pDt={columnMenuSortItem:{displayOrder:10},columnMenuFilterItem:{displayOrder:20},columnMenuColumnsItem:{displayOrder:30}},hDt=v.forwardRef(function(t,n){const{defaultSlots:r,defaultSlotProps:o,slots:i,slotProps:a}=t,s=Dt(t,dDt),l=iDt(W({},s,{defaultSlots:r,defaultSlotProps:o,slots:i,slotProps:a}));return R.jsx(rDt,W({ref:n},s,{children:l.map(([c,u],d)=>R.jsx(c,W({},u),d))}))}),gDt=v.forwardRef(function(t,n){return R.jsx(hDt,W({},t,{ref:n,defaultSlots:fDt,defaultSlotProps:pDt}))}),mDt=["className","slotProps"],yDt=e=>{const{classes:t}=e;return Tn({root:["panelWrapper"]},In,t)},vDt=oe("div",{name:"MuiDataGrid",slot:"PanelWrapper",overridesResolver:(e,t)=>t.panelWrapper})({display:"flex",flexDirection:"column",flex:1,"&:focus":{outline:0}}),bDt=()=>!0,epe=v.forwardRef(function(t,n){const{className:r,slotProps:o={}}=t,i=Dt(t,mDt),a=Ot(),s=yDt(a);return R.jsx(QB,W({open:!0,disableEnforceFocus:!0,isEnabled:bDt},o.TrapFocus,{children:R.jsx(vDt,W({ref:n,tabIndex:-1,className:de(s.root,r),ownerState:a},i))}))}),wDt=(e,t)=>{const n=new Set(Object.keys(e).filter(i=>e[i]===!1)),r=new Set(Object.keys(t).filter(i=>t[i]===!1));if(n.size!==r.size)return!1;let o=!0;return n.forEach(i=>{r.has(i)||(o=!1)}),o},xDt=(e,t)=>(e.headerName||e.field).toLowerCase().indexOf(t)>-1,SDt=e=>{const{classes:t}=e;return Tn({root:["columnsManagement"],header:["columnsManagementHeader"],footer:["columnsManagementFooter"],row:["columnsManagementRow"]},In,t)},DQ=new Intl.Collator;function tpe(e){var L,j,D;const t=En(),n=v.useRef(null),r=Ye(t,Cc),o=Au(()=>gl(t)).current,i=Ye(t,gl),a=Ot(),[s,l]=v.useState(""),c=SDt(a),{sort:u,searchPredicate:d=xDt,autoFocusSearchField:f=!0,disableShowHideToggle:p=!1,disableResetButton:h=!1,toggleAllMode:m="all",getTogglableColumns:y}=e,w=v.useMemo(()=>wDt(i,o),[i,o]),x=v.useMemo(()=>{switch(u){case"asc":return[...r].sort((_,z)=>DQ.compare(_.headerName||_.field,z.headerName||z.field));case"desc":return[...r].sort((_,z)=>-DQ.compare(_.headerName||_.field,z.headerName||z.field));default:return r}},[r,u]),C=_=>{const{name:z}=_.target;t.current.setColumnVisibility(z,i[z]===!1)},E=v.useMemo(()=>{const _=y?y(x):null,z=_?x.filter(({field:F})=>_.includes(F)):x;return s?z.filter(F=>d(F,s.toLowerCase())):z},[x,s,d,y]),P=v.useCallback(_=>{const z=gl(t),F=W({},z),V=y?y(r):null;return(m==="filteredOnly"?E:r).forEach(U=>{U.hideable&&(V==null||V.includes(U.field))&&(_?delete F[U.field]:F[U.field]=!1)}),t.current.setColumnVisibilityModel(F)},[t,r,y,m,E]),T=v.useCallback(_=>{l(_.target.value)},[]),I=v.useMemo(()=>E.filter(_=>_.hideable),[E]),A=v.useMemo(()=>I.every(_=>i[_.field]==null||i[_.field]!==!1),[i,I]),k=v.useMemo(()=>I.every(_=>i[_.field]===!1),[i,I]),O=v.useRef(null);v.useEffect(()=>{f?n.current.focus():O.current&&typeof O.current.focus=="function"&&O.current.focus()},[f]);let $=!1;const N=_=>$===!1&&_.hideable!==!1?($=!0,!0):!1;return R.jsxs(v.Fragment,{children:[R.jsx(EDt,{className:c.header,ownerState:a,children:R.jsx(a.slots.baseTextField,W({placeholder:t.current.getLocaleText("columnsManagementSearchTitle"),inputRef:n,value:s,onChange:T,variant:"outlined",size:"small",InputProps:{startAdornment:R.jsx(a.slots.baseInputAdornment,{position:"start",children:R.jsx(a.slots.quickFilterIcon,{})}),sx:{pl:1.5}},fullWidth:!0},(L=a.slotProps)==null?void 0:L.baseTextField))}),R.jsxs(CDt,{className:c.root,ownerState:a,children:[E.map(_=>{var z;return R.jsx(Td,{className:c.row,control:R.jsx(a.slots.baseCheckbox,W({disabled:_.hideable===!1,checked:i[_.field]!==!1,onClick:C,name:_.field,sx:{p:.5},inputRef:N(_)?O:void 0},(z=a.slotProps)==null?void 0:z.baseCheckbox)),label:_.headerName||_.field},_.field)}),E.length===0&&R.jsx(TDt,{ownerState:a,children:t.current.getLocaleText("columnsManagementNoColumns")})]}),(!p||!h)&&E.length>0?R.jsxs(PDt,{ownerState:a,className:c.footer,children:[p?R.jsx("span",{}):R.jsx(Td,{control:R.jsx(a.slots.baseCheckbox,W({disabled:I.length===0,checked:A,indeterminate:!A&&!k,onClick:()=>P(!A),name:t.current.getLocaleText("columnsManagementShowHideAllText"),sx:{p:.5}},(j=a.slotProps)==null?void 0:j.baseCheckbox)),label:t.current.getLocaleText("columnsManagementShowHideAllText")}),h?null:R.jsx(a.slots.baseButton,W({onClick:()=>t.current.setColumnVisibilityModel(o),disabled:w},(D=a.slotProps)==null?void 0:D.baseButton,{children:t.current.getLocaleText("columnsManagementReset")}))]}):null]})}const CDt=oe("div",{name:"MuiDataGrid",slot:"ColumnsManagement",overridesResolver:(e,t)=>t.columnsManagement})(({theme:e})=>({padding:e.spacing(0,3,1.5),display:"flex",flexDirection:"column",overflow:"auto",flex:"1 1",maxHeight:400,alignItems:"flex-start"})),EDt=oe("div",{name:"MuiDataGrid",slot:"ColumnsManagementHeader",overridesResolver:(e,t)=>t.columnsManagementHeader})(({theme:e})=>({padding:e.spacing(1.5,3)})),PDt=oe("div",{name:"MuiDataGrid",slot:"ColumnsManagementFooter",overridesResolver:(e,t)=>t.columnsManagementFooter})(({theme:e})=>({padding:e.spacing(.5,1,.5,3),display:"flex",justifyContent:"space-between",borderTop:`1px solid ${e.palette.divider}`})),TDt=oe("div")(({theme:e})=>({padding:e.spacing(.5,0),color:e.palette.grey[500]}));function IDt(e){var n;const t=Ot();return R.jsx(epe,W({},e,{children:R.jsx(tpe,W({},(n=t.slotProps)==null?void 0:n.columnsManagement))}))}const ODt=["children","className","classes"],ADt=Kde("MuiDataGrid",["panel","paper"]),kDt=oe(Sp,{name:"MuiDataGrid",slot:"Panel",overridesResolver:(e,t)=>t.panel})(({theme:e})=>({zIndex:e.zIndex.modal})),MDt=oe(to,{name:"MuiDataGrid",slot:"Paper",overridesResolver:(e,t)=>t.paper})(({theme:e})=>({backgroundColor:(e.vars||e).palette.background.paper,minWidth:300,maxHeight:450,display:"flex",maxWidth:`calc(100vw - ${e.spacing(.5)})`,overflow:"auto"})),RDt=v.forwardRef((e,t)=>{const{children:n,className:r}=e,o=Dt(e,ODt),i=En(),a=Ot(),s=ADt,[l,c]=v.useState(!1),u=v.useCallback(()=>{i.current.hidePreferences()},[i]),d=v.useCallback(m=>{m.key==="Escape"&&i.current.hidePreferences()},[i]),f=v.useMemo(()=>[{name:"flip",enabled:!0,options:{rootBoundary:"document"}},{name:"isPlaced",enabled:!0,phase:"main",fn:()=>{c(!0)},effect:()=>()=>{c(!1)}}],[]),[p,h]=v.useState(null);return v.useEffect(()=>{var y,w;const m=(w=(y=i.current.rootElementRef)==null?void 0:y.current)==null?void 0:w.querySelector('[data-id="gridPanelAnchor"]');m&&h(m)},[i]),p?R.jsx(kDt,W({ref:t,placement:"bottom-start",className:de(s.panel,r),ownerState:a,anchorEl:p,modifiers:f},o,{children:R.jsx(YB,{mouseEvent:"onMouseUp",onClickAway:u,children:R.jsx(MDt,{className:s.paper,ownerState:a,elevation:8,onKeyDown:d,children:l&&n})})})):null}),$Dt=["className"],DDt=e=>{const{classes:t}=e;return Tn({root:["panelContent"]},In,t)},_Dt=or("div",{name:"MuiDataGrid",slot:"PanelContent",overridesResolver:(e,t)=>t.panelContent})({display:"flex",flexDirection:"column",overflow:"auto",flex:"1 1",maxHeight:400});function NDt(e){const{className:t}=e,n=Dt(e,$Dt),r=Ot(),o=DDt(r);return R.jsx(_Dt,W({className:de(o.root,t),ownerState:r},n))}const LDt=["className"],FDt=e=>{const{classes:t}=e;return Tn({root:["panelFooter"]},In,t)},jDt=or("div",{name:"MuiDataGrid",slot:"PanelFooter",overridesResolver:(e,t)=>t.panelFooter})(({theme:e})=>({padding:e.spacing(.5),display:"flex",justifyContent:"space-between"}));function BDt(e){const{className:t}=e,n=Dt(e,LDt),r=Ot(),o=FDt(r);return R.jsx(jDt,W({className:de(o.root,t),ownerState:r},n))}const zDt=["item","hasMultipleFilters","deleteFilter","applyFilterChanges","showMultiFilterOperators","disableMultiFilterOperator","applyMultiFilterOperatorChanges","focusElementRef","logicOperators","columnsSort","filterColumns","deleteIconProps","logicOperatorInputProps","operatorInputProps","columnInputProps","valueInputProps","readOnly","children"],VDt=["InputComponentProps"],HDt=e=>{const{classes:t}=e;return Tn({root:["filterForm"],deleteIcon:["filterFormDeleteIcon"],logicOperatorInput:["filterFormLogicOperatorInput"],columnInput:["filterFormColumnInput"],operatorInput:["filterFormOperatorInput"],valueInput:["filterFormValueInput"]},In,t)},UDt=oe("div",{name:"MuiDataGrid",slot:"FilterForm",overridesResolver:(e,t)=>t.filterForm})(({theme:e})=>({display:"flex",padding:e.spacing(1)})),WDt=oe("div",{name:"MuiDataGrid",slot:"FilterFormDeleteIcon",overridesResolver:(e,t)=>t.filterFormDeleteIcon})(({theme:e})=>({flexShrink:0,justifyContent:"flex-end",marginRight:e.spacing(.5),marginBottom:e.spacing(.2)})),GDt=oe("div",{name:"MuiDataGrid",slot:"FilterFormLogicOperatorInput",overridesResolver:(e,t)=>t.filterFormLogicOperatorInput})({minWidth:55,marginRight:5,justifyContent:"end"}),qDt=oe("div",{name:"MuiDataGrid",slot:"FilterFormColumnInput",overridesResolver:(e,t)=>t.filterFormColumnInput})({width:150}),KDt=oe("div",{name:"MuiDataGrid",slot:"FilterFormOperatorInput",overridesResolver:(e,t)=>t.filterFormOperatorInput})({width:150}),YDt=oe("div",{name:"MuiDataGrid",slot:"FilterFormValueInput",overridesResolver:(e,t)=>t.filterFormValueInput})({width:190}),QDt=e=>{switch(e){case Zi.And:return"filterPanelOperatorAnd";case Zi.Or:return"filterPanelOperatorOr";default:throw new Error("MUI X: Invalid `logicOperator` property in the `GridFilterPanel`.")}},xw=e=>e.headerName||e.field,_Q=new Intl.Collator,NQ=v.forwardRef(function(t,n){var we,me,Se,xe,ke,De,_e,ye,Pe;const{item:r,hasMultipleFilters:o,deleteFilter:i,applyFilterChanges:a,showMultiFilterOperators:s,disableMultiFilterOperator:l,applyMultiFilterOperatorChanges:c,focusElementRef:u,logicOperators:d=[Zi.And,Zi.Or],columnsSort:f,filterColumns:p,deleteIconProps:h={},logicOperatorInputProps:m={},operatorInputProps:y={},columnInputProps:w={},valueInputProps:x={},readOnly:C}=t,E=Dt(t,zDt),P=En(),T=Ye(P,jd),I=Ye(P,efe),A=Ye(P,di),k=To(),O=To(),$=To(),N=To(),L=Ot(),j=HDt(L),D=v.useRef(null),_=v.useRef(null),z=A.logicOperator??Zi.And,F=o&&d.length>0,V=((we=L.slotProps)==null?void 0:we.baseFormControl)||{},q=(((me=L.slotProps)==null?void 0:me.baseSelect)||{}).native??!1,X=((Se=L.slotProps)==null?void 0:Se.baseInputLabel)||{},ie=((xe=L.slotProps)==null?void 0:xe.baseSelectOption)||{},{InputComponentProps:ee}=x,Q=Dt(x,VDt),{filteredColumns:te,selectedField:pe}=v.useMemo(()=>{let Ae=r.field;const Me=T[r.field].filterable===!1?T[r.field]:null;if(Me)return{filteredColumns:[Me],selectedField:Ae};if(p===void 0||typeof p!="function")return{filteredColumns:I,selectedField:Ae};const We=p({field:r.field,columns:I,currentFilters:(A==null?void 0:A.items)||[]});return{filteredColumns:I.filter(He=>{const Xe=We.includes(He.field);return He.field===r.field&&!Xe&&(Ae=void 0),Xe}),selectedField:Ae}},[p,A==null?void 0:A.items,I,r.field,T]),ae=v.useMemo(()=>{switch(f){case"asc":return te.sort((Ae,Me)=>_Q.compare(xw(Ae),xw(Me)));case"desc":return te.sort((Ae,Me)=>-_Q.compare(xw(Ae),xw(Me)));default:return te}},[te,f]),se=r.field?P.current.getColumn(r.field):null,re=v.useMemo(()=>{var Ae;return!r.operator||!se?null:(Ae=se.filterOperators)==null?void 0:Ae.find(Me=>Me.value===r.operator)},[r,se]),fe=v.useCallback(Ae=>{const Me=Ae.target.value,We=P.current.getColumn(Me);if(We.field===se.field)return;const He=We.filterOperators.find(ot=>ot.value===r.operator)||We.filterOperators[0];let ht=!He.InputComponent||He.InputComponent!==(re==null?void 0:re.InputComponent)||We.type!==se.type?void 0:r.value;if(We.type==="singleSelect"&&ht!==void 0){const ot=We,et=Tg(ot);Array.isArray(ht)?ht=ht.filter(St=>RO(St,et,ot==null?void 0:ot.getOptionValue)!==void 0):RO(r.value,et,ot==null?void 0:ot.getOptionValue)===void 0&&(ht=void 0)}a(W({},r,{field:Me,operator:He.value,value:ht}))},[P,a,r,se,re]),Z=v.useCallback(Ae=>{const Me=Ae.target.value,We=se==null?void 0:se.filterOperators.find(Xe=>Xe.value===Me),He=!(We!=null&&We.InputComponent)||(We==null?void 0:We.InputComponent)!==(re==null?void 0:re.InputComponent);a(W({},r,{operator:Me,value:He?void 0:r.value}))},[a,r,se,re]),ce=v.useCallback(Ae=>{const Me=Ae.target.value===Zi.And.toString()?Zi.And:Zi.Or;c(Me)},[c]),ge=()=>{i(r)};return v.useImperativeHandle(u,()=>({focus:()=>{var Ae;re!=null&&re.InputComponent?(Ae=D==null?void 0:D.current)==null||Ae.focus():_.current.focus()}}),[re]),R.jsxs(UDt,W({ref:n,className:j.root,"data-id":r.id,ownerState:L},E,{children:[R.jsx(WDt,W({variant:"standard",as:L.slots.baseFormControl},V,h,{className:de(j.deleteIcon,V.className,h.className),ownerState:L,children:R.jsx(L.slots.baseIconButton,W({"aria-label":P.current.getLocaleText("filterPanelDeleteIconLabel"),title:P.current.getLocaleText("filterPanelDeleteIconLabel"),onClick:ge,size:"small",disabled:C},(ke=L.slotProps)==null?void 0:ke.baseIconButton,{children:R.jsx(L.slots.filterPanelDeleteIcon,{fontSize:"small"})}))})),R.jsx(GDt,W({variant:"standard",as:L.slots.baseFormControl},V,m,{sx:[F?{display:"flex"}:{display:"none"},s?{visibility:"visible"}:{visibility:"hidden"},V.sx,m.sx],className:de(j.logicOperatorInput,V.className,m.className),ownerState:L,children:R.jsx(L.slots.baseSelect,W({inputProps:{"aria-label":P.current.getLocaleText("filterPanelLogicOperator")},value:z??"",onChange:ce,disabled:!!l||d.length===1,native:q},(De=L.slotProps)==null?void 0:De.baseSelect,{children:d.map(Ae=>v.createElement(L.slots.baseSelectOption,W({},ie,{native:q,key:Ae.toString(),value:Ae.toString()}),P.current.getLocaleText(QDt(Ae))))}))})),R.jsxs(qDt,W({variant:"standard",as:L.slots.baseFormControl},V,w,{className:de(j.columnInput,V.className,w.className),ownerState:L,children:[R.jsx(L.slots.baseInputLabel,W({},X,{htmlFor:k,id:O,children:P.current.getLocaleText("filterPanelColumns")})),R.jsx(L.slots.baseSelect,W({labelId:O,id:k,label:P.current.getLocaleText("filterPanelColumns"),value:pe??"",onChange:fe,native:q,disabled:C},(_e=L.slotProps)==null?void 0:_e.baseSelect,{children:ae.map(Ae=>v.createElement(L.slots.baseSelectOption,W({},ie,{native:q,key:Ae.field,value:Ae.field}),xw(Ae)))}))]})),R.jsxs(KDt,W({variant:"standard",as:L.slots.baseFormControl},V,y,{className:de(j.operatorInput,V.className,y.className),ownerState:L,children:[R.jsx(L.slots.baseInputLabel,W({},X,{htmlFor:$,id:N,children:P.current.getLocaleText("filterPanelOperator")})),R.jsx(L.slots.baseSelect,W({labelId:N,label:P.current.getLocaleText("filterPanelOperator"),id:$,value:r.operator,onChange:Z,native:q,inputRef:_,disabled:C},(ye=L.slotProps)==null?void 0:ye.baseSelect,{children:(Pe=se==null?void 0:se.filterOperators)==null?void 0:Pe.map(Ae=>v.createElement(L.slots.baseSelectOption,W({},ie,{native:q,key:Ae.value,value:Ae.value}),Ae.label||P.current.getLocaleText(`filterOperator${y1(Ae.value)}`)))}))]})),R.jsx(YDt,W({variant:"standard",as:L.slots.baseFormControl},V,Q,{className:de(j.valueInput,V.className,Q.className),ownerState:L,children:re!=null&&re.InputComponent?R.jsx(re.InputComponent,W({apiRef:P,item:r,applyValue:a,focusElementRef:D,disabled:C},re.InputComponentProps,ee),r.field):null}))]}))}),XDt=["logicOperators","columnsSort","filterFormProps","getColumnForNewFilter","children","disableAddFilterButton","disableRemoveAllButton"],LQ=e=>({field:e.field,operator:e.filterOperators[0].value,id:Math.round(Math.random()*1e5)}),JDt=v.forwardRef(function(t,n){var N,L;const r=En(),o=Ot(),i=Ye(r,di),a=Ye(r,efe),s=Ye(r,HOt),l=v.useRef(null),c=v.useRef(null),{logicOperators:u=[Zi.And,Zi.Or],columnsSort:d,filterFormProps:f,getColumnForNewFilter:p,disableAddFilterButton:h=!1,disableRemoveAllButton:m=!1}=t,y=Dt(t,XDt),w=r.current.upsertFilterItem,x=v.useCallback(j=>{r.current.setFilterLogicOperator(j)},[r]),C=v.useCallback(()=>{let j;if(p&&typeof p=="function"){const D=p({currentFilters:(i==null?void 0:i.items)||[],columns:a});if(D===null)return null;j=a.find(({field:_})=>_===D)}else j=a.find(D=>{var _;return(_=D.filterOperators)==null?void 0:_.length});return j?LQ(j):null},[i==null?void 0:i.items,a,p]),E=v.useCallback(()=>{if(p===void 0||typeof p!="function")return C();const j=i.items.length?i.items:[C()].filter(Boolean),D=p({currentFilters:j,columns:a});if(D===null)return null;const _=a.find(({field:z})=>z===D);return _?LQ(_):null},[i.items,a,p,C]),P=v.useMemo(()=>i.items.length?i.items:(c.current||(c.current=C()),c.current?[c.current]:[]),[i.items,C]),T=P.length>1,{readOnlyFilters:I,validFilters:A}=v.useMemo(()=>P.reduce((j,D)=>(s[D.field]?j.validFilters.push(D):j.readOnlyFilters.push(D),j),{readOnlyFilters:[],validFilters:[]}),[P,s]),k=v.useCallback(()=>{const j=E();j&&r.current.upsertFilterItems([...P,j])},[r,E,P]),O=v.useCallback(j=>{const D=A.length===1;r.current.deleteFilterItem(j),D&&r.current.hideFilterPanel()},[r,A.length]),$=v.useCallback(()=>A.length===1&&A[0].value===void 0?(r.current.deleteFilterItem(A[0]),r.current.hideFilterPanel()):r.current.setFilterModel(W({},i,{items:I}),"removeAllFilterItems"),[r,I,i,A]);return v.useEffect(()=>{u.length>0&&i.logicOperator&&!u.includes(i.logicOperator)&&x(u[0])},[u,x,i.logicOperator]),v.useEffect(()=>{A.length>0&&l.current.focus()},[A.length]),R.jsxs(epe,W({ref:n},y,{children:[R.jsxs(NDt,{children:[I.map((j,D)=>R.jsx(NQ,W({item:j,applyFilterChanges:w,deleteFilter:O,hasMultipleFilters:T,showMultiFilterOperators:D>0,disableMultiFilterOperator:D!==1,applyMultiFilterOperatorChanges:x,focusElementRef:null,readOnly:!0,logicOperators:u,columnsSort:d},f),j.id==null?D:j.id)),A.map((j,D)=>R.jsx(NQ,W({item:j,applyFilterChanges:w,deleteFilter:O,hasMultipleFilters:T,showMultiFilterOperators:I.length+D>0,disableMultiFilterOperator:I.length+D!==1,applyMultiFilterOperatorChanges:x,focusElementRef:D===A.length-1?l:null,logicOperators:u,columnsSort:d},f),j.id==null?D+I.length:j.id))]}),!o.disableMultipleColumnsFiltering&&!(h&&m)?R.jsxs(BDt,{children:[h?R.jsx("span",{}):R.jsx(o.slots.baseButton,W({onClick:k,startIcon:R.jsx(o.slots.filterPanelAddIcon,{})},(N=o.slotProps)==null?void 0:N.baseButton,{children:r.current.getLocaleText("filterPanelAddFilter")})),!m&&A.length>0?R.jsx(o.slots.baseButton,W({onClick:$,startIcon:R.jsx(o.slots.filterPanelRemoveAllIcon,{})},(L=o.slotProps)==null?void 0:L.baseButton,{children:r.current.getLocaleText("filterPanelRemoveAll")})):null]}):null]}))}),ZDt=["hideMenu","options"],e_t=["hideMenu","options"];function t_t(e){const t=En(),{hideMenu:n,options:r}=e,o=Dt(e,ZDt);return R.jsx(en,W({onClick:()=>{t.current.exportDataAsCsv(r),n==null||n()}},o,{children:t.current.getLocaleText("toolbarExportCSV")}))}function n_t(e){const t=En(),{hideMenu:n,options:r}=e,o=Dt(e,e_t);return R.jsx(en,W({onClick:()=>{t.current.exportDataAsPrint(r),n==null||n()}},o,{children:t.current.getLocaleText("toolbarExportPrint")}))}const r_t=["className","selectedRowCount"],o_t=e=>{const{classes:t}=e;return Tn({root:["selectedRowCount"]},In,t)},i_t=or("div",{name:"MuiDataGrid",slot:"SelectedRowCount",overridesResolver:(e,t)=>t.selectedRowCount})(({theme:e})=>({alignItems:"center",display:"flex",margin:e.spacing(0,2),visibility:"hidden",width:0,height:0,[e.breakpoints.up("sm")]:{visibility:"visible",width:"auto",height:"auto"}})),a_t=v.forwardRef(function(t,n){const{className:r,selectedRowCount:o}=t,i=Dt(t,r_t),a=En(),s=Ot(),l=o_t(s),c=a.current.getLocaleText("footerRowSelected")(o);return R.jsx(i_t,W({ref:n,className:de(l.root,r),ownerState:s},i,{children:c}))}),s_t=v.forwardRef(function(t,n){var d,f;const r=En(),o=Ot(),i=Ye(r,IAt),a=Ye(r,nkt),s=Ye(r,YH),l=!o.hideFooterSelectedRowCount&&a>0?R.jsx(a_t,{selectedRowCount:a}):R.jsx("div",{}),c=!o.hideFooterRowCount&&!o.pagination?R.jsx(o.slots.footerRowCount,W({},(d=o.slotProps)==null?void 0:d.footerRowCount,{rowCount:i,visibleRowCount:s})):null,u=o.pagination&&!o.hideFooterPagination&&o.slots.pagination&&R.jsx(o.slots.pagination,W({},(f=o.slotProps)==null?void 0:f.pagination));return R.jsxs(i$t,W({ref:n},t,{children:[l,c,u]}))});function l_t(){var i,a;const e=En(),t=Ye(e,Cc),n=Ot(),r=Ye(e,eC),o=e.current.unstable_applyPipeProcessors("preferencePanel",null,r.openedPanelValue??Ig.filters);return R.jsx(n.slots.panel,W({as:n.slots.basePopper,open:t.length>0&&r.open,id:r.panelId,"aria-labelledby":r.labelId},(i=n.slotProps)==null?void 0:i.panel,(a=n.slotProps)==null?void 0:a.basePopper,{children:o}))}function c_t(){var t;const e=Ot();return R.jsxs(v.Fragment,{children:[R.jsx(l_t,{}),e.slots.toolbar&&R.jsx(e.slots.toolbar,W({},(t=e.slotProps)==null?void 0:t.toolbar))]})}const i5=(e,t,n,r,o)=>{const i=o.hasScrollY?o.scrollbarSize:0;let a;switch(e){case br.LEFT:a=r[n];break;case br.RIGHT:a=o.columnsTotalWidth-r[n]-t+i;break;default:a=0;break}return a},Sw={root:le.scrollbarFiller,header:le["scrollbarFiller--header"],borderTop:le["scrollbarFiller--borderTop"],borderBottom:le["scrollbarFiller--borderBottom"],pinnedRight:le["scrollbarFiller--pinnedRight"]};function a5({header:e,borderTop:t=!0,borderBottom:n,pinnedRight:r}){return R.jsx("div",{role:"presentation",className:de(Sw.root,e&&Sw.header,t&&Sw.borderTop,n&&Sw.borderBottom,r&&Sw.pinnedRight)})}const u_t=or("div",{name:"MuiDataGrid",slot:"SkeletonLoadingOverlay",overridesResolver:(e,t)=>t.skeletonLoadingOverlay})({minWidth:"100%",width:"max-content",height:"100%",overflow:"clip"}),d_t=e=>{const{classes:t}=e;return Tn({root:["skeletonLoadingOverlay"]},In,t)},FQ=e=>parseInt(e.getAttribute("data-colindex"),10),f_t=v.forwardRef(function(t,n){const r=Ot(),{slots:o}=r,i=d_t({classes:r.classes}),a=v.useRef(null),s=Jg(a,n),l=En(),c=Ye(l,wi),u=(c==null?void 0:c.viewportInnerSize.height)??0,d=Math.ceil(u/c.rowHeight),f=Ye(l,VH),p=Ye(l,Vp),h=v.useMemo(()=>p.filter(T=>T<=f).length,[f,p]),m=Ye(l,Io),y=v.useMemo(()=>m.slice(0,h),[m,h]),w=Ye(l,b1),x=v.useCallback((T,I,A)=>{const k=i5(A,T,I,p,c);return{[A]:k}},[c,p]),C=v.useCallback(T=>{if(w.left.findIndex(I=>I.field===T)!==-1)return br.LEFT;if(w.right.findIndex(I=>I.field===T)!==-1)return br.RIGHT},[w.left,w.right]),E=v.useMemo(()=>{const T=[];for(let I=0;Ise.field===O.field):k-w.left.length,_=$&&x(O.computedWidth,k,$),z=c.columnsTotalWidth0},`skeleton-scrollbar-filler-${I}`))}T.push(R.jsx("div",{className:de(le.row,le.rowSkeleton,I===0&&le["row--firstVisible"]),children:A},`skeleton-row-${I}`))}return T},[o,y,w,d,r.showCellVerticalBorder,c.columnsTotalWidth,c.viewportOuterSize.width,c.rowHeight,c.hasScrollY,c.scrollbarSize,C,x]);return bt(l,"columnResize",T=>{var _,z,F;const{colDef:I,width:A}=T,k=(_=a.current)==null?void 0:_.querySelectorAll(`[data-field="${Bd(I.field)}"]`);if(!k)throw new Error("MUI X: Expected skeleton cells to be defined with `data-field` attribute.");const O=y.findIndex(V=>V.field===I.field),$=C(I.field),N=$===br.LEFT,L=$===br.RIGHT,j=getComputedStyle(k[0]).getPropertyValue("--width"),D=parseInt(j,10)-A;if(k&&k.forEach(V=>{V.style.setProperty("--width",`${A}px`)}),N){const V=(z=a.current)==null?void 0:z.querySelectorAll(`.${le["cell--pinnedLeft"]}`);V==null||V.forEach(U=>{FQ(U)>O&&(U.style.left=`${parseInt(getComputedStyle(U).left,10)-D}px`)})}if(L){const V=(F=a.current)==null?void 0:F.querySelectorAll(`.${le["cell--pinnedRight"]}`);V==null||V.forEach(U=>{FQ(U)({maxHeight:"calc(100% + 1px)",flexGrow:1,[`& .${Xh.selectLabel}`]:{display:"none",[e.breakpoints.up("sm")]:{display:"block"}},[`& .${Xh.input}`]:{display:"none",[e.breakpoints.up("sm")]:{display:"inline-flex"}}})),v_t=(e,t)=>({from:n,to:r,count:o,page:i})=>e({from:n,to:r,count:o,page:i,estimated:t}),b_t=({from:e,to:t,count:n,estimated:r})=>r?`${e}–${t} of ${n!==-1?n:`more than ${r>t?r:t}`}`:`${e}–${t} of ${n!==-1?n:`more than ${t}`}`,w_t=v.forwardRef(function(t,n){const r=En(),o=Ot(),i=Ye(r,Ji),a=Ye(r,Oy),s=Ye(r,Ofe),{paginationMode:l,loading:c,estimatedRowCount:u}=o,d=v.useMemo(()=>a===-1&&l==="server"&&c?{backIconButtonProps:{disabled:!0},nextIconButtonProps:{disabled:!0}}:{},[c,l,a]),f=v.useMemo(()=>Math.max(0,s-1),[s]),p=v.useMemo(()=>a===-1||i.page<=f?i.page:f,[f,i.page,a]),h=v.useCallback(E=>{const P=Number(E.target.value);r.current.setPageSize(P)},[r]),m=v.useCallback((E,P)=>{r.current.setPage(P)},[r]),w=(E=>{for(let P=0;P{const{classes:t}=e;return Tn({root:["rowCount"]},In,t)},C_t=or("div",{name:"MuiDataGrid",slot:"RowCount",overridesResolver:(e,t)=>t.rowCount})(({theme:e})=>({alignItems:"center",display:"flex",margin:e.spacing(0,2)})),E_t=v.forwardRef(function(t,n){const{className:r,rowCount:o,visibleRowCount:i}=t,a=Dt(t,x_t),s=En(),l=Ot(),c=S_t(l);if(o===0)return null;const u=i=d.left.length&&m=h.lastColumnIndex,se=P_t(j.classes,{root:["row",r&&"selected",Q&&"row--editable",ee&&"row--editing",y&&"row--firstVisible",w&&"row--lastVisible",C&&"row--borderBottom",l==="auto"&&"row--dynamicHeight"]}),re=N.hooks.useGridRowAriaAttributes();v.useLayoutEffect(()=>{if(D.range){const ot=$.current.getRowIndexRelativeToVisibleRows(o);ot!==void 0&&$.current.unstable_setLastMeasuredRowIndex(ot)}if(L.current&&l==="auto")return $.current.observeRowHeight(L.current,o)},[$,D.range,l,o]);const fe=v.useCallback((ot,et)=>St=>{C1(St)||$.current.getRow(o)&&($.current.publishEvent(ot,$.current.getRowParams(o),St),et&&et(St))},[$,o]),Z=v.useCallback(ot=>{const et=$O(ot.target,le.cell),St=et==null?void 0:et.getAttribute("data-field");if(St){if(St===y0.field||St===zM||St==="__reorder__"||$.current.getCellMode(o,St)===ar.Edit)return;const On=$.current.getColumn(St);if((On==null?void 0:On.type)===FM)return}fe("rowClick",E)(ot)},[$,E,fe,o]),{slots:ce,slotProps:ge,disableColumnReorder:we}=j,me=j.rowReordering,Se=Ye($,()=>W({},$.current.getRowHeightEntry(o)),Qde),xe=v.useMemo(()=>{if(x)return{opacity:0,width:0,height:0};const ot=W({},s,{maxHeight:l==="auto"?"none":l,minHeight:l,"--height":typeof l=="number"?`${l}px`:l});if(Se.spacingTop){const et=j.rowSpacingType==="border"?"borderTopWidth":"marginTop";ot[et]=Se.spacingTop}if(Se.spacingBottom){const et=j.rowSpacingType==="border"?"borderBottomWidth":"marginBottom";let St=ot[et];typeof St!="number"&&(St=parseInt(St||"0",10)),St+=Se.spacingBottom,ot[et]=St}return ot},[x,l,s,Se,j.rowSpacingType]),ke=$.current.unstable_applyPipeProcessors("rowClassName",[],o),De=q?re(q,a):void 0;if(typeof j.getRowClassName=="function"){const ot=a-(((ht=D.range)==null?void 0:ht.firstRowIndex)||0),et=W({},$.current.getRowParams(o),{isFirstVisible:ot===0,isLastVisible:ot===D.rows.length-1,indexRelativeToCurrentPage:ot});ke.push(j.getRowClassName(et))}const _e=(ot,et,St,On,Ke=Ca.NONE)=>{var Ds;const $e=$.current.unstable_getCellColSpanInfo(o,St);if($e!=null&&$e.spannedByColSpan)return null;const Qe=($e==null?void 0:$e.cellProps.width)??ot.computedWidth,Et=($e==null?void 0:$e.cellProps.colSpan)??1,Xt=i5(Yfe[Ke],ot.computedWidth,St,F,p);if((q==null?void 0:q.type)==="skeletonRow")return R.jsx(ce.skeletonCell,{type:ot.type,width:Qe,height:l,field:ot.field,align:ot.align},ot.field);const $t=((Ds=V[o])==null?void 0:Ds[ot.field])??null,bn=ot.field==="__reorder__",Gn=Object.keys(V).length>0,Jn=!(we||ot.disableReorder),Do=me&&!_.length&&z<=1&&!Gn,no=!(Jn||bn&&Do),Bi=Ke===Ca.VIRTUAL;return R.jsx(ce.cell,W({column:ot,width:Qe,rowId:o,align:ot.align||"left",colIndex:St,colSpan:Et,disableDragEvents:no,editCellState:$t,isNotVisible:Bi,pinnedOffset:Xt,pinnedPosition:Ke,sectionIndex:et,sectionLength:On,gridHasFiller:ie},ge==null?void 0:ge.cell),ot.field)};if(!q)return null;const ye=d.left.map((ot,et)=>_e(ot,et,et,d.left.length,Ca.LEFT)),Pe=d.right.map((ot,et)=>{const St=u.length-d.right.length+et;return _e(ot,et,St,d.right.length,Ca.RIGHT)}),Ae=u.length-d.left.length-d.right.length,Me=[];pe&&Me.push(_e(u[m],m-d.left.length,m,Ae,Ca.VIRTUAL));for(let ot=h.firstColumnIndex;ot0&&R.jsx(I_t,{width:Xe}),Pe.length>0&&R.jsx("div",{role:"presentation",className:le.filler}),Pe,X!==0&&R.jsx(a5,{pinnedRight:d.right.length>0})]}))}),A_t=zp(O_t),k_t=()=>{const e=Ul(),t=Ot(),n=Ye(e,Io),r=Ye(e,KH),o=Ye(e,S1),i=Ye(e,MAt);return{role:"grid","aria-colcount":n.length,"aria-rowcount":o+1+i+r,"aria-multiselectable":QH(t)}},M_t=()=>{const e=Ul(),t=Ye(e,hd),n=Ye(e,S1);return v.useCallback((r,o)=>{const i={},a=o+n+2;return i["aria-rowindex"]=a,e.current.isRowSelectable(r.id)&&(i["aria-selected"]=t[r.id]!==void 0),i},[e,t,n])};function R_t({privateApiRef:e,configuration:t,props:n,children:r}){const o=v.useRef(e.current.getPublicApi());return R.jsx(zfe.Provider,{value:t,children:R.jsx(Wde.Provider,{value:n,children:R.jsx(Nfe.Provider,{value:e,children:R.jsx(Ude.Provider,{value:o,children:r})})})})}const $_t=e=>{const t=v.useRef(null),n=v.useRef(null),r=v.useRef(null),o=v.useRef(null),i=v.useRef(null),a=v.useRef(null);e.current.register("public",{rootElementRef:t}),e.current.register("private",{mainElementRef:n,virtualScrollerRef:r,virtualScrollbarVerticalRef:o,virtualScrollbarHorizontalRef:i,columnHeadersContainerRef:a})},D_t=e=>{const t=dr();e.current.state.isRtl===void 0&&(e.current.state.isRtl=t);const n=v.useRef(!0);v.useEffect(()=>{n.current?n.current=!1:e.current.setState(r=>W({},r,{isRtl:t}))},[e,t])},__t=oAt()&&window.localStorage.getItem("DEBUG")!=null,Yw=()=>{},N_t={debug:Yw,info:Yw,warn:Yw,error:Yw},jQ=["debug","info","warn","error"];function BQ(e,t,n=console){const r=jQ.indexOf(t);if(r===-1)throw new Error(`MUI X: Log level ${t} not recognized.`);return jQ.reduce((i,a,s)=>(s>=r?i[a]=(...l)=>{const[c,...u]=l;n[a](`MUI X: ${e} - ${c}`,...u)}:i[a]=Yw,i),{})}const L_t=(e,t)=>{const n=v.useCallback(r=>__t?BQ(r,"debug",t.logger):t.logLevel?BQ(r,t.logLevel.toString(),t.logger):N_t,[t.logLevel,t.logger]);ln(e,{getLogger:n},"private")};class F_t{constructor(){this.maxListeners=20,this.warnOnce=!1,this.events={}}on(t,n,r={}){let o=this.events[t];o||(o={highPriority:new Map,regular:new Map},this.events[t]=o),r.isFirst?o.highPriority.set(n,!0):o.regular.set(n,!0)}removeListener(t,n){this.events[t]&&(this.events[t].regular.delete(n),this.events[t].highPriority.delete(n))}removeAllListeners(){this.events={}}emit(t,...n){const r=this.events[t];if(!r)return;const o=Array.from(r.highPriority.keys()),i=Array.from(r.regular.keys());for(let a=o.length-1;a>=0;a-=1){const s=o[a];r.highPriority.has(s)&&s.apply(this,n)}for(let a=0;a(this.listeners.add(n),()=>{this.listeners.delete(n)}),this.getSnapshot=()=>this.value,this.update=n=>{this.value=n,this.listeners.forEach(r=>r(n))},this.value=t,this.listeners=new Set}}const npe=Symbol("mui.api_private"),j_t=e=>e.isPropagationStopped!==void 0;let zQ=0;function B_t(e){var o;const t=(o=e.current)==null?void 0:o[npe];if(t)return t;const n={},r={state:n,store:s5.create(n),instanceId:{id:zQ}};return zQ+=1,r.getPublicApi=()=>e.current,r.register=(i,a)=>{Object.keys(a).forEach(s=>{const l=a[s],c=r[s];if((c==null?void 0:c.spying)===!0?c.target=l:r[s]=l,i==="public"){const u=e.current,d=u[s];(d==null?void 0:d.spying)===!0?d.target=l:u[s]=l}})},r.register("private",{caches:{},eventManager:new F_t}),r}function z_t(e){return{get state(){return e.current.state},get store(){return e.current.store},get instanceId(){return e.current.instanceId},[npe]:e.current}}function V_t(e,t){var a;const n=v.useRef(),r=v.useRef();r.current||(r.current=B_t(n)),n.current||(n.current=z_t(r));const o=v.useCallback((...s)=>{const[l,c,u={}]=s;if(u.defaultMuiPrevented=!1,j_t(u)&&u.isPropagationStopped())return;const d=t.signature===Cl.DataGridPro||t.signature===Cl.DataGridPremium?{api:r.current.getPublicApi()}:{};r.current.eventManager.emit(l,c,u,d)},[r,t.signature]),i=v.useCallback((s,l,c)=>{r.current.eventManager.on(s,l,c);const u=r.current;return()=>{u.eventManager.removeListener(s,l)}},[r]);return ln(r,{subscribeEvent:i,publishEvent:o},"public"),e&&!((a=e.current)!=null&&a.state)&&(e.current=n.current),v.useImperativeHandle(e,()=>n.current,[n]),v.useEffect(()=>{const s=r.current;return()=>{s.publishEvent("unmount")}},[r]),r}const H_t=(e,t)=>{const n=v.useCallback(r=>{if(t.localeText[r]==null)throw new Error(`Missing translation for key ${r}.`);return t.localeText[r]},[t.localeText]);e.current.register("public",{getLocaleText:n})};function tC(e){"@babel/helpers - typeof";return tC=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},tC(e)}function U_t(e,t){if(tC(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(tC(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function nC(e){var t=U_t(e,"string");return tC(t)=="symbol"?t:t+""}const W_t=e=>{const t=v.useRef({}),n=v.useRef(!1),r=v.useCallback(u=>{n.current||!u||(n.current=!0,Object.values(u.appliers).forEach(d=>{d()}),n.current=!1)},[]),o=v.useCallback((u,d,f)=>{t.current[u]||(t.current[u]={processors:new Map,processorsAsArray:[],appliers:{}});const p=t.current[u];return p.processors.get(d)!==f&&(p.processors.set(d,f),p.processorsAsArray=Array.from(t.current[u].processors.values()),r(p)),()=>{t.current[u].processors.delete(d),t.current[u].processorsAsArray=Array.from(t.current[u].processors.values())}},[r]),i=v.useCallback((u,d,f)=>(t.current[u]||(t.current[u]={processors:new Map,processorsAsArray:[],appliers:{}}),t.current[u].appliers[d]=f,()=>{const p=t.current[u].appliers,h=Dt(p,[d].map(nC));t.current[u].appliers=h}),[]),a=v.useCallback(u=>{r(t.current[u])},[r]),s=v.useCallback((...u)=>{const[d,f,p]=u;if(!t.current[d])return f;const h=t.current[d].processorsAsArray;let m=f;for(let y=0;y{const r=v.useRef(),o=v.useRef(`mui-${Math.round(Math.random()*1e9)}`),i=v.useCallback(()=>{r.current=e.current.registerPipeProcessor(t,o.current,n)},[e,n,t]);x1(()=>{i()});const a=v.useRef(!0);v.useEffect(()=>(a.current?a.current=!1:i(),()=>{r.current&&(r.current(),r.current=null)}),[i])},l5=(e,t,n)=>{const r=v.useRef(),o=v.useRef(`mui-${Math.round(Math.random()*1e9)}`),i=v.useCallback(()=>{r.current=e.current.registerPipeApplier(t,o.current,n)},[e,n,t]);x1(()=>{i()});const a=v.useRef(!0);v.useEffect(()=>(a.current?a.current=!1:i(),()=>{r.current&&(r.current(),r.current=null)}),[i])},_O=(e,t,n,r)=>{const o=v.useCallback(()=>{e.current.registerStrategyProcessor(t,n,r)},[e,r,n,t]);x1(()=>{o()});const i=v.useRef(!0);v.useEffect(()=>{i.current?i.current=!1:o()},[o])},Og="none",VQ={rowTreeCreation:"rowTree",filtering:"rowTree",sorting:"rowTree",visibleRowsLookupCreation:"rowTree"},G_t=e=>{const t=v.useRef(new Map),n=v.useRef({}),r=v.useCallback((l,c,u)=>{const d=()=>{const h=n.current[c],m=Dt(h,[l].map(nC));n.current[c]=m};n.current[c]||(n.current[c]={});const f=n.current[c],p=f[l];return f[l]=u,!p||p===u||l===e.current.getActiveStrategy(VQ[c])&&e.current.publishEvent("activeStrategyProcessorChange",c),d},[e]),o=v.useCallback((l,c)=>{const u=e.current.getActiveStrategy(VQ[l]);if(u==null)throw new Error("Can't apply a strategy processor before defining an active strategy");const d=n.current[l];if(!d||!d[u])throw new Error(`No processor found for processor "${l}" on strategy "${u}"`);const f=d[u];return f(c)},[e]),i=v.useCallback(l=>{const u=Array.from(t.current.entries()).find(([,d])=>d.group!==l?!1:d.isAvailable());return(u==null?void 0:u[0])??Og},[]),a=v.useCallback((l,c,u)=>{t.current.set(c,{group:l,isAvailable:u}),e.current.publishEvent("strategyAvailabilityChange")},[e]);ln(e,{registerStrategyProcessor:r,applyStrategyProcessor:o,getActiveStrategy:i,setStrategyAvailability:a},"private")},q_t=e=>{const t=v.useRef({}),[,n]=v.useState(),r=v.useCallback(c=>{t.current[c.stateId]=c},[]),o=v.useCallback((c,u)=>{let d;if(ofe(c)?d=c(e.current.state):d=c,e.current.state===d)return!1;let f=!1;const p=[];if(Object.keys(t.current).forEach(h=>{const m=t.current[h],y=m.stateSelector(e.current.state,e.current.instanceId),w=m.stateSelector(d,e.current.instanceId);w!==y&&(p.push({stateId:m.stateId,hasPropChanged:w!==m.propModel}),m.propModel!==void 0&&w!==m.propModel&&(f=!0))}),p.length>1)throw new Error(`You're not allowed to update several sub-state in one transaction. You already updated ${p[0].stateId}, therefore, you're not allowed to update ${p.map(h=>h.stateId).join(", ")} in the same transaction.`);if(f||(e.current.state=d,e.current.publishEvent("stateChange",d),e.current.store.update(d)),p.length===1){const{stateId:h,hasPropChanged:m}=p[0],y=t.current[h],w=y.stateSelector(d,e.current.instanceId);y.propOnChange&&m&&y.propOnChange(w,{reason:u,api:e.current}),f||e.current.publishEvent(y.changeEvent,w,{reason:u})}return!f},[e]),i=v.useCallback((c,u,d)=>e.current.setState(f=>W({},f,{[c]:u(f[c])}),d),[e]),a=v.useCallback(()=>n(()=>e.current.state),[e]),s={setState:o,forceUpdate:a},l={updateControlState:i,registerControlState:r};ln(e,s,"public"),ln(e,l,"private")},K_t=(e,t)=>{const n=V_t(e,t);return $_t(n),D_t(n),L_t(n,t),q_t(n),W_t(n),G_t(n),H_t(n,t),n.current.register("private",{rootProps:t}),n},Ko=(e,t,n)=>{const r=v.useRef(!1);r.current||(t.current.state=e(t.current.state,n,t),r.current=!0)};function KF(e,t){if(e==null)return"";const n=typeof e=="string"?e:`${e}`;if(t.shouldAppendQuotes||t.escapeFormulas){const r=n.replace(/"/g,'""');return t.escapeFormulas&&["=","+","-","@"," ","\r"].includes(r[0])?`"'${r}"`:[t.delimiter,` -`,"\r",'"'].some(o=>n.includes(o))?`"${r}"`:r}return n}const rpe=(e,t)=>{var i,a;const{csvOptions:n,ignoreValueFormatter:r}=t;let o;if(r){const s=e.colDef.type;s==="number"?o=String(e.value):s==="date"||s==="dateTime"?o=(i=e.value)==null?void 0:i.toISOString():typeof((a=e.value)==null?void 0:a.toString)=="function"?o=e.value.toString():o=e.value}else o=e.formattedValue;return KF(o,n)};class YF{constructor(t){this.options=void 0,this.rowString="",this.isEmpty=!0,this.options=t}addValue(t){this.isEmpty||(this.rowString+=this.options.csvOptions.delimiter),typeof this.options.sanitizeCellValue=="function"?this.rowString+=this.options.sanitizeCellValue(t,this.options.csvOptions):this.rowString+=t,this.isEmpty=!1}getRowString(){return this.rowString}}const Y_t=({id:e,columns:t,getCellParams:n,csvOptions:r,ignoreValueFormatter:o})=>{const i=new YF({csvOptions:r});return t.forEach(a=>{const s=n(e,a.field);i.addValue(rpe(s,{ignoreValueFormatter:o,csvOptions:r}))}),i.getRowString()};function Q_t(e){const{columns:t,rowIds:n,csvOptions:r,ignoreValueFormatter:o,apiRef:i}=e,a=n.reduce((d,f)=>`${d}${Y_t({id:f,columns:t,getCellParams:i.current.getCellParams,ignoreValueFormatter:o,csvOptions:r})}\r -`,"").trim();if(!r.includeHeaders)return a;const s=t.filter(d=>d.field!==y0.field),l=[];if(r.includeColumnGroupsHeaders){const d=i.current.getAllGroupDetails();let f=0;const p=s.reduce((h,m)=>{const y=i.current.getColumnGroupPath(m.field);return h[m.field]=y,f=Math.max(f,y.length),h},{});for(let h=0;h{const w=(p[y.field]||[])[h],x=d[w];m.addValue(x?x.headerName||x.groupId:"")})}}const c=new YF({csvOptions:r,sanitizeCellValue:KF});return s.forEach(d=>{c.addValue(d.headerName||d.field)}),l.push(c),`${`${l.map(d=>d.getRowString()).join(`\r + & .${le["row--borderBottom"]} .${le.scrollbarFiller}`]:{borderBottom:"1px solid var(--DataGrid-rowBorderColor)"},[`& .${le["row--borderBottom"]} .${le.cell}`]:{borderBottom:"1px solid var(--rowBorderColor)"},[`.${le.row}`]:{display:"flex",width:"var(--DataGrid-rowWidth)",breakInside:"avoid","--rowBorderColor":"var(--DataGrid-rowBorderColor)",[`&.${le["row--firstVisible"]}`]:{"--rowBorderColor":"transparent"},"&:hover":{backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${le.rowSkeleton}:hover`]:{backgroundColor:"transparent"},"&.Mui-selected":T},[`& .${le["container--top"]}, & .${le["container--bottom"]}`]:{"[role=row]":{background:"var(--DataGrid-containerBackground)"}},[`& .${le.cell}`]:{flex:"0 0 auto",height:"var(--height)",width:"var(--width)",lineHeight:"calc(var(--height) - 1px)",boxSizing:"border-box",borderTop:"1px solid var(--rowBorderColor)",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis","&.Mui-selected":T},[`& .${le["virtualScrollerContent--overflowed"]} .${le["row--lastVisible"]} .${le.cell}`]:{borderTopColor:"transparent"},[`& .${le["pinnedRows--top"]} :first-of-type`]:{[`& .${le.cell}, .${le.scrollbarFiller}`]:{borderTop:"none"}},[`&.${le["root--disableUserSelection"]} .${le.cell}`]:{userSelect:"none"},[`& .${le["row--dynamicHeight"]} > .${le.cell}`]:{whiteSpace:"initial",lineHeight:"inherit"},[`& .${le.cellEmpty}`]:{padding:0,height:"unset"},[`& .${le.cell}.${le["cell--selectionMode"]}`]:{cursor:"default"},[`& .${le.cell}.${le["cell--editing"]}`]:{padding:1,display:"flex",boxShadow:e.shadows[2],backgroundColor:(e.vars||e).palette.background.paper,"&:focus-within":{outline:`${Gm}px solid ${(e.vars||e).palette.primary.main}`,outlineOffset:Gm*-1}},[`& .${le["row--editing"]}`]:{boxShadow:e.shadows[2]},[`& .${le["row--editing"]} .${le.cell}`]:{boxShadow:e.shadows[0],backgroundColor:(e.vars||e).palette.background.paper},[`& .${le.editBooleanCell}`]:{display:"flex",height:"100%",width:"100%",alignItems:"center",justifyContent:"center"},[`& .${le.booleanCell}[data-value="true"]`]:{color:(e.vars||e).palette.text.secondary},[`& .${le.booleanCell}[data-value="false"]`]:{color:(e.vars||e).palette.text.disabled},[`& .${le.actionsCell}`]:{display:"inline-flex",alignItems:"center",gridGap:e.spacing(1)},[`& .${le.rowReorderCell}`]:{display:"inline-flex",flex:1,alignItems:"center",justifyContent:"center",opacity:(e.vars||e).palette.action.disabledOpacity},[`& .${le["rowReorderCell--draggable"]}`]:{cursor:"move",opacity:1},[`& .${le.rowReorderCellContainer}`]:{padding:0,display:"flex",alignItems:"stretch"},[`.${le.withBorderColor}`]:{borderColor:r},[`& .${le["cell--withLeftBorder"]}, & .${le["columnHeader--withLeftBorder"]}`]:{borderLeftColor:"var(--DataGrid-rowBorderColor)",borderLeftWidth:"1px",borderLeftStyle:"solid"},[`& .${le["cell--withRightBorder"]}, & .${le["columnHeader--withRightBorder"]}`]:{borderRightColor:"var(--DataGrid-rowBorderColor)",borderRightWidth:"1px",borderRightStyle:"solid"},[`& .${le["cell--flex"]}`]:{display:"flex",alignItems:"center",lineHeight:"inherit"},[`& .${le["cell--textLeft"]}`]:{textAlign:"left",justifyContent:"flex-start"},[`& .${le["cell--textRight"]}`]:{textAlign:"right",justifyContent:"flex-end"},[`& .${le["cell--textCenter"]}`]:{textAlign:"center",justifyContent:"center"},[`& .${le["cell--pinnedLeft"]}, & .${le["cell--pinnedRight"]}`]:{position:"sticky",zIndex:3,background:"var(--DataGrid-pinnedBackground)","&.Mui-selected":{backgroundColor:x}},[`& .${le.virtualScrollerContent} .${le.row}`]:{"&:hover":w,"&.Mui-selected":S,"&.Mui-selected:hover":P},[`& .${le.cellOffsetLeft}`]:{flex:"0 0 auto",display:"inline-block"},[`& .${le.cellSkeleton}`]:{flex:"0 0 auto",height:"100%",display:"inline-flex",alignItems:"center"},[`& .${le.columnHeaderDraggableContainer}`]:{display:"flex",width:"100%",height:"100%"},[`& .${le.rowReorderCellPlaceholder}`]:{display:"none"},[`& .${le["columnHeader--dragging"]}, & .${le["row--dragging"]}`]:{background:(e.vars||e).palette.background.paper,padding:"0 12px",borderRadius:"var(--unstable_DataGrid-radius)",opacity:(e.vars||e).palette.action.disabledOpacity},[`& .${le["row--dragging"]}`]:{background:(e.vars||e).palette.background.paper,padding:"0 12px",borderRadius:"var(--unstable_DataGrid-radius)",opacity:(e.vars||e).palette.action.disabledOpacity,[`& .${le.rowReorderCellPlaceholder}`]:{display:"flex"}},[`& .${le.treeDataGroupingCell}`]:{display:"flex",alignItems:"center",width:"100%"},[`& .${le.treeDataGroupingCellToggle}`]:{flex:"0 0 28px",alignSelf:"stretch",marginRight:e.spacing(2)},[`& .${le.treeDataGroupingCellLoadingContainer}, .${le.groupingCriteriaCellLoadingContainer}`]:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"},[`& .${le.groupingCriteriaCell}`]:{display:"flex",alignItems:"center",width:"100%"},[`& .${le.groupingCriteriaCellToggle}`]:{flex:"0 0 28px",alignSelf:"stretch",marginRight:e.spacing(2)},[`.${le.scrollbarFiller}`]:{minWidth:"calc(var(--DataGrid-hasScrollY) * var(--DataGrid-scrollbarSize))",alignSelf:"stretch",[`&.${le["scrollbarFiller--borderTop"]}`]:{borderTop:"1px solid var(--DataGrid-rowBorderColor)"},[`&.${le["scrollbarFiller--borderBottom"]}`]:{borderBottom:"1px solid var(--DataGrid-rowBorderColor)"},[`&.${le["scrollbarFiller--pinnedRight"]}`]:{backgroundColor:"var(--DataGrid-pinnedBackground)",position:"sticky",right:0}},[`& .${le.filler}`]:{flex:"1 0 auto"},[`& .${le["filler--borderBottom"]}`]:{borderBottom:"1px solid var(--DataGrid-rowBorderColor)"},[`& .${le["main--hasSkeletonLoadingOverlay"]}`]:{[`& .${le.virtualScrollerContent}`]:{position:"fixed",visibility:"hidden"},[`& .${le["scrollbar--vertical"]}, & .${le.pinnedRows}, & .${le.virtualScroller} > .${le.filler}`]:{display:"none"}}})});function $$t(e,t,n,r=1){const o=(l,c)=>Math.round((l**(1/r)*(1-n)+c**(1/r)*n)**r),i=gu(e),a=gu(t),s=[o(i.values[0],a.values[0]),o(i.values[1],a.values[1]),o(i.values[2],a.values[2])];return kC({type:"rgb",values:s})}const D$t=e=>`rgb(from ${e} r g b / 1)`;function _$t(e,t,n){return`color-mix(in srgb,${e}, ${D$t(t)} calc(${n} * 100%))`}const N$t=["className"],L$t=(e,t)=>{const{autoHeight:n,classes:r,showCellVerticalBorder:o}=e,i={root:["root",n&&"autoHeight",`root--density${O1(t)}`,e.slots.toolbar===null&&"root--noToolbar","withBorderColor",o&&"withVerticalBorder"]};return In(i,On,r)},F$t=v.forwardRef(function(t,n){const r=Ot(),{className:o}=t,i=Dt(t,N$t),a=Gl(),s=Ye(a,Oy),l=a.current.rootElementRef,c=Zg(l,n),u=r,d=L$t(u,s),[f,p]=v.useState(!1);return Ho(()=>{p(!0)},[]),f?R.jsx(R$t,W({ref:c,className:de(d.root,o),ownerState:u},i)):null}),j$t=["className"],B$t=e=>{const{classes:t}=e;return In({root:["footerContainer","withBorderColor"]},On,t)},z$t=or("div",{name:"MuiDataGrid",slot:"FooterContainer",overridesResolver:(e,t)=>t.footerContainer})({display:"flex",justifyContent:"space-between",alignItems:"center",minHeight:52,borderTop:"1px solid"}),V$t=v.forwardRef(function(t,n){const{className:r}=t,o=Dt(t,j$t),i=Ot(),a=B$t(i);return R.jsx(z$t,W({ref:n,className:de(a.root,r),ownerState:i},o))}),H$t=["className"],U$t=e=>{const{classes:t}=e;return In({root:["overlay"]},On,t)},W$t=or("div",{name:"MuiDataGrid",slot:"Overlay",overridesResolver:(e,t)=>t.overlay})({width:"100%",height:"100%",display:"flex",alignSelf:"center",alignItems:"center",justifyContent:"center",backgroundColor:"var(--unstable_DataGrid-overlayBackground)"}),sH=v.forwardRef(function(t,n){const{className:r}=t,o=Dt(t,H$t),i=Ot(),a=U$t(i);return R.jsx(W$t,W({ref:n,className:de(a.root,r),ownerState:i},o))}),G$t=e=>{const{classes:t,open:n}=e;return In({root:["menuIcon",n&&"menuOpen"],button:["menuIconButton"]},On,t)},q$t=v.memo(e=>{var d,f;const{colDef:t,open:n,columnMenuId:r,columnMenuButtonId:o,iconButtonRef:i}=e,a=En(),s=Ot(),l=W({},e,{classes:s.classes}),c=G$t(l),u=v.useCallback(p=>{p.preventDefault(),p.stopPropagation(),a.current.toggleColumnMenu(t.field)},[a,t.field]);return R.jsx("div",{className:c.root,children:R.jsx(s.slots.baseTooltip,W({title:a.current.getLocaleText("columnMenuLabel"),enterDelay:1e3},(d=s.slotProps)==null?void 0:d.baseTooltip,{children:R.jsx(s.slots.baseIconButton,W({ref:i,tabIndex:-1,className:c.button,"aria-label":a.current.getLocaleText("columnMenuLabel"),size:"small",onClick:u,"aria-haspopup":"menu","aria-expanded":n,"aria-controls":n?r:void 0,id:o},(f=s.slotProps)==null?void 0:f.baseIconButton,{children:R.jsx(s.slots.columnMenuIcon,{fontSize:"inherit"})}))}))})});function K$t({columnMenuId:e,columnMenuButtonId:t,ContentComponent:n,contentComponentProps:r,field:o,open:i,target:a,onExited:s}){const l=En(),c=l.current.getColumn(o),u=Ar(d=>{d&&(d.stopPropagation(),a!=null&&a.contains(d.target))||l.current.hideColumnMenu()});return!a||!c?null:R.jsx(wfe,{placement:`bottom-${c.align==="right"?"start":"end"}`,open:i,target:a,onClose:u,onExited:s,children:R.jsx(n,W({colDef:c,hideMenu:u,open:i,id:e,labelledby:t},r))})}const Y$t=["className","aria-label"],Q$t=e=>{const{classes:t}=e;return In({root:["columnHeaderTitle"]},On,t)},X$t=or("div",{name:"MuiDataGrid",slot:"ColumnHeaderTitle",overridesResolver:(e,t)=>t.columnHeaderTitle})({textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",fontWeight:"var(--unstable_DataGrid-headWeight)",lineHeight:"normal"}),J$t=v.forwardRef(function(t,n){const{className:r}=t,o=Dt(t,Y$t),i=Ot(),a=Q$t(i);return R.jsx(X$t,W({ref:n,className:de(a.root,r),ownerState:i},o))});function Z$t(e){var l;const{label:t,description:n}=e,r=Ot(),o=v.useRef(null),[i,a]=v.useState(""),s=v.useCallback(()=>{if(!n&&(o!=null&&o.current)){const c=ZRt(o.current);a(c?t:"")}},[n,t]);return R.jsx(r.slots.baseTooltip,W({title:n||i},(l=r.slotProps)==null?void 0:l.baseTooltip,{children:R.jsx(J$t,{onMouseOver:s,ref:o,children:t})}))}const eDt=["resizable","resizing","height","side"];var lH=function(e){return e.Left="left",e.Right="right",e}(lH||{});const tDt=e=>{const{resizable:t,resizing:n,classes:r,side:o}=e,i={root:["columnSeparator",t&&"columnSeparator--resizable",n&&"columnSeparator--resizing",o&&`columnSeparator--side${O1(o)}`],icon:["iconSeparator"]};return In(i,On,r)};function nDt(e){const{height:t,side:n=lH.Right}=e,r=Dt(e,eDt),o=Ot(),i=W({},e,{side:n,classes:o.classes}),a=tDt(i),s=v.useCallback(l=>{l.preventDefault(),l.stopPropagation()},[]);return R.jsx("div",W({className:a.root,style:{minHeight:t}},r,{onClick:s,children:R.jsx(o.slots.columnResizeIcon,{className:a.icon})}))}const rDt=v.memo(nDt),oDt=["classes","columnMenuOpen","colIndex","height","isResizing","sortDirection","hasFocus","tabIndex","separatorSide","isDraggable","headerComponent","description","elementId","width","columnMenuIconButton","columnMenu","columnTitleIconButtons","headerClassName","label","resizable","draggableContainerProps","columnHeaderSeparatorProps","style"],ipe=v.forwardRef(function(t,n){const{classes:r,colIndex:o,height:i,isResizing:a,sortDirection:s,hasFocus:l,tabIndex:c,separatorSide:u,isDraggable:d,headerComponent:f,description:p,width:h,columnMenuIconButton:m=null,columnMenu:y=null,columnTitleIconButtons:w=null,headerClassName:x,label:S,resizable:E,draggableContainerProps:P,columnHeaderSeparatorProps:T,style:I}=t,A=Dt(t,oDt),k=Gl(),O=Ot(),$=v.useRef(null),N=Zg($,n);let L="none";return s!=null&&(L=s==="asc"?"ascending":"descending"),v.useLayoutEffect(()=>{var D;const j=k.current.state.columnMenu;if(l&&!j.open){const z=$.current.querySelector('[tabindex="0"]')||$.current;z==null||z.focus(),(D=k.current.columnHeadersContainerRef)!=null&&D.current&&(k.current.columnHeadersContainerRef.current.scrollLeft=0)}},[k,l]),R.jsxs("div",W({ref:N,className:de(r.root,x),style:W({},I,{height:i,width:h}),role:"columnheader",tabIndex:c,"aria-colindex":o+1,"aria-sort":L},A,{children:[R.jsxs("div",W({className:r.draggableContainer,draggable:d,role:"presentation"},P,{children:[R.jsxs("div",{className:r.titleContainer,role:"presentation",children:[R.jsx("div",{className:r.titleContainerContent,children:f!==void 0?f:R.jsx(Z$t,{label:S,description:p,columnWidth:h})}),w]}),m]})),R.jsx(rDt,W({resizable:!O.disableColumnResize&&!!E,resizing:a,height:i,side:u},T)),y]}))}),iDt=e=>{const{colDef:t,classes:n,isDragging:r,sortDirection:o,showRightBorder:i,showLeftBorder:a,filterItemsCounter:s,pinnedPosition:l,isLastUnpinned:c,isSiblingFocused:u}=e,d=o!=null,f=s!=null&&s>0,p=t.type==="number",h={root:["columnHeader",t.headerAlign==="left"&&"columnHeader--alignLeft",t.headerAlign==="center"&&"columnHeader--alignCenter",t.headerAlign==="right"&&"columnHeader--alignRight",t.sortable&&"columnHeader--sortable",r&&"columnHeader--moving",d&&"columnHeader--sorted",f&&"columnHeader--filtered",p&&"columnHeader--numeric","withBorderColor",i&&"columnHeader--withRightBorder",a&&"columnHeader--withLeftBorder",l==="left"&&"columnHeader--pinnedLeft",l==="right"&&"columnHeader--pinnedRight",c&&"columnHeader--lastUnpinned",u&&"columnHeader--siblingFocused"],draggableContainer:["columnHeaderDraggableContainer"],titleContainer:["columnHeaderTitleContainer"],titleContainerContent:["columnHeaderTitleContainerContent"]};return In(h,On,n)};function aDt(e){var se,oe,fe;const{colDef:t,columnMenuOpen:n,colIndex:r,headerHeight:o,isResizing:i,isLast:a,sortDirection:s,sortIndex:l,filterItemsCounter:c,hasFocus:u,tabIndex:d,disableReorder:f,separatorSide:p,style:h,pinnedPosition:m,indexInSection:y,sectionLength:w,gridHasFiller:x}=e,S=Gl(),E=Ot(),P=v.useRef(null),T=Io(),I=Io(),A=v.useRef(null),[k,O]=v.useState(n),$=v.useMemo(()=>!E.disableColumnReorder&&!f&&!t.disableReorder,[E.disableColumnReorder,f,t.disableReorder]);let N;t.renderHeader&&(N=t.renderHeader(S.current.getColumnHeaderParams(t.field)));const L=nR(m,y),j=tR(m,y,w,E.showColumnVerticalBorder,x),D=W({},e,{classes:E.classes,showRightBorder:j,showLeftBorder:L}),_=iDt(D),z=v.useCallback(Z=>ce=>{D1(ce)||S.current.publishEvent(Z,S.current.getColumnHeaderParams(t.field),ce)},[S,t.field]),F=v.useMemo(()=>({onClick:z("columnHeaderClick"),onContextMenu:z("columnHeaderContextMenu"),onDoubleClick:z("columnHeaderDoubleClick"),onMouseOver:z("columnHeaderOver"),onMouseOut:z("columnHeaderOut"),onMouseEnter:z("columnHeaderEnter"),onMouseLeave:z("columnHeaderLeave"),onKeyDown:z("columnHeaderKeyDown"),onFocus:z("columnHeaderFocus"),onBlur:z("columnHeaderBlur")}),[z]),V=v.useMemo(()=>$?{onDragStart:z("columnHeaderDragStart"),onDragEnter:z("columnHeaderDragEnter"),onDragOver:z("columnHeaderDragOver"),onDragEnd:z("columnHeaderDragEnd")}:{},[$,z]),U=v.useMemo(()=>({onMouseDown:z("columnSeparatorMouseDown"),onDoubleClick:z("columnSeparatorDoubleClick")}),[z]);v.useEffect(()=>{k||O(n)},[k,n]);const K=v.useCallback(()=>{O(!1)},[]),X=!E.disableColumnMenu&&!t.disableColumnMenu&&R.jsx(q$t,{colDef:t,columnMenuId:T,columnMenuButtonId:I,open:k,iconButtonRef:A}),ie=R.jsx(K$t,{columnMenuId:T,columnMenuButtonId:I,field:t.field,open:n,target:A.current,ContentComponent:E.slots.columnMenu,contentComponentProps:(se=E.slotProps)==null?void 0:se.columnMenu,onExited:K}),ee=t.sortingOrder??E.sortingOrder,Q=(t.sortable||s!=null)&&!t.hideSortIcons&&!E.disableColumnSorting,te=R.jsxs(v.Fragment,{children:[!E.disableColumnFilter&&R.jsx(E.slots.columnHeaderFilterIconButton,W({field:t.field,counter:c},(oe=E.slotProps)==null?void 0:oe.columnHeaderFilterIconButton)),Q&&R.jsx(E.slots.columnHeaderSortIcon,W({field:t.field,direction:s,index:l,sortingOrder:ee,disabled:!t.sortable},(fe=E.slotProps)==null?void 0:fe.columnHeaderSortIcon))]});v.useLayoutEffect(()=>{var ce;const Z=S.current.state.columnMenu;if(u&&!Z.open){const we=P.current.querySelector('[tabindex="0"]')||P.current;we==null||we.focus(),(ce=S.current.columnHeadersContainerRef)!=null&&ce.current&&(S.current.columnHeadersContainerRef.current.scrollLeft=0)}},[S,u]);const pe=typeof t.headerClassName=="function"?t.headerClassName({field:t.field,colDef:t}):t.headerClassName,ae=t.headerName??t.field;return R.jsx(ipe,W({ref:P,classes:_,columnMenuOpen:n,colIndex:r,height:o,isResizing:i,sortDirection:s,hasFocus:u,tabIndex:d,separatorSide:p,isDraggable:$,headerComponent:N,description:t.description,elementId:t.field,width:t.computedWidth,columnMenuIconButton:X,columnTitleIconButtons:te,headerClassName:de(pe,a&&le["columnHeader--last"]),label:ae,resizable:!E.disableColumnResize&&!!t.resizable,"data-field":t.field,columnMenu:ie,draggableContainerProps:V,columnHeaderSeparatorProps:U,style:h},F))}const sDt=Vp(aDt),lDt=["className"],cDt=e=>{const{classes:t}=e;return In({root:["iconButtonContainer"]},On,t)},uDt=or("div",{name:"MuiDataGrid",slot:"IconButtonContainer",overridesResolver:(e,t)=>t.iconButtonContainer})(()=>({display:"flex",visibility:"hidden",width:0})),ape=v.forwardRef(function(t,n){const{className:r}=t,o=Dt(t,lDt),i=Ot(),a=cDt(i);return R.jsx(uDt,W({ref:n,className:de(a.root,r),ownerState:i},o))}),dDt=["direction","index","sortingOrder","disabled"],fDt=e=>{const{classes:t}=e;return In({icon:["sortIcon"]},On,t)};function pDt(e,t,n,r){let o;const i={};return t==="asc"?o=e.columnSortedAscendingIcon:t==="desc"?o=e.columnSortedDescendingIcon:(o=e.columnUnsortedIcon,i.sortingOrder=r),o?R.jsx(o,W({fontSize:"small",className:n},i)):null}function hDt(e){var f;const{direction:t,index:n,sortingOrder:r,disabled:o}=e,i=Dt(e,dDt),a=En(),s=Ot(),l=W({},e,{classes:s.classes}),c=fDt(l),u=pDt(s.slots,t,c.icon,r);if(!u)return null;const d=R.jsx(s.slots.baseIconButton,W({tabIndex:-1,"aria-label":a.current.getLocaleText("columnHeaderSortIconLabel"),title:a.current.getLocaleText("columnHeaderSortIconLabel"),size:"small",disabled:o},(f=s.slotProps)==null?void 0:f.baseIconButton,i,{children:u}));return R.jsxs(ape,{children:[n!=null&&R.jsx(s.slots.baseBadge,{badgeContent:n,color:"default",overlap:"circular",children:d}),n==null&&d]})}const gDt=v.memo(hDt),mDt=e=>{const{classes:t}=e;return In({icon:["filterIcon"]},On,t)};function yDt(e){var h,m;const{counter:t,field:n,onClick:r}=e,o=En(),i=Ot(),a=W({},e,{classes:i.classes}),s=mDt(a),l=Ye(o,aC),c=Io(),u=Io(),d=v.useCallback(y=>{y.preventDefault(),y.stopPropagation();const{open:w,openedPanelValue:x}=aC(o.current.state);w&&x===Ag.filters?o.current.hideFilterPanel():o.current.showFilterPanel(void 0,u,c),r&&r(o.current.getColumnHeaderParams(n),y)},[o,n,r,u,c]);if(!t)return null;const f=l.open&&l.labelId===c,p=R.jsx(i.slots.baseIconButton,W({id:c,onClick:d,color:"default","aria-label":o.current.getLocaleText("columnHeaderFiltersLabel"),size:"small",tabIndex:-1,"aria-haspopup":"menu","aria-expanded":f,"aria-controls":f?u:void 0},(h=i.slotProps)==null?void 0:h.baseIconButton,{children:R.jsx(i.slots.columnFilteredIcon,{className:s.icon,fontSize:"small"})}));return R.jsx(i.slots.baseTooltip,W({title:o.current.getLocaleText("columnHeaderFiltersTooltipActive")(t),enterDelay:1e3},(m=i.slotProps)==null?void 0:m.baseTooltip,{children:R.jsxs(ape,{children:[t>1&&R.jsx(i.slots.baseBadge,{badgeContent:t,color:"default",children:p}),t===1&&p]})}))}const RQ=ct(R.jsx("path",{d:"M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z"}),"ArrowUpward"),$Q=ct(R.jsx("path",{d:"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z"}),"ArrowDownward"),DQ=ct(R.jsx("path",{d:"M8.59 16.59 13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"}),"KeyboardArrowRight"),_Q=ct(R.jsx("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore"),vDt=ct(R.jsx("path",{d:"M10 18h4v-2h-4v2zM3 6v2h18V6H3zm3 7h12v-2H6v2z"}),"FilterList"),NQ=ct(R.jsx("path",{d:"M4.25 5.61C6.27 8.2 10 13 10 13v6c0 .55.45 1 1 1h2c.55 0 1-.45 1-1v-6s3.72-4.8 5.74-7.39c.51-.66.04-1.61-.79-1.61H5.04c-.83 0-1.3.95-.79 1.61z"}),"FilterAlt"),bDt=ct(R.jsx("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"}),"Search");ct(R.jsx("path",{d:"M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z"}),"Menu");ct(R.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckCircle");const wDt=ct(R.jsx("path",{d:"M6 5H3c-.55 0-1 .45-1 1v12c0 .55.45 1 1 1h3c.55 0 1-.45 1-1V6c0-.55-.45-1-1-1zm14 0h-3c-.55 0-1 .45-1 1v12c0 .55.45 1 1 1h3c.55 0 1-.45 1-1V6c0-.55-.45-1-1-1zm-7 0h-3c-.55 0-1 .45-1 1v12c0 .55.45 1 1 1h3c.55 0 1-.45 1-1V6c0-.55-.45-1-1-1z"}),"ColumnIcon"),xDt=ct(R.jsx("rect",{width:"1",height:"24",x:"11.5",rx:"0.5"}),"Separator"),SDt=ct(R.jsx("path",{d:"M4 15h16v-2H4v2zm0 4h16v-2H4v2zm0-8h16V9H4v2zm0-6v2h16V5H4z"}),"ViewHeadline"),CDt=ct(R.jsx("path",{d:"M21,8H3V4h18V8z M21,10H3v4h18V10z M21,16H3v4h18V16z"}),"TableRows"),EDt=ct(R.jsx("path",{d:"M4 18h17v-6H4v6zM4 5v6h17V5H4z"}),"ViewStream"),PDt=ct(R.jsx("path",{d:"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"}),"TripleDotsVertical"),T_=ct(R.jsx("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close"),LQ=ct(R.jsx("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"}),"Add"),TDt=ct(R.jsx("path",{d:"M19 13H5v-2h14v2z"}),"Remove"),IDt=ct(R.jsx("path",{d:"M12 4V1L8 5l4 4V6c3.31 0 6 2.69 6 6 0 1.01-.25 1.97-.7 2.8l1.46 1.46C19.54 15.03 20 13.57 20 12c0-4.42-3.58-8-8-8zm0 14c-3.31 0-6-2.69-6-6 0-1.01.25-1.97.7-2.8L5.24 7.74C4.46 8.97 4 10.43 4 12c0 4.42 3.58 8 8 8v3l4-4-4-4v3z"}),"Load"),FQ=ct(R.jsx("path",{d:"M11 18c0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2 2 .9 2 2zm-2-8c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0-6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm6 4c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"}),"Drag"),ODt=ct(R.jsx("path",{d:"M19 12v7H5v-7H3v7c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-7h-2zm-6 .67l2.59-2.58L17 11.5l-5 5-5-5 1.41-1.41L11 12.67V3h2z"}),"SaveAlt"),ADt=ct(R.jsx("path",{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"}),"Check"),kDt=ct(R.jsx("path",{d:"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"}),"MoreVert"),MDt=ct(R.jsx("path",{d:"M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7zM2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3 2 4.27zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2zm4.31-.78l3.15 3.15.02-.16c0-1.66-1.34-3-3-3l-.17.01z"}),"VisibilityOff"),RDt=ct(R.jsx("g",{children:R.jsx("path",{d:"M14.67,5v14H9.33V5H14.67z M15.67,19H21V5h-5.33V19z M8.33,19V5H3v14H8.33z"})}),"ViewColumn"),$Dt=ct(R.jsx("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Clear");ct(R.jsx("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z"}),"Delete");const DDt=ct(R.jsx("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zm2.46-7.12l1.41-1.41L12 12.59l2.12-2.12 1.41 1.41L13.41 14l2.12 2.12-1.41 1.41L12 15.41l-2.12 2.12-1.41-1.41L10.59 14l-2.13-2.12zM15.5 4l-1-1h-5l-1 1H5v2h14V4z"}),"Delete");function spe(e){return e.key.length===1&&!e.ctrlKey&&!e.metaKey}const GO=e=>e.indexOf("Arrow")===0||e.indexOf("Page")===0||e===" "||e==="Home"||e==="End",_Dt=e=>!!e.key,NDt=e=>e==="Tab"||e==="Escape";function lpe(e){return(e.ctrlKey||e.metaKey)&&String.fromCharCode(e.keyCode)==="V"&&!e.shiftKey&&!e.altKey}function LDt(e){return(e.ctrlKey||e.metaKey)&&String.fromCharCode(e.keyCode)==="C"&&!e.shiftKey&&!e.altKey}const FDt=["hideMenu","colDef","id","labelledby","className","children","open"],jDt=re(UC)(()=>({minWidth:248})),BDt=v.forwardRef(function(t,n){const{hideMenu:r,id:o,labelledby:i,className:a,children:s,open:l}=t,c=Dt(t,FDt),u=v.useCallback(d=>{d.key==="Tab"&&d.preventDefault(),NDt(d.key)&&r(d)},[r]);return R.jsx(jDt,W({id:o,ref:n,className:de(le.menuList,a),"aria-labelledby":i,onKeyDown:u,autoFocus:l},c,{children:s}))}),zDt=["displayOrder"],VDt=e=>{const t=Gl(),n=Ot(),{defaultSlots:r,defaultSlotProps:o,slots:i={},slotProps:a={},hideMenu:s,colDef:l,addDividers:c=!0}=e,u=v.useMemo(()=>W({},r,i),[r,i]),d=v.useMemo(()=>{if(!a||Object.keys(a).length===0)return o;const h=W({},a);return Object.entries(o).forEach(([m,y])=>{h[m]=W({},y,a[m]||{})}),h},[o,a]),f=t.current.unstable_applyPipeProcessors("columnMenu",[],e.colDef),p=v.useMemo(()=>{const h=Object.keys(r);return Object.keys(i).filter(m=>!h.includes(m))},[i,r]);return v.useMemo(()=>{const y=Array.from(new Set([...f,...p])).filter(w=>u[w]!=null).sort((w,x)=>{const S=d[w],E=d[x],P=Number.isFinite(S==null?void 0:S.displayOrder)?S.displayOrder:100,T=Number.isFinite(E==null?void 0:E.displayOrder)?E.displayOrder:100;return P-T});return y.reduce((w,x,S)=>{let E={colDef:l,onClick:s};const P=d[x];if(P){const T=Dt(P,zDt);E=W({},E,T)}return c&&S!==y.length-1?[...w,[u[x],E],[n.slots.baseDivider,{}]]:[...w,[u[x],E]]},[])},[c,l,f,s,u,d,p,n.slots.baseDivider])};function HDt(e){const{colDef:t,onClick:n}=e,r=En(),o=Ot(),s=Oo(r).filter(c=>c.disableColumnMenu!==!0).length===1,l=v.useCallback(c=>{s||(r.current.setColumnVisibility(t.field,!1),n(c))},[r,t.field,n,s]);return o.disableColumnSelector||t.hideable===!1?null:R.jsxs(rn,{onClick:l,disabled:s,children:[R.jsx(sa,{children:R.jsx(o.slots.columnMenuHideIcon,{fontSize:"small"})}),R.jsx(ko,{children:r.current.getLocaleText("columnMenuHideColumn")})]})}function UDt(e){const{onClick:t}=e,n=En(),r=Ot(),o=v.useCallback(i=>{t(i),n.current.showPreferences(Ag.columns)},[n,t]);return r.disableColumnSelector?null:R.jsxs(rn,{onClick:o,children:[R.jsx(sa,{children:R.jsx(r.slots.columnMenuManageColumnsIcon,{fontSize:"small"})}),R.jsx(ko,{children:n.current.getLocaleText("columnMenuManageColumns")})]})}function WDt(e){return R.jsxs(v.Fragment,{children:[R.jsx(HDt,W({},e)),R.jsx(UDt,W({},e))]})}function GDt(e){const{colDef:t,onClick:n}=e,r=En(),o=Ot(),i=v.useCallback(a=>{n(a),r.current.showFilterPanel(t.field)},[r,t.field,n]);return o.disableColumnFilter||!t.filterable?null:R.jsxs(rn,{onClick:i,children:[R.jsx(sa,{children:R.jsx(o.slots.columnMenuFilterIcon,{fontSize:"small"})}),R.jsx(ko,{children:r.current.getLocaleText("columnMenuFilter")})]})}function qDt(e){const{colDef:t,onClick:n}=e,r=En(),o=Ye(r,al),i=Ot(),a=v.useMemo(()=>{if(!t)return null;const u=o.find(d=>d.field===t.field);return u==null?void 0:u.sort},[t,o]),s=t.sortingOrder??i.sortingOrder,l=v.useCallback(u=>{n(u);const d=u.currentTarget.getAttribute("data-value")||null;r.current.sortColumn(t.field,d===a?null:d)},[r,t,n,a]);if(i.disableColumnSorting||!t||!t.sortable||!s.some(u=>!!u))return null;const c=u=>{const d=r.current.getLocaleText(u);return typeof d=="function"?d(t):d};return R.jsxs(v.Fragment,{children:[s.includes("asc")&&a!=="asc"?R.jsxs(rn,{onClick:l,"data-value":"asc",children:[R.jsx(sa,{children:R.jsx(i.slots.columnMenuSortAscendingIcon,{fontSize:"small"})}),R.jsx(ko,{children:c("columnMenuSortAsc")})]}):null,s.includes("desc")&&a!=="desc"?R.jsxs(rn,{onClick:l,"data-value":"desc",children:[R.jsx(sa,{children:R.jsx(i.slots.columnMenuSortDescendingIcon,{fontSize:"small"})}),R.jsx(ko,{children:c("columnMenuSortDesc")})]}):null,s.includes(null)&&a!=null?R.jsxs(rn,{onClick:l,children:[R.jsx(sa,{}),R.jsx(ko,{children:r.current.getLocaleText("columnMenuUnsort")})]}):null]})}const KDt=["defaultSlots","defaultSlotProps","slots","slotProps"],YDt={columnMenuSortItem:qDt,columnMenuFilterItem:GDt,columnMenuColumnsItem:WDt},QDt={columnMenuSortItem:{displayOrder:10},columnMenuFilterItem:{displayOrder:20},columnMenuColumnsItem:{displayOrder:30}},XDt=v.forwardRef(function(t,n){const{defaultSlots:r,defaultSlotProps:o,slots:i,slotProps:a}=t,s=Dt(t,KDt),l=VDt(W({},s,{defaultSlots:r,defaultSlotProps:o,slots:i,slotProps:a}));return R.jsx(BDt,W({ref:n},s,{children:l.map(([c,u],d)=>R.jsx(c,W({},u),d))}))}),JDt=v.forwardRef(function(t,n){return R.jsx(XDt,W({},t,{ref:n,defaultSlots:YDt,defaultSlotProps:QDt}))}),ZDt=["className","slotProps"],e_t=e=>{const{classes:t}=e;return In({root:["panelWrapper"]},On,t)},t_t=re("div",{name:"MuiDataGrid",slot:"PanelWrapper",overridesResolver:(e,t)=>t.panelWrapper})({display:"flex",flexDirection:"column",flex:1,"&:focus":{outline:0}}),n_t=()=>!0,cpe=v.forwardRef(function(t,n){const{className:r,slotProps:o={}}=t,i=Dt(t,ZDt),a=Ot(),s=e_t(a);return R.jsx(tz,W({open:!0,disableEnforceFocus:!0,isEnabled:n_t},o.TrapFocus,{children:R.jsx(t_t,W({ref:n,tabIndex:-1,className:de(s.root,r),ownerState:a},i))}))}),r_t=(e,t)=>{const n=new Set(Object.keys(e).filter(i=>e[i]===!1)),r=new Set(Object.keys(t).filter(i=>t[i]===!1));if(n.size!==r.size)return!1;let o=!0;return n.forEach(i=>{r.has(i)||(o=!1)}),o},o_t=(e,t)=>(e.headerName||e.field).toLowerCase().indexOf(t)>-1,i_t=e=>{const{classes:t}=e;return In({root:["columnsManagement"],header:["columnsManagementHeader"],footer:["columnsManagementFooter"],row:["columnsManagementRow"]},On,t)},jQ=new Intl.Collator;function upe(e){var L,j,D;const t=En(),n=v.useRef(null),r=Ye(t,Pc),o=ku(()=>vl(t)).current,i=Ye(t,vl),a=Ot(),[s,l]=v.useState(""),c=i_t(a),{sort:u,searchPredicate:d=o_t,autoFocusSearchField:f=!0,disableShowHideToggle:p=!1,disableResetButton:h=!1,toggleAllMode:m="all",getTogglableColumns:y}=e,w=v.useMemo(()=>r_t(i,o),[i,o]),x=v.useMemo(()=>{switch(u){case"asc":return[...r].sort((_,z)=>jQ.compare(_.headerName||_.field,z.headerName||z.field));case"desc":return[...r].sort((_,z)=>-jQ.compare(_.headerName||_.field,z.headerName||z.field));default:return r}},[r,u]),S=_=>{const{name:z}=_.target;t.current.setColumnVisibility(z,i[z]===!1)},E=v.useMemo(()=>{const _=y?y(x):null,z=_?x.filter(({field:F})=>_.includes(F)):x;return s?z.filter(F=>d(F,s.toLowerCase())):z},[x,s,d,y]),P=v.useCallback(_=>{const z=vl(t),F=W({},z),V=y?y(r):null;return(m==="filteredOnly"?E:r).forEach(U=>{U.hideable&&(V==null||V.includes(U.field))&&(_?delete F[U.field]:F[U.field]=!1)}),t.current.setColumnVisibilityModel(F)},[t,r,y,m,E]),T=v.useCallback(_=>{l(_.target.value)},[]),I=v.useMemo(()=>E.filter(_=>_.hideable),[E]),A=v.useMemo(()=>I.every(_=>i[_.field]==null||i[_.field]!==!1),[i,I]),k=v.useMemo(()=>I.every(_=>i[_.field]===!1),[i,I]),O=v.useRef(null);v.useEffect(()=>{f?n.current.focus():O.current&&typeof O.current.focus=="function"&&O.current.focus()},[f]);let $=!1;const N=_=>$===!1&&_.hideable!==!1?($=!0,!0):!1;return R.jsxs(v.Fragment,{children:[R.jsx(s_t,{className:c.header,ownerState:a,children:R.jsx(a.slots.baseTextField,W({placeholder:t.current.getLocaleText("columnsManagementSearchTitle"),inputRef:n,value:s,onChange:T,variant:"outlined",size:"small",InputProps:{startAdornment:R.jsx(a.slots.baseInputAdornment,{position:"start",children:R.jsx(a.slots.quickFilterIcon,{})}),sx:{pl:1.5}},fullWidth:!0},(L=a.slotProps)==null?void 0:L.baseTextField))}),R.jsxs(a_t,{className:c.root,ownerState:a,children:[E.map(_=>{var z;return R.jsx(Mc,{className:c.row,control:R.jsx(a.slots.baseCheckbox,W({disabled:_.hideable===!1,checked:i[_.field]!==!1,onClick:S,name:_.field,sx:{p:.5},inputRef:N(_)?O:void 0},(z=a.slotProps)==null?void 0:z.baseCheckbox)),label:_.headerName||_.field},_.field)}),E.length===0&&R.jsx(c_t,{ownerState:a,children:t.current.getLocaleText("columnsManagementNoColumns")})]}),(!p||!h)&&E.length>0?R.jsxs(l_t,{ownerState:a,className:c.footer,children:[p?R.jsx("span",{}):R.jsx(Mc,{control:R.jsx(a.slots.baseCheckbox,W({disabled:I.length===0,checked:A,indeterminate:!A&&!k,onClick:()=>P(!A),name:t.current.getLocaleText("columnsManagementShowHideAllText"),sx:{p:.5}},(j=a.slotProps)==null?void 0:j.baseCheckbox)),label:t.current.getLocaleText("columnsManagementShowHideAllText")}),h?null:R.jsx(a.slots.baseButton,W({onClick:()=>t.current.setColumnVisibilityModel(o),disabled:w},(D=a.slotProps)==null?void 0:D.baseButton,{children:t.current.getLocaleText("columnsManagementReset")}))]}):null]})}const a_t=re("div",{name:"MuiDataGrid",slot:"ColumnsManagement",overridesResolver:(e,t)=>t.columnsManagement})(({theme:e})=>({padding:e.spacing(0,3,1.5),display:"flex",flexDirection:"column",overflow:"auto",flex:"1 1",maxHeight:400,alignItems:"flex-start"})),s_t=re("div",{name:"MuiDataGrid",slot:"ColumnsManagementHeader",overridesResolver:(e,t)=>t.columnsManagementHeader})(({theme:e})=>({padding:e.spacing(1.5,3)})),l_t=re("div",{name:"MuiDataGrid",slot:"ColumnsManagementFooter",overridesResolver:(e,t)=>t.columnsManagementFooter})(({theme:e})=>({padding:e.spacing(.5,1,.5,3),display:"flex",justifyContent:"space-between",borderTop:`1px solid ${e.palette.divider}`})),c_t=re("div")(({theme:e})=>({padding:e.spacing(.5,0),color:e.palette.grey[500]}));function u_t(e){var n;const t=Ot();return R.jsx(cpe,W({},e,{children:R.jsx(upe,W({},(n=t.slotProps)==null?void 0:n.columnsManagement))}))}const d_t=["children","className","classes"],f_t=rfe("MuiDataGrid",["panel","paper"]),p_t=re(Pp,{name:"MuiDataGrid",slot:"Panel",overridesResolver:(e,t)=>t.panel})(({theme:e})=>({zIndex:e.zIndex.modal})),h_t=re(ro,{name:"MuiDataGrid",slot:"Paper",overridesResolver:(e,t)=>t.paper})(({theme:e})=>({backgroundColor:(e.vars||e).palette.background.paper,minWidth:300,maxHeight:450,display:"flex",maxWidth:`calc(100vw - ${e.spacing(.5)})`,overflow:"auto"})),g_t=v.forwardRef((e,t)=>{const{children:n,className:r}=e,o=Dt(e,d_t),i=En(),a=Ot(),s=f_t,[l,c]=v.useState(!1),u=v.useCallback(()=>{i.current.hidePreferences()},[i]),d=v.useCallback(m=>{m.key==="Escape"&&i.current.hidePreferences()},[i]),f=v.useMemo(()=>[{name:"flip",enabled:!0,options:{rootBoundary:"document"}},{name:"isPlaced",enabled:!0,phase:"main",fn:()=>{c(!0)},effect:()=>()=>{c(!1)}}],[]),[p,h]=v.useState(null);return v.useEffect(()=>{var y,w;const m=(w=(y=i.current.rootElementRef)==null?void 0:y.current)==null?void 0:w.querySelector('[data-id="gridPanelAnchor"]');m&&h(m)},[i]),p?R.jsx(p_t,W({ref:t,placement:"bottom-start",className:de(s.panel,r),ownerState:a,anchorEl:p,modifiers:f},o,{children:R.jsx(ez,{mouseEvent:"onMouseUp",onClickAway:u,children:R.jsx(h_t,{className:s.paper,ownerState:a,elevation:8,onKeyDown:d,children:l&&n})})})):null}),m_t=["className"],y_t=e=>{const{classes:t}=e;return In({root:["panelContent"]},On,t)},v_t=or("div",{name:"MuiDataGrid",slot:"PanelContent",overridesResolver:(e,t)=>t.panelContent})({display:"flex",flexDirection:"column",overflow:"auto",flex:"1 1",maxHeight:400});function b_t(e){const{className:t}=e,n=Dt(e,m_t),r=Ot(),o=y_t(r);return R.jsx(v_t,W({className:de(o.root,t),ownerState:r},n))}const w_t=["className"],x_t=e=>{const{classes:t}=e;return In({root:["panelFooter"]},On,t)},S_t=or("div",{name:"MuiDataGrid",slot:"PanelFooter",overridesResolver:(e,t)=>t.panelFooter})(({theme:e})=>({padding:e.spacing(.5),display:"flex",justifyContent:"space-between"}));function C_t(e){const{className:t}=e,n=Dt(e,w_t),r=Ot(),o=x_t(r);return R.jsx(S_t,W({className:de(o.root,t),ownerState:r},n))}const E_t=["item","hasMultipleFilters","deleteFilter","applyFilterChanges","showMultiFilterOperators","disableMultiFilterOperator","applyMultiFilterOperatorChanges","focusElementRef","logicOperators","columnsSort","filterColumns","deleteIconProps","logicOperatorInputProps","operatorInputProps","columnInputProps","valueInputProps","readOnly","children"],P_t=["InputComponentProps"],T_t=e=>{const{classes:t}=e;return In({root:["filterForm"],deleteIcon:["filterFormDeleteIcon"],logicOperatorInput:["filterFormLogicOperatorInput"],columnInput:["filterFormColumnInput"],operatorInput:["filterFormOperatorInput"],valueInput:["filterFormValueInput"]},On,t)},I_t=re("div",{name:"MuiDataGrid",slot:"FilterForm",overridesResolver:(e,t)=>t.filterForm})(({theme:e})=>({display:"flex",padding:e.spacing(1)})),O_t=re("div",{name:"MuiDataGrid",slot:"FilterFormDeleteIcon",overridesResolver:(e,t)=>t.filterFormDeleteIcon})(({theme:e})=>({flexShrink:0,justifyContent:"flex-end",marginRight:e.spacing(.5),marginBottom:e.spacing(.2)})),A_t=re("div",{name:"MuiDataGrid",slot:"FilterFormLogicOperatorInput",overridesResolver:(e,t)=>t.filterFormLogicOperatorInput})({minWidth:55,marginRight:5,justifyContent:"end"}),k_t=re("div",{name:"MuiDataGrid",slot:"FilterFormColumnInput",overridesResolver:(e,t)=>t.filterFormColumnInput})({width:150}),M_t=re("div",{name:"MuiDataGrid",slot:"FilterFormOperatorInput",overridesResolver:(e,t)=>t.filterFormOperatorInput})({width:150}),R_t=re("div",{name:"MuiDataGrid",slot:"FilterFormValueInput",overridesResolver:(e,t)=>t.filterFormValueInput})({width:190}),$_t=e=>{switch(e){case Zi.And:return"filterPanelOperatorAnd";case Zi.Or:return"filterPanelOperatorOr";default:throw new Error("MUI X: Invalid `logicOperator` property in the `GridFilterPanel`.")}},Tw=e=>e.headerName||e.field,BQ=new Intl.Collator,zQ=v.forwardRef(function(t,n){var we,me,Se,xe,ke,De,_e,ye,Pe;const{item:r,hasMultipleFilters:o,deleteFilter:i,applyFilterChanges:a,showMultiFilterOperators:s,disableMultiFilterOperator:l,applyMultiFilterOperatorChanges:c,focusElementRef:u,logicOperators:d=[Zi.And,Zi.Or],columnsSort:f,filterColumns:p,deleteIconProps:h={},logicOperatorInputProps:m={},operatorInputProps:y={},columnInputProps:w={},valueInputProps:x={},readOnly:S}=t,E=Dt(t,E_t),P=En(),T=Ye(P,Bd),I=Ye(P,cfe),A=Ye(P,pi),k=Io(),O=Io(),$=Io(),N=Io(),L=Ot(),j=T_t(L),D=v.useRef(null),_=v.useRef(null),z=A.logicOperator??Zi.And,F=o&&d.length>0,V=((we=L.slotProps)==null?void 0:we.baseFormControl)||{},K=(((me=L.slotProps)==null?void 0:me.baseSelect)||{}).native??!1,X=((Se=L.slotProps)==null?void 0:Se.baseInputLabel)||{},ie=((xe=L.slotProps)==null?void 0:xe.baseSelectOption)||{},{InputComponentProps:ee}=x,Q=Dt(x,P_t),{filteredColumns:te,selectedField:pe}=v.useMemo(()=>{let Ae=r.field;const Me=T[r.field].filterable===!1?T[r.field]:null;if(Me)return{filteredColumns:[Me],selectedField:Ae};if(p===void 0||typeof p!="function")return{filteredColumns:I,selectedField:Ae};const We=p({field:r.field,columns:I,currentFilters:(A==null?void 0:A.items)||[]});return{filteredColumns:I.filter(He=>{const Xe=We.includes(He.field);return He.field===r.field&&!Xe&&(Ae=void 0),Xe}),selectedField:Ae}},[p,A==null?void 0:A.items,I,r.field,T]),ae=v.useMemo(()=>{switch(f){case"asc":return te.sort((Ae,Me)=>BQ.compare(Tw(Ae),Tw(Me)));case"desc":return te.sort((Ae,Me)=>-BQ.compare(Tw(Ae),Tw(Me)));default:return te}},[te,f]),se=r.field?P.current.getColumn(r.field):null,oe=v.useMemo(()=>{var Ae;return!r.operator||!se?null:(Ae=se.filterOperators)==null?void 0:Ae.find(Me=>Me.value===r.operator)},[r,se]),fe=v.useCallback(Ae=>{const Me=Ae.target.value,We=P.current.getColumn(Me);if(We.field===se.field)return;const He=We.filterOperators.find(st=>st.value===r.operator)||We.filterOperators[0];let gt=!He.InputComponent||He.InputComponent!==(oe==null?void 0:oe.InputComponent)||We.type!==se.type?void 0:r.value;if(We.type==="singleSelect"&>!==void 0){const st=We,et=Og(st);Array.isArray(gt)?gt=gt.filter(Et=>UO(Et,et,st==null?void 0:st.getOptionValue)!==void 0):UO(r.value,et,st==null?void 0:st.getOptionValue)===void 0&&(gt=void 0)}a(W({},r,{field:Me,operator:He.value,value:gt}))},[P,a,r,se,oe]),Z=v.useCallback(Ae=>{const Me=Ae.target.value,We=se==null?void 0:se.filterOperators.find(Xe=>Xe.value===Me),He=!(We!=null&&We.InputComponent)||(We==null?void 0:We.InputComponent)!==(oe==null?void 0:oe.InputComponent);a(W({},r,{operator:Me,value:He?void 0:r.value}))},[a,r,se,oe]),ce=v.useCallback(Ae=>{const Me=Ae.target.value===Zi.And.toString()?Zi.And:Zi.Or;c(Me)},[c]),ge=()=>{i(r)};return v.useImperativeHandle(u,()=>({focus:()=>{var Ae;oe!=null&&oe.InputComponent?(Ae=D==null?void 0:D.current)==null||Ae.focus():_.current.focus()}}),[oe]),R.jsxs(I_t,W({ref:n,className:j.root,"data-id":r.id,ownerState:L},E,{children:[R.jsx(O_t,W({variant:"standard",as:L.slots.baseFormControl},V,h,{className:de(j.deleteIcon,V.className,h.className),ownerState:L,children:R.jsx(L.slots.baseIconButton,W({"aria-label":P.current.getLocaleText("filterPanelDeleteIconLabel"),title:P.current.getLocaleText("filterPanelDeleteIconLabel"),onClick:ge,size:"small",disabled:S},(ke=L.slotProps)==null?void 0:ke.baseIconButton,{children:R.jsx(L.slots.filterPanelDeleteIcon,{fontSize:"small"})}))})),R.jsx(A_t,W({variant:"standard",as:L.slots.baseFormControl},V,m,{sx:[F?{display:"flex"}:{display:"none"},s?{visibility:"visible"}:{visibility:"hidden"},V.sx,m.sx],className:de(j.logicOperatorInput,V.className,m.className),ownerState:L,children:R.jsx(L.slots.baseSelect,W({inputProps:{"aria-label":P.current.getLocaleText("filterPanelLogicOperator")},value:z??"",onChange:ce,disabled:!!l||d.length===1,native:K},(De=L.slotProps)==null?void 0:De.baseSelect,{children:d.map(Ae=>v.createElement(L.slots.baseSelectOption,W({},ie,{native:K,key:Ae.toString(),value:Ae.toString()}),P.current.getLocaleText($_t(Ae))))}))})),R.jsxs(k_t,W({variant:"standard",as:L.slots.baseFormControl},V,w,{className:de(j.columnInput,V.className,w.className),ownerState:L,children:[R.jsx(L.slots.baseInputLabel,W({},X,{htmlFor:k,id:O,children:P.current.getLocaleText("filterPanelColumns")})),R.jsx(L.slots.baseSelect,W({labelId:O,id:k,label:P.current.getLocaleText("filterPanelColumns"),value:pe??"",onChange:fe,native:K,disabled:S},(_e=L.slotProps)==null?void 0:_e.baseSelect,{children:ae.map(Ae=>v.createElement(L.slots.baseSelectOption,W({},ie,{native:K,key:Ae.field,value:Ae.field}),Tw(Ae)))}))]})),R.jsxs(M_t,W({variant:"standard",as:L.slots.baseFormControl},V,y,{className:de(j.operatorInput,V.className,y.className),ownerState:L,children:[R.jsx(L.slots.baseInputLabel,W({},X,{htmlFor:$,id:N,children:P.current.getLocaleText("filterPanelOperator")})),R.jsx(L.slots.baseSelect,W({labelId:N,label:P.current.getLocaleText("filterPanelOperator"),id:$,value:r.operator,onChange:Z,native:K,inputRef:_,disabled:S},(ye=L.slotProps)==null?void 0:ye.baseSelect,{children:(Pe=se==null?void 0:se.filterOperators)==null?void 0:Pe.map(Ae=>v.createElement(L.slots.baseSelectOption,W({},ie,{native:K,key:Ae.value,value:Ae.value}),Ae.label||P.current.getLocaleText(`filterOperator${O1(Ae.value)}`)))}))]})),R.jsx(R_t,W({variant:"standard",as:L.slots.baseFormControl},V,Q,{className:de(j.valueInput,V.className,Q.className),ownerState:L,children:oe!=null&&oe.InputComponent?R.jsx(oe.InputComponent,W({apiRef:P,item:r,applyValue:a,focusElementRef:D,disabled:S},oe.InputComponentProps,ee),r.field):null}))]}))}),D_t=["logicOperators","columnsSort","filterFormProps","getColumnForNewFilter","children","disableAddFilterButton","disableRemoveAllButton"],VQ=e=>({field:e.field,operator:e.filterOperators[0].value,id:Math.round(Math.random()*1e5)}),__t=v.forwardRef(function(t,n){var N,L;const r=En(),o=Ot(),i=Ye(r,pi),a=Ye(r,cfe),s=Ye(r,TAt),l=v.useRef(null),c=v.useRef(null),{logicOperators:u=[Zi.And,Zi.Or],columnsSort:d,filterFormProps:f,getColumnForNewFilter:p,disableAddFilterButton:h=!1,disableRemoveAllButton:m=!1}=t,y=Dt(t,D_t),w=r.current.upsertFilterItem,x=v.useCallback(j=>{r.current.setFilterLogicOperator(j)},[r]),S=v.useCallback(()=>{let j;if(p&&typeof p=="function"){const D=p({currentFilters:(i==null?void 0:i.items)||[],columns:a});if(D===null)return null;j=a.find(({field:_})=>_===D)}else j=a.find(D=>{var _;return(_=D.filterOperators)==null?void 0:_.length});return j?VQ(j):null},[i==null?void 0:i.items,a,p]),E=v.useCallback(()=>{if(p===void 0||typeof p!="function")return S();const j=i.items.length?i.items:[S()].filter(Boolean),D=p({currentFilters:j,columns:a});if(D===null)return null;const _=a.find(({field:z})=>z===D);return _?VQ(_):null},[i.items,a,p,S]),P=v.useMemo(()=>i.items.length?i.items:(c.current||(c.current=S()),c.current?[c.current]:[]),[i.items,S]),T=P.length>1,{readOnlyFilters:I,validFilters:A}=v.useMemo(()=>P.reduce((j,D)=>(s[D.field]?j.validFilters.push(D):j.readOnlyFilters.push(D),j),{readOnlyFilters:[],validFilters:[]}),[P,s]),k=v.useCallback(()=>{const j=E();j&&r.current.upsertFilterItems([...P,j])},[r,E,P]),O=v.useCallback(j=>{const D=A.length===1;r.current.deleteFilterItem(j),D&&r.current.hideFilterPanel()},[r,A.length]),$=v.useCallback(()=>A.length===1&&A[0].value===void 0?(r.current.deleteFilterItem(A[0]),r.current.hideFilterPanel()):r.current.setFilterModel(W({},i,{items:I}),"removeAllFilterItems"),[r,I,i,A]);return v.useEffect(()=>{u.length>0&&i.logicOperator&&!u.includes(i.logicOperator)&&x(u[0])},[u,x,i.logicOperator]),v.useEffect(()=>{A.length>0&&l.current.focus()},[A.length]),R.jsxs(cpe,W({ref:n},y,{children:[R.jsxs(b_t,{children:[I.map((j,D)=>R.jsx(zQ,W({item:j,applyFilterChanges:w,deleteFilter:O,hasMultipleFilters:T,showMultiFilterOperators:D>0,disableMultiFilterOperator:D!==1,applyMultiFilterOperatorChanges:x,focusElementRef:null,readOnly:!0,logicOperators:u,columnsSort:d},f),j.id==null?D:j.id)),A.map((j,D)=>R.jsx(zQ,W({item:j,applyFilterChanges:w,deleteFilter:O,hasMultipleFilters:T,showMultiFilterOperators:I.length+D>0,disableMultiFilterOperator:I.length+D!==1,applyMultiFilterOperatorChanges:x,focusElementRef:D===A.length-1?l:null,logicOperators:u,columnsSort:d},f),j.id==null?D+I.length:j.id))]}),!o.disableMultipleColumnsFiltering&&!(h&&m)?R.jsxs(C_t,{children:[h?R.jsx("span",{}):R.jsx(o.slots.baseButton,W({onClick:k,startIcon:R.jsx(o.slots.filterPanelAddIcon,{})},(N=o.slotProps)==null?void 0:N.baseButton,{children:r.current.getLocaleText("filterPanelAddFilter")})),!m&&A.length>0?R.jsx(o.slots.baseButton,W({onClick:$,startIcon:R.jsx(o.slots.filterPanelRemoveAllIcon,{})},(L=o.slotProps)==null?void 0:L.baseButton,{children:r.current.getLocaleText("filterPanelRemoveAll")})):null]}):null]}))}),N_t=["hideMenu","options"],L_t=["hideMenu","options"];function F_t(e){const t=En(),{hideMenu:n,options:r}=e,o=Dt(e,N_t);return R.jsx(rn,W({onClick:()=>{t.current.exportDataAsCsv(r),n==null||n()}},o,{children:t.current.getLocaleText("toolbarExportCSV")}))}function j_t(e){const t=En(),{hideMenu:n,options:r}=e,o=Dt(e,L_t);return R.jsx(rn,W({onClick:()=>{t.current.exportDataAsPrint(r),n==null||n()}},o,{children:t.current.getLocaleText("toolbarExportPrint")}))}const B_t=["className","selectedRowCount"],z_t=e=>{const{classes:t}=e;return In({root:["selectedRowCount"]},On,t)},V_t=or("div",{name:"MuiDataGrid",slot:"SelectedRowCount",overridesResolver:(e,t)=>t.selectedRowCount})(({theme:e})=>({alignItems:"center",display:"flex",margin:e.spacing(0,2),visibility:"hidden",width:0,height:0,[e.breakpoints.up("sm")]:{visibility:"visible",width:"auto",height:"auto"}})),H_t=v.forwardRef(function(t,n){const{className:r,selectedRowCount:o}=t,i=Dt(t,B_t),a=En(),s=Ot(),l=z_t(s),c=a.current.getLocaleText("footerRowSelected")(o);return R.jsx(V_t,W({ref:n,className:de(l.root,r),ownerState:s},i,{children:c}))}),U_t=v.forwardRef(function(t,n){var d,f;const r=En(),o=Ot(),i=Ye(r,ukt),a=Ye(r,jkt),s=Ye(r,Z5),l=!o.hideFooterSelectedRowCount&&a>0?R.jsx(H_t,{selectedRowCount:a}):R.jsx("div",{}),c=!o.hideFooterRowCount&&!o.pagination?R.jsx(o.slots.footerRowCount,W({},(d=o.slotProps)==null?void 0:d.footerRowCount,{rowCount:i,visibleRowCount:s})):null,u=o.pagination&&!o.hideFooterPagination&&o.slots.pagination&&R.jsx(o.slots.pagination,W({},(f=o.slotProps)==null?void 0:f.pagination));return R.jsxs(V$t,W({ref:n},t,{children:[l,c,u]}))});function W_t(){var i,a;const e=En(),t=Ye(e,Pc),n=Ot(),r=Ye(e,aC),o=e.current.unstable_applyPipeProcessors("preferencePanel",null,r.openedPanelValue??Ag.filters);return R.jsx(n.slots.panel,W({as:n.slots.basePopper,open:t.length>0&&r.open,id:r.panelId,"aria-labelledby":r.labelId},(i=n.slotProps)==null?void 0:i.panel,(a=n.slotProps)==null?void 0:a.basePopper,{children:o}))}function G_t(){var t;const e=Ot();return R.jsxs(v.Fragment,{children:[R.jsx(W_t,{}),e.slots.toolbar&&R.jsx(e.slots.toolbar,W({},(t=e.slotProps)==null?void 0:t.toolbar))]})}const cH=(e,t,n,r,o)=>{const i=o.hasScrollY?o.scrollbarSize:0;let a;switch(e){case br.LEFT:a=r[n];break;case br.RIGHT:a=o.columnsTotalWidth-r[n]-t+i;break;default:a=0;break}return a},Iw={root:le.scrollbarFiller,header:le["scrollbarFiller--header"],borderTop:le["scrollbarFiller--borderTop"],borderBottom:le["scrollbarFiller--borderBottom"],pinnedRight:le["scrollbarFiller--pinnedRight"]};function uH({header:e,borderTop:t=!0,borderBottom:n,pinnedRight:r}){return R.jsx("div",{role:"presentation",className:de(Iw.root,e&&Iw.header,t&&Iw.borderTop,n&&Iw.borderBottom,r&&Iw.pinnedRight)})}const q_t=or("div",{name:"MuiDataGrid",slot:"SkeletonLoadingOverlay",overridesResolver:(e,t)=>t.skeletonLoadingOverlay})({minWidth:"100%",width:"max-content",height:"100%",overflow:"clip"}),K_t=e=>{const{classes:t}=e;return In({root:["skeletonLoadingOverlay"]},On,t)},HQ=e=>parseInt(e.getAttribute("data-colindex"),10),Y_t=v.forwardRef(function(t,n){const r=Ot(),{slots:o}=r,i=K_t({classes:r.classes}),a=v.useRef(null),s=Zg(a,n),l=En(),c=Ye(l,Si),u=(c==null?void 0:c.viewportInnerSize.height)??0,d=Math.ceil(u/c.rowHeight),f=Ye(l,G5),p=Ye(l,Hp),h=v.useMemo(()=>p.filter(T=>T<=f).length,[f,p]),m=Ye(l,Oo),y=v.useMemo(()=>m.slice(0,h),[m,h]),w=Ye(l,k1),x=v.useCallback((T,I,A)=>{const k=cH(A,T,I,p,c);return{[A]:k}},[c,p]),S=v.useCallback(T=>{if(w.left.findIndex(I=>I.field===T)!==-1)return br.LEFT;if(w.right.findIndex(I=>I.field===T)!==-1)return br.RIGHT},[w.left,w.right]),E=v.useMemo(()=>{const T=[];for(let I=0;Ise.field===O.field):k-w.left.length,_=$&&x(O.computedWidth,k,$),z=c.columnsTotalWidth0},`skeleton-scrollbar-filler-${I}`))}T.push(R.jsx("div",{className:de(le.row,le.rowSkeleton,I===0&&le["row--firstVisible"]),children:A},`skeleton-row-${I}`))}return T},[o,y,w,d,r.showCellVerticalBorder,c.columnsTotalWidth,c.viewportOuterSize.width,c.rowHeight,c.hasScrollY,c.scrollbarSize,S,x]);return xt(l,"columnResize",T=>{var _,z,F;const{colDef:I,width:A}=T,k=(_=a.current)==null?void 0:_.querySelectorAll(`[data-field="${zd(I.field)}"]`);if(!k)throw new Error("MUI X: Expected skeleton cells to be defined with `data-field` attribute.");const O=y.findIndex(V=>V.field===I.field),$=S(I.field),N=$===br.LEFT,L=$===br.RIGHT,j=getComputedStyle(k[0]).getPropertyValue("--width"),D=parseInt(j,10)-A;if(k&&k.forEach(V=>{V.style.setProperty("--width",`${A}px`)}),N){const V=(z=a.current)==null?void 0:z.querySelectorAll(`.${le["cell--pinnedLeft"]}`);V==null||V.forEach(U=>{HQ(U)>O&&(U.style.left=`${parseInt(getComputedStyle(U).left,10)-D}px`)})}if(L){const V=(F=a.current)==null?void 0:F.querySelectorAll(`.${le["cell--pinnedRight"]}`);V==null||V.forEach(U=>{HQ(U)({maxHeight:"calc(100% + 1px)",flexGrow:1,[`& .${Zh.selectLabel}`]:{display:"none",[e.breakpoints.up("sm")]:{display:"block"}},[`& .${Zh.input}`]:{display:"none",[e.breakpoints.up("sm")]:{display:"inline-flex"}}})),t2t=(e,t)=>({from:n,to:r,count:o,page:i})=>e({from:n,to:r,count:o,page:i,estimated:t}),n2t=({from:e,to:t,count:n,estimated:r})=>r?`${e}–${t} of ${n!==-1?n:`more than ${r>t?r:t}`}`:`${e}–${t} of ${n!==-1?n:`more than ${t}`}`,r2t=v.forwardRef(function(t,n){const r=En(),o=Ot(),i=Ye(r,Ji),a=Ye(r,Ay),s=Ye(r,Lfe),{paginationMode:l,loading:c,estimatedRowCount:u}=o,d=v.useMemo(()=>a===-1&&l==="server"&&c?{backIconButtonProps:{disabled:!0},nextIconButtonProps:{disabled:!0}}:{},[c,l,a]),f=v.useMemo(()=>Math.max(0,s-1),[s]),p=v.useMemo(()=>a===-1||i.page<=f?i.page:f,[f,i.page,a]),h=v.useCallback(E=>{const P=Number(E.target.value);r.current.setPageSize(P)},[r]),m=v.useCallback((E,P)=>{r.current.setPage(P)},[r]),w=(E=>{for(let P=0;P{const{classes:t}=e;return In({root:["rowCount"]},On,t)},a2t=or("div",{name:"MuiDataGrid",slot:"RowCount",overridesResolver:(e,t)=>t.rowCount})(({theme:e})=>({alignItems:"center",display:"flex",margin:e.spacing(0,2)})),s2t=v.forwardRef(function(t,n){const{className:r,rowCount:o,visibleRowCount:i}=t,a=Dt(t,o2t),s=En(),l=Ot(),c=i2t(l);if(o===0)return null;const u=i=d.left.length&&m=h.lastColumnIndex,se=l2t(j.classes,{root:["row",r&&"selected",Q&&"row--editable",ee&&"row--editing",y&&"row--firstVisible",w&&"row--lastVisible",S&&"row--borderBottom",l==="auto"&&"row--dynamicHeight"]}),oe=N.hooks.useGridRowAriaAttributes();v.useLayoutEffect(()=>{if(D.range){const st=$.current.getRowIndexRelativeToVisibleRows(o);st!==void 0&&$.current.unstable_setLastMeasuredRowIndex(st)}if(L.current&&l==="auto")return $.current.observeRowHeight(L.current,o)},[$,D.range,l,o]);const fe=v.useCallback((st,et)=>Et=>{D1(Et)||$.current.getRow(o)&&($.current.publishEvent(st,$.current.getRowParams(o),Et),et&&et(Et))},[$,o]),Z=v.useCallback(st=>{const et=WO(st.target,le.cell),Et=et==null?void 0:et.getAttribute("data-field");if(Et){if(Et===x0.field||Et===qM||Et==="__reorder__"||$.current.getCellMode(o,Et)===ar.Edit)return;const An=$.current.getColumn(Et);if((An==null?void 0:An.type)===UM)return}fe("rowClick",E)(st)},[$,E,fe,o]),{slots:ce,slotProps:ge,disableColumnReorder:we}=j,me=j.rowReordering,Se=Ye($,()=>W({},$.current.getRowHeightEntry(o)),ife),xe=v.useMemo(()=>{if(x)return{opacity:0,width:0,height:0};const st=W({},s,{maxHeight:l==="auto"?"none":l,minHeight:l,"--height":typeof l=="number"?`${l}px`:l});if(Se.spacingTop){const et=j.rowSpacingType==="border"?"borderTopWidth":"marginTop";st[et]=Se.spacingTop}if(Se.spacingBottom){const et=j.rowSpacingType==="border"?"borderBottomWidth":"marginBottom";let Et=st[et];typeof Et!="number"&&(Et=parseInt(Et||"0",10)),Et+=Se.spacingBottom,st[et]=Et}return st},[x,l,s,Se,j.rowSpacingType]),ke=$.current.unstable_applyPipeProcessors("rowClassName",[],o),De=K?oe(K,a):void 0;if(typeof j.getRowClassName=="function"){const st=a-(((gt=D.range)==null?void 0:gt.firstRowIndex)||0),et=W({},$.current.getRowParams(o),{isFirstVisible:st===0,isLastVisible:st===D.rows.length-1,indexRelativeToCurrentPage:st});ke.push(j.getRowClassName(et))}const _e=(st,et,Et,An,Ke=Ea.NONE)=>{var Ls;const $e=$.current.unstable_getCellColSpanInfo(o,Et);if($e!=null&&$e.spannedByColSpan)return null;const Qe=($e==null?void 0:$e.cellProps.width)??st.computedWidth,Tt=($e==null?void 0:$e.cellProps.colSpan)??1,Xt=cH(ope[Ke],st.computedWidth,Et,F,p);if((K==null?void 0:K.type)==="skeletonRow")return R.jsx(ce.skeletonCell,{type:st.type,width:Qe,height:l,field:st.field,align:st.align},st.field);const $t=((Ls=V[o])==null?void 0:Ls[st.field])??null,bn=st.field==="__reorder__",Gn=Object.keys(V).length>0,Jn=!(we||st.disableReorder),Do=me&&!_.length&&z<=1&&!Gn,oo=!(Jn||bn&&Do),Bi=Ke===Ea.VIRTUAL;return R.jsx(ce.cell,W({column:st,width:Qe,rowId:o,align:st.align||"left",colIndex:Et,colSpan:Tt,disableDragEvents:oo,editCellState:$t,isNotVisible:Bi,pinnedOffset:Xt,pinnedPosition:Ke,sectionIndex:et,sectionLength:An,gridHasFiller:ie},ge==null?void 0:ge.cell),st.field)};if(!K)return null;const ye=d.left.map((st,et)=>_e(st,et,et,d.left.length,Ea.LEFT)),Pe=d.right.map((st,et)=>{const Et=u.length-d.right.length+et;return _e(st,et,Et,d.right.length,Ea.RIGHT)}),Ae=u.length-d.left.length-d.right.length,Me=[];pe&&Me.push(_e(u[m],m-d.left.length,m,Ae,Ea.VIRTUAL));for(let st=h.firstColumnIndex;st0&&R.jsx(u2t,{width:Xe}),Pe.length>0&&R.jsx("div",{role:"presentation",className:le.filler}),Pe,X!==0&&R.jsx(uH,{pinnedRight:d.right.length>0})]}))}),f2t=Vp(d2t),p2t=()=>{const e=Gl(),t=Ot(),n=Ye(e,Oo),r=Ye(e,J5),o=Ye(e,$1),i=Ye(e,hkt);return{role:"grid","aria-colcount":n.length,"aria-rowcount":o+1+i+r,"aria-multiselectable":eH(t)}},h2t=()=>{const e=Gl(),t=Ye(e,gd),n=Ye(e,$1);return v.useCallback((r,o)=>{const i={},a=o+n+2;return i["aria-rowindex"]=a,e.current.isRowSelectable(r.id)&&(i["aria-selected"]=t[r.id]!==void 0),i},[e,t,n])};function g2t({privateApiRef:e,configuration:t,props:n,children:r}){const o=v.useRef(e.current.getPublicApi());return R.jsx(Qfe.Provider,{value:t,children:R.jsx(efe.Provider,{value:n,children:R.jsx(Wfe.Provider,{value:e,children:R.jsx(Zde.Provider,{value:o,children:r})})})})}const m2t=e=>{const t=v.useRef(null),n=v.useRef(null),r=v.useRef(null),o=v.useRef(null),i=v.useRef(null),a=v.useRef(null);e.current.register("public",{rootElementRef:t}),e.current.register("private",{mainElementRef:n,virtualScrollerRef:r,virtualScrollbarVerticalRef:o,virtualScrollbarHorizontalRef:i,columnHeadersContainerRef:a})},y2t=e=>{const t=dr();e.current.state.isRtl===void 0&&(e.current.state.isRtl=t);const n=v.useRef(!0);v.useEffect(()=>{n.current?n.current=!1:e.current.setState(r=>W({},r,{isRtl:t}))},[e,t])},v2t=zAt()&&window.localStorage.getItem("DEBUG")!=null,ex=()=>{},b2t={debug:ex,info:ex,warn:ex,error:ex},UQ=["debug","info","warn","error"];function WQ(e,t,n=console){const r=UQ.indexOf(t);if(r===-1)throw new Error(`MUI X: Log level ${t} not recognized.`);return UQ.reduce((i,a,s)=>(s>=r?i[a]=(...l)=>{const[c,...u]=l;n[a](`MUI X: ${e} - ${c}`,...u)}:i[a]=ex,i),{})}const w2t=(e,t)=>{const n=v.useCallback(r=>v2t?WQ(r,"debug",t.logger):t.logLevel?WQ(r,t.logLevel.toString(),t.logger):b2t,[t.logLevel,t.logger]);ln(e,{getLogger:n},"private")};class x2t{constructor(){this.maxListeners=20,this.warnOnce=!1,this.events={}}on(t,n,r={}){let o=this.events[t];o||(o={highPriority:new Map,regular:new Map},this.events[t]=o),r.isFirst?o.highPriority.set(n,!0):o.regular.set(n,!0)}removeListener(t,n){this.events[t]&&(this.events[t].regular.delete(n),this.events[t].highPriority.delete(n))}removeAllListeners(){this.events={}}emit(t,...n){const r=this.events[t];if(!r)return;const o=Array.from(r.highPriority.keys()),i=Array.from(r.regular.keys());for(let a=o.length-1;a>=0;a-=1){const s=o[a];r.highPriority.has(s)&&s.apply(this,n)}for(let a=0;a(this.listeners.add(n),()=>{this.listeners.delete(n)}),this.getSnapshot=()=>this.value,this.update=n=>{this.value=n,this.listeners.forEach(r=>r(n))},this.value=t,this.listeners=new Set}}const dpe=Symbol("mui.api_private"),S2t=e=>e.isPropagationStopped!==void 0;let GQ=0;function C2t(e){var o;const t=(o=e.current)==null?void 0:o[dpe];if(t)return t;const n={},r={state:n,store:dH.create(n),instanceId:{id:GQ}};return GQ+=1,r.getPublicApi=()=>e.current,r.register=(i,a)=>{Object.keys(a).forEach(s=>{const l=a[s],c=r[s];if((c==null?void 0:c.spying)===!0?c.target=l:r[s]=l,i==="public"){const u=e.current,d=u[s];(d==null?void 0:d.spying)===!0?d.target=l:u[s]=l}})},r.register("private",{caches:{},eventManager:new x2t}),r}function E2t(e){return{get state(){return e.current.state},get store(){return e.current.store},get instanceId(){return e.current.instanceId},[dpe]:e.current}}function P2t(e,t){var a;const n=v.useRef(),r=v.useRef();r.current||(r.current=C2t(n)),n.current||(n.current=E2t(r));const o=v.useCallback((...s)=>{const[l,c,u={}]=s;if(u.defaultMuiPrevented=!1,S2t(u)&&u.isPropagationStopped())return;const d=t.signature===Tl.DataGridPro||t.signature===Tl.DataGridPremium?{api:r.current.getPublicApi()}:{};r.current.eventManager.emit(l,c,u,d)},[r,t.signature]),i=v.useCallback((s,l,c)=>{r.current.eventManager.on(s,l,c);const u=r.current;return()=>{u.eventManager.removeListener(s,l)}},[r]);return ln(r,{subscribeEvent:i,publishEvent:o},"public"),e&&!((a=e.current)!=null&&a.state)&&(e.current=n.current),v.useImperativeHandle(e,()=>n.current,[n]),v.useEffect(()=>{const s=r.current;return()=>{s.publishEvent("unmount")}},[r]),r}const T2t=(e,t)=>{const n=v.useCallback(r=>{if(t.localeText[r]==null)throw new Error(`Missing translation for key ${r}.`);return t.localeText[r]},[t.localeText]);e.current.register("public",{getLocaleText:n})};function sC(e){"@babel/helpers - typeof";return sC=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},sC(e)}function I2t(e,t){if(sC(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(sC(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function lC(e){var t=I2t(e,"string");return sC(t)=="symbol"?t:t+""}const O2t=e=>{const t=v.useRef({}),n=v.useRef(!1),r=v.useCallback(u=>{n.current||!u||(n.current=!0,Object.values(u.appliers).forEach(d=>{d()}),n.current=!1)},[]),o=v.useCallback((u,d,f)=>{t.current[u]||(t.current[u]={processors:new Map,processorsAsArray:[],appliers:{}});const p=t.current[u];return p.processors.get(d)!==f&&(p.processors.set(d,f),p.processorsAsArray=Array.from(t.current[u].processors.values()),r(p)),()=>{t.current[u].processors.delete(d),t.current[u].processorsAsArray=Array.from(t.current[u].processors.values())}},[r]),i=v.useCallback((u,d,f)=>(t.current[u]||(t.current[u]={processors:new Map,processorsAsArray:[],appliers:{}}),t.current[u].appliers[d]=f,()=>{const p=t.current[u].appliers,h=Dt(p,[d].map(lC));t.current[u].appliers=h}),[]),a=v.useCallback(u=>{r(t.current[u])},[r]),s=v.useCallback((...u)=>{const[d,f,p]=u;if(!t.current[d])return f;const h=t.current[d].processorsAsArray;let m=f;for(let y=0;y{const r=v.useRef(),o=v.useRef(`mui-${Math.round(Math.random()*1e9)}`),i=v.useCallback(()=>{r.current=e.current.registerPipeProcessor(t,o.current,n)},[e,n,t]);R1(()=>{i()});const a=v.useRef(!0);v.useEffect(()=>(a.current?a.current=!1:i(),()=>{r.current&&(r.current(),r.current=null)}),[i])},fH=(e,t,n)=>{const r=v.useRef(),o=v.useRef(`mui-${Math.round(Math.random()*1e9)}`),i=v.useCallback(()=>{r.current=e.current.registerPipeApplier(t,o.current,n)},[e,n,t]);R1(()=>{i()});const a=v.useRef(!0);v.useEffect(()=>(a.current?a.current=!1:i(),()=>{r.current&&(r.current(),r.current=null)}),[i])},qO=(e,t,n,r)=>{const o=v.useCallback(()=>{e.current.registerStrategyProcessor(t,n,r)},[e,r,n,t]);R1(()=>{o()});const i=v.useRef(!0);v.useEffect(()=>{i.current?i.current=!1:o()},[o])},kg="none",qQ={rowTreeCreation:"rowTree",filtering:"rowTree",sorting:"rowTree",visibleRowsLookupCreation:"rowTree"},A2t=e=>{const t=v.useRef(new Map),n=v.useRef({}),r=v.useCallback((l,c,u)=>{const d=()=>{const h=n.current[c],m=Dt(h,[l].map(lC));n.current[c]=m};n.current[c]||(n.current[c]={});const f=n.current[c],p=f[l];return f[l]=u,!p||p===u||l===e.current.getActiveStrategy(qQ[c])&&e.current.publishEvent("activeStrategyProcessorChange",c),d},[e]),o=v.useCallback((l,c)=>{const u=e.current.getActiveStrategy(qQ[l]);if(u==null)throw new Error("Can't apply a strategy processor before defining an active strategy");const d=n.current[l];if(!d||!d[u])throw new Error(`No processor found for processor "${l}" on strategy "${u}"`);const f=d[u];return f(c)},[e]),i=v.useCallback(l=>{const u=Array.from(t.current.entries()).find(([,d])=>d.group!==l?!1:d.isAvailable());return(u==null?void 0:u[0])??kg},[]),a=v.useCallback((l,c,u)=>{t.current.set(c,{group:l,isAvailable:u}),e.current.publishEvent("strategyAvailabilityChange")},[e]);ln(e,{registerStrategyProcessor:r,applyStrategyProcessor:o,getActiveStrategy:i,setStrategyAvailability:a},"private")},k2t=e=>{const t=v.useRef({}),[,n]=v.useState(),r=v.useCallback(c=>{t.current[c.stateId]=c},[]),o=v.useCallback((c,u)=>{let d;if(pfe(c)?d=c(e.current.state):d=c,e.current.state===d)return!1;let f=!1;const p=[];if(Object.keys(t.current).forEach(h=>{const m=t.current[h],y=m.stateSelector(e.current.state,e.current.instanceId),w=m.stateSelector(d,e.current.instanceId);w!==y&&(p.push({stateId:m.stateId,hasPropChanged:w!==m.propModel}),m.propModel!==void 0&&w!==m.propModel&&(f=!0))}),p.length>1)throw new Error(`You're not allowed to update several sub-state in one transaction. You already updated ${p[0].stateId}, therefore, you're not allowed to update ${p.map(h=>h.stateId).join(", ")} in the same transaction.`);if(f||(e.current.state=d,e.current.publishEvent("stateChange",d),e.current.store.update(d)),p.length===1){const{stateId:h,hasPropChanged:m}=p[0],y=t.current[h],w=y.stateSelector(d,e.current.instanceId);y.propOnChange&&m&&y.propOnChange(w,{reason:u,api:e.current}),f||e.current.publishEvent(y.changeEvent,w,{reason:u})}return!f},[e]),i=v.useCallback((c,u,d)=>e.current.setState(f=>W({},f,{[c]:u(f[c])}),d),[e]),a=v.useCallback(()=>n(()=>e.current.state),[e]),s={setState:o,forceUpdate:a},l={updateControlState:i,registerControlState:r};ln(e,s,"public"),ln(e,l,"private")},M2t=(e,t)=>{const n=P2t(e,t);return m2t(n),y2t(n),w2t(n,t),k2t(n),O2t(n),A2t(n),T2t(n,t),n.current.register("private",{rootProps:t}),n},Ko=(e,t,n)=>{const r=v.useRef(!1);r.current||(t.current.state=e(t.current.state,n,t),r.current=!0)};function ZF(e,t){if(e==null)return"";const n=typeof e=="string"?e:`${e}`;if(t.shouldAppendQuotes||t.escapeFormulas){const r=n.replace(/"/g,'""');return t.escapeFormulas&&["=","+","-","@"," ","\r"].includes(r[0])?`"'${r}"`:[t.delimiter,` +`,"\r",'"'].some(o=>n.includes(o))?`"${r}"`:r}return n}const fpe=(e,t)=>{var i,a;const{csvOptions:n,ignoreValueFormatter:r}=t;let o;if(r){const s=e.colDef.type;s==="number"?o=String(e.value):s==="date"||s==="dateTime"?o=(i=e.value)==null?void 0:i.toISOString():typeof((a=e.value)==null?void 0:a.toString)=="function"?o=e.value.toString():o=e.value}else o=e.formattedValue;return ZF(o,n)};class ej{constructor(t){this.options=void 0,this.rowString="",this.isEmpty=!0,this.options=t}addValue(t){this.isEmpty||(this.rowString+=this.options.csvOptions.delimiter),typeof this.options.sanitizeCellValue=="function"?this.rowString+=this.options.sanitizeCellValue(t,this.options.csvOptions):this.rowString+=t,this.isEmpty=!1}getRowString(){return this.rowString}}const R2t=({id:e,columns:t,getCellParams:n,csvOptions:r,ignoreValueFormatter:o})=>{const i=new ej({csvOptions:r});return t.forEach(a=>{const s=n(e,a.field);i.addValue(fpe(s,{ignoreValueFormatter:o,csvOptions:r}))}),i.getRowString()};function $2t(e){const{columns:t,rowIds:n,csvOptions:r,ignoreValueFormatter:o,apiRef:i}=e,a=n.reduce((d,f)=>`${d}${R2t({id:f,columns:t,getCellParams:i.current.getCellParams,ignoreValueFormatter:o,csvOptions:r})}\r +`,"").trim();if(!r.includeHeaders)return a;const s=t.filter(d=>d.field!==x0.field),l=[];if(r.includeColumnGroupsHeaders){const d=i.current.getAllGroupDetails();let f=0;const p=s.reduce((h,m)=>{const y=i.current.getColumnGroupPath(m.field);return h[m.field]=y,f=Math.max(f,y.length),h},{});for(let h=0;h{const w=(p[y.field]||[])[h],x=d[w];m.addValue(x?x.headerName||x.groupId:"")})}}const c=new ej({csvOptions:r,sanitizeCellValue:ZF});return s.forEach(d=>{c.addValue(d.headerName||d.field)}),l.push(c),`${`${l.map(d=>d.getRowString()).join(`\r `)}\r -`}${a}`.trim()}function HQ(e){const t=document.createElement("span");t.style.whiteSpace="pre",t.style.userSelect="all",t.style.opacity="0px",t.textContent=e,document.body.appendChild(t);const n=document.createRange();n.selectNode(t);const r=window.getSelection();r.removeAllRanges(),r.addRange(n);try{document.execCommand("copy")}finally{document.body.removeChild(t)}}function X_t(e){navigator.clipboard?navigator.clipboard.writeText(e).catch(()=>{HQ(e)}):HQ(e)}function J_t(e){var t;return!!((t=window.getSelection())!=null&&t.toString()||e&&(e.selectionEnd||0)-(e.selectionStart||0)>0)}const Z_t=(e,t)=>{const n=t.ignoreValueFormatterDuringExport,r=(typeof n=="object"?n==null?void 0:n.clipboardExport:n)||!1,o=t.clipboardCopyCellDelimiter,i=v.useCallback(a=>{if(!eDt(a)||J_t(a.target))return;let s="";if(e.current.getSelectedRows().size>0)s=e.current.getDataAsCsv({includeHeaders:!1,delimiter:o,shouldAppendQuotes:!1,escapeFormulas:!1});else{const c=Za(e);if(c){const u=e.current.getCellParams(c.id,c.field);s=rpe(u,{csvOptions:{delimiter:o,shouldAppendQuotes:!1,escapeFormulas:!1},ignoreValueFormatter:r})}}s=e.current.unstable_applyPipeProcessors("clipboardCopy",s),s&&(X_t(s),e.current.publishEvent("clipboardCopy",s))},[e,r,o]);Efe(e,e.current.rootElementRef,"keydown",i),yr(e,"clipboardCopy",t.onClipboardCopy)},e2t=e=>W({},e,{columnMenu:{open:!1}}),t2t=e=>{const t=Wo(e,"useGridColumnMenu"),n=v.useCallback(a=>{const s=uT(e.current.state),l={open:!0,field:a};(l.open!==s.open||l.field!==s.field)&&(e.current.setState(u=>u.columnMenu.open&&u.columnMenu.field===a?u:(t.debug("Opening Column Menu"),W({},u,{columnMenu:{open:!0,field:a}}))),e.current.hidePreferences(),e.current.forceUpdate())},[e,t]),r=v.useCallback(()=>{const a=uT(e.current.state);if(a.field){const c=jd(e),u=gl(e),d=pd(e);let f=a.field;if(c[f]||(f=d[0]),u[f]===!1){const p=d.filter(m=>m===f?!0:u[m]!==!1),h=p.indexOf(f);f=p[h+1]||p[h-1]}e.current.setColumnHeaderFocus(f)}const s={open:!1,field:void 0};(s.open!==a.open||s.field!==a.field)&&(e.current.setState(c=>(t.debug("Hiding Column Menu"),W({},c,{columnMenu:s}))),e.current.forceUpdate())},[e,t]),o=v.useCallback(a=>{t.debug("Toggle Column Menu");const s=uT(e.current.state);!s.open||s.field!==a?n(a):r()},[e,t,n,r]);ln(e,{showColumnMenu:n,hideColumnMenu:r,toggleColumnMenu:o},"public"),bt(e,"columnResizeStart",r),bt(e,"virtualScrollerWheel",e.current.hideColumnMenu),bt(e,"virtualScrollerTouchMove",e.current.hideColumnMenu)},n2t=(e,t,n)=>{var o,i,a;const r=ty({apiRef:n,columnsToUpsert:t.columns,initialState:(o=t.initialState)==null?void 0:o.columns,columnVisibilityModel:t.columnVisibilityModel??((a=(i=t.initialState)==null?void 0:i.columns)==null?void 0:a.columnVisibilityModel)??{},keepOnlyColumnsToUpsert:!0});return W({},e,{columns:r,pinnedColumns:e.pinnedColumns??HF})};function r2t(e,t){var O,$;const n=Wo(e,"useGridColumns"),r=v.useRef(t.columns);e.current.registerControlState({stateId:"visibleColumns",propModel:t.columnVisibilityModel,propOnChange:t.onColumnVisibilityModelChange,stateSelector:gl,changeEvent:"columnVisibilityModelChange"});const o=v.useCallback(N=>{var L,j;n.debug("Updating columns state."),e.current.setState(UQ(N)),e.current.publishEvent("columnsChange",N.orderedFields),(j=(L=e.current).updateRenderContext)==null||j.call(L),e.current.forceUpdate()},[n,e]),i=v.useCallback(N=>jd(e)[N],[e]),a=v.useCallback(()=>Cc(e),[e]),s=v.useCallback(()=>Io(e),[e]),l=v.useCallback((N,L=!0)=>(L?Io(e):Cc(e)).findIndex(D=>D.field===N),[e]),c=v.useCallback(N=>{const L=l(N);return Vp(e)[L]},[e,l]),u=v.useCallback(N=>{var j,D;gl(e)!==N&&(e.current.setState(_=>W({},_,{columns:ty({apiRef:e,columnsToUpsert:[],initialState:void 0,columnVisibilityModel:N,keepOnlyColumnsToUpsert:!1})})),(D=(j=e.current).updateRenderContext)==null||D.call(j),e.current.forceUpdate())},[e]),d=v.useCallback(N=>{const L=ty({apiRef:e,columnsToUpsert:N,initialState:void 0,keepOnlyColumnsToUpsert:!1});o(L)},[e,o]),f=v.useCallback((N,L)=>{const j=gl(e),D=j[N]??!0;if(L!==D){const _=W({},j,{[N]:L});e.current.setColumnVisibilityModel(_)}},[e]),p=v.useCallback(N=>pd(e).findIndex(j=>j===N),[e]),h=v.useCallback((N,L)=>{const j=pd(e),D=p(N);if(D===L)return;n.debug(`Moving column ${N} to index ${L}`);const _=[...j],z=_.splice(D,1)[0];_.splice(L,0,z),o(W({},du(e.current.state),{orderedFields:_}));const F={column:e.current.getColumn(N),targetIndex:e.current.getColumnIndexRelativeToVisibleColumns(N),oldIndex:D};e.current.publishEvent("columnIndexChange",F)},[e,n,o,p]),m=v.useCallback((N,L)=>{n.debug(`Updating column ${N} width to ${L}`);const j=du(e.current.state),D=j.lookup[N],_=W({},D,{width:L,hasBeenResized:!0});o(WF(W({},j,{lookup:W({},j.lookup,{[N]:_})}),e.current.getRootDimensions())),e.current.publishEvent("columnWidthChange",{element:e.current.getColumnHeaderElement(N),colDef:_,width:L})},[e,n,o]),y={getColumn:i,getAllColumns:a,getColumnIndex:l,getColumnPosition:c,getVisibleColumns:s,getColumnIndexRelativeToVisibleColumns:p,updateColumns:d,setColumnVisibilityModel:u,setColumnVisibility:f,setColumnWidth:m},w={setColumnIndex:h};ln(e,y,"public"),ln(e,w,t.signature===Cl.DataGrid?"private":"public");const x=v.useCallback((N,L)=>{var V,U;const j={},D=gl(e);(!L.exportOnlyDirtyModels||t.columnVisibilityModel!=null||Object.keys(((U=(V=t.initialState)==null?void 0:V.columns)==null?void 0:U.columnVisibilityModel)??{}).length>0||Object.keys(D).length>0)&&(j.columnVisibilityModel=D),j.orderedFields=pd(e);const z=Cc(e),F={};return z.forEach(q=>{if(q.hasBeenResized){const X={};_fe.forEach(ie=>{let ee=q[ie];ee===1/0&&(ee=-1),X[ie]=ee}),F[q.field]=X}}),Object.keys(F).length>0&&(j.dimensions=F),W({},N,{columns:j})},[e,t.columnVisibilityModel,(O=t.initialState)==null?void 0:O.columns]),C=v.useCallback((N,L)=>{var z;const j=(z=L.stateToRestore.columns)==null?void 0:z.columnVisibilityModel,D=L.stateToRestore.columns;if(j==null&&D==null)return N;const _=ty({apiRef:e,columnsToUpsert:[],initialState:D,columnVisibilityModel:j,keepOnlyColumnsToUpsert:!1});return e.current.setState(UQ(_)),D!=null&&e.current.publishEvent("columnsChange",_.orderedFields),N},[e]),E=v.useCallback((N,L)=>{var j;if(L===Ig.columns){const D=t.slots.columnsPanel;return R.jsx(D,W({},(j=t.slotProps)==null?void 0:j.columnsPanel))}return N},[t.slots.columnsPanel,($=t.slotProps)==null?void 0:$.columnsPanel]),P=v.useCallback(N=>t.disableColumnSelector?N:[...N,"columnMenuColumnsItem"],[t.disableColumnSelector]);zr(e,"columnMenu",P),zr(e,"exportState",x),zr(e,"restoreState",C),zr(e,"preferencePanel",E);const T=v.useRef(null);bt(e,"viewportInnerSizeChange",N=>{T.current!==N.width&&(T.current=N.width,o(WF(du(e.current.state),e.current.getRootDimensions())))});const A=v.useCallback(()=>{n.info("Columns pipe processing have changed, regenerating the columns");const N=ty({apiRef:e,columnsToUpsert:[],initialState:void 0,keepOnlyColumnsToUpsert:!1});o(N)},[e,n,o]);l5(e,"hydrateColumns",A);const k=v.useRef(!0);v.useEffect(()=>{if(k.current){k.current=!1;return}if(n.info(`GridColumns have changed, new length ${t.columns.length}`),r.current===t.columns)return;const N=ty({apiRef:e,initialState:void 0,columnsToUpsert:t.columns,keepOnlyColumnsToUpsert:!0});r.current=t.columns,o(N)},[n,e,o,t.columns]),v.useEffect(()=>{t.columnVisibilityModel!==void 0&&e.current.setColumnVisibilityModel(t.columnVisibilityModel)},[e,n,t.columnVisibilityModel])}function UQ(e){return t=>W({},t,{columns:e})}const o2t=(e,t)=>{var n;return W({},e,{density:((n=t.initialState)==null?void 0:n.density)??t.density??"standard"})},i2t=(e,t)=>{var s;const n=Wo(e,"useDensity");e.current.registerControlState({stateId:"density",propModel:t.density,propOnChange:t.onDensityChange,stateSelector:Iy,changeEvent:"densityChange"});const o={setDensity:Ar(l=>{Iy(e.current.state)!==l&&(n.debug(`Set grid density to ${l}`),e.current.setState(u=>W({},u,{density:l})))})};ln(e,o,"public");const i=v.useCallback((l,c)=>{var f;const u=Iy(e.current.state);return!c.exportOnlyDirtyModels||t.density!=null||((f=t.initialState)==null?void 0:f.density)!=null?W({},l,{density:u}):l},[e,t.density,(s=t.initialState)==null?void 0:s.density]),a=v.useCallback((l,c)=>{var d;const u=(d=c.stateToRestore)!=null&&d.density?c.stateToRestore.density:Iy(e.current.state);return e.current.setState(f=>W({},f,{density:u})),l},[e]);zr(e,"exportState",i),zr(e,"restoreState",a),v.useEffect(()=>{t.density&&e.current.setDensity(t.density)},[e,t.density])};function a2t(e,t="csv",n=document.title||"untitled"){const r=`${n}.${t}`;if("download"in HTMLAnchorElement.prototype){const o=URL.createObjectURL(e),i=document.createElement("a");i.href=o,i.download=r,i.click(),setTimeout(()=>{URL.revokeObjectURL(o)});return}throw new Error("MUI X: exportAs not supported.")}const ope=({apiRef:e,options:t})=>{const n=Cc(e);return t.fields?t.fields.reduce((o,i)=>{const a=n.find(s=>s.field===i);return a&&o.push(a),o},[]):(t.allColumns?n:Io(e)).filter(o=>!o.disableExport)},ipe=({apiRef:e})=>{var l,c;const t=wfe(e),n=$i(e),r=e.current.getSelectedRows(),o=t.filter(u=>n[u].type!=="footer"),i=Zg(e),a=((l=i==null?void 0:i.top)==null?void 0:l.map(u=>u.id))||[],s=((c=i==null?void 0:i.bottom)==null?void 0:c.map(u=>u.id))||[];return o.unshift(...a),o.push(...s),r.size>0?o.filter(u=>r.has(u)):o},s2t=(e,t)=>{const n=Wo(e,"useGridCsvExport"),r=t.ignoreValueFormatterDuringExport,o=(typeof r=="object"?r==null?void 0:r.csvExport:r)||!1,i=v.useCallback((c={})=>{n.debug("Get data as CSV");const u=ope({apiRef:e,options:c}),f=(c.getRowsToExport??ipe)({apiRef:e});return Q_t({columns:u,rowIds:f,csvOptions:{delimiter:c.delimiter||",",shouldAppendQuotes:c.shouldAppendQuotes??!0,includeHeaders:c.includeHeaders??!0,includeColumnGroupsHeaders:c.includeColumnGroupsHeaders??!0,escapeFormulas:c.escapeFormulas??!0},ignoreValueFormatter:o,apiRef:e})},[n,e,o]),a=v.useCallback(c=>{n.debug("Export data as CSV");const u=i(c),d=new Blob([c!=null&&c.utf8WithBom?new Uint8Array([239,187,191]):"",u],{type:"text/csv"});a2t(d,"csv",c==null?void 0:c.fileName)},[n,i]);ln(e,{getDataAsCsv:i,exportDataAsCsv:a},"public");const l=v.useCallback((c,u)=>{var d;return(d=u.csvOptions)!=null&&d.disableToolbarButton?c:[...c,{component:R.jsx(t_t,{options:u.csvOptions}),componentName:"csvExport"}]},[]);zr(e,"exportMenu",l)},fT=(e,t,n)=>{let r=e.paginationModel;const o=e.rowCount,i=(n==null?void 0:n.pageSize)??r.pageSize,a=(n==null?void 0:n.page)??r.page,s=Pfe(o,i,a);n&&((n==null?void 0:n.page)!==r.page||(n==null?void 0:n.pageSize)!==r.pageSize)&&(r=n);const l=ykt(r.page,s);return l!==r.page&&(r=W({},r,{page:l})),Ife(r.pageSize,t),r},l2t=(e,t)=>{var h,m;const n=Wo(e,"useGridPaginationModel"),r=Ye(e,v1),o=Math.floor(t.rowHeight*r);e.current.registerControlState({stateId:"paginationModel",propModel:t.paginationModel,propOnChange:t.onPaginationModelChange,stateSelector:Ji,changeEvent:"paginationModelChange"});const i=v.useCallback(y=>{const w=Ji(e);y!==w.page&&(n.debug(`Setting page to ${y}`),e.current.setPaginationModel({page:y,pageSize:w.pageSize}))},[e,n]),a=v.useCallback(y=>{const w=Ji(e);y!==w.pageSize&&(n.debug(`Setting page size to ${y}`),e.current.setPaginationModel({pageSize:y,page:w.page}))},[e,n]),s=v.useCallback(y=>{const w=Ji(e);y!==w&&(n.debug("Setting 'paginationModel' to",y),e.current.setState(x=>W({},x,{pagination:W({},x.pagination,{paginationModel:fT(x.pagination,t.signature,y)})})))},[e,n,t.signature]);ln(e,{setPage:i,setPageSize:a,setPaginationModel:s},"public");const c=v.useCallback((y,w)=>{var E,P;const x=Ji(e);return!w.exportOnlyDirtyModels||t.paginationModel!=null||((P=(E=t.initialState)==null?void 0:E.pagination)==null?void 0:P.paginationModel)!=null||x.page!==0&&x.pageSize!==mkt(t.autoPageSize)?W({},y,{pagination:W({},y.pagination,{paginationModel:x})}):y},[e,t.paginationModel,(m=(h=t.initialState)==null?void 0:h.pagination)==null?void 0:m.paginationModel,t.autoPageSize]),u=v.useCallback((y,w)=>{var C,E;const x=(C=w.stateToRestore.pagination)!=null&&C.paginationModel?W({},Tfe(t.autoPageSize),(E=w.stateToRestore.pagination)==null?void 0:E.paginationModel):Ji(e);return e.current.setState(P=>W({},P,{pagination:W({},P.pagination,{paginationModel:fT(P.pagination,t.signature,x)})})),y},[e,t.autoPageSize,t.signature]);zr(e,"exportState",c),zr(e,"restoreState",u);const d=()=>{var w;const y=Ji(e);(w=e.current.virtualScrollerRef)!=null&&w.current&&e.current.scrollToIndexes({rowIndex:y.page*y.pageSize})},f=v.useCallback(()=>{if(!t.autoPageSize)return;const y=e.current.getRootDimensions(),w=Math.floor(y.viewportInnerSize.height/o);e.current.setPageSize(w)},[e,t.autoPageSize,o]),p=v.useCallback(y=>{if(y==null)return;const w=Ji(e),x=Ofe(e);w.page>x-1&&e.current.setPage(Math.max(0,x-1))},[e]);bt(e,"viewportInnerSizeChange",f),bt(e,"paginationModelChange",d),bt(e,"rowCountChange",p),v.useEffect(()=>{e.current.setState(y=>W({},y,{pagination:W({},y.pagination,{paginationModel:fT(y.pagination,t.signature,t.paginationModel)})}))},[e,t.paginationModel,t.paginationMode,t.signature]),v.useEffect(f,[f])};function c2t(){return new Promise(e=>{requestAnimationFrame(()=>{e()})})}function u2t(e){const t=document.createElement("iframe");return t.style.position="absolute",t.style.width="0px",t.style.height="0px",t.title=e||document.title,t}const d2t=(e,t)=>{const n=e.current.rootElementRef.current!==null,r=Wo(e,"useGridPrintExport"),o=v.useRef(null),i=v.useRef(null),a=v.useRef({}),s=v.useRef([]),l=v.useRef();v.useEffect(()=>{o.current=Jf(e.current.rootElementRef.current)},[e,n]);const c=v.useCallback((y,w,x)=>new Promise(C=>{const E=ope({apiRef:e,options:{fields:y,allColumns:w}}).map(I=>I.field),P=Cc(e),T={};P.forEach(I=>{T[I.field]=E.includes(I.field)}),x&&(T[y0.field]=!0),e.current.setColumnVisibilityModel(T),C()}),[e]),u=v.useCallback(y=>{const x=y({apiRef:e}).reduce((C,E)=>{const P=e.current.getRow(E);return P[Jy]||C.push(P),C},[]);e.current.setRows(x)},[e]),d=v.useCallback((y,w)=>{var j,D,_,z;const x=W({copyStyles:!0,hideToolbar:!1,hideFooter:!1,includeCheckboxes:!1},w),C=y.contentDocument;if(!C)return;const E=v0(e.current.state),P=e.current.rootElementRef.current,T=P.cloneNode(!0),I=T.querySelector(`.${le.main}`);I.style.overflow="visible",T.style.contain="size";let A=((j=P.querySelector(`.${le.toolbarContainer}`))==null?void 0:j.offsetHeight)||0,k=((D=P.querySelector(`.${le.footerContainer}`))==null?void 0:D.offsetHeight)||0;x.hideToolbar&&((_=T.querySelector(`.${le.toolbarContainer}`))==null||_.remove(),A=0),x.hideFooter&&((z=T.querySelector(`.${le.footerContainer}`))==null||z.remove(),k=0);const O=E.currentPageTotalHeight+e5(e,t)+A+k;if(T.style.height=`${O}px`,T.style.boxSizing="content-box",!x.hideFooter){const F=T.querySelector(`.${le.footerContainer}`);F.style.position="absolute",F.style.width="100%",F.style.top=`${O-k}px`}const $=document.createElement("div");$.appendChild(T),C.body.style.marginTop="0px",C.body.innerHTML=$.innerHTML;const N=typeof x.pageStyle=="function"?x.pageStyle():x.pageStyle;if(typeof N=="string"){const F=C.createElement("style");F.appendChild(C.createTextNode(N)),C.head.appendChild(F)}x.bodyClassName&&C.body.classList.add(...x.bodyClassName.split(" "));const L=[];if(x.copyStyles){const F=P.getRootNode(),U=(F.constructor.name==="ShadowRoot"?F:o.current).querySelectorAll("style, link[rel='stylesheet']");for(let q=0;q{ie.addEventListener("load",()=>ee())})),C.head.appendChild(ie)}}}Promise.all(L).then(()=>{y.contentWindow.print()})},[e,o,t]),f=v.useCallback(y=>{var w,x;o.current.body.removeChild(y),e.current.restoreState(i.current||{}),(x=(w=i.current)==null?void 0:w.columns)!=null&&x.columnVisibilityModel||e.current.setColumnVisibilityModel(a.current),e.current.setState(C=>W({},C,{virtualization:l.current})),e.current.setRows(s.current),i.current=null,a.current={},s.current=[]},[e]),h={exportDataAsPrint:v.useCallback(async y=>{if(r.debug("Export data as Print"),!e.current.rootElementRef.current)throw new Error("MUI X: No grid root element available.");if(i.current=e.current.exportState(),a.current=gl(e),s.current=e.current.getSortedRows().filter(x=>!x[Jy]),t.pagination){const C={page:0,pageSize:KH(e)};e.current.setState(E=>W({},E,{pagination:W({},E.pagination,{paginationModel:fT(E.pagination,"DataGridPro",C)})}))}l.current=e.current.state.virtualization,e.current.setState(x=>W({},x,{virtualization:W({},x.virtualization,{enabled:!1,enabledForColumns:!1})})),await c(y==null?void 0:y.fields,y==null?void 0:y.allColumns,y==null?void 0:y.includeCheckboxes),u((y==null?void 0:y.getRowsToExport)??ipe),await c2t();const w=u2t(y==null?void 0:y.fileName);w.onload=()=>{d(w,y),w.contentWindow.matchMedia("print").addEventListener("change",C=>{C.matches===!1&&f(w)})},o.current.body.appendChild(w)},[t,r,e,d,f,c,u])};ln(e,h,"public");const m=v.useCallback((y,w)=>{var x;return(x=w.printOptions)!=null&&x.disableToolbarButton?y:[...y,{component:R.jsx(n_t,{options:w.printOptions}),componentName:"printExport"}]},[]);zr(e,"exportMenu",m)},f2t=(e,t,n)=>{var o,i;const r=t.filterModel??((i=(o=t.initialState)==null?void 0:o.filter)==null?void 0:i.filterModel)??JS();return W({},e,{filter:{filterModel:WH(r,t.disableMultipleColumnsFiltering,n),filteredRowsLookup:{},filteredChildrenCountLookup:{},filteredDescendantCountLookup:{}},visibleRowsLookup:{}})},p2t=e=>e.filteredRowsLookup;function WQ(e,t){return e.current.applyStrategyProcessor("visibleRowsLookupCreation",{tree:t.rows.tree,filteredRowsLookup:t.filter.filteredRowsLookup})}function h2t(){return Xde(Object.values)}const g2t=(e,t)=>{var k,O,$;const n=Wo(e,"useGridFilter");e.current.registerControlState({stateId:"filter",propModel:t.filterModel,propOnChange:t.onFilterModelChange,stateSelector:di,changeEvent:"filterModelChange"});const r=v.useCallback(()=>{e.current.setState(N=>{const L=di(N,e.current.instanceId),j=e.current.getFilterState(L),D=W({},N,{filter:W({},N.filter,j)}),_=WQ(e,D);return W({},D,{visibleRowsLookup:_})}),e.current.publishEvent("filteredRowsSet")},[e]),o=v.useCallback((N,L)=>L==null||L.filterable===!1||t.disableColumnFilter?N:[...N,"columnMenuFilterItem"],[t.disableColumnFilter]),i=v.useCallback(()=>{r(),e.current.forceUpdate()},[e,r]),a=v.useCallback(N=>{const L=di(e),j=[...L.items],D=j.findIndex(_=>_.id===N.id);D===-1?j.push(N):j[D]=N,e.current.setFilterModel(W({},L,{items:j}),"upsertFilterItem")},[e]),s=v.useCallback(N=>{const L=di(e),j=[...L.items];N.forEach(D=>{const _=j.findIndex(z=>z.id===D.id);_===-1?j.push(D):j[_]=D}),e.current.setFilterModel(W({},L,{items:j}),"upsertFilterItems")},[e]),l=v.useCallback(N=>{const L=di(e),j=L.items.filter(D=>D.id!==N.id);j.length!==L.items.length&&e.current.setFilterModel(W({},L,{items:j}),"deleteFilterItem")},[e]),c=v.useCallback((N,L,j)=>{if(n.debug("Displaying filter panel"),N){const D=di(e),_=D.items.filter(U=>{var ee;if(U.value!==void 0)return!(Array.isArray(U.value)&&U.value.length===0);const X=(ee=e.current.getColumn(U.field).filterOperators)==null?void 0:ee.find(Q=>Q.value===U.operator);return!(typeof(X==null?void 0:X.requiresFilterValue)>"u"?!0:X==null?void 0:X.requiresFilterValue)});let z;const F=_.find(U=>U.field===N),V=e.current.getColumn(N);F?z=_:t.disableMultipleColumnsFiltering?z=[UF({field:N,operator:V.filterOperators[0].value},e)]:z=[..._,UF({field:N,operator:V.filterOperators[0].value},e)],e.current.setFilterModel(W({},D,{items:z}))}e.current.showPreferences(Ig.filters,L,j)},[e,n,t.disableMultipleColumnsFiltering]),u=v.useCallback(()=>{n.debug("Hiding filter panel"),e.current.hidePreferences()},[e,n]),d=v.useCallback(N=>{const L=di(e);L.logicOperator!==N&&e.current.setFilterModel(W({},L,{logicOperator:N}),"changeLogicOperator")},[e]),f=v.useCallback(N=>{const L=di(e);Xy(L.quickFilterValues,N)||e.current.setFilterModel(W({},L,{quickFilterValues:[...N]}))},[e]),p=v.useCallback((N,L)=>{di(e)!==N&&(n.debug("Setting filter model"),e.current.updateControlState("filter",rQ(N,t.disableMultipleColumnsFiltering,e),L),e.current.unstable_applyFilters())},[e,n,t.disableMultipleColumnsFiltering]),h=v.useCallback(N=>{const L=WH(N,t.disableMultipleColumnsFiltering,e),j=t.filterMode==="client"?fAt(L,e,t.disableEval):null,D=e.current.applyStrategyProcessor("filtering",{isRowMatchingFilters:j,filterModel:L??JS()});return W({},D,{filterModel:L})},[t.disableMultipleColumnsFiltering,t.filterMode,t.disableEval,e]),m={setFilterLogicOperator:d,unstable_applyFilters:i,deleteFilterItem:l,upsertFilterItem:a,upsertFilterItems:s,setFilterModel:p,showFilterPanel:c,hideFilterPanel:u,setQuickFilterValues:f,ignoreDiacritics:t.ignoreDiacritics,getFilterState:h};ln(e,m,"public");const y=v.useCallback((N,L)=>{var _,z;const j=di(e);return!L.exportOnlyDirtyModels||t.filterModel!=null||((z=(_=t.initialState)==null?void 0:_.filter)==null?void 0:z.filterModel)!=null||!Xy(j,JS())?W({},N,{filter:{filterModel:j}}):N},[e,t.filterModel,(O=(k=t.initialState)==null?void 0:k.filter)==null?void 0:O.filterModel]),w=v.useCallback((N,L)=>{var D;const j=(D=L.stateToRestore.filter)==null?void 0:D.filterModel;return j==null?N:(e.current.updateControlState("filter",rQ(j,t.disableMultipleColumnsFiltering,e),"restoreState"),W({},N,{callbacks:[...N.callbacks,e.current.unstable_applyFilters]}))},[e,t.disableMultipleColumnsFiltering]),x=v.useCallback((N,L)=>{var j;if(L===Ig.filters){const D=t.slots.filterPanel;return R.jsx(D,W({},(j=t.slotProps)==null?void 0:j.filterPanel))}return N},[t.slots.filterPanel,($=t.slotProps)==null?void 0:$.filterPanel]),{getRowId:C}=t,E=Au(h2t),P=v.useCallback(N=>{if(t.filterMode!=="client"||!N.isRowMatchingFilters)return{filteredRowsLookup:{},filteredChildrenCountLookup:{},filteredDescendantCountLookup:{}};const L=Ff(e),j={},{isRowMatchingFilters:D}=N,_={},z={passingFilterItems:null,passingQuickFilterValues:null},F=E.current(e.current.state.rows.dataRowIdToModelLookup);for(let q=0;q{n.debug("onColUpdated - GridColumns changed, applying filters");const N=di(e),L=jd(e),j=N.items.filter(D=>D.field&&L[D.field]);j.length{N==="filtering"&&e.current.unstable_applyFilters()},[e]),A=v.useCallback(()=>{e.current.setState(N=>W({},N,{visibleRowsLookup:WQ(e,N)})),e.current.forceUpdate()},[e]);bt(e,"rowsSet",r),bt(e,"columnsChange",T),bt(e,"activeStrategyProcessorChange",I),bt(e,"rowExpansionChange",A),bt(e,"columnVisibilityModelChange",()=>{const N=di(e);N.quickFilterValues&&ufe(N)&&e.current.unstable_applyFilters()}),x1(()=>{e.current.unstable_applyFilters()}),Ho(()=>{t.filterModel!==void 0&&e.current.setFilterModel(t.filterModel)},[e,n,t.filterModel])},m2t=e=>W({},e,{focus:{cell:null,columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null},tabIndex:{cell:null,columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null}}),y2t=(e,t)=>{const n=Wo(e,"useGridFocus"),r=v.useRef(null),o=e.current.rootElementRef.current!==null,i=v.useCallback((A,k)=>{A&&e.current.getRow(A.id)&&e.current.publishEvent("cellFocusOut",e.current.getCellParams(A.id,A.field),k)},[e]),a=v.useCallback((A,k)=>{const O=Za(e);(O==null?void 0:O.id)===A&&(O==null?void 0:O.field)===k||(e.current.setState($=>(n.debug(`Focusing on cell with id=${A} and field=${k}`),W({},$,{tabIndex:{cell:{id:A,field:k},columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null},focus:{cell:{id:A,field:k},columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null}}))),e.current.forceUpdate(),e.current.getRow(A)&&(O&&i(O,{}),e.current.publishEvent("cellFocusIn",e.current.getCellParams(A,k))))},[e,n,i]),s=v.useCallback((A,k={})=>{const O=Za(e);i(O,k),e.current.setState($=>(n.debug(`Focusing on column header with colIndex=${A}`),W({},$,{tabIndex:{columnHeader:{field:A},columnHeaderFilter:null,cell:null,columnGroupHeader:null},focus:{columnHeader:{field:A},columnHeaderFilter:null,cell:null,columnGroupHeader:null}}))),e.current.forceUpdate()},[e,n,i]),l=v.useCallback((A,k={})=>{const O=Za(e);i(O,k),e.current.setState($=>(n.debug(`Focusing on column header filter with colIndex=${A}`),W({},$,{tabIndex:{columnHeader:null,columnHeaderFilter:{field:A},cell:null,columnGroupHeader:null},focus:{columnHeader:null,columnHeaderFilter:{field:A},cell:null,columnGroupHeader:null}}))),e.current.forceUpdate()},[e,n,i]),c=v.useCallback((A,k,O={})=>{const $=Za(e);$&&e.current.publishEvent("cellFocusOut",e.current.getCellParams($.id,$.field),O),e.current.setState(N=>W({},N,{tabIndex:{columnGroupHeader:{field:A,depth:k},columnHeader:null,columnHeaderFilter:null,cell:null},focus:{columnGroupHeader:{field:A,depth:k},columnHeader:null,columnHeaderFilter:null,cell:null}})),e.current.forceUpdate()},[e]),u=v.useCallback(()=>MO(e),[e]),d=v.useCallback((A,k,O)=>{let $=e.current.getColumnIndex(k);const N=Io(e),L=ev(e,{pagination:t.pagination,paginationMode:t.paginationMode}),j=Zg(e),D=[].concat(j.top||[],L.rows,j.bottom||[]);let _=D.findIndex(U=>U.id===A);O==="right"?$+=1:O==="left"?$-=1:_+=1,$>=N.length?(_+=1,_=0&&($=N.length-1)),_=fu(_,0,D.length-1);const z=D[_];if(!z)return;const F=e.current.unstable_getCellColSpanInfo(z.id,$);F&&F.spannedByColSpan&&(O==="left"||O==="below"?$=F.leftVisibleCellIndex:O==="right"&&($=F.rightVisibleCellIndex)),$=fu($,0,N.length-1);const V=N[$];e.current.setCellFocus(z.id,V.field)},[e,t.pagination,t.paginationMode]),f=v.useCallback(({id:A,field:k})=>{e.current.setCellFocus(A,k)},[e]),p=v.useCallback((A,k)=>{k.key==="Enter"||k.key==="Tab"||k.key==="Shift"||DO(k.key)||e.current.setCellFocus(A.id,A.field)},[e]),h=v.useCallback(({field:A},k)=>{k.target===k.currentTarget&&e.current.setColumnHeaderFocus(A,k)},[e]),m=v.useCallback(({fields:A,depth:k},O)=>{if(O.target!==O.currentTarget)return;const $=MO(e);$!==null&&$.depth===k&&A.includes($.field)||e.current.setColumnGroupHeaderFocus(A[0],k,O)},[e]),y=v.useCallback((A,k)=>{var O,$;($=(O=k.relatedTarget)==null?void 0:O.getAttribute("class"))!=null&&$.includes(le.columnHeader)||(n.debug("Clearing focus"),e.current.setState(N=>W({},N,{focus:{cell:null,columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null}})))},[n,e]),w=v.useCallback(A=>{r.current=A},[]),x=v.useCallback(A=>{const k=r.current;r.current=null;const O=Za(e);if(!e.current.unstable_applyPipeProcessors("canUpdateFocus",!0,{event:A,cell:k}))return;if(!O){k&&e.current.setCellFocus(k.id,k.field);return}if((k==null?void 0:k.id)===O.id&&(k==null?void 0:k.field)===O.field)return;const N=e.current.getCellElement(O.id,O.field);N!=null&&N.contains(A.target)||(k?e.current.setCellFocus(k.id,k.field):(e.current.setState(L=>W({},L,{focus:{cell:null,columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null}})),e.current.forceUpdate(),i(O,A)))},[e,i]),C=v.useCallback(A=>{if(A.cellMode==="view")return;const k=Za(e);((k==null?void 0:k.id)!==A.id||(k==null?void 0:k.field)!==A.field)&&e.current.setCellFocus(A.id,A.field)},[e]),E=v.useCallback(()=>{var k;const A=Za(e);if(A&&!e.current.getRow(A.id)){const O=(k=Za(e))==null?void 0:k.id;let $=null;if(typeof O<"u"){const N=e.current.getRowIndexRelativeToVisibleRows(O),L=ev(e,{pagination:t.pagination,paginationMode:t.paginationMode}),j=L.rows[fu(N,0,L.rows.length-1)];$=(j==null?void 0:j.id)??null}e.current.setState(N=>W({},N,{focus:{cell:$===null?null:{id:$,field:A.field},columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null}}))}},[e,t.pagination,t.paginationMode]),P=Ar(()=>{const A=Za(e);if(!A)return;const k=ev(e,{pagination:t.pagination,paginationMode:t.paginationMode});if(k.rows.find(N=>N.id===A.id))return;const $=Io(e);e.current.setState(N=>W({},N,{tabIndex:{cell:{id:k.rows[0].id,field:$[0].field},columnGroupHeader:null,columnHeader:null,columnHeaderFilter:null}}))}),T={setCellFocus:a,setColumnHeaderFocus:s,setColumnHeaderFilterFocus:l},I={moveFocusToRelativeCell:d,setColumnGroupHeaderFocus:c,getColumnGroupHeaderFocus:u};ln(e,T,"public"),ln(e,I,"private"),v.useEffect(()=>{const A=Jf(e.current.rootElementRef.current);return A.addEventListener("mouseup",x),()=>{A.removeEventListener("mouseup",x)}},[e,o,x]),bt(e,"columnHeaderBlur",y),bt(e,"cellDoubleClick",f),bt(e,"cellMouseDown",w),bt(e,"cellKeyDown",p),bt(e,"cellModeChange",C),bt(e,"columnHeaderFocus",h),bt(e,"columnGroupHeaderFocus",m),bt(e,"rowsSet",E),bt(e,"paginationModelChange",P)},v2t=e=>{const t=e.match(/^__row_group_by_columns_group_(.*)__$/);return t?t[1]:null},b2t=e=>e===mfe||v2t(e)!==null;function w2t(e,t){const n=Zg(e)||{};return[...n.top||[],...t,...n.bottom||[]]}const x_=({currentColIndex:e,firstColIndex:t,lastColIndex:n,isRtl:r})=>{if(r){if(et)return e-1;return null},S_=({currentColIndex:e,firstColIndex:t,lastColIndex:n,isRtl:r})=>{if(r){if(e>t)return e-1}else if(!r&&e=0&&a{const n=Wo(e,"useGridKeyboardNavigation"),r=Up(e,t).rows,o=dr(),i=t.unstable_listView,a=v.useMemo(()=>w2t(e,r),[e,r]),s=t.signature!=="DataGrid"&&t.headerFilters,l=v.useCallback((x,C,E="left",P="up")=>{const T=Hp(e),I=e.current.unstable_getCellColSpanInfo(C,x);I&&I.spannedByColSpan&&(E==="left"?x=I.leftVisibleCellIndex:E==="right"&&(x=I.rightVisibleCellIndex));const A=i?fb(e.current.state).field:h0(e)[x],k=x2t(e,C,A,P),O=T.findIndex($=>$.id===k);n.debug(`Navigating to cell row ${O}, col ${x}`),e.current.scrollToIndexes({colIndex:x,rowIndex:O}),e.current.setCellFocus(k,A)},[e,n,i]),c=v.useCallback((x,C)=>{n.debug(`Navigating to header col ${x}`),e.current.scrollToIndexes({colIndex:x});const E=e.current.getVisibleColumns()[x].field;e.current.setColumnHeaderFocus(E,C)},[e,n]),u=v.useCallback((x,C)=>{n.debug(`Navigating to header filter col ${x}`),e.current.scrollToIndexes({colIndex:x});const E=e.current.getVisibleColumns()[x].field;e.current.setColumnHeaderFilterFocus(E,C)},[e,n]),d=v.useCallback((x,C,E)=>{n.debug(`Navigating to header col ${x}`),e.current.scrollToIndexes({colIndex:x});const{field:P}=e.current.getVisibleColumns()[x];e.current.setColumnGroupHeaderFocus(P,C,E)},[e,n]),f=v.useCallback(x=>{var C;return(C=a[x])==null?void 0:C.id},[a]),p=v.useCallback((x,C)=>{const E=C.currentTarget.querySelector(`.${le.columnHeaderTitleContainerContent}`);if(!!E&&E.contains(C.target)&&x.field!==y0.field)return;const T=e.current.getViewportPageSize(),I=x.field?e.current.getColumnIndex(x.field):0,A=a.length>0?0:null,k=a.length-1,O=0,$=Io(e).length-1,N=S1(e);let L=!0;switch(C.key){case"ArrowDown":{A!==null&&(s?u(I,C):l(I,f(A)));break}case"ArrowRight":{const j=S_({currentColIndex:I,firstColIndex:O,lastColIndex:$,isRtl:o});j!==null&&c(j,C);break}case"ArrowLeft":{const j=x_({currentColIndex:I,firstColIndex:O,lastColIndex:$,isRtl:o});j!==null&&c(j,C);break}case"ArrowUp":{N>0&&d(I,N-1,C);break}case"PageDown":{A!==null&&k!==null&&l(I,f(Math.min(A+T,k)));break}case"Home":{c(O,C);break}case"End":{c($,C);break}case"Enter":{(C.ctrlKey||C.metaKey)&&e.current.toggleColumnMenu(x.field);break}case" ":break;default:L=!1}L&&C.preventDefault()},[e,a.length,s,u,l,f,o,c,d]),h=v.useCallback((x,C)=>{const E=rMt(e)===x.field,P=oMt(e)===x.field;if(E||P||!DO(C.key))return;const T=e.current.getViewportPageSize(),I=x.field?e.current.getColumnIndex(x.field):0,A=0,k=a.length-1,O=0,$=Io(e).length-1;let N=!0;switch(C.key){case"ArrowDown":{const L=f(A);L!=null&&l(I,L);break}case"ArrowRight":{const L=S_({currentColIndex:I,firstColIndex:O,lastColIndex:$,isRtl:o});L!==null&&u(L,C);break}case"ArrowLeft":{const L=x_({currentColIndex:I,firstColIndex:O,lastColIndex:$,isRtl:o});L!==null?u(L,C):e.current.setColumnHeaderFilterFocus(x.field,C);break}case"ArrowUp":{c(I,C);break}case"PageDown":{k!==null&&l(I,f(Math.min(A+T,k)));break}case"Home":{u(O,C);break}case"End":{u($,C);break}case" ":break;default:N=!1}N&&C.preventDefault()},[e,a.length,u,o,c,l,f]),m=v.useCallback((x,C)=>{const E=MO(e);if(E===null)return;const{field:P,depth:T}=E,{fields:I,depth:A,maxDepth:k}=x,O=e.current.getViewportPageSize(),$=e.current.getColumnIndex(P),N=P?e.current.getColumnIndex(P):0,L=0,j=a.length-1,D=0,_=Io(e).length-1;let z=!0;switch(C.key){case"ArrowDown":{A===k-1?c($,C):d($,T+1,C);break}case"ArrowUp":{A>0&&d($,T-1,C);break}case"ArrowRight":{const F=I.length-I.indexOf(P)-1;$+F+1<=_&&d($+F+1,T,C);break}case"ArrowLeft":{const F=I.indexOf(P);$-F-1>=D&&d($-F-1,T,C);break}case"PageDown":{j!==null&&l(N,f(Math.min(L+O,j)));break}case"Home":{d(D,T,C);break}case"End":{d(_,T,C);break}case" ":break;default:z=!1}z&&C.preventDefault()},[e,a.length,c,d,l,f]),y=v.useCallback((x,C)=>{if(C1(C))return;const E=e.current.getCellParams(x.id,x.field);if(E.cellMode===ar.Edit||!DO(C.key)||!e.current.unstable_applyPipeProcessors("canUpdateFocus",!0,{event:C,cell:E})||a.length===0)return;const T=e.current.getViewportPageSize(),I=i?()=>0:e.current.getColumnIndex,A=x.field?I(x.field):0,k=a.findIndex(_=>_.id===x.id),O=0,$=a.length-1,N=0,j=(i?[fb(e.current.state)]:Io(e)).length-1;let D=!0;switch(C.key){case"ArrowDown":{k<$&&l(A,f(k+1),o?"right":"left","down");break}case"ArrowUp":{k>O?l(A,f(k-1)):s?u(A,C):c(A,C);break}case"ArrowRight":{const _=S_({currentColIndex:A,firstColIndex:N,lastColIndex:j,isRtl:o});_!==null&&l(_,f(k),o?"left":"right");break}case"ArrowLeft":{const _=x_({currentColIndex:A,firstColIndex:N,lastColIndex:j,isRtl:o});_!==null&&l(_,f(k),o?"right":"left");break}case"Tab":{C.shiftKey&&A>N?l(A-1,f(k),"left"):!C.shiftKey&&A=O?l(A,f(_)):c(A,C);break}case"Home":{C.ctrlKey||C.metaKey||C.shiftKey?l(N,f(O)):l(N,f(k));break}case"End":{C.ctrlKey||C.metaKey||C.shiftKey?l(j,f($)):l(j,f(k));break}default:D=!1}D&&C.preventDefault()},[e,a,o,l,f,s,u,c,i]),w=v.useCallback((x,{event:C})=>C.key===" "?!1:x,[]);zr(e,"canStartEditing",w),bt(e,"columnHeaderKeyDown",p),bt(e,"headerFilterKeyDown",h),bt(e,"columnGroupHeaderKeyDown",m),bt(e,"cellKeyDown",y)},C2t=(e,t)=>{var h,m;const n=Wo(e,"useGridRowCount"),r=Ye(e,YH),o=Ye(e,Oy),i=Ye(e,Kw),a=Ye(e,Ji),s=Au(()=>Ji(e).pageSize);e.current.registerControlState({stateId:"paginationRowCount",propModel:t.rowCount,propOnChange:t.onRowCountChange,stateSelector:Oy,changeEvent:"rowCountChange"});const c={setRowCount:v.useCallback(y=>{o!==y&&(n.debug("Setting 'rowCount' to",y),e.current.setState(w=>W({},w,{pagination:W({},w.pagination,{rowCount:y})})))},[e,n,o])};ln(e,c,"public");const u=v.useCallback((y,w)=>{var E,P;const x=Oy(e);return!w.exportOnlyDirtyModels||t.rowCount!=null||((P=(E=t.initialState)==null?void 0:E.pagination)==null?void 0:P.rowCount)!=null?W({},y,{pagination:W({},y.pagination,{rowCount:x})}):y},[e,t.rowCount,(m=(h=t.initialState)==null?void 0:h.pagination)==null?void 0:m.rowCount]),d=v.useCallback((y,w)=>{var C;const x=(C=w.stateToRestore.pagination)!=null&&C.rowCount?w.stateToRestore.pagination.rowCount:Oy(e);return e.current.setState(E=>W({},E,{pagination:W({},E.pagination,{rowCount:x})})),y},[e]);zr(e,"exportState",u),zr(e,"restoreState",d);const f=v.useCallback(y=>{t.paginationMode==="client"||!s.current||y.pageSize!==s.current&&(s.current=y.pageSize,o===-1&&e.current.setPage(0))},[t.paginationMode,s,o,e]);bt(e,"paginationModelChange",f),v.useEffect(()=>{t.paginationMode==="client"?e.current.setRowCount(r):t.rowCount!=null&&e.current.setRowCount(t.rowCount)},[e,t.paginationMode,r,t.rowCount]);const p=i.hasNextPage===!1;v.useEffect(()=>{p&&o===-1&&e.current.setRowCount(a.pageSize*a.page+r)},[e,r,p,o,a])},E2t=(e,t)=>{var l,c;const n=Wo(e,"useGridPaginationMeta"),r=Ye(e,Kw);e.current.registerControlState({stateId:"paginationMeta",propModel:t.paginationMeta,propOnChange:t.onPaginationMetaChange,stateSelector:Kw,changeEvent:"paginationMetaChange"});const i={setPaginationMeta:v.useCallback(u=>{r!==u&&(n.debug("Setting 'paginationMeta' to",u),e.current.setState(d=>W({},d,{pagination:W({},d.pagination,{meta:u})})))},[e,n,r])};ln(e,i,"public");const a=v.useCallback((u,d)=>{var h,m;const f=Kw(e);return!d.exportOnlyDirtyModels||t.paginationMeta!=null||((m=(h=t.initialState)==null?void 0:h.pagination)==null?void 0:m.meta)!=null?W({},u,{pagination:W({},u.pagination,{meta:f})}):u},[e,t.paginationMeta,(c=(l=t.initialState)==null?void 0:l.pagination)==null?void 0:c.meta]),s=v.useCallback((u,d)=>{var p;const f=(p=d.stateToRestore.pagination)!=null&&p.meta?d.stateToRestore.pagination.meta:Kw(e);return e.current.setState(h=>W({},h,{pagination:W({},h.pagination,{meta:f})})),u},[e]);zr(e,"exportState",a),zr(e,"restoreState",s),v.useEffect(()=>{t.paginationMeta&&e.current.setPaginationMeta(t.paginationMeta)},[e,t.paginationMeta])},P2t=(e,t)=>{var i,a,s,l,c,u;const n=W({},Tfe(t.autoPageSize),t.paginationModel??((a=(i=t.initialState)==null?void 0:i.pagination)==null?void 0:a.paginationModel));Ife(n.pageSize,t.signature);const r=t.rowCount??((l=(s=t.initialState)==null?void 0:s.pagination)==null?void 0:l.rowCount),o=t.paginationMeta??((u=(c=t.initialState)==null?void 0:c.pagination)==null?void 0:u.meta)??{};return W({},e,{pagination:{paginationModel:n,rowCount:r,meta:o}})},T2t=(e,t)=>{E2t(e,t),l2t(e,t),C2t(e,t)},I2t=(e,t)=>{var n;return W({},e,{preferencePanel:((n=t.initialState)==null?void 0:n.preferencePanel)??{open:!1}})},O2t=(e,t)=>{var d;const n=Wo(e,"useGridPreferencesPanel"),r=v.useRef(),o=v.useRef(),i=v.useCallback(()=>{n.debug("Hiding Preferences Panel");const f=eC(e.current.state);f.openedPanelValue&&e.current.publishEvent("preferencePanelClose",{openedPanelValue:f.openedPanelValue}),e.current.setState(p=>W({},p,{preferencePanel:{open:!1}})),e.current.forceUpdate()},[e,n]),a=v.useCallback(()=>{o.current=setTimeout(()=>clearTimeout(r.current),0)},[]),s=v.useCallback(()=>{r.current=setTimeout(i,100)},[i]),l=v.useCallback((f,p,h)=>{n.debug("Opening Preferences Panel"),a(),e.current.setState(m=>W({},m,{preferencePanel:W({},m.preferencePanel,{open:!0,openedPanelValue:f,panelId:p,labelId:h})})),e.current.publishEvent("preferencePanelOpen",{openedPanelValue:f}),e.current.forceUpdate()},[n,a,e]);ln(e,{showPreferences:l,hidePreferences:s},"public");const c=v.useCallback((f,p)=>{var y;const h=eC(e.current.state);return!p.exportOnlyDirtyModels||((y=t.initialState)==null?void 0:y.preferencePanel)!=null||h.open?W({},f,{preferencePanel:h}):f},[e,(d=t.initialState)==null?void 0:d.preferencePanel]),u=v.useCallback((f,p)=>{const h=p.stateToRestore.preferencePanel;return h!=null&&e.current.setState(m=>W({},m,{preferencePanel:h})),f},[e]);zr(e,"exportState",c),zr(e,"restoreState",u),v.useEffect(()=>()=>{clearTimeout(r.current),clearTimeout(o.current)},[])},QF=e=>{switch(e.type){case"boolean":return!1;case"date":case"dateTime":case"number":return;case"singleSelect":return null;case"string":default:return""}},A2t=["id","field"],k2t=["id","field"],M2t=(e,t)=>{const[n,r]=v.useState({}),o=v.useRef(n),i=v.useRef({}),{processRowUpdate:a,onProcessRowUpdateError:s,cellModesModel:l,onCellModesModelChange:c}=t,u=D=>(..._)=>{t.editMode===wu.Cell&&D(..._)},d=v.useCallback((D,_)=>{const z=e.current.getCellParams(D,_);if(!e.current.isCellEditable(z))throw new Error(`MUI X: The cell with id=${D} and field=${_} is not editable.`)},[e]),f=v.useCallback((D,_,z)=>{if(e.current.getCellMode(D,_)!==z)throw new Error(`MUI X: The cell with id=${D} and field=${_} is not in ${z} mode.`)},[e]),p=v.useCallback((D,_)=>{if(!D.isEditable||D.cellMode===ar.Edit)return;const z=W({},D,{reason:Gu.cellDoubleClick});e.current.publishEvent("cellEditStart",z,_)},[e]),h=v.useCallback((D,_)=>{if(D.cellMode===ar.View||e.current.getCellMode(D.id,D.field)===ar.View)return;const z=W({},D,{reason:rc.cellFocusOut});e.current.publishEvent("cellEditStop",z,_)},[e]),m=v.useCallback((D,_)=>{if(D.cellMode===ar.Edit){if(_.which===229)return;let z;if(_.key==="Escape"?z=rc.escapeKeyDown:_.key==="Enter"?z=rc.enterKeyDown:_.key==="Tab"&&(z=_.shiftKey?rc.shiftTabKeyDown:rc.tabKeyDown,_.preventDefault()),z){const F=W({},D,{reason:z});e.current.publishEvent("cellEditStop",F,_)}}else if(D.isEditable){let z;if(!e.current.unstable_applyPipeProcessors("canStartEditing",!0,{event:_,cellParams:D,editMode:"cell"}))return;if(Jfe(_)?z=Gu.printableKeyDown:Zfe(_)?z=Gu.pasteKeyDown:_.key==="Enter"?z=Gu.enterKeyDown:(_.key==="Backspace"||_.key==="Delete")&&(z=Gu.deleteKeyDown),z){const V=W({},D,{reason:z,key:_.key});e.current.publishEvent("cellEditStart",V,_)}}},[e]),y=v.useCallback(D=>{const{id:_,field:z,reason:F}=D,V={id:_,field:z};(F===Gu.printableKeyDown||F===Gu.deleteKeyDown||F===Gu.pasteKeyDown)&&(V.deleteValue=!0),e.current.startCellEditMode(V)},[e]),w=v.useCallback(D=>{const{id:_,field:z,reason:F}=D;e.current.runPendingEditCellValueMutation(_,z);let V;F===rc.enterKeyDown?V="below":F===rc.tabKeyDown?V="right":F===rc.shiftTabKeyDown&&(V="left");const U=F==="escapeKeyDown";e.current.stopCellEditMode({id:_,field:z,ignoreModifications:U,cellToFocusAfter:V})},[e]),x=D=>async(..._)=>{var z;if(D){const{id:F,field:V}=_[0];((z=e.current.state.editRows[F][V])==null?void 0:z.error)||D(..._)}};bt(e,"cellDoubleClick",u(p)),bt(e,"cellFocusOut",u(h)),bt(e,"cellKeyDown",u(m)),bt(e,"cellEditStart",u(y)),bt(e,"cellEditStop",u(w)),yr(e,"cellEditStart",t.onCellEditStart),yr(e,"cellEditStop",x(t.onCellEditStop));const C=v.useCallback((D,_)=>{const z=Xo(e.current.state);return z[D]&&z[D][_]?ar.Edit:ar.View},[e]),E=Ar(D=>{const _=D!==t.cellModesModel;c&&_&&c(D,{api:e.current}),!(t.cellModesModel&&_)&&(r(D),o.current=D,e.current.publishEvent("cellModesModelChange",D))}),P=v.useCallback((D,_,z)=>{const F=W({},o.current);if(z!==null)F[D]=W({},F[D],{[_]:W({},z)});else{const V=F[D],U=Dt(V,[_].map(nC));F[D]=U,Object.keys(F[D]).length===0&&delete F[D]}E(F)},[E]),T=v.useCallback((D,_,z)=>{e.current.setState(F=>{const V=W({},F.editRows);return z!==null?V[D]=W({},V[D],{[_]:W({},z)}):(delete V[D][_],Object.keys(V[D]).length===0&&delete V[D]),W({},F,{editRows:V})}),e.current.forceUpdate()},[e]),I=v.useCallback(D=>{const{id:_,field:z}=D,F=Dt(D,A2t);d(_,z),f(_,z,ar.View),P(_,z,W({mode:ar.Edit},F))},[d,f,P]),A=Ar(async D=>{const{id:_,field:z,deleteValue:F,initialValue:V}=D,U=e.current.getCellValue(_,z);let q=U;F?q=QF(e.current.getColumn(z)):V&&(q=V);const X=e.current.getColumn(z),ie=!!X.preProcessEditCellProps&&F;let ee={value:q,error:!1,isProcessingProps:ie};if(T(_,z,ee),e.current.setCellFocus(_,z),ie&&(ee=await Promise.resolve(X.preProcessEditCellProps({id:_,row:e.current.getRow(_),props:ee,hasChanged:q!==U})),e.current.getCellMode(_,z)===ar.Edit)){const Q=Xo(e.current.state);T(_,z,W({},ee,{value:Q[_][z].value,isProcessingProps:!1}))}}),k=v.useCallback(D=>{const{id:_,field:z}=D,F=Dt(D,k2t);f(_,z,ar.Edit),P(_,z,W({mode:ar.View},F))},[f,P]),O=Ar(async D=>{const{id:_,field:z,ignoreModifications:F,cellToFocusAfter:V="none"}=D;f(_,z,ar.Edit),e.current.runPendingEditCellValueMutation(_,z);const U=()=>{T(_,z,null),P(_,z,null),V!=="none"&&e.current.moveFocusToRelativeCell(_,z,V)};if(F){U();return}const q=Xo(e.current.state),{error:X,isProcessingProps:ie}=q[_][z];if(X||ie){i.current[_][z].mode=ar.Edit,P(_,z,{mode:ar.Edit});return}const ee=e.current.getRowWithUpdatedValuesFromCellEditing(_,z);if(a){const Q=te=>{i.current[_][z].mode=ar.Edit,P(_,z,{mode:ar.Edit}),s&&s(te)};try{const te=e.current.getRow(_);Promise.resolve(a(ee,te,{rowId:_})).then(pe=>{e.current.updateRows([pe]),U()}).catch(Q)}catch(te){Q(te)}}else e.current.updateRows([ee]),U()}),$=v.useCallback(async D=>{var te,pe;const{id:_,field:z,value:F,debounceMs:V,unstable_skipValueParser:U}=D;d(_,z),f(_,z,ar.Edit);const q=e.current.getColumn(z),X=e.current.getRow(_);let ie=F;q.valueParser&&!U&&(ie=q.valueParser(F,X,q,e));let ee=Xo(e.current.state),Q=W({},ee[_][z],{value:ie,changeReason:V?"debouncedSetEditCellValue":"setEditCellValue"});if(q.preProcessEditCellProps){const ae=F!==ee[_][z].value;Q=W({},Q,{isProcessingProps:!0}),T(_,z,Q),Q=await Promise.resolve(q.preProcessEditCellProps({id:_,row:X,props:Q,hasChanged:ae}))}return e.current.getCellMode(_,z)===ar.View?!1:(ee=Xo(e.current.state),Q=W({},Q,{isProcessingProps:!1}),Q.value=q.preProcessEditCellProps?ee[_][z].value:ie,T(_,z,Q),ee=Xo(e.current.state),!((pe=(te=ee[_])==null?void 0:te[z])!=null&&pe.error))},[e,d,f,T]),N=v.useCallback((D,_)=>{const z=e.current.getColumn(_),F=Xo(e.current.state),V=e.current.getRow(D);if(!F[D]||!F[D][_])return e.current.getRow(D);const{value:U}=F[D][_];return z.valueSetter?z.valueSetter(U,V,z,e):W({},V,{[_]:U})},[e]),L={getCellMode:C,startCellEditMode:I,stopCellEditMode:k},j={setCellEditingEditCellValue:$,getRowWithUpdatedValuesFromCellEditing:N};ln(e,L,"public"),ln(e,j,"private"),v.useEffect(()=>{l&&E(l)},[l,E]),Ho(()=>{const D=kO(e),_=i.current;i.current=ife(n),Object.entries(n).forEach(([z,F])=>{Object.entries(F).forEach(([V,U])=>{var ie,ee;const q=((ee=(ie=_[z])==null?void 0:ie[V])==null?void 0:ee.mode)||ar.View,X=D[z]??z;U.mode===ar.Edit&&q===ar.View?A(W({id:X,field:V},U)):U.mode===ar.View&&q===ar.Edit&&O(W({id:X,field:V},U))})})},[e,n,A,O])},R2t=["id"],$2t=["id"],D2t=(e,t)=>{const[n,r]=v.useState({}),o=v.useRef(n),i=v.useRef({}),a=v.useRef(),s=v.useRef(null),{processRowUpdate:l,onProcessRowUpdateError:c,rowModesModel:u,onRowModesModelChange:d}=t,f=V=>(...U)=>{t.editMode===wu.Row&&V(...U)},p=v.useCallback((V,U)=>{const q=e.current.getCellParams(V,U);if(!e.current.isCellEditable(q))throw new Error(`MUI X: The cell with id=${V} and field=${U} is not editable.`)},[e]),h=v.useCallback((V,U)=>{if(e.current.getRowMode(V)!==U)throw new Error(`MUI X: The row with id=${V} is not in ${U} mode.`)},[e]),m=v.useCallback(V=>{const U=Xo(e.current.state);return Object.values(U[V]).some(q=>q.error)},[e]),y=v.useCallback((V,U)=>{if(!V.isEditable||e.current.getRowMode(V.id)===qn.Edit)return;const q=e.current.getRowParams(V.id),X=W({},q,{field:V.field,reason:lf.cellDoubleClick});e.current.publishEvent("rowEditStart",X,U)},[e]),w=v.useCallback(V=>{s.current=V},[]),x=v.useCallback((V,U)=>{V.isEditable&&e.current.getRowMode(V.id)!==qn.View&&(s.current=null,a.current=setTimeout(()=>{var q;if(((q=s.current)==null?void 0:q.id)!==V.id){if(!e.current.getRow(V.id)||e.current.getRowMode(V.id)===qn.View||m(V.id))return;const X=e.current.getRowParams(V.id),ie=W({},X,{field:V.field,reason:tc.rowFocusOut});e.current.publishEvent("rowEditStop",ie,U)}}))},[e,m]);v.useEffect(()=>()=>{clearTimeout(a.current)},[]);const C=v.useCallback((V,U)=>{if(V.cellMode===qn.Edit){if(U.which===229)return;let q;if(U.key==="Escape")q=tc.escapeKeyDown;else if(U.key==="Enter")q=tc.enterKeyDown;else if(U.key==="Tab"){const X=h0(e).filter(ie=>e.current.getColumn(ie).type===FM?!0:e.current.isCellEditable(e.current.getCellParams(V.id,ie)));if(U.shiftKey?V.field===X[0]&&(q=tc.shiftTabKeyDown):V.field===X[X.length-1]&&(q=tc.tabKeyDown),U.preventDefault(),!q){const ie=X.findIndex(Q=>Q===V.field),ee=X[U.shiftKey?ie-1:ie+1];e.current.setCellFocus(V.id,ee)}}if(q){if(q!==tc.escapeKeyDown&&m(V.id))return;const X=W({},e.current.getRowParams(V.id),{reason:q,field:V.field});e.current.publishEvent("rowEditStop",X,U)}}else if(V.isEditable){let q;if(!e.current.unstable_applyPipeProcessors("canStartEditing",!0,{event:U,cellParams:V,editMode:"row"}))return;if(Jfe(U)||Zfe(U)?q=lf.printableKeyDown:U.key==="Enter"?q=lf.enterKeyDown:(U.key==="Backspace"||U.key==="Delete")&&(q=lf.deleteKeyDown),q){const ie=e.current.getRowParams(V.id),ee=W({},ie,{field:V.field,reason:q});e.current.publishEvent("rowEditStart",ee,U)}}},[e,m]),E=v.useCallback(V=>{const{id:U,field:q,reason:X}=V,ie={id:U,fieldToFocus:q};(X===lf.printableKeyDown||X===lf.deleteKeyDown)&&(ie.deleteValue=!!q),e.current.startRowEditMode(ie)},[e]),P=v.useCallback(V=>{const{id:U,reason:q,field:X}=V;e.current.runPendingEditCellValueMutation(U);let ie;q===tc.enterKeyDown?ie="below":q===tc.tabKeyDown?ie="right":q===tc.shiftTabKeyDown&&(ie="left");const ee=q==="escapeKeyDown";e.current.stopRowEditMode({id:U,ignoreModifications:ee,field:X,cellToFocusAfter:ie})},[e]);bt(e,"cellDoubleClick",f(y)),bt(e,"cellFocusIn",f(w)),bt(e,"cellFocusOut",f(x)),bt(e,"cellKeyDown",f(C)),bt(e,"rowEditStart",f(E)),bt(e,"rowEditStop",f(P)),yr(e,"rowEditStart",t.onRowEditStart),yr(e,"rowEditStop",t.onRowEditStop);const T=v.useCallback(V=>{if(t.editMode===wu.Cell)return qn.View;const U=Xo(e.current.state);return U[V]&&Object.keys(U[V]).length>0?qn.Edit:qn.View},[e,t.editMode]),I=Ar(V=>{const U=V!==t.rowModesModel;d&&U&&d(V,{api:e.current}),!(t.rowModesModel&&U)&&(r(V),o.current=V,e.current.publishEvent("rowModesModelChange",V))}),A=v.useCallback((V,U)=>{const q=W({},o.current);U!==null?q[V]=W({},U):delete q[V],I(q)},[I]),k=v.useCallback((V,U)=>{e.current.setState(q=>{const X=W({},q.editRows);return U!==null?X[V]=U:delete X[V],W({},q,{editRows:X})}),e.current.forceUpdate()},[e]),O=v.useCallback((V,U,q)=>{e.current.setState(X=>{const ie=W({},X.editRows);return q!==null?ie[V]=W({},ie[V],{[U]:W({},q)}):(delete ie[V][U],Object.keys(ie[V]).length===0&&delete ie[V]),W({},X,{editRows:ie})}),e.current.forceUpdate()},[e]),$=v.useCallback(V=>{const{id:U}=V,q=Dt(V,R2t);h(U,qn.View),A(U,W({mode:qn.Edit},q))},[h,A]),N=Ar(V=>{const{id:U,fieldToFocus:q,deleteValue:X,initialValue:ie}=V,ee=pd(e),Q=ee.reduce((te,pe)=>{if(!e.current.getCellParams(U,pe).isEditable)return te;const se=e.current.getColumn(pe);let re=e.current.getCellValue(U,pe);return q===pe&&(X||ie)&&(X?re=QF(se):ie&&(re=ie)),te[pe]={value:re,error:!1,isProcessingProps:!!se.preProcessEditCellProps&&X},te},{});k(U,Q),q&&e.current.setCellFocus(U,q),ee.filter(te=>!!e.current.getColumn(te).preProcessEditCellProps&&X).forEach(te=>{const pe=e.current.getColumn(te),ae=e.current.getCellValue(U,te),se=X?QF(pe):ie??ae;Promise.resolve(pe.preProcessEditCellProps({id:U,row:e.current.getRow(U),props:Q[te],hasChanged:se!==ae})).then(re=>{if(e.current.getRowMode(U)===qn.Edit){const fe=Xo(e.current.state);O(U,te,W({},re,{value:fe[U][te].value,isProcessingProps:!1}))}})})}),L=v.useCallback(V=>{const{id:U}=V,q=Dt(V,$2t);h(U,qn.Edit),A(U,W({mode:qn.View},q))},[h,A]),j=Ar(V=>{const{id:U,ignoreModifications:q,field:X,cellToFocusAfter:ie="none"}=V;e.current.runPendingEditCellValueMutation(U);const ee=()=>{ie!=="none"&&X&&e.current.moveFocusToRelativeCell(U,X,ie),k(U,null),A(U,null)};if(q){ee();return}const Q=Xo(e.current.state),te=e.current.getRow(U);if(Object.values(Q[U]).some(se=>se.isProcessingProps)){i.current[U].mode=qn.Edit;return}if(m(U)){i.current[U].mode=qn.Edit,A(U,{mode:qn.Edit});return}const ae=e.current.getRowWithUpdatedValuesFromRowEditing(U);if(l){const se=re=>{i.current[U].mode=qn.Edit,A(U,{mode:qn.Edit}),c&&c(re)};try{Promise.resolve(l(ae,te,{rowId:U})).then(re=>{e.current.updateRows([re]),ee()}).catch(se)}catch(re){se(re)}}else e.current.updateRows([ae]),ee()}),D=v.useCallback(V=>{const{id:U,field:q,value:X,debounceMs:ie,unstable_skipValueParser:ee}=V;p(U,q);const Q=e.current.getColumn(q),te=e.current.getRow(U);let pe=X;Q.valueParser&&!ee&&(pe=Q.valueParser(X,te,Q,e));let ae=Xo(e.current.state),se=W({},ae[U][q],{value:pe,changeReason:ie?"debouncedSetEditCellValue":"setEditCellValue"});return Q.preProcessEditCellProps||O(U,q,se),new Promise(re=>{const fe=[];if(Q.preProcessEditCellProps){const Z=se.value!==ae[U][q].value;se=W({},se,{isProcessingProps:!0}),O(U,q,se);const ce=ae[U],ge=Dt(ce,[q].map(nC)),we=Promise.resolve(Q.preProcessEditCellProps({id:U,row:te,props:se,hasChanged:Z,otherFieldsProps:ge})).then(me=>{if(e.current.getRowMode(U)===qn.View){re(!1);return}ae=Xo(e.current.state),me=W({},me,{isProcessingProps:!1}),me.value=Q.preProcessEditCellProps?ae[U][q].value:pe,O(U,q,me)});fe.push(we)}Object.entries(ae[U]).forEach(([Z,ce])=>{if(Z===q)return;const ge=e.current.getColumn(Z);if(!ge.preProcessEditCellProps)return;ce=W({},ce,{isProcessingProps:!0}),O(U,Z,ce),ae=Xo(e.current.state);const we=ae[U],me=Dt(we,[Z].map(nC)),Se=Promise.resolve(ge.preProcessEditCellProps({id:U,row:te,props:ce,hasChanged:!1,otherFieldsProps:me})).then(xe=>{if(e.current.getRowMode(U)===qn.View){re(!1);return}xe=W({},xe,{isProcessingProps:!1}),O(U,Z,xe)});fe.push(Se)}),Promise.all(fe).then(()=>{e.current.getRowMode(U)===qn.Edit?(ae=Xo(e.current.state),re(!ae[U][q].error)):re(!1)})})},[e,p,O]),_=v.useCallback(V=>{const U=Xo(e.current.state),q=e.current.getRow(V);if(!U[V])return e.current.getRow(V);let X=W({},q);return Object.entries(U[V]).forEach(([ie,ee])=>{const Q=e.current.getColumn(ie);Q.valueSetter?X=Q.valueSetter(ee.value,X,Q,e):X[ie]=ee.value}),X},[e]),z={getRowMode:T,startRowEditMode:$,stopRowEditMode:L},F={setRowEditingEditCellValue:D,getRowWithUpdatedValuesFromRowEditing:_};ln(e,z,"public"),ln(e,F,"private"),v.useEffect(()=>{u&&I(u)},[u,I]),Ho(()=>{const V=kO(e),U=i.current;i.current=ife(n);const q=new Set([...Object.keys(n),...Object.keys(U)]);Array.from(q).forEach(X=>{var te;const ie=n[X]??{mode:qn.View},ee=((te=U[X])==null?void 0:te.mode)||qn.View,Q=V[X]??X;ie.mode===qn.Edit&&ee===qn.View?N(W({id:Q},ie)):ie.mode===qn.View&&ee===qn.Edit&&j(W({id:Q},ie))})},[e,n,N,j])},_2t=e=>W({},e,{editRows:{}}),N2t=(e,t)=>{M2t(e,t),D2t(e,t);const n=v.useRef({}),{isCellEditable:r}=t,o=v.useCallback(f=>ub(f.rowNode)||!f.colDef.editable||!f.colDef.renderEditCell?!1:r?r(f):!0,[r]),i=(f,p,h,m)=>{if(!h){m();return}if(n.current[f]||(n.current[f]={}),n.current[f][p]){const[x]=n.current[f][p];clearTimeout(x)}const y=()=>{const[x]=n.current[f][p];clearTimeout(x),m(),delete n.current[f][p]},w=setTimeout(()=>{m(),delete n.current[f][p]},h);n.current[f][p]=[w,y]};v.useEffect(()=>{const f=n.current;return()=>{Object.entries(f).forEach(([p,h])=>{Object.keys(h).forEach(m=>{const[y]=f[p][m];clearTimeout(y),delete f[p][m]})})}},[]);const a=v.useCallback((f,p)=>{if(n.current[f]){if(!p)Object.keys(n.current[f]).forEach(h=>{const[,m]=n.current[f][h];m()});else if(n.current[f][p]){const[,h]=n.current[f][p];h()}}},[]),s=v.useCallback(f=>{const{id:p,field:h,debounceMs:m}=f;return new Promise(y=>{i(p,h,m,async()=>{const w=t.editMode===wu.Row?e.current.setRowEditingEditCellValue:e.current.setCellEditingEditCellValue;if(e.current.getCellMode(p,h)===ar.Edit){const x=await w(f);y(x)}})})},[e,t.editMode]),l=v.useCallback((f,p)=>t.editMode===wu.Cell?e.current.getRowWithUpdatedValuesFromCellEditing(f,p):e.current.getRowWithUpdatedValuesFromRowEditing(f),[e,t.editMode]),c=v.useCallback((f,p)=>{var m;return((m=Xo(e.current.state)[f])==null?void 0:m[p])??null},[e]),u={isCellEditable:o,setEditCellValue:s,getRowWithUpdatedValues:l,unstable_getEditCellMeta:c},d={runPendingEditCellValueMutation:a};ln(e,u,"public"),ln(e,d,"private")},L2t=(e,t,n)=>{const r=!!t.unstable_dataSource;return n.current.caches.rows=lT({rows:r?[]:t.rows,getRowId:t.getRowId,loading:t.loading,rowCount:t.rowCount}),W({},e,{rows:pfe({apiRef:n,rowCountProp:t.rowCount,loadingProp:r?!0:t.loading,previousTree:null,previousTreeDepths:null})})},F2t=(e,t)=>{const n=Wo(e,"useGridRows"),r=Up(e,t),o=v.useRef(Date.now()),i=v.useRef(t.rowCount),a=p0(),s=v.useCallback(F=>{const V=Ff(e)[F];if(V)return V;const U=e.current.getRowNode(F);return U&&ub(U)?{[Jy]:F}:null},[e]),l=t.getRowId,c=v.useCallback(F=>Jy in F?F[Jy]:l?l(F):F.id,[l]),u=v.useMemo(()=>r.rows.reduce((F,{id:V},U)=>(F[V]=U,F),{}),[r.rows]),d=v.useCallback(({cache:F,throttle:V})=>{const U=()=>{o.current=Date.now(),e.current.setState(X=>W({},X,{rows:pfe({apiRef:e,rowCountProp:t.rowCount,loadingProp:t.loading,previousTree:$i(e),previousTreeDepths:cQ(e),previousGroupsToFetch:OAt(e)})})),e.current.publishEvent("rowsSet"),e.current.forceUpdate()};if(a.clear(),e.current.caches.rows=F,!V){U();return}const q=t.throttleRowsMs-(Date.now()-o.current);if(q>0){a.start(q,U);return}U()},[t.throttleRowsMs,t.rowCount,t.loading,e,a]),f=v.useCallback(F=>{n.debug(`Updating all rows, new length ${F.length}`);const V=lT({rows:F,getRowId:t.getRowId,loading:t.loading,rowCount:t.rowCount}),U=e.current.caches.rows;V.rowsBeforePartialUpdates=U.rowsBeforePartialUpdates,d({cache:V,throttle:!0})},[n,t.getRowId,t.loading,t.rowCount,d,e]),p=v.useCallback(F=>{if(t.signature===Cl.DataGrid&&F.length>1)throw new Error(["MUI X: You cannot update several rows at once in `apiRef.current.updateRows` on the DataGrid.","You need to upgrade to DataGridPro or DataGridPremium component to unlock this feature."].join(` -`));const V=dQ(e,F,t.getRowId),U=uQ({updates:V,getRowId:t.getRowId,previousCache:e.current.caches.rows});d({cache:U,throttle:!0})},[t.signature,t.getRowId,d,e]),h=v.useCallback((F,V)=>{const U=dQ(e,F,t.getRowId),q=uQ({updates:U,getRowId:t.getRowId,previousCache:e.current.caches.rows,groupKeys:V??[]});d({cache:q,throttle:!1})},[t.getRowId,d,e]),m=v.useCallback(F=>{F!==t.loading&&(n.debug(`Setting loading to ${F}`),e.current.setState(V=>W({},V,{rows:W({},V.rows,{loading:F})})),e.current.caches.rows.loadingPropBeforePartialUpdates=F)},[t.loading,e,n]),y=v.useCallback(()=>{const F=wP(e),V=Ff(e);return new Map(F.map(U=>[U,V[U]??{}]))},[e]),w=v.useCallback(()=>jM(e),[e]),x=v.useCallback(()=>wP(e),[e]),C=v.useCallback(F=>u[F],[u]),E=v.useCallback((F,V)=>{const U=e.current.getRowNode(F);if(!U)throw new Error(`MUI X: No row with id #${F} found.`);if(U.type!=="group")throw new Error("MUI X: Only group nodes can be expanded or collapsed.");const q=W({},U,{childrenExpanded:V});e.current.setState(X=>W({},X,{rows:W({},X.rows,{tree:W({},X.rows.tree,{[F]:q})})})),e.current.forceUpdate(),e.current.publishEvent("rowExpansionChange",q)},[e]),P=v.useCallback(F=>$i(e)[F]??null,[e]),T=v.useCallback(({skipAutoGeneratedRows:F=!0,groupId:V,applySorting:U,applyFiltering:q})=>{const X=$i(e);let ie;if(U){const ee=X[V];if(!ee)return[];const Q=w1(e);ie=[];const te=Q.findIndex(pe=>pe===V)+1;for(let pe=te;peee.depth;pe+=1){const ae=Q[pe];(!F||!ub(X[ae]))&&ie.push(ae)}}else ie=GH(X,V,F);if(q){const ee=m0(e);ie=ie.filter(Q=>ee[Q]!==!1)}return ie},[e]),I=v.useCallback((F,V)=>{const U=e.current.getRowNode(F);if(!U)throw new Error(`MUI X: No row with id #${F} found.`);if(U.parent!==hi)throw new Error("MUI X: The row reordering do not support reordering of grouped rows yet.");if(U.type!=="leaf")throw new Error("MUI X: The row reordering do not support reordering of footer or grouping rows.");e.current.setState(q=>{const X=$i(q,e.current.instanceId)[hi],ie=X.children,ee=ie.findIndex(te=>te===F);if(ee===-1||ee===V)return q;n.debug(`Moving row ${F} to index ${V}`);const Q=[...ie];return Q.splice(V,0,Q.splice(ee,1)[0]),W({},q,{rows:W({},q.rows,{tree:W({},q.rows.tree,{[hi]:W({},X,{children:Q})})})})}),e.current.publishEvent("rowsSet")},[e,n]),A=v.useCallback((F,V)=>{if(t.signature===Cl.DataGrid&&V.length>1)throw new Error(["MUI X: You cannot replace rows using `apiRef.current.unstable_replaceRows` on the DataGrid.","You need to upgrade to DataGridPro or DataGridPremium component to unlock this feature."].join(` -`));if(V.length===0)return;if(g0(e)>1)throw new Error("`apiRef.current.unstable_replaceRows` is not compatible with tree data and row grouping");const q=W({},$i(e)),X=W({},Ff(e)),ie=W({},kO(e)),ee=q[hi],Q=[...ee.children],te=new Set;for(let ae=0;ae{var se;return((se=q[ae])==null?void 0:se.type)==="leaf"});e.current.caches.rows.dataRowIdToModelLookup=X,e.current.caches.rows.dataRowIdToIdLookup=ie,e.current.setState(ae=>W({},ae,{rows:W({},ae.rows,{dataRowIdToModelLookup:X,dataRowIdToIdLookup:ie,dataRowIds:pe,tree:q})})),e.current.publishEvent("rowsSet")},[e,t.signature,t.getRowId]),k={getRow:s,setLoading:m,getRowId:c,getRowModels:y,getRowsCount:w,getAllRowIds:x,setRows:f,updateRows:p,getRowNode:P,getRowIndexRelativeToVisibleRows:C,unstable_replaceRows:A},O={setRowIndex:I,setRowChildrenExpansion:E,getRowGroupChildren:T},$={updateServerRows:h},N=v.useCallback(()=>{n.info("Row grouping pre-processing have changed, regenerating the row tree");let F;e.current.caches.rows.rowsBeforePartialUpdates===t.rows?F=W({},e.current.caches.rows,{updates:{type:"full",rows:wP(e)}}):F=lT({rows:t.rows,getRowId:t.getRowId,loading:t.loading,rowCount:t.rowCount}),d({cache:F,throttle:!1})},[n,e,t.rows,t.getRowId,t.loading,t.rowCount,d]),L=Au(()=>t.unstable_dataSource),j=v.useCallback(F=>{if(t.unstable_dataSource&&t.unstable_dataSource!==L.current){L.current=t.unstable_dataSource;return}F==="rowTreeCreation"&&N()},[N,L,t.unstable_dataSource]),D=v.useCallback(()=>{e.current.getActiveStrategy("rowTree")!==AAt(e)&&N()},[e,N]);bt(e,"activeStrategyProcessorChange",j),bt(e,"strategyAvailabilityChange",D);const _=v.useCallback(()=>{e.current.setState(F=>{const V=e.current.unstable_applyPipeProcessors("hydrateRows",{tree:$i(F,e.current.instanceId),treeDepths:cQ(F,e.current.instanceId),dataRowIds:wP(F,e.current.instanceId),dataRowIdToModelLookup:Ff(F,e.current.instanceId),dataRowIdToIdLookup:kO(F,e.current.instanceId)});return W({},F,{rows:W({},F.rows,V,{totalTopLevelRowCount:ffe({tree:V.tree,rowCountProp:t.rowCount})})})}),e.current.publishEvent("rowsSet"),e.current.forceUpdate()},[e,t.rowCount]);l5(e,"hydrateRows",_),ln(e,k,"public"),ln(e,O,t.signature===Cl.DataGrid?"private":"public"),ln(e,$,"private");const z=v.useRef(!0);v.useEffect(()=>{var X;if(z.current){z.current=!1;return}let F=!1;t.rowCount!==i.current&&(F=!0,i.current=t.rowCount);const V=e.current.caches.rows.rowsBeforePartialUpdates===t.rows,U=e.current.caches.rows.loadingPropBeforePartialUpdates===t.loading,q=e.current.caches.rows.rowCountPropBeforePartialUpdates===t.rowCount;V&&(U||(e.current.setState(ie=>W({},ie,{rows:W({},ie.rows,{loading:t.loading})})),e.current.caches.rows.loadingPropBeforePartialUpdates=t.loading,e.current.forceUpdate()),q||(e.current.setState(ie=>W({},ie,{rows:W({},ie.rows,{totalRowCount:Math.max(t.rowCount||0,ie.rows.totalRowCount),totalTopLevelRowCount:Math.max(t.rowCount||0,ie.rows.totalTopLevelRowCount)})})),e.current.caches.rows.rowCountPropBeforePartialUpdates=t.rowCount,e.current.forceUpdate()),!F)||(n.debug(`Updating all rows, new length ${(X=t.rows)==null?void 0:X.length}`),d({cache:lT({rows:t.rows,getRowId:t.getRowId,loading:t.loading,rowCount:t.rowCount}),throttle:!1}))},[t.rows,t.rowCount,t.getRowId,t.loading,n,d,e])},j2t=e=>{const t={[hi]:W({},RAt(),{children:e})};for(let n=0;n{const n=W({},e),r={};for(let a=0;a!r[a])),n[hi]=W({},o,{children:i}),{groupingName:Og,tree:n,treeDepths:{0:i.length},dataRowIds:i}},z2t=e=>e.updates.type==="full"?j2t(e.updates.rows):B2t({previousTree:e.previousTree,actions:e.updates.actions}),V2t=e=>{_O(e,Og,"rowTreeCreation",z2t)},ape=(e,t)=>e==null||Array.isArray(e)?e:t&&t[0]===e?t:[e],H2t=(e,t)=>W({},e,{rowSelection:t.rowSelection?ape(t.rowSelectionModel)??[]:[]}),U2t=(e,t)=>{var z,F,V,U,q,X,ie;const n=Wo(e,"useGridSelection"),r=v.useCallback(ee=>(...Q)=>{t.rowSelection&&ee(...Q)},[t.rowSelection]),o=t.signature!==Cl.DataGrid&&(((z=t.rowSelectionPropagation)==null?void 0:z.parents)||((F=t.rowSelectionPropagation)==null?void 0:F.descendants)),i=v.useMemo(()=>ape(t.rowSelectionModel,ol(e.current.state)),[e,t.rowSelectionModel]),a=v.useRef(null);e.current.registerControlState({stateId:"rowSelection",propModel:i,propOnChange:t.onRowSelectionModelChange,stateSelector:ol,changeEvent:"rowSelectionChange"});const{checkboxSelection:s,disableRowSelectionOnClick:l,isRowSelectable:c}=t,u=QH(t),d=Up(e,t),f=Ye(e,$i),p=Ye(e,g0)>1,h=v.useCallback(ee=>{let Q=ee;const te=a.current??ee,pe=e.current.isRowSelected(ee);if(pe){const ae=Zy(e),se=ae.findIndex(fe=>fe===te),re=ae.findIndex(fe=>fe===Q);if(se===re)return;se>re?Q=ae[re+1]:Q=ae[re-1]}a.current=ee,e.current.selectRowRange({startId:te,endId:Q},!pe)},[e]),m=v.useCallback(ee=>{if(t.signature===Cl.DataGrid&&!u&&Array.isArray(ee)&&ee.length>1)throw new Error(["MUI X: `rowSelectionModel` can only contain 1 item in DataGrid.","You need to upgrade to DataGridPro or DataGridPremium component to unlock multiple selection."].join(` -`));ol(e.current.state)!==ee&&(n.debug("Setting selection model"),e.current.setState(te=>W({},te,{rowSelection:t.rowSelection?ee:[]})),e.current.forceUpdate())},[e,n,t.rowSelection,t.signature,u]),y=v.useCallback(ee=>ol(e.current.state).includes(ee),[e]),w=v.useCallback(ee=>{if(t.rowSelection===!1||c&&!c(e.current.getRowParams(ee)))return!1;const Q=e.current.getRowNode(ee);return!((Q==null?void 0:Q.type)==="footer"||(Q==null?void 0:Q.type)==="pinnedRow")},[e,t.rowSelection,c]),x=v.useCallback(()=>rkt(e),[e]),C=v.useCallback((ee,Q=!0,te=!1)=>{var pe,ae,se,re,fe,Z;if(e.current.isRowSelectable(ee))if(a.current=ee,te){n.debug(`Setting selection for row ${ee}`);const ce=[],ge=we=>{ce.push(we)};Q&&(ge(ee),o&&xP(e,f,ee,((pe=t.rowSelectionPropagation)==null?void 0:pe.descendants)??!1,((ae=t.rowSelectionPropagation)==null?void 0:ae.parents)??!1,ge)),e.current.setRowSelectionModel(ce)}else{n.debug(`Toggling selection for row ${ee}`);const ce=ol(e.current.state),ge=new Set(ce);ge.delete(ee);const we=xe=>{ge.add(xe)},me=xe=>{ge.delete(xe)};Q?(we(ee),o&&xP(e,f,ee,((se=t.rowSelectionPropagation)==null?void 0:se.descendants)??!1,((re=t.rowSelectionPropagation)==null?void 0:re.parents)??!1,we)):o&&fQ(e,f,ee,((fe=t.rowSelectionPropagation)==null?void 0:fe.descendants)??!1,((Z=t.rowSelectionPropagation)==null?void 0:Z.parents)??!1,me),(ge.size<2||u)&&e.current.setRowSelectionModel(Array.from(ge))}},[e,n,o,f,(V=t.rowSelectionPropagation)==null?void 0:V.descendants,(U=t.rowSelectionPropagation)==null?void 0:U.parents,u]),E=v.useCallback((ee,Q=!0,te=!1)=>{n.debug("Setting selection for several rows");const pe=ee.filter(re=>e.current.isRowSelectable(re));let ae;if(te){if(Q){if(ae=new Set(pe),o){const fe=Z=>{ae.add(Z)};pe.forEach(Z=>{var ce,ge;xP(e,f,Z,((ce=t.rowSelectionPropagation)==null?void 0:ce.descendants)??!1,((ge=t.rowSelectionPropagation)==null?void 0:ge.parents)??!1,fe)})}}else ae=new Set;const re=hd(e);if(ae.size===Object.keys(re).length&&Array.from(ae).every(fe=>re[fe]===fe))return}else{ae=new Set(Object.values(hd(e)));const re=Z=>{ae.add(Z)},fe=Z=>{ae.delete(Z)};pe.forEach(Z=>{var ce,ge,we,me;Q?(ae.add(Z),o&&xP(e,f,Z,((ce=t.rowSelectionPropagation)==null?void 0:ce.descendants)??!1,((ge=t.rowSelectionPropagation)==null?void 0:ge.parents)??!1,re)):(fe(Z),o&&fQ(e,f,Z,((we=t.rowSelectionPropagation)==null?void 0:we.descendants)??!1,((me=t.rowSelectionPropagation)==null?void 0:me.parents)??!1,fe))})}(ae.size<2||u)&&e.current.setRowSelectionModel(Array.from(ae))},[n,o,u,e,f,(q=t.rowSelectionPropagation)==null?void 0:q.descendants,(X=t.rowSelectionPropagation)==null?void 0:X.parents]),P=v.useCallback(({startId:ee,endId:Q},te=!0,pe=!1)=>{if(!e.current.getRow(ee)||!e.current.getRow(Q))return;n.debug(`Expanding selection from row ${ee} to row ${Q}`);const ae=Zy(e),se=ae.indexOf(ee),re=ae.indexOf(Q),[fe,Z]=se>re?[re,se]:[se,re],ce=ae.slice(fe,Z+1);e.current.selectRows(ce,te,pe)},[e,n]),T={selectRow:C,setRowSelectionModel:m,getSelectedRows:x,isRowSelected:y,isRowSelectable:w},I={selectRows:E,selectRowRange:P};ln(e,T,"public"),ln(e,I,t.signature===Cl.DataGrid?"private":"public");const A=v.useRef(!0),k=v.useCallback((ee=!1)=>{var Z;if(A.current)return;const Q=ol(e.current.state),te=Ff(e),pe=m0(e),ae=W({},hd(e)),se=ce=>t.filterMode==="server"?!te[ce]:pe[ce]!==!0;let re=!1;Q.forEach(ce=>{var we;if(se(ce)){if(t.keepNonExistentRowsSelected)return;delete ae[ce],re=!0;return}if(!((we=t.rowSelectionPropagation)!=null&&we.parents))return;const ge=f[ce];if(ge.type==="group"){if(ge.isAutoGenerated){delete ae[ce],re=!0;return}ge.children.every(Se=>pe[Se]===!1)||(delete ae[ce],re=!0)}});const fe=p&&((Z=t.rowSelectionPropagation)==null?void 0:Z.parents)&&Object.keys(ae).length>0;if(re||fe&&!ee){const ce=Object.values(ae);fe?e.current.selectRows(ce,!0,!0):e.current.setRowSelectionModel(ce)}},[e,p,(ie=t.rowSelectionPropagation)==null?void 0:ie.parents,t.keepNonExistentRowsSelected,t.filterMode,f]),O=v.useCallback((ee,Q)=>{const te=Q.metaKey||Q.ctrlKey,pe=!s&&!te&&!J$t(Q),ae=!u||pe,se=e.current.isRowSelected(ee);ae?e.current.selectRow(ee,pe?!0:!se,!0):e.current.selectRow(ee,!se,!1)},[e,u,s]),$=v.useCallback((ee,Q)=>{var ae;if(l)return;const te=(ae=Q.target.closest(`.${le.cell}`))==null?void 0:ae.getAttribute("data-field");if(te===y0.field||te===zM)return;if(te){const se=e.current.getColumn(te);if((se==null?void 0:se.type)===FM)return}e.current.getRowNode(ee.id).type!=="pinnedRow"&&(Q.shiftKey&&u?h(ee.id):O(ee.id,Q))},[l,u,e,h,O]),N=v.useCallback((ee,Q)=>{var te;u&&Q.shiftKey&&((te=window.getSelection())==null||te.removeAllRanges())},[u]),L=v.useCallback((ee,Q)=>{u&&Q.nativeEvent.shiftKey?h(ee.id):e.current.selectRow(ee.id,ee.value,!u)},[e,h,u]),j=v.useCallback(ee=>{const Q=t.pagination&&t.checkboxSelectionVisibleOnly&&t.paginationMode==="client"?Afe(e):Zy(e);e.current.selectRows(Q,ee.value)},[e,t.checkboxSelectionVisibleOnly,t.pagination,t.paginationMode]),D=v.useCallback((ee,Q)=>{if(e.current.getCellMode(ee.id,ee.field)!==ar.Edit&&!C1(Q)){if(DO(Q.key)&&Q.shiftKey){const te=Za(e);if(te&&te.id!==ee.id){Q.preventDefault();const pe=e.current.isRowSelected(te.id);if(!u){e.current.selectRow(te.id,!pe,!0);return}const ae=e.current.getRowIndexRelativeToVisibleRows(te.id),se=e.current.getRowIndexRelativeToVisibleRows(ee.id);let re,fe;ae>se?pe?(re=se,fe=ae-1):(re=se,fe=ae):pe?(re=ae+1,fe=se):(re=ae,fe=se);const Z=d.rows.slice(re,fe+1).map(ce=>ce.id);e.current.selectRows(Z,!pe);return}}if(Q.key===" "&&Q.shiftKey){Q.preventDefault(),O(ee.id,Q);return}String.fromCharCode(Q.keyCode)==="A"&&(Q.ctrlKey||Q.metaKey)&&(Q.preventDefault(),E(e.current.getAllRowIds(),!0))}},[e,O,E,d.rows,u]);bt(e,"sortedRowsSet",r(()=>k(!0))),bt(e,"filteredRowsSet",r(k)),bt(e,"rowClick",r($)),bt(e,"rowSelectionCheckboxChange",r(L)),bt(e,"headerSelectionCheckboxChange",j),bt(e,"cellMouseDown",r(N)),bt(e,"cellKeyDown",r(D)),v.useEffect(()=>{i!==void 0&&e.current.setRowSelectionModel(i)},[e,i,t.rowSelection]),v.useEffect(()=>{t.rowSelection||e.current.setRowSelectionModel([])},[e,t.rowSelection]);const _=i!=null;v.useEffect(()=>{if(_||!t.rowSelection)return;const ee=ol(e.current.state);if(w){const Q=ee.filter(te=>w(te));Q.length{if(!t.rowSelection||_)return;const ee=ol(e.current.state);!u&&ee.length>1&&e.current.setRowSelectionModel([])},[e,u,s,_,t.rowSelection]),v.useEffect(()=>{r(k)},[k,r]),v.useEffect(()=>{A.current&&(A.current=!1)},[])},W2t=e=>{const{classes:t}=e;return v.useMemo(()=>Tn({cellCheckbox:["cellCheckbox"],columnHeaderCheckbox:["columnHeaderCheckbox"]},In,t),[t])},G2t=(e,t)=>{const n={classes:t.classes},r=W2t(n),o=v.useCallback(i=>{const a=W({},y0,{cellClassName:r.cellCheckbox,headerClassName:r.columnHeaderCheckbox,headerName:e.current.getLocaleText("checkboxSelectionHeaderName")}),s=t.checkboxSelection,l=i.lookup[Yu]!=null;return s&&!l?(i.lookup[Yu]=a,i.orderedFields=[Yu,...i.orderedFields]):!s&&l?(delete i.lookup[Yu],i.orderedFields=i.orderedFields.filter(c=>c!==Yu)):s&&l&&(i.lookup[Yu]=W({},a,i.lookup[Yu])),i},[e,r,t.checkboxSelection]);zr(e,"hydrateColumns",o)},q2t=(e,t)=>{var r,o;const n=t.sortModel??((o=(r=t.initialState)==null?void 0:r.sorting)==null?void 0:o.sortModel)??[];return W({},e,{sorting:{sortModel:tfe(n,t.disableMultipleColumnsSorting),sortedRows:[]}})},K2t=(e,t)=>{var P,T;const n=Wo(e,"useGridSorting");e.current.registerControlState({stateId:"sortModel",propModel:t.sortModel,propOnChange:t.onSortModelChange,stateSelector:rl,changeEvent:"sortModelChange"});const r=v.useCallback((I,A)=>{const k=rl(e),O=k.findIndex(N=>N.field===I);let $=[...k];return O>-1?(A==null?void 0:A.sort)==null?$.splice(O,1):$.splice(O,1,A):$=[...k,A],$},[e]),o=v.useCallback((I,A)=>{const O=rl(e).find($=>$.field===I.field);if(O){const $=A===void 0?tQ(I.sortingOrder??t.sortingOrder,O.sort):A;return $===void 0?void 0:W({},O,{sort:$})}return{field:I.field,sort:A===void 0?tQ(I.sortingOrder??t.sortingOrder):A}},[e,t.sortingOrder]),i=v.useCallback((I,A)=>A==null||A.sortable===!1||t.disableColumnSorting?I:(A.sortingOrder||t.sortingOrder).some(O=>!!O)?[...I,"columnMenuSortItem"]:I,[t.sortingOrder,t.disableColumnSorting]),a=v.useCallback(()=>{e.current.setState(I=>{if(t.sortingMode==="server")return n.debug("Skipping sorting rows as sortingMode = server"),W({},I,{sorting:W({},I.sorting,{sortedRows:GH($i(e),hi,!1)})});const A=rl(I,e.current.instanceId),k=ZOt(A,e),O=e.current.applyStrategyProcessor("sorting",{sortRowList:k});return W({},I,{sorting:W({},I.sorting,{sortedRows:O})})}),e.current.publishEvent("sortedRowsSet"),e.current.forceUpdate()},[e,n,t.sortingMode]),s=v.useCallback(I=>{rl(e)!==I&&(n.debug("Setting sort model"),e.current.setState(eQ(I,t.disableMultipleColumnsSorting)),e.current.forceUpdate(),e.current.applySorting())},[e,n,t.disableMultipleColumnsSorting]),l=v.useCallback((I,A,k)=>{const O=e.current.getColumn(I),$=o(O,A);let N;!k||t.disableMultipleColumnsSorting?N=($==null?void 0:$.sort)==null?[]:[$]:N=r(O.field,$),e.current.setSortModel(N)},[e,r,o,t.disableMultipleColumnsSorting]),c=v.useCallback(()=>rl(e),[e]),u=v.useCallback(()=>qH(e).map(A=>A.model),[e]),d=v.useCallback(()=>w1(e),[e]),f=v.useCallback(I=>e.current.getSortedRowIds()[I],[e]);ln(e,{getSortModel:c,getSortedRows:u,getSortedRowIds:d,getRowIdFromRowIndex:f,setSortModel:s,sortColumn:l,applySorting:a},"public");const h=v.useCallback((I,A)=>{var $,N;const k=rl(e);return!A.exportOnlyDirtyModels||t.sortModel!=null||((N=($=t.initialState)==null?void 0:$.sorting)==null?void 0:N.sortModel)!=null||k.length>0?W({},I,{sorting:{sortModel:k}}):I},[e,t.sortModel,(T=(P=t.initialState)==null?void 0:P.sorting)==null?void 0:T.sortModel]),m=v.useCallback((I,A)=>{var O;const k=(O=A.stateToRestore.sorting)==null?void 0:O.sortModel;return k==null?I:(e.current.setState(eQ(k,t.disableMultipleColumnsSorting)),W({},I,{callbacks:[...I.callbacks,e.current.applySorting]}))},[e,t.disableMultipleColumnsSorting]),y=v.useCallback(I=>{const A=$i(e),k=A[hi],O=I.sortRowList?I.sortRowList(k.children.map($=>A[$])):[...k.children];return k.footerId!=null&&O.push(k.footerId),O},[e]);zr(e,"exportState",h),zr(e,"restoreState",m),_O(e,Og,"sorting",y);const w=v.useCallback(({field:I,colDef:A},k)=>{if(!A.sortable||t.disableColumnSorting)return;const O=k.shiftKey||k.metaKey||k.ctrlKey;l(I,void 0,O)},[l,t.disableColumnSorting]),x=v.useCallback(({field:I,colDef:A},k)=>{!A.sortable||t.disableColumnSorting||k.key==="Enter"&&!k.ctrlKey&&!k.metaKey&&l(I,void 0,k.shiftKey)},[l,t.disableColumnSorting]),C=v.useCallback(()=>{const I=rl(e),A=jd(e);if(I.length>0){const k=I.filter(O=>A[O.field]);k.length{I==="sorting"&&e.current.applySorting()},[e]);zr(e,"columnMenu",i),bt(e,"columnHeaderClick",w),bt(e,"columnHeaderKeyDown",x),bt(e,"rowsSet",e.current.applySorting),bt(e,"columnsChange",C),bt(e,"activeStrategyProcessorChange",E),x1(()=>{e.current.applySorting()}),Ho(()=>{t.sortModel!==void 0&&e.current.setSortModel(t.sortModel)},[e,t.sortModel])};function GQ(e){const{containerSize:t,scrollPosition:n,elementSize:r,elementOffset:o}=e,i=o+r;if(r>t)return o;if(i-t>n)return i-t;if(o{const n=dr(),r=Wo(e,"useGridScroll"),o=e.current.columnHeadersContainerRef,i=e.current.virtualScrollerRef,a=Ye(e,Hp),s=v.useCallback(d=>{var w;const f=wi(e.current.state),p=jM(e),h=t.unstable_listView?[fb(e.current.state)]:Io(e);if(!(d.rowIndex==null)&&p===0||h.length===0)return!1;r.debug(`Scrolling to cell at row ${d.rowIndex}, col: ${d.colIndex} `);let y={};if(d.colIndex!==void 0){const x=Vp(e);let C;if(typeof d.rowIndex<"u"){const E=(w=a[d.rowIndex])==null?void 0:w.id,P=e.current.unstable_getCellColSpanInfo(E,d.colIndex);P&&!P.spannedByColSpan&&(C=P.cellProps.width)}typeof C>"u"&&(C=h[d.colIndex].computedWidth),y.left=GQ({containerSize:f.viewportOuterSize.width,scrollPosition:Math.abs(i.current.scrollLeft),elementSize:C,elementOffset:x[d.colIndex]})}if(d.rowIndex!==void 0){const x=v0(e.current.state),C=bkt(e),E=wkt(e),P=t.pagination?d.rowIndex-C*E:d.rowIndex,T=x.positions[P+1]?x.positions[P+1]-x.positions[P]:x.currentPageTotalHeight-x.positions[P];y.top=GQ({containerSize:f.viewportInnerSize.height,scrollPosition:i.current.scrollTop,elementSize:T,elementOffset:x.positions[P]})}return y=e.current.unstable_applyPipeProcessors("scrollToIndexes",y,d),typeof y.left!==void 0||typeof y.top!==void 0?(e.current.scroll(y),!0):!1},[r,e,i,t.pagination,a,t.unstable_listView]),l=v.useCallback(d=>{if(i.current&&d.left!==void 0&&o.current){const f=n?-1:1;o.current.scrollLeft=d.left,i.current.scrollLeft=f*d.left,r.debug(`Scrolling left: ${d.left}`)}i.current&&d.top!==void 0&&(i.current.scrollTop=d.top,r.debug(`Scrolling top: ${d.top}`)),r.debug("Scrolling, updating container, and viewport")},[i,n,o,r]),c=v.useCallback(()=>i!=null&&i.current?{top:i.current.scrollTop,left:i.current.scrollLeft}:{top:0,left:0},[i]);ln(e,{scroll:l,scrollToIndexes:s,getScrollPosition:c},"public")};function Q2t(e,t){yr(e,"columnHeaderClick",t.onColumnHeaderClick),yr(e,"columnHeaderContextMenu",t.onColumnHeaderContextMenu),yr(e,"columnHeaderDoubleClick",t.onColumnHeaderDoubleClick),yr(e,"columnHeaderOver",t.onColumnHeaderOver),yr(e,"columnHeaderOut",t.onColumnHeaderOut),yr(e,"columnHeaderEnter",t.onColumnHeaderEnter),yr(e,"columnHeaderLeave",t.onColumnHeaderLeave),yr(e,"cellClick",t.onCellClick),yr(e,"cellDoubleClick",t.onCellDoubleClick),yr(e,"cellKeyDown",t.onCellKeyDown),yr(e,"preferencePanelClose",t.onPreferencePanelClose),yr(e,"preferencePanelOpen",t.onPreferencePanelOpen),yr(e,"menuOpen",t.onMenuOpen),yr(e,"menuClose",t.onMenuClose),yr(e,"rowDoubleClick",t.onRowDoubleClick),yr(e,"rowClick",t.onRowClick),yr(e,"stateChange",t.onStateChange)}function X2t(e,t=166){let n,r;const o=()=>{n=void 0,e(...r)};function i(...a){r=a,n===void 0&&(n=setTimeout(o,t))}return i.clear=()=>{clearTimeout(n),n=void 0},i}const XF={autoHeight:!1,autoPageSize:!1,autosizeOnMount:!1,checkboxSelection:!1,checkboxSelectionVisibleOnly:!1,clipboardCopyCellDelimiter:" ",columnBufferPx:150,columnHeaderHeight:56,disableAutosize:!1,disableColumnFilter:!1,disableColumnMenu:!1,disableColumnReorder:!1,disableColumnResize:!1,disableColumnSelector:!1,disableColumnSorting:!1,disableDensitySelector:!1,disableEval:!1,disableMultipleColumnsFiltering:!1,disableMultipleColumnsSorting:!1,disableMultipleRowSelection:!1,disableRowSelectionOnClick:!1,disableVirtualization:!1,editMode:wu.Cell,filterDebounceMs:150,filterMode:"client",hideFooter:!1,hideFooterPagination:!1,hideFooterRowCount:!1,hideFooterSelectedRowCount:!1,ignoreDiacritics:!1,ignoreValueFormatterDuringExport:!1,indeterminateCheckboxAction:"deselect",keepColumnPositionIfDraggedOutside:!1,keepNonExistentRowsSelected:!1,loading:!1,logger:console,logLevel:"error",pageSizeOptions:[25,50,100],pagination:!1,paginationMode:"client",resizeThrottleMs:60,rowBufferPx:150,rowHeight:52,rowPositionsDebounceMs:166,rows:[],rowSelection:!0,rowSpacingType:"margin",showCellVerticalBorder:!1,showColumnVerticalBorder:!1,sortingMode:"client",sortingOrder:["asc","desc",null],throttleRowsMs:0,unstable_rowSpanning:!1},ny={width:0,height:0},J2t={isReady:!1,root:ny,viewportOuterSize:ny,viewportInnerSize:ny,contentSize:ny,minimumSize:ny,hasScrollX:!1,hasScrollY:!1,scrollbarSize:0,headerHeight:0,groupHeaderHeight:0,headerFilterHeight:0,rowWidth:0,rowHeight:0,columnsTotalWidth:0,leftPinnedWidth:0,rightPinnedWidth:0,headersTotalHeight:0,topContainerHeight:0,bottomContainerHeight:0},Z2t=e=>W({},e,{dimensions:J2t});function eNt(e,t){const n=Wo(e,"useResizeContainer"),r=v.useRef(!1),o=v.useRef(ny),i=Ye(e,wi),a=Ye(e,v0),s=Ye(e,b1),l=Ye(e,v1),c=v.useMemo(()=>gfe(t.rowHeight,XF.rowHeight),[t.rowHeight]),u=Math.floor(c*l),d=Math.floor(t.columnHeaderHeight*l),f=Math.floor((t.columnGroupHeaderHeight??t.columnHeaderHeight)*l),p=Math.floor((t.headerFilterHeight??t.columnHeaderHeight)*l),h=nNt(VH(e),6),m=e5(e,t),y=s.left.reduce((_,z)=>_+z.computedWidth,0),w=s.right.reduce((_,z)=>_+z.computedWidth,0),[x,C]=v.useState(),E=v.useMemo(()=>X2t(C,t.resizeThrottleMs),[t.resizeThrottleMs]),P=v.useRef(),T=()=>e.current.state.dimensions,I=Ar(_=>{e.current.setState(z=>W({},z,{dimensions:_}))}),A=v.useCallback(()=>{const _=e.current.mainElementRef.current;if(!_)return;const z=rOt(_).getComputedStyle(_),F={width:parseFloat(z.width)||0,height:parseFloat(z.height)||0};(!P.current||!qQ(P.current,F))&&(e.current.publishEvent("resize",F),P.current=F)},[e]),k=v.useCallback(()=>{const _=wi(e.current.state);if(!_.isReady)return 0;const z=ev(e,{pagination:t.pagination,paginationMode:t.paginationMode});if(t.getRowHeight){const V=KM(e),U=V.lastRowIndex-V.firstRowIndex;return Math.min(U-1,z.rows.length)}const F=Math.floor(_.viewportInnerSize.height/u);return Math.min(F,z.rows.length)},[e,t.pagination,t.paginationMode,t.getRowHeight,u]),O=v.useCallback(()=>{var fe,Z;const _=e.current.rootElementRef.current,z=DAt(e),F=tNt(_,h,t.scrollbarSize),V=m+z.top,U=z.bottom,X={width:h-y-w,height:a.currentPageTotalHeight};let ie,ee,Q=!1,te=!1;if(t.autoHeight)te=!1,Q=Math.round(h)>Math.round(o.current.width),ie={width:o.current.width,height:V+U+X.height},ee={width:Math.max(0,ie.width-(te?F:0)),height:Math.max(0,ie.height-(Q?F:0))};else{ie={width:o.current.width,height:o.current.height},ee={width:Math.max(0,ie.width-y-w),height:Math.max(0,ie.height-V-U)};const ce=X,ge=ee,we=ce.width>ge.width,me=ce.height>ge.height;(we||me)&&(te=me,Q=ce.width+(te?F:0)>ge.width,Q&&(te=ce.height+F>ge.height)),te&&(ee.width-=F),Q&&(ee.height-=F)}const pe=Math.max(ie.width,h+(te?F:0)),ae={width:h,height:V+X.height+U},se={isReady:!0,root:o.current,viewportOuterSize:ie,viewportInnerSize:ee,contentSize:X,minimumSize:ae,hasScrollX:Q,hasScrollY:te,scrollbarSize:F,headerHeight:d,groupHeaderHeight:f,headerFilterHeight:p,rowWidth:pe,rowHeight:u,columnsTotalWidth:h,leftPinnedWidth:y,rightPinnedWidth:w,headersTotalHeight:m,topContainerHeight:V,bottomContainerHeight:U},re=e.current.state.dimensions;I(se),qQ(se.viewportInnerSize,re.viewportInnerSize)||e.current.publishEvent("viewportInnerSizeChange",se.viewportInnerSize),(Z=(fe=e.current).updateRenderContext)==null||Z.call(fe)},[e,I,t.scrollbarSize,t.autoHeight,a.currentPageTotalHeight,u,d,f,p,h,m,y,w]),$={resize:A,getRootDimensions:T},N={updateDimensions:O,getViewportPageSize:k};ln(e,$,"public"),ln(e,N,"private"),Ho(()=>{x&&(O(),e.current.publishEvent("debouncedResize",o.current))},[e,x,O]);const L=e.current.rootElementRef.current;Ho(()=>{if(!L)return;const _=(z,F)=>L.style.setProperty(z,F);_("--DataGrid-width",`${i.viewportOuterSize.width}px`),_("--DataGrid-hasScrollX",`${Number(i.hasScrollX)}`),_("--DataGrid-hasScrollY",`${Number(i.hasScrollY)}`),_("--DataGrid-scrollbarSize",`${i.scrollbarSize}px`),_("--DataGrid-rowWidth",`${i.rowWidth}px`),_("--DataGrid-columnsTotalWidth",`${i.columnsTotalWidth}px`),_("--DataGrid-leftPinnedWidth",`${i.leftPinnedWidth}px`),_("--DataGrid-rightPinnedWidth",`${i.rightPinnedWidth}px`),_("--DataGrid-headerHeight",`${i.headerHeight}px`),_("--DataGrid-headersTotalHeight",`${i.headersTotalHeight}px`),_("--DataGrid-topContainerHeight",`${i.topContainerHeight}px`),_("--DataGrid-bottomContainerHeight",`${i.bottomContainerHeight}px`),_("--height",`${i.rowHeight}px`)},[L,i]);const j=v.useRef(!0),D=v.useCallback(_=>{o.current=_;const z=/jsdom/.test(window.navigator.userAgent);if(_.height===0&&!r.current&&!t.autoHeight&&!z&&(n.error(["The parent DOM element of the Data Grid has an empty height.","Please make sure that this element has an intrinsic height.","The grid displays with a height of 0px.","","More details: https://mui.com/r/x-data-grid-no-dimensions."].join(` +`}${a}`.trim()}function KQ(e){const t=document.createElement("span");t.style.whiteSpace="pre",t.style.userSelect="all",t.style.opacity="0px",t.textContent=e,document.body.appendChild(t);const n=document.createRange();n.selectNode(t);const r=window.getSelection();r.removeAllRanges(),r.addRange(n);try{document.execCommand("copy")}finally{document.body.removeChild(t)}}function D2t(e){navigator.clipboard?navigator.clipboard.writeText(e).catch(()=>{KQ(e)}):KQ(e)}function _2t(e){var t;return!!((t=window.getSelection())!=null&&t.toString()||e&&(e.selectionEnd||0)-(e.selectionStart||0)>0)}const N2t=(e,t)=>{const n=t.ignoreValueFormatterDuringExport,r=(typeof n=="object"?n==null?void 0:n.clipboardExport:n)||!1,o=t.clipboardCopyCellDelimiter,i=v.useCallback(a=>{if(!LDt(a)||_2t(a.target))return;let s="";if(e.current.getSelectedRows().size>0)s=e.current.getDataAsCsv({includeHeaders:!1,delimiter:o,shouldAppendQuotes:!1,escapeFormulas:!1});else{const c=ts(e);if(c){const u=e.current.getCellParams(c.id,c.field);s=fpe(u,{csvOptions:{delimiter:o,shouldAppendQuotes:!1,escapeFormulas:!1},ignoreValueFormatter:r})}}s=e.current.unstable_applyPipeProcessors("clipboardCopy",s),s&&(D2t(s),e.current.publishEvent("clipboardCopy",s))},[e,r,o]);$fe(e,e.current.rootElementRef,"keydown",i),yr(e,"clipboardCopy",t.onClipboardCopy)},L2t=e=>W({},e,{columnMenu:{open:!1}}),F2t=e=>{const t=Wo(e,"useGridColumnMenu"),n=v.useCallback(a=>{const s=ST(e.current.state),l={open:!0,field:a};(l.open!==s.open||l.field!==s.field)&&(e.current.setState(u=>u.columnMenu.open&&u.columnMenu.field===a?u:(t.debug("Opening Column Menu"),W({},u,{columnMenu:{open:!0,field:a}}))),e.current.hidePreferences(),e.current.forceUpdate())},[e,t]),r=v.useCallback(()=>{const a=ST(e.current.state);if(a.field){const c=Bd(e),u=vl(e),d=hd(e);let f=a.field;if(c[f]||(f=d[0]),u[f]===!1){const p=d.filter(m=>m===f?!0:u[m]!==!1),h=p.indexOf(f);f=p[h+1]||p[h-1]}e.current.setColumnHeaderFocus(f)}const s={open:!1,field:void 0};(s.open!==a.open||s.field!==a.field)&&(e.current.setState(c=>(t.debug("Hiding Column Menu"),W({},c,{columnMenu:s}))),e.current.forceUpdate())},[e,t]),o=v.useCallback(a=>{t.debug("Toggle Column Menu");const s=ST(e.current.state);!s.open||s.field!==a?n(a):r()},[e,t,n,r]);ln(e,{showColumnMenu:n,hideColumnMenu:r,toggleColumnMenu:o},"public"),xt(e,"columnResizeStart",r),xt(e,"virtualScrollerWheel",e.current.hideColumnMenu),xt(e,"virtualScrollerTouchMove",e.current.hideColumnMenu)},j2t=(e,t,n)=>{var o,i,a;const r=ny({apiRef:n,columnsToUpsert:t.columns,initialState:(o=t.initialState)==null?void 0:o.columns,columnVisibilityModel:t.columnVisibilityModel??((a=(i=t.initialState)==null?void 0:i.columns)==null?void 0:a.columnVisibilityModel)??{},keepOnlyColumnsToUpsert:!0});return W({},e,{columns:r,pinnedColumns:e.pinnedColumns??KF})};function B2t(e,t){var O,$;const n=Wo(e,"useGridColumns"),r=v.useRef(t.columns);e.current.registerControlState({stateId:"visibleColumns",propModel:t.columnVisibilityModel,propOnChange:t.onColumnVisibilityModelChange,stateSelector:vl,changeEvent:"columnVisibilityModelChange"});const o=v.useCallback(N=>{var L,j;n.debug("Updating columns state."),e.current.setState(YQ(N)),e.current.publishEvent("columnsChange",N.orderedFields),(j=(L=e.current).updateRenderContext)==null||j.call(L),e.current.forceUpdate()},[n,e]),i=v.useCallback(N=>Bd(e)[N],[e]),a=v.useCallback(()=>Pc(e),[e]),s=v.useCallback(()=>Oo(e),[e]),l=v.useCallback((N,L=!0)=>(L?Oo(e):Pc(e)).findIndex(D=>D.field===N),[e]),c=v.useCallback(N=>{const L=l(N);return Hp(e)[L]},[e,l]),u=v.useCallback(N=>{var j,D;vl(e)!==N&&(e.current.setState(_=>W({},_,{columns:ny({apiRef:e,columnsToUpsert:[],initialState:void 0,columnVisibilityModel:N,keepOnlyColumnsToUpsert:!1})})),(D=(j=e.current).updateRenderContext)==null||D.call(j),e.current.forceUpdate())},[e]),d=v.useCallback(N=>{const L=ny({apiRef:e,columnsToUpsert:N,initialState:void 0,keepOnlyColumnsToUpsert:!1});o(L)},[e,o]),f=v.useCallback((N,L)=>{const j=vl(e),D=j[N]??!0;if(L!==D){const _=W({},j,{[N]:L});e.current.setColumnVisibilityModel(_)}},[e]),p=v.useCallback(N=>hd(e).findIndex(j=>j===N),[e]),h=v.useCallback((N,L)=>{const j=hd(e),D=p(N);if(D===L)return;n.debug(`Moving column ${N} to index ${L}`);const _=[...j],z=_.splice(D,1)[0];_.splice(L,0,z),o(W({},pu(e.current.state),{orderedFields:_}));const F={column:e.current.getColumn(N),targetIndex:e.current.getColumnIndexRelativeToVisibleColumns(N),oldIndex:D};e.current.publishEvent("columnIndexChange",F)},[e,n,o,p]),m=v.useCallback((N,L)=>{n.debug(`Updating column ${N} width to ${L}`);const j=pu(e.current.state),D=j.lookup[N],_=W({},D,{width:L,hasBeenResized:!0});o(QF(W({},j,{lookup:W({},j.lookup,{[N]:_})}),e.current.getRootDimensions())),e.current.publishEvent("columnWidthChange",{element:e.current.getColumnHeaderElement(N),colDef:_,width:L})},[e,n,o]),y={getColumn:i,getAllColumns:a,getColumnIndex:l,getColumnPosition:c,getVisibleColumns:s,getColumnIndexRelativeToVisibleColumns:p,updateColumns:d,setColumnVisibilityModel:u,setColumnVisibility:f,setColumnWidth:m},w={setColumnIndex:h};ln(e,y,"public"),ln(e,w,t.signature===Tl.DataGrid?"private":"public");const x=v.useCallback((N,L)=>{var V,U;const j={},D=vl(e);(!L.exportOnlyDirtyModels||t.columnVisibilityModel!=null||Object.keys(((U=(V=t.initialState)==null?void 0:V.columns)==null?void 0:U.columnVisibilityModel)??{}).length>0||Object.keys(D).length>0)&&(j.columnVisibilityModel=D),j.orderedFields=hd(e);const z=Pc(e),F={};return z.forEach(K=>{if(K.hasBeenResized){const X={};Ufe.forEach(ie=>{let ee=K[ie];ee===1/0&&(ee=-1),X[ie]=ee}),F[K.field]=X}}),Object.keys(F).length>0&&(j.dimensions=F),W({},N,{columns:j})},[e,t.columnVisibilityModel,(O=t.initialState)==null?void 0:O.columns]),S=v.useCallback((N,L)=>{var z;const j=(z=L.stateToRestore.columns)==null?void 0:z.columnVisibilityModel,D=L.stateToRestore.columns;if(j==null&&D==null)return N;const _=ny({apiRef:e,columnsToUpsert:[],initialState:D,columnVisibilityModel:j,keepOnlyColumnsToUpsert:!1});return e.current.setState(YQ(_)),D!=null&&e.current.publishEvent("columnsChange",_.orderedFields),N},[e]),E=v.useCallback((N,L)=>{var j;if(L===Ag.columns){const D=t.slots.columnsPanel;return R.jsx(D,W({},(j=t.slotProps)==null?void 0:j.columnsPanel))}return N},[t.slots.columnsPanel,($=t.slotProps)==null?void 0:$.columnsPanel]),P=v.useCallback(N=>t.disableColumnSelector?N:[...N,"columnMenuColumnsItem"],[t.disableColumnSelector]);zr(e,"columnMenu",P),zr(e,"exportState",x),zr(e,"restoreState",S),zr(e,"preferencePanel",E);const T=v.useRef(null);xt(e,"viewportInnerSizeChange",N=>{T.current!==N.width&&(T.current=N.width,o(QF(pu(e.current.state),e.current.getRootDimensions())))});const A=v.useCallback(()=>{n.info("Columns pipe processing have changed, regenerating the columns");const N=ny({apiRef:e,columnsToUpsert:[],initialState:void 0,keepOnlyColumnsToUpsert:!1});o(N)},[e,n,o]);fH(e,"hydrateColumns",A);const k=v.useRef(!0);v.useEffect(()=>{if(k.current){k.current=!1;return}if(n.info(`GridColumns have changed, new length ${t.columns.length}`),r.current===t.columns)return;const N=ny({apiRef:e,initialState:void 0,columnsToUpsert:t.columns,keepOnlyColumnsToUpsert:!0});r.current=t.columns,o(N)},[n,e,o,t.columns]),v.useEffect(()=>{t.columnVisibilityModel!==void 0&&e.current.setColumnVisibilityModel(t.columnVisibilityModel)},[e,n,t.columnVisibilityModel])}function YQ(e){return t=>W({},t,{columns:e})}const z2t=(e,t)=>{var n;return W({},e,{density:((n=t.initialState)==null?void 0:n.density)??t.density??"standard"})},V2t=(e,t)=>{var s;const n=Wo(e,"useDensity");e.current.registerControlState({stateId:"density",propModel:t.density,propOnChange:t.onDensityChange,stateSelector:Oy,changeEvent:"densityChange"});const o={setDensity:Ar(l=>{Oy(e.current.state)!==l&&(n.debug(`Set grid density to ${l}`),e.current.setState(u=>W({},u,{density:l})))})};ln(e,o,"public");const i=v.useCallback((l,c)=>{var f;const u=Oy(e.current.state);return!c.exportOnlyDirtyModels||t.density!=null||((f=t.initialState)==null?void 0:f.density)!=null?W({},l,{density:u}):l},[e,t.density,(s=t.initialState)==null?void 0:s.density]),a=v.useCallback((l,c)=>{var d;const u=(d=c.stateToRestore)!=null&&d.density?c.stateToRestore.density:Oy(e.current.state);return e.current.setState(f=>W({},f,{density:u})),l},[e]);zr(e,"exportState",i),zr(e,"restoreState",a),v.useEffect(()=>{t.density&&e.current.setDensity(t.density)},[e,t.density])};function H2t(e,t="csv",n=document.title||"untitled"){const r=`${n}.${t}`;if("download"in HTMLAnchorElement.prototype){const o=URL.createObjectURL(e),i=document.createElement("a");i.href=o,i.download=r,i.click(),setTimeout(()=>{URL.revokeObjectURL(o)});return}throw new Error("MUI X: exportAs not supported.")}const ppe=({apiRef:e,options:t})=>{const n=Pc(e);return t.fields?t.fields.reduce((o,i)=>{const a=n.find(s=>s.field===i);return a&&o.push(a),o},[]):(t.allColumns?n:Oo(e)).filter(o=>!o.disableExport)},hpe=({apiRef:e})=>{var l,c;const t=Afe(e),n=Di(e),r=e.current.getSelectedRows(),o=t.filter(u=>n[u].type!=="footer"),i=em(e),a=((l=i==null?void 0:i.top)==null?void 0:l.map(u=>u.id))||[],s=((c=i==null?void 0:i.bottom)==null?void 0:c.map(u=>u.id))||[];return o.unshift(...a),o.push(...s),r.size>0?o.filter(u=>r.has(u)):o},U2t=(e,t)=>{const n=Wo(e,"useGridCsvExport"),r=t.ignoreValueFormatterDuringExport,o=(typeof r=="object"?r==null?void 0:r.csvExport:r)||!1,i=v.useCallback((c={})=>{n.debug("Get data as CSV");const u=ppe({apiRef:e,options:c}),f=(c.getRowsToExport??hpe)({apiRef:e});return $2t({columns:u,rowIds:f,csvOptions:{delimiter:c.delimiter||",",shouldAppendQuotes:c.shouldAppendQuotes??!0,includeHeaders:c.includeHeaders??!0,includeColumnGroupsHeaders:c.includeColumnGroupsHeaders??!0,escapeFormulas:c.escapeFormulas??!0},ignoreValueFormatter:o,apiRef:e})},[n,e,o]),a=v.useCallback(c=>{n.debug("Export data as CSV");const u=i(c),d=new Blob([c!=null&&c.utf8WithBom?new Uint8Array([239,187,191]):"",u],{type:"text/csv"});H2t(d,"csv",c==null?void 0:c.fileName)},[n,i]);ln(e,{getDataAsCsv:i,exportDataAsCsv:a},"public");const l=v.useCallback((c,u)=>{var d;return(d=u.csvOptions)!=null&&d.disableToolbarButton?c:[...c,{component:R.jsx(F_t,{options:u.csvOptions}),componentName:"csvExport"}]},[]);zr(e,"exportMenu",l)},ET=(e,t,n)=>{let r=e.paginationModel;const o=e.rowCount,i=(n==null?void 0:n.pageSize)??r.pageSize,a=(n==null?void 0:n.page)??r.page,s=Dfe(o,i,a);n&&((n==null?void 0:n.page)!==r.page||(n==null?void 0:n.pageSize)!==r.pageSize)&&(r=n);const l=eMt(r.page,s);return l!==r.page&&(r=W({},r,{page:l})),Nfe(r.pageSize,t),r},W2t=(e,t)=>{var h,m;const n=Wo(e,"useGridPaginationModel"),r=Ye(e,A1),o=Math.floor(t.rowHeight*r);e.current.registerControlState({stateId:"paginationModel",propModel:t.paginationModel,propOnChange:t.onPaginationModelChange,stateSelector:Ji,changeEvent:"paginationModelChange"});const i=v.useCallback(y=>{const w=Ji(e);y!==w.page&&(n.debug(`Setting page to ${y}`),e.current.setPaginationModel({page:y,pageSize:w.pageSize}))},[e,n]),a=v.useCallback(y=>{const w=Ji(e);y!==w.pageSize&&(n.debug(`Setting page size to ${y}`),e.current.setPaginationModel({pageSize:y,page:w.page}))},[e,n]),s=v.useCallback(y=>{const w=Ji(e);y!==w&&(n.debug("Setting 'paginationModel' to",y),e.current.setState(x=>W({},x,{pagination:W({},x.pagination,{paginationModel:ET(x.pagination,t.signature,y)})})))},[e,n,t.signature]);ln(e,{setPage:i,setPageSize:a,setPaginationModel:s},"public");const c=v.useCallback((y,w)=>{var E,P;const x=Ji(e);return!w.exportOnlyDirtyModels||t.paginationModel!=null||((P=(E=t.initialState)==null?void 0:E.pagination)==null?void 0:P.paginationModel)!=null||x.page!==0&&x.pageSize!==Zkt(t.autoPageSize)?W({},y,{pagination:W({},y.pagination,{paginationModel:x})}):y},[e,t.paginationModel,(m=(h=t.initialState)==null?void 0:h.pagination)==null?void 0:m.paginationModel,t.autoPageSize]),u=v.useCallback((y,w)=>{var S,E;const x=(S=w.stateToRestore.pagination)!=null&&S.paginationModel?W({},_fe(t.autoPageSize),(E=w.stateToRestore.pagination)==null?void 0:E.paginationModel):Ji(e);return e.current.setState(P=>W({},P,{pagination:W({},P.pagination,{paginationModel:ET(P.pagination,t.signature,x)})})),y},[e,t.autoPageSize,t.signature]);zr(e,"exportState",c),zr(e,"restoreState",u);const d=()=>{var w;const y=Ji(e);(w=e.current.virtualScrollerRef)!=null&&w.current&&e.current.scrollToIndexes({rowIndex:y.page*y.pageSize})},f=v.useCallback(()=>{if(!t.autoPageSize)return;const y=e.current.getRootDimensions(),w=Math.floor(y.viewportInnerSize.height/o);e.current.setPageSize(w)},[e,t.autoPageSize,o]),p=v.useCallback(y=>{if(y==null)return;const w=Ji(e),x=Lfe(e);w.page>x-1&&e.current.setPage(Math.max(0,x-1))},[e]);xt(e,"viewportInnerSizeChange",f),xt(e,"paginationModelChange",d),xt(e,"rowCountChange",p),v.useEffect(()=>{e.current.setState(y=>W({},y,{pagination:W({},y.pagination,{paginationModel:ET(y.pagination,t.signature,t.paginationModel)})}))},[e,t.paginationModel,t.paginationMode,t.signature]),v.useEffect(f,[f])};function G2t(){return new Promise(e=>{requestAnimationFrame(()=>{e()})})}function q2t(e){const t=document.createElement("iframe");return t.style.position="absolute",t.style.width="0px",t.style.height="0px",t.title=e||document.title,t}const K2t=(e,t)=>{const n=e.current.rootElementRef.current!==null,r=Wo(e,"useGridPrintExport"),o=v.useRef(null),i=v.useRef(null),a=v.useRef({}),s=v.useRef([]),l=v.useRef();v.useEffect(()=>{o.current=ep(e.current.rootElementRef.current)},[e,n]);const c=v.useCallback((y,w,x)=>new Promise(S=>{const E=ppe({apiRef:e,options:{fields:y,allColumns:w}}).map(I=>I.field),P=Pc(e),T={};P.forEach(I=>{T[I.field]=E.includes(I.field)}),x&&(T[x0.field]=!0),e.current.setColumnVisibilityModel(T),S()}),[e]),u=v.useCallback(y=>{const x=y({apiRef:e}).reduce((S,E)=>{const P=e.current.getRow(E);return P[Zy]||S.push(P),S},[]);e.current.setRows(x)},[e]),d=v.useCallback((y,w)=>{var j,D,_,z;const x=W({copyStyles:!0,hideToolbar:!1,hideFooter:!1,includeCheckboxes:!1},w),S=y.contentDocument;if(!S)return;const E=S0(e.current.state),P=e.current.rootElementRef.current,T=P.cloneNode(!0),I=T.querySelector(`.${le.main}`);I.style.overflow="visible",T.style.contain="size";let A=((j=P.querySelector(`.${le.toolbarContainer}`))==null?void 0:j.offsetHeight)||0,k=((D=P.querySelector(`.${le.footerContainer}`))==null?void 0:D.offsetHeight)||0;x.hideToolbar&&((_=T.querySelector(`.${le.toolbarContainer}`))==null||_.remove(),A=0),x.hideFooter&&((z=T.querySelector(`.${le.footerContainer}`))==null||z.remove(),k=0);const O=E.currentPageTotalHeight+oH(e,t)+A+k;if(T.style.height=`${O}px`,T.style.boxSizing="content-box",!x.hideFooter){const F=T.querySelector(`.${le.footerContainer}`);F.style.position="absolute",F.style.width="100%",F.style.top=`${O-k}px`}const $=document.createElement("div");$.appendChild(T),S.body.style.marginTop="0px",S.body.innerHTML=$.innerHTML;const N=typeof x.pageStyle=="function"?x.pageStyle():x.pageStyle;if(typeof N=="string"){const F=S.createElement("style");F.appendChild(S.createTextNode(N)),S.head.appendChild(F)}x.bodyClassName&&S.body.classList.add(...x.bodyClassName.split(" "));const L=[];if(x.copyStyles){const F=P.getRootNode(),U=(F.constructor.name==="ShadowRoot"?F:o.current).querySelectorAll("style, link[rel='stylesheet']");for(let K=0;K{ie.addEventListener("load",()=>ee())})),S.head.appendChild(ie)}}}Promise.all(L).then(()=>{y.contentWindow.print()})},[e,o,t]),f=v.useCallback(y=>{var w,x;o.current.body.removeChild(y),e.current.restoreState(i.current||{}),(x=(w=i.current)==null?void 0:w.columns)!=null&&x.columnVisibilityModel||e.current.setColumnVisibilityModel(a.current),e.current.setState(S=>W({},S,{virtualization:l.current})),e.current.setRows(s.current),i.current=null,a.current={},s.current=[]},[e]),h={exportDataAsPrint:v.useCallback(async y=>{if(r.debug("Export data as Print"),!e.current.rootElementRef.current)throw new Error("MUI X: No grid root element available.");if(i.current=e.current.exportState(),a.current=vl(e),s.current=e.current.getSortedRows().filter(x=>!x[Zy]),t.pagination){const S={page:0,pageSize:J5(e)};e.current.setState(E=>W({},E,{pagination:W({},E.pagination,{paginationModel:ET(E.pagination,"DataGridPro",S)})}))}l.current=e.current.state.virtualization,e.current.setState(x=>W({},x,{virtualization:W({},x.virtualization,{enabled:!1,enabledForColumns:!1})})),await c(y==null?void 0:y.fields,y==null?void 0:y.allColumns,y==null?void 0:y.includeCheckboxes),u((y==null?void 0:y.getRowsToExport)??hpe),await G2t();const w=q2t(y==null?void 0:y.fileName);w.onload=()=>{d(w,y),w.contentWindow.matchMedia("print").addEventListener("change",S=>{S.matches===!1&&f(w)})},o.current.body.appendChild(w)},[t,r,e,d,f,c,u])};ln(e,h,"public");const m=v.useCallback((y,w)=>{var x;return(x=w.printOptions)!=null&&x.disableToolbarButton?y:[...y,{component:R.jsx(j_t,{options:w.printOptions}),componentName:"printExport"}]},[]);zr(e,"exportMenu",m)},Y2t=(e,t,n)=>{var o,i;const r=t.filterModel??((i=(o=t.initialState)==null?void 0:o.filter)==null?void 0:i.filterModel)??oC();return W({},e,{filter:{filterModel:Y5(r,t.disableMultipleColumnsFiltering,n),filteredRowsLookup:{},filteredChildrenCountLookup:{},filteredDescendantCountLookup:{}},visibleRowsLookup:{}})},Q2t=e=>e.filteredRowsLookup;function QQ(e,t){return e.current.applyStrategyProcessor("visibleRowsLookupCreation",{tree:t.rows.tree,filteredRowsLookup:t.filter.filteredRowsLookup})}function X2t(){return afe(Object.values)}const J2t=(e,t)=>{var k,O,$;const n=Wo(e,"useGridFilter");e.current.registerControlState({stateId:"filter",propModel:t.filterModel,propOnChange:t.onFilterModelChange,stateSelector:pi,changeEvent:"filterModelChange"});const r=v.useCallback(()=>{e.current.setState(N=>{const L=pi(N,e.current.instanceId),j=e.current.getFilterState(L),D=W({},N,{filter:W({},N.filter,j)}),_=QQ(e,D);return W({},D,{visibleRowsLookup:_})}),e.current.publishEvent("filteredRowsSet")},[e]),o=v.useCallback((N,L)=>L==null||L.filterable===!1||t.disableColumnFilter?N:[...N,"columnMenuFilterItem"],[t.disableColumnFilter]),i=v.useCallback(()=>{r(),e.current.forceUpdate()},[e,r]),a=v.useCallback(N=>{const L=pi(e),j=[...L.items],D=j.findIndex(_=>_.id===N.id);D===-1?j.push(N):j[D]=N,e.current.setFilterModel(W({},L,{items:j}),"upsertFilterItem")},[e]),s=v.useCallback(N=>{const L=pi(e),j=[...L.items];N.forEach(D=>{const _=j.findIndex(z=>z.id===D.id);_===-1?j.push(D):j[_]=D}),e.current.setFilterModel(W({},L,{items:j}),"upsertFilterItems")},[e]),l=v.useCallback(N=>{const L=pi(e),j=L.items.filter(D=>D.id!==N.id);j.length!==L.items.length&&e.current.setFilterModel(W({},L,{items:j}),"deleteFilterItem")},[e]),c=v.useCallback((N,L,j)=>{if(n.debug("Displaying filter panel"),N){const D=pi(e),_=D.items.filter(U=>{var ee;if(U.value!==void 0)return!(Array.isArray(U.value)&&U.value.length===0);const X=(ee=e.current.getColumn(U.field).filterOperators)==null?void 0:ee.find(Q=>Q.value===U.operator);return!(typeof(X==null?void 0:X.requiresFilterValue)>"u"?!0:X==null?void 0:X.requiresFilterValue)});let z;const F=_.find(U=>U.field===N),V=e.current.getColumn(N);F?z=_:t.disableMultipleColumnsFiltering?z=[YF({field:N,operator:V.filterOperators[0].value},e)]:z=[..._,YF({field:N,operator:V.filterOperators[0].value},e)],e.current.setFilterModel(W({},D,{items:z}))}e.current.showPreferences(Ag.filters,L,j)},[e,n,t.disableMultipleColumnsFiltering]),u=v.useCallback(()=>{n.debug("Hiding filter panel"),e.current.hidePreferences()},[e,n]),d=v.useCallback(N=>{const L=pi(e);L.logicOperator!==N&&e.current.setFilterModel(W({},L,{logicOperator:N}),"changeLogicOperator")},[e]),f=v.useCallback(N=>{const L=pi(e);Jy(L.quickFilterValues,N)||e.current.setFilterModel(W({},L,{quickFilterValues:[...N]}))},[e]),p=v.useCallback((N,L)=>{pi(e)!==N&&(n.debug("Setting filter model"),e.current.updateControlState("filter",lQ(N,t.disableMultipleColumnsFiltering,e),L),e.current.unstable_applyFilters())},[e,n,t.disableMultipleColumnsFiltering]),h=v.useCallback(N=>{const L=Y5(N,t.disableMultipleColumnsFiltering,e),j=t.filterMode==="client"?YAt(L,e,t.disableEval):null,D=e.current.applyStrategyProcessor("filtering",{isRowMatchingFilters:j,filterModel:L??oC()});return W({},D,{filterModel:L})},[t.disableMultipleColumnsFiltering,t.filterMode,t.disableEval,e]),m={setFilterLogicOperator:d,unstable_applyFilters:i,deleteFilterItem:l,upsertFilterItem:a,upsertFilterItems:s,setFilterModel:p,showFilterPanel:c,hideFilterPanel:u,setQuickFilterValues:f,ignoreDiacritics:t.ignoreDiacritics,getFilterState:h};ln(e,m,"public");const y=v.useCallback((N,L)=>{var _,z;const j=pi(e);return!L.exportOnlyDirtyModels||t.filterModel!=null||((z=(_=t.initialState)==null?void 0:_.filter)==null?void 0:z.filterModel)!=null||!Jy(j,oC())?W({},N,{filter:{filterModel:j}}):N},[e,t.filterModel,(O=(k=t.initialState)==null?void 0:k.filter)==null?void 0:O.filterModel]),w=v.useCallback((N,L)=>{var D;const j=(D=L.stateToRestore.filter)==null?void 0:D.filterModel;return j==null?N:(e.current.updateControlState("filter",lQ(j,t.disableMultipleColumnsFiltering,e),"restoreState"),W({},N,{callbacks:[...N.callbacks,e.current.unstable_applyFilters]}))},[e,t.disableMultipleColumnsFiltering]),x=v.useCallback((N,L)=>{var j;if(L===Ag.filters){const D=t.slots.filterPanel;return R.jsx(D,W({},(j=t.slotProps)==null?void 0:j.filterPanel))}return N},[t.slots.filterPanel,($=t.slotProps)==null?void 0:$.filterPanel]),{getRowId:S}=t,E=ku(X2t),P=v.useCallback(N=>{if(t.filterMode!=="client"||!N.isRowMatchingFilters)return{filteredRowsLookup:{},filteredChildrenCountLookup:{},filteredDescendantCountLookup:{}};const L=jf(e),j={},{isRowMatchingFilters:D}=N,_={},z={passingFilterItems:null,passingQuickFilterValues:null},F=E.current(e.current.state.rows.dataRowIdToModelLookup);for(let K=0;K{n.debug("onColUpdated - GridColumns changed, applying filters");const N=pi(e),L=Bd(e),j=N.items.filter(D=>D.field&&L[D.field]);j.length{N==="filtering"&&e.current.unstable_applyFilters()},[e]),A=v.useCallback(()=>{e.current.setState(N=>W({},N,{visibleRowsLookup:QQ(e,N)})),e.current.forceUpdate()},[e]);xt(e,"rowsSet",r),xt(e,"columnsChange",T),xt(e,"activeStrategyProcessorChange",I),xt(e,"rowExpansionChange",A),xt(e,"columnVisibilityModelChange",()=>{const N=pi(e);N.quickFilterValues&&bfe(N)&&e.current.unstable_applyFilters()}),R1(()=>{e.current.unstable_applyFilters()}),Ho(()=>{t.filterModel!==void 0&&e.current.setFilterModel(t.filterModel)},[e,n,t.filterModel])},Z2t=e=>W({},e,{focus:{cell:null,columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null},tabIndex:{cell:null,columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null}}),eNt=(e,t)=>{const n=Wo(e,"useGridFocus"),r=v.useRef(null),o=e.current.rootElementRef.current!==null,i=v.useCallback((A,k)=>{A&&e.current.getRow(A.id)&&e.current.publishEvent("cellFocusOut",e.current.getCellParams(A.id,A.field),k)},[e]),a=v.useCallback((A,k)=>{const O=ts(e);(O==null?void 0:O.id)===A&&(O==null?void 0:O.field)===k||(e.current.setState($=>(n.debug(`Focusing on cell with id=${A} and field=${k}`),W({},$,{tabIndex:{cell:{id:A,field:k},columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null},focus:{cell:{id:A,field:k},columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null}}))),e.current.forceUpdate(),e.current.getRow(A)&&(O&&i(O,{}),e.current.publishEvent("cellFocusIn",e.current.getCellParams(A,k))))},[e,n,i]),s=v.useCallback((A,k={})=>{const O=ts(e);i(O,k),e.current.setState($=>(n.debug(`Focusing on column header with colIndex=${A}`),W({},$,{tabIndex:{columnHeader:{field:A},columnHeaderFilter:null,cell:null,columnGroupHeader:null},focus:{columnHeader:{field:A},columnHeaderFilter:null,cell:null,columnGroupHeader:null}}))),e.current.forceUpdate()},[e,n,i]),l=v.useCallback((A,k={})=>{const O=ts(e);i(O,k),e.current.setState($=>(n.debug(`Focusing on column header filter with colIndex=${A}`),W({},$,{tabIndex:{columnHeader:null,columnHeaderFilter:{field:A},cell:null,columnGroupHeader:null},focus:{columnHeader:null,columnHeaderFilter:{field:A},cell:null,columnGroupHeader:null}}))),e.current.forceUpdate()},[e,n,i]),c=v.useCallback((A,k,O={})=>{const $=ts(e);$&&e.current.publishEvent("cellFocusOut",e.current.getCellParams($.id,$.field),O),e.current.setState(N=>W({},N,{tabIndex:{columnGroupHeader:{field:A,depth:k},columnHeader:null,columnHeaderFilter:null,cell:null},focus:{columnGroupHeader:{field:A,depth:k},columnHeader:null,columnHeaderFilter:null,cell:null}})),e.current.forceUpdate()},[e]),u=v.useCallback(()=>HO(e),[e]),d=v.useCallback((A,k,O)=>{let $=e.current.getColumnIndex(k);const N=Oo(e),L=tv(e,{pagination:t.pagination,paginationMode:t.paginationMode}),j=em(e),D=[].concat(j.top||[],L.rows,j.bottom||[]);let _=D.findIndex(U=>U.id===A);O==="right"?$+=1:O==="left"?$-=1:_+=1,$>=N.length?(_+=1,_=0&&($=N.length-1)),_=hu(_,0,D.length-1);const z=D[_];if(!z)return;const F=e.current.unstable_getCellColSpanInfo(z.id,$);F&&F.spannedByColSpan&&(O==="left"||O==="below"?$=F.leftVisibleCellIndex:O==="right"&&($=F.rightVisibleCellIndex)),$=hu($,0,N.length-1);const V=N[$];e.current.setCellFocus(z.id,V.field)},[e,t.pagination,t.paginationMode]),f=v.useCallback(({id:A,field:k})=>{e.current.setCellFocus(A,k)},[e]),p=v.useCallback((A,k)=>{k.key==="Enter"||k.key==="Tab"||k.key==="Shift"||GO(k.key)||e.current.setCellFocus(A.id,A.field)},[e]),h=v.useCallback(({field:A},k)=>{k.target===k.currentTarget&&e.current.setColumnHeaderFocus(A,k)},[e]),m=v.useCallback(({fields:A,depth:k},O)=>{if(O.target!==O.currentTarget)return;const $=HO(e);$!==null&&$.depth===k&&A.includes($.field)||e.current.setColumnGroupHeaderFocus(A[0],k,O)},[e]),y=v.useCallback((A,k)=>{var O,$;($=(O=k.relatedTarget)==null?void 0:O.getAttribute("class"))!=null&&$.includes(le.columnHeader)||(n.debug("Clearing focus"),e.current.setState(N=>W({},N,{focus:{cell:null,columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null}})))},[n,e]),w=v.useCallback(A=>{r.current=A},[]),x=v.useCallback(A=>{const k=r.current;r.current=null;const O=ts(e);if(!e.current.unstable_applyPipeProcessors("canUpdateFocus",!0,{event:A,cell:k}))return;if(!O){k&&e.current.setCellFocus(k.id,k.field);return}if((k==null?void 0:k.id)===O.id&&(k==null?void 0:k.field)===O.field)return;const N=e.current.getCellElement(O.id,O.field);N!=null&&N.contains(A.target)||(k?e.current.setCellFocus(k.id,k.field):(e.current.setState(L=>W({},L,{focus:{cell:null,columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null}})),e.current.forceUpdate(),i(O,A)))},[e,i]),S=v.useCallback(A=>{if(A.cellMode==="view")return;const k=ts(e);((k==null?void 0:k.id)!==A.id||(k==null?void 0:k.field)!==A.field)&&e.current.setCellFocus(A.id,A.field)},[e]),E=v.useCallback(()=>{var k;const A=ts(e);if(A&&!e.current.getRow(A.id)){const O=(k=ts(e))==null?void 0:k.id;let $=null;if(typeof O<"u"){const N=e.current.getRowIndexRelativeToVisibleRows(O),L=tv(e,{pagination:t.pagination,paginationMode:t.paginationMode}),j=L.rows[hu(N,0,L.rows.length-1)];$=(j==null?void 0:j.id)??null}e.current.setState(N=>W({},N,{focus:{cell:$===null?null:{id:$,field:A.field},columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null}}))}},[e,t.pagination,t.paginationMode]),P=Ar(()=>{const A=ts(e);if(!A)return;const k=tv(e,{pagination:t.pagination,paginationMode:t.paginationMode});if(k.rows.find(N=>N.id===A.id))return;const $=Oo(e);e.current.setState(N=>W({},N,{tabIndex:{cell:{id:k.rows[0].id,field:$[0].field},columnGroupHeader:null,columnHeader:null,columnHeaderFilter:null}}))}),T={setCellFocus:a,setColumnHeaderFocus:s,setColumnHeaderFilterFocus:l},I={moveFocusToRelativeCell:d,setColumnGroupHeaderFocus:c,getColumnGroupHeaderFocus:u};ln(e,T,"public"),ln(e,I,"private"),v.useEffect(()=>{const A=ep(e.current.rootElementRef.current);return A.addEventListener("mouseup",x),()=>{A.removeEventListener("mouseup",x)}},[e,o,x]),xt(e,"columnHeaderBlur",y),xt(e,"cellDoubleClick",f),xt(e,"cellMouseDown",w),xt(e,"cellKeyDown",p),xt(e,"cellModeChange",S),xt(e,"columnHeaderFocus",h),xt(e,"columnGroupHeaderFocus",m),xt(e,"rowsSet",E),xt(e,"paginationModelChange",P)},tNt=e=>{const t=e.match(/^__row_group_by_columns_group_(.*)__$/);return t?t[1]:null},nNt=e=>e===Pfe||tNt(e)!==null;function rNt(e,t){const n=em(e)||{};return[...n.top||[],...t,...n.bottom||[]]}const I_=({currentColIndex:e,firstColIndex:t,lastColIndex:n,isRtl:r})=>{if(r){if(et)return e-1;return null},O_=({currentColIndex:e,firstColIndex:t,lastColIndex:n,isRtl:r})=>{if(r){if(e>t)return e-1}else if(!r&&e=0&&a{const n=Wo(e,"useGridKeyboardNavigation"),r=Wp(e,t).rows,o=dr(),i=t.unstable_listView,a=v.useMemo(()=>rNt(e,r),[e,r]),s=t.signature!=="DataGrid"&&t.headerFilters,l=v.useCallback((x,S,E="left",P="up")=>{const T=Up(e),I=e.current.unstable_getCellColSpanInfo(S,x);I&&I.spannedByColSpan&&(E==="left"?x=I.leftVisibleCellIndex:E==="right"&&(x=I.rightVisibleCellIndex));const A=i?hb(e.current.state).field:v0(e)[x],k=oNt(e,S,A,P),O=T.findIndex($=>$.id===k);n.debug(`Navigating to cell row ${O}, col ${x}`),e.current.scrollToIndexes({colIndex:x,rowIndex:O}),e.current.setCellFocus(k,A)},[e,n,i]),c=v.useCallback((x,S)=>{n.debug(`Navigating to header col ${x}`),e.current.scrollToIndexes({colIndex:x});const E=e.current.getVisibleColumns()[x].field;e.current.setColumnHeaderFocus(E,S)},[e,n]),u=v.useCallback((x,S)=>{n.debug(`Navigating to header filter col ${x}`),e.current.scrollToIndexes({colIndex:x});const E=e.current.getVisibleColumns()[x].field;e.current.setColumnHeaderFilterFocus(E,S)},[e,n]),d=v.useCallback((x,S,E)=>{n.debug(`Navigating to header col ${x}`),e.current.scrollToIndexes({colIndex:x});const{field:P}=e.current.getVisibleColumns()[x];e.current.setColumnGroupHeaderFocus(P,S,E)},[e,n]),f=v.useCallback(x=>{var S;return(S=a[x])==null?void 0:S.id},[a]),p=v.useCallback((x,S)=>{const E=S.currentTarget.querySelector(`.${le.columnHeaderTitleContainerContent}`);if(!!E&&E.contains(S.target)&&x.field!==x0.field)return;const T=e.current.getViewportPageSize(),I=x.field?e.current.getColumnIndex(x.field):0,A=a.length>0?0:null,k=a.length-1,O=0,$=Oo(e).length-1,N=$1(e);let L=!0;switch(S.key){case"ArrowDown":{A!==null&&(s?u(I,S):l(I,f(A)));break}case"ArrowRight":{const j=O_({currentColIndex:I,firstColIndex:O,lastColIndex:$,isRtl:o});j!==null&&c(j,S);break}case"ArrowLeft":{const j=I_({currentColIndex:I,firstColIndex:O,lastColIndex:$,isRtl:o});j!==null&&c(j,S);break}case"ArrowUp":{N>0&&d(I,N-1,S);break}case"PageDown":{A!==null&&k!==null&&l(I,f(Math.min(A+T,k)));break}case"Home":{c(O,S);break}case"End":{c($,S);break}case"Enter":{(S.ctrlKey||S.metaKey)&&e.current.toggleColumnMenu(x.field);break}case" ":break;default:L=!1}L&&S.preventDefault()},[e,a.length,s,u,l,f,o,c,d]),h=v.useCallback((x,S)=>{const E=BMt(e)===x.field,P=zMt(e)===x.field;if(E||P||!GO(S.key))return;const T=e.current.getViewportPageSize(),I=x.field?e.current.getColumnIndex(x.field):0,A=0,k=a.length-1,O=0,$=Oo(e).length-1;let N=!0;switch(S.key){case"ArrowDown":{const L=f(A);L!=null&&l(I,L);break}case"ArrowRight":{const L=O_({currentColIndex:I,firstColIndex:O,lastColIndex:$,isRtl:o});L!==null&&u(L,S);break}case"ArrowLeft":{const L=I_({currentColIndex:I,firstColIndex:O,lastColIndex:$,isRtl:o});L!==null?u(L,S):e.current.setColumnHeaderFilterFocus(x.field,S);break}case"ArrowUp":{c(I,S);break}case"PageDown":{k!==null&&l(I,f(Math.min(A+T,k)));break}case"Home":{u(O,S);break}case"End":{u($,S);break}case" ":break;default:N=!1}N&&S.preventDefault()},[e,a.length,u,o,c,l,f]),m=v.useCallback((x,S)=>{const E=HO(e);if(E===null)return;const{field:P,depth:T}=E,{fields:I,depth:A,maxDepth:k}=x,O=e.current.getViewportPageSize(),$=e.current.getColumnIndex(P),N=P?e.current.getColumnIndex(P):0,L=0,j=a.length-1,D=0,_=Oo(e).length-1;let z=!0;switch(S.key){case"ArrowDown":{A===k-1?c($,S):d($,T+1,S);break}case"ArrowUp":{A>0&&d($,T-1,S);break}case"ArrowRight":{const F=I.length-I.indexOf(P)-1;$+F+1<=_&&d($+F+1,T,S);break}case"ArrowLeft":{const F=I.indexOf(P);$-F-1>=D&&d($-F-1,T,S);break}case"PageDown":{j!==null&&l(N,f(Math.min(L+O,j)));break}case"Home":{d(D,T,S);break}case"End":{d(_,T,S);break}case" ":break;default:z=!1}z&&S.preventDefault()},[e,a.length,c,d,l,f]),y=v.useCallback((x,S)=>{if(D1(S))return;const E=e.current.getCellParams(x.id,x.field);if(E.cellMode===ar.Edit||!GO(S.key)||!e.current.unstable_applyPipeProcessors("canUpdateFocus",!0,{event:S,cell:E})||a.length===0)return;const T=e.current.getViewportPageSize(),I=i?()=>0:e.current.getColumnIndex,A=x.field?I(x.field):0,k=a.findIndex(_=>_.id===x.id),O=0,$=a.length-1,N=0,j=(i?[hb(e.current.state)]:Oo(e)).length-1;let D=!0;switch(S.key){case"ArrowDown":{k<$&&l(A,f(k+1),o?"right":"left","down");break}case"ArrowUp":{k>O?l(A,f(k-1)):s?u(A,S):c(A,S);break}case"ArrowRight":{const _=O_({currentColIndex:A,firstColIndex:N,lastColIndex:j,isRtl:o});_!==null&&l(_,f(k),o?"left":"right");break}case"ArrowLeft":{const _=I_({currentColIndex:A,firstColIndex:N,lastColIndex:j,isRtl:o});_!==null&&l(_,f(k),o?"right":"left");break}case"Tab":{S.shiftKey&&A>N?l(A-1,f(k),"left"):!S.shiftKey&&A=O?l(A,f(_)):c(A,S);break}case"Home":{S.ctrlKey||S.metaKey||S.shiftKey?l(N,f(O)):l(N,f(k));break}case"End":{S.ctrlKey||S.metaKey||S.shiftKey?l(j,f($)):l(j,f(k));break}default:D=!1}D&&S.preventDefault()},[e,a,o,l,f,s,u,c,i]),w=v.useCallback((x,{event:S})=>S.key===" "?!1:x,[]);zr(e,"canStartEditing",w),xt(e,"columnHeaderKeyDown",p),xt(e,"headerFilterKeyDown",h),xt(e,"columnGroupHeaderKeyDown",m),xt(e,"cellKeyDown",y)},aNt=(e,t)=>{var h,m;const n=Wo(e,"useGridRowCount"),r=Ye(e,Z5),o=Ye(e,Ay),i=Ye(e,Zw),a=Ye(e,Ji),s=ku(()=>Ji(e).pageSize);e.current.registerControlState({stateId:"paginationRowCount",propModel:t.rowCount,propOnChange:t.onRowCountChange,stateSelector:Ay,changeEvent:"rowCountChange"});const c={setRowCount:v.useCallback(y=>{o!==y&&(n.debug("Setting 'rowCount' to",y),e.current.setState(w=>W({},w,{pagination:W({},w.pagination,{rowCount:y})})))},[e,n,o])};ln(e,c,"public");const u=v.useCallback((y,w)=>{var E,P;const x=Ay(e);return!w.exportOnlyDirtyModels||t.rowCount!=null||((P=(E=t.initialState)==null?void 0:E.pagination)==null?void 0:P.rowCount)!=null?W({},y,{pagination:W({},y.pagination,{rowCount:x})}):y},[e,t.rowCount,(m=(h=t.initialState)==null?void 0:h.pagination)==null?void 0:m.rowCount]),d=v.useCallback((y,w)=>{var S;const x=(S=w.stateToRestore.pagination)!=null&&S.rowCount?w.stateToRestore.pagination.rowCount:Ay(e);return e.current.setState(E=>W({},E,{pagination:W({},E.pagination,{rowCount:x})})),y},[e]);zr(e,"exportState",u),zr(e,"restoreState",d);const f=v.useCallback(y=>{t.paginationMode==="client"||!s.current||y.pageSize!==s.current&&(s.current=y.pageSize,o===-1&&e.current.setPage(0))},[t.paginationMode,s,o,e]);xt(e,"paginationModelChange",f),v.useEffect(()=>{t.paginationMode==="client"?e.current.setRowCount(r):t.rowCount!=null&&e.current.setRowCount(t.rowCount)},[e,t.paginationMode,r,t.rowCount]);const p=i.hasNextPage===!1;v.useEffect(()=>{p&&o===-1&&e.current.setRowCount(a.pageSize*a.page+r)},[e,r,p,o,a])},sNt=(e,t)=>{var l,c;const n=Wo(e,"useGridPaginationMeta"),r=Ye(e,Zw);e.current.registerControlState({stateId:"paginationMeta",propModel:t.paginationMeta,propOnChange:t.onPaginationMetaChange,stateSelector:Zw,changeEvent:"paginationMetaChange"});const i={setPaginationMeta:v.useCallback(u=>{r!==u&&(n.debug("Setting 'paginationMeta' to",u),e.current.setState(d=>W({},d,{pagination:W({},d.pagination,{meta:u})})))},[e,n,r])};ln(e,i,"public");const a=v.useCallback((u,d)=>{var h,m;const f=Zw(e);return!d.exportOnlyDirtyModels||t.paginationMeta!=null||((m=(h=t.initialState)==null?void 0:h.pagination)==null?void 0:m.meta)!=null?W({},u,{pagination:W({},u.pagination,{meta:f})}):u},[e,t.paginationMeta,(c=(l=t.initialState)==null?void 0:l.pagination)==null?void 0:c.meta]),s=v.useCallback((u,d)=>{var p;const f=(p=d.stateToRestore.pagination)!=null&&p.meta?d.stateToRestore.pagination.meta:Zw(e);return e.current.setState(h=>W({},h,{pagination:W({},h.pagination,{meta:f})})),u},[e]);zr(e,"exportState",a),zr(e,"restoreState",s),v.useEffect(()=>{t.paginationMeta&&e.current.setPaginationMeta(t.paginationMeta)},[e,t.paginationMeta])},lNt=(e,t)=>{var i,a,s,l,c,u;const n=W({},_fe(t.autoPageSize),t.paginationModel??((a=(i=t.initialState)==null?void 0:i.pagination)==null?void 0:a.paginationModel));Nfe(n.pageSize,t.signature);const r=t.rowCount??((l=(s=t.initialState)==null?void 0:s.pagination)==null?void 0:l.rowCount),o=t.paginationMeta??((u=(c=t.initialState)==null?void 0:c.pagination)==null?void 0:u.meta)??{};return W({},e,{pagination:{paginationModel:n,rowCount:r,meta:o}})},cNt=(e,t)=>{sNt(e,t),W2t(e,t),aNt(e,t)},uNt=(e,t)=>{var n;return W({},e,{preferencePanel:((n=t.initialState)==null?void 0:n.preferencePanel)??{open:!1}})},dNt=(e,t)=>{var d;const n=Wo(e,"useGridPreferencesPanel"),r=v.useRef(),o=v.useRef(),i=v.useCallback(()=>{n.debug("Hiding Preferences Panel");const f=aC(e.current.state);f.openedPanelValue&&e.current.publishEvent("preferencePanelClose",{openedPanelValue:f.openedPanelValue}),e.current.setState(p=>W({},p,{preferencePanel:{open:!1}})),e.current.forceUpdate()},[e,n]),a=v.useCallback(()=>{o.current=setTimeout(()=>clearTimeout(r.current),0)},[]),s=v.useCallback(()=>{r.current=setTimeout(i,100)},[i]),l=v.useCallback((f,p,h)=>{n.debug("Opening Preferences Panel"),a(),e.current.setState(m=>W({},m,{preferencePanel:W({},m.preferencePanel,{open:!0,openedPanelValue:f,panelId:p,labelId:h})})),e.current.publishEvent("preferencePanelOpen",{openedPanelValue:f}),e.current.forceUpdate()},[n,a,e]);ln(e,{showPreferences:l,hidePreferences:s},"public");const c=v.useCallback((f,p)=>{var y;const h=aC(e.current.state);return!p.exportOnlyDirtyModels||((y=t.initialState)==null?void 0:y.preferencePanel)!=null||h.open?W({},f,{preferencePanel:h}):f},[e,(d=t.initialState)==null?void 0:d.preferencePanel]),u=v.useCallback((f,p)=>{const h=p.stateToRestore.preferencePanel;return h!=null&&e.current.setState(m=>W({},m,{preferencePanel:h})),f},[e]);zr(e,"exportState",c),zr(e,"restoreState",u),v.useEffect(()=>()=>{clearTimeout(r.current),clearTimeout(o.current)},[])},tj=e=>{switch(e.type){case"boolean":return!1;case"date":case"dateTime":case"number":return;case"singleSelect":return null;case"string":default:return""}},fNt=["id","field"],pNt=["id","field"],hNt=(e,t)=>{const[n,r]=v.useState({}),o=v.useRef(n),i=v.useRef({}),{processRowUpdate:a,onProcessRowUpdateError:s,cellModesModel:l,onCellModesModelChange:c}=t,u=D=>(..._)=>{t.editMode===Su.Cell&&D(..._)},d=v.useCallback((D,_)=>{const z=e.current.getCellParams(D,_);if(!e.current.isCellEditable(z))throw new Error(`MUI X: The cell with id=${D} and field=${_} is not editable.`)},[e]),f=v.useCallback((D,_,z)=>{if(e.current.getCellMode(D,_)!==z)throw new Error(`MUI X: The cell with id=${D} and field=${_} is not in ${z} mode.`)},[e]),p=v.useCallback((D,_)=>{if(!D.isEditable||D.cellMode===ar.Edit)return;const z=W({},D,{reason:qu.cellDoubleClick});e.current.publishEvent("cellEditStart",z,_)},[e]),h=v.useCallback((D,_)=>{if(D.cellMode===ar.View||e.current.getCellMode(D.id,D.field)===ar.View)return;const z=W({},D,{reason:ic.cellFocusOut});e.current.publishEvent("cellEditStop",z,_)},[e]),m=v.useCallback((D,_)=>{if(D.cellMode===ar.Edit){if(_.which===229)return;let z;if(_.key==="Escape"?z=ic.escapeKeyDown:_.key==="Enter"?z=ic.enterKeyDown:_.key==="Tab"&&(z=_.shiftKey?ic.shiftTabKeyDown:ic.tabKeyDown,_.preventDefault()),z){const F=W({},D,{reason:z});e.current.publishEvent("cellEditStop",F,_)}}else if(D.isEditable){let z;if(!e.current.unstable_applyPipeProcessors("canStartEditing",!0,{event:_,cellParams:D,editMode:"cell"}))return;if(spe(_)?z=qu.printableKeyDown:lpe(_)?z=qu.pasteKeyDown:_.key==="Enter"?z=qu.enterKeyDown:(_.key==="Backspace"||_.key==="Delete")&&(z=qu.deleteKeyDown),z){const V=W({},D,{reason:z,key:_.key});e.current.publishEvent("cellEditStart",V,_)}}},[e]),y=v.useCallback(D=>{const{id:_,field:z,reason:F}=D,V={id:_,field:z};(F===qu.printableKeyDown||F===qu.deleteKeyDown||F===qu.pasteKeyDown)&&(V.deleteValue=!0),e.current.startCellEditMode(V)},[e]),w=v.useCallback(D=>{const{id:_,field:z,reason:F}=D;e.current.runPendingEditCellValueMutation(_,z);let V;F===ic.enterKeyDown?V="below":F===ic.tabKeyDown?V="right":F===ic.shiftTabKeyDown&&(V="left");const U=F==="escapeKeyDown";e.current.stopCellEditMode({id:_,field:z,ignoreModifications:U,cellToFocusAfter:V})},[e]),x=D=>async(..._)=>{var z;if(D){const{id:F,field:V}=_[0];((z=e.current.state.editRows[F][V])==null?void 0:z.error)||D(..._)}};xt(e,"cellDoubleClick",u(p)),xt(e,"cellFocusOut",u(h)),xt(e,"cellKeyDown",u(m)),xt(e,"cellEditStart",u(y)),xt(e,"cellEditStop",u(w)),yr(e,"cellEditStart",t.onCellEditStart),yr(e,"cellEditStop",x(t.onCellEditStop));const S=v.useCallback((D,_)=>{const z=Xo(e.current.state);return z[D]&&z[D][_]?ar.Edit:ar.View},[e]),E=Ar(D=>{const _=D!==t.cellModesModel;c&&_&&c(D,{api:e.current}),!(t.cellModesModel&&_)&&(r(D),o.current=D,e.current.publishEvent("cellModesModelChange",D))}),P=v.useCallback((D,_,z)=>{const F=W({},o.current);if(z!==null)F[D]=W({},F[D],{[_]:W({},z)});else{const V=F[D],U=Dt(V,[_].map(lC));F[D]=U,Object.keys(F[D]).length===0&&delete F[D]}E(F)},[E]),T=v.useCallback((D,_,z)=>{e.current.setState(F=>{const V=W({},F.editRows);return z!==null?V[D]=W({},V[D],{[_]:W({},z)}):(delete V[D][_],Object.keys(V[D]).length===0&&delete V[D]),W({},F,{editRows:V})}),e.current.forceUpdate()},[e]),I=v.useCallback(D=>{const{id:_,field:z}=D,F=Dt(D,fNt);d(_,z),f(_,z,ar.View),P(_,z,W({mode:ar.Edit},F))},[d,f,P]),A=Ar(async D=>{const{id:_,field:z,deleteValue:F,initialValue:V}=D,U=e.current.getCellValue(_,z);let K=U;F?K=tj(e.current.getColumn(z)):V&&(K=V);const X=e.current.getColumn(z),ie=!!X.preProcessEditCellProps&&F;let ee={value:K,error:!1,isProcessingProps:ie};if(T(_,z,ee),e.current.setCellFocus(_,z),ie&&(ee=await Promise.resolve(X.preProcessEditCellProps({id:_,row:e.current.getRow(_),props:ee,hasChanged:K!==U})),e.current.getCellMode(_,z)===ar.Edit)){const Q=Xo(e.current.state);T(_,z,W({},ee,{value:Q[_][z].value,isProcessingProps:!1}))}}),k=v.useCallback(D=>{const{id:_,field:z}=D,F=Dt(D,pNt);f(_,z,ar.Edit),P(_,z,W({mode:ar.View},F))},[f,P]),O=Ar(async D=>{const{id:_,field:z,ignoreModifications:F,cellToFocusAfter:V="none"}=D;f(_,z,ar.Edit),e.current.runPendingEditCellValueMutation(_,z);const U=()=>{T(_,z,null),P(_,z,null),V!=="none"&&e.current.moveFocusToRelativeCell(_,z,V)};if(F){U();return}const K=Xo(e.current.state),{error:X,isProcessingProps:ie}=K[_][z];if(X||ie){i.current[_][z].mode=ar.Edit,P(_,z,{mode:ar.Edit});return}const ee=e.current.getRowWithUpdatedValuesFromCellEditing(_,z);if(a){const Q=te=>{i.current[_][z].mode=ar.Edit,P(_,z,{mode:ar.Edit}),s&&s(te)};try{const te=e.current.getRow(_);Promise.resolve(a(ee,te,{rowId:_})).then(pe=>{e.current.updateRows([pe]),U()}).catch(Q)}catch(te){Q(te)}}else e.current.updateRows([ee]),U()}),$=v.useCallback(async D=>{var te,pe;const{id:_,field:z,value:F,debounceMs:V,unstable_skipValueParser:U}=D;d(_,z),f(_,z,ar.Edit);const K=e.current.getColumn(z),X=e.current.getRow(_);let ie=F;K.valueParser&&!U&&(ie=K.valueParser(F,X,K,e));let ee=Xo(e.current.state),Q=W({},ee[_][z],{value:ie,changeReason:V?"debouncedSetEditCellValue":"setEditCellValue"});if(K.preProcessEditCellProps){const ae=F!==ee[_][z].value;Q=W({},Q,{isProcessingProps:!0}),T(_,z,Q),Q=await Promise.resolve(K.preProcessEditCellProps({id:_,row:X,props:Q,hasChanged:ae}))}return e.current.getCellMode(_,z)===ar.View?!1:(ee=Xo(e.current.state),Q=W({},Q,{isProcessingProps:!1}),Q.value=K.preProcessEditCellProps?ee[_][z].value:ie,T(_,z,Q),ee=Xo(e.current.state),!((pe=(te=ee[_])==null?void 0:te[z])!=null&&pe.error))},[e,d,f,T]),N=v.useCallback((D,_)=>{const z=e.current.getColumn(_),F=Xo(e.current.state),V=e.current.getRow(D);if(!F[D]||!F[D][_])return e.current.getRow(D);const{value:U}=F[D][_];return z.valueSetter?z.valueSetter(U,V,z,e):W({},V,{[_]:U})},[e]),L={getCellMode:S,startCellEditMode:I,stopCellEditMode:k},j={setCellEditingEditCellValue:$,getRowWithUpdatedValuesFromCellEditing:N};ln(e,L,"public"),ln(e,j,"private"),v.useEffect(()=>{l&&E(l)},[l,E]),Ho(()=>{const D=VO(e),_=i.current;i.current=hfe(n),Object.entries(n).forEach(([z,F])=>{Object.entries(F).forEach(([V,U])=>{var ie,ee;const K=((ee=(ie=_[z])==null?void 0:ie[V])==null?void 0:ee.mode)||ar.View,X=D[z]??z;U.mode===ar.Edit&&K===ar.View?A(W({id:X,field:V},U)):U.mode===ar.View&&K===ar.Edit&&O(W({id:X,field:V},U))})})},[e,n,A,O])},gNt=["id"],mNt=["id"],yNt=(e,t)=>{const[n,r]=v.useState({}),o=v.useRef(n),i=v.useRef({}),a=v.useRef(),s=v.useRef(null),{processRowUpdate:l,onProcessRowUpdateError:c,rowModesModel:u,onRowModesModelChange:d}=t,f=V=>(...U)=>{t.editMode===Su.Row&&V(...U)},p=v.useCallback((V,U)=>{const K=e.current.getCellParams(V,U);if(!e.current.isCellEditable(K))throw new Error(`MUI X: The cell with id=${V} and field=${U} is not editable.`)},[e]),h=v.useCallback((V,U)=>{if(e.current.getRowMode(V)!==U)throw new Error(`MUI X: The row with id=${V} is not in ${U} mode.`)},[e]),m=v.useCallback(V=>{const U=Xo(e.current.state);return Object.values(U[V]).some(K=>K.error)},[e]),y=v.useCallback((V,U)=>{if(!V.isEditable||e.current.getRowMode(V.id)===qn.Edit)return;const K=e.current.getRowParams(V.id),X=W({},K,{field:V.field,reason:cf.cellDoubleClick});e.current.publishEvent("rowEditStart",X,U)},[e]),w=v.useCallback(V=>{s.current=V},[]),x=v.useCallback((V,U)=>{V.isEditable&&e.current.getRowMode(V.id)!==qn.View&&(s.current=null,a.current=setTimeout(()=>{var K;if(((K=s.current)==null?void 0:K.id)!==V.id){if(!e.current.getRow(V.id)||e.current.getRowMode(V.id)===qn.View||m(V.id))return;const X=e.current.getRowParams(V.id),ie=W({},X,{field:V.field,reason:rc.rowFocusOut});e.current.publishEvent("rowEditStop",ie,U)}}))},[e,m]);v.useEffect(()=>()=>{clearTimeout(a.current)},[]);const S=v.useCallback((V,U)=>{if(V.cellMode===qn.Edit){if(U.which===229)return;let K;if(U.key==="Escape")K=rc.escapeKeyDown;else if(U.key==="Enter")K=rc.enterKeyDown;else if(U.key==="Tab"){const X=v0(e).filter(ie=>e.current.getColumn(ie).type===UM?!0:e.current.isCellEditable(e.current.getCellParams(V.id,ie)));if(U.shiftKey?V.field===X[0]&&(K=rc.shiftTabKeyDown):V.field===X[X.length-1]&&(K=rc.tabKeyDown),U.preventDefault(),!K){const ie=X.findIndex(Q=>Q===V.field),ee=X[U.shiftKey?ie-1:ie+1];e.current.setCellFocus(V.id,ee)}}if(K){if(K!==rc.escapeKeyDown&&m(V.id))return;const X=W({},e.current.getRowParams(V.id),{reason:K,field:V.field});e.current.publishEvent("rowEditStop",X,U)}}else if(V.isEditable){let K;if(!e.current.unstable_applyPipeProcessors("canStartEditing",!0,{event:U,cellParams:V,editMode:"row"}))return;if(spe(U)||lpe(U)?K=cf.printableKeyDown:U.key==="Enter"?K=cf.enterKeyDown:(U.key==="Backspace"||U.key==="Delete")&&(K=cf.deleteKeyDown),K){const ie=e.current.getRowParams(V.id),ee=W({},ie,{field:V.field,reason:K});e.current.publishEvent("rowEditStart",ee,U)}}},[e,m]),E=v.useCallback(V=>{const{id:U,field:K,reason:X}=V,ie={id:U,fieldToFocus:K};(X===cf.printableKeyDown||X===cf.deleteKeyDown)&&(ie.deleteValue=!!K),e.current.startRowEditMode(ie)},[e]),P=v.useCallback(V=>{const{id:U,reason:K,field:X}=V;e.current.runPendingEditCellValueMutation(U);let ie;K===rc.enterKeyDown?ie="below":K===rc.tabKeyDown?ie="right":K===rc.shiftTabKeyDown&&(ie="left");const ee=K==="escapeKeyDown";e.current.stopRowEditMode({id:U,ignoreModifications:ee,field:X,cellToFocusAfter:ie})},[e]);xt(e,"cellDoubleClick",f(y)),xt(e,"cellFocusIn",f(w)),xt(e,"cellFocusOut",f(x)),xt(e,"cellKeyDown",f(S)),xt(e,"rowEditStart",f(E)),xt(e,"rowEditStop",f(P)),yr(e,"rowEditStart",t.onRowEditStart),yr(e,"rowEditStop",t.onRowEditStop);const T=v.useCallback(V=>{if(t.editMode===Su.Cell)return qn.View;const U=Xo(e.current.state);return U[V]&&Object.keys(U[V]).length>0?qn.Edit:qn.View},[e,t.editMode]),I=Ar(V=>{const U=V!==t.rowModesModel;d&&U&&d(V,{api:e.current}),!(t.rowModesModel&&U)&&(r(V),o.current=V,e.current.publishEvent("rowModesModelChange",V))}),A=v.useCallback((V,U)=>{const K=W({},o.current);U!==null?K[V]=W({},U):delete K[V],I(K)},[I]),k=v.useCallback((V,U)=>{e.current.setState(K=>{const X=W({},K.editRows);return U!==null?X[V]=U:delete X[V],W({},K,{editRows:X})}),e.current.forceUpdate()},[e]),O=v.useCallback((V,U,K)=>{e.current.setState(X=>{const ie=W({},X.editRows);return K!==null?ie[V]=W({},ie[V],{[U]:W({},K)}):(delete ie[V][U],Object.keys(ie[V]).length===0&&delete ie[V]),W({},X,{editRows:ie})}),e.current.forceUpdate()},[e]),$=v.useCallback(V=>{const{id:U}=V,K=Dt(V,gNt);h(U,qn.View),A(U,W({mode:qn.Edit},K))},[h,A]),N=Ar(V=>{const{id:U,fieldToFocus:K,deleteValue:X,initialValue:ie}=V,ee=hd(e),Q=ee.reduce((te,pe)=>{if(!e.current.getCellParams(U,pe).isEditable)return te;const se=e.current.getColumn(pe);let oe=e.current.getCellValue(U,pe);return K===pe&&(X||ie)&&(X?oe=tj(se):ie&&(oe=ie)),te[pe]={value:oe,error:!1,isProcessingProps:!!se.preProcessEditCellProps&&X},te},{});k(U,Q),K&&e.current.setCellFocus(U,K),ee.filter(te=>!!e.current.getColumn(te).preProcessEditCellProps&&X).forEach(te=>{const pe=e.current.getColumn(te),ae=e.current.getCellValue(U,te),se=X?tj(pe):ie??ae;Promise.resolve(pe.preProcessEditCellProps({id:U,row:e.current.getRow(U),props:Q[te],hasChanged:se!==ae})).then(oe=>{if(e.current.getRowMode(U)===qn.Edit){const fe=Xo(e.current.state);O(U,te,W({},oe,{value:fe[U][te].value,isProcessingProps:!1}))}})})}),L=v.useCallback(V=>{const{id:U}=V,K=Dt(V,mNt);h(U,qn.Edit),A(U,W({mode:qn.View},K))},[h,A]),j=Ar(V=>{const{id:U,ignoreModifications:K,field:X,cellToFocusAfter:ie="none"}=V;e.current.runPendingEditCellValueMutation(U);const ee=()=>{ie!=="none"&&X&&e.current.moveFocusToRelativeCell(U,X,ie),k(U,null),A(U,null)};if(K){ee();return}const Q=Xo(e.current.state),te=e.current.getRow(U);if(Object.values(Q[U]).some(se=>se.isProcessingProps)){i.current[U].mode=qn.Edit;return}if(m(U)){i.current[U].mode=qn.Edit,A(U,{mode:qn.Edit});return}const ae=e.current.getRowWithUpdatedValuesFromRowEditing(U);if(l){const se=oe=>{i.current[U].mode=qn.Edit,A(U,{mode:qn.Edit}),c&&c(oe)};try{Promise.resolve(l(ae,te,{rowId:U})).then(oe=>{e.current.updateRows([oe]),ee()}).catch(se)}catch(oe){se(oe)}}else e.current.updateRows([ae]),ee()}),D=v.useCallback(V=>{const{id:U,field:K,value:X,debounceMs:ie,unstable_skipValueParser:ee}=V;p(U,K);const Q=e.current.getColumn(K),te=e.current.getRow(U);let pe=X;Q.valueParser&&!ee&&(pe=Q.valueParser(X,te,Q,e));let ae=Xo(e.current.state),se=W({},ae[U][K],{value:pe,changeReason:ie?"debouncedSetEditCellValue":"setEditCellValue"});return Q.preProcessEditCellProps||O(U,K,se),new Promise(oe=>{const fe=[];if(Q.preProcessEditCellProps){const Z=se.value!==ae[U][K].value;se=W({},se,{isProcessingProps:!0}),O(U,K,se);const ce=ae[U],ge=Dt(ce,[K].map(lC)),we=Promise.resolve(Q.preProcessEditCellProps({id:U,row:te,props:se,hasChanged:Z,otherFieldsProps:ge})).then(me=>{if(e.current.getRowMode(U)===qn.View){oe(!1);return}ae=Xo(e.current.state),me=W({},me,{isProcessingProps:!1}),me.value=Q.preProcessEditCellProps?ae[U][K].value:pe,O(U,K,me)});fe.push(we)}Object.entries(ae[U]).forEach(([Z,ce])=>{if(Z===K)return;const ge=e.current.getColumn(Z);if(!ge.preProcessEditCellProps)return;ce=W({},ce,{isProcessingProps:!0}),O(U,Z,ce),ae=Xo(e.current.state);const we=ae[U],me=Dt(we,[Z].map(lC)),Se=Promise.resolve(ge.preProcessEditCellProps({id:U,row:te,props:ce,hasChanged:!1,otherFieldsProps:me})).then(xe=>{if(e.current.getRowMode(U)===qn.View){oe(!1);return}xe=W({},xe,{isProcessingProps:!1}),O(U,Z,xe)});fe.push(Se)}),Promise.all(fe).then(()=>{e.current.getRowMode(U)===qn.Edit?(ae=Xo(e.current.state),oe(!ae[U][K].error)):oe(!1)})})},[e,p,O]),_=v.useCallback(V=>{const U=Xo(e.current.state),K=e.current.getRow(V);if(!U[V])return e.current.getRow(V);let X=W({},K);return Object.entries(U[V]).forEach(([ie,ee])=>{const Q=e.current.getColumn(ie);Q.valueSetter?X=Q.valueSetter(ee.value,X,Q,e):X[ie]=ee.value}),X},[e]),z={getRowMode:T,startRowEditMode:$,stopRowEditMode:L},F={setRowEditingEditCellValue:D,getRowWithUpdatedValuesFromRowEditing:_};ln(e,z,"public"),ln(e,F,"private"),v.useEffect(()=>{u&&I(u)},[u,I]),Ho(()=>{const V=VO(e),U=i.current;i.current=hfe(n);const K=new Set([...Object.keys(n),...Object.keys(U)]);Array.from(K).forEach(X=>{var te;const ie=n[X]??{mode:qn.View},ee=((te=U[X])==null?void 0:te.mode)||qn.View,Q=V[X]??X;ie.mode===qn.Edit&&ee===qn.View?N(W({id:Q},ie)):ie.mode===qn.View&&ee===qn.Edit&&j(W({id:Q},ie))})},[e,n,N,j])},vNt=e=>W({},e,{editRows:{}}),bNt=(e,t)=>{hNt(e,t),yNt(e,t);const n=v.useRef({}),{isCellEditable:r}=t,o=v.useCallback(f=>fb(f.rowNode)||!f.colDef.editable||!f.colDef.renderEditCell?!1:r?r(f):!0,[r]),i=(f,p,h,m)=>{if(!h){m();return}if(n.current[f]||(n.current[f]={}),n.current[f][p]){const[x]=n.current[f][p];clearTimeout(x)}const y=()=>{const[x]=n.current[f][p];clearTimeout(x),m(),delete n.current[f][p]},w=setTimeout(()=>{m(),delete n.current[f][p]},h);n.current[f][p]=[w,y]};v.useEffect(()=>{const f=n.current;return()=>{Object.entries(f).forEach(([p,h])=>{Object.keys(h).forEach(m=>{const[y]=f[p][m];clearTimeout(y),delete f[p][m]})})}},[]);const a=v.useCallback((f,p)=>{if(n.current[f]){if(!p)Object.keys(n.current[f]).forEach(h=>{const[,m]=n.current[f][h];m()});else if(n.current[f][p]){const[,h]=n.current[f][p];h()}}},[]),s=v.useCallback(f=>{const{id:p,field:h,debounceMs:m}=f;return new Promise(y=>{i(p,h,m,async()=>{const w=t.editMode===Su.Row?e.current.setRowEditingEditCellValue:e.current.setCellEditingEditCellValue;if(e.current.getCellMode(p,h)===ar.Edit){const x=await w(f);y(x)}})})},[e,t.editMode]),l=v.useCallback((f,p)=>t.editMode===Su.Cell?e.current.getRowWithUpdatedValuesFromCellEditing(f,p):e.current.getRowWithUpdatedValuesFromRowEditing(f),[e,t.editMode]),c=v.useCallback((f,p)=>{var m;return((m=Xo(e.current.state)[f])==null?void 0:m[p])??null},[e]),u={isCellEditable:o,setEditCellValue:s,getRowWithUpdatedValues:l,unstable_getEditCellMeta:c},d={runPendingEditCellValueMutation:a};ln(e,u,"public"),ln(e,d,"private")},wNt=(e,t,n)=>{const r=!!t.unstable_dataSource;return n.current.caches.rows=wT({rows:r?[]:t.rows,getRowId:t.getRowId,loading:t.loading,rowCount:t.rowCount}),W({},e,{rows:Sfe({apiRef:n,rowCountProp:t.rowCount,loadingProp:r?!0:t.loading,previousTree:null,previousTreeDepths:null})})},xNt=(e,t)=>{const n=Wo(e,"useGridRows"),r=Wp(e,t),o=v.useRef(Date.now()),i=v.useRef(t.rowCount),a=y0(),s=v.useCallback(F=>{const V=jf(e)[F];if(V)return V;const U=e.current.getRowNode(F);return U&&fb(U)?{[Zy]:F}:null},[e]),l=t.getRowId,c=v.useCallback(F=>Zy in F?F[Zy]:l?l(F):F.id,[l]),u=v.useMemo(()=>r.rows.reduce((F,{id:V},U)=>(F[V]=U,F),{}),[r.rows]),d=v.useCallback(({cache:F,throttle:V})=>{const U=()=>{o.current=Date.now(),e.current.setState(X=>W({},X,{rows:Sfe({apiRef:e,rowCountProp:t.rowCount,loadingProp:t.loading,previousTree:Di(e),previousTreeDepths:hQ(e),previousGroupsToFetch:dkt(e)})})),e.current.publishEvent("rowsSet"),e.current.forceUpdate()};if(a.clear(),e.current.caches.rows=F,!V){U();return}const K=t.throttleRowsMs-(Date.now()-o.current);if(K>0){a.start(K,U);return}U()},[t.throttleRowsMs,t.rowCount,t.loading,e,a]),f=v.useCallback(F=>{n.debug(`Updating all rows, new length ${F.length}`);const V=wT({rows:F,getRowId:t.getRowId,loading:t.loading,rowCount:t.rowCount}),U=e.current.caches.rows;V.rowsBeforePartialUpdates=U.rowsBeforePartialUpdates,d({cache:V,throttle:!0})},[n,t.getRowId,t.loading,t.rowCount,d,e]),p=v.useCallback(F=>{if(t.signature===Tl.DataGrid&&F.length>1)throw new Error(["MUI X: You cannot update several rows at once in `apiRef.current.updateRows` on the DataGrid.","You need to upgrade to DataGridPro or DataGridPremium component to unlock this feature."].join(` +`));const V=mQ(e,F,t.getRowId),U=gQ({updates:V,getRowId:t.getRowId,previousCache:e.current.caches.rows});d({cache:U,throttle:!0})},[t.signature,t.getRowId,d,e]),h=v.useCallback((F,V)=>{const U=mQ(e,F,t.getRowId),K=gQ({updates:U,getRowId:t.getRowId,previousCache:e.current.caches.rows,groupKeys:V??[]});d({cache:K,throttle:!1})},[t.getRowId,d,e]),m=v.useCallback(F=>{F!==t.loading&&(n.debug(`Setting loading to ${F}`),e.current.setState(V=>W({},V,{rows:W({},V.rows,{loading:F})})),e.current.caches.rows.loadingPropBeforePartialUpdates=F)},[t.loading,e,n]),y=v.useCallback(()=>{const F=MP(e),V=jf(e);return new Map(F.map(U=>[U,V[U]??{}]))},[e]),w=v.useCallback(()=>WM(e),[e]),x=v.useCallback(()=>MP(e),[e]),S=v.useCallback(F=>u[F],[u]),E=v.useCallback((F,V)=>{const U=e.current.getRowNode(F);if(!U)throw new Error(`MUI X: No row with id #${F} found.`);if(U.type!=="group")throw new Error("MUI X: Only group nodes can be expanded or collapsed.");const K=W({},U,{childrenExpanded:V});e.current.setState(X=>W({},X,{rows:W({},X.rows,{tree:W({},X.rows.tree,{[F]:K})})})),e.current.forceUpdate(),e.current.publishEvent("rowExpansionChange",K)},[e]),P=v.useCallback(F=>Di(e)[F]??null,[e]),T=v.useCallback(({skipAutoGeneratedRows:F=!0,groupId:V,applySorting:U,applyFiltering:K})=>{const X=Di(e);let ie;if(U){const ee=X[V];if(!ee)return[];const Q=M1(e);ie=[];const te=Q.findIndex(pe=>pe===V)+1;for(let pe=te;peee.depth;pe+=1){const ae=Q[pe];(!F||!fb(X[ae]))&&ie.push(ae)}}else ie=Q5(X,V,F);if(K){const ee=w0(e);ie=ie.filter(Q=>ee[Q]!==!1)}return ie},[e]),I=v.useCallback((F,V)=>{const U=e.current.getRowNode(F);if(!U)throw new Error(`MUI X: No row with id #${F} found.`);if(U.parent!==mi)throw new Error("MUI X: The row reordering do not support reordering of grouped rows yet.");if(U.type!=="leaf")throw new Error("MUI X: The row reordering do not support reordering of footer or grouping rows.");e.current.setState(K=>{const X=Di(K,e.current.instanceId)[mi],ie=X.children,ee=ie.findIndex(te=>te===F);if(ee===-1||ee===V)return K;n.debug(`Moving row ${F} to index ${V}`);const Q=[...ie];return Q.splice(V,0,Q.splice(ee,1)[0]),W({},K,{rows:W({},K.rows,{tree:W({},K.rows.tree,{[mi]:W({},X,{children:Q})})})})}),e.current.publishEvent("rowsSet")},[e,n]),A=v.useCallback((F,V)=>{if(t.signature===Tl.DataGrid&&V.length>1)throw new Error(["MUI X: You cannot replace rows using `apiRef.current.unstable_replaceRows` on the DataGrid.","You need to upgrade to DataGridPro or DataGridPremium component to unlock this feature."].join(` +`));if(V.length===0)return;if(b0(e)>1)throw new Error("`apiRef.current.unstable_replaceRows` is not compatible with tree data and row grouping");const K=W({},Di(e)),X=W({},jf(e)),ie=W({},VO(e)),ee=K[mi],Q=[...ee.children],te=new Set;for(let ae=0;ae{var se;return((se=K[ae])==null?void 0:se.type)==="leaf"});e.current.caches.rows.dataRowIdToModelLookup=X,e.current.caches.rows.dataRowIdToIdLookup=ie,e.current.setState(ae=>W({},ae,{rows:W({},ae.rows,{dataRowIdToModelLookup:X,dataRowIdToIdLookup:ie,dataRowIds:pe,tree:K})})),e.current.publishEvent("rowsSet")},[e,t.signature,t.getRowId]),k={getRow:s,setLoading:m,getRowId:c,getRowModels:y,getRowsCount:w,getAllRowIds:x,setRows:f,updateRows:p,getRowNode:P,getRowIndexRelativeToVisibleRows:S,unstable_replaceRows:A},O={setRowIndex:I,setRowChildrenExpansion:E,getRowGroupChildren:T},$={updateServerRows:h},N=v.useCallback(()=>{n.info("Row grouping pre-processing have changed, regenerating the row tree");let F;e.current.caches.rows.rowsBeforePartialUpdates===t.rows?F=W({},e.current.caches.rows,{updates:{type:"full",rows:MP(e)}}):F=wT({rows:t.rows,getRowId:t.getRowId,loading:t.loading,rowCount:t.rowCount}),d({cache:F,throttle:!1})},[n,e,t.rows,t.getRowId,t.loading,t.rowCount,d]),L=ku(()=>t.unstable_dataSource),j=v.useCallback(F=>{if(t.unstable_dataSource&&t.unstable_dataSource!==L.current){L.current=t.unstable_dataSource;return}F==="rowTreeCreation"&&N()},[N,L,t.unstable_dataSource]),D=v.useCallback(()=>{e.current.getActiveStrategy("rowTree")!==fkt(e)&&N()},[e,N]);xt(e,"activeStrategyProcessorChange",j),xt(e,"strategyAvailabilityChange",D);const _=v.useCallback(()=>{e.current.setState(F=>{const V=e.current.unstable_applyPipeProcessors("hydrateRows",{tree:Di(F,e.current.instanceId),treeDepths:hQ(F,e.current.instanceId),dataRowIds:MP(F,e.current.instanceId),dataRowIdToModelLookup:jf(F,e.current.instanceId),dataRowIdToIdLookup:VO(F,e.current.instanceId)});return W({},F,{rows:W({},F.rows,V,{totalTopLevelRowCount:xfe({tree:V.tree,rowCountProp:t.rowCount})})})}),e.current.publishEvent("rowsSet"),e.current.forceUpdate()},[e,t.rowCount]);fH(e,"hydrateRows",_),ln(e,k,"public"),ln(e,O,t.signature===Tl.DataGrid?"private":"public"),ln(e,$,"private");const z=v.useRef(!0);v.useEffect(()=>{var X;if(z.current){z.current=!1;return}let F=!1;t.rowCount!==i.current&&(F=!0,i.current=t.rowCount);const V=e.current.caches.rows.rowsBeforePartialUpdates===t.rows,U=e.current.caches.rows.loadingPropBeforePartialUpdates===t.loading,K=e.current.caches.rows.rowCountPropBeforePartialUpdates===t.rowCount;V&&(U||(e.current.setState(ie=>W({},ie,{rows:W({},ie.rows,{loading:t.loading})})),e.current.caches.rows.loadingPropBeforePartialUpdates=t.loading,e.current.forceUpdate()),K||(e.current.setState(ie=>W({},ie,{rows:W({},ie.rows,{totalRowCount:Math.max(t.rowCount||0,ie.rows.totalRowCount),totalTopLevelRowCount:Math.max(t.rowCount||0,ie.rows.totalTopLevelRowCount)})})),e.current.caches.rows.rowCountPropBeforePartialUpdates=t.rowCount,e.current.forceUpdate()),!F)||(n.debug(`Updating all rows, new length ${(X=t.rows)==null?void 0:X.length}`),d({cache:wT({rows:t.rows,getRowId:t.getRowId,loading:t.loading,rowCount:t.rowCount}),throttle:!1}))},[t.rows,t.rowCount,t.getRowId,t.loading,n,d,e])},SNt=e=>{const t={[mi]:W({},gkt(),{children:e})};for(let n=0;n{const n=W({},e),r={};for(let a=0;a!r[a])),n[mi]=W({},o,{children:i}),{groupingName:kg,tree:n,treeDepths:{0:i.length},dataRowIds:i}},ENt=e=>e.updates.type==="full"?SNt(e.updates.rows):CNt({previousTree:e.previousTree,actions:e.updates.actions}),PNt=e=>{qO(e,kg,"rowTreeCreation",ENt)},gpe=(e,t)=>e==null||Array.isArray(e)?e:t&&t[0]===e?t:[e],TNt=(e,t)=>W({},e,{rowSelection:t.rowSelection?gpe(t.rowSelectionModel)??[]:[]}),INt=(e,t)=>{var z,F,V,U,K,X,ie;const n=Wo(e,"useGridSelection"),r=v.useCallback(ee=>(...Q)=>{t.rowSelection&&ee(...Q)},[t.rowSelection]),o=t.signature!==Tl.DataGrid&&(((z=t.rowSelectionPropagation)==null?void 0:z.parents)||((F=t.rowSelectionPropagation)==null?void 0:F.descendants)),i=v.useMemo(()=>gpe(t.rowSelectionModel,sl(e.current.state)),[e,t.rowSelectionModel]),a=v.useRef(null);e.current.registerControlState({stateId:"rowSelection",propModel:i,propOnChange:t.onRowSelectionModelChange,stateSelector:sl,changeEvent:"rowSelectionChange"});const{checkboxSelection:s,disableRowSelectionOnClick:l,isRowSelectable:c}=t,u=eH(t),d=Wp(e,t),f=Ye(e,Di),p=Ye(e,b0)>1,h=v.useCallback(ee=>{let Q=ee;const te=a.current??ee,pe=e.current.isRowSelected(ee);if(pe){const ae=ev(e),se=ae.findIndex(fe=>fe===te),oe=ae.findIndex(fe=>fe===Q);if(se===oe)return;se>oe?Q=ae[oe+1]:Q=ae[oe-1]}a.current=ee,e.current.selectRowRange({startId:te,endId:Q},!pe)},[e]),m=v.useCallback(ee=>{if(t.signature===Tl.DataGrid&&!u&&Array.isArray(ee)&&ee.length>1)throw new Error(["MUI X: `rowSelectionModel` can only contain 1 item in DataGrid.","You need to upgrade to DataGridPro or DataGridPremium component to unlock multiple selection."].join(` +`));sl(e.current.state)!==ee&&(n.debug("Setting selection model"),e.current.setState(te=>W({},te,{rowSelection:t.rowSelection?ee:[]})),e.current.forceUpdate())},[e,n,t.rowSelection,t.signature,u]),y=v.useCallback(ee=>sl(e.current.state).includes(ee),[e]),w=v.useCallback(ee=>{if(t.rowSelection===!1||c&&!c(e.current.getRowParams(ee)))return!1;const Q=e.current.getRowNode(ee);return!((Q==null?void 0:Q.type)==="footer"||(Q==null?void 0:Q.type)==="pinnedRow")},[e,t.rowSelection,c]),x=v.useCallback(()=>Bkt(e),[e]),S=v.useCallback((ee,Q=!0,te=!1)=>{var pe,ae,se,oe,fe,Z;if(e.current.isRowSelectable(ee))if(a.current=ee,te){n.debug(`Setting selection for row ${ee}`);const ce=[],ge=we=>{ce.push(we)};Q&&(ge(ee),o&&RP(e,f,ee,((pe=t.rowSelectionPropagation)==null?void 0:pe.descendants)??!1,((ae=t.rowSelectionPropagation)==null?void 0:ae.parents)??!1,ge)),e.current.setRowSelectionModel(ce)}else{n.debug(`Toggling selection for row ${ee}`);const ce=sl(e.current.state),ge=new Set(ce);ge.delete(ee);const we=xe=>{ge.add(xe)},me=xe=>{ge.delete(xe)};Q?(we(ee),o&&RP(e,f,ee,((se=t.rowSelectionPropagation)==null?void 0:se.descendants)??!1,((oe=t.rowSelectionPropagation)==null?void 0:oe.parents)??!1,we)):o&&yQ(e,f,ee,((fe=t.rowSelectionPropagation)==null?void 0:fe.descendants)??!1,((Z=t.rowSelectionPropagation)==null?void 0:Z.parents)??!1,me),(ge.size<2||u)&&e.current.setRowSelectionModel(Array.from(ge))}},[e,n,o,f,(V=t.rowSelectionPropagation)==null?void 0:V.descendants,(U=t.rowSelectionPropagation)==null?void 0:U.parents,u]),E=v.useCallback((ee,Q=!0,te=!1)=>{n.debug("Setting selection for several rows");const pe=ee.filter(oe=>e.current.isRowSelectable(oe));let ae;if(te){if(Q){if(ae=new Set(pe),o){const fe=Z=>{ae.add(Z)};pe.forEach(Z=>{var ce,ge;RP(e,f,Z,((ce=t.rowSelectionPropagation)==null?void 0:ce.descendants)??!1,((ge=t.rowSelectionPropagation)==null?void 0:ge.parents)??!1,fe)})}}else ae=new Set;const oe=gd(e);if(ae.size===Object.keys(oe).length&&Array.from(ae).every(fe=>oe[fe]===fe))return}else{ae=new Set(Object.values(gd(e)));const oe=Z=>{ae.add(Z)},fe=Z=>{ae.delete(Z)};pe.forEach(Z=>{var ce,ge,we,me;Q?(ae.add(Z),o&&RP(e,f,Z,((ce=t.rowSelectionPropagation)==null?void 0:ce.descendants)??!1,((ge=t.rowSelectionPropagation)==null?void 0:ge.parents)??!1,oe)):(fe(Z),o&&yQ(e,f,Z,((we=t.rowSelectionPropagation)==null?void 0:we.descendants)??!1,((me=t.rowSelectionPropagation)==null?void 0:me.parents)??!1,fe))})}(ae.size<2||u)&&e.current.setRowSelectionModel(Array.from(ae))},[n,o,u,e,f,(K=t.rowSelectionPropagation)==null?void 0:K.descendants,(X=t.rowSelectionPropagation)==null?void 0:X.parents]),P=v.useCallback(({startId:ee,endId:Q},te=!0,pe=!1)=>{if(!e.current.getRow(ee)||!e.current.getRow(Q))return;n.debug(`Expanding selection from row ${ee} to row ${Q}`);const ae=ev(e),se=ae.indexOf(ee),oe=ae.indexOf(Q),[fe,Z]=se>oe?[oe,se]:[se,oe],ce=ae.slice(fe,Z+1);e.current.selectRows(ce,te,pe)},[e,n]),T={selectRow:S,setRowSelectionModel:m,getSelectedRows:x,isRowSelected:y,isRowSelectable:w},I={selectRows:E,selectRowRange:P};ln(e,T,"public"),ln(e,I,t.signature===Tl.DataGrid?"private":"public");const A=v.useRef(!0),k=v.useCallback((ee=!1)=>{var Z;if(A.current)return;const Q=sl(e.current.state),te=jf(e),pe=w0(e),ae=W({},gd(e)),se=ce=>t.filterMode==="server"?!te[ce]:pe[ce]!==!0;let oe=!1;Q.forEach(ce=>{var we;if(se(ce)){if(t.keepNonExistentRowsSelected)return;delete ae[ce],oe=!0;return}if(!((we=t.rowSelectionPropagation)!=null&&we.parents))return;const ge=f[ce];if(ge.type==="group"){if(ge.isAutoGenerated){delete ae[ce],oe=!0;return}ge.children.every(Se=>pe[Se]===!1)||(delete ae[ce],oe=!0)}});const fe=p&&((Z=t.rowSelectionPropagation)==null?void 0:Z.parents)&&Object.keys(ae).length>0;if(oe||fe&&!ee){const ce=Object.values(ae);fe?e.current.selectRows(ce,!0,!0):e.current.setRowSelectionModel(ce)}},[e,p,(ie=t.rowSelectionPropagation)==null?void 0:ie.parents,t.keepNonExistentRowsSelected,t.filterMode,f]),O=v.useCallback((ee,Q)=>{const te=Q.metaKey||Q.ctrlKey,pe=!s&&!te&&!_Dt(Q),ae=!u||pe,se=e.current.isRowSelected(ee);ae?e.current.selectRow(ee,pe?!0:!se,!0):e.current.selectRow(ee,!se,!1)},[e,u,s]),$=v.useCallback((ee,Q)=>{var ae;if(l)return;const te=(ae=Q.target.closest(`.${le.cell}`))==null?void 0:ae.getAttribute("data-field");if(te===x0.field||te===qM)return;if(te){const se=e.current.getColumn(te);if((se==null?void 0:se.type)===UM)return}e.current.getRowNode(ee.id).type!=="pinnedRow"&&(Q.shiftKey&&u?h(ee.id):O(ee.id,Q))},[l,u,e,h,O]),N=v.useCallback((ee,Q)=>{var te;u&&Q.shiftKey&&((te=window.getSelection())==null||te.removeAllRanges())},[u]),L=v.useCallback((ee,Q)=>{u&&Q.nativeEvent.shiftKey?h(ee.id):e.current.selectRow(ee.id,ee.value,!u)},[e,h,u]),j=v.useCallback(ee=>{const Q=t.pagination&&t.checkboxSelectionVisibleOnly&&t.paginationMode==="client"?Ffe(e):ev(e);e.current.selectRows(Q,ee.value)},[e,t.checkboxSelectionVisibleOnly,t.pagination,t.paginationMode]),D=v.useCallback((ee,Q)=>{if(e.current.getCellMode(ee.id,ee.field)!==ar.Edit&&!D1(Q)){if(GO(Q.key)&&Q.shiftKey){const te=ts(e);if(te&&te.id!==ee.id){Q.preventDefault();const pe=e.current.isRowSelected(te.id);if(!u){e.current.selectRow(te.id,!pe,!0);return}const ae=e.current.getRowIndexRelativeToVisibleRows(te.id),se=e.current.getRowIndexRelativeToVisibleRows(ee.id);let oe,fe;ae>se?pe?(oe=se,fe=ae-1):(oe=se,fe=ae):pe?(oe=ae+1,fe=se):(oe=ae,fe=se);const Z=d.rows.slice(oe,fe+1).map(ce=>ce.id);e.current.selectRows(Z,!pe);return}}if(Q.key===" "&&Q.shiftKey){Q.preventDefault(),O(ee.id,Q);return}String.fromCharCode(Q.keyCode)==="A"&&(Q.ctrlKey||Q.metaKey)&&(Q.preventDefault(),E(e.current.getAllRowIds(),!0))}},[e,O,E,d.rows,u]);xt(e,"sortedRowsSet",r(()=>k(!0))),xt(e,"filteredRowsSet",r(k)),xt(e,"rowClick",r($)),xt(e,"rowSelectionCheckboxChange",r(L)),xt(e,"headerSelectionCheckboxChange",j),xt(e,"cellMouseDown",r(N)),xt(e,"cellKeyDown",r(D)),v.useEffect(()=>{i!==void 0&&e.current.setRowSelectionModel(i)},[e,i,t.rowSelection]),v.useEffect(()=>{t.rowSelection||e.current.setRowSelectionModel([])},[e,t.rowSelection]);const _=i!=null;v.useEffect(()=>{if(_||!t.rowSelection)return;const ee=sl(e.current.state);if(w){const Q=ee.filter(te=>w(te));Q.length{if(!t.rowSelection||_)return;const ee=sl(e.current.state);!u&&ee.length>1&&e.current.setRowSelectionModel([])},[e,u,s,_,t.rowSelection]),v.useEffect(()=>{r(k)},[k,r]),v.useEffect(()=>{A.current&&(A.current=!1)},[])},ONt=e=>{const{classes:t}=e;return v.useMemo(()=>In({cellCheckbox:["cellCheckbox"],columnHeaderCheckbox:["columnHeaderCheckbox"]},On,t),[t])},ANt=(e,t)=>{const n={classes:t.classes},r=ONt(n),o=v.useCallback(i=>{const a=W({},x0,{cellClassName:r.cellCheckbox,headerClassName:r.columnHeaderCheckbox,headerName:e.current.getLocaleText("checkboxSelectionHeaderName")}),s=t.checkboxSelection,l=i.lookup[Qu]!=null;return s&&!l?(i.lookup[Qu]=a,i.orderedFields=[Qu,...i.orderedFields]):!s&&l?(delete i.lookup[Qu],i.orderedFields=i.orderedFields.filter(c=>c!==Qu)):s&&l&&(i.lookup[Qu]=W({},a,i.lookup[Qu])),i},[e,r,t.checkboxSelection]);zr(e,"hydrateColumns",o)},kNt=(e,t)=>{var r,o;const n=t.sortModel??((o=(r=t.initialState)==null?void 0:r.sorting)==null?void 0:o.sortModel)??[];return W({},e,{sorting:{sortModel:ufe(n,t.disableMultipleColumnsSorting),sortedRows:[]}})},MNt=(e,t)=>{var P,T;const n=Wo(e,"useGridSorting");e.current.registerControlState({stateId:"sortModel",propModel:t.sortModel,propOnChange:t.onSortModelChange,stateSelector:al,changeEvent:"sortModelChange"});const r=v.useCallback((I,A)=>{const k=al(e),O=k.findIndex(N=>N.field===I);let $=[...k];return O>-1?(A==null?void 0:A.sort)==null?$.splice(O,1):$.splice(O,1,A):$=[...k,A],$},[e]),o=v.useCallback((I,A)=>{const O=al(e).find($=>$.field===I.field);if(O){const $=A===void 0?aQ(I.sortingOrder??t.sortingOrder,O.sort):A;return $===void 0?void 0:W({},O,{sort:$})}return{field:I.field,sort:A===void 0?aQ(I.sortingOrder??t.sortingOrder):A}},[e,t.sortingOrder]),i=v.useCallback((I,A)=>A==null||A.sortable===!1||t.disableColumnSorting?I:(A.sortingOrder||t.sortingOrder).some(O=>!!O)?[...I,"columnMenuSortItem"]:I,[t.sortingOrder,t.disableColumnSorting]),a=v.useCallback(()=>{e.current.setState(I=>{if(t.sortingMode==="server")return n.debug("Skipping sorting rows as sortingMode = server"),W({},I,{sorting:W({},I.sorting,{sortedRows:Q5(Di(e),mi,!1)})});const A=al(I,e.current.instanceId),k=NAt(A,e),O=e.current.applyStrategyProcessor("sorting",{sortRowList:k});return W({},I,{sorting:W({},I.sorting,{sortedRows:O})})}),e.current.publishEvent("sortedRowsSet"),e.current.forceUpdate()},[e,n,t.sortingMode]),s=v.useCallback(I=>{al(e)!==I&&(n.debug("Setting sort model"),e.current.setState(iQ(I,t.disableMultipleColumnsSorting)),e.current.forceUpdate(),e.current.applySorting())},[e,n,t.disableMultipleColumnsSorting]),l=v.useCallback((I,A,k)=>{const O=e.current.getColumn(I),$=o(O,A);let N;!k||t.disableMultipleColumnsSorting?N=($==null?void 0:$.sort)==null?[]:[$]:N=r(O.field,$),e.current.setSortModel(N)},[e,r,o,t.disableMultipleColumnsSorting]),c=v.useCallback(()=>al(e),[e]),u=v.useCallback(()=>X5(e).map(A=>A.model),[e]),d=v.useCallback(()=>M1(e),[e]),f=v.useCallback(I=>e.current.getSortedRowIds()[I],[e]);ln(e,{getSortModel:c,getSortedRows:u,getSortedRowIds:d,getRowIdFromRowIndex:f,setSortModel:s,sortColumn:l,applySorting:a},"public");const h=v.useCallback((I,A)=>{var $,N;const k=al(e);return!A.exportOnlyDirtyModels||t.sortModel!=null||((N=($=t.initialState)==null?void 0:$.sorting)==null?void 0:N.sortModel)!=null||k.length>0?W({},I,{sorting:{sortModel:k}}):I},[e,t.sortModel,(T=(P=t.initialState)==null?void 0:P.sorting)==null?void 0:T.sortModel]),m=v.useCallback((I,A)=>{var O;const k=(O=A.stateToRestore.sorting)==null?void 0:O.sortModel;return k==null?I:(e.current.setState(iQ(k,t.disableMultipleColumnsSorting)),W({},I,{callbacks:[...I.callbacks,e.current.applySorting]}))},[e,t.disableMultipleColumnsSorting]),y=v.useCallback(I=>{const A=Di(e),k=A[mi],O=I.sortRowList?I.sortRowList(k.children.map($=>A[$])):[...k.children];return k.footerId!=null&&O.push(k.footerId),O},[e]);zr(e,"exportState",h),zr(e,"restoreState",m),qO(e,kg,"sorting",y);const w=v.useCallback(({field:I,colDef:A},k)=>{if(!A.sortable||t.disableColumnSorting)return;const O=k.shiftKey||k.metaKey||k.ctrlKey;l(I,void 0,O)},[l,t.disableColumnSorting]),x=v.useCallback(({field:I,colDef:A},k)=>{!A.sortable||t.disableColumnSorting||k.key==="Enter"&&!k.ctrlKey&&!k.metaKey&&l(I,void 0,k.shiftKey)},[l,t.disableColumnSorting]),S=v.useCallback(()=>{const I=al(e),A=Bd(e);if(I.length>0){const k=I.filter(O=>A[O.field]);k.length{I==="sorting"&&e.current.applySorting()},[e]);zr(e,"columnMenu",i),xt(e,"columnHeaderClick",w),xt(e,"columnHeaderKeyDown",x),xt(e,"rowsSet",e.current.applySorting),xt(e,"columnsChange",S),xt(e,"activeStrategyProcessorChange",E),R1(()=>{e.current.applySorting()}),Ho(()=>{t.sortModel!==void 0&&e.current.setSortModel(t.sortModel)},[e,t.sortModel])};function XQ(e){const{containerSize:t,scrollPosition:n,elementSize:r,elementOffset:o}=e,i=o+r;if(r>t)return o;if(i-t>n)return i-t;if(o{const n=dr(),r=Wo(e,"useGridScroll"),o=e.current.columnHeadersContainerRef,i=e.current.virtualScrollerRef,a=Ye(e,Up),s=v.useCallback(d=>{var w;const f=Si(e.current.state),p=WM(e),h=t.unstable_listView?[hb(e.current.state)]:Oo(e);if(!(d.rowIndex==null)&&p===0||h.length===0)return!1;r.debug(`Scrolling to cell at row ${d.rowIndex}, col: ${d.colIndex} `);let y={};if(d.colIndex!==void 0){const x=Hp(e);let S;if(typeof d.rowIndex<"u"){const E=(w=a[d.rowIndex])==null?void 0:w.id,P=e.current.unstable_getCellColSpanInfo(E,d.colIndex);P&&!P.spannedByColSpan&&(S=P.cellProps.width)}typeof S>"u"&&(S=h[d.colIndex].computedWidth),y.left=XQ({containerSize:f.viewportOuterSize.width,scrollPosition:Math.abs(i.current.scrollLeft),elementSize:S,elementOffset:x[d.colIndex]})}if(d.rowIndex!==void 0){const x=S0(e.current.state),S=nMt(e),E=rMt(e),P=t.pagination?d.rowIndex-S*E:d.rowIndex,T=x.positions[P+1]?x.positions[P+1]-x.positions[P]:x.currentPageTotalHeight-x.positions[P];y.top=XQ({containerSize:f.viewportInnerSize.height,scrollPosition:i.current.scrollTop,elementSize:T,elementOffset:x.positions[P]})}return y=e.current.unstable_applyPipeProcessors("scrollToIndexes",y,d),typeof y.left!==void 0||typeof y.top!==void 0?(e.current.scroll(y),!0):!1},[r,e,i,t.pagination,a,t.unstable_listView]),l=v.useCallback(d=>{if(i.current&&d.left!==void 0&&o.current){const f=n?-1:1;o.current.scrollLeft=d.left,i.current.scrollLeft=f*d.left,r.debug(`Scrolling left: ${d.left}`)}i.current&&d.top!==void 0&&(i.current.scrollTop=d.top,r.debug(`Scrolling top: ${d.top}`)),r.debug("Scrolling, updating container, and viewport")},[i,n,o,r]),c=v.useCallback(()=>i!=null&&i.current?{top:i.current.scrollTop,left:i.current.scrollLeft}:{top:0,left:0},[i]);ln(e,{scroll:l,scrollToIndexes:s,getScrollPosition:c},"public")};function $Nt(e,t){yr(e,"columnHeaderClick",t.onColumnHeaderClick),yr(e,"columnHeaderContextMenu",t.onColumnHeaderContextMenu),yr(e,"columnHeaderDoubleClick",t.onColumnHeaderDoubleClick),yr(e,"columnHeaderOver",t.onColumnHeaderOver),yr(e,"columnHeaderOut",t.onColumnHeaderOut),yr(e,"columnHeaderEnter",t.onColumnHeaderEnter),yr(e,"columnHeaderLeave",t.onColumnHeaderLeave),yr(e,"cellClick",t.onCellClick),yr(e,"cellDoubleClick",t.onCellDoubleClick),yr(e,"cellKeyDown",t.onCellKeyDown),yr(e,"preferencePanelClose",t.onPreferencePanelClose),yr(e,"preferencePanelOpen",t.onPreferencePanelOpen),yr(e,"menuOpen",t.onMenuOpen),yr(e,"menuClose",t.onMenuClose),yr(e,"rowDoubleClick",t.onRowDoubleClick),yr(e,"rowClick",t.onRowClick),yr(e,"stateChange",t.onStateChange)}function DNt(e,t=166){let n,r;const o=()=>{n=void 0,e(...r)};function i(...a){r=a,n===void 0&&(n=setTimeout(o,t))}return i.clear=()=>{clearTimeout(n),n=void 0},i}const nj={autoHeight:!1,autoPageSize:!1,autosizeOnMount:!1,checkboxSelection:!1,checkboxSelectionVisibleOnly:!1,clipboardCopyCellDelimiter:" ",columnBufferPx:150,columnHeaderHeight:56,disableAutosize:!1,disableColumnFilter:!1,disableColumnMenu:!1,disableColumnReorder:!1,disableColumnResize:!1,disableColumnSelector:!1,disableColumnSorting:!1,disableDensitySelector:!1,disableEval:!1,disableMultipleColumnsFiltering:!1,disableMultipleColumnsSorting:!1,disableMultipleRowSelection:!1,disableRowSelectionOnClick:!1,disableVirtualization:!1,editMode:Su.Cell,filterDebounceMs:150,filterMode:"client",hideFooter:!1,hideFooterPagination:!1,hideFooterRowCount:!1,hideFooterSelectedRowCount:!1,ignoreDiacritics:!1,ignoreValueFormatterDuringExport:!1,indeterminateCheckboxAction:"deselect",keepColumnPositionIfDraggedOutside:!1,keepNonExistentRowsSelected:!1,loading:!1,logger:console,logLevel:"error",pageSizeOptions:[25,50,100],pagination:!1,paginationMode:"client",resizeThrottleMs:60,rowBufferPx:150,rowHeight:52,rowPositionsDebounceMs:166,rows:[],rowSelection:!0,rowSpacingType:"margin",showCellVerticalBorder:!1,showColumnVerticalBorder:!1,sortingMode:"client",sortingOrder:["asc","desc",null],throttleRowsMs:0,unstable_rowSpanning:!1},ry={width:0,height:0},_Nt={isReady:!1,root:ry,viewportOuterSize:ry,viewportInnerSize:ry,contentSize:ry,minimumSize:ry,hasScrollX:!1,hasScrollY:!1,scrollbarSize:0,headerHeight:0,groupHeaderHeight:0,headerFilterHeight:0,rowWidth:0,rowHeight:0,columnsTotalWidth:0,leftPinnedWidth:0,rightPinnedWidth:0,headersTotalHeight:0,topContainerHeight:0,bottomContainerHeight:0},NNt=e=>W({},e,{dimensions:_Nt});function LNt(e,t){const n=Wo(e,"useResizeContainer"),r=v.useRef(!1),o=v.useRef(ry),i=Ye(e,Si),a=Ye(e,S0),s=Ye(e,k1),l=Ye(e,A1),c=v.useMemo(()=>Efe(t.rowHeight,nj.rowHeight),[t.rowHeight]),u=Math.floor(c*l),d=Math.floor(t.columnHeaderHeight*l),f=Math.floor((t.columnGroupHeaderHeight??t.columnHeaderHeight)*l),p=Math.floor((t.headerFilterHeight??t.columnHeaderHeight)*l),h=jNt(G5(e),6),m=oH(e,t),y=s.left.reduce((_,z)=>_+z.computedWidth,0),w=s.right.reduce((_,z)=>_+z.computedWidth,0),[x,S]=v.useState(),E=v.useMemo(()=>DNt(S,t.resizeThrottleMs),[t.resizeThrottleMs]),P=v.useRef(),T=()=>e.current.state.dimensions,I=Ar(_=>{e.current.setState(z=>W({},z,{dimensions:_}))}),A=v.useCallback(()=>{const _=e.current.mainElementRef.current;if(!_)return;const z=BOt(_).getComputedStyle(_),F={width:parseFloat(z.width)||0,height:parseFloat(z.height)||0};(!P.current||!JQ(P.current,F))&&(e.current.publishEvent("resize",F),P.current=F)},[e]),k=v.useCallback(()=>{const _=Si(e.current.state);if(!_.isReady)return 0;const z=tv(e,{pagination:t.pagination,paginationMode:t.paginationMode});if(t.getRowHeight){const V=eR(e),U=V.lastRowIndex-V.firstRowIndex;return Math.min(U-1,z.rows.length)}const F=Math.floor(_.viewportInnerSize.height/u);return Math.min(F,z.rows.length)},[e,t.pagination,t.paginationMode,t.getRowHeight,u]),O=v.useCallback(()=>{var fe,Z;const _=e.current.rootElementRef.current,z=ykt(e),F=FNt(_,h,t.scrollbarSize),V=m+z.top,U=z.bottom,X={width:h-y-w,height:a.currentPageTotalHeight};let ie,ee,Q=!1,te=!1;if(t.autoHeight)te=!1,Q=Math.round(h)>Math.round(o.current.width),ie={width:o.current.width,height:V+U+X.height},ee={width:Math.max(0,ie.width-(te?F:0)),height:Math.max(0,ie.height-(Q?F:0))};else{ie={width:o.current.width,height:o.current.height},ee={width:Math.max(0,ie.width-y-w),height:Math.max(0,ie.height-V-U)};const ce=X,ge=ee,we=ce.width>ge.width,me=ce.height>ge.height;(we||me)&&(te=me,Q=ce.width+(te?F:0)>ge.width,Q&&(te=ce.height+F>ge.height)),te&&(ee.width-=F),Q&&(ee.height-=F)}const pe=Math.max(ie.width,h+(te?F:0)),ae={width:h,height:V+X.height+U},se={isReady:!0,root:o.current,viewportOuterSize:ie,viewportInnerSize:ee,contentSize:X,minimumSize:ae,hasScrollX:Q,hasScrollY:te,scrollbarSize:F,headerHeight:d,groupHeaderHeight:f,headerFilterHeight:p,rowWidth:pe,rowHeight:u,columnsTotalWidth:h,leftPinnedWidth:y,rightPinnedWidth:w,headersTotalHeight:m,topContainerHeight:V,bottomContainerHeight:U},oe=e.current.state.dimensions;I(se),JQ(se.viewportInnerSize,oe.viewportInnerSize)||e.current.publishEvent("viewportInnerSizeChange",se.viewportInnerSize),(Z=(fe=e.current).updateRenderContext)==null||Z.call(fe)},[e,I,t.scrollbarSize,t.autoHeight,a.currentPageTotalHeight,u,d,f,p,h,m,y,w]),$={resize:A,getRootDimensions:T},N={updateDimensions:O,getViewportPageSize:k};ln(e,$,"public"),ln(e,N,"private"),Ho(()=>{x&&(O(),e.current.publishEvent("debouncedResize",o.current))},[e,x,O]);const L=e.current.rootElementRef.current;Ho(()=>{if(!L)return;const _=(z,F)=>L.style.setProperty(z,F);_("--DataGrid-width",`${i.viewportOuterSize.width}px`),_("--DataGrid-hasScrollX",`${Number(i.hasScrollX)}`),_("--DataGrid-hasScrollY",`${Number(i.hasScrollY)}`),_("--DataGrid-scrollbarSize",`${i.scrollbarSize}px`),_("--DataGrid-rowWidth",`${i.rowWidth}px`),_("--DataGrid-columnsTotalWidth",`${i.columnsTotalWidth}px`),_("--DataGrid-leftPinnedWidth",`${i.leftPinnedWidth}px`),_("--DataGrid-rightPinnedWidth",`${i.rightPinnedWidth}px`),_("--DataGrid-headerHeight",`${i.headerHeight}px`),_("--DataGrid-headersTotalHeight",`${i.headersTotalHeight}px`),_("--DataGrid-topContainerHeight",`${i.topContainerHeight}px`),_("--DataGrid-bottomContainerHeight",`${i.bottomContainerHeight}px`),_("--height",`${i.rowHeight}px`)},[L,i]);const j=v.useRef(!0),D=v.useCallback(_=>{o.current=_;const z=/jsdom/.test(window.navigator.userAgent);if(_.height===0&&!r.current&&!t.autoHeight&&!z&&(n.error(["The parent DOM element of the Data Grid has an empty height.","Please make sure that this element has an intrinsic height.","The grid displays with a height of 0px.","","More details: https://mui.com/r/x-data-grid-no-dimensions."].join(` `)),r.current=!0),_.width===0&&!r.current&&!z&&(n.error(["The parent DOM element of the Data Grid has an empty width.","Please make sure that this element has an intrinsic width.","The grid displays with a width of 0px.","","More details: https://mui.com/r/x-data-grid-no-dimensions."].join(` -`)),r.current=!0),j.current){C(_),j.current=!1;return}E(_)},[t.autoHeight,E,n]);Ho(O,[O]),yr(e,"sortedRowsSet",O),yr(e,"paginationModelChange",O),yr(e,"columnsChange",O),bt(e,"resize",D),yr(e,"debouncedResize",t.onResize)}function tNt(e,t,n){if(n!==void 0)return n;if(e===null||t===0)return 0;const o=Jf(e).createElement("div");o.style.width="99px",o.style.height="99px",o.style.position="absolute",o.style.overflow="scroll",o.className="scrollDiv",e.appendChild(o);const i=o.offsetWidth-o.clientWidth;return e.removeChild(o),i}function nNt(e,t){return Math.round(e*10**t)/10**t}function qQ(e,t){return e.width===t.width&&e.height===t.height}const rNt=typeof globalThis.ResizeObserver<"u"?globalThis.ResizeObserver:class{observe(){}unobserve(){}disconnect(){}},oNt=(e,t,n)=>(n.current.caches.rowsMeta={heights:new Map},W({},e,{rowsMeta:{currentPageTotalHeight:0,positions:[]}})),iNt=(e,t)=>{const{getRowHeight:n,getRowSpacing:r,getEstimatedRowHeight:o}=t,i=e.current.caches.rowsMeta.heights,a=v.useRef(-1),s=v.useRef(!1),l=v.useRef(!1),c=Ye(e,v1),u=Ye(e,di),d=Ye(e,WM),f=Ye(e,rl),p=Up(e,t),h=Ye(e,Zg),m=Ye(e,()=>wi(e.current.state).rowHeight),y=L=>{let j=i.get(L);return j===void 0&&(j={content:m,spacingTop:0,spacingBottom:0,detail:0,autoHeight:!1,needsFirstMeasurement:!0},i.set(L,j)),j},w=v.useCallback(L=>{const j=wi(e.current.state).rowHeight,D=e.current.getRowHeightEntry(L.id);if(!n)D.content=j,D.needsFirstMeasurement=!1;else{const _=n(W({},L,{densityFactor:c}));if(_==="auto"){if(D.needsFirstMeasurement){const z=o?o(W({},L,{densityFactor:c})):j;D.content=z??j}s.current=!0,D.autoHeight=!0}else D.content=gfe(_,j),D.needsFirstMeasurement=!1,D.autoHeight=!1}if(r){const _=e.current.getRowIndexRelativeToVisibleRows(L.id),z=r(W({},L,{isFirstVisible:_===0,isLastVisible:_===p.rows.length-1,indexRelativeToCurrentPage:_}));D.spacingTop=z.top??0,D.spacingBottom=z.bottom??0}else D.spacingTop=0,D.spacingBottom=0;return e.current.unstable_applyPipeProcessors("rowHeight",D,L),D},[e,p.rows.length,n,o,m,r,c]),x=v.useCallback(()=>{s.current=!1,h.top.forEach(w),h.bottom.forEach(w);const L=[],j=p.rows.reduce((D,_)=>{L.push(D);const z=w(_),F=z.content+z.spacingTop+z.spacingBottom+z.detail;return D+F},0);s.current||(a.current=1/0),e.current.setState(D=>W({},D,{rowsMeta:{currentPageTotalHeight:j,positions:L}})),l.current=!0},[e,h,p.rows,w]),C=L=>{var j;return((j=i.get(L))==null?void 0:j.content)??m},E=(L,j)=>{const D=e.current.getRowHeightEntry(L),_=D.content!==j;D.needsFirstMeasurement=!1,D.content=j,l.current&&(l.current=!_)},P=L=>{var j;return((j=i.get(L))==null?void 0:j.autoHeight)??!1},T=()=>a.current,I=L=>{s.current&&L>a.current&&(a.current=L)},A=()=>{i.clear(),x()},k=Au(()=>new rNt(L=>{for(let j=0;j0?D.borderBoxSize[0].blockSize:D.contentRect.height,z=D.target.__mui_id;e.current.unstable_storeRowHeightMeasurement(z,_)}l.current||e.current.requestPipeProcessorsApplication("rowHeight")})).current,O=(L,j)=>(L.__mui_id=j,k.observe(L),()=>k.unobserve(L));l5(e,"rowHeight",x),v.useEffect(()=>{x()},[u,d,f,x]);const $={unstable_getRowHeight:C,unstable_setLastMeasuredRowIndex:I,unstable_storeRowHeightMeasurement:E,resetRowHeights:A},N={hydrateRowsMeta:x,observeRowHeight:O,rowHasAutoHeight:P,getRowHeightEntry:y,getLastMeasuredRowIndex:T};ln(e,$,"public"),ln(e,N,"private")},aNt=e=>{const t=v.useCallback((o={})=>e.current.unstable_applyPipeProcessors("exportState",{},o),[e]),n=v.useCallback(o=>{e.current.unstable_applyPipeProcessors("restoreState",{callbacks:[]},{stateToRestore:o}).callbacks.forEach(a=>{a()}),e.current.forceUpdate()},[e]);ln(e,{exportState:t,restoreState:n},"public")},sNt=e=>{const t=v.useRef({}),n=(s,l)=>{var c;return(c=t.current[s])==null?void 0:c[l]},r=()=>{t.current={}},o=v.useCallback(({rowId:s,minFirstColumn:l,maxLastColumn:c,columns:u})=>{for(let d=l;d1&&(d+=f.colSpan-1)}},[e]),i={unstable_getCellColSpanInfo:n},a={resetColSpan:r,calculateColSpan:o};ln(e,i,"public"),ln(e,a,"private"),bt(e,"columnOrderChange",r)};function lNt(e){const{apiRef:t,lookup:n,columnIndex:r,rowId:o,minFirstColumnIndex:i,maxLastColumnIndex:a,columns:s}=e,l=s.length,c=s[r],u=t.current.getRow(o),d=t.current.getRowValue(u,c),f=typeof c.colSpan=="function"?c.colSpan(d,u,c,t):c.colSpan;if(!f||f===1)return C_(n,o,r,{spannedByColSpan:!1,cellProps:{colSpan:1,width:c.computedWidth}}),{colSpan:1};let p=c.computedWidth;for(let h=1;h=i&&m{if(sfe(e)){if(n[e.field]!==void 0)throw new Error(["MUI X: columnGroupingModel contains duplicated field",`column field ${e.field} occurs two times in the grouping model:`,`- ${n[e.field].join(" > ")}`,`- ${t.join(" > ")}`].join(` -`));n[e.field]=t;return}const{groupId:r,children:o}=e;o.forEach(i=>{spe(i,[...t,r],n)})},JF=e=>{if(!e)return{};const t={};return e.forEach(n=>{spe(n,[],t)}),t},ZF=(e,t,n)=>{const r=l=>t[l]??[],o=[],i=Math.max(...e.map(l=>r(l).length)),a=(l,c,u)=>Xy(r(l).slice(0,u+1),r(c).slice(0,u+1)),s=(l,c)=>!!(n!=null&&n.left&&n.left.includes(l)&&!n.left.includes(c)||n!=null&&n.right&&!n.right.includes(l)&&n.right.includes(c));for(let l=0;l{const f=r(d)[l]??null;if(u.length===0)return[{columnFields:[d],groupId:f}];const p=u[u.length-1],h=p.columnFields[p.columnFields.length-1];return p.groupId!==f||!a(h,d,l)||s(h,d)?[...u,{columnFields:[d],groupId:f}]:[...u.slice(0,u.length-1),{columnFields:[...p.columnFields,d],groupId:f}]},[]);o.push(c)}return o},cNt=["groupId","children"],c5=e=>{let t={};return e.forEach(n=>{if(sfe(n))return;const{groupId:r,children:o}=n,i=Dt(n,cNt);if(!r)throw new Error("MUI X: An element of the columnGroupingModel does not have either `field` or `groupId`.");const a=W({},i,{groupId:r}),s=c5(o);if(s[r]!==void 0||t[r]!==void 0)throw new Error(`MUI X: The groupId ${r} is used multiple times in the columnGroupingModel.`);t=W({},t,s,{[r]:a})}),W({},t)},uNt=(e,t,n)=>{if(!t.columnGroupingModel)return e;const r=pd(n),o=h0(n),i=c5(t.columnGroupingModel??[]),a=JF(t.columnGroupingModel??[]),s=ZF(r,a,n.current.state.pinnedColumns??{}),l=o.length===0?0:Math.max(...o.map(c=>{var u;return((u=a[c])==null?void 0:u.length)??0}));return W({},e,{columnGrouping:{lookup:i,unwrappedGroupingModel:a,headerStructure:s,maxDepth:l}})},dNt=(e,t)=>{const n=v.useCallback(s=>$fe(e)[s]??[],[e]),r=v.useCallback(()=>Dfe(e),[e]);ln(e,{getColumnGroupPath:n,getAllGroupDetails:r},"public");const i=v.useCallback(()=>{const s=JF(t.columnGroupingModel??[]);e.current.setState(l=>{var f;const c=((f=l.columns)==null?void 0:f.orderedFields)??[],u=l.pinnedColumns??{},d=ZF(c,s,u);return W({},l,{columnGrouping:W({},l.columnGrouping,{headerStructure:d})})})},[e,t.columnGroupingModel]),a=v.useCallback(s=>{var m,y;const l=((y=(m=e.current).getPinnedColumns)==null?void 0:y.call(m))??{},c=pd(e),u=h0(e),d=c5(s??[]),f=JF(s??[]),p=ZF(c,f,l),h=u.length===0?0:Math.max(...u.map(w=>{var x;return((x=f[w])==null?void 0:x.length)??0}));e.current.setState(w=>W({},w,{columnGrouping:{lookup:d,unwrappedGroupingModel:f,headerStructure:p,maxDepth:h}}))},[e]);bt(e,"columnIndexChange",i),bt(e,"columnsChange",()=>{a(t.columnGroupingModel)}),bt(e,"columnVisibilityModelChange",()=>{a(t.columnGroupingModel)}),v.useEffect(()=>{a(t.columnGroupingModel)},[a,t.columnGroupingModel])};function fNt(){let e,t;const n=new Promise((r,o)=>{e=r,t=o});return n.resolve=e,n.reject=t,n}function KQ(e,t){if(t!==void 0&&e.changedTouches){for(let n=0;nt5(e),r=Ye(e,n);return v.useEffect(()=>{t.current&&r===!1&&(t.current.resolve(),t.current=void 0)}),()=>{if(!t.current){if(n()===!1)return Promise.resolve();t.current=fNt()}return t.current}}function yNt(e,t){if(e.length<4)return e;const n=e.slice();n.sort((s,l)=>s-l);const r=n[Math.floor(n.length*.25)],o=n[Math.floor(n.length*.75)-1],i=o-r,a=i<5?5:i*t;return n.filter(s=>s>r-a&&s{const s=kRt(e.current,i.field).map(h=>h.getBoundingClientRect().width??0),l=t.includeOutliers?s:yNt(s,t.outliersFactor);if(t.includeHeaders){const h=ARt(e.current,i.field);if(h){const m=h.querySelector(`.${le.columnHeaderTitle}`),y=h.querySelector(`.${le.columnHeaderTitleContainerContent}`),w=h.querySelector(`.${le.iconButtonContainer}`),x=h.querySelector(`.${le.menuIcon}`),C=m??y,E=window.getComputedStyle(h,null),P=parseInt(E.paddingLeft,10)+parseInt(E.paddingRight,10),I=C.scrollWidth+1+P+((w==null?void 0:w.clientWidth)??0)+((x==null?void 0:x.clientWidth)??0);l.push(I)}}const c=i.minWidth!==-1/0&&i.minWidth!==void 0,u=i.maxWidth!==1/0&&i.maxWidth!==void 0,d=c?i.minWidth:0,f=u?i.maxWidth:1/0,p=l.length===0?0:Math.max(...l);r[i.field]=fu(p,d,f)}),o.classList.remove(le.autosizing),r}const bNt=e=>W({},e,{columnResize:{resizingColumnField:""}});function wNt(){return{colDef:void 0,initialColWidth:0,initialTotalWidth:0,previousMouseClickEvent:void 0,columnHeaderElement:void 0,headerFilterElement:void 0,groupHeaderElements:[],cellElements:[],leftPinnedCellsAfter:[],rightPinnedCellsBefore:[],fillerLeft:void 0,fillerRight:void 0,leftPinnedHeadersAfter:[],rightPinnedHeadersBefore:[]}}const xNt=(e,t)=>{const n=dr(),r=Wo(e,"useGridColumnResize"),o=Au(wNt).current,i=v.useRef(),a=v.useRef(),s=p0(),l=v.useRef(),c=k=>{var _,z;r.debug(`Updating width to ${k} for col ${o.colDef.field}`);const O=o.columnHeaderElement.offsetWidth,$=k-O,N=k-o.initialColWidth,L=o.initialTotalWidth+N;(z=(_=e.current.rootElementRef)==null?void 0:_.current)==null||z.style.setProperty("--DataGrid-rowWidth",`${L}px`),o.colDef.computedWidth=k,o.colDef.width=k,o.colDef.flex=0,o.columnHeaderElement.style.width=`${k}px`;const j=o.headerFilterElement;j&&(j.style.width=`${k}px`),o.groupHeaderElements.forEach(F=>{const V=F;let U;V.getAttribute("aria-colspan")==="1"?U=`${k}px`:U=`${V.offsetWidth+$}px`,V.style.width=U}),o.cellElements.forEach(F=>{const V=F;let U;V.getAttribute("aria-colspan")==="1"?U=`${k}px`:U=`${V.offsetWidth+$}px`,V.style.setProperty("--width",U)});const D=e.current.unstable_applyPipeProcessors("isColumnPinned",!1,o.colDef.field);D===br.LEFT&&(Gm(o.fillerLeft,"width",$),o.leftPinnedCellsAfter.forEach(F=>{Gm(F,"left",$)}),o.leftPinnedHeadersAfter.forEach(F=>{Gm(F,"left",$)})),D===br.RIGHT&&(Gm(o.fillerRight,"width",$),o.rightPinnedCellsBefore.forEach(F=>{Gm(F,"right",$)}),o.rightPinnedHeadersBefore.forEach(F=>{Gm(F,"right",$)}))},u=k=>{if(w(),o.previousMouseClickEvent){const O=o.previousMouseClickEvent,$=O.timeStamp,N=O.clientX,L=O.clientY;if(k.timeStamp-$<300&&k.clientX===N&&k.clientY===L){o.previousMouseClickEvent=void 0,e.current.publishEvent("columnResizeStop",null,k);return}}if(o.colDef){e.current.setColumnWidth(o.colDef.field,o.colDef.width),r.debug(`Updating col ${o.colDef.field} with new width: ${o.colDef.width}`);const O=du(e.current.state);o.groupHeaderElements.forEach($=>{const N=SRt($),L=$,D=`${N.reduce((_,z)=>O.columnVisibilityModel[z]!==!1?_+O.lookup[z].computedWidth:_,0)}px`;L.style.width=D})}s.start(0,()=>{e.current.publishEvent("columnResizeStop",null,k)})},d=(k,O,$)=>{var D;const N=e.current.rootElementRef.current;o.initialColWidth=k.computedWidth,o.initialTotalWidth=e.current.getRootDimensions().rowWidth,o.colDef=k,o.columnHeaderElement=xRt(e.current.columnHeadersContainerRef.current,k.field);const L=N.querySelector(`.${le.headerFilterRow} [data-field="${Bd(k.field)}"]`);L&&(o.headerFilterElement=L),o.groupHeaderElements=CRt((D=e.current.columnHeadersContainerRef)==null?void 0:D.current,k.field),o.cellElements=ERt(o.columnHeaderElement,e.current),o.fillerLeft=xQ(e.current,n?"filler--pinnedRight":"filler--pinnedLeft"),o.fillerRight=xQ(e.current,n?"filler--pinnedLeft":"filler--pinnedRight");const j=e.current.unstable_applyPipeProcessors("isColumnPinned",!1,o.colDef.field);o.leftPinnedCellsAfter=j!==br.LEFT?[]:PRt(e.current,o.columnHeaderElement,n),o.rightPinnedCellsBefore=j!==br.RIGHT?[]:TRt(e.current,o.columnHeaderElement,n),o.leftPinnedHeadersAfter=j!==br.LEFT?[]:IRt(e.current,o.columnHeaderElement,n),o.rightPinnedHeadersBefore=j!==br.RIGHT?[]:ORt(e.current,o.columnHeaderElement,n),a.current=gNt(O,n),i.current=pNt($,o.columnHeaderElement.getBoundingClientRect(),a.current)},f=Ar(u),p=Ar(k=>{if(k.buttons===0){f(k);return}let O=YQ(i.current,k.clientX,o.columnHeaderElement.getBoundingClientRect(),a.current);O=fu(O,o.colDef.minWidth,o.colDef.maxWidth),c(O);const $={element:o.columnHeaderElement,colDef:o.colDef,width:O};e.current.publishEvent("columnResize",$,k)}),h=Ar(k=>{KQ(k,l.current)&&u(k)}),m=Ar(k=>{const O=KQ(k,l.current);if(!O)return;if(k.type==="mousemove"&&k.buttons===0){h(k);return}let $=YQ(i.current,O.x,o.columnHeaderElement.getBoundingClientRect(),a.current);$=fu($,o.colDef.minWidth,o.colDef.maxWidth),c($);const N={element:o.columnHeaderElement,colDef:o.colDef,width:$};e.current.publishEvent("columnResize",N,k)}),y=Ar(k=>{const O=$O(k.target,le["columnSeparator--resizable"]);if(!O)return;const $=k.changedTouches[0];$!=null&&(l.current=$.identifier);const N=$O(k.target,le.columnHeader),L=wRt(N),j=e.current.getColumn(L);r.debug(`Start Resize on col ${j.field}`),e.current.publishEvent("columnResizeStart",{field:L},k),d(j,O,$.clientX);const D=Jf(k.currentTarget);D.addEventListener("touchmove",m),D.addEventListener("touchend",h)}),w=v.useCallback(()=>{const k=Jf(e.current.rootElementRef.current);k.body.style.removeProperty("cursor"),k.removeEventListener("mousemove",p),k.removeEventListener("mouseup",f),k.removeEventListener("touchmove",m),k.removeEventListener("touchend",h),setTimeout(()=>{k.removeEventListener("click",QQ,!0)},100),o.columnHeaderElement&&(o.columnHeaderElement.style.pointerEvents="unset")},[e,o,p,f,m,h]),x=v.useCallback(({field:k})=>{e.current.setState(O=>W({},O,{columnResize:W({},O.columnResize,{resizingColumnField:k})})),e.current.forceUpdate()},[e]),C=v.useCallback(()=>{e.current.setState(k=>W({},k,{columnResize:W({},k.columnResize,{resizingColumnField:""})})),e.current.forceUpdate()},[e]),E=Ar(({colDef:k},O)=>{if(O.button!==0||!O.currentTarget.classList.contains(le["columnSeparator--resizable"]))return;O.preventDefault(),r.debug(`Start Resize on col ${k.field}`),e.current.publishEvent("columnResizeStart",{field:k.field},O),d(k,O.currentTarget,O.clientX);const $=Jf(e.current.rootElementRef.current);$.body.style.cursor="col-resize",o.previousMouseClickEvent=O.nativeEvent,$.addEventListener("mousemove",p),$.addEventListener("mouseup",f),$.addEventListener("click",QQ,!0)}),P=Ar((k,O)=>{if(t.disableAutosize||O.button!==0)return;const $=e.current.state.columns.lookup[k.field];$.resizable!==!1&&e.current.autosizeColumns(W({},t.autosizeOptions,{columns:[$.field]}))}),T=mNt(e),I=v.useRef(!1),A=v.useCallback(async k=>{var j;if(!((j=e.current.rootElementRef)==null?void 0:j.current)||I.current)return;I.current=!0;const $=du(e.current.state),N=W({},sRt,k,{columns:(k==null?void 0:k.columns)??$.orderedFields});N.columns=N.columns.filter(D=>$.columnVisibilityModel[D]!==!1);const L=N.columns.map(D=>e.current.state.columns.lookup[D]);try{e.current.unstable_setColumnVirtualization(!1),await T();const D=vNt(e,N,L),_=L.map(z=>W({},z,{width:D[z.field],computedWidth:D[z.field]}));if(N.expand){const F=$.orderedFields.map(q=>$.lookup[q]).filter(q=>$.columnVisibilityModel[q.field]!==!1).reduce((q,X)=>q+(D[X.field]??X.computedWidth??X.width),0),U=e.current.getRootDimensions().viewportInnerSize.width-F;if(U>0){const q=U/(_.length||1);_.forEach(X=>{X.width+=q,X.computedWidth+=q})}}e.current.updateColumns(_),_.forEach((z,F)=>{if(z.width!==L[F].width){const V=z.width;e.current.publishEvent("columnWidthChange",{element:e.current.getColumnHeaderElement(z.field),colDef:z,width:V})}})}finally{e.current.unstable_setColumnVirtualization(!0),I.current=!1}},[e,T]);v.useEffect(()=>w,[w]),LM(()=>{t.autosizeOnMount&&Promise.resolve().then(()=>{e.current.autosizeColumns(t.autosizeOptions)})}),Efe(e,()=>{var k;return(k=e.current.columnHeadersContainerRef)==null?void 0:k.current},"touchstart",y,{passive:!0}),ln(e,{autosizeColumns:A},"public"),bt(e,"columnResizeStop",C),bt(e,"columnResizeStart",x),bt(e,"columnSeparatorMouseDown",E),bt(e,"columnSeparatorDoubleClick",P),yr(e,"columnResize",t.onColumnResize),yr(e,"columnWidthChange",t.onColumnWidthChange)};function Gm(e,t,n){e&&(e.style[t]=`${parseInt(e.style[t],10)+n}px`)}function SNt(e,t){return e.firstRowIndex>=t.firstRowIndex&&e.lastRowIndex<=t.lastRowIndex?null:e.firstRowIndex>=t.firstRowIndex&&e.lastRowIndex>t.lastRowIndex?{firstRowIndex:t.lastRowIndex,lastRowIndex:e.lastRowIndex}:e.firstRowIndex{if(!e)return null;let r=e[t.field];const o=t.rowSpanValueGetter??t.valueGetter;return o&&(r=o(r,e,t,n)),r},NO={spannedCells:{},hiddenCells:{},hiddenCellOriginMap:{}},Ix={firstRowIndex:0,lastRowIndex:0},ENt=new Set([Yu,"__reorder__",zM]),lpe=20,cpe=(e,t,n,r,o,i,a)=>{const s=i?{}:W({},e.current.state.rowSpanning.spannedCells),l=i?{}:W({},e.current.state.rowSpanning.hiddenCells),c=i?{}:W({},e.current.state.rowSpanning.hiddenCellOriginMap);return i&&(a=Ix),t.forEach(u=>{var d;if(!ENt.has(u.field)){for(let f=o.firstRowIndex;f<=o.lastRowIndex;f+=1){const p=n[f];if((d=l[p.id])!=null&&d[u.field])continue;const h=E_(p.model,u,e);if(h==null)continue;let m=p.id,y=f,w=0;const x=[];if(f===o.firstRowIndex){let E=f-1;const P=n[E];for(;E>=r.firstRowIndex&&E_(P.model,u,e)===h;){const T=n[E+1];l[T.id]?l[T.id][u.field]=!0:l[T.id]={[u.field]:!0},x.push(f),w+=1,m=P.id,y=E,E-=1}}x.forEach(E=>{c[E]?c[E][u.field]=y:c[E]={[u.field]:y}});let C=f+1;for(;C<=r.lastRowIndex&&n[C]&&E_(n[C].model,u,e)===h;){const E=n[C];l[E.id]?l[E.id][u.field]=!0:l[E.id]={[u.field]:!0},c[C]?c[C][u.field]=y:c[C]={[u.field]:y},C+=1,w+=1}w>0&&(s[m]?s[m][u.field]=w+1:s[m]={[u.field]:w+1})}a={firstRowIndex:Math.min(a.firstRowIndex,o.firstRowIndex),lastRowIndex:Math.max(a.lastRowIndex,o.lastRowIndex)}}}),{spannedCells:s,hiddenCells:l,hiddenCellOriginMap:c,processedRange:a}},PNt=(e,t,n)=>{var r;if(t.unstable_rowSpanning){const o=e.rows.dataRowIds||[],i=e.columns.orderedFields||[],a=e.rows.dataRowIdToModelLookup,s=e.columns.lookup,l=!!e.filter.filterModel.items.length||!!((r=e.filter.filterModel.quickFilterValues)!=null&&r.length);if(!o.length||!i.length||!a||!s||l)return W({},e,{rowSpanning:NO});const c={firstRowIndex:0,lastRowIndex:Math.min(lpe-1,Math.max(o.length-1,0))},u=o.map(m=>({id:m,model:a[m]})),d=i.map(m=>s[m]),{spannedCells:f,hiddenCells:p,hiddenCellOriginMap:h}=cpe(n,d,u,c,c,!0,Ix);return W({},e,{rowSpanning:{spannedCells:f,hiddenCells:p,hiddenCellOriginMap:h}})}return W({},e,{rowSpanning:NO})},TNt=(e,t)=>{const{range:n,rows:r}=Up(e,t),o=Ye(e,KM),i=Ye(e,Io),a=Au(()=>Object.keys(e.current.state.rowSpanning.spannedCells).length>0?{firstRowIndex:0,lastRowIndex:Math.min(lpe-1,Math.max(e.current.state.rows.dataRowIds.length-1,0))}:Ix),s=v.useRef(Ix),l=v.useCallback((f=!0)=>{if(!t.unstable_rowSpanning){e.current.state.rowSpanning!==NO&&e.current.setState(I=>W({},I,{rowSpanning:NO}));return}if(n===null||!CNt(o))return;f&&(a.current=Ix);const p=SNt({firstRowIndex:o.firstRowIndex,lastRowIndex:Math.min(o.lastRowIndex-1,n.lastRowIndex)},a.current);if(p===null)return;const{spannedCells:h,hiddenCells:m,hiddenCellOriginMap:y,processedRange:w}=cpe(e,i,r,n,p,f,a.current);a.current=w;const x=Object.keys(h).length,C=Object.keys(m).length,E=Object.keys(e.current.state.rowSpanning.spannedCells).length,P=Object.keys(e.current.state.rowSpanning.hiddenCells).length;(f||x!==E||C!==P)&&e.current.setState(I=>W({},I,{rowSpanning:{spannedCells:h,hiddenCells:m,hiddenCellOriginMap:y}}))},[e,t.unstable_rowSpanning,n,o,r,i,a]),c=v.useRef(o),u=v.useRef(!0),d=v.useRef(!1);v.useEffect(()=>{const f=u.current;if(u.current&&(u.current=!1),n&&s.current&&XQ(n,s.current)&&(s.current=n,d.current=!0),!f&&c.current!==o){XQ(c.current,o)&&(l(d.current),d.current=!1),c.current=o;return}l()},[l,o,n,s])},INt=(e,t,n)=>W({},e,{listViewColumn:t.unstable_listColumn?W({},t.unstable_listColumn,{computedWidth:ej(n)}):void 0});function ONt(e,t){const n=()=>{e.current.setState(i=>i.listViewColumn?W({},i,{listViewColumn:W({},i.listViewColumn,{computedWidth:ej(e)})}):i)},r=v.useRef(null);bt(e,"viewportInnerSizeChange",i=>{r.current!==i.width&&(r.current=i.width,n())}),bt(e,"columnVisibilityModelChange",n),v.useEffect(()=>{const i=t.unstable_listColumn;i&&e.current.setState(a=>W({},a,{listViewColumn:W({},i,{computedWidth:ej(e)})}))},[e,t.unstable_listColumn]),v.useEffect(()=>{t.unstable_listView&&t.unstable_listColumn},[t.unstable_listView,t.unstable_listColumn])}function ej(e){return wi(e.current.state).viewportInnerSize.width}const ANt=(e,t)=>{const n=K_t(e,t);return G2t(n,t),V2t(n),Ko(Z2t,n,t),Ko(H2t,n,t),Ko(n2t,n,t),Ko(L2t,n,t),Ko(_2t,n,t),Ko(m2t,n,t),Ko(q2t,n,t),Ko(I2t,n,t),Ko(f2t,n,t),Ko(PNt,n,t),Ko(o2t,n,t),Ko(bNt,n,t),Ko(P2t,n,t),Ko(oNt,n,t),Ko(e2t,n,t),Ko(uNt,n,t),Ko(wMt,n,t),Ko(INt,n,t),S2t(n,t),U2t(n,t),r2t(n,t),F2t(n,t),TNt(n,t),MRt(n,t),sNt(n),dNt(n,t),N2t(n,t),y2t(n,t),O2t(n,t),g2t(n,t),K2t(n,t),i2t(n,t),xNt(n,t),T2t(n,t),iNt(n,t),Y2t(n,t),t2t(n),s2t(n,t),d2t(n,t),Z_t(n,t),eNt(n,t),Q2t(n,t),aNt(n),xMt(n,t),ONt(n,t),n},kNt=e=>{const{classes:t,headerAlign:n,isDragging:r,isLastColumn:o,showLeftBorder:i,showRightBorder:a,groupId:s,pinnedPosition:l}=e;return Tn({root:["columnHeader",n==="left"&&"columnHeader--alignLeft",n==="center"&&"columnHeader--alignCenter",n==="right"&&"columnHeader--alignRight",r&&"columnHeader--moving",a&&"columnHeader--withRightBorder",i&&"columnHeader--withLeftBorder","withBorderColor",s===null?"columnHeader--emptyGroup":"columnHeader--filledGroup",l==="left"&&"columnHeader--pinnedLeft",l==="right"&&"columnHeader--pinnedRight",o&&"columnHeader--last"],draggableContainer:["columnHeaderDraggableContainer"],titleContainer:["columnHeaderTitleContainer","withBorderColor"],titleContainerContent:["columnHeaderTitleContainerContent"]},In,t)};function MNt(e){var q;const{groupId:t,width:n,depth:r,maxDepth:o,fields:i,height:a,colIndex:s,hasFocus:l,tabIndex:c,isLastColumn:u,pinnedPosition:d,style:f,indexInSection:p,sectionLength:h,gridHasFiller:m}=e,y=Ot(),w=v.useRef(null),x=En(),C=Ye(x,Dfe),E=t?C[t]:{},{headerName:P=t??"",description:T="",headerAlign:I=void 0}=E;let A;const k=t&&((q=C[t])==null?void 0:q.renderHeaderGroup),O=v.useMemo(()=>({groupId:t,headerName:P,description:T,depth:r,maxDepth:o,fields:i,colIndex:s,isLastColumn:u}),[t,P,T,r,o,i,s,u]);t&&k&&(A=k(O));const $=QM(d,p),N=YM(d,p,h,y.showColumnVerticalBorder,m),L=W({},e,{classes:y.classes,showLeftBorder:$,showRightBorder:N,headerAlign:I,depth:r,isDragging:!1}),j=P??t,D=To(),_=t===null?`empty-group-cell-${D}`:t,z=kNt(L);v.useLayoutEffect(()=>{if(l){const ie=w.current.querySelector('[tabindex="0"]')||w.current;ie==null||ie.focus()}},[x,l]);const F=v.useCallback(X=>ie=>{C1(ie)||x.current.publishEvent(X,O,ie)},[x,O]),V=v.useMemo(()=>({onKeyDown:F("columnGroupHeaderKeyDown"),onFocus:F("columnGroupHeaderFocus"),onBlur:F("columnGroupHeaderBlur")}),[F]),U=typeof E.headerClassName=="function"?E.headerClassName(O):E.headerClassName;return R.jsx(Qfe,W({ref:w,classes:z,columnMenuOpen:!1,colIndex:s,height:a,isResizing:!1,sortDirection:null,hasFocus:!1,tabIndex:c,isDraggable:!1,headerComponent:A,headerClassName:U,description:T,elementId:_,width:n,columnMenuIconButton:null,columnTitleIconButtons:null,resizable:!1,label:j,"aria-colspan":i.length,"data-fields":`|-${i.join("-|-")}-|`,style:f},V))}const JQ=oe("div",{name:"MuiDataGrid",slot:"ColumnHeaderRow",overridesResolver:(e,t)=>t.columnHeaderRow})({display:"flex"}),RNt=e=>{const{visibleColumns:t,sortColumnLookup:n,filterColumnLookup:r,columnHeaderTabIndexState:o,columnGroupHeaderTabIndexState:i,columnHeaderFocus:a,columnGroupHeaderFocus:s,headerGroupingMaxDepth:l,columnMenuState:c,columnVisibility:u,columnGroupsHeaderStructure:d,hasOtherElementInTabSequence:f}=e,[p,h]=v.useState(""),[m,y]=v.useState(""),w=Ul(),x=dr(),C=Ot(),E=Ye(w,wi),P=Ye(w,t5),T=Ye(w,$fe),I=Ye(w,Vp),A=Ye(w,bMt),k=Ye(w,b1),O=Ye(w,jd),$=jfe(I,A,k.left.length),N=E.columnsTotalWidth{w.current.columnHeadersContainerRef.current&&(w.current.columnHeadersContainerRef.current.scrollLeft=0)},[w]);const L=v.useCallback(te=>y(te.field),[]),j=v.useCallback(()=>y(""),[]),D=v.useCallback(te=>h(te.field),[]),_=v.useCallback(()=>h(""),[]),z=v.useMemo(()=>k.left.length?{firstColumnIndex:0,lastColumnIndex:k.left.length}:null,[k.left.length]),F=v.useMemo(()=>k.right.length?{firstColumnIndex:t.length-k.right.length,lastColumnIndex:t.length}:null,[k.right.length,t.length]);bt(w,"columnResizeStart",L),bt(w,"columnResizeStop",j),bt(w,"columnHeaderDragStart",D),bt(w,"columnHeaderDragEnd",_);const V=te=>{const{renderContext:pe=A,maxLastColumn:ae=t.length}=te||{},se=pe.firstColumnIndex,re=P?pe.lastColumnIndex:ae;return{renderedColumns:t.slice(se,re),firstColumnToRender:se,lastColumnToRender:re}},U=(te,pe,ae,se=!1)=>{const re=(te==null?void 0:te.position)===br.RIGHT,fe=(te==null?void 0:te.position)===void 0,Z=k.right.length>0&&re||k.right.length===0&&fe,ce=$-ae;return R.jsxs(v.Fragment,{children:[fe&&R.jsx("div",{role:"presentation",style:{width:ce}}),pe,fe&&R.jsx("div",{role:"presentation",className:de(le.filler,se&&le["filler--borderBottom"])}),Z&&R.jsx(a5,{header:!0,pinnedRight:re,borderBottom:se,borderTop:!1})]})},q=({pinnedPosition:te,columnIndex:pe,computedWidth:ae})=>{let se;const re=te===br.LEFT,fe=te===br.RIGHT;if(re||fe){const Z=i5(te,ae,pe,I,E);let ce=re?"left":"right";x&&(ce=re?"right":"left"),te==="left"&&(se={[ce]:Z}),te==="right"&&(se={[ce]:Z})}return se},X=(te,pe={})=>{const{renderedColumns:ae,firstColumnToRender:se}=V(te),re=[];for(let fe=0;feR.jsxs(JQ,{role:"row","aria-rowindex":l+1,ownerState:C,className:le["row--borderBottom"],children:[z&&X({position:br.LEFT,renderContext:z,maxLastColumn:z.lastColumnIndex},{disableReorder:!0}),X({renderContext:A,maxLastColumn:t.length-k.right.length}),F&&X({position:br.RIGHT,renderContext:F,maxLastColumn:F.lastColumnIndex},{disableReorder:!0,separatorSide:o5.Left})]}),ee=({depth:te,params:pe})=>{var Ae,Me;const ae=V(pe);if(ae.renderedColumns.length===0)return null;const{firstColumnToRender:se,lastColumnToRender:re}=ae,fe=d[te],Z=t[se].field,ce=((Ae=T[Z])==null?void 0:Ae[te])??null,ge=fe.findIndex(({groupId:We,columnFields:He})=>We===ce&&He.includes(Z)),we=t[re-1].field,me=((Me=T[we])==null?void 0:Me[te])??null,Se=fe.findIndex(({groupId:We,columnFields:He})=>We===me&&He.includes(we)),xe=fe.slice(ge,Se+1).map(We=>W({},We,{columnFields:We.columnFields.filter(He=>u[He]!==!1)})).filter(We=>We.columnFields.length>0),ke=xe[0].columnFields.indexOf(Z),_e=xe[0].columnFields.slice(0,ke).reduce((We,He)=>{const Xe=O[He];return We+(Xe.computedWidth??0)},0);let ye=se;const Pe=xe.map(({groupId:We,columnFields:He},Xe)=>{const ht=s!==null&&s.depth===te&&He.includes(s.field),ot=i!==null&&i.depth===te&&He.includes(i.field)?0:-1,et={groupId:We,width:He.reduce(($e,Qe)=>$e+O[Qe].computedWidth,0),fields:He,colIndex:ye,hasFocus:ht,tabIndex:ot},St=pe.position,On=q({pinnedPosition:St,columnIndex:ye,computedWidth:et.width});ye+=He.length;let Ke=Xe;return St==="left"&&(Ke=ye-1),R.jsx(MNt,{groupId:We,width:et.width,fields:et.fields,colIndex:et.colIndex,depth:te,isLastColumn:et.colIndex===t.length-et.fields.length,maxDepth:l,height:E.groupHeaderHeight,hasFocus:ht,tabIndex:ot,pinnedPosition:St,style:On,indexInSection:Ke,sectionLength:fe.length,gridHasFiller:N},Xe)});return U(pe,Pe,_e)};return{renderContext:A,leftRenderContext:z,rightRenderContext:F,pinnedColumns:k,visibleColumns:t,getCellOffsetStyle:q,getFillers:U,getColumnHeadersRow:ie,getColumnsToRender:V,getColumnGroupHeadersRows:()=>{if(l===0)return null;const te=[];for(let pe=0;pe({role:"rowgroup"})}},$Nt=["className"],DNt=e=>{const{classes:t}=e;return Tn({root:["columnHeaders"]},In,t)},_Nt=or("div",{name:"MuiDataGrid",slot:"ColumnHeaders",overridesResolver:(e,t)=>t.columnHeaders})({display:"flex",flexDirection:"column",borderTopLeftRadius:"var(--unstable_DataGrid-radius)",borderTopRightRadius:"var(--unstable_DataGrid-radius)"}),NNt=v.forwardRef(function(t,n){const{className:r}=t,o=Dt(t,$Nt),i=Ot(),a=DNt(i);return R.jsx(_Nt,W({ref:n,className:de(a.root,r),ownerState:i},o,{role:"presentation"}))}),LNt=["className","visibleColumns","sortColumnLookup","filterColumnLookup","columnHeaderTabIndexState","columnGroupHeaderTabIndexState","columnHeaderFocus","columnGroupHeaderFocus","headerGroupingMaxDepth","columnMenuState","columnVisibility","columnGroupsHeaderStructure","hasOtherElementInTabSequence"],FNt=v.forwardRef(function(t,n){const{visibleColumns:r,sortColumnLookup:o,filterColumnLookup:i,columnHeaderTabIndexState:a,columnGroupHeaderTabIndexState:s,columnHeaderFocus:l,columnGroupHeaderFocus:c,headerGroupingMaxDepth:u,columnMenuState:d,columnVisibility:f,columnGroupsHeaderStructure:p,hasOtherElementInTabSequence:h}=t,m=Dt(t,LNt),{getInnerProps:y,getColumnHeadersRow:w,getColumnGroupHeadersRows:x}=RNt({visibleColumns:r,sortColumnLookup:o,filterColumnLookup:i,columnHeaderTabIndexState:a,columnGroupHeaderTabIndexState:s,columnHeaderFocus:l,columnGroupHeaderFocus:c,headerGroupingMaxDepth:u,columnMenuState:d,columnVisibility:f,columnGroupsHeaderStructure:p,hasOtherElementInTabSequence:h});return R.jsxs(NNt,W({ref:n},m,y(),{children:[x(),w()]}))}),jNt=zp(FNt);function BNt(e){return null}function zNt(e){return null}const VNt=v.forwardRef(function(t,n){const o=En().current.getLocaleText("noResultsOverlayLabel");return R.jsx(r5,W({ref:n},t,{children:o}))}),HNt=["sortingOrder"],UNt=v.memo(function(t){const{sortingOrder:n}=t,r=Dt(t,HNt),o=Ot(),[i]=n,a=i==="asc"?o.slots.columnSortedAscendingIcon:o.slots.columnSortedDescendingIcon;return a?R.jsx(a,W({},r)):null}),WNt=["native"];function GNt(e){let{native:t}=e,n=Dt(e,WNt);return t?R.jsx("option",W({},n)):R.jsx(en,W({},n))}const qNt={booleanCellTrueIcon:G$t,booleanCellFalseIcon:w_,columnMenuIcon:V$t,openFilterButtonIcon:_$t,filterPanelDeleteIcon:w_,columnFilteredIcon:MQ,columnSelectorIcon:L$t,columnUnsortedIcon:UNt,columnSortedAscendingIcon:IQ,columnSortedDescendingIcon:OQ,columnResizeIcon:F$t,densityCompactIcon:j$t,densityStandardIcon:B$t,densityComfortableIcon:z$t,exportIcon:W$t,moreActionsIcon:q$t,treeDataCollapseIcon:kQ,treeDataExpandIcon:AQ,groupingCriteriaCollapseIcon:kQ,groupingCriteriaExpandIcon:AQ,detailPanelExpandIcon:RQ,detailPanelCollapseIcon:H$t,rowReorderIcon:$Q,quickFilterIcon:N$t,quickFilterClearIcon:w_,columnMenuHideIcon:K$t,columnMenuSortAscendingIcon:IQ,columnMenuSortDescendingIcon:OQ,columnMenuFilterIcon:MQ,columnMenuManageColumnsIcon:Y$t,columnMenuClearIcon:Q$t,loadIcon:U$t,filterPanelAddIcon:RQ,filterPanelRemoveAllIcon:X$t,columnReorderIcon:$Q},KNt=W({},qNt,{baseBadge:Wke,baseCheckbox:BMe,baseDivider:kl,baseTextField:nn,baseFormControl:_g,baseSelect:Pp,baseButton:dt,baseIconButton:vn,baseInputAdornment:So,baseTooltip:kc,basePopper:Sp,baseInputLabel:Ng,baseSelectOption:GNt,baseChip:mu}),YNt=W({},KNt,{cell:NRt,skeletonCell:WRt,columnHeaderFilterIconButton:D$t,columnHeaderSortIcon:R$t,columnMenu:gDt,columnHeaders:jNt,detailPanels:BNt,footer:s_t,footerRowCount:E_t,toolbar:null,pinnedRows:zNt,loadingOverlay:g_t,noResultsOverlay:VNt,noRowsOverlay:m_t,pagination:w_t,filterPanel:JDt,columnsPanel:IDt,columnsManagement:tpe,panel:RDt,row:A_t});function QNt({defaultSlots:e,slots:t}){const n=t;if(!n||Object.keys(n).length===0)return e;const r=W({},e);return Object.keys(n).forEach(o=>{const i=o;n[i]!==void 0&&(r[i]=n[i])}),r}function XNt(e){const t=Object.keys(e);if(!t.some(o=>o.startsWith("aria-")||o.startsWith("data-")))return e;const n={},r=e.forwardedProps??{};for(let o=0;oXNt(e),[e])}const ZNt={disableMultipleColumnsFiltering:!0,disableMultipleColumnsSorting:!0,throttleRowsMs:void 0,hideFooterRowCount:!1,pagination:!0,checkboxSelectionVisibleOnly:!1,disableColumnReorder:!0,keepColumnPositionIfDraggedOutside:!1,signature:"DataGrid",unstable_listView:!1},eLt=YNt,tLt=e=>{const t=JNt(cn({props:e,name:"MuiDataGrid"})),n=v.useMemo(()=>W({},fOt,t.localeText),[t.localeText]),r=v.useMemo(()=>QNt({defaultSlots:eLt,slots:t.slots}),[t.slots]),o=v.useMemo(()=>Object.keys(XF).reduce((i,a)=>(i[a]=t[a]??XF[a],i),{}),[t]);return v.useMemo(()=>W({},t,o,{localeText:n,slots:r},ZNt),[t,n,r,o])},nLt={hooks:{useGridAriaAttributes:k_t,useGridRowAriaAttributes:M_t}},upe=v.forwardRef(function(t,n){const r=tLt(t),o=ANt(r.apiRef,r);return R.jsx(R_t,{privateApiRef:o,configuration:nLt,props:r,children:R.jsxs(t$t,W({className:r.className,style:r.style,sx:r.sx,ref:n},r.forwardedProps,{children:[R.jsx(c_t,{}),R.jsx(pRt,{}),R.jsx(hRt,{})]}))})}),rLt=v.memo(upe);upe.propTypes={apiRef:B.shape({current:B.object.isRequired}),"aria-label":B.string,"aria-labelledby":B.string,autoHeight:B.bool,autoPageSize:B.bool,autosizeOnMount:B.bool,autosizeOptions:B.shape({columns:B.arrayOf(B.string),expand:B.bool,includeHeaders:B.bool,includeOutliers:B.bool,outliersFactor:B.number}),cellModesModel:B.object,checkboxSelection:B.bool,classes:B.object,clipboardCopyCellDelimiter:B.string,columnBufferPx:B.number,columnGroupHeaderHeight:B.number,columnGroupingModel:B.arrayOf(B.object),columnHeaderHeight:B.number,columns:B.arrayOf(B.object).isRequired,columnVisibilityModel:B.object,density:B.oneOf(["comfortable","compact","standard"]),disableAutosize:B.bool,disableColumnFilter:B.bool,disableColumnMenu:B.bool,disableColumnResize:B.bool,disableColumnSelector:B.bool,disableColumnSorting:B.bool,disableDensitySelector:B.bool,disableEval:B.bool,disableMultipleRowSelection:B.bool,disableRowSelectionOnClick:B.bool,disableVirtualization:B.bool,editMode:B.oneOf(["cell","row"]),estimatedRowCount:B.number,experimentalFeatures:B.shape({warnIfFocusStateIsNotSynced:B.bool}),filterDebounceMs:B.number,filterMode:B.oneOf(["client","server"]),filterModel:B.shape({items:B.arrayOf(B.shape({field:B.string.isRequired,id:B.oneOfType([B.number,B.string]),operator:B.string.isRequired,value:B.any})).isRequired,logicOperator:B.oneOf(["and","or"]),quickFilterExcludeHiddenColumns:B.bool,quickFilterLogicOperator:B.oneOf(["and","or"]),quickFilterValues:B.array}),forwardedProps:B.object,getCellClassName:B.func,getDetailPanelContent:B.func,getEstimatedRowHeight:B.func,getRowClassName:B.func,getRowHeight:B.func,getRowId:B.func,getRowSpacing:B.func,hideFooter:B.bool,hideFooterPagination:B.bool,hideFooterSelectedRowCount:B.bool,ignoreDiacritics:B.bool,ignoreValueFormatterDuringExport:B.oneOfType([B.shape({clipboardExport:B.bool,csvExport:B.bool}),B.bool]),indeterminateCheckboxAction:B.oneOf(["deselect","select"]),initialState:B.object,isCellEditable:B.func,isRowSelectable:B.func,keepNonExistentRowsSelected:B.bool,loading:B.bool,localeText:B.object,logger:B.shape({debug:B.func.isRequired,error:B.func.isRequired,info:B.func.isRequired,warn:B.func.isRequired}),logLevel:B.oneOf(["debug","error","info","warn",!1]),nonce:B.string,onCellClick:B.func,onCellDoubleClick:B.func,onCellEditStart:B.func,onCellEditStop:B.func,onCellKeyDown:B.func,onCellModesModelChange:B.func,onClipboardCopy:B.func,onColumnHeaderClick:B.func,onColumnHeaderContextMenu:B.func,onColumnHeaderDoubleClick:B.func,onColumnHeaderEnter:B.func,onColumnHeaderLeave:B.func,onColumnHeaderOut:B.func,onColumnHeaderOver:B.func,onColumnOrderChange:B.func,onColumnResize:B.func,onColumnVisibilityModelChange:B.func,onColumnWidthChange:B.func,onDensityChange:B.func,onFilterModelChange:B.func,onMenuClose:B.func,onMenuOpen:B.func,onPaginationMetaChange:B.func,onPaginationModelChange:B.func,onPreferencePanelClose:B.func,onPreferencePanelOpen:B.func,onProcessRowUpdateError:B.func,onResize:B.func,onRowClick:B.func,onRowCountChange:B.func,onRowDoubleClick:B.func,onRowEditStart:B.func,onRowEditStop:B.func,onRowModesModelChange:B.func,onRowSelectionModelChange:B.func,onSortModelChange:B.func,onStateChange:B.func,pageSizeOptions:B.arrayOf(B.oneOfType([B.number,B.shape({label:B.string.isRequired,value:B.number.isRequired})]).isRequired),pagination:B.oneOf([!0]),paginationMeta:B.shape({hasNextPage:B.bool}),paginationMode:B.oneOf(["client","server"]),paginationModel:B.shape({page:B.number.isRequired,pageSize:B.number.isRequired}),processRowUpdate:B.func,resizeThrottleMs:B.number,rowBufferPx:B.number,rowCount:B.number,rowHeight:B.number,rowModesModel:B.object,rowPositionsDebounceMs:B.number,rows:B.arrayOf(B.object),rowSelection:B.bool,rowSelectionModel:B.oneOfType([B.arrayOf(B.oneOfType([B.number,B.string]).isRequired),B.number,B.string]),rowSpacingType:B.oneOf(["border","margin"]),scrollbarSize:B.number,showCellVerticalBorder:B.bool,showColumnVerticalBorder:B.bool,slotProps:B.object,slots:B.object,sortingMode:B.oneOf(["client","server"]),sortingOrder:B.arrayOf(B.oneOf(["asc","desc"])),sortModel:B.arrayOf(B.shape({field:B.string.isRequired,sort:B.oneOf(["asc","desc"])})),sx:B.oneOfType([B.arrayOf(B.oneOfType([B.func,B.object,B.bool])),B.func,B.object]),unstable_rowSpanning:B.bool};const oLt=e=>e.map(t=>({id:t.id,category:t.category,date:t.date,value:t.value,notes:t.notes})),iLt=e=>{const[t]=Le(),n=oLt(e.category.entries),r=Hde(),o=tOt(),[i,a]=Y.useState(n),[s,l]=Y.useState({}),c=(x,C)=>{x.reason===tc.rowFocusOut&&(C.defaultMuiPrevented=!0)},u=x=>()=>{l({...s,[x]:{mode:qn.Edit}})},d=x=>()=>{l({...s,[x]:{mode:qn.View}})},f=x=>async()=>{console.log("deleting entry",x),o.mutate(parseInt(x.toString())),a(i.filter(C=>C.id!==x))},p=x=>()=>{l({...s,[x]:{mode:qn.View,ignoreModifications:!0}});const C=i.find(E=>E.id===x);(C==null?void 0:C.id)===null&&a(i.filter(E=>E.id!==x))},h=async x=>{r.mutate({id:x.id,categoryId:x.category,date:x.date,value:x.value,notes:x.notes});const C={...x,isNew:!1};return a(i.map(E=>E.id===x.id?C:E)),C},m=x=>{console.log(x)},y=x=>{l(x)},w=[{field:"value",headerName:t("value"),width:80,editable:!0,valueFormatter:x=>x==null?"":x+e.category.unit},{field:"date",headerName:t("date"),type:"date",width:120,editable:!0,valueFormatter:x=>x==null?"":yt.fromJSDate(x).toLocaleString(yt.DATE_MED)},{field:"notes",headerName:t("notes"),type:"string",flex:1,editable:!0},{field:"actions",type:"actions",headerName:t("actions"),width:100,cellClassName:"actions",getActions:({id:x})=>{var E;return((E=s[x])==null?void 0:E.mode)===qn.Edit?[b(SP,{icon:b(DTt,{}),label:"Save",sx:{color:"primary.main"},onClick:d(x)}),b(SP,{icon:b(FC,{}),label:"Cancel",className:"textPrimary",onClick:p(x),color:"inherit"})]:[b(SP,{icon:b(NM,{}),label:"Edit",className:"textPrimary",onClick:u(x),color:"inherit"}),b(SP,{icon:b($de,{}),label:"Delete",onClick:f(x),color:"inherit"})]}}];return b(on,{sx:{width:"100%"},children:b(rLt,{editMode:"row",rows:n,columns:w,initialState:{pagination:{paginationModel:{pageSize:PG.pageSize}}},pageSizeOptions:PG.pageSizeOptions,disableRowSelectionOnClick:!0,rowModesModel:s,onRowModesModelChange:y,onRowEditStop:c,processRowUpdate:h,onProcessRowUpdateError:m,slotProps:{toolbar:{setRows:a,setRowModesModel:l}}})})},dpe=({category:e,closeFn:t})=>{const[n]=Le(),r=XIt(),o=JIt(e==null?void 0:e.id),i=za({name:La().required(n("forms.fieldRequired")).max(20,n("forms.maxLength",{chars:"20"})).min(3,n("forms.minLength",{chars:"3"})),unit:La().required(n("forms.fieldRequired")).max(5,n("forms.maxLength",{chars:"5"}))});return b(Ba,{initialValues:{name:e?e.name:"",unit:e?e.unit:""},validationSchema:i,onSubmit:async a=>{e?o.mutate({...a,id:e.id}):r.mutate(a),t&&t()},children:a=>b(fa,{children:K(Wt,{spacing:2,children:[b(nn,{fullWidth:!0,id:"name",label:n("name"),error:a.touched.name&&!!a.touched.name,helperText:a.touched.name&&a.errors.name,...a.getFieldProps("name")}),b(nn,{fullWidth:!0,id:"unit",label:n("unit"),error:a.touched.unit&&!!a.errors.unit,helperText:a.touched.unit&&a.errors.unit?a.errors.unit:n("measurements.unitFormHelpText"),...a.getFieldProps("unit")}),b(Wt,{direction:"row",justifyContent:"end",sx:{mt:2},children:b(dt,{color:"primary",variant:"contained",type:"submit",sx:{mt:2},children:n("submit")})})]})})})},u5=({title:e,subtitle:t,isOpen:n,message:r,deleteFn:o,closeFn:i})=>{const[a]=Le();return b(Ib,{open:n,onClose:i,"aria-labelledby":"modal-modal-title","aria-describedby":"modal-modal-description",children:K(bo,{sx:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",p:2,minWidth:"400px"},children:[b(Su,{title:e,titleTypographyProps:{variant:"h6"},subheader:t,action:b(FC,{onClick:i})}),b(_i,{children:b(st,{variant:"body1",children:r})}),K(Ms,{children:[b(dt,{color:"error",variant:"contained",onClick:()=>{o(),i()},children:a("delete")}),b(dt,{color:"primary",onClick:i,children:a("cancel")})]})]})})},aLt=e=>{const t=ZIt(e.category.id),n=Bp(),[r]=Le(),[o,i]=Y.useState(null),[a,s]=Y.useState(!1),[l,c]=Y.useState(!1),u=!!o,d=E=>{i(E.currentTarget)},f=()=>{p(),y()},p=()=>{i(null)},h=()=>{x(),i(null)},m=()=>{t.mutate(e.category.id),n(Fn(_n.MEASUREMENT_OVERVIEW))},y=()=>s(!0),w=()=>s(!1),x=()=>c(!0),C=()=>c(!1);return K("div",{children:[b(dt,{onClick:d,children:b(BH,{})}),K(Rs,{anchorEl:o,open:u,onClose:p,MenuListProps:{"aria-labelledby":"basic-button"},children:[b(en,{onClick:f,children:r("edit")}),b(en,{onClick:h,children:r("delete")})]}),b(Fi,{title:r("edit"),isOpen:a,closeFn:w,children:b(dpe,{category:e.category,closeFn:w})}),b(u5,{title:r("deleteConfirmation",{name:e.category.name}),message:r("measurements.deleteInfo"),isOpen:l,closeFn:C,deleteFn:m})]})};Qr.defaultZone=XFe;const fpe=({entry:e,closeFn:t,categoryId:n})=>{const[r,o]=Le(),i=eOt(),a=Hde(),s=Vde(n),[l,c]=Y.useState(e?yt.fromJSDate(e.date):yt.now()),u=za({value:Ea().required(r("forms.fieldRequired")).min(0,r("forms.minValue",{value:"0"})).max(1e3,r("forms.maxValue",{value:"1000"})),date:Eg().required(r("forms.fieldRequired")),notes:La().max(500,r("forms.maxLength",{value:"500"}))});return b(Ba,{initialValues:{value:e?e.value:0,date:e?e.date:new Date,notes:e?e.notes:""},validationSchema:u,onSubmit:async d=>{e?a.mutate({...d,id:e.id}):i.mutate({...d,categoryId:n}),t&&t()},children:d=>b(fa,{children:K(Wt,{spacing:2,children:[b(nn,{fullWidth:!0,id:"value",type:"number",label:r("value"),error:d.touched.value&&!!d.errors.value,helperText:d.touched.value&&d.errors.value,...d.getFieldProps("value")}),s.isLoading?b(ho,{}):b(xg,{dateAdapter:lb,adapterLocale:o.language,children:b(hO,{format:"yyyy-MM-dd",label:r("date"),value:l,disableFuture:!0,onChange:f=>{f&&d.setFieldValue("date",f.toJSDate()),c(f)},shouldDisableDate:f=>e&&gi(e.date)===gi(f.toJSDate())?!1:f?s.data.entries.some(p=>gi(p.date)===gi(f.toJSDate())):!1})}),b(nn,{fullWidth:!0,id:"notes",label:r("notes"),multiline:!0,error:d.touched.notes&&!!d.errors.notes,helperText:d.touched.notes&&d.errors.notes,...d.getFieldProps("notes")}),b(Wt,{direction:"row",justifyContent:"end",sx:{mt:2},children:b(dt,{color:"primary",variant:"contained",type:"submit",sx:{mt:2},children:r("submit")})})]})})})},sLt=()=>{const[e]=Le(),[t,n]=Y.useState(!1),r=()=>n(!0),o=()=>n(!1);return K("div",{children:[b(Dg,{color:"secondary","aria-label":"add",onClick:r,sx:{position:"fixed",bottom:"5rem",right:i=>i.spacing(2),zIndex:9},children:b(Vo,{})}),b(Fi,{title:e("add"),isOpen:t,closeFn:o,children:b(dpe,{closeFn:o})})]})},lLt=()=>{const[e]=Le(),[t,n]=Y.useState(!1),r=()=>n(!0),o=()=>n(!1),i=_c(),a=parseInt(i.categoryId);return K(wt,{children:[b(Dg,{color:"secondary","aria-label":"add",onClick:r,sx:{position:"fixed",bottom:"5rem",right:s=>s.spacing(2),zIndex:9},children:b(Vo,{})}),b(Fi,{title:e("add"),isOpen:t,closeFn:o,children:b(fpe,{closeFn:o,categoryId:a})})]})},EP=['"Open Sans Bold"',"sans-serif"].join(","),cLt=['"Open Sans Light"',"sans-serif"].join(","),ppe={spacing:8,typography:{h3:{fontFamily:EP},h4:{fontFamily:EP},h5:{fontFamily:EP},h6:{fontFamily:EP},fontFamily:cLt},palette:{primary:{main:"#2A4C7D"},secondary:{main:"#e63946"},warning:{main:"#cba328"},info:{main:"#457b9d"},success:{main:"#307916"}}},Wp=TC(ppe),uLt=e=>TC({...ppe,components:{MuiPopover:{defaultProps:{container:e}},MuiPopper:{defaultProps:{container:e}},MuiModal:{defaultProps:{container:e}}}}),hpe=e=>{const{i18n:t}=Le(),n=30,r=[...e.category.entries].sort((o,i)=>o.date.getTime()-i.date.getTime()).map(o=>({date:o.date.getTime(),value:o.value,entry:o}));return b(on,{alignItems:"center",display:"flex",flexDirection:"column",children:b(Mp,{width:"90%",height:200,children:K(qse,{data:r,children:[b(Xb,{type:"monotone",dataKey:"value",stroke:Wp.palette.secondary.main,strokeWidth:2,dot:r.length>n?!1:{strokeWidth:1,r:4},activeDot:{stroke:"black",strokeWidth:1,r:6}}),b(Bg,{stroke:"#ccc",strokeDasharray:"5 5"}),b(Bl,{dataKey:"date",type:"number",domain:["dataMin","dataMax"],tickFormatter:o=>new Date(o).toLocaleDateString(t.language),tickCount:10}),b(zl,{domain:["auto","auto"],unit:e.category.unit})]})})})},dLt=()=>{const e=_c(),t=parseInt(e.categoryId),n=Vde(t);return n.isLoading?b(ho,{}):b(Ld,{title:n.data.name,optionsMenu:b(aLt,{category:n.data}),mainContent:K(Wt,{spacing:2,children:[b(hpe,{category:n.data}),b(iLt,{category:n.data})]}),fab:b(lLt,{})})},fLt=e=>{const[t,n]=Le(),[r,o]=Y.useState(!1),i=()=>o(!0),a=()=>o(!1);return K(wt,{children:[K(bo,{children:[b(Su,{title:e.category.name,subheader:e.category.unit}),b(_i,{children:b(hpe,{category:e.category})}),K(Ms,{disableSpacing:!0,sx:{justifyContent:"space-between"},children:[b(dt,{size:"small",children:b(Da,{to:Fn(_n.MEASUREMENT_DETAIL,n.language,{id:e.category.id}),children:t("seeDetails")})}),b(vn,{onClick:i,children:b(Vo,{})})]})]}),b(Fi,{title:t("add"),isOpen:r,closeFn:a,children:b(fpe,{closeFn:a,categoryId:e.category.id})})]})},ZQ=()=>{const e=QIt(),[t]=Le();return e.isLoading?b(ho,{}):b(Ld,{title:t("measurements.measurements"),mainContent:K(Wt,{spacing:2,children:[e.data.length===0&&b(dk,{}),e.data.map(n=>b(fLt,{category:n},n.id))]}),fab:b(sLt,{})})},pT=[{range:"obese",color:"#FF5733",min:30,max:100},{range:"overweight",color:"#FFC107",min:25,max:30},{range:"normal",color:"#90EE90",min:18.5,max:25},{range:"underweight",color:"#FFC300",min:0,max:18.5}],PP=e=>{const t=pT.find(n=>n.range===e);return t?t.color:"gray"},pLt=()=>{const[e]=Le(),t=DM(),n=Vl(),[r,o]=v.useState(),[i,a]=v.useState();v.useEffect(()=>{var u;if(t.data&&t.data.length>0){const d=t.data[0],f=(u=n.data)!=null&&u.useMetric?d.weight:d.weight*.453592;a(f)}},[t.data,n.data]),v.useEffect(()=>{var u;(u=n.data)!=null&&u.height&&o(n.data.height)},[n.data]);const l=(()=>{if(r&&i){const u=r/100;return i/(u*u)}return null})();if(t.isLoading||n.isLoading)return b(ho,{});const c=[];for(let u=140;u<=220;u+=10){const d=u/100,f={height:u};let p=0;pT.forEach((h,m)=>{const y=h.max>100?100:h.max;let w=y*d*d-p;w=Math.min(w,150-p),m===0?f[h.range]=w:f[h.range]=f[pT[m-1].range]+w,p=Math.min(y*d*d,150)}),c.push(f)}return b(Ld,{title:e("bmi.calculator"),mainContent:b(wt,{children:K(Wt,{spacing:2,children:[K(Oe,{container:!0,spacing:2,children:[b(Oe,{size:{xs:12,sm:6},children:b(nn,{label:e("height"),fullWidth:!0,slotProps:{input:{endAdornment:b(st,{children:e("cm")})}},type:"number",value:r??"",onChange:u=>o(parseFloat(u.target.value))})}),b(Oe,{size:{xs:12,sm:6},children:b(nn,{label:e("weight"),slotProps:{input:{endAdornment:b(st,{children:e("server.kg")})}},fullWidth:!0,type:"number",value:i??"",onChange:u=>a(parseFloat(u.target.value))})})]}),l!==null&&b(st,{variant:"h6",children:e("bmi.result",{value:l.toFixed(1)})}),b(Mp,{width:"100%",height:400,children:K($ct,{data:c,children:[b(Bl,{dataKey:"height",type:"number",domain:[140,220],unit:"cm"}),b(zl,{domain:[40,150],tickFormatter:u=>Math.round(u).toString(),unit:"kg"}),b(Bg,{strokeDasharray:"3 3"}),b(is,{formatter:(u,d)=>[Math.round(u),e("bmi."+d)]}),pT.map(u=>b(_p,{type:"monotone",dataKey:u.range,stroke:"black",fill:u.color,fillOpacity:.8},u.range)),l!==null&&b(JC,{x:r,y:i,r:8,fill:"black",stroke:"none"})]})}),K(Wt,{direction:"row",justifyContent:"center",children:[b(on,{height:20,width:20,sx:{backgroundColor:PP("obese")}}),e("bmi.obese"),b(on,{height:20,width:20,sx:{backgroundColor:PP("overweight"),marginLeft:2}}),e("bmi.overweight"),b(on,{height:20,width:20,sx:{backgroundColor:PP("normal"),marginLeft:2}}),e("bmi.normal"),b(on,{height:20,width:20,sx:{backgroundColor:PP("underweight"),marginLeft:2}}),e("bmi.underweight")]})]})})})},hLt=e=>{var r,o,i,a;const[t,n]=Le();return K(Ht,{children:[b(Ie,{sx:{paddingX:1},children:b(Oc,{alt:(r=e.item.ingredient)==null?void 0:r.name,src:(i=(o=e.item.ingredient)==null?void 0:o.image)==null?void 0:i.url,sx:{width:45,height:45},children:b(Rd,{})})}),K(Ie,{sx:{paddingX:1},children:[e.item.amountString," ",(a=e.item.ingredient)==null?void 0:a.name]}),b(Ie,{align:"right",sx:{paddingX:1},children:t("nutrition.valueEnergyKcalKj",{kcal:Mi(e.item.nutritionalValues.energy,n.language),kj:Mi(e.item.nutritionalValues.energyKj,n.language)})}),b(Ie,{align:"right",sx:{paddingX:1},children:An(e.item.nutritionalValues.protein,n.language)}),b(Ie,{align:"right",sx:{paddingX:1},children:An(e.item.nutritionalValues.carbohydrates,n.language)}),b(Ie,{align:"right",sx:{paddingX:1},children:An(e.item.nutritionalValues.fat,n.language)})]},e.item.id)},tj=e=>{const[t,n]=Le();return b(Mc,{children:K(Ml,{children:[b(Cu,{children:K(Ht,{children:[b(Ie,{}),b(Ie,{}),b(Ie,{align:"right",sx:{paddingX:1},children:t("nutrition.energy")}),b(Ie,{align:"right",sx:{paddingX:1},children:t("nutrition.protein")}),b(Ie,{align:"right",sx:{paddingX:1},children:t("nutrition.carbohydrates")}),b(Ie,{align:"right",sx:{paddingX:1},children:t("nutrition.fat")})]})}),K(Rl,{children:[e.items.map(r=>b(hLt,{item:r},r.id)),e.showSum&&K(Ht,{children:[b(Ie,{sx:{paddingX:1},children:" "}),b(Ie,{sx:{paddingX:1},children:t("total")}),b(Ie,{align:"right",sx:{paddingX:1},children:t("nutrition.valueEnergyKcalKj",{kcal:Mi(e.values.energy,n.language),kj:Mi(e.values.energyKj,n.language)})}),b(Ie,{align:"right",sx:{paddingX:1},children:An(e.values.protein,n.language)}),b(Ie,{align:"right",sx:{paddingX:1},children:An(e.values.carbohydrates,n.language)}),b(Ie,{align:"right",sx:{paddingX:1},children:An(e.values.fat,n.language)})]})]})]})})},gLt=e=>{const[t,n]=Le();return b(Mc,{children:K(Ml,{size:"small",children:[b(Cu,{children:K(Ht,{children:[b(Ie,{children:t("nutrition.macronutrient")}),b(Ie,{align:"right",children:t("nutrition.planned")}),b(Ie,{align:"right",children:t("nutrition.logged")}),b(Ie,{align:"right",children:t("nutrition.difference")})]})}),K(Rl,{children:[K(Ht,{children:[b(Ie,{children:t("nutrition.energy")}),b(Ie,{align:"right",children:t("nutrition.valueEnergyKcalKj",{kcal:Mi(e.planned.energy,n.language),kj:Mi(e.planned.energyKj,n.language)})}),b(Ie,{align:"right",children:t("nutrition.valueEnergyKcalKj",{kcal:Mi(e.logged.energy,n.language),kj:Mi(e.logged.energyKj,n.language)})}),b(Ie,{align:"right",children:t("nutrition.valueEnergyKcalKj",{kcal:Mi(e.logged.energy-e.planned.energy,n.language),kj:Mi(e.logged.energyKj-e.planned.energyKj,n.language)})})]}),K(Ht,{children:[b(Ie,{children:t("nutrition.protein")}),b(Ie,{align:"right",children:An(e.planned.protein,n.language)}),b(Ie,{align:"right",children:An(e.logged.protein,n.language)}),b(Ie,{align:"right",children:An(e.logged.protein-e.planned.protein,n.language)})]}),K(Ht,{children:[b(Ie,{children:t("nutrition.carbohydrates")}),b(Ie,{align:"right",children:An(e.planned.carbohydrates,n.language)}),b(Ie,{align:"right",children:An(e.logged.carbohydrates,n.language)}),b(Ie,{align:"right",children:An(e.logged.carbohydrates-e.planned.carbohydrates,n.language)})]}),K(Ht,{children:[b(Ie,{sx:{pl:5},children:t("nutrition.ofWhichSugars")}),b(Ie,{align:"right",children:An(e.planned.carbohydratesSugar,n.language)}),b(Ie,{align:"right",children:An(e.logged.carbohydratesSugar,n.language)}),b(Ie,{align:"right",children:An(e.logged.carbohydratesSugar-e.planned.carbohydratesSugar,n.language)})]}),K(Ht,{children:[b(Ie,{children:t("nutrition.fat")}),b(Ie,{align:"right",children:An(e.planned.fat,n.language)}),b(Ie,{align:"right",children:An(e.logged.fat,n.language)}),b(Ie,{align:"right",children:An(e.logged.fat-e.planned.fat,n.language)})]}),K(Ht,{children:[b(Ie,{sx:{paddingLeft:5},children:t("nutrition.ofWhichSaturated")}),b(Ie,{align:"right",children:An(e.planned.fatSaturated,n.language)}),b(Ie,{align:"right",children:An(e.logged.fatSaturated,n.language)}),b(Ie,{align:"right",children:An(e.logged.fatSaturated-e.planned.fatSaturated,n.language)})]}),K(Ht,{children:[b(Ie,{children:t("nutrition.others")}),b(Ie,{}),b(Ie,{}),b(Ie,{})]}),K(Ht,{children:[b(Ie,{children:t("nutrition.fibres")}),b(Ie,{align:"right",children:An(e.planned.fiber,n.language)}),b(Ie,{align:"right",children:An(e.logged.fiber,n.language)}),b(Ie,{align:"right",children:An(e.logged.fiber-e.planned.fiber,n.language)})]}),K(Ht,{children:[b(Ie,{children:t("nutrition.sodium")}),b(Ie,{align:"right",children:An(e.planned.sodium,n.language)}),b(Ie,{align:"right",children:An(e.logged.sodium,n.language)}),b(Ie,{align:"right",children:An(e.logged.sodium-e.planned.sodium,n.language)})]})]})]})})},eX=()=>{const[e]=Le(),t=_c(),n=parseInt(t.planId),r=new Date(t.date),o=wje(n,t.date);return o.isLoading?b(ho,{}):b(Ld,{title:e("nutrition.nutritionalDiary"),mainContent:b(wt,{children:K(Wt,{spacing:2,children:[b(st,{gutterBottom:!0,variant:"h4",children:r.toLocaleDateString()}),b(gLt,{logged:o.data.loggedNutritionalValuesDate(r),planned:o.data.plannedNutritionalValues}),b(tj,{values:o.data.loggedNutritionalValuesDate(r),items:o.data.loggedEntriesDate(r),showSum:!0})]})})})};function*XM(e){let t;e<=3?t=QFe:e<=5?t=YFe:t=KFe;for(const n of t)yield n}const mLt=e=>{const[t,n]=Le(),r=XM(3),o=[{name:t("nutrition.carbohydrates"),value:e.data.carbohydrates},{name:t("nutrition.protein"),value:e.data.protein},{name:t("nutrition.fat"),value:e.data.fat}],i=Math.PI/180;return b(Mp,{width:"100%",height:300,children:K(Yse,{children:[b(Tu,{data:o,labelLine:!1,label:({cx:s,cy:l,midAngle:c,innerRadius:u,outerRadius:d,payload:f})=>{const p=u+(d-u)*.4,h=s+p*Math.cos(-c*i),m=l+p*Math.sin(-c*i);return b("text",{x:h,y:m,fill:"white",textAnchor:"middle",dominantBaseline:"central",children:An(f.value,n.language)})},fill:"#8884d8",dataKey:"value",children:o.map((s,l)=>b(Ub,{fill:r.next().value},`cell-${l}`))}),b(cd,{})]})})},yLt=({showPlanned:e,planned:t,today:n,avg7Days:r})=>{const[o,i]=Le(),a=XM(3),s=[{name:o("nutrition.protein"),planned:t.protein,today:n.protein,avg7Days:r.protein},{name:o("nutrition.carbohydrates"),planned:t.carbohydrates,today:n.carbohydrates,avg7Days:r.carbohydrates},{name:o("nutrition.sugar"),planned:t.carbohydratesSugar,today:n.carbohydratesSugar,avg7Days:r.carbohydratesSugar},{name:o("nutrition.fat"),planned:t.fat,today:n.fat,avg7Days:r.fat},{name:o("nutrition.saturatedFat"),planned:t.fatSaturated,today:n.fatSaturated,avg7Days:r.fatSaturated}];return b(Mp,{width:"100%",height:300,children:K(Kse,{data:s,margin:{top:20,right:30,left:20,bottom:5},children:[b(Bg,{strokeDasharray:"3 4"}),b(Bl,{dataKey:"name"}),b(zl,{type:"number",orientation:"left",unit:o("nutrition.gramShort")}),b(is,{formatter:l=>Mi(l,i.language)}),b(cd,{}),e&&b(uu,{dataKey:"planned",unit:o("nutrition.gramShort"),name:o("nutrition.planned"),fill:a.next().value}),b(uu,{dataKey:"today",unit:o("nutrition.gramShort"),name:o("nutrition.today"),fill:a.next().value}),b(uu,{dataKey:"avg7Days",unit:o("nutrition.gramShort"),name:o("nutrition.7dayAvg"),fill:a.next().value})]})})},vLt=e=>{const[t,n]=Le();return b(Mc,{children:K(Ml,{size:"small",children:[b(Cu,{children:K(Ht,{children:[b(Ie,{children:t("date")}),b(Ie,{align:"right",children:t("nutrition.logged")}),b(Ie,{align:"right",children:t("nutrition.difference")})]})}),b(Rl,{children:Array.from(e.logged).map(([r])=>{var o,i;return K(Ht,{children:[b(Ie,{children:b(Da,{to:Fn(_n.NUTRITION_DIARY,n.language,{id:e.planId,date:r}),children:new Date(r).toLocaleDateString(n.language)})}),b(Ie,{align:"right",children:t("nutrition.valueEnergyKcal",{value:Mi((o=e.logged.get(r))==null?void 0:o.nutritionalValues.energy,n.language)})}),b(Ie,{align:"right",children:Mi(((i=e.logged.get(r))==null?void 0:i.nutritionalValues.energy)-e.planned.energy,n.language)})]},r)})})]})})},bLt=()=>{const[e]=Le(),[t,n]=Y.useState(!1),r=()=>n(!0),o=()=>n(!1);return K("div",{children:[b(Dg,{color:"secondary","aria-label":"add",onClick:r,sx:{position:"fixed",bottom:"5rem",right:i=>i.spacing(2),zIndex:9},children:b(Vo,{})}),b(Fi,{title:e("add"),isOpen:t,closeFn:o,children:b(xH,{closeFn:o})})]})},wLt=e=>{const[t]=Le(),[n,r]=Y.useState(!1),o=()=>r(!0),i=()=>r(!1);return K("div",{children:[b(Dg,{color:"secondary","aria-label":"add",onClick:o,sx:{position:"fixed",bottom:"5rem",right:a=>a.spacing(2),zIndex:9},children:b(LC,{})}),b(Fi,{title:t("nutrition.addNutritionalDiary"),isOpen:n,closeFn:i,children:b(wH,{closeFn:i,planId:e.plan.id,meals:e.plan.meals})})]})},gpe=({meal:e,planId:t,closeFn:n})=>{const[r,o]=Le(),i=Tje(t),a=Oje(t),s=za({name:La().required().max(25,r("forms.maxLength",{chars:"25"})).min(3,r("forms.minLength",{chars:"3"})),time:Eg().required()});return b(Ba,{initialValues:{name:e?e.name:"",time:e?e.time:new Date},validationSchema:s,onSubmit:async l=>{l.time instanceof Date||(l.time=l.time.toJSDate());const c={...l,time:SFe(l.time)};e?a.mutate({...c,plan:t,id:e.id}):i.mutate({...c,plan:t}),n&&n()},children:l=>b(fa,{children:K(Wt,{spacing:2,children:[b(nn,{fullWidth:!0,id:"name",label:r("description"),error:l.touched.name&&!!l.errors.name,helperText:l.touched.name&&l.errors.name,...l.getFieldProps("name")}),b(xg,{dateAdapter:lb,adapterLocale:o.language,children:b(Igt,{label:r("timeOfDay"),value:l.values.time!==null?yt.fromJSDate(l.values.time):null,onChange:c=>l.setFieldValue("time",c)})}),K(Wt,{direction:"row",justifyContent:"end",spacing:2,children:[n!==void 0&&b(dt,{color:"primary",variant:"outlined",onClick:()=>n(),children:r("close")}),b(dt,{disabled:i.isPending||a.isPending,color:"primary",variant:"contained",type:"submit",children:r("submit")})]})]})})})},xLt=e=>{const[t]=Le(),n=XM(3),r=[{name:t("nutrition.energy"),value:e.logged.energy/e.planned.energy*100},{name:t("nutrition.protein"),value:e.logged.protein/e.planned.protein*100},{name:t("nutrition.carbohydrates"),value:e.logged.carbohydrates/e.planned.carbohydrates*100},{name:t("nutrition.fat"),value:e.logged.fat/e.planned.fat*100}];return b(Mp,{width:"100%",height:150,children:K(Kse,{data:r,layout:"vertical",margin:{left:60},children:[b(Bg,{strokeDasharray:"3 4"}),b(Bl,{type:"number",unit:"%"}),b(zl,{type:"category",dataKey:"name"}),b(uu,{dataKey:"value",unit:"%",fill:n.next().value})]})})},mpe=({planId:e,item:t,mealId:n,closeFn:r})=>{const[o]=Le(),i=Rje(e),a=$je(e),s=Dje(e),l=()=>{t&&s.mutate(t.id),r&&r()},c=za({amount:Ea().required(o("forms.fieldRequired")).max(1e3,o("forms.maxValue",{value:"1000"})).min(1,o("forms.minValue",{value:"1"})),ingredient:Ea().required(o("forms.fieldRequired"))});return b(Ba,{initialValues:{amount:t?t.amount:0,ingredient:t?t.ingredientId:0},validationSchema:c,onSubmit:async u=>{const d={...u,meal:n,weight_unit:null};t?a.mutate({...d,id:t.id}):i.mutate(d),r&&r()},children:u=>{var d;return b(fa,{children:K(Wt,{spacing:2,children:[b(iH,{callback:f=>u.setFieldValue("ingredient",f?f.data.id:null),initialIngredient:t?(d=t.ingredient)==null?void 0:d.name:null}),b(nn,{fullWidth:!0,id:"amount",label:"amount",InputProps:{endAdornment:b(So,{position:"end",children:o("nutrition.gramShort")})},error:u.touched.amount&&!!u.errors.amount,helperText:u.touched.amount&&u.errors.amount,...u.getFieldProps("amount")}),K(Wt,{direction:"row",justifyContent:"end",spacing:2,children:[r!==void 0&&t!==void 0&&b(dt,{color:"error",variant:"outlined",onClick:l,children:o("delete")}),r!==void 0&&b(dt,{color:"primary",variant:"outlined",onClick:()=>r(),children:o("close")}),b(dt,{color:"primary",variant:"contained",type:"submit",children:o("submit")})]})]})})}})},SLt=e=>{const t=Fre(e.planId),n=Ije(e.planId),[r]=Le(),[o,i]=Y.useState(!1),[a,s]=v.useState(null),[l,c]=v.useState(!1),[u,d]=v.useState(!1),f=!!a,p=A=>{s(A.currentTarget)},h=()=>{m(),x()},m=()=>{s(null)},y=()=>{E(),s(null)},w=()=>{n.mutate(e.meal.id)},x=()=>c(!0),C=()=>c(!1),E=()=>d(!0),P=()=>d(!1),T=(A,k)=>{k!=="clickaway"&&i(!1)},I=()=>{const A=e.meal.items.map(k=>({plan:e.planId,meal:e.meal.id,mealItem:k.id,ingredient:k.ingredientId,weight_unit:k.weightUnitId,datetime:new Date().toISOString(),amount:k.amount}));t.mutate(A),i(!0)};return K(wt,{children:[!e.onlyLogging&&b(kc,{title:r("nutrition.logThisMeal"),children:b(vn,{"aria-label":"settings",onClick:I,children:b(LC,{})})}),b(vn,{"aria-label":"settings",onClick:p,children:b(jH,{})}),b(vn,{"aria-label":"settings",onClick:e.handleExpanded,children:e.isExpanded?b(_de,{}):b(Nde,{})}),K(Rs,{anchorEl:a,open:f,onClose:m,MenuListProps:{"aria-labelledby":"basic-button"},children:[b(en,{onClick:h,children:r("edit")}),b(en,{onClick:y,children:r("delete")})]}),b(Fi,{title:r("edit"),isOpen:l,closeFn:C,children:b(gpe,{meal:e.meal,closeFn:C,planId:e.planId})}),b(u5,{title:r("deleteConfirmation",{name:e.meal.name}),message:r("nutrition.mealDeleteInfo"),isOpen:u,closeFn:P,deleteFn:w}),b(nz,{open:o,autoHideDuration:pz,onClose:T,children:b(Il,{onClose:T,severity:"success",sx:{width:"100%"},children:r("nutrition.diaryEntrySaved")})})]})},CLt=e=>{var o,i,a,s;const[t,n]=v.useState(!1),r=()=>n(!t);return K(wt,{children:[K(Ps,{children:[b(ZB,{onClick:r,sx:{"&:hover":{cursor:"pointer"}},children:b(Oc,{alt:(o=e.mealItem.ingredient)==null?void 0:o.name,src:(a=(i=e.mealItem.ingredient)==null?void 0:i.image)==null?void 0:a.url,sx:{width:45,height:45},children:b(Rd,{})})}),b(Ao,{primary:`${e.mealItem.amountString} ${(s=e.mealItem.ingredient)==null?void 0:s.name}`})]}),b(vl,{in:t,timeout:"auto",unmountOnExit:!0,sx:{width:"100%"},children:b(Ps,{children:b(Ao,{children:b(mpe,{planId:e.planId,mealId:e.mealId,item:e.mealItem,closeFn:r})})})})]})},tX=e=>{const t=Ro(),n=e.meal.id!==eT,[r]=Le(),[o,i]=v.useState(!1),a=()=>i(!o),[s,l]=v.useState(!1),c=()=>{l(!s),d(!1)},[u,d]=v.useState(!1),f=()=>{d(!u),l(!1)};return K(bo,{children:[b(Su,{sx:{bgcolor:t.palette.grey[300]},action:e.meal.id!==eT&&b(SLt,{meal:e.meal,planId:e.planId,onlyLogging:e.onlyLogging,isExpanded:o,handleExpanded:a}),title:e.meal.name,subheader:e.meal.timeHHMMLocale}),K(_i,{sx:{paddingY:0},children:[K(vl,{in:o,timeout:"auto",unmountOnExit:!0,children:[!e.onlyLogging&&b(tj,{showSum:n,items:e.meal.items,values:e.meal.plannedNutritionalValues}),b(st,{gutterBottom:!0,variant:"h6",sx:{my:2},children:r("nutrition.loggedToday")}),!e.meal.plannedNutritionalValues.isEmpty&&b(xLt,{logged:e.meal.loggedNutritionalValuesToday,planned:e.meal.plannedNutritionalValues}),b(tj,{showSum:n,items:e.meal.diaryEntriesToday,values:e.meal.loggedNutritionalValuesToday})]}),!o&&b(Ll,{children:e.meal.items.map(p=>b(CLt,{mealItem:p,planId:e.planId,mealId:e.meal.id},p.id))})]}),K(Ms,{children:[!e.onlyLogging&&b(kc,{title:r("nutrition.addMealItem"),children:b(vn,{onClick:c,children:b(Vo,{})})}),b(kc,{title:r("nutrition.addNutritionalDiary"),children:b(vn,{onClick:f,children:b(LC,{})})})]}),b(vl,{in:s,timeout:"auto",unmountOnExit:!0,children:K(_i,{sx:{paddingY:0},children:[b("p",{children:b("b",{children:r("nutrition.addMealItem")})}),b(mpe,{planId:e.planId,mealId:e.meal.id,closeFn:c})]})}),b(vl,{in:u,timeout:"auto",unmountOnExit:!0,children:K(_i,{sx:{paddingY:0},children:[b("p",{children:b("b",{children:r("nutrition.addNutritionalDiary")})}),b(wH,{closeFn:f,planId:e.planId,mealId:e.meal.id!==eT?e.meal.id:null})]})})]})},nX=e=>{const[t,n]=Le();return b(Mc,{children:K(Ml,{size:"small",children:[b(Cu,{children:K(Ht,{children:[b(Ie,{children:t("nutrition.macronutrient")}),b(Ie,{align:"right",children:t("total")}),b(Ie,{align:"right",children:t("nutrition.percentEnergy")})]})}),K(Rl,{children:[K(Ht,{children:[b(Ie,{children:t("nutrition.energy")}),b(Ie,{align:"right",children:t("nutrition.valueEnergyKcalKj",{kcal:Mi(e.values.energy,n.language),kj:Mi(e.values.energyKj,n.language)})}),b(Ie,{align:"right"})]}),K(Ht,{children:[b(Ie,{children:t("nutrition.protein")}),b(Ie,{align:"right",children:An(e.values.protein,n.language)}),b(Ie,{align:"right",children:pD(e.values.percent.protein,n.language)})]}),K(Ht,{children:[b(Ie,{children:t("nutrition.carbohydrates")}),b(Ie,{align:"right",children:An(e.values.carbohydrates,n.language)}),b(Ie,{align:"right",children:pD(e.values.percent.carbohydrates,n.language)})]}),K(Ht,{children:[b(Ie,{sx:{pl:5},children:t("nutrition.ofWhichSugars")}),b(Ie,{align:"right",children:An(e.values.carbohydratesSugar,n.language)}),b(Ie,{align:"right"})]}),K(Ht,{children:[b(Ie,{children:t("nutrition.fat")}),b(Ie,{align:"right",children:An(e.values.fat,n.language)}),b(Ie,{align:"right",children:pD(e.values.percent.fat,n.language)})]}),K(Ht,{children:[b(Ie,{sx:{pl:5},children:t("nutrition.ofWhichSaturated")}),b(Ie,{align:"right",children:An(e.values.fatSaturated,n.language)}),b(Ie,{align:"right"})]}),K(Ht,{children:[b(Ie,{children:t("nutrition.others")}),b(Ie,{children:" "}),b(Ie,{align:"right"})]}),K(Ht,{children:[b(Ie,{children:t("nutrition.fibres")}),b(Ie,{align:"right",children:An(e.values.fiber,n.language)}),b(Ie,{align:"right"})]}),K(Ht,{children:[b(Ie,{children:t("nutrition.sodium")}),b(Ie,{align:"right",children:An(e.values.sodium,n.language)}),b(Ie,{align:"right"})]})]})]})})},ELt=e=>{const t=Sje(e.plan.id),n=Bp(),[r,o]=Le(),[i,a]=Y.useState(null),[s,l]=Y.useState(!1),[c,u]=Y.useState(!1),d=!!i,f=I=>{a(I.currentTarget)},p=()=>{h(),C()},h=()=>{a(null)},m=()=>{P(),a(null)},y=()=>{t.mutate(e.plan.id),n(Fn(_n.NUTRITION_OVERVIEW))},w=()=>window.location.href=Fn(_n.NUTRITION_PLAN_PDF,o.language,{id:e.plan.id}),x=()=>window.location.href=Fn(_n.NUTRITION_PLAN_COPY,o.language,{id:e.plan.id}),C=()=>l(!0),E=()=>l(!1),P=()=>u(!0),T=()=>u(!1);return K(wt,{children:[b(dt,{onClick:f,children:b(BH,{})}),K(Rs,{anchorEl:i,open:d,onClose:h,MenuListProps:{"aria-labelledby":"basic-button"},children:[b(en,{onClick:p,children:r("edit")}),b(en,{onClick:w,children:r("downloadAsPdf")}),b(en,{onClick:x,children:r("nutrition.copyPlan")}),b(en,{onClick:m,children:r("delete")})]}),b(Fi,{title:r("edit"),isOpen:s,closeFn:E,children:b(xH,{plan:e.plan,closeFn:E})}),b(u5,{title:r("deleteConfirmation",{name:e.plan.description}),message:r("nutrition.planDeleteInfo"),isOpen:c,closeFn:T,deleteFn:y})]})},PLt=e=>{const[t]=Le(),n=e.plan.plannedNutritionalValues,r=e.plan.loggedNutritionalValuesToday,o=e.plan.percentageValuesLoggedToday;return b(wt,{children:K(Wt,{direction:"column",spacing:1,children:[b(st,{gutterBottom:!0,variant:"h6",children:t("nutrition.goalsTitle")}),b(zy,{title:t("nutrition.protein"),percentage:o.protein,logged:r.protein,planned:n.protein}),b(zy,{title:t("nutrition.carbohydrates"),percentage:o.carbohydrates,logged:r.carbohydrates,planned:n.carbohydrates}),b(zy,{title:t("nutrition.fat"),percentage:o.fat,logged:r.fat,planned:n.fat})]})})},TLt=()=>{const[e]=Le(),t=_c(),n=parseInt(t.planId),r=bje(n),[o,i]=v.useState(!1),a=()=>i(!o),s=r.data;return r.isLoading?b(ho,{}):b(Ld,{title:s.description,optionsMenu:b(ELt,{plan:s}),mainContent:b(wt,{children:K(Wt,{spacing:2,children:[s.meals.map(l=>b(tX,{meal:l,planId:s.id,onlyLogging:s.onlyLogging},l.id)),b(tX,{meal:r.data.pseudoMealOthers(e("nutrition.pseudoMealTitle")),planId:s.id,onlyLogging:!0},-1),!s.onlyLogging&&K(wt,{children:[b(kc,{title:e("nutrition.addMeal"),children:b(vn,{onClick:a,children:b(Vo,{})})}),K(vl,{in:o,timeout:"auto",unmountOnExit:!0,children:[b("p",{children:b("b",{children:e("nutrition.addMeal")})}),b(gpe,{planId:s.id,closeFn:a})]})]}),b(nX,{values:s.plannedNutritionalValues}),s.hasAnyPlanned&&b(mLt,{data:s.plannedNutritionalValues}),b(st,{gutterBottom:!0,variant:"h4",children:e("nutrition.logged")}),b(yLt,{showPlanned:s.hasAnyPlanned,planned:s.plannedNutritionalValues,today:s.loggedNutritionalValuesToday,avg7Days:s.loggedNutritionalValues7DayAvg}),b(nX,{values:s.loggedNutritionalValuesToday}),b(vLt,{planId:s.id,logged:s.groupDiaryEntries,planned:s.plannedNutritionalValues})]})}),sideBar:b(PLt,{plan:s}),fab:b(wLt,{plan:s})})},ILt=()=>{var n;const e=yje(),[t]=Le();return e.isLoading?b(ho,{}):b(Ld,{title:t("nutrition.plans"),mainContent:K(Wt,{spacing:2,children:[((n=e.data)==null?void 0:n.length)===0&&b(dk,{}),b(ALt,{plans:e.data})]}),fab:b(bLt,{})})},OLt=e=>{const[t,n]=Le(),r=Fn(_n.NUTRITION_DETAIL,n.language,{id:e.plan.id});return K(wt,{children:[b(Ps,{sx:{p:0},children:K(Ep,{component:"a",href:r,children:[b(Ao,{primary:e.plan.description!==""?e.plan.description:t("routines.routine"),secondary:e.plan.creationDate.toLocaleDateString()}),b(Rde,{})]})}),b(kl,{component:"li"})]})},ALt=e=>b(to,{children:b(Ll,{sx:{py:0},children:e.plans.map(t=>b(OLt,{plan:t},t.id))},"abc")}),kLt=e=>{const t=Bp(),[n,r]=Le(),[o,i]=Y.useState(null),a=!!o,s=d=>{i(d.currentTarget)},l=()=>{t(Fn(_n.ROUTINE_EDIT,r.language,{id:e.routine.id}))},c=()=>{t(Fn(_n.ROUTINE_DETAIL_TABLE,r.language,{id:e.routine.id}))};return K("div",{children:[b(dt,{onClick:s,children:b(BH,{})}),K(Rs,{anchorEl:o,open:a,onClose:()=>{i(null)},MenuListProps:{"aria-labelledby":"basic-button"},children:[b(en,{onClick:l,children:n("edit")}),b(en,{onClick:c,children:"Table view"})]})]})},MLt=()=>{var r,o,i;const e=_c(),t=e.routineId?parseInt(e.routineId):0,n=Qg(t);return b(SH,{query:n,child:n.isSuccess&&b(Ld,{title:(r=n.data)==null?void 0:r.name,optionsMenu:b(kLt,{routine:n.data}),mainContent:K(Wt,{spacing:2,sx:{mt:2},children:[((o=n.data)==null?void 0:o.description)!==""&&b(st,{variant:"caption",sx:{whiteSpace:"pre-line"},children:(i=n.data)==null?void 0:i.description}),n.data.dayDataCurrentIteration.map((a,s)=>b(rde,{dayData:a},`dayDetails-${s}`))]})})})},ype=()=>{const e=_c(),t=e.routineId?parseInt(e.routineId):0,n=Qg(t);return b(Ac,{maxWidth:!1,sx:{overflowX:"scroll",display:"flex"},children:b(SH,{query:n,child:n.isSuccess&&b(wt,{children:K(Wt,{direction:"row",children:[b(RLt,{dayData:n.data.groupedDayDataByIteration[1]!==void 0?n.data.groupedDayDataByIteration[1]:[],iteration:1}),Object.keys(n.data.groupedDayDataByIteration).map(r=>b($Lt,{dayData:n.data.groupedDayDataByIteration[parseInt(r)],iteration:parseInt(r)},r))]})})})})},RLt=e=>{const[t,n]=Le(),r=Ro(),o=Fp();let i;return o.isSuccess&&(i=Db(n.language,o.data)),b(Mc,{component:to,sx:{minWidth:200,position:"sticky",left:0},children:K(Ml,{size:"small",children:[K(Cu,{children:[b(Ht,{children:b(Ie,{children:b(st,{variant:"h5",children:" "})})}),b(Ht,{children:b(Ie,{children:" "})})]}),b(Rl,{children:e.dayData.map((a,s)=>K(Y.Fragment,{children:[b(Ht,{children:b(Ie,{sx:{backgroundColor:r.palette.action.hover},children:b("b",{children:a.day===null||a.day.isRest?t("routines.restDay"):a.day.name})})},`tableRow-rest-${s}`),a.slots.map((l,c)=>b(Y.Fragment,{children:l.setConfigs.map((u,d)=>{var p,h;const f=d===0||u.exerciseId!==((p=l.setConfigs[d-1])==null?void 0:p.exerciseId);return b(Ht,{children:K(Ie,{sx:{textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"},children:[f?(h=u.exercise)==null?void 0:h.getTranslation(i).name:".",f&&u.isSpecialType&&b(mu,{label:u.type,color:"info",size:"small",sx:{marginLeft:"0.5em"}})]},`tableCell-exercise-${d}`)},`tableRow-exercise-${d}`)})},c)),b(Ht,{children:b(Ie,{},`tableCell-emtpy-${s}`)},`tableRow-emtpy-${s}`)]},`${e.iteration}-${s}`))})]})})},$Lt=e=>{const[t]=Le(),n=Ro();return b(Mc,{component:to,sx:{minWidth:380},children:K(Ml,{size:"small",children:[K(Cu,{children:[b(Ht,{children:b(Ie,{colSpan:5,children:b(st,{variant:"h5",children:t("routines.workoutNr",{number:e.iteration})})})}),K(Ht,{children:[b(Ie,{align:"center",children:t("routines.sets")}),b(Ie,{align:"center",children:t("routines.reps")}),b(Ie,{align:"center",children:t("weight")}),b(Ie,{align:"center",children:t("routines.restTime")}),b(Ie,{align:"center",children:t("routines.rir")})]})]}),b(Rl,{children:e.dayData.map((r,o)=>K(Y.Fragment,{children:[b(Ht,{children:b(Ie,{sx:{backgroundColor:n.palette.action.hover},colSpan:5,children:" "})}),r.slots.map((i,a)=>b(Y.Fragment,{children:i.setConfigs.map((s,l)=>K(Ht,{children:[b(Ie,{align:"center",children:s.nrOfSets===null?"-/-":s.nrOfSets}),K(Ie,{align:"center",children:[s.reps===null?"-/-":s.reps,s.maxReps!==null&&K(wt,{children:[" - ",s.maxReps]})]}),K(Ie,{align:"center",children:[s.weight===null?"-/-":s.weight,s.maxWeight!==null&&K(wt,{children:[" - ",s.maxWeight]})]}),K(Ie,{align:"center",children:[s.restTime===null?"-/-":s.restTime,s.maxRestTime!==null&&K(wt,{children:[" - ",s.maxRestTime]})]}),b(Ie,{align:"center",children:s.rir})]},l))},a)),b(Ht,{children:b(Ie,{colSpan:6})})]},o))})]})})};function qi(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var DLt=typeof Symbol=="function"&&Symbol.observable||"@@observable",rX=DLt,P_=()=>Math.random().toString(36).substring(7).split("").join("."),_Lt={INIT:`@@redux/INIT${P_()}`,REPLACE:`@@redux/REPLACE${P_()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${P_()}`},oX=_Lt;function NLt(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function vpe(e,t,n){if(typeof e!="function")throw new Error(qi(2));if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(qi(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(qi(1));return n(vpe)(e,t)}let r=e,o=t,i=new Map,a=i,s=0,l=!1;function c(){a===i&&(a=new Map,i.forEach((y,w)=>{a.set(w,y)}))}function u(){if(l)throw new Error(qi(3));return o}function d(y){if(typeof y!="function")throw new Error(qi(4));if(l)throw new Error(qi(5));let w=!0;c();const x=s++;return a.set(x,y),function(){if(w){if(l)throw new Error(qi(6));w=!1,c(),a.delete(x),i=null}}}function f(y){if(!NLt(y))throw new Error(qi(7));if(typeof y.type>"u")throw new Error(qi(8));if(typeof y.type!="string")throw new Error(qi(17));if(l)throw new Error(qi(9));try{l=!0,o=r(o,y)}finally{l=!1}return(i=a).forEach(x=>{x()}),y}function p(y){if(typeof y!="function")throw new Error(qi(10));r=y,f({type:oX.REPLACE})}function h(){const y=d;return{subscribe(w){if(typeof w!="object"||w===null)throw new Error(qi(11));function x(){const E=w;E.next&&E.next(u())}return x(),{unsubscribe:y(x)}},[rX](){return this}}}return f({type:oX.INIT}),{dispatch:f,subscribe:d,getState:u,replaceReducer:p,[rX]:h}}function iX(e,t){return function(...n){return t(e.apply(this,n))}}function aX(e,t){if(typeof e=="function")return iX(e,t);if(typeof e!="object"||e===null)throw new Error(qi(16));const n={};for(const r in e){const o=e[r];typeof o=="function"&&(n[r]=iX(o,t))}return n}function bpe(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,n)=>(...r)=>t(n(...r)))}function LLt(...e){return t=>(n,r)=>{const o=t(n,r);let i=()=>{throw new Error(qi(15))};const a={getState:o.getState,dispatch:(l,...c)=>i(l,...c)},s=e.map(l=>l(a));return i=bpe(...s)(o.dispatch),{...o,dispatch:i}}}var FLt={};/** +`)),r.current=!0),j.current){S(_),j.current=!1;return}E(_)},[t.autoHeight,E,n]);Ho(O,[O]),yr(e,"sortedRowsSet",O),yr(e,"paginationModelChange",O),yr(e,"columnsChange",O),xt(e,"resize",D),yr(e,"debouncedResize",t.onResize)}function FNt(e,t,n){if(n!==void 0)return n;if(e===null||t===0)return 0;const o=ep(e).createElement("div");o.style.width="99px",o.style.height="99px",o.style.position="absolute",o.style.overflow="scroll",o.className="scrollDiv",e.appendChild(o);const i=o.offsetWidth-o.clientWidth;return e.removeChild(o),i}function jNt(e,t){return Math.round(e*10**t)/10**t}function JQ(e,t){return e.width===t.width&&e.height===t.height}const BNt=typeof globalThis.ResizeObserver<"u"?globalThis.ResizeObserver:class{observe(){}unobserve(){}disconnect(){}},zNt=(e,t,n)=>(n.current.caches.rowsMeta={heights:new Map},W({},e,{rowsMeta:{currentPageTotalHeight:0,positions:[]}})),VNt=(e,t)=>{const{getRowHeight:n,getRowSpacing:r,getEstimatedRowHeight:o}=t,i=e.current.caches.rowsMeta.heights,a=v.useRef(-1),s=v.useRef(!1),l=v.useRef(!1),c=Ye(e,A1),u=Ye(e,pi),d=Ye(e,XM),f=Ye(e,al),p=Wp(e,t),h=Ye(e,em),m=Ye(e,()=>Si(e.current.state).rowHeight),y=L=>{let j=i.get(L);return j===void 0&&(j={content:m,spacingTop:0,spacingBottom:0,detail:0,autoHeight:!1,needsFirstMeasurement:!0},i.set(L,j)),j},w=v.useCallback(L=>{const j=Si(e.current.state).rowHeight,D=e.current.getRowHeightEntry(L.id);if(!n)D.content=j,D.needsFirstMeasurement=!1;else{const _=n(W({},L,{densityFactor:c}));if(_==="auto"){if(D.needsFirstMeasurement){const z=o?o(W({},L,{densityFactor:c})):j;D.content=z??j}s.current=!0,D.autoHeight=!0}else D.content=Efe(_,j),D.needsFirstMeasurement=!1,D.autoHeight=!1}if(r){const _=e.current.getRowIndexRelativeToVisibleRows(L.id),z=r(W({},L,{isFirstVisible:_===0,isLastVisible:_===p.rows.length-1,indexRelativeToCurrentPage:_}));D.spacingTop=z.top??0,D.spacingBottom=z.bottom??0}else D.spacingTop=0,D.spacingBottom=0;return e.current.unstable_applyPipeProcessors("rowHeight",D,L),D},[e,p.rows.length,n,o,m,r,c]),x=v.useCallback(()=>{s.current=!1,h.top.forEach(w),h.bottom.forEach(w);const L=[],j=p.rows.reduce((D,_)=>{L.push(D);const z=w(_),F=z.content+z.spacingTop+z.spacingBottom+z.detail;return D+F},0);s.current||(a.current=1/0),e.current.setState(D=>W({},D,{rowsMeta:{currentPageTotalHeight:j,positions:L}})),l.current=!0},[e,h,p.rows,w]),S=L=>{var j;return((j=i.get(L))==null?void 0:j.content)??m},E=(L,j)=>{const D=e.current.getRowHeightEntry(L),_=D.content!==j;D.needsFirstMeasurement=!1,D.content=j,l.current&&(l.current=!_)},P=L=>{var j;return((j=i.get(L))==null?void 0:j.autoHeight)??!1},T=()=>a.current,I=L=>{s.current&&L>a.current&&(a.current=L)},A=()=>{i.clear(),x()},k=ku(()=>new BNt(L=>{for(let j=0;j0?D.borderBoxSize[0].blockSize:D.contentRect.height,z=D.target.__mui_id;e.current.unstable_storeRowHeightMeasurement(z,_)}l.current||e.current.requestPipeProcessorsApplication("rowHeight")})).current,O=(L,j)=>(L.__mui_id=j,k.observe(L),()=>k.unobserve(L));fH(e,"rowHeight",x),v.useEffect(()=>{x()},[u,d,f,x]);const $={unstable_getRowHeight:S,unstable_setLastMeasuredRowIndex:I,unstable_storeRowHeightMeasurement:E,resetRowHeights:A},N={hydrateRowsMeta:x,observeRowHeight:O,rowHasAutoHeight:P,getRowHeightEntry:y,getLastMeasuredRowIndex:T};ln(e,$,"public"),ln(e,N,"private")},HNt=e=>{const t=v.useCallback((o={})=>e.current.unstable_applyPipeProcessors("exportState",{},o),[e]),n=v.useCallback(o=>{e.current.unstable_applyPipeProcessors("restoreState",{callbacks:[]},{stateToRestore:o}).callbacks.forEach(a=>{a()}),e.current.forceUpdate()},[e]);ln(e,{exportState:t,restoreState:n},"public")},UNt=e=>{const t=v.useRef({}),n=(s,l)=>{var c;return(c=t.current[s])==null?void 0:c[l]},r=()=>{t.current={}},o=v.useCallback(({rowId:s,minFirstColumn:l,maxLastColumn:c,columns:u})=>{for(let d=l;d1&&(d+=f.colSpan-1)}},[e]),i={unstable_getCellColSpanInfo:n},a={resetColSpan:r,calculateColSpan:o};ln(e,i,"public"),ln(e,a,"private"),xt(e,"columnOrderChange",r)};function WNt(e){const{apiRef:t,lookup:n,columnIndex:r,rowId:o,minFirstColumnIndex:i,maxLastColumnIndex:a,columns:s}=e,l=s.length,c=s[r],u=t.current.getRow(o),d=t.current.getRowValue(u,c),f=typeof c.colSpan=="function"?c.colSpan(d,u,c,t):c.colSpan;if(!f||f===1)return A_(n,o,r,{spannedByColSpan:!1,cellProps:{colSpan:1,width:c.computedWidth}}),{colSpan:1};let p=c.computedWidth;for(let h=1;h=i&&m{if(mfe(e)){if(n[e.field]!==void 0)throw new Error(["MUI X: columnGroupingModel contains duplicated field",`column field ${e.field} occurs two times in the grouping model:`,`- ${n[e.field].join(" > ")}`,`- ${t.join(" > ")}`].join(` +`));n[e.field]=t;return}const{groupId:r,children:o}=e;o.forEach(i=>{mpe(i,[...t,r],n)})},rj=e=>{if(!e)return{};const t={};return e.forEach(n=>{mpe(n,[],t)}),t},oj=(e,t,n)=>{const r=l=>t[l]??[],o=[],i=Math.max(...e.map(l=>r(l).length)),a=(l,c,u)=>Jy(r(l).slice(0,u+1),r(c).slice(0,u+1)),s=(l,c)=>!!(n!=null&&n.left&&n.left.includes(l)&&!n.left.includes(c)||n!=null&&n.right&&!n.right.includes(l)&&n.right.includes(c));for(let l=0;l{const f=r(d)[l]??null;if(u.length===0)return[{columnFields:[d],groupId:f}];const p=u[u.length-1],h=p.columnFields[p.columnFields.length-1];return p.groupId!==f||!a(h,d,l)||s(h,d)?[...u,{columnFields:[d],groupId:f}]:[...u.slice(0,u.length-1),{columnFields:[...p.columnFields,d],groupId:f}]},[]);o.push(c)}return o},GNt=["groupId","children"],pH=e=>{let t={};return e.forEach(n=>{if(mfe(n))return;const{groupId:r,children:o}=n,i=Dt(n,GNt);if(!r)throw new Error("MUI X: An element of the columnGroupingModel does not have either `field` or `groupId`.");const a=W({},i,{groupId:r}),s=pH(o);if(s[r]!==void 0||t[r]!==void 0)throw new Error(`MUI X: The groupId ${r} is used multiple times in the columnGroupingModel.`);t=W({},t,s,{[r]:a})}),W({},t)},qNt=(e,t,n)=>{if(!t.columnGroupingModel)return e;const r=hd(n),o=v0(n),i=pH(t.columnGroupingModel??[]),a=rj(t.columnGroupingModel??[]),s=oj(r,a,n.current.state.pinnedColumns??{}),l=o.length===0?0:Math.max(...o.map(c=>{var u;return((u=a[c])==null?void 0:u.length)??0}));return W({},e,{columnGrouping:{lookup:i,unwrappedGroupingModel:a,headerStructure:s,maxDepth:l}})},KNt=(e,t)=>{const n=v.useCallback(s=>Vfe(e)[s]??[],[e]),r=v.useCallback(()=>Hfe(e),[e]);ln(e,{getColumnGroupPath:n,getAllGroupDetails:r},"public");const i=v.useCallback(()=>{const s=rj(t.columnGroupingModel??[]);e.current.setState(l=>{var f;const c=((f=l.columns)==null?void 0:f.orderedFields)??[],u=l.pinnedColumns??{},d=oj(c,s,u);return W({},l,{columnGrouping:W({},l.columnGrouping,{headerStructure:d})})})},[e,t.columnGroupingModel]),a=v.useCallback(s=>{var m,y;const l=((y=(m=e.current).getPinnedColumns)==null?void 0:y.call(m))??{},c=hd(e),u=v0(e),d=pH(s??[]),f=rj(s??[]),p=oj(c,f,l),h=u.length===0?0:Math.max(...u.map(w=>{var x;return((x=f[w])==null?void 0:x.length)??0}));e.current.setState(w=>W({},w,{columnGrouping:{lookup:d,unwrappedGroupingModel:f,headerStructure:p,maxDepth:h}}))},[e]);xt(e,"columnIndexChange",i),xt(e,"columnsChange",()=>{a(t.columnGroupingModel)}),xt(e,"columnVisibilityModelChange",()=>{a(t.columnGroupingModel)}),v.useEffect(()=>{a(t.columnGroupingModel)},[a,t.columnGroupingModel])};function YNt(){let e,t;const n=new Promise((r,o)=>{e=r,t=o});return n.resolve=e,n.reject=t,n}function ZQ(e,t){if(t!==void 0&&e.changedTouches){for(let n=0;niH(e),r=Ye(e,n);return v.useEffect(()=>{t.current&&r===!1&&(t.current.resolve(),t.current=void 0)}),()=>{if(!t.current){if(n()===!1)return Promise.resolve();t.current=YNt()}return t.current}}function eLt(e,t){if(e.length<4)return e;const n=e.slice();n.sort((s,l)=>s-l);const r=n[Math.floor(n.length*.25)],o=n[Math.floor(n.length*.75)-1],i=o-r,a=i<5?5:i*t;return n.filter(s=>s>r-a&&s{const s=p$t(e.current,i.field).map(h=>h.getBoundingClientRect().width??0),l=t.includeOutliers?s:eLt(s,t.outliersFactor);if(t.includeHeaders){const h=f$t(e.current,i.field);if(h){const m=h.querySelector(`.${le.columnHeaderTitle}`),y=h.querySelector(`.${le.columnHeaderTitleContainerContent}`),w=h.querySelector(`.${le.iconButtonContainer}`),x=h.querySelector(`.${le.menuIcon}`),S=m??y,E=window.getComputedStyle(h,null),P=parseInt(E.paddingLeft,10)+parseInt(E.paddingRight,10),I=S.scrollWidth+1+P+((w==null?void 0:w.clientWidth)??0)+((x==null?void 0:x.clientWidth)??0);l.push(I)}}const c=i.minWidth!==-1/0&&i.minWidth!==void 0,u=i.maxWidth!==1/0&&i.maxWidth!==void 0,d=c?i.minWidth:0,f=u?i.maxWidth:1/0,p=l.length===0?0:Math.max(...l);r[i.field]=hu(p,d,f)}),o.classList.remove(le.autosizing),r}const nLt=e=>W({},e,{columnResize:{resizingColumnField:""}});function rLt(){return{colDef:void 0,initialColWidth:0,initialTotalWidth:0,previousMouseClickEvent:void 0,columnHeaderElement:void 0,headerFilterElement:void 0,groupHeaderElements:[],cellElements:[],leftPinnedCellsAfter:[],rightPinnedCellsBefore:[],fillerLeft:void 0,fillerRight:void 0,leftPinnedHeadersAfter:[],rightPinnedHeadersBefore:[]}}const oLt=(e,t)=>{const n=dr(),r=Wo(e,"useGridColumnResize"),o=ku(rLt).current,i=v.useRef(),a=v.useRef(),s=y0(),l=v.useRef(),c=k=>{var _,z;r.debug(`Updating width to ${k} for col ${o.colDef.field}`);const O=o.columnHeaderElement.offsetWidth,$=k-O,N=k-o.initialColWidth,L=o.initialTotalWidth+N;(z=(_=e.current.rootElementRef)==null?void 0:_.current)==null||z.style.setProperty("--DataGrid-rowWidth",`${L}px`),o.colDef.computedWidth=k,o.colDef.width=k,o.colDef.flex=0,o.columnHeaderElement.style.width=`${k}px`;const j=o.headerFilterElement;j&&(j.style.width=`${k}px`),o.groupHeaderElements.forEach(F=>{const V=F;let U;V.getAttribute("aria-colspan")==="1"?U=`${k}px`:U=`${V.offsetWidth+$}px`,V.style.width=U}),o.cellElements.forEach(F=>{const V=F;let U;V.getAttribute("aria-colspan")==="1"?U=`${k}px`:U=`${V.offsetWidth+$}px`,V.style.setProperty("--width",U)});const D=e.current.unstable_applyPipeProcessors("isColumnPinned",!1,o.colDef.field);D===br.LEFT&&(qm(o.fillerLeft,"width",$),o.leftPinnedCellsAfter.forEach(F=>{qm(F,"left",$)}),o.leftPinnedHeadersAfter.forEach(F=>{qm(F,"left",$)})),D===br.RIGHT&&(qm(o.fillerRight,"width",$),o.rightPinnedCellsBefore.forEach(F=>{qm(F,"right",$)}),o.rightPinnedHeadersBefore.forEach(F=>{qm(F,"right",$)}))},u=k=>{if(w(),o.previousMouseClickEvent){const O=o.previousMouseClickEvent,$=O.timeStamp,N=O.clientX,L=O.clientY;if(k.timeStamp-$<300&&k.clientX===N&&k.clientY===L){o.previousMouseClickEvent=void 0,e.current.publishEvent("columnResizeStop",null,k);return}}if(o.colDef){e.current.setColumnWidth(o.colDef.field,o.colDef.width),r.debug(`Updating col ${o.colDef.field} with new width: ${o.colDef.width}`);const O=pu(e.current.state);o.groupHeaderElements.forEach($=>{const N=i$t($),L=$,D=`${N.reduce((_,z)=>O.columnVisibilityModel[z]!==!1?_+O.lookup[z].computedWidth:_,0)}px`;L.style.width=D})}s.start(0,()=>{e.current.publishEvent("columnResizeStop",null,k)})},d=(k,O,$)=>{var D;const N=e.current.rootElementRef.current;o.initialColWidth=k.computedWidth,o.initialTotalWidth=e.current.getRootDimensions().rowWidth,o.colDef=k,o.columnHeaderElement=o$t(e.current.columnHeadersContainerRef.current,k.field);const L=N.querySelector(`.${le.headerFilterRow} [data-field="${zd(k.field)}"]`);L&&(o.headerFilterElement=L),o.groupHeaderElements=a$t((D=e.current.columnHeadersContainerRef)==null?void 0:D.current,k.field),o.cellElements=s$t(o.columnHeaderElement,e.current),o.fillerLeft=TQ(e.current,n?"filler--pinnedRight":"filler--pinnedLeft"),o.fillerRight=TQ(e.current,n?"filler--pinnedLeft":"filler--pinnedRight");const j=e.current.unstable_applyPipeProcessors("isColumnPinned",!1,o.colDef.field);o.leftPinnedCellsAfter=j!==br.LEFT?[]:l$t(e.current,o.columnHeaderElement,n),o.rightPinnedCellsBefore=j!==br.RIGHT?[]:c$t(e.current,o.columnHeaderElement,n),o.leftPinnedHeadersAfter=j!==br.LEFT?[]:u$t(e.current,o.columnHeaderElement,n),o.rightPinnedHeadersBefore=j!==br.RIGHT?[]:d$t(e.current,o.columnHeaderElement,n),a.current=JNt(O,n),i.current=QNt($,o.columnHeaderElement.getBoundingClientRect(),a.current)},f=Ar(u),p=Ar(k=>{if(k.buttons===0){f(k);return}let O=eX(i.current,k.clientX,o.columnHeaderElement.getBoundingClientRect(),a.current);O=hu(O,o.colDef.minWidth,o.colDef.maxWidth),c(O);const $={element:o.columnHeaderElement,colDef:o.colDef,width:O};e.current.publishEvent("columnResize",$,k)}),h=Ar(k=>{ZQ(k,l.current)&&u(k)}),m=Ar(k=>{const O=ZQ(k,l.current);if(!O)return;if(k.type==="mousemove"&&k.buttons===0){h(k);return}let $=eX(i.current,O.x,o.columnHeaderElement.getBoundingClientRect(),a.current);$=hu($,o.colDef.minWidth,o.colDef.maxWidth),c($);const N={element:o.columnHeaderElement,colDef:o.colDef,width:$};e.current.publishEvent("columnResize",N,k)}),y=Ar(k=>{const O=WO(k.target,le["columnSeparator--resizable"]);if(!O)return;const $=k.changedTouches[0];$!=null&&(l.current=$.identifier);const N=WO(k.target,le.columnHeader),L=r$t(N),j=e.current.getColumn(L);r.debug(`Start Resize on col ${j.field}`),e.current.publishEvent("columnResizeStart",{field:L},k),d(j,O,$.clientX);const D=ep(k.currentTarget);D.addEventListener("touchmove",m),D.addEventListener("touchend",h)}),w=v.useCallback(()=>{const k=ep(e.current.rootElementRef.current);k.body.style.removeProperty("cursor"),k.removeEventListener("mousemove",p),k.removeEventListener("mouseup",f),k.removeEventListener("touchmove",m),k.removeEventListener("touchend",h),setTimeout(()=>{k.removeEventListener("click",tX,!0)},100),o.columnHeaderElement&&(o.columnHeaderElement.style.pointerEvents="unset")},[e,o,p,f,m,h]),x=v.useCallback(({field:k})=>{e.current.setState(O=>W({},O,{columnResize:W({},O.columnResize,{resizingColumnField:k})})),e.current.forceUpdate()},[e]),S=v.useCallback(()=>{e.current.setState(k=>W({},k,{columnResize:W({},k.columnResize,{resizingColumnField:""})})),e.current.forceUpdate()},[e]),E=Ar(({colDef:k},O)=>{if(O.button!==0||!O.currentTarget.classList.contains(le["columnSeparator--resizable"]))return;O.preventDefault(),r.debug(`Start Resize on col ${k.field}`),e.current.publishEvent("columnResizeStart",{field:k.field},O),d(k,O.currentTarget,O.clientX);const $=ep(e.current.rootElementRef.current);$.body.style.cursor="col-resize",o.previousMouseClickEvent=O.nativeEvent,$.addEventListener("mousemove",p),$.addEventListener("mouseup",f),$.addEventListener("click",tX,!0)}),P=Ar((k,O)=>{if(t.disableAutosize||O.button!==0)return;const $=e.current.state.columns.lookup[k.field];$.resizable!==!1&&e.current.autosizeColumns(W({},t.autosizeOptions,{columns:[$.field]}))}),T=ZNt(e),I=v.useRef(!1),A=v.useCallback(async k=>{var j;if(!((j=e.current.rootElementRef)==null?void 0:j.current)||I.current)return;I.current=!0;const $=pu(e.current.state),N=W({},URt,k,{columns:(k==null?void 0:k.columns)??$.orderedFields});N.columns=N.columns.filter(D=>$.columnVisibilityModel[D]!==!1);const L=N.columns.map(D=>e.current.state.columns.lookup[D]);try{e.current.unstable_setColumnVirtualization(!1),await T();const D=tLt(e,N,L),_=L.map(z=>W({},z,{width:D[z.field],computedWidth:D[z.field]}));if(N.expand){const F=$.orderedFields.map(K=>$.lookup[K]).filter(K=>$.columnVisibilityModel[K.field]!==!1).reduce((K,X)=>K+(D[X.field]??X.computedWidth??X.width),0),U=e.current.getRootDimensions().viewportInnerSize.width-F;if(U>0){const K=U/(_.length||1);_.forEach(X=>{X.width+=K,X.computedWidth+=K})}}e.current.updateColumns(_),_.forEach((z,F)=>{if(z.width!==L[F].width){const V=z.width;e.current.publishEvent("columnWidthChange",{element:e.current.getColumnHeaderElement(z.field),colDef:z,width:V})}})}finally{e.current.unstable_setColumnVirtualization(!0),I.current=!1}},[e,T]);v.useEffect(()=>w,[w]),HM(()=>{t.autosizeOnMount&&Promise.resolve().then(()=>{e.current.autosizeColumns(t.autosizeOptions)})}),$fe(e,()=>{var k;return(k=e.current.columnHeadersContainerRef)==null?void 0:k.current},"touchstart",y,{passive:!0}),ln(e,{autosizeColumns:A},"public"),xt(e,"columnResizeStop",S),xt(e,"columnResizeStart",x),xt(e,"columnSeparatorMouseDown",E),xt(e,"columnSeparatorDoubleClick",P),yr(e,"columnResize",t.onColumnResize),yr(e,"columnWidthChange",t.onColumnWidthChange)};function qm(e,t,n){e&&(e.style[t]=`${parseInt(e.style[t],10)+n}px`)}function iLt(e,t){return e.firstRowIndex>=t.firstRowIndex&&e.lastRowIndex<=t.lastRowIndex?null:e.firstRowIndex>=t.firstRowIndex&&e.lastRowIndex>t.lastRowIndex?{firstRowIndex:t.lastRowIndex,lastRowIndex:e.lastRowIndex}:e.firstRowIndex{if(!e)return null;let r=e[t.field];const o=t.rowSpanValueGetter??t.valueGetter;return o&&(r=o(r,e,t,n)),r},KO={spannedCells:{},hiddenCells:{},hiddenCellOriginMap:{}},Rx={firstRowIndex:0,lastRowIndex:0},sLt=new Set([Qu,"__reorder__",qM]),ype=20,vpe=(e,t,n,r,o,i,a)=>{const s=i?{}:W({},e.current.state.rowSpanning.spannedCells),l=i?{}:W({},e.current.state.rowSpanning.hiddenCells),c=i?{}:W({},e.current.state.rowSpanning.hiddenCellOriginMap);return i&&(a=Rx),t.forEach(u=>{var d;if(!sLt.has(u.field)){for(let f=o.firstRowIndex;f<=o.lastRowIndex;f+=1){const p=n[f];if((d=l[p.id])!=null&&d[u.field])continue;const h=k_(p.model,u,e);if(h==null)continue;let m=p.id,y=f,w=0;const x=[];if(f===o.firstRowIndex){let E=f-1;const P=n[E];for(;E>=r.firstRowIndex&&k_(P.model,u,e)===h;){const T=n[E+1];l[T.id]?l[T.id][u.field]=!0:l[T.id]={[u.field]:!0},x.push(f),w+=1,m=P.id,y=E,E-=1}}x.forEach(E=>{c[E]?c[E][u.field]=y:c[E]={[u.field]:y}});let S=f+1;for(;S<=r.lastRowIndex&&n[S]&&k_(n[S].model,u,e)===h;){const E=n[S];l[E.id]?l[E.id][u.field]=!0:l[E.id]={[u.field]:!0},c[S]?c[S][u.field]=y:c[S]={[u.field]:y},S+=1,w+=1}w>0&&(s[m]?s[m][u.field]=w+1:s[m]={[u.field]:w+1})}a={firstRowIndex:Math.min(a.firstRowIndex,o.firstRowIndex),lastRowIndex:Math.max(a.lastRowIndex,o.lastRowIndex)}}}),{spannedCells:s,hiddenCells:l,hiddenCellOriginMap:c,processedRange:a}},lLt=(e,t,n)=>{var r;if(t.unstable_rowSpanning){const o=e.rows.dataRowIds||[],i=e.columns.orderedFields||[],a=e.rows.dataRowIdToModelLookup,s=e.columns.lookup,l=!!e.filter.filterModel.items.length||!!((r=e.filter.filterModel.quickFilterValues)!=null&&r.length);if(!o.length||!i.length||!a||!s||l)return W({},e,{rowSpanning:KO});const c={firstRowIndex:0,lastRowIndex:Math.min(ype-1,Math.max(o.length-1,0))},u=o.map(m=>({id:m,model:a[m]})),d=i.map(m=>s[m]),{spannedCells:f,hiddenCells:p,hiddenCellOriginMap:h}=vpe(n,d,u,c,c,!0,Rx);return W({},e,{rowSpanning:{spannedCells:f,hiddenCells:p,hiddenCellOriginMap:h}})}return W({},e,{rowSpanning:KO})},cLt=(e,t)=>{const{range:n,rows:r}=Wp(e,t),o=Ye(e,eR),i=Ye(e,Oo),a=ku(()=>Object.keys(e.current.state.rowSpanning.spannedCells).length>0?{firstRowIndex:0,lastRowIndex:Math.min(ype-1,Math.max(e.current.state.rows.dataRowIds.length-1,0))}:Rx),s=v.useRef(Rx),l=v.useCallback((f=!0)=>{if(!t.unstable_rowSpanning){e.current.state.rowSpanning!==KO&&e.current.setState(I=>W({},I,{rowSpanning:KO}));return}if(n===null||!aLt(o))return;f&&(a.current=Rx);const p=iLt({firstRowIndex:o.firstRowIndex,lastRowIndex:Math.min(o.lastRowIndex-1,n.lastRowIndex)},a.current);if(p===null)return;const{spannedCells:h,hiddenCells:m,hiddenCellOriginMap:y,processedRange:w}=vpe(e,i,r,n,p,f,a.current);a.current=w;const x=Object.keys(h).length,S=Object.keys(m).length,E=Object.keys(e.current.state.rowSpanning.spannedCells).length,P=Object.keys(e.current.state.rowSpanning.hiddenCells).length;(f||x!==E||S!==P)&&e.current.setState(I=>W({},I,{rowSpanning:{spannedCells:h,hiddenCells:m,hiddenCellOriginMap:y}}))},[e,t.unstable_rowSpanning,n,o,r,i,a]),c=v.useRef(o),u=v.useRef(!0),d=v.useRef(!1);v.useEffect(()=>{const f=u.current;if(u.current&&(u.current=!1),n&&s.current&&nX(n,s.current)&&(s.current=n,d.current=!0),!f&&c.current!==o){nX(c.current,o)&&(l(d.current),d.current=!1),c.current=o;return}l()},[l,o,n,s])},uLt=(e,t,n)=>W({},e,{listViewColumn:t.unstable_listColumn?W({},t.unstable_listColumn,{computedWidth:ij(n)}):void 0});function dLt(e,t){const n=()=>{e.current.setState(i=>i.listViewColumn?W({},i,{listViewColumn:W({},i.listViewColumn,{computedWidth:ij(e)})}):i)},r=v.useRef(null);xt(e,"viewportInnerSizeChange",i=>{r.current!==i.width&&(r.current=i.width,n())}),xt(e,"columnVisibilityModelChange",n),v.useEffect(()=>{const i=t.unstable_listColumn;i&&e.current.setState(a=>W({},a,{listViewColumn:W({},i,{computedWidth:ij(e)})}))},[e,t.unstable_listColumn]),v.useEffect(()=>{t.unstable_listView&&t.unstable_listColumn},[t.unstable_listView,t.unstable_listColumn])}function ij(e){return Si(e.current.state).viewportInnerSize.width}const fLt=(e,t)=>{const n=M2t(e,t);return ANt(n,t),PNt(n),Ko(NNt,n,t),Ko(TNt,n,t),Ko(j2t,n,t),Ko(wNt,n,t),Ko(vNt,n,t),Ko(Z2t,n,t),Ko(kNt,n,t),Ko(uNt,n,t),Ko(Y2t,n,t),Ko(lLt,n,t),Ko(z2t,n,t),Ko(nLt,n,t),Ko(lNt,n,t),Ko(zNt,n,t),Ko(L2t,n,t),Ko(qNt,n,t),Ko(rRt,n,t),Ko(uLt,n,t),iNt(n,t),INt(n,t),B2t(n,t),xNt(n,t),cLt(n,t),h$t(n,t),UNt(n),KNt(n,t),bNt(n,t),eNt(n,t),dNt(n,t),J2t(n,t),MNt(n,t),V2t(n,t),oLt(n,t),cNt(n,t),VNt(n,t),RNt(n,t),F2t(n),U2t(n,t),K2t(n,t),N2t(n,t),LNt(n,t),$Nt(n,t),HNt(n),oRt(n,t),dLt(n,t),n},pLt=e=>{const{classes:t,headerAlign:n,isDragging:r,isLastColumn:o,showLeftBorder:i,showRightBorder:a,groupId:s,pinnedPosition:l}=e;return In({root:["columnHeader",n==="left"&&"columnHeader--alignLeft",n==="center"&&"columnHeader--alignCenter",n==="right"&&"columnHeader--alignRight",r&&"columnHeader--moving",a&&"columnHeader--withRightBorder",i&&"columnHeader--withLeftBorder","withBorderColor",s===null?"columnHeader--emptyGroup":"columnHeader--filledGroup",l==="left"&&"columnHeader--pinnedLeft",l==="right"&&"columnHeader--pinnedRight",o&&"columnHeader--last"],draggableContainer:["columnHeaderDraggableContainer"],titleContainer:["columnHeaderTitleContainer","withBorderColor"],titleContainerContent:["columnHeaderTitleContainerContent"]},On,t)};function hLt(e){var K;const{groupId:t,width:n,depth:r,maxDepth:o,fields:i,height:a,colIndex:s,hasFocus:l,tabIndex:c,isLastColumn:u,pinnedPosition:d,style:f,indexInSection:p,sectionLength:h,gridHasFiller:m}=e,y=Ot(),w=v.useRef(null),x=En(),S=Ye(x,Hfe),E=t?S[t]:{},{headerName:P=t??"",description:T="",headerAlign:I=void 0}=E;let A;const k=t&&((K=S[t])==null?void 0:K.renderHeaderGroup),O=v.useMemo(()=>({groupId:t,headerName:P,description:T,depth:r,maxDepth:o,fields:i,colIndex:s,isLastColumn:u}),[t,P,T,r,o,i,s,u]);t&&k&&(A=k(O));const $=nR(d,p),N=tR(d,p,h,y.showColumnVerticalBorder,m),L=W({},e,{classes:y.classes,showLeftBorder:$,showRightBorder:N,headerAlign:I,depth:r,isDragging:!1}),j=P??t,D=Io(),_=t===null?`empty-group-cell-${D}`:t,z=pLt(L);v.useLayoutEffect(()=>{if(l){const ie=w.current.querySelector('[tabindex="0"]')||w.current;ie==null||ie.focus()}},[x,l]);const F=v.useCallback(X=>ie=>{D1(ie)||x.current.publishEvent(X,O,ie)},[x,O]),V=v.useMemo(()=>({onKeyDown:F("columnGroupHeaderKeyDown"),onFocus:F("columnGroupHeaderFocus"),onBlur:F("columnGroupHeaderBlur")}),[F]),U=typeof E.headerClassName=="function"?E.headerClassName(O):E.headerClassName;return R.jsx(ipe,W({ref:w,classes:z,columnMenuOpen:!1,colIndex:s,height:a,isResizing:!1,sortDirection:null,hasFocus:!1,tabIndex:c,isDraggable:!1,headerComponent:A,headerClassName:U,description:T,elementId:_,width:n,columnMenuIconButton:null,columnTitleIconButtons:null,resizable:!1,label:j,"aria-colspan":i.length,"data-fields":`|-${i.join("-|-")}-|`,style:f},V))}const rX=re("div",{name:"MuiDataGrid",slot:"ColumnHeaderRow",overridesResolver:(e,t)=>t.columnHeaderRow})({display:"flex"}),gLt=e=>{const{visibleColumns:t,sortColumnLookup:n,filterColumnLookup:r,columnHeaderTabIndexState:o,columnGroupHeaderTabIndexState:i,columnHeaderFocus:a,columnGroupHeaderFocus:s,headerGroupingMaxDepth:l,columnMenuState:c,columnVisibility:u,columnGroupsHeaderStructure:d,hasOtherElementInTabSequence:f}=e,[p,h]=v.useState(""),[m,y]=v.useState(""),w=Gl(),x=dr(),S=Ot(),E=Ye(w,Si),P=Ye(w,iH),T=Ye(w,Vfe),I=Ye(w,Hp),A=Ye(w,nRt),k=Ye(w,k1),O=Ye(w,Bd),$=Kfe(I,A,k.left.length),N=E.columnsTotalWidth{w.current.columnHeadersContainerRef.current&&(w.current.columnHeadersContainerRef.current.scrollLeft=0)},[w]);const L=v.useCallback(te=>y(te.field),[]),j=v.useCallback(()=>y(""),[]),D=v.useCallback(te=>h(te.field),[]),_=v.useCallback(()=>h(""),[]),z=v.useMemo(()=>k.left.length?{firstColumnIndex:0,lastColumnIndex:k.left.length}:null,[k.left.length]),F=v.useMemo(()=>k.right.length?{firstColumnIndex:t.length-k.right.length,lastColumnIndex:t.length}:null,[k.right.length,t.length]);xt(w,"columnResizeStart",L),xt(w,"columnResizeStop",j),xt(w,"columnHeaderDragStart",D),xt(w,"columnHeaderDragEnd",_);const V=te=>{const{renderContext:pe=A,maxLastColumn:ae=t.length}=te||{},se=pe.firstColumnIndex,oe=P?pe.lastColumnIndex:ae;return{renderedColumns:t.slice(se,oe),firstColumnToRender:se,lastColumnToRender:oe}},U=(te,pe,ae,se=!1)=>{const oe=(te==null?void 0:te.position)===br.RIGHT,fe=(te==null?void 0:te.position)===void 0,Z=k.right.length>0&&oe||k.right.length===0&&fe,ce=$-ae;return R.jsxs(v.Fragment,{children:[fe&&R.jsx("div",{role:"presentation",style:{width:ce}}),pe,fe&&R.jsx("div",{role:"presentation",className:de(le.filler,se&&le["filler--borderBottom"])}),Z&&R.jsx(uH,{header:!0,pinnedRight:oe,borderBottom:se,borderTop:!1})]})},K=({pinnedPosition:te,columnIndex:pe,computedWidth:ae})=>{let se;const oe=te===br.LEFT,fe=te===br.RIGHT;if(oe||fe){const Z=cH(te,ae,pe,I,E);let ce=oe?"left":"right";x&&(ce=oe?"right":"left"),te==="left"&&(se={[ce]:Z}),te==="right"&&(se={[ce]:Z})}return se},X=(te,pe={})=>{const{renderedColumns:ae,firstColumnToRender:se}=V(te),oe=[];for(let fe=0;feR.jsxs(rX,{role:"row","aria-rowindex":l+1,ownerState:S,className:le["row--borderBottom"],children:[z&&X({position:br.LEFT,renderContext:z,maxLastColumn:z.lastColumnIndex},{disableReorder:!0}),X({renderContext:A,maxLastColumn:t.length-k.right.length}),F&&X({position:br.RIGHT,renderContext:F,maxLastColumn:F.lastColumnIndex},{disableReorder:!0,separatorSide:lH.Left})]}),ee=({depth:te,params:pe})=>{var Ae,Me;const ae=V(pe);if(ae.renderedColumns.length===0)return null;const{firstColumnToRender:se,lastColumnToRender:oe}=ae,fe=d[te],Z=t[se].field,ce=((Ae=T[Z])==null?void 0:Ae[te])??null,ge=fe.findIndex(({groupId:We,columnFields:He})=>We===ce&&He.includes(Z)),we=t[oe-1].field,me=((Me=T[we])==null?void 0:Me[te])??null,Se=fe.findIndex(({groupId:We,columnFields:He})=>We===me&&He.includes(we)),xe=fe.slice(ge,Se+1).map(We=>W({},We,{columnFields:We.columnFields.filter(He=>u[He]!==!1)})).filter(We=>We.columnFields.length>0),ke=xe[0].columnFields.indexOf(Z),_e=xe[0].columnFields.slice(0,ke).reduce((We,He)=>{const Xe=O[He];return We+(Xe.computedWidth??0)},0);let ye=se;const Pe=xe.map(({groupId:We,columnFields:He},Xe)=>{const gt=s!==null&&s.depth===te&&He.includes(s.field),st=i!==null&&i.depth===te&&He.includes(i.field)?0:-1,et={groupId:We,width:He.reduce(($e,Qe)=>$e+O[Qe].computedWidth,0),fields:He,colIndex:ye,hasFocus:gt,tabIndex:st},Et=pe.position,An=K({pinnedPosition:Et,columnIndex:ye,computedWidth:et.width});ye+=He.length;let Ke=Xe;return Et==="left"&&(Ke=ye-1),R.jsx(hLt,{groupId:We,width:et.width,fields:et.fields,colIndex:et.colIndex,depth:te,isLastColumn:et.colIndex===t.length-et.fields.length,maxDepth:l,height:E.groupHeaderHeight,hasFocus:gt,tabIndex:st,pinnedPosition:Et,style:An,indexInSection:Ke,sectionLength:fe.length,gridHasFiller:N},Xe)});return U(pe,Pe,_e)};return{renderContext:A,leftRenderContext:z,rightRenderContext:F,pinnedColumns:k,visibleColumns:t,getCellOffsetStyle:K,getFillers:U,getColumnHeadersRow:ie,getColumnsToRender:V,getColumnGroupHeadersRows:()=>{if(l===0)return null;const te=[];for(let pe=0;pe({role:"rowgroup"})}},mLt=["className"],yLt=e=>{const{classes:t}=e;return In({root:["columnHeaders"]},On,t)},vLt=or("div",{name:"MuiDataGrid",slot:"ColumnHeaders",overridesResolver:(e,t)=>t.columnHeaders})({display:"flex",flexDirection:"column",borderTopLeftRadius:"var(--unstable_DataGrid-radius)",borderTopRightRadius:"var(--unstable_DataGrid-radius)"}),bLt=v.forwardRef(function(t,n){const{className:r}=t,o=Dt(t,mLt),i=Ot(),a=yLt(i);return R.jsx(vLt,W({ref:n,className:de(a.root,r),ownerState:i},o,{role:"presentation"}))}),wLt=["className","visibleColumns","sortColumnLookup","filterColumnLookup","columnHeaderTabIndexState","columnGroupHeaderTabIndexState","columnHeaderFocus","columnGroupHeaderFocus","headerGroupingMaxDepth","columnMenuState","columnVisibility","columnGroupsHeaderStructure","hasOtherElementInTabSequence"],xLt=v.forwardRef(function(t,n){const{visibleColumns:r,sortColumnLookup:o,filterColumnLookup:i,columnHeaderTabIndexState:a,columnGroupHeaderTabIndexState:s,columnHeaderFocus:l,columnGroupHeaderFocus:c,headerGroupingMaxDepth:u,columnMenuState:d,columnVisibility:f,columnGroupsHeaderStructure:p,hasOtherElementInTabSequence:h}=t,m=Dt(t,wLt),{getInnerProps:y,getColumnHeadersRow:w,getColumnGroupHeadersRows:x}=gLt({visibleColumns:r,sortColumnLookup:o,filterColumnLookup:i,columnHeaderTabIndexState:a,columnGroupHeaderTabIndexState:s,columnHeaderFocus:l,columnGroupHeaderFocus:c,headerGroupingMaxDepth:u,columnMenuState:d,columnVisibility:f,columnGroupsHeaderStructure:p,hasOtherElementInTabSequence:h});return R.jsxs(bLt,W({ref:n},m,y(),{children:[x(),w()]}))}),SLt=Vp(xLt);function CLt(e){return null}function ELt(e){return null}const PLt=v.forwardRef(function(t,n){const o=En().current.getLocaleText("noResultsOverlayLabel");return R.jsx(sH,W({ref:n},t,{children:o}))}),TLt=["sortingOrder"],ILt=v.memo(function(t){const{sortingOrder:n}=t,r=Dt(t,TLt),o=Ot(),[i]=n,a=i==="asc"?o.slots.columnSortedAscendingIcon:o.slots.columnSortedDescendingIcon;return a?R.jsx(a,W({},r)):null}),OLt=["native"];function ALt(e){let{native:t}=e,n=Dt(e,OLt);return t?R.jsx("option",W({},n)):R.jsx(rn,W({},n))}const kLt={booleanCellTrueIcon:ADt,booleanCellFalseIcon:T_,columnMenuIcon:PDt,openFilterButtonIcon:vDt,filterPanelDeleteIcon:T_,columnFilteredIcon:NQ,columnSelectorIcon:wDt,columnUnsortedIcon:ILt,columnSortedAscendingIcon:RQ,columnSortedDescendingIcon:$Q,columnResizeIcon:xDt,densityCompactIcon:SDt,densityStandardIcon:CDt,densityComfortableIcon:EDt,exportIcon:ODt,moreActionsIcon:kDt,treeDataCollapseIcon:_Q,treeDataExpandIcon:DQ,groupingCriteriaCollapseIcon:_Q,groupingCriteriaExpandIcon:DQ,detailPanelExpandIcon:LQ,detailPanelCollapseIcon:TDt,rowReorderIcon:FQ,quickFilterIcon:bDt,quickFilterClearIcon:T_,columnMenuHideIcon:MDt,columnMenuSortAscendingIcon:RQ,columnMenuSortDescendingIcon:$Q,columnMenuFilterIcon:NQ,columnMenuManageColumnsIcon:RDt,columnMenuClearIcon:$Dt,loadIcon:IDt,filterPanelAddIcon:LQ,filterPanelRemoveAllIcon:DDt,columnReorderIcon:FQ},MLt=W({},kLt,{baseBadge:eMe,baseCheckbox:YMe,baseDivider:Is,baseTextField:nn,baseFormControl:kb,baseSelect:Lg,baseButton:dt,baseIconButton:vn,baseInputAdornment:Co,baseTooltip:Rc,basePopper:Pp,baseInputLabel:Mb,baseSelectOption:ALt,baseChip:vu}),RLt=W({},MLt,{cell:b$t,skeletonCell:O$t,columnHeaderFilterIconButton:yDt,columnHeaderSortIcon:gDt,columnMenu:JDt,columnHeaders:SLt,detailPanels:CLt,footer:U_t,footerRowCount:s2t,toolbar:null,pinnedRows:ELt,loadingOverlay:J_t,noResultsOverlay:PLt,noRowsOverlay:Z_t,pagination:r2t,filterPanel:__t,columnsPanel:u_t,columnsManagement:upe,panel:g_t,row:f2t});function $Lt({defaultSlots:e,slots:t}){const n=t;if(!n||Object.keys(n).length===0)return e;const r=W({},e);return Object.keys(n).forEach(o=>{const i=o;n[i]!==void 0&&(r[i]=n[i])}),r}function DLt(e){const t=Object.keys(e);if(!t.some(o=>o.startsWith("aria-")||o.startsWith("data-")))return e;const n={},r=e.forwardedProps??{};for(let o=0;oDLt(e),[e])}const NLt={disableMultipleColumnsFiltering:!0,disableMultipleColumnsSorting:!0,throttleRowsMs:void 0,hideFooterRowCount:!1,pagination:!0,checkboxSelectionVisibleOnly:!1,disableColumnReorder:!0,keepColumnPositionIfDraggedOutside:!1,signature:"DataGrid",unstable_listView:!1},LLt=RLt,FLt=e=>{const t=_Lt(cn({props:e,name:"MuiDataGrid"})),n=v.useMemo(()=>W({},YOt,t.localeText),[t.localeText]),r=v.useMemo(()=>$Lt({defaultSlots:LLt,slots:t.slots}),[t.slots]),o=v.useMemo(()=>Object.keys(nj).reduce((i,a)=>(i[a]=t[a]??nj[a],i),{}),[t]);return v.useMemo(()=>W({},t,o,{localeText:n,slots:r},NLt),[t,n,r,o])},jLt={hooks:{useGridAriaAttributes:p2t,useGridRowAriaAttributes:h2t}},bpe=v.forwardRef(function(t,n){const r=FLt(t),o=fLt(r.apiRef,r);return R.jsx(g2t,{privateApiRef:o,configuration:jLt,props:r,children:R.jsxs(F$t,W({className:r.className,style:r.style,sx:r.sx,ref:n},r.forwardedProps,{children:[R.jsx(G_t,{}),R.jsx(QRt,{}),R.jsx(XRt,{})]}))})}),BLt=v.memo(bpe);bpe.propTypes={apiRef:B.shape({current:B.object.isRequired}),"aria-label":B.string,"aria-labelledby":B.string,autoHeight:B.bool,autoPageSize:B.bool,autosizeOnMount:B.bool,autosizeOptions:B.shape({columns:B.arrayOf(B.string),expand:B.bool,includeHeaders:B.bool,includeOutliers:B.bool,outliersFactor:B.number}),cellModesModel:B.object,checkboxSelection:B.bool,classes:B.object,clipboardCopyCellDelimiter:B.string,columnBufferPx:B.number,columnGroupHeaderHeight:B.number,columnGroupingModel:B.arrayOf(B.object),columnHeaderHeight:B.number,columns:B.arrayOf(B.object).isRequired,columnVisibilityModel:B.object,density:B.oneOf(["comfortable","compact","standard"]),disableAutosize:B.bool,disableColumnFilter:B.bool,disableColumnMenu:B.bool,disableColumnResize:B.bool,disableColumnSelector:B.bool,disableColumnSorting:B.bool,disableDensitySelector:B.bool,disableEval:B.bool,disableMultipleRowSelection:B.bool,disableRowSelectionOnClick:B.bool,disableVirtualization:B.bool,editMode:B.oneOf(["cell","row"]),estimatedRowCount:B.number,experimentalFeatures:B.shape({warnIfFocusStateIsNotSynced:B.bool}),filterDebounceMs:B.number,filterMode:B.oneOf(["client","server"]),filterModel:B.shape({items:B.arrayOf(B.shape({field:B.string.isRequired,id:B.oneOfType([B.number,B.string]),operator:B.string.isRequired,value:B.any})).isRequired,logicOperator:B.oneOf(["and","or"]),quickFilterExcludeHiddenColumns:B.bool,quickFilterLogicOperator:B.oneOf(["and","or"]),quickFilterValues:B.array}),forwardedProps:B.object,getCellClassName:B.func,getDetailPanelContent:B.func,getEstimatedRowHeight:B.func,getRowClassName:B.func,getRowHeight:B.func,getRowId:B.func,getRowSpacing:B.func,hideFooter:B.bool,hideFooterPagination:B.bool,hideFooterSelectedRowCount:B.bool,ignoreDiacritics:B.bool,ignoreValueFormatterDuringExport:B.oneOfType([B.shape({clipboardExport:B.bool,csvExport:B.bool}),B.bool]),indeterminateCheckboxAction:B.oneOf(["deselect","select"]),initialState:B.object,isCellEditable:B.func,isRowSelectable:B.func,keepNonExistentRowsSelected:B.bool,loading:B.bool,localeText:B.object,logger:B.shape({debug:B.func.isRequired,error:B.func.isRequired,info:B.func.isRequired,warn:B.func.isRequired}),logLevel:B.oneOf(["debug","error","info","warn",!1]),nonce:B.string,onCellClick:B.func,onCellDoubleClick:B.func,onCellEditStart:B.func,onCellEditStop:B.func,onCellKeyDown:B.func,onCellModesModelChange:B.func,onClipboardCopy:B.func,onColumnHeaderClick:B.func,onColumnHeaderContextMenu:B.func,onColumnHeaderDoubleClick:B.func,onColumnHeaderEnter:B.func,onColumnHeaderLeave:B.func,onColumnHeaderOut:B.func,onColumnHeaderOver:B.func,onColumnOrderChange:B.func,onColumnResize:B.func,onColumnVisibilityModelChange:B.func,onColumnWidthChange:B.func,onDensityChange:B.func,onFilterModelChange:B.func,onMenuClose:B.func,onMenuOpen:B.func,onPaginationMetaChange:B.func,onPaginationModelChange:B.func,onPreferencePanelClose:B.func,onPreferencePanelOpen:B.func,onProcessRowUpdateError:B.func,onResize:B.func,onRowClick:B.func,onRowCountChange:B.func,onRowDoubleClick:B.func,onRowEditStart:B.func,onRowEditStop:B.func,onRowModesModelChange:B.func,onRowSelectionModelChange:B.func,onSortModelChange:B.func,onStateChange:B.func,pageSizeOptions:B.arrayOf(B.oneOfType([B.number,B.shape({label:B.string.isRequired,value:B.number.isRequired})]).isRequired),pagination:B.oneOf([!0]),paginationMeta:B.shape({hasNextPage:B.bool}),paginationMode:B.oneOf(["client","server"]),paginationModel:B.shape({page:B.number.isRequired,pageSize:B.number.isRequired}),processRowUpdate:B.func,resizeThrottleMs:B.number,rowBufferPx:B.number,rowCount:B.number,rowHeight:B.number,rowModesModel:B.object,rowPositionsDebounceMs:B.number,rows:B.arrayOf(B.object),rowSelection:B.bool,rowSelectionModel:B.oneOfType([B.arrayOf(B.oneOfType([B.number,B.string]).isRequired),B.number,B.string]),rowSpacingType:B.oneOf(["border","margin"]),scrollbarSize:B.number,showCellVerticalBorder:B.bool,showColumnVerticalBorder:B.bool,slotProps:B.object,slots:B.object,sortingMode:B.oneOf(["client","server"]),sortingOrder:B.arrayOf(B.oneOf(["asc","desc"])),sortModel:B.arrayOf(B.shape({field:B.string.isRequired,sort:B.oneOf(["asc","desc"])})),sx:B.oneOfType([B.arrayOf(B.oneOfType([B.func,B.object,B.bool])),B.func,B.object]),unstable_rowSpanning:B.bool};const zLt=e=>e.map(t=>({id:t.id,category:t.category,date:t.date,value:t.value,notes:t.notes})),VLt=e=>{const[t]=Le(),n=zLt(e.category.entries),r=Kde(),o=JIt(),[i,a]=Y.useState(n),[s,l]=Y.useState({}),c=(x,S)=>{x.reason===rc.rowFocusOut&&(S.defaultMuiPrevented=!0)},u=x=>()=>{l({...s,[x]:{mode:qn.Edit}})},d=x=>()=>{l({...s,[x]:{mode:qn.View}})},f=x=>async()=>{console.log("deleting entry",x),o.mutate(parseInt(x.toString())),a(i.filter(S=>S.id!==x))},p=x=>()=>{l({...s,[x]:{mode:qn.View,ignoreModifications:!0}});const S=i.find(E=>E.id===x);(S==null?void 0:S.id)===null&&a(i.filter(E=>E.id!==x))},h=async x=>{r.mutate({id:x.id,categoryId:x.category,date:x.date,value:x.value,notes:x.notes});const S={...x,isNew:!1};return a(i.map(E=>E.id===x.id?S:E)),S},m=x=>{console.log(x)},y=x=>{l(x)},w=[{field:"value",headerName:t("value"),width:80,editable:!0,valueFormatter:x=>x==null?"":x+e.category.unit},{field:"date",headerName:t("date"),type:"date",width:120,editable:!0,valueFormatter:x=>x==null?"":vt.fromJSDate(x).toLocaleString(vt.DATE_MED)},{field:"notes",headerName:t("notes"),type:"string",flex:1,editable:!0},{field:"actions",type:"actions",headerName:t("actions"),width:100,cellClassName:"actions",getActions:({id:x})=>{var E;return((E=s[x])==null?void 0:E.mode)===qn.Edit?[b($P,{icon:b(dIt,{}),label:"Save",sx:{color:"primary.main"},onClick:d(x)}),b($P,{icon:b(qC,{}),label:"Cancel",className:"textPrimary",onClick:p(x),color:"inherit"})]:[b($P,{icon:b(VM,{}),label:"Edit",className:"textPrimary",onClick:u(x),color:"inherit"}),b($P,{icon:b(zde,{}),label:"Delete",onClick:f(x),color:"inherit"})]}}];return b(en,{sx:{width:"100%"},children:b(BLt,{editMode:"row",rows:n,columns:w,initialState:{pagination:{paginationModel:{pageSize:kG.pageSize}}},pageSizeOptions:kG.pageSizeOptions,disableRowSelectionOnClick:!0,rowModesModel:s,onRowModesModelChange:y,onRowEditStop:c,processRowUpdate:h,onProcessRowUpdateError:m,slotProps:{toolbar:{setRows:a,setRowModesModel:l}}})})},wpe=({category:e,closeFn:t})=>{const[n]=Le(),r=KIt(),o=YIt(e==null?void 0:e.id),i=Ha({name:ja().required(n("forms.fieldRequired")).max(20,n("forms.maxLength",{chars:"20"})).min(3,n("forms.minLength",{chars:"3"})),unit:ja().required(n("forms.fieldRequired")).max(5,n("forms.maxLength",{chars:"5"}))});return b(Va,{initialValues:{name:e?e.name:"",unit:e?e.unit:""},validationSchema:i,onSubmit:async a=>{e?o.mutate({...a,id:e.id}):r.mutate(a),t&&t()},children:a=>b(pa,{children:G(Wt,{spacing:2,children:[b(nn,{fullWidth:!0,id:"name",label:n("name"),error:a.touched.name&&!!a.touched.name,helperText:a.touched.name&&a.errors.name,...a.getFieldProps("name")}),b(nn,{fullWidth:!0,id:"unit",label:n("unit"),error:a.touched.unit&&!!a.errors.unit,helperText:a.touched.unit&&a.errors.unit?a.errors.unit:n("measurements.unitFormHelpText"),...a.getFieldProps("unit")}),b(Wt,{direction:"row",justifyContent:"end",sx:{mt:2},children:b(dt,{color:"primary",variant:"contained",type:"submit",sx:{mt:2},children:n("submit")})})]})})})},hH=({title:e,subtitle:t,isOpen:n,message:r,deleteFn:o,closeFn:i})=>{const[a]=Le();return b(Ab,{open:n,onClose:i,"aria-labelledby":"modal-modal-title","aria-describedby":"modal-modal-description",children:G(to,{sx:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",p:2,minWidth:"400px"},children:[b(jl,{title:e,titleTypographyProps:{variant:"h6"},subheader:t,action:b(qC,{onClick:i})}),b(ni,{children:b(ot,{variant:"body1",children:r})}),G(Ds,{children:[b(dt,{color:"error",variant:"contained",onClick:()=>{o(),i()},children:a("delete")}),b(dt,{color:"primary",onClick:i,children:a("cancel")})]})]})})},HLt=e=>{const t=QIt(e.category.id),n=Ld(),[r]=Le(),[o,i]=Y.useState(null),[a,s]=Y.useState(!1),[l,c]=Y.useState(!1),u=!!o,d=E=>{i(E.currentTarget)},f=()=>{p(),y()},p=()=>{i(null)},h=()=>{x(),i(null)},m=()=>{t.mutate(e.category.id),n(Mn(Tn.MEASUREMENT_OVERVIEW))},y=()=>s(!0),w=()=>s(!1),x=()=>c(!0),S=()=>c(!1);return G("div",{children:[b(dt,{onClick:d,children:b(U5,{})}),G(_s,{anchorEl:o,open:u,onClose:p,MenuListProps:{"aria-labelledby":"basic-button"},children:[b(rn,{onClick:f,children:r("edit")}),b(rn,{onClick:h,children:r("delete")})]}),b(Fi,{title:r("edit"),isOpen:a,closeFn:w,children:b(wpe,{category:e.category,closeFn:w})}),b(hH,{title:r("deleteConfirmation",{name:e.category.name}),message:r("measurements.deleteInfo"),isOpen:l,closeFn:S,deleteFn:m})]})};Qr.defaultZone=Sje;const xpe=({entry:e,closeFn:t,categoryId:n})=>{const[r,o]=Le(),i=XIt(),a=Kde(),s=qde(n),[l,c]=Y.useState(e?vt.fromJSDate(e.date):vt.now()),u=Ha({value:Pa().required(r("forms.fieldRequired")).min(0,r("forms.minValue",{value:"0"})).max(1e3,r("forms.maxValue",{value:"1000"})),date:Tg().required(r("forms.fieldRequired")),notes:ja().max(500,r("forms.maxLength",{value:"500"}))});return b(Va,{initialValues:{value:e?e.value:0,date:e?e.date:new Date,notes:e?e.notes:""},validationSchema:u,onSubmit:async d=>{e?a.mutate({...d,id:e.id}):i.mutate({...d,categoryId:n}),t&&t()},children:d=>b(pa,{children:G(Wt,{spacing:2,children:[b(nn,{fullWidth:!0,id:"value",type:"number",label:r("value"),error:d.touched.value&&!!d.errors.value,helperText:d.touched.value&&d.errors.value,...d.getFieldProps("value")}),s.isLoading?b(mo,{}):b(Cg,{dateAdapter:ub,adapterLocale:o.language,children:b(TO,{format:"yyyy-MM-dd",label:r("date"),value:l,disableFuture:!0,onChange:f=>{f&&d.setFieldValue("date",f.toJSDate()),c(f)},shouldDisableDate:f=>e&&yi(e.date)===yi(f.toJSDate())?!1:f?s.data.entries.some(p=>yi(p.date)===yi(f.toJSDate())):!1})}),b(nn,{fullWidth:!0,id:"notes",label:r("notes"),multiline:!0,error:d.touched.notes&&!!d.errors.notes,helperText:d.touched.notes&&d.errors.notes,...d.getFieldProps("notes")}),b(Wt,{direction:"row",justifyContent:"end",sx:{mt:2},children:b(dt,{color:"primary",variant:"contained",type:"submit",sx:{mt:2},children:r("submit")})})]})})})},ULt=()=>{const[e]=Le(),[t,n]=Y.useState(!1),r=()=>n(!0),o=()=>n(!1);return G("div",{children:[b(Ng,{color:"secondary","aria-label":"add",onClick:r,sx:{position:"fixed",bottom:"5rem",right:i=>i.spacing(2),zIndex:9},children:b(Vo,{})}),b(Fi,{title:e("add"),isOpen:t,closeFn:o,children:b(wpe,{closeFn:o})})]})},WLt=()=>{const[e]=Le(),[t,n]=Y.useState(!1),r=()=>n(!0),o=()=>n(!1),i=Lc(),a=parseInt(i.categoryId);return G(wt,{children:[b(Ng,{color:"secondary","aria-label":"add",onClick:r,sx:{position:"fixed",bottom:"5rem",right:s=>s.spacing(2),zIndex:9},children:b(Vo,{})}),b(Fi,{title:e("add"),isOpen:t,closeFn:o,children:b(xpe,{closeFn:o,categoryId:a})})]})},_P=['"Open Sans Bold"',"sans-serif"].join(","),GLt=['"Open Sans Light"',"sans-serif"].join(","),Spe={spacing:8,typography:{h3:{fontFamily:_P},h4:{fontFamily:_P},h5:{fontFamily:_P},h6:{fontFamily:_P},fontFamily:GLt},palette:{primary:{main:"#2A4C7D"},secondary:{main:"#e63946"},warning:{main:"#cba328"},info:{main:"#457b9d"},success:{main:"#307916"}}},Gp=RC(Spe),qLt=e=>RC({...Spe,components:{MuiPopover:{defaultProps:{container:e}},MuiPopper:{defaultProps:{container:e}},MuiModal:{defaultProps:{container:e}}}}),Cpe=e=>{const{i18n:t}=Le(),n=30,r=[...e.category.entries].sort((o,i)=>o.date.getTime()-i.date.getTime()).map(o=>({date:o.date.getTime(),value:o.value,entry:o}));return b(en,{alignItems:"center",display:"flex",flexDirection:"column",children:b($p,{width:"90%",height:200,children:G(tle,{data:r,children:[b(t0,{type:"monotone",dataKey:"value",stroke:Gp.palette.secondary.main,strokeWidth:2,dot:r.length>n?!1:{strokeWidth:1,r:4},activeDot:{stroke:"black",strokeWidth:1,r:6}}),b(zg,{stroke:"#ccc",strokeDasharray:"5 5"}),b(Vl,{dataKey:"date",type:"number",domain:["dataMin","dataMax"],tickFormatter:o=>new Date(o).toLocaleDateString(t.language),tickCount:10}),b(Hl,{domain:["auto","auto"],unit:e.category.unit})]})})})},KLt=()=>{const e=Lc(),t=parseInt(e.categoryId),n=qde(t);return n.isLoading?b(mo,{}):b(Fd,{title:n.data.name,optionsMenu:b(HLt,{category:n.data}),mainContent:G(Wt,{spacing:2,children:[b(Cpe,{category:n.data}),b(VLt,{category:n.data})]}),fab:b(WLt,{})})},YLt=e=>{const[t,n]=Le(),[r,o]=Y.useState(!1),i=()=>o(!0),a=()=>o(!1);return G(wt,{children:[G(to,{children:[b(jl,{title:e.category.name,subheader:e.category.unit}),b(ni,{children:b(Cpe,{category:e.category})}),G(Ds,{disableSpacing:!0,sx:{justifyContent:"space-between"},children:[b(dt,{size:"small",children:b(ia,{to:Mn(Tn.MEASUREMENT_DETAIL,n.language,{id:e.category.id}),children:t("seeDetails")})}),b(vn,{onClick:i,children:b(Vo,{})})]})]}),b(Fi,{title:t("add"),isOpen:r,closeFn:a,children:b(xpe,{closeFn:a,categoryId:e.category.id})})]})},oX=()=>{const e=Gde(),[t]=Le();return e.isLoading?b(mo,{}):b(Fd,{title:t("measurements.measurements"),mainContent:G(Wt,{spacing:2,children:[e.data.length===0&&b(KC,{}),e.data.map(n=>b(YLt,{category:n},n.id))]}),fab:b(ULt,{})})},PT=[{range:"obese",color:"#FF5733",min:30,max:100},{range:"overweight",color:"#FFC107",min:25,max:30},{range:"normal",color:"#90EE90",min:18.5,max:25},{range:"underweight",color:"#FFC300",min:0,max:18.5}],NP=e=>{const t=PT.find(n=>n.range===e);return t?t.color:"gray"},QLt=()=>{const[e]=Le(),t=E1(),n=Ul(),[r,o]=v.useState(),[i,a]=v.useState();v.useEffect(()=>{var u;if(t.data&&t.data.length>0){const d=t.data[0],f=(u=n.data)!=null&&u.useMetric?d.weight:d.weight*.453592;a(f)}},[t.data,n.data]),v.useEffect(()=>{var u;(u=n.data)!=null&&u.height&&o(n.data.height)},[n.data]);const l=(()=>{if(r&&i){const u=r/100;return i/(u*u)}return null})();if(t.isLoading||n.isLoading)return b(mo,{});const c=[];for(let u=140;u<=220;u+=10){const d=u/100,f={height:u};let p=0;PT.forEach((h,m)=>{const y=h.max>100?100:h.max;let w=y*d*d-p;w=Math.min(w,150-p),m===0?f[h.range]=w:f[h.range]=f[PT[m-1].range]+w,p=Math.min(y*d*d,150)}),c.push(f)}return b(Fd,{title:e("bmi.calculator"),mainContent:b(wt,{children:G(Wt,{spacing:2,children:[G(Oe,{container:!0,spacing:2,children:[b(Oe,{size:{xs:12,sm:6},children:b(nn,{label:e("height"),fullWidth:!0,slotProps:{input:{endAdornment:b(ot,{children:e("cm")})}},type:"number",value:r??"",onChange:u=>o(parseFloat(u.target.value))})}),b(Oe,{size:{xs:12,sm:6},children:b(nn,{label:e("weight"),slotProps:{input:{endAdornment:b(ot,{children:e("server.kg")})}},fullWidth:!0,type:"number",value:i??"",onChange:u=>a(parseFloat(u.target.value))})})]}),l!==null&&b(ot,{variant:"h6",children:e("bmi.result",{value:l.toFixed(1)})}),b($p,{width:"100%",height:400,children:G(lut,{data:c,children:[b(Vl,{dataKey:"height",type:"number",domain:[140,220],unit:"cm"}),b(Hl,{domain:[40,150],tickFormatter:u=>Math.round(u).toString(),unit:"kg"}),b(zg,{strokeDasharray:"3 3"}),b(ss,{formatter:(u,d)=>[Math.round(u),e("bmi."+d)]}),PT.map(u=>b(Lp,{type:"monotone",dataKey:u.range,stroke:"black",fill:u.color,fillOpacity:.8},u.range)),l!==null&&b(l1,{x:r,y:i,r:8,fill:"black",stroke:"none"})]})}),G(Wt,{direction:"row",justifyContent:"center",children:[b(en,{height:20,width:20,sx:{backgroundColor:NP("obese")}}),e("bmi.obese"),b(en,{height:20,width:20,sx:{backgroundColor:NP("overweight"),marginLeft:2}}),e("bmi.overweight"),b(en,{height:20,width:20,sx:{backgroundColor:NP("normal"),marginLeft:2}}),e("bmi.normal"),b(en,{height:20,width:20,sx:{backgroundColor:NP("underweight"),marginLeft:2}}),e("bmi.underweight")]})]})})})},XLt=e=>{var r,o,i,a;const[t,n]=Le();return G(Ht,{children:[b(Ie,{sx:{paddingX:1},children:b(Ac,{alt:(r=e.item.ingredient)==null?void 0:r.name,src:(i=(o=e.item.ingredient)==null?void 0:o.image)==null?void 0:i.url,sx:{width:45,height:45},children:b(Rd,{})})}),G(Ie,{sx:{paddingX:1},children:[e.item.amountString," ",(a=e.item.ingredient)==null?void 0:a.name]}),b(Ie,{align:"right",sx:{paddingX:1},children:t("nutrition.valueEnergyKcalKj",{kcal:Ri(e.item.nutritionalValues.energy,n.language),kj:Ri(e.item.nutritionalValues.energyKj,n.language)})}),b(Ie,{align:"right",sx:{paddingX:1},children:kn(e.item.nutritionalValues.protein,n.language)}),b(Ie,{align:"right",sx:{paddingX:1},children:kn(e.item.nutritionalValues.carbohydrates,n.language)}),b(Ie,{align:"right",sx:{paddingX:1},children:kn(e.item.nutritionalValues.fat,n.language)})]},e.item.id)},aj=e=>{const[t,n]=Le();return b($c,{children:G($l,{children:[b(Eu,{children:G(Ht,{children:[b(Ie,{}),b(Ie,{}),b(Ie,{align:"right",sx:{paddingX:1},children:t("nutrition.energy")}),b(Ie,{align:"right",sx:{paddingX:1},children:t("nutrition.protein")}),b(Ie,{align:"right",sx:{paddingX:1},children:t("nutrition.carbohydrates")}),b(Ie,{align:"right",sx:{paddingX:1},children:t("nutrition.fat")})]})}),G(Dl,{children:[e.items.map(r=>b(XLt,{item:r},r.id)),e.showSum&&G(Ht,{children:[b(Ie,{sx:{paddingX:1},children:" "}),b(Ie,{sx:{paddingX:1},children:t("total")}),b(Ie,{align:"right",sx:{paddingX:1},children:t("nutrition.valueEnergyKcalKj",{kcal:Ri(e.values.energy,n.language),kj:Ri(e.values.energyKj,n.language)})}),b(Ie,{align:"right",sx:{paddingX:1},children:kn(e.values.protein,n.language)}),b(Ie,{align:"right",sx:{paddingX:1},children:kn(e.values.carbohydrates,n.language)}),b(Ie,{align:"right",sx:{paddingX:1},children:kn(e.values.fat,n.language)})]})]})]})})},JLt=e=>{const[t,n]=Le();return b($c,{children:G($l,{size:"small",children:[b(Eu,{children:G(Ht,{children:[b(Ie,{children:t("nutrition.macronutrient")}),b(Ie,{align:"right",children:t("nutrition.planned")}),b(Ie,{align:"right",children:t("nutrition.logged")}),b(Ie,{align:"right",children:t("nutrition.difference")})]})}),G(Dl,{children:[G(Ht,{children:[b(Ie,{children:t("nutrition.energy")}),b(Ie,{align:"right",children:t("nutrition.valueEnergyKcalKj",{kcal:Ri(e.planned.energy,n.language),kj:Ri(e.planned.energyKj,n.language)})}),b(Ie,{align:"right",children:t("nutrition.valueEnergyKcalKj",{kcal:Ri(e.logged.energy,n.language),kj:Ri(e.logged.energyKj,n.language)})}),b(Ie,{align:"right",children:t("nutrition.valueEnergyKcalKj",{kcal:Ri(e.logged.energy-e.planned.energy,n.language),kj:Ri(e.logged.energyKj-e.planned.energyKj,n.language)})})]}),G(Ht,{children:[b(Ie,{children:t("nutrition.protein")}),b(Ie,{align:"right",children:kn(e.planned.protein,n.language)}),b(Ie,{align:"right",children:kn(e.logged.protein,n.language)}),b(Ie,{align:"right",children:kn(e.logged.protein-e.planned.protein,n.language)})]}),G(Ht,{children:[b(Ie,{children:t("nutrition.carbohydrates")}),b(Ie,{align:"right",children:kn(e.planned.carbohydrates,n.language)}),b(Ie,{align:"right",children:kn(e.logged.carbohydrates,n.language)}),b(Ie,{align:"right",children:kn(e.logged.carbohydrates-e.planned.carbohydrates,n.language)})]}),G(Ht,{children:[b(Ie,{sx:{pl:5},children:t("nutrition.ofWhichSugars")}),b(Ie,{align:"right",children:kn(e.planned.carbohydratesSugar,n.language)}),b(Ie,{align:"right",children:kn(e.logged.carbohydratesSugar,n.language)}),b(Ie,{align:"right",children:kn(e.logged.carbohydratesSugar-e.planned.carbohydratesSugar,n.language)})]}),G(Ht,{children:[b(Ie,{children:t("nutrition.fat")}),b(Ie,{align:"right",children:kn(e.planned.fat,n.language)}),b(Ie,{align:"right",children:kn(e.logged.fat,n.language)}),b(Ie,{align:"right",children:kn(e.logged.fat-e.planned.fat,n.language)})]}),G(Ht,{children:[b(Ie,{sx:{paddingLeft:5},children:t("nutrition.ofWhichSaturated")}),b(Ie,{align:"right",children:kn(e.planned.fatSaturated,n.language)}),b(Ie,{align:"right",children:kn(e.logged.fatSaturated,n.language)}),b(Ie,{align:"right",children:kn(e.logged.fatSaturated-e.planned.fatSaturated,n.language)})]}),G(Ht,{children:[b(Ie,{children:t("nutrition.others")}),b(Ie,{}),b(Ie,{}),b(Ie,{})]}),G(Ht,{children:[b(Ie,{children:t("nutrition.fibres")}),b(Ie,{align:"right",children:kn(e.planned.fiber,n.language)}),b(Ie,{align:"right",children:kn(e.logged.fiber,n.language)}),b(Ie,{align:"right",children:kn(e.logged.fiber-e.planned.fiber,n.language)})]}),G(Ht,{children:[b(Ie,{children:t("nutrition.sodium")}),b(Ie,{align:"right",children:kn(e.planned.sodium,n.language)}),b(Ie,{align:"right",children:kn(e.logged.sodium,n.language)}),b(Ie,{align:"right",children:kn(e.logged.sodium-e.planned.sodium,n.language)})]})]})]})})},iX=()=>{const[e]=Le(),t=Lc(),n=parseInt(t.planId),r=new Date(t.date),o=Wje(n,t.date);return o.isLoading?b(mo,{}):b(Fd,{title:e("nutrition.nutritionalDiary"),mainContent:b(wt,{children:G(Wt,{spacing:2,children:[b(ot,{gutterBottom:!0,variant:"h4",children:r.toLocaleDateString()}),b(JLt,{logged:o.data.loggedNutritionalValuesDate(r),planned:o.data.plannedNutritionalValues}),b(aj,{values:o.data.loggedNutritionalValuesDate(r),items:o.data.loggedEntriesDate(r),showSum:!0})]})})})};function*rR(e){let t;e<=3?t=xje:e<=5?t=wje:t=bje;for(const n of t)yield n}const ZLt=e=>{const[t,n]=Le(),r=rR(3),o=[{name:t("nutrition.carbohydrates"),value:e.data.carbohydrates},{name:t("nutrition.protein"),value:e.data.protein},{name:t("nutrition.fat"),value:e.data.fat}],i=Math.PI/180;return b($p,{width:"100%",height:300,children:G(rle,{children:[b(Iu,{data:o,labelLine:!1,label:({cx:s,cy:l,midAngle:c,innerRadius:u,outerRadius:d,payload:f})=>{const p=u+(d-u)*.4,h=s+p*Math.cos(-c*i),m=l+p*Math.sin(-c*i);return b("text",{x:h,y:m,fill:"white",textAnchor:"middle",dominantBaseline:"central",children:kn(f.value,n.language)})},fill:"#8884d8",dataKey:"value",children:o.map((s,l)=>b(Kb,{fill:r.next().value},`cell-${l}`))}),b(ud,{})]})})},eFt=({showPlanned:e,planned:t,today:n,avg7Days:r})=>{const[o,i]=Le(),a=rR(3),s=[{name:o("nutrition.protein"),planned:t.protein,today:n.protein,avg7Days:r.protein},{name:o("nutrition.carbohydrates"),planned:t.carbohydrates,today:n.carbohydrates,avg7Days:r.carbohydrates},{name:o("nutrition.sugar"),planned:t.carbohydratesSugar,today:n.carbohydratesSugar,avg7Days:r.carbohydratesSugar},{name:o("nutrition.fat"),planned:t.fat,today:n.fat,avg7Days:r.fat},{name:o("nutrition.saturatedFat"),planned:t.fatSaturated,today:n.fatSaturated,avg7Days:r.fatSaturated}];return b($p,{width:"100%",height:300,children:G(nle,{data:s,margin:{top:20,right:30,left:20,bottom:5},children:[b(zg,{strokeDasharray:"3 4"}),b(Vl,{dataKey:"name"}),b(Hl,{type:"number",orientation:"left",unit:o("nutrition.gramShort")}),b(ss,{formatter:l=>Ri(l,i.language)}),b(ud,{}),e&&b(fu,{dataKey:"planned",unit:o("nutrition.gramShort"),name:o("nutrition.planned"),fill:a.next().value}),b(fu,{dataKey:"today",unit:o("nutrition.gramShort"),name:o("nutrition.today"),fill:a.next().value}),b(fu,{dataKey:"avg7Days",unit:o("nutrition.gramShort"),name:o("nutrition.7dayAvg"),fill:a.next().value})]})})},tFt=e=>{const[t,n]=Le();return b($c,{children:G($l,{size:"small",children:[b(Eu,{children:G(Ht,{children:[b(Ie,{children:t("date")}),b(Ie,{align:"right",children:t("nutrition.logged")}),b(Ie,{align:"right",children:t("nutrition.difference")})]})}),b(Dl,{children:Array.from(e.logged).map(([r])=>{var o,i;return G(Ht,{children:[b(Ie,{children:b(ia,{to:Mn(Tn.NUTRITION_DIARY,n.language,{id:e.planId,date:r}),children:new Date(r).toLocaleDateString(n.language)})}),b(Ie,{align:"right",children:t("nutrition.valueEnergyKcal",{value:Ri((o=e.logged.get(r))==null?void 0:o.nutritionalValues.energy,n.language)})}),b(Ie,{align:"right",children:Ri(((i=e.logged.get(r))==null?void 0:i.nutritionalValues.energy)-e.planned.energy,n.language)})]},r)})})]})})},nFt=()=>{const[e]=Le(),[t,n]=Y.useState(!1),r=()=>n(!0),o=()=>n(!1);return G("div",{children:[b(Ng,{color:"secondary","aria-label":"add",onClick:r,sx:{position:"fixed",bottom:"5rem",right:i=>i.spacing(2),zIndex:9},children:b(Vo,{})}),b(Fi,{title:e("add"),isOpen:t,closeFn:o,children:b(P5,{closeFn:o})})]})},rFt=e=>{const[t]=Le(),[n,r]=Y.useState(!1),o=()=>r(!0),i=()=>r(!1);return G("div",{children:[b(Ng,{color:"secondary","aria-label":"add",onClick:o,sx:{position:"fixed",bottom:"5rem",right:a=>a.spacing(2),zIndex:9},children:b(GC,{})}),b(Fi,{title:t("nutrition.addNutritionalDiary"),isOpen:n,closeFn:i,children:b(E5,{closeFn:i,planId:e.plan.id,meals:e.plan.meals})})]})},Epe=({meal:e,planId:t,closeFn:n})=>{const[r,o]=Le(),i=Xje(t),a=Zje(t),s=Ha({name:ja().required().max(25,r("forms.maxLength",{chars:"25"})).min(3,r("forms.minLength",{chars:"3"})),time:Tg().required()});return b(Va,{initialValues:{name:e?e.name:"",time:e?e.time:new Date},validationSchema:s,onSubmit:async l=>{l.time instanceof Date||(l.time=l.time.toJSDate());const c={...l,time:qFe(l.time)};e?a.mutate({...c,plan:t,id:e.id}):i.mutate({...c,plan:t}),n&&n()},children:l=>b(pa,{children:G(Wt,{spacing:2,children:[b(nn,{fullWidth:!0,id:"name",label:r("description"),error:l.touched.name&&!!l.errors.name,helperText:l.touched.name&&l.errors.name,...l.getFieldProps("name")}),b(Cg,{dateAdapter:ub,adapterLocale:o.language,children:b(nmt,{label:r("timeOfDay"),value:l.values.time!==null?vt.fromJSDate(l.values.time):null,onChange:c=>l.setFieldValue("time",c)})}),G(Wt,{direction:"row",justifyContent:"end",spacing:2,children:[n!==void 0&&b(dt,{color:"primary",variant:"outlined",onClick:()=>n(),children:r("close")}),b(dt,{disabled:i.isPending||a.isPending,color:"primary",variant:"contained",type:"submit",children:r("submit")})]})]})})})},oFt=e=>{const[t]=Le(),n=rR(3),r=[{name:t("nutrition.energy"),value:e.logged.energy/e.planned.energy*100},{name:t("nutrition.protein"),value:e.logged.protein/e.planned.protein*100},{name:t("nutrition.carbohydrates"),value:e.logged.carbohydrates/e.planned.carbohydrates*100},{name:t("nutrition.fat"),value:e.logged.fat/e.planned.fat*100}];return b($p,{width:"100%",height:150,children:G(nle,{data:r,layout:"vertical",margin:{left:60},children:[b(zg,{strokeDasharray:"3 4"}),b(Vl,{type:"number",unit:"%"}),b(Hl,{type:"category",dataKey:"name"}),b(fu,{dataKey:"value",unit:"%",fill:n.next().value})]})})},Ppe=({planId:e,item:t,mealId:n,closeFn:r})=>{const[o]=Le(),i=rBe(e),a=oBe(e),s=iBe(e),l=()=>{t&&s.mutate(t.id),r&&r()},c=Ha({amount:Pa().required(o("forms.fieldRequired")).max(1e3,o("forms.maxValue",{value:"1000"})).min(1,o("forms.minValue",{value:"1"})),ingredient:Pa().required(o("forms.fieldRequired"))});return b(Va,{initialValues:{amount:t?t.amount:0,ingredient:t?t.ingredientId:0},validationSchema:c,onSubmit:async u=>{const d={...u,meal:n,weight_unit:null};t?a.mutate({...d,id:t.id}):i.mutate(d),r&&r()},children:u=>{var d;return b(pa,{children:G(Wt,{spacing:2,children:[b(c5,{callback:f=>u.setFieldValue("ingredient",f?f.data.id:null),initialIngredient:t?(d=t.ingredient)==null?void 0:d.name:null}),b(nn,{fullWidth:!0,id:"amount",label:"amount",InputProps:{endAdornment:b(Co,{position:"end",children:o("nutrition.gramShort")})},error:u.touched.amount&&!!u.errors.amount,helperText:u.touched.amount&&u.errors.amount,...u.getFieldProps("amount")}),G(Wt,{direction:"row",justifyContent:"end",spacing:2,children:[r!==void 0&&t!==void 0&&b(dt,{color:"error",variant:"outlined",onClick:l,children:o("delete")}),r!==void 0&&b(dt,{color:"primary",variant:"outlined",onClick:()=>r(),children:o("close")}),b(dt,{color:"primary",variant:"contained",type:"submit",children:o("submit")})]})]})})}})},iFt=e=>{const t=Ure(e.planId),n=Jje(e.planId),[r]=Le(),[o,i]=Y.useState(!1),[a,s]=v.useState(null),[l,c]=v.useState(!1),[u,d]=v.useState(!1),f=!!a,p=A=>{s(A.currentTarget)},h=()=>{m(),x()},m=()=>{s(null)},y=()=>{E(),s(null)},w=()=>{n.mutate(e.meal.id)},x=()=>c(!0),S=()=>c(!1),E=()=>d(!0),P=()=>d(!1),T=(A,k)=>{k!=="clickaway"&&i(!1)},I=()=>{const A=e.meal.items.map(k=>({plan:e.planId,meal:e.meal.id,mealItem:k.id,ingredient:k.ingredientId,weight_unit:k.weightUnitId,datetime:new Date().toISOString(),amount:k.amount}));t.mutate(A),i(!0)};return G(wt,{children:[!e.onlyLogging&&b(Rc,{title:r("nutrition.logThisMeal"),children:b(vn,{"aria-label":"settings",onClick:I,children:b(GC,{})})}),b(vn,{"aria-label":"settings",onClick:p,children:b(H5,{})}),b(vn,{"aria-label":"settings",onClick:e.handleExpanded,children:e.isExpanded?b(Hde,{}):b(Ude,{})}),G(_s,{anchorEl:a,open:f,onClose:m,MenuListProps:{"aria-labelledby":"basic-button"},children:[b(rn,{onClick:h,children:r("edit")}),b(rn,{onClick:y,children:r("delete")})]}),b(Fi,{title:r("edit"),isOpen:l,closeFn:S,children:b(Epe,{meal:e.meal,closeFn:S,planId:e.planId})}),b(hH,{title:r("deleteConfirmation",{name:e.meal.name}),message:r("nutrition.mealDeleteInfo"),isOpen:u,closeFn:P,deleteFn:w}),b(az,{open:o,autoHideDuration:yz,onClose:T,children:b(kl,{onClose:T,severity:"success",sx:{width:"100%"},children:r("nutrition.diaryEntrySaved")})})]})},aFt=e=>{var o,i,a,s;const[t,n]=v.useState(!1),r=()=>n(!t);return G(wt,{children:[G(Os,{children:[b(rz,{onClick:r,sx:{"&:hover":{cursor:"pointer"}},children:b(Ac,{alt:(o=e.mealItem.ingredient)==null?void 0:o.name,src:(a=(i=e.mealItem.ingredient)==null?void 0:i.image)==null?void 0:a.url,sx:{width:45,height:45},children:b(Rd,{})})}),b(ko,{primary:`${e.mealItem.amountString} ${(s=e.mealItem.ingredient)==null?void 0:s.name}`})]}),b(xl,{in:t,timeout:"auto",unmountOnExit:!0,sx:{width:"100%"},children:b(Os,{children:b(ko,{children:b(Ppe,{planId:e.planId,mealId:e.mealId,item:e.mealItem,closeFn:r})})})})]})},aX=e=>{const t=no(),n=e.meal.id!==dT,[r]=Le(),[o,i]=v.useState(!1),a=()=>i(!o),[s,l]=v.useState(!1),c=()=>{l(!s),d(!1)},[u,d]=v.useState(!1),f=()=>{d(!u),l(!1)};return G(to,{children:[b(jl,{sx:{bgcolor:t.palette.grey[300]},action:e.meal.id!==dT&&b(iFt,{meal:e.meal,planId:e.planId,onlyLogging:e.onlyLogging,isExpanded:o,handleExpanded:a}),title:e.meal.name,subheader:e.meal.timeHHMMLocale}),G(ni,{sx:{paddingY:0},children:[G(xl,{in:o,timeout:"auto",unmountOnExit:!0,children:[!e.onlyLogging&&b(aj,{showSum:n,items:e.meal.items,values:e.meal.plannedNutritionalValues}),b(ot,{gutterBottom:!0,variant:"h6",sx:{my:2},children:r("nutrition.loggedToday")}),!e.meal.plannedNutritionalValues.isEmpty&&b(oFt,{logged:e.meal.loggedNutritionalValuesToday,planned:e.meal.plannedNutritionalValues}),b(aj,{showSum:n,items:e.meal.diaryEntriesToday,values:e.meal.loggedNutritionalValuesToday})]}),!o&&b(Bl,{children:e.meal.items.map(p=>b(aFt,{mealItem:p,planId:e.planId,mealId:e.meal.id},p.id))})]}),G(Ds,{children:[!e.onlyLogging&&b(Rc,{title:r("nutrition.addMealItem"),children:b(vn,{onClick:c,children:b(Vo,{})})}),b(Rc,{title:r("nutrition.addNutritionalDiary"),children:b(vn,{onClick:f,children:b(GC,{})})})]}),b(xl,{in:s,timeout:"auto",unmountOnExit:!0,children:G(ni,{sx:{paddingY:0},children:[b("p",{children:b("b",{children:r("nutrition.addMealItem")})}),b(Ppe,{planId:e.planId,mealId:e.meal.id,closeFn:c})]})}),b(xl,{in:u,timeout:"auto",unmountOnExit:!0,children:G(ni,{sx:{paddingY:0},children:[b("p",{children:b("b",{children:r("nutrition.addNutritionalDiary")})}),b(E5,{closeFn:f,planId:e.planId,mealId:e.meal.id!==dT?e.meal.id:null})]})})]})},sX=e=>{const[t,n]=Le();return b($c,{children:G($l,{size:"small",children:[b(Eu,{children:G(Ht,{children:[b(Ie,{children:t("nutrition.macronutrient")}),b(Ie,{align:"right",children:t("total")}),b(Ie,{align:"right",children:t("nutrition.percentEnergy")})]})}),G(Dl,{children:[G(Ht,{children:[b(Ie,{children:t("nutrition.energy")}),b(Ie,{align:"right",children:t("nutrition.valueEnergyKcalKj",{kcal:Ri(e.values.energy,n.language),kj:Ri(e.values.energyKj,n.language)})}),b(Ie,{align:"right"})]}),G(Ht,{children:[b(Ie,{children:t("nutrition.protein")}),b(Ie,{align:"right",children:kn(e.values.protein,n.language)}),b(Ie,{align:"right",children:bD(e.values.percent.protein,n.language)})]}),G(Ht,{children:[b(Ie,{children:t("nutrition.carbohydrates")}),b(Ie,{align:"right",children:kn(e.values.carbohydrates,n.language)}),b(Ie,{align:"right",children:bD(e.values.percent.carbohydrates,n.language)})]}),G(Ht,{children:[b(Ie,{sx:{pl:5},children:t("nutrition.ofWhichSugars")}),b(Ie,{align:"right",children:kn(e.values.carbohydratesSugar,n.language)}),b(Ie,{align:"right"})]}),G(Ht,{children:[b(Ie,{children:t("nutrition.fat")}),b(Ie,{align:"right",children:kn(e.values.fat,n.language)}),b(Ie,{align:"right",children:bD(e.values.percent.fat,n.language)})]}),G(Ht,{children:[b(Ie,{sx:{pl:5},children:t("nutrition.ofWhichSaturated")}),b(Ie,{align:"right",children:kn(e.values.fatSaturated,n.language)}),b(Ie,{align:"right"})]}),G(Ht,{children:[b(Ie,{children:t("nutrition.others")}),b(Ie,{children:" "}),b(Ie,{align:"right"})]}),G(Ht,{children:[b(Ie,{children:t("nutrition.fibres")}),b(Ie,{align:"right",children:kn(e.values.fiber,n.language)}),b(Ie,{align:"right"})]}),G(Ht,{children:[b(Ie,{children:t("nutrition.sodium")}),b(Ie,{align:"right",children:kn(e.values.sodium,n.language)}),b(Ie,{align:"right"})]})]})]})})},sFt=e=>{const t=qje(e.plan.id),n=Ld(),[r,o]=Le(),[i,a]=Y.useState(null),[s,l]=Y.useState(!1),[c,u]=Y.useState(!1),d=!!i,f=I=>{a(I.currentTarget)},p=()=>{h(),S()},h=()=>{a(null)},m=()=>{P(),a(null)},y=()=>{t.mutate(e.plan.id),n(Mn(Tn.NUTRITION_OVERVIEW))},w=()=>window.location.href=Mn(Tn.NUTRITION_PLAN_PDF,o.language,{id:e.plan.id}),x=()=>window.location.href=Mn(Tn.NUTRITION_PLAN_COPY,o.language,{id:e.plan.id}),S=()=>l(!0),E=()=>l(!1),P=()=>u(!0),T=()=>u(!1);return G(wt,{children:[b(dt,{onClick:f,children:b(U5,{})}),G(_s,{anchorEl:i,open:d,onClose:h,MenuListProps:{"aria-labelledby":"basic-button"},children:[b(rn,{onClick:p,children:r("edit")}),b(rn,{onClick:w,children:r("downloadAsPdf")}),b(rn,{onClick:x,children:r("nutrition.copyPlan")}),b(rn,{onClick:m,children:r("delete")})]}),b(Fi,{title:r("edit"),isOpen:s,closeFn:E,children:b(P5,{plan:e.plan,closeFn:E})}),b(hH,{title:r("deleteConfirmation",{name:e.plan.description}),message:r("nutrition.planDeleteInfo"),isOpen:c,closeFn:T,deleteFn:y})]})},lFt=e=>{const[t]=Le(),n=e.plan.plannedNutritionalValues,r=e.plan.loggedNutritionalValuesToday,o=e.plan.percentageValuesLoggedToday;return b(wt,{children:G(Wt,{direction:"column",spacing:1,children:[b(ot,{gutterBottom:!0,variant:"h6",children:t("nutrition.goalsTitle")}),b(Vy,{title:t("nutrition.protein"),percentage:o.protein,logged:r.protein,planned:n.protein}),b(Vy,{title:t("nutrition.carbohydrates"),percentage:o.carbohydrates,logged:r.carbohydrates,planned:n.carbohydrates}),b(Vy,{title:t("nutrition.fat"),percentage:o.fat,logged:r.fat,planned:n.fat})]})})},cFt=()=>{const[e]=Le(),t=Lc(),n=parseInt(t.planId),r=Uje(n),[o,i]=v.useState(!1),a=()=>i(!o),s=r.data;return r.isLoading?b(mo,{}):b(Fd,{title:s.description,optionsMenu:b(sFt,{plan:s}),mainContent:b(wt,{children:G(Wt,{spacing:2,children:[s.meals.map(l=>b(aX,{meal:l,planId:s.id,onlyLogging:s.onlyLogging},l.id)),b(aX,{meal:r.data.pseudoMealOthers(e("nutrition.pseudoMealTitle")),planId:s.id,onlyLogging:!0},-1),!s.onlyLogging&&G(wt,{children:[b(Rc,{title:e("nutrition.addMeal"),children:b(vn,{onClick:a,children:b(Vo,{})})}),G(xl,{in:o,timeout:"auto",unmountOnExit:!0,children:[b("p",{children:b("b",{children:e("nutrition.addMeal")})}),b(Epe,{planId:s.id,closeFn:a})]})]}),b(sX,{values:s.plannedNutritionalValues}),s.hasAnyPlanned&&b(ZLt,{data:s.plannedNutritionalValues}),b(ot,{gutterBottom:!0,variant:"h4",children:e("nutrition.logged")}),b(eFt,{showPlanned:s.hasAnyPlanned,planned:s.plannedNutritionalValues,today:s.loggedNutritionalValuesToday,avg7Days:s.loggedNutritionalValues7DayAvg}),b(sX,{values:s.loggedNutritionalValuesToday}),b(tFt,{planId:s.id,logged:s.groupDiaryEntries,planned:s.plannedNutritionalValues})]})}),sideBar:b(lFt,{plan:s}),fab:b(rFt,{plan:s})})},uFt=()=>{var n;const e=Vje(),[t]=Le();return e.isLoading?b(mo,{}):b(Fd,{title:t("nutrition.plans"),mainContent:G(Wt,{spacing:2,children:[((n=e.data)==null?void 0:n.length)===0&&b(KC,{}),b(fFt,{plans:e.data})]}),fab:b(nFt,{})})},dFt=e=>{const[t,n]=Le(),r=Mn(Tn.NUTRITION_DETAIL,n.language,{id:e.plan.id});return G(wt,{children:[b(Os,{sx:{p:0},children:G(Ip,{component:"a",href:r,children:[b(ko,{primary:e.plan.description!==""?e.plan.description:t("routines.routine"),secondary:e.plan.creationDate.toLocaleDateString()}),b(Bde,{})]})}),b(Is,{component:"li"})]})},fFt=e=>b(ro,{children:b(Bl,{sx:{py:0},children:e.plans.map(t=>b(dFt,{plan:t},t.id))},"abc")}),pFt=e=>{const t=Ld(),n=FSt(e.routine.id),[r,o]=Le(),[i,a]=v.useState(null),[s,l]=v.useState(!1),c=!!i,u=w=>{a(w.currentTarget)},d=()=>{t(Mn(Tn.ROUTINE_EDIT,o.language,{id:e.routine.id}))},f=()=>{t(Mn(Tn.ROUTINE_DETAIL_TABLE,o.language,{id:e.routine.id}))},p=()=>{l(!0),y()},h=async()=>{await n.mutateAsync(),t(Mn(Tn.ROUTINE_OVERVIEW,o.language))},m=()=>{l(!1)},y=()=>{a(null)};return G("div",{children:[b(dt,{onClick:u,children:b(U5,{})}),G(_s,{anchorEl:i,open:c,onClose:y,MenuListProps:{"aria-labelledby":"basic-button"},children:[b(rn,{onClick:d,children:r("edit")}),b(rn,{onClick:f,children:"Table view"}),b(Is,{}),b(rn,{onClick:p,children:r("delete")})]}),G(zC,{open:s,onClose:m,"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description",children:[b(mk,{id:"alert-dialog-title",children:r("delete")}),b(Ov,{children:b(jRe,{id:"alert-dialog-description",children:r("deleteConfirmation",{name:e.routine.name})})}),G(VC,{children:[b(dt,{onClick:m,children:r("cancel")}),b(dt,{onClick:h,color:"error",autoFocus:!0,children:r("delete")})]})]})]})},hFt=()=>{var r,o,i;const e=Lc(),t=e.routineId?parseInt(e.routineId):0,n=Xg(t);return b(T5,{query:n,child:n.isSuccess&&b(Fd,{title:(r=n.data)==null?void 0:r.name,optionsMenu:b(pFt,{routine:n.data}),mainContent:G(Wt,{spacing:2,sx:{mt:2},children:[((o=n.data)==null?void 0:o.description)!==""&&b(ot,{variant:"body2",sx:{whiteSpace:"pre-line"},children:(i=n.data)==null?void 0:i.description}),n.data.dayDataCurrentIteration.filter(a=>a.day!==null).map((a,s)=>b(dde,{dayData:a},`dayDetails-${s}`))]})})})},Tpe=()=>{const e=Lc(),t=e.routineId?parseInt(e.routineId):0,n=Xg(t);return b(kc,{maxWidth:!1,sx:{overflowX:"scroll",display:"flex"},children:b(T5,{query:n,child:n.isSuccess&&b(wt,{children:G(Wt,{direction:"row",children:[b(gFt,{dayData:n.data.groupedDayDataByIteration[1]!==void 0?n.data.groupedDayDataByIteration[1]:[],iteration:1}),Object.keys(n.data.groupedDayDataByIteration).map(r=>b(mFt,{dayData:n.data.groupedDayDataByIteration[parseInt(r)],iteration:parseInt(r)},r))]})})})})},gFt=e=>{const[t,n]=Le(),r=no(),o=Bp();let i;return o.isSuccess&&(i=Fb(n.language,o.data)),b($c,{component:ro,sx:{minWidth:200,position:"sticky",left:0},children:G($l,{size:"small",children:[G(Eu,{children:[b(Ht,{children:b(Ie,{children:b(ot,{variant:"h5",children:" "})})}),b(Ht,{children:b(Ie,{children:" "})})]}),b(Dl,{children:e.dayData.filter(a=>a.day!==null).map((a,s)=>G(Y.Fragment,{children:[b(Ht,{children:b(Ie,{sx:{backgroundColor:r.palette.action.hover},children:b("b",{children:a.day===null||a.day.isRest?t("routines.restDay"):a.day.name})})},`tableRow-rest-${s}`),a.slots.map((l,c)=>b(Y.Fragment,{children:l.setConfigs.map((u,d)=>{var p,h;const f=d===0||u.exerciseId!==((p=l.setConfigs[d-1])==null?void 0:p.exerciseId);return b(Ht,{children:G(Ie,{sx:{textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"},children:[f?(h=u.exercise)==null?void 0:h.getTranslation(i).name:".",f&&u.isSpecialType&&b(vu,{label:u.type,color:"info",size:"small",sx:{marginLeft:"0.5em",height:18}})]},`tableCell-exercise-${d}`)},`tableRow-exercise-${d}`)})},c)),b(Ht,{children:b(Ie,{},`tableCell-emtpy-${s}`)},`tableRow-emtpy-${s}`)]},`${e.iteration}-${s}`))})]})})},mFt=e=>{const[t]=Le(),n=no();return b($c,{component:ro,sx:{minWidth:380},children:G($l,{size:"small",children:[G(Eu,{children:[b(Ht,{children:b(Ie,{colSpan:5,children:b(ot,{variant:"h5",children:t("routines.workoutNr",{number:e.iteration})})})}),G(Ht,{children:[b(Ie,{align:"center",children:t("routines.sets")}),b(Ie,{align:"center",children:t("routines.reps")}),b(Ie,{align:"center",children:t("weight")}),b(Ie,{align:"center",children:t("routines.restTime")}),b(Ie,{align:"center",children:t("routines.rir")})]})]}),b(Dl,{children:e.dayData.filter(r=>r.day!==null).map((r,o)=>G(Y.Fragment,{children:[b(Ht,{children:b(Ie,{sx:{backgroundColor:n.palette.action.hover},colSpan:5,children:" "})}),r.slots.map((i,a)=>b(Y.Fragment,{children:i.setConfigs.map((s,l)=>G(Ht,{children:[b(Ie,{align:"center",children:s.nrOfSets===null?"-/-":s.nrOfSets}),G(Ie,{align:"center",children:[s.reps===null?"-/-":s.reps,s.maxReps!==null&&G(wt,{children:[" - ",s.maxReps]})]}),G(Ie,{align:"center",children:[s.weight===null?"-/-":s.weight,s.maxWeight!==null&&G(wt,{children:[" - ",s.maxWeight]})]}),G(Ie,{align:"center",children:[s.restTime===null?"-/-":s.restTime,s.maxRestTime!==null&&G(wt,{children:[" - ",s.maxRestTime]})]}),b(Ie,{align:"center",children:s.rir})]},l))},a)),b(Ht,{children:b(Ie,{colSpan:6})})]},o))})]})})};function qi(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var yFt=typeof Symbol=="function"&&Symbol.observable||"@@observable",lX=yFt,M_=()=>Math.random().toString(36).substring(7).split("").join("."),vFt={INIT:`@@redux/INIT${M_()}`,REPLACE:`@@redux/REPLACE${M_()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${M_()}`},cX=vFt;function bFt(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function Ipe(e,t,n){if(typeof e!="function")throw new Error(qi(2));if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(qi(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(qi(1));return n(Ipe)(e,t)}let r=e,o=t,i=new Map,a=i,s=0,l=!1;function c(){a===i&&(a=new Map,i.forEach((y,w)=>{a.set(w,y)}))}function u(){if(l)throw new Error(qi(3));return o}function d(y){if(typeof y!="function")throw new Error(qi(4));if(l)throw new Error(qi(5));let w=!0;c();const x=s++;return a.set(x,y),function(){if(w){if(l)throw new Error(qi(6));w=!1,c(),a.delete(x),i=null}}}function f(y){if(!bFt(y))throw new Error(qi(7));if(typeof y.type>"u")throw new Error(qi(8));if(typeof y.type!="string")throw new Error(qi(17));if(l)throw new Error(qi(9));try{l=!0,o=r(o,y)}finally{l=!1}return(i=a).forEach(x=>{x()}),y}function p(y){if(typeof y!="function")throw new Error(qi(10));r=y,f({type:cX.REPLACE})}function h(){const y=d;return{subscribe(w){if(typeof w!="object"||w===null)throw new Error(qi(11));function x(){const E=w;E.next&&E.next(u())}return x(),{unsubscribe:y(x)}},[lX](){return this}}}return f({type:cX.INIT}),{dispatch:f,subscribe:d,getState:u,replaceReducer:p,[lX]:h}}function uX(e,t){return function(...n){return t(e.apply(this,n))}}function dX(e,t){if(typeof e=="function")return uX(e,t);if(typeof e!="object"||e===null)throw new Error(qi(16));const n={};for(const r in e){const o=e[r];typeof o=="function"&&(n[r]=uX(o,t))}return n}function Ope(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,n)=>(...r)=>t(n(...r)))}function wFt(...e){return t=>(n,r)=>{const o=t(n,r);let i=()=>{throw new Error(qi(15))};const a={getState:o.getState,dispatch:(l,...c)=>i(l,...c)},s=e.map(l=>l(a));return i=Ope(...s)(o.dispatch),{...o,dispatch:i}}}var xFt={};/** * @license React * use-sync-external-store-with-selector.production.min.js * @@ -468,17 +468,17 @@ return result$$;`.replaceAll("$$",String(oQ)));return oQ+=1,(s,l)=>i(o,s,l)},ufe * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var E1=v;function jLt(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var BLt=typeof Object.is=="function"?Object.is:jLt,zLt=E1.useSyncExternalStore,VLt=E1.useRef,HLt=E1.useEffect,ULt=E1.useMemo,WLt=E1.useDebugValue;FLt.useSyncExternalStoreWithSelector=function(e,t,n,r,o){var i=VLt(null);if(i.current===null){var a={hasValue:!1,value:null};i.current=a}else a=i.current;i=ULt(function(){function l(p){if(!c){if(c=!0,u=p,p=r(p),o!==void 0&&a.hasValue){var h=a.value;if(o(h,p))return d=h}return d=p}if(h=d,BLt(u,p))return h;var m=r(p);return o!==void 0&&o(h,m)?h:(u=p,d=m)}var c=!1,u,d,f=n===void 0?null:n;return[function(){return l(t())},f===null?void 0:function(){return l(f())}]},[t,n,r,o]);var s=zLt(e,i[0],i[1]);return HLt(function(){a.hasValue=!0,a.value=s},[s]),WLt(s),s};var sr="default"in yd?Y:yd,sX=Symbol.for("react-redux-context"),lX=typeof globalThis<"u"?globalThis:{};function GLt(){if(!sr.createContext)return{};const e=lX[sX]??(lX[sX]=new Map);let t=e.get(sr.createContext);return t||(t=sr.createContext(null),e.set(sr.createContext,t)),t}var wpe=GLt(),qLt=()=>{throw new Error("uSES not initialized!")},KLt=Symbol.for("react.element"),YLt=Symbol.for("react.portal"),QLt=Symbol.for("react.fragment"),XLt=Symbol.for("react.strict_mode"),JLt=Symbol.for("react.profiler"),ZLt=Symbol.for("react.provider"),eFt=Symbol.for("react.context"),tFt=Symbol.for("react.server_context"),xpe=Symbol.for("react.forward_ref"),nFt=Symbol.for("react.suspense"),rFt=Symbol.for("react.suspense_list"),d5=Symbol.for("react.memo"),oFt=Symbol.for("react.lazy"),iFt=xpe,aFt=d5;function sFt(e){if(typeof e=="object"&&e!==null){const t=e.$$typeof;switch(t){case KLt:{const n=e.type;switch(n){case QLt:case JLt:case XLt:case nFt:case rFt:return n;default:{const r=n&&n.$$typeof;switch(r){case tFt:case eFt:case xpe:case oFt:case d5:case ZLt:return r;default:return t}}}}case YLt:return t}}}function lFt(e){return sFt(e)===d5}function cFt(e,t,n,r,{areStatesEqual:o,areOwnPropsEqual:i,areStatePropsEqual:a}){let s=!1,l,c,u,d,f;function p(x,C){return l=x,c=C,u=e(l,c),d=t(r,c),f=n(u,d,c),s=!0,f}function h(){return u=e(l,c),t.dependsOnOwnProps&&(d=t(r,c)),f=n(u,d,c),f}function m(){return e.dependsOnOwnProps&&(u=e(l,c)),t.dependsOnOwnProps&&(d=t(r,c)),f=n(u,d,c),f}function y(){const x=e(l,c),C=!a(x,u);return u=x,C&&(f=n(u,d,c)),f}function w(x,C){const E=!i(C,c),P=!o(x,l,C,c);return l=x,c=C,E&&P?h():E?m():P?y():f}return function(C,E){return s?w(C,E):p(C,E)}}function uFt(e,{initMapStateToProps:t,initMapDispatchToProps:n,initMergeProps:r,...o}){const i=t(e,o),a=n(e,o),s=r(e,o);return cFt(i,a,s,e,o)}function dFt(e,t){const n={};for(const r in e){const o=e[r];typeof o=="function"&&(n[r]=(...i)=>t(o(...i)))}return n}function nj(e){return function(n){const r=e(n);function o(){return r}return o.dependsOnOwnProps=!1,o}}function cX(e){return e.dependsOnOwnProps?!!e.dependsOnOwnProps:e.length!==1}function Spe(e,t){return function(r,{displayName:o}){const i=function(s,l){return i.dependsOnOwnProps?i.mapToProps(s,l):i.mapToProps(s,void 0)};return i.dependsOnOwnProps=!0,i.mapToProps=function(s,l){i.mapToProps=e,i.dependsOnOwnProps=cX(e);let c=i(s,l);return typeof c=="function"&&(i.mapToProps=c,i.dependsOnOwnProps=cX(c),c=i(s,l)),c},i}}function f5(e,t){return(n,r)=>{throw new Error(`Invalid value of type ${typeof e} for ${t} argument when connecting component ${r.wrappedComponentName}.`)}}function fFt(e){return e&&typeof e=="object"?nj(t=>dFt(e,t)):e?typeof e=="function"?Spe(e):f5(e,"mapDispatchToProps"):nj(t=>({dispatch:t}))}function pFt(e){return e?typeof e=="function"?Spe(e):f5(e,"mapStateToProps"):nj(()=>({}))}function hFt(e,t,n){return{...n,...e,...t}}function gFt(e){return function(n,{displayName:r,areMergedPropsEqual:o}){let i=!1,a;return function(l,c,u){const d=e(l,c,u);return i?o(d,a)||(a=d):(i=!0,a=d),a}}}function mFt(e){return e?typeof e=="function"?gFt(e):f5(e,"mergeProps"):()=>hFt}function yFt(e){e()}function vFt(){let e=null,t=null;return{clear(){e=null,t=null},notify(){yFt(()=>{let n=e;for(;n;)n.callback(),n=n.next})},get(){const n=[];let r=e;for(;r;)n.push(r),r=r.next;return n},subscribe(n){let r=!0;const o=t={callback:n,next:null,prev:t};return o.prev?o.prev.next=o:e=o,function(){!r||e===null||(r=!1,o.next?o.next.prev=o.prev:t=o.prev,o.prev?o.prev.next=o.next:e=o.next)}}}}var uX={notify(){},get:()=>[]};function Cpe(e,t){let n,r=uX,o=0,i=!1;function a(m){u();const y=r.subscribe(m);let w=!1;return()=>{w||(w=!0,y(),d())}}function s(){r.notify()}function l(){h.onStateChange&&h.onStateChange()}function c(){return i}function u(){o++,n||(n=t?t.addNestedSub(l):e.subscribe(l),r=vFt())}function d(){o--,n&&o===0&&(n(),n=void 0,r.clear(),r=uX)}function f(){i||(i=!0,u())}function p(){i&&(i=!1,d())}const h={addNestedSub:a,notifyNestedSubs:s,handleChangeWrapper:l,isSubscribed:c,trySubscribe:f,tryUnsubscribe:p,getListeners:()=>r};return h}var bFt=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",wFt=typeof navigator<"u"&&navigator.product==="ReactNative",LO=bFt||wFt?sr.useLayoutEffect:sr.useEffect;function dX(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function T_(e,t){if(dX(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let o=0;o{Ppe=e},kFt=[null,null];function MFt(e,t,n){LO(()=>e(...t),n)}function RFt(e,t,n,r,o,i){e.current=r,n.current=!1,o.current&&(o.current=null,i())}function $Ft(e,t,n,r,o,i,a,s,l,c,u){if(!e)return()=>{};let d=!1,f=null;const p=()=>{if(d||!s.current)return;const m=t.getState();let y,w;try{y=r(m,o.current)}catch(x){w=x,f=x}w||(f=null),y===i.current?a.current||c():(i.current=y,l.current=y,a.current=!0,u())};return n.onStateChange=p,n.trySubscribe(),p(),()=>{if(d=!0,n.tryUnsubscribe(),n.onStateChange=null,f)throw f}}function DFt(e,t){return e===t}function _Ft(e,t,n,{pure:r,areStatesEqual:o=DFt,areOwnPropsEqual:i=T_,areStatePropsEqual:a=T_,areMergedPropsEqual:s=T_,forwardRef:l=!1,context:c=wpe}={}){const u=c,d=pFt(e),f=fFt(t),p=mFt(n),h=!!e;return y=>{const w=y.displayName||y.name||"Component",x=`Connect(${w})`,C={shouldHandleStateChanges:h,displayName:x,wrappedComponentName:w,WrappedComponent:y,initMapStateToProps:d,initMapDispatchToProps:f,initMergeProps:p,areStatesEqual:o,areStatePropsEqual:a,areOwnPropsEqual:i,areMergedPropsEqual:s};function E(I){const[A,k,O]=sr.useMemo(()=>{const{reactReduxForwardedRef:Z,...ce}=I;return[I.context,Z,ce]},[I]),$=sr.useMemo(()=>{let Z=u;return A!=null&&A.Consumer,Z},[A,u]),N=sr.useContext($),L=!!I.store&&!!I.store.getState&&!!I.store.dispatch,j=!!N&&!!N.store,D=L?I.store:N.store,_=j?N.getServerState:D.getState,z=sr.useMemo(()=>uFt(D.dispatch,C),[D]),[F,V]=sr.useMemo(()=>{if(!h)return kFt;const Z=Cpe(D,L?void 0:N.subscription),ce=Z.notifyNestedSubs.bind(Z);return[Z,ce]},[D,L,N]),U=sr.useMemo(()=>L?N:{...N,subscription:F},[L,N,F]),q=sr.useRef(void 0),X=sr.useRef(O),ie=sr.useRef(void 0),ee=sr.useRef(!1),Q=sr.useRef(!1),te=sr.useRef(void 0);LO(()=>(Q.current=!0,()=>{Q.current=!1}),[]);const pe=sr.useMemo(()=>()=>ie.current&&O===X.current?ie.current:z(D.getState(),O),[D,O]),ae=sr.useMemo(()=>ce=>F?$Ft(h,D,F,z,X,q,ee,Q,ie,V,ce):()=>{},[F]);MFt(RFt,[X,q,ee,O,ie,V]);let se;try{se=Ppe(ae,pe,_?()=>z(_(),O):pe)}catch(Z){throw te.current&&(Z.message+=` + */var _1=v;function SFt(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var CFt=typeof Object.is=="function"?Object.is:SFt,EFt=_1.useSyncExternalStore,PFt=_1.useRef,TFt=_1.useEffect,IFt=_1.useMemo,OFt=_1.useDebugValue;xFt.useSyncExternalStoreWithSelector=function(e,t,n,r,o){var i=PFt(null);if(i.current===null){var a={hasValue:!1,value:null};i.current=a}else a=i.current;i=IFt(function(){function l(p){if(!c){if(c=!0,u=p,p=r(p),o!==void 0&&a.hasValue){var h=a.value;if(o(h,p))return d=h}return d=p}if(h=d,CFt(u,p))return h;var m=r(p);return o!==void 0&&o(h,m)?h:(u=p,d=m)}var c=!1,u,d,f=n===void 0?null:n;return[function(){return l(t())},f===null?void 0:function(){return l(f())}]},[t,n,r,o]);var s=EFt(e,i[0],i[1]);return TFt(function(){a.hasValue=!0,a.value=s},[s]),OFt(s),s};var sr="default"in vd?Y:vd,fX=Symbol.for("react-redux-context"),pX=typeof globalThis<"u"?globalThis:{};function AFt(){if(!sr.createContext)return{};const e=pX[fX]??(pX[fX]=new Map);let t=e.get(sr.createContext);return t||(t=sr.createContext(null),e.set(sr.createContext,t)),t}var Ape=AFt(),kFt=()=>{throw new Error("uSES not initialized!")},MFt=Symbol.for("react.element"),RFt=Symbol.for("react.portal"),$Ft=Symbol.for("react.fragment"),DFt=Symbol.for("react.strict_mode"),_Ft=Symbol.for("react.profiler"),NFt=Symbol.for("react.provider"),LFt=Symbol.for("react.context"),FFt=Symbol.for("react.server_context"),kpe=Symbol.for("react.forward_ref"),jFt=Symbol.for("react.suspense"),BFt=Symbol.for("react.suspense_list"),gH=Symbol.for("react.memo"),zFt=Symbol.for("react.lazy"),VFt=kpe,HFt=gH;function UFt(e){if(typeof e=="object"&&e!==null){const t=e.$$typeof;switch(t){case MFt:{const n=e.type;switch(n){case $Ft:case _Ft:case DFt:case jFt:case BFt:return n;default:{const r=n&&n.$$typeof;switch(r){case FFt:case LFt:case kpe:case zFt:case gH:case NFt:return r;default:return t}}}}case RFt:return t}}}function WFt(e){return UFt(e)===gH}function GFt(e,t,n,r,{areStatesEqual:o,areOwnPropsEqual:i,areStatePropsEqual:a}){let s=!1,l,c,u,d,f;function p(x,S){return l=x,c=S,u=e(l,c),d=t(r,c),f=n(u,d,c),s=!0,f}function h(){return u=e(l,c),t.dependsOnOwnProps&&(d=t(r,c)),f=n(u,d,c),f}function m(){return e.dependsOnOwnProps&&(u=e(l,c)),t.dependsOnOwnProps&&(d=t(r,c)),f=n(u,d,c),f}function y(){const x=e(l,c),S=!a(x,u);return u=x,S&&(f=n(u,d,c)),f}function w(x,S){const E=!i(S,c),P=!o(x,l,S,c);return l=x,c=S,E&&P?h():E?m():P?y():f}return function(S,E){return s?w(S,E):p(S,E)}}function qFt(e,{initMapStateToProps:t,initMapDispatchToProps:n,initMergeProps:r,...o}){const i=t(e,o),a=n(e,o),s=r(e,o);return GFt(i,a,s,e,o)}function KFt(e,t){const n={};for(const r in e){const o=e[r];typeof o=="function"&&(n[r]=(...i)=>t(o(...i)))}return n}function sj(e){return function(n){const r=e(n);function o(){return r}return o.dependsOnOwnProps=!1,o}}function hX(e){return e.dependsOnOwnProps?!!e.dependsOnOwnProps:e.length!==1}function Mpe(e,t){return function(r,{displayName:o}){const i=function(s,l){return i.dependsOnOwnProps?i.mapToProps(s,l):i.mapToProps(s,void 0)};return i.dependsOnOwnProps=!0,i.mapToProps=function(s,l){i.mapToProps=e,i.dependsOnOwnProps=hX(e);let c=i(s,l);return typeof c=="function"&&(i.mapToProps=c,i.dependsOnOwnProps=hX(c),c=i(s,l)),c},i}}function mH(e,t){return(n,r)=>{throw new Error(`Invalid value of type ${typeof e} for ${t} argument when connecting component ${r.wrappedComponentName}.`)}}function YFt(e){return e&&typeof e=="object"?sj(t=>KFt(e,t)):e?typeof e=="function"?Mpe(e):mH(e,"mapDispatchToProps"):sj(t=>({dispatch:t}))}function QFt(e){return e?typeof e=="function"?Mpe(e):mH(e,"mapStateToProps"):sj(()=>({}))}function XFt(e,t,n){return{...n,...e,...t}}function JFt(e){return function(n,{displayName:r,areMergedPropsEqual:o}){let i=!1,a;return function(l,c,u){const d=e(l,c,u);return i?o(d,a)||(a=d):(i=!0,a=d),a}}}function ZFt(e){return e?typeof e=="function"?JFt(e):mH(e,"mergeProps"):()=>XFt}function ejt(e){e()}function tjt(){let e=null,t=null;return{clear(){e=null,t=null},notify(){ejt(()=>{let n=e;for(;n;)n.callback(),n=n.next})},get(){const n=[];let r=e;for(;r;)n.push(r),r=r.next;return n},subscribe(n){let r=!0;const o=t={callback:n,next:null,prev:t};return o.prev?o.prev.next=o:e=o,function(){!r||e===null||(r=!1,o.next?o.next.prev=o.prev:t=o.prev,o.prev?o.prev.next=o.next:e=o.next)}}}}var gX={notify(){},get:()=>[]};function Rpe(e,t){let n,r=gX,o=0,i=!1;function a(m){u();const y=r.subscribe(m);let w=!1;return()=>{w||(w=!0,y(),d())}}function s(){r.notify()}function l(){h.onStateChange&&h.onStateChange()}function c(){return i}function u(){o++,n||(n=t?t.addNestedSub(l):e.subscribe(l),r=tjt())}function d(){o--,n&&o===0&&(n(),n=void 0,r.clear(),r=gX)}function f(){i||(i=!0,u())}function p(){i&&(i=!1,d())}const h={addNestedSub:a,notifyNestedSubs:s,handleChangeWrapper:l,isSubscribed:c,trySubscribe:f,tryUnsubscribe:p,getListeners:()=>r};return h}var njt=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",rjt=typeof navigator<"u"&&navigator.product==="ReactNative",YO=njt||rjt?sr.useLayoutEffect:sr.useEffect;function mX(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function R_(e,t){if(mX(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let o=0;o{Dpe=e},pjt=[null,null];function hjt(e,t,n){YO(()=>e(...t),n)}function gjt(e,t,n,r,o,i){e.current=r,n.current=!1,o.current&&(o.current=null,i())}function mjt(e,t,n,r,o,i,a,s,l,c,u){if(!e)return()=>{};let d=!1,f=null;const p=()=>{if(d||!s.current)return;const m=t.getState();let y,w;try{y=r(m,o.current)}catch(x){w=x,f=x}w||(f=null),y===i.current?a.current||c():(i.current=y,l.current=y,a.current=!0,u())};return n.onStateChange=p,n.trySubscribe(),p(),()=>{if(d=!0,n.tryUnsubscribe(),n.onStateChange=null,f)throw f}}function yjt(e,t){return e===t}function vjt(e,t,n,{pure:r,areStatesEqual:o=yjt,areOwnPropsEqual:i=R_,areStatePropsEqual:a=R_,areMergedPropsEqual:s=R_,forwardRef:l=!1,context:c=Ape}={}){const u=c,d=QFt(e),f=YFt(t),p=ZFt(n),h=!!e;return y=>{const w=y.displayName||y.name||"Component",x=`Connect(${w})`,S={shouldHandleStateChanges:h,displayName:x,wrappedComponentName:w,WrappedComponent:y,initMapStateToProps:d,initMapDispatchToProps:f,initMergeProps:p,areStatesEqual:o,areStatePropsEqual:a,areOwnPropsEqual:i,areMergedPropsEqual:s};function E(I){const[A,k,O]=sr.useMemo(()=>{const{reactReduxForwardedRef:Z,...ce}=I;return[I.context,Z,ce]},[I]),$=sr.useMemo(()=>{let Z=u;return A!=null&&A.Consumer,Z},[A,u]),N=sr.useContext($),L=!!I.store&&!!I.store.getState&&!!I.store.dispatch,j=!!N&&!!N.store,D=L?I.store:N.store,_=j?N.getServerState:D.getState,z=sr.useMemo(()=>qFt(D.dispatch,S),[D]),[F,V]=sr.useMemo(()=>{if(!h)return pjt;const Z=Rpe(D,L?void 0:N.subscription),ce=Z.notifyNestedSubs.bind(Z);return[Z,ce]},[D,L,N]),U=sr.useMemo(()=>L?N:{...N,subscription:F},[L,N,F]),K=sr.useRef(void 0),X=sr.useRef(O),ie=sr.useRef(void 0),ee=sr.useRef(!1),Q=sr.useRef(!1),te=sr.useRef(void 0);YO(()=>(Q.current=!0,()=>{Q.current=!1}),[]);const pe=sr.useMemo(()=>()=>ie.current&&O===X.current?ie.current:z(D.getState(),O),[D,O]),ae=sr.useMemo(()=>ce=>F?mjt(h,D,F,z,X,K,ee,Q,ie,V,ce):()=>{},[F]);hjt(gjt,[X,K,ee,O,ie,V]);let se;try{se=Dpe(ae,pe,_?()=>z(_(),O):pe)}catch(Z){throw te.current&&(Z.message+=` The error may be correlated with this previous error: ${te.current.stack} -`),Z}LO(()=>{te.current=void 0,ie.current=void 0,q.current=se});const re=sr.useMemo(()=>sr.createElement(y,{...se,ref:k}),[k,y,se]);return sr.useMemo(()=>h?sr.createElement($.Provider,{value:U},re):re,[$,re,U])}const T=sr.memo(E);if(T.WrappedComponent=y,T.displayName=E.displayName=x,l){const A=sr.forwardRef(function(O,$){return sr.createElement(T,{...O,reactReduxForwardedRef:$})});return A.displayName=x,A.WrappedComponent=y,rj(A,y)}return rj(T,y)}}var Tpe=_Ft;function NFt({store:e,context:t,children:n,serverState:r,stabilityCheck:o="once",identityFunctionCheck:i="once"}){const a=sr.useMemo(()=>{const c=Cpe(e);return{store:e,subscription:c,getServerState:r?()=>r:void 0,stabilityCheck:o,identityFunctionCheck:i}},[e,r,o,i]),s=sr.useMemo(()=>e.getState(),[e]);LO(()=>{const{subscription:c}=a;return c.onStateChange=c.notifyNestedSubs,c.trySubscribe(),s!==e.getState()&&c.notifyNestedSubs(),()=>{c.tryUnsubscribe(),c.onStateChange=void 0}},[a,s]);const l=t||wpe;return sr.createElement(l.Provider,{value:a},n)}var LFt=NFt;AFt(v.useSyncExternalStore);function FFt(e,t){if(e.length!==t.length)return!1;for(var n=0;n{const i=UFt(n,o.options);return e.addEventListener(o.eventName,o.fn,i),function(){e.removeEventListener(o.eventName,o.fn,i)}});return function(){r.forEach(i=>{i()})}}const WFt="Invariant failed";class zO extends Error{}zO.prototype.toString=function(){return this.message};function ft(e,t){throw new zO(WFt)}class GFt extends Y.Component{constructor(...t){super(...t),this.callbacks=null,this.unbind=Zf,this.onWindowError=n=>{const r=this.getCallbacks();r.isDragging()&&r.tryAbort(),n.error instanceof zO&&n.preventDefault()},this.getCallbacks=()=>{if(!this.callbacks)throw new Error("Unable to find AppCallbacks in ");return this.callbacks},this.setCallbacks=n=>{this.callbacks=n}}componentDidMount(){this.unbind=ml(window,[{eventName:"error",fn:this.onWindowError}])}componentDidCatch(t){if(t instanceof zO){this.setState({});return}throw t}componentWillUnmount(){this.unbind()}render(){return this.props.children(this.setCallbacks)}}const qFt=` +`),Z}YO(()=>{te.current=void 0,ie.current=void 0,K.current=se});const oe=sr.useMemo(()=>sr.createElement(y,{...se,ref:k}),[k,y,se]);return sr.useMemo(()=>h?sr.createElement($.Provider,{value:U},oe):oe,[$,oe,U])}const T=sr.memo(E);if(T.WrappedComponent=y,T.displayName=E.displayName=x,l){const A=sr.forwardRef(function(O,$){return sr.createElement(T,{...O,reactReduxForwardedRef:$})});return A.displayName=x,A.WrappedComponent=y,lj(A,y)}return lj(T,y)}}var _pe=vjt;function bjt({store:e,context:t,children:n,serverState:r,stabilityCheck:o="once",identityFunctionCheck:i="once"}){const a=sr.useMemo(()=>{const c=Rpe(e);return{store:e,subscription:c,getServerState:r?()=>r:void 0,stabilityCheck:o,identityFunctionCheck:i}},[e,r,o,i]),s=sr.useMemo(()=>e.getState(),[e]);YO(()=>{const{subscription:c}=a;return c.onStateChange=c.notifyNestedSubs,c.trySubscribe(),s!==e.getState()&&c.notifyNestedSubs(),()=>{c.tryUnsubscribe(),c.onStateChange=void 0}},[a,s]);const l=t||Ape;return sr.createElement(l.Provider,{value:a},n)}var wjt=bjt;fjt(v.useSyncExternalStore);function xjt(e,t){if(e.length!==t.length)return!1;for(var n=0;n{const i=Ijt(n,o.options);return e.addEventListener(o.eventName,o.fn,i),function(){e.removeEventListener(o.eventName,o.fn,i)}});return function(){r.forEach(i=>{i()})}}const Ojt="Invariant failed";class ZO extends Error{}ZO.prototype.toString=function(){return this.message};function pt(e,t){throw new ZO(Ojt)}class Ajt extends Y.Component{constructor(...t){super(...t),this.callbacks=null,this.unbind=tp,this.onWindowError=n=>{const r=this.getCallbacks();r.isDragging()&&r.tryAbort(),n.error instanceof ZO&&n.preventDefault()},this.getCallbacks=()=>{if(!this.callbacks)throw new Error("Unable to find AppCallbacks in ");return this.callbacks},this.setCallbacks=n=>{this.callbacks=n}}componentDidMount(){this.unbind=bl(window,[{eventName:"error",fn:this.onWindowError}])}componentDidCatch(t){if(t instanceof ZO){this.setState({});return}throw t}componentWillUnmount(){this.unbind()}render(){return this.props.children(this.setCallbacks)}}const kjt=` Press space bar to start a drag. When dragging you can use the arrow keys to move the item around and escape to cancel. Some screen readers may require you to be in focus mode or to use your pass through key -`,VO=e=>e+1,KFt=e=>` - You have lifted an item in position ${VO(e.source.index)} -`,Mpe=(e,t)=>{const n=e.droppableId===t.droppableId,r=VO(e.index),o=VO(t.index);return n?` +`,eA=e=>e+1,Mjt=e=>` + You have lifted an item in position ${eA(e.source.index)} +`,Bpe=(e,t)=>{const n=e.droppableId===t.droppableId,r=eA(e.index),o=eA(t.index);return n?` You have moved the item from position ${r} to position ${o} `:` @@ -486,38 +486,38 @@ ${te.current.stack} in list ${e.droppableId} to list ${t.droppableId} in position ${o} - `},Rpe=(e,t,n)=>t.droppableId===n.droppableId?` + `},zpe=(e,t,n)=>t.droppableId===n.droppableId?` The item ${e} has been combined with ${n.draggableId}`:` The item ${e} in list ${t.droppableId} has been combined with ${n.draggableId} in list ${n.droppableId} - `,YFt=e=>{const t=e.destination;if(t)return Mpe(e.source,t);const n=e.combine;return n?Rpe(e.draggableId,e.source,n):"You are over an area that cannot be dropped on"},yX=e=>` + `,Rjt=e=>{const t=e.destination;if(t)return Bpe(e.source,t);const n=e.combine;return n?zpe(e.draggableId,e.source,n):"You are over an area that cannot be dropped on"},SX=e=>` The item has returned to its starting position - of ${VO(e.index)} -`,QFt=e=>{if(e.reason==="CANCEL")return` + of ${eA(e.index)} +`,$jt=e=>{if(e.reason==="CANCEL")return` Movement cancelled. - ${yX(e.source)} + ${SX(e.source)} `;const t=e.destination,n=e.combine;return t?` You have dropped the item. - ${Mpe(e.source,t)} + ${Bpe(e.source,t)} `:n?` You have dropped the item. - ${Rpe(e.draggableId,e.source,n)} + ${zpe(e.draggableId,e.source,n)} `:` The item has been dropped while not over a drop area. - ${yX(e.source)} - `},hT={dragHandleUsageInstructions:qFt,onDragStart:KFt,onDragUpdate:YFt,onDragEnd:QFt},ri={x:0,y:0},mi=(e,t)=>({x:e.x+t.x,y:e.y+t.y}),us=(e,t)=>({x:e.x-t.x,y:e.y-t.y}),ep=(e,t)=>e.x===t.x&&e.y===t.y,w0=e=>({x:e.x!==0?-e.x:0,y:e.y!==0?-e.y:0}),Ag=(e,t,n=0)=>e==="x"?{x:t,y:n}:{x:n,y:t},oC=(e,t)=>Math.sqrt((t.x-e.x)**2+(t.y-e.y)**2),vX=(e,t)=>Math.min(...t.map(n=>oC(e,n))),$pe=e=>t=>({x:e(t.x),y:e(t.y)});var XFt=(e,t)=>{const n=yc({top:Math.max(t.top,e.top),right:Math.min(t.right,e.right),bottom:Math.min(t.bottom,e.bottom),left:Math.max(t.left,e.left)});return n.width<=0||n.height<=0?null:n};const P1=(e,t)=>({top:e.top+t.y,left:e.left+t.x,bottom:e.bottom+t.y,right:e.right+t.x}),bX=e=>[{x:e.left,y:e.top},{x:e.right,y:e.top},{x:e.left,y:e.bottom},{x:e.right,y:e.bottom}],JFt={top:0,right:0,bottom:0,left:0},ZFt=(e,t)=>t?P1(e,t.scroll.diff.displacement):e,ejt=(e,t,n)=>n&&n.increasedBy?{...e,[t.end]:e[t.end]+n.increasedBy[t.line]}:e,tjt=(e,t)=>t&&t.shouldClipSubject?XFt(t.pageMarginBox,e):yc(e);var pb=({page:e,withPlaceholder:t,axis:n,frame:r})=>{const o=ZFt(e.marginBox,r),i=ejt(o,n,t),a=tjt(i,r);return{page:e,withPlaceholder:t,active:a}},g5=(e,t)=>{e.frame||ft();const n=e.frame,r=us(t,n.scroll.initial),o=w0(r),i={...n,scroll:{initial:n.scroll.initial,current:t,diff:{value:r,displacement:o},max:n.scroll.max}},a=pb({page:e.subject.page,withPlaceholder:e.subject.withPlaceholder,axis:e.axis,frame:i});return{...e,frame:i,subject:a}};const Dpe=ni(e=>e.reduce((t,n)=>(t[n.descriptor.id]=n,t),{})),_pe=ni(e=>e.reduce((t,n)=>(t[n.descriptor.id]=n,t),{})),JM=ni(e=>Object.values(e)),njt=ni(e=>Object.values(e));var x0=ni((e,t)=>njt(t).filter(r=>e===r.descriptor.droppableId).sort((r,o)=>r.descriptor.index-o.descriptor.index));function m5(e){return e.at&&e.at.type==="REORDER"?e.at.destination:null}function ZM(e){return e.at&&e.at.type==="COMBINE"?e.at.combine:null}var eR=ni((e,t)=>t.filter(n=>n.descriptor.id!==e.descriptor.id)),rjt=({isMovingForward:e,draggable:t,destination:n,insideDestination:r,previousImpact:o})=>{if(!n.isCombineEnabled||!m5(o))return null;function a(p){const h={type:"COMBINE",combine:{draggableId:p,droppableId:n.descriptor.id}};return{...o,at:h}}const s=o.displaced.all,l=s.length?s[0]:null;if(e)return l?a(l):null;const c=eR(t,r);if(!l){if(!c.length)return null;const p=c[c.length-1];return a(p.descriptor.id)}const u=c.findIndex(p=>p.descriptor.id===l);u===-1&&ft();const d=u-1;if(d<0)return null;const f=c[d];return a(f.descriptor.id)},S0=(e,t)=>e.descriptor.droppableId===t.descriptor.id;const Npe={point:ri,value:0},iC={invisible:{},visible:{},all:[]},ojt={displaced:iC,displacedBy:Npe,at:null};var El=(e,t)=>n=>e<=n&&n<=t,Lpe=e=>{const t=El(e.top,e.bottom),n=El(e.left,e.right);return r=>{if(t(r.top)&&t(r.bottom)&&n(r.left)&&n(r.right))return!0;const i=t(r.top)||t(r.bottom),a=n(r.left)||n(r.right);if(i&&a)return!0;const l=r.tope.bottom,c=r.lefte.right;return l&&c?!0:l&&a||c&&i}},ijt=e=>{const t=El(e.top,e.bottom),n=El(e.left,e.right);return r=>t(r.top)&&t(r.bottom)&&n(r.left)&&n(r.right)};const y5={direction:"vertical",line:"y",crossAxisLine:"x",start:"top",end:"bottom",size:"height",crossAxisStart:"left",crossAxisEnd:"right",crossAxisSize:"width"},Fpe={direction:"horizontal",line:"x",crossAxisLine:"y",start:"left",end:"right",size:"width",crossAxisStart:"top",crossAxisEnd:"bottom",crossAxisSize:"height"};var ajt=e=>t=>{const n=El(t.top,t.bottom),r=El(t.left,t.right);return o=>e===y5?n(o.top)&&n(o.bottom):r(o.left)&&r(o.right)};const sjt=(e,t)=>{const n=t.frame?t.frame.scroll.diff.displacement:ri;return P1(e,n)},ljt=(e,t,n)=>t.subject.active?n(t.subject.active)(e):!1,cjt=(e,t,n)=>n(t)(e),v5=({target:e,destination:t,viewport:n,withDroppableDisplacement:r,isVisibleThroughFrameFn:o})=>{const i=r?sjt(e,t):e;return ljt(i,t,o)&&cjt(i,n,o)},ujt=e=>v5({...e,isVisibleThroughFrameFn:Lpe}),jpe=e=>v5({...e,isVisibleThroughFrameFn:ijt}),djt=e=>v5({...e,isVisibleThroughFrameFn:ajt(e.destination.axis)}),fjt=(e,t,n)=>{if(typeof n=="boolean")return n;if(!t)return!0;const{invisible:r,visible:o}=t;if(r[e])return!1;const i=o[e];return i?i.shouldAnimate:!0};function pjt(e,t){const n=e.page.marginBox,r={top:t.point.y,right:0,bottom:0,left:t.point.x};return yc(p5(n,r))}function aC({afterDragging:e,destination:t,displacedBy:n,viewport:r,forceShouldAnimate:o,last:i}){return e.reduce(function(s,l){const c=pjt(l,n),u=l.descriptor.id;if(s.all.push(u),!ujt({target:c,destination:t,viewport:r,withDroppableDisplacement:!0}))return s.invisible[l.descriptor.id]=!0,s;const f=fjt(u,i,o),p={draggableId:u,shouldAnimate:f};return s.visible[u]=p,s},{all:[],visible:{},invisible:{}})}function hjt(e,t){if(!e.length)return 0;const n=e[e.length-1].descriptor.index;return t.inHomeList?n:n+1}function wX({insideDestination:e,inHomeList:t,displacedBy:n,destination:r}){const o=hjt(e,{inHomeList:t});return{displaced:iC,displacedBy:n,at:{type:"REORDER",destination:{droppableId:r.descriptor.id,index:o}}}}function HO({draggable:e,insideDestination:t,destination:n,viewport:r,displacedBy:o,last:i,index:a,forceShouldAnimate:s}){const l=S0(e,n);if(a==null)return wX({insideDestination:t,inHomeList:l,displacedBy:o,destination:n});const c=t.find(h=>h.descriptor.index===a);if(!c)return wX({insideDestination:t,inHomeList:l,displacedBy:o,destination:n});const u=eR(e,t),d=t.indexOf(c),f=u.slice(d);return{displaced:aC({afterDragging:f,destination:n,displacedBy:o,last:i,viewport:r.frame,forceShouldAnimate:s}),displacedBy:o,at:{type:"REORDER",destination:{droppableId:n.descriptor.id,index:a}}}}function hp(e,t){return!!t.effected[e]}var gjt=({isMovingForward:e,destination:t,draggables:n,combine:r,afterCritical:o})=>{if(!t.isCombineEnabled)return null;const i=r.draggableId,s=n[i].descriptor.index;return hp(i,o)?e?s:s-1:e?s+1:s},mjt=({isMovingForward:e,isInHomeList:t,insideDestination:n,location:r})=>{if(!n.length)return null;const o=r.index,i=e?o+1:o-1,a=n[0].descriptor.index,s=n[n.length-1].descriptor.index,l=t?s:s+1;return il?null:i},yjt=({isMovingForward:e,isInHomeList:t,draggable:n,draggables:r,destination:o,insideDestination:i,previousImpact:a,viewport:s,afterCritical:l})=>{const c=a.at;if(c||ft(),c.type==="REORDER"){const d=mjt({isMovingForward:e,isInHomeList:t,location:c.destination,insideDestination:i});return d==null?null:HO({draggable:n,insideDestination:i,destination:o,viewport:s,last:a.displaced,displacedBy:a.displacedBy,index:d})}const u=gjt({isMovingForward:e,destination:o,displaced:a.displaced,draggables:r,combine:c.combine,afterCritical:l});return u==null?null:HO({draggable:n,insideDestination:i,destination:o,viewport:s,last:a.displaced,displacedBy:a.displacedBy,index:u})},vjt=({displaced:e,afterCritical:t,combineWith:n,displacedBy:r})=>{const o=!!(e.visible[n]||e.invisible[n]);return hp(n,t)?o?ri:w0(r.point):o?r.point:ri},bjt=({afterCritical:e,impact:t,draggables:n})=>{const r=ZM(t);r||ft();const o=r.draggableId,i=n[o].page.borderBox.center,a=vjt({displaced:t.displaced,afterCritical:e,combineWith:o,displacedBy:t.displacedBy});return mi(i,a)};const Bpe=(e,t)=>t.margin[e.start]+t.borderBox[e.size]/2,wjt=(e,t)=>t.margin[e.end]+t.borderBox[e.size]/2,b5=(e,t,n)=>t[e.crossAxisStart]+n.margin[e.crossAxisStart]+n.borderBox[e.crossAxisSize]/2,xX=({axis:e,moveRelativeTo:t,isMoving:n})=>Ag(e.line,t.marginBox[e.end]+Bpe(e,n),b5(e,t.marginBox,n)),SX=({axis:e,moveRelativeTo:t,isMoving:n})=>Ag(e.line,t.marginBox[e.start]-wjt(e,n),b5(e,t.marginBox,n)),xjt=({axis:e,moveInto:t,isMoving:n})=>Ag(e.line,t.contentBox[e.start]+Bpe(e,n),b5(e,t.contentBox,n));var Sjt=({impact:e,draggable:t,draggables:n,droppable:r,afterCritical:o})=>{const i=x0(r.descriptor.id,n),a=t.page,s=r.axis;if(!i.length)return xjt({axis:s,moveInto:r.page,isMoving:a});const{displaced:l,displacedBy:c}=e,u=l.all[0];if(u){const f=n[u];if(hp(u,o))return SX({axis:s,moveRelativeTo:f.page,isMoving:a});const p=FO(f.page,c.point);return SX({axis:s,moveRelativeTo:p,isMoving:a})}const d=i[i.length-1];if(d.descriptor.id===t.descriptor.id)return a.borderBox.center;if(hp(d.descriptor.id,o)){const f=FO(d.page,w0(o.displacedBy.point));return xX({axis:s,moveRelativeTo:f,isMoving:a})}return xX({axis:s,moveRelativeTo:d.page,isMoving:a})},oj=(e,t)=>{const n=e.frame;return n?mi(t,n.scroll.diff.displacement):t};const Cjt=({impact:e,draggable:t,droppable:n,draggables:r,afterCritical:o})=>{const i=t.page.borderBox.center,a=e.at;return!n||!a?i:a.type==="REORDER"?Sjt({impact:e,draggable:t,draggables:r,droppable:n,afterCritical:o}):bjt({impact:e,draggables:r,afterCritical:o})};var tR=e=>{const t=Cjt(e),n=e.droppable;return n?oj(n,t):t},zpe=(e,t)=>{const n=us(t,e.scroll.initial),r=w0(n);return{frame:yc({top:t.y,bottom:t.y+e.frame.height,left:t.x,right:t.x+e.frame.width}),scroll:{initial:e.scroll.initial,max:e.scroll.max,current:t,diff:{value:n,displacement:r}}}};function CX(e,t){return e.map(n=>t[n])}function Ejt(e,t){for(let n=0;n{const i=zpe(t,mi(t.scroll.current,o)),a=n.frame?g5(n,mi(n.frame.scroll.current,o)):n,s=e.displaced,l=aC({afterDragging:CX(s.all,r),destination:n,displacedBy:e.displacedBy,viewport:i.frame,last:s,forceShouldAnimate:!1}),c=aC({afterDragging:CX(s.all,r),destination:a,displacedBy:e.displacedBy,viewport:t.frame,last:s,forceShouldAnimate:!1}),u={},d={},f=[s,l,c];return s.all.forEach(h=>{const m=Ejt(h,f);if(m){d[h]=m;return}u[h]=!0}),{...e,displaced:{all:s.all,invisible:u,visible:d}}},Tjt=(e,t)=>mi(e.scroll.diff.displacement,t),w5=({pageBorderBoxCenter:e,draggable:t,viewport:n})=>{const r=Tjt(n,e),o=us(r,t.page.borderBox.center);return mi(t.client.borderBox.center,o)},Vpe=({draggable:e,destination:t,newPageBorderBoxCenter:n,viewport:r,withDroppableDisplacement:o,onlyOnMainAxis:i=!1})=>{const a=us(n,e.page.borderBox.center),l={target:P1(e.page.borderBox,a),destination:t,withDroppableDisplacement:o,viewport:r};return i?djt(l):jpe(l)},Ijt=({isMovingForward:e,draggable:t,destination:n,draggables:r,previousImpact:o,viewport:i,previousPageBorderBoxCenter:a,previousClientSelection:s,afterCritical:l})=>{if(!n.isEnabled)return null;const c=x0(n.descriptor.id,r),u=S0(t,n),d=rjt({isMovingForward:e,draggable:t,destination:n,insideDestination:c,previousImpact:o})||yjt({isMovingForward:e,isInHomeList:u,draggable:t,draggables:r,destination:n,insideDestination:c,previousImpact:o,viewport:i,afterCritical:l});if(!d)return null;const f=tR({impact:d,draggable:t,droppable:n,draggables:r,afterCritical:l});if(Vpe({draggable:t,destination:n,newPageBorderBoxCenter:f,viewport:i.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0}))return{clientSelection:w5({pageBorderBoxCenter:f,draggable:t,viewport:i}),impact:d,scrollJumpRequest:null};const h=us(f,a),m=Pjt({impact:d,viewport:i,destination:n,draggables:r,maxScrollChange:h});return{clientSelection:s,impact:m,scrollJumpRequest:h}};const Wi=e=>{const t=e.subject.active;return t||ft(),t};var Ojt=({isMovingForward:e,pageBorderBoxCenter:t,source:n,droppables:r,viewport:o})=>{const i=n.subject.active;if(!i)return null;const a=n.axis,s=El(i[a.start],i[a.end]),l=JM(r).filter(u=>u!==n).filter(u=>u.isEnabled).filter(u=>!!u.subject.active).filter(u=>Lpe(o.frame)(Wi(u))).filter(u=>{const d=Wi(u);return e?i[a.crossAxisEnd]{const d=Wi(u),f=El(d[a.start],d[a.end]);return s(d[a.start])||s(d[a.end])||f(i[a.start])||f(i[a.end])}).sort((u,d)=>{const f=Wi(u)[a.crossAxisStart],p=Wi(d)[a.crossAxisStart];return e?f-p:p-f}).filter((u,d,f)=>Wi(u)[a.crossAxisStart]===Wi(f[0])[a.crossAxisStart]);if(!l.length)return null;if(l.length===1)return l[0];const c=l.filter(u=>El(Wi(u)[a.start],Wi(u)[a.end])(t[a.line]));return c.length===1?c[0]:c.length>1?c.sort((u,d)=>Wi(u)[a.start]-Wi(d)[a.start])[0]:l.sort((u,d)=>{const f=vX(t,bX(Wi(u))),p=vX(t,bX(Wi(d)));return f!==p?f-p:Wi(u)[a.start]-Wi(d)[a.start]})[0]};const EX=(e,t)=>{const n=e.page.borderBox.center;return hp(e.descriptor.id,t)?us(n,t.displacedBy.point):n},Ajt=(e,t)=>{const n=e.page.borderBox;return hp(e.descriptor.id,t)?P1(n,w0(t.displacedBy.point)):n};var kjt=({pageBorderBoxCenter:e,viewport:t,destination:n,insideDestination:r,afterCritical:o})=>r.filter(a=>jpe({target:Ajt(a,o),destination:n,viewport:t.frame,withDroppableDisplacement:!0})).sort((a,s)=>{const l=oC(e,oj(n,EX(a,o))),c=oC(e,oj(n,EX(s,o)));return l{const r=e.axis;if(e.descriptor.mode==="virtual")return Ag(r.line,t[r.line]);const o=e.subject.page.contentBox[r.size],l=x0(e.descriptor.id,n).reduce((c,u)=>c+u.client.marginBox[r.size],0)+t[r.line]-o;return l<=0?null:Ag(r.line,l)},Hpe=(e,t)=>({...e,scroll:{...e.scroll,max:t}}),Upe=(e,t,n)=>{const r=e.frame;S0(t,e)&&ft(),e.subject.withPlaceholder&&ft();const o=T1(e.axis,t.displaceBy).point,i=Mjt(e,o,n),a={placeholderSize:o,increasedBy:i,oldFrameMaxScroll:e.frame?e.frame.scroll.max:null};if(!r){const u=pb({page:e.subject.page,withPlaceholder:a,axis:e.axis,frame:e.frame});return{...e,subject:u}}const s=i?mi(r.scroll.max,i):r.scroll.max,l=Hpe(r,s),c=pb({page:e.subject.page,withPlaceholder:a,axis:e.axis,frame:l});return{...e,subject:c,frame:l}},Rjt=e=>{const t=e.subject.withPlaceholder;t||ft();const n=e.frame;if(!n){const a=pb({page:e.subject.page,axis:e.axis,frame:null,withPlaceholder:null});return{...e,subject:a}}const r=t.oldFrameMaxScroll;r||ft();const o=Hpe(n,r),i=pb({page:e.subject.page,axis:e.axis,frame:o,withPlaceholder:null});return{...e,subject:i,frame:o}};var $jt=({previousPageBorderBoxCenter:e,moveRelativeTo:t,insideDestination:n,draggable:r,draggables:o,destination:i,viewport:a,afterCritical:s})=>{if(!t){if(n.length)return null;const d={displaced:iC,displacedBy:Npe,at:{type:"REORDER",destination:{droppableId:i.descriptor.id,index:0}}},f=tR({impact:d,draggable:r,droppable:i,draggables:o,afterCritical:s}),p=S0(r,i)?i:Upe(i,r,o);return Vpe({draggable:r,destination:p,newPageBorderBoxCenter:f,viewport:a.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0})?d:null}const l=e[i.axis.line]<=t.page.borderBox.center[i.axis.line],c=(()=>{const d=t.descriptor.index;return t.descriptor.id===r.descriptor.id||l?d:d+1})(),u=T1(i.axis,r.displaceBy);return HO({draggable:r,insideDestination:n,destination:i,viewport:a,displacedBy:u,last:iC,index:c})},Djt=({isMovingForward:e,previousPageBorderBoxCenter:t,draggable:n,isOver:r,draggables:o,droppables:i,viewport:a,afterCritical:s})=>{const l=Ojt({isMovingForward:e,pageBorderBoxCenter:t,source:r,droppables:i,viewport:a});if(!l)return null;const c=x0(l.descriptor.id,o),u=kjt({pageBorderBoxCenter:t,viewport:a,destination:l,insideDestination:c,afterCritical:s}),d=$jt({previousPageBorderBoxCenter:t,destination:l,draggable:n,draggables:o,moveRelativeTo:u,insideDestination:c,viewport:a,afterCritical:s});if(!d)return null;const f=tR({impact:d,draggable:n,droppable:l,draggables:o,afterCritical:s});return{clientSelection:w5({pageBorderBoxCenter:f,draggable:n,viewport:a}),impact:d,scrollJumpRequest:null}},bs=e=>{const t=e.at;return t?t.type==="REORDER"?t.destination.droppableId:t.combine.droppableId:null};const _jt=(e,t)=>{const n=bs(e);return n?t[n]:null};var Njt=({state:e,type:t})=>{const n=_jt(e.impact,e.dimensions.droppables),r=!!n,o=e.dimensions.droppables[e.critical.droppable.id],i=n||o,a=i.axis.direction,s=a==="vertical"&&(t==="MOVE_UP"||t==="MOVE_DOWN")||a==="horizontal"&&(t==="MOVE_LEFT"||t==="MOVE_RIGHT");if(s&&!r)return null;const l=t==="MOVE_DOWN"||t==="MOVE_RIGHT",c=e.dimensions.draggables[e.critical.draggable.id],u=e.current.page.borderBoxCenter,{draggables:d,droppables:f}=e.dimensions;return s?Ijt({isMovingForward:l,previousPageBorderBoxCenter:u,draggable:c,destination:i,draggables:d,viewport:e.viewport,previousClientSelection:e.current.client.selection,previousImpact:e.impact,afterCritical:e.afterCritical}):Djt({isMovingForward:l,previousPageBorderBoxCenter:u,draggable:c,isOver:i,draggables:d,droppables:f,viewport:e.viewport,afterCritical:e.afterCritical})};function Th(e){return e.phase==="DRAGGING"||e.phase==="COLLECTING"}function Wpe(e){const t=El(e.top,e.bottom),n=El(e.left,e.right);return function(o){return t(o.y)&&n(o.x)}}function Ljt(e,t){return e.leftt.left&&e.topt.top}function Fjt({pageBorderBox:e,draggable:t,candidates:n}){const r=t.page.borderBox.center,o=n.map(i=>{const a=i.axis,s=Ag(i.axis.line,e.center[a.line],i.page.borderBox.center[a.crossAxisLine]);return{id:i.descriptor.id,distance:oC(r,s)}}).sort((i,a)=>a.distance-i.distance);return o[0]?o[0].id:null}function jjt({pageBorderBox:e,draggable:t,droppables:n}){const r=JM(n).filter(o=>{if(!o.isEnabled)return!1;const i=o.subject.active;if(!i||!Ljt(e,i))return!1;if(Wpe(i)(e.center))return!0;const a=o.axis,s=i.center[a.crossAxisLine],l=e[a.crossAxisStart],c=e[a.crossAxisEnd],u=El(i[a.crossAxisStart],i[a.crossAxisEnd]),d=u(l),f=u(c);return!d&&!f?!0:d?ls});return r.length?r.length===1?r[0].descriptor.id:Fjt({pageBorderBox:e,draggable:t,candidates:r}):null}const Gpe=(e,t)=>yc(P1(e,t));var Bjt=(e,t)=>{const n=e.frame;return n?Gpe(t,n.scroll.diff.value):t};function qpe({displaced:e,id:t}){return!!(e.visible[t]||e.invisible[t])}function zjt({draggable:e,closest:t,inHomeList:n}){return t?n&&t.descriptor.index>e.descriptor.index?t.descriptor.index-1:t.descriptor.index:null}var Vjt=({pageBorderBoxWithDroppableScroll:e,draggable:t,destination:n,insideDestination:r,last:o,viewport:i,afterCritical:a})=>{const s=n.axis,l=T1(n.axis,t.displaceBy),c=l.value,u=e[s.start],d=e[s.end],p=eR(t,r).find(m=>{const y=m.descriptor.id,w=m.page.borderBox.center[s.line],x=hp(y,a),C=qpe({displaced:o,id:y});return x?C?d<=w:u{if(!r.isCombineEnabled)return null;const a=r.axis,s=T1(r.axis,e.displaceBy),l=s.value,c=t[a.start],u=t[a.end],f=eR(e,o).find(h=>{const m=h.descriptor.id,y=h.page.borderBox,x=y[a.size]/Hjt,C=hp(m,i),E=qpe({displaced:n.displaced,id:m});return C?E?u>y[a.start]+x&&uy[a.start]-l+x&&cy[a.start]+l+x&&uy[a.start]+x&&c{const s=Gpe(t.page.borderBox,e),l=jjt({pageBorderBox:s,draggable:t,droppables:r});if(!l)return ojt;const c=r[l],u=x0(c.descriptor.id,n),d=Bjt(c,s);return Ujt({pageBorderBoxWithDroppableScroll:d,draggable:t,previousImpact:o,destination:c,insideDestination:u,afterCritical:a})||Vjt({pageBorderBoxWithDroppableScroll:d,draggable:t,destination:c,insideDestination:u,last:o.displaced,viewport:i,afterCritical:a})},x5=(e,t)=>({...e,[t.descriptor.id]:t});const Wjt=({previousImpact:e,impact:t,droppables:n})=>{const r=bs(e),o=bs(t);if(!r||r===o)return n;const i=n[r];if(!i.subject.withPlaceholder)return n;const a=Rjt(i);return x5(n,a)};var Gjt=({draggable:e,draggables:t,droppables:n,previousImpact:r,impact:o})=>{const i=Wjt({previousImpact:r,impact:o,droppables:n}),a=bs(o);if(!a)return i;const s=n[a];if(S0(e,s)||s.subject.withPlaceholder)return i;const l=Upe(s,e,t);return x5(i,l)},Ox=({state:e,clientSelection:t,dimensions:n,viewport:r,impact:o,scrollJumpRequest:i})=>{const a=r||e.viewport,s=n||e.dimensions,l=t||e.current.client.selection,c=us(l,e.initial.client.selection),u={offset:c,selection:l,borderBoxCenter:mi(e.initial.client.borderBoxCenter,c)},d={selection:mi(u.selection,a.scroll.current),borderBoxCenter:mi(u.borderBoxCenter,a.scroll.current),offset:mi(u.offset,a.scroll.diff.value)},f={client:u,page:d};if(e.phase==="COLLECTING")return{...e,dimensions:s,viewport:a,current:f};const p=s.draggables[e.critical.draggable.id],h=o||Kpe({pageOffset:d.offset,draggable:p,draggables:s.draggables,droppables:s.droppables,previousImpact:e.impact,viewport:a,afterCritical:e.afterCritical}),m=Gjt({draggable:p,impact:h,previousImpact:e.impact,draggables:s.draggables,droppables:s.droppables});return{...e,current:f,dimensions:{draggables:s.draggables,droppables:m},impact:h,viewport:a,scrollJumpRequest:i||null,forceShouldAnimate:i?!1:null}};function qjt(e,t){return e.map(n=>t[n])}var Ype=({impact:e,viewport:t,draggables:n,destination:r,forceShouldAnimate:o})=>{const i=e.displaced,a=qjt(i.all,n),s=aC({afterDragging:a,destination:r,displacedBy:e.displacedBy,viewport:t.frame,forceShouldAnimate:o,last:i});return{...e,displaced:s}},Qpe=({impact:e,draggable:t,droppable:n,draggables:r,viewport:o,afterCritical:i})=>{const a=tR({impact:e,draggable:t,draggables:r,droppable:n,afterCritical:i});return w5({pageBorderBoxCenter:a,draggable:t,viewport:o})},Xpe=({state:e,dimensions:t,viewport:n})=>{e.movementMode!=="SNAP"&&ft();const r=e.impact,o=n||e.viewport,i=t||e.dimensions,{draggables:a,droppables:s}=i,l=a[e.critical.draggable.id],c=bs(r);c||ft();const u=s[c],d=Ype({impact:r,viewport:o,destination:u,draggables:a}),f=Qpe({impact:d,draggable:l,droppable:u,draggables:a,viewport:o,afterCritical:e.afterCritical});return Ox({impact:d,clientSelection:f,state:e,dimensions:i,viewport:o})},Kjt=e=>({index:e.index,droppableId:e.droppableId}),Jpe=({draggable:e,home:t,draggables:n,viewport:r})=>{const o=T1(t.axis,e.displaceBy),i=x0(t.descriptor.id,n),a=i.indexOf(e);a===-1&&ft();const s=i.slice(a+1),l=s.reduce((f,p)=>(f[p.descriptor.id]=!0,f),{}),c={inVirtualList:t.descriptor.mode==="virtual",displacedBy:o,effected:l};return{impact:{displaced:aC({afterDragging:s,destination:t,displacedBy:o,last:null,viewport:r.frame,forceShouldAnimate:!1}),displacedBy:o,at:{type:"REORDER",destination:Kjt(e.descriptor)}},afterCritical:c}},Yjt=(e,t)=>({draggables:e.draggables,droppables:x5(e.droppables,t)}),Qjt=({draggable:e,offset:t,initialWindowScroll:n})=>{const r=FO(e.client,t),o=jO(r,n);return{...e,placeholder:{...e.placeholder,client:r},client:r,page:o}},Xjt=e=>{const t=e.frame;return t||ft(),t},Jjt=({additions:e,updatedDroppables:t,viewport:n})=>{const r=n.scroll.diff.value;return e.map(o=>{const i=o.descriptor.droppableId,a=t[i],l=Xjt(a).scroll.diff.value,c=mi(r,l);return Qjt({draggable:o,offset:c,initialWindowScroll:n.scroll.initial})})},Zjt=({state:e,published:t})=>{const n=t.modified.map(w=>{const x=e.dimensions.droppables[w.droppableId];return g5(x,w.scroll)}),r={...e.dimensions.droppables,...Dpe(n)},o=_pe(Jjt({additions:t.additions,updatedDroppables:r,viewport:e.viewport})),i={...e.dimensions.draggables,...o};t.removals.forEach(w=>{delete i[w]});const a={droppables:r,draggables:i},s=bs(e.impact),l=s?a.droppables[s]:null,c=a.draggables[e.critical.draggable.id],u=a.droppables[e.critical.droppable.id],{impact:d,afterCritical:f}=Jpe({draggable:c,home:u,draggables:i,viewport:e.viewport}),p=l&&l.isCombineEnabled?e.impact:d,h=Kpe({pageOffset:e.current.page.offset,draggable:a.draggables[e.critical.draggable.id],draggables:a.draggables,droppables:a.droppables,previousImpact:p,viewport:e.viewport,afterCritical:f}),m={...e,phase:"DRAGGING",impact:h,onLiftImpact:d,dimensions:a,afterCritical:f,forceShouldAnimate:!1};return e.phase==="COLLECTING"?m:{...m,phase:"DROP_PENDING",reason:e.reason,isWaiting:!1}};const ij=e=>e.movementMode==="SNAP",O_=(e,t,n)=>{const r=Yjt(e.dimensions,t);return!ij(e)||n?Ox({state:e,dimensions:r}):Xpe({state:e,dimensions:r})};function A_(e){return e.isDragging&&e.movementMode==="SNAP"?{...e,scrollJumpRequest:null}:e}const PX={phase:"IDLE",completed:null,shouldFlush:!1};var eBt=(e=PX,t)=>{if(t.type==="FLUSH")return{...PX,shouldFlush:!0};if(t.type==="INITIAL_PUBLISH"){e.phase!=="IDLE"&&ft();const{critical:n,clientSelection:r,viewport:o,dimensions:i,movementMode:a}=t.payload,s=i.draggables[n.draggable.id],l=i.droppables[n.droppable.id],c={selection:r,borderBoxCenter:s.client.borderBox.center,offset:ri},u={client:c,page:{selection:mi(c.selection,o.scroll.initial),borderBoxCenter:mi(c.selection,o.scroll.initial),offset:mi(c.selection,o.scroll.diff.value)}},d=JM(i.droppables).every(m=>!m.isFixedOnPage),{impact:f,afterCritical:p}=Jpe({draggable:s,home:l,draggables:i.draggables,viewport:o});return{phase:"DRAGGING",isDragging:!0,critical:n,movementMode:a,dimensions:i,initial:u,current:u,isWindowScrollAllowed:d,impact:f,afterCritical:p,onLiftImpact:f,viewport:o,scrollJumpRequest:null,forceShouldAnimate:null}}if(t.type==="COLLECTION_STARTING")return e.phase==="COLLECTING"||e.phase==="DROP_PENDING"?e:(e.phase!=="DRAGGING"&&ft(),{...e,phase:"COLLECTING"});if(t.type==="PUBLISH_WHILE_DRAGGING")return e.phase==="COLLECTING"||e.phase==="DROP_PENDING"||ft(),Zjt({state:e,published:t.payload});if(t.type==="MOVE"){if(e.phase==="DROP_PENDING")return e;Th(e)||ft();const{client:n}=t.payload;return ep(n,e.current.client.selection)?e:Ox({state:e,clientSelection:n,impact:ij(e)?e.impact:null})}if(t.type==="UPDATE_DROPPABLE_SCROLL"){if(e.phase==="DROP_PENDING"||e.phase==="COLLECTING")return A_(e);Th(e)||ft();const{id:n,newScroll:r}=t.payload,o=e.dimensions.droppables[n];if(!o)return e;const i=g5(o,r);return O_(e,i,!1)}if(t.type==="UPDATE_DROPPABLE_IS_ENABLED"){if(e.phase==="DROP_PENDING")return e;Th(e)||ft();const{id:n,isEnabled:r}=t.payload,o=e.dimensions.droppables[n];o||ft(),o.isEnabled===r&&ft();const i={...o,isEnabled:r};return O_(e,i,!0)}if(t.type==="UPDATE_DROPPABLE_IS_COMBINE_ENABLED"){if(e.phase==="DROP_PENDING")return e;Th(e)||ft();const{id:n,isCombineEnabled:r}=t.payload,o=e.dimensions.droppables[n];o||ft(),o.isCombineEnabled===r&&ft();const i={...o,isCombineEnabled:r};return O_(e,i,!0)}if(t.type==="MOVE_BY_WINDOW_SCROLL"){if(e.phase==="DROP_PENDING"||e.phase==="DROP_ANIMATING")return e;Th(e)||ft(),e.isWindowScrollAllowed||ft();const n=t.payload.newScroll;if(ep(e.viewport.scroll.current,n))return A_(e);const r=zpe(e.viewport,n);return ij(e)?Xpe({state:e,viewport:r}):Ox({state:e,viewport:r})}if(t.type==="UPDATE_VIEWPORT_MAX_SCROLL"){if(!Th(e))return e;const n=t.payload.maxScroll;if(ep(n,e.viewport.scroll.max))return e;const r={...e.viewport,scroll:{...e.viewport.scroll,max:n}};return{...e,viewport:r}}if(t.type==="MOVE_UP"||t.type==="MOVE_DOWN"||t.type==="MOVE_LEFT"||t.type==="MOVE_RIGHT"){if(e.phase==="COLLECTING"||e.phase==="DROP_PENDING")return e;e.phase!=="DRAGGING"&&ft();const n=Njt({state:e,type:t.type});return n?Ox({state:e,impact:n.impact,clientSelection:n.clientSelection,scrollJumpRequest:n.scrollJumpRequest}):e}if(t.type==="DROP_PENDING"){const n=t.payload.reason;return e.phase!=="COLLECTING"&&ft(),{...e,phase:"DROP_PENDING",isWaiting:!0,reason:n}}if(t.type==="DROP_ANIMATE"){const{completed:n,dropDuration:r,newHomeClientOffset:o}=t.payload;return e.phase==="DRAGGING"||e.phase==="DROP_PENDING"||ft(),{phase:"DROP_ANIMATING",completed:n,dropDuration:r,newHomeClientOffset:o,dimensions:e.dimensions}}if(t.type==="DROP_COMPLETE"){const{completed:n}=t.payload;return{phase:"IDLE",completed:n,shouldFlush:!1}}return e};function cr(e,t){return e instanceof Object&&"type"in e&&e.type===t}const tBt=e=>({type:"BEFORE_INITIAL_CAPTURE",payload:e}),nBt=e=>({type:"LIFT",payload:e}),rBt=e=>({type:"INITIAL_PUBLISH",payload:e}),oBt=e=>({type:"PUBLISH_WHILE_DRAGGING",payload:e}),iBt=()=>({type:"COLLECTION_STARTING",payload:null}),aBt=e=>({type:"UPDATE_DROPPABLE_SCROLL",payload:e}),sBt=e=>({type:"UPDATE_DROPPABLE_IS_ENABLED",payload:e}),lBt=e=>({type:"UPDATE_DROPPABLE_IS_COMBINE_ENABLED",payload:e}),Zpe=e=>({type:"MOVE",payload:e}),cBt=e=>({type:"MOVE_BY_WINDOW_SCROLL",payload:e}),uBt=e=>({type:"UPDATE_VIEWPORT_MAX_SCROLL",payload:e}),dBt=()=>({type:"MOVE_UP",payload:null}),fBt=()=>({type:"MOVE_DOWN",payload:null}),pBt=()=>({type:"MOVE_RIGHT",payload:null}),hBt=()=>({type:"MOVE_LEFT",payload:null}),S5=()=>({type:"FLUSH",payload:null}),gBt=e=>({type:"DROP_ANIMATE",payload:e}),C5=e=>({type:"DROP_COMPLETE",payload:e}),ehe=e=>({type:"DROP",payload:e}),mBt=e=>({type:"DROP_PENDING",payload:e}),the=()=>({type:"DROP_ANIMATION_FINISHED",payload:null});var yBt=e=>({getState:t,dispatch:n})=>r=>o=>{if(!cr(o,"LIFT")){r(o);return}const{id:i,clientSelection:a,movementMode:s}=o.payload,l=t();l.phase==="DROP_ANIMATING"&&n(C5({completed:l.completed})),t().phase!=="IDLE"&&ft(),n(S5()),n(tBt({draggableId:i,movementMode:s}));const u={draggableId:i,scrollOptions:{shouldPublishImmediately:s==="SNAP"}},{critical:d,dimensions:f,viewport:p}=e.startPublishing(u);n(rBt({critical:d,dimensions:f,clientSelection:a,movementMode:s,viewport:p}))},vBt=e=>()=>t=>n=>{cr(n,"INITIAL_PUBLISH")&&e.dragging(),cr(n,"DROP_ANIMATE")&&e.dropping(n.payload.completed.result.reason),(cr(n,"FLUSH")||cr(n,"DROP_COMPLETE"))&&e.resting(),t(n)};const E5={outOfTheWay:"cubic-bezier(0.2, 0, 0, 1)",drop:"cubic-bezier(.2,1,.1,1)"},sC={opacity:{drop:0,combining:.7},scale:{drop:.75}},nhe={outOfTheWay:.2,minDropTime:.33,maxDropTime:.55},mh=`${nhe.outOfTheWay}s ${E5.outOfTheWay}`,Ax={fluid:`opacity ${mh}`,snap:`transform ${mh}, opacity ${mh}`,drop:e=>{const t=`${e}s ${E5.drop}`;return`transform ${t}, opacity ${t}`},outOfTheWay:`transform ${mh}`,placeholder:`height ${mh}, width ${mh}, margin ${mh}`},TX=e=>ep(e,ri)?void 0:`translate(${e.x}px, ${e.y}px)`,aj={moveTo:TX,drop:(e,t)=>{const n=TX(e);if(n)return t?`${n} scale(${sC.scale.drop})`:n}},{minDropTime:sj,maxDropTime:rhe}=nhe,bBt=rhe-sj,IX=1500,wBt=.6;var xBt=({current:e,destination:t,reason:n})=>{const r=oC(e,t);if(r<=0)return sj;if(r>=IX)return rhe;const o=r/IX,i=sj+bBt*o,a=n==="CANCEL"?i*wBt:i;return Number(a.toFixed(2))},SBt=({impact:e,draggable:t,dimensions:n,viewport:r,afterCritical:o})=>{const{draggables:i,droppables:a}=n,s=bs(e),l=s?a[s]:null,c=a[t.descriptor.droppableId],u=Qpe({impact:e,draggable:t,draggables:i,afterCritical:o,droppable:l||c,viewport:r});return us(u,t.client.borderBox.center)},CBt=({draggables:e,reason:t,lastImpact:n,home:r,viewport:o,onLiftImpact:i})=>!n.at||t!=="DROP"?{impact:Ype({draggables:e,impact:i,destination:r,viewport:o,forceShouldAnimate:!0}),didDropInsideDroppable:!1}:n.at.type==="REORDER"?{impact:n,didDropInsideDroppable:!0}:{impact:{...n,displaced:iC},didDropInsideDroppable:!0};const EBt=({getState:e,dispatch:t})=>n=>r=>{if(!cr(r,"DROP")){n(r);return}const o=e(),i=r.payload.reason;if(o.phase==="COLLECTING"){t(mBt({reason:i}));return}if(o.phase==="IDLE")return;o.phase==="DROP_PENDING"&&o.isWaiting&&ft(),o.phase==="DRAGGING"||o.phase==="DROP_PENDING"||ft();const s=o.critical,l=o.dimensions,c=l.draggables[o.critical.draggable.id],{impact:u,didDropInsideDroppable:d}=CBt({reason:i,lastImpact:o.impact,afterCritical:o.afterCritical,onLiftImpact:o.onLiftImpact,home:o.dimensions.droppables[o.critical.droppable.id],viewport:o.viewport,draggables:o.dimensions.draggables}),f=d?m5(u):null,p=d?ZM(u):null,h={index:s.draggable.index,droppableId:s.droppable.id},m={draggableId:c.descriptor.id,type:c.descriptor.type,source:h,reason:i,mode:o.movementMode,destination:f,combine:p},y=SBt({impact:u,draggable:c,dimensions:l,viewport:o.viewport,afterCritical:o.afterCritical}),w={critical:o.critical,afterCritical:o.afterCritical,result:m,impact:u};if(!(!ep(o.current.client.offset,y)||!!m.combine)){t(C5({completed:w}));return}const C=xBt({current:o.current.client.offset,destination:y,reason:i});t(gBt({newHomeClientOffset:y,dropDuration:C,completed:w}))};var ohe=()=>({x:window.pageXOffset,y:window.pageYOffset});function PBt(e){return{eventName:"scroll",options:{passive:!0,capture:!1},fn:t=>{t.target!==window&&t.target!==window.document||e()}}}function TBt({onWindowScroll:e}){function t(){e(ohe())}const n=rC(t),r=PBt(n);let o=Zf;function i(){return o!==Zf}function a(){i()&&ft(),o=ml(window,[r])}function s(){i()||ft(),n.cancel(),o(),o=Zf}return{start:a,stop:s,isActive:i}}const IBt=e=>cr(e,"DROP_COMPLETE")||cr(e,"DROP_ANIMATE")||cr(e,"FLUSH"),OBt=e=>{const t=TBt({onWindowScroll:n=>{e.dispatch(cBt({newScroll:n}))}});return n=>r=>{!t.isActive()&&cr(r,"INITIAL_PUBLISH")&&t.start(),t.isActive()&&IBt(r)&&t.stop(),n(r)}};var ABt=e=>{let t=!1,n=!1;const r=setTimeout(()=>{n=!0}),o=i=>{t||n||(t=!0,e(i),clearTimeout(r))};return o.wasCalled=()=>t,o},kBt=()=>{const e=[],t=o=>{const i=e.findIndex(s=>s.timerId===o);i===-1&&ft();const[a]=e.splice(i,1);a.callback()};return{add:o=>{const i=setTimeout(()=>t(i)),a={timerId:i,callback:o};e.push(a)},flush:()=>{if(!e.length)return;const o=[...e];e.length=0,o.forEach(i=>{clearTimeout(i.timerId),i.callback()})}}};const MBt=(e,t)=>e==null&&t==null?!0:e==null||t==null?!1:e.droppableId===t.droppableId&&e.index===t.index,RBt=(e,t)=>e==null&&t==null?!0:e==null||t==null?!1:e.draggableId===t.draggableId&&e.droppableId===t.droppableId,$Bt=(e,t)=>{if(e===t)return!0;const n=e.draggable.id===t.draggable.id&&e.draggable.droppableId===t.draggable.droppableId&&e.draggable.type===t.draggable.type&&e.draggable.index===t.draggable.index,r=e.droppable.id===t.droppable.id&&e.droppable.type===t.droppable.type;return n&&r},Cw=(e,t)=>{t()},TP=(e,t)=>({draggableId:e.draggable.id,type:e.droppable.type,source:{droppableId:e.droppable.id,index:e.draggable.index},mode:t});function k_(e,t,n,r){if(!e){n(r(t));return}const o=ABt(n);e(t,{announce:o}),o.wasCalled()||n(r(t))}var DBt=(e,t)=>{const n=kBt();let r=null;const o=(d,f)=>{r&&ft(),Cw("onBeforeCapture",()=>{const p=e().onBeforeCapture;p&&p({draggableId:d,mode:f})})},i=(d,f)=>{r&&ft(),Cw("onBeforeDragStart",()=>{const p=e().onBeforeDragStart;p&&p(TP(d,f))})},a=(d,f)=>{r&&ft();const p=TP(d,f);r={mode:f,lastCritical:d,lastLocation:p.source,lastCombine:null},n.add(()=>{Cw("onDragStart",()=>k_(e().onDragStart,p,t,hT.onDragStart))})},s=(d,f)=>{const p=m5(f),h=ZM(f);r||ft();const m=!$Bt(d,r.lastCritical);m&&(r.lastCritical=d);const y=!MBt(r.lastLocation,p);y&&(r.lastLocation=p);const w=!RBt(r.lastCombine,h);if(w&&(r.lastCombine=h),!m&&!y&&!w)return;const x={...TP(d,r.mode),combine:h,destination:p};n.add(()=>{Cw("onDragUpdate",()=>k_(e().onDragUpdate,x,t,hT.onDragUpdate))})},l=()=>{r||ft(),n.flush()},c=d=>{r||ft(),r=null,Cw("onDragEnd",()=>k_(e().onDragEnd,d,t,hT.onDragEnd))};return{beforeCapture:o,beforeStart:i,start:a,update:s,flush:l,drop:c,abort:()=>{if(!r)return;const d={...TP(r.lastCritical,r.mode),combine:null,destination:null,reason:"CANCEL"};c(d)}}},_Bt=(e,t)=>{const n=DBt(e,t);return r=>o=>i=>{if(cr(i,"BEFORE_INITIAL_CAPTURE")){n.beforeCapture(i.payload.draggableId,i.payload.movementMode);return}if(cr(i,"INITIAL_PUBLISH")){const s=i.payload.critical;n.beforeStart(s,i.payload.movementMode),o(i),n.start(s,i.payload.movementMode);return}if(cr(i,"DROP_COMPLETE")){const s=i.payload.completed.result;n.flush(),o(i),n.drop(s);return}if(o(i),cr(i,"FLUSH")){n.abort();return}const a=r.getState();a.phase==="DRAGGING"&&n.update(a.critical,a.impact)}};const NBt=e=>t=>n=>{if(!cr(n,"DROP_ANIMATION_FINISHED")){t(n);return}const r=e.getState();r.phase!=="DROP_ANIMATING"&&ft(),e.dispatch(C5({completed:r.completed}))},LBt=e=>{let t=null,n=null;function r(){n&&(cancelAnimationFrame(n),n=null),t&&(t(),t=null)}return o=>i=>{if((cr(i,"FLUSH")||cr(i,"DROP_COMPLETE")||cr(i,"DROP_ANIMATION_FINISHED"))&&r(),o(i),!cr(i,"DROP_ANIMATE"))return;const a={eventName:"scroll",options:{capture:!0,passive:!1,once:!0},fn:function(){e.getState().phase==="DROP_ANIMATING"&&e.dispatch(the())}};n=requestAnimationFrame(()=>{n=null,t=ml(window,[a])})}};var FBt=e=>()=>t=>n=>{(cr(n,"DROP_COMPLETE")||cr(n,"FLUSH")||cr(n,"DROP_ANIMATE"))&&e.stopPublishing(),t(n)},jBt=e=>{let t=!1;return()=>n=>r=>{if(cr(r,"INITIAL_PUBLISH")){t=!0,e.tryRecordFocus(r.payload.critical.draggable.id),n(r),e.tryRestoreFocusRecorded();return}if(n(r),!!t){if(cr(r,"FLUSH")){t=!1,e.tryRestoreFocusRecorded();return}if(cr(r,"DROP_COMPLETE")){t=!1;const o=r.payload.completed.result;o.combine&&e.tryShiftRecord(o.draggableId,o.combine.draggableId),e.tryRestoreFocusRecorded()}}}};const BBt=e=>cr(e,"DROP_COMPLETE")||cr(e,"DROP_ANIMATE")||cr(e,"FLUSH");var zBt=e=>t=>n=>r=>{if(BBt(r)){e.stop(),n(r);return}if(cr(r,"INITIAL_PUBLISH")){n(r);const o=t.getState();o.phase!=="DRAGGING"&&ft(),e.start(o);return}n(r),e.scroll(t.getState())};const VBt=e=>t=>n=>{if(t(n),!cr(n,"PUBLISH_WHILE_DRAGGING"))return;const r=e.getState();r.phase==="DROP_PENDING"&&(r.isWaiting||e.dispatch(ehe({reason:r.reason})))},HBt=bpe;var UBt=({dimensionMarshal:e,focusMarshal:t,styleMarshal:n,getResponders:r,announce:o,autoScroller:i})=>vpe(eBt,HBt(LLt(vBt(n),FBt(e),yBt(e),EBt,NBt,LBt,VBt,zBt(i),OBt,jBt(t),_Bt(r,o))));const M_=()=>({additions:{},removals:{},modified:{}});function WBt({registry:e,callbacks:t}){let n=M_(),r=null;const o=()=>{r||(t.collectionStarting(),r=requestAnimationFrame(()=>{r=null;const{additions:l,removals:c,modified:u}=n,d=Object.keys(l).map(h=>e.draggable.getById(h).getDimension(ri)).sort((h,m)=>h.descriptor.index-m.descriptor.index),f=Object.keys(u).map(h=>{const y=e.droppable.getById(h).callbacks.getScrollWhileDragging();return{droppableId:h,scroll:y}}),p={additions:d,removals:Object.keys(c),modified:f};n=M_(),t.publish(p)}))};return{add:l=>{const c=l.descriptor.id;n.additions[c]=l,n.modified[l.descriptor.droppableId]=!0,n.removals[c]&&delete n.removals[c],o()},remove:l=>{const c=l.descriptor;n.removals[c.id]=!0,n.modified[c.droppableId]=!0,n.additions[c.id]&&delete n.additions[c.id],o()},stop:()=>{r&&(cancelAnimationFrame(r),r=null,n=M_())}}}var ihe=({scrollHeight:e,scrollWidth:t,height:n,width:r})=>{const o=us({x:t,y:e},{x:r,y:n});return{x:Math.max(0,o.x),y:Math.max(0,o.y)}},ahe=()=>{const e=document.documentElement;return e||ft(),e},she=()=>{const e=ahe();return ihe({scrollHeight:e.scrollHeight,scrollWidth:e.scrollWidth,width:e.clientWidth,height:e.clientHeight})},GBt=()=>{const e=ohe(),t=she(),n=e.y,r=e.x,o=ahe(),i=o.clientWidth,a=o.clientHeight,s=r+i,l=n+a;return{frame:yc({top:n,left:r,right:s,bottom:l}),scroll:{initial:e,current:e,max:t,diff:{value:ri,displacement:ri}}}},qBt=({critical:e,scrollOptions:t,registry:n})=>{const r=GBt(),o=r.scroll.current,i=e.droppable,a=n.droppable.getAllByType(i.type).map(u=>u.callbacks.getDimensionAndWatchScroll(o,t)),s=n.draggable.getAllByType(e.draggable.type).map(u=>u.getDimension(o));return{dimensions:{draggables:_pe(s),droppables:Dpe(a)},critical:e,viewport:r}};function OX(e,t,n){return!(n.descriptor.id===t.id||n.descriptor.type!==t.type||e.droppable.getById(n.descriptor.droppableId).descriptor.mode!=="virtual")}var KBt=(e,t)=>{let n=null;const r=WBt({callbacks:{publish:t.publishWhileDragging,collectionStarting:t.collectionStarting},registry:e}),o=(f,p)=>{e.droppable.exists(f)||ft(),n&&t.updateDroppableIsEnabled({id:f,isEnabled:p})},i=(f,p)=>{n&&(e.droppable.exists(f)||ft(),t.updateDroppableIsCombineEnabled({id:f,isCombineEnabled:p}))},a=(f,p)=>{n&&(e.droppable.exists(f)||ft(),t.updateDroppableScroll({id:f,newScroll:p}))},s=(f,p)=>{n&&e.droppable.getById(f).callbacks.scroll(p)},l=()=>{if(!n)return;r.stop();const f=n.critical.droppable;e.droppable.getAllByType(f.type).forEach(p=>p.callbacks.dragStopped()),n.unsubscribe(),n=null},c=f=>{n||ft();const p=n.critical.draggable;f.type==="ADDITION"&&OX(e,p,f.value)&&r.add(f.value),f.type==="REMOVAL"&&OX(e,p,f.value)&&r.remove(f.value)};return{updateDroppableIsEnabled:o,updateDroppableIsCombineEnabled:i,scrollDroppable:s,updateDroppableScroll:a,startPublishing:f=>{n&&ft();const p=e.draggable.getById(f.draggableId),h=e.droppable.getById(p.descriptor.droppableId),m={draggable:p.descriptor,droppable:h.descriptor},y=e.subscribe(c);return n={critical:m,unsubscribe:y},qBt({critical:m,registry:e,scrollOptions:f.scrollOptions})},stopPublishing:l}},lhe=(e,t)=>e.phase==="IDLE"?!0:e.phase!=="DROP_ANIMATING"||e.completed.result.draggableId===t?!1:e.completed.result.reason==="DROP",YBt=e=>{window.scrollBy(e.x,e.y)};const QBt=ni(e=>JM(e).filter(t=>!(!t.isEnabled||!t.frame))),XBt=(e,t)=>QBt(t).find(r=>(r.frame||ft(),Wpe(r.frame.pageMarginBox)(e)))||null;var JBt=({center:e,destination:t,droppables:n})=>{if(t){const o=n[t];return o.frame?o:null}return XBt(e,n)};const lC={startFromPercentage:.25,maxScrollAtPercentage:.05,maxPixelScroll:28,ease:e=>e**2,durationDampening:{stopDampeningAt:1200,accelerateAt:360},disabled:!1};var ZBt=(e,t,n=()=>lC)=>{const r=n(),o=e[t.size]*r.startFromPercentage,i=e[t.size]*r.maxScrollAtPercentage;return{startScrollingFrom:o,maxScrollValueAt:i}},che=({startOfRange:e,endOfRange:t,current:n})=>{const r=t-e;return r===0?0:(n-e)/r},P5=1,ezt=(e,t,n=()=>lC)=>{const r=n();if(e>t.startScrollingFrom)return 0;if(e<=t.maxScrollValueAt)return r.maxPixelScroll;if(e===t.startScrollingFrom)return P5;const i=1-che({startOfRange:t.maxScrollValueAt,endOfRange:t.startScrollingFrom,current:e}),a=r.maxPixelScroll*r.ease(i);return Math.ceil(a)},tzt=(e,t,n)=>{const r=n(),o=r.durationDampening.accelerateAt,i=r.durationDampening.stopDampeningAt,a=t,s=i,c=Date.now()-a;if(c>=i)return e;if(c{const i=ezt(e,t,o);return i===0?0:r?Math.max(tzt(i,n,o),P5):i},kX=({container:e,distanceToEdges:t,dragStartTime:n,axis:r,shouldUseTimeDampening:o,getAutoScrollerOptions:i})=>{const a=ZBt(e,r,i);return t[r.end]{const r=t.height>e.height,o=t.width>e.width;return!o&&!r?n:o&&r?null:{x:o?0:n.x,y:r?0:n.y}};const rzt=$pe(e=>e===0?0:e);var uhe=({dragStartTime:e,container:t,subject:n,center:r,shouldUseTimeDampening:o,getAutoScrollerOptions:i})=>{const a={top:r.y-t.top,right:t.right-r.x,bottom:t.bottom-r.y,left:r.x-t.left},s=kX({container:t,distanceToEdges:a,dragStartTime:e,axis:y5,shouldUseTimeDampening:o,getAutoScrollerOptions:i}),l=kX({container:t,distanceToEdges:a,dragStartTime:e,axis:Fpe,shouldUseTimeDampening:o,getAutoScrollerOptions:i}),c=rzt({x:l,y:s});if(ep(c,ri))return null;const u=nzt({container:t,subject:n,proposedScroll:c});return u?ep(u,ri)?null:u:null};const ozt=$pe(e=>e===0?0:e>0?1:-1),T5=(()=>{const e=(t,n)=>t<0?t:t>n?t-n:0;return({current:t,max:n,change:r})=>{const o=mi(t,r),i={x:e(o.x,n.x),y:e(o.y,n.y)};return ep(i,ri)?null:i}})(),dhe=({max:e,current:t,change:n})=>{const r={x:Math.max(t.x,e.x),y:Math.max(t.y,e.y)},o=ozt(n),i=T5({max:r,current:t,change:o});return!i||o.x!==0&&i.x===0||o.y!==0&&i.y===0},I5=(e,t)=>dhe({current:e.scroll.current,max:e.scroll.max,change:t}),izt=(e,t)=>{if(!I5(e,t))return null;const n=e.scroll.max,r=e.scroll.current;return T5({current:r,max:n,change:t})},O5=(e,t)=>{const n=e.frame;return n?dhe({current:n.scroll.current,max:n.scroll.max,change:t}):!1},azt=(e,t)=>{const n=e.frame;return!n||!O5(e,t)?null:T5({current:n.scroll.current,max:n.scroll.max,change:t})};var szt=({viewport:e,subject:t,center:n,dragStartTime:r,shouldUseTimeDampening:o,getAutoScrollerOptions:i})=>{const a=uhe({dragStartTime:r,container:e.frame,subject:t,center:n,shouldUseTimeDampening:o,getAutoScrollerOptions:i});return a&&I5(e,a)?a:null},lzt=({droppable:e,subject:t,center:n,dragStartTime:r,shouldUseTimeDampening:o,getAutoScrollerOptions:i})=>{const a=e.frame;if(!a)return null;const s=uhe({dragStartTime:r,container:a.pageMarginBox,subject:t,center:n,shouldUseTimeDampening:o,getAutoScrollerOptions:i});return s&&O5(e,s)?s:null},MX=({state:e,dragStartTime:t,shouldUseTimeDampening:n,scrollWindow:r,scrollDroppable:o,getAutoScrollerOptions:i})=>{const a=e.current.page.borderBoxCenter,l=e.dimensions.draggables[e.critical.draggable.id].page.marginBox;if(e.isWindowScrollAllowed){const d=e.viewport,f=szt({dragStartTime:t,viewport:d,subject:l,center:a,shouldUseTimeDampening:n,getAutoScrollerOptions:i});if(f){r(f);return}}const c=JBt({center:a,destination:bs(e.impact),droppables:e.dimensions.droppables});if(!c)return;const u=lzt({dragStartTime:t,droppable:c,subject:l,center:a,shouldUseTimeDampening:n,getAutoScrollerOptions:i});u&&o(c.descriptor.id,u)},czt=({scrollWindow:e,scrollDroppable:t,getAutoScrollerOptions:n=()=>lC})=>{const r=rC(e),o=rC(t);let i=null;const a=c=>{i||ft();const{shouldUseTimeDampening:u,dragStartTime:d}=i;MX({state:c,scrollWindow:r,scrollDroppable:o,dragStartTime:d,shouldUseTimeDampening:u,getAutoScrollerOptions:n})};return{start:c=>{i&&ft();const u=Date.now();let d=!1;const f=()=>{d=!0};MX({state:c,dragStartTime:0,shouldUseTimeDampening:!1,scrollWindow:f,scrollDroppable:f,getAutoScrollerOptions:n}),i={dragStartTime:u,shouldUseTimeDampening:d},d&&a(c)},stop:()=>{i&&(r.cancel(),o.cancel(),i=null)},scroll:a}},uzt=({move:e,scrollDroppable:t,scrollWindow:n})=>{const r=(s,l)=>{const c=mi(s.current.client.selection,l);e({client:c})},o=(s,l)=>{if(!O5(s,l))return l;const c=azt(s,l);if(!c)return t(s.descriptor.id,l),null;const u=us(l,c);return t(s.descriptor.id,u),us(l,u)},i=(s,l,c)=>{if(!s||!I5(l,c))return c;const u=izt(l,c);if(!u)return n(c),null;const d=us(c,u);return n(d),us(c,d)};return s=>{const l=s.scrollJumpRequest;if(!l)return;const c=bs(s.impact);c||ft();const u=o(s.dimensions.droppables[c],l);if(!u)return;const d=s.viewport,f=i(s.isWindowScrollAllowed,d,u);f&&r(s,f)}},dzt=({scrollDroppable:e,scrollWindow:t,move:n,getAutoScrollerOptions:r})=>{const o=czt({scrollWindow:t,scrollDroppable:e,getAutoScrollerOptions:r}),i=uzt({move:n,scrollWindow:t,scrollDroppable:e});return{scroll:l=>{if(!(r().disabled||l.phase!=="DRAGGING")){if(l.movementMode==="FLUID"){o.scroll(l);return}l.scrollJumpRequest&&i(l)}},start:o.start,stop:o.stop}};const hb="data-rfd",gb=(()=>{const e=`${hb}-drag-handle`;return{base:e,draggableId:`${e}-draggable-id`,contextId:`${e}-context-id`}})(),lj=(()=>{const e=`${hb}-draggable`;return{base:e,contextId:`${e}-context-id`,id:`${e}-id`}})(),fzt=(()=>{const e=`${hb}-droppable`;return{base:e,contextId:`${e}-context-id`,id:`${e}-id`}})(),RX={contextId:`${hb}-scroll-container-context-id`},pzt=e=>t=>`[${t}="${e}"]`,Ew=(e,t)=>e.map(n=>{const r=n.styles[t];return r?`${n.selector} { ${r} }`:""}).join(" "),hzt="pointer-events: none;";var gzt=e=>{const t=pzt(e),n=(()=>{const s=` + ${SX(e.source)} + `},TT={dragHandleUsageInstructions:kjt,onDragStart:Mjt,onDragUpdate:Rjt,onDragEnd:$jt},oi={x:0,y:0},vi=(e,t)=>({x:e.x+t.x,y:e.y+t.y}),fs=(e,t)=>({x:e.x-t.x,y:e.y-t.y}),np=(e,t)=>e.x===t.x&&e.y===t.y,E0=e=>({x:e.x!==0?-e.x:0,y:e.y!==0?-e.y:0}),Mg=(e,t,n=0)=>e==="x"?{x:t,y:n}:{x:n,y:t},uC=(e,t)=>Math.sqrt((t.x-e.x)**2+(t.y-e.y)**2),CX=(e,t)=>Math.min(...t.map(n=>uC(e,n))),Vpe=e=>t=>({x:e(t.x),y:e(t.y)});var Djt=(e,t)=>{const n=bc({top:Math.max(t.top,e.top),right:Math.min(t.right,e.right),bottom:Math.min(t.bottom,e.bottom),left:Math.max(t.left,e.left)});return n.width<=0||n.height<=0?null:n};const N1=(e,t)=>({top:e.top+t.y,left:e.left+t.x,bottom:e.bottom+t.y,right:e.right+t.x}),EX=e=>[{x:e.left,y:e.top},{x:e.right,y:e.top},{x:e.left,y:e.bottom},{x:e.right,y:e.bottom}],_jt={top:0,right:0,bottom:0,left:0},Njt=(e,t)=>t?N1(e,t.scroll.diff.displacement):e,Ljt=(e,t,n)=>n&&n.increasedBy?{...e,[t.end]:e[t.end]+n.increasedBy[t.line]}:e,Fjt=(e,t)=>t&&t.shouldClipSubject?Djt(t.pageMarginBox,e):bc(e);var gb=({page:e,withPlaceholder:t,axis:n,frame:r})=>{const o=Njt(e.marginBox,r),i=Ljt(o,n,t),a=Fjt(i,r);return{page:e,withPlaceholder:t,active:a}},bH=(e,t)=>{e.frame||pt();const n=e.frame,r=fs(t,n.scroll.initial),o=E0(r),i={...n,scroll:{initial:n.scroll.initial,current:t,diff:{value:r,displacement:o},max:n.scroll.max}},a=gb({page:e.subject.page,withPlaceholder:e.subject.withPlaceholder,axis:e.axis,frame:i});return{...e,frame:i,subject:a}};const Hpe=ri(e=>e.reduce((t,n)=>(t[n.descriptor.id]=n,t),{})),Upe=ri(e=>e.reduce((t,n)=>(t[n.descriptor.id]=n,t),{})),oR=ri(e=>Object.values(e)),jjt=ri(e=>Object.values(e));var P0=ri((e,t)=>jjt(t).filter(r=>e===r.descriptor.droppableId).sort((r,o)=>r.descriptor.index-o.descriptor.index));function wH(e){return e.at&&e.at.type==="REORDER"?e.at.destination:null}function iR(e){return e.at&&e.at.type==="COMBINE"?e.at.combine:null}var aR=ri((e,t)=>t.filter(n=>n.descriptor.id!==e.descriptor.id)),Bjt=({isMovingForward:e,draggable:t,destination:n,insideDestination:r,previousImpact:o})=>{if(!n.isCombineEnabled||!wH(o))return null;function a(p){const h={type:"COMBINE",combine:{draggableId:p,droppableId:n.descriptor.id}};return{...o,at:h}}const s=o.displaced.all,l=s.length?s[0]:null;if(e)return l?a(l):null;const c=aR(t,r);if(!l){if(!c.length)return null;const p=c[c.length-1];return a(p.descriptor.id)}const u=c.findIndex(p=>p.descriptor.id===l);u===-1&&pt();const d=u-1;if(d<0)return null;const f=c[d];return a(f.descriptor.id)},T0=(e,t)=>e.descriptor.droppableId===t.descriptor.id;const Wpe={point:oi,value:0},dC={invisible:{},visible:{},all:[]},zjt={displaced:dC,displacedBy:Wpe,at:null};var Il=(e,t)=>n=>e<=n&&n<=t,Gpe=e=>{const t=Il(e.top,e.bottom),n=Il(e.left,e.right);return r=>{if(t(r.top)&&t(r.bottom)&&n(r.left)&&n(r.right))return!0;const i=t(r.top)||t(r.bottom),a=n(r.left)||n(r.right);if(i&&a)return!0;const l=r.tope.bottom,c=r.lefte.right;return l&&c?!0:l&&a||c&&i}},Vjt=e=>{const t=Il(e.top,e.bottom),n=Il(e.left,e.right);return r=>t(r.top)&&t(r.bottom)&&n(r.left)&&n(r.right)};const xH={direction:"vertical",line:"y",crossAxisLine:"x",start:"top",end:"bottom",size:"height",crossAxisStart:"left",crossAxisEnd:"right",crossAxisSize:"width"},qpe={direction:"horizontal",line:"x",crossAxisLine:"y",start:"left",end:"right",size:"width",crossAxisStart:"top",crossAxisEnd:"bottom",crossAxisSize:"height"};var Hjt=e=>t=>{const n=Il(t.top,t.bottom),r=Il(t.left,t.right);return o=>e===xH?n(o.top)&&n(o.bottom):r(o.left)&&r(o.right)};const Ujt=(e,t)=>{const n=t.frame?t.frame.scroll.diff.displacement:oi;return N1(e,n)},Wjt=(e,t,n)=>t.subject.active?n(t.subject.active)(e):!1,Gjt=(e,t,n)=>n(t)(e),SH=({target:e,destination:t,viewport:n,withDroppableDisplacement:r,isVisibleThroughFrameFn:o})=>{const i=r?Ujt(e,t):e;return Wjt(i,t,o)&&Gjt(i,n,o)},qjt=e=>SH({...e,isVisibleThroughFrameFn:Gpe}),Kpe=e=>SH({...e,isVisibleThroughFrameFn:Vjt}),Kjt=e=>SH({...e,isVisibleThroughFrameFn:Hjt(e.destination.axis)}),Yjt=(e,t,n)=>{if(typeof n=="boolean")return n;if(!t)return!0;const{invisible:r,visible:o}=t;if(r[e])return!1;const i=o[e];return i?i.shouldAnimate:!0};function Qjt(e,t){const n=e.page.marginBox,r={top:t.point.y,right:0,bottom:0,left:t.point.x};return bc(yH(n,r))}function fC({afterDragging:e,destination:t,displacedBy:n,viewport:r,forceShouldAnimate:o,last:i}){return e.reduce(function(s,l){const c=Qjt(l,n),u=l.descriptor.id;if(s.all.push(u),!qjt({target:c,destination:t,viewport:r,withDroppableDisplacement:!0}))return s.invisible[l.descriptor.id]=!0,s;const f=Yjt(u,i,o),p={draggableId:u,shouldAnimate:f};return s.visible[u]=p,s},{all:[],visible:{},invisible:{}})}function Xjt(e,t){if(!e.length)return 0;const n=e[e.length-1].descriptor.index;return t.inHomeList?n:n+1}function PX({insideDestination:e,inHomeList:t,displacedBy:n,destination:r}){const o=Xjt(e,{inHomeList:t});return{displaced:dC,displacedBy:n,at:{type:"REORDER",destination:{droppableId:r.descriptor.id,index:o}}}}function tA({draggable:e,insideDestination:t,destination:n,viewport:r,displacedBy:o,last:i,index:a,forceShouldAnimate:s}){const l=T0(e,n);if(a==null)return PX({insideDestination:t,inHomeList:l,displacedBy:o,destination:n});const c=t.find(h=>h.descriptor.index===a);if(!c)return PX({insideDestination:t,inHomeList:l,displacedBy:o,destination:n});const u=aR(e,t),d=t.indexOf(c),f=u.slice(d);return{displaced:fC({afterDragging:f,destination:n,displacedBy:o,last:i,viewport:r.frame,forceShouldAnimate:s}),displacedBy:o,at:{type:"REORDER",destination:{droppableId:n.descriptor.id,index:a}}}}function yp(e,t){return!!t.effected[e]}var Jjt=({isMovingForward:e,destination:t,draggables:n,combine:r,afterCritical:o})=>{if(!t.isCombineEnabled)return null;const i=r.draggableId,s=n[i].descriptor.index;return yp(i,o)?e?s:s-1:e?s+1:s},Zjt=({isMovingForward:e,isInHomeList:t,insideDestination:n,location:r})=>{if(!n.length)return null;const o=r.index,i=e?o+1:o-1,a=n[0].descriptor.index,s=n[n.length-1].descriptor.index,l=t?s:s+1;return il?null:i},eBt=({isMovingForward:e,isInHomeList:t,draggable:n,draggables:r,destination:o,insideDestination:i,previousImpact:a,viewport:s,afterCritical:l})=>{const c=a.at;if(c||pt(),c.type==="REORDER"){const d=Zjt({isMovingForward:e,isInHomeList:t,location:c.destination,insideDestination:i});return d==null?null:tA({draggable:n,insideDestination:i,destination:o,viewport:s,last:a.displaced,displacedBy:a.displacedBy,index:d})}const u=Jjt({isMovingForward:e,destination:o,displaced:a.displaced,draggables:r,combine:c.combine,afterCritical:l});return u==null?null:tA({draggable:n,insideDestination:i,destination:o,viewport:s,last:a.displaced,displacedBy:a.displacedBy,index:u})},tBt=({displaced:e,afterCritical:t,combineWith:n,displacedBy:r})=>{const o=!!(e.visible[n]||e.invisible[n]);return yp(n,t)?o?oi:E0(r.point):o?r.point:oi},nBt=({afterCritical:e,impact:t,draggables:n})=>{const r=iR(t);r||pt();const o=r.draggableId,i=n[o].page.borderBox.center,a=tBt({displaced:t.displaced,afterCritical:e,combineWith:o,displacedBy:t.displacedBy});return vi(i,a)};const Ype=(e,t)=>t.margin[e.start]+t.borderBox[e.size]/2,rBt=(e,t)=>t.margin[e.end]+t.borderBox[e.size]/2,CH=(e,t,n)=>t[e.crossAxisStart]+n.margin[e.crossAxisStart]+n.borderBox[e.crossAxisSize]/2,TX=({axis:e,moveRelativeTo:t,isMoving:n})=>Mg(e.line,t.marginBox[e.end]+Ype(e,n),CH(e,t.marginBox,n)),IX=({axis:e,moveRelativeTo:t,isMoving:n})=>Mg(e.line,t.marginBox[e.start]-rBt(e,n),CH(e,t.marginBox,n)),oBt=({axis:e,moveInto:t,isMoving:n})=>Mg(e.line,t.contentBox[e.start]+Ype(e,n),CH(e,t.contentBox,n));var iBt=({impact:e,draggable:t,draggables:n,droppable:r,afterCritical:o})=>{const i=P0(r.descriptor.id,n),a=t.page,s=r.axis;if(!i.length)return oBt({axis:s,moveInto:r.page,isMoving:a});const{displaced:l,displacedBy:c}=e,u=l.all[0];if(u){const f=n[u];if(yp(u,o))return IX({axis:s,moveRelativeTo:f.page,isMoving:a});const p=QO(f.page,c.point);return IX({axis:s,moveRelativeTo:p,isMoving:a})}const d=i[i.length-1];if(d.descriptor.id===t.descriptor.id)return a.borderBox.center;if(yp(d.descriptor.id,o)){const f=QO(d.page,E0(o.displacedBy.point));return TX({axis:s,moveRelativeTo:f,isMoving:a})}return TX({axis:s,moveRelativeTo:d.page,isMoving:a})},cj=(e,t)=>{const n=e.frame;return n?vi(t,n.scroll.diff.displacement):t};const aBt=({impact:e,draggable:t,droppable:n,draggables:r,afterCritical:o})=>{const i=t.page.borderBox.center,a=e.at;return!n||!a?i:a.type==="REORDER"?iBt({impact:e,draggable:t,draggables:r,droppable:n,afterCritical:o}):nBt({impact:e,draggables:r,afterCritical:o})};var sR=e=>{const t=aBt(e),n=e.droppable;return n?cj(n,t):t},Qpe=(e,t)=>{const n=fs(t,e.scroll.initial),r=E0(n);return{frame:bc({top:t.y,bottom:t.y+e.frame.height,left:t.x,right:t.x+e.frame.width}),scroll:{initial:e.scroll.initial,max:e.scroll.max,current:t,diff:{value:n,displacement:r}}}};function OX(e,t){return e.map(n=>t[n])}function sBt(e,t){for(let n=0;n{const i=Qpe(t,vi(t.scroll.current,o)),a=n.frame?bH(n,vi(n.frame.scroll.current,o)):n,s=e.displaced,l=fC({afterDragging:OX(s.all,r),destination:n,displacedBy:e.displacedBy,viewport:i.frame,last:s,forceShouldAnimate:!1}),c=fC({afterDragging:OX(s.all,r),destination:a,displacedBy:e.displacedBy,viewport:t.frame,last:s,forceShouldAnimate:!1}),u={},d={},f=[s,l,c];return s.all.forEach(h=>{const m=sBt(h,f);if(m){d[h]=m;return}u[h]=!0}),{...e,displaced:{all:s.all,invisible:u,visible:d}}},cBt=(e,t)=>vi(e.scroll.diff.displacement,t),EH=({pageBorderBoxCenter:e,draggable:t,viewport:n})=>{const r=cBt(n,e),o=fs(r,t.page.borderBox.center);return vi(t.client.borderBox.center,o)},Xpe=({draggable:e,destination:t,newPageBorderBoxCenter:n,viewport:r,withDroppableDisplacement:o,onlyOnMainAxis:i=!1})=>{const a=fs(n,e.page.borderBox.center),l={target:N1(e.page.borderBox,a),destination:t,withDroppableDisplacement:o,viewport:r};return i?Kjt(l):Kpe(l)},uBt=({isMovingForward:e,draggable:t,destination:n,draggables:r,previousImpact:o,viewport:i,previousPageBorderBoxCenter:a,previousClientSelection:s,afterCritical:l})=>{if(!n.isEnabled)return null;const c=P0(n.descriptor.id,r),u=T0(t,n),d=Bjt({isMovingForward:e,draggable:t,destination:n,insideDestination:c,previousImpact:o})||eBt({isMovingForward:e,isInHomeList:u,draggable:t,draggables:r,destination:n,insideDestination:c,previousImpact:o,viewport:i,afterCritical:l});if(!d)return null;const f=sR({impact:d,draggable:t,droppable:n,draggables:r,afterCritical:l});if(Xpe({draggable:t,destination:n,newPageBorderBoxCenter:f,viewport:i.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0}))return{clientSelection:EH({pageBorderBoxCenter:f,draggable:t,viewport:i}),impact:d,scrollJumpRequest:null};const h=fs(f,a),m=lBt({impact:d,viewport:i,destination:n,draggables:r,maxScrollChange:h});return{clientSelection:s,impact:m,scrollJumpRequest:h}};const Wi=e=>{const t=e.subject.active;return t||pt(),t};var dBt=({isMovingForward:e,pageBorderBoxCenter:t,source:n,droppables:r,viewport:o})=>{const i=n.subject.active;if(!i)return null;const a=n.axis,s=Il(i[a.start],i[a.end]),l=oR(r).filter(u=>u!==n).filter(u=>u.isEnabled).filter(u=>!!u.subject.active).filter(u=>Gpe(o.frame)(Wi(u))).filter(u=>{const d=Wi(u);return e?i[a.crossAxisEnd]{const d=Wi(u),f=Il(d[a.start],d[a.end]);return s(d[a.start])||s(d[a.end])||f(i[a.start])||f(i[a.end])}).sort((u,d)=>{const f=Wi(u)[a.crossAxisStart],p=Wi(d)[a.crossAxisStart];return e?f-p:p-f}).filter((u,d,f)=>Wi(u)[a.crossAxisStart]===Wi(f[0])[a.crossAxisStart]);if(!l.length)return null;if(l.length===1)return l[0];const c=l.filter(u=>Il(Wi(u)[a.start],Wi(u)[a.end])(t[a.line]));return c.length===1?c[0]:c.length>1?c.sort((u,d)=>Wi(u)[a.start]-Wi(d)[a.start])[0]:l.sort((u,d)=>{const f=CX(t,EX(Wi(u))),p=CX(t,EX(Wi(d)));return f!==p?f-p:Wi(u)[a.start]-Wi(d)[a.start]})[0]};const AX=(e,t)=>{const n=e.page.borderBox.center;return yp(e.descriptor.id,t)?fs(n,t.displacedBy.point):n},fBt=(e,t)=>{const n=e.page.borderBox;return yp(e.descriptor.id,t)?N1(n,E0(t.displacedBy.point)):n};var pBt=({pageBorderBoxCenter:e,viewport:t,destination:n,insideDestination:r,afterCritical:o})=>r.filter(a=>Kpe({target:fBt(a,o),destination:n,viewport:t.frame,withDroppableDisplacement:!0})).sort((a,s)=>{const l=uC(e,cj(n,AX(a,o))),c=uC(e,cj(n,AX(s,o)));return l{const r=e.axis;if(e.descriptor.mode==="virtual")return Mg(r.line,t[r.line]);const o=e.subject.page.contentBox[r.size],l=P0(e.descriptor.id,n).reduce((c,u)=>c+u.client.marginBox[r.size],0)+t[r.line]-o;return l<=0?null:Mg(r.line,l)},Jpe=(e,t)=>({...e,scroll:{...e.scroll,max:t}}),Zpe=(e,t,n)=>{const r=e.frame;T0(t,e)&&pt(),e.subject.withPlaceholder&&pt();const o=L1(e.axis,t.displaceBy).point,i=hBt(e,o,n),a={placeholderSize:o,increasedBy:i,oldFrameMaxScroll:e.frame?e.frame.scroll.max:null};if(!r){const u=gb({page:e.subject.page,withPlaceholder:a,axis:e.axis,frame:e.frame});return{...e,subject:u}}const s=i?vi(r.scroll.max,i):r.scroll.max,l=Jpe(r,s),c=gb({page:e.subject.page,withPlaceholder:a,axis:e.axis,frame:l});return{...e,subject:c,frame:l}},gBt=e=>{const t=e.subject.withPlaceholder;t||pt();const n=e.frame;if(!n){const a=gb({page:e.subject.page,axis:e.axis,frame:null,withPlaceholder:null});return{...e,subject:a}}const r=t.oldFrameMaxScroll;r||pt();const o=Jpe(n,r),i=gb({page:e.subject.page,axis:e.axis,frame:o,withPlaceholder:null});return{...e,subject:i,frame:o}};var mBt=({previousPageBorderBoxCenter:e,moveRelativeTo:t,insideDestination:n,draggable:r,draggables:o,destination:i,viewport:a,afterCritical:s})=>{if(!t){if(n.length)return null;const d={displaced:dC,displacedBy:Wpe,at:{type:"REORDER",destination:{droppableId:i.descriptor.id,index:0}}},f=sR({impact:d,draggable:r,droppable:i,draggables:o,afterCritical:s}),p=T0(r,i)?i:Zpe(i,r,o);return Xpe({draggable:r,destination:p,newPageBorderBoxCenter:f,viewport:a.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0})?d:null}const l=e[i.axis.line]<=t.page.borderBox.center[i.axis.line],c=(()=>{const d=t.descriptor.index;return t.descriptor.id===r.descriptor.id||l?d:d+1})(),u=L1(i.axis,r.displaceBy);return tA({draggable:r,insideDestination:n,destination:i,viewport:a,displacedBy:u,last:dC,index:c})},yBt=({isMovingForward:e,previousPageBorderBoxCenter:t,draggable:n,isOver:r,draggables:o,droppables:i,viewport:a,afterCritical:s})=>{const l=dBt({isMovingForward:e,pageBorderBoxCenter:t,source:r,droppables:i,viewport:a});if(!l)return null;const c=P0(l.descriptor.id,o),u=pBt({pageBorderBoxCenter:t,viewport:a,destination:l,insideDestination:c,afterCritical:s}),d=mBt({previousPageBorderBoxCenter:t,destination:l,draggable:n,draggables:o,moveRelativeTo:u,insideDestination:c,viewport:a,afterCritical:s});if(!d)return null;const f=sR({impact:d,draggable:n,droppable:l,draggables:o,afterCritical:s});return{clientSelection:EH({pageBorderBoxCenter:f,draggable:n,viewport:a}),impact:d,scrollJumpRequest:null}},xs=e=>{const t=e.at;return t?t.type==="REORDER"?t.destination.droppableId:t.combine.droppableId:null};const vBt=(e,t)=>{const n=xs(e);return n?t[n]:null};var bBt=({state:e,type:t})=>{const n=vBt(e.impact,e.dimensions.droppables),r=!!n,o=e.dimensions.droppables[e.critical.droppable.id],i=n||o,a=i.axis.direction,s=a==="vertical"&&(t==="MOVE_UP"||t==="MOVE_DOWN")||a==="horizontal"&&(t==="MOVE_LEFT"||t==="MOVE_RIGHT");if(s&&!r)return null;const l=t==="MOVE_DOWN"||t==="MOVE_RIGHT",c=e.dimensions.draggables[e.critical.draggable.id],u=e.current.page.borderBoxCenter,{draggables:d,droppables:f}=e.dimensions;return s?uBt({isMovingForward:l,previousPageBorderBoxCenter:u,draggable:c,destination:i,draggables:d,viewport:e.viewport,previousClientSelection:e.current.client.selection,previousImpact:e.impact,afterCritical:e.afterCritical}):yBt({isMovingForward:l,previousPageBorderBoxCenter:u,draggable:c,isOver:i,draggables:d,droppables:f,viewport:e.viewport,afterCritical:e.afterCritical})};function Ih(e){return e.phase==="DRAGGING"||e.phase==="COLLECTING"}function ehe(e){const t=Il(e.top,e.bottom),n=Il(e.left,e.right);return function(o){return t(o.y)&&n(o.x)}}function wBt(e,t){return e.leftt.left&&e.topt.top}function xBt({pageBorderBox:e,draggable:t,candidates:n}){const r=t.page.borderBox.center,o=n.map(i=>{const a=i.axis,s=Mg(i.axis.line,e.center[a.line],i.page.borderBox.center[a.crossAxisLine]);return{id:i.descriptor.id,distance:uC(r,s)}}).sort((i,a)=>a.distance-i.distance);return o[0]?o[0].id:null}function SBt({pageBorderBox:e,draggable:t,droppables:n}){const r=oR(n).filter(o=>{if(!o.isEnabled)return!1;const i=o.subject.active;if(!i||!wBt(e,i))return!1;if(ehe(i)(e.center))return!0;const a=o.axis,s=i.center[a.crossAxisLine],l=e[a.crossAxisStart],c=e[a.crossAxisEnd],u=Il(i[a.crossAxisStart],i[a.crossAxisEnd]),d=u(l),f=u(c);return!d&&!f?!0:d?ls});return r.length?r.length===1?r[0].descriptor.id:xBt({pageBorderBox:e,draggable:t,candidates:r}):null}const the=(e,t)=>bc(N1(e,t));var CBt=(e,t)=>{const n=e.frame;return n?the(t,n.scroll.diff.value):t};function nhe({displaced:e,id:t}){return!!(e.visible[t]||e.invisible[t])}function EBt({draggable:e,closest:t,inHomeList:n}){return t?n&&t.descriptor.index>e.descriptor.index?t.descriptor.index-1:t.descriptor.index:null}var PBt=({pageBorderBoxWithDroppableScroll:e,draggable:t,destination:n,insideDestination:r,last:o,viewport:i,afterCritical:a})=>{const s=n.axis,l=L1(n.axis,t.displaceBy),c=l.value,u=e[s.start],d=e[s.end],p=aR(t,r).find(m=>{const y=m.descriptor.id,w=m.page.borderBox.center[s.line],x=yp(y,a),S=nhe({displaced:o,id:y});return x?S?d<=w:u{if(!r.isCombineEnabled)return null;const a=r.axis,s=L1(r.axis,e.displaceBy),l=s.value,c=t[a.start],u=t[a.end],f=aR(e,o).find(h=>{const m=h.descriptor.id,y=h.page.borderBox,x=y[a.size]/TBt,S=yp(m,i),E=nhe({displaced:n.displaced,id:m});return S?E?u>y[a.start]+x&&uy[a.start]-l+x&&cy[a.start]+l+x&&uy[a.start]+x&&c{const s=the(t.page.borderBox,e),l=SBt({pageBorderBox:s,draggable:t,droppables:r});if(!l)return zjt;const c=r[l],u=P0(c.descriptor.id,n),d=CBt(c,s);return IBt({pageBorderBoxWithDroppableScroll:d,draggable:t,previousImpact:o,destination:c,insideDestination:u,afterCritical:a})||PBt({pageBorderBoxWithDroppableScroll:d,draggable:t,destination:c,insideDestination:u,last:o.displaced,viewport:i,afterCritical:a})},PH=(e,t)=>({...e,[t.descriptor.id]:t});const OBt=({previousImpact:e,impact:t,droppables:n})=>{const r=xs(e),o=xs(t);if(!r||r===o)return n;const i=n[r];if(!i.subject.withPlaceholder)return n;const a=gBt(i);return PH(n,a)};var ABt=({draggable:e,draggables:t,droppables:n,previousImpact:r,impact:o})=>{const i=OBt({previousImpact:r,impact:o,droppables:n}),a=xs(o);if(!a)return i;const s=n[a];if(T0(e,s)||s.subject.withPlaceholder)return i;const l=Zpe(s,e,t);return PH(i,l)},$x=({state:e,clientSelection:t,dimensions:n,viewport:r,impact:o,scrollJumpRequest:i})=>{const a=r||e.viewport,s=n||e.dimensions,l=t||e.current.client.selection,c=fs(l,e.initial.client.selection),u={offset:c,selection:l,borderBoxCenter:vi(e.initial.client.borderBoxCenter,c)},d={selection:vi(u.selection,a.scroll.current),borderBoxCenter:vi(u.borderBoxCenter,a.scroll.current),offset:vi(u.offset,a.scroll.diff.value)},f={client:u,page:d};if(e.phase==="COLLECTING")return{...e,dimensions:s,viewport:a,current:f};const p=s.draggables[e.critical.draggable.id],h=o||rhe({pageOffset:d.offset,draggable:p,draggables:s.draggables,droppables:s.droppables,previousImpact:e.impact,viewport:a,afterCritical:e.afterCritical}),m=ABt({draggable:p,impact:h,previousImpact:e.impact,draggables:s.draggables,droppables:s.droppables});return{...e,current:f,dimensions:{draggables:s.draggables,droppables:m},impact:h,viewport:a,scrollJumpRequest:i||null,forceShouldAnimate:i?!1:null}};function kBt(e,t){return e.map(n=>t[n])}var ohe=({impact:e,viewport:t,draggables:n,destination:r,forceShouldAnimate:o})=>{const i=e.displaced,a=kBt(i.all,n),s=fC({afterDragging:a,destination:r,displacedBy:e.displacedBy,viewport:t.frame,forceShouldAnimate:o,last:i});return{...e,displaced:s}},ihe=({impact:e,draggable:t,droppable:n,draggables:r,viewport:o,afterCritical:i})=>{const a=sR({impact:e,draggable:t,draggables:r,droppable:n,afterCritical:i});return EH({pageBorderBoxCenter:a,draggable:t,viewport:o})},ahe=({state:e,dimensions:t,viewport:n})=>{e.movementMode!=="SNAP"&&pt();const r=e.impact,o=n||e.viewport,i=t||e.dimensions,{draggables:a,droppables:s}=i,l=a[e.critical.draggable.id],c=xs(r);c||pt();const u=s[c],d=ohe({impact:r,viewport:o,destination:u,draggables:a}),f=ihe({impact:d,draggable:l,droppable:u,draggables:a,viewport:o,afterCritical:e.afterCritical});return $x({impact:d,clientSelection:f,state:e,dimensions:i,viewport:o})},MBt=e=>({index:e.index,droppableId:e.droppableId}),she=({draggable:e,home:t,draggables:n,viewport:r})=>{const o=L1(t.axis,e.displaceBy),i=P0(t.descriptor.id,n),a=i.indexOf(e);a===-1&&pt();const s=i.slice(a+1),l=s.reduce((f,p)=>(f[p.descriptor.id]=!0,f),{}),c={inVirtualList:t.descriptor.mode==="virtual",displacedBy:o,effected:l};return{impact:{displaced:fC({afterDragging:s,destination:t,displacedBy:o,last:null,viewport:r.frame,forceShouldAnimate:!1}),displacedBy:o,at:{type:"REORDER",destination:MBt(e.descriptor)}},afterCritical:c}},RBt=(e,t)=>({draggables:e.draggables,droppables:PH(e.droppables,t)}),$Bt=({draggable:e,offset:t,initialWindowScroll:n})=>{const r=QO(e.client,t),o=XO(r,n);return{...e,placeholder:{...e.placeholder,client:r},client:r,page:o}},DBt=e=>{const t=e.frame;return t||pt(),t},_Bt=({additions:e,updatedDroppables:t,viewport:n})=>{const r=n.scroll.diff.value;return e.map(o=>{const i=o.descriptor.droppableId,a=t[i],l=DBt(a).scroll.diff.value,c=vi(r,l);return $Bt({draggable:o,offset:c,initialWindowScroll:n.scroll.initial})})},NBt=({state:e,published:t})=>{const n=t.modified.map(w=>{const x=e.dimensions.droppables[w.droppableId];return bH(x,w.scroll)}),r={...e.dimensions.droppables,...Hpe(n)},o=Upe(_Bt({additions:t.additions,updatedDroppables:r,viewport:e.viewport})),i={...e.dimensions.draggables,...o};t.removals.forEach(w=>{delete i[w]});const a={droppables:r,draggables:i},s=xs(e.impact),l=s?a.droppables[s]:null,c=a.draggables[e.critical.draggable.id],u=a.droppables[e.critical.droppable.id],{impact:d,afterCritical:f}=she({draggable:c,home:u,draggables:i,viewport:e.viewport}),p=l&&l.isCombineEnabled?e.impact:d,h=rhe({pageOffset:e.current.page.offset,draggable:a.draggables[e.critical.draggable.id],draggables:a.draggables,droppables:a.droppables,previousImpact:p,viewport:e.viewport,afterCritical:f}),m={...e,phase:"DRAGGING",impact:h,onLiftImpact:d,dimensions:a,afterCritical:f,forceShouldAnimate:!1};return e.phase==="COLLECTING"?m:{...m,phase:"DROP_PENDING",reason:e.reason,isWaiting:!1}};const uj=e=>e.movementMode==="SNAP",D_=(e,t,n)=>{const r=RBt(e.dimensions,t);return!uj(e)||n?$x({state:e,dimensions:r}):ahe({state:e,dimensions:r})};function __(e){return e.isDragging&&e.movementMode==="SNAP"?{...e,scrollJumpRequest:null}:e}const kX={phase:"IDLE",completed:null,shouldFlush:!1};var LBt=(e=kX,t)=>{if(t.type==="FLUSH")return{...kX,shouldFlush:!0};if(t.type==="INITIAL_PUBLISH"){e.phase!=="IDLE"&&pt();const{critical:n,clientSelection:r,viewport:o,dimensions:i,movementMode:a}=t.payload,s=i.draggables[n.draggable.id],l=i.droppables[n.droppable.id],c={selection:r,borderBoxCenter:s.client.borderBox.center,offset:oi},u={client:c,page:{selection:vi(c.selection,o.scroll.initial),borderBoxCenter:vi(c.selection,o.scroll.initial),offset:vi(c.selection,o.scroll.diff.value)}},d=oR(i.droppables).every(m=>!m.isFixedOnPage),{impact:f,afterCritical:p}=she({draggable:s,home:l,draggables:i.draggables,viewport:o});return{phase:"DRAGGING",isDragging:!0,critical:n,movementMode:a,dimensions:i,initial:u,current:u,isWindowScrollAllowed:d,impact:f,afterCritical:p,onLiftImpact:f,viewport:o,scrollJumpRequest:null,forceShouldAnimate:null}}if(t.type==="COLLECTION_STARTING")return e.phase==="COLLECTING"||e.phase==="DROP_PENDING"?e:(e.phase!=="DRAGGING"&&pt(),{...e,phase:"COLLECTING"});if(t.type==="PUBLISH_WHILE_DRAGGING")return e.phase==="COLLECTING"||e.phase==="DROP_PENDING"||pt(),NBt({state:e,published:t.payload});if(t.type==="MOVE"){if(e.phase==="DROP_PENDING")return e;Ih(e)||pt();const{client:n}=t.payload;return np(n,e.current.client.selection)?e:$x({state:e,clientSelection:n,impact:uj(e)?e.impact:null})}if(t.type==="UPDATE_DROPPABLE_SCROLL"){if(e.phase==="DROP_PENDING"||e.phase==="COLLECTING")return __(e);Ih(e)||pt();const{id:n,newScroll:r}=t.payload,o=e.dimensions.droppables[n];if(!o)return e;const i=bH(o,r);return D_(e,i,!1)}if(t.type==="UPDATE_DROPPABLE_IS_ENABLED"){if(e.phase==="DROP_PENDING")return e;Ih(e)||pt();const{id:n,isEnabled:r}=t.payload,o=e.dimensions.droppables[n];o||pt(),o.isEnabled===r&&pt();const i={...o,isEnabled:r};return D_(e,i,!0)}if(t.type==="UPDATE_DROPPABLE_IS_COMBINE_ENABLED"){if(e.phase==="DROP_PENDING")return e;Ih(e)||pt();const{id:n,isCombineEnabled:r}=t.payload,o=e.dimensions.droppables[n];o||pt(),o.isCombineEnabled===r&&pt();const i={...o,isCombineEnabled:r};return D_(e,i,!0)}if(t.type==="MOVE_BY_WINDOW_SCROLL"){if(e.phase==="DROP_PENDING"||e.phase==="DROP_ANIMATING")return e;Ih(e)||pt(),e.isWindowScrollAllowed||pt();const n=t.payload.newScroll;if(np(e.viewport.scroll.current,n))return __(e);const r=Qpe(e.viewport,n);return uj(e)?ahe({state:e,viewport:r}):$x({state:e,viewport:r})}if(t.type==="UPDATE_VIEWPORT_MAX_SCROLL"){if(!Ih(e))return e;const n=t.payload.maxScroll;if(np(n,e.viewport.scroll.max))return e;const r={...e.viewport,scroll:{...e.viewport.scroll,max:n}};return{...e,viewport:r}}if(t.type==="MOVE_UP"||t.type==="MOVE_DOWN"||t.type==="MOVE_LEFT"||t.type==="MOVE_RIGHT"){if(e.phase==="COLLECTING"||e.phase==="DROP_PENDING")return e;e.phase!=="DRAGGING"&&pt();const n=bBt({state:e,type:t.type});return n?$x({state:e,impact:n.impact,clientSelection:n.clientSelection,scrollJumpRequest:n.scrollJumpRequest}):e}if(t.type==="DROP_PENDING"){const n=t.payload.reason;return e.phase!=="COLLECTING"&&pt(),{...e,phase:"DROP_PENDING",isWaiting:!0,reason:n}}if(t.type==="DROP_ANIMATE"){const{completed:n,dropDuration:r,newHomeClientOffset:o}=t.payload;return e.phase==="DRAGGING"||e.phase==="DROP_PENDING"||pt(),{phase:"DROP_ANIMATING",completed:n,dropDuration:r,newHomeClientOffset:o,dimensions:e.dimensions}}if(t.type==="DROP_COMPLETE"){const{completed:n}=t.payload;return{phase:"IDLE",completed:n,shouldFlush:!1}}return e};function cr(e,t){return e instanceof Object&&"type"in e&&e.type===t}const FBt=e=>({type:"BEFORE_INITIAL_CAPTURE",payload:e}),jBt=e=>({type:"LIFT",payload:e}),BBt=e=>({type:"INITIAL_PUBLISH",payload:e}),zBt=e=>({type:"PUBLISH_WHILE_DRAGGING",payload:e}),VBt=()=>({type:"COLLECTION_STARTING",payload:null}),HBt=e=>({type:"UPDATE_DROPPABLE_SCROLL",payload:e}),UBt=e=>({type:"UPDATE_DROPPABLE_IS_ENABLED",payload:e}),WBt=e=>({type:"UPDATE_DROPPABLE_IS_COMBINE_ENABLED",payload:e}),lhe=e=>({type:"MOVE",payload:e}),GBt=e=>({type:"MOVE_BY_WINDOW_SCROLL",payload:e}),qBt=e=>({type:"UPDATE_VIEWPORT_MAX_SCROLL",payload:e}),KBt=()=>({type:"MOVE_UP",payload:null}),YBt=()=>({type:"MOVE_DOWN",payload:null}),QBt=()=>({type:"MOVE_RIGHT",payload:null}),XBt=()=>({type:"MOVE_LEFT",payload:null}),TH=()=>({type:"FLUSH",payload:null}),JBt=e=>({type:"DROP_ANIMATE",payload:e}),IH=e=>({type:"DROP_COMPLETE",payload:e}),che=e=>({type:"DROP",payload:e}),ZBt=e=>({type:"DROP_PENDING",payload:e}),uhe=()=>({type:"DROP_ANIMATION_FINISHED",payload:null});var ezt=e=>({getState:t,dispatch:n})=>r=>o=>{if(!cr(o,"LIFT")){r(o);return}const{id:i,clientSelection:a,movementMode:s}=o.payload,l=t();l.phase==="DROP_ANIMATING"&&n(IH({completed:l.completed})),t().phase!=="IDLE"&&pt(),n(TH()),n(FBt({draggableId:i,movementMode:s}));const u={draggableId:i,scrollOptions:{shouldPublishImmediately:s==="SNAP"}},{critical:d,dimensions:f,viewport:p}=e.startPublishing(u);n(BBt({critical:d,dimensions:f,clientSelection:a,movementMode:s,viewport:p}))},tzt=e=>()=>t=>n=>{cr(n,"INITIAL_PUBLISH")&&e.dragging(),cr(n,"DROP_ANIMATE")&&e.dropping(n.payload.completed.result.reason),(cr(n,"FLUSH")||cr(n,"DROP_COMPLETE"))&&e.resting(),t(n)};const OH={outOfTheWay:"cubic-bezier(0.2, 0, 0, 1)",drop:"cubic-bezier(.2,1,.1,1)"},pC={opacity:{drop:0,combining:.7},scale:{drop:.75}},dhe={outOfTheWay:.2,minDropTime:.33,maxDropTime:.55},yh=`${dhe.outOfTheWay}s ${OH.outOfTheWay}`,Dx={fluid:`opacity ${yh}`,snap:`transform ${yh}, opacity ${yh}`,drop:e=>{const t=`${e}s ${OH.drop}`;return`transform ${t}, opacity ${t}`},outOfTheWay:`transform ${yh}`,placeholder:`height ${yh}, width ${yh}, margin ${yh}`},MX=e=>np(e,oi)?void 0:`translate(${e.x}px, ${e.y}px)`,dj={moveTo:MX,drop:(e,t)=>{const n=MX(e);if(n)return t?`${n} scale(${pC.scale.drop})`:n}},{minDropTime:fj,maxDropTime:fhe}=dhe,nzt=fhe-fj,RX=1500,rzt=.6;var ozt=({current:e,destination:t,reason:n})=>{const r=uC(e,t);if(r<=0)return fj;if(r>=RX)return fhe;const o=r/RX,i=fj+nzt*o,a=n==="CANCEL"?i*rzt:i;return Number(a.toFixed(2))},izt=({impact:e,draggable:t,dimensions:n,viewport:r,afterCritical:o})=>{const{draggables:i,droppables:a}=n,s=xs(e),l=s?a[s]:null,c=a[t.descriptor.droppableId],u=ihe({impact:e,draggable:t,draggables:i,afterCritical:o,droppable:l||c,viewport:r});return fs(u,t.client.borderBox.center)},azt=({draggables:e,reason:t,lastImpact:n,home:r,viewport:o,onLiftImpact:i})=>!n.at||t!=="DROP"?{impact:ohe({draggables:e,impact:i,destination:r,viewport:o,forceShouldAnimate:!0}),didDropInsideDroppable:!1}:n.at.type==="REORDER"?{impact:n,didDropInsideDroppable:!0}:{impact:{...n,displaced:dC},didDropInsideDroppable:!0};const szt=({getState:e,dispatch:t})=>n=>r=>{if(!cr(r,"DROP")){n(r);return}const o=e(),i=r.payload.reason;if(o.phase==="COLLECTING"){t(ZBt({reason:i}));return}if(o.phase==="IDLE")return;o.phase==="DROP_PENDING"&&o.isWaiting&&pt(),o.phase==="DRAGGING"||o.phase==="DROP_PENDING"||pt();const s=o.critical,l=o.dimensions,c=l.draggables[o.critical.draggable.id],{impact:u,didDropInsideDroppable:d}=azt({reason:i,lastImpact:o.impact,afterCritical:o.afterCritical,onLiftImpact:o.onLiftImpact,home:o.dimensions.droppables[o.critical.droppable.id],viewport:o.viewport,draggables:o.dimensions.draggables}),f=d?wH(u):null,p=d?iR(u):null,h={index:s.draggable.index,droppableId:s.droppable.id},m={draggableId:c.descriptor.id,type:c.descriptor.type,source:h,reason:i,mode:o.movementMode,destination:f,combine:p},y=izt({impact:u,draggable:c,dimensions:l,viewport:o.viewport,afterCritical:o.afterCritical}),w={critical:o.critical,afterCritical:o.afterCritical,result:m,impact:u};if(!(!np(o.current.client.offset,y)||!!m.combine)){t(IH({completed:w}));return}const S=ozt({current:o.current.client.offset,destination:y,reason:i});t(JBt({newHomeClientOffset:y,dropDuration:S,completed:w}))};var phe=()=>({x:window.pageXOffset,y:window.pageYOffset});function lzt(e){return{eventName:"scroll",options:{passive:!0,capture:!1},fn:t=>{t.target!==window&&t.target!==window.document||e()}}}function czt({onWindowScroll:e}){function t(){e(phe())}const n=cC(t),r=lzt(n);let o=tp;function i(){return o!==tp}function a(){i()&&pt(),o=bl(window,[r])}function s(){i()||pt(),n.cancel(),o(),o=tp}return{start:a,stop:s,isActive:i}}const uzt=e=>cr(e,"DROP_COMPLETE")||cr(e,"DROP_ANIMATE")||cr(e,"FLUSH"),dzt=e=>{const t=czt({onWindowScroll:n=>{e.dispatch(GBt({newScroll:n}))}});return n=>r=>{!t.isActive()&&cr(r,"INITIAL_PUBLISH")&&t.start(),t.isActive()&&uzt(r)&&t.stop(),n(r)}};var fzt=e=>{let t=!1,n=!1;const r=setTimeout(()=>{n=!0}),o=i=>{t||n||(t=!0,e(i),clearTimeout(r))};return o.wasCalled=()=>t,o},pzt=()=>{const e=[],t=o=>{const i=e.findIndex(s=>s.timerId===o);i===-1&&pt();const[a]=e.splice(i,1);a.callback()};return{add:o=>{const i=setTimeout(()=>t(i)),a={timerId:i,callback:o};e.push(a)},flush:()=>{if(!e.length)return;const o=[...e];e.length=0,o.forEach(i=>{clearTimeout(i.timerId),i.callback()})}}};const hzt=(e,t)=>e==null&&t==null?!0:e==null||t==null?!1:e.droppableId===t.droppableId&&e.index===t.index,gzt=(e,t)=>e==null&&t==null?!0:e==null||t==null?!1:e.draggableId===t.draggableId&&e.droppableId===t.droppableId,mzt=(e,t)=>{if(e===t)return!0;const n=e.draggable.id===t.draggable.id&&e.draggable.droppableId===t.draggable.droppableId&&e.draggable.type===t.draggable.type&&e.draggable.index===t.draggable.index,r=e.droppable.id===t.droppable.id&&e.droppable.type===t.droppable.type;return n&&r},Ow=(e,t)=>{t()},LP=(e,t)=>({draggableId:e.draggable.id,type:e.droppable.type,source:{droppableId:e.droppable.id,index:e.draggable.index},mode:t});function N_(e,t,n,r){if(!e){n(r(t));return}const o=fzt(n);e(t,{announce:o}),o.wasCalled()||n(r(t))}var yzt=(e,t)=>{const n=pzt();let r=null;const o=(d,f)=>{r&&pt(),Ow("onBeforeCapture",()=>{const p=e().onBeforeCapture;p&&p({draggableId:d,mode:f})})},i=(d,f)=>{r&&pt(),Ow("onBeforeDragStart",()=>{const p=e().onBeforeDragStart;p&&p(LP(d,f))})},a=(d,f)=>{r&&pt();const p=LP(d,f);r={mode:f,lastCritical:d,lastLocation:p.source,lastCombine:null},n.add(()=>{Ow("onDragStart",()=>N_(e().onDragStart,p,t,TT.onDragStart))})},s=(d,f)=>{const p=wH(f),h=iR(f);r||pt();const m=!mzt(d,r.lastCritical);m&&(r.lastCritical=d);const y=!hzt(r.lastLocation,p);y&&(r.lastLocation=p);const w=!gzt(r.lastCombine,h);if(w&&(r.lastCombine=h),!m&&!y&&!w)return;const x={...LP(d,r.mode),combine:h,destination:p};n.add(()=>{Ow("onDragUpdate",()=>N_(e().onDragUpdate,x,t,TT.onDragUpdate))})},l=()=>{r||pt(),n.flush()},c=d=>{r||pt(),r=null,Ow("onDragEnd",()=>N_(e().onDragEnd,d,t,TT.onDragEnd))};return{beforeCapture:o,beforeStart:i,start:a,update:s,flush:l,drop:c,abort:()=>{if(!r)return;const d={...LP(r.lastCritical,r.mode),combine:null,destination:null,reason:"CANCEL"};c(d)}}},vzt=(e,t)=>{const n=yzt(e,t);return r=>o=>i=>{if(cr(i,"BEFORE_INITIAL_CAPTURE")){n.beforeCapture(i.payload.draggableId,i.payload.movementMode);return}if(cr(i,"INITIAL_PUBLISH")){const s=i.payload.critical;n.beforeStart(s,i.payload.movementMode),o(i),n.start(s,i.payload.movementMode);return}if(cr(i,"DROP_COMPLETE")){const s=i.payload.completed.result;n.flush(),o(i),n.drop(s);return}if(o(i),cr(i,"FLUSH")){n.abort();return}const a=r.getState();a.phase==="DRAGGING"&&n.update(a.critical,a.impact)}};const bzt=e=>t=>n=>{if(!cr(n,"DROP_ANIMATION_FINISHED")){t(n);return}const r=e.getState();r.phase!=="DROP_ANIMATING"&&pt(),e.dispatch(IH({completed:r.completed}))},wzt=e=>{let t=null,n=null;function r(){n&&(cancelAnimationFrame(n),n=null),t&&(t(),t=null)}return o=>i=>{if((cr(i,"FLUSH")||cr(i,"DROP_COMPLETE")||cr(i,"DROP_ANIMATION_FINISHED"))&&r(),o(i),!cr(i,"DROP_ANIMATE"))return;const a={eventName:"scroll",options:{capture:!0,passive:!1,once:!0},fn:function(){e.getState().phase==="DROP_ANIMATING"&&e.dispatch(uhe())}};n=requestAnimationFrame(()=>{n=null,t=bl(window,[a])})}};var xzt=e=>()=>t=>n=>{(cr(n,"DROP_COMPLETE")||cr(n,"FLUSH")||cr(n,"DROP_ANIMATE"))&&e.stopPublishing(),t(n)},Szt=e=>{let t=!1;return()=>n=>r=>{if(cr(r,"INITIAL_PUBLISH")){t=!0,e.tryRecordFocus(r.payload.critical.draggable.id),n(r),e.tryRestoreFocusRecorded();return}if(n(r),!!t){if(cr(r,"FLUSH")){t=!1,e.tryRestoreFocusRecorded();return}if(cr(r,"DROP_COMPLETE")){t=!1;const o=r.payload.completed.result;o.combine&&e.tryShiftRecord(o.draggableId,o.combine.draggableId),e.tryRestoreFocusRecorded()}}}};const Czt=e=>cr(e,"DROP_COMPLETE")||cr(e,"DROP_ANIMATE")||cr(e,"FLUSH");var Ezt=e=>t=>n=>r=>{if(Czt(r)){e.stop(),n(r);return}if(cr(r,"INITIAL_PUBLISH")){n(r);const o=t.getState();o.phase!=="DRAGGING"&&pt(),e.start(o);return}n(r),e.scroll(t.getState())};const Pzt=e=>t=>n=>{if(t(n),!cr(n,"PUBLISH_WHILE_DRAGGING"))return;const r=e.getState();r.phase==="DROP_PENDING"&&(r.isWaiting||e.dispatch(che({reason:r.reason})))},Tzt=Ope;var Izt=({dimensionMarshal:e,focusMarshal:t,styleMarshal:n,getResponders:r,announce:o,autoScroller:i})=>Ipe(LBt,Tzt(wFt(tzt(n),xzt(e),ezt(e),szt,bzt,wzt,Pzt,Ezt(i),dzt,Szt(t),vzt(r,o))));const L_=()=>({additions:{},removals:{},modified:{}});function Ozt({registry:e,callbacks:t}){let n=L_(),r=null;const o=()=>{r||(t.collectionStarting(),r=requestAnimationFrame(()=>{r=null;const{additions:l,removals:c,modified:u}=n,d=Object.keys(l).map(h=>e.draggable.getById(h).getDimension(oi)).sort((h,m)=>h.descriptor.index-m.descriptor.index),f=Object.keys(u).map(h=>{const y=e.droppable.getById(h).callbacks.getScrollWhileDragging();return{droppableId:h,scroll:y}}),p={additions:d,removals:Object.keys(c),modified:f};n=L_(),t.publish(p)}))};return{add:l=>{const c=l.descriptor.id;n.additions[c]=l,n.modified[l.descriptor.droppableId]=!0,n.removals[c]&&delete n.removals[c],o()},remove:l=>{const c=l.descriptor;n.removals[c.id]=!0,n.modified[c.droppableId]=!0,n.additions[c.id]&&delete n.additions[c.id],o()},stop:()=>{r&&(cancelAnimationFrame(r),r=null,n=L_())}}}var hhe=({scrollHeight:e,scrollWidth:t,height:n,width:r})=>{const o=fs({x:t,y:e},{x:r,y:n});return{x:Math.max(0,o.x),y:Math.max(0,o.y)}},ghe=()=>{const e=document.documentElement;return e||pt(),e},mhe=()=>{const e=ghe();return hhe({scrollHeight:e.scrollHeight,scrollWidth:e.scrollWidth,width:e.clientWidth,height:e.clientHeight})},Azt=()=>{const e=phe(),t=mhe(),n=e.y,r=e.x,o=ghe(),i=o.clientWidth,a=o.clientHeight,s=r+i,l=n+a;return{frame:bc({top:n,left:r,right:s,bottom:l}),scroll:{initial:e,current:e,max:t,diff:{value:oi,displacement:oi}}}},kzt=({critical:e,scrollOptions:t,registry:n})=>{const r=Azt(),o=r.scroll.current,i=e.droppable,a=n.droppable.getAllByType(i.type).map(u=>u.callbacks.getDimensionAndWatchScroll(o,t)),s=n.draggable.getAllByType(e.draggable.type).map(u=>u.getDimension(o));return{dimensions:{draggables:Upe(s),droppables:Hpe(a)},critical:e,viewport:r}};function $X(e,t,n){return!(n.descriptor.id===t.id||n.descriptor.type!==t.type||e.droppable.getById(n.descriptor.droppableId).descriptor.mode!=="virtual")}var Mzt=(e,t)=>{let n=null;const r=Ozt({callbacks:{publish:t.publishWhileDragging,collectionStarting:t.collectionStarting},registry:e}),o=(f,p)=>{e.droppable.exists(f)||pt(),n&&t.updateDroppableIsEnabled({id:f,isEnabled:p})},i=(f,p)=>{n&&(e.droppable.exists(f)||pt(),t.updateDroppableIsCombineEnabled({id:f,isCombineEnabled:p}))},a=(f,p)=>{n&&(e.droppable.exists(f)||pt(),t.updateDroppableScroll({id:f,newScroll:p}))},s=(f,p)=>{n&&e.droppable.getById(f).callbacks.scroll(p)},l=()=>{if(!n)return;r.stop();const f=n.critical.droppable;e.droppable.getAllByType(f.type).forEach(p=>p.callbacks.dragStopped()),n.unsubscribe(),n=null},c=f=>{n||pt();const p=n.critical.draggable;f.type==="ADDITION"&&$X(e,p,f.value)&&r.add(f.value),f.type==="REMOVAL"&&$X(e,p,f.value)&&r.remove(f.value)};return{updateDroppableIsEnabled:o,updateDroppableIsCombineEnabled:i,scrollDroppable:s,updateDroppableScroll:a,startPublishing:f=>{n&&pt();const p=e.draggable.getById(f.draggableId),h=e.droppable.getById(p.descriptor.droppableId),m={draggable:p.descriptor,droppable:h.descriptor},y=e.subscribe(c);return n={critical:m,unsubscribe:y},kzt({critical:m,registry:e,scrollOptions:f.scrollOptions})},stopPublishing:l}},yhe=(e,t)=>e.phase==="IDLE"?!0:e.phase!=="DROP_ANIMATING"||e.completed.result.draggableId===t?!1:e.completed.result.reason==="DROP",Rzt=e=>{window.scrollBy(e.x,e.y)};const $zt=ri(e=>oR(e).filter(t=>!(!t.isEnabled||!t.frame))),Dzt=(e,t)=>$zt(t).find(r=>(r.frame||pt(),ehe(r.frame.pageMarginBox)(e)))||null;var _zt=({center:e,destination:t,droppables:n})=>{if(t){const o=n[t];return o.frame?o:null}return Dzt(e,n)};const hC={startFromPercentage:.25,maxScrollAtPercentage:.05,maxPixelScroll:28,ease:e=>e**2,durationDampening:{stopDampeningAt:1200,accelerateAt:360},disabled:!1};var Nzt=(e,t,n=()=>hC)=>{const r=n(),o=e[t.size]*r.startFromPercentage,i=e[t.size]*r.maxScrollAtPercentage;return{startScrollingFrom:o,maxScrollValueAt:i}},vhe=({startOfRange:e,endOfRange:t,current:n})=>{const r=t-e;return r===0?0:(n-e)/r},AH=1,Lzt=(e,t,n=()=>hC)=>{const r=n();if(e>t.startScrollingFrom)return 0;if(e<=t.maxScrollValueAt)return r.maxPixelScroll;if(e===t.startScrollingFrom)return AH;const i=1-vhe({startOfRange:t.maxScrollValueAt,endOfRange:t.startScrollingFrom,current:e}),a=r.maxPixelScroll*r.ease(i);return Math.ceil(a)},Fzt=(e,t,n)=>{const r=n(),o=r.durationDampening.accelerateAt,i=r.durationDampening.stopDampeningAt,a=t,s=i,c=Date.now()-a;if(c>=i)return e;if(c{const i=Lzt(e,t,o);return i===0?0:r?Math.max(Fzt(i,n,o),AH):i},_X=({container:e,distanceToEdges:t,dragStartTime:n,axis:r,shouldUseTimeDampening:o,getAutoScrollerOptions:i})=>{const a=Nzt(e,r,i);return t[r.end]{const r=t.height>e.height,o=t.width>e.width;return!o&&!r?n:o&&r?null:{x:o?0:n.x,y:r?0:n.y}};const Bzt=Vpe(e=>e===0?0:e);var bhe=({dragStartTime:e,container:t,subject:n,center:r,shouldUseTimeDampening:o,getAutoScrollerOptions:i})=>{const a={top:r.y-t.top,right:t.right-r.x,bottom:t.bottom-r.y,left:r.x-t.left},s=_X({container:t,distanceToEdges:a,dragStartTime:e,axis:xH,shouldUseTimeDampening:o,getAutoScrollerOptions:i}),l=_X({container:t,distanceToEdges:a,dragStartTime:e,axis:qpe,shouldUseTimeDampening:o,getAutoScrollerOptions:i}),c=Bzt({x:l,y:s});if(np(c,oi))return null;const u=jzt({container:t,subject:n,proposedScroll:c});return u?np(u,oi)?null:u:null};const zzt=Vpe(e=>e===0?0:e>0?1:-1),kH=(()=>{const e=(t,n)=>t<0?t:t>n?t-n:0;return({current:t,max:n,change:r})=>{const o=vi(t,r),i={x:e(o.x,n.x),y:e(o.y,n.y)};return np(i,oi)?null:i}})(),whe=({max:e,current:t,change:n})=>{const r={x:Math.max(t.x,e.x),y:Math.max(t.y,e.y)},o=zzt(n),i=kH({max:r,current:t,change:o});return!i||o.x!==0&&i.x===0||o.y!==0&&i.y===0},MH=(e,t)=>whe({current:e.scroll.current,max:e.scroll.max,change:t}),Vzt=(e,t)=>{if(!MH(e,t))return null;const n=e.scroll.max,r=e.scroll.current;return kH({current:r,max:n,change:t})},RH=(e,t)=>{const n=e.frame;return n?whe({current:n.scroll.current,max:n.scroll.max,change:t}):!1},Hzt=(e,t)=>{const n=e.frame;return!n||!RH(e,t)?null:kH({current:n.scroll.current,max:n.scroll.max,change:t})};var Uzt=({viewport:e,subject:t,center:n,dragStartTime:r,shouldUseTimeDampening:o,getAutoScrollerOptions:i})=>{const a=bhe({dragStartTime:r,container:e.frame,subject:t,center:n,shouldUseTimeDampening:o,getAutoScrollerOptions:i});return a&&MH(e,a)?a:null},Wzt=({droppable:e,subject:t,center:n,dragStartTime:r,shouldUseTimeDampening:o,getAutoScrollerOptions:i})=>{const a=e.frame;if(!a)return null;const s=bhe({dragStartTime:r,container:a.pageMarginBox,subject:t,center:n,shouldUseTimeDampening:o,getAutoScrollerOptions:i});return s&&RH(e,s)?s:null},NX=({state:e,dragStartTime:t,shouldUseTimeDampening:n,scrollWindow:r,scrollDroppable:o,getAutoScrollerOptions:i})=>{const a=e.current.page.borderBoxCenter,l=e.dimensions.draggables[e.critical.draggable.id].page.marginBox;if(e.isWindowScrollAllowed){const d=e.viewport,f=Uzt({dragStartTime:t,viewport:d,subject:l,center:a,shouldUseTimeDampening:n,getAutoScrollerOptions:i});if(f){r(f);return}}const c=_zt({center:a,destination:xs(e.impact),droppables:e.dimensions.droppables});if(!c)return;const u=Wzt({dragStartTime:t,droppable:c,subject:l,center:a,shouldUseTimeDampening:n,getAutoScrollerOptions:i});u&&o(c.descriptor.id,u)},Gzt=({scrollWindow:e,scrollDroppable:t,getAutoScrollerOptions:n=()=>hC})=>{const r=cC(e),o=cC(t);let i=null;const a=c=>{i||pt();const{shouldUseTimeDampening:u,dragStartTime:d}=i;NX({state:c,scrollWindow:r,scrollDroppable:o,dragStartTime:d,shouldUseTimeDampening:u,getAutoScrollerOptions:n})};return{start:c=>{i&&pt();const u=Date.now();let d=!1;const f=()=>{d=!0};NX({state:c,dragStartTime:0,shouldUseTimeDampening:!1,scrollWindow:f,scrollDroppable:f,getAutoScrollerOptions:n}),i={dragStartTime:u,shouldUseTimeDampening:d},d&&a(c)},stop:()=>{i&&(r.cancel(),o.cancel(),i=null)},scroll:a}},qzt=({move:e,scrollDroppable:t,scrollWindow:n})=>{const r=(s,l)=>{const c=vi(s.current.client.selection,l);e({client:c})},o=(s,l)=>{if(!RH(s,l))return l;const c=Hzt(s,l);if(!c)return t(s.descriptor.id,l),null;const u=fs(l,c);return t(s.descriptor.id,u),fs(l,u)},i=(s,l,c)=>{if(!s||!MH(l,c))return c;const u=Vzt(l,c);if(!u)return n(c),null;const d=fs(c,u);return n(d),fs(c,d)};return s=>{const l=s.scrollJumpRequest;if(!l)return;const c=xs(s.impact);c||pt();const u=o(s.dimensions.droppables[c],l);if(!u)return;const d=s.viewport,f=i(s.isWindowScrollAllowed,d,u);f&&r(s,f)}},Kzt=({scrollDroppable:e,scrollWindow:t,move:n,getAutoScrollerOptions:r})=>{const o=Gzt({scrollWindow:t,scrollDroppable:e,getAutoScrollerOptions:r}),i=qzt({move:n,scrollWindow:t,scrollDroppable:e});return{scroll:l=>{if(!(r().disabled||l.phase!=="DRAGGING")){if(l.movementMode==="FLUID"){o.scroll(l);return}l.scrollJumpRequest&&i(l)}},start:o.start,stop:o.stop}};const mb="data-rfd",yb=(()=>{const e=`${mb}-drag-handle`;return{base:e,draggableId:`${e}-draggable-id`,contextId:`${e}-context-id`}})(),pj=(()=>{const e=`${mb}-draggable`;return{base:e,contextId:`${e}-context-id`,id:`${e}-id`}})(),Yzt=(()=>{const e=`${mb}-droppable`;return{base:e,contextId:`${e}-context-id`,id:`${e}-id`}})(),LX={contextId:`${mb}-scroll-container-context-id`},Qzt=e=>t=>`[${t}="${e}"]`,Aw=(e,t)=>e.map(n=>{const r=n.styles[t];return r?`${n.selector} { ${r} }`:""}).join(" "),Xzt="pointer-events: none;";var Jzt=e=>{const t=Qzt(e),n=(()=>{const s=` cursor: -webkit-grab; cursor: grab; - `;return{selector:t(gb.contextId),styles:{always:` + `;return{selector:t(yb.contextId),styles:{always:` -webkit-touch-callout: none; -webkit-tap-highlight-color: rgba(0,0,0,0); touch-action: manipulation; - `,resting:s,dragging:hzt,dropAnimating:s}}})(),r=(()=>{const s=` - transition: ${Ax.outOfTheWay}; - `;return{selector:t(lj.contextId),styles:{dragging:s,dropAnimating:s,userCancel:s}}})(),o={selector:t(fzt.contextId),styles:{always:"overflow-anchor: none;"}},a=[r,n,o,{selector:"body",styles:{dragging:` + `,resting:s,dragging:Xzt,dropAnimating:s}}})(),r=(()=>{const s=` + transition: ${Dx.outOfTheWay}; + `;return{selector:t(pj.contextId),styles:{dragging:s,dropAnimating:s,userCancel:s}}})(),o={selector:t(Yzt.contextId),styles:{always:"overflow-anchor: none;"}},a=[r,n,o,{selector:"body",styles:{dragging:` cursor: grabbing; cursor: -webkit-grabbing; user-select: none; @@ -525,5 +525,5 @@ ${te.current.stack} -moz-user-select: none; -ms-user-select: none; overflow-anchor: none; - `}}];return{always:Ew(a,"always"),resting:Ew(a,"resting"),dragging:Ew(a,"dragging"),dropAnimating:Ew(a,"dropAnimating"),userCancel:Ew(a,"userCancel")}};const ws=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?v.useLayoutEffect:v.useEffect,R_=()=>{const e=document.querySelector("head");return e||ft(),e},$X=e=>{const t=document.createElement("style");return e&&t.setAttribute("nonce",e),t.type="text/css",t};function mzt(e,t){const n=Hn(()=>gzt(e),[e]),r=v.useRef(null),o=v.useRef(null),i=zt(ni(d=>{const f=o.current;f||ft(),f.textContent=d}),[]),a=zt(d=>{const f=r.current;f||ft(),f.textContent=d},[]);ws(()=>{!r.current&&!o.current||ft();const d=$X(t),f=$X(t);return r.current=d,o.current=f,d.setAttribute(`${hb}-always`,e),f.setAttribute(`${hb}-dynamic`,e),R_().appendChild(d),R_().appendChild(f),a(n.always),i(n.resting),()=>{const p=h=>{const m=h.current;m||ft(),R_().removeChild(m),h.current=null};p(r),p(o)}},[t,a,i,n.always,n.resting,e]);const s=zt(()=>i(n.dragging),[i,n.dragging]),l=zt(d=>{if(d==="DROP"){i(n.dropAnimating);return}i(n.userCancel)},[i,n.dropAnimating,n.userCancel]),c=zt(()=>{o.current&&i(n.resting)},[i,n.resting]);return Hn(()=>({dragging:s,dropping:l,resting:c}),[s,l,c])}function fhe(e,t){return Array.from(e.querySelectorAll(t))}var phe=e=>e&&e.ownerDocument&&e.ownerDocument.defaultView?e.ownerDocument.defaultView:window;function nR(e){return e instanceof phe(e).HTMLElement}function yzt(e,t){const n=`[${gb.contextId}="${e}"]`,r=fhe(document,n);if(!r.length)return null;const o=r.find(i=>i.getAttribute(gb.draggableId)===t);return!o||!nR(o)?null:o}function vzt(e){const t=v.useRef({}),n=v.useRef(null),r=v.useRef(null),o=v.useRef(!1),i=zt(function(f,p){const h={id:f,focus:p};return t.current[f]=h,function(){const y=t.current;y[f]!==h&&delete y[f]}},[]),a=zt(function(f){const p=yzt(e,f);p&&p!==document.activeElement&&p.focus()},[e]),s=zt(function(f,p){n.current===f&&(n.current=p)},[]),l=zt(function(){r.current||o.current&&(r.current=requestAnimationFrame(()=>{r.current=null;const f=n.current;f&&a(f)}))},[a]),c=zt(function(f){n.current=null;const p=document.activeElement;p&&p.getAttribute(gb.draggableId)===f&&(n.current=f)},[]);return ws(()=>(o.current=!0,function(){o.current=!1;const f=r.current;f&&cancelAnimationFrame(f)}),[]),Hn(()=>({register:i,tryRecordFocus:c,tryRestoreFocusRecorded:l,tryShiftRecord:s}),[i,c,l,s])}function bzt(){const e={draggables:{},droppables:{}},t=[];function n(d){return t.push(d),function(){const p=t.indexOf(d);p!==-1&&t.splice(p,1)}}function r(d){t.length&&t.forEach(f=>f(d))}function o(d){return e.draggables[d]||null}function i(d){const f=o(d);return f||ft(),f}const a={register:d=>{e.draggables[d.descriptor.id]=d,r({type:"ADDITION",value:d})},update:(d,f)=>{const p=e.draggables[f.descriptor.id];p&&p.uniqueId===d.uniqueId&&(delete e.draggables[f.descriptor.id],e.draggables[d.descriptor.id]=d)},unregister:d=>{const f=d.descriptor.id,p=o(f);p&&d.uniqueId===p.uniqueId&&(delete e.draggables[f],e.droppables[d.descriptor.droppableId]&&r({type:"REMOVAL",value:d}))},getById:i,findById:o,exists:d=>!!o(d),getAllByType:d=>Object.values(e.draggables).filter(f=>f.descriptor.type===d)};function s(d){return e.droppables[d]||null}function l(d){const f=s(d);return f||ft(),f}const c={register:d=>{e.droppables[d.descriptor.id]=d},unregister:d=>{const f=s(d.descriptor.id);f&&d.uniqueId===f.uniqueId&&delete e.droppables[d.descriptor.id]},getById:l,findById:s,exists:d=>!!s(d),getAllByType:d=>Object.values(e.droppables).filter(f=>f.descriptor.type===d)};function u(){e.draggables={},e.droppables={},t.length=0}return{draggable:a,droppable:c,subscribe:n,clean:u}}function wzt(){const e=Hn(bzt,[]);return v.useEffect(()=>function(){e.clean()},[e]),e}var A5=Y.createContext(null),UO=()=>{const e=document.body;return e||ft(),e};const xzt={position:"absolute",width:"1px",height:"1px",margin:"-1px",border:"0",padding:"0",overflow:"hidden",clip:"rect(0 0 0 0)","clip-path":"inset(100%)"},Szt=e=>`rfd-announcement-${e}`;function Czt(e){const t=Hn(()=>Szt(e),[e]),n=v.useRef(null);return v.useEffect(function(){const i=document.createElement("div");return n.current=i,i.id=t,i.setAttribute("aria-live","assertive"),i.setAttribute("aria-atomic","true"),BO(i.style,xzt),UO().appendChild(i),function(){setTimeout(function(){const l=UO();l.contains(i)&&l.removeChild(i),i===n.current&&(n.current=null)})}},[t]),zt(o=>{const i=n.current;if(i){i.textContent=o;return}},[])}const Ezt={separator:"::"};function k5(e,t=Ezt){const n=Y.useId();return Hn(()=>`${e}${t.separator}${n}`,[t.separator,e,n])}function Pzt({contextId:e,uniqueId:t}){return`rfd-hidden-text-${e}-${t}`}function Tzt({contextId:e,text:t}){const n=k5("hidden-text",{separator:"-"}),r=Hn(()=>Pzt({contextId:e,uniqueId:n}),[n,e]);return v.useEffect(function(){const i=document.createElement("div");return i.id=r,i.textContent=t,i.style.display="none",UO().appendChild(i),function(){const s=UO();s.contains(i)&&s.removeChild(i)}},[r,t]),r}var rR=Y.createContext(null);function hhe(e){const t=v.useRef(e);return v.useEffect(()=>{t.current=e}),t}function Izt(){let e=null;function t(){return!!e}function n(a){return a===e}function r(a){e&&ft();const s={abandon:a};return e=s,s}function o(){e||ft(),e=null}function i(){e&&(e.abandon(),o())}return{isClaimed:t,isActive:n,claim:r,release:o,tryAbandon:i}}function cC(e){return e.phase==="IDLE"||e.phase==="DROP_ANIMATING"?!1:e.isDragging}const Ozt=9,Azt=13,M5=27,ghe=32,kzt=33,Mzt=34,Rzt=35,$zt=36,Dzt=37,_zt=38,Nzt=39,Lzt=40,Fzt={[Azt]:!0,[Ozt]:!0};var mhe=e=>{Fzt[e.keyCode]&&e.preventDefault()};const oR=(()=>{const e="visibilitychange";return typeof document>"u"?e:[e,`ms${e}`,`webkit${e}`,`moz${e}`,`o${e}`].find(r=>`on${r}`in document)||e})(),yhe=0,DX=5;function jzt(e,t){return Math.abs(t.x-e.x)>=DX||Math.abs(t.y-e.y)>=DX}const _X={type:"IDLE"};function Bzt({cancel:e,completed:t,getPhase:n,setPhase:r}){return[{eventName:"mousemove",fn:o=>{const{button:i,clientX:a,clientY:s}=o;if(i!==yhe)return;const l={x:a,y:s},c=n();if(c.type==="DRAGGING"){o.preventDefault(),c.actions.move(l);return}c.type!=="PENDING"&&ft();const u=c.point;if(!jzt(u,l))return;o.preventDefault();const d=c.actions.fluidLift(l);r({type:"DRAGGING",actions:d})}},{eventName:"mouseup",fn:o=>{const i=n();if(i.type!=="DRAGGING"){e();return}o.preventDefault(),i.actions.drop({shouldBlockNextClick:!0}),t()}},{eventName:"mousedown",fn:o=>{n().type==="DRAGGING"&&o.preventDefault(),e()}},{eventName:"keydown",fn:o=>{if(n().type==="PENDING"){e();return}if(o.keyCode===M5){o.preventDefault(),e();return}mhe(o)}},{eventName:"resize",fn:e},{eventName:"scroll",options:{passive:!0,capture:!1},fn:()=>{n().type==="PENDING"&&e()}},{eventName:"webkitmouseforcedown",fn:o=>{const i=n();if(i.type==="IDLE"&&ft(),i.actions.shouldRespectForcePress()){e();return}o.preventDefault()}},{eventName:oR,fn:e}]}function zzt(e){const t=v.useRef(_X),n=v.useRef(Zf),r=Hn(()=>({eventName:"mousedown",fn:function(d){if(d.defaultPrevented||d.button!==yhe||d.ctrlKey||d.metaKey||d.shiftKey||d.altKey)return;const f=e.findClosestDraggableId(d);if(!f)return;const p=e.tryGetLock(f,a,{sourceEvent:d});if(!p)return;d.preventDefault();const h={x:d.clientX,y:d.clientY};n.current(),c(p,h)}}),[e]),o=Hn(()=>({eventName:"webkitmouseforcewillbegin",fn:u=>{if(u.defaultPrevented)return;const d=e.findClosestDraggableId(u);if(!d)return;const f=e.findOptionsForDraggable(d);f&&(f.shouldRespectForcePress||e.canGetLock(d)&&u.preventDefault())}}),[e]),i=zt(function(){const d={passive:!1,capture:!0};n.current=ml(window,[o,r],d)},[o,r]),a=zt(()=>{t.current.type!=="IDLE"&&(t.current=_X,n.current(),i())},[i]),s=zt(()=>{const u=t.current;a(),u.type==="DRAGGING"&&u.actions.cancel({shouldBlockNextClick:!0}),u.type==="PENDING"&&u.actions.abort()},[a]),l=zt(function(){const d={capture:!0,passive:!1},f=Bzt({cancel:s,completed:a,getPhase:()=>t.current,setPhase:p=>{t.current=p}});n.current=ml(window,f,d)},[s,a]),c=zt(function(d,f){t.current.type!=="IDLE"&&ft(),t.current={type:"PENDING",point:f,actions:d},l()},[l]);ws(function(){return i(),function(){n.current()}},[i])}function Vzt(){}const Hzt={[Mzt]:!0,[kzt]:!0,[$zt]:!0,[Rzt]:!0};function Uzt(e,t){function n(){t(),e.cancel()}function r(){t(),e.drop()}return[{eventName:"keydown",fn:o=>{if(o.keyCode===M5){o.preventDefault(),n();return}if(o.keyCode===ghe){o.preventDefault(),r();return}if(o.keyCode===Lzt){o.preventDefault(),e.moveDown();return}if(o.keyCode===_zt){o.preventDefault(),e.moveUp();return}if(o.keyCode===Nzt){o.preventDefault(),e.moveRight();return}if(o.keyCode===Dzt){o.preventDefault(),e.moveLeft();return}if(Hzt[o.keyCode]){o.preventDefault();return}mhe(o)}},{eventName:"mousedown",fn:n},{eventName:"mouseup",fn:n},{eventName:"click",fn:n},{eventName:"touchstart",fn:n},{eventName:"resize",fn:n},{eventName:"wheel",fn:n,options:{passive:!0}},{eventName:oR,fn:n}]}function Wzt(e){const t=v.useRef(Vzt),n=Hn(()=>({eventName:"keydown",fn:function(i){if(i.defaultPrevented||i.keyCode!==ghe)return;const a=e.findClosestDraggableId(i);if(!a)return;const s=e.tryGetLock(a,u,{sourceEvent:i});if(!s)return;i.preventDefault();let l=!0;const c=s.snapLift();t.current();function u(){l||ft(),l=!1,t.current(),r()}t.current=ml(window,Uzt(c,u),{capture:!0,passive:!1})}}),[e]),r=zt(function(){const i={passive:!1,capture:!0};t.current=ml(window,[n],i)},[n]);ws(function(){return r(),function(){t.current()}},[r])}const $_={type:"IDLE"},Gzt=120,qzt=.15;function Kzt({cancel:e,getPhase:t}){return[{eventName:"orientationchange",fn:e},{eventName:"resize",fn:e},{eventName:"contextmenu",fn:n=>{n.preventDefault()}},{eventName:"keydown",fn:n=>{if(t().type!=="DRAGGING"){e();return}n.keyCode===M5&&n.preventDefault(),e()}},{eventName:oR,fn:e}]}function Yzt({cancel:e,completed:t,getPhase:n}){return[{eventName:"touchmove",options:{capture:!1},fn:r=>{const o=n();if(o.type!=="DRAGGING"){e();return}o.hasMoved=!0;const{clientX:i,clientY:a}=r.touches[0],s={x:i,y:a};r.preventDefault(),o.actions.move(s)}},{eventName:"touchend",fn:r=>{const o=n();if(o.type!=="DRAGGING"){e();return}r.preventDefault(),o.actions.drop({shouldBlockNextClick:!0}),t()}},{eventName:"touchcancel",fn:r=>{if(n().type!=="DRAGGING"){e();return}r.preventDefault(),e()}},{eventName:"touchforcechange",fn:r=>{const o=n();o.type==="IDLE"&&ft();const i=r.touches[0];if(!i||!(i.force>=qzt))return;const s=o.actions.shouldRespectForcePress();if(o.type==="PENDING"){s&&e();return}if(s){if(o.hasMoved){r.preventDefault();return}e();return}r.preventDefault()}},{eventName:oR,fn:e}]}function Qzt(e){const t=v.useRef($_),n=v.useRef(Zf),r=zt(function(){return t.current},[]),o=zt(function(p){t.current=p},[]),i=Hn(()=>({eventName:"touchstart",fn:function(p){if(p.defaultPrevented)return;const h=e.findClosestDraggableId(p);if(!h)return;const m=e.tryGetLock(h,s,{sourceEvent:p});if(!m)return;const y=p.touches[0],{clientX:w,clientY:x}=y,C={x:w,y:x};n.current(),d(m,C)}}),[e]),a=zt(function(){const p={capture:!0,passive:!1};n.current=ml(window,[i],p)},[i]),s=zt(()=>{const f=t.current;f.type!=="IDLE"&&(f.type==="PENDING"&&clearTimeout(f.longPressTimerId),o($_),n.current(),a())},[a,o]),l=zt(()=>{const f=t.current;s(),f.type==="DRAGGING"&&f.actions.cancel({shouldBlockNextClick:!0}),f.type==="PENDING"&&f.actions.abort()},[s]),c=zt(function(){const p={capture:!0,passive:!1},h={cancel:l,completed:s,getPhase:r},m=ml(window,Yzt(h),p),y=ml(window,Kzt(h),p);n.current=function(){m(),y()}},[l,r,s]),u=zt(function(){const p=r();p.type!=="PENDING"&&ft();const h=p.actions.fluidLift(p.point);o({type:"DRAGGING",actions:h,hasMoved:!1})},[r,o]),d=zt(function(p,h){r().type!=="IDLE"&&ft();const m=setTimeout(u,Gzt);o({type:"PENDING",point:h,actions:p,longPressTimerId:m}),c()},[c,r,o,u]);ws(function(){return a(),function(){n.current();const h=r();h.type==="PENDING"&&(clearTimeout(h.longPressTimerId),o($_))}},[r,a,o]),ws(function(){return ml(window,[{eventName:"touchmove",fn:()=>{},options:{capture:!1,passive:!1}}])},[])}const Xzt=["input","button","textarea","select","option","optgroup","video","audio"];function vhe(e,t){if(t==null)return!1;if(Xzt.includes(t.tagName.toLowerCase()))return!0;const r=t.getAttribute("contenteditable");return r==="true"||r===""?!0:t===e?!1:vhe(e,t.parentElement)}function Jzt(e,t){const n=t.target;return nR(n)?vhe(e,n):!1}var Zzt=e=>yc(e.getBoundingClientRect()).center;function eVt(e){return e instanceof phe(e).Element}const tVt=(()=>{const e="matches";return typeof document>"u"?e:[e,"msMatchesSelector","webkitMatchesSelector"].find(r=>r in Element.prototype)||e})();function bhe(e,t){return e==null?null:e[tVt](t)?e:bhe(e.parentElement,t)}function nVt(e,t){return e.closest?e.closest(t):bhe(e,t)}function rVt(e){return`[${gb.contextId}="${e}"]`}function oVt(e,t){const n=t.target;if(!eVt(n))return null;const r=rVt(e),o=nVt(n,r);return!o||!nR(o)?null:o}function iVt(e,t){const n=oVt(e,t);return n?n.getAttribute(gb.draggableId):null}function aVt(e,t){const n=`[${lj.contextId}="${e}"]`,o=fhe(document,n).find(i=>i.getAttribute(lj.id)===t);return!o||!nR(o)?null:o}function sVt(e){e.preventDefault()}function IP({expected:e,phase:t,isLockActive:n,shouldWarn:r}){return!(!n()||e!==t)}function whe({lockAPI:e,store:t,registry:n,draggableId:r}){if(e.isClaimed())return!1;const o=n.draggable.findById(r);return!(!o||!o.options.isEnabled||!lhe(t.getState(),r))}function lVt({lockAPI:e,contextId:t,store:n,registry:r,draggableId:o,forceSensorStop:i,sourceEvent:a}){if(!whe({lockAPI:e,store:n,registry:r,draggableId:o}))return null;const l=r.draggable.getById(o),c=aVt(t,l.descriptor.id);if(!c||a&&!l.options.canDragInteractiveElements&&Jzt(c,a))return null;const u=e.claim(i||Zf);let d="PRE_DRAG";function f(){return l.options.shouldRespectForcePress}function p(){return e.isActive(u)}function h(P,T){IP({expected:P,phase:d,isLockActive:p,shouldWarn:!0})&&n.dispatch(T())}const m=h.bind(null,"DRAGGING");function y(P){function T(){e.release(),d="COMPLETED"}d!=="PRE_DRAG"&&(T(),ft()),n.dispatch(nBt(P.liftActionArgs)),d="DRAGGING";function I(A,k={shouldBlockNextClick:!1}){if(P.cleanup(),k.shouldBlockNextClick){const O=ml(window,[{eventName:"click",fn:sVt,options:{once:!0,passive:!1,capture:!0}}]);setTimeout(O)}T(),n.dispatch(ehe({reason:A}))}return{isActive:()=>IP({expected:"DRAGGING",phase:d,isLockActive:p,shouldWarn:!1}),shouldRespectForcePress:f,drop:A=>I("DROP",A),cancel:A=>I("CANCEL",A),...P.actions}}function w(P){const T=rC(A=>{m(()=>Zpe({client:A}))});return{...y({liftActionArgs:{id:o,clientSelection:P,movementMode:"FLUID"},cleanup:()=>T.cancel(),actions:{move:T}}),move:T}}function x(){const P={moveUp:()=>m(dBt),moveRight:()=>m(pBt),moveDown:()=>m(fBt),moveLeft:()=>m(hBt)};return y({liftActionArgs:{id:o,clientSelection:Zzt(c),movementMode:"SNAP"},cleanup:Zf,actions:P})}function C(){IP({expected:"PRE_DRAG",phase:d,isLockActive:p,shouldWarn:!0})&&e.release()}return{isActive:()=>IP({expected:"PRE_DRAG",phase:d,isLockActive:p,shouldWarn:!1}),shouldRespectForcePress:f,fluidLift:w,snapLift:x,abort:C}}const cVt=[zzt,Wzt,Qzt];function uVt({contextId:e,store:t,registry:n,customSensors:r,enableDefaultSensors:o}){const i=[...o?cVt:[],...r||[]],a=v.useState(()=>Izt())[0],s=zt(function(y,w){cC(y)&&!cC(w)&&a.tryAbandon()},[a]);ws(function(){let y=t.getState();return t.subscribe(()=>{const x=t.getState();s(y,x),y=x})},[a,t,s]),ws(()=>a.tryAbandon,[a.tryAbandon]);const l=zt(m=>whe({lockAPI:a,registry:n,store:t,draggableId:m}),[a,n,t]),c=zt((m,y,w)=>lVt({lockAPI:a,registry:n,contextId:e,store:t,draggableId:m,forceSensorStop:y||null,sourceEvent:w&&w.sourceEvent?w.sourceEvent:null}),[e,a,n,t]),u=zt(m=>iVt(e,m),[e]),d=zt(m=>{const y=n.draggable.findById(m);return y?y.options:null},[n.draggable]),f=zt(function(){a.isClaimed()&&(a.tryAbandon(),t.getState().phase!=="IDLE"&&t.dispatch(S5()))},[a,t]),p=zt(()=>a.isClaimed(),[a]),h=Hn(()=>({canGetLock:l,tryGetLock:c,findClosestDraggableId:u,findOptionsForDraggable:d,tryReleaseLock:f,isLockClaimed:p}),[l,c,u,d,f,p]);for(let m=0;m({onBeforeCapture:t=>{const n=()=>{e.onBeforeCapture&&e.onBeforeCapture(t)};Eb.flushSync(n)},onBeforeDragStart:e.onBeforeDragStart,onDragStart:e.onDragStart,onDragEnd:e.onDragEnd,onDragUpdate:e.onDragUpdate}),fVt=e=>({...lC,...e.autoScrollerOptions,durationDampening:{...lC.durationDampening,...e.autoScrollerOptions}});function Pw(e){return e.current||ft(),e.current}function pVt(e){const{contextId:t,setCallbacks:n,sensors:r,nonce:o,dragHandleUsageInstructions:i}=e,a=v.useRef(null),s=hhe(e),l=zt(()=>dVt(s.current),[s]),c=zt(()=>fVt(s.current),[s]),u=Czt(t),d=Tzt({contextId:t,text:i}),f=mzt(t,o),p=zt(O=>{Pw(a).dispatch(O)},[]),h=Hn(()=>aX({publishWhileDragging:oBt,updateDroppableScroll:aBt,updateDroppableIsEnabled:sBt,updateDroppableIsCombineEnabled:lBt,collectionStarting:iBt},p),[p]),m=wzt(),y=Hn(()=>KBt(m,h),[m,h]),w=Hn(()=>dzt({scrollWindow:YBt,scrollDroppable:y.scrollDroppable,getAutoScrollerOptions:c,...aX({move:Zpe},p)}),[y.scrollDroppable,p,c]),x=vzt(t),C=Hn(()=>UBt({announce:u,autoScroller:w,dimensionMarshal:y,focusMarshal:x,getResponders:l,styleMarshal:f}),[u,w,y,x,l,f]);a.current=C;const E=zt(()=>{const O=Pw(a);O.getState().phase!=="IDLE"&&O.dispatch(S5())},[]),P=zt(()=>{const O=Pw(a).getState();return O.phase==="DROP_ANIMATING"?!0:O.phase==="IDLE"?!1:O.isDragging},[]),T=Hn(()=>({isDragging:P,tryAbort:E}),[P,E]);n(T);const I=zt(O=>lhe(Pw(a).getState(),O),[]),A=zt(()=>Th(Pw(a).getState()),[]),k=Hn(()=>({marshal:y,focus:x,contextId:t,canLift:I,isMovementAllowed:A,dragHandleUsageInstructionsId:d,registry:m}),[t,y,d,x,I,A,m]);return uVt({contextId:t,store:C,registry:m,customSensors:r||null,enableDefaultSensors:e.enableDefaultSensors!==!1}),v.useEffect(()=>E,[E]),Y.createElement(rR.Provider,{value:k},Y.createElement(LFt,{context:A5,store:C},e.children))}function hVt(){return Y.useId()}function xhe(e){const t=hVt(),n=e.dragHandleUsageInstructions||hT.dragHandleUsageInstructions;return Y.createElement(GFt,null,r=>Y.createElement(pVt,{nonce:e.nonce,contextId:t,setCallbacks:r,dragHandleUsageInstructions:n,enableDefaultSensors:e.enableDefaultSensors,sensors:e.sensors,onBeforeCapture:e.onBeforeCapture,onBeforeDragStart:e.onBeforeDragStart,onDragStart:e.onDragStart,onDragUpdate:e.onDragUpdate,onDragEnd:e.onDragEnd,autoScrollerOptions:e.autoScrollerOptions},e.children))}const NX={dragging:5e3,dropAnimating:4500},gVt=(e,t)=>t?Ax.drop(t.duration):e?Ax.snap:Ax.fluid,mVt=(e,t)=>{if(e)return t?sC.opacity.drop:sC.opacity.combining},yVt=e=>e.forceShouldAnimate!=null?e.forceShouldAnimate:e.mode==="SNAP";function vVt(e){const n=e.dimension.client,{offset:r,combineWith:o,dropping:i}=e,a=!!o,s=yVt(e),l=!!i,c=l?aj.drop(r,a):aj.moveTo(r);return{position:"fixed",top:n.marginBox.top,left:n.marginBox.left,boxSizing:"border-box",width:n.borderBox.width,height:n.borderBox.height,transition:gVt(s,i),transform:c,opacity:mVt(a,l),zIndex:l?NX.dropAnimating:NX.dragging,pointerEvents:"none"}}function bVt(e){return{transform:aj.moveTo(e.offset),transition:e.shouldAnimateDisplacement?void 0:"none"}}function wVt(e){return e.type==="DRAGGING"?vVt(e):bVt(e)}function xVt(e,t,n=ri){const r=window.getComputedStyle(t),o=t.getBoundingClientRect(),i=Ope(o,r),a=jO(i,n),s={client:i,tagName:t.tagName.toLowerCase(),display:r.display},l={x:i.marginBox.width,y:i.marginBox.height};return{descriptor:e,placeholder:s,displaceBy:l,client:i,page:a}}function SVt(e){const t=k5("draggable"),{descriptor:n,registry:r,getDraggableRef:o,canDragInteractiveElements:i,shouldRespectForcePress:a,isEnabled:s}=e,l=Hn(()=>({canDragInteractiveElements:i,shouldRespectForcePress:a,isEnabled:s}),[i,s,a]),c=zt(p=>{const h=o();return h||ft(),xVt(n,h,p)},[n,o]),u=Hn(()=>({uniqueId:t,descriptor:n,options:l,getDimension:c}),[n,c,l,t]),d=v.useRef(u),f=v.useRef(!0);ws(()=>(r.draggable.register(d.current),()=>r.draggable.unregister(d.current)),[r.draggable]),ws(()=>{if(f.current){f.current=!1;return}const p=d.current;d.current=u,r.draggable.update(u,p)},[u,r.draggable])}var R5=Y.createContext(null);function WO(e){const t=v.useContext(e);return t||ft(),t}function CVt(e){e.preventDefault()}const EVt=e=>{const t=v.useRef(null),n=zt((T=null)=>{t.current=T},[]),r=zt(()=>t.current,[]),{contextId:o,dragHandleUsageInstructionsId:i,registry:a}=WO(rR),{type:s,droppableId:l}=WO(R5),c=Hn(()=>({id:e.draggableId,index:e.index,type:s,droppableId:l}),[e.draggableId,e.index,s,l]),{children:u,draggableId:d,isEnabled:f,shouldRespectForcePress:p,canDragInteractiveElements:h,isClone:m,mapped:y,dropAnimationFinished:w}=e;if(!m){const T=Hn(()=>({descriptor:c,registry:a,getDraggableRef:r,canDragInteractiveElements:h,shouldRespectForcePress:p,isEnabled:f}),[c,a,r,h,p,f]);SVt(T)}const x=Hn(()=>f?{tabIndex:0,role:"button","aria-describedby":i,"data-rfd-drag-handle-draggable-id":d,"data-rfd-drag-handle-context-id":o,draggable:!1,onDragStart:CVt}:null,[o,i,d,f]),C=zt(T=>{y.type==="DRAGGING"&&y.dropping&&T.propertyName==="transform"&&Eb.flushSync(w)},[w,y]),E=Hn(()=>{const T=wVt(y),I=y.type==="DRAGGING"&&y.dropping?C:void 0;return{innerRef:n,draggableProps:{"data-rfd-draggable-context-id":o,"data-rfd-draggable-id":d,style:T,onTransitionEnd:I},dragHandleProps:x}},[o,x,d,y,C,n]),P=Hn(()=>({draggableId:c.id,type:c.type,source:{index:c.index,droppableId:c.droppableId}}),[c.droppableId,c.id,c.index,c.type]);return Y.createElement(Y.Fragment,null,u(E,y.snapshot,P))};var She=(e,t)=>e===t,Che=e=>{const{combine:t,destination:n}=e;return n?n.droppableId:t?t.droppableId:null};const PVt=e=>e.combine?e.combine.draggableId:null,TVt=e=>e.at&&e.at.type==="COMBINE"?e.at.combine.draggableId:null;function IVt(){const e=ni((o,i)=>({x:o,y:i})),t=ni((o,i,a=null,s=null,l=null)=>({isDragging:!0,isClone:i,isDropAnimating:!!l,dropAnimation:l,mode:o,draggingOver:a,combineWith:s,combineTargetFor:null})),n=ni((o,i,a,s,l=null,c=null,u=null)=>({mapped:{type:"DRAGGING",dropping:null,draggingOver:l,combineWith:c,mode:i,offset:o,dimension:a,forceShouldAnimate:u,snapshot:t(i,s,l,c,null)}}));return(o,i)=>{if(cC(o)){if(o.critical.draggable.id!==i.draggableId)return null;const a=o.current.client.offset,s=o.dimensions.draggables[i.draggableId],l=bs(o.impact),c=TVt(o.impact),u=o.forceShouldAnimate;return n(e(a.x,a.y),o.movementMode,s,i.isClone,l,c,u)}if(o.phase==="DROP_ANIMATING"){const a=o.completed;if(a.result.draggableId!==i.draggableId)return null;const s=i.isClone,l=o.dimensions.draggables[i.draggableId],c=a.result,u=c.mode,d=Che(c),f=PVt(c),h={duration:o.dropDuration,curve:E5.drop,moveTo:o.newHomeClientOffset,opacity:f?sC.opacity.drop:null,scale:f?sC.scale.drop:null};return{mapped:{type:"DRAGGING",offset:o.newHomeClientOffset,dimension:l,dropping:h,draggingOver:d,combineWith:f,mode:u,forceShouldAnimate:null,snapshot:t(u,s,d,f,h)}}}return null}}function Ehe(e=null){return{isDragging:!1,isDropAnimating:!1,isClone:!1,dropAnimation:null,mode:null,draggingOver:null,combineTargetFor:e,combineWith:null}}const OVt={mapped:{type:"SECONDARY",offset:ri,combineTargetFor:null,shouldAnimateDisplacement:!0,snapshot:Ehe(null)}};function AVt(){const e=ni((a,s)=>({x:a,y:s})),t=ni(Ehe),n=ni((a,s=null,l)=>({mapped:{type:"SECONDARY",offset:a,combineTargetFor:s,shouldAnimateDisplacement:l,snapshot:t(s)}})),r=a=>a?n(ri,a,!0):null,o=(a,s,l,c)=>{const u=l.displaced.visible[a],d=!!(c.inVirtualList&&c.effected[a]),f=ZM(l),p=f&&f.draggableId===a?s:null;if(!u){if(!d)return r(p);if(l.displaced.invisible[a])return null;const y=w0(c.displacedBy.point),w=e(y.x,y.y);return n(w,p,!0)}if(d)return r(p);const h=l.displacedBy.point,m=e(h.x,h.y);return n(m,p,u.shouldAnimate)};return(a,s)=>{if(cC(a))return a.critical.draggable.id===s.draggableId?null:o(s.draggableId,a.critical.draggable.id,a.impact,a.afterCritical);if(a.phase==="DROP_ANIMATING"){const l=a.completed;return l.result.draggableId===s.draggableId?null:o(s.draggableId,l.result.draggableId,l.impact,l.afterCritical)}return null}}const kVt=()=>{const e=IVt(),t=AVt();return(r,o)=>e(r,o)||t(r,o)||OVt},MVt={dropAnimationFinished:the},RVt=Tpe(kVt,MVt,null,{context:A5,areStatePropsEqual:She})(EVt);function Phe(e){return WO(R5).isUsingCloneFor===e.draggableId&&!e.isClone?null:Y.createElement(RVt,e)}function The(e){const t=typeof e.isDragDisabled=="boolean"?!e.isDragDisabled:!0,n=!!e.disableInteractiveElementBlocking,r=!!e.shouldRespectForcePress;return Y.createElement(Phe,BO({},e,{isClone:!1,isEnabled:t,canDragInteractiveElements:n,shouldRespectForcePress:r}))}const Ihe=e=>t=>e===t,$Vt=Ihe("scroll"),DVt=Ihe("auto"),LX=(e,t)=>t(e.overflowX)||t(e.overflowY),_Vt=e=>{const t=window.getComputedStyle(e),n={overflowX:t.overflowX,overflowY:t.overflowY};return LX(n,$Vt)||LX(n,DVt)},NVt=()=>!1,Ohe=e=>e==null?null:e===document.body?NVt()?e:null:e===document.documentElement?null:_Vt(e)?e:Ohe(e.parentElement);var cj=e=>({x:e.scrollLeft,y:e.scrollTop});const Ahe=e=>e?window.getComputedStyle(e).position==="fixed"?!0:Ahe(e.parentElement):!1;var LVt=e=>{const t=Ohe(e),n=Ahe(e);return{closestScrollable:t,isFixedOnPage:n}},FVt=({descriptor:e,isEnabled:t,isCombineEnabled:n,isFixedOnPage:r,direction:o,client:i,page:a,closest:s})=>{const l=(()=>{if(!s)return null;const{scrollSize:f,client:p}=s,h=ihe({scrollHeight:f.scrollHeight,scrollWidth:f.scrollWidth,height:p.paddingBox.height,width:p.paddingBox.width});return{pageMarginBox:s.page.marginBox,frameClient:p,scrollSize:f,shouldClipSubject:s.shouldClipSubject,scroll:{initial:s.scroll,current:s.scroll,max:h,diff:{value:ri,displacement:ri}}}})(),c=o==="vertical"?y5:Fpe,u=pb({page:a,withPlaceholder:null,axis:c,frame:l});return{descriptor:e,isCombineEnabled:n,isFixedOnPage:r,axis:c,isEnabled:t,client:i,page:a,frame:l,subject:u}};const jVt=(e,t)=>{const n=Ape(e);if(!t||e!==t)return n;const r=n.paddingBox.top-t.scrollTop,o=n.paddingBox.left-t.scrollLeft,i=r+t.scrollHeight,a=o+t.scrollWidth,l=p5({top:r,right:a,bottom:i,left:o},n.border);return h5({borderBox:l,margin:n.margin,border:n.border,padding:n.padding})};var BVt=({ref:e,descriptor:t,env:n,windowScroll:r,direction:o,isDropDisabled:i,isCombineEnabled:a,shouldClipSubject:s})=>{const l=n.closestScrollable,c=jVt(e,l),u=jO(c,r),d=(()=>{if(!l)return null;const p=Ape(l),h={scrollHeight:l.scrollHeight,scrollWidth:l.scrollWidth};return{client:p,page:jO(p,r),scroll:cj(l),scrollSize:h,shouldClipSubject:s}})();return FVt({descriptor:t,isEnabled:!i,isCombineEnabled:a,isFixedOnPage:n.isFixedOnPage,direction:o,client:c,page:u,closest:d})};const zVt={passive:!1},VVt={passive:!0};var FX=e=>e.shouldPublishImmediately?zVt:VVt;const OP=e=>e&&e.env.closestScrollable||null;function HVt(e){const t=v.useRef(null),n=WO(rR),r=k5("droppable"),{registry:o,marshal:i}=n,a=hhe(e),s=Hn(()=>({id:e.droppableId,type:e.type,mode:e.mode}),[e.droppableId,e.mode,e.type]),l=v.useRef(s),c=Hn(()=>ni((E,P)=>{t.current||ft();const T={x:E,y:P};i.updateDroppableScroll(s.id,T)}),[s.id,i]),u=zt(()=>{const E=t.current;return!E||!E.env.closestScrollable?ri:cj(E.env.closestScrollable)},[]),d=zt(()=>{const E=u();c(E.x,E.y)},[u,c]),f=Hn(()=>rC(d),[d]),p=zt(()=>{const E=t.current,P=OP(E);if(E&&P||ft(),E.scrollOptions.shouldPublishImmediately){d();return}f()},[f,d]),h=zt((E,P)=>{t.current&&ft();const T=a.current,I=T.getDroppableRef();I||ft();const A=LVt(I),k={ref:I,descriptor:s,env:A,scrollOptions:P};t.current=k;const O=BVt({ref:I,descriptor:s,env:A,windowScroll:E,direction:T.direction,isDropDisabled:T.isDropDisabled,isCombineEnabled:T.isCombineEnabled,shouldClipSubject:!T.ignoreContainerClipping}),$=A.closestScrollable;return $&&($.setAttribute(RX.contextId,n.contextId),$.addEventListener("scroll",p,FX(k.scrollOptions))),O},[n.contextId,s,p,a]),m=zt(()=>{const E=t.current,P=OP(E);return E&&P||ft(),cj(P)},[]),y=zt(()=>{const E=t.current;E||ft();const P=OP(E);t.current=null,P&&(f.cancel(),P.removeAttribute(RX.contextId),P.removeEventListener("scroll",p,FX(E.scrollOptions)))},[p,f]),w=zt(E=>{const P=t.current;P||ft();const T=OP(P);T||ft(),T.scrollTop+=E.y,T.scrollLeft+=E.x},[]),x=Hn(()=>({getDimensionAndWatchScroll:h,getScrollWhileDragging:m,dragStopped:y,scroll:w}),[y,h,m,w]),C=Hn(()=>({uniqueId:r,descriptor:s,callbacks:x}),[x,s,r]);ws(()=>(l.current=C.descriptor,o.droppable.register(C),()=>{t.current&&y(),o.droppable.unregister(C)}),[x,s,y,C,i,o.droppable]),ws(()=>{t.current&&i.updateDroppableIsEnabled(l.current.id,!e.isDropDisabled)},[e.isDropDisabled,i]),ws(()=>{t.current&&i.updateDroppableIsCombineEnabled(l.current.id,e.isCombineEnabled)},[e.isCombineEnabled,i])}function D_(){}const jX={width:0,height:0,margin:JFt},UVt=({isAnimatingOpenOnMount:e,placeholder:t,animate:n})=>e||n==="close"?jX:{height:t.client.borderBox.height,width:t.client.borderBox.width,margin:t.client.margin},WVt=({isAnimatingOpenOnMount:e,placeholder:t,animate:n})=>{const r=UVt({isAnimatingOpenOnMount:e,placeholder:t,animate:n});return{display:t.display,boxSizing:"border-box",width:r.width,height:r.height,marginTop:r.margin.top,marginRight:r.margin.right,marginBottom:r.margin.bottom,marginLeft:r.margin.left,flexShrink:"0",flexGrow:"0",pointerEvents:"none",transition:n!=="none"?Ax.placeholder:null}},GVt=e=>{const t=v.useRef(null),n=zt(()=>{t.current&&(clearTimeout(t.current),t.current=null)},[]),{animate:r,onTransitionEnd:o,onClose:i,contextId:a}=e,[s,l]=v.useState(e.animate==="open");v.useEffect(()=>s?r!=="open"?(n(),l(!1),D_):t.current?D_:(t.current=setTimeout(()=>{t.current=null,l(!1)}),n):D_,[r,s,n]);const c=zt(d=>{d.propertyName==="height"&&(o(),r==="close"&&i())},[r,i,o]),u=WVt({isAnimatingOpenOnMount:s,animate:e.animate,placeholder:e.placeholder});return Y.createElement(e.placeholder.tagName,{style:u,"data-rfd-placeholder-context-id":a,onTransitionEnd:c,ref:e.innerRef})};var qVt=Y.memo(GVt);class KVt extends Y.PureComponent{constructor(...t){super(...t),this.state={isVisible:!!this.props.on,data:this.props.on,animate:this.props.shouldAnimate&&this.props.on?"open":"none"},this.onClose=()=>{this.state.animate==="close"&&this.setState({isVisible:!1})}}static getDerivedStateFromProps(t,n){return t.shouldAnimate?t.on?{isVisible:!0,data:t.on,animate:"open"}:n.isVisible?{isVisible:!0,data:n.data,animate:"close"}:{isVisible:!1,animate:"close",data:null}:{isVisible:!!t.on,data:t.on,animate:"none"}}render(){if(!this.state.isVisible)return null;const t={onClose:this.onClose,data:this.state.data,animate:this.state.animate};return this.props.children(t)}}const YVt=e=>{const t=v.useContext(rR);t||ft();const{contextId:n,isMovementAllowed:r}=t,o=v.useRef(null),i=v.useRef(null),{children:a,droppableId:s,type:l,mode:c,direction:u,ignoreContainerClipping:d,isDropDisabled:f,isCombineEnabled:p,snapshot:h,useClone:m,updateViewportMaxScroll:y,getContainerForClone:w}=e,x=zt(()=>o.current,[]),C=zt(($=null)=>{o.current=$},[]);zt(()=>i.current,[]);const E=zt(($=null)=>{i.current=$},[]),P=zt(()=>{r()&&y({maxScroll:she()})},[r,y]);HVt({droppableId:s,type:l,mode:c,direction:u,isDropDisabled:f,isCombineEnabled:p,ignoreContainerClipping:d,getDroppableRef:x});const T=Hn(()=>Y.createElement(KVt,{on:e.placeholder,shouldAnimate:e.shouldAnimatePlaceholder},({onClose:$,data:N,animate:L})=>Y.createElement(qVt,{placeholder:N,onClose:$,innerRef:E,animate:L,contextId:n,onTransitionEnd:P})),[n,P,e.placeholder,e.shouldAnimatePlaceholder,E]),I=Hn(()=>({innerRef:C,placeholder:T,droppableProps:{"data-rfd-droppable-id":s,"data-rfd-droppable-context-id":n}}),[n,s,T,C]),A=m?m.dragging.draggableId:null,k=Hn(()=>({droppableId:s,type:l,isUsingCloneFor:A}),[s,A,l]);function O(){if(!m)return null;const{dragging:$,render:N}=m,L=Y.createElement(Phe,{draggableId:$.draggableId,index:$.source.index,isClone:!0,isEnabled:!0,shouldRespectForcePress:!1,canDragInteractiveElements:!0},(j,D)=>N(j,D,$));return Nw.createPortal(L,w())}return Y.createElement(R5.Provider,{value:k},a(I,h),O())};function QVt(){return document.body||ft(),document.body}const BX={mode:"standard",type:"DEFAULT",direction:"vertical",isDropDisabled:!1,isCombineEnabled:!1,ignoreContainerClipping:!1,renderClone:null,getContainerForClone:QVt},khe=e=>{let t={...e},n;for(n in BX)e[n]===void 0&&(t={...t,[n]:BX[n]});return t},__=(e,t)=>e===t.droppable.type,zX=(e,t)=>t.draggables[e.draggable.id],XVt=()=>{const e={placeholder:null,shouldAnimatePlaceholder:!0,snapshot:{isDraggingOver:!1,draggingOverWith:null,draggingFromThisWith:null,isUsingPlaceholder:!1},useClone:null},t={...e,shouldAnimatePlaceholder:!1},n=ni(i=>({draggableId:i.id,type:i.type,source:{index:i.index,droppableId:i.droppableId}})),r=ni((i,a,s,l,c,u)=>{const d=c.descriptor.id;if(c.descriptor.droppableId===i){const h=u?{render:u,dragging:n(c.descriptor)}:null,m={isDraggingOver:s,draggingOverWith:s?d:null,draggingFromThisWith:d,isUsingPlaceholder:!0};return{placeholder:c.placeholder,shouldAnimatePlaceholder:!1,snapshot:m,useClone:h}}if(!a)return t;if(!l)return e;const p={isDraggingOver:s,draggingOverWith:d,draggingFromThisWith:null,isUsingPlaceholder:!0};return{placeholder:c.placeholder,shouldAnimatePlaceholder:!0,snapshot:p,useClone:null}});return(i,a)=>{const s=khe(a),l=s.droppableId,c=s.type,u=!s.isDropDisabled,d=s.renderClone;if(cC(i)){const f=i.critical;if(!__(c,f))return t;const p=zX(f,i.dimensions),h=bs(i.impact)===l;return r(l,u,h,h,p,d)}if(i.phase==="DROP_ANIMATING"){const f=i.completed;if(!__(c,f.critical))return t;const p=zX(f.critical,i.dimensions);return r(l,u,Che(f.result)===l,bs(f.impact)===l,p,d)}if(i.phase==="IDLE"&&i.completed&&!i.shouldFlush){const f=i.completed;if(!__(c,f.critical))return t;const p=bs(f.impact)===l,h=!!(f.impact.at&&f.impact.at.type==="COMBINE"),m=f.critical.droppable.id===l;return p?h?e:t:m?e:t}return t}},JVt={updateViewportMaxScroll:uBt},ZVt=Tpe(XVt,JVt,(e,t,n)=>({...khe(n),...e,...t}),{context:A5,areStatePropsEqual:She})(YVt);var Mhe=ZVt;const I1={weight:{edit:uSt,add:dSt,delete:fSt},"max-weight":{edit:pSt,add:hSt,delete:gSt},reps:{edit:mSt,add:ySt,delete:vSt},"max-reps":{edit:bSt,add:wSt,delete:xSt},sets:{edit:SSt,add:CSt,delete:ESt},rest:{edit:PSt,add:TSt,delete:ISt},"max-rest":{edit:OSt,add:ASt,delete:kSt},rir:{edit:Vue,add:Hue,delete:Uue}},uj=e=>{var h;const{edit:t,add:n,delete:r}=I1[e.type],o=t(e.routineId),i=n(e.routineId),a=r(e.routineId),[s,l]=v.useState(((h=e.config)==null?void 0:h.value)||""),[c,u]=v.useState(null),d=m=>{const y={slot_entry:e.slotEntryId,value:parseFloat(m)};m===""?e.config&&a.mutate(e.config.id):e.config?o.mutate({id:e.config.id,...y}):i.mutate({iteration:1,operation:vk,step:"abs",need_log_to_apply:!1,...y})},f=m=>{l(m!==""?parseFloat(m):""),c&&clearTimeout(c),u(setTimeout(()=>d(m),JFe))},p=o.isPending||i.isPending||a.isPending;return b(wt,{children:b(nn,{inputProps:{"data-testid":`${e.type}-field`},label:e.type,value:s,fullWidth:!0,variant:"standard",disabled:p,onChange:m=>f(m.target.value),InputProps:{endAdornment:p&&b(sd,{})}})})},eHt=e=>{const{add:t}=I1[e.type],n=t(e.routineId);return b(wt,{children:b(vn,{size:"small",onClick:()=>{n.mutate({slot_entry:e.slotEntryId,iteration:e.iteration,value:0,operation:vk,need_log_to_apply:!1})},disabled:n.isPending,children:b(Vo,{})})})},tHt=e=>{const{delete:t}=I1[e.type],n=t(e.routineId);return b(vn,{size:"small",onClick:()=>{n.mutate(e.configId)},disabled:n.isPending,children:b(g1,{})})},nHt=e=>{var i;const t=[{value:"+",label:"Add"},{value:"-",label:"Subtract"},{value:vk,label:"Replace"}],{edit:n}=I1[e.type],r=n(e.routineId),o=a=>{r.mutate({id:e.config.id,operation:a})};return b(wt,{children:b(nn,{sx:{width:100},select:!0,label:"Operation",value:(i=e.config)==null?void 0:i.operation,variant:"standard",disabled:r.isPending,onChange:a=>o(a.target.value),children:t.map(a=>b(en,{value:a.value,selected:a.value===e.config.operation,children:a.label},a.value))})})},rHt=e=>{var a;const{edit:t}=I1[e.type],n=t(e.routineId),[r,o]=v.useState((a=e.config)==null?void 0:a.needLogToApply),i=s=>{o(s),n.mutate({id:e.config.id,need_log_to_apply:s})};return b(Fl,{checked:r,onChange:s=>i(s.target.checked),disabled:n.isPending})},oHt=e=>{var a;const t=Vue(e.routineId),n=Uue(e.routineId),r=Hue(e.routineId),o=[{value:"",label:"-/-"},...[0,.5,1,1.5,2,2.5,3,3.5,4].map(s=>({value:s.toString(),label:s.toString()})),{value:"4.5",label:"4+"}],i=s=>{const l={value:parseFloat(s)};s===""?e.config&&n.mutate(e.config.id):e.config!==void 0?t.mutate({id:e.config.id,...l}):r.mutate({slot_entry:e.slotEntryId,iteration:1,operation:vk,need_log_to_apply:!1,...l})};return b(wt,{children:b(nn,{fullWidth:!0,select:!0,label:"RiR",variant:"standard",defaultValue:"",value:(a=e.config)==null?void 0:a.value,disabled:t.isPending,onChange:s=>i(s.target.value),children:o.map(s=>b(en,{value:s.value,children:s.label},s.value))})})},iHt=e=>{const t=MM(e.routineId),n=[{value:"normal",label:"Normal set"},{value:"dropset",label:"Drop set"},{value:"myo",label:"Myo"},{value:"partial",label:"Partial"},{value:"forced",label:"Forced"},{value:"tut",label:"TUT"},{value:"iso",label:"ISO"},{value:"jump",label:"Jump"}],r=o=>{t.mutate({id:e.slotEntry.id,type:o})};return b(wt,{children:b(nn,{fullWidth:!0,select:!0,label:"Type",variant:"standard",value:e.slotEntry.type,disabled:t.isPending,onChange:o=>r(o.target.value),children:n.map(o=>b(en,{value:o.value,children:o.label},o.value))})})},aHt=e=>{var i;const t=MM(e.routineId),n=jSt();if(n.isLoading)return b(sd,{});const r=(i=n.data)==null?void 0:i.map(a=>({value:a.id,label:a.name})),o=a=>{t.mutate({id:e.slotEntry.id,repetition_unit:parseInt(a)})};return b(wt,{children:b(nn,{fullWidth:!0,select:!0,label:"Unit",variant:"standard",value:e.slotEntry.repetitionUnitId,disabled:t.isPending,onChange:a=>o(a.target.value),children:r.map(a=>b(en,{value:a.value,children:a.label},a.value))})})},sHt=e=>{var a;const t=MM(e.routineId),n=FSt(),r=Vl();if(n.isLoading||r.isLoading)return b(sd,{});const o=(a=n.data)==null?void 0:a.map(s=>({value:s.id,label:s.name})),i=s=>{t.mutate({id:e.slotEntry.id,weight_unit:parseInt(s)})};return b(wt,{children:b(nn,{fullWidth:!0,select:!0,label:"Unit",variant:"standard",value:e.slotEntry.weightUnitId,disabled:t.isPending,onChange:s=>i(s.target.value),children:o.map(s=>b(en,{value:s.value,children:s.label},s.value))})})},Vc=(e,t,n,r)=>t.length>0?b(uj,{config:t[0],type:e,routineId:n}):b(uj,{type:e,routineId:n,slotEntryId:r}),lHt=e=>K(wt,{children:[e.slot.configs.length===0&&b(Il,{severity:"warning",children:"This set has no exercises yet."}),e.slot.configs.map(t=>b(cHt,{slotEntry:t,routineId:e.routineId,simpleMode:e.simpleMode},t.id))]}),cHt=e=>{var u;const{i18n:t}=Le(),[n,r]=v.useState(!1),o=()=>r(!n),i=Fp(),a=MM(e.routineId),s=LSt(e.routineId),l=d=>{d!==null&&(a.mutate({id:e.slotEntry.id,exercise:d.data.base_id}),r(!1))};let c;return i.isSuccess&&(c=Db(t.language,i.data)),K(Y.Fragment,{children:[K(Oe,{container:!0,spacing:1,children:[K(Oe,{size:{xs:3,sm:1},children:[b(vn,{size:"small",onClick:o,children:n?b(Dde,{}):b(NM,{})}),b(vn,{size:"small",onClick:()=>s.mutate(e.slotEntry.id),disabled:s.isPending,children:b($de,{})})]}),b(Oe,{size:{xs:9,sm:3},children:b(st,{variant:"h6",children:(u=e.slotEntry.exercise)==null?void 0:u.getTranslation(c).name})}),n&&K(Y.Fragment,{children:[b(Oe,{size:{xs:12,sm:8},children:b(XS,{callback:l})}),b(Oe,{size:{xs:12,sm:4}})]}),e.simpleMode?K(Y.Fragment,{children:[b(Oe,{size:{xs:12,sm:2},children:Vc("sets",e.slotEntry.nrOfSetsConfigs,e.routineId,e.slotEntry.id)},`sets-config-${e.slotEntry.id}`),b(Oe,{size:{xs:12,sm:3},children:Vc("weight",e.slotEntry.weightConfigs,e.routineId,e.slotEntry.id)},`weight-config-${e.slotEntry.id}`),b(Oe,{size:{xs:12,sm:3},children:Vc("reps",e.slotEntry.repsConfigs,e.routineId,e.slotEntry.id)},`reps-config-${e.slotEntry.id}`)]}):K(Y.Fragment,{children:[b(Oe,{size:{xs:6,sm:2},children:b(iHt,{routineId:e.routineId,slotEntry:e.slotEntry})},`slot-config-type-${e.slotEntry.id}`),b(Oe,{size:{xs:6,sm:2},children:Vc("sets",e.slotEntry.nrOfSetsConfigs,e.routineId,e.slotEntry.id)},`sets-config-${e.slotEntry.id}`),b(Oe,{size:{xs:6,sm:1},children:Vc("rest",e.slotEntry.restTimeConfigs,e.routineId,e.slotEntry.id)},`rest-config-${e.slotEntry.id}`),b(Oe,{size:{xs:6,sm:1},children:Vc("max-rest",e.slotEntry.maxRestTimeConfigs,e.routineId,e.slotEntry.id)},`max-rest-config-${e.slotEntry.id}`),b(Oe,{size:{xs:12,sm:2},children:b(oHt,{routineId:e.routineId,config:e.slotEntry.rirConfigs.length>0?e.slotEntry.rirConfigs[0]:void 0,slotEntryId:e.slotEntry.id})},`rir-config-${e.slotEntry.id}`),b(Oe,{size:{xs:12,sm:4}}),b(Oe,{size:{xs:12,sm:2},children:b(aHt,{slotEntry:e.slotEntry,routineId:e.routineId})},`slot-config-rep-unit-${e.slotEntry.id}`),b(Oe,{size:{xs:6,sm:1},children:Vc("reps",e.slotEntry.repsConfigs,e.routineId,e.slotEntry.id)},`reps-config-${e.slotEntry.id}`),b(Oe,{size:{xs:6,sm:1},children:Vc("max-reps",e.slotEntry.maxRepsConfigs,e.routineId,e.slotEntry.id)},`max-reps-config-${e.slotEntry.id}`),b(Oe,{size:{xs:12,sm:2},children:b(sHt,{slotEntry:e.slotEntry,routineId:e.routineId})},`slot-config-weight-unit-${e.slotEntry.id}`),b(Oe,{size:{xs:6,sm:1},children:Vc("weight",e.slotEntry.weightConfigs,e.routineId,e.slotEntry.id)},`weight-config-${e.slotEntry.id}`),b(Oe,{size:{xs:6,sm:1},children:Vc("max-weight",e.slotEntry.maxWeightConfigs,e.routineId,e.slotEntry.id)},`max-weight-config-${e.slotEntry.id}`)]})]}),b(on,{height:10})]})};function uHt(e){return nt("MuiLoadingButton",e)}const Uu=it("MuiLoadingButton",["root","label","loading","loadingIndicator","loadingIndicatorCenter","loadingIndicatorStart","loadingIndicatorEnd","endIconLoadingEnd","startIconLoadingStart"]),dHt=e=>{const{loading:t,loadingPosition:n,classes:r}=e,o={root:["root",t&&"loading"],label:["label"],startIcon:[t&&`startIconLoading${Ce(n)}`],endIcon:[t&&`endIconLoading${Ce(n)}`],loadingIndicator:["loadingIndicator",t&&`loadingIndicator${Ce(n)}`]},i=rt(o,uHt,r);return{...r,...i}},fHt=e=>e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"&&e!=="classes",pHt=oe(dt,{shouldForwardProp:e=>fHt(e)||e==="classes",name:"MuiLoadingButton",slot:"Root",overridesResolver:(e,t)=>[t.root,t.startIconLoadingStart&&{[`& .${Uu.startIconLoadingStart}`]:t.startIconLoadingStart},t.endIconLoadingEnd&&{[`& .${Uu.endIconLoadingEnd}`]:t.endIconLoadingEnd}]})(Je(({theme:e})=>({display:"inline-flex",[`& .${Uu.startIconLoadingStart}, & .${Uu.endIconLoadingEnd}`]:{transition:e.transitions.create(["opacity"],{duration:e.transitions.duration.short}),opacity:0},variants:[{props:{loadingPosition:"center"},style:{transition:e.transitions.create(["background-color","box-shadow","border-color"],{duration:e.transitions.duration.short}),[`&.${Uu.loading}`]:{color:"transparent"}}},{props:({ownerState:t})=>t.loadingPosition==="start"&&t.fullWidth,style:{[`& .${Uu.startIconLoadingStart}, & .${Uu.endIconLoadingEnd}`]:{transition:e.transitions.create(["opacity"],{duration:e.transitions.duration.short}),opacity:0,marginRight:-8}}},{props:({ownerState:t})=>t.loadingPosition==="end"&&t.fullWidth,style:{[`& .${Uu.startIconLoadingStart}, & .${Uu.endIconLoadingEnd}`]:{transition:e.transitions.create(["opacity"],{duration:e.transitions.duration.short}),opacity:0,marginLeft:-8}}}]}))),hHt=oe("span",{name:"MuiLoadingButton",slot:"LoadingIndicator",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.loadingIndicator,t[`loadingIndicator${Ce(n.loadingPosition)}`]]}})(Je(({theme:e})=>({position:"absolute",visibility:"visible",display:"flex",variants:[{props:{loadingPosition:"start",size:"small"},style:{left:10}},{props:({loadingPosition:t,ownerState:n})=>t==="start"&&n.size!=="small",style:{left:14}},{props:{variant:"text",loadingPosition:"start"},style:{left:6}},{props:{loadingPosition:"center"},style:{left:"50%",transform:"translate(-50%)",color:(e.vars||e).palette.action.disabled}},{props:{loadingPosition:"end",size:"small"},style:{right:10}},{props:({loadingPosition:t,ownerState:n})=>t==="end"&&n.size!=="small",style:{right:14}},{props:{variant:"text",loadingPosition:"end"},style:{right:6}},{props:({ownerState:t})=>t.loadingPosition==="start"&&t.fullWidth,style:{position:"relative",left:-10}},{props:({ownerState:t})=>t.loadingPosition==="end"&&t.fullWidth,style:{position:"relative",right:-10}}]}))),VX=oe("span",{name:"MuiLoadingButton",slot:"Label",overridesResolver:(e,t)=>[t.label]})({display:"inherit",alignItems:"inherit",justifyContent:"inherit"}),gHt=v.forwardRef(function(t,n){const r=v.useContext(KB),o=sg(r,t),i=at({props:o,name:"MuiLoadingButton"}),{children:a,disabled:s=!1,id:l,loading:c=!1,loadingIndicator:u,loadingPosition:d="center",variant:f="text",...p}=i,h=np(l),m=u??R.jsx(ok,{"aria-labelledby":h,color:"inherit",size:16}),y={...i,disabled:s,loading:c,loadingIndicator:m,loadingPosition:d,variant:f},w=dHt(y),x=c?R.jsx(hHt,{className:w.loadingIndicator,ownerState:y,children:m}):null;return R.jsxs(pHt,{disabled:s||c,id:h,ref:n,...p,variant:f,classes:w,ownerState:y,children:[y.loadingPosition==="end"?R.jsx(VX,{className:w.label,children:a}):x,y.loadingPosition==="end"?x:R.jsx(VX,{className:w.label,children:a})]})});function GO(e){const[t,n]=$s(e.fieldName);return b(nn,{fullWidth:!0,id:e.fieldName,label:e.title,variant:"standard",error:n.touched&&!!n.error,helperText:n.touched&&n.error,...t,...e.fieldProps})}const mHt=e=>{const[t,n]=Le(),r=MSt(e.routineId),[o,i]=v.useState(!1),[a,s]=v.useState(e.day.isRest),l=()=>i(!0),c=()=>i(!1),u=()=>{m({isRest:!a}),s(!a),i(!1)},d=3,f=20,p=1e3,h=za().shape({name:La().max(f,t("forms.maxLength",{chars:f})).min(d,t("forms.minLength",{chars:d})).required("Name is required"),description:La().max(p,t("forms.maxLength",{chars:p})),isRest:OM()}),m=y=>r.mutate({id:e.day.id,routine:e.routineId,...y.name!==void 0&&{name:y.name},...y.description!==void 0&&{description:y.description},...y.isRest!==void 0&&{is_rest:y.isRest}});return b(wt,{children:b(Ba,{initialValues:{name:e.day.name,description:e.day.description,isRest:e.day.isRest},validationSchema:h,onSubmit:(y,{setSubmitting:w})=>{m(y),w(!1)},initialTouched:{name:!0,description:!0,isRest:!0},children:y=>K(fa,{children:[K(Oe,{container:!0,spacing:2,children:[b(Oe,{size:{xs:12,sm:10},children:b(GO,{fieldName:"name",title:"Name",fieldProps:{disabled:a}})}),b(Oe,{size:{xs:12,sm:2},children:b(Td,{control:b(Fl,{checked:a,onChange:l}),label:"rest day"})}),b(Oe,{size:12,children:b(GO,{fieldName:"description",title:"Description",fieldProps:{multiline:!0,rows:4,disabled:a}})}),b(Oe,{size:12,children:r.isPending?b(gHt,{loading:!0,variant:"contained",color:"primary",children:"Save"}):b(dt,{variant:"contained",color:"primary",type:"submit",disabled:a,children:"Save"})})]}),K(ik,{open:o,onClose:c,children:[b(XB,{children:"Confirm Rest Day Change"}),K(nS,{children:["Are you sure you want to change this day to a ",a?"non-rest":"rest"," day?"]}),b(nS,{children:"A rest day has no exercises associated with it. Any entries will be deleted, etc. etc."}),K(ak,{children:[b(dt,{onClick:c,children:"Cancel"}),b(dt,{onClick:u,children:"Confirm"})]})]})]})})})};function yHt(e,t,n){var r=this,o=v.useRef(null),i=v.useRef(0),a=v.useRef(null),s=v.useRef([]),l=v.useRef(),c=v.useRef(),u=v.useRef(e),d=v.useRef(!0);u.current=e;var f=typeof window<"u",p=!t&&t!==0&&f;if(typeof e!="function")throw new TypeError("Expected a function");t=+t||0;var h=!!(n=n||{}).leading,m=!("trailing"in n)||!!n.trailing,y="maxWait"in n,w="debounceOnServer"in n&&!!n.debounceOnServer,x=y?Math.max(+n.maxWait||0,t):null;v.useEffect(function(){return d.current=!0,function(){d.current=!1}},[]);var C=v.useMemo(function(){var E=function(O){var $=s.current,N=l.current;return s.current=l.current=null,i.current=O,c.current=u.current.apply(N,$)},P=function(O,$){p&&cancelAnimationFrame(a.current),a.current=p?requestAnimationFrame(O):setTimeout(O,$)},T=function(O){if(!d.current)return!1;var $=O-o.current;return!o.current||$>=t||$<0||y&&O-i.current>=x},I=function(O){return a.current=null,m&&s.current?E(O):(s.current=l.current=null,c.current)},A=function O(){var $=Date.now();if(T($))return I($);if(d.current){var N=t-($-o.current),L=y?Math.min(N,x-($-i.current)):N;P(O,L)}},k=function(){if(f||w){var O=Date.now(),$=T(O);if(s.current=[].slice.call(arguments),l.current=r,o.current=O,$){if(!a.current&&d.current)return i.current=o.current,P(A,t),h?E(o.current):c.current;if(y)return P(A,t),E(o.current)}return a.current||P(A,t),c.current}};return k.cancel=function(){a.current&&(p?cancelAnimationFrame(a.current):clearTimeout(a.current)),i.current=0,s.current=o.current=l.current=a.current=null},k.isPending=function(){return!!a.current},k.flush=function(){return a.current?I(Date.now()):c.current},k},[h,y,t,x,m,p,f,w]);return C}function vHt(e,t){return e===t}function bHt(e,t,n){var r=vHt,o=v.useRef(e),i=v.useState({})[1],a=yHt(v.useCallback(function(l){o.current=l,i({})},[i]),t,n),s=v.useRef(e);return r(s.current,e)||(a(e),s.current=e),[o.current,a]}const wHt=e=>{const t=zSt(e.routineId),[n,r]=v.useState(e.slot.comment),[o]=bHt(n,500),[i,a]=v.useState(!1),s=c=>{a(!0),r(c)},l=()=>{i&&(t.mutate({id:e.slot.id,comment:o}),a(!1))};return b(wt,{children:b(nn,{label:"Comment",variant:"standard",fullWidth:!0,size:"small",value:n,disabled:t.isPending,onChange:c=>s(c.target.value),onBlur:l,InputProps:{endAdornment:t.isPending&&b(sd,{})}})})},xHt=e=>{const{t}=Le(),n=Qg(e.routineId),r=RSt(e.routineId),o=$St(e.routineId),i=u=>{if(!u.destination)return;const d=Array.from(n.data.days),[f]=d.splice(u.source.index,1);d.splice(u.destination.index,0,f),n.data.days=d,r.mutate(d.map((p,h)=>({id:p.id,order:h+1})))},a=8,s=(u,d)=>({padding:a,margin:`0 0 ${a}px 0`,...d}),l=u=>({background:u?"lightblue":void 0,display:"flex",padding:a,overflow:"auto"});return K(Oe,{spacing:3,container:!0,direction:"row",children:[b(xhe,{onDragEnd:i,children:b(Mhe,{droppableId:"dayDroppable",direction:"horizontal",children:(u,d)=>K("div",{...u.droppableProps,ref:u.innerRef,style:l(d.isDraggingOver),children:[n.data.days.map((f,p)=>b(The,{draggableId:f.id.toString(),index:p,children:(h,m)=>b("div",{ref:h.innerRef,...h.draggableProps,...h.dragHandleProps,style:s(m.isDragging,h.draggableProps.style??{}),children:b(SHt,{day:f,routineId:e.routineId,setSelected:e.setSelectedDay,isSelected:e.selectedDay===f.id},`card-${f.id}`)})},f.id)),u.placeholder]})})}),b(Oe,{size:{xs:12,sm:6,md:3},children:b(bo,{children:b(Rne,{sx:{minHeight:175},onClick:()=>{const u={routine:e.routineId,name:t("routines.newDay"),order:n.data.days.length+1,is_rest:!1};o.mutate(u)},children:K(_i,{children:[t("routines.addDay"),b("br",{}),o.isPending?b(sd,{}):b(Vo,{})]})})})})]})},SHt=e=>{const t=Ro(),r={backgroundColor:e.isSelected?t.palette.info.light:e.day.isRest?t.palette.action.disabled:"",aspectRatio:"4 / 3",minHeight:175,maxWidth:200},[o]=Le(),i=DSt(e.routineId),[a,s]=v.useState(!1),l=()=>{e.isSelected?e.setSelected(null):e.setSelected(e.day.id)},c=()=>s(!0),u=()=>{e.setSelected(null),i.mutate(e.day.id),s(!1)},d=()=>s(!1);return K(Y.Fragment,{children:[K(bo,{sx:r,children:[b(Su,{title:e.day.isRest?o("routines.restDay"):e.day.name}),b(_i,{children:b(st,{sx:{mb:1.5},color:"text.secondary",children:e.day.isRest&&b(ITt,{})})}),K(Ms,{children:[b(vn,{onClick:l,children:e.isSelected?b(Dde,{}):b(NM,{})}),b(vn,{onClick:c,children:i.isPending?b(sd,{}):b(g1,{})})]})]}),K(ik,{open:a,onClose:d,children:[b(XB,{children:"Confirm Delete"}),b(nS,{children:"Are you sure you want to delete this day? This action cannot be undone."}),K(ak,{children:[b(dt,{onClick:d,children:"Cancel"}),b(dt,{onClick:u,color:"error",children:"Delete"})]})]})]})},CHt=e=>{const[t,n]=Le(),r=HSt(e.routineId),o=NSt(e.routineId),i=BSt(e.routineId),a=VSt(e.routineId),s=Vl(),l=Ro(),[c,u]=v.useState(!1),[d,f]=v.useState(null),[p,h]=v.useState(null),[m,y]=v.useState(!0),w=(k,O)=>{p!==null&&(O==="timeout"?(r.mutate(p.id),h(null)):O!=="clickaway"&&(e.day.slots=[...e.day.slots,p].sort(($,N)=>$.order-N.order),h(null))),u(!1)},x=k=>{const O=e.day.slots.findIndex($=>$.id===k);if(O!==-1){const $=[...e.day.slots],[N]=$.splice(O,1);e.day.slots=$,h(N),u(!0)}},C=k=>{if(e.day.slots.find($=>$.id===k)===void 0){console.info(`Could not find slot with id ${k} to add config`);return}f(d===k?null:k)},E=()=>i.mutate({day:e.day.id,order:e.day.slots.length+1}),P=8,T=k=>{if(!k.destination)return;const O=Array.from(e.day.slots),[$]=O.splice(k.source.index,1);O.splice(k.destination.index,0,$),a.mutate(O.map((N,L)=>({id:N.id,order:L+1}))),e.day.slots=O},I=k=>({background:k?"lightblue":void 0}),A=(k,O)=>({border:k?`2px solid ${l.palette.grey[900]}`:`1px solid ${l.palette.grey[300]}`,backgroundColor:"white",marginBottom:P,...O});return K(wt,{children:[b(st,{variant:"h4",children:e.day.name}),b(on,{height:30}),b(mHt,{routineId:e.routineId,day:e.day},`day-form-${e.day.id}`),b(on,{height:40}),b(Td,{control:b(Fl,{checked:m,onChange:()=>y(!m)}),label:t("routines.simpleMode")}),b(on,{height:20}),b(xhe,{onDragEnd:T,children:b(Mhe,{droppableId:"setDroppable",direction:"vertical",children:(k,O)=>b("div",{...k.droppableProps,ref:k.innerRef,style:I(O.isDraggingOver),children:e.day.slots.map(($,N)=>K(Y.Fragment,{children:[b(The,{draggableId:$.id.toString(),index:N,children:(L,j)=>K(Oe,{container:!0,spacing:1,ref:L.innerRef,...L.draggableProps,style:A(j.isDragging,L.draggableProps.style??{}),children:[b(Oe,{sx:{backgroundColor:l.palette.grey[100]},size:12,children:K(Oe,{container:!0,justifyContent:"space-between",alignItems:"center",children:[b(Oe,{children:K(st,{variant:"h5",children:[e.day.slots.length>1&&b(vn,{onClick:()=>x($.id),...L.dragHandleProps,children:b(PTt,{})}),b(vn,{onClick:()=>x($.id),children:b(g1,{})}),"Set ",N+1]})}),b(Oe,{children:$.configs.length>0&&K(aN,{variant:"outlined",children:[b(dt,{onClick:()=>C($.id),size:"small",disabled:o.isPending,startIcon:o.isPending?b(sd,{}):b(Vo,{}),children:t("routines.addSuperset")}),$.configs.length>0&&b(dt,{startIcon:b(_Tt,{}),component:Da,size:"small",to:Fn(_n.ROUTINE_EDIT_PROGRESSION,n.language,{id:e.routineId,id2:$.id}),children:t("routines.editProgression")})]})})]})}),!m&&K(Oe,{size:12,children:[b(wHt,{routineId:e.routineId,slot:$},`slot-form-${$.id}`),b(on,{height:10})]}),b(Oe,{size:12,children:b(lHt,{slot:$,routineId:e.routineId,simpleMode:m})}),d===$.id&&K(Oe,{size:12,children:[b(on,{height:20}),b(XS,{callback:D=>{D!==null&&(o.mutate({slot:$.id,exercise:D.data.base_id,type:"normal",order:$.configs.length+1,weight_unit:s.data.useMetric?kre:Mre}),f(null))}})]}),b(Oe,{size:12,children:$.configs.length===0&&b(aN,{children:b(dt,{onClick:()=>C($.id),size:"small",disabled:o.isPending,startIcon:o.isPending?b(sd,{}):b(Vo,{}),children:t("routines.addExercise")})})})]})},$.id),b(on,{height:0,children:k.placeholder})]},`slot-${$.id}-${N}`))})})}),b(nz,{open:c,autoHideDuration:pz,onClose:w,children:b(Il,{severity:"success",variant:"filled",sx:{width:"100%"},action:b(dt,{color:"warning",variant:"contained",size:"small",onClick:w,children:t("undo")}),children:"Set successfully deleted"})}),b(dt,{variant:"contained",color:"primary",startIcon:i.isPending?b(sd,{}):b(Vo,{}),onClick:E,children:t("routines.addSet")})]})},Rhe=({routine:e,closeFn:t})=>{const[n,r]=Le(),o=lSt(),i=cSt(e==null?void 0:e.id),[a,s]=v.useState(e?yt.fromJSDate(e.start):yt.now()),[l,c]=v.useState(e?yt.fromJSDate(e.end):yt.now().plus({weeks:LFe})),u=3,d=25,f=1e3,p=za({name:La().required().max(d,n("forms.maxLength",{chars:d})).min(u,n("forms.minLength",{chars:u})),description:La().max(f,n("forms.maxLength",{chars:f})),start:Eg().required(),end:Eg().required().min(Fxt("start"),n("forms.endBeforeStart")).test("hasMinimumDuration",n("routines.minLengthRoutine",{number:CG}),function(h){const m=this.parent.start;if(m&&h){const y=yt.fromJSDate(m);return yt.fromJSDate(h).diff(y,"weeks").weeks>=CG}return!0}).test("hasMaximumDuration",n("routines.maxLengthRoutine",{number:EG}),function(h){const m=this.parent.start;if(m&&h){const y=yt.fromJSDate(m);return yt.fromJSDate(h).diff(y,"weeks").weeks<=EG}return!0}),fitInWeek:OM()});return b(Ba,{initialValues:{name:e?e.name:"",description:e?e.description:"",start:a,end:l,fitInWeek:e?e.fitInWeek:!1},validationSchema:p,onSubmit:async h=>{var m,y,w,x;e?i.mutate({...h,fit_in_week:h.fitInWeek,start:(m=h.start)==null?void 0:m.toISODate(),end:(y=h.end)==null?void 0:y.toISODate(),id:e.id}):o.mutate({...h,fit_in_week:h.fitInWeek,start:(w=h.start)==null?void 0:w.toISODate(),end:(x=h.end)==null?void 0:x.toISODate()}),t&&t()},children:h=>b(fa,{children:K(Oe,{container:!0,spacing:2,children:[b(Oe,{size:{xs:12,sm:6},children:b(GO,{fieldName:"name",title:n("name")})}),b(Oe,{size:{xs:6,sm:3},children:b(xg,{dateAdapter:lb,adapterLocale:r.language,children:b(hO,{defaultValue:yt.now(),label:n("start"),value:a,onChange:m=>{m&&h.setFieldValue("start",m),s(m)},slotProps:{textField:{variant:"standard",fullWidth:!0,error:h.touched.start&&!!h.errors.start,helperText:h.touched.start&&h.errors.start}}})})}),b(Oe,{size:{xs:6,sm:3},children:b(xg,{dateAdapter:lb,adapterLocale:r.language,children:b(hO,{defaultValue:yt.now(),label:n("end"),value:l,onChange:m=>{m&&h.setFieldValue("end",m),c(m)},slotProps:{textField:{variant:"standard",fullWidth:!0,error:h.touched.end&&!!h.errors.end,helperText:h.touched.end&&h.errors.end}}})})}),b(Oe,{size:12,children:b(GO,{fieldName:"description",title:n("description"),fieldProps:{multiline:!0,rows:4}})}),b(Oe,{size:12,children:b(Td,{control:b(Fl,{checked:h.values.fitInWeek,...h.getFieldProps("fitInWeek")}),label:"Fit days in week."})}),b(Oe,{size:12,children:b(dt,{disabled:h.isSubmitting,color:"primary",variant:"contained",type:"submit",sx:{mt:2},children:n("submit")})})]})})})},EHt=()=>{var s;const{t:e,i18n:t}=Le(),n=_c(),r=n.routineId?parseInt(n.routineId):0,o=Qg(r),[i,a]=v.useState(null);return o.isLoading?b(ho,{}):b(wt,{children:K(Ac,{maxWidth:"lg",children:[K(Oe,{container:!0,children:[b(Oe,{size:10,children:b(st,{variant:"h4",children:e("editName",{name:(s=o.data)==null?void 0:s.name})})}),b(Oe,{size:2,children:b(dt,{component:Da,variant:"outlined",size:"small",to:Fn(_n.ROUTINE_DETAIL,t.language,{id:r}),children:e("routines.backToRoutine")})}),b(Oe,{size:12,children:b(Rhe,{routine:o.data})}),K(Oe,{size:12,children:[b(on,{height:20}),b(xHt,{routineId:r,selectedDay:i,setSelectedDay:a})]}),b(Oe,{size:12,children:i!==null&&b(CHt,{day:o.data.days.find(l=>l.id===i),routineId:r})})]}),K(Wt,{spacing:2,sx:{mt:2},children:[b(st,{variant:"h4",children:e("routines.resultingRoutine")}),K(on,{padding:4,children:[b(ype,{}),b(HCt,{})]})]})]})})},yh=e=>b(Y.Fragment,{children:K(Oe,{size:{md:12,lg:6},children:[b(st,{variant:"h6",gutterBottom:!0,children:e.type}),K(Ml,{size:"small",children:[b(Cu,{children:K(Ht,{children:[b(Ie,{}),b(Ie,{}),b(Ie,{children:"Value"}),b(Ie,{children:"Operation"}),b(Ie,{children:"Require logs"})]})}),b(Rl,{children:e.iterations.map(t=>{const n=e.slotEntry[e.objectKey].find(r=>r.iteration===t);return K(Ht,{children:[K(Ie,{children:["workout #",t]}),b(Ie,{children:n?b(tHt,{configId:n.id,routineId:e.routineId,type:e.type}):b(eHt,{type:e.type,routineId:e.routineId,slotEntryId:e.slotEntry.id,iteration:t})}),b(Ie,{children:n&&b(uj,{config:n,type:e.type,routineId:e.routineId,slotEntryId:e.slotEntry.id})}),b(Ie,{children:n&&b(nHt,{config:n,type:e.type,routineId:e.routineId,slotEntryId:e.slotEntry.id})}),b(Ie,{children:n&&b(rHt,{config:n,type:e.type,routineId:e.routineId,slotEntryId:e.slotEntry.id})})]},t)})})]})]})}),PHt=()=>{const{i18n:e}=Le(),t=_c(),n=t.routineId?parseInt(t.routineId):-1,r=t.slotId?parseInt(t.slotId):-1,o=Qg(n),i=Fp();if(o.isLoading)return b(ho,{});const a=o.data;let s;i.isSuccess&&(s=Db(e.language,i.data));let l=null;for(const u of a.days){const d=u.slots.find(f=>f.id===r);if(d){l=d;break}}if(l===null)return b("p",{children:"Slot not found!"});const c=Object.keys(a.groupedDayDataByIteration).map(Number);return b(wt,{children:K(Ac,{maxWidth:"lg",children:[" ",K(Oe,{container:!0,children:[b(Oe,{size:10,children:K(st,{variant:"h4",children:["Edit progression for slot #",r]})}),b(Oe,{size:2,children:b(dt,{component:Da,variant:"outlined",size:"small",to:Fn(_n.ROUTINE_EDIT,e.language,{id:n}),children:"back to routine edit"})})]}),b(on,{height:30}),l.configs.map(u=>{var d;return K(Y.Fragment,{children:[b(st,{variant:"h5",gutterBottom:!0,children:(d=u.exercise)==null?void 0:d.getTranslation(s).name}),K(Oe,{container:!0,spacing:2,children:[b(yh,{objectKey:"weightConfigs",type:"weight",routineId:n,slotEntry:u,iterations:c}),b(yh,{objectKey:"maxWeightConfigs",type:"max-weight",routineId:n,slotEntry:u,iterations:c}),b(yh,{objectKey:"repsConfigs",type:"reps",routineId:n,slotEntry:u,iterations:c}),b(yh,{objectKey:"maxRepsConfigs",type:"max-reps",routineId:n,slotEntry:u,iterations:c}),b(yh,{objectKey:"nrOfSetsConfigs",type:"sets",routineId:n,slotEntry:u,iterations:c}),b(yh,{objectKey:"restTimeConfigs",type:"rest",routineId:n,slotEntry:u,iterations:c}),b(yh,{objectKey:"maxRestTimeConfigs",type:"max-rest",routineId:n,slotEntry:u,iterations:c})]})]},u.id)})]})})},THt=e=>{var u;const[t,n]=Le(),[r,o]=Y.useState(null),i=!!r,a=d=>{o(d.currentTarget)},s=()=>{o(null)},l=()=>window.location.href=Fn(_n.ROUTINE_EDIT_LOG,n.language,{id:e.log.id}),c=()=>window.location.href=Fn(_n.ROUTINE_DELETE_LOG,n.language,{id:e.log.id});return K(Ht,{children:[b(Ie,{component:"th",scope:"row",children:yt.fromJSDate(e.log.date).toLocaleString(yt.DATE_MED)}),b(Ie,{children:e.log.reps}),K(Ie,{children:[e.log.weight,(u=e.log.weightUnitObj)==null?void 0:u.name]}),b(Ie,{children:e.log.rirString}),K(Ie,{children:[b(vn,{"aria-label":"settings",onClick:a,children:b(jH,{fontSize:"small"})}),K(Rs,{id:"basic-menu",anchorEl:r,open:i,onClose:s,MenuListProps:{"aria-labelledby":"basic-button"},children:[K(en,{onClick:l,children:[b(NM,{}),t("edit")]}),K(en,{onClick:c,children:[b(g1,{}),t("delete")]})]})]})]},e.log.id)},IHt=e=>{let t=e.logEntries??[];const n=[5,10,20],[r,o]=Y.useState(n[0]),[i,a]=Y.useState(0),s=(c,u)=>{a(u)},l=c=>{o(parseInt(c.target.value,10)),a(0)};return K(wt,{children:[b(st,{variant:"h6",sx:{mt:4},children:e.exercise.getTranslation().name}),K(Oe,{container:!0,spacing:2,children:[b(Oe,{size:{xs:12,md:5},children:K(Mc,{children:[K(Ml,{"aria-label":"simple table",size:"small",children:[b(Cu,{children:K(Ht,{children:[b(Ie,{children:"Date"}),b(Ie,{children:"Reps"}),b(Ie,{children:"Weight"}),b(Ie,{children:"RiR"}),b(Ie,{})]})}),b(Rl,{children:t.slice(i*r,i*r+r).map(c=>b(THt,{log:c},c.id))})]}),b(rz,{rowsPerPageOptions:n,component:"div",count:t.length,rowsPerPage:r,page:i,onPageChange:s,onRowsPerPageChange:l})]})}),b(Oe,{size:{xs:12,md:7},children:b(kHt,{data:t},e.exercise.id)})]})]})},HX=()=>{const e=_c(),t=e.routineId?parseInt(e.routineId):0,[n,r]=Le(),o=_St(t,!1),i=Qg(t),a=l=>window.location.href=Fn(_n.ROUTINE_ADD_LOG,r.language,{id:l});let s=new Map;return o.isSuccess&&(s=o.data.reduce(function(l,c){return l.set(c.exerciseId,l.get(c.exerciseId)||[]),[kre,Mre].includes(c.weightUnitId)&&c.repetitionUnitId===FFe&&l.get(c.exerciseId).push(c),l},new Map)),b(wt,{children:K(Ac,{maxWidth:"lg",children:[b(st,{variant:"h4",children:n("routines.logsHeader")}),b(st,{variant:"body1",children:n("routines.logsFilterNote")}),o.isSuccess&&i.isSuccess?b(wt,{children:i.data.dayDataCurrentIteration.map((l,c)=>{var u;return K(Y.Fragment,{children:[K(Wt,{direction:{xs:"column",sm:"row"},justifyContent:"space-between",alignItems:"center",sx:{mt:4},children:[b(st,{variant:"h4",children:(u=l.day)==null?void 0:u.name}),b(dt,{variant:"contained",onClick:()=>{var d;return a((d=l.day)==null?void 0:d.id)},children:n("routines.addLogToDay")})]}),l.slots.map(d=>d.exercises.map(f=>b(IHt,{exercise:f,logEntries:s.get(f.id)},f.id)))]},c)})}):b(ho,{})]})})},OHt=e=>e.map(t=>({id:t.id,value:t.weight,time:t.date.getTime(),entry:t})),AHt=({active:e,payload:t,label:n})=>{var r,o,i;if(e){let a="";return(r=t==null?void 0:t[1].payload)!=null&&r.entry.rir&&(a=`, ${(o=t==null?void 0:t[1].payload)==null?void 0:o.entry.rir} RiR`),b(bo,{children:K(_i,{children:[b(st,{variant:"body1",children:yt.fromMillis(t==null?void 0:t[0].value).toLocaleString(yt.DATE_MED)}),K(st,{variant:"body2",children:[(i=t==null?void 0:t[1].payload)==null?void 0:i.entry.reps," × ",t==null?void 0:t[1].value,t==null?void 0:t[1].unit,a]})]})})}return null},kHt=e=>{let t;t=e.data.reduce(function(r,o){return r.set(o.reps,r.get(o.reps)||[]),r.get(o.reps).push(o),r},new Map);const n=XM(t.size);return b(on,{children:b(Mp,{width:"100%",height:250,children:K(Rct,{children:[b(Bl,{dataKey:"time",domain:["auto","auto"],name:"Time",tickFormatter:r=>yt.fromMillis(r).toLocaleString(yt.DATE_MED),type:"number"}),b(zl,{domain:["auto","auto"],dataKey:"value",name:"Value",unit:"kg"}),Array.from(t).map(([r,o])=>{const i=n.next().value,a=OHt(o);return b(ZC,{data:a,fill:i,line:{stroke:i},lineType:"joint",lineJointType:"monotoneX",name:r.toString()},r)}),b(is,{content:b(AHt,{})}),b(Bg,{strokeDasharray:"3 3"}),b(cd,{})]})})})},MHt=()=>{const[e]=Le(),[t,n]=Y.useState(!1),r=()=>n(!0),o=()=>n(!1);return K("div",{children:[b(Dg,{color:"secondary","aria-label":"add",onClick:r,sx:{position:"fixed",bottom:"5rem",right:i=>i.spacing(2),zIndex:9},children:b(Vo,{})}),b(Fi,{title:e("add"),isOpen:t,closeFn:o,children:b(Rhe,{closeFn:o})})]})},RHt=e=>{const[t,n]=Le(),r=Fn(_n.ROUTINE_DETAIL,n.language,{id:e.routine.id});return K(wt,{children:[b(Ps,{sx:{p:0},children:K(Ep,{component:"a",href:r,children:[b(Ao,{primary:e.routine.name!==""?e.routine.name:t("routines.routine"),secondary:`${e.routine.start.toLocaleDateString()} - ${e.routine.end.toLocaleDateString()}`}),b(Rde,{})]})}),b(kl,{component:"li"})]})},UX=()=>{const e=aSt(),[t]=Le();return b(Ld,{title:t("routines.routines"),mainContent:e.isLoading?b(ho,{}):b(to,{children:b(Ll,{sx:{py:0},children:e.data.map(n=>b(RHt,{routine:n},n.id))},"abc")}),fab:b(MHt,{})})},N_=()=>b(KTt,{}),$5=()=>K($Ct,{children:[K(Bt,{path:"/:lang",children:[K(Bt,{path:"workout",children:[b(Bt,{path:"overview",element:b(_It,{})}),b(Bt,{path:"schedule",element:b(NIt,{})}),b(Bt,{path:"calendar",children:b(Bt,{path:"user",element:b(fIt,{})})}),b(Bt,{path:"gallery",element:b(gIt,{})}),K(Bt,{path:"template",children:[b(Bt,{path:"overview",element:b(xIt,{})}),b(Bt,{path:"public",element:b(bIt,{})})]})]}),K(Bt,{path:"routine",children:[b(Bt,{index:!0,element:b(UX,{})}),b(Bt,{path:"overview",element:b(UX,{})}),K(Bt,{path:":routineId",children:[b(Bt,{path:"view",element:b(MLt,{})}),K(Bt,{path:"edit",children:[b(Bt,{index:!0,element:b(EHt,{})}),b(Bt,{path:"progression/:slotId",element:b(PHt,{})})]}),b(Bt,{path:"table",element:b(ype,{})})]}),b(Bt,{path:"log",children:b(Bt,{path:":routineId",element:b(HX,{}),children:b(Bt,{path:"view",element:b(HX,{})})})})]}),K(Bt,{path:"measurement",children:[b(Bt,{index:!0,element:b(ZQ,{})}),b(Bt,{path:"overview",element:b(ZQ,{})}),b(Bt,{path:"category/:categoryId",element:b(dLt,{})})]}),K(Bt,{path:"exercise",children:[b(Bt,{index:!0,element:b(UY,{})}),b(Bt,{path:"overview",element:b(UY,{})}),b(Bt,{path:":baseID",element:b(N_,{}),children:b(Bt,{path:"view-base",element:b(N_,{}),children:b(Bt,{path:":slug",element:b(N_,{})})})}),b(Bt,{path:"contribute",element:b(uIt,{})})]}),K(Bt,{path:"weight",children:[b(Bt,{path:"overview",element:b(Fde,{})}),b(Bt,{path:"add",element:b(dIt,{})})]}),K(Bt,{path:"nutrition",children:[b(Bt,{path:"overview",element:b(ILt,{})}),K(Bt,{path:":planId",children:[b(Bt,{path:"view",element:b(TLt,{})}),b(Bt,{path:":date",element:b(eX,{})}),b(Bt,{path:"diary",element:b(eX,{})})]}),K(Bt,{path:"calculator",children:[b(Bt,{path:"bmi",element:b(pLt,{})}),b(Bt,{path:"calories",element:b(pIt,{})})]}),b(Bt,{path:"ingredient",children:b(Bt,{path:"overview",element:b(mIt,{})})})]}),K(Bt,{path:"software",children:[b(Bt,{path:"about-us",element:b(iPt,{})}),b(Bt,{path:"api",element:b(wIt,{})}),b(Bt,{path:"equipment",element:b(hIt,{})})]}),b(Bt,{path:"login",element:b(yIt,{})}),b(Bt,{path:"user",children:b(Bt,{path:"preferences",element:b(vIt,{})})})]}),b(Bt,{path:"/",element:b(LIt,{})}),b(Bt,{path:"*",element:b("main",{style:{padding:"1rem"},children:b("p",{children:"404, Page NOT FOUND"})})})]}),$Ht="_notification_bbb61_1",WX={notification:$Ht},DHt=()=>{const[e,t]=uPt(),n=()=>{t(DY({notify:!1,message:"",severity:void 0,title:"",type:void 0}))},r=()=>{t(DY({notify:!1,message:"",severity:void 0,title:"",type:void 0,undo:!0}))};return e.notification.notify?e.notification.type==="delete"?K(Il,{className:WX.notification,severity:e.notification.severity,action:b(dt,{color:"inherit",size:"small",onClick:r,children:"UNDO"}),variant:"filled",children:[b(XT,{children:e.notification.title}),b("strong",{children:e.notification.message})]}):K(Il,{className:WX.notification,severity:e.notification.severity,onClose:()=>n(),variant:"filled",children:[b(XT,{children:e.notification.title}),b("strong",{children:e.notification.message})]}):null};function _Ht(){return K(Oe,{container:!0,children:[b(Oe,{size:12,children:b(DIt,{})}),b(Oe,{size:12,children:b(DHt,{})}),b(Oe,{size:12,children:b($5,{})})]})}const an=e=>typeof e=="string",Tw=()=>{let e,t;const n=new Promise((r,o)=>{e=r,t=o});return n.resolve=e,n.reject=t,n},GX=e=>e==null?"":""+e,NHt=(e,t,n)=>{e.forEach(r=>{t[r]&&(n[r]=t[r])})},LHt=/###/g,qX=e=>e&&e.indexOf("###")>-1?e.replace(LHt,"."):e,KX=e=>!e||an(e),kx=(e,t,n)=>{const r=an(t)?t.split("."):t;let o=0;for(;o{const{obj:r,k:o}=kx(e,t,Object);if(r!==void 0||t.length===1){r[o]=n;return}let i=t[t.length-1],a=t.slice(0,t.length-1),s=kx(e,a,Object);for(;s.obj===void 0&&a.length;)i=`${a[a.length-1]}.${i}`,a=a.slice(0,a.length-1),s=kx(e,a,Object),s&&s.obj&&typeof s.obj[`${s.k}.${i}`]<"u"&&(s.obj=void 0);s.obj[`${s.k}.${i}`]=n},FHt=(e,t,n,r)=>{const{obj:o,k:i}=kx(e,t,Object);o[i]=o[i]||[],o[i].push(n)},qO=(e,t)=>{const{obj:n,k:r}=kx(e,t);if(n)return n[r]},jHt=(e,t,n)=>{const r=qO(e,n);return r!==void 0?r:qO(t,n)},$he=(e,t,n)=>{for(const r in t)r!=="__proto__"&&r!=="constructor"&&(r in e?an(e[r])||e[r]instanceof String||an(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):$he(e[r],t[r],n):e[r]=t[r]);return e},qm=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var BHt={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const zHt=e=>an(e)?e.replace(/[&<>"'\/]/g,t=>BHt[t]):e;class VHt{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const n=this.regExpMap.get(t);if(n!==void 0)return n;const r=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,r),this.regExpQueue.push(t),r}}const HHt=[" ",",","?","!",";"],UHt=new VHt(20),WHt=(e,t,n)=>{t=t||"",n=n||"";const r=HHt.filter(a=>t.indexOf(a)<0&&n.indexOf(a)<0);if(r.length===0)return!0;const o=UHt.getRegExp(`(${r.map(a=>a==="?"?"\\?":a).join("|")})`);let i=!o.test(e);if(!i){const a=e.indexOf(n);a>0&&!o.test(e.substring(0,a))&&(i=!0)}return i},dj=function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!e)return;if(e[t])return e[t];const r=t.split(n);let o=e;for(let i=0;i-1&&le&&e.replace("_","-"),GHt={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console&&console[e]&&console[e].apply(console,t)}};class YO{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(t,n)}init(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=n.prefix||"i18next:",this.logger=t||GHt,this.options=n,this.debug=n.debug}log(){for(var t=arguments.length,n=new Array(t),r=0;r{this.observers[r]||(this.observers[r]=new Map);const o=this.observers[r].get(n)||0;this.observers[r].set(n,o+1)}),this}off(t,n){if(this.observers[t]){if(!n){delete this.observers[t];return}this.observers[t].delete(n)}}emit(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o{let[s,l]=a;for(let c=0;c{let[s,l]=a;for(let c=0;c1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=t||{},this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}removeNamespaces(t){const n=this.options.ns.indexOf(t);n>-1&&this.options.ns.splice(n,1)}getResource(t,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const i=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,a=o.ignoreJSONStructure!==void 0?o.ignoreJSONStructure:this.options.ignoreJSONStructure;let s;t.indexOf(".")>-1?s=t.split("."):(s=[t,n],r&&(Array.isArray(r)?s.push(...r):an(r)&&i?s.push(...r.split(i)):s.push(r)));const l=qO(this.data,s);return!l&&!n&&!r&&t.indexOf(".")>-1&&(t=s[0],n=s[1],r=s.slice(2).join(".")),l||!a||!an(r)?l:dj(this.data&&this.data[t]&&this.data[t][n],r,i)}addResource(t,n,r,o){let i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const a=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator;let s=[t,n];r&&(s=s.concat(a?r.split(a):r)),t.indexOf(".")>-1&&(s=t.split("."),o=n,n=s[1]),this.addNamespaces(n),YX(this.data,s,o),i.silent||this.emit("added",t,n,r,o)}addResources(t,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const i in r)(an(r[i])||Array.isArray(r[i]))&&this.addResource(t,n,i,r[i],{silent:!0});o.silent||this.emit("added",t,n,r)}addResourceBundle(t,n,r,o,i){let a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},s=[t,n];t.indexOf(".")>-1&&(s=t.split("."),o=r,r=n,n=s[1]),this.addNamespaces(n);let l=qO(this.data,s)||{};a.skipCopy||(r=JSON.parse(JSON.stringify(r))),o?$he(l,r,i):l={...l,...r},YX(this.data,s,l),a.silent||this.emit("added",t,n,r)}removeResourceBundle(t,n){this.hasResourceBundle(t,n)&&delete this.data[t][n],this.removeNamespaces(n),this.emit("removed",t,n)}hasResourceBundle(t,n){return this.getResource(t,n)!==void 0}getResourceBundle(t,n){return n||(n=this.options.defaultNS),this.options.compatibilityAPI==="v1"?{...this.getResource(t,n)}:this.getResource(t,n)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const n=this.getDataByLanguage(t);return!!(n&&Object.keys(n)||[]).find(o=>n[o]&&Object.keys(n[o]).length>0)}toJSON(){return this.data}}var Dhe={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,o){return e.forEach(i=>{this.processors[i]&&(t=this.processors[i].process(t,n,r,o))}),t}};const XX={};class QO extends iR{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),NHt(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=ru.create("translator")}changeLanguage(t){t&&(this.language=t)}exists(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(t==null)return!1;const r=this.resolve(t,n);return r&&r.res!==void 0}extractFromKey(t,n){let r=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");const o=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let i=n.ns||this.options.defaultNS||[];const a=r&&t.indexOf(r)>-1,s=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!WHt(t,r,o);if(a&&!s){const l=t.match(this.interpolator.nestingRegexp);if(l&&l.length>0)return{key:t,namespaces:an(i)?[i]:i};const c=t.split(r);(r!==o||r===o&&this.options.ns.indexOf(c[0])>-1)&&(i=c.shift()),t=c.join(o)}return{key:t,namespaces:an(i)?[i]:i}}translate(t,n,r){if(typeof n!="object"&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),typeof n=="object"&&(n={...n}),n||(n={}),t==null)return"";Array.isArray(t)||(t=[String(t)]);const o=n.returnDetails!==void 0?n.returnDetails:this.options.returnDetails,i=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator,{key:a,namespaces:s}=this.extractFromKey(t[t.length-1],n),l=s[s.length-1],c=n.lng||this.language,u=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(c&&c.toLowerCase()==="cimode"){if(u){const E=n.nsSeparator||this.options.nsSeparator;return o?{res:`${l}${E}${a}`,usedKey:a,exactUsedKey:a,usedLng:c,usedNS:l,usedParams:this.getUsedParamsDetails(n)}:`${l}${E}${a}`}return o?{res:a,usedKey:a,exactUsedKey:a,usedLng:c,usedNS:l,usedParams:this.getUsedParamsDetails(n)}:a}const d=this.resolve(t,n);let f=d&&d.res;const p=d&&d.usedKey||a,h=d&&d.exactUsedKey||a,m=Object.prototype.toString.apply(f),y=["[object Number]","[object Function]","[object RegExp]"],w=n.joinArrays!==void 0?n.joinArrays:this.options.joinArrays,x=!this.i18nFormat||this.i18nFormat.handleAsObject,C=!an(f)&&typeof f!="boolean"&&typeof f!="number";if(x&&f&&C&&y.indexOf(m)<0&&!(an(w)&&Array.isArray(f))){if(!n.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const E=this.options.returnedObjectHandler?this.options.returnedObjectHandler(p,f,{...n,ns:s}):`key '${a} (${this.language})' returned an object instead of string.`;return o?(d.res=E,d.usedParams=this.getUsedParamsDetails(n),d):E}if(i){const E=Array.isArray(f),P=E?[]:{},T=E?h:p;for(const I in f)if(Object.prototype.hasOwnProperty.call(f,I)){const A=`${T}${i}${I}`;P[I]=this.translate(A,{...n,joinArrays:!1,ns:s}),P[I]===A&&(P[I]=f[I])}f=P}}else if(x&&an(w)&&Array.isArray(f))f=f.join(w),f&&(f=this.extendTranslation(f,t,n,r));else{let E=!1,P=!1;const T=n.count!==void 0&&!an(n.count),I=QO.hasDefaultValue(n),A=T?this.pluralResolver.getSuffix(c,n.count,n):"",k=n.ordinal&&T?this.pluralResolver.getSuffix(c,n.count,{ordinal:!1}):"",O=T&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),$=O&&n[`defaultValue${this.options.pluralSeparator}zero`]||n[`defaultValue${A}`]||n[`defaultValue${k}`]||n.defaultValue;!this.isValidLookup(f)&&I&&(E=!0,f=$),this.isValidLookup(f)||(P=!0,f=a);const L=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&P?void 0:f,j=I&&$!==f&&this.options.updateMissing;if(P||E||j){if(this.logger.log(j?"updateKey":"missingKey",c,l,a,j?$:f),i){const F=this.resolve(a,{...n,keySeparator:!1});F&&F.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let D=[];const _=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if(this.options.saveMissingTo==="fallback"&&_&&_[0])for(let F=0;F<_.length;F++)D.push(_[F]);else this.options.saveMissingTo==="all"?D=this.languageUtils.toResolveHierarchy(n.lng||this.language):D.push(n.lng||this.language);const z=(F,V,U)=>{const q=I&&U!==f?U:L;this.options.missingKeyHandler?this.options.missingKeyHandler(F,l,V,q,j,n):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(F,l,V,q,j,n),this.emit("missingKey",F,l,V,f)};this.options.saveMissing&&(this.options.saveMissingPlurals&&T?D.forEach(F=>{const V=this.pluralResolver.getSuffixes(F,n);O&&n[`defaultValue${this.options.pluralSeparator}zero`]&&V.indexOf(`${this.options.pluralSeparator}zero`)<0&&V.push(`${this.options.pluralSeparator}zero`),V.forEach(U=>{z([F],a+U,n[`defaultValue${U}`]||$)})}):z(D,a,$))}f=this.extendTranslation(f,t,n,d,r),P&&f===a&&this.options.appendNamespaceToMissingKey&&(f=`${l}:${a}`),(P||E)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?f=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}:${a}`:a,E?f:void 0):f=this.options.parseMissingKeyHandler(f))}return o?(d.res=f,d.usedParams=this.getUsedParamsDetails(n),d):f}extendTranslation(t,n,r,o,i){var a=this;if(this.i18nFormat&&this.i18nFormat.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||o.usedLng,o.usedNS,o.usedKey,{resolved:o});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const c=an(t)&&(r&&r.interpolation&&r.interpolation.skipOnVariables!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let u;if(c){const f=t.match(this.interpolator.nestingRegexp);u=f&&f.length}let d=r.replace&&!an(r.replace)?r.replace:r;if(this.options.interpolation.defaultVariables&&(d={...this.options.interpolation.defaultVariables,...d}),t=this.interpolator.interpolate(t,d,r.lng||this.language||o.usedLng,r),c){const f=t.match(this.interpolator.nestingRegexp),p=f&&f.length;u1&&arguments[1]!==void 0?arguments[1]:{},r,o,i,a,s;return an(t)&&(t=[t]),t.forEach(l=>{if(this.isValidLookup(r))return;const c=this.extractFromKey(l,n),u=c.key;o=u;let d=c.namespaces;this.options.fallbackNS&&(d=d.concat(this.options.fallbackNS));const f=n.count!==void 0&&!an(n.count),p=f&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),h=n.context!==void 0&&(an(n.context)||typeof n.context=="number")&&n.context!=="",m=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);d.forEach(y=>{this.isValidLookup(r)||(s=y,!XX[`${m[0]}-${y}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(s)&&(XX[`${m[0]}-${y}`]=!0,this.logger.warn(`key "${o}" for languages "${m.join(", ")}" won't get resolved as namespace "${s}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),m.forEach(w=>{if(this.isValidLookup(r))return;a=w;const x=[u];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(x,u,w,y,n);else{let E;f&&(E=this.pluralResolver.getSuffix(w,n.count,n));const P=`${this.options.pluralSeparator}zero`,T=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(f&&(x.push(u+E),n.ordinal&&E.indexOf(T)===0&&x.push(u+E.replace(T,this.options.pluralSeparator)),p&&x.push(u+P)),h){const I=`${u}${this.options.contextSeparator}${n.context}`;x.push(I),f&&(x.push(I+E),n.ordinal&&E.indexOf(T)===0&&x.push(I+E.replace(T,this.options.pluralSeparator)),p&&x.push(I+P))}}let C;for(;C=x.pop();)this.isValidLookup(r)||(i=C,r=this.getResource(w,y,C,n))}))})}),{res:r,usedKey:o,exactUsedKey:i,usedLng:a,usedNS:s}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(t,n,r,o):this.resourceStore.getResource(t,n,r,o)}getUsedParamsDetails(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const n=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=t.replace&&!an(t.replace);let o=r?t.replace:t;if(r&&typeof t.count<"u"&&(o.count=t.count),this.options.interpolation.defaultVariables&&(o={...this.options.interpolation.defaultVariables,...o}),!r){o={...o};for(const i of n)delete o[i]}return o}static hasDefaultValue(t){const n="defaultValue";for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&n===r.substring(0,n.length)&&t[r]!==void 0)return!0;return!1}}const L_=e=>e.charAt(0).toUpperCase()+e.slice(1);class JX{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=ru.create("languageUtils")}getScriptPartFromCode(t){if(t=KO(t),!t||t.indexOf("-")<0)return null;const n=t.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(t){if(t=KO(t),!t||t.indexOf("-")<0)return t;const n=t.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(t){if(an(t)&&t.indexOf("-")>-1){if(typeof Intl<"u"&&typeof Intl.getCanonicalLocales<"u")try{let o=Intl.getCanonicalLocales(t)[0];if(o&&this.options.lowerCaseLng&&(o=o.toLowerCase()),o)return o}catch{}const n=["hans","hant","latn","cyrl","cans","mong","arab"];let r=t.split("-");return this.options.lowerCaseLng?r=r.map(o=>o.toLowerCase()):r.length===2?(r[0]=r[0].toLowerCase(),r[1]=r[1].toUpperCase(),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=L_(r[1].toLowerCase()))):r.length===3&&(r[0]=r[0].toLowerCase(),r[1].length===2&&(r[1]=r[1].toUpperCase()),r[0]!=="sgn"&&r[2].length===2&&(r[2]=r[2].toUpperCase()),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=L_(r[1].toLowerCase())),n.indexOf(r[2].toLowerCase())>-1&&(r[2]=L_(r[2].toLowerCase()))),r.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let n;return t.forEach(r=>{if(n)return;const o=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(o))&&(n=o)}),!n&&this.options.supportedLngs&&t.forEach(r=>{if(n)return;const o=this.getLanguagePartFromCode(r);if(this.isSupportedCode(o))return n=o;n=this.options.supportedLngs.find(i=>{if(i===o)return i;if(!(i.indexOf("-")<0&&o.indexOf("-")<0)&&(i.indexOf("-")>0&&o.indexOf("-")<0&&i.substring(0,i.indexOf("-"))===o||i.indexOf(o)===0&&o.length>1))return i})}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(t,n){if(!t)return[];if(typeof t=="function"&&(t=t(n)),an(t)&&(t=[t]),Array.isArray(t))return t;if(!n)return t.default||[];let r=t[n];return r||(r=t[this.getScriptPartFromCode(n)]),r||(r=t[this.formatLanguageCode(n)]),r||(r=t[this.getLanguagePartFromCode(n)]),r||(r=t.default),r||[]}toResolveHierarchy(t,n){const r=this.getFallbackCodes(n||this.options.fallbackLng||[],t),o=[],i=a=>{a&&(this.isSupportedCode(a)?o.push(a):this.logger.warn(`rejecting language code not found in supportedLngs: ${a}`))};return an(t)&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&i(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&i(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&i(this.getLanguagePartFromCode(t))):an(t)&&i(this.formatLanguageCode(t)),r.forEach(a=>{o.indexOf(a)<0&&i(this.formatLanguageCode(a))}),o}}let qHt=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],KHt={1:e=>+(e>1),2:e=>+(e!=1),3:e=>0,4:e=>e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2,5:e=>e==0?0:e==1?1:e==2?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5,6:e=>e==1?0:e>=2&&e<=4?1:2,7:e=>e==1?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2,8:e=>e==1?0:e==2?1:e!=8&&e!=11?2:3,9:e=>+(e>=2),10:e=>e==1?0:e==2?1:e<7?2:e<11?3:4,11:e=>e==1||e==11?0:e==2||e==12?1:e>2&&e<20?2:3,12:e=>+(e%10!=1||e%100==11),13:e=>+(e!==0),14:e=>e==1?0:e==2?1:e==3?2:3,15:e=>e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2,16:e=>e%10==1&&e%100!=11?0:e!==0?1:2,17:e=>e==1||e%10==1&&e%100!=11?0:1,18:e=>e==0?0:e==1?1:2,19:e=>e==1?0:e==0||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3,20:e=>e==1?0:e==0||e%100>0&&e%100<20?1:2,21:e=>e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0,22:e=>e==1?0:e==2?1:(e<0||e>10)&&e%10==0?2:3};const YHt=["v1","v2","v3"],QHt=["v4"],ZX={zero:0,one:1,two:2,few:3,many:4,other:5},XHt=()=>{const e={};return qHt.forEach(t=>{t.lngs.forEach(n=>{e[n]={numbers:t.nr,plurals:KHt[t.fc]}})}),e};class JHt{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=t,this.options=n,this.logger=ru.create("pluralResolver"),(!this.options.compatibilityJSON||QHt.includes(this.options.compatibilityJSON))&&(typeof Intl>"u"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=XHt(),this.pluralRulesCache={}}addRule(t,n){this.rules[t]=n}clearCache(){this.pluralRulesCache={}}getRule(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi())try{const r=KO(t==="dev"?"en":t),o=n.ordinal?"ordinal":"cardinal",i=JSON.stringify({cleanedCode:r,type:o});if(i in this.pluralRulesCache)return this.pluralRulesCache[i];const a=new Intl.PluralRules(r,{type:o});return this.pluralRulesCache[i]=a,a}catch{return}return this.rules[t]||this.rules[this.languageUtils.getLanguagePartFromCode(t)]}needsPlural(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=this.getRule(t,n);return this.shouldUseIntlApi()?r&&r.resolvedOptions().pluralCategories.length>1:r&&r.numbers.length>1}getPluralFormsOfKey(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(t,r).map(o=>`${n}${o}`)}getSuffixes(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=this.getRule(t,n);return r?this.shouldUseIntlApi()?r.resolvedOptions().pluralCategories.sort((o,i)=>ZX[o]-ZX[i]).map(o=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${o}`):r.numbers.map(o=>this.getSuffix(t,o,n)):[]}getSuffix(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const o=this.getRule(t,r);return o?this.shouldUseIntlApi()?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${o.select(n)}`:this.getSuffixRetroCompatible(o,n):(this.logger.warn(`no plural rule found for: ${t}`),"")}getSuffixRetroCompatible(t,n){const r=t.noAbs?t.plurals(n):t.plurals(Math.abs(n));let o=t.numbers[r];this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1&&(o===2?o="plural":o===1&&(o=""));const i=()=>this.options.prepend&&o.toString()?this.options.prepend+o.toString():o.toString();return this.options.compatibilityJSON==="v1"?o===1?"":typeof o=="number"?`_plural_${o.toString()}`:i():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1?i():this.options.prepend&&r.toString()?this.options.prepend+r.toString():r.toString()}shouldUseIntlApi(){return!YHt.includes(this.options.compatibilityJSON)}}const eJ=function(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,i=jHt(e,t,n);return!i&&o&&an(n)&&(i=dj(e,n,r),i===void 0&&(i=dj(t,n,r))),i},F_=e=>e.replace(/\$/g,"$$$$");class ZHt{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=ru.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||(n=>n),this.init(t)}init(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};t.interpolation||(t.interpolation={escapeValue:!0});const{escape:n,escapeValue:r,useRawValueToEscape:o,prefix:i,prefixEscaped:a,suffix:s,suffixEscaped:l,formatSeparator:c,unescapeSuffix:u,unescapePrefix:d,nestingPrefix:f,nestingPrefixEscaped:p,nestingSuffix:h,nestingSuffixEscaped:m,nestingOptionsSeparator:y,maxReplaces:w,alwaysFormat:x}=t.interpolation;this.escape=n!==void 0?n:zHt,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=o!==void 0?o:!1,this.prefix=i?qm(i):a||"{{",this.suffix=s?qm(s):l||"}}",this.formatSeparator=c||",",this.unescapePrefix=u?"":d||"-",this.unescapeSuffix=this.unescapePrefix?"":u||"",this.nestingPrefix=f?qm(f):p||qm("$t("),this.nestingSuffix=h?qm(h):m||qm(")"),this.nestingOptionsSeparator=y||",",this.maxReplaces=w||1e3,this.alwaysFormat=x!==void 0?x:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(n,r)=>n&&n.source===r?(n.lastIndex=0,n):new RegExp(r,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(t,n,r,o){let i,a,s;const l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},c=p=>{if(p.indexOf(this.formatSeparator)<0){const w=eJ(n,l,p,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(w,void 0,r,{...o,...n,interpolationkey:p}):w}const h=p.split(this.formatSeparator),m=h.shift().trim(),y=h.join(this.formatSeparator).trim();return this.format(eJ(n,l,m,this.options.keySeparator,this.options.ignoreJSONStructure),y,r,{...o,...n,interpolationkey:m})};this.resetRegExp();const u=o&&o.missingInterpolationHandler||this.options.missingInterpolationHandler,d=o&&o.interpolation&&o.interpolation.skipOnVariables!==void 0?o.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:p=>F_(p)},{regex:this.regexp,safeValue:p=>this.escapeValue?F_(this.escape(p)):F_(p)}].forEach(p=>{for(s=0;i=p.regex.exec(t);){const h=i[1].trim();if(a=c(h),a===void 0)if(typeof u=="function"){const y=u(t,i,o);a=an(y)?y:""}else if(o&&Object.prototype.hasOwnProperty.call(o,h))a="";else if(d){a=i[0];continue}else this.logger.warn(`missed to pass in variable ${h} for interpolating ${t}`),a="";else!an(a)&&!this.useRawValueToEscape&&(a=GX(a));const m=p.safeValue(a);if(t=t.replace(i[0],m),d?(p.regex.lastIndex+=a.length,p.regex.lastIndex-=i[0].length):p.regex.lastIndex=0,s++,s>=this.maxReplaces)break}}),t}nest(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o,i,a;const s=(l,c)=>{const u=this.nestingOptionsSeparator;if(l.indexOf(u)<0)return l;const d=l.split(new RegExp(`${u}[ ]*{`));let f=`{${d[1]}`;l=d[0],f=this.interpolate(f,a);const p=f.match(/'/g),h=f.match(/"/g);(p&&p.length%2===0&&!h||h.length%2!==0)&&(f=f.replace(/'/g,'"'));try{a=JSON.parse(f),c&&(a={...c,...a})}catch(m){return this.logger.warn(`failed parsing options string in nesting for key ${l}`,m),`${l}${u}${f}`}return a.defaultValue&&a.defaultValue.indexOf(this.prefix)>-1&&delete a.defaultValue,l};for(;o=this.nestingRegexp.exec(t);){let l=[];a={...r},a=a.replace&&!an(a.replace)?a.replace:a,a.applyPostProcessor=!1,delete a.defaultValue;let c=!1;if(o[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(o[1])){const u=o[1].split(this.formatSeparator).map(d=>d.trim());o[1]=u.shift(),l=u,c=!0}if(i=n(s.call(this,o[1].trim(),a),a),i&&o[0]===t&&!an(i))return i;an(i)||(i=GX(i)),i||(this.logger.warn(`missed to resolve ${o[1]} for nesting ${t}`),i=""),c&&(i=l.reduce((u,d)=>this.format(u,d,r.lng,{...r,interpolationkey:o[1].trim()}),i.trim())),t=t.replace(o[0],i),this.regexp.lastIndex=0}return t}}const e5t=e=>{let t=e.toLowerCase().trim();const n={};if(e.indexOf("(")>-1){const r=e.split("(");t=r[0].toLowerCase().trim();const o=r[1].substring(0,r[1].length-1);t==="currency"&&o.indexOf(":")<0?n.currency||(n.currency=o.trim()):t==="relativetime"&&o.indexOf(":")<0?n.range||(n.range=o.trim()):o.split(";").forEach(a=>{if(a){const[s,...l]=a.split(":"),c=l.join(":").trim().replace(/^'+|'+$/g,""),u=s.trim();n[u]||(n[u]=c),c==="false"&&(n[u]=!1),c==="true"&&(n[u]=!0),isNaN(c)||(n[u]=parseInt(c,10))}})}return{formatName:t,formatOptions:n}},Km=e=>{const t={};return(n,r,o)=>{let i=o;o&&o.interpolationkey&&o.formatParams&&o.formatParams[o.interpolationkey]&&o[o.interpolationkey]&&(i={...i,[o.interpolationkey]:void 0});const a=r+JSON.stringify(i);let s=t[a];return s||(s=e(KO(r),o),t[a]=s),s(n)}};class t5t{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=ru.create("formatter"),this.options=t,this.formats={number:Km((n,r)=>{const o=new Intl.NumberFormat(n,{...r});return i=>o.format(i)}),currency:Km((n,r)=>{const o=new Intl.NumberFormat(n,{...r,style:"currency"});return i=>o.format(i)}),datetime:Km((n,r)=>{const o=new Intl.DateTimeFormat(n,{...r});return i=>o.format(i)}),relativetime:Km((n,r)=>{const o=new Intl.RelativeTimeFormat(n,{...r});return i=>o.format(i,r.range||"day")}),list:Km((n,r)=>{const o=new Intl.ListFormat(n,{...r});return i=>o.format(i)})},this.init(t)}init(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};this.formatSeparator=n.interpolation.formatSeparator||","}add(t,n){this.formats[t.toLowerCase().trim()]=n}addCached(t,n){this.formats[t.toLowerCase().trim()]=Km(n)}format(t,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const i=n.split(this.formatSeparator);if(i.length>1&&i[0].indexOf("(")>1&&i[0].indexOf(")")<0&&i.find(s=>s.indexOf(")")>-1)){const s=i.findIndex(l=>l.indexOf(")")>-1);i[0]=[i[0],...i.splice(1,s)].join(this.formatSeparator)}return i.reduce((s,l)=>{const{formatName:c,formatOptions:u}=e5t(l);if(this.formats[c]){let d=s;try{const f=o&&o.formatParams&&o.formatParams[o.interpolationkey]||{},p=f.locale||f.lng||o.locale||o.lng||r;d=this.formats[c](s,p,{...u,...o,...f})}catch(f){this.logger.warn(f)}return d}else this.logger.warn(`there was no format function for ${c}`);return s},t)}}const n5t=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)};class r5t extends iR{constructor(t,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=t,this.store=n,this.services=r,this.languageUtils=r.languageUtils,this.options=o,this.logger=ru.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=o.maxParallelReads||10,this.readingCalls=0,this.maxRetries=o.maxRetries>=0?o.maxRetries:5,this.retryTimeout=o.retryTimeout>=1?o.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(r,o.backend,o)}queueLoad(t,n,r,o){const i={},a={},s={},l={};return t.forEach(c=>{let u=!0;n.forEach(d=>{const f=`${c}|${d}`;!r.reload&&this.store.hasResourceBundle(c,d)?this.state[f]=2:this.state[f]<0||(this.state[f]===1?a[f]===void 0&&(a[f]=!0):(this.state[f]=1,u=!1,a[f]===void 0&&(a[f]=!0),i[f]===void 0&&(i[f]=!0),l[d]===void 0&&(l[d]=!0)))}),u||(s[c]=!0)}),(Object.keys(i).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:o}),{toLoad:Object.keys(i),pending:Object.keys(a),toLoadLanguages:Object.keys(s),toLoadNamespaces:Object.keys(l)}}loaded(t,n,r){const o=t.split("|"),i=o[0],a=o[1];n&&this.emit("failedLoading",i,a,n),!n&&r&&this.store.addResourceBundle(i,a,r,void 0,void 0,{skipCopy:!0}),this.state[t]=n?-1:2,n&&r&&(this.state[t]=0);const s={};this.queue.forEach(l=>{FHt(l.loaded,[i],a),n5t(l,t),n&&l.errors.push(n),l.pendingCount===0&&!l.done&&(Object.keys(l.loaded).forEach(c=>{s[c]||(s[c]={});const u=l.loaded[c];u.length&&u.forEach(d=>{s[c][d]===void 0&&(s[c][d]=!0)})}),l.done=!0,l.errors.length?l.callback(l.errors):l.callback())}),this.emit("loaded",s),this.queue=this.queue.filter(l=>!l.done)}read(t,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,a=arguments.length>5?arguments[5]:void 0;if(!t.length)return a(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:n,fcName:r,tried:o,wait:i,callback:a});return}this.readingCalls++;const s=(c,u)=>{if(this.readingCalls--,this.waitingReads.length>0){const d=this.waitingReads.shift();this.read(d.lng,d.ns,d.fcName,d.tried,d.wait,d.callback)}if(c&&u&&o{this.read.call(this,t,n,r,o+1,i*2,a)},i);return}a(c,u)},l=this.backend[r].bind(this.backend);if(l.length===2){try{const c=l(t,n);c&&typeof c.then=="function"?c.then(u=>s(null,u)).catch(s):s(null,c)}catch(c){s(c)}return}return l(t,n,s)}prepareLoading(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),o&&o();an(t)&&(t=this.languageUtils.toResolveHierarchy(t)),an(n)&&(n=[n]);const i=this.queueLoad(t,n,r,o);if(!i.toLoad.length)return i.pending.length||o(),null;i.toLoad.forEach(a=>{this.loadOne(a)})}load(t,n,r){this.prepareLoading(t,n,{},r)}reload(t,n,r){this.prepareLoading(t,n,{reload:!0},r)}loadOne(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const r=t.split("|"),o=r[0],i=r[1];this.read(o,i,"read",void 0,void 0,(a,s)=>{a&&this.logger.warn(`${n}loading namespace ${i} for language ${o} failed`,a),!a&&s&&this.logger.log(`${n}loaded namespace ${i} for language ${o}`,s),this.loaded(t,a,s)})}saveMissing(t,n,r,o,i){let a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},s=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(n)){this.logger.warn(`did not save key "${r}" as the namespace "${n}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(r==null||r==="")){if(this.backend&&this.backend.create){const l={...a,isUpdate:i},c=this.backend.create.bind(this.backend);if(c.length<6)try{let u;c.length===5?u=c(t,n,r,o,l):u=c(t,n,r,o),u&&typeof u.then=="function"?u.then(d=>s(null,d)).catch(s):s(null,u)}catch(u){s(u)}else c(t,n,r,o,s,l)}!t||!t[0]||this.store.addResource(t[0],n,r,o)}}}const tJ=()=>({debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]=="object"&&(t=e[1]),an(e[1])&&(t.defaultValue=e[1]),an(e[2])&&(t.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const n=e[3]||e[2];Object.keys(n).forEach(r=>{t[r]=n[r]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),nJ=e=>(an(e.ns)&&(e.ns=[e.ns]),an(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),an(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e),AP=()=>{},o5t=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(n=>{typeof e[n]=="function"&&(e[n]=e[n].bind(e))})};class uC extends iR{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(super(),this.options=nJ(t),this.services={},this.logger=ru,this.modules={external:[]},o5t(this),n&&!this.isInitialized&&!t.isClone){if(!this.options.initImmediate)return this.init(t,n),this;setTimeout(()=>{this.init(t,n)},0)}}init(){var t=this;let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof n=="function"&&(r=n,n={}),!n.defaultNS&&n.defaultNS!==!1&&n.ns&&(an(n.ns)?n.defaultNS=n.ns:n.ns.indexOf("translation")<0&&(n.defaultNS=n.ns[0]));const o=tJ();this.options={...o,...this.options,...nJ(n)},this.options.compatibilityAPI!=="v1"&&(this.options.interpolation={...o.interpolation,...this.options.interpolation}),n.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=n.keySeparator),n.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=n.nsSeparator);const i=u=>u?typeof u=="function"?new u:u:null;if(!this.options.isClone){this.modules.logger?ru.init(i(this.modules.logger),this.options):ru.init(null,this.options);let u;this.modules.formatter?u=this.modules.formatter:typeof Intl<"u"&&(u=t5t);const d=new JX(this.options);this.store=new QX(this.options.resources,this.options);const f=this.services;f.logger=ru,f.resourceStore=this.store,f.languageUtils=d,f.pluralResolver=new JHt(d,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),u&&(!this.options.interpolation.format||this.options.interpolation.format===o.interpolation.format)&&(f.formatter=i(u),f.formatter.init(f,this.options),this.options.interpolation.format=f.formatter.format.bind(f.formatter)),f.interpolator=new ZHt(this.options),f.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},f.backendConnector=new r5t(i(this.modules.backend),f.resourceStore,f,this.options),f.backendConnector.on("*",function(p){for(var h=arguments.length,m=new Array(h>1?h-1:0),y=1;y1?h-1:0),y=1;y{p.init&&p.init(this)})}if(this.format=this.options.interpolation.format,r||(r=AP),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const u=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);u.length>0&&u[0]!=="dev"&&(this.options.lng=u[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(u=>{this[u]=function(){return t.store[u](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(u=>{this[u]=function(){return t.store[u](...arguments),t}});const l=Tw(),c=()=>{const u=(d,f)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),l.resolve(f),r(d,f)};if(this.languages&&this.options.compatibilityAPI!=="v1"&&!this.isInitialized)return u(null,this.t.bind(this));this.changeLanguage(this.options.lng,u)};return this.options.resources||!this.options.initImmediate?c():setTimeout(c,0),l}loadResources(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:AP;const o=an(t)?t:this.language;if(typeof t=="function"&&(r=t),!this.options.resources||this.options.partialBundledLanguages){if(o&&o.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return r();const i=[],a=s=>{if(!s||s==="cimode")return;this.services.languageUtils.toResolveHierarchy(s).forEach(c=>{c!=="cimode"&&i.indexOf(c)<0&&i.push(c)})};o?a(o):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(l=>a(l)),this.options.preload&&this.options.preload.forEach(s=>a(s)),this.services.backendConnector.load(i,this.options.ns,s=>{!s&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(s)})}else r(null)}reloadResources(t,n,r){const o=Tw();return typeof t=="function"&&(r=t,t=void 0),typeof n=="function"&&(r=n,n=void 0),t||(t=this.languages),n||(n=this.options.ns),r||(r=AP),this.services.backendConnector.reload(t,n,i=>{o.resolve(),r(i)}),o}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&Dhe.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!(["cimode","dev"].indexOf(t)>-1))for(let n=0;n-1)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}}changeLanguage(t,n){var r=this;this.isLanguageChangingTo=t;const o=Tw();this.emit("languageChanging",t);const i=l=>{this.language=l,this.languages=this.services.languageUtils.toResolveHierarchy(l),this.resolvedLanguage=void 0,this.setResolvedLanguage(l)},a=(l,c)=>{c?(i(c),this.translator.changeLanguage(c),this.isLanguageChangingTo=void 0,this.emit("languageChanged",c),this.logger.log("languageChanged",c)):this.isLanguageChangingTo=void 0,o.resolve(function(){return r.t(...arguments)}),n&&n(l,function(){return r.t(...arguments)})},s=l=>{!t&&!l&&this.services.languageDetector&&(l=[]);const c=an(l)?l:this.services.languageUtils.getBestMatchFromCodes(l);c&&(this.language||i(c),this.translator.language||this.translator.changeLanguage(c),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(c)),this.loadResources(c,u=>{a(u,c)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?s(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(s):this.services.languageDetector.detect(s):s(t),o}getFixedT(t,n,r){var o=this;const i=function(a,s){let l;if(typeof s!="object"){for(var c=arguments.length,u=new Array(c>2?c-2:0),d=2;d`${l.keyPrefix}${f}${h}`):p=l.keyPrefix?`${l.keyPrefix}${f}${a}`:a,o.t(p,l)};return an(t)?i.lng=t:i.lngs=t,i.ns=n,i.keyPrefix=r,i}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const r=n.lng||this.resolvedLanguage||this.languages[0],o=this.options?this.options.fallbackLng:!1,i=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const a=(s,l)=>{const c=this.services.backendConnector.state[`${s}|${l}`];return c===-1||c===0||c===2};if(n.precheck){const s=n.precheck(this,a);if(s!==void 0)return s}return!!(this.hasResourceBundle(r,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||a(r,t)&&(!o||a(i,t)))}loadNamespaces(t,n){const r=Tw();return this.options.ns?(an(t)&&(t=[t]),t.forEach(o=>{this.options.ns.indexOf(o)<0&&this.options.ns.push(o)}),this.loadResources(o=>{r.resolve(),n&&n(o)}),r):(n&&n(),Promise.resolve())}loadLanguages(t,n){const r=Tw();an(t)&&(t=[t]);const o=this.options.preload||[],i=t.filter(a=>o.indexOf(a)<0&&this.services.languageUtils.isSupportedCode(a));return i.length?(this.options.preload=o.concat(i),this.loadResources(a=>{r.resolve(),n&&n(a)}),r):(n&&n(),Promise.resolve())}dir(t){if(t||(t=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!t)return"rtl";const n=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],r=this.services&&this.services.languageUtils||new JX(tJ());return n.indexOf(r.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return new uC(t,n)}cloneInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:AP;const r=t.forkResourceStore;r&&delete t.forkResourceStore;const o={...this.options,...t,isClone:!0},i=new uC(o);return(t.debug!==void 0||t.prefix!==void 0)&&(i.logger=i.logger.clone(t)),["store","services","language"].forEach(s=>{i[s]=this[s]}),i.services={...this.services},i.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},r&&(i.store=new QX(this.store.data,o),i.services.resourceStore=i.store),i.translator=new QO(i.services,o),i.translator.on("*",function(s){for(var l=arguments.length,c=new Array(l>1?l-1:0),u=1;u{if(t)for(const n in t)e[n]===void 0&&(e[n]=t[n])}),e}const rJ=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,l5t=(e,t,n)=>{const r=n||{};r.path=r.path||"/";const o=encodeURIComponent(t);let i=`${e}=${o}`;if(r.maxAge>0){const a=r.maxAge-0;if(Number.isNaN(a))throw new Error("maxAge should be a Number");i+=`; Max-Age=${Math.floor(a)}`}if(r.domain){if(!rJ.test(r.domain))throw new TypeError("option domain is invalid");i+=`; Domain=${r.domain}`}if(r.path){if(!rJ.test(r.path))throw new TypeError("option path is invalid");i+=`; Path=${r.path}`}if(r.expires){if(typeof r.expires.toUTCString!="function")throw new TypeError("option expires is invalid");i+=`; Expires=${r.expires.toUTCString()}`}if(r.httpOnly&&(i+="; HttpOnly"),r.secure&&(i+="; Secure"),r.sameSite)switch(typeof r.sameSite=="string"?r.sameSite.toLowerCase():r.sameSite){case!0:i+="; SameSite=Strict";break;case"lax":i+="; SameSite=Lax";break;case"strict":i+="; SameSite=Strict";break;case"none":i+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return i},oJ={create(e,t,n,r){let o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};n&&(o.expires=new Date,o.expires.setTime(o.expires.getTime()+n*60*1e3)),r&&(o.domain=r),document.cookie=l5t(e,encodeURIComponent(t),o)},read(e){const t=`${e}=`,n=document.cookie.split(";");for(let r=0;r-1&&(o=window.location.hash.substring(window.location.hash.indexOf("?")));const a=o.substring(1).split("&");for(let s=0;s0&&a[s].substring(0,l)===t&&(n=a[s].substring(l+1))}}return n}};let Iw=null;const iJ=()=>{if(Iw!==null)return Iw;try{Iw=window!=="undefined"&&window.localStorage!==null;const e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch{Iw=!1}return Iw};var d5t={name:"localStorage",lookup(e){let{lookupLocalStorage:t}=e;if(t&&iJ())return window.localStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupLocalStorage:n}=t;n&&iJ()&&window.localStorage.setItem(n,e)}};let Ow=null;const aJ=()=>{if(Ow!==null)return Ow;try{Ow=window!=="undefined"&&window.sessionStorage!==null;const e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch{Ow=!1}return Ow};var f5t={name:"sessionStorage",lookup(e){let{lookupSessionStorage:t}=e;if(t&&aJ())return window.sessionStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupSessionStorage:n}=t;n&&aJ()&&window.sessionStorage.setItem(n,e)}},p5t={name:"navigator",lookup(e){const t=[];if(typeof navigator<"u"){const{languages:n,userLanguage:r,language:o}=navigator;if(n)for(let i=0;i0?t:void 0}},h5t={name:"htmlTag",lookup(e){let{htmlTag:t}=e,n;const r=t||(typeof document<"u"?document.documentElement:null);return r&&typeof r.getAttribute=="function"&&(n=r.getAttribute("lang")),n}},g5t={name:"path",lookup(e){var o;let{lookupFromPathIndex:t}=e;if(typeof window>"u")return;const n=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(n)?(o=n[typeof t=="number"?t:0])==null?void 0:o.replace("/",""):void 0}},m5t={name:"subdomain",lookup(e){var o,i;let{lookupFromSubdomainIndex:t}=e;const n=typeof t=="number"?t+1:1,r=typeof window<"u"&&((i=(o=window.location)==null?void 0:o.hostname)==null?void 0:i.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i));if(r)return r[n]}};function y5t(){return{order:["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"],lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:e=>e}}class _he{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(t,n)}init(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=t||{languageUtils:{}},this.options=s5t(n,this.options||{},y5t()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=o=>o.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=r,this.addDetector(c5t),this.addDetector(u5t),this.addDetector(d5t),this.addDetector(f5t),this.addDetector(p5t),this.addDetector(h5t),this.addDetector(g5t),this.addDetector(m5t)}addDetector(t){return this.detectors[t.name]=t,this}detect(t){t||(t=this.options.order);let n=[];return t.forEach(r=>{if(this.detectors[r]){let o=this.detectors[r].lookup(this.options);o&&typeof o=="string"&&(o=[o]),o&&(n=n.concat(o))}}),n=n.map(r=>this.options.convertDetectedLanguage(r)),this.services.languageUtils.getBestMatchFromCodes?n:n.length>0?n[0]:null}cacheUserLanguage(t,n){n||(n=this.options.caches),n&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(t)>-1||n.forEach(r=>{this.detectors[r]&&this.detectors[r].cacheUserLanguage(t,this.options)}))}}_he.type="languageDetector";function fj(e){"@babel/helpers - typeof";return fj=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},fj(e)}function Nhe(){return typeof XMLHttpRequest=="function"||(typeof XMLHttpRequest>"u"?"undefined":fj(XMLHttpRequest))==="object"}function v5t(e){return!!e&&typeof e.then=="function"}function b5t(e){return v5t(e)?e:Promise.resolve(e)}function w5t(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var pj={exports:{}},kP={exports:{}},sJ;function x5t(){return sJ||(sJ=1,function(e,t){var n=typeof globalThis<"u"&&globalThis||typeof self<"u"&&self||typeof ea<"u"&&ea,r=function(){function i(){this.fetch=!1,this.DOMException=n.DOMException}return i.prototype=n,new i}();(function(i){(function(a){var s=typeof i<"u"&&i||typeof self<"u"&&self||typeof s<"u"&&s,l={searchParams:"URLSearchParams"in s,iterable:"Symbol"in s&&"iterator"in Symbol,blob:"FileReader"in s&&"Blob"in s&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in s,arrayBuffer:"ArrayBuffer"in s};function c(D){return D&&DataView.prototype.isPrototypeOf(D)}if(l.arrayBuffer)var u=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],d=ArrayBuffer.isView||function(D){return D&&u.indexOf(Object.prototype.toString.call(D))>-1};function f(D){if(typeof D!="string"&&(D=String(D)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(D)||D==="")throw new TypeError('Invalid character in header field name: "'+D+'"');return D.toLowerCase()}function p(D){return typeof D!="string"&&(D=String(D)),D}function h(D){var _={next:function(){var z=D.shift();return{done:z===void 0,value:z}}};return l.iterable&&(_[Symbol.iterator]=function(){return _}),_}function m(D){this.map={},D instanceof m?D.forEach(function(_,z){this.append(z,_)},this):Array.isArray(D)?D.forEach(function(_){this.append(_[0],_[1])},this):D&&Object.getOwnPropertyNames(D).forEach(function(_){this.append(_,D[_])},this)}m.prototype.append=function(D,_){D=f(D),_=p(_);var z=this.map[D];this.map[D]=z?z+", "+_:_},m.prototype.delete=function(D){delete this.map[f(D)]},m.prototype.get=function(D){return D=f(D),this.has(D)?this.map[D]:null},m.prototype.has=function(D){return this.map.hasOwnProperty(f(D))},m.prototype.set=function(D,_){this.map[f(D)]=p(_)},m.prototype.forEach=function(D,_){for(var z in this.map)this.map.hasOwnProperty(z)&&D.call(_,this.map[z],z,this)},m.prototype.keys=function(){var D=[];return this.forEach(function(_,z){D.push(z)}),h(D)},m.prototype.values=function(){var D=[];return this.forEach(function(_){D.push(_)}),h(D)},m.prototype.entries=function(){var D=[];return this.forEach(function(_,z){D.push([z,_])}),h(D)},l.iterable&&(m.prototype[Symbol.iterator]=m.prototype.entries);function y(D){if(D.bodyUsed)return Promise.reject(new TypeError("Already read"));D.bodyUsed=!0}function w(D){return new Promise(function(_,z){D.onload=function(){_(D.result)},D.onerror=function(){z(D.error)}})}function x(D){var _=new FileReader,z=w(_);return _.readAsArrayBuffer(D),z}function C(D){var _=new FileReader,z=w(_);return _.readAsText(D),z}function E(D){for(var _=new Uint8Array(D),z=new Array(_.length),F=0;F<_.length;F++)z[F]=String.fromCharCode(_[F]);return z.join("")}function P(D){if(D.slice)return D.slice(0);var _=new Uint8Array(D.byteLength);return _.set(new Uint8Array(D)),_.buffer}function T(){return this.bodyUsed=!1,this._initBody=function(D){this.bodyUsed=this.bodyUsed,this._bodyInit=D,D?typeof D=="string"?this._bodyText=D:l.blob&&Blob.prototype.isPrototypeOf(D)?this._bodyBlob=D:l.formData&&FormData.prototype.isPrototypeOf(D)?this._bodyFormData=D:l.searchParams&&URLSearchParams.prototype.isPrototypeOf(D)?this._bodyText=D.toString():l.arrayBuffer&&l.blob&&c(D)?(this._bodyArrayBuffer=P(D.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):l.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(D)||d(D))?this._bodyArrayBuffer=P(D):this._bodyText=D=Object.prototype.toString.call(D):this._bodyText="",this.headers.get("content-type")||(typeof D=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):l.searchParams&&URLSearchParams.prototype.isPrototypeOf(D)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},l.blob&&(this.blob=function(){var D=y(this);if(D)return D;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){if(this._bodyArrayBuffer){var D=y(this);return D||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}else return this.blob().then(x)}),this.text=function(){var D=y(this);if(D)return D;if(this._bodyBlob)return C(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(E(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},l.formData&&(this.formData=function(){return this.text().then(O)}),this.json=function(){return this.text().then(JSON.parse)},this}var I=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function A(D){var _=D.toUpperCase();return I.indexOf(_)>-1?_:D}function k(D,_){if(!(this instanceof k))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');_=_||{};var z=_.body;if(D instanceof k){if(D.bodyUsed)throw new TypeError("Already read");this.url=D.url,this.credentials=D.credentials,_.headers||(this.headers=new m(D.headers)),this.method=D.method,this.mode=D.mode,this.signal=D.signal,!z&&D._bodyInit!=null&&(z=D._bodyInit,D.bodyUsed=!0)}else this.url=String(D);if(this.credentials=_.credentials||this.credentials||"same-origin",(_.headers||!this.headers)&&(this.headers=new m(_.headers)),this.method=A(_.method||this.method||"GET"),this.mode=_.mode||this.mode||null,this.signal=_.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&z)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(z),(this.method==="GET"||this.method==="HEAD")&&(_.cache==="no-store"||_.cache==="no-cache")){var F=/([?&])_=[^&]*/;if(F.test(this.url))this.url=this.url.replace(F,"$1_="+new Date().getTime());else{var V=/\?/;this.url+=(V.test(this.url)?"&":"?")+"_="+new Date().getTime()}}}k.prototype.clone=function(){return new k(this,{body:this._bodyInit})};function O(D){var _=new FormData;return D.trim().split("&").forEach(function(z){if(z){var F=z.split("="),V=F.shift().replace(/\+/g," "),U=F.join("=").replace(/\+/g," ");_.append(decodeURIComponent(V),decodeURIComponent(U))}}),_}function $(D){var _=new m,z=D.replace(/\r?\n[\t ]+/g," ");return z.split("\r").map(function(F){return F.indexOf(` -`)===0?F.substr(1,F.length):F}).forEach(function(F){var V=F.split(":"),U=V.shift().trim();if(U){var q=V.join(":").trim();_.append(U,q)}}),_}T.call(k.prototype);function N(D,_){if(!(this instanceof N))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');_||(_={}),this.type="default",this.status=_.status===void 0?200:_.status,this.ok=this.status>=200&&this.status<300,this.statusText=_.statusText===void 0?"":""+_.statusText,this.headers=new m(_.headers),this.url=_.url||"",this._initBody(D)}T.call(N.prototype),N.prototype.clone=function(){return new N(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new m(this.headers),url:this.url})},N.error=function(){var D=new N(null,{status:0,statusText:""});return D.type="error",D};var L=[301,302,303,307,308];N.redirect=function(D,_){if(L.indexOf(_)===-1)throw new RangeError("Invalid status code");return new N(null,{status:_,headers:{location:D}})},a.DOMException=s.DOMException;try{new a.DOMException}catch{a.DOMException=function(_,z){this.message=_,this.name=z;var F=Error(_);this.stack=F.stack},a.DOMException.prototype=Object.create(Error.prototype),a.DOMException.prototype.constructor=a.DOMException}function j(D,_){return new Promise(function(z,F){var V=new k(D,_);if(V.signal&&V.signal.aborted)return F(new a.DOMException("Aborted","AbortError"));var U=new XMLHttpRequest;function q(){U.abort()}U.onload=function(){var ie={status:U.status,statusText:U.statusText,headers:$(U.getAllResponseHeaders()||"")};ie.url="responseURL"in U?U.responseURL:ie.headers.get("X-Request-URL");var ee="response"in U?U.response:U.responseText;setTimeout(function(){z(new N(ee,ie))},0)},U.onerror=function(){setTimeout(function(){F(new TypeError("Network request failed"))},0)},U.ontimeout=function(){setTimeout(function(){F(new TypeError("Network request failed"))},0)},U.onabort=function(){setTimeout(function(){F(new a.DOMException("Aborted","AbortError"))},0)};function X(ie){try{return ie===""&&s.location.href?s.location.href:ie}catch{return ie}}U.open(V.method,X(V.url),!0),V.credentials==="include"?U.withCredentials=!0:V.credentials==="omit"&&(U.withCredentials=!1),"responseType"in U&&(l.blob?U.responseType="blob":l.arrayBuffer&&V.headers.get("Content-Type")&&V.headers.get("Content-Type").indexOf("application/octet-stream")!==-1&&(U.responseType="arraybuffer")),_&&typeof _.headers=="object"&&!(_.headers instanceof m)?Object.getOwnPropertyNames(_.headers).forEach(function(ie){U.setRequestHeader(ie,p(_.headers[ie]))}):V.headers.forEach(function(ie,ee){U.setRequestHeader(ee,ie)}),V.signal&&(V.signal.addEventListener("abort",q),U.onreadystatechange=function(){U.readyState===4&&V.signal.removeEventListener("abort",q)}),U.send(typeof V._bodyInit>"u"?null:V._bodyInit)})}return j.polyfill=!0,s.fetch||(s.fetch=j,s.Headers=m,s.Request=k,s.Response=N),a.Headers=m,a.Request=k,a.Response=N,a.fetch=j,a})({})})(r),r.fetch.ponyfill=!0,delete r.fetch.polyfill;var o=n.fetch?n:r;t=o.fetch,t.default=o.fetch,t.fetch=o.fetch,t.Headers=o.Headers,t.Request=o.Request,t.Response=o.Response,e.exports=t}(kP,kP.exports)),kP.exports}(function(e,t){var n;if(typeof fetch=="function"&&(typeof ea<"u"&&ea.fetch?n=ea.fetch:typeof window<"u"&&window.fetch?n=window.fetch:n=fetch),typeof w5t<"u"&&typeof window>"u"){var r=n||x5t();r.default&&(r=r.default),t.default=r,e.exports=t.default}})(pj,pj.exports);var Lhe=pj.exports;const Fhe=Bn(Lhe),lJ=MJ({__proto__:null,default:Fhe},[Lhe]);function cJ(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function uJ(e){for(var t=1;t"u"&&typeof global<"u"&&typeof global.process<"u"&&global.process.versions&&global.process.versions.node&&(i["User-Agent"]="i18next-http-backend (node/".concat(global.process.version,"; ").concat(global.process.platform," ").concat(global.process.arch,")")),r&&(i["Content-Type"]="application/json");var a=typeof t.requestOptions=="function"?t.requestOptions(r):t.requestOptions,s=uJ({method:r?"POST":"GET",body:r?t.stringify(r):void 0,headers:i},fJ?{}:a),l=typeof t.alternateFetch=="function"&&t.alternateFetch.length>=1?t.alternateFetch:void 0;try{dJ(n,s,o,l)}catch(c){if(!a||Object.keys(a).length===0||!c.message||c.message.indexOf("not implemented")<0)return o(c);try{Object.keys(a).forEach(function(u){delete s[u]}),dJ(n,s,o,l),fJ=!0}catch(u){o(u)}}},T5t=function(t,n,r,o){r&&kg(r)==="object"&&(r=hj("",r).slice(1)),t.queryStringParams&&(n=hj(n,t.queryStringParams));try{var i;dC?i=new dC:i=new XO("MSXML2.XMLHTTP.3.0"),i.open(r?"POST":"GET",n,1),t.crossDomain||i.setRequestHeader("X-Requested-With","XMLHttpRequest"),i.withCredentials=!!t.withCredentials,r&&i.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),i.overrideMimeType&&i.overrideMimeType("application/json");var a=t.customHeaders;if(a=typeof a=="function"?a():a,a)for(var s in a)i.setRequestHeader(s,a[s]);i.onreadystatechange=function(){i.readyState>3&&o(i.status>=400?i.statusText:null,{status:i.status,data:i.responseText})},i.send(r)}catch(l){console&&console.log(l)}},I5t=function(t,n,r,o){if(typeof r=="function"&&(o=r,r=void 0),o=o||function(){},gd&&n.indexOf("file:")!==0)return P5t(t,n,r,o);if(Nhe()||typeof ActiveXObject=="function")return T5t(t,n,r,o);o(new Error("No fetch and no xhr implementation found!"))};function mb(e){"@babel/helpers - typeof";return mb=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},mb(e)}function pJ(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function j_(e){for(var t=1;t1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};O5t(this,e),this.services=t,this.options=n,this.allOptions=r,this.type="backend",this.init(t,n,r)}return k5t(e,[{key:"init",value:function(n){var r=this,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(this.services=n,this.options=j_(j_(j_({},R5t()),this.options||{}),o),this.allOptions=i,this.services&&this.options.reloadInterval){var a=setInterval(function(){return r.reload()},this.options.reloadInterval);mb(a)==="object"&&typeof a.unref=="function"&&a.unref()}}},{key:"readMulti",value:function(n,r,o){this._readAny(n,n,r,r,o)}},{key:"read",value:function(n,r,o){this._readAny([n],n,[r],r,o)}},{key:"_readAny",value:function(n,r,o,i,a){var s=this,l=this.options.loadPath;typeof this.options.loadPath=="function"&&(l=this.options.loadPath(n,o)),l=b5t(l),l.then(function(c){if(!c)return a(null,{});var u=s.services.interpolator.interpolate(c,{lng:n.join("+"),ns:o.join("+")});s.loadUrl(u,a,r,i)})}},{key:"loadUrl",value:function(n,r,o,i){var a=this,s=typeof o=="string"?[o]:o,l=typeof i=="string"?[i]:i,c=this.options.parseLoadPayload(s,l);this.options.request(this.options,n,c,function(u,d){if(d&&(d.status>=500&&d.status<600||!d.status))return r("failed loading "+n+"; status code: "+d.status,!0);if(d&&d.status>=400&&d.status<500)return r("failed loading "+n+"; status code: "+d.status,!1);if(!d&&u&&u.message){var f=u.message.toLowerCase(),p=["failed","fetch","network","load"].find(function(y){return f.indexOf(y)>-1});if(p)return r("failed loading "+n+": "+u.message,!0)}if(u)return r(u,!1);var h,m;try{typeof d.data=="string"?h=a.options.parse(d.data,o,i):h=d.data}catch{m="failed parsing "+n+" to json"}if(m)return r(m,!1);r(null,h)})}},{key:"create",value:function(n,r,o,i,a){var s=this;if(this.options.addPath){typeof n=="string"&&(n=[n]);var l=this.options.parsePayload(r,o,i),c=0,u=[],d=[];n.forEach(function(f){var p=s.options.addPath;typeof s.options.addPath=="function"&&(p=s.options.addPath(f,r));var h=s.services.interpolator.interpolate(p,{lng:f,ns:r});s.options.request(s.options,h,l,function(m,y){c+=1,u.push(m),d.push(y),c===n.length&&typeof a=="function"&&a(u,d)})})}}},{key:"reload",value:function(){var n=this,r=this.services,o=r.backendConnector,i=r.languageUtils,a=r.logger,s=o.language;if(!(s&&s.toLowerCase()==="cimode")){var l=[],c=function(d){var f=i.toResolveHierarchy(d);f.forEach(function(p){l.indexOf(p)<0&&l.push(p)})};c(s),this.allOptions.preload&&this.allOptions.preload.forEach(function(u){return c(u)}),l.forEach(function(u){n.allOptions.ns.forEach(function(d){o.read(u,d,"read",null,null,function(f,p){f&&a.warn("loading namespace ".concat(d," for language ").concat(u," failed"),f),!f&&p&&a.log("loaded namespace ".concat(d," for language ").concat(u),p),o.loaded("".concat(u,"|").concat(d),f,p)})})})}}}])}();zhe.type="backend";ji.use(zhe).use(_he).use(VNe).init({load:"languageOnly",detection:{order:["path","navigator","htmlTag"]},fallbackLng:"en",interpolation:{escapeValue:!1},backend:{loadPath:"/static/react/locales/{{lng}}/{{ns}}.json"}});const em=new FEe({defaultOptions:{queries:{retry:3,staleTime:1e3*60*5,refetchOnMount:!0,refetchOnWindowFocus:!0,refetchOnReconnect:"always"}}}),D5=e=>{const t=document.getElementById(e);if(t===null)return;const n=t.attachShadow({mode:"open"}),r=document.createElement("div"),o=document.createElement("style"),i=document.getElementById("react-css");if(i){const l=document.createElement("link");l.setAttribute("rel","stylesheet"),l.setAttribute("href",i.href),n.appendChild(i)}n.appendChild(r),n.appendChild(o);const a=XJ({key:"css",prepend:!0,container:o});Fd(r).render(b(rSe,{value:a,children:b(v.Suspense,{fallback:b(gs,{}),children:b(PH,{children:b(yp,{theme:uLt(r),children:b(Mg,{client:em,children:b($5,{})})})})})}))},hJ=document.getElementById("root");hJ&&Fd(hJ).render(b(Y.StrictMode,{children:b(v.Suspense,{fallback:b(gs,{}),children:b(PH,{children:b(yp,{theme:Wp,children:K(Mg,{client:em,children:[b(_Ht,{}),b(ePe,{})]})})})})}));const gJ=document.getElementById("react-weight-overview");gJ&&Fd(gJ).render(b(v.Suspense,{fallback:b(gs,{}),children:b(yp,{theme:Wp,children:b(Mg,{client:em,children:b(Fde,{})})})}));const mJ=document.getElementById("react-weight-dashboard");mJ&&Fd(mJ).render(b(v.Suspense,{fallback:b(gs,{}),children:b(yp,{theme:Wp,children:b(Mg,{client:em,children:b(Cde,{})})})}));const yJ=document.getElementById("react-nutrition-dashboard");yJ&&Fd(yJ).render(b(v.Suspense,{fallback:b(gs,{}),children:b(yp,{theme:Wp,children:b(Mg,{client:em,children:b(Bue,{})})})}));const vJ=document.getElementById("react-routine-dashboard");vJ&&Fd(vJ).render(b(v.Suspense,{fallback:b(gs,{}),children:b(yp,{theme:Wp,children:b(Mg,{client:em,children:b(ode,{})})})}));D5("react-exercise-overview");D5("react-exercise-contribute");const bJ=document.getElementById("react-exercise-detail");bJ&&Fd(bJ).render(b(v.Suspense,{fallback:b(gs,{}),children:b(PH,{children:b(yp,{theme:Wp,children:b(Mg,{client:em,children:b($5,{})})})})}));D5("react-page");const wJ=document.getElementById("react-ingredient-search");wJ&&Fd(wJ).render(b(v.Suspense,{fallback:b(gs,{}),children:b(yp,{theme:Wp,children:b(oPt,{})})}))});export default $5t(); + `}}];return{always:Aw(a,"always"),resting:Aw(a,"resting"),dragging:Aw(a,"dragging"),dropAnimating:Aw(a,"dropAnimating"),userCancel:Aw(a,"userCancel")}};const Ss=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?v.useLayoutEffect:v.useEffect,F_=()=>{const e=document.querySelector("head");return e||pt(),e},FX=e=>{const t=document.createElement("style");return e&&t.setAttribute("nonce",e),t.type="text/css",t};function Zzt(e,t){const n=Hn(()=>Jzt(e),[e]),r=v.useRef(null),o=v.useRef(null),i=Bt(ri(d=>{const f=o.current;f||pt(),f.textContent=d}),[]),a=Bt(d=>{const f=r.current;f||pt(),f.textContent=d},[]);Ss(()=>{!r.current&&!o.current||pt();const d=FX(t),f=FX(t);return r.current=d,o.current=f,d.setAttribute(`${mb}-always`,e),f.setAttribute(`${mb}-dynamic`,e),F_().appendChild(d),F_().appendChild(f),a(n.always),i(n.resting),()=>{const p=h=>{const m=h.current;m||pt(),F_().removeChild(m),h.current=null};p(r),p(o)}},[t,a,i,n.always,n.resting,e]);const s=Bt(()=>i(n.dragging),[i,n.dragging]),l=Bt(d=>{if(d==="DROP"){i(n.dropAnimating);return}i(n.userCancel)},[i,n.dropAnimating,n.userCancel]),c=Bt(()=>{o.current&&i(n.resting)},[i,n.resting]);return Hn(()=>({dragging:s,dropping:l,resting:c}),[s,l,c])}function xhe(e,t){return Array.from(e.querySelectorAll(t))}var She=e=>e&&e.ownerDocument&&e.ownerDocument.defaultView?e.ownerDocument.defaultView:window;function lR(e){return e instanceof She(e).HTMLElement}function eVt(e,t){const n=`[${yb.contextId}="${e}"]`,r=xhe(document,n);if(!r.length)return null;const o=r.find(i=>i.getAttribute(yb.draggableId)===t);return!o||!lR(o)?null:o}function tVt(e){const t=v.useRef({}),n=v.useRef(null),r=v.useRef(null),o=v.useRef(!1),i=Bt(function(f,p){const h={id:f,focus:p};return t.current[f]=h,function(){const y=t.current;y[f]!==h&&delete y[f]}},[]),a=Bt(function(f){const p=eVt(e,f);p&&p!==document.activeElement&&p.focus()},[e]),s=Bt(function(f,p){n.current===f&&(n.current=p)},[]),l=Bt(function(){r.current||o.current&&(r.current=requestAnimationFrame(()=>{r.current=null;const f=n.current;f&&a(f)}))},[a]),c=Bt(function(f){n.current=null;const p=document.activeElement;p&&p.getAttribute(yb.draggableId)===f&&(n.current=f)},[]);return Ss(()=>(o.current=!0,function(){o.current=!1;const f=r.current;f&&cancelAnimationFrame(f)}),[]),Hn(()=>({register:i,tryRecordFocus:c,tryRestoreFocusRecorded:l,tryShiftRecord:s}),[i,c,l,s])}function nVt(){const e={draggables:{},droppables:{}},t=[];function n(d){return t.push(d),function(){const p=t.indexOf(d);p!==-1&&t.splice(p,1)}}function r(d){t.length&&t.forEach(f=>f(d))}function o(d){return e.draggables[d]||null}function i(d){const f=o(d);return f||pt(),f}const a={register:d=>{e.draggables[d.descriptor.id]=d,r({type:"ADDITION",value:d})},update:(d,f)=>{const p=e.draggables[f.descriptor.id];p&&p.uniqueId===d.uniqueId&&(delete e.draggables[f.descriptor.id],e.draggables[d.descriptor.id]=d)},unregister:d=>{const f=d.descriptor.id,p=o(f);p&&d.uniqueId===p.uniqueId&&(delete e.draggables[f],e.droppables[d.descriptor.droppableId]&&r({type:"REMOVAL",value:d}))},getById:i,findById:o,exists:d=>!!o(d),getAllByType:d=>Object.values(e.draggables).filter(f=>f.descriptor.type===d)};function s(d){return e.droppables[d]||null}function l(d){const f=s(d);return f||pt(),f}const c={register:d=>{e.droppables[d.descriptor.id]=d},unregister:d=>{const f=s(d.descriptor.id);f&&d.uniqueId===f.uniqueId&&delete e.droppables[d.descriptor.id]},getById:l,findById:s,exists:d=>!!s(d),getAllByType:d=>Object.values(e.droppables).filter(f=>f.descriptor.type===d)};function u(){e.draggables={},e.droppables={},t.length=0}return{draggable:a,droppable:c,subscribe:n,clean:u}}function rVt(){const e=Hn(nVt,[]);return v.useEffect(()=>function(){e.clean()},[e]),e}var $H=Y.createContext(null),nA=()=>{const e=document.body;return e||pt(),e};const oVt={position:"absolute",width:"1px",height:"1px",margin:"-1px",border:"0",padding:"0",overflow:"hidden",clip:"rect(0 0 0 0)","clip-path":"inset(100%)"},iVt=e=>`rfd-announcement-${e}`;function aVt(e){const t=Hn(()=>iVt(e),[e]),n=v.useRef(null);return v.useEffect(function(){const i=document.createElement("div");return n.current=i,i.id=t,i.setAttribute("aria-live","assertive"),i.setAttribute("aria-atomic","true"),JO(i.style,oVt),nA().appendChild(i),function(){setTimeout(function(){const l=nA();l.contains(i)&&l.removeChild(i),i===n.current&&(n.current=null)})}},[t]),Bt(o=>{const i=n.current;if(i){i.textContent=o;return}},[])}const sVt={separator:"::"};function DH(e,t=sVt){const n=Y.useId();return Hn(()=>`${e}${t.separator}${n}`,[t.separator,e,n])}function lVt({contextId:e,uniqueId:t}){return`rfd-hidden-text-${e}-${t}`}function cVt({contextId:e,text:t}){const n=DH("hidden-text",{separator:"-"}),r=Hn(()=>lVt({contextId:e,uniqueId:n}),[n,e]);return v.useEffect(function(){const i=document.createElement("div");return i.id=r,i.textContent=t,i.style.display="none",nA().appendChild(i),function(){const s=nA();s.contains(i)&&s.removeChild(i)}},[r,t]),r}var cR=Y.createContext(null);function Che(e){const t=v.useRef(e);return v.useEffect(()=>{t.current=e}),t}function uVt(){let e=null;function t(){return!!e}function n(a){return a===e}function r(a){e&&pt();const s={abandon:a};return e=s,s}function o(){e||pt(),e=null}function i(){e&&(e.abandon(),o())}return{isClaimed:t,isActive:n,claim:r,release:o,tryAbandon:i}}function gC(e){return e.phase==="IDLE"||e.phase==="DROP_ANIMATING"?!1:e.isDragging}const dVt=9,fVt=13,_H=27,Ehe=32,pVt=33,hVt=34,gVt=35,mVt=36,yVt=37,vVt=38,bVt=39,wVt=40,xVt={[fVt]:!0,[dVt]:!0};var Phe=e=>{xVt[e.keyCode]&&e.preventDefault()};const uR=(()=>{const e="visibilitychange";return typeof document>"u"?e:[e,`ms${e}`,`webkit${e}`,`moz${e}`,`o${e}`].find(r=>`on${r}`in document)||e})(),The=0,jX=5;function SVt(e,t){return Math.abs(t.x-e.x)>=jX||Math.abs(t.y-e.y)>=jX}const BX={type:"IDLE"};function CVt({cancel:e,completed:t,getPhase:n,setPhase:r}){return[{eventName:"mousemove",fn:o=>{const{button:i,clientX:a,clientY:s}=o;if(i!==The)return;const l={x:a,y:s},c=n();if(c.type==="DRAGGING"){o.preventDefault(),c.actions.move(l);return}c.type!=="PENDING"&&pt();const u=c.point;if(!SVt(u,l))return;o.preventDefault();const d=c.actions.fluidLift(l);r({type:"DRAGGING",actions:d})}},{eventName:"mouseup",fn:o=>{const i=n();if(i.type!=="DRAGGING"){e();return}o.preventDefault(),i.actions.drop({shouldBlockNextClick:!0}),t()}},{eventName:"mousedown",fn:o=>{n().type==="DRAGGING"&&o.preventDefault(),e()}},{eventName:"keydown",fn:o=>{if(n().type==="PENDING"){e();return}if(o.keyCode===_H){o.preventDefault(),e();return}Phe(o)}},{eventName:"resize",fn:e},{eventName:"scroll",options:{passive:!0,capture:!1},fn:()=>{n().type==="PENDING"&&e()}},{eventName:"webkitmouseforcedown",fn:o=>{const i=n();if(i.type==="IDLE"&&pt(),i.actions.shouldRespectForcePress()){e();return}o.preventDefault()}},{eventName:uR,fn:e}]}function EVt(e){const t=v.useRef(BX),n=v.useRef(tp),r=Hn(()=>({eventName:"mousedown",fn:function(d){if(d.defaultPrevented||d.button!==The||d.ctrlKey||d.metaKey||d.shiftKey||d.altKey)return;const f=e.findClosestDraggableId(d);if(!f)return;const p=e.tryGetLock(f,a,{sourceEvent:d});if(!p)return;d.preventDefault();const h={x:d.clientX,y:d.clientY};n.current(),c(p,h)}}),[e]),o=Hn(()=>({eventName:"webkitmouseforcewillbegin",fn:u=>{if(u.defaultPrevented)return;const d=e.findClosestDraggableId(u);if(!d)return;const f=e.findOptionsForDraggable(d);f&&(f.shouldRespectForcePress||e.canGetLock(d)&&u.preventDefault())}}),[e]),i=Bt(function(){const d={passive:!1,capture:!0};n.current=bl(window,[o,r],d)},[o,r]),a=Bt(()=>{t.current.type!=="IDLE"&&(t.current=BX,n.current(),i())},[i]),s=Bt(()=>{const u=t.current;a(),u.type==="DRAGGING"&&u.actions.cancel({shouldBlockNextClick:!0}),u.type==="PENDING"&&u.actions.abort()},[a]),l=Bt(function(){const d={capture:!0,passive:!1},f=CVt({cancel:s,completed:a,getPhase:()=>t.current,setPhase:p=>{t.current=p}});n.current=bl(window,f,d)},[s,a]),c=Bt(function(d,f){t.current.type!=="IDLE"&&pt(),t.current={type:"PENDING",point:f,actions:d},l()},[l]);Ss(function(){return i(),function(){n.current()}},[i])}function PVt(){}const TVt={[hVt]:!0,[pVt]:!0,[mVt]:!0,[gVt]:!0};function IVt(e,t){function n(){t(),e.cancel()}function r(){t(),e.drop()}return[{eventName:"keydown",fn:o=>{if(o.keyCode===_H){o.preventDefault(),n();return}if(o.keyCode===Ehe){o.preventDefault(),r();return}if(o.keyCode===wVt){o.preventDefault(),e.moveDown();return}if(o.keyCode===vVt){o.preventDefault(),e.moveUp();return}if(o.keyCode===bVt){o.preventDefault(),e.moveRight();return}if(o.keyCode===yVt){o.preventDefault(),e.moveLeft();return}if(TVt[o.keyCode]){o.preventDefault();return}Phe(o)}},{eventName:"mousedown",fn:n},{eventName:"mouseup",fn:n},{eventName:"click",fn:n},{eventName:"touchstart",fn:n},{eventName:"resize",fn:n},{eventName:"wheel",fn:n,options:{passive:!0}},{eventName:uR,fn:n}]}function OVt(e){const t=v.useRef(PVt),n=Hn(()=>({eventName:"keydown",fn:function(i){if(i.defaultPrevented||i.keyCode!==Ehe)return;const a=e.findClosestDraggableId(i);if(!a)return;const s=e.tryGetLock(a,u,{sourceEvent:i});if(!s)return;i.preventDefault();let l=!0;const c=s.snapLift();t.current();function u(){l||pt(),l=!1,t.current(),r()}t.current=bl(window,IVt(c,u),{capture:!0,passive:!1})}}),[e]),r=Bt(function(){const i={passive:!1,capture:!0};t.current=bl(window,[n],i)},[n]);Ss(function(){return r(),function(){t.current()}},[r])}const j_={type:"IDLE"},AVt=120,kVt=.15;function MVt({cancel:e,getPhase:t}){return[{eventName:"orientationchange",fn:e},{eventName:"resize",fn:e},{eventName:"contextmenu",fn:n=>{n.preventDefault()}},{eventName:"keydown",fn:n=>{if(t().type!=="DRAGGING"){e();return}n.keyCode===_H&&n.preventDefault(),e()}},{eventName:uR,fn:e}]}function RVt({cancel:e,completed:t,getPhase:n}){return[{eventName:"touchmove",options:{capture:!1},fn:r=>{const o=n();if(o.type!=="DRAGGING"){e();return}o.hasMoved=!0;const{clientX:i,clientY:a}=r.touches[0],s={x:i,y:a};r.preventDefault(),o.actions.move(s)}},{eventName:"touchend",fn:r=>{const o=n();if(o.type!=="DRAGGING"){e();return}r.preventDefault(),o.actions.drop({shouldBlockNextClick:!0}),t()}},{eventName:"touchcancel",fn:r=>{if(n().type!=="DRAGGING"){e();return}r.preventDefault(),e()}},{eventName:"touchforcechange",fn:r=>{const o=n();o.type==="IDLE"&&pt();const i=r.touches[0];if(!i||!(i.force>=kVt))return;const s=o.actions.shouldRespectForcePress();if(o.type==="PENDING"){s&&e();return}if(s){if(o.hasMoved){r.preventDefault();return}e();return}r.preventDefault()}},{eventName:uR,fn:e}]}function $Vt(e){const t=v.useRef(j_),n=v.useRef(tp),r=Bt(function(){return t.current},[]),o=Bt(function(p){t.current=p},[]),i=Hn(()=>({eventName:"touchstart",fn:function(p){if(p.defaultPrevented)return;const h=e.findClosestDraggableId(p);if(!h)return;const m=e.tryGetLock(h,s,{sourceEvent:p});if(!m)return;const y=p.touches[0],{clientX:w,clientY:x}=y,S={x:w,y:x};n.current(),d(m,S)}}),[e]),a=Bt(function(){const p={capture:!0,passive:!1};n.current=bl(window,[i],p)},[i]),s=Bt(()=>{const f=t.current;f.type!=="IDLE"&&(f.type==="PENDING"&&clearTimeout(f.longPressTimerId),o(j_),n.current(),a())},[a,o]),l=Bt(()=>{const f=t.current;s(),f.type==="DRAGGING"&&f.actions.cancel({shouldBlockNextClick:!0}),f.type==="PENDING"&&f.actions.abort()},[s]),c=Bt(function(){const p={capture:!0,passive:!1},h={cancel:l,completed:s,getPhase:r},m=bl(window,RVt(h),p),y=bl(window,MVt(h),p);n.current=function(){m(),y()}},[l,r,s]),u=Bt(function(){const p=r();p.type!=="PENDING"&&pt();const h=p.actions.fluidLift(p.point);o({type:"DRAGGING",actions:h,hasMoved:!1})},[r,o]),d=Bt(function(p,h){r().type!=="IDLE"&&pt();const m=setTimeout(u,AVt);o({type:"PENDING",point:h,actions:p,longPressTimerId:m}),c()},[c,r,o,u]);Ss(function(){return a(),function(){n.current();const h=r();h.type==="PENDING"&&(clearTimeout(h.longPressTimerId),o(j_))}},[r,a,o]),Ss(function(){return bl(window,[{eventName:"touchmove",fn:()=>{},options:{capture:!1,passive:!1}}])},[])}const DVt=["input","button","textarea","select","option","optgroup","video","audio"];function Ihe(e,t){if(t==null)return!1;if(DVt.includes(t.tagName.toLowerCase()))return!0;const r=t.getAttribute("contenteditable");return r==="true"||r===""?!0:t===e?!1:Ihe(e,t.parentElement)}function _Vt(e,t){const n=t.target;return lR(n)?Ihe(e,n):!1}var NVt=e=>bc(e.getBoundingClientRect()).center;function LVt(e){return e instanceof She(e).Element}const FVt=(()=>{const e="matches";return typeof document>"u"?e:[e,"msMatchesSelector","webkitMatchesSelector"].find(r=>r in Element.prototype)||e})();function Ohe(e,t){return e==null?null:e[FVt](t)?e:Ohe(e.parentElement,t)}function jVt(e,t){return e.closest?e.closest(t):Ohe(e,t)}function BVt(e){return`[${yb.contextId}="${e}"]`}function zVt(e,t){const n=t.target;if(!LVt(n))return null;const r=BVt(e),o=jVt(n,r);return!o||!lR(o)?null:o}function VVt(e,t){const n=zVt(e,t);return n?n.getAttribute(yb.draggableId):null}function HVt(e,t){const n=`[${pj.contextId}="${e}"]`,o=xhe(document,n).find(i=>i.getAttribute(pj.id)===t);return!o||!lR(o)?null:o}function UVt(e){e.preventDefault()}function FP({expected:e,phase:t,isLockActive:n,shouldWarn:r}){return!(!n()||e!==t)}function Ahe({lockAPI:e,store:t,registry:n,draggableId:r}){if(e.isClaimed())return!1;const o=n.draggable.findById(r);return!(!o||!o.options.isEnabled||!yhe(t.getState(),r))}function WVt({lockAPI:e,contextId:t,store:n,registry:r,draggableId:o,forceSensorStop:i,sourceEvent:a}){if(!Ahe({lockAPI:e,store:n,registry:r,draggableId:o}))return null;const l=r.draggable.getById(o),c=HVt(t,l.descriptor.id);if(!c||a&&!l.options.canDragInteractiveElements&&_Vt(c,a))return null;const u=e.claim(i||tp);let d="PRE_DRAG";function f(){return l.options.shouldRespectForcePress}function p(){return e.isActive(u)}function h(P,T){FP({expected:P,phase:d,isLockActive:p,shouldWarn:!0})&&n.dispatch(T())}const m=h.bind(null,"DRAGGING");function y(P){function T(){e.release(),d="COMPLETED"}d!=="PRE_DRAG"&&(T(),pt()),n.dispatch(jBt(P.liftActionArgs)),d="DRAGGING";function I(A,k={shouldBlockNextClick:!1}){if(P.cleanup(),k.shouldBlockNextClick){const O=bl(window,[{eventName:"click",fn:UVt,options:{once:!0,passive:!1,capture:!0}}]);setTimeout(O)}T(),n.dispatch(che({reason:A}))}return{isActive:()=>FP({expected:"DRAGGING",phase:d,isLockActive:p,shouldWarn:!1}),shouldRespectForcePress:f,drop:A=>I("DROP",A),cancel:A=>I("CANCEL",A),...P.actions}}function w(P){const T=cC(A=>{m(()=>lhe({client:A}))});return{...y({liftActionArgs:{id:o,clientSelection:P,movementMode:"FLUID"},cleanup:()=>T.cancel(),actions:{move:T}}),move:T}}function x(){const P={moveUp:()=>m(KBt),moveRight:()=>m(QBt),moveDown:()=>m(YBt),moveLeft:()=>m(XBt)};return y({liftActionArgs:{id:o,clientSelection:NVt(c),movementMode:"SNAP"},cleanup:tp,actions:P})}function S(){FP({expected:"PRE_DRAG",phase:d,isLockActive:p,shouldWarn:!0})&&e.release()}return{isActive:()=>FP({expected:"PRE_DRAG",phase:d,isLockActive:p,shouldWarn:!1}),shouldRespectForcePress:f,fluidLift:w,snapLift:x,abort:S}}const GVt=[EVt,OVt,$Vt];function qVt({contextId:e,store:t,registry:n,customSensors:r,enableDefaultSensors:o}){const i=[...o?GVt:[],...r||[]],a=v.useState(()=>uVt())[0],s=Bt(function(y,w){gC(y)&&!gC(w)&&a.tryAbandon()},[a]);Ss(function(){let y=t.getState();return t.subscribe(()=>{const x=t.getState();s(y,x),y=x})},[a,t,s]),Ss(()=>a.tryAbandon,[a.tryAbandon]);const l=Bt(m=>Ahe({lockAPI:a,registry:n,store:t,draggableId:m}),[a,n,t]),c=Bt((m,y,w)=>WVt({lockAPI:a,registry:n,contextId:e,store:t,draggableId:m,forceSensorStop:y||null,sourceEvent:w&&w.sourceEvent?w.sourceEvent:null}),[e,a,n,t]),u=Bt(m=>VVt(e,m),[e]),d=Bt(m=>{const y=n.draggable.findById(m);return y?y.options:null},[n.draggable]),f=Bt(function(){a.isClaimed()&&(a.tryAbandon(),t.getState().phase!=="IDLE"&&t.dispatch(TH()))},[a,t]),p=Bt(()=>a.isClaimed(),[a]),h=Hn(()=>({canGetLock:l,tryGetLock:c,findClosestDraggableId:u,findOptionsForDraggable:d,tryReleaseLock:f,isLockClaimed:p}),[l,c,u,d,f,p]);for(let m=0;m({onBeforeCapture:t=>{const n=()=>{e.onBeforeCapture&&e.onBeforeCapture(t)};Tb.flushSync(n)},onBeforeDragStart:e.onBeforeDragStart,onDragStart:e.onDragStart,onDragEnd:e.onDragEnd,onDragUpdate:e.onDragUpdate}),YVt=e=>({...hC,...e.autoScrollerOptions,durationDampening:{...hC.durationDampening,...e.autoScrollerOptions}});function kw(e){return e.current||pt(),e.current}function QVt(e){const{contextId:t,setCallbacks:n,sensors:r,nonce:o,dragHandleUsageInstructions:i}=e,a=v.useRef(null),s=Che(e),l=Bt(()=>KVt(s.current),[s]),c=Bt(()=>YVt(s.current),[s]),u=aVt(t),d=cVt({contextId:t,text:i}),f=Zzt(t,o),p=Bt(O=>{kw(a).dispatch(O)},[]),h=Hn(()=>dX({publishWhileDragging:zBt,updateDroppableScroll:HBt,updateDroppableIsEnabled:UBt,updateDroppableIsCombineEnabled:WBt,collectionStarting:VBt},p),[p]),m=rVt(),y=Hn(()=>Mzt(m,h),[m,h]),w=Hn(()=>Kzt({scrollWindow:Rzt,scrollDroppable:y.scrollDroppable,getAutoScrollerOptions:c,...dX({move:lhe},p)}),[y.scrollDroppable,p,c]),x=tVt(t),S=Hn(()=>Izt({announce:u,autoScroller:w,dimensionMarshal:y,focusMarshal:x,getResponders:l,styleMarshal:f}),[u,w,y,x,l,f]);a.current=S;const E=Bt(()=>{const O=kw(a);O.getState().phase!=="IDLE"&&O.dispatch(TH())},[]),P=Bt(()=>{const O=kw(a).getState();return O.phase==="DROP_ANIMATING"?!0:O.phase==="IDLE"?!1:O.isDragging},[]),T=Hn(()=>({isDragging:P,tryAbort:E}),[P,E]);n(T);const I=Bt(O=>yhe(kw(a).getState(),O),[]),A=Bt(()=>Ih(kw(a).getState()),[]),k=Hn(()=>({marshal:y,focus:x,contextId:t,canLift:I,isMovementAllowed:A,dragHandleUsageInstructionsId:d,registry:m}),[t,y,d,x,I,A,m]);return qVt({contextId:t,store:S,registry:m,customSensors:r||null,enableDefaultSensors:e.enableDefaultSensors!==!1}),v.useEffect(()=>E,[E]),Y.createElement(cR.Provider,{value:k},Y.createElement(wjt,{context:$H,store:S},e.children))}function XVt(){return Y.useId()}function khe(e){const t=XVt(),n=e.dragHandleUsageInstructions||TT.dragHandleUsageInstructions;return Y.createElement(Ajt,null,r=>Y.createElement(QVt,{nonce:e.nonce,contextId:t,setCallbacks:r,dragHandleUsageInstructions:n,enableDefaultSensors:e.enableDefaultSensors,sensors:e.sensors,onBeforeCapture:e.onBeforeCapture,onBeforeDragStart:e.onBeforeDragStart,onDragStart:e.onDragStart,onDragUpdate:e.onDragUpdate,onDragEnd:e.onDragEnd,autoScrollerOptions:e.autoScrollerOptions},e.children))}const zX={dragging:5e3,dropAnimating:4500},JVt=(e,t)=>t?Dx.drop(t.duration):e?Dx.snap:Dx.fluid,ZVt=(e,t)=>{if(e)return t?pC.opacity.drop:pC.opacity.combining},e5t=e=>e.forceShouldAnimate!=null?e.forceShouldAnimate:e.mode==="SNAP";function t5t(e){const n=e.dimension.client,{offset:r,combineWith:o,dropping:i}=e,a=!!o,s=e5t(e),l=!!i,c=l?dj.drop(r,a):dj.moveTo(r);return{position:"fixed",top:n.marginBox.top,left:n.marginBox.left,boxSizing:"border-box",width:n.borderBox.width,height:n.borderBox.height,transition:JVt(s,i),transform:c,opacity:ZVt(a,l),zIndex:l?zX.dropAnimating:zX.dragging,pointerEvents:"none"}}function n5t(e){return{transform:dj.moveTo(e.offset),transition:e.shouldAnimateDisplacement?void 0:"none"}}function r5t(e){return e.type==="DRAGGING"?t5t(e):n5t(e)}function o5t(e,t,n=oi){const r=window.getComputedStyle(t),o=t.getBoundingClientRect(),i=Lpe(o,r),a=XO(i,n),s={client:i,tagName:t.tagName.toLowerCase(),display:r.display},l={x:i.marginBox.width,y:i.marginBox.height};return{descriptor:e,placeholder:s,displaceBy:l,client:i,page:a}}function i5t(e){const t=DH("draggable"),{descriptor:n,registry:r,getDraggableRef:o,canDragInteractiveElements:i,shouldRespectForcePress:a,isEnabled:s}=e,l=Hn(()=>({canDragInteractiveElements:i,shouldRespectForcePress:a,isEnabled:s}),[i,s,a]),c=Bt(p=>{const h=o();return h||pt(),o5t(n,h,p)},[n,o]),u=Hn(()=>({uniqueId:t,descriptor:n,options:l,getDimension:c}),[n,c,l,t]),d=v.useRef(u),f=v.useRef(!0);Ss(()=>(r.draggable.register(d.current),()=>r.draggable.unregister(d.current)),[r.draggable]),Ss(()=>{if(f.current){f.current=!1;return}const p=d.current;d.current=u,r.draggable.update(u,p)},[u,r.draggable])}var NH=Y.createContext(null);function rA(e){const t=v.useContext(e);return t||pt(),t}function a5t(e){e.preventDefault()}const s5t=e=>{const t=v.useRef(null),n=Bt((T=null)=>{t.current=T},[]),r=Bt(()=>t.current,[]),{contextId:o,dragHandleUsageInstructionsId:i,registry:a}=rA(cR),{type:s,droppableId:l}=rA(NH),c=Hn(()=>({id:e.draggableId,index:e.index,type:s,droppableId:l}),[e.draggableId,e.index,s,l]),{children:u,draggableId:d,isEnabled:f,shouldRespectForcePress:p,canDragInteractiveElements:h,isClone:m,mapped:y,dropAnimationFinished:w}=e;if(!m){const T=Hn(()=>({descriptor:c,registry:a,getDraggableRef:r,canDragInteractiveElements:h,shouldRespectForcePress:p,isEnabled:f}),[c,a,r,h,p,f]);i5t(T)}const x=Hn(()=>f?{tabIndex:0,role:"button","aria-describedby":i,"data-rfd-drag-handle-draggable-id":d,"data-rfd-drag-handle-context-id":o,draggable:!1,onDragStart:a5t}:null,[o,i,d,f]),S=Bt(T=>{y.type==="DRAGGING"&&y.dropping&&T.propertyName==="transform"&&Tb.flushSync(w)},[w,y]),E=Hn(()=>{const T=r5t(y),I=y.type==="DRAGGING"&&y.dropping?S:void 0;return{innerRef:n,draggableProps:{"data-rfd-draggable-context-id":o,"data-rfd-draggable-id":d,style:T,onTransitionEnd:I},dragHandleProps:x}},[o,x,d,y,S,n]),P=Hn(()=>({draggableId:c.id,type:c.type,source:{index:c.index,droppableId:c.droppableId}}),[c.droppableId,c.id,c.index,c.type]);return Y.createElement(Y.Fragment,null,u(E,y.snapshot,P))};var Mhe=(e,t)=>e===t,Rhe=e=>{const{combine:t,destination:n}=e;return n?n.droppableId:t?t.droppableId:null};const l5t=e=>e.combine?e.combine.draggableId:null,c5t=e=>e.at&&e.at.type==="COMBINE"?e.at.combine.draggableId:null;function u5t(){const e=ri((o,i)=>({x:o,y:i})),t=ri((o,i,a=null,s=null,l=null)=>({isDragging:!0,isClone:i,isDropAnimating:!!l,dropAnimation:l,mode:o,draggingOver:a,combineWith:s,combineTargetFor:null})),n=ri((o,i,a,s,l=null,c=null,u=null)=>({mapped:{type:"DRAGGING",dropping:null,draggingOver:l,combineWith:c,mode:i,offset:o,dimension:a,forceShouldAnimate:u,snapshot:t(i,s,l,c,null)}}));return(o,i)=>{if(gC(o)){if(o.critical.draggable.id!==i.draggableId)return null;const a=o.current.client.offset,s=o.dimensions.draggables[i.draggableId],l=xs(o.impact),c=c5t(o.impact),u=o.forceShouldAnimate;return n(e(a.x,a.y),o.movementMode,s,i.isClone,l,c,u)}if(o.phase==="DROP_ANIMATING"){const a=o.completed;if(a.result.draggableId!==i.draggableId)return null;const s=i.isClone,l=o.dimensions.draggables[i.draggableId],c=a.result,u=c.mode,d=Rhe(c),f=l5t(c),h={duration:o.dropDuration,curve:OH.drop,moveTo:o.newHomeClientOffset,opacity:f?pC.opacity.drop:null,scale:f?pC.scale.drop:null};return{mapped:{type:"DRAGGING",offset:o.newHomeClientOffset,dimension:l,dropping:h,draggingOver:d,combineWith:f,mode:u,forceShouldAnimate:null,snapshot:t(u,s,d,f,h)}}}return null}}function $he(e=null){return{isDragging:!1,isDropAnimating:!1,isClone:!1,dropAnimation:null,mode:null,draggingOver:null,combineTargetFor:e,combineWith:null}}const d5t={mapped:{type:"SECONDARY",offset:oi,combineTargetFor:null,shouldAnimateDisplacement:!0,snapshot:$he(null)}};function f5t(){const e=ri((a,s)=>({x:a,y:s})),t=ri($he),n=ri((a,s=null,l)=>({mapped:{type:"SECONDARY",offset:a,combineTargetFor:s,shouldAnimateDisplacement:l,snapshot:t(s)}})),r=a=>a?n(oi,a,!0):null,o=(a,s,l,c)=>{const u=l.displaced.visible[a],d=!!(c.inVirtualList&&c.effected[a]),f=iR(l),p=f&&f.draggableId===a?s:null;if(!u){if(!d)return r(p);if(l.displaced.invisible[a])return null;const y=E0(c.displacedBy.point),w=e(y.x,y.y);return n(w,p,!0)}if(d)return r(p);const h=l.displacedBy.point,m=e(h.x,h.y);return n(m,p,u.shouldAnimate)};return(a,s)=>{if(gC(a))return a.critical.draggable.id===s.draggableId?null:o(s.draggableId,a.critical.draggable.id,a.impact,a.afterCritical);if(a.phase==="DROP_ANIMATING"){const l=a.completed;return l.result.draggableId===s.draggableId?null:o(s.draggableId,l.result.draggableId,l.impact,l.afterCritical)}return null}}const p5t=()=>{const e=u5t(),t=f5t();return(r,o)=>e(r,o)||t(r,o)||d5t},h5t={dropAnimationFinished:uhe},g5t=_pe(p5t,h5t,null,{context:$H,areStatePropsEqual:Mhe})(s5t);function Dhe(e){return rA(NH).isUsingCloneFor===e.draggableId&&!e.isClone?null:Y.createElement(g5t,e)}function _he(e){const t=typeof e.isDragDisabled=="boolean"?!e.isDragDisabled:!0,n=!!e.disableInteractiveElementBlocking,r=!!e.shouldRespectForcePress;return Y.createElement(Dhe,JO({},e,{isClone:!1,isEnabled:t,canDragInteractiveElements:n,shouldRespectForcePress:r}))}const Nhe=e=>t=>e===t,m5t=Nhe("scroll"),y5t=Nhe("auto"),VX=(e,t)=>t(e.overflowX)||t(e.overflowY),v5t=e=>{const t=window.getComputedStyle(e),n={overflowX:t.overflowX,overflowY:t.overflowY};return VX(n,m5t)||VX(n,y5t)},b5t=()=>!1,Lhe=e=>e==null?null:e===document.body?b5t()?e:null:e===document.documentElement?null:v5t(e)?e:Lhe(e.parentElement);var hj=e=>({x:e.scrollLeft,y:e.scrollTop});const Fhe=e=>e?window.getComputedStyle(e).position==="fixed"?!0:Fhe(e.parentElement):!1;var w5t=e=>{const t=Lhe(e),n=Fhe(e);return{closestScrollable:t,isFixedOnPage:n}},x5t=({descriptor:e,isEnabled:t,isCombineEnabled:n,isFixedOnPage:r,direction:o,client:i,page:a,closest:s})=>{const l=(()=>{if(!s)return null;const{scrollSize:f,client:p}=s,h=hhe({scrollHeight:f.scrollHeight,scrollWidth:f.scrollWidth,height:p.paddingBox.height,width:p.paddingBox.width});return{pageMarginBox:s.page.marginBox,frameClient:p,scrollSize:f,shouldClipSubject:s.shouldClipSubject,scroll:{initial:s.scroll,current:s.scroll,max:h,diff:{value:oi,displacement:oi}}}})(),c=o==="vertical"?xH:qpe,u=gb({page:a,withPlaceholder:null,axis:c,frame:l});return{descriptor:e,isCombineEnabled:n,isFixedOnPage:r,axis:c,isEnabled:t,client:i,page:a,frame:l,subject:u}};const S5t=(e,t)=>{const n=Fpe(e);if(!t||e!==t)return n;const r=n.paddingBox.top-t.scrollTop,o=n.paddingBox.left-t.scrollLeft,i=r+t.scrollHeight,a=o+t.scrollWidth,l=yH({top:r,right:a,bottom:i,left:o},n.border);return vH({borderBox:l,margin:n.margin,border:n.border,padding:n.padding})};var C5t=({ref:e,descriptor:t,env:n,windowScroll:r,direction:o,isDropDisabled:i,isCombineEnabled:a,shouldClipSubject:s})=>{const l=n.closestScrollable,c=S5t(e,l),u=XO(c,r),d=(()=>{if(!l)return null;const p=Fpe(l),h={scrollHeight:l.scrollHeight,scrollWidth:l.scrollWidth};return{client:p,page:XO(p,r),scroll:hj(l),scrollSize:h,shouldClipSubject:s}})();return x5t({descriptor:t,isEnabled:!i,isCombineEnabled:a,isFixedOnPage:n.isFixedOnPage,direction:o,client:c,page:u,closest:d})};const E5t={passive:!1},P5t={passive:!0};var HX=e=>e.shouldPublishImmediately?E5t:P5t;const jP=e=>e&&e.env.closestScrollable||null;function T5t(e){const t=v.useRef(null),n=rA(cR),r=DH("droppable"),{registry:o,marshal:i}=n,a=Che(e),s=Hn(()=>({id:e.droppableId,type:e.type,mode:e.mode}),[e.droppableId,e.mode,e.type]),l=v.useRef(s),c=Hn(()=>ri((E,P)=>{t.current||pt();const T={x:E,y:P};i.updateDroppableScroll(s.id,T)}),[s.id,i]),u=Bt(()=>{const E=t.current;return!E||!E.env.closestScrollable?oi:hj(E.env.closestScrollable)},[]),d=Bt(()=>{const E=u();c(E.x,E.y)},[u,c]),f=Hn(()=>cC(d),[d]),p=Bt(()=>{const E=t.current,P=jP(E);if(E&&P||pt(),E.scrollOptions.shouldPublishImmediately){d();return}f()},[f,d]),h=Bt((E,P)=>{t.current&&pt();const T=a.current,I=T.getDroppableRef();I||pt();const A=w5t(I),k={ref:I,descriptor:s,env:A,scrollOptions:P};t.current=k;const O=C5t({ref:I,descriptor:s,env:A,windowScroll:E,direction:T.direction,isDropDisabled:T.isDropDisabled,isCombineEnabled:T.isCombineEnabled,shouldClipSubject:!T.ignoreContainerClipping}),$=A.closestScrollable;return $&&($.setAttribute(LX.contextId,n.contextId),$.addEventListener("scroll",p,HX(k.scrollOptions))),O},[n.contextId,s,p,a]),m=Bt(()=>{const E=t.current,P=jP(E);return E&&P||pt(),hj(P)},[]),y=Bt(()=>{const E=t.current;E||pt();const P=jP(E);t.current=null,P&&(f.cancel(),P.removeAttribute(LX.contextId),P.removeEventListener("scroll",p,HX(E.scrollOptions)))},[p,f]),w=Bt(E=>{const P=t.current;P||pt();const T=jP(P);T||pt(),T.scrollTop+=E.y,T.scrollLeft+=E.x},[]),x=Hn(()=>({getDimensionAndWatchScroll:h,getScrollWhileDragging:m,dragStopped:y,scroll:w}),[y,h,m,w]),S=Hn(()=>({uniqueId:r,descriptor:s,callbacks:x}),[x,s,r]);Ss(()=>(l.current=S.descriptor,o.droppable.register(S),()=>{t.current&&y(),o.droppable.unregister(S)}),[x,s,y,S,i,o.droppable]),Ss(()=>{t.current&&i.updateDroppableIsEnabled(l.current.id,!e.isDropDisabled)},[e.isDropDisabled,i]),Ss(()=>{t.current&&i.updateDroppableIsCombineEnabled(l.current.id,e.isCombineEnabled)},[e.isCombineEnabled,i])}function B_(){}const UX={width:0,height:0,margin:_jt},I5t=({isAnimatingOpenOnMount:e,placeholder:t,animate:n})=>e||n==="close"?UX:{height:t.client.borderBox.height,width:t.client.borderBox.width,margin:t.client.margin},O5t=({isAnimatingOpenOnMount:e,placeholder:t,animate:n})=>{const r=I5t({isAnimatingOpenOnMount:e,placeholder:t,animate:n});return{display:t.display,boxSizing:"border-box",width:r.width,height:r.height,marginTop:r.margin.top,marginRight:r.margin.right,marginBottom:r.margin.bottom,marginLeft:r.margin.left,flexShrink:"0",flexGrow:"0",pointerEvents:"none",transition:n!=="none"?Dx.placeholder:null}},A5t=e=>{const t=v.useRef(null),n=Bt(()=>{t.current&&(clearTimeout(t.current),t.current=null)},[]),{animate:r,onTransitionEnd:o,onClose:i,contextId:a}=e,[s,l]=v.useState(e.animate==="open");v.useEffect(()=>s?r!=="open"?(n(),l(!1),B_):t.current?B_:(t.current=setTimeout(()=>{t.current=null,l(!1)}),n):B_,[r,s,n]);const c=Bt(d=>{d.propertyName==="height"&&(o(),r==="close"&&i())},[r,i,o]),u=O5t({isAnimatingOpenOnMount:s,animate:e.animate,placeholder:e.placeholder});return Y.createElement(e.placeholder.tagName,{style:u,"data-rfd-placeholder-context-id":a,onTransitionEnd:c,ref:e.innerRef})};var k5t=Y.memo(A5t);class M5t extends Y.PureComponent{constructor(...t){super(...t),this.state={isVisible:!!this.props.on,data:this.props.on,animate:this.props.shouldAnimate&&this.props.on?"open":"none"},this.onClose=()=>{this.state.animate==="close"&&this.setState({isVisible:!1})}}static getDerivedStateFromProps(t,n){return t.shouldAnimate?t.on?{isVisible:!0,data:t.on,animate:"open"}:n.isVisible?{isVisible:!0,data:n.data,animate:"close"}:{isVisible:!1,animate:"close",data:null}:{isVisible:!!t.on,data:t.on,animate:"none"}}render(){if(!this.state.isVisible)return null;const t={onClose:this.onClose,data:this.state.data,animate:this.state.animate};return this.props.children(t)}}const R5t=e=>{const t=v.useContext(cR);t||pt();const{contextId:n,isMovementAllowed:r}=t,o=v.useRef(null),i=v.useRef(null),{children:a,droppableId:s,type:l,mode:c,direction:u,ignoreContainerClipping:d,isDropDisabled:f,isCombineEnabled:p,snapshot:h,useClone:m,updateViewportMaxScroll:y,getContainerForClone:w}=e,x=Bt(()=>o.current,[]),S=Bt(($=null)=>{o.current=$},[]);Bt(()=>i.current,[]);const E=Bt(($=null)=>{i.current=$},[]),P=Bt(()=>{r()&&y({maxScroll:mhe()})},[r,y]);T5t({droppableId:s,type:l,mode:c,direction:u,isDropDisabled:f,isCombineEnabled:p,ignoreContainerClipping:d,getDroppableRef:x});const T=Hn(()=>Y.createElement(M5t,{on:e.placeholder,shouldAnimate:e.shouldAnimatePlaceholder},({onClose:$,data:N,animate:L})=>Y.createElement(k5t,{placeholder:N,onClose:$,innerRef:E,animate:L,contextId:n,onTransitionEnd:P})),[n,P,e.placeholder,e.shouldAnimatePlaceholder,E]),I=Hn(()=>({innerRef:S,placeholder:T,droppableProps:{"data-rfd-droppable-id":s,"data-rfd-droppable-context-id":n}}),[n,s,T,S]),A=m?m.dragging.draggableId:null,k=Hn(()=>({droppableId:s,type:l,isUsingCloneFor:A}),[s,A,l]);function O(){if(!m)return null;const{dragging:$,render:N}=m,L=Y.createElement(Dhe,{draggableId:$.draggableId,index:$.source.index,isClone:!0,isEnabled:!0,shouldRespectForcePress:!1,canDragInteractiveElements:!0},(j,D)=>N(j,D,$));return zw.createPortal(L,w())}return Y.createElement(NH.Provider,{value:k},a(I,h),O())};function $5t(){return document.body||pt(),document.body}const WX={mode:"standard",type:"DEFAULT",direction:"vertical",isDropDisabled:!1,isCombineEnabled:!1,ignoreContainerClipping:!1,renderClone:null,getContainerForClone:$5t},jhe=e=>{let t={...e},n;for(n in WX)e[n]===void 0&&(t={...t,[n]:WX[n]});return t},z_=(e,t)=>e===t.droppable.type,GX=(e,t)=>t.draggables[e.draggable.id],D5t=()=>{const e={placeholder:null,shouldAnimatePlaceholder:!0,snapshot:{isDraggingOver:!1,draggingOverWith:null,draggingFromThisWith:null,isUsingPlaceholder:!1},useClone:null},t={...e,shouldAnimatePlaceholder:!1},n=ri(i=>({draggableId:i.id,type:i.type,source:{index:i.index,droppableId:i.droppableId}})),r=ri((i,a,s,l,c,u)=>{const d=c.descriptor.id;if(c.descriptor.droppableId===i){const h=u?{render:u,dragging:n(c.descriptor)}:null,m={isDraggingOver:s,draggingOverWith:s?d:null,draggingFromThisWith:d,isUsingPlaceholder:!0};return{placeholder:c.placeholder,shouldAnimatePlaceholder:!1,snapshot:m,useClone:h}}if(!a)return t;if(!l)return e;const p={isDraggingOver:s,draggingOverWith:d,draggingFromThisWith:null,isUsingPlaceholder:!0};return{placeholder:c.placeholder,shouldAnimatePlaceholder:!0,snapshot:p,useClone:null}});return(i,a)=>{const s=jhe(a),l=s.droppableId,c=s.type,u=!s.isDropDisabled,d=s.renderClone;if(gC(i)){const f=i.critical;if(!z_(c,f))return t;const p=GX(f,i.dimensions),h=xs(i.impact)===l;return r(l,u,h,h,p,d)}if(i.phase==="DROP_ANIMATING"){const f=i.completed;if(!z_(c,f.critical))return t;const p=GX(f.critical,i.dimensions);return r(l,u,Rhe(f.result)===l,xs(f.impact)===l,p,d)}if(i.phase==="IDLE"&&i.completed&&!i.shouldFlush){const f=i.completed;if(!z_(c,f.critical))return t;const p=xs(f.impact)===l,h=!!(f.impact.at&&f.impact.at.type==="COMBINE"),m=f.critical.droppable.id===l;return p?h?e:t:m?e:t}return t}},_5t={updateViewportMaxScroll:qBt},N5t=_pe(D5t,_5t,(e,t,n)=>({...jhe(n),...e,...t}),{context:$H,areStatePropsEqual:Mhe})(R5t);var Bhe=N5t;function L5t(e){return nt("MuiLoadingButton",e)}const Wu=it("MuiLoadingButton",["root","label","loading","loadingIndicator","loadingIndicatorCenter","loadingIndicatorStart","loadingIndicatorEnd","endIconLoadingEnd","startIconLoadingStart"]),F5t=e=>{const{loading:t,loadingPosition:n,classes:r}=e,o={root:["root",t&&"loading"],label:["label"],startIcon:[t&&`startIconLoading${Ce(n)}`],endIcon:[t&&`endIconLoading${Ce(n)}`],loadingIndicator:["loadingIndicator",t&&`loadingIndicator${Ce(n)}`]},i=rt(o,L5t,r);return{...r,...i}},j5t=e=>e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"&&e!=="classes",B5t=re(dt,{shouldForwardProp:e=>j5t(e)||e==="classes",name:"MuiLoadingButton",slot:"Root",overridesResolver:(e,t)=>[t.root,t.startIconLoadingStart&&{[`& .${Wu.startIconLoadingStart}`]:t.startIconLoadingStart},t.endIconLoadingEnd&&{[`& .${Wu.endIconLoadingEnd}`]:t.endIconLoadingEnd}]})(Je(({theme:e})=>({display:"inline-flex",[`& .${Wu.startIconLoadingStart}, & .${Wu.endIconLoadingEnd}`]:{transition:e.transitions.create(["opacity"],{duration:e.transitions.duration.short}),opacity:0},variants:[{props:{loadingPosition:"center"},style:{transition:e.transitions.create(["background-color","box-shadow","border-color"],{duration:e.transitions.duration.short}),[`&.${Wu.loading}`]:{color:"transparent"}}},{props:({ownerState:t})=>t.loadingPosition==="start"&&t.fullWidth,style:{[`& .${Wu.startIconLoadingStart}, & .${Wu.endIconLoadingEnd}`]:{transition:e.transitions.create(["opacity"],{duration:e.transitions.duration.short}),opacity:0,marginRight:-8}}},{props:({ownerState:t})=>t.loadingPosition==="end"&&t.fullWidth,style:{[`& .${Wu.startIconLoadingStart}, & .${Wu.endIconLoadingEnd}`]:{transition:e.transitions.create(["opacity"],{duration:e.transitions.duration.short}),opacity:0,marginLeft:-8}}}]}))),z5t=re("span",{name:"MuiLoadingButton",slot:"LoadingIndicator",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.loadingIndicator,t[`loadingIndicator${Ce(n.loadingPosition)}`]]}})(Je(({theme:e})=>({position:"absolute",visibility:"visible",display:"flex",variants:[{props:{loadingPosition:"start",size:"small"},style:{left:10}},{props:({loadingPosition:t,ownerState:n})=>t==="start"&&n.size!=="small",style:{left:14}},{props:{variant:"text",loadingPosition:"start"},style:{left:6}},{props:{loadingPosition:"center"},style:{left:"50%",transform:"translate(-50%)",color:(e.vars||e).palette.action.disabled}},{props:{loadingPosition:"end",size:"small"},style:{right:10}},{props:({loadingPosition:t,ownerState:n})=>t==="end"&&n.size!=="small",style:{right:14}},{props:{variant:"text",loadingPosition:"end"},style:{right:6}},{props:({ownerState:t})=>t.loadingPosition==="start"&&t.fullWidth,style:{position:"relative",left:-10}},{props:({ownerState:t})=>t.loadingPosition==="end"&&t.fullWidth,style:{position:"relative",right:-10}}]}))),qX=re("span",{name:"MuiLoadingButton",slot:"Label",overridesResolver:(e,t)=>[t.label]})({display:"inherit",alignItems:"inherit",justifyContent:"inherit"}),V5t=v.forwardRef(function(t,n){const r=v.useContext(ZB),o=cg(r,t),i=at({props:o,name:"MuiLoadingButton"}),{children:a,disabled:s=!1,id:l,loading:c=!1,loadingIndicator:u,loadingPosition:d="center",variant:f="text",...p}=i,h=ip(l),m=u??R.jsx(gk,{"aria-labelledby":h,color:"inherit",size:16}),y={...i,disabled:s,loading:c,loadingIndicator:m,loadingPosition:d,variant:f},w=F5t(y),x=c?R.jsx(z5t,{className:w.loadingIndicator,ownerState:y,children:m}):null;return R.jsxs(B5t,{disabled:s||c,id:h,ref:n,...p,variant:f,classes:w,ownerState:y,children:[y.loadingPosition==="end"?R.jsx(qX,{className:w.label,children:a}):x,y.loadingPosition==="end"?x:R.jsx(qX,{className:w.label,children:a})]})});function oA(e){const[t,n]=Ns(e.fieldName);return b(nn,{fullWidth:!0,id:e.fieldName,label:e.title,variant:"standard",error:n.touched&&!!n.error,helperText:n.touched&&n.error,...t,...e.fieldProps})}const H5t=e=>{const[t,n]=Le(),r=aCt(e.routineId),[o,i]=v.useState(!1),[a,s]=v.useState(e.day.isRest),l=()=>i(!0),c=()=>i(!1),u=()=>{m({isRest:!a}),s(!a),i(!1)},d=3,f=20,p=1e3,h=Ha().shape({name:ja().max(f,t("forms.maxLength",{chars:f})).min(d,t("forms.minLength",{chars:d})).required("Name is required"),description:ja().max(p,t("forms.maxLength",{chars:p})),isRest:JS(),needsLogsToAdvance:JS()}),m=y=>r.mutate({id:e.day.id,routine:e.routineId,...y.name!==void 0&&{name:y.name},...y.description!==void 0&&{description:y.description},...y.isRest!==void 0&&{is_rest:y.isRest},...y.needsLogsToAdvance!==void 0&&{needs_logs_to_advance:y.needsLogsToAdvance}});return b(wt,{children:b(Va,{initialValues:{name:e.day.name,description:e.day.description,isRest:e.day.isRest,needsLogsToAdvance:e.day.needLogsToAdvance},validationSchema:h,onSubmit:(y,{setSubmitting:w})=>{m(y),w(!1)},initialTouched:{name:!0,description:!0,isRest:!0,needsLogsToAdvance:!0},children:y=>G(pa,{children:[G(Oe,{container:!0,spacing:2,children:[b(Oe,{size:{xs:12,sm:10},children:b(oA,{fieldName:"name",title:"Name",fieldProps:{disabled:a}})}),b(Oe,{size:{xs:12,sm:2},children:b(Mc,{control:b(La,{checked:a,onChange:l}),label:"rest day"})}),b(Oe,{size:12,children:b(oA,{fieldName:"description",title:"Description",fieldProps:{multiline:!0,rows:4,disabled:a}})}),b(Oe,{size:12,children:b(Mc,{disabled:a,control:b(La,{checked:y.values.needsLogsToAdvance,...y.getFieldProps("needsLogsToAdvance")}),label:"Needs logs to advance"})}),b(Oe,{size:12,children:r.isPending?b(V5t,{loading:!0,variant:"contained",color:"primary",children:"Save"}):b(dt,{variant:"contained",color:"primary",type:"submit",disabled:a,children:"Save"})})]}),G(zC,{open:o,onClose:c,children:[b(mk,{children:"Confirm Rest Day Change"}),G(Ov,{children:["Are you sure you want to change this day to a ",a?"non-rest":"rest"," day?"]}),b(Ov,{children:"Please consider that all sets are removed from rest days when the form is saved"}),G(VC,{children:[b(dt,{onClick:c,children:"Cancel"}),b(dt,{onClick:u,children:"Save"})]})]})]})})})};function U5t(e,t,n){var r=this,o=v.useRef(null),i=v.useRef(0),a=v.useRef(null),s=v.useRef([]),l=v.useRef(),c=v.useRef(),u=v.useRef(e),d=v.useRef(!0);u.current=e;var f=typeof window<"u",p=!t&&t!==0&&f;if(typeof e!="function")throw new TypeError("Expected a function");t=+t||0;var h=!!(n=n||{}).leading,m=!("trailing"in n)||!!n.trailing,y="maxWait"in n,w="debounceOnServer"in n&&!!n.debounceOnServer,x=y?Math.max(+n.maxWait||0,t):null;v.useEffect(function(){return d.current=!0,function(){d.current=!1}},[]);var S=v.useMemo(function(){var E=function(O){var $=s.current,N=l.current;return s.current=l.current=null,i.current=O,c.current=u.current.apply(N,$)},P=function(O,$){p&&cancelAnimationFrame(a.current),a.current=p?requestAnimationFrame(O):setTimeout(O,$)},T=function(O){if(!d.current)return!1;var $=O-o.current;return!o.current||$>=t||$<0||y&&O-i.current>=x},I=function(O){return a.current=null,m&&s.current?E(O):(s.current=l.current=null,c.current)},A=function O(){var $=Date.now();if(T($))return I($);if(d.current){var N=t-($-o.current),L=y?Math.min(N,x-($-i.current)):N;P(O,L)}},k=function(){if(f||w){var O=Date.now(),$=T(O);if(s.current=[].slice.call(arguments),l.current=r,o.current=O,$){if(!a.current&&d.current)return i.current=o.current,P(A,t),h?E(o.current):c.current;if(y)return P(A,t),E(o.current)}return a.current||P(A,t),c.current}};return k.cancel=function(){a.current&&(p?cancelAnimationFrame(a.current):clearTimeout(a.current)),i.current=0,s.current=o.current=l.current=a.current=null},k.isPending=function(){return!!a.current},k.flush=function(){return a.current?I(Date.now()):c.current},k},[h,y,t,x,m,p,f,w]);return S}function W5t(e,t){return e===t}function G5t(e,t,n){var r=W5t,o=v.useRef(e),i=v.useState({})[1],a=U5t(v.useCallback(function(l){o.current=l,i({})},[i]),t,n),s=v.useRef(e);return r(s.current,e)||(a(e),s.current=e),[o.current,a]}const q5t=e=>{const t=mCt(e.routineId),[n,r]=v.useState(e.slot.comment),[o]=G5t(n,500),[i,a]=v.useState(!1),s=c=>{a(!0),r(c)},l=()=>{i&&(t.mutate({id:e.slot.id,comment:o}),a(!1))};return b(wt,{children:b(nn,{label:"Comment",variant:"standard",fullWidth:!0,size:"small",value:n,disabled:t.isPending,onChange:c=>s(c.target.value),onBlur:l,InputProps:{endAdornment:t.isPending&&b(ld,{})}})})},F1={weight:{edit:jSt,add:BSt,delete:zSt},"max-weight":{edit:VSt,add:HSt,delete:USt},reps:{edit:WSt,add:GSt,delete:qSt},"max-reps":{edit:KSt,add:YSt,delete:QSt},sets:{edit:XSt,add:JSt,delete:ZSt},rest:{edit:eCt,add:tCt,delete:nCt},"max-rest":{edit:rCt,add:oCt,delete:iCt},rir:{edit:Yue,add:Que,delete:Xue}},gj=e=>{var h;const{edit:t,add:n,delete:r}=F1[e.type],o=t(e.routineId),i=n(e.routineId),a=r(e.routineId),[s,l]=v.useState(((h=e.config)==null?void 0:h.value)||""),[c,u]=v.useState(null),d=m=>{const y={slot_entry:e.slotEntryId,value:parseFloat(m)};m===""?e.config&&a.mutate(e.config.id):e.config?o.mutate({id:e.config.id,...y}):i.mutate({iteration:1,operation:Tk,step:"abs",need_log_to_apply:!1,...y})},f=m=>{l(m!==""?parseFloat(m):""),c&&clearTimeout(c),u(setTimeout(()=>d(m),Cje))},p=o.isPending||i.isPending||a.isPending;return b(wt,{children:b(nn,{inputProps:{"data-testid":`${e.type}-field`},label:e.type,value:s,fullWidth:!0,variant:"standard",disabled:p,onChange:m=>f(m.target.value),InputProps:{endAdornment:p&&b(ld,{})}})})},K5t=e=>{const{add:t}=F1[e.type],n=t(e.routineId);return b(wt,{children:b(vn,{size:"small",onClick:()=>{n.mutate({slot_entry:e.slotEntryId,iteration:e.iteration,value:0,operation:Tk,need_log_to_apply:!1})},disabled:n.isPending,children:b(Vo,{})})})},Y5t=e=>{const{delete:t}=F1[e.type],n=t(e.routineId);return b(vn,{size:"small",onClick:()=>{n.mutate(e.configId)},disabled:n.isPending,children:b(T1,{})})},Q5t=e=>{var i;const t=[{value:"+",label:"Add"},{value:"-",label:"Subtract"},{value:Tk,label:"Replace"}],{edit:n}=F1[e.type],r=n(e.routineId),o=a=>{r.mutate({id:e.config.id,operation:a})};return b(wt,{children:b(nn,{sx:{width:100},select:!0,label:"Operation",value:(i=e.config)==null?void 0:i.operation,variant:"standard",disabled:r.isPending,onChange:a=>o(a.target.value),children:t.map(a=>b(rn,{value:a.value,selected:a.value===e.config.operation,children:a.label},a.value))})})},X5t=e=>{var a;const{edit:t}=F1[e.type],n=t(e.routineId),[r,o]=v.useState((a=e.config)==null?void 0:a.needLogToApply),i=s=>{o(s),n.mutate({id:e.config.id,need_log_to_apply:s})};return b(La,{checked:r,onChange:s=>i(s.target.checked),disabled:n.isPending})},J5t=e=>{var a;const t=Yue(e.routineId),n=Xue(e.routineId),r=Que(e.routineId),o=[{value:"",label:"-/-"},...[0,.5,1,1.5,2,2.5,3,3.5,4].map(s=>({value:s.toString(),label:s.toString()})),{value:"4.5",label:"4+"}],i=s=>{const l={value:parseFloat(s)};s===""?e.config&&n.mutate(e.config.id):e.config!==void 0?t.mutate({id:e.config.id,...l}):r.mutate({slot_entry:e.slotEntryId,iteration:1,operation:Tk,need_log_to_apply:!1,...l})};return b(wt,{children:b(nn,{fullWidth:!0,select:!0,label:"RiR",variant:"standard",defaultValue:"",value:(a=e.config)==null?void 0:a.value,disabled:t.isPending,onChange:s=>i(s.target.value),children:o.map(s=>b(rn,{value:s.value,children:s.label},s.value))})})},Z5t=e=>{const t=NM(e.routineId),n=[{value:"normal",label:"Normal set"},{value:"dropset",label:"Drop set"},{value:"myo",label:"Myo"},{value:"partial",label:"Partial"},{value:"forced",label:"Forced"},{value:"tut",label:"TUT"},{value:"iso",label:"ISO"},{value:"jump",label:"Jump"}],r=o=>{t.mutate({id:e.slotEntry.id,type:o})};return b(wt,{children:b(nn,{fullWidth:!0,select:!0,label:"Type",variant:"standard",value:e.slotEntry.type,disabled:t.isPending,onChange:o=>r(o.target.value),children:n.map(o=>b(rn,{value:o.value,children:o.label},o.value))})})},eHt=e=>{var i;const t=NM(e.routineId),n=hCt();if(n.isLoading)return b(ld,{});const r=(i=n.data)==null?void 0:i.map(a=>({value:a.id,label:a.name})),o=a=>{t.mutate({id:e.slotEntry.id,repetition_unit:parseInt(a)})};return b(wt,{children:b(nn,{fullWidth:!0,select:!0,label:"Unit",variant:"standard",value:e.slotEntry.repetitionUnitId,disabled:t.isPending,onChange:a=>o(a.target.value),children:r.map(a=>b(rn,{value:a.value,children:a.label},a.value))})})},tHt=e=>{var a;const t=NM(e.routineId),n=pCt(),r=Ul();if(n.isLoading||r.isLoading)return b(ld,{});const o=(a=n.data)==null?void 0:a.map(s=>({value:s.id,label:s.name})),i=s=>{t.mutate({id:e.slotEntry.id,weight_unit:parseInt(s)})};return b(wt,{children:b(nn,{fullWidth:!0,select:!0,label:"Unit",variant:"standard",value:e.slotEntry.weightUnitId,disabled:t.isPending,onChange:s=>i(s.target.value),children:o.map(s=>b(rn,{value:s.value,children:s.label},s.value))})})},Uc=(e,t,n,r)=>t.length>0?b(gj,{config:t[0],type:e,routineId:n}):b(gj,{type:e,routineId:n,slotEntryId:r}),nHt=e=>G(wt,{children:[e.slot.configs.length===0&&b(kl,{severity:"warning",children:"This set has no exercises yet."}),e.slot.configs.map(t=>b(rHt,{slotEntry:t,routineId:e.routineId,simpleMode:e.simpleMode},t.id))]}),rHt=e=>{var u;const{i18n:t}=Le(),[n,r]=v.useState(!1),o=()=>r(!n),i=Bp(),a=NM(e.routineId),s=fCt(e.routineId),l=d=>{d!==null&&(a.mutate({id:e.slotEntry.id,exercise:d.data.base_id}),r(!1))};let c;return i.isSuccess&&(c=Fb(t.language,i.data)),G(Y.Fragment,{children:[G(Oe,{container:!0,spacing:1,children:[G(Oe,{size:{xs:3,sm:1},children:[b(vn,{size:"small",onClick:o,children:n?b(Vde,{}):b(VM,{})}),b(vn,{size:"small",onClick:()=>s.mutate(e.slotEntry.id),disabled:s.isPending,children:b(zde,{})})]}),b(Oe,{size:{xs:9,sm:3},children:b(ot,{variant:"h6",children:(u=e.slotEntry.exercise)==null?void 0:u.getTranslation(c).name})}),n&&G(Y.Fragment,{children:[b(Oe,{size:{xs:12,sm:8},children:b(rC,{callback:l})}),b(Oe,{size:{xs:12,sm:4}})]}),e.simpleMode?G(Y.Fragment,{children:[b(Oe,{size:{xs:12,sm:2},children:Uc("sets",e.slotEntry.nrOfSetsConfigs,e.routineId,e.slotEntry.id)},`sets-config-${e.slotEntry.id}`),b(Oe,{size:{xs:12,sm:3},children:Uc("weight",e.slotEntry.weightConfigs,e.routineId,e.slotEntry.id)},`weight-config-${e.slotEntry.id}`),b(Oe,{size:{xs:12,sm:3},children:Uc("reps",e.slotEntry.repsConfigs,e.routineId,e.slotEntry.id)},`reps-config-${e.slotEntry.id}`)]}):G(Y.Fragment,{children:[b(Oe,{size:{xs:6,sm:2},children:b(Z5t,{routineId:e.routineId,slotEntry:e.slotEntry})},`slot-config-type-${e.slotEntry.id}`),b(Oe,{size:{xs:6,sm:2},children:Uc("sets",e.slotEntry.nrOfSetsConfigs,e.routineId,e.slotEntry.id)},`sets-config-${e.slotEntry.id}`),b(Oe,{size:{xs:6,sm:1},children:Uc("rest",e.slotEntry.restTimeConfigs,e.routineId,e.slotEntry.id)},`rest-config-${e.slotEntry.id}`),b(Oe,{size:{xs:6,sm:1},children:Uc("max-rest",e.slotEntry.maxRestTimeConfigs,e.routineId,e.slotEntry.id)},`max-rest-config-${e.slotEntry.id}`),b(Oe,{size:{xs:12,sm:2},children:b(J5t,{routineId:e.routineId,config:e.slotEntry.rirConfigs.length>0?e.slotEntry.rirConfigs[0]:void 0,slotEntryId:e.slotEntry.id})},`rir-config-${e.slotEntry.id}`),b(Oe,{size:{xs:12,sm:4}}),b(Oe,{size:{xs:12,sm:2},children:b(eHt,{slotEntry:e.slotEntry,routineId:e.routineId})},`slot-config-rep-unit-${e.slotEntry.id}`),b(Oe,{size:{xs:6,sm:1},children:Uc("reps",e.slotEntry.repsConfigs,e.routineId,e.slotEntry.id)},`reps-config-${e.slotEntry.id}`),b(Oe,{size:{xs:6,sm:1},children:Uc("max-reps",e.slotEntry.maxRepsConfigs,e.routineId,e.slotEntry.id)},`max-reps-config-${e.slotEntry.id}`),b(Oe,{size:{xs:12,sm:2},children:b(tHt,{slotEntry:e.slotEntry,routineId:e.routineId})},`slot-config-weight-unit-${e.slotEntry.id}`),b(Oe,{size:{xs:6,sm:1},children:Uc("weight",e.slotEntry.weightConfigs,e.routineId,e.slotEntry.id)},`weight-config-${e.slotEntry.id}`),b(Oe,{size:{xs:6,sm:1},children:Uc("max-weight",e.slotEntry.maxWeightConfigs,e.routineId,e.slotEntry.id)},`max-weight-config-${e.slotEntry.id}`)]})]}),b(en,{height:10})]})},oHt=e=>{const{t}=Le(),n=Xg(e.routineId),r=sCt(e.routineId),o=lCt(e.routineId),i=u=>{if(!u.destination)return;const d=Array.from(n.data.days),[f]=d.splice(u.source.index,1);d.splice(u.destination.index,0,f),n.data.days=d,r.mutate(d.map((p,h)=>({id:p.id,order:h+1})))},a=8,s=(u,d)=>({padding:a,margin:`0 0 ${a}px 0`,...d}),l=u=>({background:u?"lightblue":void 0,display:"flex",padding:a,overflow:"auto"});return G(Oe,{spacing:3,container:!0,direction:"row",children:[b(khe,{onDragEnd:i,children:b(Bhe,{droppableId:"dayDroppable",direction:"horizontal",children:(u,d)=>G("div",{...u.droppableProps,ref:u.innerRef,style:l(d.isDraggingOver),children:[n.data.days.map((f,p)=>b(_he,{draggableId:f.id.toString(),index:p,children:(h,m)=>b("div",{ref:h.innerRef,...h.draggableProps,...h.dragHandleProps,style:s(m.isDragging,h.draggableProps.style??{}),children:b(iHt,{day:f,routineId:e.routineId,setSelected:e.setSelectedDay,isSelected:e.selectedDay===f.id},`card-${f.id}`)})},f.id)),u.placeholder]})})}),b(Oe,{size:{xs:12,sm:6,md:3},children:b(to,{children:b(Lne,{sx:{minHeight:175},onClick:()=>{const u={routine:e.routineId,name:t("routines.newDay"),order:n.data.days.length+1,is_rest:!1,needs_logs_to_advance:!1};o.mutate(u)},children:G(ni,{children:[t("routines.addDay"),b("br",{}),o.isPending?b(ld,{}):b(Vo,{})]})})})})]})},iHt=e=>{const t=no(),r={backgroundColor:e.isSelected?t.palette.info.light:e.day.isRest?t.palette.action.disabled:"",aspectRatio:"4 / 3",minHeight:175,maxWidth:200},[o]=Le(),i=cCt(e.routineId),[a,s]=v.useState(!1),l=()=>{e.isSelected?e.setSelected(null):e.setSelected(e.day.id)},c=()=>s(!0),u=()=>{e.setSelected(null),i.mutate(e.day.id),s(!1)},d=()=>s(!1);return G(Y.Fragment,{children:[G(to,{sx:r,children:[b(jl,{title:e.day.isRest?o("routines.restDay"):e.day.name}),b(ni,{children:b(ot,{sx:{mb:1.5},color:"text.secondary",children:e.day.isRest&&b(oIt,{})})}),G(Ds,{children:[b(vn,{onClick:l,children:e.isSelected?b(Vde,{}):b(VM,{})}),b(vn,{onClick:c,children:i.isPending?b(ld,{}):b(T1,{})})]})]}),G(zC,{open:a,onClose:d,children:[b(mk,{children:"Confirm Delete"}),b(Ov,{children:"Are you sure you want to delete this day? This action cannot be undone."}),G(VC,{children:[b(dt,{onClick:d,children:"Cancel"}),b(dt,{onClick:u,color:"error",children:"Delete"})]})]})]})},aHt=e=>{const[t,n]=Le(),r=vCt(e.routineId),o=dCt(e.routineId),i=gCt(e.routineId),a=yCt(e.routineId),s=Ul(),l=no(),[c,u]=v.useState(!1),[d,f]=v.useState(null),[p,h]=v.useState(null),[m,y]=v.useState(!0),w=(k,O)=>{p!==null&&(O==="timeout"?(r.mutate(p.id),h(null)):O!=="clickaway"&&(e.day.slots=[...e.day.slots,p].sort(($,N)=>$.order-N.order),h(null))),u(!1)},x=k=>{const O=e.day.slots.findIndex($=>$.id===k);if(O!==-1){const $=[...e.day.slots],[N]=$.splice(O,1);e.day.slots=$,h(N),u(!0)}},S=k=>{if(e.day.slots.find($=>$.id===k)===void 0){console.info(`Could not find slot with id ${k} to add config`);return}f(d===k?null:k)},E=()=>i.mutate({day:e.day.id,order:e.day.slots.length+1}),P=8,T=k=>{if(!k.destination)return;const O=Array.from(e.day.slots),[$]=O.splice(k.source.index,1);O.splice(k.destination.index,0,$),a.mutate(O.map((N,L)=>({id:N.id,order:L+1}))),e.day.slots=O},I=k=>({background:k?"lightblue":void 0}),A=(k,O)=>({border:k?`2px solid ${l.palette.grey[900]}`:`1px solid ${l.palette.grey[300]}`,backgroundColor:"white",marginBottom:P,...O});return G(wt,{children:[b(ot,{variant:"h4",children:e.day.name}),b(en,{height:30}),b(H5t,{routineId:e.routineId,day:e.day},`day-form-${e.day.id}`),b(en,{height:40}),b(Mc,{control:b(La,{checked:m,onChange:()=>y(!m)}),label:t("routines.simpleMode")}),b(en,{height:20}),b(khe,{onDragEnd:T,children:b(Bhe,{droppableId:"setDroppable",direction:"vertical",children:(k,O)=>b("div",{...k.droppableProps,ref:k.innerRef,style:I(O.isDraggingOver),children:e.day.slots.map(($,N)=>G(Y.Fragment,{children:[b(_he,{draggableId:$.id.toString(),index:N,children:(L,j)=>G(Oe,{container:!0,spacing:1,ref:L.innerRef,...L.draggableProps,style:A(j.isDragging,L.draggableProps.style??{}),children:[b(Oe,{sx:{backgroundColor:l.palette.grey[100]},size:12,children:G(Oe,{container:!0,justifyContent:"space-between",alignItems:"center",children:[b(Oe,{children:G(ot,{variant:"h5",children:[e.day.slots.length>1&&b(vn,{onClick:()=>x($.id),...L.dragHandleProps,children:b(nIt,{})}),b(vn,{onClick:()=>x($.id),children:b(T1,{})}),"Set ",N+1]})}),b(Oe,{children:$.configs.length>0&&G(fN,{variant:"outlined",children:[b(dt,{onClick:()=>S($.id),size:"small",disabled:o.isPending,startIcon:o.isPending?b(ld,{}):b(Vo,{}),children:t("routines.addSuperset")}),$.configs.length>0&&b(dt,{startIcon:b(fIt,{}),component:ia,size:"small",to:Mn(Tn.ROUTINE_EDIT_PROGRESSION,n.language,{id:e.routineId,id2:$.id}),children:t("routines.editProgression")})]})})]})}),!m&&G(Oe,{size:12,children:[b(q5t,{routineId:e.routineId,slot:$},`slot-form-${$.id}`),b(en,{height:10})]}),b(Oe,{size:12,children:b(nHt,{slot:$,routineId:e.routineId,simpleMode:m})}),d===$.id&&G(Oe,{size:12,children:[b(en,{height:20}),b(rC,{callback:D=>{D!==null&&(o.mutate({slot:$.id,exercise:D.data.base_id,type:"normal",order:$.configs.length+1,weight_unit:s.data.useMetric?Nre:Lre}),f(null))}})]}),b(Oe,{size:12,children:$.configs.length===0&&b(fN,{children:b(dt,{onClick:()=>S($.id),size:"small",disabled:o.isPending,startIcon:o.isPending?b(ld,{}):b(Vo,{}),children:t("routines.addExercise")})})})]})},$.id),b(en,{height:0,children:k.placeholder})]},`slot-${$.id}-${N}`))})})}),b(az,{open:c,autoHideDuration:yz,onClose:w,children:b(kl,{severity:"success",variant:"filled",sx:{width:"100%"},action:b(dt,{color:"warning",variant:"contained",size:"small",onClick:w,children:t("undo")}),children:"Set successfully deleted"})}),b(dt,{variant:"contained",color:"primary",startIcon:i.isPending?b(ld,{}):b(Vo,{}),onClick:E,children:t("routines.addSet")})]})},zhe=({routine:e,closeFn:t})=>{const[n,r]=Le(),o=NSt(),i=LSt(e==null?void 0:e.id),a=Ld(),[s,l]=v.useState(e?vt.fromJSDate(e.start):vt.now()),[c,u]=v.useState(e?vt.fromJSDate(e.end):vt.now().plus({weeks:lje})),d=3,f=25,p=1e3,h=Ha({name:ja().required().max(f,n("forms.maxLength",{chars:f})).min(d,n("forms.minLength",{chars:d})),description:ja().max(p,n("forms.maxLength",{chars:p})),start:Tg().required(),end:Tg().required().min(pSt("start"),n("forms.endBeforeStart")).test("hasMinimumDuration",n("routines.minLengthRoutine",{number:OG}),function(m){const y=this.parent.start;if(y&&m){const w=vt.fromJSDate(y);return vt.fromJSDate(m).diff(w,"weeks").weeks>=OG}return!0}).test("hasMaximumDuration",n("routines.maxLengthRoutine",{number:AG}),function(m){const y=this.parent.start;if(y&&m){const w=vt.fromJSDate(y);return vt.fromJSDate(m).diff(w,"weeks").weeks<=AG}return!0}),fitInWeek:JS()});return b(Va,{initialValues:{name:e?e.name:"",description:e?e.description:"",start:s,end:c,fitInWeek:e?e.fitInWeek:!1},validationSchema:h,onSubmit:async m=>{var y,w,x,S;if(e)i.mutate({...m,fit_in_week:m.fitInWeek,start:(y=m.start)==null?void 0:y.toISODate(),end:(w=m.end)==null?void 0:w.toISODate(),id:e.id});else{const E=await o.mutateAsync({...m,fit_in_week:m.fitInWeek,start:(x=m.start)==null?void 0:x.toISODate(),end:(S=m.end)==null?void 0:S.toISODate()});a(Mn(Tn.ROUTINE_EDIT,r.language,{id:E.id})),t&&t()}},children:m=>b(pa,{children:G(Oe,{container:!0,spacing:2,children:[b(Oe,{size:{xs:12,sm:6},children:b(oA,{fieldName:"name",title:n("name")})}),b(Oe,{size:{xs:6,sm:3},children:b(Cg,{dateAdapter:ub,adapterLocale:r.language,children:b(TO,{defaultValue:vt.now(),label:n("start"),value:s,onChange:y=>{y&&m.setFieldValue("start",y),l(y)},slotProps:{textField:{variant:"standard",fullWidth:!0,error:m.touched.start&&!!m.errors.start,helperText:m.touched.start&&m.errors.start}}})})}),b(Oe,{size:{xs:6,sm:3},children:b(Cg,{dateAdapter:ub,adapterLocale:r.language,children:b(TO,{defaultValue:vt.now(),label:n("end"),value:c,onChange:y=>{y&&m.setFieldValue("end",y),u(y)},slotProps:{textField:{variant:"standard",fullWidth:!0,error:m.touched.end&&!!m.errors.end,helperText:m.touched.end&&m.errors.end}}})})}),b(Oe,{size:12,children:b(oA,{fieldName:"description",title:n("description"),fieldProps:{multiline:!0,rows:4}})}),b(Oe,{size:12,children:b(Mc,{control:b(La,{checked:m.values.fitInWeek,...m.getFieldProps("fitInWeek")}),label:"Fit days in week."})}),b(Oe,{size:12,children:b(dt,{disabled:m.isSubmitting,color:"primary",variant:"contained",type:"submit",sx:{mt:2},children:n("submit")})})]})})})},sHt=()=>{var s;const{t:e,i18n:t}=Le(),n=Lc(),r=n.routineId?parseInt(n.routineId):0,o=Xg(r),[i,a]=v.useState(null);return o.isLoading?b(mo,{}):b(wt,{children:G(kc,{maxWidth:"lg",children:[G(Oe,{container:!0,children:[b(Oe,{size:10,children:b(ot,{variant:"h4",children:e("editName",{name:(s=o.data)==null?void 0:s.name})})}),b(Oe,{size:2,children:b(dt,{component:ia,variant:"outlined",size:"small",to:Mn(Tn.ROUTINE_DETAIL,t.language,{id:r}),children:e("routines.backToRoutine")})}),b(Oe,{size:12,children:b(zhe,{routine:o.data})}),G(Oe,{size:12,children:[b(en,{height:20}),b(oHt,{routineId:r,selectedDay:i,setSelectedDay:a})]}),b(Oe,{size:12,children:i!==null&&b(aHt,{day:o.data.days.find(l=>l.id===i),routineId:r})})]}),G(Wt,{spacing:2,sx:{mt:2},children:[b(ot,{variant:"h4",children:e("routines.resultingRoutine")}),G(en,{padding:4,children:[b(b1t,{}),b(en,{height:20}),b(Tpe,{})]})]})]})})},vh=e=>b(Y.Fragment,{children:G(Oe,{size:{md:12,lg:6},children:[b(ot,{variant:"h6",gutterBottom:!0,children:e.type}),G($l,{size:"small",children:[b(Eu,{children:G(Ht,{children:[b(Ie,{}),b(Ie,{}),b(Ie,{children:"Value"}),b(Ie,{children:"Operation"}),b(Ie,{children:"Require logs"})]})}),b(Dl,{children:e.iterations.map(t=>{const n=e.slotEntry[e.objectKey].find(r=>r.iteration===t);return G(Ht,{children:[G(Ie,{children:["workout #",t]}),b(Ie,{children:n?b(Y5t,{configId:n.id,routineId:e.routineId,type:e.type}):b(K5t,{type:e.type,routineId:e.routineId,slotEntryId:e.slotEntry.id,iteration:t})}),b(Ie,{children:n&&b(gj,{config:n,type:e.type,routineId:e.routineId,slotEntryId:e.slotEntry.id})}),b(Ie,{children:n&&b(Q5t,{config:n,type:e.type,routineId:e.routineId,slotEntryId:e.slotEntry.id})}),b(Ie,{children:n&&b(X5t,{config:n,type:e.type,routineId:e.routineId,slotEntryId:e.slotEntry.id})})]},t)})})]})]})}),lHt=()=>{const{i18n:e}=Le(),t=Lc(),n=t.routineId?parseInt(t.routineId):-1,r=t.slotId?parseInt(t.slotId):-1,o=Xg(n),i=Bp();if(o.isLoading)return b(mo,{});const a=o.data;let s;i.isSuccess&&(s=Fb(e.language,i.data));let l=null;for(const u of a.days){const d=u.slots.find(f=>f.id===r);if(d){l=d;break}}if(l===null)return b("p",{children:"Slot not found!"});const c=Object.keys(a.groupedDayDataByIteration).map(Number);return b(wt,{children:G(kc,{maxWidth:"lg",children:[" ",G(Oe,{container:!0,children:[b(Oe,{size:10,children:G(ot,{variant:"h4",children:["Edit progression for slot #",r]})}),b(Oe,{size:2,children:b(dt,{component:ia,variant:"outlined",size:"small",to:Mn(Tn.ROUTINE_EDIT,e.language,{id:n}),children:"back to routine edit"})})]}),b(en,{height:30}),l.configs.map(u=>{var d;return G(Y.Fragment,{children:[b(ot,{variant:"h5",gutterBottom:!0,children:(d=u.exercise)==null?void 0:d.getTranslation(s).name}),G(Oe,{container:!0,spacing:2,children:[b(vh,{objectKey:"weightConfigs",type:"weight",routineId:n,slotEntry:u,iterations:c}),b(vh,{objectKey:"maxWeightConfigs",type:"max-weight",routineId:n,slotEntry:u,iterations:c}),b(vh,{objectKey:"repsConfigs",type:"reps",routineId:n,slotEntry:u,iterations:c}),b(vh,{objectKey:"maxRepsConfigs",type:"max-reps",routineId:n,slotEntry:u,iterations:c}),b(vh,{objectKey:"nrOfSetsConfigs",type:"sets",routineId:n,slotEntry:u,iterations:c}),b(vh,{objectKey:"restTimeConfigs",type:"rest",routineId:n,slotEntry:u,iterations:c}),b(vh,{objectKey:"maxRestTimeConfigs",type:"max-rest",routineId:n,slotEntry:u,iterations:c})]})]},u.id)})]})})},cHt=e=>{var u;const[t,n]=Le(),[r,o]=Y.useState(null),i=!!r,a=d=>{o(d.currentTarget)},s=()=>{o(null)},l=()=>window.location.href=Mn(Tn.ROUTINE_EDIT_LOG,n.language,{id:e.log.id}),c=()=>window.location.href=Mn(Tn.ROUTINE_DELETE_LOG,n.language,{id:e.log.id});return G(Ht,{children:[b(Ie,{component:"th",scope:"row",children:vt.fromJSDate(e.log.date).toLocaleString(vt.DATE_MED)}),b(Ie,{children:e.log.reps}),G(Ie,{children:[e.log.weight,(u=e.log.weightUnitObj)==null?void 0:u.name]}),b(Ie,{children:e.log.rirString}),G(Ie,{children:[b(vn,{"aria-label":"settings",onClick:a,children:b(H5,{fontSize:"small"})}),G(_s,{id:"basic-menu",anchorEl:r,open:i,onClose:s,MenuListProps:{"aria-labelledby":"basic-button"},children:[G(rn,{onClick:l,children:[b(VM,{}),t("edit")]}),G(rn,{onClick:c,children:[b(T1,{}),t("delete")]})]})]})]},e.log.id)},uHt=e=>{let t=e.logEntries??[];const n=[5,10,20],[r,o]=Y.useState(n[0]),[i,a]=Y.useState(0),s=(c,u)=>{a(u)},l=c=>{o(parseInt(c.target.value,10)),a(0)};return G(wt,{children:[b(ot,{variant:"h6",sx:{mt:4},children:e.exercise.getTranslation().name}),G(Oe,{container:!0,spacing:2,children:[b(Oe,{size:{xs:12,md:5},children:G($c,{children:[G($l,{"aria-label":"simple table",size:"small",children:[b(Eu,{children:G(Ht,{children:[b(Ie,{children:"Date"}),b(Ie,{children:"Reps"}),b(Ie,{children:"Weight"}),b(Ie,{children:"RiR"}),b(Ie,{})]})}),b(Dl,{children:t.slice(i*r,i*r+r).map(c=>b(cHt,{log:c},c.id))})]}),b(sz,{rowsPerPageOptions:n,component:"div",count:t.length,rowsPerPage:r,page:i,onPageChange:s,onRowsPerPageChange:l})]})}),b(Oe,{size:{xs:12,md:7},children:b(pHt,{data:t},e.exercise.id)})]})]})},KX=()=>{const e=Lc(),t=e.routineId?parseInt(e.routineId):0,[n,r]=Le(),o=uCt(t,!1),i=Xg(t),a=l=>window.location.href=Mn(Tn.ROUTINE_ADD_LOG,r.language,{id:l});let s=new Map;return o.isSuccess&&(s=o.data.reduce(function(l,c){return l.set(c.exerciseId,l.get(c.exerciseId)||[]),[Nre,Lre].includes(c.weightUnitId)&&c.repetitionUnitId===cje&&l.get(c.exerciseId).push(c),l},new Map)),b(wt,{children:G(kc,{maxWidth:"lg",children:[b(ot,{variant:"h4",children:n("routines.logsHeader")}),b(ot,{variant:"body1",children:n("routines.logsFilterNote")}),o.isSuccess&&i.isSuccess?b(wt,{children:i.data.dayDataCurrentIteration.map((l,c)=>{var u;return G(Y.Fragment,{children:[G(Wt,{direction:{xs:"column",sm:"row"},justifyContent:"space-between",alignItems:"center",sx:{mt:4},children:[b(ot,{variant:"h4",children:(u=l.day)==null?void 0:u.name}),b(dt,{variant:"contained",onClick:()=>{var d;return a((d=l.day)==null?void 0:d.id)},children:n("routines.addLogToDay")})]}),l.slots.map(d=>d.exercises.map(f=>b(uHt,{exercise:f,logEntries:s.get(f.id)},f.id)))]},c)})}):b(mo,{})]})})},dHt=e=>e.map(t=>({id:t.id,value:t.weight,time:t.date.getTime(),entry:t})),fHt=({active:e,payload:t,label:n})=>{var r,o,i;if(e){let a="";return(r=t==null?void 0:t[1].payload)!=null&&r.entry.rir&&(a=`, ${(o=t==null?void 0:t[1].payload)==null?void 0:o.entry.rir} RiR`),b(to,{children:G(ni,{children:[b(ot,{variant:"body1",children:vt.fromMillis(t==null?void 0:t[0].value).toLocaleString(vt.DATE_MED)}),G(ot,{variant:"body2",children:[(i=t==null?void 0:t[1].payload)==null?void 0:i.entry.reps," × ",t==null?void 0:t[1].value,t==null?void 0:t[1].unit,a]})]})})}return null},pHt=e=>{let t;t=e.data.reduce(function(r,o){return r.set(o.reps,r.get(o.reps)||[]),r.get(o.reps).push(o),r},new Map);const n=rR(t.size);return b(en,{children:b($p,{width:"100%",height:250,children:G(sut,{children:[b(Vl,{dataKey:"time",domain:["auto","auto"],name:"Time",tickFormatter:r=>vt.fromMillis(r).toLocaleString(vt.DATE_MED),type:"number"}),b(Hl,{domain:["auto","auto"],dataKey:"value",name:"Value",unit:"kg"}),Array.from(t).map(([r,o])=>{const i=n.next().value,a=dHt(o);return b(c1,{data:a,fill:i,line:{stroke:i},lineType:"joint",lineJointType:"monotoneX",name:r.toString()},r)}),b(ss,{content:b(fHt,{})}),b(zg,{strokeDasharray:"3 3"}),b(ud,{})]})})})},hHt=()=>{const[e]=Le(),[t,n]=Y.useState(!1),r=()=>n(!0),o=()=>n(!1);return G("div",{children:[b(Ng,{color:"secondary","aria-label":"add",onClick:r,sx:{position:"fixed",bottom:"5rem",right:i=>i.spacing(2),zIndex:9},children:b(Vo,{})}),b(Fi,{title:e("add"),isOpen:t,closeFn:o,children:b(zhe,{closeFn:o})})]})},gHt=e=>{const[t,n]=Le(),r=Mn(Tn.ROUTINE_DETAIL,n.language,{id:e.routine.id});return G(wt,{children:[b(Os,{sx:{p:0},children:G(Ip,{component:"a",href:r,children:[b(ko,{primary:e.routine.name!==""?e.routine.name:t("routines.routine"),secondary:`${e.routine.start.toLocaleDateString()} - ${e.routine.end.toLocaleDateString()}`}),b(Bde,{})]})}),b(Is,{component:"li"})]})},YX=()=>{const e=DSt(),[t]=Le();return e.isLoading?b(mo,{}):b(Fd,{title:t("routines.routines"),mainContent:b(wt,{children:e.data.length===0?b(KC,{}):b(ro,{children:b(Bl,{sx:{py:0},children:e.data.map(n=>b(gHt,{routine:n},n.id))},"abc")})}),fab:b(hHt,{})})},V_=()=>b(PIt,{}),LH=()=>G(c1t,{children:[G(Vt,{path:"/:lang",children:[G(Vt,{path:"workout",children:[b(Vt,{path:"overview",element:b(EOt,{})}),b(Vt,{path:"schedule",element:b(POt,{})}),b(Vt,{path:"gallery",element:b(oOt,{})}),G(Vt,{path:"template",children:[b(Vt,{path:"overview",element:b(uOt,{})}),b(Vt,{path:"public",element:b(lOt,{})})]})]}),G(Vt,{path:"routine",children:[b(Vt,{index:!0,element:b(YX,{})}),b(Vt,{path:"overview",element:b(YX,{})}),b(Vt,{path:"calendar",element:b(tOt,{})}),G(Vt,{path:":routineId",children:[b(Vt,{path:"view",element:b(hFt,{})}),G(Vt,{path:"edit",children:[b(Vt,{index:!0,element:b(sHt,{})}),b(Vt,{path:"progression/:slotId",element:b(lHt,{})})]}),b(Vt,{path:"table",element:b(Tpe,{})})]}),b(Vt,{path:"log",children:b(Vt,{path:":routineId",element:b(KX,{}),children:b(Vt,{path:"view",element:b(KX,{})})})})]}),G(Vt,{path:"measurement",children:[b(Vt,{index:!0,element:b(oX,{})}),b(Vt,{path:"overview",element:b(oX,{})}),b(Vt,{path:"category/:categoryId",element:b(KLt,{})})]}),G(Vt,{path:"exercise",children:[b(Vt,{index:!0,element:b(YY,{})}),b(Vt,{path:"overview",element:b(YY,{})}),b(Vt,{path:":baseID",element:b(V_,{}),children:b(Vt,{path:"view-base",element:b(V_,{}),children:b(Vt,{path:":slug",element:b(V_,{})})})}),b(Vt,{path:"contribute",element:b(zIt,{})})]}),G(Vt,{path:"weight",children:[b(Vt,{path:"overview",element:b(Yde,{})}),b(Vt,{path:"add",element:b(VIt,{})})]}),G(Vt,{path:"nutrition",children:[b(Vt,{path:"overview",element:b(uFt,{})}),G(Vt,{path:":planId",children:[b(Vt,{path:"view",element:b(cFt,{})}),b(Vt,{path:":date",element:b(iX,{})}),b(Vt,{path:"diary",element:b(iX,{})})]}),G(Vt,{path:"calculator",children:[b(Vt,{path:"bmi",element:b(QLt,{})}),b(Vt,{path:"calories",element:b(nOt,{})})]}),b(Vt,{path:"ingredient",children:b(Vt,{path:"overview",element:b(iOt,{})})})]}),G(Vt,{path:"software",children:[b(Vt,{path:"about-us",element:b(_Pt,{})}),b(Vt,{path:"api",element:b(cOt,{})}),b(Vt,{path:"equipment",element:b(rOt,{})})]}),b(Vt,{path:"login",element:b(aOt,{})}),b(Vt,{path:"user",children:b(Vt,{path:"preferences",element:b(sOt,{})})})]}),b(Vt,{path:"/",element:b(TOt,{})}),b(Vt,{path:"*",element:b("main",{style:{padding:"1rem"},children:b("p",{children:"404, Page NOT FOUND"})})})]}),mHt="_notification_bbb61_1",QX={notification:mHt},yHt=()=>{const[e,t]=BPt(),n=()=>{t(jY({notify:!1,message:"",severity:void 0,title:"",type:void 0}))},r=()=>{t(jY({notify:!1,message:"",severity:void 0,title:"",type:void 0,undo:!0}))};return e.notification.notify?e.notification.type==="delete"?G(kl,{className:QX.notification,severity:e.notification.severity,action:b(dt,{color:"inherit",size:"small",onClick:r,children:"UNDO"}),variant:"filled",children:[b(cI,{children:e.notification.title}),b("strong",{children:e.notification.message})]}):G(kl,{className:QX.notification,severity:e.notification.severity,onClose:()=>n(),variant:"filled",children:[b(cI,{children:e.notification.title}),b("strong",{children:e.notification.message})]}):null};function vHt(){return G(Oe,{container:!0,children:[b(Oe,{size:12,children:b(COt,{})}),b(Oe,{size:12,children:b(yHt,{})}),b(Oe,{size:12,children:b(LH,{})})]})}const an=e=>typeof e=="string",Mw=()=>{let e,t;const n=new Promise((r,o)=>{e=r,t=o});return n.resolve=e,n.reject=t,n},XX=e=>e==null?"":""+e,bHt=(e,t,n)=>{e.forEach(r=>{t[r]&&(n[r]=t[r])})},wHt=/###/g,JX=e=>e&&e.indexOf("###")>-1?e.replace(wHt,"."):e,ZX=e=>!e||an(e),_x=(e,t,n)=>{const r=an(t)?t.split("."):t;let o=0;for(;o{const{obj:r,k:o}=_x(e,t,Object);if(r!==void 0||t.length===1){r[o]=n;return}let i=t[t.length-1],a=t.slice(0,t.length-1),s=_x(e,a,Object);for(;s.obj===void 0&&a.length;)i=`${a[a.length-1]}.${i}`,a=a.slice(0,a.length-1),s=_x(e,a,Object),s&&s.obj&&typeof s.obj[`${s.k}.${i}`]<"u"&&(s.obj=void 0);s.obj[`${s.k}.${i}`]=n},xHt=(e,t,n,r)=>{const{obj:o,k:i}=_x(e,t,Object);o[i]=o[i]||[],o[i].push(n)},iA=(e,t)=>{const{obj:n,k:r}=_x(e,t);if(n)return n[r]},SHt=(e,t,n)=>{const r=iA(e,n);return r!==void 0?r:iA(t,n)},Vhe=(e,t,n)=>{for(const r in t)r!=="__proto__"&&r!=="constructor"&&(r in e?an(e[r])||e[r]instanceof String||an(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):Vhe(e[r],t[r],n):e[r]=t[r]);return e},Km=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var CHt={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const EHt=e=>an(e)?e.replace(/[&<>"'\/]/g,t=>CHt[t]):e;class PHt{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const n=this.regExpMap.get(t);if(n!==void 0)return n;const r=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,r),this.regExpQueue.push(t),r}}const THt=[" ",",","?","!",";"],IHt=new PHt(20),OHt=(e,t,n)=>{t=t||"",n=n||"";const r=THt.filter(a=>t.indexOf(a)<0&&n.indexOf(a)<0);if(r.length===0)return!0;const o=IHt.getRegExp(`(${r.map(a=>a==="?"?"\\?":a).join("|")})`);let i=!o.test(e);if(!i){const a=e.indexOf(n);a>0&&!o.test(e.substring(0,a))&&(i=!0)}return i},mj=function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!e)return;if(e[t])return e[t];const r=t.split(n);let o=e;for(let i=0;i-1&&le&&e.replace("_","-"),AHt={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console&&console[e]&&console[e].apply(console,t)}};class sA{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(t,n)}init(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=n.prefix||"i18next:",this.logger=t||AHt,this.options=n,this.debug=n.debug}log(){for(var t=arguments.length,n=new Array(t),r=0;r{this.observers[r]||(this.observers[r]=new Map);const o=this.observers[r].get(n)||0;this.observers[r].set(n,o+1)}),this}off(t,n){if(this.observers[t]){if(!n){delete this.observers[t];return}this.observers[t].delete(n)}}emit(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o{let[s,l]=a;for(let c=0;c{let[s,l]=a;for(let c=0;c1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=t||{},this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}removeNamespaces(t){const n=this.options.ns.indexOf(t);n>-1&&this.options.ns.splice(n,1)}getResource(t,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const i=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,a=o.ignoreJSONStructure!==void 0?o.ignoreJSONStructure:this.options.ignoreJSONStructure;let s;t.indexOf(".")>-1?s=t.split("."):(s=[t,n],r&&(Array.isArray(r)?s.push(...r):an(r)&&i?s.push(...r.split(i)):s.push(r)));const l=iA(this.data,s);return!l&&!n&&!r&&t.indexOf(".")>-1&&(t=s[0],n=s[1],r=s.slice(2).join(".")),l||!a||!an(r)?l:mj(this.data&&this.data[t]&&this.data[t][n],r,i)}addResource(t,n,r,o){let i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const a=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator;let s=[t,n];r&&(s=s.concat(a?r.split(a):r)),t.indexOf(".")>-1&&(s=t.split("."),o=n,n=s[1]),this.addNamespaces(n),eJ(this.data,s,o),i.silent||this.emit("added",t,n,r,o)}addResources(t,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const i in r)(an(r[i])||Array.isArray(r[i]))&&this.addResource(t,n,i,r[i],{silent:!0});o.silent||this.emit("added",t,n,r)}addResourceBundle(t,n,r,o,i){let a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},s=[t,n];t.indexOf(".")>-1&&(s=t.split("."),o=r,r=n,n=s[1]),this.addNamespaces(n);let l=iA(this.data,s)||{};a.skipCopy||(r=JSON.parse(JSON.stringify(r))),o?Vhe(l,r,i):l={...l,...r},eJ(this.data,s,l),a.silent||this.emit("added",t,n,r)}removeResourceBundle(t,n){this.hasResourceBundle(t,n)&&delete this.data[t][n],this.removeNamespaces(n),this.emit("removed",t,n)}hasResourceBundle(t,n){return this.getResource(t,n)!==void 0}getResourceBundle(t,n){return n||(n=this.options.defaultNS),this.options.compatibilityAPI==="v1"?{...this.getResource(t,n)}:this.getResource(t,n)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const n=this.getDataByLanguage(t);return!!(n&&Object.keys(n)||[]).find(o=>n[o]&&Object.keys(n[o]).length>0)}toJSON(){return this.data}}var Hhe={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,o){return e.forEach(i=>{this.processors[i]&&(t=this.processors[i].process(t,n,r,o))}),t}};const nJ={};class lA extends dR{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),bHt(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=iu.create("translator")}changeLanguage(t){t&&(this.language=t)}exists(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(t==null)return!1;const r=this.resolve(t,n);return r&&r.res!==void 0}extractFromKey(t,n){let r=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");const o=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let i=n.ns||this.options.defaultNS||[];const a=r&&t.indexOf(r)>-1,s=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!OHt(t,r,o);if(a&&!s){const l=t.match(this.interpolator.nestingRegexp);if(l&&l.length>0)return{key:t,namespaces:an(i)?[i]:i};const c=t.split(r);(r!==o||r===o&&this.options.ns.indexOf(c[0])>-1)&&(i=c.shift()),t=c.join(o)}return{key:t,namespaces:an(i)?[i]:i}}translate(t,n,r){if(typeof n!="object"&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),typeof n=="object"&&(n={...n}),n||(n={}),t==null)return"";Array.isArray(t)||(t=[String(t)]);const o=n.returnDetails!==void 0?n.returnDetails:this.options.returnDetails,i=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator,{key:a,namespaces:s}=this.extractFromKey(t[t.length-1],n),l=s[s.length-1],c=n.lng||this.language,u=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(c&&c.toLowerCase()==="cimode"){if(u){const E=n.nsSeparator||this.options.nsSeparator;return o?{res:`${l}${E}${a}`,usedKey:a,exactUsedKey:a,usedLng:c,usedNS:l,usedParams:this.getUsedParamsDetails(n)}:`${l}${E}${a}`}return o?{res:a,usedKey:a,exactUsedKey:a,usedLng:c,usedNS:l,usedParams:this.getUsedParamsDetails(n)}:a}const d=this.resolve(t,n);let f=d&&d.res;const p=d&&d.usedKey||a,h=d&&d.exactUsedKey||a,m=Object.prototype.toString.apply(f),y=["[object Number]","[object Function]","[object RegExp]"],w=n.joinArrays!==void 0?n.joinArrays:this.options.joinArrays,x=!this.i18nFormat||this.i18nFormat.handleAsObject,S=!an(f)&&typeof f!="boolean"&&typeof f!="number";if(x&&f&&S&&y.indexOf(m)<0&&!(an(w)&&Array.isArray(f))){if(!n.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const E=this.options.returnedObjectHandler?this.options.returnedObjectHandler(p,f,{...n,ns:s}):`key '${a} (${this.language})' returned an object instead of string.`;return o?(d.res=E,d.usedParams=this.getUsedParamsDetails(n),d):E}if(i){const E=Array.isArray(f),P=E?[]:{},T=E?h:p;for(const I in f)if(Object.prototype.hasOwnProperty.call(f,I)){const A=`${T}${i}${I}`;P[I]=this.translate(A,{...n,joinArrays:!1,ns:s}),P[I]===A&&(P[I]=f[I])}f=P}}else if(x&&an(w)&&Array.isArray(f))f=f.join(w),f&&(f=this.extendTranslation(f,t,n,r));else{let E=!1,P=!1;const T=n.count!==void 0&&!an(n.count),I=lA.hasDefaultValue(n),A=T?this.pluralResolver.getSuffix(c,n.count,n):"",k=n.ordinal&&T?this.pluralResolver.getSuffix(c,n.count,{ordinal:!1}):"",O=T&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),$=O&&n[`defaultValue${this.options.pluralSeparator}zero`]||n[`defaultValue${A}`]||n[`defaultValue${k}`]||n.defaultValue;!this.isValidLookup(f)&&I&&(E=!0,f=$),this.isValidLookup(f)||(P=!0,f=a);const L=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&P?void 0:f,j=I&&$!==f&&this.options.updateMissing;if(P||E||j){if(this.logger.log(j?"updateKey":"missingKey",c,l,a,j?$:f),i){const F=this.resolve(a,{...n,keySeparator:!1});F&&F.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let D=[];const _=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if(this.options.saveMissingTo==="fallback"&&_&&_[0])for(let F=0;F<_.length;F++)D.push(_[F]);else this.options.saveMissingTo==="all"?D=this.languageUtils.toResolveHierarchy(n.lng||this.language):D.push(n.lng||this.language);const z=(F,V,U)=>{const K=I&&U!==f?U:L;this.options.missingKeyHandler?this.options.missingKeyHandler(F,l,V,K,j,n):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(F,l,V,K,j,n),this.emit("missingKey",F,l,V,f)};this.options.saveMissing&&(this.options.saveMissingPlurals&&T?D.forEach(F=>{const V=this.pluralResolver.getSuffixes(F,n);O&&n[`defaultValue${this.options.pluralSeparator}zero`]&&V.indexOf(`${this.options.pluralSeparator}zero`)<0&&V.push(`${this.options.pluralSeparator}zero`),V.forEach(U=>{z([F],a+U,n[`defaultValue${U}`]||$)})}):z(D,a,$))}f=this.extendTranslation(f,t,n,d,r),P&&f===a&&this.options.appendNamespaceToMissingKey&&(f=`${l}:${a}`),(P||E)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?f=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}:${a}`:a,E?f:void 0):f=this.options.parseMissingKeyHandler(f))}return o?(d.res=f,d.usedParams=this.getUsedParamsDetails(n),d):f}extendTranslation(t,n,r,o,i){var a=this;if(this.i18nFormat&&this.i18nFormat.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||o.usedLng,o.usedNS,o.usedKey,{resolved:o});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const c=an(t)&&(r&&r.interpolation&&r.interpolation.skipOnVariables!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let u;if(c){const f=t.match(this.interpolator.nestingRegexp);u=f&&f.length}let d=r.replace&&!an(r.replace)?r.replace:r;if(this.options.interpolation.defaultVariables&&(d={...this.options.interpolation.defaultVariables,...d}),t=this.interpolator.interpolate(t,d,r.lng||this.language||o.usedLng,r),c){const f=t.match(this.interpolator.nestingRegexp),p=f&&f.length;u1&&arguments[1]!==void 0?arguments[1]:{},r,o,i,a,s;return an(t)&&(t=[t]),t.forEach(l=>{if(this.isValidLookup(r))return;const c=this.extractFromKey(l,n),u=c.key;o=u;let d=c.namespaces;this.options.fallbackNS&&(d=d.concat(this.options.fallbackNS));const f=n.count!==void 0&&!an(n.count),p=f&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),h=n.context!==void 0&&(an(n.context)||typeof n.context=="number")&&n.context!=="",m=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);d.forEach(y=>{this.isValidLookup(r)||(s=y,!nJ[`${m[0]}-${y}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(s)&&(nJ[`${m[0]}-${y}`]=!0,this.logger.warn(`key "${o}" for languages "${m.join(", ")}" won't get resolved as namespace "${s}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),m.forEach(w=>{if(this.isValidLookup(r))return;a=w;const x=[u];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(x,u,w,y,n);else{let E;f&&(E=this.pluralResolver.getSuffix(w,n.count,n));const P=`${this.options.pluralSeparator}zero`,T=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(f&&(x.push(u+E),n.ordinal&&E.indexOf(T)===0&&x.push(u+E.replace(T,this.options.pluralSeparator)),p&&x.push(u+P)),h){const I=`${u}${this.options.contextSeparator}${n.context}`;x.push(I),f&&(x.push(I+E),n.ordinal&&E.indexOf(T)===0&&x.push(I+E.replace(T,this.options.pluralSeparator)),p&&x.push(I+P))}}let S;for(;S=x.pop();)this.isValidLookup(r)||(i=S,r=this.getResource(w,y,S,n))}))})}),{res:r,usedKey:o,exactUsedKey:i,usedLng:a,usedNS:s}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(t,n,r,o):this.resourceStore.getResource(t,n,r,o)}getUsedParamsDetails(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const n=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=t.replace&&!an(t.replace);let o=r?t.replace:t;if(r&&typeof t.count<"u"&&(o.count=t.count),this.options.interpolation.defaultVariables&&(o={...this.options.interpolation.defaultVariables,...o}),!r){o={...o};for(const i of n)delete o[i]}return o}static hasDefaultValue(t){const n="defaultValue";for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&n===r.substring(0,n.length)&&t[r]!==void 0)return!0;return!1}}const H_=e=>e.charAt(0).toUpperCase()+e.slice(1);class rJ{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=iu.create("languageUtils")}getScriptPartFromCode(t){if(t=aA(t),!t||t.indexOf("-")<0)return null;const n=t.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(t){if(t=aA(t),!t||t.indexOf("-")<0)return t;const n=t.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(t){if(an(t)&&t.indexOf("-")>-1){if(typeof Intl<"u"&&typeof Intl.getCanonicalLocales<"u")try{let o=Intl.getCanonicalLocales(t)[0];if(o&&this.options.lowerCaseLng&&(o=o.toLowerCase()),o)return o}catch{}const n=["hans","hant","latn","cyrl","cans","mong","arab"];let r=t.split("-");return this.options.lowerCaseLng?r=r.map(o=>o.toLowerCase()):r.length===2?(r[0]=r[0].toLowerCase(),r[1]=r[1].toUpperCase(),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=H_(r[1].toLowerCase()))):r.length===3&&(r[0]=r[0].toLowerCase(),r[1].length===2&&(r[1]=r[1].toUpperCase()),r[0]!=="sgn"&&r[2].length===2&&(r[2]=r[2].toUpperCase()),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=H_(r[1].toLowerCase())),n.indexOf(r[2].toLowerCase())>-1&&(r[2]=H_(r[2].toLowerCase()))),r.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let n;return t.forEach(r=>{if(n)return;const o=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(o))&&(n=o)}),!n&&this.options.supportedLngs&&t.forEach(r=>{if(n)return;const o=this.getLanguagePartFromCode(r);if(this.isSupportedCode(o))return n=o;n=this.options.supportedLngs.find(i=>{if(i===o)return i;if(!(i.indexOf("-")<0&&o.indexOf("-")<0)&&(i.indexOf("-")>0&&o.indexOf("-")<0&&i.substring(0,i.indexOf("-"))===o||i.indexOf(o)===0&&o.length>1))return i})}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(t,n){if(!t)return[];if(typeof t=="function"&&(t=t(n)),an(t)&&(t=[t]),Array.isArray(t))return t;if(!n)return t.default||[];let r=t[n];return r||(r=t[this.getScriptPartFromCode(n)]),r||(r=t[this.formatLanguageCode(n)]),r||(r=t[this.getLanguagePartFromCode(n)]),r||(r=t.default),r||[]}toResolveHierarchy(t,n){const r=this.getFallbackCodes(n||this.options.fallbackLng||[],t),o=[],i=a=>{a&&(this.isSupportedCode(a)?o.push(a):this.logger.warn(`rejecting language code not found in supportedLngs: ${a}`))};return an(t)&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&i(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&i(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&i(this.getLanguagePartFromCode(t))):an(t)&&i(this.formatLanguageCode(t)),r.forEach(a=>{o.indexOf(a)<0&&i(this.formatLanguageCode(a))}),o}}let kHt=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],MHt={1:e=>+(e>1),2:e=>+(e!=1),3:e=>0,4:e=>e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2,5:e=>e==0?0:e==1?1:e==2?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5,6:e=>e==1?0:e>=2&&e<=4?1:2,7:e=>e==1?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2,8:e=>e==1?0:e==2?1:e!=8&&e!=11?2:3,9:e=>+(e>=2),10:e=>e==1?0:e==2?1:e<7?2:e<11?3:4,11:e=>e==1||e==11?0:e==2||e==12?1:e>2&&e<20?2:3,12:e=>+(e%10!=1||e%100==11),13:e=>+(e!==0),14:e=>e==1?0:e==2?1:e==3?2:3,15:e=>e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2,16:e=>e%10==1&&e%100!=11?0:e!==0?1:2,17:e=>e==1||e%10==1&&e%100!=11?0:1,18:e=>e==0?0:e==1?1:2,19:e=>e==1?0:e==0||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3,20:e=>e==1?0:e==0||e%100>0&&e%100<20?1:2,21:e=>e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0,22:e=>e==1?0:e==2?1:(e<0||e>10)&&e%10==0?2:3};const RHt=["v1","v2","v3"],$Ht=["v4"],oJ={zero:0,one:1,two:2,few:3,many:4,other:5},DHt=()=>{const e={};return kHt.forEach(t=>{t.lngs.forEach(n=>{e[n]={numbers:t.nr,plurals:MHt[t.fc]}})}),e};class _Ht{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=t,this.options=n,this.logger=iu.create("pluralResolver"),(!this.options.compatibilityJSON||$Ht.includes(this.options.compatibilityJSON))&&(typeof Intl>"u"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=DHt(),this.pluralRulesCache={}}addRule(t,n){this.rules[t]=n}clearCache(){this.pluralRulesCache={}}getRule(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi())try{const r=aA(t==="dev"?"en":t),o=n.ordinal?"ordinal":"cardinal",i=JSON.stringify({cleanedCode:r,type:o});if(i in this.pluralRulesCache)return this.pluralRulesCache[i];const a=new Intl.PluralRules(r,{type:o});return this.pluralRulesCache[i]=a,a}catch{return}return this.rules[t]||this.rules[this.languageUtils.getLanguagePartFromCode(t)]}needsPlural(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=this.getRule(t,n);return this.shouldUseIntlApi()?r&&r.resolvedOptions().pluralCategories.length>1:r&&r.numbers.length>1}getPluralFormsOfKey(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(t,r).map(o=>`${n}${o}`)}getSuffixes(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=this.getRule(t,n);return r?this.shouldUseIntlApi()?r.resolvedOptions().pluralCategories.sort((o,i)=>oJ[o]-oJ[i]).map(o=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${o}`):r.numbers.map(o=>this.getSuffix(t,o,n)):[]}getSuffix(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const o=this.getRule(t,r);return o?this.shouldUseIntlApi()?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${o.select(n)}`:this.getSuffixRetroCompatible(o,n):(this.logger.warn(`no plural rule found for: ${t}`),"")}getSuffixRetroCompatible(t,n){const r=t.noAbs?t.plurals(n):t.plurals(Math.abs(n));let o=t.numbers[r];this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1&&(o===2?o="plural":o===1&&(o=""));const i=()=>this.options.prepend&&o.toString()?this.options.prepend+o.toString():o.toString();return this.options.compatibilityJSON==="v1"?o===1?"":typeof o=="number"?`_plural_${o.toString()}`:i():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1?i():this.options.prepend&&r.toString()?this.options.prepend+r.toString():r.toString()}shouldUseIntlApi(){return!RHt.includes(this.options.compatibilityJSON)}}const iJ=function(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,i=SHt(e,t,n);return!i&&o&&an(n)&&(i=mj(e,n,r),i===void 0&&(i=mj(t,n,r))),i},U_=e=>e.replace(/\$/g,"$$$$");class NHt{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=iu.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||(n=>n),this.init(t)}init(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};t.interpolation||(t.interpolation={escapeValue:!0});const{escape:n,escapeValue:r,useRawValueToEscape:o,prefix:i,prefixEscaped:a,suffix:s,suffixEscaped:l,formatSeparator:c,unescapeSuffix:u,unescapePrefix:d,nestingPrefix:f,nestingPrefixEscaped:p,nestingSuffix:h,nestingSuffixEscaped:m,nestingOptionsSeparator:y,maxReplaces:w,alwaysFormat:x}=t.interpolation;this.escape=n!==void 0?n:EHt,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=o!==void 0?o:!1,this.prefix=i?Km(i):a||"{{",this.suffix=s?Km(s):l||"}}",this.formatSeparator=c||",",this.unescapePrefix=u?"":d||"-",this.unescapeSuffix=this.unescapePrefix?"":u||"",this.nestingPrefix=f?Km(f):p||Km("$t("),this.nestingSuffix=h?Km(h):m||Km(")"),this.nestingOptionsSeparator=y||",",this.maxReplaces=w||1e3,this.alwaysFormat=x!==void 0?x:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(n,r)=>n&&n.source===r?(n.lastIndex=0,n):new RegExp(r,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(t,n,r,o){let i,a,s;const l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},c=p=>{if(p.indexOf(this.formatSeparator)<0){const w=iJ(n,l,p,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(w,void 0,r,{...o,...n,interpolationkey:p}):w}const h=p.split(this.formatSeparator),m=h.shift().trim(),y=h.join(this.formatSeparator).trim();return this.format(iJ(n,l,m,this.options.keySeparator,this.options.ignoreJSONStructure),y,r,{...o,...n,interpolationkey:m})};this.resetRegExp();const u=o&&o.missingInterpolationHandler||this.options.missingInterpolationHandler,d=o&&o.interpolation&&o.interpolation.skipOnVariables!==void 0?o.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:p=>U_(p)},{regex:this.regexp,safeValue:p=>this.escapeValue?U_(this.escape(p)):U_(p)}].forEach(p=>{for(s=0;i=p.regex.exec(t);){const h=i[1].trim();if(a=c(h),a===void 0)if(typeof u=="function"){const y=u(t,i,o);a=an(y)?y:""}else if(o&&Object.prototype.hasOwnProperty.call(o,h))a="";else if(d){a=i[0];continue}else this.logger.warn(`missed to pass in variable ${h} for interpolating ${t}`),a="";else!an(a)&&!this.useRawValueToEscape&&(a=XX(a));const m=p.safeValue(a);if(t=t.replace(i[0],m),d?(p.regex.lastIndex+=a.length,p.regex.lastIndex-=i[0].length):p.regex.lastIndex=0,s++,s>=this.maxReplaces)break}}),t}nest(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o,i,a;const s=(l,c)=>{const u=this.nestingOptionsSeparator;if(l.indexOf(u)<0)return l;const d=l.split(new RegExp(`${u}[ ]*{`));let f=`{${d[1]}`;l=d[0],f=this.interpolate(f,a);const p=f.match(/'/g),h=f.match(/"/g);(p&&p.length%2===0&&!h||h.length%2!==0)&&(f=f.replace(/'/g,'"'));try{a=JSON.parse(f),c&&(a={...c,...a})}catch(m){return this.logger.warn(`failed parsing options string in nesting for key ${l}`,m),`${l}${u}${f}`}return a.defaultValue&&a.defaultValue.indexOf(this.prefix)>-1&&delete a.defaultValue,l};for(;o=this.nestingRegexp.exec(t);){let l=[];a={...r},a=a.replace&&!an(a.replace)?a.replace:a,a.applyPostProcessor=!1,delete a.defaultValue;let c=!1;if(o[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(o[1])){const u=o[1].split(this.formatSeparator).map(d=>d.trim());o[1]=u.shift(),l=u,c=!0}if(i=n(s.call(this,o[1].trim(),a),a),i&&o[0]===t&&!an(i))return i;an(i)||(i=XX(i)),i||(this.logger.warn(`missed to resolve ${o[1]} for nesting ${t}`),i=""),c&&(i=l.reduce((u,d)=>this.format(u,d,r.lng,{...r,interpolationkey:o[1].trim()}),i.trim())),t=t.replace(o[0],i),this.regexp.lastIndex=0}return t}}const LHt=e=>{let t=e.toLowerCase().trim();const n={};if(e.indexOf("(")>-1){const r=e.split("(");t=r[0].toLowerCase().trim();const o=r[1].substring(0,r[1].length-1);t==="currency"&&o.indexOf(":")<0?n.currency||(n.currency=o.trim()):t==="relativetime"&&o.indexOf(":")<0?n.range||(n.range=o.trim()):o.split(";").forEach(a=>{if(a){const[s,...l]=a.split(":"),c=l.join(":").trim().replace(/^'+|'+$/g,""),u=s.trim();n[u]||(n[u]=c),c==="false"&&(n[u]=!1),c==="true"&&(n[u]=!0),isNaN(c)||(n[u]=parseInt(c,10))}})}return{formatName:t,formatOptions:n}},Ym=e=>{const t={};return(n,r,o)=>{let i=o;o&&o.interpolationkey&&o.formatParams&&o.formatParams[o.interpolationkey]&&o[o.interpolationkey]&&(i={...i,[o.interpolationkey]:void 0});const a=r+JSON.stringify(i);let s=t[a];return s||(s=e(aA(r),o),t[a]=s),s(n)}};class FHt{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=iu.create("formatter"),this.options=t,this.formats={number:Ym((n,r)=>{const o=new Intl.NumberFormat(n,{...r});return i=>o.format(i)}),currency:Ym((n,r)=>{const o=new Intl.NumberFormat(n,{...r,style:"currency"});return i=>o.format(i)}),datetime:Ym((n,r)=>{const o=new Intl.DateTimeFormat(n,{...r});return i=>o.format(i)}),relativetime:Ym((n,r)=>{const o=new Intl.RelativeTimeFormat(n,{...r});return i=>o.format(i,r.range||"day")}),list:Ym((n,r)=>{const o=new Intl.ListFormat(n,{...r});return i=>o.format(i)})},this.init(t)}init(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};this.formatSeparator=n.interpolation.formatSeparator||","}add(t,n){this.formats[t.toLowerCase().trim()]=n}addCached(t,n){this.formats[t.toLowerCase().trim()]=Ym(n)}format(t,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const i=n.split(this.formatSeparator);if(i.length>1&&i[0].indexOf("(")>1&&i[0].indexOf(")")<0&&i.find(s=>s.indexOf(")")>-1)){const s=i.findIndex(l=>l.indexOf(")")>-1);i[0]=[i[0],...i.splice(1,s)].join(this.formatSeparator)}return i.reduce((s,l)=>{const{formatName:c,formatOptions:u}=LHt(l);if(this.formats[c]){let d=s;try{const f=o&&o.formatParams&&o.formatParams[o.interpolationkey]||{},p=f.locale||f.lng||o.locale||o.lng||r;d=this.formats[c](s,p,{...u,...o,...f})}catch(f){this.logger.warn(f)}return d}else this.logger.warn(`there was no format function for ${c}`);return s},t)}}const jHt=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)};class BHt extends dR{constructor(t,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=t,this.store=n,this.services=r,this.languageUtils=r.languageUtils,this.options=o,this.logger=iu.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=o.maxParallelReads||10,this.readingCalls=0,this.maxRetries=o.maxRetries>=0?o.maxRetries:5,this.retryTimeout=o.retryTimeout>=1?o.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(r,o.backend,o)}queueLoad(t,n,r,o){const i={},a={},s={},l={};return t.forEach(c=>{let u=!0;n.forEach(d=>{const f=`${c}|${d}`;!r.reload&&this.store.hasResourceBundle(c,d)?this.state[f]=2:this.state[f]<0||(this.state[f]===1?a[f]===void 0&&(a[f]=!0):(this.state[f]=1,u=!1,a[f]===void 0&&(a[f]=!0),i[f]===void 0&&(i[f]=!0),l[d]===void 0&&(l[d]=!0)))}),u||(s[c]=!0)}),(Object.keys(i).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:o}),{toLoad:Object.keys(i),pending:Object.keys(a),toLoadLanguages:Object.keys(s),toLoadNamespaces:Object.keys(l)}}loaded(t,n,r){const o=t.split("|"),i=o[0],a=o[1];n&&this.emit("failedLoading",i,a,n),!n&&r&&this.store.addResourceBundle(i,a,r,void 0,void 0,{skipCopy:!0}),this.state[t]=n?-1:2,n&&r&&(this.state[t]=0);const s={};this.queue.forEach(l=>{xHt(l.loaded,[i],a),jHt(l,t),n&&l.errors.push(n),l.pendingCount===0&&!l.done&&(Object.keys(l.loaded).forEach(c=>{s[c]||(s[c]={});const u=l.loaded[c];u.length&&u.forEach(d=>{s[c][d]===void 0&&(s[c][d]=!0)})}),l.done=!0,l.errors.length?l.callback(l.errors):l.callback())}),this.emit("loaded",s),this.queue=this.queue.filter(l=>!l.done)}read(t,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,a=arguments.length>5?arguments[5]:void 0;if(!t.length)return a(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:n,fcName:r,tried:o,wait:i,callback:a});return}this.readingCalls++;const s=(c,u)=>{if(this.readingCalls--,this.waitingReads.length>0){const d=this.waitingReads.shift();this.read(d.lng,d.ns,d.fcName,d.tried,d.wait,d.callback)}if(c&&u&&o{this.read.call(this,t,n,r,o+1,i*2,a)},i);return}a(c,u)},l=this.backend[r].bind(this.backend);if(l.length===2){try{const c=l(t,n);c&&typeof c.then=="function"?c.then(u=>s(null,u)).catch(s):s(null,c)}catch(c){s(c)}return}return l(t,n,s)}prepareLoading(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),o&&o();an(t)&&(t=this.languageUtils.toResolveHierarchy(t)),an(n)&&(n=[n]);const i=this.queueLoad(t,n,r,o);if(!i.toLoad.length)return i.pending.length||o(),null;i.toLoad.forEach(a=>{this.loadOne(a)})}load(t,n,r){this.prepareLoading(t,n,{},r)}reload(t,n,r){this.prepareLoading(t,n,{reload:!0},r)}loadOne(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const r=t.split("|"),o=r[0],i=r[1];this.read(o,i,"read",void 0,void 0,(a,s)=>{a&&this.logger.warn(`${n}loading namespace ${i} for language ${o} failed`,a),!a&&s&&this.logger.log(`${n}loaded namespace ${i} for language ${o}`,s),this.loaded(t,a,s)})}saveMissing(t,n,r,o,i){let a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},s=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(n)){this.logger.warn(`did not save key "${r}" as the namespace "${n}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(r==null||r==="")){if(this.backend&&this.backend.create){const l={...a,isUpdate:i},c=this.backend.create.bind(this.backend);if(c.length<6)try{let u;c.length===5?u=c(t,n,r,o,l):u=c(t,n,r,o),u&&typeof u.then=="function"?u.then(d=>s(null,d)).catch(s):s(null,u)}catch(u){s(u)}else c(t,n,r,o,s,l)}!t||!t[0]||this.store.addResource(t[0],n,r,o)}}}const aJ=()=>({debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]=="object"&&(t=e[1]),an(e[1])&&(t.defaultValue=e[1]),an(e[2])&&(t.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const n=e[3]||e[2];Object.keys(n).forEach(r=>{t[r]=n[r]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),sJ=e=>(an(e.ns)&&(e.ns=[e.ns]),an(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),an(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e),BP=()=>{},zHt=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(n=>{typeof e[n]=="function"&&(e[n]=e[n].bind(e))})};class mC extends dR{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(super(),this.options=sJ(t),this.services={},this.logger=iu,this.modules={external:[]},zHt(this),n&&!this.isInitialized&&!t.isClone){if(!this.options.initImmediate)return this.init(t,n),this;setTimeout(()=>{this.init(t,n)},0)}}init(){var t=this;let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof n=="function"&&(r=n,n={}),!n.defaultNS&&n.defaultNS!==!1&&n.ns&&(an(n.ns)?n.defaultNS=n.ns:n.ns.indexOf("translation")<0&&(n.defaultNS=n.ns[0]));const o=aJ();this.options={...o,...this.options,...sJ(n)},this.options.compatibilityAPI!=="v1"&&(this.options.interpolation={...o.interpolation,...this.options.interpolation}),n.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=n.keySeparator),n.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=n.nsSeparator);const i=u=>u?typeof u=="function"?new u:u:null;if(!this.options.isClone){this.modules.logger?iu.init(i(this.modules.logger),this.options):iu.init(null,this.options);let u;this.modules.formatter?u=this.modules.formatter:typeof Intl<"u"&&(u=FHt);const d=new rJ(this.options);this.store=new tJ(this.options.resources,this.options);const f=this.services;f.logger=iu,f.resourceStore=this.store,f.languageUtils=d,f.pluralResolver=new _Ht(d,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),u&&(!this.options.interpolation.format||this.options.interpolation.format===o.interpolation.format)&&(f.formatter=i(u),f.formatter.init(f,this.options),this.options.interpolation.format=f.formatter.format.bind(f.formatter)),f.interpolator=new NHt(this.options),f.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},f.backendConnector=new BHt(i(this.modules.backend),f.resourceStore,f,this.options),f.backendConnector.on("*",function(p){for(var h=arguments.length,m=new Array(h>1?h-1:0),y=1;y1?h-1:0),y=1;y{p.init&&p.init(this)})}if(this.format=this.options.interpolation.format,r||(r=BP),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const u=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);u.length>0&&u[0]!=="dev"&&(this.options.lng=u[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(u=>{this[u]=function(){return t.store[u](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(u=>{this[u]=function(){return t.store[u](...arguments),t}});const l=Mw(),c=()=>{const u=(d,f)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),l.resolve(f),r(d,f)};if(this.languages&&this.options.compatibilityAPI!=="v1"&&!this.isInitialized)return u(null,this.t.bind(this));this.changeLanguage(this.options.lng,u)};return this.options.resources||!this.options.initImmediate?c():setTimeout(c,0),l}loadResources(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:BP;const o=an(t)?t:this.language;if(typeof t=="function"&&(r=t),!this.options.resources||this.options.partialBundledLanguages){if(o&&o.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return r();const i=[],a=s=>{if(!s||s==="cimode")return;this.services.languageUtils.toResolveHierarchy(s).forEach(c=>{c!=="cimode"&&i.indexOf(c)<0&&i.push(c)})};o?a(o):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(l=>a(l)),this.options.preload&&this.options.preload.forEach(s=>a(s)),this.services.backendConnector.load(i,this.options.ns,s=>{!s&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(s)})}else r(null)}reloadResources(t,n,r){const o=Mw();return typeof t=="function"&&(r=t,t=void 0),typeof n=="function"&&(r=n,n=void 0),t||(t=this.languages),n||(n=this.options.ns),r||(r=BP),this.services.backendConnector.reload(t,n,i=>{o.resolve(),r(i)}),o}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&Hhe.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!(["cimode","dev"].indexOf(t)>-1))for(let n=0;n-1)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}}changeLanguage(t,n){var r=this;this.isLanguageChangingTo=t;const o=Mw();this.emit("languageChanging",t);const i=l=>{this.language=l,this.languages=this.services.languageUtils.toResolveHierarchy(l),this.resolvedLanguage=void 0,this.setResolvedLanguage(l)},a=(l,c)=>{c?(i(c),this.translator.changeLanguage(c),this.isLanguageChangingTo=void 0,this.emit("languageChanged",c),this.logger.log("languageChanged",c)):this.isLanguageChangingTo=void 0,o.resolve(function(){return r.t(...arguments)}),n&&n(l,function(){return r.t(...arguments)})},s=l=>{!t&&!l&&this.services.languageDetector&&(l=[]);const c=an(l)?l:this.services.languageUtils.getBestMatchFromCodes(l);c&&(this.language||i(c),this.translator.language||this.translator.changeLanguage(c),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(c)),this.loadResources(c,u=>{a(u,c)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?s(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(s):this.services.languageDetector.detect(s):s(t),o}getFixedT(t,n,r){var o=this;const i=function(a,s){let l;if(typeof s!="object"){for(var c=arguments.length,u=new Array(c>2?c-2:0),d=2;d`${l.keyPrefix}${f}${h}`):p=l.keyPrefix?`${l.keyPrefix}${f}${a}`:a,o.t(p,l)};return an(t)?i.lng=t:i.lngs=t,i.ns=n,i.keyPrefix=r,i}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const r=n.lng||this.resolvedLanguage||this.languages[0],o=this.options?this.options.fallbackLng:!1,i=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const a=(s,l)=>{const c=this.services.backendConnector.state[`${s}|${l}`];return c===-1||c===0||c===2};if(n.precheck){const s=n.precheck(this,a);if(s!==void 0)return s}return!!(this.hasResourceBundle(r,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||a(r,t)&&(!o||a(i,t)))}loadNamespaces(t,n){const r=Mw();return this.options.ns?(an(t)&&(t=[t]),t.forEach(o=>{this.options.ns.indexOf(o)<0&&this.options.ns.push(o)}),this.loadResources(o=>{r.resolve(),n&&n(o)}),r):(n&&n(),Promise.resolve())}loadLanguages(t,n){const r=Mw();an(t)&&(t=[t]);const o=this.options.preload||[],i=t.filter(a=>o.indexOf(a)<0&&this.services.languageUtils.isSupportedCode(a));return i.length?(this.options.preload=o.concat(i),this.loadResources(a=>{r.resolve(),n&&n(a)}),r):(n&&n(),Promise.resolve())}dir(t){if(t||(t=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!t)return"rtl";const n=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],r=this.services&&this.services.languageUtils||new rJ(aJ());return n.indexOf(r.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return new mC(t,n)}cloneInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:BP;const r=t.forkResourceStore;r&&delete t.forkResourceStore;const o={...this.options,...t,isClone:!0},i=new mC(o);return(t.debug!==void 0||t.prefix!==void 0)&&(i.logger=i.logger.clone(t)),["store","services","language"].forEach(s=>{i[s]=this[s]}),i.services={...this.services},i.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},r&&(i.store=new tJ(this.store.data,o),i.services.resourceStore=i.store),i.translator=new lA(i.services,o),i.translator.on("*",function(s){for(var l=arguments.length,c=new Array(l>1?l-1:0),u=1;u{if(t)for(const n in t)e[n]===void 0&&(e[n]=t[n])}),e}const lJ=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,WHt=(e,t,n)=>{const r=n||{};r.path=r.path||"/";const o=encodeURIComponent(t);let i=`${e}=${o}`;if(r.maxAge>0){const a=r.maxAge-0;if(Number.isNaN(a))throw new Error("maxAge should be a Number");i+=`; Max-Age=${Math.floor(a)}`}if(r.domain){if(!lJ.test(r.domain))throw new TypeError("option domain is invalid");i+=`; Domain=${r.domain}`}if(r.path){if(!lJ.test(r.path))throw new TypeError("option path is invalid");i+=`; Path=${r.path}`}if(r.expires){if(typeof r.expires.toUTCString!="function")throw new TypeError("option expires is invalid");i+=`; Expires=${r.expires.toUTCString()}`}if(r.httpOnly&&(i+="; HttpOnly"),r.secure&&(i+="; Secure"),r.sameSite)switch(typeof r.sameSite=="string"?r.sameSite.toLowerCase():r.sameSite){case!0:i+="; SameSite=Strict";break;case"lax":i+="; SameSite=Lax";break;case"strict":i+="; SameSite=Strict";break;case"none":i+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return i},cJ={create(e,t,n,r){let o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};n&&(o.expires=new Date,o.expires.setTime(o.expires.getTime()+n*60*1e3)),r&&(o.domain=r),document.cookie=WHt(e,encodeURIComponent(t),o)},read(e){const t=`${e}=`,n=document.cookie.split(";");for(let r=0;r-1&&(o=window.location.hash.substring(window.location.hash.indexOf("?")));const a=o.substring(1).split("&");for(let s=0;s0&&a[s].substring(0,l)===t&&(n=a[s].substring(l+1))}}return n}};let Rw=null;const uJ=()=>{if(Rw!==null)return Rw;try{Rw=window!=="undefined"&&window.localStorage!==null;const e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch{Rw=!1}return Rw};var KHt={name:"localStorage",lookup(e){let{lookupLocalStorage:t}=e;if(t&&uJ())return window.localStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupLocalStorage:n}=t;n&&uJ()&&window.localStorage.setItem(n,e)}};let $w=null;const dJ=()=>{if($w!==null)return $w;try{$w=window!=="undefined"&&window.sessionStorage!==null;const e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch{$w=!1}return $w};var YHt={name:"sessionStorage",lookup(e){let{lookupSessionStorage:t}=e;if(t&&dJ())return window.sessionStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupSessionStorage:n}=t;n&&dJ()&&window.sessionStorage.setItem(n,e)}},QHt={name:"navigator",lookup(e){const t=[];if(typeof navigator<"u"){const{languages:n,userLanguage:r,language:o}=navigator;if(n)for(let i=0;i0?t:void 0}},XHt={name:"htmlTag",lookup(e){let{htmlTag:t}=e,n;const r=t||(typeof document<"u"?document.documentElement:null);return r&&typeof r.getAttribute=="function"&&(n=r.getAttribute("lang")),n}},JHt={name:"path",lookup(e){var o;let{lookupFromPathIndex:t}=e;if(typeof window>"u")return;const n=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(n)?(o=n[typeof t=="number"?t:0])==null?void 0:o.replace("/",""):void 0}},ZHt={name:"subdomain",lookup(e){var o,i;let{lookupFromSubdomainIndex:t}=e;const n=typeof t=="number"?t+1:1,r=typeof window<"u"&&((i=(o=window.location)==null?void 0:o.hostname)==null?void 0:i.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i));if(r)return r[n]}};function eUt(){return{order:["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"],lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:e=>e}}class Uhe{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(t,n)}init(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=t||{languageUtils:{}},this.options=UHt(n,this.options||{},eUt()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=o=>o.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=r,this.addDetector(GHt),this.addDetector(qHt),this.addDetector(KHt),this.addDetector(YHt),this.addDetector(QHt),this.addDetector(XHt),this.addDetector(JHt),this.addDetector(ZHt)}addDetector(t){return this.detectors[t.name]=t,this}detect(t){t||(t=this.options.order);let n=[];return t.forEach(r=>{if(this.detectors[r]){let o=this.detectors[r].lookup(this.options);o&&typeof o=="string"&&(o=[o]),o&&(n=n.concat(o))}}),n=n.map(r=>this.options.convertDetectedLanguage(r)),this.services.languageUtils.getBestMatchFromCodes?n:n.length>0?n[0]:null}cacheUserLanguage(t,n){n||(n=this.options.caches),n&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(t)>-1||n.forEach(r=>{this.detectors[r]&&this.detectors[r].cacheUserLanguage(t,this.options)}))}}Uhe.type="languageDetector";function yj(e){"@babel/helpers - typeof";return yj=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},yj(e)}function Whe(){return typeof XMLHttpRequest=="function"||(typeof XMLHttpRequest>"u"?"undefined":yj(XMLHttpRequest))==="object"}function tUt(e){return!!e&&typeof e.then=="function"}function nUt(e){return tUt(e)?e:Promise.resolve(e)}function rUt(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var vj={exports:{}},zP={exports:{}},fJ;function oUt(){return fJ||(fJ=1,function(e,t){var n=typeof globalThis<"u"&&globalThis||typeof self<"u"&&self||typeof ea<"u"&&ea,r=function(){function i(){this.fetch=!1,this.DOMException=n.DOMException}return i.prototype=n,new i}();(function(i){(function(a){var s=typeof i<"u"&&i||typeof self<"u"&&self||typeof s<"u"&&s,l={searchParams:"URLSearchParams"in s,iterable:"Symbol"in s&&"iterator"in Symbol,blob:"FileReader"in s&&"Blob"in s&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in s,arrayBuffer:"ArrayBuffer"in s};function c(D){return D&&DataView.prototype.isPrototypeOf(D)}if(l.arrayBuffer)var u=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],d=ArrayBuffer.isView||function(D){return D&&u.indexOf(Object.prototype.toString.call(D))>-1};function f(D){if(typeof D!="string"&&(D=String(D)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(D)||D==="")throw new TypeError('Invalid character in header field name: "'+D+'"');return D.toLowerCase()}function p(D){return typeof D!="string"&&(D=String(D)),D}function h(D){var _={next:function(){var z=D.shift();return{done:z===void 0,value:z}}};return l.iterable&&(_[Symbol.iterator]=function(){return _}),_}function m(D){this.map={},D instanceof m?D.forEach(function(_,z){this.append(z,_)},this):Array.isArray(D)?D.forEach(function(_){this.append(_[0],_[1])},this):D&&Object.getOwnPropertyNames(D).forEach(function(_){this.append(_,D[_])},this)}m.prototype.append=function(D,_){D=f(D),_=p(_);var z=this.map[D];this.map[D]=z?z+", "+_:_},m.prototype.delete=function(D){delete this.map[f(D)]},m.prototype.get=function(D){return D=f(D),this.has(D)?this.map[D]:null},m.prototype.has=function(D){return this.map.hasOwnProperty(f(D))},m.prototype.set=function(D,_){this.map[f(D)]=p(_)},m.prototype.forEach=function(D,_){for(var z in this.map)this.map.hasOwnProperty(z)&&D.call(_,this.map[z],z,this)},m.prototype.keys=function(){var D=[];return this.forEach(function(_,z){D.push(z)}),h(D)},m.prototype.values=function(){var D=[];return this.forEach(function(_){D.push(_)}),h(D)},m.prototype.entries=function(){var D=[];return this.forEach(function(_,z){D.push([z,_])}),h(D)},l.iterable&&(m.prototype[Symbol.iterator]=m.prototype.entries);function y(D){if(D.bodyUsed)return Promise.reject(new TypeError("Already read"));D.bodyUsed=!0}function w(D){return new Promise(function(_,z){D.onload=function(){_(D.result)},D.onerror=function(){z(D.error)}})}function x(D){var _=new FileReader,z=w(_);return _.readAsArrayBuffer(D),z}function S(D){var _=new FileReader,z=w(_);return _.readAsText(D),z}function E(D){for(var _=new Uint8Array(D),z=new Array(_.length),F=0;F<_.length;F++)z[F]=String.fromCharCode(_[F]);return z.join("")}function P(D){if(D.slice)return D.slice(0);var _=new Uint8Array(D.byteLength);return _.set(new Uint8Array(D)),_.buffer}function T(){return this.bodyUsed=!1,this._initBody=function(D){this.bodyUsed=this.bodyUsed,this._bodyInit=D,D?typeof D=="string"?this._bodyText=D:l.blob&&Blob.prototype.isPrototypeOf(D)?this._bodyBlob=D:l.formData&&FormData.prototype.isPrototypeOf(D)?this._bodyFormData=D:l.searchParams&&URLSearchParams.prototype.isPrototypeOf(D)?this._bodyText=D.toString():l.arrayBuffer&&l.blob&&c(D)?(this._bodyArrayBuffer=P(D.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):l.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(D)||d(D))?this._bodyArrayBuffer=P(D):this._bodyText=D=Object.prototype.toString.call(D):this._bodyText="",this.headers.get("content-type")||(typeof D=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):l.searchParams&&URLSearchParams.prototype.isPrototypeOf(D)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},l.blob&&(this.blob=function(){var D=y(this);if(D)return D;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){if(this._bodyArrayBuffer){var D=y(this);return D||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}else return this.blob().then(x)}),this.text=function(){var D=y(this);if(D)return D;if(this._bodyBlob)return S(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(E(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},l.formData&&(this.formData=function(){return this.text().then(O)}),this.json=function(){return this.text().then(JSON.parse)},this}var I=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function A(D){var _=D.toUpperCase();return I.indexOf(_)>-1?_:D}function k(D,_){if(!(this instanceof k))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');_=_||{};var z=_.body;if(D instanceof k){if(D.bodyUsed)throw new TypeError("Already read");this.url=D.url,this.credentials=D.credentials,_.headers||(this.headers=new m(D.headers)),this.method=D.method,this.mode=D.mode,this.signal=D.signal,!z&&D._bodyInit!=null&&(z=D._bodyInit,D.bodyUsed=!0)}else this.url=String(D);if(this.credentials=_.credentials||this.credentials||"same-origin",(_.headers||!this.headers)&&(this.headers=new m(_.headers)),this.method=A(_.method||this.method||"GET"),this.mode=_.mode||this.mode||null,this.signal=_.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&z)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(z),(this.method==="GET"||this.method==="HEAD")&&(_.cache==="no-store"||_.cache==="no-cache")){var F=/([?&])_=[^&]*/;if(F.test(this.url))this.url=this.url.replace(F,"$1_="+new Date().getTime());else{var V=/\?/;this.url+=(V.test(this.url)?"&":"?")+"_="+new Date().getTime()}}}k.prototype.clone=function(){return new k(this,{body:this._bodyInit})};function O(D){var _=new FormData;return D.trim().split("&").forEach(function(z){if(z){var F=z.split("="),V=F.shift().replace(/\+/g," "),U=F.join("=").replace(/\+/g," ");_.append(decodeURIComponent(V),decodeURIComponent(U))}}),_}function $(D){var _=new m,z=D.replace(/\r?\n[\t ]+/g," ");return z.split("\r").map(function(F){return F.indexOf(` +`)===0?F.substr(1,F.length):F}).forEach(function(F){var V=F.split(":"),U=V.shift().trim();if(U){var K=V.join(":").trim();_.append(U,K)}}),_}T.call(k.prototype);function N(D,_){if(!(this instanceof N))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');_||(_={}),this.type="default",this.status=_.status===void 0?200:_.status,this.ok=this.status>=200&&this.status<300,this.statusText=_.statusText===void 0?"":""+_.statusText,this.headers=new m(_.headers),this.url=_.url||"",this._initBody(D)}T.call(N.prototype),N.prototype.clone=function(){return new N(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new m(this.headers),url:this.url})},N.error=function(){var D=new N(null,{status:0,statusText:""});return D.type="error",D};var L=[301,302,303,307,308];N.redirect=function(D,_){if(L.indexOf(_)===-1)throw new RangeError("Invalid status code");return new N(null,{status:_,headers:{location:D}})},a.DOMException=s.DOMException;try{new a.DOMException}catch{a.DOMException=function(_,z){this.message=_,this.name=z;var F=Error(_);this.stack=F.stack},a.DOMException.prototype=Object.create(Error.prototype),a.DOMException.prototype.constructor=a.DOMException}function j(D,_){return new Promise(function(z,F){var V=new k(D,_);if(V.signal&&V.signal.aborted)return F(new a.DOMException("Aborted","AbortError"));var U=new XMLHttpRequest;function K(){U.abort()}U.onload=function(){var ie={status:U.status,statusText:U.statusText,headers:$(U.getAllResponseHeaders()||"")};ie.url="responseURL"in U?U.responseURL:ie.headers.get("X-Request-URL");var ee="response"in U?U.response:U.responseText;setTimeout(function(){z(new N(ee,ie))},0)},U.onerror=function(){setTimeout(function(){F(new TypeError("Network request failed"))},0)},U.ontimeout=function(){setTimeout(function(){F(new TypeError("Network request failed"))},0)},U.onabort=function(){setTimeout(function(){F(new a.DOMException("Aborted","AbortError"))},0)};function X(ie){try{return ie===""&&s.location.href?s.location.href:ie}catch{return ie}}U.open(V.method,X(V.url),!0),V.credentials==="include"?U.withCredentials=!0:V.credentials==="omit"&&(U.withCredentials=!1),"responseType"in U&&(l.blob?U.responseType="blob":l.arrayBuffer&&V.headers.get("Content-Type")&&V.headers.get("Content-Type").indexOf("application/octet-stream")!==-1&&(U.responseType="arraybuffer")),_&&typeof _.headers=="object"&&!(_.headers instanceof m)?Object.getOwnPropertyNames(_.headers).forEach(function(ie){U.setRequestHeader(ie,p(_.headers[ie]))}):V.headers.forEach(function(ie,ee){U.setRequestHeader(ee,ie)}),V.signal&&(V.signal.addEventListener("abort",K),U.onreadystatechange=function(){U.readyState===4&&V.signal.removeEventListener("abort",K)}),U.send(typeof V._bodyInit>"u"?null:V._bodyInit)})}return j.polyfill=!0,s.fetch||(s.fetch=j,s.Headers=m,s.Request=k,s.Response=N),a.Headers=m,a.Request=k,a.Response=N,a.fetch=j,a})({})})(r),r.fetch.ponyfill=!0,delete r.fetch.polyfill;var o=n.fetch?n:r;t=o.fetch,t.default=o.fetch,t.fetch=o.fetch,t.Headers=o.Headers,t.Request=o.Request,t.Response=o.Response,e.exports=t}(zP,zP.exports)),zP.exports}(function(e,t){var n;if(typeof fetch=="function"&&(typeof ea<"u"&&ea.fetch?n=ea.fetch:typeof window<"u"&&window.fetch?n=window.fetch:n=fetch),typeof rUt<"u"&&typeof window>"u"){var r=n||oUt();r.default&&(r=r.default),t.default=r,e.exports=t.default}})(vj,vj.exports);var Ghe=vj.exports;const qhe=Bn(Ghe),pJ=NJ({__proto__:null,default:qhe},[Ghe]);function hJ(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function gJ(e){for(var t=1;t"u"&&typeof global<"u"&&typeof global.process<"u"&&global.process.versions&&global.process.versions.node&&(i["User-Agent"]="i18next-http-backend (node/".concat(global.process.version,"; ").concat(global.process.platform," ").concat(global.process.arch,")")),r&&(i["Content-Type"]="application/json");var a=typeof t.requestOptions=="function"?t.requestOptions(r):t.requestOptions,s=gJ({method:r?"POST":"GET",body:r?t.stringify(r):void 0,headers:i},yJ?{}:a),l=typeof t.alternateFetch=="function"&&t.alternateFetch.length>=1?t.alternateFetch:void 0;try{mJ(n,s,o,l)}catch(c){if(!a||Object.keys(a).length===0||!c.message||c.message.indexOf("not implemented")<0)return o(c);try{Object.keys(a).forEach(function(u){delete s[u]}),mJ(n,s,o,l),yJ=!0}catch(u){o(u)}}},cUt=function(t,n,r,o){r&&Rg(r)==="object"&&(r=bj("",r).slice(1)),t.queryStringParams&&(n=bj(n,t.queryStringParams));try{var i;yC?i=new yC:i=new cA("MSXML2.XMLHTTP.3.0"),i.open(r?"POST":"GET",n,1),t.crossDomain||i.setRequestHeader("X-Requested-With","XMLHttpRequest"),i.withCredentials=!!t.withCredentials,r&&i.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),i.overrideMimeType&&i.overrideMimeType("application/json");var a=t.customHeaders;if(a=typeof a=="function"?a():a,a)for(var s in a)i.setRequestHeader(s,a[s]);i.onreadystatechange=function(){i.readyState>3&&o(i.status>=400?i.statusText:null,{status:i.status,data:i.responseText})},i.send(r)}catch(l){console&&console.log(l)}},uUt=function(t,n,r,o){if(typeof r=="function"&&(o=r,r=void 0),o=o||function(){},md&&n.indexOf("file:")!==0)return lUt(t,n,r,o);if(Whe()||typeof ActiveXObject=="function")return cUt(t,n,r,o);o(new Error("No fetch and no xhr implementation found!"))};function vb(e){"@babel/helpers - typeof";return vb=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},vb(e)}function vJ(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function W_(e){for(var t=1;t1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};dUt(this,e),this.services=t,this.options=n,this.allOptions=r,this.type="backend",this.init(t,n,r)}return pUt(e,[{key:"init",value:function(n){var r=this,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(this.services=n,this.options=W_(W_(W_({},gUt()),this.options||{}),o),this.allOptions=i,this.services&&this.options.reloadInterval){var a=setInterval(function(){return r.reload()},this.options.reloadInterval);vb(a)==="object"&&typeof a.unref=="function"&&a.unref()}}},{key:"readMulti",value:function(n,r,o){this._readAny(n,n,r,r,o)}},{key:"read",value:function(n,r,o){this._readAny([n],n,[r],r,o)}},{key:"_readAny",value:function(n,r,o,i,a){var s=this,l=this.options.loadPath;typeof this.options.loadPath=="function"&&(l=this.options.loadPath(n,o)),l=nUt(l),l.then(function(c){if(!c)return a(null,{});var u=s.services.interpolator.interpolate(c,{lng:n.join("+"),ns:o.join("+")});s.loadUrl(u,a,r,i)})}},{key:"loadUrl",value:function(n,r,o,i){var a=this,s=typeof o=="string"?[o]:o,l=typeof i=="string"?[i]:i,c=this.options.parseLoadPayload(s,l);this.options.request(this.options,n,c,function(u,d){if(d&&(d.status>=500&&d.status<600||!d.status))return r("failed loading "+n+"; status code: "+d.status,!0);if(d&&d.status>=400&&d.status<500)return r("failed loading "+n+"; status code: "+d.status,!1);if(!d&&u&&u.message){var f=u.message.toLowerCase(),p=["failed","fetch","network","load"].find(function(y){return f.indexOf(y)>-1});if(p)return r("failed loading "+n+": "+u.message,!0)}if(u)return r(u,!1);var h,m;try{typeof d.data=="string"?h=a.options.parse(d.data,o,i):h=d.data}catch{m="failed parsing "+n+" to json"}if(m)return r(m,!1);r(null,h)})}},{key:"create",value:function(n,r,o,i,a){var s=this;if(this.options.addPath){typeof n=="string"&&(n=[n]);var l=this.options.parsePayload(r,o,i),c=0,u=[],d=[];n.forEach(function(f){var p=s.options.addPath;typeof s.options.addPath=="function"&&(p=s.options.addPath(f,r));var h=s.services.interpolator.interpolate(p,{lng:f,ns:r});s.options.request(s.options,h,l,function(m,y){c+=1,u.push(m),d.push(y),c===n.length&&typeof a=="function"&&a(u,d)})})}}},{key:"reload",value:function(){var n=this,r=this.services,o=r.backendConnector,i=r.languageUtils,a=r.logger,s=o.language;if(!(s&&s.toLowerCase()==="cimode")){var l=[],c=function(d){var f=i.toResolveHierarchy(d);f.forEach(function(p){l.indexOf(p)<0&&l.push(p)})};c(s),this.allOptions.preload&&this.allOptions.preload.forEach(function(u){return c(u)}),l.forEach(function(u){n.allOptions.ns.forEach(function(d){o.read(u,d,"read",null,null,function(f,p){f&&a.warn("loading namespace ".concat(d," for language ").concat(u," failed"),f),!f&&p&&a.log("loaded namespace ".concat(d," for language ").concat(u),p),o.loaded("".concat(u,"|").concat(d),f,p)})})})}}}])}();Qhe.type="backend";ji.use(Qhe).use(Uhe).use(pLe).init({load:"languageOnly",detection:{order:["path","navigator","htmlTag"]},fallbackLng:"en",interpolation:{escapeValue:!1},backend:{loadPath:"/static/react/locales/{{lng}}/{{ns}}.json"}});const tm=new qEe({defaultOptions:{queries:{retry:3,staleTime:1e3*60*5,refetchOnMount:!0,refetchOnWindowFocus:!0,refetchOnReconnect:"always"}}}),FH=e=>{const t=document.getElementById(e);if(t===null)return;const n=t.attachShadow({mode:"open"}),r=document.createElement("div"),o=document.createElement("style"),i=document.getElementById("react-css");if(i){const l=document.createElement("link");l.setAttribute("rel","stylesheet"),l.setAttribute("href",i.href),n.appendChild(i)}n.appendChild(r),n.appendChild(o);const a=nZ({key:"css",prepend:!0,container:o});jd(r).render(b(fSe,{value:a,children:b(v.Suspense,{fallback:b(ys,{}),children:b(A5,{children:b(wp,{theme:qLt(r),children:b($g,{client:tm,children:b(LH,{})})})})})}))},bJ=document.getElementById("root");bJ&&jd(bJ).render(b(Y.StrictMode,{children:b(v.Suspense,{fallback:b(ys,{}),children:b(A5,{children:b(wp,{theme:Gp,children:G($g,{client:tm,children:[b(vHt,{}),b(cPe,{})]})})})})}));const wJ=document.getElementById("react-weight-overview");wJ&&jd(wJ).render(b(v.Suspense,{fallback:b(ys,{}),children:b(wp,{theme:Gp,children:b($g,{client:tm,children:b(Yde,{})})})}));const xJ=document.getElementById("react-weight-dashboard");xJ&&jd(xJ).render(b(v.Suspense,{fallback:b(ys,{}),children:b(wp,{theme:Gp,children:b($g,{client:tm,children:b(Mde,{})})})}));const SJ=document.getElementById("react-nutrition-dashboard");SJ&&jd(SJ).render(b(v.Suspense,{fallback:b(ys,{}),children:b(wp,{theme:Gp,children:b($g,{client:tm,children:b(Kue,{})})})}));const CJ=document.getElementById("react-routine-dashboard");CJ&&jd(CJ).render(b(v.Suspense,{fallback:b(ys,{}),children:b(wp,{theme:Gp,children:b($g,{client:tm,children:b(fde,{})})})}));FH("react-exercise-overview");FH("react-exercise-contribute");const EJ=document.getElementById("react-exercise-detail");EJ&&jd(EJ).render(b(v.Suspense,{fallback:b(ys,{}),children:b(A5,{children:b(wp,{theme:Gp,children:b($g,{client:tm,children:b(LH,{})})})})}));FH("react-page");const PJ=document.getElementById("react-ingredient-search");PJ&&jd(PJ).render(b(v.Suspense,{fallback:b(ys,{}),children:b(wp,{theme:Gp,children:b(DPt,{})})}))});export default mUt();