Skip to content

Instantly share code, notes, and snippets.

@aswinsekar
Created August 7, 2024 20:30
Show Gist options
  • Save aswinsekar/b4215d9a808c6da60ead7903d6439d79 to your computer and use it in GitHub Desktop.
Save aswinsekar/b4215d9a808c6da60ead7903d6439d79 to your computer and use it in GitHub Desktop.
Terser Minification Issue
"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[37043],{725438:(t,e,n)=>{n.d(e,{P:()=>o}),n(314846),n(327458),n(469655),n(194364);var s=n(879783),i=n(8065);class o{constructor(t){this.animations=t.filter(Boolean)}then(t,e){return Promise.all(this.animations).then(t).catch(e)}getAll(t){return this.animations[0][t]}setAll(t,e){for(let n=0;n<this.animations.length;n++)this.animations[n][t]=e}attachTimeline(t){const e=this.animations.map((e=>{if(!(0,i.J)()||!e.attachTimeline)return e.pause(),(0,s.y)((t=>{e.time=e.duration*t}),t);e.attachTimeline(t)}));return()=>{e.forEach(((t,e)=>{t&&t(),this.animations[e].stop()}))}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get duration(){let t=0;for(let e=0;e<this.animations.length;e++)t=Math.max(t,this.animations[e].duration);return t}runAll(t){this.animations.forEach((e=>e[t]()))}play(){this.runAll("play")}pause(){this.runAll("pause")}stop(){this.runAll("stop")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}},279611:(t,e,n)=>{n.d(e,{i:()=>m}),n(314846),n(469655);var s=n(801822),i=n(550529),o=n(841164),r=n(725438),a=n(780119),l=n(430388),u=n(444458),c=n(641041),h=n(486360),d=n(573970);function p(t,e,n,a){const c=(0,s.K)(t,a),h=c.length;(0,o.V)(Boolean(h),"No valid element provided.");const d=[];for(let s=0;s<h;s++){const t=c[s];i.C.has(t)||(0,u.B)(t);const o=i.C.get(t),r={...n};"function"==typeof r.delay&&(r.delay=r.delay(s,h)),d.push(...(0,l.$)(o,{...e,transition:r},{}))}return new r.P(d)}const m=function(t,e,n){let s;var i;return i=t,s=Array.isArray(i)&&Array.isArray(i[0])?function(t,e,n){const s=[];return(0,h.l)(t,e,n).forEach((({keyframes:t,transition:e},n)=>{let i;i=(0,d.S)(n)?(0,c.z)(n,t.default,e.default):p(n,t,e),s.push(i)})),new r.P(s)}(t,e,f):(0,a.m)(e)?p(t,e,n,f):(0,c.z)(t,e,n),s};var f},965402:(t,e,n)=>{n.d(e,{Q:()=>o});var s=n(731603),i=n(78777);function o({keyframes:t,delay:e,onUpdate:n,onComplete:o}){const r=()=>(n&&n(t[t.length-1]),o&&o(),{time:0,speed:1,duration:0,play:i.l,pause:i.l,stop:i.l,then:t=>(t(),Promise.resolve()),cancel:i.l,complete:i.l});return e?(0,s.L)({keyframes:[0,1],duration:0,delay:e,onComplete:r}):r()}},238973:(t,e,n)=>{n.d(e,{E:()=>i});var s=n(277210);const i=t=>{const e=({timestamp:e})=>t(e);return{start:()=>s.Gt.update(e,!0),stop:()=>(0,s.WG)(e),now:()=>s.uv.isProcessing?s.uv.timestamp:performance.now()}}},731603:(t,e,n)=>{n.d(e,{L:()=>d});var s=n(871098),i=n(311789),o=n(580835),r=n(238973),a=n(323662),l=n(893138),u=n(660127),c=n(445795);n(841164);const h={decay:o.B,inertia:o.B,tween:s.i,keyframes:s.i,spring:i.o};function d({autoplay:t=!0,delay:e=0,driver:n=r.E,keyframes:i,type:o="keyframes",repeat:d=0,repeatDelay:p=0,repeatType:m="loop",onPlay:f,onStop:v,onComplete:g,onUpdate:y,...x}){let P,w,b=1,S=!1;const A=()=>{w=new Promise((t=>{P=t}))};let T;A();const E=h[o]||s.i;let C;E!==s.i&&"number"!=typeof i[0]&&(C=(0,a.G)([0,100],i,{clamp:!1}),i=[0,100]);const V=E({...x,keyframes:i});let M;"mirror"===m&&(M=E({...x,keyframes:[...i].reverse(),velocity:-(x.velocity||0)}));let k="idle",D=null,j=null,R=null;null===V.calculatedDuration&&d&&(V.calculatedDuration=(0,c.t)(V));const{calculatedDuration:B}=V;let L=1/0,F=1/0;null!==B&&(L=B+p,F=L*(d+1)-p);let O=0;const I=t=>{if(null===j)return;b>0&&(j=Math.min(j,t)),b<0&&(j=Math.min(t-F/b,j)),O=null!==D?D:Math.round(t-j)*b;const n=O-e*(b>=0?1:-1),s=b>=0?n<0:n>F;O=Math.max(n,0),"finished"===k&&null===D&&(O=F);let o=O,r=V;if(d){const t=Math.min(O,F)/L;let e=Math.floor(t),n=t%1;!n&&t>=1&&(n=1),1===n&&e--,e=Math.min(e,d+1),Boolean(e%2)&&("reverse"===m?(n=1-n,p&&(n-=p/L)):"mirror"===m&&(r=M)),o=(0,l.q)(0,1,n)*L}const a=s?{done:!1,value:i[0]}:r.next(o);C&&(a.value=C(a.value));let{done:u}=a;s||null===B||(u=b>=0?O>=F:O<=0);const c=null===D&&("finished"===k||"running"===k&&u);return y&&y(a.value),c&&G(),a},U=()=>{T&&T.stop(),T=void 0},X=()=>{k="idle",U(),P(),A(),j=R=null},G=()=>{k="finished",g&&g(),U(),P()},W=()=>{if(S)return;T||(T=n(I));const t=T.now();f&&f(),null!==D?j=t-D:j&&"finished"!==k||(j=t),"finished"===k&&A(),R=j,D=null,k="running",T.start()};t&&W();const $={then:(t,e)=>w.then(t,e),get time(){return(0,u.X)(O)},set time(t){t=(0,u.f)(t),O=t,null===D&&T&&0!==b?j=T.now()-t/b:D=t},get duration(){const t=null===V.calculatedDuration?(0,c.t)(V):V.calculatedDuration;return(0,u.X)(t)},get speed(){return b},set speed(t){t!==b&&T&&(b=t,$.time=(0,u.X)(O))},get state(){return k},play:W,pause:()=>{k="paused",D=O},stop:()=>{S=!0,"idle"!==k&&(k="idle",v&&v(),X())},cancel:()=>{null!==R&&I(R),X()},complete:()=>{k="finished"},sample:t=>(j=0,I(t))};return $}},731339:(t,e,n)=>{n.d(e,{s:()=>v});var s=n(970524),i=n(655719),o=n(946366),r=n(731603),a=n(660127),l=n(696407),u=n(78777),c=n(277210);const h=(0,l.p)((()=>Object.hasOwnProperty.call(Element.prototype,"animate"))),d=new Set(["opacity","clipPath","filter","transform","backgroundColor"]),p=10,m=2e4,f=(t,e)=>"spring"===e.type||"backgroundColor"===t||!(0,i.yL)(e.ease);function v(t,e,{onUpdate:n,onComplete:i,...l}){if(!h()||!d.has(e)||l.repeatDelay||"mirror"===l.repeatType||0===l.damping||"inertia"===l.type)return!1;let v,g,y=!1,x=!1;const P=()=>{g=new Promise((t=>{v=t}))};P();let{keyframes:w,duration:b=300,ease:S,times:A}=l;if(f(e,l)){const t=(0,r.L)({...l,repeat:0,delay:0});let e={done:!1,value:w[0]};const n=[];let s=0;for(;!e.done&&s<m;)e=t.sample(s),n.push(e.value),s+=p;A=void 0,w=n,b=s-p,S="linear"}const T=(0,s.X)(t.owner.current,e,w,{...l,duration:b,ease:S,times:A}),E=()=>{x=!1,T.cancel()},C=()=>{x=!0,c.Gt.update(E),v(),P()};return T.onfinish=()=>{x||(t.set((0,o.X)(w,l)),i&&i(),C())},{then:(t,e)=>g.then(t,e),attachTimeline:t=>(T.timeline=t,T.onfinish=null,u.l),get time(){return(0,a.X)(T.currentTime||0)},set time(t){T.currentTime=(0,a.f)(t)},get speed(){return T.playbackRate},set speed(t){T.playbackRate=t},get duration(){return(0,a.X)(b)},play:()=>{y||(T.play(),(0,c.WG)(E))},pause:()=>T.pause(),stop:()=>{if(y=!0,"idle"===T.playState)return;const{currentTime:e}=T;if(e){const n=(0,r.L)({...l,autoplay:!1});t.setWithVelocity(n.sample(e-p).value,n.sample(e).value,p)}C()},complete:()=>{x||T.finish()},cancel:C}}},655719:(t,e,n)=>{n.d(e,{TU:()=>a,yL:()=>i}),n(314846),n(563333),n(194364);var s=n(309447);function i(t){return Boolean(!t||"string"==typeof t&&r[t]||(0,s.D)(t)||Array.isArray(t)&&t.every(i))}const o=([t,e,n,s])=>`cubic-bezier(${t}, ${e}, ${n}, ${s})`,r={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:o([0,.65,.55,1]),circOut:o([.55,0,1,.45]),backIn:o([.31,.01,.66,-.59]),backOut:o([.33,1.53,.69,.99])};function a(t){if(t)return(0,s.D)(t)?o(t):Array.isArray(t)?t.map(a):r[t]}},970524:(t,e,n)=>{n.d(e,{X:()=>i});var s=n(655719);function i(t,e,n,{delay:i=0,duration:o,repeat:r=0,repeatType:a="loop",ease:l,times:u}={}){const c={[e]:n};u&&(c.offset=u);const h=(0,s.TU)(l);return Array.isArray(h)&&(c.easing=h),t.animate(c,{delay:i,duration:o,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:r+1,direction:"reverse"===a?"alternate":"normal"})}},946366:(t,e,n)=>{function s(t,{repeat:e,repeatType:n="loop"}){return t[e&&"loop"!==n&&e%2==1?0:t.length-1]}n.d(e,{X:()=>s})},580835:(t,e,n)=>{n.d(e,{B:()=>o});var s=n(311789),i=n(653864);function o({keyframes:t,velocity:e=0,power:n=.8,timeConstant:o=325,bounceDamping:r=10,bounceStiffness:a=500,modifyTarget:l,min:u,max:c,restDelta:h=.5,restSpeed:d}){const p=t[0],m={done:!1,value:p},f=t=>void 0===u?c:void 0===c||Math.abs(u-t)<Math.abs(c-t)?u:c;let v=n*e;const g=p+v,y=void 0===l?g:l(g);y!==g&&(v=y-p);const x=t=>-v*Math.exp(-t/o),P=t=>y+x(t),w=t=>{const e=x(t),n=P(t);m.done=Math.abs(e)<=h,m.value=m.done?y:n};let b,S;const A=t=>{var e;e=m.value,(void 0!==u&&e<u||void 0!==c&&e>c)&&(b=t,S=(0,s.o)({keyframes:[m.value,f(m.value)],velocity:(0,i.Y)(P,t,m.value),damping:r,stiffness:a,restDelta:h,restSpeed:d}))};return A(0),{calculatedDuration:null,next:t=>{let e=!1;return S||void 0!==b||(e=!0,w(t),A(t)),void 0!==b&&t>b?S.next(t-b):(!e&&w(t),m)}}}},871098:(t,e,n)=>{n.d(e,{i:()=>u}),n(194364);var s=n(95709),i=n(148357),o=n(392649),r=n(323662),a=n(766869),l=n(418057);function u({duration:t=300,keyframes:e,times:n,ease:u="easeInOut"}){const c=(0,i.h)(u)?u.map(o.K):(0,o.K)(u),h={done:!1,value:e[0]},d=(0,l.A)(n&&n.length===e.length?n:(0,a.Z)(e),t),p=(0,r.G)(d,e,{ease:Array.isArray(c)?c:(m=e,f=c,m.map((()=>f||s.am)).splice(0,m.length-1))});var m,f;return{calculatedDuration:t,next:e=>(h.value=p(e),h.done=e>=t,h)}}},922286:(t,e,n)=>{n.d(e,{aU:()=>p,pX:()=>h});var s=n(841164),i=n(893138),o=n(660127);const r=.001,a=.01,l=10,u=.05,c=1;function h({duration:t=800,bounce:e=.25,velocity:n=0,mass:h=1}){let m,f;(0,s.$)(t<=(0,o.f)(l),"Spring duration must be 10 seconds or less");let v=1-e;v=(0,i.q)(u,c,v),t=(0,i.q)(a,l,(0,o.X)(t)),v<1?(m=e=>{const s=e*v,i=s*t,o=s-n,a=p(e,v),l=Math.exp(-i);return r-o/a*l},f=e=>{const s=e*v*t,i=s*n+n,o=Math.pow(v,2)*Math.pow(e,2)*t,a=Math.exp(-s),l=p(Math.pow(e,2),v);return(-m(e)+r>0?-1:1)*((i-o)*a)/l}):(m=e=>Math.exp(-e*t)*((e-n)*t+1)-r,f=e=>Math.exp(-e*t)*(t*t*(n-e)));const g=function(t,e,n){let s=n;for(let i=1;i<d;i++)s-=t(s)/e(s);return s}(m,f,5/t);if(t=(0,o.f)(t),isNaN(g))return{stiffness:100,damping:10,duration:t};{const e=Math.pow(g,2)*h;return{stiffness:e,damping:2*v*Math.sqrt(h*e),duration:t}}}const d=12;function p(t,e){return t*Math.sqrt(1-e*e)}},311789:(t,e,n)=>{n.d(e,{o:()=>u}),n(314846),n(275568);var s=n(660127),i=n(653864),o=n(922286);const r=["duration","bounce"],a=["stiffness","damping","mass"];function l(t,e){return e.some((e=>void 0!==t[e]))}function u({keyframes:t,restDelta:e,restSpeed:n,...u}){const c=t[0],h=t[t.length-1],d={done:!1,value:c},{stiffness:p,damping:m,mass:f,duration:v,velocity:g,isResolvedFromDuration:y}=function(t){let e={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...t};if(!l(t,a)&&l(t,r)){const n=(0,o.pX)(t);e={...e,...n,mass:1},e.isResolvedFromDuration=!0}return e}({...u,velocity:-(0,s.X)(u.velocity||0)}),x=g||0,P=m/(2*Math.sqrt(p*f)),w=h-c,b=(0,s.X)(Math.sqrt(p/f)),S=Math.abs(w)<5;let A;if(n||(n=S?.01:2),e||(e=S?.005:.5),P<1){const t=(0,o.aU)(b,P);A=e=>{const n=Math.exp(-P*b*e);return h-n*((x+P*b*w)/t*Math.sin(t*e)+w*Math.cos(t*e))}}else if(1===P)A=t=>h-Math.exp(-b*t)*(w+(x+b*w)*t);else{const t=b*Math.sqrt(P*P-1);A=e=>{const n=Math.exp(-P*b*e),s=Math.min(t*e,300);return h-n*((x+P*b*w)*Math.sinh(s)+t*w*Math.cosh(s))/t}}return{calculatedDuration:y&&v||null,next:t=>{const s=A(t);if(y)d.done=t>=v;else{let o=x;0!==t&&(o=P<1?(0,i.Y)(A,t,s):0);const r=Math.abs(o)<=n,a=Math.abs(h-s)<=e;d.done=r&&a}return d.value=d.done?h:s,d}}}},445795:(t,e,n)=>{n.d(e,{Y:()=>s,t:()=>i});const s=2e4;function i(t){let e=0,n=t.next(e);for(;!n.done&&e<s;)e+=50,n=t.next(e);return e>=s?1/0:e}},653864:(t,e,n)=>{n.d(e,{Y:()=>o});var s=n(540255);const i=5;function o(t,e,n){const o=Math.max(e-i,0);return(0,s.f)(n-t(o),e-o)}},439284:(t,e,n)=>{n(314846),n(469655),n(841164),n(482200),n(104570)},89528:(t,e,n)=>{n(314846),n(469655),n(416155),n(758369),n(279611)},313036:(t,e,n)=>{n(63696),n(416155),n(482200);var s=n(366084);n(298944),n(373518),n(104570);const i=()=>({});(0,s.T)({scrapeMotionValuesFromProps:i,createRenderState:i})},578843:(t,e,n)=>{n(439284),n(416155),n(117946)},430091:(t,e,n)=>{n.d(e,{f:()=>m});var s=n(841164),i=n(660127),o=n(300934),r=n(731339),a=n(965402),l=n(961748),u=n(710841),c=n(87451),h=n(955104),d=n(731603),p=n(718966);const m=(t,e,n,m={})=>f=>{const v=(0,h.r)(m,t)||{},g=v.delay||m.delay||0;let{elapsed:y=0}=m;y-=(0,i.f)(g);const x=(0,c.I)(e,t,n,v),P=x[0],w=x[x.length-1],b=(0,u.P)(t,P),S=(0,u.P)(t,w);(0,s.$)(b===S,`You are trying to animate ${t} from "${P}" to "${w}". ${P} is not an animatable value - to enable this animation set ${P} to a value animatable to ${w} via the \`style\` property.`);let A={keyframes:x,velocity:e.getVelocity(),ease:"easeOut",...v,delay:-y,onUpdate:t=>{e.set(t),v.onUpdate&&v.onUpdate(t)},onComplete:()=>{f(),v.onComplete&&v.onComplete()}};if((0,h.D)(v)||(A={...A,...(0,l.x)(t,A)}),A.duration&&(A.duration=(0,i.f)(A.duration)),A.repeatDelay&&(A.repeatDelay=(0,i.f)(A.repeatDelay)),!b||!S||o.d.current||!1===v.type||p.W.skipAnimations)return(0,a.Q)(o.d.current?{...A,delay:0}:A);if(!m.isHandoff&&e.owner&&e.owner.current instanceof HTMLElement&&!e.owner.getProps().onUpdate){const n=(0,r.s)(e,t,A);if(n)return n}return(0,d.L)(A)}},641041:(t,e,n)=>{n.d(e,{z:()=>r});var s=n(430091),i=n(239667),o=n(573970);function r(t,e,n){const r=(0,o.S)(t)?t:(0,i.OQ)(t);return r.start((0,s.f)("",r,e,n)),r.animation}},430388:(t,e,n)=>{n.d(e,{$:()=>d});var s=n(353994),i=n(150170),o=n(430091),r=n(146547),a=n(482200),l=n(955104),u=n(277210);function c({protectedKeys:t,needsAnimating:e},n){const s=t.hasOwnProperty(n)&&!0!==e[n];return e[n]=!1,s}function h(t,e){const n=t.get();if(!Array.isArray(e))return n!==e;for(let s=0;s<e.length;s++)if(e[s]!==n)return!0}function d(t,e,{delay:n=0,transitionOverride:d,type:p}={}){let{transition:m=t.getDefaultTransition(),transitionEnd:f,...v}=t.makeTargetAnimatable(e);const g=t.getValue("willChange");d&&(m=d);const y=[],x=p&&t.animationState&&t.animationState.getState()[p];for(const a in v){const e=t.getValue(a),d=v[a];if(!e||void 0===d||x&&c(x,a))continue;const p={delay:n,elapsed:0,...(0,l.r)(m||{},a)};if(window.HandoffAppearAnimations){const n=t.getProps()[i.n];if(n){const t=window.HandoffAppearAnimations(n,a,e,u.Gt);null!==t&&(p.elapsed=t,p.isHandoff=!0)}}let f=!p.isHandoff&&!h(e,d);if("spring"===p.type&&(e.getVelocity()||p.velocity)&&(f=!1),e.animation&&(f=!1),f)continue;e.start((0,o.f)(a,e,d,t.shouldReduceMotion&&s.f.has(a)?{type:!1}:p));const P=e.animation;(0,r.k)(g)&&(g.add(a),P.then((()=>g.remove(a)))),y.push(P)}return f&&Promise.all(y).then((()=>{f&&(0,a.Uo)(t,f)})),y}},80930:(t,e,n)=>{n.d(e,{l:()=>o}),n(314846),n(469655);var s=n(683695),i=n(430388);function o(t,e,n={}){const a=(0,s.K)(t,e,n.custom);let{transition:l=t.getDefaultTransition()||{}}=a||{};n.transitionOverride&&(l=n.transitionOverride);const u=a?()=>Promise.all((0,i.$)(t,a,n)):()=>Promise.resolve(),c=t.variantChildren&&t.variantChildren.size?(s=0)=>{const{delayChildren:i=0,staggerChildren:a,staggerDirection:u}=l;return function(t,e,n=0,s=0,i=1,a){const l=[],u=(t.variantChildren.size-1)*s,c=1===i?(t=0)=>t*s:(t=0)=>u-t*s;return Array.from(t.variantChildren).sort(r).forEach(((t,s)=>{t.notify("AnimationStart",e),l.push(o(t,e,{...a,delay:n+c(s)}).then((()=>t.notify("AnimationComplete",e))))})),Promise.all(l)}(t,e,i+s,a,u,n)}:()=>Promise.resolve(),{when:h}=l;if(h){const[t,e]="beforeChildren"===h?[u,c]:[c,u];return t().then((()=>e()))}return Promise.all([u(),c(n.delay)])}function r(t,e){return t.sortNodePosition(e)}},104570:(t,e,n)=>{n.d(e,{_:()=>r}),n(194364);var s=n(683695),i=n(430388),o=n(80930);function r(t,e,n={}){let r;if(t.notify("AnimationStart",e),Array.isArray(e)){const s=e.map((e=>(0,o.l)(t,e,n)));r=Promise.all(s)}else if("string"==typeof e)r=(0,o.l)(t,e,n);else{const o="function"==typeof e?(0,s.K)(t,e,n.custom):e;r=Promise.all((0,i.$)(t,o,n))}return r.then((()=>t.notify("AnimationComplete",e)))}},150170:(t,e,n)=>{n.d(e,{n:()=>s});const s="data-"+(0,n(493388).I)("framerAppearId")},465446:(t,e,n)=>{n(353994),n(571331),n(564615)},966540:(t,e,n)=>{n(564615),n(970524),n(150170),n(465446),n(571331),n(78777)},564615:(t,e,n)=>{},571331:(t,e,n)=>{new Map},486360:(t,e,n)=>{n.d(e,{l:()=>m}),n(295913),n(412587),n(314846),n(563333),n(469655);var s=n(838389),i=n(801822),o=n(766869),r=n(774641),a=n(799020),l=n(660127),u=n(573970),c=n(387441),h=n(157766),d=n(203846);const p="easeInOut";function m(t,{defaultTransition:e={},...n}={},m){const x=e.duration||.3,w=new Map,b=new Map,S={},A=new Map;let T=0,E=0,C=0;for(let a=0;a<t.length;a++){const n=t[a];if("string"==typeof n){A.set(n,E);continue}if(!Array.isArray(n)){A.set(n.name,(0,c.u)(E,n.at,T,A));continue}let[d,p,w={}]=n;void 0!==w.at&&(E=(0,c.u)(E,w.at,T,A));let V=0;const M=(t,n,i,a=0,u=0)=>{const c=g(t),{delay:d=0,times:p=(0,o.Z)(c),type:m="keyframes",...f}=n;let{ease:v=e.ease||"easeOut",duration:y}=n;const w="function"==typeof d?d(a,u):d,b=c.length;if(b<=2&&"spring"===m){let t=100;if(2===b&&P(c)){const e=c[1]-c[0];t=Math.abs(e)}const e={...f};void 0!==y&&(e.duration=(0,l.f)(y));const n=(0,s.X)(e,t);v=n.ease,y=n.duration}null!=y||(y=x);const S=E+w,A=S+y;1===p.length&&0===p[0]&&(p[1]=1);const T=p.length-c.length;T>0&&(0,r.f)(p,T),1===c.length&&c.unshift(null),(0,h.H)(i,c,v,p,S,A),V=Math.max(w+y,V),C=Math.max(A,C)};if((0,u.S)(d))M(p,w,v("default",f(d,b)));else{const t=(0,i.K)(d,m,S),e=t.length;for(let n=0;n<e;n++){const s=f(t[n],b);for(const t in p)M(p[t],y(w,t),v(t,s),n,e)}}T=E,E+=V}return b.forEach(((t,s)=>{for(const i in t){const o=t[i];o.sort(d.Y);const r=[],l=[],u=[];for(let t=0;t<o.length;t++){const{at:e,value:n,easing:s}=o[t];r.push(n),l.push((0,a.q)(0,C,e)),u.push(s||"easeOut")}0!==l[0]&&(l.unshift(0),r.unshift(r[0]),u.unshift(p)),1!==l[l.length-1]&&(l.push(1),r.push(null)),w.has(s)||w.set(s,{keyframes:{},transition:{}});const c=w.get(s);c.keyframes[i]=r,c.transition[i]={...e,duration:C,ease:u,times:l,...n}}})),w}function f(t,e){return!e.has(t)&&e.set(t,{}),e.get(t)}function v(t,e){return e[t]||(e[t]=[]),e[t]}function g(t){return Array.isArray(t)?t:[t]}function y(t,e){return t[e]?{...t,...t[e]}:{...t}}const x=t=>"number"==typeof t,P=t=>t.every(x)},387441:(t,e,n)=>{function s(t,e,n,s){var i;return"number"==typeof e?e:e.startsWith("-")||e.startsWith("+")?Math.max(0,t+parseFloat(e)):"<"===e?n:null!==(i=s.get(e))&&void 0!==i?i:t}n.d(e,{u:()=>s})},157766:(t,e,n)=>{n.d(e,{H:()=>r}),n(295913),n(412587);var s=n(796105),i=n(890604),o=n(26085);function r(t,e,n,r,a,l){!function(t,e,n){for(let s=0;s<t.length;s++){const o=t[s];o.at>e&&o.at<n&&((0,i.Ai)(t,o),s--)}}(t,a,l);for(let i=0;i<e.length;i++)t.push({value:e[i],at:(0,o.j)(a,l,r[i]),easing:(0,s.S)(n,i)})}},203846:(t,e,n)=>{function s(t,e){return t.at===e.at?null===t.value?1:null===e.value?-1:0:t.at-e.at}n.d(e,{Y:()=>s}),n(295913),n(412587)},444458:(t,e,n)=>{n.d(e,{B:()=>a});var s=n(244089),i=n(541109),o=n(176617),r=n(550529);function a(t){const e={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=(0,s.x)(t)?new i.l(e,{enableHardwareAcceleration:!1}):new o.M(e,{enableHardwareAcceleration:!0});n.mount(t),r.C.set(t,n)}},961748:(t,e,n)=>{n.d(e,{x:()=>a});var s=n(353994);const i={type:"spring",stiffness:500,damping:25,restSpeed:10},o={type:"keyframes",duration:.8},r={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},a=(t,{keyframes:e})=>e.length>2?o:s.f.has(t)?t.startsWith("scale")?{type:"spring",stiffness:550,damping:0===e[1]?2*Math.sqrt(550):30,restSpeed:10}:i:r},710841:(t,e,n)=>{n.d(e,{P:()=>i});var s=n(73748);const i=(t,e)=>!("zIndex"===t||"number"!=typeof e&&!Array.isArray(e)&&("string"!=typeof e||!s.f.test(e)&&"0"!==e||e.startsWith("url(")))},892904:(t,e,n)=>{function s(t){return null!==t&&"object"==typeof t&&"function"==typeof t.start}n.d(e,{N:()=>s})},780119:(t,e,n)=>{function s(t){return"object"==typeof t&&!Array.isArray(t)}n.d(e,{m:()=>s})},343690:(t,e,n)=>{n.d(e,{p:()=>s});const s=t=>Array.isArray(t)},615655:(t,e,n)=>{n.d(e,{$:()=>i});var s=n(70998);function i(t){return"number"==typeof t?0===t:null!==t?"none"===t||"0"===t||(0,s.$)(t):void 0}},87451:(t,e,n)=>{n.d(e,{I:()=>r});var s=n(392602),i=n(710841),o=n(615655);function r(t,e,n,r){const a=(0,i.P)(e,n);let l;l=Array.isArray(n)?[...n]:[null,n];const u=void 0!==r.from?r.from:t.get();let c;const h=[];for(let s=0;s<l.length;s++)null===l[s]&&(l[s]=0===s?u:l[s-1]),(0,o.$)(l[s])&&h.push(s),"string"==typeof l[s]&&"none"!==l[s]&&"0"!==l[s]&&(c=l[s]);if(a&&h.length&&c)for(let i=0;i<h.length;i++)l[h[i]]=(0,s.J)(e,c);return l}},331261:(t,e,n)=>{n(392649)},955104:(t,e,n)=>{function s({when:t,delay:e,delayChildren:n,staggerChildren:s,staggerDirection:i,repeat:o,repeatType:r,repeatDelay:a,from:l,elapsed:u,...c}){return!!Object.keys(c).length}function i(t,e){return t[e]||t.default||t}n.d(e,{D:()=>s,r:()=>i})},542182:(t,e,n)=>{n.d(e,{C:()=>o});var s=n(63696);class i extends s.Component{getSnapshotBeforeUpdate(t){const e=this.props.childRef.current;if(e&&t.isPresent&&!this.props.isPresent){const t=this.props.sizeRef.current;t.height=e.offsetHeight||0,t.width=e.offsetWidth||0,t.top=e.offsetTop,t.left=e.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function o({children:t,isPresent:e}){const n=(0,s.useId)(),o=(0,s.useRef)(null),r=(0,s.useRef)({width:0,height:0,top:0,left:0});return(0,s.useInsertionEffect)((()=>{const{width:t,height:s,top:i,left:a}=r.current;if(e||!o.current||!t||!s)return;o.current.dataset.motionPopId=n;const l=document.createElement("style");return document.head.appendChild(l),l.sheet&&l.sheet.insertRule(`\n [data-motion-pop-id="${n}"] {\n position: absolute !important;\n width: ${t}px !important;\n height: ${s}px !important;\n top: ${i}px !important;\n left: ${a}px !important;\n }\n `),()=>{document.head.removeChild(l)}}),[e]),s.createElement(i,{isPresent:e,childRef:o,sizeRef:r},s.cloneElement(t,{ref:o}))}},600594:(t,e,n)=>{n.d(e,{O:()=>a}),n(314846),n(469655);var s=n(63696),i=n(121953),o=n(416155),r=n(542182);const a=({children:t,initial:e,isPresent:n,onExitComplete:a,custom:u,presenceAffectsLayout:c,mode:h})=>{const d=(0,o.M)(l),p=(0,s.useId)(),m=(0,s.useMemo)((()=>({id:p,initial:e,isPresent:n,custom:u,onExitComplete:t=>{d.set(t,!0);for(const e of d.values())if(!e)return;a&&a()},register:t=>(d.set(t,!1),()=>d.delete(t))})),c?void 0:[n]);return(0,s.useMemo)((()=>{d.forEach(((t,e)=>d.set(e,!1)))}),[n]),s.useEffect((()=>{!n&&!d.size&&a&&a()}),[n]),"popLayout"===h&&(t=s.createElement(r.C,{isPresent:n},t)),s.createElement(i.t.Provider,{value:m},t)};function l(){return new Map}},207073:(t,e,n)=>{n.d(e,{N:()=>d}),n(76281),n(314846),n(327458),n(469655),n(194364);var s=n(63696),i=n(226990),o=n(546332),r=n(600594),a=n(780911),l=n(117946),u=n(758369),c=n(841164);const h=t=>t.key||"",d=({children:t,custom:e,initial:n=!0,onExitComplete:d,exitBeforeEnter:p,presenceAffectsLayout:m=!0,mode:f="sync"})=>{(0,c.V)(!p,"Replace exitBeforeEnter with mode='wait'");const v=(0,s.useContext)(a.L).forceRender||(0,i.C)()[0],g=(0,o.a)(),y=function(t){const e=[];return s.Children.forEach(t,(t=>{(0,s.isValidElement)(t)&&e.push(t)})),e}(t);let x=y;const P=(0,s.useRef)(new Map).current,w=(0,s.useRef)(x),b=(0,s.useRef)(new Map).current,S=(0,s.useRef)(!0);if((0,l.E)((()=>{S.current=!1,function(t,e){t.forEach((t=>{const n=h(t);e.set(n,t)}))}(y,b),w.current=x})),(0,u.l)((()=>{S.current=!0,b.clear(),P.clear()})),S.current)return s.createElement(s.Fragment,null,x.map((t=>s.createElement(r.O,{key:h(t),isPresent:!0,initial:!!n&&void 0,presenceAffectsLayout:m,mode:f},t))));x=[...x];const A=w.current.map(h),T=y.map(h),E=A.length;for(let s=0;s<E;s++){const t=A[s];-1!==T.indexOf(t)||P.has(t)||P.set(t,void 0)}return"wait"===f&&P.size&&(x=[]),P.forEach(((t,n)=>{if(-1!==T.indexOf(n))return;const i=b.get(n);if(!i)return;const o=A.indexOf(n);let a=t;if(!a){const t=()=>{P.delete(n);const t=Array.from(b.keys()).filter((t=>!T.includes(t)));if(t.forEach((t=>b.delete(t))),w.current=y.filter((e=>{const s=h(e);return s===n||t.includes(s)})),!P.size){if(!1===g.current)return;v(),d&&d()}};a=s.createElement(r.O,{key:h(i),isPresent:!1,onExitComplete:t,custom:e,presenceAffectsLayout:m,mode:f},i),P.set(n,a)}x.splice(o,0,a)})),x=x.map((t=>{const e=t.key;return P.has(e)?t:s.createElement(r.O,{key:h(t),isPresent:!0,presenceAffectsLayout:m,mode:f},t)})),s.createElement(s.Fragment,null,P.size?x:x.map((t=>(0,s.cloneElement)(t))))}},613646:(t,e,n)=>{n.d(e,{xQ:()=>o});var s=n(63696),i=n(121953);function o(){const t=(0,s.useContext)(i.t);if(null===t)return[!0,null];const{isPresent:e,onExitComplete:n,register:o}=t,r=(0,s.useId)();return(0,s.useEffect)((()=>o(r)),[]),!e&&n?[!1,()=>n&&n(r)]:[!0]}},974818:(t,e,n)=>{n(841164),n(63696),n(416155),n(176288)},176288:(t,e,n)=>{n(63696),n(780911),n(45276),n(226990),n(186775)},553139:(t,e,n)=>{n(63696),n(889110),n(725240)},731911:(t,e,n)=>{n(63696),n(682832),n(805796),n(416155)},213911:(t,e,n)=>{n.d(e,{Y:()=>c}),n(314846),n(327458),n(194364);var s=n(841164),i=n(63696),o=n(357433),r=n(142571),a=n(416155),l=n(48690);function u({children:t,as:e="ul",axis:n="y",onReorder:u,values:c,...p},m){const f=(0,a.M)((()=>(0,r.P)(e))),v=[],g=(0,i.useRef)(!1);(0,s.V)(Boolean(c),"Reorder.Group must be provided a values prop");const y={axis:n,registerItem:(t,e)=>{const s=v.findIndex((e=>t===e.value));-1!==s?v[s].layout=e[n]:v.push({value:t,layout:e[n]}),v.sort(d)},updateOrder:(t,e,n)=>{if(g.current)return;const s=(0,l.M)(v,t,e,n);v!==s&&(g.current=!0,u(s.map(h).filter((t=>-1!==c.indexOf(t)))))}};return(0,i.useEffect)((()=>{g.current=!1})),i.createElement(f,{...p,ref:m,ignoreStrict:!0},i.createElement(o.T.Provider,{value:y},t))}const c=(0,i.forwardRef)(u);function h(t){return t.value}function d(t,e){return t.layout.min-e.layout.min}},161627:(t,e,n)=>{n.d(e,{q:()=>p});var s=n(841164),i=n(63696),o=n(357433),r=n(142571),a=n(416155),l=n(73885),u=n(979829),c=n(573970);function h(t,e=0){return(0,c.S)(t)?t:(0,l.d)(e)}function d({children:t,style:e={},value:n,as:l="li",onDrag:c,layout:d=!0,...p},m){const f=(0,a.M)((()=>(0,r.P)(l))),v=(0,i.useContext)(o.T),g={x:h(e.x),y:h(e.y)},y=(0,u.G)([g.x,g.y],(([t,e])=>t||e?1:"unset"));(0,s.V)(Boolean(v),"Reorder.Item must be a child of Reorder.Group");const{axis:x,registerItem:P,updateOrder:w}=v;return i.createElement(f,{drag:x,...p,dragSnapToOrigin:!0,style:{...e,x:g.x,y:g.y,zIndex:y},layout:d,onDrag:(t,e)=>{const{velocity:s}=e;s[x]&&w(n,g[x].get(),s[x]),c&&c(t,e)},onLayoutMeasure:t=>P(n,t),ref:m,ignoreStrict:!0},t)}const p=(0,i.forwardRef)(d)},783186:(t,e,n)=>{var s=n(213911),i=n(161627);s.Y,i.q},48690:(t,e,n)=>{n.d(e,{M:()=>o});var s=n(890604),i=n(26085);function o(t,e,n,o){if(!o)return t;const r=t.findIndex((t=>t.value===e));if(-1===r)return t;const a=o>0?1:-1,l=t[r+a];if(!l)return t;const u=t[r],c=l.layout,h=(0,i.j)(c.min,c.max,.5);return 1===a&&u.layout.max+n>h||-1===a&&u.layout.min+n<h?(0,s.Pe)(t,r,r+a):t}},45276:(t,e,n)=>{n(63696)},780911:(t,e,n)=>{n.d(e,{L:()=>s});const s=(0,n(63696).createContext)({})},889110:(t,e,n)=>{n.d(e,{Y:()=>s});const s=(0,n(63696).createContext)({strict:!1})},682832:(t,e,n)=>{n.d(e,{Q:()=>s});const s=(0,n(63696).createContext)({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"})},125793:(t,e,n)=>{n.d(e,{z:()=>r});var s=n(63696),i=n(820631),o=n(58364);function r(t){const{initial:e,animate:n}=(0,o._)(t,(0,s.useContext)(i.A));return(0,s.useMemo)((()=>({initial:e,animate:n})),[a(e),a(n)])}function a(t){return Array.isArray(t)?t.join(" "):t}},820631:(t,e,n)=>{n.d(e,{A:()=>s});const s=(0,n(63696).createContext)({})},58364:(t,e,n)=>{n.d(e,{_:()=>o});var s=n(563305),i=n(884135);function o(t,e){if((0,i.e)(t)){const{initial:e,animate:n}=t;return{initial:!1===e||(0,s.w)(e)?e:void 0,animate:(0,s.w)(n)?n:void 0}}return!1!==t.inherit?e:{}}},121953:(t,e,n)=>{n.d(e,{t:()=>s});const s=(0,n(63696).createContext)(null)},357433:(t,e,n)=>{n.d(e,{T:()=>s});const s=(0,n(63696).createContext)(null)},334175:(t,e,n)=>{n.d(e,{N:()=>s});const s=(0,n(63696).createContext)({})},780160:(t,e,n)=>{function s(t){window.MotionDebug&&window.MotionDebug.record(t)}n.d(e,{g:()=>s})},569107:(t,e,n)=>{n.d(e,{b:()=>i});var s=n(308922);const i=t=>(t*=2)<1?.5*(0,s.dg)(t):.5*(2-Math.pow(2,-10*(t-1)))},308922:(t,e,n)=>{n.d(e,{Sz:()=>r,ZZ:()=>l,dg:()=>a});var s=n(436745),i=n(500203),o=n(780760);const r=(0,s.A)(.33,1.53,.69,.99),a=(0,o.G)(r),l=(0,i.V)(a)},791806:(t,e,n)=>{n.d(e,{po:()=>o,tn:()=>a,yT:()=>r});var s=n(500203),i=n(780760);const o=t=>1-Math.sin(Math.acos(t)),r=(0,i.G)(o),a=(0,s.V)(o)},436745:(t,e,n)=>{n.d(e,{A:()=>a});var s=n(78777);const i=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,o=1e-7,r=12;function a(t,e,n,a){if(t===e&&n===a)return s.l;return s=>0===s||1===s?s:i(function(t,e,n,s,a){let l,u,c=0;do{u=e+(n-e)/2,l=i(u,s,a)-t,l>0?n=u:e=u}while(Math.abs(l)>o&&++c<r);return u}(s,0,1,t,n),e,a)}},95709:(t,e,n)=>{n.d(e,{a6:()=>i,am:()=>r,vT:()=>o});var s=n(436745);const i=(0,s.A)(.42,0,1,1),o=(0,s.A)(0,0,.58,1),r=(0,s.A)(.42,0,.58,1)},500203:(t,e,n)=>{n.d(e,{V:()=>s});const s=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2},780760:(t,e,n)=>{n.d(e,{G:()=>s});const s=t=>e=>1-t(1-e)},838389:(t,e,n)=>{n.d(e,{X:()=>r});var s=n(311789),i=n(445795),o=n(660127);function r(t,e=100){const n=(0,s.o)({keyframes:[0,e],...t}),r=Math.min((0,i.t)(n),i.Y);return{type:"keyframes",ease:t=>n.next(r*t).value/e,duration:(0,o.X)(r)}}},796105:(t,e,n)=>{n.d(e,{S:()=>o});var s=n(322801),i=n(148357);function o(t,e){return(0,i.h)(t)?t[(0,s.L)(0,t.length,e)]:t}},309447:(t,e,n)=>{n.d(e,{D:()=>s});const s=t=>Array.isArray(t)&&"number"==typeof t[0]},148357:(t,e,n)=>{n.d(e,{h:()=>s});const s=t=>Array.isArray(t)&&"number"!=typeof t[0]},392649:(t,e,n)=>{n.d(e,{K:()=>h});var s=n(841164),i=n(436745),o=n(78777),r=n(95709),a=n(791806),l=n(308922),u=n(569107);const c={linear:o.l,easeIn:r.a6,easeInOut:r.am,easeOut:r.vT,circIn:a.po,circInOut:a.tn,circOut:a.yT,backIn:l.dg,backInOut:l.ZZ,backOut:l.Sz,anticipate:u.b},h=t=>{if(Array.isArray(t)){(0,s.V)(4===t.length,"Cubic bezier arrays must contain four numerical values.");const[e,n,o,r]=t;return(0,i.A)(e,n,o,r)}return"string"==typeof t?((0,s.V)(void 0!==c[t],`Invalid easing type '${t}'`),c[t]):t}},527076:(t,e,n)=>{function s(t,e,n,s={passive:!0}){return t.addEventListener(e,n,s),()=>t.removeEventListener(e,n)}n.d(e,{k:()=>s})},420555:(t,e,n)=>{n.d(e,{h:()=>o});var s=n(527076),i=n(563890);function o(t,e,n,o){return(0,s.k)(t,e,(0,i.F)(n),o)}},563890:(t,e,n)=>{n.d(e,{F:()=>o,e:()=>i});var s=n(760628);function i(t,e="page"){return{point:{x:t[e+"X"],y:t[e+"Y"]}}}const o=t=>e=>(0,s.M)(e)&&t(e,i(e))},576216:(t,e,n)=>{n(63696),n(527076)},760628:(t,e,n)=>{n.d(e,{M:()=>s});const s=t=>"mouse"===t.pointerType?"number"!=typeof t.button||t.button<=0:!1!==t.isPrimary},981960:(t,e,n)=>{n.d(e,{I:()=>r,q:()=>i});var s=n(45974);const i=["prepare","read","update","preRender","render","postRender"],o=40;function r(t,e){let n=!1,r=!0;const a={delta:0,timestamp:0,isProcessing:!1},l=i.reduce(((t,e)=>(t[e]=(0,s.n)((()=>n=!0)),t)),{}),u=t=>l[t].process(a),c=()=>{const s=performance.now();n=!1,a.delta=r?1e3/60:Math.max(Math.min(s-a.timestamp,o),1),a.timestamp=s,a.isProcessing=!0,i.forEach(u),a.isProcessing=!1,n&&e&&(r=!1,t(c))};return{schedule:i.reduce(((e,s)=>{const i=l[s];return e[s]=(e,s=!1,o=!1)=>(n||(n=!0,r=!0,a.isProcessing||t(c)),i.schedule(e,s,o)),e}),{}),cancel:t=>i.forEach((e=>l[e].cancel(t))),state:a,steps:l}}},277210:(t,e,n)=>{n.d(e,{Ci:()=>l,Gt:()=>o,WG:()=>r,uv:()=>a});var s=n(78777),i=n(981960);const{schedule:o,cancel:r,state:a,steps:l}=(0,i.I)("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:s.l,!0)},13587:(t,e,n)=>{n(314846),n(190458);var s=n(981960),i=n(277210);s.q.reduce(((t,e)=>(t[e]=t=>(0,i.WG)(t),t)),{})},45974:(t,e,n)=>{n.d(e,{n:()=>i});class s{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()}}function i(t){let e=new s,n=new s,i=0,o=!1,r=!1;const a=new WeakSet,l={schedule:(t,s=!1,r=!1)=>{const l=r&&o,u=l?e:n;return s&&a.add(t),u.add(t)&&l&&o&&(i=e.order.length),t},cancel:t=>{n.remove(t),a.delete(t)},process:s=>{if(o)r=!0;else{if(o=!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(s),a.has(i)&&(l.schedule(i),t())}o=!1,r&&(r=!1,l.process(s))}}};return l}},588145:(t,e,n)=>{n.d(e,{n:()=>b});var s=n(841164),i=n(120421),o=n(986576),r=n(105675),a=n(420555),l=n(846767),u=n(298944),c=n(687464),h=n(410347),d=n(563890),p=n(912158),m=n(527076),f=n(775886),v=n(26085),g=n(234223),y=n(430091),x=n(508382),P=n(277210);const w=new WeakMap;class b{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=(0,u.ge)(),this.visualElement=t}start(t,{snapToCursor:e=!1}={}){const{presenceContext:n}=this.visualElement;if(n&&!1===n.isPresent)return;const{dragSnapToOrigin:s}=this.getProps();this.panSession=new i.Q(t,{onSessionStart:t=>{const{dragSnapToOrigin:n}=this.getProps();n?this.pauseAnimation():this.stopAnimation(),e&&this.snapToCursor((0,d.e)(t,"page").point)},onStart:(t,e)=>{const{drag:n,dragPropagation:s,onDragStart:i}=this.getProps();if(n&&!s&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=(0,o.nQ)(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),(0,c.X)((t=>{let e=this.getAxisMotionValue(t).get()||0;if(g.KN.test(e)){const{projection:n}=this.visualElement;if(n&&n.layout){const s=n.layout.layoutBox[t];s&&(e=(0,f.CQ)(s)*(parseFloat(e)/100))}}this.originPoint[t]=e})),i&&P.Gt.update((()=>i(t,e)),!1,!0);const{animationState:r}=this.visualElement;r&&r.setActive("whileDrag",!0)},onMove:(t,e)=>{const{dragPropagation:n,dragDirectionLock:s,onDirectionLock:i,onDrag:o}=this.getProps();if(!n&&!this.openGlobalLock)return;const{offset:r}=e;if(s&&null===this.currentDirection)return this.currentDirection=function(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}(r),void(null!==this.currentDirection&&i&&i(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:()=>(0,c.X)((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:s,contextWindow:(0,x.s)(this.visualElement)})}stop(t,e){const n=this.isDragging;if(this.cancel(),!n)return;const{velocity:s}=e;this.startAnimation(s);const{onDragEnd:i}=this.getProps();i&&P.Gt.update((()=>i(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:s}=this.getProps();if(!n||!S(t,s,this.currentDirection))return;const i=this.getAxisMotionValue(t);let o=this.originPoint[t]+n[t];this.constraints&&this.constraints[t]&&(o=(0,l.Zq)(o,this.constraints[t],this.elastic[t])),i.set(o)}resolveConstraints(){var t;const{dragConstraints:e,dragElastic:n}=this.getProps(),s=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):null===(t=this.visualElement.projection)||void 0===t?void 0:t.layout,i=this.constraints;e&&(0,r.X)(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!e||!s)&&(0,l._c)(s.layoutBox,e),this.elastic=(0,l.my)(n),i!==this.constraints&&s&&this.constraints&&!this.hasMutatedConstraints&&(0,c.X)((t=>{this.getAxisMotionValue(t)&&(this.constraints[t]=(0,l.QX)(s.layoutBox[t],this.constraints[t]))}))}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:e}=this.getProps();if(!t||!(0,r.X)(t))return!1;const n=t.current;(0,s.V)(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 o=(0,h.L)(n,i.root,this.visualElement.getTransformPagePoint());let a=(0,l.iT)(i.layout.layoutBox,o);if(e){const t=e((0,p.pA)(a));this.hasMutatedConstraints=!!t,t&&(a=(0,p.FY)(t))}return a}startAnimation(t){const{drag:e,dragMomentum:n,dragElastic:s,dragTransition:i,dragSnapToOrigin:o,onDragTransitionEnd:r}=this.getProps(),a=this.constraints||{},l=(0,c.X)((r=>{if(!S(r,e,this.currentDirection))return;let l=a&&a[r]||{};o&&(l={min:0,max:0});const u=s?200:1e6,c=s?40:1e7,h={type:"inertia",velocity:n?t[r]:0,bounceStiffness:u,bounceDamping:c,timeConstant:750,restDelta:1,restSpeed:10,...i,...l};return this.startAxisValueAnimation(r,h)}));return Promise.all(l).then(r)}startAxisValueAnimation(t,e){const n=this.getAxisMotionValue(t);return n.start((0,y.f)(t,n,0,e))}stopAnimation(){(0,c.X)((t=>this.getAxisMotionValue(t).stop()))}pauseAnimation(){(0,c.X)((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();return n[e]||this.visualElement.getValue(t,(n.initial?n.initial[t]:void 0)||0)}snapToCursor(t){(0,c.X)((e=>{const{drag:n}=this.getProps();if(!S(e,n,this.currentDirection))return;const{projection:s}=this.visualElement,i=this.getAxisMotionValue(e);if(s&&s.layout){const{min:n,max:o}=s.layout.layoutBox[e];i.set(t[e]-(0,v.j)(n,o,.5))}}))}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:e}=this.getProps(),{projection:n}=this.visualElement;if(!(0,r.X)(e)||!n||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};(0,c.X)((t=>{const e=this.getAxisMotionValue(t);if(e){const n=e.get();s[t]=(0,l.Yu)({min:n,max:n},this.constraints[t])}}));const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),(0,c.X)((e=>{if(!S(e,t,null))return;const n=this.getAxisMotionValue(e),{min:i,max:o}=this.constraints[e];n.set((0,v.j)(i,o,s[e]))}))}addListeners(){if(!this.visualElement.current)return;w.set(this.visualElement,this);const t=this.visualElement.current,e=(0,a.h)(t,"pointerdown",(t=>{const{drag:e,dragListener:n=!0}=this.getProps();e&&n&&this.start(t)})),n=()=>{const{dragConstraints:t}=this.getProps();(0,r.X)(t)&&(this.constraints=this.resolveRefConstraints())},{projection:s}=this.visualElement,i=s.addEventListener("measure",n);s&&!s.layout&&(s.root&&s.root.updateScroll(),s.updateLayout()),n();const o=(0,m.k)(window,"resize",(()=>this.scalePositionWithinConstraints())),l=s.addEventListener("didUpdate",(({delta:t,hasLayoutChanged:e})=>{this.isDragging&&e&&((0,c.X)((e=>{const n=this.getAxisMotionValue(e);n&&(this.originPoint[e]+=t[e].translate,n.set(n.get()+t[e].translate))})),this.visualElement.render())}));return()=>{o(),e(),i(),l&&l()}}getProps(){const t=this.visualElement.getProps(),{drag:e=!1,dragDirectionLock:n=!1,dragPropagation:s=!1,dragConstraints:i=!1,dragElastic:o=l.Ne,dragMomentum:r=!0}=t;return{...t,drag:e,dragDirectionLock:n,dragPropagation:s,dragConstraints:i,dragElastic:o,dragMomentum:r}}}function S(t,e,n){return!(!0!==e&&e!==t||null!==n&&n!==t)}},778673:(t,e,n)=>{n.d(e,{w:()=>r});var s=n(508298),i=n(78777),o=n(588145);class r extends s.X{constructor(t){super(t),this.removeGroupControls=i.l,this.removeListeners=i.l,this.controls=new o.n(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||i.l}unmount(){this.removeGroupControls(),this.removeListeners()}}},438038:(t,e,n)=>{n(314846),n(469655),n(416155)},846767:(t,e,n)=>{n.d(e,{Ne:()=>m,QX:()=>p,Yu:()=>d,Zq:()=>a,_c:()=>u,iT:()=>h,my:()=>f});var s=n(799020),i=n(775886),o=n(893138),r=n(26085);function a(t,{min:e,max:n},s){return void 0!==e&&t<e?t=s?(0,r.j)(e,t,s.min):Math.max(t,e):void 0!==n&&t>n&&(t=s?(0,r.j)(n,t,s.max):Math.min(t,n)),t}function l(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 u(t,{top:e,left:n,bottom:s,right:i}){return{x:l(t.x,n,i),y:l(t.y,e,s)}}function c(t,e){let n=e.min-t.min,s=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,s]=[s,n]),{min:n,max:s}}function h(t,e){return{x:c(t.x,e.x),y:c(t.y,e.y)}}function d(t,e){let n=.5;const r=(0,i.CQ)(t),a=(0,i.CQ)(e);return a>r?n=(0,s.q)(e.min,e.max-r,t.min):r>a&&(n=(0,s.q)(t.min,t.max-a,e.min)),(0,o.q)(0,1,n)}function p(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}const m=.35;function f(t=m){return!1===t?t=0:!0===t&&(t=m),{x:v(t,"left","right"),y:v(t,"top","bottom")}}function v(t,e,n){return{min:g(t,e),max:g(t,n)}}function g(t,e){return"number"==typeof t?t:t[e]||0}},986576:(t,e,n)=>{function s(t){let e=null;return()=>null===e&&(e=t,()=>{e=null})}n.d(e,{D3:()=>a,nQ:()=>r});const i=s("dragHorizontal"),o=s("dragVertical");function r(t){let e=!1;if("y"===t)e=o();else if("x"===t)e=i();else{const t=i(),n=o();t&&n?e=()=>{t(),n()}:(t&&t(),n&&n())}return e}function a(){const t=r(!0);return!t||(t(),!1)}},53294:(t,e,n)=>{n.d(e,{c:()=>r});var s=n(527076),i=n(508298),o=n(804253);class r extends i.X{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=(0,o.F)((0,s.k)(this.node.current,"focus",(()=>this.onFocus())),(0,s.k)(this.node.current,"blur",(()=>this.onBlur())))}unmount(){}}},694328:(t,e,n)=>{n.d(e,{e:()=>u});var s=n(420555),i=n(804253),o=n(986576),r=n(508298),a=n(277210);function l(t,e){const n="pointer"+(e?"enter":"leave"),i="onHover"+(e?"Start":"End");return(0,s.h)(t.current,n,((n,s)=>{if("touch"===n.pointerType||(0,o.D3)())return;const r=t.getProps();t.animationState&&r.whileHover&&t.animationState.setActive("whileHover",e),r[i]&&a.Gt.update((()=>r[i](n,s)))}),{passive:!t.getProps()[i]})}class u extends r.X{mount(){this.unmount=(0,i.F)(l(this.node,!0),l(this.node,!1))}unmount(){}}},120421:(t,e,n)=>{n.d(e,{Q:()=>c});var s=n(563890),i=n(660127),o=n(420555),r=n(804253),a=n(367232),l=n(760628),u=n(277210);class c{constructor(t,e,{transformPagePoint:n,contextWindow:i,dragSnapToOrigin:c=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!this.lastMoveEvent||!this.lastMoveEventInfo)return;const t=p(this.lastMoveEventInfo,this.history),e=null!==this.startEvent,n=(0,a.w)(t.offset,{x:0,y:0})>=3;if(!e&&!n)return;const{point:s}=t,{timestamp:i}=u.uv;this.history.push({...s,timestamp:i});const{onStart:o,onMove:r}=this.handlers;e||(o&&o(this.lastMoveEvent,t),this.startEvent=this.lastMoveEvent),r&&r(this.lastMoveEvent,t)},this.handlePointerMove=(t,e)=>{this.lastMoveEvent=t,this.lastMoveEventInfo=h(e,this.transformPagePoint),u.Gt.update(this.updatePoint,!0)},this.handlePointerUp=(t,e)=>{this.end();const{onEnd:n,onSessionEnd:s,resumeAnimation:i}=this.handlers;if(this.dragSnapToOrigin&&i&&i(),!this.lastMoveEvent||!this.lastMoveEventInfo)return;const o=p("pointercancel"===t.type?this.lastMoveEventInfo:h(e,this.transformPagePoint),this.history);this.startEvent&&n&&n(t,o),s&&s(t,o)},!(0,l.M)(t))return;this.dragSnapToOrigin=c,this.handlers=e,this.transformPagePoint=n,this.contextWindow=i||window;const d=h((0,s.e)(t),this.transformPagePoint),{point:m}=d,{timestamp:f}=u.uv;this.history=[{...m,timestamp:f}];const{onSessionStart:v}=e;v&&v(t,p(d,this.history)),this.removeListeners=(0,r.F)((0,o.h)(this.contextWindow,"pointermove",this.handlePointerMove),(0,o.h)(this.contextWindow,"pointerup",this.handlePointerUp),(0,o.h)(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),(0,u.WG)(this.updatePoint)}}function h(t,e){return e?{point:e(t.point)}:t}function d(t,e){return{x:t.x-e.x,y:t.y-e.y}}function p({point:t},e){return{point:t,delta:d(t,f(e)),offset:d(t,m(e)),velocity:v(e,.1)}}function m(t){return t[0]}function f(t){return t[t.length-1]}function v(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,s=null;const o=f(t);for(;n>=0&&(s=t[n],!(o.timestamp-s.timestamp>(0,i.f)(e)));)n--;if(!s)return{x:0,y:0};const r=(0,i.X)(o.timestamp-s.timestamp);if(0===r)return{x:0,y:0};const a={x:(o.x-s.x)/r,y:(o.y-s.y)/r};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}},790258:(t,e,n)=>{n.d(e,{f:()=>c});var s=n(120421),i=n(420555),o=n(508298),r=n(78777),a=n(508382),l=n(277210);const u=t=>(e,n)=>{t&&l.Gt.update((()=>t(e,n)))};class c extends o.X{constructor(){super(...arguments),this.removePointerDownListener=r.l}onPointerDown(t){this.session=new s.Q(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:(0,a.s)(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:e,onPan:n,onPanEnd:s}=this.node.getProps();return{onSessionStart:u(t),onStart:u(e),onMove:n,onEnd:(t,e)=>{delete this.session,s&&l.Gt.update((()=>s(t,e)))}}}mount(){this.removePointerDownListener=(0,i.h)(this.node.current,"pointerdown",(t=>this.onPointerDown(t)))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}},448779:(t,e,n)=>{n.d(e,{H:()=>p});var s=n(563890),i=n(527076),o=n(420555),r=n(508298),a=n(804253),l=n(986576),u=n(40100),c=n(78777),h=n(277210);function d(t,e){if(!e)return;const n=new PointerEvent("pointer"+t);e(n,(0,s.e)(n))}class p extends r.X{constructor(){super(...arguments),this.removeStartListeners=c.l,this.removeEndListeners=c.l,this.removeAccessibleListeners=c.l,this.startPointerPress=(t,e)=>{if(this.isPressing)return;this.removeEndListeners();const n=this.node.getProps(),s=(0,o.h)(window,"pointerup",((t,e)=>{if(!this.checkPressEnd())return;const{onTap:n,onTapCancel:s,globalTapTarget:i}=this.node.getProps();h.Gt.update((()=>{i||(0,u.w)(this.node.current,t.target)?n&&n(t,e):s&&s(t,e)}))}),{passive:!(n.onTap||n.onPointerUp)}),i=(0,o.h)(window,"pointercancel",((t,e)=>this.cancelPress(t,e)),{passive:!(n.onTapCancel||n.onPointerCancel)});this.removeEndListeners=(0,a.F)(s,i),this.startPress(t,e)},this.startAccessiblePress=()=>{const t=(0,i.k)(this.node.current,"keydown",(t=>{"Enter"!==t.key||this.isPressing||(this.removeEndListeners(),this.removeEndListeners=(0,i.k)(this.node.current,"keyup",(t=>{"Enter"===t.key&&this.checkPressEnd()&&d("up",((t,e)=>{const{onTap:n}=this.node.getProps();n&&h.Gt.update((()=>n(t,e)))}))})),d("down",((t,e)=>{this.startPress(t,e)})))})),e=(0,i.k)(this.node.current,"blur",(()=>{this.isPressing&&d("cancel",((t,e)=>this.cancelPress(t,e)))}));this.removeAccessibleListeners=(0,a.F)(t,e)}}startPress(t,e){this.isPressing=!0;const{onTapStart:n,whileTap:s}=this.node.getProps();s&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),n&&h.Gt.update((()=>n(t,e)))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!(0,l.D3)()}cancelPress(t,e){if(!this.checkPressEnd())return;const{onTapCancel:n}=this.node.getProps();n&&h.Gt.update((()=>n(t,e)))}mount(){const t=this.node.getProps(),e=(0,o.h)(t.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),n=(0,i.k)(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=(0,a.F)(e,n)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}},40100:(t,e,n)=>{n.d(e,{w:()=>s});const s=(t,e)=>!!e&&(t===e||s(t,e.parentElement))},625121:(t,e,n)=>{n.d(e,{Ny:()=>i.N,PY:()=>s.P,i0:()=>o.i});var s=n(142571),i=(n(959549),n(207073)),o=(n(731911),n(553139),n(176288),n(783186),n(827073),n(475861),n(73885),n(167472),n(736196),n(979829),n(375884),n(106406),n(100308),n(333229),n(439849),n(846820),n(975469),n(261006),n(150092),n(494535),n(439284),n(89528),n(578843),n(404175),n(104570),n(683911),n(116954),n(613646),n(364584),n(438038),n(576216),n(285424),n(773791),n(32740),n(373518),n(602267),n(437614),n(557013),n(674060),n(52565),n(550529),n(731603),n(449705),n(73748),n(234223),n(718966),n(966540),n(150170),n(311789),n(820631),n(682832),n(121953),n(780911),n(334175),n(389462),n(45276),n(313036),n(262345),n(974818),n(239667),n(279611));n(847891),n(12582),n(438182),n(331261),n(229455),n(893138),n(26085),n(804253),n(799020),n(322801),n(13587),n(569107),n(308922),n(791806),n(95709),n(436745),n(500203),n(780760),n(616246),n(367232),n(841164),n(323662),n(277210),n(788477),n(482200),n(298944),n(775886),n(805796),n(366084),n(986576),n(420555),n(563890),n(573970),n(701134),n(758369),n(117946),n(226990)},508298:(t,e,n)=>{n.d(e,{X:()=>s});class s{constructor(t){this.isMounted=!1,this.node=t}update(){}}},922969:(t,e,n)=>{n.d(e,{H:()=>o});var s=n(508298);let i=0;class o extends s.X{constructor(){super(...arguments),this.id=i++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:e,custom:n}=this.node.presenceContext,{isPresent:s}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===s)return;const i=this.node.animationState.setActive("exit",!t,{custom:null!=n?n:this.node.getProps().custom});e&&!t&&i.then((()=>e(this.id)))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}},786311:(t,e,n)=>{n.d(e,{j:()=>r});var s=n(892904),i=n(316558),o=n(508298);class r extends o.X{constructor(t){super(t),t.animationState||(t.animationState=(0,i.L)(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();this.unmount(),(0,s.N)(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(){}}},788477:(t,e,n)=>{n.d(e,{W:()=>o});var s=n(786311),i=n(922969);const o={animation:{Feature:s.j},exit:{Feature:i.H}}},834430:(t,e,n)=>{n.d(e,{B:()=>i}),n(314846),n(275568);const s={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"]},i={};for(const o in s)i[o]={isEnabled:t=>s[o].some((e=>!!t[e]))}},863986:(t,e,n)=>{n.d(e,{$:()=>a});var s=n(778673),i=n(790258),o=n(127765),r=n(157986);const a={pan:{Feature:i.f},drag:{Feature:s.w,ProjectionNode:r.P,MeasureLayout:o.$}}},302160:(t,e,n)=>{n.d(e,{n:()=>r});var s=n(694328),i=n(53294),o=n(448779);const r={inView:{Feature:n(519843).x},tap:{Feature:o.H},focus:{Feature:i.c},hover:{Feature:s.e}}},561522:(t,e,n)=>{n.d(e,{Z:()=>o});var s=n(157986),i=n(127765);const o={layout:{ProjectionNode:s.P,MeasureLayout:i.$}}},127765:(t,e,n)=>{n.d(e,{$:()=>p});var s=n(63696),i=n(613646),o=n(780911),r=n(334175),a=n(65281),l=n(694608),u=n(828667),c=n(602267),h=n(277210);class d extends s.Component{componentDidMount(){const{visualElement:t,layoutGroup:e,switchLayoutGroup:n,layoutId:s}=this.props,{projection:i}=t;(0,c.$)(m),i&&(e.group&&e.group.add(i),n&&n.register&&s&&n.register(i),i.root.didUpdate(),i.addEventListener("animationComplete",(()=>{this.safeToRemove()})),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),a.w.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:e,visualElement:n,drag:s,isPresent:i}=this.props,o=n.projection;return o?(o.isPresent=i,s||t.layoutDependency!==e||void 0===e?o.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?o.promote():o.relegate()||h.Gt.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:s}=t;s&&(s.scheduleCheckAfterUnmount(),e&&e.group&&e.group.remove(s),n&&n.deregister&&n.deregister(s))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function p(t){const[e,n]=(0,i.xQ)(),a=(0,s.useContext)(o.L);return s.createElement(d,{...t,layoutGroup:a,switchLayoutGroup:(0,s.useContext)(r.N),isPresent:e,safeToRemove:n})}const m={borderRadius:{...l.P,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:l.P,borderTopRightRadius:l.P,borderBottomLeftRadius:l.P,borderBottomRightRadius:l.P,boxShadow:u._}},725240:(t,e,n)=>{n.d(e,{Y:()=>i});var s=n(834430);function i(t){for(const e in t)s.B[e]={...s.B[e],...t[e]}}},519843:(t,e,n)=>{n.d(e,{x:()=>r});var s=n(508298),i=n(329294);const o={some:0,all:1};class r extends s.X{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:e,margin:n,amount:s="some",once:r}=t,a={root:e?e.current:void 0,rootMargin:n,threshold:"number"==typeof s?s:o[s]};return(0,i.m)(this.node.current,a,(t=>{const{isIntersecting:e}=t;if(this.isInView===e)return;if(this.isInView=e,r&&!e&&this.hasEnteredView)return;e&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",e);const{onViewportEnter:n,onViewportLeave:s}=this.node.getProps(),i=e?n:s;i&&i(t)}))}mount(){this.startObserver()}update(){if("undefined"==typeof IntersectionObserver)return;const{props:t,prevProps:e}=this.node;["amount","margin","root"].some(function({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}(t,e))&&this.startObserver()}unmount(){}}},329294:(t,e,n)=>{n.d(e,{m:()=>a}),n(314846),n(469655);const s=new WeakMap,i=new WeakMap,o=t=>{const e=s.get(t.target);e&&e(t)},r=t=>{t.forEach(o)};function a(t,e,n){const o=function({root:t,...e}){const n=t||document;i.has(n)||i.set(n,{});const s=i.get(n),o=JSON.stringify(e);return s[o]||(s[o]=new IntersectionObserver(r,{root:t,...e})),s[o]}(e);return s.set(t,n),o.observe(t),()=>{s.delete(t),o.unobserve(t)}}},285424:(t,e,n)=>{n.d(e,{G:()=>f});var s=n(63696),i=n(682832),o=n(820631),r=n(890875),a=n(716226),l=n(125793),u=n(725240),c=n(701134),h=n(780911),d=n(889110),p=n(334175),m=n(908134);function f({preloadedFeatures:t,createVisualElement:e,useRender:n,useVisualState:h,Component:f}){function g(u,m){let g;const y={...(0,s.useContext)(i.Q),...u,layoutId:v(u)},{isStatic:x}=y,P=(0,l.z)(u),w=h(u,x);if(!x&&c.B){P.visualElement=(0,r.Y)(f,w,y,e);const n=(0,s.useContext)(p.N),i=(0,s.useContext)(d.Y).strict;P.visualElement&&(g=P.visualElement.loadFeatures(y,i,t,n))}return s.createElement(o.A.Provider,{value:P},g&&P.visualElement?s.createElement(g,{visualElement:P.visualElement,...y}):null,n(f,u,(0,a.J)(w,P.visualElement,m),w,x,P.visualElement))}t&&(0,u.Y)(t);const y=(0,s.forwardRef)(g);return y[m.o]=f,y}function v({layoutId:t}){const e=(0,s.useContext)(h.L).id;return e&&void 0!==t?e+"-"+t:t}},822047:(t,e,n)=>{n.d(e,{z:()=>o});var s=n(602267),i=n(353994);function o(t,{layout:e,layoutId:n}){return i.f.has(t)||t.startsWith("origin")||(e||void 0!==n)&&(!!s.H[t]||"opacity"===t)}},773791:(t,e,n)=>{n(908134)},908134:(t,e,n)=>{n.d(e,{o:()=>s});const s=Symbol.for("motionComponentSymbol")},32740:(t,e,n)=>{n(773791),n(908134)},716226:(t,e,n)=>{n.d(e,{J:()=>o});var s=n(63696),i=n(105675);function o(t,e,n){return(0,s.useCallback)((s=>{s&&t.mount&&t.mount(s),e&&(s?e.mount(s):e.unmount()),n&&("function"==typeof n?n(s):(0,i.X)(n)&&(n.current=s))}),[e])}},890875:(t,e,n)=>{n.d(e,{Y:()=>c});var s=n(63696),i=n(121953),o=n(820631),r=n(117946),a=n(889110),l=n(682832),u=n(150170);function c(t,e,n,c){const{visualElement:h}=(0,s.useContext)(o.A),d=(0,s.useContext)(a.Y),p=(0,s.useContext)(i.t),m=(0,s.useContext)(l.Q).reducedMotion,f=(0,s.useRef)();c=c||d.renderer,!f.current&&c&&(f.current=c(t,{visualState:e,parent:h,props:n,presenceContext:p,blockInitialAnimation:!!p&&!1===p.initial,reducedMotionConfig:m}));const v=f.current;(0,s.useInsertionEffect)((()=>{v&&v.update(n,p)}));const g=(0,s.useRef)(Boolean(n[u.n]&&!window.HandoffComplete));return(0,r.E)((()=>{v&&(v.render(),g.current&&v.animationState&&v.animationState.animateChanges())})),(0,s.useEffect)((()=>{v&&(v.updateFeatures(),!g.current&&v.animationState&&v.animationState.animateChanges(),g.current&&(g.current=!1,window.HandoffComplete=!0))})),v}},366084:(t,e,n)=>{n.d(e,{T:()=>h}),n(314846),n(469655);var s=n(63696),i=n(892904),o=n(121953),r=n(775691),a=n(416155),l=n(736196),u=n(820631),c=n(884135);const h=t=>(e,n)=>{const i=(0,s.useContext)(u.A),r=(0,s.useContext)(o.t),l=()=>function({scrapeMotionValuesFromProps:t,createRenderState:e,onMount:n},s,i,o){const r={latestValues:d(s,i,o,t),renderState:e()};return n&&(r.mount=t=>n(s,t,r)),r}(t,e,i,r);return n?l():(0,a.M)(l)};function d(t,e,n,s){const o={},a=s(t,{});for(const i in a)o[i]=(0,l.u)(a[i]);let{initial:u,animate:h}=t;const d=(0,c.e)(t),p=(0,c.O)(t);e&&p&&!d&&!1!==t.inherit&&(void 0===u&&(u=e.initial),void 0===h&&(h=e.animate));let m=!!n&&!1===n.initial;m=m||!1===u;const f=m?h:u;return f&&"boolean"!=typeof f&&!(0,i.N)(f)&&(Array.isArray(f)?f:[f]).forEach((e=>{const n=(0,r.a)(t,e);if(!n)return;const{transitionEnd:s,transition:i,...a}=n;for(const t in a){let e=a[t];Array.isArray(e)&&(e=e[m?e.length-1:0]),null!==e&&(o[t]=e)}for(const t in s)o[t]=s[t]})),o}},116954:(t,e,n)=>{n.d(e,{S:()=>i});const s=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 i(t){return t.startsWith("while")||t.startsWith("drag")&&"draggable"!==t||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||s.has(t)}},715275:(t,e,n)=>{n.d(e,{v:()=>d});var s=n(791806),i=n(799020),o=n(26085),r=n(78777),a=n(234223);const l=["TopLeft","TopRight","BottomLeft","BottomRight"],u=l.length,c=t=>"string"==typeof t?parseFloat(t):t,h=t=>"number"==typeof t||a.px.test(t);function d(t,e,n,s,i,r){i?(t.opacity=(0,o.j)(0,void 0!==n.opacity?n.opacity:1,m(s)),t.opacityExit=(0,o.j)(void 0!==e.opacity?e.opacity:1,0,f(s))):r&&(t.opacity=(0,o.j)(void 0!==e.opacity?e.opacity:1,void 0!==n.opacity?n.opacity:1,s));for(let d=0;d<u;d++){const i=`border${l[d]}Radius`;let r=p(e,i),u=p(n,i);void 0===r&&void 0===u||(r||(r=0),u||(u=0),0===r||0===u||h(r)===h(u)?(t[i]=Math.max((0,o.j)(c(r),c(u),s),0),(a.KN.test(u)||a.KN.test(r))&&(t[i]+="%")):t[i]=u)}(e.rotate||n.rotate)&&(t.rotate=(0,o.j)(e.rotate||0,n.rotate||0,s))}function p(t,e){return void 0!==t[e]?t[e]:t.borderRadius}const m=v(0,.5,s.yT),f=v(.5,.95,r.l);function v(t,e,n){return s=>s<t?0:s>e?1:n((0,i.q)(t,e,s))}},912158:(t,e,n)=>{function s({top:t,left:e,right:n,bottom:s}){return{x:{min:e,max:n},y:{min:t,max:s}}}function i({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function o(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),s=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:s.y,right:s.x}}n.d(e,{FY:()=>s,bS:()=>o,pA:()=>i})},812385:(t,e,n)=>{function s(t,e){t.min=e.min,t.max=e.max}function i(t,e){s(t.x,e.x),s(t.y,e.y)}n.d(e,{H:()=>i})},370155:(t,e,n)=>{n.d(e,{OU:()=>u,Ql:()=>h,Ww:()=>f,hq:()=>o,o4:()=>l});var s=n(26085),i=n(251088);function o(t,e,n){return n+e*(t-n)}function r(t,e,n,s,i){return void 0!==i&&(t=o(t,i,s)),o(t,n,s)+e}function a(t,e=0,n=1,s,i){t.min=r(t.min,e,n,s,i),t.max=r(t.max,e,n,s,i)}function l(t,{x:e,y:n}){a(t.x,e.translate,e.scale,e.originPoint),a(t.y,n.translate,n.scale,n.originPoint)}function u(t,e,n,s=!1){const o=n.length;if(!o)return;let r,a;e.x=e.y=1;for(let u=0;u<o;u++){r=n[u],a=r.projectionDelta;const o=r.instance;o&&o.style&&"contents"===o.style.display||(s&&r.options.layoutScroll&&r.scroll&&r!==r.root&&f(t,{x:-r.scroll.offset.x,y:-r.scroll.offset.y}),a&&(e.x*=a.x.scale,e.y*=a.y.scale,l(t,a)),s&&(0,i.HD)(r.latestValues)&&f(t,r.latestValues))}e.x=c(e.x),e.y=c(e.y)}function c(t){return Number.isInteger(t)||t>1.0000000000001||t<.999999999999?t:1}function h(t,e){t.min=t.min+e,t.max=t.max+e}function d(t,e,[n,i,o]){const r=void 0!==e[o]?e[o]:.5,l=(0,s.j)(t.min,t.max,r);a(t,e[n],e[i],l,e.scale)}const p=["x","scaleX","originX"],m=["y","scaleY","originY"];function f(t,e){d(t.x,e,p),d(t.y,e,m)}},775886:(t,e,n)=>{n.d(e,{CQ:()=>i,HQ:()=>o,N:()=>u,jA:()=>h,vb:()=>a});var s=n(26085);function i(t){return t.max-t.min}function o(t,e=0,n=.01){return Math.abs(t-e)<=n}function r(t,e,n,r=.5){t.origin=r,t.originPoint=(0,s.j)(e.min,e.max,t.origin),t.scale=i(n)/i(e),(o(t.scale,1,1e-4)||isNaN(t.scale))&&(t.scale=1),t.translate=(0,s.j)(n.min,n.max,t.origin)-t.originPoint,(o(t.translate)||isNaN(t.translate))&&(t.translate=0)}function a(t,e,n,s){r(t.x,e.x,n.x,s?s.originX:void 0),r(t.y,e.y,n.y,s?s.originY:void 0)}function l(t,e,n){t.min=n.min+e.min,t.max=t.min+i(e)}function u(t,e,n){l(t.x,e.x,n.x),l(t.y,e.y,n.y)}function c(t,e,n){t.min=e.min-n.min,t.max=t.min+i(e)}function h(t,e,n){c(t.x,e.x,n.x),c(t.y,e.y,n.y)}},486781:(t,e,n)=>{n.d(e,{px:()=>c});var s=n(26085),i=n(234223),o=n(370155);function r(t,e,n,s,i){return t-=e,t=(0,o.hq)(t,1/n,s),void 0!==i&&(t=(0,o.hq)(t,1/i,s)),t}function a(t,e,[n,o,a],l,u){!function(t,e=0,n=1,o=.5,a,l=t,u=t){if(i.KN.test(e)&&(e=parseFloat(e),e=(0,s.j)(u.min,u.max,e/100)-u.min),"number"!=typeof e)return;let c=(0,s.j)(l.min,l.max,o);t===l&&(c-=e),t.min=r(t.min,e,n,c,a),t.max=r(t.max,e,n,c,a)}(t,e[n],e[o],e[a],e.scale,l,u)}const l=["x","scaleX","originX"],u=["y","scaleY","originY"];function c(t,e,n,s){a(t.x,e,l,n?n.x:void 0,s?s.x:void 0),a(t.y,e,u,n?n.y:void 0,s?s.y:void 0)}},298944:(t,e,n)=>{n.d(e,{ge:()=>i,xU:()=>s});const s=()=>({x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}),i=()=>({x:{min:0,max:0},y:{min:0,max:0}})},53489:(t,e,n)=>{n.d(e,{XY:()=>o,cH:()=>l,mG:()=>a,zo:()=>r});var s=n(775886);function i(t){return 0===t.translate&&1===t.scale}function o(t){return i(t.x)&&i(t.y)}function r(t,e){return t.x.min===e.x.min&&t.x.max===e.x.max&&t.y.min===e.y.min&&t.y.max===e.y.max}function a(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 l(t){return(0,s.CQ)(t.x)/(0,s.CQ)(t.y)}},322326:(t,e,n)=>{n.d(e,{B:()=>o});var s=n(103701),i=n(527076);const o=(0,s.u0)({attachResizeListener:(t,e)=>(0,i.k)(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0})},157986:(t,e,n)=>{n.d(e,{P:()=>r});var s=n(103701),i=n(322326);const o={current:void 0},r=(0,s.u0)({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!o.current){const t=new i.B({});t.mount(window),t.setOptions({layoutScroll:!0}),o.current=t}return o.current},resetTransform:(t,e)=>{t.style.transform=void 0!==e?e:"none"},checkIsScrollRoot:t=>Boolean("fixed"===window.getComputedStyle(t).position)})},103701:(t,e,n)=>{n.d(e,{u0:()=>R}),n(76281),n(314846),n(469655),n(275568);var s=n(902840),i=n(715275),o=n(812385),r=n(370155),a=n(775886),l=n(486781),u=n(298944),c=n(955104),h=n(53489),d=n(999433),p=n(602267),m=n(387464),f=n(687464),v=n(251088),g=n(389462),y=n(736196),x=n(65281),P=n(616246),w=n(26085),b=n(780160),S=n(244089),A=n(641041),T=n(893138),E=n(277210),C=n(78777);const V=["","X","Y","Z"],M={visibility:"hidden"},k=1e3;let D=0;const j={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0};function R({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:f,resetTransform:w}){return class{constructor(t={},n=(null==e?void 0:e())){this.id=D++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,j.totalNodes=j.resolvedTargetDeltas=j.recalculatedProjection=0,this.nodes.forEach(F),this.nodes.forEach($),this.nodes.forEach(H),this.nodes.forEach(O),(0,b.g)(j)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=t,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let e=0;e<this.path.length;e++)this.path[e].shouldResetTransform=!0;this.root===this&&(this.nodes=new g.Y)}addEventListener(t,e){return this.eventHandlers.has(t)||this.eventHandlers.set(t,new s.v),this.eventHandlers.get(t).add(e)}notifyListeners(t,...e){const n=this.eventHandlers.get(t);n&&n.notify(...e)}hasListeners(t){return this.eventHandlers.has(t)}mount(e,n=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=(0,S.x)(e),this.instance=e;const{layoutId:s,layout:i,visualElement:o}=this.options;if(o&&!o.current&&o.mount(e),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),n&&(i||s)&&(this.isLayoutDirty=!0),t){let n;const s=()=>this.root.updateBlockedByResize=!1;t(e,(()=>{this.root.updateBlockedByResize=!0,n&&n(),n=(0,P.c)(s,250),x.w.hasAnimatedSinceResize&&(x.w.hasAnimatedSinceResize=!1,this.nodes.forEach(W))}))}s&&this.root.registerSharedNode(s,this),!1!==this.options.animate&&o&&(s||i)&&this.addEventListener("didUpdate",(({delta:t,hasLayoutChanged:e,hasRelativeTargetChanged:n,layout:s})=>{if(this.isTreeAnimationBlocked())return this.target=void 0,void(this.relativeTarget=void 0);const i=this.options.transition||o.getDefaultTransition()||K,{onLayoutAnimationStart:r,onLayoutAnimationComplete:a}=o.getProps(),l=!this.targetLayout||!(0,h.mG)(this.targetLayout,s)||n,u=!e&&n;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||u||e&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(t,u);const e={...(0,c.r)(i,"layout"),onPlay:r,onComplete:a};(o.shouldReduceMotion||this.options.layoutRoot)&&(e.delay=0,e.type=!1),this.startAnimation(e)}else e||W(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=s}))}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,(0,E.WG)(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(N),this.animationId++)}getTransformTemplate(){const{visualElement:t}=this.options;return t&&t.getProps().transformTemplate}willUpdate(t=!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 i=0;i<this.path.length;i++){const t=this.path[i];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 s=this.getTransformTemplate();this.prevTransformTemplateValue=s?s(this.latestValues,""):void 0,this.updateSnapshot(),t&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked())return this.unblockUpdate(),this.clearAllSnapshots(),void this.nodes.forEach(U);this.isUpdating||this.nodes.forEach(X),this.isUpdating=!1,this.nodes.forEach(G),this.nodes.forEach(B),this.nodes.forEach(L),this.clearAllSnapshots();const t=performance.now();E.uv.delta=(0,T.q)(0,1e3/60,t-E.uv.timestamp),E.uv.timestamp=t,E.uv.isProcessing=!0,E.Ci.update.process(E.uv),E.Ci.preRender.process(E.uv),E.Ci.render.process(E.uv),E.uv.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,queueMicrotask((()=>this.update())))}clearAllSnapshots(){this.nodes.forEach(I),this.sharedNodes.forEach(Y)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,E.Gt.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){E.Gt.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=(0,u.ge)(),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(t="measure"){let 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:f(this.instance),offset:n(this.instance)})}resetTransform(){if(!w)return;const t=this.isLayoutDirty||this.shouldResetTransform,e=this.projectionDelta&&!(0,h.XY)(this.projectionDelta),n=this.getTransformTemplate(),s=n?n(this.latestValues,""):void 0,i=s!==this.prevTransformTemplateValue;t&&(e||(0,v.HD)(this.latestValues)||i)&&(w(this.instance,s),this.shouldResetTransform=!1,this.scheduleRender())}measure(t=!0){const e=this.measurePageBox();let n=this.removeElementScroll(e);var s;return t&&(n=this.removeTransform(n)),_((s=n).x),_(s.y),{animationId:this.root.animationId,measuredBox:e,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:t}=this.options;if(!t)return(0,u.ge)();const e=t.measureViewportBox(),{scroll:n}=this.root;return n&&((0,r.Ql)(e.x,n.offset.x),(0,r.Ql)(e.y,n.offset.y)),e}removeElementScroll(t){const e=(0,u.ge)();(0,o.H)(e,t);for(let n=0;n<this.path.length;n++){const s=this.path[n],{scroll:i,options:a}=s;if(s!==this.root&&i&&a.layoutScroll){if(i.isRoot){(0,o.H)(e,t);const{scroll:n}=this.root;n&&((0,r.Ql)(e.x,-n.offset.x),(0,r.Ql)(e.y,-n.offset.y))}(0,r.Ql)(e.x,i.offset.x),(0,r.Ql)(e.y,i.offset.y)}}return e}applyTransform(t,e=!1){const n=(0,u.ge)();(0,o.H)(n,t);for(let s=0;s<this.path.length;s++){const t=this.path[s];!e&&t.options.layoutScroll&&t.scroll&&t!==t.root&&(0,r.Ww)(n,{x:-t.scroll.offset.x,y:-t.scroll.offset.y}),(0,v.HD)(t.latestValues)&&(0,r.Ww)(n,t.latestValues)}return(0,v.HD)(this.latestValues)&&(0,r.Ww)(n,this.latestValues),n}removeTransform(t){const e=(0,u.ge)();(0,o.H)(e,t);for(let n=0;n<this.path.length;n++){const t=this.path[n];if(!t.instance)continue;if(!(0,v.HD)(t.latestValues))continue;(0,v.vk)(t.latestValues)&&t.updateSnapshot();const s=(0,u.ge)(),i=t.measurePageBox();(0,o.H)(s,i),(0,l.px)(e,t.latestValues,t.snapshot?t.snapshot.layoutBox:void 0,s)}return(0,v.HD)(this.latestValues)&&(0,l.px)(e,this.latestValues),e}setTargetDelta(t){this.targetDelta=t,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(t){this.options={...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!==E.uv.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(t=!1){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 s=Boolean(this.resumingFrom)||this!==n;if(!(t||s&&this.isSharedProjectionDirty||this.isProjectionDirty||(null===(e=this.parent)||void 0===e?void 0:e.isProjectionDirty)||this.attemptToResolveRelativeTarget))return;const{layout:i,layoutId:l}=this.options;if(this.layout&&(i||l)){if(this.resolvedRelativeTargetAt=E.uv.timestamp,!this.targetDelta&&!this.relativeTarget){const t=this.getClosestProjectingParent();t&&t.layout&&1!==this.animationProgress?(this.relativeParent=t,this.forceRelativeParentToResolveTarget(),this.relativeTarget=(0,u.ge)(),this.relativeTargetOrigin=(0,u.ge)(),(0,a.jA)(this.relativeTargetOrigin,this.layout.layoutBox,t.layout.layoutBox),(0,o.H)(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(this.relativeTarget||this.targetDelta){if(this.target||(this.target=(0,u.ge)(),this.targetWithTransforms=(0,u.ge)()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),(0,a.N)(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.layoutBox):(0,o.H)(this.target,this.layout.layoutBox),(0,r.o4)(this.target,this.targetDelta)):(0,o.H)(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=(0,u.ge)(),this.relativeTargetOrigin=(0,u.ge)(),(0,a.jA)(this.relativeTargetOrigin,this.target,t.target),(0,o.H)(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}j.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(this.parent&&!(0,v.vk)(this.parent.latestValues)&&!(0,v.vF)(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 s=!0;if((this.isProjectionDirty||(null===(t=this.parent)||void 0===t?void 0:t.isProjectionDirty))&&(s=!1),n&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(s=!1),this.resolvedRelativeTargetAt===E.uv.timestamp&&(s=!1),s)return;const{layout:i,layoutId:l}=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||!i&&!l)return;(0,o.H)(this.layoutCorrected,this.layout.layoutBox);const c=this.treeScale.x,h=this.treeScale.y;(0,r.OU)(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:d}=e;if(!d)return void(this.projectionTransform&&(this.projectionDelta=(0,u.xU)(),this.projectionTransform="none",this.scheduleRender()));this.projectionDelta||(this.projectionDelta=(0,u.xU)(),this.projectionDeltaWithTransform=(0,u.xU)());const p=this.projectionTransform;(0,a.vb)(this.projectionDelta,this.layoutCorrected,d,this.latestValues),this.projectionTransform=(0,m.I)(this.projectionDelta,this.treeScale),this.projectionTransform===p&&this.treeScale.x===c&&this.treeScale.y===h||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",d)),j.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(t=!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,e=!1){const n=this.snapshot,s=n?n.latestValues:{},r={...this.latestValues},l=(0,u.xU)();this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!e;const c=(0,u.ge)(),d=(n?n.source:void 0)!==(this.layout?this.layout.source:void 0),p=this.getStack(),m=!p||p.members.length<=1,f=Boolean(d&&!m&&!0===this.options.crossfade&&!this.path.some(Q));let v;this.animationProgress=0,this.mixTargetDelta=e=>{const n=e/1e3;var p,g,y,x;z(l.x,t.x,n),z(l.y,t.y,n),this.setTargetDelta(l),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&((0,a.jA)(c,this.layout.layoutBox,this.relativeParent.layout.layoutBox),p=this.relativeTarget,g=this.relativeTargetOrigin,y=c,x=n,q(p.x,g.x,y.x,x),q(p.y,g.y,y.y,x),v&&(0,h.zo)(this.relativeTarget,v)&&(this.isProjectionDirty=!1),v||(v=(0,u.ge)()),(0,o.H)(v,this.relativeTarget)),d&&(this.animationValues=r,(0,i.v)(r,s,this.latestValues,n,f,m)),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&&((0,E.WG)(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=E.Gt.update((()=>{x.w.hasAnimatedSinceResize=!0,this.currentAnimation=(0,A.z)(0,k,{...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(k),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const t=this.getLead();let{targetWithTransforms:e,target:n,layout:s,latestValues:i}=t;if(e&&n&&s){if(this!==t&&this.layout&&s&&tt(this.options.animationType,this.layout.layoutBox,s.layoutBox)){n=this.target||(0,u.ge)();const e=(0,a.CQ)(this.layout.layoutBox.x);n.x.min=t.target.x.min,n.x.max=n.x.min+e;const s=(0,a.CQ)(this.layout.layoutBox.y);n.y.min=t.target.y.min,n.y.max=n.y.min+s}(0,o.H)(e,n),(0,r.Ww)(e,i),(0,a.vb)(this.projectionDeltaWithTransform,this.layoutCorrected,e,i)}}registerSharedNode(t,e){this.sharedNodes.has(t)||this.sharedNodes.set(t,new d.P),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({needsReset:t,transition:e,preserveFollowOpacity:n}={}){const s=this.getStack();s&&s.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 s={};for(let i=0;i<V.length;i++){const e="rotate"+V[i];n[e]&&(s[e]=n[e],t.setStaticValue(e,0))}t.render();for(const i in s)t.setStaticValue(i,s[i]);t.scheduleRender()}getProjectionStyles(t){var e,n;if(!this.instance||this.isSVG)return;if(!this.isVisible)return M;const s={visibility:""},i=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,s.opacity="",s.pointerEvents=(0,y.u)(null==t?void 0:t.pointerEvents)||"",s.transform=i?i(this.latestValues,""):"none",s;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=(0,y.u)(null==t?void 0:t.pointerEvents)||""),this.hasProjected&&!(0,v.HD)(this.latestValues)&&(e.transform=i?i({},""):"none",this.hasProjected=!1),e}const r=o.animationValues||o.latestValues;this.applyTransformsToTarget(),s.transform=(0,m.I)(this.projectionDeltaWithTransform,this.treeScale,r),i&&(s.transform=i(r,s.transform));const{x:a,y:l}=this.projectionDelta;s.transformOrigin=`${100*a.origin}% ${100*l.origin}% 0`,o.animationValues?s.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:s.opacity=o===this?void 0!==r.opacity?r.opacity:"":void 0!==r.opacityExit?r.opacityExit:0;for(const u in p.H){if(void 0===r[u])continue;const{correct:t,applyTo:e}=p.H[u],n="none"===s.transform?r[u]:t(r[u],o);if(e){const t=e.length;for(let i=0;i<t;i++)s[e[i]]=n}else s[u]=n}return this.options.layoutId&&(s.pointerEvents=o===this?(0,y.u)(null==t?void 0:t.pointerEvents)||"":"none"),s}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(U),this.root.sharedNodes.clear()}}}function B(t){t.updateLayout()}function L(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:s}=t.layout,{animationType:i}=t.options,o=n.source!==t.layout.source;"size"===i?(0,f.X)((t=>{const s=o?n.measuredBox[t]:n.layoutBox[t],i=(0,a.CQ)(s);s.min=e[t].min,s.max=s.min+i})):tt(i,n.layoutBox,e)&&(0,f.X)((s=>{const i=o?n.measuredBox[s]:n.layoutBox[s],r=(0,a.CQ)(e[s]);i.max=i.min+r,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[s].max=t.relativeTarget[s].min+r)}));const r=(0,u.xU)();(0,a.vb)(r,e,n.layoutBox);const l=(0,u.xU)();o?(0,a.vb)(l,t.applyTransform(s,!0),n.measuredBox):(0,a.vb)(l,e,n.layoutBox);const c=!(0,h.XY)(r);let d=!1;if(!t.resumeFrom){const s=t.getClosestProjectingParent();if(s&&!s.resumeFrom){const{snapshot:i,layout:o}=s;if(i&&o){const r=(0,u.ge)();(0,a.jA)(r,n.layoutBox,i.layoutBox);const l=(0,u.ge)();(0,a.jA)(l,e,o.layoutBox),(0,h.mG)(r,l)||(d=!0),s.options.layoutRoot&&(t.relativeTarget=l,t.relativeTargetOrigin=r,t.relativeParent=s)}}}t.notifyListeners("didUpdate",{layout:e,snapshot:n,delta:l,layoutDelta:r,hasLayoutChanged:c,hasRelativeTargetChanged:d})}else if(t.isLead()){const{onExitComplete:e}=t.options;e&&e()}t.options.transition=void 0}function F(t){j.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 O(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function I(t){t.clearSnapshot()}function U(t){t.clearMeasurements()}function X(t){t.isLayoutDirty=!1}function G(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function W(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function $(t){t.resolveTargetDelta()}function H(t){t.calcProjection()}function N(t){t.resetRotation()}function Y(t){t.removeLeadSnapshot()}function z(t,e,n){t.translate=(0,w.j)(e.translate,0,n),t.scale=(0,w.j)(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function q(t,e,n,s){t.min=(0,w.j)(e.min,n.min,s),t.max=(0,w.j)(e.max,n.max,s)}function Q(t){return t.animationValues&&void 0!==t.animationValues.opacityExit}const K={duration:.45,ease:[.4,0,.1,1]},Z=t=>"undefined"!=typeof navigator&&navigator.userAgent.toLowerCase().includes(t),J=Z("applewebkit/")&&!Z("chrome/")?Math.round:C.l;function _(t){t.min=J(t.min),t.max=J(t.max)}function tt(t,e,n){return"position"===t||"preserve-aspect"===t&&!(0,a.HQ)((0,h.cH)(e),(0,h.cH)(n),.2)}},186775:(t,e,n)=>{n(314846),n(469655)},65281:(t,e,n)=>{n.d(e,{w:()=>s});const s={hasAnimatedSinceResize:!0,hasEverUpdated:!1}},999433:(t,e,n)=>{n.d(e,{P:()=>i}),n(314846),n(469655);var s=n(890604);class i{constructor(){this.members=[]}add(t){(0,s.Kq)(this.members,t),t.scheduleRender()}remove(t){if((0,s.Ai)(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 s=e;s>=0;s--){const t=this.members[s];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:s}=t.options;!1===s&&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)}}},694608:(t,e,n)=>{n.d(e,{P:()=>o});var s=n(234223);function i(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const o={correct:(t,e)=>{if(!e.target)return t;if("string"==typeof t){if(!s.px.test(t))return t;t=parseFloat(t)}return`${i(t,e.target.x)}% ${i(t,e.target.y)}%`}}},828667:(t,e,n)=>{n.d(e,{_:()=>o});var s=n(26085),i=n(73748);const o={correct:(t,{treeScale:e,projectionDelta:n})=>{const o=t,r=i.f.parse(t);if(r.length>5)return o;const a=i.f.createTransformer(t),l="number"!=typeof r[0]?1:0,u=n.x.scale*e.x,c=n.y.scale*e.y;r[0+l]/=u,r[1+l]/=c;const h=(0,s.j)(u,c,.5);return"number"==typeof r[2+l]&&(r[2+l]/=h),"number"==typeof r[3+l]&&(r[3+l]/=h),a(r)}}},602267:(t,e,n)=>{n.d(e,{$:()=>i,H:()=>s});const s={};function i(t){Object.assign(s,t)}},387464:(t,e,n)=>{function s(t,e,n){let s="";const i=t.x.translate/e.x,o=t.y.translate/e.y;if((i||o)&&(s=`translate3d(${i}px, ${o}px, 0) `),1===e.x&&1===e.y||(s+=`scale(${1/e.x}, ${1/e.y}) `),n){const{rotate:t,rotateX:e,rotateY:i}=n;t&&(s+=`rotate(${t}deg) `),e&&(s+=`rotateX(${e}deg) `),i&&(s+=`rotateY(${i}deg) `)}const r=t.x.scale*e.x,a=t.y.scale*e.y;return 1===r&&1===a||(s+=`scale(${r}, ${a})`),s||"none"}n.d(e,{I:()=>s})},557013:(t,e,n)=>{n(157986)},674060:(t,e,n)=>{n(63696),n(157986)},687464:(t,e,n)=>{function s(t){return[t("x"),t("y")]}n.d(e,{X:()=>s})},251088:(t,e,n)=>{function s(t){return void 0===t||1===t}function i({scale:t,scaleX:e,scaleY:n}){return!s(t)||!s(e)||!s(n)}function o(t){return i(t)||r(t)||t.z||t.rotate||t.rotateX||t.rotateY}function r(t){return a(t.x)||a(t.y)}function a(t){return t&&"0%"!==t}n.d(e,{HD:()=>o,vF:()=>r,vk:()=>i})},410347:(t,e,n)=>{n.d(e,{L:()=>r,m:()=>o});var s=n(912158),i=n(370155);function o(t,e){return(0,s.FY)((0,s.bS)(t.getBoundingClientRect(),e))}function r(t,e,n){const s=o(t,n),{scroll:r}=e;return r&&((0,i.Ql)(s.x,r.offset.x),(0,i.Ql)(s.y,r.offset.y)),s}},373518:(t,e,n)=>{n.d(e,{B:()=>A}),n(314846),n(469655),n(841164);var s=n(298944),i=n(105675),o=n(989461),r=n(27250),a=n(902840),l=n(239667),u=n(146547),c=n(573970),h=n(353994),d=n(884135),p=n(563305),m=n(931545),f=n(775691),v=(n(721657),n(834430)),g=n(422918),y=n(550529),x=n(277210);const P=Object.keys(v.B),w=P.length,b=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],S=g._.length;class A{constructor({parent:t,props:e,presenceContext:n,reducedMotionConfig:s,visualState:i},o={}){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=()=>x.Gt.render(this.render,!1,!0);const{latestValues:r,renderState:a}=i;this.latestValues=r,this.baseTarget={...r},this.initialValues=e.initial?{...r}:{},this.renderState=a,this.parent=t,this.props=e,this.presenceContext=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=s,this.options=o,this.isControllingVariants=(0,d.e)(e),this.isVariantNode=(0,d.O)(e),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(t&&t.current);const{willChange:l,...h}=this.scrapeMotionValuesFromProps(e,{});for(const d in h){const t=h[d];void 0!==r[d]&&(0,c.S)(t)&&(t.set(r[d],!1),(0,u.k)(l)&&l.add(d))}}scrapeMotionValuesFromProps(t,e){return{}}mount(t){this.current=t,y.C.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))),r.r.current||(0,o.U)(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||r.O.current),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){y.C.delete(this.current),this.projection&&this.projection.unmount(),(0,x.WG)(this.notifyUpdate),(0,x.WG)(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=h.f.has(t),s=e.on("change",(e=>{this.latestValues[t]=e,this.props.onUpdate&&x.Gt.update(this.notifyUpdate,!1,!0),n&&this.projection&&(this.projection.isTransformDirty=!0)})),i=e.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(t,(()=>{s(),i()}))}sortNodePosition(t){return this.current&&this.sortInstanceNodePosition&&this.type===t.type?this.sortInstanceNodePosition(this.current,t.current):0}loadFeatures({children:t,...e},n,s,o){let r,a;for(let i=0;i<w;i++){const t=P[i],{isEnabled:n,Feature:s,ProjectionNode:o,MeasureLayout:l}=v.B[t];o&&(r=o),n(e)&&(!this.features[t]&&s&&(this.features[t]=new s(this)),l&&(a=l))}if(("html"===this.type||"svg"===this.type)&&!this.projection&&r){this.projection=new r(this.latestValues,this.parent&&this.parent.projection);const{layoutId:t,layout:n,drag:s,dragConstraints:a,layoutScroll:l,layoutRoot:u}=e;this.projection.setOptions({layoutId:t,layout:n,alwaysMeasureLayout:Boolean(s)||a&&(0,i.X)(a),visualElement:this,scheduleRender:()=>this.scheduleRender(),animationType:"string"==typeof n?n:"both",initialPromotionConfig:o,layoutScroll:l,layoutRoot:u})}return a}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):(0,s.ge)()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,e){this.latestValues[t]=e}makeTargetAnimatable(t,e=!0){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<b.length;n++){const e=b[n];this.propEventSubscriptions[e]&&(this.propEventSubscriptions[e](),delete this.propEventSubscriptions[e]);const s=t["on"+e];s&&(this.propEventSubscriptions[e]=this.on(e,s))}this.prevMotionValues=(0,m.U)(this,this.scrapeMotionValuesFromProps(t,this.prevProps),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}getVariantContext(t=!1){if(t)return this.parent?this.parent.getVariantContext():void 0;if(!this.isControllingVariants){const t=this.parent&&this.parent.getVariantContext()||{};return void 0!==this.props.initial&&(t.initial=this.props.initial),t}const e={};for(let n=0;n<S;n++){const t=g._[n],s=this.props[t];((0,p.w)(s)||!1===s)&&(e[t]=s)}return e}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=(0,l.OQ)(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,s="string"==typeof n||"object"==typeof n?null===(e=(0,f.a)(this.props,n))||void 0===e?void 0:e[t]:void 0;if(n&&void 0!==s)return s;const i=this.getBaseTargetFromProps(this.props,t);return void 0===i||(0,c.S)(i)?void 0!==this.initialValues[t]&&void 0===s?void 0:this.baseTarget[t]:i}on(t,e){return this.events[t]||(this.events[t]=new a.v),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}}},294901:(t,e,n)=>{n.d(e,{b:()=>r});var s=n(482200),i=n(283043),o=n(373518);class r extends o.B{sortInstanceNodePosition(t,e){return 2&t.compareDocumentPosition(e)?1:-1}getBaseTargetFromProps(t,e){return t.style?t.style[e]:void 0}removeValueFromRenderState(t,{vars:e,style:n}){delete e[t],delete n[t]}makeTargetAnimatableFromInstance({transition:t,transitionEnd:e,...n},{transformValues:o},r){let a=(0,s.$z)(n,t||{},this);if(o&&(e&&(e=o(e)),n&&(n=o(n)),a&&(a=o(a))),r){(0,s.TM)(this,n,a);const t=(0,i.P)(this,n,a,e);e=t.transitionEnd,n=t.target}return{transition:t,transitionEnd:e,...n}}}},740601:(t,e,n)=>{n.d(e,{J:()=>r});var s=n(176617),i=n(541109),o=n(514844);const r=(t,e)=>(0,o.Q)(t)?new i.l(e,{enableHardwareAcceleration:!1}):new s.M(e,{enableHardwareAcceleration:!0})},827073:(t,e,n)=>{n.d(e,{l:()=>o});var s=n(788477),i=n(302160);const o={renderer:n(740601).J,...s.W,...i.n}},475861:(t,e,n)=>{var s=n(863986),i=n(561522);n(827073).l,s.$,i.Z},959549:(t,e,n)=>{var s=n(557712),i=n(346306);(0,s.H)(i.P)},557712:(t,e,n)=>{n.d(e,{H:()=>i});var s=n(285424);function i(t){function e(e,n={}){return(0,s.G)(t(e,n))}if("undefined"==typeof Proxy)return e;const n=new Map;return new Proxy(e,{get:(t,s)=>(n.has(s)||n.set(s,e(s)),n.get(s))})}},142571:(t,e,n)=>{n.d(e,{P:()=>h}),n(285424);var s=n(557712),i=n(346306),o=n(302160),r=n(788477),a=n(863986),l=n(740601),u=n(561522);const c={...r.W,...o.n,...a.$,...u.Z},h=(0,s.H)(((t,e)=>(0,i.P)(t,e,c,l.J)))},5457:(t,e,n)=>{n(314846),n(469655),n(801822),new WeakMap},377791:(t,e,n)=>{n(314846),n(469655),new Set},751308:(t,e,n)=>{n(5457),n(377791)},847891:(t,e,n)=>{n(12582),n(879783),n(8065),new Map},454669:(t,e,n)=>{n(799020),n(540255)},879783:(t,e,n)=>{n.d(e,{y:()=>i});var s=n(277210);function i(t,e){let n;const i=()=>{const{currentTime:s}=e,i=(null===s?0:s.value)/100;n!==i&&t(i),n=i};return s.Gt.update(i,!0),()=>(0,s.WG)(i)}},808537:(t,e,n)=>{},792938:(t,e,n)=>{n(309305),n(587474),n(336671),n(323662),n(766869)},309305:(t,e,n)=>{},336671:(t,e,n)=>{n(76281),n(808537)},587474:(t,e,n)=>{},62231:(t,e,n)=>{n(721657),n(454669),n(792938)},8065:(t,e,n)=>{n.d(e,{J:()=>s});const s=(0,n(696407).p)((()=>void 0!==window.ScrollTimeline))},12582:(t,e,n)=>{n(751308),n(454669),n(62231),n(277210),new WeakMap,new WeakMap,new WeakMap},86595:(t,e,n)=>{n.d(e,{o:()=>u});var s=n(63696),i=n(320012),o=n(805796),r=n(514844),a=n(30233),l=n(573970);function u(t=!1){return(e,n,u,{latestValues:c},h)=>{const d=((0,r.Q)(e)?a.u:i.b)(n,c,h,e),p={...(0,o.J)(n,"string"==typeof e,t),...d,ref:u},{children:m}=n,f=(0,s.useMemo)((()=>(0,l.S)(m)?m.get():m),[m]);return(0,s.createElement)(e,{...p,children:f})}}},493388:(t,e,n)=>{n.d(e,{I:()=>s});const s=t=>t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()},346306:(t,e,n)=>{n.d(e,{P:()=>a});var s=n(514844),i=n(86595),o=n(935856),r=n(556029);function a(t,{forwardMotionProps:e=!1},n,a){return{...(0,s.Q)(t)?o.X:r.S,preloadedFeatures:n,useRender:(0,i.o)(e),createVisualElement:a,Component:t}}},600285:(t,e,n)=>{n.d(e,{d:()=>u}),n(314846),n(469655);var s=n(841164),i=n(907930),o=n(511078);const r=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,a=4;function l(t,e,n=1){(0,s.V)(n<=a,`Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`);const[u,c]=function(t){const e=r.exec(t);if(!e)return[,];const[,n,s]=e;return[n,s]}(t);if(!u)return;const h=window.getComputedStyle(e).getPropertyValue(u);if(h){const t=h.trim();return(0,i.i)(t)?parseFloat(t):t}return(0,o.pG)(c)?l(c,e,n+1):c}function u(t,{...e},n){const s=t.current;if(!(s instanceof Element))return{target:e,transitionEnd:n};n&&(n={...n}),t.values.forEach((t=>{const e=t.get();if(!(0,o.pG)(e))return;const n=l(e,s);n&&t.set(n)}));for(const i in e){const t=e[i];if(!(0,o.pG)(t))continue;const r=l(t,s);r&&(e[i]=r,n||(n={}),void 0===n[i]&&(n[i]=t))}return{target:e,transitionEnd:n}}},805796:(t,e,n)=>{n.d(e,{J:()=>r});var s=n(116954);let i=t=>!(0,s.S)(t);try{(o=require("@emotion/is-prop-valid").default)&&(i=t=>t.startsWith("on")?!(0,s.S)(t):o(t))}catch(a){}var o;function r(t,e,n){const o={};for(const r in t)"values"===r&&"object"==typeof t.values||(i(r)||!0===n&&(0,s.S)(r)||!e&&!(0,s.S)(r)||t.draggable&&r.startsWith("onDrag"))&&(o[r]=t[r]);return o}},511078:(t,e,n)=>{n.d(e,{j4:()=>i,pG:()=>o,z2:()=>r});const s=t=>e=>"string"==typeof e&&e.startsWith(t),i=s("--"),o=s("var(--"),r=/var\s*\(\s*--[\w-]+(\s*,\s*(?:(?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)+)?\s*\)/g},514844:(t,e,n)=>{n.d(e,{Q:()=>i}),n(76281);var s=n(505324);function i(t){return"string"==typeof t&&!t.includes("-")&&!!(s.J.indexOf(t)>-1||/[A-Z]/.test(t))}},244089:(t,e,n)=>{function s(t){return t instanceof SVGElement&&"svg"!==t.tagName}n.d(e,{x:()=>s})},283043:(t,e,n)=>{n.d(e,{P:()=>o});var s=n(600285),i=n(254098);const o=(t,e,n,o)=>{const r=(0,s.d)(t,e,o);return e=r.target,o=r.transitionEnd,(0,i.t)(t,e,n,o)}},801822:(t,e,n)=>{n.d(e,{K:()=>i});var s=n(841164);function i(t,e,n){var i;if("string"==typeof t){let o=document;e&&((0,s.V)(Boolean(e.current),"Scope provided, but no element detected."),o=e.current),n?(null!==(i=n[t])&&void 0!==i||(n[t]=o.querySelectorAll(t)),t=n[t]):t=o.querySelectorAll(t)}else t instanceof Element&&(t=[t]);return Array.from(t||[])}},254098:(t,e,n)=>{n.d(e,{t:()=>P}),n(314846),n(327458),n(469655),n(194364),n(275568);var s=n(343690),i=n(841164),o=n(353994),r=n(809372),a=n(701134),l=n(900478),u=n(234223);const c=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),h=t=>c.has(t),d=t=>Object.keys(t).some(h),p=t=>t===l.ai||t===u.px,m=(t,e)=>parseFloat(t.split(", ")[e]),f=(t,e)=>(n,{transform:s})=>{if("none"===s||!s)return 0;const i=s.match(/^matrix3d\((.+)\)$/);if(i)return m(i[1],e);{const e=s.match(/^matrix\((.+)\)$/);return e?m(e[1],t):0}},v=new Set(["x","y","z"]),g=o.U.filter((t=>!v.has(t))),y={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:f(4,13),y:f(5,14)};y.translateX=y.x,y.translateY=y.y;const x=(t,e,n={},o={})=>{e={...e},o={...o};const l=Object.keys(e).filter(h);let c=[],d=!1;const m=[];if(l.forEach((a=>{const l=t.getValue(a);if(!t.hasValue(a))return;let h=n[a],f=(0,r.n)(h);const v=e[a];let y;if((0,s.p)(v)){const t=v.length,e=null===v[0]?1:0;h=v[e],f=(0,r.n)(h);for(let n=e;n<t&&null!==v[n];n++)y?(0,i.V)((0,r.n)(v[n])===y,"All keyframes must be of the same type"):(y=(0,r.n)(v[n]),(0,i.V)(y===f||p(f)&&p(y),"Keyframes must be of the same dimension as the current value"))}else y=(0,r.n)(v);if(f!==y)if(p(f)&&p(y)){const t=l.get();"string"==typeof t&&l.set(parseFloat(t)),"string"==typeof v?e[a]=parseFloat(v):Array.isArray(v)&&y===u.px&&(e[a]=v.map(parseFloat))}else(null==f?void 0:f.transform)&&(null==y?void 0:y.transform)&&(0===h||0===v)?0===h?l.set(y.transform(h)):e[a]=f.transform(v):(d||(c=function(t){const e=[];return g.forEach((n=>{const s=t.getValue(n);void 0!==s&&(e.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))})),e.length&&t.render(),e}(t),d=!0),m.push(a),o[a]=void 0!==o[a]?o[a]:e[a],l.jump(v))})),m.length){const n=m.indexOf("height")>=0?window.pageYOffset:null,s=((t,e,n)=>{const s=e.measureViewportBox(),i=e.current,o=getComputedStyle(i),{display:r}=o,a={};"none"===r&&e.setStaticValue("display",t.display||"block"),n.forEach((t=>{a[t]=y[t](s,o)})),e.render();const l=e.measureViewportBox();return n.forEach((n=>{const s=e.getValue(n);s&&s.jump(a[n]),t[n]=y[n](l,o)})),t})(e,t,m);return c.length&&c.forEach((([e,n])=>{t.getValue(e).set(n)})),t.render(),a.B&&null!==n&&window.scrollTo({top:n}),{target:s,transitionEnd:o}}return{target:e,transitionEnd:o}};function P(t,e,n,s){return d(e)?x(t,e,n,s):{target:e,transitionEnd:s}}},392602:(t,e,n)=>{n.d(e,{J:()=>r});var s=n(73748),i=n(358986),o=n(622157);function r(t,e){let n=(0,o.D)(t);return n!==i.p&&(n=s.f),n.getAnimatableNone?n.getAnimatableNone(e):void 0}},622157:(t,e,n)=>{n.d(e,{D:()=>r});var s=n(449705),i=n(358986);const o={...n(823484).W,color:s.y,backgroundColor:s.y,outlineColor:s.y,fill:s.y,stroke:s.y,borderColor:s.y,borderTopColor:s.y,borderRightColor:s.y,borderBottomColor:s.y,borderLeftColor:s.y,filter:i.p,WebkitFilter:i.p},r=t=>o[t]},809372:(t,e,n)=>{n.d(e,{T:()=>a,n:()=>l}),n(314846),n(6211);var s=n(900478),i=n(234223),o=n(683991),r=n(891837);const a=[s.ai,i.px,i.KN,i.uj,i.vw,i.vh,r.q],l=t=>a.find((0,o.w)(t))},429970:(t,e,n)=>{n.d(e,{t:()=>l}),n(314846),n(6211);var s=n(449705),i=n(73748),o=n(809372),r=n(683991);const a=[...o.T,s.y,i.f],l=t=>a.find((0,r.w)(t))},704423:(t,e,n)=>{n.d(e,{e:()=>s});const s=(t,e)=>e&&"number"==typeof t?e.transform(t):t},823484:(t,e,n)=>{n.d(e,{W:()=>r});var s=n(900478),i=n(234223),o=n(455187);const r={borderWidth:i.px,borderTopWidth:i.px,borderRightWidth:i.px,borderBottomWidth:i.px,borderLeftWidth:i.px,borderRadius:i.px,radius:i.px,borderTopLeftRadius:i.px,borderTopRightRadius:i.px,borderBottomRightRadius:i.px,borderBottomLeftRadius:i.px,width:i.px,maxWidth:i.px,height:i.px,maxHeight:i.px,size:i.px,top:i.px,right:i.px,bottom:i.px,left:i.px,padding:i.px,paddingTop:i.px,paddingRight:i.px,paddingBottom:i.px,paddingLeft:i.px,margin:i.px,marginTop:i.px,marginRight:i.px,marginBottom:i.px,marginLeft:i.px,rotate:i.uj,rotateX:i.uj,rotateY:i.uj,rotateZ:i.uj,scale:s.hs,scaleX:s.hs,scaleY:s.hs,scaleZ:s.hs,skew:i.uj,skewX:i.uj,skewY:i.uj,distance:i.px,translateX:i.px,translateY:i.px,translateZ:i.px,x:i.px,y:i.px,z:i.px,perspective:i.px,transformPerspective:i.px,opacity:s.X4,originX:i.gQ,originY:i.gQ,originZ:i.px,zIndex:o.W,fillOpacity:s.X4,strokeOpacity:s.X4,numOctaves:o.W}},683991:(t,e,n)=>{n.d(e,{w:()=>s});const s=t=>e=>e.test(t)},891837:(t,e,n)=>{n.d(e,{q:()=>s});const s={test:t=>"auto"===t,parse:t=>t}},455187:(t,e,n)=>{n.d(e,{W:()=>s});const s={...n(900478).ai,transform:Math.round}},438182:(t,e,n)=>{n(314846),n(469655),n(801822)},176617:(t,e,n)=>{n.d(e,{M:()=>d});var s=n(834109),i=n(511078),o=n(353994),r=n(962748),a=n(988838),l=n(622157),u=n(410347),c=n(294901),h=n(573970);class d extends c.b{constructor(){super(...arguments),this.type="html"}readValueFromInstance(t,e){if(o.f.has(e)){const t=(0,l.D)(e);return t&&t.default||0}{const s=(n=t,window.getComputedStyle(n)),o=((0,i.j4)(e)?s.getPropertyValue(e):s[e])||0;return"string"==typeof o?o.trim():o}var n}measureInstanceViewportBox(t,{transformPagePoint:e}){return(0,u.m)(t,e)}build(t,e,n,i){(0,s.O)(t,e,n,i.transformTemplate)}scrapeMotionValuesFromProps(t,e){return(0,r.x)(t,e)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;(0,h.S)(t)&&(this.childSubscription=t.on("change",(t=>{this.current&&(this.current.textContent=`${t}`)})))}renderInstance(t,e,n,s){(0,a.e)(t,e,n,s)}}},556029:(t,e,n)=>{n.d(e,{S:()=>r});var s=n(366084),i=n(962748),o=n(884999);const r={useVisualState:(0,s.T)({scrapeMotionValuesFromProps:i.x,createRenderState:o.d})}},320012:(t,e,n)=>{n.d(e,{b:()=>u,o:()=>l});var s=n(63696),i=n(822047),o=n(573970),r=n(834109),a=n(884999);function l(t,e,n){for(const s in e)(0,o.S)(e[s])||(0,i.z)(s,n)||(t[s]=e[s])}function u(t,e,n){const i={},o=function(t,e,n){const i={};return l(i,t.style||{},t),Object.assign(i,function({transformTemplate:t},e,n){return(0,s.useMemo)((()=>{const s=(0,a.d)();return(0,r.O)(s,e,{enableHardwareAcceleration:!n},t),Object.assign({},s.vars,s.style)}),[e])}(t,e,n)),t.transformValues?t.transformValues(i):i}(t,e,n);return t.drag&&!1!==t.dragListener&&(i.draggable=!1,o.userSelect=o.WebkitUserSelect=o.WebkitTouchCallout="none",o.touchAction=!0===t.drag?"none":"pan-"+("x"===t.drag?"y":"x")),void 0===t.tabIndex&&(t.onTap||t.onTapStart||t.whileTap)&&(i.tabIndex=0),i.style=o,i}},834109:(t,e,n)=>{n.d(e,{O:()=>l});var s=n(52565),i=n(511078),o=n(353994),r=n(704423),a=n(823484);function l(t,e,n,l){const{style:u,vars:c,transform:h,transformOrigin:d}=t;let p=!1,m=!1,f=!0;for(const s in e){const t=e[s];if((0,i.j4)(s)){c[s]=t;continue}const n=a.W[s],l=(0,r.e)(t,n);if(o.f.has(s)){if(p=!0,h[s]=l,!f)continue;t!==(n.default||0)&&(f=!1)}else s.startsWith("origin")?(m=!0,d[s]=l):u[s]=l}if(e.transform||(p||l?u.transform=(0,s.d)(t.transform,n,f,l):u.transform&&(u.transform="none")),m){const{originX:t="50%",originY:e="50%",originZ:n=0}=d;u.transformOrigin=`${t} ${e} ${n}`}}},52565:(t,e,n)=>{n.d(e,{d:()=>r});var s=n(353994);const i={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},o=s.U.length;function r(t,{enableHardwareAcceleration:e=!0,allowTransformNone:n=!0},r,a){let l="";for(let u=0;u<o;u++){const e=s.U[u];void 0!==t[e]&&(l+=`${i[e]||e}(${t[e]}) `)}return e&&!t.z&&(l+="translateZ(0)"),l=l.trim(),a?l=a(t,r?"":l):n&&r&&(l="none"),l}},884999:(t,e,n)=>{n.d(e,{d:()=>s});const s=()=>({style:{},transform:{},transformOrigin:{},vars:{}})},988838:(t,e,n)=>{function s(t,{style:e,vars:n},s,i){Object.assign(t.style,e,i&&i.getProjectionStyles(s));for(const o in n)t.style.setProperty(o,n[o])}n.d(e,{e:()=>s})},962748:(t,e,n)=>{n.d(e,{x:()=>o});var s=n(822047),i=n(573970);function o(t,e){const{style:n}=t,o={};for(const r in n)((0,i.S)(n[r])||e.style&&(0,i.S)(e.style[r])||(0,s.z)(r,t))&&(o[r]=n[r]);return o}},353994:(t,e,n)=>{n.d(e,{U:()=>s,f:()=>i});const s=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],i=new Set(s)},550529:(t,e,n)=>{n.d(e,{C:()=>s});const s=new WeakMap},541109:(t,e,n)=>{n.d(e,{l:()=>p});var s=n(906655),i=n(294901),o=n(955012),r=n(493388),a=n(497505),l=n(353994),u=n(885305),c=n(622157),h=n(298944),d=n(130339);class p extends i.b{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){if(l.f.has(e)){const t=(0,c.D)(e);return t&&t.default||0}return e=a.e.has(e)?e:(0,r.I)(e),t.getAttribute(e)}measureInstanceViewportBox(){return(0,h.ge)()}scrapeMotionValuesFromProps(t,e){return(0,s.x)(t,e)}build(t,e,n,s){(0,o.B)(t,e,n,this.isSVGTag,s.transformTemplate)}renderInstance(t,e,n,s){(0,u.d)(t,e,n,s)}mount(t){this.isSVGTag=(0,d.n)(t.tagName),super.mount(t)}}},935856:(t,e,n)=>{n.d(e,{X:()=>c});var s=n(885305),i=n(906655),o=n(366084),r=n(361590),a=n(955012),l=n(130339),u=n(277210);const c={useVisualState:(0,o.T)({scrapeMotionValuesFromProps:i.x,createRenderState:r.s,onMount:(t,e,{renderState:n,latestValues:i})=>{u.Gt.read((()=>{try{n.dimensions="function"==typeof e.getBBox?e.getBBox():e.getBoundingClientRect()}catch(t){n.dimensions={x:0,y:0,width:0,height:0}}})),u.Gt.render((()=>{(0,a.B)(n,i,{enableHardwareAcceleration:!1},(0,l.n)(e.tagName),t.transformTemplate),(0,s.d)(e,n)}))}})}},505324:(t,e,n)=>{n.d(e,{J:()=>s});const s=["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"]},30233:(t,e,n)=>{n.d(e,{u:()=>l});var s=n(63696),i=n(320012),o=n(955012),r=n(361590),a=n(130339);function l(t,e,n,l){const u=(0,s.useMemo)((()=>{const n=(0,r.s)();return(0,o.B)(n,e,{enableHardwareAcceleration:!1},(0,a.n)(l),t.transformTemplate),{...n.attrs,style:{...n.style}}}),[e]);if(t.style){const e={};(0,i.o)(e,t.style,t),u.style={...e,...u.style}}return u}},955012:(t,e,n)=>{n.d(e,{B:()=>r});var s=n(834109),i=n(871770),o=n(471516);function r(t,{attrX:e,attrY:n,attrScale:r,originX:a,originY:l,pathLength:u,pathSpacing:c=1,pathOffset:h=0,...d},p,m,f){if((0,s.O)(t,d,p,f),m)return void(t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox));t.attrs=t.style,t.style={};const{attrs:v,style:g,dimensions:y}=t;v.transform&&(y&&(g.transform=v.transform),delete v.transform),y&&(void 0!==a||void 0!==l||g.transform)&&(g.transformOrigin=(0,i.w)(y,void 0!==a?a:.5,void 0!==l?l:.5)),void 0!==e&&(v.x=e),void 0!==n&&(v.y=n),void 0!==r&&(v.scale=r),void 0!==u&&(0,o.C)(v,u,c,h,!1)}},497505:(t,e,n)=>{n.d(e,{e:()=>s});const s=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"])},361590:(t,e,n)=>{n.d(e,{s:()=>i});var s=n(884999);const i=()=>({...(0,s.d)(),attrs:{}})},130339:(t,e,n)=>{n.d(e,{n:()=>s});const s=t=>"string"==typeof t&&"svg"===t.toLowerCase()},471516:(t,e,n)=>{n.d(e,{C:()=>r});var s=n(234223);const i={offset:"stroke-dashoffset",array:"stroke-dasharray"},o={offset:"strokeDashoffset",array:"strokeDasharray"};function r(t,e,n=1,r=0,a=!0){t.pathLength=1;const l=a?i:o;t[l.offset]=s.px.transform(-r);const u=s.px.transform(e),c=s.px.transform(n);t[l.array]=`${u} ${c}`}},885305:(t,e,n)=>{n.d(e,{d:()=>r});var s=n(493388),i=n(988838),o=n(497505);function r(t,e,n,r){(0,i.e)(t,e,void 0,r);for(const i in e.attrs)t.setAttribute(o.e.has(i)?i:(0,s.I)(i),e.attrs[i])}},906655:(t,e,n)=>{n.d(e,{x:()=>r});var s=n(573970),i=n(962748),o=n(353994);function r(t,e){const n=(0,i.x)(t,e);for(const i in t)((0,s.S)(t[i])||(0,s.S)(e[i]))&&(n[-1!==o.U.indexOf(i)?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i]=t[i]);return n}},871770:(t,e,n)=>{n.d(e,{w:()=>o});var s=n(234223);function i(t,e,n){return"string"==typeof t?t:s.px.transform(e+n*t)}function o(t,e,n){return`${i(e,t.x,t.width)} ${i(n,t.y,t.height)}`}},316558:(t,e,n)=>{n.d(e,{L:()=>d}),n(314846),n(469655),n(194364),n(190458);var s=n(892904),i=n(343690),o=n(223605),r=n(563305),a=n(683695),l=n(422918),u=n(104570);const c=[...l.U].reverse(),h=l.U.length;function d(t){let e=function(t){return e=>Promise.all(e.map((({animation:e,options:n})=>(0,u._)(t,e,n))))}(t);const n={animate:p(!0),whileInView:p(),whileHover:p(),whileTap:p(),whileDrag:p(),whileFocus:p(),exit:p()};let l=!0;const d=(e,n)=>{const s=(0,a.K)(t,n);if(s){const{transition:t,transitionEnd:n,...i}=s;e={...e,...i,...n}}return e};function m(a,u){const p=t.getProps(),m=t.getVariantContext(!0)||{},f=[],v=new Set;let g={},y=1/0;for(let e=0;e<h;e++){const h=c[e],w=n[h],b=void 0!==p[h]?p[h]:m[h],S=(0,r.w)(b),A=h===u?w.isActive:null;!1===A&&(y=e);let T=b===m[h]&&b!==p[h]&&S;if(T&&l&&t.manuallyAnimateOnMount&&(T=!1),w.protectedKeys={...g},!w.isActive&&null===A||!b&&!w.prevProp||(0,s.N)(b)||"boolean"==typeof b)continue;let E=(x=w.prevProp,("string"==typeof(P=b)?P!==x:!!Array.isArray(P)&&!(0,o.a)(P,x))||h===u&&w.isActive&&!T&&S||e>y&&S),C=!1;const V=Array.isArray(b)?b:[b];let M=V.reduce(d,{});!1===A&&(M={});const{prevResolvedValues:k={}}=w,D={...k,...M},j=t=>{E=!0,v.has(t)&&(C=!0,v.delete(t)),w.needsAnimating[t]=!0};for(const t in D){const e=M[t],n=k[t];if(g.hasOwnProperty(t))continue;let s=!1;s=(0,i.p)(e)&&(0,i.p)(n)?!(0,o.a)(e,n):e!==n,s?void 0!==e?j(t):v.add(t):void 0!==e&&v.has(t)?j(t):w.protectedKeys[t]=!0}w.prevProp=b,w.prevResolvedValues=M,w.isActive&&(g={...g,...M}),l&&t.blockInitialAnimation&&(E=!1),!E||T&&!C||f.push(...V.map((t=>({animation:t,options:{type:h,...a}}))))}var x,P;if(v.size){const e={};v.forEach((n=>{const s=t.getBaseTarget(n);void 0!==s&&(e[n]=s)})),f.push({animation:e})}let w=Boolean(f.length);return!l||!1!==p.initial&&p.initial!==p.animate||t.manuallyAnimateOnMount||(w=!1),l=!1,w?e(f):Promise.resolve()}return{animateChanges:m,setActive:function(e,s,i){var o;if(n[e].isActive===s)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,s)})),n[e].isActive=s;const r=m(i,e);for(const t in n)n[t].protectedKeys={};return r},setAnimateFunction:function(n){e=n(t)},getState:()=>n}}function p(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}},110877:(t,e,n)=>{n.d(e,{u:()=>s});const s=(t,e)=>t.depth-e.depth},389462:(t,e,n)=>{n.d(e,{Y:()=>o}),n(314846),n(469655);var s=n(890604),i=n(110877);class o{constructor(){this.children=[],this.isDirty=!1}add(t){(0,s.Kq)(this.children,t),this.isDirty=!0}remove(t){(0,s.Ai)(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(i.u),this.isDirty=!1,this.children.forEach(t)}}},884135:(t,e,n)=>{n.d(e,{O:()=>a,e:()=>r}),n(314846),n(275568);var s=n(892904),i=n(563305),o=n(422918);function r(t){return(0,s.N)(t.animate)||o._.some((e=>(0,i.w)(t[e])))}function a(t){return Boolean(r(t)||t.variants)}},563305:(t,e,n)=>{function s(t){return"string"==typeof t||Array.isArray(t)}n.d(e,{w:()=>s})},931545:(t,e,n)=>{n.d(e,{U:()=>r});var s=n(146547),i=(n(721657),n(239667)),o=n(573970);function r(t,e,n){const{willChange:r}=e;for(const a in e){const l=e[a],u=n[a];if((0,o.S)(l))t.addValue(a,l),(0,s.k)(r)&&r.add(a);else if((0,o.S)(u))t.addValue(a,(0,i.OQ)(l,{owner:t})),(0,s.k)(r)&&r.remove(a);else if(u!==l)if(t.hasValue(a)){const e=t.getValue(a);!e.hasAnimated&&e.set(l)}else{const e=t.getStaticValue(a);t.addValue(a,(0,i.OQ)(void 0!==e?e:l,{owner:t}))}}for(const s in n)void 0===e[s]&&t.removeValue(s);return e}},683695:(t,e,n)=>{n.d(e,{K:()=>i}),n(314846),n(469655);var s=n(775691);function i(t,e,n){const i=t.getProps();return(0,s.a)(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))}},775691:(t,e,n)=>{function s(t,e,n,s={},i={}){return"function"==typeof e&&(e=e(void 0!==n?n:t.custom,s,i)),"string"==typeof e&&(e=t.variants&&t.variants[e]),"function"==typeof e&&(e=e(void 0!==n?n:t.custom,s,i)),e}n.d(e,{a:()=>s})},482200:(t,e,n)=>{n.d(e,{$z:()=>f,TM:()=>p,Uo:()=>d}),n(314846),n(327458),n(469655);var s=n(907930),i=n(70998),o=n(744999),r=n(239667),a=n(73748),l=n(392602),u=n(429970),c=n(683695);function h(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,(0,r.OQ)(n))}function d(t,e){const n=(0,c.K)(t,e);let{transitionEnd:s={},transition:i={},...r}=n?t.makeTargetAnimatable(n,!1):{};r={...r,...s};for(const a in r)h(t,a,(0,o.K)(r[a]))}function p(t,e,n){var o,c;const h=Object.keys(e).filter((e=>!t.hasValue(e))),d=h.length;if(d)for(let p=0;p<d;p++){const d=h[p],m=e[d];let f=null;Array.isArray(m)&&(f=m[0]),null===f&&(f=null!==(c=null!==(o=n[d])&&void 0!==o?o:t.readValue(d))&&void 0!==c?c:e[d]),null!=f&&("string"==typeof f&&((0,s.i)(f)||(0,i.$)(f))?f=parseFloat(f):!(0,u.t)(f)&&a.f.test(m)&&(f=(0,l.J)(d,m)),t.addValue(d,(0,r.OQ)(f,{owner:t})),void 0===n[d]&&(n[d]=f),null!==f&&t.setBaseTarget(d,f))}}function m(t,e){if(e)return(e[t]||e.default||e).from}function f(t,e,n){const s={};for(const i in t){const t=m(i,e);if(void 0!==t)s[i]=t;else{const t=n.getValue(i);t&&(s[i]=t.get())}}return s}},422918:(t,e,n)=>{n.d(e,{U:()=>s,_:()=>i});const s=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],i=["initial",...s]},718966:(t,e,n)=>{n.d(e,{W:()=>s});const s={skipAnimations:!1}},890604:(t,e,n)=>{function s(t,e){-1===t.indexOf(e)&&t.push(e)}function i(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}function o([...t],e,n){const s=e<0?t.length+e:e;if(s>=0&&s<t.length){const s=n<0?t.length+n:n,[i]=t.splice(e,1);t.splice(s,0,i)}return t}n.d(e,{Ai:()=>i,Kq:()=>s,Pe:()=>o})},893138:(t,e,n)=>{n.d(e,{q:()=>s});const s=(t,e,n)=>Math.min(Math.max(n,t),e)},616246:(t,e,n)=>{n.d(e,{c:()=>i});var s=n(277210);function i(t,e){const n=performance.now(),i=({timestamp:o})=>{const r=o-n;r>=e&&((0,s.WG)(i),t(r-e))};return s.Gt.read(i,!0),()=>(0,s.WG)(i)}},367232:(t,e,n)=>{n.d(e,{w:()=>i});const s=(t,e)=>Math.abs(t-e);function i(t,e){const n=s(t.x,e.x),i=s(t.y,e.y);return Math.sqrt(n**2+i**2)}},841164:(t,e,n)=>{n.d(e,{$:()=>i,V:()=>o}),n(167834);var s=n(78777);let i=s.l,o=s.l},508382:(t,e,n)=>{n.d(e,{s:()=>s});const s=({current:t})=>t?t.ownerDocument.defaultView:null},400630:(t,e,n)=>{function s(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}function i({hue:t,saturation:e,lightness:n,alpha:i}){t/=360,n/=100;let o=0,r=0,a=0;if(e/=100){const i=n<.5?n*(1+e):n+e-n*e,l=2*n-i;o=s(l,i,t+1/3),r=s(l,i,t),a=s(l,i,t-1/3)}else o=r=a=n;return{red:Math.round(255*o),green:Math.round(255*r),blue:Math.round(255*a),alpha:i}}n.d(e,{a:()=>i})},323662:(t,e,n)=>{n.d(e,{G:()=>p});var s=n(841164),i=n(449705),o=n(893138),r=n(26085),a=n(69279),l=n(681718),u=n(804253),c=n(799020),h=n(78777);const d=(t,e)=>n=>(0,r.j)(t,e,n);function p(t,e,{clamp:n=!0,ease:r,mixer:p}={}){const m=t.length;if((0,s.V)(m===e.length,"Both input and output ranges must be the same length"),1===m)return()=>e[0];t[0]>t[m-1]&&(t=[...t].reverse(),e=[...e].reverse());const f=function(t,e,n){const s=[],o=n||("number"==typeof(r=t[0])?d:"string"==typeof r?i.y.test(r)?a.i:l.JL:Array.isArray(r)?l.MC:"object"==typeof r?l.YK:d);var r;const c=t.length-1;for(let i=0;i<c;i++){let n=o(t[i],t[i+1]);if(e){const t=Array.isArray(e)?e[i]||h.l:e;n=(0,u.F)(t,n)}s.push(n)}return s}(e,r,p),v=f.length,g=e=>{let n=0;if(v>1)for(;n<t.length-2&&!(e<t[n+1]);n++);const s=(0,c.q)(t[n],t[n+1],e);return f[n](s)};return n?e=>g((0,o.q)(t[0],t[m-1],e)):g}},701134:(t,e,n)=>{n.d(e,{B:()=>s});const s="undefined"!=typeof document},907930:(t,e,n)=>{n.d(e,{i:()=>s});const s=t=>/^\-?\d*\.?\d+$/.test(t)},105675:(t,e,n)=>{function s(t){return t&&"object"==typeof t&&Object.prototype.hasOwnProperty.call(t,"current")}n.d(e,{X:()=>s})},70998:(t,e,n)=>{n.d(e,{$:()=>s});const s=t=>/^0[^.\s]+$/.test(t)},696407:(t,e,n)=>{function s(t){let e;return()=>(void 0===e&&(e=t()),e)}n.d(e,{p:()=>s})},69279:(t,e,n)=>{n.d(e,{i:()=>d}),n(314846),n(6211);var s=n(26085),i=n(841164),o=n(400630),r=n(449598),a=n(422585),l=n(898173);const u=(t,e,n)=>{const s=t*t;return Math.sqrt(Math.max(0,n*(e*e-s)+s))},c=[r.u,a.B,l.V];function h(t){const e=(n=t,c.find((t=>t.test(n))));var n;(0,i.V)(Boolean(e),`'${t}' is not an animatable color. Use the equivalent color code instead.`);let s=e.parse(t);return e===l.V&&(s=(0,o.a)(s)),s}const d=(t,e)=>{const n=h(t),i=h(e),o={...n};return t=>(o.red=u(n.red,i.red,t),o.green=u(n.green,i.green,t),o.blue=u(n.blue,i.blue,t),o.alpha=(0,s.j)(n.alpha,i.alpha,t),a.B.transform(o))}},681718:(t,e,n)=>{n.d(e,{JL:()=>p,MC:()=>h,YK:()=>d}),n(194364);var s=n(26085),i=n(69279),o=n(804253),r=n(841164),a=n(449705),l=n(73748);const u=(t,e)=>n=>`${n>0?e:t}`;function c(t,e){return"number"==typeof t?n=>(0,s.j)(t,e,n):a.y.test(t)?(0,i.i)(t,e):t.startsWith("var(")?u(t,e):p(t,e)}const h=(t,e)=>{const n=[...t],s=n.length,i=t.map(((t,n)=>c(t,e[n])));return t=>{for(let e=0;e<s;e++)n[e]=i[e](t);return n}},d=(t,e)=>{const n={...t,...e},s={};for(const i in n)void 0!==t[i]&&void 0!==e[i]&&(s[i]=c(t[i],e[i]));return t=>{for(const e in s)n[e]=s[e](t);return n}},p=(t,e)=>{const n=l.f.createTransformer(e),s=(0,l.V)(t),i=(0,l.V)(e);return s.numVars===i.numVars&&s.numColors===i.numColors&&s.numNumbers>=i.numNumbers?(0,o.F)(h(s.values,i.values),n):((0,r.$)(!0,`Complex values '${t}' and '${e}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),u(t,e))}},26085:(t,e,n)=>{n.d(e,{j:()=>s});const s=(t,e,n)=>-n*t+n*e+t},78777:(t,e,n)=>{n.d(e,{l:()=>s});const s=t=>t},766869:(t,e,n)=>{n.d(e,{Z:()=>i});var s=n(774641);function i(t){const e=[0];return(0,s.f)(e,t.length-1),e}},774641:(t,e,n)=>{n.d(e,{f:()=>o});var s=n(26085),i=n(799020);function o(t,e){const n=t[t.length-1];for(let o=1;o<=e;o++){const r=(0,i.q)(0,e,o);t.push((0,s.j)(n,1,r))}}},418057:(t,e,n)=>{function s(t,e){return t.map((t=>t*e))}n.d(e,{A:()=>s}),n(194364)},804253:(t,e,n)=>{n.d(e,{F:()=>i}),n(314846),n(190458);const s=(t,e)=>n=>e(t(n)),i=(...t)=>t.reduce(s)},799020:(t,e,n)=>{n.d(e,{q:()=>s});const s=(t,e,n)=>{const s=e-t;return 0===s?1:(n-t)/s}},989461:(t,e,n)=>{n.d(e,{U:()=>o});var s=n(701134),i=n(27250);function o(){if(i.r.current=!0,s.B)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>i.O.current=t.matches;t.addListener(e),e()}else i.O.current=!1}},27250:(t,e,n)=>{n.d(e,{O:()=>s,r:()=>i});const s={current:null},i={current:!1}},494535:(t,e,n)=>{n(63696),n(682832),n(150092)},150092:(t,e,n)=>{n(63696),n(989461),n(721657),n(27250)},744999:(t,e,n)=>{n.d(e,{B:()=>i,K:()=>o});var s=n(343690);const i=t=>Boolean(t&&"object"==typeof t&&t.mix&&t.toValue),o=t=>(0,s.p)(t)?t[t.length-1]||0:t},223605:(t,e,n)=>{function s(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let s=0;s<n;s++)if(e[s]!==t[s])return!1;return!0}n.d(e,{a:()=>s})},902840:(t,e,n)=>{n.d(e,{v:()=>i});var s=n(890604);class i{constructor(){this.subscriptions=[]}add(t){return(0,s.Kq)(this.subscriptions,t),()=>(0,s.Ai)(this.subscriptions,t)}notify(t,e,n){const s=this.subscriptions.length;if(s)if(1===s)this.subscriptions[0](t,e,n);else for(let i=0;i<s;i++){const s=this.subscriptions[i];s&&s(t,e,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}},660127:(t,e,n)=>{n.d(e,{X:()=>i,f:()=>s});const s=t=>1e3*t,i=t=>t/1e3},229455:(t,e,n)=>{n.d(e,{p:()=>o});var s=n(323662);const i=t=>(t=>t&&"object"==typeof t&&t.mix)(t)?t.mix:void 0;function o(...t){const e=!Array.isArray(t[0]),n=e?0:-1,o=t[0+n],r=t[1+n],a=t[2+n],l=t[3+n],u=(0,s.G)(r,a,{mixer:i(a[0]),...l});return e?u(o):u}},404175:(t,e,n)=>{n(63696),n(682832),n(277210)},416155:(t,e,n)=>{n.d(e,{M:()=>i});var s=n(63696);function i(t){const e=(0,s.useRef)(null);return null===e.current&&(e.current=t()),e.current}},683911:(t,e,n)=>{n(63696),n(322801)},226990:(t,e,n)=>{n.d(e,{C:()=>r});var s=n(63696),i=n(546332),o=n(277210);function r(){const t=(0,i.a)(),[e,n]=(0,s.useState)(0),r=(0,s.useCallback)((()=>{t.current&&n(e+1)}),[e]);return[(0,s.useCallback)((()=>o.Gt.postRender(r)),[r]),e]}},364584:(t,e,n)=>{n(63696),n(438182)},300934:(t,e,n)=>{n.d(e,{d:()=>s});const s={current:!1}},437614:(t,e,n)=>{n(63696),n(557013),n(226990),n(300934),n(277210)},546332:(t,e,n)=>{n.d(e,{a:()=>o});var s=n(63696),i=n(117946);function o(){const t=(0,s.useRef)(!1);return(0,i.E)((()=>(t.current=!0,()=>{t.current=!1})),[]),t}},117946:(t,e,n)=>{n.d(e,{E:()=>i});var s=n(63696);const i=n(701134).B?s.useLayoutEffect:s.useEffect},261006:(t,e,n)=>{n(63696)},758369:(t,e,n)=>{n.d(e,{l:()=>i});var s=n(63696);function i(t){return(0,s.useEffect)((()=>()=>t()),[])}},540255:(t,e,n)=>{function s(t,e){return e?t*(1e3/e):0}n.d(e,{f:()=>s})},721657:(t,e,n)=>{new Set},322801:(t,e,n)=>{n.d(e,{L:()=>s});const s=(t,e,n)=>{const s=e-t;return((n-t)%s+s)%s+t}},239667:(t,e,n)=>{n.d(e,{KG:()=>a,OQ:()=>l,bt:()=>r});var s=n(902840),i=n(540255),o=(n(721657),n(277210));const r={current:void 0};class a{constructor(t,e={}){var n;this.version="10.18.0",this.timeDelta=0,this.lastUpdated=0,this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(t,e=!0)=>{this.prev=this.current,this.current=t;const{delta:n,timestamp:s}=o.uv;this.lastUpdated!==s&&(this.timeDelta=n,this.lastUpdated=s,o.Gt.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.events.change&&this.events.change.notify(this.current),this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()),e&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.scheduleVelocityCheck=()=>o.Gt.postRender(this.velocityCheck),this.velocityCheck=({timestamp:t})=>{t!==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=(n=this.current,!isNaN(parseFloat(n))),this.owner=e.owner}onChange(t){return this.on("change",t)}on(t,e){this.events[t]||(this.events[t]=new s.v);const n=this.events[t].add(e);return"change"===t?()=>{n(),o.Gt.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,e=!0){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 r.current&&r.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?(0,i.f)(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 l(t,e){return new a(t,e)}},333229:(t,e,n)=>{n(721657),n(100308)},439849:(t,e,n)=>{n(721657),n(100308)},449598:(t,e,n)=>{n.d(e,{u:()=>i});var s=n(422585);const i={test:(0,n(529950).$)("#"),parse:function(t){let e="",n="",s="",i="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),s=t.substring(5,7),i=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),s=t.substring(3,4),i=t.substring(4,5),e+=e,n+=n,s+=s,i+=i),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(s,16),alpha:i?parseInt(i,16)/255:1}},transform:s.B.transform}},898173:(t,e,n)=>{n.d(e,{V:()=>a});var s=n(900478),i=n(234223),o=n(497554),r=n(529950);const a={test:(0,r.$)("hsl","hue"),parse:(0,r.q)("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:r=1})=>"hsla("+Math.round(t)+", "+i.KN.transform((0,o.aj)(e))+", "+i.KN.transform((0,o.aj)(n))+", "+(0,o.aj)(s.X4.transform(r))+")"}},449705:(t,e,n)=>{n.d(e,{y:()=>a});var s=n(497554),i=n(449598),o=n(898173),r=n(422585);const a={test:t=>r.B.test(t)||i.u.test(t)||o.V.test(t),parse:t=>r.B.test(t)?r.B.parse(t):o.V.test(t)?o.V.parse(t):i.u.parse(t),transform:t=>(0,s.Kg)(t)?t:t.hasOwnProperty("red")?r.B.transform(t):o.V.transform(t)}},422585:(t,e,n)=>{n.d(e,{B:()=>l});var s=n(893138),i=n(900478),o=n(497554),r=n(529950);const a={...i.ai,transform:t=>Math.round((t=>(0,s.q)(0,255,t))(t))},l={test:(0,r.$)("rgb","red"),parse:(0,r.q)("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+a.transform(t)+", "+a.transform(e)+", "+a.transform(n)+", "+(0,o.aj)(i.X4.transform(s))+")"}},529950:(t,e,n)=>{n.d(e,{$:()=>i,q:()=>o});var s=n(497554);const i=(t,e)=>n=>Boolean((0,s.Kg)(n)&&s.Fl.test(n)&&n.startsWith(t)||e&&Object.prototype.hasOwnProperty.call(n,e)),o=(t,e,n)=>i=>{if(!(0,s.Kg)(i))return i;const[o,r,a,l]=i.match(s.SY);return{[t]:parseFloat(o),[e]:parseFloat(r),[n]:parseFloat(a),alpha:void 0!==l?parseFloat(l):1}}},358986:(t,e,n)=>{n.d(e,{p:()=>l}),n(194364);var s=n(73748),i=n(497554);const o=new Set(["brightness","contrast","saturate","opacity"]);function r(t){const[e,n]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[s]=n.match(i.SY)||[];if(!s)return t;const r=n.replace(s,"");let a=o.has(e)?1:0;return s!==n&&(a*=100),e+"("+a+r+")"}const a=/([a-z-]*)\(.*?\)/g,l={...s.f,getAnimatableNone:t=>{const e=t.match(a);return e?e.map(r).join(" "):t}}},73748:(t,e,n)=>{n.d(e,{V:()=>d,f:()=>v}),n(76281),n(194364);var s=n(511078),i=n(78777),o=n(449705),r=n(900478),a=n(497554);const l={regex:s.z2,countKey:"Vars",token:"${v}",parse:i.l},u={regex:a.ne,countKey:"Colors",token:"${c}",parse:o.y.parse},c={regex:a.SY,countKey:"Numbers",token:"${n}",parse:r.ai.parse};function h(t,{regex:e,countKey:n,token:s,parse:i}){const o=t.tokenised.match(e);o&&(t["num"+n]=o.length,t.tokenised=t.tokenised.replace(e,s),t.values.push(...o.map(i)))}function d(t){const e=t.toString(),n={value:e,tokenised:e,values:[],numVars:0,numColors:0,numNumbers:0};return n.value.includes("var(--")&&h(n,l),h(n,u),h(n,c),n}function p(t){return d(t).values}function m(t){const{values:e,numColors:n,numVars:s,tokenised:i}=d(t),r=e.length;return t=>{let e=i;for(let i=0;i<r;i++)e=i<s?e.replace(l.token,t[i]):i<s+n?e.replace(u.token,o.y.transform(t[i])):e.replace(c.token,(0,a.aj)(t[i]));return e}}const f=t=>"number"==typeof t?0:t,v={test:function(t){var e,n;return isNaN(t)&&(0,a.Kg)(t)&&((null===(e=t.match(a.SY))||void 0===e?void 0:e.length)||0)+((null===(n=t.match(a.ne))||void 0===n?void 0:n.length)||0)>0},parse:p,createTransformer:m,getAnimatableNone:function(t){const e=p(t);return m(t)(e.map(f))}}},900478:(t,e,n)=>{n.d(e,{X4:()=>o,ai:()=>i,hs:()=>r});var s=n(893138);const i={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},o={...i,transform:t=>(0,s.q)(0,1,t)},r={...i,default:1}},234223:(t,e,n)=>{n.d(e,{KN:()=>r,gQ:()=>c,px:()=>a,uj:()=>o,vh:()=>l,vw:()=>u});var s=n(497554);const i=t=>({test:e=>(0,s.Kg)(e)&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),o=i("deg"),r=i("%"),a=i("px"),l=i("vh"),u=i("vw"),c={...r,parse:t=>r.parse(t)/100,transform:t=>r.transform(100*t)}},497554:(t,e,n)=>{n.d(e,{Fl:()=>r,Kg:()=>a,SY:()=>i,aj:()=>s,ne:()=>o});const s=t=>Math.round(1e5*t)/1e5,i=/(-)?([\d]*\.?[\d])+/g,o=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,r=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function a(t){return"string"==typeof t}},383201:(t,e,n)=>{n.d(e,{j:()=>r}),n(314846),n(469655),n(194364);var s=n(73885),i=n(117946),o=n(277210);function r(t,e){const n=(0,s.d)(e()),r=()=>n.set(e());return r(),(0,i.E)((()=>{const e=()=>o.Gt.update(r,!1,!0),n=t.map((t=>t.on("change",e)));return()=>{n.forEach((t=>t())),(0,o.WG)(r)}})),n}},413018:(t,e,n)=>{n.d(e,{H:()=>o});var s=n(239667),i=n(383201);function o(t){s.bt.current=[],t();const e=(0,i.j)(s.bt.current,t);return s.bt.current=void 0,e}},262345:(t,e,n)=>{n(979829),n(841164),n(73885),n(820631),n(63696)},167472:(t,e,n)=>{n(314846),n(327458),n(383201),n(573970)},73885:(t,e,n)=>{n.d(e,{d:()=>a});var s=n(63696),i=n(239667),o=n(682832),r=n(416155);function a(t){const e=(0,r.M)((()=>(0,i.OQ)(t))),{isStatic:n}=(0,s.useContext)(o.Q);if(n){const[,n]=(0,s.useState)(t);(0,s.useEffect)((()=>e.on("change",n)),[])}return e}},100308:(t,e,n)=>{n(239667),n(416155),n(63696),n(841164),n(12582),n(117946)},375884:(t,e,n)=>{n(63696),n(573970),n(73885),n(682832),n(117946),n(731603),n(660127),n(277210)},846820:(t,e,n)=>{n(404175),n(73885)},979829:(t,e,n)=>{n.d(e,{G:()=>a});var s=n(229455),i=n(383201),o=n(416155),r=n(413018);function a(t,e,n,i){if("function"==typeof t)return(0,r.H)(t);const o="function"==typeof e?e:(0,s.p)(e,n,i);return Array.isArray(t)?l(t,o):l([t],(([t])=>o(t)))}function l(t,e){const n=(0,o.M)((()=>[]));return(0,i.j)(t,(()=>{n.length=0;const s=t.length;for(let e=0;e<s;e++)n[e]=t[e].get();return e(n)}))}},106406:(t,e,n)=>{n(261006),n(73885)},975469:(t,e,n)=>{n(511078),n(353994),n(890604),n(416155);var s=n(239667);n(493388),s.KG},146547:(t,e,n)=>{n.d(e,{k:()=>i});var s=n(573970);function i(t){return Boolean((0,s.S)(t)&&t.add)}},573970:(t,e,n)=>{n.d(e,{S:()=>s});const s=t=>Boolean(t&&t.getVelocity)},736196:(t,e,n)=>{n.d(e,{u:()=>o});var s=n(744999),i=n(573970);function o(t){const e=(0,i.S)(t)?t.get():t;return(0,s.B)(e)?e.toValue():e}}}]);
"use strict";
(self["webpackChunk"] = self["webpackChunk"] || []).push([[37043],{
/***/ 725438:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ P: () => (/* binding */ GroupPlaybackControls)
/* harmony export */ });
/* harmony import */ var core_js_modules_esnext_iterator_constructor_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(314846);
/* harmony import */ var core_js_modules_esnext_iterator_filter_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(327458);
/* harmony import */ var core_js_modules_esnext_iterator_for_each_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(469655);
/* harmony import */ var core_js_modules_esnext_iterator_map_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(194364);
/* harmony import */ var _render_dom_scroll_observe_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(879783);
/* harmony import */ var _render_dom_scroll_supports_mjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(8065);
class GroupPlaybackControls {
constructor(animations) {
this.animations = animations.filter(Boolean);
}
then(onResolve, onReject) {
return Promise.all(this.animations).then(onResolve).catch(onReject);
}
/**
* TODO: Filter out cancelled or stopped animations before returning
*/
getAll(propName) {
return this.animations[0][propName];
}
setAll(propName, newValue) {
for (let i = 0; i < this.animations.length; i++) {
this.animations[i][propName] = newValue;
}
}
attachTimeline(timeline) {
const cancelAll = this.animations.map(animation => {
if ((0,_render_dom_scroll_supports_mjs__WEBPACK_IMPORTED_MODULE_5__/* .supportsScrollTimeline */ .J)() && animation.attachTimeline) {
animation.attachTimeline(timeline);
} else {
animation.pause();
return (0,_render_dom_scroll_observe_mjs__WEBPACK_IMPORTED_MODULE_4__/* .observeTimeline */ .y)(progress => {
animation.time = animation.duration * progress;
}, timeline);
}
});
return () => {
cancelAll.forEach((cancelTimeline, i) => {
if (cancelTimeline) cancelTimeline();
this.animations[i].stop();
});
};
}
get time() {
return this.getAll("time");
}
set time(time) {
this.setAll("time", time);
}
get speed() {
return this.getAll("speed");
}
set speed(speed) {
this.setAll("speed", speed);
}
get duration() {
let max = 0;
for (let i = 0; i < this.animations.length; i++) {
max = Math.max(max, this.animations[i].duration);
}
return max;
}
runAll(methodName) {
this.animations.forEach(controls => controls[methodName]());
}
play() {
this.runAll("play");
}
pause() {
this.runAll("pause");
}
stop() {
this.runAll("stop");
}
cancel() {
this.runAll("cancel");
}
complete() {
this.runAll("complete");
}
}
/***/ }),
/***/ 279611:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ i: () => (/* binding */ animate)
/* harmony export */ });
/* unused harmony export createScopedAnimate */
/* harmony import */ var core_js_modules_esnext_iterator_constructor_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(314846);
/* harmony import */ var core_js_modules_esnext_iterator_for_each_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(469655);
/* harmony import */ var _render_dom_utils_resolve_element_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(801822);
/* harmony import */ var _render_store_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(550529);
/* harmony import */ var _utils_errors_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(841164);
/* harmony import */ var _GroupPlaybackControls_mjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(725438);
/* harmony import */ var _utils_is_dom_keyframes_mjs__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(780119);
/* harmony import */ var _interfaces_visual_element_target_mjs__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(430388);
/* harmony import */ var _utils_create_visual_element_mjs__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(444458);
/* harmony import */ var _interfaces_single_value_mjs__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(641041);
/* harmony import */ var _sequence_create_mjs__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(486360);
/* harmony import */ var _value_utils_is_motion_value_mjs__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(573970);
function animateElements(elementOrSelector, keyframes, options, scope) {
const elements = (0,_render_dom_utils_resolve_element_mjs__WEBPACK_IMPORTED_MODULE_2__/* .resolveElements */ .K)(elementOrSelector, scope);
const numElements = elements.length;
(0,_utils_errors_mjs__WEBPACK_IMPORTED_MODULE_4__/* .invariant */ .V)(Boolean(numElements), "No valid element provided.");
const animations = [];
for (let i = 0; i < numElements; i++) {
const element = elements[i];
/**
* Check each element for an associated VisualElement. If none exists,
* we need to create one.
*/
if (!_render_store_mjs__WEBPACK_IMPORTED_MODULE_3__/* .visualElementStore */ .C.has(element)) {
/**
* TODO: We only need render-specific parts of the VisualElement.
* With some additional work the size of the animate() function
* could be reduced significantly.
*/
(0,_utils_create_visual_element_mjs__WEBPACK_IMPORTED_MODULE_8__/* .createVisualElement */ .B)(element);
}
const visualElement = _render_store_mjs__WEBPACK_IMPORTED_MODULE_3__/* .visualElementStore */ .C.get(element);
const transition = {
...options
};
/**
* Resolve stagger function if provided.
*/
if (typeof transition.delay === "function") {
transition.delay = transition.delay(i, numElements);
}
animations.push(...(0,_interfaces_visual_element_target_mjs__WEBPACK_IMPORTED_MODULE_7__/* .animateTarget */ .$)(visualElement, {
...keyframes,
transition
}, {}));
}
return new _GroupPlaybackControls_mjs__WEBPACK_IMPORTED_MODULE_5__/* .GroupPlaybackControls */ .P(animations);
}
const isSequence = value => Array.isArray(value) && Array.isArray(value[0]);
function animateSequence(sequence, options, scope) {
const animations = [];
const animationDefinitions = (0,_sequence_create_mjs__WEBPACK_IMPORTED_MODULE_10__/* .createAnimationsFromSequence */ .l)(sequence, options, scope);
animationDefinitions.forEach(({
keyframes,
transition
}, subject) => {
let animation;
if ((0,_value_utils_is_motion_value_mjs__WEBPACK_IMPORTED_MODULE_11__/* .isMotionValue */ .S)(subject)) {
animation = (0,_interfaces_single_value_mjs__WEBPACK_IMPORTED_MODULE_9__/* .animateSingleValue */ .z)(subject, keyframes.default, transition.default);
} else {
animation = animateElements(subject, keyframes, transition);
}
animations.push(animation);
});
return new _GroupPlaybackControls_mjs__WEBPACK_IMPORTED_MODULE_5__/* .GroupPlaybackControls */ .P(animations);
}
const createScopedAnimate = scope => {
/**
* Implementation
*/
function scopedAnimate(valueOrElementOrSequence, keyframes, options) {
let animation;
if (isSequence(valueOrElementOrSequence)) {
animation = animateSequence(valueOrElementOrSequence, keyframes, scope);
} else if ((0,_utils_is_dom_keyframes_mjs__WEBPACK_IMPORTED_MODULE_6__/* .isDOMKeyframes */ .m)(keyframes)) {
animation = animateElements(valueOrElementOrSequence, keyframes, options, scope);
} else {
animation = (0,_interfaces_single_value_mjs__WEBPACK_IMPORTED_MODULE_9__/* .animateSingleValue */ .z)(valueOrElementOrSequence, keyframes, options);
}
if (scope) {
scope.animations.push(animation);
}
return animation;
}
return scopedAnimate;
};
const animate = createScopedAnimate();
/***/ }),
/***/ 965402:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ Q: () => (/* binding */ createInstantAnimation)
/* harmony export */ });
/* harmony import */ var _js_index_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(731603);
/* harmony import */ var _utils_noop_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(78777);
function createInstantAnimation({
keyframes,
delay,
onUpdate,
onComplete
}) {
const setValue = () => {
onUpdate && onUpdate(keyframes[keyframes.length - 1]);
onComplete && onComplete();
/**
* TODO: As this API grows it could make sense to always return
* animateValue. This will be a bigger project as animateValue
* is frame-locked whereas this function resolves instantly.
* This is a behavioural change and also has ramifications regarding
* assumptions within tests.
*/
return {
time: 0,
speed: 1,
duration: 0,
play: _utils_noop_mjs__WEBPACK_IMPORTED_MODULE_1__/* .noop */ .l,
pause: _utils_noop_mjs__WEBPACK_IMPORTED_MODULE_1__/* .noop */ .l,
stop: _utils_noop_mjs__WEBPACK_IMPORTED_MODULE_1__/* .noop */ .l,
then: resolve => {
resolve();
return Promise.resolve();
},
cancel: _utils_noop_mjs__WEBPACK_IMPORTED_MODULE_1__/* .noop */ .l,
complete: _utils_noop_mjs__WEBPACK_IMPORTED_MODULE_1__/* .noop */ .l
};
};
return delay ? (0,_js_index_mjs__WEBPACK_IMPORTED_MODULE_0__/* .animateValue */ .L)({
keyframes: [0, 1],
duration: 0,
delay,
onComplete: setValue
}) : setValue();
}
/***/ }),
/***/ 238973:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ E: () => (/* binding */ frameloopDriver)
/* harmony export */ });
/* harmony import */ var _frameloop_frame_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(277210);
const frameloopDriver = update => {
const passTimestamp = ({
timestamp
}) => update(timestamp);
return {
start: () => _frameloop_frame_mjs__WEBPACK_IMPORTED_MODULE_0__/* .frame */ .Gt.update(passTimestamp, true),
stop: () => (0,_frameloop_frame_mjs__WEBPACK_IMPORTED_MODULE_0__/* .cancelFrame */ .WG)(passTimestamp),
/**
* If we're processing this frame we can use the
* framelocked timestamp to keep things in sync.
*/
now: () => _frameloop_frame_mjs__WEBPACK_IMPORTED_MODULE_0__/* .frameData */ .uv.isProcessing ? _frameloop_frame_mjs__WEBPACK_IMPORTED_MODULE_0__/* .frameData */ .uv.timestamp : performance.now()
};
};
/***/ }),
/***/ 731603:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ L: () => (/* binding */ animateValue)
/* harmony export */ });
/* harmony import */ var _generators_keyframes_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(871098);
/* harmony import */ var _generators_spring_index_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(311789);
/* harmony import */ var _generators_inertia_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(580835);
/* harmony import */ var _driver_frameloop_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(238973);
/* harmony import */ var _utils_interpolate_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(323662);
/* harmony import */ var _utils_clamp_mjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(893138);
/* harmony import */ var _utils_time_conversion_mjs__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(660127);
/* harmony import */ var _generators_utils_calc_duration_mjs__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(445795);
/* harmony import */ var _utils_errors_mjs__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(841164);
const types = {
decay: _generators_inertia_mjs__WEBPACK_IMPORTED_MODULE_2__/* .inertia */ .B,
inertia: _generators_inertia_mjs__WEBPACK_IMPORTED_MODULE_2__/* .inertia */ .B,
tween: _generators_keyframes_mjs__WEBPACK_IMPORTED_MODULE_0__/* .keyframes */ .i,
keyframes: _generators_keyframes_mjs__WEBPACK_IMPORTED_MODULE_0__/* .keyframes */ .i,
spring: _generators_spring_index_mjs__WEBPACK_IMPORTED_MODULE_1__/* .spring */ .o
};
/**
* Animate a single value on the main thread.
*
* This function is written, where functionality overlaps,
* to be largely spec-compliant with WAAPI to allow fungibility
* between the two.
*/
function animateValue({
autoplay = true,
delay = 0,
driver = _driver_frameloop_mjs__WEBPACK_IMPORTED_MODULE_3__/* .frameloopDriver */ .E,
keyframes: keyframes$1,
type = "keyframes",
repeat = 0,
repeatDelay = 0,
repeatType = "loop",
onPlay,
onStop,
onComplete,
onUpdate,
...options
}) {
let speed = 1;
let hasStopped = false;
let resolveFinishedPromise;
let currentFinishedPromise;
/**
* Resolve the current Promise every time we enter the
* finished state. This is WAAPI-compatible behaviour.
*/
const updateFinishedPromise = () => {
currentFinishedPromise = new Promise(resolve => {
resolveFinishedPromise = resolve;
});
};
// Create the first finished promise
updateFinishedPromise();
let animationDriver;
const generatorFactory = types[type] || _generators_keyframes_mjs__WEBPACK_IMPORTED_MODULE_0__/* .keyframes */ .i;
/**
* If this isn't the keyframes generator and we've been provided
* strings as keyframes, we need to interpolate these.
*/
let mapNumbersToKeyframes;
if (generatorFactory !== _generators_keyframes_mjs__WEBPACK_IMPORTED_MODULE_0__/* .keyframes */ .i && typeof keyframes$1[0] !== "number") {
if (false) {}
mapNumbersToKeyframes = (0,_utils_interpolate_mjs__WEBPACK_IMPORTED_MODULE_4__/* .interpolate */ .G)([0, 100], keyframes$1, {
clamp: false
});
keyframes$1 = [0, 100];
}
const generator = generatorFactory({
...options,
keyframes: keyframes$1
});
let mirroredGenerator;
if (repeatType === "mirror") {
mirroredGenerator = generatorFactory({
...options,
keyframes: [...keyframes$1].reverse(),
velocity: -(options.velocity || 0)
});
}
let playState = "idle";
let holdTime = null;
let startTime = null;
let cancelTime = null;
/**
* If duration is undefined and we have repeat options,
* we need to calculate a duration from the generator.
*
* We set it to the generator itself to cache the duration.
* Any timeline resolver will need to have already precalculated
* the duration by this step.
*/
if (generator.calculatedDuration === null && repeat) {
generator.calculatedDuration = (0,_generators_utils_calc_duration_mjs__WEBPACK_IMPORTED_MODULE_7__/* .calcGeneratorDuration */ .t)(generator);
}
const {
calculatedDuration
} = generator;
let resolvedDuration = Infinity;
let totalDuration = Infinity;
if (calculatedDuration !== null) {
resolvedDuration = calculatedDuration + repeatDelay;
totalDuration = resolvedDuration * (repeat + 1) - repeatDelay;
}
let currentTime = 0;
const tick = timestamp => {
if (startTime === null) return;
/**
* requestAnimationFrame timestamps can come through as lower than
* the startTime as set by performance.now(). Here we prevent this,
* though in the future it could be possible to make setting startTime
* a pending operation that gets resolved here.
*/
if (speed > 0) startTime = Math.min(startTime, timestamp);
if (speed < 0) startTime = Math.min(timestamp - totalDuration / speed, startTime);
if (holdTime !== null) {
currentTime = holdTime;
} else {
// Rounding the time because floating point arithmetic is not always accurate, e.g. 3000.367 - 1000.367 =
// 2000.0000000000002. This is a problem when we are comparing the currentTime with the duration, for
// example.
currentTime = Math.round(timestamp - startTime) * speed;
}
// Rebase on delay
const timeWithoutDelay = currentTime - delay * (speed >= 0 ? 1 : -1);
const isInDelayPhase = speed >= 0 ? timeWithoutDelay < 0 : timeWithoutDelay > totalDuration;
currentTime = Math.max(timeWithoutDelay, 0);
/**
* If this animation has finished, set the current time
* to the total duration.
*/
if (playState === "finished" && holdTime === null) {
currentTime = totalDuration;
}
let elapsed = currentTime;
let frameGenerator = generator;
if (repeat) {
/**
* Get the current progress (0-1) of the animation. If t is >
* than duration we'll get values like 2.5 (midway through the
* third iteration)
*/
const progress = Math.min(currentTime, totalDuration) / resolvedDuration;
/**
* Get the current iteration (0 indexed). For instance the floor of
* 2.5 is 2.
*/
let currentIteration = Math.floor(progress);
/**
* Get the current progress of the iteration by taking the remainder
* so 2.5 is 0.5 through iteration 2
*/
let iterationProgress = progress % 1.0;
/**
* If iteration progress is 1 we count that as the end
* of the previous iteration.
*/
if (!iterationProgress && progress >= 1) {
iterationProgress = 1;
}
iterationProgress === 1 && currentIteration--;
currentIteration = Math.min(currentIteration, repeat + 1);
/**
* Reverse progress if we're not running in "normal" direction
*/
const isOddIteration = Boolean(currentIteration % 2);
if (isOddIteration) {
if (repeatType === "reverse") {
iterationProgress = 1 - iterationProgress;
if (repeatDelay) {
iterationProgress -= repeatDelay / resolvedDuration;
}
} else if (repeatType === "mirror") {
frameGenerator = mirroredGenerator;
}
}
elapsed = (0,_utils_clamp_mjs__WEBPACK_IMPORTED_MODULE_5__/* .clamp */ .q)(0, 1, iterationProgress) * resolvedDuration;
}
/**
* If we're in negative time, set state as the initial keyframe.
* This prevents delay: x, duration: 0 animations from finishing
* instantly.
*/
const state = isInDelayPhase ? {
done: false,
value: keyframes$1[0]
} : frameGenerator.next(elapsed);
if (mapNumbersToKeyframes) {
state.value = mapNumbersToKeyframes(state.value);
}
let {
done
} = state;
if (!isInDelayPhase && calculatedDuration !== null) {
done = speed >= 0 ? currentTime >= totalDuration : currentTime <= 0;
}
const isAnimationFinished = holdTime === null && (playState === "finished" || playState === "running" && done);
if (onUpdate) {
onUpdate(state.value);
}
if (isAnimationFinished) {
finish();
}
return state;
};
const stopAnimationDriver = () => {
animationDriver && animationDriver.stop();
animationDriver = undefined;
};
const cancel = () => {
playState = "idle";
stopAnimationDriver();
resolveFinishedPromise();
updateFinishedPromise();
startTime = cancelTime = null;
};
const finish = () => {
playState = "finished";
onComplete && onComplete();
stopAnimationDriver();
resolveFinishedPromise();
};
const play = () => {
if (hasStopped) return;
if (!animationDriver) animationDriver = driver(tick);
const now = animationDriver.now();
onPlay && onPlay();
if (holdTime !== null) {
startTime = now - holdTime;
} else if (!startTime || playState === "finished") {
startTime = now;
}
if (playState === "finished") {
updateFinishedPromise();
}
cancelTime = startTime;
holdTime = null;
/**
* Set playState to running only after we've used it in
* the previous logic.
*/
playState = "running";
animationDriver.start();
};
if (autoplay) {
play();
}
const controls = {
then(resolve, reject) {
return currentFinishedPromise.then(resolve, reject);
},
get time() {
return (0,_utils_time_conversion_mjs__WEBPACK_IMPORTED_MODULE_6__/* .millisecondsToSeconds */ .X)(currentTime);
},
set time(newTime) {
newTime = (0,_utils_time_conversion_mjs__WEBPACK_IMPORTED_MODULE_6__/* .secondsToMilliseconds */ .f)(newTime);
currentTime = newTime;
if (holdTime !== null || !animationDriver || speed === 0) {
holdTime = newTime;
} else {
startTime = animationDriver.now() - newTime / speed;
}
},
get duration() {
const duration = generator.calculatedDuration === null ? (0,_generators_utils_calc_duration_mjs__WEBPACK_IMPORTED_MODULE_7__/* .calcGeneratorDuration */ .t)(generator) : generator.calculatedDuration;
return (0,_utils_time_conversion_mjs__WEBPACK_IMPORTED_MODULE_6__/* .millisecondsToSeconds */ .X)(duration);
},
get speed() {
return speed;
},
set speed(newSpeed) {
if (newSpeed === speed || !animationDriver) return;
speed = newSpeed;
controls.time = (0,_utils_time_conversion_mjs__WEBPACK_IMPORTED_MODULE_6__/* .millisecondsToSeconds */ .X)(currentTime);
},
get state() {
return playState;
},
play,
pause: () => {
playState = "paused";
holdTime = currentTime;
},
stop: () => {
hasStopped = true;
if (playState === "idle") return;
playState = "idle";
onStop && onStop();
cancel();
},
cancel: () => {
if (cancelTime !== null) tick(cancelTime);
cancel();
},
complete: () => {
playState = "finished";
},
sample: elapsed => {
startTime = 0;
return tick(elapsed);
}
};
return controls;
}
/***/ }),
/***/ 731339:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ s: () => (/* binding */ createAcceleratedAnimation)
/* harmony export */ });
/* harmony import */ var _index_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(970524);
/* harmony import */ var _easing_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(655719);
/* harmony import */ var _utils_get_final_keyframe_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(946366);
/* harmony import */ var _js_index_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(731603);
/* harmony import */ var _utils_time_conversion_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(660127);
/* harmony import */ var _utils_memo_mjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(696407);
/* harmony import */ var _utils_noop_mjs__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(78777);
/* harmony import */ var _frameloop_frame_mjs__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(277210);
const supportsWaapi = (0,_utils_memo_mjs__WEBPACK_IMPORTED_MODULE_5__/* .memo */ .p)(() => Object.hasOwnProperty.call(Element.prototype, "animate"));
/**
* A list of values that can be hardware-accelerated.
*/
const acceleratedValues = new Set(["opacity", "clipPath", "filter", "transform", "backgroundColor"]);
/**
* 10ms is chosen here as it strikes a balance between smooth
* results (more than one keyframe per frame at 60fps) and
* keyframe quantity.
*/
const sampleDelta = 10; //ms
/**
* Implement a practical max duration for keyframe generation
* to prevent infinite loops
*/
const maxDuration = 20000;
const requiresPregeneratedKeyframes = (valueName, options) => options.type === "spring" || valueName === "backgroundColor" || !(0,_easing_mjs__WEBPACK_IMPORTED_MODULE_1__/* .isWaapiSupportedEasing */ .yL)(options.ease);
function createAcceleratedAnimation(value, valueName, {
onUpdate,
onComplete,
...options
}) {
const canAccelerateAnimation = supportsWaapi() && acceleratedValues.has(valueName) && !options.repeatDelay && options.repeatType !== "mirror" && options.damping !== 0 && options.type !== "inertia";
if (!canAccelerateAnimation) return false;
/**
* TODO: Unify with js/index
*/
let hasStopped = false;
let resolveFinishedPromise;
let currentFinishedPromise;
/**
* Cancelling an animation will write to the DOM. For safety we want to defer
* this until the next `update` frame lifecycle. This flag tracks whether we
* have a pending cancel, if so we shouldn't allow animations to finish.
*/
let pendingCancel = false;
/**
* Resolve the current Promise every time we enter the
* finished state. This is WAAPI-compatible behaviour.
*/
const updateFinishedPromise = () => {
currentFinishedPromise = new Promise(resolve => {
resolveFinishedPromise = resolve;
});
};
// Create the first finished promise
updateFinishedPromise();
let {
keyframes,
duration = 300,
ease,
times
} = options;
/**
* If this animation needs pre-generated keyframes then generate.
*/
if (requiresPregeneratedKeyframes(valueName, options)) {
const sampleAnimation = (0,_js_index_mjs__WEBPACK_IMPORTED_MODULE_3__/* .animateValue */ .L)({
...options,
repeat: 0,
delay: 0
});
let state = {
done: false,
value: keyframes[0]
};
const pregeneratedKeyframes = [];
/**
* Bail after 20 seconds of pre-generated keyframes as it's likely
* we're heading for an infinite loop.
*/
let t = 0;
while (!state.done && t < maxDuration) {
state = sampleAnimation.sample(t);
pregeneratedKeyframes.push(state.value);
t += sampleDelta;
}
times = undefined;
keyframes = pregeneratedKeyframes;
duration = t - sampleDelta;
ease = "linear";
}
const animation = (0,_index_mjs__WEBPACK_IMPORTED_MODULE_0__/* .animateStyle */ .X)(value.owner.current, valueName, keyframes, {
...options,
duration,
/**
* This function is currently not called if ease is provided
* as a function so the cast is safe.
*
* However it would be possible for a future refinement to port
* in easing pregeneration from Motion One for browsers that
* support the upcoming `linear()` easing function.
*/
ease: ease,
times
});
const cancelAnimation = () => {
pendingCancel = false;
animation.cancel();
};
const safeCancel = () => {
pendingCancel = true;
_frameloop_frame_mjs__WEBPACK_IMPORTED_MODULE_7__/* .frame */ .Gt.update(cancelAnimation);
resolveFinishedPromise();
updateFinishedPromise();
};
/**
* Prefer the `onfinish` prop as it's more widely supported than
* the `finished` promise.
*
* Here, we synchronously set the provided MotionValue to the end
* keyframe. If we didn't, when the WAAPI animation is finished it would
* be removed from the element which would then revert to its old styles.
*/
animation.onfinish = () => {
if (pendingCancel) return;
value.set((0,_utils_get_final_keyframe_mjs__WEBPACK_IMPORTED_MODULE_2__/* .getFinalKeyframe */ .X)(keyframes, options));
onComplete && onComplete();
safeCancel();
};
/**
* Animation interrupt callback.
*/
const controls = {
then(resolve, reject) {
return currentFinishedPromise.then(resolve, reject);
},
attachTimeline(timeline) {
animation.timeline = timeline;
animation.onfinish = null;
return _utils_noop_mjs__WEBPACK_IMPORTED_MODULE_6__/* .noop */ .l;
},
get time() {
return (0,_utils_time_conversion_mjs__WEBPACK_IMPORTED_MODULE_4__/* .millisecondsToSeconds */ .X)(animation.currentTime || 0);
},
set time(newTime) {
animation.currentTime = (0,_utils_time_conversion_mjs__WEBPACK_IMPORTED_MODULE_4__/* .secondsToMilliseconds */ .f)(newTime);
},
get speed() {
return animation.playbackRate;
},
set speed(newSpeed) {
animation.playbackRate = newSpeed;
},
get duration() {
return (0,_utils_time_conversion_mjs__WEBPACK_IMPORTED_MODULE_4__/* .millisecondsToSeconds */ .X)(duration);
},
play: () => {
if (hasStopped) return;
animation.play();
/**
* Cancel any pending cancel tasks
*/
(0,_frameloop_frame_mjs__WEBPACK_IMPORTED_MODULE_7__/* .cancelFrame */ .WG)(cancelAnimation);
},
pause: () => animation.pause(),
stop: () => {
hasStopped = true;
if (animation.playState === "idle") return;
/**
* WAAPI doesn't natively have any interruption capabilities.
*
* Rather than read commited styles back out of the DOM, we can
* create a renderless JS animation and sample it twice to calculate
* its current value, "previous" value, and therefore allow
* Motion to calculate velocity for any subsequent animation.
*/
const {
currentTime
} = animation;
if (currentTime) {
const sampleAnimation = (0,_js_index_mjs__WEBPACK_IMPORTED_MODULE_3__/* .animateValue */ .L)({
...options,
autoplay: false
});
value.setWithVelocity(sampleAnimation.sample(currentTime - sampleDelta).value, sampleAnimation.sample(currentTime).value, sampleDelta);
}
safeCancel();
},
complete: () => {
if (pendingCancel) return;
animation.finish();
},
cancel: safeCancel
};
return controls;
}
/***/ }),
/***/ 655719:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ TU: () => (/* binding */ mapEasingToNativeEasing),
/* harmony export */ yL: () => (/* binding */ isWaapiSupportedEasing)
/* harmony export */ });
/* unused harmony exports cubicBezierAsString, supportedWaapiEasing */
/* harmony import */ var core_js_modules_esnext_iterator_constructor_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(314846);
/* harmony import */ var core_js_modules_esnext_iterator_every_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(563333);
/* harmony import */ var core_js_modules_esnext_iterator_map_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(194364);
/* harmony import */ var _easing_utils_is_bezier_definition_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(309447);
function isWaapiSupportedEasing(easing) {
return Boolean(!easing || typeof easing === "string" && supportedWaapiEasing[easing] || (0,_easing_utils_is_bezier_definition_mjs__WEBPACK_IMPORTED_MODULE_3__/* .isBezierDefinition */ .D)(easing) || Array.isArray(easing) && easing.every(isWaapiSupportedEasing));
}
const cubicBezierAsString = ([a, b, c, d]) => `cubic-bezier(${a}, ${b}, ${c}, ${d})`;
const supportedWaapiEasing = {
linear: "linear",
ease: "ease",
easeIn: "ease-in",
easeOut: "ease-out",
easeInOut: "ease-in-out",
circIn: cubicBezierAsString([0, 0.65, 0.55, 1]),
circOut: cubicBezierAsString([0.55, 0, 1, 0.45]),
backIn: cubicBezierAsString([0.31, 0.01, 0.66, -0.59]),
backOut: cubicBezierAsString([0.33, 1.53, 0.69, 0.99])
};
function mapEasingToNativeEasing(easing) {
if (!easing) return undefined;
return (0,_easing_utils_is_bezier_definition_mjs__WEBPACK_IMPORTED_MODULE_3__/* .isBezierDefinition */ .D)(easing) ? cubicBezierAsString(easing) : Array.isArray(easing) ? easing.map(mapEasingToNativeEasing) : supportedWaapiEasing[easing];
}
/***/ }),
/***/ 970524:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ X: () => (/* binding */ animateStyle)
/* harmony export */ });
/* harmony import */ var _easing_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(655719);
function animateStyle(element, valueName, keyframes, {
delay = 0,
duration,
repeat = 0,
repeatType = "loop",
ease,
times
} = {}) {
const keyframeOptions = {
[valueName]: keyframes
};
if (times) keyframeOptions.offset = times;
const easing = (0,_easing_mjs__WEBPACK_IMPORTED_MODULE_0__/* .mapEasingToNativeEasing */ .TU)(ease);
/**
* If this is an easing array, apply to keyframes, not animation as a whole
*/
if (Array.isArray(easing)) keyframeOptions.easing = easing;
return element.animate(keyframeOptions, {
delay,
duration,
easing: !Array.isArray(easing) ? easing : "linear",
fill: "both",
iterations: repeat + 1,
direction: repeatType === "reverse" ? "alternate" : "normal"
});
}
/***/ }),
/***/ 946366:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ X: () => (/* binding */ getFinalKeyframe)
/* harmony export */ });
function getFinalKeyframe(keyframes, {
repeat,
repeatType = "loop"
}) {
const index = repeat && repeatType !== "loop" && repeat % 2 === 1 ? 0 : keyframes.length - 1;
return keyframes[index];
}
/***/ }),
/***/ 580835:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ B: () => (/* binding */ inertia)
/* harmony export */ });
/* harmony import */ var _spring_index_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(311789);
/* harmony import */ var _utils_velocity_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(653864);
function inertia({
keyframes,
velocity = 0.0,
power = 0.8,
timeConstant = 325,
bounceDamping = 10,
bounceStiffness = 500,
modifyTarget,
min,
max,
restDelta = 0.5,
restSpeed
}) {
const origin = keyframes[0];
const state = {
done: false,
value: origin
};
const isOutOfBounds = v => min !== undefined && v < min || max !== undefined && v > max;
const nearestBoundary = v => {
if (min === undefined) return max;
if (max === undefined) return min;
return Math.abs(min - v) < Math.abs(max - v) ? min : max;
};
let amplitude = power * velocity;
const ideal = origin + amplitude;
const target = modifyTarget === undefined ? ideal : modifyTarget(ideal);
/**
* If the target has changed we need to re-calculate the amplitude, otherwise
* the animation will start from the wrong position.
*/
if (target !== ideal) amplitude = target - origin;
const calcDelta = t => -amplitude * Math.exp(-t / timeConstant);
const calcLatest = t => target + calcDelta(t);
const applyFriction = t => {
const delta = calcDelta(t);
const latest = calcLatest(t);
state.done = Math.abs(delta) <= restDelta;
state.value = state.done ? target : latest;
};
/**
* Ideally this would resolve for t in a stateless way, we could
* do that by always precalculating the animation but as we know
* this will be done anyway we can assume that spring will
* be discovered during that.
*/
let timeReachedBoundary;
let spring$1;
const checkCatchBoundary = t => {
if (!isOutOfBounds(state.value)) return;
timeReachedBoundary = t;
spring$1 = (0,_spring_index_mjs__WEBPACK_IMPORTED_MODULE_0__/* .spring */ .o)({
keyframes: [state.value, nearestBoundary(state.value)],
velocity: (0,_utils_velocity_mjs__WEBPACK_IMPORTED_MODULE_1__/* .calcGeneratorVelocity */ .Y)(calcLatest, t, state.value),
damping: bounceDamping,
stiffness: bounceStiffness,
restDelta,
restSpeed
});
};
checkCatchBoundary(0);
return {
calculatedDuration: null,
next: t => {
/**
* We need to resolve the friction to figure out if we need a
* spring but we don't want to do this twice per frame. So here
* we flag if we updated for this frame and later if we did
* we can skip doing it again.
*/
let hasUpdatedFrame = false;
if (!spring$1 && timeReachedBoundary === undefined) {
hasUpdatedFrame = true;
applyFriction(t);
checkCatchBoundary(t);
}
/**
* If we have a spring and the provided t is beyond the moment the friction
* animation crossed the min/max boundary, use the spring.
*/
if (timeReachedBoundary !== undefined && t > timeReachedBoundary) {
return spring$1.next(t - timeReachedBoundary);
} else {
!hasUpdatedFrame && applyFriction(t);
return state;
}
}
};
}
/***/ }),
/***/ 871098:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ i: () => (/* binding */ keyframes)
/* harmony export */ });
/* unused harmony export defaultEasing */
/* harmony import */ var core_js_modules_esnext_iterator_map_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(194364);
/* harmony import */ var _easing_ease_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(95709);
/* harmony import */ var _easing_utils_is_easing_array_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(148357);
/* harmony import */ var _easing_utils_map_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(392649);
/* harmony import */ var _utils_interpolate_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(323662);
/* harmony import */ var _utils_offsets_default_mjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(766869);
/* harmony import */ var _utils_offsets_time_mjs__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(418057);
function defaultEasing(values, easing) {
return values.map(() => easing || _easing_ease_mjs__WEBPACK_IMPORTED_MODULE_1__/* .easeInOut */ .am).splice(0, values.length - 1);
}
function keyframes({
duration = 300,
keyframes: keyframeValues,
times,
ease = "easeInOut"
}) {
/**
* Easing functions can be externally defined as strings. Here we convert them
* into actual functions.
*/
const easingFunctions = (0,_easing_utils_is_easing_array_mjs__WEBPACK_IMPORTED_MODULE_2__/* .isEasingArray */ .h)(ease) ? ease.map(_easing_utils_map_mjs__WEBPACK_IMPORTED_MODULE_3__/* .easingDefinitionToFunction */ .K) : (0,_easing_utils_map_mjs__WEBPACK_IMPORTED_MODULE_3__/* .easingDefinitionToFunction */ .K)(ease);
/**
* This is the Iterator-spec return value. We ensure it's mutable rather than using a generator
* to reduce GC during animation.
*/
const state = {
done: false,
value: keyframeValues[0]
};
/**
* Create a times array based on the provided 0-1 offsets
*/
const absoluteTimes = (0,_utils_offsets_time_mjs__WEBPACK_IMPORTED_MODULE_6__/* .convertOffsetToTimes */ .A)(
// Only use the provided offsets if they're the correct length
// TODO Maybe we should warn here if there's a length mismatch
times && times.length === keyframeValues.length ? times : (0,_utils_offsets_default_mjs__WEBPACK_IMPORTED_MODULE_5__/* .defaultOffset */ .Z)(keyframeValues), duration);
const mapTimeToKeyframe = (0,_utils_interpolate_mjs__WEBPACK_IMPORTED_MODULE_4__/* .interpolate */ .G)(absoluteTimes, keyframeValues, {
ease: Array.isArray(easingFunctions) ? easingFunctions : defaultEasing(keyframeValues, easingFunctions)
});
return {
calculatedDuration: duration,
next: t => {
state.value = mapTimeToKeyframe(t);
state.done = t >= duration;
return state;
}
};
}
/***/ }),
/***/ 922286:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ aU: () => (/* binding */ calcAngularFreq),
/* harmony export */ pX: () => (/* binding */ findSpring)
/* harmony export */ });
/* unused harmony exports maxDamping, maxDuration, minDamping, minDuration */
/* harmony import */ var _utils_errors_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(841164);
/* harmony import */ var _utils_clamp_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(893138);
/* harmony import */ var _utils_time_conversion_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(660127);
const safeMin = 0.001;
const minDuration = 0.01;
const maxDuration = 10.0;
const minDamping = 0.05;
const maxDamping = 1;
function findSpring({
duration = 800,
bounce = 0.25,
velocity = 0,
mass = 1
}) {
let envelope;
let derivative;
(0,_utils_errors_mjs__WEBPACK_IMPORTED_MODULE_0__/* .warning */ .$)(duration <= (0,_utils_time_conversion_mjs__WEBPACK_IMPORTED_MODULE_2__/* .secondsToMilliseconds */ .f)(maxDuration), "Spring duration must be 10 seconds or less");
let dampingRatio = 1 - bounce;
/**
* Restrict dampingRatio and duration to within acceptable ranges.
*/
dampingRatio = (0,_utils_clamp_mjs__WEBPACK_IMPORTED_MODULE_1__/* .clamp */ .q)(minDamping, maxDamping, dampingRatio);
duration = (0,_utils_clamp_mjs__WEBPACK_IMPORTED_MODULE_1__/* .clamp */ .q)(minDuration, maxDuration, (0,_utils_time_conversion_mjs__WEBPACK_IMPORTED_MODULE_2__/* .millisecondsToSeconds */ .X)(duration));
if (dampingRatio < 1) {
/**
* Underdamped spring
*/
envelope = undampedFreq => {
const exponentialDecay = undampedFreq * dampingRatio;
const delta = exponentialDecay * duration;
const a = exponentialDecay - velocity;
const b = calcAngularFreq(undampedFreq, dampingRatio);
const c = Math.exp(-delta);
return safeMin - a / b * c;
};
derivative = undampedFreq => {
const exponentialDecay = undampedFreq * dampingRatio;
const delta = exponentialDecay * duration;
const d = delta * velocity + velocity;
const e = Math.pow(dampingRatio, 2) * Math.pow(undampedFreq, 2) * duration;
const f = Math.exp(-delta);
const g = calcAngularFreq(Math.pow(undampedFreq, 2), dampingRatio);
const factor = -envelope(undampedFreq) + safeMin > 0 ? -1 : 1;
return factor * ((d - e) * f) / g;
};
} else {
/**
* Critically-damped spring
*/
envelope = undampedFreq => {
const a = Math.exp(-undampedFreq * duration);
const b = (undampedFreq - velocity) * duration + 1;
return -safeMin + a * b;
};
derivative = undampedFreq => {
const a = Math.exp(-undampedFreq * duration);
const b = (velocity - undampedFreq) * (duration * duration);
return a * b;
};
}
const initialGuess = 5 / duration;
const undampedFreq = approximateRoot(envelope, derivative, initialGuess);
duration = (0,_utils_time_conversion_mjs__WEBPACK_IMPORTED_MODULE_2__/* .secondsToMilliseconds */ .f)(duration);
if (isNaN(undampedFreq)) {
return {
stiffness: 100,
damping: 10,
duration
};
} else {
const stiffness = Math.pow(undampedFreq, 2) * mass;
return {
stiffness,
damping: dampingRatio * 2 * Math.sqrt(mass * stiffness),
duration
};
}
}
const rootIterations = 12;
function approximateRoot(envelope, derivative, initialGuess) {
let result = initialGuess;
for (let i = 1; i < rootIterations; i++) {
result = result - envelope(result) / derivative(result);
}
return result;
}
function calcAngularFreq(undampedFreq, dampingRatio) {
return undampedFreq * Math.sqrt(1 - dampingRatio * dampingRatio);
}
/***/ }),
/***/ 311789:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ o: () => (/* binding */ spring)
/* harmony export */ });
/* harmony import */ var core_js_modules_esnext_iterator_constructor_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(314846);
/* harmony import */ var core_js_modules_esnext_iterator_some_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(275568);
/* harmony import */ var _utils_time_conversion_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(660127);
/* harmony import */ var _utils_velocity_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(653864);
/* harmony import */ var _find_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(922286);
const durationKeys = ["duration", "bounce"];
const physicsKeys = ["stiffness", "damping", "mass"];
function isSpringType(options, keys) {
return keys.some(key => options[key] !== undefined);
}
function getSpringOptions(options) {
let springOptions = {
velocity: 0.0,
stiffness: 100,
damping: 10,
mass: 1.0,
isResolvedFromDuration: false,
...options
};
// stiffness/damping/mass overrides duration/bounce
if (!isSpringType(options, physicsKeys) && isSpringType(options, durationKeys)) {
const derived = (0,_find_mjs__WEBPACK_IMPORTED_MODULE_4__/* .findSpring */ .pX)(options);
springOptions = {
...springOptions,
...derived,
mass: 1.0
};
springOptions.isResolvedFromDuration = true;
}
return springOptions;
}
function spring({
keyframes,
restDelta,
restSpeed,
...options
}) {
const origin = keyframes[0];
const target = keyframes[keyframes.length - 1];
/**
* This is the Iterator-spec return value. We ensure it's mutable rather than using a generator
* to reduce GC during animation.
*/
const state = {
done: false,
value: origin
};
const {
stiffness,
damping,
mass,
duration,
velocity,
isResolvedFromDuration
} = getSpringOptions({
...options,
velocity: -(0,_utils_time_conversion_mjs__WEBPACK_IMPORTED_MODULE_2__/* .millisecondsToSeconds */ .X)(options.velocity || 0)
});
const initialVelocity = velocity || 0.0;
const dampingRatio = damping / (2 * Math.sqrt(stiffness * mass));
const initialDelta = target - origin;
const undampedAngularFreq = (0,_utils_time_conversion_mjs__WEBPACK_IMPORTED_MODULE_2__/* .millisecondsToSeconds */ .X)(Math.sqrt(stiffness / mass));
/**
* If we're working on a granular scale, use smaller defaults for determining
* when the spring is finished.
*
* These defaults have been selected emprically based on what strikes a good
* ratio between feeling good and finishing as soon as changes are imperceptible.
*/
const isGranularScale = Math.abs(initialDelta) < 5;
restSpeed || (restSpeed = isGranularScale ? 0.01 : 2);
restDelta || (restDelta = isGranularScale ? 0.005 : 0.5);
let resolveSpring;
if (dampingRatio < 1) {
const angularFreq = (0,_find_mjs__WEBPACK_IMPORTED_MODULE_4__/* .calcAngularFreq */ .aU)(undampedAngularFreq, dampingRatio);
// Underdamped spring
resolveSpring = t => {
const envelope = Math.exp(-dampingRatio * undampedAngularFreq * t);
return target - envelope * ((initialVelocity + dampingRatio * undampedAngularFreq * initialDelta) / angularFreq * Math.sin(angularFreq * t) + initialDelta * Math.cos(angularFreq * t));
};
} else if (dampingRatio === 1) {
// Critically damped spring
resolveSpring = t => target - Math.exp(-undampedAngularFreq * t) * (initialDelta + (initialVelocity + undampedAngularFreq * initialDelta) * t);
} else {
// Overdamped spring
const dampedAngularFreq = undampedAngularFreq * Math.sqrt(dampingRatio * dampingRatio - 1);
resolveSpring = t => {
const envelope = Math.exp(-dampingRatio * undampedAngularFreq * t);
// When performing sinh or cosh values can hit Infinity so we cap them here
const freqForT = Math.min(dampedAngularFreq * t, 300);
return target - envelope * ((initialVelocity + dampingRatio * undampedAngularFreq * initialDelta) * Math.sinh(freqForT) + dampedAngularFreq * initialDelta * Math.cosh(freqForT)) / dampedAngularFreq;
};
}
return {
calculatedDuration: isResolvedFromDuration ? duration || null : null,
next: t => {
const current = resolveSpring(t);
if (!isResolvedFromDuration) {
let currentVelocity = initialVelocity;
if (t !== 0) {
/**
* We only need to calculate velocity for under-damped springs
* as over- and critically-damped springs can't overshoot, so
* checking only for displacement is enough.
*/
if (dampingRatio < 1) {
currentVelocity = (0,_utils_velocity_mjs__WEBPACK_IMPORTED_MODULE_3__/* .calcGeneratorVelocity */ .Y)(resolveSpring, t, current);
} else {
currentVelocity = 0;
}
}
const isBelowVelocityThreshold = Math.abs(currentVelocity) <= restSpeed;
const isBelowDisplacementThreshold = Math.abs(target - current) <= restDelta;
state.done = isBelowVelocityThreshold && isBelowDisplacementThreshold;
} else {
state.done = t >= duration;
}
state.value = state.done ? target : current;
return state;
}
};
}
/***/ }),
/***/ 445795:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ Y: () => (/* binding */ maxGeneratorDuration),
/* harmony export */ t: () => (/* binding */ calcGeneratorDuration)
/* harmony export */ });
/**
* Implement a practical max duration for keyframe generation
* to prevent infinite loops
*/
const maxGeneratorDuration = 20000;
function calcGeneratorDuration(generator) {
let duration = 0;
const timeStep = 50;
let state = generator.next(duration);
while (!state.done && duration < maxGeneratorDuration) {
duration += timeStep;
state = generator.next(duration);
}
return duration >= maxGeneratorDuration ? Infinity : duration;
}
/***/ }),
/***/ 653864:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ Y: () => (/* binding */ calcGeneratorVelocity)
/* harmony export */ });
/* harmony import */ var _utils_velocity_per_second_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(540255);
const velocitySampleDuration = 5; // ms
function calcGeneratorVelocity(resolveValue, t, current) {
const prevT = Math.max(t - velocitySampleDuration, 0);
return (0,_utils_velocity_per_second_mjs__WEBPACK_IMPORTED_MODULE_0__/* .velocityPerSecond */ .f)(current - resolveValue(prevT), t - prevT);
}
/***/ }),
/***/ 439284:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* unused harmony export animationControls */
/* harmony import */ var core_js_modules_esnext_iterator_constructor_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(314846);
/* harmony import */ var core_js_modules_esnext_iterator_for_each_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(469655);
/* harmony import */ var _utils_errors_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(841164);
/* harmony import */ var _render_utils_setters_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(482200);
/* harmony import */ var _interfaces_visual_element_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(104570);
function stopAnimation(visualElement) {
visualElement.values.forEach(value => value.stop());
}
/**
* @public
*/
function animationControls() {
/**
* Track whether the host component has mounted.
*/
let hasMounted = false;
/**
* A collection of linked component animation controls.
*/
const subscribers = new Set();
const controls = {
subscribe(visualElement) {
subscribers.add(visualElement);
return () => void subscribers.delete(visualElement);
},
start(definition, transitionOverride) {
invariant(hasMounted, "controls.start() should only be called after a component has mounted. Consider calling within a useEffect hook.");
const animations = [];
subscribers.forEach(visualElement => {
animations.push(animateVisualElement(visualElement, definition, {
transitionOverride
}));
});
return Promise.all(animations);
},
set(definition) {
invariant(hasMounted, "controls.set() should only be called after a component has mounted. Consider calling within a useEffect hook.");
return subscribers.forEach(visualElement => {
setValues(visualElement, definition);
});
},
stop() {
subscribers.forEach(visualElement => {
stopAnimation(visualElement);
});
},
mount() {
hasMounted = true;
return () => {
hasMounted = false;
controls.stop();
};
}
};
return controls;
}
/***/ }),
/***/ 89528:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* unused harmony export useAnimate */
/* harmony import */ var core_js_modules_esnext_iterator_constructor_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(314846);
/* harmony import */ var core_js_modules_esnext_iterator_for_each_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(469655);
/* harmony import */ var _utils_use_constant_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(416155);
/* harmony import */ var _utils_use_unmount_effect_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(758369);
/* harmony import */ var _animate_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(279611);
function useAnimate() {
const scope = useConstant(() => ({
current: null,
animations: []
}));
const animate = useConstant(() => createScopedAnimate(scope));
useUnmountEffect(() => {
scope.animations.forEach(animation => animation.stop());
});
return [scope, animate];
}
/***/ }),
/***/ 313036:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* unused harmony export useAnimatedState */
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(63696);
/* harmony import */ var _utils_use_constant_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(416155);
/* harmony import */ var _render_utils_setters_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(482200);
/* harmony import */ var _motion_utils_use_visual_state_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(366084);
/* harmony import */ var _projection_geometry_models_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(298944);
/* harmony import */ var _render_VisualElement_mjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(373518);
/* harmony import */ var _interfaces_visual_element_mjs__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(104570);
const createObject = () => ({});
class StateVisualElement extends (/* unused pure expression or super */ null && (VisualElement)) {
build() {}
measureInstanceViewportBox() {
return createBox();
}
resetTransform() {}
restoreTransform() {}
removeValueFromRenderState() {}
renderInstance() {}
scrapeMotionValuesFromProps() {
return createObject();
}
getBaseTargetFromProps() {
return undefined;
}
readValueFromInstance(_state, key, options) {
return options.initialState[key] || 0;
}
sortInstanceNodePosition() {
return 0;
}
makeTargetAnimatableFromInstance({
transition,
transitionEnd,
...target
}) {
const origin = getOrigin(target, transition || {}, this);
checkTargetForNewValues(this, target, origin);
return {
transition,
transitionEnd,
...target
};
}
}
const useVisualState = (0,_motion_utils_use_visual_state_mjs__WEBPACK_IMPORTED_MODULE_3__/* .makeUseVisualState */ .T)({
scrapeMotionValuesFromProps: createObject,
createRenderState: createObject
});
/**
* This is not an officially supported API and may be removed
* on any version.
*/
function useAnimatedState(initialState) {
const [animationState, setAnimationState] = useState(initialState);
const visualState = useVisualState({}, false);
const element = useConstant(() => {
return new StateVisualElement({
props: {},
visualState,
presenceContext: null
}, {
initialState
});
});
useEffect(() => {
element.mount({});
return () => element.unmount();
}, [element]);
useEffect(() => {
element.update({
onUpdate: v => {
setAnimationState({
...v
});
}
}, null);
}, [setAnimationState, element]);
const startAnimation = useConstant(() => animationDefinition => {
return animateVisualElement(element, animationDefinition);
});
return [animationState, startAnimation];
}
/***/ }),
/***/ 578843:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* unused harmony exports useAnimation, useAnimationControls */
/* harmony import */ var _animation_controls_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(439284);
/* harmony import */ var _utils_use_constant_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(416155);
/* harmony import */ var _utils_use_isomorphic_effect_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(117946);
/**
* Creates `AnimationControls`, which can be used to manually start, stop
* and sequence animations on one or more components.
*
* The returned `AnimationControls` should be passed to the `animate` property
* of the components you want to animate.
*
* These components can then be animated with the `start` method.
*
* ```jsx
* import * as React from 'react'
* import { motion, useAnimation } from 'framer-motion'
*
* export function MyComponent(props) {
* const controls = useAnimation()
*
* controls.start({
* x: 100,
* transition: { duration: 0.5 },
* })
*
* return <motion.div animate={controls} />
* }
* ```
*
* @returns Animation controller with `start` and `stop` methods
*
* @public
*/
function useAnimationControls() {
const controls = useConstant(animationControls);
useIsomorphicLayoutEffect(controls.mount, []);
return controls;
}
const useAnimation = (/* unused pure expression or super */ null && (useAnimationControls));
/***/ }),
/***/ 430091:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ f: () => (/* binding */ animateMotionValue)
/* harmony export */ });
/* harmony import */ var _utils_errors_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(841164);
/* harmony import */ var _utils_time_conversion_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(660127);
/* harmony import */ var _utils_use_instant_transition_state_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(300934);
/* harmony import */ var _animators_waapi_create_accelerated_animation_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(731339);
/* harmony import */ var _animators_instant_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(965402);
/* harmony import */ var _utils_default_transitions_mjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(961748);
/* harmony import */ var _utils_is_animatable_mjs__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(710841);
/* harmony import */ var _utils_keyframes_mjs__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(87451);
/* harmony import */ var _utils_transitions_mjs__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(955104);
/* harmony import */ var _animators_js_index_mjs__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(731603);
/* harmony import */ var _utils_GlobalConfig_mjs__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(718966);
const animateMotionValue = (valueName, value, target, transition = {}) => {
return onComplete => {
const valueTransition = (0,_utils_transitions_mjs__WEBPACK_IMPORTED_MODULE_8__/* .getValueTransition */ .r)(transition, valueName) || {};
/**
* Most transition values are currently completely overwritten by value-specific
* transitions. In the future it'd be nicer to blend these transitions. But for now
* delay actually does inherit from the root transition if not value-specific.
*/
const delay = valueTransition.delay || transition.delay || 0;
/**
* Elapsed isn't a public transition option but can be passed through from
* optimized appear effects in milliseconds.
*/
let {
elapsed = 0
} = transition;
elapsed = elapsed - (0,_utils_time_conversion_mjs__WEBPACK_IMPORTED_MODULE_1__/* .secondsToMilliseconds */ .f)(delay);
const keyframes = (0,_utils_keyframes_mjs__WEBPACK_IMPORTED_MODULE_7__/* .getKeyframes */ .I)(value, valueName, target, valueTransition);
/**
* Check if we're able to animate between the start and end keyframes,
* and throw a warning if we're attempting to animate between one that's
* animatable and another that isn't.
*/
const originKeyframe = keyframes[0];
const targetKeyframe = keyframes[keyframes.length - 1];
const isOriginAnimatable = (0,_utils_is_animatable_mjs__WEBPACK_IMPORTED_MODULE_6__/* .isAnimatable */ .P)(valueName, originKeyframe);
const isTargetAnimatable = (0,_utils_is_animatable_mjs__WEBPACK_IMPORTED_MODULE_6__/* .isAnimatable */ .P)(valueName, targetKeyframe);
(0,_utils_errors_mjs__WEBPACK_IMPORTED_MODULE_0__/* .warning */ .$)(isOriginAnimatable === isTargetAnimatable, `You are trying to animate ${valueName} from "${originKeyframe}" to "${targetKeyframe}". ${originKeyframe} is not an animatable value - to enable this animation set ${originKeyframe} to a value animatable to ${targetKeyframe} via the \`style\` property.`);
let options = {
keyframes,
velocity: value.getVelocity(),
ease: "easeOut",
...valueTransition,
delay: -elapsed,
onUpdate: v => {
value.set(v);
valueTransition.onUpdate && valueTransition.onUpdate(v);
},
onComplete: () => {
onComplete();
valueTransition.onComplete && valueTransition.onComplete();
}
};
/**
* If there's no transition defined for this value, we can generate
* unqiue transition settings for this value.
*/
if (!(0,_utils_transitions_mjs__WEBPACK_IMPORTED_MODULE_8__/* .isTransitionDefined */ .D)(valueTransition)) {
options = {
...options,
...(0,_utils_default_transitions_mjs__WEBPACK_IMPORTED_MODULE_5__/* .getDefaultTransition */ .x)(valueName, options)
};
}
/**
* Both WAAPI and our internal animation functions use durations
* as defined by milliseconds, while our external API defines them
* as seconds.
*/
if (options.duration) {
options.duration = (0,_utils_time_conversion_mjs__WEBPACK_IMPORTED_MODULE_1__/* .secondsToMilliseconds */ .f)(options.duration);
}
if (options.repeatDelay) {
options.repeatDelay = (0,_utils_time_conversion_mjs__WEBPACK_IMPORTED_MODULE_1__/* .secondsToMilliseconds */ .f)(options.repeatDelay);
}
if (!isOriginAnimatable || !isTargetAnimatable || _utils_use_instant_transition_state_mjs__WEBPACK_IMPORTED_MODULE_2__/* .instantAnimationState */ .d.current || valueTransition.type === false || _utils_GlobalConfig_mjs__WEBPACK_IMPORTED_MODULE_10__/* .MotionGlobalConfig */ .W.skipAnimations) {
/**
* If we can't animate this value, or the global instant animation flag is set,
* or this is simply defined as an instant transition, return an instant transition.
*/
return (0,_animators_instant_mjs__WEBPACK_IMPORTED_MODULE_4__/* .createInstantAnimation */ .Q)(_utils_use_instant_transition_state_mjs__WEBPACK_IMPORTED_MODULE_2__/* .instantAnimationState */ .d.current ? {
...options,
delay: 0
} : options);
}
/**
* Animate via WAAPI if possible.
*/
if (
/**
* If this is a handoff animation, the optimised animation will be running via
* WAAPI. Therefore, this animation must be JS to ensure it runs "under" the
* optimised animation.
*/
!transition.isHandoff && value.owner && value.owner.current instanceof HTMLElement &&
/**
* If we're outputting values to onUpdate then we can't use WAAPI as there's
* no way to read the value from WAAPI every frame.
*/
!value.owner.getProps().onUpdate) {
const acceleratedAnimation = (0,_animators_waapi_create_accelerated_animation_mjs__WEBPACK_IMPORTED_MODULE_3__/* .createAcceleratedAnimation */ .s)(value, valueName, options);
if (acceleratedAnimation) return acceleratedAnimation;
}
/**
* If we didn't create an accelerated animation, create a JS animation
*/
return (0,_animators_js_index_mjs__WEBPACK_IMPORTED_MODULE_9__/* .animateValue */ .L)(options);
};
};
/***/ }),
/***/ 641041:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ z: () => (/* binding */ animateSingleValue)
/* harmony export */ });
/* harmony import */ var _motion_value_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(430091);
/* harmony import */ var _value_index_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(239667);
/* harmony import */ var _value_utils_is_motion_value_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(573970);
function animateSingleValue(value, keyframes, options) {
const motionValue$1 = (0,_value_utils_is_motion_value_mjs__WEBPACK_IMPORTED_MODULE_2__/* .isMotionValue */ .S)(value) ? value : (0,_value_index_mjs__WEBPACK_IMPORTED_MODULE_1__/* .motionValue */ .OQ)(value);
motionValue$1.start((0,_motion_value_mjs__WEBPACK_IMPORTED_MODULE_0__/* .animateMotionValue */ .f)("", motionValue$1, keyframes, options));
return motionValue$1.animation;
}
/***/ }),
/***/ 430388:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ $: () => (/* binding */ animateTarget)
/* harmony export */ });
/* harmony import */ var _render_html_utils_transform_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(353994);
/* harmony import */ var _optimized_appear_data_id_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(150170);
/* harmony import */ var _motion_value_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(430091);
/* harmony import */ var _value_use_will_change_is_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(146547);
/* harmony import */ var _render_utils_setters_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(482200);
/* harmony import */ var _utils_transitions_mjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(955104);
/* harmony import */ var _frameloop_frame_mjs__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(277210);
/**
* Decide whether we should block this animation. Previously, we achieved this
* just by checking whether the key was listed in protectedKeys, but this
* posed problems if an animation was triggered by afterChildren and protectedKeys
* had been set to true in the meantime.
*/
function shouldBlockAnimation({
protectedKeys,
needsAnimating
}, key) {
const shouldBlock = protectedKeys.hasOwnProperty(key) && needsAnimating[key] !== true;
needsAnimating[key] = false;
return shouldBlock;
}
function hasKeyframesChanged(value, target) {
const current = value.get();
if (Array.isArray(target)) {
for (let i = 0; i < target.length; i++) {
if (target[i] !== current) return true;
}
} else {
return current !== target;
}
}
function animateTarget(visualElement, definition, {
delay = 0,
transitionOverride,
type
} = {}) {
let {
transition = visualElement.getDefaultTransition(),
transitionEnd,
...target
} = visualElement.makeTargetAnimatable(definition);
const willChange = visualElement.getValue("willChange");
if (transitionOverride) transition = transitionOverride;
const animations = [];
const animationTypeState = type && visualElement.animationState && visualElement.animationState.getState()[type];
for (const key in target) {
const value = visualElement.getValue(key);
const valueTarget = target[key];
if (!value || valueTarget === undefined || animationTypeState && shouldBlockAnimation(animationTypeState, key)) {
continue;
}
const valueTransition = {
delay,
elapsed: 0,
...(0,_utils_transitions_mjs__WEBPACK_IMPORTED_MODULE_5__/* .getValueTransition */ .r)(transition || {}, key)
};
/**
* If this is the first time a value is being animated, check
* to see if we're handling off from an existing animation.
*/
if (window.HandoffAppearAnimations) {
const appearId = visualElement.getProps()[_optimized_appear_data_id_mjs__WEBPACK_IMPORTED_MODULE_1__/* .optimizedAppearDataAttribute */ .n];
if (appearId) {
const elapsed = window.HandoffAppearAnimations(appearId, key, value, _frameloop_frame_mjs__WEBPACK_IMPORTED_MODULE_6__/* .frame */ .Gt);
if (elapsed !== null) {
valueTransition.elapsed = elapsed;
valueTransition.isHandoff = true;
}
}
}
let canSkip = !valueTransition.isHandoff && !hasKeyframesChanged(value, valueTarget);
if (valueTransition.type === "spring" && (value.getVelocity() || valueTransition.velocity)) {
canSkip = false;
}
/**
* Temporarily disable skipping animations if there's an animation in
* progress. Better would be to track the current target of a value
* and compare that against valueTarget.
*/
if (value.animation) {
canSkip = false;
}
if (canSkip) continue;
value.start((0,_motion_value_mjs__WEBPACK_IMPORTED_MODULE_2__/* .animateMotionValue */ .f)(key, value, valueTarget, visualElement.shouldReduceMotion && _render_html_utils_transform_mjs__WEBPACK_IMPORTED_MODULE_0__/* .transformProps */ .f.has(key) ? {
type: false
} : valueTransition));
const animation = value.animation;
if ((0,_value_use_will_change_is_mjs__WEBPACK_IMPORTED_MODULE_3__/* .isWillChangeMotionValue */ .k)(willChange)) {
willChange.add(key);
animation.then(() => willChange.remove(key));
}
animations.push(animation);
}
if (transitionEnd) {
Promise.all(animations).then(() => {
transitionEnd && (0,_render_utils_setters_mjs__WEBPACK_IMPORTED_MODULE_4__/* .setTarget */ .Uo)(visualElement, transitionEnd);
});
}
return animations;
}
/***/ }),
/***/ 80930:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ l: () => (/* binding */ animateVariant)
/* harmony export */ });
/* unused harmony export sortByTreeOrder */
/* harmony import */ var core_js_modules_esnext_iterator_constructor_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(314846);
/* harmony import */ var core_js_modules_esnext_iterator_for_each_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(469655);
/* harmony import */ var _render_utils_resolve_dynamic_variants_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(683695);
/* harmony import */ var _visual_element_target_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(430388);
function animateVariant(visualElement, variant, options = {}) {
const resolved = (0,_render_utils_resolve_dynamic_variants_mjs__WEBPACK_IMPORTED_MODULE_2__/* .resolveVariant */ .K)(visualElement, variant, options.custom);
let {
transition = visualElement.getDefaultTransition() || {}
} = resolved || {};
if (options.transitionOverride) {
transition = options.transitionOverride;
}
/**
* If we have a variant, create a callback that runs it as an animation.
* Otherwise, we resolve a Promise immediately for a composable no-op.
*/
const getAnimation = resolved ? () => Promise.all((0,_visual_element_target_mjs__WEBPACK_IMPORTED_MODULE_3__/* .animateTarget */ .$)(visualElement, resolved, options)) : () => Promise.resolve();
/**
* If we have children, create a callback that runs all their animations.
* Otherwise, we resolve a Promise immediately for a composable no-op.
*/
const getChildAnimations = visualElement.variantChildren && visualElement.variantChildren.size ? (forwardDelay = 0) => {
const {
delayChildren = 0,
staggerChildren,
staggerDirection
} = transition;
return animateChildren(visualElement, variant, delayChildren + forwardDelay, staggerChildren, staggerDirection, options);
} : () => Promise.resolve();
/**
* If the transition explicitly defines a "when" option, we need to resolve either
* this animation or all children animations before playing the other.
*/
const {
when
} = transition;
if (when) {
const [first, last] = when === "beforeChildren" ? [getAnimation, getChildAnimations] : [getChildAnimations, getAnimation];
return first().then(() => last());
} else {
return Promise.all([getAnimation(), getChildAnimations(options.delay)]);
}
}
function animateChildren(visualElement, variant, delayChildren = 0, staggerChildren = 0, staggerDirection = 1, options) {
const animations = [];
const maxStaggerDuration = (visualElement.variantChildren.size - 1) * staggerChildren;
const generateStaggerDuration = staggerDirection === 1 ? (i = 0) => i * staggerChildren : (i = 0) => maxStaggerDuration - i * staggerChildren;
Array.from(visualElement.variantChildren).sort(sortByTreeOrder).forEach((child, i) => {
child.notify("AnimationStart", variant);
animations.push(animateVariant(child, variant, {
...options,
delay: delayChildren + generateStaggerDuration(i)
}).then(() => child.notify("AnimationComplete", variant)));
});
return Promise.all(animations);
}
function sortByTreeOrder(a, b) {
return a.sortNodePosition(b);
}
/***/ }),
/***/ 104570:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ _: () => (/* binding */ animateVisualElement)
/* harmony export */ });
/* harmony import */ var core_js_modules_esnext_iterator_map_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(194364);
/* harmony import */ var _render_utils_resolve_dynamic_variants_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(683695);
/* harmony import */ var _visual_element_target_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(430388);
/* harmony import */ var _visual_element_variant_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(80930);
function animateVisualElement(visualElement, definition, options = {}) {
visualElement.notify("AnimationStart", definition);
let animation;
if (Array.isArray(definition)) {
const animations = definition.map(variant => (0,_visual_element_variant_mjs__WEBPACK_IMPORTED_MODULE_3__/* .animateVariant */ .l)(visualElement, variant, options));
animation = Promise.all(animations);
} else if (typeof definition === "string") {
animation = (0,_visual_element_variant_mjs__WEBPACK_IMPORTED_MODULE_3__/* .animateVariant */ .l)(visualElement, definition, options);
} else {
const resolvedDefinition = typeof definition === "function" ? (0,_render_utils_resolve_dynamic_variants_mjs__WEBPACK_IMPORTED_MODULE_1__/* .resolveVariant */ .K)(visualElement, definition, options.custom) : definition;
animation = Promise.all((0,_visual_element_target_mjs__WEBPACK_IMPORTED_MODULE_2__/* .animateTarget */ .$)(visualElement, resolvedDefinition, options));
}
return animation.then(() => visualElement.notify("AnimationComplete", definition));
}
/***/ }),
/***/ 150170:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ n: () => (/* binding */ optimizedAppearDataAttribute)
/* harmony export */ });
/* unused harmony export optimizedAppearDataId */
/* harmony import */ var _render_dom_utils_camel_to_dash_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(493388);
const optimizedAppearDataId = "framerAppearId";
const optimizedAppearDataAttribute = "data-" + (0,_render_dom_utils_camel_to_dash_mjs__WEBPACK_IMPORTED_MODULE_0__/* .camelToDash */ .I)(optimizedAppearDataId);
/***/ }),
/***/ 465446:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* unused harmony export handoffOptimizedAppearAnimation */
/* harmony import */ var _render_html_utils_transform_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(353994);
/* harmony import */ var _store_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(571331);
/* harmony import */ var _store_id_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(564615);
let handoffFrameTime;
function handoffOptimizedAppearAnimation(elementId, valueName,
/**
* Legacy arguments. This function is inlined as part of SSG so it can be there's
* a version mismatch between the main included Motion and the inlined script.
*
* Remove in early 2024.
*/
_value, _frame) {
const optimisedValueName = transformProps.has(valueName) ? "transform" : valueName;
const storeId = appearStoreId(elementId, optimisedValueName);
const optimisedAnimation = appearAnimationStore.get(storeId);
if (!optimisedAnimation) {
return null;
}
const {
animation,
startTime
} = optimisedAnimation;
const cancelAnimation = () => {
appearAnimationStore.delete(storeId);
try {
animation.cancel();
} catch (error) {}
};
/**
* If the startTime is null, this animation is the Paint Ready detection animation
* and we can cancel it immediately without handoff.
*
* Or if we've already handed off the animation then we're now interrupting it.
* In which case we need to cancel it.
*/
if (startTime === null || window.HandoffComplete) {
cancelAnimation();
return null;
} else {
/**
* Otherwise we're handing off this animation to the main thread.
*
* Record the time of the first handoff. We call performance.now() once
* here and once in startOptimisedAnimation to ensure we're getting
* close to a frame-locked time. This keeps all animations in sync.
*/
if (handoffFrameTime === undefined) {
handoffFrameTime = performance.now();
}
/**
* We use main thread timings vs those returned by Animation.currentTime as it
* can be the case, particularly in Firefox, that currentTime doesn't return
* an updated value for several frames, even as the animation plays smoothly via
* the GPU.
*/
return handoffFrameTime - startTime || 0;
}
}
/***/ }),
/***/ 966540:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* unused harmony export startOptimizedAppearAnimation */
/* harmony import */ var _store_id_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(564615);
/* harmony import */ var _animators_waapi_index_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(970524);
/* harmony import */ var _data_id_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(150170);
/* harmony import */ var _handoff_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(465446);
/* harmony import */ var _store_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(571331);
/* harmony import */ var _utils_noop_mjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(78777);
/**
* A single time to use across all animations to manually set startTime
* and ensure they're all in sync.
*/
let startFrameTime;
/**
* A dummy animation to detect when Chrome is ready to start
* painting the page and hold off from triggering the real animation
* until then. We only need one animation to detect paint ready.
*
* https://bugs.chromium.org/p/chromium/issues/detail?id=1406850
*/
let readyAnimation;
function startOptimizedAppearAnimation(element, name, keyframes, options, onReady) {
// Prevent optimised appear animations if Motion has already started animating.
if (window.HandoffComplete) {
window.HandoffAppearAnimations = undefined;
return;
}
const id = element.dataset[optimizedAppearDataId];
if (!id) return;
window.HandoffAppearAnimations = handoffOptimizedAppearAnimation;
const storeId = appearStoreId(id, name);
if (!readyAnimation) {
readyAnimation = animateStyle(element, name, [keyframes[0], keyframes[0]],
/**
* 10 secs is basically just a super-safe duration to give Chrome
* long enough to get the animation ready.
*/
{
duration: 10000,
ease: "linear"
});
appearAnimationStore.set(storeId, {
animation: readyAnimation,
startTime: null
});
}
const startAnimation = () => {
readyAnimation.cancel();
const appearAnimation = animateStyle(element, name, keyframes, options);
/**
* Record the time of the first started animation. We call performance.now() once
* here and once in handoff to ensure we're getting
* close to a frame-locked time. This keeps all animations in sync.
*/
if (startFrameTime === undefined) {
startFrameTime = performance.now();
}
appearAnimation.startTime = startFrameTime;
appearAnimationStore.set(storeId, {
animation: appearAnimation,
startTime: startFrameTime
});
if (onReady) onReady(appearAnimation);
};
if (readyAnimation.ready) {
readyAnimation.ready.then(startAnimation).catch(noop);
} else {
startAnimation();
}
}
/***/ }),
/***/ 564615:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* unused harmony export appearStoreId */
const appearStoreId = (id, value) => `${id}: ${value}`;
/***/ }),
/***/ 571331:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* unused harmony export appearAnimationStore */
const appearAnimationStore = new Map();
/***/ }),
/***/ 486360:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ l: () => (/* binding */ createAnimationsFromSequence)
/* harmony export */ });
/* unused harmony export getValueTransition */
/* harmony import */ var core_js_modules_es_array_at_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(295913);
/* harmony import */ var core_js_modules_es_string_at_alternative_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(412587);
/* harmony import */ var core_js_modules_esnext_iterator_constructor_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(314846);
/* harmony import */ var core_js_modules_esnext_iterator_every_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(563333);
/* harmony import */ var core_js_modules_esnext_iterator_for_each_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(469655);
/* harmony import */ var _easing_utils_create_generator_easing_mjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(838389);
/* harmony import */ var _render_dom_utils_resolve_element_mjs__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(801822);
/* harmony import */ var _utils_offsets_default_mjs__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(766869);
/* harmony import */ var _utils_offsets_fill_mjs__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(774641);
/* harmony import */ var _utils_progress_mjs__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(799020);
/* harmony import */ var _utils_time_conversion_mjs__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(660127);
/* harmony import */ var _value_utils_is_motion_value_mjs__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(573970);
/* harmony import */ var _utils_calc_time_mjs__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(387441);
/* harmony import */ var _utils_edit_mjs__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(157766);
/* harmony import */ var _utils_sort_mjs__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(203846);
const defaultSegmentEasing = "easeInOut";
function createAnimationsFromSequence(sequence, {
defaultTransition = {},
...sequenceTransition
} = {}, scope) {
const defaultDuration = defaultTransition.duration || 0.3;
const animationDefinitions = new Map();
const sequences = new Map();
const elementCache = {};
const timeLabels = new Map();
let prevTime = 0;
let currentTime = 0;
let totalDuration = 0;
/**
* Build the timeline by mapping over the sequence array and converting
* the definitions into keyframes and offsets with absolute time values.
* These will later get converted into relative offsets in a second pass.
*/
for (let i = 0; i < sequence.length; i++) {
const segment = sequence[i];
/**
* If this is a timeline label, mark it and skip the rest of this iteration.
*/
if (typeof segment === "string") {
timeLabels.set(segment, currentTime);
continue;
} else if (!Array.isArray(segment)) {
timeLabels.set(segment.name, (0,_utils_calc_time_mjs__WEBPACK_IMPORTED_MODULE_12__/* .calcNextTime */ .u)(currentTime, segment.at, prevTime, timeLabels));
continue;
}
let [subject, keyframes, transition = {}] = segment;
/**
* If a relative or absolute time value has been specified we need to resolve
* it in relation to the currentTime.
*/
if (transition.at !== undefined) {
currentTime = (0,_utils_calc_time_mjs__WEBPACK_IMPORTED_MODULE_12__/* .calcNextTime */ .u)(currentTime, transition.at, prevTime, timeLabels);
}
/**
* Keep track of the maximum duration in this definition. This will be
* applied to currentTime once the definition has been parsed.
*/
let maxDuration = 0;
const resolveValueSequence = (valueKeyframes, valueTransition, valueSequence, elementIndex = 0, numElements = 0) => {
const valueKeyframesAsList = keyframesAsList(valueKeyframes);
const {
delay = 0,
times = (0,_utils_offsets_default_mjs__WEBPACK_IMPORTED_MODULE_7__/* .defaultOffset */ .Z)(valueKeyframesAsList),
type = "keyframes",
...remainingTransition
} = valueTransition;
let {
ease = defaultTransition.ease || "easeOut",
duration
} = valueTransition;
/**
* Resolve stagger() if defined.
*/
const calculatedDelay = typeof delay === "function" ? delay(elementIndex, numElements) : delay;
/**
* If this animation should and can use a spring, generate a spring easing function.
*/
const numKeyframes = valueKeyframesAsList.length;
if (numKeyframes <= 2 && type === "spring") {
/**
* As we're creating an easing function from a spring,
* ideally we want to generate it using the real distance
* between the two keyframes. However this isn't always
* possible - in these situations we use 0-100.
*/
let absoluteDelta = 100;
if (numKeyframes === 2 && isNumberKeyframesArray(valueKeyframesAsList)) {
const delta = valueKeyframesAsList[1] - valueKeyframesAsList[0];
absoluteDelta = Math.abs(delta);
}
const springTransition = {
...remainingTransition
};
if (duration !== undefined) {
springTransition.duration = (0,_utils_time_conversion_mjs__WEBPACK_IMPORTED_MODULE_10__/* .secondsToMilliseconds */ .f)(duration);
}
const springEasing = (0,_easing_utils_create_generator_easing_mjs__WEBPACK_IMPORTED_MODULE_5__/* .createGeneratorEasing */ .X)(springTransition, absoluteDelta);
ease = springEasing.ease;
duration = springEasing.duration;
}
duration !== null && duration !== void 0 ? duration : duration = defaultDuration;
const startTime = currentTime + calculatedDelay;
const targetTime = startTime + duration;
/**
* If there's only one time offset of 0, fill in a second with length 1
*/
if (times.length === 1 && times[0] === 0) {
times[1] = 1;
}
/**
* Fill out if offset if fewer offsets than keyframes
*/
const remainder = times.length - valueKeyframesAsList.length;
remainder > 0 && (0,_utils_offsets_fill_mjs__WEBPACK_IMPORTED_MODULE_8__/* .fillOffset */ .f)(times, remainder);
/**
* If only one value has been set, ie [1], push a null to the start of
* the keyframe array. This will let us mark a keyframe at this point
* that will later be hydrated with the previous value.
*/
valueKeyframesAsList.length === 1 && valueKeyframesAsList.unshift(null);
/**
* Add keyframes, mapping offsets to absolute time.
*/
(0,_utils_edit_mjs__WEBPACK_IMPORTED_MODULE_13__/* .addKeyframes */ .H)(valueSequence, valueKeyframesAsList, ease, times, startTime, targetTime);
maxDuration = Math.max(calculatedDelay + duration, maxDuration);
totalDuration = Math.max(targetTime, totalDuration);
};
if ((0,_value_utils_is_motion_value_mjs__WEBPACK_IMPORTED_MODULE_11__/* .isMotionValue */ .S)(subject)) {
const subjectSequence = getSubjectSequence(subject, sequences);
resolveValueSequence(keyframes, transition, getValueSequence("default", subjectSequence));
} else {
/**
* Find all the elements specified in the definition and parse value
* keyframes from their timeline definitions.
*/
const elements = (0,_render_dom_utils_resolve_element_mjs__WEBPACK_IMPORTED_MODULE_6__/* .resolveElements */ .K)(subject, scope, elementCache);
const numElements = elements.length;
/**
* For every element in this segment, process the defined values.
*/
for (let elementIndex = 0; elementIndex < numElements; elementIndex++) {
/**
* Cast necessary, but we know these are of this type
*/
keyframes = keyframes;
transition = transition;
const element = elements[elementIndex];
const subjectSequence = getSubjectSequence(element, sequences);
for (const key in keyframes) {
resolveValueSequence(keyframes[key], getValueTransition(transition, key), getValueSequence(key, subjectSequence), elementIndex, numElements);
}
}
}
prevTime = currentTime;
currentTime += maxDuration;
}
/**
* For every element and value combination create a new animation.
*/
sequences.forEach((valueSequences, element) => {
for (const key in valueSequences) {
const valueSequence = valueSequences[key];
/**
* Arrange all the keyframes in ascending time order.
*/
valueSequence.sort(_utils_sort_mjs__WEBPACK_IMPORTED_MODULE_14__/* .compareByTime */ .Y);
const keyframes = [];
const valueOffset = [];
const valueEasing = [];
/**
* For each keyframe, translate absolute times into
* relative offsets based on the total duration of the timeline.
*/
for (let i = 0; i < valueSequence.length; i++) {
const {
at,
value,
easing
} = valueSequence[i];
keyframes.push(value);
valueOffset.push((0,_utils_progress_mjs__WEBPACK_IMPORTED_MODULE_9__/* .progress */ .q)(0, totalDuration, at));
valueEasing.push(easing || "easeOut");
}
/**
* If the first keyframe doesn't land on offset: 0
* provide one by duplicating the initial keyframe. This ensures
* it snaps to the first keyframe when the animation starts.
*/
if (valueOffset[0] !== 0) {
valueOffset.unshift(0);
keyframes.unshift(keyframes[0]);
valueEasing.unshift(defaultSegmentEasing);
}
/**
* If the last keyframe doesn't land on offset: 1
* provide one with a null wildcard value. This will ensure it
* stays static until the end of the animation.
*/
if (valueOffset[valueOffset.length - 1] !== 1) {
valueOffset.push(1);
keyframes.push(null);
}
if (!animationDefinitions.has(element)) {
animationDefinitions.set(element, {
keyframes: {},
transition: {}
});
}
const definition = animationDefinitions.get(element);
definition.keyframes[key] = keyframes;
definition.transition[key] = {
...defaultTransition,
duration: totalDuration,
ease: valueEasing,
times: valueOffset,
...sequenceTransition
};
}
});
return animationDefinitions;
}
function getSubjectSequence(subject, sequences) {
!sequences.has(subject) && sequences.set(subject, {});
return sequences.get(subject);
}
function getValueSequence(name, sequences) {
if (!sequences[name]) sequences[name] = [];
return sequences[name];
}
function keyframesAsList(keyframes) {
return Array.isArray(keyframes) ? keyframes : [keyframes];
}
function getValueTransition(transition, key) {
return transition[key] ? {
...transition,
...transition[key]
} : {
...transition
};
}
const isNumber = keyframe => typeof keyframe === "number";
const isNumberKeyframesArray = keyframes => keyframes.every(isNumber);
/***/ }),
/***/ 387441:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ u: () => (/* binding */ calcNextTime)
/* harmony export */ });
/**
* Given a absolute or relative time definition and current/prev time state of the sequence,
* calculate an absolute time for the next keyframes.
*/
function calcNextTime(current, next, prev, labels) {
var _a;
if (typeof next === "number") {
return next;
} else if (next.startsWith("-") || next.startsWith("+")) {
return Math.max(0, current + parseFloat(next));
} else if (next === "<") {
return prev;
} else {
return (_a = labels.get(next)) !== null && _a !== void 0 ? _a : current;
}
}
/***/ }),
/***/ 157766:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ H: () => (/* binding */ addKeyframes)
/* harmony export */ });
/* unused harmony export eraseKeyframes */
/* harmony import */ var core_js_modules_es_array_at_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(295913);
/* harmony import */ var core_js_modules_es_string_at_alternative_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(412587);
/* harmony import */ var _easing_utils_get_easing_for_segment_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(796105);
/* harmony import */ var _utils_array_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(890604);
/* harmony import */ var _utils_mix_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(26085);
function eraseKeyframes(sequence, startTime, endTime) {
for (let i = 0; i < sequence.length; i++) {
const keyframe = sequence[i];
if (keyframe.at > startTime && keyframe.at < endTime) {
(0,_utils_array_mjs__WEBPACK_IMPORTED_MODULE_3__/* .removeItem */ .Ai)(sequence, keyframe);
// If we remove this item we have to push the pointer back one
i--;
}
}
}
function addKeyframes(sequence, keyframes, easing, offset, startTime, endTime) {
/**
* Erase every existing value between currentTime and targetTime,
* this will essentially splice this timeline into any currently
* defined ones.
*/
eraseKeyframes(sequence, startTime, endTime);
for (let i = 0; i < keyframes.length; i++) {
sequence.push({
value: keyframes[i],
at: (0,_utils_mix_mjs__WEBPACK_IMPORTED_MODULE_4__/* .mix */ .j)(startTime, endTime, offset[i]),
easing: (0,_easing_utils_get_easing_for_segment_mjs__WEBPACK_IMPORTED_MODULE_2__/* .getEasingForSegment */ .S)(easing, i)
});
}
}
/***/ }),
/***/ 203846:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ Y: () => (/* binding */ compareByTime)
/* harmony export */ });
/* harmony import */ var core_js_modules_es_array_at_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(295913);
/* harmony import */ var core_js_modules_es_string_at_alternative_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(412587);
function compareByTime(a, b) {
if (a.at === b.at) {
if (a.value === null) return 1;
if (b.value === null) return -1;
return 0;
} else {
return a.at - b.at;
}
}
/***/ }),
/***/ 444458:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ B: () => (/* binding */ createVisualElement)
/* harmony export */ });
/* harmony import */ var _render_dom_utils_is_svg_element_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(244089);
/* harmony import */ var _render_svg_SVGVisualElement_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(541109);
/* harmony import */ var _render_html_HTMLVisualElement_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(176617);
/* harmony import */ var _render_store_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(550529);
function createVisualElement(element) {
const options = {
presenceContext: null,
props: {},
visualState: {
renderState: {
transform: {},
transformOrigin: {},
style: {},
vars: {},
attrs: {}
},
latestValues: {}
}
};
const node = (0,_render_dom_utils_is_svg_element_mjs__WEBPACK_IMPORTED_MODULE_0__/* .isSVGElement */ .x)(element) ? new _render_svg_SVGVisualElement_mjs__WEBPACK_IMPORTED_MODULE_1__/* .SVGVisualElement */ .l(options, {
enableHardwareAcceleration: false
}) : new _render_html_HTMLVisualElement_mjs__WEBPACK_IMPORTED_MODULE_2__/* .HTMLVisualElement */ .M(options, {
enableHardwareAcceleration: true
});
node.mount(element);
_render_store_mjs__WEBPACK_IMPORTED_MODULE_3__/* .visualElementStore */ .C.set(element, node);
}
/***/ }),
/***/ 961748:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ x: () => (/* binding */ getDefaultTransition)
/* harmony export */ });
/* harmony import */ var _render_html_utils_transform_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(353994);
const underDampedSpring = {
type: "spring",
stiffness: 500,
damping: 25,
restSpeed: 10
};
const criticallyDampedSpring = target => ({
type: "spring",
stiffness: 550,
damping: target === 0 ? 2 * Math.sqrt(550) : 30,
restSpeed: 10
});
const keyframesTransition = {
type: "keyframes",
duration: 0.8
};
/**
* Default easing curve is a slightly shallower version of
* the default browser easing curve.
*/
const ease = {
type: "keyframes",
ease: [0.25, 0.1, 0.35, 1],
duration: 0.3
};
const getDefaultTransition = (valueKey, {
keyframes
}) => {
if (keyframes.length > 2) {
return keyframesTransition;
} else if (_render_html_utils_transform_mjs__WEBPACK_IMPORTED_MODULE_0__/* .transformProps */ .f.has(valueKey)) {
return valueKey.startsWith("scale") ? criticallyDampedSpring(keyframes[1]) : underDampedSpring;
}
return ease;
};
/***/ }),
/***/ 710841:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ P: () => (/* binding */ isAnimatable)
/* harmony export */ });
/* harmony import */ var _value_types_complex_index_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(73748);
/**
* Check if a value is animatable. Examples:
*
* ✅: 100, "100px", "#fff"
* ❌: "block", "url(2.jpg)"
* @param value
*
* @internal
*/
const isAnimatable = (key, value) => {
// If the list of keys tat might be non-animatable grows, replace with Set
if (key === "zIndex") return false;
// If it's a number or a keyframes array, we can animate it. We might at some point
// need to do a deep isAnimatable check of keyframes, or let Popmotion handle this,
// but for now lets leave it like this for performance reasons
if (typeof value === "number" || Array.isArray(value)) return true;
if (typeof value === "string" && (
// It's animatable if we have a string
_value_types_complex_index_mjs__WEBPACK_IMPORTED_MODULE_0__/* .complex */ .f.test(value) || value === "0") &&
// And it contains numbers and/or colors
!value.startsWith("url(") // Unless it starts with "url("
) {
return true;
}
return false;
};
/***/ }),
/***/ 892904:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ N: () => (/* binding */ isAnimationControls)
/* harmony export */ });
function isAnimationControls(v) {
return v !== null && typeof v === "object" && typeof v.start === "function";
}
/***/ }),
/***/ 780119:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ m: () => (/* binding */ isDOMKeyframes)
/* harmony export */ });
function isDOMKeyframes(keyframes) {
return typeof keyframes === "object" && !Array.isArray(keyframes);
}
/***/ }),
/***/ 343690:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ p: () => (/* binding */ isKeyframesTarget)
/* harmony export */ });
const isKeyframesTarget = v => {
return Array.isArray(v);
};
/***/ }),
/***/ 615655:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ $: () => (/* binding */ isNone)
/* harmony export */ });
/* harmony import */ var _utils_is_zero_value_string_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(70998);
function isNone(value) {
if (typeof value === "number") {
return value === 0;
} else if (value !== null) {
return value === "none" || value === "0" || (0,_utils_is_zero_value_string_mjs__WEBPACK_IMPORTED_MODULE_0__/* .isZeroValueString */ .$)(value);
}
}
/***/ }),
/***/ 87451:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ I: () => (/* binding */ getKeyframes)
/* harmony export */ });
/* harmony import */ var _render_dom_value_types_animatable_none_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(392602);
/* harmony import */ var _is_animatable_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(710841);
/* harmony import */ var _is_none_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(615655);
function getKeyframes(value, valueName, target, transition) {
const isTargetAnimatable = (0,_is_animatable_mjs__WEBPACK_IMPORTED_MODULE_1__/* .isAnimatable */ .P)(valueName, target);
let keyframes;
if (Array.isArray(target)) {
keyframes = [...target];
} else {
keyframes = [null, target];
}
const defaultOrigin = transition.from !== undefined ? transition.from : value.get();
let animatableTemplateValue = undefined;
const noneKeyframeIndexes = [];
for (let i = 0; i < keyframes.length; i++) {
/**
* Fill null/wildcard keyframes
*/
if (keyframes[i] === null) {
keyframes[i] = i === 0 ? defaultOrigin : keyframes[i - 1];
}
if ((0,_is_none_mjs__WEBPACK_IMPORTED_MODULE_2__/* .isNone */ .$)(keyframes[i])) {
noneKeyframeIndexes.push(i);
}
// TODO: Clean this conditional, it works for now
if (typeof keyframes[i] === "string" && keyframes[i] !== "none" && keyframes[i] !== "0") {
animatableTemplateValue = keyframes[i];
}
}
if (isTargetAnimatable && noneKeyframeIndexes.length && animatableTemplateValue) {
for (let i = 0; i < noneKeyframeIndexes.length; i++) {
const index = noneKeyframeIndexes[i];
keyframes[index] = (0,_render_dom_value_types_animatable_none_mjs__WEBPACK_IMPORTED_MODULE_0__/* .getAnimatableNone */ .J)(valueName, animatableTemplateValue);
}
}
return keyframes;
}
/***/ }),
/***/ 331261:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* unused harmony exports getOriginIndex, stagger */
/* harmony import */ var _easing_utils_map_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(392649);
function getOriginIndex(from, total) {
if (from === "first") {
return 0;
} else {
const lastIndex = total - 1;
return from === "last" ? lastIndex : lastIndex / 2;
}
}
function stagger(duration = 0.1, {
startDelay = 0,
from = 0,
ease
} = {}) {
return (i, total) => {
const fromIndex = typeof from === "number" ? from : getOriginIndex(from, total);
const distance = Math.abs(fromIndex - i);
let delay = duration * distance;
if (ease) {
const maxDelay = total * duration;
const easingFunction = easingDefinitionToFunction(ease);
delay = easingFunction(delay / maxDelay) * maxDelay;
}
return startDelay + delay;
};
}
/***/ }),
/***/ 955104:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ D: () => (/* binding */ isTransitionDefined),
/* harmony export */ r: () => (/* binding */ getValueTransition)
/* harmony export */ });
/**
* Decide whether a transition is defined on a given Transition.
* This filters out orchestration options and returns true
* if any options are left.
*/
function isTransitionDefined({
when,
delay: _delay,
delayChildren,
staggerChildren,
staggerDirection,
repeat,
repeatType,
repeatDelay,
from,
elapsed,
...transition
}) {
return !!Object.keys(transition).length;
}
function getValueTransition(transition, key) {
return transition[key] || transition["default"] || transition;
}
/***/ }),
/***/ 542182:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ C: () => (/* binding */ PopChild)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(63696);
/**
* Measurement functionality has to be within a separate component
* to leverage snapshot lifecycle.
*/
class PopChildMeasure extends react__WEBPACK_IMPORTED_MODULE_0__.Component {
getSnapshotBeforeUpdate(prevProps) {
const element = this.props.childRef.current;
if (element && prevProps.isPresent && !this.props.isPresent) {
const size = this.props.sizeRef.current;
size.height = element.offsetHeight || 0;
size.width = element.offsetWidth || 0;
size.top = element.offsetTop;
size.left = element.offsetLeft;
}
return null;
}
/**
* Required with getSnapshotBeforeUpdate to stop React complaining.
*/
componentDidUpdate() {}
render() {
return this.props.children;
}
}
function PopChild({
children,
isPresent
}) {
const id = (0,react__WEBPACK_IMPORTED_MODULE_0__.useId)();
const ref = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
const size = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)({
width: 0,
height: 0,
top: 0,
left: 0
});
/**
* We create and inject a style block so we can apply this explicit
* sizing in a non-destructive manner by just deleting the style block.
*
* We can't apply size via render as the measurement happens
* in getSnapshotBeforeUpdate (post-render), likewise if we apply the
* styles directly on the DOM node, we might be overwriting
* styles set via the style prop.
*/
(0,react__WEBPACK_IMPORTED_MODULE_0__.useInsertionEffect)(() => {
const {
width,
height,
top,
left
} = size.current;
if (isPresent || !ref.current || !width || !height) return;
ref.current.dataset.motionPopId = id;
const style = document.createElement("style");
document.head.appendChild(style);
if (style.sheet) {
style.sheet.insertRule(`
[data-motion-pop-id="${id}"] {
position: absolute !important;
width: ${width}px !important;
height: ${height}px !important;
top: ${top}px !important;
left: ${left}px !important;
}
`);
}
return () => {
document.head.removeChild(style);
};
}, [isPresent]);
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(PopChildMeasure, {
isPresent: isPresent,
childRef: ref,
sizeRef: size
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.cloneElement(children, {
ref
}));
}
/***/ }),
/***/ 600594:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ O: () => (/* binding */ PresenceChild)
/* harmony export */ });
/* harmony import */ var core_js_modules_esnext_iterator_constructor_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(314846);
/* harmony import */ var core_js_modules_esnext_iterator_for_each_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(469655);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(63696);
/* harmony import */ var _context_PresenceContext_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(121953);
/* harmony import */ var _utils_use_constant_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(416155);
/* harmony import */ var _PopChild_mjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(542182);
const PresenceChild = ({
children,
initial,
isPresent,
onExitComplete,
custom,
presenceAffectsLayout,
mode
}) => {
const presenceChildren = (0,_utils_use_constant_mjs__WEBPACK_IMPORTED_MODULE_4__/* .useConstant */ .M)(newChildrenMap);
const id = (0,react__WEBPACK_IMPORTED_MODULE_2__.useId)();
const context = (0,react__WEBPACK_IMPORTED_MODULE_2__.useMemo)(() => ({
id,
initial,
isPresent,
custom,
onExitComplete: childId => {
presenceChildren.set(childId, true);
for (const isComplete of presenceChildren.values()) {
if (!isComplete) return; // can stop searching when any is incomplete
}
onExitComplete && onExitComplete();
},
register: childId => {
presenceChildren.set(childId, false);
return () => presenceChildren.delete(childId);
}
}),
/**
* If the presence of a child affects the layout of the components around it,
* we want to make a new context value to ensure they get re-rendered
* so they can detect that layout change.
*/
presenceAffectsLayout ? undefined : [isPresent]);
(0,react__WEBPACK_IMPORTED_MODULE_2__.useMemo)(() => {
presenceChildren.forEach((_, key) => presenceChildren.set(key, false));
}, [isPresent]);
/**
* If there's no `motion` components to fire exit animations, we want to remove this
* component immediately.
*/
react__WEBPACK_IMPORTED_MODULE_2__.useEffect(() => {
!isPresent && !presenceChildren.size && onExitComplete && onExitComplete();
}, [isPresent]);
if (mode === "popLayout") {
children = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__.createElement(_PopChild_mjs__WEBPACK_IMPORTED_MODULE_5__/* .PopChild */ .C, {
isPresent: isPresent
}, children);
}
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__.createElement(_context_PresenceContext_mjs__WEBPACK_IMPORTED_MODULE_3__/* .PresenceContext */ .t.Provider, {
value: context
}, children);
};
function newChildrenMap() {
return new Map();
}
/***/ }),
/***/ 207073:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ N: () => (/* binding */ AnimatePresence)
/* harmony export */ });
/* harmony import */ var core_js_modules_es_array_includes_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(76281);
/* harmony import */ var core_js_modules_esnext_iterator_constructor_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(314846);
/* harmony import */ var core_js_modules_esnext_iterator_filter_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(327458);
/* harmony import */ var core_js_modules_esnext_iterator_for_each_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(469655);
/* harmony import */ var core_js_modules_esnext_iterator_map_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(194364);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(63696);
/* harmony import */ var _utils_use_force_update_mjs__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(226990);
/* harmony import */ var _utils_use_is_mounted_mjs__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(546332);
/* harmony import */ var _PresenceChild_mjs__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(600594);
/* harmony import */ var _context_LayoutGroupContext_mjs__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(780911);
/* harmony import */ var _utils_use_isomorphic_effect_mjs__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(117946);
/* harmony import */ var _utils_use_unmount_effect_mjs__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(758369);
/* harmony import */ var _utils_errors_mjs__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(841164);
const getChildKey = child => child.key || "";
function updateChildLookup(children, allChildren) {
children.forEach(child => {
const key = getChildKey(child);
allChildren.set(key, child);
});
}
function onlyElements(children) {
const filtered = [];
// We use forEach here instead of map as map mutates the component key by preprending `.$`
react__WEBPACK_IMPORTED_MODULE_5__.Children.forEach(children, child => {
if ( /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_5__.isValidElement)(child)) filtered.push(child);
});
return filtered;
}
/**
* `AnimatePresence` enables the animation of components that have been removed from the tree.
*
* When adding/removing more than a single child, every child **must** be given a unique `key` prop.
*
* Any `motion` components that have an `exit` property defined will animate out when removed from
* the tree.
*
* ```jsx
* import { motion, AnimatePresence } from 'framer-motion'
*
* export const Items = ({ items }) => (
* <AnimatePresence>
* {items.map(item => (
* <motion.div
* key={item.id}
* initial={{ opacity: 0 }}
* animate={{ opacity: 1 }}
* exit={{ opacity: 0 }}
* />
* ))}
* </AnimatePresence>
* )
* ```
*
* You can sequence exit animations throughout a tree using variants.
*
* If a child contains multiple `motion` components with `exit` props, it will only unmount the child
* once all `motion` components have finished animating out. Likewise, any components using
* `usePresence` all need to call `safeToRemove`.
*
* @public
*/
const AnimatePresence = ({
children,
custom,
initial = true,
onExitComplete,
exitBeforeEnter,
presenceAffectsLayout = true,
mode = "sync"
}) => {
(0,_utils_errors_mjs__WEBPACK_IMPORTED_MODULE_12__/* .invariant */ .V)(!exitBeforeEnter, "Replace exitBeforeEnter with mode='wait'");
// We want to force a re-render once all exiting animations have finished. We
// either use a local forceRender function, or one from a parent context if it exists.
const forceRender = (0,react__WEBPACK_IMPORTED_MODULE_5__.useContext)(_context_LayoutGroupContext_mjs__WEBPACK_IMPORTED_MODULE_9__/* .LayoutGroupContext */ .L).forceRender || (0,_utils_use_force_update_mjs__WEBPACK_IMPORTED_MODULE_6__/* .useForceUpdate */ .C)()[0];
const isMounted = (0,_utils_use_is_mounted_mjs__WEBPACK_IMPORTED_MODULE_7__/* .useIsMounted */ .a)();
// Filter out any children that aren't ReactElements. We can only track ReactElements with a props.key
const filteredChildren = onlyElements(children);
let childrenToRender = filteredChildren;
const exitingChildren = (0,react__WEBPACK_IMPORTED_MODULE_5__.useRef)(new Map()).current;
// Keep a living record of the children we're actually rendering so we
// can diff to figure out which are entering and exiting
const presentChildren = (0,react__WEBPACK_IMPORTED_MODULE_5__.useRef)(childrenToRender);
// A lookup table to quickly reference components by key
const allChildren = (0,react__WEBPACK_IMPORTED_MODULE_5__.useRef)(new Map()).current;
// If this is the initial component render, just deal with logic surrounding whether
// we play onMount animations or not.
const isInitialRender = (0,react__WEBPACK_IMPORTED_MODULE_5__.useRef)(true);
(0,_utils_use_isomorphic_effect_mjs__WEBPACK_IMPORTED_MODULE_10__/* .useIsomorphicLayoutEffect */ .E)(() => {
isInitialRender.current = false;
updateChildLookup(filteredChildren, allChildren);
presentChildren.current = childrenToRender;
});
(0,_utils_use_unmount_effect_mjs__WEBPACK_IMPORTED_MODULE_11__/* .useUnmountEffect */ .l)(() => {
isInitialRender.current = true;
allChildren.clear();
exitingChildren.clear();
});
if (isInitialRender.current) {
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5__.createElement(react__WEBPACK_IMPORTED_MODULE_5__.Fragment, null, childrenToRender.map(child => ( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5__.createElement(_PresenceChild_mjs__WEBPACK_IMPORTED_MODULE_8__/* .PresenceChild */ .O, {
key: getChildKey(child),
isPresent: true,
initial: initial ? undefined : false,
presenceAffectsLayout: presenceAffectsLayout,
mode: mode
}, child))));
}
// If this is a subsequent render, deal with entering and exiting children
childrenToRender = [...childrenToRender];
// Diff the keys of the currently-present and target children to update our
// exiting list.
const presentKeys = presentChildren.current.map(getChildKey);
const targetKeys = filteredChildren.map(getChildKey);
// Diff the present children with our target children and mark those that are exiting
const numPresent = presentKeys.length;
for (let i = 0; i < numPresent; i++) {
const key = presentKeys[i];
if (targetKeys.indexOf(key) === -1 && !exitingChildren.has(key)) {
exitingChildren.set(key, undefined);
}
}
// If we currently have exiting children, and we're deferring rendering incoming children
// until after all current children have exiting, empty the childrenToRender array
if (mode === "wait" && exitingChildren.size) {
childrenToRender = [];
}
// Loop through all currently exiting components and clone them to overwrite `animate`
// with any `exit` prop they might have defined.
exitingChildren.forEach((component, key) => {
// If this component is actually entering again, early return
if (targetKeys.indexOf(key) !== -1) return;
const child = allChildren.get(key);
if (!child) return;
const insertionIndex = presentKeys.indexOf(key);
let exitingComponent = component;
if (!exitingComponent) {
const onExit = () => {
// clean up the exiting children map
exitingChildren.delete(key);
// compute the keys of children that were rendered once but are no longer present
// this could happen in case of too many fast consequent renderings
// @link https://github.com/framer/motion/issues/2023
const leftOverKeys = Array.from(allChildren.keys()).filter(childKey => !targetKeys.includes(childKey));
// clean up the all children map
leftOverKeys.forEach(leftOverKey => allChildren.delete(leftOverKey));
// make sure to render only the children that are actually visible
presentChildren.current = filteredChildren.filter(presentChild => {
const presentChildKey = getChildKey(presentChild);
return (
// filter out the node exiting
presentChildKey === key ||
// filter out the leftover children
leftOverKeys.includes(presentChildKey)
);
});
// Defer re-rendering until all exiting children have indeed left
if (!exitingChildren.size) {
if (isMounted.current === false) return;
forceRender();
onExitComplete && onExitComplete();
}
};
exitingComponent = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5__.createElement(_PresenceChild_mjs__WEBPACK_IMPORTED_MODULE_8__/* .PresenceChild */ .O, {
key: getChildKey(child),
isPresent: false,
onExitComplete: onExit,
custom: custom,
presenceAffectsLayout: presenceAffectsLayout,
mode: mode
}, child);
exitingChildren.set(key, exitingComponent);
}
childrenToRender.splice(insertionIndex, 0, exitingComponent);
});
// Add `MotionContext` even to children that don't need it to ensure we're rendering
// the same tree between renders
childrenToRender = childrenToRender.map(child => {
const key = child.key;
return exitingChildren.has(key) ? child : ( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5__.createElement(_PresenceChild_mjs__WEBPACK_IMPORTED_MODULE_8__/* .PresenceChild */ .O, {
key: getChildKey(child),
isPresent: true,
presenceAffectsLayout: presenceAffectsLayout,
mode: mode
}, child));
});
if (false) {}
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5__.createElement(react__WEBPACK_IMPORTED_MODULE_5__.Fragment, null, exitingChildren.size ? childrenToRender : childrenToRender.map(child => /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_5__.cloneElement)(child)));
};
/***/ }),
/***/ 613646:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ xQ: () => (/* binding */ usePresence)
/* harmony export */ });
/* unused harmony exports isPresent, useIsPresent */
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(63696);
/* harmony import */ var _context_PresenceContext_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(121953);
/**
* When a component is the child of `AnimatePresence`, it can use `usePresence`
* to access information about whether it's still present in the React tree.
*
* ```jsx
* import { usePresence } from "framer-motion"
*
* export const Component = () => {
* const [isPresent, safeToRemove] = usePresence()
*
* useEffect(() => {
* !isPresent && setTimeout(safeToRemove, 1000)
* }, [isPresent])
*
* return <div />
* }
* ```
*
* If `isPresent` is `false`, it means that a component has been removed the tree, but
* `AnimatePresence` won't really remove it until `safeToRemove` has been called.
*
* @public
*/
function usePresence() {
const context = (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(_context_PresenceContext_mjs__WEBPACK_IMPORTED_MODULE_1__/* .PresenceContext */ .t);
if (context === null) return [true, null];
const {
isPresent,
onExitComplete,
register
} = context;
// It's safe to call the following hooks conditionally (after an early return) because the context will always
// either be null or non-null for the lifespan of the component.
const id = (0,react__WEBPACK_IMPORTED_MODULE_0__.useId)();
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => register(id), []);
const safeToRemove = () => onExitComplete && onExitComplete(id);
return !isPresent && onExitComplete ? [false, safeToRemove] : [true];
}
/**
* Similar to `usePresence`, except `useIsPresent` simply returns whether or not the component is present.
* There is no `safeToRemove` function.
*
* ```jsx
* import { useIsPresent } from "framer-motion"
*
* export const Component = () => {
* const isPresent = useIsPresent()
*
* useEffect(() => {
* !isPresent && console.log("I've been removed!")
* }, [isPresent])
*
* return <div />
* }
* ```
*
* @public
*/
function useIsPresent() {
return isPresent(useContext(PresenceContext));
}
function isPresent(context) {
return context === null ? true : context.isPresent;
}
/***/ }),
/***/ 974818:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* unused harmony export AnimateSharedLayout */
/* harmony import */ var _utils_errors_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(841164);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(63696);
/* harmony import */ var _utils_use_constant_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(416155);
/* harmony import */ var _LayoutGroup_index_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(176288);
let id = 0;
const AnimateSharedLayout = ({
children
}) => {
React.useEffect(() => {
invariant(false, "AnimateSharedLayout is deprecated: https://www.framer.com/docs/guide-upgrade/##shared-layout-animations");
}, []);
return /*#__PURE__*/React.createElement(LayoutGroup, {
id: useConstant(() => `asl-${id++}`)
}, children);
};
/***/ }),
/***/ 176288:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* unused harmony export LayoutGroup */
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(63696);
/* harmony import */ var _context_LayoutGroupContext_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(780911);
/* harmony import */ var _context_DeprecatedLayoutGroupContext_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(45276);
/* harmony import */ var _utils_use_force_update_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(226990);
/* harmony import */ var _projection_node_group_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(186775);
const shouldInheritGroup = inherit => inherit === true;
const shouldInheritId = inherit => shouldInheritGroup(inherit === true) || inherit === "id";
const LayoutGroup = ({
children,
id,
inherit = true
}) => {
const layoutGroupContext = useContext(LayoutGroupContext);
const deprecatedLayoutGroupContext = useContext(DeprecatedLayoutGroupContext);
const [forceRender, key] = useForceUpdate();
const context = useRef(null);
const upstreamId = layoutGroupContext.id || deprecatedLayoutGroupContext;
if (context.current === null) {
if (shouldInheritId(inherit) && upstreamId) {
id = id ? upstreamId + "-" + id : upstreamId;
}
context.current = {
id,
group: shouldInheritGroup(inherit) ? layoutGroupContext.group || nodeGroup() : nodeGroup()
};
}
const memoizedContext = useMemo(() => ({
...context.current,
forceRender
}), [key]);
return /*#__PURE__*/React.createElement(LayoutGroupContext.Provider, {
value: memoizedContext
}, children);
};
/***/ }),
/***/ 553139:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* unused harmony export LazyMotion */
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(63696);
/* harmony import */ var _context_LazyContext_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(889110);
/* harmony import */ var _motion_features_load_features_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(725240);
/**
* Used in conjunction with the `m` component to reduce bundle size.
*
* `m` is a version of the `motion` component that only loads functionality
* critical for the initial render.
*
* `LazyMotion` can then be used to either synchronously or asynchronously
* load animation and gesture support.
*
* ```jsx
* // Synchronous loading
* import { LazyMotion, m, domAnimation } from "framer-motion"
*
* function App() {
* return (
* <LazyMotion features={domAnimation}>
* <m.div animate={{ scale: 2 }} />
* </LazyMotion>
* )
* }
*
* // Asynchronous loading
* import { LazyMotion, m } from "framer-motion"
*
* function App() {
* return (
* <LazyMotion features={() => import('./path/to/domAnimation')}>
* <m.div animate={{ scale: 2 }} />
* </LazyMotion>
* )
* }
* ```
*
* @public
*/
function LazyMotion({
children,
features,
strict = false
}) {
const [, setIsLoaded] = useState(!isLazyBundle(features));
const loadedRenderer = useRef(undefined);
/**
* If this is a synchronous load, load features immediately
*/
if (!isLazyBundle(features)) {
const {
renderer,
...loadedFeatures
} = features;
loadedRenderer.current = renderer;
loadFeatures(loadedFeatures);
}
useEffect(() => {
if (isLazyBundle(features)) {
features().then(({
renderer,
...loadedFeatures
}) => {
loadFeatures(loadedFeatures);
loadedRenderer.current = renderer;
setIsLoaded(true);
});
}
}, []);
return /*#__PURE__*/React.createElement(LazyContext.Provider, {
value: {
renderer: loadedRenderer.current,
strict
}
}, children);
}
function isLazyBundle(features) {
return typeof features === "function";
}
/***/ }),
/***/ 731911:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* unused harmony export MotionConfig */
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(63696);
/* harmony import */ var _context_MotionConfigContext_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(682832);
/* harmony import */ var _render_dom_utils_filter_props_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(805796);
/* harmony import */ var _utils_use_constant_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(416155);
/**
* `MotionConfig` is used to set configuration options for all children `motion` components.
*
* ```jsx
* import { motion, MotionConfig } from "framer-motion"
*
* export function App() {
* return (
* <MotionConfig transition={{ type: "spring" }}>
* <motion.div animate={{ x: 100 }} />
* </MotionConfig>
* )
* }
* ```
*
* @public
*/
function MotionConfig({
children,
isValidProp,
...config
}) {
isValidProp && loadExternalIsValidProp(isValidProp);
/**
* Inherit props from any parent MotionConfig components
*/
config = {
...useContext(MotionConfigContext),
...config
};
/**
* Don't allow isStatic to change between renders as it affects how many hooks
* motion components fire.
*/
config.isStatic = useConstant(() => config.isStatic);
/**
* Creating a new config context object will re-render every `motion` component
* every time it renders. So we only want to create a new one sparingly.
*/
const context = useMemo(() => config, [JSON.stringify(config.transition), config.transformPagePoint, config.reducedMotion]);
return /*#__PURE__*/React.createElement(MotionConfigContext.Provider, {
value: context
}, children);
}
/***/ }),
/***/ 213911:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ Y: () => (/* binding */ Group)
/* harmony export */ });
/* unused harmony export ReorderGroup */
/* harmony import */ var core_js_modules_esnext_iterator_constructor_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(314846);
/* harmony import */ var core_js_modules_esnext_iterator_filter_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(327458);
/* harmony import */ var core_js_modules_esnext_iterator_map_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(194364);
/* harmony import */ var _utils_errors_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(841164);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(63696);
/* harmony import */ var _context_ReorderContext_mjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(357433);
/* harmony import */ var _render_dom_motion_mjs__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(142571);
/* harmony import */ var _utils_use_constant_mjs__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(416155);
/* harmony import */ var _utils_check_reorder_mjs__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(48690);
function ReorderGroup({
children,
as = "ul",
axis = "y",
onReorder,
values,
...props
}, externalRef) {
const Component = (0,_utils_use_constant_mjs__WEBPACK_IMPORTED_MODULE_7__/* .useConstant */ .M)(() => (0,_render_dom_motion_mjs__WEBPACK_IMPORTED_MODULE_6__/* .motion */ .P)(as));
const order = [];
const isReordering = (0,react__WEBPACK_IMPORTED_MODULE_4__.useRef)(false);
(0,_utils_errors_mjs__WEBPACK_IMPORTED_MODULE_3__/* .invariant */ .V)(Boolean(values), "Reorder.Group must be provided a values prop");
const context = {
axis,
registerItem: (value, layout) => {
// If the entry was already added, update it rather than adding it again
const idx = order.findIndex(entry => value === entry.value);
if (idx !== -1) {
order[idx].layout = layout[axis];
} else {
order.push({
value: value,
layout: layout[axis]
});
}
order.sort(compareMin);
},
updateOrder: (item, offset, velocity) => {
if (isReordering.current) return;
const newOrder = (0,_utils_check_reorder_mjs__WEBPACK_IMPORTED_MODULE_8__/* .checkReorder */ .M)(order, item, offset, velocity);
if (order !== newOrder) {
isReordering.current = true;
onReorder(newOrder.map(getValue).filter(value => values.indexOf(value) !== -1));
}
}
};
(0,react__WEBPACK_IMPORTED_MODULE_4__.useEffect)(() => {
isReordering.current = false;
});
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4__.createElement(Component, {
...props,
ref: externalRef,
ignoreStrict: true
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4__.createElement(_context_ReorderContext_mjs__WEBPACK_IMPORTED_MODULE_5__/* .ReorderContext */ .T.Provider, {
value: context
}, children));
}
const Group = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_4__.forwardRef)(ReorderGroup);
function getValue(item) {
return item.value;
}
function compareMin(a, b) {
return a.layout.min - b.layout.min;
}
/***/ }),
/***/ 161627:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ q: () => (/* binding */ Item)
/* harmony export */ });
/* unused harmony export ReorderItem */
/* harmony import */ var _utils_errors_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(841164);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(63696);
/* harmony import */ var _context_ReorderContext_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(357433);
/* harmony import */ var _render_dom_motion_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(142571);
/* harmony import */ var _utils_use_constant_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(416155);
/* harmony import */ var _value_use_motion_value_mjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(73885);
/* harmony import */ var _value_use_transform_mjs__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(979829);
/* harmony import */ var _value_utils_is_motion_value_mjs__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(573970);
function useDefaultMotionValue(value, defaultValue = 0) {
return (0,_value_utils_is_motion_value_mjs__WEBPACK_IMPORTED_MODULE_7__/* .isMotionValue */ .S)(value) ? value : (0,_value_use_motion_value_mjs__WEBPACK_IMPORTED_MODULE_5__/* .useMotionValue */ .d)(defaultValue);
}
function ReorderItem({
children,
style = {},
value,
as = "li",
onDrag,
layout = true,
...props
}, externalRef) {
const Component = (0,_utils_use_constant_mjs__WEBPACK_IMPORTED_MODULE_4__/* .useConstant */ .M)(() => (0,_render_dom_motion_mjs__WEBPACK_IMPORTED_MODULE_3__/* .motion */ .P)(as));
const context = (0,react__WEBPACK_IMPORTED_MODULE_1__.useContext)(_context_ReorderContext_mjs__WEBPACK_IMPORTED_MODULE_2__/* .ReorderContext */ .T);
const point = {
x: useDefaultMotionValue(style.x),
y: useDefaultMotionValue(style.y)
};
const zIndex = (0,_value_use_transform_mjs__WEBPACK_IMPORTED_MODULE_6__/* .useTransform */ .G)([point.x, point.y], ([latestX, latestY]) => latestX || latestY ? 1 : "unset");
(0,_utils_errors_mjs__WEBPACK_IMPORTED_MODULE_0__/* .invariant */ .V)(Boolean(context), "Reorder.Item must be a child of Reorder.Group");
const {
axis,
registerItem,
updateOrder
} = context;
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__.createElement(Component, {
drag: axis,
...props,
dragSnapToOrigin: true,
style: {
...style,
x: point.x,
y: point.y,
zIndex
},
layout: layout,
onDrag: (event, gesturePoint) => {
const {
velocity
} = gesturePoint;
velocity[axis] && updateOrder(value, point[axis].get(), velocity[axis]);
onDrag && onDrag(event, gesturePoint);
},
onLayoutMeasure: measured => registerItem(value, measured),
ref: externalRef,
ignoreStrict: true
}, children);
}
const Item = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(ReorderItem);
/***/ }),
/***/ 783186:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* unused harmony export Reorder */
/* harmony import */ var _Group_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(213911);
/* harmony import */ var _Item_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(161627);
const Reorder = {
Group: _Group_mjs__WEBPACK_IMPORTED_MODULE_0__/* .Group */ .Y,
Item: _Item_mjs__WEBPACK_IMPORTED_MODULE_1__/* .Item */ .q
};
/***/ }),
/***/ 48690:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ M: () => (/* binding */ checkReorder)
/* harmony export */ });
/* harmony import */ var _utils_array_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(890604);
/* harmony import */ var _utils_mix_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(26085);
function checkReorder(order, value, offset, velocity) {
if (!velocity) return order;
const index = order.findIndex(item => item.value === value);
if (index === -1) return order;
const nextOffset = velocity > 0 ? 1 : -1;
const nextItem = order[index + nextOffset];
if (!nextItem) return order;
const item = order[index];
const nextLayout = nextItem.layout;
const nextItemCenter = (0,_utils_mix_mjs__WEBPACK_IMPORTED_MODULE_1__/* .mix */ .j)(nextLayout.min, nextLayout.max, 0.5);
if (nextOffset === 1 && item.layout.max + offset > nextItemCenter || nextOffset === -1 && item.layout.min + offset < nextItemCenter) {
return (0,_utils_array_mjs__WEBPACK_IMPORTED_MODULE_0__/* .moveItem */ .Pe)(order, index, index + nextOffset);
}
return order;
}
/***/ }),
/***/ 45276:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* unused harmony export DeprecatedLayoutGroupContext */
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(63696);
/**
* Note: Still used by components generated by old versions of Framer
*
* @deprecated
*/
const DeprecatedLayoutGroupContext = /*#__PURE__*/(/* unused pure expression or super */ null && (createContext(null)));
/***/ }),
/***/ 780911:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ L: () => (/* binding */ LayoutGroupContext)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(63696);
const LayoutGroupContext = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.createContext)({});
/***/ }),
/***/ 889110:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ Y: () => (/* binding */ LazyContext)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(63696);
const LazyContext = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.createContext)({
strict: false
});
/***/ }),
/***/ 682832:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ Q: () => (/* binding */ MotionConfigContext)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(63696);
/**
* @public
*/
const MotionConfigContext = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.createContext)({
transformPagePoint: p => p,
isStatic: false,
reducedMotion: "never"
});
/***/ }),
/***/ 125793:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ z: () => (/* binding */ useCreateMotionContext)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(63696);
/* harmony import */ var _index_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(820631);
/* harmony import */ var _utils_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(58364);
function useCreateMotionContext(props) {
const {
initial,
animate
} = (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_2__/* .getCurrentTreeVariants */ ._)(props, (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(_index_mjs__WEBPACK_IMPORTED_MODULE_1__/* .MotionContext */ .A));
return (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(() => ({
initial,
animate
}), [variantLabelsAsDependency(initial), variantLabelsAsDependency(animate)]);
}
function variantLabelsAsDependency(prop) {
return Array.isArray(prop) ? prop.join(" ") : prop;
}
/***/ }),
/***/ 820631:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ A: () => (/* binding */ MotionContext)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(63696);
const MotionContext = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.createContext)({});
/***/ }),
/***/ 58364:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ _: () => (/* binding */ getCurrentTreeVariants)
/* harmony export */ });
/* harmony import */ var _render_utils_is_variant_label_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(563305);
/* harmony import */ var _render_utils_is_controlling_variants_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(884135);
function getCurrentTreeVariants(props, context) {
if ((0,_render_utils_is_controlling_variants_mjs__WEBPACK_IMPORTED_MODULE_1__/* .isControllingVariants */ .e)(props)) {
const {
initial,
animate
} = props;
return {
initial: initial === false || (0,_render_utils_is_variant_label_mjs__WEBPACK_IMPORTED_MODULE_0__/* .isVariantLabel */ .w)(initial) ? initial : undefined,
animate: (0,_render_utils_is_variant_label_mjs__WEBPACK_IMPORTED_MODULE_0__/* .isVariantLabel */ .w)(animate) ? animate : undefined
};
}
return props.inherit !== false ? context : {};
}
/***/ }),
/***/ 121953:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ t: () => (/* binding */ PresenceContext)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(63696);
/**
* @public
*/
const PresenceContext = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.createContext)(null);
/***/ }),
/***/ 357433:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ T: () => (/* binding */ ReorderContext)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(63696);
const ReorderContext = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.createContext)(null);
/***/ }),
/***/ 334175:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ N: () => (/* binding */ SwitchLayoutGroupContext)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(63696);
/**
* Internal, exported only for usage in Framer
*/
const SwitchLayoutGroupContext = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.createContext)({});
/***/ }),
/***/ 780160:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ g: () => (/* binding */ record)
/* harmony export */ });
function record(data) {
if (window.MotionDebug) {
window.MotionDebug.record(data);
}
}
/***/ }),
/***/ 569107:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ b: () => (/* binding */ anticipate)
/* harmony export */ });
/* harmony import */ var _back_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(308922);
const anticipate = p => (p *= 2) < 1 ? 0.5 * (0,_back_mjs__WEBPACK_IMPORTED_MODULE_0__/* .backIn */ .dg)(p) : 0.5 * (2 - Math.pow(2, -10 * (p - 1)));
/***/ }),
/***/ 308922:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ Sz: () => (/* binding */ backOut),
/* harmony export */ ZZ: () => (/* binding */ backInOut),
/* harmony export */ dg: () => (/* binding */ backIn)
/* harmony export */ });
/* harmony import */ var _cubic_bezier_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(436745);
/* harmony import */ var _modifiers_mirror_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(500203);
/* harmony import */ var _modifiers_reverse_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(780760);
const backOut = (0,_cubic_bezier_mjs__WEBPACK_IMPORTED_MODULE_0__/* .cubicBezier */ .A)(0.33, 1.53, 0.69, 0.99);
const backIn = (0,_modifiers_reverse_mjs__WEBPACK_IMPORTED_MODULE_2__/* .reverseEasing */ .G)(backOut);
const backInOut = (0,_modifiers_mirror_mjs__WEBPACK_IMPORTED_MODULE_1__/* .mirrorEasing */ .V)(backIn);
/***/ }),
/***/ 791806:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ po: () => (/* binding */ circIn),
/* harmony export */ tn: () => (/* binding */ circInOut),
/* harmony export */ yT: () => (/* binding */ circOut)
/* harmony export */ });
/* harmony import */ var _modifiers_mirror_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(500203);
/* harmony import */ var _modifiers_reverse_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(780760);
const circIn = p => 1 - Math.sin(Math.acos(p));
const circOut = (0,_modifiers_reverse_mjs__WEBPACK_IMPORTED_MODULE_1__/* .reverseEasing */ .G)(circIn);
const circInOut = (0,_modifiers_mirror_mjs__WEBPACK_IMPORTED_MODULE_0__/* .mirrorEasing */ .V)(circIn);
/***/ }),
/***/ 436745:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ A: () => (/* binding */ cubicBezier)
/* harmony export */ });
/* harmony import */ var _utils_noop_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(78777);
/*
Bezier function generator
This has been modified from Gaëtan Renaudeau's BezierEasing
https://github.com/gre/bezier-easing/blob/master/src/index.js
https://github.com/gre/bezier-easing/blob/master/LICENSE
I've removed the newtonRaphsonIterate algo because in benchmarking it
wasn't noticiably faster than binarySubdivision, indeed removing it
usually improved times, depending on the curve.
I also removed the lookup table, as for the added bundle size and loop we're
only cutting ~4 or so subdivision iterations. I bumped the max iterations up
to 12 to compensate and this still tended to be faster for no perceivable
loss in accuracy.
Usage
const easeOut = cubicBezier(.17,.67,.83,.67);
const x = easeOut(0.5); // returns 0.627...
*/
// Returns x(t) given t, x1, and x2, or y(t) given t, y1, and y2.
const calcBezier = (t, a1, a2) => (((1.0 - 3.0 * a2 + 3.0 * a1) * t + (3.0 * a2 - 6.0 * a1)) * t + 3.0 * a1) * t;
const subdivisionPrecision = 0.0000001;
const subdivisionMaxIterations = 12;
function binarySubdivide(x, lowerBound, upperBound, mX1, mX2) {
let currentX;
let currentT;
let i = 0;
do {
currentT = lowerBound + (upperBound - lowerBound) / 2.0;
currentX = calcBezier(currentT, mX1, mX2) - x;
if (currentX > 0.0) {
upperBound = currentT;
} else {
lowerBound = currentT;
}
} while (Math.abs(currentX) > subdivisionPrecision && ++i < subdivisionMaxIterations);
return currentT;
}
function cubicBezier(mX1, mY1, mX2, mY2) {
// If this is a linear gradient, return linear easing
if (mX1 === mY1 && mX2 === mY2) return _utils_noop_mjs__WEBPACK_IMPORTED_MODULE_0__/* .noop */ .l;
const getTForX = aX => binarySubdivide(aX, 0, 1, mX1, mX2);
// If animation is at start/end, return t without easing
return t => t === 0 || t === 1 ? t : calcBezier(getTForX(t), mY1, mY2);
}
/***/ }),
/***/ 95709:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ a6: () => (/* binding */ easeIn),
/* harmony export */ am: () => (/* binding */ easeInOut),
/* harmony export */ vT: () => (/* binding */ easeOut)
/* harmony export */ });
/* harmony import */ var _cubic_bezier_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(436745);
const easeIn = (0,_cubic_bezier_mjs__WEBPACK_IMPORTED_MODULE_0__/* .cubicBezier */ .A)(0.42, 0, 1, 1);
const easeOut = (0,_cubic_bezier_mjs__WEBPACK_IMPORTED_MODULE_0__/* .cubicBezier */ .A)(0, 0, 0.58, 1);
const easeInOut = (0,_cubic_bezier_mjs__WEBPACK_IMPORTED_MODULE_0__/* .cubicBezier */ .A)(0.42, 0, 0.58, 1);
/***/ }),
/***/ 500203:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ V: () => (/* binding */ mirrorEasing)
/* harmony export */ });
// Accepts an easing function and returns a new one that outputs mirrored values for
// the second half of the animation. Turns easeIn into easeInOut.
const mirrorEasing = easing => p => p <= 0.5 ? easing(2 * p) / 2 : (2 - easing(2 * (1 - p))) / 2;
/***/ }),
/***/ 780760:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ G: () => (/* binding */ reverseEasing)
/* harmony export */ });
// Accepts an easing function and returns a new one that outputs reversed values.
// Turns easeIn into easeOut.
const reverseEasing = easing => p => 1 - easing(1 - p);
/***/ }),
/***/ 838389:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ X: () => (/* binding */ createGeneratorEasing)
/* harmony export */ });
/* harmony import */ var _animation_generators_spring_index_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(311789);
/* harmony import */ var _animation_generators_utils_calc_duration_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(445795);
/* harmony import */ var _utils_time_conversion_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(660127);
/**
* Create a progress => progress easing function from a generator.
*/
function createGeneratorEasing(options, scale = 100) {
const generator = (0,_animation_generators_spring_index_mjs__WEBPACK_IMPORTED_MODULE_0__/* .spring */ .o)({
keyframes: [0, scale],
...options
});
const duration = Math.min((0,_animation_generators_utils_calc_duration_mjs__WEBPACK_IMPORTED_MODULE_1__/* .calcGeneratorDuration */ .t)(generator), _animation_generators_utils_calc_duration_mjs__WEBPACK_IMPORTED_MODULE_1__/* .maxGeneratorDuration */ .Y);
return {
type: "keyframes",
ease: progress => generator.next(duration * progress).value / scale,
duration: (0,_utils_time_conversion_mjs__WEBPACK_IMPORTED_MODULE_2__/* .millisecondsToSeconds */ .X)(duration)
};
}
/***/ }),
/***/ 796105:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ S: () => (/* binding */ getEasingForSegment)
/* harmony export */ });
/* harmony import */ var _utils_wrap_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(322801);
/* harmony import */ var _is_easing_array_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(148357);
function getEasingForSegment(easing, i) {
return (0,_is_easing_array_mjs__WEBPACK_IMPORTED_MODULE_1__/* .isEasingArray */ .h)(easing) ? easing[(0,_utils_wrap_mjs__WEBPACK_IMPORTED_MODULE_0__/* .wrap */ .L)(0, easing.length, i)] : easing;
}
/***/ }),
/***/ 309447:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ D: () => (/* binding */ isBezierDefinition)
/* harmony export */ });
const isBezierDefinition = easing => Array.isArray(easing) && typeof easing[0] === "number";
/***/ }),
/***/ 148357:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ h: () => (/* binding */ isEasingArray)
/* harmony export */ });
const isEasingArray = ease => {
return Array.isArray(ease) && typeof ease[0] !== "number";
};
/***/ }),
/***/ 392649:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ K: () => (/* binding */ easingDefinitionToFunction)
/* harmony export */ });
/* harmony import */ var _utils_errors_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(841164);
/* harmony import */ var _cubic_bezier_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(436745);
/* harmony import */ var _utils_noop_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(78777);
/* harmony import */ var _ease_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(95709);
/* harmony import */ var _circ_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(791806);
/* harmony import */ var _back_mjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(308922);
/* harmony import */ var _anticipate_mjs__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(569107);
const easingLookup = {
linear: _utils_noop_mjs__WEBPACK_IMPORTED_MODULE_2__/* .noop */ .l,
easeIn: _ease_mjs__WEBPACK_IMPORTED_MODULE_3__/* .easeIn */ .a6,
easeInOut: _ease_mjs__WEBPACK_IMPORTED_MODULE_3__/* .easeInOut */ .am,
easeOut: _ease_mjs__WEBPACK_IMPORTED_MODULE_3__/* .easeOut */ .vT,
circIn: _circ_mjs__WEBPACK_IMPORTED_MODULE_4__/* .circIn */ .po,
circInOut: _circ_mjs__WEBPACK_IMPORTED_MODULE_4__/* .circInOut */ .tn,
circOut: _circ_mjs__WEBPACK_IMPORTED_MODULE_4__/* .circOut */ .yT,
backIn: _back_mjs__WEBPACK_IMPORTED_MODULE_5__/* .backIn */ .dg,
backInOut: _back_mjs__WEBPACK_IMPORTED_MODULE_5__/* .backInOut */ .ZZ,
backOut: _back_mjs__WEBPACK_IMPORTED_MODULE_5__/* .backOut */ .Sz,
anticipate: _anticipate_mjs__WEBPACK_IMPORTED_MODULE_6__/* .anticipate */ .b
};
const easingDefinitionToFunction = definition => {
if (Array.isArray(definition)) {
// If cubic bezier definition, create bezier curve
(0,_utils_errors_mjs__WEBPACK_IMPORTED_MODULE_0__/* .invariant */ .V)(definition.length === 4, `Cubic bezier arrays must contain four numerical values.`);
const [x1, y1, x2, y2] = definition;
return (0,_cubic_bezier_mjs__WEBPACK_IMPORTED_MODULE_1__/* .cubicBezier */ .A)(x1, y1, x2, y2);
} else if (typeof definition === "string") {
// Else lookup from table
(0,_utils_errors_mjs__WEBPACK_IMPORTED_MODULE_0__/* .invariant */ .V)(easingLookup[definition] !== undefined, `Invalid easing type '${definition}'`);
return easingLookup[definition];
}
return definition;
};
/***/ }),
/***/ 527076:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ k: () => (/* binding */ addDomEvent)
/* harmony export */ });
function addDomEvent(target, eventName, handler, options = {
passive: true
}) {
target.addEventListener(eventName, handler, options);
return () => target.removeEventListener(eventName, handler);
}
/***/ }),
/***/ 420555:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ h: () => (/* binding */ addPointerEvent)
/* harmony export */ });
/* harmony import */ var _add_dom_event_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(527076);
/* harmony import */ var _event_info_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(563890);
function addPointerEvent(target, eventName, handler, options) {
return (0,_add_dom_event_mjs__WEBPACK_IMPORTED_MODULE_0__/* .addDomEvent */ .k)(target, eventName, (0,_event_info_mjs__WEBPACK_IMPORTED_MODULE_1__/* .addPointerInfo */ .F)(handler), options);
}
/***/ }),
/***/ 563890:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ F: () => (/* binding */ addPointerInfo),
/* harmony export */ e: () => (/* binding */ extractEventInfo)
/* harmony export */ });
/* harmony import */ var _utils_is_primary_pointer_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(760628);
function extractEventInfo(event, pointType = "page") {
return {
point: {
x: event[pointType + "X"],
y: event[pointType + "Y"]
}
};
}
const addPointerInfo = handler => {
return event => (0,_utils_is_primary_pointer_mjs__WEBPACK_IMPORTED_MODULE_0__/* .isPrimaryPointer */ .M)(event) && handler(event, extractEventInfo(event));
};
/***/ }),
/***/ 576216:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* unused harmony export useDomEvent */
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(63696);
/* harmony import */ var _add_dom_event_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(527076);
/**
* Attaches an event listener directly to the provided DOM element.
*
* Bypassing React's event system can be desirable, for instance when attaching non-passive
* event handlers.
*
* ```jsx
* const ref = useRef(null)
*
* useDomEvent(ref, 'wheel', onWheel, { passive: false })
*
* return <div ref={ref} />
* ```
*
* @param ref - React.RefObject that's been provided to the element you want to bind the listener to.
* @param eventName - Name of the event you want listen for.
* @param handler - Function to fire when receiving the event.
* @param options - Options to pass to `Event.addEventListener`.
*
* @public
*/
function useDomEvent(ref, eventName, handler, options) {
useEffect(() => {
const element = ref.current;
if (handler && element) {
return addDomEvent(element, eventName, handler, options);
}
}, [ref, eventName, handler, options]);
}
/***/ }),
/***/ 760628:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ M: () => (/* binding */ isPrimaryPointer)
/* harmony export */ });
const isPrimaryPointer = event => {
if (event.pointerType === "mouse") {
return typeof event.button !== "number" || event.button <= 0;
} else {
/**
* isPrimary is true for all mice buttons, whereas every touch point
* is regarded as its own input. So subsequent concurrent touch points
* will be false.
*
* Specifically match against false here as incomplete versions of
* PointerEvents in very old browser might have it set as undefined.
*/
return event.isPrimary !== false;
}
};
/***/ }),
/***/ 981960:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ I: () => (/* binding */ createRenderBatcher),
/* harmony export */ q: () => (/* binding */ stepsOrder)
/* harmony export */ });
/* harmony import */ var _render_step_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(45974);
const stepsOrder = ["prepare", "read", "update", "preRender", "render", "postRender"];
const maxElapsed = 40;
function createRenderBatcher(scheduleNextBatch, allowKeepAlive) {
let runNextFrame = false;
let useDefaultElapsed = true;
const state = {
delta: 0,
timestamp: 0,
isProcessing: false
};
const steps = stepsOrder.reduce((acc, key) => {
acc[key] = (0,_render_step_mjs__WEBPACK_IMPORTED_MODULE_0__/* .createRenderStep */ .n)(() => runNextFrame = true);
return acc;
}, {});
const processStep = stepId => steps[stepId].process(state);
const processBatch = () => {
const timestamp = performance.now();
runNextFrame = false;
state.delta = useDefaultElapsed ? 1000 / 60 : Math.max(Math.min(timestamp - state.timestamp, maxElapsed), 1);
state.timestamp = timestamp;
state.isProcessing = true;
stepsOrder.forEach(processStep);
state.isProcessing = false;
if (runNextFrame && allowKeepAlive) {
useDefaultElapsed = false;
scheduleNextBatch(processBatch);
}
};
const wake = () => {
runNextFrame = true;
useDefaultElapsed = true;
if (!state.isProcessing) {
scheduleNextBatch(processBatch);
}
};
const schedule = stepsOrder.reduce((acc, key) => {
const step = steps[key];
acc[key] = (process, keepAlive = false, immediate = false) => {
if (!runNextFrame) wake();
return step.schedule(process, keepAlive, immediate);
};
return acc;
}, {});
const cancel = process => stepsOrder.forEach(key => steps[key].cancel(process));
return {
schedule,
cancel,
state,
steps
};
}
/***/ }),
/***/ 277210:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ Ci: () => (/* binding */ steps),
/* harmony export */ Gt: () => (/* binding */ frame),
/* harmony export */ WG: () => (/* binding */ cancelFrame),
/* harmony export */ uv: () => (/* binding */ frameData)
/* harmony export */ });
/* harmony import */ var _utils_noop_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(78777);
/* harmony import */ var _batcher_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(981960);
const {
schedule: frame,
cancel: cancelFrame,
state: frameData,
steps
} = (0,_batcher_mjs__WEBPACK_IMPORTED_MODULE_1__/* .createRenderBatcher */ .I)(typeof requestAnimationFrame !== "undefined" ? requestAnimationFrame : _utils_noop_mjs__WEBPACK_IMPORTED_MODULE_0__/* .noop */ .l, true);
/***/ }),
/***/ 13587:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* unused harmony exports cancelSync, sync */
/* harmony import */ var core_js_modules_esnext_iterator_constructor_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(314846);
/* harmony import */ var core_js_modules_esnext_iterator_reduce_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(190458);
/* harmony import */ var _batcher_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(981960);
/* harmony import */ var _frame_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(277210);
/**
* @deprecated
*
* Import as `frame` instead.
*/
const sync = (/* unused pure expression or super */ null && (frame));
/**
* @deprecated
*
* Use cancelFrame(callback) instead.
*/
const cancelSync = _batcher_mjs__WEBPACK_IMPORTED_MODULE_2__/* .stepsOrder */ .q.reduce((acc, key) => {
acc[key] = process => (0,_frame_mjs__WEBPACK_IMPORTED_MODULE_3__/* .cancelFrame */ .WG)(process);
return acc;
}, {});
/***/ }),
/***/ 45974:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ n: () => (/* binding */ createRenderStep)
/* harmony export */ });
class Queue {
constructor() {
this.order = [];
this.scheduled = new Set();
}
add(process) {
if (!this.scheduled.has(process)) {
this.scheduled.add(process);
this.order.push(process);
return true;
}
}
remove(process) {
const index = this.order.indexOf(process);
if (index !== -1) {
this.order.splice(index, 1);
this.scheduled.delete(process);
}
}
clear() {
this.order.length = 0;
this.scheduled.clear();
}
}
function createRenderStep(runNextFrame) {
/**
* We create and reuse two queues, one to queue jobs for the current frame
* and one for the next. We reuse to avoid triggering GC after x frames.
*/
let thisFrame = new Queue();
let nextFrame = new Queue();
let numToRun = 0;
/**
* Track whether we're currently processing jobs in this step. This way
* we can decide whether to schedule new jobs for this frame or next.
*/
let isProcessing = false;
let flushNextFrame = false;
/**
* A set of processes which were marked keepAlive when scheduled.
*/
const toKeepAlive = new WeakSet();
const step = {
/**
* Schedule a process to run on the next frame.
*/
schedule: (callback, keepAlive = false, immediate = false) => {
const addToCurrentFrame = immediate && isProcessing;
const queue = addToCurrentFrame ? thisFrame : nextFrame;
if (keepAlive) toKeepAlive.add(callback);
if (queue.add(callback) && addToCurrentFrame && isProcessing) {
// If we're adding it to the currently running queue, update its measured size
numToRun = thisFrame.order.length;
}
return callback;
},
/**
* Cancel the provided callback from running on the next frame.
*/
cancel: callback => {
nextFrame.remove(callback);
toKeepAlive.delete(callback);
},
/**
* Execute all schedule callbacks.
*/
process: frameData => {
/**
* If we're already processing we've probably been triggered by a flushSync
* inside an existing process. Instead of executing, mark flushNextFrame
* as true and ensure we flush the following frame at the end of this one.
*/
if (isProcessing) {
flushNextFrame = true;
return;
}
isProcessing = true;
[thisFrame, nextFrame] = [nextFrame, thisFrame];
// Clear the next frame queue
nextFrame.clear();
// Execute this frame
numToRun = thisFrame.order.length;
if (numToRun) {
for (let i = 0; i < numToRun; i++) {
const callback = thisFrame.order[i];
callback(frameData);
if (toKeepAlive.has(callback)) {
step.schedule(callback);
runNextFrame();
}
}
}
isProcessing = false;
if (flushNextFrame) {
flushNextFrame = false;
step.process(frameData);
}
}
};
return step;
}
/***/ }),
/***/ 588145:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ n: () => (/* binding */ VisualElementDragControls)
/* harmony export */ });
/* unused harmony export elementDragControls */
/* harmony import */ var _utils_errors_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(841164);
/* harmony import */ var _pan_PanSession_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(120421);
/* harmony import */ var _utils_lock_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(986576);
/* harmony import */ var _utils_is_ref_object_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(105675);
/* harmony import */ var _events_add_pointer_event_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(420555);
/* harmony import */ var _utils_constraints_mjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(846767);
/* harmony import */ var _projection_geometry_models_mjs__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(298944);
/* harmony import */ var _projection_utils_each_axis_mjs__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(687464);
/* harmony import */ var _projection_utils_measure_mjs__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(410347);
/* harmony import */ var _events_event_info_mjs__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(563890);
/* harmony import */ var _projection_geometry_conversion_mjs__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(912158);
/* harmony import */ var _events_add_dom_event_mjs__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(527076);
/* harmony import */ var _projection_geometry_delta_calc_mjs__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(775886);
/* harmony import */ var _utils_mix_mjs__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(26085);
/* harmony import */ var _value_types_numbers_units_mjs__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(234223);
/* harmony import */ var _animation_interfaces_motion_value_mjs__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(430091);
/* harmony import */ var _utils_get_context_window_mjs__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(508382);
/* harmony import */ var _frameloop_frame_mjs__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(277210);
const elementDragControls = new WeakMap();
/**
*
*/
// let latestPointerEvent: PointerEvent
class VisualElementDragControls {
constructor(visualElement) {
// This is a reference to the global drag gesture lock, ensuring only one component
// can "capture" the drag of one or both axes.
// TODO: Look into moving this into pansession?
this.openGlobalLock = null;
this.isDragging = false;
this.currentDirection = null;
this.originPoint = {
x: 0,
y: 0
};
/**
* The permitted boundaries of travel, in pixels.
*/
this.constraints = false;
this.hasMutatedConstraints = false;
/**
* The per-axis resolved elastic values.
*/
this.elastic = (0,_projection_geometry_models_mjs__WEBPACK_IMPORTED_MODULE_6__/* .createBox */ .ge)();
this.visualElement = visualElement;
}
start(originEvent, {
snapToCursor = false
} = {}) {
/**
* Don't start dragging if this component is exiting
*/
const {
presenceContext
} = this.visualElement;
if (presenceContext && presenceContext.isPresent === false) return;
const onSessionStart = event => {
const {
dragSnapToOrigin
} = this.getProps();
// Stop or pause any animations on both axis values immediately. This allows the user to throw and catch
// the component.
dragSnapToOrigin ? this.pauseAnimation() : this.stopAnimation();
if (snapToCursor) {
this.snapToCursor((0,_events_event_info_mjs__WEBPACK_IMPORTED_MODULE_9__/* .extractEventInfo */ .e)(event, "page").point);
}
};
const onStart = (event, info) => {
// Attempt to grab the global drag gesture lock - maybe make this part of PanSession
const {
drag,
dragPropagation,
onDragStart
} = this.getProps();
if (drag && !dragPropagation) {
if (this.openGlobalLock) this.openGlobalLock();
this.openGlobalLock = (0,_utils_lock_mjs__WEBPACK_IMPORTED_MODULE_2__/* .getGlobalLock */ .nQ)(drag);
// If we don 't have the lock, don't start dragging
if (!this.openGlobalLock) return;
}
this.isDragging = true;
this.currentDirection = null;
this.resolveConstraints();
if (this.visualElement.projection) {
this.visualElement.projection.isAnimationBlocked = true;
this.visualElement.projection.target = undefined;
}
/**
* Record gesture origin
*/
(0,_projection_utils_each_axis_mjs__WEBPACK_IMPORTED_MODULE_7__/* .eachAxis */ .X)(axis => {
let current = this.getAxisMotionValue(axis).get() || 0;
/**
* If the MotionValue is a percentage value convert to px
*/
if (_value_types_numbers_units_mjs__WEBPACK_IMPORTED_MODULE_14__/* .percent */ .KN.test(current)) {
const {
projection
} = this.visualElement;
if (projection && projection.layout) {
const measuredAxis = projection.layout.layoutBox[axis];
if (measuredAxis) {
const length = (0,_projection_geometry_delta_calc_mjs__WEBPACK_IMPORTED_MODULE_12__/* .calcLength */ .CQ)(measuredAxis);
current = length * (parseFloat(current) / 100);
}
}
}
this.originPoint[axis] = current;
});
// Fire onDragStart event
if (onDragStart) {
_frameloop_frame_mjs__WEBPACK_IMPORTED_MODULE_17__/* .frame */ .Gt.update(() => onDragStart(event, info), false, true);
}
const {
animationState
} = this.visualElement;
animationState && animationState.setActive("whileDrag", true);
};
const onMove = (event, info) => {
// latestPointerEvent = event
const {
dragPropagation,
dragDirectionLock,
onDirectionLock,
onDrag
} = this.getProps();
// If we didn't successfully receive the gesture lock, early return.
if (!dragPropagation && !this.openGlobalLock) return;
const {
offset
} = info;
// Attempt to detect drag direction if directionLock is true
if (dragDirectionLock && this.currentDirection === null) {
this.currentDirection = getCurrentDirection(offset);
// If we've successfully set a direction, notify listener
if (this.currentDirection !== null) {
onDirectionLock && onDirectionLock(this.currentDirection);
}
return;
}
// Update each point with the latest position
this.updateAxis("x", info.point, offset);
this.updateAxis("y", info.point, offset);
/**
* Ideally we would leave the renderer to fire naturally at the end of
* this frame but if the element is about to change layout as the result
* of a re-render we want to ensure the browser can read the latest
* bounding box to ensure the pointer and element don't fall out of sync.
*/
this.visualElement.render();
/**
* This must fire after the render call as it might trigger a state
* change which itself might trigger a layout update.
*/
onDrag && onDrag(event, info);
};
const onSessionEnd = (event, info) => this.stop(event, info);
const resumeAnimation = () => (0,_projection_utils_each_axis_mjs__WEBPACK_IMPORTED_MODULE_7__/* .eachAxis */ .X)(axis => {
var _a;
return this.getAnimationState(axis) === "paused" && ((_a = this.getAxisMotionValue(axis).animation) === null || _a === void 0 ? void 0 : _a.play());
});
const {
dragSnapToOrigin
} = this.getProps();
this.panSession = new _pan_PanSession_mjs__WEBPACK_IMPORTED_MODULE_1__/* .PanSession */ .Q(originEvent, {
onSessionStart,
onStart,
onMove,
onSessionEnd,
resumeAnimation
}, {
transformPagePoint: this.visualElement.getTransformPagePoint(),
dragSnapToOrigin,
contextWindow: (0,_utils_get_context_window_mjs__WEBPACK_IMPORTED_MODULE_16__/* .getContextWindow */ .s)(this.visualElement)
});
}
stop(event, info) {
const isDragging = this.isDragging;
this.cancel();
if (!isDragging) return;
const {
velocity
} = info;
this.startAnimation(velocity);
const {
onDragEnd
} = this.getProps();
if (onDragEnd) {
_frameloop_frame_mjs__WEBPACK_IMPORTED_MODULE_17__/* .frame */ .Gt.update(() => onDragEnd(event, info));
}
}
cancel() {
this.isDragging = false;
const {
projection,
animationState
} = this.visualElement;
if (projection) {
projection.isAnimationBlocked = false;
}
this.panSession && this.panSession.end();
this.panSession = undefined;
const {
dragPropagation
} = this.getProps();
if (!dragPropagation && this.openGlobalLock) {
this.openGlobalLock();
this.openGlobalLock = null;
}
animationState && animationState.setActive("whileDrag", false);
}
updateAxis(axis, _point, offset) {
const {
drag
} = this.getProps();
// If we're not dragging this axis, do an early return.
if (!offset || !shouldDrag(axis, drag, this.currentDirection)) return;
const axisValue = this.getAxisMotionValue(axis);
let next = this.originPoint[axis] + offset[axis];
// Apply constraints
if (this.constraints && this.constraints[axis]) {
next = (0,_utils_constraints_mjs__WEBPACK_IMPORTED_MODULE_5__/* .applyConstraints */ .Zq)(next, this.constraints[axis], this.elastic[axis]);
}
axisValue.set(next);
}
resolveConstraints() {
var _a;
const {
dragConstraints,
dragElastic
} = this.getProps();
const layout = this.visualElement.projection && !this.visualElement.projection.layout ? this.visualElement.projection.measure(false) : (_a = this.visualElement.projection) === null || _a === void 0 ? void 0 : _a.layout;
const prevConstraints = this.constraints;
if (dragConstraints && (0,_utils_is_ref_object_mjs__WEBPACK_IMPORTED_MODULE_3__/* .isRefObject */ .X)(dragConstraints)) {
if (!this.constraints) {
this.constraints = this.resolveRefConstraints();
}
} else {
if (dragConstraints && layout) {
this.constraints = (0,_utils_constraints_mjs__WEBPACK_IMPORTED_MODULE_5__/* .calcRelativeConstraints */ ._c)(layout.layoutBox, dragConstraints);
} else {
this.constraints = false;
}
}
this.elastic = (0,_utils_constraints_mjs__WEBPACK_IMPORTED_MODULE_5__/* .resolveDragElastic */ .my)(dragElastic);
/**
* If we're outputting to external MotionValues, we want to rebase the measured constraints
* from viewport-relative to component-relative.
*/
if (prevConstraints !== this.constraints && layout && this.constraints && !this.hasMutatedConstraints) {
(0,_projection_utils_each_axis_mjs__WEBPACK_IMPORTED_MODULE_7__/* .eachAxis */ .X)(axis => {
if (this.getAxisMotionValue(axis)) {
this.constraints[axis] = (0,_utils_constraints_mjs__WEBPACK_IMPORTED_MODULE_5__/* .rebaseAxisConstraints */ .QX)(layout.layoutBox[axis], this.constraints[axis]);
}
});
}
}
resolveRefConstraints() {
const {
dragConstraints: constraints,
onMeasureDragConstraints
} = this.getProps();
if (!constraints || !(0,_utils_is_ref_object_mjs__WEBPACK_IMPORTED_MODULE_3__/* .isRefObject */ .X)(constraints)) return false;
const constraintsElement = constraints.current;
(0,_utils_errors_mjs__WEBPACK_IMPORTED_MODULE_0__/* .invariant */ .V)(constraintsElement !== null, "If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");
const {
projection
} = this.visualElement;
// TODO
if (!projection || !projection.layout) return false;
const constraintsBox = (0,_projection_utils_measure_mjs__WEBPACK_IMPORTED_MODULE_8__/* .measurePageBox */ .L)(constraintsElement, projection.root, this.visualElement.getTransformPagePoint());
let measuredConstraints = (0,_utils_constraints_mjs__WEBPACK_IMPORTED_MODULE_5__/* .calcViewportConstraints */ .iT)(projection.layout.layoutBox, constraintsBox);
/**
* If there's an onMeasureDragConstraints listener we call it and
* if different constraints are returned, set constraints to that
*/
if (onMeasureDragConstraints) {
const userConstraints = onMeasureDragConstraints((0,_projection_geometry_conversion_mjs__WEBPACK_IMPORTED_MODULE_10__/* .convertBoxToBoundingBox */ .pA)(measuredConstraints));
this.hasMutatedConstraints = !!userConstraints;
if (userConstraints) {
measuredConstraints = (0,_projection_geometry_conversion_mjs__WEBPACK_IMPORTED_MODULE_10__/* .convertBoundingBoxToBox */ .FY)(userConstraints);
}
}
return measuredConstraints;
}
startAnimation(velocity) {
const {
drag,
dragMomentum,
dragElastic,
dragTransition,
dragSnapToOrigin,
onDragTransitionEnd
} = this.getProps();
const constraints = this.constraints || {};
const momentumAnimations = (0,_projection_utils_each_axis_mjs__WEBPACK_IMPORTED_MODULE_7__/* .eachAxis */ .X)(axis => {
if (!shouldDrag(axis, drag, this.currentDirection)) {
return;
}
let transition = constraints && constraints[axis] || {};
if (dragSnapToOrigin) transition = {
min: 0,
max: 0
};
/**
* Overdamp the boundary spring if `dragElastic` is disabled. There's still a frame
* of spring animations so we should look into adding a disable spring option to `inertia`.
* We could do something here where we affect the `bounceStiffness` and `bounceDamping`
* using the value of `dragElastic`.
*/
const bounceStiffness = dragElastic ? 200 : 1000000;
const bounceDamping = dragElastic ? 40 : 10000000;
const inertia = {
type: "inertia",
velocity: dragMomentum ? velocity[axis] : 0,
bounceStiffness,
bounceDamping,
timeConstant: 750,
restDelta: 1,
restSpeed: 10,
...dragTransition,
...transition
};
// If we're not animating on an externally-provided `MotionValue` we can use the
// component's animation controls which will handle interactions with whileHover (etc),
// otherwise we just have to animate the `MotionValue` itself.
return this.startAxisValueAnimation(axis, inertia);
});
// Run all animations and then resolve the new drag constraints.
return Promise.all(momentumAnimations).then(onDragTransitionEnd);
}
startAxisValueAnimation(axis, transition) {
const axisValue = this.getAxisMotionValue(axis);
return axisValue.start((0,_animation_interfaces_motion_value_mjs__WEBPACK_IMPORTED_MODULE_15__/* .animateMotionValue */ .f)(axis, axisValue, 0, transition));
}
stopAnimation() {
(0,_projection_utils_each_axis_mjs__WEBPACK_IMPORTED_MODULE_7__/* .eachAxis */ .X)(axis => this.getAxisMotionValue(axis).stop());
}
pauseAnimation() {
(0,_projection_utils_each_axis_mjs__WEBPACK_IMPORTED_MODULE_7__/* .eachAxis */ .X)(axis => {
var _a;
return (_a = this.getAxisMotionValue(axis).animation) === null || _a === void 0 ? void 0 : _a.pause();
});
}
getAnimationState(axis) {
var _a;
return (_a = this.getAxisMotionValue(axis).animation) === null || _a === void 0 ? void 0 : _a.state;
}
/**
* Drag works differently depending on which props are provided.
*
* - If _dragX and _dragY are provided, we output the gesture delta directly to those motion values.
* - Otherwise, we apply the delta to the x/y motion values.
*/
getAxisMotionValue(axis) {
const dragKey = "_drag" + axis.toUpperCase();
const props = this.visualElement.getProps();
const externalMotionValue = props[dragKey];
return externalMotionValue ? externalMotionValue : this.visualElement.getValue(axis, (props.initial ? props.initial[axis] : undefined) || 0);
}
snapToCursor(point) {
(0,_projection_utils_each_axis_mjs__WEBPACK_IMPORTED_MODULE_7__/* .eachAxis */ .X)(axis => {
const {
drag
} = this.getProps();
// If we're not dragging this axis, do an early return.
if (!shouldDrag(axis, drag, this.currentDirection)) return;
const {
projection
} = this.visualElement;
const axisValue = this.getAxisMotionValue(axis);
if (projection && projection.layout) {
const {
min,
max
} = projection.layout.layoutBox[axis];
axisValue.set(point[axis] - (0,_utils_mix_mjs__WEBPACK_IMPORTED_MODULE_13__/* .mix */ .j)(min, max, 0.5));
}
});
}
/**
* When the viewport resizes we want to check if the measured constraints
* have changed and, if so, reposition the element within those new constraints
* relative to where it was before the resize.
*/
scalePositionWithinConstraints() {
if (!this.visualElement.current) return;
const {
drag,
dragConstraints
} = this.getProps();
const {
projection
} = this.visualElement;
if (!(0,_utils_is_ref_object_mjs__WEBPACK_IMPORTED_MODULE_3__/* .isRefObject */ .X)(dragConstraints) || !projection || !this.constraints) return;
/**
* Stop current animations as there can be visual glitching if we try to do
* this mid-animation
*/
this.stopAnimation();
/**
* Record the relative position of the dragged element relative to the
* constraints box and save as a progress value.
*/
const boxProgress = {
x: 0,
y: 0
};
(0,_projection_utils_each_axis_mjs__WEBPACK_IMPORTED_MODULE_7__/* .eachAxis */ .X)(axis => {
const axisValue = this.getAxisMotionValue(axis);
if (axisValue) {
const latest = axisValue.get();
boxProgress[axis] = (0,_utils_constraints_mjs__WEBPACK_IMPORTED_MODULE_5__/* .calcOrigin */ .Yu)({
min: latest,
max: latest
}, this.constraints[axis]);
}
});
/**
* Update the layout of this element and resolve the latest drag constraints
*/
const {
transformTemplate
} = this.visualElement.getProps();
this.visualElement.current.style.transform = transformTemplate ? transformTemplate({}, "") : "none";
projection.root && projection.root.updateScroll();
projection.updateLayout();
this.resolveConstraints();
/**
* For each axis, calculate the current progress of the layout axis
* within the new constraints.
*/
(0,_projection_utils_each_axis_mjs__WEBPACK_IMPORTED_MODULE_7__/* .eachAxis */ .X)(axis => {
if (!shouldDrag(axis, drag, null)) return;
/**
* Calculate a new transform based on the previous box progress
*/
const axisValue = this.getAxisMotionValue(axis);
const {
min,
max
} = this.constraints[axis];
axisValue.set((0,_utils_mix_mjs__WEBPACK_IMPORTED_MODULE_13__/* .mix */ .j)(min, max, boxProgress[axis]));
});
}
addListeners() {
if (!this.visualElement.current) return;
elementDragControls.set(this.visualElement, this);
const element = this.visualElement.current;
/**
* Attach a pointerdown event listener on this DOM element to initiate drag tracking.
*/
const stopPointerListener = (0,_events_add_pointer_event_mjs__WEBPACK_IMPORTED_MODULE_4__/* .addPointerEvent */ .h)(element, "pointerdown", event => {
const {
drag,
dragListener = true
} = this.getProps();
drag && dragListener && this.start(event);
});
const measureDragConstraints = () => {
const {
dragConstraints
} = this.getProps();
if ((0,_utils_is_ref_object_mjs__WEBPACK_IMPORTED_MODULE_3__/* .isRefObject */ .X)(dragConstraints)) {
this.constraints = this.resolveRefConstraints();
}
};
const {
projection
} = this.visualElement;
const stopMeasureLayoutListener = projection.addEventListener("measure", measureDragConstraints);
if (projection && !projection.layout) {
projection.root && projection.root.updateScroll();
projection.updateLayout();
}
measureDragConstraints();
/**
* Attach a window resize listener to scale the draggable target within its defined
* constraints as the window resizes.
*/
const stopResizeListener = (0,_events_add_dom_event_mjs__WEBPACK_IMPORTED_MODULE_11__/* .addDomEvent */ .k)(window, "resize", () => this.scalePositionWithinConstraints());
/**
* If the element's layout changes, calculate the delta and apply that to
* the drag gesture's origin point.
*/
const stopLayoutUpdateListener = projection.addEventListener("didUpdate", ({
delta,
hasLayoutChanged
}) => {
if (this.isDragging && hasLayoutChanged) {
(0,_projection_utils_each_axis_mjs__WEBPACK_IMPORTED_MODULE_7__/* .eachAxis */ .X)(axis => {
const motionValue = this.getAxisMotionValue(axis);
if (!motionValue) return;
this.originPoint[axis] += delta[axis].translate;
motionValue.set(motionValue.get() + delta[axis].translate);
});
this.visualElement.render();
}
});
return () => {
stopResizeListener();
stopPointerListener();
stopMeasureLayoutListener();
stopLayoutUpdateListener && stopLayoutUpdateListener();
};
}
getProps() {
const props = this.visualElement.getProps();
const {
drag = false,
dragDirectionLock = false,
dragPropagation = false,
dragConstraints = false,
dragElastic = _utils_constraints_mjs__WEBPACK_IMPORTED_MODULE_5__/* .defaultElastic */ .Ne,
dragMomentum = true
} = props;
return {
...props,
drag,
dragDirectionLock,
dragPropagation,
dragConstraints,
dragElastic,
dragMomentum
};
}
}
function shouldDrag(direction, drag, currentDirection) {
return (drag === true || drag === direction) && (currentDirection === null || currentDirection === direction);
}
/**
* Based on an x/y offset determine the current drag direction. If both axis' offsets are lower
* than the provided threshold, return `null`.
*
* @param offset - The x/y offset from origin.
* @param lockThreshold - (Optional) - the minimum absolute offset before we can determine a drag direction.
*/
function getCurrentDirection(offset, lockThreshold = 10) {
let direction = null;
if (Math.abs(offset.y) > lockThreshold) {
direction = "y";
} else if (Math.abs(offset.x) > lockThreshold) {
direction = "x";
}
return direction;
}
/***/ }),
/***/ 778673:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ w: () => (/* binding */ DragGesture)
/* harmony export */ });
/* harmony import */ var _motion_features_Feature_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(508298);
/* harmony import */ var _utils_noop_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(78777);
/* harmony import */ var _VisualElementDragControls_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(588145);
class DragGesture extends _motion_features_Feature_mjs__WEBPACK_IMPORTED_MODULE_0__/* .Feature */ .X {
constructor(node) {
super(node);
this.removeGroupControls = _utils_noop_mjs__WEBPACK_IMPORTED_MODULE_1__/* .noop */ .l;
this.removeListeners = _utils_noop_mjs__WEBPACK_IMPORTED_MODULE_1__/* .noop */ .l;
this.controls = new _VisualElementDragControls_mjs__WEBPACK_IMPORTED_MODULE_2__/* .VisualElementDragControls */ .n(node);
}
mount() {
// If we've been provided a DragControls for manual control over the drag gesture,
// subscribe this component to it on mount.
const {
dragControls
} = this.node.getProps();
if (dragControls) {
this.removeGroupControls = dragControls.subscribe(this.controls);
}
this.removeListeners = this.controls.addListeners() || _utils_noop_mjs__WEBPACK_IMPORTED_MODULE_1__/* .noop */ .l;
}
unmount() {
this.removeGroupControls();
this.removeListeners();
}
}
/***/ }),
/***/ 438038:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* unused harmony exports DragControls, useDragControls */
/* harmony import */ var core_js_modules_esnext_iterator_constructor_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(314846);
/* harmony import */ var core_js_modules_esnext_iterator_for_each_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(469655);
/* harmony import */ var _utils_use_constant_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(416155);
/**
* Can manually trigger a drag gesture on one or more `drag`-enabled `motion` components.
*
* ```jsx
* const dragControls = useDragControls()
*
* function startDrag(event) {
* dragControls.start(event, { snapToCursor: true })
* }
*
* return (
* <>
* <div onPointerDown={startDrag} />
* <motion.div drag="x" dragControls={dragControls} />
* </>
* )
* ```
*
* @public
*/
class DragControls {
constructor() {
this.componentControls = new Set();
}
/**
* Subscribe a component's internal `VisualElementDragControls` to the user-facing API.
*
* @internal
*/
subscribe(controls) {
this.componentControls.add(controls);
return () => this.componentControls.delete(controls);
}
/**
* Start a drag gesture on every `motion` component that has this set of drag controls
* passed into it via the `dragControls` prop.
*
* ```jsx
* dragControls.start(e, {
* snapToCursor: true
* })
* ```
*
* @param event - PointerEvent
* @param options - Options
*
* @public
*/
start(event, options) {
this.componentControls.forEach(controls => {
controls.start(event.nativeEvent || event, options);
});
}
}
const createDragControls = () => new DragControls();
/**
* Usually, dragging is initiated by pressing down on a `motion` component with a `drag` prop
* and moving it. For some use-cases, for instance clicking at an arbitrary point on a video scrubber, we
* might want to initiate that dragging from a different component than the draggable one.
*
* By creating a `dragControls` using the `useDragControls` hook, we can pass this into
* the draggable component's `dragControls` prop. It exposes a `start` method
* that can start dragging from pointer events on other components.
*
* ```jsx
* const dragControls = useDragControls()
*
* function startDrag(event) {
* dragControls.start(event, { snapToCursor: true })
* }
*
* return (
* <>
* <div onPointerDown={startDrag} />
* <motion.div drag="x" dragControls={dragControls} />
* </>
* )
* ```
*
* @public
*/
function useDragControls() {
return useConstant(createDragControls);
}
/***/ }),
/***/ 846767:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ Ne: () => (/* binding */ defaultElastic),
/* harmony export */ QX: () => (/* binding */ rebaseAxisConstraints),
/* harmony export */ Yu: () => (/* binding */ calcOrigin),
/* harmony export */ Zq: () => (/* binding */ applyConstraints),
/* harmony export */ _c: () => (/* binding */ calcRelativeConstraints),
/* harmony export */ iT: () => (/* binding */ calcViewportConstraints),
/* harmony export */ my: () => (/* binding */ resolveDragElastic)
/* harmony export */ });
/* unused harmony exports calcRelativeAxisConstraints, calcViewportAxisConstraints, resolveAxisElastic, resolvePointElastic */
/* harmony import */ var _utils_progress_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(799020);
/* harmony import */ var _projection_geometry_delta_calc_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(775886);
/* harmony import */ var _utils_clamp_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(893138);
/* harmony import */ var _utils_mix_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(26085);
/**
* Apply constraints to a point. These constraints are both physical along an
* axis, and an elastic factor that determines how much to constrain the point
* by if it does lie outside the defined parameters.
*/
function applyConstraints(point, {
min,
max
}, elastic) {
if (min !== undefined && point < min) {
// If we have a min point defined, and this is outside of that, constrain
point = elastic ? (0,_utils_mix_mjs__WEBPACK_IMPORTED_MODULE_3__/* .mix */ .j)(min, point, elastic.min) : Math.max(point, min);
} else if (max !== undefined && point > max) {
// If we have a max point defined, and this is outside of that, constrain
point = elastic ? (0,_utils_mix_mjs__WEBPACK_IMPORTED_MODULE_3__/* .mix */ .j)(max, point, elastic.max) : Math.min(point, max);
}
return point;
}
/**
* Calculate constraints in terms of the viewport when defined relatively to the
* measured axis. This is measured from the nearest edge, so a max constraint of 200
* on an axis with a max value of 300 would return a constraint of 500 - axis length
*/
function calcRelativeAxisConstraints(axis, min, max) {
return {
min: min !== undefined ? axis.min + min : undefined,
max: max !== undefined ? axis.max + max - (axis.max - axis.min) : undefined
};
}
/**
* Calculate constraints in terms of the viewport when
* defined relatively to the measured bounding box.
*/
function calcRelativeConstraints(layoutBox, {
top,
left,
bottom,
right
}) {
return {
x: calcRelativeAxisConstraints(layoutBox.x, left, right),
y: calcRelativeAxisConstraints(layoutBox.y, top, bottom)
};
}
/**
* Calculate viewport constraints when defined as another viewport-relative axis
*/
function calcViewportAxisConstraints(layoutAxis, constraintsAxis) {
let min = constraintsAxis.min - layoutAxis.min;
let max = constraintsAxis.max - layoutAxis.max;
// If the constraints axis is actually smaller than the layout axis then we can
// flip the constraints
if (constraintsAxis.max - constraintsAxis.min < layoutAxis.max - layoutAxis.min) {
[min, max] = [max, min];
}
return {
min,
max
};
}
/**
* Calculate viewport constraints when defined as another viewport-relative box
*/
function calcViewportConstraints(layoutBox, constraintsBox) {
return {
x: calcViewportAxisConstraints(layoutBox.x, constraintsBox.x),
y: calcViewportAxisConstraints(layoutBox.y, constraintsBox.y)
};
}
/**
* Calculate a transform origin relative to the source axis, between 0-1, that results
* in an asthetically pleasing scale/transform needed to project from source to target.
*/
function calcOrigin(source, target) {
let origin = 0.5;
const sourceLength = (0,_projection_geometry_delta_calc_mjs__WEBPACK_IMPORTED_MODULE_1__/* .calcLength */ .CQ)(source);
const targetLength = (0,_projection_geometry_delta_calc_mjs__WEBPACK_IMPORTED_MODULE_1__/* .calcLength */ .CQ)(target);
if (targetLength > sourceLength) {
origin = (0,_utils_progress_mjs__WEBPACK_IMPORTED_MODULE_0__/* .progress */ .q)(target.min, target.max - sourceLength, source.min);
} else if (sourceLength > targetLength) {
origin = (0,_utils_progress_mjs__WEBPACK_IMPORTED_MODULE_0__/* .progress */ .q)(source.min, source.max - targetLength, target.min);
}
return (0,_utils_clamp_mjs__WEBPACK_IMPORTED_MODULE_2__/* .clamp */ .q)(0, 1, origin);
}
/**
* Rebase the calculated viewport constraints relative to the layout.min point.
*/
function rebaseAxisConstraints(layout, constraints) {
const relativeConstraints = {};
if (constraints.min !== undefined) {
relativeConstraints.min = constraints.min - layout.min;
}
if (constraints.max !== undefined) {
relativeConstraints.max = constraints.max - layout.min;
}
return relativeConstraints;
}
const defaultElastic = 0.35;
/**
* Accepts a dragElastic prop and returns resolved elastic values for each axis.
*/
function resolveDragElastic(dragElastic = defaultElastic) {
if (dragElastic === false) {
dragElastic = 0;
} else if (dragElastic === true) {
dragElastic = defaultElastic;
}
return {
x: resolveAxisElastic(dragElastic, "left", "right"),
y: resolveAxisElastic(dragElastic, "top", "bottom")
};
}
function resolveAxisElastic(dragElastic, minLabel, maxLabel) {
return {
min: resolvePointElastic(dragElastic, minLabel),
max: resolvePointElastic(dragElastic, maxLabel)
};
}
function resolvePointElastic(dragElastic, label) {
return typeof dragElastic === "number" ? dragElastic : dragElastic[label] || 0;
}
/***/ }),
/***/ 986576:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ D3: () => (/* binding */ isDragActive),
/* harmony export */ nQ: () => (/* binding */ getGlobalLock)
/* harmony export */ });
/* unused harmony export createLock */
function createLock(name) {
let lock = null;
return () => {
const openLock = () => {
lock = null;
};
if (lock === null) {
lock = name;
return openLock;
}
return false;
};
}
const globalHorizontalLock = createLock("dragHorizontal");
const globalVerticalLock = createLock("dragVertical");
function getGlobalLock(drag) {
let lock = false;
if (drag === "y") {
lock = globalVerticalLock();
} else if (drag === "x") {
lock = globalHorizontalLock();
} else {
const openHorizontal = globalHorizontalLock();
const openVertical = globalVerticalLock();
if (openHorizontal && openVertical) {
lock = () => {
openHorizontal();
openVertical();
};
} else {
// Release the locks because we don't use them
if (openHorizontal) openHorizontal();
if (openVertical) openVertical();
}
}
return lock;
}
function isDragActive() {
// Check the gesture lock - if we get it, it means no drag gesture is active
// and we can safely fire the tap gesture.
const openGestureLock = getGlobalLock(true);
if (!openGestureLock) return true;
openGestureLock();
return false;
}
/***/ }),
/***/ 53294:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ c: () => (/* binding */ FocusGesture)
/* harmony export */ });
/* harmony import */ var _events_add_dom_event_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(527076);
/* harmony import */ var _motion_features_Feature_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(508298);
/* harmony import */ var _utils_pipe_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(804253);
class FocusGesture extends _motion_features_Feature_mjs__WEBPACK_IMPORTED_MODULE_1__/* .Feature */ .X {
constructor() {
super(...arguments);
this.isActive = false;
}
onFocus() {
let isFocusVisible = false;
/**
* If this element doesn't match focus-visible then don't
* apply whileHover. But, if matches throws that focus-visible
* is not a valid selector then in that browser outline styles will be applied
* to the element by default and we want to match that behaviour with whileFocus.
*/
try {
isFocusVisible = this.node.current.matches(":focus-visible");
} catch (e) {
isFocusVisible = true;
}
if (!isFocusVisible || !this.node.animationState) return;
this.node.animationState.setActive("whileFocus", true);
this.isActive = true;
}
onBlur() {
if (!this.isActive || !this.node.animationState) return;
this.node.animationState.setActive("whileFocus", false);
this.isActive = false;
}
mount() {
this.unmount = (0,_utils_pipe_mjs__WEBPACK_IMPORTED_MODULE_2__/* .pipe */ .F)((0,_events_add_dom_event_mjs__WEBPACK_IMPORTED_MODULE_0__/* .addDomEvent */ .k)(this.node.current, "focus", () => this.onFocus()), (0,_events_add_dom_event_mjs__WEBPACK_IMPORTED_MODULE_0__/* .addDomEvent */ .k)(this.node.current, "blur", () => this.onBlur()));
}
unmount() {}
}
/***/ }),
/***/ 694328:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ e: () => (/* binding */ HoverGesture)
/* harmony export */ });
/* harmony import */ var _events_add_pointer_event_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(420555);
/* harmony import */ var _utils_pipe_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(804253);
/* harmony import */ var _drag_utils_lock_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(986576);
/* harmony import */ var _motion_features_Feature_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(508298);
/* harmony import */ var _frameloop_frame_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(277210);
function addHoverEvent(node, isActive) {
const eventName = "pointer" + (isActive ? "enter" : "leave");
const callbackName = "onHover" + (isActive ? "Start" : "End");
const handleEvent = (event, info) => {
if (event.pointerType === "touch" || (0,_drag_utils_lock_mjs__WEBPACK_IMPORTED_MODULE_2__/* .isDragActive */ .D3)()) return;
const props = node.getProps();
if (node.animationState && props.whileHover) {
node.animationState.setActive("whileHover", isActive);
}
if (props[callbackName]) {
_frameloop_frame_mjs__WEBPACK_IMPORTED_MODULE_4__/* .frame */ .Gt.update(() => props[callbackName](event, info));
}
};
return (0,_events_add_pointer_event_mjs__WEBPACK_IMPORTED_MODULE_0__/* .addPointerEvent */ .h)(node.current, eventName, handleEvent, {
passive: !node.getProps()[callbackName]
});
}
class HoverGesture extends _motion_features_Feature_mjs__WEBPACK_IMPORTED_MODULE_3__/* .Feature */ .X {
mount() {
this.unmount = (0,_utils_pipe_mjs__WEBPACK_IMPORTED_MODULE_1__/* .pipe */ .F)(addHoverEvent(this.node, true), addHoverEvent(this.node, false));
}
unmount() {}
}
/***/ }),
/***/ 120421:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ Q: () => (/* binding */ PanSession)
/* harmony export */ });
/* harmony import */ var _events_event_info_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(563890);
/* harmony import */ var _utils_time_conversion_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(660127);
/* harmony import */ var _events_add_pointer_event_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(420555);
/* harmony import */ var _utils_pipe_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(804253);
/* harmony import */ var _utils_distance_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(367232);
/* harmony import */ var _events_utils_is_primary_pointer_mjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(760628);
/* harmony import */ var _frameloop_frame_mjs__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(277210);
/**
* @internal
*/
class PanSession {
constructor(event, handlers, {
transformPagePoint,
contextWindow,
dragSnapToOrigin = false
} = {}) {
/**
* @internal
*/
this.startEvent = null;
/**
* @internal
*/
this.lastMoveEvent = null;
/**
* @internal
*/
this.lastMoveEventInfo = null;
/**
* @internal
*/
this.handlers = {};
/**
* @internal
*/
this.contextWindow = window;
this.updatePoint = () => {
if (!(this.lastMoveEvent && this.lastMoveEventInfo)) return;
const info = getPanInfo(this.lastMoveEventInfo, this.history);
const isPanStarted = this.startEvent !== null;
// Only start panning if the offset is larger than 3 pixels. If we make it
// any larger than this we'll want to reset the pointer history
// on the first update to avoid visual snapping to the cursoe.
const isDistancePastThreshold = (0,_utils_distance_mjs__WEBPACK_IMPORTED_MODULE_4__/* .distance2D */ .w)(info.offset, {
x: 0,
y: 0
}) >= 3;
if (!isPanStarted && !isDistancePastThreshold) return;
const {
point
} = info;
const {
timestamp
} = _frameloop_frame_mjs__WEBPACK_IMPORTED_MODULE_6__/* .frameData */ .uv;
this.history.push({
...point,
timestamp
});
const {
onStart,
onMove
} = this.handlers;
if (!isPanStarted) {
onStart && onStart(this.lastMoveEvent, info);
this.startEvent = this.lastMoveEvent;
}
onMove && onMove(this.lastMoveEvent, info);
};
this.handlePointerMove = (event, info) => {
this.lastMoveEvent = event;
this.lastMoveEventInfo = transformPoint(info, this.transformPagePoint);
// Throttle mouse move event to once per frame
_frameloop_frame_mjs__WEBPACK_IMPORTED_MODULE_6__/* .frame */ .Gt.update(this.updatePoint, true);
};
this.handlePointerUp = (event, info) => {
this.end();
const {
onEnd,
onSessionEnd,
resumeAnimation
} = this.handlers;
if (this.dragSnapToOrigin) resumeAnimation && resumeAnimation();
if (!(this.lastMoveEvent && this.lastMoveEventInfo)) return;
const panInfo = getPanInfo(event.type === "pointercancel" ? this.lastMoveEventInfo : transformPoint(info, this.transformPagePoint), this.history);
if (this.startEvent && onEnd) {
onEnd(event, panInfo);
}
onSessionEnd && onSessionEnd(event, panInfo);
};
// If we have more than one touch, don't start detecting this gesture
if (!(0,_events_utils_is_primary_pointer_mjs__WEBPACK_IMPORTED_MODULE_5__/* .isPrimaryPointer */ .M)(event)) return;
this.dragSnapToOrigin = dragSnapToOrigin;
this.handlers = handlers;
this.transformPagePoint = transformPagePoint;
this.contextWindow = contextWindow || window;
const info = (0,_events_event_info_mjs__WEBPACK_IMPORTED_MODULE_0__/* .extractEventInfo */ .e)(event);
const initialInfo = transformPoint(info, this.transformPagePoint);
const {
point
} = initialInfo;
const {
timestamp
} = _frameloop_frame_mjs__WEBPACK_IMPORTED_MODULE_6__/* .frameData */ .uv;
this.history = [{
...point,
timestamp
}];
const {
onSessionStart
} = handlers;
onSessionStart && onSessionStart(event, getPanInfo(initialInfo, this.history));
this.removeListeners = (0,_utils_pipe_mjs__WEBPACK_IMPORTED_MODULE_3__/* .pipe */ .F)((0,_events_add_pointer_event_mjs__WEBPACK_IMPORTED_MODULE_2__/* .addPointerEvent */ .h)(this.contextWindow, "pointermove", this.handlePointerMove), (0,_events_add_pointer_event_mjs__WEBPACK_IMPORTED_MODULE_2__/* .addPointerEvent */ .h)(this.contextWindow, "pointerup", this.handlePointerUp), (0,_events_add_pointer_event_mjs__WEBPACK_IMPORTED_MODULE_2__/* .addPointerEvent */ .h)(this.contextWindow, "pointercancel", this.handlePointerUp));
}
updateHandlers(handlers) {
this.handlers = handlers;
}
end() {
this.removeListeners && this.removeListeners();
(0,_frameloop_frame_mjs__WEBPACK_IMPORTED_MODULE_6__/* .cancelFrame */ .WG)(this.updatePoint);
}
}
function transformPoint(info, transformPagePoint) {
return transformPagePoint ? {
point: transformPagePoint(info.point)
} : info;
}
function subtractPoint(a, b) {
return {
x: a.x - b.x,
y: a.y - b.y
};
}
function getPanInfo({
point
}, history) {
return {
point,
delta: subtractPoint(point, lastDevicePoint(history)),
offset: subtractPoint(point, startDevicePoint(history)),
velocity: getVelocity(history, 0.1)
};
}
function startDevicePoint(history) {
return history[0];
}
function lastDevicePoint(history) {
return history[history.length - 1];
}
function getVelocity(history, timeDelta) {
if (history.length < 2) {
return {
x: 0,
y: 0
};
}
let i = history.length - 1;
let timestampedPoint = null;
const lastPoint = lastDevicePoint(history);
while (i >= 0) {
timestampedPoint = history[i];
if (lastPoint.timestamp - timestampedPoint.timestamp > (0,_utils_time_conversion_mjs__WEBPACK_IMPORTED_MODULE_1__/* .secondsToMilliseconds */ .f)(timeDelta)) {
break;
}
i--;
}
if (!timestampedPoint) {
return {
x: 0,
y: 0
};
}
const time = (0,_utils_time_conversion_mjs__WEBPACK_IMPORTED_MODULE_1__/* .millisecondsToSeconds */ .X)(lastPoint.timestamp - timestampedPoint.timestamp);
if (time === 0) {
return {
x: 0,
y: 0
};
}
const currentVelocity = {
x: (lastPoint.x - timestampedPoint.x) / time,
y: (lastPoint.y - timestampedPoint.y) / time
};
if (currentVelocity.x === Infinity) {
currentVelocity.x = 0;
}
if (currentVelocity.y === Infinity) {
currentVelocity.y = 0;
}
return currentVelocity;
}
/***/ }),
/***/ 790258:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ f: () => (/* binding */ PanGesture)
/* harmony export */ });
/* harmony import */ var _PanSession_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(120421);
/* harmony import */ var _events_add_pointer_event_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(420555);
/* harmony import */ var _motion_features_Feature_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(508298);
/* harmony import */ var _utils_noop_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(78777);
/* harmony import */ var _utils_get_context_window_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(508382);
/* harmony import */ var _frameloop_frame_mjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(277210);
const asyncHandler = handler => (event, info) => {
if (handler) {
_frameloop_frame_mjs__WEBPACK_IMPORTED_MODULE_5__/* .frame */ .Gt.update(() => handler(event, info));
}
};
class PanGesture extends _motion_features_Feature_mjs__WEBPACK_IMPORTED_MODULE_2__/* .Feature */ .X {
constructor() {
super(...arguments);
this.removePointerDownListener = _utils_noop_mjs__WEBPACK_IMPORTED_MODULE_3__/* .noop */ .l;
}
onPointerDown(pointerDownEvent) {
this.session = new _PanSession_mjs__WEBPACK_IMPORTED_MODULE_0__/* .PanSession */ .Q(pointerDownEvent, this.createPanHandlers(), {
transformPagePoint: this.node.getTransformPagePoint(),
contextWindow: (0,_utils_get_context_window_mjs__WEBPACK_IMPORTED_MODULE_4__/* .getContextWindow */ .s)(this.node)
});
}
createPanHandlers() {
const {
onPanSessionStart,
onPanStart,
onPan,
onPanEnd
} = this.node.getProps();
return {
onSessionStart: asyncHandler(onPanSessionStart),
onStart: asyncHandler(onPanStart),
onMove: onPan,
onEnd: (event, info) => {
delete this.session;
if (onPanEnd) {
_frameloop_frame_mjs__WEBPACK_IMPORTED_MODULE_5__/* .frame */ .Gt.update(() => onPanEnd(event, info));
}
}
};
}
mount() {
this.removePointerDownListener = (0,_events_add_pointer_event_mjs__WEBPACK_IMPORTED_MODULE_1__/* .addPointerEvent */ .h)(this.node.current, "pointerdown", event => this.onPointerDown(event));
}
update() {
this.session && this.session.updateHandlers(this.createPanHandlers());
}
unmount() {
this.removePointerDownListener();
this.session && this.session.end();
}
}
/***/ }),
/***/ 448779:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ H: () => (/* binding */ PressGesture)
/* harmony export */ });
/* harmony import */ var _events_event_info_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(563890);
/* harmony import */ var _events_add_dom_event_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(527076);
/* harmony import */ var _events_add_pointer_event_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(420555);
/* harmony import */ var _motion_features_Feature_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(508298);
/* harmony import */ var _utils_pipe_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(804253);
/* harmony import */ var _drag_utils_lock_mjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(986576);
/* harmony import */ var _utils_is_node_or_child_mjs__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(40100);
/* harmony import */ var _utils_noop_mjs__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(78777);
/* harmony import */ var _frameloop_frame_mjs__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(277210);
function fireSyntheticPointerEvent(name, handler) {
if (!handler) return;
const syntheticPointerEvent = new PointerEvent("pointer" + name);
handler(syntheticPointerEvent, (0,_events_event_info_mjs__WEBPACK_IMPORTED_MODULE_0__/* .extractEventInfo */ .e)(syntheticPointerEvent));
}
class PressGesture extends _motion_features_Feature_mjs__WEBPACK_IMPORTED_MODULE_3__/* .Feature */ .X {
constructor() {
super(...arguments);
this.removeStartListeners = _utils_noop_mjs__WEBPACK_IMPORTED_MODULE_7__/* .noop */ .l;
this.removeEndListeners = _utils_noop_mjs__WEBPACK_IMPORTED_MODULE_7__/* .noop */ .l;
this.removeAccessibleListeners = _utils_noop_mjs__WEBPACK_IMPORTED_MODULE_7__/* .noop */ .l;
this.startPointerPress = (startEvent, startInfo) => {
if (this.isPressing) return;
this.removeEndListeners();
const props = this.node.getProps();
const endPointerPress = (endEvent, endInfo) => {
if (!this.checkPressEnd()) return;
const {
onTap,
onTapCancel,
globalTapTarget
} = this.node.getProps();
_frameloop_frame_mjs__WEBPACK_IMPORTED_MODULE_8__/* .frame */ .Gt.update(() => {
/**
* We only count this as a tap gesture if the event.target is the same
* as, or a child of, this component's element
*/
!globalTapTarget && !(0,_utils_is_node_or_child_mjs__WEBPACK_IMPORTED_MODULE_6__/* .isNodeOrChild */ .w)(this.node.current, endEvent.target) ? onTapCancel && onTapCancel(endEvent, endInfo) : onTap && onTap(endEvent, endInfo);
});
};
const removePointerUpListener = (0,_events_add_pointer_event_mjs__WEBPACK_IMPORTED_MODULE_2__/* .addPointerEvent */ .h)(window, "pointerup", endPointerPress, {
passive: !(props.onTap || props["onPointerUp"])
});
const removePointerCancelListener = (0,_events_add_pointer_event_mjs__WEBPACK_IMPORTED_MODULE_2__/* .addPointerEvent */ .h)(window, "pointercancel", (cancelEvent, cancelInfo) => this.cancelPress(cancelEvent, cancelInfo), {
passive: !(props.onTapCancel || props["onPointerCancel"])
});
this.removeEndListeners = (0,_utils_pipe_mjs__WEBPACK_IMPORTED_MODULE_4__/* .pipe */ .F)(removePointerUpListener, removePointerCancelListener);
this.startPress(startEvent, startInfo);
};
this.startAccessiblePress = () => {
const handleKeydown = keydownEvent => {
if (keydownEvent.key !== "Enter" || this.isPressing) return;
const handleKeyup = keyupEvent => {
if (keyupEvent.key !== "Enter" || !this.checkPressEnd()) return;
fireSyntheticPointerEvent("up", (event, info) => {
const {
onTap
} = this.node.getProps();
if (onTap) {
_frameloop_frame_mjs__WEBPACK_IMPORTED_MODULE_8__/* .frame */ .Gt.update(() => onTap(event, info));
}
});
};
this.removeEndListeners();
this.removeEndListeners = (0,_events_add_dom_event_mjs__WEBPACK_IMPORTED_MODULE_1__/* .addDomEvent */ .k)(this.node.current, "keyup", handleKeyup);
fireSyntheticPointerEvent("down", (event, info) => {
this.startPress(event, info);
});
};
const removeKeydownListener = (0,_events_add_dom_event_mjs__WEBPACK_IMPORTED_MODULE_1__/* .addDomEvent */ .k)(this.node.current, "keydown", handleKeydown);
const handleBlur = () => {
if (!this.isPressing) return;
fireSyntheticPointerEvent("cancel", (cancelEvent, cancelInfo) => this.cancelPress(cancelEvent, cancelInfo));
};
const removeBlurListener = (0,_events_add_dom_event_mjs__WEBPACK_IMPORTED_MODULE_1__/* .addDomEvent */ .k)(this.node.current, "blur", handleBlur);
this.removeAccessibleListeners = (0,_utils_pipe_mjs__WEBPACK_IMPORTED_MODULE_4__/* .pipe */ .F)(removeKeydownListener, removeBlurListener);
};
}
startPress(event, info) {
this.isPressing = true;
const {
onTapStart,
whileTap
} = this.node.getProps();
/**
* Ensure we trigger animations before firing event callback
*/
if (whileTap && this.node.animationState) {
this.node.animationState.setActive("whileTap", true);
}
if (onTapStart) {
_frameloop_frame_mjs__WEBPACK_IMPORTED_MODULE_8__/* .frame */ .Gt.update(() => onTapStart(event, info));
}
}
checkPressEnd() {
this.removeEndListeners();
this.isPressing = false;
const props = this.node.getProps();
if (props.whileTap && this.node.animationState) {
this.node.animationState.setActive("whileTap", false);
}
return !(0,_drag_utils_lock_mjs__WEBPACK_IMPORTED_MODULE_5__/* .isDragActive */ .D3)();
}
cancelPress(event, info) {
if (!this.checkPressEnd()) return;
const {
onTapCancel
} = this.node.getProps();
if (onTapCancel) {
_frameloop_frame_mjs__WEBPACK_IMPORTED_MODULE_8__/* .frame */ .Gt.update(() => onTapCancel(event, info));
}
}
mount() {
const props = this.node.getProps();
const removePointerListener = (0,_events_add_pointer_event_mjs__WEBPACK_IMPORTED_MODULE_2__/* .addPointerEvent */ .h)(props.globalTapTarget ? window : this.node.current, "pointerdown", this.startPointerPress, {
passive: !(props.onTapStart || props["onPointerStart"])
});
const removeFocusListener = (0,_events_add_dom_event_mjs__WEBPACK_IMPORTED_MODULE_1__/* .addDomEvent */ .k)(this.node.current, "focus", this.startAccessiblePress);
this.removeStartListeners = (0,_utils_pipe_mjs__WEBPACK_IMPORTED_MODULE_4__/* .pipe */ .F)(removePointerListener, removeFocusListener);
}
unmount() {
this.removeStartListeners();
this.removeEndListeners();
this.removeAccessibleListeners();
}
}
/***/ }),
/***/ 40100:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ w: () => (/* binding */ isNodeOrChild)
/* harmony export */ });
/**
* Recursively traverse up the tree to check whether the provided child node
* is the parent or a descendant of it.
*
* @param parent - Element to find
* @param child - Element to test against parent
*/
const isNodeOrChild = (parent, child) => {
if (!child) {
return false;
} else if (parent === child) {
return true;
} else {
return isNodeOrChild(parent, child.parentElement);
}
};
/***/ }),
/***/ 625121:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ Ny: () => (/* reexport safe */ _components_AnimatePresence_index_mjs__WEBPACK_IMPORTED_MODULE_2__.N),
/* harmony export */ PY: () => (/* reexport safe */ _render_dom_motion_mjs__WEBPACK_IMPORTED_MODULE_0__.P),
/* harmony export */ i0: () => (/* reexport safe */ _animation_animate_mjs__WEBPACK_IMPORTED_MODULE_63__.i)
/* harmony export */ });
/* harmony import */ var _render_dom_motion_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(142571);
/* harmony import */ var _render_dom_motion_minimal_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(959549);
/* harmony import */ var _components_AnimatePresence_index_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(207073);
/* harmony import */ var _components_MotionConfig_index_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(731911);
/* harmony import */ var _components_LazyMotion_index_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(553139);
/* harmony import */ var _components_LayoutGroup_index_mjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(176288);
/* harmony import */ var _components_Reorder_index_mjs__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(783186);
/* harmony import */ var _render_dom_features_animation_mjs__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(827073);
/* harmony import */ var _render_dom_features_max_mjs__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(475861);
/* harmony import */ var _value_use_motion_value_mjs__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(73885);
/* harmony import */ var _value_use_motion_template_mjs__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(167472);
/* harmony import */ var _value_utils_resolve_motion_value_mjs__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(736196);
/* harmony import */ var _value_use_transform_mjs__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(979829);
/* harmony import */ var _value_use_spring_mjs__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(375884);
/* harmony import */ var _value_use_velocity_mjs__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(106406);
/* harmony import */ var _value_use_scroll_mjs__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(100308);
/* harmony import */ var _value_scroll_use_element_scroll_mjs__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(333229);
/* harmony import */ var _value_scroll_use_viewport_scroll_mjs__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(439849);
/* harmony import */ var _value_use_time_mjs__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(846820);
/* harmony import */ var _value_use_will_change_index_mjs__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(975469);
/* harmony import */ var _utils_use_motion_value_event_mjs__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(261006);
/* harmony import */ var _utils_reduced_motion_use_reduced_motion_mjs__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(150092);
/* harmony import */ var _utils_reduced_motion_use_reduced_motion_config_mjs__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(494535);
/* harmony import */ var _animation_hooks_animation_controls_mjs__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(439284);
/* harmony import */ var _animation_hooks_use_animate_mjs__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(89528);
/* harmony import */ var _animation_hooks_use_animation_mjs__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(578843);
/* harmony import */ var _utils_use_animation_frame_mjs__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(404175);
/* harmony import */ var _animation_interfaces_visual_element_mjs__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(104570);
/* harmony import */ var _utils_use_cycle_mjs__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(683911);
/* harmony import */ var _motion_utils_valid_prop_mjs__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(116954);
/* harmony import */ var _components_AnimatePresence_use_presence_mjs__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(613646);
/* harmony import */ var _utils_use_in_view_mjs__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(364584);
/* harmony import */ var _gestures_drag_use_drag_controls_mjs__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(438038);
/* harmony import */ var _events_use_dom_event_mjs__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(576216);
/* harmony import */ var _motion_index_mjs__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(285424);
/* harmony import */ var _motion_utils_is_motion_component_mjs__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(773791);
/* harmony import */ var _motion_utils_unwrap_motion_component_mjs__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(32740);
/* harmony import */ var _render_VisualElement_mjs__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(373518);
/* harmony import */ var _projection_styles_scale_correction_mjs__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(602267);
/* harmony import */ var _utils_use_instant_transition_mjs__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(437614);
/* harmony import */ var _projection_use_instant_layout_transition_mjs__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(557013);
/* harmony import */ var _projection_use_reset_projection_mjs__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(674060);
/* harmony import */ var _render_html_utils_build_transform_mjs__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(52565);
/* harmony import */ var _render_store_mjs__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(550529);
/* harmony import */ var _animation_animators_js_index_mjs__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(731603);
/* harmony import */ var _value_types_color_index_mjs__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(449705);
/* harmony import */ var _value_types_complex_index_mjs__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(73748);
/* harmony import */ var _value_types_numbers_units_mjs__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__(234223);
/* harmony import */ var _utils_GlobalConfig_mjs__WEBPACK_IMPORTED_MODULE_48__ = __webpack_require__(718966);
/* harmony import */ var _animation_optimized_appear_start_mjs__WEBPACK_IMPORTED_MODULE_49__ = __webpack_require__(966540);
/* harmony import */ var _animation_optimized_appear_data_id_mjs__WEBPACK_IMPORTED_MODULE_50__ = __webpack_require__(150170);
/* harmony import */ var _animation_generators_spring_index_mjs__WEBPACK_IMPORTED_MODULE_51__ = __webpack_require__(311789);
/* harmony import */ var _context_MotionContext_index_mjs__WEBPACK_IMPORTED_MODULE_52__ = __webpack_require__(820631);
/* harmony import */ var _context_MotionConfigContext_mjs__WEBPACK_IMPORTED_MODULE_53__ = __webpack_require__(682832);
/* harmony import */ var _context_PresenceContext_mjs__WEBPACK_IMPORTED_MODULE_54__ = __webpack_require__(121953);
/* harmony import */ var _context_LayoutGroupContext_mjs__WEBPACK_IMPORTED_MODULE_55__ = __webpack_require__(780911);
/* harmony import */ var _context_SwitchLayoutGroupContext_mjs__WEBPACK_IMPORTED_MODULE_56__ = __webpack_require__(334175);
/* harmony import */ var _render_utils_flat_tree_mjs__WEBPACK_IMPORTED_MODULE_57__ = __webpack_require__(389462);
/* harmony import */ var _context_DeprecatedLayoutGroupContext_mjs__WEBPACK_IMPORTED_MODULE_58__ = __webpack_require__(45276);
/* harmony import */ var _animation_hooks_use_animated_state_mjs__WEBPACK_IMPORTED_MODULE_59__ = __webpack_require__(313036);
/* harmony import */ var _value_use_inverted_scale_mjs__WEBPACK_IMPORTED_MODULE_60__ = __webpack_require__(262345);
/* harmony import */ var _components_AnimateSharedLayout_mjs__WEBPACK_IMPORTED_MODULE_61__ = __webpack_require__(974818);
/* harmony import */ var _value_index_mjs__WEBPACK_IMPORTED_MODULE_62__ = __webpack_require__(239667);
/* harmony import */ var _animation_animate_mjs__WEBPACK_IMPORTED_MODULE_63__ = __webpack_require__(279611);
/* harmony import */ var _render_dom_scroll_index_mjs__WEBPACK_IMPORTED_MODULE_64__ = __webpack_require__(847891);
/* harmony import */ var _render_dom_scroll_track_mjs__WEBPACK_IMPORTED_MODULE_65__ = __webpack_require__(12582);
/* harmony import */ var _render_dom_viewport_index_mjs__WEBPACK_IMPORTED_MODULE_66__ = __webpack_require__(438182);
/* harmony import */ var _animation_utils_stagger_mjs__WEBPACK_IMPORTED_MODULE_67__ = __webpack_require__(331261);
/* harmony import */ var _utils_transform_mjs__WEBPACK_IMPORTED_MODULE_68__ = __webpack_require__(229455);
/* harmony import */ var _utils_clamp_mjs__WEBPACK_IMPORTED_MODULE_69__ = __webpack_require__(893138);
/* harmony import */ var _utils_mix_mjs__WEBPACK_IMPORTED_MODULE_70__ = __webpack_require__(26085);
/* harmony import */ var _utils_pipe_mjs__WEBPACK_IMPORTED_MODULE_71__ = __webpack_require__(804253);
/* harmony import */ var _utils_progress_mjs__WEBPACK_IMPORTED_MODULE_72__ = __webpack_require__(799020);
/* harmony import */ var _utils_wrap_mjs__WEBPACK_IMPORTED_MODULE_73__ = __webpack_require__(322801);
/* harmony import */ var _frameloop_index_legacy_mjs__WEBPACK_IMPORTED_MODULE_74__ = __webpack_require__(13587);
/* harmony import */ var _easing_anticipate_mjs__WEBPACK_IMPORTED_MODULE_75__ = __webpack_require__(569107);
/* harmony import */ var _easing_back_mjs__WEBPACK_IMPORTED_MODULE_76__ = __webpack_require__(308922);
/* harmony import */ var _easing_circ_mjs__WEBPACK_IMPORTED_MODULE_77__ = __webpack_require__(791806);
/* harmony import */ var _easing_ease_mjs__WEBPACK_IMPORTED_MODULE_78__ = __webpack_require__(95709);
/* harmony import */ var _easing_cubic_bezier_mjs__WEBPACK_IMPORTED_MODULE_79__ = __webpack_require__(436745);
/* harmony import */ var _easing_modifiers_mirror_mjs__WEBPACK_IMPORTED_MODULE_80__ = __webpack_require__(500203);
/* harmony import */ var _easing_modifiers_reverse_mjs__WEBPACK_IMPORTED_MODULE_81__ = __webpack_require__(780760);
/* harmony import */ var _utils_delay_mjs__WEBPACK_IMPORTED_MODULE_82__ = __webpack_require__(616246);
/* harmony import */ var _utils_distance_mjs__WEBPACK_IMPORTED_MODULE_83__ = __webpack_require__(367232);
/* harmony import */ var _utils_errors_mjs__WEBPACK_IMPORTED_MODULE_84__ = __webpack_require__(841164);
/* harmony import */ var _utils_interpolate_mjs__WEBPACK_IMPORTED_MODULE_85__ = __webpack_require__(323662);
/* harmony import */ var _frameloop_frame_mjs__WEBPACK_IMPORTED_MODULE_86__ = __webpack_require__(277210);
/* harmony import */ var _motion_features_animations_mjs__WEBPACK_IMPORTED_MODULE_87__ = __webpack_require__(788477);
/* harmony import */ var _render_utils_setters_mjs__WEBPACK_IMPORTED_MODULE_88__ = __webpack_require__(482200);
/* harmony import */ var _projection_geometry_models_mjs__WEBPACK_IMPORTED_MODULE_89__ = __webpack_require__(298944);
/* harmony import */ var _projection_geometry_delta_calc_mjs__WEBPACK_IMPORTED_MODULE_90__ = __webpack_require__(775886);
/* harmony import */ var _render_dom_utils_filter_props_mjs__WEBPACK_IMPORTED_MODULE_91__ = __webpack_require__(805796);
/* harmony import */ var _motion_utils_use_visual_state_mjs__WEBPACK_IMPORTED_MODULE_92__ = __webpack_require__(366084);
/* harmony import */ var _gestures_drag_utils_lock_mjs__WEBPACK_IMPORTED_MODULE_93__ = __webpack_require__(986576);
/* harmony import */ var _events_add_pointer_event_mjs__WEBPACK_IMPORTED_MODULE_94__ = __webpack_require__(420555);
/* harmony import */ var _events_event_info_mjs__WEBPACK_IMPORTED_MODULE_95__ = __webpack_require__(563890);
/* harmony import */ var _value_utils_is_motion_value_mjs__WEBPACK_IMPORTED_MODULE_96__ = __webpack_require__(573970);
/* harmony import */ var _utils_is_browser_mjs__WEBPACK_IMPORTED_MODULE_97__ = __webpack_require__(701134);
/* harmony import */ var _utils_use_unmount_effect_mjs__WEBPACK_IMPORTED_MODULE_98__ = __webpack_require__(758369);
/* harmony import */ var _utils_use_isomorphic_effect_mjs__WEBPACK_IMPORTED_MODULE_99__ = __webpack_require__(117946);
/* harmony import */ var _utils_use_force_update_mjs__WEBPACK_IMPORTED_MODULE_100__ = __webpack_require__(226990);
/***/ }),
/***/ 508298:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ X: () => (/* binding */ Feature)
/* harmony export */ });
class Feature {
constructor(node) {
this.isMounted = false;
this.node = node;
}
update() {}
}
/***/ }),
/***/ 922969:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ H: () => (/* binding */ ExitAnimationFeature)
/* harmony export */ });
/* harmony import */ var _Feature_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(508298);
let id = 0;
class ExitAnimationFeature extends _Feature_mjs__WEBPACK_IMPORTED_MODULE_0__/* .Feature */ .X {
constructor() {
super(...arguments);
this.id = id++;
}
update() {
if (!this.node.presenceContext) return;
const {
isPresent,
onExitComplete,
custom
} = this.node.presenceContext;
const {
isPresent: prevIsPresent
} = this.node.prevPresenceContext || {};
if (!this.node.animationState || isPresent === prevIsPresent) {
return;
}
const exitAnimation = this.node.animationState.setActive("exit", !isPresent, {
custom: custom !== null && custom !== void 0 ? custom : this.node.getProps().custom
});
if (onExitComplete && !isPresent) {
exitAnimation.then(() => onExitComplete(this.id));
}
}
mount() {
const {
register
} = this.node.presenceContext || {};
if (register) {
this.unmount = register(this.id);
}
}
unmount() {}
}
/***/ }),
/***/ 786311:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ j: () => (/* binding */ AnimationFeature)
/* harmony export */ });
/* harmony import */ var _animation_utils_is_animation_controls_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(892904);
/* harmony import */ var _render_utils_animation_state_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(316558);
/* harmony import */ var _Feature_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(508298);
class AnimationFeature extends _Feature_mjs__WEBPACK_IMPORTED_MODULE_2__/* .Feature */ .X {
/**
* We dynamically generate the AnimationState manager as it contains a reference
* to the underlying animation library. We only want to load that if we load this,
* so people can optionally code split it out using the `m` component.
*/
constructor(node) {
super(node);
node.animationState || (node.animationState = (0,_render_utils_animation_state_mjs__WEBPACK_IMPORTED_MODULE_1__/* .createAnimationState */ .L)(node));
}
updateAnimationControlsSubscription() {
const {
animate
} = this.node.getProps();
this.unmount();
if ((0,_animation_utils_is_animation_controls_mjs__WEBPACK_IMPORTED_MODULE_0__/* .isAnimationControls */ .N)(animate)) {
this.unmount = animate.subscribe(this.node);
}
}
/**
* Subscribe any provided AnimationControls to the component's VisualElement
*/
mount() {
this.updateAnimationControlsSubscription();
}
update() {
const {
animate
} = this.node.getProps();
const {
animate: prevAnimate
} = this.node.prevProps || {};
if (animate !== prevAnimate) {
this.updateAnimationControlsSubscription();
}
}
unmount() {}
}
/***/ }),
/***/ 788477:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ W: () => (/* binding */ animations)
/* harmony export */ });
/* harmony import */ var _animation_index_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(786311);
/* harmony import */ var _animation_exit_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(922969);
const animations = {
animation: {
Feature: _animation_index_mjs__WEBPACK_IMPORTED_MODULE_0__/* .AnimationFeature */ .j
},
exit: {
Feature: _animation_exit_mjs__WEBPACK_IMPORTED_MODULE_1__/* .ExitAnimationFeature */ .H
}
};
/***/ }),
/***/ 834430:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ B: () => (/* binding */ featureDefinitions)
/* harmony export */ });
/* harmony import */ var core_js_modules_esnext_iterator_constructor_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(314846);
/* harmony import */ var core_js_modules_esnext_iterator_some_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(275568);
const featureProps = {
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"]
};
const featureDefinitions = {};
for (const key in featureProps) {
featureDefinitions[key] = {
isEnabled: props => featureProps[key].some(name => !!props[name])
};
}
/***/ }),
/***/ 863986:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ $: () => (/* binding */ drag)
/* harmony export */ });
/* harmony import */ var _gestures_drag_index_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(778673);
/* harmony import */ var _gestures_pan_index_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(790258);
/* harmony import */ var _layout_MeasureLayout_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(127765);
/* harmony import */ var _projection_node_HTMLProjectionNode_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(157986);
const drag = {
pan: {
Feature: _gestures_pan_index_mjs__WEBPACK_IMPORTED_MODULE_1__/* .PanGesture */ .f
},
drag: {
Feature: _gestures_drag_index_mjs__WEBPACK_IMPORTED_MODULE_0__/* .DragGesture */ .w,
ProjectionNode: _projection_node_HTMLProjectionNode_mjs__WEBPACK_IMPORTED_MODULE_3__/* .HTMLProjectionNode */ .P,
MeasureLayout: _layout_MeasureLayout_mjs__WEBPACK_IMPORTED_MODULE_2__/* .MeasureLayout */ .$
}
};
/***/ }),
/***/ 302160:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ n: () => (/* binding */ gestureAnimations)
/* harmony export */ });
/* harmony import */ var _gestures_hover_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(694328);
/* harmony import */ var _gestures_focus_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(53294);
/* harmony import */ var _gestures_press_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(448779);
/* harmony import */ var _viewport_index_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(519843);
const gestureAnimations = {
inView: {
Feature: _viewport_index_mjs__WEBPACK_IMPORTED_MODULE_3__/* .InViewFeature */ .x
},
tap: {
Feature: _gestures_press_mjs__WEBPACK_IMPORTED_MODULE_2__/* .PressGesture */ .H
},
focus: {
Feature: _gestures_focus_mjs__WEBPACK_IMPORTED_MODULE_1__/* .FocusGesture */ .c
},
hover: {
Feature: _gestures_hover_mjs__WEBPACK_IMPORTED_MODULE_0__/* .HoverGesture */ .e
}
};
/***/ }),
/***/ 561522:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ Z: () => (/* binding */ layout)
/* harmony export */ });
/* harmony import */ var _projection_node_HTMLProjectionNode_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(157986);
/* harmony import */ var _layout_MeasureLayout_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(127765);
const layout = {
layout: {
ProjectionNode: _projection_node_HTMLProjectionNode_mjs__WEBPACK_IMPORTED_MODULE_0__/* .HTMLProjectionNode */ .P,
MeasureLayout: _layout_MeasureLayout_mjs__WEBPACK_IMPORTED_MODULE_1__/* .MeasureLayout */ .$
}
};
/***/ }),
/***/ 127765:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ $: () => (/* binding */ MeasureLayout)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(63696);
/* harmony import */ var _components_AnimatePresence_use_presence_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(613646);
/* harmony import */ var _context_LayoutGroupContext_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(780911);
/* harmony import */ var _context_SwitchLayoutGroupContext_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(334175);
/* harmony import */ var _projection_node_state_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(65281);
/* harmony import */ var _projection_styles_scale_border_radius_mjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(694608);
/* harmony import */ var _projection_styles_scale_box_shadow_mjs__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(828667);
/* harmony import */ var _projection_styles_scale_correction_mjs__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(602267);
/* harmony import */ var _frameloop_frame_mjs__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(277210);
class MeasureLayoutWithContext extends react__WEBPACK_IMPORTED_MODULE_0__.Component {
/**
* This only mounts projection nodes for components that
* need measuring, we might want to do it for all components
* in order to incorporate transforms
*/
componentDidMount() {
const {
visualElement,
layoutGroup,
switchLayoutGroup,
layoutId
} = this.props;
const {
projection
} = visualElement;
(0,_projection_styles_scale_correction_mjs__WEBPACK_IMPORTED_MODULE_7__/* .addScaleCorrector */ .$)(defaultScaleCorrectors);
if (projection) {
if (layoutGroup.group) layoutGroup.group.add(projection);
if (switchLayoutGroup && switchLayoutGroup.register && layoutId) {
switchLayoutGroup.register(projection);
}
projection.root.didUpdate();
projection.addEventListener("animationComplete", () => {
this.safeToRemove();
});
projection.setOptions({
...projection.options,
onExitComplete: () => this.safeToRemove()
});
}
_projection_node_state_mjs__WEBPACK_IMPORTED_MODULE_4__/* .globalProjectionState */ .w.hasEverUpdated = true;
}
getSnapshotBeforeUpdate(prevProps) {
const {
layoutDependency,
visualElement,
drag,
isPresent
} = this.props;
const projection = visualElement.projection;
if (!projection) return null;
/**
* TODO: We use this data in relegate to determine whether to
* promote a previous element. There's no guarantee its presence data
* will have updated by this point - if a bug like this arises it will
* have to be that we markForRelegation and then find a new lead some other way,
* perhaps in didUpdate
*/
projection.isPresent = isPresent;
if (drag || prevProps.layoutDependency !== layoutDependency || layoutDependency === undefined) {
projection.willUpdate();
} else {
this.safeToRemove();
}
if (prevProps.isPresent !== isPresent) {
if (isPresent) {
projection.promote();
} else if (!projection.relegate()) {
/**
* If there's another stack member taking over from this one,
* it's in charge of the exit animation and therefore should
* be in charge of the safe to remove. Otherwise we call it here.
*/
_frameloop_frame_mjs__WEBPACK_IMPORTED_MODULE_8__/* .frame */ .Gt.postRender(() => {
const stack = projection.getStack();
if (!stack || !stack.members.length) {
this.safeToRemove();
}
});
}
}
return null;
}
componentDidUpdate() {
const {
projection
} = this.props.visualElement;
if (projection) {
projection.root.didUpdate();
queueMicrotask(() => {
if (!projection.currentAnimation && projection.isLead()) {
this.safeToRemove();
}
});
}
}
componentWillUnmount() {
const {
visualElement,
layoutGroup,
switchLayoutGroup: promoteContext
} = this.props;
const {
projection
} = visualElement;
if (projection) {
projection.scheduleCheckAfterUnmount();
if (layoutGroup && layoutGroup.group) layoutGroup.group.remove(projection);
if (promoteContext && promoteContext.deregister) promoteContext.deregister(projection);
}
}
safeToRemove() {
const {
safeToRemove
} = this.props;
safeToRemove && safeToRemove();
}
render() {
return null;
}
}
function MeasureLayout(props) {
const [isPresent, safeToRemove] = (0,_components_AnimatePresence_use_presence_mjs__WEBPACK_IMPORTED_MODULE_1__/* .usePresence */ .xQ)();
const layoutGroup = (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(_context_LayoutGroupContext_mjs__WEBPACK_IMPORTED_MODULE_2__/* .LayoutGroupContext */ .L);
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(MeasureLayoutWithContext, {
...props,
layoutGroup: layoutGroup,
switchLayoutGroup: (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(_context_SwitchLayoutGroupContext_mjs__WEBPACK_IMPORTED_MODULE_3__/* .SwitchLayoutGroupContext */ .N),
isPresent: isPresent,
safeToRemove: safeToRemove
});
}
const defaultScaleCorrectors = {
borderRadius: {
..._projection_styles_scale_border_radius_mjs__WEBPACK_IMPORTED_MODULE_5__/* .correctBorderRadius */ .P,
applyTo: ["borderTopLeftRadius", "borderTopRightRadius", "borderBottomLeftRadius", "borderBottomRightRadius"]
},
borderTopLeftRadius: _projection_styles_scale_border_radius_mjs__WEBPACK_IMPORTED_MODULE_5__/* .correctBorderRadius */ .P,
borderTopRightRadius: _projection_styles_scale_border_radius_mjs__WEBPACK_IMPORTED_MODULE_5__/* .correctBorderRadius */ .P,
borderBottomLeftRadius: _projection_styles_scale_border_radius_mjs__WEBPACK_IMPORTED_MODULE_5__/* .correctBorderRadius */ .P,
borderBottomRightRadius: _projection_styles_scale_border_radius_mjs__WEBPACK_IMPORTED_MODULE_5__/* .correctBorderRadius */ .P,
boxShadow: _projection_styles_scale_box_shadow_mjs__WEBPACK_IMPORTED_MODULE_6__/* .correctBoxShadow */ ._
};
/***/ }),
/***/ 725240:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ Y: () => (/* binding */ loadFeatures)
/* harmony export */ });
/* harmony import */ var _definitions_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(834430);
function loadFeatures(features) {
for (const key in features) {
_definitions_mjs__WEBPACK_IMPORTED_MODULE_0__/* .featureDefinitions */ .B[key] = {
..._definitions_mjs__WEBPACK_IMPORTED_MODULE_0__/* .featureDefinitions */ .B[key],
...features[key]
};
}
}
/***/ }),
/***/ 519843:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ x: () => (/* binding */ InViewFeature)
/* harmony export */ });
/* harmony import */ var _Feature_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(508298);
/* harmony import */ var _observers_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(329294);
const thresholdNames = {
some: 0,
all: 1
};
class InViewFeature extends _Feature_mjs__WEBPACK_IMPORTED_MODULE_0__/* .Feature */ .X {
constructor() {
super(...arguments);
this.hasEnteredView = false;
this.isInView = false;
}
startObserver() {
this.unmount();
const {
viewport = {}
} = this.node.getProps();
const {
root,
margin: rootMargin,
amount = "some",
once
} = viewport;
const options = {
root: root ? root.current : undefined,
rootMargin,
threshold: typeof amount === "number" ? amount : thresholdNames[amount]
};
const onIntersectionUpdate = entry => {
const {
isIntersecting
} = entry;
/**
* If there's been no change in the viewport state, early return.
*/
if (this.isInView === isIntersecting) return;
this.isInView = isIntersecting;
/**
* Handle hasEnteredView. If this is only meant to run once, and
* element isn't visible, early return. Otherwise set hasEnteredView to true.
*/
if (once && !isIntersecting && this.hasEnteredView) {
return;
} else if (isIntersecting) {
this.hasEnteredView = true;
}
if (this.node.animationState) {
this.node.animationState.setActive("whileInView", isIntersecting);
}
/**
* Use the latest committed props rather than the ones in scope
* when this observer is created
*/
const {
onViewportEnter,
onViewportLeave
} = this.node.getProps();
const callback = isIntersecting ? onViewportEnter : onViewportLeave;
callback && callback(entry);
};
return (0,_observers_mjs__WEBPACK_IMPORTED_MODULE_1__/* .observeIntersection */ .m)(this.node.current, options, onIntersectionUpdate);
}
mount() {
this.startObserver();
}
update() {
if (typeof IntersectionObserver === "undefined") return;
const {
props,
prevProps
} = this.node;
const hasOptionsChanged = ["amount", "margin", "root"].some(hasViewportOptionChanged(props, prevProps));
if (hasOptionsChanged) {
this.startObserver();
}
}
unmount() {}
}
function hasViewportOptionChanged({
viewport = {}
}, {
viewport: prevViewport = {}
} = {}) {
return name => viewport[name] !== prevViewport[name];
}
/***/ }),
/***/ 329294:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ m: () => (/* binding */ observeIntersection)
/* harmony export */ });
/* harmony import */ var core_js_modules_esnext_iterator_constructor_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(314846);
/* harmony import */ var core_js_modules_esnext_iterator_for_each_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(469655);
/**
* Map an IntersectionHandler callback to an element. We only ever make one handler for one
* element, so even though these handlers might all be triggered by different
* observers, we can keep them in the same map.
*/
const observerCallbacks = new WeakMap();
/**
* Multiple observers can be created for multiple element/document roots. Each with
* different settings. So here we store dictionaries of observers to each root,
* using serialised settings (threshold/margin) as lookup keys.
*/
const observers = new WeakMap();
const fireObserverCallback = entry => {
const callback = observerCallbacks.get(entry.target);
callback && callback(entry);
};
const fireAllObserverCallbacks = entries => {
entries.forEach(fireObserverCallback);
};
function initIntersectionObserver({
root,
...options
}) {
const lookupRoot = root || document;
/**
* If we don't have an observer lookup map for this root, create one.
*/
if (!observers.has(lookupRoot)) {
observers.set(lookupRoot, {});
}
const rootObservers = observers.get(lookupRoot);
const key = JSON.stringify(options);
/**
* If we don't have an observer for this combination of root and settings,
* create one.
*/
if (!rootObservers[key]) {
rootObservers[key] = new IntersectionObserver(fireAllObserverCallbacks, {
root,
...options
});
}
return rootObservers[key];
}
function observeIntersection(element, options, callback) {
const rootInteresectionObserver = initIntersectionObserver(options);
observerCallbacks.set(element, callback);
rootInteresectionObserver.observe(element);
return () => {
observerCallbacks.delete(element);
rootInteresectionObserver.unobserve(element);
};
}
/***/ }),
/***/ 285424:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ G: () => (/* binding */ createMotionComponent)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(63696);
/* harmony import */ var _context_MotionConfigContext_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(682832);
/* harmony import */ var _context_MotionContext_index_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(820631);
/* harmony import */ var _utils_use_visual_element_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(890875);
/* harmony import */ var _utils_use_motion_ref_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(716226);
/* harmony import */ var _context_MotionContext_create_mjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(125793);
/* harmony import */ var _features_load_features_mjs__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(725240);
/* harmony import */ var _utils_is_browser_mjs__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(701134);
/* harmony import */ var _context_LayoutGroupContext_mjs__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(780911);
/* harmony import */ var _context_LazyContext_mjs__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(889110);
/* harmony import */ var _context_SwitchLayoutGroupContext_mjs__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(334175);
/* harmony import */ var _utils_symbol_mjs__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(908134);
/**
* Create a `motion` component.
*
* This function accepts a Component argument, which can be either a string (ie "div"
* for `motion.div`), or an actual React component.
*
* Alongside this is a config option which provides a way of rendering the provided
* component "offline", or outside the React render cycle.
*/
function createMotionComponent({
preloadedFeatures,
createVisualElement,
useRender,
useVisualState,
Component
}) {
preloadedFeatures && (0,_features_load_features_mjs__WEBPACK_IMPORTED_MODULE_6__/* .loadFeatures */ .Y)(preloadedFeatures);
function MotionComponent(props, externalRef) {
/**
* If we need to measure the element we load this functionality in a
* separate class component in order to gain access to getSnapshotBeforeUpdate.
*/
let MeasureLayout;
const configAndProps = {
...(0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(_context_MotionConfigContext_mjs__WEBPACK_IMPORTED_MODULE_1__/* .MotionConfigContext */ .Q),
...props,
layoutId: useLayoutId(props)
};
const {
isStatic
} = configAndProps;
const context = (0,_context_MotionContext_create_mjs__WEBPACK_IMPORTED_MODULE_5__/* .useCreateMotionContext */ .z)(props);
const visualState = useVisualState(props, isStatic);
if (!isStatic && _utils_is_browser_mjs__WEBPACK_IMPORTED_MODULE_7__/* .isBrowser */ .B) {
/**
* Create a VisualElement for this component. A VisualElement provides a common
* interface to renderer-specific APIs (ie DOM/Three.js etc) as well as
* providing a way of rendering to these APIs outside of the React render loop
* for more performant animations and interactions
*/
context.visualElement = (0,_utils_use_visual_element_mjs__WEBPACK_IMPORTED_MODULE_3__/* .useVisualElement */ .Y)(Component, visualState, configAndProps, createVisualElement);
/**
* Load Motion gesture and animation features. These are rendered as renderless
* components so each feature can optionally make use of React lifecycle methods.
*/
const initialLayoutGroupConfig = (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(_context_SwitchLayoutGroupContext_mjs__WEBPACK_IMPORTED_MODULE_10__/* .SwitchLayoutGroupContext */ .N);
const isStrict = (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(_context_LazyContext_mjs__WEBPACK_IMPORTED_MODULE_9__/* .LazyContext */ .Y).strict;
if (context.visualElement) {
MeasureLayout = context.visualElement.loadFeatures(
// Note: Pass the full new combined props to correctly re-render dynamic feature components.
configAndProps, isStrict, preloadedFeatures, initialLayoutGroupConfig);
}
}
/**
* The mount order and hierarchy is specific to ensure our element ref
* is hydrated by the time features fire their effects.
*/
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_context_MotionContext_index_mjs__WEBPACK_IMPORTED_MODULE_2__/* .MotionContext */ .A.Provider, {
value: context
}, MeasureLayout && context.visualElement ? ( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(MeasureLayout, {
visualElement: context.visualElement,
...configAndProps
})) : null, useRender(Component, props, (0,_utils_use_motion_ref_mjs__WEBPACK_IMPORTED_MODULE_4__/* .useMotionRef */ .J)(visualState, context.visualElement, externalRef), visualState, isStatic, context.visualElement));
}
const ForwardRefComponent = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(MotionComponent);
ForwardRefComponent[_utils_symbol_mjs__WEBPACK_IMPORTED_MODULE_11__/* .motionComponentSymbol */ .o] = Component;
return ForwardRefComponent;
}
function useLayoutId({
layoutId
}) {
const layoutGroupId = (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(_context_LayoutGroupContext_mjs__WEBPACK_IMPORTED_MODULE_8__/* .LayoutGroupContext */ .L).id;
return layoutGroupId && layoutId !== undefined ? layoutGroupId + "-" + layoutId : layoutId;
}
/***/ }),
/***/ 822047:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ z: () => (/* binding */ isForcedMotionValue)
/* harmony export */ });
/* harmony import */ var _projection_styles_scale_correction_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(602267);
/* harmony import */ var _render_html_utils_transform_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(353994);
function isForcedMotionValue(key, {
layout,
layoutId
}) {
return _render_html_utils_transform_mjs__WEBPACK_IMPORTED_MODULE_1__/* .transformProps */ .f.has(key) || key.startsWith("origin") || (layout || layoutId !== undefined) && (!!_projection_styles_scale_correction_mjs__WEBPACK_IMPORTED_MODULE_0__/* .scaleCorrectors */ .H[key] || key === "opacity");
}
/***/ }),
/***/ 773791:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* unused harmony export isMotionComponent */
/* harmony import */ var _symbol_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(908134);
/**
* Checks if a component is a `motion` component.
*/
function isMotionComponent(component) {
return component !== null && typeof component === "object" && motionComponentSymbol in component;
}
/***/ }),
/***/ 908134:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ o: () => (/* binding */ motionComponentSymbol)
/* harmony export */ });
const motionComponentSymbol = Symbol.for("motionComponentSymbol");
/***/ }),
/***/ 32740:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* unused harmony export unwrapMotionComponent */
/* harmony import */ var _is_motion_component_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(773791);
/* harmony import */ var _symbol_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(908134);
/**
* Unwraps a `motion` component and returns either a string for `motion.div` or
* the React component for `motion(Component)`.
*
* If the component is not a `motion` component it returns undefined.
*/
function unwrapMotionComponent(component) {
if (isMotionComponent(component)) {
return component[motionComponentSymbol];
}
return undefined;
}
/***/ }),
/***/ 716226:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ J: () => (/* binding */ useMotionRef)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(63696);
/* harmony import */ var _utils_is_ref_object_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(105675);
/**
* Creates a ref function that, when called, hydrates the provided
* external ref and VisualElement.
*/
function useMotionRef(visualState, visualElement, externalRef) {
return (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(instance => {
instance && visualState.mount && visualState.mount(instance);
if (visualElement) {
instance ? visualElement.mount(instance) : visualElement.unmount();
}
if (externalRef) {
if (typeof externalRef === "function") {
externalRef(instance);
} else if ((0,_utils_is_ref_object_mjs__WEBPACK_IMPORTED_MODULE_1__/* .isRefObject */ .X)(externalRef)) {
externalRef.current = instance;
}
}
},
/**
* Only pass a new ref callback to React if we've received a visual element
* factory. Otherwise we'll be mounting/remounting every time externalRef
* or other dependencies change.
*/
[visualElement]);
}
/***/ }),
/***/ 890875:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ Y: () => (/* binding */ useVisualElement)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(63696);
/* harmony import */ var _context_PresenceContext_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(121953);
/* harmony import */ var _context_MotionContext_index_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(820631);
/* harmony import */ var _utils_use_isomorphic_effect_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(117946);
/* harmony import */ var _context_LazyContext_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(889110);
/* harmony import */ var _context_MotionConfigContext_mjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(682832);
/* harmony import */ var _animation_optimized_appear_data_id_mjs__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(150170);
function useVisualElement(Component, visualState, props, createVisualElement) {
const {
visualElement: parent
} = (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(_context_MotionContext_index_mjs__WEBPACK_IMPORTED_MODULE_2__/* .MotionContext */ .A);
const lazyContext = (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(_context_LazyContext_mjs__WEBPACK_IMPORTED_MODULE_4__/* .LazyContext */ .Y);
const presenceContext = (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(_context_PresenceContext_mjs__WEBPACK_IMPORTED_MODULE_1__/* .PresenceContext */ .t);
const reducedMotionConfig = (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(_context_MotionConfigContext_mjs__WEBPACK_IMPORTED_MODULE_5__/* .MotionConfigContext */ .Q).reducedMotion;
const visualElementRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)();
/**
* If we haven't preloaded a renderer, check to see if we have one lazy-loaded
*/
createVisualElement = createVisualElement || lazyContext.renderer;
if (!visualElementRef.current && createVisualElement) {
visualElementRef.current = createVisualElement(Component, {
visualState,
parent,
props,
presenceContext,
blockInitialAnimation: presenceContext ? presenceContext.initial === false : false,
reducedMotionConfig
});
}
const visualElement = visualElementRef.current;
(0,react__WEBPACK_IMPORTED_MODULE_0__.useInsertionEffect)(() => {
visualElement && visualElement.update(props, presenceContext);
});
/**
* Cache this value as we want to know whether HandoffAppearAnimations
* was present on initial render - it will be deleted after this.
*/
const wantsHandoff = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(Boolean(props[_animation_optimized_appear_data_id_mjs__WEBPACK_IMPORTED_MODULE_6__/* .optimizedAppearDataAttribute */ .n] && !window.HandoffComplete));
(0,_utils_use_isomorphic_effect_mjs__WEBPACK_IMPORTED_MODULE_3__/* .useIsomorphicLayoutEffect */ .E)(() => {
if (!visualElement) return;
visualElement.render();
/**
* Ideally this function would always run in a useEffect.
*
* However, if we have optimised appear animations to handoff from,
* it needs to happen synchronously to ensure there's no flash of
* incorrect styles in the event of a hydration error.
*
* So if we detect a situtation where optimised appear animations
* are running, we use useLayoutEffect to trigger animations.
*/
if (wantsHandoff.current && visualElement.animationState) {
visualElement.animationState.animateChanges();
}
});
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
if (!visualElement) return;
visualElement.updateFeatures();
if (!wantsHandoff.current && visualElement.animationState) {
visualElement.animationState.animateChanges();
}
if (wantsHandoff.current) {
wantsHandoff.current = false;
// This ensures all future calls to animateChanges() will run in useEffect
window.HandoffComplete = true;
}
});
return visualElement;
}
/***/ }),
/***/ 366084:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ T: () => (/* binding */ makeUseVisualState)
/* harmony export */ });
/* harmony import */ var core_js_modules_esnext_iterator_constructor_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(314846);
/* harmony import */ var core_js_modules_esnext_iterator_for_each_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(469655);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(63696);
/* harmony import */ var _animation_utils_is_animation_controls_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(892904);
/* harmony import */ var _context_PresenceContext_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(121953);
/* harmony import */ var _render_utils_resolve_variants_mjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(775691);
/* harmony import */ var _utils_use_constant_mjs__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(416155);
/* harmony import */ var _value_utils_resolve_motion_value_mjs__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(736196);
/* harmony import */ var _context_MotionContext_index_mjs__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(820631);
/* harmony import */ var _render_utils_is_controlling_variants_mjs__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(884135);
function makeState({
scrapeMotionValuesFromProps,
createRenderState,
onMount
}, props, context, presenceContext) {
const state = {
latestValues: makeLatestValues(props, context, presenceContext, scrapeMotionValuesFromProps),
renderState: createRenderState()
};
if (onMount) {
state.mount = instance => onMount(props, instance, state);
}
return state;
}
const makeUseVisualState = config => (props, isStatic) => {
const context = (0,react__WEBPACK_IMPORTED_MODULE_2__.useContext)(_context_MotionContext_index_mjs__WEBPACK_IMPORTED_MODULE_8__/* .MotionContext */ .A);
const presenceContext = (0,react__WEBPACK_IMPORTED_MODULE_2__.useContext)(_context_PresenceContext_mjs__WEBPACK_IMPORTED_MODULE_4__/* .PresenceContext */ .t);
const make = () => makeState(config, props, context, presenceContext);
return isStatic ? make() : (0,_utils_use_constant_mjs__WEBPACK_IMPORTED_MODULE_6__/* .useConstant */ .M)(make);
};
function makeLatestValues(props, context, presenceContext, scrapeMotionValues) {
const values = {};
const motionValues = scrapeMotionValues(props, {});
for (const key in motionValues) {
values[key] = (0,_value_utils_resolve_motion_value_mjs__WEBPACK_IMPORTED_MODULE_7__/* .resolveMotionValue */ .u)(motionValues[key]);
}
let {
initial,
animate
} = props;
const isControllingVariants$1 = (0,_render_utils_is_controlling_variants_mjs__WEBPACK_IMPORTED_MODULE_9__/* .isControllingVariants */ .e)(props);
const isVariantNode$1 = (0,_render_utils_is_controlling_variants_mjs__WEBPACK_IMPORTED_MODULE_9__/* .isVariantNode */ .O)(props);
if (context && isVariantNode$1 && !isControllingVariants$1 && props.inherit !== false) {
if (initial === undefined) initial = context.initial;
if (animate === undefined) animate = context.animate;
}
let isInitialAnimationBlocked = presenceContext ? presenceContext.initial === false : false;
isInitialAnimationBlocked = isInitialAnimationBlocked || initial === false;
const variantToSet = isInitialAnimationBlocked ? animate : initial;
if (variantToSet && typeof variantToSet !== "boolean" && !(0,_animation_utils_is_animation_controls_mjs__WEBPACK_IMPORTED_MODULE_3__/* .isAnimationControls */ .N)(variantToSet)) {
const list = Array.isArray(variantToSet) ? variantToSet : [variantToSet];
list.forEach(definition => {
const resolved = (0,_render_utils_resolve_variants_mjs__WEBPACK_IMPORTED_MODULE_5__/* .resolveVariantFromProps */ .a)(props, definition);
if (!resolved) return;
const {
transitionEnd,
transition,
...target
} = resolved;
for (const key in target) {
let valueTarget = target[key];
if (Array.isArray(valueTarget)) {
/**
* Take final keyframe if the initial animation is blocked because
* we want to initialise at the end of that blocked animation.
*/
const index = isInitialAnimationBlocked ? valueTarget.length - 1 : 0;
valueTarget = valueTarget[index];
}
if (valueTarget !== null) {
values[key] = valueTarget;
}
}
for (const key in transitionEnd) values[key] = transitionEnd[key];
});
}
return values;
}
/***/ }),
/***/ 116954:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ S: () => (/* binding */ isValidMotionProp)
/* harmony export */ });
/**
* A list of all valid MotionProps.
*
* @privateRemarks
* This doesn't throw if a `MotionProp` name is missing - it should.
*/
const validMotionProps = 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"]);
/**
* Check whether a prop name is a valid `MotionProp` key.
*
* @param key - Name of the property to check
* @returns `true` is key is a valid `MotionProp`.
*
* @public
*/
function isValidMotionProp(key) {
return key.startsWith("while") || key.startsWith("drag") && key !== "draggable" || key.startsWith("layout") || key.startsWith("onTap") || key.startsWith("onPan") || key.startsWith("onLayout") || validMotionProps.has(key);
}
/***/ }),
/***/ 715275:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ v: () => (/* binding */ mixValues)
/* harmony export */ });
/* harmony import */ var _easing_circ_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(791806);
/* harmony import */ var _utils_progress_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(799020);
/* harmony import */ var _utils_mix_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(26085);
/* harmony import */ var _utils_noop_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(78777);
/* harmony import */ var _value_types_numbers_units_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(234223);
const borders = ["TopLeft", "TopRight", "BottomLeft", "BottomRight"];
const numBorders = borders.length;
const asNumber = value => typeof value === "string" ? parseFloat(value) : value;
const isPx = value => typeof value === "number" || _value_types_numbers_units_mjs__WEBPACK_IMPORTED_MODULE_4__.px.test(value);
function mixValues(target, follow, lead, progress, shouldCrossfadeOpacity, isOnlyMember) {
if (shouldCrossfadeOpacity) {
target.opacity = (0,_utils_mix_mjs__WEBPACK_IMPORTED_MODULE_2__/* .mix */ .j)(0,
// TODO Reinstate this if only child
lead.opacity !== undefined ? lead.opacity : 1, easeCrossfadeIn(progress));
target.opacityExit = (0,_utils_mix_mjs__WEBPACK_IMPORTED_MODULE_2__/* .mix */ .j)(follow.opacity !== undefined ? follow.opacity : 1, 0, easeCrossfadeOut(progress));
} else if (isOnlyMember) {
target.opacity = (0,_utils_mix_mjs__WEBPACK_IMPORTED_MODULE_2__/* .mix */ .j)(follow.opacity !== undefined ? follow.opacity : 1, lead.opacity !== undefined ? lead.opacity : 1, progress);
}
/**
* Mix border radius
*/
for (let i = 0; i < numBorders; i++) {
const borderLabel = `border${borders[i]}Radius`;
let followRadius = getRadius(follow, borderLabel);
let leadRadius = getRadius(lead, borderLabel);
if (followRadius === undefined && leadRadius === undefined) continue;
followRadius || (followRadius = 0);
leadRadius || (leadRadius = 0);
const canMix = followRadius === 0 || leadRadius === 0 || isPx(followRadius) === isPx(leadRadius);
if (canMix) {
target[borderLabel] = Math.max((0,_utils_mix_mjs__WEBPACK_IMPORTED_MODULE_2__/* .mix */ .j)(asNumber(followRadius), asNumber(leadRadius), progress), 0);
if (_value_types_numbers_units_mjs__WEBPACK_IMPORTED_MODULE_4__/* .percent */ .KN.test(leadRadius) || _value_types_numbers_units_mjs__WEBPACK_IMPORTED_MODULE_4__/* .percent */ .KN.test(followRadius)) {
target[borderLabel] += "%";
}
} else {
target[borderLabel] = leadRadius;
}
}
/**
* Mix rotation
*/
if (follow.rotate || lead.rotate) {
target.rotate = (0,_utils_mix_mjs__WEBPACK_IMPORTED_MODULE_2__/* .mix */ .j)(follow.rotate || 0, lead.rotate || 0, progress);
}
}
function getRadius(values, radiusName) {
return values[radiusName] !== undefined ? values[radiusName] : values.borderRadius;
}
// /**
// * We only want to mix the background color if there's a follow element
// * that we're not crossfading opacity between. For instance with switch
// * AnimateSharedLayout animations, this helps the illusion of a continuous
// * element being animated but also cuts down on the number of paints triggered
// * for elements where opacity is doing that work for us.
// */
// if (
// !hasFollowElement &&
// latestLeadValues.backgroundColor &&
// latestFollowValues.backgroundColor
// ) {
// /**
// * This isn't ideal performance-wise as mixColor is creating a new function every frame.
// * We could probably create a mixer that runs at the start of the animation but
// * the idea behind the crossfader is that it runs dynamically between two potentially
// * changing targets (ie opacity or borderRadius may be animating independently via variants)
// */
// leadState.backgroundColor = followState.backgroundColor = mixColor(
// latestFollowValues.backgroundColor as string,
// latestLeadValues.backgroundColor as string
// )(p)
// }
const easeCrossfadeIn = compress(0, 0.5, _easing_circ_mjs__WEBPACK_IMPORTED_MODULE_0__/* .circOut */ .yT);
const easeCrossfadeOut = compress(0.5, 0.95, _utils_noop_mjs__WEBPACK_IMPORTED_MODULE_3__/* .noop */ .l);
function compress(min, max, easing) {
return p => {
// Could replace ifs with clamp
if (p < min) return 0;
if (p > max) return 1;
return easing((0,_utils_progress_mjs__WEBPACK_IMPORTED_MODULE_1__/* .progress */ .q)(min, max, p));
};
}
/***/ }),
/***/ 912158:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ FY: () => (/* binding */ convertBoundingBoxToBox),
/* harmony export */ bS: () => (/* binding */ transformBoxPoints),
/* harmony export */ pA: () => (/* binding */ convertBoxToBoundingBox)
/* harmony export */ });
/**
* Bounding boxes tend to be defined as top, left, right, bottom. For various operations
* it's easier to consider each axis individually. This function returns a bounding box
* as a map of single-axis min/max values.
*/
function convertBoundingBoxToBox({
top,
left,
right,
bottom
}) {
return {
x: {
min: left,
max: right
},
y: {
min: top,
max: bottom
}
};
}
function convertBoxToBoundingBox({
x,
y
}) {
return {
top: y.min,
right: x.max,
bottom: y.max,
left: x.min
};
}
/**
* Applies a TransformPoint function to a bounding box. TransformPoint is usually a function
* provided by Framer to allow measured points to be corrected for device scaling. This is used
* when measuring DOM elements and DOM event points.
*/
function transformBoxPoints(point, transformPoint) {
if (!transformPoint) return point;
const topLeft = transformPoint({
x: point.left,
y: point.top
});
const bottomRight = transformPoint({
x: point.right,
y: point.bottom
});
return {
top: topLeft.y,
left: topLeft.x,
bottom: bottomRight.y,
right: bottomRight.x
};
}
/***/ }),
/***/ 812385:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ H: () => (/* binding */ copyBoxInto)
/* harmony export */ });
/* unused harmony export copyAxisInto */
/**
* Reset an axis to the provided origin box.
*
* This is a mutative operation.
*/
function copyAxisInto(axis, originAxis) {
axis.min = originAxis.min;
axis.max = originAxis.max;
}
/**
* Reset a box to the provided origin box.
*
* This is a mutative operation.
*/
function copyBoxInto(box, originBox) {
copyAxisInto(box.x, originBox.x);
copyAxisInto(box.y, originBox.y);
}
/***/ }),
/***/ 370155:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ OU: () => (/* binding */ applyTreeDeltas),
/* harmony export */ Ql: () => (/* binding */ translateAxis),
/* harmony export */ Ww: () => (/* binding */ transformBox),
/* harmony export */ hq: () => (/* binding */ scalePoint),
/* harmony export */ o4: () => (/* binding */ applyBoxDelta)
/* harmony export */ });
/* unused harmony exports applyAxisDelta, applyPointDelta, transformAxis */
/* harmony import */ var _utils_mix_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(26085);
/* harmony import */ var _utils_has_transform_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(251088);
/**
* Scales a point based on a factor and an originPoint
*/
function scalePoint(point, scale, originPoint) {
const distanceFromOrigin = point - originPoint;
const scaled = scale * distanceFromOrigin;
return originPoint + scaled;
}
/**
* Applies a translate/scale delta to a point
*/
function applyPointDelta(point, translate, scale, originPoint, boxScale) {
if (boxScale !== undefined) {
point = scalePoint(point, boxScale, originPoint);
}
return scalePoint(point, scale, originPoint) + translate;
}
/**
* Applies a translate/scale delta to an axis
*/
function applyAxisDelta(axis, translate = 0, scale = 1, originPoint, boxScale) {
axis.min = applyPointDelta(axis.min, translate, scale, originPoint, boxScale);
axis.max = applyPointDelta(axis.max, translate, scale, originPoint, boxScale);
}
/**
* Applies a translate/scale delta to a box
*/
function applyBoxDelta(box, {
x,
y
}) {
applyAxisDelta(box.x, x.translate, x.scale, x.originPoint);
applyAxisDelta(box.y, y.translate, y.scale, y.originPoint);
}
/**
* Apply a tree of deltas to a box. We do this to calculate the effect of all the transforms
* in a tree upon our box before then calculating how to project it into our desired viewport-relative box
*
* This is the final nested loop within updateLayoutDelta for future refactoring
*/
function applyTreeDeltas(box, treeScale, treePath, isSharedTransition = false) {
const treeLength = treePath.length;
if (!treeLength) return;
// Reset the treeScale
treeScale.x = treeScale.y = 1;
let node;
let delta;
for (let i = 0; i < treeLength; i++) {
node = treePath[i];
delta = node.projectionDelta;
/**
* TODO: Prefer to remove this, but currently we have motion components with
* display: contents in Framer.
*/
const instance = node.instance;
if (instance && instance.style && instance.style.display === "contents") {
continue;
}
if (isSharedTransition && node.options.layoutScroll && node.scroll && node !== node.root) {
transformBox(box, {
x: -node.scroll.offset.x,
y: -node.scroll.offset.y
});
}
if (delta) {
// Incoporate each ancestor's scale into a culmulative treeScale for this component
treeScale.x *= delta.x.scale;
treeScale.y *= delta.y.scale;
// Apply each ancestor's calculated delta into this component's recorded layout box
applyBoxDelta(box, delta);
}
if (isSharedTransition && (0,_utils_has_transform_mjs__WEBPACK_IMPORTED_MODULE_1__/* .hasTransform */ .HD)(node.latestValues)) {
transformBox(box, node.latestValues);
}
}
/**
* Snap tree scale back to 1 if it's within a non-perceivable threshold.
* This will help reduce useless scales getting rendered.
*/
treeScale.x = snapToDefault(treeScale.x);
treeScale.y = snapToDefault(treeScale.y);
}
function snapToDefault(scale) {
if (Number.isInteger(scale)) return scale;
return scale > 1.0000000000001 || scale < 0.999999999999 ? scale : 1;
}
function translateAxis(axis, distance) {
axis.min = axis.min + distance;
axis.max = axis.max + distance;
}
/**
* Apply a transform to an axis from the latest resolved motion values.
* This function basically acts as a bridge between a flat motion value map
* and applyAxisDelta
*/
function transformAxis(axis, transforms, [key, scaleKey, originKey]) {
const axisOrigin = transforms[originKey] !== undefined ? transforms[originKey] : 0.5;
const originPoint = (0,_utils_mix_mjs__WEBPACK_IMPORTED_MODULE_0__/* .mix */ .j)(axis.min, axis.max, axisOrigin);
// Apply the axis delta to the final axis
applyAxisDelta(axis, transforms[key], transforms[scaleKey], originPoint, transforms.scale);
}
/**
* The names of the motion values we want to apply as translation, scale and origin.
*/
const xKeys = ["x", "scaleX", "originX"];
const yKeys = ["y", "scaleY", "originY"];
/**
* Apply a transform to a box from the latest resolved motion values.
*/
function transformBox(box, transform) {
transformAxis(box.x, transform, xKeys);
transformAxis(box.y, transform, yKeys);
}
/***/ }),
/***/ 775886:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ CQ: () => (/* binding */ calcLength),
/* harmony export */ HQ: () => (/* binding */ isNear),
/* harmony export */ N: () => (/* binding */ calcRelativeBox),
/* harmony export */ jA: () => (/* binding */ calcRelativePosition),
/* harmony export */ vb: () => (/* binding */ calcBoxDelta)
/* harmony export */ });
/* unused harmony exports calcAxisDelta, calcRelativeAxis, calcRelativeAxisPosition */
/* harmony import */ var _utils_mix_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(26085);
function calcLength(axis) {
return axis.max - axis.min;
}
function isNear(value, target = 0, maxDistance = 0.01) {
return Math.abs(value - target) <= maxDistance;
}
function calcAxisDelta(delta, source, target, origin = 0.5) {
delta.origin = origin;
delta.originPoint = (0,_utils_mix_mjs__WEBPACK_IMPORTED_MODULE_0__/* .mix */ .j)(source.min, source.max, delta.origin);
delta.scale = calcLength(target) / calcLength(source);
if (isNear(delta.scale, 1, 0.0001) || isNaN(delta.scale)) delta.scale = 1;
delta.translate = (0,_utils_mix_mjs__WEBPACK_IMPORTED_MODULE_0__/* .mix */ .j)(target.min, target.max, delta.origin) - delta.originPoint;
if (isNear(delta.translate) || isNaN(delta.translate)) delta.translate = 0;
}
function calcBoxDelta(delta, source, target, origin) {
calcAxisDelta(delta.x, source.x, target.x, origin ? origin.originX : undefined);
calcAxisDelta(delta.y, source.y, target.y, origin ? origin.originY : undefined);
}
function calcRelativeAxis(target, relative, parent) {
target.min = parent.min + relative.min;
target.max = target.min + calcLength(relative);
}
function calcRelativeBox(target, relative, parent) {
calcRelativeAxis(target.x, relative.x, parent.x);
calcRelativeAxis(target.y, relative.y, parent.y);
}
function calcRelativeAxisPosition(target, layout, parent) {
target.min = layout.min - parent.min;
target.max = target.min + calcLength(layout);
}
function calcRelativePosition(target, layout, parent) {
calcRelativeAxisPosition(target.x, layout.x, parent.x);
calcRelativeAxisPosition(target.y, layout.y, parent.y);
}
/***/ }),
/***/ 486781:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ px: () => (/* binding */ removeBoxTransforms)
/* harmony export */ });
/* unused harmony exports removeAxisDelta, removeAxisTransforms, removePointDelta */
/* harmony import */ var _utils_mix_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(26085);
/* harmony import */ var _value_types_numbers_units_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(234223);
/* harmony import */ var _delta_apply_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(370155);
/**
* Remove a delta from a point. This is essentially the steps of applyPointDelta in reverse
*/
function removePointDelta(point, translate, scale, originPoint, boxScale) {
point -= translate;
point = (0,_delta_apply_mjs__WEBPACK_IMPORTED_MODULE_2__/* .scalePoint */ .hq)(point, 1 / scale, originPoint);
if (boxScale !== undefined) {
point = (0,_delta_apply_mjs__WEBPACK_IMPORTED_MODULE_2__/* .scalePoint */ .hq)(point, 1 / boxScale, originPoint);
}
return point;
}
/**
* Remove a delta from an axis. This is essentially the steps of applyAxisDelta in reverse
*/
function removeAxisDelta(axis, translate = 0, scale = 1, origin = 0.5, boxScale, originAxis = axis, sourceAxis = axis) {
if (_value_types_numbers_units_mjs__WEBPACK_IMPORTED_MODULE_1__/* .percent */ .KN.test(translate)) {
translate = parseFloat(translate);
const relativeProgress = (0,_utils_mix_mjs__WEBPACK_IMPORTED_MODULE_0__/* .mix */ .j)(sourceAxis.min, sourceAxis.max, translate / 100);
translate = relativeProgress - sourceAxis.min;
}
if (typeof translate !== "number") return;
let originPoint = (0,_utils_mix_mjs__WEBPACK_IMPORTED_MODULE_0__/* .mix */ .j)(originAxis.min, originAxis.max, origin);
if (axis === originAxis) originPoint -= translate;
axis.min = removePointDelta(axis.min, translate, scale, originPoint, boxScale);
axis.max = removePointDelta(axis.max, translate, scale, originPoint, boxScale);
}
/**
* Remove a transforms from an axis. This is essentially the steps of applyAxisTransforms in reverse
* and acts as a bridge between motion values and removeAxisDelta
*/
function removeAxisTransforms(axis, transforms, [key, scaleKey, originKey], origin, sourceAxis) {
removeAxisDelta(axis, transforms[key], transforms[scaleKey], transforms[originKey], transforms.scale, origin, sourceAxis);
}
/**
* The names of the motion values we want to apply as translation, scale and origin.
*/
const xKeys = ["x", "scaleX", "originX"];
const yKeys = ["y", "scaleY", "originY"];
/**
* Remove a transforms from an box. This is essentially the steps of applyAxisBox in reverse
* and acts as a bridge between motion values and removeAxisDelta
*/
function removeBoxTransforms(box, transforms, originBox, sourceBox) {
removeAxisTransforms(box.x, transforms, xKeys, originBox ? originBox.x : undefined, sourceBox ? sourceBox.x : undefined);
removeAxisTransforms(box.y, transforms, yKeys, originBox ? originBox.y : undefined, sourceBox ? sourceBox.y : undefined);
}
/***/ }),
/***/ 298944:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ ge: () => (/* binding */ createBox),
/* harmony export */ xU: () => (/* binding */ createDelta)
/* harmony export */ });
/* unused harmony exports createAxis, createAxisDelta */
const createAxisDelta = () => ({
translate: 0,
scale: 1,
origin: 0,
originPoint: 0
});
const createDelta = () => ({
x: createAxisDelta(),
y: createAxisDelta()
});
const createAxis = () => ({
min: 0,
max: 0
});
const createBox = () => ({
x: createAxis(),
y: createAxis()
});
/***/ }),
/***/ 53489:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ XY: () => (/* binding */ isDeltaZero),
/* harmony export */ cH: () => (/* binding */ aspectRatio),
/* harmony export */ mG: () => (/* binding */ boxEqualsRounded),
/* harmony export */ zo: () => (/* binding */ boxEquals)
/* harmony export */ });
/* harmony import */ var _delta_calc_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(775886);
function isAxisDeltaZero(delta) {
return delta.translate === 0 && delta.scale === 1;
}
function isDeltaZero(delta) {
return isAxisDeltaZero(delta.x) && isAxisDeltaZero(delta.y);
}
function boxEquals(a, b) {
return a.x.min === b.x.min && a.x.max === b.x.max && a.y.min === b.y.min && a.y.max === b.y.max;
}
function boxEqualsRounded(a, b) {
return Math.round(a.x.min) === Math.round(b.x.min) && Math.round(a.x.max) === Math.round(b.x.max) && Math.round(a.y.min) === Math.round(b.y.min) && Math.round(a.y.max) === Math.round(b.y.max);
}
function aspectRatio(box) {
return (0,_delta_calc_mjs__WEBPACK_IMPORTED_MODULE_0__/* .calcLength */ .CQ)(box.x) / (0,_delta_calc_mjs__WEBPACK_IMPORTED_MODULE_0__/* .calcLength */ .CQ)(box.y);
}
/***/ }),
/***/ 322326:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ B: () => (/* binding */ DocumentProjectionNode)
/* harmony export */ });
/* harmony import */ var _create_projection_node_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(103701);
/* harmony import */ var _events_add_dom_event_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(527076);
const DocumentProjectionNode = (0,_create_projection_node_mjs__WEBPACK_IMPORTED_MODULE_0__/* .createProjectionNode */ .u0)({
attachResizeListener: (ref, notify) => (0,_events_add_dom_event_mjs__WEBPACK_IMPORTED_MODULE_1__/* .addDomEvent */ .k)(ref, "resize", notify),
measureScroll: () => ({
x: document.documentElement.scrollLeft || document.body.scrollLeft,
y: document.documentElement.scrollTop || document.body.scrollTop
}),
checkIsScrollRoot: () => true
});
/***/ }),
/***/ 157986:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ P: () => (/* binding */ HTMLProjectionNode)
/* harmony export */ });
/* unused harmony export rootProjectionNode */
/* harmony import */ var _create_projection_node_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(103701);
/* harmony import */ var _DocumentProjectionNode_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(322326);
const rootProjectionNode = {
current: undefined
};
const HTMLProjectionNode = (0,_create_projection_node_mjs__WEBPACK_IMPORTED_MODULE_0__/* .createProjectionNode */ .u0)({
measureScroll: instance => ({
x: instance.scrollLeft,
y: instance.scrollTop
}),
defaultParent: () => {
if (!rootProjectionNode.current) {
const documentNode = new _DocumentProjectionNode_mjs__WEBPACK_IMPORTED_MODULE_1__/* .DocumentProjectionNode */ .B({});
documentNode.mount(window);
documentNode.setOptions({
layoutScroll: true
});
rootProjectionNode.current = documentNode;
}
return rootProjectionNode.current;
},
resetTransform: (instance, value) => {
instance.style.transform = value !== undefined ? value : "none";
},
checkIsScrollRoot: instance => Boolean(window.getComputedStyle(instance).position === "fixed")
});
/***/ }),
/***/ 103701:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ u0: () => (/* binding */ createProjectionNode)
/* harmony export */ });
/* unused harmony exports cleanDirtyNodes, mixAxis, mixAxisDelta, mixBox, propagateDirtyNodes */
/* harmony import */ var core_js_modules_es_array_includes_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(76281);
/* harmony import */ var core_js_modules_esnext_iterator_constructor_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(314846);
/* harmony import */ var core_js_modules_esnext_iterator_for_each_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(469655);
/* harmony import */ var core_js_modules_esnext_iterator_some_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(275568);
/* harmony import */ var _utils_subscription_manager_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(902840);
/* harmony import */ var _animation_mix_values_mjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(715275);
/* harmony import */ var _geometry_copy_mjs__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(812385);
/* harmony import */ var _geometry_delta_apply_mjs__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(370155);
/* harmony import */ var _geometry_delta_calc_mjs__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(775886);
/* harmony import */ var _geometry_delta_remove_mjs__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(486781);
/* harmony import */ var _geometry_models_mjs__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(298944);
/* harmony import */ var _animation_utils_transitions_mjs__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(955104);
/* harmony import */ var _geometry_utils_mjs__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(53489);
/* harmony import */ var _shared_stack_mjs__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(999433);
/* harmony import */ var _styles_scale_correction_mjs__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(602267);
/* harmony import */ var _styles_transform_mjs__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(387464);
/* harmony import */ var _utils_each_axis_mjs__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(687464);
/* harmony import */ var _utils_has_transform_mjs__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(251088);
/* harmony import */ var _render_utils_flat_tree_mjs__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(389462);
/* harmony import */ var _value_utils_resolve_motion_value_mjs__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(736196);
/* harmony import */ var _state_mjs__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(65281);
/* harmony import */ var _utils_delay_mjs__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(616246);
/* harmony import */ var _utils_mix_mjs__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(26085);
/* harmony import */ var _debug_record_mjs__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(780160);
/* harmony import */ var _render_dom_utils_is_svg_element_mjs__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(244089);
/* harmony import */ var _animation_interfaces_single_value_mjs__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(641041);
/* harmony import */ var _utils_clamp_mjs__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(893138);
/* harmony import */ var _frameloop_frame_mjs__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(277210);
/* harmony import */ var _utils_noop_mjs__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(78777);
const transformAxes = ["", "X", "Y", "Z"];
const hiddenVisibility = {
visibility: "hidden"
};
/**
* We use 1000 as the animation target as 0-1000 maps better to pixels than 0-1
* which has a noticeable difference in spring animations
*/
const animationTarget = 1000;
let id = 0;
/**
* Use a mutable data object for debug data so as to not create a new
* object every frame.
*/
const projectionFrameData = {
type: "projectionFrame",
totalNodes: 0,
resolvedTargetDeltas: 0,
recalculatedProjection: 0
};
function createProjectionNode({
attachResizeListener,
defaultParent,
measureScroll,
checkIsScrollRoot,
resetTransform
}) {
return class ProjectionNode {
constructor(latestValues = {}, parent = defaultParent === null || defaultParent === void 0 ? void 0 : defaultParent()) {
/**
* A unique ID generated for every projection node.
*/
this.id = id++;
/**
* An id that represents a unique session instigated by startUpdate.
*/
this.animationId = 0;
/**
* A Set containing all this component's children. This is used to iterate
* through the children.
*
* TODO: This could be faster to iterate as a flat array stored on the root node.
*/
this.children = new Set();
/**
* Options for the node. We use this to configure what kind of layout animations
* we should perform (if any).
*/
this.options = {};
/**
* We use this to detect when its safe to shut down part of a projection tree.
* We have to keep projecting children for scale correction and relative projection
* until all their parents stop performing layout animations.
*/
this.isTreeAnimating = false;
this.isAnimationBlocked = false;
/**
* Flag to true if we think this layout has been changed. We can't always know this,
* currently we set it to true every time a component renders, or if it has a layoutDependency
* if that has changed between renders. Additionally, components can be grouped by LayoutGroup
* and if one node is dirtied, they all are.
*/
this.isLayoutDirty = false;
/**
* Flag to true if we think the projection calculations for this node needs
* recalculating as a result of an updated transform or layout animation.
*/
this.isProjectionDirty = false;
/**
* Flag to true if the layout *or* transform has changed. This then gets propagated
* throughout the projection tree, forcing any element below to recalculate on the next frame.
*/
this.isSharedProjectionDirty = false;
/**
* Flag transform dirty. This gets propagated throughout the whole tree but is only
* respected by shared nodes.
*/
this.isTransformDirty = false;
/**
* Block layout updates for instant layout transitions throughout the tree.
*/
this.updateManuallyBlocked = false;
this.updateBlockedByResize = false;
/**
* Set to true between the start of the first `willUpdate` call and the end of the `didUpdate`
* call.
*/
this.isUpdating = false;
/**
* If this is an SVG element we currently disable projection transforms
*/
this.isSVG = false;
/**
* Flag to true (during promotion) if a node doing an instant layout transition needs to reset
* its projection styles.
*/
this.needsReset = false;
/**
* Flags whether this node should have its transform reset prior to measuring.
*/
this.shouldResetTransform = false;
/**
* An object representing the calculated contextual/accumulated/tree scale.
* This will be used to scale calculcated projection transforms, as these are
* calculated in screen-space but need to be scaled for elements to layoutly
* make it to their calculated destinations.
*
* TODO: Lazy-init
*/
this.treeScale = {
x: 1,
y: 1
};
/**
*
*/
this.eventHandlers = new Map();
this.hasTreeAnimated = false;
// Note: Currently only running on root node
this.updateScheduled = false;
this.projectionUpdateScheduled = false;
this.checkUpdateFailed = () => {
if (this.isUpdating) {
this.isUpdating = false;
this.clearAllSnapshots();
}
};
/**
* This is a multi-step process as shared nodes might be of different depths. Nodes
* are sorted by depth order, so we need to resolve the entire tree before moving to
* the next step.
*/
this.updateProjection = () => {
this.projectionUpdateScheduled = false;
/**
* Reset debug counts. Manually resetting rather than creating a new
* object each frame.
*/
projectionFrameData.totalNodes = projectionFrameData.resolvedTargetDeltas = projectionFrameData.recalculatedProjection = 0;
this.nodes.forEach(propagateDirtyNodes);
this.nodes.forEach(resolveTargetDelta);
this.nodes.forEach(calcProjection);
this.nodes.forEach(cleanDirtyNodes);
(0,_debug_record_mjs__WEBPACK_IMPORTED_MODULE_23__/* .record */ .g)(projectionFrameData);
};
this.hasProjected = false;
this.isVisible = true;
this.animationProgress = 0;
/**
* Shared layout
*/
// TODO Only running on root node
this.sharedNodes = new Map();
this.latestValues = latestValues;
this.root = parent ? parent.root || parent : this;
this.path = parent ? [...parent.path, parent] : [];
this.parent = parent;
this.depth = parent ? parent.depth + 1 : 0;
for (let i = 0; i < this.path.length; i++) {
this.path[i].shouldResetTransform = true;
}
if (this.root === this) this.nodes = new _render_utils_flat_tree_mjs__WEBPACK_IMPORTED_MODULE_18__/* .FlatTree */ .Y();
}
addEventListener(name, handler) {
if (!this.eventHandlers.has(name)) {
this.eventHandlers.set(name, new _utils_subscription_manager_mjs__WEBPACK_IMPORTED_MODULE_4__/* .SubscriptionManager */ .v());
}
return this.eventHandlers.get(name).add(handler);
}
notifyListeners(name, ...args) {
const subscriptionManager = this.eventHandlers.get(name);
subscriptionManager && subscriptionManager.notify(...args);
}
hasListeners(name) {
return this.eventHandlers.has(name);
}
/**
* Lifecycles
*/
mount(instance, isLayoutDirty = this.root.hasTreeAnimated) {
if (this.instance) return;
this.isSVG = (0,_render_dom_utils_is_svg_element_mjs__WEBPACK_IMPORTED_MODULE_24__/* .isSVGElement */ .x)(instance);
this.instance = instance;
const {
layoutId,
layout,
visualElement
} = this.options;
if (visualElement && !visualElement.current) {
visualElement.mount(instance);
}
this.root.nodes.add(this);
this.parent && this.parent.children.add(this);
if (isLayoutDirty && (layout || layoutId)) {
this.isLayoutDirty = true;
}
if (attachResizeListener) {
let cancelDelay;
const resizeUnblockUpdate = () => this.root.updateBlockedByResize = false;
attachResizeListener(instance, () => {
this.root.updateBlockedByResize = true;
cancelDelay && cancelDelay();
cancelDelay = (0,_utils_delay_mjs__WEBPACK_IMPORTED_MODULE_21__/* .delay */ .c)(resizeUnblockUpdate, 250);
if (_state_mjs__WEBPACK_IMPORTED_MODULE_20__/* .globalProjectionState */ .w.hasAnimatedSinceResize) {
_state_mjs__WEBPACK_IMPORTED_MODULE_20__/* .globalProjectionState */ .w.hasAnimatedSinceResize = false;
this.nodes.forEach(finishAnimation);
}
});
}
if (layoutId) {
this.root.registerSharedNode(layoutId, this);
}
// Only register the handler if it requires layout animation
if (this.options.animate !== false && visualElement && (layoutId || layout)) {
this.addEventListener("didUpdate", ({
delta,
hasLayoutChanged,
hasRelativeTargetChanged,
layout: newLayout
}) => {
if (this.isTreeAnimationBlocked()) {
this.target = undefined;
this.relativeTarget = undefined;
return;
}
// TODO: Check here if an animation exists
const layoutTransition = this.options.transition || visualElement.getDefaultTransition() || defaultLayoutTransition;
const {
onLayoutAnimationStart,
onLayoutAnimationComplete
} = visualElement.getProps();
/**
* The target layout of the element might stay the same,
* but its position relative to its parent has changed.
*/
const targetChanged = !this.targetLayout || !(0,_geometry_utils_mjs__WEBPACK_IMPORTED_MODULE_12__/* .boxEqualsRounded */ .mG)(this.targetLayout, newLayout) || hasRelativeTargetChanged;
/**
* If the layout hasn't seemed to have changed, it might be that the
* element is visually in the same place in the document but its position
* relative to its parent has indeed changed. So here we check for that.
*/
const hasOnlyRelativeTargetChanged = !hasLayoutChanged && hasRelativeTargetChanged;
if (this.options.layoutRoot || this.resumeFrom && this.resumeFrom.instance || hasOnlyRelativeTargetChanged || hasLayoutChanged && (targetChanged || !this.currentAnimation)) {
if (this.resumeFrom) {
this.resumingFrom = this.resumeFrom;
this.resumingFrom.resumingFrom = undefined;
}
this.setAnimationOrigin(delta, hasOnlyRelativeTargetChanged);
const animationOptions = {
...(0,_animation_utils_transitions_mjs__WEBPACK_IMPORTED_MODULE_11__/* .getValueTransition */ .r)(layoutTransition, "layout"),
onPlay: onLayoutAnimationStart,
onComplete: onLayoutAnimationComplete
};
if (visualElement.shouldReduceMotion || this.options.layoutRoot) {
animationOptions.delay = 0;
animationOptions.type = false;
}
this.startAnimation(animationOptions);
} else {
/**
* If the layout hasn't changed and we have an animation that hasn't started yet,
* finish it immediately. Otherwise it will be animating from a location
* that was probably never commited to screen and look like a jumpy box.
*/
if (!hasLayoutChanged) {
finishAnimation(this);
}
if (this.isLead() && this.options.onExitComplete) {
this.options.onExitComplete();
}
}
this.targetLayout = newLayout;
});
}
}
unmount() {
this.options.layoutId && this.willUpdate();
this.root.nodes.remove(this);
const stack = this.getStack();
stack && stack.remove(this);
this.parent && this.parent.children.delete(this);
this.instance = undefined;
(0,_frameloop_frame_mjs__WEBPACK_IMPORTED_MODULE_27__/* .cancelFrame */ .WG)(this.updateProjection);
}
// only on the root
blockUpdate() {
this.updateManuallyBlocked = true;
}
unblockUpdate() {
this.updateManuallyBlocked = false;
}
isUpdateBlocked() {
return this.updateManuallyBlocked || this.updateBlockedByResize;
}
isTreeAnimationBlocked() {
return this.isAnimationBlocked || this.parent && this.parent.isTreeAnimationBlocked() || false;
}
// Note: currently only running on root node
startUpdate() {
if (this.isUpdateBlocked()) return;
this.isUpdating = true;
this.nodes && this.nodes.forEach(resetRotation);
this.animationId++;
}
getTransformTemplate() {
const {
visualElement
} = this.options;
return visualElement && visualElement.getProps().transformTemplate;
}
willUpdate(shouldNotifyListeners = true) {
this.root.hasTreeAnimated = true;
if (this.root.isUpdateBlocked()) {
this.options.onExitComplete && this.options.onExitComplete();
return;
}
!this.root.isUpdating && this.root.startUpdate();
if (this.isLayoutDirty) return;
this.isLayoutDirty = true;
for (let i = 0; i < this.path.length; i++) {
const node = this.path[i];
node.shouldResetTransform = true;
node.updateScroll("snapshot");
if (node.options.layoutRoot) {
node.willUpdate(false);
}
}
const {
layoutId,
layout
} = this.options;
if (layoutId === undefined && !layout) return;
const transformTemplate = this.getTransformTemplate();
this.prevTransformTemplateValue = transformTemplate ? transformTemplate(this.latestValues, "") : undefined;
this.updateSnapshot();
shouldNotifyListeners && this.notifyListeners("willUpdate");
}
update() {
this.updateScheduled = false;
const updateWasBlocked = this.isUpdateBlocked();
// When doing an instant transition, we skip the layout update,
// but should still clean up the measurements so that the next
// snapshot could be taken correctly.
if (updateWasBlocked) {
this.unblockUpdate();
this.clearAllSnapshots();
this.nodes.forEach(clearMeasurements);
return;
}
if (!this.isUpdating) {
this.nodes.forEach(clearIsLayoutDirty);
}
this.isUpdating = false;
/**
* Write
*/
this.nodes.forEach(resetTransformStyle);
/**
* Read ==================
*/
// Update layout measurements of updated children
this.nodes.forEach(updateLayout);
/**
* Write
*/
// Notify listeners that the layout is updated
this.nodes.forEach(notifyLayoutUpdate);
this.clearAllSnapshots();
/**
* Manually flush any pending updates. Ideally
* we could leave this to the following requestAnimationFrame but this seems
* to leave a flash of incorrectly styled content.
*/
const now = performance.now();
_frameloop_frame_mjs__WEBPACK_IMPORTED_MODULE_27__/* .frameData */ .uv.delta = (0,_utils_clamp_mjs__WEBPACK_IMPORTED_MODULE_26__/* .clamp */ .q)(0, 1000 / 60, now - _frameloop_frame_mjs__WEBPACK_IMPORTED_MODULE_27__/* .frameData */ .uv.timestamp);
_frameloop_frame_mjs__WEBPACK_IMPORTED_MODULE_27__/* .frameData */ .uv.timestamp = now;
_frameloop_frame_mjs__WEBPACK_IMPORTED_MODULE_27__/* .frameData */ .uv.isProcessing = true;
_frameloop_frame_mjs__WEBPACK_IMPORTED_MODULE_27__/* .steps */ .Ci.update.process(_frameloop_frame_mjs__WEBPACK_IMPORTED_MODULE_27__/* .frameData */ .uv);
_frameloop_frame_mjs__WEBPACK_IMPORTED_MODULE_27__/* .steps */ .Ci.preRender.process(_frameloop_frame_mjs__WEBPACK_IMPORTED_MODULE_27__/* .frameData */ .uv);
_frameloop_frame_mjs__WEBPACK_IMPORTED_MODULE_27__/* .steps */ .Ci.render.process(_frameloop_frame_mjs__WEBPACK_IMPORTED_MODULE_27__/* .frameData */ .uv);
_frameloop_frame_mjs__WEBPACK_IMPORTED_MODULE_27__/* .frameData */ .uv.isProcessing = false;
}
didUpdate() {
if (!this.updateScheduled) {
this.updateScheduled = true;
queueMicrotask(() => this.update());
}
}
clearAllSnapshots() {
this.nodes.forEach(clearSnapshot);
this.sharedNodes.forEach(removeLeadSnapshots);
}
scheduleUpdateProjection() {
if (!this.projectionUpdateScheduled) {
this.projectionUpdateScheduled = true;
_frameloop_frame_mjs__WEBPACK_IMPORTED_MODULE_27__/* .frame */ .Gt.preRender(this.updateProjection, false, true);
}
}
scheduleCheckAfterUnmount() {
/**
* If the unmounting node is in a layoutGroup and did trigger a willUpdate,
* we manually call didUpdate to give a chance to the siblings to animate.
* Otherwise, cleanup all snapshots to prevents future nodes from reusing them.
*/
_frameloop_frame_mjs__WEBPACK_IMPORTED_MODULE_27__/* .frame */ .Gt.postRender(() => {
if (this.isLayoutDirty) {
this.root.didUpdate();
} else {
this.root.checkUpdateFailed();
}
});
}
/**
* Update measurements
*/
updateSnapshot() {
if (this.snapshot || !this.instance) return;
this.snapshot = this.measure();
}
updateLayout() {
if (!this.instance) return;
// TODO: Incorporate into a forwarded scroll offset
this.updateScroll();
if (!(this.options.alwaysMeasureLayout && this.isLead()) && !this.isLayoutDirty) {
return;
}
/**
* When a node is mounted, it simply resumes from the prevLead's
* snapshot instead of taking a new one, but the ancestors scroll
* might have updated while the prevLead is unmounted. We need to
* update the scroll again to make sure the layout we measure is
* up to date.
*/
if (this.resumeFrom && !this.resumeFrom.instance) {
for (let i = 0; i < this.path.length; i++) {
const node = this.path[i];
node.updateScroll();
}
}
const prevLayout = this.layout;
this.layout = this.measure(false);
this.layoutCorrected = (0,_geometry_models_mjs__WEBPACK_IMPORTED_MODULE_10__/* .createBox */ .ge)();
this.isLayoutDirty = false;
this.projectionDelta = undefined;
this.notifyListeners("measure", this.layout.layoutBox);
const {
visualElement
} = this.options;
visualElement && visualElement.notify("LayoutMeasure", this.layout.layoutBox, prevLayout ? prevLayout.layoutBox : undefined);
}
updateScroll(phase = "measure") {
let needsMeasurement = Boolean(this.options.layoutScroll && this.instance);
if (this.scroll && this.scroll.animationId === this.root.animationId && this.scroll.phase === phase) {
needsMeasurement = false;
}
if (needsMeasurement) {
this.scroll = {
animationId: this.root.animationId,
phase,
isRoot: checkIsScrollRoot(this.instance),
offset: measureScroll(this.instance)
};
}
}
resetTransform() {
if (!resetTransform) return;
const isResetRequested = this.isLayoutDirty || this.shouldResetTransform;
const hasProjection = this.projectionDelta && !(0,_geometry_utils_mjs__WEBPACK_IMPORTED_MODULE_12__/* .isDeltaZero */ .XY)(this.projectionDelta);
const transformTemplate = this.getTransformTemplate();
const transformTemplateValue = transformTemplate ? transformTemplate(this.latestValues, "") : undefined;
const transformTemplateHasChanged = transformTemplateValue !== this.prevTransformTemplateValue;
if (isResetRequested && (hasProjection || (0,_utils_has_transform_mjs__WEBPACK_IMPORTED_MODULE_17__/* .hasTransform */ .HD)(this.latestValues) || transformTemplateHasChanged)) {
resetTransform(this.instance, transformTemplateValue);
this.shouldResetTransform = false;
this.scheduleRender();
}
}
measure(removeTransform = true) {
const pageBox = this.measurePageBox();
let layoutBox = this.removeElementScroll(pageBox);
/**
* Measurements taken during the pre-render stage
* still have transforms applied so we remove them
* via calculation.
*/
if (removeTransform) {
layoutBox = this.removeTransform(layoutBox);
}
roundBox(layoutBox);
return {
animationId: this.root.animationId,
measuredBox: pageBox,
layoutBox,
latestValues: {},
source: this.id
};
}
measurePageBox() {
const {
visualElement
} = this.options;
if (!visualElement) return (0,_geometry_models_mjs__WEBPACK_IMPORTED_MODULE_10__/* .createBox */ .ge)();
const box = visualElement.measureViewportBox();
// Remove viewport scroll to give page-relative coordinates
const {
scroll
} = this.root;
if (scroll) {
(0,_geometry_delta_apply_mjs__WEBPACK_IMPORTED_MODULE_7__/* .translateAxis */ .Ql)(box.x, scroll.offset.x);
(0,_geometry_delta_apply_mjs__WEBPACK_IMPORTED_MODULE_7__/* .translateAxis */ .Ql)(box.y, scroll.offset.y);
}
return box;
}
removeElementScroll(box) {
const boxWithoutScroll = (0,_geometry_models_mjs__WEBPACK_IMPORTED_MODULE_10__/* .createBox */ .ge)();
(0,_geometry_copy_mjs__WEBPACK_IMPORTED_MODULE_6__/* .copyBoxInto */ .H)(boxWithoutScroll, box);
/**
* Performance TODO: Keep a cumulative scroll offset down the tree
* rather than loop back up the path.
*/
for (let i = 0; i < this.path.length; i++) {
const node = this.path[i];
const {
scroll,
options
} = node;
if (node !== this.root && scroll && options.layoutScroll) {
/**
* If this is a new scroll root, we want to remove all previous scrolls
* from the viewport box.
*/
if (scroll.isRoot) {
(0,_geometry_copy_mjs__WEBPACK_IMPORTED_MODULE_6__/* .copyBoxInto */ .H)(boxWithoutScroll, box);
const {
scroll: rootScroll
} = this.root;
/**
* Undo the application of page scroll that was originally added
* to the measured bounding box.
*/
if (rootScroll) {
(0,_geometry_delta_apply_mjs__WEBPACK_IMPORTED_MODULE_7__/* .translateAxis */ .Ql)(boxWithoutScroll.x, -rootScroll.offset.x);
(0,_geometry_delta_apply_mjs__WEBPACK_IMPORTED_MODULE_7__/* .translateAxis */ .Ql)(boxWithoutScroll.y, -rootScroll.offset.y);
}
}
(0,_geometry_delta_apply_mjs__WEBPACK_IMPORTED_MODULE_7__/* .translateAxis */ .Ql)(boxWithoutScroll.x, scroll.offset.x);
(0,_geometry_delta_apply_mjs__WEBPACK_IMPORTED_MODULE_7__/* .translateAxis */ .Ql)(boxWithoutScroll.y, scroll.offset.y);
}
}
return boxWithoutScroll;
}
applyTransform(box, transformOnly = false) {
const withTransforms = (0,_geometry_models_mjs__WEBPACK_IMPORTED_MODULE_10__/* .createBox */ .ge)();
(0,_geometry_copy_mjs__WEBPACK_IMPORTED_MODULE_6__/* .copyBoxInto */ .H)(withTransforms, box);
for (let i = 0; i < this.path.length; i++) {
const node = this.path[i];
if (!transformOnly && node.options.layoutScroll && node.scroll && node !== node.root) {
(0,_geometry_delta_apply_mjs__WEBPACK_IMPORTED_MODULE_7__/* .transformBox */ .Ww)(withTransforms, {
x: -node.scroll.offset.x,
y: -node.scroll.offset.y
});
}
if (!(0,_utils_has_transform_mjs__WEBPACK_IMPORTED_MODULE_17__/* .hasTransform */ .HD)(node.latestValues)) continue;
(0,_geometry_delta_apply_mjs__WEBPACK_IMPORTED_MODULE_7__/* .transformBox */ .Ww)(withTransforms, node.latestValues);
}
if ((0,_utils_has_transform_mjs__WEBPACK_IMPORTED_MODULE_17__/* .hasTransform */ .HD)(this.latestValues)) {
(0,_geometry_delta_apply_mjs__WEBPACK_IMPORTED_MODULE_7__/* .transformBox */ .Ww)(withTransforms, this.latestValues);
}
return withTransforms;
}
removeTransform(box) {
const boxWithoutTransform = (0,_geometry_models_mjs__WEBPACK_IMPORTED_MODULE_10__/* .createBox */ .ge)();
(0,_geometry_copy_mjs__WEBPACK_IMPORTED_MODULE_6__/* .copyBoxInto */ .H)(boxWithoutTransform, box);
for (let i = 0; i < this.path.length; i++) {
const node = this.path[i];
if (!node.instance) continue;
if (!(0,_utils_has_transform_mjs__WEBPACK_IMPORTED_MODULE_17__/* .hasTransform */ .HD)(node.latestValues)) continue;
(0,_utils_has_transform_mjs__WEBPACK_IMPORTED_MODULE_17__/* .hasScale */ .vk)(node.latestValues) && node.updateSnapshot();
const sourceBox = (0,_geometry_models_mjs__WEBPACK_IMPORTED_MODULE_10__/* .createBox */ .ge)();
const nodeBox = node.measurePageBox();
(0,_geometry_copy_mjs__WEBPACK_IMPORTED_MODULE_6__/* .copyBoxInto */ .H)(sourceBox, nodeBox);
(0,_geometry_delta_remove_mjs__WEBPACK_IMPORTED_MODULE_9__/* .removeBoxTransforms */ .px)(boxWithoutTransform, node.latestValues, node.snapshot ? node.snapshot.layoutBox : undefined, sourceBox);
}
if ((0,_utils_has_transform_mjs__WEBPACK_IMPORTED_MODULE_17__/* .hasTransform */ .HD)(this.latestValues)) {
(0,_geometry_delta_remove_mjs__WEBPACK_IMPORTED_MODULE_9__/* .removeBoxTransforms */ .px)(boxWithoutTransform, this.latestValues);
}
return boxWithoutTransform;
}
setTargetDelta(delta) {
this.targetDelta = delta;
this.root.scheduleUpdateProjection();
this.isProjectionDirty = true;
}
setOptions(options) {
this.options = {
...this.options,
...options,
crossfade: options.crossfade !== undefined ? options.crossfade : true
};
}
clearMeasurements() {
this.scroll = undefined;
this.layout = undefined;
this.snapshot = undefined;
this.prevTransformTemplateValue = undefined;
this.targetDelta = undefined;
this.target = undefined;
this.isLayoutDirty = false;
}
forceRelativeParentToResolveTarget() {
if (!this.relativeParent) return;
/**
* If the parent target isn't up-to-date, force it to update.
* This is an unfortunate de-optimisation as it means any updating relative
* projection will cause all the relative parents to recalculate back
* up the tree.
*/
if (this.relativeParent.resolvedRelativeTargetAt !== _frameloop_frame_mjs__WEBPACK_IMPORTED_MODULE_27__/* .frameData */ .uv.timestamp) {
this.relativeParent.resolveTargetDelta(true);
}
}
resolveTargetDelta(forceRecalculation = false) {
var _a;
/**
* Once the dirty status of nodes has been spread through the tree, we also
* need to check if we have a shared node of a different depth that has itself
* been dirtied.
*/
const lead = this.getLead();
this.isProjectionDirty || (this.isProjectionDirty = lead.isProjectionDirty);
this.isTransformDirty || (this.isTransformDirty = lead.isTransformDirty);
this.isSharedProjectionDirty || (this.isSharedProjectionDirty = lead.isSharedProjectionDirty);
const isShared = Boolean(this.resumingFrom) || this !== lead;
/**
* We don't use transform for this step of processing so we don't
* need to check whether any nodes have changed transform.
*/
const canSkip = !(forceRecalculation || isShared && this.isSharedProjectionDirty || this.isProjectionDirty || ((_a = this.parent) === null || _a === void 0 ? void 0 : _a.isProjectionDirty) || this.attemptToResolveRelativeTarget);
if (canSkip) return;
const {
layout,
layoutId
} = this.options;
/**
* If we have no layout, we can't perform projection, so early return
*/
if (!this.layout || !(layout || layoutId)) return;
this.resolvedRelativeTargetAt = _frameloop_frame_mjs__WEBPACK_IMPORTED_MODULE_27__/* .frameData */ .uv.timestamp;
/**
* If we don't have a targetDelta but do have a layout, we can attempt to resolve
* a relativeParent. This will allow a component to perform scale correction
* even if no animation has started.
*/
// TODO If this is unsuccessful this currently happens every frame
if (!this.targetDelta && !this.relativeTarget) {
// TODO: This is a semi-repetition of further down this function, make DRY
const relativeParent = this.getClosestProjectingParent();
if (relativeParent && relativeParent.layout && this.animationProgress !== 1) {
this.relativeParent = relativeParent;
this.forceRelativeParentToResolveTarget();
this.relativeTarget = (0,_geometry_models_mjs__WEBPACK_IMPORTED_MODULE_10__/* .createBox */ .ge)();
this.relativeTargetOrigin = (0,_geometry_models_mjs__WEBPACK_IMPORTED_MODULE_10__/* .createBox */ .ge)();
(0,_geometry_delta_calc_mjs__WEBPACK_IMPORTED_MODULE_8__/* .calcRelativePosition */ .jA)(this.relativeTargetOrigin, this.layout.layoutBox, relativeParent.layout.layoutBox);
(0,_geometry_copy_mjs__WEBPACK_IMPORTED_MODULE_6__/* .copyBoxInto */ .H)(this.relativeTarget, this.relativeTargetOrigin);
} else {
this.relativeParent = this.relativeTarget = undefined;
}
}
/**
* If we have no relative target or no target delta our target isn't valid
* for this frame.
*/
if (!this.relativeTarget && !this.targetDelta) return;
/**
* Lazy-init target data structure
*/
if (!this.target) {
this.target = (0,_geometry_models_mjs__WEBPACK_IMPORTED_MODULE_10__/* .createBox */ .ge)();
this.targetWithTransforms = (0,_geometry_models_mjs__WEBPACK_IMPORTED_MODULE_10__/* .createBox */ .ge)();
}
/**
* If we've got a relative box for this component, resolve it into a target relative to the parent.
*/
if (this.relativeTarget && this.relativeTargetOrigin && this.relativeParent && this.relativeParent.target) {
this.forceRelativeParentToResolveTarget();
(0,_geometry_delta_calc_mjs__WEBPACK_IMPORTED_MODULE_8__/* .calcRelativeBox */ .N)(this.target, this.relativeTarget, this.relativeParent.target);
/**
* If we've only got a targetDelta, resolve it into a target
*/
} else if (this.targetDelta) {
if (Boolean(this.resumingFrom)) {
// TODO: This is creating a new object every frame
this.target = this.applyTransform(this.layout.layoutBox);
} else {
(0,_geometry_copy_mjs__WEBPACK_IMPORTED_MODULE_6__/* .copyBoxInto */ .H)(this.target, this.layout.layoutBox);
}
(0,_geometry_delta_apply_mjs__WEBPACK_IMPORTED_MODULE_7__/* .applyBoxDelta */ .o4)(this.target, this.targetDelta);
} else {
/**
* If no target, use own layout as target
*/
(0,_geometry_copy_mjs__WEBPACK_IMPORTED_MODULE_6__/* .copyBoxInto */ .H)(this.target, this.layout.layoutBox);
}
/**
* If we've been told to attempt to resolve a relative target, do so.
*/
if (this.attemptToResolveRelativeTarget) {
this.attemptToResolveRelativeTarget = false;
const relativeParent = this.getClosestProjectingParent();
if (relativeParent && Boolean(relativeParent.resumingFrom) === Boolean(this.resumingFrom) && !relativeParent.options.layoutScroll && relativeParent.target && this.animationProgress !== 1) {
this.relativeParent = relativeParent;
this.forceRelativeParentToResolveTarget();
this.relativeTarget = (0,_geometry_models_mjs__WEBPACK_IMPORTED_MODULE_10__/* .createBox */ .ge)();
this.relativeTargetOrigin = (0,_geometry_models_mjs__WEBPACK_IMPORTED_MODULE_10__/* .createBox */ .ge)();
(0,_geometry_delta_calc_mjs__WEBPACK_IMPORTED_MODULE_8__/* .calcRelativePosition */ .jA)(this.relativeTargetOrigin, this.target, relativeParent.target);
(0,_geometry_copy_mjs__WEBPACK_IMPORTED_MODULE_6__/* .copyBoxInto */ .H)(this.relativeTarget, this.relativeTargetOrigin);
} else {
this.relativeParent = this.relativeTarget = undefined;
}
}
/**
* Increase debug counter for resolved target deltas
*/
projectionFrameData.resolvedTargetDeltas++;
}
getClosestProjectingParent() {
if (!this.parent || (0,_utils_has_transform_mjs__WEBPACK_IMPORTED_MODULE_17__/* .hasScale */ .vk)(this.parent.latestValues) || (0,_utils_has_transform_mjs__WEBPACK_IMPORTED_MODULE_17__/* .has2DTranslate */ .vF)(this.parent.latestValues)) {
return undefined;
}
if (this.parent.isProjecting()) {
return this.parent;
} else {
return this.parent.getClosestProjectingParent();
}
}
isProjecting() {
return Boolean((this.relativeTarget || this.targetDelta || this.options.layoutRoot) && this.layout);
}
calcProjection() {
var _a;
const lead = this.getLead();
const isShared = Boolean(this.resumingFrom) || this !== lead;
let canSkip = true;
/**
* If this is a normal layout animation and neither this node nor its nearest projecting
* is dirty then we can't skip.
*/
if (this.isProjectionDirty || ((_a = this.parent) === null || _a === void 0 ? void 0 : _a.isProjectionDirty)) {
canSkip = false;
}
/**
* If this is a shared layout animation and this node's shared projection is dirty then
* we can't skip.
*/
if (isShared && (this.isSharedProjectionDirty || this.isTransformDirty)) {
canSkip = false;
}
/**
* If we have resolved the target this frame we must recalculate the
* projection to ensure it visually represents the internal calculations.
*/
if (this.resolvedRelativeTargetAt === _frameloop_frame_mjs__WEBPACK_IMPORTED_MODULE_27__/* .frameData */ .uv.timestamp) {
canSkip = false;
}
if (canSkip) return;
const {
layout,
layoutId
} = this.options;
/**
* If this section of the tree isn't animating we can
* delete our target sources for the following frame.
*/
this.isTreeAnimating = Boolean(this.parent && this.parent.isTreeAnimating || this.currentAnimation || this.pendingAnimation);
if (!this.isTreeAnimating) {
this.targetDelta = this.relativeTarget = undefined;
}
if (!this.layout || !(layout || layoutId)) return;
/**
* Reset the corrected box with the latest values from box, as we're then going
* to perform mutative operations on it.
*/
(0,_geometry_copy_mjs__WEBPACK_IMPORTED_MODULE_6__/* .copyBoxInto */ .H)(this.layoutCorrected, this.layout.layoutBox);
/**
* Record previous tree scales before updating.
*/
const prevTreeScaleX = this.treeScale.x;
const prevTreeScaleY = this.treeScale.y;
/**
* Apply all the parent deltas to this box to produce the corrected box. This
* is the layout box, as it will appear on screen as a result of the transforms of its parents.
*/
(0,_geometry_delta_apply_mjs__WEBPACK_IMPORTED_MODULE_7__/* .applyTreeDeltas */ .OU)(this.layoutCorrected, this.treeScale, this.path, isShared);
/**
* If this layer needs to perform scale correction but doesn't have a target,
* use the layout as the target.
*/
if (lead.layout && !lead.target && (this.treeScale.x !== 1 || this.treeScale.y !== 1)) {
lead.target = lead.layout.layoutBox;
}
const {
target
} = lead;
if (!target) {
/**
* If we don't have a target to project into, but we were previously
* projecting, we want to remove the stored transform and schedule
* a render to ensure the elements reflect the removed transform.
*/
if (this.projectionTransform) {
this.projectionDelta = (0,_geometry_models_mjs__WEBPACK_IMPORTED_MODULE_10__/* .createDelta */ .xU)();
this.projectionTransform = "none";
this.scheduleRender();
}
return;
}
if (!this.projectionDelta) {
this.projectionDelta = (0,_geometry_models_mjs__WEBPACK_IMPORTED_MODULE_10__/* .createDelta */ .xU)();
this.projectionDeltaWithTransform = (0,_geometry_models_mjs__WEBPACK_IMPORTED_MODULE_10__/* .createDelta */ .xU)();
}
const prevProjectionTransform = this.projectionTransform;
/**
* Update the delta between the corrected box and the target box before user-set transforms were applied.
* This will allow us to calculate the corrected borderRadius and boxShadow to compensate
* for our layout reprojection, but still allow them to be scaled correctly by the user.
* It might be that to simplify this we may want to accept that user-set scale is also corrected
* and we wouldn't have to keep and calc both deltas, OR we could support a user setting
* to allow people to choose whether these styles are corrected based on just the
* layout reprojection or the final bounding box.
*/
(0,_geometry_delta_calc_mjs__WEBPACK_IMPORTED_MODULE_8__/* .calcBoxDelta */ .vb)(this.projectionDelta, this.layoutCorrected, target, this.latestValues);
this.projectionTransform = (0,_styles_transform_mjs__WEBPACK_IMPORTED_MODULE_15__/* .buildProjectionTransform */ .I)(this.projectionDelta, this.treeScale);
if (this.projectionTransform !== prevProjectionTransform || this.treeScale.x !== prevTreeScaleX || this.treeScale.y !== prevTreeScaleY) {
this.hasProjected = true;
this.scheduleRender();
this.notifyListeners("projectionUpdate", target);
}
/**
* Increase debug counter for recalculated projections
*/
projectionFrameData.recalculatedProjection++;
}
hide() {
this.isVisible = false;
// TODO: Schedule render
}
show() {
this.isVisible = true;
// TODO: Schedule render
}
scheduleRender(notifyAll = true) {
this.options.scheduleRender && this.options.scheduleRender();
if (notifyAll) {
const stack = this.getStack();
stack && stack.scheduleRender();
}
if (this.resumingFrom && !this.resumingFrom.instance) {
this.resumingFrom = undefined;
}
}
setAnimationOrigin(delta, hasOnlyRelativeTargetChanged = false) {
const snapshot = this.snapshot;
const snapshotLatestValues = snapshot ? snapshot.latestValues : {};
const mixedValues = {
...this.latestValues
};
const targetDelta = (0,_geometry_models_mjs__WEBPACK_IMPORTED_MODULE_10__/* .createDelta */ .xU)();
if (!this.relativeParent || !this.relativeParent.options.layoutRoot) {
this.relativeTarget = this.relativeTargetOrigin = undefined;
}
this.attemptToResolveRelativeTarget = !hasOnlyRelativeTargetChanged;
const relativeLayout = (0,_geometry_models_mjs__WEBPACK_IMPORTED_MODULE_10__/* .createBox */ .ge)();
const snapshotSource = snapshot ? snapshot.source : undefined;
const layoutSource = this.layout ? this.layout.source : undefined;
const isSharedLayoutAnimation = snapshotSource !== layoutSource;
const stack = this.getStack();
const isOnlyMember = !stack || stack.members.length <= 1;
const shouldCrossfadeOpacity = Boolean(isSharedLayoutAnimation && !isOnlyMember && this.options.crossfade === true && !this.path.some(hasOpacityCrossfade));
this.animationProgress = 0;
let prevRelativeTarget;
this.mixTargetDelta = latest => {
const progress = latest / 1000;
mixAxisDelta(targetDelta.x, delta.x, progress);
mixAxisDelta(targetDelta.y, delta.y, progress);
this.setTargetDelta(targetDelta);
if (this.relativeTarget && this.relativeTargetOrigin && this.layout && this.relativeParent && this.relativeParent.layout) {
(0,_geometry_delta_calc_mjs__WEBPACK_IMPORTED_MODULE_8__/* .calcRelativePosition */ .jA)(relativeLayout, this.layout.layoutBox, this.relativeParent.layout.layoutBox);
mixBox(this.relativeTarget, this.relativeTargetOrigin, relativeLayout, progress);
/**
* If this is an unchanged relative target we can consider the
* projection not dirty.
*/
if (prevRelativeTarget && (0,_geometry_utils_mjs__WEBPACK_IMPORTED_MODULE_12__/* .boxEquals */ .zo)(this.relativeTarget, prevRelativeTarget)) {
this.isProjectionDirty = false;
}
if (!prevRelativeTarget) prevRelativeTarget = (0,_geometry_models_mjs__WEBPACK_IMPORTED_MODULE_10__/* .createBox */ .ge)();
(0,_geometry_copy_mjs__WEBPACK_IMPORTED_MODULE_6__/* .copyBoxInto */ .H)(prevRelativeTarget, this.relativeTarget);
}
if (isSharedLayoutAnimation) {
this.animationValues = mixedValues;
(0,_animation_mix_values_mjs__WEBPACK_IMPORTED_MODULE_5__/* .mixValues */ .v)(mixedValues, snapshotLatestValues, this.latestValues, progress, shouldCrossfadeOpacity, isOnlyMember);
}
this.root.scheduleUpdateProjection();
this.scheduleRender();
this.animationProgress = progress;
};
this.mixTargetDelta(this.options.layoutRoot ? 1000 : 0);
}
startAnimation(options) {
this.notifyListeners("animationStart");
this.currentAnimation && this.currentAnimation.stop();
if (this.resumingFrom && this.resumingFrom.currentAnimation) {
this.resumingFrom.currentAnimation.stop();
}
if (this.pendingAnimation) {
(0,_frameloop_frame_mjs__WEBPACK_IMPORTED_MODULE_27__/* .cancelFrame */ .WG)(this.pendingAnimation);
this.pendingAnimation = undefined;
}
/**
* Start the animation in the next frame to have a frame with progress 0,
* where the target is the same as when the animation started, so we can
* calculate the relative positions correctly for instant transitions.
*/
this.pendingAnimation = _frameloop_frame_mjs__WEBPACK_IMPORTED_MODULE_27__/* .frame */ .Gt.update(() => {
_state_mjs__WEBPACK_IMPORTED_MODULE_20__/* .globalProjectionState */ .w.hasAnimatedSinceResize = true;
this.currentAnimation = (0,_animation_interfaces_single_value_mjs__WEBPACK_IMPORTED_MODULE_25__/* .animateSingleValue */ .z)(0, animationTarget, {
...options,
onUpdate: latest => {
this.mixTargetDelta(latest);
options.onUpdate && options.onUpdate(latest);
},
onComplete: () => {
options.onComplete && options.onComplete();
this.completeAnimation();
}
});
if (this.resumingFrom) {
this.resumingFrom.currentAnimation = this.currentAnimation;
}
this.pendingAnimation = undefined;
});
}
completeAnimation() {
if (this.resumingFrom) {
this.resumingFrom.currentAnimation = undefined;
this.resumingFrom.preserveOpacity = undefined;
}
const stack = this.getStack();
stack && stack.exitAnimationComplete();
this.resumingFrom = this.currentAnimation = this.animationValues = undefined;
this.notifyListeners("animationComplete");
}
finishAnimation() {
if (this.currentAnimation) {
this.mixTargetDelta && this.mixTargetDelta(animationTarget);
this.currentAnimation.stop();
}
this.completeAnimation();
}
applyTransformsToTarget() {
const lead = this.getLead();
let {
targetWithTransforms,
target,
layout,
latestValues
} = lead;
if (!targetWithTransforms || !target || !layout) return;
/**
* If we're only animating position, and this element isn't the lead element,
* then instead of projecting into the lead box we instead want to calculate
* a new target that aligns the two boxes but maintains the layout shape.
*/
if (this !== lead && this.layout && layout && shouldAnimatePositionOnly(this.options.animationType, this.layout.layoutBox, layout.layoutBox)) {
target = this.target || (0,_geometry_models_mjs__WEBPACK_IMPORTED_MODULE_10__/* .createBox */ .ge)();
const xLength = (0,_geometry_delta_calc_mjs__WEBPACK_IMPORTED_MODULE_8__/* .calcLength */ .CQ)(this.layout.layoutBox.x);
target.x.min = lead.target.x.min;
target.x.max = target.x.min + xLength;
const yLength = (0,_geometry_delta_calc_mjs__WEBPACK_IMPORTED_MODULE_8__/* .calcLength */ .CQ)(this.layout.layoutBox.y);
target.y.min = lead.target.y.min;
target.y.max = target.y.min + yLength;
}
(0,_geometry_copy_mjs__WEBPACK_IMPORTED_MODULE_6__/* .copyBoxInto */ .H)(targetWithTransforms, target);
/**
* Apply the latest user-set transforms to the targetBox to produce the targetBoxFinal.
* This is the final box that we will then project into by calculating a transform delta and
* applying it to the corrected box.
*/
(0,_geometry_delta_apply_mjs__WEBPACK_IMPORTED_MODULE_7__/* .transformBox */ .Ww)(targetWithTransforms, latestValues);
/**
* Update the delta between the corrected box and the final target box, after
* user-set transforms are applied to it. This will be used by the renderer to
* create a transform style that will reproject the element from its layout layout
* into the desired bounding box.
*/
(0,_geometry_delta_calc_mjs__WEBPACK_IMPORTED_MODULE_8__/* .calcBoxDelta */ .vb)(this.projectionDeltaWithTransform, this.layoutCorrected, targetWithTransforms, latestValues);
}
registerSharedNode(layoutId, node) {
if (!this.sharedNodes.has(layoutId)) {
this.sharedNodes.set(layoutId, new _shared_stack_mjs__WEBPACK_IMPORTED_MODULE_13__/* .NodeStack */ .P());
}
const stack = this.sharedNodes.get(layoutId);
stack.add(node);
const config = node.options.initialPromotionConfig;
node.promote({
transition: config ? config.transition : undefined,
preserveFollowOpacity: config && config.shouldPreserveFollowOpacity ? config.shouldPreserveFollowOpacity(node) : undefined
});
}
isLead() {
const stack = this.getStack();
return stack ? stack.lead === this : true;
}
getLead() {
var _a;
const {
layoutId
} = this.options;
return layoutId ? ((_a = this.getStack()) === null || _a === void 0 ? void 0 : _a.lead) || this : this;
}
getPrevLead() {
var _a;
const {
layoutId
} = this.options;
return layoutId ? (_a = this.getStack()) === null || _a === void 0 ? void 0 : _a.prevLead : undefined;
}
getStack() {
const {
layoutId
} = this.options;
if (layoutId) return this.root.sharedNodes.get(layoutId);
}
promote({
needsReset,
transition,
preserveFollowOpacity
} = {}) {
const stack = this.getStack();
if (stack) stack.promote(this, preserveFollowOpacity);
if (needsReset) {
this.projectionDelta = undefined;
this.needsReset = true;
}
if (transition) this.setOptions({
transition
});
}
relegate() {
const stack = this.getStack();
if (stack) {
return stack.relegate(this);
} else {
return false;
}
}
resetRotation() {
const {
visualElement
} = this.options;
if (!visualElement) return;
// If there's no detected rotation values, we can early return without a forced render.
let hasRotate = false;
/**
* An unrolled check for rotation values. Most elements don't have any rotation and
* skipping the nested loop and new object creation is 50% faster.
*/
const {
latestValues
} = visualElement;
if (latestValues.rotate || latestValues.rotateX || latestValues.rotateY || latestValues.rotateZ) {
hasRotate = true;
}
// If there's no rotation values, we don't need to do any more.
if (!hasRotate) return;
const resetValues = {};
// Check the rotate value of all axes and reset to 0
for (let i = 0; i < transformAxes.length; i++) {
const key = "rotate" + transformAxes[i];
// Record the rotation and then temporarily set it to 0
if (latestValues[key]) {
resetValues[key] = latestValues[key];
visualElement.setStaticValue(key, 0);
}
}
// Force a render of this element to apply the transform with all rotations
// set to 0.
visualElement.render();
// Put back all the values we reset
for (const key in resetValues) {
visualElement.setStaticValue(key, resetValues[key]);
}
// Schedule a render for the next frame. This ensures we won't visually
// see the element with the reset rotate value applied.
visualElement.scheduleRender();
}
getProjectionStyles(styleProp) {
var _a, _b;
if (!this.instance || this.isSVG) return undefined;
if (!this.isVisible) {
return hiddenVisibility;
}
const styles = {
visibility: ""
};
const transformTemplate = this.getTransformTemplate();
if (this.needsReset) {
this.needsReset = false;
styles.opacity = "";
styles.pointerEvents = (0,_value_utils_resolve_motion_value_mjs__WEBPACK_IMPORTED_MODULE_19__/* .resolveMotionValue */ .u)(styleProp === null || styleProp === void 0 ? void 0 : styleProp.pointerEvents) || "";
styles.transform = transformTemplate ? transformTemplate(this.latestValues, "") : "none";
return styles;
}
const lead = this.getLead();
if (!this.projectionDelta || !this.layout || !lead.target) {
const emptyStyles = {};
if (this.options.layoutId) {
emptyStyles.opacity = this.latestValues.opacity !== undefined ? this.latestValues.opacity : 1;
emptyStyles.pointerEvents = (0,_value_utils_resolve_motion_value_mjs__WEBPACK_IMPORTED_MODULE_19__/* .resolveMotionValue */ .u)(styleProp === null || styleProp === void 0 ? void 0 : styleProp.pointerEvents) || "";
}
if (this.hasProjected && !(0,_utils_has_transform_mjs__WEBPACK_IMPORTED_MODULE_17__/* .hasTransform */ .HD)(this.latestValues)) {
emptyStyles.transform = transformTemplate ? transformTemplate({}, "") : "none";
this.hasProjected = false;
}
return emptyStyles;
}
const valuesToRender = lead.animationValues || lead.latestValues;
this.applyTransformsToTarget();
styles.transform = (0,_styles_transform_mjs__WEBPACK_IMPORTED_MODULE_15__/* .buildProjectionTransform */ .I)(this.projectionDeltaWithTransform, this.treeScale, valuesToRender);
if (transformTemplate) {
styles.transform = transformTemplate(valuesToRender, styles.transform);
}
const {
x,
y
} = this.projectionDelta;
styles.transformOrigin = `${x.origin * 100}% ${y.origin * 100}% 0`;
if (lead.animationValues) {
/**
* If the lead component is animating, assign this either the entering/leaving
* opacity
*/
styles.opacity = lead === this ? (_b = (_a = valuesToRender.opacity) !== null && _a !== void 0 ? _a : this.latestValues.opacity) !== null && _b !== void 0 ? _b : 1 : this.preserveOpacity ? this.latestValues.opacity : valuesToRender.opacityExit;
} else {
/**
* Or we're not animating at all, set the lead component to its layout
* opacity and other components to hidden.
*/
styles.opacity = lead === this ? valuesToRender.opacity !== undefined ? valuesToRender.opacity : "" : valuesToRender.opacityExit !== undefined ? valuesToRender.opacityExit : 0;
}
/**
* Apply scale correction
*/
for (const key in _styles_scale_correction_mjs__WEBPACK_IMPORTED_MODULE_14__/* .scaleCorrectors */ .H) {
if (valuesToRender[key] === undefined) continue;
const {
correct,
applyTo
} = _styles_scale_correction_mjs__WEBPACK_IMPORTED_MODULE_14__/* .scaleCorrectors */ .H[key];
/**
* Only apply scale correction to the value if we have an
* active projection transform. Otherwise these values become
* vulnerable to distortion if the element changes size without
* a corresponding layout animation.
*/
const corrected = styles.transform === "none" ? valuesToRender[key] : correct(valuesToRender[key], lead);
if (applyTo) {
const num = applyTo.length;
for (let i = 0; i < num; i++) {
styles[applyTo[i]] = corrected;
}
} else {
styles[key] = corrected;
}
}
/**
* Disable pointer events on follow components. This is to ensure
* that if a follow component covers a lead component it doesn't block
* pointer events on the lead.
*/
if (this.options.layoutId) {
styles.pointerEvents = lead === this ? (0,_value_utils_resolve_motion_value_mjs__WEBPACK_IMPORTED_MODULE_19__/* .resolveMotionValue */ .u)(styleProp === null || styleProp === void 0 ? void 0 : styleProp.pointerEvents) || "" : "none";
}
return styles;
}
clearSnapshot() {
this.resumeFrom = this.snapshot = undefined;
}
// Only run on root
resetTree() {
this.root.nodes.forEach(node => {
var _a;
return (_a = node.currentAnimation) === null || _a === void 0 ? void 0 : _a.stop();
});
this.root.nodes.forEach(clearMeasurements);
this.root.sharedNodes.clear();
}
};
}
function updateLayout(node) {
node.updateLayout();
}
function notifyLayoutUpdate(node) {
var _a;
const snapshot = ((_a = node.resumeFrom) === null || _a === void 0 ? void 0 : _a.snapshot) || node.snapshot;
if (node.isLead() && node.layout && snapshot && node.hasListeners("didUpdate")) {
const {
layoutBox: layout,
measuredBox: measuredLayout
} = node.layout;
const {
animationType
} = node.options;
const isShared = snapshot.source !== node.layout.source;
// TODO Maybe we want to also resize the layout snapshot so we don't trigger
// animations for instance if layout="size" and an element has only changed position
if (animationType === "size") {
(0,_utils_each_axis_mjs__WEBPACK_IMPORTED_MODULE_16__/* .eachAxis */ .X)(axis => {
const axisSnapshot = isShared ? snapshot.measuredBox[axis] : snapshot.layoutBox[axis];
const length = (0,_geometry_delta_calc_mjs__WEBPACK_IMPORTED_MODULE_8__/* .calcLength */ .CQ)(axisSnapshot);
axisSnapshot.min = layout[axis].min;
axisSnapshot.max = axisSnapshot.min + length;
});
} else if (shouldAnimatePositionOnly(animationType, snapshot.layoutBox, layout)) {
(0,_utils_each_axis_mjs__WEBPACK_IMPORTED_MODULE_16__/* .eachAxis */ .X)(axis => {
const axisSnapshot = isShared ? snapshot.measuredBox[axis] : snapshot.layoutBox[axis];
const length = (0,_geometry_delta_calc_mjs__WEBPACK_IMPORTED_MODULE_8__/* .calcLength */ .CQ)(layout[axis]);
axisSnapshot.max = axisSnapshot.min + length;
/**
* Ensure relative target gets resized and rerendererd
*/
if (node.relativeTarget && !node.currentAnimation) {
node.isProjectionDirty = true;
node.relativeTarget[axis].max = node.relativeTarget[axis].min + length;
}
});
}
const layoutDelta = (0,_geometry_models_mjs__WEBPACK_IMPORTED_MODULE_10__/* .createDelta */ .xU)();
(0,_geometry_delta_calc_mjs__WEBPACK_IMPORTED_MODULE_8__/* .calcBoxDelta */ .vb)(layoutDelta, layout, snapshot.layoutBox);
const visualDelta = (0,_geometry_models_mjs__WEBPACK_IMPORTED_MODULE_10__/* .createDelta */ .xU)();
if (isShared) {
(0,_geometry_delta_calc_mjs__WEBPACK_IMPORTED_MODULE_8__/* .calcBoxDelta */ .vb)(visualDelta, node.applyTransform(measuredLayout, true), snapshot.measuredBox);
} else {
(0,_geometry_delta_calc_mjs__WEBPACK_IMPORTED_MODULE_8__/* .calcBoxDelta */ .vb)(visualDelta, layout, snapshot.layoutBox);
}
const hasLayoutChanged = !(0,_geometry_utils_mjs__WEBPACK_IMPORTED_MODULE_12__/* .isDeltaZero */ .XY)(layoutDelta);
let hasRelativeTargetChanged = false;
if (!node.resumeFrom) {
const relativeParent = node.getClosestProjectingParent();
/**
* If the relativeParent is itself resuming from a different element then
* the relative snapshot is not relavent
*/
if (relativeParent && !relativeParent.resumeFrom) {
const {
snapshot: parentSnapshot,
layout: parentLayout
} = relativeParent;
if (parentSnapshot && parentLayout) {
const relativeSnapshot = (0,_geometry_models_mjs__WEBPACK_IMPORTED_MODULE_10__/* .createBox */ .ge)();
(0,_geometry_delta_calc_mjs__WEBPACK_IMPORTED_MODULE_8__/* .calcRelativePosition */ .jA)(relativeSnapshot, snapshot.layoutBox, parentSnapshot.layoutBox);
const relativeLayout = (0,_geometry_models_mjs__WEBPACK_IMPORTED_MODULE_10__/* .createBox */ .ge)();
(0,_geometry_delta_calc_mjs__WEBPACK_IMPORTED_MODULE_8__/* .calcRelativePosition */ .jA)(relativeLayout, layout, parentLayout.layoutBox);
if (!(0,_geometry_utils_mjs__WEBPACK_IMPORTED_MODULE_12__/* .boxEqualsRounded */ .mG)(relativeSnapshot, relativeLayout)) {
hasRelativeTargetChanged = true;
}
if (relativeParent.options.layoutRoot) {
node.relativeTarget = relativeLayout;
node.relativeTargetOrigin = relativeSnapshot;
node.relativeParent = relativeParent;
}
}
}
}
node.notifyListeners("didUpdate", {
layout,
snapshot,
delta: visualDelta,
layoutDelta,
hasLayoutChanged,
hasRelativeTargetChanged
});
} else if (node.isLead()) {
const {
onExitComplete
} = node.options;
onExitComplete && onExitComplete();
}
/**
* Clearing transition
* TODO: Investigate why this transition is being passed in as {type: false } from Framer
* and why we need it at all
*/
node.options.transition = undefined;
}
function propagateDirtyNodes(node) {
/**
* Increase debug counter for nodes encountered this frame
*/
projectionFrameData.totalNodes++;
if (!node.parent) return;
/**
* If this node isn't projecting, propagate isProjectionDirty. It will have
* no performance impact but it will allow the next child that *is* projecting
* but *isn't* dirty to just check its parent to see if *any* ancestor needs
* correcting.
*/
if (!node.isProjecting()) {
node.isProjectionDirty = node.parent.isProjectionDirty;
}
/**
* Propagate isSharedProjectionDirty and isTransformDirty
* throughout the whole tree. A future revision can take another look at
* this but for safety we still recalcualte shared nodes.
*/
node.isSharedProjectionDirty || (node.isSharedProjectionDirty = Boolean(node.isProjectionDirty || node.parent.isProjectionDirty || node.parent.isSharedProjectionDirty));
node.isTransformDirty || (node.isTransformDirty = node.parent.isTransformDirty);
}
function cleanDirtyNodes(node) {
node.isProjectionDirty = node.isSharedProjectionDirty = node.isTransformDirty = false;
}
function clearSnapshot(node) {
node.clearSnapshot();
}
function clearMeasurements(node) {
node.clearMeasurements();
}
function clearIsLayoutDirty(node) {
node.isLayoutDirty = false;
}
function resetTransformStyle(node) {
const {
visualElement
} = node.options;
if (visualElement && visualElement.getProps().onBeforeLayoutMeasure) {
visualElement.notify("BeforeLayoutMeasure");
}
node.resetTransform();
}
function finishAnimation(node) {
node.finishAnimation();
node.targetDelta = node.relativeTarget = node.target = undefined;
node.isProjectionDirty = true;
}
function resolveTargetDelta(node) {
node.resolveTargetDelta();
}
function calcProjection(node) {
node.calcProjection();
}
function resetRotation(node) {
node.resetRotation();
}
function removeLeadSnapshots(stack) {
stack.removeLeadSnapshot();
}
function mixAxisDelta(output, delta, p) {
output.translate = (0,_utils_mix_mjs__WEBPACK_IMPORTED_MODULE_22__/* .mix */ .j)(delta.translate, 0, p);
output.scale = (0,_utils_mix_mjs__WEBPACK_IMPORTED_MODULE_22__/* .mix */ .j)(delta.scale, 1, p);
output.origin = delta.origin;
output.originPoint = delta.originPoint;
}
function mixAxis(output, from, to, p) {
output.min = (0,_utils_mix_mjs__WEBPACK_IMPORTED_MODULE_22__/* .mix */ .j)(from.min, to.min, p);
output.max = (0,_utils_mix_mjs__WEBPACK_IMPORTED_MODULE_22__/* .mix */ .j)(from.max, to.max, p);
}
function mixBox(output, from, to, p) {
mixAxis(output.x, from.x, to.x, p);
mixAxis(output.y, from.y, to.y, p);
}
function hasOpacityCrossfade(node) {
return node.animationValues && node.animationValues.opacityExit !== undefined;
}
const defaultLayoutTransition = {
duration: 0.45,
ease: [0.4, 0, 0.1, 1]
};
const userAgentContains = string => typeof navigator !== "undefined" && navigator.userAgent.toLowerCase().includes(string);
/**
* Measured bounding boxes must be rounded in Safari and
* left untouched in Chrome, otherwise non-integer layouts within scaled-up elements
* can appear to jump.
*/
const roundPoint = userAgentContains("applewebkit/") && !userAgentContains("chrome/") ? Math.round : _utils_noop_mjs__WEBPACK_IMPORTED_MODULE_28__/* .noop */ .l;
function roundAxis(axis) {
// Round to the nearest .5 pixels to support subpixel layouts
axis.min = roundPoint(axis.min);
axis.max = roundPoint(axis.max);
}
function roundBox(box) {
roundAxis(box.x);
roundAxis(box.y);
}
function shouldAnimatePositionOnly(animationType, snapshot, layout) {
return animationType === "position" || animationType === "preserve-aspect" && !(0,_geometry_delta_calc_mjs__WEBPACK_IMPORTED_MODULE_8__/* .isNear */ .HQ)((0,_geometry_utils_mjs__WEBPACK_IMPORTED_MODULE_12__/* .aspectRatio */ .cH)(snapshot), (0,_geometry_utils_mjs__WEBPACK_IMPORTED_MODULE_12__/* .aspectRatio */ .cH)(layout), 0.2);
}
/***/ }),
/***/ 186775:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* unused harmony export nodeGroup */
/* harmony import */ var core_js_modules_esnext_iterator_constructor_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(314846);
/* harmony import */ var core_js_modules_esnext_iterator_for_each_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(469655);
const notify = node => !node.isLayoutDirty && node.willUpdate(false);
function nodeGroup() {
const nodes = new Set();
const subscriptions = new WeakMap();
const dirtyAll = () => nodes.forEach(notify);
return {
add: node => {
nodes.add(node);
subscriptions.set(node, node.addEventListener("willUpdate", dirtyAll));
},
remove: node => {
nodes.delete(node);
const unsubscribe = subscriptions.get(node);
if (unsubscribe) {
unsubscribe();
subscriptions.delete(node);
}
dirtyAll();
},
dirty: dirtyAll
};
}
/***/ }),
/***/ 65281:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ w: () => (/* binding */ globalProjectionState)
/* harmony export */ });
/**
* This should only ever be modified on the client otherwise it'll
* persist through server requests. If we need instanced states we
* could lazy-init via root.
*/
const globalProjectionState = {
/**
* Global flag as to whether the tree has animated since the last time
* we resized the window
*/
hasAnimatedSinceResize: true,
/**
* We set this to true once, on the first update. Any nodes added to the tree beyond that
* update will be given a `data-projection-id` attribute.
*/
hasEverUpdated: false
};
/***/ }),
/***/ 999433:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ P: () => (/* binding */ NodeStack)
/* harmony export */ });
/* harmony import */ var core_js_modules_esnext_iterator_constructor_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(314846);
/* harmony import */ var core_js_modules_esnext_iterator_for_each_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(469655);
/* harmony import */ var _utils_array_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(890604);
class NodeStack {
constructor() {
this.members = [];
}
add(node) {
(0,_utils_array_mjs__WEBPACK_IMPORTED_MODULE_2__/* .addUniqueItem */ .Kq)(this.members, node);
node.scheduleRender();
}
remove(node) {
(0,_utils_array_mjs__WEBPACK_IMPORTED_MODULE_2__/* .removeItem */ .Ai)(this.members, node);
if (node === this.prevLead) {
this.prevLead = undefined;
}
if (node === this.lead) {
const prevLead = this.members[this.members.length - 1];
if (prevLead) {
this.promote(prevLead);
}
}
}
relegate(node) {
const indexOfNode = this.members.findIndex(member => node === member);
if (indexOfNode === 0) return false;
/**
* Find the next projection node that is present
*/
let prevLead;
for (let i = indexOfNode; i >= 0; i--) {
const member = this.members[i];
if (member.isPresent !== false) {
prevLead = member;
break;
}
}
if (prevLead) {
this.promote(prevLead);
return true;
} else {
return false;
}
}
promote(node, preserveFollowOpacity) {
const prevLead = this.lead;
if (node === prevLead) return;
this.prevLead = prevLead;
this.lead = node;
node.show();
if (prevLead) {
prevLead.instance && prevLead.scheduleRender();
node.scheduleRender();
node.resumeFrom = prevLead;
if (preserveFollowOpacity) {
node.resumeFrom.preserveOpacity = true;
}
if (prevLead.snapshot) {
node.snapshot = prevLead.snapshot;
node.snapshot.latestValues = prevLead.animationValues || prevLead.latestValues;
}
if (node.root && node.root.isUpdating) {
node.isLayoutDirty = true;
}
const {
crossfade
} = node.options;
if (crossfade === false) {
prevLead.hide();
}
/**
* TODO:
* - Test border radius when previous node was deleted
* - boxShadow mixing
* - Shared between element A in scrolled container and element B (scroll stays the same or changes)
* - Shared between element A in transformed container and element B (transform stays the same or changes)
* - Shared between element A in scrolled page and element B (scroll stays the same or changes)
* ---
* - Crossfade opacity of root nodes
* - layoutId changes after animation
* - layoutId changes mid animation
*/
}
}
exitAnimationComplete() {
this.members.forEach(node => {
const {
options,
resumingFrom
} = node;
options.onExitComplete && options.onExitComplete();
if (resumingFrom) {
resumingFrom.options.onExitComplete && resumingFrom.options.onExitComplete();
}
});
}
scheduleRender() {
this.members.forEach(node => {
node.instance && node.scheduleRender(false);
});
}
/**
* Clear any leads that have been removed this render to prevent them from being
* used in future animations and to prevent memory leaks
*/
removeLeadSnapshot() {
if (this.lead && this.lead.snapshot) {
this.lead.snapshot = undefined;
}
}
}
/***/ }),
/***/ 694608:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ P: () => (/* binding */ correctBorderRadius)
/* harmony export */ });
/* unused harmony export pixelsToPercent */
/* harmony import */ var _value_types_numbers_units_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(234223);
function pixelsToPercent(pixels, axis) {
if (axis.max === axis.min) return 0;
return pixels / (axis.max - axis.min) * 100;
}
/**
* We always correct borderRadius as a percentage rather than pixels to reduce paints.
* For example, if you are projecting a box that is 100px wide with a 10px borderRadius
* into a box that is 200px wide with a 20px borderRadius, that is actually a 10%
* borderRadius in both states. If we animate between the two in pixels that will trigger
* a paint each time. If we animate between the two in percentage we'll avoid a paint.
*/
const correctBorderRadius = {
correct: (latest, node) => {
if (!node.target) return latest;
/**
* If latest is a string, if it's a percentage we can return immediately as it's
* going to be stretched appropriately. Otherwise, if it's a pixel, convert it to a number.
*/
if (typeof latest === "string") {
if (_value_types_numbers_units_mjs__WEBPACK_IMPORTED_MODULE_0__.px.test(latest)) {
latest = parseFloat(latest);
} else {
return latest;
}
}
/**
* If latest is a number, it's a pixel value. We use the current viewportBox to calculate that
* pixel value as a percentage of each axis
*/
const x = pixelsToPercent(latest, node.target.x);
const y = pixelsToPercent(latest, node.target.y);
return `${x}% ${y}%`;
}
};
/***/ }),
/***/ 828667:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ _: () => (/* binding */ correctBoxShadow)
/* harmony export */ });
/* harmony import */ var _utils_mix_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(26085);
/* harmony import */ var _value_types_complex_index_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(73748);
const correctBoxShadow = {
correct: (latest, {
treeScale,
projectionDelta
}) => {
const original = latest;
const shadow = _value_types_complex_index_mjs__WEBPACK_IMPORTED_MODULE_1__/* .complex */ .f.parse(latest);
// TODO: Doesn't support multiple shadows
if (shadow.length > 5) return original;
const template = _value_types_complex_index_mjs__WEBPACK_IMPORTED_MODULE_1__/* .complex */ .f.createTransformer(latest);
const offset = typeof shadow[0] !== "number" ? 1 : 0;
// Calculate the overall context scale
const xScale = projectionDelta.x.scale * treeScale.x;
const yScale = projectionDelta.y.scale * treeScale.y;
shadow[0 + offset] /= xScale;
shadow[1 + offset] /= yScale;
/**
* Ideally we'd correct x and y scales individually, but because blur and
* spread apply to both we have to take a scale average and apply that instead.
* We could potentially improve the outcome of this by incorporating the ratio between
* the two scales.
*/
const averageScale = (0,_utils_mix_mjs__WEBPACK_IMPORTED_MODULE_0__/* .mix */ .j)(xScale, yScale, 0.5);
// Blur
if (typeof shadow[2 + offset] === "number") shadow[2 + offset] /= averageScale;
// Spread
if (typeof shadow[3 + offset] === "number") shadow[3 + offset] /= averageScale;
return template(shadow);
}
};
/***/ }),
/***/ 602267:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ $: () => (/* binding */ addScaleCorrector),
/* harmony export */ H: () => (/* binding */ scaleCorrectors)
/* harmony export */ });
const scaleCorrectors = {};
function addScaleCorrector(correctors) {
Object.assign(scaleCorrectors, correctors);
}
/***/ }),
/***/ 387464:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ I: () => (/* binding */ buildProjectionTransform)
/* harmony export */ });
function buildProjectionTransform(delta, treeScale, latestTransform) {
let transform = "";
/**
* The translations we use to calculate are always relative to the viewport coordinate space.
* But when we apply scales, we also scale the coordinate space of an element and its children.
* For instance if we have a treeScale (the culmination of all parent scales) of 0.5 and we need
* to move an element 100 pixels, we actually need to move it 200 in within that scaled space.
*/
const xTranslate = delta.x.translate / treeScale.x;
const yTranslate = delta.y.translate / treeScale.y;
if (xTranslate || yTranslate) {
transform = `translate3d(${xTranslate}px, ${yTranslate}px, 0) `;
}
/**
* Apply scale correction for the tree transform.
* This will apply scale to the screen-orientated axes.
*/
if (treeScale.x !== 1 || treeScale.y !== 1) {
transform += `scale(${1 / treeScale.x}, ${1 / treeScale.y}) `;
}
if (latestTransform) {
const {
rotate,
rotateX,
rotateY
} = latestTransform;
if (rotate) transform += `rotate(${rotate}deg) `;
if (rotateX) transform += `rotateX(${rotateX}deg) `;
if (rotateY) transform += `rotateY(${rotateY}deg) `;
}
/**
* Apply scale to match the size of the element to the size we want it.
* This will apply scale to the element-orientated axes.
*/
const elementScaleX = delta.x.scale * treeScale.x;
const elementScaleY = delta.y.scale * treeScale.y;
if (elementScaleX !== 1 || elementScaleY !== 1) {
transform += `scale(${elementScaleX}, ${elementScaleY})`;
}
return transform || "none";
}
/***/ }),
/***/ 557013:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* unused harmony export useInstantLayoutTransition */
/* harmony import */ var _node_HTMLProjectionNode_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(157986);
function useInstantLayoutTransition() {
return startTransition;
}
function startTransition(callback) {
if (!rootProjectionNode.current) return;
rootProjectionNode.current.isUpdating = false;
rootProjectionNode.current.blockUpdate();
callback && callback();
}
/***/ }),
/***/ 674060:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* unused harmony export useResetProjection */
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(63696);
/* harmony import */ var _node_HTMLProjectionNode_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(157986);
function useResetProjection() {
const reset = React.useCallback(() => {
const root = rootProjectionNode.current;
if (!root) return;
root.resetTree();
}, []);
return reset;
}
/***/ }),
/***/ 687464:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ X: () => (/* binding */ eachAxis)
/* harmony export */ });
function eachAxis(callback) {
return [callback("x"), callback("y")];
}
/***/ }),
/***/ 251088:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ HD: () => (/* binding */ hasTransform),
/* harmony export */ vF: () => (/* binding */ has2DTranslate),
/* harmony export */ vk: () => (/* binding */ hasScale)
/* harmony export */ });
function isIdentityScale(scale) {
return scale === undefined || scale === 1;
}
function hasScale({
scale,
scaleX,
scaleY
}) {
return !isIdentityScale(scale) || !isIdentityScale(scaleX) || !isIdentityScale(scaleY);
}
function hasTransform(values) {
return hasScale(values) || has2DTranslate(values) || values.z || values.rotate || values.rotateX || values.rotateY;
}
function has2DTranslate(values) {
return is2DTranslate(values.x) || is2DTranslate(values.y);
}
function is2DTranslate(value) {
return value && value !== "0%";
}
/***/ }),
/***/ 410347:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ L: () => (/* binding */ measurePageBox),
/* harmony export */ m: () => (/* binding */ measureViewportBox)
/* harmony export */ });
/* harmony import */ var _geometry_conversion_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(912158);
/* harmony import */ var _geometry_delta_apply_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(370155);
function measureViewportBox(instance, transformPoint) {
return (0,_geometry_conversion_mjs__WEBPACK_IMPORTED_MODULE_0__/* .convertBoundingBoxToBox */ .FY)((0,_geometry_conversion_mjs__WEBPACK_IMPORTED_MODULE_0__/* .transformBoxPoints */ .bS)(instance.getBoundingClientRect(), transformPoint));
}
function measurePageBox(element, rootProjectionNode, transformPagePoint) {
const viewportBox = measureViewportBox(element, transformPagePoint);
const {
scroll
} = rootProjectionNode;
if (scroll) {
(0,_geometry_delta_apply_mjs__WEBPACK_IMPORTED_MODULE_1__/* .translateAxis */ .Ql)(viewportBox.x, scroll.offset.x);
(0,_geometry_delta_apply_mjs__WEBPACK_IMPORTED_MODULE_1__/* .translateAxis */ .Ql)(viewportBox.y, scroll.offset.y);
}
return viewportBox;
}
/***/ }),
/***/ 373518:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ B: () => (/* binding */ VisualElement)
/* harmony export */ });
/* harmony import */ var core_js_modules_esnext_iterator_constructor_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(314846);
/* harmony import */ var core_js_modules_esnext_iterator_for_each_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(469655);
/* harmony import */ var _utils_errors_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(841164);
/* harmony import */ var _projection_geometry_models_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(298944);
/* harmony import */ var _utils_is_ref_object_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(105675);
/* harmony import */ var _utils_reduced_motion_index_mjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(989461);
/* harmony import */ var _utils_reduced_motion_state_mjs__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(27250);
/* harmony import */ var _utils_subscription_manager_mjs__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(902840);
/* harmony import */ var _value_index_mjs__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(239667);
/* harmony import */ var _value_use_will_change_is_mjs__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(146547);
/* harmony import */ var _value_utils_is_motion_value_mjs__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(573970);
/* harmony import */ var _html_utils_transform_mjs__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(353994);
/* harmony import */ var _utils_is_controlling_variants_mjs__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(884135);
/* harmony import */ var _utils_is_variant_label_mjs__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(563305);
/* harmony import */ var _utils_motion_values_mjs__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(931545);
/* harmony import */ var _utils_resolve_variants_mjs__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(775691);
/* harmony import */ var _utils_warn_once_mjs__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(721657);
/* harmony import */ var _motion_features_definitions_mjs__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(834430);
/* harmony import */ var _utils_variant_props_mjs__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(422918);
/* harmony import */ var _store_mjs__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(550529);
/* harmony import */ var _frameloop_frame_mjs__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(277210);
const featureNames = Object.keys(_motion_features_definitions_mjs__WEBPACK_IMPORTED_MODULE_17__/* .featureDefinitions */ .B);
const numFeatures = featureNames.length;
const propEventHandlers = ["AnimationStart", "AnimationComplete", "Update", "BeforeLayoutMeasure", "LayoutMeasure", "LayoutAnimationStart", "LayoutAnimationComplete"];
const numVariantProps = _utils_variant_props_mjs__WEBPACK_IMPORTED_MODULE_18__/* .variantProps */ ._.length;
/**
* A VisualElement is an imperative abstraction around UI elements such as
* HTMLElement, SVGElement, Three.Object3D etc.
*/
class VisualElement {
constructor({
parent,
props,
presenceContext,
reducedMotionConfig,
visualState
}, options = {}) {
/**
* A reference to the current underlying Instance, e.g. a HTMLElement
* or Three.Mesh etc.
*/
this.current = null;
/**
* A set containing references to this VisualElement's children.
*/
this.children = new Set();
/**
* Determine what role this visual element should take in the variant tree.
*/
this.isVariantNode = false;
this.isControllingVariants = false;
/**
* Decides whether this VisualElement should animate in reduced motion
* mode.
*
* TODO: This is currently set on every individual VisualElement but feels
* like it could be set globally.
*/
this.shouldReduceMotion = null;
/**
* A map of all motion values attached to this visual element. Motion
* values are source of truth for any given animated value. A motion
* value might be provided externally by the component via props.
*/
this.values = new Map();
/**
* Cleanup functions for active features (hover/tap/exit etc)
*/
this.features = {};
/**
* A map of every subscription that binds the provided or generated
* motion values onChange listeners to this visual element.
*/
this.valueSubscriptions = new Map();
/**
* A reference to the previously-provided motion values as returned
* from scrapeMotionValuesFromProps. We use the keys in here to determine
* if any motion values need to be removed after props are updated.
*/
this.prevMotionValues = {};
/**
* An object containing a SubscriptionManager for each active event.
*/
this.events = {};
/**
* An object containing an unsubscribe function for each prop event subscription.
* For example, every "Update" event can have multiple subscribers via
* VisualElement.on(), but only one of those can be defined via the onUpdate prop.
*/
this.propEventSubscriptions = {};
this.notifyUpdate = () => this.notify("Update", this.latestValues);
this.render = () => {
if (!this.current) return;
this.triggerBuild();
this.renderInstance(this.current, this.renderState, this.props.style, this.projection);
};
this.scheduleRender = () => _frameloop_frame_mjs__WEBPACK_IMPORTED_MODULE_20__/* .frame */ .Gt.render(this.render, false, true);
const {
latestValues,
renderState
} = visualState;
this.latestValues = latestValues;
this.baseTarget = {
...latestValues
};
this.initialValues = props.initial ? {
...latestValues
} : {};
this.renderState = renderState;
this.parent = parent;
this.props = props;
this.presenceContext = presenceContext;
this.depth = parent ? parent.depth + 1 : 0;
this.reducedMotionConfig = reducedMotionConfig;
this.options = options;
this.isControllingVariants = (0,_utils_is_controlling_variants_mjs__WEBPACK_IMPORTED_MODULE_12__/* .isControllingVariants */ .e)(props);
this.isVariantNode = (0,_utils_is_controlling_variants_mjs__WEBPACK_IMPORTED_MODULE_12__/* .isVariantNode */ .O)(props);
if (this.isVariantNode) {
this.variantChildren = new Set();
}
this.manuallyAnimateOnMount = Boolean(parent && parent.current);
/**
* Any motion values that are provided to the element when created
* aren't yet bound to the element, as this would technically be impure.
* However, we iterate through the motion values and set them to the
* initial values for this component.
*
* TODO: This is impure and we should look at changing this to run on mount.
* Doing so will break some tests but this isn't neccessarily a breaking change,
* more a reflection of the test.
*/
const {
willChange,
...initialMotionValues
} = this.scrapeMotionValuesFromProps(props, {});
for (const key in initialMotionValues) {
const value = initialMotionValues[key];
if (latestValues[key] !== undefined && (0,_value_utils_is_motion_value_mjs__WEBPACK_IMPORTED_MODULE_10__/* .isMotionValue */ .S)(value)) {
value.set(latestValues[key], false);
if ((0,_value_use_will_change_is_mjs__WEBPACK_IMPORTED_MODULE_9__/* .isWillChangeMotionValue */ .k)(willChange)) {
willChange.add(key);
}
}
}
}
/**
* This method takes React props and returns found MotionValues. For example, HTML
* MotionValues will be found within the style prop, whereas for Three.js within attribute arrays.
*
* This isn't an abstract method as it needs calling in the constructor, but it is
* intended to be one.
*/
scrapeMotionValuesFromProps(_props, _prevProps) {
return {};
}
mount(instance) {
this.current = instance;
_store_mjs__WEBPACK_IMPORTED_MODULE_19__/* .visualElementStore */ .C.set(instance, this);
if (this.projection && !this.projection.instance) {
this.projection.mount(instance);
}
if (this.parent && this.isVariantNode && !this.isControllingVariants) {
this.removeFromVariantTree = this.parent.addVariantChild(this);
}
this.values.forEach((value, key) => this.bindToMotionValue(key, value));
if (!_utils_reduced_motion_state_mjs__WEBPACK_IMPORTED_MODULE_6__/* .hasReducedMotionListener */ .r.current) {
(0,_utils_reduced_motion_index_mjs__WEBPACK_IMPORTED_MODULE_5__/* .initPrefersReducedMotion */ .U)();
}
this.shouldReduceMotion = this.reducedMotionConfig === "never" ? false : this.reducedMotionConfig === "always" ? true : _utils_reduced_motion_state_mjs__WEBPACK_IMPORTED_MODULE_6__/* .prefersReducedMotion */ .O.current;
if (false) {}
if (this.parent) this.parent.children.add(this);
this.update(this.props, this.presenceContext);
}
unmount() {
_store_mjs__WEBPACK_IMPORTED_MODULE_19__/* .visualElementStore */ .C.delete(this.current);
this.projection && this.projection.unmount();
(0,_frameloop_frame_mjs__WEBPACK_IMPORTED_MODULE_20__/* .cancelFrame */ .WG)(this.notifyUpdate);
(0,_frameloop_frame_mjs__WEBPACK_IMPORTED_MODULE_20__/* .cancelFrame */ .WG)(this.render);
this.valueSubscriptions.forEach(remove => remove());
this.removeFromVariantTree && this.removeFromVariantTree();
this.parent && this.parent.children.delete(this);
for (const key in this.events) {
this.events[key].clear();
}
for (const key in this.features) {
this.features[key].unmount();
}
this.current = null;
}
bindToMotionValue(key, value) {
const valueIsTransform = _html_utils_transform_mjs__WEBPACK_IMPORTED_MODULE_11__/* .transformProps */ .f.has(key);
const removeOnChange = value.on("change", latestValue => {
this.latestValues[key] = latestValue;
this.props.onUpdate && _frameloop_frame_mjs__WEBPACK_IMPORTED_MODULE_20__/* .frame */ .Gt.update(this.notifyUpdate, false, true);
if (valueIsTransform && this.projection) {
this.projection.isTransformDirty = true;
}
});
const removeOnRenderRequest = value.on("renderRequest", this.scheduleRender);
this.valueSubscriptions.set(key, () => {
removeOnChange();
removeOnRenderRequest();
});
}
sortNodePosition(other) {
/**
* If these nodes aren't even of the same type we can't compare their depth.
*/
if (!this.current || !this.sortInstanceNodePosition || this.type !== other.type) {
return 0;
}
return this.sortInstanceNodePosition(this.current, other.current);
}
loadFeatures({
children,
...renderedProps
}, isStrict, preloadedFeatures, initialLayoutGroupConfig) {
let ProjectionNodeConstructor;
let MeasureLayout;
/**
* If we're in development mode, check to make sure we're not rendering a motion component
* as a child of LazyMotion, as this will break the file-size benefits of using it.
*/
if (false) {}
for (let i = 0; i < numFeatures; i++) {
const name = featureNames[i];
const {
isEnabled,
Feature: FeatureConstructor,
ProjectionNode,
MeasureLayout: MeasureLayoutComponent
} = _motion_features_definitions_mjs__WEBPACK_IMPORTED_MODULE_17__/* .featureDefinitions */ .B[name];
if (ProjectionNode) ProjectionNodeConstructor = ProjectionNode;
if (isEnabled(renderedProps)) {
if (!this.features[name] && FeatureConstructor) {
this.features[name] = new FeatureConstructor(this);
}
if (MeasureLayoutComponent) {
MeasureLayout = MeasureLayoutComponent;
}
}
}
if ((this.type === "html" || this.type === "svg") && !this.projection && ProjectionNodeConstructor) {
this.projection = new ProjectionNodeConstructor(this.latestValues, this.parent && this.parent.projection);
const {
layoutId,
layout,
drag,
dragConstraints,
layoutScroll,
layoutRoot
} = renderedProps;
this.projection.setOptions({
layoutId,
layout,
alwaysMeasureLayout: Boolean(drag) || dragConstraints && (0,_utils_is_ref_object_mjs__WEBPACK_IMPORTED_MODULE_4__/* .isRefObject */ .X)(dragConstraints),
visualElement: this,
scheduleRender: () => this.scheduleRender(),
/**
* TODO: Update options in an effect. This could be tricky as it'll be too late
* to update by the time layout animations run.
* We also need to fix this safeToRemove by linking it up to the one returned by usePresence,
* ensuring it gets called if there's no potential layout animations.
*
*/
animationType: typeof layout === "string" ? layout : "both",
initialPromotionConfig: initialLayoutGroupConfig,
layoutScroll,
layoutRoot
});
}
return MeasureLayout;
}
updateFeatures() {
for (const key in this.features) {
const feature = this.features[key];
if (feature.isMounted) {
feature.update();
} else {
feature.mount();
feature.isMounted = true;
}
}
}
triggerBuild() {
this.build(this.renderState, this.latestValues, this.options, this.props);
}
/**
* Measure the current viewport box with or without transforms.
* Only measures axis-aligned boxes, rotate and skew must be manually
* removed with a re-render to work.
*/
measureViewportBox() {
return this.current ? this.measureInstanceViewportBox(this.current, this.props) : (0,_projection_geometry_models_mjs__WEBPACK_IMPORTED_MODULE_3__/* .createBox */ .ge)();
}
getStaticValue(key) {
return this.latestValues[key];
}
setStaticValue(key, value) {
this.latestValues[key] = value;
}
/**
* Make a target animatable by Popmotion. For instance, if we're
* trying to animate width from 100px to 100vw we need to measure 100vw
* in pixels to determine what we really need to animate to. This is also
* pluggable to support Framer's custom value types like Color,
* and CSS variables.
*/
makeTargetAnimatable(target, canMutate = true) {
return this.makeTargetAnimatableFromInstance(target, this.props, canMutate);
}
/**
* Update the provided props. Ensure any newly-added motion values are
* added to our map, old ones removed, and listeners updated.
*/
update(props, presenceContext) {
if (props.transformTemplate || this.props.transformTemplate) {
this.scheduleRender();
}
this.prevProps = this.props;
this.props = props;
this.prevPresenceContext = this.presenceContext;
this.presenceContext = presenceContext;
/**
* Update prop event handlers ie onAnimationStart, onAnimationComplete
*/
for (let i = 0; i < propEventHandlers.length; i++) {
const key = propEventHandlers[i];
if (this.propEventSubscriptions[key]) {
this.propEventSubscriptions[key]();
delete this.propEventSubscriptions[key];
}
const listener = props["on" + key];
if (listener) {
this.propEventSubscriptions[key] = this.on(key, listener);
}
}
this.prevMotionValues = (0,_utils_motion_values_mjs__WEBPACK_IMPORTED_MODULE_14__/* .updateMotionValuesFromProps */ .U)(this, this.scrapeMotionValuesFromProps(props, this.prevProps), this.prevMotionValues);
if (this.handleChildMotionValue) {
this.handleChildMotionValue();
}
}
getProps() {
return this.props;
}
/**
* Returns the variant definition with a given name.
*/
getVariant(name) {
return this.props.variants ? this.props.variants[name] : undefined;
}
/**
* Returns the defined default transition on this component.
*/
getDefaultTransition() {
return this.props.transition;
}
getTransformPagePoint() {
return this.props.transformPagePoint;
}
getClosestVariantNode() {
return this.isVariantNode ? this : this.parent ? this.parent.getClosestVariantNode() : undefined;
}
getVariantContext(startAtParent = false) {
if (startAtParent) {
return this.parent ? this.parent.getVariantContext() : undefined;
}
if (!this.isControllingVariants) {
const context = this.parent ? this.parent.getVariantContext() || {} : {};
if (this.props.initial !== undefined) {
context.initial = this.props.initial;
}
return context;
}
const context = {};
for (let i = 0; i < numVariantProps; i++) {
const name = _utils_variant_props_mjs__WEBPACK_IMPORTED_MODULE_18__/* .variantProps */ ._[i];
const prop = this.props[name];
if ((0,_utils_is_variant_label_mjs__WEBPACK_IMPORTED_MODULE_13__/* .isVariantLabel */ .w)(prop) || prop === false) {
context[name] = prop;
}
}
return context;
}
/**
* Add a child visual element to our set of children.
*/
addVariantChild(child) {
const closestVariantNode = this.getClosestVariantNode();
if (closestVariantNode) {
closestVariantNode.variantChildren && closestVariantNode.variantChildren.add(child);
return () => closestVariantNode.variantChildren.delete(child);
}
}
/**
* Add a motion value and bind it to this visual element.
*/
addValue(key, value) {
// Remove existing value if it exists
if (value !== this.values.get(key)) {
this.removeValue(key);
this.bindToMotionValue(key, value);
}
this.values.set(key, value);
this.latestValues[key] = value.get();
}
/**
* Remove a motion value and unbind any active subscriptions.
*/
removeValue(key) {
this.values.delete(key);
const unsubscribe = this.valueSubscriptions.get(key);
if (unsubscribe) {
unsubscribe();
this.valueSubscriptions.delete(key);
}
delete this.latestValues[key];
this.removeValueFromRenderState(key, this.renderState);
}
/**
* Check whether we have a motion value for this key
*/
hasValue(key) {
return this.values.has(key);
}
getValue(key, defaultValue) {
if (this.props.values && this.props.values[key]) {
return this.props.values[key];
}
let value = this.values.get(key);
if (value === undefined && defaultValue !== undefined) {
value = (0,_value_index_mjs__WEBPACK_IMPORTED_MODULE_8__/* .motionValue */ .OQ)(defaultValue, {
owner: this
});
this.addValue(key, value);
}
return value;
}
/**
* If we're trying to animate to a previously unencountered value,
* we need to check for it in our state and as a last resort read it
* directly from the instance (which might have performance implications).
*/
readValue(key) {
var _a;
return this.latestValues[key] !== undefined || !this.current ? this.latestValues[key] : (_a = this.getBaseTargetFromProps(this.props, key)) !== null && _a !== void 0 ? _a : this.readValueFromInstance(this.current, key, this.options);
}
/**
* Set the base target to later animate back to. This is currently
* only hydrated on creation and when we first read a value.
*/
setBaseTarget(key, value) {
this.baseTarget[key] = value;
}
/**
* Find the base target for a value thats been removed from all animation
* props.
*/
getBaseTarget(key) {
var _a;
const {
initial
} = this.props;
const valueFromInitial = typeof initial === "string" || typeof initial === "object" ? (_a = (0,_utils_resolve_variants_mjs__WEBPACK_IMPORTED_MODULE_15__/* .resolveVariantFromProps */ .a)(this.props, initial)) === null || _a === void 0 ? void 0 : _a[key] : undefined;
/**
* If this value still exists in the current initial variant, read that.
*/
if (initial && valueFromInitial !== undefined) {
return valueFromInitial;
}
/**
* Alternatively, if this VisualElement config has defined a getBaseTarget
* so we can read the value from an alternative source, try that.
*/
const target = this.getBaseTargetFromProps(this.props, key);
if (target !== undefined && !(0,_value_utils_is_motion_value_mjs__WEBPACK_IMPORTED_MODULE_10__/* .isMotionValue */ .S)(target)) return target;
/**
* If the value was initially defined on initial, but it doesn't any more,
* return undefined. Otherwise return the value as initially read from the DOM.
*/
return this.initialValues[key] !== undefined && valueFromInitial === undefined ? undefined : this.baseTarget[key];
}
on(eventName, callback) {
if (!this.events[eventName]) {
this.events[eventName] = new _utils_subscription_manager_mjs__WEBPACK_IMPORTED_MODULE_7__/* .SubscriptionManager */ .v();
}
return this.events[eventName].add(callback);
}
notify(eventName, ...args) {
if (this.events[eventName]) {
this.events[eventName].notify(...args);
}
}
}
/***/ }),
/***/ 294901:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ b: () => (/* binding */ DOMVisualElement)
/* harmony export */ });
/* harmony import */ var _utils_setters_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(482200);
/* harmony import */ var _utils_parse_dom_variant_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(283043);
/* harmony import */ var _VisualElement_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(373518);
class DOMVisualElement extends _VisualElement_mjs__WEBPACK_IMPORTED_MODULE_2__/* .VisualElement */ .B {
sortInstanceNodePosition(a, b) {
/**
* compareDocumentPosition returns a bitmask, by using the bitwise &
* we're returning true if 2 in that bitmask is set to true. 2 is set
* to true if b preceeds a.
*/
return a.compareDocumentPosition(b) & 2 ? 1 : -1;
}
getBaseTargetFromProps(props, key) {
return props.style ? props.style[key] : undefined;
}
removeValueFromRenderState(key, {
vars,
style
}) {
delete vars[key];
delete style[key];
}
makeTargetAnimatableFromInstance({
transition,
transitionEnd,
...target
}, {
transformValues
}, isMounted) {
let origin = (0,_utils_setters_mjs__WEBPACK_IMPORTED_MODULE_0__/* .getOrigin */ .$z)(target, transition || {}, this);
/**
* If Framer has provided a function to convert `Color` etc value types, convert them
*/
if (transformValues) {
if (transitionEnd) transitionEnd = transformValues(transitionEnd);
if (target) target = transformValues(target);
if (origin) origin = transformValues(origin);
}
if (isMounted) {
(0,_utils_setters_mjs__WEBPACK_IMPORTED_MODULE_0__/* .checkTargetForNewValues */ .TM)(this, target, origin);
const parsed = (0,_utils_parse_dom_variant_mjs__WEBPACK_IMPORTED_MODULE_1__/* .parseDomVariant */ .P)(this, target, origin, transitionEnd);
transitionEnd = parsed.transitionEnd;
target = parsed.target;
}
return {
transition,
transitionEnd,
...target
};
}
}
/***/ }),
/***/ 740601:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ J: () => (/* binding */ createDomVisualElement)
/* harmony export */ });
/* harmony import */ var _html_HTMLVisualElement_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(176617);
/* harmony import */ var _svg_SVGVisualElement_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(541109);
/* harmony import */ var _utils_is_svg_component_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(514844);
const createDomVisualElement = (Component, options) => {
return (0,_utils_is_svg_component_mjs__WEBPACK_IMPORTED_MODULE_2__/* .isSVGComponent */ .Q)(Component) ? new _svg_SVGVisualElement_mjs__WEBPACK_IMPORTED_MODULE_1__/* .SVGVisualElement */ .l(options, {
enableHardwareAcceleration: false
}) : new _html_HTMLVisualElement_mjs__WEBPACK_IMPORTED_MODULE_0__/* .HTMLVisualElement */ .M(options, {
enableHardwareAcceleration: true
});
};
/***/ }),
/***/ 827073:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ l: () => (/* binding */ domAnimation)
/* harmony export */ });
/* harmony import */ var _motion_features_animations_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(788477);
/* harmony import */ var _motion_features_gestures_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(302160);
/* harmony import */ var _create_visual_element_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(740601);
/**
* @public
*/
const domAnimation = {
renderer: _create_visual_element_mjs__WEBPACK_IMPORTED_MODULE_2__/* .createDomVisualElement */ .J,
..._motion_features_animations_mjs__WEBPACK_IMPORTED_MODULE_0__/* .animations */ .W,
..._motion_features_gestures_mjs__WEBPACK_IMPORTED_MODULE_1__/* .gestureAnimations */ .n
};
/***/ }),
/***/ 475861:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* unused harmony export domMax */
/* harmony import */ var _motion_features_drag_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(863986);
/* harmony import */ var _motion_features_layout_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(561522);
/* harmony import */ var _features_animation_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(827073);
/**
* @public
*/
const domMax = {
..._features_animation_mjs__WEBPACK_IMPORTED_MODULE_2__/* .domAnimation */ .l,
..._motion_features_drag_mjs__WEBPACK_IMPORTED_MODULE_0__/* .drag */ .$,
..._motion_features_layout_mjs__WEBPACK_IMPORTED_MODULE_1__/* .layout */ .Z
};
/***/ }),
/***/ 959549:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* unused harmony export m */
/* harmony import */ var _motion_proxy_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(557712);
/* harmony import */ var _utils_create_config_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(346306);
/**
* @public
*/
const m = (0,_motion_proxy_mjs__WEBPACK_IMPORTED_MODULE_0__/* .createMotionProxy */ .H)(_utils_create_config_mjs__WEBPACK_IMPORTED_MODULE_1__/* .createDomMotionConfig */ .P);
/***/ }),
/***/ 557712:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ H: () => (/* binding */ createMotionProxy)
/* harmony export */ });
/* harmony import */ var _motion_index_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(285424);
/**
* Convert any React component into a `motion` component. The provided component
* **must** use `React.forwardRef` to the underlying DOM component you want to animate.
*
* ```jsx
* const Component = React.forwardRef((props, ref) => {
* return <div ref={ref} />
* })
*
* const MotionComponent = motion(Component)
* ```
*
* @public
*/
function createMotionProxy(createConfig) {
function custom(Component, customMotionComponentConfig = {}) {
return (0,_motion_index_mjs__WEBPACK_IMPORTED_MODULE_0__/* .createMotionComponent */ .G)(createConfig(Component, customMotionComponentConfig));
}
if (typeof Proxy === "undefined") {
return custom;
}
/**
* A cache of generated `motion` components, e.g `motion.div`, `motion.input` etc.
* Rather than generating them anew every render.
*/
const componentCache = new Map();
return new Proxy(custom, {
/**
* Called when `motion` is referenced with a prop: `motion.div`, `motion.input` etc.
* The prop name is passed through as `key` and we can use that to generate a `motion`
* DOM component with that name.
*/
get: (_target, key) => {
/**
* If this element doesn't exist in the component cache, create it and cache.
*/
if (!componentCache.has(key)) {
componentCache.set(key, custom(key));
}
return componentCache.get(key);
}
});
}
/***/ }),
/***/ 142571:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ P: () => (/* binding */ motion)
/* harmony export */ });
/* unused harmony export createDomMotionComponent */
/* harmony import */ var _motion_index_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(285424);
/* harmony import */ var _motion_proxy_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(557712);
/* harmony import */ var _utils_create_config_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(346306);
/* harmony import */ var _motion_features_gestures_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(302160);
/* harmony import */ var _motion_features_animations_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(788477);
/* harmony import */ var _motion_features_drag_mjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(863986);
/* harmony import */ var _create_visual_element_mjs__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(740601);
/* harmony import */ var _motion_features_layout_mjs__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(561522);
const preloadedFeatures = {
..._motion_features_animations_mjs__WEBPACK_IMPORTED_MODULE_4__/* .animations */ .W,
..._motion_features_gestures_mjs__WEBPACK_IMPORTED_MODULE_3__/* .gestureAnimations */ .n,
..._motion_features_drag_mjs__WEBPACK_IMPORTED_MODULE_5__/* .drag */ .$,
..._motion_features_layout_mjs__WEBPACK_IMPORTED_MODULE_7__/* .layout */ .Z
};
/**
* HTML & SVG components, optimised for use with gestures and animation. These can be used as
* drop-in replacements for any HTML & SVG component, all CSS & SVG properties are supported.
*
* @public
*/
const motion = /*@__PURE__*/(0,_motion_proxy_mjs__WEBPACK_IMPORTED_MODULE_1__/* .createMotionProxy */ .H)((Component, config) => (0,_utils_create_config_mjs__WEBPACK_IMPORTED_MODULE_2__/* .createDomMotionConfig */ .P)(Component, config, preloadedFeatures, _create_visual_element_mjs__WEBPACK_IMPORTED_MODULE_6__/* .createDomVisualElement */ .J));
/**
* Create a DOM `motion` component with the provided string. This is primarily intended
* as a full alternative to `motion` for consumers who have to support environments that don't
* support `Proxy`.
*
* ```javascript
* import { createDomMotionComponent } from "framer-motion"
*
* const motion = {
* div: createDomMotionComponent('div')
* }
* ```
*
* @public
*/
function createDomMotionComponent(key) {
return createMotionComponent(createDomMotionConfig(key, {
forwardMotionProps: false
}, preloadedFeatures, createDomVisualElement));
}
/***/ }),
/***/ 5457:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* unused harmony export resizeElement */
/* harmony import */ var core_js_modules_esnext_iterator_constructor_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(314846);
/* harmony import */ var core_js_modules_esnext_iterator_for_each_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(469655);
/* harmony import */ var _utils_resolve_element_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(801822);
const resizeHandlers = new WeakMap();
let observer;
function getElementSize(target, borderBoxSize) {
if (borderBoxSize) {
const {
inlineSize,
blockSize
} = borderBoxSize[0];
return {
width: inlineSize,
height: blockSize
};
} else if (target instanceof SVGElement && "getBBox" in target) {
return target.getBBox();
} else {
return {
width: target.offsetWidth,
height: target.offsetHeight
};
}
}
function notifyTarget({
target,
contentRect,
borderBoxSize
}) {
var _a;
(_a = resizeHandlers.get(target)) === null || _a === void 0 ? void 0 : _a.forEach(handler => {
handler({
target,
contentSize: contentRect,
get size() {
return getElementSize(target, borderBoxSize);
}
});
});
}
function notifyAll(entries) {
entries.forEach(notifyTarget);
}
function createResizeObserver() {
if (typeof ResizeObserver === "undefined") return;
observer = new ResizeObserver(notifyAll);
}
function resizeElement(target, handler) {
if (!observer) createResizeObserver();
const elements = resolveElements(target);
elements.forEach(element => {
let elementHandlers = resizeHandlers.get(element);
if (!elementHandlers) {
elementHandlers = new Set();
resizeHandlers.set(element, elementHandlers);
}
elementHandlers.add(handler);
observer === null || observer === void 0 ? void 0 : observer.observe(element);
});
return () => {
elements.forEach(element => {
const elementHandlers = resizeHandlers.get(element);
elementHandlers === null || elementHandlers === void 0 ? void 0 : elementHandlers.delete(handler);
if (!(elementHandlers === null || elementHandlers === void 0 ? void 0 : elementHandlers.size)) {
observer === null || observer === void 0 ? void 0 : observer.unobserve(element);
}
});
};
}
/***/ }),
/***/ 377791:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* unused harmony export resizeWindow */
/* harmony import */ var core_js_modules_esnext_iterator_constructor_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(314846);
/* harmony import */ var core_js_modules_esnext_iterator_for_each_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(469655);
const windowCallbacks = new Set();
let windowResizeHandler;
function createWindowResizeHandler() {
windowResizeHandler = () => {
const size = {
width: window.innerWidth,
height: window.innerHeight
};
const info = {
target: window,
size,
contentSize: size
};
windowCallbacks.forEach(callback => callback(info));
};
window.addEventListener("resize", windowResizeHandler);
}
function resizeWindow(callback) {
windowCallbacks.add(callback);
if (!windowResizeHandler) createWindowResizeHandler();
return () => {
windowCallbacks.delete(callback);
if (!windowCallbacks.size && windowResizeHandler) {
windowResizeHandler = undefined;
}
};
}
/***/ }),
/***/ 751308:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* unused harmony export resize */
/* harmony import */ var _handle_element_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5457);
/* harmony import */ var _handle_window_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(377791);
function resize(a, b) {
return typeof a === "function" ? resizeWindow(a) : resizeElement(a, b);
}
/***/ }),
/***/ 847891:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* unused harmony export scroll */
/* harmony import */ var _track_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(12582);
/* harmony import */ var _observe_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(879783);
/* harmony import */ var _supports_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(8065);
function scrollTimelineFallback({
source,
axis = "y"
}) {
// ScrollTimeline records progress as a percentage CSSUnitValue
const currentTime = {
value: 0
};
const cancel = scrollInfo(info => {
currentTime.value = info[axis].progress * 100;
}, {
container: source,
axis
});
return {
currentTime,
cancel
};
}
const timelineCache = new Map();
function getTimeline({
source = document.documentElement,
axis = "y"
} = {}) {
if (!timelineCache.has(source)) {
timelineCache.set(source, {});
}
const elementCache = timelineCache.get(source);
if (!elementCache[axis]) {
elementCache[axis] = supportsScrollTimeline() ? new ScrollTimeline({
source,
axis
}) : scrollTimelineFallback({
source,
axis
});
}
return elementCache[axis];
}
function scroll(onScroll, options) {
const timeline = getTimeline(options);
if (typeof onScroll === "function") {
return observeTimeline(onScroll, timeline);
} else {
return onScroll.attachTimeline(timeline);
}
}
/***/ }),
/***/ 454669:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* unused harmony exports createScrollInfo, updateScrollInfo */
/* harmony import */ var _utils_progress_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(799020);
/* harmony import */ var _utils_velocity_per_second_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(540255);
/**
* A time in milliseconds, beyond which we consider the scroll velocity to be 0.
*/
const maxElapsed = 50;
const createAxisInfo = () => ({
current: 0,
offset: [],
progress: 0,
scrollLength: 0,
targetOffset: 0,
targetLength: 0,
containerLength: 0,
velocity: 0
});
const createScrollInfo = () => ({
time: 0,
x: createAxisInfo(),
y: createAxisInfo()
});
const keys = {
x: {
length: "Width",
position: "Left"
},
y: {
length: "Height",
position: "Top"
}
};
function updateAxisInfo(element, axisName, info, time) {
const axis = info[axisName];
const {
length,
position
} = keys[axisName];
const prev = axis.current;
const prevTime = info.time;
axis.current = element["scroll" + position];
axis.scrollLength = element["scroll" + length] - element["client" + length];
axis.offset.length = 0;
axis.offset[0] = 0;
axis.offset[1] = axis.scrollLength;
axis.progress = progress(0, axis.scrollLength, axis.current);
const elapsed = time - prevTime;
axis.velocity = elapsed > maxElapsed ? 0 : velocityPerSecond(axis.current - prev, elapsed);
}
function updateScrollInfo(element, info, time) {
updateAxisInfo(element, "x", info, time);
updateAxisInfo(element, "y", info, time);
info.time = time;
}
/***/ }),
/***/ 879783:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ y: () => (/* binding */ observeTimeline)
/* harmony export */ });
/* harmony import */ var _frameloop_frame_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(277210);
function observeTimeline(update, timeline) {
let prevProgress;
const onFrame = () => {
const {
currentTime
} = timeline;
const percentage = currentTime === null ? 0 : currentTime.value;
const progress = percentage / 100;
if (prevProgress !== progress) {
update(progress);
}
prevProgress = progress;
};
_frameloop_frame_mjs__WEBPACK_IMPORTED_MODULE_0__/* .frame */ .Gt.update(onFrame, true);
return () => (0,_frameloop_frame_mjs__WEBPACK_IMPORTED_MODULE_0__/* .cancelFrame */ .WG)(onFrame);
}
/***/ }),
/***/ 808537:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* unused harmony exports namedEdges, resolveEdge */
const namedEdges = {
start: 0,
center: 0.5,
end: 1
};
function resolveEdge(edge, length, inset = 0) {
let delta = 0;
/**
* If we have this edge defined as a preset, replace the definition
* with the numerical value.
*/
if (namedEdges[edge] !== undefined) {
edge = namedEdges[edge];
}
/**
* Handle unit values
*/
if (typeof edge === "string") {
const asNumber = parseFloat(edge);
if (edge.endsWith("px")) {
delta = asNumber;
} else if (edge.endsWith("%")) {
edge = asNumber / 100;
} else if (edge.endsWith("vw")) {
delta = asNumber / 100 * document.documentElement.clientWidth;
} else if (edge.endsWith("vh")) {
delta = asNumber / 100 * document.documentElement.clientHeight;
} else {
edge = asNumber;
}
}
/**
* If the edge is defined as a number, handle as a progress value.
*/
if (typeof edge === "number") {
delta = length * edge;
}
return inset + delta;
}
/***/ }),
/***/ 792938:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* unused harmony export resolveOffsets */
/* harmony import */ var _inset_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(309305);
/* harmony import */ var _presets_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(587474);
/* harmony import */ var _offset_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(336671);
/* harmony import */ var _utils_interpolate_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(323662);
/* harmony import */ var _utils_offsets_default_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(766869);
const point = {
x: 0,
y: 0
};
function getTargetSize(target) {
return "getBBox" in target && target.tagName !== "svg" ? target.getBBox() : {
width: target.clientWidth,
height: target.clientHeight
};
}
function resolveOffsets(container, info, options) {
let {
offset: offsetDefinition = ScrollOffset.All
} = options;
const {
target = container,
axis = "y"
} = options;
const lengthLabel = axis === "y" ? "height" : "width";
const inset = target !== container ? calcInset(target, container) : point;
/**
* Measure the target and container. If they're the same thing then we
* use the container's scrollWidth/Height as the target, from there
* all other calculations can remain the same.
*/
const targetSize = target === container ? {
width: container.scrollWidth,
height: container.scrollHeight
} : getTargetSize(target);
const containerSize = {
width: container.clientWidth,
height: container.clientHeight
};
/**
* Reset the length of the resolved offset array rather than creating a new one.
* TODO: More reusable data structures for targetSize/containerSize would also be good.
*/
info[axis].offset.length = 0;
/**
* Populate the offset array by resolving the user's offset definition into
* a list of pixel scroll offets.
*/
let hasChanged = !info[axis].interpolate;
const numOffsets = offsetDefinition.length;
for (let i = 0; i < numOffsets; i++) {
const offset = resolveOffset(offsetDefinition[i], containerSize[lengthLabel], targetSize[lengthLabel], inset[axis]);
if (!hasChanged && offset !== info[axis].interpolatorOffsets[i]) {
hasChanged = true;
}
info[axis].offset[i] = offset;
}
/**
* If the pixel scroll offsets have changed, create a new interpolator function
* to map scroll value into a progress.
*/
if (hasChanged) {
info[axis].interpolate = interpolate(info[axis].offset, defaultOffset(offsetDefinition));
info[axis].interpolatorOffsets = [...info[axis].offset];
}
info[axis].progress = info[axis].interpolate(info[axis].current);
}
/***/ }),
/***/ 309305:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* unused harmony export calcInset */
function calcInset(element, container) {
const inset = {
x: 0,
y: 0
};
let current = element;
while (current && current !== container) {
if (current instanceof HTMLElement) {
inset.x += current.offsetLeft;
inset.y += current.offsetTop;
current = current.offsetParent;
} else if (current.tagName === "svg") {
/**
* This isn't an ideal approach to measuring the offset of <svg /> tags.
* It would be preferable, given they behave like HTMLElements in most ways
* to use offsetLeft/Top. But these don't exist on <svg />. Likewise we
* can't use .getBBox() like most SVG elements as these provide the offset
* relative to the SVG itself, which for <svg /> is usually 0x0.
*/
const svgBoundingBox = current.getBoundingClientRect();
current = current.parentElement;
const parentBoundingBox = current.getBoundingClientRect();
inset.x += svgBoundingBox.left - parentBoundingBox.left;
inset.y += svgBoundingBox.top - parentBoundingBox.top;
} else if (current instanceof SVGGraphicsElement) {
const {
x,
y
} = current.getBBox();
inset.x += x;
inset.y += y;
let svg = null;
let parent = current.parentNode;
while (!svg) {
if (parent.tagName === "svg") {
svg = parent;
}
parent = current.parentNode;
}
current = svg;
} else {
break;
}
}
return inset;
}
/***/ }),
/***/ 336671:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* unused harmony export resolveOffset */
/* harmony import */ var core_js_modules_es_array_includes_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(76281);
/* harmony import */ var _edge_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(808537);
const defaultOffset = (/* unused pure expression or super */ null && ([0, 0]));
function resolveOffset(offset, containerLength, targetLength, targetInset) {
let offsetDefinition = Array.isArray(offset) ? offset : defaultOffset;
let targetPoint = 0;
let containerPoint = 0;
if (typeof offset === "number") {
/**
* If we're provided offset: [0, 0.5, 1] then each number x should become
* [x, x], so we default to the behaviour of mapping 0 => 0 of both target
* and container etc.
*/
offsetDefinition = [offset, offset];
} else if (typeof offset === "string") {
offset = offset.trim();
if (offset.includes(" ")) {
offsetDefinition = offset.split(" ");
} else {
/**
* If we're provided a definition like "100px" then we want to apply
* that only to the top of the target point, leaving the container at 0.
* Whereas a named offset like "end" should be applied to both.
*/
offsetDefinition = [offset, namedEdges[offset] ? offset : `0`];
}
}
targetPoint = resolveEdge(offsetDefinition[0], targetLength, targetInset);
containerPoint = resolveEdge(offsetDefinition[1], containerLength);
return targetPoint - containerPoint;
}
/***/ }),
/***/ 587474:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* unused harmony export ScrollOffset */
const ScrollOffset = {
Enter: [[0, 1], [1, 1]],
Exit: [[0, 0], [1, 0]],
Any: [[1, 0], [0, 1]],
All: [[0, 0], [1, 1]]
};
/***/ }),
/***/ 62231:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* unused harmony export createOnScrollHandler */
/* harmony import */ var _utils_warn_once_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(721657);
/* harmony import */ var _info_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(454669);
/* harmony import */ var _offsets_index_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(792938);
function measure(container, target = container, info) {
/**
* Find inset of target within scrollable container
*/
info.x.targetOffset = 0;
info.y.targetOffset = 0;
if (target !== container) {
let node = target;
while (node && node !== container) {
info.x.targetOffset += node.offsetLeft;
info.y.targetOffset += node.offsetTop;
node = node.offsetParent;
}
}
info.x.targetLength = target === container ? target.scrollWidth : target.clientWidth;
info.y.targetLength = target === container ? target.scrollHeight : target.clientHeight;
info.x.containerLength = container.clientWidth;
info.y.containerLength = container.clientHeight;
/**
* In development mode ensure scroll containers aren't position: static as this makes
* it difficult to measure their relative positions.
*/
if (false) {}
}
function createOnScrollHandler(element, onScroll, info, options = {}) {
return {
measure: () => measure(element, options.target, info),
update: time => {
updateScrollInfo(element, info, time);
if (options.offset || options.target) {
resolveOffsets(element, info, options);
}
},
notify: () => onScroll(info)
};
}
/***/ }),
/***/ 8065:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ J: () => (/* binding */ supportsScrollTimeline)
/* harmony export */ });
/* harmony import */ var _utils_memo_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(696407);
const supportsScrollTimeline = (0,_utils_memo_mjs__WEBPACK_IMPORTED_MODULE_0__/* .memo */ .p)(() => window.ScrollTimeline !== undefined);
/***/ }),
/***/ 12582:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* unused harmony export scrollInfo */
/* harmony import */ var _resize_index_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(751308);
/* harmony import */ var _info_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(454669);
/* harmony import */ var _on_scroll_handler_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(62231);
/* harmony import */ var _frameloop_frame_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(277210);
const scrollListeners = new WeakMap();
const resizeListeners = new WeakMap();
const onScrollHandlers = new WeakMap();
const getEventTarget = element => element === document.documentElement ? window : element;
function scrollInfo(onScroll, {
container = document.documentElement,
...options
} = {}) {
let containerHandlers = onScrollHandlers.get(container);
/**
* Get the onScroll handlers for this container.
* If one isn't found, create a new one.
*/
if (!containerHandlers) {
containerHandlers = new Set();
onScrollHandlers.set(container, containerHandlers);
}
/**
* Create a new onScroll handler for the provided callback.
*/
const info = createScrollInfo();
const containerHandler = createOnScrollHandler(container, onScroll, info, options);
containerHandlers.add(containerHandler);
/**
* Check if there's a scroll event listener for this container.
* If not, create one.
*/
if (!scrollListeners.has(container)) {
const measureAll = () => {
for (const handler of containerHandlers) handler.measure();
};
const updateAll = () => {
for (const handler of containerHandlers) {
handler.update(frameData.timestamp);
}
};
const notifyAll = () => {
for (const handler of containerHandlers) handler.notify();
};
const listener = () => {
frame.read(measureAll, false, true);
frame.read(updateAll, false, true);
frame.update(notifyAll, false, true);
};
scrollListeners.set(container, listener);
const target = getEventTarget(container);
window.addEventListener("resize", listener, {
passive: true
});
if (container !== document.documentElement) {
resizeListeners.set(container, resize(container, listener));
}
target.addEventListener("scroll", listener, {
passive: true
});
}
const listener = scrollListeners.get(container);
frame.read(listener, false, true);
return () => {
var _a;
cancelFrame(listener);
/**
* Check if we even have any handlers for this container.
*/
const currentHandlers = onScrollHandlers.get(container);
if (!currentHandlers) return;
currentHandlers.delete(containerHandler);
if (currentHandlers.size) return;
/**
* If no more handlers, remove the scroll listener too.
*/
const scrollListener = scrollListeners.get(container);
scrollListeners.delete(container);
if (scrollListener) {
getEventTarget(container).removeEventListener("scroll", scrollListener);
(_a = resizeListeners.get(container)) === null || _a === void 0 ? void 0 : _a();
window.removeEventListener("resize", scrollListener);
}
};
}
/***/ }),
/***/ 86595:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ o: () => (/* binding */ createUseRender)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(63696);
/* harmony import */ var _html_use_props_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(320012);
/* harmony import */ var _utils_filter_props_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(805796);
/* harmony import */ var _utils_is_svg_component_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(514844);
/* harmony import */ var _svg_use_props_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(30233);
/* harmony import */ var _value_utils_is_motion_value_mjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(573970);
function createUseRender(forwardMotionProps = false) {
const useRender = (Component, props, ref, {
latestValues
}, isStatic) => {
const useVisualProps = (0,_utils_is_svg_component_mjs__WEBPACK_IMPORTED_MODULE_3__/* .isSVGComponent */ .Q)(Component) ? _svg_use_props_mjs__WEBPACK_IMPORTED_MODULE_4__/* .useSVGProps */ .u : _html_use_props_mjs__WEBPACK_IMPORTED_MODULE_1__/* .useHTMLProps */ .b;
const visualProps = useVisualProps(props, latestValues, isStatic, Component);
const filteredProps = (0,_utils_filter_props_mjs__WEBPACK_IMPORTED_MODULE_2__/* .filterProps */ .J)(props, typeof Component === "string", forwardMotionProps);
const elementProps = {
...filteredProps,
...visualProps,
ref
};
/**
* If component has been handed a motion value as its child,
* memoise its initial value and render that. Subsequent updates
* will be handled by the onChange handler
*/
const {
children
} = props;
const renderedChildren = (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(() => (0,_value_utils_is_motion_value_mjs__WEBPACK_IMPORTED_MODULE_5__/* .isMotionValue */ .S)(children) ? children.get() : children, [children]);
return /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(Component, {
...elementProps,
children: renderedChildren
});
};
return useRender;
}
/***/ }),
/***/ 493388:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ I: () => (/* binding */ camelToDash)
/* harmony export */ });
/**
* Convert camelCase to dash-case properties.
*/
const camelToDash = str => str.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase();
/***/ }),
/***/ 346306:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ P: () => (/* binding */ createDomMotionConfig)
/* harmony export */ });
/* harmony import */ var _is_svg_component_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(514844);
/* harmony import */ var _use_render_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(86595);
/* harmony import */ var _svg_config_motion_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(935856);
/* harmony import */ var _html_config_motion_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(556029);
function createDomMotionConfig(Component, {
forwardMotionProps = false
}, preloadedFeatures, createVisualElement) {
const baseConfig = (0,_is_svg_component_mjs__WEBPACK_IMPORTED_MODULE_0__/* .isSVGComponent */ .Q)(Component) ? _svg_config_motion_mjs__WEBPACK_IMPORTED_MODULE_2__/* .svgMotionConfig */ .X : _html_config_motion_mjs__WEBPACK_IMPORTED_MODULE_3__/* .htmlMotionConfig */ .S;
return {
...baseConfig,
preloadedFeatures,
useRender: (0,_use_render_mjs__WEBPACK_IMPORTED_MODULE_1__/* .createUseRender */ .o)(forwardMotionProps),
createVisualElement,
Component
};
}
/***/ }),
/***/ 600285:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ d: () => (/* binding */ resolveCSSVariables)
/* harmony export */ });
/* unused harmony export parseCSSVariable */
/* harmony import */ var core_js_modules_esnext_iterator_constructor_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(314846);
/* harmony import */ var core_js_modules_esnext_iterator_for_each_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(469655);
/* harmony import */ var _utils_errors_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(841164);
/* harmony import */ var _utils_is_numerical_string_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(907930);
/* harmony import */ var _is_css_variable_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(511078);
/**
* Parse Framer's special CSS variable format into a CSS token and a fallback.
*
* ```
* `var(--foo, #fff)` => [`--foo`, '#fff']
* ```
*
* @param current
*/
const splitCSSVariableRegex = /var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;
function parseCSSVariable(current) {
const match = splitCSSVariableRegex.exec(current);
if (!match) return [,];
const [, token, fallback] = match;
return [token, fallback];
}
const maxDepth = 4;
function getVariableValue(current, element, depth = 1) {
(0,_utils_errors_mjs__WEBPACK_IMPORTED_MODULE_2__/* .invariant */ .V)(depth <= maxDepth, `Max CSS variable fallback depth detected in property "${current}". This may indicate a circular fallback dependency.`);
const [token, fallback] = parseCSSVariable(current);
// No CSS variable detected
if (!token) return;
// Attempt to read this CSS variable off the element
const resolved = window.getComputedStyle(element).getPropertyValue(token);
if (resolved) {
const trimmed = resolved.trim();
return (0,_utils_is_numerical_string_mjs__WEBPACK_IMPORTED_MODULE_3__/* .isNumericalString */ .i)(trimmed) ? parseFloat(trimmed) : trimmed;
} else if ((0,_is_css_variable_mjs__WEBPACK_IMPORTED_MODULE_4__/* .isCSSVariableToken */ .pG)(fallback)) {
// The fallback might itself be a CSS variable, in which case we attempt to resolve it too.
return getVariableValue(fallback, element, depth + 1);
} else {
return fallback;
}
}
/**
* Resolve CSS variables from
*
* @internal
*/
function resolveCSSVariables(visualElement, {
...target
}, transitionEnd) {
const element = visualElement.current;
if (!(element instanceof Element)) return {
target,
transitionEnd
};
// If `transitionEnd` isn't `undefined`, clone it. We could clone `target` and `transitionEnd`
// only if they change but I think this reads clearer and this isn't a performance-critical path.
if (transitionEnd) {
transitionEnd = {
...transitionEnd
};
}
// Go through existing `MotionValue`s and ensure any existing CSS variables are resolved
visualElement.values.forEach(value => {
const current = value.get();
if (!(0,_is_css_variable_mjs__WEBPACK_IMPORTED_MODULE_4__/* .isCSSVariableToken */ .pG)(current)) return;
const resolved = getVariableValue(current, element);
if (resolved) value.set(resolved);
});
// Cycle through every target property and resolve CSS variables. Currently
// we only read single-var properties like `var(--foo)`, not `calc(var(--foo) + 20px)`
for (const key in target) {
const current = target[key];
if (!(0,_is_css_variable_mjs__WEBPACK_IMPORTED_MODULE_4__/* .isCSSVariableToken */ .pG)(current)) continue;
const resolved = getVariableValue(current, element);
if (!resolved) continue;
// Clone target if it hasn't already been
target[key] = resolved;
if (!transitionEnd) transitionEnd = {};
// If the user hasn't already set this key on `transitionEnd`, set it to the unresolved
// CSS variable. This will ensure that after the animation the component will reflect
// changes in the value of the CSS variable.
if (transitionEnd[key] === undefined) {
transitionEnd[key] = current;
}
}
return {
target,
transitionEnd
};
}
/***/ }),
/***/ 805796:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ J: () => (/* binding */ filterProps)
/* harmony export */ });
/* unused harmony export loadExternalIsValidProp */
/* harmony import */ var _motion_utils_valid_prop_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(116954);
let shouldForward = key => !(0,_motion_utils_valid_prop_mjs__WEBPACK_IMPORTED_MODULE_0__/* .isValidMotionProp */ .S)(key);
function loadExternalIsValidProp(isValidProp) {
if (!isValidProp) return;
// Explicitly filter our events
shouldForward = key => key.startsWith("on") ? !(0,_motion_utils_valid_prop_mjs__WEBPACK_IMPORTED_MODULE_0__/* .isValidMotionProp */ .S)(key) : isValidProp(key);
}
/**
* Emotion and Styled Components both allow users to pass through arbitrary props to their components
* to dynamically generate CSS. They both use the `@emotion/is-prop-valid` package to determine which
* of these should be passed to the underlying DOM node.
*
* However, when styling a Motion component `styled(motion.div)`, both packages pass through *all* props
* as it's seen as an arbitrary component rather than a DOM node. Motion only allows arbitrary props
* passed through the `custom` prop so it doesn't *need* the payload or computational overhead of
* `@emotion/is-prop-valid`, however to fix this problem we need to use it.
*
* By making it an optionalDependency we can offer this functionality only in the situations where it's
* actually required.
*/
try {
/**
* We attempt to import this package but require won't be defined in esm environments, in that case
* isPropValid will have to be provided via `MotionContext`. In a 6.0.0 this should probably be removed
* in favour of explicit injection.
*/
loadExternalIsValidProp(require("@emotion/is-prop-valid").default);
} catch (_a) {
// We don't need to actually do anything here - the fallback is the existing `isPropValid`.
}
function filterProps(props, isDom, forwardMotionProps) {
const filteredProps = {};
for (const key in props) {
/**
* values is considered a valid prop by Emotion, so if it's present
* this will be rendered out to the DOM unless explicitly filtered.
*
* We check the type as it could be used with the `feColorMatrix`
* element, which we support.
*/
if (key === "values" && typeof props.values === "object") continue;
if (shouldForward(key) || forwardMotionProps === true && (0,_motion_utils_valid_prop_mjs__WEBPACK_IMPORTED_MODULE_0__/* .isValidMotionProp */ .S)(key) || !isDom && !(0,_motion_utils_valid_prop_mjs__WEBPACK_IMPORTED_MODULE_0__/* .isValidMotionProp */ .S)(key) ||
// If trying to use native HTML drag events, forward drag listeners
props["draggable"] && key.startsWith("onDrag")) {
filteredProps[key] = props[key];
}
}
return filteredProps;
}
/***/ }),
/***/ 511078:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ j4: () => (/* binding */ isCSSVariableName),
/* harmony export */ pG: () => (/* binding */ isCSSVariableToken),
/* harmony export */ z2: () => (/* binding */ cssVariableRegex)
/* harmony export */ });
const checkStringStartsWith = token => key => typeof key === "string" && key.startsWith(token);
const isCSSVariableName = checkStringStartsWith("--");
const isCSSVariableToken = checkStringStartsWith("var(--");
const cssVariableRegex = /var\s*\(\s*--[\w-]+(\s*,\s*(?:(?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)+)?\s*\)/g;
/***/ }),
/***/ 514844:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ Q: () => (/* binding */ isSVGComponent)
/* harmony export */ });
/* harmony import */ var core_js_modules_es_array_includes_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(76281);
/* harmony import */ var _svg_lowercase_elements_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(505324);
function isSVGComponent(Component) {
if (
/**
* If it's not a string, it's a custom React component. Currently we only support
* HTML custom React components.
*/
typeof Component !== "string" ||
/**
* If it contains a dash, the element is a custom HTML webcomponent.
*/
Component.includes("-")) {
return false;
} else if (
/**
* If it's in our list of lowercase SVG tags, it's an SVG component
*/
_svg_lowercase_elements_mjs__WEBPACK_IMPORTED_MODULE_1__/* .lowercaseSVGElements */ .J.indexOf(Component) > -1 ||
/**
* If it contains a capital letter, it's an SVG component
*/
/[A-Z]/.test(Component)) {
return true;
}
return false;
}
/***/ }),
/***/ 244089:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ x: () => (/* binding */ isSVGElement)
/* harmony export */ });
function isSVGElement(element) {
return element instanceof SVGElement && element.tagName !== "svg";
}
/***/ }),
/***/ 283043:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ P: () => (/* binding */ parseDomVariant)
/* harmony export */ });
/* harmony import */ var _css_variables_conversion_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(600285);
/* harmony import */ var _unit_conversion_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(254098);
/**
* Parse a DOM variant to make it animatable. This involves resolving CSS variables
* and ensuring animations like "20%" => "calc(50vw)" are performed in pixels.
*/
const parseDomVariant = (visualElement, target, origin, transitionEnd) => {
const resolved = (0,_css_variables_conversion_mjs__WEBPACK_IMPORTED_MODULE_0__/* .resolveCSSVariables */ .d)(visualElement, target, transitionEnd);
target = resolved.target;
transitionEnd = resolved.transitionEnd;
return (0,_unit_conversion_mjs__WEBPACK_IMPORTED_MODULE_1__/* .unitConversion */ .t)(visualElement, target, origin, transitionEnd);
};
/***/ }),
/***/ 801822:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ K: () => (/* binding */ resolveElements)
/* harmony export */ });
/* harmony import */ var _utils_errors_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(841164);
function resolveElements(elements, scope, selectorCache) {
var _a;
if (typeof elements === "string") {
let root = document;
if (scope) {
(0,_utils_errors_mjs__WEBPACK_IMPORTED_MODULE_0__/* .invariant */ .V)(Boolean(scope.current), "Scope provided, but no element detected.");
root = scope.current;
}
if (selectorCache) {
(_a = selectorCache[elements]) !== null && _a !== void 0 ? _a : selectorCache[elements] = root.querySelectorAll(elements);
elements = selectorCache[elements];
} else {
elements = root.querySelectorAll(elements);
}
} else if (elements instanceof Element) {
elements = [elements];
}
/**
* Return an empty array
*/
return Array.from(elements || []);
}
/***/ }),
/***/ 254098:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ t: () => (/* binding */ unitConversion)
/* harmony export */ });
/* unused harmony export positionalValues */
/* harmony import */ var core_js_modules_esnext_iterator_constructor_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(314846);
/* harmony import */ var core_js_modules_esnext_iterator_filter_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(327458);
/* harmony import */ var core_js_modules_esnext_iterator_for_each_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(469655);
/* harmony import */ var core_js_modules_esnext_iterator_map_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(194364);
/* harmony import */ var core_js_modules_esnext_iterator_some_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(275568);
/* harmony import */ var _animation_utils_is_keyframes_target_mjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(343690);
/* harmony import */ var _utils_errors_mjs__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(841164);
/* harmony import */ var _html_utils_transform_mjs__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(353994);
/* harmony import */ var _value_types_dimensions_mjs__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(809372);
/* harmony import */ var _utils_is_browser_mjs__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(701134);
/* harmony import */ var _value_types_numbers_index_mjs__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(900478);
/* harmony import */ var _value_types_numbers_units_mjs__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(234223);
const positionalKeys = new Set(["width", "height", "top", "left", "right", "bottom", "x", "y", "translateX", "translateY"]);
const isPositionalKey = key => positionalKeys.has(key);
const hasPositionalKey = target => {
return Object.keys(target).some(isPositionalKey);
};
const isNumOrPxType = v => v === _value_types_numbers_index_mjs__WEBPACK_IMPORTED_MODULE_10__/* .number */ .ai || v === _value_types_numbers_units_mjs__WEBPACK_IMPORTED_MODULE_11__.px;
const getPosFromMatrix = (matrix, pos) => parseFloat(matrix.split(", ")[pos]);
const getTranslateFromMatrix = (pos2, pos3) => (_bbox, {
transform
}) => {
if (transform === "none" || !transform) return 0;
const matrix3d = transform.match(/^matrix3d\((.+)\)$/);
if (matrix3d) {
return getPosFromMatrix(matrix3d[1], pos3);
} else {
const matrix = transform.match(/^matrix\((.+)\)$/);
if (matrix) {
return getPosFromMatrix(matrix[1], pos2);
} else {
return 0;
}
}
};
const transformKeys = new Set(["x", "y", "z"]);
const nonTranslationalTransformKeys = _html_utils_transform_mjs__WEBPACK_IMPORTED_MODULE_7__/* .transformPropOrder */ .U.filter(key => !transformKeys.has(key));
function removeNonTranslationalTransform(visualElement) {
const removedTransforms = [];
nonTranslationalTransformKeys.forEach(key => {
const value = visualElement.getValue(key);
if (value !== undefined) {
removedTransforms.push([key, value.get()]);
value.set(key.startsWith("scale") ? 1 : 0);
}
});
// Apply changes to element before measurement
if (removedTransforms.length) visualElement.render();
return removedTransforms;
}
const positionalValues = {
// Dimensions
width: ({
x
}, {
paddingLeft = "0",
paddingRight = "0"
}) => x.max - x.min - parseFloat(paddingLeft) - parseFloat(paddingRight),
height: ({
y
}, {
paddingTop = "0",
paddingBottom = "0"
}) => y.max - y.min - parseFloat(paddingTop) - parseFloat(paddingBottom),
top: (_bbox, {
top
}) => parseFloat(top),
left: (_bbox, {
left
}) => parseFloat(left),
bottom: ({
y
}, {
top
}) => parseFloat(top) + (y.max - y.min),
right: ({
x
}, {
left
}) => parseFloat(left) + (x.max - x.min),
// Transform
x: getTranslateFromMatrix(4, 13),
y: getTranslateFromMatrix(5, 14)
};
// Alias translate longform names
positionalValues.translateX = positionalValues.x;
positionalValues.translateY = positionalValues.y;
const convertChangedValueTypes = (target, visualElement, changedKeys) => {
const originBbox = visualElement.measureViewportBox();
const element = visualElement.current;
const elementComputedStyle = getComputedStyle(element);
const {
display
} = elementComputedStyle;
const origin = {};
// If the element is currently set to display: "none", make it visible before
// measuring the target bounding box
if (display === "none") {
visualElement.setStaticValue("display", target.display || "block");
}
/**
* Record origins before we render and update styles
*/
changedKeys.forEach(key => {
origin[key] = positionalValues[key](originBbox, elementComputedStyle);
});
// Apply the latest values (as set in checkAndConvertChangedValueTypes)
visualElement.render();
const targetBbox = visualElement.measureViewportBox();
changedKeys.forEach(key => {
// Restore styles to their **calculated computed style**, not their actual
// originally set style. This allows us to animate between equivalent pixel units.
const value = visualElement.getValue(key);
value && value.jump(origin[key]);
target[key] = positionalValues[key](targetBbox, elementComputedStyle);
});
return target;
};
const checkAndConvertChangedValueTypes = (visualElement, target, origin = {}, transitionEnd = {}) => {
target = {
...target
};
transitionEnd = {
...transitionEnd
};
const targetPositionalKeys = Object.keys(target).filter(isPositionalKey);
// We want to remove any transform values that could affect the element's bounding box before
// it's measured. We'll reapply these later.
let removedTransformValues = [];
let hasAttemptedToRemoveTransformValues = false;
const changedValueTypeKeys = [];
targetPositionalKeys.forEach(key => {
const value = visualElement.getValue(key);
if (!visualElement.hasValue(key)) return;
let from = origin[key];
let fromType = (0,_value_types_dimensions_mjs__WEBPACK_IMPORTED_MODULE_8__/* .findDimensionValueType */ .n)(from);
const to = target[key];
let toType;
// TODO: The current implementation of this basically throws an error
// if you try and do value conversion via keyframes. There's probably
// a way of doing this but the performance implications would need greater scrutiny,
// as it'd be doing multiple resize-remeasure operations.
if ((0,_animation_utils_is_keyframes_target_mjs__WEBPACK_IMPORTED_MODULE_5__/* .isKeyframesTarget */ .p)(to)) {
const numKeyframes = to.length;
const fromIndex = to[0] === null ? 1 : 0;
from = to[fromIndex];
fromType = (0,_value_types_dimensions_mjs__WEBPACK_IMPORTED_MODULE_8__/* .findDimensionValueType */ .n)(from);
for (let i = fromIndex; i < numKeyframes; i++) {
/**
* Don't allow wildcard keyframes to be used to detect
* a difference in value types.
*/
if (to[i] === null) break;
if (!toType) {
toType = (0,_value_types_dimensions_mjs__WEBPACK_IMPORTED_MODULE_8__/* .findDimensionValueType */ .n)(to[i]);
(0,_utils_errors_mjs__WEBPACK_IMPORTED_MODULE_6__/* .invariant */ .V)(toType === fromType || isNumOrPxType(fromType) && isNumOrPxType(toType), "Keyframes must be of the same dimension as the current value");
} else {
(0,_utils_errors_mjs__WEBPACK_IMPORTED_MODULE_6__/* .invariant */ .V)((0,_value_types_dimensions_mjs__WEBPACK_IMPORTED_MODULE_8__/* .findDimensionValueType */ .n)(to[i]) === toType, "All keyframes must be of the same type");
}
}
} else {
toType = (0,_value_types_dimensions_mjs__WEBPACK_IMPORTED_MODULE_8__/* .findDimensionValueType */ .n)(to);
}
if (fromType !== toType) {
// If they're both just number or px, convert them both to numbers rather than
// relying on resize/remeasure to convert (which is wasteful in this situation)
if (isNumOrPxType(fromType) && isNumOrPxType(toType)) {
const current = value.get();
if (typeof current === "string") {
value.set(parseFloat(current));
}
if (typeof to === "string") {
target[key] = parseFloat(to);
} else if (Array.isArray(to) && toType === _value_types_numbers_units_mjs__WEBPACK_IMPORTED_MODULE_11__.px) {
target[key] = to.map(parseFloat);
}
} else if ((fromType === null || fromType === void 0 ? void 0 : fromType.transform) && (toType === null || toType === void 0 ? void 0 : toType.transform) && (from === 0 || to === 0)) {
// If one or the other value is 0, it's safe to coerce it to the
// type of the other without measurement
if (from === 0) {
value.set(toType.transform(from));
} else {
target[key] = fromType.transform(to);
}
} else {
// If we're going to do value conversion via DOM measurements, we first
// need to remove non-positional transform values that could affect the bbox measurements.
if (!hasAttemptedToRemoveTransformValues) {
removedTransformValues = removeNonTranslationalTransform(visualElement);
hasAttemptedToRemoveTransformValues = true;
}
changedValueTypeKeys.push(key);
transitionEnd[key] = transitionEnd[key] !== undefined ? transitionEnd[key] : target[key];
value.jump(to);
}
}
});
if (changedValueTypeKeys.length) {
const scrollY = changedValueTypeKeys.indexOf("height") >= 0 ? window.pageYOffset : null;
const convertedTarget = convertChangedValueTypes(target, visualElement, changedValueTypeKeys);
// If we removed transform values, reapply them before the next render
if (removedTransformValues.length) {
removedTransformValues.forEach(([key, value]) => {
visualElement.getValue(key).set(value);
});
}
// Reapply original values
visualElement.render();
// Restore scroll position
if (_utils_is_browser_mjs__WEBPACK_IMPORTED_MODULE_9__/* .isBrowser */ .B && scrollY !== null) {
window.scrollTo({
top: scrollY
});
}
return {
target: convertedTarget,
transitionEnd
};
} else {
return {
target,
transitionEnd
};
}
};
/**
* Convert value types for x/y/width/height/top/left/bottom/right
*
* Allows animation between `'auto'` -> `'100%'` or `0` -> `'calc(50% - 10vw)'`
*
* @internal
*/
function unitConversion(visualElement, target, origin, transitionEnd) {
return hasPositionalKey(target) ? checkAndConvertChangedValueTypes(visualElement, target, origin, transitionEnd) : {
target,
transitionEnd
};
}
/***/ }),
/***/ 392602:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ J: () => (/* binding */ getAnimatableNone)
/* harmony export */ });
/* harmony import */ var _value_types_complex_index_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(73748);
/* harmony import */ var _value_types_complex_filter_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(358986);
/* harmony import */ var _defaults_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(622157);
function getAnimatableNone(key, value) {
let defaultValueType = (0,_defaults_mjs__WEBPACK_IMPORTED_MODULE_2__/* .getDefaultValueType */ .D)(key);
if (defaultValueType !== _value_types_complex_filter_mjs__WEBPACK_IMPORTED_MODULE_1__/* .filter */ .p) defaultValueType = _value_types_complex_index_mjs__WEBPACK_IMPORTED_MODULE_0__/* .complex */ .f;
// If value is not recognised as animatable, ie "none", create an animatable version origin based on the target
return defaultValueType.getAnimatableNone ? defaultValueType.getAnimatableNone(value) : undefined;
}
/***/ }),
/***/ 622157:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ D: () => (/* binding */ getDefaultValueType)
/* harmony export */ });
/* unused harmony export defaultValueTypes */
/* harmony import */ var _value_types_color_index_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(449705);
/* harmony import */ var _value_types_complex_filter_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(358986);
/* harmony import */ var _number_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(823484);
/**
* A map of default value types for common values
*/
const defaultValueTypes = {
..._number_mjs__WEBPACK_IMPORTED_MODULE_2__/* .numberValueTypes */ .W,
// Color props
color: _value_types_color_index_mjs__WEBPACK_IMPORTED_MODULE_0__/* .color */ .y,
backgroundColor: _value_types_color_index_mjs__WEBPACK_IMPORTED_MODULE_0__/* .color */ .y,
outlineColor: _value_types_color_index_mjs__WEBPACK_IMPORTED_MODULE_0__/* .color */ .y,
fill: _value_types_color_index_mjs__WEBPACK_IMPORTED_MODULE_0__/* .color */ .y,
stroke: _value_types_color_index_mjs__WEBPACK_IMPORTED_MODULE_0__/* .color */ .y,
// Border props
borderColor: _value_types_color_index_mjs__WEBPACK_IMPORTED_MODULE_0__/* .color */ .y,
borderTopColor: _value_types_color_index_mjs__WEBPACK_IMPORTED_MODULE_0__/* .color */ .y,
borderRightColor: _value_types_color_index_mjs__WEBPACK_IMPORTED_MODULE_0__/* .color */ .y,
borderBottomColor: _value_types_color_index_mjs__WEBPACK_IMPORTED_MODULE_0__/* .color */ .y,
borderLeftColor: _value_types_color_index_mjs__WEBPACK_IMPORTED_MODULE_0__/* .color */ .y,
filter: _value_types_complex_filter_mjs__WEBPACK_IMPORTED_MODULE_1__/* .filter */ .p,
WebkitFilter: _value_types_complex_filter_mjs__WEBPACK_IMPORTED_MODULE_1__/* .filter */ .p
};
/**
* Gets the default ValueType for the provided value key
*/
const getDefaultValueType = key => defaultValueTypes[key];
/***/ }),
/***/ 809372:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ T: () => (/* binding */ dimensionValueTypes),
/* harmony export */ n: () => (/* binding */ findDimensionValueType)
/* harmony export */ });
/* harmony import */ var core_js_modules_esnext_iterator_constructor_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(314846);
/* harmony import */ var core_js_modules_esnext_iterator_find_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6211);
/* harmony import */ var _value_types_numbers_index_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(900478);
/* harmony import */ var _value_types_numbers_units_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(234223);
/* harmony import */ var _test_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(683991);
/* harmony import */ var _type_auto_mjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(891837);
/**
* A list of value types commonly used for dimensions
*/
const dimensionValueTypes = [_value_types_numbers_index_mjs__WEBPACK_IMPORTED_MODULE_2__/* .number */ .ai, _value_types_numbers_units_mjs__WEBPACK_IMPORTED_MODULE_3__.px, _value_types_numbers_units_mjs__WEBPACK_IMPORTED_MODULE_3__/* .percent */ .KN, _value_types_numbers_units_mjs__WEBPACK_IMPORTED_MODULE_3__/* .degrees */ .uj, _value_types_numbers_units_mjs__WEBPACK_IMPORTED_MODULE_3__.vw, _value_types_numbers_units_mjs__WEBPACK_IMPORTED_MODULE_3__.vh, _type_auto_mjs__WEBPACK_IMPORTED_MODULE_5__/* .auto */ .q];
/**
* Tests a dimensional value against the list of dimension ValueTypes
*/
const findDimensionValueType = v => dimensionValueTypes.find((0,_test_mjs__WEBPACK_IMPORTED_MODULE_4__/* .testValueType */ .w)(v));
/***/ }),
/***/ 429970:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ t: () => (/* binding */ findValueType)
/* harmony export */ });
/* harmony import */ var core_js_modules_esnext_iterator_constructor_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(314846);
/* harmony import */ var core_js_modules_esnext_iterator_find_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6211);
/* harmony import */ var _value_types_color_index_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(449705);
/* harmony import */ var _value_types_complex_index_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(73748);
/* harmony import */ var _dimensions_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(809372);
/* harmony import */ var _test_mjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(683991);
/**
* A list of all ValueTypes
*/
const valueTypes = [..._dimensions_mjs__WEBPACK_IMPORTED_MODULE_4__/* .dimensionValueTypes */ .T, _value_types_color_index_mjs__WEBPACK_IMPORTED_MODULE_2__/* .color */ .y, _value_types_complex_index_mjs__WEBPACK_IMPORTED_MODULE_3__/* .complex */ .f];
/**
* Tests a value against the list of ValueTypes
*/
const findValueType = v => valueTypes.find((0,_test_mjs__WEBPACK_IMPORTED_MODULE_5__/* .testValueType */ .w)(v));
/***/ }),
/***/ 704423:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ e: () => (/* binding */ getValueAsType)
/* harmony export */ });
/**
* Provided a value and a ValueType, returns the value as that value type.
*/
const getValueAsType = (value, type) => {
return type && typeof value === "number" ? type.transform(value) : value;
};
/***/ }),
/***/ 823484:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ W: () => (/* binding */ numberValueTypes)
/* harmony export */ });
/* harmony import */ var _value_types_numbers_index_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(900478);
/* harmony import */ var _value_types_numbers_units_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(234223);
/* harmony import */ var _type_int_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(455187);
const numberValueTypes = {
// Border props
borderWidth: _value_types_numbers_units_mjs__WEBPACK_IMPORTED_MODULE_1__.px,
borderTopWidth: _value_types_numbers_units_mjs__WEBPACK_IMPORTED_MODULE_1__.px,
borderRightWidth: _value_types_numbers_units_mjs__WEBPACK_IMPORTED_MODULE_1__.px,
borderBottomWidth: _value_types_numbers_units_mjs__WEBPACK_IMPORTED_MODULE_1__.px,
borderLeftWidth: _value_types_numbers_units_mjs__WEBPACK_IMPORTED_MODULE_1__.px,
borderRadius: _value_types_numbers_units_mjs__WEBPACK_IMPORTED_MODULE_1__.px,
radius: _value_types_numbers_units_mjs__WEBPACK_IMPORTED_MODULE_1__.px,
borderTopLeftRadius: _value_types_numbers_units_mjs__WEBPACK_IMPORTED_MODULE_1__.px,
borderTopRightRadius: _value_types_numbers_units_mjs__WEBPACK_IMPORTED_MODULE_1__.px,
borderBottomRightRadius: _value_types_numbers_units_mjs__WEBPACK_IMPORTED_MODULE_1__.px,
borderBottomLeftRadius: _value_types_numbers_units_mjs__WEBPACK_IMPORTED_MODULE_1__.px,
// Positioning props
width: _value_types_numbers_units_mjs__WEBPACK_IMPORTED_MODULE_1__.px,
maxWidth: _value_types_numbers_units_mjs__WEBPACK_IMPORTED_MODULE_1__.px,
height: _value_types_numbers_units_mjs__WEBPACK_IMPORTED_MODULE_1__.px,
maxHeight: _value_types_numbers_units_mjs__WEBPACK_IMPORTED_MODULE_1__.px,
size: _value_types_numbers_units_mjs__WEBPACK_IMPORTED_MODULE_1__.px,
top: _value_types_numbers_units_mjs__WEBPACK_IMPORTED_MODULE_1__.px,
right: _value_types_numbers_units_mjs__WEBPACK_IMPORTED_MODULE_1__.px,
bottom: _value_types_numbers_units_mjs__WEBPACK_IMPORTED_MODULE_1__.px,
left: _value_types_numbers_units_mjs__WEBPACK_IMPORTED_MODULE_1__.px,
// Spacing props
padding: _value_types_numbers_units_mjs__WEBPACK_IMPORTED_MODULE_1__.px,
paddingTop: _value_types_numbers_units_mjs__WEBPACK_IMPORTED_MODULE_1__.px,
paddingRight: _value_types_numbers_units_mjs__WEBPACK_IMPORTED_MODULE_1__.px,
paddingBottom: _value_types_numbers_units_mjs__WEBPACK_IMPORTED_MODULE_1__.px,
paddingLeft: _value_types_numbers_units_mjs__WEBPACK_IMPORTED_MODULE_1__.px,
margin: _value_types_numbers_units_mjs__WEBPACK_IMPORTED_MODULE_1__.px,
marginTop: _value_types_numbers_units_mjs__WEBPACK_IMPORTED_MODULE_1__.px,
marginRight: _value_types_numbers_units_mjs__WEBPACK_IMPORTED_MODULE_1__.px,
marginBottom: _value_types_numbers_units_mjs__WEBPACK_IMPORTED_MODULE_1__.px,
marginLeft: _value_types_numbers_units_mjs__WEBPACK_IMPORTED_MODULE_1__.px,
// Transform props
rotate: _value_types_numbers_units_mjs__WEBPACK_IMPORTED_MODULE_1__/* .degrees */ .uj,
rotateX: _value_types_numbers_units_mjs__WEBPACK_IMPORTED_MODULE_1__/* .degrees */ .uj,
rotateY: _value_types_numbers_units_mjs__WEBPACK_IMPORTED_MODULE_1__/* .degrees */ .uj,
rotateZ: _value_types_numbers_units_mjs__WEBPACK_IMPORTED_MODULE_1__/* .degrees */ .uj,
scale: _value_types_numbers_index_mjs__WEBPACK_IMPORTED_MODULE_0__/* .scale */ .hs,
scaleX: _value_types_numbers_index_mjs__WEBPACK_IMPORTED_MODULE_0__/* .scale */ .hs,
scaleY: _value_types_numbers_index_mjs__WEBPACK_IMPORTED_MODULE_0__/* .scale */ .hs,
scaleZ: _value_types_numbers_index_mjs__WEBPACK_IMPORTED_MODULE_0__/* .scale */ .hs,
skew: _value_types_numbers_units_mjs__WEBPACK_IMPORTED_MODULE_1__/* .degrees */ .uj,
skewX: _value_types_numbers_units_mjs__WEBPACK_IMPORTED_MODULE_1__/* .degrees */ .uj,
skewY: _value_types_numbers_units_mjs__WEBPACK_IMPORTED_MODULE_1__/* .degrees */ .uj,
distance: _value_types_numbers_units_mjs__WEBPACK_IMPORTED_MODULE_1__.px,
translateX: _value_types_numbers_units_mjs__WEBPACK_IMPORTED_MODULE_1__.px,
translateY: _value_types_numbers_units_mjs__WEBPACK_IMPORTED_MODULE_1__.px,
translateZ: _value_types_numbers_units_mjs__WEBPACK_IMPORTED_MODULE_1__.px,
x: _value_types_numbers_units_mjs__WEBPACK_IMPORTED_MODULE_1__.px,
y: _value_types_numbers_units_mjs__WEBPACK_IMPORTED_MODULE_1__.px,
z: _value_types_numbers_units_mjs__WEBPACK_IMPORTED_MODULE_1__.px,
perspective: _value_types_numbers_units_mjs__WEBPACK_IMPORTED_MODULE_1__.px,
transformPerspective: _value_types_numbers_units_mjs__WEBPACK_IMPORTED_MODULE_1__.px,
opacity: _value_types_numbers_index_mjs__WEBPACK_IMPORTED_MODULE_0__/* .alpha */ .X4,
originX: _value_types_numbers_units_mjs__WEBPACK_IMPORTED_MODULE_1__/* .progressPercentage */ .gQ,
originY: _value_types_numbers_units_mjs__WEBPACK_IMPORTED_MODULE_1__/* .progressPercentage */ .gQ,
originZ: _value_types_numbers_units_mjs__WEBPACK_IMPORTED_MODULE_1__.px,
// Misc
zIndex: _type_int_mjs__WEBPACK_IMPORTED_MODULE_2__/* .int */ .W,
// SVG
fillOpacity: _value_types_numbers_index_mjs__WEBPACK_IMPORTED_MODULE_0__/* .alpha */ .X4,
strokeOpacity: _value_types_numbers_index_mjs__WEBPACK_IMPORTED_MODULE_0__/* .alpha */ .X4,
numOctaves: _type_int_mjs__WEBPACK_IMPORTED_MODULE_2__/* .int */ .W
};
/***/ }),
/***/ 683991:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ w: () => (/* binding */ testValueType)
/* harmony export */ });
/**
* Tests a provided value against a ValueType
*/
const testValueType = v => type => type.test(v);
/***/ }),
/***/ 891837:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ q: () => (/* binding */ auto)
/* harmony export */ });
/**
* ValueType for "auto"
*/
const auto = {
test: v => v === "auto",
parse: v => v
};
/***/ }),
/***/ 455187:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ W: () => (/* binding */ int)
/* harmony export */ });
/* harmony import */ var _value_types_numbers_index_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(900478);
const int = {
..._value_types_numbers_index_mjs__WEBPACK_IMPORTED_MODULE_0__/* .number */ .ai,
transform: Math.round
};
/***/ }),
/***/ 438182:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* unused harmony export inView */
/* harmony import */ var core_js_modules_esnext_iterator_constructor_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(314846);
/* harmony import */ var core_js_modules_esnext_iterator_for_each_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(469655);
/* harmony import */ var _utils_resolve_element_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(801822);
const thresholds = {
some: 0,
all: 1
};
function inView(elementOrSelector, onStart, {
root,
margin: rootMargin,
amount = "some"
} = {}) {
const elements = resolveElements(elementOrSelector);
const activeIntersections = new WeakMap();
const onIntersectionChange = entries => {
entries.forEach(entry => {
const onEnd = activeIntersections.get(entry.target);
/**
* If there's no change to the intersection, we don't need to
* do anything here.
*/
if (entry.isIntersecting === Boolean(onEnd)) return;
if (entry.isIntersecting) {
const newOnEnd = onStart(entry);
if (typeof newOnEnd === "function") {
activeIntersections.set(entry.target, newOnEnd);
} else {
observer.unobserve(entry.target);
}
} else if (onEnd) {
onEnd(entry);
activeIntersections.delete(entry.target);
}
});
};
const observer = new IntersectionObserver(onIntersectionChange, {
root,
rootMargin,
threshold: typeof amount === "number" ? amount : thresholds[amount]
});
elements.forEach(element => observer.observe(element));
return () => observer.disconnect();
}
/***/ }),
/***/ 176617:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ M: () => (/* binding */ HTMLVisualElement)
/* harmony export */ });
/* unused harmony export getComputedStyle */
/* harmony import */ var _utils_build_styles_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(834109);
/* harmony import */ var _dom_utils_is_css_variable_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(511078);
/* harmony import */ var _utils_transform_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(353994);
/* harmony import */ var _utils_scrape_motion_values_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(962748);
/* harmony import */ var _utils_render_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(988838);
/* harmony import */ var _dom_value_types_defaults_mjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(622157);
/* harmony import */ var _projection_utils_measure_mjs__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(410347);
/* harmony import */ var _dom_DOMVisualElement_mjs__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(294901);
/* harmony import */ var _value_utils_is_motion_value_mjs__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(573970);
function getComputedStyle(element) {
return window.getComputedStyle(element);
}
class HTMLVisualElement extends _dom_DOMVisualElement_mjs__WEBPACK_IMPORTED_MODULE_7__/* .DOMVisualElement */ .b {
constructor() {
super(...arguments);
this.type = "html";
}
readValueFromInstance(instance, key) {
if (_utils_transform_mjs__WEBPACK_IMPORTED_MODULE_2__/* .transformProps */ .f.has(key)) {
const defaultType = (0,_dom_value_types_defaults_mjs__WEBPACK_IMPORTED_MODULE_5__/* .getDefaultValueType */ .D)(key);
return defaultType ? defaultType.default || 0 : 0;
} else {
const computedStyle = getComputedStyle(instance);
const value = ((0,_dom_utils_is_css_variable_mjs__WEBPACK_IMPORTED_MODULE_1__/* .isCSSVariableName */ .j4)(key) ? computedStyle.getPropertyValue(key) : computedStyle[key]) || 0;
return typeof value === "string" ? value.trim() : value;
}
}
measureInstanceViewportBox(instance, {
transformPagePoint
}) {
return (0,_projection_utils_measure_mjs__WEBPACK_IMPORTED_MODULE_6__/* .measureViewportBox */ .m)(instance, transformPagePoint);
}
build(renderState, latestValues, options, props) {
(0,_utils_build_styles_mjs__WEBPACK_IMPORTED_MODULE_0__/* .buildHTMLStyles */ .O)(renderState, latestValues, options, props.transformTemplate);
}
scrapeMotionValuesFromProps(props, prevProps) {
return (0,_utils_scrape_motion_values_mjs__WEBPACK_IMPORTED_MODULE_3__/* .scrapeMotionValuesFromProps */ .x)(props, prevProps);
}
handleChildMotionValue() {
if (this.childSubscription) {
this.childSubscription();
delete this.childSubscription;
}
const {
children
} = this.props;
if ((0,_value_utils_is_motion_value_mjs__WEBPACK_IMPORTED_MODULE_8__/* .isMotionValue */ .S)(children)) {
this.childSubscription = children.on("change", latest => {
if (this.current) this.current.textContent = `${latest}`;
});
}
}
renderInstance(instance, renderState, styleProp, projection) {
(0,_utils_render_mjs__WEBPACK_IMPORTED_MODULE_4__/* .renderHTML */ .e)(instance, renderState, styleProp, projection);
}
}
/***/ }),
/***/ 556029:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ S: () => (/* binding */ htmlMotionConfig)
/* harmony export */ });
/* harmony import */ var _motion_utils_use_visual_state_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(366084);
/* harmony import */ var _utils_scrape_motion_values_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(962748);
/* harmony import */ var _utils_create_render_state_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(884999);
const htmlMotionConfig = {
useVisualState: (0,_motion_utils_use_visual_state_mjs__WEBPACK_IMPORTED_MODULE_0__/* .makeUseVisualState */ .T)({
scrapeMotionValuesFromProps: _utils_scrape_motion_values_mjs__WEBPACK_IMPORTED_MODULE_1__/* .scrapeMotionValuesFromProps */ .x,
createRenderState: _utils_create_render_state_mjs__WEBPACK_IMPORTED_MODULE_2__/* .createHtmlRenderState */ .d
})
};
/***/ }),
/***/ 320012:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ b: () => (/* binding */ useHTMLProps),
/* harmony export */ o: () => (/* binding */ copyRawValuesOnly)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(63696);
/* harmony import */ var _motion_utils_is_forced_motion_value_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(822047);
/* harmony import */ var _value_utils_is_motion_value_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(573970);
/* harmony import */ var _utils_build_styles_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(834109);
/* harmony import */ var _utils_create_render_state_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(884999);
function copyRawValuesOnly(target, source, props) {
for (const key in source) {
if (!(0,_value_utils_is_motion_value_mjs__WEBPACK_IMPORTED_MODULE_2__/* .isMotionValue */ .S)(source[key]) && !(0,_motion_utils_is_forced_motion_value_mjs__WEBPACK_IMPORTED_MODULE_1__/* .isForcedMotionValue */ .z)(key, props)) {
target[key] = source[key];
}
}
}
function useInitialMotionValues({
transformTemplate
}, visualState, isStatic) {
return (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(() => {
const state = (0,_utils_create_render_state_mjs__WEBPACK_IMPORTED_MODULE_4__/* .createHtmlRenderState */ .d)();
(0,_utils_build_styles_mjs__WEBPACK_IMPORTED_MODULE_3__/* .buildHTMLStyles */ .O)(state, visualState, {
enableHardwareAcceleration: !isStatic
}, transformTemplate);
return Object.assign({}, state.vars, state.style);
}, [visualState]);
}
function useStyle(props, visualState, isStatic) {
const styleProp = props.style || {};
const style = {};
/**
* Copy non-Motion Values straight into style
*/
copyRawValuesOnly(style, styleProp, props);
Object.assign(style, useInitialMotionValues(props, visualState, isStatic));
return props.transformValues ? props.transformValues(style) : style;
}
function useHTMLProps(props, visualState, isStatic) {
// The `any` isn't ideal but it is the type of createElement props argument
const htmlProps = {};
const style = useStyle(props, visualState, isStatic);
if (props.drag && props.dragListener !== false) {
// Disable the ghost element when a user drags
htmlProps.draggable = false;
// Disable text selection
style.userSelect = style.WebkitUserSelect = style.WebkitTouchCallout = "none";
// Disable scrolling on the draggable direction
style.touchAction = props.drag === true ? "none" : `pan-${props.drag === "x" ? "y" : "x"}`;
}
if (props.tabIndex === undefined && (props.onTap || props.onTapStart || props.whileTap)) {
htmlProps.tabIndex = 0;
}
htmlProps.style = style;
return htmlProps;
}
/***/ }),
/***/ 834109:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ O: () => (/* binding */ buildHTMLStyles)
/* harmony export */ });
/* harmony import */ var _build_transform_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(52565);
/* harmony import */ var _dom_utils_is_css_variable_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(511078);
/* harmony import */ var _transform_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(353994);
/* harmony import */ var _dom_value_types_get_as_type_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(704423);
/* harmony import */ var _dom_value_types_number_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(823484);
function buildHTMLStyles(state, latestValues, options, transformTemplate) {
const {
style,
vars,
transform,
transformOrigin
} = state;
// Track whether we encounter any transform or transformOrigin values.
let hasTransform = false;
let hasTransformOrigin = false;
// Does the calculated transform essentially equal "none"?
let transformIsNone = true;
/**
* Loop over all our latest animated values and decide whether to handle them
* as a style or CSS variable.
*
* Transforms and transform origins are kept seperately for further processing.
*/
for (const key in latestValues) {
const value = latestValues[key];
/**
* If this is a CSS variable we don't do any further processing.
*/
if ((0,_dom_utils_is_css_variable_mjs__WEBPACK_IMPORTED_MODULE_1__/* .isCSSVariableName */ .j4)(key)) {
vars[key] = value;
continue;
}
// Convert the value to its default value type, ie 0 -> "0px"
const valueType = _dom_value_types_number_mjs__WEBPACK_IMPORTED_MODULE_4__/* .numberValueTypes */ .W[key];
const valueAsType = (0,_dom_value_types_get_as_type_mjs__WEBPACK_IMPORTED_MODULE_3__/* .getValueAsType */ .e)(value, valueType);
if (_transform_mjs__WEBPACK_IMPORTED_MODULE_2__/* .transformProps */ .f.has(key)) {
// If this is a transform, flag to enable further transform processing
hasTransform = true;
transform[key] = valueAsType;
// If we already know we have a non-default transform, early return
if (!transformIsNone) continue;
// Otherwise check to see if this is a default transform
if (value !== (valueType.default || 0)) transformIsNone = false;
} else if (key.startsWith("origin")) {
// If this is a transform origin, flag and enable further transform-origin processing
hasTransformOrigin = true;
transformOrigin[key] = valueAsType;
} else {
style[key] = valueAsType;
}
}
if (!latestValues.transform) {
if (hasTransform || transformTemplate) {
style.transform = (0,_build_transform_mjs__WEBPACK_IMPORTED_MODULE_0__/* .buildTransform */ .d)(state.transform, options, transformIsNone, transformTemplate);
} else if (style.transform) {
/**
* If we have previously created a transform but currently don't have any,
* reset transform style to none.
*/
style.transform = "none";
}
}
/**
* Build a transformOrigin style. Uses the same defaults as the browser for
* undefined origins.
*/
if (hasTransformOrigin) {
const {
originX = "50%",
originY = "50%",
originZ = 0
} = transformOrigin;
style.transformOrigin = `${originX} ${originY} ${originZ}`;
}
}
/***/ }),
/***/ 52565:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ d: () => (/* binding */ buildTransform)
/* harmony export */ });
/* harmony import */ var _transform_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(353994);
const translateAlias = {
x: "translateX",
y: "translateY",
z: "translateZ",
transformPerspective: "perspective"
};
const numTransforms = _transform_mjs__WEBPACK_IMPORTED_MODULE_0__/* .transformPropOrder */ .U.length;
/**
* Build a CSS transform style from individual x/y/scale etc properties.
*
* This outputs with a default order of transforms/scales/rotations, this can be customised by
* providing a transformTemplate function.
*/
function buildTransform(transform, {
enableHardwareAcceleration = true,
allowTransformNone = true
}, transformIsDefault, transformTemplate) {
// The transform string we're going to build into.
let transformString = "";
/**
* Loop over all possible transforms in order, adding the ones that
* are present to the transform string.
*/
for (let i = 0; i < numTransforms; i++) {
const key = _transform_mjs__WEBPACK_IMPORTED_MODULE_0__/* .transformPropOrder */ .U[i];
if (transform[key] !== undefined) {
const transformName = translateAlias[key] || key;
transformString += `${transformName}(${transform[key]}) `;
}
}
if (enableHardwareAcceleration && !transform.z) {
transformString += "translateZ(0)";
}
transformString = transformString.trim();
// If we have a custom `transform` template, pass our transform values and
// generated transformString to that before returning
if (transformTemplate) {
transformString = transformTemplate(transform, transformIsDefault ? "" : transformString);
} else if (allowTransformNone && transformIsDefault) {
transformString = "none";
}
return transformString;
}
/***/ }),
/***/ 884999:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ d: () => (/* binding */ createHtmlRenderState)
/* harmony export */ });
const createHtmlRenderState = () => ({
style: {},
transform: {},
transformOrigin: {},
vars: {}
});
/***/ }),
/***/ 988838:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ e: () => (/* binding */ renderHTML)
/* harmony export */ });
function renderHTML(element, {
style,
vars
}, styleProp, projection) {
Object.assign(element.style, style, projection && projection.getProjectionStyles(styleProp));
// Loop over any CSS variables and assign those.
for (const key in vars) {
element.style.setProperty(key, vars[key]);
}
}
/***/ }),
/***/ 962748:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ x: () => (/* binding */ scrapeMotionValuesFromProps)
/* harmony export */ });
/* harmony import */ var _motion_utils_is_forced_motion_value_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(822047);
/* harmony import */ var _value_utils_is_motion_value_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(573970);
function scrapeMotionValuesFromProps(props, prevProps) {
const {
style
} = props;
const newValues = {};
for (const key in style) {
if ((0,_value_utils_is_motion_value_mjs__WEBPACK_IMPORTED_MODULE_1__/* .isMotionValue */ .S)(style[key]) || prevProps.style && (0,_value_utils_is_motion_value_mjs__WEBPACK_IMPORTED_MODULE_1__/* .isMotionValue */ .S)(prevProps.style[key]) || (0,_motion_utils_is_forced_motion_value_mjs__WEBPACK_IMPORTED_MODULE_0__/* .isForcedMotionValue */ .z)(key, props)) {
newValues[key] = style[key];
}
}
return newValues;
}
/***/ }),
/***/ 353994:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ U: () => (/* binding */ transformPropOrder),
/* harmony export */ f: () => (/* binding */ transformProps)
/* harmony export */ });
/**
* Generate a list of every possible transform key.
*/
const transformPropOrder = ["transformPerspective", "x", "y", "z", "translateX", "translateY", "translateZ", "scale", "scaleX", "scaleY", "rotate", "rotateX", "rotateY", "rotateZ", "skew", "skewX", "skewY"];
/**
* A quick lookup for transform props.
*/
const transformProps = new Set(transformPropOrder);
/***/ }),
/***/ 550529:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ C: () => (/* binding */ visualElementStore)
/* harmony export */ });
const visualElementStore = new WeakMap();
/***/ }),
/***/ 541109:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ l: () => (/* binding */ SVGVisualElement)
/* harmony export */ });
/* harmony import */ var _utils_scrape_motion_values_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(906655);
/* harmony import */ var _dom_DOMVisualElement_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(294901);
/* harmony import */ var _utils_build_attrs_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(955012);
/* harmony import */ var _dom_utils_camel_to_dash_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(493388);
/* harmony import */ var _utils_camel_case_attrs_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(497505);
/* harmony import */ var _html_utils_transform_mjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(353994);
/* harmony import */ var _utils_render_mjs__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(885305);
/* harmony import */ var _dom_value_types_defaults_mjs__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(622157);
/* harmony import */ var _projection_geometry_models_mjs__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(298944);
/* harmony import */ var _utils_is_svg_tag_mjs__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(130339);
class SVGVisualElement extends _dom_DOMVisualElement_mjs__WEBPACK_IMPORTED_MODULE_1__/* .DOMVisualElement */ .b {
constructor() {
super(...arguments);
this.type = "svg";
this.isSVGTag = false;
}
getBaseTargetFromProps(props, key) {
return props[key];
}
readValueFromInstance(instance, key) {
if (_html_utils_transform_mjs__WEBPACK_IMPORTED_MODULE_5__/* .transformProps */ .f.has(key)) {
const defaultType = (0,_dom_value_types_defaults_mjs__WEBPACK_IMPORTED_MODULE_7__/* .getDefaultValueType */ .D)(key);
return defaultType ? defaultType.default || 0 : 0;
}
key = !_utils_camel_case_attrs_mjs__WEBPACK_IMPORTED_MODULE_4__/* .camelCaseAttributes */ .e.has(key) ? (0,_dom_utils_camel_to_dash_mjs__WEBPACK_IMPORTED_MODULE_3__/* .camelToDash */ .I)(key) : key;
return instance.getAttribute(key);
}
measureInstanceViewportBox() {
return (0,_projection_geometry_models_mjs__WEBPACK_IMPORTED_MODULE_8__/* .createBox */ .ge)();
}
scrapeMotionValuesFromProps(props, prevProps) {
return (0,_utils_scrape_motion_values_mjs__WEBPACK_IMPORTED_MODULE_0__/* .scrapeMotionValuesFromProps */ .x)(props, prevProps);
}
build(renderState, latestValues, options, props) {
(0,_utils_build_attrs_mjs__WEBPACK_IMPORTED_MODULE_2__/* .buildSVGAttrs */ .B)(renderState, latestValues, options, this.isSVGTag, props.transformTemplate);
}
renderInstance(instance, renderState, styleProp, projection) {
(0,_utils_render_mjs__WEBPACK_IMPORTED_MODULE_6__/* .renderSVG */ .d)(instance, renderState, styleProp, projection);
}
mount(instance) {
this.isSVGTag = (0,_utils_is_svg_tag_mjs__WEBPACK_IMPORTED_MODULE_9__/* .isSVGTag */ .n)(instance.tagName);
super.mount(instance);
}
}
/***/ }),
/***/ 935856:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ X: () => (/* binding */ svgMotionConfig)
/* harmony export */ });
/* harmony import */ var _utils_render_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(885305);
/* harmony import */ var _utils_scrape_motion_values_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(906655);
/* harmony import */ var _motion_utils_use_visual_state_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(366084);
/* harmony import */ var _utils_create_render_state_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(361590);
/* harmony import */ var _utils_build_attrs_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(955012);
/* harmony import */ var _utils_is_svg_tag_mjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(130339);
/* harmony import */ var _frameloop_frame_mjs__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(277210);
const svgMotionConfig = {
useVisualState: (0,_motion_utils_use_visual_state_mjs__WEBPACK_IMPORTED_MODULE_2__/* .makeUseVisualState */ .T)({
scrapeMotionValuesFromProps: _utils_scrape_motion_values_mjs__WEBPACK_IMPORTED_MODULE_1__/* .scrapeMotionValuesFromProps */ .x,
createRenderState: _utils_create_render_state_mjs__WEBPACK_IMPORTED_MODULE_3__/* .createSvgRenderState */ .s,
onMount: (props, instance, {
renderState,
latestValues
}) => {
_frameloop_frame_mjs__WEBPACK_IMPORTED_MODULE_6__/* .frame */ .Gt.read(() => {
try {
renderState.dimensions = typeof instance.getBBox === "function" ? instance.getBBox() : instance.getBoundingClientRect();
} catch (e) {
// Most likely trying to measure an unrendered element under Firefox
renderState.dimensions = {
x: 0,
y: 0,
width: 0,
height: 0
};
}
});
_frameloop_frame_mjs__WEBPACK_IMPORTED_MODULE_6__/* .frame */ .Gt.render(() => {
(0,_utils_build_attrs_mjs__WEBPACK_IMPORTED_MODULE_4__/* .buildSVGAttrs */ .B)(renderState, latestValues, {
enableHardwareAcceleration: false
}, (0,_utils_is_svg_tag_mjs__WEBPACK_IMPORTED_MODULE_5__/* .isSVGTag */ .n)(instance.tagName), props.transformTemplate);
(0,_utils_render_mjs__WEBPACK_IMPORTED_MODULE_0__/* .renderSVG */ .d)(instance, renderState);
});
}
})
};
/***/ }),
/***/ 505324:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ J: () => (/* binding */ lowercaseSVGElements)
/* harmony export */ });
/**
* We keep these listed seperately as we use the lowercase tag names as part
* of the runtime bundle to detect SVG components
*/
const lowercaseSVGElements = ["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"];
/***/ }),
/***/ 30233:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ u: () => (/* binding */ useSVGProps)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(63696);
/* harmony import */ var _html_use_props_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(320012);
/* harmony import */ var _utils_build_attrs_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(955012);
/* harmony import */ var _utils_create_render_state_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(361590);
/* harmony import */ var _utils_is_svg_tag_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(130339);
function useSVGProps(props, visualState, _isStatic, Component) {
const visualProps = (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(() => {
const state = (0,_utils_create_render_state_mjs__WEBPACK_IMPORTED_MODULE_3__/* .createSvgRenderState */ .s)();
(0,_utils_build_attrs_mjs__WEBPACK_IMPORTED_MODULE_2__/* .buildSVGAttrs */ .B)(state, visualState, {
enableHardwareAcceleration: false
}, (0,_utils_is_svg_tag_mjs__WEBPACK_IMPORTED_MODULE_4__/* .isSVGTag */ .n)(Component), props.transformTemplate);
return {
...state.attrs,
style: {
...state.style
}
};
}, [visualState]);
if (props.style) {
const rawStyles = {};
(0,_html_use_props_mjs__WEBPACK_IMPORTED_MODULE_1__/* .copyRawValuesOnly */ .o)(rawStyles, props.style, props);
visualProps.style = {
...rawStyles,
...visualProps.style
};
}
return visualProps;
}
/***/ }),
/***/ 955012:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ B: () => (/* binding */ buildSVGAttrs)
/* harmony export */ });
/* harmony import */ var _html_utils_build_styles_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(834109);
/* harmony import */ var _transform_origin_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(871770);
/* harmony import */ var _path_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(471516);
/**
* Build SVG visual attrbutes, like cx and style.transform
*/
function buildSVGAttrs(state, {
attrX,
attrY,
attrScale,
originX,
originY,
pathLength,
pathSpacing = 1,
pathOffset = 0,
// This is object creation, which we try to avoid per-frame.
...latest
}, options, isSVGTag, transformTemplate) {
(0,_html_utils_build_styles_mjs__WEBPACK_IMPORTED_MODULE_0__/* .buildHTMLStyles */ .O)(state, latest, options, transformTemplate);
/**
* For svg tags we just want to make sure viewBox is animatable and treat all the styles
* as normal HTML tags.
*/
if (isSVGTag) {
if (state.style.viewBox) {
state.attrs.viewBox = state.style.viewBox;
}
return;
}
state.attrs = state.style;
state.style = {};
const {
attrs,
style,
dimensions
} = state;
/**
* However, we apply transforms as CSS transforms. So if we detect a transform we take it from attrs
* and copy it into style.
*/
if (attrs.transform) {
if (dimensions) style.transform = attrs.transform;
delete attrs.transform;
}
// Parse transformOrigin
if (dimensions && (originX !== undefined || originY !== undefined || style.transform)) {
style.transformOrigin = (0,_transform_origin_mjs__WEBPACK_IMPORTED_MODULE_1__/* .calcSVGTransformOrigin */ .w)(dimensions, originX !== undefined ? originX : 0.5, originY !== undefined ? originY : 0.5);
}
// Render attrX/attrY/attrScale as attributes
if (attrX !== undefined) attrs.x = attrX;
if (attrY !== undefined) attrs.y = attrY;
if (attrScale !== undefined) attrs.scale = attrScale;
// Build SVG path if one has been defined
if (pathLength !== undefined) {
(0,_path_mjs__WEBPACK_IMPORTED_MODULE_2__/* .buildSVGPath */ .C)(attrs, pathLength, pathSpacing, pathOffset, false);
}
}
/***/ }),
/***/ 497505:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ e: () => (/* binding */ camelCaseAttributes)
/* harmony export */ });
/**
* A set of attribute names that are always read/written as camel case.
*/
const camelCaseAttributes = 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"]);
/***/ }),
/***/ 361590:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ s: () => (/* binding */ createSvgRenderState)
/* harmony export */ });
/* harmony import */ var _html_utils_create_render_state_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(884999);
const createSvgRenderState = () => ({
...(0,_html_utils_create_render_state_mjs__WEBPACK_IMPORTED_MODULE_0__/* .createHtmlRenderState */ .d)(),
attrs: {}
});
/***/ }),
/***/ 130339:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ n: () => (/* binding */ isSVGTag)
/* harmony export */ });
const isSVGTag = tag => typeof tag === "string" && tag.toLowerCase() === "svg";
/***/ }),
/***/ 471516:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ C: () => (/* binding */ buildSVGPath)
/* harmony export */ });
/* harmony import */ var _value_types_numbers_units_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(234223);
const dashKeys = {
offset: "stroke-dashoffset",
array: "stroke-dasharray"
};
const camelKeys = {
offset: "strokeDashoffset",
array: "strokeDasharray"
};
/**
* Build SVG path properties. Uses the path's measured length to convert
* our custom pathLength, pathSpacing and pathOffset into stroke-dashoffset
* and stroke-dasharray attributes.
*
* This function is mutative to reduce per-frame GC.
*/
function buildSVGPath(attrs, length, spacing = 1, offset = 0, useDashCase = true) {
// Normalise path length by setting SVG attribute pathLength to 1
attrs.pathLength = 1;
// We use dash case when setting attributes directly to the DOM node and camel case
// when defining props on a React component.
const keys = useDashCase ? dashKeys : camelKeys;
// Build the dash offset
attrs[keys.offset] = _value_types_numbers_units_mjs__WEBPACK_IMPORTED_MODULE_0__.px.transform(-offset);
// Build the dash array
const pathLength = _value_types_numbers_units_mjs__WEBPACK_IMPORTED_MODULE_0__.px.transform(length);
const pathSpacing = _value_types_numbers_units_mjs__WEBPACK_IMPORTED_MODULE_0__.px.transform(spacing);
attrs[keys.array] = `${pathLength} ${pathSpacing}`;
}
/***/ }),
/***/ 885305:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ d: () => (/* binding */ renderSVG)
/* harmony export */ });
/* harmony import */ var _dom_utils_camel_to_dash_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(493388);
/* harmony import */ var _html_utils_render_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(988838);
/* harmony import */ var _camel_case_attrs_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(497505);
function renderSVG(element, renderState, _styleProp, projection) {
(0,_html_utils_render_mjs__WEBPACK_IMPORTED_MODULE_1__/* .renderHTML */ .e)(element, renderState, undefined, projection);
for (const key in renderState.attrs) {
element.setAttribute(!_camel_case_attrs_mjs__WEBPACK_IMPORTED_MODULE_2__/* .camelCaseAttributes */ .e.has(key) ? (0,_dom_utils_camel_to_dash_mjs__WEBPACK_IMPORTED_MODULE_0__/* .camelToDash */ .I)(key) : key, renderState.attrs[key]);
}
}
/***/ }),
/***/ 906655:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ x: () => (/* binding */ scrapeMotionValuesFromProps)
/* harmony export */ });
/* harmony import */ var _value_utils_is_motion_value_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(573970);
/* harmony import */ var _html_utils_scrape_motion_values_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(962748);
/* harmony import */ var _html_utils_transform_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(353994);
function scrapeMotionValuesFromProps(props, prevProps) {
const newValues = (0,_html_utils_scrape_motion_values_mjs__WEBPACK_IMPORTED_MODULE_1__/* .scrapeMotionValuesFromProps */ .x)(props, prevProps);
for (const key in props) {
if ((0,_value_utils_is_motion_value_mjs__WEBPACK_IMPORTED_MODULE_0__/* .isMotionValue */ .S)(props[key]) || (0,_value_utils_is_motion_value_mjs__WEBPACK_IMPORTED_MODULE_0__/* .isMotionValue */ .S)(prevProps[key])) {
const targetKey = _html_utils_transform_mjs__WEBPACK_IMPORTED_MODULE_2__/* .transformPropOrder */ .U.indexOf(key) !== -1 ? "attr" + key.charAt(0).toUpperCase() + key.substring(1) : key;
newValues[targetKey] = props[key];
}
}
return newValues;
}
/***/ }),
/***/ 871770:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ w: () => (/* binding */ calcSVGTransformOrigin)
/* harmony export */ });
/* harmony import */ var _value_types_numbers_units_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(234223);
function calcOrigin(origin, offset, size) {
return typeof origin === "string" ? origin : _value_types_numbers_units_mjs__WEBPACK_IMPORTED_MODULE_0__.px.transform(offset + size * origin);
}
/**
* The SVG transform origin defaults are different to CSS and is less intuitive,
* so we use the measured dimensions of the SVG to reconcile these.
*/
function calcSVGTransformOrigin(dimensions, originX, originY) {
const pxOriginX = calcOrigin(originX, dimensions.x, dimensions.width);
const pxOriginY = calcOrigin(originY, dimensions.y, dimensions.height);
return `${pxOriginX} ${pxOriginY}`;
}
/***/ }),
/***/ 316558:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ L: () => (/* binding */ createAnimationState)
/* harmony export */ });
/* unused harmony export checkVariantsDidChange */
/* harmony import */ var core_js_modules_esnext_iterator_constructor_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(314846);
/* harmony import */ var core_js_modules_esnext_iterator_for_each_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(469655);
/* harmony import */ var core_js_modules_esnext_iterator_map_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(194364);
/* harmony import */ var core_js_modules_esnext_iterator_reduce_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(190458);
/* harmony import */ var _animation_utils_is_animation_controls_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(892904);
/* harmony import */ var _animation_utils_is_keyframes_target_mjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(343690);
/* harmony import */ var _utils_shallow_compare_mjs__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(223605);
/* harmony import */ var _is_variant_label_mjs__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(563305);
/* harmony import */ var _resolve_dynamic_variants_mjs__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(683695);
/* harmony import */ var _variant_props_mjs__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(422918);
/* harmony import */ var _animation_interfaces_visual_element_mjs__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(104570);
const reversePriorityOrder = [..._variant_props_mjs__WEBPACK_IMPORTED_MODULE_9__/* .variantPriorityOrder */ .U].reverse();
const numAnimationTypes = _variant_props_mjs__WEBPACK_IMPORTED_MODULE_9__/* .variantPriorityOrder */ .U.length;
function animateList(visualElement) {
return animations => Promise.all(animations.map(({
animation,
options
}) => (0,_animation_interfaces_visual_element_mjs__WEBPACK_IMPORTED_MODULE_10__/* .animateVisualElement */ ._)(visualElement, animation, options)));
}
function createAnimationState(visualElement) {
let animate = animateList(visualElement);
const state = createState();
let isInitialRender = true;
/**
* This function will be used to reduce the animation definitions for
* each active animation type into an object of resolved values for it.
*/
const buildResolvedTypeValues = (acc, definition) => {
const resolved = (0,_resolve_dynamic_variants_mjs__WEBPACK_IMPORTED_MODULE_8__/* .resolveVariant */ .K)(visualElement, definition);
if (resolved) {
const {
transition,
transitionEnd,
...target
} = resolved;
acc = {
...acc,
...target,
...transitionEnd
};
}
return acc;
};
/**
* This just allows us to inject mocked animation functions
* @internal
*/
function setAnimateFunction(makeAnimator) {
animate = makeAnimator(visualElement);
}
/**
* When we receive new props, we need to:
* 1. Create a list of protected keys for each type. This is a directory of
* value keys that are currently being "handled" by types of a higher priority
* so that whenever an animation is played of a given type, these values are
* protected from being animated.
* 2. Determine if an animation type needs animating.
* 3. Determine if any values have been removed from a type and figure out
* what to animate those to.
*/
function animateChanges(options, changedActiveType) {
const props = visualElement.getProps();
const context = visualElement.getVariantContext(true) || {};
/**
* A list of animations that we'll build into as we iterate through the animation
* types. This will get executed at the end of the function.
*/
const animations = [];
/**
* Keep track of which values have been removed. Then, as we hit lower priority
* animation types, we can check if they contain removed values and animate to that.
*/
const removedKeys = new Set();
/**
* A dictionary of all encountered keys. This is an object to let us build into and
* copy it without iteration. Each time we hit an animation type we set its protected
* keys - the keys its not allowed to animate - to the latest version of this object.
*/
let encounteredKeys = {};
/**
* If a variant has been removed at a given index, and this component is controlling
* variant animations, we want to ensure lower-priority variants are forced to animate.
*/
let removedVariantIndex = Infinity;
/**
* Iterate through all animation types in reverse priority order. For each, we want to
* detect which values it's handling and whether or not they've changed (and therefore
* need to be animated). If any values have been removed, we want to detect those in
* lower priority props and flag for animation.
*/
for (let i = 0; i < numAnimationTypes; i++) {
const type = reversePriorityOrder[i];
const typeState = state[type];
const prop = props[type] !== undefined ? props[type] : context[type];
const propIsVariant = (0,_is_variant_label_mjs__WEBPACK_IMPORTED_MODULE_7__/* .isVariantLabel */ .w)(prop);
/**
* If this type has *just* changed isActive status, set activeDelta
* to that status. Otherwise set to null.
*/
const activeDelta = type === changedActiveType ? typeState.isActive : null;
if (activeDelta === false) removedVariantIndex = i;
/**
* If this prop is an inherited variant, rather than been set directly on the
* component itself, we want to make sure we allow the parent to trigger animations.
*
* TODO: Can probably change this to a !isControllingVariants check
*/
let isInherited = prop === context[type] && prop !== props[type] && propIsVariant;
/**
*
*/
if (isInherited && isInitialRender && visualElement.manuallyAnimateOnMount) {
isInherited = false;
}
/**
* Set all encountered keys so far as the protected keys for this type. This will
* be any key that has been animated or otherwise handled by active, higher-priortiy types.
*/
typeState.protectedKeys = {
...encounteredKeys
};
// Check if we can skip analysing this prop early
if (
// If it isn't active and hasn't *just* been set as inactive
!typeState.isActive && activeDelta === null ||
// If we didn't and don't have any defined prop for this animation type
!prop && !typeState.prevProp ||
// Or if the prop doesn't define an animation
(0,_animation_utils_is_animation_controls_mjs__WEBPACK_IMPORTED_MODULE_4__/* .isAnimationControls */ .N)(prop) || typeof prop === "boolean") {
continue;
}
/**
* As we go look through the values defined on this type, if we detect
* a changed value or a value that was removed in a higher priority, we set
* this to true and add this prop to the animation list.
*/
const variantDidChange = checkVariantsDidChange(typeState.prevProp, prop);
let shouldAnimateType = variantDidChange ||
// If we're making this variant active, we want to always make it active
type === changedActiveType && typeState.isActive && !isInherited && propIsVariant ||
// If we removed a higher-priority variant (i is in reverse order)
i > removedVariantIndex && propIsVariant;
let handledRemovedValues = false;
/**
* As animations can be set as variant lists, variants or target objects, we
* coerce everything to an array if it isn't one already
*/
const definitionList = Array.isArray(prop) ? prop : [prop];
/**
* Build an object of all the resolved values. We'll use this in the subsequent
* animateChanges calls to determine whether a value has changed.
*/
let resolvedValues = definitionList.reduce(buildResolvedTypeValues, {});
if (activeDelta === false) resolvedValues = {};
/**
* Now we need to loop through all the keys in the prev prop and this prop,
* and decide:
* 1. If the value has changed, and needs animating
* 2. If it has been removed, and needs adding to the removedKeys set
* 3. If it has been removed in a higher priority type and needs animating
* 4. If it hasn't been removed in a higher priority but hasn't changed, and
* needs adding to the type's protectedKeys list.
*/
const {
prevResolvedValues = {}
} = typeState;
const allKeys = {
...prevResolvedValues,
...resolvedValues
};
const markToAnimate = key => {
shouldAnimateType = true;
if (removedKeys.has(key)) {
handledRemovedValues = true;
removedKeys.delete(key);
}
typeState.needsAnimating[key] = true;
};
for (const key in allKeys) {
const next = resolvedValues[key];
const prev = prevResolvedValues[key];
// If we've already handled this we can just skip ahead
if (encounteredKeys.hasOwnProperty(key)) continue;
/**
* If the value has changed, we probably want to animate it.
*/
let valueHasChanged = false;
if ((0,_animation_utils_is_keyframes_target_mjs__WEBPACK_IMPORTED_MODULE_5__/* .isKeyframesTarget */ .p)(next) && (0,_animation_utils_is_keyframes_target_mjs__WEBPACK_IMPORTED_MODULE_5__/* .isKeyframesTarget */ .p)(prev)) {
valueHasChanged = !(0,_utils_shallow_compare_mjs__WEBPACK_IMPORTED_MODULE_6__/* .shallowCompare */ .a)(next, prev);
} else {
valueHasChanged = next !== prev;
}
if (valueHasChanged) {
if (next !== undefined) {
// If next is defined and doesn't equal prev, it needs animating
markToAnimate(key);
} else {
// If it's undefined, it's been removed.
removedKeys.add(key);
}
} else if (next !== undefined && removedKeys.has(key)) {
/**
* If next hasn't changed and it isn't undefined, we want to check if it's
* been removed by a higher priority
*/
markToAnimate(key);
} else {
/**
* If it hasn't changed, we add it to the list of protected values
* to ensure it doesn't get animated.
*/
typeState.protectedKeys[key] = true;
}
}
/**
* Update the typeState so next time animateChanges is called we can compare the
* latest prop and resolvedValues to these.
*/
typeState.prevProp = prop;
typeState.prevResolvedValues = resolvedValues;
/**
*
*/
if (typeState.isActive) {
encounteredKeys = {
...encounteredKeys,
...resolvedValues
};
}
if (isInitialRender && visualElement.blockInitialAnimation) {
shouldAnimateType = false;
}
/**
* If this is an inherited prop we want to hard-block animations
*/
if (shouldAnimateType && (!isInherited || handledRemovedValues)) {
animations.push(...definitionList.map(animation => ({
animation: animation,
options: {
type,
...options
}
})));
}
}
/**
* If there are some removed value that haven't been dealt with,
* we need to create a new animation that falls back either to the value
* defined in the style prop, or the last read value.
*/
if (removedKeys.size) {
const fallbackAnimation = {};
removedKeys.forEach(key => {
const fallbackTarget = visualElement.getBaseTarget(key);
if (fallbackTarget !== undefined) {
fallbackAnimation[key] = fallbackTarget;
}
});
animations.push({
animation: fallbackAnimation
});
}
let shouldAnimate = Boolean(animations.length);
if (isInitialRender && (props.initial === false || props.initial === props.animate) && !visualElement.manuallyAnimateOnMount) {
shouldAnimate = false;
}
isInitialRender = false;
return shouldAnimate ? animate(animations) : Promise.resolve();
}
/**
* Change whether a certain animation type is active.
*/
function setActive(type, isActive, options) {
var _a;
// If the active state hasn't changed, we can safely do nothing here
if (state[type].isActive === isActive) return Promise.resolve();
// Propagate active change to children
(_a = visualElement.variantChildren) === null || _a === void 0 ? void 0 : _a.forEach(child => {
var _a;
return (_a = child.animationState) === null || _a === void 0 ? void 0 : _a.setActive(type, isActive);
});
state[type].isActive = isActive;
const animations = animateChanges(options, type);
for (const key in state) {
state[key].protectedKeys = {};
}
return animations;
}
return {
animateChanges,
setActive,
setAnimateFunction,
getState: () => state
};
}
function checkVariantsDidChange(prev, next) {
if (typeof next === "string") {
return next !== prev;
} else if (Array.isArray(next)) {
return !(0,_utils_shallow_compare_mjs__WEBPACK_IMPORTED_MODULE_6__/* .shallowCompare */ .a)(next, prev);
}
return false;
}
function createTypeState(isActive = false) {
return {
isActive,
protectedKeys: {},
needsAnimating: {},
prevResolvedValues: {}
};
}
function createState() {
return {
animate: createTypeState(true),
whileInView: createTypeState(),
whileHover: createTypeState(),
whileTap: createTypeState(),
whileDrag: createTypeState(),
whileFocus: createTypeState(),
exit: createTypeState()
};
}
/***/ }),
/***/ 110877:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ u: () => (/* binding */ compareByDepth)
/* harmony export */ });
const compareByDepth = (a, b) => a.depth - b.depth;
/***/ }),
/***/ 389462:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ Y: () => (/* binding */ FlatTree)
/* harmony export */ });
/* harmony import */ var core_js_modules_esnext_iterator_constructor_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(314846);
/* harmony import */ var core_js_modules_esnext_iterator_for_each_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(469655);
/* harmony import */ var _utils_array_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(890604);
/* harmony import */ var _compare_by_depth_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(110877);
class FlatTree {
constructor() {
this.children = [];
this.isDirty = false;
}
add(child) {
(0,_utils_array_mjs__WEBPACK_IMPORTED_MODULE_2__/* .addUniqueItem */ .Kq)(this.children, child);
this.isDirty = true;
}
remove(child) {
(0,_utils_array_mjs__WEBPACK_IMPORTED_MODULE_2__/* .removeItem */ .Ai)(this.children, child);
this.isDirty = true;
}
forEach(callback) {
this.isDirty && this.children.sort(_compare_by_depth_mjs__WEBPACK_IMPORTED_MODULE_3__/* .compareByDepth */ .u);
this.isDirty = false;
this.children.forEach(callback);
}
}
/***/ }),
/***/ 884135:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ O: () => (/* binding */ isVariantNode),
/* harmony export */ e: () => (/* binding */ isControllingVariants)
/* harmony export */ });
/* harmony import */ var core_js_modules_esnext_iterator_constructor_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(314846);
/* harmony import */ var core_js_modules_esnext_iterator_some_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(275568);
/* harmony import */ var _animation_utils_is_animation_controls_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(892904);
/* harmony import */ var _is_variant_label_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(563305);
/* harmony import */ var _variant_props_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(422918);
function isControllingVariants(props) {
return (0,_animation_utils_is_animation_controls_mjs__WEBPACK_IMPORTED_MODULE_2__/* .isAnimationControls */ .N)(props.animate) || _variant_props_mjs__WEBPACK_IMPORTED_MODULE_4__/* .variantProps */ ._.some(name => (0,_is_variant_label_mjs__WEBPACK_IMPORTED_MODULE_3__/* .isVariantLabel */ .w)(props[name]));
}
function isVariantNode(props) {
return Boolean(isControllingVariants(props) || props.variants);
}
/***/ }),
/***/ 563305:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ w: () => (/* binding */ isVariantLabel)
/* harmony export */ });
/**
* Decides if the supplied variable is variant label
*/
function isVariantLabel(v) {
return typeof v === "string" || Array.isArray(v);
}
/***/ }),
/***/ 931545:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ U: () => (/* binding */ updateMotionValuesFromProps)
/* harmony export */ });
/* harmony import */ var _value_use_will_change_is_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(146547);
/* harmony import */ var _utils_warn_once_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(721657);
/* harmony import */ var _value_index_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(239667);
/* harmony import */ var _value_utils_is_motion_value_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(573970);
function updateMotionValuesFromProps(element, next, prev) {
const {
willChange
} = next;
for (const key in next) {
const nextValue = next[key];
const prevValue = prev[key];
if ((0,_value_utils_is_motion_value_mjs__WEBPACK_IMPORTED_MODULE_3__/* .isMotionValue */ .S)(nextValue)) {
/**
* If this is a motion value found in props or style, we want to add it
* to our visual element's motion value map.
*/
element.addValue(key, nextValue);
if ((0,_value_use_will_change_is_mjs__WEBPACK_IMPORTED_MODULE_0__/* .isWillChangeMotionValue */ .k)(willChange)) {
willChange.add(key);
}
/**
* Check the version of the incoming motion value with this version
* and warn against mismatches.
*/
if (false) {}
} else if ((0,_value_utils_is_motion_value_mjs__WEBPACK_IMPORTED_MODULE_3__/* .isMotionValue */ .S)(prevValue)) {
/**
* If we're swapping from a motion value to a static value,
* create a new motion value from that
*/
element.addValue(key, (0,_value_index_mjs__WEBPACK_IMPORTED_MODULE_2__/* .motionValue */ .OQ)(nextValue, {
owner: element
}));
if ((0,_value_use_will_change_is_mjs__WEBPACK_IMPORTED_MODULE_0__/* .isWillChangeMotionValue */ .k)(willChange)) {
willChange.remove(key);
}
} else if (prevValue !== nextValue) {
/**
* If this is a flat value that has changed, update the motion value
* or create one if it doesn't exist. We only want to do this if we're
* not handling the value with our animation state.
*/
if (element.hasValue(key)) {
const existingValue = element.getValue(key);
// TODO: Only update values that aren't being animated or even looked at
!existingValue.hasAnimated && existingValue.set(nextValue);
} else {
const latestValue = element.getStaticValue(key);
element.addValue(key, (0,_value_index_mjs__WEBPACK_IMPORTED_MODULE_2__/* .motionValue */ .OQ)(latestValue !== undefined ? latestValue : nextValue, {
owner: element
}));
}
}
}
// Handle removed values
for (const key in prev) {
if (next[key] === undefined) element.removeValue(key);
}
return next;
}
/***/ }),
/***/ 683695:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ K: () => (/* binding */ resolveVariant)
/* harmony export */ });
/* harmony import */ var core_js_modules_esnext_iterator_constructor_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(314846);
/* harmony import */ var core_js_modules_esnext_iterator_for_each_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(469655);
/* harmony import */ var _resolve_variants_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(775691);
/**
* Creates an object containing the latest state of every MotionValue on a VisualElement
*/
function getCurrent(visualElement) {
const current = {};
visualElement.values.forEach((value, key) => current[key] = value.get());
return current;
}
/**
* Creates an object containing the latest velocity of every MotionValue on a VisualElement
*/
function getVelocity(visualElement) {
const velocity = {};
visualElement.values.forEach((value, key) => velocity[key] = value.getVelocity());
return velocity;
}
function resolveVariant(visualElement, definition, custom) {
const props = visualElement.getProps();
return (0,_resolve_variants_mjs__WEBPACK_IMPORTED_MODULE_2__/* .resolveVariantFromProps */ .a)(props, definition, custom !== undefined ? custom : props.custom, getCurrent(visualElement), getVelocity(visualElement));
}
/***/ }),
/***/ 775691:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ a: () => (/* binding */ resolveVariantFromProps)
/* harmony export */ });
function resolveVariantFromProps(props, definition, custom, currentValues = {}, currentVelocity = {}) {
/**
* If the variant definition is a function, resolve.
*/
if (typeof definition === "function") {
definition = definition(custom !== undefined ? custom : props.custom, currentValues, currentVelocity);
}
/**
* If the variant definition is a variant label, or
* the function returned a variant label, resolve.
*/
if (typeof definition === "string") {
definition = props.variants && props.variants[definition];
}
/**
* At this point we've resolved both functions and variant labels,
* but the resolved variant label might itself have been a function.
* If so, resolve. This can only have returned a valid target object.
*/
if (typeof definition === "function") {
definition = definition(custom !== undefined ? custom : props.custom, currentValues, currentVelocity);
}
return definition;
}
/***/ }),
/***/ 482200:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ $z: () => (/* binding */ getOrigin),
/* harmony export */ TM: () => (/* binding */ checkTargetForNewValues),
/* harmony export */ Uo: () => (/* binding */ setTarget)
/* harmony export */ });
/* unused harmony exports getOriginFromTransition, setValues */
/* harmony import */ var core_js_modules_esnext_iterator_constructor_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(314846);
/* harmony import */ var core_js_modules_esnext_iterator_filter_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(327458);
/* harmony import */ var core_js_modules_esnext_iterator_for_each_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(469655);
/* harmony import */ var _utils_is_numerical_string_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(907930);
/* harmony import */ var _utils_is_zero_value_string_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(70998);
/* harmony import */ var _utils_resolve_value_mjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(744999);
/* harmony import */ var _value_index_mjs__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(239667);
/* harmony import */ var _value_types_complex_index_mjs__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(73748);
/* harmony import */ var _dom_value_types_animatable_none_mjs__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(392602);
/* harmony import */ var _dom_value_types_find_mjs__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(429970);
/* harmony import */ var _resolve_dynamic_variants_mjs__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(683695);
/**
* Set VisualElement's MotionValue, creating a new MotionValue for it if
* it doesn't exist.
*/
function setMotionValue(visualElement, key, value) {
if (visualElement.hasValue(key)) {
visualElement.getValue(key).set(value);
} else {
visualElement.addValue(key, (0,_value_index_mjs__WEBPACK_IMPORTED_MODULE_6__/* .motionValue */ .OQ)(value));
}
}
function setTarget(visualElement, definition) {
const resolved = (0,_resolve_dynamic_variants_mjs__WEBPACK_IMPORTED_MODULE_10__/* .resolveVariant */ .K)(visualElement, definition);
let {
transitionEnd = {},
transition = {},
...target
} = resolved ? visualElement.makeTargetAnimatable(resolved, false) : {};
target = {
...target,
...transitionEnd
};
for (const key in target) {
const value = (0,_utils_resolve_value_mjs__WEBPACK_IMPORTED_MODULE_5__/* .resolveFinalValueInKeyframes */ .K)(target[key]);
setMotionValue(visualElement, key, value);
}
}
function setVariants(visualElement, variantLabels) {
const reversedLabels = [...variantLabels].reverse();
reversedLabels.forEach(key => {
const variant = visualElement.getVariant(key);
variant && setTarget(visualElement, variant);
if (visualElement.variantChildren) {
visualElement.variantChildren.forEach(child => {
setVariants(child, variantLabels);
});
}
});
}
function setValues(visualElement, definition) {
if (Array.isArray(definition)) {
return setVariants(visualElement, definition);
} else if (typeof definition === "string") {
return setVariants(visualElement, [definition]);
} else {
setTarget(visualElement, definition);
}
}
function checkTargetForNewValues(visualElement, target, origin) {
var _a, _b;
const newValueKeys = Object.keys(target).filter(key => !visualElement.hasValue(key));
const numNewValues = newValueKeys.length;
if (!numNewValues) return;
for (let i = 0; i < numNewValues; i++) {
const key = newValueKeys[i];
const targetValue = target[key];
let value = null;
/**
* If the target is a series of keyframes, we can use the first value
* in the array. If this first value is null, we'll still need to read from the DOM.
*/
if (Array.isArray(targetValue)) {
value = targetValue[0];
}
/**
* If the target isn't keyframes, or the first keyframe was null, we need to
* first check if an origin value was explicitly defined in the transition as "from",
* if not read the value from the DOM. As an absolute fallback, take the defined target value.
*/
if (value === null) {
value = (_b = (_a = origin[key]) !== null && _a !== void 0 ? _a : visualElement.readValue(key)) !== null && _b !== void 0 ? _b : target[key];
}
/**
* If value is still undefined or null, ignore it. Preferably this would throw,
* but this was causing issues in Framer.
*/
if (value === undefined || value === null) continue;
if (typeof value === "string" && ((0,_utils_is_numerical_string_mjs__WEBPACK_IMPORTED_MODULE_3__/* .isNumericalString */ .i)(value) || (0,_utils_is_zero_value_string_mjs__WEBPACK_IMPORTED_MODULE_4__/* .isZeroValueString */ .$)(value))) {
// If this is a number read as a string, ie "0" or "200", convert it to a number
value = parseFloat(value);
} else if (!(0,_dom_value_types_find_mjs__WEBPACK_IMPORTED_MODULE_9__/* .findValueType */ .t)(value) && _value_types_complex_index_mjs__WEBPACK_IMPORTED_MODULE_7__/* .complex */ .f.test(targetValue)) {
value = (0,_dom_value_types_animatable_none_mjs__WEBPACK_IMPORTED_MODULE_8__/* .getAnimatableNone */ .J)(key, targetValue);
}
visualElement.addValue(key, (0,_value_index_mjs__WEBPACK_IMPORTED_MODULE_6__/* .motionValue */ .OQ)(value, {
owner: visualElement
}));
if (origin[key] === undefined) {
origin[key] = value;
}
if (value !== null) visualElement.setBaseTarget(key, value);
}
}
function getOriginFromTransition(key, transition) {
if (!transition) return;
const valueTransition = transition[key] || transition["default"] || transition;
return valueTransition.from;
}
function getOrigin(target, transition, visualElement) {
const origin = {};
for (const key in target) {
const transitionOrigin = getOriginFromTransition(key, transition);
if (transitionOrigin !== undefined) {
origin[key] = transitionOrigin;
} else {
const value = visualElement.getValue(key);
if (value) {
origin[key] = value.get();
}
}
}
return origin;
}
/***/ }),
/***/ 422918:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ U: () => (/* binding */ variantPriorityOrder),
/* harmony export */ _: () => (/* binding */ variantProps)
/* harmony export */ });
const variantPriorityOrder = ["animate", "whileInView", "whileFocus", "whileHover", "whileTap", "whileDrag", "exit"];
const variantProps = ["initial", ...variantPriorityOrder];
/***/ }),
/***/ 718966:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ W: () => (/* binding */ MotionGlobalConfig)
/* harmony export */ });
const MotionGlobalConfig = {
skipAnimations: false
};
/***/ }),
/***/ 890604:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ Ai: () => (/* binding */ removeItem),
/* harmony export */ Kq: () => (/* binding */ addUniqueItem),
/* harmony export */ Pe: () => (/* binding */ moveItem)
/* harmony export */ });
function addUniqueItem(arr, item) {
if (arr.indexOf(item) === -1) arr.push(item);
}
function removeItem(arr, item) {
const index = arr.indexOf(item);
if (index > -1) arr.splice(index, 1);
}
// Adapted from array-move
function moveItem([...arr], fromIndex, toIndex) {
const startIndex = fromIndex < 0 ? arr.length + fromIndex : fromIndex;
if (startIndex >= 0 && startIndex < arr.length) {
const endIndex = toIndex < 0 ? arr.length + toIndex : toIndex;
const [item] = arr.splice(fromIndex, 1);
arr.splice(endIndex, 0, item);
}
return arr;
}
/***/ }),
/***/ 893138:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ q: () => (/* binding */ clamp)
/* harmony export */ });
const clamp = (min, max, v) => Math.min(Math.max(v, min), max);
/***/ }),
/***/ 616246:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ c: () => (/* binding */ delay)
/* harmony export */ });
/* harmony import */ var _frameloop_frame_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(277210);
/**
* Timeout defined in ms
*/
function delay(callback, timeout) {
const start = performance.now();
const checkElapsed = ({
timestamp
}) => {
const elapsed = timestamp - start;
if (elapsed >= timeout) {
(0,_frameloop_frame_mjs__WEBPACK_IMPORTED_MODULE_0__/* .cancelFrame */ .WG)(checkElapsed);
callback(elapsed - timeout);
}
};
_frameloop_frame_mjs__WEBPACK_IMPORTED_MODULE_0__/* .frame */ .Gt.read(checkElapsed, true);
return () => (0,_frameloop_frame_mjs__WEBPACK_IMPORTED_MODULE_0__/* .cancelFrame */ .WG)(checkElapsed);
}
/***/ }),
/***/ 367232:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ w: () => (/* binding */ distance2D)
/* harmony export */ });
/* unused harmony export distance */
const distance = (a, b) => Math.abs(a - b);
function distance2D(a, b) {
// Multi-dimensional
const xDelta = distance(a.x, b.x);
const yDelta = distance(a.y, b.y);
return Math.sqrt(xDelta ** 2 + yDelta ** 2);
}
/***/ }),
/***/ 841164:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ $: () => (/* binding */ warning),
/* harmony export */ V: () => (/* binding */ invariant)
/* harmony export */ });
/* harmony import */ var core_js_modules_es_error_cause_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(167834);
/* harmony import */ var _noop_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(78777);
let warning = _noop_mjs__WEBPACK_IMPORTED_MODULE_1__/* .noop */ .l;
let invariant = _noop_mjs__WEBPACK_IMPORTED_MODULE_1__/* .noop */ .l;
if (false) {}
/***/ }),
/***/ 508382:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ s: () => (/* binding */ getContextWindow)
/* harmony export */ });
// Fixes https://github.com/framer/motion/issues/2270
const getContextWindow = ({
current
}) => {
return current ? current.ownerDocument.defaultView : null;
};
/***/ }),
/***/ 400630:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ a: () => (/* binding */ hslaToRgba)
/* harmony export */ });
// Adapted from https://gist.github.com/mjackson/5311256
function hueToRgb(p, q, t) {
if (t < 0) t += 1;
if (t > 1) t -= 1;
if (t < 1 / 6) return p + (q - p) * 6 * t;
if (t < 1 / 2) return q;
if (t < 2 / 3) return p + (q - p) * (2 / 3 - t) * 6;
return p;
}
function hslaToRgba({
hue,
saturation,
lightness,
alpha
}) {
hue /= 360;
saturation /= 100;
lightness /= 100;
let red = 0;
let green = 0;
let blue = 0;
if (!saturation) {
red = green = blue = lightness;
} else {
const q = lightness < 0.5 ? lightness * (1 + saturation) : lightness + saturation - lightness * saturation;
const p = 2 * lightness - q;
red = hueToRgb(p, q, hue + 1 / 3);
green = hueToRgb(p, q, hue);
blue = hueToRgb(p, q, hue - 1 / 3);
}
return {
red: Math.round(red * 255),
green: Math.round(green * 255),
blue: Math.round(blue * 255),
alpha
};
}
/***/ }),
/***/ 323662:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ G: () => (/* binding */ interpolate)
/* harmony export */ });
/* harmony import */ var _errors_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(841164);
/* harmony import */ var _value_types_color_index_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(449705);
/* harmony import */ var _clamp_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(893138);
/* harmony import */ var _mix_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(26085);
/* harmony import */ var _mix_color_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(69279);
/* harmony import */ var _mix_complex_mjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(681718);
/* harmony import */ var _pipe_mjs__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(804253);
/* harmony import */ var _progress_mjs__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(799020);
/* harmony import */ var _noop_mjs__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(78777);
const mixNumber = (from, to) => p => (0,_mix_mjs__WEBPACK_IMPORTED_MODULE_3__/* .mix */ .j)(from, to, p);
function detectMixerFactory(v) {
if (typeof v === "number") {
return mixNumber;
} else if (typeof v === "string") {
return _value_types_color_index_mjs__WEBPACK_IMPORTED_MODULE_1__/* .color */ .y.test(v) ? _mix_color_mjs__WEBPACK_IMPORTED_MODULE_4__/* .mixColor */ .i : _mix_complex_mjs__WEBPACK_IMPORTED_MODULE_5__/* .mixComplex */ .JL;
} else if (Array.isArray(v)) {
return _mix_complex_mjs__WEBPACK_IMPORTED_MODULE_5__/* .mixArray */ .MC;
} else if (typeof v === "object") {
return _mix_complex_mjs__WEBPACK_IMPORTED_MODULE_5__/* .mixObject */ .YK;
}
return mixNumber;
}
function createMixers(output, ease, customMixer) {
const mixers = [];
const mixerFactory = customMixer || detectMixerFactory(output[0]);
const numMixers = output.length - 1;
for (let i = 0; i < numMixers; i++) {
let mixer = mixerFactory(output[i], output[i + 1]);
if (ease) {
const easingFunction = Array.isArray(ease) ? ease[i] || _noop_mjs__WEBPACK_IMPORTED_MODULE_8__/* .noop */ .l : ease;
mixer = (0,_pipe_mjs__WEBPACK_IMPORTED_MODULE_6__/* .pipe */ .F)(easingFunction, mixer);
}
mixers.push(mixer);
}
return mixers;
}
/**
* Create a function that maps from a numerical input array to a generic output array.
*
* Accepts:
* - Numbers
* - Colors (hex, hsl, hsla, rgb, rgba)
* - Complex (combinations of one or more numbers or strings)
*
* ```jsx
* const mixColor = interpolate([0, 1], ['#fff', '#000'])
*
* mixColor(0.5) // 'rgba(128, 128, 128, 1)'
* ```
*
* TODO Revist this approach once we've moved to data models for values,
* probably not needed to pregenerate mixer functions.
*
* @public
*/
function interpolate(input, output, {
clamp: isClamp = true,
ease,
mixer
} = {}) {
const inputLength = input.length;
(0,_errors_mjs__WEBPACK_IMPORTED_MODULE_0__/* .invariant */ .V)(inputLength === output.length, "Both input and output ranges must be the same length");
/**
* If we're only provided a single input, we can just make a function
* that returns the output.
*/
if (inputLength === 1) return () => output[0];
// If input runs highest -> lowest, reverse both arrays
if (input[0] > input[inputLength - 1]) {
input = [...input].reverse();
output = [...output].reverse();
}
const mixers = createMixers(output, ease, mixer);
const numMixers = mixers.length;
const interpolator = v => {
let i = 0;
if (numMixers > 1) {
for (; i < input.length - 2; i++) {
if (v < input[i + 1]) break;
}
}
const progressInRange = (0,_progress_mjs__WEBPACK_IMPORTED_MODULE_7__/* .progress */ .q)(input[i], input[i + 1], v);
return mixers[i](progressInRange);
};
return isClamp ? v => interpolator((0,_clamp_mjs__WEBPACK_IMPORTED_MODULE_2__/* .clamp */ .q)(input[0], input[inputLength - 1], v)) : interpolator;
}
/***/ }),
/***/ 701134:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ B: () => (/* binding */ isBrowser)
/* harmony export */ });
const isBrowser = typeof document !== "undefined";
/***/ }),
/***/ 907930:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ i: () => (/* binding */ isNumericalString)
/* harmony export */ });
/**
* Check if value is a numerical string, ie a string that is purely a number eg "100" or "-100.1"
*/
const isNumericalString = v => /^\-?\d*\.?\d+$/.test(v);
/***/ }),
/***/ 105675:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ X: () => (/* binding */ isRefObject)
/* harmony export */ });
function isRefObject(ref) {
return ref && typeof ref === "object" && Object.prototype.hasOwnProperty.call(ref, "current");
}
/***/ }),
/***/ 70998:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ $: () => (/* binding */ isZeroValueString)
/* harmony export */ });
/**
* Check if the value is a zero value string like "0px" or "0%"
*/
const isZeroValueString = v => /^0[^.\s]+$/.test(v);
/***/ }),
/***/ 696407:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ p: () => (/* binding */ memo)
/* harmony export */ });
function memo(callback) {
let result;
return () => {
if (result === undefined) result = callback();
return result;
};
}
/***/ }),
/***/ 69279:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ i: () => (/* binding */ mixColor)
/* harmony export */ });
/* unused harmony export mixLinearColor */
/* harmony import */ var core_js_modules_esnext_iterator_constructor_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(314846);
/* harmony import */ var core_js_modules_esnext_iterator_find_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6211);
/* harmony import */ var _mix_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(26085);
/* harmony import */ var _errors_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(841164);
/* harmony import */ var _hsla_to_rgba_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(400630);
/* harmony import */ var _value_types_color_hex_mjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(449598);
/* harmony import */ var _value_types_color_rgba_mjs__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(422585);
/* harmony import */ var _value_types_color_hsla_mjs__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(898173);
// Linear color space blending
// Explained https://www.youtube.com/watch?v=LKnqECcg6Gw
// Demonstrated http://codepen.io/osublake/pen/xGVVaN
const mixLinearColor = (from, to, v) => {
const fromExpo = from * from;
return Math.sqrt(Math.max(0, v * (to * to - fromExpo) + fromExpo));
};
const colorTypes = [_value_types_color_hex_mjs__WEBPACK_IMPORTED_MODULE_5__/* .hex */ .u, _value_types_color_rgba_mjs__WEBPACK_IMPORTED_MODULE_6__/* .rgba */ .B, _value_types_color_hsla_mjs__WEBPACK_IMPORTED_MODULE_7__/* .hsla */ .V];
const getColorType = v => colorTypes.find(type => type.test(v));
function asRGBA(color) {
const type = getColorType(color);
(0,_errors_mjs__WEBPACK_IMPORTED_MODULE_3__/* .invariant */ .V)(Boolean(type), `'${color}' is not an animatable color. Use the equivalent color code instead.`);
let model = type.parse(color);
if (type === _value_types_color_hsla_mjs__WEBPACK_IMPORTED_MODULE_7__/* .hsla */ .V) {
// TODO Remove this cast - needed since Framer Motion's stricter typing
model = (0,_hsla_to_rgba_mjs__WEBPACK_IMPORTED_MODULE_4__/* .hslaToRgba */ .a)(model);
}
return model;
}
const mixColor = (from, to) => {
const fromRGBA = asRGBA(from);
const toRGBA = asRGBA(to);
const blended = {
...fromRGBA
};
return v => {
blended.red = mixLinearColor(fromRGBA.red, toRGBA.red, v);
blended.green = mixLinearColor(fromRGBA.green, toRGBA.green, v);
blended.blue = mixLinearColor(fromRGBA.blue, toRGBA.blue, v);
blended.alpha = (0,_mix_mjs__WEBPACK_IMPORTED_MODULE_2__/* .mix */ .j)(fromRGBA.alpha, toRGBA.alpha, v);
return _value_types_color_rgba_mjs__WEBPACK_IMPORTED_MODULE_6__/* .rgba */ .B.transform(blended);
};
};
/***/ }),
/***/ 681718:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ JL: () => (/* binding */ mixComplex),
/* harmony export */ MC: () => (/* binding */ mixArray),
/* harmony export */ YK: () => (/* binding */ mixObject)
/* harmony export */ });
/* harmony import */ var core_js_modules_esnext_iterator_map_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(194364);
/* harmony import */ var _mix_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(26085);
/* harmony import */ var _mix_color_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(69279);
/* harmony import */ var _pipe_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(804253);
/* harmony import */ var _errors_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(841164);
/* harmony import */ var _value_types_color_index_mjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(449705);
/* harmony import */ var _value_types_complex_index_mjs__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(73748);
const mixImmediate = (origin, target) => p => `${p > 0 ? target : origin}`;
function getMixer(origin, target) {
if (typeof origin === "number") {
return v => (0,_mix_mjs__WEBPACK_IMPORTED_MODULE_1__/* .mix */ .j)(origin, target, v);
} else if (_value_types_color_index_mjs__WEBPACK_IMPORTED_MODULE_5__/* .color */ .y.test(origin)) {
return (0,_mix_color_mjs__WEBPACK_IMPORTED_MODULE_2__/* .mixColor */ .i)(origin, target);
} else {
return origin.startsWith("var(") ? mixImmediate(origin, target) : mixComplex(origin, target);
}
}
const mixArray = (from, to) => {
const output = [...from];
const numValues = output.length;
const blendValue = from.map((fromThis, i) => getMixer(fromThis, to[i]));
return v => {
for (let i = 0; i < numValues; i++) {
output[i] = blendValue[i](v);
}
return output;
};
};
const mixObject = (origin, target) => {
const output = {
...origin,
...target
};
const blendValue = {};
for (const key in output) {
if (origin[key] !== undefined && target[key] !== undefined) {
blendValue[key] = getMixer(origin[key], target[key]);
}
}
return v => {
for (const key in blendValue) {
output[key] = blendValue[key](v);
}
return output;
};
};
const mixComplex = (origin, target) => {
const template = _value_types_complex_index_mjs__WEBPACK_IMPORTED_MODULE_6__/* .complex */ .f.createTransformer(target);
const originStats = (0,_value_types_complex_index_mjs__WEBPACK_IMPORTED_MODULE_6__/* .analyseComplexValue */ .V)(origin);
const targetStats = (0,_value_types_complex_index_mjs__WEBPACK_IMPORTED_MODULE_6__/* .analyseComplexValue */ .V)(target);
const canInterpolate = originStats.numVars === targetStats.numVars && originStats.numColors === targetStats.numColors && originStats.numNumbers >= targetStats.numNumbers;
if (canInterpolate) {
return (0,_pipe_mjs__WEBPACK_IMPORTED_MODULE_3__/* .pipe */ .F)(mixArray(originStats.values, targetStats.values), template);
} else {
(0,_errors_mjs__WEBPACK_IMPORTED_MODULE_4__/* .warning */ .$)(true, `Complex values '${origin}' and '${target}' 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.`);
return mixImmediate(origin, target);
}
};
/***/ }),
/***/ 26085:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ j: () => (/* binding */ mix)
/* harmony export */ });
/*
Value in range from progress
Given a lower limit and an upper limit, we return the value within
that range as expressed by progress (usually a number from 0 to 1)
So progress = 0.5 would change
from -------- to
to
from ---- to
E.g. from = 10, to = 20, progress = 0.5 => 15
@param [number]: Lower limit of range
@param [number]: Upper limit of range
@param [number]: The progress between lower and upper limits expressed 0-1
@return [number]: Value as calculated from progress within range (not limited within range)
*/
const mix = (from, to, progress) => -progress * from + progress * to + from;
/***/ }),
/***/ 78777:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ l: () => (/* binding */ noop)
/* harmony export */ });
const noop = any => any;
/***/ }),
/***/ 766869:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ Z: () => (/* binding */ defaultOffset)
/* harmony export */ });
/* harmony import */ var _fill_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(774641);
function defaultOffset(arr) {
const offset = [0];
(0,_fill_mjs__WEBPACK_IMPORTED_MODULE_0__/* .fillOffset */ .f)(offset, arr.length - 1);
return offset;
}
/***/ }),
/***/ 774641:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ f: () => (/* binding */ fillOffset)
/* harmony export */ });
/* harmony import */ var _mix_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(26085);
/* harmony import */ var _progress_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(799020);
function fillOffset(offset, remaining) {
const min = offset[offset.length - 1];
for (let i = 1; i <= remaining; i++) {
const offsetProgress = (0,_progress_mjs__WEBPACK_IMPORTED_MODULE_1__/* .progress */ .q)(0, remaining, i);
offset.push((0,_mix_mjs__WEBPACK_IMPORTED_MODULE_0__/* .mix */ .j)(min, 1, offsetProgress));
}
}
/***/ }),
/***/ 418057:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ A: () => (/* binding */ convertOffsetToTimes)
/* harmony export */ });
/* harmony import */ var core_js_modules_esnext_iterator_map_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(194364);
function convertOffsetToTimes(offset, duration) {
return offset.map(o => o * duration);
}
/***/ }),
/***/ 804253:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ F: () => (/* binding */ pipe)
/* harmony export */ });
/* harmony import */ var core_js_modules_esnext_iterator_constructor_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(314846);
/* harmony import */ var core_js_modules_esnext_iterator_reduce_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(190458);
/**
* Pipe
* Compose other transformers to run linearily
* pipe(min(20), max(40))
* @param {...functions} transformers
* @return {function}
*/
const combineFunctions = (a, b) => v => b(a(v));
const pipe = (...transformers) => transformers.reduce(combineFunctions);
/***/ }),
/***/ 799020:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ q: () => (/* binding */ progress)
/* harmony export */ });
/*
Progress within given range
Given a lower limit and an upper limit, we return the progress
(expressed as a number 0-1) represented by the given value, and
limit that progress to within 0-1.
@param [number]: Lower limit
@param [number]: Upper limit
@param [number]: Value to find progress within given range
@return [number]: Progress of value within range as expressed 0-1
*/
const progress = (from, to, value) => {
const toFromDifference = to - from;
return toFromDifference === 0 ? 1 : (value - from) / toFromDifference;
};
/***/ }),
/***/ 989461:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ U: () => (/* binding */ initPrefersReducedMotion)
/* harmony export */ });
/* harmony import */ var _is_browser_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(701134);
/* harmony import */ var _state_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(27250);
function initPrefersReducedMotion() {
_state_mjs__WEBPACK_IMPORTED_MODULE_1__/* .hasReducedMotionListener */ .r.current = true;
if (!_is_browser_mjs__WEBPACK_IMPORTED_MODULE_0__/* .isBrowser */ .B) return;
if (window.matchMedia) {
const motionMediaQuery = window.matchMedia("(prefers-reduced-motion)");
const setReducedMotionPreferences = () => _state_mjs__WEBPACK_IMPORTED_MODULE_1__/* .prefersReducedMotion */ .O.current = motionMediaQuery.matches;
motionMediaQuery.addListener(setReducedMotionPreferences);
setReducedMotionPreferences();
} else {
_state_mjs__WEBPACK_IMPORTED_MODULE_1__/* .prefersReducedMotion */ .O.current = false;
}
}
/***/ }),
/***/ 27250:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ O: () => (/* binding */ prefersReducedMotion),
/* harmony export */ r: () => (/* binding */ hasReducedMotionListener)
/* harmony export */ });
// Does this device prefer reduced motion? Returns `null` server-side.
const prefersReducedMotion = {
current: null
};
const hasReducedMotionListener = {
current: false
};
/***/ }),
/***/ 494535:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* unused harmony export useReducedMotionConfig */
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(63696);
/* harmony import */ var _context_MotionConfigContext_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(682832);
/* harmony import */ var _use_reduced_motion_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(150092);
function useReducedMotionConfig() {
const reducedMotionPreference = useReducedMotion();
const {
reducedMotion
} = useContext(MotionConfigContext);
if (reducedMotion === "never") {
return false;
} else if (reducedMotion === "always") {
return true;
} else {
return reducedMotionPreference;
}
}
/***/ }),
/***/ 150092:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* unused harmony export useReducedMotion */
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(63696);
/* harmony import */ var _index_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(989461);
/* harmony import */ var _warn_once_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(721657);
/* harmony import */ var _state_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(27250);
/**
* A hook that returns `true` if we should be using reduced motion based on the current device's Reduced Motion setting.
*
* This can be used to implement changes to your UI based on Reduced Motion. For instance, replacing motion-sickness inducing
* `x`/`y` animations with `opacity`, disabling the autoplay of background videos, or turning off parallax motion.
*
* It will actively respond to changes and re-render your components with the latest setting.
*
* ```jsx
* export function Sidebar({ isOpen }) {
* const shouldReduceMotion = useReducedMotion()
* const closedX = shouldReduceMotion ? 0 : "-100%"
*
* return (
* <motion.div animate={{
* opacity: isOpen ? 1 : 0,
* x: isOpen ? 0 : closedX
* }} />
* )
* }
* ```
*
* @return boolean
*
* @public
*/
function useReducedMotion() {
/**
* Lazy initialisation of prefersReducedMotion
*/
!hasReducedMotionListener.current && initPrefersReducedMotion();
const [shouldReduceMotion] = useState(prefersReducedMotion.current);
if (false) {}
/**
* TODO See if people miss automatically updating shouldReduceMotion setting
*/
return shouldReduceMotion;
}
/***/ }),
/***/ 744999:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ B: () => (/* binding */ isCustomValue),
/* harmony export */ K: () => (/* binding */ resolveFinalValueInKeyframes)
/* harmony export */ });
/* harmony import */ var _animation_utils_is_keyframes_target_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(343690);
const isCustomValue = v => {
return Boolean(v && typeof v === "object" && v.mix && v.toValue);
};
const resolveFinalValueInKeyframes = v => {
// TODO maybe throw if v.length - 1 is placeholder token?
return (0,_animation_utils_is_keyframes_target_mjs__WEBPACK_IMPORTED_MODULE_0__/* .isKeyframesTarget */ .p)(v) ? v[v.length - 1] || 0 : v;
};
/***/ }),
/***/ 223605:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ a: () => (/* binding */ shallowCompare)
/* harmony export */ });
function shallowCompare(next, prev) {
if (!Array.isArray(prev)) return false;
const prevLength = prev.length;
if (prevLength !== next.length) return false;
for (let i = 0; i < prevLength; i++) {
if (prev[i] !== next[i]) return false;
}
return true;
}
/***/ }),
/***/ 902840:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ v: () => (/* binding */ SubscriptionManager)
/* harmony export */ });
/* harmony import */ var _array_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(890604);
class SubscriptionManager {
constructor() {
this.subscriptions = [];
}
add(handler) {
(0,_array_mjs__WEBPACK_IMPORTED_MODULE_0__/* .addUniqueItem */ .Kq)(this.subscriptions, handler);
return () => (0,_array_mjs__WEBPACK_IMPORTED_MODULE_0__/* .removeItem */ .Ai)(this.subscriptions, handler);
}
notify(a, b, c) {
const numSubscriptions = this.subscriptions.length;
if (!numSubscriptions) return;
if (numSubscriptions === 1) {
/**
* If there's only a single handler we can just call it without invoking a loop.
*/
this.subscriptions[0](a, b, c);
} else {
for (let i = 0; i < numSubscriptions; i++) {
/**
* Check whether the handler exists before firing as it's possible
* the subscriptions were modified during this loop running.
*/
const handler = this.subscriptions[i];
handler && handler(a, b, c);
}
}
}
getSize() {
return this.subscriptions.length;
}
clear() {
this.subscriptions.length = 0;
}
}
/***/ }),
/***/ 660127:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ X: () => (/* binding */ millisecondsToSeconds),
/* harmony export */ f: () => (/* binding */ secondsToMilliseconds)
/* harmony export */ });
/**
* Converts seconds to milliseconds
*
* @param seconds - Time in seconds.
* @return milliseconds - Converted time in milliseconds.
*/
const secondsToMilliseconds = seconds => seconds * 1000;
const millisecondsToSeconds = milliseconds => milliseconds / 1000;
/***/ }),
/***/ 229455:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ p: () => (/* binding */ transform)
/* harmony export */ });
/* harmony import */ var _interpolate_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(323662);
const isCustomValueType = v => {
return v && typeof v === "object" && v.mix;
};
const getMixer = v => isCustomValueType(v) ? v.mix : undefined;
function transform(...args) {
const useImmediate = !Array.isArray(args[0]);
const argOffset = useImmediate ? 0 : -1;
const inputValue = args[0 + argOffset];
const inputRange = args[1 + argOffset];
const outputRange = args[2 + argOffset];
const options = args[3 + argOffset];
const interpolator = (0,_interpolate_mjs__WEBPACK_IMPORTED_MODULE_0__/* .interpolate */ .G)(inputRange, outputRange, {
mixer: getMixer(outputRange[0]),
...options
});
return useImmediate ? interpolator(inputValue) : interpolator;
}
/***/ }),
/***/ 404175:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* unused harmony export useAnimationFrame */
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(63696);
/* harmony import */ var _context_MotionConfigContext_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(682832);
/* harmony import */ var _frameloop_frame_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(277210);
function useAnimationFrame(callback) {
const initialTimestamp = useRef(0);
const {
isStatic
} = useContext(MotionConfigContext);
useEffect(() => {
if (isStatic) return;
const provideTimeSinceStart = ({
timestamp,
delta
}) => {
if (!initialTimestamp.current) initialTimestamp.current = timestamp;
callback(timestamp - initialTimestamp.current, delta);
};
frame.update(provideTimeSinceStart, true);
return () => cancelFrame(provideTimeSinceStart);
}, [callback]);
}
/***/ }),
/***/ 416155:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ M: () => (/* binding */ useConstant)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(63696);
/**
* Creates a constant value over the lifecycle of a component.
*
* Even if `useMemo` is provided an empty array as its final argument, it doesn't offer
* a guarantee that it won't re-run for performance reasons later on. By using `useConstant`
* you can ensure that initialisers don't execute twice or more.
*/
function useConstant(init) {
const ref = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
if (ref.current === null) {
ref.current = init();
}
return ref.current;
}
/***/ }),
/***/ 683911:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* unused harmony export useCycle */
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(63696);
/* harmony import */ var _wrap_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(322801);
/**
* Cycles through a series of visual properties. Can be used to toggle between or cycle through animations. It works similar to `useState` in React. It is provided an initial array of possible states, and returns an array of two arguments.
*
* An index value can be passed to the returned `cycle` function to cycle to a specific index.
*
* ```jsx
* import * as React from "react"
* import { motion, useCycle } from "framer-motion"
*
* export const MyComponent = () => {
* const [x, cycleX] = useCycle(0, 50, 100)
*
* return (
* <motion.div
* animate={{ x: x }}
* onTap={() => cycleX()}
* />
* )
* }
* ```
*
* @param items - items to cycle through
* @returns [currentState, cycleState]
*
* @public
*/
function useCycle(...items) {
const index = useRef(0);
const [item, setItem] = useState(items[index.current]);
const runCycle = useCallback(next => {
index.current = typeof next !== "number" ? wrap(0, items.length, index.current + 1) : next;
setItem(items[index.current]);
},
// The array will change on each call, but by putting items.length at
// the front of this array, we guarantee the dependency comparison will match up
// eslint-disable-next-line react-hooks/exhaustive-deps
[items.length, ...items]);
return [item, runCycle];
}
/***/ }),
/***/ 226990:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ C: () => (/* binding */ useForceUpdate)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(63696);
/* harmony import */ var _use_is_mounted_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(546332);
/* harmony import */ var _frameloop_frame_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(277210);
function useForceUpdate() {
const isMounted = (0,_use_is_mounted_mjs__WEBPACK_IMPORTED_MODULE_1__/* .useIsMounted */ .a)();
const [forcedRenderCount, setForcedRenderCount] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(0);
const forceRender = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(() => {
isMounted.current && setForcedRenderCount(forcedRenderCount + 1);
}, [forcedRenderCount]);
/**
* Defer this to the end of the next animation frame in case there are multiple
* synchronous calls.
*/
const deferredForceRender = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(() => _frameloop_frame_mjs__WEBPACK_IMPORTED_MODULE_2__/* .frame */ .Gt.postRender(forceRender), [forceRender]);
return [deferredForceRender, forcedRenderCount];
}
/***/ }),
/***/ 364584:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* unused harmony export useInView */
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(63696);
/* harmony import */ var _render_dom_viewport_index_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(438182);
function useInView(ref, {
root,
margin,
amount,
once = false
} = {}) {
const [isInView, setInView] = useState(false);
useEffect(() => {
if (!ref.current || once && isInView) return;
const onEnter = () => {
setInView(true);
return once ? undefined : () => setInView(false);
};
const options = {
root: root && root.current || undefined,
margin,
amount
};
return inView(ref.current, onEnter, options);
}, [root, ref, margin, once, amount]);
return isInView;
}
/***/ }),
/***/ 300934:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ d: () => (/* binding */ instantAnimationState)
/* harmony export */ });
const instantAnimationState = {
current: false
};
/***/ }),
/***/ 437614:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* unused harmony exports disableInstantTransitions, useInstantTransition */
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(63696);
/* harmony import */ var _projection_use_instant_layout_transition_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(557013);
/* harmony import */ var _use_force_update_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(226990);
/* harmony import */ var _use_instant_transition_state_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(300934);
/* harmony import */ var _frameloop_frame_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(277210);
function useInstantTransition() {
const [forceUpdate, forcedRenderCount] = useForceUpdate();
const startInstantLayoutTransition = useInstantLayoutTransition();
const unlockOnFrameRef = useRef();
useEffect(() => {
/**
* Unblock after two animation frames, otherwise this will unblock too soon.
*/
frame.postRender(() => frame.postRender(() => {
/**
* If the callback has been called again after the effect
* triggered this 2 frame delay, don't unblock animations. This
* prevents the previous effect from unblocking the current
* instant transition too soon. This becomes more likely when
* used in conjunction with React.startTransition().
*/
if (forcedRenderCount !== unlockOnFrameRef.current) return;
instantAnimationState.current = false;
}));
}, [forcedRenderCount]);
return callback => {
startInstantLayoutTransition(() => {
instantAnimationState.current = true;
forceUpdate();
callback();
unlockOnFrameRef.current = forcedRenderCount + 1;
});
};
}
function disableInstantTransitions() {
instantAnimationState.current = false;
}
/***/ }),
/***/ 546332:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ a: () => (/* binding */ useIsMounted)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(63696);
/* harmony import */ var _use_isomorphic_effect_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(117946);
function useIsMounted() {
const isMounted = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(false);
(0,_use_isomorphic_effect_mjs__WEBPACK_IMPORTED_MODULE_1__/* .useIsomorphicLayoutEffect */ .E)(() => {
isMounted.current = true;
return () => {
isMounted.current = false;
};
}, []);
return isMounted;
}
/***/ }),
/***/ 117946:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ E: () => (/* binding */ useIsomorphicLayoutEffect)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(63696);
/* harmony import */ var _is_browser_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(701134);
const useIsomorphicLayoutEffect = _is_browser_mjs__WEBPACK_IMPORTED_MODULE_1__/* .isBrowser */ .B ? react__WEBPACK_IMPORTED_MODULE_0__.useLayoutEffect : react__WEBPACK_IMPORTED_MODULE_0__.useEffect;
/***/ }),
/***/ 261006:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* unused harmony export useMotionValueEvent */
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(63696);
function useMotionValueEvent(value, event, callback) {
/**
* useInsertionEffect will create subscriptions before any other
* effects will run. Effects run upwards through the tree so it
* can be that binding a useLayoutEffect higher up the tree can
* miss changes from lower down the tree.
*/
useInsertionEffect(() => value.on(event, callback), [value, event, callback]);
}
/***/ }),
/***/ 758369:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ l: () => (/* binding */ useUnmountEffect)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(63696);
function useUnmountEffect(callback) {
return (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => () => callback(), []);
}
/***/ }),
/***/ 540255:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ f: () => (/* binding */ velocityPerSecond)
/* harmony export */ });
/*
Convert velocity into velocity per second
@param [number]: Unit per frame
@param [number]: Frame duration in ms
*/
function velocityPerSecond(velocity, frameDuration) {
return frameDuration ? velocity * (1000 / frameDuration) : 0;
}
/***/ }),
/***/ 721657:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* unused harmony export warnOnce */
const warned = new Set();
function warnOnce(condition, message, element) {
if (condition || warned.has(message)) return;
console.warn(message);
if (element) console.warn(element);
warned.add(message);
}
/***/ }),
/***/ 322801:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ L: () => (/* binding */ wrap)
/* harmony export */ });
const wrap = (min, max, v) => {
const rangeSize = max - min;
return ((v - min) % rangeSize + rangeSize) % rangeSize + min;
};
/***/ }),
/***/ 239667:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ KG: () => (/* binding */ MotionValue),
/* harmony export */ OQ: () => (/* binding */ motionValue),
/* harmony export */ bt: () => (/* binding */ collectMotionValues)
/* harmony export */ });
/* harmony import */ var _utils_subscription_manager_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(902840);
/* harmony import */ var _utils_velocity_per_second_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(540255);
/* harmony import */ var _utils_warn_once_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(721657);
/* harmony import */ var _frameloop_frame_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(277210);
const isFloat = value => {
return !isNaN(parseFloat(value));
};
const collectMotionValues = {
current: undefined
};
/**
* `MotionValue` is used to track the state and velocity of motion values.
*
* @public
*/
class MotionValue {
/**
* @param init - The initiating value
* @param config - Optional configuration options
*
* - `transformer`: A function to transform incoming values with.
*
* @internal
*/
constructor(init, options = {}) {
/**
* This will be replaced by the build step with the latest version number.
* When MotionValues are provided to motion components, warn if versions are mixed.
*/
this.version = "10.18.0";
/**
* Duration, in milliseconds, since last updating frame.
*
* @internal
*/
this.timeDelta = 0;
/**
* Timestamp of the last time this `MotionValue` was updated.
*
* @internal
*/
this.lastUpdated = 0;
/**
* Tracks whether this value can output a velocity. Currently this is only true
* if the value is numerical, but we might be able to widen the scope here and support
* other value types.
*
* @internal
*/
this.canTrackVelocity = false;
/**
* An object containing a SubscriptionManager for each active event.
*/
this.events = {};
this.updateAndNotify = (v, render = true) => {
this.prev = this.current;
this.current = v;
// Update timestamp
const {
delta,
timestamp
} = _frameloop_frame_mjs__WEBPACK_IMPORTED_MODULE_3__/* .frameData */ .uv;
if (this.lastUpdated !== timestamp) {
this.timeDelta = delta;
this.lastUpdated = timestamp;
_frameloop_frame_mjs__WEBPACK_IMPORTED_MODULE_3__/* .frame */ .Gt.postRender(this.scheduleVelocityCheck);
}
// Update update subscribers
if (this.prev !== this.current && this.events.change) {
this.events.change.notify(this.current);
}
// Update velocity subscribers
if (this.events.velocityChange) {
this.events.velocityChange.notify(this.getVelocity());
}
// Update render subscribers
if (render && this.events.renderRequest) {
this.events.renderRequest.notify(this.current);
}
};
/**
* Schedule a velocity check for the next frame.
*
* This is an instanced and bound function to prevent generating a new
* function once per frame.
*
* @internal
*/
this.scheduleVelocityCheck = () => _frameloop_frame_mjs__WEBPACK_IMPORTED_MODULE_3__/* .frame */ .Gt.postRender(this.velocityCheck);
/**
* Updates `prev` with `current` if the value hasn't been updated this frame.
* This ensures velocity calculations return `0`.
*
* This is an instanced and bound function to prevent generating a new
* function once per frame.
*
* @internal
*/
this.velocityCheck = ({
timestamp
}) => {
if (timestamp !== this.lastUpdated) {
this.prev = this.current;
if (this.events.velocityChange) {
this.events.velocityChange.notify(this.getVelocity());
}
}
};
this.hasAnimated = false;
this.prev = this.current = init;
this.canTrackVelocity = isFloat(this.current);
this.owner = options.owner;
}
/**
* Adds a function that will be notified when the `MotionValue` is updated.
*
* It returns a function that, when called, will cancel the subscription.
*
* When calling `onChange` inside a React component, it should be wrapped with the
* `useEffect` hook. As it returns an unsubscribe function, this should be returned
* from the `useEffect` function to ensure you don't add duplicate subscribers..
*
* ```jsx
* export const MyComponent = () => {
* const x = useMotionValue(0)
* const y = useMotionValue(0)
* const opacity = useMotionValue(1)
*
* useEffect(() => {
* function updateOpacity() {
* const maxXY = Math.max(x.get(), y.get())
* const newOpacity = transform(maxXY, [0, 100], [1, 0])
* opacity.set(newOpacity)
* }
*
* const unsubscribeX = x.on("change", updateOpacity)
* const unsubscribeY = y.on("change", updateOpacity)
*
* return () => {
* unsubscribeX()
* unsubscribeY()
* }
* }, [])
*
* return <motion.div style={{ x }} />
* }
* ```
*
* @param subscriber - A function that receives the latest value.
* @returns A function that, when called, will cancel this subscription.
*
* @deprecated
*/
onChange(subscription) {
if (false) {}
return this.on("change", subscription);
}
on(eventName, callback) {
if (!this.events[eventName]) {
this.events[eventName] = new _utils_subscription_manager_mjs__WEBPACK_IMPORTED_MODULE_0__/* .SubscriptionManager */ .v();
}
const unsubscribe = this.events[eventName].add(callback);
if (eventName === "change") {
return () => {
unsubscribe();
/**
* If we have no more change listeners by the start
* of the next frame, stop active animations.
*/
_frameloop_frame_mjs__WEBPACK_IMPORTED_MODULE_3__/* .frame */ .Gt.read(() => {
if (!this.events.change.getSize()) {
this.stop();
}
});
};
}
return unsubscribe;
}
clearListeners() {
for (const eventManagers in this.events) {
this.events[eventManagers].clear();
}
}
/**
* Attaches a passive effect to the `MotionValue`.
*
* @internal
*/
attach(passiveEffect, stopPassiveEffect) {
this.passiveEffect = passiveEffect;
this.stopPassiveEffect = stopPassiveEffect;
}
/**
* Sets the state of the `MotionValue`.
*
* @remarks
*
* ```jsx
* const x = useMotionValue(0)
* x.set(10)
* ```
*
* @param latest - Latest value to set.
* @param render - Whether to notify render subscribers. Defaults to `true`
*
* @public
*/
set(v, render = true) {
if (!render || !this.passiveEffect) {
this.updateAndNotify(v, render);
} else {
this.passiveEffect(v, this.updateAndNotify);
}
}
setWithVelocity(prev, current, delta) {
this.set(current);
this.prev = prev;
this.timeDelta = delta;
}
/**
* Set the state of the `MotionValue`, stopping any active animations,
* effects, and resets velocity to `0`.
*/
jump(v) {
this.updateAndNotify(v);
this.prev = v;
this.stop();
if (this.stopPassiveEffect) this.stopPassiveEffect();
}
/**
* Returns the latest state of `MotionValue`
*
* @returns - The latest state of `MotionValue`
*
* @public
*/
get() {
if (collectMotionValues.current) {
collectMotionValues.current.push(this);
}
return this.current;
}
/**
* @public
*/
getPrevious() {
return this.prev;
}
/**
* Returns the latest velocity of `MotionValue`
*
* @returns - The latest velocity of `MotionValue`. Returns `0` if the state is non-numerical.
*
* @public
*/
getVelocity() {
// This could be isFloat(this.prev) && isFloat(this.current), but that would be wasteful
return this.canTrackVelocity ?
// These casts could be avoided if parseFloat would be typed better
(0,_utils_velocity_per_second_mjs__WEBPACK_IMPORTED_MODULE_1__/* .velocityPerSecond */ .f)(parseFloat(this.current) - parseFloat(this.prev), this.timeDelta) : 0;
}
/**
* Registers a new animation to control this `MotionValue`. Only one
* animation can drive a `MotionValue` at one time.
*
* ```jsx
* value.start()
* ```
*
* @param animation - A function that starts the provided animation
*
* @internal
*/
start(startAnimation) {
this.stop();
return new Promise(resolve => {
this.hasAnimated = true;
this.animation = startAnimation(resolve);
if (this.events.animationStart) {
this.events.animationStart.notify();
}
}).then(() => {
if (this.events.animationComplete) {
this.events.animationComplete.notify();
}
this.clearAnimation();
});
}
/**
* Stop the currently active animation.
*
* @public
*/
stop() {
if (this.animation) {
this.animation.stop();
if (this.events.animationCancel) {
this.events.animationCancel.notify();
}
}
this.clearAnimation();
}
/**
* Returns `true` if this value is currently animating.
*
* @public
*/
isAnimating() {
return !!this.animation;
}
clearAnimation() {
delete this.animation;
}
/**
* Destroy and clean up subscribers to this `MotionValue`.
*
* The `MotionValue` hooks like `useMotionValue` and `useTransform` automatically
* handle the lifecycle of the returned `MotionValue`, so this method is only necessary if you've manually
* created a `MotionValue` via the `motionValue` function.
*
* @public
*/
destroy() {
this.clearListeners();
this.stop();
if (this.stopPassiveEffect) {
this.stopPassiveEffect();
}
}
}
function motionValue(init, options) {
return new MotionValue(init, options);
}
/***/ }),
/***/ 333229:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* unused harmony export useElementScroll */
/* harmony import */ var _utils_warn_once_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(721657);
/* harmony import */ var _use_scroll_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(100308);
/**
* @deprecated useElementScroll is deprecated. Convert to useScroll({ container: ref })
*/
function useElementScroll(ref) {
if (false) {}
return useScroll({
container: ref
});
}
/***/ }),
/***/ 439849:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* unused harmony export useViewportScroll */
/* harmony import */ var _utils_warn_once_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(721657);
/* harmony import */ var _use_scroll_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(100308);
/**
* @deprecated useViewportScroll is deprecated. Convert to useScroll()
*/
function useViewportScroll() {
if (false) {}
return useScroll();
}
/***/ }),
/***/ 449598:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ u: () => (/* binding */ hex)
/* harmony export */ });
/* harmony import */ var _rgba_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(422585);
/* harmony import */ var _utils_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(529950);
function parseHex(v) {
let r = "";
let g = "";
let b = "";
let a = "";
// If we have 6 characters, ie #FF0000
if (v.length > 5) {
r = v.substring(1, 3);
g = v.substring(3, 5);
b = v.substring(5, 7);
a = v.substring(7, 9);
// Or we have 3 characters, ie #F00
} else {
r = v.substring(1, 2);
g = v.substring(2, 3);
b = v.substring(3, 4);
a = v.substring(4, 5);
r += r;
g += g;
b += b;
a += a;
}
return {
red: parseInt(r, 16),
green: parseInt(g, 16),
blue: parseInt(b, 16),
alpha: a ? parseInt(a, 16) / 255 : 1
};
}
const hex = {
test: (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_1__/* .isColorString */ .$)("#"),
parse: parseHex,
transform: _rgba_mjs__WEBPACK_IMPORTED_MODULE_0__/* .rgba */ .B.transform
};
/***/ }),
/***/ 898173:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ V: () => (/* binding */ hsla)
/* harmony export */ });
/* harmony import */ var _numbers_index_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(900478);
/* harmony import */ var _numbers_units_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(234223);
/* harmony import */ var _utils_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(497554);
/* harmony import */ var _utils_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(529950);
const hsla = {
test: (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_3__/* .isColorString */ .$)("hsl", "hue"),
parse: (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_3__/* .splitColor */ .q)("hue", "saturation", "lightness"),
transform: ({
hue,
saturation,
lightness,
alpha: alpha$1 = 1
}) => {
return "hsla(" + Math.round(hue) + ", " + _numbers_units_mjs__WEBPACK_IMPORTED_MODULE_1__/* .percent */ .KN.transform((0,_utils_mjs__WEBPACK_IMPORTED_MODULE_2__/* .sanitize */ .aj)(saturation)) + ", " + _numbers_units_mjs__WEBPACK_IMPORTED_MODULE_1__/* .percent */ .KN.transform((0,_utils_mjs__WEBPACK_IMPORTED_MODULE_2__/* .sanitize */ .aj)(lightness)) + ", " + (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_2__/* .sanitize */ .aj)(_numbers_index_mjs__WEBPACK_IMPORTED_MODULE_0__/* .alpha */ .X4.transform(alpha$1)) + ")";
}
};
/***/ }),
/***/ 449705:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ y: () => (/* binding */ color)
/* harmony export */ });
/* harmony import */ var _utils_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(497554);
/* harmony import */ var _hex_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(449598);
/* harmony import */ var _hsla_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(898173);
/* harmony import */ var _rgba_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(422585);
const color = {
test: v => _rgba_mjs__WEBPACK_IMPORTED_MODULE_3__/* .rgba */ .B.test(v) || _hex_mjs__WEBPACK_IMPORTED_MODULE_1__/* .hex */ .u.test(v) || _hsla_mjs__WEBPACK_IMPORTED_MODULE_2__/* .hsla */ .V.test(v),
parse: v => {
if (_rgba_mjs__WEBPACK_IMPORTED_MODULE_3__/* .rgba */ .B.test(v)) {
return _rgba_mjs__WEBPACK_IMPORTED_MODULE_3__/* .rgba */ .B.parse(v);
} else if (_hsla_mjs__WEBPACK_IMPORTED_MODULE_2__/* .hsla */ .V.test(v)) {
return _hsla_mjs__WEBPACK_IMPORTED_MODULE_2__/* .hsla */ .V.parse(v);
} else {
return _hex_mjs__WEBPACK_IMPORTED_MODULE_1__/* .hex */ .u.parse(v);
}
},
transform: v => {
return (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_0__/* .isString */ .Kg)(v) ? v : v.hasOwnProperty("red") ? _rgba_mjs__WEBPACK_IMPORTED_MODULE_3__/* .rgba */ .B.transform(v) : _hsla_mjs__WEBPACK_IMPORTED_MODULE_2__/* .hsla */ .V.transform(v);
}
};
/***/ }),
/***/ 422585:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ B: () => (/* binding */ rgba)
/* harmony export */ });
/* unused harmony export rgbUnit */
/* harmony import */ var _utils_clamp_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(893138);
/* harmony import */ var _numbers_index_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(900478);
/* harmony import */ var _utils_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(497554);
/* harmony import */ var _utils_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(529950);
const clampRgbUnit = v => (0,_utils_clamp_mjs__WEBPACK_IMPORTED_MODULE_0__/* .clamp */ .q)(0, 255, v);
const rgbUnit = {
..._numbers_index_mjs__WEBPACK_IMPORTED_MODULE_1__/* .number */ .ai,
transform: v => Math.round(clampRgbUnit(v))
};
const rgba = {
test: (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_3__/* .isColorString */ .$)("rgb", "red"),
parse: (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_3__/* .splitColor */ .q)("red", "green", "blue"),
transform: ({
red,
green,
blue,
alpha: alpha$1 = 1
}) => "rgba(" + rgbUnit.transform(red) + ", " + rgbUnit.transform(green) + ", " + rgbUnit.transform(blue) + ", " + (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_2__/* .sanitize */ .aj)(_numbers_index_mjs__WEBPACK_IMPORTED_MODULE_1__/* .alpha */ .X4.transform(alpha$1)) + ")"
};
/***/ }),
/***/ 529950:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ $: () => (/* binding */ isColorString),
/* harmony export */ q: () => (/* binding */ splitColor)
/* harmony export */ });
/* harmony import */ var _utils_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(497554);
/**
* Returns true if the provided string is a color, ie rgba(0,0,0,0) or #000,
* but false if a number or multiple colors
*/
const isColorString = (type, testProp) => v => {
return Boolean((0,_utils_mjs__WEBPACK_IMPORTED_MODULE_0__/* .isString */ .Kg)(v) && _utils_mjs__WEBPACK_IMPORTED_MODULE_0__/* .singleColorRegex */ .Fl.test(v) && v.startsWith(type) || testProp && Object.prototype.hasOwnProperty.call(v, testProp));
};
const splitColor = (aName, bName, cName) => v => {
if (!(0,_utils_mjs__WEBPACK_IMPORTED_MODULE_0__/* .isString */ .Kg)(v)) return v;
const [a, b, c, alpha] = v.match(_utils_mjs__WEBPACK_IMPORTED_MODULE_0__/* .floatRegex */ .SY);
return {
[aName]: parseFloat(a),
[bName]: parseFloat(b),
[cName]: parseFloat(c),
alpha: alpha !== undefined ? parseFloat(alpha) : 1
};
};
/***/ }),
/***/ 358986:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ p: () => (/* binding */ filter)
/* harmony export */ });
/* harmony import */ var core_js_modules_esnext_iterator_map_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(194364);
/* harmony import */ var _index_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(73748);
/* harmony import */ var _utils_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(497554);
/**
* Properties that should default to 1 or 100%
*/
const maxDefaults = new Set(["brightness", "contrast", "saturate", "opacity"]);
function applyDefaultFilter(v) {
const [name, value] = v.slice(0, -1).split("(");
if (name === "drop-shadow") return v;
const [number] = value.match(_utils_mjs__WEBPACK_IMPORTED_MODULE_2__/* .floatRegex */ .SY) || [];
if (!number) return v;
const unit = value.replace(number, "");
let defaultValue = maxDefaults.has(name) ? 1 : 0;
if (number !== value) defaultValue *= 100;
return name + "(" + defaultValue + unit + ")";
}
const functionRegex = /([a-z-]*)\(.*?\)/g;
const filter = {
..._index_mjs__WEBPACK_IMPORTED_MODULE_1__/* .complex */ .f,
getAnimatableNone: v => {
const functions = v.match(functionRegex);
return functions ? functions.map(applyDefaultFilter).join(" ") : v;
}
};
/***/ }),
/***/ 73748:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ V: () => (/* binding */ analyseComplexValue),
/* harmony export */ f: () => (/* binding */ complex)
/* harmony export */ });
/* harmony import */ var core_js_modules_es_array_includes_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(76281);
/* harmony import */ var core_js_modules_esnext_iterator_map_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(194364);
/* harmony import */ var _render_dom_utils_is_css_variable_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(511078);
/* harmony import */ var _utils_noop_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(78777);
/* harmony import */ var _color_index_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(449705);
/* harmony import */ var _numbers_index_mjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(900478);
/* harmony import */ var _utils_mjs__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(497554);
function test(v) {
var _a, _b;
return isNaN(v) && (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_6__/* .isString */ .Kg)(v) && (((_a = v.match(_utils_mjs__WEBPACK_IMPORTED_MODULE_6__/* .floatRegex */ .SY)) === null || _a === void 0 ? void 0 : _a.length) || 0) + (((_b = v.match(_utils_mjs__WEBPACK_IMPORTED_MODULE_6__/* .colorRegex */ .ne)) === null || _b === void 0 ? void 0 : _b.length) || 0) > 0;
}
const cssVarTokeniser = {
regex: _render_dom_utils_is_css_variable_mjs__WEBPACK_IMPORTED_MODULE_2__/* .cssVariableRegex */ .z2,
countKey: "Vars",
token: "${v}",
parse: _utils_noop_mjs__WEBPACK_IMPORTED_MODULE_3__/* .noop */ .l
};
const colorTokeniser = {
regex: _utils_mjs__WEBPACK_IMPORTED_MODULE_6__/* .colorRegex */ .ne,
countKey: "Colors",
token: "${c}",
parse: _color_index_mjs__WEBPACK_IMPORTED_MODULE_4__/* .color */ .y.parse
};
const numberTokeniser = {
regex: _utils_mjs__WEBPACK_IMPORTED_MODULE_6__/* .floatRegex */ .SY,
countKey: "Numbers",
token: "${n}",
parse: _numbers_index_mjs__WEBPACK_IMPORTED_MODULE_5__/* .number */ .ai.parse
};
function tokenise(info, {
regex,
countKey,
token,
parse
}) {
const matches = info.tokenised.match(regex);
if (!matches) return;
info["num" + countKey] = matches.length;
info.tokenised = info.tokenised.replace(regex, token);
info.values.push(...matches.map(parse));
}
function analyseComplexValue(value) {
const originalValue = value.toString();
const info = {
value: originalValue,
tokenised: originalValue,
values: [],
numVars: 0,
numColors: 0,
numNumbers: 0
};
if (info.value.includes("var(--")) tokenise(info, cssVarTokeniser);
tokenise(info, colorTokeniser);
tokenise(info, numberTokeniser);
return info;
}
function parseComplexValue(v) {
return analyseComplexValue(v).values;
}
function createTransformer(source) {
const {
values,
numColors,
numVars,
tokenised
} = analyseComplexValue(source);
const numValues = values.length;
return v => {
let output = tokenised;
for (let i = 0; i < numValues; i++) {
if (i < numVars) {
output = output.replace(cssVarTokeniser.token, v[i]);
} else if (i < numVars + numColors) {
output = output.replace(colorTokeniser.token, _color_index_mjs__WEBPACK_IMPORTED_MODULE_4__/* .color */ .y.transform(v[i]));
} else {
output = output.replace(numberTokeniser.token, (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_6__/* .sanitize */ .aj)(v[i]));
}
}
return output;
};
}
const convertNumbersToZero = v => typeof v === "number" ? 0 : v;
function getAnimatableNone(v) {
const parsed = parseComplexValue(v);
const transformer = createTransformer(v);
return transformer(parsed.map(convertNumbersToZero));
}
const complex = {
test,
parse: parseComplexValue,
createTransformer,
getAnimatableNone
};
/***/ }),
/***/ 900478:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ X4: () => (/* binding */ alpha),
/* harmony export */ ai: () => (/* binding */ number),
/* harmony export */ hs: () => (/* binding */ scale)
/* harmony export */ });
/* harmony import */ var _utils_clamp_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(893138);
const number = {
test: v => typeof v === "number",
parse: parseFloat,
transform: v => v
};
const alpha = {
...number,
transform: v => (0,_utils_clamp_mjs__WEBPACK_IMPORTED_MODULE_0__/* .clamp */ .q)(0, 1, v)
};
const scale = {
...number,
default: 1
};
/***/ }),
/***/ 234223:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ KN: () => (/* binding */ percent),
/* harmony export */ gQ: () => (/* binding */ progressPercentage),
/* harmony export */ px: () => (/* binding */ px),
/* harmony export */ uj: () => (/* binding */ degrees),
/* harmony export */ vh: () => (/* binding */ vh),
/* harmony export */ vw: () => (/* binding */ vw)
/* harmony export */ });
/* harmony import */ var _utils_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(497554);
const createUnitType = unit => ({
test: v => (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_0__/* .isString */ .Kg)(v) && v.endsWith(unit) && v.split(" ").length === 1,
parse: parseFloat,
transform: v => `${v}${unit}`
});
const degrees = createUnitType("deg");
const percent = createUnitType("%");
const px = createUnitType("px");
const vh = createUnitType("vh");
const vw = createUnitType("vw");
const progressPercentage = {
...percent,
parse: v => percent.parse(v) / 100,
transform: v => percent.transform(v * 100)
};
/***/ }),
/***/ 497554:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ Fl: () => (/* binding */ singleColorRegex),
/* harmony export */ Kg: () => (/* binding */ isString),
/* harmony export */ SY: () => (/* binding */ floatRegex),
/* harmony export */ aj: () => (/* binding */ sanitize),
/* harmony export */ ne: () => (/* binding */ colorRegex)
/* harmony export */ });
/**
* TODO: When we move from string as a source of truth to data models
* everything in this folder should probably be referred to as models vs types
*/
// If this number is a decimal, make it just five decimal places
// to avoid exponents
const sanitize = v => Math.round(v * 100000) / 100000;
const floatRegex = /(-)?([\d]*\.?[\d])+/g;
const colorRegex = /(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi;
const singleColorRegex = /^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;
function isString(v) {
return typeof v === "string";
}
/***/ }),
/***/ 383201:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ j: () => (/* binding */ useCombineMotionValues)
/* harmony export */ });
/* harmony import */ var core_js_modules_esnext_iterator_constructor_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(314846);
/* harmony import */ var core_js_modules_esnext_iterator_for_each_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(469655);
/* harmony import */ var core_js_modules_esnext_iterator_map_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(194364);
/* harmony import */ var _use_motion_value_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(73885);
/* harmony import */ var _utils_use_isomorphic_effect_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(117946);
/* harmony import */ var _frameloop_frame_mjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(277210);
function useCombineMotionValues(values, combineValues) {
/**
* Initialise the returned motion value. This remains the same between renders.
*/
const value = (0,_use_motion_value_mjs__WEBPACK_IMPORTED_MODULE_3__/* .useMotionValue */ .d)(combineValues());
/**
* Create a function that will update the template motion value with the latest values.
* This is pre-bound so whenever a motion value updates it can schedule its
* execution in Framesync. If it's already been scheduled it won't be fired twice
* in a single frame.
*/
const updateValue = () => value.set(combineValues());
/**
* Synchronously update the motion value with the latest values during the render.
* This ensures that within a React render, the styles applied to the DOM are up-to-date.
*/
updateValue();
/**
* Subscribe to all motion values found within the template. Whenever any of them change,
* schedule an update.
*/
(0,_utils_use_isomorphic_effect_mjs__WEBPACK_IMPORTED_MODULE_4__/* .useIsomorphicLayoutEffect */ .E)(() => {
const scheduleUpdate = () => _frameloop_frame_mjs__WEBPACK_IMPORTED_MODULE_5__/* .frame */ .Gt.update(updateValue, false, true);
const subscriptions = values.map(v => v.on("change", scheduleUpdate));
return () => {
subscriptions.forEach(unsubscribe => unsubscribe());
(0,_frameloop_frame_mjs__WEBPACK_IMPORTED_MODULE_5__/* .cancelFrame */ .WG)(updateValue);
};
});
return value;
}
/***/ }),
/***/ 413018:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ H: () => (/* binding */ useComputed)
/* harmony export */ });
/* harmony import */ var _index_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(239667);
/* harmony import */ var _use_combine_values_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(383201);
function useComputed(compute) {
/**
* Open session of collectMotionValues. Any MotionValue that calls get()
* will be saved into this array.
*/
_index_mjs__WEBPACK_IMPORTED_MODULE_0__/* .collectMotionValues */ .bt.current = [];
compute();
const value = (0,_use_combine_values_mjs__WEBPACK_IMPORTED_MODULE_1__/* .useCombineMotionValues */ .j)(_index_mjs__WEBPACK_IMPORTED_MODULE_0__/* .collectMotionValues */ .bt.current, compute);
/**
* Synchronously close session of collectMotionValues.
*/
_index_mjs__WEBPACK_IMPORTED_MODULE_0__/* .collectMotionValues */ .bt.current = undefined;
return value;
}
/***/ }),
/***/ 262345:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* unused harmony exports invertScale, useInvertedScale */
/* harmony import */ var _use_transform_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(979829);
/* harmony import */ var _utils_errors_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(841164);
/* harmony import */ var _use_motion_value_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(73885);
/* harmony import */ var _context_MotionContext_index_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(820631);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(63696);
// Keep things reasonable and avoid scale: Infinity. In practise we might need
// to add another value, opacity, that could interpolate scaleX/Y [0,0.01] => [0,1]
// to simply hide content at unreasonable scales.
const maxScale = 100000;
const invertScale = scale => scale > 0.001 ? 1 / scale : maxScale;
let hasWarned = false;
/**
* Returns a `MotionValue` each for `scaleX` and `scaleY` that update with the inverse
* of their respective parent scales.
*
* This is useful for undoing the distortion of content when scaling a parent component.
*
* By default, `useInvertedScale` will automatically fetch `scaleX` and `scaleY` from the nearest parent.
* By passing other `MotionValue`s in as `useInvertedScale({ scaleX, scaleY })`, it will invert the output
* of those instead.
*
* ```jsx
* const MyComponent = () => {
* const { scaleX, scaleY } = useInvertedScale()
* return <motion.div style={{ scaleX, scaleY }} />
* }
* ```
*
* @deprecated
*/
function useInvertedScale(scale) {
let parentScaleX = useMotionValue(1);
let parentScaleY = useMotionValue(1);
const {
visualElement
} = useContext(MotionContext);
invariant(!!(scale || visualElement), "If no scale values are provided, useInvertedScale must be used within a child of another motion component.");
warning(hasWarned, "useInvertedScale is deprecated and will be removed in 3.0. Use the layout prop instead.");
hasWarned = true;
if (scale) {
parentScaleX = scale.scaleX || parentScaleX;
parentScaleY = scale.scaleY || parentScaleY;
} else if (visualElement) {
parentScaleX = visualElement.getValue("scaleX", 1);
parentScaleY = visualElement.getValue("scaleY", 1);
}
const scaleX = useTransform(parentScaleX, invertScale);
const scaleY = useTransform(parentScaleY, invertScale);
return {
scaleX,
scaleY
};
}
/***/ }),
/***/ 167472:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* unused harmony export useMotionTemplate */
/* harmony import */ var core_js_modules_esnext_iterator_constructor_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(314846);
/* harmony import */ var core_js_modules_esnext_iterator_filter_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(327458);
/* harmony import */ var _use_combine_values_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(383201);
/* harmony import */ var _utils_is_motion_value_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(573970);
/**
* Combine multiple motion values into a new one using a string template literal.
*
* ```jsx
* import {
* motion,
* useSpring,
* useMotionValue,
* useMotionTemplate
* } from "framer-motion"
*
* function Component() {
* const shadowX = useSpring(0)
* const shadowY = useMotionValue(0)
* const shadow = useMotionTemplate`drop-shadow(${shadowX}px ${shadowY}px 20px rgba(0,0,0,0.3))`
*
* return <motion.div style={{ filter: shadow }} />
* }
* ```
*
* @public
*/
function useMotionTemplate(fragments, ...values) {
/**
* Create a function that will build a string from the latest motion values.
*/
const numFragments = fragments.length;
function buildValue() {
let output = ``;
for (let i = 0; i < numFragments; i++) {
output += fragments[i];
const value = values[i];
if (value) {
output += isMotionValue(value) ? value.get() : value;
}
}
return output;
}
return useCombineMotionValues(values.filter(isMotionValue), buildValue);
}
/***/ }),
/***/ 73885:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ d: () => (/* binding */ useMotionValue)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(63696);
/* harmony import */ var _index_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(239667);
/* harmony import */ var _context_MotionConfigContext_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(682832);
/* harmony import */ var _utils_use_constant_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(416155);
/**
* Creates a `MotionValue` to track the state and velocity of a value.
*
* Usually, these are created automatically. For advanced use-cases, like use with `useTransform`, you can create `MotionValue`s externally and pass them into the animated component via the `style` prop.
*
* ```jsx
* export const MyComponent = () => {
* const scale = useMotionValue(1)
*
* return <motion.div style={{ scale }} />
* }
* ```
*
* @param initial - The initial state.
*
* @public
*/
function useMotionValue(initial) {
const value = (0,_utils_use_constant_mjs__WEBPACK_IMPORTED_MODULE_3__/* .useConstant */ .M)(() => (0,_index_mjs__WEBPACK_IMPORTED_MODULE_1__/* .motionValue */ .OQ)(initial));
/**
* If this motion value is being used in static mode, like on
* the Framer canvas, force components to rerender when the motion
* value is updated.
*/
const {
isStatic
} = (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(_context_MotionConfigContext_mjs__WEBPACK_IMPORTED_MODULE_2__/* .MotionConfigContext */ .Q);
if (isStatic) {
const [, setLatest] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(initial);
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => value.on("change", setLatest), []);
}
return value;
}
/***/ }),
/***/ 100308:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* unused harmony export useScroll */
/* harmony import */ var _index_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(239667);
/* harmony import */ var _utils_use_constant_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(416155);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(63696);
/* harmony import */ var _utils_errors_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(841164);
/* harmony import */ var _render_dom_scroll_track_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(12582);
/* harmony import */ var _utils_use_isomorphic_effect_mjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(117946);
function refWarning(name, ref) {
warning(Boolean(!ref || ref.current), `You have defined a ${name} options but the provided ref is not yet hydrated, probably because it's defined higher up the tree. Try calling useScroll() in the same component as the ref, or setting its \`layoutEffect: false\` option.`);
}
const createScrollMotionValues = () => ({
scrollX: motionValue(0),
scrollY: motionValue(0),
scrollXProgress: motionValue(0),
scrollYProgress: motionValue(0)
});
function useScroll({
container,
target,
layoutEffect = true,
...options
} = {}) {
const values = useConstant(createScrollMotionValues);
const useLifecycleEffect = layoutEffect ? useIsomorphicLayoutEffect : useEffect;
useLifecycleEffect(() => {
refWarning("target", target);
refWarning("container", container);
return scrollInfo(({
x,
y
}) => {
values.scrollX.set(x.current);
values.scrollXProgress.set(x.progress);
values.scrollY.set(y.current);
values.scrollYProgress.set(y.progress);
}, {
...options,
container: (container === null || container === void 0 ? void 0 : container.current) || undefined,
target: (target === null || target === void 0 ? void 0 : target.current) || undefined
});
}, [container, target, JSON.stringify(options.offset)]);
return values;
}
/***/ }),
/***/ 375884:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* unused harmony export useSpring */
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(63696);
/* harmony import */ var _utils_is_motion_value_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(573970);
/* harmony import */ var _use_motion_value_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(73885);
/* harmony import */ var _context_MotionConfigContext_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(682832);
/* harmony import */ var _utils_use_isomorphic_effect_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(117946);
/* harmony import */ var _animation_animators_js_index_mjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(731603);
/* harmony import */ var _utils_time_conversion_mjs__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(660127);
/* harmony import */ var _frameloop_frame_mjs__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(277210);
/**
* Creates a `MotionValue` that, when `set`, will use a spring animation to animate to its new state.
*
* It can either work as a stand-alone `MotionValue` by initialising it with a value, or as a subscriber
* to another `MotionValue`.
*
* @remarks
*
* ```jsx
* const x = useSpring(0, { stiffness: 300 })
* const y = useSpring(x, { damping: 10 })
* ```
*
* @param inputValue - `MotionValue` or number. If provided a `MotionValue`, when the input `MotionValue` changes, the created `MotionValue` will spring towards that value.
* @param springConfig - Configuration options for the spring.
* @returns `MotionValue`
*
* @public
*/
function useSpring(source, config = {}) {
const {
isStatic
} = useContext(MotionConfigContext);
const activeSpringAnimation = useRef(null);
const value = useMotionValue(isMotionValue(source) ? source.get() : source);
const stopAnimation = () => {
if (activeSpringAnimation.current) {
activeSpringAnimation.current.stop();
}
};
useInsertionEffect(() => {
return value.attach((v, set) => {
/**
* A more hollistic approach to this might be to use isStatic to fix VisualElement animations
* at that level, but this will work for now
*/
if (isStatic) return set(v);
stopAnimation();
activeSpringAnimation.current = animateValue({
keyframes: [value.get(), v],
velocity: value.getVelocity(),
type: "spring",
restDelta: 0.001,
restSpeed: 0.01,
...config,
onUpdate: set
});
/**
* If we're between frames, resync the animation to the frameloop.
*/
if (!frameData.isProcessing) {
const delta = performance.now() - frameData.timestamp;
if (delta < 30) {
activeSpringAnimation.current.time = millisecondsToSeconds(delta);
}
}
return value.get();
}, stopAnimation);
}, [JSON.stringify(config)]);
useIsomorphicLayoutEffect(() => {
if (isMotionValue(source)) {
return source.on("change", v => value.set(parseFloat(v)));
}
}, [value]);
return value;
}
/***/ }),
/***/ 846820:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* unused harmony export useTime */
/* harmony import */ var _utils_use_animation_frame_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(404175);
/* harmony import */ var _use_motion_value_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(73885);
function useTime() {
const time = useMotionValue(0);
useAnimationFrame(t => time.set(t));
return time;
}
/***/ }),
/***/ 979829:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ G: () => (/* binding */ useTransform)
/* harmony export */ });
/* harmony import */ var _utils_transform_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(229455);
/* harmony import */ var _use_combine_values_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(383201);
/* harmony import */ var _utils_use_constant_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(416155);
/* harmony import */ var _use_computed_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(413018);
function useTransform(input, inputRangeOrTransformer, outputRange, options) {
if (typeof input === "function") {
return (0,_use_computed_mjs__WEBPACK_IMPORTED_MODULE_3__/* .useComputed */ .H)(input);
}
const transformer = typeof inputRangeOrTransformer === "function" ? inputRangeOrTransformer : (0,_utils_transform_mjs__WEBPACK_IMPORTED_MODULE_0__/* .transform */ .p)(inputRangeOrTransformer, outputRange, options);
return Array.isArray(input) ? useListTransform(input, transformer) : useListTransform([input], ([latest]) => transformer(latest));
}
function useListTransform(values, transformer) {
const latest = (0,_utils_use_constant_mjs__WEBPACK_IMPORTED_MODULE_2__/* .useConstant */ .M)(() => []);
return (0,_use_combine_values_mjs__WEBPACK_IMPORTED_MODULE_1__/* .useCombineMotionValues */ .j)(values, () => {
latest.length = 0;
const numValues = values.length;
for (let i = 0; i < numValues; i++) {
latest[i] = values[i].get();
}
return transformer(latest);
});
}
/***/ }),
/***/ 106406:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* unused harmony export useVelocity */
/* harmony import */ var _utils_use_motion_value_event_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(261006);
/* harmony import */ var _use_motion_value_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(73885);
/**
* Creates a `MotionValue` that updates when the velocity of the provided `MotionValue` changes.
*
* ```javascript
* const x = useMotionValue(0)
* const xVelocity = useVelocity(x)
* const xAcceleration = useVelocity(xVelocity)
* ```
*
* @public
*/
function useVelocity(value) {
const velocity = useMotionValue(value.getVelocity());
useMotionValueEvent(value, "velocityChange", newVelocity => {
velocity.set(newVelocity);
});
return velocity;
}
/***/ }),
/***/ 975469:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* unused harmony exports WillChangeMotionValue, useWillChange */
/* harmony import */ var _render_dom_utils_is_css_variable_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(511078);
/* harmony import */ var _render_html_utils_transform_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(353994);
/* harmony import */ var _utils_array_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(890604);
/* harmony import */ var _utils_use_constant_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(416155);
/* harmony import */ var _index_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(239667);
/* harmony import */ var _render_dom_utils_camel_to_dash_mjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(493388);
class WillChangeMotionValue extends _index_mjs__WEBPACK_IMPORTED_MODULE_4__/* .MotionValue */ .KG {
constructor() {
super(...arguments);
this.members = [];
this.transforms = new Set();
}
add(name) {
let memberName;
if (_render_html_utils_transform_mjs__WEBPACK_IMPORTED_MODULE_1__/* .transformProps */ .f.has(name)) {
this.transforms.add(name);
memberName = "transform";
} else if (!name.startsWith("origin") && !(0,_render_dom_utils_is_css_variable_mjs__WEBPACK_IMPORTED_MODULE_0__/* .isCSSVariableName */ .j4)(name) && name !== "willChange") {
memberName = (0,_render_dom_utils_camel_to_dash_mjs__WEBPACK_IMPORTED_MODULE_5__/* .camelToDash */ .I)(name);
}
if (memberName) {
(0,_utils_array_mjs__WEBPACK_IMPORTED_MODULE_2__/* .addUniqueItem */ .Kq)(this.members, memberName);
this.update();
}
}
remove(name) {
if (_render_html_utils_transform_mjs__WEBPACK_IMPORTED_MODULE_1__/* .transformProps */ .f.has(name)) {
this.transforms.delete(name);
if (!this.transforms.size) {
(0,_utils_array_mjs__WEBPACK_IMPORTED_MODULE_2__/* .removeItem */ .Ai)(this.members, "transform");
}
} else {
(0,_utils_array_mjs__WEBPACK_IMPORTED_MODULE_2__/* .removeItem */ .Ai)(this.members, (0,_render_dom_utils_camel_to_dash_mjs__WEBPACK_IMPORTED_MODULE_5__/* .camelToDash */ .I)(name));
}
this.update();
}
update() {
this.set(this.members.length ? this.members.join(", ") : "auto");
}
}
function useWillChange() {
return useConstant(() => new WillChangeMotionValue("auto"));
}
/***/ }),
/***/ 146547:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ k: () => (/* binding */ isWillChangeMotionValue)
/* harmony export */ });
/* harmony import */ var _utils_is_motion_value_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(573970);
function isWillChangeMotionValue(value) {
return Boolean((0,_utils_is_motion_value_mjs__WEBPACK_IMPORTED_MODULE_0__/* .isMotionValue */ .S)(value) && value.add);
}
/***/ }),
/***/ 573970:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ S: () => (/* binding */ isMotionValue)
/* harmony export */ });
const isMotionValue = value => Boolean(value && value.getVelocity);
/***/ }),
/***/ 736196:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ u: () => (/* binding */ resolveMotionValue)
/* harmony export */ });
/* harmony import */ var _utils_resolve_value_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(744999);
/* harmony import */ var _is_motion_value_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(573970);
/**
* If the provided value is a MotionValue, this returns the actual value, otherwise just the value itself
*
* TODO: Remove and move to library
*/
function resolveMotionValue(value) {
const unwrappedValue = (0,_is_motion_value_mjs__WEBPACK_IMPORTED_MODULE_1__/* .isMotionValue */ .S)(value) ? value.get() : value;
return (0,_utils_resolve_value_mjs__WEBPACK_IMPORTED_MODULE_0__/* .isCustomValue */ .B)(unwrappedValue) ? unwrappedValue.toValue() : unwrappedValue;
}
/***/ })
}]);
"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[37043],{725438:(t,e,n)=>{n.d(e,{P:()=>o}),n(314846),n(327458),n(469655),n(194364);var s=n(879783),i=n(8065);class o{constructor(t){this.animations=t.filter(Boolean)}then(t,e){return Promise.all(this.animations).then(t).catch(e)}getAll(t){return this.animations[0][t]}setAll(t,e){for(let n=0;n<this.animations.length;n++)this.animations[n][t]=e}attachTimeline(t){const e=this.animations.map((e=>{if(!(0,i.J)()||!e.attachTimeline)return e.pause(),(0,s.y)((t=>{e.time=e.duration*t}),t);e.attachTimeline(t)}));return()=>{e.forEach(((t,e)=>{t&&t(),this.animations[e].stop()}))}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get duration(){let t=0;for(let e=0;e<this.animations.length;e++)t=Math.max(t,this.animations[e].duration);return t}runAll(t){this.animations.forEach((e=>e[t]()))}play(){this.runAll("play")}pause(){this.runAll("pause")}stop(){this.runAll("stop")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}},279611:(t,e,n)=>{n.d(e,{i:()=>m}),n(314846),n(469655);var s=n(801822),i=n(550529),o=n(841164),r=n(725438),a=n(780119),l=n(430388),u=n(444458),c=n(641041),h=n(486360),d=n(573970);function p(t,e,n,a){const c=(0,s.K)(t,a),h=c.length;(0,o.V)(Boolean(h),"No valid element provided.");const d=[];for(let s=0;s<h;s++){const t=c[s];i.C.has(t)||(0,u.B)(t);const o=i.C.get(t),r={...n};"function"==typeof r.delay&&(r.delay=r.delay(s,h)),d.push(...(0,l.$)(o,{...e,transition:r},{}))}return new r.P(d)}const m=function(t,e,n){let s;var i;return i=t,s=Array.isArray(i)&&Array.isArray(i[0])?function(t,e,n){const s=[];return(0,h.l)(t,e,n).forEach((({keyframes:t,transition:e},n)=>{let i;i=(0,d.S)(n)?(0,c.z)(n,t.default,e.default):p(n,t,e),s.push(i)})),new r.P(s)}(t,e,f):(0,a.m)(e)?p(t,e,n,f):(0,c.z)(t,e,n),s};var f},965402:(t,e,n)=>{n.d(e,{Q:()=>o});var s=n(731603),i=n(78777);function o({keyframes:t,delay:e,onUpdate:n,onComplete:o}){const r=()=>(n&&n(t[t.length-1]),o&&o(),{time:0,speed:1,duration:0,play:i.l,pause:i.l,stop:i.l,then:t=>(t(),Promise.resolve()),cancel:i.l,complete:i.l});return e?(0,s.L)({keyframes:[0,1],duration:0,delay:e,onComplete:r}):r()}},238973:(t,e,n)=>{n.d(e,{E:()=>i});var s=n(277210);const i=t=>{const e=({timestamp:e})=>t(e);return{start:()=>s.Gt.update(e,!0),stop:()=>(0,s.WG)(e),now:()=>s.uv.isProcessing?s.uv.timestamp:performance.now()}}},731603:(t,e,n)=>{n.d(e,{L:()=>d});var s=n(871098),i=n(311789),o=n(580835),r=n(238973),a=n(323662),l=n(893138),u=n(660127),c=n(445795);n(841164);const h={decay:o.B,inertia:o.B,tween:s.i,keyframes:s.i,spring:i.o};function d({autoplay:t=!0,delay:e=0,driver:n=r.E,keyframes:i,type:o="keyframes",repeat:d=0,repeatDelay:p=0,repeatType:m="loop",onPlay:f,onStop:v,onComplete:g,onUpdate:y,...x}){let P,w,b=1,S=!1;const A=()=>{w=new Promise((t=>{P=t}))};let T;A();const E=h[o]||s.i;let C;E!==s.i&&"number"!=typeof i[0]&&(C=(0,a.G)([0,100],i,{clamp:!1}),i=[0,100]);const V=E({...x,keyframes:i});let M;"mirror"===m&&(M=E({...x,keyframes:[...i].reverse(),velocity:-(x.velocity||0)}));let D="idle",k=null,j=null,R=null;null===V.calculatedDuration&&d&&(V.calculatedDuration=(0,c.t)(V));const{calculatedDuration:B}=V;let L=1/0,F=1/0;null!==B&&(L=B+p,F=L*(d+1)-p);let O=0;const I=t=>{if(null===j)return;b>0&&(j=Math.min(j,t)),b<0&&(j=Math.min(t-F/b,j)),O=null!==k?k:Math.round(t-j)*b;const n=O-e*(b>=0?1:-1),s=b>=0?n<0:n>F;O=Math.max(n,0),"finished"===D&&null===k&&(O=F);let o=O,r=V;if(d){const t=Math.min(O,F)/L;let e=Math.floor(t),n=t%1;!n&&t>=1&&(n=1),1===n&&e--,e=Math.min(e,d+1),Boolean(e%2)&&("reverse"===m?(n=1-n,p&&(n-=p/L)):"mirror"===m&&(r=M)),o=(0,l.q)(0,1,n)*L}const a=s?{done:!1,value:i[0]}:r.next(o);C&&(a.value=C(a.value));let{done:u}=a;s||null===B||(u=b>=0?O>=F:O<=0);const c=null===k&&("finished"===D||"running"===D&&u);return y&&y(a.value),c&&G(),a},U=()=>{T&&T.stop(),T=void 0},X=()=>{D="idle",U(),P(),A(),j=R=null},G=()=>{D="finished",g&&g(),U(),P()},W=()=>{if(S)return;T||(T=n(I));const t=T.now();f&&f(),null!==k?j=t-k:j&&"finished"!==D||(j=t),"finished"===D&&A(),R=j,k=null,D="running",T.start()};t&&W();const $={then:(t,e)=>w.then(t,e),get time(){return(0,u.X)(O)},set time(t){t=(0,u.f)(t),O=t,null===k&&T&&0!==b?j=T.now()-t/b:k=t},get duration(){const t=null===V.calculatedDuration?(0,c.t)(V):V.calculatedDuration;return(0,u.X)(t)},get speed(){return b},set speed(t){t!==b&&T&&(b=t,$.time=(0,u.X)(O))},get state(){return D},play:W,pause:()=>{D="paused",k=O},stop:()=>{S=!0,"idle"!==D&&(D="idle",v&&v(),X())},cancel:()=>{null!==R&&I(R),X()},complete:()=>{D="finished"},sample:t=>(j=0,I(t))};return $}},731339:(t,e,n)=>{n.d(e,{s:()=>v});var s=n(970524),i=n(655719),o=n(946366),r=n(731603),a=n(660127),l=n(696407),u=n(78777),c=n(277210);const h=(0,l.p)((()=>Object.hasOwnProperty.call(Element.prototype,"animate"))),d=new Set(["opacity","clipPath","filter","transform","backgroundColor"]),p=10,m=2e4,f=(t,e)=>"spring"===e.type||"backgroundColor"===t||!(0,i.yL)(e.ease);function v(t,e,{onUpdate:n,onComplete:i,...l}){if(!h()||!d.has(e)||l.repeatDelay||"mirror"===l.repeatType||0===l.damping||"inertia"===l.type)return!1;let v,g,y=!1,x=!1;const P=()=>{g=new Promise((t=>{v=t}))};P();let{keyframes:w,duration:b=300,ease:S,times:A}=l;if(f(e,l)){const t=(0,r.L)({...l,repeat:0,delay:0});let e={done:!1,value:w[0]};const n=[];let s=0;for(;!e.done&&s<m;)e=t.sample(s),n.push(e.value),s+=p;A=void 0,w=n,b=s-p,S="linear"}const T=(0,s.X)(t.owner.current,e,w,{...l,duration:b,ease:S,times:A}),E=()=>{x=!1,T.cancel()},C=()=>{x=!0,c.Gt.update(E),v(),P()};return T.onfinish=()=>{x||(t.set((0,o.X)(w,l)),i&&i(),C())},{then:(t,e)=>g.then(t,e),attachTimeline:t=>(T.timeline=t,T.onfinish=null,u.l),get time(){return(0,a.X)(T.currentTime||0)},set time(t){T.currentTime=(0,a.f)(t)},get speed(){return T.playbackRate},set speed(t){T.playbackRate=t},get duration(){return(0,a.X)(b)},play:()=>{y||(T.play(),(0,c.WG)(E))},pause:()=>T.pause(),stop:()=>{if(y=!0,"idle"===T.playState)return;const{currentTime:e}=T;if(e){const n=(0,r.L)({...l,autoplay:!1});t.setWithVelocity(n.sample(e-p).value,n.sample(e).value,p)}C()},complete:()=>{x||T.finish()},cancel:C}}},655719:(t,e,n)=>{n.d(e,{TU:()=>a,yL:()=>i}),n(314846),n(563333),n(194364);var s=n(309447);function i(t){return Boolean(!t||"string"==typeof t&&r[t]||(0,s.D)(t)||Array.isArray(t)&&t.every(i))}const o=([t,e,n,s])=>`cubic-bezier(${t}, ${e}, ${n}, ${s})`,r={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:o([0,.65,.55,1]),circOut:o([.55,0,1,.45]),backIn:o([.31,.01,.66,-.59]),backOut:o([.33,1.53,.69,.99])};function a(t){if(t)return(0,s.D)(t)?o(t):Array.isArray(t)?t.map(a):r[t]}},970524:(t,e,n)=>{n.d(e,{X:()=>i});var s=n(655719);function i(t,e,n,{delay:i=0,duration:o,repeat:r=0,repeatType:a="loop",ease:l,times:u}={}){const c={[e]:n};u&&(c.offset=u);const h=(0,s.TU)(l);return Array.isArray(h)&&(c.easing=h),t.animate(c,{delay:i,duration:o,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:r+1,direction:"reverse"===a?"alternate":"normal"})}},946366:(t,e,n)=>{function s(t,{repeat:e,repeatType:n="loop"}){return t[e&&"loop"!==n&&e%2==1?0:t.length-1]}n.d(e,{X:()=>s})},580835:(t,e,n)=>{n.d(e,{B:()=>o});var s=n(311789),i=n(653864);function o({keyframes:t,velocity:e=0,power:n=.8,timeConstant:o=325,bounceDamping:r=10,bounceStiffness:a=500,modifyTarget:l,min:u,max:c,restDelta:h=.5,restSpeed:d}){const p=t[0],m={done:!1,value:p},f=t=>void 0===u?c:void 0===c||Math.abs(u-t)<Math.abs(c-t)?u:c;let v=n*e;const g=p+v,y=void 0===l?g:l(g);y!==g&&(v=y-p);const x=t=>-v*Math.exp(-t/o),P=t=>y+x(t),w=t=>{const e=x(t),n=P(t);m.done=Math.abs(e)<=h,m.value=m.done?y:n};let b,S;const A=t=>{var e;e=m.value,(void 0!==u&&e<u||void 0!==c&&e>c)&&(b=t,S=(0,s.o)({keyframes:[m.value,f(m.value)],velocity:(0,i.Y)(P,t,m.value),damping:r,stiffness:a,restDelta:h,restSpeed:d}))};return A(0),{calculatedDuration:null,next:t=>{let e=!1;return S||void 0!==b||(e=!0,w(t),A(t)),void 0!==b&&t>b?S.next(t-b):(!e&&w(t),m)}}}},871098:(t,e,n)=>{n.d(e,{i:()=>u}),n(194364);var s=n(95709),i=n(148357),o=n(392649),r=n(323662),a=n(766869),l=n(418057);function u({duration:t=300,keyframes:e,times:n,ease:u="easeInOut"}){const c=(0,i.h)(u)?u.map(o.K):(0,o.K)(u),h={done:!1,value:e[0]},d=(0,l.A)(n&&n.length===e.length?n:(0,a.Z)(e),t),p=(0,r.G)(d,e,{ease:Array.isArray(c)?c:(m=e,f=c,m.map((()=>f||s.am)).splice(0,m.length-1))});var m,f;return{calculatedDuration:t,next:e=>(h.value=p(e),h.done=e>=t,h)}}},922286:(t,e,n)=>{n.d(e,{aU:()=>p,pX:()=>h});var s=n(841164),i=n(893138),o=n(660127);const r=.001,a=.01,l=10,u=.05,c=1;function h({duration:t=800,bounce:e=.25,velocity:n=0,mass:h=1}){let m,f;(0,s.$)(t<=(0,o.f)(l),"Spring duration must be 10 seconds or less");let v=1-e;v=(0,i.q)(u,c,v),t=(0,i.q)(a,l,(0,o.X)(t)),v<1?(m=e=>{const s=e*v,i=s*t,o=s-n,a=p(e,v),l=Math.exp(-i);return r-o/a*l},f=e=>{const s=e*v*t,i=s*n+n,o=Math.pow(v,2)*Math.pow(e,2)*t,a=Math.exp(-s),l=p(Math.pow(e,2),v);return(-m(e)+r>0?-1:1)*((i-o)*a)/l}):(m=e=>Math.exp(-e*t)*((e-n)*t+1)-r,f=e=>Math.exp(-e*t)*(t*t*(n-e)));const g=function(t,e,n){let s=n;for(let i=1;i<d;i++)s-=t(s)/e(s);return s}(m,f,5/t);if(t=(0,o.f)(t),isNaN(g))return{stiffness:100,damping:10,duration:t};{const e=Math.pow(g,2)*h;return{stiffness:e,damping:2*v*Math.sqrt(h*e),duration:t}}}const d=12;function p(t,e){return t*Math.sqrt(1-e*e)}},311789:(t,e,n)=>{n.d(e,{o:()=>u}),n(314846),n(275568);var s=n(660127),i=n(653864),o=n(922286);const r=["duration","bounce"],a=["stiffness","damping","mass"];function l(t,e){return e.some((e=>void 0!==t[e]))}function u({keyframes:t,restDelta:e,restSpeed:n,...u}){const c=t[0],h=t[t.length-1],d={done:!1,value:c},{stiffness:p,damping:m,mass:f,duration:v,velocity:g,isResolvedFromDuration:y}=function(t){let e={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...t};if(!l(t,a)&&l(t,r)){const n=(0,o.pX)(t);e={...e,...n,mass:1},e.isResolvedFromDuration=!0}return e}({...u,velocity:-(0,s.X)(u.velocity||0)}),x=g||0,P=m/(2*Math.sqrt(p*f)),w=h-c,b=(0,s.X)(Math.sqrt(p/f)),S=Math.abs(w)<5;let A;if(n||(n=S?.01:2),e||(e=S?.005:.5),P<1){const t=(0,o.aU)(b,P);A=e=>{const n=Math.exp(-P*b*e);return h-n*((x+P*b*w)/t*Math.sin(t*e)+w*Math.cos(t*e))}}else if(1===P)A=t=>h-Math.exp(-b*t)*(w+(x+b*w)*t);else{const t=b*Math.sqrt(P*P-1);A=e=>{const n=Math.exp(-P*b*e),s=Math.min(t*e,300);return h-n*((x+P*b*w)*Math.sinh(s)+t*w*Math.cosh(s))/t}}return{calculatedDuration:y&&v||null,next:t=>{const s=A(t);if(y)d.done=t>=v;else{let o=x;0!==t&&(o=P<1?(0,i.Y)(A,t,s):0);const r=Math.abs(o)<=n,a=Math.abs(h-s)<=e;d.done=r&&a}return d.value=d.done?h:s,d}}}},445795:(t,e,n)=>{n.d(e,{Y:()=>s,t:()=>i});const s=2e4;function i(t){let e=0,n=t.next(e);for(;!n.done&&e<s;)e+=50,n=t.next(e);return e>=s?1/0:e}},653864:(t,e,n)=>{n.d(e,{Y:()=>o});var s=n(540255);const i=5;function o(t,e,n){const o=Math.max(e-i,0);return(0,s.f)(n-t(o),e-o)}},439284:(t,e,n)=>{n(314846),n(469655),n(841164),n(482200),n(104570)},89528:(t,e,n)=>{n(314846),n(469655),n(416155),n(758369),n(279611)},313036:(t,e,n)=>{n(63696),n(416155),n(482200);var s=n(366084);n(298944),n(373518),n(104570);const i=()=>({});(0,s.T)({scrapeMotionValuesFromProps:i,createRenderState:i})},578843:(t,e,n)=>{n(439284),n(416155),n(117946)},430091:(t,e,n)=>{n.d(e,{f:()=>m});var s=n(841164),i=n(660127),o=n(300934),r=n(731339),a=n(965402),l=n(961748),u=n(710841),c=n(87451),h=n(955104),d=n(731603),p=n(718966);const m=(t,e,n,m={})=>f=>{const v=(0,h.r)(m,t)||{},g=v.delay||m.delay||0;let{elapsed:y=0}=m;y-=(0,i.f)(g);const x=(0,c.I)(e,t,n,v),P=x[0],w=x[x.length-1],b=(0,u.P)(t,P),S=(0,u.P)(t,w);(0,s.$)(b===S,`You are trying to animate ${t} from "${P}" to "${w}". ${P} is not an animatable value - to enable this animation set ${P} to a value animatable to ${w} via the \`style\` property.`);let A={keyframes:x,velocity:e.getVelocity(),ease:"easeOut",...v,delay:-y,onUpdate:t=>{e.set(t),v.onUpdate&&v.onUpdate(t)},onComplete:()=>{f(),v.onComplete&&v.onComplete()}};if((0,h.D)(v)||(A={...A,...(0,l.x)(t,A)}),A.duration&&(A.duration=(0,i.f)(A.duration)),A.repeatDelay&&(A.repeatDelay=(0,i.f)(A.repeatDelay)),!b||!S||o.d.current||!1===v.type||p.W.skipAnimations)return(0,a.Q)(o.d.current?{...A,delay:0}:A);if(!m.isHandoff&&e.owner&&e.owner.current instanceof HTMLElement&&!e.owner.getProps().onUpdate){const n=(0,r.s)(e,t,A);if(n)return n}return(0,d.L)(A)}},641041:(t,e,n)=>{n.d(e,{z:()=>r});var s=n(430091),i=n(239667),o=n(573970);function r(t,e,n){const r=(0,o.S)(t)?t:(0,i.OQ)(t);return r.start((0,s.f)("",r,e,n)),r.animation}},430388:(t,e,n)=>{n.d(e,{$:()=>d});var s=n(353994),i=n(150170),o=n(430091),r=n(146547),a=n(482200),l=n(955104),u=n(277210);function c({protectedKeys:t,needsAnimating:e},n){const s=t.hasOwnProperty(n)&&!0!==e[n];return e[n]=!1,s}function h(t,e){const n=t.get();if(!Array.isArray(e))return n!==e;for(let s=0;s<e.length;s++)if(e[s]!==n)return!0}function d(t,e,{delay:n=0,transitionOverride:d,type:p}={}){let{transition:m=t.getDefaultTransition(),transitionEnd:f,...v}=t.makeTargetAnimatable(e);const g=t.getValue("willChange");d&&(m=d);const y=[],x=p&&t.animationState&&t.animationState.getState()[p];for(const a in v){const e=t.getValue(a),d=v[a];if(!e||void 0===d||x&&c(x,a))continue;const p={delay:n,elapsed:0,...(0,l.r)(m||{},a)};if(window.HandoffAppearAnimations){const n=t.getProps()[i.n];if(n){const t=window.HandoffAppearAnimations(n,a,e,u.Gt);null!==t&&(p.elapsed=t,p.isHandoff=!0)}}let f=!p.isHandoff&&!h(e,d);if("spring"===p.type&&(e.getVelocity()||p.velocity)&&(f=!1),e.animation&&(f=!1),f)continue;e.start((0,o.f)(a,e,d,t.shouldReduceMotion&&s.f.has(a)?{type:!1}:p));const P=e.animation;(0,r.k)(g)&&(g.add(a),P.then((()=>g.remove(a)))),y.push(P)}return f&&Promise.all(y).then((()=>{f&&(0,a.Uo)(t,f)})),y}},80930:(t,e,n)=>{n.d(e,{l:()=>o}),n(314846),n(469655);var s=n(683695),i=n(430388);function o(t,e,n={}){const a=(0,s.K)(t,e,n.custom);let{transition:l=t.getDefaultTransition()||{}}=a||{};n.transitionOverride&&(l=n.transitionOverride);const u=a?()=>Promise.all((0,i.$)(t,a,n)):()=>Promise.resolve(),c=t.variantChildren&&t.variantChildren.size?(s=0)=>{const{delayChildren:i=0,staggerChildren:a,staggerDirection:u}=l;return function(t,e,n=0,s=0,i=1,a){const l=[],u=(t.variantChildren.size-1)*s,c=1===i?(t=0)=>t*s:(t=0)=>u-t*s;return Array.from(t.variantChildren).sort(r).forEach(((t,s)=>{t.notify("AnimationStart",e),l.push(o(t,e,{...a,delay:n+c(s)}).then((()=>t.notify("AnimationComplete",e))))})),Promise.all(l)}(t,e,i+s,a,u,n)}:()=>Promise.resolve(),{when:h}=l;if(h){const[t,e]="beforeChildren"===h?[u,c]:[c,u];return t().then((()=>e()))}return Promise.all([u(),c(n.delay)])}function r(t,e){return t.sortNodePosition(e)}},104570:(t,e,n)=>{n.d(e,{_:()=>r}),n(194364);var s=n(683695),i=n(430388),o=n(80930);function r(t,e,n={}){let r;if(t.notify("AnimationStart",e),Array.isArray(e)){const s=e.map((e=>(0,o.l)(t,e,n)));r=Promise.all(s)}else if("string"==typeof e)r=(0,o.l)(t,e,n);else{const o="function"==typeof e?(0,s.K)(t,e,n.custom):e;r=Promise.all((0,i.$)(t,o,n))}return r.then((()=>t.notify("AnimationComplete",e)))}},150170:(t,e,n)=>{n.d(e,{n:()=>s});const s="data-"+(0,n(493388).I)("framerAppearId")},465446:(t,e,n)=>{n(353994),n(571331),n(564615)},966540:(t,e,n)=>{n(564615),n(970524),n(150170),n(465446),n(571331),n(78777)},564615:(t,e,n)=>{},571331:(t,e,n)=>{new Map},486360:(t,e,n)=>{n.d(e,{l:()=>m}),n(295913),n(412587),n(314846),n(563333),n(469655);var s=n(838389),i=n(801822),o=n(766869),r=n(774641),a=n(799020),l=n(660127),u=n(573970),c=n(387441),h=n(157766),d=n(203846);const p="easeInOut";function m(t,{defaultTransition:e={},...n}={},m){const x=e.duration||.3,w=new Map,b=new Map,S={},A=new Map;let T=0,E=0,C=0;for(let a=0;a<t.length;a++){const n=t[a];if("string"==typeof n){A.set(n,E);continue}if(!Array.isArray(n)){A.set(n.name,(0,c.u)(E,n.at,T,A));continue}let[d,p,w={}]=n;void 0!==w.at&&(E=(0,c.u)(E,w.at,T,A));let V=0;const M=(t,n,i,a=0,u=0)=>{const c=g(t),{delay:d=0,times:p=(0,o.Z)(c),type:m="keyframes",...f}=n;let{ease:v=e.ease||"easeOut",duration:y}=n;const w="function"==typeof d?d(a,u):d,b=c.length;if(b<=2&&"spring"===m){let t=100;if(2===b&&P(c)){const e=c[1]-c[0];t=Math.abs(e)}const e={...f};void 0!==y&&(e.duration=(0,l.f)(y));const n=(0,s.X)(e,t);v=n.ease,y=n.duration}null!=y||(y=x);const S=E+w,A=S+y;1===p.length&&0===p[0]&&(p[1]=1);const T=p.length-c.length;T>0&&(0,r.f)(p,T),1===c.length&&c.unshift(null),(0,h.H)(i,c,v,p,S,A),V=Math.max(w+y,V),C=Math.max(A,C)};if((0,u.S)(d))M(p,w,v("default",f(d,b)));else{const t=(0,i.K)(d,m,S),e=t.length;for(let n=0;n<e;n++){const s=f(t[n],b);for(const t in p)M(p[t],y(w,t),v(t,s),n,e)}}T=E,E+=V}return b.forEach(((t,s)=>{for(const i in t){const o=t[i];o.sort(d.Y);const r=[],l=[],u=[];for(let t=0;t<o.length;t++){const{at:e,value:n,easing:s}=o[t];r.push(n),l.push((0,a.q)(0,C,e)),u.push(s||"easeOut")}0!==l[0]&&(l.unshift(0),r.unshift(r[0]),u.unshift(p)),1!==l[l.length-1]&&(l.push(1),r.push(null)),w.has(s)||w.set(s,{keyframes:{},transition:{}});const c=w.get(s);c.keyframes[i]=r,c.transition[i]={...e,duration:C,ease:u,times:l,...n}}})),w}function f(t,e){return!e.has(t)&&e.set(t,{}),e.get(t)}function v(t,e){return e[t]||(e[t]=[]),e[t]}function g(t){return Array.isArray(t)?t:[t]}function y(t,e){return t[e]?{...t,...t[e]}:{...t}}const x=t=>"number"==typeof t,P=t=>t.every(x)},387441:(t,e,n)=>{function s(t,e,n,s){var i;return"number"==typeof e?e:e.startsWith("-")||e.startsWith("+")?Math.max(0,t+parseFloat(e)):"<"===e?n:null!==(i=s.get(e))&&void 0!==i?i:t}n.d(e,{u:()=>s})},157766:(t,e,n)=>{n.d(e,{H:()=>r}),n(295913),n(412587);var s=n(796105),i=n(890604),o=n(26085);function r(t,e,n,r,a,l){!function(t,e,n){for(let s=0;s<t.length;s++){const o=t[s];o.at>e&&o.at<n&&((0,i.Ai)(t,o),s--)}}(t,a,l);for(let i=0;i<e.length;i++)t.push({value:e[i],at:(0,o.j)(a,l,r[i]),easing:(0,s.S)(n,i)})}},203846:(t,e,n)=>{function s(t,e){return t.at===e.at?null===t.value?1:null===e.value?-1:0:t.at-e.at}n.d(e,{Y:()=>s}),n(295913),n(412587)},444458:(t,e,n)=>{n.d(e,{B:()=>a});var s=n(244089),i=n(541109),o=n(176617),r=n(550529);function a(t){const e={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=(0,s.x)(t)?new i.l(e,{enableHardwareAcceleration:!1}):new o.M(e,{enableHardwareAcceleration:!0});n.mount(t),r.C.set(t,n)}},961748:(t,e,n)=>{n.d(e,{x:()=>a});var s=n(353994);const i={type:"spring",stiffness:500,damping:25,restSpeed:10},o={type:"keyframes",duration:.8},r={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},a=(t,{keyframes:e})=>e.length>2?o:s.f.has(t)?t.startsWith("scale")?{type:"spring",stiffness:550,damping:0===e[1]?2*Math.sqrt(550):30,restSpeed:10}:i:r},710841:(t,e,n)=>{n.d(e,{P:()=>i});var s=n(73748);const i=(t,e)=>!("zIndex"===t||"number"!=typeof e&&!Array.isArray(e)&&("string"!=typeof e||!s.f.test(e)&&"0"!==e||e.startsWith("url(")))},892904:(t,e,n)=>{function s(t){return null!==t&&"object"==typeof t&&"function"==typeof t.start}n.d(e,{N:()=>s})},780119:(t,e,n)=>{function s(t){return"object"==typeof t&&!Array.isArray(t)}n.d(e,{m:()=>s})},343690:(t,e,n)=>{n.d(e,{p:()=>s});const s=t=>Array.isArray(t)},615655:(t,e,n)=>{n.d(e,{$:()=>i});var s=n(70998);function i(t){return"number"==typeof t?0===t:null!==t?"none"===t||"0"===t||(0,s.$)(t):void 0}},87451:(t,e,n)=>{n.d(e,{I:()=>r});var s=n(392602),i=n(710841),o=n(615655);function r(t,e,n,r){const a=(0,i.P)(e,n);let l;l=Array.isArray(n)?[...n]:[null,n];const u=void 0!==r.from?r.from:t.get();let c;const h=[];for(let s=0;s<l.length;s++)null===l[s]&&(l[s]=0===s?u:l[s-1]),(0,o.$)(l[s])&&h.push(s),"string"==typeof l[s]&&"none"!==l[s]&&"0"!==l[s]&&(c=l[s]);if(a&&h.length&&c)for(let i=0;i<h.length;i++)l[h[i]]=(0,s.J)(e,c);return l}},331261:(t,e,n)=>{n(392649)},955104:(t,e,n)=>{function s({when:t,delay:e,delayChildren:n,staggerChildren:s,staggerDirection:i,repeat:o,repeatType:r,repeatDelay:a,from:l,elapsed:u,...c}){return!!Object.keys(c).length}function i(t,e){return t[e]||t.default||t}n.d(e,{D:()=>s,r:()=>i})},542182:(t,e,n)=>{n.d(e,{C:()=>o});var s=n(63696);class i extends s.Component{getSnapshotBeforeUpdate(t){const e=this.props.childRef.current;if(e&&t.isPresent&&!this.props.isPresent){const t=this.props.sizeRef.current;t.height=e.offsetHeight||0,t.width=e.offsetWidth||0,t.top=e.offsetTop,t.left=e.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function o({children:t,isPresent:e}){const n=(0,s.useId)(),o=(0,s.useRef)(null),r=(0,s.useRef)({width:0,height:0,top:0,left:0});return(0,s.useInsertionEffect)((()=>{const{width:t,height:s,top:i,left:a}=r.current;if(e||!o.current||!t||!s)return;o.current.dataset.motionPopId=n;const l=document.createElement("style");return document.head.appendChild(l),l.sheet&&l.sheet.insertRule(`\n [data-motion-pop-id="${n}"] {\n position: absolute !important;\n width: ${t}px !important;\n height: ${s}px !important;\n top: ${i}px !important;\n left: ${a}px !important;\n }\n `),()=>{document.head.removeChild(l)}}),[e]),s.createElement(i,{isPresent:e,childRef:o,sizeRef:r},s.cloneElement(t,{ref:o}))}},600594:(t,e,n)=>{n.d(e,{O:()=>a}),n(314846),n(469655);var s=n(63696),i=n(121953),o=n(416155),r=n(542182);const a=({children:t,initial:e,isPresent:n,onExitComplete:a,custom:u,presenceAffectsLayout:c,mode:h})=>{const d=(0,o.M)(l),p=(0,s.useId)(),m=(0,s.useMemo)((()=>({id:p,initial:e,isPresent:n,custom:u,onExitComplete:t=>{d.set(t,!0);for(const e of d.values())if(!e)return;a&&a()},register:t=>(d.set(t,!1),()=>d.delete(t))})),c?void 0:[n]);return(0,s.useMemo)((()=>{d.forEach(((t,e)=>d.set(e,!1)))}),[n]),s.useEffect((()=>{!n&&!d.size&&a&&a()}),[n]),"popLayout"===h&&(t=s.createElement(r.C,{isPresent:n},t)),s.createElement(i.t.Provider,{value:m},t)};function l(){return new Map}},207073:(t,e,n)=>{n.d(e,{N:()=>d}),n(76281),n(314846),n(327458),n(469655),n(194364);var s=n(63696),i=n(226990),o=n(546332),r=n(600594),a=n(780911),l=n(117946),u=n(758369),c=n(841164);const h=t=>t.key||"",d=({children:t,custom:e,initial:n=!0,onExitComplete:d,exitBeforeEnter:p,presenceAffectsLayout:m=!0,mode:f="sync"})=>{(0,c.V)(!p,"Replace exitBeforeEnter with mode='wait'");const v=(0,s.useContext)(a.L).forceRender||(0,i.C)()[0],g=(0,o.a)(),y=function(t){const e=[];return s.Children.forEach(t,(t=>{(0,s.isValidElement)(t)&&e.push(t)})),e}(t);let x=y;const P=(0,s.useRef)(new Map).current,w=(0,s.useRef)(x),b=(0,s.useRef)(new Map).current,S=(0,s.useRef)(!0);if((0,l.E)((()=>{S.current=!1,function(t,e){t.forEach((t=>{const n=h(t);e.set(n,t)}))}(y,b),w.current=x})),(0,u.l)((()=>{S.current=!0,b.clear(),P.clear()})),S.current)return s.createElement(s.Fragment,null,x.map((t=>s.createElement(r.O,{key:h(t),isPresent:!0,initial:!!n&&void 0,presenceAffectsLayout:m,mode:f},t))));x=[...x];const A=w.current.map(h),T=y.map(h),E=A.length;for(let s=0;s<E;s++){const t=A[s];-1!==T.indexOf(t)||P.has(t)||P.set(t,void 0)}return"wait"===f&&P.size&&(x=[]),P.forEach(((t,n)=>{if(-1!==T.indexOf(n))return;const i=b.get(n);if(!i)return;const o=A.indexOf(n);let a=t;if(!a){const t=()=>{P.delete(n);const t=Array.from(b.keys()).filter((t=>!T.includes(t)));if(t.forEach((t=>b.delete(t))),w.current=y.filter((e=>{const s=h(e);return s===n||t.includes(s)})),!P.size){if(!1===g.current)return;v(),d&&d()}};a=s.createElement(r.O,{key:h(i),isPresent:!1,onExitComplete:t,custom:e,presenceAffectsLayout:m,mode:f},i),P.set(n,a)}x.splice(o,0,a)})),x=x.map((t=>{const e=t.key;return P.has(e)?t:s.createElement(r.O,{key:h(t),isPresent:!0,presenceAffectsLayout:m,mode:f},t)})),s.createElement(s.Fragment,null,P.size?x:x.map((t=>(0,s.cloneElement)(t))))}},613646:(t,e,n)=>{n.d(e,{xQ:()=>o});var s=n(63696),i=n(121953);function o(){const t=(0,s.useContext)(i.t);if(null===t)return[!0,null];const{isPresent:e,onExitComplete:n,register:o}=t,r=(0,s.useId)();return(0,s.useEffect)((()=>o(r)),[]),!e&&n?[!1,()=>n&&n(r)]:[!0]}},974818:(t,e,n)=>{n(841164),n(63696),n(416155),n(176288)},176288:(t,e,n)=>{n(63696),n(780911),n(45276),n(226990),n(186775)},553139:(t,e,n)=>{n(63696),n(889110),n(725240)},731911:(t,e,n)=>{n(63696),n(682832),n(805796),n(416155)},213911:(t,e,n)=>{n.d(e,{Y:()=>c}),n(314846),n(327458),n(194364);var s=n(841164),i=n(63696),o=n(357433),r=n(142571),a=n(416155),l=n(48690);function u({children:t,as:e="ul",axis:n="y",onReorder:u,values:c,...p},m){const f=(0,a.M)((()=>(0,r.P)(e))),v=[],g=(0,i.useRef)(!1);(0,s.V)(Boolean(c),"Reorder.Group must be provided a values prop");const y={axis:n,registerItem:(t,e)=>{const s=v.findIndex((e=>t===e.value));-1!==s?v[s].layout=e[n]:v.push({value:t,layout:e[n]}),v.sort(d)},updateOrder:(t,e,n)=>{if(g.current)return;const s=(0,l.M)(v,t,e,n);v!==s&&(g.current=!0,u(s.map(h).filter((t=>-1!==c.indexOf(t)))))}};return(0,i.useEffect)((()=>{g.current=!1})),i.createElement(f,{...p,ref:m,ignoreStrict:!0},i.createElement(o.T.Provider,{value:y},t))}const c=(0,i.forwardRef)(u);function h(t){return t.value}function d(t,e){return t.layout.min-e.layout.min}},161627:(t,e,n)=>{n.d(e,{q:()=>p});var s=n(841164),i=n(63696),o=n(357433),r=n(142571),a=n(416155),l=n(73885),u=n(979829),c=n(573970);function h(t,e=0){return(0,c.S)(t)?t:(0,l.d)(e)}function d({children:t,style:e={},value:n,as:l="li",onDrag:c,layout:d=!0,...p},m){const f=(0,a.M)((()=>(0,r.P)(l))),v=(0,i.useContext)(o.T),g={x:h(e.x),y:h(e.y)},y=(0,u.G)([g.x,g.y],(([t,e])=>t||e?1:"unset"));(0,s.V)(Boolean(v),"Reorder.Item must be a child of Reorder.Group");const{axis:x,registerItem:P,updateOrder:w}=v;return i.createElement(f,{drag:x,...p,dragSnapToOrigin:!0,style:{...e,x:g.x,y:g.y,zIndex:y},layout:d,onDrag:(t,e)=>{const{velocity:s}=e;s[x]&&w(n,g[x].get(),s[x]),c&&c(t,e)},onLayoutMeasure:t=>P(n,t),ref:m,ignoreStrict:!0},t)}const p=(0,i.forwardRef)(d)},783186:(t,e,n)=>{var s=n(213911),i=n(161627);s.Y,i.q},48690:(t,e,n)=>{n.d(e,{M:()=>o});var s=n(890604),i=n(26085);function o(t,e,n,o){if(!o)return t;const r=t.findIndex((t=>t.value===e));if(-1===r)return t;const a=o>0?1:-1,l=t[r+a];if(!l)return t;const u=t[r],c=l.layout,h=(0,i.j)(c.min,c.max,.5);return 1===a&&u.layout.max+n>h||-1===a&&u.layout.min+n<h?(0,s.Pe)(t,r,r+a):t}},45276:(t,e,n)=>{n(63696)},780911:(t,e,n)=>{n.d(e,{L:()=>s});const s=(0,n(63696).createContext)({})},889110:(t,e,n)=>{n.d(e,{Y:()=>s});const s=(0,n(63696).createContext)({strict:!1})},682832:(t,e,n)=>{n.d(e,{Q:()=>s});const s=(0,n(63696).createContext)({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"})},125793:(t,e,n)=>{n.d(e,{z:()=>r});var s=n(63696),i=n(820631),o=n(58364);function r(t){const{initial:e,animate:n}=(0,o._)(t,(0,s.useContext)(i.A));return(0,s.useMemo)((()=>({initial:e,animate:n})),[a(e),a(n)])}function a(t){return Array.isArray(t)?t.join(" "):t}},820631:(t,e,n)=>{n.d(e,{A:()=>s});const s=(0,n(63696).createContext)({})},58364:(t,e,n)=>{n.d(e,{_:()=>o});var s=n(563305),i=n(884135);function o(t,e){if((0,i.e)(t)){const{initial:e,animate:n}=t;return{initial:!1===e||(0,s.w)(e)?e:void 0,animate:(0,s.w)(n)?n:void 0}}return!1!==t.inherit?e:{}}},121953:(t,e,n)=>{n.d(e,{t:()=>s});const s=(0,n(63696).createContext)(null)},357433:(t,e,n)=>{n.d(e,{T:()=>s});const s=(0,n(63696).createContext)(null)},334175:(t,e,n)=>{n.d(e,{N:()=>s});const s=(0,n(63696).createContext)({})},780160:(t,e,n)=>{function s(t){window.MotionDebug&&window.MotionDebug.record(t)}n.d(e,{g:()=>s})},569107:(t,e,n)=>{n.d(e,{b:()=>i});var s=n(308922);const i=t=>(t*=2)<1?.5*(0,s.dg)(t):.5*(2-Math.pow(2,-10*(t-1)))},308922:(t,e,n)=>{n.d(e,{Sz:()=>r,ZZ:()=>l,dg:()=>a});var s=n(436745),i=n(500203),o=n(780760);const r=(0,s.A)(.33,1.53,.69,.99),a=(0,o.G)(r),l=(0,i.V)(a)},791806:(t,e,n)=>{n.d(e,{po:()=>o,tn:()=>a,yT:()=>r});var s=n(500203),i=n(780760);const o=t=>1-Math.sin(Math.acos(t)),r=(0,i.G)(o),a=(0,s.V)(o)},436745:(t,e,n)=>{n.d(e,{A:()=>a});var s=n(78777);const i=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,o=1e-7,r=12;function a(t,e,n,a){if(t===e&&n===a)return s.l;return s=>0===s||1===s?s:i(function(t,e,n,s,a){let l,u,c=0;do{u=e+(n-e)/2,l=i(u,s,a)-t,l>0?n=u:e=u}while(Math.abs(l)>o&&++c<r);return u}(s,0,1,t,n),e,a)}},95709:(t,e,n)=>{n.d(e,{a6:()=>i,am:()=>r,vT:()=>o});var s=n(436745);const i=(0,s.A)(.42,0,1,1),o=(0,s.A)(0,0,.58,1),r=(0,s.A)(.42,0,.58,1)},500203:(t,e,n)=>{n.d(e,{V:()=>s});const s=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2},780760:(t,e,n)=>{n.d(e,{G:()=>s});const s=t=>e=>1-t(1-e)},838389:(t,e,n)=>{n.d(e,{X:()=>r});var s=n(311789),i=n(445795),o=n(660127);function r(t,e=100){const n=(0,s.o)({keyframes:[0,e],...t}),r=Math.min((0,i.t)(n),i.Y);return{type:"keyframes",ease:t=>n.next(r*t).value/e,duration:(0,o.X)(r)}}},796105:(t,e,n)=>{n.d(e,{S:()=>o});var s=n(322801),i=n(148357);function o(t,e){return(0,i.h)(t)?t[(0,s.L)(0,t.length,e)]:t}},309447:(t,e,n)=>{n.d(e,{D:()=>s});const s=t=>Array.isArray(t)&&"number"==typeof t[0]},148357:(t,e,n)=>{n.d(e,{h:()=>s});const s=t=>Array.isArray(t)&&"number"!=typeof t[0]},392649:(t,e,n)=>{n.d(e,{K:()=>h});var s=n(841164),i=n(436745),o=n(78777),r=n(95709),a=n(791806),l=n(308922),u=n(569107);const c={linear:o.l,easeIn:r.a6,easeInOut:r.am,easeOut:r.vT,circIn:a.po,circInOut:a.tn,circOut:a.yT,backIn:l.dg,backInOut:l.ZZ,backOut:l.Sz,anticipate:u.b},h=t=>{if(Array.isArray(t)){(0,s.V)(4===t.length,"Cubic bezier arrays must contain four numerical values.");const[e,n,o,r]=t;return(0,i.A)(e,n,o,r)}return"string"==typeof t?((0,s.V)(void 0!==c[t],`Invalid easing type '${t}'`),c[t]):t}},527076:(t,e,n)=>{function s(t,e,n,s={passive:!0}){return t.addEventListener(e,n,s),()=>t.removeEventListener(e,n)}n.d(e,{k:()=>s})},420555:(t,e,n)=>{n.d(e,{h:()=>o});var s=n(527076),i=n(563890);function o(t,e,n,o){return(0,s.k)(t,e,(0,i.F)(n),o)}},563890:(t,e,n)=>{n.d(e,{F:()=>o,e:()=>i});var s=n(760628);function i(t,e="page"){return{point:{x:t[e+"X"],y:t[e+"Y"]}}}const o=t=>e=>(0,s.M)(e)&&t(e,i(e))},576216:(t,e,n)=>{n(63696),n(527076)},760628:(t,e,n)=>{n.d(e,{M:()=>s});const s=t=>"mouse"===t.pointerType?"number"!=typeof t.button||t.button<=0:!1!==t.isPrimary},981960:(t,e,n)=>{n.d(e,{I:()=>r,q:()=>i});var s=n(45974);const i=["prepare","read","update","preRender","render","postRender"],o=40;function r(t,e){let n=!1,r=!0;const a={delta:0,timestamp:0,isProcessing:!1},l=i.reduce(((t,e)=>(t[e]=(0,s.n)((()=>n=!0)),t)),{}),u=t=>l[t].process(a),c=()=>{const s=performance.now();n=!1,a.delta=r?1e3/60:Math.max(Math.min(s-a.timestamp,o),1),a.timestamp=s,a.isProcessing=!0,i.forEach(u),a.isProcessing=!1,n&&e&&(r=!1,t(c))};return{schedule:i.reduce(((e,s)=>{const i=l[s];return e[s]=(e,s=!1,o=!1)=>(n||(n=!0,r=!0,a.isProcessing||t(c)),i.schedule(e,s,o)),e}),{}),cancel:t=>i.forEach((e=>l[e].cancel(t))),state:a,steps:l}}},277210:(t,e,n)=>{n.d(e,{Ci:()=>l,Gt:()=>o,WG:()=>r,uv:()=>a});var s=n(78777),i=n(981960);const{schedule:o,cancel:r,state:a,steps:l}=(0,i.I)("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:s.l,!0)},13587:(t,e,n)=>{n(314846),n(190458);var s=n(981960),i=n(277210);s.q.reduce(((t,e)=>(t[e]=t=>(0,i.WG)(t),t)),{})},45974:(t,e,n)=>{n.d(e,{n:()=>i});class s{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()}}function i(t){let e=new s,n=new s,i=0,o=!1,r=!1;const a=new WeakSet,l={schedule:(t,s=!1,r=!1)=>{const l=r&&o,u=l?e:n;return s&&a.add(t),u.add(t)&&l&&o&&(i=e.order.length),t},cancel:t=>{n.remove(t),a.delete(t)},process:s=>{if(o)r=!0;else{if(o=!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(s),a.has(i)&&(l.schedule(i),t())}o=!1,r&&(r=!1,l.process(s))}}};return l}},588145:(t,e,n)=>{n.d(e,{n:()=>b});var s=n(841164),i=n(120421),o=n(986576),r=n(105675),a=n(420555),l=n(846767),u=n(298944),c=n(687464),h=n(410347),d=n(563890),p=n(912158),m=n(527076),f=n(775886),v=n(26085),g=n(234223),y=n(430091),x=n(508382),P=n(277210);const w=new WeakMap;class b{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=(0,u.ge)(),this.visualElement=t}start(t,{snapToCursor:e=!1}={}){const{presenceContext:n}=this.visualElement;if(n&&!1===n.isPresent)return;const{dragSnapToOrigin:s}=this.getProps();this.panSession=new i.Q(t,{onSessionStart:t=>{const{dragSnapToOrigin:n}=this.getProps();n?this.pauseAnimation():this.stopAnimation(),e&&this.snapToCursor((0,d.e)(t,"page").point)},onStart:(t,e)=>{const{drag:n,dragPropagation:s,onDragStart:i}=this.getProps();if(n&&!s&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=(0,o.nQ)(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),(0,c.X)((t=>{let e=this.getAxisMotionValue(t).get()||0;if(g.KN.test(e)){const{projection:n}=this.visualElement;if(n&&n.layout){const s=n.layout.layoutBox[t];s&&(e=(0,f.CQ)(s)*(parseFloat(e)/100))}}this.originPoint[t]=e})),i&&P.Gt.update((()=>i(t,e)),!1,!0);const{animationState:r}=this.visualElement;r&&r.setActive("whileDrag",!0)},onMove:(t,e)=>{const{dragPropagation:n,dragDirectionLock:s,onDirectionLock:i,onDrag:o}=this.getProps();if(!n&&!this.openGlobalLock)return;const{offset:r}=e;if(s&&null===this.currentDirection)return this.currentDirection=function(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}(r),void(null!==this.currentDirection&&i&&i(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:()=>(0,c.X)((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:s,contextWindow:(0,x.s)(this.visualElement)})}stop(t,e){const n=this.isDragging;if(this.cancel(),!n)return;const{velocity:s}=e;this.startAnimation(s);const{onDragEnd:i}=this.getProps();i&&P.Gt.update((()=>i(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:s}=this.getProps();if(!n||!S(t,s,this.currentDirection))return;const i=this.getAxisMotionValue(t);let o=this.originPoint[t]+n[t];this.constraints&&this.constraints[t]&&(o=(0,l.Zq)(o,this.constraints[t],this.elastic[t])),i.set(o)}resolveConstraints(){var t;const{dragConstraints:e,dragElastic:n}=this.getProps(),s=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):null===(t=this.visualElement.projection)||void 0===t?void 0:t.layout,i=this.constraints;e&&(0,r.X)(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!e||!s)&&(0,l._c)(s.layoutBox,e),this.elastic=(0,l.my)(n),i!==this.constraints&&s&&this.constraints&&!this.hasMutatedConstraints&&(0,c.X)((t=>{this.getAxisMotionValue(t)&&(this.constraints[t]=(0,l.QX)(s.layoutBox[t],this.constraints[t]))}))}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:e}=this.getProps();if(!t||!(0,r.X)(t))return!1;const n=t.current;(0,s.V)(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 o=(0,h.L)(n,i.root,this.visualElement.getTransformPagePoint());let a=(0,l.iT)(i.layout.layoutBox,o);if(e){const t=e((0,p.pA)(a));this.hasMutatedConstraints=!!t,t&&(a=(0,p.FY)(t))}return a}startAnimation(t){const{drag:e,dragMomentum:n,dragElastic:s,dragTransition:i,dragSnapToOrigin:o,onDragTransitionEnd:r}=this.getProps(),a=this.constraints||{},l=(0,c.X)((r=>{if(!S(r,e,this.currentDirection))return;let l=a&&a[r]||{};o&&(l={min:0,max:0});const u=s?200:1e6,c=s?40:1e7,h={type:"inertia",velocity:n?t[r]:0,bounceStiffness:u,bounceDamping:c,timeConstant:750,restDelta:1,restSpeed:10,...i,...l};return this.startAxisValueAnimation(r,h)}));return Promise.all(l).then(r)}startAxisValueAnimation(t,e){const n=this.getAxisMotionValue(t);return n.start((0,y.f)(t,n,0,e))}stopAnimation(){(0,c.X)((t=>this.getAxisMotionValue(t).stop()))}pauseAnimation(){(0,c.X)((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();return n[e]||this.visualElement.getValue(t,(n.initial?n.initial[t]:void 0)||0)}snapToCursor(t){(0,c.X)((e=>{const{drag:n}=this.getProps();if(!S(e,n,this.currentDirection))return;const{projection:s}=this.visualElement,i=this.getAxisMotionValue(e);if(s&&s.layout){const{min:n,max:o}=s.layout.layoutBox[e];i.set(t[e]-(0,v.j)(n,o,.5))}}))}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:e}=this.getProps(),{projection:n}=this.visualElement;if(!(0,r.X)(e)||!n||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};(0,c.X)((t=>{const e=this.getAxisMotionValue(t);if(e){const n=e.get();s[t]=(0,l.Yu)({min:n,max:n},this.constraints[t])}}));const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),(0,c.X)((e=>{if(!S(e,t,null))return;const n=this.getAxisMotionValue(e),{min:i,max:o}=this.constraints[e];n.set((0,v.j)(i,o,s[e]))}))}addListeners(){if(!this.visualElement.current)return;w.set(this.visualElement,this);const t=this.visualElement.current,e=(0,a.h)(t,"pointerdown",(t=>{const{drag:e,dragListener:n=!0}=this.getProps();e&&n&&this.start(t)})),n=()=>{const{dragConstraints:t}=this.getProps();(0,r.X)(t)&&(this.constraints=this.resolveRefConstraints())},{projection:s}=this.visualElement,i=s.addEventListener("measure",n);s&&!s.layout&&(s.root&&s.root.updateScroll(),s.updateLayout()),n();const o=(0,m.k)(window,"resize",(()=>this.scalePositionWithinConstraints())),l=s.addEventListener("didUpdate",(({delta:t,hasLayoutChanged:e})=>{this.isDragging&&e&&((0,c.X)((e=>{const n=this.getAxisMotionValue(e);n&&(this.originPoint[e]+=t[e].translate,n.set(n.get()+t[e].translate))})),this.visualElement.render())}));return()=>{o(),e(),i(),l&&l()}}getProps(){const t=this.visualElement.getProps(),{drag:e=!1,dragDirectionLock:n=!1,dragPropagation:s=!1,dragConstraints:i=!1,dragElastic:o=l.Ne,dragMomentum:r=!0}=t;return{...t,drag:e,dragDirectionLock:n,dragPropagation:s,dragConstraints:i,dragElastic:o,dragMomentum:r}}}function S(t,e,n){return!(!0!==e&&e!==t||null!==n&&n!==t)}},778673:(t,e,n)=>{n.d(e,{w:()=>r});var s=n(508298),i=n(78777),o=n(588145);class r extends s.X{constructor(t){super(t),this.removeGroupControls=i.l,this.removeListeners=i.l,this.controls=new o.n(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||i.l}unmount(){this.removeGroupControls(),this.removeListeners()}}},438038:(t,e,n)=>{n(314846),n(469655),n(416155)},846767:(t,e,n)=>{n.d(e,{Ne:()=>m,QX:()=>p,Yu:()=>d,Zq:()=>a,_c:()=>u,iT:()=>h,my:()=>f});var s=n(799020),i=n(775886),o=n(893138),r=n(26085);function a(t,{min:e,max:n},s){return void 0!==e&&t<e?t=s?(0,r.j)(e,t,s.min):Math.max(t,e):void 0!==n&&t>n&&(t=s?(0,r.j)(n,t,s.max):Math.min(t,n)),t}function l(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 u(t,{top:e,left:n,bottom:s,right:i}){return{x:l(t.x,n,i),y:l(t.y,e,s)}}function c(t,e){let n=e.min-t.min,s=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,s]=[s,n]),{min:n,max:s}}function h(t,e){return{x:c(t.x,e.x),y:c(t.y,e.y)}}function d(t,e){let n=.5;const r=(0,i.CQ)(t),a=(0,i.CQ)(e);return a>r?n=(0,s.q)(e.min,e.max-r,t.min):r>a&&(n=(0,s.q)(t.min,t.max-a,e.min)),(0,o.q)(0,1,n)}function p(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}const m=.35;function f(t=m){return!1===t?t=0:!0===t&&(t=m),{x:v(t,"left","right"),y:v(t,"top","bottom")}}function v(t,e,n){return{min:g(t,e),max:g(t,n)}}function g(t,e){return"number"==typeof t?t:t[e]||0}},986576:(t,e,n)=>{function s(t){let e=null;return()=>null===e&&(e=t,()=>{e=null})}n.d(e,{D3:()=>a,nQ:()=>r});const i=s("dragHorizontal"),o=s("dragVertical");function r(t){let e=!1;if("y"===t)e=o();else if("x"===t)e=i();else{const t=i(),n=o();t&&n?e=()=>{t(),n()}:(t&&t(),n&&n())}return e}function a(){const t=r(!0);return!t||(t(),!1)}},53294:(t,e,n)=>{n.d(e,{c:()=>r});var s=n(527076),i=n(508298),o=n(804253);class r extends i.X{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=(0,o.F)((0,s.k)(this.node.current,"focus",(()=>this.onFocus())),(0,s.k)(this.node.current,"blur",(()=>this.onBlur())))}unmount(){}}},694328:(t,e,n)=>{n.d(e,{e:()=>u});var s=n(420555),i=n(804253),o=n(986576),r=n(508298),a=n(277210);function l(t,e){const n="pointer"+(e?"enter":"leave"),i="onHover"+(e?"Start":"End");return(0,s.h)(t.current,n,((n,s)=>{if("touch"===n.pointerType||(0,o.D3)())return;const r=t.getProps();t.animationState&&r.whileHover&&t.animationState.setActive("whileHover",e),r[i]&&a.Gt.update((()=>r[i](n,s)))}),{passive:!t.getProps()[i]})}class u extends r.X{mount(){this.unmount=(0,i.F)(l(this.node,!0),l(this.node,!1))}unmount(){}}},120421:(t,e,n)=>{n.d(e,{Q:()=>c});var s=n(563890),i=n(660127),o=n(420555),r=n(804253),a=n(367232),l=n(760628),u=n(277210);class c{constructor(t,e,{transformPagePoint:n,contextWindow:i,dragSnapToOrigin:c=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!this.lastMoveEvent||!this.lastMoveEventInfo)return;const t=p(this.lastMoveEventInfo,this.history),e=null!==this.startEvent,n=(0,a.w)(t.offset,{x:0,y:0})>=3;if(!e&&!n)return;const{point:s}=t,{timestamp:i}=u.uv;this.history.push({...s,timestamp:i});const{onStart:o,onMove:r}=this.handlers;e||(o&&o(this.lastMoveEvent,t),this.startEvent=this.lastMoveEvent),r&&r(this.lastMoveEvent,t)},this.handlePointerMove=(t,e)=>{this.lastMoveEvent=t,this.lastMoveEventInfo=h(e,this.transformPagePoint),u.Gt.update(this.updatePoint,!0)},this.handlePointerUp=(t,e)=>{this.end();const{onEnd:n,onSessionEnd:s,resumeAnimation:i}=this.handlers;if(this.dragSnapToOrigin&&i&&i(),!this.lastMoveEvent||!this.lastMoveEventInfo)return;const o=p("pointercancel"===t.type?this.lastMoveEventInfo:h(e,this.transformPagePoint),this.history);this.startEvent&&n&&n(t,o),s&&s(t,o)},!(0,l.M)(t))return;this.dragSnapToOrigin=c,this.handlers=e,this.transformPagePoint=n,this.contextWindow=i||window;const d=h((0,s.e)(t),this.transformPagePoint),{point:m}=d,{timestamp:f}=u.uv;this.history=[{...m,timestamp:f}];const{onSessionStart:v}=e;v&&v(t,p(d,this.history)),this.removeListeners=(0,r.F)((0,o.h)(this.contextWindow,"pointermove",this.handlePointerMove),(0,o.h)(this.contextWindow,"pointerup",this.handlePointerUp),(0,o.h)(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),(0,u.WG)(this.updatePoint)}}function h(t,e){return e?{point:e(t.point)}:t}function d(t,e){return{x:t.x-e.x,y:t.y-e.y}}function p({point:t},e){return{point:t,delta:d(t,f(e)),offset:d(t,m(e)),velocity:v(e,.1)}}function m(t){return t[0]}function f(t){return t[t.length-1]}function v(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,s=null;const o=f(t);for(;n>=0&&(s=t[n],!(o.timestamp-s.timestamp>(0,i.f)(e)));)n--;if(!s)return{x:0,y:0};const r=(0,i.X)(o.timestamp-s.timestamp);if(0===r)return{x:0,y:0};const a={x:(o.x-s.x)/r,y:(o.y-s.y)/r};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}},790258:(t,e,n)=>{n.d(e,{f:()=>c});var s=n(120421),i=n(420555),o=n(508298),r=n(78777),a=n(508382),l=n(277210);const u=t=>(e,n)=>{t&&l.Gt.update((()=>t(e,n)))};class c extends o.X{constructor(){super(...arguments),this.removePointerDownListener=r.l}onPointerDown(t){this.session=new s.Q(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:(0,a.s)(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:e,onPan:n,onPanEnd:s}=this.node.getProps();return{onSessionStart:u(t),onStart:u(e),onMove:n,onEnd:(t,e)=>{delete this.session,s&&l.Gt.update((()=>s(t,e)))}}}mount(){this.removePointerDownListener=(0,i.h)(this.node.current,"pointerdown",(t=>this.onPointerDown(t)))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}},448779:(t,e,n)=>{n.d(e,{H:()=>p});var s=n(563890),i=n(527076),o=n(420555),r=n(508298),a=n(804253),l=n(986576),u=n(40100),c=n(78777),h=n(277210);function d(t,e){if(!e)return;const n=new PointerEvent("pointer"+t);e(n,(0,s.e)(n))}class p extends r.X{constructor(){super(...arguments),this.removeStartListeners=c.l,this.removeEndListeners=c.l,this.removeAccessibleListeners=c.l,this.startPointerPress=(t,e)=>{if(this.isPressing)return;this.removeEndListeners();const n=this.node.getProps(),s=(0,o.h)(window,"pointerup",((t,e)=>{if(!this.checkPressEnd())return;const{onTap:n,onTapCancel:s,globalTapTarget:i}=this.node.getProps();h.Gt.update((()=>{i||(0,u.w)(this.node.current,t.target)?n&&n(t,e):s&&s(t,e)}))}),{passive:!(n.onTap||n.onPointerUp)}),i=(0,o.h)(window,"pointercancel",((t,e)=>this.cancelPress(t,e)),{passive:!(n.onTapCancel||n.onPointerCancel)});this.removeEndListeners=(0,a.F)(s,i),this.startPress(t,e)},this.startAccessiblePress=()=>{const t=(0,i.k)(this.node.current,"keydown",(t=>{"Enter"!==t.key||this.isPressing||(this.removeEndListeners(),this.removeEndListeners=(0,i.k)(this.node.current,"keyup",(t=>{"Enter"===t.key&&this.checkPressEnd()&&d("up",((t,e)=>{const{onTap:n}=this.node.getProps();n&&h.Gt.update((()=>n(t,e)))}))})),d("down",((t,e)=>{this.startPress(t,e)})))})),e=(0,i.k)(this.node.current,"blur",(()=>{this.isPressing&&d("cancel",((t,e)=>this.cancelPress(t,e)))}));this.removeAccessibleListeners=(0,a.F)(t,e)}}startPress(t,e){this.isPressing=!0;const{onTapStart:n,whileTap:s}=this.node.getProps();s&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),n&&h.Gt.update((()=>n(t,e)))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!(0,l.D3)()}cancelPress(t,e){if(!this.checkPressEnd())return;const{onTapCancel:n}=this.node.getProps();n&&h.Gt.update((()=>n(t,e)))}mount(){const t=this.node.getProps(),e=(0,o.h)(t.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),n=(0,i.k)(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=(0,a.F)(e,n)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}},40100:(t,e,n)=>{n.d(e,{w:()=>s});const s=(t,e)=>!!e&&(t===e||s(t,e.parentElement))},625121:(t,e,n)=>{n.d(e,{Ny:()=>i.N,PY:()=>s.P,i0:()=>o.i});var s=n(142571),i=(n(959549),n(207073)),o=(n(731911),n(553139),n(176288),n(783186),n(827073),n(475861),n(73885),n(167472),n(736196),n(979829),n(375884),n(106406),n(100308),n(333229),n(439849),n(846820),n(975469),n(261006),n(150092),n(494535),n(439284),n(89528),n(578843),n(404175),n(104570),n(683911),n(116954),n(613646),n(364584),n(438038),n(576216),n(285424),n(773791),n(32740),n(373518),n(602267),n(437614),n(557013),n(674060),n(52565),n(550529),n(731603),n(449705),n(73748),n(234223),n(718966),n(966540),n(150170),n(311789),n(820631),n(682832),n(121953),n(780911),n(334175),n(389462),n(45276),n(313036),n(262345),n(974818),n(239667),n(279611));n(847891),n(12582),n(438182),n(331261),n(229455),n(893138),n(26085),n(804253),n(799020),n(322801),n(13587),n(569107),n(308922),n(791806),n(95709),n(436745),n(500203),n(780760),n(616246),n(367232),n(841164),n(323662),n(277210),n(788477),n(482200),n(298944),n(775886),n(805796),n(366084),n(986576),n(420555),n(563890),n(573970),n(701134),n(758369),n(117946),n(226990)},508298:(t,e,n)=>{n.d(e,{X:()=>s});class s{constructor(t){this.isMounted=!1,this.node=t}update(){}}},922969:(t,e,n)=>{n.d(e,{H:()=>o});var s=n(508298);let i=0;class o extends s.X{constructor(){super(...arguments),this.id=i++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:e,custom:n}=this.node.presenceContext,{isPresent:s}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===s)return;const i=this.node.animationState.setActive("exit",!t,{custom:null!=n?n:this.node.getProps().custom});e&&!t&&i.then((()=>e(this.id)))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}},786311:(t,e,n)=>{n.d(e,{j:()=>r});var s=n(892904),i=n(316558),o=n(508298);class r extends o.X{constructor(t){super(t),t.animationState||(t.animationState=(0,i.L)(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();this.unmount(),(0,s.N)(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(){}}},788477:(t,e,n)=>{n.d(e,{W:()=>o});var s=n(786311),i=n(922969);const o={animation:{Feature:s.j},exit:{Feature:i.H}}},834430:(t,e,n)=>{n.d(e,{B:()=>i}),n(314846),n(275568);const s={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"]},i={};for(const o in s)i[o]={isEnabled:t=>s[o].some((e=>!!t[e]))}},863986:(t,e,n)=>{n.d(e,{$:()=>a});var s=n(778673),i=n(790258),o=n(127765),r=n(157986);const a={pan:{Feature:i.f},drag:{Feature:s.w,ProjectionNode:r.P,MeasureLayout:o.$}}},302160:(t,e,n)=>{n.d(e,{n:()=>r});var s=n(694328),i=n(53294),o=n(448779);const r={inView:{Feature:n(519843).x},tap:{Feature:o.H},focus:{Feature:i.c},hover:{Feature:s.e}}},561522:(t,e,n)=>{n.d(e,{Z:()=>o});var s=n(157986),i=n(127765);const o={layout:{ProjectionNode:s.P,MeasureLayout:i.$}}},127765:(t,e,n)=>{n.d(e,{$:()=>p});var s=n(63696),i=n(613646),o=n(780911),r=n(334175),a=n(65281),l=n(694608),u=n(828667),c=n(602267),h=n(277210);class d extends s.Component{componentDidMount(){const{visualElement:t,layoutGroup:e,switchLayoutGroup:n,layoutId:s}=this.props,{projection:i}=t;(0,c.$)(m),i&&(e.group&&e.group.add(i),n&&n.register&&s&&n.register(i),i.root.didUpdate(),i.addEventListener("animationComplete",(()=>{this.safeToRemove()})),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),a.w.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:e,visualElement:n,drag:s,isPresent:i}=this.props,o=n.projection;return o?(o.isPresent=i,s||t.layoutDependency!==e||void 0===e?o.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?o.promote():o.relegate()||h.Gt.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:s}=t;s&&(s.scheduleCheckAfterUnmount(),e&&e.group&&e.group.remove(s),n&&n.deregister&&n.deregister(s))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function p(t){const[e,n]=(0,i.xQ)(),a=(0,s.useContext)(o.L);return s.createElement(d,{...t,layoutGroup:a,switchLayoutGroup:(0,s.useContext)(r.N),isPresent:e,safeToRemove:n})}const m={borderRadius:{...l.P,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:l.P,borderTopRightRadius:l.P,borderBottomLeftRadius:l.P,borderBottomRightRadius:l.P,boxShadow:u._}},725240:(t,e,n)=>{n.d(e,{Y:()=>i});var s=n(834430);function i(t){for(const e in t)s.B[e]={...s.B[e],...t[e]}}},519843:(t,e,n)=>{n.d(e,{x:()=>r});var s=n(508298),i=n(329294);const o={some:0,all:1};class r extends s.X{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:e,margin:n,amount:s="some",once:r}=t,a={root:e?e.current:void 0,rootMargin:n,threshold:"number"==typeof s?s:o[s]};return(0,i.m)(this.node.current,a,(t=>{const{isIntersecting:e}=t;if(this.isInView===e)return;if(this.isInView=e,r&&!e&&this.hasEnteredView)return;e&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",e);const{onViewportEnter:n,onViewportLeave:s}=this.node.getProps(),i=e?n:s;i&&i(t)}))}mount(){this.startObserver()}update(){if("undefined"==typeof IntersectionObserver)return;const{props:t,prevProps:e}=this.node;["amount","margin","root"].some(function({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}(t,e))&&this.startObserver()}unmount(){}}},329294:(t,e,n)=>{n.d(e,{m:()=>a}),n(314846),n(469655);const s=new WeakMap,i=new WeakMap,o=t=>{const e=s.get(t.target);e&&e(t)},r=t=>{t.forEach(o)};function a(t,e,n){const o=function({root:t,...e}){const n=t||document;i.has(n)||i.set(n,{});const s=i.get(n),o=JSON.stringify(e);return s[o]||(s[o]=new IntersectionObserver(r,{root:t,...e})),s[o]}(e);return s.set(t,n),o.observe(t),()=>{s.delete(t),o.unobserve(t)}}},285424:(t,e,n)=>{n.d(e,{G:()=>f});var s=n(63696),i=n(682832),o=n(820631),r=n(890875),a=n(716226),l=n(125793),u=n(725240),c=n(701134),h=n(780911),d=n(889110),p=n(334175),m=n(908134);function f({preloadedFeatures:t,createVisualElement:e,useRender:n,useVisualState:h,Component:f}){function g(u,m){let g;const y={...(0,s.useContext)(i.Q),...u,layoutId:v(u)},{isStatic:x}=y,P=(0,l.z)(u),w=h(u,x);if(!x&&c.B){P.visualElement=(0,r.Y)(f,w,y,e);const n=(0,s.useContext)(p.N),i=(0,s.useContext)(d.Y).strict;P.visualElement&&(g=P.visualElement.loadFeatures(y,i,t,n))}return s.createElement(o.A.Provider,{value:P},g&&P.visualElement?s.createElement(g,{visualElement:P.visualElement,...y}):null,n(f,u,(0,a.J)(w,P.visualElement,m),w,x,P.visualElement))}t&&(0,u.Y)(t);const y=(0,s.forwardRef)(g);return y[m.o]=f,y}function v({layoutId:t}){const e=(0,s.useContext)(h.L).id;return e&&void 0!==t?e+"-"+t:t}},822047:(t,e,n)=>{n.d(e,{z:()=>o});var s=n(602267),i=n(353994);function o(t,{layout:e,layoutId:n}){return i.f.has(t)||t.startsWith("origin")||(e||void 0!==n)&&(!!s.H[t]||"opacity"===t)}},773791:(t,e,n)=>{n(908134)},908134:(t,e,n)=>{n.d(e,{o:()=>s});const s=Symbol.for("motionComponentSymbol")},32740:(t,e,n)=>{n(773791),n(908134)},716226:(t,e,n)=>{n.d(e,{J:()=>o});var s=n(63696),i=n(105675);function o(t,e,n){return(0,s.useCallback)((s=>{s&&t.mount&&t.mount(s),e&&(s?e.mount(s):e.unmount()),n&&("function"==typeof n?n(s):(0,i.X)(n)&&(n.current=s))}),[e])}},890875:(t,e,n)=>{n.d(e,{Y:()=>c});var s=n(63696),i=n(121953),o=n(820631),r=n(117946),a=n(889110),l=n(682832),u=n(150170);function c(t,e,n,c){const{visualElement:h}=(0,s.useContext)(o.A),d=(0,s.useContext)(a.Y),p=(0,s.useContext)(i.t),m=(0,s.useContext)(l.Q).reducedMotion,f=(0,s.useRef)();c=c||d.renderer,!f.current&&c&&(f.current=c(t,{visualState:e,parent:h,props:n,presenceContext:p,blockInitialAnimation:!!p&&!1===p.initial,reducedMotionConfig:m}));const v=f.current;(0,s.useInsertionEffect)((()=>{v&&v.update(n,p)}));const g=(0,s.useRef)(Boolean(n[u.n]&&!window.HandoffComplete));return(0,r.E)((()=>{v&&(v.render(),g.current&&v.animationState&&v.animationState.animateChanges())})),(0,s.useEffect)((()=>{v&&(v.updateFeatures(),!g.current&&v.animationState&&v.animationState.animateChanges(),g.current&&(g.current=!1,window.HandoffComplete=!0))})),v}},366084:(t,e,n)=>{n.d(e,{T:()=>h}),n(314846),n(469655);var s=n(63696),i=n(892904),o=n(121953),r=n(775691),a=n(416155),l=n(736196),u=n(820631),c=n(884135);const h=t=>(e,n)=>{const i=(0,s.useContext)(u.A),r=(0,s.useContext)(o.t),l=()=>function({scrapeMotionValuesFromProps:t,createRenderState:e,onMount:n},s,i,o){const r={latestValues:d(s,i,o,t),renderState:e()};return n&&(r.mount=t=>n(s,t,r)),r}(t,e,i,r);return n?l():(0,a.M)(l)};function d(t,e,n,s){const o={},a=s(t,{});for(const i in a)o[i]=(0,l.u)(a[i]);let{initial:u,animate:h}=t;const d=(0,c.e)(t),p=(0,c.O)(t);e&&p&&!d&&!1!==t.inherit&&(void 0===u&&(u=e.initial),void 0===h&&(h=e.animate));let m=!!n&&!1===n.initial;m=m||!1===u;const f=m?h:u;return f&&"boolean"!=typeof f&&!(0,i.N)(f)&&(Array.isArray(f)?f:[f]).forEach((e=>{const n=(0,r.a)(t,e);if(!n)return;const{transitionEnd:s,transition:i,...a}=n;for(const t in a){let e=a[t];Array.isArray(e)&&(e=e[m?e.length-1:0]),null!==e&&(o[t]=e)}for(const t in s)o[t]=s[t]})),o}},116954:(t,e,n)=>{n.d(e,{S:()=>i});const s=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 i(t){return t.startsWith("while")||t.startsWith("drag")&&"draggable"!==t||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||s.has(t)}},715275:(t,e,n)=>{n.d(e,{v:()=>d});var s=n(791806),i=n(799020),o=n(26085),r=n(78777),a=n(234223);const l=["TopLeft","TopRight","BottomLeft","BottomRight"],u=l.length,c=t=>"string"==typeof t?parseFloat(t):t,h=t=>"number"==typeof t||a.px.test(t);function d(t,e,n,s,i,r){i?(t.opacity=(0,o.j)(0,void 0!==n.opacity?n.opacity:1,m(s)),t.opacityExit=(0,o.j)(void 0!==e.opacity?e.opacity:1,0,f(s))):r&&(t.opacity=(0,o.j)(void 0!==e.opacity?e.opacity:1,void 0!==n.opacity?n.opacity:1,s));for(let d=0;d<u;d++){const i=`border${l[d]}Radius`;let r=p(e,i),u=p(n,i);void 0===r&&void 0===u||(r||(r=0),u||(u=0),0===r||0===u||h(r)===h(u)?(t[i]=Math.max((0,o.j)(c(r),c(u),s),0),(a.KN.test(u)||a.KN.test(r))&&(t[i]+="%")):t[i]=u)}(e.rotate||n.rotate)&&(t.rotate=(0,o.j)(e.rotate||0,n.rotate||0,s))}function p(t,e){return void 0!==t[e]?t[e]:t.borderRadius}const m=v(0,.5,s.yT),f=v(.5,.95,r.l);function v(t,e,n){return s=>s<t?0:s>e?1:n((0,i.q)(t,e,s))}},912158:(t,e,n)=>{function s({top:t,left:e,right:n,bottom:s}){return{x:{min:e,max:n},y:{min:t,max:s}}}function i({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function o(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),s=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:s.y,right:s.x}}n.d(e,{FY:()=>s,bS:()=>o,pA:()=>i})},812385:(t,e,n)=>{function s(t,e){t.min=e.min,t.max=e.max}function i(t,e){s(t.x,e.x),s(t.y,e.y)}n.d(e,{H:()=>i})},370155:(t,e,n)=>{n.d(e,{OU:()=>u,Ql:()=>h,Ww:()=>f,hq:()=>o,o4:()=>l});var s=n(26085),i=n(251088);function o(t,e,n){return n+e*(t-n)}function r(t,e,n,s,i){return void 0!==i&&(t=o(t,i,s)),o(t,n,s)+e}function a(t,e=0,n=1,s,i){t.min=r(t.min,e,n,s,i),t.max=r(t.max,e,n,s,i)}function l(t,{x:e,y:n}){a(t.x,e.translate,e.scale,e.originPoint),a(t.y,n.translate,n.scale,n.originPoint)}function u(t,e,n,s=!1){const o=n.length;if(!o)return;let r,a;e.x=e.y=1;for(let u=0;u<o;u++){r=n[u],a=r.projectionDelta;const o=r.instance;o&&o.style&&"contents"===o.style.display||(s&&r.options.layoutScroll&&r.scroll&&r!==r.root&&f(t,{x:-r.scroll.offset.x,y:-r.scroll.offset.y}),a&&(e.x*=a.x.scale,e.y*=a.y.scale,l(t,a)),s&&(0,i.HD)(r.latestValues)&&f(t,r.latestValues))}e.x=c(e.x),e.y=c(e.y)}function c(t){return Number.isInteger(t)||t>1.0000000000001||t<.999999999999?t:1}function h(t,e){t.min=t.min+e,t.max=t.max+e}function d(t,e,[n,i,o]){const r=void 0!==e[o]?e[o]:.5,l=(0,s.j)(t.min,t.max,r);a(t,e[n],e[i],l,e.scale)}const p=["x","scaleX","originX"],m=["y","scaleY","originY"];function f(t,e){d(t.x,e,p),d(t.y,e,m)}},775886:(t,e,n)=>{n.d(e,{CQ:()=>i,HQ:()=>o,N:()=>u,jA:()=>h,vb:()=>a});var s=n(26085);function i(t){return t.max-t.min}function o(t,e=0,n=.01){return Math.abs(t-e)<=n}function r(t,e,n,r=.5){t.origin=r,t.originPoint=(0,s.j)(e.min,e.max,t.origin),t.scale=i(n)/i(e),(o(t.scale,1,1e-4)||isNaN(t.scale))&&(t.scale=1),t.translate=(0,s.j)(n.min,n.max,t.origin)-t.originPoint,(o(t.translate)||isNaN(t.translate))&&(t.translate=0)}function a(t,e,n,s){r(t.x,e.x,n.x,s?s.originX:void 0),r(t.y,e.y,n.y,s?s.originY:void 0)}function l(t,e,n){t.min=n.min+e.min,t.max=t.min+i(e)}function u(t,e,n){l(t.x,e.x,n.x),l(t.y,e.y,n.y)}function c(t,e,n){t.min=e.min-n.min,t.max=t.min+i(e)}function h(t,e,n){c(t.x,e.x,n.x),c(t.y,e.y,n.y)}},486781:(t,e,n)=>{n.d(e,{px:()=>c});var s=n(26085),i=n(234223),o=n(370155);function r(t,e,n,s,i){return t-=e,t=(0,o.hq)(t,1/n,s),void 0!==i&&(t=(0,o.hq)(t,1/i,s)),t}function a(t,e,[n,o,a],l,u){!function(t,e=0,n=1,o=.5,a,l=t,u=t){if(i.KN.test(e)&&(e=parseFloat(e),e=(0,s.j)(u.min,u.max,e/100)-u.min),"number"!=typeof e)return;let c=(0,s.j)(l.min,l.max,o);t===l&&(c-=e),t.min=r(t.min,e,n,c,a),t.max=r(t.max,e,n,c,a)}(t,e[n],e[o],e[a],e.scale,l,u)}const l=["x","scaleX","originX"],u=["y","scaleY","originY"];function c(t,e,n,s){a(t.x,e,l,n?n.x:void 0,s?s.x:void 0),a(t.y,e,u,n?n.y:void 0,s?s.y:void 0)}},298944:(t,e,n)=>{n.d(e,{ge:()=>i,xU:()=>s});const s=()=>({x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}),i=()=>({x:{min:0,max:0},y:{min:0,max:0}})},53489:(t,e,n)=>{n.d(e,{XY:()=>o,cH:()=>l,mG:()=>a,zo:()=>r});var s=n(775886);function i(t){return 0===t.translate&&1===t.scale}function o(t){return i(t.x)&&i(t.y)}function r(t,e){return t.x.min===e.x.min&&t.x.max===e.x.max&&t.y.min===e.y.min&&t.y.max===e.y.max}function a(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 l(t){return(0,s.CQ)(t.x)/(0,s.CQ)(t.y)}},322326:(t,e,n)=>{n.d(e,{B:()=>o});var s=n(103701),i=n(527076);const o=(0,s.u0)({attachResizeListener:(t,e)=>(0,i.k)(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0})},157986:(t,e,n)=>{n.d(e,{P:()=>r});var s=n(103701),i=n(322326);const o={current:void 0},r=(0,s.u0)({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!o.current){const t=new i.B({});t.mount(window),t.setOptions({layoutScroll:!0}),o.current=t}return o.current},resetTransform:(t,e)=>{t.style.transform=void 0!==e?e:"none"},checkIsScrollRoot:t=>Boolean("fixed"===window.getComputedStyle(t).position)})},103701:(t,e,n)=>{n.d(e,{u0:()=>R}),n(76281),n(314846),n(469655),n(275568);var s=n(902840),i=n(715275),o=n(812385),r=n(370155),a=n(775886),l=n(486781),u=n(298944),c=n(955104),h=n(53489),d=n(999433),p=n(602267),m=n(387464),f=n(687464),v=n(251088),g=n(389462),y=n(736196),x=n(65281),P=n(616246),w=n(26085),b=n(780160),S=n(244089),A=n(641041),T=n(893138),E=n(277210),C=n(78777);const V=["","X","Y","Z"],M={visibility:"hidden"},D=1e3;let k=0;const j={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0};function R({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:f,resetTransform:w}){return class{constructor(t={},n=(null==e?void 0:e())){this.id=k++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,j.totalNodes=j.resolvedTargetDeltas=j.recalculatedProjection=0,this.nodes.forEach(F),this.nodes.forEach($),this.nodes.forEach(H),this.nodes.forEach(O),(0,b.g)(j)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=t,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let e=0;e<this.path.length;e++)this.path[e].shouldResetTransform=!0;this.root===this&&(this.nodes=new g.Y)}addEventListener(t,e){return this.eventHandlers.has(t)||this.eventHandlers.set(t,new s.v),this.eventHandlers.get(t).add(e)}notifyListeners(t,...e){const n=this.eventHandlers.get(t);n&&n.notify(...e)}hasListeners(t){return this.eventHandlers.has(t)}mount(e,n=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=(0,S.x)(e),this.instance=e;const{layoutId:s,layout:i,visualElement:o}=this.options;if(o&&!o.current&&o.mount(e),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),n&&(i||s)&&(this.isLayoutDirty=!0),t){let n;const s=()=>this.root.updateBlockedByResize=!1;t(e,(()=>{this.root.updateBlockedByResize=!0,n&&n(),n=(0,P.c)(s,250),x.w.hasAnimatedSinceResize&&(x.w.hasAnimatedSinceResize=!1,this.nodes.forEach(W))}))}s&&this.root.registerSharedNode(s,this),!1!==this.options.animate&&o&&(s||i)&&this.addEventListener("didUpdate",(({delta:t,hasLayoutChanged:e,hasRelativeTargetChanged:n,layout:s})=>{if(this.isTreeAnimationBlocked())return this.target=void 0,void(this.relativeTarget=void 0);const i=this.options.transition||o.getDefaultTransition()||K,{onLayoutAnimationStart:r,onLayoutAnimationComplete:a}=o.getProps(),l=!this.targetLayout||!(0,h.mG)(this.targetLayout,s)||n,u=!e&&n;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||u||e&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(t,u);const e={...(0,c.r)(i,"layout"),onPlay:r,onComplete:a};(o.shouldReduceMotion||this.options.layoutRoot)&&(e.delay=0,e.type=!1),this.startAnimation(e)}else e||W(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=s}))}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,(0,E.WG)(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(N),this.animationId++)}getTransformTemplate(){const{visualElement:t}=this.options;return t&&t.getProps().transformTemplate}willUpdate(t=!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 i=0;i<this.path.length;i++){const t=this.path[i];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 s=this.getTransformTemplate();this.prevTransformTemplateValue=s?s(this.latestValues,""):void 0,this.updateSnapshot(),t&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked())return this.unblockUpdate(),this.clearAllSnapshots(),void this.nodes.forEach(U);this.isUpdating||this.nodes.forEach(X),this.isUpdating=!1,this.nodes.forEach(G),this.nodes.forEach(B),this.nodes.forEach(L),this.clearAllSnapshots();const t=performance.now();E.uv.delta=(0,T.q)(0,1e3/60,t-E.uv.timestamp),E.uv.timestamp=t,E.uv.isProcessing=!0,E.Ci.update.process(E.uv),E.Ci.preRender.process(E.uv),E.Ci.render.process(E.uv),E.uv.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,queueMicrotask((()=>this.update())))}clearAllSnapshots(){this.nodes.forEach(I),this.sharedNodes.forEach(Y)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,E.Gt.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){E.Gt.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=(0,u.ge)(),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(t="measure"){let 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:f(this.instance),offset:n(this.instance)})}resetTransform(){if(!w)return;const t=this.isLayoutDirty||this.shouldResetTransform,e=this.projectionDelta&&!(0,h.XY)(this.projectionDelta),n=this.getTransformTemplate(),s=n?n(this.latestValues,""):void 0,i=s!==this.prevTransformTemplateValue;t&&(e||(0,v.HD)(this.latestValues)||i)&&(w(this.instance,s),this.shouldResetTransform=!1,this.scheduleRender())}measure(t=!0){const e=this.measurePageBox();let n=this.removeElementScroll(e);var s;return t&&(n=this.removeTransform(n)),J((s=n).x),J(s.y),{animationId:this.root.animationId,measuredBox:e,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:t}=this.options;if(!t)return(0,u.ge)();const e=t.measureViewportBox(),{scroll:n}=this.root;return n&&((0,r.Ql)(e.x,n.offset.x),(0,r.Ql)(e.y,n.offset.y)),e}removeElementScroll(t){const e=(0,u.ge)();(0,o.H)(e,t);for(let n=0;n<this.path.length;n++){const s=this.path[n],{scroll:i,options:a}=s;if(s!==this.root&&i&&a.layoutScroll){if(i.isRoot){(0,o.H)(e,t);const{scroll:n}=this.root;n&&((0,r.Ql)(e.x,-n.offset.x),(0,r.Ql)(e.y,-n.offset.y))}(0,r.Ql)(e.x,i.offset.x),(0,r.Ql)(e.y,i.offset.y)}}return e}applyTransform(t,e=!1){const n=(0,u.ge)();(0,o.H)(n,t);for(let s=0;s<this.path.length;s++){const t=this.path[s];!e&&t.options.layoutScroll&&t.scroll&&t!==t.root&&(0,r.Ww)(n,{x:-t.scroll.offset.x,y:-t.scroll.offset.y}),(0,v.HD)(t.latestValues)&&(0,r.Ww)(n,t.latestValues)}return(0,v.HD)(this.latestValues)&&(0,r.Ww)(n,this.latestValues),n}removeTransform(t){const e=(0,u.ge)();(0,o.H)(e,t);for(let n=0;n<this.path.length;n++){const t=this.path[n];if(!t.instance)continue;if(!(0,v.HD)(t.latestValues))continue;(0,v.vk)(t.latestValues)&&t.updateSnapshot();const s=(0,u.ge)(),i=t.measurePageBox();(0,o.H)(s,i),(0,l.px)(e,t.latestValues,t.snapshot?t.snapshot.layoutBox:void 0,s)}return(0,v.HD)(this.latestValues)&&(0,l.px)(e,this.latestValues),e}setTargetDelta(t){this.targetDelta=t,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(t){this.options={...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!==E.uv.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(t=!1){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 s=Boolean(this.resumingFrom)||this!==n;if(!(t||s&&this.isSharedProjectionDirty||this.isProjectionDirty||(null===(e=this.parent)||void 0===e?void 0:e.isProjectionDirty)||this.attemptToResolveRelativeTarget))return;const{layout:i,layoutId:l}=this.options;if(this.layout&&(i||l)){if(this.resolvedRelativeTargetAt=E.uv.timestamp,!this.targetDelta&&!this.relativeTarget){const t=this.getClosestProjectingParent();t&&t.layout&&1!==this.animationProgress?(this.relativeParent=t,this.forceRelativeParentToResolveTarget(),this.relativeTarget=(0,u.ge)(),this.relativeTargetOrigin=(0,u.ge)(),(0,a.jA)(this.relativeTargetOrigin,this.layout.layoutBox,t.layout.layoutBox),(0,o.H)(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(this.relativeTarget||this.targetDelta){if(this.target||(this.target=(0,u.ge)(),this.targetWithTransforms=(0,u.ge)()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),(0,a.N)(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.layoutBox):(0,o.H)(this.target,this.layout.layoutBox),(0,r.o4)(this.target,this.targetDelta)):(0,o.H)(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=(0,u.ge)(),this.relativeTargetOrigin=(0,u.ge)(),(0,a.jA)(this.relativeTargetOrigin,this.target,t.target),(0,o.H)(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}j.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(this.parent&&!(0,v.vk)(this.parent.latestValues)&&!(0,v.vF)(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 s=!0;if((this.isProjectionDirty||(null===(t=this.parent)||void 0===t?void 0:t.isProjectionDirty))&&(s=!1),n&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(s=!1),this.resolvedRelativeTargetAt===E.uv.timestamp&&(s=!1),s)return;const{layout:i,layoutId:l}=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||!i&&!l)return;(0,o.H)(this.layoutCorrected,this.layout.layoutBox);const c=this.treeScale.x,h=this.treeScale.y;(0,r.OU)(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:d}=e;if(!d)return void(this.projectionTransform&&(this.projectionDelta=(0,u.xU)(),this.projectionTransform="none",this.scheduleRender()));this.projectionDelta||(this.projectionDelta=(0,u.xU)(),this.projectionDeltaWithTransform=(0,u.xU)());const p=this.projectionTransform;(0,a.vb)(this.projectionDelta,this.layoutCorrected,d,this.latestValues),this.projectionTransform=(0,m.I)(this.projectionDelta,this.treeScale),this.projectionTransform===p&&this.treeScale.x===c&&this.treeScale.y===h||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",d)),j.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(t=!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,e=!1){const n=this.snapshot,s=n?n.latestValues:{},r={...this.latestValues},l=(0,u.xU)();this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!e;const c=(0,u.ge)(),d=(n?n.source:void 0)!==(this.layout?this.layout.source:void 0),p=this.getStack(),m=!p||p.members.length<=1,f=Boolean(d&&!m&&!0===this.options.crossfade&&!this.path.some(Q));let v;this.animationProgress=0,this.mixTargetDelta=e=>{const n=e/1e3;var p,g,y,x;z(l.x,t.x,n),z(l.y,t.y,n),this.setTargetDelta(l),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&((0,a.jA)(c,this.layout.layoutBox,this.relativeParent.layout.layoutBox),p=this.relativeTarget,g=this.relativeTargetOrigin,y=c,x=n,q(p.x,g.x,y.x,x),q(p.y,g.y,y.y,x),v&&(0,h.zo)(this.relativeTarget,v)&&(this.isProjectionDirty=!1),v||(v=(0,u.ge)()),(0,o.H)(v,this.relativeTarget)),d&&(this.animationValues=r,(0,i.v)(r,s,this.latestValues,n,f,m)),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&&((0,E.WG)(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=E.Gt.update((()=>{x.w.hasAnimatedSinceResize=!0,this.currentAnimation=(0,A.z)(0,D,{...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(D),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const t=this.getLead();let{targetWithTransforms:e,target:n,layout:s,latestValues:i}=t;if(e&&n&&s){if(this!==t&&this.layout&&s&&tt(this.options.animationType,this.layout.layoutBox,s.layoutBox)){n=this.target||(0,u.ge)();const e=(0,a.CQ)(this.layout.layoutBox.x);n.x.min=t.target.x.min,n.x.max=n.x.min+e;const s=(0,a.CQ)(this.layout.layoutBox.y);n.y.min=t.target.y.min,n.y.max=n.y.min+s}(0,o.H)(e,n),(0,r.Ww)(e,i),(0,a.vb)(this.projectionDeltaWithTransform,this.layoutCorrected,e,i)}}registerSharedNode(t,e){this.sharedNodes.has(t)||this.sharedNodes.set(t,new d.P),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({needsReset:t,transition:e,preserveFollowOpacity:n}={}){const s=this.getStack();s&&s.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 s={};for(let i=0;i<V.length;i++){const e="rotate"+V[i];n[e]&&(s[e]=n[e],t.setStaticValue(e,0))}t.render();for(const i in s)t.setStaticValue(i,s[i]);t.scheduleRender()}getProjectionStyles(t){var e,n;if(!this.instance||this.isSVG)return;if(!this.isVisible)return M;const s={visibility:""},i=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,s.opacity="",s.pointerEvents=(0,y.u)(null==t?void 0:t.pointerEvents)||"",s.transform=i?i(this.latestValues,""):"none",s;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=(0,y.u)(null==t?void 0:t.pointerEvents)||""),this.hasProjected&&!(0,v.HD)(this.latestValues)&&(e.transform=i?i({},""):"none",this.hasProjected=!1),e}const r=o.animationValues||o.latestValues;this.applyTransformsToTarget(),s.transform=(0,m.I)(this.projectionDeltaWithTransform,this.treeScale,r),i&&(s.transform=i(r,s.transform));const{x:a,y:l}=this.projectionDelta;s.transformOrigin=`${100*a.origin}% ${100*l.origin}% 0`,o.animationValues?s.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:s.opacity=o===this?void 0!==r.opacity?r.opacity:"":void 0!==r.opacityExit?r.opacityExit:0;for(const u in p.H){if(void 0===r[u])continue;const{correct:t,applyTo:e}=p.H[u],n="none"===s.transform?r[u]:t(r[u],o);if(e){const t=e.length;for(let i=0;i<t;i++)s[e[i]]=n}else s[u]=n}return this.options.layoutId&&(s.pointerEvents=o===this?(0,y.u)(null==t?void 0:t.pointerEvents)||"":"none"),s}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(U),this.root.sharedNodes.clear()}}}function B(t){t.updateLayout()}function L(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:s}=t.layout,{animationType:i}=t.options,o=n.source!==t.layout.source;"size"===i?(0,f.X)((t=>{const s=o?n.measuredBox[t]:n.layoutBox[t],i=(0,a.CQ)(s);s.min=e[t].min,s.max=s.min+i})):tt(i,n.layoutBox,e)&&(0,f.X)((s=>{const i=o?n.measuredBox[s]:n.layoutBox[s],r=(0,a.CQ)(e[s]);i.max=i.min+r,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[s].max=t.relativeTarget[s].min+r)}));const r=(0,u.xU)();(0,a.vb)(r,e,n.layoutBox);const l=(0,u.xU)();o?(0,a.vb)(l,t.applyTransform(s,!0),n.measuredBox):(0,a.vb)(l,e,n.layoutBox);const c=!(0,h.XY)(r);let d=!1;if(!t.resumeFrom){const s=t.getClosestProjectingParent();if(s&&!s.resumeFrom){const{snapshot:i,layout:o}=s;if(i&&o){const r=(0,u.ge)();(0,a.jA)(r,n.layoutBox,i.layoutBox);const l=(0,u.ge)();(0,a.jA)(l,e,o.layoutBox),(0,h.mG)(r,l)||(d=!0),s.options.layoutRoot&&(t.relativeTarget=l,t.relativeTargetOrigin=r,t.relativeParent=s)}}}t.notifyListeners("didUpdate",{layout:e,snapshot:n,delta:l,layoutDelta:r,hasLayoutChanged:c,hasRelativeTargetChanged:d})}else if(t.isLead()){const{onExitComplete:e}=t.options;e&&e()}t.options.transition=void 0}function F(t){j.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 O(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function I(t){t.clearSnapshot()}function U(t){t.clearMeasurements()}function X(t){t.isLayoutDirty=!1}function G(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function W(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function $(t){t.resolveTargetDelta()}function H(t){t.calcProjection()}function N(t){t.resetRotation()}function Y(t){t.removeLeadSnapshot()}function z(t,e,n){t.translate=(0,w.j)(e.translate,0,n),t.scale=(0,w.j)(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function q(t,e,n,s){t.min=(0,w.j)(e.min,n.min,s),t.max=(0,w.j)(e.max,n.max,s)}function Q(t){return t.animationValues&&void 0!==t.animationValues.opacityExit}const K={duration:.45,ease:[.4,0,.1,1]},Z=t=>"undefined"!=typeof navigator&&navigator.userAgent.toLowerCase().includes(t),_=Z("applewebkit/")&&!Z("chrome/")?Math.round:C.l;function J(t){t.min=_(t.min),t.max=_(t.max)}function tt(t,e,n){return"position"===t||"preserve-aspect"===t&&!(0,a.HQ)((0,h.cH)(e),(0,h.cH)(n),.2)}},186775:(t,e,n)=>{n(314846),n(469655)},65281:(t,e,n)=>{n.d(e,{w:()=>s});const s={hasAnimatedSinceResize:!0,hasEverUpdated:!1}},999433:(t,e,n)=>{n.d(e,{P:()=>i}),n(314846),n(469655);var s=n(890604);class i{constructor(){this.members=[]}add(t){(0,s.Kq)(this.members,t),t.scheduleRender()}remove(t){if((0,s.Ai)(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 s=e;s>=0;s--){const t=this.members[s];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:s}=t.options;!1===s&&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)}}},694608:(t,e,n)=>{n.d(e,{P:()=>o});var s=n(234223);function i(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const o={correct:(t,e)=>{if(!e.target)return t;if("string"==typeof t){if(!s.px.test(t))return t;t=parseFloat(t)}return`${i(t,e.target.x)}% ${i(t,e.target.y)}%`}}},828667:(t,e,n)=>{n.d(e,{_:()=>o});var s=n(26085),i=n(73748);const o={correct:(t,{treeScale:e,projectionDelta:n})=>{const o=t,r=i.f.parse(t);if(r.length>5)return o;const a=i.f.createTransformer(t),l="number"!=typeof r[0]?1:0,u=n.x.scale*e.x,c=n.y.scale*e.y;r[0+l]/=u,r[1+l]/=c;const h=(0,s.j)(u,c,.5);return"number"==typeof r[2+l]&&(r[2+l]/=h),"number"==typeof r[3+l]&&(r[3+l]/=h),a(r)}}},602267:(t,e,n)=>{n.d(e,{$:()=>i,H:()=>s});const s={};function i(t){Object.assign(s,t)}},387464:(t,e,n)=>{function s(t,e,n){let s="";const i=t.x.translate/e.x,o=t.y.translate/e.y;if((i||o)&&(s=`translate3d(${i}px, ${o}px, 0) `),1===e.x&&1===e.y||(s+=`scale(${1/e.x}, ${1/e.y}) `),n){const{rotate:t,rotateX:e,rotateY:i}=n;t&&(s+=`rotate(${t}deg) `),e&&(s+=`rotateX(${e}deg) `),i&&(s+=`rotateY(${i}deg) `)}const r=t.x.scale*e.x,a=t.y.scale*e.y;return 1===r&&1===a||(s+=`scale(${r}, ${a})`),s||"none"}n.d(e,{I:()=>s})},557013:(t,e,n)=>{n(157986)},674060:(t,e,n)=>{n(63696),n(157986)},687464:(t,e,n)=>{function s(t){return[t("x"),t("y")]}n.d(e,{X:()=>s})},251088:(t,e,n)=>{function s(t){return void 0===t||1===t}function i({scale:t,scaleX:e,scaleY:n}){return!s(t)||!s(e)||!s(n)}function o(t){return i(t)||r(t)||t.z||t.rotate||t.rotateX||t.rotateY}function r(t){return a(t.x)||a(t.y)}function a(t){return t&&"0%"!==t}n.d(e,{HD:()=>o,vF:()=>r,vk:()=>i})},410347:(t,e,n)=>{n.d(e,{L:()=>r,m:()=>o});var s=n(912158),i=n(370155);function o(t,e){return(0,s.FY)((0,s.bS)(t.getBoundingClientRect(),e))}function r(t,e,n){const s=o(t,n),{scroll:r}=e;return r&&((0,i.Ql)(s.x,r.offset.x),(0,i.Ql)(s.y,r.offset.y)),s}},373518:(t,e,n)=>{n.d(e,{B:()=>A}),n(314846),n(469655),n(841164);var s=n(298944),i=n(105675),o=n(989461),r=n(27250),a=n(902840),l=n(239667),u=n(146547),c=n(573970),h=n(353994),d=n(884135),p=n(563305),m=n(931545),f=n(775691),v=(n(721657),n(834430)),g=n(422918),y=n(550529),x=n(277210);const P=Object.keys(v.B),w=P.length,b=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],S=g._.length;class A{constructor({parent:t,props:e,presenceContext:n,reducedMotionConfig:s,visualState:i},o={}){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=()=>x.Gt.render(this.render,!1,!0);const{latestValues:r,renderState:a}=i;this.latestValues=r,this.baseTarget={...r},this.initialValues=e.initial?{...r}:{},this.renderState=a,this.parent=t,this.props=e,this.presenceContext=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=s,this.options=o,this.isControllingVariants=(0,d.e)(e),this.isVariantNode=(0,d.O)(e),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(t&&t.current);const{willChange:l,...h}=this.scrapeMotionValuesFromProps(e,{});for(const d in h){const t=h[d];void 0!==r[d]&&(0,c.S)(t)&&(t.set(r[d],!1),(0,u.k)(l)&&l.add(d))}}scrapeMotionValuesFromProps(t,e){return{}}mount(t){this.current=t,y.C.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))),r.r.current||(0,o.U)(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||r.O.current),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){y.C.delete(this.current),this.projection&&this.projection.unmount(),(0,x.WG)(this.notifyUpdate),(0,x.WG)(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=h.f.has(t),s=e.on("change",(e=>{this.latestValues[t]=e,this.props.onUpdate&&x.Gt.update(this.notifyUpdate,!1,!0),n&&this.projection&&(this.projection.isTransformDirty=!0)})),i=e.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(t,(()=>{s(),i()}))}sortNodePosition(t){return this.current&&this.sortInstanceNodePosition&&this.type===t.type?this.sortInstanceNodePosition(this.current,t.current):0}loadFeatures({children:t,...e},n,s,o){let r,a;for(let i=0;i<w;i++){const t=P[i],{isEnabled:n,Feature:s,ProjectionNode:o,MeasureLayout:l}=v.B[t];o&&(r=o),n(e)&&(!this.features[t]&&s&&(this.features[t]=new s(this)),l&&(a=l))}if(("html"===this.type||"svg"===this.type)&&!this.projection&&r){this.projection=new r(this.latestValues,this.parent&&this.parent.projection);const{layoutId:t,layout:n,drag:s,dragConstraints:a,layoutScroll:l,layoutRoot:u}=e;this.projection.setOptions({layoutId:t,layout:n,alwaysMeasureLayout:Boolean(s)||a&&(0,i.X)(a),visualElement:this,scheduleRender:()=>this.scheduleRender(),animationType:"string"==typeof n?n:"both",initialPromotionConfig:o,layoutScroll:l,layoutRoot:u})}return a}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):(0,s.ge)()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,e){this.latestValues[t]=e}makeTargetAnimatable(t,e=!0){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<b.length;n++){const e=b[n];this.propEventSubscriptions[e]&&(this.propEventSubscriptions[e](),delete this.propEventSubscriptions[e]);const s=t["on"+e];s&&(this.propEventSubscriptions[e]=this.on(e,s))}this.prevMotionValues=(0,m.U)(this,this.scrapeMotionValuesFromProps(t,this.prevProps),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}getVariantContext(t=!1){if(t)return this.parent?this.parent.getVariantContext():void 0;if(!this.isControllingVariants){const t=this.parent&&this.parent.getVariantContext()||{};return void 0!==this.props.initial&&(t.initial=this.props.initial),t}const e={};for(let n=0;n<S;n++){const t=g._[n],s=this.props[t];((0,p.w)(s)||!1===s)&&(e[t]=s)}return e}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=(0,l.OQ)(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,s="string"==typeof n||"object"==typeof n?null===(e=(0,f.a)(this.props,n))||void 0===e?void 0:e[t]:void 0;if(n&&void 0!==s)return s;const i=this.getBaseTargetFromProps(this.props,t);return void 0===i||(0,c.S)(i)?void 0!==this.initialValues[t]&&void 0===s?void 0:this.baseTarget[t]:i}on(t,e){return this.events[t]||(this.events[t]=new a.v),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}}},294901:(t,e,n)=>{n.d(e,{b:()=>r});var s=n(482200),i=n(283043),o=n(373518);class r extends o.B{sortInstanceNodePosition(t,e){return 2&t.compareDocumentPosition(e)?1:-1}getBaseTargetFromProps(t,e){return t.style?t.style[e]:void 0}removeValueFromRenderState(t,{vars:e,style:n}){delete e[t],delete n[t]}makeTargetAnimatableFromInstance({transition:t,transitionEnd:e,...n},{transformValues:o},r){let a=(0,s.$z)(n,t||{},this);if(o&&(e&&(e=o(e)),n&&(n=o(n)),a&&(a=o(a))),r){(0,s.TM)(this,n,a);const t=(0,i.P)(this,n,a,e);e=t.transitionEnd,n=t.target}return{transition:t,transitionEnd:e,...n}}}},740601:(t,e,n)=>{n.d(e,{J:()=>r});var s=n(176617),i=n(541109),o=n(514844);const r=(t,e)=>(0,o.Q)(t)?new i.l(e,{enableHardwareAcceleration:!1}):new s.M(e,{enableHardwareAcceleration:!0})},827073:(t,e,n)=>{n.d(e,{l:()=>o});var s=n(788477),i=n(302160);const o={renderer:n(740601).J,...s.W,...i.n}},475861:(t,e,n)=>{var s=n(863986),i=n(561522);n(827073).l,s.$,i.Z},959549:(t,e,n)=>{var s=n(557712),i=n(346306);(0,s.H)(i.P)},557712:(t,e,n)=>{n.d(e,{H:()=>i});var s=n(285424);function i(t){function e(e,n={}){return(0,s.G)(t(e,n))}if("undefined"==typeof Proxy)return e;const n=new Map;return new Proxy(e,{get:(t,s)=>(n.has(s)||n.set(s,e(s)),n.get(s))})}},142571:(t,e,n)=>{n.d(e,{P:()=>h}),n(285424);var s=n(557712),i=n(346306),o=n(302160),r=n(788477),a=n(863986),l=n(740601),u=n(561522);const c={...r.W,...o.n,...a.$,...u.Z},h=(0,s.H)(((t,e)=>(0,i.P)(t,e,c,l.J)))},5457:(t,e,n)=>{n(314846),n(469655),n(801822),new WeakMap},377791:(t,e,n)=>{n(314846),n(469655),new Set},751308:(t,e,n)=>{n(5457),n(377791)},847891:(t,e,n)=>{n(12582),n(879783),n(8065),new Map},454669:(t,e,n)=>{n(799020),n(540255)},879783:(t,e,n)=>{n.d(e,{y:()=>i});var s=n(277210);function i(t,e){let n;const i=()=>{const{currentTime:s}=e,i=(null===s?0:s.value)/100;n!==i&&t(i),n=i};return s.Gt.update(i,!0),()=>(0,s.WG)(i)}},808537:(t,e,n)=>{},792938:(t,e,n)=>{n(309305),n(587474),n(336671),n(323662),n(766869)},309305:(t,e,n)=>{},336671:(t,e,n)=>{n(76281),n(808537)},587474:(t,e,n)=>{},62231:(t,e,n)=>{n(721657),n(454669),n(792938)},8065:(t,e,n)=>{n.d(e,{J:()=>s});const s=(0,n(696407).p)((()=>void 0!==window.ScrollTimeline))},12582:(t,e,n)=>{n(751308),n(454669),n(62231),n(277210),new WeakMap,new WeakMap,new WeakMap},86595:(t,e,n)=>{n.d(e,{o:()=>u});var s=n(63696),i=n(320012),o=n(805796),r=n(514844),a=n(30233),l=n(573970);function u(t=!1){return(e,n,u,{latestValues:c},h)=>{const d=((0,r.Q)(e)?a.u:i.b)(n,c,h,e),p={...(0,o.J)(n,"string"==typeof e,t),...d,ref:u},{children:m}=n,f=(0,s.useMemo)((()=>(0,l.S)(m)?m.get():m),[m]);return(0,s.createElement)(e,{...p,children:f})}}},493388:(t,e,n)=>{n.d(e,{I:()=>s});const s=t=>t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()},346306:(t,e,n)=>{n.d(e,{P:()=>a});var s=n(514844),i=n(86595),o=n(935856),r=n(556029);function a(t,{forwardMotionProps:e=!1},n,a){return{...(0,s.Q)(t)?o.X:r.S,preloadedFeatures:n,useRender:(0,i.o)(e),createVisualElement:a,Component:t}}},600285:(t,e,n)=>{n.d(e,{d:()=>u}),n(314846),n(469655);var s=n(841164),i=n(907930),o=n(511078);const r=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,a=4;function l(t,e,n=1){(0,s.V)(n<=a,`Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`);const[u,c]=function(t){const e=r.exec(t);if(!e)return[,];const[,n,s]=e;return[n,s]}(t);if(!u)return;const h=window.getComputedStyle(e).getPropertyValue(u);if(h){const t=h.trim();return(0,i.i)(t)?parseFloat(t):t}return(0,o.pG)(c)?l(c,e,n+1):c}function u(t,{...e},n){const s=t.current;if(!(s instanceof Element))return{target:e,transitionEnd:n};n&&(n={...n}),t.values.forEach((t=>{const e=t.get();if(!(0,o.pG)(e))return;const n=l(e,s);n&&t.set(n)}));for(const i in e){const t=e[i];if(!(0,o.pG)(t))continue;const r=l(t,s);r&&(e[i]=r,n||(n={}),void 0===n[i]&&(n[i]=t))}return{target:e,transitionEnd:n}}},805796:(t,e,n)=>{n.d(e,{J:()=>r});var s=n(116954);let i=t=>!(0,s.S)(t);try{(o=require("@emotion/is-prop-valid").default)&&(i=t=>t.startsWith("on")?!(0,s.S)(t):o(t))}catch(a){}var o;function r(t,e,n){const o={};for(const r in t)"values"===r&&"object"==typeof t.values||(i(r)||!0===n&&(0,s.S)(r)||!e&&!(0,s.S)(r)||t.draggable&&r.startsWith("onDrag"))&&(o[r]=t[r]);return o}},511078:(t,e,n)=>{n.d(e,{j4:()=>i,pG:()=>o,z2:()=>r});const s=t=>e=>"string"==typeof e&&e.startsWith(t),i=s("--"),o=s("var(--"),r=/var\s*\(\s*--[\w-]+(\s*,\s*(?:(?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)+)?\s*\)/g},514844:(t,e,n)=>{n.d(e,{Q:()=>i}),n(76281);var s=n(505324);function i(t){return"string"==typeof t&&!t.includes("-")&&!!(s.J.indexOf(t)>-1||/[A-Z]/.test(t))}},244089:(t,e,n)=>{function s(t){return t instanceof SVGElement&&"svg"!==t.tagName}n.d(e,{x:()=>s})},283043:(t,e,n)=>{n.d(e,{P:()=>o});var s=n(600285),i=n(254098);const o=(t,e,n,o)=>{const r=(0,s.d)(t,e,o);return e=r.target,o=r.transitionEnd,(0,i.t)(t,e,n,o)}},801822:(t,e,n)=>{n.d(e,{K:()=>i});var s=n(841164);function i(t,e,n){var i;if("string"==typeof t){let o=document;e&&((0,s.V)(Boolean(e.current),"Scope provided, but no element detected."),o=e.current),n?(null!==(i=n[t])&&void 0!==i||(n[t]=o.querySelectorAll(t)),t=n[t]):t=o.querySelectorAll(t)}else t instanceof Element&&(t=[t]);return Array.from(t||[])}},254098:(t,e,n)=>{n.d(e,{t:()=>P}),n(314846),n(327458),n(469655),n(194364),n(275568);var s=n(343690),i=n(841164),o=n(353994),r=n(809372),a=n(701134),l=n(900478),u=n(234223);const c=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),h=t=>c.has(t),d=t=>Object.keys(t).some(h),p=t=>t===l.ai||t===u.px,m=(t,e)=>parseFloat(t.split(", ")[e]),f=(t,e)=>(n,{transform:s})=>{if("none"===s||!s)return 0;const i=s.match(/^matrix3d\((.+)\)$/);if(i)return m(i[1],e);{const e=s.match(/^matrix\((.+)\)$/);return e?m(e[1],t):0}},v=new Set(["x","y","z"]),g=o.U.filter((t=>!v.has(t))),y={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:f(4,13),y:f(5,14)};y.translateX=y.x,y.translateY=y.y;const x=(t,e,n={},o={})=>{e={...e},o={...o};const l=Object.keys(e).filter(h);let c=[],d=!1;const m=[];if(l.forEach((a=>{const l=t.getValue(a);if(!t.hasValue(a))return;let h=n[a],f=(0,r.n)(h);const v=e[a];let y;if((0,s.p)(v)){const t=v.length,e=null===v[0]?1:0;h=v[e],f=(0,r.n)(h);for(let n=e;n<t&&null!==v[n];n++)y?(0,i.V)((0,r.n)(v[n])===y,"All keyframes must be of the same type"):(y=(0,r.n)(v[n]),(0,i.V)(y===f||p(f)&&p(y),"Keyframes must be of the same dimension as the current value"))}else y=(0,r.n)(v);if(f!==y)if(p(f)&&p(y)){const t=l.get();"string"==typeof t&&l.set(parseFloat(t)),"string"==typeof v?e[a]=parseFloat(v):Array.isArray(v)&&y===u.px&&(e[a]=v.map(parseFloat))}else(null==f?void 0:f.transform)&&(null==y?void 0:y.transform)&&(0===h||0===v)?0===h?l.set(y.transform(h)):e[a]=f.transform(v):(d||(c=function(t){const e=[];return g.forEach((n=>{const s=t.getValue(n);void 0!==s&&(e.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))})),e.length&&t.render(),e}(t),d=!0),m.push(a),o[a]=void 0!==o[a]?o[a]:e[a],l.jump(v))})),m.length){const n=m.indexOf("height")>=0?window.pageYOffset:null,s=((t,e,n)=>{const s=e.measureViewportBox(),i=e.current,o=getComputedStyle(i),{display:r}=o,a={};"none"===r&&e.setStaticValue("display",t.display||"block"),n.forEach((t=>{a[t]=y[t](s,o)})),e.render();const l=e.measureViewportBox();return n.forEach((n=>{const s=e.getValue(n);s&&s.jump(a[n]),t[n]=y[n](l,o)})),t})(e,t,m);return c.length&&c.forEach((([e,n])=>{t.getValue(e).set(n)})),t.render(),a.B&&null!==n&&window.scrollTo({top:n}),{target:s,transitionEnd:o}}return{target:e,transitionEnd:o}};function P(t,e,n,s){return d(e)?x(t,e,n,s):{target:e,transitionEnd:s}}},392602:(t,e,n)=>{n.d(e,{J:()=>r});var s=n(73748),i=n(358986),o=n(622157);function r(t,e){let n=(0,o.D)(t);return n!==i.p&&(n=s.f),n.getAnimatableNone?n.getAnimatableNone(e):void 0}},622157:(t,e,n)=>{n.d(e,{D:()=>r});var s=n(449705),i=n(358986);const o={...n(823484).W,color:s.y,backgroundColor:s.y,outlineColor:s.y,fill:s.y,stroke:s.y,borderColor:s.y,borderTopColor:s.y,borderRightColor:s.y,borderBottomColor:s.y,borderLeftColor:s.y,filter:i.p,WebkitFilter:i.p},r=t=>o[t]},809372:(t,e,n)=>{n.d(e,{T:()=>a,n:()=>l}),n(314846),n(6211);var s=n(900478),i=n(234223),o=n(683991),r=n(891837);const a=[s.ai,i.px,i.KN,i.uj,i.vw,i.vh,r.q],l=t=>a.find((0,o.w)(t))},429970:(t,e,n)=>{n.d(e,{t:()=>l}),n(314846),n(6211);var s=n(449705),i=n(73748),o=n(809372),r=n(683991);const a=[...o.T,s.y,i.f],l=t=>a.find((0,r.w)(t))},704423:(t,e,n)=>{n.d(e,{e:()=>s});const s=(t,e)=>e&&"number"==typeof t?e.transform(t):t},823484:(t,e,n)=>{n.d(e,{W:()=>r});var s=n(900478),i=n(234223),o=n(455187);const r={borderWidth:i.px,borderTopWidth:i.px,borderRightWidth:i.px,borderBottomWidth:i.px,borderLeftWidth:i.px,borderRadius:i.px,radius:i.px,borderTopLeftRadius:i.px,borderTopRightRadius:i.px,borderBottomRightRadius:i.px,borderBottomLeftRadius:i.px,width:i.px,maxWidth:i.px,height:i.px,maxHeight:i.px,size:i.px,top:i.px,right:i.px,bottom:i.px,left:i.px,padding:i.px,paddingTop:i.px,paddingRight:i.px,paddingBottom:i.px,paddingLeft:i.px,margin:i.px,marginTop:i.px,marginRight:i.px,marginBottom:i.px,marginLeft:i.px,rotate:i.uj,rotateX:i.uj,rotateY:i.uj,rotateZ:i.uj,scale:s.hs,scaleX:s.hs,scaleY:s.hs,scaleZ:s.hs,skew:i.uj,skewX:i.uj,skewY:i.uj,distance:i.px,translateX:i.px,translateY:i.px,translateZ:i.px,x:i.px,y:i.px,z:i.px,perspective:i.px,transformPerspective:i.px,opacity:s.X4,originX:i.gQ,originY:i.gQ,originZ:i.px,zIndex:o.W,fillOpacity:s.X4,strokeOpacity:s.X4,numOctaves:o.W}},683991:(t,e,n)=>{n.d(e,{w:()=>s});const s=t=>e=>e.test(t)},891837:(t,e,n)=>{n.d(e,{q:()=>s});const s={test:t=>"auto"===t,parse:t=>t}},455187:(t,e,n)=>{n.d(e,{W:()=>s});const s={...n(900478).ai,transform:Math.round}},438182:(t,e,n)=>{n(314846),n(469655),n(801822)},176617:(t,e,n)=>{n.d(e,{M:()=>d});var s=n(834109),i=n(511078),o=n(353994),r=n(962748),a=n(988838),l=n(622157),u=n(410347),c=n(294901),h=n(573970);class d extends c.b{constructor(){super(...arguments),this.type="html"}readValueFromInstance(t,e){if(o.f.has(e)){const t=(0,l.D)(e);return t&&t.default||0}{const s=(n=t,window.getComputedStyle(n)),o=((0,i.j4)(e)?s.getPropertyValue(e):s[e])||0;return"string"==typeof o?o.trim():o}var n}measureInstanceViewportBox(t,{transformPagePoint:e}){return(0,u.m)(t,e)}build(t,e,n,i){(0,s.O)(t,e,n,i.transformTemplate)}scrapeMotionValuesFromProps(t,e){return(0,r.x)(t,e)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;(0,h.S)(t)&&(this.childSubscription=t.on("change",(t=>{this.current&&(this.current.textContent=`${t}`)})))}renderInstance(t,e,n,s){(0,a.e)(t,e,n,s)}}},556029:(t,e,n)=>{n.d(e,{S:()=>r});var s=n(366084),i=n(962748),o=n(884999);const r={useVisualState:(0,s.T)({scrapeMotionValuesFromProps:i.x,createRenderState:o.d})}},320012:(t,e,n)=>{n.d(e,{b:()=>u,o:()=>l});var s=n(63696),i=n(822047),o=n(573970),r=n(834109),a=n(884999);function l(t,e,n){for(const s in e)(0,o.S)(e[s])||(0,i.z)(s,n)||(t[s]=e[s])}function u(t,e,n){const i={},o=function(t,e,n){const i={};return l(i,t.style||{},t),Object.assign(i,function({transformTemplate:t},e,n){return(0,s.useMemo)((()=>{const s=(0,a.d)();return(0,r.O)(s,e,{enableHardwareAcceleration:!n},t),Object.assign({},s.vars,s.style)}),[e])}(t,e,n)),t.transformValues?t.transformValues(i):i}(t,e,n);return t.drag&&!1!==t.dragListener&&(i.draggable=!1,o.userSelect=o.WebkitUserSelect=o.WebkitTouchCallout="none",o.touchAction=!0===t.drag?"none":"pan-"+("x"===t.drag?"y":"x")),void 0===t.tabIndex&&(t.onTap||t.onTapStart||t.whileTap)&&(i.tabIndex=0),i.style=o,i}},834109:(t,e,n)=>{n.d(e,{O:()=>l});var s=n(52565),i=n(511078),o=n(353994),r=n(704423),a=n(823484);function l(t,e,n,l){const{style:u,vars:c,transform:h,transformOrigin:d}=t;let p=!1,m=!1,f=!0;for(const s in e){const t=e[s];if((0,i.j4)(s)){c[s]=t;continue}const n=a.W[s],l=(0,r.e)(t,n);if(o.f.has(s)){if(p=!0,h[s]=l,!f)continue;t!==(n.default||0)&&(f=!1)}else s.startsWith("origin")?(m=!0,d[s]=l):u[s]=l}if(e.transform||(p||l?u.transform=(0,s.d)(t.transform,n,f,l):u.transform&&(u.transform="none")),m){const{originX:t="50%",originY:e="50%",originZ:n=0}=d;u.transformOrigin=`${t} ${e} ${n}`}}},52565:(t,e,n)=>{n.d(e,{d:()=>r});var s=n(353994);const i={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},o=s.U.length;function r(t,{enableHardwareAcceleration:e=!0,allowTransformNone:n=!0},r,a){let l="";for(let u=0;u<o;u++){const e=s.U[u];void 0!==t[e]&&(l+=`${i[e]||e}(${t[e]}) `)}return e&&!t.z&&(l+="translateZ(0)"),l=l.trim(),a?l=a(t,r?"":l):n&&r&&(l="none"),l}},884999:(t,e,n)=>{n.d(e,{d:()=>s});const s=()=>({style:{},transform:{},transformOrigin:{},vars:{}})},988838:(t,e,n)=>{function s(t,{style:e,vars:n},s,i){Object.assign(t.style,e,i&&i.getProjectionStyles(s));for(const o in n)t.style.setProperty(o,n[o])}n.d(e,{e:()=>s})},962748:(t,e,n)=>{n.d(e,{x:()=>o});var s=n(822047),i=n(573970);function o(t,e){const{style:n}=t,o={};for(const r in n)((0,i.S)(n[r])||e.style&&(0,i.S)(e.style[r])||(0,s.z)(r,t))&&(o[r]=n[r]);return o}},353994:(t,e,n)=>{n.d(e,{U:()=>s,f:()=>i});const s=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],i=new Set(s)},550529:(t,e,n)=>{n.d(e,{C:()=>s});const s=new WeakMap},541109:(t,e,n)=>{n.d(e,{l:()=>p});var s=n(906655),i=n(294901),o=n(955012),r=n(493388),a=n(497505),l=n(353994),u=n(885305),c=n(622157),h=n(298944),d=n(130339);class p extends i.b{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){if(l.f.has(e)){const t=(0,c.D)(e);return t&&t.default||0}return e=a.e.has(e)?e:(0,r.I)(e),t.getAttribute(e)}measureInstanceViewportBox(){return(0,h.ge)()}scrapeMotionValuesFromProps(t,e){return(0,s.x)(t,e)}build(t,e,n,s){(0,o.B)(t,e,n,this.isSVGTag,s.transformTemplate)}renderInstance(t,e,n,s){(0,u.d)(t,e,n,s)}mount(t){this.isSVGTag=(0,d.n)(t.tagName),super.mount(t)}}},935856:(t,e,n)=>{n.d(e,{X:()=>c});var s=n(885305),i=n(906655),o=n(366084),r=n(361590),a=n(955012),l=n(130339),u=n(277210);const c={useVisualState:(0,o.T)({scrapeMotionValuesFromProps:i.x,createRenderState:r.s,onMount:(t,e,{renderState:n,latestValues:i})=>{u.Gt.read((()=>{try{n.dimensions="function"==typeof e.getBBox?e.getBBox():e.getBoundingClientRect()}catch(t){n.dimensions={x:0,y:0,width:0,height:0}}})),u.Gt.render((()=>{(0,a.B)(n,i,{enableHardwareAcceleration:!1},(0,l.n)(e.tagName),t.transformTemplate),(0,s.d)(e,n)}))}})}},505324:(t,e,n)=>{n.d(e,{J:()=>s});const s=["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"]},30233:(t,e,n)=>{n.d(e,{u:()=>l});var s=n(63696),i=n(320012),o=n(955012),r=n(361590),a=n(130339);function l(t,e,n,l){const u=(0,s.useMemo)((()=>{const n=(0,r.s)();return(0,o.B)(n,e,{enableHardwareAcceleration:!1},(0,a.n)(l),t.transformTemplate),{...n.attrs,style:{...n.style}}}),[e]);if(t.style){const e={};(0,i.o)(e,t.style,t),u.style={...e,...u.style}}return u}},955012:(t,e,n)=>{n.d(e,{B:()=>r});var s=n(834109),i=n(871770),o=n(471516);function r(t,{attrX:e,attrY:n,attrScale:r,originX:a,originY:l,pathLength:u,pathSpacing:c=1,pathOffset:h=0,...d},p,m,f){if((0,s.O)(t,d,p,f),m)return void(t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox));t.attrs=t.style,t.style={};const{attrs:v,style:g,dimensions:y}=t;v.transform&&(y&&(g.transform=v.transform),delete v.transform),y&&(void 0!==a||void 0!==l||g.transform)&&(g.transformOrigin=(0,i.w)(y,void 0!==a?a:.5,void 0!==l?l:.5)),void 0!==e&&(v.x=e),void 0!==n&&(v.y=n),void 0!==r&&(v.scale=r),void 0!==u&&(0,o.C)(v,u,c,h,!1)}},497505:(t,e,n)=>{n.d(e,{e:()=>s});const s=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"])},361590:(t,e,n)=>{n.d(e,{s:()=>i});var s=n(884999);const i=()=>({...(0,s.d)(),attrs:{}})},130339:(t,e,n)=>{n.d(e,{n:()=>s});const s=t=>"string"==typeof t&&"svg"===t.toLowerCase()},471516:(t,e,n)=>{n.d(e,{C:()=>r});var s=n(234223);const i={offset:"stroke-dashoffset",array:"stroke-dasharray"},o={offset:"strokeDashoffset",array:"strokeDasharray"};function r(t,e,n=1,r=0,a=!0){t.pathLength=1;const l=a?i:o;t[l.offset]=s.px.transform(-r);const u=s.px.transform(e),c=s.px.transform(n);t[l.array]=`${u} ${c}`}},885305:(t,e,n)=>{n.d(e,{d:()=>r});var s=n(493388),i=n(988838),o=n(497505);function r(t,e,n,r){(0,i.e)(t,e,void 0,r);for(const i in e.attrs)t.setAttribute(o.e.has(i)?i:(0,s.I)(i),e.attrs[i])}},906655:(t,e,n)=>{n.d(e,{x:()=>r});var s=n(573970),i=n(962748),o=n(353994);function r(t,e){const n=(0,i.x)(t,e);for(const i in t)((0,s.S)(t[i])||(0,s.S)(e[i]))&&(n[-1!==o.U.indexOf(i)?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i]=t[i]);return n}},871770:(t,e,n)=>{n.d(e,{w:()=>o});var s=n(234223);function i(t,e,n){return"string"==typeof t?t:s.px.transform(e+n*t)}function o(t,e,n){return`${i(e,t.x,t.width)} ${i(n,t.y,t.height)}`}},316558:(t,e,n)=>{n.d(e,{L:()=>d}),n(314846),n(469655),n(194364),n(190458);var s=n(892904),i=n(343690),o=n(223605),r=n(563305),a=n(683695),l=n(422918),u=n(104570);const c=[...l.U].reverse(),h=l.U.length;function d(t){let e=function(t){return e=>Promise.all(e.map((({animation:e,options:n})=>(0,u._)(t,e,n))))}(t);const n={animate:p(!0),whileInView:p(),whileHover:p(),whileTap:p(),whileDrag:p(),whileFocus:p(),exit:p()};let l=!0;const d=(e,n)=>{const s=(0,a.K)(t,n);if(s){const{transition:t,transitionEnd:n,...i}=s;e={...e,...i,...n}}return e};function m(a,u){const p=t.getProps(),m=t.getVariantContext(!0)||{},f=[],v=new Set;let g={},y=1/0;for(let e=0;e<h;e++){const h=c[e],w=n[h],b=void 0!==p[h]?p[h]:m[h],S=(0,r.w)(b),A=h===u?w.isActive:null;!1===A&&(y=e);let T=b===m[h]&&b!==p[h]&&S;if(T&&l&&t.manuallyAnimateOnMount&&(T=!1),w.protectedKeys={...g},!w.isActive&&null===A||!b&&!w.prevProp||(0,s.N)(b)||"boolean"==typeof b)continue;let E=(x=w.prevProp,("string"==typeof(P=b)?P!==x:!!Array.isArray(P)&&!(0,o.a)(P,x))||h===u&&w.isActive&&!T&&S||e>y&&S),C=!1;const V=Array.isArray(b)?b:[b];let M=V.reduce(d,{});!1===A&&(M={});const{prevResolvedValues:D={}}=w,k={...D,...M},j=t=>{E=!0,v.has(t)&&(C=!0,v.delete(t)),w.needsAnimating[t]=!0};for(const t in k){const e=M[t],n=D[t];if(g.hasOwnProperty(t))continue;let s=!1;s=(0,i.p)(e)&&(0,i.p)(n)?!(0,o.a)(e,n):e!==n,s?void 0!==e?j(t):v.add(t):void 0!==e&&v.has(t)?j(t):w.protectedKeys[t]=!0}w.prevProp=b,w.prevResolvedValues=M,w.isActive&&(g={...g,...M}),l&&t.blockInitialAnimation&&(E=!1),!E||T&&!C||f.push(...V.map((t=>({animation:t,options:{type:h,...a}}))))}var x,P;if(v.size){const e={};v.forEach((n=>{const s=t.getBaseTarget(n);void 0!==s&&(e[n]=s)})),f.push({animation:e})}let w=Boolean(f.length);return!l||!1!==p.initial&&p.initial!==p.animate||t.manuallyAnimateOnMount||(w=!1),l=!1,w?e(f):Promise.resolve()}return{animateChanges:m,setActive:function(e,s,i){var o;if(n[e].isActive===s)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,s)})),n[e].isActive=s;const r=m(i,e);for(const t in n)n[t].protectedKeys={};return r},setAnimateFunction:function(n){e=n(t)},getState:()=>n}}function p(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}},110877:(t,e,n)=>{n.d(e,{u:()=>s});const s=(t,e)=>t.depth-e.depth},389462:(t,e,n)=>{n.d(e,{Y:()=>o}),n(314846),n(469655);var s=n(890604),i=n(110877);class o{constructor(){this.children=[],this.isDirty=!1}add(t){(0,s.Kq)(this.children,t),this.isDirty=!0}remove(t){(0,s.Ai)(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(i.u),this.isDirty=!1,this.children.forEach(t)}}},884135:(t,e,n)=>{n.d(e,{O:()=>a,e:()=>r}),n(314846),n(275568);var s=n(892904),i=n(563305),o=n(422918);function r(t){return(0,s.N)(t.animate)||o._.some((e=>(0,i.w)(t[e])))}function a(t){return Boolean(r(t)||t.variants)}},563305:(t,e,n)=>{function s(t){return"string"==typeof t||Array.isArray(t)}n.d(e,{w:()=>s})},931545:(t,e,n)=>{n.d(e,{U:()=>r});var s=n(146547),i=(n(721657),n(239667)),o=n(573970);function r(t,e,n){const{willChange:r}=e;for(const a in e){const l=e[a],u=n[a];if((0,o.S)(l))t.addValue(a,l),(0,s.k)(r)&&r.add(a);else if((0,o.S)(u))t.addValue(a,(0,i.OQ)(l,{owner:t})),(0,s.k)(r)&&r.remove(a);else if(u!==l)if(t.hasValue(a)){const e=t.getValue(a);!e.hasAnimated&&e.set(l)}else{const e=t.getStaticValue(a);t.addValue(a,(0,i.OQ)(void 0!==e?e:l,{owner:t}))}}for(const s in n)void 0===e[s]&&t.removeValue(s);return e}},683695:(t,e,n)=>{n.d(e,{K:()=>i}),n(314846),n(469655);var s=n(775691);function i(t,e,n){const i=t.getProps();return(0,s.a)(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))}},775691:(t,e,n)=>{function s(t,e,n,s={},i={}){return"function"==typeof e&&(e=e(void 0!==n?n:t.custom,s,i)),"string"==typeof e&&(e=t.variants&&t.variants[e]),"function"==typeof e&&(e=e(void 0!==n?n:t.custom,s,i)),e}n.d(e,{a:()=>s})},482200:(t,e,n)=>{n.d(e,{$z:()=>f,TM:()=>p,Uo:()=>d}),n(314846),n(327458),n(469655);var s=n(907930),i=n(70998),o=n(744999),r=n(239667),a=n(73748),l=n(392602),u=n(429970),c=n(683695);function h(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,(0,r.OQ)(n))}function d(t,e){const n=(0,c.K)(t,e);let{transitionEnd:s={},transition:i={},...r}=n?t.makeTargetAnimatable(n,!1):{};r={...r,...s};for(const a in r)h(t,a,(0,o.K)(r[a]))}function p(t,e,n){var o,c;const h=Object.keys(e).filter((e=>!t.hasValue(e))),d=h.length;if(d)for(let p=0;p<d;p++){const d=h[p],m=e[d];let f=null;Array.isArray(m)&&(f=m[0]),null===f&&(f=null!==(c=null!==(o=n[d])&&void 0!==o?o:t.readValue(d))&&void 0!==c?c:e[d]),null!=f&&("string"==typeof f&&((0,s.i)(f)||(0,i.$)(f))?f=parseFloat(f):!(0,u.t)(f)&&a.f.test(m)&&(f=(0,l.J)(d,m)),t.addValue(d,(0,r.OQ)(f,{owner:t})),void 0===n[d]&&(n[d]=f),null!==f&&t.setBaseTarget(d,f))}}function m(t,e){if(e)return(e[t]||e.default||e).from}function f(t,e,n){const s={};for(const i in t){const t=m(i,e);if(void 0!==t)s[i]=t;else{const t=n.getValue(i);t&&(s[i]=t.get())}}return s}},422918:(t,e,n)=>{n.d(e,{U:()=>s,_:()=>i});const s=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],i=["initial",...s]},718966:(t,e,n)=>{n.d(e,{W:()=>s});const s={skipAnimations:!1}},890604:(t,e,n)=>{function s(t,e){-1===t.indexOf(e)&&t.push(e)}function i(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}function o([...t],e,n){const s=e<0?t.length+e:e;if(s>=0&&s<t.length){const s=n<0?t.length+n:n,[i]=t.splice(e,1);t.splice(s,0,i)}return t}n.d(e,{Ai:()=>i,Kq:()=>s,Pe:()=>o})},893138:(t,e,n)=>{n.d(e,{q:()=>s});const s=(t,e,n)=>Math.min(Math.max(n,t),e)},616246:(t,e,n)=>{n.d(e,{c:()=>i});var s=n(277210);function i(t,e){const n=performance.now(),i=({timestamp:o})=>{const r=o-n;r>=e&&((0,s.WG)(i),t(r-e))};return s.Gt.read(i,!0),()=>(0,s.WG)(i)}},367232:(t,e,n)=>{n.d(e,{w:()=>i});const s=(t,e)=>Math.abs(t-e);function i(t,e){const n=s(t.x,e.x),i=s(t.y,e.y);return Math.sqrt(n**2+i**2)}},841164:(t,e,n)=>{n.d(e,{$:()=>i,V:()=>o}),n(167834);var s=n(78777);let i=s.l,o=s.l},508382:(t,e,n)=>{n.d(e,{s:()=>s});const s=({current:t})=>t?t.ownerDocument.defaultView:null},400630:(t,e,n)=>{function s(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}function i({hue:t,saturation:e,lightness:n,alpha:i}){t/=360,n/=100;let o=0,r=0,a=0;if(e/=100){const i=n<.5?n*(1+e):n+e-n*e,l=2*n-i;o=s(l,i,t+1/3),r=s(l,i,t),a=s(l,i,t-1/3)}else o=r=a=n;return{red:Math.round(255*o),green:Math.round(255*r),blue:Math.round(255*a),alpha:i}}n.d(e,{a:()=>i})},323662:(t,e,n)=>{n.d(e,{G:()=>p});var s=n(841164),i=n(449705),o=n(893138),r=n(26085),a=n(69279),l=n(681718),u=n(804253),c=n(799020),h=n(78777);const d=(t,e)=>n=>(0,r.j)(t,e,n);function p(t,e,{clamp:n=!0,ease:r,mixer:p}={}){const m=t.length;if((0,s.V)(m===e.length,"Both input and output ranges must be the same length"),1===m)return()=>e[0];t[0]>t[m-1]&&(t=[...t].reverse(),e=[...e].reverse());const f=function(t,e,n){const s=[],o=n||("number"==typeof(r=t[0])?d:"string"==typeof r?i.y.test(r)?a.i:l.JL:Array.isArray(r)?l.MC:"object"==typeof r?l.YK:d);var r;const c=t.length-1;for(let i=0;i<c;i++){let n=o(t[i],t[i+1]);if(e){const t=Array.isArray(e)?e[i]||h.l:e;n=(0,u.F)(t,n)}s.push(n)}return s}(e,r,p),v=f.length,g=e=>{let n=0;if(v>1)for(;n<t.length-2&&!(e<t[n+1]);n++);const s=(0,c.q)(t[n],t[n+1],e);return f[n](s)};return n?e=>g((0,o.q)(t[0],t[m-1],e)):g}},701134:(t,e,n)=>{n.d(e,{B:()=>s});const s="undefined"!=typeof document},907930:(t,e,n)=>{n.d(e,{i:()=>s});const s=t=>/^\-?\d*\.?\d+$/.test(t)},105675:(t,e,n)=>{function s(t){return t&&"object"==typeof t&&Object.prototype.hasOwnProperty.call(t,"current")}n.d(e,{X:()=>s})},70998:(t,e,n)=>{n.d(e,{$:()=>s});const s=t=>/^0[^.\s]+$/.test(t)},696407:(t,e,n)=>{function s(t){let e;return()=>(void 0===e&&(e=t()),e)}n.d(e,{p:()=>s})},69279:(t,e,n)=>{n.d(e,{i:()=>d}),n(314846),n(6211);var s=n(26085),i=n(841164),o=n(400630),r=n(449598),a=n(422585),l=n(898173);const u=(t,e,n)=>{const s=t*t;return Math.sqrt(Math.max(0,n*(e*e-s)+s))},c=[r.u,a.B,l.V];function h(t){const e=(n=t,c.find((t=>t.test(n))));var n;(0,i.V)(Boolean(e),`'${t}' is not an animatable color. Use the equivalent color code instead.`);let s=e.parse(t);return e===l.V&&(s=(0,o.a)(s)),s}const d=(t,e)=>{const n=h(t),i=h(e),o={...n};return t=>(o.red=u(n.red,i.red,t),o.green=u(n.green,i.green,t),o.blue=u(n.blue,i.blue,t),o.alpha=(0,s.j)(n.alpha,i.alpha,t),a.B.transform(o))}},681718:(t,e,n)=>{n.d(e,{JL:()=>p,MC:()=>h,YK:()=>d}),n(194364);var s=n(26085),i=n(69279),o=n(804253),r=n(841164),a=n(449705),l=n(73748);const u=(t,e)=>n=>`${n>0?e:t}`;function c(t,e){return"number"==typeof t?n=>(0,s.j)(t,e,n):a.y.test(t)?(0,i.i)(t,e):t.startsWith("var(")?u(t,e):p(t,e)}const h=(t,e)=>{const n=[...t],s=n.length,i=t.map(((t,n)=>c(t,e[n])));return t=>{for(let e=0;e<s;e++)n[e]=i[e](t);return n}},d=(t,e)=>{const n={...t,...e},s={};for(const i in n)void 0!==t[i]&&void 0!==e[i]&&(s[i]=c(t[i],e[i]));return t=>{for(const e in s)n[e]=s[e](t);return n}},p=(t,e)=>{const n=l.f.createTransformer(e),s=(0,l.V)(t),i=(0,l.V)(e);return s.numVars===i.numVars&&s.numColors===i.numColors&&s.numNumbers>=i.numNumbers?(0,o.F)(h(s.values,i.values),n):((0,r.$)(!0,`Complex values '${t}' and '${e}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),u(t,e))}},26085:(t,e,n)=>{n.d(e,{j:()=>s});const s=(t,e,n)=>-n*t+n*e+t},78777:(t,e,n)=>{n.d(e,{l:()=>s});const s=t=>t},766869:(t,e,n)=>{n.d(e,{Z:()=>i});var s=n(774641);function i(t){const e=[0];return(0,s.f)(e,t.length-1),e}},774641:(t,e,n)=>{n.d(e,{f:()=>o});var s=n(26085),i=n(799020);function o(t,e){const n=t[t.length-1];for(let o=1;o<=e;o++){const r=(0,i.q)(0,e,o);t.push((0,s.j)(n,1,r))}}},418057:(t,e,n)=>{function s(t,e){return t.map((t=>t*e))}n.d(e,{A:()=>s}),n(194364)},804253:(t,e,n)=>{n.d(e,{F:()=>i}),n(314846),n(190458);const s=(t,e)=>n=>e(t(n)),i=(...t)=>t.reduce(s)},799020:(t,e,n)=>{n.d(e,{q:()=>s});const s=(t,e,n)=>{const s=e-t;return 0===s?1:(n-t)/s}},989461:(t,e,n)=>{n.d(e,{U:()=>o});var s=n(701134),i=n(27250);function o(){if(i.r.current=!0,s.B)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>i.O.current=t.matches;t.addListener(e),e()}else i.O.current=!1}},27250:(t,e,n)=>{n.d(e,{O:()=>s,r:()=>i});const s={current:null},i={current:!1}},494535:(t,e,n)=>{n(63696),n(682832),n(150092)},150092:(t,e,n)=>{n(63696),n(989461),n(721657),n(27250)},744999:(t,e,n)=>{n.d(e,{B:()=>i,K:()=>o});var s=n(343690);const i=t=>Boolean(t&&"object"==typeof t&&t.mix&&t.toValue),o=t=>(0,s.p)(t)?t[t.length-1]||0:t},223605:(t,e,n)=>{function s(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let s=0;s<n;s++)if(e[s]!==t[s])return!1;return!0}n.d(e,{a:()=>s})},902840:(t,e,n)=>{n.d(e,{v:()=>i});var s=n(890604);class i{constructor(){this.subscriptions=[]}add(t){return(0,s.Kq)(this.subscriptions,t),()=>(0,s.Ai)(this.subscriptions,t)}notify(t,e,n){const s=this.subscriptions.length;if(s)if(1===s)this.subscriptions[0](t,e,n);else for(let i=0;i<s;i++){const s=this.subscriptions[i];s&&s(t,e,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}},660127:(t,e,n)=>{n.d(e,{X:()=>i,f:()=>s});const s=t=>1e3*t,i=t=>t/1e3},229455:(t,e,n)=>{n.d(e,{p:()=>o});var s=n(323662);const i=t=>(t=>t&&"object"==typeof t&&t.mix)(t)?t.mix:void 0;function o(...t){const e=!Array.isArray(t[0]),n=e?0:-1,o=t[0+n],r=t[1+n],a=t[2+n],l=t[3+n],u=(0,s.G)(r,a,{mixer:i(a[0]),...l});return e?u(o):u}},404175:(t,e,n)=>{n(63696),n(682832),n(277210)},416155:(t,e,n)=>{n.d(e,{M:()=>i});var s=n(63696);function i(t){const e=(0,s.useRef)(null);return null===e.current&&(e.current=t()),e.current}},683911:(t,e,n)=>{n(63696),n(322801)},226990:(t,e,n)=>{n.d(e,{C:()=>r});var s=n(63696),i=n(546332),o=n(277210);function r(){const t=(0,i.a)(),[e,n]=(0,s.useState)(0),r=(0,s.useCallback)((()=>{t.current&&n(e+1)}),[e]);return[(0,s.useCallback)((()=>o.Gt.postRender(r)),[r]),e]}},364584:(t,e,n)=>{n(63696),n(438182)},300934:(t,e,n)=>{n.d(e,{d:()=>s});const s={current:!1}},437614:(t,e,n)=>{n(63696),n(557013),n(226990),n(300934),n(277210)},546332:(t,e,n)=>{n.d(e,{a:()=>o});var s=n(63696),i=n(117946);function o(){const t=(0,s.useRef)(!1);return(0,i.E)((()=>(t.current=!0,()=>{t.current=!1})),[]),t}},117946:(t,e,n)=>{n.d(e,{E:()=>i});var s=n(63696);const i=n(701134).B?s.useLayoutEffect:s.useEffect},261006:(t,e,n)=>{n(63696)},758369:(t,e,n)=>{n.d(e,{l:()=>i});var s=n(63696);function i(t){return(0,s.useEffect)((()=>()=>t()),[])}},540255:(t,e,n)=>{function s(t,e){return e?t*(1e3/e):0}n.d(e,{f:()=>s})},721657:(t,e,n)=>{new Set},322801:(t,e,n)=>{n.d(e,{L:()=>s});const s=(t,e,n)=>{const s=e-t;return((n-t)%s+s)%s+t}},239667:(t,e,n)=>{n.d(e,{KG:()=>a,OQ:()=>l,bt:()=>r});var s=n(902840),i=n(540255),o=(n(721657),n(277210));const r={current:void 0};class a{constructor(t,e={}){var n;this.version="10.18.0",this.timeDelta=0,this.lastUpdated=0,this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(t,e=!0)=>{this.prev=this.current,this.current=t;const{delta:n,timestamp:s}=o.uv;this.lastUpdated!==s&&(this.timeDelta=n,this.lastUpdated=s,o.Gt.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.events.change&&this.events.change.notify(this.current),this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()),e&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.scheduleVelocityCheck=()=>o.Gt.postRender(this.velocityCheck),this.velocityCheck=({timestamp:t})=>{t!==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=(n=this.current,!isNaN(parseFloat(n))),this.owner=e.owner}onChange(t){return this.on("change",t)}on(t,e){this.events[t]||(this.events[t]=new s.v);const n=this.events[t].add(e);return"change"===t?()=>{n(),o.Gt.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,e=!0){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 r.current&&r.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?(0,i.f)(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 l(t,e){return new a(t,e)}},333229:(t,e,n)=>{n(721657),n(100308)},439849:(t,e,n)=>{n(721657),n(100308)},449598:(t,e,n)=>{n.d(e,{u:()=>i});var s=n(422585);const i={test:(0,n(529950).$)("#"),parse:function(t){let e="",n="",s="",i="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),s=t.substring(5,7),i=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),s=t.substring(3,4),i=t.substring(4,5),e+=e,n+=n,s+=s,i+=i),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(s,16),alpha:i?parseInt(i,16)/255:1}},transform:s.B.transform}},898173:(t,e,n)=>{n.d(e,{V:()=>a});var s=n(900478),i=n(234223),o=n(497554),r=n(529950);const a={test:(0,r.$)("hsl","hue"),parse:(0,r.q)("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:r=1})=>"hsla("+Math.round(t)+", "+i.KN.transform((0,o.aj)(e))+", "+i.KN.transform((0,o.aj)(n))+", "+(0,o.aj)(s.X4.transform(r))+")"}},449705:(t,e,n)=>{n.d(e,{y:()=>a});var s=n(497554),i=n(449598),o=n(898173),r=n(422585);const a={test:t=>r.B.test(t)||i.u.test(t)||o.V.test(t),parse:t=>r.B.test(t)?r.B.parse(t):o.V.test(t)?o.V.parse(t):i.u.parse(t),transform:t=>(0,s.Kg)(t)?t:t.hasOwnProperty("red")?r.B.transform(t):o.V.transform(t)}},422585:(t,e,n)=>{n.d(e,{B:()=>l});var s=n(893138),i=n(900478),o=n(497554),r=n(529950);const a={...i.ai,transform:t=>Math.round((t=>(0,s.q)(0,255,t))(t))},l={test:(0,r.$)("rgb","red"),parse:(0,r.q)("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+a.transform(t)+", "+a.transform(e)+", "+a.transform(n)+", "+(0,o.aj)(i.X4.transform(s))+")"}},529950:(t,e,n)=>{n.d(e,{$:()=>i,q:()=>o});var s=n(497554);const i=(t,e)=>n=>Boolean((0,s.Kg)(n)&&s.Fl.test(n)&&n.startsWith(t)||e&&Object.prototype.hasOwnProperty.call(n,e)),o=(t,e,n)=>i=>{if(!(0,s.Kg)(i))return i;const[o,r,a,l]=i.match(s.SY);return{[t]:parseFloat(o),[e]:parseFloat(r),[n]:parseFloat(a),alpha:void 0!==l?parseFloat(l):1}}},358986:(t,e,n)=>{n.d(e,{p:()=>l}),n(194364);var s=n(73748),i=n(497554);const o=new Set(["brightness","contrast","saturate","opacity"]);function r(t){const[e,n]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[s]=n.match(i.SY)||[];if(!s)return t;const r=n.replace(s,"");let a=o.has(e)?1:0;return s!==n&&(a*=100),e+"("+a+r+")"}const a=/([a-z-]*)\(.*?\)/g,l={...s.f,getAnimatableNone:t=>{const e=t.match(a);return e?e.map(r).join(" "):t}}},73748:(t,e,n)=>{n.d(e,{V:()=>d,f:()=>v}),n(76281),n(194364);var s=n(511078),i=n(78777),o=n(449705),r=n(900478),a=n(497554);const l={regex:s.z2,countKey:"Vars",token:"${v}",parse:i.l},u={regex:a.ne,countKey:"Colors",token:"${c}",parse:o.y.parse},c={regex:a.SY,countKey:"Numbers",token:"${n}",parse:r.ai.parse};function h(t,{regex:e,countKey:n,token:s,parse:i}){const o=t.tokenised.match(e);o&&(t["num"+n]=o.length,t.tokenised=t.tokenised.replace(e,s),t.values.push(...o.map(i)))}function d(t){const e=t.toString(),n={value:e,tokenised:e,values:[],numVars:0,numColors:0,numNumbers:0};return n.value.includes("var(--")&&h(n,l),h(n,u),h(n,c),n}function p(t){return d(t).values}function m(t){const{values:e,numColors:n,numVars:s,tokenised:i}=d(t),r=e.length;return t=>{let e=i;for(let i=0;i<r;i++)e=i<s?e.replace(l.token,t[i]):i<s+n?e.replace(u.token,o.y.transform(t[i])):e.replace(c.token,(0,a.aj)(t[i]));return e}}const f=t=>"number"==typeof t?0:t,v={test:function(t){var e,n;return isNaN(t)&&(0,a.Kg)(t)&&((null===(e=t.match(a.SY))||void 0===e?void 0:e.length)||0)+((null===(n=t.match(a.ne))||void 0===n?void 0:n.length)||0)>0},parse:p,createTransformer:m,getAnimatableNone:function(t){const e=p(t);return m(t)(e.map(f))}}},900478:(t,e,n)=>{n.d(e,{X4:()=>o,ai:()=>i,hs:()=>r});var s=n(893138);const i={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},o={...i,transform:t=>(0,s.q)(0,1,t)},r={...i,default:1}},234223:(t,e,n)=>{n.d(e,{KN:()=>r,gQ:()=>c,px:()=>a,uj:()=>o,vh:()=>l,vw:()=>u});var s=n(497554);const i=t=>({test:e=>(0,s.Kg)(e)&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),o=i("deg"),r=i("%"),a=i("px"),l=i("vh"),u=i("vw"),c={...r,parse:t=>r.parse(t)/100,transform:t=>r.transform(100*t)}},497554:(t,e,n)=>{n.d(e,{Fl:()=>r,Kg:()=>a,SY:()=>i,aj:()=>s,ne:()=>o});const s=t=>Math.round(1e5*t)/1e5,i=/(-)?([\d]*\.?[\d])+/g,o=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,r=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function a(t){return"string"==typeof t}},383201:(t,e,n)=>{n.d(e,{j:()=>r}),n(314846),n(469655),n(194364);var s=n(73885),i=n(117946),o=n(277210);function r(t,e){const n=(0,s.d)(e()),r=()=>n.set(e());return r(),(0,i.E)((()=>{const e=()=>o.Gt.update(r,!1,!0),n=t.map((t=>t.on("change",e)));return()=>{n.forEach((t=>t())),(0,o.WG)(r)}})),n}},413018:(t,e,n)=>{n.d(e,{H:()=>o});var s=n(239667),i=n(383201);function o(t){s.bt.current=[],t();const e=(0,i.j)(s.bt.current,t);return s.bt.current=void 0,e}},262345:(t,e,n)=>{n(979829),n(841164),n(73885),n(820631),n(63696)},167472:(t,e,n)=>{n(314846),n(327458),n(383201),n(573970)},73885:(t,e,n)=>{n.d(e,{d:()=>a});var s=n(63696),i=n(239667),o=n(682832),r=n(416155);function a(t){const e=(0,r.M)((()=>(0,i.OQ)(t))),{isStatic:n}=(0,s.useContext)(o.Q);if(n){const[,n]=(0,s.useState)(t);(0,s.useEffect)((()=>e.on("change",n)),[])}return e}},100308:(t,e,n)=>{n(239667),n(416155),n(63696),n(841164),n(12582),n(117946)},375884:(t,e,n)=>{n(63696),n(573970),n(73885),n(682832),n(117946),n(731603),n(660127),n(277210)},846820:(t,e,n)=>{n(404175),n(73885)},979829:(t,e,n)=>{n.d(e,{G:()=>a});var s=n(229455),i=n(383201),o=n(416155),r=n(413018);function a(t,e,n,i){if("function"==typeof t)return(0,r.H)(t);const o="function"==typeof e?e:(0,s.p)(e,n,i);return Array.isArray(t)?l(t,o):l([t],(([t])=>o(t)))}function l(t,e){const n=(0,o.M)((()=>[]));return(0,i.j)(t,(()=>{n.length=0;const s=t.length;for(let e=0;e<s;e++)n[e]=t[e].get();return e(n)}))}},106406:(t,e,n)=>{n(261006),n(73885)},975469:(t,e,n)=>{n(511078),n(353994),n(890604),n(416155),n(239667),n(493388),_index_mjs__WEBPACK_IMPORTED_MODULE_4__.KG},146547:(t,e,n)=>{n.d(e,{k:()=>i});var s=n(573970);function i(t){return Boolean((0,s.S)(t)&&t.add)}},573970:(t,e,n)=>{n.d(e,{S:()=>s});const s=t=>Boolean(t&&t.getVelocity)},736196:(t,e,n)=>{n.d(e,{u:()=>o});var s=n(744999),i=n(573970);function o(t){const e=(0,i.S)(t)?t.get():t;return(0,s.B)(e)?e.toValue():e}}}]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment