@matthiaskrijgsman/mat-ui 0.0.2 → 0.0.4

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.
Files changed (31) hide show
  1. package/dist/components/Badge.d.ts +1 -1
  2. package/dist/components/Modal.d.ts +4 -2
  3. package/dist/components/{InputPassword.d.ts → inputs/InputPassword.d.ts} +1 -1
  4. package/dist/hooks/use-dismiss.d.ts +1 -0
  5. package/dist/index.d.ts +33 -11
  6. package/dist/index.js +5545 -4343
  7. package/dist/index.js.map +1 -1
  8. package/dist/index.umd.cjs +68 -19
  9. package/dist/index.umd.cjs.map +1 -1
  10. package/dist/style.css +1 -1
  11. package/dist/types.d.ts +19 -19
  12. package/package.json +1 -1
  13. /package/dist/components/{Button.d.ts → button/Button.d.ts} +0 -0
  14. /package/dist/components/{ButtonIconRound.d.ts → button-icon-round/ButtonIconRound.d.ts} +0 -0
  15. /package/dist/components/{ButtonIconSquare.d.ts → button-icon-square/ButtonIconSquare.d.ts} +0 -0
  16. /package/dist/components/{Input.d.ts → inputs/Input.d.ts} +0 -0
  17. /package/dist/components/{InputCheck.d.ts → inputs/InputCheck.d.ts} +0 -0
  18. /package/dist/components/{InputDescription.d.ts → inputs/InputDescription.d.ts} +0 -0
  19. /package/dist/components/{InputError.d.ts → inputs/InputError.d.ts} +0 -0
  20. /package/dist/components/{InputErrorIcon.d.ts → inputs/InputErrorIcon.d.ts} +0 -0
  21. /package/dist/components/{InputIconButton.d.ts → inputs/InputIconButton.d.ts} +0 -0
  22. /package/dist/components/{InputIconButtonTray.d.ts → inputs/InputIconButtonTray.d.ts} +0 -0
  23. /package/dist/components/{InputLabel.d.ts → inputs/InputLabel.d.ts} +0 -0
  24. /package/dist/components/{InputRadio.d.ts → inputs/InputRadio.d.ts} +0 -0
  25. /package/dist/components/{InputSelect.d.ts → inputs/InputSelect.d.ts} +0 -0
  26. /package/dist/components/{InputSelectNative.d.ts → inputs/InputSelectNative.d.ts} +0 -0
  27. /package/dist/components/{InputSelectOption.d.ts → inputs/InputSelectOption.d.ts} +0 -0
  28. /package/dist/components/{InputSelectSearchable.d.ts → inputs/InputSelectSearchable.d.ts} +0 -0
  29. /package/dist/components/{InputSelectSearchableAsync.d.ts → inputs/InputSelectSearchableAsync.d.ts} +0 -0
  30. /package/dist/components/{InputTextArea.d.ts → inputs/InputTextArea.d.ts} +0 -0
  31. /package/dist/components/{InputToggle.d.ts → inputs/InputToggle.d.ts} +0 -0
