@dss-kit/ui-kit 0.1.1 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/builders/Box/Box.d.ts +4 -1
- package/dist/components/builders/Box/Box.d.ts.map +1 -1
- package/dist/components/builders/Modal/Modal.stories.d.ts.map +1 -1
- package/dist/components/builders/Modal/ModalHeader/ModalHeader.d.ts +2 -0
- package/dist/components/builders/Modal/ModalHeader/ModalHeader.d.ts.map +1 -1
- package/dist/components/builders/Ripple/Ripple.d.ts +39 -0
- package/dist/components/builders/Ripple/Ripple.d.ts.map +1 -0
- package/dist/components/builders/Ripple/index.d.ts +2 -0
- package/dist/components/builders/Ripple/index.d.ts.map +1 -0
- package/dist/components/builders/Text/Text.d.ts +8 -4
- package/dist/components/builders/Text/Text.d.ts.map +1 -1
- package/dist/components/builders/Text/utils/systemToClass.d.ts +4 -0
- package/dist/components/builders/Text/utils/systemToClass.d.ts.map +1 -1
- package/dist/components/controls/Button/Button.d.ts +4 -0
- package/dist/components/controls/Button/Button.d.ts.map +1 -1
- package/dist/components/controls/Button/index.d.ts +1 -1
- package/dist/components/controls/Button/index.d.ts.map +1 -1
- package/dist/components/controls/Button/styles.d.ts.map +1 -1
- package/dist/components/controls/Checkbox/Checkbox.d.ts +20 -0
- package/dist/components/controls/Checkbox/Checkbox.d.ts.map +1 -0
- package/dist/components/controls/Checkbox/Checkbox.stories.d.ts +12 -0
- package/dist/components/controls/Checkbox/Checkbox.stories.d.ts.map +1 -0
- package/dist/components/controls/Checkbox/index.d.ts +2 -0
- package/dist/components/controls/Checkbox/index.d.ts.map +1 -0
- package/dist/components/controls/IconButton/IconButton.d.ts.map +1 -1
- package/dist/components/controls/Input/Input.d.ts +77 -0
- package/dist/components/controls/Input/Input.d.ts.map +1 -0
- package/dist/components/controls/Input/Input.stories.d.ts +19 -0
- package/dist/components/controls/Input/Input.stories.d.ts.map +1 -0
- package/dist/components/controls/Input/index.d.ts +2 -0
- package/dist/components/controls/Input/index.d.ts.map +1 -0
- package/dist/components/controls/Select/Select.d.ts +85 -0
- package/dist/components/controls/Select/Select.d.ts.map +1 -0
- package/dist/components/controls/Select/Select.stories.d.ts +22 -0
- package/dist/components/controls/Select/Select.stories.d.ts.map +1 -0
- package/dist/components/controls/Select/index.d.ts +2 -0
- package/dist/components/controls/Select/index.d.ts.map +1 -0
- package/dist/components/controls/index.d.ts +3 -1
- package/dist/components/controls/index.d.ts.map +1 -1
- package/dist/components/shared/Portal/Portal.d.ts +3 -0
- package/dist/components/shared/Portal/Portal.d.ts.map +1 -0
- package/dist/components/shared/Portal/index.d.ts +2 -0
- package/dist/components/shared/Portal/index.d.ts.map +1 -0
- package/dist/components/shared/Tag/Tag.d.ts +49 -0
- package/dist/components/shared/Tag/Tag.d.ts.map +1 -0
- package/dist/components/shared/Tag/Tag.stories.d.ts +17 -0
- package/dist/components/shared/Tag/Tag.stories.d.ts.map +1 -0
- package/dist/components/shared/Tag/index.d.ts +3 -0
- package/dist/components/shared/Tag/index.d.ts.map +1 -0
- package/dist/components/shared/index.d.ts +2 -0
- package/dist/components/shared/index.d.ts.map +1 -1
- package/dist/root.css +1 -1
- package/dist/ui-kit.cjs.js +3 -3
- package/dist/ui-kit.cjs.js.map +1 -1
- package/dist/ui-kit.css +1 -1
- package/dist/ui-kit.es.js +3234 -2687
- package/dist/ui-kit.es.js.map +1 -1
- package/dist/utils/hooks/index.d.ts +3 -0
- package/dist/utils/hooks/index.d.ts.map +1 -0
- package/dist/utils/hooks/useControlled.d.ts +13 -0
- package/dist/utils/hooks/useControlled.d.ts.map +1 -0
- package/dist/utils/hooks/useDropdownPosition.d.ts +33 -0
- package/dist/utils/hooks/useDropdownPosition.d.ts.map +1 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/ui-kit.cjs.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const A=require("react/jsx-runtime"),b=require("react"),zo=require("react-dom");function Wo(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const s=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,s.get?s:{enumerable:!0,get:()=>t[n]})}}return e.default=t,Object.freeze(e)}const I=Wo(b);function Uo(t){if(t.sheet)return t.sheet;for(var e=0;e<document.styleSheets.length;e++)if(document.styleSheets[e].ownerNode===t)return document.styleSheets[e]}function Ko(t){var e=document.createElement("style");return e.setAttribute("data-emotion",t.key),t.nonce!==void 0&&e.setAttribute("nonce",t.nonce),e.appendChild(document.createTextNode("")),e.setAttribute("data-s",""),e}var Go=(function(){function t(n){var s=this;this._insertTag=function(i){var o;s.tags.length===0?s.insertionPoint?o=s.insertionPoint.nextSibling:s.prepend?o=s.container.firstChild:o=s.before:o=s.tags[s.tags.length-1].nextSibling,s.container.insertBefore(i,o),s.tags.push(i)},this.isSpeedy=n.speedy===void 0?!0:n.speedy,this.tags=[],this.ctr=0,this.nonce=n.nonce,this.key=n.key,this.container=n.container,this.prepend=n.prepend,this.insertionPoint=n.insertionPoint,this.before=null}var e=t.prototype;return e.hydrate=function(s){s.forEach(this._insertTag)},e.insert=function(s){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(Ko(this));var i=this.tags[this.tags.length-1];if(this.isSpeedy){var o=Uo(i);try{o.insertRule(s,o.cssRules.length)}catch{}}else i.appendChild(document.createTextNode(s));this.ctr++},e.flush=function(){this.tags.forEach(function(s){var i;return(i=s.parentNode)==null?void 0:i.removeChild(s)}),this.tags=[],this.ctr=0},t})(),$="-ms-",Pe="-moz-",V="-webkit-",Ui="comm",_n="rule",Dn="decl",Ho="@import",Ki="@keyframes",Yo="@layer",Xo=Math.abs,De=String.fromCharCode,qo=Object.assign;function Zo(t,e){return B(t,0)^45?(((e<<2^B(t,0))<<2^B(t,1))<<2^B(t,2))<<2^B(t,3):0}function Gi(t){return t.trim()}function Jo(t,e){return(t=e.exec(t))?t[0]:t}function E(t,e,n){return t.replace(e,n)}function on(t,e){return t.indexOf(e)}function B(t,e){return t.charCodeAt(e)|0}function Jt(t,e,n){return t.slice(e,n)}function it(t){return t.length}function Rn(t){return t.length}function fe(t,e){return e.push(t),t}function Qo(t,e){return t.map(e).join("")}var Re=1,It=1,Hi=0,H=0,L=0,Bt="";function ke(t,e,n,s,i,o,r){return{value:t,root:e,parent:n,type:s,props:i,children:o,line:Re,column:It,length:r,return:""}}function Ut(t,e){return qo(ke("",null,null,"",null,null,0),t,{length:-t.length},e)}function ta(){return L}function ea(){return L=H>0?B(Bt,--H):0,It--,L===10&&(It=1,Re--),L}function Y(){return L=H<Hi?B(Bt,H++):0,It++,L===10&&(It=1,Re++),L}function rt(){return B(Bt,H)}function ye(){return H}function ae(t,e){return Jt(Bt,t,e)}function Qt(t){switch(t){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function Yi(t){return Re=It=1,Hi=it(Bt=t),H=0,[]}function Xi(t){return Bt="",t}function ve(t){return Gi(ae(H-1,an(t===91?t+2:t===40?t+1:t)))}function na(t){for(;(L=rt())&&L<33;)Y();return Qt(t)>2||Qt(L)>3?"":" "}function sa(t,e){for(;--e&&Y()&&!(L<48||L>102||L>57&&L<65||L>70&&L<97););return ae(t,ye()+(e<6&&rt()==32&&Y()==32))}function an(t){for(;Y();)switch(L){case t:return H;case 34:case 39:t!==34&&t!==39&&an(L);break;case 40:t===41&&an(t);break;case 92:Y();break}return H}function ia(t,e){for(;Y()&&t+L!==57;)if(t+L===84&&rt()===47)break;return"/*"+ae(e,H-1)+"*"+De(t===47?t:Y())}function ra(t){for(;!Qt(rt());)Y();return ae(t,H)}function oa(t){return Xi(xe("",null,null,null,[""],t=Yi(t),0,[0],t))}function xe(t,e,n,s,i,o,r,a,l){for(var u=0,c=0,h=r,f=0,d=0,m=0,g=1,x=1,p=1,y=0,v="",P=i,w=o,C=s,S=v;x;)switch(m=y,y=Y()){case 40:if(m!=108&&B(S,h-1)==58){on(S+=E(ve(y),"&","&\f"),"&\f")!=-1&&(p=-1);break}case 34:case 39:case 91:S+=ve(y);break;case 9:case 10:case 13:case 32:S+=na(m);break;case 92:S+=sa(ye()-1,7);continue;case 47:switch(rt()){case 42:case 47:fe(aa(ia(Y(),ye()),e,n),l);break;default:S+="/"}break;case 123*g:a[u++]=it(S)*p;case 125*g:case 59:case 0:switch(y){case 0:case 125:x=0;case 59+c:p==-1&&(S=E(S,/\f/g,"")),d>0&&it(S)-h&&fe(d>32?gs(S+";",s,n,h-1):gs(E(S," ","")+";",s,n,h-2),l);break;case 59:S+=";";default:if(fe(C=ps(S,e,n,u,c,i,a,v,P=[],w=[],h),o),y===123)if(c===0)xe(S,e,C,C,P,o,h,a,w);else switch(f===99&&B(S,3)===110?100:f){case 100:case 108:case 109:case 115:xe(t,C,C,s&&fe(ps(t,C,C,0,0,i,a,v,i,P=[],h),w),i,w,h,a,s?P:w);break;default:xe(S,C,C,C,[""],w,0,a,w)}}u=c=d=0,g=p=1,v=S="",h=r;break;case 58:h=1+it(S),d=m;default:if(g<1){if(y==123)--g;else if(y==125&&g++==0&&ea()==125)continue}switch(S+=De(y),y*g){case 38:p=c>0?1:(S+="\f",-1);break;case 44:a[u++]=(it(S)-1)*p,p=1;break;case 64:rt()===45&&(S+=ve(Y())),f=rt(),c=h=it(v=S+=ra(ye())),y++;break;case 45:m===45&&it(S)==2&&(g=0)}}return o}function ps(t,e,n,s,i,o,r,a,l,u,c){for(var h=i-1,f=i===0?o:[""],d=Rn(f),m=0,g=0,x=0;m<s;++m)for(var p=0,y=Jt(t,h+1,h=Xo(g=r[m])),v=t;p<d;++p)(v=Gi(g>0?f[p]+" "+y:E(y,/&\f/g,f[p])))&&(l[x++]=v);return ke(t,e,n,i===0?_n:a,l,u,c)}function aa(t,e,n){return ke(t,e,n,Ui,De(ta()),Jt(t,2,-2),0)}function gs(t,e,n,s){return ke(t,e,n,Dn,Jt(t,0,s),Jt(t,s+1,-1),s)}function Ot(t,e){for(var n="",s=Rn(t),i=0;i<s;i++)n+=e(t[i],i,t,e)||"";return n}function la(t,e,n,s){switch(t.type){case Yo:if(t.children.length)break;case Ho:case Dn:return t.return=t.return||t.value;case Ui:return"";case Ki:return t.return=t.value+"{"+Ot(t.children,s)+"}";case _n:t.value=t.props.join(",")}return it(n=Ot(t.children,s))?t.return=t.value+"{"+n+"}":""}function ca(t){var e=Rn(t);return function(n,s,i,o){for(var r="",a=0;a<e;a++)r+=t[a](n,s,i,o)||"";return r}}function ua(t){return function(e){e.root||(e=e.return)&&t(e)}}function ha(t){var e=Object.create(null);return function(n){return e[n]===void 0&&(e[n]=t(n)),e[n]}}var fa=function(e,n,s){for(var i=0,o=0;i=o,o=rt(),i===38&&o===12&&(n[s]=1),!Qt(o);)Y();return ae(e,H)},da=function(e,n){var s=-1,i=44;do switch(Qt(i)){case 0:i===38&&rt()===12&&(n[s]=1),e[s]+=fa(H-1,n,s);break;case 2:e[s]+=ve(i);break;case 4:if(i===44){e[++s]=rt()===58?"&\f":"",n[s]=e[s].length;break}default:e[s]+=De(i)}while(i=Y());return e},ma=function(e,n){return Xi(da(Yi(e),n))},ys=new WeakMap,pa=function(e){if(!(e.type!=="rule"||!e.parent||e.length<1)){for(var n=e.value,s=e.parent,i=e.column===s.column&&e.line===s.line;s.type!=="rule";)if(s=s.parent,!s)return;if(!(e.props.length===1&&n.charCodeAt(0)!==58&&!ys.get(s))&&!i){ys.set(e,!0);for(var o=[],r=ma(n,o),a=s.props,l=0,u=0;l<r.length;l++)for(var c=0;c<a.length;c++,u++)e.props[u]=o[l]?r[l].replace(/&\f/g,a[c]):a[c]+" "+r[l]}}},ga=function(e){if(e.type==="decl"){var n=e.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(e.return="",e.value="")}};function qi(t,e){switch(Zo(t,e)){case 5103:return V+"print-"+t+t;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return V+t+t;case 5349:case 4246:case 4810:case 6968:case 2756:return V+t+Pe+t+$+t+t;case 6828:case 4268:return V+t+$+t+t;case 6165:return V+t+$+"flex-"+t+t;case 5187:return V+t+E(t,/(\w+).+(:[^]+)/,V+"box-$1$2"+$+"flex-$1$2")+t;case 5443:return V+t+$+"flex-item-"+E(t,/flex-|-self/,"")+t;case 4675:return V+t+$+"flex-line-pack"+E(t,/align-content|flex-|-self/,"")+t;case 5548:return V+t+$+E(t,"shrink","negative")+t;case 5292:return V+t+$+E(t,"basis","preferred-size")+t;case 6060:return V+"box-"+E(t,"-grow","")+V+t+$+E(t,"grow","positive")+t;case 4554:return V+E(t,/([^-])(transform)/g,"$1"+V+"$2")+t;case 6187:return E(E(E(t,/(zoom-|grab)/,V+"$1"),/(image-set)/,V+"$1"),t,"")+t;case 5495:case 3959:return E(t,/(image-set\([^]*)/,V+"$1$`$1");case 4968:return E(E(t,/(.+:)(flex-)?(.*)/,V+"box-pack:$3"+$+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+V+t+t;case 4095:case 3583:case 4068:case 2532:return E(t,/(.+)-inline(.+)/,V+"$1$2")+t;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(it(t)-1-e>6)switch(B(t,e+1)){case 109:if(B(t,e+4)!==45)break;case 102:return E(t,/(.+:)(.+)-([^]+)/,"$1"+V+"$2-$3$1"+Pe+(B(t,e+3)==108?"$3":"$2-$3"))+t;case 115:return~on(t,"stretch")?qi(E(t,"stretch","fill-available"),e)+t:t}break;case 4949:if(B(t,e+1)!==115)break;case 6444:switch(B(t,it(t)-3-(~on(t,"!important")&&10))){case 107:return E(t,":",":"+V)+t;case 101:return E(t,/(.+:)([^;!]+)(;|!.+)?/,"$1"+V+(B(t,14)===45?"inline-":"")+"box$3$1"+V+"$2$3$1"+$+"$2box$3")+t}break;case 5936:switch(B(t,e+11)){case 114:return V+t+$+E(t,/[svh]\w+-[tblr]{2}/,"tb")+t;case 108:return V+t+$+E(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return V+t+$+E(t,/[svh]\w+-[tblr]{2}/,"lr")+t}return V+t+$+t+t}return t}var ya=function(e,n,s,i){if(e.length>-1&&!e.return)switch(e.type){case Dn:e.return=qi(e.value,e.length);break;case Ki:return Ot([Ut(e,{value:E(e.value,"@","@"+V)})],i);case _n:if(e.length)return Qo(e.props,function(o){switch(Jo(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Ot([Ut(e,{props:[E(o,/:(read-\w+)/,":"+Pe+"$1")]})],i);case"::placeholder":return Ot([Ut(e,{props:[E(o,/:(plac\w+)/,":"+V+"input-$1")]}),Ut(e,{props:[E(o,/:(plac\w+)/,":"+Pe+"$1")]}),Ut(e,{props:[E(o,/:(plac\w+)/,$+"input-$1")]})],i)}return""})}},va=[ya],xa=function(e){var n=e.key;if(n==="css"){var s=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(s,function(g){var x=g.getAttribute("data-emotion");x.indexOf(" ")!==-1&&(document.head.appendChild(g),g.setAttribute("data-s",""))})}var i=e.stylisPlugins||va,o={},r,a=[];r=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(g){for(var x=g.getAttribute("data-emotion").split(" "),p=1;p<x.length;p++)o[x[p]]=!0;a.push(g)});var l,u=[pa,ga];{var c,h=[la,ua(function(g){c.insert(g)})],f=ca(u.concat(i,h)),d=function(x){return Ot(oa(x),f)};l=function(x,p,y,v){c=y,d(x?x+"{"+p.styles+"}":p.styles),v&&(m.inserted[p.name]=!0)}}var m={key:n,sheet:new Go({key:n,container:r,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:o,registered:{},insert:l};return m.sheet.hydrate(a),m};function ba(t){for(var e=0,n,s=0,i=t.length;i>=4;++s,i-=4)n=t.charCodeAt(s)&255|(t.charCodeAt(++s)&255)<<8|(t.charCodeAt(++s)&255)<<16|(t.charCodeAt(++s)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,e=(n&65535)*1540483477+((n>>>16)*59797<<16)^(e&65535)*1540483477+((e>>>16)*59797<<16);switch(i){case 3:e^=(t.charCodeAt(s+2)&255)<<16;case 2:e^=(t.charCodeAt(s+1)&255)<<8;case 1:e^=t.charCodeAt(s)&255,e=(e&65535)*1540483477+((e>>>16)*59797<<16)}return e^=e>>>13,e=(e&65535)*1540483477+((e>>>16)*59797<<16),((e^e>>>15)>>>0).toString(36)}var wa={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},Ta=/[A-Z]|^ms/g,Sa=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Zi=function(e){return e.charCodeAt(1)===45},vs=function(e){return e!=null&&typeof e!="boolean"},Be=ha(function(t){return Zi(t)?t:t.replace(Ta,"-$&").toLowerCase()}),xs=function(e,n){switch(e){case"animation":case"animationName":if(typeof n=="string")return n.replace(Sa,function(s,i,o){return ft={name:i,styles:o,next:ft},i})}return wa[e]!==1&&!Zi(e)&&typeof n=="number"&&n!==0?n+"px":n};function Ce(t,e,n){if(n==null)return"";var s=n;if(s.__emotion_styles!==void 0)return s;switch(typeof n){case"boolean":return"";case"object":{var i=n;if(i.anim===1)return ft={name:i.name,styles:i.styles,next:ft},i.name;var o=n;if(o.styles!==void 0){var r=o.next;if(r!==void 0)for(;r!==void 0;)ft={name:r.name,styles:r.styles,next:ft},r=r.next;var a=o.styles+";";return a}return Pa(t,e,n)}}var l=n;if(e==null)return l;var u=e[l];return u!==void 0?u:l}function Pa(t,e,n){var s="";if(Array.isArray(n))for(var i=0;i<n.length;i++)s+=Ce(t,e,n[i])+";";else for(var o in n){var r=n[o];if(typeof r!="object"){var a=r;e!=null&&e[a]!==void 0?s+=o+"{"+e[a]+"}":vs(a)&&(s+=Be(o)+":"+xs(o,a)+";")}else if(Array.isArray(r)&&typeof r[0]=="string"&&(e==null||e[r[0]]===void 0))for(var l=0;l<r.length;l++)vs(r[l])&&(s+=Be(o)+":"+xs(o,r[l])+";");else{var u=Ce(t,e,r);switch(o){case"animation":case"animationName":{s+=Be(o)+":"+u+";";break}default:s+=o+"{"+u+"}"}}}return s}var bs=/label:\s*([^\s;{]+)\s*(;|$)/g,ft;function Ne(t,e,n){if(t.length===1&&typeof t[0]=="object"&&t[0]!==null&&t[0].styles!==void 0)return t[0];var s=!0,i="";ft=void 0;var o=t[0];if(o==null||o.raw===void 0)s=!1,i+=Ce(n,e,o);else{var r=o;i+=r[0]}for(var a=1;a<t.length;a++)if(i+=Ce(n,e,t[a]),s){var l=o;i+=l[a]}bs.lastIndex=0;for(var u="",c;(c=bs.exec(i))!==null;)u+="-"+c[1];var h=ba(i)+u;return{name:h,styles:i,next:ft}}function Ji(t,e,n){var s="";return n.split(" ").forEach(function(i){t[i]!==void 0?e.push(t[i]+";"):i&&(s+=i+" ")}),s}var Ca=function(e,n,s){var i=e.key+"-"+n.name;e.registered[i]===void 0&&(e.registered[i]=n.styles)},Aa=function(e,n,s){Ca(e,n);var i=e.key+"-"+n.name;if(e.inserted[n.name]===void 0){var o=n;do e.insert(n===o?"."+i:"",o,e.sheet,!0),o=o.next;while(o!==void 0)}};function ws(t,e){if(t.inserted[e.name]===void 0)return t.insert("",e,t.sheet,!0)}function Ts(t,e,n){var s=[],i=Ji(t,s,n);return s.length<2?n:i+e(s)}var Ma=function(e){var n=xa(e);n.sheet.speedy=function(a){this.isSpeedy=a},n.compat=!0;var s=function(){for(var l=arguments.length,u=new Array(l),c=0;c<l;c++)u[c]=arguments[c];var h=Ne(u,n.registered,void 0);return Aa(n,h),n.key+"-"+h.name},i=function(){for(var l=arguments.length,u=new Array(l),c=0;c<l;c++)u[c]=arguments[c];var h=Ne(u,n.registered),f="animation-"+h.name;return ws(n,{name:h.name,styles:"@keyframes "+f+"{"+h.styles+"}"}),f},o=function(){for(var l=arguments.length,u=new Array(l),c=0;c<l;c++)u[c]=arguments[c];var h=Ne(u,n.registered);ws(n,h)},r=function(){for(var l=arguments.length,u=new Array(l),c=0;c<l;c++)u[c]=arguments[c];return Ts(n.registered,s,Va(u))};return{css:s,cx:r,injectGlobal:o,keyframes:i,hydrate:function(l){l.forEach(function(u){n.inserted[u]=!0})},flush:function(){n.registered={},n.inserted={},n.sheet.flush()},sheet:n.sheet,cache:n,getRegisteredStyles:Ji.bind(null,n.registered),merge:Ts.bind(null,n.registered,s)}},Va=function t(e){for(var n="",s=0;s<e.length;s++){var i=e[s];if(i!=null){var o=void 0;switch(typeof i){case"boolean":break;case"object":{if(Array.isArray(i))o=t(i);else{o="";for(var r in i)i[r]&&r&&(o&&(o+=" "),o+=r)}break}default:o=i}o&&(n&&(n+=" "),n+=o)}}return n},Qi=Ma({key:"css"}),at=Qi.cx,U=Qi.css;function Ea(t){const{h:e,w:n,m:s,mx:i,my:o,mt:r,mr:a,mb:l,ml:u,p:c,px:h,py:f,pt:d,pr:m,pb:g,pl:x,xGap:p,yGap:y,row:v,flex:P,...w}=t;return{spacers:{h:e,w:n,m:s,mx:i,my:o,mt:r,mr:a,mb:l,ml:u,p:c,px:h,py:f,pt:d,pr:m,pb:g,pl:x,xGap:p,yGap:y,row:v,flex:P,...w},rest:w}}const _a=t=>U({display:"flex",flexDirection:t.row?"row":"column",height:t.h==="screen"?"100vh":t.h==="full"?"100%":t.h,width:t.w==="screen"?"100vw":t.w==="full"?"100%":t.w,margin:t.m,marginTop:t.mt??t.my,marginBottom:t.mb??t.my,marginLeft:t.ml??t.mx,marginRight:t.mr??t.mx,padding:t.p,paddingTop:t.pt??t.py,paddingBottom:t.pb??t.py,paddingLeft:t.pl??t.px,paddingRight:t.pr??t.px,gap:t.gap,columnGap:t.xGap,rowGap:t.yGap,justifyContent:t.center?"center":t.justifyContent,alignItems:t.center?"center":t.alignItems,alignSelf:t.alignSelf,borderWidth:t.borderWidth,borderBottomWidth:t.borderBottomWidth,borderColor:t.borderColor,borderRadius:t.borderRadius,zIndex:t.zIndex,overflow:t.overflow,minWidth:t.minWidth,minHeight:t.minHeight,maxWidth:t.maxWidth,maxHeight:t.maxHeight,flex:t.flex===!0?1:t.flex,flexWrap:t.flexWrap,flexGrow:t.flexGrow,flexShrink:t.flexShrink,flexBasis:t.flexBasis,backgroundColor:t.backgroundColor,...t.absoluteFill&&{position:"absolute",top:0,right:0,bottom:0,left:0}}),K=b.forwardRef(({className:t,children:e,...n},s)=>{const{spacers:i,rest:o}=Ea(n),r=b.useMemo(()=>_a(i),[i]);return A.jsx("div",{ref:s,className:at(r,t),...o,children:e})});K.displayName="Box";const tr=b.createContext({});function Da(t){const e=b.useRef(null);return e.current===null&&(e.current=t()),e.current}const kn=typeof window<"u",Ra=kn?b.useLayoutEffect:b.useEffect,On=b.createContext(null);function Ln(t,e){t.indexOf(e)===-1&&t.push(e)}function In(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const lt=(t,e,n)=>n>e?e:n<t?t:n;function ln(t,e){return e?`${t}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${e}`:t}let Nt=()=>{},ct=()=>{};process.env.NODE_ENV!=="production"&&(Nt=(t,e,n)=>{!t&&typeof console<"u"&&console.warn(ln(e,n))},ct=(t,e,n)=>{if(!t)throw new Error(ln(e,n))});const ut={},er=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t);function nr(t){return typeof t=="object"&&t!==null}const sr=t=>/^0[^.\s]+$/u.test(t);function jn(t){let e;return()=>(e===void 0&&(e=t()),e)}const et=t=>t,ka=(t,e)=>n=>e(t(n)),le=(...t)=>t.reduce(ka),te=(t,e,n)=>{const s=e-t;return s===0?1:(n-t)/s};class Fn{constructor(){this.subscriptions=[]}add(e){return Ln(this.subscriptions,e),()=>In(this.subscriptions,e)}notify(e,n,s){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](e,n,s);else for(let o=0;o<i;o++){const r=this.subscriptions[o];r&&r(e,n,s)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const st=t=>t*1e3,tt=t=>t/1e3;function ir(t,e){return e?t*(1e3/e):0}const Ss=new Set;function Bn(t,e,n){t||Ss.has(e)||(console.warn(ln(e,n)),Ss.add(e))}const rr=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,Oa=1e-7,La=12;function Ia(t,e,n,s,i){let o,r,a=0;do r=e+(n-e)/2,o=rr(r,s,i)-t,o>0?n=r:e=r;while(Math.abs(o)>Oa&&++a<La);return r}function ce(t,e,n,s){if(t===e&&n===s)return et;const i=o=>Ia(o,0,1,t,n);return o=>o===0||o===1?o:rr(i(o),e,s)}const or=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,ar=t=>e=>1-t(1-e),lr=ce(.33,1.53,.69,.99),Nn=ar(lr),cr=or(Nn),ur=t=>(t*=2)<1?.5*Nn(t):.5*(2-Math.pow(2,-10*(t-1))),$n=t=>1-Math.sin(Math.acos(t)),hr=ar($n),fr=or($n),ja=ce(.42,0,1,1),Fa=ce(0,0,.58,1),dr=ce(.42,0,.58,1),Ba=t=>Array.isArray(t)&&typeof t[0]!="number",mr=t=>Array.isArray(t)&&typeof t[0]=="number",Ps={linear:et,easeIn:ja,easeInOut:dr,easeOut:Fa,circIn:$n,circInOut:fr,circOut:hr,backIn:Nn,backInOut:cr,backOut:lr,anticipate:ur},Na=t=>typeof t=="string",Cs=t=>{if(mr(t)){ct(t.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[e,n,s,i]=t;return ce(e,n,s,i)}else if(Na(t))return ct(Ps[t]!==void 0,`Invalid easing type '${t}'`,"invalid-easing-type"),Ps[t];return t},de=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function $a(t,e){let n=new Set,s=new Set,i=!1,o=!1;const r=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function l(c){r.has(c)&&(u.schedule(c),t()),c(a)}const u={schedule:(c,h=!1,f=!1)=>{const m=f&&i?n:s;return h&&r.add(c),m.has(c)||m.add(c),c},cancel:c=>{s.delete(c),r.delete(c)},process:c=>{if(a=c,i){o=!0;return}i=!0,[n,s]=[s,n],n.forEach(l),n.clear(),i=!1,o&&(o=!1,u.process(c))}};return u}const za=40;function pr(t,e){let n=!1,s=!0;const i={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,r=de.reduce((v,P)=>(v[P]=$a(o),v),{}),{setup:a,read:l,resolveKeyframes:u,preUpdate:c,update:h,preRender:f,render:d,postRender:m}=r,g=()=>{const v=ut.useManualTiming?i.timestamp:performance.now();n=!1,ut.useManualTiming||(i.delta=s?1e3/60:Math.max(Math.min(v-i.timestamp,za),1)),i.timestamp=v,i.isProcessing=!0,a.process(i),l.process(i),u.process(i),c.process(i),h.process(i),f.process(i),d.process(i),m.process(i),i.isProcessing=!1,n&&e&&(s=!1,t(g))},x=()=>{n=!0,s=!0,i.isProcessing||t(g)};return{schedule:de.reduce((v,P)=>{const w=r[P];return v[P]=(C,S=!1,M=!1)=>(n||x(),w.schedule(C,S,M)),v},{}),cancel:v=>{for(let P=0;P<de.length;P++)r[de[P]].cancel(v)},state:i,steps:r}}const{schedule:_,cancel:dt,state:F,steps:$e}=pr(typeof requestAnimationFrame<"u"?requestAnimationFrame:et,!0);let be;function Wa(){be=void 0}const G={now:()=>(be===void 0&&G.set(F.isProcessing||ut.useManualTiming?F.timestamp:performance.now()),be),set:t=>{be=t,queueMicrotask(Wa)}},gr=t=>e=>typeof e=="string"&&e.startsWith(t),zn=gr("--"),Ua=gr("var(--"),Wn=t=>Ua(t)?Ka.test(t.split("/*")[0].trim()):!1,Ka=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,$t={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},ee={...$t,transform:t=>lt(0,1,t)},me={...$t,default:1},Yt=t=>Math.round(t*1e5)/1e5,Un=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Ga(t){return t==null}const Ha=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Kn=(t,e)=>n=>!!(typeof n=="string"&&Ha.test(n)&&n.startsWith(t)||e&&!Ga(n)&&Object.prototype.hasOwnProperty.call(n,e)),yr=(t,e,n)=>s=>{if(typeof s!="string")return s;const[i,o,r,a]=s.match(Un);return{[t]:parseFloat(i),[e]:parseFloat(o),[n]:parseFloat(r),alpha:a!==void 0?parseFloat(a):1}},Ya=t=>lt(0,255,t),ze={...$t,transform:t=>Math.round(Ya(t))},xt={test:Kn("rgb","red"),parse:yr("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+ze.transform(t)+", "+ze.transform(e)+", "+ze.transform(n)+", "+Yt(ee.transform(s))+")"};function Xa(t){let e="",n="",s="",i="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),s=t.substring(5,7),i=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),s=t.substring(3,4),i=t.substring(4,5),e+=e,n+=n,s+=s,i+=i),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(s,16),alpha:i?parseInt(i,16)/255:1}}const cn={test:Kn("#"),parse:Xa,transform:xt.transform},ue=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),ht=ue("deg"),ot=ue("%"),T=ue("px"),qa=ue("vh"),Za=ue("vw"),As={...ot,parse:t=>ot.parse(t)/100,transform:t=>ot.transform(t*100)},Vt={test:Kn("hsl","hue"),parse:yr("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:s=1})=>"hsla("+Math.round(t)+", "+ot.transform(Yt(e))+", "+ot.transform(Yt(n))+", "+Yt(ee.transform(s))+")"},O={test:t=>xt.test(t)||cn.test(t)||Vt.test(t),parse:t=>xt.test(t)?xt.parse(t):Vt.test(t)?Vt.parse(t):cn.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?xt.transform(t):Vt.transform(t),getAnimatableNone:t=>{const e=O.parse(t);return e.alpha=0,O.transform(e)}},Ja=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Qa(t){return isNaN(t)&&typeof t=="string"&&(t.match(Un)?.length||0)+(t.match(Ja)?.length||0)>0}const vr="number",xr="color",tl="var",el="var(",Ms="${}",nl=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function ne(t){const e=t.toString(),n=[],s={color:[],number:[],var:[]},i=[];let o=0;const a=e.replace(nl,l=>(O.test(l)?(s.color.push(o),i.push(xr),n.push(O.parse(l))):l.startsWith(el)?(s.var.push(o),i.push(tl),n.push(l)):(s.number.push(o),i.push(vr),n.push(parseFloat(l))),++o,Ms)).split(Ms);return{values:n,split:a,indexes:s,types:i}}function br(t){return ne(t).values}function wr(t){const{split:e,types:n}=ne(t),s=e.length;return i=>{let o="";for(let r=0;r<s;r++)if(o+=e[r],i[r]!==void 0){const a=n[r];a===vr?o+=Yt(i[r]):a===xr?o+=O.transform(i[r]):o+=i[r]}return o}}const sl=t=>typeof t=="number"?0:O.test(t)?O.getAnimatableNone(t):t;function il(t){const e=br(t);return wr(t)(e.map(sl))}const mt={test:Qa,parse:br,createTransformer:wr,getAnimatableNone:il};function We(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function rl({hue:t,saturation:e,lightness:n,alpha:s}){t/=360,e/=100,n/=100;let i=0,o=0,r=0;if(!e)i=o=r=n;else{const a=n<.5?n*(1+e):n+e-n*e,l=2*n-a;i=We(l,a,t+1/3),o=We(l,a,t),r=We(l,a,t-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(r*255),alpha:s}}function Ae(t,e){return n=>n>0?e:t}const R=(t,e,n)=>t+(e-t)*n,Ue=(t,e,n)=>{const s=t*t,i=n*(e*e-s)+s;return i<0?0:Math.sqrt(i)},ol=[cn,xt,Vt],al=t=>ol.find(e=>e.test(t));function Vs(t){const e=al(t);if(Nt(!!e,`'${t}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!e)return!1;let n=e.parse(t);return e===Vt&&(n=rl(n)),n}const Es=(t,e)=>{const n=Vs(t),s=Vs(e);if(!n||!s)return Ae(t,e);const i={...n};return o=>(i.red=Ue(n.red,s.red,o),i.green=Ue(n.green,s.green,o),i.blue=Ue(n.blue,s.blue,o),i.alpha=R(n.alpha,s.alpha,o),xt.transform(i))},un=new Set(["none","hidden"]);function ll(t,e){return un.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function cl(t,e){return n=>R(t,e,n)}function Gn(t){return typeof t=="number"?cl:typeof t=="string"?Wn(t)?Ae:O.test(t)?Es:fl:Array.isArray(t)?Tr:typeof t=="object"?O.test(t)?Es:ul:Ae}function Tr(t,e){const n=[...t],s=n.length,i=t.map((o,r)=>Gn(o)(o,e[r]));return o=>{for(let r=0;r<s;r++)n[r]=i[r](o);return n}}function ul(t,e){const n={...t,...e},s={};for(const i in n)t[i]!==void 0&&e[i]!==void 0&&(s[i]=Gn(t[i])(t[i],e[i]));return i=>{for(const o in s)n[o]=s[o](i);return n}}function hl(t,e){const n=[],s={color:0,var:0,number:0};for(let i=0;i<e.values.length;i++){const o=e.types[i],r=t.indexes[o][s[o]],a=t.values[r]??0;n[i]=a,s[o]++}return n}const fl=(t,e)=>{const n=mt.createTransformer(e),s=ne(t),i=ne(e);return s.indexes.var.length===i.indexes.var.length&&s.indexes.color.length===i.indexes.color.length&&s.indexes.number.length>=i.indexes.number.length?un.has(t)&&!i.values.length||un.has(e)&&!s.values.length?ll(t,e):le(Tr(hl(s,i),i.values),n):(Nt(!0,`Complex values '${t}' and '${e}' 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.`,"complex-values-different"),Ae(t,e))};function Sr(t,e,n){return typeof t=="number"&&typeof e=="number"&&typeof n=="number"?R(t,e,n):Gn(t)(t,e)}const dl=t=>{const e=({timestamp:n})=>t(n);return{start:(n=!0)=>_.update(e,n),stop:()=>dt(e),now:()=>F.isProcessing?F.timestamp:G.now()}},Pr=(t,e,n=10)=>{let s="";const i=Math.max(Math.round(e/n),2);for(let o=0;o<i;o++)s+=Math.round(t(o/(i-1))*1e4)/1e4+", ";return`linear(${s.substring(0,s.length-2)})`},Me=2e4;function Hn(t){let e=0;const n=50;let s=t.next(e);for(;!s.done&&e<Me;)e+=n,s=t.next(e);return e>=Me?1/0:e}function ml(t,e=100,n){const s=n({...t,keyframes:[0,e]}),i=Math.min(Hn(s),Me);return{type:"keyframes",ease:o=>s.next(i*o).value/e,duration:tt(i)}}const pl=5;function Cr(t,e,n){const s=Math.max(e-pl,0);return ir(n-t(s),e-s)}const D={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},Ke=.001;function gl({duration:t=D.duration,bounce:e=D.bounce,velocity:n=D.velocity,mass:s=D.mass}){let i,o;Nt(t<=st(D.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let r=1-e;r=lt(D.minDamping,D.maxDamping,r),t=lt(D.minDuration,D.maxDuration,tt(t)),r<1?(i=u=>{const c=u*r,h=c*t,f=c-n,d=hn(u,r),m=Math.exp(-h);return Ke-f/d*m},o=u=>{const h=u*r*t,f=h*n+n,d=Math.pow(r,2)*Math.pow(u,2)*t,m=Math.exp(-h),g=hn(Math.pow(u,2),r);return(-i(u)+Ke>0?-1:1)*((f-d)*m)/g}):(i=u=>{const c=Math.exp(-u*t),h=(u-n)*t+1;return-Ke+c*h},o=u=>{const c=Math.exp(-u*t),h=(n-u)*(t*t);return c*h});const a=5/t,l=vl(i,o,a);if(t=st(t),isNaN(l))return{stiffness:D.stiffness,damping:D.damping,duration:t};{const u=Math.pow(l,2)*s;return{stiffness:u,damping:r*2*Math.sqrt(s*u),duration:t}}}const yl=12;function vl(t,e,n){let s=n;for(let i=1;i<yl;i++)s=s-t(s)/e(s);return s}function hn(t,e){return t*Math.sqrt(1-e*e)}const xl=["duration","bounce"],bl=["stiffness","damping","mass"];function _s(t,e){return e.some(n=>t[n]!==void 0)}function wl(t){let e={velocity:D.velocity,stiffness:D.stiffness,damping:D.damping,mass:D.mass,isResolvedFromDuration:!1,...t};if(!_s(t,bl)&&_s(t,xl))if(t.visualDuration){const n=t.visualDuration,s=2*Math.PI/(n*1.2),i=s*s,o=2*lt(.05,1,1-(t.bounce||0))*Math.sqrt(i);e={...e,mass:D.mass,stiffness:i,damping:o}}else{const n=gl(t);e={...e,...n,mass:D.mass},e.isResolvedFromDuration=!0}return e}function Ve(t=D.visualDuration,e=D.bounce){const n=typeof t!="object"?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:s,restDelta:i}=n;const o=n.keyframes[0],r=n.keyframes[n.keyframes.length-1],a={done:!1,value:o},{stiffness:l,damping:u,mass:c,duration:h,velocity:f,isResolvedFromDuration:d}=wl({...n,velocity:-tt(n.velocity||0)}),m=f||0,g=u/(2*Math.sqrt(l*c)),x=r-o,p=tt(Math.sqrt(l/c)),y=Math.abs(x)<5;s||(s=y?D.restSpeed.granular:D.restSpeed.default),i||(i=y?D.restDelta.granular:D.restDelta.default);let v;if(g<1){const w=hn(p,g);v=C=>{const S=Math.exp(-g*p*C);return r-S*((m+g*p*x)/w*Math.sin(w*C)+x*Math.cos(w*C))}}else if(g===1)v=w=>r-Math.exp(-p*w)*(x+(m+p*x)*w);else{const w=p*Math.sqrt(g*g-1);v=C=>{const S=Math.exp(-g*p*C),M=Math.min(w*C,300);return r-S*((m+g*p*x)*Math.sinh(M)+w*x*Math.cosh(M))/w}}const P={calculatedDuration:d&&h||null,next:w=>{const C=v(w);if(d)a.done=w>=h;else{let S=w===0?m:0;g<1&&(S=w===0?st(m):Cr(v,w,C));const M=Math.abs(S)<=s,N=Math.abs(r-C)<=i;a.done=M&&N}return a.value=a.done?r:C,a},toString:()=>{const w=Math.min(Hn(P),Me),C=Pr(S=>P.next(w*S).value,w,30);return w+"ms "+C},toTransition:()=>{}};return P}Ve.applyToOptions=t=>{const e=ml(t,100,Ve);return t.ease=e.ease,t.duration=st(e.duration),t.type="keyframes",t};function fn({keyframes:t,velocity:e=0,power:n=.8,timeConstant:s=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:r,min:a,max:l,restDelta:u=.5,restSpeed:c}){const h=t[0],f={done:!1,value:h},d=M=>a!==void 0&&M<a||l!==void 0&&M>l,m=M=>a===void 0?l:l===void 0||Math.abs(a-M)<Math.abs(l-M)?a:l;let g=n*e;const x=h+g,p=r===void 0?x:r(x);p!==x&&(g=p-h);const y=M=>-g*Math.exp(-M/s),v=M=>p+y(M),P=M=>{const N=y(M),X=v(M);f.done=Math.abs(N)<=u,f.value=f.done?p:X};let w,C;const S=M=>{d(f.value)&&(w=M,C=Ve({keyframes:[f.value,m(f.value)],velocity:Cr(v,M,f.value),damping:i,stiffness:o,restDelta:u,restSpeed:c}))};return S(0),{calculatedDuration:null,next:M=>{let N=!1;return!C&&w===void 0&&(N=!0,P(M),S(M)),w!==void 0&&M>=w?C.next(M-w):(!N&&P(M),f)}}}function Tl(t,e,n){const s=[],i=n||ut.mix||Sr,o=t.length-1;for(let r=0;r<o;r++){let a=i(t[r],t[r+1]);if(e){const l=Array.isArray(e)?e[r]||et:e;a=le(l,a)}s.push(a)}return s}function Sl(t,e,{clamp:n=!0,ease:s,mixer:i}={}){const o=t.length;if(ct(o===e.length,"Both input and output ranges must be the same length","range-length"),o===1)return()=>e[0];if(o===2&&e[0]===e[1])return()=>e[1];const r=t[0]===t[1];t[0]>t[o-1]&&(t=[...t].reverse(),e=[...e].reverse());const a=Tl(e,s,i),l=a.length,u=c=>{if(r&&c<t[0])return e[0];let h=0;if(l>1)for(;h<t.length-2&&!(c<t[h+1]);h++);const f=te(t[h],t[h+1],c);return a[h](f)};return n?c=>u(lt(t[0],t[o-1],c)):u}function Pl(t,e){const n=t[t.length-1];for(let s=1;s<=e;s++){const i=te(0,e,s);t.push(R(n,1,i))}}function Cl(t){const e=[0];return Pl(e,t.length-1),e}function Al(t,e){return t.map(n=>n*e)}function Ml(t,e){return t.map(()=>e||dr).splice(0,t.length-1)}function Et({duration:t=300,keyframes:e,times:n,ease:s="easeInOut"}){const i=Ba(s)?s.map(Cs):Cs(s),o={done:!1,value:e[0]},r=Al(n&&n.length===e.length?n:Cl(e),t),a=Sl(r,e,{ease:Array.isArray(i)?i:Ml(e,i)});return{calculatedDuration:t,next:l=>(o.value=a(l),o.done=l>=t,o)}}const Vl=t=>t!==null;function Yn(t,{repeat:e,repeatType:n="loop"},s,i=1){const o=t.filter(Vl),a=i<0||e&&n!=="loop"&&e%2===1?0:o.length-1;return!a||s===void 0?o[a]:s}const El={decay:fn,inertia:fn,tween:Et,keyframes:Et,spring:Ve};function Ar(t){typeof t.type=="string"&&(t.type=El[t.type])}class Xn{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,n){return this.finished.then(e,n)}}const _l=t=>t/100;class qn extends Xn{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:n}=this.options;n&&n.updatedAt!==G.now()&&this.tick(G.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){const{options:e}=this;Ar(e);const{type:n=Et,repeat:s=0,repeatDelay:i=0,repeatType:o,velocity:r=0}=e;let{keyframes:a}=e;const l=n||Et;process.env.NODE_ENV!=="production"&&l!==Et&&ct(a.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`,"spring-two-frames"),l!==Et&&typeof a[0]!="number"&&(this.mixKeyframes=le(_l,Sr(a[0],a[1])),a=[0,100]);const u=l({...e,keyframes:a});o==="mirror"&&(this.mirroredGenerator=l({...e,keyframes:[...a].reverse(),velocity:-r})),u.calculatedDuration===null&&(u.calculatedDuration=Hn(u));const{calculatedDuration:c}=u;this.calculatedDuration=c,this.resolvedDuration=c+i,this.totalDuration=this.resolvedDuration*(s+1)-i,this.generator=u}updateTime(e){const n=Math.round(e-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(e,n=!1){const{generator:s,totalDuration:i,mixKeyframes:o,mirroredGenerator:r,resolvedDuration:a,calculatedDuration:l}=this;if(this.startTime===null)return s.next(0);const{delay:u=0,keyframes:c,repeat:h,repeatType:f,repeatDelay:d,type:m,onUpdate:g,finalKeyframe:x}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-i/this.speed,this.startTime)),n?this.currentTime=e:this.updateTime(e);const p=this.currentTime-u*(this.playbackSpeed>=0?1:-1),y=this.playbackSpeed>=0?p<0:p>i;this.currentTime=Math.max(p,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let v=this.currentTime,P=s;if(h){const M=Math.min(this.currentTime,i)/a;let N=Math.floor(M),X=M%1;!X&&M>=1&&(X=1),X===1&&N--,N=Math.min(N,h+1),!!(N%2)&&(f==="reverse"?(X=1-X,d&&(X-=d/a)):f==="mirror"&&(P=r)),v=lt(0,1,X)*a}const w=y?{done:!1,value:c[0]}:P.next(v);o&&(w.value=o(w.value));let{done:C}=w;!y&&l!==null&&(C=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const S=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&C);return S&&m!==fn&&(w.value=Yn(c,this.options,x,this.speed)),g&&g(w.value),S&&this.finish(),w}then(e,n){return this.finished.then(e,n)}get duration(){return tt(this.calculatedDuration)}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+tt(e)}get time(){return tt(this.currentTime)}set time(e){e=st(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(e){this.updateTime(G.now());const n=this.playbackSpeed!==e;this.playbackSpeed=e,n&&(this.time=tt(this.currentTime))}play(){if(this.isStopped)return;const{driver:e=dl,startTime:n}=this.options;this.driver||(this.driver=e(i=>this.tick(i))),this.options.onPlay?.();const s=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=s):this.holdTime!==null?this.startTime=s-this.holdTime:this.startTime||(this.startTime=n??s),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(G.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),e.observe(this)}}function Dl(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}const bt=t=>t*180/Math.PI,dn=t=>{const e=bt(Math.atan2(t[1],t[0]));return mn(e)},Rl={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:dn,rotateZ:dn,skewX:t=>bt(Math.atan(t[1])),skewY:t=>bt(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},mn=t=>(t=t%360,t<0&&(t+=360),t),Ds=dn,Rs=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),ks=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),kl={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Rs,scaleY:ks,scale:t=>(Rs(t)+ks(t))/2,rotateX:t=>mn(bt(Math.atan2(t[6],t[5]))),rotateY:t=>mn(bt(Math.atan2(-t[2],t[0]))),rotateZ:Ds,rotate:Ds,skewX:t=>bt(Math.atan(t[4])),skewY:t=>bt(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function pn(t){return t.includes("scale")?1:0}function gn(t,e){if(!t||t==="none")return pn(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let s,i;if(n)s=kl,i=n;else{const a=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);s=Rl,i=a}if(!i)return pn(e);const o=s[e],r=i[1].split(",").map(Ll);return typeof o=="function"?o(r):r[o]}const Ol=(t,e)=>{const{transform:n="none"}=getComputedStyle(t);return gn(n,e)};function Ll(t){return parseFloat(t.trim())}const zt=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Wt=new Set(zt),Os=t=>t===$t||t===T,Il=new Set(["x","y","z"]),jl=zt.filter(t=>!Il.has(t));function Fl(t){const e=[];return jl.forEach(n=>{const s=t.getValue(n);s!==void 0&&(e.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),e}const Tt={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:(t,{transform:e})=>gn(e,"x"),y:(t,{transform:e})=>gn(e,"y")};Tt.translateX=Tt.x;Tt.translateY=Tt.y;const St=new Set;let yn=!1,vn=!1,xn=!1;function Mr(){if(vn){const t=Array.from(St).filter(s=>s.needsMeasurement),e=new Set(t.map(s=>s.element)),n=new Map;e.forEach(s=>{const i=Fl(s);i.length&&(n.set(s,i),s.render())}),t.forEach(s=>s.measureInitialState()),e.forEach(s=>{s.render();const i=n.get(s);i&&i.forEach(([o,r])=>{s.getValue(o)?.set(r)})}),t.forEach(s=>s.measureEndState()),t.forEach(s=>{s.suspendedScrollY!==void 0&&window.scrollTo(0,s.suspendedScrollY)})}vn=!1,yn=!1,St.forEach(t=>t.complete(xn)),St.clear()}function Vr(){St.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(vn=!0)})}function Bl(){xn=!0,Vr(),Mr(),xn=!1}class Zn{constructor(e,n,s,i,o,r=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=n,this.name=s,this.motionValue=i,this.element=o,this.isAsync=r}scheduleResolve(){this.state="scheduled",this.isAsync?(St.add(this),yn||(yn=!0,_.read(Vr),_.resolveKeyframes(Mr))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:n,element:s,motionValue:i}=this;if(e[0]===null){const o=i?.get(),r=e[e.length-1];if(o!==void 0)e[0]=o;else if(s&&n){const a=s.readValue(n,r);a!=null&&(e[0]=a)}e[0]===void 0&&(e[0]=r),i&&o===void 0&&i.set(e[0])}Dl(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),St.delete(this)}cancel(){this.state==="scheduled"&&(St.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const Nl=t=>t.startsWith("--");function $l(t,e,n){Nl(e)?t.style.setProperty(e,n):t.style[e]=n}const zl=jn(()=>window.ScrollTimeline!==void 0),Wl={};function Ul(t,e){const n=jn(t);return()=>Wl[e]??n()}const Er=Ul(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Ht=([t,e,n,s])=>`cubic-bezier(${t}, ${e}, ${n}, ${s})`,Ls={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Ht([0,.65,.55,1]),circOut:Ht([.55,0,1,.45]),backIn:Ht([.31,.01,.66,-.59]),backOut:Ht([.33,1.53,.69,.99])};function _r(t,e){if(t)return typeof t=="function"?Er()?Pr(t,e):"ease-out":mr(t)?Ht(t):Array.isArray(t)?t.map(n=>_r(n,e)||Ls.easeOut):Ls[t]}function Kl(t,e,n,{delay:s=0,duration:i=300,repeat:o=0,repeatType:r="loop",ease:a="easeOut",times:l}={},u=void 0){const c={[e]:n};l&&(c.offset=l);const h=_r(a,i);Array.isArray(h)&&(c.easing=h);const f={delay:s,duration:i,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:o+1,direction:r==="reverse"?"alternate":"normal"};return u&&(f.pseudoElement=u),t.animate(c,f)}function Dr(t){return typeof t=="function"&&"applyToOptions"in t}function Gl({type:t,...e}){return Dr(t)&&Er()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class Hl extends Xn{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,!e)return;const{element:n,name:s,keyframes:i,pseudoElement:o,allowFlatten:r=!1,finalKeyframe:a,onComplete:l}=e;this.isPseudoElement=!!o,this.allowFlatten=r,this.options=e,ct(typeof e.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const u=Gl(e);this.animation=Kl(n,s,i,u,o),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const c=Yn(i,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(c):$l(n,s,c),this.animation.cancel()}l?.(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:e}=this;e==="idle"||e==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){const e=this.animation.effect?.getComputedTiming?.().duration||0;return tt(Number(e))}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+tt(e)}get time(){return tt(Number(this.animation.currentTime)||0)}set time(e){this.finishedTime=null,this.animation.currentTime=st(e)}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(e){this.animation.startTime=e}attachTimeline({timeline:e,observe:n}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,e&&zl()?(this.animation.timeline=e,et):n(this)}}const Rr={anticipate:ur,backInOut:cr,circInOut:fr};function Yl(t){return t in Rr}function Xl(t){typeof t.ease=="string"&&Yl(t.ease)&&(t.ease=Rr[t.ease])}const Is=10;class ql extends Hl{constructor(e){Xl(e),Ar(e),super(e),e.startTime&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){const{motionValue:n,onUpdate:s,onComplete:i,element:o,...r}=this.options;if(!n)return;if(e!==void 0){n.set(e);return}const a=new qn({...r,autoplay:!1}),l=st(this.finishedTime??this.time);n.setWithVelocity(a.sample(l-Is).value,a.sample(l).value,Is),a.stop()}}const js=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(mt.test(t)||t==="0")&&!t.startsWith("url("));function Zl(t){const e=t[0];if(t.length===1)return!0;for(let n=0;n<t.length;n++)if(t[n]!==e)return!0}function Jl(t,e,n,s){const i=t[0];if(i===null)return!1;if(e==="display"||e==="visibility")return!0;const o=t[t.length-1],r=js(i,e),a=js(o,e);return Nt(r===a,`You are trying to animate ${e} from "${i}" to "${o}". "${r?o:i}" is not an animatable value.`,"value-not-animatable"),!r||!a?!1:Zl(t)||(n==="spring"||Dr(n))&&s}function bn(t){t.duration=0,t.type="keyframes"}const Ql=new Set(["opacity","clipPath","filter","transform"]),tc=jn(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function ec(t){const{motionValue:e,name:n,repeatDelay:s,repeatType:i,damping:o,type:r}=t;if(!(e?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:u}=e.owner.getProps();return tc()&&n&&Ql.has(n)&&(n!=="transform"||!u)&&!l&&!s&&i!=="mirror"&&o!==0&&r!=="inertia"}const nc=40;class sc extends Xn{constructor({autoplay:e=!0,delay:n=0,type:s="keyframes",repeat:i=0,repeatDelay:o=0,repeatType:r="loop",keyframes:a,name:l,motionValue:u,element:c,...h}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=G.now();const f={autoplay:e,delay:n,type:s,repeat:i,repeatDelay:o,repeatType:r,name:l,motionValue:u,element:c,...h},d=c?.KeyframeResolver||Zn;this.keyframeResolver=new d(a,(m,g,x)=>this.onKeyframesResolved(m,g,f,!x),l,u,c),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,n,s,i){this.keyframeResolver=void 0;const{name:o,type:r,velocity:a,delay:l,isHandoff:u,onUpdate:c}=s;this.resolvedAt=G.now(),Jl(e,o,r,a)||((ut.instantAnimations||!l)&&c?.(Yn(e,s,n)),e[0]=e[e.length-1],bn(s),s.repeat=0);const f={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>nc?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...s,keyframes:e},d=!u&&ec(f)?new ql({...f,element:f.motionValue.owner.current}):new qn(f);d.finished.then(()=>this.notifyFinished()).catch(et),this.pendingTimeline&&(this.stopTimeline=d.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=d}get finished(){return this._animation?this.animation.finished:this._finished}then(e,n){return this.finished.finally(e).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),Bl()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}const ic=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function rc(t){const e=ic.exec(t);if(!e)return[,];const[,n,s,i]=e;return[`--${n??s}`,i]}const oc=4;function kr(t,e,n=1){ct(n<=oc,`Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[s,i]=rc(t);if(!s)return;const o=window.getComputedStyle(e).getPropertyValue(s);if(o){const r=o.trim();return er(r)?parseFloat(r):r}return Wn(i)?kr(i,e,n+1):i}function Jn(t,e){return t?.[e]??t?.default??t}const Or=new Set(["width","height","top","left","right","bottom",...zt]),ac={test:t=>t==="auto",parse:t=>t},Lr=t=>e=>e.test(t),Ir=[$t,T,ot,ht,Za,qa,ac],Fs=t=>Ir.find(Lr(t));function lc(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||sr(t):!0}const cc=new Set(["brightness","contrast","saturate","opacity"]);function uc(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[s]=n.match(Un)||[];if(!s)return t;const i=n.replace(s,"");let o=cc.has(e)?1:0;return s!==n&&(o*=100),e+"("+o+i+")"}const hc=/\b([a-z-]*)\(.*?\)/gu,wn={...mt,getAnimatableNone:t=>{const e=t.match(hc);return e?e.map(uc).join(" "):t}},Bs={...$t,transform:Math.round},fc={rotate:ht,rotateX:ht,rotateY:ht,rotateZ:ht,scale:me,scaleX:me,scaleY:me,scaleZ:me,skew:ht,skewX:ht,skewY:ht,distance:T,translateX:T,translateY:T,translateZ:T,x:T,y:T,z:T,perspective:T,transformPerspective:T,opacity:ee,originX:As,originY:As,originZ:T},Qn={borderWidth:T,borderTopWidth:T,borderRightWidth:T,borderBottomWidth:T,borderLeftWidth:T,borderRadius:T,radius:T,borderTopLeftRadius:T,borderTopRightRadius:T,borderBottomRightRadius:T,borderBottomLeftRadius:T,width:T,maxWidth:T,height:T,maxHeight:T,top:T,right:T,bottom:T,left:T,padding:T,paddingTop:T,paddingRight:T,paddingBottom:T,paddingLeft:T,margin:T,marginTop:T,marginRight:T,marginBottom:T,marginLeft:T,backgroundPositionX:T,backgroundPositionY:T,...fc,zIndex:Bs,fillOpacity:ee,strokeOpacity:ee,numOctaves:Bs},dc={...Qn,color:O,backgroundColor:O,outlineColor:O,fill:O,stroke:O,borderColor:O,borderTopColor:O,borderRightColor:O,borderBottomColor:O,borderLeftColor:O,filter:wn,WebkitFilter:wn},jr=t=>dc[t];function Fr(t,e){let n=jr(t);return n!==wn&&(n=mt),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const mc=new Set(["auto","none","0"]);function pc(t,e,n){let s=0,i;for(;s<t.length&&!i;){const o=t[s];typeof o=="string"&&!mc.has(o)&&ne(o).values.length&&(i=t[s]),s++}if(i&&n)for(const o of e)t[o]=Fr(n,i)}class gc extends Zn{constructor(e,n,s,i,o){super(e,n,s,i,o,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:n,name:s}=this;if(!n||!n.current)return;super.readKeyframes();for(let l=0;l<e.length;l++){let u=e[l];if(typeof u=="string"&&(u=u.trim(),Wn(u))){const c=kr(u,n.current);c!==void 0&&(e[l]=c),l===e.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!Or.has(s)||e.length!==2)return;const[i,o]=e,r=Fs(i),a=Fs(o);if(r!==a)if(Os(r)&&Os(a))for(let l=0;l<e.length;l++){const u=e[l];typeof u=="string"&&(e[l]=parseFloat(u))}else Tt[s]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:n}=this,s=[];for(let i=0;i<e.length;i++)(e[i]===null||lc(e[i]))&&s.push(i);s.length&&pc(e,s,n)}measureInitialState(){const{element:e,unresolvedKeyframes:n,name:s}=this;if(!e||!e.current)return;s==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Tt[s](e.measureViewportBox(),window.getComputedStyle(e.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&e.getValue(s,i).jump(i,!1)}measureEndState(){const{element:e,name:n,unresolvedKeyframes:s}=this;if(!e||!e.current)return;const i=e.getValue(n);i&&i.jump(this.measuredOrigin,!1);const o=s.length-1,r=s[o];s[o]=Tt[n](e.measureViewportBox(),window.getComputedStyle(e.current)),r!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=r),this.removedTransforms?.length&&this.removedTransforms.forEach(([a,l])=>{e.getValue(a).set(l)}),this.resolveNoneKeyframes()}}function yc(t,e,n){if(t instanceof EventTarget)return[t];if(typeof t=="string"){let s=document;const i=n?.[t]??s.querySelectorAll(t);return i?Array.from(i):[]}return Array.from(t)}const Br=(t,e)=>e&&typeof t=="number"?e.transform(t):t;function vc(t){return nr(t)&&"offsetHeight"in t}const Ns=30,xc=t=>!isNaN(parseFloat(t));class bc{constructor(e,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=s=>{const i=G.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(s),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const o of this.dependents)o.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=n.owner}setCurrent(e){this.current=e,this.updatedAt=G.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=xc(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return process.env.NODE_ENV!=="production"&&Bn(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",e)}on(e,n){this.events[e]||(this.events[e]=new Fn);const s=this.events[e].add(n);return e==="change"?()=>{s(),_.read(()=>{this.events.change.getSize()||this.stop()})}:s}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,n){this.passiveEffect=e,this.stopPassiveEffect=n}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,n,s){this.set(n),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-s}jump(e,n=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(e){this.dependents||(this.dependents=new Set),this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const e=G.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>Ns)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Ns);return ir(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(e){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=e(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.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function jt(t,e){return new bc(t,e)}const{schedule:ts}=pr(queueMicrotask,!1),nt={x:!1,y:!1};function Nr(){return nt.x||nt.y}function wc(t){return t==="x"||t==="y"?nt[t]?null:(nt[t]=!0,()=>{nt[t]=!1}):nt.x||nt.y?null:(nt.x=nt.y=!0,()=>{nt.x=nt.y=!1})}function $r(t,e){const n=yc(t),s=new AbortController,i={passive:!0,...e,signal:s.signal};return[n,i,()=>s.abort()]}function $s(t){return!(t.pointerType==="touch"||Nr())}function Tc(t,e,n={}){const[s,i,o]=$r(t,n),r=a=>{if(!$s(a))return;const{target:l}=a,u=e(l,a);if(typeof u!="function"||!l)return;const c=h=>{$s(h)&&(u(h),l.removeEventListener("pointerleave",c))};l.addEventListener("pointerleave",c,i)};return s.forEach(a=>{a.addEventListener("pointerenter",r,i)}),o}const zr=(t,e)=>e?t===e?!0:zr(t,e.parentElement):!1,es=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1,Sc=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Pc(t){return Sc.has(t.tagName)||t.tabIndex!==-1}const we=new WeakSet;function zs(t){return e=>{e.key==="Enter"&&t(e)}}function Ge(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}const Cc=(t,e)=>{const n=t.currentTarget;if(!n)return;const s=zs(()=>{if(we.has(n))return;Ge(n,"down");const i=zs(()=>{Ge(n,"up")}),o=()=>Ge(n,"cancel");n.addEventListener("keyup",i,e),n.addEventListener("blur",o,e)});n.addEventListener("keydown",s,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",s),e)};function Ws(t){return es(t)&&!Nr()}function Ac(t,e,n={}){const[s,i,o]=$r(t,n),r=a=>{const l=a.currentTarget;if(!Ws(a))return;we.add(l);const u=e(l,a),c=(d,m)=>{window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",f),we.has(l)&&we.delete(l),Ws(d)&&typeof u=="function"&&u(d,{success:m})},h=d=>{c(d,l===window||l===document||n.useGlobalTarget||zr(l,d.target))},f=d=>{c(d,!1)};window.addEventListener("pointerup",h,i),window.addEventListener("pointercancel",f,i)};return s.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",r,i),vc(a)&&(a.addEventListener("focus",u=>Cc(u,i)),!Pc(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),o}function Wr(t){return nr(t)&&"ownerSVGElement"in t}function Mc(t){return Wr(t)&&t.tagName==="svg"}const z=t=>!!(t&&t.getVelocity),Vc=[...Ir,O,mt],Ec=t=>Vc.find(Lr(t)),Ur=b.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});function _c(t=!0){const e=b.useContext(On);if(e===null)return[!0,null];const{isPresent:n,onExitComplete:s,register:i}=e,o=b.useId();b.useEffect(()=>{if(t)return i(o)},[t]);const r=b.useCallback(()=>t&&s&&s(o),[o,s,t]);return!n&&s?[!1,r]:[!0]}const Kr=b.createContext({strict:!1}),Us={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"]},Ft={};for(const t in Us)Ft[t]={isEnabled:e=>Us[t].some(n=>!!e[n])};function Dc(t){for(const e in t)Ft[e]={...Ft[e],...t[e]}}const Rc=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function Ee(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||Rc.has(t)}let Gr=t=>!Ee(t);function kc(t){typeof t=="function"&&(Gr=e=>e.startsWith("on")?!Ee(e):t(e))}try{kc(require("@emotion/is-prop-valid").default)}catch{}function Oc(t,e,n){const s={};for(const i in t)i==="values"&&typeof t.values=="object"||(Gr(i)||n===!0&&Ee(i)||!e&&!Ee(i)||t.draggable&&i.startsWith("onDrag"))&&(s[i]=t[i]);return s}const Oe=b.createContext({});function Le(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}function se(t){return typeof t=="string"||Array.isArray(t)}const ns=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],ss=["initial",...ns];function Ie(t){return Le(t.animate)||ss.some(e=>se(t[e]))}function Hr(t){return!!(Ie(t)||t.variants)}function Lc(t,e){if(Ie(t)){const{initial:n,animate:s}=t;return{initial:n===!1||se(n)?n:void 0,animate:se(s)?s:void 0}}return t.inherit!==!1?e:{}}function Ic(t){const{initial:e,animate:n}=Lc(t,b.useContext(Oe));return b.useMemo(()=>({initial:e,animate:n}),[Ks(e),Ks(n)])}function Ks(t){return Array.isArray(t)?t.join(" "):t}const ie={};function jc(t){for(const e in t)ie[e]=t[e],zn(e)&&(ie[e].isCSSVariable=!0)}function Yr(t,{layout:e,layoutId:n}){return Wt.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!ie[t]||t==="opacity")}const Fc={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Bc=zt.length;function Nc(t,e,n){let s="",i=!0;for(let o=0;o<Bc;o++){const r=zt[o],a=t[r];if(a===void 0)continue;let l=!0;if(typeof a=="number"?l=a===(r.startsWith("scale")?1:0):l=parseFloat(a)===0,!l||n){const u=Br(a,Qn[r]);if(!l){i=!1;const c=Fc[r]||r;s+=`${c}(${u}) `}n&&(e[r]=u)}}return s=s.trim(),n?s=n(e,i?"":s):i&&(s="none"),s}function is(t,e,n){const{style:s,vars:i,transformOrigin:o}=t;let r=!1,a=!1;for(const l in e){const u=e[l];if(Wt.has(l)){r=!0;continue}else if(zn(l)){i[l]=u;continue}else{const c=Br(u,Qn[l]);l.startsWith("origin")?(a=!0,o[l]=c):s[l]=c}}if(e.transform||(r||n?s.transform=Nc(e,t.transform,n):s.transform&&(s.transform="none")),a){const{originX:l="50%",originY:u="50%",originZ:c=0}=o;s.transformOrigin=`${l} ${u} ${c}`}}const rs=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Xr(t,e,n){for(const s in e)!z(e[s])&&!Yr(s,n)&&(t[s]=e[s])}function $c({transformTemplate:t},e){return b.useMemo(()=>{const n=rs();return is(n,e,t),Object.assign({},n.vars,n.style)},[e])}function zc(t,e){const n=t.style||{},s={};return Xr(s,n,t),Object.assign(s,$c(t,e)),s}function Wc(t,e){const n={},s=zc(t,e);return t.drag&&t.dragListener!==!1&&(n.draggable=!1,s.userSelect=s.WebkitUserSelect=s.WebkitTouchCallout="none",s.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),t.tabIndex===void 0&&(t.onTap||t.onTapStart||t.whileTap)&&(n.tabIndex=0),n.style=s,n}const Uc={offset:"stroke-dashoffset",array:"stroke-dasharray"},Kc={offset:"strokeDashoffset",array:"strokeDasharray"};function Gc(t,e,n=1,s=0,i=!0){t.pathLength=1;const o=i?Uc:Kc;t[o.offset]=T.transform(-s);const r=T.transform(e),a=T.transform(n);t[o.array]=`${r} ${a}`}function qr(t,{attrX:e,attrY:n,attrScale:s,pathLength:i,pathSpacing:o=1,pathOffset:r=0,...a},l,u,c){if(is(t,a,u),l){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:h,style:f}=t;h.transform&&(f.transform=h.transform,delete h.transform),(f.transform||h.transformOrigin)&&(f.transformOrigin=h.transformOrigin??"50% 50%",delete h.transformOrigin),f.transform&&(f.transformBox=c?.transformBox??"fill-box",delete h.transformBox),e!==void 0&&(h.x=e),n!==void 0&&(h.y=n),s!==void 0&&(h.scale=s),i!==void 0&&Gc(h,i,o,r,!1)}const Zr=()=>({...rs(),attrs:{}}),Jr=t=>typeof t=="string"&&t.toLowerCase()==="svg";function Hc(t,e,n,s){const i=b.useMemo(()=>{const o=Zr();return qr(o,e,Jr(s),t.transformTemplate,t.style),{...o.attrs,style:{...o.style}}},[e]);if(t.style){const o={};Xr(o,t.style,t),i.style={...o,...i.style}}return i}const Yc=["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 os(t){return typeof t!="string"||t.includes("-")?!1:!!(Yc.indexOf(t)>-1||/[A-Z]/u.test(t))}function Xc(t,e,n,{latestValues:s},i,o=!1){const a=(os(t)?Hc:Wc)(e,s,i,t),l=Oc(e,typeof t=="string",o),u=t!==b.Fragment?{...l,...a,ref:n}:{},{children:c}=e,h=b.useMemo(()=>z(c)?c.get():c,[c]);return b.createElement(t,{...u,children:h})}function Gs(t){const e=[{},{}];return t?.values.forEach((n,s)=>{e[0][s]=n.get(),e[1][s]=n.getVelocity()}),e}function as(t,e,n,s){if(typeof e=="function"){const[i,o]=Gs(s);e=e(n!==void 0?n:t.custom,i,o)}if(typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"){const[i,o]=Gs(s);e=e(n!==void 0?n:t.custom,i,o)}return e}function Te(t){return z(t)?t.get():t}function qc({scrapeMotionValuesFromProps:t,createRenderState:e},n,s,i){return{latestValues:Zc(n,s,i,t),renderState:e()}}function Zc(t,e,n,s){const i={},o=s(t,{});for(const f in o)i[f]=Te(o[f]);let{initial:r,animate:a}=t;const l=Ie(t),u=Hr(t);e&&u&&!l&&t.inherit!==!1&&(r===void 0&&(r=e.initial),a===void 0&&(a=e.animate));let c=n?n.initial===!1:!1;c=c||r===!1;const h=c?a:r;if(h&&typeof h!="boolean"&&!Le(h)){const f=Array.isArray(h)?h:[h];for(let d=0;d<f.length;d++){const m=as(t,f[d]);if(m){const{transitionEnd:g,transition:x,...p}=m;for(const y in p){let v=p[y];if(Array.isArray(v)){const P=c?v.length-1:0;v=v[P]}v!==null&&(i[y]=v)}for(const y in g)i[y]=g[y]}}}return i}const Qr=t=>(e,n)=>{const s=b.useContext(Oe),i=b.useContext(On),o=()=>qc(t,e,s,i);return n?o():Da(o)};function ls(t,e,n){const{style:s}=t,i={};for(const o in s)(z(s[o])||e.style&&z(e.style[o])||Yr(o,t)||n?.getValue(o)?.liveStyle!==void 0)&&(i[o]=s[o]);return i}const Jc=Qr({scrapeMotionValuesFromProps:ls,createRenderState:rs});function to(t,e,n){const s=ls(t,e,n);for(const i in t)if(z(t[i])||z(e[i])){const o=zt.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;s[o]=t[i]}return s}const Qc=Qr({scrapeMotionValuesFromProps:to,createRenderState:Zr}),tu=Symbol.for("motionComponentSymbol");function _t(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function eu(t,e,n){return b.useCallback(s=>{s&&t.onMount&&t.onMount(s),e&&(s?e.mount(s):e.unmount()),n&&(typeof n=="function"?n(s):_t(n)&&(n.current=s))},[e])}const cs=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),nu="framerAppearId",eo="data-"+cs(nu),no=b.createContext({});function su(t,e,n,s,i){const{visualElement:o}=b.useContext(Oe),r=b.useContext(Kr),a=b.useContext(On),l=b.useContext(Ur).reducedMotion,u=b.useRef(null);s=s||r.renderer,!u.current&&s&&(u.current=s(t,{visualState:e,parent:o,props:n,presenceContext:a,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:l}));const c=u.current,h=b.useContext(no);c&&!c.projection&&i&&(c.type==="html"||c.type==="svg")&&iu(u.current,n,i,h);const f=b.useRef(!1);b.useInsertionEffect(()=>{c&&f.current&&c.update(n,a)});const d=n[eo],m=b.useRef(!!d&&!window.MotionHandoffIsComplete?.(d)&&window.MotionHasOptimisedAnimation?.(d));return Ra(()=>{c&&(f.current=!0,window.MotionIsMounted=!0,c.updateFeatures(),c.scheduleRenderMicrotask(),m.current&&c.animationState&&c.animationState.animateChanges())}),b.useEffect(()=>{c&&(!m.current&&c.animationState&&c.animationState.animateChanges(),m.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(d)}),m.current=!1),c.enteringChildren=void 0)}),c}function iu(t,e,n,s){const{layoutId:i,layout:o,drag:r,dragConstraints:a,layoutScroll:l,layoutRoot:u,layoutCrossfade:c}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:so(t.parent)),t.projection.setOptions({layoutId:i,layout:o,alwaysMeasureLayout:!!r||a&&_t(a),visualElement:t,animationType:typeof o=="string"?o:"both",initialPromotionConfig:s,crossfade:c,layoutScroll:l,layoutRoot:u})}function so(t){if(t)return t.options.allowProjection!==!1?t.projection:so(t.parent)}function He(t,{forwardMotionProps:e=!1}={},n,s){n&&Dc(n);const i=os(t)?Qc:Jc;function o(a,l){let u;const c={...b.useContext(Ur),...a,layoutId:ru(a)},{isStatic:h}=c,f=Ic(a),d=i(a,h);if(!h&&kn){ou(c,n);const m=au(c);u=m.MeasureLayout,f.visualElement=su(t,d,c,s,m.ProjectionNode)}return A.jsxs(Oe.Provider,{value:f,children:[u&&f.visualElement?A.jsx(u,{visualElement:f.visualElement,...c}):null,Xc(t,a,eu(d,f.visualElement,l),d,h,e)]})}o.displayName=`motion.${typeof t=="string"?t:`create(${t.displayName??t.name??""})`}`;const r=b.forwardRef(o);return r[tu]=t,r}function ru({layoutId:t}){const e=b.useContext(tr).id;return e&&t!==void 0?e+"-"+t:t}function ou(t,e){const n=b.useContext(Kr).strict;if(process.env.NODE_ENV!=="production"&&e&&n){const s="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";t.ignoreStrict?Nt(!1,s,"lazy-strict-mode"):ct(!1,s,"lazy-strict-mode")}}function au(t){const{drag:e,layout:n}=Ft;if(!e&&!n)return{};const s={...e,...n};return{MeasureLayout:e?.isEnabled(t)||n?.isEnabled(t)?s.MeasureLayout:void 0,ProjectionNode:s.ProjectionNode}}function lu(t,e){if(typeof Proxy>"u")return He;const n=new Map,s=(o,r)=>He(o,r,t,e),i=(o,r)=>(process.env.NODE_ENV!=="production"&&Bn(!1,"motion() is deprecated. Use motion.create() instead."),s(o,r));return new Proxy(i,{get:(o,r)=>r==="create"?s:(n.has(r)||n.set(r,He(r,void 0,t,e)),n.get(r))})}function io({top:t,left:e,right:n,bottom:s}){return{x:{min:e,max:n},y:{min:t,max:s}}}function cu({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function uu(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),s=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:s.y,right:s.x}}function Ye(t){return t===void 0||t===1}function Tn({scale:t,scaleX:e,scaleY:n}){return!Ye(t)||!Ye(e)||!Ye(n)}function vt(t){return Tn(t)||ro(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function ro(t){return Hs(t.x)||Hs(t.y)}function Hs(t){return t&&t!=="0%"}function _e(t,e,n){const s=t-n,i=e*s;return n+i}function Ys(t,e,n,s,i){return i!==void 0&&(t=_e(t,i,s)),_e(t,n,s)+e}function Sn(t,e=0,n=1,s,i){t.min=Ys(t.min,e,n,s,i),t.max=Ys(t.max,e,n,s,i)}function oo(t,{x:e,y:n}){Sn(t.x,e.translate,e.scale,e.originPoint),Sn(t.y,n.translate,n.scale,n.originPoint)}const Xs=.999999999999,qs=1.0000000000001;function hu(t,e,n,s=!1){const i=n.length;if(!i)return;e.x=e.y=1;let o,r;for(let a=0;a<i;a++){o=n[a],r=o.projectionDelta;const{visualElement:l}=o.options;l&&l.props.style&&l.props.style.display==="contents"||(s&&o.options.layoutScroll&&o.scroll&&o!==o.root&&Rt(t,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),r&&(e.x*=r.x.scale,e.y*=r.y.scale,oo(t,r)),s&&vt(o.latestValues)&&Rt(t,o.latestValues))}e.x<qs&&e.x>Xs&&(e.x=1),e.y<qs&&e.y>Xs&&(e.y=1)}function Dt(t,e){t.min=t.min+e,t.max=t.max+e}function Zs(t,e,n,s,i=.5){const o=R(t.min,t.max,i);Sn(t,e,n,o,s)}function Rt(t,e){Zs(t.x,e.x,e.scaleX,e.scale,e.originX),Zs(t.y,e.y,e.scaleY,e.scale,e.originY)}function ao(t,e){return io(uu(t.getBoundingClientRect(),e))}function fu(t,e,n){const s=ao(t,n),{scroll:i}=e;return i&&(Dt(s.x,i.offset.x),Dt(s.y,i.offset.y)),s}const Js=()=>({translate:0,scale:1,origin:0,originPoint:0}),kt=()=>({x:Js(),y:Js()}),Qs=()=>({min:0,max:0}),k=()=>({x:Qs(),y:Qs()}),Pn={current:null},lo={current:!1};function du(){if(lo.current=!0,!!kn)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Pn.current=t.matches;t.addEventListener("change",e),e()}else Pn.current=!1}const mu=new WeakMap;function pu(t,e,n){for(const s in e){const i=e[s],o=n[s];if(z(i))t.addValue(s,i);else if(z(o))t.addValue(s,jt(i,{owner:t}));else if(o!==i)if(t.hasValue(s)){const r=t.getValue(s);r.liveStyle===!0?r.jump(i):r.hasAnimated||r.set(i)}else{const r=t.getStaticValue(s);t.addValue(s,jt(r!==void 0?r:i,{owner:t}))}}for(const s in n)e[s]===void 0&&t.removeValue(s);return e}const ti=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class gu{scrapeMotionValuesFromProps(e,n,s){return{}}constructor({parent:e,props:n,presenceContext:s,reducedMotionConfig:i,blockInitialAnimation:o,visualState:r},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Zn,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const f=G.now();this.renderScheduledAt<f&&(this.renderScheduledAt=f,_.render(this.render,!1,!0))};const{latestValues:l,renderState:u}=r;this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=u,this.parent=e,this.props=n,this.presenceContext=s,this.depth=e?e.depth+1:0,this.reducedMotionConfig=i,this.options=a,this.blockInitialAnimation=!!o,this.isControllingVariants=Ie(n),this.isVariantNode=Hr(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:c,...h}=this.scrapeMotionValuesFromProps(n,{},this);for(const f in h){const d=h[f];l[f]!==void 0&&z(d)&&d.set(l[f])}}mount(e){this.current=e,mu.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,s)=>this.bindToMotionValue(s,n)),lo.current||du(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Pn.current,process.env.NODE_ENV!=="production"&&Bn(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected.","reduced-motion-disabled"),this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),dt(this.notifyUpdate),dt(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const e in this.events)this.events[e].clear();for(const e in this.features){const n=this.features[e];n&&(n.unmount(),n.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,n){this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)();const s=Wt.has(e);s&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",r=>{this.latestValues[e]=r,this.props.onUpdate&&_.preRender(this.notifyUpdate),s&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,e,n)),this.valueSubscriptions.set(e,()=>{i(),o&&o(),n.owner&&n.stop()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e="animation";for(e in Ft){const n=Ft[e];if(!n)continue;const{isEnabled:s,Feature:i}=n;if(!this.features[e]&&i&&s(this.props)&&(this.features[e]=new i(this)),this.features[e]){const o=this.features[e];o.isMounted?o.update():(o.mount(),o.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):k()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,n){this.latestValues[e]=n}update(e,n){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let s=0;s<ti.length;s++){const i=ti[s];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const o="on"+i,r=e[o];r&&(this.propEventSubscriptions[i]=this.on(i,r))}this.prevMotionValues=pu(this,this.scrapeMotionValuesFromProps(e,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(e),()=>n.variantChildren.delete(e)}addValue(e,n){const s=this.values.get(e);n!==s&&(s&&this.removeValue(e),this.bindToMotionValue(e,n),this.values.set(e,n),this.latestValues[e]=n.get())}removeValue(e){this.values.delete(e);const n=this.valueSubscriptions.get(e);n&&(n(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,n){if(this.props.values&&this.props.values[e])return this.props.values[e];let s=this.values.get(e);return s===void 0&&n!==void 0&&(s=jt(n===null?void 0:n,{owner:this}),this.addValue(e,s)),s}readValue(e,n){let s=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return s!=null&&(typeof s=="string"&&(er(s)||sr(s))?s=parseFloat(s):!Ec(s)&&mt.test(n)&&(s=Fr(e,n)),this.setBaseTarget(e,z(s)?s.get():s)),z(s)?s.get():s}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){const{initial:n}=this.props;let s;if(typeof n=="string"||typeof n=="object"){const o=as(this.props,n,this.presenceContext?.custom);o&&(s=o[e])}if(n&&s!==void 0)return s;const i=this.getBaseTargetFromProps(this.props,e);return i!==void 0&&!z(i)?i:this.initialValues[e]!==void 0&&s===void 0?void 0:this.baseTarget[e]}on(e,n){return this.events[e]||(this.events[e]=new Fn),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}scheduleRenderMicrotask(){ts.render(this.render)}}class co extends gu{constructor(){super(...arguments),this.KeyframeResolver=gc}sortInstanceNodePosition(e,n){return e.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(e,n){return e.style?e.style[n]:void 0}removeValueFromRenderState(e,{vars:n,style:s}){delete n[e],delete s[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;z(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function uo(t,{style:e,vars:n},s,i){const o=t.style;let r;for(r in e)o[r]=e[r];i?.applyProjectionStyles(o,s);for(r in n)o.setProperty(r,n[r])}function yu(t){return window.getComputedStyle(t)}class vu extends co{constructor(){super(...arguments),this.type="html",this.renderInstance=uo}readValueFromInstance(e,n){if(Wt.has(n))return this.projection?.isProjecting?pn(n):Ol(e,n);{const s=yu(e),i=(zn(n)?s.getPropertyValue(n):s[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(e,{transformPagePoint:n}){return ao(e,n)}build(e,n,s){is(e,n,s.transformTemplate)}scrapeMotionValuesFromProps(e,n,s){return ls(e,n,s)}}const ho=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 xu(t,e,n,s){uo(t,e,void 0,s);for(const i in e.attrs)t.setAttribute(ho.has(i)?i:cs(i),e.attrs[i])}class bu extends co{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=k}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(Wt.has(n)){const s=jr(n);return s&&s.default||0}return n=ho.has(n)?n:cs(n),e.getAttribute(n)}scrapeMotionValuesFromProps(e,n,s){return to(e,n,s)}build(e,n,s){qr(e,n,this.isSVGTag,s.transformTemplate,s.style)}renderInstance(e,n,s,i){xu(e,n,s,i)}mount(e){this.isSVGTag=Jr(e.tagName),super.mount(e)}}const wu=(t,e)=>os(t)?new bu(e):new vu(e,{allowProjection:t!==b.Fragment});function Lt(t,e,n){const s=t.getProps();return as(s,e,n!==void 0?n:s.custom,t)}const Cn=t=>Array.isArray(t);function Tu(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,jt(n))}function Su(t){return Cn(t)?t[t.length-1]||0:t}function Pu(t,e){const n=Lt(t,e);let{transitionEnd:s={},transition:i={},...o}=n||{};o={...o,...s};for(const r in o){const a=Su(o[r]);Tu(t,r,a)}}function Cu(t){return!!(z(t)&&t.add)}function An(t,e){const n=t.getValue("willChange");if(Cu(n))return n.add(e);if(!n&&ut.WillChange){const s=new ut.WillChange("auto");t.addValue("willChange",s),s.add(e)}}function fo(t){return t.props[eo]}const Au=t=>t!==null;function Mu(t,{repeat:e,repeatType:n="loop"},s){const i=t.filter(Au),o=e&&n!=="loop"&&e%2===1?0:i.length-1;return i[o]}const Vu={type:"spring",stiffness:500,damping:25,restSpeed:10},Eu=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),_u={type:"keyframes",duration:.8},Du={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Ru=(t,{keyframes:e})=>e.length>2?_u:Wt.has(t)?t.startsWith("scale")?Eu(e[1]):Vu:Du;function ku({when:t,delay:e,delayChildren:n,staggerChildren:s,staggerDirection:i,repeat:o,repeatType:r,repeatDelay:a,from:l,elapsed:u,...c}){return!!Object.keys(c).length}const us=(t,e,n,s={},i,o)=>r=>{const a=Jn(s,t)||{},l=a.delay||s.delay||0;let{elapsed:u=0}=s;u=u-st(l);const c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-u,onUpdate:f=>{e.set(f),a.onUpdate&&a.onUpdate(f)},onComplete:()=>{r(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:o?void 0:i};ku(a)||Object.assign(c,Ru(t,c)),c.duration&&(c.duration=st(c.duration)),c.repeatDelay&&(c.repeatDelay=st(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let h=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(bn(c),c.delay===0&&(h=!0)),(ut.instantAnimations||ut.skipAnimations)&&(h=!0,bn(c),c.delay=0),c.allowFlatten=!a.type&&!a.ease,h&&!o&&e.get()!==void 0){const f=Mu(c.keyframes,a);if(f!==void 0){_.update(()=>{c.onUpdate(f),c.onComplete()});return}}return a.isSync?new qn(c):new sc(c)};function Ou({protectedKeys:t,needsAnimating:e},n){const s=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,s}function mo(t,e,{delay:n=0,transitionOverride:s,type:i}={}){let{transition:o=t.getDefaultTransition(),transitionEnd:r,...a}=e;s&&(o=s);const l=[],u=i&&t.animationState&&t.animationState.getState()[i];for(const c in a){const h=t.getValue(c,t.latestValues[c]??null),f=a[c];if(f===void 0||u&&Ou(u,c))continue;const d={delay:n,...Jn(o||{},c)},m=h.get();if(m!==void 0&&!h.isAnimating&&!Array.isArray(f)&&f===m&&!d.velocity)continue;let g=!1;if(window.MotionHandoffAnimation){const p=fo(t);if(p){const y=window.MotionHandoffAnimation(p,c,_);y!==null&&(d.startTime=y,g=!0)}}An(t,c),h.start(us(c,h,f,t.shouldReduceMotion&&Or.has(c)?{type:!1}:d,t,g));const x=h.animation;x&&l.push(x)}return r&&Promise.all(l).then(()=>{_.update(()=>{r&&Pu(t,r)})}),l}function po(t,e,n,s=0,i=1){const o=Array.from(t).sort((u,c)=>u.sortNodePosition(c)).indexOf(e),r=t.size,a=(r-1)*s;return typeof n=="function"?n(o,r):i===1?o*s:a-o*s}function Mn(t,e,n={}){const s=Lt(t,e,n.type==="exit"?t.presenceContext?.custom:void 0);let{transition:i=t.getDefaultTransition()||{}}=s||{};n.transitionOverride&&(i=n.transitionOverride);const o=s?()=>Promise.all(mo(t,s,n)):()=>Promise.resolve(),r=t.variantChildren&&t.variantChildren.size?(l=0)=>{const{delayChildren:u=0,staggerChildren:c,staggerDirection:h}=i;return Lu(t,e,l,u,c,h,n)}:()=>Promise.resolve(),{when:a}=i;if(a){const[l,u]=a==="beforeChildren"?[o,r]:[r,o];return l().then(()=>u())}else return Promise.all([o(),r(n.delay)])}function Lu(t,e,n=0,s=0,i=0,o=1,r){const a=[];for(const l of t.variantChildren)l.notify("AnimationStart",e),a.push(Mn(l,e,{...r,delay:n+(typeof s=="function"?0:s)+po(t.variantChildren,l,s,i,o)}).then(()=>l.notify("AnimationComplete",e)));return Promise.all(a)}function Iu(t,e,n={}){t.notify("AnimationStart",e);let s;if(Array.isArray(e)){const i=e.map(o=>Mn(t,o,n));s=Promise.all(i)}else if(typeof e=="string")s=Mn(t,e,n);else{const i=typeof e=="function"?Lt(t,e,n.custom):e;s=Promise.all(mo(t,i,n))}return s.then(()=>{t.notify("AnimationComplete",e)})}function go(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let s=0;s<n;s++)if(e[s]!==t[s])return!1;return!0}const ju=ss.length;function yo(t){if(!t)return;if(!t.isControllingVariants){const n=t.parent?yo(t.parent)||{}:{};return t.props.initial!==void 0&&(n.initial=t.props.initial),n}const e={};for(let n=0;n<ju;n++){const s=ss[n],i=t.props[s];(se(i)||i===!1)&&(e[s]=i)}return e}const Fu=[...ns].reverse(),Bu=ns.length;function Nu(t){return e=>Promise.all(e.map(({animation:n,options:s})=>Iu(t,n,s)))}function $u(t){let e=Nu(t),n=ei(),s=!0;const i=l=>(u,c)=>{const h=Lt(t,c,l==="exit"?t.presenceContext?.custom:void 0);if(h){const{transition:f,transitionEnd:d,...m}=h;u={...u,...m,...d}}return u};function o(l){e=l(t)}function r(l){const{props:u}=t,c=yo(t.parent)||{},h=[],f=new Set;let d={},m=1/0;for(let x=0;x<Bu;x++){const p=Fu[x],y=n[p],v=u[p]!==void 0?u[p]:c[p],P=se(v),w=p===l?y.isActive:null;w===!1&&(m=x);let C=v===c[p]&&v!==u[p]&&P;if(C&&s&&t.manuallyAnimateOnMount&&(C=!1),y.protectedKeys={...d},!y.isActive&&w===null||!v&&!y.prevProp||Le(v)||typeof v=="boolean")continue;const S=zu(y.prevProp,v);let M=S||p===l&&y.isActive&&!C&&P||x>m&&P,N=!1;const X=Array.isArray(v)?v:[v];let Ct=X.reduce(i(p),{});w===!1&&(Ct={});const{prevResolvedValues:fs={}}=y,No={...fs,...Ct},ds=j=>{M=!0,f.has(j)&&(N=!0,f.delete(j)),y.needsAnimating[j]=!0;const q=t.getValue(j);q&&(q.liveStyle=!1)};for(const j in No){const q=Ct[j],gt=fs[j];if(d.hasOwnProperty(j))continue;let At=!1;Cn(q)&&Cn(gt)?At=!go(q,gt):At=q!==gt,At?q!=null?ds(j):f.add(j):q!==void 0&&f.has(j)?ds(j):y.protectedKeys[j]=!0}y.prevProp=v,y.prevResolvedValues=Ct,y.isActive&&(d={...d,...Ct}),s&&t.blockInitialAnimation&&(M=!1);const ms=C&&S;M&&(!ms||N)&&h.push(...X.map(j=>{const q={type:p};if(typeof j=="string"&&s&&!ms&&t.manuallyAnimateOnMount&&t.parent){const{parent:gt}=t,At=Lt(gt,j);if(gt.enteringChildren&&At){const{delayChildren:$o}=At.transition||{};q.delay=po(gt.enteringChildren,t,$o)}}return{animation:j,options:q}}))}if(f.size){const x={};if(typeof u.initial!="boolean"){const p=Lt(t,Array.isArray(u.initial)?u.initial[0]:u.initial);p&&p.transition&&(x.transition=p.transition)}f.forEach(p=>{const y=t.getBaseTarget(p),v=t.getValue(p);v&&(v.liveStyle=!0),x[p]=y??null}),h.push({animation:x})}let g=!!h.length;return s&&(u.initial===!1||u.initial===u.animate)&&!t.manuallyAnimateOnMount&&(g=!1),s=!1,g?e(h):Promise.resolve()}function a(l,u){if(n[l].isActive===u)return Promise.resolve();t.variantChildren?.forEach(h=>h.animationState?.setActive(l,u)),n[l].isActive=u;const c=r(l);for(const h in n)n[h].protectedKeys={};return c}return{animateChanges:r,setActive:a,setAnimateFunction:o,getState:()=>n,reset:()=>{n=ei(),s=!0}}}function zu(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!go(e,t):!1}function yt(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function ei(){return{animate:yt(!0),whileInView:yt(),whileHover:yt(),whileTap:yt(),whileDrag:yt(),whileFocus:yt(),exit:yt()}}class pt{constructor(e){this.isMounted=!1,this.node=e}update(){}}class Wu extends pt{constructor(e){super(e),e.animationState||(e.animationState=$u(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();Le(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:n}=this.node.prevProps||{};e!==n&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let Uu=0;class Ku extends pt{constructor(){super(...arguments),this.id=Uu++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:n}=this.node.presenceContext,{isPresent:s}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===s)return;const i=this.node.animationState.setActive("exit",!e);n&&!e&&i.then(()=>{n(this.id)})}mount(){const{register:e,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),e&&(this.unmount=e(this.id))}unmount(){}}const Gu={animation:{Feature:Wu},exit:{Feature:Ku}};function re(t,e,n,s={passive:!0}){return t.addEventListener(e,n,s),()=>t.removeEventListener(e,n)}function he(t){return{point:{x:t.pageX,y:t.pageY}}}const Hu=t=>e=>es(e)&&t(e,he(e));function Xt(t,e,n,s){return re(t,e,Hu(n),s)}const vo=1e-4,Yu=1-vo,Xu=1+vo,xo=.01,qu=0-xo,Zu=0+xo;function W(t){return t.max-t.min}function Ju(t,e,n){return Math.abs(t-e)<=n}function ni(t,e,n,s=.5){t.origin=s,t.originPoint=R(e.min,e.max,t.origin),t.scale=W(n)/W(e),t.translate=R(n.min,n.max,t.origin)-t.originPoint,(t.scale>=Yu&&t.scale<=Xu||isNaN(t.scale))&&(t.scale=1),(t.translate>=qu&&t.translate<=Zu||isNaN(t.translate))&&(t.translate=0)}function qt(t,e,n,s){ni(t.x,e.x,n.x,s?s.originX:void 0),ni(t.y,e.y,n.y,s?s.originY:void 0)}function si(t,e,n){t.min=n.min+e.min,t.max=t.min+W(e)}function Qu(t,e,n){si(t.x,e.x,n.x),si(t.y,e.y,n.y)}function ii(t,e,n){t.min=e.min-n.min,t.max=t.min+W(e)}function Zt(t,e,n){ii(t.x,e.x,n.x),ii(t.y,e.y,n.y)}function Q(t){return[t("x"),t("y")]}const bo=({current:t})=>t?t.ownerDocument.defaultView:null,ri=(t,e)=>Math.abs(t-e);function th(t,e){const n=ri(t.x,e.x),s=ri(t.y,e.y);return Math.sqrt(n**2+s**2)}class wo{constructor(e,n,{transformPagePoint:s,contextWindow:i=window,dragSnapToOrigin:o=!1,distanceThreshold:r=3}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const f=qe(this.lastMoveEventInfo,this.history),d=this.startEvent!==null,m=th(f.offset,{x:0,y:0})>=this.distanceThreshold;if(!d&&!m)return;const{point:g}=f,{timestamp:x}=F;this.history.push({...g,timestamp:x});const{onStart:p,onMove:y}=this.handlers;d||(p&&p(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),y&&y(this.lastMoveEvent,f)},this.handlePointerMove=(f,d)=>{this.lastMoveEvent=f,this.lastMoveEventInfo=Xe(d,this.transformPagePoint),_.update(this.updatePoint,!0)},this.handlePointerUp=(f,d)=>{this.end();const{onEnd:m,onSessionEnd:g,resumeAnimation:x}=this.handlers;if(this.dragSnapToOrigin&&x&&x(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const p=qe(f.type==="pointercancel"?this.lastMoveEventInfo:Xe(d,this.transformPagePoint),this.history);this.startEvent&&m&&m(f,p),g&&g(f,p)},!es(e))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=s,this.distanceThreshold=r,this.contextWindow=i||window;const a=he(e),l=Xe(a,this.transformPagePoint),{point:u}=l,{timestamp:c}=F;this.history=[{...u,timestamp:c}];const{onSessionStart:h}=n;h&&h(e,qe(l,this.history)),this.removeListeners=le(Xt(this.contextWindow,"pointermove",this.handlePointerMove),Xt(this.contextWindow,"pointerup",this.handlePointerUp),Xt(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),dt(this.updatePoint)}}function Xe(t,e){return e?{point:e(t.point)}:t}function oi(t,e){return{x:t.x-e.x,y:t.y-e.y}}function qe({point:t},e){return{point:t,delta:oi(t,To(e)),offset:oi(t,eh(e)),velocity:nh(e,.1)}}function eh(t){return t[0]}function To(t){return t[t.length-1]}function nh(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,s=null;const i=To(t);for(;n>=0&&(s=t[n],!(i.timestamp-s.timestamp>st(e)));)n--;if(!s)return{x:0,y:0};const o=tt(i.timestamp-s.timestamp);if(o===0)return{x:0,y:0};const r={x:(i.x-s.x)/o,y:(i.y-s.y)/o};return r.x===1/0&&(r.x=0),r.y===1/0&&(r.y=0),r}function sh(t,{min:e,max:n},s){return e!==void 0&&t<e?t=s?R(e,t,s.min):Math.max(t,e):n!==void 0&&t>n&&(t=s?R(n,t,s.max):Math.min(t,n)),t}function ai(t,e,n){return{min:e!==void 0?t.min+e:void 0,max:n!==void 0?t.max+n-(t.max-t.min):void 0}}function ih(t,{top:e,left:n,bottom:s,right:i}){return{x:ai(t.x,n,i),y:ai(t.y,e,s)}}function li(t,e){let n=e.min-t.min,s=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,s]=[s,n]),{min:n,max:s}}function rh(t,e){return{x:li(t.x,e.x),y:li(t.y,e.y)}}function oh(t,e){let n=.5;const s=W(t),i=W(e);return i>s?n=te(e.min,e.max-s,t.min):s>i&&(n=te(t.min,t.max-i,e.min)),lt(0,1,n)}function ah(t,e){const n={};return e.min!==void 0&&(n.min=e.min-t.min),e.max!==void 0&&(n.max=e.max-t.min),n}const Vn=.35;function lh(t=Vn){return t===!1?t=0:t===!0&&(t=Vn),{x:ci(t,"left","right"),y:ci(t,"top","bottom")}}function ci(t,e,n){return{min:ui(t,e),max:ui(t,n)}}function ui(t,e){return typeof t=="number"?t:t[e]||0}const ch=new WeakMap;class uh{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=k(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:n=!1,distanceThreshold:s}={}){const{presenceContext:i}=this.visualElement;if(i&&i.isPresent===!1)return;const o=h=>{const{dragSnapToOrigin:f}=this.getProps();f?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(he(h).point)},r=(h,f)=>{const{drag:d,dragPropagation:m,onDragStart:g}=this.getProps();if(d&&!m&&(this.openDragLock&&this.openDragLock(),this.openDragLock=wc(d),!this.openDragLock))return;this.latestPointerEvent=h,this.latestPanInfo=f,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Q(p=>{let y=this.getAxisMotionValue(p).get()||0;if(ot.test(y)){const{projection:v}=this.visualElement;if(v&&v.layout){const P=v.layout.layoutBox[p];P&&(y=W(P)*(parseFloat(y)/100))}}this.originPoint[p]=y}),g&&_.postRender(()=>g(h,f)),An(this.visualElement,"transform");const{animationState:x}=this.visualElement;x&&x.setActive("whileDrag",!0)},a=(h,f)=>{this.latestPointerEvent=h,this.latestPanInfo=f;const{dragPropagation:d,dragDirectionLock:m,onDirectionLock:g,onDrag:x}=this.getProps();if(!d&&!this.openDragLock)return;const{offset:p}=f;if(m&&this.currentDirection===null){this.currentDirection=hh(p),this.currentDirection!==null&&g&&g(this.currentDirection);return}this.updateAxis("x",f.point,p),this.updateAxis("y",f.point,p),this.visualElement.render(),x&&x(h,f)},l=(h,f)=>{this.latestPointerEvent=h,this.latestPanInfo=f,this.stop(h,f),this.latestPointerEvent=null,this.latestPanInfo=null},u=()=>Q(h=>this.getAnimationState(h)==="paused"&&this.getAxisMotionValue(h).animation?.play()),{dragSnapToOrigin:c}=this.getProps();this.panSession=new wo(e,{onSessionStart:o,onStart:r,onMove:a,onSessionEnd:l,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,distanceThreshold:s,contextWindow:bo(this.visualElement)})}stop(e,n){const s=e||this.latestPointerEvent,i=n||this.latestPanInfo,o=this.isDragging;if(this.cancel(),!o||!i||!s)return;const{velocity:r}=i;this.startAnimation(r);const{onDragEnd:a}=this.getProps();a&&_.postRender(()=>a(s,i))}cancel(){this.isDragging=!1;const{projection:e,animationState:n}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:s}=this.getProps();!s&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(e,n,s){const{drag:i}=this.getProps();if(!s||!pe(e,i,this.currentDirection))return;const o=this.getAxisMotionValue(e);let r=this.originPoint[e]+s[e];this.constraints&&this.constraints[e]&&(r=sh(r,this.constraints[e],this.elastic[e])),o.set(r)}resolveConstraints(){const{dragConstraints:e,dragElastic:n}=this.getProps(),s=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,i=this.constraints;e&&_t(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&s?this.constraints=ih(s.layoutBox,e):this.constraints=!1,this.elastic=lh(n),i!==this.constraints&&s&&this.constraints&&!this.hasMutatedConstraints&&Q(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=ah(s.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!_t(e))return!1;const s=e.current;ct(s!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");const{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=fu(s,i.root,this.visualElement.getTransformPagePoint());let r=rh(i.layout.layoutBox,o);if(n){const a=n(cu(r));this.hasMutatedConstraints=!!a,a&&(r=io(a))}return r}startAnimation(e){const{drag:n,dragMomentum:s,dragElastic:i,dragTransition:o,dragSnapToOrigin:r,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},u=Q(c=>{if(!pe(c,n,this.currentDirection))return;let h=l&&l[c]||{};r&&(h={min:0,max:0});const f=i?200:1e6,d=i?40:1e7,m={type:"inertia",velocity:s?e[c]:0,bounceStiffness:f,bounceDamping:d,timeConstant:750,restDelta:1,restSpeed:10,...o,...h};return this.startAxisValueAnimation(c,m)});return Promise.all(u).then(a)}startAxisValueAnimation(e,n){const s=this.getAxisMotionValue(e);return An(this.visualElement,e),s.start(us(e,s,0,n,this.visualElement,!1))}stopAnimation(){Q(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){Q(e=>this.getAxisMotionValue(e).animation?.pause())}getAnimationState(e){return this.getAxisMotionValue(e).animation?.state}getAxisMotionValue(e){const n=`_drag${e.toUpperCase()}`,s=this.visualElement.getProps(),i=s[n];return i||this.visualElement.getValue(e,(s.initial?s.initial[e]:void 0)||0)}snapToCursor(e){Q(n=>{const{drag:s}=this.getProps();if(!pe(n,s,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(n);if(i&&i.layout){const{min:r,max:a}=i.layout.layoutBox[n];o.set(e[n]-R(r,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:s}=this.visualElement;if(!_t(n)||!s||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};Q(r=>{const a=this.getAxisMotionValue(r);if(a&&this.constraints!==!1){const l=a.get();i[r]=oh({min:l,max:l},this.constraints[r])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",s.root&&s.root.updateScroll(),s.updateLayout(),this.resolveConstraints(),Q(r=>{if(!pe(r,e,null))return;const a=this.getAxisMotionValue(r),{min:l,max:u}=this.constraints[r];a.set(R(l,u,i[r]))})}addListeners(){if(!this.visualElement.current)return;ch.set(this.visualElement,this);const e=this.visualElement.current,n=Xt(e,"pointerdown",l=>{const{drag:u,dragListener:c=!0}=this.getProps();u&&c&&this.start(l)}),s=()=>{const{dragConstraints:l}=this.getProps();_t(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,o=i.addEventListener("measure",s);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),_.read(s);const r=re(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",(({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&(Q(c=>{const h=this.getAxisMotionValue(c);h&&(this.originPoint[c]+=l[c].translate,h.set(h.get()+l[c].translate))}),this.visualElement.render())}));return()=>{r(),n(),o(),a&&a()}}getProps(){const e=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:s=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:r=Vn,dragMomentum:a=!0}=e;return{...e,drag:n,dragDirectionLock:s,dragPropagation:i,dragConstraints:o,dragElastic:r,dragMomentum:a}}}function pe(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function hh(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class fh extends pt{constructor(e){super(e),this.removeGroupControls=et,this.removeListeners=et,this.controls=new uh(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||et}unmount(){this.removeGroupControls(),this.removeListeners()}}const hi=t=>(e,n)=>{t&&_.postRender(()=>t(e,n))};class dh extends pt{constructor(){super(...arguments),this.removePointerDownListener=et}onPointerDown(e){this.session=new wo(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:bo(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:s,onPanEnd:i}=this.node.getProps();return{onSessionStart:hi(e),onStart:hi(n),onMove:s,onEnd:(o,r)=>{delete this.session,i&&_.postRender(()=>i(o,r))}}}mount(){this.removePointerDownListener=Xt(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const Se={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function fi(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const Kt={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(T.test(t))t=parseFloat(t);else return t;const n=fi(t,e.target.x),s=fi(t,e.target.y);return`${n}% ${s}%`}},mh={correct:(t,{treeScale:e,projectionDelta:n})=>{const s=t,i=mt.parse(t);if(i.length>5)return s;const o=mt.createTransformer(t),r=typeof i[0]!="number"?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;i[0+r]/=a,i[1+r]/=l;const u=R(a,l,.5);return typeof i[2+r]=="number"&&(i[2+r]/=u),typeof i[3+r]=="number"&&(i[3+r]/=u),o(i)}};let Ze=!1;class ph extends b.Component{componentDidMount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s,layoutId:i}=this.props,{projection:o}=e;jc(gh),o&&(n.group&&n.group.add(o),s&&s.register&&i&&s.register(o),Ze&&o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),Se.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:n,visualElement:s,drag:i,isPresent:o}=this.props,{projection:r}=s;return r&&(r.isPresent=o,Ze=!0,i||e.layoutDependency!==n||n===void 0||e.isPresent!==o?r.willUpdate():this.safeToRemove(),e.isPresent!==o&&(o?r.promote():r.relegate()||_.postRender(()=>{const a=r.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),ts.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s}=this.props,{projection:i}=e;Ze=!0,i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),s&&s.deregister&&s.deregister(i))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function So(t){const[e,n]=_c(),s=b.useContext(tr);return A.jsx(ph,{...t,layoutGroup:s,switchLayoutGroup:b.useContext(no),isPresent:e,safeToRemove:n})}const gh={borderRadius:{...Kt,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Kt,borderTopRightRadius:Kt,borderBottomLeftRadius:Kt,borderBottomRightRadius:Kt,boxShadow:mh};function yh(t,e,n){const s=z(t)?t:jt(t);return s.start(us("",s,e,n)),s.animation}const vh=(t,e)=>t.depth-e.depth;class xh{constructor(){this.children=[],this.isDirty=!1}add(e){Ln(this.children,e),this.isDirty=!0}remove(e){In(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(vh),this.isDirty=!1,this.children.forEach(e)}}function bh(t,e){const n=G.now(),s=({timestamp:i})=>{const o=i-n;o>=e&&(dt(s),t(o-e))};return _.setup(s,!0),()=>dt(s)}const Po=["TopLeft","TopRight","BottomLeft","BottomRight"],wh=Po.length,di=t=>typeof t=="string"?parseFloat(t):t,mi=t=>typeof t=="number"||T.test(t);function Th(t,e,n,s,i,o){i?(t.opacity=R(0,n.opacity??1,Sh(s)),t.opacityExit=R(e.opacity??1,0,Ph(s))):o&&(t.opacity=R(e.opacity??1,n.opacity??1,s));for(let r=0;r<wh;r++){const a=`border${Po[r]}Radius`;let l=pi(e,a),u=pi(n,a);if(l===void 0&&u===void 0)continue;l||(l=0),u||(u=0),l===0||u===0||mi(l)===mi(u)?(t[a]=Math.max(R(di(l),di(u),s),0),(ot.test(u)||ot.test(l))&&(t[a]+="%")):t[a]=u}(e.rotate||n.rotate)&&(t.rotate=R(e.rotate||0,n.rotate||0,s))}function pi(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const Sh=Co(0,.5,hr),Ph=Co(.5,.95,et);function Co(t,e,n){return s=>s<t?0:s>e?1:n(te(t,e,s))}function gi(t,e){t.min=e.min,t.max=e.max}function Z(t,e){gi(t.x,e.x),gi(t.y,e.y)}function yi(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function vi(t,e,n,s,i){return t-=e,t=_e(t,1/n,s),i!==void 0&&(t=_e(t,1/i,s)),t}function Ch(t,e=0,n=1,s=.5,i,o=t,r=t){if(ot.test(e)&&(e=parseFloat(e),e=R(r.min,r.max,e/100)-r.min),typeof e!="number")return;let a=R(o.min,o.max,s);t===o&&(a-=e),t.min=vi(t.min,e,n,a,i),t.max=vi(t.max,e,n,a,i)}function xi(t,e,[n,s,i],o,r){Ch(t,e[n],e[s],e[i],e.scale,o,r)}const Ah=["x","scaleX","originX"],Mh=["y","scaleY","originY"];function bi(t,e,n,s){xi(t.x,e,Ah,n?n.x:void 0,s?s.x:void 0),xi(t.y,e,Mh,n?n.y:void 0,s?s.y:void 0)}function wi(t){return t.translate===0&&t.scale===1}function Ao(t){return wi(t.x)&&wi(t.y)}function Ti(t,e){return t.min===e.min&&t.max===e.max}function Vh(t,e){return Ti(t.x,e.x)&&Ti(t.y,e.y)}function Si(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function Mo(t,e){return Si(t.x,e.x)&&Si(t.y,e.y)}function Pi(t){return W(t.x)/W(t.y)}function Ci(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}class Eh{constructor(){this.members=[]}add(e){Ln(this.members,e),e.scheduleRender()}remove(e){if(In(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(e){const n=this.members.findIndex(i=>e===i);if(n===0)return!1;let s;for(let i=n;i>=0;i--){const o=this.members[i];if(o.isPresent!==!1){s=o;break}}return s?(this.promote(s),!0):!1}promote(e,n){const s=this.lead;if(e!==s&&(this.prevLead=s,this.lead=e,e.show(),s)){s.instance&&s.scheduleRender(),e.scheduleRender(),e.resumeFrom=s,n&&(e.resumeFrom.preserveOpacity=!0),s.snapshot&&(e.snapshot=s.snapshot,e.snapshot.latestValues=s.animationValues||s.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:i}=e.options;i===!1&&s.hide()}}exitAnimationComplete(){this.members.forEach(e=>{const{options:n,resumingFrom:s}=e;n.onExitComplete&&n.onExitComplete(),s&&s.options.onExitComplete&&s.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function _h(t,e,n){let s="";const i=t.x.translate/e.x,o=t.y.translate/e.y,r=n?.z||0;if((i||o||r)&&(s=`translate3d(${i}px, ${o}px, ${r}px) `),(e.x!==1||e.y!==1)&&(s+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:u,rotate:c,rotateX:h,rotateY:f,skewX:d,skewY:m}=n;u&&(s=`perspective(${u}px) ${s}`),c&&(s+=`rotate(${c}deg) `),h&&(s+=`rotateX(${h}deg) `),f&&(s+=`rotateY(${f}deg) `),d&&(s+=`skewX(${d}deg) `),m&&(s+=`skewY(${m}deg) `)}const a=t.x.scale*e.x,l=t.y.scale*e.y;return(a!==1||l!==1)&&(s+=`scale(${a}, ${l})`),s||"none"}const Je=["","X","Y","Z"],Dh=1e3;let Rh=0;function Qe(t,e,n,s){const{latestValues:i}=e;i[t]&&(n[t]=i[t],e.setStaticValue(t,0),s&&(s[t]=0))}function Vo(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=fo(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:o}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",_,!(i||o))}const{parent:s}=t;s&&!s.hasCheckedOptimisedAppear&&Vo(s)}function Eo({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:s,resetTransform:i}){return class{constructor(r={},a=e?.()){this.id=Rh++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(Lh),this.nodes.forEach(Bh),this.nodes.forEach(Nh),this.nodes.forEach(Ih)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=r,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new xh)}addEventListener(r,a){return this.eventHandlers.has(r)||this.eventHandlers.set(r,new Fn),this.eventHandlers.get(r).add(a)}notifyListeners(r,...a){const l=this.eventHandlers.get(r);l&&l.notify(...a)}hasListeners(r){return this.eventHandlers.has(r)}mount(r){if(this.instance)return;this.isSVG=Wr(r)&&!Mc(r),this.instance=r;const{layoutId:a,layout:l,visualElement:u}=this.options;if(u&&!u.current&&u.mount(r),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||a)&&(this.isLayoutDirty=!0),t){let c,h=0;const f=()=>this.root.updateBlockedByResize=!1;_.read(()=>{h=window.innerWidth}),t(r,()=>{const d=window.innerWidth;d!==h&&(h=d,this.root.updateBlockedByResize=!0,c&&c(),c=bh(f,250),Se.hasAnimatedSinceResize&&(Se.hasAnimatedSinceResize=!1,this.nodes.forEach(Vi)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&u&&(a||l)&&this.addEventListener("didUpdate",({delta:c,hasLayoutChanged:h,hasRelativeLayoutChanged:f,layout:d})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const m=this.options.transition||u.getDefaultTransition()||Kh,{onLayoutAnimationStart:g,onLayoutAnimationComplete:x}=u.getProps(),p=!this.targetLayout||!Mo(this.targetLayout,d),y=!h&&f;if(this.options.layoutRoot||this.resumeFrom||y||h&&(p||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const v={...Jn(m,"layout"),onPlay:g,onComplete:x};(u.shouldReduceMotion||this.options.layoutRoot)&&(v.delay=0,v.type=!1),this.startAnimation(v),this.setAnimationOrigin(c,y)}else h||Vi(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=d})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const r=this.getStack();r&&r.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),dt(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($h),this.animationId++)}getTransformTemplate(){const{visualElement:r}=this.options;return r&&r.getProps().transformTemplate}willUpdate(r=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Vo(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let c=0;c<this.path.length;c++){const h=this.path[c];h.shouldResetTransform=!0,h.updateScroll("snapshot"),h.options.layoutRoot&&h.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),r&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Ai);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Mi);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Fh),this.nodes.forEach(kh),this.nodes.forEach(Oh)):this.nodes.forEach(Mi),this.clearAllSnapshots();const a=G.now();F.delta=lt(0,1e3/60,a-F.timestamp),F.timestamp=a,F.isProcessing=!0,$e.update.process(F),$e.preRender.process(F),$e.render.process(F),F.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,ts.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(jh),this.sharedNodes.forEach(zh)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,_.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){_.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!W(this.snapshot.measuredBox.x)&&!W(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const r=this.layout;this.layout=this.measure(!1),this.layoutCorrected=k(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,r?r.layoutBox:void 0)}updateScroll(r="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===r&&(a=!1),a&&this.instance){const l=s(this.instance);this.scroll={animationId:this.root.animationId,phase:r,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!i)return;const r=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!Ao(this.projectionDelta),l=this.getTransformTemplate(),u=l?l(this.latestValues,""):void 0,c=u!==this.prevTransformTemplateValue;r&&this.instance&&(a||vt(this.latestValues)||c)&&(i(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(r=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return r&&(l=this.removeTransform(l)),Gh(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:r}=this.options;if(!r)return k();const a=r.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(Hh))){const{scroll:u}=this.root;u&&(Dt(a.x,u.offset.x),Dt(a.y,u.offset.y))}return a}removeElementScroll(r){const a=k();if(Z(a,r),this.scroll?.wasRoot)return a;for(let l=0;l<this.path.length;l++){const u=this.path[l],{scroll:c,options:h}=u;u!==this.root&&c&&h.layoutScroll&&(c.wasRoot&&Z(a,r),Dt(a.x,c.offset.x),Dt(a.y,c.offset.y))}return a}applyTransform(r,a=!1){const l=k();Z(l,r);for(let u=0;u<this.path.length;u++){const c=this.path[u];!a&&c.options.layoutScroll&&c.scroll&&c!==c.root&&Rt(l,{x:-c.scroll.offset.x,y:-c.scroll.offset.y}),vt(c.latestValues)&&Rt(l,c.latestValues)}return vt(this.latestValues)&&Rt(l,this.latestValues),l}removeTransform(r){const a=k();Z(a,r);for(let l=0;l<this.path.length;l++){const u=this.path[l];if(!u.instance||!vt(u.latestValues))continue;Tn(u.latestValues)&&u.updateSnapshot();const c=k(),h=u.measurePageBox();Z(c,h),bi(a,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,c)}return vt(this.latestValues)&&bi(a,this.latestValues),a}setTargetDelta(r){this.targetDelta=r,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(r){this.options={...this.options,...r,crossfade:r.crossfade!==void 0?r.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!==F.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(r=!1){const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const l=!!this.resumingFrom||this!==a;if(!(r||l&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:c,layoutId:h}=this.options;if(!(!this.layout||!(c||h))){if(this.resolvedRelativeTargetAt=F.timestamp,!this.targetDelta&&!this.relativeTarget){const f=this.getClosestProjectingParent();f&&f.layout&&this.animationProgress!==1?(this.relativeParent=f,this.forceRelativeParentToResolveTarget(),this.relativeTarget=k(),this.relativeTargetOrigin=k(),Zt(this.relativeTargetOrigin,this.layout.layoutBox,f.layout.layoutBox),Z(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=k(),this.targetWithTransforms=k()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Qu(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Z(this.target,this.layout.layoutBox),oo(this.target,this.targetDelta)):Z(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const f=this.getClosestProjectingParent();f&&!!f.resumingFrom==!!this.resumingFrom&&!f.options.layoutScroll&&f.target&&this.animationProgress!==1?(this.relativeParent=f,this.forceRelativeParentToResolveTarget(),this.relativeTarget=k(),this.relativeTargetOrigin=k(),Zt(this.relativeTargetOrigin,this.target,f.target),Z(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||Tn(this.parent.latestValues)||ro(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){const r=this.getLead(),a=!!this.resumingFrom||this!==r;let l=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(l=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===F.timestamp&&(l=!1),l)return;const{layout:u,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||!(u||c))return;Z(this.layoutCorrected,this.layout.layoutBox);const h=this.treeScale.x,f=this.treeScale.y;hu(this.layoutCorrected,this.treeScale,this.path,a),r.layout&&!r.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(r.target=r.layout.layoutBox,r.targetWithTransforms=k());const{target:d}=r;if(!d){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(yi(this.prevProjectionDelta.x,this.projectionDelta.x),yi(this.prevProjectionDelta.y,this.projectionDelta.y)),qt(this.projectionDelta,this.layoutCorrected,d,this.latestValues),(this.treeScale.x!==h||this.treeScale.y!==f||!Ci(this.projectionDelta.x,this.prevProjectionDelta.x)||!Ci(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",d))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(r=!0){if(this.options.visualElement?.scheduleRender(),r){const a=this.getStack();a&&a.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=kt(),this.projectionDelta=kt(),this.projectionDeltaWithTransform=kt()}setAnimationOrigin(r,a=!1){const l=this.snapshot,u=l?l.latestValues:{},c={...this.latestValues},h=kt();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const f=k(),d=l?l.source:void 0,m=this.layout?this.layout.source:void 0,g=d!==m,x=this.getStack(),p=!x||x.members.length<=1,y=!!(g&&!p&&this.options.crossfade===!0&&!this.path.some(Uh));this.animationProgress=0;let v;this.mixTargetDelta=P=>{const w=P/1e3;Ei(h.x,r.x,w),Ei(h.y,r.y,w),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Zt(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Wh(this.relativeTarget,this.relativeTargetOrigin,f,w),v&&Vh(this.relativeTarget,v)&&(this.isProjectionDirty=!1),v||(v=k()),Z(v,this.relativeTarget)),g&&(this.animationValues=c,Th(c,u,this.latestValues,w,y,p)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=w},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(r){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(dt(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=_.update(()=>{Se.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=jt(0)),this.currentAnimation=yh(this.motionValue,[0,1e3],{...r,velocity:0,isSync:!0,onUpdate:a=>{this.mixTargetDelta(a),r.onUpdate&&r.onUpdate(a)},onStop:()=>{},onComplete:()=>{r.onComplete&&r.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 r=this.getStack();r&&r.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Dh),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const r=this.getLead();let{targetWithTransforms:a,target:l,layout:u,latestValues:c}=r;if(!(!a||!l||!u)){if(this!==r&&this.layout&&u&&_o(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||k();const h=W(this.layout.layoutBox.x);l.x.min=r.target.x.min,l.x.max=l.x.min+h;const f=W(this.layout.layoutBox.y);l.y.min=r.target.y.min,l.y.max=l.y.min+f}Z(a,l),Rt(a,c),qt(this.projectionDeltaWithTransform,this.layoutCorrected,a,c)}}registerSharedNode(r,a){this.sharedNodes.has(r)||this.sharedNodes.set(r,new Eh),this.sharedNodes.get(r).add(a);const u=a.options.initialPromotionConfig;a.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(a):void 0})}isLead(){const r=this.getStack();return r?r.lead===this:!0}getLead(){const{layoutId:r}=this.options;return r?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:r}=this.options;return r?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:r}=this.options;if(r)return this.root.sharedNodes.get(r)}promote({needsReset:r,transition:a,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),r&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const r=this.getStack();return r?r.relegate(this):!1}resetSkewAndRotation(){const{visualElement:r}=this.options;if(!r)return;let a=!1;const{latestValues:l}=r;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const u={};l.z&&Qe("z",r,u,this.animationValues);for(let c=0;c<Je.length;c++)Qe(`rotate${Je[c]}`,r,u,this.animationValues),Qe(`skew${Je[c]}`,r,u,this.animationValues);r.render();for(const c in u)r.setStaticValue(c,u[c]),this.animationValues&&(this.animationValues[c]=u[c]);r.scheduleRender()}applyProjectionStyles(r,a){if(!this.instance||this.isSVG)return;if(!this.isVisible){r.visibility="hidden";return}const l=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,r.visibility="",r.opacity="",r.pointerEvents=Te(a?.pointerEvents)||"",r.transform=l?l(this.latestValues,""):"none";return}const u=this.getLead();if(!this.projectionDelta||!this.layout||!u.target){this.options.layoutId&&(r.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,r.pointerEvents=Te(a?.pointerEvents)||""),this.hasProjected&&!vt(this.latestValues)&&(r.transform=l?l({},""):"none",this.hasProjected=!1);return}r.visibility="";const c=u.animationValues||u.latestValues;this.applyTransformsToTarget();let h=_h(this.projectionDeltaWithTransform,this.treeScale,c);l&&(h=l(c,h)),r.transform=h;const{x:f,y:d}=this.projectionDelta;r.transformOrigin=`${f.origin*100}% ${d.origin*100}% 0`,u.animationValues?r.opacity=u===this?c.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:c.opacityExit:r.opacity=u===this?c.opacity!==void 0?c.opacity:"":c.opacityExit!==void 0?c.opacityExit:0;for(const m in ie){if(c[m]===void 0)continue;const{correct:g,applyTo:x,isCSSVariable:p}=ie[m],y=h==="none"?c[m]:g(c[m],u);if(x){const v=x.length;for(let P=0;P<v;P++)r[x[P]]=y}else p?this.options.visualElement.renderState.vars[m]=y:r[m]=y}this.options.layoutId&&(r.pointerEvents=u===this?Te(a?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(r=>r.currentAnimation?.stop()),this.root.nodes.forEach(Ai),this.root.sharedNodes.clear()}}}function kh(t){t.updateLayout()}function Oh(t){const e=t.resumeFrom?.snapshot||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:s}=t.layout,{animationType:i}=t.options,o=e.source!==t.layout.source;i==="size"?Q(c=>{const h=o?e.measuredBox[c]:e.layoutBox[c],f=W(h);h.min=n[c].min,h.max=h.min+f}):_o(i,e.layoutBox,n)&&Q(c=>{const h=o?e.measuredBox[c]:e.layoutBox[c],f=W(n[c]);h.max=h.min+f,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[c].max=t.relativeTarget[c].min+f)});const r=kt();qt(r,n,e.layoutBox);const a=kt();o?qt(a,t.applyTransform(s,!0),e.measuredBox):qt(a,n,e.layoutBox);const l=!Ao(r);let u=!1;if(!t.resumeFrom){const c=t.getClosestProjectingParent();if(c&&!c.resumeFrom){const{snapshot:h,layout:f}=c;if(h&&f){const d=k();Zt(d,e.layoutBox,h.layoutBox);const m=k();Zt(m,n,f.layoutBox),Mo(d,m)||(u=!0),c.options.layoutRoot&&(t.relativeTarget=m,t.relativeTargetOrigin=d,t.relativeParent=c)}}}t.notifyListeners("didUpdate",{layout:n,snapshot:e,delta:a,layoutDelta:r,hasLayoutChanged:l,hasRelativeLayoutChanged:u})}else if(t.isLead()){const{onExitComplete:n}=t.options;n&&n()}t.options.transition=void 0}function Lh(t){t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function Ih(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function jh(t){t.clearSnapshot()}function Ai(t){t.clearMeasurements()}function Mi(t){t.isLayoutDirty=!1}function Fh(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function Vi(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function Bh(t){t.resolveTargetDelta()}function Nh(t){t.calcProjection()}function $h(t){t.resetSkewAndRotation()}function zh(t){t.removeLeadSnapshot()}function Ei(t,e,n){t.translate=R(e.translate,0,n),t.scale=R(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function _i(t,e,n,s){t.min=R(e.min,n.min,s),t.max=R(e.max,n.max,s)}function Wh(t,e,n,s){_i(t.x,e.x,n.x,s),_i(t.y,e.y,n.y,s)}function Uh(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const Kh={duration:.45,ease:[.4,0,.1,1]},Di=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),Ri=Di("applewebkit/")&&!Di("chrome/")?Math.round:et;function ki(t){t.min=Ri(t.min),t.max=Ri(t.max)}function Gh(t){ki(t.x),ki(t.y)}function _o(t,e,n){return t==="position"||t==="preserve-aspect"&&!Ju(Pi(e),Pi(n),.2)}function Hh(t){return t!==t.root&&t.scroll?.wasRoot}const Yh=Eo({attachResizeListener:(t,e)=>re(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),tn={current:void 0},Do=Eo({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!tn.current){const t=new Yh({});t.mount(window),t.setOptions({layoutScroll:!0}),tn.current=t}return tn.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),Xh={pan:{Feature:dh},drag:{Feature:fh,ProjectionNode:Do,MeasureLayout:So}};function Oi(t,e,n){const{props:s}=t;t.animationState&&s.whileHover&&t.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,o=s[i];o&&_.postRender(()=>o(e,he(e)))}class qh extends pt{mount(){const{current:e}=this.node;e&&(this.unmount=Tc(e,(n,s)=>(Oi(this.node,s,"Start"),i=>Oi(this.node,i,"End"))))}unmount(){}}class Zh extends pt{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch{e=!0}!e||!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=le(re(this.node.current,"focus",()=>this.onFocus()),re(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Li(t,e,n){const{props:s}=t;if(t.current instanceof HTMLButtonElement&&t.current.disabled)return;t.animationState&&s.whileTap&&t.animationState.setActive("whileTap",n==="Start");const i="onTap"+(n==="End"?"":n),o=s[i];o&&_.postRender(()=>o(e,he(e)))}class Jh extends pt{mount(){const{current:e}=this.node;e&&(this.unmount=Ac(e,(n,s)=>(Li(this.node,s,"Start"),(i,{success:o})=>Li(this.node,i,o?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const En=new WeakMap,en=new WeakMap,Qh=t=>{const e=En.get(t.target);e&&e(t)},tf=t=>{t.forEach(Qh)};function ef({root:t,...e}){const n=t||document;en.has(n)||en.set(n,{});const s=en.get(n),i=JSON.stringify(e);return s[i]||(s[i]=new IntersectionObserver(tf,{root:t,...e})),s[i]}function nf(t,e,n){const s=ef(e);return En.set(t,n),s.observe(t),()=>{En.delete(t),s.unobserve(t)}}const sf={some:0,all:1};class rf extends pt{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:n,margin:s,amount:i="some",once:o}=e,r={root:n?n.current:void 0,rootMargin:s,threshold:typeof i=="number"?i:sf[i]},a=l=>{const{isIntersecting:u}=l;if(this.isInView===u||(this.isInView=u,o&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:c,onViewportLeave:h}=this.node.getProps(),f=u?c:h;f&&f(l)};return nf(this.node.current,r,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:n}=this.node;["amount","margin","root"].some(of(e,n))&&this.startObserver()}unmount(){}}function of({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const af={inView:{Feature:rf},tap:{Feature:Jh},focus:{Feature:Zh},hover:{Feature:qh}},lf={layout:{ProjectionNode:Do,MeasureLayout:So}},cf={...Gu,...af,...Xh,...lf},Ro=lu(cf,wu),uf=t=>{let e;t.center?e="center":t.left?e="left":t.right&&(e="right");let n;return t.uppercase?n="uppercase":t.lowercase?n="lowercase":t.capitalize&&(n="capitalize"),U({marginTop:t.mt,marginBottom:t.mb,flex:t.flex,cursor:t.cursor,wordBreak:t.wordBreak,whiteSpace:t.whiteSpace,textOverflow:t.textOverflow,textDecoration:t.decoration,textAlign:e,textTransform:n,color:t.color})},hf="_primary_13825_8",ff="_secondary_13825_12",df="_tertiary_13825_16",mf="_positive_13825_20",pf="_negative_13825_24",gf="_warning_13825_28",yf="_accent_13825_32",vf="_inverse_13825_36",xf="_text_13825_111",bf="_regular_13825_117",wf="_medium_13825_121",Tf="_semibold_13825_125",Sf="_bold_13825_129",ge={primary:hf,secondary:ff,tertiary:df,positive:mf,negative:pf,warning:gf,accent:yf,inverse:vf,"title-1":"_title-1_13825_41","title-2":"_title-2_13825_51","title-3":"_title-3_13825_61","headline-1":"_headline-1_13825_76","headline-2":"_headline-2_13825_81","headline-3":"_headline-3_13825_86","body-1":"_body-1_13825_91","body-2":"_body-2_13825_96","caption-1":"_caption-1_13825_101","caption-2":"_caption-2_13825_106",text:xf,regular:bf,medium:wf,semibold:Tf,bold:Sf},Pt=b.forwardRef((t,e)=>{const{children:n,className:s,variant:i="body-1",fontWeight:o="medium",tag:r="p",colorName:a="primary",style:l,clickOpacity:u=.5,opacityDuration:c=200,onClick:h,...f}=t,[d,m]=b.useState(!1),g=!!h,x=()=>g&&m(!0),p=()=>g&&m(!1),y=r,v=g?U({opacity:d?u:1,transition:`opacity ${c}ms ease`}):"";return A.jsx(y,{ref:e,...f,className:at(ge.text,ge[i],ge[o],ge[a],uf(t),v,s),style:l,onClick:h,onMouseDown:x,onMouseUp:p,onMouseLeave:p,onTouchStart:x,onTouchEnd:p,role:g?"button":void 0,tabIndex:g?0:void 0,children:n})});Pt.displayName="Text";const ko=Ro(Pt);function Pf(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var nn={exports:{}};/*!
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const w=require("react/jsx-runtime"),b=require("react"),Qi=require("react-dom");function ea(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const s=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,s.get?s:{enumerable:!0,get:()=>t[n]})}}return e.default=t,Object.freeze(e)}const D=ea(b);function na(t){if(t.sheet)return t.sheet;for(var e=0;e<document.styleSheets.length;e++)if(document.styleSheets[e].ownerNode===t)return document.styleSheets[e]}function sa(t){var e=document.createElement("style");return e.setAttribute("data-emotion",t.key),t.nonce!==void 0&&e.setAttribute("nonce",t.nonce),e.appendChild(document.createTextNode("")),e.setAttribute("data-s",""),e}var ia=(function(){function t(n){var s=this;this._insertTag=function(i){var o;s.tags.length===0?s.insertionPoint?o=s.insertionPoint.nextSibling:s.prepend?o=s.container.firstChild:o=s.before:o=s.tags[s.tags.length-1].nextSibling,s.container.insertBefore(i,o),s.tags.push(i)},this.isSpeedy=n.speedy===void 0?!0:n.speedy,this.tags=[],this.ctr=0,this.nonce=n.nonce,this.key=n.key,this.container=n.container,this.prepend=n.prepend,this.insertionPoint=n.insertionPoint,this.before=null}var e=t.prototype;return e.hydrate=function(s){s.forEach(this._insertTag)},e.insert=function(s){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(sa(this));var i=this.tags[this.tags.length-1];if(this.isSpeedy){var o=na(i);try{o.insertRule(s,o.cssRules.length)}catch{}}else i.appendChild(document.createTextNode(s));this.ctr++},e.flush=function(){this.tags.forEach(function(s){var i;return(i=s.parentNode)==null?void 0:i.removeChild(s)}),this.tags=[],this.ctr=0},t})(),U="-ms-",De="-moz-",A="-webkit-",tr="comm",Fn="rule",Nn="decl",ra="@import",er="@keyframes",oa="@layer",aa=Math.abs,Fe=String.fromCharCode,la=Object.assign;function ca(t,e){return $(t,0)^45?(((e<<2^$(t,0))<<2^$(t,1))<<2^$(t,2))<<2^$(t,3):0}function nr(t){return t.trim()}function ua(t,e){return(t=e.exec(t))?t[0]:t}function E(t,e,n){return t.replace(e,n)}function pn(t,e){return t.indexOf(e)}function $(t,e){return t.charCodeAt(e)|0}function se(t,e,n){return t.slice(e,n)}function lt(t){return t.length}function zn(t){return t.length}function xe(t,e){return e.push(t),t}function ha(t,e){return t.map(e).join("")}var Ne=1,Ft=1,sr=0,q=0,B=0,$t="";function ze(t,e,n,s,i,o,r){return{value:t,root:e,parent:n,type:s,props:i,children:o,line:Ne,column:Ft,length:r,return:""}}function Xt(t,e){return la(ze("",null,null,"",null,null,0),t,{length:-t.length},e)}function fa(){return B}function da(){return B=q>0?$($t,--q):0,Ft--,B===10&&(Ft=1,Ne--),B}function Z(){return B=q<sr?$($t,q++):0,Ft++,B===10&&(Ft=1,Ne++),B}function ct(){return $($t,q)}function Pe(){return q}function fe(t,e){return se($t,t,e)}function ie(t){switch(t){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function ir(t){return Ne=Ft=1,sr=lt($t=t),q=0,[]}function rr(t){return $t="",t}function _e(t){return nr(fe(q-1,gn(t===91?t+2:t===40?t+1:t)))}function ma(t){for(;(B=ct())&&B<33;)Z();return ie(t)>2||ie(B)>3?"":" "}function pa(t,e){for(;--e&&Z()&&!(B<48||B>102||B>57&&B<65||B>70&&B<97););return fe(t,Pe()+(e<6&&ct()==32&&Z()==32))}function gn(t){for(;Z();)switch(B){case t:return q;case 34:case 39:t!==34&&t!==39&&gn(B);break;case 40:t===41&&gn(t);break;case 92:Z();break}return q}function ga(t,e){for(;Z()&&t+B!==57;)if(t+B===84&&ct()===47)break;return"/*"+fe(e,q-1)+"*"+Fe(t===47?t:Z())}function ya(t){for(;!ie(ct());)Z();return fe(t,q)}function va(t){return rr(Me("",null,null,null,[""],t=ir(t),0,[0],t))}function Me(t,e,n,s,i,o,r,a,l){for(var u=0,c=0,h=r,f=0,d=0,y=0,m=1,x=1,p=1,v=0,g="",S=i,T=o,_=s,C=g;x;)switch(y=v,v=Z()){case 40:if(y!=108&&$(C,h-1)==58){pn(C+=E(_e(v),"&","&\f"),"&\f")!=-1&&(p=-1);break}case 34:case 39:case 91:C+=_e(v);break;case 9:case 10:case 13:case 32:C+=ma(y);break;case 92:C+=pa(Pe()-1,7);continue;case 47:switch(ct()){case 42:case 47:xe(xa(ga(Z(),Pe()),e,n),l);break;default:C+="/"}break;case 123*m:a[u++]=lt(C)*p;case 125*m:case 59:case 0:switch(v){case 0:case 125:x=0;case 59+c:p==-1&&(C=E(C,/\f/g,"")),d>0&<(C)-h&&xe(d>32?Ss(C+";",s,n,h-1):Ss(E(C," ","")+";",s,n,h-2),l);break;case 59:C+=";";default:if(xe(_=Ts(C,e,n,u,c,i,a,g,S=[],T=[],h),o),v===123)if(c===0)Me(C,e,_,_,S,o,h,a,T);else switch(f===99&&$(C,3)===110?100:f){case 100:case 108:case 109:case 115:Me(t,_,_,s&&xe(Ts(t,_,_,0,0,i,a,g,i,S=[],h),T),i,T,h,a,s?S:T);break;default:Me(C,_,_,_,[""],T,0,a,T)}}u=c=d=0,m=p=1,g=C="",h=r;break;case 58:h=1+lt(C),d=y;default:if(m<1){if(v==123)--m;else if(v==125&&m++==0&&da()==125)continue}switch(C+=Fe(v),v*m){case 38:p=c>0?1:(C+="\f",-1);break;case 44:a[u++]=(lt(C)-1)*p,p=1;break;case 64:ct()===45&&(C+=_e(Z())),f=ct(),c=h=lt(g=C+=ya(Pe())),v++;break;case 45:y===45&<(C)==2&&(m=0)}}return o}function Ts(t,e,n,s,i,o,r,a,l,u,c){for(var h=i-1,f=i===0?o:[""],d=zn(f),y=0,m=0,x=0;y<s;++y)for(var p=0,v=se(t,h+1,h=aa(m=r[y])),g=t;p<d;++p)(g=nr(m>0?f[p]+" "+v:E(v,/&\f/g,f[p])))&&(l[x++]=g);return ze(t,e,n,i===0?Fn:a,l,u,c)}function xa(t,e,n){return ze(t,e,n,tr,Fe(fa()),se(t,2,-2),0)}function Ss(t,e,n,s){return ze(t,e,n,Nn,se(t,0,s),se(t,s+1,-1),s)}function It(t,e){for(var n="",s=zn(t),i=0;i<s;i++)n+=e(t[i],i,t,e)||"";return n}function ba(t,e,n,s){switch(t.type){case oa:if(t.children.length)break;case ra:case Nn:return t.return=t.return||t.value;case tr:return"";case er:return t.return=t.value+"{"+It(t.children,s)+"}";case Fn:t.value=t.props.join(",")}return lt(n=It(t.children,s))?t.return=t.value+"{"+n+"}":""}function wa(t){var e=zn(t);return function(n,s,i,o){for(var r="",a=0;a<e;a++)r+=t[a](n,s,i,o)||"";return r}}function Ta(t){return function(e){e.root||(e=e.return)&&t(e)}}function Sa(t){var e=Object.create(null);return function(n){return e[n]===void 0&&(e[n]=t(n)),e[n]}}var Ca=function(e,n,s){for(var i=0,o=0;i=o,o=ct(),i===38&&o===12&&(n[s]=1),!ie(o);)Z();return fe(e,q)},Pa=function(e,n){var s=-1,i=44;do switch(ie(i)){case 0:i===38&&ct()===12&&(n[s]=1),e[s]+=Ca(q-1,n,s);break;case 2:e[s]+=_e(i);break;case 4:if(i===44){e[++s]=ct()===58?"&\f":"",n[s]=e[s].length;break}default:e[s]+=Fe(i)}while(i=Z());return e},_a=function(e,n){return rr(Pa(ir(e),n))},Cs=new WeakMap,Ma=function(e){if(!(e.type!=="rule"||!e.parent||e.length<1)){for(var n=e.value,s=e.parent,i=e.column===s.column&&e.line===s.line;s.type!=="rule";)if(s=s.parent,!s)return;if(!(e.props.length===1&&n.charCodeAt(0)!==58&&!Cs.get(s))&&!i){Cs.set(e,!0);for(var o=[],r=_a(n,o),a=s.props,l=0,u=0;l<r.length;l++)for(var c=0;c<a.length;c++,u++)e.props[u]=o[l]?r[l].replace(/&\f/g,a[c]):a[c]+" "+r[l]}}},Aa=function(e){if(e.type==="decl"){var n=e.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(e.return="",e.value="")}};function or(t,e){switch(ca(t,e)){case 5103:return A+"print-"+t+t;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return A+t+t;case 5349:case 4246:case 4810:case 6968:case 2756:return A+t+De+t+U+t+t;case 6828:case 4268:return A+t+U+t+t;case 6165:return A+t+U+"flex-"+t+t;case 5187:return A+t+E(t,/(\w+).+(:[^]+)/,A+"box-$1$2"+U+"flex-$1$2")+t;case 5443:return A+t+U+"flex-item-"+E(t,/flex-|-self/,"")+t;case 4675:return A+t+U+"flex-line-pack"+E(t,/align-content|flex-|-self/,"")+t;case 5548:return A+t+U+E(t,"shrink","negative")+t;case 5292:return A+t+U+E(t,"basis","preferred-size")+t;case 6060:return A+"box-"+E(t,"-grow","")+A+t+U+E(t,"grow","positive")+t;case 4554:return A+E(t,/([^-])(transform)/g,"$1"+A+"$2")+t;case 6187:return E(E(E(t,/(zoom-|grab)/,A+"$1"),/(image-set)/,A+"$1"),t,"")+t;case 5495:case 3959:return E(t,/(image-set\([^]*)/,A+"$1$`$1");case 4968:return E(E(t,/(.+:)(flex-)?(.*)/,A+"box-pack:$3"+U+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+A+t+t;case 4095:case 3583:case 4068:case 2532:return E(t,/(.+)-inline(.+)/,A+"$1$2")+t;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(lt(t)-1-e>6)switch($(t,e+1)){case 109:if($(t,e+4)!==45)break;case 102:return E(t,/(.+:)(.+)-([^]+)/,"$1"+A+"$2-$3$1"+De+($(t,e+3)==108?"$3":"$2-$3"))+t;case 115:return~pn(t,"stretch")?or(E(t,"stretch","fill-available"),e)+t:t}break;case 4949:if($(t,e+1)!==115)break;case 6444:switch($(t,lt(t)-3-(~pn(t,"!important")&&10))){case 107:return E(t,":",":"+A)+t;case 101:return E(t,/(.+:)([^;!]+)(;|!.+)?/,"$1"+A+($(t,14)===45?"inline-":"")+"box$3$1"+A+"$2$3$1"+U+"$2box$3")+t}break;case 5936:switch($(t,e+11)){case 114:return A+t+U+E(t,/[svh]\w+-[tblr]{2}/,"tb")+t;case 108:return A+t+U+E(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return A+t+U+E(t,/[svh]\w+-[tblr]{2}/,"lr")+t}return A+t+U+t+t}return t}var Ea=function(e,n,s,i){if(e.length>-1&&!e.return)switch(e.type){case Nn:e.return=or(e.value,e.length);break;case er:return It([Xt(e,{value:E(e.value,"@","@"+A)})],i);case Fn:if(e.length)return ha(e.props,function(o){switch(ua(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return It([Xt(e,{props:[E(o,/:(read-\w+)/,":"+De+"$1")]})],i);case"::placeholder":return It([Xt(e,{props:[E(o,/:(plac\w+)/,":"+A+"input-$1")]}),Xt(e,{props:[E(o,/:(plac\w+)/,":"+De+"$1")]}),Xt(e,{props:[E(o,/:(plac\w+)/,U+"input-$1")]})],i)}return""})}},Va=[Ea],Ra=function(e){var n=e.key;if(n==="css"){var s=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(s,function(m){var x=m.getAttribute("data-emotion");x.indexOf(" ")!==-1&&(document.head.appendChild(m),m.setAttribute("data-s",""))})}var i=e.stylisPlugins||Va,o={},r,a=[];r=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(m){for(var x=m.getAttribute("data-emotion").split(" "),p=1;p<x.length;p++)o[x[p]]=!0;a.push(m)});var l,u=[Ma,Aa];{var c,h=[ba,Ta(function(m){c.insert(m)})],f=wa(u.concat(i,h)),d=function(x){return It(va(x),f)};l=function(x,p,v,g){c=v,d(x?x+"{"+p.styles+"}":p.styles),g&&(y.inserted[p.name]=!0)}}var y={key:n,sheet:new ia({key:n,container:r,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:o,registered:{},insert:l};return y.sheet.hydrate(a),y};function Da(t){for(var e=0,n,s=0,i=t.length;i>=4;++s,i-=4)n=t.charCodeAt(s)&255|(t.charCodeAt(++s)&255)<<8|(t.charCodeAt(++s)&255)<<16|(t.charCodeAt(++s)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,e=(n&65535)*1540483477+((n>>>16)*59797<<16)^(e&65535)*1540483477+((e>>>16)*59797<<16);switch(i){case 3:e^=(t.charCodeAt(s+2)&255)<<16;case 2:e^=(t.charCodeAt(s+1)&255)<<8;case 1:e^=t.charCodeAt(s)&255,e=(e&65535)*1540483477+((e>>>16)*59797<<16)}return e^=e>>>13,e=(e&65535)*1540483477+((e>>>16)*59797<<16),((e^e>>>15)>>>0).toString(36)}var ka={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},La=/[A-Z]|^ms/g,Oa=/_EMO_([^_]+?)_([^]*?)_EMO_/g,ar=function(e){return e.charCodeAt(1)===45},Ps=function(e){return e!=null&&typeof e!="boolean"},He=Sa(function(t){return ar(t)?t:t.replace(La,"-$&").toLowerCase()}),_s=function(e,n){switch(e){case"animation":case"animationName":if(typeof n=="string")return n.replace(Oa,function(s,i,o){return pt={name:i,styles:o,next:pt},i})}return ka[e]!==1&&!ar(e)&&typeof n=="number"&&n!==0?n+"px":n};function ke(t,e,n){if(n==null)return"";var s=n;if(s.__emotion_styles!==void 0)return s;switch(typeof n){case"boolean":return"";case"object":{var i=n;if(i.anim===1)return pt={name:i.name,styles:i.styles,next:pt},i.name;var o=n;if(o.styles!==void 0){var r=o.next;if(r!==void 0)for(;r!==void 0;)pt={name:r.name,styles:r.styles,next:pt},r=r.next;var a=o.styles+";";return a}return ja(t,e,n)}}var l=n;if(e==null)return l;var u=e[l];return u!==void 0?u:l}function ja(t,e,n){var s="";if(Array.isArray(n))for(var i=0;i<n.length;i++)s+=ke(t,e,n[i])+";";else for(var o in n){var r=n[o];if(typeof r!="object"){var a=r;e!=null&&e[a]!==void 0?s+=o+"{"+e[a]+"}":Ps(a)&&(s+=He(o)+":"+_s(o,a)+";")}else if(Array.isArray(r)&&typeof r[0]=="string"&&(e==null||e[r[0]]===void 0))for(var l=0;l<r.length;l++)Ps(r[l])&&(s+=He(o)+":"+_s(o,r[l])+";");else{var u=ke(t,e,r);switch(o){case"animation":case"animationName":{s+=He(o)+":"+u+";";break}default:s+=o+"{"+u+"}"}}}return s}var Ms=/label:\s*([^\s;{]+)\s*(;|$)/g,pt;function Ye(t,e,n){if(t.length===1&&typeof t[0]=="object"&&t[0]!==null&&t[0].styles!==void 0)return t[0];var s=!0,i="";pt=void 0;var o=t[0];if(o==null||o.raw===void 0)s=!1,i+=ke(n,e,o);else{var r=o;i+=r[0]}for(var a=1;a<t.length;a++)if(i+=ke(n,e,t[a]),s){var l=o;i+=l[a]}Ms.lastIndex=0;for(var u="",c;(c=Ms.exec(i))!==null;)u+="-"+c[1];var h=Da(i)+u;return{name:h,styles:i,next:pt}}function lr(t,e,n){var s="";return n.split(" ").forEach(function(i){t[i]!==void 0?e.push(t[i]+";"):i&&(s+=i+" ")}),s}var Ia=function(e,n,s){var i=e.key+"-"+n.name;e.registered[i]===void 0&&(e.registered[i]=n.styles)},Ba=function(e,n,s){Ia(e,n);var i=e.key+"-"+n.name;if(e.inserted[n.name]===void 0){var o=n;do e.insert(n===o?"."+i:"",o,e.sheet,!0),o=o.next;while(o!==void 0)}};function As(t,e){if(t.inserted[e.name]===void 0)return t.insert("",e,t.sheet,!0)}function Es(t,e,n){var s=[],i=lr(t,s,n);return s.length<2?n:i+e(s)}var Fa=function(e){var n=Ra(e);n.sheet.speedy=function(a){this.isSpeedy=a},n.compat=!0;var s=function(){for(var l=arguments.length,u=new Array(l),c=0;c<l;c++)u[c]=arguments[c];var h=Ye(u,n.registered,void 0);return Ba(n,h),n.key+"-"+h.name},i=function(){for(var l=arguments.length,u=new Array(l),c=0;c<l;c++)u[c]=arguments[c];var h=Ye(u,n.registered),f="animation-"+h.name;return As(n,{name:h.name,styles:"@keyframes "+f+"{"+h.styles+"}"}),f},o=function(){for(var l=arguments.length,u=new Array(l),c=0;c<l;c++)u[c]=arguments[c];var h=Ye(u,n.registered);As(n,h)},r=function(){for(var l=arguments.length,u=new Array(l),c=0;c<l;c++)u[c]=arguments[c];return Es(n.registered,s,Na(u))};return{css:s,cx:r,injectGlobal:o,keyframes:i,hydrate:function(l){l.forEach(function(u){n.inserted[u]=!0})},flush:function(){n.registered={},n.inserted={},n.sheet.flush()},sheet:n.sheet,cache:n,getRegisteredStyles:lr.bind(null,n.registered),merge:Es.bind(null,n.registered,s)}},Na=function t(e){for(var n="",s=0;s<e.length;s++){var i=e[s];if(i!=null){var o=void 0;switch(typeof i){case"boolean":break;case"object":{if(Array.isArray(i))o=t(i);else{o="";for(var r in i)i[r]&&r&&(o&&(o+=" "),o+=r)}break}default:o=i}o&&(n&&(n+=" "),n+=o)}}return n},cr=Fa({key:"css"}),W=cr.cx,K=cr.css;function za(t){const{h:e,w:n,m:s,mx:i,my:o,mt:r,mr:a,mb:l,ml:u,p:c,px:h,py:f,pt:d,pr:y,pb:m,pl:x,xGap:p,yGap:v,row:g,flex:S,relative:T,absolute:_,display:C,overflow:P,...V}=t;return{spacers:{h:e,w:n,m:s,mx:i,my:o,mt:r,mr:a,mb:l,ml:u,p:c,px:h,py:f,pt:d,pr:y,pb:m,pl:x,xGap:p,yGap:v,row:g,flex:S,relative:T,absolute:_,overflow:P,...V},rest:V}}const $a=t=>K({display:t.display??"flex",flexDirection:t.row?"row":"column",height:t.h==="screen"?"100vh":t.h==="full"?"100%":t.h,width:t.w==="screen"?"100vw":t.w==="full"?"100%":t.w,margin:t.m,marginTop:t.mt??t.my,marginBottom:t.mb??t.my,marginLeft:t.ml??t.mx,marginRight:t.mr??t.mx,padding:t.p,paddingTop:t.pt??t.py,paddingBottom:t.pb??t.py,paddingLeft:t.pl??t.px,paddingRight:t.pr??t.px,gap:t.gap,columnGap:t.xGap,rowGap:t.yGap,justifyContent:t.center?"center":t.justifyContent,alignItems:t.center?"center":t.alignItems,alignSelf:t.alignSelf,borderWidth:t.borderWidth,borderBottomWidth:t.borderBottomWidth,borderColor:t.borderColor,borderRadius:t.borderRadius,zIndex:t.zIndex,overflow:t.overflow,minWidth:t.minWidth,minHeight:t.minHeight,maxWidth:t.maxWidth,maxHeight:t.maxHeight,flex:t.flex===!0?1:t.flex,flexWrap:t.flexWrap,flexGrow:t.flexGrow,flexShrink:t.flexShrink,flexBasis:t.flexBasis,backgroundColor:t.backgroundColor,position:t.absolute?"absolute":t.relative?"relative":"unset",...t.absoluteFill&&{position:"absolute",top:0,right:0,bottom:0,left:0}}),R=b.forwardRef(({className:t,children:e,...n},s)=>{const{spacers:i,rest:o}=za(n),r=b.useMemo(()=>$a(i),[i]);return w.jsx("div",{ref:s,className:W(r,t),...o,children:e})});R.displayName="Box";const ur=b.createContext({});function Wa(t){const e=b.useRef(null);return e.current===null&&(e.current=t()),e.current}const $n=typeof window<"u",Ua=$n?b.useLayoutEffect:b.useEffect,Wn=b.createContext(null);function Un(t,e){t.indexOf(e)===-1&&t.push(e)}function Kn(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const ht=(t,e,n)=>n>e?e:n<t?t:n;function yn(t,e){return e?`${t}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${e}`:t}let Wt=()=>{},ft=()=>{};process.env.NODE_ENV!=="production"&&(Wt=(t,e,n)=>{!t&&typeof console<"u"&&console.warn(yn(e,n))},ft=(t,e,n)=>{if(!t)throw new Error(yn(e,n))});const dt={},hr=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t);function fr(t){return typeof t=="object"&&t!==null}const dr=t=>/^0[^.\s]+$/u.test(t);function Gn(t){let e;return()=>(e===void 0&&(e=t()),e)}const st=t=>t,Ka=(t,e)=>n=>e(t(n)),de=(...t)=>t.reduce(Ka),re=(t,e,n)=>{const s=e-t;return s===0?1:(n-t)/s};class Hn{constructor(){this.subscriptions=[]}add(e){return Un(this.subscriptions,e),()=>Kn(this.subscriptions,e)}notify(e,n,s){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](e,n,s);else for(let o=0;o<i;o++){const r=this.subscriptions[o];r&&r(e,n,s)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const ot=t=>t*1e3,nt=t=>t/1e3;function mr(t,e){return e?t*(1e3/e):0}const Vs=new Set;function Yn(t,e,n){t||Vs.has(e)||(console.warn(yn(e,n)),Vs.add(e))}const pr=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,Ga=1e-7,Ha=12;function Ya(t,e,n,s,i){let o,r,a=0;do r=e+(n-e)/2,o=pr(r,s,i)-t,o>0?n=r:e=r;while(Math.abs(o)>Ga&&++a<Ha);return r}function me(t,e,n,s){if(t===e&&n===s)return st;const i=o=>Ya(o,0,1,t,n);return o=>o===0||o===1?o:pr(i(o),e,s)}const gr=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,yr=t=>e=>1-t(1-e),vr=me(.33,1.53,.69,.99),Xn=yr(vr),xr=gr(Xn),br=t=>(t*=2)<1?.5*Xn(t):.5*(2-Math.pow(2,-10*(t-1))),qn=t=>1-Math.sin(Math.acos(t)),wr=yr(qn),Tr=gr(qn),Xa=me(.42,0,1,1),qa=me(0,0,.58,1),Sr=me(.42,0,.58,1),Za=t=>Array.isArray(t)&&typeof t[0]!="number",Cr=t=>Array.isArray(t)&&typeof t[0]=="number",Rs={linear:st,easeIn:Xa,easeInOut:Sr,easeOut:qa,circIn:qn,circInOut:Tr,circOut:wr,backIn:Xn,backInOut:xr,backOut:vr,anticipate:br},Ja=t=>typeof t=="string",Ds=t=>{if(Cr(t)){ft(t.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[e,n,s,i]=t;return me(e,n,s,i)}else if(Ja(t))return ft(Rs[t]!==void 0,`Invalid easing type '${t}'`,"invalid-easing-type"),Rs[t];return t},be=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function Qa(t,e){let n=new Set,s=new Set,i=!1,o=!1;const r=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function l(c){r.has(c)&&(u.schedule(c),t()),c(a)}const u={schedule:(c,h=!1,f=!1)=>{const y=f&&i?n:s;return h&&r.add(c),y.has(c)||y.add(c),c},cancel:c=>{s.delete(c),r.delete(c)},process:c=>{if(a=c,i){o=!0;return}i=!0,[n,s]=[s,n],n.forEach(l),n.clear(),i=!1,o&&(o=!1,u.process(c))}};return u}const tl=40;function Pr(t,e){let n=!1,s=!0;const i={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,r=be.reduce((g,S)=>(g[S]=Qa(o),g),{}),{setup:a,read:l,resolveKeyframes:u,preUpdate:c,update:h,preRender:f,render:d,postRender:y}=r,m=()=>{const g=dt.useManualTiming?i.timestamp:performance.now();n=!1,dt.useManualTiming||(i.delta=s?1e3/60:Math.max(Math.min(g-i.timestamp,tl),1)),i.timestamp=g,i.isProcessing=!0,a.process(i),l.process(i),u.process(i),c.process(i),h.process(i),f.process(i),d.process(i),y.process(i),i.isProcessing=!1,n&&e&&(s=!1,t(m))},x=()=>{n=!0,s=!0,i.isProcessing||t(m)};return{schedule:be.reduce((g,S)=>{const T=r[S];return g[S]=(_,C=!1,P=!1)=>(n||x(),T.schedule(_,C,P)),g},{}),cancel:g=>{for(let S=0;S<be.length;S++)r[be[S]].cancel(g)},state:i,steps:r}}const{schedule:k,cancel:gt,state:z,steps:Xe}=Pr(typeof requestAnimationFrame<"u"?requestAnimationFrame:st,!0);let Ae;function el(){Ae=void 0}const X={now:()=>(Ae===void 0&&X.set(z.isProcessing||dt.useManualTiming?z.timestamp:performance.now()),Ae),set:t=>{Ae=t,queueMicrotask(el)}},_r=t=>e=>typeof e=="string"&&e.startsWith(t),Zn=_r("--"),nl=_r("var(--"),Jn=t=>nl(t)?sl.test(t.split("/*")[0].trim()):!1,sl=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Ut={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},oe={...Ut,transform:t=>ht(0,1,t)},we={...Ut,default:1},Qt=t=>Math.round(t*1e5)/1e5,Qn=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function il(t){return t==null}const rl=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,ts=(t,e)=>n=>!!(typeof n=="string"&&rl.test(n)&&n.startsWith(t)||e&&!il(n)&&Object.prototype.hasOwnProperty.call(n,e)),Mr=(t,e,n)=>s=>{if(typeof s!="string")return s;const[i,o,r,a]=s.match(Qn);return{[t]:parseFloat(i),[e]:parseFloat(o),[n]:parseFloat(r),alpha:a!==void 0?parseFloat(a):1}},ol=t=>ht(0,255,t),qe={...Ut,transform:t=>Math.round(ol(t))},St={test:ts("rgb","red"),parse:Mr("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+qe.transform(t)+", "+qe.transform(e)+", "+qe.transform(n)+", "+Qt(oe.transform(s))+")"};function al(t){let e="",n="",s="",i="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),s=t.substring(5,7),i=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),s=t.substring(3,4),i=t.substring(4,5),e+=e,n+=n,s+=s,i+=i),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(s,16),alpha:i?parseInt(i,16)/255:1}}const vn={test:ts("#"),parse:al,transform:St.transform},pe=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),mt=pe("deg"),ut=pe("%"),M=pe("px"),ll=pe("vh"),cl=pe("vw"),ks={...ut,parse:t=>ut.parse(t)/100,transform:t=>ut.transform(t*100)},Rt={test:ts("hsl","hue"),parse:Mr("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:s=1})=>"hsla("+Math.round(t)+", "+ut.transform(Qt(e))+", "+ut.transform(Qt(n))+", "+Qt(oe.transform(s))+")"},I={test:t=>St.test(t)||vn.test(t)||Rt.test(t),parse:t=>St.test(t)?St.parse(t):Rt.test(t)?Rt.parse(t):vn.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?St.transform(t):Rt.transform(t),getAnimatableNone:t=>{const e=I.parse(t);return e.alpha=0,I.transform(e)}},ul=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function hl(t){return isNaN(t)&&typeof t=="string"&&(t.match(Qn)?.length||0)+(t.match(ul)?.length||0)>0}const Ar="number",Er="color",fl="var",dl="var(",Ls="${}",ml=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function ae(t){const e=t.toString(),n=[],s={color:[],number:[],var:[]},i=[];let o=0;const a=e.replace(ml,l=>(I.test(l)?(s.color.push(o),i.push(Er),n.push(I.parse(l))):l.startsWith(dl)?(s.var.push(o),i.push(fl),n.push(l)):(s.number.push(o),i.push(Ar),n.push(parseFloat(l))),++o,Ls)).split(Ls);return{values:n,split:a,indexes:s,types:i}}function Vr(t){return ae(t).values}function Rr(t){const{split:e,types:n}=ae(t),s=e.length;return i=>{let o="";for(let r=0;r<s;r++)if(o+=e[r],i[r]!==void 0){const a=n[r];a===Ar?o+=Qt(i[r]):a===Er?o+=I.transform(i[r]):o+=i[r]}return o}}const pl=t=>typeof t=="number"?0:I.test(t)?I.getAnimatableNone(t):t;function gl(t){const e=Vr(t);return Rr(t)(e.map(pl))}const yt={test:hl,parse:Vr,createTransformer:Rr,getAnimatableNone:gl};function Ze(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function yl({hue:t,saturation:e,lightness:n,alpha:s}){t/=360,e/=100,n/=100;let i=0,o=0,r=0;if(!e)i=o=r=n;else{const a=n<.5?n*(1+e):n+e-n*e,l=2*n-a;i=Ze(l,a,t+1/3),o=Ze(l,a,t),r=Ze(l,a,t-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(r*255),alpha:s}}function Le(t,e){return n=>n>0?e:t}const O=(t,e,n)=>t+(e-t)*n,Je=(t,e,n)=>{const s=t*t,i=n*(e*e-s)+s;return i<0?0:Math.sqrt(i)},vl=[vn,St,Rt],xl=t=>vl.find(e=>e.test(t));function Os(t){const e=xl(t);if(Wt(!!e,`'${t}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!e)return!1;let n=e.parse(t);return e===Rt&&(n=yl(n)),n}const js=(t,e)=>{const n=Os(t),s=Os(e);if(!n||!s)return Le(t,e);const i={...n};return o=>(i.red=Je(n.red,s.red,o),i.green=Je(n.green,s.green,o),i.blue=Je(n.blue,s.blue,o),i.alpha=O(n.alpha,s.alpha,o),St.transform(i))},xn=new Set(["none","hidden"]);function bl(t,e){return xn.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function wl(t,e){return n=>O(t,e,n)}function es(t){return typeof t=="number"?wl:typeof t=="string"?Jn(t)?Le:I.test(t)?js:Cl:Array.isArray(t)?Dr:typeof t=="object"?I.test(t)?js:Tl:Le}function Dr(t,e){const n=[...t],s=n.length,i=t.map((o,r)=>es(o)(o,e[r]));return o=>{for(let r=0;r<s;r++)n[r]=i[r](o);return n}}function Tl(t,e){const n={...t,...e},s={};for(const i in n)t[i]!==void 0&&e[i]!==void 0&&(s[i]=es(t[i])(t[i],e[i]));return i=>{for(const o in s)n[o]=s[o](i);return n}}function Sl(t,e){const n=[],s={color:0,var:0,number:0};for(let i=0;i<e.values.length;i++){const o=e.types[i],r=t.indexes[o][s[o]],a=t.values[r]??0;n[i]=a,s[o]++}return n}const Cl=(t,e)=>{const n=yt.createTransformer(e),s=ae(t),i=ae(e);return s.indexes.var.length===i.indexes.var.length&&s.indexes.color.length===i.indexes.color.length&&s.indexes.number.length>=i.indexes.number.length?xn.has(t)&&!i.values.length||xn.has(e)&&!s.values.length?bl(t,e):de(Dr(Sl(s,i),i.values),n):(Wt(!0,`Complex values '${t}' and '${e}' 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.`,"complex-values-different"),Le(t,e))};function kr(t,e,n){return typeof t=="number"&&typeof e=="number"&&typeof n=="number"?O(t,e,n):es(t)(t,e)}const Pl=t=>{const e=({timestamp:n})=>t(n);return{start:(n=!0)=>k.update(e,n),stop:()=>gt(e),now:()=>z.isProcessing?z.timestamp:X.now()}},Lr=(t,e,n=10)=>{let s="";const i=Math.max(Math.round(e/n),2);for(let o=0;o<i;o++)s+=Math.round(t(o/(i-1))*1e4)/1e4+", ";return`linear(${s.substring(0,s.length-2)})`},Oe=2e4;function ns(t){let e=0;const n=50;let s=t.next(e);for(;!s.done&&e<Oe;)e+=n,s=t.next(e);return e>=Oe?1/0:e}function _l(t,e=100,n){const s=n({...t,keyframes:[0,e]}),i=Math.min(ns(s),Oe);return{type:"keyframes",ease:o=>s.next(i*o).value/e,duration:nt(i)}}const Ml=5;function Or(t,e,n){const s=Math.max(e-Ml,0);return mr(n-t(s),e-s)}const L={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},Qe=.001;function Al({duration:t=L.duration,bounce:e=L.bounce,velocity:n=L.velocity,mass:s=L.mass}){let i,o;Wt(t<=ot(L.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let r=1-e;r=ht(L.minDamping,L.maxDamping,r),t=ht(L.minDuration,L.maxDuration,nt(t)),r<1?(i=u=>{const c=u*r,h=c*t,f=c-n,d=bn(u,r),y=Math.exp(-h);return Qe-f/d*y},o=u=>{const h=u*r*t,f=h*n+n,d=Math.pow(r,2)*Math.pow(u,2)*t,y=Math.exp(-h),m=bn(Math.pow(u,2),r);return(-i(u)+Qe>0?-1:1)*((f-d)*y)/m}):(i=u=>{const c=Math.exp(-u*t),h=(u-n)*t+1;return-Qe+c*h},o=u=>{const c=Math.exp(-u*t),h=(n-u)*(t*t);return c*h});const a=5/t,l=Vl(i,o,a);if(t=ot(t),isNaN(l))return{stiffness:L.stiffness,damping:L.damping,duration:t};{const u=Math.pow(l,2)*s;return{stiffness:u,damping:r*2*Math.sqrt(s*u),duration:t}}}const El=12;function Vl(t,e,n){let s=n;for(let i=1;i<El;i++)s=s-t(s)/e(s);return s}function bn(t,e){return t*Math.sqrt(1-e*e)}const Rl=["duration","bounce"],Dl=["stiffness","damping","mass"];function Is(t,e){return e.some(n=>t[n]!==void 0)}function kl(t){let e={velocity:L.velocity,stiffness:L.stiffness,damping:L.damping,mass:L.mass,isResolvedFromDuration:!1,...t};if(!Is(t,Dl)&&Is(t,Rl))if(t.visualDuration){const n=t.visualDuration,s=2*Math.PI/(n*1.2),i=s*s,o=2*ht(.05,1,1-(t.bounce||0))*Math.sqrt(i);e={...e,mass:L.mass,stiffness:i,damping:o}}else{const n=Al(t);e={...e,...n,mass:L.mass},e.isResolvedFromDuration=!0}return e}function je(t=L.visualDuration,e=L.bounce){const n=typeof t!="object"?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:s,restDelta:i}=n;const o=n.keyframes[0],r=n.keyframes[n.keyframes.length-1],a={done:!1,value:o},{stiffness:l,damping:u,mass:c,duration:h,velocity:f,isResolvedFromDuration:d}=kl({...n,velocity:-nt(n.velocity||0)}),y=f||0,m=u/(2*Math.sqrt(l*c)),x=r-o,p=nt(Math.sqrt(l/c)),v=Math.abs(x)<5;s||(s=v?L.restSpeed.granular:L.restSpeed.default),i||(i=v?L.restDelta.granular:L.restDelta.default);let g;if(m<1){const T=bn(p,m);g=_=>{const C=Math.exp(-m*p*_);return r-C*((y+m*p*x)/T*Math.sin(T*_)+x*Math.cos(T*_))}}else if(m===1)g=T=>r-Math.exp(-p*T)*(x+(y+p*x)*T);else{const T=p*Math.sqrt(m*m-1);g=_=>{const C=Math.exp(-m*p*_),P=Math.min(T*_,300);return r-C*((y+m*p*x)*Math.sinh(P)+T*x*Math.cosh(P))/T}}const S={calculatedDuration:d&&h||null,next:T=>{const _=g(T);if(d)a.done=T>=h;else{let C=T===0?y:0;m<1&&(C=T===0?ot(y):Or(g,T,_));const P=Math.abs(C)<=s,V=Math.abs(r-_)<=i;a.done=P&&V}return a.value=a.done?r:_,a},toString:()=>{const T=Math.min(ns(S),Oe),_=Lr(C=>S.next(T*C).value,T,30);return T+"ms "+_},toTransition:()=>{}};return S}je.applyToOptions=t=>{const e=_l(t,100,je);return t.ease=e.ease,t.duration=ot(e.duration),t.type="keyframes",t};function wn({keyframes:t,velocity:e=0,power:n=.8,timeConstant:s=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:r,min:a,max:l,restDelta:u=.5,restSpeed:c}){const h=t[0],f={done:!1,value:h},d=P=>a!==void 0&&P<a||l!==void 0&&P>l,y=P=>a===void 0?l:l===void 0||Math.abs(a-P)<Math.abs(l-P)?a:l;let m=n*e;const x=h+m,p=r===void 0?x:r(x);p!==x&&(m=p-h);const v=P=>-m*Math.exp(-P/s),g=P=>p+v(P),S=P=>{const V=v(P),F=g(P);f.done=Math.abs(V)<=u,f.value=f.done?p:F};let T,_;const C=P=>{d(f.value)&&(T=P,_=je({keyframes:[f.value,y(f.value)],velocity:Or(g,P,f.value),damping:i,stiffness:o,restDelta:u,restSpeed:c}))};return C(0),{calculatedDuration:null,next:P=>{let V=!1;return!_&&T===void 0&&(V=!0,S(P),C(P)),T!==void 0&&P>=T?_.next(P-T):(!V&&S(P),f)}}}function Ll(t,e,n){const s=[],i=n||dt.mix||kr,o=t.length-1;for(let r=0;r<o;r++){let a=i(t[r],t[r+1]);if(e){const l=Array.isArray(e)?e[r]||st:e;a=de(l,a)}s.push(a)}return s}function Ol(t,e,{clamp:n=!0,ease:s,mixer:i}={}){const o=t.length;if(ft(o===e.length,"Both input and output ranges must be the same length","range-length"),o===1)return()=>e[0];if(o===2&&e[0]===e[1])return()=>e[1];const r=t[0]===t[1];t[0]>t[o-1]&&(t=[...t].reverse(),e=[...e].reverse());const a=Ll(e,s,i),l=a.length,u=c=>{if(r&&c<t[0])return e[0];let h=0;if(l>1)for(;h<t.length-2&&!(c<t[h+1]);h++);const f=re(t[h],t[h+1],c);return a[h](f)};return n?c=>u(ht(t[0],t[o-1],c)):u}function jl(t,e){const n=t[t.length-1];for(let s=1;s<=e;s++){const i=re(0,e,s);t.push(O(n,1,i))}}function Il(t){const e=[0];return jl(e,t.length-1),e}function Bl(t,e){return t.map(n=>n*e)}function Fl(t,e){return t.map(()=>e||Sr).splice(0,t.length-1)}function Dt({duration:t=300,keyframes:e,times:n,ease:s="easeInOut"}){const i=Za(s)?s.map(Ds):Ds(s),o={done:!1,value:e[0]},r=Bl(n&&n.length===e.length?n:Il(e),t),a=Ol(r,e,{ease:Array.isArray(i)?i:Fl(e,i)});return{calculatedDuration:t,next:l=>(o.value=a(l),o.done=l>=t,o)}}const Nl=t=>t!==null;function ss(t,{repeat:e,repeatType:n="loop"},s,i=1){const o=t.filter(Nl),a=i<0||e&&n!=="loop"&&e%2===1?0:o.length-1;return!a||s===void 0?o[a]:s}const zl={decay:wn,inertia:wn,tween:Dt,keyframes:Dt,spring:je};function jr(t){typeof t.type=="string"&&(t.type=zl[t.type])}class is{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,n){return this.finished.then(e,n)}}const $l=t=>t/100;class rs extends is{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:n}=this.options;n&&n.updatedAt!==X.now()&&this.tick(X.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){const{options:e}=this;jr(e);const{type:n=Dt,repeat:s=0,repeatDelay:i=0,repeatType:o,velocity:r=0}=e;let{keyframes:a}=e;const l=n||Dt;process.env.NODE_ENV!=="production"&&l!==Dt&&ft(a.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`,"spring-two-frames"),l!==Dt&&typeof a[0]!="number"&&(this.mixKeyframes=de($l,kr(a[0],a[1])),a=[0,100]);const u=l({...e,keyframes:a});o==="mirror"&&(this.mirroredGenerator=l({...e,keyframes:[...a].reverse(),velocity:-r})),u.calculatedDuration===null&&(u.calculatedDuration=ns(u));const{calculatedDuration:c}=u;this.calculatedDuration=c,this.resolvedDuration=c+i,this.totalDuration=this.resolvedDuration*(s+1)-i,this.generator=u}updateTime(e){const n=Math.round(e-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(e,n=!1){const{generator:s,totalDuration:i,mixKeyframes:o,mirroredGenerator:r,resolvedDuration:a,calculatedDuration:l}=this;if(this.startTime===null)return s.next(0);const{delay:u=0,keyframes:c,repeat:h,repeatType:f,repeatDelay:d,type:y,onUpdate:m,finalKeyframe:x}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-i/this.speed,this.startTime)),n?this.currentTime=e:this.updateTime(e);const p=this.currentTime-u*(this.playbackSpeed>=0?1:-1),v=this.playbackSpeed>=0?p<0:p>i;this.currentTime=Math.max(p,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let g=this.currentTime,S=s;if(h){const P=Math.min(this.currentTime,i)/a;let V=Math.floor(P),F=P%1;!F&&P>=1&&(F=1),F===1&&V--,V=Math.min(V,h+1),!!(V%2)&&(f==="reverse"?(F=1-F,d&&(F-=d/a)):f==="mirror"&&(S=r)),g=ht(0,1,F)*a}const T=v?{done:!1,value:c[0]}:S.next(g);o&&(T.value=o(T.value));let{done:_}=T;!v&&l!==null&&(_=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const C=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&_);return C&&y!==wn&&(T.value=ss(c,this.options,x,this.speed)),m&&m(T.value),C&&this.finish(),T}then(e,n){return this.finished.then(e,n)}get duration(){return nt(this.calculatedDuration)}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+nt(e)}get time(){return nt(this.currentTime)}set time(e){e=ot(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(e){this.updateTime(X.now());const n=this.playbackSpeed!==e;this.playbackSpeed=e,n&&(this.time=nt(this.currentTime))}play(){if(this.isStopped)return;const{driver:e=Pl,startTime:n}=this.options;this.driver||(this.driver=e(i=>this.tick(i))),this.options.onPlay?.();const s=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=s):this.holdTime!==null?this.startTime=s-this.holdTime:this.startTime||(this.startTime=n??s),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(X.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),e.observe(this)}}function Wl(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}const Ct=t=>t*180/Math.PI,Tn=t=>{const e=Ct(Math.atan2(t[1],t[0]));return Sn(e)},Ul={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:Tn,rotateZ:Tn,skewX:t=>Ct(Math.atan(t[1])),skewY:t=>Ct(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},Sn=t=>(t=t%360,t<0&&(t+=360),t),Bs=Tn,Fs=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),Ns=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),Kl={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Fs,scaleY:Ns,scale:t=>(Fs(t)+Ns(t))/2,rotateX:t=>Sn(Ct(Math.atan2(t[6],t[5]))),rotateY:t=>Sn(Ct(Math.atan2(-t[2],t[0]))),rotateZ:Bs,rotate:Bs,skewX:t=>Ct(Math.atan(t[4])),skewY:t=>Ct(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function Cn(t){return t.includes("scale")?1:0}function Pn(t,e){if(!t||t==="none")return Cn(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let s,i;if(n)s=Kl,i=n;else{const a=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);s=Ul,i=a}if(!i)return Cn(e);const o=s[e],r=i[1].split(",").map(Hl);return typeof o=="function"?o(r):r[o]}const Gl=(t,e)=>{const{transform:n="none"}=getComputedStyle(t);return Pn(n,e)};function Hl(t){return parseFloat(t.trim())}const Kt=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Gt=new Set(Kt),zs=t=>t===Ut||t===M,Yl=new Set(["x","y","z"]),Xl=Kt.filter(t=>!Yl.has(t));function ql(t){const e=[];return Xl.forEach(n=>{const s=t.getValue(n);s!==void 0&&(e.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),e}const _t={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:(t,{transform:e})=>Pn(e,"x"),y:(t,{transform:e})=>Pn(e,"y")};_t.translateX=_t.x;_t.translateY=_t.y;const Mt=new Set;let _n=!1,Mn=!1,An=!1;function Ir(){if(Mn){const t=Array.from(Mt).filter(s=>s.needsMeasurement),e=new Set(t.map(s=>s.element)),n=new Map;e.forEach(s=>{const i=ql(s);i.length&&(n.set(s,i),s.render())}),t.forEach(s=>s.measureInitialState()),e.forEach(s=>{s.render();const i=n.get(s);i&&i.forEach(([o,r])=>{s.getValue(o)?.set(r)})}),t.forEach(s=>s.measureEndState()),t.forEach(s=>{s.suspendedScrollY!==void 0&&window.scrollTo(0,s.suspendedScrollY)})}Mn=!1,_n=!1,Mt.forEach(t=>t.complete(An)),Mt.clear()}function Br(){Mt.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(Mn=!0)})}function Zl(){An=!0,Br(),Ir(),An=!1}class os{constructor(e,n,s,i,o,r=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=n,this.name=s,this.motionValue=i,this.element=o,this.isAsync=r}scheduleResolve(){this.state="scheduled",this.isAsync?(Mt.add(this),_n||(_n=!0,k.read(Br),k.resolveKeyframes(Ir))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:n,element:s,motionValue:i}=this;if(e[0]===null){const o=i?.get(),r=e[e.length-1];if(o!==void 0)e[0]=o;else if(s&&n){const a=s.readValue(n,r);a!=null&&(e[0]=a)}e[0]===void 0&&(e[0]=r),i&&o===void 0&&i.set(e[0])}Wl(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),Mt.delete(this)}cancel(){this.state==="scheduled"&&(Mt.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const Jl=t=>t.startsWith("--");function Ql(t,e,n){Jl(e)?t.style.setProperty(e,n):t.style[e]=n}const tc=Gn(()=>window.ScrollTimeline!==void 0),ec={};function nc(t,e){const n=Gn(t);return()=>ec[e]??n()}const Fr=nc(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Jt=([t,e,n,s])=>`cubic-bezier(${t}, ${e}, ${n}, ${s})`,$s={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Jt([0,.65,.55,1]),circOut:Jt([.55,0,1,.45]),backIn:Jt([.31,.01,.66,-.59]),backOut:Jt([.33,1.53,.69,.99])};function Nr(t,e){if(t)return typeof t=="function"?Fr()?Lr(t,e):"ease-out":Cr(t)?Jt(t):Array.isArray(t)?t.map(n=>Nr(n,e)||$s.easeOut):$s[t]}function sc(t,e,n,{delay:s=0,duration:i=300,repeat:o=0,repeatType:r="loop",ease:a="easeOut",times:l}={},u=void 0){const c={[e]:n};l&&(c.offset=l);const h=Nr(a,i);Array.isArray(h)&&(c.easing=h);const f={delay:s,duration:i,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:o+1,direction:r==="reverse"?"alternate":"normal"};return u&&(f.pseudoElement=u),t.animate(c,f)}function zr(t){return typeof t=="function"&&"applyToOptions"in t}function ic({type:t,...e}){return zr(t)&&Fr()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class rc extends is{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,!e)return;const{element:n,name:s,keyframes:i,pseudoElement:o,allowFlatten:r=!1,finalKeyframe:a,onComplete:l}=e;this.isPseudoElement=!!o,this.allowFlatten=r,this.options=e,ft(typeof e.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const u=ic(e);this.animation=sc(n,s,i,u,o),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const c=ss(i,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(c):Ql(n,s,c),this.animation.cancel()}l?.(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:e}=this;e==="idle"||e==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){const e=this.animation.effect?.getComputedTiming?.().duration||0;return nt(Number(e))}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+nt(e)}get time(){return nt(Number(this.animation.currentTime)||0)}set time(e){this.finishedTime=null,this.animation.currentTime=ot(e)}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(e){this.animation.startTime=e}attachTimeline({timeline:e,observe:n}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,e&&tc()?(this.animation.timeline=e,st):n(this)}}const $r={anticipate:br,backInOut:xr,circInOut:Tr};function oc(t){return t in $r}function ac(t){typeof t.ease=="string"&&oc(t.ease)&&(t.ease=$r[t.ease])}const Ws=10;class lc extends rc{constructor(e){ac(e),jr(e),super(e),e.startTime&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){const{motionValue:n,onUpdate:s,onComplete:i,element:o,...r}=this.options;if(!n)return;if(e!==void 0){n.set(e);return}const a=new rs({...r,autoplay:!1}),l=ot(this.finishedTime??this.time);n.setWithVelocity(a.sample(l-Ws).value,a.sample(l).value,Ws),a.stop()}}const Us=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(yt.test(t)||t==="0")&&!t.startsWith("url("));function cc(t){const e=t[0];if(t.length===1)return!0;for(let n=0;n<t.length;n++)if(t[n]!==e)return!0}function uc(t,e,n,s){const i=t[0];if(i===null)return!1;if(e==="display"||e==="visibility")return!0;const o=t[t.length-1],r=Us(i,e),a=Us(o,e);return Wt(r===a,`You are trying to animate ${e} from "${i}" to "${o}". "${r?o:i}" is not an animatable value.`,"value-not-animatable"),!r||!a?!1:cc(t)||(n==="spring"||zr(n))&&s}function En(t){t.duration=0,t.type="keyframes"}const hc=new Set(["opacity","clipPath","filter","transform"]),fc=Gn(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function dc(t){const{motionValue:e,name:n,repeatDelay:s,repeatType:i,damping:o,type:r}=t;if(!(e?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:u}=e.owner.getProps();return fc()&&n&&hc.has(n)&&(n!=="transform"||!u)&&!l&&!s&&i!=="mirror"&&o!==0&&r!=="inertia"}const mc=40;class pc extends is{constructor({autoplay:e=!0,delay:n=0,type:s="keyframes",repeat:i=0,repeatDelay:o=0,repeatType:r="loop",keyframes:a,name:l,motionValue:u,element:c,...h}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=X.now();const f={autoplay:e,delay:n,type:s,repeat:i,repeatDelay:o,repeatType:r,name:l,motionValue:u,element:c,...h},d=c?.KeyframeResolver||os;this.keyframeResolver=new d(a,(y,m,x)=>this.onKeyframesResolved(y,m,f,!x),l,u,c),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,n,s,i){this.keyframeResolver=void 0;const{name:o,type:r,velocity:a,delay:l,isHandoff:u,onUpdate:c}=s;this.resolvedAt=X.now(),uc(e,o,r,a)||((dt.instantAnimations||!l)&&c?.(ss(e,s,n)),e[0]=e[e.length-1],En(s),s.repeat=0);const f={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>mc?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...s,keyframes:e},d=!u&&dc(f)?new lc({...f,element:f.motionValue.owner.current}):new rs(f);d.finished.then(()=>this.notifyFinished()).catch(st),this.pendingTimeline&&(this.stopTimeline=d.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=d}get finished(){return this._animation?this.animation.finished:this._finished}then(e,n){return this.finished.finally(e).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),Zl()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}const gc=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function yc(t){const e=gc.exec(t);if(!e)return[,];const[,n,s,i]=e;return[`--${n??s}`,i]}const vc=4;function Wr(t,e,n=1){ft(n<=vc,`Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[s,i]=yc(t);if(!s)return;const o=window.getComputedStyle(e).getPropertyValue(s);if(o){const r=o.trim();return hr(r)?parseFloat(r):r}return Jn(i)?Wr(i,e,n+1):i}function as(t,e){return t?.[e]??t?.default??t}const Ur=new Set(["width","height","top","left","right","bottom",...Kt]),xc={test:t=>t==="auto",parse:t=>t},Kr=t=>e=>e.test(t),Gr=[Ut,M,ut,mt,cl,ll,xc],Ks=t=>Gr.find(Kr(t));function bc(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||dr(t):!0}const wc=new Set(["brightness","contrast","saturate","opacity"]);function Tc(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[s]=n.match(Qn)||[];if(!s)return t;const i=n.replace(s,"");let o=wc.has(e)?1:0;return s!==n&&(o*=100),e+"("+o+i+")"}const Sc=/\b([a-z-]*)\(.*?\)/gu,Vn={...yt,getAnimatableNone:t=>{const e=t.match(Sc);return e?e.map(Tc).join(" "):t}},Gs={...Ut,transform:Math.round},Cc={rotate:mt,rotateX:mt,rotateY:mt,rotateZ:mt,scale:we,scaleX:we,scaleY:we,scaleZ:we,skew:mt,skewX:mt,skewY:mt,distance:M,translateX:M,translateY:M,translateZ:M,x:M,y:M,z:M,perspective:M,transformPerspective:M,opacity:oe,originX:ks,originY:ks,originZ:M},ls={borderWidth:M,borderTopWidth:M,borderRightWidth:M,borderBottomWidth:M,borderLeftWidth:M,borderRadius:M,radius:M,borderTopLeftRadius:M,borderTopRightRadius:M,borderBottomRightRadius:M,borderBottomLeftRadius:M,width:M,maxWidth:M,height:M,maxHeight:M,top:M,right:M,bottom:M,left:M,padding:M,paddingTop:M,paddingRight:M,paddingBottom:M,paddingLeft:M,margin:M,marginTop:M,marginRight:M,marginBottom:M,marginLeft:M,backgroundPositionX:M,backgroundPositionY:M,...Cc,zIndex:Gs,fillOpacity:oe,strokeOpacity:oe,numOctaves:Gs},Pc={...ls,color:I,backgroundColor:I,outlineColor:I,fill:I,stroke:I,borderColor:I,borderTopColor:I,borderRightColor:I,borderBottomColor:I,borderLeftColor:I,filter:Vn,WebkitFilter:Vn},Hr=t=>Pc[t];function Yr(t,e){let n=Hr(t);return n!==Vn&&(n=yt),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const _c=new Set(["auto","none","0"]);function Mc(t,e,n){let s=0,i;for(;s<t.length&&!i;){const o=t[s];typeof o=="string"&&!_c.has(o)&&ae(o).values.length&&(i=t[s]),s++}if(i&&n)for(const o of e)t[o]=Yr(n,i)}class Ac extends os{constructor(e,n,s,i,o){super(e,n,s,i,o,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:n,name:s}=this;if(!n||!n.current)return;super.readKeyframes();for(let l=0;l<e.length;l++){let u=e[l];if(typeof u=="string"&&(u=u.trim(),Jn(u))){const c=Wr(u,n.current);c!==void 0&&(e[l]=c),l===e.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!Ur.has(s)||e.length!==2)return;const[i,o]=e,r=Ks(i),a=Ks(o);if(r!==a)if(zs(r)&&zs(a))for(let l=0;l<e.length;l++){const u=e[l];typeof u=="string"&&(e[l]=parseFloat(u))}else _t[s]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:n}=this,s=[];for(let i=0;i<e.length;i++)(e[i]===null||bc(e[i]))&&s.push(i);s.length&&Mc(e,s,n)}measureInitialState(){const{element:e,unresolvedKeyframes:n,name:s}=this;if(!e||!e.current)return;s==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=_t[s](e.measureViewportBox(),window.getComputedStyle(e.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&e.getValue(s,i).jump(i,!1)}measureEndState(){const{element:e,name:n,unresolvedKeyframes:s}=this;if(!e||!e.current)return;const i=e.getValue(n);i&&i.jump(this.measuredOrigin,!1);const o=s.length-1,r=s[o];s[o]=_t[n](e.measureViewportBox(),window.getComputedStyle(e.current)),r!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=r),this.removedTransforms?.length&&this.removedTransforms.forEach(([a,l])=>{e.getValue(a).set(l)}),this.resolveNoneKeyframes()}}function Ec(t,e,n){if(t instanceof EventTarget)return[t];if(typeof t=="string"){let s=document;const i=n?.[t]??s.querySelectorAll(t);return i?Array.from(i):[]}return Array.from(t)}const Xr=(t,e)=>e&&typeof t=="number"?e.transform(t):t;function Vc(t){return fr(t)&&"offsetHeight"in t}const Hs=30,Rc=t=>!isNaN(parseFloat(t));class Dc{constructor(e,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=s=>{const i=X.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(s),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const o of this.dependents)o.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=n.owner}setCurrent(e){this.current=e,this.updatedAt=X.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=Rc(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return process.env.NODE_ENV!=="production"&&Yn(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",e)}on(e,n){this.events[e]||(this.events[e]=new Hn);const s=this.events[e].add(n);return e==="change"?()=>{s(),k.read(()=>{this.events.change.getSize()||this.stop()})}:s}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,n){this.passiveEffect=e,this.stopPassiveEffect=n}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,n,s){this.set(n),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-s}jump(e,n=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(e){this.dependents||(this.dependents=new Set),this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const e=X.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>Hs)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Hs);return mr(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(e){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=e(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.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Nt(t,e){return new Dc(t,e)}const{schedule:cs}=Pr(queueMicrotask,!1),rt={x:!1,y:!1};function qr(){return rt.x||rt.y}function kc(t){return t==="x"||t==="y"?rt[t]?null:(rt[t]=!0,()=>{rt[t]=!1}):rt.x||rt.y?null:(rt.x=rt.y=!0,()=>{rt.x=rt.y=!1})}function Zr(t,e){const n=Ec(t),s=new AbortController,i={passive:!0,...e,signal:s.signal};return[n,i,()=>s.abort()]}function Ys(t){return!(t.pointerType==="touch"||qr())}function Lc(t,e,n={}){const[s,i,o]=Zr(t,n),r=a=>{if(!Ys(a))return;const{target:l}=a,u=e(l,a);if(typeof u!="function"||!l)return;const c=h=>{Ys(h)&&(u(h),l.removeEventListener("pointerleave",c))};l.addEventListener("pointerleave",c,i)};return s.forEach(a=>{a.addEventListener("pointerenter",r,i)}),o}const Jr=(t,e)=>e?t===e?!0:Jr(t,e.parentElement):!1,us=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1,Oc=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function jc(t){return Oc.has(t.tagName)||t.tabIndex!==-1}const Ee=new WeakSet;function Xs(t){return e=>{e.key==="Enter"&&t(e)}}function tn(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}const Ic=(t,e)=>{const n=t.currentTarget;if(!n)return;const s=Xs(()=>{if(Ee.has(n))return;tn(n,"down");const i=Xs(()=>{tn(n,"up")}),o=()=>tn(n,"cancel");n.addEventListener("keyup",i,e),n.addEventListener("blur",o,e)});n.addEventListener("keydown",s,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",s),e)};function qs(t){return us(t)&&!qr()}function Bc(t,e,n={}){const[s,i,o]=Zr(t,n),r=a=>{const l=a.currentTarget;if(!qs(a))return;Ee.add(l);const u=e(l,a),c=(d,y)=>{window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",f),Ee.has(l)&&Ee.delete(l),qs(d)&&typeof u=="function"&&u(d,{success:y})},h=d=>{c(d,l===window||l===document||n.useGlobalTarget||Jr(l,d.target))},f=d=>{c(d,!1)};window.addEventListener("pointerup",h,i),window.addEventListener("pointercancel",f,i)};return s.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",r,i),Vc(a)&&(a.addEventListener("focus",u=>Ic(u,i)),!jc(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),o}function Qr(t){return fr(t)&&"ownerSVGElement"in t}function Fc(t){return Qr(t)&&t.tagName==="svg"}const G=t=>!!(t&&t.getVelocity),Nc=[...Gr,I,yt],zc=t=>Nc.find(Kr(t)),to=b.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});function $c(t=!0){const e=b.useContext(Wn);if(e===null)return[!0,null];const{isPresent:n,onExitComplete:s,register:i}=e,o=b.useId();b.useEffect(()=>{if(t)return i(o)},[t]);const r=b.useCallback(()=>t&&s&&s(o),[o,s,t]);return!n&&s?[!1,r]:[!0]}const eo=b.createContext({strict:!1}),Zs={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"]},zt={};for(const t in Zs)zt[t]={isEnabled:e=>Zs[t].some(n=>!!e[n])};function Wc(t){for(const e in t)zt[e]={...zt[e],...t[e]}}const Uc=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function Ie(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||Uc.has(t)}let no=t=>!Ie(t);function Kc(t){typeof t=="function"&&(no=e=>e.startsWith("on")?!Ie(e):t(e))}try{Kc(require("@emotion/is-prop-valid").default)}catch{}function Gc(t,e,n){const s={};for(const i in t)i==="values"&&typeof t.values=="object"||(no(i)||n===!0&&Ie(i)||!e&&!Ie(i)||t.draggable&&i.startsWith("onDrag"))&&(s[i]=t[i]);return s}const $e=b.createContext({});function We(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}function le(t){return typeof t=="string"||Array.isArray(t)}const hs=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],fs=["initial",...hs];function Ue(t){return We(t.animate)||fs.some(e=>le(t[e]))}function so(t){return!!(Ue(t)||t.variants)}function Hc(t,e){if(Ue(t)){const{initial:n,animate:s}=t;return{initial:n===!1||le(n)?n:void 0,animate:le(s)?s:void 0}}return t.inherit!==!1?e:{}}function Yc(t){const{initial:e,animate:n}=Hc(t,b.useContext($e));return b.useMemo(()=>({initial:e,animate:n}),[Js(e),Js(n)])}function Js(t){return Array.isArray(t)?t.join(" "):t}const ce={};function Xc(t){for(const e in t)ce[e]=t[e],Zn(e)&&(ce[e].isCSSVariable=!0)}function io(t,{layout:e,layoutId:n}){return Gt.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!ce[t]||t==="opacity")}const qc={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Zc=Kt.length;function Jc(t,e,n){let s="",i=!0;for(let o=0;o<Zc;o++){const r=Kt[o],a=t[r];if(a===void 0)continue;let l=!0;if(typeof a=="number"?l=a===(r.startsWith("scale")?1:0):l=parseFloat(a)===0,!l||n){const u=Xr(a,ls[r]);if(!l){i=!1;const c=qc[r]||r;s+=`${c}(${u}) `}n&&(e[r]=u)}}return s=s.trim(),n?s=n(e,i?"":s):i&&(s="none"),s}function ds(t,e,n){const{style:s,vars:i,transformOrigin:o}=t;let r=!1,a=!1;for(const l in e){const u=e[l];if(Gt.has(l)){r=!0;continue}else if(Zn(l)){i[l]=u;continue}else{const c=Xr(u,ls[l]);l.startsWith("origin")?(a=!0,o[l]=c):s[l]=c}}if(e.transform||(r||n?s.transform=Jc(e,t.transform,n):s.transform&&(s.transform="none")),a){const{originX:l="50%",originY:u="50%",originZ:c=0}=o;s.transformOrigin=`${l} ${u} ${c}`}}const ms=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function ro(t,e,n){for(const s in e)!G(e[s])&&!io(s,n)&&(t[s]=e[s])}function Qc({transformTemplate:t},e){return b.useMemo(()=>{const n=ms();return ds(n,e,t),Object.assign({},n.vars,n.style)},[e])}function tu(t,e){const n=t.style||{},s={};return ro(s,n,t),Object.assign(s,Qc(t,e)),s}function eu(t,e){const n={},s=tu(t,e);return t.drag&&t.dragListener!==!1&&(n.draggable=!1,s.userSelect=s.WebkitUserSelect=s.WebkitTouchCallout="none",s.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),t.tabIndex===void 0&&(t.onTap||t.onTapStart||t.whileTap)&&(n.tabIndex=0),n.style=s,n}const nu={offset:"stroke-dashoffset",array:"stroke-dasharray"},su={offset:"strokeDashoffset",array:"strokeDasharray"};function iu(t,e,n=1,s=0,i=!0){t.pathLength=1;const o=i?nu:su;t[o.offset]=M.transform(-s);const r=M.transform(e),a=M.transform(n);t[o.array]=`${r} ${a}`}function oo(t,{attrX:e,attrY:n,attrScale:s,pathLength:i,pathSpacing:o=1,pathOffset:r=0,...a},l,u,c){if(ds(t,a,u),l){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:h,style:f}=t;h.transform&&(f.transform=h.transform,delete h.transform),(f.transform||h.transformOrigin)&&(f.transformOrigin=h.transformOrigin??"50% 50%",delete h.transformOrigin),f.transform&&(f.transformBox=c?.transformBox??"fill-box",delete h.transformBox),e!==void 0&&(h.x=e),n!==void 0&&(h.y=n),s!==void 0&&(h.scale=s),i!==void 0&&iu(h,i,o,r,!1)}const ao=()=>({...ms(),attrs:{}}),lo=t=>typeof t=="string"&&t.toLowerCase()==="svg";function ru(t,e,n,s){const i=b.useMemo(()=>{const o=ao();return oo(o,e,lo(s),t.transformTemplate,t.style),{...o.attrs,style:{...o.style}}},[e]);if(t.style){const o={};ro(o,t.style,t),i.style={...o,...i.style}}return i}const ou=["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 ps(t){return typeof t!="string"||t.includes("-")?!1:!!(ou.indexOf(t)>-1||/[A-Z]/u.test(t))}function au(t,e,n,{latestValues:s},i,o=!1){const a=(ps(t)?ru:eu)(e,s,i,t),l=Gc(e,typeof t=="string",o),u=t!==b.Fragment?{...l,...a,ref:n}:{},{children:c}=e,h=b.useMemo(()=>G(c)?c.get():c,[c]);return b.createElement(t,{...u,children:h})}function Qs(t){const e=[{},{}];return t?.values.forEach((n,s)=>{e[0][s]=n.get(),e[1][s]=n.getVelocity()}),e}function gs(t,e,n,s){if(typeof e=="function"){const[i,o]=Qs(s);e=e(n!==void 0?n:t.custom,i,o)}if(typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"){const[i,o]=Qs(s);e=e(n!==void 0?n:t.custom,i,o)}return e}function Ve(t){return G(t)?t.get():t}function lu({scrapeMotionValuesFromProps:t,createRenderState:e},n,s,i){return{latestValues:cu(n,s,i,t),renderState:e()}}function cu(t,e,n,s){const i={},o=s(t,{});for(const f in o)i[f]=Ve(o[f]);let{initial:r,animate:a}=t;const l=Ue(t),u=so(t);e&&u&&!l&&t.inherit!==!1&&(r===void 0&&(r=e.initial),a===void 0&&(a=e.animate));let c=n?n.initial===!1:!1;c=c||r===!1;const h=c?a:r;if(h&&typeof h!="boolean"&&!We(h)){const f=Array.isArray(h)?h:[h];for(let d=0;d<f.length;d++){const y=gs(t,f[d]);if(y){const{transitionEnd:m,transition:x,...p}=y;for(const v in p){let g=p[v];if(Array.isArray(g)){const S=c?g.length-1:0;g=g[S]}g!==null&&(i[v]=g)}for(const v in m)i[v]=m[v]}}}return i}const co=t=>(e,n)=>{const s=b.useContext($e),i=b.useContext(Wn),o=()=>lu(t,e,s,i);return n?o():Wa(o)};function ys(t,e,n){const{style:s}=t,i={};for(const o in s)(G(s[o])||e.style&&G(e.style[o])||io(o,t)||n?.getValue(o)?.liveStyle!==void 0)&&(i[o]=s[o]);return i}const uu=co({scrapeMotionValuesFromProps:ys,createRenderState:ms});function uo(t,e,n){const s=ys(t,e,n);for(const i in t)if(G(t[i])||G(e[i])){const o=Kt.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;s[o]=t[i]}return s}const hu=co({scrapeMotionValuesFromProps:uo,createRenderState:ao}),fu=Symbol.for("motionComponentSymbol");function kt(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function du(t,e,n){return b.useCallback(s=>{s&&t.onMount&&t.onMount(s),e&&(s?e.mount(s):e.unmount()),n&&(typeof n=="function"?n(s):kt(n)&&(n.current=s))},[e])}const vs=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),mu="framerAppearId",ho="data-"+vs(mu),fo=b.createContext({});function pu(t,e,n,s,i){const{visualElement:o}=b.useContext($e),r=b.useContext(eo),a=b.useContext(Wn),l=b.useContext(to).reducedMotion,u=b.useRef(null);s=s||r.renderer,!u.current&&s&&(u.current=s(t,{visualState:e,parent:o,props:n,presenceContext:a,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:l}));const c=u.current,h=b.useContext(fo);c&&!c.projection&&i&&(c.type==="html"||c.type==="svg")&&gu(u.current,n,i,h);const f=b.useRef(!1);b.useInsertionEffect(()=>{c&&f.current&&c.update(n,a)});const d=n[ho],y=b.useRef(!!d&&!window.MotionHandoffIsComplete?.(d)&&window.MotionHasOptimisedAnimation?.(d));return Ua(()=>{c&&(f.current=!0,window.MotionIsMounted=!0,c.updateFeatures(),c.scheduleRenderMicrotask(),y.current&&c.animationState&&c.animationState.animateChanges())}),b.useEffect(()=>{c&&(!y.current&&c.animationState&&c.animationState.animateChanges(),y.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(d)}),y.current=!1),c.enteringChildren=void 0)}),c}function gu(t,e,n,s){const{layoutId:i,layout:o,drag:r,dragConstraints:a,layoutScroll:l,layoutRoot:u,layoutCrossfade:c}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:mo(t.parent)),t.projection.setOptions({layoutId:i,layout:o,alwaysMeasureLayout:!!r||a&&kt(a),visualElement:t,animationType:typeof o=="string"?o:"both",initialPromotionConfig:s,crossfade:c,layoutScroll:l,layoutRoot:u})}function mo(t){if(t)return t.options.allowProjection!==!1?t.projection:mo(t.parent)}function en(t,{forwardMotionProps:e=!1}={},n,s){n&&Wc(n);const i=ps(t)?hu:uu;function o(a,l){let u;const c={...b.useContext(to),...a,layoutId:yu(a)},{isStatic:h}=c,f=Yc(a),d=i(a,h);if(!h&&$n){vu(c,n);const y=xu(c);u=y.MeasureLayout,f.visualElement=pu(t,d,c,s,y.ProjectionNode)}return w.jsxs($e.Provider,{value:f,children:[u&&f.visualElement?w.jsx(u,{visualElement:f.visualElement,...c}):null,au(t,a,du(d,f.visualElement,l),d,h,e)]})}o.displayName=`motion.${typeof t=="string"?t:`create(${t.displayName??t.name??""})`}`;const r=b.forwardRef(o);return r[fu]=t,r}function yu({layoutId:t}){const e=b.useContext(ur).id;return e&&t!==void 0?e+"-"+t:t}function vu(t,e){const n=b.useContext(eo).strict;if(process.env.NODE_ENV!=="production"&&e&&n){const s="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";t.ignoreStrict?Wt(!1,s,"lazy-strict-mode"):ft(!1,s,"lazy-strict-mode")}}function xu(t){const{drag:e,layout:n}=zt;if(!e&&!n)return{};const s={...e,...n};return{MeasureLayout:e?.isEnabled(t)||n?.isEnabled(t)?s.MeasureLayout:void 0,ProjectionNode:s.ProjectionNode}}function bu(t,e){if(typeof Proxy>"u")return en;const n=new Map,s=(o,r)=>en(o,r,t,e),i=(o,r)=>(process.env.NODE_ENV!=="production"&&Yn(!1,"motion() is deprecated. Use motion.create() instead."),s(o,r));return new Proxy(i,{get:(o,r)=>r==="create"?s:(n.has(r)||n.set(r,en(r,void 0,t,e)),n.get(r))})}function po({top:t,left:e,right:n,bottom:s}){return{x:{min:e,max:n},y:{min:t,max:s}}}function wu({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function Tu(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),s=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:s.y,right:s.x}}function nn(t){return t===void 0||t===1}function Rn({scale:t,scaleX:e,scaleY:n}){return!nn(t)||!nn(e)||!nn(n)}function Tt(t){return Rn(t)||go(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function go(t){return ti(t.x)||ti(t.y)}function ti(t){return t&&t!=="0%"}function Be(t,e,n){const s=t-n,i=e*s;return n+i}function ei(t,e,n,s,i){return i!==void 0&&(t=Be(t,i,s)),Be(t,n,s)+e}function Dn(t,e=0,n=1,s,i){t.min=ei(t.min,e,n,s,i),t.max=ei(t.max,e,n,s,i)}function yo(t,{x:e,y:n}){Dn(t.x,e.translate,e.scale,e.originPoint),Dn(t.y,n.translate,n.scale,n.originPoint)}const ni=.999999999999,si=1.0000000000001;function Su(t,e,n,s=!1){const i=n.length;if(!i)return;e.x=e.y=1;let o,r;for(let a=0;a<i;a++){o=n[a],r=o.projectionDelta;const{visualElement:l}=o.options;l&&l.props.style&&l.props.style.display==="contents"||(s&&o.options.layoutScroll&&o.scroll&&o!==o.root&&Ot(t,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),r&&(e.x*=r.x.scale,e.y*=r.y.scale,yo(t,r)),s&&Tt(o.latestValues)&&Ot(t,o.latestValues))}e.x<si&&e.x>ni&&(e.x=1),e.y<si&&e.y>ni&&(e.y=1)}function Lt(t,e){t.min=t.min+e,t.max=t.max+e}function ii(t,e,n,s,i=.5){const o=O(t.min,t.max,i);Dn(t,e,n,o,s)}function Ot(t,e){ii(t.x,e.x,e.scaleX,e.scale,e.originX),ii(t.y,e.y,e.scaleY,e.scale,e.originY)}function vo(t,e){return po(Tu(t.getBoundingClientRect(),e))}function Cu(t,e,n){const s=vo(t,n),{scroll:i}=e;return i&&(Lt(s.x,i.offset.x),Lt(s.y,i.offset.y)),s}const ri=()=>({translate:0,scale:1,origin:0,originPoint:0}),jt=()=>({x:ri(),y:ri()}),oi=()=>({min:0,max:0}),j=()=>({x:oi(),y:oi()}),kn={current:null},xo={current:!1};function Pu(){if(xo.current=!0,!!$n)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>kn.current=t.matches;t.addEventListener("change",e),e()}else kn.current=!1}const _u=new WeakMap;function Mu(t,e,n){for(const s in e){const i=e[s],o=n[s];if(G(i))t.addValue(s,i);else if(G(o))t.addValue(s,Nt(i,{owner:t}));else if(o!==i)if(t.hasValue(s)){const r=t.getValue(s);r.liveStyle===!0?r.jump(i):r.hasAnimated||r.set(i)}else{const r=t.getStaticValue(s);t.addValue(s,Nt(r!==void 0?r:i,{owner:t}))}}for(const s in n)e[s]===void 0&&t.removeValue(s);return e}const ai=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Au{scrapeMotionValuesFromProps(e,n,s){return{}}constructor({parent:e,props:n,presenceContext:s,reducedMotionConfig:i,blockInitialAnimation:o,visualState:r},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=os,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const f=X.now();this.renderScheduledAt<f&&(this.renderScheduledAt=f,k.render(this.render,!1,!0))};const{latestValues:l,renderState:u}=r;this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=u,this.parent=e,this.props=n,this.presenceContext=s,this.depth=e?e.depth+1:0,this.reducedMotionConfig=i,this.options=a,this.blockInitialAnimation=!!o,this.isControllingVariants=Ue(n),this.isVariantNode=so(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:c,...h}=this.scrapeMotionValuesFromProps(n,{},this);for(const f in h){const d=h[f];l[f]!==void 0&&G(d)&&d.set(l[f])}}mount(e){this.current=e,_u.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,s)=>this.bindToMotionValue(s,n)),xo.current||Pu(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:kn.current,process.env.NODE_ENV!=="production"&&Yn(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected.","reduced-motion-disabled"),this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),gt(this.notifyUpdate),gt(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const e in this.events)this.events[e].clear();for(const e in this.features){const n=this.features[e];n&&(n.unmount(),n.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,n){this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)();const s=Gt.has(e);s&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",r=>{this.latestValues[e]=r,this.props.onUpdate&&k.preRender(this.notifyUpdate),s&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,e,n)),this.valueSubscriptions.set(e,()=>{i(),o&&o(),n.owner&&n.stop()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e="animation";for(e in zt){const n=zt[e];if(!n)continue;const{isEnabled:s,Feature:i}=n;if(!this.features[e]&&i&&s(this.props)&&(this.features[e]=new i(this)),this.features[e]){const o=this.features[e];o.isMounted?o.update():(o.mount(),o.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):j()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,n){this.latestValues[e]=n}update(e,n){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let s=0;s<ai.length;s++){const i=ai[s];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const o="on"+i,r=e[o];r&&(this.propEventSubscriptions[i]=this.on(i,r))}this.prevMotionValues=Mu(this,this.scrapeMotionValuesFromProps(e,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(e),()=>n.variantChildren.delete(e)}addValue(e,n){const s=this.values.get(e);n!==s&&(s&&this.removeValue(e),this.bindToMotionValue(e,n),this.values.set(e,n),this.latestValues[e]=n.get())}removeValue(e){this.values.delete(e);const n=this.valueSubscriptions.get(e);n&&(n(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,n){if(this.props.values&&this.props.values[e])return this.props.values[e];let s=this.values.get(e);return s===void 0&&n!==void 0&&(s=Nt(n===null?void 0:n,{owner:this}),this.addValue(e,s)),s}readValue(e,n){let s=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return s!=null&&(typeof s=="string"&&(hr(s)||dr(s))?s=parseFloat(s):!zc(s)&&yt.test(n)&&(s=Yr(e,n)),this.setBaseTarget(e,G(s)?s.get():s)),G(s)?s.get():s}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){const{initial:n}=this.props;let s;if(typeof n=="string"||typeof n=="object"){const o=gs(this.props,n,this.presenceContext?.custom);o&&(s=o[e])}if(n&&s!==void 0)return s;const i=this.getBaseTargetFromProps(this.props,e);return i!==void 0&&!G(i)?i:this.initialValues[e]!==void 0&&s===void 0?void 0:this.baseTarget[e]}on(e,n){return this.events[e]||(this.events[e]=new Hn),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}scheduleRenderMicrotask(){cs.render(this.render)}}class bo extends Au{constructor(){super(...arguments),this.KeyframeResolver=Ac}sortInstanceNodePosition(e,n){return e.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(e,n){return e.style?e.style[n]:void 0}removeValueFromRenderState(e,{vars:n,style:s}){delete n[e],delete s[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;G(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function wo(t,{style:e,vars:n},s,i){const o=t.style;let r;for(r in e)o[r]=e[r];i?.applyProjectionStyles(o,s);for(r in n)o.setProperty(r,n[r])}function Eu(t){return window.getComputedStyle(t)}class Vu extends bo{constructor(){super(...arguments),this.type="html",this.renderInstance=wo}readValueFromInstance(e,n){if(Gt.has(n))return this.projection?.isProjecting?Cn(n):Gl(e,n);{const s=Eu(e),i=(Zn(n)?s.getPropertyValue(n):s[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(e,{transformPagePoint:n}){return vo(e,n)}build(e,n,s){ds(e,n,s.transformTemplate)}scrapeMotionValuesFromProps(e,n,s){return ys(e,n,s)}}const To=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 Ru(t,e,n,s){wo(t,e,void 0,s);for(const i in e.attrs)t.setAttribute(To.has(i)?i:vs(i),e.attrs[i])}class Du extends bo{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=j}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(Gt.has(n)){const s=Hr(n);return s&&s.default||0}return n=To.has(n)?n:vs(n),e.getAttribute(n)}scrapeMotionValuesFromProps(e,n,s){return uo(e,n,s)}build(e,n,s){oo(e,n,this.isSVGTag,s.transformTemplate,s.style)}renderInstance(e,n,s,i){Ru(e,n,s,i)}mount(e){this.isSVGTag=lo(e.tagName),super.mount(e)}}const ku=(t,e)=>ps(t)?new Du(e):new Vu(e,{allowProjection:t!==b.Fragment});function Bt(t,e,n){const s=t.getProps();return gs(s,e,n!==void 0?n:s.custom,t)}const Ln=t=>Array.isArray(t);function Lu(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,Nt(n))}function Ou(t){return Ln(t)?t[t.length-1]||0:t}function ju(t,e){const n=Bt(t,e);let{transitionEnd:s={},transition:i={},...o}=n||{};o={...o,...s};for(const r in o){const a=Ou(o[r]);Lu(t,r,a)}}function Iu(t){return!!(G(t)&&t.add)}function On(t,e){const n=t.getValue("willChange");if(Iu(n))return n.add(e);if(!n&&dt.WillChange){const s=new dt.WillChange("auto");t.addValue("willChange",s),s.add(e)}}function So(t){return t.props[ho]}const Bu=t=>t!==null;function Fu(t,{repeat:e,repeatType:n="loop"},s){const i=t.filter(Bu),o=e&&n!=="loop"&&e%2===1?0:i.length-1;return i[o]}const Nu={type:"spring",stiffness:500,damping:25,restSpeed:10},zu=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),$u={type:"keyframes",duration:.8},Wu={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Uu=(t,{keyframes:e})=>e.length>2?$u:Gt.has(t)?t.startsWith("scale")?zu(e[1]):Nu:Wu;function Ku({when:t,delay:e,delayChildren:n,staggerChildren:s,staggerDirection:i,repeat:o,repeatType:r,repeatDelay:a,from:l,elapsed:u,...c}){return!!Object.keys(c).length}const xs=(t,e,n,s={},i,o)=>r=>{const a=as(s,t)||{},l=a.delay||s.delay||0;let{elapsed:u=0}=s;u=u-ot(l);const c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-u,onUpdate:f=>{e.set(f),a.onUpdate&&a.onUpdate(f)},onComplete:()=>{r(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:o?void 0:i};Ku(a)||Object.assign(c,Uu(t,c)),c.duration&&(c.duration=ot(c.duration)),c.repeatDelay&&(c.repeatDelay=ot(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let h=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(En(c),c.delay===0&&(h=!0)),(dt.instantAnimations||dt.skipAnimations)&&(h=!0,En(c),c.delay=0),c.allowFlatten=!a.type&&!a.ease,h&&!o&&e.get()!==void 0){const f=Fu(c.keyframes,a);if(f!==void 0){k.update(()=>{c.onUpdate(f),c.onComplete()});return}}return a.isSync?new rs(c):new pc(c)};function Gu({protectedKeys:t,needsAnimating:e},n){const s=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,s}function Co(t,e,{delay:n=0,transitionOverride:s,type:i}={}){let{transition:o=t.getDefaultTransition(),transitionEnd:r,...a}=e;s&&(o=s);const l=[],u=i&&t.animationState&&t.animationState.getState()[i];for(const c in a){const h=t.getValue(c,t.latestValues[c]??null),f=a[c];if(f===void 0||u&&Gu(u,c))continue;const d={delay:n,...as(o||{},c)},y=h.get();if(y!==void 0&&!h.isAnimating&&!Array.isArray(f)&&f===y&&!d.velocity)continue;let m=!1;if(window.MotionHandoffAnimation){const p=So(t);if(p){const v=window.MotionHandoffAnimation(p,c,k);v!==null&&(d.startTime=v,m=!0)}}On(t,c),h.start(xs(c,h,f,t.shouldReduceMotion&&Ur.has(c)?{type:!1}:d,t,m));const x=h.animation;x&&l.push(x)}return r&&Promise.all(l).then(()=>{k.update(()=>{r&&ju(t,r)})}),l}function Po(t,e,n,s=0,i=1){const o=Array.from(t).sort((u,c)=>u.sortNodePosition(c)).indexOf(e),r=t.size,a=(r-1)*s;return typeof n=="function"?n(o,r):i===1?o*s:a-o*s}function jn(t,e,n={}){const s=Bt(t,e,n.type==="exit"?t.presenceContext?.custom:void 0);let{transition:i=t.getDefaultTransition()||{}}=s||{};n.transitionOverride&&(i=n.transitionOverride);const o=s?()=>Promise.all(Co(t,s,n)):()=>Promise.resolve(),r=t.variantChildren&&t.variantChildren.size?(l=0)=>{const{delayChildren:u=0,staggerChildren:c,staggerDirection:h}=i;return Hu(t,e,l,u,c,h,n)}:()=>Promise.resolve(),{when:a}=i;if(a){const[l,u]=a==="beforeChildren"?[o,r]:[r,o];return l().then(()=>u())}else return Promise.all([o(),r(n.delay)])}function Hu(t,e,n=0,s=0,i=0,o=1,r){const a=[];for(const l of t.variantChildren)l.notify("AnimationStart",e),a.push(jn(l,e,{...r,delay:n+(typeof s=="function"?0:s)+Po(t.variantChildren,l,s,i,o)}).then(()=>l.notify("AnimationComplete",e)));return Promise.all(a)}function Yu(t,e,n={}){t.notify("AnimationStart",e);let s;if(Array.isArray(e)){const i=e.map(o=>jn(t,o,n));s=Promise.all(i)}else if(typeof e=="string")s=jn(t,e,n);else{const i=typeof e=="function"?Bt(t,e,n.custom):e;s=Promise.all(Co(t,i,n))}return s.then(()=>{t.notify("AnimationComplete",e)})}function _o(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let s=0;s<n;s++)if(e[s]!==t[s])return!1;return!0}const Xu=fs.length;function Mo(t){if(!t)return;if(!t.isControllingVariants){const n=t.parent?Mo(t.parent)||{}:{};return t.props.initial!==void 0&&(n.initial=t.props.initial),n}const e={};for(let n=0;n<Xu;n++){const s=fs[n],i=t.props[s];(le(i)||i===!1)&&(e[s]=i)}return e}const qu=[...hs].reverse(),Zu=hs.length;function Ju(t){return e=>Promise.all(e.map(({animation:n,options:s})=>Yu(t,n,s)))}function Qu(t){let e=Ju(t),n=li(),s=!0;const i=l=>(u,c)=>{const h=Bt(t,c,l==="exit"?t.presenceContext?.custom:void 0);if(h){const{transition:f,transitionEnd:d,...y}=h;u={...u,...y,...d}}return u};function o(l){e=l(t)}function r(l){const{props:u}=t,c=Mo(t.parent)||{},h=[],f=new Set;let d={},y=1/0;for(let x=0;x<Zu;x++){const p=qu[x],v=n[p],g=u[p]!==void 0?u[p]:c[p],S=le(g),T=p===l?v.isActive:null;T===!1&&(y=x);let _=g===c[p]&&g!==u[p]&&S;if(_&&s&&t.manuallyAnimateOnMount&&(_=!1),v.protectedKeys={...d},!v.isActive&&T===null||!g&&!v.prevProp||We(g)||typeof g=="boolean")continue;const C=th(v.prevProp,g);let P=C||p===l&&v.isActive&&!_&&S||x>y&&S,V=!1;const F=Array.isArray(g)?g:[g];let at=F.reduce(i(p),{});T===!1&&(at={});const{prevResolvedValues:Ht={}}=v,Yt={...Ht,...at},At=N=>{P=!0,f.has(N)&&(V=!0,f.delete(N)),v.needsAnimating[N]=!0;const J=t.getValue(N);J&&(J.liveStyle=!1)};for(const N in Yt){const J=at[N],xt=Ht[N];if(d.hasOwnProperty(N))continue;let Et=!1;Ln(J)&&Ln(xt)?Et=!_o(J,xt):Et=J!==xt,Et?J!=null?At(N):f.add(N):J!==void 0&&f.has(N)?At(N):v.protectedKeys[N]=!0}v.prevProp=g,v.prevResolvedValues=at,v.isActive&&(d={...d,...at}),s&&t.blockInitialAnimation&&(P=!1);const ye=_&&C;P&&(!ye||V)&&h.push(...F.map(N=>{const J={type:p};if(typeof N=="string"&&s&&!ye&&t.manuallyAnimateOnMount&&t.parent){const{parent:xt}=t,Et=Bt(xt,N);if(xt.enteringChildren&&Et){const{delayChildren:ta}=Et.transition||{};J.delay=Po(xt.enteringChildren,t,ta)}}return{animation:N,options:J}}))}if(f.size){const x={};if(typeof u.initial!="boolean"){const p=Bt(t,Array.isArray(u.initial)?u.initial[0]:u.initial);p&&p.transition&&(x.transition=p.transition)}f.forEach(p=>{const v=t.getBaseTarget(p),g=t.getValue(p);g&&(g.liveStyle=!0),x[p]=v??null}),h.push({animation:x})}let m=!!h.length;return s&&(u.initial===!1||u.initial===u.animate)&&!t.manuallyAnimateOnMount&&(m=!1),s=!1,m?e(h):Promise.resolve()}function a(l,u){if(n[l].isActive===u)return Promise.resolve();t.variantChildren?.forEach(h=>h.animationState?.setActive(l,u)),n[l].isActive=u;const c=r(l);for(const h in n)n[h].protectedKeys={};return c}return{animateChanges:r,setActive:a,setAnimateFunction:o,getState:()=>n,reset:()=>{n=li(),s=!0}}}function th(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!_o(e,t):!1}function bt(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function li(){return{animate:bt(!0),whileInView:bt(),whileHover:bt(),whileTap:bt(),whileDrag:bt(),whileFocus:bt(),exit:bt()}}class vt{constructor(e){this.isMounted=!1,this.node=e}update(){}}class eh extends vt{constructor(e){super(e),e.animationState||(e.animationState=Qu(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();We(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:n}=this.node.prevProps||{};e!==n&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let nh=0;class sh extends vt{constructor(){super(...arguments),this.id=nh++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:n}=this.node.presenceContext,{isPresent:s}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===s)return;const i=this.node.animationState.setActive("exit",!e);n&&!e&&i.then(()=>{n(this.id)})}mount(){const{register:e,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),e&&(this.unmount=e(this.id))}unmount(){}}const ih={animation:{Feature:eh},exit:{Feature:sh}};function ue(t,e,n,s={passive:!0}){return t.addEventListener(e,n,s),()=>t.removeEventListener(e,n)}function ge(t){return{point:{x:t.pageX,y:t.pageY}}}const rh=t=>e=>us(e)&&t(e,ge(e));function te(t,e,n,s){return ue(t,e,rh(n),s)}const Ao=1e-4,oh=1-Ao,ah=1+Ao,Eo=.01,lh=0-Eo,ch=0+Eo;function H(t){return t.max-t.min}function uh(t,e,n){return Math.abs(t-e)<=n}function ci(t,e,n,s=.5){t.origin=s,t.originPoint=O(e.min,e.max,t.origin),t.scale=H(n)/H(e),t.translate=O(n.min,n.max,t.origin)-t.originPoint,(t.scale>=oh&&t.scale<=ah||isNaN(t.scale))&&(t.scale=1),(t.translate>=lh&&t.translate<=ch||isNaN(t.translate))&&(t.translate=0)}function ee(t,e,n,s){ci(t.x,e.x,n.x,s?s.originX:void 0),ci(t.y,e.y,n.y,s?s.originY:void 0)}function ui(t,e,n){t.min=n.min+e.min,t.max=t.min+H(e)}function hh(t,e,n){ui(t.x,e.x,n.x),ui(t.y,e.y,n.y)}function hi(t,e,n){t.min=e.min-n.min,t.max=t.min+H(e)}function ne(t,e,n){hi(t.x,e.x,n.x),hi(t.y,e.y,n.y)}function et(t){return[t("x"),t("y")]}const Vo=({current:t})=>t?t.ownerDocument.defaultView:null,fi=(t,e)=>Math.abs(t-e);function fh(t,e){const n=fi(t.x,e.x),s=fi(t.y,e.y);return Math.sqrt(n**2+s**2)}class Ro{constructor(e,n,{transformPagePoint:s,contextWindow:i=window,dragSnapToOrigin:o=!1,distanceThreshold:r=3}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const f=rn(this.lastMoveEventInfo,this.history),d=this.startEvent!==null,y=fh(f.offset,{x:0,y:0})>=this.distanceThreshold;if(!d&&!y)return;const{point:m}=f,{timestamp:x}=z;this.history.push({...m,timestamp:x});const{onStart:p,onMove:v}=this.handlers;d||(p&&p(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),v&&v(this.lastMoveEvent,f)},this.handlePointerMove=(f,d)=>{this.lastMoveEvent=f,this.lastMoveEventInfo=sn(d,this.transformPagePoint),k.update(this.updatePoint,!0)},this.handlePointerUp=(f,d)=>{this.end();const{onEnd:y,onSessionEnd:m,resumeAnimation:x}=this.handlers;if(this.dragSnapToOrigin&&x&&x(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const p=rn(f.type==="pointercancel"?this.lastMoveEventInfo:sn(d,this.transformPagePoint),this.history);this.startEvent&&y&&y(f,p),m&&m(f,p)},!us(e))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=s,this.distanceThreshold=r,this.contextWindow=i||window;const a=ge(e),l=sn(a,this.transformPagePoint),{point:u}=l,{timestamp:c}=z;this.history=[{...u,timestamp:c}];const{onSessionStart:h}=n;h&&h(e,rn(l,this.history)),this.removeListeners=de(te(this.contextWindow,"pointermove",this.handlePointerMove),te(this.contextWindow,"pointerup",this.handlePointerUp),te(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),gt(this.updatePoint)}}function sn(t,e){return e?{point:e(t.point)}:t}function di(t,e){return{x:t.x-e.x,y:t.y-e.y}}function rn({point:t},e){return{point:t,delta:di(t,Do(e)),offset:di(t,dh(e)),velocity:mh(e,.1)}}function dh(t){return t[0]}function Do(t){return t[t.length-1]}function mh(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,s=null;const i=Do(t);for(;n>=0&&(s=t[n],!(i.timestamp-s.timestamp>ot(e)));)n--;if(!s)return{x:0,y:0};const o=nt(i.timestamp-s.timestamp);if(o===0)return{x:0,y:0};const r={x:(i.x-s.x)/o,y:(i.y-s.y)/o};return r.x===1/0&&(r.x=0),r.y===1/0&&(r.y=0),r}function ph(t,{min:e,max:n},s){return e!==void 0&&t<e?t=s?O(e,t,s.min):Math.max(t,e):n!==void 0&&t>n&&(t=s?O(n,t,s.max):Math.min(t,n)),t}function mi(t,e,n){return{min:e!==void 0?t.min+e:void 0,max:n!==void 0?t.max+n-(t.max-t.min):void 0}}function gh(t,{top:e,left:n,bottom:s,right:i}){return{x:mi(t.x,n,i),y:mi(t.y,e,s)}}function pi(t,e){let n=e.min-t.min,s=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,s]=[s,n]),{min:n,max:s}}function yh(t,e){return{x:pi(t.x,e.x),y:pi(t.y,e.y)}}function vh(t,e){let n=.5;const s=H(t),i=H(e);return i>s?n=re(e.min,e.max-s,t.min):s>i&&(n=re(t.min,t.max-i,e.min)),ht(0,1,n)}function xh(t,e){const n={};return e.min!==void 0&&(n.min=e.min-t.min),e.max!==void 0&&(n.max=e.max-t.min),n}const In=.35;function bh(t=In){return t===!1?t=0:t===!0&&(t=In),{x:gi(t,"left","right"),y:gi(t,"top","bottom")}}function gi(t,e,n){return{min:yi(t,e),max:yi(t,n)}}function yi(t,e){return typeof t=="number"?t:t[e]||0}const wh=new WeakMap;class Th{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=j(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:n=!1,distanceThreshold:s}={}){const{presenceContext:i}=this.visualElement;if(i&&i.isPresent===!1)return;const o=h=>{const{dragSnapToOrigin:f}=this.getProps();f?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(ge(h).point)},r=(h,f)=>{const{drag:d,dragPropagation:y,onDragStart:m}=this.getProps();if(d&&!y&&(this.openDragLock&&this.openDragLock(),this.openDragLock=kc(d),!this.openDragLock))return;this.latestPointerEvent=h,this.latestPanInfo=f,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),et(p=>{let v=this.getAxisMotionValue(p).get()||0;if(ut.test(v)){const{projection:g}=this.visualElement;if(g&&g.layout){const S=g.layout.layoutBox[p];S&&(v=H(S)*(parseFloat(v)/100))}}this.originPoint[p]=v}),m&&k.postRender(()=>m(h,f)),On(this.visualElement,"transform");const{animationState:x}=this.visualElement;x&&x.setActive("whileDrag",!0)},a=(h,f)=>{this.latestPointerEvent=h,this.latestPanInfo=f;const{dragPropagation:d,dragDirectionLock:y,onDirectionLock:m,onDrag:x}=this.getProps();if(!d&&!this.openDragLock)return;const{offset:p}=f;if(y&&this.currentDirection===null){this.currentDirection=Sh(p),this.currentDirection!==null&&m&&m(this.currentDirection);return}this.updateAxis("x",f.point,p),this.updateAxis("y",f.point,p),this.visualElement.render(),x&&x(h,f)},l=(h,f)=>{this.latestPointerEvent=h,this.latestPanInfo=f,this.stop(h,f),this.latestPointerEvent=null,this.latestPanInfo=null},u=()=>et(h=>this.getAnimationState(h)==="paused"&&this.getAxisMotionValue(h).animation?.play()),{dragSnapToOrigin:c}=this.getProps();this.panSession=new Ro(e,{onSessionStart:o,onStart:r,onMove:a,onSessionEnd:l,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,distanceThreshold:s,contextWindow:Vo(this.visualElement)})}stop(e,n){const s=e||this.latestPointerEvent,i=n||this.latestPanInfo,o=this.isDragging;if(this.cancel(),!o||!i||!s)return;const{velocity:r}=i;this.startAnimation(r);const{onDragEnd:a}=this.getProps();a&&k.postRender(()=>a(s,i))}cancel(){this.isDragging=!1;const{projection:e,animationState:n}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:s}=this.getProps();!s&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(e,n,s){const{drag:i}=this.getProps();if(!s||!Te(e,i,this.currentDirection))return;const o=this.getAxisMotionValue(e);let r=this.originPoint[e]+s[e];this.constraints&&this.constraints[e]&&(r=ph(r,this.constraints[e],this.elastic[e])),o.set(r)}resolveConstraints(){const{dragConstraints:e,dragElastic:n}=this.getProps(),s=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,i=this.constraints;e&&kt(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&s?this.constraints=gh(s.layoutBox,e):this.constraints=!1,this.elastic=bh(n),i!==this.constraints&&s&&this.constraints&&!this.hasMutatedConstraints&&et(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=xh(s.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!kt(e))return!1;const s=e.current;ft(s!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");const{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=Cu(s,i.root,this.visualElement.getTransformPagePoint());let r=yh(i.layout.layoutBox,o);if(n){const a=n(wu(r));this.hasMutatedConstraints=!!a,a&&(r=po(a))}return r}startAnimation(e){const{drag:n,dragMomentum:s,dragElastic:i,dragTransition:o,dragSnapToOrigin:r,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},u=et(c=>{if(!Te(c,n,this.currentDirection))return;let h=l&&l[c]||{};r&&(h={min:0,max:0});const f=i?200:1e6,d=i?40:1e7,y={type:"inertia",velocity:s?e[c]:0,bounceStiffness:f,bounceDamping:d,timeConstant:750,restDelta:1,restSpeed:10,...o,...h};return this.startAxisValueAnimation(c,y)});return Promise.all(u).then(a)}startAxisValueAnimation(e,n){const s=this.getAxisMotionValue(e);return On(this.visualElement,e),s.start(xs(e,s,0,n,this.visualElement,!1))}stopAnimation(){et(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){et(e=>this.getAxisMotionValue(e).animation?.pause())}getAnimationState(e){return this.getAxisMotionValue(e).animation?.state}getAxisMotionValue(e){const n=`_drag${e.toUpperCase()}`,s=this.visualElement.getProps(),i=s[n];return i||this.visualElement.getValue(e,(s.initial?s.initial[e]:void 0)||0)}snapToCursor(e){et(n=>{const{drag:s}=this.getProps();if(!Te(n,s,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(n);if(i&&i.layout){const{min:r,max:a}=i.layout.layoutBox[n];o.set(e[n]-O(r,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:s}=this.visualElement;if(!kt(n)||!s||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};et(r=>{const a=this.getAxisMotionValue(r);if(a&&this.constraints!==!1){const l=a.get();i[r]=vh({min:l,max:l},this.constraints[r])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",s.root&&s.root.updateScroll(),s.updateLayout(),this.resolveConstraints(),et(r=>{if(!Te(r,e,null))return;const a=this.getAxisMotionValue(r),{min:l,max:u}=this.constraints[r];a.set(O(l,u,i[r]))})}addListeners(){if(!this.visualElement.current)return;wh.set(this.visualElement,this);const e=this.visualElement.current,n=te(e,"pointerdown",l=>{const{drag:u,dragListener:c=!0}=this.getProps();u&&c&&this.start(l)}),s=()=>{const{dragConstraints:l}=this.getProps();kt(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,o=i.addEventListener("measure",s);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),k.read(s);const r=ue(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",(({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&(et(c=>{const h=this.getAxisMotionValue(c);h&&(this.originPoint[c]+=l[c].translate,h.set(h.get()+l[c].translate))}),this.visualElement.render())}));return()=>{r(),n(),o(),a&&a()}}getProps(){const e=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:s=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:r=In,dragMomentum:a=!0}=e;return{...e,drag:n,dragDirectionLock:s,dragPropagation:i,dragConstraints:o,dragElastic:r,dragMomentum:a}}}function Te(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function Sh(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class Ch extends vt{constructor(e){super(e),this.removeGroupControls=st,this.removeListeners=st,this.controls=new Th(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||st}unmount(){this.removeGroupControls(),this.removeListeners()}}const vi=t=>(e,n)=>{t&&k.postRender(()=>t(e,n))};class Ph extends vt{constructor(){super(...arguments),this.removePointerDownListener=st}onPointerDown(e){this.session=new Ro(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Vo(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:s,onPanEnd:i}=this.node.getProps();return{onSessionStart:vi(e),onStart:vi(n),onMove:s,onEnd:(o,r)=>{delete this.session,i&&k.postRender(()=>i(o,r))}}}mount(){this.removePointerDownListener=te(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const Re={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function xi(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const qt={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(M.test(t))t=parseFloat(t);else return t;const n=xi(t,e.target.x),s=xi(t,e.target.y);return`${n}% ${s}%`}},_h={correct:(t,{treeScale:e,projectionDelta:n})=>{const s=t,i=yt.parse(t);if(i.length>5)return s;const o=yt.createTransformer(t),r=typeof i[0]!="number"?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;i[0+r]/=a,i[1+r]/=l;const u=O(a,l,.5);return typeof i[2+r]=="number"&&(i[2+r]/=u),typeof i[3+r]=="number"&&(i[3+r]/=u),o(i)}};let on=!1;class Mh extends b.Component{componentDidMount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s,layoutId:i}=this.props,{projection:o}=e;Xc(Ah),o&&(n.group&&n.group.add(o),s&&s.register&&i&&s.register(o),on&&o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),Re.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:n,visualElement:s,drag:i,isPresent:o}=this.props,{projection:r}=s;return r&&(r.isPresent=o,on=!0,i||e.layoutDependency!==n||n===void 0||e.isPresent!==o?r.willUpdate():this.safeToRemove(),e.isPresent!==o&&(o?r.promote():r.relegate()||k.postRender(()=>{const a=r.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),cs.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s}=this.props,{projection:i}=e;on=!0,i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),s&&s.deregister&&s.deregister(i))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function ko(t){const[e,n]=$c(),s=b.useContext(ur);return w.jsx(Mh,{...t,layoutGroup:s,switchLayoutGroup:b.useContext(fo),isPresent:e,safeToRemove:n})}const Ah={borderRadius:{...qt,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:qt,borderTopRightRadius:qt,borderBottomLeftRadius:qt,borderBottomRightRadius:qt,boxShadow:_h};function Eh(t,e,n){const s=G(t)?t:Nt(t);return s.start(xs("",s,e,n)),s.animation}const Vh=(t,e)=>t.depth-e.depth;class Rh{constructor(){this.children=[],this.isDirty=!1}add(e){Un(this.children,e),this.isDirty=!0}remove(e){Kn(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(Vh),this.isDirty=!1,this.children.forEach(e)}}function Dh(t,e){const n=X.now(),s=({timestamp:i})=>{const o=i-n;o>=e&&(gt(s),t(o-e))};return k.setup(s,!0),()=>gt(s)}const Lo=["TopLeft","TopRight","BottomLeft","BottomRight"],kh=Lo.length,bi=t=>typeof t=="string"?parseFloat(t):t,wi=t=>typeof t=="number"||M.test(t);function Lh(t,e,n,s,i,o){i?(t.opacity=O(0,n.opacity??1,Oh(s)),t.opacityExit=O(e.opacity??1,0,jh(s))):o&&(t.opacity=O(e.opacity??1,n.opacity??1,s));for(let r=0;r<kh;r++){const a=`border${Lo[r]}Radius`;let l=Ti(e,a),u=Ti(n,a);if(l===void 0&&u===void 0)continue;l||(l=0),u||(u=0),l===0||u===0||wi(l)===wi(u)?(t[a]=Math.max(O(bi(l),bi(u),s),0),(ut.test(u)||ut.test(l))&&(t[a]+="%")):t[a]=u}(e.rotate||n.rotate)&&(t.rotate=O(e.rotate||0,n.rotate||0,s))}function Ti(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const Oh=Oo(0,.5,wr),jh=Oo(.5,.95,st);function Oo(t,e,n){return s=>s<t?0:s>e?1:n(re(t,e,s))}function Si(t,e){t.min=e.min,t.max=e.max}function Q(t,e){Si(t.x,e.x),Si(t.y,e.y)}function Ci(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function Pi(t,e,n,s,i){return t-=e,t=Be(t,1/n,s),i!==void 0&&(t=Be(t,1/i,s)),t}function Ih(t,e=0,n=1,s=.5,i,o=t,r=t){if(ut.test(e)&&(e=parseFloat(e),e=O(r.min,r.max,e/100)-r.min),typeof e!="number")return;let a=O(o.min,o.max,s);t===o&&(a-=e),t.min=Pi(t.min,e,n,a,i),t.max=Pi(t.max,e,n,a,i)}function _i(t,e,[n,s,i],o,r){Ih(t,e[n],e[s],e[i],e.scale,o,r)}const Bh=["x","scaleX","originX"],Fh=["y","scaleY","originY"];function Mi(t,e,n,s){_i(t.x,e,Bh,n?n.x:void 0,s?s.x:void 0),_i(t.y,e,Fh,n?n.y:void 0,s?s.y:void 0)}function Ai(t){return t.translate===0&&t.scale===1}function jo(t){return Ai(t.x)&&Ai(t.y)}function Ei(t,e){return t.min===e.min&&t.max===e.max}function Nh(t,e){return Ei(t.x,e.x)&&Ei(t.y,e.y)}function Vi(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function Io(t,e){return Vi(t.x,e.x)&&Vi(t.y,e.y)}function Ri(t){return H(t.x)/H(t.y)}function Di(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}class zh{constructor(){this.members=[]}add(e){Un(this.members,e),e.scheduleRender()}remove(e){if(Kn(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(e){const n=this.members.findIndex(i=>e===i);if(n===0)return!1;let s;for(let i=n;i>=0;i--){const o=this.members[i];if(o.isPresent!==!1){s=o;break}}return s?(this.promote(s),!0):!1}promote(e,n){const s=this.lead;if(e!==s&&(this.prevLead=s,this.lead=e,e.show(),s)){s.instance&&s.scheduleRender(),e.scheduleRender(),e.resumeFrom=s,n&&(e.resumeFrom.preserveOpacity=!0),s.snapshot&&(e.snapshot=s.snapshot,e.snapshot.latestValues=s.animationValues||s.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:i}=e.options;i===!1&&s.hide()}}exitAnimationComplete(){this.members.forEach(e=>{const{options:n,resumingFrom:s}=e;n.onExitComplete&&n.onExitComplete(),s&&s.options.onExitComplete&&s.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function $h(t,e,n){let s="";const i=t.x.translate/e.x,o=t.y.translate/e.y,r=n?.z||0;if((i||o||r)&&(s=`translate3d(${i}px, ${o}px, ${r}px) `),(e.x!==1||e.y!==1)&&(s+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:u,rotate:c,rotateX:h,rotateY:f,skewX:d,skewY:y}=n;u&&(s=`perspective(${u}px) ${s}`),c&&(s+=`rotate(${c}deg) `),h&&(s+=`rotateX(${h}deg) `),f&&(s+=`rotateY(${f}deg) `),d&&(s+=`skewX(${d}deg) `),y&&(s+=`skewY(${y}deg) `)}const a=t.x.scale*e.x,l=t.y.scale*e.y;return(a!==1||l!==1)&&(s+=`scale(${a}, ${l})`),s||"none"}const an=["","X","Y","Z"],Wh=1e3;let Uh=0;function ln(t,e,n,s){const{latestValues:i}=e;i[t]&&(n[t]=i[t],e.setStaticValue(t,0),s&&(s[t]=0))}function Bo(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=So(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:o}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",k,!(i||o))}const{parent:s}=t;s&&!s.hasCheckedOptimisedAppear&&Bo(s)}function Fo({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:s,resetTransform:i}){return class{constructor(r={},a=e?.()){this.id=Uh++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(Hh),this.nodes.forEach(Zh),this.nodes.forEach(Jh),this.nodes.forEach(Yh)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=r,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new Rh)}addEventListener(r,a){return this.eventHandlers.has(r)||this.eventHandlers.set(r,new Hn),this.eventHandlers.get(r).add(a)}notifyListeners(r,...a){const l=this.eventHandlers.get(r);l&&l.notify(...a)}hasListeners(r){return this.eventHandlers.has(r)}mount(r){if(this.instance)return;this.isSVG=Qr(r)&&!Fc(r),this.instance=r;const{layoutId:a,layout:l,visualElement:u}=this.options;if(u&&!u.current&&u.mount(r),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||a)&&(this.isLayoutDirty=!0),t){let c,h=0;const f=()=>this.root.updateBlockedByResize=!1;k.read(()=>{h=window.innerWidth}),t(r,()=>{const d=window.innerWidth;d!==h&&(h=d,this.root.updateBlockedByResize=!0,c&&c(),c=Dh(f,250),Re.hasAnimatedSinceResize&&(Re.hasAnimatedSinceResize=!1,this.nodes.forEach(Oi)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&u&&(a||l)&&this.addEventListener("didUpdate",({delta:c,hasLayoutChanged:h,hasRelativeLayoutChanged:f,layout:d})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const y=this.options.transition||u.getDefaultTransition()||sf,{onLayoutAnimationStart:m,onLayoutAnimationComplete:x}=u.getProps(),p=!this.targetLayout||!Io(this.targetLayout,d),v=!h&&f;if(this.options.layoutRoot||this.resumeFrom||v||h&&(p||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const g={...as(y,"layout"),onPlay:m,onComplete:x};(u.shouldReduceMotion||this.options.layoutRoot)&&(g.delay=0,g.type=!1),this.startAnimation(g),this.setAnimationOrigin(c,v)}else h||Oi(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=d})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const r=this.getStack();r&&r.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),gt(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(Qh),this.animationId++)}getTransformTemplate(){const{visualElement:r}=this.options;return r&&r.getProps().transformTemplate}willUpdate(r=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Bo(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let c=0;c<this.path.length;c++){const h=this.path[c];h.shouldResetTransform=!0,h.updateScroll("snapshot"),h.options.layoutRoot&&h.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),r&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(ki);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Li);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(qh),this.nodes.forEach(Kh),this.nodes.forEach(Gh)):this.nodes.forEach(Li),this.clearAllSnapshots();const a=X.now();z.delta=ht(0,1e3/60,a-z.timestamp),z.timestamp=a,z.isProcessing=!0,Xe.update.process(z),Xe.preRender.process(z),Xe.render.process(z),z.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,cs.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Xh),this.sharedNodes.forEach(tf)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,k.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){k.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!H(this.snapshot.measuredBox.x)&&!H(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const r=this.layout;this.layout=this.measure(!1),this.layoutCorrected=j(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,r?r.layoutBox:void 0)}updateScroll(r="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===r&&(a=!1),a&&this.instance){const l=s(this.instance);this.scroll={animationId:this.root.animationId,phase:r,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!i)return;const r=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!jo(this.projectionDelta),l=this.getTransformTemplate(),u=l?l(this.latestValues,""):void 0,c=u!==this.prevTransformTemplateValue;r&&this.instance&&(a||Tt(this.latestValues)||c)&&(i(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(r=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return r&&(l=this.removeTransform(l)),rf(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:r}=this.options;if(!r)return j();const a=r.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(of))){const{scroll:u}=this.root;u&&(Lt(a.x,u.offset.x),Lt(a.y,u.offset.y))}return a}removeElementScroll(r){const a=j();if(Q(a,r),this.scroll?.wasRoot)return a;for(let l=0;l<this.path.length;l++){const u=this.path[l],{scroll:c,options:h}=u;u!==this.root&&c&&h.layoutScroll&&(c.wasRoot&&Q(a,r),Lt(a.x,c.offset.x),Lt(a.y,c.offset.y))}return a}applyTransform(r,a=!1){const l=j();Q(l,r);for(let u=0;u<this.path.length;u++){const c=this.path[u];!a&&c.options.layoutScroll&&c.scroll&&c!==c.root&&Ot(l,{x:-c.scroll.offset.x,y:-c.scroll.offset.y}),Tt(c.latestValues)&&Ot(l,c.latestValues)}return Tt(this.latestValues)&&Ot(l,this.latestValues),l}removeTransform(r){const a=j();Q(a,r);for(let l=0;l<this.path.length;l++){const u=this.path[l];if(!u.instance||!Tt(u.latestValues))continue;Rn(u.latestValues)&&u.updateSnapshot();const c=j(),h=u.measurePageBox();Q(c,h),Mi(a,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,c)}return Tt(this.latestValues)&&Mi(a,this.latestValues),a}setTargetDelta(r){this.targetDelta=r,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(r){this.options={...this.options,...r,crossfade:r.crossfade!==void 0?r.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!==z.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(r=!1){const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const l=!!this.resumingFrom||this!==a;if(!(r||l&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:c,layoutId:h}=this.options;if(!(!this.layout||!(c||h))){if(this.resolvedRelativeTargetAt=z.timestamp,!this.targetDelta&&!this.relativeTarget){const f=this.getClosestProjectingParent();f&&f.layout&&this.animationProgress!==1?(this.relativeParent=f,this.forceRelativeParentToResolveTarget(),this.relativeTarget=j(),this.relativeTargetOrigin=j(),ne(this.relativeTargetOrigin,this.layout.layoutBox,f.layout.layoutBox),Q(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=j(),this.targetWithTransforms=j()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),hh(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Q(this.target,this.layout.layoutBox),yo(this.target,this.targetDelta)):Q(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const f=this.getClosestProjectingParent();f&&!!f.resumingFrom==!!this.resumingFrom&&!f.options.layoutScroll&&f.target&&this.animationProgress!==1?(this.relativeParent=f,this.forceRelativeParentToResolveTarget(),this.relativeTarget=j(),this.relativeTargetOrigin=j(),ne(this.relativeTargetOrigin,this.target,f.target),Q(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||Rn(this.parent.latestValues)||go(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){const r=this.getLead(),a=!!this.resumingFrom||this!==r;let l=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(l=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===z.timestamp&&(l=!1),l)return;const{layout:u,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||!(u||c))return;Q(this.layoutCorrected,this.layout.layoutBox);const h=this.treeScale.x,f=this.treeScale.y;Su(this.layoutCorrected,this.treeScale,this.path,a),r.layout&&!r.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(r.target=r.layout.layoutBox,r.targetWithTransforms=j());const{target:d}=r;if(!d){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Ci(this.prevProjectionDelta.x,this.projectionDelta.x),Ci(this.prevProjectionDelta.y,this.projectionDelta.y)),ee(this.projectionDelta,this.layoutCorrected,d,this.latestValues),(this.treeScale.x!==h||this.treeScale.y!==f||!Di(this.projectionDelta.x,this.prevProjectionDelta.x)||!Di(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",d))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(r=!0){if(this.options.visualElement?.scheduleRender(),r){const a=this.getStack();a&&a.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=jt(),this.projectionDelta=jt(),this.projectionDeltaWithTransform=jt()}setAnimationOrigin(r,a=!1){const l=this.snapshot,u=l?l.latestValues:{},c={...this.latestValues},h=jt();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const f=j(),d=l?l.source:void 0,y=this.layout?this.layout.source:void 0,m=d!==y,x=this.getStack(),p=!x||x.members.length<=1,v=!!(m&&!p&&this.options.crossfade===!0&&!this.path.some(nf));this.animationProgress=0;let g;this.mixTargetDelta=S=>{const T=S/1e3;ji(h.x,r.x,T),ji(h.y,r.y,T),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(ne(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),ef(this.relativeTarget,this.relativeTargetOrigin,f,T),g&&Nh(this.relativeTarget,g)&&(this.isProjectionDirty=!1),g||(g=j()),Q(g,this.relativeTarget)),m&&(this.animationValues=c,Lh(c,u,this.latestValues,T,v,p)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=T},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(r){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(gt(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=k.update(()=>{Re.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Nt(0)),this.currentAnimation=Eh(this.motionValue,[0,1e3],{...r,velocity:0,isSync:!0,onUpdate:a=>{this.mixTargetDelta(a),r.onUpdate&&r.onUpdate(a)},onStop:()=>{},onComplete:()=>{r.onComplete&&r.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 r=this.getStack();r&&r.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Wh),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const r=this.getLead();let{targetWithTransforms:a,target:l,layout:u,latestValues:c}=r;if(!(!a||!l||!u)){if(this!==r&&this.layout&&u&&No(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||j();const h=H(this.layout.layoutBox.x);l.x.min=r.target.x.min,l.x.max=l.x.min+h;const f=H(this.layout.layoutBox.y);l.y.min=r.target.y.min,l.y.max=l.y.min+f}Q(a,l),Ot(a,c),ee(this.projectionDeltaWithTransform,this.layoutCorrected,a,c)}}registerSharedNode(r,a){this.sharedNodes.has(r)||this.sharedNodes.set(r,new zh),this.sharedNodes.get(r).add(a);const u=a.options.initialPromotionConfig;a.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(a):void 0})}isLead(){const r=this.getStack();return r?r.lead===this:!0}getLead(){const{layoutId:r}=this.options;return r?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:r}=this.options;return r?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:r}=this.options;if(r)return this.root.sharedNodes.get(r)}promote({needsReset:r,transition:a,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),r&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const r=this.getStack();return r?r.relegate(this):!1}resetSkewAndRotation(){const{visualElement:r}=this.options;if(!r)return;let a=!1;const{latestValues:l}=r;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const u={};l.z&&ln("z",r,u,this.animationValues);for(let c=0;c<an.length;c++)ln(`rotate${an[c]}`,r,u,this.animationValues),ln(`skew${an[c]}`,r,u,this.animationValues);r.render();for(const c in u)r.setStaticValue(c,u[c]),this.animationValues&&(this.animationValues[c]=u[c]);r.scheduleRender()}applyProjectionStyles(r,a){if(!this.instance||this.isSVG)return;if(!this.isVisible){r.visibility="hidden";return}const l=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,r.visibility="",r.opacity="",r.pointerEvents=Ve(a?.pointerEvents)||"",r.transform=l?l(this.latestValues,""):"none";return}const u=this.getLead();if(!this.projectionDelta||!this.layout||!u.target){this.options.layoutId&&(r.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,r.pointerEvents=Ve(a?.pointerEvents)||""),this.hasProjected&&!Tt(this.latestValues)&&(r.transform=l?l({},""):"none",this.hasProjected=!1);return}r.visibility="";const c=u.animationValues||u.latestValues;this.applyTransformsToTarget();let h=$h(this.projectionDeltaWithTransform,this.treeScale,c);l&&(h=l(c,h)),r.transform=h;const{x:f,y:d}=this.projectionDelta;r.transformOrigin=`${f.origin*100}% ${d.origin*100}% 0`,u.animationValues?r.opacity=u===this?c.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:c.opacityExit:r.opacity=u===this?c.opacity!==void 0?c.opacity:"":c.opacityExit!==void 0?c.opacityExit:0;for(const y in ce){if(c[y]===void 0)continue;const{correct:m,applyTo:x,isCSSVariable:p}=ce[y],v=h==="none"?c[y]:m(c[y],u);if(x){const g=x.length;for(let S=0;S<g;S++)r[x[S]]=v}else p?this.options.visualElement.renderState.vars[y]=v:r[y]=v}this.options.layoutId&&(r.pointerEvents=u===this?Ve(a?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(r=>r.currentAnimation?.stop()),this.root.nodes.forEach(ki),this.root.sharedNodes.clear()}}}function Kh(t){t.updateLayout()}function Gh(t){const e=t.resumeFrom?.snapshot||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:s}=t.layout,{animationType:i}=t.options,o=e.source!==t.layout.source;i==="size"?et(c=>{const h=o?e.measuredBox[c]:e.layoutBox[c],f=H(h);h.min=n[c].min,h.max=h.min+f}):No(i,e.layoutBox,n)&&et(c=>{const h=o?e.measuredBox[c]:e.layoutBox[c],f=H(n[c]);h.max=h.min+f,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[c].max=t.relativeTarget[c].min+f)});const r=jt();ee(r,n,e.layoutBox);const a=jt();o?ee(a,t.applyTransform(s,!0),e.measuredBox):ee(a,n,e.layoutBox);const l=!jo(r);let u=!1;if(!t.resumeFrom){const c=t.getClosestProjectingParent();if(c&&!c.resumeFrom){const{snapshot:h,layout:f}=c;if(h&&f){const d=j();ne(d,e.layoutBox,h.layoutBox);const y=j();ne(y,n,f.layoutBox),Io(d,y)||(u=!0),c.options.layoutRoot&&(t.relativeTarget=y,t.relativeTargetOrigin=d,t.relativeParent=c)}}}t.notifyListeners("didUpdate",{layout:n,snapshot:e,delta:a,layoutDelta:r,hasLayoutChanged:l,hasRelativeLayoutChanged:u})}else if(t.isLead()){const{onExitComplete:n}=t.options;n&&n()}t.options.transition=void 0}function Hh(t){t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function Yh(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function Xh(t){t.clearSnapshot()}function ki(t){t.clearMeasurements()}function Li(t){t.isLayoutDirty=!1}function qh(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function Oi(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function Zh(t){t.resolveTargetDelta()}function Jh(t){t.calcProjection()}function Qh(t){t.resetSkewAndRotation()}function tf(t){t.removeLeadSnapshot()}function ji(t,e,n){t.translate=O(e.translate,0,n),t.scale=O(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function Ii(t,e,n,s){t.min=O(e.min,n.min,s),t.max=O(e.max,n.max,s)}function ef(t,e,n,s){Ii(t.x,e.x,n.x,s),Ii(t.y,e.y,n.y,s)}function nf(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const sf={duration:.45,ease:[.4,0,.1,1]},Bi=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),Fi=Bi("applewebkit/")&&!Bi("chrome/")?Math.round:st;function Ni(t){t.min=Fi(t.min),t.max=Fi(t.max)}function rf(t){Ni(t.x),Ni(t.y)}function No(t,e,n){return t==="position"||t==="preserve-aspect"&&!uh(Ri(e),Ri(n),.2)}function of(t){return t!==t.root&&t.scroll?.wasRoot}const af=Fo({attachResizeListener:(t,e)=>ue(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),cn={current:void 0},zo=Fo({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!cn.current){const t=new af({});t.mount(window),t.setOptions({layoutScroll:!0}),cn.current=t}return cn.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),lf={pan:{Feature:Ph},drag:{Feature:Ch,ProjectionNode:zo,MeasureLayout:ko}};function zi(t,e,n){const{props:s}=t;t.animationState&&s.whileHover&&t.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,o=s[i];o&&k.postRender(()=>o(e,ge(e)))}class cf extends vt{mount(){const{current:e}=this.node;e&&(this.unmount=Lc(e,(n,s)=>(zi(this.node,s,"Start"),i=>zi(this.node,i,"End"))))}unmount(){}}class uf extends vt{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch{e=!0}!e||!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=de(ue(this.node.current,"focus",()=>this.onFocus()),ue(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function $i(t,e,n){const{props:s}=t;if(t.current instanceof HTMLButtonElement&&t.current.disabled)return;t.animationState&&s.whileTap&&t.animationState.setActive("whileTap",n==="Start");const i="onTap"+(n==="End"?"":n),o=s[i];o&&k.postRender(()=>o(e,ge(e)))}class hf extends vt{mount(){const{current:e}=this.node;e&&(this.unmount=Bc(e,(n,s)=>($i(this.node,s,"Start"),(i,{success:o})=>$i(this.node,i,o?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Bn=new WeakMap,un=new WeakMap,ff=t=>{const e=Bn.get(t.target);e&&e(t)},df=t=>{t.forEach(ff)};function mf({root:t,...e}){const n=t||document;un.has(n)||un.set(n,{});const s=un.get(n),i=JSON.stringify(e);return s[i]||(s[i]=new IntersectionObserver(df,{root:t,...e})),s[i]}function pf(t,e,n){const s=mf(e);return Bn.set(t,n),s.observe(t),()=>{Bn.delete(t),s.unobserve(t)}}const gf={some:0,all:1};class yf extends vt{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:n,margin:s,amount:i="some",once:o}=e,r={root:n?n.current:void 0,rootMargin:s,threshold:typeof i=="number"?i:gf[i]},a=l=>{const{isIntersecting:u}=l;if(this.isInView===u||(this.isInView=u,o&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:c,onViewportLeave:h}=this.node.getProps(),f=u?c:h;f&&f(l)};return pf(this.node.current,r,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:n}=this.node;["amount","margin","root"].some(vf(e,n))&&this.startObserver()}unmount(){}}function vf({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const xf={inView:{Feature:yf},tap:{Feature:hf},focus:{Feature:uf},hover:{Feature:cf}},bf={layout:{ProjectionNode:zo,MeasureLayout:ko}},wf={...ih,...xf,...lf,...bf},$o=bu(wf,ku),Tf=t=>{let e;t.center?e="center":t.left?e="left":t.right&&(e="right");let n;return t.uppercase?n="uppercase":t.lowercase?n="lowercase":t.capitalize&&(n="capitalize"),K({marginTop:t.mt,marginBottom:t.mb,marginRight:t.mr,marginLeft:t.ml,flex:t.flex,cursor:t.cursor,wordBreak:t.wordBreak,whiteSpace:t.whiteSpace,textOverflow:t.textOverflow,textDecoration:t.decoration,textAlign:e,textTransform:n,color:t.color,opacity:t.disabled?.5:void 0,overflow:t.overflow})},Sf="_primary_13825_8",Cf="_secondary_13825_12",Pf="_tertiary_13825_16",_f="_positive_13825_20",Mf="_negative_13825_24",Af="_warning_13825_28",Ef="_accent_13825_32",Vf="_inverse_13825_36",Rf="_text_13825_111",Df="_regular_13825_117",kf="_medium_13825_121",Lf="_semibold_13825_125",Of="_bold_13825_129",Se={primary:Sf,secondary:Cf,tertiary:Pf,positive:_f,negative:Mf,warning:Af,accent:Ef,inverse:Vf,"title-1":"_title-1_13825_41","title-2":"_title-2_13825_51","title-3":"_title-3_13825_61","headline-1":"_headline-1_13825_76","headline-2":"_headline-2_13825_81","headline-3":"_headline-3_13825_86","body-1":"_body-1_13825_91","body-2":"_body-2_13825_96","caption-1":"_caption-1_13825_101","caption-2":"_caption-2_13825_106",text:Rf,regular:Df,medium:kf,semibold:Lf,bold:Of},Y=b.forwardRef((t,e)=>{const{children:n,className:s,variant:i="body-1",fontWeight:o="medium",tag:r="p",colorName:a="primary",style:l,clickOpacity:u=.5,opacityDuration:c=200,onClick:h,disabled:f,...d}=t,[y,m]=b.useState(!1),x=!!h,p=()=>x&&m(!0),v=()=>x&&m(!1),g=r,S=x?K({opacity:y?u:1,transition:`opacity ${c}ms ease`}):"";return w.jsx(g,{ref:e,...d,className:W(Se.text,Se[i],Se[o],Se[a],Tf(t),S,s),style:l,onClick:h,onMouseDown:p,onMouseUp:v,onMouseLeave:v,onTouchStart:p,onTouchEnd:v,role:x?"button":void 0,tabIndex:x?0:void 0,children:n})});Y.displayName="Text";const Wo=$o(Y);function jf(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var hn={exports:{}};/*!
|
|
2
2
|
Copyright (c) 2018 Jed Watson.
|
|
3
3
|
Licensed under the MIT License (MIT), see
|
|
4
4
|
http://jedwatson.github.io/classnames
|
|
5
|
-
*/var Ii;function Cf(){return Ii||(Ii=1,(function(t){(function(){var e={}.hasOwnProperty;function n(){for(var o="",r=0;r<arguments.length;r++){var a=arguments[r];a&&(o=i(o,s(a)))}return o}function s(o){if(typeof o=="string"||typeof o=="number")return o;if(typeof o!="object")return"";if(Array.isArray(o))return n.apply(null,o);if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]"))return o.toString();var r="";for(var a in o)e.call(o,a)&&o[a]&&(r=i(r,a));return r}function i(o,r){return r?o?o+" "+r:o+r:o}t.exports?(n.default=n,t.exports=n):window.classNames=n})()})(nn)),nn.exports}var Af=Cf();const wt=Pf(Af);function je(t,e,n,s=""){if(n)return t[`${e}_${n}${s}`]}function oe(t,e,n){return je(t,e,n,"Size")}const Mf="_button_ke15b_8",Vf="_button_primary_ke15b_17",Ef="_button_secondary_ke15b_20",_f="_button_negative_ke15b_23",Df="_button_positive_ke15b_26",Rf="_button_warning_ke15b_29",kf="_button_neutral_ke15b_32",Of="_button_mdSize_ke15b_92",Lf="_button_smSize_ke15b_102",If="_button_xsSize_ke15b_112",sn={button:Mf,button_primary:Vf,button_secondary:Ef,button_negative:_f,button_positive:Df,button_warning:Rf,button_neutral:kf,button_mdSize:Of,button_smSize:Lf,button_xsSize:If};function hs({attr:t,children:e,className:n,type:s="button",color:i="primary",size:o="md",...r}){const a="button";return A.jsx("button",{...t,...r,type:s,className:wt(sn[a],n,oe(sn,a,o),je(sn,a,i)),children:e})}const Oo=t=>I.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},I.createElement("path",{d:"M18 6L6 18M6 6L18 18",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),jf="_overlay_1udux_8",Ff="_open_1udux_21",Bf="_modal_1udux_25",Nf="_closeButton_1udux_42",$f="_size_lg_1udux_49",zf="_size_md_1udux_52",Wf="_size_sm_1udux_55",Gt={overlay:jf,open:Ff,modal:Bf,"modal-animation":"_modal-animation_1udux_1",closeButton:Nf,size_lg:$f,size_md:zf,size_sm:Wf},Lo=b.forwardRef(({isOpen:t=!0,onClose:e,overlayClassName:n,modalClassName:s,size:i="md",closeOnBackdropClick:o=!0,closeOnEsc:r=!0,disableBodyScroll:a=!1,showAbsoluteCloseButton:l=!1,children:u},c)=>{b.useEffect(()=>{if(a&&t&&typeof window<"u"&&typeof document<"u"){const d=window.getComputedStyle(document.body).overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=d}}},[t,a]);const h=b.useCallback(d=>{d.key==="Escape"&&e&&e()},[e]);b.useEffect(()=>{if(typeof window<"u"&&typeof document<"u"&&r&&t)return document.addEventListener("keydown",h),()=>document.removeEventListener("keydown",h)},[t,r,h]);const f=b.useCallback(d=>{d.target===d.currentTarget&&o&&e&&e()},[o,e]);return A.jsx("div",{onClick:f,className:at(Gt.overlay,{[Gt.open]:t},n),children:A.jsxs(K,{ref:c,className:at(Gt.modal,Gt[`size_${i}`],s),children:[l&&A.jsx(hs,{className:Gt.closeButton,onClick:e,color:"neutral",children:A.jsx(Oo,{})}),u]})})});Lo.displayName="Modal";const Uf="_loader_1qleq_8",Kf={loader:Uf},Gf=({color:t="var(--text-accent)"})=>A.jsx("span",{className:at(Kf.loader,U({"--loader-color":t}))}),Hf=U({display:"flex",alignItems:"center",justifyContent:"center",position:"relative",borderRadius:16,height:48,padding:"0 16px",cursor:"pointer",fontSize:16,fontWeight:600,overflow:"hidden",transition:"all 0.2s ease"}),Yf={zero:"var(--corner-zero)",xs:"var(--corner-xs)",sm:"var(--corner-sm)",md:"var(--corner-md)",lg:"var(--corner-lg)",xl:"var(--corner-xl)","2xl":"var(--corner-2xl)","3xl":"var(--corner-3xl)","4xl":"var(--corner-4xl)","5xl":"var(--corner-5xl)","6xl":"var(--corner-6xl)","full-round":"var(--corner-full-round)"},Xf={xs:"var(--height-button-xs)",sm:"var(--height-button-sm)",md:"var(--height-button-md)",lg:"var(--height-button-lg)"},qf={clear:U({backgroundColor:"transparent",border:"none"}),filled:U({backgroundColor:"var(--fill-accent-primary)",color:"white",border:"none"}),outline:U({backgroundColor:"transparent",border:"1px solid var(--border-accent-primary)"})},Zf=(t,e,n,s)=>{if(s)return U({cursor:"not-allowed",opacity:.7});const i={transition:"all 0.2s ease",borderRadius:"var(--corner-lg)",border:"none",color:t==="filled"?"var(--text-inverse)":`var(--text-${e})`};switch(t){case"filled":return U({...i,backgroundColor:`var(--fill-${e}-${n})`,":hover":{backgroundColor:`var(--fill-${e}-${n}-hover)`},":active":{backgroundColor:`var(--fill-${e}-${n}-hover)`}});case"outline":return U({...i,backgroundColor:"transparent",border:`1px solid var(--border-${e}-${n})`,":hover":{backgroundColor:`var(--fill-${e}-secondary-hover)`},":active":{backgroundColor:`var(--fill-${e}-secondary-hover)`}});case"clear":return U({...i,backgroundColor:"transparent",":hover":{backgroundColor:`var(--fill-${e}-secondary-hover)`},":active":{backgroundColor:`var(--fill-${e}-secondary-hover)`}});default:return U(i)}},Jf=({disabled:t,loading:e,onClick:n,wrapperClassName:s,buttonClassName:i,buttonDisabledClassName:o,textClassName:r,children:a,variant:l="filled",backgroundColor:u,textColor:c,borderColor:h,color:f="accent",borderRadius:d="lg",width:m="full",size:g="md",iconLeft:x,iconRight:p,intensity:y="primary",...v})=>{const P=b.useMemo(()=>{switch(m){case"full":return"100%";case"auto":return"auto";default:return m}},[m]),w=b.useMemo(()=>u||(l==="filled"?`var(--fill-${f}-${y})`:"transparent"),[l,t,u,f,y]),C=b.useMemo(()=>{if(c)return c;if(y==="primary"){if(f==="neutral")return"var(--text-secondary)";if(l==="filled")return"var(--text-inverse)"}return`var(--text-${f}, #111)`},[l,t,c,f,y]),S=b.useMemo(()=>h||(l==="outline"?`var(--border-${f}-${y})`:"transparent"),[l,h,f,y]),M=at(Hf,Zf(l,f,y,t),qf[l],i,t?o:void 0,U({borderRadius:Yf[d],backgroundColor:w,borderColor:S,color:C,width:"100%",height:Xf[g],opacity:t?.7:1})),N=b.useMemo(()=>{switch(g){case"lg":case"md":return"body-1";case"sm":case"xs":return"body-2";default:return"body-1"}},[g]);return A.jsx(K,{className:at(s),w:P,children:A.jsx(Ro.button,{whileTap:!t&&!e?{scale:.99,boxShadow:"inset 0 0 0 10000px rgba(0,0,0,0.1)",transition:{duration:0}}:{},className:M,disabled:t||e,onClick:n,...v,children:e?A.jsx(Gf,{color:C}):A.jsxs(K,{row:!0,alignItems:"center",gap:8,children:[x,A.jsx(ko,{children:a,color:C,variant:N,className:r}),p]})})})},Qf="_header_446to_8",td={header:Qf},Io=b.forwardRef(({title:t,subtitle:e,onClose:n,w:s="full",p:i,py:o,px:r="var(--spacing-2xl)",pt:a="var(--spacing-2xl)",pb:l="var(--spacing-lg)",row:u=!0,justifyContent:c="space-between"},h)=>A.jsxs(K,{w:s,p:i,py:o,px:r,pt:a,pb:l,row:u,justifyContent:c,ref:h,className:td.header,children:[A.jsxs(K,{children:[A.jsx(Pt,{variant:"title-3",colorName:"primary",fontWeight:"semibold",children:t}),A.jsx(Pt,{variant:"body-1",colorName:"tertiary",fontWeight:"medium",children:e})]}),A.jsx(K,{children:A.jsx(hs,{onClick:n,color:"neutral",children:A.jsx(Oo,{})})})]}));Io.displayName="ModalHeader";const ed="_footer_1bo08_8",nd={footer:ed},jo=b.forwardRef(({children:t,row:e=!0,flex:n=!0,gap:s="var(--spacing-lg)",p:i="var(--spacing-2xl)",className:o,...r},a)=>A.jsx(K,{flex:n,row:e,gap:s,p:i,className:at(nd.footer,o),ref:a,...r,children:t}));jo.displayName="ModalFooter";function Mt(t,e,n){let s=n.initialDeps??[],i;function o(){var r,a,l,u;let c;n.key&&((r=n.debug)!=null&&r.call(n))&&(c=Date.now());const h=t();if(!(h.length!==s.length||h.some((m,g)=>s[g]!==m)))return i;s=h;let d;if(n.key&&((a=n.debug)!=null&&a.call(n))&&(d=Date.now()),i=e(...h),n.key&&((l=n.debug)!=null&&l.call(n))){const m=Math.round((Date.now()-c)*100)/100,g=Math.round((Date.now()-d)*100)/100,x=g/16,p=(y,v)=>{for(y=String(y);y.length<v;)y=" "+y;return y};console.info(`%c⏱ ${p(g,5)} /${p(m,5)} ms`,`
|
|
5
|
+
*/var Wi;function If(){return Wi||(Wi=1,(function(t){(function(){var e={}.hasOwnProperty;function n(){for(var o="",r=0;r<arguments.length;r++){var a=arguments[r];a&&(o=i(o,s(a)))}return o}function s(o){if(typeof o=="string"||typeof o=="number")return o;if(typeof o!="object")return"";if(Array.isArray(o))return n.apply(null,o);if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]"))return o.toString();var r="";for(var a in o)e.call(o,a)&&o[a]&&(r=i(r,a));return r}function i(o,r){return r?o?o+" "+r:o+r:o}t.exports?(n.default=n,t.exports=n):window.classNames=n})()})(hn)),hn.exports}var Bf=If();const Pt=jf(Bf),Ff="_rippleOverlay_s2kim_8",Nf="_ripple_s2kim_8",Ui={rippleOverlay:Ff,ripple:Nf},fn="button, a, input, label, [role='button'], [data-ripple']";function zf(t){if(typeof t.composedPath=="function")return t.composedPath();const e=[];let n=t.target;for(;n;)e.push(n),n=n.parentNode||n.host;return e.push(window),e}const bs=b.forwardRef(({color:t="rgba(0,0,0,0.18)",duration:e=1e3,radius:n="auto",className:s},i)=>{const o=b.useRef(null),[r,a]=b.useState([]),l=b.useRef([]),u=b.useRef(1),c=b.useRef(null),h=()=>{l.current.forEach(m=>clearTimeout(m)),l.current=[]},f=b.useCallback((m,x,p,v)=>{const g=p.getBoundingClientRect(),S=n==="auto"?Math.max(g.width,g.height)*2:n,T=m-v.left,_=x-v.top,C=Math.max(0,g.top-v.top),P=Math.max(0,g.left-v.left),V=Math.max(0,v.right-g.right),F=Math.max(0,v.bottom-g.bottom),Ht=window.getComputedStyle(p).borderRadius||"0px",Yt=u.current++,At={id:Yt,left:T-S/2,top:_-S/2,size:Math.ceil(S),clip:{top:Math.round(C),right:Math.round(V),bottom:Math.round(F),left:Math.round(P)},borderRadius:Ht};a(ve=>[...ve,At]);const ye=window.setTimeout(()=>{a(ve=>ve.filter(N=>N.id!==Yt))},e+80);l.current.push(ye)},[e,n]),d=b.useCallback(m=>{try{if(!o.current)return;const x=o.current,p=x.parentElement;if(!p)return;const v=zf(m);let g=null;for(const P of v)if(P instanceof Element){if(P===p)break;if(P.matches&&P.matches(fn)){g=P;break}}if(g||(g=p),g.closest&&(g.closest("[disabled]")||g.getAttribute("aria-disabled")==="true"||g.classList.contains("ripple-disabled")))return;const S=m.target;if(S&&S.closest&&(S.closest("[disabled]")||S.getAttribute?.("aria-disabled")==="true"))return;const T=x.getBoundingClientRect(),{clientX:_}=m,{clientY:C}=m;f(_,C,g,T)}catch{}},[f]),y=b.useCallback(m=>{if(!o.current||!(m.key==="Enter"||m.key===" "))return;const x=o.current,p=x.parentElement;if(!p)return;const v=document.activeElement;let g=null;if(v instanceof Element&&v.matches(fn)&&(g=v),g||(g=p),g.closest&&(g.closest("[disabled]")||g.getAttribute("aria-disabled")==="true"))return;const S=x.getBoundingClientRect(),T=g.getBoundingClientRect().left+g.getBoundingClientRect().width/2,_=g.getBoundingClientRect().top+g.getBoundingClientRect().height/2;f(T,_,g,S)},[f]);return b.useImperativeHandle(i,()=>({trigger:({center:m=!0,x,y:p}={})=>{const v=o.current;if(!v)return;const g=v.parentElement;if(!g)return;const S=v.getBoundingClientRect(),T=document.activeElement instanceof Element&&document.activeElement.matches(fn)?document.activeElement:g,_=m?T.getBoundingClientRect().left+T.getBoundingClientRect().width/2:x??S.left+S.width/2,C=m?T.getBoundingClientRect().top+T.getBoundingClientRect().height/2:p??S.top+S.height/2;f(_,C,T,S)}}),[f]),b.useEffect(()=>{const m=o.current;if(!m)return;const x=m.parentElement;if(!x)return;const p=window.getComputedStyle(x);let v=!1;return p.position==="static"&&(x.style.position="relative",v=!0,c.current=x),x.addEventListener("pointerdown",d,!0),x.addEventListener("keydown",y),()=>{x.removeEventListener("pointerdown",d,!0),x.removeEventListener("keydown",y),v&&c.current&&(c.current.style.position="",c.current=null),h()}},[d,y]),b.useEffect(()=>()=>h(),[]),w.jsx("div",{ref:o,className:`${Ui.rippleOverlay} ${s??""}`,"aria-hidden":!0,children:r.map(m=>w.jsx("span",{className:Ui.ripple,style:{left:`${m.left}px`,top:`${m.top}px`,width:`${m.size}px`,height:`${m.size}px`,backgroundColor:t,animationDuration:`${e}ms`,clipPath:`inset(${m.clip.top}px ${m.clip.right}px ${m.clip.bottom}px ${m.clip.left}px round ${m.borderRadius})`}},m.id))})});function Uo(t,e){const{current:n}=b.useRef(t!==void 0),[s,i]=b.useState(e),o=n?t:s,r=b.useCallback(a=>{n||i(a)},[n]);return[o,r]}const $f=(t,e)=>{const[n,s]=b.useState({top:0,left:0,width:0});return b.useLayoutEffect(()=>{if(!e||!t.current)return;const i=()=>{const r=t.current.getBoundingClientRect();s({top:r.bottom+window.scrollY+4,left:r.left+window.scrollX,width:r.width})};i(),window.addEventListener("resize",i),window.addEventListener("scroll",i,!0);const o=new ResizeObserver(()=>i());return o.observe(t.current),()=>{window.removeEventListener("resize",i),window.removeEventListener("scroll",i,!0),o.disconnect()}},[e,t]),n};function Ke(t,e,n,s=""){if(n)return t[`${e}_${n}${s}`]}function he(t,e,n){return Ke(t,e,n,"Size")}const Wf="_button_12z2f_8",Uf="_button_primary_12z2f_19",Kf="_button_secondary_12z2f_22",Gf="_button_negative_12z2f_25",Hf="_button_positive_12z2f_28",Yf="_button_warning_12z2f_31",Xf="_button_neutral_12z2f_34",qf="_button_mdSize_12z2f_94",Zf="_button_smSize_12z2f_104",Jf="_button_xsSize_12z2f_114",dn={button:Wf,button_primary:Uf,button_secondary:Kf,button_negative:Gf,button_positive:Hf,button_warning:Yf,button_neutral:Xf,button_mdSize:qf,button_smSize:Zf,button_xsSize:Jf};function ws({attr:t,children:e,className:n,type:s="button",color:i="primary",size:o="md",...r}){const a="button";return w.jsxs("button",{...t,...r,type:s,className:Pt(dn[a],n,he(dn,a,o),Ke(dn,a,i)),children:[w.jsx(bs,{}),e]})}const Ko=t=>D.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},D.createElement("path",{d:"M18 6L6 18M6 6L18 18",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),Qf="_overlay_1udux_8",td="_open_1udux_21",ed="_modal_1udux_25",nd="_closeButton_1udux_42",sd="_size_lg_1udux_49",id="_size_md_1udux_52",rd="_size_sm_1udux_55",Zt={overlay:Qf,open:td,modal:ed,"modal-animation":"_modal-animation_1udux_1",closeButton:nd,size_lg:sd,size_md:id,size_sm:rd},Go=b.forwardRef(({isOpen:t=!0,onClose:e,overlayClassName:n,modalClassName:s,size:i="md",closeOnBackdropClick:o=!0,closeOnEsc:r=!0,disableBodyScroll:a=!1,showAbsoluteCloseButton:l=!1,children:u},c)=>{b.useEffect(()=>{if(a&&t&&typeof window<"u"&&typeof document<"u"){const d=window.getComputedStyle(document.body).overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=d}}},[t,a]);const h=b.useCallback(d=>{d.key==="Escape"&&e&&e()},[e]);b.useEffect(()=>{if(typeof window<"u"&&typeof document<"u"&&r&&t)return document.addEventListener("keydown",h),()=>document.removeEventListener("keydown",h)},[t,r,h]);const f=b.useCallback(d=>{d.target===d.currentTarget&&o&&e&&e()},[o,e]);return w.jsx("div",{onClick:f,className:W(Zt.overlay,{[Zt.open]:t},n),children:w.jsxs(R,{ref:c,className:W(Zt.modal,Zt[`size_${i}`],s),children:[l&&w.jsx(ws,{className:Zt.closeButton,onClick:e,color:"neutral",children:w.jsx(Ko,{})}),u]})})});Go.displayName="Modal";const od="_loader_1qleq_8",ad={loader:od},ld=({color:t="var(--text-accent)"})=>w.jsx("span",{className:W(ad.loader,K({"--loader-color":t}))}),cd=K({display:"flex",alignItems:"center",justifyContent:"center",position:"relative",borderRadius:16,height:48,padding:"0 16px",cursor:"pointer",fontSize:16,fontWeight:600,overflow:"hidden",transition:"all 0.2s ease",gap:8}),Ce={zero:"var(--corner-zero)",xs:"var(--corner-xs)",sm:"var(--corner-sm)",md:"var(--corner-md)",lg:"var(--corner-lg)",xl:"var(--corner-xl)","2xl":"var(--corner-2xl)","3xl":"var(--corner-3xl)","4xl":"var(--corner-4xl)","5xl":"var(--corner-5xl)","6xl":"var(--corner-6xl)","full-round":"var(--corner-full-round)"},ud={xs:"var(--height-button-xs)",sm:"var(--height-button-sm)",md:"var(--height-button-md)",lg:"var(--height-button-lg)"},hd={clear:K({backgroundColor:"transparent",border:"none"}),filled:K({backgroundColor:"var(--fill-accent-primary)",color:"white",border:"none"}),outline:K({backgroundColor:"transparent",border:"1px solid var(--border-accent-primary)"})},fd=(t,e,n,s)=>{if(s)return K({cursor:"not-allowed",opacity:.7});const i={transition:"all 0.2s ease",borderRadius:"var(--corner-lg)",border:"none",color:t==="filled"?"var(--text-inverse)":`var(--text-${e})`};switch(t){case"filled":return K({...i,backgroundColor:`var(--fill-${e}-${n})`,":hover":{backgroundColor:`var(--fill-${e}-${n}-hover)`},":active":{backgroundColor:`var(--fill-${e}-${n}-hover)`}});case"outline":return K({...i,backgroundColor:"transparent",border:`1px solid var(--border-${e}-${n})`,":hover":{backgroundColor:`var(--fill-${e}-secondary-hover)`},":active":{backgroundColor:`var(--fill-${e}-secondary-hover)`}});case"clear":return K({...i,backgroundColor:"transparent",":hover":{backgroundColor:`var(--fill-${e}-secondary-hover)`},":active":{backgroundColor:`var(--fill-${e}-secondary-hover)`}});default:return K(i)}},dd=({disabled:t,loading:e,onClick:n,wrapperClassName:s,buttonClassName:i,buttonDisabledClassName:o,textClassName:r,children:a,variant:l="filled",backgroundColor:u,textColor:c,textFontWeight:h,borderColor:f,color:d="accent",borderRadius:y,width:m="full",size:x="md",iconLeft:p,iconRight:v,intensity:g="primary",...S})=>{const T=b.useMemo(()=>{switch(m){case"full":return"100%";case"auto":return"auto";default:return m}},[m]),_=b.useMemo(()=>u||(l==="filled"?`var(--fill-${d}-${g})`:"transparent"),[l,t,u,d,g]),C=b.useMemo(()=>{if(c)return c;if(g==="primary"){if(d==="neutral")return"var(--text-secondary)";if(l==="filled")return"var(--text-inverse)"}return`var(--text-${d}, #111)`},[l,t,c,d,g]),P=b.useMemo(()=>f||(l==="outline"?`var(--border-${d}-${g})`:"transparent"),[l,f,d,g]),V=b.useMemo(()=>{switch(x){case"lg":return Ce.lg;case"md":case"sm":return Ce.md;case"xs":return Ce.sm}},[x]),F=W(cd,fd(l,d,g,t),hd[l],i,t?o:void 0,K({borderRadius:y?Ce[y]:V,backgroundColor:_,borderColor:P,color:C,width:"100%",height:ud[x],opacity:t?.7:1})),at=b.useMemo(()=>{switch(x){case"lg":case"md":return"body-1";case"sm":case"xs":return"body-2";default:return"body-1"}},[x]);return w.jsx(R,{className:W(s),w:T,relative:!0,overflow:"hidden",children:w.jsxs($o.button,{whileTap:!t&&!e?{scale:.99,boxShadow:"inset 0 0 0 10000px rgba(0,0,0,0.1)",transition:{duration:0}}:{},className:F,disabled:t||e,onClick:n,...S,children:[e?w.jsx(ld,{color:C}):w.jsxs(w.Fragment,{children:[p,w.jsx(Wo,{children:a,color:C,variant:at,className:r,textOverflow:"ellipsis",overflow:"hidden"}),v]}),w.jsx(bs,{})]})})},md=t=>D.createElement("svg",{viewBox:"0 0 24 24",fill:"none",...t},D.createElement("path",{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z",fill:"currentColor"})),pd=t=>D.createElement("svg",{viewBox:"0 0 24 24",fill:"none",...t},D.createElement("path",{d:"M19 13H5v-2h14v2z",fill:"currentColor"})),gd="_checkbox_1hy9q_8",yd="_disabled_1hy9q_15",vd="_checkbox__input_1hy9q_27",xd="_checkbox__box_1hy9q_35",wt={checkbox:gd,disabled:yd,checkbox__input:vd,checkbox__box:xd,"checkbox__box--checked":"_checkbox__box--checked_1hy9q_51"},bd={sm:20,md:24},Ho=b.forwardRef(({checked:t,onChange:e,disabled:n,indeterminate:s,size:i="md",title:o,titleColor:r,subtitle:a,subtitleColor:l="secondary",name:u,value:c,required:h},f)=>{const[d,y]=b.useState(!1),m=t!==void 0,x=m?t:d,p=S=>{m||y(S.target.checked),e?.(S)},v=bd[i],g=x||s;return w.jsxs("label",{className:W(wt.checkbox,{[wt.disabled]:n}),children:[w.jsxs(R,{relative:!0,display:"inline-flex",style:{"--checkbox-size":`${v}px`,"--checkbox-size-double":`${v*2}px`},children:[w.jsx("input",{ref:f,type:"checkbox",checked:x,onChange:p,onClick:S=>S.stopPropagation(),disabled:n,name:u,value:c,required:h,className:W(wt.checkbox__input,{[wt.disabled]:n})}),w.jsx("div",{className:W(wt.checkbox__box,g&&wt["checkbox__box--checked"],{[wt.disabled]:n}),children:g&&(s?w.jsx(pd,{width:v*.75,height:v*.75}):w.jsx(md,{width:v*.75,height:v*.75}))})]}),(o||a)&&w.jsxs(R,{gap:4,children:[o&&w.jsx(Y,{colorName:r,variant:i==="sm"?"body-2":"body-1",children:o}),a&&w.jsx(Y,{variant:"body-2",colorName:l,children:a})]})]})});Ho.displayName="Checkbox";const wd=t=>D.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},D.createElement("g",{opacity:.5},D.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.0002 17.9999C14.4185 17.9999 18.0002 14.4182 18.0002 9.99991C18.0002 5.58163 14.4185 1.99991 10.0002 1.99991C5.58197 1.99991 2.00024 5.58163 2.00024 9.99991C2.00024 14.4182 5.58197 17.9999 10.0002 17.9999ZM6.46514 6.46446C6.85566 6.07393 7.48883 6.07393 7.87935 6.46446L9.64712 8.23222C9.84238 8.42749 10.159 8.42749 10.3542 8.23222L12.122 6.46446C12.5125 6.07393 13.1457 6.07393 13.5362 6.46446C13.9267 6.85498 13.9267 7.48814 13.5362 7.87867L11.7684 9.64644C11.5732 9.8417 11.5732 10.1583 11.7684 10.3535L13.5362 12.1213C13.9267 12.5118 13.9267 13.145 13.5362 13.5355C13.1457 13.926 12.5125 13.926 12.122 13.5355L10.3542 11.7678C10.159 11.5725 9.84238 11.5725 9.64712 11.7678L7.87935 13.5355C7.48883 13.926 6.85566 13.926 6.46514 13.5355C6.07462 13.145 6.07462 12.5118 6.46514 12.1213L8.23291 10.3535C8.42817 10.1583 8.42817 9.8417 8.23291 9.64644L6.46514 7.87867C6.07462 7.48815 6.07462 6.85498 6.46514 6.46446Z",fill:"currentColor"}))),Td="_disabled_z2lr1_20",Sd="_input_z2lr1_8",Cd="_sm_z2lr1_61",Pd="_md_z2lr1_66",_d="_error_z2lr1_70",Md="_white_z2lr1_74",Ad="_gray_z2lr1_78",it={"input-container":"_input-container_z2lr1_8",disabled:Td,input:Sd,"input-text-size_sm":"_input-text-size_sm_z2lr1_52","input-text-size_md":"_input-text-size_md_z2lr1_56",sm:Cd,md:Pd,error:_d,white:Md,gray:Ad,"clear-button":"_clear-button_z2lr1_82"};function Ki(t){return{...new Event("input",{bubbles:!0}),target:t,currentTarget:t}}const Yo=b.forwardRef((t,e)=>{const{label:n,prompt:s,error:i,errorText:o,size:r="md",prefix:a,suffix:l,background:u="white",showClearButton:c,disabled:h,value:f,defaultValue:d,...y}=t,m=t.multiline===!0,x=b.useRef(null),p=b.useRef(null),[v,g]=Uo(f!==void 0?String(f):void 0,d!==void 0?String(d):"");b.useImperativeHandle(e,()=>({focus:()=>{x.current?.focus(),p.current?.focus()},blur:()=>{x.current?.blur(),p.current?.blur()},get value(){return x.current?.value||p.current?.value}}));const S=C=>{if(g(C.target.value),m){const P=t.onChange;P?.(C)}else{const P=t.onChange;P?.(C)}};b.useEffect(()=>{m&&t.autoResize&&p.current&&(p.current.style.height="auto",p.current.style.height=`${p.current.scrollHeight}px`)},[v,m,t.autoResize]);const T=()=>{if(g(""),!m){const P=x.current;if(P){P.value="";const V=Ki(P),F=t.onChange;F?.(V)}return}const C=p.current;if(C){C.value="";const P=Ki(C),V=t.onChange;V?.(P)}},_=()=>{if(m){const{rows:F,autoResize:at,onChange:Ht,multiline:Yt,...At}=y;return w.jsx("textarea",{ref:p,rows:t.rows??3,className:W(it.input,{[it.disabled]:h}),disabled:h,maxLength:t.maxLength,...At,value:v,onChange:S})}const{onChange:C,multiline:P,...V}=y;return w.jsx("input",{...V,ref:x,className:W(it.input,it[`input-text-size_${r}`],{[it.disabled]:h}),disabled:h,type:t.type??"text",value:v,onChange:S})};return w.jsxs(R,{w:"full",gap:"var(--spacing-sm)",children:[n&&w.jsx(Y,{variant:"body-2",fontWeight:"regular",colorName:i?"negative":"tertiary",children:n}),w.jsxs(R,{row:!0,alignItems:"center",w:"full",gap:"var(--spacing-md)",className:W(it["input-container"],it[u],it[r],{[it.error]:i,[it.disabled]:h}),children:[a&&w.jsx(R,{flex:"none",children:a}),w.jsx(R,{flex:"1",children:_()}),c&&v&&!h&&w.jsx(R,{flex:"none",children:w.jsx("span",{className:it["clear-button"],onClick:T,children:w.jsx(wd,{})})}),l&&w.jsx(R,{flex:"none",children:l})]}),(s||m)&&w.jsxs(R,{row:!0,gap:10,w:"full",children:[typeof s=="string"?w.jsx(Y,{variant:"caption-1",colorName:"tertiary",children:s}):s,m&&t.maxLength&&w.jsx(Y,{right:!0,ml:"auto",flex:"none",variant:"caption-1",colorName:"tertiary",children:`${v.length}/${t.maxLength}`})]}),o&&i&&w.jsx(Y,{variant:"body-2",colorName:"negative",fontWeight:"regular",children:o})]})});Yo.displayName="Input";const Ed="_header_446to_8",Vd={header:Ed},Xo=b.forwardRef(({title:t,subtitle:e,onClose:n,w:s="full",p:i,py:o,px:r="var(--spacing-2xl)",pt:a="var(--spacing-2xl)",pb:l="var(--spacing-lg)",row:u=!0,justifyContent:c="space-between",showCloseButton:h=!0},f)=>w.jsxs(R,{w:s,p:i,py:o,px:r,pt:a,pb:l,row:u,justifyContent:c,ref:f,className:Vd.header,children:[w.jsxs(R,{children:[w.jsx(Y,{variant:"title-3",colorName:"primary",fontWeight:"semibold",children:t}),w.jsx(Y,{variant:"body-1",colorName:"tertiary",fontWeight:"medium",children:e})]}),h&&w.jsx(R,{children:w.jsx(ws,{onClick:n,color:"neutral",children:w.jsx(Ko,{})})})]}));Xo.displayName="ModalHeader";const Rd="_footer_1bo08_8",Dd={footer:Rd},qo=b.forwardRef(({children:t,row:e=!0,flex:n=!0,gap:s="var(--spacing-lg)",p:i="var(--spacing-2xl)",className:o,...r},a)=>w.jsx(R,{flex:n,row:e,gap:s,p:i,className:W(Dd.footer,o),ref:a,...r,children:t}));qo.displayName="ModalFooter";function Vt(t,e,n){let s=n.initialDeps??[],i;function o(){var r,a,l,u;let c;n.key&&((r=n.debug)!=null&&r.call(n))&&(c=Date.now());const h=t();if(!(h.length!==s.length||h.some((y,m)=>s[m]!==y)))return i;s=h;let d;if(n.key&&((a=n.debug)!=null&&a.call(n))&&(d=Date.now()),i=e(...h),n.key&&((l=n.debug)!=null&&l.call(n))){const y=Math.round((Date.now()-c)*100)/100,m=Math.round((Date.now()-d)*100)/100,x=m/16,p=(v,g)=>{for(v=String(v);v.length<g;)v=" "+v;return v};console.info(`%c⏱ ${p(m,5)} /${p(y,5)} ms`,`
|
|
6
6
|
font-size: .6rem;
|
|
7
7
|
font-weight: bold;
|
|
8
|
-
color: hsl(${Math.max(0,Math.min(120-120*x,120))}deg 100% 31%);`,n?.key)}return(u=n?.onChange)==null||u.call(n,i),i}return o.updateDeps=r=>{s=r},o}function ji(t,e){if(t===void 0)throw new Error("Unexpected undefined");return t}const sd=(t,e)=>Math.abs(t-e)<1.01,id=(t,e,n)=>{let s;return function(...i){t.clearTimeout(s),s=t.setTimeout(()=>e.apply(this,i),n)}},Fi=t=>{const{offsetWidth:e,offsetHeight:n}=t;return{width:e,height:n}},rd=t=>t,od=t=>{const e=Math.max(t.startIndex-t.overscan,0),n=Math.min(t.endIndex+t.overscan,t.count-1),s=[];for(let i=e;i<=n;i++)s.push(i);return s},ad=(t,e)=>{const n=t.scrollElement;if(!n)return;const s=t.targetWindow;if(!s)return;const i=r=>{const{width:a,height:l}=r;e({width:Math.round(a),height:Math.round(l)})};if(i(Fi(n)),!s.ResizeObserver)return()=>{};const o=new s.ResizeObserver(r=>{const a=()=>{const l=r[0];if(l?.borderBoxSize){const u=l.borderBoxSize[0];if(u){i({width:u.inlineSize,height:u.blockSize});return}}i(Fi(n))};t.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(a):a()});return o.observe(n,{box:"border-box"}),()=>{o.unobserve(n)}},Bi={passive:!0},Ni=typeof window>"u"?!0:"onscrollend"in window,ld=(t,e)=>{const n=t.scrollElement;if(!n)return;const s=t.targetWindow;if(!s)return;let i=0;const o=t.options.useScrollendEvent&&Ni?()=>{}:id(s,()=>{e(i,!1)},t.options.isScrollingResetDelay),r=c=>()=>{const{horizontal:h,isRtl:f}=t.options;i=h?n.scrollLeft*(f&&-1||1):n.scrollTop,o(),e(i,c)},a=r(!0),l=r(!1);l(),n.addEventListener("scroll",a,Bi);const u=t.options.useScrollendEvent&&Ni;return u&&n.addEventListener("scrollend",l,Bi),()=>{n.removeEventListener("scroll",a),u&&n.removeEventListener("scrollend",l)}},cd=(t,e,n)=>{if(e?.borderBoxSize){const s=e.borderBoxSize[0];if(s)return Math.round(s[n.options.horizontal?"inlineSize":"blockSize"])}return t[n.options.horizontal?"offsetWidth":"offsetHeight"]},ud=(t,{adjustments:e=0,behavior:n},s)=>{var i,o;const r=t+e;(o=(i=s.scrollElement)==null?void 0:i.scrollTo)==null||o.call(i,{[s.options.horizontal?"left":"top"]:r,behavior:n})};class hd{constructor(e){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.measurementsCache=[],this.itemSizeCache=new Map,this.pendingMeasuredCacheIndexes=[],this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let n=null;const s=()=>n||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:n=new this.targetWindow.ResizeObserver(i=>{i.forEach(o=>{const r=()=>{this._measureElement(o.target,o)};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(r):r()})}));return{disconnect:()=>{var i;(i=s())==null||i.disconnect(),n=null},observe:i=>{var o;return(o=s())==null?void 0:o.observe(i,{box:"border-box"})},unobserve:i=>{var o;return(o=s())==null?void 0:o.unobserve(i)}}})(),this.range=null,this.setOptions=n=>{Object.entries(n).forEach(([s,i])=>{typeof i>"u"&&delete n[s]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:rd,rangeExtractor:od,onChange:()=>{},measureElement:cd,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,...n}},this.notify=n=>{var s,i;(i=(s=this.options).onChange)==null||i.call(s,this,n)},this.maybeNotify=Mt(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),n=>{this.notify(n)},{key:process.env.NODE_ENV!=="production"&&"maybeNotify",debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(n=>n()),this.unsubs=[],this.observer.disconnect(),this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var n;const s=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==s){if(this.cleanup(),!s){this.maybeNotify();return}this.scrollElement=s,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((n=this.scrollElement)==null?void 0:n.window)??null,this.elementsCache.forEach(i=>{this.observer.observe(i)}),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,i=>{this.scrollRect=i,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(i,o)=>{this.scrollAdjustments=0,this.scrollDirection=o?this.getScrollOffset()<i?"forward":"backward":null,this.scrollOffset=i,this.isScrolling=o,this.maybeNotify()}))}},this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(n,s)=>{const i=new Map,o=new Map;for(let r=s-1;r>=0;r--){const a=n[r];if(i.has(a.lane))continue;const l=o.get(a.lane);if(l==null||a.end>l.end?o.set(a.lane,a):a.end<l.end&&i.set(a.lane,!0),i.size===this.options.lanes)break}return o.size===this.options.lanes?Array.from(o.values()).sort((r,a)=>r.end===a.end?r.index-a.index:r.end-a.end)[0]:void 0},this.getMeasurementOptions=Mt(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled],(n,s,i,o,r)=>(this.pendingMeasuredCacheIndexes=[],{count:n,paddingStart:s,scrollMargin:i,getItemKey:o,enabled:r}),{key:!1}),this.getMeasurements=Mt(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:n,paddingStart:s,scrollMargin:i,getItemKey:o,enabled:r},a)=>{if(!r)return this.measurementsCache=[],this.itemSizeCache.clear(),[];this.measurementsCache.length===0&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(c=>{this.itemSizeCache.set(c.key,c.size)}));const l=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];const u=this.measurementsCache.slice(0,l);for(let c=l;c<n;c++){const h=o(c),f=this.options.lanes===1?u[c-1]:this.getFurthestMeasurement(u,c),d=f?f.end+this.options.gap:s+i,m=a.get(h),g=typeof m=="number"?m:this.options.estimateSize(c),x=d+g,p=f?f.lane:c%this.options.lanes;u[c]={index:c,start:d,size:g,end:x,key:h,lane:p}}return this.measurementsCache=u,u},{key:process.env.NODE_ENV!=="production"&&"getMeasurements",debug:()=>this.options.debug}),this.calculateRange=Mt(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(n,s,i,o)=>this.range=n.length>0&&s>0?fd({measurements:n,outerSize:s,scrollOffset:i,lanes:o}):null,{key:process.env.NODE_ENV!=="production"&&"calculateRange",debug:()=>this.options.debug}),this.getVirtualIndexes=Mt(()=>{let n=null,s=null;const i=this.calculateRange();return i&&(n=i.startIndex,s=i.endIndex),this.maybeNotify.updateDeps([this.isScrolling,n,s]),[this.options.rangeExtractor,this.options.overscan,this.options.count,n,s]},(n,s,i,o,r)=>o===null||r===null?[]:n({startIndex:o,endIndex:r,overscan:s,count:i}),{key:process.env.NODE_ENV!=="production"&&"getVirtualIndexes",debug:()=>this.options.debug}),this.indexFromElement=n=>{const s=this.options.indexAttribute,i=n.getAttribute(s);return i?parseInt(i,10):(console.warn(`Missing attribute name '${s}={index}' on measured element.`),-1)},this._measureElement=(n,s)=>{const i=this.indexFromElement(n),o=this.measurementsCache[i];if(!o)return;const r=o.key,a=this.elementsCache.get(r);a!==n&&(a&&this.observer.unobserve(a),this.observer.observe(n),this.elementsCache.set(r,n)),n.isConnected&&this.resizeItem(i,this.options.measureElement(n,s,this))},this.resizeItem=(n,s)=>{const i=this.measurementsCache[n];if(!i)return;const o=this.itemSizeCache.get(i.key)??i.size,r=s-o;r!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(i,r,this):i.start<this.getScrollOffset()+this.scrollAdjustments)&&(process.env.NODE_ENV!=="production"&&this.options.debug&&console.info("correction",r),this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=r,behavior:void 0})),this.pendingMeasuredCacheIndexes.push(i.index),this.itemSizeCache=new Map(this.itemSizeCache.set(i.key,s)),this.notify(!1))},this.measureElement=n=>{if(!n){this.elementsCache.forEach((s,i)=>{s.isConnected||(this.observer.unobserve(s),this.elementsCache.delete(i))});return}this._measureElement(n,void 0)},this.getVirtualItems=Mt(()=>[this.getVirtualIndexes(),this.getMeasurements()],(n,s)=>{const i=[];for(let o=0,r=n.length;o<r;o++){const a=n[o],l=s[a];i.push(l)}return i},{key:process.env.NODE_ENV!=="production"&&"getVirtualItems",debug:()=>this.options.debug}),this.getVirtualItemForOffset=n=>{const s=this.getMeasurements();if(s.length!==0)return ji(s[Fo(0,s.length-1,i=>ji(s[i]).start,n)])},this.getOffsetForAlignment=(n,s,i=0)=>{const o=this.getSize(),r=this.getScrollOffset();s==="auto"&&(s=n>=r+o?"end":"start"),s==="center"?n+=(i-o)/2:s==="end"&&(n-=o);const a=this.getTotalSize()+this.options.scrollMargin-o;return Math.max(Math.min(a,n),0)},this.getOffsetForIndex=(n,s="auto")=>{n=Math.max(0,Math.min(n,this.options.count-1));const i=this.measurementsCache[n];if(!i)return;const o=this.getSize(),r=this.getScrollOffset();if(s==="auto")if(i.end>=r+o-this.options.scrollPaddingEnd)s="end";else if(i.start<=r+this.options.scrollPaddingStart)s="start";else return[r,s];const a=s==="end"?i.end+this.options.scrollPaddingEnd:i.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(a,s,i.size),s]},this.isDynamicMode=()=>this.elementsCache.size>0,this.scrollToOffset=(n,{align:s="start",behavior:i}={})=>{i==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(n,s),{adjustments:void 0,behavior:i})},this.scrollToIndex=(n,{align:s="auto",behavior:i}={})=>{i==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),n=Math.max(0,Math.min(n,this.options.count-1));let o=0;const r=10,a=u=>{if(!this.targetWindow)return;const c=this.getOffsetForIndex(n,u);if(!c){console.warn("Failed to get offset for index:",n);return}const[h,f]=c;this._scrollToOffset(h,{adjustments:void 0,behavior:i}),this.targetWindow.requestAnimationFrame(()=>{const d=this.getScrollOffset(),m=this.getOffsetForIndex(n,f);if(!m){console.warn("Failed to get offset for index:",n);return}sd(m[0],d)||l(f)})},l=u=>{this.targetWindow&&(o++,o<r?(process.env.NODE_ENV!=="production"&&this.options.debug&&console.info("Schedule retry",o,r),this.targetWindow.requestAnimationFrame(()=>a(u))):console.warn(`Failed to scroll to index ${n} after ${r} attempts.`))};a(s)},this.scrollBy=(n,{behavior:s}={})=>{s==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+n,{adjustments:void 0,behavior:s})},this.getTotalSize=()=>{var n;const s=this.getMeasurements();let i;if(s.length===0)i=this.options.paddingStart;else if(this.options.lanes===1)i=((n=s[s.length-1])==null?void 0:n.end)??0;else{const o=Array(this.options.lanes).fill(null);let r=s.length-1;for(;r>=0&&o.some(a=>a===null);){const a=s[r];o[a.lane]===null&&(o[a.lane]=a.end),r--}i=Math.max(...o.filter(a=>a!==null))}return Math.max(i-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(n,{adjustments:s,behavior:i})=>{this.options.scrollToFn(n,{behavior:i,adjustments:s},this)},this.measure=()=>{this.itemSizeCache=new Map,this.notify(!1)},this.setOptions(e)}}const Fo=(t,e,n,s)=>{for(;t<=e;){const i=(t+e)/2|0,o=n(i);if(o<s)t=i+1;else if(o>s)e=i-1;else return i}return t>0?t-1:0};function fd({measurements:t,outerSize:e,scrollOffset:n,lanes:s}){const i=t.length-1,o=l=>t[l].start;if(t.length<=s)return{startIndex:0,endIndex:i};let r=Fo(0,i,o,n),a=r;if(s===1)for(;a<i&&t[a].end<n+e;)a++;else if(s>1){const l=Array(s).fill(0);for(;a<i&&l.some(c=>c<n+e);){const c=t[a];l[c.lane]=c.end,a++}const u=Array(s).fill(n+e);for(;r>=0&&u.some(c=>c>=n);){const c=t[r];u[c.lane]=c.start,r--}r=Math.max(0,r-r%s),a=Math.min(i,a+(s-1-a%s))}return{startIndex:r,endIndex:a}}const $i=typeof document<"u"?I.useLayoutEffect:I.useEffect;function dd(t){const e=I.useReducer(()=>({}),{})[1],n={...t,onChange:(i,o)=>{var r;o?zo.flushSync(e):e(),(r=t.onChange)==null||r.call(t,i,o)}},[s]=I.useState(()=>new hd(n));return s.setOptions(n),$i(()=>s._didMount(),[]),$i(()=>s._willUpdate()),s}function md(t){return dd({observeElementRect:ad,observeElementOffset:ld,scrollToFn:ud,...t})}const pd="_main_bvmxs_8",zi={main:pd},Bo=b.forwardRef(({children:t,className:e,row:n=!1,estimatedItemHeight:s=100,virtualize:i=!1},o)=>{const r=b.useRef(null),a=b.useMemo(()=>b.Children.toArray(t),[t]),l=md({count:a.length,getScrollElement:()=>r.current,estimateSize:()=>s,measureElement:c=>c.getBoundingClientRect().height});return b.useImperativeHandle(o,()=>({scrollToTop:()=>l.scrollToOffset(0,{behavior:"smooth"}),scrollToBottom:()=>l.scrollToOffset(l.getTotalSize(),{behavior:"smooth"}),scrollToIndex:(c,h={})=>l.scrollToIndex(c,{behavior:"smooth",...h}),scrollToOffset:(c,h={})=>l.scrollToOffset(c,{behavior:"smooth",...h}),scrollBy:c=>{const h=l.scrollOffset||0;l.scrollToOffset(h+c,{behavior:"smooth"})},getElement:()=>r.current,getScrollOffset:()=>l.scrollOffset||0,getTotalSize:()=>l.getTotalSize()}),[l]),b.useMemo(()=>i||a.length>50,[i,a])&&a.length>0?A.jsx(K,{ref:r,className:at(zi.main,e),w:"full",row:n,p:"var(--spacing-2xl)",children:A.jsx(K,{style:{height:`${l.getTotalSize()}px`,position:"relative"},children:l.getVirtualItems().map(c=>A.jsx(K,{"data-index":c.index,ref:l.measureElement,style:{position:"absolute",top:0,left:0,width:"100%",transform:`translateY(${c.start}px)`},children:a[c.index]},c.key))})}):A.jsx(K,{ref:r,className:at(zi.main,e),w:"full",row:n,pl:"var(--spacing-2xl)",pr:"var(--spacing-xs)",children:A.jsx(K,{py:"var(--spacing-2xl)",pr:"var(--spacing-xl)",children:t})})});Bo.displayName="ModalMain";const Fe=Lo;Fe.Header=Io;Fe.Main=Bo;Fe.Footer=jo;const gd="_avatar_1oe2p_8",yd="_avatar_primary_1oe2p_22",vd="_avatar_secondary_1oe2p_25",xd="_avatar_negative_1oe2p_28",bd="_avatar_positive_1oe2p_31",wd="_avatar_warning_1oe2p_34",Td="_avatar_lgSize_1oe2p_71",Sd="_avatar_mdSize_1oe2p_85",Pd="_avatar_smSize_1oe2p_99",rn={avatar:gd,avatar_primary:yd,avatar_secondary:vd,avatar_negative:xd,avatar_positive:bd,avatar_warning:wd,avatar_lgSize:Td,avatar_mdSize:Sd,avatar_smSize:Pd};function Cd({attr:t,children:e,className:n,color:s="primary",size:i="md",...o}){const r="avatar";return A.jsx("div",{...t,...o,className:wt(rn[r],n,oe(rn,r,i),je(rn,r,s)),children:e})}const Ad=t=>I.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},I.createElement("circle",{cx:12,cy:12,r:10,fill:"currentColor",fillOpacity:.15}),I.createElement("path",{d:"M16 9L10.0337 15L8 12.9548",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),Wi=t=>I.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},I.createElement("path",{d:"M22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12Z",fill:"currentColor",fillOpacity:.15}),I.createElement("path",{d:"M12 6C11.4477 6 11 6.44772 11 7V13C11 13.5523 11.4477 14 12 14C12.5523 14 13 13.5523 13 13V7C13 6.44772 12.5523 6 12 6Z",fill:"currentColor"}),I.createElement("path",{d:"M12 15C11.4477 15 11 15.4477 11 16V17C11 17.5523 11.4477 18 12 18C12.5523 18 13 17.5523 13 17V16C13 15.4477 12.5523 15 12 15Z",fill:"currentColor"})),Md=t=>I.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},I.createElement("circle",{cx:12,cy:12,r:10,fill:"currentColor",fillOpacity:.12}),I.createElement("path",{d:"M16 8L8 16M16 16L8 8",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round"})),Vd=t=>I.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"black",...t},I.createElement("path",{d:"M12 2V22M19.0711 4.92893L4.92893 19.0711M22 12H2M19.0711 19.0711L4.92893 4.92893",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),Ed="_hint_prca1_8",_d="_md_prca1_19",Dd="_sm_prca1_24",Rd="_icon_prca1_29",kd="_content_prca1_40",Od="_title_prca1_46",Ld="_subtitle_prca1_50",Id="_disabled_prca1_55",jd="_warning_prca1_60",Fd="_solid_prca1_60",Bd="_negative_prca1_65",Nd="_positive_prca1_70",$d="_accent_prca1_75",zd="_neutral_prca1_80",Wd="_soft_prca1_85",J={hint:Ed,md:_d,sm:Dd,icon:Rd,content:kd,title:Od,subtitle:Ld,disabled:Id,warning:jd,solid:Fd,negative:Bd,positive:Nd,accent:$d,neutral:zd,soft:Wd},Ud={negative:A.jsx(Md,{}),positive:A.jsx(Ad,{}),accent:A.jsx(Wi,{}),warning:A.jsx(Wi,{}),neutral:A.jsx(Vd,{})},Kd=({title:t,subtitle:e,color:n="warning",variant:s="soft",size:i="md",icon:o,disabled:r=!1,className:a,style:l})=>{const u=o||Ud[n];return A.jsxs("div",{className:wt(J.hint,J[n],J[s],J[i],r&&J.disabled,a),style:l,"aria-disabled":r,children:[u&&A.jsx("span",{className:wt(J.icon,J[n]),children:u}),A.jsxs("div",{className:J.content,children:[t&&A.jsx(Pt,{className:wt(J.title,oe(J,"title",i)),variant:i==="md"?"body-1":"caption-2",children:t}),e&&A.jsx(Pt,{className:wt(J.subtitle,oe(J,"subtitle",i)),variant:i==="md"?"body-2":"caption-1",children:e})]})]})},Gd="_themeProviderScoped_shykx_9",Hd={themeProviderScoped:Gd};function Yd({className:t,children:e,theme:n}){return A.jsx("div",{className:wt(Hd.themeProviderScoped,t),"data-theme":n,children:e})}exports.AnimatedText=ko;exports.Avatar=Cd;exports.Box=K;exports.Button=Jf;exports.Hint=Kd;exports.IconButton=hs;exports.Modal=Fe;exports.Text=Pt;exports.ThemeProviderScoped=Yd;exports.getSizeClass=oe;exports.getStyleClass=je;
|
|
8
|
+
color: hsl(${Math.max(0,Math.min(120-120*x,120))}deg 100% 31%);`,n?.key)}return(u=n?.onChange)==null||u.call(n,i),i}return o.updateDeps=r=>{s=r},o}function Gi(t,e){if(t===void 0)throw new Error("Unexpected undefined");return t}const kd=(t,e)=>Math.abs(t-e)<1.01,Ld=(t,e,n)=>{let s;return function(...i){t.clearTimeout(s),s=t.setTimeout(()=>e.apply(this,i),n)}},Hi=t=>{const{offsetWidth:e,offsetHeight:n}=t;return{width:e,height:n}},Od=t=>t,jd=t=>{const e=Math.max(t.startIndex-t.overscan,0),n=Math.min(t.endIndex+t.overscan,t.count-1),s=[];for(let i=e;i<=n;i++)s.push(i);return s},Id=(t,e)=>{const n=t.scrollElement;if(!n)return;const s=t.targetWindow;if(!s)return;const i=r=>{const{width:a,height:l}=r;e({width:Math.round(a),height:Math.round(l)})};if(i(Hi(n)),!s.ResizeObserver)return()=>{};const o=new s.ResizeObserver(r=>{const a=()=>{const l=r[0];if(l?.borderBoxSize){const u=l.borderBoxSize[0];if(u){i({width:u.inlineSize,height:u.blockSize});return}}i(Hi(n))};t.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(a):a()});return o.observe(n,{box:"border-box"}),()=>{o.unobserve(n)}},Yi={passive:!0},Xi=typeof window>"u"?!0:"onscrollend"in window,Bd=(t,e)=>{const n=t.scrollElement;if(!n)return;const s=t.targetWindow;if(!s)return;let i=0;const o=t.options.useScrollendEvent&&Xi?()=>{}:Ld(s,()=>{e(i,!1)},t.options.isScrollingResetDelay),r=c=>()=>{const{horizontal:h,isRtl:f}=t.options;i=h?n.scrollLeft*(f&&-1||1):n.scrollTop,o(),e(i,c)},a=r(!0),l=r(!1);l(),n.addEventListener("scroll",a,Yi);const u=t.options.useScrollendEvent&Ξreturn u&&n.addEventListener("scrollend",l,Yi),()=>{n.removeEventListener("scroll",a),u&&n.removeEventListener("scrollend",l)}},Fd=(t,e,n)=>{if(e?.borderBoxSize){const s=e.borderBoxSize[0];if(s)return Math.round(s[n.options.horizontal?"inlineSize":"blockSize"])}return t[n.options.horizontal?"offsetWidth":"offsetHeight"]},Nd=(t,{adjustments:e=0,behavior:n},s)=>{var i,o;const r=t+e;(o=(i=s.scrollElement)==null?void 0:i.scrollTo)==null||o.call(i,{[s.options.horizontal?"left":"top"]:r,behavior:n})};class zd{constructor(e){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.measurementsCache=[],this.itemSizeCache=new Map,this.pendingMeasuredCacheIndexes=[],this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let n=null;const s=()=>n||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:n=new this.targetWindow.ResizeObserver(i=>{i.forEach(o=>{const r=()=>{this._measureElement(o.target,o)};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(r):r()})}));return{disconnect:()=>{var i;(i=s())==null||i.disconnect(),n=null},observe:i=>{var o;return(o=s())==null?void 0:o.observe(i,{box:"border-box"})},unobserve:i=>{var o;return(o=s())==null?void 0:o.unobserve(i)}}})(),this.range=null,this.setOptions=n=>{Object.entries(n).forEach(([s,i])=>{typeof i>"u"&&delete n[s]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:Od,rangeExtractor:jd,onChange:()=>{},measureElement:Fd,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,...n}},this.notify=n=>{var s,i;(i=(s=this.options).onChange)==null||i.call(s,this,n)},this.maybeNotify=Vt(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),n=>{this.notify(n)},{key:process.env.NODE_ENV!=="production"&&"maybeNotify",debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(n=>n()),this.unsubs=[],this.observer.disconnect(),this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var n;const s=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==s){if(this.cleanup(),!s){this.maybeNotify();return}this.scrollElement=s,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((n=this.scrollElement)==null?void 0:n.window)??null,this.elementsCache.forEach(i=>{this.observer.observe(i)}),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,i=>{this.scrollRect=i,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(i,o)=>{this.scrollAdjustments=0,this.scrollDirection=o?this.getScrollOffset()<i?"forward":"backward":null,this.scrollOffset=i,this.isScrolling=o,this.maybeNotify()}))}},this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(n,s)=>{const i=new Map,o=new Map;for(let r=s-1;r>=0;r--){const a=n[r];if(i.has(a.lane))continue;const l=o.get(a.lane);if(l==null||a.end>l.end?o.set(a.lane,a):a.end<l.end&&i.set(a.lane,!0),i.size===this.options.lanes)break}return o.size===this.options.lanes?Array.from(o.values()).sort((r,a)=>r.end===a.end?r.index-a.index:r.end-a.end)[0]:void 0},this.getMeasurementOptions=Vt(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled],(n,s,i,o,r)=>(this.pendingMeasuredCacheIndexes=[],{count:n,paddingStart:s,scrollMargin:i,getItemKey:o,enabled:r}),{key:!1}),this.getMeasurements=Vt(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:n,paddingStart:s,scrollMargin:i,getItemKey:o,enabled:r},a)=>{if(!r)return this.measurementsCache=[],this.itemSizeCache.clear(),[];this.measurementsCache.length===0&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(c=>{this.itemSizeCache.set(c.key,c.size)}));const l=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];const u=this.measurementsCache.slice(0,l);for(let c=l;c<n;c++){const h=o(c),f=this.options.lanes===1?u[c-1]:this.getFurthestMeasurement(u,c),d=f?f.end+this.options.gap:s+i,y=a.get(h),m=typeof y=="number"?y:this.options.estimateSize(c),x=d+m,p=f?f.lane:c%this.options.lanes;u[c]={index:c,start:d,size:m,end:x,key:h,lane:p}}return this.measurementsCache=u,u},{key:process.env.NODE_ENV!=="production"&&"getMeasurements",debug:()=>this.options.debug}),this.calculateRange=Vt(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(n,s,i,o)=>this.range=n.length>0&&s>0?$d({measurements:n,outerSize:s,scrollOffset:i,lanes:o}):null,{key:process.env.NODE_ENV!=="production"&&"calculateRange",debug:()=>this.options.debug}),this.getVirtualIndexes=Vt(()=>{let n=null,s=null;const i=this.calculateRange();return i&&(n=i.startIndex,s=i.endIndex),this.maybeNotify.updateDeps([this.isScrolling,n,s]),[this.options.rangeExtractor,this.options.overscan,this.options.count,n,s]},(n,s,i,o,r)=>o===null||r===null?[]:n({startIndex:o,endIndex:r,overscan:s,count:i}),{key:process.env.NODE_ENV!=="production"&&"getVirtualIndexes",debug:()=>this.options.debug}),this.indexFromElement=n=>{const s=this.options.indexAttribute,i=n.getAttribute(s);return i?parseInt(i,10):(console.warn(`Missing attribute name '${s}={index}' on measured element.`),-1)},this._measureElement=(n,s)=>{const i=this.indexFromElement(n),o=this.measurementsCache[i];if(!o)return;const r=o.key,a=this.elementsCache.get(r);a!==n&&(a&&this.observer.unobserve(a),this.observer.observe(n),this.elementsCache.set(r,n)),n.isConnected&&this.resizeItem(i,this.options.measureElement(n,s,this))},this.resizeItem=(n,s)=>{const i=this.measurementsCache[n];if(!i)return;const o=this.itemSizeCache.get(i.key)??i.size,r=s-o;r!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(i,r,this):i.start<this.getScrollOffset()+this.scrollAdjustments)&&(process.env.NODE_ENV!=="production"&&this.options.debug&&console.info("correction",r),this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=r,behavior:void 0})),this.pendingMeasuredCacheIndexes.push(i.index),this.itemSizeCache=new Map(this.itemSizeCache.set(i.key,s)),this.notify(!1))},this.measureElement=n=>{if(!n){this.elementsCache.forEach((s,i)=>{s.isConnected||(this.observer.unobserve(s),this.elementsCache.delete(i))});return}this._measureElement(n,void 0)},this.getVirtualItems=Vt(()=>[this.getVirtualIndexes(),this.getMeasurements()],(n,s)=>{const i=[];for(let o=0,r=n.length;o<r;o++){const a=n[o],l=s[a];i.push(l)}return i},{key:process.env.NODE_ENV!=="production"&&"getVirtualItems",debug:()=>this.options.debug}),this.getVirtualItemForOffset=n=>{const s=this.getMeasurements();if(s.length!==0)return Gi(s[Zo(0,s.length-1,i=>Gi(s[i]).start,n)])},this.getOffsetForAlignment=(n,s,i=0)=>{const o=this.getSize(),r=this.getScrollOffset();s==="auto"&&(s=n>=r+o?"end":"start"),s==="center"?n+=(i-o)/2:s==="end"&&(n-=o);const a=this.getTotalSize()+this.options.scrollMargin-o;return Math.max(Math.min(a,n),0)},this.getOffsetForIndex=(n,s="auto")=>{n=Math.max(0,Math.min(n,this.options.count-1));const i=this.measurementsCache[n];if(!i)return;const o=this.getSize(),r=this.getScrollOffset();if(s==="auto")if(i.end>=r+o-this.options.scrollPaddingEnd)s="end";else if(i.start<=r+this.options.scrollPaddingStart)s="start";else return[r,s];const a=s==="end"?i.end+this.options.scrollPaddingEnd:i.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(a,s,i.size),s]},this.isDynamicMode=()=>this.elementsCache.size>0,this.scrollToOffset=(n,{align:s="start",behavior:i}={})=>{i==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(n,s),{adjustments:void 0,behavior:i})},this.scrollToIndex=(n,{align:s="auto",behavior:i}={})=>{i==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),n=Math.max(0,Math.min(n,this.options.count-1));let o=0;const r=10,a=u=>{if(!this.targetWindow)return;const c=this.getOffsetForIndex(n,u);if(!c){console.warn("Failed to get offset for index:",n);return}const[h,f]=c;this._scrollToOffset(h,{adjustments:void 0,behavior:i}),this.targetWindow.requestAnimationFrame(()=>{const d=this.getScrollOffset(),y=this.getOffsetForIndex(n,f);if(!y){console.warn("Failed to get offset for index:",n);return}kd(y[0],d)||l(f)})},l=u=>{this.targetWindow&&(o++,o<r?(process.env.NODE_ENV!=="production"&&this.options.debug&&console.info("Schedule retry",o,r),this.targetWindow.requestAnimationFrame(()=>a(u))):console.warn(`Failed to scroll to index ${n} after ${r} attempts.`))};a(s)},this.scrollBy=(n,{behavior:s}={})=>{s==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+n,{adjustments:void 0,behavior:s})},this.getTotalSize=()=>{var n;const s=this.getMeasurements();let i;if(s.length===0)i=this.options.paddingStart;else if(this.options.lanes===1)i=((n=s[s.length-1])==null?void 0:n.end)??0;else{const o=Array(this.options.lanes).fill(null);let r=s.length-1;for(;r>=0&&o.some(a=>a===null);){const a=s[r];o[a.lane]===null&&(o[a.lane]=a.end),r--}i=Math.max(...o.filter(a=>a!==null))}return Math.max(i-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(n,{adjustments:s,behavior:i})=>{this.options.scrollToFn(n,{behavior:i,adjustments:s},this)},this.measure=()=>{this.itemSizeCache=new Map,this.notify(!1)},this.setOptions(e)}}const Zo=(t,e,n,s)=>{for(;t<=e;){const i=(t+e)/2|0,o=n(i);if(o<s)t=i+1;else if(o>s)e=i-1;else return i}return t>0?t-1:0};function $d({measurements:t,outerSize:e,scrollOffset:n,lanes:s}){const i=t.length-1,o=l=>t[l].start;if(t.length<=s)return{startIndex:0,endIndex:i};let r=Zo(0,i,o,n),a=r;if(s===1)for(;a<i&&t[a].end<n+e;)a++;else if(s>1){const l=Array(s).fill(0);for(;a<i&&l.some(c=>c<n+e);){const c=t[a];l[c.lane]=c.end,a++}const u=Array(s).fill(n+e);for(;r>=0&&u.some(c=>c>=n);){const c=t[r];u[c.lane]=c.start,r--}r=Math.max(0,r-r%s),a=Math.min(i,a+(s-1-a%s))}return{startIndex:r,endIndex:a}}const qi=typeof document<"u"?D.useLayoutEffect:D.useEffect;function Wd(t){const e=D.useReducer(()=>({}),{})[1],n={...t,onChange:(i,o)=>{var r;o?Qi.flushSync(e):e(),(r=t.onChange)==null||r.call(t,i,o)}},[s]=D.useState(()=>new zd(n));return s.setOptions(n),qi(()=>s._didMount(),[]),qi(()=>s._willUpdate()),s}function Ud(t){return Wd({observeElementRect:Id,observeElementOffset:Bd,scrollToFn:Nd,...t})}const Kd="_main_bvmxs_8",Zi={main:Kd},Jo=b.forwardRef(({children:t,className:e,row:n=!1,estimatedItemHeight:s=100,virtualize:i=!1},o)=>{const r=b.useRef(null),a=b.useMemo(()=>b.Children.toArray(t),[t]),l=Ud({count:a.length,getScrollElement:()=>r.current,estimateSize:()=>s,measureElement:c=>c.getBoundingClientRect().height});return b.useImperativeHandle(o,()=>({scrollToTop:()=>l.scrollToOffset(0,{behavior:"smooth"}),scrollToBottom:()=>l.scrollToOffset(l.getTotalSize(),{behavior:"smooth"}),scrollToIndex:(c,h={})=>l.scrollToIndex(c,{behavior:"smooth",...h}),scrollToOffset:(c,h={})=>l.scrollToOffset(c,{behavior:"smooth",...h}),scrollBy:c=>{const h=l.scrollOffset||0;l.scrollToOffset(h+c,{behavior:"smooth"})},getElement:()=>r.current,getScrollOffset:()=>l.scrollOffset||0,getTotalSize:()=>l.getTotalSize()}),[l]),b.useMemo(()=>i||a.length>50,[i,a])&&a.length>0?w.jsx(R,{ref:r,className:W(Zi.main,e),w:"full",row:n,p:"var(--spacing-2xl)",children:w.jsx(R,{style:{height:`${l.getTotalSize()}px`,position:"relative"},children:l.getVirtualItems().map(c=>w.jsx(R,{"data-index":c.index,ref:l.measureElement,style:{position:"absolute",top:0,left:0,width:"100%",transform:`translateY(${c.start}px)`},children:a[c.index]},c.key))})}):w.jsx(R,{ref:r,className:W(Zi.main,e),w:"full",row:n,pl:"var(--spacing-2xl)",pr:"var(--spacing-xs)",children:w.jsx(R,{py:"var(--spacing-2xl)",pr:"var(--spacing-xl)",children:t})})});Jo.displayName="ModalMain";const Ge=Go;Ge.Header=Xo;Ge.Main=Jo;Ge.Footer=qo;const Gd="_avatar_1oe2p_8",Hd="_avatar_primary_1oe2p_22",Yd="_avatar_secondary_1oe2p_25",Xd="_avatar_negative_1oe2p_28",qd="_avatar_positive_1oe2p_31",Zd="_avatar_warning_1oe2p_34",Jd="_avatar_lgSize_1oe2p_71",Qd="_avatar_mdSize_1oe2p_85",tm="_avatar_smSize_1oe2p_99",mn={avatar:Gd,avatar_primary:Hd,avatar_secondary:Yd,avatar_negative:Xd,avatar_positive:qd,avatar_warning:Zd,avatar_lgSize:Jd,avatar_mdSize:Qd,avatar_smSize:tm};function em({attr:t,children:e,className:n,color:s="primary",size:i="md",...o}){const r="avatar";return w.jsx("div",{...t,...o,className:Pt(mn[r],n,he(mn,r,i),Ke(mn,r,s)),children:e})}const nm=t=>D.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},D.createElement("circle",{cx:12,cy:12,r:10,fill:"currentColor",fillOpacity:.15}),D.createElement("path",{d:"M16 9L10.0337 15L8 12.9548",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),Ji=t=>D.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},D.createElement("path",{d:"M22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12Z",fill:"currentColor",fillOpacity:.15}),D.createElement("path",{d:"M12 6C11.4477 6 11 6.44772 11 7V13C11 13.5523 11.4477 14 12 14C12.5523 14 13 13.5523 13 13V7C13 6.44772 12.5523 6 12 6Z",fill:"currentColor"}),D.createElement("path",{d:"M12 15C11.4477 15 11 15.4477 11 16V17C11 17.5523 11.4477 18 12 18C12.5523 18 13 17.5523 13 17V16C13 15.4477 12.5523 15 12 15Z",fill:"currentColor"})),sm=t=>D.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},D.createElement("circle",{cx:12,cy:12,r:10,fill:"currentColor",fillOpacity:.12}),D.createElement("path",{d:"M16 8L8 16M16 16L8 8",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round"})),im=t=>D.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"black",...t},D.createElement("path",{d:"M12 2V22M19.0711 4.92893L4.92893 19.0711M22 12H2M19.0711 19.0711L4.92893 4.92893",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),rm="_hint_prca1_8",om="_md_prca1_19",am="_sm_prca1_24",lm="_icon_prca1_29",cm="_content_prca1_40",um="_title_prca1_46",hm="_subtitle_prca1_50",fm="_disabled_prca1_55",dm="_warning_prca1_60",mm="_solid_prca1_60",pm="_negative_prca1_65",gm="_positive_prca1_70",ym="_accent_prca1_75",vm="_neutral_prca1_80",xm="_soft_prca1_85",tt={hint:rm,md:om,sm:am,icon:lm,content:cm,title:um,subtitle:hm,disabled:fm,warning:dm,solid:mm,negative:pm,positive:gm,accent:ym,neutral:vm,soft:xm},bm={negative:w.jsx(sm,{}),positive:w.jsx(nm,{}),accent:w.jsx(Ji,{}),warning:w.jsx(Ji,{}),neutral:w.jsx(im,{})},wm=({title:t,subtitle:e,color:n="warning",variant:s="soft",size:i="md",icon:o,disabled:r=!1,className:a,style:l})=>{const u=o||bm[n];return w.jsxs("div",{className:Pt(tt.hint,tt[n],tt[s],tt[i],r&&tt.disabled,a),style:l,"aria-disabled":r,children:[u&&w.jsx("span",{className:Pt(tt.icon,tt[n]),children:u}),w.jsxs("div",{className:tt.content,children:[t&&w.jsx(Y,{className:Pt(tt.title,he(tt,"title",i)),variant:i==="md"?"body-1":"caption-2",children:t}),e&&w.jsx(Y,{className:Pt(tt.subtitle,he(tt,"subtitle",i)),variant:i==="md"?"body-2":"caption-1",children:e})]})]})},Tm={primary:{bg:"var(--status-neutral-tint-low)",color:"var(--text-primary)"},accent:{bg:"var(--status-accent-tint-low)",color:"var(--text-accent)"},warning:{bg:"var(--status-warning-tint-low)",color:"var(--text-warning)"},positive:{bg:"var(--status-positive-tint-low)",color:"var(--text-positive)"},negative:{bg:"var(--status-negative-tint-low)",color:"var(--text-negative)"}},Sm={sm:28,md:32,lg:40},Qo=b.forwardRef(({label:t,color:e="primary",size:n="md",onClick:s,onDelete:i,avatar:o,icon:r,disabled:a,className:l},u)=>{const c=b.useRef(null),h=Tm[e],f=K({cursor:a?"not-allowed":s?"pointer":"default",opacity:a?.5:1,userSelect:"none",position:"relative",transition:"background-color 0.2s, opacity 0.2s","&:hover":a?void 0:{backgroundColor:h.bg}}),d=K({cursor:"pointer",opacity:.6,"&:hover":{opacity:1}});return w.jsxs(R,{ref:y=>{c.current=y,typeof u=="function"?u(y):u&&(u.current=y)},row:!0,alignItems:"center",gap:6,px:10,py:4,h:Sm[n],maxWidth:196,overflow:"hidden",borderRadius:"var(--corner-sm)",backgroundColor:h.bg,color:h.color,onClick:s,className:W(f,l),children:[s&&w.jsx(bs,{}),o&&w.jsx(R,{w:20,h:20,borderRadius:"50%",overflow:"hidden",children:o}),r&&w.jsx(R,{children:r}),w.jsx(Y,{variant:"caption-1",color:h.color,textOverflow:"ellipsis",children:t}),i&&!a&&w.jsx(Y,{className:d,colorName:e,onClick:y=>{y.stopPropagation(),i(y)},children:"×"})]})});Qo.displayName="Tag";const Cm=({children:t})=>{const[e]=b.useState(()=>document.createElement("div"));return b.useEffect(()=>{let n=document.getElementById("portal-root");return n||(n=document.createElement("div"),n.id="portal-root",document.body.appendChild(n)),n.appendChild(e),()=>{n&&n.contains(e)&&n.removeChild(e)}},[e]),Qi.createPortal(t,e)},Pm="_themeProviderScoped_kei3w_9",_m={themeProviderScoped:Pm};function Mm({className:t,children:e,theme:n}){return w.jsx("div",{className:Pt(_m.themeProviderScoped,t),"data-theme":n,children:e})}exports.AnimatedText=Wo;exports.Avatar=em;exports.Box=R;exports.Button=dd;exports.Checkbox=Ho;exports.Hint=wm;exports.IconButton=ws;exports.Input=Yo;exports.Modal=Ge;exports.Portal=Cm;exports.Tag=Qo;exports.Text=Y;exports.ThemeProviderScoped=Mm;exports.getSizeClass=he;exports.getStyleClass=Ke;exports.useControlled=Uo;exports.useDropdownPosition=$f;
|
|
9
9
|
//# sourceMappingURL=ui-kit.cjs.js.map
|