@applica-software-guru/react-admin 1.3.153 → 1.3.154

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -94,7 +94,7 @@ __p += '`),Ze&&(se+=`' +
94
94
  function print() { __p += __j.call(arguments, '') }
95
95
  `:`;
96
96
  `)+se+`return __p
97
- }`;var Ye=Cm(function(){return tt(T,be+"return "+se).apply(n,M)});if(Ye.source=se,XA(Ye))throw Ye;return Ye}function _S(i){return rt(i).toLowerCase()}function $S(i){return rt(i).toUpperCase()}function eR(i,a,d){if(i=rt(i),i&&(d||a===n))return xh(i);if(!i||!(a=xn(a)))return i;var E=ir(i),y=ir(a),T=wh(E,y),M=Th(E,y)+1;return io(E,T,M).join("")}function tR(i,a,d){if(i=rt(i),i&&(d||a===n))return i.slice(0,Sh(i)+1);if(!i||!(a=xn(a)))return i;var E=ir(i),y=Th(E,ir(a))+1;return io(E,0,y).join("")}function nR(i,a,d){if(i=rt(i),i&&(d||a===n))return i.replace(Sr,"");if(!i||!(a=xn(a)))return i;var E=ir(i),y=wh(E,ir(a));return io(E,y).join("")}function rR(i,a){var d=U,E=_;if(Pt(a)){var y="separator"in a?a.separator:y;d="length"in a?He(a.length):d,E="omission"in a?xn(a.omission):E}i=rt(i);var T=i.length;if(hi(i)){var M=ir(i);T=M.length}if(d>=T)return i;var N=d-Ci(E);if(N<1)return E;var Y=M?io(M,0,N).join(""):i.slice(0,N);if(y===n)return Y+E;if(M&&(N+=Y.length-N),ZA(y)){if(i.slice(N).search(y)){var re,oe=Y;for(y.global||(y=gA(y.source,rt(xs.exec(y))+"g")),y.lastIndex=0;re=y.exec(oe);)var se=re.index;Y=Y.slice(0,se===n?N:se)}}else if(i.indexOf(xn(y),N)!=N){var Ee=Y.lastIndexOf(y);Ee>-1&&(Y=Y.slice(0,Ee))}return Y+E}function oR(i){return i=rt(i),i&&Ya.test(i)?i.replace(Ua,j1):i}var iR=bi(function(i,a,d){return i+(d?" ":"")+a.toUpperCase()}),ed=mC("toUpperCase");function hm(i,a,d){return i=rt(i),a=d?n:a,a===n?T1(i)?k1(i):E1(i):i.match(a)||[]}var Cm=qe(function(i,a){try{return bn(i,n,a)}catch(d){return XA(d)?d:new Fe(d)}}),sR=Dr(function(i,a){return Hn(a,function(d){d=Ir(d),jr(i,d,qA(i[d],i))}),i});function aR(i){var a=i==null?0:i.length,d=Re();return i=a?Qt(i,function(E){if(typeof E[1]!="function")throw new Wn(l);return[d(E[0]),E[1]]}):[],qe(function(E){for(var y=-1;++y<a;){var T=i[y];if(bn(T[0],this,E))return bn(T[1],this,E)}})}function lR(i){return jw(Un(i,C))}function td(i){return function(){return i}}function cR(i,a){return i==null||i!==i?a:i}var uR=IC(),AR=IC(!0);function Cn(i){return i}function nd(i){return Xh(typeof i=="function"?i:Un(i,C))}function dR(i){return _h(Un(i,C))}function gR(i,a){return $h(i,Un(a,C))}var fR=qe(function(i,a){return function(d){return Ds(d,i,a)}}),pR=qe(function(i,a){return function(d){return Ds(i,d,a)}});function rd(i,a,d){var E=Jt(a),y=El(a,E);d==null&&!(Pt(a)&&(y.length||!E.length))&&(d=a,a=i,i=this,y=El(a,Jt(a)));var T=!(Pt(d)&&"chain"in d)||!!d.chain,M=Fr(i);return Hn(y,function(N){var Y=a[N];i[N]=Y,M&&(i.prototype[N]=function(){var re=this.__chain__;if(T||re){var oe=i(this.__wrapped__),se=oe.__actions__=fn(this.__actions__);return se.push({func:Y,args:arguments,thisArg:i}),oe.__chain__=re,oe}return Y.apply(i,$r([this.value()],arguments))})}),i}function hR(){return $t._===this&&($t._=W1),this}function od(){}function CR(i){return i=He(i),qe(function(a){return eC(a,i)})}var mR=DA(Qt),ER=DA(Bh),IR=DA(sA);function mm(i){return WA(i)?aA(Ir(i)):Xw(i)}function BR(i){return function(a){return i==null?n:No(i,a)}}var vR=vC(),yR=vC(!0);function id(){return[]}function sd(){return!1}function bR(){return{}}function QR(){return""}function xR(){return!0}function wR(i,a){if(i=He(i),i<1||i>F)return[];var d=X,E=tn(i,X);a=Re(a),i-=X;for(var y=uA(E,a);++d<i;)a(d);return y}function TR(i){return Le(i)?Qt(i,Ir):wn(i)?[i]:fn(LC(rt(i)))}function PR(i){var a=++V1;return rt(i)+a}var SR=Ql(function(i,a){return i+a},0),RR=kA("ceil"),OR=Ql(function(i,a){return i/a},1),jR=kA("floor");function MR(i){return i&&i.length?ml(i,Cn,BA):n}function DR(i,a){return i&&i.length?ml(i,Re(a,2),BA):n}function kR(i){return bh(i,Cn)}function FR(i,a){return bh(i,Re(a,2))}function LR(i){return i&&i.length?ml(i,Cn,QA):n}function NR(i,a){return i&&i.length?ml(i,Re(a,2),QA):n}var VR=Ql(function(i,a){return i*a},1),HR=kA("round"),WR=Ql(function(i,a){return i-a},0);function zR(i){return i&&i.length?cA(i,Cn):0}function UR(i,a){return i&&i.length?cA(i,Re(a,2)):0}return Q.after=dP,Q.ary=JC,Q.assign=$P,Q.assignIn=cm,Q.assignInWith=Ll,Q.assignWith=eS,Q.at=tS,Q.before=XC,Q.bind=qA,Q.bindAll=sR,Q.bindKey=ZC,Q.castArray=bP,Q.chain=GC,Q.chunk=jT,Q.compact=MT,Q.concat=DT,Q.cond=aR,Q.conforms=lR,Q.constant=td,Q.countBy=z2,Q.create=nS,Q.curry=_C,Q.curryRight=$C,Q.debounce=em,Q.defaults=rS,Q.defaultsDeep=oS,Q.defer=gP,Q.delay=fP,Q.difference=kT,Q.differenceBy=FT,Q.differenceWith=LT,Q.drop=NT,Q.dropRight=VT,Q.dropRightWhile=HT,Q.dropWhile=WT,Q.fill=zT,Q.filter=Y2,Q.flatMap=q2,Q.flatMapDeep=J2,Q.flatMapDepth=X2,Q.flatten=WC,Q.flattenDeep=UT,Q.flattenDepth=YT,Q.flip=pP,Q.flow=uR,Q.flowRight=AR,Q.fromPairs=GT,Q.functions=AS,Q.functionsIn=dS,Q.groupBy=Z2,Q.initial=qT,Q.intersection=JT,Q.intersectionBy=XT,Q.intersectionWith=ZT,Q.invert=fS,Q.invertBy=pS,Q.invokeMap=$2,Q.iteratee=nd,Q.keyBy=eP,Q.keys=Jt,Q.keysIn=hn,Q.map=Ol,Q.mapKeys=CS,Q.mapValues=mS,Q.matches=dR,Q.matchesProperty=gR,Q.memoize=Ml,Q.merge=ES,Q.mergeWith=um,Q.method=fR,Q.methodOf=pR,Q.mixin=rd,Q.negate=Dl,Q.nthArg=CR,Q.omit=IS,Q.omitBy=BS,Q.once=hP,Q.orderBy=tP,Q.over=mR,Q.overArgs=CP,Q.overEvery=ER,Q.overSome=IR,Q.partial=JA,Q.partialRight=tm,Q.partition=nP,Q.pick=vS,Q.pickBy=Am,Q.property=mm,Q.propertyOf=BR,Q.pull=t2,Q.pullAll=UC,Q.pullAllBy=n2,Q.pullAllWith=r2,Q.pullAt=o2,Q.range=vR,Q.rangeRight=yR,Q.rearg=mP,Q.reject=iP,Q.remove=i2,Q.rest=EP,Q.reverse=GA,Q.sampleSize=aP,Q.set=bS,Q.setWith=QS,Q.shuffle=lP,Q.slice=s2,Q.sortBy=AP,Q.sortedUniq=g2,Q.sortedUniqBy=f2,Q.split=qS,Q.spread=IP,Q.tail=p2,Q.take=h2,Q.takeRight=C2,Q.takeRightWhile=m2,Q.takeWhile=E2,Q.tap=M2,Q.throttle=BP,Q.thru=Rl,Q.toArray=sm,Q.toPairs=dm,Q.toPairsIn=gm,Q.toPath=TR,Q.toPlainObject=lm,Q.transform=xS,Q.unary=vP,Q.union=I2,Q.unionBy=B2,Q.unionWith=v2,Q.uniq=y2,Q.uniqBy=b2,Q.uniqWith=Q2,Q.unset=wS,Q.unzip=KA,Q.unzipWith=YC,Q.update=TS,Q.updateWith=PS,Q.values=wi,Q.valuesIn=SS,Q.without=x2,Q.words=hm,Q.wrap=yP,Q.xor=w2,Q.xorBy=T2,Q.xorWith=P2,Q.zip=S2,Q.zipObject=R2,Q.zipObjectDeep=O2,Q.zipWith=j2,Q.entries=dm,Q.entriesIn=gm,Q.extend=cm,Q.extendWith=Ll,rd(Q,Q),Q.add=SR,Q.attempt=Cm,Q.camelCase=MS,Q.capitalize=fm,Q.ceil=RR,Q.clamp=RS,Q.clone=QP,Q.cloneDeep=wP,Q.cloneDeepWith=TP,Q.cloneWith=xP,Q.conformsTo=PP,Q.deburr=pm,Q.defaultTo=cR,Q.divide=OR,Q.endsWith=DS,Q.eq=ar,Q.escape=kS,Q.escapeRegExp=FS,Q.every=U2,Q.find=G2,Q.findIndex=VC,Q.findKey=iS,Q.findLast=K2,Q.findLastIndex=HC,Q.findLastKey=sS,Q.floor=jR,Q.forEach=KC,Q.forEachRight=qC,Q.forIn=aS,Q.forInRight=lS,Q.forOwn=cS,Q.forOwnRight=uS,Q.get=_A,Q.gt=SP,Q.gte=RP,Q.has=gS,Q.hasIn=$A,Q.head=zC,Q.identity=Cn,Q.includes=_2,Q.indexOf=KT,Q.inRange=OS,Q.invoke=hS,Q.isArguments=Wo,Q.isArray=Le,Q.isArrayBuffer=OP,Q.isArrayLike=pn,Q.isArrayLikeObject=Ft,Q.isBoolean=jP,Q.isBuffer=so,Q.isDate=MP,Q.isElement=DP,Q.isEmpty=kP,Q.isEqual=FP,Q.isEqualWith=LP,Q.isError=XA,Q.isFinite=NP,Q.isFunction=Fr,Q.isInteger=nm,Q.isLength=kl,Q.isMap=rm,Q.isMatch=VP,Q.isMatchWith=HP,Q.isNaN=WP,Q.isNative=zP,Q.isNil=YP,Q.isNull=UP,Q.isNumber=om,Q.isObject=Pt,Q.isObjectLike=Ot,Q.isPlainObject=Hs,Q.isRegExp=ZA,Q.isSafeInteger=GP,Q.isSet=im,Q.isString=Fl,Q.isSymbol=wn,Q.isTypedArray=xi,Q.isUndefined=KP,Q.isWeakMap=qP,Q.isWeakSet=JP,Q.join=_T,Q.kebabCase=LS,Q.last=Gn,Q.lastIndexOf=$T,Q.lowerCase=NS,Q.lowerFirst=VS,Q.lt=XP,Q.lte=ZP,Q.max=MR,Q.maxBy=DR,Q.mean=kR,Q.meanBy=FR,Q.min=LR,Q.minBy=NR,Q.stubArray=id,Q.stubFalse=sd,Q.stubObject=bR,Q.stubString=QR,Q.stubTrue=xR,Q.multiply=VR,Q.nth=e2,Q.noConflict=hR,Q.noop=od,Q.now=jl,Q.pad=HS,Q.padEnd=WS,Q.padStart=zS,Q.parseInt=US,Q.random=jS,Q.reduce=rP,Q.reduceRight=oP,Q.repeat=YS,Q.replace=GS,Q.result=yS,Q.round=HR,Q.runInContext=z,Q.sample=sP,Q.size=cP,Q.snakeCase=KS,Q.some=uP,Q.sortedIndex=a2,Q.sortedIndexBy=l2,Q.sortedIndexOf=c2,Q.sortedLastIndex=u2,Q.sortedLastIndexBy=A2,Q.sortedLastIndexOf=d2,Q.startCase=JS,Q.startsWith=XS,Q.subtract=WR,Q.sum=zR,Q.sumBy=UR,Q.template=ZS,Q.times=wR,Q.toFinite=Lr,Q.toInteger=He,Q.toLength=am,Q.toLower=_S,Q.toNumber=Kn,Q.toSafeInteger=_P,Q.toString=rt,Q.toUpper=$S,Q.trim=eR,Q.trimEnd=tR,Q.trimStart=nR,Q.truncate=rR,Q.unescape=oR,Q.uniqueId=PR,Q.upperCase=iR,Q.upperFirst=ed,Q.each=KC,Q.eachRight=qC,Q.first=zC,rd(Q,function(){var i={};return mr(Q,function(a,d){At.call(Q.prototype,d)||(i[d]=a)}),i}(),{chain:!1}),Q.VERSION=r,Hn(["bind","bindKey","curry","curryRight","partial","partialRight"],function(i){Q[i].placeholder=Q}),Hn(["drop","take"],function(i,a){Xe.prototype[i]=function(d){d=d===n?1:Kt(He(d),0);var E=this.__filtered__&&!a?new Xe(this):this.clone();return E.__filtered__?E.__takeCount__=tn(d,E.__takeCount__):E.__views__.push({size:tn(d,X),type:i+(E.__dir__<0?"Right":"")}),E},Xe.prototype[i+"Right"]=function(d){return this.reverse()[i](d).reverse()}}),Hn(["filter","map","takeWhile"],function(i,a){var d=a+1,E=d==Z||d==V;Xe.prototype[i]=function(y){var T=this.clone();return T.__iteratees__.push({iteratee:Re(y,3),type:d}),T.__filtered__=T.__filtered__||E,T}}),Hn(["head","last"],function(i,a){var d="take"+(a?"Right":"");Xe.prototype[i]=function(){return this[d](1).value()[0]}}),Hn(["initial","tail"],function(i,a){var d="drop"+(a?"":"Right");Xe.prototype[i]=function(){return this.__filtered__?new Xe(this):this[d](1)}}),Xe.prototype.compact=function(){return this.filter(Cn)},Xe.prototype.find=function(i){return this.filter(i).head()},Xe.prototype.findLast=function(i){return this.reverse().find(i)},Xe.prototype.invokeMap=qe(function(i,a){return typeof i=="function"?new Xe(this):this.map(function(d){return Ds(d,i,a)})}),Xe.prototype.reject=function(i){return this.filter(Dl(Re(i)))},Xe.prototype.slice=function(i,a){i=He(i);var d=this;return d.__filtered__&&(i>0||a<0)?new Xe(d):(i<0?d=d.takeRight(-i):i&&(d=d.drop(i)),a!==n&&(a=He(a),d=a<0?d.dropRight(-a):d.take(a-i)),d)},Xe.prototype.takeRightWhile=function(i){return this.reverse().takeWhile(i).reverse()},Xe.prototype.toArray=function(){return this.take(X)},mr(Xe.prototype,function(i,a){var d=/^(?:filter|find|map|reject)|While$/.test(a),E=/^(?:head|last)$/.test(a),y=Q[E?"take"+(a=="last"?"Right":""):a],T=E||/^find/.test(a);y&&(Q.prototype[a]=function(){var M=this.__wrapped__,N=E?[1]:arguments,Y=M instanceof Xe,re=N[0],oe=Y||Le(M),se=function(Je){var Ze=y.apply(Q,$r([Je],N));return E&&Ee?Ze[0]:Ze};oe&&d&&typeof re=="function"&&re.length!=1&&(Y=oe=!1);var Ee=this.__chain__,be=!!this.__actions__.length,Oe=T&&!Ee,Ye=Y&&!be;if(!T&&oe){M=Ye?M:new Xe(this);var je=i.apply(M,N);return je.__actions__.push({func:Rl,args:[se],thisArg:n}),new zn(je,Ee)}return Oe&&Ye?i.apply(this,N):(je=this.thru(se),Oe?E?je.value()[0]:je.value():je)})}),Hn(["pop","push","shift","sort","splice","unshift"],function(i){var a=rl[i],d=/^(?:push|sort|unshift)$/.test(i)?"tap":"thru",E=/^(?:pop|shift)$/.test(i);Q.prototype[i]=function(){var y=arguments;if(E&&!this.__chain__){var T=this.value();return a.apply(Le(T)?T:[],y)}return this[d](function(M){return a.apply(Le(M)?M:[],y)})}}),mr(Xe.prototype,function(i,a){var d=Q[a];if(d){var E=d.name+"";At.call(Bi,E)||(Bi[E]=[]),Bi[E].push({name:a,func:d})}}),Bi[bl(n,O).name]=[{name:"wrapper",func:n}],Xe.prototype.clone=ow,Xe.prototype.reverse=iw,Xe.prototype.value=sw,Q.prototype.at=D2,Q.prototype.chain=k2,Q.prototype.commit=F2,Q.prototype.next=L2,Q.prototype.plant=V2,Q.prototype.reverse=H2,Q.prototype.toJSON=Q.prototype.valueOf=Q.prototype.value=W2,Q.prototype.first=Q.prototype.head,Ts&&(Q.prototype[Ts]=N2),Q},mi=F1();Mo?((Mo.exports=mi)._=mi,nA._=mi):$t._=mi}).call(Xn)})(Ic,Ic.exports);var dt=Ic.exports;const Ae=bo(dt),$m=e=>function(){return e.apply(this,arguments)},ns=c.shape({id:c.string,title:c.string,type:c.oneOf(["group","item","collapse"]),icon:c.elementType,url:c.string,parent:c.shape($m(()=>ns)),children:c.arrayOf($m(()=>ns)),resource:c.bool}),$0={fontFamily:"'Inter', sans-serif",menuOrientation:"vertical",miniDrawer:!1,container:!1,mode:"light",presetColor:"theme4",themeDirection:"ltr",appDefaultPath:"/",drawerWidth:260,horizontalMaxItems:6,spacing:2},Xg=w.createContext($0),_j=e=>e==="vertical",$j=e=>e==="horizontal",Bc=({initialConfig:e,children:t})=>{const[n,r]=of("theme-config",{...$0,...e}),o=I=>r(B=>({...B,fontFamily:I})),s=I=>r(B=>({...B,menuOrientation:I})),l=I=>r(B=>({...B,miniDrawer:I})),u=I=>r(B=>({...B,container:I})),A=I=>r(B=>({...B,mode:I})),g=I=>r(B=>({...B,presetColor:I})),p=I=>r(B=>({...B,themeDirection:I})),C=I=>r(B=>({...B,appDefaultPath:I})),h=I=>r(B=>({...B,drawerWidth:I})),m=I=>r(B=>({...B,horizontalMaxItems:I}));return f.jsx(Xg.Provider,{value:{...n,setFontFamily:o,setMenuOrientation:s,setMiniDrawer:l,setContainer:u,setMode:A,setPresetColor:g,setThemeDirection:p,setAppDefaultPath:C,setDrawerWidth:h,setHorizontalMaxItems:m,isVerticalLayout:_j,isHorizontalLayout:$j},children:t})};Bc.propTypes={children:c.node};const eB={openItem:["dashboard"],openComponent:"buttons",selectedID:null,drawerOpen:!1,componentDrawerOpen:!0,menuDashboard:{},error:null},Zg=w.createContext(eB),_g=({menu:e,children:t})=>{const[n,r]=of("menu-config",{...eB}),o=C=>{r(h=>({...h,openItem:C}))},s=C=>{r(h=>({...h,selectedID:C}))},l=C=>{r(h=>({...h,openComponent:C}))},u=C=>{r(h=>({...h,drawerOpen:C}))},A=C=>{r(h=>({...h,componentDrawerOpen:C}))},g=C=>{r(h=>({...h,menuDashboard:C}))},p=C=>{r(h=>({...h,error:C}))};return f.jsx(Zg.Provider,{value:{...n,groups:e,activeItem:o,activeComponent:l,openDrawer:u,openComponentDrawer:A,activeID:s,getMenuSuccess:g,hasError:p},children:t})};_g.propTypes={children:c.node,menu:c.arrayOf(ns)};const $g=w.createContext(void 0),ef=w.createContext(void 0),Io=()=>w.useContext(Zg),eM=["e-","entities/"],tM=e=>{let t=e;return eM.forEach(n=>{t=t!=null&&t.startsWith(n)?t==null?void 0:t.substring(n.length):t}),t},nM=(e,t)=>{var n,r;return((n=t.options)==null?void 0:n.group)===e.id||!((r=t.options)!=null&&r.group)&&e.id==="admin"},rM=(e,t)=>{const n=tM(e.name);return t==null?void 0:t.includes(`${n}:list`)},$d=(e,t)=>{let n=e.find(r=>r.id===t);if(!n)for(let r=0;r<e.length;r++){const o=e[r];if(o.children&&(n=$d(o.children,t),n))return n}return n},tB=(e,t,n)=>{let r=e.find(o=>["group","collapse"].indexOf(o.type)!==-1&&nM(o,t));if(!r)for(let o=0;o<e.length;o++){const s=e[o];if(s.children&&(r=tB(s.children,t),r))return r}return r},nB=(e,t)=>{let n=e.find(r=>r.id===t);if(!n)for(let r=0;r<e.length;r++){const o=e[r];if(o.children&&(n=nB(o.children,t),n))return n}return n},rB=e=>e?e.type==="item"?!0:(e.children&&(e.children=e.children.filter(rB)),e.children&&e.children.length>0):!1,oB=e=>(e.children&&e.children.forEach(t=>{t.parent=e,oB(t)}),e),oM=({userGroups:e,resources:t,permissions:n,translate:r,roles:o})=>{const s=C=>(C.title=r(C.title,{_:C.title}),C.children&&C.children.forEach(h=>s(h)),C),l=Object.keys(t),u=(C,h)=>(C.children&&(C.children=C.children.filter(m=>{if(m.resource===!1){const I=m.roles||[];return!!(I.length===0||I.some(B=>o.includes(B)))}return m.type==="item"?h.includes(m.id):(u(m,h),m.children&&m.children.length>0)})),C),A=dt.cloneDeep(e).map(C=>({type:"group",icon:et.AntDesignOutlined,children:[],...C})).map(s).map(C=>u(C,l)),g=Object.values(t).map(C=>{var h;return((h=C.options)==null?void 0:h.group)||"admin"}).filter((C,h,m)=>m.indexOf(C)===h).filter(C=>C!==void 0&&nB(e,C)===null).map(C=>({id:C,title:r(`ra.menu.group.${C}`),type:"group",icon:et.AntDesignOutlined,children:[]})),p=[...A,...g];return Object.values(t).forEach(C=>{var j,x,S,P;const h=tB(p,C),m=(j=h==null?void 0:h.children)==null?void 0:j.find(L=>L.id===C.name),I=(x=h==null?void 0:h.children)==null?void 0:x.some(L=>L.id===C.name),B=(m==null?void 0:m.roles)||((S=C.options)==null?void 0:S.roles)||[],v=!B||B.length===0||B.some(L=>o.includes(L));if(!rM(C,n)||!C.hasList||!v){I&&((P=h==null?void 0:h.children)==null?void 0:P.length)>0&&(h.children=h.children.filter(L=>L.id!==C.name));return}h&&(h.children||(h.children=[]))}),p.filter(rB).map(oB)},tf=()=>{const e=R.useResourceDefinitions(),{isLoading:t,data:n}=R.useGetIdentity(),r=n&&n.id>0,{isLoading:o,permissions:s}=R.usePermissions(r),{groups:l}=Io(),u=R.useTranslate(),A=w.useMemo(()=>{if(t||!n||n===null||(n==null?void 0:n.id)<=0)return null;const p=((n==null?void 0:n.roles)||[]).map(h=>h.id);return oM({resources:e,permissions:s,translate:u,userGroups:l,roles:p})},[t,o,n,e,s,u,l]),g=w.useMemo(()=>t,[t]);return{menu:A,isLoading:g,getItem:p=>g?!1:$d(A,p),findInMenu:g?()=>{}:$d}},iB=()=>{const e=R.useTranslate(),{isLoading:t,menu:n,findInMenu:r}=tf(),{pathname:o}=Bt.useLocation();return w.useMemo(()=>{var C;const s=o.split("/").filter(h=>h);let l=dt.cloneDeep(n),u=o,A=r(l,o);if(A||(A=r(l,s[s.length-1]),u=A?A.id:u),!A)for(let h=s.length;h>=0;h--){let m=s.slice(0,h).join("/");if(A=r(l,m),A){u=A.id;break}}const g=(C=A==null?void 0:A.url)==null?void 0:C.split("/");if(s.length>=(g==null?void 0:g.length)){const h=s[s.length-1];if(A){const m=h==="create"||o===A.url?"create":"edit",I=`resources.${u}.breadcrumbs.${m}`,B={id:`${u}-${m}`,type:"item",title:e(I,{_:e(I,{_:I})}),url:o,breadcrumbs:!0,parent:A};A.type="collapse",A.breadcrumbs=!0,A.children=A.children||[],A.children.push(B),A=B}}let p=[];if(A){let h={...A,last:!0};for(;h;)p.push(h),h=h.parent;p=p.reverse()}return{isLoading:t,navigation:{items:l},breadcrumbs:p}},[t,o,n,r,e])};var sB={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(Xn,function(){var n=1e3,r=6e4,o=36e5,s="millisecond",l="second",u="minute",A="hour",g="day",p="week",C="month",h="quarter",m="year",I="date",B="Invalid Date",v=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,O=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,j={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(Z){var K=["th","st","nd","rd"],V=Z%100;return"["+Z+(K[(V-20)%10]||K[V]||K[0])+"]"}},x=function(Z,K,V){var G=String(Z);return!G||G.length>=K?Z:""+Array(K+1-G.length).join(V)+Z},S={s:x,z:function(Z){var K=-Z.utcOffset(),V=Math.abs(K),G=Math.floor(V/60),F=V%60;return(K<=0?"+":"-")+x(G,2,"0")+":"+x(F,2,"0")},m:function Z(K,V){if(K.date()<V.date())return-Z(V,K);var G=12*(V.year()-K.year())+(V.month()-K.month()),F=K.clone().add(G,C),$=V-F<0,H=K.clone().add(G+($?-1:1),C);return+(-(G+(V-F)/($?F-H:H-F))||0)},a:function(Z){return Z<0?Math.ceil(Z)||0:Math.floor(Z)},p:function(Z){return{M:C,y:m,w:p,d:g,D:I,h:A,m:u,s:l,ms:s,Q:h}[Z]||String(Z||"").toLowerCase().replace(/s$/,"")},u:function(Z){return Z===void 0}},P="en",L={};L[P]=j;var k="$isDayjsObject",q=function(Z){return Z instanceof le||!(!Z||!Z[k])},J=function Z(K,V,G){var F;if(!K)return P;if(typeof K=="string"){var $=K.toLowerCase();L[$]&&(F=$),V&&(L[$]=V,F=$);var H=K.split("-");if(!F&&H.length>1)return Z(H[0])}else{var X=K.name;L[X]=K,F=X}return!G&&F&&(P=F),F||!G&&P},U=function(Z,K){if(q(Z))return Z.clone();var V=typeof K=="object"?K:{};return V.date=Z,V.args=arguments,new le(V)},_=S;_.l=J,_.i=q,_.w=function(Z,K){return U(Z,{locale:K.$L,utc:K.$u,x:K.$x,$offset:K.$offset})};var le=function(){function Z(V){this.$L=J(V.locale,null,!0),this.parse(V),this.$x=this.$x||V.x||{},this[k]=!0}var K=Z.prototype;return K.parse=function(V){this.$d=function(G){var F=G.date,$=G.utc;if(F===null)return new Date(NaN);if(_.u(F))return new Date;if(F instanceof Date)return new Date(F);if(typeof F=="string"&&!/Z$/i.test(F)){var H=F.match(v);if(H){var X=H[2]-1||0,ge=(H[7]||"0").substring(0,3);return $?new Date(Date.UTC(H[1],X,H[3]||1,H[4]||0,H[5]||0,H[6]||0,ge)):new Date(H[1],X,H[3]||1,H[4]||0,H[5]||0,H[6]||0,ge)}}return new Date(F)}(V),this.init()},K.init=function(){var V=this.$d;this.$y=V.getFullYear(),this.$M=V.getMonth(),this.$D=V.getDate(),this.$W=V.getDay(),this.$H=V.getHours(),this.$m=V.getMinutes(),this.$s=V.getSeconds(),this.$ms=V.getMilliseconds()},K.$utils=function(){return _},K.isValid=function(){return this.$d.toString()!==B},K.isSame=function(V,G){var F=U(V);return this.startOf(G)<=F&&F<=this.endOf(G)},K.isAfter=function(V,G){return U(V)<this.startOf(G)},K.isBefore=function(V,G){return this.endOf(G)<U(V)},K.$g=function(V,G,F){return _.u(V)?this[G]:this.set(F,V)},K.unix=function(){return Math.floor(this.valueOf()/1e3)},K.valueOf=function(){return this.$d.getTime()},K.startOf=function(V,G){var F=this,$=!!_.u(G)||G,H=_.p(V),X=function(Ce,Ie){var Qe=_.w(F.$u?Date.UTC(F.$y,Ie,Ce):new Date(F.$y,Ie,Ce),F);return $?Qe:Qe.endOf(g)},ge=function(Ce,Ie){return _.w(F.toDate()[Ce].apply(F.toDate("s"),($?[0,0,0,0]:[23,59,59,999]).slice(Ie)),F)},pe=this.$W,ce=this.$M,fe=this.$D,he="set"+(this.$u?"UTC":"");switch(H){case m:return $?X(1,0):X(31,11);case C:return $?X(1,ce):X(0,ce+1);case p:var Be=this.$locale().weekStart||0,me=(pe<Be?pe+7:pe)-Be;return X($?fe-me:fe+(6-me),ce);case g:case I:return ge(he+"Hours",0);case A:return ge(he+"Minutes",1);case u:return ge(he+"Seconds",2);case l:return ge(he+"Milliseconds",3);default:return this.clone()}},K.endOf=function(V){return this.startOf(V,!1)},K.$set=function(V,G){var F,$=_.p(V),H="set"+(this.$u?"UTC":""),X=(F={},F[g]=H+"Date",F[I]=H+"Date",F[C]=H+"Month",F[m]=H+"FullYear",F[A]=H+"Hours",F[u]=H+"Minutes",F[l]=H+"Seconds",F[s]=H+"Milliseconds",F)[$],ge=$===g?this.$D+(G-this.$W):G;if($===C||$===m){var pe=this.clone().set(I,1);pe.$d[X](ge),pe.init(),this.$d=pe.set(I,Math.min(this.$D,pe.daysInMonth())).$d}else X&&this.$d[X](ge);return this.init(),this},K.set=function(V,G){return this.clone().$set(V,G)},K.get=function(V){return this[_.p(V)]()},K.add=function(V,G){var F,$=this;V=Number(V);var H=_.p(G),X=function(ce){var fe=U($);return _.w(fe.date(fe.date()+Math.round(ce*V)),$)};if(H===C)return this.set(C,this.$M+V);if(H===m)return this.set(m,this.$y+V);if(H===g)return X(1);if(H===p)return X(7);var ge=(F={},F[u]=r,F[A]=o,F[l]=n,F)[H]||1,pe=this.$d.getTime()+V*ge;return _.w(pe,this)},K.subtract=function(V,G){return this.add(-1*V,G)},K.format=function(V){var G=this,F=this.$locale();if(!this.isValid())return F.invalidDate||B;var $=V||"YYYY-MM-DDTHH:mm:ssZ",H=_.z(this),X=this.$H,ge=this.$m,pe=this.$M,ce=F.weekdays,fe=F.months,he=F.meridiem,Be=function(Ie,Qe,ae,Ne){return Ie&&(Ie[Qe]||Ie(G,$))||ae[Qe].slice(0,Ne)},me=function(Ie){return _.s(X%12||12,Ie,"0")},Ce=he||function(Ie,Qe,ae){var Ne=Ie<12?"AM":"PM";return ae?Ne.toLowerCase():Ne};return $.replace(O,function(Ie,Qe){return Qe||function(ae){switch(ae){case"YY":return String(G.$y).slice(-2);case"YYYY":return _.s(G.$y,4,"0");case"M":return pe+1;case"MM":return _.s(pe+1,2,"0");case"MMM":return Be(F.monthsShort,pe,fe,3);case"MMMM":return Be(fe,pe);case"D":return G.$D;case"DD":return _.s(G.$D,2,"0");case"d":return String(G.$W);case"dd":return Be(F.weekdaysMin,G.$W,ce,2);case"ddd":return Be(F.weekdaysShort,G.$W,ce,3);case"dddd":return ce[G.$W];case"H":return String(X);case"HH":return _.s(X,2,"0");case"h":return me(1);case"hh":return me(2);case"a":return Ce(X,ge,!0);case"A":return Ce(X,ge,!1);case"m":return String(ge);case"mm":return _.s(ge,2,"0");case"s":return String(G.$s);case"ss":return _.s(G.$s,2,"0");case"SSS":return _.s(G.$ms,3,"0");case"Z":return H}return null}(Ie)||H.replace(":","")})},K.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},K.diff=function(V,G,F){var $,H=this,X=_.p(G),ge=U(V),pe=(ge.utcOffset()-this.utcOffset())*r,ce=this-ge,fe=function(){return _.m(H,ge)};switch(X){case m:$=fe()/12;break;case C:$=fe();break;case h:$=fe()/3;break;case p:$=(ce-pe)/6048e5;break;case g:$=(ce-pe)/864e5;break;case A:$=ce/o;break;case u:$=ce/r;break;case l:$=ce/n;break;default:$=ce}return F?$:_.a($)},K.daysInMonth=function(){return this.endOf(C).$D},K.$locale=function(){return L[this.$L]},K.locale=function(V,G){if(!V)return this.$L;var F=this.clone(),$=J(V,G,!0);return $&&(F.$L=$),F},K.clone=function(){return _.w(this.$d,this)},K.toDate=function(){return new Date(this.valueOf())},K.toJSON=function(){return this.isValid()?this.toISOString():null},K.toISOString=function(){return this.$d.toISOString()},K.toString=function(){return this.$d.toUTCString()},Z}(),ie=le.prototype;return U.prototype=ie,[["$ms",s],["$s",l],["$m",u],["$H",A],["$W",g],["$M",C],["$y",m],["$D",I]].forEach(function(Z){ie[Z[1]]=function(K){return this.$g(K,Z[0],Z[1])}}),U.extend=function(Z,K){return Z.$i||(Z(K,le,U),Z.$i=!0),U},U.locale=J,U.isDayjs=q,U.unix=function(Z){return U(1e3*Z)},U.en=L[P],U.Ls=L,U.p={},U})})(sB);var iM=sB.exports;const qr=bo(iM),aB=e=>{const t=e.split(":");t.length===1&&t.push("00");const n=parseInt(t[0]),r=parseInt(t[1]);return qr().hour(n).minute(r)};function sM(){let e=new Date().getTime();return window.performance&&typeof window.performance.now=="function"&&(e+=performance.now()),"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(n){const r=(e+Math.random()*16)%16|0;return e=Math.floor(e/16),(n=="x"?r:r&3|8).toString(16)})}function nf(e={},t=[],n={}){const{isEmpty:r=Ae.isEmpty}=n;return!Ae.some(t,o=>r((e??{})[o.locale]))}function rf(e,t,n){if(!Ae.isPlainObject(e)||t===void 0)return;const r=Ae.isPlainObject(n)?n:{},o=!!((r==null?void 0:r.fallback)??!0);let s=e[String(t)];if(s===void 0&&o){const l=Ae.isArray(r.fallbackLocales)&&!Ae.isEmpty(r.fallbackLocales)?r.fallbackLocales:["en"];s=Ae.chain(l).map(u=>e[String(u)]).reject(Ae.isUndefined).first().value(),s===void 0&&(s=Ae.chain(e).values().first().value())}return s}function lB(e){const[t]=de.useLocaleState();return e!==void 0?String(e):t}function aM(e,t){const n=lB(t==null?void 0:t.locale);return rf(e,n,t)}function lM(e){const t=lB(e==null?void 0:e.locale);return w.useCallback(r=>rf(r,t,e),[t,e])}function of(e,t){const[n,r]=w.useState(()=>{const s=typeof window<"u"?localStorage.getItem(e):null;return s===null?t:JSON.parse(s)});return w.useEffect(()=>{const s=l=>{typeof window<"u"&&l.storageArea===localStorage&&l.key===e&&r(l.newValue?JSON.parse(l.newValue):l.newValue)};return window.addEventListener("storage",s),()=>{window.removeEventListener("storage",s)}},[e,t]),[n,s=>{r(l=>{const u=typeof s=="function"?s(l):s;return typeof window<"u"&&localStorage.setItem(e,JSON.stringify(u)),u})}]}function cB(e){if(!Ae.isPlainObject(e))throw new Error("[useMemoizedObject]: param must be a plain JS object");const[t,n]=w.useState(e);return w.useEffect(()=>{Ae.isEqual(e,t)||n(e)},[e,t]),t}function ou(){const[e,t]=w.useState(null),n=!!e,r=w.useCallback(l=>t(l==null?void 0:l.currentTarget),[t]),o=w.useCallback(()=>t(null),[t]),s=w.useCallback(l=>{n?o():r(l)},[n,r,o]);return{anchorEl:e,open:n,handleClick:r,handleClose:o,handleToggle:s}}function cM(e,t){const[n,r]=w.useState({width:1,height:1}),o=e.current;return w.useEffect(()=>{function s(){var g;let u=0,A=0;switch(t){case"client":u=(o==null?void 0:o.clientWidth)??0,A=(o==null?void 0:o.clientHeight)??0;break;case"offset":u=(o==null?void 0:o.offsetWidth)??0,A=(o==null?void 0:o.offsetHeight)??0;break;case"scroll":u=(o==null?void 0:o.scrollWidth)??0,A=(o==null?void 0:o.scrollHeight)??0;break;case"bounding":default:{const p=((g=e.current)==null?void 0:g.getBoundingClientRect())??{width:0,height:0};u=p.width,A=p.height;break}}r({width:u,height:A})}const l=new ResizeObserver(s);return Ae.isEmpty(e==null?void 0:e.current)||(l.observe(e==null?void 0:e.current),s()),()=>{l.disconnect()}},[o,t]),n}const sf=e=>{const t=R.useRecordContext(),n=R.useTranslate(),r=R.useResourceContext(),o=t!=null&&t.id?"edit":"create";return w.useMemo(()=>{if(e===!1)return;const l=`resources.${r}.title`;return e||n(`resources.${r}.title.${o}`,{_:n(l,{_:l}),...t})},[o,t,r,n,e])};function Pr(e,t,n){const r=Ae.chain((e==null?void 0:e.sx)??{}).cloneDeepWith(l=>Ae.isFunction(l)?l:void 0).value();n!=null&&n.defaults?Ae.defaultsDeep(r,t):Ae.merge(r,t);const[o,s]=w.useState(r);return w.useEffect(()=>{Ae.isEqual(o,r)||s(r)},[o,r]),o}const uB=()=>w.useContext($g),uM=()=>w.useContext(ef),Ln=()=>w.useContext(Xg),AB=ue(Zj,{shouldForwardProp:e=>e!=="open"})(({theme:e,open:t})=>{const{drawerWidth:n}=Ln();return{zIndex:e.zIndex.drawer+1,transition:e.transitions.create(["width","margin"],{easing:e.transitions.easing.sharp,duration:e.transitions.duration.leavingScreen}),...!t&&{width:`calc(100% - ${e.spacing(7.5)})`},...t&&{marginLeft:n,width:`calc(100% - ${n}px)`,transition:e.transitions.create(["width","margin"],{easing:e.transitions.easing.sharp,duration:e.transitions.duration.enteringScreen})}}});AB.propTypes={open:c.bool};const AM=w.forwardRef(function(t,n){const r=Pr(t,{color:"text.primary"},{defaults:!0});return f.jsx(b.Button,{ref:n,...t,color:"secondary",variant:"text",sx:r})}),dB=w.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),iu=w.createContext({}),af=w.createContext(null),su=typeof document<"u",dM=su?w.useLayoutEffect:w.useEffect,gB=w.createContext({strict:!1});function gM(e,t,n,r){const{visualElement:o}=w.useContext(iu),s=w.useContext(gB),l=w.useContext(af),u=w.useContext(dB).reducedMotion,A=w.useRef();r=r||s.renderer,!A.current&&r&&(A.current=r(e,{visualState:t,parent:o,props:n,presenceContext:l,blockInitialAnimation:l?l.initial===!1:!1,reducedMotionConfig:u}));const g=A.current;w.useInsertionEffect(()=>{g&&g.update(n,l)});const p=w.useRef(!!window.HandoffAppearAnimations);return dM(()=>{g&&(g.render(),p.current&&g.animationState&&g.animationState.animateChanges())}),w.useEffect(()=>{g&&(g.updateFeatures(),!p.current&&g.animationState&&g.animationState.animateChanges(),window.HandoffAppearAnimations=void 0,p.current=!1)}),g}function zi(e){return typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function fM(e,t,n){return w.useCallback(r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):zi(n)&&(n.current=r))},[t])}function fa(e){return typeof e=="string"||Array.isArray(e)}function au(e){return typeof e=="object"&&typeof e.start=="function"}const lf=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],cf=["initial",...lf];function lu(e){return au(e.animate)||cf.some(t=>fa(e[t]))}function fB(e){return!!(lu(e)||e.variants)}function pM(e,t){if(lu(e)){const{initial:n,animate:r}=e;return{initial:n===!1||fa(n)?n:void 0,animate:fa(r)?r:void 0}}return e.inherit!==!1?t:{}}function hM(e){const{initial:t,animate:n}=pM(e,w.useContext(iu));return w.useMemo(()=>({initial:t,animate:n}),[eE(t),eE(n)])}function eE(e){return Array.isArray(e)?e.join(" "):e}const tE={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},pa={};for(const e in tE)pa[e]={isEnabled:t=>tE[e].some(n=>!!t[n])};function CM(e){for(const t in e)pa[t]={...pa[t],...e[t]}}const pB=w.createContext({}),hB=w.createContext({}),mM=Symbol.for("motionComponentSymbol");function EM({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:o}){e&&CM(e);function s(u,A){let g;const p={...w.useContext(dB),...u,layoutId:IM(u)},{isStatic:C}=p,h=hM(u),m=r(u,C);if(!C&&su){h.visualElement=gM(o,m,p,t);const I=w.useContext(hB),B=w.useContext(gB).strict;h.visualElement&&(g=h.visualElement.loadFeatures(p,B,e,I))}return D.createElement(iu.Provider,{value:h},g&&h.visualElement?D.createElement(g,{visualElement:h.visualElement,...p}):null,n(o,u,fM(m,h.visualElement,A),m,C,h.visualElement))}const l=w.forwardRef(s);return l[mM]=o,l}function IM({layoutId:e}){const t=w.useContext(pB).id;return t&&e!==void 0?t+"-"+e:e}function BM(e){function t(r,o={}){return EM(e(r,o))}if(typeof Proxy>"u")return t;const n=new Map;return new Proxy(t,{get:(r,o)=>(n.has(o)||n.set(o,t(o)),n.get(o))})}const vM=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function uf(e){return typeof e!="string"||e.includes("-")?!1:!!(vM.indexOf(e)>-1||/[A-Z]/.test(e))}const vc={};function yM(e){Object.assign(vc,e)}const Pa=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],ui=new Set(Pa);function CB(e,{layout:t,layoutId:n}){return ui.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!vc[e]||e==="opacity")}const vn=e=>!!(e&&e.getVelocity),bM={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},QM=Pa.length;function xM(e,{enableHardwareAcceleration:t=!0,allowTransformNone:n=!0},r,o){let s="";for(let l=0;l<QM;l++){const u=Pa[l];if(e[u]!==void 0){const A=bM[u]||u;s+=`${A}(${e[u]}) `}}return t&&!e.z&&(s+="translateZ(0)"),s=s.trim(),o?s=o(e,r?"":s):n&&r&&(s="none"),s}const mB=e=>t=>typeof t=="string"&&t.startsWith(e),EB=mB("--"),eg=mB("var(--"),wM=/var\s*\(\s*--[\w-]+(\s*,\s*(?:(?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)+)?\s*\)/g,TM=(e,t)=>t&&typeof e=="number"?t.transform(e):e,Bo=(e,t,n)=>Math.min(Math.max(n,e),t),Ai={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},na={...Ai,transform:e=>Bo(0,1,e)},Hl={...Ai,default:1},ra=e=>Math.round(e*1e5)/1e5,cu=/(-)?([\d]*\.?[\d])+/g,IB=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,PM=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function Sa(e){return typeof e=="string"}const Ra=e=>({test:t=>Sa(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Ao=Ra("deg"),br=Ra("%"),Me=Ra("px"),SM=Ra("vh"),RM=Ra("vw"),nE={...br,parse:e=>br.parse(e)/100,transform:e=>br.transform(e*100)},rE={...Ai,transform:Math.round},BB={borderWidth:Me,borderTopWidth:Me,borderRightWidth:Me,borderBottomWidth:Me,borderLeftWidth:Me,borderRadius:Me,radius:Me,borderTopLeftRadius:Me,borderTopRightRadius:Me,borderBottomRightRadius:Me,borderBottomLeftRadius:Me,width:Me,maxWidth:Me,height:Me,maxHeight:Me,size:Me,top:Me,right:Me,bottom:Me,left:Me,padding:Me,paddingTop:Me,paddingRight:Me,paddingBottom:Me,paddingLeft:Me,margin:Me,marginTop:Me,marginRight:Me,marginBottom:Me,marginLeft:Me,rotate:Ao,rotateX:Ao,rotateY:Ao,rotateZ:Ao,scale:Hl,scaleX:Hl,scaleY:Hl,scaleZ:Hl,skew:Ao,skewX:Ao,skewY:Ao,distance:Me,translateX:Me,translateY:Me,translateZ:Me,x:Me,y:Me,z:Me,perspective:Me,transformPerspective:Me,opacity:na,originX:nE,originY:nE,originZ:Me,zIndex:rE,fillOpacity:na,strokeOpacity:na,numOctaves:rE};function Af(e,t,n,r){const{style:o,vars:s,transform:l,transformOrigin:u}=e;let A=!1,g=!1,p=!0;for(const C in t){const h=t[C];if(EB(C)){s[C]=h;continue}const m=BB[C],I=TM(h,m);if(ui.has(C)){if(A=!0,l[C]=I,!p)continue;h!==(m.default||0)&&(p=!1)}else C.startsWith("origin")?(g=!0,u[C]=I):o[C]=I}if(t.transform||(A||r?o.transform=xM(e.transform,n,p,r):o.transform&&(o.transform="none")),g){const{originX:C="50%",originY:h="50%",originZ:m=0}=u;o.transformOrigin=`${C} ${h} ${m}`}}const df=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function vB(e,t,n){for(const r in t)!vn(t[r])&&!CB(r,n)&&(e[r]=t[r])}function OM({transformTemplate:e},t,n){return w.useMemo(()=>{const r=df();return Af(r,t,{enableHardwareAcceleration:!n},e),Object.assign({},r.vars,r.style)},[t])}function jM(e,t,n){const r=e.style||{},o={};return vB(o,r,e),Object.assign(o,OM(e,t,n)),e.transformValues?e.transformValues(o):o}function MM(e,t,n){const r={},o=jM(e,t,n);return e.drag&&e.dragListener!==!1&&(r.draggable=!1,o.userSelect=o.WebkitUserSelect=o.WebkitTouchCallout="none",o.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(r.tabIndex=0),r.style=o,r}const DM=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","ignoreStrict","viewport"]);function yc(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||DM.has(e)}let yB=e=>!yc(e);function kM(e){e&&(yB=t=>t.startsWith("on")?!yc(t):e(t))}try{kM(require("@emotion/is-prop-valid").default)}catch{}function FM(e,t,n){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||(yB(o)||n===!0&&yc(o)||!t&&!yc(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}function oE(e,t,n){return typeof e=="string"?e:Me.transform(t+n*e)}function LM(e,t,n){const r=oE(t,e.x,e.width),o=oE(n,e.y,e.height);return`${r} ${o}`}const NM={offset:"stroke-dashoffset",array:"stroke-dasharray"},VM={offset:"strokeDashoffset",array:"strokeDasharray"};function HM(e,t,n=1,r=0,o=!0){e.pathLength=1;const s=o?NM:VM;e[s.offset]=Me.transform(-r);const l=Me.transform(t),u=Me.transform(n);e[s.array]=`${l} ${u}`}function gf(e,{attrX:t,attrY:n,attrScale:r,originX:o,originY:s,pathLength:l,pathSpacing:u=1,pathOffset:A=0,...g},p,C,h){if(Af(e,g,p,h),C){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:m,style:I,dimensions:B}=e;m.transform&&(B&&(I.transform=m.transform),delete m.transform),B&&(o!==void 0||s!==void 0||I.transform)&&(I.transformOrigin=LM(B,o!==void 0?o:.5,s!==void 0?s:.5)),t!==void 0&&(m.x=t),n!==void 0&&(m.y=n),r!==void 0&&(m.scale=r),l!==void 0&&HM(m,l,u,A,!1)}const bB=()=>({...df(),attrs:{}}),ff=e=>typeof e=="string"&&e.toLowerCase()==="svg";function WM(e,t,n,r){const o=w.useMemo(()=>{const s=bB();return gf(s,t,{enableHardwareAcceleration:!1},ff(r),e.transformTemplate),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};vB(s,e.style,e),o.style={...s,...o.style}}return o}function zM(e=!1){return(n,r,o,{latestValues:s},l)=>{const A=(uf(n)?WM:MM)(r,s,l,n),p={...FM(r,typeof n=="string",e),...A,ref:o},{children:C}=r,h=w.useMemo(()=>vn(C)?C.get():C,[C]);return w.createElement(n,{...p,children:h})}}const pf=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function QB(e,{style:t,vars:n},r,o){Object.assign(e.style,t,o&&o.getProjectionStyles(r));for(const s in n)e.style.setProperty(s,n[s])}const xB=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function wB(e,t,n,r){QB(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(xB.has(o)?o:pf(o),t.attrs[o])}function hf(e,t){const{style:n}=e,r={};for(const o in n)(vn(n[o])||t.style&&vn(t.style[o])||CB(o,e))&&(r[o]=n[o]);return r}function TB(e,t){const n=hf(e,t);for(const r in e)if(vn(e[r])||vn(t[r])){const o=Pa.indexOf(r)!==-1?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r;n[o]=e[r]}return n}function Cf(e,t,n,r={},o={}){return typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,o)),typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,o)),t}function UM(e){const t=w.useRef(null);return t.current===null&&(t.current=e()),t.current}const bc=e=>Array.isArray(e),YM=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),GM=e=>bc(e)?e[e.length-1]||0:e;function ic(e){const t=vn(e)?e.get():e;return YM(t)?t.toValue():t}function KM({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:n},r,o,s){const l={latestValues:qM(r,o,s,e),renderState:t()};return n&&(l.mount=u=>n(r,u,l)),l}const PB=e=>(t,n)=>{const r=w.useContext(iu),o=w.useContext(af),s=()=>KM(e,t,r,o);return n?s():UM(s)};function qM(e,t,n,r){const o={},s=r(e,{});for(const h in s)o[h]=ic(s[h]);let{initial:l,animate:u}=e;const A=lu(e),g=fB(e);t&&g&&!A&&e.inherit!==!1&&(l===void 0&&(l=t.initial),u===void 0&&(u=t.animate));let p=n?n.initial===!1:!1;p=p||l===!1;const C=p?u:l;return C&&typeof C!="boolean"&&!au(C)&&(Array.isArray(C)?C:[C]).forEach(m=>{const I=Cf(e,m);if(!I)return;const{transitionEnd:B,transition:v,...O}=I;for(const j in O){let x=O[j];if(Array.isArray(x)){const S=p?x.length-1:0;x=x[S]}x!==null&&(o[j]=x)}for(const j in B)o[j]=B[j]}),o}const Dt=e=>e;class iE{constructor(){this.order=[],this.scheduled=new Set}add(t){if(!this.scheduled.has(t))return this.scheduled.add(t),this.order.push(t),!0}remove(t){const n=this.order.indexOf(t);n!==-1&&(this.order.splice(n,1),this.scheduled.delete(t))}clear(){this.order.length=0,this.scheduled.clear()}}function JM(e){let t=new iE,n=new iE,r=0,o=!1,s=!1;const l=new WeakSet,u={schedule:(A,g=!1,p=!1)=>{const C=p&&o,h=C?t:n;return g&&l.add(A),h.add(A)&&C&&o&&(r=t.order.length),A},cancel:A=>{n.remove(A),l.delete(A)},process:A=>{if(o){s=!0;return}if(o=!0,[t,n]=[n,t],n.clear(),r=t.order.length,r)for(let g=0;g<r;g++){const p=t.order[g];p(A),l.has(p)&&(u.schedule(p),e())}o=!1,s&&(s=!1,u.process(A))}};return u}const Wl=["prepare","read","update","preRender","render","postRender"],XM=40;function ZM(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},s=Wl.reduce((C,h)=>(C[h]=JM(()=>n=!0),C),{}),l=C=>s[C].process(o),u=()=>{const C=performance.now();n=!1,o.delta=r?1e3/60:Math.max(Math.min(C-o.timestamp,XM),1),o.timestamp=C,o.isProcessing=!0,Wl.forEach(l),o.isProcessing=!1,n&&t&&(r=!1,e(u))},A=()=>{n=!0,r=!0,o.isProcessing||e(u)};return{schedule:Wl.reduce((C,h)=>{const m=s[h];return C[h]=(I,B=!1,v=!1)=>(n||A(),m.schedule(I,B,v)),C},{}),cancel:C=>Wl.forEach(h=>s[h].cancel(C)),state:o,steps:s}}const{schedule:vt,cancel:Jr,state:Xt,steps:pd}=ZM(typeof requestAnimationFrame<"u"?requestAnimationFrame:Dt,!0),_M={useVisualState:PB({scrapeMotionValuesFromProps:TB,createRenderState:bB,onMount:(e,t,{renderState:n,latestValues:r})=>{vt.read(()=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}}),vt.render(()=>{gf(n,r,{enableHardwareAcceleration:!1},ff(t.tagName),e.transformTemplate),wB(t,n)})}})},$M={useVisualState:PB({scrapeMotionValuesFromProps:hf,createRenderState:df})};function e3(e,{forwardMotionProps:t=!1},n,r){return{...uf(e)?_M:$M,preloadedFeatures:n,useRender:zM(t),createVisualElement:r,Component:e}}function Ur(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const SB=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function uu(e,t="page"){return{point:{x:e[t+"X"],y:e[t+"Y"]}}}const t3=e=>t=>SB(t)&&e(t,uu(t));function Yr(e,t,n,r){return Ur(e,t,t3(n),r)}const n3=(e,t)=>n=>t(e(n)),mo=(...e)=>e.reduce(n3);function RB(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const sE=RB("dragHorizontal"),aE=RB("dragVertical");function OB(e){let t=!1;if(e==="y")t=aE();else if(e==="x")t=sE();else{const n=sE(),r=aE();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function jB(){const e=OB(!0);return e?(e(),!1):!0}class xo{constructor(t){this.isMounted=!1,this.node=t}update(){}}function lE(e,t){const n="pointer"+(t?"enter":"leave"),r="onHover"+(t?"Start":"End"),o=(s,l)=>{if(s.type==="touch"||jB())return;const u=e.getProps();e.animationState&&u.whileHover&&e.animationState.setActive("whileHover",t),u[r]&&vt.update(()=>u[r](s,l))};return Yr(e.current,n,o,{passive:!e.getProps()[r]})}class r3 extends xo{mount(){this.unmount=mo(lE(this.node,!0),lE(this.node,!1))}unmount(){}}class o3 extends xo{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=mo(Ur(this.node.current,"focus",()=>this.onFocus()),Ur(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const MB=(e,t)=>t?e===t?!0:MB(e,t.parentElement):!1;function hd(e,t){if(!t)return;const n=new PointerEvent("pointer"+e);t(n,uu(n))}class i3 extends xo{constructor(){super(...arguments),this.removeStartListeners=Dt,this.removeEndListeners=Dt,this.removeAccessibleListeners=Dt,this.startPointerPress=(t,n)=>{if(this.removeEndListeners(),this.isPressing)return;const r=this.node.getProps(),s=Yr(window,"pointerup",(u,A)=>{if(!this.checkPressEnd())return;const{onTap:g,onTapCancel:p}=this.node.getProps();vt.update(()=>{MB(this.node.current,u.target)?g&&g(u,A):p&&p(u,A)})},{passive:!(r.onTap||r.onPointerUp)}),l=Yr(window,"pointercancel",(u,A)=>this.cancelPress(u,A),{passive:!(r.onTapCancel||r.onPointerCancel)});this.removeEndListeners=mo(s,l),this.startPress(t,n)},this.startAccessiblePress=()=>{const t=s=>{if(s.key!=="Enter"||this.isPressing)return;const l=u=>{u.key!=="Enter"||!this.checkPressEnd()||hd("up",(A,g)=>{const{onTap:p}=this.node.getProps();p&&vt.update(()=>p(A,g))})};this.removeEndListeners(),this.removeEndListeners=Ur(this.node.current,"keyup",l),hd("down",(u,A)=>{this.startPress(u,A)})},n=Ur(this.node.current,"keydown",t),r=()=>{this.isPressing&&hd("cancel",(s,l)=>this.cancelPress(s,l))},o=Ur(this.node.current,"blur",r);this.removeAccessibleListeners=mo(n,o)}}startPress(t,n){this.isPressing=!0;const{onTapStart:r,whileTap:o}=this.node.getProps();o&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),r&&vt.update(()=>r(t,n))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!jB()}cancelPress(t,n){if(!this.checkPressEnd())return;const{onTapCancel:r}=this.node.getProps();r&&vt.update(()=>r(t,n))}mount(){const t=this.node.getProps(),n=Yr(this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),r=Ur(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=mo(n,r)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const tg=new WeakMap,Cd=new WeakMap,s3=e=>{const t=tg.get(e.target);t&&t(e)},a3=e=>{e.forEach(s3)};function l3({root:e,...t}){const n=e||document;Cd.has(n)||Cd.set(n,{});const r=Cd.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(a3,{root:e,...t})),r[o]}function c3(e,t,n){const r=l3(t);return tg.set(e,n),r.observe(e),()=>{tg.delete(e),r.unobserve(e)}}const u3={some:0,all:1};class A3 extends xo{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:o="some",once:s}=t,l={root:n?n.current:void 0,rootMargin:r,threshold:typeof o=="number"?o:u3[o]},u=A=>{const{isIntersecting:g}=A;if(this.isInView===g||(this.isInView=g,s&&!g&&this.hasEnteredView))return;g&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",g);const{onViewportEnter:p,onViewportLeave:C}=this.node.getProps(),h=g?p:C;h&&h(A)};return c3(this.node.current,l,u)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(d3(t,n))&&this.startObserver()}unmount(){}}function d3({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const g3={inView:{Feature:A3},tap:{Feature:i3},focus:{Feature:o3},hover:{Feature:r3}};function DB(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}function f3(e){const t={};return e.values.forEach((n,r)=>t[r]=n.get()),t}function p3(e){const t={};return e.values.forEach((n,r)=>t[r]=n.getVelocity()),t}function Au(e,t,n){const r=e.getProps();return Cf(r,t,n!==void 0?n:r.custom,f3(e),p3(e))}const h3="framerAppearId",C3="data-"+pf(h3);let Oa=Dt,xr=Dt;process.env.NODE_ENV!=="production"&&(Oa=(e,t)=>{!e&&typeof console<"u"&&console.warn(t)},xr=(e,t)=>{if(!e)throw new Error(t)});const Eo=e=>e*1e3,Gr=e=>e/1e3,m3={current:!1},kB=e=>Array.isArray(e)&&typeof e[0]=="number";function FB(e){return!!(!e||typeof e=="string"&&LB[e]||kB(e)||Array.isArray(e)&&e.every(FB))}const Zs=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,LB={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Zs([0,.65,.55,1]),circOut:Zs([.55,0,1,.45]),backIn:Zs([.31,.01,.66,-.59]),backOut:Zs([.33,1.53,.69,.99])};function NB(e){if(e)return kB(e)?Zs(e):Array.isArray(e)?e.map(NB):LB[e]}function E3(e,t,n,{delay:r=0,duration:o,repeat:s=0,repeatType:l="loop",ease:u,times:A}={}){const g={[t]:n};A&&(g.offset=A);const p=NB(u);return Array.isArray(p)&&(g.easing=p),e.animate(g,{delay:r,duration:o,easing:Array.isArray(p)?"linear":p,fill:"both",iterations:s+1,direction:l==="reverse"?"alternate":"normal"})}function I3(e,{repeat:t,repeatType:n="loop"}){const r=t&&n!=="loop"&&t%2===1?0:e.length-1;return e[r]}const VB=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,B3=1e-7,v3=12;function y3(e,t,n,r,o){let s,l,u=0;do l=t+(n-t)/2,s=VB(l,r,o)-e,s>0?n=l:t=l;while(Math.abs(s)>B3&&++u<v3);return l}function ja(e,t,n,r){if(e===t&&n===r)return Dt;const o=s=>y3(s,0,1,e,n);return s=>s===0||s===1?s:VB(o(s),t,r)}const b3=ja(.42,0,1,1),Q3=ja(0,0,.58,1),HB=ja(.42,0,.58,1),x3=e=>Array.isArray(e)&&typeof e[0]!="number",WB=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,zB=e=>t=>1-e(1-t),UB=e=>1-Math.sin(Math.acos(e)),mf=zB(UB),w3=WB(mf),YB=ja(.33,1.53,.69,.99),Ef=zB(YB),T3=WB(Ef),P3=e=>(e*=2)<1?.5*Ef(e):.5*(2-Math.pow(2,-10*(e-1))),cE={linear:Dt,easeIn:b3,easeInOut:HB,easeOut:Q3,circIn:UB,circInOut:w3,circOut:mf,backIn:Ef,backInOut:T3,backOut:YB,anticipate:P3},uE=e=>{if(Array.isArray(e)){xr(e.length===4,"Cubic bezier arrays must contain four numerical values.");const[t,n,r,o]=e;return ja(t,n,r,o)}else if(typeof e=="string")return xr(cE[e]!==void 0,`Invalid easing type '${e}'`),cE[e];return e},If=(e,t)=>n=>!!(Sa(n)&&PM.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t)),GB=(e,t,n)=>r=>{if(!Sa(r))return r;const[o,s,l,u]=r.match(cu);return{[e]:parseFloat(o),[t]:parseFloat(s),[n]:parseFloat(l),alpha:u!==void 0?parseFloat(u):1}},S3=e=>Bo(0,255,e),md={...Ai,transform:e=>Math.round(S3(e))},ei={test:If("rgb","red"),parse:GB("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+md.transform(e)+", "+md.transform(t)+", "+md.transform(n)+", "+ra(na.transform(r))+")"};function R3(e){let t="",n="",r="",o="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),o=e.substring(4,5),t+=t,n+=n,r+=r,o+=o),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}}const ng={test:If("#"),parse:R3,transform:ei.transform},Ui={test:If("hsl","hue"),parse:GB("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+br.transform(ra(t))+", "+br.transform(ra(n))+", "+ra(na.transform(r))+")"},dn={test:e=>ei.test(e)||ng.test(e)||Ui.test(e),parse:e=>ei.test(e)?ei.parse(e):Ui.test(e)?Ui.parse(e):ng.parse(e),transform:e=>Sa(e)?e:e.hasOwnProperty("red")?ei.transform(e):Ui.transform(e)},St=(e,t,n)=>-n*e+n*t+e;function Ed(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function O3({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let o=0,s=0,l=0;if(!t)o=s=l=n;else{const u=n<.5?n*(1+t):n+t-n*t,A=2*n-u;o=Ed(A,u,e+1/3),s=Ed(A,u,e),l=Ed(A,u,e-1/3)}return{red:Math.round(o*255),green:Math.round(s*255),blue:Math.round(l*255),alpha:r}}const Id=(e,t,n)=>{const r=e*e;return Math.sqrt(Math.max(0,n*(t*t-r)+r))},j3=[ng,ei,Ui],M3=e=>j3.find(t=>t.test(e));function AE(e){const t=M3(e);xr(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`);let n=t.parse(e);return t===Ui&&(n=O3(n)),n}const KB=(e,t)=>{const n=AE(e),r=AE(t),o={...n};return s=>(o.red=Id(n.red,r.red,s),o.green=Id(n.green,r.green,s),o.blue=Id(n.blue,r.blue,s),o.alpha=St(n.alpha,r.alpha,s),ei.transform(o))};function D3(e){var t,n;return isNaN(e)&&Sa(e)&&(((t=e.match(cu))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(IB))===null||n===void 0?void 0:n.length)||0)>0}const qB={regex:wM,countKey:"Vars",token:"${v}",parse:Dt},JB={regex:IB,countKey:"Colors",token:"${c}",parse:dn.parse},XB={regex:cu,countKey:"Numbers",token:"${n}",parse:Ai.parse};function Bd(e,{regex:t,countKey:n,token:r,parse:o}){const s=e.tokenised.match(t);s&&(e["num"+n]=s.length,e.tokenised=e.tokenised.replace(t,r),e.values.push(...s.map(o)))}function Qc(e){const t=e.toString(),n={value:t,tokenised:t,values:[],numVars:0,numColors:0,numNumbers:0};return n.value.includes("var(--")&&Bd(n,qB),Bd(n,JB),Bd(n,XB),n}function ZB(e){return Qc(e).values}function _B(e){const{values:t,numColors:n,numVars:r,tokenised:o}=Qc(e),s=t.length;return l=>{let u=o;for(let A=0;A<s;A++)A<r?u=u.replace(qB.token,l[A]):A<r+n?u=u.replace(JB.token,dn.transform(l[A])):u=u.replace(XB.token,ra(l[A]));return u}}const k3=e=>typeof e=="number"?0:e;function F3(e){const t=ZB(e);return _B(e)(t.map(k3))}const vo={test:D3,parse:ZB,createTransformer:_B,getAnimatableNone:F3},$B=(e,t)=>n=>`${n>0?t:e}`;function ev(e,t){return typeof e=="number"?n=>St(e,t,n):dn.test(e)?KB(e,t):e.startsWith("var(")?$B(e,t):nv(e,t)}const tv=(e,t)=>{const n=[...e],r=n.length,o=e.map((s,l)=>ev(s,t[l]));return s=>{for(let l=0;l<r;l++)n[l]=o[l](s);return n}},L3=(e,t)=>{const n={...e,...t},r={};for(const o in n)e[o]!==void 0&&t[o]!==void 0&&(r[o]=ev(e[o],t[o]));return o=>{for(const s in r)n[s]=r[s](o);return n}},nv=(e,t)=>{const n=vo.createTransformer(t),r=Qc(e),o=Qc(t);return r.numVars===o.numVars&&r.numColors===o.numColors&&r.numNumbers>=o.numNumbers?mo(tv(r.values,o.values),n):(Oa(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),$B(e,t))},ha=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},dE=(e,t)=>n=>St(e,t,n);function N3(e){return typeof e=="number"?dE:typeof e=="string"?dn.test(e)?KB:nv:Array.isArray(e)?tv:typeof e=="object"?L3:dE}function V3(e,t,n){const r=[],o=n||N3(e[0]),s=e.length-1;for(let l=0;l<s;l++){let u=o(e[l],e[l+1]);if(t){const A=Array.isArray(t)?t[l]||Dt:t;u=mo(A,u)}r.push(u)}return r}function rv(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const s=e.length;if(xr(s===t.length,"Both input and output ranges must be the same length"),s===1)return()=>t[0];e[0]>e[s-1]&&(e=[...e].reverse(),t=[...t].reverse());const l=V3(t,r,o),u=l.length,A=g=>{let p=0;if(u>1)for(;p<e.length-2&&!(g<e[p+1]);p++);const C=ha(e[p],e[p+1],g);return l[p](C)};return n?g=>A(Bo(e[0],e[s-1],g)):A}function H3(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=ha(0,t,r);e.push(St(n,1,o))}}function W3(e){const t=[0];return H3(t,e.length-1),t}function z3(e,t){return e.map(n=>n*t)}function U3(e,t){return e.map(()=>t||HB).splice(0,e.length-1)}function xc({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=x3(r)?r.map(uE):uE(r),s={done:!1,value:t[0]},l=z3(n&&n.length===t.length?n:W3(t),e),u=rv(l,t,{ease:Array.isArray(o)?o:U3(t,o)});return{calculatedDuration:e,next:A=>(s.value=u(A),s.done=A>=e,s)}}function ov(e,t){return t?e*(1e3/t):0}const Y3=5;function iv(e,t,n){const r=Math.max(t-Y3,0);return ov(n-e(r),t-r)}const vd=.001,G3=.01,gE=10,K3=.05,q3=1;function J3({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let o,s;Oa(e<=Eo(gE),"Spring duration must be 10 seconds or less");let l=1-t;l=Bo(K3,q3,l),e=Bo(G3,gE,Gr(e)),l<1?(o=g=>{const p=g*l,C=p*e,h=p-n,m=rg(g,l),I=Math.exp(-C);return vd-h/m*I},s=g=>{const C=g*l*e,h=C*n+n,m=Math.pow(l,2)*Math.pow(g,2)*e,I=Math.exp(-C),B=rg(Math.pow(g,2),l);return(-o(g)+vd>0?-1:1)*((h-m)*I)/B}):(o=g=>{const p=Math.exp(-g*e),C=(g-n)*e+1;return-vd+p*C},s=g=>{const p=Math.exp(-g*e),C=(n-g)*(e*e);return p*C});const u=5/e,A=Z3(o,s,u);if(e=Eo(e),isNaN(A))return{stiffness:100,damping:10,duration:e};{const g=Math.pow(A,2)*r;return{stiffness:g,damping:l*2*Math.sqrt(r*g),duration:e}}}const X3=12;function Z3(e,t,n){let r=n;for(let o=1;o<X3;o++)r=r-e(r)/t(r);return r}function rg(e,t){return e*Math.sqrt(1-t*t)}const _3=["duration","bounce"],$3=["stiffness","damping","mass"];function fE(e,t){return t.some(n=>e[n]!==void 0)}function eD(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!fE(e,$3)&&fE(e,_3)){const n=J3(e);t={...t,...n,velocity:0,mass:1},t.isResolvedFromDuration=!0}return t}function sv({keyframes:e,restDelta:t,restSpeed:n,...r}){const o=e[0],s=e[e.length-1],l={done:!1,value:o},{stiffness:u,damping:A,mass:g,velocity:p,duration:C,isResolvedFromDuration:h}=eD(r),m=p?-Gr(p):0,I=A/(2*Math.sqrt(u*g)),B=s-o,v=Gr(Math.sqrt(u/g)),O=Math.abs(B)<5;n||(n=O?.01:2),t||(t=O?.005:.5);let j;if(I<1){const x=rg(v,I);j=S=>{const P=Math.exp(-I*v*S);return s-P*((m+I*v*B)/x*Math.sin(x*S)+B*Math.cos(x*S))}}else if(I===1)j=x=>s-Math.exp(-v*x)*(B+(m+v*B)*x);else{const x=v*Math.sqrt(I*I-1);j=S=>{const P=Math.exp(-I*v*S),L=Math.min(x*S,300);return s-P*((m+I*v*B)*Math.sinh(L)+x*B*Math.cosh(L))/x}}return{calculatedDuration:h&&C||null,next:x=>{const S=j(x);if(h)l.done=x>=C;else{let P=m;x!==0&&(I<1?P=iv(j,x,S):P=0);const L=Math.abs(P)<=n,k=Math.abs(s-S)<=t;l.done=L&&k}return l.value=l.done?s:S,l}}}function pE({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:s=500,modifyTarget:l,min:u,max:A,restDelta:g=.5,restSpeed:p}){const C=e[0],h={done:!1,value:C},m=q=>u!==void 0&&q<u||A!==void 0&&q>A,I=q=>u===void 0?A:A===void 0||Math.abs(u-q)<Math.abs(A-q)?u:A;let B=n*t;const v=C+B,O=l===void 0?v:l(v);O!==v&&(B=O-C);const j=q=>-B*Math.exp(-q/r),x=q=>O+j(q),S=q=>{const J=j(q),U=x(q);h.done=Math.abs(J)<=g,h.value=h.done?O:U};let P,L;const k=q=>{m(h.value)&&(P=q,L=sv({keyframes:[h.value,I(h.value)],velocity:iv(x,q,h.value),damping:o,stiffness:s,restDelta:g,restSpeed:p}))};return k(0),{calculatedDuration:null,next:q=>{let J=!1;return!L&&P===void 0&&(J=!0,S(q),k(q)),P!==void 0&&q>P?L.next(q-P):(!J&&S(q),h)}}}const tD=e=>{const t=({timestamp:n})=>e(n);return{start:()=>vt.update(t,!0),stop:()=>Jr(t),now:()=>Xt.isProcessing?Xt.timestamp:performance.now()}},hE=2e4;function CE(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<hE;)t+=n,r=e.next(t);return t>=hE?1/0:t}const nD={decay:pE,inertia:pE,tween:xc,keyframes:xc,spring:sv};function wc({autoplay:e=!0,delay:t=0,driver:n=tD,keyframes:r,type:o="keyframes",repeat:s=0,repeatDelay:l=0,repeatType:u="loop",onPlay:A,onStop:g,onComplete:p,onUpdate:C,...h}){let m=1,I=!1,B,v;const O=()=>{v=new Promise(X=>{B=X})};O();let j;const x=nD[o]||xc;let S;x!==xc&&typeof r[0]!="number"&&(S=rv([0,100],r,{clamp:!1}),r=[0,100]);const P=x({...h,keyframes:r});let L;u==="mirror"&&(L=x({...h,keyframes:[...r].reverse(),velocity:-(h.velocity||0)}));let k="idle",q=null,J=null,U=null;P.calculatedDuration===null&&s&&(P.calculatedDuration=CE(P));const{calculatedDuration:_}=P;let le=1/0,ie=1/0;_!==null&&(le=_+l,ie=le*(s+1)-l);let Z=0;const K=X=>{if(J===null)return;m>0&&(J=Math.min(J,X)),m<0&&(J=Math.min(X-ie/m,J)),q!==null?Z=q:Z=Math.round(X-J)*m;const ge=Z-t*(m>=0?1:-1),pe=m>=0?ge<0:ge>ie;Z=Math.max(ge,0),k==="finished"&&q===null&&(Z=ie);let ce=Z,fe=P;if(s){const Ce=Z/le;let Ie=Math.floor(Ce),Qe=Ce%1;!Qe&&Ce>=1&&(Qe=1),Qe===1&&Ie--,Ie=Math.min(Ie,s+1);const ae=!!(Ie%2);ae&&(u==="reverse"?(Qe=1-Qe,l&&(Qe-=l/le)):u==="mirror"&&(fe=L));let Ne=Bo(0,1,Qe);Z>ie&&(Ne=u==="reverse"&&ae?1:0),ce=Ne*le}const he=pe?{done:!1,value:r[0]}:fe.next(ce);S&&(he.value=S(he.value));let{done:Be}=he;!pe&&_!==null&&(Be=m>=0?Z>=ie:Z<=0);const me=q===null&&(k==="finished"||k==="running"&&Be);return C&&C(he.value),me&&F(),he},V=()=>{j&&j.stop(),j=void 0},G=()=>{k="idle",V(),B(),O(),J=U=null},F=()=>{k="finished",p&&p(),V(),B()},$=()=>{if(I)return;j||(j=n(K));const X=j.now();A&&A(),q!==null?J=X-q:(!J||k==="finished")&&(J=X),k==="finished"&&O(),U=J,q=null,k="running",j.start()};e&&$();const H={then(X,ge){return v.then(X,ge)},get time(){return Gr(Z)},set time(X){X=Eo(X),Z=X,q!==null||!j||m===0?q=X:J=j.now()-X/m},get duration(){const X=P.calculatedDuration===null?CE(P):P.calculatedDuration;return Gr(X)},get speed(){return m},set speed(X){X===m||!j||(m=X,H.time=Gr(Z))},get state(){return k},play:$,pause:()=>{k="paused",q=Z},stop:()=>{I=!0,k!=="idle"&&(k="idle",g&&g(),G())},cancel:()=>{U!==null&&K(U),G()},complete:()=>{k="finished"},sample:X=>(J=0,K(X))};return H}function rD(e){let t;return()=>(t===void 0&&(t=e()),t)}const oD=rD(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),iD=new Set(["opacity","clipPath","filter","transform","backgroundColor"]),zl=10,sD=2e4,aD=(e,t)=>t.type==="spring"||e==="backgroundColor"||!FB(t.ease);function lD(e,t,{onUpdate:n,onComplete:r,...o}){if(!(oD()&&iD.has(t)&&!o.repeatDelay&&o.repeatType!=="mirror"&&o.damping!==0&&o.type!=="inertia"))return!1;let l=!1,u,A;const g=()=>{A=new Promise(j=>{u=j})};g();let{keyframes:p,duration:C=300,ease:h,times:m}=o;if(aD(t,o)){const j=wc({...o,repeat:0,delay:0});let x={done:!1,value:p[0]};const S=[];let P=0;for(;!x.done&&P<sD;)x=j.sample(P),S.push(x.value),P+=zl;m=void 0,p=S,C=P-zl,h="linear"}const I=E3(e.owner.current,t,p,{...o,duration:C,ease:h,times:m});o.syncStart&&(I.startTime=Xt.isProcessing?Xt.timestamp:document.timeline?document.timeline.currentTime:performance.now());const B=()=>I.cancel(),v=()=>{vt.update(B),u(),g()};return I.onfinish=()=>{e.set(I3(p,o)),r&&r(),v()},{then(j,x){return A.then(j,x)},attachTimeline(j){return I.timeline=j,I.onfinish=null,Dt},get time(){return Gr(I.currentTime||0)},set time(j){I.currentTime=Eo(j)},get speed(){return I.playbackRate},set speed(j){I.playbackRate=j},get duration(){return Gr(C)},play:()=>{l||(I.play(),Jr(B))},pause:()=>I.pause(),stop:()=>{if(l=!0,I.playState==="idle")return;const{currentTime:j}=I;if(j){const x=wc({...o,autoplay:!1});e.setWithVelocity(x.sample(j-zl).value,x.sample(j).value,zl)}v()},complete:()=>I.finish(),cancel:v}}function cD({keyframes:e,delay:t,onUpdate:n,onComplete:r}){const o=()=>(n&&n(e[e.length-1]),r&&r(),{time:0,speed:1,duration:0,play:Dt,pause:Dt,stop:Dt,then:s=>(s(),Promise.resolve()),cancel:Dt,complete:Dt});return t?wc({keyframes:[0,1],duration:0,delay:t,onComplete:o}):o()}const uD={type:"spring",stiffness:500,damping:25,restSpeed:10},AD=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),dD={type:"keyframes",duration:.8},gD={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},fD=(e,{keyframes:t})=>t.length>2?dD:ui.has(e)?e.startsWith("scale")?AD(t[1]):uD:gD,og=(e,t)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(vo.test(t)||t==="0")&&!t.startsWith("url(")),pD=new Set(["brightness","contrast","saturate","opacity"]);function hD(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(cu)||[];if(!r)return e;const o=n.replace(r,"");let s=pD.has(t)?1:0;return r!==n&&(s*=100),t+"("+s+o+")"}const CD=/([a-z-]*)\(.*?\)/g,ig={...vo,getAnimatableNone:e=>{const t=e.match(CD);return t?t.map(hD).join(" "):e}},mD={...BB,color:dn,backgroundColor:dn,outlineColor:dn,fill:dn,stroke:dn,borderColor:dn,borderTopColor:dn,borderRightColor:dn,borderBottomColor:dn,borderLeftColor:dn,filter:ig,WebkitFilter:ig},Bf=e=>mD[e];function av(e,t){let n=Bf(e);return n!==ig&&(n=vo),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const lv=e=>/^0[^.\s]+$/.test(e);function ED(e){if(typeof e=="number")return e===0;if(e!==null)return e==="none"||e==="0"||lv(e)}function ID(e,t,n,r){const o=og(t,n);let s;Array.isArray(n)?s=[...n]:s=[null,n];const l=r.from!==void 0?r.from:e.get();let u;const A=[];for(let g=0;g<s.length;g++)s[g]===null&&(s[g]=g===0?l:s[g-1]),ED(s[g])&&A.push(g),typeof s[g]=="string"&&s[g]!=="none"&&s[g]!=="0"&&(u=s[g]);if(o&&A.length&&u)for(let g=0;g<A.length;g++){const p=A[g];s[p]=av(t,u)}return s}function BD({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:o,repeat:s,repeatType:l,repeatDelay:u,from:A,elapsed:g,...p}){return!!Object.keys(p).length}function cv(e,t){return e[t]||e.default||e}const vf=(e,t,n,r={})=>o=>{const s=cv(r,e)||{},l=s.delay||r.delay||0;let{elapsed:u=0}=r;u=u-Eo(l);const A=ID(t,e,n,s),g=A[0],p=A[A.length-1],C=og(e,g),h=og(e,p);Oa(C===h,`You are trying to animate ${e} from "${g}" to "${p}". ${g} is not an animatable value - to enable this animation set ${g} to a value animatable to ${p} via the \`style\` property.`);let m={keyframes:A,velocity:t.getVelocity(),ease:"easeOut",...s,delay:-u,onUpdate:I=>{t.set(I),s.onUpdate&&s.onUpdate(I)},onComplete:()=>{o(),s.onComplete&&s.onComplete()}};if(BD(s)||(m={...m,...fD(e,m)}),m.duration&&(m.duration=Eo(m.duration)),m.repeatDelay&&(m.repeatDelay=Eo(m.repeatDelay)),!C||!h||m3.current||s.type===!1)return cD(m);if(t.owner&&t.owner.current instanceof HTMLElement&&!t.owner.getProps().onUpdate){const I=lD(t,e,m);if(I)return I}return wc(m)};function Tc(e){return!!(vn(e)&&e.add)}const uv=e=>/^\-?\d*\.?\d+$/.test(e);function yf(e,t){e.indexOf(t)===-1&&e.push(t)}function bf(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class Qf{constructor(){this.subscriptions=[]}add(t){return yf(this.subscriptions,t),()=>bf(this.subscriptions,t)}notify(t,n,r){const o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](t,n,r);else for(let s=0;s<o;s++){const l=this.subscriptions[s];l&&l(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const mE=new Set;function xf(e,t,n){e||mE.has(t)||(console.warn(t),n&&console.warn(n),mE.add(t))}const vD=e=>!isNaN(parseFloat(e));class yD{constructor(t,n={}){this.version="10.16.4",this.timeDelta=0,this.lastUpdated=0,this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(r,o=!0)=>{this.prev=this.current,this.current=r;const{delta:s,timestamp:l}=Xt;this.lastUpdated!==l&&(this.timeDelta=s,this.lastUpdated=l,vt.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.events.change&&this.events.change.notify(this.current),this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()),o&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.scheduleVelocityCheck=()=>vt.postRender(this.velocityCheck),this.velocityCheck=({timestamp:r})=>{r!==this.lastUpdated&&(this.prev=this.current,this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=t,this.canTrackVelocity=vD(this.current),this.owner=n.owner}onChange(t){return process.env.NODE_ENV!=="production"&&xf(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new Qf);const r=this.events[t].add(n);return t==="change"?()=>{r(),vt.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=t,this.timeDelta=r}jump(t){this.updateAndNotify(t),this.prev=t,this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?ov(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function rs(e,t){return new yD(e,t)}const Av=e=>t=>t.test(e),bD={test:e=>e==="auto",parse:e=>e},dv=[Ai,Me,br,Ao,RM,SM,bD],Us=e=>dv.find(Av(e)),QD=[...dv,dn,vo],xD=e=>QD.find(Av(e));function wD(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,rs(n))}function TD(e,t){const n=Au(e,t);let{transitionEnd:r={},transition:o={},...s}=n?e.makeTargetAnimatable(n,!1):{};s={...s,...r};for(const l in s){const u=GM(s[l]);wD(e,l,u)}}function PD(e,t,n){var r,o;const s=Object.keys(t).filter(u=>!e.hasValue(u)),l=s.length;if(l)for(let u=0;u<l;u++){const A=s[u],g=t[A];let p=null;Array.isArray(g)&&(p=g[0]),p===null&&(p=(o=(r=n[A])!==null&&r!==void 0?r:e.readValue(A))!==null&&o!==void 0?o:t[A]),p!=null&&(typeof p=="string"&&(uv(p)||lv(p))?p=parseFloat(p):!xD(p)&&vo.test(g)&&(p=av(A,g)),e.addValue(A,rs(p,{owner:e})),n[A]===void 0&&(n[A]=p),p!==null&&e.setBaseTarget(A,p))}}function SD(e,t){return t?(t[e]||t.default||t).from:void 0}function RD(e,t,n){const r={};for(const o in e){const s=SD(o,t);if(s!==void 0)r[o]=s;else{const l=n.getValue(o);l&&(r[o]=l.get())}}return r}function OD({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function gv(e,t,{delay:n=0,transitionOverride:r,type:o}={}){let{transition:s=e.getDefaultTransition(),transitionEnd:l,...u}=e.makeTargetAnimatable(t);const A=e.getValue("willChange");r&&(s=r);const g=[],p=o&&e.animationState&&e.animationState.getState()[o];for(const C in u){const h=e.getValue(C),m=u[C];if(!h||m===void 0||p&&OD(p,C))continue;const I={delay:n,elapsed:0,...s};if(window.HandoffAppearAnimations&&!h.hasAnimated){const v=e.getProps()[C3];v&&(I.elapsed=window.HandoffAppearAnimations(v,C,h,vt),I.syncStart=!0)}h.start(vf(C,h,m,e.shouldReduceMotion&&ui.has(C)?{type:!1}:I));const B=h.animation;Tc(A)&&(A.add(C),B.then(()=>A.remove(C))),g.push(B)}return l&&Promise.all(g).then(()=>{l&&TD(e,l)}),g}function sg(e,t,n={}){const r=Au(e,t,n.custom);let{transition:o=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(o=n.transitionOverride);const s=r?()=>Promise.all(gv(e,r,n)):()=>Promise.resolve(),l=e.variantChildren&&e.variantChildren.size?(A=0)=>{const{delayChildren:g=0,staggerChildren:p,staggerDirection:C}=o;return jD(e,t,g+A,p,C,n)}:()=>Promise.resolve(),{when:u}=o;if(u){const[A,g]=u==="beforeChildren"?[s,l]:[l,s];return A().then(()=>g())}else return Promise.all([s(),l(n.delay)])}function jD(e,t,n=0,r=0,o=1,s){const l=[],u=(e.variantChildren.size-1)*r,A=o===1?(g=0)=>g*r:(g=0)=>u-g*r;return Array.from(e.variantChildren).sort(MD).forEach((g,p)=>{g.notify("AnimationStart",t),l.push(sg(g,t,{...s,delay:n+A(p)}).then(()=>g.notify("AnimationComplete",t)))}),Promise.all(l)}function MD(e,t){return e.sortNodePosition(t)}function DD(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const o=t.map(s=>sg(e,s,n));r=Promise.all(o)}else if(typeof t=="string")r=sg(e,t,n);else{const o=typeof t=="function"?Au(e,t,n.custom):t;r=Promise.all(gv(e,o,n))}return r.then(()=>e.notify("AnimationComplete",t))}const kD=[...lf].reverse(),FD=lf.length;function LD(e){return t=>Promise.all(t.map(({animation:n,options:r})=>DD(e,n,r)))}function ND(e){let t=LD(e);const n=HD();let r=!0;const o=(A,g)=>{const p=Au(e,g);if(p){const{transition:C,transitionEnd:h,...m}=p;A={...A,...m,...h}}return A};function s(A){t=A(e)}function l(A,g){const p=e.getProps(),C=e.getVariantContext(!0)||{},h=[],m=new Set;let I={},B=1/0;for(let O=0;O<FD;O++){const j=kD[O],x=n[j],S=p[j]!==void 0?p[j]:C[j],P=fa(S),L=j===g?x.isActive:null;L===!1&&(B=O);let k=S===C[j]&&S!==p[j]&&P;if(k&&r&&e.manuallyAnimateOnMount&&(k=!1),x.protectedKeys={...I},!x.isActive&&L===null||!S&&!x.prevProp||au(S)||typeof S=="boolean")continue;const q=VD(x.prevProp,S);let J=q||j===g&&x.isActive&&!k&&P||O>B&&P;const U=Array.isArray(S)?S:[S];let _=U.reduce(o,{});L===!1&&(_={});const{prevResolvedValues:le={}}=x,ie={...le,..._},Z=K=>{J=!0,m.delete(K),x.needsAnimating[K]=!0};for(const K in ie){const V=_[K],G=le[K];I.hasOwnProperty(K)||(V!==G?bc(V)&&bc(G)?!DB(V,G)||q?Z(K):x.protectedKeys[K]=!0:V!==void 0?Z(K):m.add(K):V!==void 0&&m.has(K)?Z(K):x.protectedKeys[K]=!0)}x.prevProp=S,x.prevResolvedValues=_,x.isActive&&(I={...I,..._}),r&&e.blockInitialAnimation&&(J=!1),J&&!k&&h.push(...U.map(K=>({animation:K,options:{type:j,...A}})))}if(m.size){const O={};m.forEach(j=>{const x=e.getBaseTarget(j);x!==void 0&&(O[j]=x)}),h.push({animation:O})}let v=!!h.length;return r&&p.initial===!1&&!e.manuallyAnimateOnMount&&(v=!1),r=!1,v?t(h):Promise.resolve()}function u(A,g,p){var C;if(n[A].isActive===g)return Promise.resolve();(C=e.variantChildren)===null||C===void 0||C.forEach(m=>{var I;return(I=m.animationState)===null||I===void 0?void 0:I.setActive(A,g)}),n[A].isActive=g;const h=l(p,A);for(const m in n)n[m].protectedKeys={};return h}return{animateChanges:l,setActive:u,setAnimateFunction:s,getState:()=>n}}function VD(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!DB(t,e):!1}function Uo(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function HD(){return{animate:Uo(!0),whileInView:Uo(),whileHover:Uo(),whileTap:Uo(),whileDrag:Uo(),whileFocus:Uo(),exit:Uo()}}class WD extends xo{constructor(t){super(t),t.animationState||(t.animationState=ND(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();this.unmount(),au(t)&&(this.unmount=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){}}let zD=0;class UD extends xo{constructor(){super(...arguments),this.id=zD++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n,custom:r}=this.node.presenceContext,{isPresent:o}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===o)return;const s=this.node.animationState.setActive("exit",!t,{custom:r??this.node.getProps().custom});n&&!t&&s.then(()=>n(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}const YD={animation:{Feature:WD},exit:{Feature:UD}},EE=(e,t)=>Math.abs(e-t);function GD(e,t){const n=EE(e.x,t.x),r=EE(e.y,t.y);return Math.sqrt(n**2+r**2)}class fv{constructor(t,n,{transformPagePoint:r}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const g=bd(this.lastMoveEventInfo,this.history),p=this.startEvent!==null,C=GD(g.offset,{x:0,y:0})>=3;if(!p&&!C)return;const{point:h}=g,{timestamp:m}=Xt;this.history.push({...h,timestamp:m});const{onStart:I,onMove:B}=this.handlers;p||(I&&I(this.lastMoveEvent,g),this.startEvent=this.lastMoveEvent),B&&B(this.lastMoveEvent,g)},this.handlePointerMove=(g,p)=>{this.lastMoveEvent=g,this.lastMoveEventInfo=yd(p,this.transformPagePoint),vt.update(this.updatePoint,!0)},this.handlePointerUp=(g,p)=>{if(this.end(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const{onEnd:C,onSessionEnd:h}=this.handlers,m=bd(g.type==="pointercancel"?this.lastMoveEventInfo:yd(p,this.transformPagePoint),this.history);this.startEvent&&C&&C(g,m),h&&h(g,m)},!SB(t))return;this.handlers=n,this.transformPagePoint=r;const o=uu(t),s=yd(o,this.transformPagePoint),{point:l}=s,{timestamp:u}=Xt;this.history=[{...l,timestamp:u}];const{onSessionStart:A}=n;A&&A(t,bd(s,this.history)),this.removeListeners=mo(Yr(window,"pointermove",this.handlePointerMove),Yr(window,"pointerup",this.handlePointerUp),Yr(window,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Jr(this.updatePoint)}}function yd(e,t){return t?{point:t(e.point)}:e}function IE(e,t){return{x:e.x-t.x,y:e.y-t.y}}function bd({point:e},t){return{point:e,delta:IE(e,pv(t)),offset:IE(e,KD(t)),velocity:qD(t,.1)}}function KD(e){return e[0]}function pv(e){return e[e.length-1]}function qD(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=pv(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>Eo(t)));)n--;if(!r)return{x:0,y:0};const s=Gr(o.timestamp-r.timestamp);if(s===0)return{x:0,y:0};const l={x:(o.x-r.x)/s,y:(o.y-r.y)/s};return l.x===1/0&&(l.x=0),l.y===1/0&&(l.y=0),l}function kn(e){return e.max-e.min}function ag(e,t=0,n=.01){return Math.abs(e-t)<=n}function BE(e,t,n,r=.5){e.origin=r,e.originPoint=St(t.min,t.max,e.origin),e.scale=kn(n)/kn(t),(ag(e.scale,1,1e-4)||isNaN(e.scale))&&(e.scale=1),e.translate=St(n.min,n.max,e.origin)-e.originPoint,(ag(e.translate)||isNaN(e.translate))&&(e.translate=0)}function oa(e,t,n,r){BE(e.x,t.x,n.x,r?r.originX:void 0),BE(e.y,t.y,n.y,r?r.originY:void 0)}function vE(e,t,n){e.min=n.min+t.min,e.max=e.min+kn(t)}function JD(e,t,n){vE(e.x,t.x,n.x),vE(e.y,t.y,n.y)}function yE(e,t,n){e.min=t.min-n.min,e.max=e.min+kn(t)}function ia(e,t,n){yE(e.x,t.x,n.x),yE(e.y,t.y,n.y)}function XD(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?St(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?St(n,e,r.max):Math.min(e,n)),e}function bE(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function ZD(e,{top:t,left:n,bottom:r,right:o}){return{x:bE(e.x,n,o),y:bE(e.y,t,r)}}function QE(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function _D(e,t){return{x:QE(e.x,t.x),y:QE(e.y,t.y)}}function $D(e,t){let n=.5;const r=kn(e),o=kn(t);return o>r?n=ha(t.min,t.max-r,e.min):r>o&&(n=ha(e.min,e.max-o,t.min)),Bo(0,1,n)}function ek(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const lg=.35;function tk(e=lg){return e===!1?e=0:e===!0&&(e=lg),{x:xE(e,"left","right"),y:xE(e,"top","bottom")}}function xE(e,t,n){return{min:wE(e,t),max:wE(e,n)}}function wE(e,t){return typeof e=="number"?e:e[t]||0}const TE=()=>({translate:0,scale:1,origin:0,originPoint:0}),Yi=()=>({x:TE(),y:TE()}),PE=()=>({min:0,max:0}),zt=()=>({x:PE(),y:PE()});function Br(e){return[e("x"),e("y")]}function hv({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function nk({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function rk(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Qd(e){return e===void 0||e===1}function cg({scale:e,scaleX:t,scaleY:n}){return!Qd(e)||!Qd(t)||!Qd(n)}function qo(e){return cg(e)||Cv(e)||e.z||e.rotate||e.rotateX||e.rotateY}function Cv(e){return SE(e.x)||SE(e.y)}function SE(e){return e&&e!=="0%"}function Pc(e,t,n){const r=e-n,o=t*r;return n+o}function RE(e,t,n,r,o){return o!==void 0&&(e=Pc(e,o,r)),Pc(e,n,r)+t}function ug(e,t=0,n=1,r,o){e.min=RE(e.min,t,n,r,o),e.max=RE(e.max,t,n,r,o)}function mv(e,{x:t,y:n}){ug(e.x,t.translate,t.scale,t.originPoint),ug(e.y,n.translate,n.scale,n.originPoint)}function ok(e,t,n,r=!1){const o=n.length;if(!o)return;t.x=t.y=1;let s,l;for(let u=0;u<o;u++){s=n[u],l=s.projectionDelta;const A=s.instance;A&&A.style&&A.style.display==="contents"||(r&&s.options.layoutScroll&&s.scroll&&s!==s.root&&Gi(e,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),l&&(t.x*=l.x.scale,t.y*=l.y.scale,mv(e,l)),r&&qo(s.latestValues)&&Gi(e,s.latestValues))}t.x=OE(t.x),t.y=OE(t.y)}function OE(e){return Number.isInteger(e)||e>1.0000000000001||e<.999999999999?e:1}function go(e,t){e.min=e.min+t,e.max=e.max+t}function jE(e,t,[n,r,o]){const s=t[o]!==void 0?t[o]:.5,l=St(e.min,e.max,s);ug(e,t[n],t[r],l,t.scale)}const ik=["x","scaleX","originX"],sk=["y","scaleY","originY"];function Gi(e,t){jE(e.x,t,ik),jE(e.y,t,sk)}function Ev(e,t){return hv(rk(e.getBoundingClientRect(),t))}function ak(e,t,n){const r=Ev(e,n),{scroll:o}=t;return o&&(go(r.x,o.offset.x),go(r.y,o.offset.y)),r}const lk=new WeakMap;class ck{constructor(t){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=zt(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const o=A=>{this.stopAnimation(),n&&this.snapToCursor(uu(A,"page").point)},s=(A,g)=>{const{drag:p,dragPropagation:C,onDragStart:h}=this.getProps();if(p&&!C&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=OB(p),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Br(I=>{let B=this.getAxisMotionValue(I).get()||0;if(br.test(B)){const{projection:v}=this.visualElement;if(v&&v.layout){const O=v.layout.layoutBox[I];O&&(B=kn(O)*(parseFloat(B)/100))}}this.originPoint[I]=B}),h&&vt.update(()=>h(A,g),!1,!0);const{animationState:m}=this.visualElement;m&&m.setActive("whileDrag",!0)},l=(A,g)=>{const{dragPropagation:p,dragDirectionLock:C,onDirectionLock:h,onDrag:m}=this.getProps();if(!p&&!this.openGlobalLock)return;const{offset:I}=g;if(C&&this.currentDirection===null){this.currentDirection=uk(I),this.currentDirection!==null&&h&&h(this.currentDirection);return}this.updateAxis("x",g.point,I),this.updateAxis("y",g.point,I),this.visualElement.render(),m&&m(A,g)},u=(A,g)=>this.stop(A,g);this.panSession=new fv(t,{onSessionStart:o,onStart:s,onMove:l,onSessionEnd:u},{transformPagePoint:this.visualElement.getTransformPagePoint()})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:o}=n;this.startAnimation(o);const{onDragEnd:s}=this.getProps();s&&vt.update(()=>s(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:o}=this.getProps();if(!r||!Ul(t,o,this.currentDirection))return;const s=this.getAxisMotionValue(t);let l=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(l=XD(l,this.constraints[t],this.elastic[t])),s.set(l)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),{layout:r}=this.visualElement.projection||{},o=this.constraints;t&&zi(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=ZD(r.layoutBox,t):this.constraints=!1,this.elastic=tk(n),o!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&Br(s=>{this.getAxisMotionValue(s)&&(this.constraints[s]=ek(r.layoutBox[s],this.constraints[s]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!zi(t))return!1;const r=t.current;xr(r!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");const{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const s=ak(r,o.root,this.visualElement.getTransformPagePoint());let l=_D(o.layout.layoutBox,s);if(n){const u=n(nk(l));this.hasMutatedConstraints=!!u,u&&(l=hv(u))}return l}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:o,dragTransition:s,dragSnapToOrigin:l,onDragTransitionEnd:u}=this.getProps(),A=this.constraints||{},g=Br(p=>{if(!Ul(p,n,this.currentDirection))return;let C=A&&A[p]||{};l&&(C={min:0,max:0});const h=o?200:1e6,m=o?40:1e7,I={type:"inertia",velocity:r?t[p]:0,bounceStiffness:h,bounceDamping:m,timeConstant:750,restDelta:1,restSpeed:10,...s,...C};return this.startAxisValueAnimation(p,I)});return Promise.all(g).then(u)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return r.start(vf(t,r,0,n))}stopAnimation(){Br(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const n="_drag"+t.toUpperCase(),r=this.visualElement.getProps(),o=r[n];return o||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){Br(n=>{const{drag:r}=this.getProps();if(!Ul(n,r,this.currentDirection))return;const{projection:o}=this.visualElement,s=this.getAxisMotionValue(n);if(o&&o.layout){const{min:l,max:u}=o.layout.layoutBox[n];s.set(t[n]-St(l,u,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!zi(n)||!r||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};Br(l=>{const u=this.getAxisMotionValue(l);if(u){const A=u.get();o[l]=$D({min:A,max:A},this.constraints[l])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),Br(l=>{if(!Ul(l,t,null))return;const u=this.getAxisMotionValue(l),{min:A,max:g}=this.constraints[l];u.set(St(A,g,o[l]))})}addListeners(){if(!this.visualElement.current)return;lk.set(this.visualElement,this);const t=this.visualElement.current,n=Yr(t,"pointerdown",A=>{const{drag:g,dragListener:p=!0}=this.getProps();g&&p&&this.start(A)}),r=()=>{const{dragConstraints:A}=this.getProps();zi(A)&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,s=o.addEventListener("measure",r);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),r();const l=Ur(window,"resize",()=>this.scalePositionWithinConstraints()),u=o.addEventListener("didUpdate",({delta:A,hasLayoutChanged:g})=>{this.isDragging&&g&&(Br(p=>{const C=this.getAxisMotionValue(p);C&&(this.originPoint[p]+=A[p].translate,C.set(C.get()+A[p].translate))}),this.visualElement.render())});return()=>{l(),n(),s(),u&&u()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:o=!1,dragConstraints:s=!1,dragElastic:l=lg,dragMomentum:u=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:o,dragConstraints:s,dragElastic:l,dragMomentum:u}}}function Ul(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function uk(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class Ak extends xo{constructor(t){super(t),this.removeGroupControls=Dt,this.removeListeners=Dt,this.controls=new ck(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Dt}unmount(){this.removeGroupControls(),this.removeListeners()}}const ME=e=>(t,n)=>{e&&vt.update(()=>e(t,n))};class dk extends xo{constructor(){super(...arguments),this.removePointerDownListener=Dt}onPointerDown(t){this.session=new fv(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint()})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:ME(t),onStart:ME(n),onMove:r,onEnd:(s,l)=>{delete this.session,o&&vt.update(()=>o(s,l))}}}mount(){this.removePointerDownListener=Yr(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}function gk(){const e=w.useContext(af);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,o=w.useId();return w.useEffect(()=>r(o),[]),!t&&n?[!1,()=>n&&n(o)]:[!0]}const sc={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function DE(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Ys={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(Me.test(e))e=parseFloat(e);else return e;const n=DE(e,t.target.x),r=DE(e,t.target.y);return`${n}% ${r}%`}},fk={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=vo.parse(e);if(o.length>5)return r;const s=vo.createTransformer(e),l=typeof o[0]!="number"?1:0,u=n.x.scale*t.x,A=n.y.scale*t.y;o[0+l]/=u,o[1+l]/=A;const g=St(u,A,.5);return typeof o[2+l]=="number"&&(o[2+l]/=g),typeof o[3+l]=="number"&&(o[3+l]/=g),s(o)}};class pk extends w.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:s}=t;yM(hk),s&&(n.group&&n.group.add(s),r&&r.register&&o&&r.register(s),s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),sc.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:o,isPresent:s}=this.props,l=r.projection;return l&&(l.isPresent=s,o||t.layoutDependency!==n||n===void 0?l.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?l.promote():l.relegate()||vt.postRender(()=>{const u=l.getStack();(!u||!u.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),queueMicrotask(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:o}=t;o&&(o.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(o),r&&r.deregister&&r.deregister(o))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function Iv(e){const[t,n]=gk(),r=w.useContext(pB);return w.createElement(pk,{...e,layoutGroup:r,switchLayoutGroup:w.useContext(hB),isPresent:t,safeToRemove:n})}const hk={borderRadius:{...Ys,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Ys,borderTopRightRadius:Ys,borderBottomLeftRadius:Ys,borderBottomRightRadius:Ys,boxShadow:fk},Bv=["TopLeft","TopRight","BottomLeft","BottomRight"],Ck=Bv.length,kE=e=>typeof e=="string"?parseFloat(e):e,FE=e=>typeof e=="number"||Me.test(e);function mk(e,t,n,r,o,s){o?(e.opacity=St(0,n.opacity!==void 0?n.opacity:1,Ek(r)),e.opacityExit=St(t.opacity!==void 0?t.opacity:1,0,Ik(r))):s&&(e.opacity=St(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let l=0;l<Ck;l++){const u=`border${Bv[l]}Radius`;let A=LE(t,u),g=LE(n,u);if(A===void 0&&g===void 0)continue;A||(A=0),g||(g=0),A===0||g===0||FE(A)===FE(g)?(e[u]=Math.max(St(kE(A),kE(g),r),0),(br.test(g)||br.test(A))&&(e[u]+="%")):e[u]=g}(t.rotate||n.rotate)&&(e.rotate=St(t.rotate||0,n.rotate||0,r))}function LE(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const Ek=vv(0,.5,mf),Ik=vv(.5,.95,Dt);function vv(e,t,n){return r=>r<e?0:r>t?1:n(ha(e,t,r))}function NE(e,t){e.min=t.min,e.max=t.max}function qn(e,t){NE(e.x,t.x),NE(e.y,t.y)}function VE(e,t,n,r,o){return e-=t,e=Pc(e,1/n,r),o!==void 0&&(e=Pc(e,1/o,r)),e}function Bk(e,t=0,n=1,r=.5,o,s=e,l=e){if(br.test(t)&&(t=parseFloat(t),t=St(l.min,l.max,t/100)-l.min),typeof t!="number")return;let u=St(s.min,s.max,r);e===s&&(u-=t),e.min=VE(e.min,t,n,u,o),e.max=VE(e.max,t,n,u,o)}function HE(e,t,[n,r,o],s,l){Bk(e,t[n],t[r],t[o],t.scale,s,l)}const vk=["x","scaleX","originX"],yk=["y","scaleY","originY"];function WE(e,t,n,r){HE(e.x,t,vk,n?n.x:void 0,r?r.x:void 0),HE(e.y,t,yk,n?n.y:void 0,r?r.y:void 0)}function zE(e){return e.translate===0&&e.scale===1}function yv(e){return zE(e.x)&&zE(e.y)}function bk(e,t){return e.x.min===t.x.min&&e.x.max===t.x.max&&e.y.min===t.y.min&&e.y.max===t.y.max}function bv(e,t){return Math.round(e.x.min)===Math.round(t.x.min)&&Math.round(e.x.max)===Math.round(t.x.max)&&Math.round(e.y.min)===Math.round(t.y.min)&&Math.round(e.y.max)===Math.round(t.y.max)}function UE(e){return kn(e.x)/kn(e.y)}class Qk{constructor(){this.members=[]}add(t){yf(this.members,t),t.scheduleRender()}remove(t){if(bf(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(o=>t===o);if(n===0)return!1;let r;for(let o=n;o>=0;o--){const s=this.members[o];if(s.isPresent!==!1){r=s;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:o}=t.options;o===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function YE(e,t,n){let r="";const o=e.x.translate/t.x,s=e.y.translate/t.y;if((o||s)&&(r=`translate3d(${o}px, ${s}px, 0) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{rotate:A,rotateX:g,rotateY:p}=n;A&&(r+=`rotate(${A}deg) `),g&&(r+=`rotateX(${g}deg) `),p&&(r+=`rotateY(${p}deg) `)}const l=e.x.scale*t.x,u=e.y.scale*t.y;return(l!==1||u!==1)&&(r+=`scale(${l}, ${u})`),r||"none"}const xk=(e,t)=>e.depth-t.depth;class wk{constructor(){this.children=[],this.isDirty=!1}add(t){yf(this.children,t),this.isDirty=!0}remove(t){bf(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(xk),this.isDirty=!1,this.children.forEach(t)}}function Tk(e,t){const n=performance.now(),r=({timestamp:o})=>{const s=o-n;s>=t&&(Jr(r),e(s-t))};return vt.read(r,!0),()=>Jr(r)}function Pk(e){window.MotionDebug&&window.MotionDebug.record(e)}function Sk(e){return e instanceof SVGElement&&e.tagName!=="svg"}function Rk(e,t,n){const r=vn(e)?e:rs(e);return r.start(vf("",r,t,n)),r.animation}const GE=["","X","Y","Z"],KE=1e3;let Ok=0;const Jo={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0};function Qv({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(l={},u=t==null?void 0:t()){this.id=Ok++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{Jo.totalNodes=Jo.resolvedTargetDeltas=Jo.recalculatedProjection=0,this.nodes.forEach(Dk),this.nodes.forEach(Vk),this.nodes.forEach(Hk),this.nodes.forEach(kk),Pk(Jo)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=l,this.root=u?u.root||u:this,this.path=u?[...u.path,u]:[],this.parent=u,this.depth=u?u.depth+1:0;for(let A=0;A<this.path.length;A++)this.path[A].shouldResetTransform=!0;this.root===this&&(this.nodes=new wk)}addEventListener(l,u){return this.eventHandlers.has(l)||this.eventHandlers.set(l,new Qf),this.eventHandlers.get(l).add(u)}notifyListeners(l,...u){const A=this.eventHandlers.get(l);A&&A.notify(...u)}hasListeners(l){return this.eventHandlers.has(l)}mount(l,u=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=Sk(l),this.instance=l;const{layoutId:A,layout:g,visualElement:p}=this.options;if(p&&!p.current&&p.mount(l),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),u&&(g||A)&&(this.isLayoutDirty=!0),e){let C;const h=()=>this.root.updateBlockedByResize=!1;e(l,()=>{this.root.updateBlockedByResize=!0,C&&C(),C=Tk(h,250),sc.hasAnimatedSinceResize&&(sc.hasAnimatedSinceResize=!1,this.nodes.forEach(JE))})}A&&this.root.registerSharedNode(A,this),this.options.animate!==!1&&p&&(A||g)&&this.addEventListener("didUpdate",({delta:C,hasLayoutChanged:h,hasRelativeTargetChanged:m,layout:I})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const B=this.options.transition||p.getDefaultTransition()||Gk,{onLayoutAnimationStart:v,onLayoutAnimationComplete:O}=p.getProps(),j=!this.targetLayout||!bv(this.targetLayout,I)||m,x=!h&&m;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||x||h&&(j||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(C,x);const S={...cv(B,"layout"),onPlay:v,onComplete:O};(p.shouldReduceMotion||this.options.layoutRoot)&&(S.delay=0,S.type=!1),this.startAnimation(S)}else h||JE(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=I})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const l=this.getStack();l&&l.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Jr(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(Wk),this.animationId++)}getTransformTemplate(){const{visualElement:l}=this.options;return l&&l.getProps().transformTemplate}willUpdate(l=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let p=0;p<this.path.length;p++){const C=this.path[p];C.shouldResetTransform=!0,C.updateScroll("snapshot"),C.options.layoutRoot&&C.willUpdate(!1)}const{layoutId:u,layout:A}=this.options;if(u===void 0&&!A)return;const g=this.getTransformTemplate();this.prevTransformTemplateValue=g?g(this.latestValues,""):void 0,this.updateSnapshot(),l&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(qE);return}this.isUpdating||this.nodes.forEach(Lk),this.isUpdating=!1,this.nodes.forEach(Nk),this.nodes.forEach(jk),this.nodes.forEach(Mk),this.clearAllSnapshots();const u=performance.now();Xt.delta=Bo(0,1e3/60,u-Xt.timestamp),Xt.timestamp=u,Xt.isProcessing=!0,pd.update.process(Xt),pd.preRender.process(Xt),pd.render.process(Xt),Xt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,queueMicrotask(()=>this.update()))}clearAllSnapshots(){this.nodes.forEach(Fk),this.sharedNodes.forEach(zk)}scheduleUpdateProjection(){vt.preRender(this.updateProjection,!1,!0)}scheduleCheckAfterUnmount(){vt.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let A=0;A<this.path.length;A++)this.path[A].updateScroll();const l=this.layout;this.layout=this.measure(!1),this.layoutCorrected=zt(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:u}=this.options;u&&u.notify("LayoutMeasure",this.layout.layoutBox,l?l.layoutBox:void 0)}updateScroll(l="measure"){let u=!!(this.options.layoutScroll&&this.instance);this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===l&&(u=!1),u&&(this.scroll={animationId:this.root.animationId,phase:l,isRoot:r(this.instance),offset:n(this.instance)})}resetTransform(){if(!o)return;const l=this.isLayoutDirty||this.shouldResetTransform,u=this.projectionDelta&&!yv(this.projectionDelta),A=this.getTransformTemplate(),g=A?A(this.latestValues,""):void 0,p=g!==this.prevTransformTemplateValue;l&&(u||qo(this.latestValues)||p)&&(o(this.instance,g),this.shouldResetTransform=!1,this.scheduleRender())}measure(l=!0){const u=this.measurePageBox();let A=this.removeElementScroll(u);return l&&(A=this.removeTransform(A)),Kk(A),{animationId:this.root.animationId,measuredBox:u,layoutBox:A,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:l}=this.options;if(!l)return zt();const u=l.measureViewportBox(),{scroll:A}=this.root;return A&&(go(u.x,A.offset.x),go(u.y,A.offset.y)),u}removeElementScroll(l){const u=zt();qn(u,l);for(let A=0;A<this.path.length;A++){const g=this.path[A],{scroll:p,options:C}=g;if(g!==this.root&&p&&C.layoutScroll){if(p.isRoot){qn(u,l);const{scroll:h}=this.root;h&&(go(u.x,-h.offset.x),go(u.y,-h.offset.y))}go(u.x,p.offset.x),go(u.y,p.offset.y)}}return u}applyTransform(l,u=!1){const A=zt();qn(A,l);for(let g=0;g<this.path.length;g++){const p=this.path[g];!u&&p.options.layoutScroll&&p.scroll&&p!==p.root&&Gi(A,{x:-p.scroll.offset.x,y:-p.scroll.offset.y}),qo(p.latestValues)&&Gi(A,p.latestValues)}return qo(this.latestValues)&&Gi(A,this.latestValues),A}removeTransform(l){const u=zt();qn(u,l);for(let A=0;A<this.path.length;A++){const g=this.path[A];if(!g.instance||!qo(g.latestValues))continue;cg(g.latestValues)&&g.updateSnapshot();const p=zt(),C=g.measurePageBox();qn(p,C),WE(u,g.latestValues,g.snapshot?g.snapshot.layoutBox:void 0,p)}return qo(this.latestValues)&&WE(u,this.latestValues),u}setTargetDelta(l){this.targetDelta=l,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(l){this.options={...this.options,...l,crossfade:l.crossfade!==void 0?l.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Xt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(l=!1){var u;const A=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=A.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=A.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=A.isSharedProjectionDirty);const g=!!this.resumingFrom||this!==A;if(!(l||g&&this.isSharedProjectionDirty||this.isProjectionDirty||!((u=this.parent)===null||u===void 0)&&u.isProjectionDirty||this.attemptToResolveRelativeTarget))return;const{layout:C,layoutId:h}=this.options;if(!(!this.layout||!(C||h))){if(this.resolvedRelativeTargetAt=Xt.timestamp,!this.targetDelta&&!this.relativeTarget){const m=this.getClosestProjectingParent();m&&m.layout&&this.animationProgress!==1?(this.relativeParent=m,this.forceRelativeParentToResolveTarget(),this.relativeTarget=zt(),this.relativeTargetOrigin=zt(),ia(this.relativeTargetOrigin,this.layout.layoutBox,m.layout.layoutBox),qn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=zt(),this.targetWithTransforms=zt()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),JD(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):qn(this.target,this.layout.layoutBox),mv(this.target,this.targetDelta)):qn(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const m=this.getClosestProjectingParent();m&&!!m.resumingFrom==!!this.resumingFrom&&!m.options.layoutScroll&&m.target&&this.animationProgress!==1?(this.relativeParent=m,this.forceRelativeParentToResolveTarget(),this.relativeTarget=zt(),this.relativeTargetOrigin=zt(),ia(this.relativeTargetOrigin,this.target,m.target),qn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}Jo.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||cg(this.parent.latestValues)||Cv(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var l;const u=this.getLead(),A=!!this.resumingFrom||this!==u;let g=!0;if((this.isProjectionDirty||!((l=this.parent)===null||l===void 0)&&l.isProjectionDirty)&&(g=!1),A&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(g=!1),this.resolvedRelativeTargetAt===Xt.timestamp&&(g=!1),g)return;const{layout:p,layoutId:C}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(p||C))return;qn(this.layoutCorrected,this.layout.layoutBox);const h=this.treeScale.x,m=this.treeScale.y;ok(this.layoutCorrected,this.treeScale,this.path,A),u.layout&&!u.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(u.target=u.layout.layoutBox);const{target:I}=u;if(!I){this.projectionTransform&&(this.projectionDelta=Yi(),this.projectionTransform="none",this.scheduleRender());return}this.projectionDelta||(this.projectionDelta=Yi(),this.projectionDeltaWithTransform=Yi());const B=this.projectionTransform;oa(this.projectionDelta,this.layoutCorrected,I,this.latestValues),this.projectionTransform=YE(this.projectionDelta,this.treeScale),(this.projectionTransform!==B||this.treeScale.x!==h||this.treeScale.y!==m)&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",I)),Jo.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(l=!0){if(this.options.scheduleRender&&this.options.scheduleRender(),l){const u=this.getStack();u&&u.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}setAnimationOrigin(l,u=!1){const A=this.snapshot,g=A?A.latestValues:{},p={...this.latestValues},C=Yi();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!u;const h=zt(),m=A?A.source:void 0,I=this.layout?this.layout.source:void 0,B=m!==I,v=this.getStack(),O=!v||v.members.length<=1,j=!!(B&&!O&&this.options.crossfade===!0&&!this.path.some(Yk));this.animationProgress=0;let x;this.mixTargetDelta=S=>{const P=S/1e3;XE(C.x,l.x,P),XE(C.y,l.y,P),this.setTargetDelta(C),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(ia(h,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Uk(this.relativeTarget,this.relativeTargetOrigin,h,P),x&&bk(this.relativeTarget,x)&&(this.isProjectionDirty=!1),x||(x=zt()),qn(x,this.relativeTarget)),B&&(this.animationValues=p,mk(p,g,this.latestValues,P,j,O)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=P},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(l){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Jr(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=vt.update(()=>{sc.hasAnimatedSinceResize=!0,this.currentAnimation=Rk(0,KE,{...l,onUpdate:u=>{this.mixTargetDelta(u),l.onUpdate&&l.onUpdate(u)},onComplete:()=>{l.onComplete&&l.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const l=this.getStack();l&&l.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(KE),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const l=this.getLead();let{targetWithTransforms:u,target:A,layout:g,latestValues:p}=l;if(!(!u||!A||!g)){if(this!==l&&this.layout&&g&&xv(this.options.animationType,this.layout.layoutBox,g.layoutBox)){A=this.target||zt();const C=kn(this.layout.layoutBox.x);A.x.min=l.target.x.min,A.x.max=A.x.min+C;const h=kn(this.layout.layoutBox.y);A.y.min=l.target.y.min,A.y.max=A.y.min+h}qn(u,A),Gi(u,p),oa(this.projectionDeltaWithTransform,this.layoutCorrected,u,p)}}registerSharedNode(l,u){this.sharedNodes.has(l)||this.sharedNodes.set(l,new Qk),this.sharedNodes.get(l).add(u);const g=u.options.initialPromotionConfig;u.promote({transition:g?g.transition:void 0,preserveFollowOpacity:g&&g.shouldPreserveFollowOpacity?g.shouldPreserveFollowOpacity(u):void 0})}isLead(){const l=this.getStack();return l?l.lead===this:!0}getLead(){var l;const{layoutId:u}=this.options;return u?((l=this.getStack())===null||l===void 0?void 0:l.lead)||this:this}getPrevLead(){var l;const{layoutId:u}=this.options;return u?(l=this.getStack())===null||l===void 0?void 0:l.prevLead:void 0}getStack(){const{layoutId:l}=this.options;if(l)return this.root.sharedNodes.get(l)}promote({needsReset:l,transition:u,preserveFollowOpacity:A}={}){const g=this.getStack();g&&g.promote(this,A),l&&(this.projectionDelta=void 0,this.needsReset=!0),u&&this.setOptions({transition:u})}relegate(){const l=this.getStack();return l?l.relegate(this):!1}resetRotation(){const{visualElement:l}=this.options;if(!l)return;let u=!1;const{latestValues:A}=l;if((A.rotate||A.rotateX||A.rotateY||A.rotateZ)&&(u=!0),!u)return;const g={};for(let p=0;p<GE.length;p++){const C="rotate"+GE[p];A[C]&&(g[C]=A[C],l.setStaticValue(C,0))}l.render();for(const p in g)l.setStaticValue(p,g[p]);l.scheduleRender()}getProjectionStyles(l={}){var u,A;const g={};if(!this.instance||this.isSVG)return g;if(this.isVisible)g.visibility="";else return{visibility:"hidden"};const p=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,g.opacity="",g.pointerEvents=ic(l.pointerEvents)||"",g.transform=p?p(this.latestValues,""):"none",g;const C=this.getLead();if(!this.projectionDelta||!this.layout||!C.target){const B={};return this.options.layoutId&&(B.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,B.pointerEvents=ic(l.pointerEvents)||""),this.hasProjected&&!qo(this.latestValues)&&(B.transform=p?p({},""):"none",this.hasProjected=!1),B}const h=C.animationValues||C.latestValues;this.applyTransformsToTarget(),g.transform=YE(this.projectionDeltaWithTransform,this.treeScale,h),p&&(g.transform=p(h,g.transform));const{x:m,y:I}=this.projectionDelta;g.transformOrigin=`${m.origin*100}% ${I.origin*100}% 0`,C.animationValues?g.opacity=C===this?(A=(u=h.opacity)!==null&&u!==void 0?u:this.latestValues.opacity)!==null&&A!==void 0?A:1:this.preserveOpacity?this.latestValues.opacity:h.opacityExit:g.opacity=C===this?h.opacity!==void 0?h.opacity:"":h.opacityExit!==void 0?h.opacityExit:0;for(const B in vc){if(h[B]===void 0)continue;const{correct:v,applyTo:O}=vc[B],j=g.transform==="none"?h[B]:v(h[B],C);if(O){const x=O.length;for(let S=0;S<x;S++)g[O[S]]=j}else g[B]=j}return this.options.layoutId&&(g.pointerEvents=C===this?ic(l.pointerEvents)||"":"none"),g}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(l=>{var u;return(u=l.currentAnimation)===null||u===void 0?void 0:u.stop()}),this.root.nodes.forEach(qE),this.root.sharedNodes.clear()}}}function jk(e){e.updateLayout()}function Mk(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:o}=e.layout,{animationType:s}=e.options,l=n.source!==e.layout.source;s==="size"?Br(C=>{const h=l?n.measuredBox[C]:n.layoutBox[C],m=kn(h);h.min=r[C].min,h.max=h.min+m}):xv(s,n.layoutBox,r)&&Br(C=>{const h=l?n.measuredBox[C]:n.layoutBox[C],m=kn(r[C]);h.max=h.min+m,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[C].max=e.relativeTarget[C].min+m)});const u=Yi();oa(u,r,n.layoutBox);const A=Yi();l?oa(A,e.applyTransform(o,!0),n.measuredBox):oa(A,r,n.layoutBox);const g=!yv(u);let p=!1;if(!e.resumeFrom){const C=e.getClosestProjectingParent();if(C&&!C.resumeFrom){const{snapshot:h,layout:m}=C;if(h&&m){const I=zt();ia(I,n.layoutBox,h.layoutBox);const B=zt();ia(B,r,m.layoutBox),bv(I,B)||(p=!0),C.options.layoutRoot&&(e.relativeTarget=B,e.relativeTargetOrigin=I,e.relativeParent=C)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:A,layoutDelta:u,hasLayoutChanged:g,hasRelativeTargetChanged:p})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function Dk(e){Jo.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function kk(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Fk(e){e.clearSnapshot()}function qE(e){e.clearMeasurements()}function Lk(e){e.isLayoutDirty=!1}function Nk(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function JE(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Vk(e){e.resolveTargetDelta()}function Hk(e){e.calcProjection()}function Wk(e){e.resetRotation()}function zk(e){e.removeLeadSnapshot()}function XE(e,t,n){e.translate=St(t.translate,0,n),e.scale=St(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function ZE(e,t,n,r){e.min=St(t.min,n.min,r),e.max=St(t.max,n.max,r)}function Uk(e,t,n,r){ZE(e.x,t.x,n.x,r),ZE(e.y,t.y,n.y,r)}function Yk(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const Gk={duration:.45,ease:[.4,0,.1,1]},_E=e=>typeof navigator<"u"&&navigator.userAgent.toLowerCase().includes(e),$E=_E("applewebkit/")&&!_E("chrome/")?Math.round:Dt;function eI(e){e.min=$E(e.min),e.max=$E(e.max)}function Kk(e){eI(e.x),eI(e.y)}function xv(e,t,n){return e==="position"||e==="preserve-aspect"&&!ag(UE(t),UE(n),.2)}const qk=Qv({attachResizeListener:(e,t)=>Ur(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),xd={current:void 0},wv=Qv({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!xd.current){const e=new qk({});e.mount(window),e.setOptions({layoutScroll:!0}),xd.current=e}return xd.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),Jk={pan:{Feature:dk},drag:{Feature:Ak,ProjectionNode:wv,MeasureLayout:Iv}},Xk=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function Zk(e){const t=Xk.exec(e);if(!t)return[,];const[,n,r]=t;return[n,r]}const _k=4;function Ag(e,t,n=1){xr(n<=_k,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[r,o]=Zk(e);if(!r)return;const s=window.getComputedStyle(t).getPropertyValue(r);if(s){const l=s.trim();return uv(l)?parseFloat(l):l}else return eg(o)?Ag(o,t,n+1):o}function $k(e,{...t},n){const r=e.current;if(!(r instanceof Element))return{target:t,transitionEnd:n};n&&(n={...n}),e.values.forEach(o=>{const s=o.get();if(!eg(s))return;const l=Ag(s,r);l&&o.set(l)});for(const o in t){const s=t[o];if(!eg(s))continue;const l=Ag(s,r);l&&(t[o]=l,n||(n={}),n[o]===void 0&&(n[o]=s))}return{target:t,transitionEnd:n}}const e5=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),Tv=e=>e5.has(e),t5=e=>Object.keys(e).some(Tv),Yl=e=>e===Ai||e===Me,tI=(e,t)=>parseFloat(e.split(", ")[t]),nI=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const o=r.match(/^matrix3d\((.+)\)$/);if(o)return tI(o[1],t);{const s=r.match(/^matrix\((.+)\)$/);return s?tI(s[1],e):0}},n5=new Set(["x","y","z"]),r5=Pa.filter(e=>!n5.has(e));function o5(e){const t=[];return r5.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t.length&&e.render(),t}const os={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:nI(4,13),y:nI(5,14)};os.translateX=os.x;os.translateY=os.y;const i5=(e,t,n)=>{const r=t.measureViewportBox(),o=t.current,s=getComputedStyle(o),{display:l}=s,u={};l==="none"&&t.setStaticValue("display",e.display||"block"),n.forEach(g=>{u[g]=os[g](r,s)}),t.render();const A=t.measureViewportBox();return n.forEach(g=>{const p=t.getValue(g);p&&p.jump(u[g]),e[g]=os[g](A,s)}),e},s5=(e,t,n={},r={})=>{t={...t},r={...r};const o=Object.keys(t).filter(Tv);let s=[],l=!1;const u=[];if(o.forEach(A=>{const g=e.getValue(A);if(!e.hasValue(A))return;let p=n[A],C=Us(p);const h=t[A];let m;if(bc(h)){const I=h.length,B=h[0]===null?1:0;p=h[B],C=Us(p);for(let v=B;v<I&&h[v]!==null;v++)m?xr(Us(h[v])===m,"All keyframes must be of the same type"):(m=Us(h[v]),xr(m===C||Yl(C)&&Yl(m),"Keyframes must be of the same dimension as the current value"))}else m=Us(h);if(C!==m)if(Yl(C)&&Yl(m)){const I=g.get();typeof I=="string"&&g.set(parseFloat(I)),typeof h=="string"?t[A]=parseFloat(h):Array.isArray(h)&&m===Me&&(t[A]=h.map(parseFloat))}else C!=null&&C.transform&&(m!=null&&m.transform)&&(p===0||h===0)?p===0?g.set(m.transform(p)):t[A]=C.transform(h):(l||(s=o5(e),l=!0),u.push(A),r[A]=r[A]!==void 0?r[A]:t[A],g.jump(h))}),u.length){const A=u.indexOf("height")>=0?window.pageYOffset:null,g=i5(t,e,u);return s.length&&s.forEach(([p,C])=>{e.getValue(p).set(C)}),e.render(),su&&A!==null&&window.scrollTo({top:A}),{target:g,transitionEnd:r}}else return{target:t,transitionEnd:r}};function a5(e,t,n,r){return t5(t)?s5(e,t,n,r):{target:t,transitionEnd:r}}const l5=(e,t,n,r)=>{const o=$k(e,t,r);return t=o.target,r=o.transitionEnd,a5(e,t,n,r)},dg={current:null},Pv={current:!1};function c5(){if(Pv.current=!0,!!su)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>dg.current=e.matches;e.addListener(t),t()}else dg.current=!1}function u5(e,t,n){const{willChange:r}=t;for(const o in t){const s=t[o],l=n[o];if(vn(s))e.addValue(o,s),Tc(r)&&r.add(o),process.env.NODE_ENV==="development"&&xf(s.version==="10.16.4",`Attempting to mix Framer Motion versions ${s.version} with 10.16.4 may not work as expected.`);else if(vn(l))e.addValue(o,rs(s,{owner:e})),Tc(r)&&r.remove(o);else if(l!==s)if(e.hasValue(o)){const u=e.getValue(o);!u.hasAnimated&&u.set(s)}else{const u=e.getStaticValue(o);e.addValue(o,rs(u!==void 0?u:s,{owner:e}))}}for(const o in n)t[o]===void 0&&e.removeValue(o);return t}const rI=new WeakMap,Sv=Object.keys(pa),A5=Sv.length,oI=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],d5=cf.length;class g5{constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:o,visualState:s},l={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.scheduleRender=()=>vt.render(this.render,!1,!0);const{latestValues:u,renderState:A}=s;this.latestValues=u,this.baseTarget={...u},this.initialValues=n.initial?{...u}:{},this.renderState=A,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=o,this.options=l,this.isControllingVariants=lu(n),this.isVariantNode=fB(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:g,...p}=this.scrapeMotionValuesFromProps(n,{});for(const C in p){const h=p[C];u[C]!==void 0&&vn(h)&&(h.set(u[C],!1),Tc(g)&&g.add(C))}}scrapeMotionValuesFromProps(t,n){return{}}mount(t){this.current=t,rI.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),Pv.current||c5(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:dg.current,process.env.NODE_ENV!=="production"&&xf(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected."),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){rI.delete(this.current),this.projection&&this.projection.unmount(),Jr(this.notifyUpdate),Jr(this.render),this.valueSubscriptions.forEach(t=>t()),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features)this.features[t].unmount();this.current=null}bindToMotionValue(t,n){const r=ui.has(t),o=n.on("change",l=>{this.latestValues[t]=l,this.props.onUpdate&&vt.update(this.notifyUpdate,!1,!0),r&&this.projection&&(this.projection.isTransformDirty=!0)}),s=n.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(t,()=>{o(),s()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}loadFeatures({children:t,...n},r,o,s){let l,u;if(process.env.NODE_ENV!=="production"&&o&&r){const A="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";n.ignoreStrict?Oa(!1,A):xr(!1,A)}for(let A=0;A<A5;A++){const g=Sv[A],{isEnabled:p,Feature:C,ProjectionNode:h,MeasureLayout:m}=pa[g];h&&(l=h),p(n)&&(!this.features[g]&&C&&(this.features[g]=new C(this)),m&&(u=m))}if(!this.projection&&l){this.projection=new l(this.latestValues,this.parent&&this.parent.projection);const{layoutId:A,layout:g,drag:p,dragConstraints:C,layoutScroll:h,layoutRoot:m}=n;this.projection.setOptions({layoutId:A,layout:g,alwaysMeasureLayout:!!p||C&&zi(C),visualElement:this,scheduleRender:()=>this.scheduleRender(),animationType:typeof g=="string"?g:"both",initialPromotionConfig:s,layoutScroll:h,layoutRoot:m})}return u}updateFeatures(){for(const t in this.features){const n=this.features[t];n.isMounted?n.update():(n.mount(),n.isMounted=!0)}}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):zt()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}makeTargetAnimatable(t,n=!0){return this.makeTargetAnimatableFromInstance(t,this.props,n)}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<oI.length;r++){const o=oI[r];this.propEventSubscriptions[o]&&(this.propEventSubscriptions[o](),delete this.propEventSubscriptions[o]);const s=t["on"+o];s&&(this.propEventSubscriptions[o]=this.on(o,s))}this.prevMotionValues=u5(this,this.scrapeMotionValuesFromProps(t,this.prevProps),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}getVariantContext(t=!1){if(t)return this.parent?this.parent.getVariantContext():void 0;if(!this.isControllingVariants){const r=this.parent?this.parent.getVariantContext()||{}:{};return this.props.initial!==void 0&&(r.initial=this.props.initial),r}const n={};for(let r=0;r<d5;r++){const o=cf[r],s=this.props[o];(fa(s)||s===!1)&&(n[o]=s)}return n}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){n!==this.values.get(t)&&(this.removeValue(t),this.bindToMotionValue(t,n)),this.values.set(t,n),this.latestValues[t]=n.get()}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=rs(n,{owner:this}),this.addValue(t,r)),r}readValue(t){var n;return this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(n=this.getBaseTargetFromProps(this.props,t))!==null&&n!==void 0?n:this.readValueFromInstance(this.current,t,this.options)}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props,o=typeof r=="string"||typeof r=="object"?(n=Cf(this.props,r))===null||n===void 0?void 0:n[t]:void 0;if(r&&o!==void 0)return o;const s=this.getBaseTargetFromProps(this.props,t);return s!==void 0&&!vn(s)?s:this.initialValues[t]!==void 0&&o===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Qf),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class Rv extends g5{sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}makeTargetAnimatableFromInstance({transition:t,transitionEnd:n,...r},{transformValues:o},s){let l=RD(r,t||{},this);if(o&&(n&&(n=o(n)),r&&(r=o(r)),l&&(l=o(l))),s){PD(this,r,l);const u=l5(this,r,l,n);n=u.transitionEnd,r=u.target}return{transition:t,transitionEnd:n,...r}}}function f5(e){return window.getComputedStyle(e)}class p5 extends Rv{readValueFromInstance(t,n){if(ui.has(n)){const r=Bf(n);return r&&r.default||0}else{const r=f5(t),o=(EB(n)?r.getPropertyValue(n):r[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Ev(t,n)}build(t,n,r,o){Af(t,n,r,o.transformTemplate)}scrapeMotionValuesFromProps(t,n){return hf(t,n)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;vn(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}renderInstance(t,n,r,o){QB(t,n,r,o)}}class h5 extends Rv{constructor(){super(...arguments),this.isSVGTag=!1}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(ui.has(n)){const r=Bf(n);return r&&r.default||0}return n=xB.has(n)?n:pf(n),t.getAttribute(n)}measureInstanceViewportBox(){return zt()}scrapeMotionValuesFromProps(t,n){return TB(t,n)}build(t,n,r,o){gf(t,n,r,this.isSVGTag,o.transformTemplate)}renderInstance(t,n,r,o){wB(t,n,r,o)}mount(t){this.isSVGTag=ff(t.tagName),super.mount(t)}}const C5=(e,t)=>uf(e)?new h5(t,{enableHardwareAcceleration:!1}):new p5(t,{enableHardwareAcceleration:!0}),m5={layout:{ProjectionNode:wv,MeasureLayout:Iv}},E5={...YD,...g3,...Jk,...m5},Gl=BM((e,t)=>e3(e,t,E5,C5)),I5=(e,t,n)=>{const r=t-e;return((n-e)%r+r)%r+e};function iI(...e){const t=w.useRef(0),[n,r]=w.useState(e[t.current]),o=w.useCallback(s=>{t.current=typeof s!="number"?I5(0,e.length,t.current+1):s,r(e[t.current])},[e.length,...e]);return[n,o]}function Ov({children:e,type:t="scale",direction:n="right",offset:r=10,scale:o={hover:1.05,tap:.95}}){let s,l;switch(n){case"up":case"left":s=r,l=0;break;case"right":case"down":default:s=0,l=r;break}const[u,A]=iI(s,l),[g,p]=iI(s,l);switch(t){case"rotate":return f.jsx(Gl.div,{animate:{rotate:360},transition:{repeat:1/0,repeatType:"loop",duration:2,repeatDelay:0},children:e});case"slide":return n==="up"||n==="down"?f.jsx(Gl.div,{animate:{y:g!==void 0?g:""},onHoverEnd:()=>p(),onHoverStart:()=>p(),children:e}):f.jsx(Gl.div,{animate:{x:u!==void 0?u:""},onHoverEnd:()=>A(),onHoverStart:()=>A(),children:e});case"scale":default:return typeof o=="number"&&(o={hover:o,tap:o}),f.jsx(Gl.div,{whileHover:{scale:o==null?void 0:o.hover},whileTap:{scale:o==null?void 0:o.tap},children:e})}}Ov.propTypes={children:c.node,offset:c.number,type:c.oneOf(["slide","scale","rotate"]),direction:c.oneOf(["up","down","left","right"]),scale:c.oneOfType([c.number,c.object])};function B5(e){return Nt("MuiSvgIcon",e)}Ut("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const v5=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"],y5=e=>{const{color:t,fontSize:n,classes:r}=e,o={root:["root",t!=="inherit"&&`color${Pe(t)}`,`fontSize${Pe(n)}`]};return sn(o,B5,r)},b5=ue("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="inherit"&&t[`color${Pe(n.color)}`],t[`fontSize${Pe(n.fontSize)}`]]}})(({theme:e,ownerState:t})=>{var n,r,o,s,l,u,A,g,p,C,h,m,I;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:t.hasSvgAsChild?void 0:"currentColor",flexShrink:0,transition:(n=e.transitions)==null||(r=n.create)==null?void 0:r.call(n,"fill",{duration:(o=e.transitions)==null||(o=o.duration)==null?void 0:o.shorter}),fontSize:{inherit:"inherit",small:((s=e.typography)==null||(l=s.pxToRem)==null?void 0:l.call(s,20))||"1.25rem",medium:((u=e.typography)==null||(A=u.pxToRem)==null?void 0:A.call(u,24))||"1.5rem",large:((g=e.typography)==null||(p=g.pxToRem)==null?void 0:p.call(g,35))||"2.1875rem"}[t.fontSize],color:(C=(h=(e.vars||e).palette)==null||(h=h[t.color])==null?void 0:h.main)!=null?C:{action:(m=(e.vars||e).palette)==null||(m=m.action)==null?void 0:m.active,disabled:(I=(e.vars||e).palette)==null||(I=I.action)==null?void 0:I.disabled,inherit:void 0}[t.color]}}),wf=D.forwardRef(function(t,n){const r=Yt({props:t,name:"MuiSvgIcon"}),{children:o,className:s,color:l="inherit",component:u="svg",fontSize:A="medium",htmlColor:g,inheritViewBox:p=!1,titleAccess:C,viewBox:h="0 0 24 24"}=r,m=Ke(r,v5),I=D.isValidElement(o)&&o.type==="svg",B=W({},r,{color:l,component:u,fontSize:A,instanceFontSize:t.fontSize,inheritViewBox:p,viewBox:h,hasSvgAsChild:I}),v={};p||(v.viewBox=h);const O=y5(B);return f.jsxs(b5,W({as:u,className:Ge(O.root,s),focusable:"false",color:g,"aria-hidden":C?void 0:!0,role:C?"img":void 0,ref:n},v,m,I&&o.props,{ownerState:B,children:[I?o.props.children:o,C?f.jsx("title",{children:C}):null]}))});process.env.NODE_ENV!=="production"&&(wf.propTypes={children:c.node,classes:c.object,className:c.string,color:c.oneOfType([c.oneOf(["inherit","action","disabled","primary","secondary","error","info","success","warning"]),c.string]),component:c.elementType,fontSize:c.oneOfType([c.oneOf(["inherit","large","medium","small"]),c.string]),htmlColor:c.string,inheritViewBox:c.bool,shapeRendering:c.string,sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),titleAccess:c.string,viewBox:c.string});wf.muiName="SvgIcon";const sI=wf;function Tf(e,t){function n(r,o){return f.jsx(sI,W({"data-testid":`${t}Icon`,ref:o},r,{children:e}))}return process.env.NODE_ENV!=="production"&&(n.displayName=`${t}Icon`),n.muiName=sI.muiName,D.memo(D.forwardRef(n))}const Q5=Tf(f.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 x5(e){return Nt("MuiAvatar",e)}Ut("MuiAvatar",["root","colorDefault","circular","rounded","square","img","fallback"]);const w5=["alt","children","className","component","imgProps","sizes","src","srcSet","variant"],T5=e=>{const{classes:t,variant:n,colorDefault:r}=e;return sn({root:["root",n,r&&"colorDefault"],img:["img"],fallback:["fallback"]},x5,t)},P5=ue("div",{name:"MuiAvatar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],n.colorDefault&&t.colorDefault]}})(({theme:e,ownerState:t})=>W({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"},t.variant==="rounded"&&{borderRadius:(e.vars||e).shape.borderRadius},t.variant==="square"&&{borderRadius:0},t.colorDefault&&W({color:(e.vars||e).palette.background.default},e.vars?{backgroundColor:e.vars.palette.Avatar.defaultBg}:{backgroundColor:e.palette.mode==="light"?e.palette.grey[400]:e.palette.grey[600]}))),S5=ue("img",{name:"MuiAvatar",slot:"Img",overridesResolver:(e,t)=>t.img})({width:"100%",height:"100%",textAlign:"center",objectFit:"cover",color:"transparent",textIndent:1e4}),R5=ue(Q5,{name:"MuiAvatar",slot:"Fallback",overridesResolver:(e,t)=>t.fallback})({width:"75%",height:"75%"});function O5({crossOrigin:e,referrerPolicy:t,src:n,srcSet:r}){const[o,s]=D.useState(!1);return D.useEffect(()=>{if(!n&&!r)return;s(!1);let l=!0;const u=new Image;return u.onload=()=>{l&&s("loaded")},u.onerror=()=>{l&&s("error")},u.crossOrigin=e,u.referrerPolicy=t,u.src=n,r&&(u.srcset=r),()=>{l=!1}},[e,t,n,r]),o}const jv=D.forwardRef(function(t,n){const r=Yt({props:t,name:"MuiAvatar"}),{alt:o,children:s,className:l,component:u="div",imgProps:A,sizes:g,src:p,srcSet:C,variant:h="circular"}=r,m=Ke(r,w5);let I=null;const B=O5(W({},A,{src:p,srcSet:C})),v=p||C,O=v&&B!=="error",j=W({},r,{colorDefault:!O,component:u,variant:h}),x=T5(j);return O?I=f.jsx(S5,W({alt:o,srcSet:C,src:p,sizes:g,ownerState:j,className:x.img},A)):s!=null?I=s:v&&o?I=o[0]:I=f.jsx(R5,{ownerState:j,className:x.fallback}),f.jsx(P5,W({as:u,ownerState:j,className:Ge(x.root,l),ref:n},m,{children:I}))});process.env.NODE_ENV!=="production"&&(jv.propTypes={alt:c.string,children:c.node,classes:c.object,className:c.string,component:c.elementType,imgProps:c.object,sizes:c.string,src:c.string,srcSet:c.string,sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),variant:c.oneOfType([c.oneOf(["circular","rounded","square"]),c.string])});const j5=jv,an=(e,t)=>{switch(t){case"secondary":return e.palette.secondary;case"error":return e.palette.error;case"warning":return e.palette.warning;case"info":return e.palette.info;case"success":return e.palette.success;default:return e.palette.primary}};function M5({theme:e,color:t,type:n}){const r=an(e,t),{lighter:o,light:s,main:l,contrastText:u}=r;switch(n){case"filled":return{color:u,backgroundColor:l};case"outlined":return{color:l,border:"1px solid",borderColor:l,backgroundColor:"transparent"};case"combined":return{color:l,border:"1px solid",borderColor:s,backgroundColor:o};default:return{color:l,backgroundColor:o}}}function D5(e){switch(e){case"badge":return{border:"2px solid",fontSize:"0.675rem",width:20,height:20};case"xs":return{fontSize:"0.75rem",width:24,height:24};case"sm":return{fontSize:"0.875rem",width:32,height:32};case"lg":return{fontSize:"1.2rem",width:52,height:52};case"xl":return{fontSize:"1.5rem",width:64,height:64};case"md":default:return{fontSize:"1rem",width:40,height:40}}}const k5=ue(j5,{shouldForwardProp:e=>e!=="color"&&e!=="type"&&e!=="size"})(({theme:e,variant:t,color:n,type:r,size:o})=>({...D5(o),...M5({variant:t,theme:e,color:n,type:r}),...o==="badge"&&{borderColor:e.palette.background.default}}));function Ca({variant:e="circular",children:t,color:n="primary",type:r,size:o="md",...s}){const l=Rt();return f.jsx(k5,{variant:e,theme:l,color:n,type:r,size:o,...s,children:t})}Ca.propTypes={children:c.node,color:c.string,type:c.string,size:c.string,variant:c.string};const aI={p:2.5,"& .MuiCardHeader-action":{m:"0px auto",alignSelf:"center"}},Zn=w.forwardRef(({border:e=!0,boxShadow:t,children:n,subheader:r,content:o=!0,contentSX:s={},darkTitle:l,divider:u=!0,elevation:A,secondary:g,shadow:p,sx:C={},title:h,modal:m=!1,color:I="default",...B},v)=>{const O=Rt();return t=O.palette.mode==="dark"?t||!0:t,f.jsxs(b.Card,{elevation:A||0,ref:v,...B,sx:{position:"relative",border:e?"1px solid":"none",borderRadius:1,borderColor:O.palette.mode==="dark"?O.palette.divider:O.palette.grey.A800,boxShadow:t&&(!e||O.palette.mode==="dark")?p||O.customShadows.z1:"inherit",":hover":{boxShadow:t?p||O.customShadows.z1:"inherit"},backgroundColor:I==="default"?O.palette.background.paper:ts(I==="primary"?O.palette.primary[100]:O.palette.secondary[100],.5),...m&&{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:{xs:"calc( 100% - 50px)",sm:"auto"},"& .MuiCardContent-root":{overflowY:"auto",minHeight:"auto",maxHeight:"calc(100vh - 200px)"}},...C},children:[!l&&h&&f.jsx(b.CardHeader,{sx:aI,titleTypographyProps:{variant:"subtitle1"},title:h,action:g,subheader:r}),l&&h&&f.jsx(b.CardHeader,{sx:aI,title:f.jsx(b.Typography,{variant:"h4",children:h}),action:g}),h&&u&&f.jsx(b.Divider,{}),o&&f.jsx(b.CardContent,{sx:s,children:n}),!o&&n]})});Zn.propTypes={border:c.bool,boxShadow:c.bool,children:c.oneOfType([c.node,c.arrayOf(c.node)]),subheader:c.oneOfType([c.node,c.string]),content:c.bool,contentClass:c.string,contentSX:c.object,darkTitle:c.bool,divider:c.bool,elevation:c.number,secondary:c.oneOfType([c.node,c.string,c.object]),shadow:c.string,sx:c.object,title:c.oneOfType([c.node,c.string,c.object]),modal:c.bool,color:c.oneOf(["default","primary","secondary"])};var gg={exports:{}},lt={};/**
97
+ }`;var Ye=Cm(function(){return tt(T,be+"return "+se).apply(n,M)});if(Ye.source=se,XA(Ye))throw Ye;return Ye}function _S(i){return rt(i).toLowerCase()}function $S(i){return rt(i).toUpperCase()}function eR(i,a,d){if(i=rt(i),i&&(d||a===n))return xh(i);if(!i||!(a=xn(a)))return i;var E=ir(i),y=ir(a),T=wh(E,y),M=Th(E,y)+1;return io(E,T,M).join("")}function tR(i,a,d){if(i=rt(i),i&&(d||a===n))return i.slice(0,Sh(i)+1);if(!i||!(a=xn(a)))return i;var E=ir(i),y=Th(E,ir(a))+1;return io(E,0,y).join("")}function nR(i,a,d){if(i=rt(i),i&&(d||a===n))return i.replace(Sr,"");if(!i||!(a=xn(a)))return i;var E=ir(i),y=wh(E,ir(a));return io(E,y).join("")}function rR(i,a){var d=U,E=_;if(Pt(a)){var y="separator"in a?a.separator:y;d="length"in a?He(a.length):d,E="omission"in a?xn(a.omission):E}i=rt(i);var T=i.length;if(hi(i)){var M=ir(i);T=M.length}if(d>=T)return i;var N=d-Ci(E);if(N<1)return E;var Y=M?io(M,0,N).join(""):i.slice(0,N);if(y===n)return Y+E;if(M&&(N+=Y.length-N),ZA(y)){if(i.slice(N).search(y)){var re,oe=Y;for(y.global||(y=gA(y.source,rt(xs.exec(y))+"g")),y.lastIndex=0;re=y.exec(oe);)var se=re.index;Y=Y.slice(0,se===n?N:se)}}else if(i.indexOf(xn(y),N)!=N){var Ee=Y.lastIndexOf(y);Ee>-1&&(Y=Y.slice(0,Ee))}return Y+E}function oR(i){return i=rt(i),i&&Ya.test(i)?i.replace(Ua,j1):i}var iR=bi(function(i,a,d){return i+(d?" ":"")+a.toUpperCase()}),ed=mC("toUpperCase");function hm(i,a,d){return i=rt(i),a=d?n:a,a===n?T1(i)?k1(i):E1(i):i.match(a)||[]}var Cm=qe(function(i,a){try{return bn(i,n,a)}catch(d){return XA(d)?d:new Fe(d)}}),sR=Dr(function(i,a){return Hn(a,function(d){d=Ir(d),jr(i,d,qA(i[d],i))}),i});function aR(i){var a=i==null?0:i.length,d=Re();return i=a?Qt(i,function(E){if(typeof E[1]!="function")throw new Wn(l);return[d(E[0]),E[1]]}):[],qe(function(E){for(var y=-1;++y<a;){var T=i[y];if(bn(T[0],this,E))return bn(T[1],this,E)}})}function lR(i){return jw(Un(i,C))}function td(i){return function(){return i}}function cR(i,a){return i==null||i!==i?a:i}var uR=IC(),AR=IC(!0);function Cn(i){return i}function nd(i){return Xh(typeof i=="function"?i:Un(i,C))}function dR(i){return _h(Un(i,C))}function gR(i,a){return $h(i,Un(a,C))}var fR=qe(function(i,a){return function(d){return Ds(d,i,a)}}),pR=qe(function(i,a){return function(d){return Ds(i,d,a)}});function rd(i,a,d){var E=Jt(a),y=El(a,E);d==null&&!(Pt(a)&&(y.length||!E.length))&&(d=a,a=i,i=this,y=El(a,Jt(a)));var T=!(Pt(d)&&"chain"in d)||!!d.chain,M=Fr(i);return Hn(y,function(N){var Y=a[N];i[N]=Y,M&&(i.prototype[N]=function(){var re=this.__chain__;if(T||re){var oe=i(this.__wrapped__),se=oe.__actions__=fn(this.__actions__);return se.push({func:Y,args:arguments,thisArg:i}),oe.__chain__=re,oe}return Y.apply(i,$r([this.value()],arguments))})}),i}function hR(){return $t._===this&&($t._=W1),this}function od(){}function CR(i){return i=He(i),qe(function(a){return eC(a,i)})}var mR=DA(Qt),ER=DA(Bh),IR=DA(sA);function mm(i){return WA(i)?aA(Ir(i)):Xw(i)}function BR(i){return function(a){return i==null?n:No(i,a)}}var vR=vC(),yR=vC(!0);function id(){return[]}function sd(){return!1}function bR(){return{}}function QR(){return""}function xR(){return!0}function wR(i,a){if(i=He(i),i<1||i>F)return[];var d=X,E=tn(i,X);a=Re(a),i-=X;for(var y=uA(E,a);++d<i;)a(d);return y}function TR(i){return Le(i)?Qt(i,Ir):wn(i)?[i]:fn(LC(rt(i)))}function PR(i){var a=++V1;return rt(i)+a}var SR=Ql(function(i,a){return i+a},0),RR=kA("ceil"),OR=Ql(function(i,a){return i/a},1),jR=kA("floor");function MR(i){return i&&i.length?ml(i,Cn,BA):n}function DR(i,a){return i&&i.length?ml(i,Re(a,2),BA):n}function kR(i){return bh(i,Cn)}function FR(i,a){return bh(i,Re(a,2))}function LR(i){return i&&i.length?ml(i,Cn,QA):n}function NR(i,a){return i&&i.length?ml(i,Re(a,2),QA):n}var VR=Ql(function(i,a){return i*a},1),HR=kA("round"),WR=Ql(function(i,a){return i-a},0);function zR(i){return i&&i.length?cA(i,Cn):0}function UR(i,a){return i&&i.length?cA(i,Re(a,2)):0}return Q.after=dP,Q.ary=JC,Q.assign=$P,Q.assignIn=cm,Q.assignInWith=Ll,Q.assignWith=eS,Q.at=tS,Q.before=XC,Q.bind=qA,Q.bindAll=sR,Q.bindKey=ZC,Q.castArray=bP,Q.chain=GC,Q.chunk=jT,Q.compact=MT,Q.concat=DT,Q.cond=aR,Q.conforms=lR,Q.constant=td,Q.countBy=z2,Q.create=nS,Q.curry=_C,Q.curryRight=$C,Q.debounce=em,Q.defaults=rS,Q.defaultsDeep=oS,Q.defer=gP,Q.delay=fP,Q.difference=kT,Q.differenceBy=FT,Q.differenceWith=LT,Q.drop=NT,Q.dropRight=VT,Q.dropRightWhile=HT,Q.dropWhile=WT,Q.fill=zT,Q.filter=Y2,Q.flatMap=q2,Q.flatMapDeep=J2,Q.flatMapDepth=X2,Q.flatten=WC,Q.flattenDeep=UT,Q.flattenDepth=YT,Q.flip=pP,Q.flow=uR,Q.flowRight=AR,Q.fromPairs=GT,Q.functions=AS,Q.functionsIn=dS,Q.groupBy=Z2,Q.initial=qT,Q.intersection=JT,Q.intersectionBy=XT,Q.intersectionWith=ZT,Q.invert=fS,Q.invertBy=pS,Q.invokeMap=$2,Q.iteratee=nd,Q.keyBy=eP,Q.keys=Jt,Q.keysIn=hn,Q.map=Ol,Q.mapKeys=CS,Q.mapValues=mS,Q.matches=dR,Q.matchesProperty=gR,Q.memoize=Ml,Q.merge=ES,Q.mergeWith=um,Q.method=fR,Q.methodOf=pR,Q.mixin=rd,Q.negate=Dl,Q.nthArg=CR,Q.omit=IS,Q.omitBy=BS,Q.once=hP,Q.orderBy=tP,Q.over=mR,Q.overArgs=CP,Q.overEvery=ER,Q.overSome=IR,Q.partial=JA,Q.partialRight=tm,Q.partition=nP,Q.pick=vS,Q.pickBy=Am,Q.property=mm,Q.propertyOf=BR,Q.pull=t2,Q.pullAll=UC,Q.pullAllBy=n2,Q.pullAllWith=r2,Q.pullAt=o2,Q.range=vR,Q.rangeRight=yR,Q.rearg=mP,Q.reject=iP,Q.remove=i2,Q.rest=EP,Q.reverse=GA,Q.sampleSize=aP,Q.set=bS,Q.setWith=QS,Q.shuffle=lP,Q.slice=s2,Q.sortBy=AP,Q.sortedUniq=g2,Q.sortedUniqBy=f2,Q.split=qS,Q.spread=IP,Q.tail=p2,Q.take=h2,Q.takeRight=C2,Q.takeRightWhile=m2,Q.takeWhile=E2,Q.tap=M2,Q.throttle=BP,Q.thru=Rl,Q.toArray=sm,Q.toPairs=dm,Q.toPairsIn=gm,Q.toPath=TR,Q.toPlainObject=lm,Q.transform=xS,Q.unary=vP,Q.union=I2,Q.unionBy=B2,Q.unionWith=v2,Q.uniq=y2,Q.uniqBy=b2,Q.uniqWith=Q2,Q.unset=wS,Q.unzip=KA,Q.unzipWith=YC,Q.update=TS,Q.updateWith=PS,Q.values=wi,Q.valuesIn=SS,Q.without=x2,Q.words=hm,Q.wrap=yP,Q.xor=w2,Q.xorBy=T2,Q.xorWith=P2,Q.zip=S2,Q.zipObject=R2,Q.zipObjectDeep=O2,Q.zipWith=j2,Q.entries=dm,Q.entriesIn=gm,Q.extend=cm,Q.extendWith=Ll,rd(Q,Q),Q.add=SR,Q.attempt=Cm,Q.camelCase=MS,Q.capitalize=fm,Q.ceil=RR,Q.clamp=RS,Q.clone=QP,Q.cloneDeep=wP,Q.cloneDeepWith=TP,Q.cloneWith=xP,Q.conformsTo=PP,Q.deburr=pm,Q.defaultTo=cR,Q.divide=OR,Q.endsWith=DS,Q.eq=ar,Q.escape=kS,Q.escapeRegExp=FS,Q.every=U2,Q.find=G2,Q.findIndex=VC,Q.findKey=iS,Q.findLast=K2,Q.findLastIndex=HC,Q.findLastKey=sS,Q.floor=jR,Q.forEach=KC,Q.forEachRight=qC,Q.forIn=aS,Q.forInRight=lS,Q.forOwn=cS,Q.forOwnRight=uS,Q.get=_A,Q.gt=SP,Q.gte=RP,Q.has=gS,Q.hasIn=$A,Q.head=zC,Q.identity=Cn,Q.includes=_2,Q.indexOf=KT,Q.inRange=OS,Q.invoke=hS,Q.isArguments=Wo,Q.isArray=Le,Q.isArrayBuffer=OP,Q.isArrayLike=pn,Q.isArrayLikeObject=Ft,Q.isBoolean=jP,Q.isBuffer=so,Q.isDate=MP,Q.isElement=DP,Q.isEmpty=kP,Q.isEqual=FP,Q.isEqualWith=LP,Q.isError=XA,Q.isFinite=NP,Q.isFunction=Fr,Q.isInteger=nm,Q.isLength=kl,Q.isMap=rm,Q.isMatch=VP,Q.isMatchWith=HP,Q.isNaN=WP,Q.isNative=zP,Q.isNil=YP,Q.isNull=UP,Q.isNumber=om,Q.isObject=Pt,Q.isObjectLike=Ot,Q.isPlainObject=Hs,Q.isRegExp=ZA,Q.isSafeInteger=GP,Q.isSet=im,Q.isString=Fl,Q.isSymbol=wn,Q.isTypedArray=xi,Q.isUndefined=KP,Q.isWeakMap=qP,Q.isWeakSet=JP,Q.join=_T,Q.kebabCase=LS,Q.last=Gn,Q.lastIndexOf=$T,Q.lowerCase=NS,Q.lowerFirst=VS,Q.lt=XP,Q.lte=ZP,Q.max=MR,Q.maxBy=DR,Q.mean=kR,Q.meanBy=FR,Q.min=LR,Q.minBy=NR,Q.stubArray=id,Q.stubFalse=sd,Q.stubObject=bR,Q.stubString=QR,Q.stubTrue=xR,Q.multiply=VR,Q.nth=e2,Q.noConflict=hR,Q.noop=od,Q.now=jl,Q.pad=HS,Q.padEnd=WS,Q.padStart=zS,Q.parseInt=US,Q.random=jS,Q.reduce=rP,Q.reduceRight=oP,Q.repeat=YS,Q.replace=GS,Q.result=yS,Q.round=HR,Q.runInContext=z,Q.sample=sP,Q.size=cP,Q.snakeCase=KS,Q.some=uP,Q.sortedIndex=a2,Q.sortedIndexBy=l2,Q.sortedIndexOf=c2,Q.sortedLastIndex=u2,Q.sortedLastIndexBy=A2,Q.sortedLastIndexOf=d2,Q.startCase=JS,Q.startsWith=XS,Q.subtract=WR,Q.sum=zR,Q.sumBy=UR,Q.template=ZS,Q.times=wR,Q.toFinite=Lr,Q.toInteger=He,Q.toLength=am,Q.toLower=_S,Q.toNumber=Kn,Q.toSafeInteger=_P,Q.toString=rt,Q.toUpper=$S,Q.trim=eR,Q.trimEnd=tR,Q.trimStart=nR,Q.truncate=rR,Q.unescape=oR,Q.uniqueId=PR,Q.upperCase=iR,Q.upperFirst=ed,Q.each=KC,Q.eachRight=qC,Q.first=zC,rd(Q,function(){var i={};return mr(Q,function(a,d){At.call(Q.prototype,d)||(i[d]=a)}),i}(),{chain:!1}),Q.VERSION=r,Hn(["bind","bindKey","curry","curryRight","partial","partialRight"],function(i){Q[i].placeholder=Q}),Hn(["drop","take"],function(i,a){Xe.prototype[i]=function(d){d=d===n?1:Kt(He(d),0);var E=this.__filtered__&&!a?new Xe(this):this.clone();return E.__filtered__?E.__takeCount__=tn(d,E.__takeCount__):E.__views__.push({size:tn(d,X),type:i+(E.__dir__<0?"Right":"")}),E},Xe.prototype[i+"Right"]=function(d){return this.reverse()[i](d).reverse()}}),Hn(["filter","map","takeWhile"],function(i,a){var d=a+1,E=d==Z||d==V;Xe.prototype[i]=function(y){var T=this.clone();return T.__iteratees__.push({iteratee:Re(y,3),type:d}),T.__filtered__=T.__filtered__||E,T}}),Hn(["head","last"],function(i,a){var d="take"+(a?"Right":"");Xe.prototype[i]=function(){return this[d](1).value()[0]}}),Hn(["initial","tail"],function(i,a){var d="drop"+(a?"":"Right");Xe.prototype[i]=function(){return this.__filtered__?new Xe(this):this[d](1)}}),Xe.prototype.compact=function(){return this.filter(Cn)},Xe.prototype.find=function(i){return this.filter(i).head()},Xe.prototype.findLast=function(i){return this.reverse().find(i)},Xe.prototype.invokeMap=qe(function(i,a){return typeof i=="function"?new Xe(this):this.map(function(d){return Ds(d,i,a)})}),Xe.prototype.reject=function(i){return this.filter(Dl(Re(i)))},Xe.prototype.slice=function(i,a){i=He(i);var d=this;return d.__filtered__&&(i>0||a<0)?new Xe(d):(i<0?d=d.takeRight(-i):i&&(d=d.drop(i)),a!==n&&(a=He(a),d=a<0?d.dropRight(-a):d.take(a-i)),d)},Xe.prototype.takeRightWhile=function(i){return this.reverse().takeWhile(i).reverse()},Xe.prototype.toArray=function(){return this.take(X)},mr(Xe.prototype,function(i,a){var d=/^(?:filter|find|map|reject)|While$/.test(a),E=/^(?:head|last)$/.test(a),y=Q[E?"take"+(a=="last"?"Right":""):a],T=E||/^find/.test(a);y&&(Q.prototype[a]=function(){var M=this.__wrapped__,N=E?[1]:arguments,Y=M instanceof Xe,re=N[0],oe=Y||Le(M),se=function(Je){var Ze=y.apply(Q,$r([Je],N));return E&&Ee?Ze[0]:Ze};oe&&d&&typeof re=="function"&&re.length!=1&&(Y=oe=!1);var Ee=this.__chain__,be=!!this.__actions__.length,Oe=T&&!Ee,Ye=Y&&!be;if(!T&&oe){M=Ye?M:new Xe(this);var je=i.apply(M,N);return je.__actions__.push({func:Rl,args:[se],thisArg:n}),new zn(je,Ee)}return Oe&&Ye?i.apply(this,N):(je=this.thru(se),Oe?E?je.value()[0]:je.value():je)})}),Hn(["pop","push","shift","sort","splice","unshift"],function(i){var a=rl[i],d=/^(?:push|sort|unshift)$/.test(i)?"tap":"thru",E=/^(?:pop|shift)$/.test(i);Q.prototype[i]=function(){var y=arguments;if(E&&!this.__chain__){var T=this.value();return a.apply(Le(T)?T:[],y)}return this[d](function(M){return a.apply(Le(M)?M:[],y)})}}),mr(Xe.prototype,function(i,a){var d=Q[a];if(d){var E=d.name+"";At.call(Bi,E)||(Bi[E]=[]),Bi[E].push({name:a,func:d})}}),Bi[bl(n,O).name]=[{name:"wrapper",func:n}],Xe.prototype.clone=ow,Xe.prototype.reverse=iw,Xe.prototype.value=sw,Q.prototype.at=D2,Q.prototype.chain=k2,Q.prototype.commit=F2,Q.prototype.next=L2,Q.prototype.plant=V2,Q.prototype.reverse=H2,Q.prototype.toJSON=Q.prototype.valueOf=Q.prototype.value=W2,Q.prototype.first=Q.prototype.head,Ts&&(Q.prototype[Ts]=N2),Q},mi=F1();Mo?((Mo.exports=mi)._=mi,nA._=mi):$t._=mi}).call(Xn)})(Ic,Ic.exports);var dt=Ic.exports;const Ae=bo(dt),$m=e=>function(){return e.apply(this,arguments)},ns=c.shape({id:c.string,title:c.string,type:c.oneOf(["group","item","collapse"]),icon:c.elementType,url:c.string,parent:c.shape($m(()=>ns)),children:c.arrayOf($m(()=>ns)),resource:c.bool}),$0={fontFamily:"'Inter', sans-serif",menuOrientation:"vertical",miniDrawer:!1,container:!1,mode:"light",presetColor:"theme4",themeDirection:"ltr",appDefaultPath:"/",drawerWidth:260,horizontalMaxItems:6,spacing:2},Xg=w.createContext($0),_j=e=>e==="vertical",$j=e=>e==="horizontal",Bc=({initialConfig:e,children:t})=>{const[n,r]=of("theme-config",{...$0,...e}),o=I=>r(B=>({...B,fontFamily:I})),s=I=>r(B=>({...B,menuOrientation:I})),l=I=>r(B=>({...B,miniDrawer:I})),u=I=>r(B=>({...B,container:I})),A=I=>r(B=>({...B,mode:I})),g=I=>r(B=>({...B,presetColor:I})),p=I=>r(B=>({...B,themeDirection:I})),C=I=>r(B=>({...B,appDefaultPath:I})),h=I=>r(B=>({...B,drawerWidth:I})),m=I=>r(B=>({...B,horizontalMaxItems:I}));return f.jsx(Xg.Provider,{value:{...n,setFontFamily:o,setMenuOrientation:s,setMiniDrawer:l,setContainer:u,setMode:A,setPresetColor:g,setThemeDirection:p,setAppDefaultPath:C,setDrawerWidth:h,setHorizontalMaxItems:m,isVerticalLayout:_j,isHorizontalLayout:$j},children:t})};Bc.propTypes={children:c.node};const eB={openItem:["dashboard"],openComponent:"buttons",selectedID:null,drawerOpen:!1,componentDrawerOpen:!0,menuDashboard:{},error:null},Zg=w.createContext(eB),_g=({menu:e,children:t})=>{const[n,r]=of("menu-config",{...eB}),o=C=>{r(h=>({...h,openItem:C}))},s=C=>{r(h=>({...h,selectedID:C}))},l=C=>{r(h=>({...h,openComponent:C}))},u=C=>{r(h=>({...h,drawerOpen:C}))},A=C=>{r(h=>({...h,componentDrawerOpen:C}))},g=C=>{r(h=>({...h,menuDashboard:C}))},p=C=>{r(h=>({...h,error:C}))};return f.jsx(Zg.Provider,{value:{...n,groups:e,activeItem:o,activeComponent:l,openDrawer:u,openComponentDrawer:A,activeID:s,getMenuSuccess:g,hasError:p},children:t})};_g.propTypes={children:c.node,menu:c.arrayOf(ns)};const $g=w.createContext(void 0),ef=w.createContext(void 0),Io=()=>w.useContext(Zg),eM=["e-","entities/"],tM=e=>{let t=e;return eM.forEach(n=>{t=t!=null&&t.startsWith(n)?t==null?void 0:t.substring(n.length):t}),t},nM=(e,t)=>{var n,r;return((n=t.options)==null?void 0:n.group)===e.id||!((r=t.options)!=null&&r.group)&&e.id==="admin"},rM=(e,t)=>{const n=tM(e.name);return t==null?void 0:t.includes(`${n}:list`)},$d=(e,t)=>{let n=e.find(r=>r.id===t);if(!n)for(let r=0;r<e.length;r++){const o=e[r];if(o.children&&(n=$d(o.children,t),n))return n}return n},tB=(e,t,n)=>{let r=e.find(o=>["group","collapse"].indexOf(o.type)!==-1&&nM(o,t));if(!r)for(let o=0;o<e.length;o++){const s=e[o];if(s.children&&(r=tB(s.children,t),r))return r}return r},nB=(e,t)=>{let n=e.find(r=>r.id===t);if(!n)for(let r=0;r<e.length;r++){const o=e[r];if(o.children&&(n=nB(o.children,t),n))return n}return n},rB=e=>e?e.type==="item"?!0:(e.children&&(e.children=e.children.filter(rB)),e.children&&e.children.length>0):!1,oB=e=>(e.children&&e.children.forEach(t=>{t.parent=e,oB(t)}),e),oM=({userGroups:e,resources:t,permissions:n,translate:r,roles:o})=>{const s=C=>(C.title=r(C.title,{_:C.title}),C.children&&C.children.forEach(h=>s(h)),C),l=Object.keys(t),u=(C,h)=>(C.children&&(C.children=C.children.filter(m=>{if(m.resource===!1){const I=m.roles||[];return!!(I.length===0||I.some(B=>o.includes(B)))}return m.type==="item"?h.includes(m.id):(u(m,h),m.children&&m.children.length>0)})),C),A=dt.cloneDeep(e).map(C=>({type:"group",icon:et.AntDesignOutlined,children:[],...C})).map(s).map(C=>u(C,l)),g=Object.values(t).map(C=>{var h;return((h=C.options)==null?void 0:h.group)||"admin"}).filter((C,h,m)=>m.indexOf(C)===h).filter(C=>C!==void 0&&nB(e,C)===null).map(C=>({id:C,title:r(`ra.menu.group.${C}`),type:"group",icon:et.AntDesignOutlined,children:[]})),p=[...A,...g];return Object.values(t).forEach(C=>{var j,x,S,P;const h=tB(p,C),m=(j=h==null?void 0:h.children)==null?void 0:j.find(L=>L.id===C.name),I=(x=h==null?void 0:h.children)==null?void 0:x.some(L=>L.id===C.name),B=(m==null?void 0:m.roles)||((S=C.options)==null?void 0:S.roles)||[],v=!B||B.length===0||B.some(L=>o.includes(L));if(!rM(C,n)||!C.hasList||!v){I&&((P=h==null?void 0:h.children)==null?void 0:P.length)>0&&(h.children=h.children.filter(L=>L.id!==C.name));return}h&&(h.children||(h.children=[]))}),p.filter(rB).map(oB)},tf=()=>{const e=R.useResourceDefinitions(),{isLoading:t,data:n}=R.useGetIdentity(),r=n&&n.id>0,{isLoading:o,permissions:s}=R.usePermissions(r),{groups:l}=Io(),u=R.useTranslate(),A=w.useMemo(()=>{if(t||!n||n===null||(n==null?void 0:n.id)<=0)return null;const p=((n==null?void 0:n.roles)||[]).map(h=>h.id);return oM({resources:e,permissions:s,translate:u,userGroups:l,roles:p})},[t,o,n,e,s,u,l]),g=w.useMemo(()=>t,[t]);return{menu:A,isLoading:g,getItem:p=>g?!1:$d(A,p),findInMenu:g?()=>{}:$d}},iB=()=>{const e=R.useTranslate(),{isLoading:t,menu:n,findInMenu:r}=tf(),{pathname:o}=Bt.useLocation();return w.useMemo(()=>{var C;const s=o.split("/").filter(h=>h);let l=dt.cloneDeep(n),u=o,A=r(l,o);if(A||(A=r(l,s[s.length-1]),u=A?A.id:u),!A)for(let h=s.length;h>=0;h--){let m=s.slice(0,h).join("/");if(A=r(l,m),A){u=A.id;break}}const g=(C=A==null?void 0:A.url)==null?void 0:C.split("/");if(s.length>=(g==null?void 0:g.length)){const h=s[s.length-1];if(A){const m=h==="create"||o===A.url?"create":"edit",I=`resources.${u}.breadcrumbs.${m}`,B={id:`${u}-${m}`,type:"item",title:e(I,{_:e(I,{_:I})}),url:o,breadcrumbs:!0,parent:A};A.type="collapse",A.breadcrumbs=!0,A.children=A.children||[],A.children.push(B),A=B}}let p=[];if(A){let h={...A,last:!0};for(;h;)p.push(h),h=h.parent;p=p.reverse()}return{isLoading:t,navigation:{items:l},breadcrumbs:p}},[t,o,n,r,e])};var sB={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(Xn,function(){var n=1e3,r=6e4,o=36e5,s="millisecond",l="second",u="minute",A="hour",g="day",p="week",C="month",h="quarter",m="year",I="date",B="Invalid Date",v=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,O=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,j={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(Z){var K=["th","st","nd","rd"],V=Z%100;return"["+Z+(K[(V-20)%10]||K[V]||K[0])+"]"}},x=function(Z,K,V){var G=String(Z);return!G||G.length>=K?Z:""+Array(K+1-G.length).join(V)+Z},S={s:x,z:function(Z){var K=-Z.utcOffset(),V=Math.abs(K),G=Math.floor(V/60),F=V%60;return(K<=0?"+":"-")+x(G,2,"0")+":"+x(F,2,"0")},m:function Z(K,V){if(K.date()<V.date())return-Z(V,K);var G=12*(V.year()-K.year())+(V.month()-K.month()),F=K.clone().add(G,C),$=V-F<0,H=K.clone().add(G+($?-1:1),C);return+(-(G+(V-F)/($?F-H:H-F))||0)},a:function(Z){return Z<0?Math.ceil(Z)||0:Math.floor(Z)},p:function(Z){return{M:C,y:m,w:p,d:g,D:I,h:A,m:u,s:l,ms:s,Q:h}[Z]||String(Z||"").toLowerCase().replace(/s$/,"")},u:function(Z){return Z===void 0}},P="en",L={};L[P]=j;var k="$isDayjsObject",q=function(Z){return Z instanceof le||!(!Z||!Z[k])},J=function Z(K,V,G){var F;if(!K)return P;if(typeof K=="string"){var $=K.toLowerCase();L[$]&&(F=$),V&&(L[$]=V,F=$);var H=K.split("-");if(!F&&H.length>1)return Z(H[0])}else{var X=K.name;L[X]=K,F=X}return!G&&F&&(P=F),F||!G&&P},U=function(Z,K){if(q(Z))return Z.clone();var V=typeof K=="object"?K:{};return V.date=Z,V.args=arguments,new le(V)},_=S;_.l=J,_.i=q,_.w=function(Z,K){return U(Z,{locale:K.$L,utc:K.$u,x:K.$x,$offset:K.$offset})};var le=function(){function Z(V){this.$L=J(V.locale,null,!0),this.parse(V),this.$x=this.$x||V.x||{},this[k]=!0}var K=Z.prototype;return K.parse=function(V){this.$d=function(G){var F=G.date,$=G.utc;if(F===null)return new Date(NaN);if(_.u(F))return new Date;if(F instanceof Date)return new Date(F);if(typeof F=="string"&&!/Z$/i.test(F)){var H=F.match(v);if(H){var X=H[2]-1||0,ge=(H[7]||"0").substring(0,3);return $?new Date(Date.UTC(H[1],X,H[3]||1,H[4]||0,H[5]||0,H[6]||0,ge)):new Date(H[1],X,H[3]||1,H[4]||0,H[5]||0,H[6]||0,ge)}}return new Date(F)}(V),this.init()},K.init=function(){var V=this.$d;this.$y=V.getFullYear(),this.$M=V.getMonth(),this.$D=V.getDate(),this.$W=V.getDay(),this.$H=V.getHours(),this.$m=V.getMinutes(),this.$s=V.getSeconds(),this.$ms=V.getMilliseconds()},K.$utils=function(){return _},K.isValid=function(){return this.$d.toString()!==B},K.isSame=function(V,G){var F=U(V);return this.startOf(G)<=F&&F<=this.endOf(G)},K.isAfter=function(V,G){return U(V)<this.startOf(G)},K.isBefore=function(V,G){return this.endOf(G)<U(V)},K.$g=function(V,G,F){return _.u(V)?this[G]:this.set(F,V)},K.unix=function(){return Math.floor(this.valueOf()/1e3)},K.valueOf=function(){return this.$d.getTime()},K.startOf=function(V,G){var F=this,$=!!_.u(G)||G,H=_.p(V),X=function(Ce,Ie){var Qe=_.w(F.$u?Date.UTC(F.$y,Ie,Ce):new Date(F.$y,Ie,Ce),F);return $?Qe:Qe.endOf(g)},ge=function(Ce,Ie){return _.w(F.toDate()[Ce].apply(F.toDate("s"),($?[0,0,0,0]:[23,59,59,999]).slice(Ie)),F)},pe=this.$W,ce=this.$M,fe=this.$D,he="set"+(this.$u?"UTC":"");switch(H){case m:return $?X(1,0):X(31,11);case C:return $?X(1,ce):X(0,ce+1);case p:var Be=this.$locale().weekStart||0,me=(pe<Be?pe+7:pe)-Be;return X($?fe-me:fe+(6-me),ce);case g:case I:return ge(he+"Hours",0);case A:return ge(he+"Minutes",1);case u:return ge(he+"Seconds",2);case l:return ge(he+"Milliseconds",3);default:return this.clone()}},K.endOf=function(V){return this.startOf(V,!1)},K.$set=function(V,G){var F,$=_.p(V),H="set"+(this.$u?"UTC":""),X=(F={},F[g]=H+"Date",F[I]=H+"Date",F[C]=H+"Month",F[m]=H+"FullYear",F[A]=H+"Hours",F[u]=H+"Minutes",F[l]=H+"Seconds",F[s]=H+"Milliseconds",F)[$],ge=$===g?this.$D+(G-this.$W):G;if($===C||$===m){var pe=this.clone().set(I,1);pe.$d[X](ge),pe.init(),this.$d=pe.set(I,Math.min(this.$D,pe.daysInMonth())).$d}else X&&this.$d[X](ge);return this.init(),this},K.set=function(V,G){return this.clone().$set(V,G)},K.get=function(V){return this[_.p(V)]()},K.add=function(V,G){var F,$=this;V=Number(V);var H=_.p(G),X=function(ce){var fe=U($);return _.w(fe.date(fe.date()+Math.round(ce*V)),$)};if(H===C)return this.set(C,this.$M+V);if(H===m)return this.set(m,this.$y+V);if(H===g)return X(1);if(H===p)return X(7);var ge=(F={},F[u]=r,F[A]=o,F[l]=n,F)[H]||1,pe=this.$d.getTime()+V*ge;return _.w(pe,this)},K.subtract=function(V,G){return this.add(-1*V,G)},K.format=function(V){var G=this,F=this.$locale();if(!this.isValid())return F.invalidDate||B;var $=V||"YYYY-MM-DDTHH:mm:ssZ",H=_.z(this),X=this.$H,ge=this.$m,pe=this.$M,ce=F.weekdays,fe=F.months,he=F.meridiem,Be=function(Ie,Qe,ae,Ne){return Ie&&(Ie[Qe]||Ie(G,$))||ae[Qe].slice(0,Ne)},me=function(Ie){return _.s(X%12||12,Ie,"0")},Ce=he||function(Ie,Qe,ae){var Ne=Ie<12?"AM":"PM";return ae?Ne.toLowerCase():Ne};return $.replace(O,function(Ie,Qe){return Qe||function(ae){switch(ae){case"YY":return String(G.$y).slice(-2);case"YYYY":return _.s(G.$y,4,"0");case"M":return pe+1;case"MM":return _.s(pe+1,2,"0");case"MMM":return Be(F.monthsShort,pe,fe,3);case"MMMM":return Be(fe,pe);case"D":return G.$D;case"DD":return _.s(G.$D,2,"0");case"d":return String(G.$W);case"dd":return Be(F.weekdaysMin,G.$W,ce,2);case"ddd":return Be(F.weekdaysShort,G.$W,ce,3);case"dddd":return ce[G.$W];case"H":return String(X);case"HH":return _.s(X,2,"0");case"h":return me(1);case"hh":return me(2);case"a":return Ce(X,ge,!0);case"A":return Ce(X,ge,!1);case"m":return String(ge);case"mm":return _.s(ge,2,"0");case"s":return String(G.$s);case"ss":return _.s(G.$s,2,"0");case"SSS":return _.s(G.$ms,3,"0");case"Z":return H}return null}(Ie)||H.replace(":","")})},K.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},K.diff=function(V,G,F){var $,H=this,X=_.p(G),ge=U(V),pe=(ge.utcOffset()-this.utcOffset())*r,ce=this-ge,fe=function(){return _.m(H,ge)};switch(X){case m:$=fe()/12;break;case C:$=fe();break;case h:$=fe()/3;break;case p:$=(ce-pe)/6048e5;break;case g:$=(ce-pe)/864e5;break;case A:$=ce/o;break;case u:$=ce/r;break;case l:$=ce/n;break;default:$=ce}return F?$:_.a($)},K.daysInMonth=function(){return this.endOf(C).$D},K.$locale=function(){return L[this.$L]},K.locale=function(V,G){if(!V)return this.$L;var F=this.clone(),$=J(V,G,!0);return $&&(F.$L=$),F},K.clone=function(){return _.w(this.$d,this)},K.toDate=function(){return new Date(this.valueOf())},K.toJSON=function(){return this.isValid()?this.toISOString():null},K.toISOString=function(){return this.$d.toISOString()},K.toString=function(){return this.$d.toUTCString()},Z}(),ie=le.prototype;return U.prototype=ie,[["$ms",s],["$s",l],["$m",u],["$H",A],["$W",g],["$M",C],["$y",m],["$D",I]].forEach(function(Z){ie[Z[1]]=function(K){return this.$g(K,Z[0],Z[1])}}),U.extend=function(Z,K){return Z.$i||(Z(K,le,U),Z.$i=!0),U},U.locale=J,U.isDayjs=q,U.unix=function(Z){return U(1e3*Z)},U.en=L[P],U.Ls=L,U.p={},U})})(sB);var iM=sB.exports;const qr=bo(iM),aB=e=>{const t=e.split(":");t.length===1&&t.push("00");const n=parseInt(t[0]),r=parseInt(t[1]);return qr().hour(n).minute(r)};function sM(){let e=new Date().getTime();return window.performance&&typeof window.performance.now=="function"&&(e+=performance.now()),"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(n){const r=(e+Math.random()*16)%16|0;return e=Math.floor(e/16),(n=="x"?r:r&3|8).toString(16)})}function nf(e={},t=[],n={}){const{isEmpty:r=Ae.isEmpty}=n;return!Ae.some(t,o=>r((e??{})[o.locale]))}function rf(e,t,n){if(!Ae.isPlainObject(e)||t===void 0)return;const r=Ae.isPlainObject(n)?n:{},o=!!((r==null?void 0:r.fallback)??!0);let s=e[String(t)];if(s===void 0&&o){const l=Ae.isArray(r.fallbackLocales)&&!Ae.isEmpty(r.fallbackLocales)?r.fallbackLocales:["en"];s=Ae.chain(l).map(u=>e[String(u)]).reject(Ae.isUndefined).first().value(),s===void 0&&(s=Ae.chain(e).values().first().value())}return s}function lB(e){const[t]=de.useLocaleState();return e!==void 0?String(e):t}function aM(e,t){const n=lB(t==null?void 0:t.locale);return rf(e,n,t)}function lM(e){const t=lB(e==null?void 0:e.locale);return w.useCallback(r=>rf(r,t,e),[t,e])}function of(e,t){const[n,r]=w.useState(()=>{const s=typeof window<"u"?localStorage.getItem(e):null;return s===null?t:JSON.parse(s)});return w.useEffect(()=>{const s=l=>{typeof window<"u"&&l.storageArea===localStorage&&l.key===e&&r(l.newValue?JSON.parse(l.newValue):l.newValue)};return window.addEventListener("storage",s),()=>{window.removeEventListener("storage",s)}},[e,t]),[n,s=>{r(l=>{const u=typeof s=="function"?s(l):s;return typeof window<"u"&&localStorage.setItem(e,JSON.stringify(u)),u})}]}function cB(e){if(!Ae.isPlainObject(e))throw new Error("[useMemoizedObject]: param must be a plain JS object");const[t,n]=w.useState(e);return w.useEffect(()=>{Ae.isEqual(e,t)||n(e)},[e,t]),t}function ou(){const[e,t]=w.useState(null),n=!!e,r=w.useCallback(l=>t((l==null?void 0:l.currentTarget)??null),[t]),o=w.useCallback(()=>t(null),[t]),s=w.useCallback(l=>{n?o():r(l)},[n,r,o]);return{anchorEl:e,open:n,handleClick:r,handleClose:o,handleToggle:s}}function cM(e,t){const[n,r]=w.useState({width:1,height:1}),o=e.current;return w.useEffect(()=>{function s(){var g;let u=0,A=0;switch(t){case"client":u=(o==null?void 0:o.clientWidth)??0,A=(o==null?void 0:o.clientHeight)??0;break;case"offset":u=(o==null?void 0:o.offsetWidth)??0,A=(o==null?void 0:o.offsetHeight)??0;break;case"scroll":u=(o==null?void 0:o.scrollWidth)??0,A=(o==null?void 0:o.scrollHeight)??0;break;case"bounding":default:{const p=((g=e.current)==null?void 0:g.getBoundingClientRect())??{width:0,height:0};u=p.width,A=p.height;break}}r({width:u,height:A})}const l=new ResizeObserver(s);return Ae.isEmpty(e==null?void 0:e.current)||(l.observe(e==null?void 0:e.current),s()),()=>{l.disconnect()}},[o,t]),n}const sf=e=>{const t=R.useRecordContext(),n=R.useTranslate(),r=R.useResourceContext(),o=t!=null&&t.id?"edit":"create";return w.useMemo(()=>{if(e===!1)return;const l=`resources.${r}.title`;return e||n(`resources.${r}.title.${o}`,{_:n(l,{_:l}),...t})},[o,t,r,n,e])};function Pr(e,t,n){const r=Ae.chain((e==null?void 0:e.sx)??{}).cloneDeepWith(l=>Ae.isFunction(l)?l:void 0).value();n!=null&&n.defaults?Ae.defaultsDeep(r,t):Ae.merge(r,t);const[o,s]=w.useState(r);return w.useEffect(()=>{Ae.isEqual(o,r)||s(r)},[o,r]),o}const uB=()=>w.useContext($g),uM=()=>w.useContext(ef),Ln=()=>w.useContext(Xg),AB=ue(Zj,{shouldForwardProp:e=>e!=="open"})(({theme:e,open:t})=>{const{drawerWidth:n}=Ln();return{zIndex:e.zIndex.drawer+1,transition:e.transitions.create(["width","margin"],{easing:e.transitions.easing.sharp,duration:e.transitions.duration.leavingScreen}),...!t&&{width:`calc(100% - ${e.spacing(7.5)})`},...t&&{marginLeft:n,width:`calc(100% - ${n}px)`,transition:e.transitions.create(["width","margin"],{easing:e.transitions.easing.sharp,duration:e.transitions.duration.enteringScreen})}}});AB.propTypes={open:c.bool};const AM=w.forwardRef(function(t,n){const r=Pr(t,{color:"text.primary"},{defaults:!0});return f.jsx(b.Button,{ref:n,...t,color:"secondary",variant:"text",sx:r})}),dB=w.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),iu=w.createContext({}),af=w.createContext(null),su=typeof document<"u",dM=su?w.useLayoutEffect:w.useEffect,gB=w.createContext({strict:!1});function gM(e,t,n,r){const{visualElement:o}=w.useContext(iu),s=w.useContext(gB),l=w.useContext(af),u=w.useContext(dB).reducedMotion,A=w.useRef();r=r||s.renderer,!A.current&&r&&(A.current=r(e,{visualState:t,parent:o,props:n,presenceContext:l,blockInitialAnimation:l?l.initial===!1:!1,reducedMotionConfig:u}));const g=A.current;w.useInsertionEffect(()=>{g&&g.update(n,l)});const p=w.useRef(!!window.HandoffAppearAnimations);return dM(()=>{g&&(g.render(),p.current&&g.animationState&&g.animationState.animateChanges())}),w.useEffect(()=>{g&&(g.updateFeatures(),!p.current&&g.animationState&&g.animationState.animateChanges(),window.HandoffAppearAnimations=void 0,p.current=!1)}),g}function zi(e){return typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function fM(e,t,n){return w.useCallback(r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):zi(n)&&(n.current=r))},[t])}function fa(e){return typeof e=="string"||Array.isArray(e)}function au(e){return typeof e=="object"&&typeof e.start=="function"}const lf=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],cf=["initial",...lf];function lu(e){return au(e.animate)||cf.some(t=>fa(e[t]))}function fB(e){return!!(lu(e)||e.variants)}function pM(e,t){if(lu(e)){const{initial:n,animate:r}=e;return{initial:n===!1||fa(n)?n:void 0,animate:fa(r)?r:void 0}}return e.inherit!==!1?t:{}}function hM(e){const{initial:t,animate:n}=pM(e,w.useContext(iu));return w.useMemo(()=>({initial:t,animate:n}),[eE(t),eE(n)])}function eE(e){return Array.isArray(e)?e.join(" "):e}const tE={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},pa={};for(const e in tE)pa[e]={isEnabled:t=>tE[e].some(n=>!!t[n])};function CM(e){for(const t in e)pa[t]={...pa[t],...e[t]}}const pB=w.createContext({}),hB=w.createContext({}),mM=Symbol.for("motionComponentSymbol");function EM({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:o}){e&&CM(e);function s(u,A){let g;const p={...w.useContext(dB),...u,layoutId:IM(u)},{isStatic:C}=p,h=hM(u),m=r(u,C);if(!C&&su){h.visualElement=gM(o,m,p,t);const I=w.useContext(hB),B=w.useContext(gB).strict;h.visualElement&&(g=h.visualElement.loadFeatures(p,B,e,I))}return D.createElement(iu.Provider,{value:h},g&&h.visualElement?D.createElement(g,{visualElement:h.visualElement,...p}):null,n(o,u,fM(m,h.visualElement,A),m,C,h.visualElement))}const l=w.forwardRef(s);return l[mM]=o,l}function IM({layoutId:e}){const t=w.useContext(pB).id;return t&&e!==void 0?t+"-"+e:e}function BM(e){function t(r,o={}){return EM(e(r,o))}if(typeof Proxy>"u")return t;const n=new Map;return new Proxy(t,{get:(r,o)=>(n.has(o)||n.set(o,t(o)),n.get(o))})}const vM=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function uf(e){return typeof e!="string"||e.includes("-")?!1:!!(vM.indexOf(e)>-1||/[A-Z]/.test(e))}const vc={};function yM(e){Object.assign(vc,e)}const Pa=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],ui=new Set(Pa);function CB(e,{layout:t,layoutId:n}){return ui.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!vc[e]||e==="opacity")}const vn=e=>!!(e&&e.getVelocity),bM={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},QM=Pa.length;function xM(e,{enableHardwareAcceleration:t=!0,allowTransformNone:n=!0},r,o){let s="";for(let l=0;l<QM;l++){const u=Pa[l];if(e[u]!==void 0){const A=bM[u]||u;s+=`${A}(${e[u]}) `}}return t&&!e.z&&(s+="translateZ(0)"),s=s.trim(),o?s=o(e,r?"":s):n&&r&&(s="none"),s}const mB=e=>t=>typeof t=="string"&&t.startsWith(e),EB=mB("--"),eg=mB("var(--"),wM=/var\s*\(\s*--[\w-]+(\s*,\s*(?:(?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)+)?\s*\)/g,TM=(e,t)=>t&&typeof e=="number"?t.transform(e):e,Bo=(e,t,n)=>Math.min(Math.max(n,e),t),Ai={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},na={...Ai,transform:e=>Bo(0,1,e)},Hl={...Ai,default:1},ra=e=>Math.round(e*1e5)/1e5,cu=/(-)?([\d]*\.?[\d])+/g,IB=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,PM=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function Sa(e){return typeof e=="string"}const Ra=e=>({test:t=>Sa(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Ao=Ra("deg"),br=Ra("%"),Me=Ra("px"),SM=Ra("vh"),RM=Ra("vw"),nE={...br,parse:e=>br.parse(e)/100,transform:e=>br.transform(e*100)},rE={...Ai,transform:Math.round},BB={borderWidth:Me,borderTopWidth:Me,borderRightWidth:Me,borderBottomWidth:Me,borderLeftWidth:Me,borderRadius:Me,radius:Me,borderTopLeftRadius:Me,borderTopRightRadius:Me,borderBottomRightRadius:Me,borderBottomLeftRadius:Me,width:Me,maxWidth:Me,height:Me,maxHeight:Me,size:Me,top:Me,right:Me,bottom:Me,left:Me,padding:Me,paddingTop:Me,paddingRight:Me,paddingBottom:Me,paddingLeft:Me,margin:Me,marginTop:Me,marginRight:Me,marginBottom:Me,marginLeft:Me,rotate:Ao,rotateX:Ao,rotateY:Ao,rotateZ:Ao,scale:Hl,scaleX:Hl,scaleY:Hl,scaleZ:Hl,skew:Ao,skewX:Ao,skewY:Ao,distance:Me,translateX:Me,translateY:Me,translateZ:Me,x:Me,y:Me,z:Me,perspective:Me,transformPerspective:Me,opacity:na,originX:nE,originY:nE,originZ:Me,zIndex:rE,fillOpacity:na,strokeOpacity:na,numOctaves:rE};function Af(e,t,n,r){const{style:o,vars:s,transform:l,transformOrigin:u}=e;let A=!1,g=!1,p=!0;for(const C in t){const h=t[C];if(EB(C)){s[C]=h;continue}const m=BB[C],I=TM(h,m);if(ui.has(C)){if(A=!0,l[C]=I,!p)continue;h!==(m.default||0)&&(p=!1)}else C.startsWith("origin")?(g=!0,u[C]=I):o[C]=I}if(t.transform||(A||r?o.transform=xM(e.transform,n,p,r):o.transform&&(o.transform="none")),g){const{originX:C="50%",originY:h="50%",originZ:m=0}=u;o.transformOrigin=`${C} ${h} ${m}`}}const df=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function vB(e,t,n){for(const r in t)!vn(t[r])&&!CB(r,n)&&(e[r]=t[r])}function OM({transformTemplate:e},t,n){return w.useMemo(()=>{const r=df();return Af(r,t,{enableHardwareAcceleration:!n},e),Object.assign({},r.vars,r.style)},[t])}function jM(e,t,n){const r=e.style||{},o={};return vB(o,r,e),Object.assign(o,OM(e,t,n)),e.transformValues?e.transformValues(o):o}function MM(e,t,n){const r={},o=jM(e,t,n);return e.drag&&e.dragListener!==!1&&(r.draggable=!1,o.userSelect=o.WebkitUserSelect=o.WebkitTouchCallout="none",o.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(r.tabIndex=0),r.style=o,r}const DM=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","ignoreStrict","viewport"]);function yc(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||DM.has(e)}let yB=e=>!yc(e);function kM(e){e&&(yB=t=>t.startsWith("on")?!yc(t):e(t))}try{kM(require("@emotion/is-prop-valid").default)}catch{}function FM(e,t,n){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||(yB(o)||n===!0&&yc(o)||!t&&!yc(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}function oE(e,t,n){return typeof e=="string"?e:Me.transform(t+n*e)}function LM(e,t,n){const r=oE(t,e.x,e.width),o=oE(n,e.y,e.height);return`${r} ${o}`}const NM={offset:"stroke-dashoffset",array:"stroke-dasharray"},VM={offset:"strokeDashoffset",array:"strokeDasharray"};function HM(e,t,n=1,r=0,o=!0){e.pathLength=1;const s=o?NM:VM;e[s.offset]=Me.transform(-r);const l=Me.transform(t),u=Me.transform(n);e[s.array]=`${l} ${u}`}function gf(e,{attrX:t,attrY:n,attrScale:r,originX:o,originY:s,pathLength:l,pathSpacing:u=1,pathOffset:A=0,...g},p,C,h){if(Af(e,g,p,h),C){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:m,style:I,dimensions:B}=e;m.transform&&(B&&(I.transform=m.transform),delete m.transform),B&&(o!==void 0||s!==void 0||I.transform)&&(I.transformOrigin=LM(B,o!==void 0?o:.5,s!==void 0?s:.5)),t!==void 0&&(m.x=t),n!==void 0&&(m.y=n),r!==void 0&&(m.scale=r),l!==void 0&&HM(m,l,u,A,!1)}const bB=()=>({...df(),attrs:{}}),ff=e=>typeof e=="string"&&e.toLowerCase()==="svg";function WM(e,t,n,r){const o=w.useMemo(()=>{const s=bB();return gf(s,t,{enableHardwareAcceleration:!1},ff(r),e.transformTemplate),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};vB(s,e.style,e),o.style={...s,...o.style}}return o}function zM(e=!1){return(n,r,o,{latestValues:s},l)=>{const A=(uf(n)?WM:MM)(r,s,l,n),p={...FM(r,typeof n=="string",e),...A,ref:o},{children:C}=r,h=w.useMemo(()=>vn(C)?C.get():C,[C]);return w.createElement(n,{...p,children:h})}}const pf=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function QB(e,{style:t,vars:n},r,o){Object.assign(e.style,t,o&&o.getProjectionStyles(r));for(const s in n)e.style.setProperty(s,n[s])}const xB=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function wB(e,t,n,r){QB(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(xB.has(o)?o:pf(o),t.attrs[o])}function hf(e,t){const{style:n}=e,r={};for(const o in n)(vn(n[o])||t.style&&vn(t.style[o])||CB(o,e))&&(r[o]=n[o]);return r}function TB(e,t){const n=hf(e,t);for(const r in e)if(vn(e[r])||vn(t[r])){const o=Pa.indexOf(r)!==-1?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r;n[o]=e[r]}return n}function Cf(e,t,n,r={},o={}){return typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,o)),typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,o)),t}function UM(e){const t=w.useRef(null);return t.current===null&&(t.current=e()),t.current}const bc=e=>Array.isArray(e),YM=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),GM=e=>bc(e)?e[e.length-1]||0:e;function ic(e){const t=vn(e)?e.get():e;return YM(t)?t.toValue():t}function KM({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:n},r,o,s){const l={latestValues:qM(r,o,s,e),renderState:t()};return n&&(l.mount=u=>n(r,u,l)),l}const PB=e=>(t,n)=>{const r=w.useContext(iu),o=w.useContext(af),s=()=>KM(e,t,r,o);return n?s():UM(s)};function qM(e,t,n,r){const o={},s=r(e,{});for(const h in s)o[h]=ic(s[h]);let{initial:l,animate:u}=e;const A=lu(e),g=fB(e);t&&g&&!A&&e.inherit!==!1&&(l===void 0&&(l=t.initial),u===void 0&&(u=t.animate));let p=n?n.initial===!1:!1;p=p||l===!1;const C=p?u:l;return C&&typeof C!="boolean"&&!au(C)&&(Array.isArray(C)?C:[C]).forEach(m=>{const I=Cf(e,m);if(!I)return;const{transitionEnd:B,transition:v,...O}=I;for(const j in O){let x=O[j];if(Array.isArray(x)){const S=p?x.length-1:0;x=x[S]}x!==null&&(o[j]=x)}for(const j in B)o[j]=B[j]}),o}const Dt=e=>e;class iE{constructor(){this.order=[],this.scheduled=new Set}add(t){if(!this.scheduled.has(t))return this.scheduled.add(t),this.order.push(t),!0}remove(t){const n=this.order.indexOf(t);n!==-1&&(this.order.splice(n,1),this.scheduled.delete(t))}clear(){this.order.length=0,this.scheduled.clear()}}function JM(e){let t=new iE,n=new iE,r=0,o=!1,s=!1;const l=new WeakSet,u={schedule:(A,g=!1,p=!1)=>{const C=p&&o,h=C?t:n;return g&&l.add(A),h.add(A)&&C&&o&&(r=t.order.length),A},cancel:A=>{n.remove(A),l.delete(A)},process:A=>{if(o){s=!0;return}if(o=!0,[t,n]=[n,t],n.clear(),r=t.order.length,r)for(let g=0;g<r;g++){const p=t.order[g];p(A),l.has(p)&&(u.schedule(p),e())}o=!1,s&&(s=!1,u.process(A))}};return u}const Wl=["prepare","read","update","preRender","render","postRender"],XM=40;function ZM(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},s=Wl.reduce((C,h)=>(C[h]=JM(()=>n=!0),C),{}),l=C=>s[C].process(o),u=()=>{const C=performance.now();n=!1,o.delta=r?1e3/60:Math.max(Math.min(C-o.timestamp,XM),1),o.timestamp=C,o.isProcessing=!0,Wl.forEach(l),o.isProcessing=!1,n&&t&&(r=!1,e(u))},A=()=>{n=!0,r=!0,o.isProcessing||e(u)};return{schedule:Wl.reduce((C,h)=>{const m=s[h];return C[h]=(I,B=!1,v=!1)=>(n||A(),m.schedule(I,B,v)),C},{}),cancel:C=>Wl.forEach(h=>s[h].cancel(C)),state:o,steps:s}}const{schedule:vt,cancel:Jr,state:Xt,steps:pd}=ZM(typeof requestAnimationFrame<"u"?requestAnimationFrame:Dt,!0),_M={useVisualState:PB({scrapeMotionValuesFromProps:TB,createRenderState:bB,onMount:(e,t,{renderState:n,latestValues:r})=>{vt.read(()=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}}),vt.render(()=>{gf(n,r,{enableHardwareAcceleration:!1},ff(t.tagName),e.transformTemplate),wB(t,n)})}})},$M={useVisualState:PB({scrapeMotionValuesFromProps:hf,createRenderState:df})};function e3(e,{forwardMotionProps:t=!1},n,r){return{...uf(e)?_M:$M,preloadedFeatures:n,useRender:zM(t),createVisualElement:r,Component:e}}function Ur(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const SB=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function uu(e,t="page"){return{point:{x:e[t+"X"],y:e[t+"Y"]}}}const t3=e=>t=>SB(t)&&e(t,uu(t));function Yr(e,t,n,r){return Ur(e,t,t3(n),r)}const n3=(e,t)=>n=>t(e(n)),mo=(...e)=>e.reduce(n3);function RB(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const sE=RB("dragHorizontal"),aE=RB("dragVertical");function OB(e){let t=!1;if(e==="y")t=aE();else if(e==="x")t=sE();else{const n=sE(),r=aE();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function jB(){const e=OB(!0);return e?(e(),!1):!0}class xo{constructor(t){this.isMounted=!1,this.node=t}update(){}}function lE(e,t){const n="pointer"+(t?"enter":"leave"),r="onHover"+(t?"Start":"End"),o=(s,l)=>{if(s.type==="touch"||jB())return;const u=e.getProps();e.animationState&&u.whileHover&&e.animationState.setActive("whileHover",t),u[r]&&vt.update(()=>u[r](s,l))};return Yr(e.current,n,o,{passive:!e.getProps()[r]})}class r3 extends xo{mount(){this.unmount=mo(lE(this.node,!0),lE(this.node,!1))}unmount(){}}class o3 extends xo{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=mo(Ur(this.node.current,"focus",()=>this.onFocus()),Ur(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const MB=(e,t)=>t?e===t?!0:MB(e,t.parentElement):!1;function hd(e,t){if(!t)return;const n=new PointerEvent("pointer"+e);t(n,uu(n))}class i3 extends xo{constructor(){super(...arguments),this.removeStartListeners=Dt,this.removeEndListeners=Dt,this.removeAccessibleListeners=Dt,this.startPointerPress=(t,n)=>{if(this.removeEndListeners(),this.isPressing)return;const r=this.node.getProps(),s=Yr(window,"pointerup",(u,A)=>{if(!this.checkPressEnd())return;const{onTap:g,onTapCancel:p}=this.node.getProps();vt.update(()=>{MB(this.node.current,u.target)?g&&g(u,A):p&&p(u,A)})},{passive:!(r.onTap||r.onPointerUp)}),l=Yr(window,"pointercancel",(u,A)=>this.cancelPress(u,A),{passive:!(r.onTapCancel||r.onPointerCancel)});this.removeEndListeners=mo(s,l),this.startPress(t,n)},this.startAccessiblePress=()=>{const t=s=>{if(s.key!=="Enter"||this.isPressing)return;const l=u=>{u.key!=="Enter"||!this.checkPressEnd()||hd("up",(A,g)=>{const{onTap:p}=this.node.getProps();p&&vt.update(()=>p(A,g))})};this.removeEndListeners(),this.removeEndListeners=Ur(this.node.current,"keyup",l),hd("down",(u,A)=>{this.startPress(u,A)})},n=Ur(this.node.current,"keydown",t),r=()=>{this.isPressing&&hd("cancel",(s,l)=>this.cancelPress(s,l))},o=Ur(this.node.current,"blur",r);this.removeAccessibleListeners=mo(n,o)}}startPress(t,n){this.isPressing=!0;const{onTapStart:r,whileTap:o}=this.node.getProps();o&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),r&&vt.update(()=>r(t,n))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!jB()}cancelPress(t,n){if(!this.checkPressEnd())return;const{onTapCancel:r}=this.node.getProps();r&&vt.update(()=>r(t,n))}mount(){const t=this.node.getProps(),n=Yr(this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),r=Ur(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=mo(n,r)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const tg=new WeakMap,Cd=new WeakMap,s3=e=>{const t=tg.get(e.target);t&&t(e)},a3=e=>{e.forEach(s3)};function l3({root:e,...t}){const n=e||document;Cd.has(n)||Cd.set(n,{});const r=Cd.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(a3,{root:e,...t})),r[o]}function c3(e,t,n){const r=l3(t);return tg.set(e,n),r.observe(e),()=>{tg.delete(e),r.unobserve(e)}}const u3={some:0,all:1};class A3 extends xo{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:o="some",once:s}=t,l={root:n?n.current:void 0,rootMargin:r,threshold:typeof o=="number"?o:u3[o]},u=A=>{const{isIntersecting:g}=A;if(this.isInView===g||(this.isInView=g,s&&!g&&this.hasEnteredView))return;g&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",g);const{onViewportEnter:p,onViewportLeave:C}=this.node.getProps(),h=g?p:C;h&&h(A)};return c3(this.node.current,l,u)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(d3(t,n))&&this.startObserver()}unmount(){}}function d3({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const g3={inView:{Feature:A3},tap:{Feature:i3},focus:{Feature:o3},hover:{Feature:r3}};function DB(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}function f3(e){const t={};return e.values.forEach((n,r)=>t[r]=n.get()),t}function p3(e){const t={};return e.values.forEach((n,r)=>t[r]=n.getVelocity()),t}function Au(e,t,n){const r=e.getProps();return Cf(r,t,n!==void 0?n:r.custom,f3(e),p3(e))}const h3="framerAppearId",C3="data-"+pf(h3);let Oa=Dt,xr=Dt;process.env.NODE_ENV!=="production"&&(Oa=(e,t)=>{!e&&typeof console<"u"&&console.warn(t)},xr=(e,t)=>{if(!e)throw new Error(t)});const Eo=e=>e*1e3,Gr=e=>e/1e3,m3={current:!1},kB=e=>Array.isArray(e)&&typeof e[0]=="number";function FB(e){return!!(!e||typeof e=="string"&&LB[e]||kB(e)||Array.isArray(e)&&e.every(FB))}const Zs=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,LB={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Zs([0,.65,.55,1]),circOut:Zs([.55,0,1,.45]),backIn:Zs([.31,.01,.66,-.59]),backOut:Zs([.33,1.53,.69,.99])};function NB(e){if(e)return kB(e)?Zs(e):Array.isArray(e)?e.map(NB):LB[e]}function E3(e,t,n,{delay:r=0,duration:o,repeat:s=0,repeatType:l="loop",ease:u,times:A}={}){const g={[t]:n};A&&(g.offset=A);const p=NB(u);return Array.isArray(p)&&(g.easing=p),e.animate(g,{delay:r,duration:o,easing:Array.isArray(p)?"linear":p,fill:"both",iterations:s+1,direction:l==="reverse"?"alternate":"normal"})}function I3(e,{repeat:t,repeatType:n="loop"}){const r=t&&n!=="loop"&&t%2===1?0:e.length-1;return e[r]}const VB=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,B3=1e-7,v3=12;function y3(e,t,n,r,o){let s,l,u=0;do l=t+(n-t)/2,s=VB(l,r,o)-e,s>0?n=l:t=l;while(Math.abs(s)>B3&&++u<v3);return l}function ja(e,t,n,r){if(e===t&&n===r)return Dt;const o=s=>y3(s,0,1,e,n);return s=>s===0||s===1?s:VB(o(s),t,r)}const b3=ja(.42,0,1,1),Q3=ja(0,0,.58,1),HB=ja(.42,0,.58,1),x3=e=>Array.isArray(e)&&typeof e[0]!="number",WB=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,zB=e=>t=>1-e(1-t),UB=e=>1-Math.sin(Math.acos(e)),mf=zB(UB),w3=WB(mf),YB=ja(.33,1.53,.69,.99),Ef=zB(YB),T3=WB(Ef),P3=e=>(e*=2)<1?.5*Ef(e):.5*(2-Math.pow(2,-10*(e-1))),cE={linear:Dt,easeIn:b3,easeInOut:HB,easeOut:Q3,circIn:UB,circInOut:w3,circOut:mf,backIn:Ef,backInOut:T3,backOut:YB,anticipate:P3},uE=e=>{if(Array.isArray(e)){xr(e.length===4,"Cubic bezier arrays must contain four numerical values.");const[t,n,r,o]=e;return ja(t,n,r,o)}else if(typeof e=="string")return xr(cE[e]!==void 0,`Invalid easing type '${e}'`),cE[e];return e},If=(e,t)=>n=>!!(Sa(n)&&PM.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t)),GB=(e,t,n)=>r=>{if(!Sa(r))return r;const[o,s,l,u]=r.match(cu);return{[e]:parseFloat(o),[t]:parseFloat(s),[n]:parseFloat(l),alpha:u!==void 0?parseFloat(u):1}},S3=e=>Bo(0,255,e),md={...Ai,transform:e=>Math.round(S3(e))},ei={test:If("rgb","red"),parse:GB("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+md.transform(e)+", "+md.transform(t)+", "+md.transform(n)+", "+ra(na.transform(r))+")"};function R3(e){let t="",n="",r="",o="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),o=e.substring(4,5),t+=t,n+=n,r+=r,o+=o),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}}const ng={test:If("#"),parse:R3,transform:ei.transform},Ui={test:If("hsl","hue"),parse:GB("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+br.transform(ra(t))+", "+br.transform(ra(n))+", "+ra(na.transform(r))+")"},dn={test:e=>ei.test(e)||ng.test(e)||Ui.test(e),parse:e=>ei.test(e)?ei.parse(e):Ui.test(e)?Ui.parse(e):ng.parse(e),transform:e=>Sa(e)?e:e.hasOwnProperty("red")?ei.transform(e):Ui.transform(e)},St=(e,t,n)=>-n*e+n*t+e;function Ed(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function O3({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let o=0,s=0,l=0;if(!t)o=s=l=n;else{const u=n<.5?n*(1+t):n+t-n*t,A=2*n-u;o=Ed(A,u,e+1/3),s=Ed(A,u,e),l=Ed(A,u,e-1/3)}return{red:Math.round(o*255),green:Math.round(s*255),blue:Math.round(l*255),alpha:r}}const Id=(e,t,n)=>{const r=e*e;return Math.sqrt(Math.max(0,n*(t*t-r)+r))},j3=[ng,ei,Ui],M3=e=>j3.find(t=>t.test(e));function AE(e){const t=M3(e);xr(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`);let n=t.parse(e);return t===Ui&&(n=O3(n)),n}const KB=(e,t)=>{const n=AE(e),r=AE(t),o={...n};return s=>(o.red=Id(n.red,r.red,s),o.green=Id(n.green,r.green,s),o.blue=Id(n.blue,r.blue,s),o.alpha=St(n.alpha,r.alpha,s),ei.transform(o))};function D3(e){var t,n;return isNaN(e)&&Sa(e)&&(((t=e.match(cu))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(IB))===null||n===void 0?void 0:n.length)||0)>0}const qB={regex:wM,countKey:"Vars",token:"${v}",parse:Dt},JB={regex:IB,countKey:"Colors",token:"${c}",parse:dn.parse},XB={regex:cu,countKey:"Numbers",token:"${n}",parse:Ai.parse};function Bd(e,{regex:t,countKey:n,token:r,parse:o}){const s=e.tokenised.match(t);s&&(e["num"+n]=s.length,e.tokenised=e.tokenised.replace(t,r),e.values.push(...s.map(o)))}function Qc(e){const t=e.toString(),n={value:t,tokenised:t,values:[],numVars:0,numColors:0,numNumbers:0};return n.value.includes("var(--")&&Bd(n,qB),Bd(n,JB),Bd(n,XB),n}function ZB(e){return Qc(e).values}function _B(e){const{values:t,numColors:n,numVars:r,tokenised:o}=Qc(e),s=t.length;return l=>{let u=o;for(let A=0;A<s;A++)A<r?u=u.replace(qB.token,l[A]):A<r+n?u=u.replace(JB.token,dn.transform(l[A])):u=u.replace(XB.token,ra(l[A]));return u}}const k3=e=>typeof e=="number"?0:e;function F3(e){const t=ZB(e);return _B(e)(t.map(k3))}const vo={test:D3,parse:ZB,createTransformer:_B,getAnimatableNone:F3},$B=(e,t)=>n=>`${n>0?t:e}`;function ev(e,t){return typeof e=="number"?n=>St(e,t,n):dn.test(e)?KB(e,t):e.startsWith("var(")?$B(e,t):nv(e,t)}const tv=(e,t)=>{const n=[...e],r=n.length,o=e.map((s,l)=>ev(s,t[l]));return s=>{for(let l=0;l<r;l++)n[l]=o[l](s);return n}},L3=(e,t)=>{const n={...e,...t},r={};for(const o in n)e[o]!==void 0&&t[o]!==void 0&&(r[o]=ev(e[o],t[o]));return o=>{for(const s in r)n[s]=r[s](o);return n}},nv=(e,t)=>{const n=vo.createTransformer(t),r=Qc(e),o=Qc(t);return r.numVars===o.numVars&&r.numColors===o.numColors&&r.numNumbers>=o.numNumbers?mo(tv(r.values,o.values),n):(Oa(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),$B(e,t))},ha=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},dE=(e,t)=>n=>St(e,t,n);function N3(e){return typeof e=="number"?dE:typeof e=="string"?dn.test(e)?KB:nv:Array.isArray(e)?tv:typeof e=="object"?L3:dE}function V3(e,t,n){const r=[],o=n||N3(e[0]),s=e.length-1;for(let l=0;l<s;l++){let u=o(e[l],e[l+1]);if(t){const A=Array.isArray(t)?t[l]||Dt:t;u=mo(A,u)}r.push(u)}return r}function rv(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const s=e.length;if(xr(s===t.length,"Both input and output ranges must be the same length"),s===1)return()=>t[0];e[0]>e[s-1]&&(e=[...e].reverse(),t=[...t].reverse());const l=V3(t,r,o),u=l.length,A=g=>{let p=0;if(u>1)for(;p<e.length-2&&!(g<e[p+1]);p++);const C=ha(e[p],e[p+1],g);return l[p](C)};return n?g=>A(Bo(e[0],e[s-1],g)):A}function H3(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=ha(0,t,r);e.push(St(n,1,o))}}function W3(e){const t=[0];return H3(t,e.length-1),t}function z3(e,t){return e.map(n=>n*t)}function U3(e,t){return e.map(()=>t||HB).splice(0,e.length-1)}function xc({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=x3(r)?r.map(uE):uE(r),s={done:!1,value:t[0]},l=z3(n&&n.length===t.length?n:W3(t),e),u=rv(l,t,{ease:Array.isArray(o)?o:U3(t,o)});return{calculatedDuration:e,next:A=>(s.value=u(A),s.done=A>=e,s)}}function ov(e,t){return t?e*(1e3/t):0}const Y3=5;function iv(e,t,n){const r=Math.max(t-Y3,0);return ov(n-e(r),t-r)}const vd=.001,G3=.01,gE=10,K3=.05,q3=1;function J3({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let o,s;Oa(e<=Eo(gE),"Spring duration must be 10 seconds or less");let l=1-t;l=Bo(K3,q3,l),e=Bo(G3,gE,Gr(e)),l<1?(o=g=>{const p=g*l,C=p*e,h=p-n,m=rg(g,l),I=Math.exp(-C);return vd-h/m*I},s=g=>{const C=g*l*e,h=C*n+n,m=Math.pow(l,2)*Math.pow(g,2)*e,I=Math.exp(-C),B=rg(Math.pow(g,2),l);return(-o(g)+vd>0?-1:1)*((h-m)*I)/B}):(o=g=>{const p=Math.exp(-g*e),C=(g-n)*e+1;return-vd+p*C},s=g=>{const p=Math.exp(-g*e),C=(n-g)*(e*e);return p*C});const u=5/e,A=Z3(o,s,u);if(e=Eo(e),isNaN(A))return{stiffness:100,damping:10,duration:e};{const g=Math.pow(A,2)*r;return{stiffness:g,damping:l*2*Math.sqrt(r*g),duration:e}}}const X3=12;function Z3(e,t,n){let r=n;for(let o=1;o<X3;o++)r=r-e(r)/t(r);return r}function rg(e,t){return e*Math.sqrt(1-t*t)}const _3=["duration","bounce"],$3=["stiffness","damping","mass"];function fE(e,t){return t.some(n=>e[n]!==void 0)}function eD(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!fE(e,$3)&&fE(e,_3)){const n=J3(e);t={...t,...n,velocity:0,mass:1},t.isResolvedFromDuration=!0}return t}function sv({keyframes:e,restDelta:t,restSpeed:n,...r}){const o=e[0],s=e[e.length-1],l={done:!1,value:o},{stiffness:u,damping:A,mass:g,velocity:p,duration:C,isResolvedFromDuration:h}=eD(r),m=p?-Gr(p):0,I=A/(2*Math.sqrt(u*g)),B=s-o,v=Gr(Math.sqrt(u/g)),O=Math.abs(B)<5;n||(n=O?.01:2),t||(t=O?.005:.5);let j;if(I<1){const x=rg(v,I);j=S=>{const P=Math.exp(-I*v*S);return s-P*((m+I*v*B)/x*Math.sin(x*S)+B*Math.cos(x*S))}}else if(I===1)j=x=>s-Math.exp(-v*x)*(B+(m+v*B)*x);else{const x=v*Math.sqrt(I*I-1);j=S=>{const P=Math.exp(-I*v*S),L=Math.min(x*S,300);return s-P*((m+I*v*B)*Math.sinh(L)+x*B*Math.cosh(L))/x}}return{calculatedDuration:h&&C||null,next:x=>{const S=j(x);if(h)l.done=x>=C;else{let P=m;x!==0&&(I<1?P=iv(j,x,S):P=0);const L=Math.abs(P)<=n,k=Math.abs(s-S)<=t;l.done=L&&k}return l.value=l.done?s:S,l}}}function pE({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:s=500,modifyTarget:l,min:u,max:A,restDelta:g=.5,restSpeed:p}){const C=e[0],h={done:!1,value:C},m=q=>u!==void 0&&q<u||A!==void 0&&q>A,I=q=>u===void 0?A:A===void 0||Math.abs(u-q)<Math.abs(A-q)?u:A;let B=n*t;const v=C+B,O=l===void 0?v:l(v);O!==v&&(B=O-C);const j=q=>-B*Math.exp(-q/r),x=q=>O+j(q),S=q=>{const J=j(q),U=x(q);h.done=Math.abs(J)<=g,h.value=h.done?O:U};let P,L;const k=q=>{m(h.value)&&(P=q,L=sv({keyframes:[h.value,I(h.value)],velocity:iv(x,q,h.value),damping:o,stiffness:s,restDelta:g,restSpeed:p}))};return k(0),{calculatedDuration:null,next:q=>{let J=!1;return!L&&P===void 0&&(J=!0,S(q),k(q)),P!==void 0&&q>P?L.next(q-P):(!J&&S(q),h)}}}const tD=e=>{const t=({timestamp:n})=>e(n);return{start:()=>vt.update(t,!0),stop:()=>Jr(t),now:()=>Xt.isProcessing?Xt.timestamp:performance.now()}},hE=2e4;function CE(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<hE;)t+=n,r=e.next(t);return t>=hE?1/0:t}const nD={decay:pE,inertia:pE,tween:xc,keyframes:xc,spring:sv};function wc({autoplay:e=!0,delay:t=0,driver:n=tD,keyframes:r,type:o="keyframes",repeat:s=0,repeatDelay:l=0,repeatType:u="loop",onPlay:A,onStop:g,onComplete:p,onUpdate:C,...h}){let m=1,I=!1,B,v;const O=()=>{v=new Promise(X=>{B=X})};O();let j;const x=nD[o]||xc;let S;x!==xc&&typeof r[0]!="number"&&(S=rv([0,100],r,{clamp:!1}),r=[0,100]);const P=x({...h,keyframes:r});let L;u==="mirror"&&(L=x({...h,keyframes:[...r].reverse(),velocity:-(h.velocity||0)}));let k="idle",q=null,J=null,U=null;P.calculatedDuration===null&&s&&(P.calculatedDuration=CE(P));const{calculatedDuration:_}=P;let le=1/0,ie=1/0;_!==null&&(le=_+l,ie=le*(s+1)-l);let Z=0;const K=X=>{if(J===null)return;m>0&&(J=Math.min(J,X)),m<0&&(J=Math.min(X-ie/m,J)),q!==null?Z=q:Z=Math.round(X-J)*m;const ge=Z-t*(m>=0?1:-1),pe=m>=0?ge<0:ge>ie;Z=Math.max(ge,0),k==="finished"&&q===null&&(Z=ie);let ce=Z,fe=P;if(s){const Ce=Z/le;let Ie=Math.floor(Ce),Qe=Ce%1;!Qe&&Ce>=1&&(Qe=1),Qe===1&&Ie--,Ie=Math.min(Ie,s+1);const ae=!!(Ie%2);ae&&(u==="reverse"?(Qe=1-Qe,l&&(Qe-=l/le)):u==="mirror"&&(fe=L));let Ne=Bo(0,1,Qe);Z>ie&&(Ne=u==="reverse"&&ae?1:0),ce=Ne*le}const he=pe?{done:!1,value:r[0]}:fe.next(ce);S&&(he.value=S(he.value));let{done:Be}=he;!pe&&_!==null&&(Be=m>=0?Z>=ie:Z<=0);const me=q===null&&(k==="finished"||k==="running"&&Be);return C&&C(he.value),me&&F(),he},V=()=>{j&&j.stop(),j=void 0},G=()=>{k="idle",V(),B(),O(),J=U=null},F=()=>{k="finished",p&&p(),V(),B()},$=()=>{if(I)return;j||(j=n(K));const X=j.now();A&&A(),q!==null?J=X-q:(!J||k==="finished")&&(J=X),k==="finished"&&O(),U=J,q=null,k="running",j.start()};e&&$();const H={then(X,ge){return v.then(X,ge)},get time(){return Gr(Z)},set time(X){X=Eo(X),Z=X,q!==null||!j||m===0?q=X:J=j.now()-X/m},get duration(){const X=P.calculatedDuration===null?CE(P):P.calculatedDuration;return Gr(X)},get speed(){return m},set speed(X){X===m||!j||(m=X,H.time=Gr(Z))},get state(){return k},play:$,pause:()=>{k="paused",q=Z},stop:()=>{I=!0,k!=="idle"&&(k="idle",g&&g(),G())},cancel:()=>{U!==null&&K(U),G()},complete:()=>{k="finished"},sample:X=>(J=0,K(X))};return H}function rD(e){let t;return()=>(t===void 0&&(t=e()),t)}const oD=rD(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),iD=new Set(["opacity","clipPath","filter","transform","backgroundColor"]),zl=10,sD=2e4,aD=(e,t)=>t.type==="spring"||e==="backgroundColor"||!FB(t.ease);function lD(e,t,{onUpdate:n,onComplete:r,...o}){if(!(oD()&&iD.has(t)&&!o.repeatDelay&&o.repeatType!=="mirror"&&o.damping!==0&&o.type!=="inertia"))return!1;let l=!1,u,A;const g=()=>{A=new Promise(j=>{u=j})};g();let{keyframes:p,duration:C=300,ease:h,times:m}=o;if(aD(t,o)){const j=wc({...o,repeat:0,delay:0});let x={done:!1,value:p[0]};const S=[];let P=0;for(;!x.done&&P<sD;)x=j.sample(P),S.push(x.value),P+=zl;m=void 0,p=S,C=P-zl,h="linear"}const I=E3(e.owner.current,t,p,{...o,duration:C,ease:h,times:m});o.syncStart&&(I.startTime=Xt.isProcessing?Xt.timestamp:document.timeline?document.timeline.currentTime:performance.now());const B=()=>I.cancel(),v=()=>{vt.update(B),u(),g()};return I.onfinish=()=>{e.set(I3(p,o)),r&&r(),v()},{then(j,x){return A.then(j,x)},attachTimeline(j){return I.timeline=j,I.onfinish=null,Dt},get time(){return Gr(I.currentTime||0)},set time(j){I.currentTime=Eo(j)},get speed(){return I.playbackRate},set speed(j){I.playbackRate=j},get duration(){return Gr(C)},play:()=>{l||(I.play(),Jr(B))},pause:()=>I.pause(),stop:()=>{if(l=!0,I.playState==="idle")return;const{currentTime:j}=I;if(j){const x=wc({...o,autoplay:!1});e.setWithVelocity(x.sample(j-zl).value,x.sample(j).value,zl)}v()},complete:()=>I.finish(),cancel:v}}function cD({keyframes:e,delay:t,onUpdate:n,onComplete:r}){const o=()=>(n&&n(e[e.length-1]),r&&r(),{time:0,speed:1,duration:0,play:Dt,pause:Dt,stop:Dt,then:s=>(s(),Promise.resolve()),cancel:Dt,complete:Dt});return t?wc({keyframes:[0,1],duration:0,delay:t,onComplete:o}):o()}const uD={type:"spring",stiffness:500,damping:25,restSpeed:10},AD=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),dD={type:"keyframes",duration:.8},gD={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},fD=(e,{keyframes:t})=>t.length>2?dD:ui.has(e)?e.startsWith("scale")?AD(t[1]):uD:gD,og=(e,t)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(vo.test(t)||t==="0")&&!t.startsWith("url(")),pD=new Set(["brightness","contrast","saturate","opacity"]);function hD(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(cu)||[];if(!r)return e;const o=n.replace(r,"");let s=pD.has(t)?1:0;return r!==n&&(s*=100),t+"("+s+o+")"}const CD=/([a-z-]*)\(.*?\)/g,ig={...vo,getAnimatableNone:e=>{const t=e.match(CD);return t?t.map(hD).join(" "):e}},mD={...BB,color:dn,backgroundColor:dn,outlineColor:dn,fill:dn,stroke:dn,borderColor:dn,borderTopColor:dn,borderRightColor:dn,borderBottomColor:dn,borderLeftColor:dn,filter:ig,WebkitFilter:ig},Bf=e=>mD[e];function av(e,t){let n=Bf(e);return n!==ig&&(n=vo),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const lv=e=>/^0[^.\s]+$/.test(e);function ED(e){if(typeof e=="number")return e===0;if(e!==null)return e==="none"||e==="0"||lv(e)}function ID(e,t,n,r){const o=og(t,n);let s;Array.isArray(n)?s=[...n]:s=[null,n];const l=r.from!==void 0?r.from:e.get();let u;const A=[];for(let g=0;g<s.length;g++)s[g]===null&&(s[g]=g===0?l:s[g-1]),ED(s[g])&&A.push(g),typeof s[g]=="string"&&s[g]!=="none"&&s[g]!=="0"&&(u=s[g]);if(o&&A.length&&u)for(let g=0;g<A.length;g++){const p=A[g];s[p]=av(t,u)}return s}function BD({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:o,repeat:s,repeatType:l,repeatDelay:u,from:A,elapsed:g,...p}){return!!Object.keys(p).length}function cv(e,t){return e[t]||e.default||e}const vf=(e,t,n,r={})=>o=>{const s=cv(r,e)||{},l=s.delay||r.delay||0;let{elapsed:u=0}=r;u=u-Eo(l);const A=ID(t,e,n,s),g=A[0],p=A[A.length-1],C=og(e,g),h=og(e,p);Oa(C===h,`You are trying to animate ${e} from "${g}" to "${p}". ${g} is not an animatable value - to enable this animation set ${g} to a value animatable to ${p} via the \`style\` property.`);let m={keyframes:A,velocity:t.getVelocity(),ease:"easeOut",...s,delay:-u,onUpdate:I=>{t.set(I),s.onUpdate&&s.onUpdate(I)},onComplete:()=>{o(),s.onComplete&&s.onComplete()}};if(BD(s)||(m={...m,...fD(e,m)}),m.duration&&(m.duration=Eo(m.duration)),m.repeatDelay&&(m.repeatDelay=Eo(m.repeatDelay)),!C||!h||m3.current||s.type===!1)return cD(m);if(t.owner&&t.owner.current instanceof HTMLElement&&!t.owner.getProps().onUpdate){const I=lD(t,e,m);if(I)return I}return wc(m)};function Tc(e){return!!(vn(e)&&e.add)}const uv=e=>/^\-?\d*\.?\d+$/.test(e);function yf(e,t){e.indexOf(t)===-1&&e.push(t)}function bf(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class Qf{constructor(){this.subscriptions=[]}add(t){return yf(this.subscriptions,t),()=>bf(this.subscriptions,t)}notify(t,n,r){const o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](t,n,r);else for(let s=0;s<o;s++){const l=this.subscriptions[s];l&&l(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const mE=new Set;function xf(e,t,n){e||mE.has(t)||(console.warn(t),n&&console.warn(n),mE.add(t))}const vD=e=>!isNaN(parseFloat(e));class yD{constructor(t,n={}){this.version="10.16.4",this.timeDelta=0,this.lastUpdated=0,this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(r,o=!0)=>{this.prev=this.current,this.current=r;const{delta:s,timestamp:l}=Xt;this.lastUpdated!==l&&(this.timeDelta=s,this.lastUpdated=l,vt.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.events.change&&this.events.change.notify(this.current),this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()),o&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.scheduleVelocityCheck=()=>vt.postRender(this.velocityCheck),this.velocityCheck=({timestamp:r})=>{r!==this.lastUpdated&&(this.prev=this.current,this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=t,this.canTrackVelocity=vD(this.current),this.owner=n.owner}onChange(t){return process.env.NODE_ENV!=="production"&&xf(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new Qf);const r=this.events[t].add(n);return t==="change"?()=>{r(),vt.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=t,this.timeDelta=r}jump(t){this.updateAndNotify(t),this.prev=t,this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?ov(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function rs(e,t){return new yD(e,t)}const Av=e=>t=>t.test(e),bD={test:e=>e==="auto",parse:e=>e},dv=[Ai,Me,br,Ao,RM,SM,bD],Us=e=>dv.find(Av(e)),QD=[...dv,dn,vo],xD=e=>QD.find(Av(e));function wD(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,rs(n))}function TD(e,t){const n=Au(e,t);let{transitionEnd:r={},transition:o={},...s}=n?e.makeTargetAnimatable(n,!1):{};s={...s,...r};for(const l in s){const u=GM(s[l]);wD(e,l,u)}}function PD(e,t,n){var r,o;const s=Object.keys(t).filter(u=>!e.hasValue(u)),l=s.length;if(l)for(let u=0;u<l;u++){const A=s[u],g=t[A];let p=null;Array.isArray(g)&&(p=g[0]),p===null&&(p=(o=(r=n[A])!==null&&r!==void 0?r:e.readValue(A))!==null&&o!==void 0?o:t[A]),p!=null&&(typeof p=="string"&&(uv(p)||lv(p))?p=parseFloat(p):!xD(p)&&vo.test(g)&&(p=av(A,g)),e.addValue(A,rs(p,{owner:e})),n[A]===void 0&&(n[A]=p),p!==null&&e.setBaseTarget(A,p))}}function SD(e,t){return t?(t[e]||t.default||t).from:void 0}function RD(e,t,n){const r={};for(const o in e){const s=SD(o,t);if(s!==void 0)r[o]=s;else{const l=n.getValue(o);l&&(r[o]=l.get())}}return r}function OD({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function gv(e,t,{delay:n=0,transitionOverride:r,type:o}={}){let{transition:s=e.getDefaultTransition(),transitionEnd:l,...u}=e.makeTargetAnimatable(t);const A=e.getValue("willChange");r&&(s=r);const g=[],p=o&&e.animationState&&e.animationState.getState()[o];for(const C in u){const h=e.getValue(C),m=u[C];if(!h||m===void 0||p&&OD(p,C))continue;const I={delay:n,elapsed:0,...s};if(window.HandoffAppearAnimations&&!h.hasAnimated){const v=e.getProps()[C3];v&&(I.elapsed=window.HandoffAppearAnimations(v,C,h,vt),I.syncStart=!0)}h.start(vf(C,h,m,e.shouldReduceMotion&&ui.has(C)?{type:!1}:I));const B=h.animation;Tc(A)&&(A.add(C),B.then(()=>A.remove(C))),g.push(B)}return l&&Promise.all(g).then(()=>{l&&TD(e,l)}),g}function sg(e,t,n={}){const r=Au(e,t,n.custom);let{transition:o=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(o=n.transitionOverride);const s=r?()=>Promise.all(gv(e,r,n)):()=>Promise.resolve(),l=e.variantChildren&&e.variantChildren.size?(A=0)=>{const{delayChildren:g=0,staggerChildren:p,staggerDirection:C}=o;return jD(e,t,g+A,p,C,n)}:()=>Promise.resolve(),{when:u}=o;if(u){const[A,g]=u==="beforeChildren"?[s,l]:[l,s];return A().then(()=>g())}else return Promise.all([s(),l(n.delay)])}function jD(e,t,n=0,r=0,o=1,s){const l=[],u=(e.variantChildren.size-1)*r,A=o===1?(g=0)=>g*r:(g=0)=>u-g*r;return Array.from(e.variantChildren).sort(MD).forEach((g,p)=>{g.notify("AnimationStart",t),l.push(sg(g,t,{...s,delay:n+A(p)}).then(()=>g.notify("AnimationComplete",t)))}),Promise.all(l)}function MD(e,t){return e.sortNodePosition(t)}function DD(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const o=t.map(s=>sg(e,s,n));r=Promise.all(o)}else if(typeof t=="string")r=sg(e,t,n);else{const o=typeof t=="function"?Au(e,t,n.custom):t;r=Promise.all(gv(e,o,n))}return r.then(()=>e.notify("AnimationComplete",t))}const kD=[...lf].reverse(),FD=lf.length;function LD(e){return t=>Promise.all(t.map(({animation:n,options:r})=>DD(e,n,r)))}function ND(e){let t=LD(e);const n=HD();let r=!0;const o=(A,g)=>{const p=Au(e,g);if(p){const{transition:C,transitionEnd:h,...m}=p;A={...A,...m,...h}}return A};function s(A){t=A(e)}function l(A,g){const p=e.getProps(),C=e.getVariantContext(!0)||{},h=[],m=new Set;let I={},B=1/0;for(let O=0;O<FD;O++){const j=kD[O],x=n[j],S=p[j]!==void 0?p[j]:C[j],P=fa(S),L=j===g?x.isActive:null;L===!1&&(B=O);let k=S===C[j]&&S!==p[j]&&P;if(k&&r&&e.manuallyAnimateOnMount&&(k=!1),x.protectedKeys={...I},!x.isActive&&L===null||!S&&!x.prevProp||au(S)||typeof S=="boolean")continue;const q=VD(x.prevProp,S);let J=q||j===g&&x.isActive&&!k&&P||O>B&&P;const U=Array.isArray(S)?S:[S];let _=U.reduce(o,{});L===!1&&(_={});const{prevResolvedValues:le={}}=x,ie={...le,..._},Z=K=>{J=!0,m.delete(K),x.needsAnimating[K]=!0};for(const K in ie){const V=_[K],G=le[K];I.hasOwnProperty(K)||(V!==G?bc(V)&&bc(G)?!DB(V,G)||q?Z(K):x.protectedKeys[K]=!0:V!==void 0?Z(K):m.add(K):V!==void 0&&m.has(K)?Z(K):x.protectedKeys[K]=!0)}x.prevProp=S,x.prevResolvedValues=_,x.isActive&&(I={...I,..._}),r&&e.blockInitialAnimation&&(J=!1),J&&!k&&h.push(...U.map(K=>({animation:K,options:{type:j,...A}})))}if(m.size){const O={};m.forEach(j=>{const x=e.getBaseTarget(j);x!==void 0&&(O[j]=x)}),h.push({animation:O})}let v=!!h.length;return r&&p.initial===!1&&!e.manuallyAnimateOnMount&&(v=!1),r=!1,v?t(h):Promise.resolve()}function u(A,g,p){var C;if(n[A].isActive===g)return Promise.resolve();(C=e.variantChildren)===null||C===void 0||C.forEach(m=>{var I;return(I=m.animationState)===null||I===void 0?void 0:I.setActive(A,g)}),n[A].isActive=g;const h=l(p,A);for(const m in n)n[m].protectedKeys={};return h}return{animateChanges:l,setActive:u,setAnimateFunction:s,getState:()=>n}}function VD(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!DB(t,e):!1}function Uo(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function HD(){return{animate:Uo(!0),whileInView:Uo(),whileHover:Uo(),whileTap:Uo(),whileDrag:Uo(),whileFocus:Uo(),exit:Uo()}}class WD extends xo{constructor(t){super(t),t.animationState||(t.animationState=ND(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();this.unmount(),au(t)&&(this.unmount=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){}}let zD=0;class UD extends xo{constructor(){super(...arguments),this.id=zD++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n,custom:r}=this.node.presenceContext,{isPresent:o}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===o)return;const s=this.node.animationState.setActive("exit",!t,{custom:r??this.node.getProps().custom});n&&!t&&s.then(()=>n(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}const YD={animation:{Feature:WD},exit:{Feature:UD}},EE=(e,t)=>Math.abs(e-t);function GD(e,t){const n=EE(e.x,t.x),r=EE(e.y,t.y);return Math.sqrt(n**2+r**2)}class fv{constructor(t,n,{transformPagePoint:r}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const g=bd(this.lastMoveEventInfo,this.history),p=this.startEvent!==null,C=GD(g.offset,{x:0,y:0})>=3;if(!p&&!C)return;const{point:h}=g,{timestamp:m}=Xt;this.history.push({...h,timestamp:m});const{onStart:I,onMove:B}=this.handlers;p||(I&&I(this.lastMoveEvent,g),this.startEvent=this.lastMoveEvent),B&&B(this.lastMoveEvent,g)},this.handlePointerMove=(g,p)=>{this.lastMoveEvent=g,this.lastMoveEventInfo=yd(p,this.transformPagePoint),vt.update(this.updatePoint,!0)},this.handlePointerUp=(g,p)=>{if(this.end(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const{onEnd:C,onSessionEnd:h}=this.handlers,m=bd(g.type==="pointercancel"?this.lastMoveEventInfo:yd(p,this.transformPagePoint),this.history);this.startEvent&&C&&C(g,m),h&&h(g,m)},!SB(t))return;this.handlers=n,this.transformPagePoint=r;const o=uu(t),s=yd(o,this.transformPagePoint),{point:l}=s,{timestamp:u}=Xt;this.history=[{...l,timestamp:u}];const{onSessionStart:A}=n;A&&A(t,bd(s,this.history)),this.removeListeners=mo(Yr(window,"pointermove",this.handlePointerMove),Yr(window,"pointerup",this.handlePointerUp),Yr(window,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Jr(this.updatePoint)}}function yd(e,t){return t?{point:t(e.point)}:e}function IE(e,t){return{x:e.x-t.x,y:e.y-t.y}}function bd({point:e},t){return{point:e,delta:IE(e,pv(t)),offset:IE(e,KD(t)),velocity:qD(t,.1)}}function KD(e){return e[0]}function pv(e){return e[e.length-1]}function qD(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=pv(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>Eo(t)));)n--;if(!r)return{x:0,y:0};const s=Gr(o.timestamp-r.timestamp);if(s===0)return{x:0,y:0};const l={x:(o.x-r.x)/s,y:(o.y-r.y)/s};return l.x===1/0&&(l.x=0),l.y===1/0&&(l.y=0),l}function kn(e){return e.max-e.min}function ag(e,t=0,n=.01){return Math.abs(e-t)<=n}function BE(e,t,n,r=.5){e.origin=r,e.originPoint=St(t.min,t.max,e.origin),e.scale=kn(n)/kn(t),(ag(e.scale,1,1e-4)||isNaN(e.scale))&&(e.scale=1),e.translate=St(n.min,n.max,e.origin)-e.originPoint,(ag(e.translate)||isNaN(e.translate))&&(e.translate=0)}function oa(e,t,n,r){BE(e.x,t.x,n.x,r?r.originX:void 0),BE(e.y,t.y,n.y,r?r.originY:void 0)}function vE(e,t,n){e.min=n.min+t.min,e.max=e.min+kn(t)}function JD(e,t,n){vE(e.x,t.x,n.x),vE(e.y,t.y,n.y)}function yE(e,t,n){e.min=t.min-n.min,e.max=e.min+kn(t)}function ia(e,t,n){yE(e.x,t.x,n.x),yE(e.y,t.y,n.y)}function XD(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?St(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?St(n,e,r.max):Math.min(e,n)),e}function bE(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function ZD(e,{top:t,left:n,bottom:r,right:o}){return{x:bE(e.x,n,o),y:bE(e.y,t,r)}}function QE(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function _D(e,t){return{x:QE(e.x,t.x),y:QE(e.y,t.y)}}function $D(e,t){let n=.5;const r=kn(e),o=kn(t);return o>r?n=ha(t.min,t.max-r,e.min):r>o&&(n=ha(e.min,e.max-o,t.min)),Bo(0,1,n)}function ek(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const lg=.35;function tk(e=lg){return e===!1?e=0:e===!0&&(e=lg),{x:xE(e,"left","right"),y:xE(e,"top","bottom")}}function xE(e,t,n){return{min:wE(e,t),max:wE(e,n)}}function wE(e,t){return typeof e=="number"?e:e[t]||0}const TE=()=>({translate:0,scale:1,origin:0,originPoint:0}),Yi=()=>({x:TE(),y:TE()}),PE=()=>({min:0,max:0}),zt=()=>({x:PE(),y:PE()});function Br(e){return[e("x"),e("y")]}function hv({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function nk({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function rk(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Qd(e){return e===void 0||e===1}function cg({scale:e,scaleX:t,scaleY:n}){return!Qd(e)||!Qd(t)||!Qd(n)}function qo(e){return cg(e)||Cv(e)||e.z||e.rotate||e.rotateX||e.rotateY}function Cv(e){return SE(e.x)||SE(e.y)}function SE(e){return e&&e!=="0%"}function Pc(e,t,n){const r=e-n,o=t*r;return n+o}function RE(e,t,n,r,o){return o!==void 0&&(e=Pc(e,o,r)),Pc(e,n,r)+t}function ug(e,t=0,n=1,r,o){e.min=RE(e.min,t,n,r,o),e.max=RE(e.max,t,n,r,o)}function mv(e,{x:t,y:n}){ug(e.x,t.translate,t.scale,t.originPoint),ug(e.y,n.translate,n.scale,n.originPoint)}function ok(e,t,n,r=!1){const o=n.length;if(!o)return;t.x=t.y=1;let s,l;for(let u=0;u<o;u++){s=n[u],l=s.projectionDelta;const A=s.instance;A&&A.style&&A.style.display==="contents"||(r&&s.options.layoutScroll&&s.scroll&&s!==s.root&&Gi(e,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),l&&(t.x*=l.x.scale,t.y*=l.y.scale,mv(e,l)),r&&qo(s.latestValues)&&Gi(e,s.latestValues))}t.x=OE(t.x),t.y=OE(t.y)}function OE(e){return Number.isInteger(e)||e>1.0000000000001||e<.999999999999?e:1}function go(e,t){e.min=e.min+t,e.max=e.max+t}function jE(e,t,[n,r,o]){const s=t[o]!==void 0?t[o]:.5,l=St(e.min,e.max,s);ug(e,t[n],t[r],l,t.scale)}const ik=["x","scaleX","originX"],sk=["y","scaleY","originY"];function Gi(e,t){jE(e.x,t,ik),jE(e.y,t,sk)}function Ev(e,t){return hv(rk(e.getBoundingClientRect(),t))}function ak(e,t,n){const r=Ev(e,n),{scroll:o}=t;return o&&(go(r.x,o.offset.x),go(r.y,o.offset.y)),r}const lk=new WeakMap;class ck{constructor(t){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=zt(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const o=A=>{this.stopAnimation(),n&&this.snapToCursor(uu(A,"page").point)},s=(A,g)=>{const{drag:p,dragPropagation:C,onDragStart:h}=this.getProps();if(p&&!C&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=OB(p),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Br(I=>{let B=this.getAxisMotionValue(I).get()||0;if(br.test(B)){const{projection:v}=this.visualElement;if(v&&v.layout){const O=v.layout.layoutBox[I];O&&(B=kn(O)*(parseFloat(B)/100))}}this.originPoint[I]=B}),h&&vt.update(()=>h(A,g),!1,!0);const{animationState:m}=this.visualElement;m&&m.setActive("whileDrag",!0)},l=(A,g)=>{const{dragPropagation:p,dragDirectionLock:C,onDirectionLock:h,onDrag:m}=this.getProps();if(!p&&!this.openGlobalLock)return;const{offset:I}=g;if(C&&this.currentDirection===null){this.currentDirection=uk(I),this.currentDirection!==null&&h&&h(this.currentDirection);return}this.updateAxis("x",g.point,I),this.updateAxis("y",g.point,I),this.visualElement.render(),m&&m(A,g)},u=(A,g)=>this.stop(A,g);this.panSession=new fv(t,{onSessionStart:o,onStart:s,onMove:l,onSessionEnd:u},{transformPagePoint:this.visualElement.getTransformPagePoint()})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:o}=n;this.startAnimation(o);const{onDragEnd:s}=this.getProps();s&&vt.update(()=>s(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:o}=this.getProps();if(!r||!Ul(t,o,this.currentDirection))return;const s=this.getAxisMotionValue(t);let l=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(l=XD(l,this.constraints[t],this.elastic[t])),s.set(l)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),{layout:r}=this.visualElement.projection||{},o=this.constraints;t&&zi(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=ZD(r.layoutBox,t):this.constraints=!1,this.elastic=tk(n),o!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&Br(s=>{this.getAxisMotionValue(s)&&(this.constraints[s]=ek(r.layoutBox[s],this.constraints[s]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!zi(t))return!1;const r=t.current;xr(r!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");const{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const s=ak(r,o.root,this.visualElement.getTransformPagePoint());let l=_D(o.layout.layoutBox,s);if(n){const u=n(nk(l));this.hasMutatedConstraints=!!u,u&&(l=hv(u))}return l}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:o,dragTransition:s,dragSnapToOrigin:l,onDragTransitionEnd:u}=this.getProps(),A=this.constraints||{},g=Br(p=>{if(!Ul(p,n,this.currentDirection))return;let C=A&&A[p]||{};l&&(C={min:0,max:0});const h=o?200:1e6,m=o?40:1e7,I={type:"inertia",velocity:r?t[p]:0,bounceStiffness:h,bounceDamping:m,timeConstant:750,restDelta:1,restSpeed:10,...s,...C};return this.startAxisValueAnimation(p,I)});return Promise.all(g).then(u)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return r.start(vf(t,r,0,n))}stopAnimation(){Br(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const n="_drag"+t.toUpperCase(),r=this.visualElement.getProps(),o=r[n];return o||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){Br(n=>{const{drag:r}=this.getProps();if(!Ul(n,r,this.currentDirection))return;const{projection:o}=this.visualElement,s=this.getAxisMotionValue(n);if(o&&o.layout){const{min:l,max:u}=o.layout.layoutBox[n];s.set(t[n]-St(l,u,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!zi(n)||!r||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};Br(l=>{const u=this.getAxisMotionValue(l);if(u){const A=u.get();o[l]=$D({min:A,max:A},this.constraints[l])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),Br(l=>{if(!Ul(l,t,null))return;const u=this.getAxisMotionValue(l),{min:A,max:g}=this.constraints[l];u.set(St(A,g,o[l]))})}addListeners(){if(!this.visualElement.current)return;lk.set(this.visualElement,this);const t=this.visualElement.current,n=Yr(t,"pointerdown",A=>{const{drag:g,dragListener:p=!0}=this.getProps();g&&p&&this.start(A)}),r=()=>{const{dragConstraints:A}=this.getProps();zi(A)&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,s=o.addEventListener("measure",r);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),r();const l=Ur(window,"resize",()=>this.scalePositionWithinConstraints()),u=o.addEventListener("didUpdate",({delta:A,hasLayoutChanged:g})=>{this.isDragging&&g&&(Br(p=>{const C=this.getAxisMotionValue(p);C&&(this.originPoint[p]+=A[p].translate,C.set(C.get()+A[p].translate))}),this.visualElement.render())});return()=>{l(),n(),s(),u&&u()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:o=!1,dragConstraints:s=!1,dragElastic:l=lg,dragMomentum:u=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:o,dragConstraints:s,dragElastic:l,dragMomentum:u}}}function Ul(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function uk(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class Ak extends xo{constructor(t){super(t),this.removeGroupControls=Dt,this.removeListeners=Dt,this.controls=new ck(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Dt}unmount(){this.removeGroupControls(),this.removeListeners()}}const ME=e=>(t,n)=>{e&&vt.update(()=>e(t,n))};class dk extends xo{constructor(){super(...arguments),this.removePointerDownListener=Dt}onPointerDown(t){this.session=new fv(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint()})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:ME(t),onStart:ME(n),onMove:r,onEnd:(s,l)=>{delete this.session,o&&vt.update(()=>o(s,l))}}}mount(){this.removePointerDownListener=Yr(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}function gk(){const e=w.useContext(af);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,o=w.useId();return w.useEffect(()=>r(o),[]),!t&&n?[!1,()=>n&&n(o)]:[!0]}const sc={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function DE(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Ys={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(Me.test(e))e=parseFloat(e);else return e;const n=DE(e,t.target.x),r=DE(e,t.target.y);return`${n}% ${r}%`}},fk={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=vo.parse(e);if(o.length>5)return r;const s=vo.createTransformer(e),l=typeof o[0]!="number"?1:0,u=n.x.scale*t.x,A=n.y.scale*t.y;o[0+l]/=u,o[1+l]/=A;const g=St(u,A,.5);return typeof o[2+l]=="number"&&(o[2+l]/=g),typeof o[3+l]=="number"&&(o[3+l]/=g),s(o)}};class pk extends w.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:s}=t;yM(hk),s&&(n.group&&n.group.add(s),r&&r.register&&o&&r.register(s),s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),sc.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:o,isPresent:s}=this.props,l=r.projection;return l&&(l.isPresent=s,o||t.layoutDependency!==n||n===void 0?l.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?l.promote():l.relegate()||vt.postRender(()=>{const u=l.getStack();(!u||!u.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),queueMicrotask(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:o}=t;o&&(o.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(o),r&&r.deregister&&r.deregister(o))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function Iv(e){const[t,n]=gk(),r=w.useContext(pB);return w.createElement(pk,{...e,layoutGroup:r,switchLayoutGroup:w.useContext(hB),isPresent:t,safeToRemove:n})}const hk={borderRadius:{...Ys,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Ys,borderTopRightRadius:Ys,borderBottomLeftRadius:Ys,borderBottomRightRadius:Ys,boxShadow:fk},Bv=["TopLeft","TopRight","BottomLeft","BottomRight"],Ck=Bv.length,kE=e=>typeof e=="string"?parseFloat(e):e,FE=e=>typeof e=="number"||Me.test(e);function mk(e,t,n,r,o,s){o?(e.opacity=St(0,n.opacity!==void 0?n.opacity:1,Ek(r)),e.opacityExit=St(t.opacity!==void 0?t.opacity:1,0,Ik(r))):s&&(e.opacity=St(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let l=0;l<Ck;l++){const u=`border${Bv[l]}Radius`;let A=LE(t,u),g=LE(n,u);if(A===void 0&&g===void 0)continue;A||(A=0),g||(g=0),A===0||g===0||FE(A)===FE(g)?(e[u]=Math.max(St(kE(A),kE(g),r),0),(br.test(g)||br.test(A))&&(e[u]+="%")):e[u]=g}(t.rotate||n.rotate)&&(e.rotate=St(t.rotate||0,n.rotate||0,r))}function LE(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const Ek=vv(0,.5,mf),Ik=vv(.5,.95,Dt);function vv(e,t,n){return r=>r<e?0:r>t?1:n(ha(e,t,r))}function NE(e,t){e.min=t.min,e.max=t.max}function qn(e,t){NE(e.x,t.x),NE(e.y,t.y)}function VE(e,t,n,r,o){return e-=t,e=Pc(e,1/n,r),o!==void 0&&(e=Pc(e,1/o,r)),e}function Bk(e,t=0,n=1,r=.5,o,s=e,l=e){if(br.test(t)&&(t=parseFloat(t),t=St(l.min,l.max,t/100)-l.min),typeof t!="number")return;let u=St(s.min,s.max,r);e===s&&(u-=t),e.min=VE(e.min,t,n,u,o),e.max=VE(e.max,t,n,u,o)}function HE(e,t,[n,r,o],s,l){Bk(e,t[n],t[r],t[o],t.scale,s,l)}const vk=["x","scaleX","originX"],yk=["y","scaleY","originY"];function WE(e,t,n,r){HE(e.x,t,vk,n?n.x:void 0,r?r.x:void 0),HE(e.y,t,yk,n?n.y:void 0,r?r.y:void 0)}function zE(e){return e.translate===0&&e.scale===1}function yv(e){return zE(e.x)&&zE(e.y)}function bk(e,t){return e.x.min===t.x.min&&e.x.max===t.x.max&&e.y.min===t.y.min&&e.y.max===t.y.max}function bv(e,t){return Math.round(e.x.min)===Math.round(t.x.min)&&Math.round(e.x.max)===Math.round(t.x.max)&&Math.round(e.y.min)===Math.round(t.y.min)&&Math.round(e.y.max)===Math.round(t.y.max)}function UE(e){return kn(e.x)/kn(e.y)}class Qk{constructor(){this.members=[]}add(t){yf(this.members,t),t.scheduleRender()}remove(t){if(bf(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(o=>t===o);if(n===0)return!1;let r;for(let o=n;o>=0;o--){const s=this.members[o];if(s.isPresent!==!1){r=s;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:o}=t.options;o===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function YE(e,t,n){let r="";const o=e.x.translate/t.x,s=e.y.translate/t.y;if((o||s)&&(r=`translate3d(${o}px, ${s}px, 0) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{rotate:A,rotateX:g,rotateY:p}=n;A&&(r+=`rotate(${A}deg) `),g&&(r+=`rotateX(${g}deg) `),p&&(r+=`rotateY(${p}deg) `)}const l=e.x.scale*t.x,u=e.y.scale*t.y;return(l!==1||u!==1)&&(r+=`scale(${l}, ${u})`),r||"none"}const xk=(e,t)=>e.depth-t.depth;class wk{constructor(){this.children=[],this.isDirty=!1}add(t){yf(this.children,t),this.isDirty=!0}remove(t){bf(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(xk),this.isDirty=!1,this.children.forEach(t)}}function Tk(e,t){const n=performance.now(),r=({timestamp:o})=>{const s=o-n;s>=t&&(Jr(r),e(s-t))};return vt.read(r,!0),()=>Jr(r)}function Pk(e){window.MotionDebug&&window.MotionDebug.record(e)}function Sk(e){return e instanceof SVGElement&&e.tagName!=="svg"}function Rk(e,t,n){const r=vn(e)?e:rs(e);return r.start(vf("",r,t,n)),r.animation}const GE=["","X","Y","Z"],KE=1e3;let Ok=0;const Jo={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0};function Qv({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(l={},u=t==null?void 0:t()){this.id=Ok++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{Jo.totalNodes=Jo.resolvedTargetDeltas=Jo.recalculatedProjection=0,this.nodes.forEach(Dk),this.nodes.forEach(Vk),this.nodes.forEach(Hk),this.nodes.forEach(kk),Pk(Jo)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=l,this.root=u?u.root||u:this,this.path=u?[...u.path,u]:[],this.parent=u,this.depth=u?u.depth+1:0;for(let A=0;A<this.path.length;A++)this.path[A].shouldResetTransform=!0;this.root===this&&(this.nodes=new wk)}addEventListener(l,u){return this.eventHandlers.has(l)||this.eventHandlers.set(l,new Qf),this.eventHandlers.get(l).add(u)}notifyListeners(l,...u){const A=this.eventHandlers.get(l);A&&A.notify(...u)}hasListeners(l){return this.eventHandlers.has(l)}mount(l,u=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=Sk(l),this.instance=l;const{layoutId:A,layout:g,visualElement:p}=this.options;if(p&&!p.current&&p.mount(l),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),u&&(g||A)&&(this.isLayoutDirty=!0),e){let C;const h=()=>this.root.updateBlockedByResize=!1;e(l,()=>{this.root.updateBlockedByResize=!0,C&&C(),C=Tk(h,250),sc.hasAnimatedSinceResize&&(sc.hasAnimatedSinceResize=!1,this.nodes.forEach(JE))})}A&&this.root.registerSharedNode(A,this),this.options.animate!==!1&&p&&(A||g)&&this.addEventListener("didUpdate",({delta:C,hasLayoutChanged:h,hasRelativeTargetChanged:m,layout:I})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const B=this.options.transition||p.getDefaultTransition()||Gk,{onLayoutAnimationStart:v,onLayoutAnimationComplete:O}=p.getProps(),j=!this.targetLayout||!bv(this.targetLayout,I)||m,x=!h&&m;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||x||h&&(j||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(C,x);const S={...cv(B,"layout"),onPlay:v,onComplete:O};(p.shouldReduceMotion||this.options.layoutRoot)&&(S.delay=0,S.type=!1),this.startAnimation(S)}else h||JE(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=I})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const l=this.getStack();l&&l.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Jr(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(Wk),this.animationId++)}getTransformTemplate(){const{visualElement:l}=this.options;return l&&l.getProps().transformTemplate}willUpdate(l=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let p=0;p<this.path.length;p++){const C=this.path[p];C.shouldResetTransform=!0,C.updateScroll("snapshot"),C.options.layoutRoot&&C.willUpdate(!1)}const{layoutId:u,layout:A}=this.options;if(u===void 0&&!A)return;const g=this.getTransformTemplate();this.prevTransformTemplateValue=g?g(this.latestValues,""):void 0,this.updateSnapshot(),l&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(qE);return}this.isUpdating||this.nodes.forEach(Lk),this.isUpdating=!1,this.nodes.forEach(Nk),this.nodes.forEach(jk),this.nodes.forEach(Mk),this.clearAllSnapshots();const u=performance.now();Xt.delta=Bo(0,1e3/60,u-Xt.timestamp),Xt.timestamp=u,Xt.isProcessing=!0,pd.update.process(Xt),pd.preRender.process(Xt),pd.render.process(Xt),Xt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,queueMicrotask(()=>this.update()))}clearAllSnapshots(){this.nodes.forEach(Fk),this.sharedNodes.forEach(zk)}scheduleUpdateProjection(){vt.preRender(this.updateProjection,!1,!0)}scheduleCheckAfterUnmount(){vt.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let A=0;A<this.path.length;A++)this.path[A].updateScroll();const l=this.layout;this.layout=this.measure(!1),this.layoutCorrected=zt(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:u}=this.options;u&&u.notify("LayoutMeasure",this.layout.layoutBox,l?l.layoutBox:void 0)}updateScroll(l="measure"){let u=!!(this.options.layoutScroll&&this.instance);this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===l&&(u=!1),u&&(this.scroll={animationId:this.root.animationId,phase:l,isRoot:r(this.instance),offset:n(this.instance)})}resetTransform(){if(!o)return;const l=this.isLayoutDirty||this.shouldResetTransform,u=this.projectionDelta&&!yv(this.projectionDelta),A=this.getTransformTemplate(),g=A?A(this.latestValues,""):void 0,p=g!==this.prevTransformTemplateValue;l&&(u||qo(this.latestValues)||p)&&(o(this.instance,g),this.shouldResetTransform=!1,this.scheduleRender())}measure(l=!0){const u=this.measurePageBox();let A=this.removeElementScroll(u);return l&&(A=this.removeTransform(A)),Kk(A),{animationId:this.root.animationId,measuredBox:u,layoutBox:A,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:l}=this.options;if(!l)return zt();const u=l.measureViewportBox(),{scroll:A}=this.root;return A&&(go(u.x,A.offset.x),go(u.y,A.offset.y)),u}removeElementScroll(l){const u=zt();qn(u,l);for(let A=0;A<this.path.length;A++){const g=this.path[A],{scroll:p,options:C}=g;if(g!==this.root&&p&&C.layoutScroll){if(p.isRoot){qn(u,l);const{scroll:h}=this.root;h&&(go(u.x,-h.offset.x),go(u.y,-h.offset.y))}go(u.x,p.offset.x),go(u.y,p.offset.y)}}return u}applyTransform(l,u=!1){const A=zt();qn(A,l);for(let g=0;g<this.path.length;g++){const p=this.path[g];!u&&p.options.layoutScroll&&p.scroll&&p!==p.root&&Gi(A,{x:-p.scroll.offset.x,y:-p.scroll.offset.y}),qo(p.latestValues)&&Gi(A,p.latestValues)}return qo(this.latestValues)&&Gi(A,this.latestValues),A}removeTransform(l){const u=zt();qn(u,l);for(let A=0;A<this.path.length;A++){const g=this.path[A];if(!g.instance||!qo(g.latestValues))continue;cg(g.latestValues)&&g.updateSnapshot();const p=zt(),C=g.measurePageBox();qn(p,C),WE(u,g.latestValues,g.snapshot?g.snapshot.layoutBox:void 0,p)}return qo(this.latestValues)&&WE(u,this.latestValues),u}setTargetDelta(l){this.targetDelta=l,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(l){this.options={...this.options,...l,crossfade:l.crossfade!==void 0?l.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Xt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(l=!1){var u;const A=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=A.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=A.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=A.isSharedProjectionDirty);const g=!!this.resumingFrom||this!==A;if(!(l||g&&this.isSharedProjectionDirty||this.isProjectionDirty||!((u=this.parent)===null||u===void 0)&&u.isProjectionDirty||this.attemptToResolveRelativeTarget))return;const{layout:C,layoutId:h}=this.options;if(!(!this.layout||!(C||h))){if(this.resolvedRelativeTargetAt=Xt.timestamp,!this.targetDelta&&!this.relativeTarget){const m=this.getClosestProjectingParent();m&&m.layout&&this.animationProgress!==1?(this.relativeParent=m,this.forceRelativeParentToResolveTarget(),this.relativeTarget=zt(),this.relativeTargetOrigin=zt(),ia(this.relativeTargetOrigin,this.layout.layoutBox,m.layout.layoutBox),qn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=zt(),this.targetWithTransforms=zt()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),JD(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):qn(this.target,this.layout.layoutBox),mv(this.target,this.targetDelta)):qn(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const m=this.getClosestProjectingParent();m&&!!m.resumingFrom==!!this.resumingFrom&&!m.options.layoutScroll&&m.target&&this.animationProgress!==1?(this.relativeParent=m,this.forceRelativeParentToResolveTarget(),this.relativeTarget=zt(),this.relativeTargetOrigin=zt(),ia(this.relativeTargetOrigin,this.target,m.target),qn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}Jo.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||cg(this.parent.latestValues)||Cv(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var l;const u=this.getLead(),A=!!this.resumingFrom||this!==u;let g=!0;if((this.isProjectionDirty||!((l=this.parent)===null||l===void 0)&&l.isProjectionDirty)&&(g=!1),A&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(g=!1),this.resolvedRelativeTargetAt===Xt.timestamp&&(g=!1),g)return;const{layout:p,layoutId:C}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(p||C))return;qn(this.layoutCorrected,this.layout.layoutBox);const h=this.treeScale.x,m=this.treeScale.y;ok(this.layoutCorrected,this.treeScale,this.path,A),u.layout&&!u.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(u.target=u.layout.layoutBox);const{target:I}=u;if(!I){this.projectionTransform&&(this.projectionDelta=Yi(),this.projectionTransform="none",this.scheduleRender());return}this.projectionDelta||(this.projectionDelta=Yi(),this.projectionDeltaWithTransform=Yi());const B=this.projectionTransform;oa(this.projectionDelta,this.layoutCorrected,I,this.latestValues),this.projectionTransform=YE(this.projectionDelta,this.treeScale),(this.projectionTransform!==B||this.treeScale.x!==h||this.treeScale.y!==m)&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",I)),Jo.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(l=!0){if(this.options.scheduleRender&&this.options.scheduleRender(),l){const u=this.getStack();u&&u.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}setAnimationOrigin(l,u=!1){const A=this.snapshot,g=A?A.latestValues:{},p={...this.latestValues},C=Yi();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!u;const h=zt(),m=A?A.source:void 0,I=this.layout?this.layout.source:void 0,B=m!==I,v=this.getStack(),O=!v||v.members.length<=1,j=!!(B&&!O&&this.options.crossfade===!0&&!this.path.some(Yk));this.animationProgress=0;let x;this.mixTargetDelta=S=>{const P=S/1e3;XE(C.x,l.x,P),XE(C.y,l.y,P),this.setTargetDelta(C),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(ia(h,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Uk(this.relativeTarget,this.relativeTargetOrigin,h,P),x&&bk(this.relativeTarget,x)&&(this.isProjectionDirty=!1),x||(x=zt()),qn(x,this.relativeTarget)),B&&(this.animationValues=p,mk(p,g,this.latestValues,P,j,O)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=P},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(l){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Jr(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=vt.update(()=>{sc.hasAnimatedSinceResize=!0,this.currentAnimation=Rk(0,KE,{...l,onUpdate:u=>{this.mixTargetDelta(u),l.onUpdate&&l.onUpdate(u)},onComplete:()=>{l.onComplete&&l.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const l=this.getStack();l&&l.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(KE),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const l=this.getLead();let{targetWithTransforms:u,target:A,layout:g,latestValues:p}=l;if(!(!u||!A||!g)){if(this!==l&&this.layout&&g&&xv(this.options.animationType,this.layout.layoutBox,g.layoutBox)){A=this.target||zt();const C=kn(this.layout.layoutBox.x);A.x.min=l.target.x.min,A.x.max=A.x.min+C;const h=kn(this.layout.layoutBox.y);A.y.min=l.target.y.min,A.y.max=A.y.min+h}qn(u,A),Gi(u,p),oa(this.projectionDeltaWithTransform,this.layoutCorrected,u,p)}}registerSharedNode(l,u){this.sharedNodes.has(l)||this.sharedNodes.set(l,new Qk),this.sharedNodes.get(l).add(u);const g=u.options.initialPromotionConfig;u.promote({transition:g?g.transition:void 0,preserveFollowOpacity:g&&g.shouldPreserveFollowOpacity?g.shouldPreserveFollowOpacity(u):void 0})}isLead(){const l=this.getStack();return l?l.lead===this:!0}getLead(){var l;const{layoutId:u}=this.options;return u?((l=this.getStack())===null||l===void 0?void 0:l.lead)||this:this}getPrevLead(){var l;const{layoutId:u}=this.options;return u?(l=this.getStack())===null||l===void 0?void 0:l.prevLead:void 0}getStack(){const{layoutId:l}=this.options;if(l)return this.root.sharedNodes.get(l)}promote({needsReset:l,transition:u,preserveFollowOpacity:A}={}){const g=this.getStack();g&&g.promote(this,A),l&&(this.projectionDelta=void 0,this.needsReset=!0),u&&this.setOptions({transition:u})}relegate(){const l=this.getStack();return l?l.relegate(this):!1}resetRotation(){const{visualElement:l}=this.options;if(!l)return;let u=!1;const{latestValues:A}=l;if((A.rotate||A.rotateX||A.rotateY||A.rotateZ)&&(u=!0),!u)return;const g={};for(let p=0;p<GE.length;p++){const C="rotate"+GE[p];A[C]&&(g[C]=A[C],l.setStaticValue(C,0))}l.render();for(const p in g)l.setStaticValue(p,g[p]);l.scheduleRender()}getProjectionStyles(l={}){var u,A;const g={};if(!this.instance||this.isSVG)return g;if(this.isVisible)g.visibility="";else return{visibility:"hidden"};const p=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,g.opacity="",g.pointerEvents=ic(l.pointerEvents)||"",g.transform=p?p(this.latestValues,""):"none",g;const C=this.getLead();if(!this.projectionDelta||!this.layout||!C.target){const B={};return this.options.layoutId&&(B.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,B.pointerEvents=ic(l.pointerEvents)||""),this.hasProjected&&!qo(this.latestValues)&&(B.transform=p?p({},""):"none",this.hasProjected=!1),B}const h=C.animationValues||C.latestValues;this.applyTransformsToTarget(),g.transform=YE(this.projectionDeltaWithTransform,this.treeScale,h),p&&(g.transform=p(h,g.transform));const{x:m,y:I}=this.projectionDelta;g.transformOrigin=`${m.origin*100}% ${I.origin*100}% 0`,C.animationValues?g.opacity=C===this?(A=(u=h.opacity)!==null&&u!==void 0?u:this.latestValues.opacity)!==null&&A!==void 0?A:1:this.preserveOpacity?this.latestValues.opacity:h.opacityExit:g.opacity=C===this?h.opacity!==void 0?h.opacity:"":h.opacityExit!==void 0?h.opacityExit:0;for(const B in vc){if(h[B]===void 0)continue;const{correct:v,applyTo:O}=vc[B],j=g.transform==="none"?h[B]:v(h[B],C);if(O){const x=O.length;for(let S=0;S<x;S++)g[O[S]]=j}else g[B]=j}return this.options.layoutId&&(g.pointerEvents=C===this?ic(l.pointerEvents)||"":"none"),g}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(l=>{var u;return(u=l.currentAnimation)===null||u===void 0?void 0:u.stop()}),this.root.nodes.forEach(qE),this.root.sharedNodes.clear()}}}function jk(e){e.updateLayout()}function Mk(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:o}=e.layout,{animationType:s}=e.options,l=n.source!==e.layout.source;s==="size"?Br(C=>{const h=l?n.measuredBox[C]:n.layoutBox[C],m=kn(h);h.min=r[C].min,h.max=h.min+m}):xv(s,n.layoutBox,r)&&Br(C=>{const h=l?n.measuredBox[C]:n.layoutBox[C],m=kn(r[C]);h.max=h.min+m,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[C].max=e.relativeTarget[C].min+m)});const u=Yi();oa(u,r,n.layoutBox);const A=Yi();l?oa(A,e.applyTransform(o,!0),n.measuredBox):oa(A,r,n.layoutBox);const g=!yv(u);let p=!1;if(!e.resumeFrom){const C=e.getClosestProjectingParent();if(C&&!C.resumeFrom){const{snapshot:h,layout:m}=C;if(h&&m){const I=zt();ia(I,n.layoutBox,h.layoutBox);const B=zt();ia(B,r,m.layoutBox),bv(I,B)||(p=!0),C.options.layoutRoot&&(e.relativeTarget=B,e.relativeTargetOrigin=I,e.relativeParent=C)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:A,layoutDelta:u,hasLayoutChanged:g,hasRelativeTargetChanged:p})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function Dk(e){Jo.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function kk(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Fk(e){e.clearSnapshot()}function qE(e){e.clearMeasurements()}function Lk(e){e.isLayoutDirty=!1}function Nk(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function JE(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Vk(e){e.resolveTargetDelta()}function Hk(e){e.calcProjection()}function Wk(e){e.resetRotation()}function zk(e){e.removeLeadSnapshot()}function XE(e,t,n){e.translate=St(t.translate,0,n),e.scale=St(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function ZE(e,t,n,r){e.min=St(t.min,n.min,r),e.max=St(t.max,n.max,r)}function Uk(e,t,n,r){ZE(e.x,t.x,n.x,r),ZE(e.y,t.y,n.y,r)}function Yk(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const Gk={duration:.45,ease:[.4,0,.1,1]},_E=e=>typeof navigator<"u"&&navigator.userAgent.toLowerCase().includes(e),$E=_E("applewebkit/")&&!_E("chrome/")?Math.round:Dt;function eI(e){e.min=$E(e.min),e.max=$E(e.max)}function Kk(e){eI(e.x),eI(e.y)}function xv(e,t,n){return e==="position"||e==="preserve-aspect"&&!ag(UE(t),UE(n),.2)}const qk=Qv({attachResizeListener:(e,t)=>Ur(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),xd={current:void 0},wv=Qv({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!xd.current){const e=new qk({});e.mount(window),e.setOptions({layoutScroll:!0}),xd.current=e}return xd.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),Jk={pan:{Feature:dk},drag:{Feature:Ak,ProjectionNode:wv,MeasureLayout:Iv}},Xk=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function Zk(e){const t=Xk.exec(e);if(!t)return[,];const[,n,r]=t;return[n,r]}const _k=4;function Ag(e,t,n=1){xr(n<=_k,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[r,o]=Zk(e);if(!r)return;const s=window.getComputedStyle(t).getPropertyValue(r);if(s){const l=s.trim();return uv(l)?parseFloat(l):l}else return eg(o)?Ag(o,t,n+1):o}function $k(e,{...t},n){const r=e.current;if(!(r instanceof Element))return{target:t,transitionEnd:n};n&&(n={...n}),e.values.forEach(o=>{const s=o.get();if(!eg(s))return;const l=Ag(s,r);l&&o.set(l)});for(const o in t){const s=t[o];if(!eg(s))continue;const l=Ag(s,r);l&&(t[o]=l,n||(n={}),n[o]===void 0&&(n[o]=s))}return{target:t,transitionEnd:n}}const e5=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),Tv=e=>e5.has(e),t5=e=>Object.keys(e).some(Tv),Yl=e=>e===Ai||e===Me,tI=(e,t)=>parseFloat(e.split(", ")[t]),nI=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const o=r.match(/^matrix3d\((.+)\)$/);if(o)return tI(o[1],t);{const s=r.match(/^matrix\((.+)\)$/);return s?tI(s[1],e):0}},n5=new Set(["x","y","z"]),r5=Pa.filter(e=>!n5.has(e));function o5(e){const t=[];return r5.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t.length&&e.render(),t}const os={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:nI(4,13),y:nI(5,14)};os.translateX=os.x;os.translateY=os.y;const i5=(e,t,n)=>{const r=t.measureViewportBox(),o=t.current,s=getComputedStyle(o),{display:l}=s,u={};l==="none"&&t.setStaticValue("display",e.display||"block"),n.forEach(g=>{u[g]=os[g](r,s)}),t.render();const A=t.measureViewportBox();return n.forEach(g=>{const p=t.getValue(g);p&&p.jump(u[g]),e[g]=os[g](A,s)}),e},s5=(e,t,n={},r={})=>{t={...t},r={...r};const o=Object.keys(t).filter(Tv);let s=[],l=!1;const u=[];if(o.forEach(A=>{const g=e.getValue(A);if(!e.hasValue(A))return;let p=n[A],C=Us(p);const h=t[A];let m;if(bc(h)){const I=h.length,B=h[0]===null?1:0;p=h[B],C=Us(p);for(let v=B;v<I&&h[v]!==null;v++)m?xr(Us(h[v])===m,"All keyframes must be of the same type"):(m=Us(h[v]),xr(m===C||Yl(C)&&Yl(m),"Keyframes must be of the same dimension as the current value"))}else m=Us(h);if(C!==m)if(Yl(C)&&Yl(m)){const I=g.get();typeof I=="string"&&g.set(parseFloat(I)),typeof h=="string"?t[A]=parseFloat(h):Array.isArray(h)&&m===Me&&(t[A]=h.map(parseFloat))}else C!=null&&C.transform&&(m!=null&&m.transform)&&(p===0||h===0)?p===0?g.set(m.transform(p)):t[A]=C.transform(h):(l||(s=o5(e),l=!0),u.push(A),r[A]=r[A]!==void 0?r[A]:t[A],g.jump(h))}),u.length){const A=u.indexOf("height")>=0?window.pageYOffset:null,g=i5(t,e,u);return s.length&&s.forEach(([p,C])=>{e.getValue(p).set(C)}),e.render(),su&&A!==null&&window.scrollTo({top:A}),{target:g,transitionEnd:r}}else return{target:t,transitionEnd:r}};function a5(e,t,n,r){return t5(t)?s5(e,t,n,r):{target:t,transitionEnd:r}}const l5=(e,t,n,r)=>{const o=$k(e,t,r);return t=o.target,r=o.transitionEnd,a5(e,t,n,r)},dg={current:null},Pv={current:!1};function c5(){if(Pv.current=!0,!!su)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>dg.current=e.matches;e.addListener(t),t()}else dg.current=!1}function u5(e,t,n){const{willChange:r}=t;for(const o in t){const s=t[o],l=n[o];if(vn(s))e.addValue(o,s),Tc(r)&&r.add(o),process.env.NODE_ENV==="development"&&xf(s.version==="10.16.4",`Attempting to mix Framer Motion versions ${s.version} with 10.16.4 may not work as expected.`);else if(vn(l))e.addValue(o,rs(s,{owner:e})),Tc(r)&&r.remove(o);else if(l!==s)if(e.hasValue(o)){const u=e.getValue(o);!u.hasAnimated&&u.set(s)}else{const u=e.getStaticValue(o);e.addValue(o,rs(u!==void 0?u:s,{owner:e}))}}for(const o in n)t[o]===void 0&&e.removeValue(o);return t}const rI=new WeakMap,Sv=Object.keys(pa),A5=Sv.length,oI=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],d5=cf.length;class g5{constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:o,visualState:s},l={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.scheduleRender=()=>vt.render(this.render,!1,!0);const{latestValues:u,renderState:A}=s;this.latestValues=u,this.baseTarget={...u},this.initialValues=n.initial?{...u}:{},this.renderState=A,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=o,this.options=l,this.isControllingVariants=lu(n),this.isVariantNode=fB(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:g,...p}=this.scrapeMotionValuesFromProps(n,{});for(const C in p){const h=p[C];u[C]!==void 0&&vn(h)&&(h.set(u[C],!1),Tc(g)&&g.add(C))}}scrapeMotionValuesFromProps(t,n){return{}}mount(t){this.current=t,rI.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),Pv.current||c5(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:dg.current,process.env.NODE_ENV!=="production"&&xf(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected."),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){rI.delete(this.current),this.projection&&this.projection.unmount(),Jr(this.notifyUpdate),Jr(this.render),this.valueSubscriptions.forEach(t=>t()),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features)this.features[t].unmount();this.current=null}bindToMotionValue(t,n){const r=ui.has(t),o=n.on("change",l=>{this.latestValues[t]=l,this.props.onUpdate&&vt.update(this.notifyUpdate,!1,!0),r&&this.projection&&(this.projection.isTransformDirty=!0)}),s=n.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(t,()=>{o(),s()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}loadFeatures({children:t,...n},r,o,s){let l,u;if(process.env.NODE_ENV!=="production"&&o&&r){const A="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";n.ignoreStrict?Oa(!1,A):xr(!1,A)}for(let A=0;A<A5;A++){const g=Sv[A],{isEnabled:p,Feature:C,ProjectionNode:h,MeasureLayout:m}=pa[g];h&&(l=h),p(n)&&(!this.features[g]&&C&&(this.features[g]=new C(this)),m&&(u=m))}if(!this.projection&&l){this.projection=new l(this.latestValues,this.parent&&this.parent.projection);const{layoutId:A,layout:g,drag:p,dragConstraints:C,layoutScroll:h,layoutRoot:m}=n;this.projection.setOptions({layoutId:A,layout:g,alwaysMeasureLayout:!!p||C&&zi(C),visualElement:this,scheduleRender:()=>this.scheduleRender(),animationType:typeof g=="string"?g:"both",initialPromotionConfig:s,layoutScroll:h,layoutRoot:m})}return u}updateFeatures(){for(const t in this.features){const n=this.features[t];n.isMounted?n.update():(n.mount(),n.isMounted=!0)}}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):zt()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}makeTargetAnimatable(t,n=!0){return this.makeTargetAnimatableFromInstance(t,this.props,n)}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<oI.length;r++){const o=oI[r];this.propEventSubscriptions[o]&&(this.propEventSubscriptions[o](),delete this.propEventSubscriptions[o]);const s=t["on"+o];s&&(this.propEventSubscriptions[o]=this.on(o,s))}this.prevMotionValues=u5(this,this.scrapeMotionValuesFromProps(t,this.prevProps),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}getVariantContext(t=!1){if(t)return this.parent?this.parent.getVariantContext():void 0;if(!this.isControllingVariants){const r=this.parent?this.parent.getVariantContext()||{}:{};return this.props.initial!==void 0&&(r.initial=this.props.initial),r}const n={};for(let r=0;r<d5;r++){const o=cf[r],s=this.props[o];(fa(s)||s===!1)&&(n[o]=s)}return n}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){n!==this.values.get(t)&&(this.removeValue(t),this.bindToMotionValue(t,n)),this.values.set(t,n),this.latestValues[t]=n.get()}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=rs(n,{owner:this}),this.addValue(t,r)),r}readValue(t){var n;return this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(n=this.getBaseTargetFromProps(this.props,t))!==null&&n!==void 0?n:this.readValueFromInstance(this.current,t,this.options)}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props,o=typeof r=="string"||typeof r=="object"?(n=Cf(this.props,r))===null||n===void 0?void 0:n[t]:void 0;if(r&&o!==void 0)return o;const s=this.getBaseTargetFromProps(this.props,t);return s!==void 0&&!vn(s)?s:this.initialValues[t]!==void 0&&o===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Qf),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class Rv extends g5{sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}makeTargetAnimatableFromInstance({transition:t,transitionEnd:n,...r},{transformValues:o},s){let l=RD(r,t||{},this);if(o&&(n&&(n=o(n)),r&&(r=o(r)),l&&(l=o(l))),s){PD(this,r,l);const u=l5(this,r,l,n);n=u.transitionEnd,r=u.target}return{transition:t,transitionEnd:n,...r}}}function f5(e){return window.getComputedStyle(e)}class p5 extends Rv{readValueFromInstance(t,n){if(ui.has(n)){const r=Bf(n);return r&&r.default||0}else{const r=f5(t),o=(EB(n)?r.getPropertyValue(n):r[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Ev(t,n)}build(t,n,r,o){Af(t,n,r,o.transformTemplate)}scrapeMotionValuesFromProps(t,n){return hf(t,n)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;vn(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}renderInstance(t,n,r,o){QB(t,n,r,o)}}class h5 extends Rv{constructor(){super(...arguments),this.isSVGTag=!1}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(ui.has(n)){const r=Bf(n);return r&&r.default||0}return n=xB.has(n)?n:pf(n),t.getAttribute(n)}measureInstanceViewportBox(){return zt()}scrapeMotionValuesFromProps(t,n){return TB(t,n)}build(t,n,r,o){gf(t,n,r,this.isSVGTag,o.transformTemplate)}renderInstance(t,n,r,o){wB(t,n,r,o)}mount(t){this.isSVGTag=ff(t.tagName),super.mount(t)}}const C5=(e,t)=>uf(e)?new h5(t,{enableHardwareAcceleration:!1}):new p5(t,{enableHardwareAcceleration:!0}),m5={layout:{ProjectionNode:wv,MeasureLayout:Iv}},E5={...YD,...g3,...Jk,...m5},Gl=BM((e,t)=>e3(e,t,E5,C5)),I5=(e,t,n)=>{const r=t-e;return((n-e)%r+r)%r+e};function iI(...e){const t=w.useRef(0),[n,r]=w.useState(e[t.current]),o=w.useCallback(s=>{t.current=typeof s!="number"?I5(0,e.length,t.current+1):s,r(e[t.current])},[e.length,...e]);return[n,o]}function Ov({children:e,type:t="scale",direction:n="right",offset:r=10,scale:o={hover:1.05,tap:.95}}){let s,l;switch(n){case"up":case"left":s=r,l=0;break;case"right":case"down":default:s=0,l=r;break}const[u,A]=iI(s,l),[g,p]=iI(s,l);switch(t){case"rotate":return f.jsx(Gl.div,{animate:{rotate:360},transition:{repeat:1/0,repeatType:"loop",duration:2,repeatDelay:0},children:e});case"slide":return n==="up"||n==="down"?f.jsx(Gl.div,{animate:{y:g!==void 0?g:""},onHoverEnd:()=>p(),onHoverStart:()=>p(),children:e}):f.jsx(Gl.div,{animate:{x:u!==void 0?u:""},onHoverEnd:()=>A(),onHoverStart:()=>A(),children:e});case"scale":default:return typeof o=="number"&&(o={hover:o,tap:o}),f.jsx(Gl.div,{whileHover:{scale:o==null?void 0:o.hover},whileTap:{scale:o==null?void 0:o.tap},children:e})}}Ov.propTypes={children:c.node,offset:c.number,type:c.oneOf(["slide","scale","rotate"]),direction:c.oneOf(["up","down","left","right"]),scale:c.oneOfType([c.number,c.object])};function B5(e){return Nt("MuiSvgIcon",e)}Ut("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const v5=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"],y5=e=>{const{color:t,fontSize:n,classes:r}=e,o={root:["root",t!=="inherit"&&`color${Pe(t)}`,`fontSize${Pe(n)}`]};return sn(o,B5,r)},b5=ue("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="inherit"&&t[`color${Pe(n.color)}`],t[`fontSize${Pe(n.fontSize)}`]]}})(({theme:e,ownerState:t})=>{var n,r,o,s,l,u,A,g,p,C,h,m,I;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:t.hasSvgAsChild?void 0:"currentColor",flexShrink:0,transition:(n=e.transitions)==null||(r=n.create)==null?void 0:r.call(n,"fill",{duration:(o=e.transitions)==null||(o=o.duration)==null?void 0:o.shorter}),fontSize:{inherit:"inherit",small:((s=e.typography)==null||(l=s.pxToRem)==null?void 0:l.call(s,20))||"1.25rem",medium:((u=e.typography)==null||(A=u.pxToRem)==null?void 0:A.call(u,24))||"1.5rem",large:((g=e.typography)==null||(p=g.pxToRem)==null?void 0:p.call(g,35))||"2.1875rem"}[t.fontSize],color:(C=(h=(e.vars||e).palette)==null||(h=h[t.color])==null?void 0:h.main)!=null?C:{action:(m=(e.vars||e).palette)==null||(m=m.action)==null?void 0:m.active,disabled:(I=(e.vars||e).palette)==null||(I=I.action)==null?void 0:I.disabled,inherit:void 0}[t.color]}}),wf=D.forwardRef(function(t,n){const r=Yt({props:t,name:"MuiSvgIcon"}),{children:o,className:s,color:l="inherit",component:u="svg",fontSize:A="medium",htmlColor:g,inheritViewBox:p=!1,titleAccess:C,viewBox:h="0 0 24 24"}=r,m=Ke(r,v5),I=D.isValidElement(o)&&o.type==="svg",B=W({},r,{color:l,component:u,fontSize:A,instanceFontSize:t.fontSize,inheritViewBox:p,viewBox:h,hasSvgAsChild:I}),v={};p||(v.viewBox=h);const O=y5(B);return f.jsxs(b5,W({as:u,className:Ge(O.root,s),focusable:"false",color:g,"aria-hidden":C?void 0:!0,role:C?"img":void 0,ref:n},v,m,I&&o.props,{ownerState:B,children:[I?o.props.children:o,C?f.jsx("title",{children:C}):null]}))});process.env.NODE_ENV!=="production"&&(wf.propTypes={children:c.node,classes:c.object,className:c.string,color:c.oneOfType([c.oneOf(["inherit","action","disabled","primary","secondary","error","info","success","warning"]),c.string]),component:c.elementType,fontSize:c.oneOfType([c.oneOf(["inherit","large","medium","small"]),c.string]),htmlColor:c.string,inheritViewBox:c.bool,shapeRendering:c.string,sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),titleAccess:c.string,viewBox:c.string});wf.muiName="SvgIcon";const sI=wf;function Tf(e,t){function n(r,o){return f.jsx(sI,W({"data-testid":`${t}Icon`,ref:o},r,{children:e}))}return process.env.NODE_ENV!=="production"&&(n.displayName=`${t}Icon`),n.muiName=sI.muiName,D.memo(D.forwardRef(n))}const Q5=Tf(f.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 x5(e){return Nt("MuiAvatar",e)}Ut("MuiAvatar",["root","colorDefault","circular","rounded","square","img","fallback"]);const w5=["alt","children","className","component","imgProps","sizes","src","srcSet","variant"],T5=e=>{const{classes:t,variant:n,colorDefault:r}=e;return sn({root:["root",n,r&&"colorDefault"],img:["img"],fallback:["fallback"]},x5,t)},P5=ue("div",{name:"MuiAvatar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],n.colorDefault&&t.colorDefault]}})(({theme:e,ownerState:t})=>W({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"},t.variant==="rounded"&&{borderRadius:(e.vars||e).shape.borderRadius},t.variant==="square"&&{borderRadius:0},t.colorDefault&&W({color:(e.vars||e).palette.background.default},e.vars?{backgroundColor:e.vars.palette.Avatar.defaultBg}:{backgroundColor:e.palette.mode==="light"?e.palette.grey[400]:e.palette.grey[600]}))),S5=ue("img",{name:"MuiAvatar",slot:"Img",overridesResolver:(e,t)=>t.img})({width:"100%",height:"100%",textAlign:"center",objectFit:"cover",color:"transparent",textIndent:1e4}),R5=ue(Q5,{name:"MuiAvatar",slot:"Fallback",overridesResolver:(e,t)=>t.fallback})({width:"75%",height:"75%"});function O5({crossOrigin:e,referrerPolicy:t,src:n,srcSet:r}){const[o,s]=D.useState(!1);return D.useEffect(()=>{if(!n&&!r)return;s(!1);let l=!0;const u=new Image;return u.onload=()=>{l&&s("loaded")},u.onerror=()=>{l&&s("error")},u.crossOrigin=e,u.referrerPolicy=t,u.src=n,r&&(u.srcset=r),()=>{l=!1}},[e,t,n,r]),o}const jv=D.forwardRef(function(t,n){const r=Yt({props:t,name:"MuiAvatar"}),{alt:o,children:s,className:l,component:u="div",imgProps:A,sizes:g,src:p,srcSet:C,variant:h="circular"}=r,m=Ke(r,w5);let I=null;const B=O5(W({},A,{src:p,srcSet:C})),v=p||C,O=v&&B!=="error",j=W({},r,{colorDefault:!O,component:u,variant:h}),x=T5(j);return O?I=f.jsx(S5,W({alt:o,srcSet:C,src:p,sizes:g,ownerState:j,className:x.img},A)):s!=null?I=s:v&&o?I=o[0]:I=f.jsx(R5,{ownerState:j,className:x.fallback}),f.jsx(P5,W({as:u,ownerState:j,className:Ge(x.root,l),ref:n},m,{children:I}))});process.env.NODE_ENV!=="production"&&(jv.propTypes={alt:c.string,children:c.node,classes:c.object,className:c.string,component:c.elementType,imgProps:c.object,sizes:c.string,src:c.string,srcSet:c.string,sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),variant:c.oneOfType([c.oneOf(["circular","rounded","square"]),c.string])});const j5=jv,an=(e,t)=>{switch(t){case"secondary":return e.palette.secondary;case"error":return e.palette.error;case"warning":return e.palette.warning;case"info":return e.palette.info;case"success":return e.palette.success;default:return e.palette.primary}};function M5({theme:e,color:t,type:n}){const r=an(e,t),{lighter:o,light:s,main:l,contrastText:u}=r;switch(n){case"filled":return{color:u,backgroundColor:l};case"outlined":return{color:l,border:"1px solid",borderColor:l,backgroundColor:"transparent"};case"combined":return{color:l,border:"1px solid",borderColor:s,backgroundColor:o};default:return{color:l,backgroundColor:o}}}function D5(e){switch(e){case"badge":return{border:"2px solid",fontSize:"0.675rem",width:20,height:20};case"xs":return{fontSize:"0.75rem",width:24,height:24};case"sm":return{fontSize:"0.875rem",width:32,height:32};case"lg":return{fontSize:"1.2rem",width:52,height:52};case"xl":return{fontSize:"1.5rem",width:64,height:64};case"md":default:return{fontSize:"1rem",width:40,height:40}}}const k5=ue(j5,{shouldForwardProp:e=>e!=="color"&&e!=="type"&&e!=="size"})(({theme:e,variant:t,color:n,type:r,size:o})=>({...D5(o),...M5({variant:t,theme:e,color:n,type:r}),...o==="badge"&&{borderColor:e.palette.background.default}}));function Ca({variant:e="circular",children:t,color:n="primary",type:r,size:o="md",...s}){const l=Rt();return f.jsx(k5,{variant:e,theme:l,color:n,type:r,size:o,...s,children:t})}Ca.propTypes={children:c.node,color:c.string,type:c.string,size:c.string,variant:c.string};const aI={p:2.5,"& .MuiCardHeader-action":{m:"0px auto",alignSelf:"center"}},Zn=w.forwardRef(({border:e=!0,boxShadow:t,children:n,subheader:r,content:o=!0,contentSX:s={},darkTitle:l,divider:u=!0,elevation:A,secondary:g,shadow:p,sx:C={},title:h,modal:m=!1,color:I="default",...B},v)=>{const O=Rt();return t=O.palette.mode==="dark"?t||!0:t,f.jsxs(b.Card,{elevation:A||0,ref:v,...B,sx:{position:"relative",border:e?"1px solid":"none",borderRadius:1,borderColor:O.palette.mode==="dark"?O.palette.divider:O.palette.grey.A800,boxShadow:t&&(!e||O.palette.mode==="dark")?p||O.customShadows.z1:"inherit",":hover":{boxShadow:t?p||O.customShadows.z1:"inherit"},backgroundColor:I==="default"?O.palette.background.paper:ts(I==="primary"?O.palette.primary[100]:O.palette.secondary[100],.5),...m&&{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:{xs:"calc( 100% - 50px)",sm:"auto"},"& .MuiCardContent-root":{overflowY:"auto",minHeight:"auto",maxHeight:"calc(100vh - 200px)"}},...C},children:[!l&&h&&f.jsx(b.CardHeader,{sx:aI,titleTypographyProps:{variant:"subtitle1"},title:h,action:g,subheader:r}),l&&h&&f.jsx(b.CardHeader,{sx:aI,title:f.jsx(b.Typography,{variant:"h4",children:h}),action:g}),h&&u&&f.jsx(b.Divider,{}),o&&f.jsx(b.CardContent,{sx:s,children:n}),!o&&n]})});Zn.propTypes={border:c.bool,boxShadow:c.bool,children:c.oneOfType([c.node,c.arrayOf(c.node)]),subheader:c.oneOfType([c.node,c.string]),content:c.bool,contentClass:c.string,contentSX:c.object,darkTitle:c.bool,divider:c.bool,elevation:c.number,secondary:c.oneOfType([c.node,c.string,c.object]),shadow:c.string,sx:c.object,title:c.oneOfType([c.node,c.string,c.object]),modal:c.bool,color:c.oneOf(["default","primary","secondary"])};var gg={exports:{}},lt={};/**
98
98
  * @license React
99
99
  * react-is.production.min.js
100
100
  *