ownui-system 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/BottomSheet/bottomsheet-context.d.ts +2 -0
- package/dist/components/BottomSheet/bottomsheet.d.ts +3 -1
- package/dist/index.d.ts +0 -3
- package/dist/ownui-system.js +967 -1145
- package/dist/ownui-system.js.map +1 -1
- package/dist/ownui-system.umd.cjs +10 -10
- package/dist/ownui-system.umd.cjs.map +1 -1
- package/package.json +1 -1
- package/dist/App.d.ts +0 -2
- package/dist/components/Accordion/Accordion.stories.d.ts +0 -23
- package/dist/components/Badge/Badge.stories.d.ts +0 -14
- package/dist/components/Button/Button.stories.d.ts +0 -43
- package/dist/components/Checkbox/Checkbox.stories.d.ts +0 -30
- package/dist/components/Divider/Divider.stories.d.ts +0 -19
- package/dist/components/Drawer/Drawer.stories.d.ts +0 -36
- package/dist/components/Dropdown/Dropdown.stories.d.ts +0 -12
- package/dist/components/Input/Input.stories.d.ts +0 -37
- package/dist/components/Modal/Modal.stories.d.ts +0 -12
- package/dist/components/Popover/Popover.stories.d.ts +0 -32
- package/dist/components/Tab/Tab.stories.d.ts +0 -16
- package/dist/components/TextArea/TextArea.stories.d.ts +0 -33
- package/dist/components/TextField/TextField.stories.d.ts +0 -30
- package/dist/main.d.ts +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(M,m){typeof exports=="object"&&typeof module<"u"?m(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],m):(M=typeof globalThis<"u"?globalThis:M||self,m(M["ownui-system"]={},M.React,M.ReactDOM))})(this,function(M,m,ho){"use strict";function po(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,r.get?r:{enumerable:!0,get:()=>t[n]})}}return e.default=t,Object.freeze(e)}const q=po(m);var tn={exports:{}},te={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react-jsx-runtime.production.min.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
|
|
9
|
+
*/var mr;function mo(){if(mr)return te;mr=1;var t=m,e=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,i=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function s(a,l,u){var c,f={},h=null,p=null;u!==void 0&&(h=""+u),l.key!==void 0&&(h=""+l.key),l.ref!==void 0&&(p=l.ref);for(c in l)r.call(l,c)&&!o.hasOwnProperty(c)&&(f[c]=l[c]);if(a&&a.defaultProps)for(c in l=a.defaultProps,l)f[c]===void 0&&(f[c]=l[c]);return{$$typeof:e,type:a,key:h,ref:p,props:f,_owner:i.current}}return te.Fragment=n,te.jsx=s,te.jsxs=s,te}var ee={};/**
|
|
10
10
|
* @license React
|
|
11
11
|
* react-jsx-runtime.development.js
|
|
12
12
|
*
|
|
@@ -14,17 +14,17 @@
|
|
|
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
|
|
18
|
-
`+Xt+d}}var
|
|
17
|
+
*/var gr;function go(){return gr||(gr=1,process.env.NODE_ENV!=="production"&&function(){var t=m,e=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),a=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),c=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),p=Symbol.for("react.offscreen"),g=Symbol.iterator,v="@@iterator";function T(d){if(d===null||typeof d!="object")return null;var x=g&&d[g]||d[v];return typeof x=="function"?x:null}var C=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function P(d){{for(var x=arguments.length,w=new Array(x>1?x-1:0),V=1;V<x;V++)w[V-1]=arguments[V];b("error",d,w)}}function b(d,x,w){{var V=C.ReactDebugCurrentFrame,k=V.getStackAddendum();k!==""&&(x+="%s",w=w.concat([k]));var I=w.map(function(O){return String(O)});I.unshift("Warning: "+x),Function.prototype.apply.call(console[d],console,I)}}var S=!1,E=!1,R=!1,F=!1,D=!1,L;L=Symbol.for("react.module.reference");function tt(d){return!!(typeof d=="string"||typeof d=="function"||d===r||d===o||D||d===i||d===u||d===c||F||d===p||S||E||R||typeof d=="object"&&d!==null&&(d.$$typeof===h||d.$$typeof===f||d.$$typeof===s||d.$$typeof===a||d.$$typeof===l||d.$$typeof===L||d.getModuleId!==void 0))}function jt(d,x,w){var V=d.displayName;if(V)return V;var k=x.displayName||x.name||"";return k!==""?w+"("+k+")":w}function et(d){return d.displayName||"Context"}function Y(d){if(d==null)return null;if(typeof d.tag=="number"&&P("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof d=="function")return d.displayName||d.name||null;if(typeof d=="string")return d;switch(d){case r:return"Fragment";case n:return"Portal";case o:return"Profiler";case i:return"StrictMode";case u:return"Suspense";case c:return"SuspenseList"}if(typeof d=="object")switch(d.$$typeof){case a:var x=d;return et(x)+".Consumer";case s:var w=d;return et(w._context)+".Provider";case l:return jt(d,d.render,"ForwardRef");case f:var V=d.displayName||null;return V!==null?V:Y(d.type)||"Memo";case h:{var k=d,I=k._payload,O=k._init;try{return Y(O(I))}catch{return null}}}return null}var $=Object.assign,ot=0,H,ut,Mt,gt,xe,B,Ot;function be(){}be.__reactDisabledLog=!0;function qe(){{if(ot===0){H=console.log,ut=console.info,Mt=console.warn,gt=console.error,xe=console.group,B=console.groupCollapsed,Ot=console.groupEnd;var d={configurable:!0,enumerable:!0,value:be,writable:!0};Object.defineProperties(console,{info:d,log:d,warn:d,error:d,group:d,groupCollapsed:d,groupEnd:d})}ot++}}function Xe(){{if(ot--,ot===0){var d={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:$({},d,{value:H}),info:$({},d,{value:ut}),warn:$({},d,{value:Mt}),error:$({},d,{value:gt}),group:$({},d,{value:xe}),groupCollapsed:$({},d,{value:B}),groupEnd:$({},d,{value:Ot})})}ot<0&&P("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var yt=C.ReactCurrentDispatcher,Xt;function Zt(d,x,w){{if(Xt===void 0)try{throw Error()}catch(k){var V=k.stack.trim().match(/\n( *(at )?)/);Xt=V&&V[1]||""}return`
|
|
18
|
+
`+Xt+d}}var Ut=!1,vt;{var xt=typeof WeakMap=="function"?WeakMap:Map;vt=new xt}function ur(d,x){if(!d||Ut)return"";{var w=vt.get(d);if(w!==void 0)return w}var V;Ut=!0;var k=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var I;I=yt.current,yt.current=null,qe();try{if(x){var O=function(){throw Error()};if(Object.defineProperty(O.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(O,[])}catch(bt){V=bt}Reflect.construct(d,[],O)}else{try{O.call()}catch(bt){V=bt}d.call(O.prototype)}}else{try{throw Error()}catch(bt){V=bt}d()}}catch(bt){if(bt&&V&&typeof bt.stack=="string"){for(var j=bt.stack.split(`
|
|
19
19
|
`),J=V.stack.split(`
|
|
20
|
-
`),
|
|
21
|
-
`+
|
|
20
|
+
`),z=j.length-1,G=J.length-1;z>=1&&G>=0&&j[z]!==J[G];)G--;for(;z>=1&&G>=0;z--,G--)if(j[z]!==J[G]){if(z!==1||G!==1)do if(z--,G--,G<0||j[z]!==J[G]){var at=`
|
|
21
|
+
`+j[z].replace(" at new "," at ");return d.displayName&&at.includes("<anonymous>")&&(at=at.replace("<anonymous>",d.displayName)),typeof d=="function"&&vt.set(d,at),at}while(z>=1&&G>=0);break}}}finally{Ut=!1,yt.current=I,Xe(),Error.prepareStackTrace=k}var Qt=d?d.displayName||d.name:"",fo=Qt?Zt(Qt):"";return typeof d=="function"&&vt.set(d,fo),fo}function rd(d,x,w){return ur(d,!1)}function id(d){var x=d.prototype;return!!(x&&x.isReactComponent)}function Ze(d,x,w){if(d==null)return"";if(typeof d=="function")return ur(d,id(d));if(typeof d=="string")return Zt(d);switch(d){case u:return Zt("Suspense");case c:return Zt("SuspenseList")}if(typeof d=="object")switch(d.$$typeof){case l:return rd(d.render);case f:return Ze(d.type,x,w);case h:{var V=d,k=V._payload,I=V._init;try{return Ze(I(k),x,w)}catch{}}}return""}var Je=Object.prototype.hasOwnProperty,Qs={},to=C.ReactDebugCurrentFrame;function Qe(d){if(d){var x=d._owner,w=Ze(d.type,d._source,x?x.type:null);to.setExtraStackFrame(w)}else to.setExtraStackFrame(null)}function sd(d,x,w,V,k){{var I=Function.call.bind(Je);for(var O in d)if(I(d,O)){var j=void 0;try{if(typeof d[O]!="function"){var J=Error((V||"React class")+": "+w+" type `"+O+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof d[O]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw J.name="Invariant Violation",J}j=d[O](x,O,V,w,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(z){j=z}j&&!(j instanceof Error)&&(Qe(k),P("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",V||"React class",w,O,typeof j),Qe(null)),j instanceof Error&&!(j.message in Qs)&&(Qs[j.message]=!0,Qe(k),P("Failed %s type: %s",w,j.message),Qe(null))}}}var od=Array.isArray;function cr(d){return od(d)}function ad(d){{var x=typeof Symbol=="function"&&Symbol.toStringTag,w=x&&d[Symbol.toStringTag]||d.constructor.name||"Object";return w}}function ld(d){try{return eo(d),!1}catch{return!0}}function eo(d){return""+d}function no(d){if(ld(d))return P("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",ad(d)),eo(d)}var Pe=C.ReactCurrentOwner,ud={key:!0,ref:!0,__self:!0,__source:!0},ro,io,fr;fr={};function cd(d){if(Je.call(d,"ref")){var x=Object.getOwnPropertyDescriptor(d,"ref").get;if(x&&x.isReactWarning)return!1}return d.ref!==void 0}function fd(d){if(Je.call(d,"key")){var x=Object.getOwnPropertyDescriptor(d,"key").get;if(x&&x.isReactWarning)return!1}return d.key!==void 0}function dd(d,x){if(typeof d.ref=="string"&&Pe.current&&x&&Pe.current.stateNode!==x){var w=Y(Pe.current.type);fr[w]||(P('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',Y(Pe.current.type),d.ref),fr[w]=!0)}}function hd(d,x){{var w=function(){ro||(ro=!0,P("%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://reactjs.org/link/special-props)",x))};w.isReactWarning=!0,Object.defineProperty(d,"key",{get:w,configurable:!0})}}function pd(d,x){{var w=function(){io||(io=!0,P("%s: `ref` 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://reactjs.org/link/special-props)",x))};w.isReactWarning=!0,Object.defineProperty(d,"ref",{get:w,configurable:!0})}}var md=function(d,x,w,V,k,I,O){var j={$$typeof:e,type:d,key:x,ref:w,props:O,_owner:I};return j._store={},Object.defineProperty(j._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(j,"_self",{configurable:!1,enumerable:!1,writable:!1,value:V}),Object.defineProperty(j,"_source",{configurable:!1,enumerable:!1,writable:!1,value:k}),Object.freeze&&(Object.freeze(j.props),Object.freeze(j)),j};function gd(d,x,w,V,k){{var I,O={},j=null,J=null;w!==void 0&&(no(w),j=""+w),fd(x)&&(no(x.key),j=""+x.key),cd(x)&&(J=x.ref,dd(x,k));for(I in x)Je.call(x,I)&&!ud.hasOwnProperty(I)&&(O[I]=x[I]);if(d&&d.defaultProps){var z=d.defaultProps;for(I in z)O[I]===void 0&&(O[I]=z[I])}if(j||J){var G=typeof d=="function"?d.displayName||d.name||"Unknown":d;j&&hd(O,G),J&&pd(O,G)}return md(d,j,J,k,V,Pe.current,O)}}var dr=C.ReactCurrentOwner,so=C.ReactDebugCurrentFrame;function Jt(d){if(d){var x=d._owner,w=Ze(d.type,d._source,x?x.type:null);so.setExtraStackFrame(w)}else so.setExtraStackFrame(null)}var hr;hr=!1;function pr(d){return typeof d=="object"&&d!==null&&d.$$typeof===e}function oo(){{if(dr.current){var d=Y(dr.current.type);if(d)return`
|
|
22
22
|
|
|
23
|
-
Check the render method of \``+d+"`."}return""}}function
|
|
23
|
+
Check the render method of \``+d+"`."}return""}}function yd(d){{if(d!==void 0){var x=d.fileName.replace(/^.*[\\\/]/,""),w=d.lineNumber;return`
|
|
24
24
|
|
|
25
|
-
Check your code at `+
|
|
25
|
+
Check your code at `+x+":"+w+"."}return""}}var ao={};function vd(d){{var x=oo();if(!x){var w=typeof d=="string"?d:d.displayName||d.name;w&&(x=`
|
|
26
26
|
|
|
27
|
-
Check the top-level render call using <`+w+">.")}return v}}function co(d,v){{if(!d._store||d._store.validated||d.key!=null)return;d._store.validated=!0;var w=Pd(v);if(uo[w])return;uo[w]=!0;var V="";d&&d._owner&&d._owner!==hr.current&&(V=" It was passed a child from "+Y(d._owner.type)+"."),Jt(d),P('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',w,V),Jt(null)}}function fo(d,v){{if(typeof d!="object")return;if(fr(d))for(var w=0;w<d.length;w++){var V=d[w];mr(V)&&co(V,v)}else if(mr(d))d._store&&(d._store.validated=!0);else if(d){var L=S(d);if(typeof L=="function"&&L!==d.entries)for(var I=L.call(d),O;!(O=I.next()).done;)mr(O.value)&&co(O.value,v)}}}function wd(d){{var v=d.type;if(v==null||typeof v=="string")return;var w;if(typeof v=="function")w=v.propTypes;else if(typeof v=="object"&&(v.$$typeof===l||v.$$typeof===f))w=v.propTypes;else return;if(w){var V=Y(v);ld(w,d.props,"prop",V,d)}else if(v.PropTypes!==void 0&&!pr){pr=!0;var L=Y(v);P("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",L||"Unknown")}typeof v.getDefaultProps=="function"&&!v.getDefaultProps.isReactClassApproved&&P("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Sd(d){{for(var v=Object.keys(d.props),w=0;w<v.length;w++){var V=v[w];if(V!=="children"&&V!=="key"){Jt(d),P("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",V),Jt(null);break}}d.ref!==null&&(Jt(d),P("Invalid attribute `ref` supplied to `React.Fragment`."),Jt(null))}}function ho(d,v,w,V,L,I){{var O=tt(d);if(!O){var M="";(d===void 0||typeof d=="object"&&d!==null&&Object.keys(d).length===0)&&(M+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var J=bd(L);J?M+=J:M+=lo();var U;d===null?U="null":fr(d)?U="array":d!==void 0&&d.$$typeof===e?(U="<"+(Y(d.type)||"Unknown")+" />",M=" Did you accidentally export a JSX literal instead of a component?"):U=typeof d,P("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",U,M)}var G=vd(d,v,w,L,I);if(G==null)return G;if(O){var lt=v.children;if(lt!==void 0)if(V)if(fr(lt)){for(var Qt=0;Qt<lt.length;Qt++)fo(lt[Qt],d);Object.freeze&&Object.freeze(lt)}else P("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 fo(lt,d)}return d===r?Sd(G):wd(G),G}}function Td(d,v,w){return ho(d,v,w,!0)}function Cd(d,v,w){return ho(d,v,w,!1)}var Ad=Cd,Vd=Td;ee.Fragment=r,ee.jsx=Ad,ee.jsxs=Vd}()),ee}process.env.NODE_ENV==="production"?tn.exports=yo():tn.exports=xo();var y=tn.exports;function xr(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t)){var i=t.length;for(e=0;e<i;e++)t[e]&&(n=xr(t[e]))&&(r&&(r+=" "),r+=n)}else for(n in t)t[n]&&(r&&(r+=" "),r+=n);return r}function Z(){for(var t,e,n=0,r="",i=arguments.length;n<i;n++)(t=arguments[n])&&(e=xr(t))&&(r&&(r+=" "),r+=e);return r}const vr=m.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"}),we=m.createContext({}),Se=m.createContext(null),Te=typeof document<"u",en=Te?m.useLayoutEffect:m.useEffect,nn=m.createContext({strict:!1}),rn=t=>t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),br="data-"+rn("framerAppearId"),Pr={skipAnimations:!1,useManualTiming:!1};class wr{constructor(){this.order=[],this.scheduled=new Set}add(e){if(!this.scheduled.has(e))return this.scheduled.add(e),this.order.push(e),!0}remove(e){const n=this.order.indexOf(e);n!==-1&&(this.order.splice(n,1),this.scheduled.delete(e))}clear(){this.order.length=0,this.scheduled.clear()}}function vo(t){let e=new wr,n=new wr,r=0,i=!1,o=!1;const s=new WeakSet,a={schedule:(l,u=!1,c=!1)=>{const f=c&&i,h=f?e:n;return u&&s.add(l),h.add(l)&&f&&i&&(r=e.order.length),l},cancel:l=>{n.remove(l),s.delete(l)},process:l=>{if(i){o=!0;return}if(i=!0,[e,n]=[n,e],n.clear(),r=e.order.length,r)for(let u=0;u<r;u++){const c=e.order[u];s.has(c)&&(a.schedule(c),t()),c(l)}i=!1,o&&(o=!1,a.process(l))}};return a}const Ce=["prepare","read","update","preRender","render","postRender"],bo=40;function Sr(t,e){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},o=Ce.reduce((f,h)=>(f[h]=vo(()=>n=!0),f),{}),s=f=>{o[f].process(i)},a=()=>{const f=performance.now();n=!1,i.delta=r?1e3/60:Math.max(Math.min(f-i.timestamp,bo),1),i.timestamp=f,i.isProcessing=!0,Ce.forEach(s),i.isProcessing=!1,n&&e&&(r=!1,t(a))},l=()=>{n=!0,r=!0,i.isProcessing||t(a)};return{schedule:Ce.reduce((f,h)=>{const p=o[h];return f[h]=(g,x=!1,S=!1)=>(n||l(),p.schedule(g,x,S)),f},{}),cancel:f=>Ce.forEach(h=>o[h].cancel(f)),state:i,steps:o}}const{schedule:sn,cancel:Dd}=Sr(queueMicrotask,!1);function Po(t,e,n,r){const{visualElement:i}=m.useContext(we),o=m.useContext(nn),s=m.useContext(Se),a=m.useContext(vr).reducedMotion,l=m.useRef();r=r||o.renderer,!l.current&&r&&(l.current=r(t,{visualState:e,parent:i,props:n,presenceContext:s,blockInitialAnimation:s?s.initial===!1:!1,reducedMotionConfig:a}));const u=l.current;m.useInsertionEffect(()=>{u&&u.update(n,s)});const c=m.useRef(!!(n[br]&&!window.HandoffComplete));return en(()=>{u&&(sn.postRender(u.render),c.current&&u.animationState&&u.animationState.animateChanges())}),m.useEffect(()=>{u&&(u.updateFeatures(),!c.current&&u.animationState&&u.animationState.animateChanges(),c.current&&(c.current=!1,window.HandoffComplete=!0))}),u}function zt(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function wo(t,e,n){return m.useCallback(r=>{r&&t.mount&&t.mount(r),e&&(r?e.mount(r):e.unmount()),n&&(typeof n=="function"?n(r):zt(n)&&(n.current=r))},[e])}function ne(t){return typeof t=="string"||Array.isArray(t)}function Ae(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}const on=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],an=["initial",...on];function Ve(t){return Ae(t.animate)||an.some(e=>ne(t[e]))}function Tr(t){return!!(Ve(t)||t.variants)}function So(t,e){if(Ve(t)){const{initial:n,animate:r}=t;return{initial:n===!1||ne(n)?n:void 0,animate:ne(r)?r:void 0}}return t.inherit!==!1?e:{}}function To(t){const{initial:e,animate:n}=So(t,m.useContext(we));return m.useMemo(()=>({initial:e,animate:n}),[Cr(e),Cr(n)])}function Cr(t){return Array.isArray(t)?t.join(" "):t}const Ar={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"]},re={};for(const t in Ar)re[t]={isEnabled:e=>Ar[t].some(n=>!!e[n])};function ln(t){for(const e in t)re[e]={...re[e],...t[e]}}const un=m.createContext({}),Vr=m.createContext({}),Co=Symbol.for("motionComponentSymbol");function Ao({preloadedFeatures:t,createVisualElement:e,useRender:n,useVisualState:r,Component:i}){t&&ln(t);function o(a,l){let u;const c={...m.useContext(vr),...a,layoutId:Vo(a)},{isStatic:f}=c,h=To(a),p=r(a,f);if(!f&&Te){h.visualElement=Po(i,p,c,e);const g=m.useContext(Vr),x=m.useContext(nn).strict;h.visualElement&&(u=h.visualElement.loadFeatures(c,x,t,g))}return q.createElement(we.Provider,{value:h},u&&h.visualElement?q.createElement(u,{visualElement:h.visualElement,...c}):null,n(i,a,wo(p,h.visualElement,l),p,f,h.visualElement))}const s=m.forwardRef(o);return s[Co]=i,s}function Vo({layoutId:t}){const e=m.useContext(un).id;return e&&t!==void 0?e+"-"+t:t}function Er(t){function e(r,i={}){return Ao(t(r,i))}if(typeof Proxy>"u")return e;const n=new Map;return new Proxy(e,{get:(r,i)=>(n.has(i)||n.set(i,e(i)),n.get(i))})}const Eo=["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 cn(t){return typeof t!="string"||t.includes("-")?!1:!!(Eo.indexOf(t)>-1||/[A-Z]/.test(t))}const Ee={};function Do(t){Object.assign(Ee,t)}const ie=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],kt=new Set(ie);function Dr(t,{layout:e,layoutId:n}){return kt.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!Ee[t]||t==="opacity")}const Q=t=>!!(t&&t.getVelocity),jo={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Mo=ie.length;function Oo(t,{enableHardwareAcceleration:e=!0,allowTransformNone:n=!0},r,i){let o="";for(let s=0;s<Mo;s++){const a=ie[s];if(t[a]!==void 0){const l=jo[a]||a;o+=`${l}(${t[a]}) `}}return e&&!t.z&&(o+="translateZ(0)"),o=o.trim(),i?o=i(t,r?"":o):n&&r&&(o="none"),o}const jr=t=>e=>typeof e=="string"&&e.startsWith(t),Mr=jr("--"),ko=jr("var(--"),De=t=>ko(t)?Lo.test(t.split("/*")[0].trim()):!1,Lo=/var\s*\(\s*--[\w-]+(\s*,\s*(?:(?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)+)?\s*\)$/i,Ro=(t,e)=>e&&typeof t=="number"?e.transform(t):t,Pt=(t,e,n)=>n>e?e:n<t?t:n,Ut={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},se={...Ut,transform:t=>Pt(0,1,t)},je={...Ut,default:1},oe=t=>Math.round(t*1e5)/1e5,fn=/(-)?([\d]*\.?[\d])+/g,Fo=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,Io=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function ae(t){return typeof t=="string"}const le=t=>({test:e=>ae(e)&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),wt=le("deg"),ct=le("%"),A=le("px"),Bo=le("vh"),_o=le("vw"),Or={...ct,parse:t=>ct.parse(t)/100,transform:t=>ct.transform(t*100)},kr={...Ut,transform:Math.round},Lr={borderWidth:A,borderTopWidth:A,borderRightWidth:A,borderBottomWidth:A,borderLeftWidth:A,borderRadius:A,radius:A,borderTopLeftRadius:A,borderTopRightRadius:A,borderBottomRightRadius:A,borderBottomLeftRadius:A,width:A,maxWidth:A,height:A,maxHeight:A,size:A,top:A,right:A,bottom:A,left:A,padding:A,paddingTop:A,paddingRight:A,paddingBottom:A,paddingLeft:A,margin:A,marginTop:A,marginRight:A,marginBottom:A,marginLeft:A,rotate:wt,rotateX:wt,rotateY:wt,rotateZ:wt,scale:je,scaleX:je,scaleY:je,scaleZ:je,skew:wt,skewX:wt,skewY:wt,distance:A,translateX:A,translateY:A,translateZ:A,x:A,y:A,z:A,perspective:A,transformPerspective:A,opacity:se,originX:Or,originY:Or,originZ:A,zIndex:kr,fillOpacity:se,strokeOpacity:se,numOctaves:kr};function dn(t,e,n,r){const{style:i,vars:o,transform:s,transformOrigin:a}=t;let l=!1,u=!1,c=!0;for(const f in e){const h=e[f];if(Mr(f)){o[f]=h;continue}const p=Lr[f],g=Ro(h,p);if(kt.has(f)){if(l=!0,s[f]=g,!c)continue;h!==(p.default||0)&&(c=!1)}else f.startsWith("origin")?(u=!0,a[f]=g):i[f]=g}if(e.transform||(l||r?i.transform=Oo(t.transform,n,c,r):i.transform&&(i.transform="none")),u){const{originX:f="50%",originY:h="50%",originZ:p=0}=a;i.transformOrigin=`${f} ${h} ${p}`}}const hn=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Rr(t,e,n){for(const r in e)!Q(e[r])&&!Dr(r,n)&&(t[r]=e[r])}function No({transformTemplate:t},e,n){return m.useMemo(()=>{const r=hn();return dn(r,e,{enableHardwareAcceleration:!n},t),Object.assign({},r.vars,r.style)},[e])}function $o(t,e,n){const r=t.style||{},i={};return Rr(i,r,t),Object.assign(i,No(t,e,n)),i}function Wo(t,e,n){const r={},i=$o(t,e,n);return t.drag&&t.dragListener!==!1&&(r.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),t.tabIndex===void 0&&(t.onTap||t.onTapStart||t.whileTap)&&(r.tabIndex=0),r.style=i,r}const zo=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 Me(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||zo.has(t)}let Fr=t=>!Me(t);function Uo(t){t&&(Fr=e=>e.startsWith("on")?!Me(e):t(e))}try{Uo(require("@emotion/is-prop-valid").default)}catch{}function Ho(t,e,n){const r={};for(const i in t)i==="values"&&typeof t.values=="object"||(Fr(i)||n===!0&&Me(i)||!e&&!Me(i)||t.draggable&&i.startsWith("onDrag"))&&(r[i]=t[i]);return r}function Ir(t,e,n){return typeof t=="string"?t:A.transform(e+n*t)}function Go(t,e,n){const r=Ir(e,t.x,t.width),i=Ir(n,t.y,t.height);return`${r} ${i}`}const Yo={offset:"stroke-dashoffset",array:"stroke-dasharray"},Ko={offset:"strokeDashoffset",array:"strokeDasharray"};function qo(t,e,n=1,r=0,i=!0){t.pathLength=1;const o=i?Yo:Ko;t[o.offset]=A.transform(-r);const s=A.transform(e),a=A.transform(n);t[o.array]=`${s} ${a}`}function pn(t,{attrX:e,attrY:n,attrScale:r,originX:i,originY:o,pathLength:s,pathSpacing:a=1,pathOffset:l=0,...u},c,f,h){if(dn(t,u,c,h),f){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:p,style:g,dimensions:x}=t;p.transform&&(x&&(g.transform=p.transform),delete p.transform),x&&(i!==void 0||o!==void 0||g.transform)&&(g.transformOrigin=Go(x,i!==void 0?i:.5,o!==void 0?o:.5)),e!==void 0&&(p.x=e),n!==void 0&&(p.y=n),r!==void 0&&(p.scale=r),s!==void 0&&qo(p,s,a,l,!1)}const Br=()=>({...hn(),attrs:{}}),mn=t=>typeof t=="string"&&t.toLowerCase()==="svg";function Xo(t,e,n,r){const i=m.useMemo(()=>{const o=Br();return pn(o,e,{enableHardwareAcceleration:!1},mn(r),t.transformTemplate),{...o.attrs,style:{...o.style}}},[e]);if(t.style){const o={};Rr(o,t.style,t),i.style={...o,...i.style}}return i}function Zo(t=!1){return(n,r,i,{latestValues:o},s)=>{const l=(cn(n)?Xo:Wo)(r,o,s,n),u=Ho(r,typeof n=="string",t),c=n!==m.Fragment?{...u,...l,ref:i}:{},{children:f}=r,h=m.useMemo(()=>Q(f)?f.get():f,[f]);return m.createElement(n,{...c,children:h})}}function _r(t,{style:e,vars:n},r,i){Object.assign(t.style,e,i&&i.getProjectionStyles(r));for(const o in n)t.style.setProperty(o,n[o])}const Nr=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 $r(t,e,n,r){_r(t,e,void 0,r);for(const i in e.attrs)t.setAttribute(Nr.has(i)?i:rn(i),e.attrs[i])}function gn(t,e){const{style:n}=t,r={};for(const i in n)(Q(n[i])||e.style&&Q(e.style[i])||Dr(i,t))&&(r[i]=n[i]);return r}function Wr(t,e){const n=gn(t,e);for(const r in t)if(Q(t[r])||Q(e[r])){const i=ie.indexOf(r)!==-1?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r;n[i]=t[r]}return n}function yn(t,e,n,r={},i={}){return typeof e=="function"&&(e=e(n!==void 0?n:t.custom,r,i)),typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"&&(e=e(n!==void 0?n:t.custom,r,i)),e}function xn(t){const e=m.useRef(null);return e.current===null&&(e.current=t()),e.current}const Oe=t=>Array.isArray(t),Jo=t=>!!(t&&typeof t=="object"&&t.mix&&t.toValue),Qo=t=>Oe(t)?t[t.length-1]||0:t;function ke(t){const e=Q(t)?t.get():t;return Jo(e)?e.toValue():e}function ta({scrapeMotionValuesFromProps:t,createRenderState:e,onMount:n},r,i,o){const s={latestValues:ea(r,i,o,t),renderState:e()};return n&&(s.mount=a=>n(r,a,s)),s}const zr=t=>(e,n)=>{const r=m.useContext(we),i=m.useContext(Se),o=()=>ta(t,e,r,i);return n?o():xn(o)};function ea(t,e,n,r){const i={},o=r(t,{});for(const h in o)i[h]=ke(o[h]);let{initial:s,animate:a}=t;const l=Ve(t),u=Tr(t);e&&u&&!l&&t.inherit!==!1&&(s===void 0&&(s=e.initial),a===void 0&&(a=e.animate));let c=n?n.initial===!1:!1;c=c||s===!1;const f=c?a:s;return f&&typeof f!="boolean"&&!Ae(f)&&(Array.isArray(f)?f:[f]).forEach(p=>{const g=yn(t,p);if(!g)return;const{transitionEnd:x,transition:S,...T}=g;for(const P in T){let b=T[P];if(Array.isArray(b)){const C=c?b.length-1:0;b=b[C]}b!==null&&(i[P]=b)}for(const P in x)i[P]=x[P]}),i}const W=t=>t,{schedule:_,cancel:ft,state:K,steps:vn}=Sr(typeof requestAnimationFrame<"u"?requestAnimationFrame:W,!0),na={useVisualState:zr({scrapeMotionValuesFromProps:Wr,createRenderState:Br,onMount:(t,e,{renderState:n,latestValues:r})=>{_.read(()=>{try{n.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}}),_.render(()=>{pn(n,r,{enableHardwareAcceleration:!1},mn(e.tagName),t.transformTemplate),$r(e,n)})}})},ra={useVisualState:zr({scrapeMotionValuesFromProps:gn,createRenderState:hn})};function Ur(t,{forwardMotionProps:e=!1},n,r){return{...cn(t)?na:ra,preloadedFeatures:n,useRender:Zo(e),createVisualElement:r,Component:t}}function dt(t,e,n,r={passive:!0}){return t.addEventListener(e,n,r),()=>t.removeEventListener(e,n)}const Hr=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1;function Le(t,e="page"){return{point:{x:t[e+"X"],y:t[e+"Y"]}}}const ia=t=>e=>Hr(e)&&t(e,Le(e));function ht(t,e,n,r){return dt(t,e,ia(n),r)}const sa=(t,e)=>n=>e(t(n)),pt=(...t)=>t.reduce(sa);function Gr(t){let e=null;return()=>{const n=()=>{e=null};return e===null?(e=t,n):!1}}const Yr=Gr("dragHorizontal"),Kr=Gr("dragVertical");function qr(t){let e=!1;if(t==="y")e=Kr();else if(t==="x")e=Yr();else{const n=Yr(),r=Kr();n&&r?e=()=>{n(),r()}:(n&&n(),r&&r())}return e}function Xr(){const t=qr(!0);return t?(t(),!1):!0}class St{constructor(e){this.isMounted=!1,this.node=e}update(){}}function Zr(t,e){const n="pointer"+(e?"enter":"leave"),r="onHover"+(e?"Start":"End"),i=(o,s)=>{if(o.pointerType==="touch"||Xr())return;const a=t.getProps();t.animationState&&a.whileHover&&t.animationState.setActive("whileHover",e),a[r]&&_.update(()=>a[r](o,s))};return ht(t.current,n,i,{passive:!t.getProps()[r]})}class oa extends St{mount(){this.unmount=pt(Zr(this.node,!0),Zr(this.node,!1))}unmount(){}}class aa 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=pt(dt(this.node.current,"focus",()=>this.onFocus()),dt(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const Jr=(t,e)=>e?t===e?!0:Jr(t,e.parentElement):!1;function bn(t,e){if(!e)return;const n=new PointerEvent("pointer"+t);e(n,Le(n))}class la extends St{constructor(){super(...arguments),this.removeStartListeners=W,this.removeEndListeners=W,this.removeAccessibleListeners=W,this.startPointerPress=(e,n)=>{if(this.isPressing)return;this.removeEndListeners();const r=this.node.getProps(),o=ht(window,"pointerup",(a,l)=>{if(!this.checkPressEnd())return;const{onTap:u,onTapCancel:c,globalTapTarget:f}=this.node.getProps();_.update(()=>{!f&&!Jr(this.node.current,a.target)?c&&c(a,l):u&&u(a,l)})},{passive:!(r.onTap||r.onPointerUp)}),s=ht(window,"pointercancel",(a,l)=>this.cancelPress(a,l),{passive:!(r.onTapCancel||r.onPointerCancel)});this.removeEndListeners=pt(o,s),this.startPress(e,n)},this.startAccessiblePress=()=>{const e=o=>{if(o.key!=="Enter"||this.isPressing)return;const s=a=>{a.key!=="Enter"||!this.checkPressEnd()||bn("up",(l,u)=>{const{onTap:c}=this.node.getProps();c&&_.update(()=>c(l,u))})};this.removeEndListeners(),this.removeEndListeners=dt(this.node.current,"keyup",s),bn("down",(a,l)=>{this.startPress(a,l)})},n=dt(this.node.current,"keydown",e),r=()=>{this.isPressing&&bn("cancel",(o,s)=>this.cancelPress(o,s))},i=dt(this.node.current,"blur",r);this.removeAccessibleListeners=pt(n,i)}}startPress(e,n){this.isPressing=!0;const{onTapStart:r,whileTap:i}=this.node.getProps();i&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),r&&_.update(()=>r(e,n))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!Xr()}cancelPress(e,n){if(!this.checkPressEnd())return;const{onTapCancel:r}=this.node.getProps();r&&_.update(()=>r(e,n))}mount(){const e=this.node.getProps(),n=ht(e.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(e.onTapStart||e.onPointerStart)}),r=dt(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=pt(n,r)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const Pn=new WeakMap,wn=new WeakMap,ua=t=>{const e=Pn.get(t.target);e&&e(t)},ca=t=>{t.forEach(ua)};function fa({root:t,...e}){const n=t||document;wn.has(n)||wn.set(n,{});const r=wn.get(n),i=JSON.stringify(e);return r[i]||(r[i]=new IntersectionObserver(ca,{root:t,...e})),r[i]}function da(t,e,n){const r=fa(e);return Pn.set(t,n),r.observe(t),()=>{Pn.delete(t),r.unobserve(t)}}const ha={some:0,all:1};class pa extends St{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:n,margin:r,amount:i="some",once:o}=e,s={root:n?n.current:void 0,rootMargin:r,threshold:typeof i=="number"?i:ha[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 da(this.node.current,s,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:n}=this.node;["amount","margin","root"].some(ma(e,n))&&this.startObserver()}unmount(){}}function ma({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const Qr={inView:{Feature:pa},tap:{Feature:la},focus:{Feature:aa},hover:{Feature:oa}};function ti(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let r=0;r<n;r++)if(e[r]!==t[r])return!1;return!0}function ga(t){const e={};return t.values.forEach((n,r)=>e[r]=n.get()),e}function ya(t){const e={};return t.values.forEach((n,r)=>e[r]=n.getVelocity()),e}function Re(t,e,n){const r=t.getProps();return yn(r,e,n!==void 0?n:r.custom,ga(t),ya(t))}let ue=W,rt=W;process.env.NODE_ENV!=="production"&&(ue=(t,e)=>{!t&&typeof console<"u"&&console.warn(e)},rt=(t,e)=>{if(!t)throw new Error(e)});const Tt=t=>t*1e3,mt=t=>t/1e3,xa={current:!1},ei=t=>Array.isArray(t)&&typeof t[0]=="number";function ni(t){return!!(!t||typeof t=="string"&&ri[t]||ei(t)||Array.isArray(t)&&t.every(ni))}const ce=([t,e,n,r])=>`cubic-bezier(${t}, ${e}, ${n}, ${r})`,ri={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:ce([0,.65,.55,1]),circOut:ce([.55,0,1,.45]),backIn:ce([.31,.01,.66,-.59]),backOut:ce([.33,1.53,.69,.99])};function ii(t){if(t)return ei(t)?ce(t):Array.isArray(t)?t.map(ii):ri[t]}function va(t,e,n,{delay:r=0,duration:i,repeat:o=0,repeatType:s="loop",ease:a,times:l}={}){const u={[e]:n};l&&(u.offset=l);const c=ii(a);return Array.isArray(c)&&(u.easing=c),t.animate(u,{delay:r,duration:i,easing:Array.isArray(c)?"linear":c,fill:"both",iterations:o+1,direction:s==="reverse"?"alternate":"normal"})}function ba(t,{repeat:e,repeatType:n="loop"}){const r=e&&n!=="loop"&&e%2===1?0:t.length-1;return t[r]}const si=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,Pa=1e-7,wa=12;function Sa(t,e,n,r,i){let o,s,a=0;do s=e+(n-e)/2,o=si(s,r,i)-t,o>0?n=s:e=s;while(Math.abs(o)>Pa&&++a<wa);return s}function fe(t,e,n,r){if(t===e&&n===r)return W;const i=o=>Sa(o,0,1,t,n);return o=>o===0||o===1?o:si(i(o),e,r)}const Ta=fe(.42,0,1,1),Ca=fe(0,0,.58,1),oi=fe(.42,0,.58,1),Aa=t=>Array.isArray(t)&&typeof t[0]!="number",ai=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,li=t=>e=>1-t(1-e),Sn=t=>1-Math.sin(Math.acos(t)),ui=li(Sn),Va=ai(Sn),ci=fe(.33,1.53,.69,.99),Tn=li(ci),Ea=ai(Tn),fi={linear:W,easeIn:Ta,easeInOut:oi,easeOut:Ca,circIn:Sn,circInOut:Va,circOut:ui,backIn:Tn,backInOut:Ea,backOut:ci,anticipate:t=>(t*=2)<1?.5*Tn(t):.5*(2-Math.pow(2,-10*(t-1)))},di=t=>{if(Array.isArray(t)){rt(t.length===4,"Cubic bezier arrays must contain four numerical values.");const[e,n,r,i]=t;return fe(e,n,r,i)}else if(typeof t=="string")return rt(fi[t]!==void 0,`Invalid easing type '${t}'`),fi[t];return t},de=(t,e,n)=>{const r=e-t;return r===0?1:(n-t)/r},N=(t,e,n)=>t+(e-t)*n;function Cn(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 Da({hue:t,saturation:e,lightness:n,alpha:r}){t/=360,e/=100,n/=100;let i=0,o=0,s=0;if(!e)i=o=s=n;else{const a=n<.5?n*(1+e):n+e-n*e,l=2*n-a;i=Cn(l,a,t+1/3),o=Cn(l,a,t),s=Cn(l,a,t-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(s*255),alpha:r}}const An=(t,e)=>n=>!!(ae(n)&&Io.test(n)&&n.startsWith(t)||e&&Object.prototype.hasOwnProperty.call(n,e)),hi=(t,e,n)=>r=>{if(!ae(r))return r;const[i,o,s,a]=r.match(fn);return{[t]:parseFloat(i),[e]:parseFloat(o),[n]:parseFloat(s),alpha:a!==void 0?parseFloat(a):1}},ja=t=>Pt(0,255,t),Vn={...Ut,transform:t=>Math.round(ja(t))},Lt={test:An("rgb","red"),parse:hi("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:r=1})=>"rgba("+Vn.transform(t)+", "+Vn.transform(e)+", "+Vn.transform(n)+", "+oe(se.transform(r))+")"};function Ma(t){let e="",n="",r="",i="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),r=t.substring(5,7),i=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),r=t.substring(3,4),i=t.substring(4,5),e+=e,n+=n,r+=r,i+=i),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const En={test:An("#"),parse:Ma,transform:Lt.transform},Ht={test:An("hsl","hue"),parse:hi("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:r=1})=>"hsla("+Math.round(t)+", "+ct.transform(oe(e))+", "+ct.transform(oe(n))+", "+oe(se.transform(r))+")"},Dn=(t,e,n)=>{const r=t*t,i=n*(e*e-r)+r;return i<0?0:Math.sqrt(i)},Oa=[En,Lt,Ht],ka=t=>Oa.find(e=>e.test(t));function pi(t){const e=ka(t);rt(!!e,`'${t}' is not an animatable color. Use the equivalent color code instead.`);let n=e.parse(t);return e===Ht&&(n=Da(n)),n}const mi=(t,e)=>{const n=pi(t),r=pi(e),i={...n};return o=>(i.red=Dn(n.red,r.red,o),i.green=Dn(n.green,r.green,o),i.blue=Dn(n.blue,r.blue,o),i.alpha=N(n.alpha,r.alpha,o),Lt.transform(i))},X={test:t=>Lt.test(t)||En.test(t)||Ht.test(t),parse:t=>Lt.test(t)?Lt.parse(t):Ht.test(t)?Ht.parse(t):En.parse(t),transform:t=>ae(t)?t:t.hasOwnProperty("red")?Lt.transform(t):Ht.transform(t)};function La(t){var e,n;return isNaN(t)&&ae(t)&&(((e=t.match(fn))===null||e===void 0?void 0:e.length)||0)+(((n=t.match(Fo))===null||n===void 0?void 0:n.length)||0)>0}const gi="number",yi="color",Ra="var",Fa="var(",xi="${}",vi=/(var\s*\(\s*--[\w-]+(\s*,\s*(?:(?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)+)?\s*\))|(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))|((-)?([\d]*\.?[\d])+)/gi;function Fe(t){const e=t.toString(),n=e.match(vi)||[],r=[],i={color:[],number:[],var:[]},o=[];for(let l=0;l<n.length;l++){const u=n[l];X.test(u)?(i.color.push(l),o.push(yi),r.push(X.parse(u))):u.startsWith(Fa)?(i.var.push(l),o.push(Ra),r.push(u)):(i.number.push(l),o.push(gi),r.push(parseFloat(u)))}const a=e.replace(vi,xi).split(xi);return{values:r,split:a,indexes:i,types:o}}function bi(t){return Fe(t).values}function Pi(t){const{split:e,types:n}=Fe(t),r=e.length;return i=>{let o="";for(let s=0;s<r;s++)if(o+=e[s],i[s]!==void 0){const a=n[s];a===gi?o+=oe(i[s]):a===yi?o+=X.transform(i[s]):o+=i[s]}return o}}const Ia=t=>typeof t=="number"?0:t;function Ba(t){const e=bi(t);return Pi(t)(e.map(Ia))}const Ct={test:La,parse:bi,createTransformer:Pi,getAnimatableNone:Ba};function jn(t,e){return n=>n>0?e:t}function _a(t,e){return n=>N(t,e,n)}function Mn(t){return typeof t=="number"?_a:typeof t=="string"?De(t)?jn:X.test(t)?mi:Wa:Array.isArray(t)?wi:typeof t=="object"?X.test(t)?mi:Na:jn}function wi(t,e){const n=[...t],r=n.length,i=t.map((o,s)=>Mn(o)(o,e[s]));return o=>{for(let s=0;s<r;s++)n[s]=i[s](o);return n}}function Na(t,e){const n={...t,...e},r={};for(const i in n)t[i]!==void 0&&e[i]!==void 0&&(r[i]=Mn(t[i])(t[i],e[i]));return i=>{for(const o in r)n[o]=r[o](i);return n}}function $a(t,e){var n;const r=[],i={color:0,var:0,number:0};for(let o=0;o<e.values.length;o++){const s=e.types[o],a=t.indexes[s][i[s]],l=(n=t.values[a])!==null&&n!==void 0?n:0;r[o]=l,i[s]++}return r}const Wa=(t,e)=>{const n=Ct.createTransformer(e),r=Fe(t),i=Fe(e);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?pt(wi($a(r,i),i.values),n):(ue(!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.`),jn(t,e))};function Si(t,e,n){return typeof t=="number"&&typeof e=="number"&&typeof n=="number"?N(t,e,n):Mn(t)(t,e)}function za(t,e,n){const r=[],i=n||Si,o=t.length-1;for(let s=0;s<o;s++){let a=i(t[s],t[s+1]);if(e){const l=Array.isArray(e)?e[s]||W:e;a=pt(l,a)}r.push(a)}return r}function Ua(t,e,{clamp:n=!0,ease:r,mixer:i}={}){const o=t.length;if(rt(o===e.length,"Both input and output ranges must be the same length"),o===1)return()=>e[0];t[0]>t[o-1]&&(t=[...t].reverse(),e=[...e].reverse());const s=za(e,r,i),a=s.length,l=u=>{let c=0;if(a>1)for(;c<t.length-2&&!(u<t[c+1]);c++);const f=de(t[c],t[c+1],u);return s[c](f)};return n?u=>l(Pt(t[0],t[o-1],u)):l}function Ha(t,e){const n=t[t.length-1];for(let r=1;r<=e;r++){const i=de(0,e,r);t.push(N(n,1,i))}}function Ga(t){const e=[0];return Ha(e,t.length-1),e}function Ya(t,e){return t.map(n=>n*e)}function Ka(t,e){return t.map(()=>e||oi).splice(0,t.length-1)}function Ie({duration:t=300,keyframes:e,times:n,ease:r="easeInOut"}){const i=Aa(r)?r.map(di):di(r),o={done:!1,value:e[0]},s=Ya(n&&n.length===e.length?n:Ga(e),t),a=Ua(s,e,{ease:Array.isArray(i)?i:Ka(e,i)});return{calculatedDuration:t,next:l=>(o.value=a(l),o.done=l>=t,o)}}function Ti(t,e){return e?t*(1e3/e):0}const qa=5;function Ci(t,e,n){const r=Math.max(e-qa,0);return Ti(n-t(r),e-r)}const On=.001,Xa=.01,Ai=10,Za=.05,Ja=1;function Qa({duration:t=800,bounce:e=.25,velocity:n=0,mass:r=1}){let i,o;ue(t<=Tt(Ai),"Spring duration must be 10 seconds or less");let s=1-e;s=Pt(Za,Ja,s),t=Pt(Xa,Ai,mt(t)),s<1?(i=u=>{const c=u*s,f=c*t,h=c-n,p=kn(u,s),g=Math.exp(-f);return On-h/p*g},o=u=>{const f=u*s*t,h=f*n+n,p=Math.pow(s,2)*Math.pow(u,2)*t,g=Math.exp(-f),x=kn(Math.pow(u,2),s);return(-i(u)+On>0?-1:1)*((h-p)*g)/x}):(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=Tt(t),isNaN(l))return{stiffness:100,damping:10,duration:t};{const u=Math.pow(l,2)*r;return{stiffness:u,damping:s*2*Math.sqrt(r*u),duration:t}}}const tl=12;function el(t,e,n){let r=n;for(let i=1;i<tl;i++)r=r-t(r)/e(r);return r}function kn(t,e){return t*Math.sqrt(1-e*e)}const nl=["duration","bounce"],rl=["stiffness","damping","mass"];function Vi(t,e){return e.some(n=>t[n]!==void 0)}function il(t){let e={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...t};if(!Vi(t,rl)&&Vi(t,nl)){const n=Qa(t);e={...e,...n,mass:1},e.isResolvedFromDuration=!0}return e}function Ei({keyframes:t,restDelta:e,restSpeed:n,...r}){const i=t[0],o=t[t.length-1],s={done:!1,value:i},{stiffness:a,damping:l,mass:u,duration:c,velocity:f,isResolvedFromDuration:h}=il({...r,velocity:-mt(r.velocity||0)}),p=f||0,g=l/(2*Math.sqrt(a*u)),x=o-i,S=mt(Math.sqrt(a/u)),T=Math.abs(x)<5;n||(n=T?.01:2),e||(e=T?.005:.5);let P;if(g<1){const b=kn(S,g);P=C=>{const D=Math.exp(-g*S*C);return o-D*((p+g*S*x)/b*Math.sin(b*C)+x*Math.cos(b*C))}}else if(g===1)P=b=>o-Math.exp(-S*b)*(x+(p+S*x)*b);else{const b=S*Math.sqrt(g*g-1);P=C=>{const D=Math.exp(-g*S*C),R=Math.min(b*C,300);return o-D*((p+g*S*x)*Math.sinh(R)+b*x*Math.cosh(R))/b}}return{calculatedDuration:h&&c||null,next:b=>{const C=P(b);if(h)s.done=b>=c;else{let D=p;b!==0&&(g<1?D=Ci(P,b,C):D=0);const R=Math.abs(D)<=n,F=Math.abs(o-C)<=e;s.done=R&&F}return s.value=s.done?o:C,s}}}function Di({keyframes:t,velocity:e=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:s,min:a,max:l,restDelta:u=.5,restSpeed:c}){const f=t[0],h={done:!1,value:f},p=j=>a!==void 0&&j<a||l!==void 0&&j>l,g=j=>a===void 0?l:l===void 0||Math.abs(a-j)<Math.abs(l-j)?a:l;let x=n*e;const S=f+x,T=s===void 0?S:s(S);T!==S&&(x=T-f);const P=j=>-x*Math.exp(-j/r),b=j=>T+P(j),C=j=>{const k=P(j),tt=b(j);h.done=Math.abs(k)<=u,h.value=h.done?T:tt};let D,R;const F=j=>{p(h.value)&&(D=j,R=Ei({keyframes:[h.value,g(h.value)],velocity:Ci(b,j,h.value),damping:i,stiffness:o,restDelta:u,restSpeed:c}))};return F(0),{calculatedDuration:null,next:j=>{let k=!1;return!R&&D===void 0&&(k=!0,C(j),F(j)),D!==void 0&&j>D?R.next(j-D):(!k&&C(j),h)}}}let Be;function sl(){Be=void 0}const Rt={now:()=>(Be===void 0&&Rt.set(K.isProcessing||Pr.useManualTiming?K.timestamp:performance.now()),Be),set:t=>{Be=t,queueMicrotask(sl)}},ol=t=>{const e=({timestamp:n})=>t(n);return{start:()=>_.update(e,!0),stop:()=>ft(e),now:()=>K.isProcessing?K.timestamp:Rt.now()}},ji=2e4;function Mi(t){let e=0;const n=50;let r=t.next(e);for(;!r.done&&e<ji;)e+=n,r=t.next(e);return e>=ji?1/0:e}const al={decay:Di,inertia:Di,tween:Ie,keyframes:Ie,spring:Ei},ll=t=>t/100;function _e({autoplay:t=!0,delay:e=0,driver:n=ol,keyframes:r,type:i="keyframes",repeat:o=0,repeatDelay:s=0,repeatType:a="loop",onPlay:l,onStop:u,onComplete:c,onUpdate:f,...h}){let p=1,g=!1,x,S;const T=()=>{S=new Promise(B=>{x=B})};T();let P;const b=al[i]||Ie;let C;b!==Ie&&typeof r[0]!="number"&&(process.env.NODE_ENV!=="production"&&rt(r.length===2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${r}`),C=pt(ll,Si(r[0],r[1])),r=[0,100]);const D=b({...h,keyframes:r});let R;a==="mirror"&&(R=b({...h,keyframes:[...r].reverse(),velocity:-(h.velocity||0)}));let F="idle",j=null,k=null,tt=null;D.calculatedDuration===null&&o&&(D.calculatedDuration=Mi(D));const{calculatedDuration:jt}=D;let et=1/0,Y=1/0;jt!==null&&(et=jt+s,Y=et*(o+1)-s);let $=0;const at=B=>{if(k===null)return;p>0&&(k=Math.min(k,B)),p<0&&(k=Math.min(B-Y/p,k)),j!==null?$=j:$=Math.round(B-k)*p;const Ot=$-e*(p>=0?1:-1),be=p>=0?Ot<0:Ot>Y;$=Math.max(Ot,0),F==="finished"&&j===null&&($=Y);let qe=$,Xe=D;if(o){const Wt=Math.min($,Y)/et;let xt=Math.floor(Wt),vt=Wt%1;!vt&&Wt>=1&&(vt=1),vt===1&&xt--,xt=Math.min(xt,o+1),!!(xt%2)&&(a==="reverse"?(vt=1-vt,s&&(vt-=s/et)):a==="mirror"&&(Xe=R)),qe=Pt(0,1,vt)*et}const yt=be?{done:!1,value:r[0]}:Xe.next(qe);C&&(yt.value=C(yt.value));let{done:Xt}=yt;!be&&jt!==null&&(Xt=p>=0?$>=Y:$<=0);const Zt=j===null&&(F==="finished"||F==="running"&&Xt);return f&&f(yt.value),Zt&&Mt(),yt},H=()=>{P&&P.stop(),P=void 0},ut=()=>{F="idle",H(),x(),T(),k=tt=null},Mt=()=>{F="finished",c&&c(),H(),x()},gt=()=>{if(g)return;P||(P=n(at));const B=P.now();l&&l(),j!==null?k=B-j:(!k||F==="finished")&&(k=B),F==="finished"&&T(),tt=k,j=null,F="running",P.start()};t&>();const ve={then(B,Ot){return S.then(B,Ot)},get time(){return mt($)},set time(B){B=Tt(B),$=B,j!==null||!P||p===0?j=B:k=P.now()-B/p},get duration(){const B=D.calculatedDuration===null?Mi(D):D.calculatedDuration;return mt(B)},get speed(){return p},set speed(B){B===p||!P||(p=B,ve.time=mt($))},get state(){return F},play:gt,pause:()=>{F="paused",j=$},stop:()=>{g=!0,F!=="idle"&&(F="idle",u&&u(),ut())},cancel:()=>{tt!==null&&at(tt),ut()},complete:()=>{F="finished"},sample:B=>(k=0,at(B))};return ve}function ul(t){let e;return()=>(e===void 0&&(e=t()),e)}const cl=ul(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),fl=new Set(["opacity","clipPath","filter","transform"]),Ne=10,dl=2e4,hl=(t,e)=>e.type==="spring"||t==="backgroundColor"||!ni(e.ease);function pl(t,e,{onUpdate:n,onComplete:r,...i}){if(!(cl()&&fl.has(e)&&!i.repeatDelay&&i.repeatType!=="mirror"&&i.damping!==0&&i.type!=="inertia"))return!1;let s=!1,a,l,u=!1;const c=()=>{l=new Promise(b=>{a=b})};c();let{keyframes:f,duration:h=300,ease:p,times:g}=i;if(hl(e,i)){const b=_e({...i,repeat:0,delay:0});let C={done:!1,value:f[0]};const D=[];let R=0;for(;!C.done&&R<dl;)C=b.sample(R),D.push(C.value),R+=Ne;g=void 0,f=D,h=R-Ne,p="linear"}const x=va(t.owner.current,e,f,{...i,duration:h,ease:p,times:g}),S=()=>{u=!1,x.cancel()},T=()=>{u=!0,_.update(S),a(),c()};return x.onfinish=()=>{u||(t.set(ba(f,i)),r&&r(),T())},{then(b,C){return l.then(b,C)},attachTimeline(b){return x.timeline=b,x.onfinish=null,W},get time(){return mt(x.currentTime||0)},set time(b){x.currentTime=Tt(b)},get speed(){return x.playbackRate},set speed(b){x.playbackRate=b},get duration(){return mt(h)},play:()=>{s||(x.play(),ft(S))},pause:()=>x.pause(),stop:()=>{if(s=!0,x.playState==="idle")return;const{currentTime:b}=x;if(b){const C=_e({...i,autoplay:!1});t.setWithVelocity(C.sample(b-Ne).value,C.sample(b).value,Ne)}T()},complete:()=>{u||x.finish()},cancel:T}}function ml({keyframes:t,delay:e,onUpdate:n,onComplete:r}){const i=()=>(n&&n(t[t.length-1]),r&&r(),{time:0,speed:1,duration:0,play:W,pause:W,stop:W,then:o=>(o(),Promise.resolve()),cancel:W,complete:W});return e?_e({keyframes:[0,1],duration:0,delay:e,onComplete:i}):i()}const gl={type:"spring",stiffness:500,damping:25,restSpeed:10},yl=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),xl={type:"keyframes",duration:.8},vl={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},bl=(t,{keyframes:e})=>e.length>2?xl:kt.has(t)?t.startsWith("scale")?yl(e[1]):gl:vl,Ln=(t,e)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Ct.test(e)||e==="0")&&!e.startsWith("url(")),Pl=new Set(["brightness","contrast","saturate","opacity"]);function wl(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[r]=n.match(fn)||[];if(!r)return t;const i=n.replace(r,"");let o=Pl.has(e)?1:0;return r!==n&&(o*=100),e+"("+o+i+")"}const Sl=/([a-z-]*)\(.*?\)/g,Rn={...Ct,getAnimatableNone:t=>{const e=t.match(Sl);return e?e.map(wl).join(" "):t}},Tl={...Lr,color:X,backgroundColor:X,outlineColor:X,fill:X,stroke:X,borderColor:X,borderTopColor:X,borderRightColor:X,borderBottomColor:X,borderLeftColor:X,filter:Rn,WebkitFilter:Rn},Fn=t=>Tl[t];function Oi(t,e){let n=Fn(t);return n!==Rn&&(n=Ct),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const ki=t=>/^0[^.\s]+$/.test(t);function Cl(t){if(typeof t=="number")return t===0;if(t!==null)return t==="none"||t==="0"||ki(t)}function Al(t,e,n,r){const i=Ln(e,n);let o;Array.isArray(n)?o=[...n]:o=[null,n];const s=r.from!==void 0?r.from:t.get();let a;const l=[];for(let u=0;u<o.length;u++)o[u]===null&&(o[u]=u===0?s:o[u-1]),Cl(o[u])&&l.push(u),typeof o[u]=="string"&&o[u]!=="none"&&o[u]!=="0"&&(a=o[u]);if(i&&l.length&&a)for(let u=0;u<l.length;u++){const c=l[u];o[c]=Oi(e,a)}return o}function Vl({when:t,delay:e,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:o,repeatType:s,repeatDelay:a,from:l,elapsed:u,...c}){return!!Object.keys(c).length}function In(t,e){return t[e]||t.default||t}const Bn=(t,e,n,r={})=>i=>{const o=In(r,t)||{},s=o.delay||r.delay||0;let{elapsed:a=0}=r;a=a-Tt(s);const l=Al(e,t,n,o),u=l[0],c=l[l.length-1],f=Ln(t,u),h=Ln(t,c);ue(f===h,`You are trying to animate ${t} from "${u}" to "${c}". ${u} is not an animatable value - to enable this animation set ${u} to a value animatable to ${c} via the \`style\` property.`);let p={keyframes:l,velocity:e.getVelocity(),ease:"easeOut",...o,delay:-a,onUpdate:g=>{e.set(g),o.onUpdate&&o.onUpdate(g)},onComplete:()=>{i(),o.onComplete&&o.onComplete()}};if(Vl(o)||(p={...p,...bl(t,p)}),p.duration&&(p.duration=Tt(p.duration)),p.repeatDelay&&(p.repeatDelay=Tt(p.repeatDelay)),!f||!h||xa.current||o.type===!1||Pr.skipAnimations)return ml(p);if(!r.isHandoff&&e.owner&&e.owner.current instanceof HTMLElement&&!e.owner.getProps().onUpdate){const g=pl(e,t,p);if(g)return g}return _e(p)};function $e(t){return!!(Q(t)&&t.add)}const Li=t=>/^\-?\d*\.?\d+$/.test(t);function _n(t,e){t.indexOf(e)===-1&&t.push(e)}function Nn(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}class $n{constructor(){this.subscriptions=[]}add(e){return _n(this.subscriptions,e),()=>Nn(this.subscriptions,e)}notify(e,n,r){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](e,n,r);else for(let o=0;o<i;o++){const s=this.subscriptions[o];s&&s(e,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Ri=new Set;function Wn(t,e,n){t||Ri.has(e)||(console.warn(e),n&&console.warn(n),Ri.add(e))}const Fi=30,El=t=>!isNaN(parseFloat(t));class Dl{constructor(e,n={}){this.version="11.0.8",this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(r,i=!0)=>{const o=Rt.now();this.updatedAt!==o&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),i&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(e),this.canTrackVelocity=El(this.current),this.owner=n.owner}setCurrent(e){this.current=e,this.updatedAt=Rt.now()}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return process.env.NODE_ENV!=="production"&&Wn(!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 $n);const r=this.events[e].add(n);return e==="change"?()=>{r(),_.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,n){this.passiveEffect=e,this.stopPassiveEffect=n}set(e,n=!0){!n||!this.passiveEffect?this.updateAndNotify(e,n):this.passiveEffect(e,this.updateAndNotify)}setWithVelocity(e,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-r}jump(e){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const e=Rt.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>Fi)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Fi);return Ti(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.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Gt(t,e){return new Dl(t,e)}const Ii=t=>e=>e.test(t),Bi=[Ut,A,ct,wt,_o,Bo,{test:t=>t==="auto",parse:t=>t}],he=t=>Bi.find(Ii(t)),jl=[...Bi,X,Ct],Ml=t=>jl.find(Ii(t));function Ol(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,Gt(n))}function kl(t,e){const n=Re(t,e);let{transitionEnd:r={},transition:i={},...o}=n?t.makeTargetAnimatable(n,!1):{};o={...o,...r};for(const s in o){const a=Qo(o[s]);Ol(t,s,a)}}function Ll(t,e,n){var r,i;const o=Object.keys(e).filter(a=>!t.hasValue(a)),s=o.length;if(s)for(let a=0;a<s;a++){const l=o[a],u=e[l];let c=null;Array.isArray(u)&&(c=u[0]),c===null&&(c=(i=(r=n[l])!==null&&r!==void 0?r:t.readValue(l))!==null&&i!==void 0?i:e[l]),c!=null&&(typeof c=="string"&&(Li(c)||ki(c))?c=parseFloat(c):!Ml(c)&&Ct.test(u)&&(c=Oi(l,u)),t.addValue(l,Gt(c,{owner:t})),n[l]===void 0&&(n[l]=c),c!==null&&t.setBaseTarget(l,c))}}function Rl(t,e){return e?(e[t]||e.default||e).from:void 0}function Fl(t,e,n){const r={};for(const i in t){const o=Rl(i,e);if(o!==void 0)r[i]=o;else{const s=n.getValue(i);s&&(r[i]=s.get())}}return r}function Il({protectedKeys:t,needsAnimating:e},n){const r=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,r}function Bl(t,e){const n=t.get();if(Array.isArray(e)){for(let r=0;r<e.length;r++)if(e[r]!==n)return!0}else return n!==e}function _i(t,e,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:o=t.getDefaultTransition(),transitionEnd:s,...a}=t.makeTargetAnimatable(e);const l=t.getValue("willChange");r&&(o=r);const u=[],c=i&&t.animationState&&t.animationState.getState()[i];for(const f in a){const h=t.getValue(f),p=a[f];if(!h||p===void 0||c&&Il(c,f))continue;const g={delay:n,elapsed:0,...In(o||{},f)};if(window.HandoffAppearAnimations){const T=t.getProps()[br];if(T){const P=window.HandoffAppearAnimations(T,f,h,_);P!==null&&(g.elapsed=P,g.isHandoff=!0)}}let x=!g.isHandoff&&!Bl(h,p);if(g.type==="spring"&&(h.getVelocity()||g.velocity)&&(x=!1),h.animation&&(x=!1),x)continue;h.start(Bn(f,h,p,t.shouldReduceMotion&&kt.has(f)?{type:!1}:g));const S=h.animation;$e(l)&&(l.add(f),S.then(()=>l.remove(f))),u.push(S)}return s&&Promise.all(u).then(()=>{s&&kl(t,s)}),u}function zn(t,e,n={}){const r=Re(t,e,n.custom);let{transition:i=t.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);const o=r?()=>Promise.all(_i(t,r,n)):()=>Promise.resolve(),s=t.variantChildren&&t.variantChildren.size?(l=0)=>{const{delayChildren:u=0,staggerChildren:c,staggerDirection:f}=i;return _l(t,e,u+l,c,f,n)}:()=>Promise.resolve(),{when:a}=i;if(a){const[l,u]=a==="beforeChildren"?[o,s]:[s,o];return l().then(()=>u())}else return Promise.all([o(),s(n.delay)])}function _l(t,e,n=0,r=0,i=1,o){const s=[],a=(t.variantChildren.size-1)*r,l=i===1?(u=0)=>u*r:(u=0)=>a-u*r;return Array.from(t.variantChildren).sort(Nl).forEach((u,c)=>{u.notify("AnimationStart",e),s.push(zn(u,e,{...o,delay:n+l(c)}).then(()=>u.notify("AnimationComplete",e)))}),Promise.all(s)}function Nl(t,e){return t.sortNodePosition(e)}function $l(t,e,n={}){t.notify("AnimationStart",e);let r;if(Array.isArray(e)){const i=e.map(o=>zn(t,o,n));r=Promise.all(i)}else if(typeof e=="string")r=zn(t,e,n);else{const i=typeof e=="function"?Re(t,e,n.custom):e;r=Promise.all(_i(t,i,n))}return r.then(()=>t.notify("AnimationComplete",e))}const Wl=[...on].reverse(),zl=on.length;function Ul(t){return e=>Promise.all(e.map(({animation:n,options:r})=>$l(t,n,r)))}function Hl(t){let e=Ul(t);const n=Yl();let r=!0;const i=(l,u)=>{const c=Re(t,u);if(c){const{transition:f,transitionEnd:h,...p}=c;l={...l,...p,...h}}return l};function o(l){e=l(t)}function s(l,u){const c=t.getProps(),f=t.getVariantContext(!0)||{},h=[],p=new Set;let g={},x=1/0;for(let T=0;T<zl;T++){const P=Wl[T],b=n[P],C=c[P]!==void 0?c[P]:f[P],D=ne(C),R=P===u?b.isActive:null;R===!1&&(x=T);let F=C===f[P]&&C!==c[P]&&D;if(F&&r&&t.manuallyAnimateOnMount&&(F=!1),b.protectedKeys={...g},!b.isActive&&R===null||!C&&!b.prevProp||Ae(C)||typeof C=="boolean")continue;let k=Gl(b.prevProp,C)||P===u&&b.isActive&&!F&&D||T>x&&D,tt=!1;const jt=Array.isArray(C)?C:[C];let et=jt.reduce(i,{});R===!1&&(et={});const{prevResolvedValues:Y={}}=b,$={...Y,...et},at=H=>{k=!0,p.has(H)&&(tt=!0,p.delete(H)),b.needsAnimating[H]=!0};for(const H in $){const ut=et[H],Mt=Y[H];if(g.hasOwnProperty(H))continue;let gt=!1;Oe(ut)&&Oe(Mt)?gt=!ti(ut,Mt):gt=ut!==Mt,gt?ut!==void 0?at(H):p.add(H):ut!==void 0&&p.has(H)?at(H):b.protectedKeys[H]=!0}b.prevProp=C,b.prevResolvedValues=et,b.isActive&&(g={...g,...et}),r&&t.blockInitialAnimation&&(k=!1),k&&(!F||tt)&&h.push(...jt.map(H=>({animation:H,options:{type:P,...l}})))}if(p.size){const T={};p.forEach(P=>{const b=t.getBaseTarget(P);b!==void 0&&(T[P]=b)}),h.push({animation:T})}let S=!!h.length;return r&&(c.initial===!1||c.initial===c.animate)&&!t.manuallyAnimateOnMount&&(S=!1),r=!1,S?e(h):Promise.resolve()}function a(l,u,c){var f;if(n[l].isActive===u)return Promise.resolve();(f=t.variantChildren)===null||f===void 0||f.forEach(p=>{var g;return(g=p.animationState)===null||g===void 0?void 0:g.setActive(l,u)}),n[l].isActive=u;const h=s(c,l);for(const p in n)n[p].protectedKeys={};return h}return{animateChanges:s,setActive:a,setAnimateFunction:o,getState:()=>n}}function Gl(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!ti(e,t):!1}function Ft(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Yl(){return{animate:Ft(!0),whileInView:Ft(),whileHover:Ft(),whileTap:Ft(),whileDrag:Ft(),whileFocus:Ft(),exit:Ft()}}class Kl extends St{constructor(e){super(e),e.animationState||(e.animationState=Hl(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();this.unmount(),Ae(e)&&(this.unmount=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:n}=this.node.prevProps||{};e!==n&&this.updateAnimationControlsSubscription()}unmount(){}}let ql=0;class Xl extends St{constructor(){super(...arguments),this.id=ql++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:n,custom:r}=this.node.presenceContext,{isPresent:i}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===i)return;const o=this.node.animationState.setActive("exit",!e,{custom:r??this.node.getProps().custom});n&&!e&&o.then(()=>n(this.id))}mount(){const{register:e}=this.node.presenceContext||{};e&&(this.unmount=e(this.id))}unmount(){}}const Ni={animation:{Feature:Kl},exit:{Feature:Xl}},$i=(t,e)=>Math.abs(t-e);function Zl(t,e){const n=$i(t.x,e.x),r=$i(t.y,e.y);return Math.sqrt(n**2+r**2)}class Wi{constructor(e,n,{transformPagePoint:r,contextWindow:i,dragSnapToOrigin:o=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const f=Hn(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,p=Zl(f.offset,{x:0,y:0})>=3;if(!h&&!p)return;const{point:g}=f,{timestamp:x}=K;this.history.push({...g,timestamp:x});const{onStart:S,onMove:T}=this.handlers;h||(S&&S(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),T&&T(this.lastMoveEvent,f)},this.handlePointerMove=(f,h)=>{this.lastMoveEvent=f,this.lastMoveEventInfo=Un(h,this.transformPagePoint),_.update(this.updatePoint,!0)},this.handlePointerUp=(f,h)=>{this.end();const{onEnd:p,onSessionEnd:g,resumeAnimation:x}=this.handlers;if(this.dragSnapToOrigin&&x&&x(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const S=Hn(f.type==="pointercancel"?this.lastMoveEventInfo:Un(h,this.transformPagePoint),this.history);this.startEvent&&p&&p(f,S),g&&g(f,S)},!Hr(e))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=r,this.contextWindow=i||window;const s=Le(e),a=Un(s,this.transformPagePoint),{point:l}=a,{timestamp:u}=K;this.history=[{...l,timestamp:u}];const{onSessionStart:c}=n;c&&c(e,Hn(a,this.history)),this.removeListeners=pt(ht(this.contextWindow,"pointermove",this.handlePointerMove),ht(this.contextWindow,"pointerup",this.handlePointerUp),ht(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),ft(this.updatePoint)}}function Un(t,e){return e?{point:e(t.point)}:t}function zi(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Hn({point:t},e){return{point:t,delta:zi(t,Ui(e)),offset:zi(t,Jl(e)),velocity:Ql(e,.1)}}function Jl(t){return t[0]}function Ui(t){return t[t.length-1]}function Ql(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,r=null;const i=Ui(t);for(;n>=0&&(r=t[n],!(i.timestamp-r.timestamp>Tt(e)));)n--;if(!r)return{x:0,y:0};const o=mt(i.timestamp-r.timestamp);if(o===0)return{x:0,y:0};const s={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return s.x===1/0&&(s.x=0),s.y===1/0&&(s.y=0),s}function nt(t){return t.max-t.min}function Gn(t,e=0,n=.01){return Math.abs(t-e)<=n}function Hi(t,e,n,r=.5){t.origin=r,t.originPoint=N(e.min,e.max,t.origin),t.scale=nt(n)/nt(e),(Gn(t.scale,1,1e-4)||isNaN(t.scale))&&(t.scale=1),t.translate=N(n.min,n.max,t.origin)-t.originPoint,(Gn(t.translate)||isNaN(t.translate))&&(t.translate=0)}function pe(t,e,n,r){Hi(t.x,e.x,n.x,r?r.originX:void 0),Hi(t.y,e.y,n.y,r?r.originY:void 0)}function Gi(t,e,n){t.min=n.min+e.min,t.max=t.min+nt(e)}function tu(t,e,n){Gi(t.x,e.x,n.x),Gi(t.y,e.y,n.y)}function Yi(t,e,n){t.min=e.min-n.min,t.max=t.min+nt(e)}function me(t,e,n){Yi(t.x,e.x,n.x),Yi(t.y,e.y,n.y)}function eu(t,{min:e,max:n},r){return e!==void 0&&t<e?t=r?N(e,t,r.min):Math.max(t,e):n!==void 0&&t>n&&(t=r?N(n,t,r.max):Math.min(t,n)),t}function Ki(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 nu(t,{top:e,left:n,bottom:r,right:i}){return{x:Ki(t.x,n,i),y:Ki(t.y,e,r)}}function qi(t,e){let n=e.min-t.min,r=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,r]=[r,n]),{min:n,max:r}}function ru(t,e){return{x:qi(t.x,e.x),y:qi(t.y,e.y)}}function iu(t,e){let n=.5;const r=nt(t),i=nt(e);return i>r?n=de(e.min,e.max-r,t.min):r>i&&(n=de(t.min,t.max-i,e.min)),Pt(0,1,n)}function su(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 Yn=.35;function ou(t=Yn){return t===!1?t=0:t===!0&&(t=Yn),{x:Xi(t,"left","right"),y:Xi(t,"top","bottom")}}function Xi(t,e,n){return{min:Zi(t,e),max:Zi(t,n)}}function Zi(t,e){return typeof t=="number"?t:t[e]||0}const Ji=()=>({translate:0,scale:1,origin:0,originPoint:0}),Yt=()=>({x:Ji(),y:Ji()}),Qi=()=>({min:0,max:0}),z=()=>({x:Qi(),y:Qi()});function it(t){return[t("x"),t("y")]}function ts({top:t,left:e,right:n,bottom:r}){return{x:{min:e,max:n},y:{min:t,max:r}}}function au({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function lu(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),r=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Kn(t){return t===void 0||t===1}function qn({scale:t,scaleX:e,scaleY:n}){return!Kn(t)||!Kn(e)||!Kn(n)}function It(t){return qn(t)||es(t)||t.z||t.rotate||t.rotateX||t.rotateY}function es(t){return ns(t.x)||ns(t.y)}function ns(t){return t&&t!=="0%"}function We(t,e,n){const r=t-n,i=e*r;return n+i}function rs(t,e,n,r,i){return i!==void 0&&(t=We(t,i,r)),We(t,n,r)+e}function Xn(t,e=0,n=1,r,i){t.min=rs(t.min,e,n,r,i),t.max=rs(t.max,e,n,r,i)}function is(t,{x:e,y:n}){Xn(t.x,e.translate,e.scale,e.originPoint),Xn(t.y,n.translate,n.scale,n.originPoint)}function uu(t,e,n,r=!1){const i=n.length;if(!i)return;e.x=e.y=1;let o,s;for(let a=0;a<i;a++){o=n[a],s=o.projectionDelta;const l=o.instance;l&&l.style&&l.style.display==="contents"||(r&&o.options.layoutScroll&&o.scroll&&o!==o.root&&Kt(t,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),s&&(e.x*=s.x.scale,e.y*=s.y.scale,is(t,s)),r&&It(o.latestValues)&&Kt(t,o.latestValues))}e.x=ss(e.x),e.y=ss(e.y)}function ss(t){return Number.isInteger(t)||t>1.0000000000001||t<.999999999999?t:1}function At(t,e){t.min=t.min+e,t.max=t.max+e}function os(t,e,[n,r,i]){const o=e[i]!==void 0?e[i]:.5,s=N(t.min,t.max,o);Xn(t,e[n],e[r],s,e.scale)}const cu=["x","scaleX","originX"],fu=["y","scaleY","originY"];function Kt(t,e){os(t.x,e,cu),os(t.y,e,fu)}function as(t,e){return ts(lu(t.getBoundingClientRect(),e))}function du(t,e,n){const r=as(t,n),{scroll:i}=e;return i&&(At(r.x,i.offset.x),At(r.y,i.offset.y)),r}const ls=({current:t})=>t?t.ownerDocument.defaultView:null,hu=new WeakMap;class pu{constructor(e){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=z(),this.visualElement=e}start(e,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const i=c=>{const{dragSnapToOrigin:f}=this.getProps();f?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(Le(c,"page").point)},o=(c,f)=>{const{drag:h,dragPropagation:p,onDragStart:g}=this.getProps();if(h&&!p&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=qr(h),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),it(S=>{let T=this.getAxisMotionValue(S).get()||0;if(ct.test(T)){const{projection:P}=this.visualElement;if(P&&P.layout){const b=P.layout.layoutBox[S];b&&(T=nt(b)*(parseFloat(T)/100))}}this.originPoint[S]=T}),g&&_.update(()=>g(c,f),!1,!0);const{animationState:x}=this.visualElement;x&&x.setActive("whileDrag",!0)},s=(c,f)=>{const{dragPropagation:h,dragDirectionLock:p,onDirectionLock:g,onDrag:x}=this.getProps();if(!h&&!this.openGlobalLock)return;const{offset:S}=f;if(p&&this.currentDirection===null){this.currentDirection=mu(S),this.currentDirection!==null&&g&&g(this.currentDirection);return}this.updateAxis("x",f.point,S),this.updateAxis("y",f.point,S),this.visualElement.render(),x&&x(c,f)},a=(c,f)=>this.stop(c,f),l=()=>it(c=>{var f;return this.getAnimationState(c)==="paused"&&((f=this.getAxisMotionValue(c).animation)===null||f===void 0?void 0:f.play())}),{dragSnapToOrigin:u}=this.getProps();this.panSession=new Wi(e,{onSessionStart:i,onStart:o,onMove:s,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,contextWindow:ls(this.visualElement)})}stop(e,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:o}=this.getProps();o&&_.update(()=>o(e,n))}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:r}=this.getProps();!r&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(e,n,r){const{drag:i}=this.getProps();if(!r||!ze(e,i,this.currentDirection))return;const o=this.getAxisMotionValue(e);let s=this.originPoint[e]+r[e];this.constraints&&this.constraints[e]&&(s=eu(s,this.constraints[e],this.elastic[e])),o.set(s)}resolveConstraints(){var e;const{dragConstraints:n,dragElastic:r}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(e=this.visualElement.projection)===null||e===void 0?void 0:e.layout,o=this.constraints;n&&zt(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&i?this.constraints=nu(i.layoutBox,n):this.constraints=!1,this.elastic=ou(r),o!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&it(s=>{this.getAxisMotionValue(s)&&(this.constraints[s]=su(i.layoutBox[s],this.constraints[s]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!zt(e))return!1;const r=e.current;rt(r!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");const{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=du(r,i.root,this.visualElement.getTransformPagePoint());let s=ru(i.layout.layoutBox,o);if(n){const a=n(au(s));this.hasMutatedConstraints=!!a,a&&(s=ts(a))}return s}startAnimation(e){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:o,dragSnapToOrigin:s,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},u=it(c=>{if(!ze(c,n,this.currentDirection))return;let f=l&&l[c]||{};s&&(f={min:0,max:0});const h=i?200:1e6,p=i?40:1e7,g={type:"inertia",velocity:r?e[c]:0,bounceStiffness:h,bounceDamping:p,timeConstant:750,restDelta:1,restSpeed:10,...o,...f};return this.startAxisValueAnimation(c,g)});return Promise.all(u).then(a)}startAxisValueAnimation(e,n){const r=this.getAxisMotionValue(e);return r.start(Bn(e,r,0,n))}stopAnimation(){it(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){it(e=>{var n;return(n=this.getAxisMotionValue(e).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(e){var n;return(n=this.getAxisMotionValue(e).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(e){const n="_drag"+e.toUpperCase(),r=this.visualElement.getProps(),i=r[n];return i||this.visualElement.getValue(e,(r.initial?r.initial[e]:void 0)||0)}snapToCursor(e){it(n=>{const{drag:r}=this.getProps();if(!ze(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(n);if(i&&i.layout){const{min:s,max:a}=i.layout.layoutBox[n];o.set(e[n]-N(s,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!zt(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};it(s=>{const a=this.getAxisMotionValue(s);if(a){const l=a.get();i[s]=iu({min:l,max:l},this.constraints[s])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),it(s=>{if(!ze(s,e,null))return;const a=this.getAxisMotionValue(s),{min:l,max:u}=this.constraints[s];a.set(N(l,u,i[s]))})}addListeners(){if(!this.visualElement.current)return;hu.set(this.visualElement,this);const e=this.visualElement.current,n=ht(e,"pointerdown",l=>{const{drag:u,dragListener:c=!0}=this.getProps();u&&c&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();zt(l)&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,o=i.addEventListener("measure",r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),r();const s=dt(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&(it(c=>{const f=this.getAxisMotionValue(c);f&&(this.originPoint[c]+=l[c].translate,f.set(f.get()+l[c].translate))}),this.visualElement.render())});return()=>{s(),n(),o(),a&&a()}}getProps(){const e=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:s=Yn,dragMomentum:a=!0}=e;return{...e,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:o,dragElastic:s,dragMomentum:a}}}function ze(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function mu(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class gu extends St{constructor(e){super(e),this.removeGroupControls=W,this.removeListeners=W,this.controls=new pu(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||W}unmount(){this.removeGroupControls(),this.removeListeners()}}const us=t=>(e,n)=>{t&&_.update(()=>t(e,n))};class yu extends St{constructor(){super(...arguments),this.removePointerDownListener=W}onPointerDown(e){this.session=new Wi(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:ls(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:us(e),onStart:us(n),onMove:r,onEnd:(o,s)=>{delete this.session,i&&_.update(()=>i(o,s))}}}mount(){this.removePointerDownListener=ht(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}function xu(){const t=m.useContext(Se);if(t===null)return[!0,null];const{isPresent:e,onExitComplete:n,register:r}=t,i=m.useId();return m.useEffect(()=>r(i),[]),!e&&n?[!1,()=>n&&n(i)]:[!0]}const Ue={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function cs(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const ge={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(A.test(t))t=parseFloat(t);else return t;const n=cs(t,e.target.x),r=cs(t,e.target.y);return`${n}% ${r}%`}},vu={correct:(t,{treeScale:e,projectionDelta:n})=>{const r=t,i=Ct.parse(t);if(i.length>5)return r;const o=Ct.createTransformer(t),s=typeof i[0]!="number"?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;i[0+s]/=a,i[1+s]/=l;const u=N(a,l,.5);return typeof i[2+s]=="number"&&(i[2+s]/=u),typeof i[3+s]=="number"&&(i[3+s]/=u),o(i)}};class bu extends m.Component{componentDidMount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:o}=e;Do(Pu),o&&(n.group&&n.group.add(o),r&&r.register&&i&&r.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),Ue.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:n,visualElement:r,drag:i,isPresent:o}=this.props,s=r.projection;return s&&(s.isPresent=o,i||e.layoutDependency!==n||n===void 0?s.willUpdate():this.safeToRemove(),e.isPresent!==o&&(o?s.promote():s.relegate()||_.postRender(()=>{const a=s.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),sn.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=e;i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),r&&r.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function fs(t){const[e,n]=xu(),r=m.useContext(un);return m.createElement(bu,{...t,layoutGroup:r,switchLayoutGroup:m.useContext(Vr),isPresent:e,safeToRemove:n})}const Pu={borderRadius:{...ge,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:ge,borderTopRightRadius:ge,borderBottomLeftRadius:ge,borderBottomRightRadius:ge,boxShadow:vu},ds=["TopLeft","TopRight","BottomLeft","BottomRight"],wu=ds.length,hs=t=>typeof t=="string"?parseFloat(t):t,ps=t=>typeof t=="number"||A.test(t);function Su(t,e,n,r,i,o){i?(t.opacity=N(0,n.opacity!==void 0?n.opacity:1,Tu(r)),t.opacityExit=N(e.opacity!==void 0?e.opacity:1,0,Cu(r))):o&&(t.opacity=N(e.opacity!==void 0?e.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let s=0;s<wu;s++){const a=`border${ds[s]}Radius`;let l=ms(e,a),u=ms(n,a);if(l===void 0&&u===void 0)continue;l||(l=0),u||(u=0),l===0||u===0||ps(l)===ps(u)?(t[a]=Math.max(N(hs(l),hs(u),r),0),(ct.test(u)||ct.test(l))&&(t[a]+="%")):t[a]=u}(e.rotate||n.rotate)&&(t.rotate=N(e.rotate||0,n.rotate||0,r))}function ms(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const Tu=gs(0,.5,ui),Cu=gs(.5,.95,W);function gs(t,e,n){return r=>r<t?0:r>e?1:n(de(t,e,r))}function ys(t,e){t.min=e.min,t.max=e.max}function st(t,e){ys(t.x,e.x),ys(t.y,e.y)}function xs(t,e,n,r,i){return t-=e,t=We(t,1/n,r),i!==void 0&&(t=We(t,1/i,r)),t}function Au(t,e=0,n=1,r=.5,i,o=t,s=t){if(ct.test(e)&&(e=parseFloat(e),e=N(s.min,s.max,e/100)-s.min),typeof e!="number")return;let a=N(o.min,o.max,r);t===o&&(a-=e),t.min=xs(t.min,e,n,a,i),t.max=xs(t.max,e,n,a,i)}function vs(t,e,[n,r,i],o,s){Au(t,e[n],e[r],e[i],e.scale,o,s)}const Vu=["x","scaleX","originX"],Eu=["y","scaleY","originY"];function bs(t,e,n,r){vs(t.x,e,Vu,n?n.x:void 0,r?r.x:void 0),vs(t.y,e,Eu,n?n.y:void 0,r?r.y:void 0)}function Ps(t){return t.translate===0&&t.scale===1}function ws(t){return Ps(t.x)&&Ps(t.y)}function Du(t,e){return t.x.min===e.x.min&&t.x.max===e.x.max&&t.y.min===e.y.min&&t.y.max===e.y.max}function Ss(t,e){return Math.round(t.x.min)===Math.round(e.x.min)&&Math.round(t.x.max)===Math.round(e.x.max)&&Math.round(t.y.min)===Math.round(e.y.min)&&Math.round(t.y.max)===Math.round(e.y.max)}function Ts(t){return nt(t.x)/nt(t.y)}class ju{constructor(){this.members=[]}add(e){_n(this.members,e),e.scheduleRender()}remove(e){if(Nn(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 r;for(let i=n;i>=0;i--){const o=this.members[i];if(o.isPresent!==!1){r=o;break}}return r?(this.promote(r),!0):!1}promote(e,n){const r=this.lead;if(e!==r&&(this.prevLead=r,this.lead=e,e.show(),r)){r.instance&&r.scheduleRender(),e.scheduleRender(),e.resumeFrom=r,n&&(e.resumeFrom.preserveOpacity=!0),r.snapshot&&(e.snapshot=r.snapshot,e.snapshot.latestValues=r.animationValues||r.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:i}=e.options;i===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(e=>{const{options:n,resumingFrom:r}=e;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function Cs(t,e,n){let r="";const i=t.x.translate/e.x,o=t.y.translate/e.y;if((i||o)&&(r=`translate3d(${i}px, ${o}px, 0) `),(e.x!==1||e.y!==1)&&(r+=`scale(${1/e.x}, ${1/e.y}) `),n){const{rotate:l,rotateX:u,rotateY:c}=n;l&&(r+=`rotate(${l}deg) `),u&&(r+=`rotateX(${u}deg) `),c&&(r+=`rotateY(${c}deg) `)}const s=t.x.scale*e.x,a=t.y.scale*e.y;return(s!==1||a!==1)&&(r+=`scale(${s}, ${a})`),r||"none"}const Mu=(t,e)=>t.depth-e.depth;class Ou{constructor(){this.children=[],this.isDirty=!1}add(e){_n(this.children,e),this.isDirty=!0}remove(e){Nn(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(Mu),this.isDirty=!1,this.children.forEach(e)}}function ku(t,e){const n=Rt.now(),r=({timestamp:i})=>{const o=i-n;o>=e&&(ft(r),t(o-e))};return _.read(r,!0),()=>ft(r)}function Lu(t){window.MotionDebug&&window.MotionDebug.record(t)}function Ru(t){return t instanceof SVGElement&&t.tagName!=="svg"}function Fu(t,e,n){const r=Q(t)?t:Gt(t);return r.start(Bn("",r,e,n)),r.animation}const As=["","X","Y","Z"],Iu={visibility:"hidden"},Vs=1e3;let Bu=0;const Bt={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0};function Es({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(s={},a=e==null?void 0:e()){this.id=Bu++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,Bt.totalNodes=Bt.resolvedTargetDeltas=Bt.recalculatedProjection=0,this.nodes.forEach($u),this.nodes.forEach(Gu),this.nodes.forEach(Yu),this.nodes.forEach(Wu),Lu(Bt)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=s,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 Ou)}addEventListener(s,a){return this.eventHandlers.has(s)||this.eventHandlers.set(s,new $n),this.eventHandlers.get(s).add(a)}notifyListeners(s,...a){const l=this.eventHandlers.get(s);l&&l.notify(...a)}hasListeners(s){return this.eventHandlers.has(s)}mount(s,a=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=Ru(s),this.instance=s;const{layoutId:l,layout:u,visualElement:c}=this.options;if(c&&!c.current&&c.mount(s),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),a&&(u||l)&&(this.isLayoutDirty=!0),t){let f;const h=()=>this.root.updateBlockedByResize=!1;t(s,()=>{this.root.updateBlockedByResize=!0,f&&f(),f=ku(h,250),Ue.hasAnimatedSinceResize&&(Ue.hasAnimatedSinceResize=!1,this.nodes.forEach(js))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&c&&(l||u)&&this.addEventListener("didUpdate",({delta:f,hasLayoutChanged:h,hasRelativeTargetChanged:p,layout:g})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const x=this.options.transition||c.getDefaultTransition()||Ju,{onLayoutAnimationStart:S,onLayoutAnimationComplete:T}=c.getProps(),P=!this.targetLayout||!Ss(this.targetLayout,g)||p,b=!h&&p;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||b||h&&(P||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(f,b);const C={...In(x,"layout"),onPlay:S,onComplete:T};(c.shouldReduceMotion||this.options.layoutRoot)&&(C.delay=0,C.type=!1),this.startAnimation(C)}else h||js(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=g})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const s=this.getStack();s&&s.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,ft(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(Ku),this.animationId++)}getTransformTemplate(){const{visualElement:s}=this.options;return s&&s.getProps().transformTemplate}willUpdate(s=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let 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(),s&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Ds);return}this.isUpdating||this.nodes.forEach(Uu),this.isUpdating=!1,window.HandoffCancelAllAnimations&&window.HandoffCancelAllAnimations(),this.nodes.forEach(Hu),this.nodes.forEach(_u),this.nodes.forEach(Nu),this.clearAllSnapshots();const a=Rt.now();K.delta=Pt(0,1e3/60,a-K.timestamp),K.timestamp=a,K.isProcessing=!0,vn.update.process(K),vn.preRender.process(K),vn.render.process(K),K.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,sn.read(()=>this.update()))}clearAllSnapshots(){this.nodes.forEach(zu),this.sharedNodes.forEach(qu)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,_.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){_.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}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 s=this.layout;this.layout=this.measure(!1),this.layoutCorrected=z(),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,s?s.layoutBox:void 0)}updateScroll(s="measure"){let a=!!(this.options.layoutScroll&&this.instance);this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===s&&(a=!1),a&&(this.scroll={animationId:this.root.animationId,phase:s,isRoot:r(this.instance),offset:n(this.instance)})}resetTransform(){if(!i)return;const s=this.isLayoutDirty||this.shouldResetTransform,a=this.projectionDelta&&!ws(this.projectionDelta),l=this.getTransformTemplate(),u=l?l(this.latestValues,""):void 0,c=u!==this.prevTransformTemplateValue;s&&(a||It(this.latestValues)||c)&&(i(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(s=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return s&&(l=this.removeTransform(l)),Qu(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:s}=this.options;if(!s)return z();const a=s.measureViewportBox(),{scroll:l}=this.root;return l&&(At(a.x,l.offset.x),At(a.y,l.offset.y)),a}removeElementScroll(s){const a=z();st(a,s);for(let l=0;l<this.path.length;l++){const u=this.path[l],{scroll:c,options:f}=u;if(u!==this.root&&c&&f.layoutScroll){if(c.isRoot){st(a,s);const{scroll:h}=this.root;h&&(At(a.x,-h.offset.x),At(a.y,-h.offset.y))}At(a.x,c.offset.x),At(a.y,c.offset.y)}}return a}applyTransform(s,a=!1){const l=z();st(l,s);for(let u=0;u<this.path.length;u++){const c=this.path[u];!a&&c.options.layoutScroll&&c.scroll&&c!==c.root&&Kt(l,{x:-c.scroll.offset.x,y:-c.scroll.offset.y}),It(c.latestValues)&&Kt(l,c.latestValues)}return It(this.latestValues)&&Kt(l,this.latestValues),l}removeTransform(s){const a=z();st(a,s);for(let l=0;l<this.path.length;l++){const u=this.path[l];if(!u.instance||!It(u.latestValues))continue;qn(u.latestValues)&&u.updateSnapshot();const c=z(),f=u.measurePageBox();st(c,f),bs(a,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,c)}return It(this.latestValues)&&bs(a,this.latestValues),a}setTargetDelta(s){this.targetDelta=s,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(s){this.options={...this.options,...s,crossfade:s.crossfade!==void 0?s.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(s=!1){var a;const l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);const u=!!this.resumingFrom||this!==l;if(!(s||u&&this.isSharedProjectionDirty||this.isProjectionDirty||!((a=this.parent)===null||a===void 0)&&a.isProjectionDirty||this.attemptToResolveRelativeTarget))return;const{layout:f,layoutId:h}=this.options;if(!(!this.layout||!(f||h))){if(this.resolvedRelativeTargetAt=K.timestamp,!this.targetDelta&&!this.relativeTarget){const p=this.getClosestProjectingParent();p&&p.layout&&this.animationProgress!==1?(this.relativeParent=p,this.forceRelativeParentToResolveTarget(),this.relativeTarget=z(),this.relativeTargetOrigin=z(),me(this.relativeTargetOrigin,this.layout.layoutBox,p.layout.layoutBox),st(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=z(),this.targetWithTransforms=z()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),tu(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):st(this.target,this.layout.layoutBox),is(this.target,this.targetDelta)):st(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const p=this.getClosestProjectingParent();p&&!!p.resumingFrom==!!this.resumingFrom&&!p.options.layoutScroll&&p.target&&this.animationProgress!==1?(this.relativeParent=p,this.forceRelativeParentToResolveTarget(),this.relativeTarget=z(),this.relativeTargetOrigin=z(),me(this.relativeTargetOrigin,this.target,p.target),st(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}Bt.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||qn(this.parent.latestValues)||es(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var s;const a=this.getLead(),l=!!this.resumingFrom||this!==a;let u=!0;if((this.isProjectionDirty||!((s=this.parent)===null||s===void 0)&&s.isProjectionDirty)&&(u=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(u=!1),this.resolvedRelativeTargetAt===K.timestamp&&(u=!1),u)return;const{layout:c,layoutId:f}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(c||f))return;st(this.layoutCorrected,this.layout.layoutBox);const h=this.treeScale.x,p=this.treeScale.y;uu(this.layoutCorrected,this.treeScale,this.path,l),a.layout&&!a.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(a.target=a.layout.layoutBox,a.targetWithTransforms=z());const{target:g}=a;if(!g){this.projectionTransform&&(this.projectionDelta=Yt(),this.projectionTransform="none",this.scheduleRender());return}this.projectionDelta||(this.projectionDelta=Yt(),this.projectionDeltaWithTransform=Yt());const x=this.projectionTransform;pe(this.projectionDelta,this.layoutCorrected,g,this.latestValues),this.projectionTransform=Cs(this.projectionDelta,this.treeScale),(this.projectionTransform!==x||this.treeScale.x!==h||this.treeScale.y!==p)&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",g)),Bt.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(s=!0){if(this.options.scheduleRender&&this.options.scheduleRender(),s){const a=this.getStack();a&&a.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}setAnimationOrigin(s,a=!1){const l=this.snapshot,u=l?l.latestValues:{},c={...this.latestValues},f=Yt();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const h=z(),p=l?l.source:void 0,g=this.layout?this.layout.source:void 0,x=p!==g,S=this.getStack(),T=!S||S.members.length<=1,P=!!(x&&!T&&this.options.crossfade===!0&&!this.path.some(Zu));this.animationProgress=0;let b;this.mixTargetDelta=C=>{const D=C/1e3;Ms(f.x,s.x,D),Ms(f.y,s.y,D),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(me(h,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Xu(this.relativeTarget,this.relativeTargetOrigin,h,D),b&&Du(this.relativeTarget,b)&&(this.isProjectionDirty=!1),b||(b=z()),st(b,this.relativeTarget)),x&&(this.animationValues=c,Su(c,u,this.latestValues,D,P,T)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=D},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(s){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(ft(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=_.update(()=>{Ue.hasAnimatedSinceResize=!0,this.currentAnimation=Fu(0,Vs,{...s,onUpdate:a=>{this.mixTargetDelta(a),s.onUpdate&&s.onUpdate(a)},onComplete:()=>{s.onComplete&&s.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 s=this.getStack();s&&s.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Vs),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const s=this.getLead();let{targetWithTransforms:a,target:l,layout:u,latestValues:c}=s;if(!(!a||!l||!u)){if(this!==s&&this.layout&&u&&Fs(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||z();const f=nt(this.layout.layoutBox.x);l.x.min=s.target.x.min,l.x.max=l.x.min+f;const h=nt(this.layout.layoutBox.y);l.y.min=s.target.y.min,l.y.max=l.y.min+h}st(a,l),Kt(a,c),pe(this.projectionDeltaWithTransform,this.layoutCorrected,a,c)}}registerSharedNode(s,a){this.sharedNodes.has(s)||this.sharedNodes.set(s,new ju),this.sharedNodes.get(s).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 s=this.getStack();return s?s.lead===this:!0}getLead(){var s;const{layoutId:a}=this.options;return a?((s=this.getStack())===null||s===void 0?void 0:s.lead)||this:this}getPrevLead(){var s;const{layoutId:a}=this.options;return a?(s=this.getStack())===null||s===void 0?void 0:s.prevLead:void 0}getStack(){const{layoutId:s}=this.options;if(s)return this.root.sharedNodes.get(s)}promote({needsReset:s,transition:a,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),s&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const s=this.getStack();return s?s.relegate(this):!1}resetRotation(){const{visualElement:s}=this.options;if(!s)return;let a=!1;const{latestValues:l}=s;if((l.rotate||l.rotateX||l.rotateY||l.rotateZ)&&(a=!0),!a)return;const u={};for(let c=0;c<As.length;c++){const f="rotate"+As[c];l[f]&&(u[f]=l[f],s.setStaticValue(f,0))}s.render();for(const c in u)s.setStaticValue(c,u[c]);s.scheduleRender()}getProjectionStyles(s){var a,l;if(!this.instance||this.isSVG)return;if(!this.isVisible)return Iu;const u={visibility:""},c=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,u.opacity="",u.pointerEvents=ke(s==null?void 0:s.pointerEvents)||"",u.transform=c?c(this.latestValues,""):"none",u;const f=this.getLead();if(!this.projectionDelta||!this.layout||!f.target){const x={};return this.options.layoutId&&(x.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,x.pointerEvents=ke(s==null?void 0:s.pointerEvents)||""),this.hasProjected&&!It(this.latestValues)&&(x.transform=c?c({},""):"none",this.hasProjected=!1),x}const h=f.animationValues||f.latestValues;this.applyTransformsToTarget(),u.transform=Cs(this.projectionDeltaWithTransform,this.treeScale,h),c&&(u.transform=c(h,u.transform));const{x:p,y:g}=this.projectionDelta;u.transformOrigin=`${p.origin*100}% ${g.origin*100}% 0`,f.animationValues?u.opacity=f===this?(l=(a=h.opacity)!==null&&a!==void 0?a:this.latestValues.opacity)!==null&&l!==void 0?l:1:this.preserveOpacity?this.latestValues.opacity:h.opacityExit:u.opacity=f===this?h.opacity!==void 0?h.opacity:"":h.opacityExit!==void 0?h.opacityExit:0;for(const x in Ee){if(h[x]===void 0)continue;const{correct:S,applyTo:T}=Ee[x],P=u.transform==="none"?h[x]:S(h[x],f);if(T){const b=T.length;for(let C=0;C<b;C++)u[T[C]]=P}else u[x]=P}return this.options.layoutId&&(u.pointerEvents=f===this?ke(s==null?void 0:s.pointerEvents)||"":"none"),u}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(s=>{var a;return(a=s.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(Ds),this.root.sharedNodes.clear()}}}function _u(t){t.updateLayout()}function Nu(t){var e;const n=((e=t.resumeFrom)===null||e===void 0?void 0:e.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&n&&t.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:i}=t.layout,{animationType:o}=t.options,s=n.source!==t.layout.source;o==="size"?it(f=>{const h=s?n.measuredBox[f]:n.layoutBox[f],p=nt(h);h.min=r[f].min,h.max=h.min+p}):Fs(o,n.layoutBox,r)&&it(f=>{const h=s?n.measuredBox[f]:n.layoutBox[f],p=nt(r[f]);h.max=h.min+p,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[f].max=t.relativeTarget[f].min+p)});const a=Yt();pe(a,r,n.layoutBox);const l=Yt();s?pe(l,t.applyTransform(i,!0),n.measuredBox):pe(l,r,n.layoutBox);const u=!ws(a);let c=!1;if(!t.resumeFrom){const f=t.getClosestProjectingParent();if(f&&!f.resumeFrom){const{snapshot:h,layout:p}=f;if(h&&p){const g=z();me(g,n.layoutBox,h.layoutBox);const x=z();me(x,r,p.layoutBox),Ss(g,x)||(c=!0),f.options.layoutRoot&&(t.relativeTarget=x,t.relativeTargetOrigin=g,t.relativeParent=f)}}}t.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:l,layoutDelta:a,hasLayoutChanged:u,hasRelativeTargetChanged:c})}else if(t.isLead()){const{onExitComplete:r}=t.options;r&&r()}t.options.transition=void 0}function $u(t){Bt.totalNodes++,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 Wu(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function zu(t){t.clearSnapshot()}function Ds(t){t.clearMeasurements()}function Uu(t){t.isLayoutDirty=!1}function Hu(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function js(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function Gu(t){t.resolveTargetDelta()}function Yu(t){t.calcProjection()}function Ku(t){t.resetRotation()}function qu(t){t.removeLeadSnapshot()}function Ms(t,e,n){t.translate=N(e.translate,0,n),t.scale=N(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function Os(t,e,n,r){t.min=N(e.min,n.min,r),t.max=N(e.max,n.max,r)}function Xu(t,e,n,r){Os(t.x,e.x,n.x,r),Os(t.y,e.y,n.y,r)}function Zu(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const Ju={duration:.45,ease:[.4,0,.1,1]},ks=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),Ls=ks("applewebkit/")&&!ks("chrome/")?Math.round:W;function Rs(t){t.min=Ls(t.min),t.max=Ls(t.max)}function Qu(t){Rs(t.x),Rs(t.y)}function Fs(t,e,n){return t==="position"||t==="preserve-aspect"&&!Gn(Ts(e),Ts(n),.2)}const tc=Es({attachResizeListener:(t,e)=>dt(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Zn={current:void 0},Is=Es({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!Zn.current){const t=new tc({});t.mount(window),t.setOptions({layoutScroll:!0}),Zn.current=t}return Zn.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),ec={pan:{Feature:yu},drag:{Feature:gu,ProjectionNode:Is,MeasureLayout:fs}},nc=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function rc(t){const e=nc.exec(t);if(!e)return[,];const[,n,r]=e;return[n,r]}const ic=4;function Jn(t,e,n=1){rt(n<=ic,`Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`);const[r,i]=rc(t);if(!r)return;const o=window.getComputedStyle(e).getPropertyValue(r);if(o){const s=o.trim();return Li(s)?parseFloat(s):s}else return De(i)?Jn(i,e,n+1):i}function sc(t,{...e},n){const r=t.current;if(!(r instanceof Element))return{target:e,transitionEnd:n};n&&(n={...n}),t.values.forEach(i=>{const o=i.get();if(!De(o))return;const s=Jn(o,r);s&&i.set(s)});for(const i in e){const o=e[i];if(!De(o))continue;const s=Jn(o,r);s&&(e[i]=s,n||(n={}),n[i]===void 0&&(n[i]=o))}return{target:e,transitionEnd:n}}const oc=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),Bs=t=>oc.has(t),ac=t=>Object.keys(t).some(Bs),He=t=>t===Ut||t===A,_s=(t,e)=>parseFloat(t.split(", ")[e]),Ns=(t,e)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const i=r.match(/^matrix3d\((.+)\)$/);if(i)return _s(i[1],e);{const o=r.match(/^matrix\((.+)\)$/);return o?_s(o[1],t):0}},lc=new Set(["x","y","z"]),uc=ie.filter(t=>!lc.has(t));function cc(t){const e=[];return uc.forEach(n=>{const r=t.getValue(n);r!==void 0&&(e.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),e.length&&t.render(),e}const qt={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:Ns(4,13),y:Ns(5,14)};qt.translateX=qt.x,qt.translateY=qt.y;const fc=(t,e,n)=>{const r=e.measureViewportBox(),i=e.current,o=getComputedStyle(i),{display:s}=o,a={};s==="none"&&e.setStaticValue("display",t.display||"block"),n.forEach(u=>{a[u]=qt[u](r,o)}),e.render();const l=e.measureViewportBox();return n.forEach(u=>{const c=e.getValue(u);c&&c.jump(a[u]),t[u]=qt[u](l,o)}),t},dc=(t,e,n={},r={})=>{e={...e},r={...r};const i=Object.keys(e).filter(Bs);let o=[],s=!1;const a=[];if(i.forEach(l=>{const u=t.getValue(l);if(!t.hasValue(l))return;let c=n[l],f=he(c);const h=e[l];let p;if(Oe(h)){const g=h.length,x=h[0]===null?1:0;c=h[x],f=he(c);for(let S=x;S<g&&h[S]!==null;S++)p?rt(he(h[S])===p,"All keyframes must be of the same type"):(p=he(h[S]),rt(p===f||He(f)&&He(p),"Keyframes must be of the same dimension as the current value"))}else p=he(h);if(f!==p)if(He(f)&&He(p)){const g=u.get();typeof g=="string"&&u.set(parseFloat(g)),typeof h=="string"?e[l]=parseFloat(h):Array.isArray(h)&&p===A&&(e[l]=h.map(parseFloat))}else f!=null&&f.transform&&(p!=null&&p.transform)&&(c===0||h===0)?c===0?u.set(p.transform(c)):e[l]=f.transform(h):(s||(o=cc(t),s=!0),a.push(l),r[l]=r[l]!==void 0?r[l]:e[l],u.jump(h))}),a.length){const l=a.indexOf("height")>=0?window.pageYOffset:null,u=fc(e,t,a);return o.length&&o.forEach(([c,f])=>{t.getValue(c).set(f)}),t.render(),Te&&l!==null&&window.scrollTo({top:l}),{target:u,transitionEnd:r}}else return{target:e,transitionEnd:r}};function hc(t,e,n,r){return ac(e)?dc(t,e,n,r):{target:e,transitionEnd:r}}const pc=(t,e,n,r)=>{const i=sc(t,e,r);return e=i.target,r=i.transitionEnd,hc(t,e,n,r)},Qn={current:null},$s={current:!1};function mc(){if($s.current=!0,!!Te)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Qn.current=t.matches;t.addListener(e),e()}else Qn.current=!1}function gc(t,e,n){const{willChange:r}=e;for(const i in e){const o=e[i],s=n[i];if(Q(o))t.addValue(i,o),$e(r)&&r.add(i),process.env.NODE_ENV==="development"&&Wn(o.version==="11.0.8",`Attempting to mix Framer Motion versions ${o.version} with 11.0.8 may not work as expected.`);else if(Q(s))t.addValue(i,Gt(o,{owner:t})),$e(r)&&r.remove(i);else if(s!==o)if(t.hasValue(i)){const a=t.getValue(i);!a.hasAnimated&&a.set(o)}else{const a=t.getStaticValue(i);t.addValue(i,Gt(a!==void 0?a:o,{owner:t}))}}for(const i in n)e[i]===void 0&&t.removeValue(i);return e}const Ws=new WeakMap,zs=Object.keys(re),yc=zs.length,Us=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],xc=an.length;class vc{constructor({parent:e,props:n,presenceContext:r,reducedMotionConfig:i,visualState:o},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.scheduleRender=()=>_.render(this.render,!1,!0);const{latestValues:a,renderState:l}=o;this.latestValues=a,this.baseTarget={...a},this.initialValues=n.initial?{...a}:{},this.renderState=l,this.parent=e,this.props=n,this.presenceContext=r,this.depth=e?e.depth+1:0,this.reducedMotionConfig=i,this.options=s,this.isControllingVariants=Ve(n),this.isVariantNode=Tr(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:u,...c}=this.scrapeMotionValuesFromProps(n,{});for(const f in c){const h=c[f];a[f]!==void 0&&Q(h)&&(h.set(a[f],!1),$e(u)&&u.add(f))}}scrapeMotionValuesFromProps(e,n){return{}}mount(e){this.current=e,Ws.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,r)=>this.bindToMotionValue(r,n)),$s.current||mc(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Qn.current,process.env.NODE_ENV!=="production"&&Wn(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected."),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){Ws.delete(this.current),this.projection&&this.projection.unmount(),ft(this.notifyUpdate),ft(this.render),this.valueSubscriptions.forEach(e=>e()),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const e in this.events)this.events[e].clear();for(const e in this.features)this.features[e].unmount();this.current=null}bindToMotionValue(e,n){const r=kt.has(e),i=n.on("change",s=>{this.latestValues[e]=s,this.props.onUpdate&&_.update(this.notifyUpdate,!1,!0),r&&this.projection&&(this.projection.isTransformDirty=!0)}),o=n.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(e,()=>{i(),o()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}loadFeatures({children:e,...n},r,i,o){let s,a;if(process.env.NODE_ENV!=="production"&&i&&r){const l="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";n.ignoreStrict?ue(!1,l):rt(!1,l)}for(let l=0;l<yc;l++){const u=zs[l],{isEnabled:c,Feature:f,ProjectionNode:h,MeasureLayout:p}=re[u];h&&(s=h),c(n)&&(!this.features[u]&&f&&(this.features[u]=new f(this)),p&&(a=p))}if((this.type==="html"||this.type==="svg")&&!this.projection&&s){this.projection=new s(this.latestValues,this.parent&&this.parent.projection);const{layoutId:l,layout:u,drag:c,dragConstraints:f,layoutScroll:h,layoutRoot:p}=n;this.projection.setOptions({layoutId:l,layout:u,alwaysMeasureLayout:!!c||f&&zt(f),visualElement:this,scheduleRender:()=>this.scheduleRender(),animationType:typeof u=="string"?u:"both",initialPromotionConfig:o,layoutScroll:h,layoutRoot:p})}return a}updateFeatures(){for(const e in this.features){const n=this.features[e];n.isMounted?n.update():(n.mount(),n.isMounted=!0)}}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):z()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,n){this.latestValues[e]=n}makeTargetAnimatable(e,n=!0){return this.makeTargetAnimatableFromInstance(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 r=0;r<Us.length;r++){const i=Us[r];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const o=e["on"+i];o&&(this.propEventSubscriptions[i]=this.on(i,o))}this.prevMotionValues=gc(this,this.scrapeMotionValuesFromProps(e,this.prevProps),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}getVariantContext(e=!1){if(e)return this.parent?this.parent.getVariantContext():void 0;if(!this.isControllingVariants){const r=this.parent?this.parent.getVariantContext()||{}:{};return this.props.initial!==void 0&&(r.initial=this.props.initial),r}const n={};for(let r=0;r<xc;r++){const i=an[r],o=this.props[i];(ne(o)||o===!1)&&(n[i]=o)}return n}addVariantChild(e){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(e),()=>n.variantChildren.delete(e)}addValue(e,n){n!==this.values.get(e)&&(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 r=this.values.get(e);return r===void 0&&n!==void 0&&(r=Gt(n,{owner:this}),this.addValue(e,r)),r}readValue(e){var n;return this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:(n=this.getBaseTargetFromProps(this.props,e))!==null&&n!==void 0?n:this.readValueFromInstance(this.current,e,this.options)}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){var n;const{initial:r}=this.props,i=typeof r=="string"||typeof r=="object"?(n=yn(this.props,r))===null||n===void 0?void 0:n[e]:void 0;if(r&&i!==void 0)return i;const o=this.getBaseTargetFromProps(this.props,e);return o!==void 0&&!Q(o)?o:this.initialValues[e]!==void 0&&i===void 0?void 0:this.baseTarget[e]}on(e,n){return this.events[e]||(this.events[e]=new $n),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}}class Hs extends vc{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:r}){delete n[e],delete r[e]}makeTargetAnimatableFromInstance({transition:e,transitionEnd:n,...r},i){const o=Fl(r,e||{},this);if(i){Ll(this,r,o);const s=pc(this,r,o,n);n=s.transitionEnd,r=s.target}return{transition:e,transitionEnd:n,...r}}}function bc(t){return window.getComputedStyle(t)}class Pc extends Hs{constructor(){super(...arguments),this.type="html"}readValueFromInstance(e,n){if(kt.has(n)){const r=Fn(n);return r&&r.default||0}else{const r=bc(e),i=(Mr(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(e,{transformPagePoint:n}){return as(e,n)}build(e,n,r,i){dn(e,n,r,i.transformTemplate)}scrapeMotionValuesFromProps(e,n){return gn(e,n)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;Q(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}renderInstance(e,n,r,i){_r(e,n,r,i)}}class wc extends Hs{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(kt.has(n)){const r=Fn(n);return r&&r.default||0}return n=Nr.has(n)?n:rn(n),e.getAttribute(n)}measureInstanceViewportBox(){return z()}scrapeMotionValuesFromProps(e,n){return Wr(e,n)}build(e,n,r,i){pn(e,n,r,this.isSVGTag,i.transformTemplate)}renderInstance(e,n,r,i){$r(e,n,r,i)}mount(e){this.isSVGTag=mn(e.tagName),super.mount(e)}}const Gs=(t,e)=>cn(t)?new wc(e,{enableHardwareAcceleration:!1}):new Pc(e,{enableHardwareAcceleration:!0}),Sc={...Ni,...Qr,...ec,...{layout:{ProjectionNode:Is,MeasureLayout:fs}}},Tc=Er((t,e)=>Ur(t,e,Sc,Gs)),_t=Er(Ur);function Ys(){const t=m.useRef(!1);return en(()=>(t.current=!0,()=>{t.current=!1}),[]),t}function Cc(){const t=Ys(),[e,n]=m.useState(0),r=m.useCallback(()=>{t.current&&n(e+1)},[e]);return[m.useCallback(()=>_.postRender(r),[r]),e]}class Ac extends q.Component{getSnapshotBeforeUpdate(e){const n=this.props.childRef.current;if(n&&e.isPresent&&!this.props.isPresent){const r=this.props.sizeRef.current;r.height=n.offsetHeight||0,r.width=n.offsetWidth||0,r.top=n.offsetTop,r.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function Vc({children:t,isPresent:e}){const n=m.useId(),r=m.useRef(null),i=m.useRef({width:0,height:0,top:0,left:0});return m.useInsertionEffect(()=>{const{width:o,height:s,top:a,left:l}=i.current;if(e||!r.current||!o||!s)return;r.current.dataset.motionPopId=n;const u=document.createElement("style");return document.head.appendChild(u),u.sheet&&u.sheet.insertRule(`
|
|
27
|
+
Check the top-level render call using <`+w+">.")}return x}}function lo(d,x){{if(!d._store||d._store.validated||d.key!=null)return;d._store.validated=!0;var w=vd(x);if(ao[w])return;ao[w]=!0;var V="";d&&d._owner&&d._owner!==dr.current&&(V=" It was passed a child from "+Y(d._owner.type)+"."),Jt(d),P('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',w,V),Jt(null)}}function uo(d,x){{if(typeof d!="object")return;if(cr(d))for(var w=0;w<d.length;w++){var V=d[w];pr(V)&&lo(V,x)}else if(pr(d))d._store&&(d._store.validated=!0);else if(d){var k=T(d);if(typeof k=="function"&&k!==d.entries)for(var I=k.call(d),O;!(O=I.next()).done;)pr(O.value)&&lo(O.value,x)}}}function xd(d){{var x=d.type;if(x==null||typeof x=="string")return;var w;if(typeof x=="function")w=x.propTypes;else if(typeof x=="object"&&(x.$$typeof===l||x.$$typeof===f))w=x.propTypes;else return;if(w){var V=Y(x);sd(w,d.props,"prop",V,d)}else if(x.PropTypes!==void 0&&!hr){hr=!0;var k=Y(x);P("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",k||"Unknown")}typeof x.getDefaultProps=="function"&&!x.getDefaultProps.isReactClassApproved&&P("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function bd(d){{for(var x=Object.keys(d.props),w=0;w<x.length;w++){var V=x[w];if(V!=="children"&&V!=="key"){Jt(d),P("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",V),Jt(null);break}}d.ref!==null&&(Jt(d),P("Invalid attribute `ref` supplied to `React.Fragment`."),Jt(null))}}function co(d,x,w,V,k,I){{var O=tt(d);if(!O){var j="";(d===void 0||typeof d=="object"&&d!==null&&Object.keys(d).length===0)&&(j+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var J=yd(k);J?j+=J:j+=oo();var z;d===null?z="null":cr(d)?z="array":d!==void 0&&d.$$typeof===e?(z="<"+(Y(d.type)||"Unknown")+" />",j=" Did you accidentally export a JSX literal instead of a component?"):z=typeof d,P("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",z,j)}var G=gd(d,x,w,k,I);if(G==null)return G;if(O){var at=x.children;if(at!==void 0)if(V)if(cr(at)){for(var Qt=0;Qt<at.length;Qt++)uo(at[Qt],d);Object.freeze&&Object.freeze(at)}else P("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 uo(at,d)}return d===r?bd(G):xd(G),G}}function Pd(d,x,w){return co(d,x,w,!0)}function wd(d,x,w){return co(d,x,w,!1)}var Td=wd,Cd=Pd;ee.Fragment=r,ee.jsx=Td,ee.jsxs=Cd}()),ee}process.env.NODE_ENV==="production"?tn.exports=mo():tn.exports=go();var y=tn.exports;function yr(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t)){var i=t.length;for(e=0;e<i;e++)t[e]&&(n=yr(t[e]))&&(r&&(r+=" "),r+=n)}else for(n in t)t[n]&&(r&&(r+=" "),r+=n);return r}function Z(){for(var t,e,n=0,r="",i=arguments.length;n<i;n++)(t=arguments[n])&&(e=yr(t))&&(r&&(r+=" "),r+=e);return r}const vr=m.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"}),we=m.createContext({}),Te=m.createContext(null),Ce=typeof document<"u",en=Ce?m.useLayoutEffect:m.useEffect,nn=m.createContext({strict:!1}),rn=t=>t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),xr="data-"+rn("framerAppearId"),br={skipAnimations:!1,useManualTiming:!1};class Pr{constructor(){this.order=[],this.scheduled=new Set}add(e){if(!this.scheduled.has(e))return this.scheduled.add(e),this.order.push(e),!0}remove(e){const n=this.order.indexOf(e);n!==-1&&(this.order.splice(n,1),this.scheduled.delete(e))}clear(){this.order.length=0,this.scheduled.clear()}}function yo(t){let e=new Pr,n=new Pr,r=0,i=!1,o=!1;const s=new WeakSet,a={schedule:(l,u=!1,c=!1)=>{const f=c&&i,h=f?e:n;return u&&s.add(l),h.add(l)&&f&&i&&(r=e.order.length),l},cancel:l=>{n.remove(l),s.delete(l)},process:l=>{if(i){o=!0;return}if(i=!0,[e,n]=[n,e],n.clear(),r=e.order.length,r)for(let u=0;u<r;u++){const c=e.order[u];s.has(c)&&(a.schedule(c),t()),c(l)}i=!1,o&&(o=!1,a.process(l))}};return a}const Se=["prepare","read","update","preRender","render","postRender"],vo=40;function wr(t,e){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},o=Se.reduce((f,h)=>(f[h]=yo(()=>n=!0),f),{}),s=f=>{o[f].process(i)},a=()=>{const f=performance.now();n=!1,i.delta=r?1e3/60:Math.max(Math.min(f-i.timestamp,vo),1),i.timestamp=f,i.isProcessing=!0,Se.forEach(s),i.isProcessing=!1,n&&e&&(r=!1,t(a))},l=()=>{n=!0,r=!0,i.isProcessing||t(a)};return{schedule:Se.reduce((f,h)=>{const p=o[h];return f[h]=(g,v=!1,T=!1)=>(n||l(),p.schedule(g,v,T)),f},{}),cancel:f=>Se.forEach(h=>o[h].cancel(f)),state:i,steps:o}}const{schedule:sn,cancel:Ad}=wr(queueMicrotask,!1);function xo(t,e,n,r){const{visualElement:i}=m.useContext(we),o=m.useContext(nn),s=m.useContext(Te),a=m.useContext(vr).reducedMotion,l=m.useRef();r=r||o.renderer,!l.current&&r&&(l.current=r(t,{visualState:e,parent:i,props:n,presenceContext:s,blockInitialAnimation:s?s.initial===!1:!1,reducedMotionConfig:a}));const u=l.current;m.useInsertionEffect(()=>{u&&u.update(n,s)});const c=m.useRef(!!(n[xr]&&!window.HandoffComplete));return en(()=>{u&&(sn.postRender(u.render),c.current&&u.animationState&&u.animationState.animateChanges())}),m.useEffect(()=>{u&&(u.updateFeatures(),!c.current&&u.animationState&&u.animationState.animateChanges(),c.current&&(c.current=!1,window.HandoffComplete=!0))}),u}function Wt(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function bo(t,e,n){return m.useCallback(r=>{r&&t.mount&&t.mount(r),e&&(r?e.mount(r):e.unmount()),n&&(typeof n=="function"?n(r):Wt(n)&&(n.current=r))},[e])}function ne(t){return typeof t=="string"||Array.isArray(t)}function Ae(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}const on=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],an=["initial",...on];function Ve(t){return Ae(t.animate)||an.some(e=>ne(t[e]))}function Tr(t){return!!(Ve(t)||t.variants)}function Po(t,e){if(Ve(t)){const{initial:n,animate:r}=t;return{initial:n===!1||ne(n)?n:void 0,animate:ne(r)?r:void 0}}return t.inherit!==!1?e:{}}function wo(t){const{initial:e,animate:n}=Po(t,m.useContext(we));return m.useMemo(()=>({initial:e,animate:n}),[Cr(e),Cr(n)])}function Cr(t){return Array.isArray(t)?t.join(" "):t}const Sr={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"]},re={};for(const t in Sr)re[t]={isEnabled:e=>Sr[t].some(n=>!!e[n])};function ln(t){for(const e in t)re[e]={...re[e],...t[e]}}const un=m.createContext({}),Ar=m.createContext({}),To=Symbol.for("motionComponentSymbol");function Co({preloadedFeatures:t,createVisualElement:e,useRender:n,useVisualState:r,Component:i}){t&&ln(t);function o(a,l){let u;const c={...m.useContext(vr),...a,layoutId:So(a)},{isStatic:f}=c,h=wo(a),p=r(a,f);if(!f&&Ce){h.visualElement=xo(i,p,c,e);const g=m.useContext(Ar),v=m.useContext(nn).strict;h.visualElement&&(u=h.visualElement.loadFeatures(c,v,t,g))}return q.createElement(we.Provider,{value:h},u&&h.visualElement?q.createElement(u,{visualElement:h.visualElement,...c}):null,n(i,a,bo(p,h.visualElement,l),p,f,h.visualElement))}const s=m.forwardRef(o);return s[To]=i,s}function So({layoutId:t}){const e=m.useContext(un).id;return e&&t!==void 0?e+"-"+t:t}function Vr(t){function e(r,i={}){return Co(t(r,i))}if(typeof Proxy>"u")return e;const n=new Map;return new Proxy(e,{get:(r,i)=>(n.has(i)||n.set(i,e(i)),n.get(i))})}const Ao=["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 cn(t){return typeof t!="string"||t.includes("-")?!1:!!(Ao.indexOf(t)>-1||/[A-Z]/.test(t))}const Ee={};function Vo(t){Object.assign(Ee,t)}const ie=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Lt=new Set(ie);function Er(t,{layout:e,layoutId:n}){return Lt.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!Ee[t]||t==="opacity")}const Q=t=>!!(t&&t.getVelocity),Eo={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Do=ie.length;function jo(t,{enableHardwareAcceleration:e=!0,allowTransformNone:n=!0},r,i){let o="";for(let s=0;s<Do;s++){const a=ie[s];if(t[a]!==void 0){const l=Eo[a]||a;o+=`${l}(${t[a]}) `}}return e&&!t.z&&(o+="translateZ(0)"),o=o.trim(),i?o=i(t,r?"":o):n&&r&&(o="none"),o}const Dr=t=>e=>typeof e=="string"&&e.startsWith(t),jr=Dr("--"),Mo=Dr("var(--"),De=t=>Mo(t)?Oo.test(t.split("/*")[0].trim()):!1,Oo=/var\s*\(\s*--[\w-]+(\s*,\s*(?:(?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)+)?\s*\)$/i,Lo=(t,e)=>e&&typeof t=="number"?e.transform(t):t,Pt=(t,e,n)=>n>e?e:n<t?t:n,zt={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},se={...zt,transform:t=>Pt(0,1,t)},je={...zt,default:1},oe=t=>Math.round(t*1e5)/1e5,fn=/(-)?([\d]*\.?[\d])+/g,ko=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,Ro=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function ae(t){return typeof t=="string"}const le=t=>({test:e=>ae(e)&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),wt=le("deg"),ct=le("%"),A=le("px"),Fo=le("vh"),Io=le("vw"),Mr={...ct,parse:t=>ct.parse(t)/100,transform:t=>ct.transform(t*100)},Or={...zt,transform:Math.round},Lr={borderWidth:A,borderTopWidth:A,borderRightWidth:A,borderBottomWidth:A,borderLeftWidth:A,borderRadius:A,radius:A,borderTopLeftRadius:A,borderTopRightRadius:A,borderBottomRightRadius:A,borderBottomLeftRadius:A,width:A,maxWidth:A,height:A,maxHeight:A,size:A,top:A,right:A,bottom:A,left:A,padding:A,paddingTop:A,paddingRight:A,paddingBottom:A,paddingLeft:A,margin:A,marginTop:A,marginRight:A,marginBottom:A,marginLeft:A,rotate:wt,rotateX:wt,rotateY:wt,rotateZ:wt,scale:je,scaleX:je,scaleY:je,scaleZ:je,skew:wt,skewX:wt,skewY:wt,distance:A,translateX:A,translateY:A,translateZ:A,x:A,y:A,z:A,perspective:A,transformPerspective:A,opacity:se,originX:Mr,originY:Mr,originZ:A,zIndex:Or,fillOpacity:se,strokeOpacity:se,numOctaves:Or};function dn(t,e,n,r){const{style:i,vars:o,transform:s,transformOrigin:a}=t;let l=!1,u=!1,c=!0;for(const f in e){const h=e[f];if(jr(f)){o[f]=h;continue}const p=Lr[f],g=Lo(h,p);if(Lt.has(f)){if(l=!0,s[f]=g,!c)continue;h!==(p.default||0)&&(c=!1)}else f.startsWith("origin")?(u=!0,a[f]=g):i[f]=g}if(e.transform||(l||r?i.transform=jo(t.transform,n,c,r):i.transform&&(i.transform="none")),u){const{originX:f="50%",originY:h="50%",originZ:p=0}=a;i.transformOrigin=`${f} ${h} ${p}`}}const hn=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function kr(t,e,n){for(const r in e)!Q(e[r])&&!Er(r,n)&&(t[r]=e[r])}function Bo({transformTemplate:t},e,n){return m.useMemo(()=>{const r=hn();return dn(r,e,{enableHardwareAcceleration:!n},t),Object.assign({},r.vars,r.style)},[e])}function _o(t,e,n){const r=t.style||{},i={};return kr(i,r,t),Object.assign(i,Bo(t,e,n)),i}function No(t,e,n){const r={},i=_o(t,e,n);return t.drag&&t.dragListener!==!1&&(r.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),t.tabIndex===void 0&&(t.onTap||t.onTapStart||t.whileTap)&&(r.tabIndex=0),r.style=i,r}const $o=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 Me(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||$o.has(t)}let Rr=t=>!Me(t);function Uo(t){t&&(Rr=e=>e.startsWith("on")?!Me(e):t(e))}try{Uo(require("@emotion/is-prop-valid").default)}catch{}function Wo(t,e,n){const r={};for(const i in t)i==="values"&&typeof t.values=="object"||(Rr(i)||n===!0&&Me(i)||!e&&!Me(i)||t.draggable&&i.startsWith("onDrag"))&&(r[i]=t[i]);return r}function Fr(t,e,n){return typeof t=="string"?t:A.transform(e+n*t)}function zo(t,e,n){const r=Fr(e,t.x,t.width),i=Fr(n,t.y,t.height);return`${r} ${i}`}const Ho={offset:"stroke-dashoffset",array:"stroke-dasharray"},Go={offset:"strokeDashoffset",array:"strokeDasharray"};function Yo(t,e,n=1,r=0,i=!0){t.pathLength=1;const o=i?Ho:Go;t[o.offset]=A.transform(-r);const s=A.transform(e),a=A.transform(n);t[o.array]=`${s} ${a}`}function pn(t,{attrX:e,attrY:n,attrScale:r,originX:i,originY:o,pathLength:s,pathSpacing:a=1,pathOffset:l=0,...u},c,f,h){if(dn(t,u,c,h),f){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:p,style:g,dimensions:v}=t;p.transform&&(v&&(g.transform=p.transform),delete p.transform),v&&(i!==void 0||o!==void 0||g.transform)&&(g.transformOrigin=zo(v,i!==void 0?i:.5,o!==void 0?o:.5)),e!==void 0&&(p.x=e),n!==void 0&&(p.y=n),r!==void 0&&(p.scale=r),s!==void 0&&Yo(p,s,a,l,!1)}const Ir=()=>({...hn(),attrs:{}}),mn=t=>typeof t=="string"&&t.toLowerCase()==="svg";function Ko(t,e,n,r){const i=m.useMemo(()=>{const o=Ir();return pn(o,e,{enableHardwareAcceleration:!1},mn(r),t.transformTemplate),{...o.attrs,style:{...o.style}}},[e]);if(t.style){const o={};kr(o,t.style,t),i.style={...o,...i.style}}return i}function qo(t=!1){return(n,r,i,{latestValues:o},s)=>{const l=(cn(n)?Ko:No)(r,o,s,n),u=Wo(r,typeof n=="string",t),c=n!==m.Fragment?{...u,...l,ref:i}:{},{children:f}=r,h=m.useMemo(()=>Q(f)?f.get():f,[f]);return m.createElement(n,{...c,children:h})}}function Br(t,{style:e,vars:n},r,i){Object.assign(t.style,e,i&&i.getProjectionStyles(r));for(const o in n)t.style.setProperty(o,n[o])}const _r=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 Nr(t,e,n,r){Br(t,e,void 0,r);for(const i in e.attrs)t.setAttribute(_r.has(i)?i:rn(i),e.attrs[i])}function gn(t,e){const{style:n}=t,r={};for(const i in n)(Q(n[i])||e.style&&Q(e.style[i])||Er(i,t))&&(r[i]=n[i]);return r}function $r(t,e){const n=gn(t,e);for(const r in t)if(Q(t[r])||Q(e[r])){const i=ie.indexOf(r)!==-1?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r;n[i]=t[r]}return n}function yn(t,e,n,r={},i={}){return typeof e=="function"&&(e=e(n!==void 0?n:t.custom,r,i)),typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"&&(e=e(n!==void 0?n:t.custom,r,i)),e}function vn(t){const e=m.useRef(null);return e.current===null&&(e.current=t()),e.current}const Oe=t=>Array.isArray(t),Xo=t=>!!(t&&typeof t=="object"&&t.mix&&t.toValue),Zo=t=>Oe(t)?t[t.length-1]||0:t;function Le(t){const e=Q(t)?t.get():t;return Xo(e)?e.toValue():e}function Jo({scrapeMotionValuesFromProps:t,createRenderState:e,onMount:n},r,i,o){const s={latestValues:Qo(r,i,o,t),renderState:e()};return n&&(s.mount=a=>n(r,a,s)),s}const Ur=t=>(e,n)=>{const r=m.useContext(we),i=m.useContext(Te),o=()=>Jo(t,e,r,i);return n?o():vn(o)};function Qo(t,e,n,r){const i={},o=r(t,{});for(const h in o)i[h]=Le(o[h]);let{initial:s,animate:a}=t;const l=Ve(t),u=Tr(t);e&&u&&!l&&t.inherit!==!1&&(s===void 0&&(s=e.initial),a===void 0&&(a=e.animate));let c=n?n.initial===!1:!1;c=c||s===!1;const f=c?a:s;return f&&typeof f!="boolean"&&!Ae(f)&&(Array.isArray(f)?f:[f]).forEach(p=>{const g=yn(t,p);if(!g)return;const{transitionEnd:v,transition:T,...C}=g;for(const P in C){let b=C[P];if(Array.isArray(b)){const S=c?b.length-1:0;b=b[S]}b!==null&&(i[P]=b)}for(const P in v)i[P]=v[P]}),i}const U=t=>t,{schedule:_,cancel:ft,state:K,steps:xn}=wr(typeof requestAnimationFrame<"u"?requestAnimationFrame:U,!0),ta={useVisualState:Ur({scrapeMotionValuesFromProps:$r,createRenderState:Ir,onMount:(t,e,{renderState:n,latestValues:r})=>{_.read(()=>{try{n.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}}),_.render(()=>{pn(n,r,{enableHardwareAcceleration:!1},mn(e.tagName),t.transformTemplate),Nr(e,n)})}})},ea={useVisualState:Ur({scrapeMotionValuesFromProps:gn,createRenderState:hn})};function Wr(t,{forwardMotionProps:e=!1},n,r){return{...cn(t)?ta:ea,preloadedFeatures:n,useRender:qo(e),createVisualElement:r,Component:t}}function dt(t,e,n,r={passive:!0}){return t.addEventListener(e,n,r),()=>t.removeEventListener(e,n)}const zr=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1;function ke(t,e="page"){return{point:{x:t[e+"X"],y:t[e+"Y"]}}}const na=t=>e=>zr(e)&&t(e,ke(e));function ht(t,e,n,r){return dt(t,e,na(n),r)}const ra=(t,e)=>n=>e(t(n)),pt=(...t)=>t.reduce(ra);function Hr(t){let e=null;return()=>{const n=()=>{e=null};return e===null?(e=t,n):!1}}const Gr=Hr("dragHorizontal"),Yr=Hr("dragVertical");function Kr(t){let e=!1;if(t==="y")e=Yr();else if(t==="x")e=Gr();else{const n=Gr(),r=Yr();n&&r?e=()=>{n(),r()}:(n&&n(),r&&r())}return e}function qr(){const t=Kr(!0);return t?(t(),!1):!0}class Tt{constructor(e){this.isMounted=!1,this.node=e}update(){}}function Xr(t,e){const n="pointer"+(e?"enter":"leave"),r="onHover"+(e?"Start":"End"),i=(o,s)=>{if(o.pointerType==="touch"||qr())return;const a=t.getProps();t.animationState&&a.whileHover&&t.animationState.setActive("whileHover",e),a[r]&&_.update(()=>a[r](o,s))};return ht(t.current,n,i,{passive:!t.getProps()[r]})}class ia extends Tt{mount(){this.unmount=pt(Xr(this.node,!0),Xr(this.node,!1))}unmount(){}}class sa extends Tt{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=pt(dt(this.node.current,"focus",()=>this.onFocus()),dt(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const Zr=(t,e)=>e?t===e?!0:Zr(t,e.parentElement):!1;function bn(t,e){if(!e)return;const n=new PointerEvent("pointer"+t);e(n,ke(n))}class oa extends Tt{constructor(){super(...arguments),this.removeStartListeners=U,this.removeEndListeners=U,this.removeAccessibleListeners=U,this.startPointerPress=(e,n)=>{if(this.isPressing)return;this.removeEndListeners();const r=this.node.getProps(),o=ht(window,"pointerup",(a,l)=>{if(!this.checkPressEnd())return;const{onTap:u,onTapCancel:c,globalTapTarget:f}=this.node.getProps();_.update(()=>{!f&&!Zr(this.node.current,a.target)?c&&c(a,l):u&&u(a,l)})},{passive:!(r.onTap||r.onPointerUp)}),s=ht(window,"pointercancel",(a,l)=>this.cancelPress(a,l),{passive:!(r.onTapCancel||r.onPointerCancel)});this.removeEndListeners=pt(o,s),this.startPress(e,n)},this.startAccessiblePress=()=>{const e=o=>{if(o.key!=="Enter"||this.isPressing)return;const s=a=>{a.key!=="Enter"||!this.checkPressEnd()||bn("up",(l,u)=>{const{onTap:c}=this.node.getProps();c&&_.update(()=>c(l,u))})};this.removeEndListeners(),this.removeEndListeners=dt(this.node.current,"keyup",s),bn("down",(a,l)=>{this.startPress(a,l)})},n=dt(this.node.current,"keydown",e),r=()=>{this.isPressing&&bn("cancel",(o,s)=>this.cancelPress(o,s))},i=dt(this.node.current,"blur",r);this.removeAccessibleListeners=pt(n,i)}}startPress(e,n){this.isPressing=!0;const{onTapStart:r,whileTap:i}=this.node.getProps();i&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),r&&_.update(()=>r(e,n))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!qr()}cancelPress(e,n){if(!this.checkPressEnd())return;const{onTapCancel:r}=this.node.getProps();r&&_.update(()=>r(e,n))}mount(){const e=this.node.getProps(),n=ht(e.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(e.onTapStart||e.onPointerStart)}),r=dt(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=pt(n,r)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const Pn=new WeakMap,wn=new WeakMap,aa=t=>{const e=Pn.get(t.target);e&&e(t)},la=t=>{t.forEach(aa)};function ua({root:t,...e}){const n=t||document;wn.has(n)||wn.set(n,{});const r=wn.get(n),i=JSON.stringify(e);return r[i]||(r[i]=new IntersectionObserver(la,{root:t,...e})),r[i]}function ca(t,e,n){const r=ua(e);return Pn.set(t,n),r.observe(t),()=>{Pn.delete(t),r.unobserve(t)}}const fa={some:0,all:1};class da extends Tt{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:n,margin:r,amount:i="some",once:o}=e,s={root:n?n.current:void 0,rootMargin:r,threshold:typeof i=="number"?i:fa[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 ca(this.node.current,s,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:n}=this.node;["amount","margin","root"].some(ha(e,n))&&this.startObserver()}unmount(){}}function ha({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const Jr={inView:{Feature:da},tap:{Feature:oa},focus:{Feature:sa},hover:{Feature:ia}};function Qr(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let r=0;r<n;r++)if(e[r]!==t[r])return!1;return!0}function pa(t){const e={};return t.values.forEach((n,r)=>e[r]=n.get()),e}function ma(t){const e={};return t.values.forEach((n,r)=>e[r]=n.getVelocity()),e}function Re(t,e,n){const r=t.getProps();return yn(r,e,n!==void 0?n:r.custom,pa(t),ma(t))}let ue=U,rt=U;process.env.NODE_ENV!=="production"&&(ue=(t,e)=>{!t&&typeof console<"u"&&console.warn(e)},rt=(t,e)=>{if(!t)throw new Error(e)});const Ct=t=>t*1e3,mt=t=>t/1e3,ga={current:!1},ti=t=>Array.isArray(t)&&typeof t[0]=="number";function ei(t){return!!(!t||typeof t=="string"&&ni[t]||ti(t)||Array.isArray(t)&&t.every(ei))}const ce=([t,e,n,r])=>`cubic-bezier(${t}, ${e}, ${n}, ${r})`,ni={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:ce([0,.65,.55,1]),circOut:ce([.55,0,1,.45]),backIn:ce([.31,.01,.66,-.59]),backOut:ce([.33,1.53,.69,.99])};function ri(t){if(t)return ti(t)?ce(t):Array.isArray(t)?t.map(ri):ni[t]}function ya(t,e,n,{delay:r=0,duration:i,repeat:o=0,repeatType:s="loop",ease:a,times:l}={}){const u={[e]:n};l&&(u.offset=l);const c=ri(a);return Array.isArray(c)&&(u.easing=c),t.animate(u,{delay:r,duration:i,easing:Array.isArray(c)?"linear":c,fill:"both",iterations:o+1,direction:s==="reverse"?"alternate":"normal"})}function va(t,{repeat:e,repeatType:n="loop"}){const r=e&&n!=="loop"&&e%2===1?0:t.length-1;return t[r]}const ii=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,xa=1e-7,ba=12;function Pa(t,e,n,r,i){let o,s,a=0;do s=e+(n-e)/2,o=ii(s,r,i)-t,o>0?n=s:e=s;while(Math.abs(o)>xa&&++a<ba);return s}function fe(t,e,n,r){if(t===e&&n===r)return U;const i=o=>Pa(o,0,1,t,n);return o=>o===0||o===1?o:ii(i(o),e,r)}const wa=fe(.42,0,1,1),Ta=fe(0,0,.58,1),si=fe(.42,0,.58,1),Ca=t=>Array.isArray(t)&&typeof t[0]!="number",oi=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,ai=t=>e=>1-t(1-e),Tn=t=>1-Math.sin(Math.acos(t)),li=ai(Tn),Sa=oi(Tn),ui=fe(.33,1.53,.69,.99),Cn=ai(ui),Aa=oi(Cn),ci={linear:U,easeIn:wa,easeInOut:si,easeOut:Ta,circIn:Tn,circInOut:Sa,circOut:li,backIn:Cn,backInOut:Aa,backOut:ui,anticipate:t=>(t*=2)<1?.5*Cn(t):.5*(2-Math.pow(2,-10*(t-1)))},fi=t=>{if(Array.isArray(t)){rt(t.length===4,"Cubic bezier arrays must contain four numerical values.");const[e,n,r,i]=t;return fe(e,n,r,i)}else if(typeof t=="string")return rt(ci[t]!==void 0,`Invalid easing type '${t}'`),ci[t];return t},de=(t,e,n)=>{const r=e-t;return r===0?1:(n-t)/r},N=(t,e,n)=>t+(e-t)*n;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 Va({hue:t,saturation:e,lightness:n,alpha:r}){t/=360,e/=100,n/=100;let i=0,o=0,s=0;if(!e)i=o=s=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),s=Sn(l,a,t-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(s*255),alpha:r}}const An=(t,e)=>n=>!!(ae(n)&&Ro.test(n)&&n.startsWith(t)||e&&Object.prototype.hasOwnProperty.call(n,e)),di=(t,e,n)=>r=>{if(!ae(r))return r;const[i,o,s,a]=r.match(fn);return{[t]:parseFloat(i),[e]:parseFloat(o),[n]:parseFloat(s),alpha:a!==void 0?parseFloat(a):1}},Ea=t=>Pt(0,255,t),Vn={...zt,transform:t=>Math.round(Ea(t))},kt={test:An("rgb","red"),parse:di("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:r=1})=>"rgba("+Vn.transform(t)+", "+Vn.transform(e)+", "+Vn.transform(n)+", "+oe(se.transform(r))+")"};function Da(t){let e="",n="",r="",i="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),r=t.substring(5,7),i=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),r=t.substring(3,4),i=t.substring(4,5),e+=e,n+=n,r+=r,i+=i),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const En={test:An("#"),parse:Da,transform:kt.transform},Ht={test:An("hsl","hue"),parse:di("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:r=1})=>"hsla("+Math.round(t)+", "+ct.transform(oe(e))+", "+ct.transform(oe(n))+", "+oe(se.transform(r))+")"},Dn=(t,e,n)=>{const r=t*t,i=n*(e*e-r)+r;return i<0?0:Math.sqrt(i)},ja=[En,kt,Ht],Ma=t=>ja.find(e=>e.test(t));function hi(t){const e=Ma(t);rt(!!e,`'${t}' is not an animatable color. Use the equivalent color code instead.`);let n=e.parse(t);return e===Ht&&(n=Va(n)),n}const pi=(t,e)=>{const n=hi(t),r=hi(e),i={...n};return o=>(i.red=Dn(n.red,r.red,o),i.green=Dn(n.green,r.green,o),i.blue=Dn(n.blue,r.blue,o),i.alpha=N(n.alpha,r.alpha,o),kt.transform(i))},X={test:t=>kt.test(t)||En.test(t)||Ht.test(t),parse:t=>kt.test(t)?kt.parse(t):Ht.test(t)?Ht.parse(t):En.parse(t),transform:t=>ae(t)?t:t.hasOwnProperty("red")?kt.transform(t):Ht.transform(t)};function Oa(t){var e,n;return isNaN(t)&&ae(t)&&(((e=t.match(fn))===null||e===void 0?void 0:e.length)||0)+(((n=t.match(ko))===null||n===void 0?void 0:n.length)||0)>0}const mi="number",gi="color",La="var",ka="var(",yi="${}",vi=/(var\s*\(\s*--[\w-]+(\s*,\s*(?:(?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)+)?\s*\))|(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))|((-)?([\d]*\.?[\d])+)/gi;function Fe(t){const e=t.toString(),n=e.match(vi)||[],r=[],i={color:[],number:[],var:[]},o=[];for(let l=0;l<n.length;l++){const u=n[l];X.test(u)?(i.color.push(l),o.push(gi),r.push(X.parse(u))):u.startsWith(ka)?(i.var.push(l),o.push(La),r.push(u)):(i.number.push(l),o.push(mi),r.push(parseFloat(u)))}const a=e.replace(vi,yi).split(yi);return{values:r,split:a,indexes:i,types:o}}function xi(t){return Fe(t).values}function bi(t){const{split:e,types:n}=Fe(t),r=e.length;return i=>{let o="";for(let s=0;s<r;s++)if(o+=e[s],i[s]!==void 0){const a=n[s];a===mi?o+=oe(i[s]):a===gi?o+=X.transform(i[s]):o+=i[s]}return o}}const Ra=t=>typeof t=="number"?0:t;function Fa(t){const e=xi(t);return bi(t)(e.map(Ra))}const St={test:Oa,parse:xi,createTransformer:bi,getAnimatableNone:Fa};function jn(t,e){return n=>n>0?e:t}function Ia(t,e){return n=>N(t,e,n)}function Mn(t){return typeof t=="number"?Ia:typeof t=="string"?De(t)?jn:X.test(t)?pi:Na:Array.isArray(t)?Pi:typeof t=="object"?X.test(t)?pi:Ba:jn}function Pi(t,e){const n=[...t],r=n.length,i=t.map((o,s)=>Mn(o)(o,e[s]));return o=>{for(let s=0;s<r;s++)n[s]=i[s](o);return n}}function Ba(t,e){const n={...t,...e},r={};for(const i in n)t[i]!==void 0&&e[i]!==void 0&&(r[i]=Mn(t[i])(t[i],e[i]));return i=>{for(const o in r)n[o]=r[o](i);return n}}function _a(t,e){var n;const r=[],i={color:0,var:0,number:0};for(let o=0;o<e.values.length;o++){const s=e.types[o],a=t.indexes[s][i[s]],l=(n=t.values[a])!==null&&n!==void 0?n:0;r[o]=l,i[s]++}return r}const Na=(t,e)=>{const n=St.createTransformer(e),r=Fe(t),i=Fe(e);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?pt(Pi(_a(r,i),i.values),n):(ue(!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.`),jn(t,e))};function wi(t,e,n){return typeof t=="number"&&typeof e=="number"&&typeof n=="number"?N(t,e,n):Mn(t)(t,e)}function $a(t,e,n){const r=[],i=n||wi,o=t.length-1;for(let s=0;s<o;s++){let a=i(t[s],t[s+1]);if(e){const l=Array.isArray(e)?e[s]||U:e;a=pt(l,a)}r.push(a)}return r}function Ua(t,e,{clamp:n=!0,ease:r,mixer:i}={}){const o=t.length;if(rt(o===e.length,"Both input and output ranges must be the same length"),o===1)return()=>e[0];t[0]>t[o-1]&&(t=[...t].reverse(),e=[...e].reverse());const s=$a(e,r,i),a=s.length,l=u=>{let c=0;if(a>1)for(;c<t.length-2&&!(u<t[c+1]);c++);const f=de(t[c],t[c+1],u);return s[c](f)};return n?u=>l(Pt(t[0],t[o-1],u)):l}function Wa(t,e){const n=t[t.length-1];for(let r=1;r<=e;r++){const i=de(0,e,r);t.push(N(n,1,i))}}function za(t){const e=[0];return Wa(e,t.length-1),e}function Ha(t,e){return t.map(n=>n*e)}function Ga(t,e){return t.map(()=>e||si).splice(0,t.length-1)}function Ie({duration:t=300,keyframes:e,times:n,ease:r="easeInOut"}){const i=Ca(r)?r.map(fi):fi(r),o={done:!1,value:e[0]},s=Ha(n&&n.length===e.length?n:za(e),t),a=Ua(s,e,{ease:Array.isArray(i)?i:Ga(e,i)});return{calculatedDuration:t,next:l=>(o.value=a(l),o.done=l>=t,o)}}function Ti(t,e){return e?t*(1e3/e):0}const Ya=5;function Ci(t,e,n){const r=Math.max(e-Ya,0);return Ti(n-t(r),e-r)}const On=.001,Ka=.01,Si=10,qa=.05,Xa=1;function Za({duration:t=800,bounce:e=.25,velocity:n=0,mass:r=1}){let i,o;ue(t<=Ct(Si),"Spring duration must be 10 seconds or less");let s=1-e;s=Pt(qa,Xa,s),t=Pt(Ka,Si,mt(t)),s<1?(i=u=>{const c=u*s,f=c*t,h=c-n,p=Ln(u,s),g=Math.exp(-f);return On-h/p*g},o=u=>{const f=u*s*t,h=f*n+n,p=Math.pow(s,2)*Math.pow(u,2)*t,g=Math.exp(-f),v=Ln(Math.pow(u,2),s);return(-i(u)+On>0?-1:1)*((h-p)*g)/v}):(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=Qa(i,o,a);if(t=Ct(t),isNaN(l))return{stiffness:100,damping:10,duration:t};{const u=Math.pow(l,2)*r;return{stiffness:u,damping:s*2*Math.sqrt(r*u),duration:t}}}const Ja=12;function Qa(t,e,n){let r=n;for(let i=1;i<Ja;i++)r=r-t(r)/e(r);return r}function Ln(t,e){return t*Math.sqrt(1-e*e)}const tl=["duration","bounce"],el=["stiffness","damping","mass"];function Ai(t,e){return e.some(n=>t[n]!==void 0)}function nl(t){let e={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...t};if(!Ai(t,el)&&Ai(t,tl)){const n=Za(t);e={...e,...n,mass:1},e.isResolvedFromDuration=!0}return e}function Vi({keyframes:t,restDelta:e,restSpeed:n,...r}){const i=t[0],o=t[t.length-1],s={done:!1,value:i},{stiffness:a,damping:l,mass:u,duration:c,velocity:f,isResolvedFromDuration:h}=nl({...r,velocity:-mt(r.velocity||0)}),p=f||0,g=l/(2*Math.sqrt(a*u)),v=o-i,T=mt(Math.sqrt(a/u)),C=Math.abs(v)<5;n||(n=C?.01:2),e||(e=C?.005:.5);let P;if(g<1){const b=Ln(T,g);P=S=>{const E=Math.exp(-g*T*S);return o-E*((p+g*T*v)/b*Math.sin(b*S)+v*Math.cos(b*S))}}else if(g===1)P=b=>o-Math.exp(-T*b)*(v+(p+T*v)*b);else{const b=T*Math.sqrt(g*g-1);P=S=>{const E=Math.exp(-g*T*S),R=Math.min(b*S,300);return o-E*((p+g*T*v)*Math.sinh(R)+b*v*Math.cosh(R))/b}}return{calculatedDuration:h&&c||null,next:b=>{const S=P(b);if(h)s.done=b>=c;else{let E=p;b!==0&&(g<1?E=Ci(P,b,S):E=0);const R=Math.abs(E)<=n,F=Math.abs(o-S)<=e;s.done=R&&F}return s.value=s.done?o:S,s}}}function Ei({keyframes:t,velocity:e=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:s,min:a,max:l,restDelta:u=.5,restSpeed:c}){const f=t[0],h={done:!1,value:f},p=D=>a!==void 0&&D<a||l!==void 0&&D>l,g=D=>a===void 0?l:l===void 0||Math.abs(a-D)<Math.abs(l-D)?a:l;let v=n*e;const T=f+v,C=s===void 0?T:s(T);C!==T&&(v=C-f);const P=D=>-v*Math.exp(-D/r),b=D=>C+P(D),S=D=>{const L=P(D),tt=b(D);h.done=Math.abs(L)<=u,h.value=h.done?C:tt};let E,R;const F=D=>{p(h.value)&&(E=D,R=Vi({keyframes:[h.value,g(h.value)],velocity:Ci(b,D,h.value),damping:i,stiffness:o,restDelta:u,restSpeed:c}))};return F(0),{calculatedDuration:null,next:D=>{let L=!1;return!R&&E===void 0&&(L=!0,S(D),F(D)),E!==void 0&&D>E?R.next(D-E):(!L&&S(D),h)}}}let Be;function rl(){Be=void 0}const Rt={now:()=>(Be===void 0&&Rt.set(K.isProcessing||br.useManualTiming?K.timestamp:performance.now()),Be),set:t=>{Be=t,queueMicrotask(rl)}},il=t=>{const e=({timestamp:n})=>t(n);return{start:()=>_.update(e,!0),stop:()=>ft(e),now:()=>K.isProcessing?K.timestamp:Rt.now()}},Di=2e4;function ji(t){let e=0;const n=50;let r=t.next(e);for(;!r.done&&e<Di;)e+=n,r=t.next(e);return e>=Di?1/0:e}const sl={decay:Ei,inertia:Ei,tween:Ie,keyframes:Ie,spring:Vi},ol=t=>t/100;function _e({autoplay:t=!0,delay:e=0,driver:n=il,keyframes:r,type:i="keyframes",repeat:o=0,repeatDelay:s=0,repeatType:a="loop",onPlay:l,onStop:u,onComplete:c,onUpdate:f,...h}){let p=1,g=!1,v,T;const C=()=>{T=new Promise(B=>{v=B})};C();let P;const b=sl[i]||Ie;let S;b!==Ie&&typeof r[0]!="number"&&(process.env.NODE_ENV!=="production"&&rt(r.length===2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${r}`),S=pt(ol,wi(r[0],r[1])),r=[0,100]);const E=b({...h,keyframes:r});let R;a==="mirror"&&(R=b({...h,keyframes:[...r].reverse(),velocity:-(h.velocity||0)}));let F="idle",D=null,L=null,tt=null;E.calculatedDuration===null&&o&&(E.calculatedDuration=ji(E));const{calculatedDuration:jt}=E;let et=1/0,Y=1/0;jt!==null&&(et=jt+s,Y=et*(o+1)-s);let $=0;const ot=B=>{if(L===null)return;p>0&&(L=Math.min(L,B)),p<0&&(L=Math.min(B-Y/p,L)),D!==null?$=D:$=Math.round(B-L)*p;const Ot=$-e*(p>=0?1:-1),be=p>=0?Ot<0:Ot>Y;$=Math.max(Ot,0),F==="finished"&&D===null&&($=Y);let qe=$,Xe=E;if(o){const Ut=Math.min($,Y)/et;let vt=Math.floor(Ut),xt=Ut%1;!xt&&Ut>=1&&(xt=1),xt===1&&vt--,vt=Math.min(vt,o+1),!!(vt%2)&&(a==="reverse"?(xt=1-xt,s&&(xt-=s/et)):a==="mirror"&&(Xe=R)),qe=Pt(0,1,xt)*et}const yt=be?{done:!1,value:r[0]}:Xe.next(qe);S&&(yt.value=S(yt.value));let{done:Xt}=yt;!be&&jt!==null&&(Xt=p>=0?$>=Y:$<=0);const Zt=D===null&&(F==="finished"||F==="running"&&Xt);return f&&f(yt.value),Zt&&Mt(),yt},H=()=>{P&&P.stop(),P=void 0},ut=()=>{F="idle",H(),v(),C(),L=tt=null},Mt=()=>{F="finished",c&&c(),H(),v()},gt=()=>{if(g)return;P||(P=n(ot));const B=P.now();l&&l(),D!==null?L=B-D:(!L||F==="finished")&&(L=B),F==="finished"&&C(),tt=L,D=null,F="running",P.start()};t&>();const xe={then(B,Ot){return T.then(B,Ot)},get time(){return mt($)},set time(B){B=Ct(B),$=B,D!==null||!P||p===0?D=B:L=P.now()-B/p},get duration(){const B=E.calculatedDuration===null?ji(E):E.calculatedDuration;return mt(B)},get speed(){return p},set speed(B){B===p||!P||(p=B,xe.time=mt($))},get state(){return F},play:gt,pause:()=>{F="paused",D=$},stop:()=>{g=!0,F!=="idle"&&(F="idle",u&&u(),ut())},cancel:()=>{tt!==null&&ot(tt),ut()},complete:()=>{F="finished"},sample:B=>(L=0,ot(B))};return xe}function al(t){let e;return()=>(e===void 0&&(e=t()),e)}const ll=al(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),ul=new Set(["opacity","clipPath","filter","transform"]),Ne=10,cl=2e4,fl=(t,e)=>e.type==="spring"||t==="backgroundColor"||!ei(e.ease);function dl(t,e,{onUpdate:n,onComplete:r,...i}){if(!(ll()&&ul.has(e)&&!i.repeatDelay&&i.repeatType!=="mirror"&&i.damping!==0&&i.type!=="inertia"))return!1;let s=!1,a,l,u=!1;const c=()=>{l=new Promise(b=>{a=b})};c();let{keyframes:f,duration:h=300,ease:p,times:g}=i;if(fl(e,i)){const b=_e({...i,repeat:0,delay:0});let S={done:!1,value:f[0]};const E=[];let R=0;for(;!S.done&&R<cl;)S=b.sample(R),E.push(S.value),R+=Ne;g=void 0,f=E,h=R-Ne,p="linear"}const v=ya(t.owner.current,e,f,{...i,duration:h,ease:p,times:g}),T=()=>{u=!1,v.cancel()},C=()=>{u=!0,_.update(T),a(),c()};return v.onfinish=()=>{u||(t.set(va(f,i)),r&&r(),C())},{then(b,S){return l.then(b,S)},attachTimeline(b){return v.timeline=b,v.onfinish=null,U},get time(){return mt(v.currentTime||0)},set time(b){v.currentTime=Ct(b)},get speed(){return v.playbackRate},set speed(b){v.playbackRate=b},get duration(){return mt(h)},play:()=>{s||(v.play(),ft(T))},pause:()=>v.pause(),stop:()=>{if(s=!0,v.playState==="idle")return;const{currentTime:b}=v;if(b){const S=_e({...i,autoplay:!1});t.setWithVelocity(S.sample(b-Ne).value,S.sample(b).value,Ne)}C()},complete:()=>{u||v.finish()},cancel:C}}function hl({keyframes:t,delay:e,onUpdate:n,onComplete:r}){const i=()=>(n&&n(t[t.length-1]),r&&r(),{time:0,speed:1,duration:0,play:U,pause:U,stop:U,then:o=>(o(),Promise.resolve()),cancel:U,complete:U});return e?_e({keyframes:[0,1],duration:0,delay:e,onComplete:i}):i()}const pl={type:"spring",stiffness:500,damping:25,restSpeed:10},ml=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),gl={type:"keyframes",duration:.8},yl={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},vl=(t,{keyframes:e})=>e.length>2?gl:Lt.has(t)?t.startsWith("scale")?ml(e[1]):pl:yl,kn=(t,e)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(St.test(e)||e==="0")&&!e.startsWith("url(")),xl=new Set(["brightness","contrast","saturate","opacity"]);function bl(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[r]=n.match(fn)||[];if(!r)return t;const i=n.replace(r,"");let o=xl.has(e)?1:0;return r!==n&&(o*=100),e+"("+o+i+")"}const Pl=/([a-z-]*)\(.*?\)/g,Rn={...St,getAnimatableNone:t=>{const e=t.match(Pl);return e?e.map(bl).join(" "):t}},wl={...Lr,color:X,backgroundColor:X,outlineColor:X,fill:X,stroke:X,borderColor:X,borderTopColor:X,borderRightColor:X,borderBottomColor:X,borderLeftColor:X,filter:Rn,WebkitFilter:Rn},Fn=t=>wl[t];function Mi(t,e){let n=Fn(t);return n!==Rn&&(n=St),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const Oi=t=>/^0[^.\s]+$/.test(t);function Tl(t){if(typeof t=="number")return t===0;if(t!==null)return t==="none"||t==="0"||Oi(t)}function Cl(t,e,n,r){const i=kn(e,n);let o;Array.isArray(n)?o=[...n]:o=[null,n];const s=r.from!==void 0?r.from:t.get();let a;const l=[];for(let u=0;u<o.length;u++)o[u]===null&&(o[u]=u===0?s:o[u-1]),Tl(o[u])&&l.push(u),typeof o[u]=="string"&&o[u]!=="none"&&o[u]!=="0"&&(a=o[u]);if(i&&l.length&&a)for(let u=0;u<l.length;u++){const c=l[u];o[c]=Mi(e,a)}return o}function Sl({when:t,delay:e,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:o,repeatType:s,repeatDelay:a,from:l,elapsed:u,...c}){return!!Object.keys(c).length}function In(t,e){return t[e]||t.default||t}const Bn=(t,e,n,r={})=>i=>{const o=In(r,t)||{},s=o.delay||r.delay||0;let{elapsed:a=0}=r;a=a-Ct(s);const l=Cl(e,t,n,o),u=l[0],c=l[l.length-1],f=kn(t,u),h=kn(t,c);ue(f===h,`You are trying to animate ${t} from "${u}" to "${c}". ${u} is not an animatable value - to enable this animation set ${u} to a value animatable to ${c} via the \`style\` property.`);let p={keyframes:l,velocity:e.getVelocity(),ease:"easeOut",...o,delay:-a,onUpdate:g=>{e.set(g),o.onUpdate&&o.onUpdate(g)},onComplete:()=>{i(),o.onComplete&&o.onComplete()}};if(Sl(o)||(p={...p,...vl(t,p)}),p.duration&&(p.duration=Ct(p.duration)),p.repeatDelay&&(p.repeatDelay=Ct(p.repeatDelay)),!f||!h||ga.current||o.type===!1||br.skipAnimations)return hl(p);if(!r.isHandoff&&e.owner&&e.owner.current instanceof HTMLElement&&!e.owner.getProps().onUpdate){const g=dl(e,t,p);if(g)return g}return _e(p)};function $e(t){return!!(Q(t)&&t.add)}const Li=t=>/^\-?\d*\.?\d+$/.test(t);function _n(t,e){t.indexOf(e)===-1&&t.push(e)}function Nn(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}class $n{constructor(){this.subscriptions=[]}add(e){return _n(this.subscriptions,e),()=>Nn(this.subscriptions,e)}notify(e,n,r){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](e,n,r);else for(let o=0;o<i;o++){const s=this.subscriptions[o];s&&s(e,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const ki=new Set;function Un(t,e,n){t||ki.has(e)||(console.warn(e),n&&console.warn(n),ki.add(e))}const Ri=30,Al=t=>!isNaN(parseFloat(t));class Vl{constructor(e,n={}){this.version="11.0.8",this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(r,i=!0)=>{const o=Rt.now();this.updatedAt!==o&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),i&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(e),this.canTrackVelocity=Al(this.current),this.owner=n.owner}setCurrent(e){this.current=e,this.updatedAt=Rt.now()}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return process.env.NODE_ENV!=="production"&&Un(!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 $n);const r=this.events[e].add(n);return e==="change"?()=>{r(),_.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,n){this.passiveEffect=e,this.stopPassiveEffect=n}set(e,n=!0){!n||!this.passiveEffect?this.updateAndNotify(e,n):this.passiveEffect(e,this.updateAndNotify)}setWithVelocity(e,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-r}jump(e){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const e=Rt.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>Ri)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Ri);return Ti(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.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Gt(t,e){return new Vl(t,e)}const Fi=t=>e=>e.test(t),Ii=[zt,A,ct,wt,Io,Fo,{test:t=>t==="auto",parse:t=>t}],he=t=>Ii.find(Fi(t)),El=[...Ii,X,St],Dl=t=>El.find(Fi(t));function jl(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,Gt(n))}function Ml(t,e){const n=Re(t,e);let{transitionEnd:r={},transition:i={},...o}=n?t.makeTargetAnimatable(n,!1):{};o={...o,...r};for(const s in o){const a=Zo(o[s]);jl(t,s,a)}}function Ol(t,e,n){var r,i;const o=Object.keys(e).filter(a=>!t.hasValue(a)),s=o.length;if(s)for(let a=0;a<s;a++){const l=o[a],u=e[l];let c=null;Array.isArray(u)&&(c=u[0]),c===null&&(c=(i=(r=n[l])!==null&&r!==void 0?r:t.readValue(l))!==null&&i!==void 0?i:e[l]),c!=null&&(typeof c=="string"&&(Li(c)||Oi(c))?c=parseFloat(c):!Dl(c)&&St.test(u)&&(c=Mi(l,u)),t.addValue(l,Gt(c,{owner:t})),n[l]===void 0&&(n[l]=c),c!==null&&t.setBaseTarget(l,c))}}function Ll(t,e){return e?(e[t]||e.default||e).from:void 0}function kl(t,e,n){const r={};for(const i in t){const o=Ll(i,e);if(o!==void 0)r[i]=o;else{const s=n.getValue(i);s&&(r[i]=s.get())}}return r}function Rl({protectedKeys:t,needsAnimating:e},n){const r=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,r}function Fl(t,e){const n=t.get();if(Array.isArray(e)){for(let r=0;r<e.length;r++)if(e[r]!==n)return!0}else return n!==e}function Bi(t,e,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:o=t.getDefaultTransition(),transitionEnd:s,...a}=t.makeTargetAnimatable(e);const l=t.getValue("willChange");r&&(o=r);const u=[],c=i&&t.animationState&&t.animationState.getState()[i];for(const f in a){const h=t.getValue(f),p=a[f];if(!h||p===void 0||c&&Rl(c,f))continue;const g={delay:n,elapsed:0,...In(o||{},f)};if(window.HandoffAppearAnimations){const C=t.getProps()[xr];if(C){const P=window.HandoffAppearAnimations(C,f,h,_);P!==null&&(g.elapsed=P,g.isHandoff=!0)}}let v=!g.isHandoff&&!Fl(h,p);if(g.type==="spring"&&(h.getVelocity()||g.velocity)&&(v=!1),h.animation&&(v=!1),v)continue;h.start(Bn(f,h,p,t.shouldReduceMotion&&Lt.has(f)?{type:!1}:g));const T=h.animation;$e(l)&&(l.add(f),T.then(()=>l.remove(f))),u.push(T)}return s&&Promise.all(u).then(()=>{s&&Ml(t,s)}),u}function Wn(t,e,n={}){const r=Re(t,e,n.custom);let{transition:i=t.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);const o=r?()=>Promise.all(Bi(t,r,n)):()=>Promise.resolve(),s=t.variantChildren&&t.variantChildren.size?(l=0)=>{const{delayChildren:u=0,staggerChildren:c,staggerDirection:f}=i;return Il(t,e,u+l,c,f,n)}:()=>Promise.resolve(),{when:a}=i;if(a){const[l,u]=a==="beforeChildren"?[o,s]:[s,o];return l().then(()=>u())}else return Promise.all([o(),s(n.delay)])}function Il(t,e,n=0,r=0,i=1,o){const s=[],a=(t.variantChildren.size-1)*r,l=i===1?(u=0)=>u*r:(u=0)=>a-u*r;return Array.from(t.variantChildren).sort(Bl).forEach((u,c)=>{u.notify("AnimationStart",e),s.push(Wn(u,e,{...o,delay:n+l(c)}).then(()=>u.notify("AnimationComplete",e)))}),Promise.all(s)}function Bl(t,e){return t.sortNodePosition(e)}function _l(t,e,n={}){t.notify("AnimationStart",e);let r;if(Array.isArray(e)){const i=e.map(o=>Wn(t,o,n));r=Promise.all(i)}else if(typeof e=="string")r=Wn(t,e,n);else{const i=typeof e=="function"?Re(t,e,n.custom):e;r=Promise.all(Bi(t,i,n))}return r.then(()=>t.notify("AnimationComplete",e))}const Nl=[...on].reverse(),$l=on.length;function Ul(t){return e=>Promise.all(e.map(({animation:n,options:r})=>_l(t,n,r)))}function Wl(t){let e=Ul(t);const n=Hl();let r=!0;const i=(l,u)=>{const c=Re(t,u);if(c){const{transition:f,transitionEnd:h,...p}=c;l={...l,...p,...h}}return l};function o(l){e=l(t)}function s(l,u){const c=t.getProps(),f=t.getVariantContext(!0)||{},h=[],p=new Set;let g={},v=1/0;for(let C=0;C<$l;C++){const P=Nl[C],b=n[P],S=c[P]!==void 0?c[P]:f[P],E=ne(S),R=P===u?b.isActive:null;R===!1&&(v=C);let F=S===f[P]&&S!==c[P]&&E;if(F&&r&&t.manuallyAnimateOnMount&&(F=!1),b.protectedKeys={...g},!b.isActive&&R===null||!S&&!b.prevProp||Ae(S)||typeof S=="boolean")continue;let L=zl(b.prevProp,S)||P===u&&b.isActive&&!F&&E||C>v&&E,tt=!1;const jt=Array.isArray(S)?S:[S];let et=jt.reduce(i,{});R===!1&&(et={});const{prevResolvedValues:Y={}}=b,$={...Y,...et},ot=H=>{L=!0,p.has(H)&&(tt=!0,p.delete(H)),b.needsAnimating[H]=!0};for(const H in $){const ut=et[H],Mt=Y[H];if(g.hasOwnProperty(H))continue;let gt=!1;Oe(ut)&&Oe(Mt)?gt=!Qr(ut,Mt):gt=ut!==Mt,gt?ut!==void 0?ot(H):p.add(H):ut!==void 0&&p.has(H)?ot(H):b.protectedKeys[H]=!0}b.prevProp=S,b.prevResolvedValues=et,b.isActive&&(g={...g,...et}),r&&t.blockInitialAnimation&&(L=!1),L&&(!F||tt)&&h.push(...jt.map(H=>({animation:H,options:{type:P,...l}})))}if(p.size){const C={};p.forEach(P=>{const b=t.getBaseTarget(P);b!==void 0&&(C[P]=b)}),h.push({animation:C})}let T=!!h.length;return r&&(c.initial===!1||c.initial===c.animate)&&!t.manuallyAnimateOnMount&&(T=!1),r=!1,T?e(h):Promise.resolve()}function a(l,u,c){var f;if(n[l].isActive===u)return Promise.resolve();(f=t.variantChildren)===null||f===void 0||f.forEach(p=>{var g;return(g=p.animationState)===null||g===void 0?void 0:g.setActive(l,u)}),n[l].isActive=u;const h=s(c,l);for(const p in n)n[p].protectedKeys={};return h}return{animateChanges:s,setActive:a,setAnimateFunction:o,getState:()=>n}}function zl(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!Qr(e,t):!1}function Ft(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Hl(){return{animate:Ft(!0),whileInView:Ft(),whileHover:Ft(),whileTap:Ft(),whileDrag:Ft(),whileFocus:Ft(),exit:Ft()}}class Gl extends Tt{constructor(e){super(e),e.animationState||(e.animationState=Wl(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();this.unmount(),Ae(e)&&(this.unmount=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:n}=this.node.prevProps||{};e!==n&&this.updateAnimationControlsSubscription()}unmount(){}}let Yl=0;class Kl extends Tt{constructor(){super(...arguments),this.id=Yl++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:n,custom:r}=this.node.presenceContext,{isPresent:i}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===i)return;const o=this.node.animationState.setActive("exit",!e,{custom:r??this.node.getProps().custom});n&&!e&&o.then(()=>n(this.id))}mount(){const{register:e}=this.node.presenceContext||{};e&&(this.unmount=e(this.id))}unmount(){}}const _i={animation:{Feature:Gl},exit:{Feature:Kl}},Ni=(t,e)=>Math.abs(t-e);function ql(t,e){const n=Ni(t.x,e.x),r=Ni(t.y,e.y);return Math.sqrt(n**2+r**2)}class $i{constructor(e,n,{transformPagePoint:r,contextWindow:i,dragSnapToOrigin:o=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const f=Hn(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,p=ql(f.offset,{x:0,y:0})>=3;if(!h&&!p)return;const{point:g}=f,{timestamp:v}=K;this.history.push({...g,timestamp:v});const{onStart:T,onMove:C}=this.handlers;h||(T&&T(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),C&&C(this.lastMoveEvent,f)},this.handlePointerMove=(f,h)=>{this.lastMoveEvent=f,this.lastMoveEventInfo=zn(h,this.transformPagePoint),_.update(this.updatePoint,!0)},this.handlePointerUp=(f,h)=>{this.end();const{onEnd:p,onSessionEnd:g,resumeAnimation:v}=this.handlers;if(this.dragSnapToOrigin&&v&&v(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const T=Hn(f.type==="pointercancel"?this.lastMoveEventInfo:zn(h,this.transformPagePoint),this.history);this.startEvent&&p&&p(f,T),g&&g(f,T)},!zr(e))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=r,this.contextWindow=i||window;const s=ke(e),a=zn(s,this.transformPagePoint),{point:l}=a,{timestamp:u}=K;this.history=[{...l,timestamp:u}];const{onSessionStart:c}=n;c&&c(e,Hn(a,this.history)),this.removeListeners=pt(ht(this.contextWindow,"pointermove",this.handlePointerMove),ht(this.contextWindow,"pointerup",this.handlePointerUp),ht(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),ft(this.updatePoint)}}function zn(t,e){return e?{point:e(t.point)}:t}function Ui(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Hn({point:t},e){return{point:t,delta:Ui(t,Wi(e)),offset:Ui(t,Xl(e)),velocity:Zl(e,.1)}}function Xl(t){return t[0]}function Wi(t){return t[t.length-1]}function Zl(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,r=null;const i=Wi(t);for(;n>=0&&(r=t[n],!(i.timestamp-r.timestamp>Ct(e)));)n--;if(!r)return{x:0,y:0};const o=mt(i.timestamp-r.timestamp);if(o===0)return{x:0,y:0};const s={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return s.x===1/0&&(s.x=0),s.y===1/0&&(s.y=0),s}function nt(t){return t.max-t.min}function Gn(t,e=0,n=.01){return Math.abs(t-e)<=n}function zi(t,e,n,r=.5){t.origin=r,t.originPoint=N(e.min,e.max,t.origin),t.scale=nt(n)/nt(e),(Gn(t.scale,1,1e-4)||isNaN(t.scale))&&(t.scale=1),t.translate=N(n.min,n.max,t.origin)-t.originPoint,(Gn(t.translate)||isNaN(t.translate))&&(t.translate=0)}function pe(t,e,n,r){zi(t.x,e.x,n.x,r?r.originX:void 0),zi(t.y,e.y,n.y,r?r.originY:void 0)}function Hi(t,e,n){t.min=n.min+e.min,t.max=t.min+nt(e)}function Jl(t,e,n){Hi(t.x,e.x,n.x),Hi(t.y,e.y,n.y)}function Gi(t,e,n){t.min=e.min-n.min,t.max=t.min+nt(e)}function me(t,e,n){Gi(t.x,e.x,n.x),Gi(t.y,e.y,n.y)}function Ql(t,{min:e,max:n},r){return e!==void 0&&t<e?t=r?N(e,t,r.min):Math.max(t,e):n!==void 0&&t>n&&(t=r?N(n,t,r.max):Math.min(t,n)),t}function Yi(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 tu(t,{top:e,left:n,bottom:r,right:i}){return{x:Yi(t.x,n,i),y:Yi(t.y,e,r)}}function Ki(t,e){let n=e.min-t.min,r=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,r]=[r,n]),{min:n,max:r}}function eu(t,e){return{x:Ki(t.x,e.x),y:Ki(t.y,e.y)}}function nu(t,e){let n=.5;const r=nt(t),i=nt(e);return i>r?n=de(e.min,e.max-r,t.min):r>i&&(n=de(t.min,t.max-i,e.min)),Pt(0,1,n)}function ru(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 Yn=.35;function iu(t=Yn){return t===!1?t=0:t===!0&&(t=Yn),{x:qi(t,"left","right"),y:qi(t,"top","bottom")}}function qi(t,e,n){return{min:Xi(t,e),max:Xi(t,n)}}function Xi(t,e){return typeof t=="number"?t:t[e]||0}const Zi=()=>({translate:0,scale:1,origin:0,originPoint:0}),Yt=()=>({x:Zi(),y:Zi()}),Ji=()=>({min:0,max:0}),W=()=>({x:Ji(),y:Ji()});function it(t){return[t("x"),t("y")]}function Qi({top:t,left:e,right:n,bottom:r}){return{x:{min:e,max:n},y:{min:t,max:r}}}function su({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function ou(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),r=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Kn(t){return t===void 0||t===1}function qn({scale:t,scaleX:e,scaleY:n}){return!Kn(t)||!Kn(e)||!Kn(n)}function It(t){return qn(t)||ts(t)||t.z||t.rotate||t.rotateX||t.rotateY}function ts(t){return es(t.x)||es(t.y)}function es(t){return t&&t!=="0%"}function Ue(t,e,n){const r=t-n,i=e*r;return n+i}function ns(t,e,n,r,i){return i!==void 0&&(t=Ue(t,i,r)),Ue(t,n,r)+e}function Xn(t,e=0,n=1,r,i){t.min=ns(t.min,e,n,r,i),t.max=ns(t.max,e,n,r,i)}function rs(t,{x:e,y:n}){Xn(t.x,e.translate,e.scale,e.originPoint),Xn(t.y,n.translate,n.scale,n.originPoint)}function au(t,e,n,r=!1){const i=n.length;if(!i)return;e.x=e.y=1;let o,s;for(let a=0;a<i;a++){o=n[a],s=o.projectionDelta;const l=o.instance;l&&l.style&&l.style.display==="contents"||(r&&o.options.layoutScroll&&o.scroll&&o!==o.root&&Kt(t,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),s&&(e.x*=s.x.scale,e.y*=s.y.scale,rs(t,s)),r&&It(o.latestValues)&&Kt(t,o.latestValues))}e.x=is(e.x),e.y=is(e.y)}function is(t){return Number.isInteger(t)||t>1.0000000000001||t<.999999999999?t:1}function At(t,e){t.min=t.min+e,t.max=t.max+e}function ss(t,e,[n,r,i]){const o=e[i]!==void 0?e[i]:.5,s=N(t.min,t.max,o);Xn(t,e[n],e[r],s,e.scale)}const lu=["x","scaleX","originX"],uu=["y","scaleY","originY"];function Kt(t,e){ss(t.x,e,lu),ss(t.y,e,uu)}function os(t,e){return Qi(ou(t.getBoundingClientRect(),e))}function cu(t,e,n){const r=os(t,n),{scroll:i}=e;return i&&(At(r.x,i.offset.x),At(r.y,i.offset.y)),r}const as=({current:t})=>t?t.ownerDocument.defaultView:null,fu=new WeakMap;class du{constructor(e){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=W(),this.visualElement=e}start(e,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const i=c=>{const{dragSnapToOrigin:f}=this.getProps();f?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(ke(c,"page").point)},o=(c,f)=>{const{drag:h,dragPropagation:p,onDragStart:g}=this.getProps();if(h&&!p&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=Kr(h),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),it(T=>{let C=this.getAxisMotionValue(T).get()||0;if(ct.test(C)){const{projection:P}=this.visualElement;if(P&&P.layout){const b=P.layout.layoutBox[T];b&&(C=nt(b)*(parseFloat(C)/100))}}this.originPoint[T]=C}),g&&_.update(()=>g(c,f),!1,!0);const{animationState:v}=this.visualElement;v&&v.setActive("whileDrag",!0)},s=(c,f)=>{const{dragPropagation:h,dragDirectionLock:p,onDirectionLock:g,onDrag:v}=this.getProps();if(!h&&!this.openGlobalLock)return;const{offset:T}=f;if(p&&this.currentDirection===null){this.currentDirection=hu(T),this.currentDirection!==null&&g&&g(this.currentDirection);return}this.updateAxis("x",f.point,T),this.updateAxis("y",f.point,T),this.visualElement.render(),v&&v(c,f)},a=(c,f)=>this.stop(c,f),l=()=>it(c=>{var f;return this.getAnimationState(c)==="paused"&&((f=this.getAxisMotionValue(c).animation)===null||f===void 0?void 0:f.play())}),{dragSnapToOrigin:u}=this.getProps();this.panSession=new $i(e,{onSessionStart:i,onStart:o,onMove:s,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,contextWindow:as(this.visualElement)})}stop(e,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:o}=this.getProps();o&&_.update(()=>o(e,n))}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:r}=this.getProps();!r&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(e,n,r){const{drag:i}=this.getProps();if(!r||!We(e,i,this.currentDirection))return;const o=this.getAxisMotionValue(e);let s=this.originPoint[e]+r[e];this.constraints&&this.constraints[e]&&(s=Ql(s,this.constraints[e],this.elastic[e])),o.set(s)}resolveConstraints(){var e;const{dragConstraints:n,dragElastic:r}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(e=this.visualElement.projection)===null||e===void 0?void 0:e.layout,o=this.constraints;n&&Wt(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&i?this.constraints=tu(i.layoutBox,n):this.constraints=!1,this.elastic=iu(r),o!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&it(s=>{this.getAxisMotionValue(s)&&(this.constraints[s]=ru(i.layoutBox[s],this.constraints[s]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!Wt(e))return!1;const r=e.current;rt(r!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");const{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=cu(r,i.root,this.visualElement.getTransformPagePoint());let s=eu(i.layout.layoutBox,o);if(n){const a=n(su(s));this.hasMutatedConstraints=!!a,a&&(s=Qi(a))}return s}startAnimation(e){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:o,dragSnapToOrigin:s,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},u=it(c=>{if(!We(c,n,this.currentDirection))return;let f=l&&l[c]||{};s&&(f={min:0,max:0});const h=i?200:1e6,p=i?40:1e7,g={type:"inertia",velocity:r?e[c]:0,bounceStiffness:h,bounceDamping:p,timeConstant:750,restDelta:1,restSpeed:10,...o,...f};return this.startAxisValueAnimation(c,g)});return Promise.all(u).then(a)}startAxisValueAnimation(e,n){const r=this.getAxisMotionValue(e);return r.start(Bn(e,r,0,n))}stopAnimation(){it(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){it(e=>{var n;return(n=this.getAxisMotionValue(e).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(e){var n;return(n=this.getAxisMotionValue(e).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(e){const n="_drag"+e.toUpperCase(),r=this.visualElement.getProps(),i=r[n];return i||this.visualElement.getValue(e,(r.initial?r.initial[e]:void 0)||0)}snapToCursor(e){it(n=>{const{drag:r}=this.getProps();if(!We(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(n);if(i&&i.layout){const{min:s,max:a}=i.layout.layoutBox[n];o.set(e[n]-N(s,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!Wt(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};it(s=>{const a=this.getAxisMotionValue(s);if(a){const l=a.get();i[s]=nu({min:l,max:l},this.constraints[s])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),it(s=>{if(!We(s,e,null))return;const a=this.getAxisMotionValue(s),{min:l,max:u}=this.constraints[s];a.set(N(l,u,i[s]))})}addListeners(){if(!this.visualElement.current)return;fu.set(this.visualElement,this);const e=this.visualElement.current,n=ht(e,"pointerdown",l=>{const{drag:u,dragListener:c=!0}=this.getProps();u&&c&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();Wt(l)&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,o=i.addEventListener("measure",r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),r();const s=dt(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&(it(c=>{const f=this.getAxisMotionValue(c);f&&(this.originPoint[c]+=l[c].translate,f.set(f.get()+l[c].translate))}),this.visualElement.render())});return()=>{s(),n(),o(),a&&a()}}getProps(){const e=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:s=Yn,dragMomentum:a=!0}=e;return{...e,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:o,dragElastic:s,dragMomentum:a}}}function We(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function hu(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class pu extends Tt{constructor(e){super(e),this.removeGroupControls=U,this.removeListeners=U,this.controls=new du(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||U}unmount(){this.removeGroupControls(),this.removeListeners()}}const ls=t=>(e,n)=>{t&&_.update(()=>t(e,n))};class mu extends Tt{constructor(){super(...arguments),this.removePointerDownListener=U}onPointerDown(e){this.session=new $i(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:as(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:ls(e),onStart:ls(n),onMove:r,onEnd:(o,s)=>{delete this.session,i&&_.update(()=>i(o,s))}}}mount(){this.removePointerDownListener=ht(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}function gu(){const t=m.useContext(Te);if(t===null)return[!0,null];const{isPresent:e,onExitComplete:n,register:r}=t,i=m.useId();return m.useEffect(()=>r(i),[]),!e&&n?[!1,()=>n&&n(i)]:[!0]}const ze={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function us(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const ge={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(A.test(t))t=parseFloat(t);else return t;const n=us(t,e.target.x),r=us(t,e.target.y);return`${n}% ${r}%`}},yu={correct:(t,{treeScale:e,projectionDelta:n})=>{const r=t,i=St.parse(t);if(i.length>5)return r;const o=St.createTransformer(t),s=typeof i[0]!="number"?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;i[0+s]/=a,i[1+s]/=l;const u=N(a,l,.5);return typeof i[2+s]=="number"&&(i[2+s]/=u),typeof i[3+s]=="number"&&(i[3+s]/=u),o(i)}};class vu extends m.Component{componentDidMount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:o}=e;Vo(xu),o&&(n.group&&n.group.add(o),r&&r.register&&i&&r.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),ze.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:n,visualElement:r,drag:i,isPresent:o}=this.props,s=r.projection;return s&&(s.isPresent=o,i||e.layoutDependency!==n||n===void 0?s.willUpdate():this.safeToRemove(),e.isPresent!==o&&(o?s.promote():s.relegate()||_.postRender(()=>{const a=s.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),sn.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=e;i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),r&&r.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function cs(t){const[e,n]=gu(),r=m.useContext(un);return m.createElement(vu,{...t,layoutGroup:r,switchLayoutGroup:m.useContext(Ar),isPresent:e,safeToRemove:n})}const xu={borderRadius:{...ge,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:ge,borderTopRightRadius:ge,borderBottomLeftRadius:ge,borderBottomRightRadius:ge,boxShadow:yu},fs=["TopLeft","TopRight","BottomLeft","BottomRight"],bu=fs.length,ds=t=>typeof t=="string"?parseFloat(t):t,hs=t=>typeof t=="number"||A.test(t);function Pu(t,e,n,r,i,o){i?(t.opacity=N(0,n.opacity!==void 0?n.opacity:1,wu(r)),t.opacityExit=N(e.opacity!==void 0?e.opacity:1,0,Tu(r))):o&&(t.opacity=N(e.opacity!==void 0?e.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let s=0;s<bu;s++){const a=`border${fs[s]}Radius`;let l=ps(e,a),u=ps(n,a);if(l===void 0&&u===void 0)continue;l||(l=0),u||(u=0),l===0||u===0||hs(l)===hs(u)?(t[a]=Math.max(N(ds(l),ds(u),r),0),(ct.test(u)||ct.test(l))&&(t[a]+="%")):t[a]=u}(e.rotate||n.rotate)&&(t.rotate=N(e.rotate||0,n.rotate||0,r))}function ps(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const wu=ms(0,.5,li),Tu=ms(.5,.95,U);function ms(t,e,n){return r=>r<t?0:r>e?1:n(de(t,e,r))}function gs(t,e){t.min=e.min,t.max=e.max}function st(t,e){gs(t.x,e.x),gs(t.y,e.y)}function ys(t,e,n,r,i){return t-=e,t=Ue(t,1/n,r),i!==void 0&&(t=Ue(t,1/i,r)),t}function Cu(t,e=0,n=1,r=.5,i,o=t,s=t){if(ct.test(e)&&(e=parseFloat(e),e=N(s.min,s.max,e/100)-s.min),typeof e!="number")return;let a=N(o.min,o.max,r);t===o&&(a-=e),t.min=ys(t.min,e,n,a,i),t.max=ys(t.max,e,n,a,i)}function vs(t,e,[n,r,i],o,s){Cu(t,e[n],e[r],e[i],e.scale,o,s)}const Su=["x","scaleX","originX"],Au=["y","scaleY","originY"];function xs(t,e,n,r){vs(t.x,e,Su,n?n.x:void 0,r?r.x:void 0),vs(t.y,e,Au,n?n.y:void 0,r?r.y:void 0)}function bs(t){return t.translate===0&&t.scale===1}function Ps(t){return bs(t.x)&&bs(t.y)}function Vu(t,e){return t.x.min===e.x.min&&t.x.max===e.x.max&&t.y.min===e.y.min&&t.y.max===e.y.max}function ws(t,e){return Math.round(t.x.min)===Math.round(e.x.min)&&Math.round(t.x.max)===Math.round(e.x.max)&&Math.round(t.y.min)===Math.round(e.y.min)&&Math.round(t.y.max)===Math.round(e.y.max)}function Ts(t){return nt(t.x)/nt(t.y)}class Eu{constructor(){this.members=[]}add(e){_n(this.members,e),e.scheduleRender()}remove(e){if(Nn(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 r;for(let i=n;i>=0;i--){const o=this.members[i];if(o.isPresent!==!1){r=o;break}}return r?(this.promote(r),!0):!1}promote(e,n){const r=this.lead;if(e!==r&&(this.prevLead=r,this.lead=e,e.show(),r)){r.instance&&r.scheduleRender(),e.scheduleRender(),e.resumeFrom=r,n&&(e.resumeFrom.preserveOpacity=!0),r.snapshot&&(e.snapshot=r.snapshot,e.snapshot.latestValues=r.animationValues||r.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:i}=e.options;i===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(e=>{const{options:n,resumingFrom:r}=e;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function Cs(t,e,n){let r="";const i=t.x.translate/e.x,o=t.y.translate/e.y;if((i||o)&&(r=`translate3d(${i}px, ${o}px, 0) `),(e.x!==1||e.y!==1)&&(r+=`scale(${1/e.x}, ${1/e.y}) `),n){const{rotate:l,rotateX:u,rotateY:c}=n;l&&(r+=`rotate(${l}deg) `),u&&(r+=`rotateX(${u}deg) `),c&&(r+=`rotateY(${c}deg) `)}const s=t.x.scale*e.x,a=t.y.scale*e.y;return(s!==1||a!==1)&&(r+=`scale(${s}, ${a})`),r||"none"}const Du=(t,e)=>t.depth-e.depth;class ju{constructor(){this.children=[],this.isDirty=!1}add(e){_n(this.children,e),this.isDirty=!0}remove(e){Nn(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(Du),this.isDirty=!1,this.children.forEach(e)}}function Mu(t,e){const n=Rt.now(),r=({timestamp:i})=>{const o=i-n;o>=e&&(ft(r),t(o-e))};return _.read(r,!0),()=>ft(r)}function Ou(t){window.MotionDebug&&window.MotionDebug.record(t)}function Lu(t){return t instanceof SVGElement&&t.tagName!=="svg"}function ku(t,e,n){const r=Q(t)?t:Gt(t);return r.start(Bn("",r,e,n)),r.animation}const Ss=["","X","Y","Z"],Ru={visibility:"hidden"},As=1e3;let Fu=0;const Bt={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0};function Vs({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(s={},a=e==null?void 0:e()){this.id=Fu++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,Bt.totalNodes=Bt.resolvedTargetDeltas=Bt.recalculatedProjection=0,this.nodes.forEach(_u),this.nodes.forEach(zu),this.nodes.forEach(Hu),this.nodes.forEach(Nu),Ou(Bt)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=s,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 ju)}addEventListener(s,a){return this.eventHandlers.has(s)||this.eventHandlers.set(s,new $n),this.eventHandlers.get(s).add(a)}notifyListeners(s,...a){const l=this.eventHandlers.get(s);l&&l.notify(...a)}hasListeners(s){return this.eventHandlers.has(s)}mount(s,a=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=Lu(s),this.instance=s;const{layoutId:l,layout:u,visualElement:c}=this.options;if(c&&!c.current&&c.mount(s),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),a&&(u||l)&&(this.isLayoutDirty=!0),t){let f;const h=()=>this.root.updateBlockedByResize=!1;t(s,()=>{this.root.updateBlockedByResize=!0,f&&f(),f=Mu(h,250),ze.hasAnimatedSinceResize&&(ze.hasAnimatedSinceResize=!1,this.nodes.forEach(Ds))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&c&&(l||u)&&this.addEventListener("didUpdate",({delta:f,hasLayoutChanged:h,hasRelativeTargetChanged:p,layout:g})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const v=this.options.transition||c.getDefaultTransition()||Xu,{onLayoutAnimationStart:T,onLayoutAnimationComplete:C}=c.getProps(),P=!this.targetLayout||!ws(this.targetLayout,g)||p,b=!h&&p;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||b||h&&(P||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(f,b);const S={...In(v,"layout"),onPlay:T,onComplete:C};(c.shouldReduceMotion||this.options.layoutRoot)&&(S.delay=0,S.type=!1),this.startAnimation(S)}else h||Ds(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=g})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const s=this.getStack();s&&s.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,ft(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(Gu),this.animationId++)}getTransformTemplate(){const{visualElement:s}=this.options;return s&&s.getProps().transformTemplate}willUpdate(s=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let 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(),s&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Es);return}this.isUpdating||this.nodes.forEach(Uu),this.isUpdating=!1,window.HandoffCancelAllAnimations&&window.HandoffCancelAllAnimations(),this.nodes.forEach(Wu),this.nodes.forEach(Iu),this.nodes.forEach(Bu),this.clearAllSnapshots();const a=Rt.now();K.delta=Pt(0,1e3/60,a-K.timestamp),K.timestamp=a,K.isProcessing=!0,xn.update.process(K),xn.preRender.process(K),xn.render.process(K),K.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,sn.read(()=>this.update()))}clearAllSnapshots(){this.nodes.forEach($u),this.sharedNodes.forEach(Yu)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,_.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){_.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}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 s=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,s?s.layoutBox:void 0)}updateScroll(s="measure"){let a=!!(this.options.layoutScroll&&this.instance);this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===s&&(a=!1),a&&(this.scroll={animationId:this.root.animationId,phase:s,isRoot:r(this.instance),offset:n(this.instance)})}resetTransform(){if(!i)return;const s=this.isLayoutDirty||this.shouldResetTransform,a=this.projectionDelta&&!Ps(this.projectionDelta),l=this.getTransformTemplate(),u=l?l(this.latestValues,""):void 0,c=u!==this.prevTransformTemplateValue;s&&(a||It(this.latestValues)||c)&&(i(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(s=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return s&&(l=this.removeTransform(l)),Zu(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:s}=this.options;if(!s)return W();const a=s.measureViewportBox(),{scroll:l}=this.root;return l&&(At(a.x,l.offset.x),At(a.y,l.offset.y)),a}removeElementScroll(s){const a=W();st(a,s);for(let l=0;l<this.path.length;l++){const u=this.path[l],{scroll:c,options:f}=u;if(u!==this.root&&c&&f.layoutScroll){if(c.isRoot){st(a,s);const{scroll:h}=this.root;h&&(At(a.x,-h.offset.x),At(a.y,-h.offset.y))}At(a.x,c.offset.x),At(a.y,c.offset.y)}}return a}applyTransform(s,a=!1){const l=W();st(l,s);for(let u=0;u<this.path.length;u++){const c=this.path[u];!a&&c.options.layoutScroll&&c.scroll&&c!==c.root&&Kt(l,{x:-c.scroll.offset.x,y:-c.scroll.offset.y}),It(c.latestValues)&&Kt(l,c.latestValues)}return It(this.latestValues)&&Kt(l,this.latestValues),l}removeTransform(s){const a=W();st(a,s);for(let l=0;l<this.path.length;l++){const u=this.path[l];if(!u.instance||!It(u.latestValues))continue;qn(u.latestValues)&&u.updateSnapshot();const c=W(),f=u.measurePageBox();st(c,f),xs(a,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,c)}return It(this.latestValues)&&xs(a,this.latestValues),a}setTargetDelta(s){this.targetDelta=s,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(s){this.options={...this.options,...s,crossfade:s.crossfade!==void 0?s.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(s=!1){var a;const l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);const u=!!this.resumingFrom||this!==l;if(!(s||u&&this.isSharedProjectionDirty||this.isProjectionDirty||!((a=this.parent)===null||a===void 0)&&a.isProjectionDirty||this.attemptToResolveRelativeTarget))return;const{layout:f,layoutId:h}=this.options;if(!(!this.layout||!(f||h))){if(this.resolvedRelativeTargetAt=K.timestamp,!this.targetDelta&&!this.relativeTarget){const p=this.getClosestProjectingParent();p&&p.layout&&this.animationProgress!==1?(this.relativeParent=p,this.forceRelativeParentToResolveTarget(),this.relativeTarget=W(),this.relativeTargetOrigin=W(),me(this.relativeTargetOrigin,this.layout.layoutBox,p.layout.layoutBox),st(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=W(),this.targetWithTransforms=W()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Jl(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):st(this.target,this.layout.layoutBox),rs(this.target,this.targetDelta)):st(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const p=this.getClosestProjectingParent();p&&!!p.resumingFrom==!!this.resumingFrom&&!p.options.layoutScroll&&p.target&&this.animationProgress!==1?(this.relativeParent=p,this.forceRelativeParentToResolveTarget(),this.relativeTarget=W(),this.relativeTargetOrigin=W(),me(this.relativeTargetOrigin,this.target,p.target),st(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}Bt.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||qn(this.parent.latestValues)||ts(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var s;const a=this.getLead(),l=!!this.resumingFrom||this!==a;let u=!0;if((this.isProjectionDirty||!((s=this.parent)===null||s===void 0)&&s.isProjectionDirty)&&(u=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(u=!1),this.resolvedRelativeTargetAt===K.timestamp&&(u=!1),u)return;const{layout:c,layoutId:f}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(c||f))return;st(this.layoutCorrected,this.layout.layoutBox);const h=this.treeScale.x,p=this.treeScale.y;au(this.layoutCorrected,this.treeScale,this.path,l),a.layout&&!a.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(a.target=a.layout.layoutBox,a.targetWithTransforms=W());const{target:g}=a;if(!g){this.projectionTransform&&(this.projectionDelta=Yt(),this.projectionTransform="none",this.scheduleRender());return}this.projectionDelta||(this.projectionDelta=Yt(),this.projectionDeltaWithTransform=Yt());const v=this.projectionTransform;pe(this.projectionDelta,this.layoutCorrected,g,this.latestValues),this.projectionTransform=Cs(this.projectionDelta,this.treeScale),(this.projectionTransform!==v||this.treeScale.x!==h||this.treeScale.y!==p)&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",g)),Bt.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(s=!0){if(this.options.scheduleRender&&this.options.scheduleRender(),s){const a=this.getStack();a&&a.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}setAnimationOrigin(s,a=!1){const l=this.snapshot,u=l?l.latestValues:{},c={...this.latestValues},f=Yt();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const h=W(),p=l?l.source:void 0,g=this.layout?this.layout.source:void 0,v=p!==g,T=this.getStack(),C=!T||T.members.length<=1,P=!!(v&&!C&&this.options.crossfade===!0&&!this.path.some(qu));this.animationProgress=0;let b;this.mixTargetDelta=S=>{const E=S/1e3;js(f.x,s.x,E),js(f.y,s.y,E),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(me(h,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Ku(this.relativeTarget,this.relativeTargetOrigin,h,E),b&&Vu(this.relativeTarget,b)&&(this.isProjectionDirty=!1),b||(b=W()),st(b,this.relativeTarget)),v&&(this.animationValues=c,Pu(c,u,this.latestValues,E,P,C)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=E},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(s){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(ft(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=_.update(()=>{ze.hasAnimatedSinceResize=!0,this.currentAnimation=ku(0,As,{...s,onUpdate:a=>{this.mixTargetDelta(a),s.onUpdate&&s.onUpdate(a)},onComplete:()=>{s.onComplete&&s.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 s=this.getStack();s&&s.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(As),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const s=this.getLead();let{targetWithTransforms:a,target:l,layout:u,latestValues:c}=s;if(!(!a||!l||!u)){if(this!==s&&this.layout&&u&&Rs(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||W();const f=nt(this.layout.layoutBox.x);l.x.min=s.target.x.min,l.x.max=l.x.min+f;const h=nt(this.layout.layoutBox.y);l.y.min=s.target.y.min,l.y.max=l.y.min+h}st(a,l),Kt(a,c),pe(this.projectionDeltaWithTransform,this.layoutCorrected,a,c)}}registerSharedNode(s,a){this.sharedNodes.has(s)||this.sharedNodes.set(s,new Eu),this.sharedNodes.get(s).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 s=this.getStack();return s?s.lead===this:!0}getLead(){var s;const{layoutId:a}=this.options;return a?((s=this.getStack())===null||s===void 0?void 0:s.lead)||this:this}getPrevLead(){var s;const{layoutId:a}=this.options;return a?(s=this.getStack())===null||s===void 0?void 0:s.prevLead:void 0}getStack(){const{layoutId:s}=this.options;if(s)return this.root.sharedNodes.get(s)}promote({needsReset:s,transition:a,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),s&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const s=this.getStack();return s?s.relegate(this):!1}resetRotation(){const{visualElement:s}=this.options;if(!s)return;let a=!1;const{latestValues:l}=s;if((l.rotate||l.rotateX||l.rotateY||l.rotateZ)&&(a=!0),!a)return;const u={};for(let c=0;c<Ss.length;c++){const f="rotate"+Ss[c];l[f]&&(u[f]=l[f],s.setStaticValue(f,0))}s.render();for(const c in u)s.setStaticValue(c,u[c]);s.scheduleRender()}getProjectionStyles(s){var a,l;if(!this.instance||this.isSVG)return;if(!this.isVisible)return Ru;const u={visibility:""},c=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,u.opacity="",u.pointerEvents=Le(s==null?void 0:s.pointerEvents)||"",u.transform=c?c(this.latestValues,""):"none",u;const f=this.getLead();if(!this.projectionDelta||!this.layout||!f.target){const v={};return this.options.layoutId&&(v.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,v.pointerEvents=Le(s==null?void 0:s.pointerEvents)||""),this.hasProjected&&!It(this.latestValues)&&(v.transform=c?c({},""):"none",this.hasProjected=!1),v}const h=f.animationValues||f.latestValues;this.applyTransformsToTarget(),u.transform=Cs(this.projectionDeltaWithTransform,this.treeScale,h),c&&(u.transform=c(h,u.transform));const{x:p,y:g}=this.projectionDelta;u.transformOrigin=`${p.origin*100}% ${g.origin*100}% 0`,f.animationValues?u.opacity=f===this?(l=(a=h.opacity)!==null&&a!==void 0?a:this.latestValues.opacity)!==null&&l!==void 0?l:1:this.preserveOpacity?this.latestValues.opacity:h.opacityExit:u.opacity=f===this?h.opacity!==void 0?h.opacity:"":h.opacityExit!==void 0?h.opacityExit:0;for(const v in Ee){if(h[v]===void 0)continue;const{correct:T,applyTo:C}=Ee[v],P=u.transform==="none"?h[v]:T(h[v],f);if(C){const b=C.length;for(let S=0;S<b;S++)u[C[S]]=P}else u[v]=P}return this.options.layoutId&&(u.pointerEvents=f===this?Le(s==null?void 0:s.pointerEvents)||"":"none"),u}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(s=>{var a;return(a=s.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(Es),this.root.sharedNodes.clear()}}}function Iu(t){t.updateLayout()}function Bu(t){var e;const n=((e=t.resumeFrom)===null||e===void 0?void 0:e.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&n&&t.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:i}=t.layout,{animationType:o}=t.options,s=n.source!==t.layout.source;o==="size"?it(f=>{const h=s?n.measuredBox[f]:n.layoutBox[f],p=nt(h);h.min=r[f].min,h.max=h.min+p}):Rs(o,n.layoutBox,r)&&it(f=>{const h=s?n.measuredBox[f]:n.layoutBox[f],p=nt(r[f]);h.max=h.min+p,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[f].max=t.relativeTarget[f].min+p)});const a=Yt();pe(a,r,n.layoutBox);const l=Yt();s?pe(l,t.applyTransform(i,!0),n.measuredBox):pe(l,r,n.layoutBox);const u=!Ps(a);let c=!1;if(!t.resumeFrom){const f=t.getClosestProjectingParent();if(f&&!f.resumeFrom){const{snapshot:h,layout:p}=f;if(h&&p){const g=W();me(g,n.layoutBox,h.layoutBox);const v=W();me(v,r,p.layoutBox),ws(g,v)||(c=!0),f.options.layoutRoot&&(t.relativeTarget=v,t.relativeTargetOrigin=g,t.relativeParent=f)}}}t.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:l,layoutDelta:a,hasLayoutChanged:u,hasRelativeTargetChanged:c})}else if(t.isLead()){const{onExitComplete:r}=t.options;r&&r()}t.options.transition=void 0}function _u(t){Bt.totalNodes++,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 Nu(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function $u(t){t.clearSnapshot()}function Es(t){t.clearMeasurements()}function Uu(t){t.isLayoutDirty=!1}function Wu(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function Ds(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function zu(t){t.resolveTargetDelta()}function Hu(t){t.calcProjection()}function Gu(t){t.resetRotation()}function Yu(t){t.removeLeadSnapshot()}function js(t,e,n){t.translate=N(e.translate,0,n),t.scale=N(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function Ms(t,e,n,r){t.min=N(e.min,n.min,r),t.max=N(e.max,n.max,r)}function Ku(t,e,n,r){Ms(t.x,e.x,n.x,r),Ms(t.y,e.y,n.y,r)}function qu(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const Xu={duration:.45,ease:[.4,0,.1,1]},Os=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),Ls=Os("applewebkit/")&&!Os("chrome/")?Math.round:U;function ks(t){t.min=Ls(t.min),t.max=Ls(t.max)}function Zu(t){ks(t.x),ks(t.y)}function Rs(t,e,n){return t==="position"||t==="preserve-aspect"&&!Gn(Ts(e),Ts(n),.2)}const Ju=Vs({attachResizeListener:(t,e)=>dt(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Zn={current:void 0},Fs=Vs({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!Zn.current){const t=new Ju({});t.mount(window),t.setOptions({layoutScroll:!0}),Zn.current=t}return Zn.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),Qu={pan:{Feature:mu},drag:{Feature:pu,ProjectionNode:Fs,MeasureLayout:cs}},tc=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function ec(t){const e=tc.exec(t);if(!e)return[,];const[,n,r]=e;return[n,r]}const nc=4;function Jn(t,e,n=1){rt(n<=nc,`Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`);const[r,i]=ec(t);if(!r)return;const o=window.getComputedStyle(e).getPropertyValue(r);if(o){const s=o.trim();return Li(s)?parseFloat(s):s}else return De(i)?Jn(i,e,n+1):i}function rc(t,{...e},n){const r=t.current;if(!(r instanceof Element))return{target:e,transitionEnd:n};n&&(n={...n}),t.values.forEach(i=>{const o=i.get();if(!De(o))return;const s=Jn(o,r);s&&i.set(s)});for(const i in e){const o=e[i];if(!De(o))continue;const s=Jn(o,r);s&&(e[i]=s,n||(n={}),n[i]===void 0&&(n[i]=o))}return{target:e,transitionEnd:n}}const ic=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),Is=t=>ic.has(t),sc=t=>Object.keys(t).some(Is),He=t=>t===zt||t===A,Bs=(t,e)=>parseFloat(t.split(", ")[e]),_s=(t,e)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const i=r.match(/^matrix3d\((.+)\)$/);if(i)return Bs(i[1],e);{const o=r.match(/^matrix\((.+)\)$/);return o?Bs(o[1],t):0}},oc=new Set(["x","y","z"]),ac=ie.filter(t=>!oc.has(t));function lc(t){const e=[];return ac.forEach(n=>{const r=t.getValue(n);r!==void 0&&(e.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),e.length&&t.render(),e}const qt={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:_s(4,13),y:_s(5,14)};qt.translateX=qt.x,qt.translateY=qt.y;const uc=(t,e,n)=>{const r=e.measureViewportBox(),i=e.current,o=getComputedStyle(i),{display:s}=o,a={};s==="none"&&e.setStaticValue("display",t.display||"block"),n.forEach(u=>{a[u]=qt[u](r,o)}),e.render();const l=e.measureViewportBox();return n.forEach(u=>{const c=e.getValue(u);c&&c.jump(a[u]),t[u]=qt[u](l,o)}),t},cc=(t,e,n={},r={})=>{e={...e},r={...r};const i=Object.keys(e).filter(Is);let o=[],s=!1;const a=[];if(i.forEach(l=>{const u=t.getValue(l);if(!t.hasValue(l))return;let c=n[l],f=he(c);const h=e[l];let p;if(Oe(h)){const g=h.length,v=h[0]===null?1:0;c=h[v],f=he(c);for(let T=v;T<g&&h[T]!==null;T++)p?rt(he(h[T])===p,"All keyframes must be of the same type"):(p=he(h[T]),rt(p===f||He(f)&&He(p),"Keyframes must be of the same dimension as the current value"))}else p=he(h);if(f!==p)if(He(f)&&He(p)){const g=u.get();typeof g=="string"&&u.set(parseFloat(g)),typeof h=="string"?e[l]=parseFloat(h):Array.isArray(h)&&p===A&&(e[l]=h.map(parseFloat))}else f!=null&&f.transform&&(p!=null&&p.transform)&&(c===0||h===0)?c===0?u.set(p.transform(c)):e[l]=f.transform(h):(s||(o=lc(t),s=!0),a.push(l),r[l]=r[l]!==void 0?r[l]:e[l],u.jump(h))}),a.length){const l=a.indexOf("height")>=0?window.pageYOffset:null,u=uc(e,t,a);return o.length&&o.forEach(([c,f])=>{t.getValue(c).set(f)}),t.render(),Ce&&l!==null&&window.scrollTo({top:l}),{target:u,transitionEnd:r}}else return{target:e,transitionEnd:r}};function fc(t,e,n,r){return sc(e)?cc(t,e,n,r):{target:e,transitionEnd:r}}const dc=(t,e,n,r)=>{const i=rc(t,e,r);return e=i.target,r=i.transitionEnd,fc(t,e,n,r)},Qn={current:null},Ns={current:!1};function hc(){if(Ns.current=!0,!!Ce)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Qn.current=t.matches;t.addListener(e),e()}else Qn.current=!1}function pc(t,e,n){const{willChange:r}=e;for(const i in e){const o=e[i],s=n[i];if(Q(o))t.addValue(i,o),$e(r)&&r.add(i),process.env.NODE_ENV==="development"&&Un(o.version==="11.0.8",`Attempting to mix Framer Motion versions ${o.version} with 11.0.8 may not work as expected.`);else if(Q(s))t.addValue(i,Gt(o,{owner:t})),$e(r)&&r.remove(i);else if(s!==o)if(t.hasValue(i)){const a=t.getValue(i);!a.hasAnimated&&a.set(o)}else{const a=t.getStaticValue(i);t.addValue(i,Gt(a!==void 0?a:o,{owner:t}))}}for(const i in n)e[i]===void 0&&t.removeValue(i);return e}const $s=new WeakMap,Us=Object.keys(re),mc=Us.length,Ws=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],gc=an.length;class yc{constructor({parent:e,props:n,presenceContext:r,reducedMotionConfig:i,visualState:o},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.scheduleRender=()=>_.render(this.render,!1,!0);const{latestValues:a,renderState:l}=o;this.latestValues=a,this.baseTarget={...a},this.initialValues=n.initial?{...a}:{},this.renderState=l,this.parent=e,this.props=n,this.presenceContext=r,this.depth=e?e.depth+1:0,this.reducedMotionConfig=i,this.options=s,this.isControllingVariants=Ve(n),this.isVariantNode=Tr(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:u,...c}=this.scrapeMotionValuesFromProps(n,{});for(const f in c){const h=c[f];a[f]!==void 0&&Q(h)&&(h.set(a[f],!1),$e(u)&&u.add(f))}}scrapeMotionValuesFromProps(e,n){return{}}mount(e){this.current=e,$s.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,r)=>this.bindToMotionValue(r,n)),Ns.current||hc(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Qn.current,process.env.NODE_ENV!=="production"&&Un(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected."),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){$s.delete(this.current),this.projection&&this.projection.unmount(),ft(this.notifyUpdate),ft(this.render),this.valueSubscriptions.forEach(e=>e()),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const e in this.events)this.events[e].clear();for(const e in this.features)this.features[e].unmount();this.current=null}bindToMotionValue(e,n){const r=Lt.has(e),i=n.on("change",s=>{this.latestValues[e]=s,this.props.onUpdate&&_.update(this.notifyUpdate,!1,!0),r&&this.projection&&(this.projection.isTransformDirty=!0)}),o=n.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(e,()=>{i(),o()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}loadFeatures({children:e,...n},r,i,o){let s,a;if(process.env.NODE_ENV!=="production"&&i&&r){const l="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";n.ignoreStrict?ue(!1,l):rt(!1,l)}for(let l=0;l<mc;l++){const u=Us[l],{isEnabled:c,Feature:f,ProjectionNode:h,MeasureLayout:p}=re[u];h&&(s=h),c(n)&&(!this.features[u]&&f&&(this.features[u]=new f(this)),p&&(a=p))}if((this.type==="html"||this.type==="svg")&&!this.projection&&s){this.projection=new s(this.latestValues,this.parent&&this.parent.projection);const{layoutId:l,layout:u,drag:c,dragConstraints:f,layoutScroll:h,layoutRoot:p}=n;this.projection.setOptions({layoutId:l,layout:u,alwaysMeasureLayout:!!c||f&&Wt(f),visualElement:this,scheduleRender:()=>this.scheduleRender(),animationType:typeof u=="string"?u:"both",initialPromotionConfig:o,layoutScroll:h,layoutRoot:p})}return a}updateFeatures(){for(const e in this.features){const n=this.features[e];n.isMounted?n.update():(n.mount(),n.isMounted=!0)}}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):W()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,n){this.latestValues[e]=n}makeTargetAnimatable(e,n=!0){return this.makeTargetAnimatableFromInstance(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 r=0;r<Ws.length;r++){const i=Ws[r];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const o=e["on"+i];o&&(this.propEventSubscriptions[i]=this.on(i,o))}this.prevMotionValues=pc(this,this.scrapeMotionValuesFromProps(e,this.prevProps),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}getVariantContext(e=!1){if(e)return this.parent?this.parent.getVariantContext():void 0;if(!this.isControllingVariants){const r=this.parent?this.parent.getVariantContext()||{}:{};return this.props.initial!==void 0&&(r.initial=this.props.initial),r}const n={};for(let r=0;r<gc;r++){const i=an[r],o=this.props[i];(ne(o)||o===!1)&&(n[i]=o)}return n}addVariantChild(e){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(e),()=>n.variantChildren.delete(e)}addValue(e,n){n!==this.values.get(e)&&(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 r=this.values.get(e);return r===void 0&&n!==void 0&&(r=Gt(n,{owner:this}),this.addValue(e,r)),r}readValue(e){var n;return this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:(n=this.getBaseTargetFromProps(this.props,e))!==null&&n!==void 0?n:this.readValueFromInstance(this.current,e,this.options)}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){var n;const{initial:r}=this.props,i=typeof r=="string"||typeof r=="object"?(n=yn(this.props,r))===null||n===void 0?void 0:n[e]:void 0;if(r&&i!==void 0)return i;const o=this.getBaseTargetFromProps(this.props,e);return o!==void 0&&!Q(o)?o:this.initialValues[e]!==void 0&&i===void 0?void 0:this.baseTarget[e]}on(e,n){return this.events[e]||(this.events[e]=new $n),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}}class zs extends yc{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:r}){delete n[e],delete r[e]}makeTargetAnimatableFromInstance({transition:e,transitionEnd:n,...r},i){const o=kl(r,e||{},this);if(i){Ol(this,r,o);const s=dc(this,r,o,n);n=s.transitionEnd,r=s.target}return{transition:e,transitionEnd:n,...r}}}function vc(t){return window.getComputedStyle(t)}class xc extends zs{constructor(){super(...arguments),this.type="html"}readValueFromInstance(e,n){if(Lt.has(n)){const r=Fn(n);return r&&r.default||0}else{const r=vc(e),i=(jr(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(e,{transformPagePoint:n}){return os(e,n)}build(e,n,r,i){dn(e,n,r,i.transformTemplate)}scrapeMotionValuesFromProps(e,n){return gn(e,n)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;Q(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}renderInstance(e,n,r,i){Br(e,n,r,i)}}class bc extends zs{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(Lt.has(n)){const r=Fn(n);return r&&r.default||0}return n=_r.has(n)?n:rn(n),e.getAttribute(n)}measureInstanceViewportBox(){return W()}scrapeMotionValuesFromProps(e,n){return $r(e,n)}build(e,n,r,i){pn(e,n,r,this.isSVGTag,i.transformTemplate)}renderInstance(e,n,r,i){Nr(e,n,r,i)}mount(e){this.isSVGTag=mn(e.tagName),super.mount(e)}}const Hs=(t,e)=>cn(t)?new bc(e,{enableHardwareAcceleration:!1}):new xc(e,{enableHardwareAcceleration:!0}),Pc={..._i,...Jr,...Qu,...{layout:{ProjectionNode:Fs,MeasureLayout:cs}}},wc=Vr((t,e)=>Wr(t,e,Pc,Hs)),_t=Vr(Wr);function Gs(){const t=m.useRef(!1);return en(()=>(t.current=!0,()=>{t.current=!1}),[]),t}function Tc(){const t=Gs(),[e,n]=m.useState(0),r=m.useCallback(()=>{t.current&&n(e+1)},[e]);return[m.useCallback(()=>_.postRender(r),[r]),e]}class Cc extends q.Component{getSnapshotBeforeUpdate(e){const n=this.props.childRef.current;if(n&&e.isPresent&&!this.props.isPresent){const r=this.props.sizeRef.current;r.height=n.offsetHeight||0,r.width=n.offsetWidth||0,r.top=n.offsetTop,r.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function Sc({children:t,isPresent:e}){const n=m.useId(),r=m.useRef(null),i=m.useRef({width:0,height:0,top:0,left:0});return m.useInsertionEffect(()=>{const{width:o,height:s,top:a,left:l}=i.current;if(e||!r.current||!o||!s)return;r.current.dataset.motionPopId=n;const u=document.createElement("style");return document.head.appendChild(u),u.sheet&&u.sheet.insertRule(`
|
|
28
28
|
[data-motion-pop-id="${n}"] {
|
|
29
29
|
position: absolute !important;
|
|
30
30
|
width: ${o}px !important;
|
|
@@ -32,5 +32,5 @@ Check the top-level render call using <`+w+">.")}return v}}function co(d,v){{if(
|
|
|
32
32
|
top: ${a}px !important;
|
|
33
33
|
left: ${l}px !important;
|
|
34
34
|
}
|
|
35
|
-
`),()=>{document.head.removeChild(u)}},[e]),q.createElement(Ac,{isPresent:e,childRef:r,sizeRef:i},q.cloneElement(t,{ref:r}))}const tr=({children:t,initial:e,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:o,mode:s})=>{const a=xn(Ec),l=m.useId(),u=m.useMemo(()=>({id:l,initial:e,isPresent:n,custom:i,onExitComplete:c=>{a.set(c,!0);for(const f of a.values())if(!f)return;r&&r()},register:c=>(a.set(c,!1),()=>a.delete(c))}),o?void 0:[n]);return m.useMemo(()=>{a.forEach((c,f)=>a.set(f,!1))},[n]),q.useEffect(()=>{!n&&!a.size&&r&&r()},[n]),s==="popLayout"&&(t=q.createElement(Vc,{isPresent:n},t)),q.createElement(Se.Provider,{value:u},t)};function Ec(){return new Map}function Dc(t){return m.useEffect(()=>()=>t(),[])}const Nt=t=>t.key||"";function jc(t,e){t.forEach(n=>{const r=Nt(n);e.set(r,n)})}function Mc(t){const e=[];return m.Children.forEach(t,n=>{m.isValidElement(n)&&e.push(n)}),e}const $t=({children:t,custom:e,initial:n=!0,onExitComplete:r,exitBeforeEnter:i,presenceAffectsLayout:o=!0,mode:s="sync"})=>{rt(!i,"Replace exitBeforeEnter with mode='wait'");const a=m.useContext(un).forceRender||Cc()[0],l=Ys(),u=Mc(t);let c=u;const f=m.useRef(new Map).current,h=m.useRef(c),p=m.useRef(new Map).current,g=m.useRef(!0);if(en(()=>{g.current=!1,jc(u,p),h.current=c}),Dc(()=>{g.current=!0,p.clear(),f.clear()}),g.current)return q.createElement(q.Fragment,null,c.map(P=>q.createElement(tr,{key:Nt(P),isPresent:!0,initial:n?void 0:!1,presenceAffectsLayout:o,mode:s},P)));c=[...c];const x=h.current.map(Nt),S=u.map(Nt),T=x.length;for(let P=0;P<T;P++){const b=x[P];S.indexOf(b)===-1&&!f.has(b)&&f.set(b,void 0)}return s==="wait"&&f.size&&(c=[]),f.forEach((P,b)=>{if(S.indexOf(b)!==-1)return;const C=p.get(b);if(!C)return;const D=x.indexOf(b);let R=P;if(!R){const F=()=>{f.delete(b);const j=Array.from(p.keys()).filter(k=>!S.includes(k));if(j.forEach(k=>p.delete(k)),h.current=u.filter(k=>{const tt=Nt(k);return tt===b||j.includes(tt)}),!f.size){if(l.current===!1)return;a(),r&&r()}};R=q.createElement(tr,{key:Nt(C),isPresent:!1,onExitComplete:F,custom:e,presenceAffectsLayout:o,mode:s},C),f.set(b,R)}c.splice(D,0,R)}),c=c.map(P=>{const b=P.key;return f.has(b)?P:q.createElement(tr,{key:Nt(P),isPresent:!0,presenceAffectsLayout:o,mode:s},P)}),process.env.NODE_ENV!=="production"&&s==="wait"&&c.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.`),q.createElement(q.Fragment,null,f.size?c:c.map(P=>m.cloneElement(P)))};function Vt({children:t,features:e,strict:n=!1}){const[,r]=m.useState(!er(e)),i=m.useRef(void 0);if(!er(e)){const{renderer:o,...s}=e;i.current=o,ln(s)}return m.useEffect(()=>{er(e)&&e().then(({renderer:o,...s})=>{ln(s),i.current=o,r(!0)})},[]),q.createElement(nn.Provider,{value:{renderer:i.current,strict:n}},t)}function er(t){return typeof t=="function"}const Et={renderer:Gs,...Ni,...Qr};class Oc{constructor(){this.componentControls=new Set}subscribe(e){return this.componentControls.add(e),()=>this.componentControls.delete(e)}start(e,n){this.componentControls.forEach(r=>{r.start(e.nativeEvent||e,n)})}}const kc=()=>new Oc;function Lc(){return xn(kc)}const Rc="fixed top-0 left-0 w-full h-full ",Fc="bg-[#000000]",Ic="bg-[transparent]";function Ge({children:t,onClick:e,className:n="",opacity:r=.6,removeDimmer:i=!1,zIndex:o=1}){return y.jsxs("div",{children:[y.jsx(Vt,{features:Et,children:y.jsx(_t.div,{animate:"enter",className:Z(Rc,i?Ic:Fc,n),exit:"exit",initial:"exit",style:{zIndex:o},variants:{enter:{opacity:r,transition:{opacity:{duration:.25,ease:"easeInOut"}}},exit:{opacity:0,transition:{opacity:{duration:.25,ease:"easeInOut"}}}},onClick:e},"dimmed")}),t]})}const Bc="flex items-center justify-center h-fit transition-all duration-100 ease-linear w-[var(--width)] border-[1px] bg-[var(--bg-color)] border-[var(--border-color)] border-solid disabled:opacity-30",_c={normal:{xsmall:"px-[8px] py-[8px] rounded-[8px] gap-1",small:"px-[10px] py-[10px] rounded-[10px] gap-1",medium:"px-[12px] py-[12px] rounded-[12px] gap-1",large:"px-[16px] py-[16px] rounded-[14px] gap-[4px]",xlarge:"px-[20px] py-[16px] rounded-[16px] gap-[4px]"},icon:{xsmall:"p-[6px] rounded-[8px]",small:"p-[6px] rounded-[8px]",medium:"p-[14px] rounded-[8px]",large:"p-[12px] rounded-[10px]",xlarge:"p-[16px] rounded-[16px]"}},Nc={xsmall:"text-body-600-5",small:"text-body-600-5",medium:"text-body-600-4",large:"text-body-600-4",xlarge:"text-body-600-3"};function $c(t){return t==="line"?"hover:text-white hover:bg-[var(--border-color)] disabled:bg-[var(--bg-color)] disabled:text-current":"hover:opacity-[0.9] hover:brightness-[0.9] disabled:bg-[var(--bg-color)]"}function Wc(t){return{normal:{"--bg-color":`${t}`,"--border-color":`${t}`},line:{"--border-color":`${t}`,"--bg-color":"transparent"},text:{"--bg-color":"transparent","--border-color":"transparent"}}}const zc=m.forwardRef(function({children:e,style:n,startContent:r,endContent:i,isOnlyIcon:o,className:s="",size:a="medium",width:l="auto",type:u="button",variant:c="normal",color:f="transparent",...h},p){return y.jsxs("button",{ref:p,className:Z(Bc,Nc[a],_c[o?"icon":"normal"][a],$c(c),s),style:{"--width":l,...Wc(f)[c],...n},type:u,...h,children:[r??null,e,i??null]})});function Uc(t){switch(t){case"flex-end":return"items-end";case"center":return"items-center";case"flex-start":default:return"items-start"}}function Hc(t){switch(t){case"flex-end":return"justify-end";case"center":return"justify-center";case"space-between":return"justify-between";case"space-around":return"justify-around";case"space-evenly":return"justify-evenly";case"stretch":return"justify-stretch";case"flex-start":default:return"justify-start"}}function Dt({className:t="",display:e="flex",align:n="flex-start",justify:r="flex-start",direction:i="row",wrap:o=!1,style:s,children:a,onClick:l}){const u=Object.values({display:e==="flex"?"flex":"inline-flex",direction:i==="row"?"flex-row":"flex-col",align:Uc(n),justify:Hc(r),wrap:o?"flex-wrap":"flex-nowrap"}).join(" ");return y.jsx("div",{className:`${u} ${t}`,style:s,onClick:l,children:a})}const Gc="rounded-[10px] border-solid border-[1px] border-[#ebebeb] box-border px-[15px] py-[10px]",Yc="rounded-[10px] border-solid border-[1px] border-[#ea3a3d] box-border px-[15px] py-[10px]",Kc={small:"h-[40px] text-body-400-5",medium:"h-[48px] text-body-400-4",large:"h-[56px] text-body-400-4"};function Ks({className:t="",size:e="medium",type:n="text",left:r,right:i,disabled:o,inValid:s,style:a,...l}){return y.jsxs(Dt,{align:"center",className:Z(!o&&s?Yc:Gc,Kc[e],o?"bg-[#fafafa]":"bg-[inherit]"),justify:"space-between",style:a,children:[r||null,y.jsx("input",{className:`w-full bg-[inherit] disabled:bg-[#fafafa] ${t}`,disabled:o,style:{outline:"none"},type:n,...l}),i||null]})}function ye({fontSize:t="16px",fontWeight:e="400",color:n="black",bold:r,needGradient:i,children:o}){return y.jsx("span",{style:{fontSize:t,fontWeight:r?"bold":e,...i?{background:n,backgroundClip:"text",WebkitTextFillColor:"transparent"}:{color:n}},children:o})}function xe({size:t,direction:e="vertical"}){return y.jsx("div",{style:{width:e==="vertical"?`${t}px`:0,height:e==="horizontal"?`${t}px`:0}})}const ot={white:"#ffffff",gray50:"#fafafa",gray100:"#f5f5f5",gray200:"#f0f0f0",gray300:"#ebebeb",gray400:"#dcdcdc",gray500:"#aaaaaa",gray600:"#8c8c8c",gray700:"#555555",gray800:"#323232",gray900:"#1e1e1e",black:"#000000",red100:"#fef1f1",red200:"#ea3a3d",red300:"#802022","dark-red100":"#fef1f1","dark-red200":"#ea3a3d","dark-red300":"#802022",green100:"#edf9f4",green200:"#29a672",green300:"#134c34","dark-green100":"#00190e","dark-green200":"#59eaac","dark-green300":"#e6fcf2",yellow100:"#fffcf2",yellow200:"#ffcf40",yellow300:"#705b1c","dark-yellow100":"#fffcf2","dark-yellow200":"#ffcf40","dark-yellow300":"#705b1c",orange:"#FF7D00",blue:"#0C66E4",purple:"#722ED1",plum:"#D91AD9",pink:"#F5319D"},qc=`outline-none resize-none border-solid border-[1px] min-w-[280px] px-[16px] py-[8px] border-[${ot.gray300}] rounded-[10px]`,Xc=`outline-none resize-none rounded-[10px] border-solid border-[1px] min-w-[280px] border-[${ot.red200}] box-border px-[16px] py-[8px]`,Zc={small:"h-[140px] text-body-400-5",large:"h-[140px] text-body-400-4"},Jc=m.forwardRef(function({label:e,hasError:n,helpMessage:r,size:i="large",focusColor:o=ot.gray400,onFocus:s,onBlur:a,...l},u){const[c,f]=m.useState(!1);function h(g){f(!0),s==null||s(g)}function p(g){f(!1),a==null||a(g)}return y.jsxs(Dt,{direction:"column",children:[e?y.jsxs(y.Fragment,{children:[y.jsx(ye,{color:ot.black,fontSize:"14px",fontWeight:600,children:e}),y.jsx(xe,{direction:"horizontal",size:6})]}):null,y.jsx("textarea",{ref:u,className:Z(!l.disabled&&n?Xc:qc,Zc[i],l.disabled?"bg-[#fafafa]":""),style:{borderColor:!n&&c?o:void 0},onBlur:p,onFocus:h,...l}),r?y.jsxs(y.Fragment,{children:[y.jsx(xe,{direction:"horizontal",size:4}),y.jsx(ye,{color:n?ot.red200:ot.gray600,fontSize:i==="small"?"12px":"14px",children:r})]}):null]})}),Qc=m.forwardRef(function({label:e,hasError:n,helpMessage:r,size:i="medium",focusColor:o=ot.gray300,onFocus:s,onBlur:a,...l},u){const[c,f]=m.useState(!1);function h(g){f(!0),s==null||s(g)}function p(g){f(!1),a==null||a(g)}return y.jsxs(Dt,{direction:"column",children:[e?y.jsxs(y.Fragment,{children:[y.jsx(ye,{color:ot.black,fontSize:"14px",fontWeight:600,children:e}),y.jsx(xe,{direction:"horizontal",size:6})]}):null,y.jsx(Ks,{ref:u,inValid:!!n,size:i,style:!n&&c?{borderColor:o}:{},onBlur:p,onFocus:h,...l}),r?y.jsxs(y.Fragment,{children:[y.jsx(xe,{direction:"horizontal",size:4}),y.jsx(ye,{color:n?ot.red200:ot.gray600,fontSize:i==="small"?"12px":"14px",children:r})]}):null]})});function tf({size:t,margin:e,color:n=ot.gray300,direction:r="vertical"}){return y.jsx("div",{style:{width:r==="vertical"?t:"1px",height:r==="horizontal"?t:"1px",marginBlock:r==="vertical"?e:0,marginInline:r==="horizontal"?e:0,background:n}})}function ef({className:t="",children:e,width:n,height:r,borderRadius:i}){return y.jsx("div",{className:`${t} animate-skeleton`,style:{width:n,height:r,borderRadius:i},children:e})}const nf={enter:{opacity:1,transition:{opacity:{duration:.3,ease:"easeInOut"}}},exit:{opacity:0,transition:{duration:.3,ease:"easeInOut"}}},rf="flex items-center justify-center absolute z-[1] text-center",sf={small:"min-w-[16px] min-h-[16px] text-[12px]",medium:"min-w-[20px] min-h-[20px] text-[14px]",large:"min-w-[24px] min-h-[24px] text-[14px]"},of={small:{"top-left":"top-[-3px] left-[-3px]","top-right":"top-[-3px] right-[-3px]","bottom-left":"bottom-[-3px] left-[-3px]","bottom-right":"bottom-[-3px] right-[-3px]"},medium:{"top-left":"top-[-4px] left-[-4px]","top-right":"top-[-4px] right-[-4px]","bottom-left":"bottom-[-4px] left-[-4px]","bottom-right":"bottom-[-4px] right-[-4px]"},large:{"top-left":"top-[-5px] left-[-5px]","top-right":"top-[-5px] right-[-5px]","bottom-left":"bottom-[-5px] left-[-5px]","bottom-right":"bottom-[-5px] right-[-5px]"}};function af({className:t="",radius:e="8px",size:n="medium",color:r="blue",placement:i="top-right",content:o,isVisible:s,children:a}){return y.jsxs(Dt,{className:"relative",display:"inline-flex",children:[s&&y.jsx($t,{children:y.jsx(Vt,{features:Et,children:y.jsx(_t.div,{className:Z(rf,sf[n],of[n][i],t),style:{backgroundColor:r,borderRadius:e},variants:nf,children:o})})}),a]})}function qs(t){const[e,n]=m.useState(!1);return m.useEffect(()=>{t&&n(!0),t===void 0&&n(!0)},[t]),e}function lf(t){const e=document.createElement("div");return e.setAttribute("id",t),e}function uf({container:t,children:e,id:n="portal"}){const r=m.useMemo(()=>(t==null?void 0:t.current)||document.body,[t]),i=m.useMemo(()=>document.getElementById(n)||lf(n),[n]);return m.useLayoutEffect(()=>(r.appendChild(i),()=>{r.contains(i)&&r.removeChild(i)}),[r,i]),mo.createPortal(e,i)}function Ye({children:t,...e}){return qs()?y.jsx(uf,{...e,children:t}):null}const nr=m.createContext(void 0);function cf(){const t=m.useContext(nr);if(!t)throw new Error("`context` is undefined. Seems you forgot to wrap component within the Provider");return t}function Xs(){return{AccordionProvider:nr.Provider,useContext:cf,Context:nr}}const ff={light:"flex flex-col overflow-hidden",bordered:"flex flex-col rounded-[12px] border-solid border-[1px] border-gray400 overflow-hidden",splitted:"flex flex-col gap-[10px] overflow-hidden"},df={light:"px-3 bg-[var(--bg-color)] transition-all hover:brightness-90",bordered:"px-3 bg-[var(--bg-color)] transition-all hover:brightness-90",splitted:"px-3 rounded-[12px] bg-[var(--bg-color)] transition-all hover:brightness-90 bg-white border-solid border-[1px] border-gray400"};function hf({className:t,children:e,defaultSelected:n,type:r="single",variant:i="light",color:o="white",onChange:s}){const[a,l]=m.useState(n),{AccordionProvider:u}=Xs(),c=m.useCallback(f=>{l(f),s==null||s(f)},[s]);return y.jsx("ul",{className:Z(ff[i],t),children:y.jsx(u,{value:{selected:a,type:r,variant:i,color:o,defaultSelected:n,onChange:c},children:e})})}const pf={enter:{opacity:1,height:"auto",transition:{height:{duration:.3,ease:"easeInOut"},opacity:{duration:.4,ease:"easeInOut"}}},exit:{opacity:0,height:0,transition:{duration:.3,ease:"easeInOut"}}};function mf({children:t}){return y.jsx(Vt,{features:Et,children:y.jsx(_t.div,{animate:"enter",className:"w-full will-change-auto overflow-y-hidden",exit:"exit",initial:"exit",variants:pf,children:y.jsx("div",{className:"py-3",children:t})})})}function gf({children:t,isOpen:e,icon:n,onClick:r}){return y.jsx("header",{className:"py-3",role:"button",onClick:r,children:y.jsxs(Dt,{align:"center",justify:"space-between",children:[t,y.jsx("span",{className:Z("transition-all",e?"rotate-[-90deg]":"rotate-0"),children:n??y.jsx(yf,{})})]})})}function yf(){return y.jsx("svg",{fill:"none",height:"16",id:"chevron-right",style:{transform:"rotate(180deg)"},viewBox:"0 0 16 16",width:"16",xmlns:"http://www.w3.org/2000/svg",children:y.jsx("g",{id:"icon/arrow-chevron-right",children:y.jsx("path",{clipRule:"evenodd",d:"M11.9603 7.46967C12.2532 7.76256 12.2532 8.23744 11.9603 8.53033L6.71026 13.7803C6.41737 14.0732 5.94249 14.0732 5.6496 13.7803C5.35671 13.4874 5.35671 13.0126 5.6496 12.7197L10.3693 8L5.6496 3.28033C5.35671 2.98744 5.35671 2.51256 5.6496 2.21967C5.9425 1.92678 6.41737 1.92678 6.71026 2.21967L11.9603 7.46967Z",fill:"currentColor",fillRule:"evenodd",id:"Icon (Stroke)"})})})}function xf({className:t,header:e,headerIcon:n,body:r,value:i,disabled:o}){const{useContext:s}=Xs(),{selected:a,type:l,variant:u,color:c,defaultSelected:f,onChange:h}=s(),[p,g]=m.useState(f===i),x=l==="single"?a===i:p,S=m.useCallback(()=>{g(T=>!T)},[]);return y.jsxs("li",{className:Z(df[u],o?"opacity-45":"",t),style:{"--bg-color":c},children:[y.jsx(gf,{icon:n,isOpen:x,onClick:o?void 0:()=>l==="single"?h(x?void 0:i):S(),children:e}),y.jsx($t,{children:x&&y.jsx(mf,{children:r})})]})}const rr=m.createContext(void 0);function vf(){const t=m.useContext(rr);if(!t)throw new Error("`context` is undefined. Seems you forgot to wrap component within the Provider");return t}function Zs(){return{DrawerProvider:rr.Provider,useContext:vf,Context:rr}}const bf={enter:{y:0,transition:{duration:.3,ease:"easeInOut"}},exit:{y:"-100%",transition:{duration:.3,ease:"easeInOut"}}},Pf={enter:{y:0,transition:{duration:.3,ease:"easeInOut"}},exit:{y:"100%",transition:{duration:.3,ease:"easeInOut"}}},wf={enter:{x:0,transition:{duration:.3,ease:"easeInOut"}},exit:{x:"-100%",transition:{duration:.3,ease:"easeInOut"}}},Sf={enter:{x:0,transition:{duration:.3,ease:"easeInOut"}},exit:{x:"100%",transition:{duration:.3,ease:"easeInOut"}}};function Tf({isOpen:t,placement:e,motionVariant:n,zIndex:r,drawerId:i,onOpen:o,onClose:s,onOpenChange:a}){function l(u){u||s==null||s(),u&&(o==null||o()),a(u)}return{isOpen:t,placement:e,motionVariant:n,zIndex:r,drawerId:i,onOpenChange:l}}function Cf({children:t,motionVariant:e,allowCloseOnClickBackDrop:n=!1,zIndex:r=1,placement:i="bottom",drawerId:o="drawer-portal",...s}){const a={top:bf,bottom:Pf,left:wf,right:Sf},{DrawerProvider:l}=Zs(),u=Tf({...s,drawerId:o,zIndex:r,placement:i,motionVariant:e??a[i]});return y.jsx(l,{value:u,children:y.jsx($t,{children:u.isOpen?y.jsx(Ge,{zIndex:r,onClick:n?()=>u.onOpenChange(!1):void 0,children:t}):null})})}const Af="fixed bg-[var(--bg-color)] z-[var(--zIndex)]",Vf={top:"left-0 top-0 w-full",bottom:"left-0 bottom-0 w-full",left:"left-0 top-0 h-full",right:"right-0 top-0 h-full"};function Ef({children:t,className:e,color:n="white"}){const{useContext:r}=Zs(),i=r();return y.jsx(Ye,{id:i.drawerId,children:y.jsx(Vt,{features:Et,children:y.jsx(_t.div,{animate:"enter",className:Z(Af,Vf[i.placement??"bottom"],e),exit:"exit",initial:"exit",style:{"--bg-color":n,"--zIndex":i.zIndex??1},variants:i.motionVariant,children:typeof t=="function"?t(()=>i.onOpenChange(!1)):t})})})}function Df({hideCloseButton:t,closeButton:e,isOpen:n,placement:r,motionVariant:i,zIndex:o,onOpen:s,onClose:a,onOpenChange:l}){function u(c){c||a==null||a(),c&&(s==null||s()),l(c)}return{isOpen:n,placement:r,hideCloseButton:t,closeButton:e,motionVariant:i,zIndex:o,onOpenChange:u}}const ir=m.createContext(void 0);function jf(){const t=m.useContext(ir);if(!t)throw new Error("`context` is undefined. Seems you forgot to wrap component within the Provider");return t}function Js(){return{ModalProvider:ir.Provider,useContext:jf,Context:ir}}const Mf={enter:{opacity:1,x:"-50%",y:"-50%",transition:{opacity:{duration:.3,ease:"easeInOut"}}},exit:{opacity:0,x:"-50%",y:"-50%",transition:{duration:.3,ease:"easeInOut"}}};function Of({children:t,removeDimmer:e,zIndex:n=1,allowCloseOnClickBackDrop:r=!1,motionVariant:i=Mf,...o}){const{ModalProvider:s}=Js(),a=Df({...o,motionVariant:i,zIndex:n});return y.jsx(s,{value:a,children:y.jsx($t,{children:a.isOpen?y.jsx(Ge,{removeDimmer:e,zIndex:n,onClick:r?()=>a.onOpenChange(!1):void 0,children:t}):null})})}function kf({children:t,className:e="w-[320px] h-[320px] bg-white"}){const{useContext:n}=Js(),r=n(),i=m.useMemo(()=>{switch(r.placement??"center"){case"bottom":return"bottom-[0] left-[50%] translate-x-[-50%]";case"top":return"top-[0] left-[50%] translate-x-[-50%]";case"center":default:return"top-[50%] left-[50%] translate-x-[-50%] translate-y-[-50%]"}},[r.placement]);return y.jsx(Vt,{features:Et,children:y.jsxs(_t.div,{animate:"enter",className:Z("fixed flex flex-col rounded-[12px] overflow-hidden",i,e),exit:"exit",initial:"exit",style:{zIndex:r.zIndex},variants:r.motionVariant,children:[!r.hideCloseButton&&r.closeButton?y.jsx("div",{className:"absolute right-4 top-4 cursor-pointer",onClick:()=>r.onOpenChange(!1),children:r.closeButton}):null,typeof t=="function"?t(()=>r.onOpenChange(!1)):t]})})}function Lf({children:t,className:e}){return y.jsx("header",{className:e,children:y.jsx(Dt,{align:"center",className:"w-full",children:t})})}function Rf({className:t,children:e}){return y.jsx("div",{className:t,children:e})}function Ff({className:t,children:e}){return y.jsx("footer",{className:t,children:e})}function sr(t,e){const n=m.useRef([]),r=m.useCallback(({target:i})=>{function o(){return i==null||n.current.length===0||n.current.some(s=>s.contains(i))}o()||e()},[e]);m.useEffect(()=>{t&&(n.current=(Array.isArray(t)?t:[t]).filter(i=>i!=null))},[t]),m.useEffect(()=>(document.addEventListener("click",r),document.addEventListener("touchstart",r),()=>{document.removeEventListener("click",r),document.removeEventListener("touchstart",r)}),[r])}const or=m.createContext(void 0);function If(){const t=m.useContext(or);if(!t)throw new Error("`context` is undefined. Seems you forgot to wrap component within the Provider");return t}function Ke(){return{DropdownProvider:or.Provider,useContext:If,Context:or}}const Bf={enter:{opacity:1,scale:1,transition:{opacity:{duration:.3,ease:"easeInOut"}}},exit:{opacity:0,scale:.9,transition:{duration:.3,ease:"easeInOut"}}};function _f({children:t}){const e=m.useRef(null),[n,r]=m.useState([]),{useContext:i}=Ke(),o=i();return sr(n,()=>{o&&o.isOpen&&setTimeout(()=>o.onOpenChange(!1),100)}),m.useEffect(()=>{e.current&&r(e.current)},[]),y.jsx(Vt,{features:Et,children:y.jsx(_t.div,{ref:e,animate:"enter",className:"absolute z-[4] mt-[4px] w-full",exit:"exit",initial:"exit",variants:Bf,children:t})})}function Nf({children:t}){const{useContext:e}=Ke(),n=e();return y.jsx("div",{children:m.cloneElement(t,{onClick:r=>{r.preventDefault(),n.onOpenChange(!n.isOpen)}})})}function $f({isOpen:t,selectedItem:e,color:n,onOpen:r,onClose:i,onSelect:o,onOpenChange:s}){function a(l){l||i==null||i(),l&&(r==null||r()),s(l)}return{isOpen:t,selectedItem:e,color:n,onSelect:o,onOpenChange:a}}function Wf({trigger:t,content:e,selectedItem:n,color:r,onSelect:i}){const[o,s]=m.useState(!1),{DropdownProvider:a}=Ke(),l=$f({isOpen:o,selectedItem:n,color:r,onSelect:i,onOpenChange:u=>s(u)});return y.jsx(a,{value:l,children:y.jsxs("div",{className:"relative",children:[y.jsx(Nf,{children:t}),y.jsx($t,{children:l.isOpen?y.jsx(_f,{children:e}):null})]})})}function zf({children:t,className:e}){return y.jsx("ul",{className:Z("rounded-lg p-[4px] min-w-[200px] border-[3px] border-solid border-gray-500",e),children:t})}function Uf({children:t,value:e,className:n,disabled:r}){const{useContext:i}=Ke(),o=i();function s(){o.onSelect(e),o.onOpenChange(!1)}return y.jsx("li",{className:Z("p-2 c cursor-pointer hover:opacity-75 hover:brightness-[0.7] hover:bg-[var(--bg-color)] rounded-[inherit]",r?"cursor-not-allowed":"",n),style:{"--bg-color":o.color??""},onClick:r?void 0:s,children:t})}const Qs=typeof window<"u"?m.useLayoutEffect:m.useEffect,Hf={enter:{opacity:1,scale:1,transition:{opacity:{duration:.3,ease:"easeInOut"}}},exit:{opacity:0,scale:.9,transition:{duration:.3,ease:"easeInOut"}}};function Gf({isOpen:t,zIndex:e,placement:n,motionVariant:r,onOpen:i,onClose:o,onOpenChange:s}){function a(l){l||o==null||o(),l&&(i==null||i()),s(l)}return{isOpen:t,placement:n,motionVariant:r??Hf,zIndex:e,onOpenChange:a}}const ar=m.createContext(void 0);function Yf(){const t=m.useContext(ar);if(!t)throw new Error("`context` is undefined. Seems you forgot to wrap component within the Provider");return t}function lr(){return{PopoverProvider:ar.Provider,useContext:Yf,Context:ar}}function Kf({children:t,id:e="popover-container",placement:n="bottom",zIndex:r=1,offset:i=0,...o}){const s=m.useRef(null),a=m.useRef(null),[l,u]=m.useState({top:0,left:0}),{PopoverProvider:c}=lr(),f=Gf({...o,zIndex:r,placement:n}),[h,p]=m.Children.toArray(t),g=m.useCallback(()=>{if(!s.current)return;const{top:x,left:S,height:T}=s.current.getBoundingClientRect();n==="top"&&u({top:x+window.scrollY-T+8,left:S+i+window.scrollX}),n==="bottom"&&u({top:x+T+8+window.scrollY,left:S+i+window.scrollX})},[i,n]);return Qs(()=>(s.current&&f.isOpen&&g(),window.addEventListener("resize",g),()=>{window.removeEventListener("resize",g)}),[f.isOpen,g]),y.jsxs(c,{value:f,children:[y.jsx("div",{ref:s,className:"inline-block",children:h}),y.jsx($t,{children:f.isOpen?y.jsx(Ye,{id:e,children:y.jsx("div",{ref:a,className:"absolute",style:l,children:p})}):null})]})}function qf({children:t}){const e=m.useRef(null),[n,r]=m.useState([]),{useContext:i}=lr(),o=i();return sr(n,()=>{o&&o.isOpen&&setTimeout(()=>o.onOpenChange(!1),100)}),m.useEffect(()=>{e.current&&r(e.current)},[]),y.jsx("div",{ref:e,children:y.jsx(Vt,{features:Et,children:y.jsx(_t.div,{animate:"enter",exit:"exit",initial:"exit",variants:o.motionVariant,children:typeof t=="function"?t(()=>o.onOpenChange(!1)):t})})})}function Xf({children:t}){const{useContext:e}=lr(),n=e(),r=m.useMemo(()=>typeof t=="string"?y.jsx("p",{children:t}):m.Children.only(t),[t]);return m.cloneElement(r,{onClick:()=>n.onOpenChange(!n.isOpen)})}function Zf({children:t,className:e}){return y.jsx(Dt,{className:Z("w-full h-full overflow-y-auto",e),direction:"column",children:t})}const ur=m.createContext(void 0);function Jf(){const t=m.useContext(ur);if(!t)throw new Error("`context` is undefined. Seems you forgot to wrap component within the Provider");return t}function to(){return{BottomSheetProvider:ur.Provider,useContext:Jf,Context:ur}}function Qf({onPointerDown:t}){return y.jsx("div",{className:Z("relative min-h-[50px] py-[4px] transition-all","after:cursor-pointer after: after:absolute after:content-[''] after:rounded-3xl after:w-[60px] after:h-[10px] after:top-[6px] after:left-[50%] after:translate-x-[-50%]"," after:bg-gray-300 hover:after:bg-gray-400"),style:{userSelect:"none"},onPointerDown:t})}function td(t,e,n){return{opened:{top:`calc(${t} - ${e})`,transition:{duration:.3,ease:"easeInOut"}},closed:{top:t,transition:{duration:.3,ease:"easeInOut"}},expanded:{top:`calc( ${t} - ${n})`,transition:{duration:.3,ease:"easeInOut"}}}}function ed({children:t}){const e=Lc(),{useContext:n}=to(),{color:r,zIndex:i,onOpenChange:o}=n(),[s,a]=m.useState(!1);function l(u,c){const f=c.velocity.y>20||c.velocity.y>=0&&c.point.y>45,h=c.velocity.y<0;if(s&&!h){a(!1);return}f&&!h&&!s?o(!1):a(!0)}return y.jsx(Ye,{children:y.jsx(Vt,{features:Et,children:y.jsxs(Tc.div,{animate:s?"expanded":"opened",className:Z("fixed bottom-0 will-change-transform w-full overflow-hidden ","pb-[24px] shadow-[0px 2px 5px rgba(0, 0, 0, 0.06), 0px 2px 13px rgba(0, 0, 0, 0.12)] rounded-t-[12px]","bg-[var(--bg-color)] z-[var(--zIndex)]"),drag:"y",dragConstraints:{top:0,bottom:0},dragControls:e,dragElastic:.2,dragListener:!1,exit:"closed",initial:"closed",style:{"--zIndex":i,"--bg-color":r},transition:{type:"spring",damping:40,stiffness:400},variants:td("100dvh","100px","600px"),onDragEnd:l,children:[y.jsx(Qf,{onPointerDown:u=>{e.start(u)}}),y.jsx(Zf,{children:t})]})})})}function nd({children:t,removeDimmer:e,isOpen:n,allowCloseOnClickBackDrop:r,color:i="white",zIndex:o=10,...s}){const{BottomSheetProvider:a}=to();return y.jsx(a,{value:{...s,color:i,isOpen:n,zIndex:o},children:y.jsx($t,{children:n?y.jsx(Ge,{removeDimmer:e,onClick:r?()=>s.onOpenChange(!1):void 0,children:y.jsx(ed,{children:t})}):null})})}function rd(t){const e=m.useRef(null);return m.useImperativeHandle(t,()=>e.current),e}const id={display1:"text-[84px] font-[800] leading-[114.24px] tracking-[-0.84px]",display2:"text-[72px] font-[800] leading-[96.48px] tracking-[-0.72px]",heading1:"text-[64px] font-[800] leading-[85.76px] tracking-[-0.384px]",heading2:"text-[48px] font-[800] leading-[64.32px] tracking-[-0.192px]",heading3:"text-[40px] font-[800] leading-[54.4px] tracking-[-0.16px]",heading4:"text-[32px] font-[800] leading-[44.16px] tracking-[-0.128px]",heading5:"text-[28px] font-[800] leading-[39.76px] tracking-[-0.112px]",heading6:"text-[24px] font-[800] leading-[33.6px] tracking-[-0.096px]",heading7:"text-[20px] font-[800] leading-[28px] tracking-[-0.08px]",heading8:"text-[18px] font-[800] leading-[25.2px] tracking-[-0.036px]","body-600-1":"text-[24px] font-[600] leading-[36px] tracking-[-0.096px]","body-600-2":"text-[20px] font-[600] leading-[30px] tracking-[-0.08px]","body-600-3":"text-[18px] font-[600] leading-[27.72px] tracking-[-0.036px]","body-600-4":"text-[16px] font-[600] leading-[24px] tracking-[-0.032px]","body-600-5":"text-[14px] font-[600] leading-[20.44px] tracking-[-0.028px]","body-600-6":"text-[12px] font-[600] leading-[18px] tracking-[-0.024px]","body-600-7":"text-[10px] font-[600] leading-[14.4px] tracking-[-0.02px]","body-400-1":"text-[24px] font-[400] leading-[36px] tracking-[-0.096px]","body-400-2":"text-[20px] font-[400] leading-[30px] tracking-[-0.08px]","body-400-3":"text-[18px] font-[400] leading-[27.72px] tracking-[-0.036px]","body-400-4":"text-[16px] font-[400] leading-[24px] tracking-[-0.032px]","body-400-5":"text-[14px] font-[400] leading-[20.44px]] tracking-[-0.028px]","body-400-6":"text-[12px] font-[400] leading-[18px] tracking-[-0.024px]","body-400-7":"text-[10px] font-[400] leading-[14.4px] tracking-[-0.02px]"},sd={".text-display1":{fontSize:"84px",fontWeight:800,lineHeight:"114.24px",letterSpacing:"-0.84px"},".text-display2":{fontSize:"72px",fontWeight:800,lineHeight:"96.48px",letterSpacing:"-0.72px"},".text-heading1":{fontSize:"64px",fontWeight:800,lineHeight:"85.76px",letterSpacing:"-0.384px"},".text-heading2":{fontSize:"48px",fontWeight:800,lineHeight:"64.32px",letterSpacing:"-0.192px"},".text-heading3":{fontSize:"40px",fontWeight:800,lineHeight:"54.4px",letterSpacing:"-0.16px"},".text-heading4":{fontSize:"32px",fontWeight:800,lineHeight:"44.16px",letterSpacing:"-0.128px"},".text-heading5":{fontSize:"28px",fontWeight:800,lineHeight:"39.76px",letterSpacing:"-0.112px"},".text-heading6":{fontSize:"24px",fontWeight:800,lineHeight:"33.6px",letterSpacing:"-0.096px"},".text-heading7":{fontSize:"20px",fontWeight:800,lineHeight:"28px",letterSpacing:"-0.08px"},".text-heading8":{fontSize:"18px",fontWeight:800,lineHeight:"25.2px",letterSpacing:"-0.036px"},".text-body-600-1":{fontSize:"24px",fontWeight:600,lineHeight:"36px",letterSpacing:"-0.096px"},".text-body-600-2":{fontSize:"20px",fontWeight:600,lineHeight:"30px",letterSpacing:"-0.08px"},".text-body-600-3":{fontSize:"18px",fontWeight:600,lineHeight:"27.72px",letterSpacing:"-0.036px"},".text-body-600-4":{fontSize:"16px",fontWeight:600,lineHeight:"24px",letterSpacing:"-0.032px"},".text-body-600-5":{fontSize:"14px",fontWeight:600,lineHeight:"20.44px",letterSpacing:"-0.028px"},".text-body-600-6":{fontSize:"12px",fontWeight:600,lineHeight:"18px",letterSpacing:"-0.024px"},".text-body-600-7":{fontSize:"10px",fontWeight:600,lineHeight:"14.4px",letterSpacing:"-0.02px"},".text-body-400-1":{fontSize:"24px",fontWeight:400,lineHeight:"36px",letterSpacing:"-0.096px"},".text-body-400-2":{fontSize:"20px",fontWeight:400,lineHeight:"30px",letterSpacing:"-0.08px"},".text-body-400-3":{fontSize:"18px",fontWeight:400,lineHeight:"27.72px",letterSpacing:"-0.036px"},".text-body-400-4":{fontSize:"16px",fontWeight:400,lineHeight:"24px",letterSpacing:"-0.032px"},".text-body-400-5":{fontSize:"14px",fontWeight:400,lineHeight:"20.44px",letterSpacing:"-0.028px"},".text-body-400-6":{fontSize:"12px",fontWeight:400,lineHeight:"18px",letterSpacing:"-0.024px"},".text-body-400-7":{fontSize:"10px",fontWeight:400,lineHeight:"14.4px",letterSpacing:"-0.02px"}};E.Accordion=hf,E.AccordionItem=xf,E.Badge=af,E.BottomSheet=nd,E.Button=zc,E.Dimmed=Ge,E.Divider=tf,E.Drawer=Cf,E.DrawerContent=Ef,E.Dropdown=Wf,E.DropdownBody=zf,E.DropdownItem=Uf,E.Flex=Dt,E.Input=Ks,E.Modal=Of,E.ModalBody=Rf,E.ModalContent=kf,E.ModalFooter=Ff,E.ModalHeader=Lf,E.Popover=Kf,E.PopoverContent=qf,E.PopoverTrigger=Xf,E.Portal=Ye,E.Skeleton=ef,E.Spacing=xe,E.Text=ye,E.TextArea=Jc,E.TextField=Qc,E.colors=ot,E.twTypographyMap=sd,E.typographyMap=id,E.useClickOutSideEffect=sr,E.useDomRef=rd,E.useIsomorphicLayoutEffect=Qs,E.useMounted=qs,Object.defineProperty(E,Symbol.toStringTag,{value:"Module"})});
|
|
35
|
+
`),()=>{document.head.removeChild(u)}},[e]),q.createElement(Cc,{isPresent:e,childRef:r,sizeRef:i},q.cloneElement(t,{ref:r}))}const tr=({children:t,initial:e,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:o,mode:s})=>{const a=vn(Ac),l=m.useId(),u=m.useMemo(()=>({id:l,initial:e,isPresent:n,custom:i,onExitComplete:c=>{a.set(c,!0);for(const f of a.values())if(!f)return;r&&r()},register:c=>(a.set(c,!1),()=>a.delete(c))}),o?void 0:[n]);return m.useMemo(()=>{a.forEach((c,f)=>a.set(f,!1))},[n]),q.useEffect(()=>{!n&&!a.size&&r&&r()},[n]),s==="popLayout"&&(t=q.createElement(Sc,{isPresent:n},t)),q.createElement(Te.Provider,{value:u},t)};function Ac(){return new Map}function Vc(t){return m.useEffect(()=>()=>t(),[])}const Nt=t=>t.key||"";function Ec(t,e){t.forEach(n=>{const r=Nt(n);e.set(r,n)})}function Dc(t){const e=[];return m.Children.forEach(t,n=>{m.isValidElement(n)&&e.push(n)}),e}const $t=({children:t,custom:e,initial:n=!0,onExitComplete:r,exitBeforeEnter:i,presenceAffectsLayout:o=!0,mode:s="sync"})=>{rt(!i,"Replace exitBeforeEnter with mode='wait'");const a=m.useContext(un).forceRender||Tc()[0],l=Gs(),u=Dc(t);let c=u;const f=m.useRef(new Map).current,h=m.useRef(c),p=m.useRef(new Map).current,g=m.useRef(!0);if(en(()=>{g.current=!1,Ec(u,p),h.current=c}),Vc(()=>{g.current=!0,p.clear(),f.clear()}),g.current)return q.createElement(q.Fragment,null,c.map(P=>q.createElement(tr,{key:Nt(P),isPresent:!0,initial:n?void 0:!1,presenceAffectsLayout:o,mode:s},P)));c=[...c];const v=h.current.map(Nt),T=u.map(Nt),C=v.length;for(let P=0;P<C;P++){const b=v[P];T.indexOf(b)===-1&&!f.has(b)&&f.set(b,void 0)}return s==="wait"&&f.size&&(c=[]),f.forEach((P,b)=>{if(T.indexOf(b)!==-1)return;const S=p.get(b);if(!S)return;const E=v.indexOf(b);let R=P;if(!R){const F=()=>{f.delete(b);const D=Array.from(p.keys()).filter(L=>!T.includes(L));if(D.forEach(L=>p.delete(L)),h.current=u.filter(L=>{const tt=Nt(L);return tt===b||D.includes(tt)}),!f.size){if(l.current===!1)return;a(),r&&r()}};R=q.createElement(tr,{key:Nt(S),isPresent:!1,onExitComplete:F,custom:e,presenceAffectsLayout:o,mode:s},S),f.set(b,R)}c.splice(E,0,R)}),c=c.map(P=>{const b=P.key;return f.has(b)?P:q.createElement(tr,{key:Nt(P),isPresent:!0,presenceAffectsLayout:o,mode:s},P)}),process.env.NODE_ENV!=="production"&&s==="wait"&&c.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.`),q.createElement(q.Fragment,null,f.size?c:c.map(P=>m.cloneElement(P)))};function Vt({children:t,features:e,strict:n=!1}){const[,r]=m.useState(!er(e)),i=m.useRef(void 0);if(!er(e)){const{renderer:o,...s}=e;i.current=o,ln(s)}return m.useEffect(()=>{er(e)&&e().then(({renderer:o,...s})=>{ln(s),i.current=o,r(!0)})},[]),q.createElement(nn.Provider,{value:{renderer:i.current,strict:n}},t)}function er(t){return typeof t=="function"}const Et={renderer:Hs,..._i,...Jr};class jc{constructor(){this.componentControls=new Set}subscribe(e){return this.componentControls.add(e),()=>this.componentControls.delete(e)}start(e,n){this.componentControls.forEach(r=>{r.start(e.nativeEvent||e,n)})}}const Mc=()=>new jc;function Oc(){return vn(Mc)}const Lc="fixed top-0 left-0 w-full h-full ",kc="bg-[#000000]",Rc="bg-[transparent]";function Ge({children:t,onClick:e,className:n="",opacity:r=.6,removeDimmer:i=!1,zIndex:o=1}){return y.jsxs("div",{children:[y.jsx(Vt,{features:Et,children:y.jsx(_t.div,{animate:"enter",className:Z(Lc,i?Rc:kc,n),exit:"exit",initial:"exit",style:{zIndex:o},variants:{enter:{opacity:r,transition:{opacity:{duration:.25,ease:"easeInOut"}}},exit:{opacity:0,transition:{opacity:{duration:.25,ease:"easeInOut"}}}},onClick:e},"dimmed")}),t]})}const Fc="flex items-center justify-center h-fit transition-all duration-100 ease-linear w-[var(--width)] border-[1px] bg-[var(--bg-color)] border-[var(--border-color)] border-solid disabled:opacity-30",Ic={normal:{xsmall:"px-[8px] py-[8px] rounded-[8px] gap-1",small:"px-[10px] py-[10px] rounded-[10px] gap-1",medium:"px-[12px] py-[12px] rounded-[12px] gap-1",large:"px-[16px] py-[16px] rounded-[14px] gap-[4px]",xlarge:"px-[20px] py-[16px] rounded-[16px] gap-[4px]"},icon:{xsmall:"p-[6px] rounded-[8px]",small:"p-[6px] rounded-[8px]",medium:"p-[14px] rounded-[8px]",large:"p-[12px] rounded-[10px]",xlarge:"p-[16px] rounded-[16px]"}},Bc={xsmall:"text-body-600-5",small:"text-body-600-5",medium:"text-body-600-4",large:"text-body-600-4",xlarge:"text-body-600-3"};function _c(t){return t==="line"?"hover:text-white hover:bg-[var(--border-color)] disabled:bg-[var(--bg-color)] disabled:text-current":"hover:opacity-[0.9] hover:brightness-[0.9] disabled:bg-[var(--bg-color)]"}function Nc(t){return{normal:{"--bg-color":`${t}`,"--border-color":`${t}`},line:{"--border-color":`${t}`,"--bg-color":"transparent"},text:{"--bg-color":"transparent","--border-color":"transparent"}}}const $c=m.forwardRef(function({children:e,style:n,startContent:r,endContent:i,isOnlyIcon:o,className:s="",size:a="medium",width:l="auto",type:u="button",variant:c="normal",color:f="transparent",...h},p){return y.jsxs("button",{ref:p,className:Z(Fc,Bc[a],Ic[o?"icon":"normal"][a],_c(c),s),style:{"--width":l,...Nc(f)[c],...n},type:u,...h,children:[r??null,e,i??null]})});function Uc(t){switch(t){case"flex-end":return"items-end";case"center":return"items-center";case"flex-start":default:return"items-start"}}function Wc(t){switch(t){case"flex-end":return"justify-end";case"center":return"justify-center";case"space-between":return"justify-between";case"space-around":return"justify-around";case"space-evenly":return"justify-evenly";case"stretch":return"justify-stretch";case"flex-start":default:return"justify-start"}}function Dt({className:t="",display:e="flex",align:n="flex-start",justify:r="flex-start",direction:i="row",wrap:o=!1,style:s,children:a,onClick:l}){const u=Object.values({display:e==="flex"?"flex":"inline-flex",direction:i==="row"?"flex-row":"flex-col",align:Uc(n),justify:Wc(r),wrap:o?"flex-wrap":"flex-nowrap"}).join(" ");return y.jsx("div",{className:`${u} ${t}`,style:s,onClick:l,children:a})}const zc="rounded-[10px] border-solid border-[1px] border-[#ebebeb] box-border px-[15px] py-[10px]",Hc="rounded-[10px] border-solid border-[1px] border-[#ea3a3d] box-border px-[15px] py-[10px]",Gc={small:"h-[40px] text-body-400-5",medium:"h-[48px] text-body-400-4",large:"h-[56px] text-body-400-4"};function Ys({className:t="",size:e="medium",type:n="text",left:r,right:i,disabled:o,inValid:s,style:a,...l}){return y.jsxs(Dt,{align:"center",className:Z(!o&&s?Hc:zc,Gc[e],o?"bg-[#fafafa]":"bg-[inherit]"),justify:"space-between",style:a,children:[r||null,y.jsx("input",{className:`w-full bg-[inherit] disabled:bg-[#fafafa] ${t}`,disabled:o,style:{outline:"none"},type:n,...l}),i||null]})}function ye({fontSize:t="16px",fontWeight:e="400",color:n="black",bold:r,needGradient:i,children:o}){return y.jsx("span",{style:{fontSize:t,fontWeight:r?"bold":e,...i?{background:n,backgroundClip:"text",WebkitTextFillColor:"transparent"}:{color:n}},children:o})}function ve({size:t,direction:e="vertical"}){return y.jsx("div",{style:{width:e==="vertical"?`${t}px`:0,height:e==="horizontal"?`${t}px`:0}})}const lt={white:"#ffffff",gray50:"#fafafa",gray100:"#f5f5f5",gray200:"#f0f0f0",gray300:"#ebebeb",gray400:"#dcdcdc",gray500:"#aaaaaa",gray600:"#8c8c8c",gray700:"#555555",gray800:"#323232",gray900:"#1e1e1e",black:"#000000",red100:"#fef1f1",red200:"#ea3a3d",red300:"#802022","dark-red100":"#fef1f1","dark-red200":"#ea3a3d","dark-red300":"#802022",green100:"#edf9f4",green200:"#29a672",green300:"#134c34","dark-green100":"#00190e","dark-green200":"#59eaac","dark-green300":"#e6fcf2",yellow100:"#fffcf2",yellow200:"#ffcf40",yellow300:"#705b1c","dark-yellow100":"#fffcf2","dark-yellow200":"#ffcf40","dark-yellow300":"#705b1c",orange:"#FF7D00",blue:"#0C66E4",purple:"#722ED1",plum:"#D91AD9",pink:"#F5319D"},Yc=`outline-none resize-none border-solid border-[1px] min-w-[280px] px-[16px] py-[8px] border-[${lt.gray300}] rounded-[10px]`,Kc=`outline-none resize-none rounded-[10px] border-solid border-[1px] min-w-[280px] border-[${lt.red200}] box-border px-[16px] py-[8px]`,qc={small:"h-[140px] text-body-400-5",large:"h-[140px] text-body-400-4"},Xc=m.forwardRef(function({label:e,hasError:n,helpMessage:r,size:i="large",focusColor:o=lt.gray400,onFocus:s,onBlur:a,...l},u){const[c,f]=m.useState(!1);function h(g){f(!0),s==null||s(g)}function p(g){f(!1),a==null||a(g)}return y.jsxs(Dt,{direction:"column",children:[e?y.jsxs(y.Fragment,{children:[y.jsx(ye,{color:lt.black,fontSize:"14px",fontWeight:600,children:e}),y.jsx(ve,{direction:"horizontal",size:6})]}):null,y.jsx("textarea",{ref:u,className:Z(!l.disabled&&n?Kc:Yc,qc[i],l.disabled?"bg-[#fafafa]":""),style:{borderColor:!n&&c?o:void 0},onBlur:p,onFocus:h,...l}),r?y.jsxs(y.Fragment,{children:[y.jsx(ve,{direction:"horizontal",size:4}),y.jsx(ye,{color:n?lt.red200:lt.gray600,fontSize:i==="small"?"12px":"14px",children:r})]}):null]})}),Zc=m.forwardRef(function({label:e,hasError:n,helpMessage:r,size:i="medium",focusColor:o=lt.gray300,onFocus:s,onBlur:a,...l},u){const[c,f]=m.useState(!1);function h(g){f(!0),s==null||s(g)}function p(g){f(!1),a==null||a(g)}return y.jsxs(Dt,{direction:"column",children:[e?y.jsxs(y.Fragment,{children:[y.jsx(ye,{color:lt.black,fontSize:"14px",fontWeight:600,children:e}),y.jsx(ve,{direction:"horizontal",size:6})]}):null,y.jsx(Ys,{ref:u,inValid:!!n,size:i,style:!n&&c?{borderColor:o}:{},onBlur:p,onFocus:h,...l}),r?y.jsxs(y.Fragment,{children:[y.jsx(ve,{direction:"horizontal",size:4}),y.jsx(ye,{color:n?lt.red200:lt.gray600,fontSize:i==="small"?"12px":"14px",children:r})]}):null]})});function Jc({size:t,margin:e,color:n=lt.gray300,direction:r="vertical"}){return y.jsx("div",{style:{width:r==="vertical"?t:"1px",height:r==="horizontal"?t:"1px",marginBlock:r==="vertical"?e:0,marginInline:r==="horizontal"?e:0,background:n}})}function Qc({className:t="",children:e,width:n,height:r,borderRadius:i}){return y.jsx("div",{className:`${t} animate-skeleton`,style:{width:n,height:r,borderRadius:i},children:e})}const tf={enter:{opacity:1,transition:{opacity:{duration:.3,ease:"easeInOut"}}},exit:{opacity:0,transition:{duration:.3,ease:"easeInOut"}}},ef="flex items-center justify-center absolute z-[1] text-center",nf={small:"min-w-[16px] min-h-[16px] text-[12px]",medium:"min-w-[20px] min-h-[20px] text-[14px]",large:"min-w-[24px] min-h-[24px] text-[14px]"},rf={small:{"top-left":"top-[-3px] left-[-3px]","top-right":"top-[-3px] right-[-3px]","bottom-left":"bottom-[-3px] left-[-3px]","bottom-right":"bottom-[-3px] right-[-3px]"},medium:{"top-left":"top-[-4px] left-[-4px]","top-right":"top-[-4px] right-[-4px]","bottom-left":"bottom-[-4px] left-[-4px]","bottom-right":"bottom-[-4px] right-[-4px]"},large:{"top-left":"top-[-5px] left-[-5px]","top-right":"top-[-5px] right-[-5px]","bottom-left":"bottom-[-5px] left-[-5px]","bottom-right":"bottom-[-5px] right-[-5px]"}};function sf({className:t="",radius:e="8px",size:n="medium",color:r="blue",placement:i="top-right",content:o,isVisible:s,children:a}){return y.jsxs(Dt,{className:"relative",display:"inline-flex",children:[s&&y.jsx($t,{children:y.jsx(Vt,{features:Et,children:y.jsx(_t.div,{className:Z(ef,nf[n],rf[n][i],t),style:{backgroundColor:r,borderRadius:e},variants:tf,children:o})})}),a]})}function of(t){const[e,n]=m.useState(!1);return m.useEffect(()=>{t&&n(!0),t===void 0&&n(!0)},[t]),e}function af(t){const e=document.createElement("div");return e.setAttribute("id",t),e}function lf({container:t,children:e,id:n="portal"}){const r=m.useMemo(()=>(t==null?void 0:t.current)||document.body,[t]),i=m.useMemo(()=>document.getElementById(n)||af(n),[n]);return m.useLayoutEffect(()=>(r.appendChild(i),()=>{r.contains(i)&&r.removeChild(i)}),[r,i]),ho.createPortal(e,i)}function Ye({children:t,...e}){return of()?y.jsx(lf,{...e,children:t}):null}const nr=m.createContext(void 0);function uf(){const t=m.useContext(nr);if(!t)throw new Error("`context` is undefined. Seems you forgot to wrap component within the Provider");return t}function Ks(){return{AccordionProvider:nr.Provider,useContext:uf,Context:nr}}const cf={light:"flex flex-col overflow-hidden",bordered:"flex flex-col rounded-[12px] border-solid border-[1px] border-gray400 overflow-hidden",splitted:"flex flex-col gap-[10px] overflow-hidden"},ff={light:"px-3 bg-[var(--bg-color)] transition-all hover:brightness-90",bordered:"px-3 bg-[var(--bg-color)] transition-all hover:brightness-90",splitted:"px-3 rounded-[12px] bg-[var(--bg-color)] transition-all hover:brightness-90 bg-white border-solid border-[1px] border-gray400"};function df({className:t,children:e,defaultSelected:n,type:r="single",variant:i="light",color:o="white",onChange:s}){const[a,l]=m.useState(n),{AccordionProvider:u}=Ks(),c=m.useCallback(f=>{l(f),s==null||s(f)},[s]);return y.jsx("ul",{className:Z(cf[i],t),children:y.jsx(u,{value:{selected:a,type:r,variant:i,color:o,defaultSelected:n,onChange:c},children:e})})}const hf={enter:{opacity:1,height:"auto",transition:{height:{duration:.3,ease:"easeInOut"},opacity:{duration:.4,ease:"easeInOut"}}},exit:{opacity:0,height:0,transition:{duration:.3,ease:"easeInOut"}}};function pf({children:t}){return y.jsx(Vt,{features:Et,children:y.jsx(_t.div,{animate:"enter",className:"w-full will-change-auto overflow-y-hidden",exit:"exit",initial:"exit",variants:hf,children:y.jsx("div",{className:"py-3",children:t})})})}function mf({children:t,isOpen:e,icon:n,onClick:r}){return y.jsx("header",{className:"py-3",role:"button",onClick:r,children:y.jsxs(Dt,{align:"center",justify:"space-between",children:[t,y.jsx("span",{className:Z("transition-all",e?"rotate-[-90deg]":"rotate-0"),children:n??y.jsx(gf,{})})]})})}function gf(){return y.jsx("svg",{fill:"none",height:"16",id:"chevron-right",style:{transform:"rotate(180deg)"},viewBox:"0 0 16 16",width:"16",xmlns:"http://www.w3.org/2000/svg",children:y.jsx("g",{id:"icon/arrow-chevron-right",children:y.jsx("path",{clipRule:"evenodd",d:"M11.9603 7.46967C12.2532 7.76256 12.2532 8.23744 11.9603 8.53033L6.71026 13.7803C6.41737 14.0732 5.94249 14.0732 5.6496 13.7803C5.35671 13.4874 5.35671 13.0126 5.6496 12.7197L10.3693 8L5.6496 3.28033C5.35671 2.98744 5.35671 2.51256 5.6496 2.21967C5.9425 1.92678 6.41737 1.92678 6.71026 2.21967L11.9603 7.46967Z",fill:"currentColor",fillRule:"evenodd",id:"Icon (Stroke)"})})})}function yf({className:t,header:e,headerIcon:n,body:r,value:i,disabled:o}){const{useContext:s}=Ks(),{selected:a,type:l,variant:u,color:c,defaultSelected:f,onChange:h}=s(),[p,g]=m.useState(f===i),v=l==="single"?a===i:p,T=m.useCallback(()=>{g(C=>!C)},[]);return y.jsxs("li",{className:Z(ff[u],o?"opacity-45":"",t),style:{"--bg-color":c},children:[y.jsx(mf,{icon:n,isOpen:v,onClick:o?void 0:()=>l==="single"?h(v?void 0:i):T(),children:e}),y.jsx($t,{children:v&&y.jsx(pf,{children:r})})]})}const rr=m.createContext(void 0);function vf(){const t=m.useContext(rr);if(!t)throw new Error("`context` is undefined. Seems you forgot to wrap component within the Provider");return t}function qs(){return{DrawerProvider:rr.Provider,useContext:vf,Context:rr}}const xf={enter:{y:0,transition:{duration:.3,ease:"easeInOut"}},exit:{y:"-100%",transition:{duration:.3,ease:"easeInOut"}}},bf={enter:{y:0,transition:{duration:.3,ease:"easeInOut"}},exit:{y:"100%",transition:{duration:.3,ease:"easeInOut"}}},Pf={enter:{x:0,transition:{duration:.3,ease:"easeInOut"}},exit:{x:"-100%",transition:{duration:.3,ease:"easeInOut"}}},wf={enter:{x:0,transition:{duration:.3,ease:"easeInOut"}},exit:{x:"100%",transition:{duration:.3,ease:"easeInOut"}}};function Tf({isOpen:t,placement:e,motionVariant:n,zIndex:r,drawerId:i,onOpen:o,onClose:s,onOpenChange:a}){function l(u){u||s==null||s(),u&&(o==null||o()),a(u)}return{isOpen:t,placement:e,motionVariant:n,zIndex:r,drawerId:i,onOpenChange:l}}function Cf({children:t,motionVariant:e,allowCloseOnClickBackDrop:n=!1,zIndex:r=1,placement:i="bottom",drawerId:o="drawer-portal",...s}){const a={top:xf,bottom:bf,left:Pf,right:wf},{DrawerProvider:l}=qs(),u=Tf({...s,drawerId:o,zIndex:r,placement:i,motionVariant:e??a[i]});return y.jsx(l,{value:u,children:y.jsx($t,{children:u.isOpen?y.jsx(Ge,{zIndex:r,onClick:n?()=>u.onOpenChange(!1):void 0,children:t}):null})})}const Sf="fixed bg-[var(--bg-color)] z-[var(--zIndex)]",Af={top:"left-0 top-0 w-full",bottom:"left-0 bottom-0 w-full",left:"left-0 top-0 h-full",right:"right-0 top-0 h-full"};function Vf({children:t,className:e,color:n="white"}){const{useContext:r}=qs(),i=r();return y.jsx(Ye,{id:i.drawerId,children:y.jsx(Vt,{features:Et,children:y.jsx(_t.div,{animate:"enter",className:Z(Sf,Af[i.placement??"bottom"],e),exit:"exit",initial:"exit",style:{"--bg-color":n,"--zIndex":i.zIndex??1},variants:i.motionVariant,children:typeof t=="function"?t(()=>i.onOpenChange(!1)):t})})})}function Ef({hideCloseButton:t,closeButton:e,isOpen:n,placement:r,motionVariant:i,zIndex:o,onOpen:s,onClose:a,onOpenChange:l}){function u(c){c||a==null||a(),c&&(s==null||s()),l(c)}return{isOpen:n,placement:r,hideCloseButton:t,closeButton:e,motionVariant:i,zIndex:o,onOpenChange:u}}const ir=m.createContext(void 0);function Df(){const t=m.useContext(ir);if(!t)throw new Error("`context` is undefined. Seems you forgot to wrap component within the Provider");return t}function Xs(){return{ModalProvider:ir.Provider,useContext:Df,Context:ir}}const jf={enter:{opacity:1,x:"-50%",y:"-50%",transition:{opacity:{duration:.3,ease:"easeInOut"}}},exit:{opacity:0,x:"-50%",y:"-50%",transition:{duration:.3,ease:"easeInOut"}}};function Mf({children:t,removeDimmer:e,zIndex:n=1,allowCloseOnClickBackDrop:r=!1,motionVariant:i=jf,...o}){const{ModalProvider:s}=Xs(),a=Ef({...o,motionVariant:i,zIndex:n});return y.jsx(s,{value:a,children:y.jsx($t,{children:a.isOpen?y.jsx(Ge,{removeDimmer:e,zIndex:n,onClick:r?()=>a.onOpenChange(!1):void 0,children:t}):null})})}function Of({children:t,className:e="w-[320px] h-[320px] bg-white"}){const{useContext:n}=Xs(),r=n(),i=m.useMemo(()=>{switch(r.placement??"center"){case"bottom":return"bottom-[0] left-[50%] translate-x-[-50%]";case"top":return"top-[0] left-[50%] translate-x-[-50%]";case"center":default:return"top-[50%] left-[50%] translate-x-[-50%] translate-y-[-50%]"}},[r.placement]);return y.jsx(Vt,{features:Et,children:y.jsxs(_t.div,{animate:"enter",className:Z("fixed flex flex-col rounded-[12px] overflow-hidden",i,e),exit:"exit",initial:"exit",style:{zIndex:r.zIndex},variants:r.motionVariant,children:[!r.hideCloseButton&&r.closeButton?y.jsx("div",{className:"absolute right-4 top-4 cursor-pointer",onClick:()=>r.onOpenChange(!1),children:r.closeButton}):null,typeof t=="function"?t(()=>r.onOpenChange(!1)):t]})})}function Lf({children:t,className:e}){return y.jsx("header",{className:e,children:y.jsx(Dt,{align:"center",className:"w-full",children:t})})}function kf({className:t,children:e}){return y.jsx("div",{className:t,children:e})}function Rf({className:t,children:e}){return y.jsx("footer",{className:t,children:e})}function Zs(t,e){const n=m.useRef([]),r=m.useCallback(({target:i})=>{function o(){return i==null||n.current.length===0||n.current.some(s=>s.contains(i))}o()||e()},[e]);m.useEffect(()=>{t&&(n.current=(Array.isArray(t)?t:[t]).filter(i=>i!=null))},[t]),m.useEffect(()=>(document.addEventListener("click",r),document.addEventListener("touchstart",r),()=>{document.removeEventListener("click",r),document.removeEventListener("touchstart",r)}),[r])}const sr=m.createContext(void 0);function Ff(){const t=m.useContext(sr);if(!t)throw new Error("`context` is undefined. Seems you forgot to wrap component within the Provider");return t}function Ke(){return{DropdownProvider:sr.Provider,useContext:Ff,Context:sr}}const If={enter:{opacity:1,scale:1,transition:{opacity:{duration:.3,ease:"easeInOut"}}},exit:{opacity:0,scale:.9,transition:{duration:.3,ease:"easeInOut"}}};function Bf({children:t}){const e=m.useRef(null),[n,r]=m.useState([]),{useContext:i}=Ke(),o=i();return Zs(n,()=>{o&&o.isOpen&&setTimeout(()=>o.onOpenChange(!1),100)}),m.useEffect(()=>{e.current&&r(e.current)},[]),y.jsx(Vt,{features:Et,children:y.jsx(_t.div,{ref:e,animate:"enter",className:"absolute z-[4] mt-[4px] w-full",exit:"exit",initial:"exit",variants:If,children:t})})}function _f({children:t}){const{useContext:e}=Ke(),n=e();return y.jsx("div",{children:m.cloneElement(t,{onClick:r=>{r.preventDefault(),n.onOpenChange(!n.isOpen)}})})}function Nf({isOpen:t,selectedItem:e,color:n,onOpen:r,onClose:i,onSelect:o,onOpenChange:s}){function a(l){l||i==null||i(),l&&(r==null||r()),s(l)}return{isOpen:t,selectedItem:e,color:n,onSelect:o,onOpenChange:a}}function $f({trigger:t,content:e,selectedItem:n,color:r,onSelect:i}){const[o,s]=m.useState(!1),{DropdownProvider:a}=Ke(),l=Nf({isOpen:o,selectedItem:n,color:r,onSelect:i,onOpenChange:u=>s(u)});return y.jsx(a,{value:l,children:y.jsxs("div",{className:"relative",children:[y.jsx(_f,{children:t}),y.jsx($t,{children:l.isOpen?y.jsx(Bf,{children:e}):null})]})})}function Uf({children:t,className:e}){return y.jsx("ul",{className:Z("rounded-lg p-[4px] min-w-[200px] border-[3px] border-solid border-gray-500",e),children:t})}function Wf({children:t,value:e,className:n,disabled:r}){const{useContext:i}=Ke(),o=i();function s(){o.onSelect(e),o.onOpenChange(!1)}return y.jsx("li",{className:Z("p-2 c cursor-pointer hover:opacity-75 hover:brightness-[0.7] hover:bg-[var(--bg-color)] rounded-[inherit]",r?"cursor-not-allowed":"",n),style:{"--bg-color":o.color??""},onClick:r?void 0:s,children:t})}const zf=typeof window<"u"?m.useLayoutEffect:m.useEffect,Hf={enter:{opacity:1,scale:1,transition:{opacity:{duration:.3,ease:"easeInOut"}}},exit:{opacity:0,scale:.9,transition:{duration:.3,ease:"easeInOut"}}};function Gf({isOpen:t,zIndex:e,placement:n,motionVariant:r,onOpen:i,onClose:o,onOpenChange:s}){function a(l){l||o==null||o(),l&&(i==null||i()),s(l)}return{isOpen:t,placement:n,motionVariant:r??Hf,zIndex:e,onOpenChange:a}}const or=m.createContext(void 0);function Yf(){const t=m.useContext(or);if(!t)throw new Error("`context` is undefined. Seems you forgot to wrap component within the Provider");return t}function ar(){return{PopoverProvider:or.Provider,useContext:Yf,Context:or}}function Kf({children:t,id:e="popover-container",placement:n="bottom",zIndex:r=1,offset:i=0,...o}){const s=m.useRef(null),a=m.useRef(null),[l,u]=m.useState({top:0,left:0}),{PopoverProvider:c}=ar(),f=Gf({...o,zIndex:r,placement:n}),[h,p]=m.Children.toArray(t),g=m.useCallback(()=>{if(!s.current)return;const{top:v,left:T,height:C}=s.current.getBoundingClientRect();n==="top"&&u({top:v+window.scrollY-C+8,left:T+i+window.scrollX}),n==="bottom"&&u({top:v+C+8+window.scrollY,left:T+i+window.scrollX})},[i,n]);return zf(()=>(s.current&&f.isOpen&&g(),window.addEventListener("resize",g),()=>{window.removeEventListener("resize",g)}),[f.isOpen,g]),y.jsxs(c,{value:f,children:[y.jsx("div",{ref:s,className:"inline-block",children:h}),y.jsx($t,{children:f.isOpen?y.jsx(Ye,{id:e,children:y.jsx("div",{ref:a,className:"absolute",style:l,children:p})}):null})]})}function qf({children:t}){const e=m.useRef(null),[n,r]=m.useState([]),{useContext:i}=ar(),o=i();return Zs(n,()=>{o&&o.isOpen&&setTimeout(()=>o.onOpenChange(!1),100)}),m.useEffect(()=>{e.current&&r(e.current)},[]),y.jsx("div",{ref:e,children:y.jsx(Vt,{features:Et,children:y.jsx(_t.div,{animate:"enter",exit:"exit",initial:"exit",variants:o.motionVariant,children:typeof t=="function"?t(()=>o.onOpenChange(!1)):t})})})}function Xf({children:t}){const{useContext:e}=ar(),n=e(),r=m.useMemo(()=>typeof t=="string"?y.jsx("p",{children:t}):m.Children.only(t),[t]);return m.cloneElement(r,{onClick:()=>n.onOpenChange(!n.isOpen)})}function Zf({children:t,className:e}){return y.jsx(Dt,{className:Z("w-full h-full overflow-y-auto",e),direction:"column",children:t})}const lr=m.createContext(void 0);function Jf(){const t=m.useContext(lr);if(!t)throw new Error("`context` is undefined. Seems you forgot to wrap component within the Provider");return t}function Js(){return{BottomSheetProvider:lr.Provider,useContext:Jf,Context:lr}}function Qf({onPointerDown:t}){return y.jsx("div",{className:Z("relative min-h-[50px] py-[4px] transition-all","after:cursor-pointer after: after:absolute after:content-[''] after:rounded-3xl after:w-[60px] after:h-[10px] after:top-[6px] after:left-[50%] after:translate-x-[-50%]"," after:bg-gray-300 hover:after:bg-gray-400"),style:{userSelect:"none"},onPointerDown:t})}function td(t,e,n){return{opened:{top:`calc(${t} - ${e})`,transition:{duration:.3,ease:"easeInOut"}},closed:{top:t,transition:{duration:.3,ease:"easeInOut"}},expanded:{top:`calc( ${t} - ${n})`,transition:{duration:.3,ease:"easeInOut"}}}}function ed({children:t}){const e=Oc(),{useContext:n}=Js(),{color:r,zIndex:i,maxHeight:o,minHeight:s,onOpenChange:a}=n(),[l,u]=m.useState(!1);function c(f,h){const p=h.velocity.y>20||h.velocity.y>=0&&h.point.y>45,g=h.velocity.y<0;if(l&&!g){u(!1);return}p&&!g&&!l?a(!1):u(!0)}return y.jsx(Ye,{children:y.jsx(Vt,{features:Et,children:y.jsxs(wc.div,{animate:l?"expanded":"opened",className:Z("fixed bottom-0 left-0 will-change-transform w-full overflow-hidden ","pb-[24px] shadow-[0px 2px 5px rgba(0, 0, 0, 0.06), 0px 2px 13px rgba(0, 0, 0, 0.12)] rounded-t-[12px]","bg-[var(--bg-color)] z-[var(--zIndex)]"),drag:"y",dragConstraints:{top:0,bottom:0},dragControls:e,dragElastic:.2,dragListener:!1,exit:"closed",initial:"closed",style:{"--zIndex":i,"--bg-color":r},transition:{type:"spring",damping:40,stiffness:400},variants:td("100dvh",s,o),onDragEnd:c,children:[y.jsx(Qf,{onPointerDown:f=>{e.start(f)}}),y.jsx(Zf,{children:t})]})})})}function nd({children:t,removeDimmer:e,isOpen:n,allowCloseOnClickBackDrop:r,color:i="white",zIndex:o=10,maxHeight:s="600px",minHeight:a="180px",...l}){const{BottomSheetProvider:u}=Js();return y.jsx(u,{value:{...l,color:i,isOpen:n,zIndex:o,minHeight:a,maxHeight:s},children:y.jsx($t,{children:n?y.jsx(Ge,{removeDimmer:e,onClick:r?()=>l.onOpenChange(!1):void 0,children:y.jsx(ed,{children:t})}):null})})}M.Accordion=df,M.AccordionItem=yf,M.Badge=sf,M.BottomSheet=nd,M.Button=$c,M.Dimmed=Ge,M.Divider=Jc,M.Drawer=Cf,M.DrawerContent=Vf,M.Dropdown=$f,M.DropdownBody=Uf,M.DropdownItem=Wf,M.Flex=Dt,M.Input=Ys,M.Modal=Mf,M.ModalBody=kf,M.ModalContent=Of,M.ModalFooter=Rf,M.ModalHeader=Lf,M.Popover=Kf,M.PopoverContent=qf,M.PopoverTrigger=Xf,M.Portal=Ye,M.Skeleton=Qc,M.Spacing=ve,M.Text=ye,M.TextArea=Xc,M.TextField=Zc,Object.defineProperty(M,Symbol.toStringTag,{value:"Module"})});
|
|
36
36
|
//# sourceMappingURL=ownui-system.umd.cjs.map
|