1 line
105 KiB
JavaScript
1 line
105 KiB
JavaScript
"use strict";(self.webpackChunkmantis_material_react=self.webpackChunkmantis_material_react||[]).push([[62],{7208:(t,e,n)=>{n.d(e,{Y:()=>o});var i=n(9950);const s=(t,e,n)=>{const i=e-t;return((n-t)%i+i)%i+t};function o(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];const o=(0,i.useRef)(0),[r,a]=(0,i.useState)(e[o.current]);return[r,(0,i.useCallback)((t=>{o.current="number"!==typeof t?s(0,e.length,o.current+1):t,a(e[o.current])}),[e.length,...e])]}},20454:(t,e,n)=>{function i(t){if(null==t)throw new TypeError("Cannot destructure "+t)}n.d(e,{A:()=>i})},76475:(t,e,n)=>{n.d(e,{P:()=>hr});var i=n(89379),s=n(9950);const o=(0,s.createContext)({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"}),r=(0,s.createContext)({}),a=(0,s.createContext)(null),l="undefined"!==typeof document,c=l?s.useLayoutEffect:s.useEffect,u=(0,s.createContext)({strict:!1}),h=t=>t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),d="data-"+h("framerAppearId");function p(t){return t&&"object"===typeof t&&Object.prototype.hasOwnProperty.call(t,"current")}function m(t){return"string"===typeof t||Array.isArray(t)}function f(t){return null!==t&&"object"===typeof t&&"function"===typeof t.start}const g=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],v=["initial",...g];function y(t){return f(t.animate)||v.some((e=>m(t[e])))}function x(t){return Boolean(y(t)||t.variants)}function A(t){const{initial:e,animate:n}=function(t,e){if(y(t)){const{initial:e,animate:n}=t;return{initial:!1===e||m(e)?e:void 0,animate:m(n)?n:void 0}}return!1!==t.inherit?e:{}}(t,(0,s.useContext)(r));return(0,s.useMemo)((()=>({initial:e,animate:n})),[P(e),P(n)])}function P(t){return Array.isArray(t)?t.join(" "):t}const b={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"]},T={};for(const pr in b)T[pr]={isEnabled:t=>b[pr].some((e=>!!t[e]))};const w=(0,s.createContext)({}),S=(0,s.createContext)({}),E=Symbol.for("motionComponentSymbol");function V(t){let{preloadedFeatures:e,createVisualElement:n,useRender:h,useVisualState:m,Component:f}=t;e&&function(t){for(const e in t)T[e]=(0,i.A)((0,i.A)({},T[e]),t[e])}(e);const g=(0,s.forwardRef)((function(t,g){let v;const y=(0,i.A)((0,i.A)((0,i.A)({},(0,s.useContext)(o)),t),{},{layoutId:C(t)}),{isStatic:x}=y,P=A(t),b=m(t,x);if(!x&&l){P.visualElement=function(t,e,n,i){const{visualElement:l}=(0,s.useContext)(r),h=(0,s.useContext)(u),p=(0,s.useContext)(a),m=(0,s.useContext)(o).reducedMotion,f=(0,s.useRef)();i=i||h.renderer,!f.current&&i&&(f.current=i(t,{visualState:e,parent:l,props:n,presenceContext:p,blockInitialAnimation:!!p&&!1===p.initial,reducedMotionConfig:m}));const g=f.current;(0,s.useInsertionEffect)((()=>{g&&g.update(n,p)}));const v=(0,s.useRef)(Boolean(n[d]&&!window.HandoffComplete));return c((()=>{g&&(g.render(),v.current&&g.animationState&&g.animationState.animateChanges())})),(0,s.useEffect)((()=>{g&&(g.updateFeatures(),!v.current&&g.animationState&&g.animationState.animateChanges(),v.current&&(v.current=!1,window.HandoffComplete=!0))})),g}(f,b,y,n);const t=(0,s.useContext)(S),i=(0,s.useContext)(u).strict;P.visualElement&&(v=P.visualElement.loadFeatures(y,i,e,t))}return s.createElement(r.Provider,{value:P},v&&P.visualElement?s.createElement(v,(0,i.A)({visualElement:P.visualElement},y)):null,h(f,t,function(t,e,n){return(0,s.useCallback)((i=>{i&&t.mount&&t.mount(i),e&&(i?e.mount(i):e.unmount()),n&&("function"===typeof n?n(i):p(n)&&(n.current=i))}),[e])}(b,P.visualElement,g),b,x,P.visualElement))}));return g[E]=f,g}function C(t){let{layoutId:e}=t;const n=(0,s.useContext)(w).id;return n&&void 0!==e?n+"-"+e:e}function M(t){function e(e){return V(t(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}))}if("undefined"===typeof Proxy)return e;const n=new Map;return new Proxy(e,{get:(t,i)=>(n.has(i)||n.set(i,e(i)),n.get(i))})}const D=["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 k(t){return"string"===typeof t&&!t.includes("-")&&!!(D.indexOf(t)>-1||/[A-Z]/.test(t))}const R={};const L=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],j=new Set(L);function B(t,e){let{layout:n,layoutId:i}=e;return j.has(t)||t.startsWith("origin")||(n||void 0!==i)&&(!!R[t]||"opacity"===t)}const F=t=>Boolean(t&&t.getVelocity),O={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},I=L.length;const U=t=>e=>"string"===typeof e&&e.startsWith(t),N=U("--"),W=U("var(--"),H=(t,e)=>e&&"number"===typeof t?e.transform(t):t,z=(t,e,n)=>Math.min(Math.max(n,t),e),Y={test:t=>"number"===typeof t,parse:parseFloat,transform:t=>t},X=(0,i.A)((0,i.A)({},Y),{},{transform:t=>z(0,1,t)}),G=(0,i.A)((0,i.A)({},Y),{},{default:1}),q=t=>Math.round(1e5*t)/1e5,Z=/(-)?([\d]*\.?[\d])+/g,K=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,$=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function _(t){return"string"===typeof t}const J=t=>({test:e=>_(e)&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>"".concat(e).concat(t)}),Q=J("deg"),tt=J("%"),et=J("px"),nt=J("vh"),it=J("vw"),st=(0,i.A)((0,i.A)({},tt),{},{parse:t=>tt.parse(t)/100,transform:t=>tt.transform(100*t)}),ot=(0,i.A)((0,i.A)({},Y),{},{transform:Math.round}),rt={borderWidth:et,borderTopWidth:et,borderRightWidth:et,borderBottomWidth:et,borderLeftWidth:et,borderRadius:et,radius:et,borderTopLeftRadius:et,borderTopRightRadius:et,borderBottomRightRadius:et,borderBottomLeftRadius:et,width:et,maxWidth:et,height:et,maxHeight:et,size:et,top:et,right:et,bottom:et,left:et,padding:et,paddingTop:et,paddingRight:et,paddingBottom:et,paddingLeft:et,margin:et,marginTop:et,marginRight:et,marginBottom:et,marginLeft:et,rotate:Q,rotateX:Q,rotateY:Q,rotateZ:Q,scale:G,scaleX:G,scaleY:G,scaleZ:G,skew:Q,skewX:Q,skewY:Q,distance:et,translateX:et,translateY:et,translateZ:et,x:et,y:et,z:et,perspective:et,transformPerspective:et,opacity:X,originX:st,originY:st,originZ:et,zIndex:ot,fillOpacity:X,strokeOpacity:X,numOctaves:ot};function at(t,e,n,i){const{style:s,vars:o,transform:r,transformOrigin:a}=t;let l=!1,c=!1,u=!0;for(const h in e){const t=e[h];if(N(h)){o[h]=t;continue}const n=rt[h],i=H(t,n);if(j.has(h)){if(l=!0,r[h]=i,!u)continue;t!==(n.default||0)&&(u=!1)}else h.startsWith("origin")?(c=!0,a[h]=i):s[h]=i}if(e.transform||(l||i?s.transform=function(t,e,n,i){let{enableHardwareAcceleration:s=!0,allowTransformNone:o=!0}=e,r="";for(let a=0;a<I;a++){const e=L[a];void 0!==t[e]&&(r+="".concat(O[e]||e,"(").concat(t[e],") "))}return s&&!t.z&&(r+="translateZ(0)"),r=r.trim(),i?r=i(t,n?"":r):o&&n&&(r="none"),r}(t.transform,n,u,i):s.transform&&(s.transform="none")),c){const{originX:t="50%",originY:e="50%",originZ:n=0}=a;s.transformOrigin="".concat(t," ").concat(e," ").concat(n)}}const lt=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function ct(t,e,n){for(const i in e)F(e[i])||B(i,n)||(t[i]=e[i])}function ut(t,e,n){const i={};return ct(i,t.style||{},t),Object.assign(i,function(t,e,n){let{transformTemplate:i}=t;return(0,s.useMemo)((()=>{const t={style:{},transform:{},transformOrigin:{},vars:{}};return at(t,e,{enableHardwareAcceleration:!n},i),Object.assign({},t.vars,t.style)}),[e])}(t,e,n)),t.transformValues?t.transformValues(i):i}function ht(t,e,n){const i={},s=ut(t,e,n);return t.drag&&!1!==t.dragListener&&(i.draggable=!1,s.userSelect=s.WebkitUserSelect=s.WebkitTouchCallout="none",s.touchAction=!0===t.drag?"none":"pan-".concat("x"===t.drag?"y":"x")),void 0===t.tabIndex&&(t.onTap||t.onTapStart||t.whileTap)&&(i.tabIndex=0),i.style=s,i}const dt=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function pt(t){return t.startsWith("while")||t.startsWith("drag")&&"draggable"!==t||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||dt.has(t)}let mt=t=>!pt(t);try{(ft=require("@emotion/is-prop-valid").default)&&(mt=t=>t.startsWith("on")?!pt(t):ft(t))}catch(dr){}var ft;var gt=n(80045);function vt(t,e,n){return"string"===typeof t?t:et.transform(e+n*t)}const yt={offset:"stroke-dashoffset",array:"stroke-dasharray"},xt={offset:"strokeDashoffset",array:"strokeDasharray"};const At=["attrX","attrY","attrScale","originX","originY","pathLength","pathSpacing","pathOffset"];function Pt(t,e,n,i,s){let{attrX:o,attrY:r,attrScale:a,originX:l,originY:c,pathLength:u,pathSpacing:h=1,pathOffset:d=0}=e;if(at(t,(0,gt.A)(e,At),n,s),i)return void(t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox));t.attrs=t.style,t.style={};const{attrs:p,style:m,dimensions:f}=t;p.transform&&(f&&(m.transform=p.transform),delete p.transform),f&&(void 0!==l||void 0!==c||m.transform)&&(m.transformOrigin=function(t,e,n){const i=vt(e,t.x,t.width),s=vt(n,t.y,t.height);return"".concat(i," ").concat(s)}(f,void 0!==l?l:.5,void 0!==c?c:.5)),void 0!==o&&(p.x=o),void 0!==r&&(p.y=r),void 0!==a&&(p.scale=a),void 0!==u&&function(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,s=!(arguments.length>4&&void 0!==arguments[4])||arguments[4];t.pathLength=1;const o=s?yt:xt;t[o.offset]=et.transform(-i);const r=et.transform(e),a=et.transform(n);t[o.array]="".concat(r," ").concat(a)}(p,u,h,d,!1)}const bt=()=>(0,i.A)((0,i.A)({},{style:{},transform:{},transformOrigin:{},vars:{}}),{},{attrs:{}}),Tt=t=>"string"===typeof t&&"svg"===t.toLowerCase();function wt(t,e,n,o){const r=(0,s.useMemo)((()=>{const n=bt();return Pt(n,e,{enableHardwareAcceleration:!1},Tt(o),t.transformTemplate),(0,i.A)((0,i.A)({},n.attrs),{},{style:(0,i.A)({},n.style)})}),[e]);if(t.style){const e={};ct(e,t.style,t),r.style=(0,i.A)((0,i.A)({},e),r.style)}return r}function St(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return(e,n,o,r,a)=>{let{latestValues:l}=r;const c=(k(e)?wt:ht)(n,l,a,e),u=function(t,e,n){const i={};for(const s in t)"values"===s&&"object"===typeof t.values||(mt(s)||!0===n&&pt(s)||!e&&!pt(s)||t.draggable&&s.startsWith("onDrag"))&&(i[s]=t[s]);return i}(n,"string"===typeof e,t),h=(0,i.A)((0,i.A)((0,i.A)({},u),c),{},{ref:o}),{children:d}=n,p=(0,s.useMemo)((()=>F(d)?d.get():d),[d]);return(0,s.createElement)(e,(0,i.A)((0,i.A)({},h),{},{children:p}))}}function Et(t,e,n,i){let{style:s,vars:o}=e;Object.assign(t.style,s,i&&i.getProjectionStyles(n));for(const r in o)t.style.setProperty(r,o[r])}const Vt=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 Ct(t,e,n,i){Et(t,e,void 0,i);for(const s in e.attrs)t.setAttribute(Vt.has(s)?s:h(s),e.attrs[s])}function Mt(t,e){const{style:n}=t,i={};for(const s in n)(F(n[s])||e.style&&F(e.style[s])||B(s,t))&&(i[s]=n[s]);return i}function Dt(t,e){const n=Mt(t,e);for(const i in t)if(F(t[i])||F(e[i])){n[-1!==L.indexOf(i)?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i]=t[i]}return n}function kt(t,e,n){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};return"function"===typeof e&&(e=e(void 0!==n?n:t.custom,i,s)),"string"===typeof e&&(e=t.variants&&t.variants[e]),"function"===typeof e&&(e=e(void 0!==n?n:t.custom,i,s)),e}const Rt=t=>Array.isArray(t);function Lt(t){const e=F(t)?t.get():t;return n=e,Boolean(n&&"object"===typeof n&&n.mix&&n.toValue)?e.toValue():e;var n}const jt=["transitionEnd","transition"];const Bt=t=>(e,n)=>{const i=(0,s.useContext)(r),o=(0,s.useContext)(a),l=()=>function(t,e,n,i){let{scrapeMotionValuesFromProps:s,createRenderState:o,onMount:r}=t;const a={latestValues:Ft(e,n,i,s),renderState:o()};return r&&(a.mount=t=>r(e,t,a)),a}(t,e,i,o);return n?l():function(t){const e=(0,s.useRef)(null);return null===e.current&&(e.current=t()),e.current}(l)};function Ft(t,e,n,i){const s={},o=i(t,{});for(const d in o)s[d]=Lt(o[d]);let{initial:r,animate:a}=t;const l=y(t),c=x(t);e&&c&&!l&&!1!==t.inherit&&(void 0===r&&(r=e.initial),void 0===a&&(a=e.animate));let u=!!n&&!1===n.initial;u=u||!1===r;const h=u?a:r;if(h&&"boolean"!==typeof h&&!f(h)){(Array.isArray(h)?h:[h]).forEach((e=>{const n=kt(t,e);if(!n)return;const{transitionEnd:i,transition:o}=n,r=(0,gt.A)(n,jt);for(const t in r){let e=r[t];if(Array.isArray(e)){e=e[u?e.length-1:0]}null!==e&&(s[t]=e)}for(const t in i)s[t]=i[t]}))}return s}const Ot=t=>t;class It{constructor(){this.order=[],this.scheduled=new Set}add(t){if(!this.scheduled.has(t))return this.scheduled.add(t),this.order.push(t),!0}remove(t){const e=this.order.indexOf(t);-1!==e&&(this.order.splice(e,1),this.scheduled.delete(t))}clear(){this.order.length=0,this.scheduled.clear()}}const Ut=["prepare","read","update","preRender","render","postRender"];const{schedule:Nt,cancel:Wt,state:Ht,steps:zt}=function(t,e){let n=!1,i=!0;const s={delta:0,timestamp:0,isProcessing:!1},o=Ut.reduce(((t,e)=>(t[e]=function(t){let e=new It,n=new It,i=0,s=!1,o=!1;const r=new WeakSet,a={schedule:function(t){const o=arguments.length>2&&void 0!==arguments[2]&&arguments[2]&&s,a=o?e:n;return arguments.length>1&&void 0!==arguments[1]&&arguments[1]&&r.add(t),a.add(t)&&o&&s&&(i=e.order.length),t},cancel:t=>{n.remove(t),r.delete(t)},process:l=>{if(s)o=!0;else{if(s=!0,[e,n]=[n,e],n.clear(),i=e.order.length,i)for(let n=0;n<i;n++){const i=e.order[n];i(l),r.has(i)&&(a.schedule(i),t())}s=!1,o&&(o=!1,a.process(l))}}};return a}((()=>n=!0)),t)),{}),r=t=>o[t].process(s),a=()=>{const o=performance.now();n=!1,s.delta=i?1e3/60:Math.max(Math.min(o-s.timestamp,40),1),s.timestamp=o,s.isProcessing=!0,Ut.forEach(r),s.isProcessing=!1,n&&e&&(i=!1,t(a))},l=Ut.reduce(((e,r)=>{const l=o[r];return e[r]=function(e){let o=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return n||(n=!0,i=!0,s.isProcessing||t(a)),l.schedule(e,o,r)},e}),{});return{schedule:l,cancel:t=>Ut.forEach((e=>o[e].cancel(t))),state:s,steps:o}}("undefined"!==typeof requestAnimationFrame?requestAnimationFrame:Ot,!0),Yt={useVisualState:Bt({scrapeMotionValuesFromProps:Dt,createRenderState:bt,onMount:(t,e,n)=>{let{renderState:i,latestValues:s}=n;Nt.read((()=>{try{i.dimensions="function"===typeof e.getBBox?e.getBBox():e.getBoundingClientRect()}catch(t){i.dimensions={x:0,y:0,width:0,height:0}}})),Nt.render((()=>{Pt(i,s,{enableHardwareAcceleration:!1},Tt(e.tagName),t.transformTemplate),Ct(e,i)}))}})},Xt={useVisualState:Bt({scrapeMotionValuesFromProps:Mt,createRenderState:lt})};function Gt(t,e,n){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{passive:!0};return t.addEventListener(e,n,i),()=>t.removeEventListener(e,n)}const qt=t=>"mouse"===t.pointerType?"number"!==typeof t.button||t.button<=0:!1!==t.isPrimary;function Zt(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"page";return{point:{x:t[e+"X"],y:t[e+"Y"]}}}function Kt(t,e,n,i){return Gt(t,e,(t=>e=>qt(e)&&t(e,Zt(e)))(n),i)}const $t=(t,e)=>n=>e(t(n)),_t=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return e.reduce($t)};function Jt(t){let e=null;return()=>{const n=()=>{e=null};return null===e&&(e=t,n)}}const Qt=Jt("dragHorizontal"),te=Jt("dragVertical");function ee(t){let e=!1;if("y"===t)e=te();else if("x"===t)e=Qt();else{const t=Qt(),n=te();t&&n?e=()=>{t(),n()}:(t&&t(),n&&n())}return e}function ne(){const t=ee(!0);return!t||(t(),!1)}class ie{constructor(t){this.isMounted=!1,this.node=t}update(){}}function se(t,e){const n="pointer"+(e?"enter":"leave"),i="onHover"+(e?"Start":"End");return Kt(t.current,n,((n,s)=>{if("touch"===n.pointerType||ne())return;const o=t.getProps();t.animationState&&o.whileHover&&t.animationState.setActive("whileHover",e),o[i]&&Nt.update((()=>o[i](n,s)))}),{passive:!t.getProps()[i]})}const oe=(t,e)=>!!e&&(t===e||oe(t,e.parentElement));function re(t,e){if(!e)return;const n=new PointerEvent("pointer"+t);e(n,Zt(n))}const ae=["root"],le=new WeakMap,ce=new WeakMap,ue=t=>{const e=le.get(t.target);e&&e(t)},he=t=>{t.forEach(ue)};function de(t,e,n){const s=function(t){let{root:e}=t,n=(0,gt.A)(t,ae);const s=e||document;ce.has(s)||ce.set(s,{});const o=ce.get(s),r=JSON.stringify(n);return o[r]||(o[r]=new IntersectionObserver(he,(0,i.A)({root:e},n))),o[r]}(e);return le.set(t,n),s.observe(t),()=>{le.delete(t),s.unobserve(t)}}const pe={some:0,all:1};const me={inView:{Feature:class extends ie{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:e,margin:n,amount:i="some",once:s}=t,o={root:e?e.current:void 0,rootMargin:n,threshold:"number"===typeof i?i:pe[i]};return de(this.node.current,o,(t=>{const{isIntersecting:e}=t;if(this.isInView===e)return;if(this.isInView=e,s&&!e&&this.hasEnteredView)return;e&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",e);const{onViewportEnter:n,onViewportLeave:i}=this.node.getProps(),o=e?n:i;o&&o(t)}))}mount(){this.startObserver()}update(){if("undefined"===typeof IntersectionObserver)return;const{props:t,prevProps:e}=this.node,n=["amount","margin","root"].some(function(t){let{viewport:e={}}=t,{viewport:n={}}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t=>e[t]!==n[t]}(t,e));n&&this.startObserver()}unmount(){}}},tap:{Feature:class extends ie{constructor(){super(...arguments),this.removeStartListeners=Ot,this.removeEndListeners=Ot,this.removeAccessibleListeners=Ot,this.startPointerPress=(t,e)=>{if(this.isPressing)return;this.removeEndListeners();const n=this.node.getProps(),i=Kt(window,"pointerup",((t,e)=>{if(!this.checkPressEnd())return;const{onTap:n,onTapCancel:i,globalTapTarget:s}=this.node.getProps();Nt.update((()=>{s||oe(this.node.current,t.target)?n&&n(t,e):i&&i(t,e)}))}),{passive:!(n.onTap||n.onPointerUp)}),s=Kt(window,"pointercancel",((t,e)=>this.cancelPress(t,e)),{passive:!(n.onTapCancel||n.onPointerCancel)});this.removeEndListeners=_t(i,s),this.startPress(t,e)},this.startAccessiblePress=()=>{const t=Gt(this.node.current,"keydown",(t=>{if("Enter"!==t.key||this.isPressing)return;this.removeEndListeners(),this.removeEndListeners=Gt(this.node.current,"keyup",(t=>{"Enter"===t.key&&this.checkPressEnd()&&re("up",((t,e)=>{const{onTap:n}=this.node.getProps();n&&Nt.update((()=>n(t,e)))}))})),re("down",((t,e)=>{this.startPress(t,e)}))})),e=Gt(this.node.current,"blur",(()=>{this.isPressing&&re("cancel",((t,e)=>this.cancelPress(t,e)))}));this.removeAccessibleListeners=_t(t,e)}}startPress(t,e){this.isPressing=!0;const{onTapStart:n,whileTap:i}=this.node.getProps();i&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),n&&Nt.update((()=>n(t,e)))}checkPressEnd(){this.removeEndListeners(),this.isPressing=!1;return this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!ne()}cancelPress(t,e){if(!this.checkPressEnd())return;const{onTapCancel:n}=this.node.getProps();n&&Nt.update((()=>n(t,e)))}mount(){const t=this.node.getProps(),e=Kt(t.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),n=Gt(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=_t(e,n)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}},focus:{Feature:class extends ie{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch(e){t=!0}t&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=_t(Gt(this.node.current,"focus",(()=>this.onFocus())),Gt(this.node.current,"blur",(()=>this.onBlur())))}unmount(){}}},hover:{Feature:class extends ie{mount(){this.unmount=_t(se(this.node,!0),se(this.node,!1))}unmount(){}}}};function fe(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let i=0;i<n;i++)if(e[i]!==t[i])return!1;return!0}function ge(t,e,n){const i=t.getProps();return kt(i,e,void 0!==n?n:i.custom,function(t){const e={};return t.values.forEach(((t,n)=>e[n]=t.get())),e}(t),function(t){const e={};return t.values.forEach(((t,n)=>e[n]=t.getVelocity())),e}(t))}let ve=Ot,ye=Ot;const xe=t=>1e3*t,Ae=t=>t/1e3,Pe=!1,be=t=>Array.isArray(t)&&"number"===typeof t[0];function Te(t){return Boolean(!t||"string"===typeof t&&Se[t]||be(t)||Array.isArray(t)&&t.every(Te))}const we=t=>{let[e,n,i,s]=t;return"cubic-bezier(".concat(e,", ").concat(n,", ").concat(i,", ").concat(s,")")},Se={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:we([0,.65,.55,1]),circOut:we([.55,0,1,.45]),backIn:we([.31,.01,.66,-.59]),backOut:we([.33,1.53,.69,.99])};function Ee(t){if(t)return be(t)?we(t):Array.isArray(t)?t.map(Ee):Se[t]}const Ve=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t;function Ce(t,e,n,i){if(t===e&&n===i)return Ot;const s=e=>function(t,e,n,i,s){let o,r,a=0;do{r=e+(n-e)/2,o=Ve(r,i,s)-t,o>0?n=r:e=r}while(Math.abs(o)>1e-7&&++a<12);return r}(e,0,1,t,n);return t=>0===t||1===t?t:Ve(s(t),e,i)}const Me=Ce(.42,0,1,1),De=Ce(0,0,.58,1),ke=Ce(.42,0,.58,1),Re=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,Le=t=>e=>1-t(1-e),je=t=>1-Math.sin(Math.acos(t)),Be=Le(je),Fe=Re(je),Oe=Ce(.33,1.53,.69,.99),Ie=Le(Oe),Ue=Re(Ie),Ne={linear:Ot,easeIn:Me,easeInOut:ke,easeOut:De,circIn:je,circInOut:Fe,circOut:Be,backIn:Ie,backInOut:Ue,backOut:Oe,anticipate:t=>(t*=2)<1?.5*Ie(t):.5*(2-Math.pow(2,-10*(t-1)))},We=t=>{if(Array.isArray(t)){ye(4===t.length,"Cubic bezier arrays must contain four numerical values.");const[e,n,i,s]=t;return Ce(e,n,i,s)}return"string"===typeof t?(ye(void 0!==Ne[t],"Invalid easing type '".concat(t,"'")),Ne[t]):t},He=(t,e)=>n=>Boolean(_(n)&&$.test(n)&&n.startsWith(t)||e&&Object.prototype.hasOwnProperty.call(n,e)),ze=(t,e,n)=>i=>{if(!_(i))return i;const[s,o,r,a]=i.match(Z);return{[t]:parseFloat(s),[e]:parseFloat(o),[n]:parseFloat(r),alpha:void 0!==a?parseFloat(a):1}},Ye=(0,i.A)((0,i.A)({},Y),{},{transform:t=>Math.round((t=>z(0,255,t))(t))}),Xe={test:He("rgb","red"),parse:ze("red","green","blue"),transform:t=>{let{red:e,green:n,blue:i,alpha:s=1}=t;return"rgba("+Ye.transform(e)+", "+Ye.transform(n)+", "+Ye.transform(i)+", "+q(X.transform(s))+")"}};const Ge={test:He("#"),parse:function(t){let e="",n="",i="",s="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),i=t.substring(5,7),s=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),i=t.substring(3,4),s=t.substring(4,5),e+=e,n+=n,i+=i,s+=s),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(i,16),alpha:s?parseInt(s,16)/255:1}},transform:Xe.transform},qe={test:He("hsl","hue"),parse:ze("hue","saturation","lightness"),transform:t=>{let{hue:e,saturation:n,lightness:i,alpha:s=1}=t;return"hsla("+Math.round(e)+", "+tt.transform(q(n))+", "+tt.transform(q(i))+", "+q(X.transform(s))+")"}},Ze={test:t=>Xe.test(t)||Ge.test(t)||qe.test(t),parse:t=>Xe.test(t)?Xe.parse(t):qe.test(t)?qe.parse(t):Ge.parse(t),transform:t=>_(t)?t:t.hasOwnProperty("red")?Xe.transform(t):qe.transform(t)},Ke=(t,e,n)=>-n*t+n*e+t;function $e(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}const _e=(t,e,n)=>{const i=t*t;return Math.sqrt(Math.max(0,n*(e*e-i)+i))},Je=[Ge,Xe,qe];function Qe(t){const e=(n=t,Je.find((t=>t.test(n))));var n;ye(Boolean(e),"'".concat(t,"' is not an animatable color. Use the equivalent color code instead."));let i=e.parse(t);return e===qe&&(i=function(t){let{hue:e,saturation:n,lightness:i,alpha:s}=t;e/=360,n/=100,i/=100;let o=0,r=0,a=0;if(n){const t=i<.5?i*(1+n):i+n-i*n,s=2*i-t;o=$e(s,t,e+1/3),r=$e(s,t,e),a=$e(s,t,e-1/3)}else o=r=a=i;return{red:Math.round(255*o),green:Math.round(255*r),blue:Math.round(255*a),alpha:s}}(i)),i}const tn=(t,e)=>{const n=Qe(t),s=Qe(e),o=(0,i.A)({},n);return t=>(o.red=_e(n.red,s.red,t),o.green=_e(n.green,s.green,t),o.blue=_e(n.blue,s.blue,t),o.alpha=Ke(n.alpha,s.alpha,t),Xe.transform(o))};const en={regex:/var\s*\(\s*--[\w-]+(\s*,\s*(?:(?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)+)?\s*\)/g,countKey:"Vars",token:"${v}",parse:Ot},nn={regex:K,countKey:"Colors",token:"${c}",parse:Ze.parse},sn={regex:Z,countKey:"Numbers",token:"${n}",parse:Y.parse};function on(t,e){let{regex:n,countKey:i,token:s,parse:o}=e;const r=t.tokenised.match(n);r&&(t["num"+i]=r.length,t.tokenised=t.tokenised.replace(n,s),t.values.push(...r.map(o)))}function rn(t){const e=t.toString(),n={value:e,tokenised:e,values:[],numVars:0,numColors:0,numNumbers:0};return n.value.includes("var(--")&&on(n,en),on(n,nn),on(n,sn),n}function an(t){return rn(t).values}function ln(t){const{values:e,numColors:n,numVars:i,tokenised:s}=rn(t),o=e.length;return t=>{let e=s;for(let s=0;s<o;s++)e=s<i?e.replace(en.token,t[s]):s<i+n?e.replace(nn.token,Ze.transform(t[s])):e.replace(sn.token,q(t[s]));return e}}const cn=t=>"number"===typeof t?0:t;const un={test:function(t){var e,n;return isNaN(t)&&_(t)&&((null===(e=t.match(Z))||void 0===e?void 0:e.length)||0)+((null===(n=t.match(K))||void 0===n?void 0:n.length)||0)>0},parse:an,createTransformer:ln,getAnimatableNone:function(t){const e=an(t);return ln(t)(e.map(cn))}},hn=(t,e)=>n=>"".concat(n>0?e:t);function dn(t,e){return"number"===typeof t?n=>Ke(t,e,n):Ze.test(t)?tn(t,e):t.startsWith("var(")?hn(t,e):fn(t,e)}const pn=(t,e)=>{const n=[...t],i=n.length,s=t.map(((t,n)=>dn(t,e[n])));return t=>{for(let e=0;e<i;e++)n[e]=s[e](t);return n}},mn=(t,e)=>{const n=(0,i.A)((0,i.A)({},t),e),s={};for(const i in n)void 0!==t[i]&&void 0!==e[i]&&(s[i]=dn(t[i],e[i]));return t=>{for(const e in s)n[e]=s[e](t);return n}},fn=(t,e)=>{const n=un.createTransformer(e),i=rn(t),s=rn(e);return i.numVars===s.numVars&&i.numColors===s.numColors&&i.numNumbers>=s.numNumbers?_t(pn(i.values,s.values),n):(ve(!0,"Complex values '".concat(t,"' and '").concat(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.")),hn(t,e))},gn=(t,e,n)=>{const i=e-t;return 0===i?1:(n-t)/i},vn=(t,e)=>n=>Ke(t,e,n);function yn(t,e,n){const i=[],s=n||("number"===typeof(o=t[0])?vn:"string"===typeof o?Ze.test(o)?tn:fn:Array.isArray(o)?pn:"object"===typeof o?mn:vn);var o;const r=t.length-1;for(let a=0;a<r;a++){let n=s(t[a],t[a+1]);if(e){const t=Array.isArray(e)?e[a]||Ot:e;n=_t(t,n)}i.push(n)}return i}function xn(t,e){let{clamp:n=!0,ease:i,mixer:s}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const o=t.length;if(ye(o===e.length,"Both input and output ranges must be the same length"),1===o)return()=>e[0];t[0]>t[o-1]&&(t=[...t].reverse(),e=[...e].reverse());const r=yn(e,i,s),a=r.length,l=e=>{let n=0;if(a>1)for(;n<t.length-2&&!(e<t[n+1]);n++);const i=gn(t[n],t[n+1],e);return r[n](i)};return n?e=>l(z(t[0],t[o-1],e)):l}function An(t){const e=[0];return function(t,e){const n=t[t.length-1];for(let i=1;i<=e;i++){const s=gn(0,e,i);t.push(Ke(n,1,s))}}(e,t.length-1),e}function Pn(t){let{duration:e=300,keyframes:n,times:i,ease:s="easeInOut"}=t;const o=(t=>Array.isArray(t)&&"number"!==typeof t[0])(s)?s.map(We):We(s),r={done:!1,value:n[0]},a=function(t,e){return t.map((t=>t*e))}(i&&i.length===n.length?i:An(n),e),l=xn(a,n,{ease:Array.isArray(o)?o:(c=n,u=o,c.map((()=>u||ke)).splice(0,c.length-1))});var c,u;return{calculatedDuration:e,next:t=>(r.value=l(t),r.done=t>=e,r)}}function bn(t,e){return e?t*(1e3/e):0}function Tn(t,e,n){const i=Math.max(e-5,0);return bn(n-t(i),e-i)}const wn=.001;function Sn(t){let e,n,{duration:i=800,bounce:s=.25,velocity:o=0,mass:r=1}=t;ve(i<=xe(10),"Spring duration must be 10 seconds or less");let a=1-s;a=z(.05,1,a),i=z(.01,10,Ae(i)),a<1?(e=t=>{const e=t*a,n=e*i,s=e-o,r=Vn(t,a),l=Math.exp(-n);return wn-s/r*l},n=t=>{const n=t*a*i,s=n*o+o,r=Math.pow(a,2)*Math.pow(t,2)*i,l=Math.exp(-n),c=Vn(Math.pow(t,2),a);return(-e(t)+wn>0?-1:1)*((s-r)*l)/c}):(e=t=>Math.exp(-t*i)*((t-o)*i+1)-.001,n=t=>Math.exp(-t*i)*(i*i*(o-t)));const l=function(t,e,n){let i=n;for(let s=1;s<En;s++)i-=t(i)/e(i);return i}(e,n,5/i);if(i=xe(i),isNaN(l))return{stiffness:100,damping:10,duration:i};{const t=Math.pow(l,2)*r;return{stiffness:t,damping:2*a*Math.sqrt(r*t),duration:i}}}const En=12;function Vn(t,e){return t*Math.sqrt(1-e*e)}const Cn=["keyframes","restDelta","restSpeed"],Mn=["duration","bounce"],Dn=["stiffness","damping","mass"];function kn(t,e){return e.some((e=>void 0!==t[e]))}function Rn(t){let{keyframes:e,restDelta:n,restSpeed:s}=t,o=(0,gt.A)(t,Cn);const r=e[0],a=e[e.length-1],l={done:!1,value:r},{stiffness:c,damping:u,mass:h,duration:d,velocity:p,isResolvedFromDuration:m}=function(t){let e=(0,i.A)({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},t);if(!kn(t,Dn)&&kn(t,Mn)){const n=Sn(t);e=(0,i.A)((0,i.A)((0,i.A)({},e),n),{},{mass:1}),e.isResolvedFromDuration=!0}return e}((0,i.A)((0,i.A)({},o),{},{velocity:-Ae(o.velocity||0)})),f=p||0,g=u/(2*Math.sqrt(c*h)),v=a-r,y=Ae(Math.sqrt(c/h)),x=Math.abs(v)<5;let A;if(s||(s=x?.01:2),n||(n=x?.005:.5),g<1){const t=Vn(y,g);A=e=>{const n=Math.exp(-g*y*e);return a-n*((f+g*y*v)/t*Math.sin(t*e)+v*Math.cos(t*e))}}else if(1===g)A=t=>a-Math.exp(-y*t)*(v+(f+y*v)*t);else{const t=y*Math.sqrt(g*g-1);A=e=>{const n=Math.exp(-g*y*e),i=Math.min(t*e,300);return a-n*((f+g*y*v)*Math.sinh(i)+t*v*Math.cosh(i))/t}}return{calculatedDuration:m&&d||null,next:t=>{const e=A(t);if(m)l.done=t>=d;else{let i=f;0!==t&&(i=g<1?Tn(A,t,e):0);const o=Math.abs(i)<=s,r=Math.abs(a-e)<=n;l.done=o&&r}return l.value=l.done?a:e,l}}}function Ln(t){let{keyframes:e,velocity:n=0,power:i=.8,timeConstant:s=325,bounceDamping:o=10,bounceStiffness:r=500,modifyTarget:a,min:l,max:c,restDelta:u=.5,restSpeed:h}=t;const d=e[0],p={done:!1,value:d},m=t=>void 0===l?c:void 0===c||Math.abs(l-t)<Math.abs(c-t)?l:c;let f=i*n;const g=d+f,v=void 0===a?g:a(g);v!==g&&(f=v-d);const y=t=>-f*Math.exp(-t/s),x=t=>v+y(t),A=t=>{const e=y(t),n=x(t);p.done=Math.abs(e)<=u,p.value=p.done?v:n};let P,b;const T=t=>{var e;(e=p.value,void 0!==l&&e<l||void 0!==c&&e>c)&&(P=t,b=Rn({keyframes:[p.value,m(p.value)],velocity:Tn(x,t,p.value),damping:o,stiffness:r,restDelta:u,restSpeed:h}))};return T(0),{calculatedDuration:null,next:t=>{let e=!1;return b||void 0!==P||(e=!0,A(t),T(t)),void 0!==P&&t>P?b.next(t-P):(!e&&A(t),p)}}}const jn=t=>{const e=e=>{let{timestamp:n}=e;return t(n)};return{start:()=>Nt.update(e,!0),stop:()=>Wt(e),now:()=>Ht.isProcessing?Ht.timestamp:performance.now()}};function Bn(t){let e=0;let n=t.next(e);for(;!n.done&&e<2e4;)e+=50,n=t.next(e);return e>=2e4?1/0:e}const Fn=["autoplay","delay","driver","keyframes","type","repeat","repeatDelay","repeatType","onPlay","onStop","onComplete","onUpdate"],On={decay:Ln,inertia:Ln,tween:Pn,keyframes:Pn,spring:Rn};function In(t){let e,n,{autoplay:s=!0,delay:o=0,driver:r=jn,keyframes:a,type:l="keyframes",repeat:c=0,repeatDelay:u=0,repeatType:h="loop",onPlay:d,onStop:p,onComplete:m,onUpdate:f}=t,g=(0,gt.A)(t,Fn),v=1,y=!1;const x=()=>{n=new Promise((t=>{e=t}))};let A;x();const P=On[l]||Pn;let b;P!==Pn&&"number"!==typeof a[0]&&(b=xn([0,100],a,{clamp:!1}),a=[0,100]);const T=P((0,i.A)((0,i.A)({},g),{},{keyframes:a}));let w;"mirror"===h&&(w=P((0,i.A)((0,i.A)({},g),{},{keyframes:[...a].reverse(),velocity:-(g.velocity||0)})));let S="idle",E=null,V=null,C=null;null===T.calculatedDuration&&c&&(T.calculatedDuration=Bn(T));const{calculatedDuration:M}=T;let D=1/0,k=1/0;null!==M&&(D=M+u,k=D*(c+1)-u);let R=0;const L=t=>{if(null===V)return;v>0&&(V=Math.min(V,t)),v<0&&(V=Math.min(t-k/v,V)),R=null!==E?E:Math.round(t-V)*v;const e=R-o*(v>=0?1:-1),n=v>=0?e<0:e>k;R=Math.max(e,0),"finished"===S&&null===E&&(R=k);let i=R,s=T;if(c){const t=Math.min(R,k)/D;let e=Math.floor(t),n=t%1;!n&&t>=1&&(n=1),1===n&&e--,e=Math.min(e,c+1);Boolean(e%2)&&("reverse"===h?(n=1-n,u&&(n-=u/D)):"mirror"===h&&(s=w)),i=z(0,1,n)*D}const r=n?{done:!1,value:a[0]}:s.next(i);b&&(r.value=b(r.value));let{done:l}=r;n||null===M||(l=v>=0?R>=k:R<=0);const d=null===E&&("finished"===S||"running"===S&&l);return f&&f(r.value),d&&F(),r},j=()=>{A&&A.stop(),A=void 0},B=()=>{S="idle",j(),e(),x(),V=C=null},F=()=>{S="finished",m&&m(),j(),e()},O=()=>{if(y)return;A||(A=r(L));const t=A.now();d&&d(),null!==E?V=t-E:V&&"finished"!==S||(V=t),"finished"===S&&x(),C=V,E=null,S="running",A.start()};s&&O();const I={then:(t,e)=>n.then(t,e),get time(){return Ae(R)},set time(t){t=xe(t),R=t,null===E&&A&&0!==v?V=A.now()-t/v:E=t},get duration(){const t=null===T.calculatedDuration?Bn(T):T.calculatedDuration;return Ae(t)},get speed(){return v},set speed(t){t!==v&&A&&(v=t,I.time=Ae(R))},get state(){return S},play:O,pause:()=>{S="paused",E=R},stop:()=>{y=!0,"idle"!==S&&(S="idle",p&&p(),B())},cancel:()=>{null!==C&&L(C),B()},complete:()=>{S="finished"},sample:t=>(V=0,L(t))};return I}const Un=["onUpdate","onComplete"],Nn=function(t){let e;return()=>(void 0===e&&(e=t()),e)}((()=>Object.hasOwnProperty.call(Element.prototype,"animate"))),Wn=new Set(["opacity","clipPath","filter","transform","backgroundColor"]);function Hn(t,e,n){let{onUpdate:s,onComplete:o}=n,r=(0,gt.A)(n,Un);if(!(Nn()&&Wn.has(e)&&!r.repeatDelay&&"mirror"!==r.repeatType&&0!==r.damping&&"inertia"!==r.type))return!1;let a,l,c=!1,u=!1;const h=()=>{l=new Promise((t=>{a=t}))};h();let{keyframes:d,duration:p=300,ease:m,times:f}=r;if(((t,e)=>"spring"===e.type||"backgroundColor"===t||!Te(e.ease))(e,r)){const t=In((0,i.A)((0,i.A)({},r),{},{repeat:0,delay:0}));let e={done:!1,value:d[0]};const n=[];let s=0;for(;!e.done&&s<2e4;)e=t.sample(s),n.push(e.value),s+=10;f=void 0,d=n,p=s-10,m="linear"}const g=function(t,e,n){let{delay:i=0,duration:s,repeat:o=0,repeatType:r="loop",ease:a,times:l}=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const c={[e]:n};l&&(c.offset=l);const u=Ee(a);return Array.isArray(u)&&(c.easing=u),t.animate(c,{delay:i,duration:s,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:o+1,direction:"reverse"===r?"alternate":"normal"})}(t.owner.current,e,d,(0,i.A)((0,i.A)({},r),{},{duration:p,ease:m,times:f})),v=()=>{u=!1,g.cancel()},y=()=>{u=!0,Nt.update(v),a(),h()};g.onfinish=()=>{u||(t.set(function(t,e){let{repeat:n,repeatType:i="loop"}=e;return t[n&&"loop"!==i&&n%2===1?0:t.length-1]}(d,r)),o&&o(),y())};return{then:(t,e)=>l.then(t,e),attachTimeline:t=>(g.timeline=t,g.onfinish=null,Ot),get time(){return Ae(g.currentTime||0)},set time(t){g.currentTime=xe(t)},get speed(){return g.playbackRate},set speed(t){g.playbackRate=t},get duration(){return Ae(p)},play:()=>{c||(g.play(),Wt(v))},pause:()=>g.pause(),stop:()=>{if(c=!0,"idle"===g.playState)return;const{currentTime:e}=g;if(e){const n=In((0,i.A)((0,i.A)({},r),{},{autoplay:!1}));t.setWithVelocity(n.sample(e-10).value,n.sample(e).value,10)}y()},complete:()=>{u||g.finish()},cancel:y}}const zn={type:"spring",stiffness:500,damping:25,restSpeed:10},Yn={type:"keyframes",duration:.8},Xn={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Gn=(t,e)=>{let{keyframes:n}=e;return n.length>2?Yn:j.has(t)?t.startsWith("scale")?{type:"spring",stiffness:550,damping:0===n[1]?2*Math.sqrt(550):30,restSpeed:10}:zn:Xn},qn=(t,e)=>"zIndex"!==t&&(!("number"!==typeof e&&!Array.isArray(e))||!("string"!==typeof e||!un.test(e)&&"0"!==e||e.startsWith("url("))),Zn=new Set(["brightness","contrast","saturate","opacity"]);function Kn(t){const[e,n]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[i]=n.match(Z)||[];if(!i)return t;const s=n.replace(i,"");let o=Zn.has(e)?1:0;return i!==n&&(o*=100),e+"("+o+s+")"}const $n=/([a-z-]*)\(.*?\)/g,_n=(0,i.A)((0,i.A)({},un),{},{getAnimatableNone:t=>{const e=t.match($n);return e?e.map(Kn).join(" "):t}}),Jn=(0,i.A)((0,i.A)({},rt),{},{color:Ze,backgroundColor:Ze,outlineColor:Ze,fill:Ze,stroke:Ze,borderColor:Ze,borderTopColor:Ze,borderRightColor:Ze,borderBottomColor:Ze,borderLeftColor:Ze,filter:_n,WebkitFilter:_n}),Qn=t=>Jn[t];function ti(t,e){let n=Qn(t);return n!==_n&&(n=un),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const ei=t=>/^0[^.\s]+$/.test(t);function ni(t){return"number"===typeof t?0===t:null!==t?"none"===t||"0"===t||ei(t):void 0}const ii=["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"];function si(t,e){return t[e]||t.default||t}const oi=!1,ri=function(t,e,n){let s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return o=>{const r=si(s,t)||{},a=r.delay||s.delay||0;let{elapsed:l=0}=s;l-=xe(a);const c=function(t,e,n,i){const s=qn(e,n);let o;o=Array.isArray(n)?[...n]:[null,n];const r=void 0!==i.from?i.from:t.get();let a;const l=[];for(let c=0;c<o.length;c++)null===o[c]&&(o[c]=0===c?r:o[c-1]),ni(o[c])&&l.push(c),"string"===typeof o[c]&&"none"!==o[c]&&"0"!==o[c]&&(a=o[c]);if(s&&l.length&&a)for(let c=0;c<l.length;c++)o[l[c]]=ti(e,a);return o}(e,t,n,r),u=c[0],h=c[c.length-1],d=qn(t,u),p=qn(t,h);ve(d===p,"You are trying to animate ".concat(t,' from "').concat(u,'" to "').concat(h,'". ').concat(u," is not an animatable value - to enable this animation set ").concat(u," to a value animatable to ").concat(h," via the `style` property."));let m=(0,i.A)((0,i.A)({keyframes:c,velocity:e.getVelocity(),ease:"easeOut"},r),{},{delay:-l,onUpdate:t=>{e.set(t),r.onUpdate&&r.onUpdate(t)},onComplete:()=>{o(),r.onComplete&&r.onComplete()}});if(function(t){let{when:e,delay:n,delayChildren:i,staggerChildren:s,staggerDirection:o,repeat:r,repeatType:a,repeatDelay:l,from:c,elapsed:u}=t,h=(0,gt.A)(t,ii);return!!Object.keys(h).length}(r)||(m=(0,i.A)((0,i.A)({},m),Gn(t,m))),m.duration&&(m.duration=xe(m.duration)),m.repeatDelay&&(m.repeatDelay=xe(m.repeatDelay)),!d||!p||Pe||!1===r.type||oi)return function(t){let{keyframes:e,delay:n,onUpdate:i,onComplete:s}=t;const o=()=>(i&&i(e[e.length-1]),s&&s(),{time:0,speed:1,duration:0,play:Ot,pause:Ot,stop:Ot,then:t=>(t(),Promise.resolve()),cancel:Ot,complete:Ot});return n?In({keyframes:[0,1],duration:0,delay:n,onComplete:o}):o()}(Pe?(0,i.A)((0,i.A)({},m),{},{delay:0}):m);if(!s.isHandoff&&e.owner&&e.owner.current instanceof HTMLElement&&!e.owner.getProps().onUpdate){const n=Hn(e,t,m);if(n)return n}return In(m)}};function ai(t){return Boolean(F(t)&&t.add)}const li=t=>/^\-?\d*\.?\d+$/.test(t);function ci(t,e){-1===t.indexOf(e)&&t.push(e)}function ui(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}class hi{constructor(){this.subscriptions=[]}add(t){return ci(this.subscriptions,t),()=>ui(this.subscriptions,t)}notify(t,e,n){const i=this.subscriptions.length;if(i)if(1===i)this.subscriptions[0](t,e,n);else for(let s=0;s<i;s++){const i=this.subscriptions[s];i&&i(t,e,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const di={current:void 0};class pi{constructor(t){var e=this;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};var i;this.version="10.18.0",this.timeDelta=0,this.lastUpdated=0,this.canTrackVelocity=!1,this.events={},this.updateAndNotify=function(t){let n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];e.prev=e.current,e.current=t;const{delta:i,timestamp:s}=Ht;e.lastUpdated!==s&&(e.timeDelta=i,e.lastUpdated=s,Nt.postRender(e.scheduleVelocityCheck)),e.prev!==e.current&&e.events.change&&e.events.change.notify(e.current),e.events.velocityChange&&e.events.velocityChange.notify(e.getVelocity()),n&&e.events.renderRequest&&e.events.renderRequest.notify(e.current)},this.scheduleVelocityCheck=()=>Nt.postRender(this.velocityCheck),this.velocityCheck=t=>{let{timestamp:e}=t;e!==this.lastUpdated&&(this.prev=this.current,this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=t,this.canTrackVelocity=(i=this.current,!isNaN(parseFloat(i))),this.owner=n.owner}onChange(t){return this.on("change",t)}on(t,e){this.events[t]||(this.events[t]=new hi);const n=this.events[t].add(e);return"change"===t?()=>{n(),Nt.read((()=>{this.events.change.getSize()||this.stop()}))}:n}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,e){this.passiveEffect=t,this.stopPassiveEffect=e}set(t){let e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];e&&this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t,e)}setWithVelocity(t,e,n){this.set(e),this.prev=t,this.timeDelta=n}jump(t){this.updateAndNotify(t),this.prev=t,this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return di.current&&di.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?bn(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(t){return this.stop(),new Promise((e=>{this.hasAnimated=!0,this.animation=t(e),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 mi(t,e){return new pi(t,e)}const fi=t=>e=>e.test(t),gi=[Y,et,tt,Q,it,nt,{test:t=>"auto"===t,parse:t=>t}],vi=t=>gi.find(fi(t)),yi=[...gi,Ze,un],xi=["transitionEnd","transition"];function Ai(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,mi(n))}function Pi(t,e){const n=ge(t,e);let s=n?t.makeTargetAnimatable(n,!1):{},{transitionEnd:o={},transition:r={}}=s,a=(0,gt.A)(s,xi);a=(0,i.A)((0,i.A)({},a),o);for(const i in a){Ai(t,i,(l=a[i],Rt(l)?l[l.length-1]||0:l))}var l}function bi(t,e){if(!e)return;return(e[t]||e.default||e).from}const Ti=["transition","transitionEnd"];function wi(t,e){let{protectedKeys:n,needsAnimating:i}=t;const s=n.hasOwnProperty(e)&&!0!==i[e];return i[e]=!1,s}function Si(t,e){const n=t.get();if(!Array.isArray(e))return n!==e;for(let i=0;i<e.length;i++)if(e[i]!==n)return!0}function Ei(t,e){let{delay:n=0,transitionOverride:s,type:o}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=t.makeTargetAnimatable(e),{transition:a=t.getDefaultTransition(),transitionEnd:l}=r,c=(0,gt.A)(r,Ti);const u=t.getValue("willChange");s&&(a=s);const h=[],p=o&&t.animationState&&t.animationState.getState()[o];for(const m in c){const e=t.getValue(m),s=c[m];if(!e||void 0===s||p&&wi(p,m))continue;const o=(0,i.A)({delay:n,elapsed:0},si(a||{},m));if(window.HandoffAppearAnimations){const n=t.getProps()[d];if(n){const t=window.HandoffAppearAnimations(n,m,e,Nt);null!==t&&(o.elapsed=t,o.isHandoff=!0)}}let r=!o.isHandoff&&!Si(e,s);if("spring"===o.type&&(e.getVelocity()||o.velocity)&&(r=!1),e.animation&&(r=!1),r)continue;e.start(ri(m,e,s,t.shouldReduceMotion&&j.has(m)?{type:!1}:o));const l=e.animation;ai(u)&&(u.add(m),l.then((()=>u.remove(m)))),h.push(l)}return l&&Promise.all(h).then((()=>{l&&Pi(t,l)})),h}function Vi(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const s=ge(t,e,n.custom);let{transition:o=t.getDefaultTransition()||{}}=s||{};n.transitionOverride&&(o=n.transitionOverride);const r=s?()=>Promise.all(Ei(t,s,n)):()=>Promise.resolve(),a=t.variantChildren&&t.variantChildren.size?function(){let s=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;const{delayChildren:r=0,staggerChildren:a,staggerDirection:l}=o;return function(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,r=arguments.length>5?arguments[5]:void 0;const a=[],l=(t.variantChildren.size-1)*s,c=1===o?function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:0)*s}:function(){return l-(arguments.length>0&&void 0!==arguments[0]?arguments[0]:0)*s};return Array.from(t.variantChildren).sort(Ci).forEach(((t,s)=>{t.notify("AnimationStart",e),a.push(Vi(t,e,(0,i.A)((0,i.A)({},r),{},{delay:n+c(s)})).then((()=>t.notify("AnimationComplete",e))))})),Promise.all(a)}(t,e,r+s,a,l,n)}:()=>Promise.resolve(),{when:l}=o;if(l){const[t,e]="beforeChildren"===l?[r,a]:[a,r];return t().then((()=>e()))}return Promise.all([r(),a(n.delay)])}function Ci(t,e){return t.sortNodePosition(e)}const Mi=["transition","transitionEnd"],Di=[...g].reverse(),ki=g.length;function Ri(t){return e=>Promise.all(e.map((e=>{let{animation:n,options:i}=e;return function(t,e){let n,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(t.notify("AnimationStart",e),Array.isArray(e)){const s=e.map((e=>Vi(t,e,i)));n=Promise.all(s)}else if("string"===typeof e)n=Vi(t,e,i);else{const s="function"===typeof e?ge(t,e,i.custom):e;n=Promise.all(Ei(t,s,i))}return n.then((()=>t.notify("AnimationComplete",e)))}(t,n,i)})))}function Li(t){let e=Ri(t);const n={animate:Bi(!0),whileInView:Bi(),whileHover:Bi(),whileTap:Bi(),whileDrag:Bi(),whileFocus:Bi(),exit:Bi()};let s=!0;const o=(e,n)=>{const s=ge(t,n);if(s){const{transition:t,transitionEnd:n}=s,o=(0,gt.A)(s,Mi);e=(0,i.A)((0,i.A)((0,i.A)({},e),o),n)}return e};function r(r,a){const l=t.getProps(),c=t.getVariantContext(!0)||{},u=[],h=new Set;let d={},p=1/0;for(let e=0;e<ki;e++){const g=Di[e],v=n[g],y=void 0!==l[g]?l[g]:c[g],x=m(y),A=g===a?v.isActive:null;!1===A&&(p=e);let P=y===c[g]&&y!==l[g]&&x;if(P&&s&&t.manuallyAnimateOnMount&&(P=!1),v.protectedKeys=(0,i.A)({},d),!v.isActive&&null===A||!y&&!v.prevProp||f(y)||"boolean"===typeof y)continue;let b=ji(v.prevProp,y)||g===a&&v.isActive&&!P&&x||e>p&&x,T=!1;const w=Array.isArray(y)?y:[y];let S=w.reduce(o,{});!1===A&&(S={});const{prevResolvedValues:E={}}=v,V=(0,i.A)((0,i.A)({},E),S),C=t=>{b=!0,h.has(t)&&(T=!0,h.delete(t)),v.needsAnimating[t]=!0};for(const t in V){const e=S[t],n=E[t];if(d.hasOwnProperty(t))continue;let i=!1;i=Rt(e)&&Rt(n)?!fe(e,n):e!==n,i?void 0!==e?C(t):h.add(t):void 0!==e&&h.has(t)?C(t):v.protectedKeys[t]=!0}v.prevProp=y,v.prevResolvedValues=S,v.isActive&&(d=(0,i.A)((0,i.A)({},d),S)),s&&t.blockInitialAnimation&&(b=!1),!b||P&&!T||u.push(...w.map((t=>({animation:t,options:(0,i.A)({type:g},r)}))))}if(h.size){const e={};h.forEach((n=>{const i=t.getBaseTarget(n);void 0!==i&&(e[n]=i)})),u.push({animation:e})}let g=Boolean(u.length);return!s||!1!==l.initial&&l.initial!==l.animate||t.manuallyAnimateOnMount||(g=!1),s=!1,g?e(u):Promise.resolve()}return{animateChanges:r,setActive:function(e,i,s){var o;if(n[e].isActive===i)return Promise.resolve();null===(o=t.variantChildren)||void 0===o||o.forEach((t=>{var n;return null===(n=t.animationState)||void 0===n?void 0:n.setActive(e,i)})),n[e].isActive=i;const a=r(s,e);for(const t in n)n[t].protectedKeys={};return a},setAnimateFunction:function(n){e=n(t)},getState:()=>n}}function ji(t,e){return"string"===typeof e?e!==t:!!Array.isArray(e)&&!fe(e,t)}function Bi(){return{isActive:arguments.length>0&&void 0!==arguments[0]&&arguments[0],protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}let Fi=0;const Oi={animation:{Feature:class extends ie{constructor(t){super(t),t.animationState||(t.animationState=Li(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();this.unmount(),f(t)&&(this.unmount=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:e}=this.node.prevProps||{};t!==e&&this.updateAnimationControlsSubscription()}unmount(){}}},exit:{Feature:class extends ie{constructor(){super(...arguments),this.id=Fi++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:e,custom:n}=this.node.presenceContext,{isPresent:i}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===i)return;const s=this.node.animationState.setActive("exit",!t,{custom:null!==n&&void 0!==n?n:this.node.getProps().custom});e&&!t&&s.then((()=>e(this.id)))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}}},Ii=(t,e)=>Math.abs(t-e);class Ui{constructor(t,e){let{transformPagePoint:n,contextWindow:s,dragSnapToOrigin:o=!1}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!this.lastMoveEvent||!this.lastMoveEventInfo)return;const t=Hi(this.lastMoveEventInfo,this.history),e=null!==this.startEvent,n=function(t,e){const n=Ii(t.x,e.x),i=Ii(t.y,e.y);return Math.sqrt(n**2+i**2)}(t.offset,{x:0,y:0})>=3;if(!e&&!n)return;const{point:s}=t,{timestamp:o}=Ht;this.history.push((0,i.A)((0,i.A)({},s),{},{timestamp:o}));const{onStart:r,onMove:a}=this.handlers;e||(r&&r(this.lastMoveEvent,t),this.startEvent=this.lastMoveEvent),a&&a(this.lastMoveEvent,t)},this.handlePointerMove=(t,e)=>{this.lastMoveEvent=t,this.lastMoveEventInfo=Ni(e,this.transformPagePoint),Nt.update(this.updatePoint,!0)},this.handlePointerUp=(t,e)=>{this.end();const{onEnd:n,onSessionEnd:i,resumeAnimation:s}=this.handlers;if(this.dragSnapToOrigin&&s&&s(),!this.lastMoveEvent||!this.lastMoveEventInfo)return;const o=Hi("pointercancel"===t.type?this.lastMoveEventInfo:Ni(e,this.transformPagePoint),this.history);this.startEvent&&n&&n(t,o),i&&i(t,o)},!qt(t))return;this.dragSnapToOrigin=o,this.handlers=e,this.transformPagePoint=n,this.contextWindow=s||window;const r=Ni(Zt(t),this.transformPagePoint),{point:a}=r,{timestamp:l}=Ht;this.history=[(0,i.A)((0,i.A)({},a),{},{timestamp:l})];const{onSessionStart:c}=e;c&&c(t,Hi(r,this.history)),this.removeListeners=_t(Kt(this.contextWindow,"pointermove",this.handlePointerMove),Kt(this.contextWindow,"pointerup",this.handlePointerUp),Kt(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Wt(this.updatePoint)}}function Ni(t,e){return e?{point:e(t.point)}:t}function Wi(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Hi(t,e){let{point:n}=t;return{point:n,delta:Wi(n,Yi(e)),offset:Wi(n,zi(e)),velocity:Xi(e,.1)}}function zi(t){return t[0]}function Yi(t){return t[t.length-1]}function Xi(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,i=null;const s=Yi(t);for(;n>=0&&(i=t[n],!(s.timestamp-i.timestamp>xe(e)));)n--;if(!i)return{x:0,y:0};const o=Ae(s.timestamp-i.timestamp);if(0===o)return{x:0,y:0};const r={x:(s.x-i.x)/o,y:(s.y-i.y)/o};return r.x===1/0&&(r.x=0),r.y===1/0&&(r.y=0),r}function Gi(t){return t.max-t.min}function qi(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:.01;return Math.abs(t-e)<=n}function Zi(t,e,n){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:.5;t.origin=i,t.originPoint=Ke(e.min,e.max,t.origin),t.scale=Gi(n)/Gi(e),(qi(t.scale,1,1e-4)||isNaN(t.scale))&&(t.scale=1),t.translate=Ke(n.min,n.max,t.origin)-t.originPoint,(qi(t.translate)||isNaN(t.translate))&&(t.translate=0)}function Ki(t,e,n,i){Zi(t.x,e.x,n.x,i?i.originX:void 0),Zi(t.y,e.y,n.y,i?i.originY:void 0)}function $i(t,e,n){t.min=n.min+e.min,t.max=t.min+Gi(e)}function _i(t,e,n){t.min=e.min-n.min,t.max=t.min+Gi(e)}function Ji(t,e,n){_i(t.x,e.x,n.x),_i(t.y,e.y,n.y)}function Qi(t,e,n){return{min:void 0!==e?t.min+e:void 0,max:void 0!==n?t.max+n-(t.max-t.min):void 0}}function ts(t,e){let n=e.min-t.min,i=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,i]=[i,n]),{min:n,max:i}}const es=.35;function ns(t,e,n){return{min:is(t,e),max:is(t,n)}}function is(t,e){return"number"===typeof t?t:t[e]||0}function ss(t){return[t("x"),t("y")]}function os(t){let{top:e,left:n,right:i,bottom:s}=t;return{x:{min:n,max:i},y:{min:e,max:s}}}function rs(t){return void 0===t||1===t}function as(t){let{scale:e,scaleX:n,scaleY:i}=t;return!rs(e)||!rs(n)||!rs(i)}function ls(t){return as(t)||cs(t)||t.z||t.rotate||t.rotateX||t.rotateY}function cs(t){return us(t.x)||us(t.y)}function us(t){return t&&"0%"!==t}function hs(t,e,n){return n+e*(t-n)}function ds(t,e,n,i,s){return void 0!==s&&(t=hs(t,s,i)),hs(t,n,i)+e}function ps(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,i=arguments.length>3?arguments[3]:void 0,s=arguments.length>4?arguments[4]:void 0;t.min=ds(t.min,e,n,i,s),t.max=ds(t.max,e,n,i,s)}function ms(t,e){let{x:n,y:i}=e;ps(t.x,n.translate,n.scale,n.originPoint),ps(t.y,i.translate,i.scale,i.originPoint)}function fs(t){return Number.isInteger(t)||t>1.0000000000001||t<.999999999999?t:1}function gs(t,e){t.min=t.min+e,t.max=t.max+e}function vs(t,e,n){let[i,s,o]=n;const r=void 0!==e[o]?e[o]:.5,a=Ke(t.min,t.max,r);ps(t,e[i],e[s],a,e.scale)}const ys=["x","scaleX","originX"],xs=["y","scaleY","originY"];function As(t,e){vs(t.x,e,ys),vs(t.y,e,xs)}function Ps(t,e){return os(function(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),i=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:i.y,right:i.x}}(t.getBoundingClientRect(),e))}const bs=t=>{let{current:e}=t;return e?e.ownerDocument.defaultView:null},Ts=new WeakMap;class ws{constructor(t){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic={x:{min:0,max:0},y:{min:0,max:0}},this.visualElement=t}start(t){let{snapToCursor:e=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{presenceContext:n}=this.visualElement;if(n&&!1===n.isPresent)return;const{dragSnapToOrigin:i}=this.getProps();this.panSession=new Ui(t,{onSessionStart:t=>{const{dragSnapToOrigin:n}=this.getProps();n?this.pauseAnimation():this.stopAnimation(),e&&this.snapToCursor(Zt(t,"page").point)},onStart:(t,e)=>{const{drag:n,dragPropagation:i,onDragStart:s}=this.getProps();if(n&&!i&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=ee(n),!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),ss((t=>{let e=this.getAxisMotionValue(t).get()||0;if(tt.test(e)){const{projection:n}=this.visualElement;if(n&&n.layout){const i=n.layout.layoutBox[t];if(i){e=Gi(i)*(parseFloat(e)/100)}}}this.originPoint[t]=e})),s&&Nt.update((()=>s(t,e)),!1,!0);const{animationState:o}=this.visualElement;o&&o.setActive("whileDrag",!0)},onMove:(t,e)=>{const{dragPropagation:n,dragDirectionLock:i,onDirectionLock:s,onDrag:o}=this.getProps();if(!n&&!this.openGlobalLock)return;const{offset:r}=e;if(i&&null===this.currentDirection)return this.currentDirection=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10,n=null;Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x");return n}(r),void(null!==this.currentDirection&&s&&s(this.currentDirection));this.updateAxis("x",e.point,r),this.updateAxis("y",e.point,r),this.visualElement.render(),o&&o(t,e)},onSessionEnd:(t,e)=>this.stop(t,e),resumeAnimation:()=>ss((t=>{var e;return"paused"===this.getAnimationState(t)&&(null===(e=this.getAxisMotionValue(t).animation)||void 0===e?void 0:e.play())}))},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:i,contextWindow:bs(this.visualElement)})}stop(t,e){const n=this.isDragging;if(this.cancel(),!n)return;const{velocity:i}=e;this.startAnimation(i);const{onDragEnd:s}=this.getProps();s&&Nt.update((()=>s(t,e)))}cancel(){this.isDragging=!1;const{projection:t,animationState:e}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:n}=this.getProps();!n&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),e&&e.setActive("whileDrag",!1)}updateAxis(t,e,n){const{drag:i}=this.getProps();if(!n||!Ss(t,i,this.currentDirection))return;const s=this.getAxisMotionValue(t);let o=this.originPoint[t]+n[t];this.constraints&&this.constraints[t]&&(o=function(t,e,n){let{min:i,max:s}=e;return void 0!==i&&t<i?t=n?Ke(i,t,n.min):Math.max(t,i):void 0!==s&&t>s&&(t=n?Ke(s,t,n.max):Math.min(t,s)),t}(o,this.constraints[t],this.elastic[t])),s.set(o)}resolveConstraints(){var t;const{dragConstraints:e,dragElastic:n}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):null===(t=this.visualElement.projection)||void 0===t?void 0:t.layout,s=this.constraints;e&&p(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!e||!i)&&function(t,e){let{top:n,left:i,bottom:s,right:o}=e;return{x:Qi(t.x,i,o),y:Qi(t.y,n,s)}}(i.layoutBox,e),this.elastic=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:es;return!1===t?t=0:!0===t&&(t=es),{x:ns(t,"left","right"),y:ns(t,"top","bottom")}}(n),s!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&ss((t=>{this.getAxisMotionValue(t)&&(this.constraints[t]=function(t,e){const n={};return void 0!==e.min&&(n.min=e.min-t.min),void 0!==e.max&&(n.max=e.max-t.min),n}(i.layoutBox[t],this.constraints[t]))}))}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:e}=this.getProps();if(!t||!p(t))return!1;const n=t.current;ye(null!==n,"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 s=function(t,e,n){const i=Ps(t,n),{scroll:s}=e;return s&&(gs(i.x,s.offset.x),gs(i.y,s.offset.y)),i}(n,i.root,this.visualElement.getTransformPagePoint());let o=function(t,e){return{x:ts(t.x,e.x),y:ts(t.y,e.y)}}(i.layout.layoutBox,s);if(e){const t=e(function(t){let{x:e,y:n}=t;return{top:n.min,right:e.max,bottom:n.max,left:e.min}}(o));this.hasMutatedConstraints=!!t,t&&(o=os(t))}return o}startAnimation(t){const{drag:e,dragMomentum:n,dragElastic:s,dragTransition:o,dragSnapToOrigin:r,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=ss((a=>{if(!Ss(a,e,this.currentDirection))return;let c=l&&l[a]||{};r&&(c={min:0,max:0});const u=s?200:1e6,h=s?40:1e7,d=(0,i.A)((0,i.A)({type:"inertia",velocity:n?t[a]:0,bounceStiffness:u,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10},o),c);return this.startAxisValueAnimation(a,d)}));return Promise.all(c).then(a)}startAxisValueAnimation(t,e){const n=this.getAxisMotionValue(t);return n.start(ri(t,n,0,e))}stopAnimation(){ss((t=>this.getAxisMotionValue(t).stop()))}pauseAnimation(){ss((t=>{var e;return null===(e=this.getAxisMotionValue(t).animation)||void 0===e?void 0:e.pause()}))}getAnimationState(t){var e;return null===(e=this.getAxisMotionValue(t).animation)||void 0===e?void 0:e.state}getAxisMotionValue(t){const e="_drag"+t.toUpperCase(),n=this.visualElement.getProps(),i=n[e];return i||this.visualElement.getValue(t,(n.initial?n.initial[t]:void 0)||0)}snapToCursor(t){ss((e=>{const{drag:n}=this.getProps();if(!Ss(e,n,this.currentDirection))return;const{projection:i}=this.visualElement,s=this.getAxisMotionValue(e);if(i&&i.layout){const{min:n,max:o}=i.layout.layoutBox[e];s.set(t[e]-Ke(n,o,.5))}}))}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:e}=this.getProps(),{projection:n}=this.visualElement;if(!p(e)||!n||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};ss((t=>{const e=this.getAxisMotionValue(t);if(e){const n=e.get();i[t]=function(t,e){let n=.5;const i=Gi(t),s=Gi(e);return s>i?n=gn(e.min,e.max-i,t.min):i>s&&(n=gn(t.min,t.max-s,e.min)),z(0,1,n)}({min:n,max:n},this.constraints[t])}}));const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),ss((e=>{if(!Ss(e,t,null))return;const n=this.getAxisMotionValue(e),{min:s,max:o}=this.constraints[e];n.set(Ke(s,o,i[e]))}))}addListeners(){if(!this.visualElement.current)return;Ts.set(this.visualElement,this);const t=Kt(this.visualElement.current,"pointerdown",(t=>{const{drag:e,dragListener:n=!0}=this.getProps();e&&n&&this.start(t)})),e=()=>{const{dragConstraints:t}=this.getProps();p(t)&&(this.constraints=this.resolveRefConstraints())},{projection:n}=this.visualElement,i=n.addEventListener("measure",e);n&&!n.layout&&(n.root&&n.root.updateScroll(),n.updateLayout()),e();const s=Gt(window,"resize",(()=>this.scalePositionWithinConstraints())),o=n.addEventListener("didUpdate",(t=>{let{delta:e,hasLayoutChanged:n}=t;this.isDragging&&n&&(ss((t=>{const n=this.getAxisMotionValue(t);n&&(this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate))})),this.visualElement.render())}));return()=>{s(),t(),i(),o&&o()}}getProps(){const t=this.visualElement.getProps(),{drag:e=!1,dragDirectionLock:n=!1,dragPropagation:s=!1,dragConstraints:o=!1,dragElastic:r=es,dragMomentum:a=!0}=t;return(0,i.A)((0,i.A)({},t),{},{drag:e,dragDirectionLock:n,dragPropagation:s,dragConstraints:o,dragElastic:r,dragMomentum:a})}}function Ss(t,e,n){return(!0===e||e===t)&&(null===n||n===t)}const Es=t=>(e,n)=>{t&&Nt.update((()=>t(e,n)))};const Vs={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Cs(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const Ms={correct:(t,e)=>{if(!e.target)return t;if("string"===typeof t){if(!et.test(t))return t;t=parseFloat(t)}const n=Cs(t,e.target.x),i=Cs(t,e.target.y);return"".concat(n,"% ").concat(i,"%")}},Ds={correct:(t,e)=>{let{treeScale:n,projectionDelta:i}=e;const s=t,o=un.parse(t);if(o.length>5)return s;const r=un.createTransformer(t),a="number"!==typeof o[0]?1:0,l=i.x.scale*n.x,c=i.y.scale*n.y;o[0+a]/=l,o[1+a]/=c;const u=Ke(l,c,.5);return"number"===typeof o[2+a]&&(o[2+a]/=u),"number"===typeof o[3+a]&&(o[3+a]/=u),r(o)}};class ks extends s.Component{componentDidMount(){const{visualElement:t,layoutGroup:e,switchLayoutGroup:n,layoutId:s}=this.props,{projection:o}=t;var r;r=Ls,Object.assign(R,r),o&&(e.group&&e.group.add(o),n&&n.register&&s&&n.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",(()=>{this.safeToRemove()})),o.setOptions((0,i.A)((0,i.A)({},o.options),{},{onExitComplete:()=>this.safeToRemove()}))),Vs.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:e,visualElement:n,drag:i,isPresent:s}=this.props,o=n.projection;return o?(o.isPresent=s,i||t.layoutDependency!==e||void 0===e?o.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?o.promote():o.relegate()||Nt.postRender((()=>{const t=o.getStack();t&&t.members.length||this.safeToRemove()}))),null):null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),queueMicrotask((()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()})))}componentWillUnmount(){const{visualElement:t,layoutGroup:e,switchLayoutGroup:n}=this.props,{projection:i}=t;i&&(i.scheduleCheckAfterUnmount(),e&&e.group&&e.group.remove(i),n&&n.deregister&&n.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function Rs(t){const[e,n]=function(){const t=(0,s.useContext)(a);if(null===t)return[!0,null];const{isPresent:e,onExitComplete:n,register:i}=t,o=(0,s.useId)();return(0,s.useEffect)((()=>i(o)),[]),!e&&n?[!1,()=>n&&n(o)]:[!0]}(),o=(0,s.useContext)(w);return s.createElement(ks,(0,i.A)((0,i.A)({},t),{},{layoutGroup:o,switchLayoutGroup:(0,s.useContext)(S),isPresent:e,safeToRemove:n}))}const Ls={borderRadius:(0,i.A)((0,i.A)({},Ms),{},{applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]}),borderTopLeftRadius:Ms,borderTopRightRadius:Ms,borderBottomLeftRadius:Ms,borderBottomRightRadius:Ms,boxShadow:Ds},js=["TopLeft","TopRight","BottomLeft","BottomRight"],Bs=js.length,Fs=t=>"string"===typeof t?parseFloat(t):t,Os=t=>"number"===typeof t||et.test(t);function Is(t,e){return void 0!==t[e]?t[e]:t.borderRadius}const Us=Ws(0,.5,Be),Ns=Ws(.5,.95,Ot);function Ws(t,e,n){return i=>i<t?0:i>e?1:n(gn(t,e,i))}function Hs(t,e){t.min=e.min,t.max=e.max}function zs(t,e){Hs(t.x,e.x),Hs(t.y,e.y)}function Ys(t,e,n,i,s){return t=hs(t-=e,1/n,i),void 0!==s&&(t=hs(t,1/s,i)),t}function Xs(t,e,n,i,s){let[o,r,a]=n;!function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:.5,s=arguments.length>4?arguments[4]:void 0,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:t,r=arguments.length>6&&void 0!==arguments[6]?arguments[6]:t;tt.test(e)&&(e=parseFloat(e),e=Ke(r.min,r.max,e/100)-r.min);if("number"!==typeof e)return;let a=Ke(o.min,o.max,i);t===o&&(a-=e),t.min=Ys(t.min,e,n,a,s),t.max=Ys(t.max,e,n,a,s)}(t,e[o],e[r],e[a],e.scale,i,s)}const Gs=["x","scaleX","originX"],qs=["y","scaleY","originY"];function Zs(t,e,n,i){Xs(t.x,e,Gs,n?n.x:void 0,i?i.x:void 0),Xs(t.y,e,qs,n?n.y:void 0,i?i.y:void 0)}function Ks(t){return 0===t.translate&&1===t.scale}function $s(t){return Ks(t.x)&&Ks(t.y)}function _s(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 Js(t){return Gi(t.x)/Gi(t.y)}class Qs{constructor(){this.members=[]}add(t){ci(this.members,t),t.scheduleRender()}remove(t){if(ui(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const t=this.members[this.members.length-1];t&&this.promote(t)}}relegate(t){const e=this.members.findIndex((e=>t===e));if(0===e)return!1;let n;for(let i=e;i>=0;i--){const t=this.members[i];if(!1!==t.isPresent){n=t;break}}return!!n&&(this.promote(n),!0)}promote(t,e){const n=this.lead;if(t!==n&&(this.prevLead=n,this.lead=t,t.show(),n)){n.instance&&n.scheduleRender(),t.scheduleRender(),t.resumeFrom=n,e&&(t.resumeFrom.preserveOpacity=!0),n.snapshot&&(t.snapshot=n.snapshot,t.snapshot.latestValues=n.animationValues||n.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:i}=t.options;!1===i&&n.hide()}}exitAnimationComplete(){this.members.forEach((t=>{const{options:e,resumingFrom:n}=t;e.onExitComplete&&e.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()}))}scheduleRender(){this.members.forEach((t=>{t.instance&&t.scheduleRender(!1)}))}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function to(t,e,n){let i="";const s=t.x.translate/e.x,o=t.y.translate/e.y;if((s||o)&&(i="translate3d(".concat(s,"px, ").concat(o,"px, 0) ")),1===e.x&&1===e.y||(i+="scale(".concat(1/e.x,", ").concat(1/e.y,") ")),n){const{rotate:t,rotateX:e,rotateY:s}=n;t&&(i+="rotate(".concat(t,"deg) ")),e&&(i+="rotateX(".concat(e,"deg) ")),s&&(i+="rotateY(".concat(s,"deg) "))}const r=t.x.scale*e.x,a=t.y.scale*e.y;return 1===r&&1===a||(i+="scale(".concat(r,", ").concat(a,")")),i||"none"}const eo=(t,e)=>t.depth-e.depth;class no{constructor(){this.children=[],this.isDirty=!1}add(t){ci(this.children,t),this.isDirty=!0}remove(t){ui(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(eo),this.isDirty=!1,this.children.forEach(t)}}const io=["","X","Y","Z"],so={visibility:"hidden"};let oo=0;const ro={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0};function ao(t){let{attachResizeListener:e,defaultParent:n,measureScroll:s,checkIsScrollRoot:o,resetTransform:r}=t;return class{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null===n||void 0===n?void 0:n();this.id=oo++,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=()=>{var t;this.projectionUpdateScheduled=!1,ro.totalNodes=ro.resolvedTargetDeltas=ro.recalculatedProjection=0,this.nodes.forEach(uo),this.nodes.forEach(yo),this.nodes.forEach(xo),this.nodes.forEach(ho),t=ro,window.MotionDebug&&window.MotionDebug.record(t)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=t,this.root=e?e.root||e:this,this.path=e?[...e.path,e]:[],this.parent=e,this.depth=e?e.depth+1:0;for(let n=0;n<this.path.length;n++)this.path[n].shouldResetTransform=!0;this.root===this&&(this.nodes=new no)}addEventListener(t,e){return this.eventHandlers.has(t)||this.eventHandlers.set(t,new hi),this.eventHandlers.get(t).add(e)}notifyListeners(t){const e=this.eventHandlers.get(t);for(var n=arguments.length,i=new Array(n>1?n-1:0),s=1;s<n;s++)i[s-1]=arguments[s];e&&e.notify(...i)}hasListeners(t){return this.eventHandlers.has(t)}mount(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.root.hasTreeAnimated;if(this.instance)return;var s;this.isSVG=(s=t)instanceof SVGElement&&"svg"!==s.tagName,this.instance=t;const{layoutId:o,layout:r,visualElement:a}=this.options;if(a&&!a.current&&a.mount(t),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),n&&(r||o)&&(this.isLayoutDirty=!0),e){let n;const i=()=>this.root.updateBlockedByResize=!1;e(t,(()=>{this.root.updateBlockedByResize=!0,n&&n(),n=function(t,e){const n=performance.now(),i=s=>{let{timestamp:o}=s;const r=o-n;r>=e&&(Wt(i),t(r-e))};return Nt.read(i,!0),()=>Wt(i)}(i,250),Vs.hasAnimatedSinceResize&&(Vs.hasAnimatedSinceResize=!1,this.nodes.forEach(vo))}))}o&&this.root.registerSharedNode(o,this),!1!==this.options.animate&&a&&(o||r)&&this.addEventListener("didUpdate",(t=>{let{delta:e,hasLayoutChanged:n,hasRelativeTargetChanged:s,layout:o}=t;if(this.isTreeAnimationBlocked())return this.target=void 0,void(this.relativeTarget=void 0);const r=this.options.transition||a.getDefaultTransition()||So,{onLayoutAnimationStart:l,onLayoutAnimationComplete:c}=a.getProps(),u=!this.targetLayout||!_s(this.targetLayout,o)||s,h=!n&&s;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||h||n&&(u||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(e,h);const t=(0,i.A)((0,i.A)({},si(r,"layout")),{},{onPlay:l,onComplete:c});(a.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t)}else n||vo(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=o}))}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const t=this.getStack();t&&t.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Wt(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(Ao),this.animationId++)}getTransformTemplate(){const{visualElement:t}=this.options;return t&&t.getProps().transformTemplate}willUpdate(){let t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked())return void(this.options.onExitComplete&&this.options.onExitComplete());if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let s=0;s<this.path.length;s++){const t=this.path[s];t.shouldResetTransform=!0,t.updateScroll("snapshot"),t.options.layoutRoot&&t.willUpdate(!1)}const{layoutId:e,layout:n}=this.options;if(void 0===e&&!n)return;const i=this.getTransformTemplate();this.prevTransformTemplateValue=i?i(this.latestValues,""):void 0,this.updateSnapshot(),t&&this.notifyListeners("willUpdate")}update(){this.updateScheduled=!1;if(this.isUpdateBlocked())return this.unblockUpdate(),this.clearAllSnapshots(),void this.nodes.forEach(mo);this.isUpdating||this.nodes.forEach(fo),this.isUpdating=!1,this.nodes.forEach(go),this.nodes.forEach(lo),this.nodes.forEach(co),this.clearAllSnapshots();const t=performance.now();Ht.delta=z(0,1e3/60,t-Ht.timestamp),Ht.timestamp=t,Ht.isProcessing=!0,zt.update.process(Ht),zt.preRender.process(Ht),zt.render.process(Ht),Ht.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,queueMicrotask((()=>this.update())))}clearAllSnapshots(){this.nodes.forEach(po),this.sharedNodes.forEach(Po)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Nt.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Nt.postRender((()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()}))}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure())}updateLayout(){if(!this.instance)return;if(this.updateScroll(),(!this.options.alwaysMeasureLayout||!this.isLead())&&!this.isLayoutDirty)return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let n=0;n<this.path.length;n++){this.path[n].updateScroll()}const t=this.layout;this.layout=this.measure(!1),this.layoutCorrected={x:{min:0,max:0},y:{min:0,max:0}},this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:e}=this.options;e&&e.notify("LayoutMeasure",this.layout.layoutBox,t?t.layoutBox:void 0)}updateScroll(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"measure",e=Boolean(this.options.layoutScroll&&this.instance);this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===t&&(e=!1),e&&(this.scroll={animationId:this.root.animationId,phase:t,isRoot:o(this.instance),offset:s(this.instance)})}resetTransform(){if(!r)return;const t=this.isLayoutDirty||this.shouldResetTransform,e=this.projectionDelta&&!$s(this.projectionDelta),n=this.getTransformTemplate(),i=n?n(this.latestValues,""):void 0,s=i!==this.prevTransformTemplateValue;t&&(e||ls(this.latestValues)||s)&&(r(this.instance,i),this.shouldResetTransform=!1,this.scheduleRender())}measure(){let t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];const e=this.measurePageBox();let n=this.removeElementScroll(e);var i;return t&&(n=this.removeTransform(n)),Co((i=n).x),Co(i.y),{animationId:this.root.animationId,measuredBox:e,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:t}=this.options;if(!t)return{x:{min:0,max:0},y:{min:0,max:0}};const e=t.measureViewportBox(),{scroll:n}=this.root;return n&&(gs(e.x,n.offset.x),gs(e.y,n.offset.y)),e}removeElementScroll(t){const e={x:{min:0,max:0},y:{min:0,max:0}};zs(e,t);for(let n=0;n<this.path.length;n++){const i=this.path[n],{scroll:s,options:o}=i;if(i!==this.root&&s&&o.layoutScroll){if(s.isRoot){zs(e,t);const{scroll:n}=this.root;n&&(gs(e.x,-n.offset.x),gs(e.y,-n.offset.y))}gs(e.x,s.offset.x),gs(e.y,s.offset.y)}}return e}applyTransform(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n={x:{min:0,max:0},y:{min:0,max:0}};zs(n,t);for(let i=0;i<this.path.length;i++){const t=this.path[i];!e&&t.options.layoutScroll&&t.scroll&&t!==t.root&&As(n,{x:-t.scroll.offset.x,y:-t.scroll.offset.y}),ls(t.latestValues)&&As(n,t.latestValues)}return ls(this.latestValues)&&As(n,this.latestValues),n}removeTransform(t){const e={x:{min:0,max:0},y:{min:0,max:0}};zs(e,t);for(let n=0;n<this.path.length;n++){const t=this.path[n];if(!t.instance)continue;if(!ls(t.latestValues))continue;as(t.latestValues)&&t.updateSnapshot();const i={x:{min:0,max:0},y:{min:0,max:0}};zs(i,t.measurePageBox()),Zs(e,t.latestValues,t.snapshot?t.snapshot.layoutBox:void 0,i)}return ls(this.latestValues)&&Zs(e,this.latestValues),e}setTargetDelta(t){this.targetDelta=t,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(t){this.options=(0,i.A)((0,i.A)((0,i.A)({},this.options),t),{},{crossfade:void 0===t.crossfade||t.crossfade})}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!==Ht.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];var e;const n=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=n.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=n.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=n.isSharedProjectionDirty);const i=Boolean(this.resumingFrom)||this!==n;if(!(t||i&&this.isSharedProjectionDirty||this.isProjectionDirty||(null===(e=this.parent)||void 0===e?void 0:e.isProjectionDirty)||this.attemptToResolveRelativeTarget))return;const{layout:s,layoutId:o}=this.options;if(this.layout&&(s||o)){if(this.resolvedRelativeTargetAt=Ht.timestamp,!this.targetDelta&&!this.relativeTarget){const t=this.getClosestProjectingParent();t&&t.layout&&1!==this.animationProgress?(this.relativeParent=t,this.forceRelativeParentToResolveTarget(),this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},Ji(this.relativeTargetOrigin,this.layout.layoutBox,t.layout.layoutBox),zs(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(this.relativeTarget||this.targetDelta){var r,a,l;if(this.target||(this.target={x:{min:0,max:0},y:{min:0,max:0}},this.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}}),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),r=this.target,a=this.relativeTarget,l=this.relativeParent.target,$i(r.x,a.x,l.x),$i(r.y,a.y,l.y)):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.layoutBox):zs(this.target,this.layout.layoutBox),ms(this.target,this.targetDelta)):zs(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const t=this.getClosestProjectingParent();t&&Boolean(t.resumingFrom)===Boolean(this.resumingFrom)&&!t.options.layoutScroll&&t.target&&1!==this.animationProgress?(this.relativeParent=t,this.forceRelativeParentToResolveTarget(),this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},Ji(this.relativeTargetOrigin,this.target,t.target),zs(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}ro.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(this.parent&&!as(this.parent.latestValues)&&!cs(this.parent.latestValues))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return Boolean((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var t;const e=this.getLead(),n=Boolean(this.resumingFrom)||this!==e;let i=!0;if((this.isProjectionDirty||(null===(t=this.parent)||void 0===t?void 0:t.isProjectionDirty))&&(i=!1),n&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(i=!1),this.resolvedRelativeTargetAt===Ht.timestamp&&(i=!1),i)return;const{layout:s,layoutId:o}=this.options;if(this.isTreeAnimating=Boolean(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!s&&!o)return;zs(this.layoutCorrected,this.layout.layoutBox);const r=this.treeScale.x,a=this.treeScale.y;!function(t,e,n){let i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const s=n.length;if(!s)return;let o,r;e.x=e.y=1;for(let a=0;a<s;a++){o=n[a],r=o.projectionDelta;const s=o.instance;s&&s.style&&"contents"===s.style.display||(i&&o.options.layoutScroll&&o.scroll&&o!==o.root&&As(t,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),r&&(e.x*=r.x.scale,e.y*=r.y.scale,ms(t,r)),i&&ls(o.latestValues)&&As(t,o.latestValues))}e.x=fs(e.x),e.y=fs(e.y)}(this.layoutCorrected,this.treeScale,this.path,n),!e.layout||e.target||1===this.treeScale.x&&1===this.treeScale.y||(e.target=e.layout.layoutBox);const{target:l}=e;if(!l)return void(this.projectionTransform&&(this.projectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionTransform="none",this.scheduleRender()));this.projectionDelta||(this.projectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDeltaWithTransform={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}});const c=this.projectionTransform;Ki(this.projectionDelta,this.layoutCorrected,l,this.latestValues),this.projectionTransform=to(this.projectionDelta,this.treeScale),this.projectionTransform===c&&this.treeScale.x===r&&this.treeScale.y===a||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",l)),ro.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(){let t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(this.options.scheduleRender&&this.options.scheduleRender(),t){const t=this.getStack();t&&t.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}setAnimationOrigin(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=this.snapshot,s=n?n.latestValues:{},o=(0,i.A)({},this.latestValues),r={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!e;const a={x:{min:0,max:0},y:{min:0,max:0}},l=(n?n.source:void 0)!==(this.layout?this.layout.source:void 0),c=this.getStack(),u=!c||c.members.length<=1,h=Boolean(l&&!u&&!0===this.options.crossfade&&!this.path.some(wo));let d;this.animationProgress=0,this.mixTargetDelta=e=>{const n=e/1e3;var i,c,p,m,f,g;bo(r.x,t.x,n),bo(r.y,t.y,n),this.setTargetDelta(r),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Ji(a,this.layout.layoutBox,this.relativeParent.layout.layoutBox),p=this.relativeTarget,m=this.relativeTargetOrigin,f=a,g=n,To(p.x,m.x,f.x,g),To(p.y,m.y,f.y,g),d&&(i=this.relativeTarget,c=d,i.x.min===c.x.min&&i.x.max===c.x.max&&i.y.min===c.y.min&&i.y.max===c.y.max)&&(this.isProjectionDirty=!1),d||(d={x:{min:0,max:0},y:{min:0,max:0}}),zs(d,this.relativeTarget)),l&&(this.animationValues=o,function(t,e,n,i,s,o){s?(t.opacity=Ke(0,void 0!==n.opacity?n.opacity:1,Us(i)),t.opacityExit=Ke(void 0!==e.opacity?e.opacity:1,0,Ns(i))):o&&(t.opacity=Ke(void 0!==e.opacity?e.opacity:1,void 0!==n.opacity?n.opacity:1,i));for(let r=0;r<Bs;r++){const s="border".concat(js[r],"Radius");let o=Is(e,s),a=Is(n,s);void 0===o&&void 0===a||(o||(o=0),a||(a=0),0===o||0===a||Os(o)===Os(a)?(t[s]=Math.max(Ke(Fs(o),Fs(a),i),0),(tt.test(a)||tt.test(o))&&(t[s]+="%")):t[s]=a)}(e.rotate||n.rotate)&&(t.rotate=Ke(e.rotate||0,n.rotate||0,i))}(o,s,this.latestValues,n,h,u)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(t){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Wt(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Nt.update((()=>{Vs.hasAnimatedSinceResize=!0,this.currentAnimation=function(t,e,n){const i=F(t)?t:mi(t);return i.start(ri("",i,e,n)),i.animation}(0,1e3,(0,i.A)((0,i.A)({},t),{},{onUpdate:e=>{this.mixTargetDelta(e),t.onUpdate&&t.onUpdate(e)},onComplete:()=>{t.onComplete&&t.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 t=this.getStack();t&&t.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const t=this.getLead();let{targetWithTransforms:e,target:n,layout:i,latestValues:s}=t;if(e&&n&&i){if(this!==t&&this.layout&&i&&Mo(this.options.animationType,this.layout.layoutBox,i.layoutBox)){n=this.target||{x:{min:0,max:0},y:{min:0,max:0}};const e=Gi(this.layout.layoutBox.x);n.x.min=t.target.x.min,n.x.max=n.x.min+e;const i=Gi(this.layout.layoutBox.y);n.y.min=t.target.y.min,n.y.max=n.y.min+i}zs(e,n),As(e,s),Ki(this.projectionDeltaWithTransform,this.layoutCorrected,e,s)}}registerSharedNode(t,e){this.sharedNodes.has(t)||this.sharedNodes.set(t,new Qs);this.sharedNodes.get(t).add(e);const n=e.options.initialPromotionConfig;e.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(e):void 0})}isLead(){const t=this.getStack();return!t||t.lead===this}getLead(){var t;const{layoutId:e}=this.options;return e&&(null===(t=this.getStack())||void 0===t?void 0:t.lead)||this}getPrevLead(){var t;const{layoutId:e}=this.options;return e?null===(t=this.getStack())||void 0===t?void 0:t.prevLead:void 0}getStack(){const{layoutId:t}=this.options;if(t)return this.root.sharedNodes.get(t)}promote(){let{needsReset:t,transition:e,preserveFollowOpacity:n}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const i=this.getStack();i&&i.promote(this,n),t&&(this.projectionDelta=void 0,this.needsReset=!0),e&&this.setOptions({transition:e})}relegate(){const t=this.getStack();return!!t&&t.relegate(this)}resetRotation(){const{visualElement:t}=this.options;if(!t)return;let e=!1;const{latestValues:n}=t;if((n.rotate||n.rotateX||n.rotateY||n.rotateZ)&&(e=!0),!e)return;const i={};for(let s=0;s<io.length;s++){const e="rotate"+io[s];n[e]&&(i[e]=n[e],t.setStaticValue(e,0))}t.render();for(const s in i)t.setStaticValue(s,i[s]);t.scheduleRender()}getProjectionStyles(t){var e,n;if(!this.instance||this.isSVG)return;if(!this.isVisible)return so;const i={visibility:""},s=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,i.opacity="",i.pointerEvents=Lt(null===t||void 0===t?void 0:t.pointerEvents)||"",i.transform=s?s(this.latestValues,""):"none",i;const o=this.getLead();if(!this.projectionDelta||!this.layout||!o.target){const e={};return this.options.layoutId&&(e.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,e.pointerEvents=Lt(null===t||void 0===t?void 0:t.pointerEvents)||""),this.hasProjected&&!ls(this.latestValues)&&(e.transform=s?s({},""):"none",this.hasProjected=!1),e}const r=o.animationValues||o.latestValues;this.applyTransformsToTarget(),i.transform=to(this.projectionDeltaWithTransform,this.treeScale,r),s&&(i.transform=s(r,i.transform));const{x:a,y:l}=this.projectionDelta;i.transformOrigin="".concat(100*a.origin,"% ").concat(100*l.origin,"% 0"),o.animationValues?i.opacity=o===this?null!==(n=null!==(e=r.opacity)&&void 0!==e?e:this.latestValues.opacity)&&void 0!==n?n:1:this.preserveOpacity?this.latestValues.opacity:r.opacityExit:i.opacity=o===this?void 0!==r.opacity?r.opacity:"":void 0!==r.opacityExit?r.opacityExit:0;for(const c in R){if(void 0===r[c])continue;const{correct:t,applyTo:e}=R[c],n="none"===i.transform?r[c]:t(r[c],o);if(e){const t=e.length;for(let s=0;s<t;s++)i[e[s]]=n}else i[c]=n}return this.options.layoutId&&(i.pointerEvents=o===this?Lt(null===t||void 0===t?void 0:t.pointerEvents)||"":"none"),i}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach((t=>{var e;return null===(e=t.currentAnimation)||void 0===e?void 0:e.stop()})),this.root.nodes.forEach(mo),this.root.sharedNodes.clear()}}}function lo(t){t.updateLayout()}function co(t){var e;const n=(null===(e=t.resumeFrom)||void 0===e?void 0:e.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&n&&t.hasListeners("didUpdate")){const{layoutBox:e,measuredBox:i}=t.layout,{animationType:s}=t.options,o=n.source!==t.layout.source;"size"===s?ss((t=>{const i=o?n.measuredBox[t]:n.layoutBox[t],s=Gi(i);i.min=e[t].min,i.max=i.min+s})):Mo(s,n.layoutBox,e)&&ss((i=>{const s=o?n.measuredBox[i]:n.layoutBox[i],r=Gi(e[i]);s.max=s.min+r,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[i].max=t.relativeTarget[i].min+r)}));const r={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};Ki(r,e,n.layoutBox);const a={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};o?Ki(a,t.applyTransform(i,!0),n.measuredBox):Ki(a,e,n.layoutBox);const l=!$s(r);let c=!1;if(!t.resumeFrom){const i=t.getClosestProjectingParent();if(i&&!i.resumeFrom){const{snapshot:s,layout:o}=i;if(s&&o){const r={x:{min:0,max:0},y:{min:0,max:0}};Ji(r,n.layoutBox,s.layoutBox);const a={x:{min:0,max:0},y:{min:0,max:0}};Ji(a,e,o.layoutBox),_s(r,a)||(c=!0),i.options.layoutRoot&&(t.relativeTarget=a,t.relativeTargetOrigin=r,t.relativeParent=i)}}}t.notifyListeners("didUpdate",{layout:e,snapshot:n,delta:a,layoutDelta:r,hasLayoutChanged:l,hasRelativeTargetChanged:c})}else if(t.isLead()){const{onExitComplete:e}=t.options;e&&e()}t.options.transition=void 0}function uo(t){ro.totalNodes++,t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=Boolean(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function ho(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function po(t){t.clearSnapshot()}function mo(t){t.clearMeasurements()}function fo(t){t.isLayoutDirty=!1}function go(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function vo(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function yo(t){t.resolveTargetDelta()}function xo(t){t.calcProjection()}function Ao(t){t.resetRotation()}function Po(t){t.removeLeadSnapshot()}function bo(t,e,n){t.translate=Ke(e.translate,0,n),t.scale=Ke(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function To(t,e,n,i){t.min=Ke(e.min,n.min,i),t.max=Ke(e.max,n.max,i)}function wo(t){return t.animationValues&&void 0!==t.animationValues.opacityExit}const So={duration:.45,ease:[.4,0,.1,1]},Eo=t=>"undefined"!==typeof navigator&&navigator.userAgent.toLowerCase().includes(t),Vo=Eo("applewebkit/")&&!Eo("chrome/")?Math.round:Ot;function Co(t){t.min=Vo(t.min),t.max=Vo(t.max)}function Mo(t,e,n){return"position"===t||"preserve-aspect"===t&&!qi(Js(e),Js(n),.2)}const Do=ao({attachResizeListener:(t,e)=>Gt(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),ko={current:void 0},Ro=ao({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!ko.current){const t=new Do({});t.mount(window),t.setOptions({layoutScroll:!0}),ko.current=t}return ko.current},resetTransform:(t,e)=>{t.style.transform=void 0!==e?e:"none"},checkIsScrollRoot:t=>Boolean("fixed"===window.getComputedStyle(t).position)}),Lo={pan:{Feature:class extends ie{constructor(){super(...arguments),this.removePointerDownListener=Ot}onPointerDown(t){this.session=new Ui(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:bs(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:e,onPan:n,onPanEnd:i}=this.node.getProps();return{onSessionStart:Es(t),onStart:Es(e),onMove:n,onEnd:(t,e)=>{delete this.session,i&&Nt.update((()=>i(t,e)))}}}mount(){this.removePointerDownListener=Kt(this.node.current,"pointerdown",(t=>this.onPointerDown(t)))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}},drag:{Feature:class extends ie{constructor(t){super(t),this.removeGroupControls=Ot,this.removeListeners=Ot,this.controls=new ws(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Ot}unmount(){this.removeGroupControls(),this.removeListeners()}},ProjectionNode:Ro,MeasureLayout:Rs}};var jo=n(20454);const Bo=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function Fo(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;ye(n<=4,'Max CSS variable fallback depth detected in property "'.concat(t,'". This may indicate a circular fallback dependency.'));const[i,s]=function(t){const e=Bo.exec(t);if(!e)return[,];const[,n,i]=e;return[n,i]}(t);if(!i)return;const o=window.getComputedStyle(e).getPropertyValue(i);if(o){const t=o.trim();return li(t)?parseFloat(t):t}return W(s)?Fo(s,e,n+1):s}const Oo=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),Io=t=>Oo.has(t),Uo=t=>t===Y||t===et,No=(t,e)=>parseFloat(t.split(", ")[e]),Wo=(t,e)=>(n,i)=>{let{transform:s}=i;if("none"===s||!s)return 0;const o=s.match(/^matrix3d\((.+)\)$/);if(o)return No(o[1],e);{const e=s.match(/^matrix\((.+)\)$/);return e?No(e[1],t):0}},Ho=new Set(["x","y","z"]),zo=L.filter((t=>!Ho.has(t)));const Yo={width:(t,e)=>{let{x:n}=t,{paddingLeft:i="0",paddingRight:s="0"}=e;return n.max-n.min-parseFloat(i)-parseFloat(s)},height:(t,e)=>{let{y:n}=t,{paddingTop:i="0",paddingBottom:s="0"}=e;return n.max-n.min-parseFloat(i)-parseFloat(s)},top:(t,e)=>{let{top:n}=e;return parseFloat(n)},left:(t,e)=>{let{left:n}=e;return parseFloat(n)},bottom:(t,e)=>{let{y:n}=t,{top:i}=e;return parseFloat(i)+(n.max-n.min)},right:(t,e)=>{let{x:n}=t,{left:i}=e;return parseFloat(i)+(n.max-n.min)},x:Wo(4,13),y:Wo(5,14)};Yo.translateX=Yo.x,Yo.translateY=Yo.y;const Xo=function(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};e=(0,i.A)({},e),s=(0,i.A)({},s);const o=Object.keys(e).filter(Io);let r=[],a=!1;const c=[];if(o.forEach((i=>{const o=t.getValue(i);if(!t.hasValue(i))return;let l=n[i],u=vi(l);const h=e[i];let d;if(Rt(h)){const t=h.length,e=null===h[0]?1:0;l=h[e],u=vi(l);for(let n=e;n<t&&null!==h[n];n++)d?ye(vi(h[n])===d,"All keyframes must be of the same type"):(d=vi(h[n]),ye(d===u||Uo(u)&&Uo(d),"Keyframes must be of the same dimension as the current value"))}else d=vi(h);if(u!==d)if(Uo(u)&&Uo(d)){const t=o.get();"string"===typeof t&&o.set(parseFloat(t)),"string"===typeof h?e[i]=parseFloat(h):Array.isArray(h)&&d===et&&(e[i]=h.map(parseFloat))}else(null===u||void 0===u?void 0:u.transform)&&(null===d||void 0===d?void 0:d.transform)&&(0===l||0===h)?0===l?o.set(d.transform(l)):e[i]=u.transform(h):(a||(r=function(t){const e=[];return zo.forEach((n=>{const i=t.getValue(n);void 0!==i&&(e.push([n,i.get()]),i.set(n.startsWith("scale")?1:0))})),e.length&&t.render(),e}(t),a=!0),c.push(i),s[i]=void 0!==s[i]?s[i]:e[i],o.jump(h))})),c.length){const n=c.indexOf("height")>=0?window.pageYOffset:null,i=((t,e,n)=>{const i=e.measureViewportBox(),s=e.current,o=getComputedStyle(s),{display:r}=o,a={};"none"===r&&e.setStaticValue("display",t.display||"block"),n.forEach((t=>{a[t]=Yo[t](i,o)})),e.render();const l=e.measureViewportBox();return n.forEach((n=>{const i=e.getValue(n);i&&i.jump(a[n]),t[n]=Yo[n](l,o)})),t})(e,t,c);return r.length&&r.forEach((e=>{let[n,i]=e;t.getValue(n).set(i)})),t.render(),l&&null!==n&&window.scrollTo({top:n}),{target:i,transitionEnd:s}}return{target:e,transitionEnd:s}};function Go(t,e,n,i){return(t=>Object.keys(t).some(Io))(e)?Xo(t,e,n,i):{target:e,transitionEnd:i}}const qo=(t,e,n,s)=>{const o=function(t,e,n){let s=Object.assign({},((0,jo.A)(e),e));const o=t.current;if(!(o instanceof Element))return{target:s,transitionEnd:n};n&&(n=(0,i.A)({},n)),t.values.forEach((t=>{const e=t.get();if(!W(e))return;const n=Fo(e,o);n&&t.set(n)}));for(const i in s){const t=s[i];if(!W(t))continue;const e=Fo(t,o);e&&(s[i]=e,n||(n={}),void 0===n[i]&&(n[i]=t))}return{target:s,transitionEnd:n}}(t,e,s);return Go(t,e=o.target,n,s=o.transitionEnd)},Zo={current:null},Ko={current:!1};const $o=new WeakMap,_o=["willChange"],Jo=["children"],Qo=Object.keys(T),tr=Qo.length,er=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],nr=v.length;class ir{constructor(t){let{parent:e,props:n,presenceContext:s,reducedMotionConfig:o,visualState:r}=t,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};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=()=>Nt.render(this.render,!1,!0);const{latestValues:l,renderState:c}=r;this.latestValues=l,this.baseTarget=(0,i.A)({},l),this.initialValues=n.initial?(0,i.A)({},l):{},this.renderState=c,this.parent=e,this.props=n,this.presenceContext=s,this.depth=e?e.depth+1:0,this.reducedMotionConfig=o,this.options=a,this.isControllingVariants=y(n),this.isVariantNode=x(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(e&&e.current);const u=this.scrapeMotionValuesFromProps(n,{}),{willChange:h}=u,d=(0,gt.A)(u,_o);for(const i in d){const t=d[i];void 0!==l[i]&&F(t)&&(t.set(l[i],!1),ai(h)&&h.add(i))}}scrapeMotionValuesFromProps(t,e){return{}}mount(t){this.current=t,$o.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach(((t,e)=>this.bindToMotionValue(e,t))),Ko.current||function(){if(Ko.current=!0,l)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Zo.current=t.matches;t.addListener(e),e()}else Zo.current=!1}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||Zo.current),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){$o.delete(this.current),this.projection&&this.projection.unmount(),Wt(this.notifyUpdate),Wt(this.render),this.valueSubscriptions.forEach((t=>t())),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features)this.features[t].unmount();this.current=null}bindToMotionValue(t,e){const n=j.has(t),i=e.on("change",(e=>{this.latestValues[t]=e,this.props.onUpdate&&Nt.update(this.notifyUpdate,!1,!0),n&&this.projection&&(this.projection.isTransformDirty=!0)})),s=e.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(t,(()=>{i(),s()}))}sortNodePosition(t){return this.current&&this.sortInstanceNodePosition&&this.type===t.type?this.sortInstanceNodePosition(this.current,t.current):0}loadFeatures(t,e,n,i){let s,o,{children:r}=t,a=(0,gt.A)(t,Jo);for(let l=0;l<tr;l++){const t=Qo[l],{isEnabled:e,Feature:n,ProjectionNode:i,MeasureLayout:r}=T[t];i&&(s=i),e(a)&&(!this.features[t]&&n&&(this.features[t]=new n(this)),r&&(o=r))}if(("html"===this.type||"svg"===this.type)&&!this.projection&&s){this.projection=new s(this.latestValues,this.parent&&this.parent.projection);const{layoutId:t,layout:e,drag:n,dragConstraints:o,layoutScroll:r,layoutRoot:l}=a;this.projection.setOptions({layoutId:t,layout:e,alwaysMeasureLayout:Boolean(n)||o&&p(o),visualElement:this,scheduleRender:()=>this.scheduleRender(),animationType:"string"===typeof e?e:"both",initialPromotionConfig:i,layoutScroll:r,layoutRoot:l})}return o}updateFeatures(){for(const t in this.features){const e=this.features[t];e.isMounted?e.update():(e.mount(),e.isMounted=!0)}}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):{x:{min:0,max:0},y:{min:0,max:0}}}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,e){this.latestValues[t]=e}makeTargetAnimatable(t){let e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return this.makeTargetAnimatableFromInstance(t,this.props,e)}update(t,e){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=e;for(let n=0;n<er.length;n++){const e=er[n];this.propEventSubscriptions[e]&&(this.propEventSubscriptions[e](),delete this.propEventSubscriptions[e]);const i=t["on"+e];i&&(this.propEventSubscriptions[e]=this.on(e,i))}this.prevMotionValues=function(t,e,n){const{willChange:i}=e;for(const s in e){const o=e[s],r=n[s];if(F(o))t.addValue(s,o),ai(i)&&i.add(s);else if(F(r))t.addValue(s,mi(o,{owner:t})),ai(i)&&i.remove(s);else if(r!==o)if(t.hasValue(s)){const e=t.getValue(s);!e.hasAnimated&&e.set(o)}else{const e=t.getStaticValue(s);t.addValue(s,mi(void 0!==e?e:o,{owner:t}))}}for(const s in n)void 0===e[s]&&t.removeValue(s);return e}(this,this.scrapeMotionValuesFromProps(t,this.prevProps),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}getVariantContext(){if(arguments.length>0&&void 0!==arguments[0]&&arguments[0])return this.parent?this.parent.getVariantContext():void 0;if(!this.isControllingVariants){const t=this.parent&&this.parent.getVariantContext()||{};return void 0!==this.props.initial&&(t.initial=this.props.initial),t}const t={};for(let e=0;e<nr;e++){const n=v[e],i=this.props[n];(m(i)||!1===i)&&(t[n]=i)}return t}addVariantChild(t){const e=this.getClosestVariantNode();if(e)return e.variantChildren&&e.variantChildren.add(t),()=>e.variantChildren.delete(t)}addValue(t,e){e!==this.values.get(t)&&(this.removeValue(t),this.bindToMotionValue(t,e)),this.values.set(t,e),this.latestValues[t]=e.get()}removeValue(t){this.values.delete(t);const e=this.valueSubscriptions.get(t);e&&(e(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,e){if(this.props.values&&this.props.values[t])return this.props.values[t];let n=this.values.get(t);return void 0===n&&void 0!==e&&(n=mi(e,{owner:this}),this.addValue(t,n)),n}readValue(t){var e;return void 0===this.latestValues[t]&&this.current?null!==(e=this.getBaseTargetFromProps(this.props,t))&&void 0!==e?e:this.readValueFromInstance(this.current,t,this.options):this.latestValues[t]}setBaseTarget(t,e){this.baseTarget[t]=e}getBaseTarget(t){var e;const{initial:n}=this.props,i="string"===typeof n||"object"===typeof n?null===(e=kt(this.props,n))||void 0===e?void 0:e[t]:void 0;if(n&&void 0!==i)return i;const s=this.getBaseTargetFromProps(this.props,t);return void 0===s||F(s)?void 0!==this.initialValues[t]&&void 0===i?void 0:this.baseTarget[t]:s}on(t,e){return this.events[t]||(this.events[t]=new hi),this.events[t].add(e)}notify(t){if(this.events[t]){for(var e=arguments.length,n=new Array(e>1?e-1:0),i=1;i<e;i++)n[i-1]=arguments[i];this.events[t].notify(...n)}}}const sr=["transition","transitionEnd"];class or extends ir{sortInstanceNodePosition(t,e){return 2&t.compareDocumentPosition(e)?1:-1}getBaseTargetFromProps(t,e){return t.style?t.style[e]:void 0}removeValueFromRenderState(t,e){let{vars:n,style:i}=e;delete n[t],delete i[t]}makeTargetAnimatableFromInstance(t,e,n){let{transition:s,transitionEnd:o}=t,r=(0,gt.A)(t,sr),{transformValues:a}=e,l=function(t,e,n){const i={};for(const s in t){const t=bi(s,e);if(void 0!==t)i[s]=t;else{const t=n.getValue(s);t&&(i[s]=t.get())}}return i}(r,s||{},this);if(a&&(o&&(o=a(o)),r&&(r=a(r)),l&&(l=a(l))),n){!function(t,e,n){var i,s;const o=Object.keys(e).filter((e=>!t.hasValue(e))),r=o.length;var a;if(r)for(let l=0;l<r;l++){const r=o[l],c=e[r];let u=null;Array.isArray(c)&&(u=c[0]),null===u&&(u=null!==(s=null!==(i=n[r])&&void 0!==i?i:t.readValue(r))&&void 0!==s?s:e[r]),void 0!==u&&null!==u&&("string"===typeof u&&(li(u)||ei(u))?u=parseFloat(u):(a=u,!yi.find(fi(a))&&un.test(c)&&(u=ti(r,c))),t.addValue(r,mi(u,{owner:t})),void 0===n[r]&&(n[r]=u),null!==u&&t.setBaseTarget(r,u))}}(this,r,l);const t=qo(this,r,l,o);o=t.transitionEnd,r=t.target}return(0,i.A)({transition:s,transitionEnd:o},r)}}class rr extends or{constructor(){super(...arguments),this.type="html"}readValueFromInstance(t,e){if(j.has(e)){const t=Qn(e);return t&&t.default||0}{const i=(n=t,window.getComputedStyle(n)),s=(N(e)?i.getPropertyValue(e):i[e])||0;return"string"===typeof s?s.trim():s}var n}measureInstanceViewportBox(t,e){let{transformPagePoint:n}=e;return Ps(t,n)}build(t,e,n,i){at(t,e,n,i.transformTemplate)}scrapeMotionValuesFromProps(t,e){return Mt(t,e)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;F(t)&&(this.childSubscription=t.on("change",(t=>{this.current&&(this.current.textContent="".concat(t))})))}renderInstance(t,e,n,i){Et(t,e,n,i)}}class ar extends or{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){if(j.has(e)){const t=Qn(e);return t&&t.default||0}return e=Vt.has(e)?e:h(e),t.getAttribute(e)}measureInstanceViewportBox(){return{x:{min:0,max:0},y:{min:0,max:0}}}scrapeMotionValuesFromProps(t,e){return Dt(t,e)}build(t,e,n,i){Pt(t,e,n,this.isSVGTag,i.transformTemplate)}renderInstance(t,e,n,i){Ct(t,e,0,i)}mount(t){this.isSVGTag=Tt(t.tagName),super.mount(t)}}const lr=(t,e)=>k(t)?new ar(e,{enableHardwareAcceleration:!1}):new rr(e,{enableHardwareAcceleration:!0}),cr={layout:{ProjectionNode:Ro,MeasureLayout:Rs}},ur=(0,i.A)((0,i.A)((0,i.A)((0,i.A)({},Oi),me),Lo),cr),hr=M(((t,e)=>function(t,e,n,s){let{forwardMotionProps:o=!1}=e;const r=k(t)?Yt:Xt;return(0,i.A)((0,i.A)({},r),{},{preloadedFeatures:n,useRender:St(o),createVisualElement:s,Component:t})}(t,e,ur,lr)))}}]); |