@@ -1,4 +1,4 @@
1
- (function(W,S){typeof exports=="object"&&typeof module<"u"?S(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],S):(W=typeof globalThis<"u"?globalThis:W||self,S(W.MatUI={},W.React,W.ReactDOM))})(this,(function(W,S,Xo){"use strict";function As(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 C=As(S),Go=As(Xo);var pe={exports:{}},Gt={};/**
1
+ (function(M,T){typeof exports=="object"&&typeof module<"u"?T(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],T):(M=typeof globalThis<"u"?globalThis:M||self,T(M.MatUI={},M.React,M.ReactDOM))})(this,(function(M,T,La){"use strict";function qs(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 P=qs(T),Zs=qs(La);var De={exports:{}},oe={};/**
2
2
  * @license React
3
3
  * react-jsx-runtime.production.js
4
4
  *
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
- */var Es;function qo(){if(Es)return Gt;Es=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function n(s,i,o){var r=null;if(o!==void 0&&(r=""+o),i.key!==void 0&&(r=""+i.key),"key"in i){o={};for(var a in i)a!=="key"&&(o[a]=i[a])}else o=i;return i=o.ref,{$$typeof:t,type:s,key:r,ref:i!==void 0?i:null,props:o}}return Gt.Fragment=e,Gt.jsx=n,Gt.jsxs=n,Gt}var qt={};/**
9
+ */var Js;function Fa(){if(Js)return oe;Js=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function n(s,i,o){var r=null;if(o!==void 0&&(r=""+o),i.key!==void 0&&(r=""+i.key),"key"in i){o={};for(var a in i)a!=="key"&&(o[a]=i[a])}else o=i;return i=o.ref,{$$typeof:t,type:s,key:r,ref:i!==void 0?i:null,props:o}}return oe.Fragment=e,oe.jsx=n,oe.jsxs=n,oe}var ae={};/**
10
10
  * @license React
11
11
  * react-jsx-runtime.development.js
12
12
  *
@@ -14,50 +14,96 @@
14
14
  *
15
15
  * This source code is licensed under the MIT license found in the
16
16
  * LICENSE file in the root directory of this source tree.
17
- */var Vs;function Zo(){return Vs||(Vs=1,process.env.NODE_ENV!=="production"&&(function(){function t(p){if(p==null)return null;if(typeof p=="function")return p.$$typeof===L?null:p.displayName||p.name||null;if(typeof p=="string")return p;switch(p){case y:return"Fragment";case v:return"Profiler";case x:return"StrictMode";case T:return"Suspense";case V:return"SuspenseList";case k:return"Activity"}if(typeof p=="object")switch(typeof p.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),p.$$typeof){case m:return"Portal";case g:return(p.displayName||"Context")+".Provider";case w:return(p._context.displayName||"Context")+".Consumer";case P:var M=p.render;return p=p.displayName,p||(p=M.displayName||M.name||"",p=p!==""?"ForwardRef("+p+")":"ForwardRef"),p;case R:return M=p.displayName||null,M!==null?M:t(p.type)||"Memo";case A:M=p._payload,p=p._init;try{return t(p(M))}catch{}}return null}function e(p){return""+p}function n(p){try{e(p);var M=!1}catch{M=!0}if(M){M=console;var F=M.error,Y=typeof Symbol=="function"&&Symbol.toStringTag&&p[Symbol.toStringTag]||p.constructor.name||"Object";return F.call(M,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",Y),e(p)}}function s(p){if(p===y)return"<>";if(typeof p=="object"&&p!==null&&p.$$typeof===A)return"<...>";try{var M=t(p);return M?"<"+M+">":"<...>"}catch{return"<...>"}}function i(){var p=$.A;return p===null?null:p.getOwner()}function o(){return Error("react-stack-top-frame")}function r(p){if(at.call(p,"key")){var M=Object.getOwnPropertyDescriptor(p,"key").get;if(M&&M.isReactWarning)return!1}return p.key!==void 0}function a(p,M){function F(){Pt||(Pt=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",M))}F.isReactWarning=!0,Object.defineProperty(p,"key",{get:F,configurable:!0})}function l(){var p=t(this.type);return lt[p]||(lt[p]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),p=this.props.ref,p!==void 0?p:null}function u(p,M,F,Y,Ct,mt,Ss,Ps){return F=mt.ref,p={$$typeof:d,type:p,key:M,props:mt,_owner:Ct},(F!==void 0?F:null)!==null?Object.defineProperty(p,"ref",{enumerable:!1,get:l}):Object.defineProperty(p,"ref",{enumerable:!1,value:null}),p._store={},Object.defineProperty(p._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(p,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(p,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:Ss}),Object.defineProperty(p,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:Ps}),Object.freeze&&(Object.freeze(p.props),Object.freeze(p)),p}function c(p,M,F,Y,Ct,mt,Ss,Ps){var X=M.children;if(X!==void 0)if(Y)if(nt(X)){for(Y=0;Y<X.length;Y++)f(X[Y]);Object.freeze&&Object.freeze(X)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else f(X);if(at.call(M,"key")){X=t(p);var Xt=Object.keys(M).filter(function(ud){return ud!=="key"});Y=0<Xt.length?"{key: someKey, "+Xt.join(": ..., ")+": ...}":"{key: someKey}",q[X+Y]||(Xt=0<Xt.length?"{"+Xt.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
17
+ */var Qs;function Ba(){return Qs||(Qs=1,process.env.NODE_ENV!=="production"&&(function(){function t(b){if(b==null)return null;if(typeof b=="function")return b.$$typeof===O?null:b.displayName||b.name||null;if(typeof b=="string")return b;switch(b){case g:return"Fragment";case y:return"Profiler";case x:return"StrictMode";case S:return"Suspense";case C:return"SuspenseList";case N:return"Activity"}if(typeof b=="object")switch(typeof b.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),b.$$typeof){case p:return"Portal";case v:return(b.displayName||"Context")+".Provider";case w:return(b._context.displayName||"Context")+".Consumer";case E:var D=b.render;return b=b.displayName,b||(b=D.displayName||D.name||"",b=b!==""?"ForwardRef("+b+")":"ForwardRef"),b;case A:return D=b.displayName||null,D!==null?D:t(b.type)||"Memo";case R:D=b._payload,b=b._init;try{return t(b(D))}catch{}}return null}function e(b){return""+b}function n(b){try{e(b);var D=!1}catch{D=!0}if(D){D=console;var $=D.error,X=typeof Symbol=="function"&&Symbol.toStringTag&&b[Symbol.toStringTag]||b.constructor.name||"Object";return $.call(D,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",X),e(b)}}function s(b){if(b===g)return"<>";if(typeof b=="object"&&b!==null&&b.$$typeof===R)return"<...>";try{var D=t(b);return D?"<"+D+">":"<...>"}catch{return"<...>"}}function i(){var b=U.A;return b===null?null:b.getOwner()}function o(){return Error("react-stack-top-frame")}function r(b){if(et.call(b,"key")){var D=Object.getOwnPropertyDescriptor(b,"key").get;if(D&&D.isReactWarning)return!1}return b.key!==void 0}function a(b,D){function $(){vt||(vt=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",D))}$.isReactWarning=!0,Object.defineProperty(b,"key",{get:$,configurable:!0})}function l(){var b=t(this.type);return ct[b]||(ct[b]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),b=this.props.ref,b!==void 0?b:null}function u(b,D,$,X,Mt,xt,Hs,Gs){return $=xt.ref,b={$$typeof:m,type:b,key:D,props:xt,_owner:Mt},($!==void 0?$:null)!==null?Object.defineProperty(b,"ref",{enumerable:!1,get:l}):Object.defineProperty(b,"ref",{enumerable:!1,value:null}),b._store={},Object.defineProperty(b._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(b,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(b,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:Hs}),Object.defineProperty(b,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:Gs}),Object.freeze&&(Object.freeze(b.props),Object.freeze(b)),b}function c(b,D,$,X,Mt,xt,Hs,Gs){var q=D.children;if(q!==void 0)if(X)if(I(q)){for(X=0;X<q.length;X++)f(q[X]);Object.freeze&&Object.freeze(q)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else f(q);if(et.call(D,"key")){q=t(b);var re=Object.keys(D).filter(function(Vm){return Vm!=="key"});X=0<re.length?"{key: someKey, "+re.join(": ..., ")+": ...}":"{key: someKey}",J[q+X]||(re=0<re.length?"{"+re.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
18
18
  let props = %s;
19
19
  <%s {...props} />
20
20
  React keys must be passed directly to JSX without using spread:
21
21
  let props = %s;
22
- <%s key={someKey} {...props} />`,Y,X,Xt,X),q[X+Y]=!0)}if(X=null,F!==void 0&&(n(F),X=""+F),r(M)&&(n(M.key),X=""+M.key),"key"in M){F={};for(var Cs in M)Cs!=="key"&&(F[Cs]=M[Cs])}else F=M;return X&&a(F,typeof p=="function"?p.displayName||p.name||"Unknown":p),u(p,X,mt,Ct,i(),F,Ss,Ps)}function f(p){typeof p=="object"&&p!==null&&p.$$typeof===d&&p._store&&(p._store.validated=1)}var h=S,d=Symbol.for("react.transitional.element"),m=Symbol.for("react.portal"),y=Symbol.for("react.fragment"),x=Symbol.for("react.strict_mode"),v=Symbol.for("react.profiler"),w=Symbol.for("react.consumer"),g=Symbol.for("react.context"),P=Symbol.for("react.forward_ref"),T=Symbol.for("react.suspense"),V=Symbol.for("react.suspense_list"),R=Symbol.for("react.memo"),A=Symbol.for("react.lazy"),k=Symbol.for("react.activity"),L=Symbol.for("react.client.reference"),$=h.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,at=Object.prototype.hasOwnProperty,nt=Array.isArray,dt=console.createTask?console.createTask:function(){return null};h={react_stack_bottom_frame:function(p){return p()}};var Pt,lt={},N=h.react_stack_bottom_frame.bind(h,o)(),D=dt(s(o)),q={};qt.Fragment=y,qt.jsx=function(p,M,F,Y,Ct){var mt=1e4>$.recentlyCreatedOwnerStacks++;return c(p,M,F,!1,Y,Ct,mt?Error("react-stack-top-frame"):N,mt?dt(s(p)):D)},qt.jsxs=function(p,M,F,Y,Ct){var mt=1e4>$.recentlyCreatedOwnerStacks++;return c(p,M,F,!0,Y,Ct,mt?Error("react-stack-top-frame"):N,mt?dt(s(p)):D)}})()),qt}var Rs;function Jo(){return Rs||(Rs=1,process.env.NODE_ENV==="production"?pe.exports=qo():pe.exports=Zo()),pe.exports}var b=Jo();const U=(...t)=>t.filter(Boolean).join(" "),Qo="inline-flex flex-row items-center button-ring justify-center font-semibold ring-0 hover:ring-4 active:ring-1 rounded-xl cursor-pointer transition-all duration-150 select-none focus:outline-none focus:ring-4 button-ring",ta={primary:"border button-primary shadow-sm",secondary:"border button-secondary shadow-sm",tertiary:"border button-tertiary",white:"border button-white shadow-sm",black:"border button-black shadow-sm",transparent:"border button-transparent"},ea={sm:"h-10 px-4",md:"h-12 px-6",lg:"h-14 px-8"},Ms=C.forwardRef((t,e)=>{const{variant:n="white",size:s="md",className:i,children:o,...r}=t;return b.jsx("button",{ref:e,className:U(Qo,ta[n],ea[s],i),...r,children:o})}),na="inline-flex flex-row items-center justify-center font-semibold ring-0 hover:ring-4 active:ring-1 rounded-xl cursor-pointer transition-all duration-150 select-none focus:outline-none focus:ring-4 aspect-square button-ring",sa={primary:"border button-primary shadow-sm",secondary:"border button-secondary shadow-sm",tertiary:"border button-tertiary",white:"border button-white shadow-sm",black:"border button-black shadow-sm",transparent:"border button-transparent"},ia={sm:"h-10 w-10",md:"h-12 w-12",lg:"h-14 w-14"},ra=C.forwardRef((t,e)=>{const{variant:n="white",size:s="md",className:i,Icon:o,...r}=t;return b.jsx("button",{ref:e,className:U(na,sa[n],ia[s],i),...r,children:b.jsx(o,{className:"h-5 w-5"})})}),oa="inline-flex flex-row items-center justify-center font-semibold ring-0 hover:ring-4 active:ring-1 rounded-full cursor-pointer transition-all duration-150 select-none focus:outline-none focus:ring-4 aspect-square button-ring",aa={primary:"border button-primary shadow-sm",secondary:"border button-secondary shadow-sm",tertiary:"border button-tertiary",white:"border button-white shadow-sm",black:"border button-black shadow-sm",transparent:"border button-transparent"},la={sm:"h-10 w-10",md:"h-12 w-12",lg:"h-14 w-14"},ca=C.forwardRef((t,e)=>{const{variant:n="white",size:s="md",className:i,Icon:o,...r}=t;return b.jsx("button",{ref:e,className:U(oa,aa[n],la[s],i),...r,children:b.jsx(o,{className:"h-5 w-5"})})});/**
22
+ <%s key={someKey} {...props} />`,X,q,re,q),J[q+X]=!0)}if(q=null,$!==void 0&&(n($),q=""+$),r(D)&&(n(D.key),q=""+D.key),"key"in D){$={};for(var Xs in D)Xs!=="key"&&($[Xs]=D[Xs])}else $=D;return q&&a($,typeof b=="function"?b.displayName||b.name||"Unknown":b),u(b,q,xt,Mt,i(),$,Hs,Gs)}function f(b){typeof b=="object"&&b!==null&&b.$$typeof===m&&b._store&&(b._store.validated=1)}var d=T,m=Symbol.for("react.transitional.element"),p=Symbol.for("react.portal"),g=Symbol.for("react.fragment"),x=Symbol.for("react.strict_mode"),y=Symbol.for("react.profiler"),w=Symbol.for("react.consumer"),v=Symbol.for("react.context"),E=Symbol.for("react.forward_ref"),S=Symbol.for("react.suspense"),C=Symbol.for("react.suspense_list"),A=Symbol.for("react.memo"),R=Symbol.for("react.lazy"),N=Symbol.for("react.activity"),O=Symbol.for("react.client.reference"),U=d.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,et=Object.prototype.hasOwnProperty,I=Array.isArray,K=console.createTask?console.createTask:function(){return null};d={react_stack_bottom_frame:function(b){return b()}};var vt,ct={},_=d.react_stack_bottom_frame.bind(d,o)(),k=K(s(o)),J={};ae.Fragment=g,ae.jsx=function(b,D,$,X,Mt){var xt=1e4>U.recentlyCreatedOwnerStacks++;return c(b,D,$,!1,X,Mt,xt?Error("react-stack-top-frame"):_,xt?K(s(b)):k)},ae.jsxs=function(b,D,$,X,Mt){var xt=1e4>U.recentlyCreatedOwnerStacks++;return c(b,D,$,!0,X,Mt,xt?Error("react-stack-top-frame"):_,xt?K(s(b)):k)}})()),ae}var ti;function _a(){return ti||(ti=1,process.env.NODE_ENV==="production"?De.exports=Fa():De.exports=Ba()),De.exports}var h=_a();const V=(...t)=>t.filter(Boolean).join(" "),dn=T.createContext({});function hn(t){const e=T.useRef(null);return e.current===null&&(e.current=t()),e.current}const mn=typeof window<"u",ei=mn?T.useLayoutEffect:T.useEffect,Ve=T.createContext(null);function pn(t,e){t.indexOf(e)===-1&&t.push(e)}function gn(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const bt=(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 $t=()=>{},wt=()=>{};process.env.NODE_ENV!=="production"&&($t=(t,e,n)=>{!t&&typeof console<"u"&&console.warn(yn(e,n))},wt=(t,e,n)=>{if(!t)throw new Error(yn(e,n))});const Tt={},ni=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t);function si(t){return typeof t=="object"&&t!==null}const ii=t=>/^0[^.\s]+$/u.test(t);function vn(t){let e;return()=>(e===void 0&&(e=t()),e)}const nt=t=>t,$a=(t,e)=>n=>e(t(n)),le=(...t)=>t.reduce($a),ce=(t,e,n)=>{const s=e-t;return s===0?1:(n-t)/s};class xn{constructor(){this.subscriptions=[]}add(e){return pn(this.subscriptions,e),()=>gn(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,ut=t=>t/1e3;function ri(t,e){return e?t*(1e3/e):0}const oi=new Set;function bn(t,e,n){t||oi.has(e)||(console.warn(yn(e,n)),oi.add(e))}const ai=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,Wa=1e-7,Ua=12;function za(t,e,n,s,i){let o,r,a=0;do r=e+(n-e)/2,o=ai(r,s,i)-t,o>0?n=r:e=r;while(Math.abs(o)>Wa&&++a<Ua);return r}function ue(t,e,n,s){if(t===e&&n===s)return nt;const i=o=>za(o,0,1,t,n);return o=>o===0||o===1?o:ai(i(o),e,s)}const li=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,ci=t=>e=>1-t(1-e),ui=ue(.33,1.53,.69,.99),wn=ci(ui),fi=li(wn),di=t=>(t*=2)<1?.5*wn(t):.5*(2-Math.pow(2,-10*(t-1))),Tn=t=>1-Math.sin(Math.acos(t)),hi=ci(Tn),mi=li(Tn),Ka=ue(.42,0,1,1),Ya=ue(0,0,.58,1),pi=ue(.42,0,.58,1),Ha=t=>Array.isArray(t)&&typeof t[0]!="number",gi=t=>Array.isArray(t)&&typeof t[0]=="number",yi={linear:nt,easeIn:Ka,easeInOut:pi,easeOut:Ya,circIn:Tn,circInOut:mi,circOut:hi,backIn:wn,backInOut:fi,backOut:ui,anticipate:di},Ga=t=>typeof t=="string",vi=t=>{if(gi(t)){wt(t.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[e,n,s,i]=t;return ue(e,n,s,i)}else if(Ga(t))return wt(yi[t]!==void 0,`Invalid easing type '${t}'`,"invalid-easing-type"),yi[t];return t},ke=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function Xa(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,f=!1,d=!1)=>{const p=d&&i?n:s;return f&&r.add(c),p.has(c)||p.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 qa=40;function xi(t,e){let n=!1,s=!0;const i={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,r=ke.reduce((v,E)=>(v[E]=Xa(o),v),{}),{setup:a,read:l,resolveKeyframes:u,preUpdate:c,update:f,preRender:d,render:m,postRender:p}=r,g=()=>{const v=Tt.useManualTiming?i.timestamp:performance.now();n=!1,Tt.useManualTiming||(i.delta=s?1e3/60:Math.max(Math.min(v-i.timestamp,qa),1)),i.timestamp=v,i.isProcessing=!0,a.process(i),l.process(i),u.process(i),c.process(i),f.process(i),d.process(i),m.process(i),p.process(i),i.isProcessing=!1,n&&e&&(s=!1,t(g))},x=()=>{n=!0,s=!0,i.isProcessing||t(g)};return{schedule:ke.reduce((v,E)=>{const S=r[E];return v[E]=(C,A=!1,R=!1)=>(n||x(),S.schedule(C,A,R)),v},{}),cancel:v=>{for(let E=0;E<ke.length;E++)r[ke[E]].cancel(v)},state:i,steps:r}}const{schedule:L,cancel:Pt,state:Y,steps:Sn}=xi(typeof requestAnimationFrame<"u"?requestAnimationFrame:nt,!0);let Ne;function Za(){Ne=void 0}const Q={now:()=>(Ne===void 0&&Q.set(Y.isProcessing||Tt.useManualTiming?Y.timestamp:performance.now()),Ne),set:t=>{Ne=t,queueMicrotask(Za)}},bi=t=>e=>typeof e=="string"&&e.startsWith(t),Pn=bi("--"),Ja=bi("var(--"),Cn=t=>Ja(t)?Qa.test(t.split("/*")[0].trim()):!1,Qa=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Wt={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},fe={...Wt,transform:t=>bt(0,1,t)},Oe={...Wt,default:1},de=t=>Math.round(t*1e5)/1e5,En=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function tl(t){return t==null}const el=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,An=(t,e)=>n=>!!(typeof n=="string"&&el.test(n)&&n.startsWith(t)||e&&!tl(n)&&Object.prototype.hasOwnProperty.call(n,e)),wi=(t,e,n)=>s=>{if(typeof s!="string")return s;const[i,o,r,a]=s.match(En);return{[t]:parseFloat(i),[e]:parseFloat(o),[n]:parseFloat(r),alpha:a!==void 0?parseFloat(a):1}},nl=t=>bt(0,255,t),Rn={...Wt,transform:t=>Math.round(nl(t))},Dt={test:An("rgb","red"),parse:wi("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+Rn.transform(t)+", "+Rn.transform(e)+", "+Rn.transform(n)+", "+de(fe.transform(s))+")"};function sl(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 jn={test:An("#"),parse:sl,transform:Dt.transform},he=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),Ct=he("deg"),ft=he("%"),j=he("px"),il=he("vh"),rl=he("vw"),Ti={...ft,parse:t=>ft.parse(t)/100,transform:t=>ft.transform(t*100)},Ut={test:An("hsl","hue"),parse:wi("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:s=1})=>"hsla("+Math.round(t)+", "+ft.transform(de(e))+", "+ft.transform(de(n))+", "+de(fe.transform(s))+")"},z={test:t=>Dt.test(t)||jn.test(t)||Ut.test(t),parse:t=>Dt.test(t)?Dt.parse(t):Ut.test(t)?Ut.parse(t):jn.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?Dt.transform(t):Ut.transform(t),getAnimatableNone:t=>{const e=z.parse(t);return e.alpha=0,z.transform(e)}},ol=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function al(t){return isNaN(t)&&typeof t=="string"&&(t.match(En)?.length||0)+(t.match(ol)?.length||0)>0}const Si="number",Pi="color",ll="var",cl="var(",Ci="${}",ul=/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 me(t){const e=t.toString(),n=[],s={color:[],number:[],var:[]},i=[];let o=0;const a=e.replace(ul,l=>(z.test(l)?(s.color.push(o),i.push(Pi),n.push(z.parse(l))):l.startsWith(cl)?(s.var.push(o),i.push(ll),n.push(l)):(s.number.push(o),i.push(Si),n.push(parseFloat(l))),++o,Ci)).split(Ci);return{values:n,split:a,indexes:s,types:i}}function Ei(t){return me(t).values}function Ai(t){const{split:e,types:n}=me(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===Si?o+=de(i[r]):a===Pi?o+=z.transform(i[r]):o+=i[r]}return o}}const fl=t=>typeof t=="number"?0:z.test(t)?z.getAnimatableNone(t):t;function dl(t){const e=Ei(t);return Ai(t)(e.map(fl))}const Et={test:al,parse:Ei,createTransformer:Ai,getAnimatableNone:dl};function Mn(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 hl({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=Mn(l,a,t+1/3),o=Mn(l,a,t),r=Mn(l,a,t-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(r*255),alpha:s}}function Ie(t,e){return n=>n>0?e:t}const F=(t,e,n)=>t+(e-t)*n,Dn=(t,e,n)=>{const s=t*t,i=n*(e*e-s)+s;return i<0?0:Math.sqrt(i)},ml=[jn,Dt,Ut],pl=t=>ml.find(e=>e.test(t));function Ri(t){const e=pl(t);if($t(!!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===Ut&&(n=hl(n)),n}const ji=(t,e)=>{const n=Ri(t),s=Ri(e);if(!n||!s)return Ie(t,e);const i={...n};return o=>(i.red=Dn(n.red,s.red,o),i.green=Dn(n.green,s.green,o),i.blue=Dn(n.blue,s.blue,o),i.alpha=F(n.alpha,s.alpha,o),Dt.transform(i))},Vn=new Set(["none","hidden"]);function gl(t,e){return Vn.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function yl(t,e){return n=>F(t,e,n)}function kn(t){return typeof t=="number"?yl:typeof t=="string"?Cn(t)?Ie:z.test(t)?ji:bl:Array.isArray(t)?Mi:typeof t=="object"?z.test(t)?ji:vl:Ie}function Mi(t,e){const n=[...t],s=n.length,i=t.map((o,r)=>kn(o)(o,e[r]));return o=>{for(let r=0;r<s;r++)n[r]=i[r](o);return n}}function vl(t,e){const n={...t,...e},s={};for(const i in n)t[i]!==void 0&&e[i]!==void 0&&(s[i]=kn(t[i])(t[i],e[i]));return i=>{for(const o in s)n[o]=s[o](i);return n}}function xl(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 bl=(t,e)=>{const n=Et.createTransformer(e),s=me(t),i=me(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?Vn.has(t)&&!i.values.length||Vn.has(e)&&!s.values.length?gl(t,e):le(Mi(xl(s,i),i.values),n):($t(!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"),Ie(t,e))};function Di(t,e,n){return typeof t=="number"&&typeof e=="number"&&typeof n=="number"?F(t,e,n):kn(t)(t,e)}const wl=t=>{const e=({timestamp:n})=>t(n);return{start:(n=!0)=>L.update(e,n),stop:()=>Pt(e),now:()=>Y.isProcessing?Y.timestamp:Q.now()}},Vi=(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)})`},Le=2e4;function Nn(t){let e=0;const n=50;let s=t.next(e);for(;!s.done&&e<Le;)e+=n,s=t.next(e);return e>=Le?1/0:e}function Tl(t,e=100,n){const s=n({...t,keyframes:[0,e]}),i=Math.min(Nn(s),Le);return{type:"keyframes",ease:o=>s.next(i*o).value/e,duration:ut(i)}}const Sl=5;function ki(t,e,n){const s=Math.max(e-Sl,0);return ri(n-t(s),e-s)}const B={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},On=.001;function Pl({duration:t=B.duration,bounce:e=B.bounce,velocity:n=B.velocity,mass:s=B.mass}){let i,o;$t(t<=ot(B.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let r=1-e;r=bt(B.minDamping,B.maxDamping,r),t=bt(B.minDuration,B.maxDuration,ut(t)),r<1?(i=u=>{const c=u*r,f=c*t,d=c-n,m=In(u,r),p=Math.exp(-f);return On-d/m*p},o=u=>{const f=u*r*t,d=f*n+n,m=Math.pow(r,2)*Math.pow(u,2)*t,p=Math.exp(-f),g=In(Math.pow(u,2),r);return(-i(u)+On>0?-1:1)*((d-m)*p)/g}):(i=u=>{const c=Math.exp(-u*t),f=(u-n)*t+1;return-On+c*f},o=u=>{const c=Math.exp(-u*t),f=(n-u)*(t*t);return c*f});const a=5/t,l=El(i,o,a);if(t=ot(t),isNaN(l))return{stiffness:B.stiffness,damping:B.damping,duration:t};{const u=Math.pow(l,2)*s;return{stiffness:u,damping:r*2*Math.sqrt(s*u),duration:t}}}const Cl=12;function El(t,e,n){let s=n;for(let i=1;i<Cl;i++)s=s-t(s)/e(s);return s}function In(t,e){return t*Math.sqrt(1-e*e)}const Al=["duration","bounce"],Rl=["stiffness","damping","mass"];function Ni(t,e){return e.some(n=>t[n]!==void 0)}function jl(t){let e={velocity:B.velocity,stiffness:B.stiffness,damping:B.damping,mass:B.mass,isResolvedFromDuration:!1,...t};if(!Ni(t,Rl)&&Ni(t,Al))if(t.visualDuration){const n=t.visualDuration,s=2*Math.PI/(n*1.2),i=s*s,o=2*bt(.05,1,1-(t.bounce||0))*Math.sqrt(i);e={...e,mass:B.mass,stiffness:i,damping:o}}else{const n=Pl(t);e={...e,...n,mass:B.mass},e.isResolvedFromDuration=!0}return e}function Fe(t=B.visualDuration,e=B.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:f,velocity:d,isResolvedFromDuration:m}=jl({...n,velocity:-ut(n.velocity||0)}),p=d||0,g=u/(2*Math.sqrt(l*c)),x=r-o,y=ut(Math.sqrt(l/c)),w=Math.abs(x)<5;s||(s=w?B.restSpeed.granular:B.restSpeed.default),i||(i=w?B.restDelta.granular:B.restDelta.default);let v;if(g<1){const S=In(y,g);v=C=>{const A=Math.exp(-g*y*C);return r-A*((p+g*y*x)/S*Math.sin(S*C)+x*Math.cos(S*C))}}else if(g===1)v=S=>r-Math.exp(-y*S)*(x+(p+y*x)*S);else{const S=y*Math.sqrt(g*g-1);v=C=>{const A=Math.exp(-g*y*C),R=Math.min(S*C,300);return r-A*((p+g*y*x)*Math.sinh(R)+S*x*Math.cosh(R))/S}}const E={calculatedDuration:m&&f||null,next:S=>{const C=v(S);if(m)a.done=S>=f;else{let A=S===0?p:0;g<1&&(A=S===0?ot(p):ki(v,S,C));const R=Math.abs(A)<=s,N=Math.abs(r-C)<=i;a.done=R&&N}return a.value=a.done?r:C,a},toString:()=>{const S=Math.min(Nn(E),Le),C=Vi(A=>E.next(S*A).value,S,30);return S+"ms "+C},toTransition:()=>{}};return E}Fe.applyToOptions=t=>{const e=Tl(t,100,Fe);return t.ease=e.ease,t.duration=ot(e.duration),t.type="keyframes",t};function Ln({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 f=t[0],d={done:!1,value:f},m=R=>a!==void 0&&R<a||l!==void 0&&R>l,p=R=>a===void 0?l:l===void 0||Math.abs(a-R)<Math.abs(l-R)?a:l;let g=n*e;const x=f+g,y=r===void 0?x:r(x);y!==x&&(g=y-f);const w=R=>-g*Math.exp(-R/s),v=R=>y+w(R),E=R=>{const N=w(R),O=v(R);d.done=Math.abs(N)<=u,d.value=d.done?y:O};let S,C;const A=R=>{m(d.value)&&(S=R,C=Fe({keyframes:[d.value,p(d.value)],velocity:ki(v,R,d.value),damping:i,stiffness:o,restDelta:u,restSpeed:c}))};return A(0),{calculatedDuration:null,next:R=>{let N=!1;return!C&&S===void 0&&(N=!0,E(R),A(R)),S!==void 0&&R>=S?C.next(R-S):(!N&&E(R),d)}}}function Ml(t,e,n){const s=[],i=n||Tt.mix||Di,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]||nt:e;a=le(l,a)}s.push(a)}return s}function Dl(t,e,{clamp:n=!0,ease:s,mixer:i}={}){const o=t.length;if(wt(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=Ml(e,s,i),l=a.length,u=c=>{if(r&&c<t[0])return e[0];let f=0;if(l>1)for(;f<t.length-2&&!(c<t[f+1]);f++);const d=ce(t[f],t[f+1],c);return a[f](d)};return n?c=>u(bt(t[0],t[o-1],c)):u}function Vl(t,e){const n=t[t.length-1];for(let s=1;s<=e;s++){const i=ce(0,e,s);t.push(F(n,1,i))}}function kl(t){const e=[0];return Vl(e,t.length-1),e}function Nl(t,e){return t.map(n=>n*e)}function Ol(t,e){return t.map(()=>e||pi).splice(0,t.length-1)}function zt({duration:t=300,keyframes:e,times:n,ease:s="easeInOut"}){const i=Ha(s)?s.map(vi):vi(s),o={done:!1,value:e[0]},r=Nl(n&&n.length===e.length?n:kl(e),t),a=Dl(r,e,{ease:Array.isArray(i)?i:Ol(e,i)});return{calculatedDuration:t,next:l=>(o.value=a(l),o.done=l>=t,o)}}const Il=t=>t!==null;function Fn(t,{repeat:e,repeatType:n="loop"},s,i=1){const o=t.filter(Il),a=i<0||e&&n!=="loop"&&e%2===1?0:o.length-1;return!a||s===void 0?o[a]:s}const Ll={decay:Ln,inertia:Ln,tween:zt,keyframes:zt,spring:Fe};function Oi(t){typeof t.type=="string"&&(t.type=Ll[t.type])}class Bn{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 Fl=t=>t/100;class _n extends Bn{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!==Q.now()&&this.tick(Q.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;Oi(e);const{type:n=zt,repeat:s=0,repeatDelay:i=0,repeatType:o,velocity:r=0}=e;let{keyframes:a}=e;const l=n||zt;process.env.NODE_ENV!=="production"&&l!==zt&&wt(a.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`,"spring-two-frames"),l!==zt&&typeof a[0]!="number"&&(this.mixKeyframes=le(Fl,Di(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=Nn(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:f,repeatType:d,repeatDelay:m,type:p,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 y=this.currentTime-u*(this.playbackSpeed>=0?1:-1),w=this.playbackSpeed>=0?y<0:y>i;this.currentTime=Math.max(y,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let v=this.currentTime,E=s;if(f){const R=Math.min(this.currentTime,i)/a;let N=Math.floor(R),O=R%1;!O&&R>=1&&(O=1),O===1&&N--,N=Math.min(N,f+1),!!(N%2)&&(d==="reverse"?(O=1-O,m&&(O-=m/a)):d==="mirror"&&(E=r)),v=bt(0,1,O)*a}const S=w?{done:!1,value:c[0]}:E.next(v);o&&(S.value=o(S.value));let{done:C}=S;!w&&l!==null&&(C=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const A=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&C);return A&&p!==Ln&&(S.value=Fn(c,this.options,x,this.speed)),g&&g(S.value),A&&this.finish(),S}then(e,n){return this.finished.then(e,n)}get duration(){return ut(this.calculatedDuration)}get time(){return ut(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(Q.now());const n=this.playbackSpeed!==e;this.playbackSpeed=e,n&&(this.time=ut(this.currentTime))}play(){if(this.isStopped)return;const{driver:e=wl,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(Q.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 Bl(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}const Vt=t=>t*180/Math.PI,$n=t=>{const e=Vt(Math.atan2(t[1],t[0]));return Wn(e)},_l={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:$n,rotateZ:$n,skewX:t=>Vt(Math.atan(t[1])),skewY:t=>Vt(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},Wn=t=>(t=t%360,t<0&&(t+=360),t),Ii=$n,Li=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),Fi=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),$l={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Li,scaleY:Fi,scale:t=>(Li(t)+Fi(t))/2,rotateX:t=>Wn(Vt(Math.atan2(t[6],t[5]))),rotateY:t=>Wn(Vt(Math.atan2(-t[2],t[0]))),rotateZ:Ii,rotate:Ii,skewX:t=>Vt(Math.atan(t[4])),skewY:t=>Vt(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function Un(t){return t.includes("scale")?1:0}function zn(t,e){if(!t||t==="none")return Un(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let s,i;if(n)s=$l,i=n;else{const a=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);s=_l,i=a}if(!i)return Un(e);const o=s[e],r=i[1].split(",").map(Ul);return typeof o=="function"?o(r):r[o]}const Wl=(t,e)=>{const{transform:n="none"}=getComputedStyle(t);return zn(n,e)};function Ul(t){return parseFloat(t.trim())}const Kt=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Yt=new Set(Kt),Bi=t=>t===Wt||t===j,zl=new Set(["x","y","z"]),Kl=Kt.filter(t=>!zl.has(t));function Yl(t){const e=[];return Kl.forEach(n=>{const s=t.getValue(n);s!==void 0&&(e.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),e}const kt={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})=>zn(e,"x"),y:(t,{transform:e})=>zn(e,"y")};kt.translateX=kt.x,kt.translateY=kt.y;const Nt=new Set;let Kn=!1,Yn=!1,Hn=!1;function _i(){if(Yn){const t=Array.from(Nt).filter(s=>s.needsMeasurement),e=new Set(t.map(s=>s.element)),n=new Map;e.forEach(s=>{const i=Yl(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)})}Yn=!1,Kn=!1,Nt.forEach(t=>t.complete(Hn)),Nt.clear()}function $i(){Nt.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(Yn=!0)})}function Hl(){Hn=!0,$i(),_i(),Hn=!1}class Gn{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?(Nt.add(this),Kn||(Kn=!0,L.read($i),L.resolveKeyframes(_i))):(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])}Bl(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),Nt.delete(this)}cancel(){this.state==="scheduled"&&(Nt.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const Gl=t=>t.startsWith("--");function Xl(t,e,n){Gl(e)?t.style.setProperty(e,n):t.style[e]=n}const ql=vn(()=>window.ScrollTimeline!==void 0),Zl={};function Jl(t,e){const n=vn(t);return()=>Zl[e]??n()}const Wi=Jl(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),pe=([t,e,n,s])=>`cubic-bezier(${t}, ${e}, ${n}, ${s})`,Ui={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:pe([0,.65,.55,1]),circOut:pe([.55,0,1,.45]),backIn:pe([.31,.01,.66,-.59]),backOut:pe([.33,1.53,.69,.99])};function zi(t,e){if(t)return typeof t=="function"?Wi()?Vi(t,e):"ease-out":gi(t)?pe(t):Array.isArray(t)?t.map(n=>zi(n,e)||Ui.easeOut):Ui[t]}function Ql(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 f=zi(a,i);Array.isArray(f)&&(c.easing=f);const d={delay:s,duration:i,easing:Array.isArray(f)?"linear":f,fill:"both",iterations:o+1,direction:r==="reverse"?"alternate":"normal"};return u&&(d.pseudoElement=u),t.animate(c,d)}function Ki(t){return typeof t=="function"&&"applyToOptions"in t}function tc({type:t,...e}){return Ki(t)&&Wi()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class ec extends Bn{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,wt(typeof e.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const u=tc(e);this.animation=Ql(n,s,i,u,o),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const c=Fn(i,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(c):Xl(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 ut(Number(e))}get time(){return ut(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&&ql()?(this.animation.timeline=e,nt):n(this)}}const Yi={anticipate:di,backInOut:fi,circInOut:mi};function nc(t){return t in Yi}function sc(t){typeof t.ease=="string"&&nc(t.ease)&&(t.ease=Yi[t.ease])}const Hi=10;class ic extends ec{constructor(e){sc(e),Oi(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 _n({...r,autoplay:!1}),l=ot(this.finishedTime??this.time);n.setWithVelocity(a.sample(l-Hi).value,a.sample(l).value,Hi),a.stop()}}const Gi=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(Et.test(t)||t==="0")&&!t.startsWith("url("));function rc(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 oc(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=Gi(i,e),a=Gi(o,e);return $t(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:rc(t)||(n==="spring"||Ki(n))&&s}function Xn(t){t.duration=0,t.type}const ac=new Set(["opacity","clipPath","filter","transform"]),lc=vn(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function cc(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 lc()&&n&&ac.has(n)&&(n!=="transform"||!u)&&!l&&!s&&i!=="mirror"&&o!==0&&r!=="inertia"}const uc=40;class fc extends Bn{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,...f}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=Q.now();const d={autoplay:e,delay:n,type:s,repeat:i,repeatDelay:o,repeatType:r,name:l,motionValue:u,element:c,...f},m=c?.KeyframeResolver||Gn;this.keyframeResolver=new m(a,(p,g,x)=>this.onKeyframesResolved(p,g,d,!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=Q.now(),oc(e,o,r,a)||((Tt.instantAnimations||!l)&&c?.(Fn(e,s,n)),e[0]=e[e.length-1],Xn(s),s.repeat=0);const d={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>uc?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...s,keyframes:e},m=!u&&cc(d)?new ic({...d,element:d.motionValue.owner.current}):new _n(d);m.finished.then(()=>this.notifyFinished()).catch(nt),this.pendingTimeline&&(this.stopTimeline=m.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=m}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(),Hl()),this._animation}get duration(){return this.animation.duration}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 dc=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function hc(t){const e=dc.exec(t);if(!e)return[,];const[,n,s,i]=e;return[`--${n??s}`,i]}const mc=4;function Xi(t,e,n=1){wt(n<=mc,`Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[s,i]=hc(t);if(!s)return;const o=window.getComputedStyle(e).getPropertyValue(s);if(o){const r=o.trim();return ni(r)?parseFloat(r):r}return Cn(i)?Xi(i,e,n+1):i}function qn(t,e){return t?.[e]??t?.default??t}const qi=new Set(["width","height","top","left","right","bottom",...Kt]),pc={test:t=>t==="auto",parse:t=>t},Zi=t=>e=>e.test(t),Ji=[Wt,j,ft,Ct,rl,il,pc],Qi=t=>Ji.find(Zi(t));function gc(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||ii(t):!0}const yc=new Set(["brightness","contrast","saturate","opacity"]);function vc(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[s]=n.match(En)||[];if(!s)return t;const i=n.replace(s,"");let o=yc.has(e)?1:0;return s!==n&&(o*=100),e+"("+o+i+")"}const xc=/\b([a-z-]*)\(.*?\)/gu,Zn={...Et,getAnimatableNone:t=>{const e=t.match(xc);return e?e.map(vc).join(" "):t}},tr={...Wt,transform:Math.round},Jn={borderWidth:j,borderTopWidth:j,borderRightWidth:j,borderBottomWidth:j,borderLeftWidth:j,borderRadius:j,radius:j,borderTopLeftRadius:j,borderTopRightRadius:j,borderBottomRightRadius:j,borderBottomLeftRadius:j,width:j,maxWidth:j,height:j,maxHeight:j,top:j,right:j,bottom:j,left:j,padding:j,paddingTop:j,paddingRight:j,paddingBottom:j,paddingLeft:j,margin:j,marginTop:j,marginRight:j,marginBottom:j,marginLeft:j,backgroundPositionX:j,backgroundPositionY:j,...{rotate:Ct,rotateX:Ct,rotateY:Ct,rotateZ:Ct,scale:Oe,scaleX:Oe,scaleY:Oe,scaleZ:Oe,skew:Ct,skewX:Ct,skewY:Ct,distance:j,translateX:j,translateY:j,translateZ:j,x:j,y:j,z:j,perspective:j,transformPerspective:j,opacity:fe,originX:Ti,originY:Ti,originZ:j},zIndex:tr,fillOpacity:fe,strokeOpacity:fe,numOctaves:tr},bc={...Jn,color:z,backgroundColor:z,outlineColor:z,fill:z,stroke:z,borderColor:z,borderTopColor:z,borderRightColor:z,borderBottomColor:z,borderLeftColor:z,filter:Zn,WebkitFilter:Zn},er=t=>bc[t];function nr(t,e){let n=er(t);return n!==Zn&&(n=Et),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const wc=new Set(["auto","none","0"]);function Tc(t,e,n){let s=0,i;for(;s<t.length&&!i;){const o=t[s];typeof o=="string"&&!wc.has(o)&&me(o).values.length&&(i=t[s]),s++}if(i&&n)for(const o of e)t[o]=nr(n,i)}class Sc extends Gn{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(),Cn(u))){const c=Xi(u,n.current);c!==void 0&&(e[l]=c),l===e.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!qi.has(s)||e.length!==2)return;const[i,o]=e,r=Qi(i),a=Qi(o);if(r!==a)if(Bi(r)&&Bi(a))for(let l=0;l<e.length;l++){const u=e[l];typeof u=="string"&&(e[l]=parseFloat(u))}else kt[s]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:n}=this,s=[];for(let i=0;i<e.length;i++)(e[i]===null||gc(e[i]))&&s.push(i);s.length&&Tc(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=kt[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]=kt[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 Pc(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 sr=(t,e)=>e&&typeof t=="number"?e.transform(t):t;function ir(t){return si(t)&&"offsetHeight"in t}const rr=30,Cc=t=>!isNaN(parseFloat(t));class Ec{constructor(e,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=s=>{const i=Q.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=Q.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=Cc(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 xn);const s=this.events[e].add(n);return e==="change"?()=>{s(),L.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=Q.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>rr)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,rr);return ri(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 Ht(t,e){return new Ec(t,e)}const{schedule:Qn}=xi(queueMicrotask,!1),at={x:!1,y:!1};function or(){return at.x||at.y}function Ac(t){return t==="x"||t==="y"?at[t]?null:(at[t]=!0,()=>{at[t]=!1}):at.x||at.y?null:(at.x=at.y=!0,()=>{at.x=at.y=!1})}function ar(t,e){const n=Pc(t),s=new AbortController,i={passive:!0,...e,signal:s.signal};return[n,i,()=>s.abort()]}function lr(t){return!(t.pointerType==="touch"||or())}function Rc(t,e,n={}){const[s,i,o]=ar(t,n),r=a=>{if(!lr(a))return;const{target:l}=a,u=e(l,a);if(typeof u!="function"||!l)return;const c=f=>{lr(f)&&(u(f),l.removeEventListener("pointerleave",c))};l.addEventListener("pointerleave",c,i)};return s.forEach(a=>{a.addEventListener("pointerenter",r,i)}),o}const cr=(t,e)=>e?t===e?!0:cr(t,e.parentElement):!1,ts=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1,jc=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Mc(t){return jc.has(t.tagName)||t.tabIndex!==-1}const Be=new WeakSet;function ur(t){return e=>{e.key==="Enter"&&t(e)}}function es(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}const Dc=(t,e)=>{const n=t.currentTarget;if(!n)return;const s=ur(()=>{if(Be.has(n))return;es(n,"down");const i=ur(()=>{es(n,"up")}),o=()=>es(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 fr(t){return ts(t)&&!or()}function Vc(t,e,n={}){const[s,i,o]=ar(t,n),r=a=>{const l=a.currentTarget;if(!fr(a))return;Be.add(l);const u=e(l,a),c=(m,p)=>{window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",d),Be.has(l)&&Be.delete(l),fr(m)&&typeof u=="function"&&u(m,{success:p})},f=m=>{c(m,l===window||l===document||n.useGlobalTarget||cr(l,m.target))},d=m=>{c(m,!1)};window.addEventListener("pointerup",f,i),window.addEventListener("pointercancel",d,i)};return s.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",r,i),ir(a)&&(a.addEventListener("focus",u=>Dc(u,i)),!Mc(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),o}function dr(t){return si(t)&&"ownerSVGElement"in t}function kc(t){return dr(t)&&t.tagName==="svg"}const H=t=>!!(t&&t.getVelocity),Nc=[...Ji,z,Et],Oc=t=>Nc.find(Zi(t)),ns=T.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});class Ic extends P.Component{getSnapshotBeforeUpdate(e){const n=this.props.childRef.current;if(n&&e.isPresent&&!this.props.isPresent){const s=n.offsetParent,i=ir(s)&&s.offsetWidth||0,o=this.props.sizeRef.current;o.height=n.offsetHeight||0,o.width=n.offsetWidth||0,o.top=n.offsetTop,o.left=n.offsetLeft,o.right=i-o.width-o.left}return null}componentDidUpdate(){}render(){return this.props.children}}function Lc({children:t,isPresent:e,anchorX:n,root:s}){const i=T.useId(),o=T.useRef(null),r=T.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:a}=T.useContext(ns);return T.useInsertionEffect(()=>{const{width:l,height:u,top:c,left:f,right:d}=r.current;if(e||!o.current||!l||!u)return;const m=n==="left"?`left: ${f}`:`right: ${d}`;o.current.dataset.motionPopId=i;const p=document.createElement("style");a&&(p.nonce=a);const g=s??document.head;return g.appendChild(p),p.sheet&&p.sheet.insertRule(`
23
+ [data-motion-pop-id="${i}"] {
24
+ position: absolute !important;
25
+ width: ${l}px !important;
26
+ height: ${u}px !important;
27
+ ${m}px !important;
28
+ top: ${c}px !important;
29
+ }
30
+ `),()=>{g.contains(p)&&g.removeChild(p)}},[e]),h.jsx(Ic,{isPresent:e,childRef:o,sizeRef:r,children:P.cloneElement(t,{ref:o})})}const Fc=({children:t,initial:e,isPresent:n,onExitComplete:s,custom:i,presenceAffectsLayout:o,mode:r,anchorX:a,root:l})=>{const u=hn(Bc),c=T.useId();let f=!0,d=T.useMemo(()=>(f=!1,{id:c,initial:e,isPresent:n,custom:i,onExitComplete:m=>{u.set(m,!0);for(const p of u.values())if(!p)return;s&&s()},register:m=>(u.set(m,!1),()=>u.delete(m))}),[n,u,s]);return o&&f&&(d={...d}),T.useMemo(()=>{u.forEach((m,p)=>u.set(p,!1))},[n]),P.useEffect(()=>{!n&&!u.size&&s&&s()},[n]),r==="popLayout"&&(t=h.jsx(Lc,{isPresent:n,anchorX:a,root:l,children:t})),h.jsx(Ve.Provider,{value:d,children:t})};function Bc(){return new Map}function hr(t=!0){const e=T.useContext(Ve);if(e===null)return[!0,null];const{isPresent:n,onExitComplete:s,register:i}=e,o=T.useId();T.useEffect(()=>{if(t)return i(o)},[t]);const r=T.useCallback(()=>t&&s&&s(o),[o,s,t]);return!n&&s?[!1,r]:[!0]}const _e=t=>t.key||"";function mr(t){const e=[];return T.Children.forEach(t,n=>{T.isValidElement(n)&&e.push(n)}),e}const ss=({children:t,custom:e,initial:n=!0,onExitComplete:s,presenceAffectsLayout:i=!0,mode:o="sync",propagate:r=!1,anchorX:a="left",root:l})=>{const[u,c]=hr(r),f=T.useMemo(()=>mr(t),[t]),d=r&&!u?[]:f.map(_e),m=T.useRef(!0),p=T.useRef(f),g=hn(()=>new Map),[x,y]=T.useState(f),[w,v]=T.useState(f);ei(()=>{m.current=!1,p.current=f;for(let C=0;C<w.length;C++){const A=_e(w[C]);d.includes(A)?g.delete(A):g.get(A)!==!0&&g.set(A,!1)}},[w,d.length,d.join("-")]);const E=[];if(f!==x){let C=[...f];for(let A=0;A<w.length;A++){const R=w[A],N=_e(R);d.includes(N)||(C.splice(A,0,R),E.push(R))}return o==="wait"&&E.length&&(C=E),v(mr(C)),y(f),null}process.env.NODE_ENV!=="production"&&o==="wait"&&w.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);const{forceRender:S}=T.useContext(dn);return h.jsx(h.Fragment,{children:w.map(C=>{const A=_e(C),R=r&&!u?!1:f===w||d.includes(A),N=()=>{if(g.has(A))g.set(A,!0);else return;let O=!0;g.forEach(U=>{U||(O=!1)}),O&&(S?.(),v(p.current),r&&c?.(),s&&s())};return h.jsx(Fc,{isPresent:R,initial:!m.current||n?void 0:!1,custom:e,presenceAffectsLayout:i,mode:o,root:l,onExitComplete:R?void 0:N,anchorX:a,children:C},A)})})},pr=T.createContext({strict:!1}),gr={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"]},Gt={};for(const t in gr)Gt[t]={isEnabled:e=>gr[t].some(n=>!!e[n])};function _c(t){for(const e in t)Gt[e]={...Gt[e],...t[e]}}const $c=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 $e(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||$c.has(t)}let yr=t=>!$e(t);function Wc(t){typeof t=="function"&&(yr=e=>e.startsWith("on")?!$e(e):t(e))}try{Wc(require("@emotion/is-prop-valid").default)}catch{}function Uc(t,e,n){const s={};for(const i in t)i==="values"&&typeof t.values=="object"||(yr(i)||n===!0&&$e(i)||!e&&!$e(i)||t.draggable&&i.startsWith("onDrag"))&&(s[i]=t[i]);return s}const We=T.createContext({});function Ue(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}function ge(t){return typeof t=="string"||Array.isArray(t)}const is=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],rs=["initial",...is];function ze(t){return Ue(t.animate)||rs.some(e=>ge(t[e]))}function vr(t){return!!(ze(t)||t.variants)}function zc(t,e){if(ze(t)){const{initial:n,animate:s}=t;return{initial:n===!1||ge(n)?n:void 0,animate:ge(s)?s:void 0}}return t.inherit!==!1?e:{}}function Kc(t){const{initial:e,animate:n}=zc(t,T.useContext(We));return T.useMemo(()=>({initial:e,animate:n}),[xr(e),xr(n)])}function xr(t){return Array.isArray(t)?t.join(" "):t}const ye={};function Yc(t){for(const e in t)ye[e]=t[e],Pn(e)&&(ye[e].isCSSVariable=!0)}function br(t,{layout:e,layoutId:n}){return Yt.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!ye[t]||t==="opacity")}const Hc={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Gc=Kt.length;function Xc(t,e,n){let s="",i=!0;for(let o=0;o<Gc;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=sr(a,Jn[r]);if(!l){i=!1;const c=Hc[r]||r;s+=`${c}(${u}) `}n&&(e[r]=u)}}return s=s.trim(),n?s=n(e,i?"":s):i&&(s="none"),s}function os(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(Yt.has(l)){r=!0;continue}else if(Pn(l)){i[l]=u;continue}else{const c=sr(u,Jn[l]);l.startsWith("origin")?(a=!0,o[l]=c):s[l]=c}}if(e.transform||(r||n?s.transform=Xc(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 as=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function wr(t,e,n){for(const s in e)!H(e[s])&&!br(s,n)&&(t[s]=e[s])}function qc({transformTemplate:t},e){return T.useMemo(()=>{const n=as();return os(n,e,t),Object.assign({},n.vars,n.style)},[e])}function Zc(t,e){const n=t.style||{},s={};return wr(s,n,t),Object.assign(s,qc(t,e)),s}function Jc(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 Qc={offset:"stroke-dashoffset",array:"stroke-dasharray"},tu={offset:"strokeDashoffset",array:"strokeDasharray"};function eu(t,e,n=1,s=0,i=!0){t.pathLength=1;const o=i?Qc:tu;t[o.offset]=j.transform(-s);const r=j.transform(e),a=j.transform(n);t[o.array]=`${r} ${a}`}function Tr(t,{attrX:e,attrY:n,attrScale:s,pathLength:i,pathSpacing:o=1,pathOffset:r=0,...a},l,u,c){if(os(t,a,u),l){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:f,style:d}=t;f.transform&&(d.transform=f.transform,delete f.transform),(d.transform||f.transformOrigin)&&(d.transformOrigin=f.transformOrigin??"50% 50%",delete f.transformOrigin),d.transform&&(d.transformBox=c?.transformBox??"fill-box",delete f.transformBox),e!==void 0&&(f.x=e),n!==void 0&&(f.y=n),s!==void 0&&(f.scale=s),i!==void 0&&eu(f,i,o,r,!1)}const Sr=()=>({...as(),attrs:{}}),Pr=t=>typeof t=="string"&&t.toLowerCase()==="svg";function nu(t,e,n,s){const i=T.useMemo(()=>{const o=Sr();return Tr(o,e,Pr(s),t.transformTemplate,t.style),{...o.attrs,style:{...o.style}}},[e]);if(t.style){const o={};wr(o,t.style,t),i.style={...o,...i.style}}return i}const su=["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 ls(t){return typeof t!="string"||t.includes("-")?!1:!!(su.indexOf(t)>-1||/[A-Z]/u.test(t))}function iu(t,e,n,{latestValues:s},i,o=!1){const a=(ls(t)?nu:Jc)(e,s,i,t),l=Uc(e,typeof t=="string",o),u=t!==T.Fragment?{...l,...a,ref:n}:{},{children:c}=e,f=T.useMemo(()=>H(c)?c.get():c,[c]);return T.createElement(t,{...u,children:f})}function Cr(t){const e=[{},{}];return t?.values.forEach((n,s)=>{e[0][s]=n.get(),e[1][s]=n.getVelocity()}),e}function cs(t,e,n,s){if(typeof e=="function"){const[i,o]=Cr(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]=Cr(s);e=e(n!==void 0?n:t.custom,i,o)}return e}function Ke(t){return H(t)?t.get():t}function ru({scrapeMotionValuesFromProps:t,createRenderState:e},n,s,i){return{latestValues:ou(n,s,i,t),renderState:e()}}function ou(t,e,n,s){const i={},o=s(t,{});for(const d in o)i[d]=Ke(o[d]);let{initial:r,animate:a}=t;const l=ze(t),u=vr(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 f=c?a:r;if(f&&typeof f!="boolean"&&!Ue(f)){const d=Array.isArray(f)?f:[f];for(let m=0;m<d.length;m++){const p=cs(t,d[m]);if(p){const{transitionEnd:g,transition:x,...y}=p;for(const w in y){let v=y[w];if(Array.isArray(v)){const E=c?v.length-1:0;v=v[E]}v!==null&&(i[w]=v)}for(const w in g)i[w]=g[w]}}}return i}const Er=t=>(e,n)=>{const s=T.useContext(We),i=T.useContext(Ve),o=()=>ru(t,e,s,i);return n?o():hn(o)};function us(t,e,n){const{style:s}=t,i={};for(const o in s)(H(s[o])||e.style&&H(e.style[o])||br(o,t)||n?.getValue(o)?.liveStyle!==void 0)&&(i[o]=s[o]);return i}const au=Er({scrapeMotionValuesFromProps:us,createRenderState:as});function Ar(t,e,n){const s=us(t,e,n);for(const i in t)if(H(t[i])||H(e[i])){const o=Kt.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;s[o]=t[i]}return s}const lu=Er({scrapeMotionValuesFromProps:Ar,createRenderState:Sr}),cu=Symbol.for("motionComponentSymbol");function Xt(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function uu(t,e,n){return T.useCallback(s=>{s&&t.onMount&&t.onMount(s),e&&(s?e.mount(s):e.unmount()),n&&(typeof n=="function"?n(s):Xt(n)&&(n.current=s))},[e])}const fs=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Rr="data-"+fs("framerAppearId"),jr=T.createContext({});function fu(t,e,n,s,i){const{visualElement:o}=T.useContext(We),r=T.useContext(pr),a=T.useContext(Ve),l=T.useContext(ns).reducedMotion,u=T.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,f=T.useContext(jr);c&&!c.projection&&i&&(c.type==="html"||c.type==="svg")&&du(u.current,n,i,f);const d=T.useRef(!1);T.useInsertionEffect(()=>{c&&d.current&&c.update(n,a)});const m=n[Rr],p=T.useRef(!!m&&!window.MotionHandoffIsComplete?.(m)&&window.MotionHasOptimisedAnimation?.(m));return ei(()=>{c&&(d.current=!0,window.MotionIsMounted=!0,c.updateFeatures(),c.scheduleRenderMicrotask(),p.current&&c.animationState&&c.animationState.animateChanges())}),T.useEffect(()=>{c&&(!p.current&&c.animationState&&c.animationState.animateChanges(),p.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(m)}),p.current=!1),c.enteringChildren=void 0)}),c}function du(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:Mr(t.parent)),t.projection.setOptions({layoutId:i,layout:o,alwaysMeasureLayout:!!r||a&&Xt(a),visualElement:t,animationType:typeof o=="string"?o:"both",initialPromotionConfig:s,crossfade:c,layoutScroll:l,layoutRoot:u})}function Mr(t){if(t)return t.options.allowProjection!==!1?t.projection:Mr(t.parent)}function ds(t,{forwardMotionProps:e=!1}={},n,s){n&&_c(n);const i=ls(t)?lu:au;function o(a,l){let u;const c={...T.useContext(ns),...a,layoutId:hu(a)},{isStatic:f}=c,d=Kc(a),m=i(a,f);if(!f&&mn){mu(c,n);const p=pu(c);u=p.MeasureLayout,d.visualElement=fu(t,m,c,s,p.ProjectionNode)}return h.jsxs(We.Provider,{value:d,children:[u&&d.visualElement?h.jsx(u,{visualElement:d.visualElement,...c}):null,iu(t,a,uu(m,d.visualElement,l),m,f,e)]})}o.displayName=`motion.${typeof t=="string"?t:`create(${t.displayName??t.name??""})`}`;const r=T.forwardRef(o);return r[cu]=t,r}function hu({layoutId:t}){const e=T.useContext(dn).id;return e&&t!==void 0?e+"-"+t:t}function mu(t,e){const n=T.useContext(pr).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?$t(!1,s,"lazy-strict-mode"):wt(!1,s,"lazy-strict-mode")}}function pu(t){const{drag:e,layout:n}=Gt;if(!e&&!n)return{};const s={...e,...n};return{MeasureLayout:e?.isEnabled(t)||n?.isEnabled(t)?s.MeasureLayout:void 0,ProjectionNode:s.ProjectionNode}}function gu(t,e){if(typeof Proxy>"u")return ds;const n=new Map,s=(o,r)=>ds(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,ds(r,void 0,t,e)),n.get(r))})}function Dr({top:t,left:e,right:n,bottom:s}){return{x:{min:e,max:n},y:{min:t,max:s}}}function yu({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function vu(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 hs(t){return t===void 0||t===1}function ms({scale:t,scaleX:e,scaleY:n}){return!hs(t)||!hs(e)||!hs(n)}function Ot(t){return ms(t)||Vr(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function Vr(t){return kr(t.x)||kr(t.y)}function kr(t){return t&&t!=="0%"}function Ye(t,e,n){const s=t-n,i=e*s;return n+i}function Nr(t,e,n,s,i){return i!==void 0&&(t=Ye(t,i,s)),Ye(t,n,s)+e}function ps(t,e=0,n=1,s,i){t.min=Nr(t.min,e,n,s,i),t.max=Nr(t.max,e,n,s,i)}function Or(t,{x:e,y:n}){ps(t.x,e.translate,e.scale,e.originPoint),ps(t.y,n.translate,n.scale,n.originPoint)}const Ir=.999999999999,Lr=1.0000000000001;function xu(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&&Zt(t,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),r&&(e.x*=r.x.scale,e.y*=r.y.scale,Or(t,r)),s&&Ot(o.latestValues)&&Zt(t,o.latestValues))}e.x<Lr&&e.x>Ir&&(e.x=1),e.y<Lr&&e.y>Ir&&(e.y=1)}function qt(t,e){t.min=t.min+e,t.max=t.max+e}function Fr(t,e,n,s,i=.5){const o=F(t.min,t.max,i);ps(t,e,n,o,s)}function Zt(t,e){Fr(t.x,e.x,e.scaleX,e.scale,e.originX),Fr(t.y,e.y,e.scaleY,e.scale,e.originY)}function Br(t,e){return Dr(vu(t.getBoundingClientRect(),e))}function bu(t,e,n){const s=Br(t,n),{scroll:i}=e;return i&&(qt(s.x,i.offset.x),qt(s.y,i.offset.y)),s}const _r=()=>({translate:0,scale:1,origin:0,originPoint:0}),Jt=()=>({x:_r(),y:_r()}),$r=()=>({min:0,max:0}),W=()=>({x:$r(),y:$r()}),gs={current:null},Wr={current:!1};function wu(){if(Wr.current=!0,!!mn)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>gs.current=t.matches;t.addEventListener("change",e),e()}else gs.current=!1}const Tu=new WeakMap;function Su(t,e,n){for(const s in e){const i=e[s],o=n[s];if(H(i))t.addValue(s,i);else if(H(o))t.addValue(s,Ht(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,Ht(r!==void 0?r:i,{owner:t}))}}for(const s in n)e[s]===void 0&&t.removeValue(s);return e}const Ur=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Pu{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=Gn,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 d=Q.now();this.renderScheduledAt<d&&(this.renderScheduledAt=d,L.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=ze(n),this.isVariantNode=vr(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:c,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const d in f){const m=f[d];l[d]!==void 0&&H(m)&&m.set(l[d])}}mount(e){this.current=e,Tu.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)),Wr.current||wu(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:gs.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(),Pt(this.notifyUpdate),Pt(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=Yt.has(e);s&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",r=>{this.latestValues[e]=r,this.props.onUpdate&&L.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 Gt){const n=Gt[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):W()}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<Ur.length;s++){const i=Ur[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=Su(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=Ht(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"&&(ni(s)||ii(s))?s=parseFloat(s):!Oc(s)&&Et.test(n)&&(s=nr(e,n)),this.setBaseTarget(e,H(s)?s.get():s)),H(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=cs(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&&!H(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 xn),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}scheduleRenderMicrotask(){Qn.render(this.render)}}class zr extends Pu{constructor(){super(...arguments),this.KeyframeResolver=Sc}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;H(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function Kr(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 Cu(t){return window.getComputedStyle(t)}class Eu extends zr{constructor(){super(...arguments),this.type="html",this.renderInstance=Kr}readValueFromInstance(e,n){if(Yt.has(n))return this.projection?.isProjecting?Un(n):Wl(e,n);{const s=Cu(e),i=(Pn(n)?s.getPropertyValue(n):s[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(e,{transformPagePoint:n}){return Br(e,n)}build(e,n,s){os(e,n,s.transformTemplate)}scrapeMotionValuesFromProps(e,n,s){return us(e,n,s)}}const Yr=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 Au(t,e,n,s){Kr(t,e,void 0,s);for(const i in e.attrs)t.setAttribute(Yr.has(i)?i:fs(i),e.attrs[i])}class Ru extends zr{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=W}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(Yt.has(n)){const s=er(n);return s&&s.default||0}return n=Yr.has(n)?n:fs(n),e.getAttribute(n)}scrapeMotionValuesFromProps(e,n,s){return Ar(e,n,s)}build(e,n,s){Tr(e,n,this.isSVGTag,s.transformTemplate,s.style)}renderInstance(e,n,s,i){Au(e,n,s,i)}mount(e){this.isSVGTag=Pr(e.tagName),super.mount(e)}}const ju=(t,e)=>ls(t)?new Ru(e):new Eu(e,{allowProjection:t!==T.Fragment});function Qt(t,e,n){const s=t.getProps();return cs(s,e,n!==void 0?n:s.custom,t)}const ys=t=>Array.isArray(t);function Mu(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,Ht(n))}function Du(t){return ys(t)?t[t.length-1]||0:t}function Vu(t,e){const n=Qt(t,e);let{transitionEnd:s={},transition:i={},...o}=n||{};o={...o,...s};for(const r in o){const a=Du(o[r]);Mu(t,r,a)}}function ku(t){return!!(H(t)&&t.add)}function vs(t,e){const n=t.getValue("willChange");if(ku(n))return n.add(e);if(!n&&Tt.WillChange){const s=new Tt.WillChange("auto");t.addValue("willChange",s),s.add(e)}}function Hr(t){return t.props[Rr]}const Nu=t=>t!==null;function Ou(t,{repeat:e,repeatType:n="loop"},s){const i=t.filter(Nu),o=e&&n!=="loop"&&e%2===1?0:i.length-1;return i[o]}const Iu={type:"spring",stiffness:500,damping:25,restSpeed:10},Lu=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),Fu={type:"keyframes",duration:.8},Bu={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},_u=(t,{keyframes:e})=>e.length>2?Fu:Yt.has(t)?t.startsWith("scale")?Lu(e[1]):Iu:Bu;function $u({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=qn(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:d=>{e.set(d),a.onUpdate&&a.onUpdate(d)},onComplete:()=>{r(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:o?void 0:i};$u(a)||Object.assign(c,_u(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 f=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(Xn(c),c.delay===0&&(f=!0)),(Tt.instantAnimations||Tt.skipAnimations)&&(f=!0,Xn(c),c.delay=0),c.allowFlatten=!a.type&&!a.ease,f&&!o&&e.get()!==void 0){const d=Ou(c.keyframes,a);if(d!==void 0){L.update(()=>{c.onUpdate(d),c.onComplete()});return}}return a.isSync?new _n(c):new fc(c)};function Wu({protectedKeys:t,needsAnimating:e},n){const s=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,s}function Gr(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 f=t.getValue(c,t.latestValues[c]??null),d=a[c];if(d===void 0||u&&Wu(u,c))continue;const m={delay:n,...qn(o||{},c)},p=f.get();if(p!==void 0&&!f.isAnimating&&!Array.isArray(d)&&d===p&&!m.velocity)continue;let g=!1;if(window.MotionHandoffAnimation){const y=Hr(t);if(y){const w=window.MotionHandoffAnimation(y,c,L);w!==null&&(m.startTime=w,g=!0)}}vs(t,c),f.start(xs(c,f,d,t.shouldReduceMotion&&qi.has(c)?{type:!1}:m,t,g));const x=f.animation;x&&l.push(x)}return r&&Promise.all(l).then(()=>{L.update(()=>{r&&Vu(t,r)})}),l}function Xr(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 bs(t,e,n={}){const s=Qt(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(Gr(t,s,n)):()=>Promise.resolve(),r=t.variantChildren&&t.variantChildren.size?(l=0)=>{const{delayChildren:u=0,staggerChildren:c,staggerDirection:f}=i;return Uu(t,e,l,u,c,f,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 Uu(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(bs(l,e,{...r,delay:n+(typeof s=="function"?0:s)+Xr(t.variantChildren,l,s,i,o)}).then(()=>l.notify("AnimationComplete",e)));return Promise.all(a)}function zu(t,e,n={}){t.notify("AnimationStart",e);let s;if(Array.isArray(e)){const i=e.map(o=>bs(t,o,n));s=Promise.all(i)}else if(typeof e=="string")s=bs(t,e,n);else{const i=typeof e=="function"?Qt(t,e,n.custom):e;s=Promise.all(Gr(t,i,n))}return s.then(()=>{t.notify("AnimationComplete",e)})}function qr(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 Ku=rs.length;function Zr(t){if(!t)return;if(!t.isControllingVariants){const n=t.parent?Zr(t.parent)||{}:{};return t.props.initial!==void 0&&(n.initial=t.props.initial),n}const e={};for(let n=0;n<Ku;n++){const s=rs[n],i=t.props[s];(ge(i)||i===!1)&&(e[s]=i)}return e}const Yu=[...is].reverse(),Hu=is.length;function Gu(t){return e=>Promise.all(e.map(({animation:n,options:s})=>zu(t,n,s)))}function Xu(t){let e=Gu(t),n=Jr(),s=!0;const i=l=>(u,c)=>{const f=Qt(t,c,l==="exit"?t.presenceContext?.custom:void 0);if(f){const{transition:d,transitionEnd:m,...p}=f;u={...u,...p,...m}}return u};function o(l){e=l(t)}function r(l){const{props:u}=t,c=Zr(t.parent)||{},f=[],d=new Set;let m={},p=1/0;for(let x=0;x<Hu;x++){const y=Yu[x],w=n[y],v=u[y]!==void 0?u[y]:c[y],E=ge(v),S=y===l?w.isActive:null;S===!1&&(p=x);let C=v===c[y]&&v!==u[y]&&E;if(C&&s&&t.manuallyAnimateOnMount&&(C=!1),w.protectedKeys={...m},!w.isActive&&S===null||!v&&!w.prevProp||Ue(v)||typeof v=="boolean")continue;const A=qu(w.prevProp,v);let R=A||y===l&&w.isActive&&!C&&E||x>p&&E,N=!1;const O=Array.isArray(v)?v:[v];let U=O.reduce(i(y),{});S===!1&&(U={});const{prevResolvedValues:et={}}=w,I={...et,...U},K=_=>{R=!0,d.has(_)&&(N=!0,d.delete(_)),w.needsAnimating[_]=!0;const k=t.getValue(_);k&&(k.liveStyle=!1)};for(const _ in I){const k=U[_],J=et[_];if(m.hasOwnProperty(_))continue;let b=!1;ys(k)&&ys(J)?b=!qr(k,J):b=k!==J,b?k!=null?K(_):d.add(_):k!==void 0&&d.has(_)?K(_):w.protectedKeys[_]=!0}w.prevProp=v,w.prevResolvedValues=U,w.isActive&&(m={...m,...U}),s&&t.blockInitialAnimation&&(R=!1);const vt=C&&A;R&&(!vt||N)&&f.push(...O.map(_=>{const k={type:y};if(typeof _=="string"&&s&&!vt&&t.manuallyAnimateOnMount&&t.parent){const{parent:J}=t,b=Qt(J,_);if(J.enteringChildren&&b){const{delayChildren:D}=b.transition||{};k.delay=Xr(J.enteringChildren,t,D)}}return{animation:_,options:k}}))}if(d.size){const x={};if(typeof u.initial!="boolean"){const y=Qt(t,Array.isArray(u.initial)?u.initial[0]:u.initial);y&&y.transition&&(x.transition=y.transition)}d.forEach(y=>{const w=t.getBaseTarget(y),v=t.getValue(y);v&&(v.liveStyle=!0),x[y]=w??null}),f.push({animation:x})}let g=!!f.length;return s&&(u.initial===!1||u.initial===u.animate)&&!t.manuallyAnimateOnMount&&(g=!1),s=!1,g?e(f):Promise.resolve()}function a(l,u){if(n[l].isActive===u)return Promise.resolve();t.variantChildren?.forEach(f=>f.animationState?.setActive(l,u)),n[l].isActive=u;const c=r(l);for(const f in n)n[f].protectedKeys={};return c}return{animateChanges:r,setActive:a,setAnimateFunction:o,getState:()=>n,reset:()=>{n=Jr(),s=!0}}}function qu(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!qr(e,t):!1}function It(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Jr(){return{animate:It(!0),whileInView:It(),whileHover:It(),whileTap:It(),whileDrag:It(),whileFocus:It(),exit:It()}}class At{constructor(e){this.isMounted=!1,this.node=e}update(){}}class Zu extends At{constructor(e){super(e),e.animationState||(e.animationState=Xu(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();Ue(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 Ju=0;class Qu extends At{constructor(){super(...arguments),this.id=Ju++}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 tf={animation:{Feature:Zu},exit:{Feature:Qu}};function ve(t,e,n,s={passive:!0}){return t.addEventListener(e,n,s),()=>t.removeEventListener(e,n)}function xe(t){return{point:{x:t.pageX,y:t.pageY}}}const ef=t=>e=>ts(e)&&t(e,xe(e));function be(t,e,n,s){return ve(t,e,ef(n),s)}const Qr=1e-4,nf=1-Qr,sf=1+Qr,to=.01,rf=0-to,of=0+to;function Z(t){return t.max-t.min}function af(t,e,n){return Math.abs(t-e)<=n}function eo(t,e,n,s=.5){t.origin=s,t.originPoint=F(e.min,e.max,t.origin),t.scale=Z(n)/Z(e),t.translate=F(n.min,n.max,t.origin)-t.originPoint,(t.scale>=nf&&t.scale<=sf||isNaN(t.scale))&&(t.scale=1),(t.translate>=rf&&t.translate<=of||isNaN(t.translate))&&(t.translate=0)}function we(t,e,n,s){eo(t.x,e.x,n.x,s?s.originX:void 0),eo(t.y,e.y,n.y,s?s.originY:void 0)}function no(t,e,n){t.min=n.min+e.min,t.max=t.min+Z(e)}function lf(t,e,n){no(t.x,e.x,n.x),no(t.y,e.y,n.y)}function so(t,e,n){t.min=e.min-n.min,t.max=t.min+Z(e)}function Te(t,e,n){so(t.x,e.x,n.x),so(t.y,e.y,n.y)}function st(t){return[t("x"),t("y")]}const io=({current:t})=>t?t.ownerDocument.defaultView:null,ro=(t,e)=>Math.abs(t-e);function cf(t,e){const n=ro(t.x,e.x),s=ro(t.y,e.y);return Math.sqrt(n**2+s**2)}class oo{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 d=Ts(this.lastMoveEventInfo,this.history),m=this.startEvent!==null,p=cf(d.offset,{x:0,y:0})>=this.distanceThreshold;if(!m&&!p)return;const{point:g}=d,{timestamp:x}=Y;this.history.push({...g,timestamp:x});const{onStart:y,onMove:w}=this.handlers;m||(y&&y(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),w&&w(this.lastMoveEvent,d)},this.handlePointerMove=(d,m)=>{this.lastMoveEvent=d,this.lastMoveEventInfo=ws(m,this.transformPagePoint),L.update(this.updatePoint,!0)},this.handlePointerUp=(d,m)=>{this.end();const{onEnd:p,onSessionEnd:g,resumeAnimation:x}=this.handlers;if(this.dragSnapToOrigin&&x&&x(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const y=Ts(d.type==="pointercancel"?this.lastMoveEventInfo:ws(m,this.transformPagePoint),this.history);this.startEvent&&p&&p(d,y),g&&g(d,y)},!ts(e))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=s,this.distanceThreshold=r,this.contextWindow=i||window;const a=xe(e),l=ws(a,this.transformPagePoint),{point:u}=l,{timestamp:c}=Y;this.history=[{...u,timestamp:c}];const{onSessionStart:f}=n;f&&f(e,Ts(l,this.history)),this.removeListeners=le(be(this.contextWindow,"pointermove",this.handlePointerMove),be(this.contextWindow,"pointerup",this.handlePointerUp),be(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),Pt(this.updatePoint)}}function ws(t,e){return e?{point:e(t.point)}:t}function ao(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Ts({point:t},e){return{point:t,delta:ao(t,lo(e)),offset:ao(t,uf(e)),velocity:ff(e,.1)}}function uf(t){return t[0]}function lo(t){return t[t.length-1]}function ff(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,s=null;const i=lo(t);for(;n>=0&&(s=t[n],!(i.timestamp-s.timestamp>ot(e)));)n--;if(!s)return{x:0,y:0};const o=ut(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 df(t,{min:e,max:n},s){return e!==void 0&&t<e?t=s?F(e,t,s.min):Math.max(t,e):n!==void 0&&t>n&&(t=s?F(n,t,s.max):Math.min(t,n)),t}function co(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 hf(t,{top:e,left:n,bottom:s,right:i}){return{x:co(t.x,n,i),y:co(t.y,e,s)}}function uo(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 mf(t,e){return{x:uo(t.x,e.x),y:uo(t.y,e.y)}}function pf(t,e){let n=.5;const s=Z(t),i=Z(e);return i>s?n=ce(e.min,e.max-s,t.min):s>i&&(n=ce(t.min,t.max-i,e.min)),bt(0,1,n)}function gf(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 Ss=.35;function yf(t=Ss){return t===!1?t=0:t===!0&&(t=Ss),{x:fo(t,"left","right"),y:fo(t,"top","bottom")}}function fo(t,e,n){return{min:ho(t,e),max:ho(t,n)}}function ho(t,e){return typeof t=="number"?t:t[e]||0}const vf=new WeakMap;class xf{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=W(),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=f=>{const{dragSnapToOrigin:d}=this.getProps();d?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(xe(f).point)},r=(f,d)=>{const{drag:m,dragPropagation:p,onDragStart:g}=this.getProps();if(m&&!p&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Ac(m),!this.openDragLock))return;this.latestPointerEvent=f,this.latestPanInfo=d,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),st(y=>{let w=this.getAxisMotionValue(y).get()||0;if(ft.test(w)){const{projection:v}=this.visualElement;if(v&&v.layout){const E=v.layout.layoutBox[y];E&&(w=Z(E)*(parseFloat(w)/100))}}this.originPoint[y]=w}),g&&L.postRender(()=>g(f,d)),vs(this.visualElement,"transform");const{animationState:x}=this.visualElement;x&&x.setActive("whileDrag",!0)},a=(f,d)=>{this.latestPointerEvent=f,this.latestPanInfo=d;const{dragPropagation:m,dragDirectionLock:p,onDirectionLock:g,onDrag:x}=this.getProps();if(!m&&!this.openDragLock)return;const{offset:y}=d;if(p&&this.currentDirection===null){this.currentDirection=bf(y),this.currentDirection!==null&&g&&g(this.currentDirection);return}this.updateAxis("x",d.point,y),this.updateAxis("y",d.point,y),this.visualElement.render(),x&&x(f,d)},l=(f,d)=>{this.latestPointerEvent=f,this.latestPanInfo=d,this.stop(f,d),this.latestPointerEvent=null,this.latestPanInfo=null},u=()=>st(f=>this.getAnimationState(f)==="paused"&&this.getAxisMotionValue(f).animation?.play()),{dragSnapToOrigin:c}=this.getProps();this.panSession=new oo(e,{onSessionStart:o,onStart:r,onMove:a,onSessionEnd:l,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,distanceThreshold:s,contextWindow:io(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&&L.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||!He(e,i,this.currentDirection))return;const o=this.getAxisMotionValue(e);let r=this.originPoint[e]+s[e];this.constraints&&this.constraints[e]&&(r=df(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&&Xt(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&s?this.constraints=hf(s.layoutBox,e):this.constraints=!1,this.elastic=yf(n),i!==this.constraints&&s&&this.constraints&&!this.hasMutatedConstraints&&st(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=gf(s.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!Xt(e))return!1;const s=e.current;wt(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=bu(s,i.root,this.visualElement.getTransformPagePoint());let r=mf(i.layout.layoutBox,o);if(n){const a=n(yu(r));this.hasMutatedConstraints=!!a,a&&(r=Dr(a))}return r}startAnimation(e){const{drag:n,dragMomentum:s,dragElastic:i,dragTransition:o,dragSnapToOrigin:r,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},u=st(c=>{if(!He(c,n,this.currentDirection))return;let f=l&&l[c]||{};r&&(f={min:0,max:0});const d=i?200:1e6,m=i?40:1e7,p={type:"inertia",velocity:s?e[c]:0,bounceStiffness:d,bounceDamping:m,timeConstant:750,restDelta:1,restSpeed:10,...o,...f};return this.startAxisValueAnimation(c,p)});return Promise.all(u).then(a)}startAxisValueAnimation(e,n){const s=this.getAxisMotionValue(e);return vs(this.visualElement,e),s.start(xs(e,s,0,n,this.visualElement,!1))}stopAnimation(){st(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){st(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){st(n=>{const{drag:s}=this.getProps();if(!He(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]-F(r,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:s}=this.visualElement;if(!Xt(n)||!s||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};st(r=>{const a=this.getAxisMotionValue(r);if(a&&this.constraints!==!1){const l=a.get();i[r]=pf({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(),st(r=>{if(!He(r,e,null))return;const a=this.getAxisMotionValue(r),{min:l,max:u}=this.constraints[r];a.set(F(l,u,i[r]))})}addListeners(){if(!this.visualElement.current)return;vf.set(this.visualElement,this);const e=this.visualElement.current,n=be(e,"pointerdown",l=>{const{drag:u,dragListener:c=!0}=this.getProps();u&&c&&this.start(l)}),s=()=>{const{dragConstraints:l}=this.getProps();Xt(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()),L.read(s);const r=ve(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",(({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&(st(c=>{const f=this.getAxisMotionValue(c);f&&(this.originPoint[c]+=l[c].translate,f.set(f.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=Ss,dragMomentum:a=!0}=e;return{...e,drag:n,dragDirectionLock:s,dragPropagation:i,dragConstraints:o,dragElastic:r,dragMomentum:a}}}function He(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function bf(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class wf extends At{constructor(e){super(e),this.removeGroupControls=nt,this.removeListeners=nt,this.controls=new xf(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||nt}unmount(){this.removeGroupControls(),this.removeListeners()}}const mo=t=>(e,n)=>{t&&L.postRender(()=>t(e,n))};class Tf extends At{constructor(){super(...arguments),this.removePointerDownListener=nt}onPointerDown(e){this.session=new oo(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:io(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:s,onPanEnd:i}=this.node.getProps();return{onSessionStart:mo(e),onStart:mo(n),onMove:s,onEnd:(o,r)=>{delete this.session,i&&L.postRender(()=>i(o,r))}}}mount(){this.removePointerDownListener=be(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 Ge={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function po(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const Se={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(j.test(t))t=parseFloat(t);else return t;const n=po(t,e.target.x),s=po(t,e.target.y);return`${n}% ${s}%`}},Sf={correct:(t,{treeScale:e,projectionDelta:n})=>{const s=t,i=Et.parse(t);if(i.length>5)return s;const o=Et.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=F(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 Ps=!1;class Pf extends T.Component{componentDidMount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s,layoutId:i}=this.props,{projection:o}=e;Yc(Cf),o&&(n.group&&n.group.add(o),s&&s.register&&i&&s.register(o),Ps&&o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),Ge.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:n,visualElement:s,drag:i,isPresent:o}=this.props,{projection:r}=s;return r&&(r.isPresent=o,Ps=!0,i||e.layoutDependency!==n||n===void 0||e.isPresent!==o?r.willUpdate():this.safeToRemove(),e.isPresent!==o&&(o?r.promote():r.relegate()||L.postRender(()=>{const a=r.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),Qn.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s}=this.props,{projection:i}=e;Ps=!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 go(t){const[e,n]=hr(),s=T.useContext(dn);return h.jsx(Pf,{...t,layoutGroup:s,switchLayoutGroup:T.useContext(jr),isPresent:e,safeToRemove:n})}const Cf={borderRadius:{...Se,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Se,borderTopRightRadius:Se,borderBottomLeftRadius:Se,borderBottomRightRadius:Se,boxShadow:Sf};function Ef(t,e,n){const s=H(t)?t:Ht(t);return s.start(xs("",s,e,n)),s.animation}const Af=(t,e)=>t.depth-e.depth;class Rf{constructor(){this.children=[],this.isDirty=!1}add(e){pn(this.children,e),this.isDirty=!0}remove(e){gn(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(Af),this.isDirty=!1,this.children.forEach(e)}}function jf(t,e){const n=Q.now(),s=({timestamp:i})=>{const o=i-n;o>=e&&(Pt(s),t(o-e))};return L.setup(s,!0),()=>Pt(s)}const yo=["TopLeft","TopRight","BottomLeft","BottomRight"],Mf=yo.length,vo=t=>typeof t=="string"?parseFloat(t):t,xo=t=>typeof t=="number"||j.test(t);function Df(t,e,n,s,i,o){i?(t.opacity=F(0,n.opacity??1,Vf(s)),t.opacityExit=F(e.opacity??1,0,kf(s))):o&&(t.opacity=F(e.opacity??1,n.opacity??1,s));for(let r=0;r<Mf;r++){const a=`border${yo[r]}Radius`;let l=bo(e,a),u=bo(n,a);if(l===void 0&&u===void 0)continue;l||(l=0),u||(u=0),l===0||u===0||xo(l)===xo(u)?(t[a]=Math.max(F(vo(l),vo(u),s),0),(ft.test(u)||ft.test(l))&&(t[a]+="%")):t[a]=u}(e.rotate||n.rotate)&&(t.rotate=F(e.rotate||0,n.rotate||0,s))}function bo(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const Vf=wo(0,.5,hi),kf=wo(.5,.95,nt);function wo(t,e,n){return s=>s<t?0:s>e?1:n(ce(t,e,s))}function To(t,e){t.min=e.min,t.max=e.max}function it(t,e){To(t.x,e.x),To(t.y,e.y)}function So(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function Po(t,e,n,s,i){return t-=e,t=Ye(t,1/n,s),i!==void 0&&(t=Ye(t,1/i,s)),t}function Nf(t,e=0,n=1,s=.5,i,o=t,r=t){if(ft.test(e)&&(e=parseFloat(e),e=F(r.min,r.max,e/100)-r.min),typeof e!="number")return;let a=F(o.min,o.max,s);t===o&&(a-=e),t.min=Po(t.min,e,n,a,i),t.max=Po(t.max,e,n,a,i)}function Co(t,e,[n,s,i],o,r){Nf(t,e[n],e[s],e[i],e.scale,o,r)}const Of=["x","scaleX","originX"],If=["y","scaleY","originY"];function Eo(t,e,n,s){Co(t.x,e,Of,n?n.x:void 0,s?s.x:void 0),Co(t.y,e,If,n?n.y:void 0,s?s.y:void 0)}function Ao(t){return t.translate===0&&t.scale===1}function Ro(t){return Ao(t.x)&&Ao(t.y)}function jo(t,e){return t.min===e.min&&t.max===e.max}function Lf(t,e){return jo(t.x,e.x)&&jo(t.y,e.y)}function Mo(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function Do(t,e){return Mo(t.x,e.x)&&Mo(t.y,e.y)}function Vo(t){return Z(t.x)/Z(t.y)}function ko(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}class Ff{constructor(){this.members=[]}add(e){pn(this.members,e),e.scheduleRender()}remove(e){if(gn(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 Bf(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:f,rotateY:d,skewX:m,skewY:p}=n;u&&(s=`perspective(${u}px) ${s}`),c&&(s+=`rotate(${c}deg) `),f&&(s+=`rotateX(${f}deg) `),d&&(s+=`rotateY(${d}deg) `),m&&(s+=`skewX(${m}deg) `),p&&(s+=`skewY(${p}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 Cs=["","X","Y","Z"],_f=1e3;let $f=0;function Es(t,e,n,s){const{latestValues:i}=e;i[t]&&(n[t]=i[t],e.setStaticValue(t,0),s&&(s[t]=0))}function No(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=Hr(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:o}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",L,!(i||o))}const{parent:s}=t;s&&!s.hasCheckedOptimisedAppear&&No(s)}function Oo({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:s,resetTransform:i}){return class{constructor(r={},a=e?.()){this.id=$f++,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(zf),this.nodes.forEach(Gf),this.nodes.forEach(Xf),this.nodes.forEach(Kf)},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 Rf)}addEventListener(r,a){return this.eventHandlers.has(r)||this.eventHandlers.set(r,new xn),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=dr(r)&&!kc(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,f=0;const d=()=>this.root.updateBlockedByResize=!1;L.read(()=>{f=window.innerWidth}),t(r,()=>{const m=window.innerWidth;m!==f&&(f=m,this.root.updateBlockedByResize=!0,c&&c(),c=jf(d,250),Ge.hasAnimatedSinceResize&&(Ge.hasAnimatedSinceResize=!1,this.nodes.forEach(Fo)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&u&&(a||l)&&this.addEventListener("didUpdate",({delta:c,hasLayoutChanged:f,hasRelativeLayoutChanged:d,layout:m})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const p=this.options.transition||u.getDefaultTransition()||td,{onLayoutAnimationStart:g,onLayoutAnimationComplete:x}=u.getProps(),y=!this.targetLayout||!Do(this.targetLayout,m),w=!f&&d;if(this.options.layoutRoot||this.resumeFrom||w||f&&(y||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const v={...qn(p,"layout"),onPlay:g,onComplete:x};(u.shouldReduceMotion||this.options.layoutRoot)&&(v.delay=0,v.type=!1),this.startAnimation(v),this.setAnimationOrigin(c,w)}else f||Fo(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=m})}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(),Pt(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(qf),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&&No(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let c=0;c<this.path.length;c++){const f=this.path[c];f.shouldResetTransform=!0,f.updateScroll("snapshot"),f.options.layoutRoot&&f.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(Io);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Lo);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Hf),this.nodes.forEach(Wf),this.nodes.forEach(Uf)):this.nodes.forEach(Lo),this.clearAllSnapshots();const a=Q.now();Y.delta=bt(0,1e3/60,a-Y.timestamp),Y.timestamp=a,Y.isProcessing=!0,Sn.update.process(Y),Sn.preRender.process(Y),Sn.render.process(Y),Y.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Qn.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Yf),this.sharedNodes.forEach(Zf)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,L.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){L.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Z(this.snapshot.measuredBox.x)&&!Z(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=W(),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&&!Ro(this.projectionDelta),l=this.getTransformTemplate(),u=l?l(this.latestValues,""):void 0,c=u!==this.prevTransformTemplateValue;r&&this.instance&&(a||Ot(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)),ed(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:r}=this.options;if(!r)return W();const a=r.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(nd))){const{scroll:u}=this.root;u&&(qt(a.x,u.offset.x),qt(a.y,u.offset.y))}return a}removeElementScroll(r){const a=W();if(it(a,r),this.scroll?.wasRoot)return a;for(let l=0;l<this.path.length;l++){const u=this.path[l],{scroll:c,options:f}=u;u!==this.root&&c&&f.layoutScroll&&(c.wasRoot&&it(a,r),qt(a.x,c.offset.x),qt(a.y,c.offset.y))}return a}applyTransform(r,a=!1){const l=W();it(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&&Zt(l,{x:-c.scroll.offset.x,y:-c.scroll.offset.y}),Ot(c.latestValues)&&Zt(l,c.latestValues)}return Ot(this.latestValues)&&Zt(l,this.latestValues),l}removeTransform(r){const a=W();it(a,r);for(let l=0;l<this.path.length;l++){const u=this.path[l];if(!u.instance||!Ot(u.latestValues))continue;ms(u.latestValues)&&u.updateSnapshot();const c=W(),f=u.measurePageBox();it(c,f),Eo(a,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,c)}return Ot(this.latestValues)&&Eo(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!==Y.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:f}=this.options;if(!(!this.layout||!(c||f))){if(this.resolvedRelativeTargetAt=Y.timestamp,!this.targetDelta&&!this.relativeTarget){const d=this.getClosestProjectingParent();d&&d.layout&&this.animationProgress!==1?(this.relativeParent=d,this.forceRelativeParentToResolveTarget(),this.relativeTarget=W(),this.relativeTargetOrigin=W(),Te(this.relativeTargetOrigin,this.layout.layoutBox,d.layout.layoutBox),it(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=W(),this.targetWithTransforms=W()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),lf(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):it(this.target,this.layout.layoutBox),Or(this.target,this.targetDelta)):it(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const d=this.getClosestProjectingParent();d&&!!d.resumingFrom==!!this.resumingFrom&&!d.options.layoutScroll&&d.target&&this.animationProgress!==1?(this.relativeParent=d,this.forceRelativeParentToResolveTarget(),this.relativeTarget=W(),this.relativeTargetOrigin=W(),Te(this.relativeTargetOrigin,this.target,d.target),it(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||ms(this.parent.latestValues)||Vr(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===Y.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;it(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,d=this.treeScale.y;xu(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=W());const{target:m}=r;if(!m){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(So(this.prevProjectionDelta.x,this.projectionDelta.x),So(this.prevProjectionDelta.y,this.projectionDelta.y)),we(this.projectionDelta,this.layoutCorrected,m,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==d||!ko(this.projectionDelta.x,this.prevProjectionDelta.x)||!ko(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",m))}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},f=Jt();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const d=W(),m=l?l.source:void 0,p=this.layout?this.layout.source:void 0,g=m!==p,x=this.getStack(),y=!x||x.members.length<=1,w=!!(g&&!y&&this.options.crossfade===!0&&!this.path.some(Qf));this.animationProgress=0;let v;this.mixTargetDelta=E=>{const S=E/1e3;Bo(f.x,r.x,S),Bo(f.y,r.y,S),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Te(d,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Jf(this.relativeTarget,this.relativeTargetOrigin,d,S),v&&Lf(this.relativeTarget,v)&&(this.isProjectionDirty=!1),v||(v=W()),it(v,this.relativeTarget)),g&&(this.animationValues=c,Df(c,u,this.latestValues,S,w,y)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=S},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(r){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(Pt(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=L.update(()=>{Ge.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Ht(0)),this.currentAnimation=Ef(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(_f),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&&zo(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||W();const f=Z(this.layout.layoutBox.x);l.x.min=r.target.x.min,l.x.max=l.x.min+f;const d=Z(this.layout.layoutBox.y);l.y.min=r.target.y.min,l.y.max=l.y.min+d}it(a,l),Zt(a,c),we(this.projectionDeltaWithTransform,this.layoutCorrected,a,c)}}registerSharedNode(r,a){this.sharedNodes.has(r)||this.sharedNodes.set(r,new Ff),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&&Es("z",r,u,this.animationValues);for(let c=0;c<Cs.length;c++)Es(`rotate${Cs[c]}`,r,u,this.animationValues),Es(`skew${Cs[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=Ke(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=Ke(a?.pointerEvents)||""),this.hasProjected&&!Ot(this.latestValues)&&(r.transform=l?l({},""):"none",this.hasProjected=!1);return}r.visibility="";const c=u.animationValues||u.latestValues;this.applyTransformsToTarget();let f=Bf(this.projectionDeltaWithTransform,this.treeScale,c);l&&(f=l(c,f)),r.transform=f;const{x:d,y:m}=this.projectionDelta;r.transformOrigin=`${d.origin*100}% ${m.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 p in ye){if(c[p]===void 0)continue;const{correct:g,applyTo:x,isCSSVariable:y}=ye[p],w=f==="none"?c[p]:g(c[p],u);if(x){const v=x.length;for(let E=0;E<v;E++)r[x[E]]=w}else y?this.options.visualElement.renderState.vars[p]=w:r[p]=w}this.options.layoutId&&(r.pointerEvents=u===this?Ke(a?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(r=>r.currentAnimation?.stop()),this.root.nodes.forEach(Io),this.root.sharedNodes.clear()}}}function Wf(t){t.updateLayout()}function Uf(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"?st(c=>{const f=o?e.measuredBox[c]:e.layoutBox[c],d=Z(f);f.min=n[c].min,f.max=f.min+d}):zo(i,e.layoutBox,n)&&st(c=>{const f=o?e.measuredBox[c]:e.layoutBox[c],d=Z(n[c]);f.max=f.min+d,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[c].max=t.relativeTarget[c].min+d)});const r=Jt();we(r,n,e.layoutBox);const a=Jt();o?we(a,t.applyTransform(s,!0),e.measuredBox):we(a,n,e.layoutBox);const l=!Ro(r);let u=!1;if(!t.resumeFrom){const c=t.getClosestProjectingParent();if(c&&!c.resumeFrom){const{snapshot:f,layout:d}=c;if(f&&d){const m=W();Te(m,e.layoutBox,f.layoutBox);const p=W();Te(p,n,d.layoutBox),Do(m,p)||(u=!0),c.options.layoutRoot&&(t.relativeTarget=p,t.relativeTargetOrigin=m,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 zf(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 Kf(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function Yf(t){t.clearSnapshot()}function Io(t){t.clearMeasurements()}function Lo(t){t.isLayoutDirty=!1}function Hf(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function Fo(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function Gf(t){t.resolveTargetDelta()}function Xf(t){t.calcProjection()}function qf(t){t.resetSkewAndRotation()}function Zf(t){t.removeLeadSnapshot()}function Bo(t,e,n){t.translate=F(e.translate,0,n),t.scale=F(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function _o(t,e,n,s){t.min=F(e.min,n.min,s),t.max=F(e.max,n.max,s)}function Jf(t,e,n,s){_o(t.x,e.x,n.x,s),_o(t.y,e.y,n.y,s)}function Qf(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const td={duration:.45,ease:[.4,0,.1,1]},$o=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),Wo=$o("applewebkit/")&&!$o("chrome/")?Math.round:nt;function Uo(t){t.min=Wo(t.min),t.max=Wo(t.max)}function ed(t){Uo(t.x),Uo(t.y)}function zo(t,e,n){return t==="position"||t==="preserve-aspect"&&!af(Vo(e),Vo(n),.2)}function nd(t){return t!==t.root&&t.scroll?.wasRoot}const sd=Oo({attachResizeListener:(t,e)=>ve(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),As={current:void 0},Ko=Oo({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!As.current){const t=new sd({});t.mount(window),t.setOptions({layoutScroll:!0}),As.current=t}return As.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),id={pan:{Feature:Tf},drag:{Feature:wf,ProjectionNode:Ko,MeasureLayout:go}};function Yo(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&&L.postRender(()=>o(e,xe(e)))}class rd extends At{mount(){const{current:e}=this.node;e&&(this.unmount=Rc(e,(n,s)=>(Yo(this.node,s,"Start"),i=>Yo(this.node,i,"End"))))}unmount(){}}class od extends At{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(ve(this.node.current,"focus",()=>this.onFocus()),ve(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Ho(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&&L.postRender(()=>o(e,xe(e)))}class ad extends At{mount(){const{current:e}=this.node;e&&(this.unmount=Vc(e,(n,s)=>(Ho(this.node,s,"Start"),(i,{success:o})=>Ho(this.node,i,o?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Rs=new WeakMap,js=new WeakMap,ld=t=>{const e=Rs.get(t.target);e&&e(t)},cd=t=>{t.forEach(ld)};function ud({root:t,...e}){const n=t||document;js.has(n)||js.set(n,{});const s=js.get(n),i=JSON.stringify(e);return s[i]||(s[i]=new IntersectionObserver(cd,{root:t,...e})),s[i]}function fd(t,e,n){const s=ud(e);return Rs.set(t,n),s.observe(t),()=>{Rs.delete(t),s.unobserve(t)}}const dd={some:0,all:1};class hd extends At{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:dd[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:f}=this.node.getProps(),d=u?c:f;d&&d(l)};return fd(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(md(e,n))&&this.startObserver()}unmount(){}}function md({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const pd={...tf,...{inView:{Feature:hd},tap:{Feature:ad},focus:{Feature:od},hover:{Feature:rd}},...id,...{layout:{ProjectionNode:Ko,MeasureLayout:go}}},Pe=gu(pd,ju),gd=["polygon(50% 50%,0 0,0 0,0 0,0 0,0 0)","polygon(50% 50%,0 0,100% 0,100% 0,100% 0,100% 0)","polygon(50% 50%,0 0,100% 0,100% 100%,100% 100%,100% 100%)","polygon(50% 50%,0 0,100% 0,100% 100%,0 100%,0 100%)","polygon(50% 50%,0 0,100% 0,100% 100%,0 100%,0 0)"],Xe=t=>{const{speed:e=1,className:n}=t,s=1/e,i=2/e;return h.jsx(ss,{children:h.jsx(Pe.div,{role:"status",className:V("relative rounded-full",n),animate:{rotate:360},transition:{repeat:1/0,ease:"linear",duration:s},children:h.jsx(Pe.div,{className:"absolute inset-0 rounded-full",style:{boxSizing:"border-box",borderStyle:"solid",borderWidth:2},animate:{clipPath:gd},transition:{repeat:1/0,ease:"linear",duration:i,times:[0,.25,.5,.75,1]}})})})},yd=`
31
+ inline-flex flex-row items-center justify-center
32
+ button-ring font-semibold ring-0 disabled:hover:ring-0 hover:ring-4 active:ring-1
33
+ rounded-[var(--border-radius-input)]
34
+ cursor-pointer transition-all duration-150 select-none focus:outline-none focus:ring-4
35
+ disabled:cursor-default
36
+ `,vd={primary:"border button-primary shadow-sm",secondary:"border button-secondary shadow-sm",tertiary:"border button-tertiary",white:"border button-white shadow-sm",black:"border button-black shadow-sm",transparent:"border button-transparent"},xd={sm:"h-10 px-4",md:"h-12 px-6",lg:"h-14 px-8"},bd=P.forwardRef((t,e)=>{const{variant:n="white",size:s="md",className:i,children:o,loading:r=!1,...a}=t;return h.jsxs("button",{ref:e,className:V(yd,vd[n],xd[s],i),...a,children:[r&&h.jsx(Xe,{className:"h-5 w-5"}),!r&&h.jsx(h.Fragment,{children:o})]})}),wd=`
37
+ inline-flex flex-row items-center justify-center aspect-square
38
+ button-ring font-semibold ring-0 disabled:hover:ring-0 hover:ring-4 active:ring-1
39
+ rounded-[var(--border-radius-input)]
40
+ cursor-pointer transition-all duration-150 select-none focus:outline-none focus:ring-4
41
+ disabled:cursor-default
42
+ `,Td={primary:"border button-primary shadow-sm",secondary:"border button-secondary shadow-sm",tertiary:"border button-tertiary",white:"border button-white shadow-sm",black:"border button-black shadow-sm",transparent:"border button-transparent"},Sd={sm:"h-10 w-10",md:"h-12 w-12",lg:"h-14 w-14"},Go=P.forwardRef((t,e)=>{const{variant:n="white",size:s="md",className:i,Icon:o,...r}=t;return h.jsx("button",{ref:e,className:V(wd,Td[n],Sd[s],i),...r,children:h.jsx(o,{className:"h-5 w-5"})})}),Pd=`
43
+ inline-flex flex-row items-center justify-center aspect-square
44
+ button-ring font-semibold ring-0 disabled:hover:ring-0 hover:ring-4 active:ring-1 rounded-full cursor-pointer transition-all duration-150 select-none focus:outline-none focus:ring-4
45
+ disabled:cursor-default
46
+ `,Cd={primary:"border button-primary shadow-sm",secondary:"border button-secondary shadow-sm",tertiary:"border button-tertiary",white:"border button-white shadow-sm",black:"border button-black shadow-sm",transparent:"border button-transparent"},Ed={sm:"h-10 w-10",md:"h-12 w-12",lg:"h-14 w-14"},Xo=P.forwardRef((t,e)=>{const{variant:n="white",size:s="md",className:i,Icon:o,...r}=t;return h.jsx("button",{ref:e,className:V(Pd,Cd[n],Ed[s],i),...r,children:h.jsx(o,{className:"h-5 w-5"})})});/**
23
47
  * @license @tabler/icons-react v3.34.1 - MIT
24
48
  *
25
49
  * This source code is licensed under the MIT license.
26
50
  * See the LICENSE file in the root directory of this source tree.
27
- */var ua={outline:{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},filled:{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"currentColor",stroke:"none"}};/**
51
+ */var Ad={outline:{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},filled:{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"currentColor",stroke:"none"}};/**
28
52
  * @license @tabler/icons-react v3.34.1 - MIT
29
53
  *
30
54
  * This source code is licensed under the MIT license.
31
55
  * See the LICENSE file in the root directory of this source tree.
32
- */const ge=(t,e,n,s)=>{const i=S.forwardRef(({color:o="currentColor",size:r=24,stroke:a=2,title:l,className:u,children:c,...f},h)=>S.createElement("svg",{ref:h,...ua[t],width:r,height:r,className:["tabler-icon",`tabler-icon-${e}`,u].join(" "),...t==="filled"?{fill:o}:{strokeWidth:a,stroke:o},...f},[l&&S.createElement("title",{key:"svg-title"},l),...s.map(([d,m])=>S.createElement(d,m)),...Array.isArray(c)?c:[c]]));return i.displayName=`${n}`,i};/**
56
+ */const dt=(t,e,n,s)=>{const i=T.forwardRef(({color:o="currentColor",size:r=24,stroke:a=2,title:l,className:u,children:c,...f},d)=>T.createElement("svg",{ref:d,...Ad[t],width:r,height:r,className:["tabler-icon",`tabler-icon-${e}`,u].join(" "),...t==="filled"?{fill:o}:{strokeWidth:a,stroke:o},...f},[l&&T.createElement("title",{key:"svg-title"},l),...s.map(([m,p])=>T.createElement(m,p)),...Array.isArray(c)?c:[c]]));return i.displayName=`${n}`,i};/**
33
57
  * @license @tabler/icons-react v3.34.1 - MIT
34
58
  *
35
59
  * This source code is licensed under the MIT license.
36
60
  * See the LICENSE file in the root directory of this source tree.
37
- */const fa=ge("outline","check","Check",[["path",{d:"M5 12l5 5l10 -10",key:"svg-0"}]]);/**
61
+ */const Rd=dt("outline","check","Check",[["path",{d:"M5 12l5 5l10 -10",key:"svg-0"}]]);/**
38
62
  * @license @tabler/icons-react v3.34.1 - MIT
39
63
  *
40
64
  * This source code is licensed under the MIT license.
41
65
  * See the LICENSE file in the root directory of this source tree.
42
- */const Ds=ge("outline","chevron-down","ChevronDown",[["path",{d:"M6 9l6 6l6 -6",key:"svg-0"}]]);/**
66
+ */const qe=dt("outline","chevron-down","ChevronDown",[["path",{d:"M6 9l6 6l6 -6",key:"svg-0"}]]);/**
43
67
  * @license @tabler/icons-react v3.34.1 - MIT
44
68
  *
45
69
  * This source code is licensed under the MIT license.
46
70
  * See the LICENSE file in the root directory of this source tree.
47
- */const ha=ge("outline","x","X",[["path",{d:"M18 6l-12 12",key:"svg-0"}],["path",{d:"M6 6l12 12",key:"svg-1"}]]);/**
71
+ */const jd=dt("outline","eye-off","EyeOff",[["path",{d:"M10.585 10.587a2 2 0 0 0 2.829 2.828",key:"svg-0"}],["path",{d:"M16.681 16.673a8.717 8.717 0 0 1 -4.681 1.327c-3.6 0 -6.6 -2 -9 -6c1.272 -2.12 2.712 -3.678 4.32 -4.674m2.86 -1.146a9.055 9.055 0 0 1 1.82 -.18c3.6 0 6.6 2 9 6c-.666 1.11 -1.379 2.067 -2.138 2.87",key:"svg-1"}],["path",{d:"M3 3l18 18",key:"svg-2"}]]);/**
48
72
  * @license @tabler/icons-react v3.34.1 - MIT
49
73
  *
50
74
  * This source code is licensed under the MIT license.
51
75
  * See the LICENSE file in the root directory of this source tree.
52
- */const da=ge("filled","exclamation-circle-filled","ExclamationCircleFilled",[["path",{d:"M17 3.34a10 10 0 1 1 -15 8.66l.005 -.324a10 10 0 0 1 14.995 -8.336m-5 11.66a1 1 0 0 0 -1 1v.01a1 1 0 0 0 2 0v-.01a1 1 0 0 0 -1 -1m0 -7a1 1 0 0 0 -1 1v4a1 1 0 0 0 2 0v-4a1 1 0 0 0 -1 -1",key:"svg-0"}]]),Ye=t=>{const{children:e}=t;return e?b.jsx("label",{className:"text-gray-900 font-medium mb-1",children:e}):null},Xe=()=>b.jsx("div",{className:"h-5 w-5",children:b.jsx(da,{className:"h-5 w-5 text-red-600"})}),Ge=t=>{const{children:e,className:n}=t;return b.jsx("div",{className:U("absolute top-1/2 -translate-y-1/2 right-3.5 flex flex-row items-center gap-1",n),children:e})},ye=t=>{const{children:e}=t;return e?b.jsx("div",{className:"text-gray-500 text-sm font-medium mt-2",children:e}):null},ve=t=>{const{children:e}=t;return e?b.jsx("div",{className:"text-red-600 text-sm font-medium mt-2",children:e}):null},ks=t=>{const{className:e,label:n,description:s,Icon:i,error:o,buttonTray:r,...a}=t;return b.jsxs("div",{className:U("flex flex-col",e),children:[b.jsx(Ye,{children:n}),b.jsxs("div",{className:"flex flex-col relative",children:[i&&b.jsx(i,{className:"h-4 w-4 text-gray-900/70 absolute left-4 top-1/2 -translate-y-1/2"}),b.jsx("input",{className:U("h-12 border border-gray-200 text-gray-900 placeholder:text-gray-400 bg-white transition-all duration-150 rounded-xl shadow-sm ring-0 ring-gray-900/10 focus:ring-4 focus:outline-none",i?"pl-10 pr-4":"px-4",o&&"border-red-600 focus:ring-red-600/20 !pr-10"),...a}),b.jsxs(Ge,{children:[o&&b.jsx(Xe,{}),r]})]}),b.jsx(ye,{children:s}),b.jsx(ve,{children:o})]})},ma=t=>{const{className:e,label:n,description:s,error:i,...o}=t;return b.jsxs("div",{className:U("flex flex-col",e),children:[b.jsxs("div",{className:"flex flex-row gap-3",children:[b.jsx("input",{type:"checkbox",className:"h-6 w-6 shrink-0 rounded-lg border border-gray-300 shadow-sm ring-0 hover:ring-4 focus:ring-4 ring-gray-900/10 ring-offset-0 focus:outline-0 transition-all duration-150",...o}),n&&b.jsx("label",{htmlFor:t.id,className:U("text-gray-900 font-medium mb-1",t.id&&"cursor-pointer"),children:n})]}),b.jsx(ye,{children:s}),b.jsx(ve,{children:i})]})},pa=t=>{const{children:e,onClick:n,selected:s,disabled:i=!1}=t;return b.jsxs("div",{onClick:()=>!i&&n&&n(),className:U("hover:bg-gray-100 active:bg-gray-200 px-4 py-2 rounded-xl cursor-pointer transition-all duration-150 select-none flex flex-row gap-3 items-center",s&&!i&&"bg-blue-50 hover:bg-blue-100 active:bg-blue-100",i&&"text-gray-400 cursor-not-allowed hover:bg-transparent active:bg-transparent"),children:[b.jsx("div",{className:"flex-1",children:e}),s&&!i&&b.jsx("div",{className:"shrink-0",children:b.jsx(fa,{className:"h-5 w-5"})})]})};function xe(){return typeof window<"u"}function kt(t){return js(t)?(t.nodeName||"").toLowerCase():"#document"}function J(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function pt(t){var e;return(e=(js(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function js(t){return xe()?t instanceof Node||t instanceof J(t).Node:!1}function z(t){return xe()?t instanceof Element||t instanceof J(t).Element:!1}function ct(t){return xe()?t instanceof HTMLElement||t instanceof J(t).HTMLElement:!1}function Ls(t){return!xe()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof J(t).ShadowRoot}const ga=new Set(["inline","contents"]);function Zt(t){const{overflow:e,overflowX:n,overflowY:s,display:i}=st(t);return/auto|scroll|overlay|hidden|clip/.test(e+s+n)&&!ga.has(i)}const ya=new Set(["table","td","th"]);function va(t){return ya.has(kt(t))}const xa=[":popover-open",":modal"];function be(t){return xa.some(e=>{try{return t.matches(e)}catch{return!1}})}const ba=["transform","translate","scale","rotate","perspective"],wa=["transform","translate","scale","rotate","perspective","filter"],Ta=["paint","layout","strict","content"];function qe(t){const e=Ze(),n=z(t)?st(t):t;return ba.some(s=>n[s]?n[s]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||wa.some(s=>(n.willChange||"").includes(s))||Ta.some(s=>(n.contain||"").includes(s))}function Sa(t){let e=xt(t);for(;ct(e)&&!jt(e);){if(qe(e))return e;if(be(e))return null;e=xt(e)}return null}function Ze(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Pa=new Set(["html","body","#document"]);function jt(t){return Pa.has(kt(t))}function st(t){return J(t).getComputedStyle(t)}function we(t){return z(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function xt(t){if(kt(t)==="html")return t;const e=t.assignedSlot||t.parentNode||Ls(t)&&t.host||pt(t);return Ls(e)?e.host:e}function Os(t){const e=xt(t);return jt(e)?t.ownerDocument?t.ownerDocument.body:t.body:ct(e)&&Zt(e)?e:Os(e)}function Is(t,e,n){var s;e===void 0&&(e=[]);const i=Os(t),o=i===((s=t.ownerDocument)==null?void 0:s.body),r=J(i);return o?(Je(r),e.concat(r,r.visualViewport||[],Zt(i)?i:[],[])):e.concat(i,Is(i,[]))}function Je(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}const Te=Math.min,it=Math.max,Se=Math.round,ut=t=>({x:t,y:t});function Ns(t,e){return typeof t=="function"?t(e):t}function Qe(t){return t.split("-")[0]}function Fs(t){return t.split("-")[1]}function Ca(t){return t==="x"?"y":"x"}function Aa(t){return t==="y"?"height":"width"}const Ea=new Set(["top","bottom"]);function tn(t){return Ea.has(Qe(t))?"y":"x"}function Va(t){return Ca(tn(t))}function Ra(t){return{top:0,right:0,bottom:0,left:0,...t}}function Ma(t){return typeof t!="number"?Ra(t):{top:t,right:t,bottom:t,left:t}}function Pe(t){const{x:e,y:n,width:s,height:i}=t;return{width:s,height:i,top:n,left:e,right:e+s,bottom:n+i,x:e,y:n}}function Da(){const t=navigator.userAgentData;return t!=null&&t.platform?t.platform:navigator.platform}var ka=typeof document<"u",ja=function(){},Ce=ka?S.useLayoutEffect:ja;const La={...C}.useInsertionEffect||(t=>t());function Oa(t){const e=C.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return La(()=>{e.current=t}),C.useCallback(function(){for(var n=arguments.length,s=new Array(n),i=0;i<n;i++)s[i]=arguments[i];return e.current==null?void 0:e.current(...s)},[])}function Bs(t,e,n){let{reference:s,floating:i}=t;const o=tn(e),r=Va(e),a=Aa(r),l=Qe(e),u=o==="y",c=s.x+s.width/2-i.width/2,f=s.y+s.height/2-i.height/2,h=s[a]/2-i[a]/2;let d;switch(l){case"top":d={x:c,y:s.y-i.height};break;case"bottom":d={x:c,y:s.y+s.height};break;case"right":d={x:s.x+s.width,y:f};break;case"left":d={x:s.x-i.width,y:f};break;default:d={x:s.x,y:s.y}}switch(Fs(e)){case"start":d[r]-=h*(n&&u?-1:1);break;case"end":d[r]+=h*(n&&u?-1:1);break}return d}const Ia=async(t,e,n)=>{const{placement:s="bottom",strategy:i="absolute",middleware:o=[],platform:r}=n,a=o.filter(Boolean),l=await(r.isRTL==null?void 0:r.isRTL(e));let u=await r.getElementRects({reference:t,floating:e,strategy:i}),{x:c,y:f}=Bs(u,s,l),h=s,d={},m=0;for(let y=0;y<a.length;y++){const{name:x,fn:v}=a[y],{x:w,y:g,data:P,reset:T}=await v({x:c,y:f,initialPlacement:s,placement:h,strategy:i,middlewareData:d,rects:u,platform:r,elements:{reference:t,floating:e}});c=w??c,f=g??f,d={...d,[x]:{...d[x],...P}},T&&m<=50&&(m++,typeof T=="object"&&(T.placement&&(h=T.placement),T.rects&&(u=T.rects===!0?await r.getElementRects({reference:t,floating:e,strategy:i}):T.rects),{x:c,y:f}=Bs(u,h,l)),y=-1)}return{x:c,y:f,placement:h,strategy:i,middlewareData:d}};async function Na(t,e){var n;e===void 0&&(e={});const{x:s,y:i,platform:o,rects:r,elements:a,strategy:l}=t,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:f="floating",altBoundary:h=!1,padding:d=0}=Ns(e,t),m=Ma(d),x=a[h?f==="floating"?"reference":"floating":f],v=Pe(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(x)))==null||n?x:x.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(a.floating)),boundary:u,rootBoundary:c,strategy:l})),w=f==="floating"?{x:s,y:i,width:r.floating.width,height:r.floating.height}:r.reference,g=await(o.getOffsetParent==null?void 0:o.getOffsetParent(a.floating)),P=await(o.isElement==null?void 0:o.isElement(g))?await(o.getScale==null?void 0:o.getScale(g))||{x:1,y:1}:{x:1,y:1},T=Pe(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:w,offsetParent:g,strategy:l}):w);return{top:(v.top-T.top+m.top)/P.y,bottom:(T.bottom-v.bottom+m.bottom)/P.y,left:(v.left-T.left+m.left)/P.x,right:(T.right-v.right+m.right)/P.x}}const Fa=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var n,s;const{placement:i,rects:o,platform:r,elements:a}=e,{apply:l=()=>{},...u}=Ns(t,e),c=await Na(e,u),f=Qe(i),h=Fs(i),d=tn(i)==="y",{width:m,height:y}=o.floating;let x,v;f==="top"||f==="bottom"?(x=f,v=h===(await(r.isRTL==null?void 0:r.isRTL(a.floating))?"start":"end")?"left":"right"):(v=f,x=h==="end"?"top":"bottom");const w=y-c.top-c.bottom,g=m-c.left-c.right,P=Te(y-c[x],w),T=Te(m-c[v],g),V=!e.middlewareData.shift;let R=P,A=T;if((n=e.middlewareData.shift)!=null&&n.enabled.x&&(A=g),(s=e.middlewareData.shift)!=null&&s.enabled.y&&(R=w),V&&!h){const L=it(c.left,0),$=it(c.right,0),at=it(c.top,0),nt=it(c.bottom,0);d?A=m-2*(L!==0||$!==0?L+$:it(c.left,c.right)):R=y-2*(at!==0||nt!==0?at+nt:it(c.top,c.bottom))}await l({...e,availableWidth:A,availableHeight:R});const k=await r.getDimensions(a.floating);return m!==k.width||y!==k.height?{reset:{rects:!0}}:{}}}};function _s(t){const e=st(t);let n=parseFloat(e.width)||0,s=parseFloat(e.height)||0;const i=ct(t),o=i?t.offsetWidth:n,r=i?t.offsetHeight:s,a=Se(n)!==o||Se(s)!==r;return a&&(n=o,s=r),{width:n,height:s,$:a}}function $s(t){return z(t)?t:t.contextElement}function Lt(t){const e=$s(t);if(!ct(e))return ut(1);const n=e.getBoundingClientRect(),{width:s,height:i,$:o}=_s(e);let r=(o?Se(n.width):n.width)/s,a=(o?Se(n.height):n.height)/i;return(!r||!Number.isFinite(r))&&(r=1),(!a||!Number.isFinite(a))&&(a=1),{x:r,y:a}}const Ba=ut(0);function Ws(t){const e=J(t);return!Ze()||!e.visualViewport?Ba:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function _a(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==J(t)?!1:e}function Jt(t,e,n,s){e===void 0&&(e=!1),n===void 0&&(n=!1);const i=t.getBoundingClientRect(),o=$s(t);let r=ut(1);e&&(s?z(s)&&(r=Lt(s)):r=Lt(t));const a=_a(o,n,s)?Ws(o):ut(0);let l=(i.left+a.x)/r.x,u=(i.top+a.y)/r.y,c=i.width/r.x,f=i.height/r.y;if(o){const h=J(o),d=s&&z(s)?J(s):s;let m=h,y=Je(m);for(;y&&s&&d!==m;){const x=Lt(y),v=y.getBoundingClientRect(),w=st(y),g=v.left+(y.clientLeft+parseFloat(w.paddingLeft))*x.x,P=v.top+(y.clientTop+parseFloat(w.paddingTop))*x.y;l*=x.x,u*=x.y,c*=x.x,f*=x.y,l+=g,u+=P,m=J(y),y=Je(m)}}return Pe({width:c,height:f,x:l,y:u})}function Ae(t,e){const n=we(t).scrollLeft;return e?e.left+n:Jt(pt(t)).left+n}function Us(t,e){const n=t.getBoundingClientRect(),s=n.left+e.scrollLeft-Ae(t,n),i=n.top+e.scrollTop;return{x:s,y:i}}function $a(t){let{elements:e,rect:n,offsetParent:s,strategy:i}=t;const o=i==="fixed",r=pt(s),a=e?be(e.floating):!1;if(s===r||a&&o)return n;let l={scrollLeft:0,scrollTop:0},u=ut(1);const c=ut(0),f=ct(s);if((f||!f&&!o)&&((kt(s)!=="body"||Zt(r))&&(l=we(s)),ct(s))){const d=Jt(s);u=Lt(s),c.x=d.x+s.clientLeft,c.y=d.y+s.clientTop}const h=r&&!f&&!o?Us(r,l):ut(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+c.x+h.x,y:n.y*u.y-l.scrollTop*u.y+c.y+h.y}}function Wa(t){return Array.from(t.getClientRects())}function Ua(t){const e=pt(t),n=we(t),s=t.ownerDocument.body,i=it(e.scrollWidth,e.clientWidth,s.scrollWidth,s.clientWidth),o=it(e.scrollHeight,e.clientHeight,s.scrollHeight,s.clientHeight);let r=-n.scrollLeft+Ae(t);const a=-n.scrollTop;return st(s).direction==="rtl"&&(r+=it(e.clientWidth,s.clientWidth)-i),{width:i,height:o,x:r,y:a}}const Ks=25;function Ka(t,e){const n=J(t),s=pt(t),i=n.visualViewport;let o=s.clientWidth,r=s.clientHeight,a=0,l=0;if(i){o=i.width,r=i.height;const c=Ze();(!c||c&&e==="fixed")&&(a=i.offsetLeft,l=i.offsetTop)}const u=Ae(s);if(u<=0){const c=s.ownerDocument,f=c.body,h=getComputedStyle(f),d=c.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,m=Math.abs(s.clientWidth-f.clientWidth-d);m<=Ks&&(o-=m)}else u<=Ks&&(o+=u);return{width:o,height:r,x:a,y:l}}const za=new Set(["absolute","fixed"]);function Ha(t,e){const n=Jt(t,!0,e==="fixed"),s=n.top+t.clientTop,i=n.left+t.clientLeft,o=ct(t)?Lt(t):ut(1),r=t.clientWidth*o.x,a=t.clientHeight*o.y,l=i*o.x,u=s*o.y;return{width:r,height:a,x:l,y:u}}function zs(t,e,n){let s;if(e==="viewport")s=Ka(t,n);else if(e==="document")s=Ua(pt(t));else if(z(e))s=Ha(e,n);else{const i=Ws(t);s={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return Pe(s)}function Hs(t,e){const n=xt(t);return n===e||!z(n)||jt(n)?!1:st(n).position==="fixed"||Hs(n,e)}function Ya(t,e){const n=e.get(t);if(n)return n;let s=Is(t,[]).filter(a=>z(a)&&kt(a)!=="body"),i=null;const o=st(t).position==="fixed";let r=o?xt(t):t;for(;z(r)&&!jt(r);){const a=st(r),l=qe(r);!l&&a.position==="fixed"&&(i=null),(o?!l&&!i:!l&&a.position==="static"&&!!i&&za.has(i.position)||Zt(r)&&!l&&Hs(t,r))?s=s.filter(c=>c!==r):i=a,r=xt(r)}return e.set(t,s),s}function Xa(t){let{element:e,boundary:n,rootBoundary:s,strategy:i}=t;const r=[...n==="clippingAncestors"?be(e)?[]:Ya(e,this._c):[].concat(n),s],a=r[0],l=r.reduce((u,c)=>{const f=zs(e,c,i);return u.top=it(f.top,u.top),u.right=Te(f.right,u.right),u.bottom=Te(f.bottom,u.bottom),u.left=it(f.left,u.left),u},zs(e,a,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function Ga(t){const{width:e,height:n}=_s(t);return{width:e,height:n}}function qa(t,e,n){const s=ct(e),i=pt(e),o=n==="fixed",r=Jt(t,!0,o,e);let a={scrollLeft:0,scrollTop:0};const l=ut(0);function u(){l.x=Ae(i)}if(s||!s&&!o)if((kt(e)!=="body"||Zt(i))&&(a=we(e)),s){const d=Jt(e,!0,o,e);l.x=d.x+e.clientLeft,l.y=d.y+e.clientTop}else i&&u();o&&!s&&i&&u();const c=i&&!s&&!o?Us(i,a):ut(0),f=r.left+a.scrollLeft-l.x-c.x,h=r.top+a.scrollTop-l.y-c.y;return{x:f,y:h,width:r.width,height:r.height}}function en(t){return st(t).position==="static"}function Ys(t,e){if(!ct(t)||st(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return pt(t)===n&&(n=n.ownerDocument.body),n}function Xs(t,e){const n=J(t);if(be(t))return n;if(!ct(t)){let i=xt(t);for(;i&&!jt(i);){if(z(i)&&!en(i))return i;i=xt(i)}return n}let s=Ys(t,e);for(;s&&va(s)&&en(s);)s=Ys(s,e);return s&&jt(s)&&en(s)&&!qe(s)?n:s||Sa(t)||n}const Za=async function(t){const e=this.getOffsetParent||Xs,n=this.getDimensions,s=await n(t.floating);return{reference:qa(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:s.width,height:s.height}}};function Ja(t){return st(t).direction==="rtl"}const Qa={convertOffsetParentRelativeRectToViewportRelativeRect:$a,getDocumentElement:pt,getClippingRect:Xa,getOffsetParent:Xs,getElementRects:Za,getClientRects:Wa,getDimensions:Ga,getScale:Lt,isElement:z,isRTL:Ja},tl=Fa,el=(t,e,n)=>{const s=new Map,i={platform:Qa,...n},o={...i.platform,_c:s};return Ia(t,e,{...i,platform:o})};var nl=typeof document<"u",sl=function(){},Ee=nl?S.useLayoutEffect:sl;function Ve(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let n,s,i;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(n=t.length,n!==e.length)return!1;for(s=n;s--!==0;)if(!Ve(t[s],e[s]))return!1;return!0}if(i=Object.keys(t),n=i.length,n!==Object.keys(e).length)return!1;for(s=n;s--!==0;)if(!{}.hasOwnProperty.call(e,i[s]))return!1;for(s=n;s--!==0;){const o=i[s];if(!(o==="_owner"&&t.$$typeof)&&!Ve(t[o],e[o]))return!1}return!0}return t!==t&&e!==e}function Gs(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function qs(t,e){const n=Gs(t);return Math.round(e*n)/n}function nn(t){const e=C.useRef(t);return Ee(()=>{e.current=t}),e}function il(t){t===void 0&&(t={});const{placement:e="bottom",strategy:n="absolute",middleware:s=[],platform:i,elements:{reference:o,floating:r}={},transform:a=!0,whileElementsMounted:l,open:u}=t,[c,f]=C.useState({x:0,y:0,strategy:n,placement:e,middlewareData:{},isPositioned:!1}),[h,d]=C.useState(s);Ve(h,s)||d(s);const[m,y]=C.useState(null),[x,v]=C.useState(null),w=C.useCallback(D=>{D!==V.current&&(V.current=D,y(D))},[]),g=C.useCallback(D=>{D!==R.current&&(R.current=D,v(D))},[]),P=o||m,T=r||x,V=C.useRef(null),R=C.useRef(null),A=C.useRef(c),k=l!=null,L=nn(l),$=nn(i),at=nn(u),nt=C.useCallback(()=>{if(!V.current||!R.current)return;const D={placement:e,strategy:n,middleware:h};$.current&&(D.platform=$.current),el(V.current,R.current,D).then(q=>{const p={...q,isPositioned:at.current!==!1};dt.current&&!Ve(A.current,p)&&(A.current=p,Go.flushSync(()=>{f(p)}))})},[h,e,n,$,at]);Ee(()=>{u===!1&&A.current.isPositioned&&(A.current.isPositioned=!1,f(D=>({...D,isPositioned:!1})))},[u]);const dt=C.useRef(!1);Ee(()=>(dt.current=!0,()=>{dt.current=!1}),[]),Ee(()=>{if(P&&(V.current=P),T&&(R.current=T),P&&T){if(L.current)return L.current(P,T,nt);nt()}},[P,T,nt,L,k]);const Pt=C.useMemo(()=>({reference:V,floating:R,setReference:w,setFloating:g}),[w,g]),lt=C.useMemo(()=>({reference:P,floating:T}),[P,T]),N=C.useMemo(()=>{const D={position:n,left:0,top:0};if(!lt.floating)return D;const q=qs(lt.floating,c.x),p=qs(lt.floating,c.y);return a?{...D,transform:"translate("+q+"px, "+p+"px)",...Gs(lt.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:q,top:p}},[n,a,lt.floating,c.x,c.y]);return C.useMemo(()=>({...c,update:nt,refs:Pt,elements:lt,floatingStyles:N}),[c,nt,Pt,lt,N])}const rl=(t,e)=>({...tl(t),options:[t,e]}),ol={...C};let Zs=!1,al=0;const Js=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+al++;function ll(){const[t,e]=C.useState(()=>Zs?Js():void 0);return Ce(()=>{t==null&&e(Js())},[]),C.useEffect(()=>{Zs=!0},[]),t}const cl=ol.useId||ll;let sn;process.env.NODE_ENV!=="production"&&(sn=new Set);function ul(){for(var t,e=arguments.length,n=new Array(e),s=0;s<e;s++)n[s]=arguments[s];const i="Floating UI: "+n.join(" ");if(!((t=sn)!=null&&t.has(i))){var o;(o=sn)==null||o.add(i),console.error(i)}}function fl(){const t=new Map;return{emit(e,n){var s;(s=t.get(e))==null||s.forEach(i=>i(n))},on(e,n){t.has(e)||t.set(e,new Set),t.get(e).add(n)},off(e,n){var s;(s=t.get(e))==null||s.delete(n)}}}const hl=C.createContext(null),dl=C.createContext(null),ml=()=>{var t;return((t=C.useContext(hl))==null?void 0:t.id)||null},pl=()=>C.useContext(dl);let Re=0;const Qs="--floating-ui-scrollbar-width";function gl(){const t=Da(),e=/iP(hone|ad|od)|iOS/.test(t)||t==="MacIntel"&&navigator.maxTouchPoints>1,n=document.body.style,i=Math.round(document.documentElement.getBoundingClientRect().left)+document.documentElement.scrollLeft?"paddingLeft":"paddingRight",o=window.innerWidth-document.documentElement.clientWidth,r=n.left?parseFloat(n.left):window.scrollX,a=n.top?parseFloat(n.top):window.scrollY;if(n.overflow="hidden",n.setProperty(Qs,o+"px"),o&&(n[i]=o+"px"),e){var l,u;const c=((l=window.visualViewport)==null?void 0:l.offsetLeft)||0,f=((u=window.visualViewport)==null?void 0:u.offsetTop)||0;Object.assign(n,{position:"fixed",top:-(a-Math.floor(f))+"px",left:-(r-Math.floor(c))+"px",right:"0"})}return()=>{Object.assign(n,{overflow:"",[i]:""}),n.removeProperty(Qs),e&&(Object.assign(n,{position:"",top:"",left:"",right:""}),window.scrollTo(r,a))}}let ti=()=>{};const yl=C.forwardRef(function(e,n){const{lockScroll:s=!1,...i}=e;return Ce(()=>{if(s)return Re++,Re===1&&(ti=gl()),()=>{Re--,Re===0&&ti()}},[s]),b.jsx("div",{ref:n,...i,style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...i.style}})});function vl(t){const{open:e=!1,onOpenChange:n,elements:s}=t,i=cl(),o=C.useRef({}),[r]=C.useState(()=>fl()),a=ml()!=null;if(process.env.NODE_ENV!=="production"){const d=s.reference;d&&!z(d)&&ul("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[l,u]=C.useState(s.reference),c=Oa((d,m,y)=>{o.current.openEvent=d?m:void 0,r.emit("openchange",{open:d,event:m,reason:y,nested:a}),n?.(d,m,y)}),f=C.useMemo(()=>({setPositionReference:u}),[]),h=C.useMemo(()=>({reference:l||s.reference||null,floating:s.floating||null,domReference:s.reference}),[l,s.reference,s.floating]);return C.useMemo(()=>({dataRef:o,open:e,onOpenChange:c,elements:h,events:r,floatingId:i,refs:f}),[e,c,h,r,i,f])}function xl(t){t===void 0&&(t={});const{nodeId:e}=t,n=vl({...t,elements:{reference:null,floating:null,...t.elements}}),s=t.rootContext||n,i=s.elements,[o,r]=C.useState(null),[a,l]=C.useState(null),c=i?.domReference||o,f=C.useRef(null),h=pl();Ce(()=>{c&&(f.current=c)},[c]);const d=il({...t,elements:{...i,...a&&{reference:a}}}),m=C.useCallback(g=>{const P=z(g)?{getBoundingClientRect:()=>g.getBoundingClientRect(),getClientRects:()=>g.getClientRects(),contextElement:g}:g;l(P),d.refs.setReference(P)},[d.refs]),y=C.useCallback(g=>{(z(g)||g===null)&&(f.current=g,r(g)),(z(d.refs.reference.current)||d.refs.reference.current===null||g!==null&&!z(g))&&d.refs.setReference(g)},[d.refs]),x=C.useMemo(()=>({...d.refs,setReference:y,setPositionReference:m,domReference:f}),[d.refs,y,m]),v=C.useMemo(()=>({...d.elements,domReference:c}),[d.elements,c]),w=C.useMemo(()=>({...d,...s,refs:x,elements:v,nodeId:e}),[d,x,v,e,s]);return Ce(()=>{s.dataRef.current.floatingContext=w;const g=h?.nodesRef.current.find(P=>P.id===e);g&&(g.context=w)}),C.useMemo(()=>({...d,context:w,refs:x,elements:v}),[d,x,v,w])}const rn=S.createContext({});function on(t){const e=S.useRef(null);return e.current===null&&(e.current=t()),e.current}const an=typeof window<"u",ei=an?S.useLayoutEffect:S.useEffect,Me=S.createContext(null);function ln(t,e){t.indexOf(e)===-1&&t.push(e)}function cn(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const gt=(t,e,n)=>n>e?e:n<t?t:n;function un(t,e){return e?`${t}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${e}`:t}let Ot=()=>{},yt=()=>{};process.env.NODE_ENV!=="production"&&(Ot=(t,e,n)=>{!t&&typeof console<"u"&&console.warn(un(e,n))},yt=(t,e,n)=>{if(!t)throw new Error(un(e,n))});const vt={},ni=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t);function si(t){return typeof t=="object"&&t!==null}const ii=t=>/^0[^.\s]+$/u.test(t);function fn(t){let e;return()=>(e===void 0&&(e=t()),e)}const Q=t=>t,bl=(t,e)=>n=>e(t(n)),Qt=(...t)=>t.reduce(bl),te=(t,e,n)=>{const s=e-t;return s===0?1:(n-t)/s};class hn{constructor(){this.subscriptions=[]}add(e){return ln(this.subscriptions,e),()=>cn(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 rt=t=>t*1e3,ft=t=>t/1e3;function ri(t,e){return e?t*(1e3/e):0}const oi=new Set;function dn(t,e,n){t||oi.has(e)||(console.warn(un(e,n)),oi.add(e))}const ai=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,wl=1e-7,Tl=12;function Sl(t,e,n,s,i){let o,r,a=0;do r=e+(n-e)/2,o=ai(r,s,i)-t,o>0?n=r:e=r;while(Math.abs(o)>wl&&++a<Tl);return r}function ee(t,e,n,s){if(t===e&&n===s)return Q;const i=o=>Sl(o,0,1,t,n);return o=>o===0||o===1?o:ai(i(o),e,s)}const li=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,ci=t=>e=>1-t(1-e),ui=ee(.33,1.53,.69,.99),mn=ci(ui),fi=li(mn),hi=t=>(t*=2)<1?.5*mn(t):.5*(2-Math.pow(2,-10*(t-1))),pn=t=>1-Math.sin(Math.acos(t)),di=ci(pn),mi=li(pn),Pl=ee(.42,0,1,1),Cl=ee(0,0,.58,1),pi=ee(.42,0,.58,1),Al=t=>Array.isArray(t)&&typeof t[0]!="number",gi=t=>Array.isArray(t)&&typeof t[0]=="number",yi={linear:Q,easeIn:Pl,easeInOut:pi,easeOut:Cl,circIn:pn,circInOut:mi,circOut:di,backIn:mn,backInOut:fi,backOut:ui,anticipate:hi},El=t=>typeof t=="string",vi=t=>{if(gi(t)){yt(t.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[e,n,s,i]=t;return ee(e,n,s,i)}else if(El(t))return yt(yi[t]!==void 0,`Invalid easing type '${t}'`,"invalid-easing-type"),yi[t];return t},De=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function Vl(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,f=!1,h=!1)=>{const m=h&&i?n:s;return f&&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 Rl=40;function xi(t,e){let n=!1,s=!0;const i={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,r=De.reduce((g,P)=>(g[P]=Vl(o),g),{}),{setup:a,read:l,resolveKeyframes:u,preUpdate:c,update:f,preRender:h,render:d,postRender:m}=r,y=()=>{const g=vt.useManualTiming?i.timestamp:performance.now();n=!1,vt.useManualTiming||(i.delta=s?1e3/60:Math.max(Math.min(g-i.timestamp,Rl),1)),i.timestamp=g,i.isProcessing=!0,a.process(i),l.process(i),u.process(i),c.process(i),f.process(i),h.process(i),d.process(i),m.process(i),i.isProcessing=!1,n&&e&&(s=!1,t(y))},x=()=>{n=!0,s=!0,i.isProcessing||t(y)};return{schedule:De.reduce((g,P)=>{const T=r[P];return g[P]=(V,R=!1,A=!1)=>(n||x(),T.schedule(V,R,A)),g},{}),cancel:g=>{for(let P=0;P<De.length;P++)r[De[P]].cancel(g)},state:i,steps:r}}const{schedule:j,cancel:bt,state:K,steps:gn}=xi(typeof requestAnimationFrame<"u"?requestAnimationFrame:Q,!0);let ke;function Ml(){ke=void 0}const Z={now:()=>(ke===void 0&&Z.set(K.isProcessing||vt.useManualTiming?K.timestamp:performance.now()),ke),set:t=>{ke=t,queueMicrotask(Ml)}},bi=t=>e=>typeof e=="string"&&e.startsWith(t),yn=bi("--"),Dl=bi("var(--"),vn=t=>Dl(t)?kl.test(t.split("/*")[0].trim()):!1,kl=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,It={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},ne={...It,transform:t=>gt(0,1,t)},je={...It,default:1},se=t=>Math.round(t*1e5)/1e5,xn=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function jl(t){return t==null}const Ll=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,bn=(t,e)=>n=>!!(typeof n=="string"&&Ll.test(n)&&n.startsWith(t)||e&&!jl(n)&&Object.prototype.hasOwnProperty.call(n,e)),wi=(t,e,n)=>s=>{if(typeof s!="string")return s;const[i,o,r,a]=s.match(xn);return{[t]:parseFloat(i),[e]:parseFloat(o),[n]:parseFloat(r),alpha:a!==void 0?parseFloat(a):1}},Ol=t=>gt(0,255,t),wn={...It,transform:t=>Math.round(Ol(t))},At={test:bn("rgb","red"),parse:wi("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+wn.transform(t)+", "+wn.transform(e)+", "+wn.transform(n)+", "+se(ne.transform(s))+")"};function Il(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 Tn={test:bn("#"),parse:Il,transform:At.transform},ie=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),wt=ie("deg"),ht=ie("%"),E=ie("px"),Nl=ie("vh"),Fl=ie("vw"),Ti={...ht,parse:t=>ht.parse(t)/100,transform:t=>ht.transform(t*100)},Nt={test:bn("hsl","hue"),parse:wi("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:s=1})=>"hsla("+Math.round(t)+", "+ht.transform(se(e))+", "+ht.transform(se(n))+", "+se(ne.transform(s))+")"},_={test:t=>At.test(t)||Tn.test(t)||Nt.test(t),parse:t=>At.test(t)?At.parse(t):Nt.test(t)?Nt.parse(t):Tn.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?At.transform(t):Nt.transform(t),getAnimatableNone:t=>{const e=_.parse(t);return e.alpha=0,_.transform(e)}},Bl=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function _l(t){return isNaN(t)&&typeof t=="string"&&(t.match(xn)?.length||0)+(t.match(Bl)?.length||0)>0}const Si="number",Pi="color",$l="var",Wl="var(",Ci="${}",Ul=/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 re(t){const e=t.toString(),n=[],s={color:[],number:[],var:[]},i=[];let o=0;const a=e.replace(Ul,l=>(_.test(l)?(s.color.push(o),i.push(Pi),n.push(_.parse(l))):l.startsWith(Wl)?(s.var.push(o),i.push($l),n.push(l)):(s.number.push(o),i.push(Si),n.push(parseFloat(l))),++o,Ci)).split(Ci);return{values:n,split:a,indexes:s,types:i}}function Ai(t){return re(t).values}function Ei(t){const{split:e,types:n}=re(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===Si?o+=se(i[r]):a===Pi?o+=_.transform(i[r]):o+=i[r]}return o}}const Kl=t=>typeof t=="number"?0:_.test(t)?_.getAnimatableNone(t):t;function zl(t){const e=Ai(t);return Ei(t)(e.map(Kl))}const Tt={test:_l,parse:Ai,createTransformer:Ei,getAnimatableNone:zl};function Sn(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 Hl({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=Sn(l,a,t+1/3),o=Sn(l,a,t),r=Sn(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,Pn=(t,e,n)=>{const s=t*t,i=n*(e*e-s)+s;return i<0?0:Math.sqrt(i)},Yl=[Tn,At,Nt],Xl=t=>Yl.find(e=>e.test(t));function Vi(t){const e=Xl(t);if(Ot(!!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===Nt&&(n=Hl(n)),n}const Ri=(t,e)=>{const n=Vi(t),s=Vi(e);if(!n||!s)return Le(t,e);const i={...n};return o=>(i.red=Pn(n.red,s.red,o),i.green=Pn(n.green,s.green,o),i.blue=Pn(n.blue,s.blue,o),i.alpha=O(n.alpha,s.alpha,o),At.transform(i))},Cn=new Set(["none","hidden"]);function Gl(t,e){return Cn.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function ql(t,e){return n=>O(t,e,n)}function An(t){return typeof t=="number"?ql:typeof t=="string"?vn(t)?Le:_.test(t)?Ri:Ql:Array.isArray(t)?Mi:typeof t=="object"?_.test(t)?Ri:Zl:Le}function Mi(t,e){const n=[...t],s=n.length,i=t.map((o,r)=>An(o)(o,e[r]));return o=>{for(let r=0;r<s;r++)n[r]=i[r](o);return n}}function Zl(t,e){const n={...t,...e},s={};for(const i in n)t[i]!==void 0&&e[i]!==void 0&&(s[i]=An(t[i])(t[i],e[i]));return i=>{for(const o in s)n[o]=s[o](i);return n}}function Jl(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 Ql=(t,e)=>{const n=Tt.createTransformer(e),s=re(t),i=re(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?Cn.has(t)&&!i.values.length||Cn.has(e)&&!s.values.length?Gl(t,e):Qt(Mi(Jl(s,i),i.values),n):(Ot(!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 Di(t,e,n){return typeof t=="number"&&typeof e=="number"&&typeof n=="number"?O(t,e,n):An(t)(t,e)}const tc=t=>{const e=({timestamp:n})=>t(n);return{start:(n=!0)=>j.update(e,n),stop:()=>bt(e),now:()=>K.isProcessing?K.timestamp:Z.now()}},ki=(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 En(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 ec(t,e=100,n){const s=n({...t,keyframes:[0,e]}),i=Math.min(En(s),Oe);return{type:"keyframes",ease:o=>s.next(i*o).value/e,duration:ft(i)}}const nc=5;function ji(t,e,n){const s=Math.max(e-nc,0);return ri(n-t(s),e-s)}const I={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},Vn=.001;function sc({duration:t=I.duration,bounce:e=I.bounce,velocity:n=I.velocity,mass:s=I.mass}){let i,o;Ot(t<=rt(I.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let r=1-e;r=gt(I.minDamping,I.maxDamping,r),t=gt(I.minDuration,I.maxDuration,ft(t)),r<1?(i=u=>{const c=u*r,f=c*t,h=c-n,d=Rn(u,r),m=Math.exp(-f);return Vn-h/d*m},o=u=>{const f=u*r*t,h=f*n+n,d=Math.pow(r,2)*Math.pow(u,2)*t,m=Math.exp(-f),y=Rn(Math.pow(u,2),r);return(-i(u)+Vn>0?-1:1)*((h-d)*m)/y}):(i=u=>{const c=Math.exp(-u*t),f=(u-n)*t+1;return-Vn+c*f},o=u=>{const c=Math.exp(-u*t),f=(n-u)*(t*t);return c*f});const a=5/t,l=rc(i,o,a);if(t=rt(t),isNaN(l))return{stiffness:I.stiffness,damping:I.damping,duration:t};{const u=Math.pow(l,2)*s;return{stiffness:u,damping:r*2*Math.sqrt(s*u),duration:t}}}const ic=12;function rc(t,e,n){let s=n;for(let i=1;i<ic;i++)s=s-t(s)/e(s);return s}function Rn(t,e){return t*Math.sqrt(1-e*e)}const oc=["duration","bounce"],ac=["stiffness","damping","mass"];function Li(t,e){return e.some(n=>t[n]!==void 0)}function lc(t){let e={velocity:I.velocity,stiffness:I.stiffness,damping:I.damping,mass:I.mass,isResolvedFromDuration:!1,...t};if(!Li(t,ac)&&Li(t,oc))if(t.visualDuration){const n=t.visualDuration,s=2*Math.PI/(n*1.2),i=s*s,o=2*gt(.05,1,1-(t.bounce||0))*Math.sqrt(i);e={...e,mass:I.mass,stiffness:i,damping:o}}else{const n=sc(t);e={...e,...n,mass:I.mass},e.isResolvedFromDuration=!0}return e}function Ie(t=I.visualDuration,e=I.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:f,velocity:h,isResolvedFromDuration:d}=lc({...n,velocity:-ft(n.velocity||0)}),m=h||0,y=u/(2*Math.sqrt(l*c)),x=r-o,v=ft(Math.sqrt(l/c)),w=Math.abs(x)<5;s||(s=w?I.restSpeed.granular:I.restSpeed.default),i||(i=w?I.restDelta.granular:I.restDelta.default);let g;if(y<1){const T=Rn(v,y);g=V=>{const R=Math.exp(-y*v*V);return r-R*((m+y*v*x)/T*Math.sin(T*V)+x*Math.cos(T*V))}}else if(y===1)g=T=>r-Math.exp(-v*T)*(x+(m+v*x)*T);else{const T=v*Math.sqrt(y*y-1);g=V=>{const R=Math.exp(-y*v*V),A=Math.min(T*V,300);return r-R*((m+y*v*x)*Math.sinh(A)+T*x*Math.cosh(A))/T}}const P={calculatedDuration:d&&f||null,next:T=>{const V=g(T);if(d)a.done=T>=f;else{let R=T===0?m:0;y<1&&(R=T===0?rt(m):ji(g,T,V));const A=Math.abs(R)<=s,k=Math.abs(r-V)<=i;a.done=A&&k}return a.value=a.done?r:V,a},toString:()=>{const T=Math.min(En(P),Oe),V=ki(R=>P.next(T*R).value,T,30);return T+"ms "+V},toTransition:()=>{}};return P}Ie.applyToOptions=t=>{const e=ec(t,100,Ie);return t.ease=e.ease,t.duration=rt(e.duration),t.type="keyframes",t};function Mn({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 f=t[0],h={done:!1,value:f},d=A=>a!==void 0&&A<a||l!==void 0&&A>l,m=A=>a===void 0?l:l===void 0||Math.abs(a-A)<Math.abs(l-A)?a:l;let y=n*e;const x=f+y,v=r===void 0?x:r(x);v!==x&&(y=v-f);const w=A=>-y*Math.exp(-A/s),g=A=>v+w(A),P=A=>{const k=w(A),L=g(A);h.done=Math.abs(k)<=u,h.value=h.done?v:L};let T,V;const R=A=>{d(h.value)&&(T=A,V=Ie({keyframes:[h.value,m(h.value)],velocity:ji(g,A,h.value),damping:i,stiffness:o,restDelta:u,restSpeed:c}))};return R(0),{calculatedDuration:null,next:A=>{let k=!1;return!V&&T===void 0&&(k=!0,P(A),R(A)),T!==void 0&&A>=T?V.next(A-T):(!k&&P(A),h)}}}function cc(t,e,n){const s=[],i=n||vt.mix||Di,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]||Q:e;a=Qt(l,a)}s.push(a)}return s}function uc(t,e,{clamp:n=!0,ease:s,mixer:i}={}){const o=t.length;if(yt(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=cc(e,s,i),l=a.length,u=c=>{if(r&&c<t[0])return e[0];let f=0;if(l>1)for(;f<t.length-2&&!(c<t[f+1]);f++);const h=te(t[f],t[f+1],c);return a[f](h)};return n?c=>u(gt(t[0],t[o-1],c)):u}function fc(t,e){const n=t[t.length-1];for(let s=1;s<=e;s++){const i=te(0,e,s);t.push(O(n,1,i))}}function hc(t){const e=[0];return fc(e,t.length-1),e}function dc(t,e){return t.map(n=>n*e)}function mc(t,e){return t.map(()=>e||pi).splice(0,t.length-1)}function Ft({duration:t=300,keyframes:e,times:n,ease:s="easeInOut"}){const i=Al(s)?s.map(vi):vi(s),o={done:!1,value:e[0]},r=dc(n&&n.length===e.length?n:hc(e),t),a=uc(r,e,{ease:Array.isArray(i)?i:mc(e,i)});return{calculatedDuration:t,next:l=>(o.value=a(l),o.done=l>=t,o)}}const pc=t=>t!==null;function Dn(t,{repeat:e,repeatType:n="loop"},s,i=1){const o=t.filter(pc),a=i<0||e&&n!=="loop"&&e%2===1?0:o.length-1;return!a||s===void 0?o[a]:s}const gc={decay:Mn,inertia:Mn,tween:Ft,keyframes:Ft,spring:Ie};function Oi(t){typeof t.type=="string"&&(t.type=gc[t.type])}class kn{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 yc=t=>t/100;class jn extends kn{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!==Z.now()&&this.tick(Z.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;Oi(e);const{type:n=Ft,repeat:s=0,repeatDelay:i=0,repeatType:o,velocity:r=0}=e;let{keyframes:a}=e;const l=n||Ft;process.env.NODE_ENV!=="production"&&l!==Ft&&yt(a.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`,"spring-two-frames"),l!==Ft&&typeof a[0]!="number"&&(this.mixKeyframes=Qt(yc,Di(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=En(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:f,repeatType:h,repeatDelay:d,type:m,onUpdate:y,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 v=this.currentTime-u*(this.playbackSpeed>=0?1:-1),w=this.playbackSpeed>=0?v<0:v>i;this.currentTime=Math.max(v,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let g=this.currentTime,P=s;if(f){const A=Math.min(this.currentTime,i)/a;let k=Math.floor(A),L=A%1;!L&&A>=1&&(L=1),L===1&&k--,k=Math.min(k,f+1),!!(k%2)&&(h==="reverse"?(L=1-L,d&&(L-=d/a)):h==="mirror"&&(P=r)),g=gt(0,1,L)*a}const T=w?{done:!1,value:c[0]}:P.next(g);o&&(T.value=o(T.value));let{done:V}=T;!w&&l!==null&&(V=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const R=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&V);return R&&m!==Mn&&(T.value=Dn(c,this.options,x,this.speed)),y&&y(T.value),R&&this.finish(),T}then(e,n){return this.finished.then(e,n)}get duration(){return ft(this.calculatedDuration)}get time(){return ft(this.currentTime)}set time(e){e=rt(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(Z.now());const n=this.playbackSpeed!==e;this.playbackSpeed=e,n&&(this.time=ft(this.currentTime))}play(){if(this.isStopped)return;const{driver:e=tc,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(Z.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 vc(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}const Et=t=>t*180/Math.PI,Ln=t=>{const e=Et(Math.atan2(t[1],t[0]));return On(e)},xc={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:Ln,rotateZ:Ln,skewX:t=>Et(Math.atan(t[1])),skewY:t=>Et(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},On=t=>(t=t%360,t<0&&(t+=360),t),Ii=Ln,Ni=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),Fi=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),bc={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Ni,scaleY:Fi,scale:t=>(Ni(t)+Fi(t))/2,rotateX:t=>On(Et(Math.atan2(t[6],t[5]))),rotateY:t=>On(Et(Math.atan2(-t[2],t[0]))),rotateZ:Ii,rotate:Ii,skewX:t=>Et(Math.atan(t[4])),skewY:t=>Et(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function In(t){return t.includes("scale")?1:0}function Nn(t,e){if(!t||t==="none")return In(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let s,i;if(n)s=bc,i=n;else{const a=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);s=xc,i=a}if(!i)return In(e);const o=s[e],r=i[1].split(",").map(Tc);return typeof o=="function"?o(r):r[o]}const wc=(t,e)=>{const{transform:n="none"}=getComputedStyle(t);return Nn(n,e)};function Tc(t){return parseFloat(t.trim())}const Bt=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],_t=new Set(Bt),Bi=t=>t===It||t===E,Sc=new Set(["x","y","z"]),Pc=Bt.filter(t=>!Sc.has(t));function Cc(t){const e=[];return Pc.forEach(n=>{const s=t.getValue(n);s!==void 0&&(e.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),e}const Vt={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})=>Nn(e,"x"),y:(t,{transform:e})=>Nn(e,"y")};Vt.translateX=Vt.x,Vt.translateY=Vt.y;const Rt=new Set;let Fn=!1,Bn=!1,_n=!1;function _i(){if(Bn){const t=Array.from(Rt).filter(s=>s.needsMeasurement),e=new Set(t.map(s=>s.element)),n=new Map;e.forEach(s=>{const i=Cc(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)})}Bn=!1,Fn=!1,Rt.forEach(t=>t.complete(_n)),Rt.clear()}function $i(){Rt.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(Bn=!0)})}function Ac(){_n=!0,$i(),_i(),_n=!1}class $n{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?(Rt.add(this),Fn||(Fn=!0,j.read($i),j.resolveKeyframes(_i))):(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])}vc(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),Rt.delete(this)}cancel(){this.state==="scheduled"&&(Rt.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const Ec=t=>t.startsWith("--");function Vc(t,e,n){Ec(e)?t.style.setProperty(e,n):t.style[e]=n}const Rc=fn(()=>window.ScrollTimeline!==void 0),Mc={};function Dc(t,e){const n=fn(t);return()=>Mc[e]??n()}const Wi=Dc(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),oe=([t,e,n,s])=>`cubic-bezier(${t}, ${e}, ${n}, ${s})`,Ui={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:oe([0,.65,.55,1]),circOut:oe([.55,0,1,.45]),backIn:oe([.31,.01,.66,-.59]),backOut:oe([.33,1.53,.69,.99])};function Ki(t,e){if(t)return typeof t=="function"?Wi()?ki(t,e):"ease-out":gi(t)?oe(t):Array.isArray(t)?t.map(n=>Ki(n,e)||Ui.easeOut):Ui[t]}function kc(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 f=Ki(a,i);Array.isArray(f)&&(c.easing=f);const h={delay:s,duration:i,easing:Array.isArray(f)?"linear":f,fill:"both",iterations:o+1,direction:r==="reverse"?"alternate":"normal"};return u&&(h.pseudoElement=u),t.animate(c,h)}function zi(t){return typeof t=="function"&&"applyToOptions"in t}function jc({type:t,...e}){return zi(t)&&Wi()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class Lc extends kn{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,yt(typeof e.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const u=jc(e);this.animation=kc(n,s,i,u,o),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const c=Dn(i,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(c):Vc(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 ft(Number(e))}get time(){return ft(Number(this.animation.currentTime)||0)}set time(e){this.finishedTime=null,this.animation.currentTime=rt(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&&Rc()?(this.animation.timeline=e,Q):n(this)}}const Hi={anticipate:hi,backInOut:fi,circInOut:mi};function Oc(t){return t in Hi}function Ic(t){typeof t.ease=="string"&&Oc(t.ease)&&(t.ease=Hi[t.ease])}const Yi=10;class Nc extends Lc{constructor(e){Ic(e),Oi(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 jn({...r,autoplay:!1}),l=rt(this.finishedTime??this.time);n.setWithVelocity(a.sample(l-Yi).value,a.sample(l).value,Yi),a.stop()}}const Xi=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(Tt.test(t)||t==="0")&&!t.startsWith("url("));function Fc(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 Bc(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=Xi(i,e),a=Xi(o,e);return Ot(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:Fc(t)||(n==="spring"||zi(n))&&s}function Wn(t){t.duration=0,t.type}const _c=new Set(["opacity","clipPath","filter","transform"]),$c=fn(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Wc(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 $c()&&n&&_c.has(n)&&(n!=="transform"||!u)&&!l&&!s&&i!=="mirror"&&o!==0&&r!=="inertia"}const Uc=40;class Kc extends kn{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,...f}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=Z.now();const h={autoplay:e,delay:n,type:s,repeat:i,repeatDelay:o,repeatType:r,name:l,motionValue:u,element:c,...f},d=c?.KeyframeResolver||$n;this.keyframeResolver=new d(a,(m,y,x)=>this.onKeyframesResolved(m,y,h,!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=Z.now(),Bc(e,o,r,a)||((vt.instantAnimations||!l)&&c?.(Dn(e,s,n)),e[0]=e[e.length-1],Wn(s),s.repeat=0);const h={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>Uc?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...s,keyframes:e},d=!u&&Wc(h)?new Nc({...h,element:h.motionValue.owner.current}):new jn(h);d.finished.then(()=>this.notifyFinished()).catch(Q),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(),Ac()),this._animation}get duration(){return this.animation.duration}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 zc=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Hc(t){const e=zc.exec(t);if(!e)return[,];const[,n,s,i]=e;return[`--${n??s}`,i]}const Yc=4;function Gi(t,e,n=1){yt(n<=Yc,`Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[s,i]=Hc(t);if(!s)return;const o=window.getComputedStyle(e).getPropertyValue(s);if(o){const r=o.trim();return ni(r)?parseFloat(r):r}return vn(i)?Gi(i,e,n+1):i}function Un(t,e){return t?.[e]??t?.default??t}const qi=new Set(["width","height","top","left","right","bottom",...Bt]),Xc={test:t=>t==="auto",parse:t=>t},Zi=t=>e=>e.test(t),Ji=[It,E,ht,wt,Fl,Nl,Xc],Qi=t=>Ji.find(Zi(t));function Gc(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||ii(t):!0}const qc=new Set(["brightness","contrast","saturate","opacity"]);function Zc(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[s]=n.match(xn)||[];if(!s)return t;const i=n.replace(s,"");let o=qc.has(e)?1:0;return s!==n&&(o*=100),e+"("+o+i+")"}const Jc=/\b([a-z-]*)\(.*?\)/gu,Kn={...Tt,getAnimatableNone:t=>{const e=t.match(Jc);return e?e.map(Zc).join(" "):t}},tr={...It,transform:Math.round},zn={borderWidth:E,borderTopWidth:E,borderRightWidth:E,borderBottomWidth:E,borderLeftWidth:E,borderRadius:E,radius:E,borderTopLeftRadius:E,borderTopRightRadius:E,borderBottomRightRadius:E,borderBottomLeftRadius:E,width:E,maxWidth:E,height:E,maxHeight:E,top:E,right:E,bottom:E,left:E,padding:E,paddingTop:E,paddingRight:E,paddingBottom:E,paddingLeft:E,margin:E,marginTop:E,marginRight:E,marginBottom:E,marginLeft:E,backgroundPositionX:E,backgroundPositionY:E,...{rotate:wt,rotateX:wt,rotateY:wt,rotateZ:wt,scale:je,scaleX:je,scaleY:je,scaleZ:je,skew:wt,skewX:wt,skewY:wt,distance:E,translateX:E,translateY:E,translateZ:E,x:E,y:E,z:E,perspective:E,transformPerspective:E,opacity:ne,originX:Ti,originY:Ti,originZ:E},zIndex:tr,fillOpacity:ne,strokeOpacity:ne,numOctaves:tr},Qc={...zn,color:_,backgroundColor:_,outlineColor:_,fill:_,stroke:_,borderColor:_,borderTopColor:_,borderRightColor:_,borderBottomColor:_,borderLeftColor:_,filter:Kn,WebkitFilter:Kn},er=t=>Qc[t];function nr(t,e){let n=er(t);return n!==Kn&&(n=Tt),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const tu=new Set(["auto","none","0"]);function eu(t,e,n){let s=0,i;for(;s<t.length&&!i;){const o=t[s];typeof o=="string"&&!tu.has(o)&&re(o).values.length&&(i=t[s]),s++}if(i&&n)for(const o of e)t[o]=nr(n,i)}class nu extends $n{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(),vn(u))){const c=Gi(u,n.current);c!==void 0&&(e[l]=c),l===e.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!qi.has(s)||e.length!==2)return;const[i,o]=e,r=Qi(i),a=Qi(o);if(r!==a)if(Bi(r)&&Bi(a))for(let l=0;l<e.length;l++){const u=e[l];typeof u=="string"&&(e[l]=parseFloat(u))}else Vt[s]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:n}=this,s=[];for(let i=0;i<e.length;i++)(e[i]===null||Gc(e[i]))&&s.push(i);s.length&&eu(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=Vt[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]=Vt[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 su(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 sr=(t,e)=>e&&typeof t=="number"?e.transform(t):t;function ir(t){return si(t)&&"offsetHeight"in t}const rr=30,iu=t=>!isNaN(parseFloat(t));class ru{constructor(e,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=s=>{const i=Z.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=Z.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=iu(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return process.env.NODE_ENV!=="production"&&dn(!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(),j.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=Z.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>rr)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,rr);return ri(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 $t(t,e){return new ru(t,e)}const{schedule:Hn}=xi(queueMicrotask,!1),ot={x:!1,y:!1};function or(){return ot.x||ot.y}function ou(t){return t==="x"||t==="y"?ot[t]?null:(ot[t]=!0,()=>{ot[t]=!1}):ot.x||ot.y?null:(ot.x=ot.y=!0,()=>{ot.x=ot.y=!1})}function ar(t,e){const n=su(t),s=new AbortController,i={passive:!0,...e,signal:s.signal};return[n,i,()=>s.abort()]}function lr(t){return!(t.pointerType==="touch"||or())}function au(t,e,n={}){const[s,i,o]=ar(t,n),r=a=>{if(!lr(a))return;const{target:l}=a,u=e(l,a);if(typeof u!="function"||!l)return;const c=f=>{lr(f)&&(u(f),l.removeEventListener("pointerleave",c))};l.addEventListener("pointerleave",c,i)};return s.forEach(a=>{a.addEventListener("pointerenter",r,i)}),o}const cr=(t,e)=>e?t===e?!0:cr(t,e.parentElement):!1,Yn=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1,lu=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function cu(t){return lu.has(t.tagName)||t.tabIndex!==-1}const Ne=new WeakSet;function ur(t){return e=>{e.key==="Enter"&&t(e)}}function Xn(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}const uu=(t,e)=>{const n=t.currentTarget;if(!n)return;const s=ur(()=>{if(Ne.has(n))return;Xn(n,"down");const i=ur(()=>{Xn(n,"up")}),o=()=>Xn(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 fr(t){return Yn(t)&&!or()}function fu(t,e,n={}){const[s,i,o]=ar(t,n),r=a=>{const l=a.currentTarget;if(!fr(a))return;Ne.add(l);const u=e(l,a),c=(d,m)=>{window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",h),Ne.has(l)&&Ne.delete(l),fr(d)&&typeof u=="function"&&u(d,{success:m})},f=d=>{c(d,l===window||l===document||n.useGlobalTarget||cr(l,d.target))},h=d=>{c(d,!1)};window.addEventListener("pointerup",f,i),window.addEventListener("pointercancel",h,i)};return s.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",r,i),ir(a)&&(a.addEventListener("focus",u=>uu(u,i)),!cu(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),o}function hr(t){return si(t)&&"ownerSVGElement"in t}function hu(t){return hr(t)&&t.tagName==="svg"}const H=t=>!!(t&&t.getVelocity),du=[...Ji,_,Tt],mu=t=>du.find(Zi(t)),Gn=S.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});class pu extends C.Component{getSnapshotBeforeUpdate(e){const n=this.props.childRef.current;if(n&&e.isPresent&&!this.props.isPresent){const s=n.offsetParent,i=ir(s)&&s.offsetWidth||0,o=this.props.sizeRef.current;o.height=n.offsetHeight||0,o.width=n.offsetWidth||0,o.top=n.offsetTop,o.left=n.offsetLeft,o.right=i-o.width-o.left}return null}componentDidUpdate(){}render(){return this.props.children}}function gu({children:t,isPresent:e,anchorX:n,root:s}){const i=S.useId(),o=S.useRef(null),r=S.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:a}=S.useContext(Gn);return S.useInsertionEffect(()=>{const{width:l,height:u,top:c,left:f,right:h}=r.current;if(e||!o.current||!l||!u)return;const d=n==="left"?`left: ${f}`:`right: ${h}`;o.current.dataset.motionPopId=i;const m=document.createElement("style");a&&(m.nonce=a);const y=s??document.head;return y.appendChild(m),m.sheet&&m.sheet.insertRule(`
53
- [data-motion-pop-id="${i}"] {
54
- position: absolute !important;
55
- width: ${l}px !important;
56
- height: ${u}px !important;
57
- ${d}px !important;
58
- top: ${c}px !important;
59
- }
60
- `),()=>{y.contains(m)&&y.removeChild(m)}},[e]),b.jsx(pu,{isPresent:e,childRef:o,sizeRef:r,children:C.cloneElement(t,{ref:o})})}const yu=({children:t,initial:e,isPresent:n,onExitComplete:s,custom:i,presenceAffectsLayout:o,mode:r,anchorX:a,root:l})=>{const u=on(vu),c=S.useId();let f=!0,h=S.useMemo(()=>(f=!1,{id:c,initial:e,isPresent:n,custom:i,onExitComplete:d=>{u.set(d,!0);for(const m of u.values())if(!m)return;s&&s()},register:d=>(u.set(d,!1),()=>u.delete(d))}),[n,u,s]);return o&&f&&(h={...h}),S.useMemo(()=>{u.forEach((d,m)=>u.set(m,!1))},[n]),C.useEffect(()=>{!n&&!u.size&&s&&s()},[n]),r==="popLayout"&&(t=b.jsx(gu,{isPresent:n,anchorX:a,root:l,children:t})),b.jsx(Me.Provider,{value:h,children:t})};function vu(){return new Map}function dr(t=!0){const e=S.useContext(Me);if(e===null)return[!0,null];const{isPresent:n,onExitComplete:s,register:i}=e,o=S.useId();S.useEffect(()=>{if(t)return i(o)},[t]);const r=S.useCallback(()=>t&&s&&s(o),[o,s,t]);return!n&&s?[!1,r]:[!0]}const Fe=t=>t.key||"";function mr(t){const e=[];return S.Children.forEach(t,n=>{S.isValidElement(n)&&e.push(n)}),e}const xu=({children:t,custom:e,initial:n=!0,onExitComplete:s,presenceAffectsLayout:i=!0,mode:o="sync",propagate:r=!1,anchorX:a="left",root:l})=>{const[u,c]=dr(r),f=S.useMemo(()=>mr(t),[t]),h=r&&!u?[]:f.map(Fe),d=S.useRef(!0),m=S.useRef(f),y=on(()=>new Map),[x,v]=S.useState(f),[w,g]=S.useState(f);ei(()=>{d.current=!1,m.current=f;for(let V=0;V<w.length;V++){const R=Fe(w[V]);h.includes(R)?y.delete(R):y.get(R)!==!0&&y.set(R,!1)}},[w,h.length,h.join("-")]);const P=[];if(f!==x){let V=[...f];for(let R=0;R<w.length;R++){const A=w[R],k=Fe(A);h.includes(k)||(V.splice(R,0,A),P.push(A))}return o==="wait"&&P.length&&(V=P),g(mr(V)),v(f),null}process.env.NODE_ENV!=="production"&&o==="wait"&&w.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);const{forceRender:T}=S.useContext(rn);return b.jsx(b.Fragment,{children:w.map(V=>{const R=Fe(V),A=r&&!u?!1:f===w||h.includes(R),k=()=>{if(y.has(R))y.set(R,!0);else return;let L=!0;y.forEach($=>{$||(L=!1)}),L&&(T?.(),g(m.current),r&&c?.(),s&&s())};return b.jsx(yu,{isPresent:A,initial:!d.current||n?void 0:!1,custom:e,presenceAffectsLayout:i,mode:o,root:l,onExitComplete:A?void 0:k,anchorX:a,children:V},R)})})},pr=S.createContext({strict:!1}),gr={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"]},Wt={};for(const t in gr)Wt[t]={isEnabled:e=>gr[t].some(n=>!!e[n])};function bu(t){for(const e in t)Wt[e]={...Wt[e],...t[e]}}const wu=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 Be(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||wu.has(t)}let yr=t=>!Be(t);function Tu(t){typeof t=="function"&&(yr=e=>e.startsWith("on")?!Be(e):t(e))}try{Tu(require("@emotion/is-prop-valid").default)}catch{}function Su(t,e,n){const s={};for(const i in t)i==="values"&&typeof t.values=="object"||(yr(i)||n===!0&&Be(i)||!e&&!Be(i)||t.draggable&&i.startsWith("onDrag"))&&(s[i]=t[i]);return s}const _e=S.createContext({});function $e(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}function ae(t){return typeof t=="string"||Array.isArray(t)}const qn=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Zn=["initial",...qn];function We(t){return $e(t.animate)||Zn.some(e=>ae(t[e]))}function vr(t){return!!(We(t)||t.variants)}function Pu(t,e){if(We(t)){const{initial:n,animate:s}=t;return{initial:n===!1||ae(n)?n:void 0,animate:ae(s)?s:void 0}}return t.inherit!==!1?e:{}}function Cu(t){const{initial:e,animate:n}=Pu(t,S.useContext(_e));return S.useMemo(()=>({initial:e,animate:n}),[xr(e),xr(n)])}function xr(t){return Array.isArray(t)?t.join(" "):t}const le={};function Au(t){for(const e in t)le[e]=t[e],yn(e)&&(le[e].isCSSVariable=!0)}function br(t,{layout:e,layoutId:n}){return _t.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!le[t]||t==="opacity")}const Eu={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Vu=Bt.length;function Ru(t,e,n){let s="",i=!0;for(let o=0;o<Vu;o++){const r=Bt[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=sr(a,zn[r]);if(!l){i=!1;const c=Eu[r]||r;s+=`${c}(${u}) `}n&&(e[r]=u)}}return s=s.trim(),n?s=n(e,i?"":s):i&&(s="none"),s}function Jn(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(_t.has(l)){r=!0;continue}else if(yn(l)){i[l]=u;continue}else{const c=sr(u,zn[l]);l.startsWith("origin")?(a=!0,o[l]=c):s[l]=c}}if(e.transform||(r||n?s.transform=Ru(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 Qn=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function wr(t,e,n){for(const s in e)!H(e[s])&&!br(s,n)&&(t[s]=e[s])}function Mu({transformTemplate:t},e){return S.useMemo(()=>{const n=Qn();return Jn(n,e,t),Object.assign({},n.vars,n.style)},[e])}function Du(t,e){const n=t.style||{},s={};return wr(s,n,t),Object.assign(s,Mu(t,e)),s}function ku(t,e){const n={},s=Du(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 ju={offset:"stroke-dashoffset",array:"stroke-dasharray"},Lu={offset:"strokeDashoffset",array:"strokeDasharray"};function Ou(t,e,n=1,s=0,i=!0){t.pathLength=1;const o=i?ju:Lu;t[o.offset]=E.transform(-s);const r=E.transform(e),a=E.transform(n);t[o.array]=`${r} ${a}`}function Tr(t,{attrX:e,attrY:n,attrScale:s,pathLength:i,pathSpacing:o=1,pathOffset:r=0,...a},l,u,c){if(Jn(t,a,u),l){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:f,style:h}=t;f.transform&&(h.transform=f.transform,delete f.transform),(h.transform||f.transformOrigin)&&(h.transformOrigin=f.transformOrigin??"50% 50%",delete f.transformOrigin),h.transform&&(h.transformBox=c?.transformBox??"fill-box",delete f.transformBox),e!==void 0&&(f.x=e),n!==void 0&&(f.y=n),s!==void 0&&(f.scale=s),i!==void 0&&Ou(f,i,o,r,!1)}const Sr=()=>({...Qn(),attrs:{}}),Pr=t=>typeof t=="string"&&t.toLowerCase()==="svg";function Iu(t,e,n,s){const i=S.useMemo(()=>{const o=Sr();return Tr(o,e,Pr(s),t.transformTemplate,t.style),{...o.attrs,style:{...o.style}}},[e]);if(t.style){const o={};wr(o,t.style,t),i.style={...o,...i.style}}return i}const Nu=["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 ts(t){return typeof t!="string"||t.includes("-")?!1:!!(Nu.indexOf(t)>-1||/[A-Z]/u.test(t))}function Fu(t,e,n,{latestValues:s},i,o=!1){const a=(ts(t)?Iu:ku)(e,s,i,t),l=Su(e,typeof t=="string",o),u=t!==S.Fragment?{...l,...a,ref:n}:{},{children:c}=e,f=S.useMemo(()=>H(c)?c.get():c,[c]);return S.createElement(t,{...u,children:f})}function Cr(t){const e=[{},{}];return t?.values.forEach((n,s)=>{e[0][s]=n.get(),e[1][s]=n.getVelocity()}),e}function es(t,e,n,s){if(typeof e=="function"){const[i,o]=Cr(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]=Cr(s);e=e(n!==void 0?n:t.custom,i,o)}return e}function Ue(t){return H(t)?t.get():t}function Bu({scrapeMotionValuesFromProps:t,createRenderState:e},n,s,i){return{latestValues:_u(n,s,i,t),renderState:e()}}function _u(t,e,n,s){const i={},o=s(t,{});for(const h in o)i[h]=Ue(o[h]);let{initial:r,animate:a}=t;const l=We(t),u=vr(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 f=c?a:r;if(f&&typeof f!="boolean"&&!$e(f)){const h=Array.isArray(f)?f:[f];for(let d=0;d<h.length;d++){const m=es(t,h[d]);if(m){const{transitionEnd:y,transition:x,...v}=m;for(const w in v){let g=v[w];if(Array.isArray(g)){const P=c?g.length-1:0;g=g[P]}g!==null&&(i[w]=g)}for(const w in y)i[w]=y[w]}}}return i}const Ar=t=>(e,n)=>{const s=S.useContext(_e),i=S.useContext(Me),o=()=>Bu(t,e,s,i);return n?o():on(o)};function ns(t,e,n){const{style:s}=t,i={};for(const o in s)(H(s[o])||e.style&&H(e.style[o])||br(o,t)||n?.getValue(o)?.liveStyle!==void 0)&&(i[o]=s[o]);return i}const $u=Ar({scrapeMotionValuesFromProps:ns,createRenderState:Qn});function Er(t,e,n){const s=ns(t,e,n);for(const i in t)if(H(t[i])||H(e[i])){const o=Bt.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;s[o]=t[i]}return s}const Wu=Ar({scrapeMotionValuesFromProps:Er,createRenderState:Sr}),Uu=Symbol.for("motionComponentSymbol");function Ut(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function Ku(t,e,n){return S.useCallback(s=>{s&&t.onMount&&t.onMount(s),e&&(s?e.mount(s):e.unmount()),n&&(typeof n=="function"?n(s):Ut(n)&&(n.current=s))},[e])}const ss=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Vr="data-"+ss("framerAppearId"),Rr=S.createContext({});function zu(t,e,n,s,i){const{visualElement:o}=S.useContext(_e),r=S.useContext(pr),a=S.useContext(Me),l=S.useContext(Gn).reducedMotion,u=S.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,f=S.useContext(Rr);c&&!c.projection&&i&&(c.type==="html"||c.type==="svg")&&Hu(u.current,n,i,f);const h=S.useRef(!1);S.useInsertionEffect(()=>{c&&h.current&&c.update(n,a)});const d=n[Vr],m=S.useRef(!!d&&!window.MotionHandoffIsComplete?.(d)&&window.MotionHasOptimisedAnimation?.(d));return ei(()=>{c&&(h.current=!0,window.MotionIsMounted=!0,c.updateFeatures(),c.scheduleRenderMicrotask(),m.current&&c.animationState&&c.animationState.animateChanges())}),S.useEffect(()=>{c&&(!m.current&&c.animationState&&c.animationState.animateChanges(),m.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(d)}),m.current=!1),c.enteringChildren=void 0)}),c}function Hu(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:Mr(t.parent)),t.projection.setOptions({layoutId:i,layout:o,alwaysMeasureLayout:!!r||a&&Ut(a),visualElement:t,animationType:typeof o=="string"?o:"both",initialPromotionConfig:s,crossfade:c,layoutScroll:l,layoutRoot:u})}function Mr(t){if(t)return t.options.allowProjection!==!1?t.projection:Mr(t.parent)}function is(t,{forwardMotionProps:e=!1}={},n,s){n&&bu(n);const i=ts(t)?Wu:$u;function o(a,l){let u;const c={...S.useContext(Gn),...a,layoutId:Yu(a)},{isStatic:f}=c,h=Cu(a),d=i(a,f);if(!f&&an){Xu(c,n);const m=Gu(c);u=m.MeasureLayout,h.visualElement=zu(t,d,c,s,m.ProjectionNode)}return b.jsxs(_e.Provider,{value:h,children:[u&&h.visualElement?b.jsx(u,{visualElement:h.visualElement,...c}):null,Fu(t,a,Ku(d,h.visualElement,l),d,f,e)]})}o.displayName=`motion.${typeof t=="string"?t:`create(${t.displayName??t.name??""})`}`;const r=S.forwardRef(o);return r[Uu]=t,r}function Yu({layoutId:t}){const e=S.useContext(rn).id;return e&&t!==void 0?e+"-"+t:t}function Xu(t,e){const n=S.useContext(pr).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?Ot(!1,s,"lazy-strict-mode"):yt(!1,s,"lazy-strict-mode")}}function Gu(t){const{drag:e,layout:n}=Wt;if(!e&&!n)return{};const s={...e,...n};return{MeasureLayout:e?.isEnabled(t)||n?.isEnabled(t)?s.MeasureLayout:void 0,ProjectionNode:s.ProjectionNode}}function qu(t,e){if(typeof Proxy>"u")return is;const n=new Map,s=(o,r)=>is(o,r,t,e),i=(o,r)=>(process.env.NODE_ENV!=="production"&&dn(!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,is(r,void 0,t,e)),n.get(r))})}function Dr({top:t,left:e,right:n,bottom:s}){return{x:{min:e,max:n},y:{min:t,max:s}}}function Zu({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function Ju(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 rs(t){return t===void 0||t===1}function os({scale:t,scaleX:e,scaleY:n}){return!rs(t)||!rs(e)||!rs(n)}function Mt(t){return os(t)||kr(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function kr(t){return jr(t.x)||jr(t.y)}function jr(t){return t&&t!=="0%"}function Ke(t,e,n){const s=t-n,i=e*s;return n+i}function Lr(t,e,n,s,i){return i!==void 0&&(t=Ke(t,i,s)),Ke(t,n,s)+e}function as(t,e=0,n=1,s,i){t.min=Lr(t.min,e,n,s,i),t.max=Lr(t.max,e,n,s,i)}function Or(t,{x:e,y:n}){as(t.x,e.translate,e.scale,e.originPoint),as(t.y,n.translate,n.scale,n.originPoint)}const Ir=.999999999999,Nr=1.0000000000001;function Qu(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&&zt(t,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),r&&(e.x*=r.x.scale,e.y*=r.y.scale,Or(t,r)),s&&Mt(o.latestValues)&&zt(t,o.latestValues))}e.x<Nr&&e.x>Ir&&(e.x=1),e.y<Nr&&e.y>Ir&&(e.y=1)}function Kt(t,e){t.min=t.min+e,t.max=t.max+e}function Fr(t,e,n,s,i=.5){const o=O(t.min,t.max,i);as(t,e,n,o,s)}function zt(t,e){Fr(t.x,e.x,e.scaleX,e.scale,e.originX),Fr(t.y,e.y,e.scaleY,e.scale,e.originY)}function Br(t,e){return Dr(Ju(t.getBoundingClientRect(),e))}function tf(t,e,n){const s=Br(t,n),{scroll:i}=e;return i&&(Kt(s.x,i.offset.x),Kt(s.y,i.offset.y)),s}const _r=()=>({translate:0,scale:1,origin:0,originPoint:0}),Ht=()=>({x:_r(),y:_r()}),$r=()=>({min:0,max:0}),B=()=>({x:$r(),y:$r()}),ls={current:null},Wr={current:!1};function ef(){if(Wr.current=!0,!!an)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>ls.current=t.matches;t.addEventListener("change",e),e()}else ls.current=!1}const nf=new WeakMap;function sf(t,e,n){for(const s in e){const i=e[s],o=n[s];if(H(i))t.addValue(s,i);else if(H(o))t.addValue(s,$t(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,$t(r!==void 0?r:i,{owner:t}))}}for(const s in n)e[s]===void 0&&t.removeValue(s);return e}const Ur=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class rf{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=$n,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 h=Z.now();this.renderScheduledAt<h&&(this.renderScheduledAt=h,j.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=We(n),this.isVariantNode=vr(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:c,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const h in f){const d=f[h];l[h]!==void 0&&H(d)&&d.set(l[h])}}mount(e){this.current=e,nf.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)),Wr.current||ef(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:ls.current,process.env.NODE_ENV!=="production"&&dn(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(),bt(this.notifyUpdate),bt(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=_t.has(e);s&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",r=>{this.latestValues[e]=r,this.props.onUpdate&&j.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 Wt){const n=Wt[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):B()}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<Ur.length;s++){const i=Ur[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=sf(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=$t(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"&&(ni(s)||ii(s))?s=parseFloat(s):!mu(s)&&Tt.test(n)&&(s=nr(e,n)),this.setBaseTarget(e,H(s)?s.get():s)),H(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=es(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&&!H(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(){Hn.render(this.render)}}class Kr extends rf{constructor(){super(...arguments),this.KeyframeResolver=nu}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;H(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function zr(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 of(t){return window.getComputedStyle(t)}class af extends Kr{constructor(){super(...arguments),this.type="html",this.renderInstance=zr}readValueFromInstance(e,n){if(_t.has(n))return this.projection?.isProjecting?In(n):wc(e,n);{const s=of(e),i=(yn(n)?s.getPropertyValue(n):s[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(e,{transformPagePoint:n}){return Br(e,n)}build(e,n,s){Jn(e,n,s.transformTemplate)}scrapeMotionValuesFromProps(e,n,s){return ns(e,n,s)}}const Hr=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 lf(t,e,n,s){zr(t,e,void 0,s);for(const i in e.attrs)t.setAttribute(Hr.has(i)?i:ss(i),e.attrs[i])}class cf extends Kr{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=B}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(_t.has(n)){const s=er(n);return s&&s.default||0}return n=Hr.has(n)?n:ss(n),e.getAttribute(n)}scrapeMotionValuesFromProps(e,n,s){return Er(e,n,s)}build(e,n,s){Tr(e,n,this.isSVGTag,s.transformTemplate,s.style)}renderInstance(e,n,s,i){lf(e,n,s,i)}mount(e){this.isSVGTag=Pr(e.tagName),super.mount(e)}}const uf=(t,e)=>ts(t)?new cf(e):new af(e,{allowProjection:t!==S.Fragment});function Yt(t,e,n){const s=t.getProps();return es(s,e,n!==void 0?n:s.custom,t)}const cs=t=>Array.isArray(t);function ff(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,$t(n))}function hf(t){return cs(t)?t[t.length-1]||0:t}function df(t,e){const n=Yt(t,e);let{transitionEnd:s={},transition:i={},...o}=n||{};o={...o,...s};for(const r in o){const a=hf(o[r]);ff(t,r,a)}}function mf(t){return!!(H(t)&&t.add)}function us(t,e){const n=t.getValue("willChange");if(mf(n))return n.add(e);if(!n&&vt.WillChange){const s=new vt.WillChange("auto");t.addValue("willChange",s),s.add(e)}}function Yr(t){return t.props[Vr]}const pf=t=>t!==null;function gf(t,{repeat:e,repeatType:n="loop"},s){const i=t.filter(pf),o=e&&n!=="loop"&&e%2===1?0:i.length-1;return i[o]}const yf={type:"spring",stiffness:500,damping:25,restSpeed:10},vf=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),xf={type:"keyframes",duration:.8},bf={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},wf=(t,{keyframes:e})=>e.length>2?xf:_t.has(t)?t.startsWith("scale")?vf(e[1]):yf:bf;function Tf({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 fs=(t,e,n,s={},i,o)=>r=>{const a=Un(s,t)||{},l=a.delay||s.delay||0;let{elapsed:u=0}=s;u=u-rt(l);const c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-u,onUpdate:h=>{e.set(h),a.onUpdate&&a.onUpdate(h)},onComplete:()=>{r(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:o?void 0:i};Tf(a)||Object.assign(c,wf(t,c)),c.duration&&(c.duration=rt(c.duration)),c.repeatDelay&&(c.repeatDelay=rt(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let f=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(Wn(c),c.delay===0&&(f=!0)),(vt.instantAnimations||vt.skipAnimations)&&(f=!0,Wn(c),c.delay=0),c.allowFlatten=!a.type&&!a.ease,f&&!o&&e.get()!==void 0){const h=gf(c.keyframes,a);if(h!==void 0){j.update(()=>{c.onUpdate(h),c.onComplete()});return}}return a.isSync?new jn(c):new Kc(c)};function Sf({protectedKeys:t,needsAnimating:e},n){const s=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,s}function Xr(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 f=t.getValue(c,t.latestValues[c]??null),h=a[c];if(h===void 0||u&&Sf(u,c))continue;const d={delay:n,...Un(o||{},c)},m=f.get();if(m!==void 0&&!f.isAnimating&&!Array.isArray(h)&&h===m&&!d.velocity)continue;let y=!1;if(window.MotionHandoffAnimation){const v=Yr(t);if(v){const w=window.MotionHandoffAnimation(v,c,j);w!==null&&(d.startTime=w,y=!0)}}us(t,c),f.start(fs(c,f,h,t.shouldReduceMotion&&qi.has(c)?{type:!1}:d,t,y));const x=f.animation;x&&l.push(x)}return r&&Promise.all(l).then(()=>{j.update(()=>{r&&df(t,r)})}),l}function Gr(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 hs(t,e,n={}){const s=Yt(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(Xr(t,s,n)):()=>Promise.resolve(),r=t.variantChildren&&t.variantChildren.size?(l=0)=>{const{delayChildren:u=0,staggerChildren:c,staggerDirection:f}=i;return Pf(t,e,l,u,c,f,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 Pf(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(hs(l,e,{...r,delay:n+(typeof s=="function"?0:s)+Gr(t.variantChildren,l,s,i,o)}).then(()=>l.notify("AnimationComplete",e)));return Promise.all(a)}function Cf(t,e,n={}){t.notify("AnimationStart",e);let s;if(Array.isArray(e)){const i=e.map(o=>hs(t,o,n));s=Promise.all(i)}else if(typeof e=="string")s=hs(t,e,n);else{const i=typeof e=="function"?Yt(t,e,n.custom):e;s=Promise.all(Xr(t,i,n))}return s.then(()=>{t.notify("AnimationComplete",e)})}function qr(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 Af=Zn.length;function Zr(t){if(!t)return;if(!t.isControllingVariants){const n=t.parent?Zr(t.parent)||{}:{};return t.props.initial!==void 0&&(n.initial=t.props.initial),n}const e={};for(let n=0;n<Af;n++){const s=Zn[n],i=t.props[s];(ae(i)||i===!1)&&(e[s]=i)}return e}const Ef=[...qn].reverse(),Vf=qn.length;function Rf(t){return e=>Promise.all(e.map(({animation:n,options:s})=>Cf(t,n,s)))}function Mf(t){let e=Rf(t),n=Jr(),s=!0;const i=l=>(u,c)=>{const f=Yt(t,c,l==="exit"?t.presenceContext?.custom:void 0);if(f){const{transition:h,transitionEnd:d,...m}=f;u={...u,...m,...d}}return u};function o(l){e=l(t)}function r(l){const{props:u}=t,c=Zr(t.parent)||{},f=[],h=new Set;let d={},m=1/0;for(let x=0;x<Vf;x++){const v=Ef[x],w=n[v],g=u[v]!==void 0?u[v]:c[v],P=ae(g),T=v===l?w.isActive:null;T===!1&&(m=x);let V=g===c[v]&&g!==u[v]&&P;if(V&&s&&t.manuallyAnimateOnMount&&(V=!1),w.protectedKeys={...d},!w.isActive&&T===null||!g&&!w.prevProp||$e(g)||typeof g=="boolean")continue;const R=Df(w.prevProp,g);let A=R||v===l&&w.isActive&&!V&&P||x>m&&P,k=!1;const L=Array.isArray(g)?g:[g];let $=L.reduce(i(v),{});T===!1&&($={});const{prevResolvedValues:at={}}=w,nt={...at,...$},dt=N=>{A=!0,h.has(N)&&(k=!0,h.delete(N)),w.needsAnimating[N]=!0;const D=t.getValue(N);D&&(D.liveStyle=!1)};for(const N in nt){const D=$[N],q=at[N];if(d.hasOwnProperty(N))continue;let p=!1;cs(D)&&cs(q)?p=!qr(D,q):p=D!==q,p?D!=null?dt(N):h.add(N):D!==void 0&&h.has(N)?dt(N):w.protectedKeys[N]=!0}w.prevProp=g,w.prevResolvedValues=$,w.isActive&&(d={...d,...$}),s&&t.blockInitialAnimation&&(A=!1);const Pt=V&&R;A&&(!Pt||k)&&f.push(...L.map(N=>{const D={type:v};if(typeof N=="string"&&s&&!Pt&&t.manuallyAnimateOnMount&&t.parent){const{parent:q}=t,p=Yt(q,N);if(q.enteringChildren&&p){const{delayChildren:M}=p.transition||{};D.delay=Gr(q.enteringChildren,t,M)}}return{animation:N,options:D}}))}if(h.size){const x={};if(typeof u.initial!="boolean"){const v=Yt(t,Array.isArray(u.initial)?u.initial[0]:u.initial);v&&v.transition&&(x.transition=v.transition)}h.forEach(v=>{const w=t.getBaseTarget(v),g=t.getValue(v);g&&(g.liveStyle=!0),x[v]=w??null}),f.push({animation:x})}let y=!!f.length;return s&&(u.initial===!1||u.initial===u.animate)&&!t.manuallyAnimateOnMount&&(y=!1),s=!1,y?e(f):Promise.resolve()}function a(l,u){if(n[l].isActive===u)return Promise.resolve();t.variantChildren?.forEach(f=>f.animationState?.setActive(l,u)),n[l].isActive=u;const c=r(l);for(const f in n)n[f].protectedKeys={};return c}return{animateChanges:r,setActive:a,setAnimateFunction:o,getState:()=>n,reset:()=>{n=Jr(),s=!0}}}function Df(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!qr(e,t):!1}function Dt(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Jr(){return{animate:Dt(!0),whileInView:Dt(),whileHover:Dt(),whileTap:Dt(),whileDrag:Dt(),whileFocus:Dt(),exit:Dt()}}class St{constructor(e){this.isMounted=!1,this.node=e}update(){}}class kf extends St{constructor(e){super(e),e.animationState||(e.animationState=Mf(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();$e(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 jf=0;class Lf extends St{constructor(){super(...arguments),this.id=jf++}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 Of={animation:{Feature:kf},exit:{Feature:Lf}};function ce(t,e,n,s={passive:!0}){return t.addEventListener(e,n,s),()=>t.removeEventListener(e,n)}function ue(t){return{point:{x:t.pageX,y:t.pageY}}}const If=t=>e=>Yn(e)&&t(e,ue(e));function fe(t,e,n,s){return ce(t,e,If(n),s)}const Qr=1e-4,Nf=1-Qr,Ff=1+Qr,to=.01,Bf=0-to,_f=0+to;function G(t){return t.max-t.min}function $f(t,e,n){return Math.abs(t-e)<=n}function eo(t,e,n,s=.5){t.origin=s,t.originPoint=O(e.min,e.max,t.origin),t.scale=G(n)/G(e),t.translate=O(n.min,n.max,t.origin)-t.originPoint,(t.scale>=Nf&&t.scale<=Ff||isNaN(t.scale))&&(t.scale=1),(t.translate>=Bf&&t.translate<=_f||isNaN(t.translate))&&(t.translate=0)}function he(t,e,n,s){eo(t.x,e.x,n.x,s?s.originX:void 0),eo(t.y,e.y,n.y,s?s.originY:void 0)}function no(t,e,n){t.min=n.min+e.min,t.max=t.min+G(e)}function Wf(t,e,n){no(t.x,e.x,n.x),no(t.y,e.y,n.y)}function so(t,e,n){t.min=e.min-n.min,t.max=t.min+G(e)}function de(t,e,n){so(t.x,e.x,n.x),so(t.y,e.y,n.y)}function tt(t){return[t("x"),t("y")]}const io=({current:t})=>t?t.ownerDocument.defaultView:null,ro=(t,e)=>Math.abs(t-e);function Uf(t,e){const n=ro(t.x,e.x),s=ro(t.y,e.y);return Math.sqrt(n**2+s**2)}class oo{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 h=ms(this.lastMoveEventInfo,this.history),d=this.startEvent!==null,m=Uf(h.offset,{x:0,y:0})>=this.distanceThreshold;if(!d&&!m)return;const{point:y}=h,{timestamp:x}=K;this.history.push({...y,timestamp:x});const{onStart:v,onMove:w}=this.handlers;d||(v&&v(this.lastMoveEvent,h),this.startEvent=this.lastMoveEvent),w&&w(this.lastMoveEvent,h)},this.handlePointerMove=(h,d)=>{this.lastMoveEvent=h,this.lastMoveEventInfo=ds(d,this.transformPagePoint),j.update(this.updatePoint,!0)},this.handlePointerUp=(h,d)=>{this.end();const{onEnd:m,onSessionEnd:y,resumeAnimation:x}=this.handlers;if(this.dragSnapToOrigin&&x&&x(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const v=ms(h.type==="pointercancel"?this.lastMoveEventInfo:ds(d,this.transformPagePoint),this.history);this.startEvent&&m&&m(h,v),y&&y(h,v)},!Yn(e))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=s,this.distanceThreshold=r,this.contextWindow=i||window;const a=ue(e),l=ds(a,this.transformPagePoint),{point:u}=l,{timestamp:c}=K;this.history=[{...u,timestamp:c}];const{onSessionStart:f}=n;f&&f(e,ms(l,this.history)),this.removeListeners=Qt(fe(this.contextWindow,"pointermove",this.handlePointerMove),fe(this.contextWindow,"pointerup",this.handlePointerUp),fe(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),bt(this.updatePoint)}}function ds(t,e){return e?{point:e(t.point)}:t}function ao(t,e){return{x:t.x-e.x,y:t.y-e.y}}function ms({point:t},e){return{point:t,delta:ao(t,lo(e)),offset:ao(t,Kf(e)),velocity:zf(e,.1)}}function Kf(t){return t[0]}function lo(t){return t[t.length-1]}function zf(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,s=null;const i=lo(t);for(;n>=0&&(s=t[n],!(i.timestamp-s.timestamp>rt(e)));)n--;if(!s)return{x:0,y:0};const o=ft(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 Hf(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 co(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 Yf(t,{top:e,left:n,bottom:s,right:i}){return{x:co(t.x,n,i),y:co(t.y,e,s)}}function uo(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 Xf(t,e){return{x:uo(t.x,e.x),y:uo(t.y,e.y)}}function Gf(t,e){let n=.5;const s=G(t),i=G(e);return i>s?n=te(e.min,e.max-s,t.min):s>i&&(n=te(t.min,t.max-i,e.min)),gt(0,1,n)}function qf(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 ps=.35;function Zf(t=ps){return t===!1?t=0:t===!0&&(t=ps),{x:fo(t,"left","right"),y:fo(t,"top","bottom")}}function fo(t,e,n){return{min:ho(t,e),max:ho(t,n)}}function ho(t,e){return typeof t=="number"?t:t[e]||0}const Jf=new WeakMap;class Qf{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=B(),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=f=>{const{dragSnapToOrigin:h}=this.getProps();h?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(ue(f).point)},r=(f,h)=>{const{drag:d,dragPropagation:m,onDragStart:y}=this.getProps();if(d&&!m&&(this.openDragLock&&this.openDragLock(),this.openDragLock=ou(d),!this.openDragLock))return;this.latestPointerEvent=f,this.latestPanInfo=h,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),tt(v=>{let w=this.getAxisMotionValue(v).get()||0;if(ht.test(w)){const{projection:g}=this.visualElement;if(g&&g.layout){const P=g.layout.layoutBox[v];P&&(w=G(P)*(parseFloat(w)/100))}}this.originPoint[v]=w}),y&&j.postRender(()=>y(f,h)),us(this.visualElement,"transform");const{animationState:x}=this.visualElement;x&&x.setActive("whileDrag",!0)},a=(f,h)=>{this.latestPointerEvent=f,this.latestPanInfo=h;const{dragPropagation:d,dragDirectionLock:m,onDirectionLock:y,onDrag:x}=this.getProps();if(!d&&!this.openDragLock)return;const{offset:v}=h;if(m&&this.currentDirection===null){this.currentDirection=th(v),this.currentDirection!==null&&y&&y(this.currentDirection);return}this.updateAxis("x",h.point,v),this.updateAxis("y",h.point,v),this.visualElement.render(),x&&x(f,h)},l=(f,h)=>{this.latestPointerEvent=f,this.latestPanInfo=h,this.stop(f,h),this.latestPointerEvent=null,this.latestPanInfo=null},u=()=>tt(f=>this.getAnimationState(f)==="paused"&&this.getAxisMotionValue(f).animation?.play()),{dragSnapToOrigin:c}=this.getProps();this.panSession=new oo(e,{onSessionStart:o,onStart:r,onMove:a,onSessionEnd:l,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,distanceThreshold:s,contextWindow:io(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&&j.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||!ze(e,i,this.currentDirection))return;const o=this.getAxisMotionValue(e);let r=this.originPoint[e]+s[e];this.constraints&&this.constraints[e]&&(r=Hf(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&&Ut(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&s?this.constraints=Yf(s.layoutBox,e):this.constraints=!1,this.elastic=Zf(n),i!==this.constraints&&s&&this.constraints&&!this.hasMutatedConstraints&&tt(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=qf(s.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!Ut(e))return!1;const s=e.current;yt(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=tf(s,i.root,this.visualElement.getTransformPagePoint());let r=Xf(i.layout.layoutBox,o);if(n){const a=n(Zu(r));this.hasMutatedConstraints=!!a,a&&(r=Dr(a))}return r}startAnimation(e){const{drag:n,dragMomentum:s,dragElastic:i,dragTransition:o,dragSnapToOrigin:r,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},u=tt(c=>{if(!ze(c,n,this.currentDirection))return;let f=l&&l[c]||{};r&&(f={min:0,max:0});const h=i?200:1e6,d=i?40:1e7,m={type:"inertia",velocity:s?e[c]:0,bounceStiffness:h,bounceDamping:d,timeConstant:750,restDelta:1,restSpeed:10,...o,...f};return this.startAxisValueAnimation(c,m)});return Promise.all(u).then(a)}startAxisValueAnimation(e,n){const s=this.getAxisMotionValue(e);return us(this.visualElement,e),s.start(fs(e,s,0,n,this.visualElement,!1))}stopAnimation(){tt(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){tt(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){tt(n=>{const{drag:s}=this.getProps();if(!ze(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(!Ut(n)||!s||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};tt(r=>{const a=this.getAxisMotionValue(r);if(a&&this.constraints!==!1){const l=a.get();i[r]=Gf({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(),tt(r=>{if(!ze(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;Jf.set(this.visualElement,this);const e=this.visualElement.current,n=fe(e,"pointerdown",l=>{const{drag:u,dragListener:c=!0}=this.getProps();u&&c&&this.start(l)}),s=()=>{const{dragConstraints:l}=this.getProps();Ut(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()),j.read(s);const r=ce(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",(({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&(tt(c=>{const f=this.getAxisMotionValue(c);f&&(this.originPoint[c]+=l[c].translate,f.set(f.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=ps,dragMomentum:a=!0}=e;return{...e,drag:n,dragDirectionLock:s,dragPropagation:i,dragConstraints:o,dragElastic:r,dragMomentum:a}}}function ze(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function th(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class eh extends St{constructor(e){super(e),this.removeGroupControls=Q,this.removeListeners=Q,this.controls=new Qf(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Q}unmount(){this.removeGroupControls(),this.removeListeners()}}const mo=t=>(e,n)=>{t&&j.postRender(()=>t(e,n))};class nh extends St{constructor(){super(...arguments),this.removePointerDownListener=Q}onPointerDown(e){this.session=new oo(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:io(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:s,onPanEnd:i}=this.node.getProps();return{onSessionStart:mo(e),onStart:mo(n),onMove:s,onEnd:(o,r)=>{delete this.session,i&&j.postRender(()=>i(o,r))}}}mount(){this.removePointerDownListener=fe(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 He={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function po(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const me={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(E.test(t))t=parseFloat(t);else return t;const n=po(t,e.target.x),s=po(t,e.target.y);return`${n}% ${s}%`}},sh={correct:(t,{treeScale:e,projectionDelta:n})=>{const s=t,i=Tt.parse(t);if(i.length>5)return s;const o=Tt.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 gs=!1;class ih extends S.Component{componentDidMount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s,layoutId:i}=this.props,{projection:o}=e;Au(rh),o&&(n.group&&n.group.add(o),s&&s.register&&i&&s.register(o),gs&&o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),He.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:n,visualElement:s,drag:i,isPresent:o}=this.props,{projection:r}=s;return r&&(r.isPresent=o,gs=!0,i||e.layoutDependency!==n||n===void 0||e.isPresent!==o?r.willUpdate():this.safeToRemove(),e.isPresent!==o&&(o?r.promote():r.relegate()||j.postRender(()=>{const a=r.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),Hn.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s}=this.props,{projection:i}=e;gs=!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 go(t){const[e,n]=dr(),s=S.useContext(rn);return b.jsx(ih,{...t,layoutGroup:s,switchLayoutGroup:S.useContext(Rr),isPresent:e,safeToRemove:n})}const rh={borderRadius:{...me,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:me,borderTopRightRadius:me,borderBottomLeftRadius:me,borderBottomRightRadius:me,boxShadow:sh};function oh(t,e,n){const s=H(t)?t:$t(t);return s.start(fs("",s,e,n)),s.animation}const ah=(t,e)=>t.depth-e.depth;class lh{constructor(){this.children=[],this.isDirty=!1}add(e){ln(this.children,e),this.isDirty=!0}remove(e){cn(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(ah),this.isDirty=!1,this.children.forEach(e)}}function ch(t,e){const n=Z.now(),s=({timestamp:i})=>{const o=i-n;o>=e&&(bt(s),t(o-e))};return j.setup(s,!0),()=>bt(s)}const yo=["TopLeft","TopRight","BottomLeft","BottomRight"],uh=yo.length,vo=t=>typeof t=="string"?parseFloat(t):t,xo=t=>typeof t=="number"||E.test(t);function fh(t,e,n,s,i,o){i?(t.opacity=O(0,n.opacity??1,hh(s)),t.opacityExit=O(e.opacity??1,0,dh(s))):o&&(t.opacity=O(e.opacity??1,n.opacity??1,s));for(let r=0;r<uh;r++){const a=`border${yo[r]}Radius`;let l=bo(e,a),u=bo(n,a);if(l===void 0&&u===void 0)continue;l||(l=0),u||(u=0),l===0||u===0||xo(l)===xo(u)?(t[a]=Math.max(O(vo(l),vo(u),s),0),(ht.test(u)||ht.test(l))&&(t[a]+="%")):t[a]=u}(e.rotate||n.rotate)&&(t.rotate=O(e.rotate||0,n.rotate||0,s))}function bo(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const hh=wo(0,.5,di),dh=wo(.5,.95,Q);function wo(t,e,n){return s=>s<t?0:s>e?1:n(te(t,e,s))}function To(t,e){t.min=e.min,t.max=e.max}function et(t,e){To(t.x,e.x),To(t.y,e.y)}function So(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function Po(t,e,n,s,i){return t-=e,t=Ke(t,1/n,s),i!==void 0&&(t=Ke(t,1/i,s)),t}function mh(t,e=0,n=1,s=.5,i,o=t,r=t){if(ht.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=Po(t.min,e,n,a,i),t.max=Po(t.max,e,n,a,i)}function Co(t,e,[n,s,i],o,r){mh(t,e[n],e[s],e[i],e.scale,o,r)}const ph=["x","scaleX","originX"],gh=["y","scaleY","originY"];function Ao(t,e,n,s){Co(t.x,e,ph,n?n.x:void 0,s?s.x:void 0),Co(t.y,e,gh,n?n.y:void 0,s?s.y:void 0)}function Eo(t){return t.translate===0&&t.scale===1}function Vo(t){return Eo(t.x)&&Eo(t.y)}function Ro(t,e){return t.min===e.min&&t.max===e.max}function yh(t,e){return Ro(t.x,e.x)&&Ro(t.y,e.y)}function Mo(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function Do(t,e){return Mo(t.x,e.x)&&Mo(t.y,e.y)}function ko(t){return G(t.x)/G(t.y)}function jo(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}class vh{constructor(){this.members=[]}add(e){ln(this.members,e),e.scheduleRender()}remove(e){if(cn(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 xh(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:f,rotateY:h,skewX:d,skewY:m}=n;u&&(s=`perspective(${u}px) ${s}`),c&&(s+=`rotate(${c}deg) `),f&&(s+=`rotateX(${f}deg) `),h&&(s+=`rotateY(${h}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 ys=["","X","Y","Z"],bh=1e3;let wh=0;function vs(t,e,n,s){const{latestValues:i}=e;i[t]&&(n[t]=i[t],e.setStaticValue(t,0),s&&(s[t]=0))}function Lo(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=Yr(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:o}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",j,!(i||o))}const{parent:s}=t;s&&!s.hasCheckedOptimisedAppear&&Lo(s)}function Oo({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:s,resetTransform:i}){return class{constructor(r={},a=e?.()){this.id=wh++,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(Ph),this.nodes.forEach(Vh),this.nodes.forEach(Rh),this.nodes.forEach(Ch)},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 lh)}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=hr(r)&&!hu(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,f=0;const h=()=>this.root.updateBlockedByResize=!1;j.read(()=>{f=window.innerWidth}),t(r,()=>{const d=window.innerWidth;d!==f&&(f=d,this.root.updateBlockedByResize=!0,c&&c(),c=ch(h,250),He.hasAnimatedSinceResize&&(He.hasAnimatedSinceResize=!1,this.nodes.forEach(Fo)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&u&&(a||l)&&this.addEventListener("didUpdate",({delta:c,hasLayoutChanged:f,hasRelativeLayoutChanged:h,layout:d})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const m=this.options.transition||u.getDefaultTransition()||Lh,{onLayoutAnimationStart:y,onLayoutAnimationComplete:x}=u.getProps(),v=!this.targetLayout||!Do(this.targetLayout,d),w=!f&&h;if(this.options.layoutRoot||this.resumeFrom||w||f&&(v||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const g={...Un(m,"layout"),onPlay:y,onComplete:x};(u.shouldReduceMotion||this.options.layoutRoot)&&(g.delay=0,g.type=!1),this.startAnimation(g),this.setAnimationOrigin(c,w)}else f||Fo(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(),bt(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(Mh),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&&Lo(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let c=0;c<this.path.length;c++){const f=this.path[c];f.shouldResetTransform=!0,f.updateScroll("snapshot"),f.options.layoutRoot&&f.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(Io);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(No);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Eh),this.nodes.forEach(Th),this.nodes.forEach(Sh)):this.nodes.forEach(No),this.clearAllSnapshots();const a=Z.now();K.delta=gt(0,1e3/60,a-K.timestamp),K.timestamp=a,K.isProcessing=!0,gn.update.process(K),gn.preRender.process(K),gn.render.process(K),K.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Hn.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Ah),this.sharedNodes.forEach(Dh)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,j.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){j.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!G(this.snapshot.measuredBox.x)&&!G(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=B(),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&&!Vo(this.projectionDelta),l=this.getTransformTemplate(),u=l?l(this.latestValues,""):void 0,c=u!==this.prevTransformTemplateValue;r&&this.instance&&(a||Mt(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)),Oh(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:r}=this.options;if(!r)return B();const a=r.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(Ih))){const{scroll:u}=this.root;u&&(Kt(a.x,u.offset.x),Kt(a.y,u.offset.y))}return a}removeElementScroll(r){const a=B();if(et(a,r),this.scroll?.wasRoot)return a;for(let l=0;l<this.path.length;l++){const u=this.path[l],{scroll:c,options:f}=u;u!==this.root&&c&&f.layoutScroll&&(c.wasRoot&&et(a,r),Kt(a.x,c.offset.x),Kt(a.y,c.offset.y))}return a}applyTransform(r,a=!1){const l=B();et(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&&zt(l,{x:-c.scroll.offset.x,y:-c.scroll.offset.y}),Mt(c.latestValues)&&zt(l,c.latestValues)}return Mt(this.latestValues)&&zt(l,this.latestValues),l}removeTransform(r){const a=B();et(a,r);for(let l=0;l<this.path.length;l++){const u=this.path[l];if(!u.instance||!Mt(u.latestValues))continue;os(u.latestValues)&&u.updateSnapshot();const c=B(),f=u.measurePageBox();et(c,f),Ao(a,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,c)}return Mt(this.latestValues)&&Ao(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!==K.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:f}=this.options;if(!(!this.layout||!(c||f))){if(this.resolvedRelativeTargetAt=K.timestamp,!this.targetDelta&&!this.relativeTarget){const h=this.getClosestProjectingParent();h&&h.layout&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=B(),this.relativeTargetOrigin=B(),de(this.relativeTargetOrigin,this.layout.layoutBox,h.layout.layoutBox),et(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=B(),this.targetWithTransforms=B()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Wf(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):et(this.target,this.layout.layoutBox),Or(this.target,this.targetDelta)):et(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const h=this.getClosestProjectingParent();h&&!!h.resumingFrom==!!this.resumingFrom&&!h.options.layoutScroll&&h.target&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=B(),this.relativeTargetOrigin=B(),de(this.relativeTargetOrigin,this.target,h.target),et(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||os(this.parent.latestValues)||kr(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===K.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;et(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,h=this.treeScale.y;Qu(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=B());const{target:d}=r;if(!d){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(So(this.prevProjectionDelta.x,this.projectionDelta.x),So(this.prevProjectionDelta.y,this.projectionDelta.y)),he(this.projectionDelta,this.layoutCorrected,d,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==h||!jo(this.projectionDelta.x,this.prevProjectionDelta.x)||!jo(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=Ht(),this.projectionDelta=Ht(),this.projectionDeltaWithTransform=Ht()}setAnimationOrigin(r,a=!1){const l=this.snapshot,u=l?l.latestValues:{},c={...this.latestValues},f=Ht();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const h=B(),d=l?l.source:void 0,m=this.layout?this.layout.source:void 0,y=d!==m,x=this.getStack(),v=!x||x.members.length<=1,w=!!(y&&!v&&this.options.crossfade===!0&&!this.path.some(jh));this.animationProgress=0;let g;this.mixTargetDelta=P=>{const T=P/1e3;Bo(f.x,r.x,T),Bo(f.y,r.y,T),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(de(h,this.layout.layoutBox,this.relativeParent.layout.layoutBox),kh(this.relativeTarget,this.relativeTargetOrigin,h,T),g&&yh(this.relativeTarget,g)&&(this.isProjectionDirty=!1),g||(g=B()),et(g,this.relativeTarget)),y&&(this.animationValues=c,fh(c,u,this.latestValues,T,w,v)),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&&(bt(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=j.update(()=>{He.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=$t(0)),this.currentAnimation=oh(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(bh),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&&Ko(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||B();const f=G(this.layout.layoutBox.x);l.x.min=r.target.x.min,l.x.max=l.x.min+f;const h=G(this.layout.layoutBox.y);l.y.min=r.target.y.min,l.y.max=l.y.min+h}et(a,l),zt(a,c),he(this.projectionDeltaWithTransform,this.layoutCorrected,a,c)}}registerSharedNode(r,a){this.sharedNodes.has(r)||this.sharedNodes.set(r,new vh),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&&vs("z",r,u,this.animationValues);for(let c=0;c<ys.length;c++)vs(`rotate${ys[c]}`,r,u,this.animationValues),vs(`skew${ys[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=Ue(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=Ue(a?.pointerEvents)||""),this.hasProjected&&!Mt(this.latestValues)&&(r.transform=l?l({},""):"none",this.hasProjected=!1);return}r.visibility="";const c=u.animationValues||u.latestValues;this.applyTransformsToTarget();let f=xh(this.projectionDeltaWithTransform,this.treeScale,c);l&&(f=l(c,f)),r.transform=f;const{x:h,y:d}=this.projectionDelta;r.transformOrigin=`${h.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 le){if(c[m]===void 0)continue;const{correct:y,applyTo:x,isCSSVariable:v}=le[m],w=f==="none"?c[m]:y(c[m],u);if(x){const g=x.length;for(let P=0;P<g;P++)r[x[P]]=w}else v?this.options.visualElement.renderState.vars[m]=w:r[m]=w}this.options.layoutId&&(r.pointerEvents=u===this?Ue(a?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(r=>r.currentAnimation?.stop()),this.root.nodes.forEach(Io),this.root.sharedNodes.clear()}}}function Th(t){t.updateLayout()}function Sh(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"?tt(c=>{const f=o?e.measuredBox[c]:e.layoutBox[c],h=G(f);f.min=n[c].min,f.max=f.min+h}):Ko(i,e.layoutBox,n)&&tt(c=>{const f=o?e.measuredBox[c]:e.layoutBox[c],h=G(n[c]);f.max=f.min+h,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[c].max=t.relativeTarget[c].min+h)});const r=Ht();he(r,n,e.layoutBox);const a=Ht();o?he(a,t.applyTransform(s,!0),e.measuredBox):he(a,n,e.layoutBox);const l=!Vo(r);let u=!1;if(!t.resumeFrom){const c=t.getClosestProjectingParent();if(c&&!c.resumeFrom){const{snapshot:f,layout:h}=c;if(f&&h){const d=B();de(d,e.layoutBox,f.layoutBox);const m=B();de(m,n,h.layoutBox),Do(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 Ph(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 Ch(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function Ah(t){t.clearSnapshot()}function Io(t){t.clearMeasurements()}function No(t){t.isLayoutDirty=!1}function Eh(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function Fo(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function Vh(t){t.resolveTargetDelta()}function Rh(t){t.calcProjection()}function Mh(t){t.resetSkewAndRotation()}function Dh(t){t.removeLeadSnapshot()}function Bo(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 _o(t,e,n,s){t.min=O(e.min,n.min,s),t.max=O(e.max,n.max,s)}function kh(t,e,n,s){_o(t.x,e.x,n.x,s),_o(t.y,e.y,n.y,s)}function jh(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const Lh={duration:.45,ease:[.4,0,.1,1]},$o=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),Wo=$o("applewebkit/")&&!$o("chrome/")?Math.round:Q;function Uo(t){t.min=Wo(t.min),t.max=Wo(t.max)}function Oh(t){Uo(t.x),Uo(t.y)}function Ko(t,e,n){return t==="position"||t==="preserve-aspect"&&!$f(ko(e),ko(n),.2)}function Ih(t){return t!==t.root&&t.scroll?.wasRoot}const Nh=Oo({attachResizeListener:(t,e)=>ce(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),xs={current:void 0},zo=Oo({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!xs.current){const t=new Nh({});t.mount(window),t.setOptions({layoutScroll:!0}),xs.current=t}return xs.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),Fh={pan:{Feature:nh},drag:{Feature:eh,ProjectionNode:zo,MeasureLayout:go}};function Ho(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&&j.postRender(()=>o(e,ue(e)))}class Bh extends St{mount(){const{current:e}=this.node;e&&(this.unmount=au(e,(n,s)=>(Ho(this.node,s,"Start"),i=>Ho(this.node,i,"End"))))}unmount(){}}class _h extends St{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=Qt(ce(this.node.current,"focus",()=>this.onFocus()),ce(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Yo(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&&j.postRender(()=>o(e,ue(e)))}class $h extends St{mount(){const{current:e}=this.node;e&&(this.unmount=fu(e,(n,s)=>(Yo(this.node,s,"Start"),(i,{success:o})=>Yo(this.node,i,o?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const bs=new WeakMap,ws=new WeakMap,Wh=t=>{const e=bs.get(t.target);e&&e(t)},Uh=t=>{t.forEach(Wh)};function Kh({root:t,...e}){const n=t||document;ws.has(n)||ws.set(n,{});const s=ws.get(n),i=JSON.stringify(e);return s[i]||(s[i]=new IntersectionObserver(Uh,{root:t,...e})),s[i]}function zh(t,e,n){const s=Kh(e);return bs.set(t,n),s.observe(t),()=>{bs.delete(t),s.unobserve(t)}}const Hh={some:0,all:1};class Yh extends St{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:Hh[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:f}=this.node.getProps(),h=u?c:f;h&&h(l)};return zh(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(Xh(e,n))&&this.startObserver()}unmount(){}}function Xh({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const Gh={...Of,...{inView:{Feature:Yh},tap:{Feature:$h},focus:{Feature:_h},hover:{Feature:Bh}},...Fh,...{layout:{ProjectionNode:zo,MeasureLayout:go}}},qh=qu(Gh,uf),Zh={top:"bottom center","top-start":"bottom left","top-end":"bottom right",right:"left center","right-start":"top left","right-end":"bottom left",bottom:"top center","bottom-start":"top left","bottom-end":"top right",left:"right center","left-start":"top right","left-end":"bottom right"},Jh=C.memo(({open:t,children:e,className:n,onOutsideClick:s,floatingStyles:i,setFloating:o,placement:r})=>b.jsx(xu,{children:t&&b.jsxs(b.Fragment,{children:[s&&b.jsx(yl,{onClick:s}),b.jsx("div",{ref:o,style:i,className:"z-10",children:b.jsx(qh.div,{className:n,style:{transformOrigin:Zh[r]},initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.95},transition:{duration:.1,ease:"easeInOut"},children:e})})]})})),Qh=t=>{const{placement:e="bottom",onOutsideClick:n,fullWidth:s,minWidth:i,maxWidth:o}=t,r=C.useMemo(()=>[rl({apply({rects:f,elements:h}){s&&(h.floating.style.width=`${f.reference.width}px`),i&&(h.floating.style.minWidth=`${i}px`),o&&(h.floating.style.maxWidth=`${o}px`)}})],[s,i]),{refs:a,floatingStyles:l}=xl({placement:e,middleware:r}),u=C.useRef({onOutsideClick:n,floatingStyles:l,setFloating:a.setFloating,placement:e});u.current={onOutsideClick:n,floatingStyles:l,setFloating:a.setFloating,placement:e};const c=C.useMemo(()=>{const f=h=>{const{floatingStyles:d,setFloating:m,onOutsideClick:y,placement:x}=u.current,{className:v,open:w,children:g}=h;return b.jsx(Jh,{open:w,className:v,onOutsideClick:y,floatingStyles:d,setFloating:m,placement:x,children:g})};return C.memo(f)},[]);return{anchorRef:a.setReference,Popover:c}},td="flex flex-col bg-white border mt-1 border-gray-200 rounded-xl shadow-lg p-3 overflow-y-auto relative",ed=t=>{const{className:e,children:n,...s}=t;return b.jsx("div",{className:U(td,e),...s,children:n})},Ts=t=>{const{onClick:e,Icon:n}=t;return b.jsx("div",{onClick:e,className:U("h-6 w-6 select-none rounded-full p-0.5",e&&"ring-0 transition-all duration-150 ring-gray-200 active:ring-2 cursor-pointer hover:ring-4 group"),children:b.jsx(n,{className:U("h-5 w-5 text-gray-500",e&&"group-active:scale-[0.8] transition-transform origin-center")})})},nd=t=>{const{className:e,label:n,description:s,options:i,onChange:o,value:r,placeholder:a,maxHeight:l=300,error:u}=t,[c,f]=S.useState(!1),h=C.useRef(null),d=i?.find(x=>x.value===r);S.useEffect(()=>{c&&h.current?.focus({preventScroll:!0})},[c]);const{anchorRef:m,Popover:y}=Qh({placement:"bottom",fullWidth:!0,onOutsideClick:()=>f(!1)});return b.jsxs("div",{className:U("flex flex-col",e),children:[b.jsx(Ye,{children:n}),b.jsxs("div",{className:"relative flex w-full flex-col",ref:m,children:[b.jsxs("div",{ref:h,role:"button",tabIndex:0,className:U("flex flex-row items-center h-12 pl-4 pr-10 border border-gray-200 text-gray-900 placeholder:text-gray-400 bg-white transition-all duration-150 rounded-xl shadow-sm ring-0 ring-gray-900/10 focus:ring-4 focus:outline-none select-none",u&&"border-red-600 ring-red-600/20 !pr-10",c&&"ring-4"),onKeyDown:x=>x.key===" "&&f(v=>!v),onClick:()=>f(!c),children:[d&&b.jsx("span",{children:d.label}),!d&&a&&b.jsx("span",{children:a})]}),b.jsxs(Ge,{children:[u&&b.jsx(Xe,{}),!!r&&b.jsx(Ts,{Icon:ha,onClick:()=>o(null)}),b.jsx(Ts,{Icon:Ds})]}),b.jsx(y,{open:c,children:b.jsx(ed,{className:"!p-0",style:{maxHeight:l},children:b.jsx("div",{className:"flex flex-col p-2 gap-1",children:i.map(x=>{const v=x.value===r;return b.jsx(pa,{onClick:()=>{!x.disabled&&o&&(o(x.value),f(!1))},selected:v,disabled:x.disabled,children:x.label},String(x.value))})})})})]}),b.jsx(ye,{children:s}),b.jsx(ve,{children:u})]})},sd=t=>{const{className:e,label:n,description:s,options:i,error:o,...r}=t;return b.jsxs("div",{className:U("flex flex-col",e),children:[b.jsx(Ye,{children:n}),b.jsxs("div",{className:"relative flex w-full flex-col",children:[b.jsx("select",{className:`
76
+ */const Md=dt("outline","eye","Eye",[["path",{d:"M10 12a2 2 0 1 0 4 0a2 2 0 0 0 -4 0",key:"svg-0"}],["path",{d:"M21 12c-2.4 4 -5.4 6 -9 6c-3.6 0 -6.6 -2 -9 -6c2.4 -4 5.4 -6 9 -6c3.6 0 6.6 2 9 6",key:"svg-1"}]]);/**
77
+ * @license @tabler/icons-react v3.34.1 - MIT
78
+ *
79
+ * This source code is licensed under the MIT license.
80
+ * See the LICENSE file in the root directory of this source tree.
81
+ */const qo=dt("outline","search-off","SearchOff",[["path",{d:"M5.039 5.062a7 7 0 0 0 9.91 9.89m1.584 -2.434a7 7 0 0 0 -9.038 -9.057",key:"svg-0"}],["path",{d:"M3 3l18 18",key:"svg-1"}]]);/**
82
+ * @license @tabler/icons-react v3.34.1 - MIT
83
+ *
84
+ * This source code is licensed under the MIT license.
85
+ * See the LICENSE file in the root directory of this source tree.
86
+ */const Ms=dt("outline","search","Search",[["path",{d:"M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0",key:"svg-0"}],["path",{d:"M21 21l-6 -6",key:"svg-1"}]]);/**
87
+ * @license @tabler/icons-react v3.34.1 - MIT
88
+ *
89
+ * This source code is licensed under the MIT license.
90
+ * See the LICENSE file in the root directory of this source tree.
91
+ */const Dd=dt("outline","settings","Settings",[["path",{d:"M10.325 4.317c.426 -1.756 2.924 -1.756 3.35 0a1.724 1.724 0 0 0 2.573 1.066c1.543 -.94 3.31 .826 2.37 2.37a1.724 1.724 0 0 0 1.065 2.572c1.756 .426 1.756 2.924 0 3.35a1.724 1.724 0 0 0 -1.066 2.573c.94 1.543 -.826 3.31 -2.37 2.37a1.724 1.724 0 0 0 -2.572 1.065c-.426 1.756 -2.924 1.756 -3.35 0a1.724 1.724 0 0 0 -2.573 -1.066c-1.543 .94 -3.31 -.826 -2.37 -2.37a1.724 1.724 0 0 0 -1.065 -2.572c-1.756 -.426 -1.756 -2.924 0 -3.35a1.724 1.724 0 0 0 1.066 -2.573c-.94 -1.543 .826 -3.31 2.37 -2.37c1 .608 2.296 .07 2.572 -1.065z",key:"svg-0"}],["path",{d:"M9 12a3 3 0 1 0 6 0a3 3 0 0 0 -6 0",key:"svg-1"}]]);/**
92
+ * @license @tabler/icons-react v3.34.1 - MIT
93
+ *
94
+ * This source code is licensed under the MIT license.
95
+ * See the LICENSE file in the root directory of this source tree.
96
+ */const Ce=dt("outline","x","X",[["path",{d:"M18 6l-12 12",key:"svg-0"}],["path",{d:"M6 6l12 12",key:"svg-1"}]]);/**
97
+ * @license @tabler/icons-react v3.34.1 - MIT
98
+ *
99
+ * This source code is licensed under the MIT license.
100
+ * See the LICENSE file in the root directory of this source tree.
101
+ */const Vd=dt("filled","exclamation-circle-filled","ExclamationCircleFilled",[["path",{d:"M17 3.34a10 10 0 1 1 -15 8.66l.005 -.324a10 10 0 0 1 14.995 -8.336m-5 11.66a1 1 0 0 0 -1 1v.01a1 1 0 0 0 2 0v-.01a1 1 0 0 0 -1 -1m0 -7a1 1 0 0 0 -1 1v4a1 1 0 0 0 2 0v-4a1 1 0 0 0 -1 -1",key:"svg-0"}]]);/**
102
+ * @license @tabler/icons-react v3.34.1 - MIT
103
+ *
104
+ * This source code is licensed under the MIT license.
105
+ * See the LICENSE file in the root directory of this source tree.
106
+ */const kd=dt("filled","mail-filled","MailFilled",[["path",{d:"M22 7.535v9.465a3 3 0 0 1 -2.824 2.995l-.176 .005h-14a3 3 0 0 1 -2.995 -2.824l-.005 -.176v-9.465l9.445 6.297l.116 .066a1 1 0 0 0 .878 0l.116 -.066l9.445 -6.297z",key:"svg-0"}],["path",{d:"M19 4c1.08 0 2.027 .57 2.555 1.427l-9.555 6.37l-9.555 -6.37a2.999 2.999 0 0 1 2.354 -1.42l.201 -.007h14z",key:"svg-1"}]]),Lt=t=>{const{children:e}=t;return e?h.jsx("label",{className:"text-gray-900 font-medium mb-1",children:e}):null},Ft=()=>h.jsx("div",{className:"h-5 w-5",children:h.jsx(Vd,{className:"h-5 w-5 text-red-600"})}),Bt=t=>{const{children:e,className:n}=t;return h.jsx("div",{className:V("absolute top-1/2 -translate-y-1/2 right-3.5 flex flex-row items-center gap-1",n),children:e})},ht=t=>{const{children:e}=t;return e?h.jsx("div",{className:"text-gray-500 text-sm font-medium mt-2",children:e}):null},mt=t=>{const{children:e}=t;return e?h.jsx("div",{className:"text-red-600 text-sm font-medium mt-2",children:e}):null},Ds=t=>{const{className:e,label:n,description:s,Icon:i,error:o,buttonTray:r,...a}=t;return h.jsxs("div",{className:V("flex flex-col",e),children:[h.jsx(Lt,{children:n}),h.jsxs("div",{className:"flex flex-col relative",children:[i&&h.jsx(i,{className:"h-5 w-5 text-gray-900/60 absolute left-4 top-1/2 -translate-y-1/2"}),h.jsx("input",{className:V("h-12 border border-gray-200 text-gray-900 placeholder:text-gray-400 bg-white transition-all duration-150 rounded-xl shadow-sm ring-0 ring-gray-900/10 focus:ring-4 focus:outline-none",i?"pl-12 pr-4":"px-4",o&&"border-red-600 focus:ring-red-600/20 !pr-10"),...a}),h.jsxs(Bt,{children:[o&&h.jsx(Ft,{}),r]})]}),h.jsx(ht,{children:s}),h.jsx(mt,{children:o})]})},St=t=>{const{onClick:e,Icon:n}=t;return h.jsx("div",{onClick:e,className:V("h-6 w-6 select-none rounded-full p-0.5",e&&"ring-0 transition-all duration-150 ring-gray-200 active:ring-2 cursor-pointer hover:ring-4 group"),children:h.jsx(n,{className:V("h-5 w-5 text-gray-500",e&&"group-active:scale-[0.8] transition-transform origin-center")})})},Nd=t=>{const{type:e="password",enableShowPasswordToggle:n=!0,...s}=t,[i,o]=T.useState(!1),r=()=>{o(!i)};return h.jsx(Ds,{type:i?"text":e,buttonTray:n?h.jsx(St,{Icon:i?jd:Md,onClick:r}):void 0,...s})},Od=t=>{const{className:e,label:n,description:s,error:i,...o}=t;return h.jsxs("div",{className:V("flex flex-col",e),children:[h.jsx(Lt,{children:n}),h.jsxs("div",{className:"flex flex-col relative",children:[h.jsx("textarea",{className:V("px-4 py-2.5 min-h-12 border border-gray-200 text-gray-900 placeholder:text-gray-400 bg-white transition-colors duration-150 rounded-xl shadow-sm ring-0 ring-gray-900/10 focus:ring-4 focus:outline-none",i&&"border-red-600 focus:ring-red-600/20 !pr-10"),...o}),h.jsx(Bt,{className:"top-3.5 translate-y-0",children:i&&h.jsx(Ft,{})})]}),h.jsx(ht,{children:s}),h.jsx(mt,{children:i})]})},Id=t=>{const{className:e,label:n,description:s,error:i,...o}=t;return h.jsxs("div",{className:V("flex flex-col",e),children:[h.jsxs("div",{className:"flex flex-row gap-3",children:[h.jsx("input",{type:"radio",className:"h-6 w-6 shrink-0 rounded-full border border-gray-300 shadow-sm ring-0 hover:ring-4 focus:ring-4 ring-gray-900/10 ring-offset-0 focus:outline-0 transition-all duration-150",...o}),n&&h.jsx("label",{htmlFor:t.id,className:V("text-gray-900 font-medium mb-1",t.id&&"cursor-pointer"),children:n})]}),h.jsx(ht,{children:s}),h.jsx(mt,{children:i})]})},Ld=t=>{const{className:e,label:n,description:s,error:i,...o}=t;return h.jsxs("div",{className:V("flex flex-col",e),children:[h.jsxs("div",{className:"flex flex-row gap-3",children:[h.jsxs("div",{className:"relative shrink-0 h-6 w-10",children:[h.jsx("input",{type:"checkbox",className:"appearance-none h-6 w-10 rounded-full checked:bg-transparent border border-gray-300 ring-0 hover:ring-4 focus:ring-4 ring-gray-900/10 ring-offset-0 focus:outline-0 transition-all duration-150",...o}),h.jsx("div",{className:V("rounded-full absolute border inset-0 mt-[2px] pointer-events-none transition-colors duration-150 ",t.checked?"bg-blue-600 border-blue-600":"bg-gray-300 border-gray-300"),children:h.jsx("div",{className:V("absolute top-1/2 -translate-y-1/2 left-1 h-4 w-4 rounded-full bg-white shadow-md transition-all duration-150",t.checked&&"translate-x-3.5 ")})})]}),n&&h.jsx("label",{htmlFor:t.id,className:V("text-gray-900 font-medium mb-1",t.id&&"cursor-pointer"),children:n})]}),h.jsx(ht,{children:s}),h.jsx(mt,{children:i})]})},Fd=t=>{const{className:e,label:n,description:s,error:i,...o}=t;return h.jsxs("div",{className:V("flex flex-col",e),children:[h.jsxs("div",{className:"flex flex-row gap-3",children:[h.jsx("input",{type:"checkbox",className:"h-6 w-6 shrink-0 rounded-lg border border-gray-300 shadow-sm ring-0 hover:ring-4 focus:ring-4 ring-gray-900/10 ring-offset-0 focus:outline-0 transition-all duration-150",...o}),n&&h.jsx("label",{htmlFor:t.id,className:V("text-gray-900 font-medium mb-1",t.id&&"cursor-pointer"),children:n})]}),h.jsx(ht,{children:s}),h.jsx(mt,{children:i})]})},Bd=t=>{const{className:e,label:n,description:s,options:i,error:o,...r}=t;return h.jsxs("div",{className:V("flex flex-col",e),children:[h.jsx(Lt,{children:n}),h.jsxs("div",{className:"relative flex w-full flex-col",children:[h.jsx("select",{className:`
61
107
  appearance-none
62
108
  h-12
63
109
  pl-4
@@ -76,5 +122,8 @@ React keys must be passed directly to JSX without using spread:
76
122
  ring-gray-900/10
77
123
  focus:ring-4
78
124
  focus:outline-none
79
- `,...r,children:i&&i.map((a,l)=>b.jsx("option",{value:a.value,disabled:a.disabled,children:a.label},l))}),b.jsxs(Ge,{children:[o&&b.jsx(Xe,{}),b.jsx(Ts,{Icon:Ds})]})]}),b.jsx(ye,{children:s}),b.jsx(ve,{children:o})]})},id=C.forwardRef((t,e)=>{const{className:n,children:s,...i}=t;return b.jsx("div",{ref:e,className:U("flex flex-col gap-6 border border-gray-200 rounded-xl bg-white shadow-sm px-6 py-6",n),...i,children:s})}),rd=t=>{const{className:e,vertical:n=!1,...s}=t;return b.jsx("div",{className:U(n?"w-px h-full bg-gray-200":"w-full h-px bg-gray-200",e),...s})},od=t=>{const{columns:e,rows:n}=t;return b.jsxs("table",{children:[b.jsx("thead",{children:b.jsx("tr",{className:"text-left",children:e.map(s=>b.jsx("th",{children:s.header},s.id))})}),b.jsx("tbody",{children:n.map((s,i)=>b.jsx("tr",{children:e.map(o=>b.jsx("td",{children:o.renderCell(s)},o.id))},i))})]})},ad=[{id:1,email:"matthiaskrijgsman@gmail.com",firstname:"Matthias",lastname:"Krijgsman",status:"active"},{id:2,email:"dennis@snijder.io",firstname:"Dennis",lastname:"Snijder",status:"inactive"},{id:3,email:"arcokrijgsman@gmail.com",firstname:"Arco",lastname:"Krijgsman",status:"active"}],ld=[{id:"id",header:"ID",renderCell:t=>t.id},{id:"email",header:"Email",renderCell:t=>t.email},{id:"firstname",header:"First Name",renderCell:t=>t.firstname},{id:"lastname",header:"Last Name",renderCell:t=>t.lastname},{id:"status",header:"Status",renderCell:t=>t.status}],cd=()=>b.jsxs("div",{className:"flex flex-col gap-12",children:[b.jsx(Ms,{variant:"primary",children:"Test"}),b.jsx(ks,{type:"text",label:"Label",description:"Description",placeholder:"Enter something"}),b.jsx(od,{columns:ld,rows:ad})]});W.Button=Ms,W.ButtonIconRound=ca,W.ButtonIconSquare=ra,W.Divider=rd,W.Input=ks,W.InputCheck=ma,W.InputSelect=nd,W.InputSelectNative=sd,W.Panel=id,W.Test=cd,Object.defineProperty(W,Symbol.toStringTag,{value:"Module"})}));
125
+ `,...r,children:i&&i.map((a,l)=>h.jsx("option",{value:a.value,disabled:a.disabled,children:a.label},l))}),h.jsxs(Bt,{children:[o&&h.jsx(Ft,{}),h.jsx(St,{Icon:qe})]})]}),h.jsx(ht,{children:s}),h.jsx(mt,{children:o})]})},Ee=t=>{const{children:e,onClick:n,selected:s,disabled:i=!1}=t;return h.jsxs("div",{onClick:()=>!i&&n&&n(),className:V("hover:bg-gray-100 active:bg-gray-200 px-4 py-2 rounded-xl cursor-pointer transition-all duration-150 select-none flex flex-row gap-3 items-center",s&&!i&&"bg-blue-50 hover:bg-blue-100 active:bg-blue-100",i&&"text-gray-400 cursor-not-allowed hover:bg-transparent active:bg-transparent"),children:[h.jsx("div",{className:"flex-1",children:e}),s&&!i&&h.jsx("div",{className:"shrink-0",children:h.jsx(Rd,{className:"h-5 w-5"})})]})};function Ze(){return typeof window<"u"}function te(t){return Vs(t)?(t.nodeName||"").toLowerCase():"#document"}function tt(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function pt(t){var e;return(e=(Vs(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function Vs(t){return Ze()?t instanceof Node||t instanceof tt(t).Node:!1}function G(t){return Ze()?t instanceof Element||t instanceof tt(t).Element:!1}function gt(t){return Ze()?t instanceof HTMLElement||t instanceof tt(t).HTMLElement:!1}function ks(t){return!Ze()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof tt(t).ShadowRoot}const _d=new Set(["inline","contents"]);function Ae(t){const{overflow:e,overflowX:n,overflowY:s,display:i}=lt(t);return/auto|scroll|overlay|hidden|clip/.test(e+s+n)&&!_d.has(i)}const $d=new Set(["table","td","th"]);function Wd(t){return $d.has(te(t))}const Ud=[":popover-open",":modal"];function Je(t){return Ud.some(e=>{try{return t.matches(e)}catch{return!1}})}const zd=["transform","translate","scale","rotate","perspective"],Kd=["transform","translate","scale","rotate","perspective","filter"],Yd=["paint","layout","strict","content"];function Ns(t){const e=Os(),n=G(t)?lt(t):t;return zd.some(s=>n[s]?n[s]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||Kd.some(s=>(n.willChange||"").includes(s))||Yd.some(s=>(n.contain||"").includes(s))}function Hd(t){let e=Rt(t);for(;gt(e)&&!ee(e);){if(Ns(e))return e;if(Je(e))return null;e=Rt(e)}return null}function Os(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Gd=new Set(["html","body","#document"]);function ee(t){return Gd.has(te(t))}function lt(t){return tt(t).getComputedStyle(t)}function Qe(t){return G(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function Rt(t){if(te(t)==="html")return t;const e=t.assignedSlot||t.parentNode||ks(t)&&t.host||pt(t);return ks(e)?e.host:e}function Zo(t){const e=Rt(t);return ee(e)?t.ownerDocument?t.ownerDocument.body:t.body:gt(e)&&Ae(e)?e:Zo(e)}function Re(t,e,n){var s;e===void 0&&(e=[]),n===void 0&&(n=!0);const i=Zo(t),o=i===((s=t.ownerDocument)==null?void 0:s.body),r=tt(i);if(o){const a=Is(r);return e.concat(r,r.visualViewport||[],Ae(i)?i:[],a&&n?Re(a):[])}return e.concat(i,Re(i,[],n))}function Is(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}const je=Math.min,rt=Math.max,tn=Math.round,en=Math.floor,yt=t=>({x:t,y:t});function Jo(t,e){return typeof t=="function"?t(e):t}function Ls(t){return t.split("-")[0]}function Qo(t){return t.split("-")[1]}function Xd(t){return t==="x"?"y":"x"}function qd(t){return t==="y"?"height":"width"}const Zd=new Set(["top","bottom"]);function Fs(t){return Zd.has(Ls(t))?"y":"x"}function Jd(t){return Xd(Fs(t))}function Qd(t){return{top:0,right:0,bottom:0,left:0,...t}}function th(t){return typeof t!="number"?Qd(t):{top:t,right:t,bottom:t,left:t}}function nn(t){const{x:e,y:n,width:s,height:i}=t;return{width:s,height:i,top:n,left:e,right:e+s,bottom:n+i,x:e,y:n}}/*!
126
+ * tabbable 6.2.0
127
+ * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
128
+ */var eh=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],Bs=eh.join(","),ta=typeof Element>"u",Me=ta?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,sn=!ta&&Element.prototype.getRootNode?function(t){var e;return t==null||(e=t.getRootNode)===null||e===void 0?void 0:e.call(t)}:function(t){return t?.ownerDocument},rn=function t(e,n){var s;n===void 0&&(n=!0);var i=e==null||(s=e.getAttribute)===null||s===void 0?void 0:s.call(e,"inert"),o=i===""||i==="true",r=o||n&&e&&t(e.parentNode);return r},nh=function(e){var n,s=e==null||(n=e.getAttribute)===null||n===void 0?void 0:n.call(e,"contenteditable");return s===""||s==="true"},sh=function(e,n,s){if(rn(e))return[];var i=Array.prototype.slice.apply(e.querySelectorAll(Bs));return n&&Me.call(e,Bs)&&i.unshift(e),i=i.filter(s),i},ih=function t(e,n,s){for(var i=[],o=Array.from(e);o.length;){var r=o.shift();if(!rn(r,!1))if(r.tagName==="SLOT"){var a=r.assignedElements(),l=a.length?a:r.children,u=t(l,!0,s);s.flatten?i.push.apply(i,u):i.push({scopeParent:r,candidates:u})}else{var c=Me.call(r,Bs);c&&s.filter(r)&&(n||!e.includes(r))&&i.push(r);var f=r.shadowRoot||typeof s.getShadowRoot=="function"&&s.getShadowRoot(r),d=!rn(f,!1)&&(!s.shadowRootFilter||s.shadowRootFilter(r));if(f&&d){var m=t(f===!0?r.children:f.children,!0,s);s.flatten?i.push.apply(i,m):i.push({scopeParent:r,candidates:m})}else o.unshift.apply(o,r.children)}}return i},ea=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},na=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||nh(e))&&!ea(e)?0:e.tabIndex},rh=function(e,n){var s=na(e);return s<0&&n&&!ea(e)?0:s},oh=function(e,n){return e.tabIndex===n.tabIndex?e.documentOrder-n.documentOrder:e.tabIndex-n.tabIndex},sa=function(e){return e.tagName==="INPUT"},ah=function(e){return sa(e)&&e.type==="hidden"},lh=function(e){var n=e.tagName==="DETAILS"&&Array.prototype.slice.apply(e.children).some(function(s){return s.tagName==="SUMMARY"});return n},ch=function(e,n){for(var s=0;s<e.length;s++)if(e[s].checked&&e[s].form===n)return e[s]},uh=function(e){if(!e.name)return!0;var n=e.form||sn(e),s=function(a){return n.querySelectorAll('input[type="radio"][name="'+a+'"]')},i;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")i=s(window.CSS.escape(e.name));else try{i=s(e.name)}catch(r){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",r.message),!1}var o=ch(i,e.form);return!o||o===e},fh=function(e){return sa(e)&&e.type==="radio"},dh=function(e){return fh(e)&&!uh(e)},hh=function(e){var n,s=e&&sn(e),i=(n=s)===null||n===void 0?void 0:n.host,o=!1;if(s&&s!==e){var r,a,l;for(o=!!((r=i)!==null&&r!==void 0&&(a=r.ownerDocument)!==null&&a!==void 0&&a.contains(i)||e!=null&&(l=e.ownerDocument)!==null&&l!==void 0&&l.contains(e));!o&&i;){var u,c,f;s=sn(i),i=(u=s)===null||u===void 0?void 0:u.host,o=!!((c=i)!==null&&c!==void 0&&(f=c.ownerDocument)!==null&&f!==void 0&&f.contains(i))}}return o},ia=function(e){var n=e.getBoundingClientRect(),s=n.width,i=n.height;return s===0&&i===0},mh=function(e,n){var s=n.displayCheck,i=n.getShadowRoot;if(getComputedStyle(e).visibility==="hidden")return!0;var o=Me.call(e,"details>summary:first-of-type"),r=o?e.parentElement:e;if(Me.call(r,"details:not([open]) *"))return!0;if(!s||s==="full"||s==="legacy-full"){if(typeof i=="function"){for(var a=e;e;){var l=e.parentElement,u=sn(e);if(l&&!l.shadowRoot&&i(l)===!0)return ia(e);e.assignedSlot?e=e.assignedSlot:!l&&u!==e.ownerDocument?e=u.host:e=l}e=a}if(hh(e))return!e.getClientRects().length;if(s!=="legacy-full")return!0}else if(s==="non-zero-area")return ia(e);return!1},ph=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var n=e.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var s=0;s<n.children.length;s++){var i=n.children.item(s);if(i.tagName==="LEGEND")return Me.call(n,"fieldset[disabled] *")?!0:!i.contains(e)}return!0}n=n.parentElement}return!1},gh=function(e,n){return!(n.disabled||rn(n)||ah(n)||mh(n,e)||lh(n)||ph(n))},ra=function(e,n){return!(dh(n)||na(n)<0||!gh(e,n))},yh=function(e){var n=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},vh=function t(e){var n=[],s=[];return e.forEach(function(i,o){var r=!!i.scopeParent,a=r?i.scopeParent:i,l=rh(a,r),u=r?t(i.candidates):a;l===0?r?n.push.apply(n,u):n.push(a):s.push({documentOrder:o,tabIndex:l,item:i,isScope:r,content:u})}),s.sort(oh).reduce(function(i,o){return o.isScope?i.push.apply(i,o.content):i.push(o.content),i},[]).concat(n)},oa=function(e,n){n=n||{};var s;return n.getShadowRoot?s=ih([e],n.includeContainer,{filter:ra.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:yh}):s=sh(e,n.includeContainer,ra.bind(null,n)),vh(s)};function xh(){const t=navigator.userAgentData;return t!=null&&t.platform?t.platform:navigator.platform}function bh(){return/apple/i.test(navigator.vendor)}function wh(t){let e=t.activeElement;for(;((n=e)==null||(n=n.shadowRoot)==null?void 0:n.activeElement)!=null;){var n;e=e.shadowRoot.activeElement}return e}function Th(t,e){if(!t||!e)return!1;const n=e.getRootNode==null?void 0:e.getRootNode();if(t.contains(e))return!0;if(n&&ks(n)){let s=e;for(;s;){if(t===s)return!0;s=s.parentNode||s.host}}return!1}function _s(t){return t?.ownerDocument||document}var Sh=typeof document<"u",Ph=function(){},jt=Sh?T.useLayoutEffect:Ph;const Ch={...P}.useInsertionEffect||(t=>t());function Eh(t){const e=P.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return Ch(()=>{e.current=t}),P.useCallback(function(){for(var n=arguments.length,s=new Array(n),i=0;i<n;i++)s[i]=arguments[i];return e.current==null?void 0:e.current(...s)},[])}const aa=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function la(t,e){const n=oa(t,aa()),s=n.length;if(s===0)return;const i=wh(_s(t)),o=n.indexOf(i),r=o===-1?e===1?0:s-1:o+e;return n[r]}function Ah(t){return la(_s(t).body,1)||t}function Rh(t){return la(_s(t).body,-1)||t}function $s(t,e){const n=e||t.currentTarget,s=t.relatedTarget;return!s||!Th(n,s)}function jh(t){oa(t,aa()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function ca(t){t.querySelectorAll("[data-tabindex]").forEach(n=>{const s=n.dataset.tabindex;delete n.dataset.tabindex,s?n.setAttribute("tabindex",s):n.removeAttribute("tabindex")})}function ua(t,e,n){let{reference:s,floating:i}=t;const o=Fs(e),r=Jd(e),a=qd(r),l=Ls(e),u=o==="y",c=s.x+s.width/2-i.width/2,f=s.y+s.height/2-i.height/2,d=s[a]/2-i[a]/2;let m;switch(l){case"top":m={x:c,y:s.y-i.height};break;case"bottom":m={x:c,y:s.y+s.height};break;case"right":m={x:s.x+s.width,y:f};break;case"left":m={x:s.x-i.width,y:f};break;default:m={x:s.x,y:s.y}}switch(Qo(e)){case"start":m[r]-=d*(n&&u?-1:1);break;case"end":m[r]+=d*(n&&u?-1:1);break}return m}const Mh=async(t,e,n)=>{const{placement:s="bottom",strategy:i="absolute",middleware:o=[],platform:r}=n,a=o.filter(Boolean),l=await(r.isRTL==null?void 0:r.isRTL(e));let u=await r.getElementRects({reference:t,floating:e,strategy:i}),{x:c,y:f}=ua(u,s,l),d=s,m={},p=0;for(let g=0;g<a.length;g++){const{name:x,fn:y}=a[g],{x:w,y:v,data:E,reset:S}=await y({x:c,y:f,initialPlacement:s,placement:d,strategy:i,middlewareData:m,rects:u,platform:r,elements:{reference:t,floating:e}});c=w??c,f=v??f,m={...m,[x]:{...m[x],...E}},S&&p<=50&&(p++,typeof S=="object"&&(S.placement&&(d=S.placement),S.rects&&(u=S.rects===!0?await r.getElementRects({reference:t,floating:e,strategy:i}):S.rects),{x:c,y:f}=ua(u,d,l)),g=-1)}return{x:c,y:f,placement:d,strategy:i,middlewareData:m}};async function Dh(t,e){var n;e===void 0&&(e={});const{x:s,y:i,platform:o,rects:r,elements:a,strategy:l}=t,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:f="floating",altBoundary:d=!1,padding:m=0}=Jo(e,t),p=th(m),x=a[d?f==="floating"?"reference":"floating":f],y=nn(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(x)))==null||n?x:x.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(a.floating)),boundary:u,rootBoundary:c,strategy:l})),w=f==="floating"?{x:s,y:i,width:r.floating.width,height:r.floating.height}:r.reference,v=await(o.getOffsetParent==null?void 0:o.getOffsetParent(a.floating)),E=await(o.isElement==null?void 0:o.isElement(v))?await(o.getScale==null?void 0:o.getScale(v))||{x:1,y:1}:{x:1,y:1},S=nn(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:w,offsetParent:v,strategy:l}):w);return{top:(y.top-S.top+p.top)/E.y,bottom:(S.bottom-y.bottom+p.bottom)/E.y,left:(y.left-S.left+p.left)/E.x,right:(S.right-y.right+p.right)/E.x}}const Vh=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var n,s;const{placement:i,rects:o,platform:r,elements:a}=e,{apply:l=()=>{},...u}=Jo(t,e),c=await Dh(e,u),f=Ls(i),d=Qo(i),m=Fs(i)==="y",{width:p,height:g}=o.floating;let x,y;f==="top"||f==="bottom"?(x=f,y=d===(await(r.isRTL==null?void 0:r.isRTL(a.floating))?"start":"end")?"left":"right"):(y=f,x=d==="end"?"top":"bottom");const w=g-c.top-c.bottom,v=p-c.left-c.right,E=je(g-c[x],w),S=je(p-c[y],v),C=!e.middlewareData.shift;let A=E,R=S;if((n=e.middlewareData.shift)!=null&&n.enabled.x&&(R=v),(s=e.middlewareData.shift)!=null&&s.enabled.y&&(A=w),C&&!d){const O=rt(c.left,0),U=rt(c.right,0),et=rt(c.top,0),I=rt(c.bottom,0);m?R=p-2*(O!==0||U!==0?O+U:rt(c.left,c.right)):A=g-2*(et!==0||I!==0?et+I:rt(c.top,c.bottom))}await l({...e,availableWidth:R,availableHeight:A});const N=await r.getDimensions(a.floating);return p!==N.width||g!==N.height?{reset:{rects:!0}}:{}}}};function fa(t){const e=lt(t);let n=parseFloat(e.width)||0,s=parseFloat(e.height)||0;const i=gt(t),o=i?t.offsetWidth:n,r=i?t.offsetHeight:s,a=tn(n)!==o||tn(s)!==r;return a&&(n=o,s=r),{width:n,height:s,$:a}}function Ws(t){return G(t)?t:t.contextElement}function ne(t){const e=Ws(t);if(!gt(e))return yt(1);const n=e.getBoundingClientRect(),{width:s,height:i,$:o}=fa(e);let r=(o?tn(n.width):n.width)/s,a=(o?tn(n.height):n.height)/i;return(!r||!Number.isFinite(r))&&(r=1),(!a||!Number.isFinite(a))&&(a=1),{x:r,y:a}}const kh=yt(0);function da(t){const e=tt(t);return!Os()||!e.visualViewport?kh:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function Nh(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==tt(t)?!1:e}function _t(t,e,n,s){e===void 0&&(e=!1),n===void 0&&(n=!1);const i=t.getBoundingClientRect(),o=Ws(t);let r=yt(1);e&&(s?G(s)&&(r=ne(s)):r=ne(t));const a=Nh(o,n,s)?da(o):yt(0);let l=(i.left+a.x)/r.x,u=(i.top+a.y)/r.y,c=i.width/r.x,f=i.height/r.y;if(o){const d=tt(o),m=s&&G(s)?tt(s):s;let p=d,g=Is(p);for(;g&&s&&m!==p;){const x=ne(g),y=g.getBoundingClientRect(),w=lt(g),v=y.left+(g.clientLeft+parseFloat(w.paddingLeft))*x.x,E=y.top+(g.clientTop+parseFloat(w.paddingTop))*x.y;l*=x.x,u*=x.y,c*=x.x,f*=x.y,l+=v,u+=E,p=tt(g),g=Is(p)}}return nn({width:c,height:f,x:l,y:u})}function on(t,e){const n=Qe(t).scrollLeft;return e?e.left+n:_t(pt(t)).left+n}function ha(t,e){const n=t.getBoundingClientRect(),s=n.left+e.scrollLeft-on(t,n),i=n.top+e.scrollTop;return{x:s,y:i}}function Oh(t){let{elements:e,rect:n,offsetParent:s,strategy:i}=t;const o=i==="fixed",r=pt(s),a=e?Je(e.floating):!1;if(s===r||a&&o)return n;let l={scrollLeft:0,scrollTop:0},u=yt(1);const c=yt(0),f=gt(s);if((f||!f&&!o)&&((te(s)!=="body"||Ae(r))&&(l=Qe(s)),gt(s))){const m=_t(s);u=ne(s),c.x=m.x+s.clientLeft,c.y=m.y+s.clientTop}const d=r&&!f&&!o?ha(r,l):yt(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+c.x+d.x,y:n.y*u.y-l.scrollTop*u.y+c.y+d.y}}function Ih(t){return Array.from(t.getClientRects())}function Lh(t){const e=pt(t),n=Qe(t),s=t.ownerDocument.body,i=rt(e.scrollWidth,e.clientWidth,s.scrollWidth,s.clientWidth),o=rt(e.scrollHeight,e.clientHeight,s.scrollHeight,s.clientHeight);let r=-n.scrollLeft+on(t);const a=-n.scrollTop;return lt(s).direction==="rtl"&&(r+=rt(e.clientWidth,s.clientWidth)-i),{width:i,height:o,x:r,y:a}}const ma=25;function Fh(t,e){const n=tt(t),s=pt(t),i=n.visualViewport;let o=s.clientWidth,r=s.clientHeight,a=0,l=0;if(i){o=i.width,r=i.height;const c=Os();(!c||c&&e==="fixed")&&(a=i.offsetLeft,l=i.offsetTop)}const u=on(s);if(u<=0){const c=s.ownerDocument,f=c.body,d=getComputedStyle(f),m=c.compatMode==="CSS1Compat"&&parseFloat(d.marginLeft)+parseFloat(d.marginRight)||0,p=Math.abs(s.clientWidth-f.clientWidth-m);p<=ma&&(o-=p)}else u<=ma&&(o+=u);return{width:o,height:r,x:a,y:l}}const Bh=new Set(["absolute","fixed"]);function _h(t,e){const n=_t(t,!0,e==="fixed"),s=n.top+t.clientTop,i=n.left+t.clientLeft,o=gt(t)?ne(t):yt(1),r=t.clientWidth*o.x,a=t.clientHeight*o.y,l=i*o.x,u=s*o.y;return{width:r,height:a,x:l,y:u}}function pa(t,e,n){let s;if(e==="viewport")s=Fh(t,n);else if(e==="document")s=Lh(pt(t));else if(G(e))s=_h(e,n);else{const i=da(t);s={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return nn(s)}function ga(t,e){const n=Rt(t);return n===e||!G(n)||ee(n)?!1:lt(n).position==="fixed"||ga(n,e)}function $h(t,e){const n=e.get(t);if(n)return n;let s=Re(t,[],!1).filter(a=>G(a)&&te(a)!=="body"),i=null;const o=lt(t).position==="fixed";let r=o?Rt(t):t;for(;G(r)&&!ee(r);){const a=lt(r),l=Ns(r);!l&&a.position==="fixed"&&(i=null),(o?!l&&!i:!l&&a.position==="static"&&!!i&&Bh.has(i.position)||Ae(r)&&!l&&ga(t,r))?s=s.filter(c=>c!==r):i=a,r=Rt(r)}return e.set(t,s),s}function Wh(t){let{element:e,boundary:n,rootBoundary:s,strategy:i}=t;const r=[...n==="clippingAncestors"?Je(e)?[]:$h(e,this._c):[].concat(n),s],a=r[0],l=r.reduce((u,c)=>{const f=pa(e,c,i);return u.top=rt(f.top,u.top),u.right=je(f.right,u.right),u.bottom=je(f.bottom,u.bottom),u.left=rt(f.left,u.left),u},pa(e,a,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function Uh(t){const{width:e,height:n}=fa(t);return{width:e,height:n}}function zh(t,e,n){const s=gt(e),i=pt(e),o=n==="fixed",r=_t(t,!0,o,e);let a={scrollLeft:0,scrollTop:0};const l=yt(0);function u(){l.x=on(i)}if(s||!s&&!o)if((te(e)!=="body"||Ae(i))&&(a=Qe(e)),s){const m=_t(e,!0,o,e);l.x=m.x+e.clientLeft,l.y=m.y+e.clientTop}else i&&u();o&&!s&&i&&u();const c=i&&!s&&!o?ha(i,a):yt(0),f=r.left+a.scrollLeft-l.x-c.x,d=r.top+a.scrollTop-l.y-c.y;return{x:f,y:d,width:r.width,height:r.height}}function Us(t){return lt(t).position==="static"}function ya(t,e){if(!gt(t)||lt(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return pt(t)===n&&(n=n.ownerDocument.body),n}function va(t,e){const n=tt(t);if(Je(t))return n;if(!gt(t)){let i=Rt(t);for(;i&&!ee(i);){if(G(i)&&!Us(i))return i;i=Rt(i)}return n}let s=ya(t,e);for(;s&&Wd(s)&&Us(s);)s=ya(s,e);return s&&ee(s)&&Us(s)&&!Ns(s)?n:s||Hd(t)||n}const Kh=async function(t){const e=this.getOffsetParent||va,n=this.getDimensions,s=await n(t.floating);return{reference:zh(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:s.width,height:s.height}}};function Yh(t){return lt(t).direction==="rtl"}const Hh={convertOffsetParentRelativeRectToViewportRelativeRect:Oh,getDocumentElement:pt,getClippingRect:Wh,getOffsetParent:va,getElementRects:Kh,getClientRects:Ih,getDimensions:Uh,getScale:ne,isElement:G,isRTL:Yh};function xa(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function Gh(t,e){let n=null,s;const i=pt(t);function o(){var a;clearTimeout(s),(a=n)==null||a.disconnect(),n=null}function r(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),o();const u=t.getBoundingClientRect(),{left:c,top:f,width:d,height:m}=u;if(a||e(),!d||!m)return;const p=en(f),g=en(i.clientWidth-(c+d)),x=en(i.clientHeight-(f+m)),y=en(c),v={rootMargin:-p+"px "+-g+"px "+-x+"px "+-y+"px",threshold:rt(0,je(1,l))||1};let E=!0;function S(C){const A=C[0].intersectionRatio;if(A!==l){if(!E)return r();A?r(!1,A):s=setTimeout(()=>{r(!1,1e-7)},1e3)}A===1&&!xa(u,t.getBoundingClientRect())&&r(),E=!1}try{n=new IntersectionObserver(S,{...v,root:i.ownerDocument})}catch{n=new IntersectionObserver(S,v)}n.observe(t)}return r(!0),o}function Xh(t,e,n,s){s===void 0&&(s={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:r=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=s,u=Ws(t),c=i||o?[...u?Re(u):[],...Re(e)]:[];c.forEach(y=>{i&&y.addEventListener("scroll",n,{passive:!0}),o&&y.addEventListener("resize",n)});const f=u&&a?Gh(u,n):null;let d=-1,m=null;r&&(m=new ResizeObserver(y=>{let[w]=y;w&&w.target===u&&m&&(m.unobserve(e),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{var v;(v=m)==null||v.observe(e)})),n()}),u&&!l&&m.observe(u),m.observe(e));let p,g=l?_t(t):null;l&&x();function x(){const y=_t(t);g&&!xa(g,y)&&n(),g=y,p=requestAnimationFrame(x)}return n(),()=>{var y;c.forEach(w=>{i&&w.removeEventListener("scroll",n),o&&w.removeEventListener("resize",n)}),f?.(),(y=m)==null||y.disconnect(),m=null,l&&cancelAnimationFrame(p)}}const qh=Vh,Zh=(t,e,n)=>{const s=new Map,i={platform:Hh,...n},o={...i.platform,_c:s};return Mh(t,e,{...i,platform:o})};var Jh=typeof document<"u",Qh=function(){},an=Jh?T.useLayoutEffect:Qh;function ln(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let n,s,i;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(n=t.length,n!==e.length)return!1;for(s=n;s--!==0;)if(!ln(t[s],e[s]))return!1;return!0}if(i=Object.keys(t),n=i.length,n!==Object.keys(e).length)return!1;for(s=n;s--!==0;)if(!{}.hasOwnProperty.call(e,i[s]))return!1;for(s=n;s--!==0;){const o=i[s];if(!(o==="_owner"&&t.$$typeof)&&!ln(t[o],e[o]))return!1}return!0}return t!==t&&e!==e}function ba(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function wa(t,e){const n=ba(t);return Math.round(e*n)/n}function zs(t){const e=P.useRef(t);return an(()=>{e.current=t}),e}function tm(t){t===void 0&&(t={});const{placement:e="bottom",strategy:n="absolute",middleware:s=[],platform:i,elements:{reference:o,floating:r}={},transform:a=!0,whileElementsMounted:l,open:u}=t,[c,f]=P.useState({x:0,y:0,strategy:n,placement:e,middlewareData:{},isPositioned:!1}),[d,m]=P.useState(s);ln(d,s)||m(s);const[p,g]=P.useState(null),[x,y]=P.useState(null),w=P.useCallback(k=>{k!==C.current&&(C.current=k,g(k))},[]),v=P.useCallback(k=>{k!==A.current&&(A.current=k,y(k))},[]),E=o||p,S=r||x,C=P.useRef(null),A=P.useRef(null),R=P.useRef(c),N=l!=null,O=zs(l),U=zs(i),et=zs(u),I=P.useCallback(()=>{if(!C.current||!A.current)return;const k={placement:e,strategy:n,middleware:d};U.current&&(k.platform=U.current),Zh(C.current,A.current,k).then(J=>{const b={...J,isPositioned:et.current!==!1};K.current&&!ln(R.current,b)&&(R.current=b,Zs.flushSync(()=>{f(b)}))})},[d,e,n,U,et]);an(()=>{u===!1&&R.current.isPositioned&&(R.current.isPositioned=!1,f(k=>({...k,isPositioned:!1})))},[u]);const K=P.useRef(!1);an(()=>(K.current=!0,()=>{K.current=!1}),[]),an(()=>{if(E&&(C.current=E),S&&(A.current=S),E&&S){if(O.current)return O.current(E,S,I);I()}},[E,S,I,O,N]);const vt=P.useMemo(()=>({reference:C,floating:A,setReference:w,setFloating:v}),[w,v]),ct=P.useMemo(()=>({reference:E,floating:S}),[E,S]),_=P.useMemo(()=>{const k={position:n,left:0,top:0};if(!ct.floating)return k;const J=wa(ct.floating,c.x),b=wa(ct.floating,c.y);return a?{...k,transform:"translate("+J+"px, "+b+"px)",...ba(ct.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:J,top:b}},[n,a,ct.floating,c.x,c.y]);return P.useMemo(()=>({...c,update:I,refs:vt,elements:ct,floatingStyles:_}),[c,I,vt,ct,_])}const em=(t,e)=>({...qh(t),options:[t,e]}),nm={...P};let Ta=!1,sm=0;const Sa=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+sm++;function im(){const[t,e]=P.useState(()=>Ta?Sa():void 0);return jt(()=>{t==null&&e(Sa())},[]),P.useEffect(()=>{Ta=!0},[]),t}const Pa=nm.useId||im;let Ks;process.env.NODE_ENV!=="production"&&(Ks=new Set);function rm(){for(var t,e=arguments.length,n=new Array(e),s=0;s<e;s++)n[s]=arguments[s];const i="Floating UI: "+n.join(" ");if(!((t=Ks)!=null&&t.has(i))){var o;(o=Ks)==null||o.add(i),console.error(i)}}function om(){const t=new Map;return{emit(e,n){var s;(s=t.get(e))==null||s.forEach(i=>i(n))},on(e,n){t.has(e)||t.set(e,new Set),t.get(e).add(n)},off(e,n){var s;(s=t.get(e))==null||s.delete(n)}}}const am=P.createContext(null),lm=P.createContext(null),cm=()=>{var t;return((t=P.useContext(am))==null?void 0:t.id)||null},um=()=>P.useContext(lm);function Ca(t){return"data-floating-ui-"+t}const Ea={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0},Aa=P.forwardRef(function(e,n){const[s,i]=P.useState();jt(()=>{bh()&&i("button")},[]);const o={ref:n,tabIndex:0,role:s,"aria-hidden":s?void 0:!0,[Ca("focus-guard")]:"",style:Ea};return h.jsx("span",{...e,...o})}),Ra=P.createContext(null),ja=Ca("portal");function fm(t){t===void 0&&(t={});const{id:e,root:n}=t,s=Pa(),i=dm(),[o,r]=P.useState(null),a=P.useRef(null);return jt(()=>()=>{o?.remove(),queueMicrotask(()=>{a.current=null})},[o]),jt(()=>{if(!s||a.current)return;const l=e?document.getElementById(e):null;if(!l)return;const u=document.createElement("div");u.id=s,u.setAttribute(ja,""),l.appendChild(u),a.current=u,r(u)},[e,s]),jt(()=>{if(n===null||!s||a.current)return;let l=n||i?.portalNode;l&&!Vs(l)&&(l=l.current),l=l||document.body;let u=null;e&&(u=document.createElement("div"),u.id=e,l.appendChild(u));const c=document.createElement("div");c.id=s,c.setAttribute(ja,""),l=u||l,l.appendChild(c),a.current=c,r(c)},[e,n,s,i]),o}function Ma(t){const{children:e,id:n,root:s,preserveTabOrder:i=!0}=t,o=fm({id:n,root:s}),[r,a]=P.useState(null),l=P.useRef(null),u=P.useRef(null),c=P.useRef(null),f=P.useRef(null),d=r?.modal,m=r?.open,p=!!r&&!r.modal&&r.open&&i&&!!(s||o);return P.useEffect(()=>{if(!o||!i||d)return;function g(x){o&&$s(x)&&(x.type==="focusin"?ca:jh)(o)}return o.addEventListener("focusin",g,!0),o.addEventListener("focusout",g,!0),()=>{o.removeEventListener("focusin",g,!0),o.removeEventListener("focusout",g,!0)}},[o,i,d]),P.useEffect(()=>{o&&(m||ca(o))},[m,o]),h.jsxs(Ra.Provider,{value:P.useMemo(()=>({preserveTabOrder:i,beforeOutsideRef:l,afterOutsideRef:u,beforeInsideRef:c,afterInsideRef:f,portalNode:o,setFocusManagerState:a}),[i,o]),children:[p&&o&&h.jsx(Aa,{"data-type":"outside",ref:l,onFocus:g=>{if($s(g,o)){var x;(x=c.current)==null||x.focus()}else{const y=r?r.domReference:null,w=Rh(y);w?.focus()}}}),p&&o&&h.jsx("span",{"aria-owns":o.id,style:Ea}),o&&Zs.createPortal(e,o),p&&o&&h.jsx(Aa,{"data-type":"outside",ref:u,onFocus:g=>{if($s(g,o)){var x;(x=f.current)==null||x.focus()}else{const y=r?r.domReference:null,w=Ah(y);w?.focus(),r?.closeOnFocusOut&&r?.onOpenChange(!1,g.nativeEvent,"focus-out")}}})]})}const dm=()=>P.useContext(Ra);let cn=0;const Da="--floating-ui-scrollbar-width";function hm(){const t=xh(),e=/iP(hone|ad|od)|iOS/.test(t)||t==="MacIntel"&&navigator.maxTouchPoints>1,n=document.body.style,i=Math.round(document.documentElement.getBoundingClientRect().left)+document.documentElement.scrollLeft?"paddingLeft":"paddingRight",o=window.innerWidth-document.documentElement.clientWidth,r=n.left?parseFloat(n.left):window.scrollX,a=n.top?parseFloat(n.top):window.scrollY;if(n.overflow="hidden",n.setProperty(Da,o+"px"),o&&(n[i]=o+"px"),e){var l,u;const c=((l=window.visualViewport)==null?void 0:l.offsetLeft)||0,f=((u=window.visualViewport)==null?void 0:u.offsetTop)||0;Object.assign(n,{position:"fixed",top:-(a-Math.floor(f))+"px",left:-(r-Math.floor(c))+"px",right:"0"})}return()=>{Object.assign(n,{overflow:"",[i]:""}),n.removeProperty(Da),e&&(Object.assign(n,{position:"",top:"",left:"",right:""}),window.scrollTo(r,a))}}let Va=()=>{};const ka=P.forwardRef(function(e,n){const{lockScroll:s=!1,...i}=e;return jt(()=>{if(s)return cn++,cn===1&&(Va=hm()),()=>{cn--,cn===0&&Va()}},[s]),h.jsx("div",{ref:n,...i,style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...i.style}})});function mm(t){const{open:e=!1,onOpenChange:n,elements:s}=t,i=Pa(),o=P.useRef({}),[r]=P.useState(()=>om()),a=cm()!=null;if(process.env.NODE_ENV!=="production"){const m=s.reference;m&&!G(m)&&rm("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[l,u]=P.useState(s.reference),c=Eh((m,p,g)=>{o.current.openEvent=m?p:void 0,r.emit("openchange",{open:m,event:p,reason:g,nested:a}),n?.(m,p,g)}),f=P.useMemo(()=>({setPositionReference:u}),[]),d=P.useMemo(()=>({reference:l||s.reference||null,floating:s.floating||null,domReference:s.reference}),[l,s.reference,s.floating]);return P.useMemo(()=>({dataRef:o,open:e,onOpenChange:c,elements:d,events:r,floatingId:i,refs:f}),[e,c,d,r,i,f])}function pm(t){t===void 0&&(t={});const{nodeId:e}=t,n=mm({...t,elements:{reference:null,floating:null,...t.elements}}),s=t.rootContext||n,i=s.elements,[o,r]=P.useState(null),[a,l]=P.useState(null),c=i?.domReference||o,f=P.useRef(null),d=um();jt(()=>{c&&(f.current=c)},[c]);const m=tm({...t,elements:{...i,...a&&{reference:a}}}),p=P.useCallback(v=>{const E=G(v)?{getBoundingClientRect:()=>v.getBoundingClientRect(),getClientRects:()=>v.getClientRects(),contextElement:v}:v;l(E),m.refs.setReference(E)},[m.refs]),g=P.useCallback(v=>{(G(v)||v===null)&&(f.current=v,r(v)),(G(m.refs.reference.current)||m.refs.reference.current===null||v!==null&&!G(v))&&m.refs.setReference(v)},[m.refs]),x=P.useMemo(()=>({...m.refs,setReference:g,setPositionReference:p,domReference:f}),[m.refs,g,p]),y=P.useMemo(()=>({...m.elements,domReference:c}),[m.elements,c]),w=P.useMemo(()=>({...m,...s,refs:x,elements:y,nodeId:e}),[m,x,y,e,s]);return jt(()=>{s.dataRef.current.floatingContext=w;const v=d?.nodesRef.current.find(E=>E.id===e);v&&(v.context=w)}),P.useMemo(()=>({...m,context:w,refs:x,elements:y}),[m,x,y,w])}const gm={top:"bottom center","top-start":"bottom left","top-end":"bottom right",right:"left center","right-start":"top left","right-end":"bottom left",bottom:"top center","bottom-start":"top left","bottom-end":"top right",left:"right center","left-start":"top right","left-end":"bottom right"},Na=P.memo(({open:t,children:e,className:n,onOutsideClick:s,floatingStyles:i,setFloating:o,placement:r})=>h.jsx(Ma,{children:h.jsx(ss,{children:t&&h.jsxs(h.Fragment,{children:[s&&h.jsx(ka,{onClick:s}),h.jsx("div",{ref:o,style:i,className:"z-10",children:h.jsx(Pe.div,{className:n,style:{transformOrigin:gm[r]},initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.95},transition:{duration:.1,ease:"easeInOut"},children:e})})]})})})),se=t=>{const{placement:e="bottom",onOutsideClick:n,fullWidth:s,minWidth:i,maxWidth:o}=t,r=P.useMemo(()=>[em({apply({rects:f,elements:d}){s&&(d.floating.style.width=`${f.reference.width}px`),i&&(d.floating.style.minWidth=`${i}px`),o&&(d.floating.style.maxWidth=`${o}px`)}})],[s,o,i]),{refs:a,floatingStyles:l}=pm({placement:e,middleware:r,whileElementsMounted:Xh}),u=P.useRef({onOutsideClick:n,floatingStyles:l,setFloating:a.setFloating,placement:e});u.current={onOutsideClick:n,floatingStyles:l,setFloating:a.setFloating,placement:e};const c=P.useMemo(()=>{const f=d=>{const{floatingStyles:m,setFloating:p,onOutsideClick:g,placement:x}=u.current,{className:y,open:w,children:v}=d;return h.jsx(Na,{open:w,className:y,onOutsideClick:g,floatingStyles:m,setFloating:p,placement:x,children:v})};return P.memo(f)},[]);return{anchorRef:a.setReference,Popover:c}},ym="flex flex-col bg-white border mt-1 border-gray-200 rounded-xl shadow-lg p-3 overflow-y-auto relative",ie=t=>{const{className:e,children:n,...s}=t;return h.jsx("div",{className:V(ym,e),...s,children:n})},un=(t,e)=>{T.useEffect(()=>{if(!t)return;const n=s=>{s.key==="Escape"&&e()};return document.addEventListener("keydown",n),()=>{document.removeEventListener("keydown",n)}},[t,e])},Oa=t=>{const{className:e,label:n,description:s,options:i,onChange:o,value:r,placeholder:a,maxHeight:l=300,error:u}=t,[c,f]=T.useState(!1),d=P.useRef(null),m=i?.find(x=>x.value===r);un(c,()=>f(!1)),T.useEffect(()=>{c&&d.current?.focus({preventScroll:!0})},[c]);const{anchorRef:p,Popover:g}=se({placement:"bottom",fullWidth:!0,onOutsideClick:()=>f(!1)});return h.jsxs("div",{className:V("flex flex-col",e),children:[h.jsx(Lt,{children:n}),h.jsxs("div",{className:"relative flex w-full flex-col",ref:p,children:[h.jsxs("div",{ref:d,role:"button",tabIndex:0,className:V("flex flex-row items-center h-12 pl-4 pr-10 border border-gray-200 text-gray-900 placeholder:text-gray-400 bg-white transition-all duration-150 rounded-xl shadow-sm ring-0 ring-gray-900/10 focus:ring-4 focus:outline-none select-none",u&&"border-red-600 ring-red-600/20 !pr-10",c&&"ring-4"),onKeyDown:x=>x.key===" "&&f(y=>!y),onClick:()=>f(!c),children:[m&&h.jsx("span",{children:m.label}),!m&&a&&h.jsx("span",{className:"text-gray-500",children:a})]}),h.jsxs(Bt,{children:[u&&h.jsx(Ft,{}),!!r&&h.jsx(St,{Icon:Ce,onClick:()=>o(null)}),h.jsx(St,{Icon:qe})]}),h.jsx(g,{open:c,children:h.jsx(ie,{className:"!p-0",style:{maxHeight:l},children:h.jsx("div",{className:"flex flex-col p-2 gap-1",children:i.map(x=>{const y=x.value===r;return h.jsx(Ee,{onClick:()=>{!x.disabled&&o&&(o(x.value),f(!1))},selected:y,disabled:x.disabled,children:x.label},String(x.value))})})})})]}),h.jsx(ht,{children:s}),h.jsx(mt,{children:u})]})},vm=t=>{const{className:e,label:n,description:s,options:i,onChange:o,onSearch:r,value:a,placeholder:l,maxHeight:u=300,error:c}=t,[f,d]=T.useState(!1),[m,p]=T.useState(i),[g,x]=T.useState(""),y=P.useRef(null),w=P.useRef(null),v=i?.find(C=>C.value===a);un(f,()=>d(!1)),T.useEffect(()=>{p(r(g))},[g,i,r]),T.useEffect(()=>{f&&w.current?.focus()},[f]);const{anchorRef:E,Popover:S}=se({placement:"bottom",fullWidth:!0,onOutsideClick:()=>d(!1)});return h.jsxs("div",{className:V("flex flex-col",e),children:[h.jsx(Lt,{children:n}),h.jsxs("div",{className:"relative flex w-full flex-col",ref:E,children:[h.jsxs("div",{ref:y,role:"button",tabIndex:0,className:V("flex flex-row items-center h-12 pl-4 pr-10 border border-gray-200 text-gray-900 placeholder:text-gray-400 bg-white transition-all duration-150 rounded-xl shadow-sm ring-0 ring-gray-900/10 focus:ring-4 focus:outline-none select-none",c&&"border-red-600 ring-red-600/20 !pr-10",f&&"ring-4"),onKeyDown:C=>C.key===" "&&d(A=>!A),onClick:()=>d(!f),children:[v&&h.jsx("span",{children:v.label}),!v&&l&&h.jsx("span",{className:"text-gray-500",children:l})]}),h.jsxs(Bt,{children:[c&&h.jsx(Ft,{}),!!a&&h.jsx(St,{Icon:Ce,onClick:()=>o(null)}),h.jsx(St,{Icon:qe})]}),h.jsx(S,{open:f,children:h.jsxs(ie,{className:"gap-0 !p-0",style:{maxHeight:u},children:[h.jsxs("div",{className:"sticky top-0 border-b border-b-gray-200 py-1 bg-white/50 backdrop-blur-sm",children:[h.jsx("input",{ref:w,type:"text",placeholder:"Search",value:g,className:"appearance-none border-none w-full bg-transparent rounded- pl-10 transition-all duration-150 focus:outline-none ring-0 placeholder:text-gray-400",onChange:C=>x(C.target.value)}),h.jsx(Ms,{className:"absolute text-gray-500 left-4 top-4 h-4 w-4"})]}),h.jsxs("div",{className:"flex flex-col gap-1 p-2",children:[g!==""&&h.jsxs(h.Fragment,{children:[m.length===0&&h.jsx("div",{className:"flex flex-col items-center justify-center py-6",children:h.jsx(qo,{className:"h-6 w-6 text-gray-900"})}),m.map(C=>{const A=C.value===a;return h.jsx(Ee,{onClick:()=>{!C.disabled&&o&&(o(C.value),d(!1))},selected:A,disabled:C.disabled,children:C.label},String(C.value))})]}),g===""&&h.jsx(h.Fragment,{children:i.map(C=>{const A=C.value===a;return h.jsx(Ee,{onClick:()=>{!C.disabled&&o&&(o(C.value),d(!1))},selected:A,disabled:C.disabled,children:C.label},String(C.value))})})]})]})})]}),h.jsx(ht,{children:s}),h.jsx(mt,{children:c})]})},xm=(t,e)=>{const[n,s]=T.useState(t);return T.useEffect(()=>{const i=setTimeout(()=>{s(t)},e);return()=>{clearTimeout(i)}},[t,e]),n},bm=t=>{const{className:e,label:n,description:s,onChange:i,fetchOptionsByQuery:o,fetchOptionByValue:r,onSearchDebounceMs:a=300,value:l,placeholder:u,maxHeight:c=300,error:f}=t,[d,m]=T.useState(!1),p=P.useRef(null),[g,x]=T.useState(""),[y,w]=T.useState([]),[v,E]=T.useState(null),S=P.useRef(null),[C,A]=T.useState(!1),[R,N]=T.useState(!1);un(d,()=>m(!1));const O=xm(g,a);T.useEffect(()=>{(async()=>{A(!0);const K=await o(O);w(K),A(!1)})()},[O,o]),T.useEffect(()=>{if(l==null){E(null);return}const I=y?.find(K=>K.value===l);I?E(I):(async()=>{N(!0);const vt=await r(l);E(vt),N(!1)})()},[r,y,l]),T.useEffect(()=>{d&&S.current?.focus()},[d]);const{anchorRef:U,Popover:et}=se({placement:"bottom",fullWidth:!0,onOutsideClick:()=>m(!1)});return h.jsxs("div",{className:V("flex flex-col",e),children:[h.jsx(Lt,{children:n}),h.jsxs("div",{className:"relative flex w-full flex-col",ref:U,children:[h.jsxs("div",{ref:p,role:"button",tabIndex:0,className:V("flex flex-row items-center h-12 pl-4 pr-10 border border-gray-200 text-gray-900 placeholder:text-gray-400 bg-white transition-all duration-150 rounded-xl shadow-sm ring-0 ring-gray-900/10 focus:ring-4 focus:outline-none select-none",f&&"border-red-600 ring-red-600/20 !pr-10",d&&"ring-4"),onKeyDown:I=>I.key===" "&&m(K=>!K),onClick:()=>m(!d),children:[!R&&v&&h.jsx("span",{children:v.label}),!R&&!v&&u&&h.jsx("span",{children:u}),R&&h.jsx(Xe,{className:"h-4 w-4 text-gray-600"})]}),h.jsxs(Bt,{children:[f&&h.jsx(Ft,{}),!!l&&h.jsx(St,{Icon:Ce,onClick:()=>i(null)}),h.jsx(St,{Icon:qe})]}),h.jsx(et,{open:d,children:h.jsxs(ie,{className:"gap-0 !p-0",style:{maxHeight:c},children:[h.jsxs("div",{className:"sticky top-0 border-b border-b-gray-200 py-1 bg-white/50 backdrop-blur-sm",children:[h.jsx("input",{ref:S,type:"text",placeholder:"Search",value:g,className:"appearance-none border-none w-full bg-transparent rounded- pl-10 transition-all duration-150 focus:outline-none ring-0 placeholder:text-gray-400",onChange:I=>x(I.target.value)}),h.jsx(Ms,{className:"absolute text-gray-500 left-4 top-4 h-4 w-4"})]}),h.jsxs("div",{className:"flex flex-col gap-1 p-2",children:[!C&&y.length===0&&h.jsx("div",{className:"flex flex-col items-center justify-center py-6",children:h.jsx(qo,{className:"h-6 w-6 text-gray-900"})}),C&&h.jsx("div",{className:"flex flex-col items-center justify-center py-6",children:h.jsx(Xe,{className:"h-6 w-6 text-gray-900"})}),!C&&h.jsx(h.Fragment,{children:y.map(I=>{const K=I.value===l;return h.jsx(Ee,{onClick:()=>{!I.disabled&&i&&(i(I.value),m(!1))},selected:K,disabled:I.disabled,children:I.label},String(I.value))})})]})]})})]}),h.jsx(ht,{children:s}),h.jsx(mt,{children:f})]})},wm=P.forwardRef((t,e)=>{const{className:n,children:s,...i}=t;return h.jsx("div",{ref:e,className:V("flex flex-col gap-6 border border-gray-200 rounded-xl bg-white shadow-sm px-6 py-6",n),...i,children:s})}),Tm=t=>{const{className:e,vertical:n=!1,...s}=t;return h.jsx("div",{className:V(n?"w-px h-full bg-gray-200":"w-full h-px bg-gray-200",e),...s})},Sm=t=>{const{children:e,content:n,className:s,placement:i="top",minWidth:o=100,maxWidth:r=200}=t,[a,l]=T.useState(!1),{anchorRef:u,Popover:c}=se({placement:i,minWidth:o,maxWidth:r});return h.jsxs("span",{ref:u,className:s,onMouseEnter:()=>l(!0),onMouseLeave:()=>l(!1),children:[e,h.jsx(c,{open:a,children:h.jsx(ie,{children:n})})]})},Pm=t=>{const{open:e,onDismiss:n,enableDismissOnOutsideClick:s,enableDismissOnEscKey:i,enableDismissButton:o,className:r,children:a,maxWidth:l=600}=t;return un(!!i&&e,n||(()=>{})),h.jsx(ss,{children:e&&h.jsxs(Ma,{children:[h.jsx(Pe.div,{style:{transformOrigin:"center"},initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.15,ease:"easeInOut"},children:h.jsx(ka,{className:"bg-gray-400/30 backdrop-blur-[1px]",onClick:s?n:void 0,lockScroll:!0})}),h.jsx("div",{className:"fixed inset-0 flex flex-col items-center pointer-events-none p-4 lg:p-12 overflow-y-auto",children:h.jsxs(Pe.div,{className:V("flex flex-col bg-white rounded-xl shadow-xl p-6 lg:p-12 pointer-events-auto w-full relative",r),style:{transformOrigin:"bottom",maxWidth:l},initial:{opacity:0,scale:.98,translateY:10},animate:{opacity:1,scale:1,translateY:0},exit:{opacity:0,scale:.98,translateY:10},transition:{duration:.15,ease:"easeInOut"},children:[o&&h.jsx(Xo,{Icon:Ce,className:"absolute top-4 right-4",variant:"transparent",size:"sm",onClick:n}),a]})})]})})},Ia={red:"bg-red-100 text-red-700 ring-red-200",orange:"bg-orange-100 text-orange-700 ring-orange-200",amber:"bg-amber-100 text-amber-700 ring-amber-200",yellow:"bg-yellow-100 text-yellow-700 ring-yellow-200",lime:"bg-lime-100 text-lime-700 ring-lime-200",green:"bg-green-100 text-green-700 ring-green-200",emerald:"bg-emerald-100 text-emerald-700 ring-emerald-200",teal:"bg-teal-100 text-teal-700 ring-teal-200",cyan:"bg-cyan-100 text-cyan-700 ring-cyan-200",sky:"bg-sky-100 text-sky-700 ring-sky-200",blue:"bg-blue-100 text-blue-700 ring-blue-200",indigo:"bg-indigo-100 text-indigo-700 ring-indigo-200",violet:"bg-violet-100 text-violet-700 ring-violet-200",purple:"bg-purple-100 text-purple-700 ring-purple-200",fuchsia:"bg-fuchsia-100 text-fuchsia-700 ring-fuchsia-200",pink:"bg-pink-100 text-pink-700 ring-pink-200",rose:"bg-rose-100 text-rose-700 ring-rose-200",slate:"bg-slate-100 text-slate-700 ring-slate-200",gray:"bg-gray-100 text-gray-700 ring-gray-200",zinc:"bg-zinc-100 text-zinc-700 ring-zinc-200",neutral:"bg-neutral-100 text-neutral-700 ring-neutral-200",stone:"bg-stone-100 text-stone-700 ring-stone-200",white:"bg-white text-gray-900 ring-stone-200",black:"bg-black text-white ring-stone-200"},Ys=P.forwardRef((t,e)=>{const{className:n,children:s,onClick:i,showCloseIcon:o,Icon:r,color:a="gray"}=t,l=V("inline-flex align-top items-center gap-2 px-3 h-7 rounded-lg font-semibold",Ia[a],n);return i?h.jsx("div",{ref:e,children:h.jsxs("button",{className:V("cursor-pointer ring-0 hover:ring-4 active:ring-1 transition-all duration-100 select-none focus:outline-none focus:ring-4",l),onClick:i,children:[r&&h.jsx(r,{className:"h-4 w-4 shrink-0"}),h.jsx("div",{className:"break-all line-clamp-1 text-left",children:s}),o&&h.jsx(Ce,{className:"h-4 w-4 shrink-0"})]})}):h.jsxs("div",{className:l,ref:e,children:[r&&h.jsx(r,{className:"h-4 w-4 shrink-0"}),h.jsx("div",{className:"break-all line-clamp-1 text-left",children:s})]})}),Cm=t=>{const{className:e,tabs:n}=t;return h.jsx("div",{className:V("h-12 bg-gray-100 p-1 rounded-xl inline-flex flex-row space-x-1 overflow-x-auto",e),children:n.map((s,i)=>{const o=V("shrink-0 px-4 h-full inline-flex flex-row items-center font-semibold rounded-xl cursor-pointer border border-transparent ing-0 hover:bg-gray-200 active:bg-gray-300/80 transition-all duration-150 select-none focus:outline-none focus:ring-0",s.active&&"bg-white shadow-sm !border-gray-300");return s.href?h.jsx("a",{href:s.href,className:o,children:s.label},i):h.jsx("button",{className:o,onClick:s.onClick,children:s.label},i)})})},Em="inline-flex flex-row items-center gap-3 h-10 px-3 font-semibold ring-0 hover:bg-gray-100 active:bg-gray-200 rounded-lg cursor-pointer transition-all duration-150 select-none focus:outline-none focus:ring-0 border border-transparent text-gray-900 bg-transparent ring-gray-900/10",fn=P.forwardRef((t,e)=>{const{className:n,children:s,Icon:i,...o}=t;return h.jsxs("button",{ref:e,className:V(Em,n),...o,children:[i&&h.jsx(i,{className:"h-5 w-5"}),s]})}),Am=t=>{const{columns:e,rows:n}=t;return h.jsx("div",{className:"border border-gray-200 rounded-xl shadow-sm overflow-hidden",children:h.jsxs("table",{className:"table-fixed",children:[h.jsx("colgroup",{children:e.map(s=>h.jsx("col",{width:250},s.id))}),h.jsx("thead",{children:h.jsx("tr",{className:"divide-gray-200 divide-x text-left bg-gray-50 text-gray-400 border-b border-b-gray-200",children:e.map(s=>h.jsx("th",{className:"font-medium h-[3rem] relative hover:bg-gray-100 cursor-pointer active:bg-gray-200 transition-colors duration-150",children:h.jsx("div",{className:"absolute inset-0",children:h.jsx("div",{className:"flex items-center h-full w-full px-4",children:s.header})})},s.id))})}),h.jsx("tbody",{className:"divide-y divide-gray-200",children:n.map((s,i)=>h.jsx("tr",{className:"divide-gray-200 divide-x",children:e.map(o=>h.jsx("td",{className:"h-[3rem] relative",children:h.jsx("div",{className:"absolute inset-0 ",children:h.jsx("div",{className:"flex items-center h-full w-full px-4",children:o.renderCell(s)})})},o.id))},i))})]})})},Rm=[{id:1,email:"matthiaskrijgsman@gmail.com",firstname:"Matthias",lastname:"Krijgsman",status:"active"},{id:2,email:"dennis@snijder.io",firstname:"Dennis",lastname:"Snijder",status:"inactive"},{id:3,email:"arcokrijgsman@gmail.com",firstname:"Arco",lastname:"Krijgsman",status:"active"}],jm=[{id:"id",header:"ID",renderCell:t=>t.id},{id:"email",header:"Email",renderCell:t=>h.jsx(Ys,{Icon:kd,onClick:()=>{},children:t.email})},{id:"firstname",header:"First Name",renderCell:t=>t.firstname},{id:"lastname",header:"Last Name",renderCell:t=>t.lastname},{id:"status",header:"Status",renderCell:()=>h.jsx(Dm,{})}],Mm=()=>h.jsxs("div",{className:"flex flex-col gap-6",children:[h.jsxs("div",{className:"flex flex-row items-center justify-start gap-3",children:[h.jsx(Ds,{Icon:Ms,placeholder:"Search..."}),h.jsx(Go,{Icon:Dd})]}),h.jsx(Am,{columns:jm,rows:Rm}),h.jsx(Oa,{options:[{label:"Option 1",value:1},{label:"Option 2",value:2},{label:"Option 3",value:3}],value:null,onChange:()=>{}})]}),Dm=()=>{const[t,e]=T.useState(!1),{Popover:n,anchorRef:s}=se({fullWidth:!0,onOutsideClick:()=>e(!1),minWidth:150});return h.jsxs(h.Fragment,{children:[h.jsx(Ys,{onClick:()=>e(!0),ref:s,children:"Test"}),h.jsx(n,{open:t,children:h.jsxs(ie,{children:[h.jsx(fn,{children:"Option 1"}),h.jsx(fn,{children:"Option 2"}),h.jsx(fn,{children:"Option 3"})]})})]})};M.Badge=Ys,M.BadgeColor=Ia,M.Button=bd,M.ButtonIconRound=Xo,M.ButtonIconSquare=Go,M.Divider=Tm,M.Input=Ds,M.InputCheck=Fd,M.InputDescription=ht,M.InputError=mt,M.InputErrorIcon=Ft,M.InputIconButton=St,M.InputIconButtonTray=Bt,M.InputLabel=Lt,M.InputPassword=Nd,M.InputRadio=Id,M.InputSelect=Oa,M.InputSelectNative=Bd,M.InputSelectOption=Ee,M.InputSelectSearchable=vm,M.InputSelectSearchableAsync=bm,M.InputTextArea=Od,M.InputToggle=Ld,M.Modal=Pm,M.Panel=wm,M.PopoverBase=Na,M.PopoverButton=fn,M.PopoverPanel=ie,M.Spinner=Xe,M.TabButtons=Cm,M.Test=Mm,M.Tooltip=Sm,M.usePopover=se,Object.defineProperty(M,Symbol.toStringTag,{value:"Module"})}));
80
129
  //# sourceMappingURL=index.umd.cjs.map