1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7214],{27214:function(t,e,i){let n,r,s;i.d(e,{R1:function(){return aV},L8:function(){return aL},Cc:function(){return aF}});var o,a,l=i(98091),u=i(82479),h=i(28316),d=i(2784),c=i(52322);let p=(0,d.createContext)({});function m(t){let e=(0,d.useRef)(null);return null===e.current&&(e.current=t()),e.current}let f="undefined"!=typeof window?d.useLayoutEffect:d.useEffect,g=(0,d.createContext)(null);function y(t,e){-1===t.indexOf(e)&&t.push(e)}function v(t,e){let i=t.indexOf(e);i>-1&&t.splice(i,1)}let x=(t,e,i)=>i>e?e:i<t?t:i;i(34406);let w=()=>{},b=()=>{},S={},T=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),P=t=>"object"==typeof t&&null!==t,E=t=>/^0[^.\s]+$/u.test(t);function A(t){let e;return()=>(void 0===e&&(e=t()),e)}let C=t=>t,M=(...t)=>t.reduce((t,e)=>i=>e(t(i))),k=(t,e,i)=>{let n=e-t;return n?(i-t)/n:1};class V{constructor(){this.subscriptions=[]}add(t){return y(this.subscriptions,t),()=>v(this.subscriptions,t)}notify(t,e,i){let n=this.subscriptions.length;if(n){if(1===n)this.subscriptions[0](t,e,i);else for(let r=0;r<n;r++){let n=this.subscriptions[r];n&&n(t,e,i)}}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}let R=t=>1e3*t,D=t=>t/1e3,L=(t,e)=>e?1e3/e*t:0,j=(t,e,i)=>{let n=e-t;return((i-t)%n+n)%n+t},B=(t,e,i)=>(((1-3*i+3*e)*t+(3*i-6*e))*t+3*e)*t;function F(t,e,i,n){if(t===e&&i===n)return C;let r=e=>(function(t,e,i,n,r){let s,o;let a=0;do(s=B(o=e+(i-e)/2,n,r)-t)>0?i=o:e=o;while(Math.abs(s)>1e-7&&++a<12);return o})(e,0,1,t,i);return t=>0===t||1===t?t:B(r(t),e,n)}let I=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,O=t=>e=>1-t(1-e),N=F(.33,1.53,.69,.99),$=O(N),W=I($),U=t=>t>=1?1:(t*=2)<1?.5*$(t):.5*(2-Math.pow(2,-10*(t-1))),H=t=>1-Math.sin(Math.acos(t)),z=O(H),Y=I(H),X=F(.42,0,1,1),q=F(0,0,.58,1),K=F(.42,0,.58,1),_=t=>Array.isArray(t)&&"number"!=typeof t[0];function G(t,e){return _(t)?t[j(0,t.length,e)]:t}let Z=t=>Array.isArray(t)&&"number"==typeof t[0],J={linear:C,easeIn:X,easeInOut:K,easeOut:q,circIn:H,circInOut:Y,circOut:z,backIn:$,backInOut:W,backOut:N,anticipate:U},Q=t=>"string"==typeof t,tt=t=>{if(Z(t)){b(4===t.length,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");let[e,i,n,r]=t;return F(e,i,n,r)}return Q(t)?(b(void 0!==J[t],`Invalid easing type '${t}'`,"invalid-easing-type"),J[t]):t},te=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function ti(t,e){let i=!1,n=!0,r={delta:0,timestamp:0,isProcessing:!1},s=()=>i=!0,o=te.reduce((t,e)=>(t[e]=function(t){let e=new Set,i=new Set,n=!1,r=!1,s=new WeakSet,o={delta:0,timestamp:0,isProcessing:!1};function a(e){s.has(e)&&(l.schedule(e),t()),e(o)}let l={schedule:(t,r=!1,o=!1)=>{let a=o&&n?e:i;return r&&s.add(t),a.add(t),t},cancel:t=>{i.delete(t),s.delete(t)},process:t=>{if(o=t,n){r=!0;return}n=!0;let s=e;e=i,i=s,e.forEach(a),e.clear(),n=!1,r&&(r=!1,l.process(t))}};return l}(s),t),{}),{setup:a,read:l,resolveKeyframes:u,preUpdate:h,update:d,preRender:c,render:p,postRender:m}=o,f=()=>{let s=S.useManualTiming,o=s?r.timestamp:performance.now();i=!1,s||(r.delta=n?1e3/60:Math.max(Math.min(o-r.timestamp,40),1)),r.timestamp=o,r.isProcessing=!0,a.process(r),l.process(r),u.process(r),h.process(r),d.process(r),c.process(r),p.process(r),m.process(r),r.isProcessing=!1,i&&e&&(n=!1,t(f))},g=()=>{i=!0,n=!0,r.isProcessing||t(f)};return{schedule:te.reduce((t,e)=>{let n=o[e];return t[e]=(t,e=!1,r=!1)=>(i||g(),n.schedule(t,e,r)),t},{}),cancel:t=>{for(let e=0;e<te.length;e++)o[te[e]].cancel(t)},state:r,steps:o}}let{schedule:tn,cancel:tr,state:ts,steps:to}=ti("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:C,!0);function ta(){n=void 0}let tl={now:()=>(void 0===n&&tl.set(ts.isProcessing||S.useManualTiming?ts.timestamp:performance.now()),n),set:t=>{n=t,queueMicrotask(ta)}},tu=t=>e=>"string"==typeof e&&e.startsWith(t),th=tu("--"),td=tu("var(--"),tc=t=>!!td(t)&&tp.test(t.split("/*")[0].trim()),tp=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function tm(t){return"string"==typeof t&&t.split("/*")[0].includes("var(--")}let tf={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},tg={...tf,transform:t=>x(0,1,t)},ty={...tf,default:1},tv=t=>Math.round(1e5*t)/1e5,tx=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,tw=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,tb=(t,e)=>i=>!!("string"==typeof i&&tw.test(i)&&i.startsWith(t)||e&&null!=i&&Object.prototype.hasOwnProperty.call(i,e)),tS=(t,e,
1i)=>n=>{if("string"!=typeof n)return n;let[r,s,o,a]=n.match(tx);return{[t]:parseFloat(r),[e]:parseFloat(s),[i]:parseFloat(o),alpha:void 0!==a?parseFloat(a):1}},tT=t=>x(0,255,t),tP={...tf,transform:t=>Math.round(tT(t))},tE={test:tb("rgb","red"),parse:tS("red","green","blue"),transform:({red:t,green:e,blue:i,alpha:n=1})=>"rgba("+tP.transform(t)+", "+tP.transform(e)+", "+tP.transform(i)+", "+tv(tg.transform(n))+")"},tA={test:tb("#"),parse:function(t){let e="",i="",n="",r="";return t.length>5?(e=t.substring(1,3),i=t.substring(3,5),n=t.substring(5,7),r=t.substring(7,9)):(e=t.substring(1,2),i=t.substring(2,3),n=t.substring(3,4),r=t.substring(4,5),e+=e,i+=i,n+=n,r+=r),{red:parseInt(e,16),green:parseInt(i,16),blue:parseInt(n,16),alpha:r?parseInt(r,16)/255:1}},transform:tE.transform},tC=t=>({test:e=>"string"==typeof e&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),tM=tC("deg"),tk=tC("%"),tV=tC("px"),tR=tC("vh"),tD=tC("vw"),tL={...tk,parse:t=>tk.parse(t)/100,transform:t=>tk.transform(100*t)},tj={test:tb("hsl","hue"),parse:tS("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:i,alpha:n=1})=>"hsla("+Math.round(t)+", "+tk.transform(tv(e))+", "+tk.transform(tv(i))+", "+tv(tg.transform(n))+")"},tB={test:t=>tE.test(t)||tA.test(t)||tj.test(t),parse:t=>tE.test(t)?tE.parse(t):tj.test(t)?tj.parse(t):tA.parse(t),transform:t=>"string"==typeof t?t:t.hasOwnProperty("red")?tE.transform(t):tj.transform(t),getAnimatableNone:t=>{let e=tB.parse(t);return e.alpha=0,tB.transform(e)}},tF=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,tI="number",tO="color",tN=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function t$(t){let e=t.toString(),i=[],n={color:[],number:[],var:[]},r=[],s=0,o=e.replace(tN,t=>(tB.test(t)?(n.color.push(s),r.push(tO),i.push(tB.parse(t))):t.startsWith("var(")?(n.var.push(s),r.push("var"),i.push(t)):(n.number.push(s),r.push(tI),i.push(parseFloat(t))),++s,"${}")).split("${}");return{values:i,split:o,indexes:n,types:r}}function tW({split:t,types:e}){let i=t.length;return n=>{let r="";for(let s=0;s<i;s++)if(r+=t[s],void 0!==n[s]){let t=e[s];t===tI?r+=tv(n[s]):t===tO?r+=tB.transform(n[s]):r+=n[s]}return r}}let tU=t=>"number"==typeof t?0:tB.test(t)?tB.getAnimatableNone(t):t,tH=(t,e)=>"number"==typeof t?e?.trim().endsWith("/")?t:0:tU(t),tz={test:function(t){return isNaN(t)&&"string"==typeof t&&(t.match(tx)?.length||0)+(t.match(tF)?.length||0)>0},parse:function(t){return t$(t).values},createTransformer:function(t){return tW(t$(t))},getAnimatableNone:function(t){let e=t$(t);return tW(e)(e.values.map((t,i)=>tH(t,e.split[i])))}};function tY(t,e,i){return(i<0&&(i+=1),i>1&&(i-=1),i<1/6)?t+(e-t)*6*i:i<.5?e:i<2/3?t+(e-t)*(2/3-i)*6:t}function tX(t,e){return i=>i>0?e:t}let tq=(t,e,i)=>t+(e-t)*i,tK=(t,e,i)=>{let n=t*t,r=i*(e*e-n)+n;return r<0?0:Math.sqrt(r)},t_=[tA,tE,tj],tG=t=>t_.find(e=>e.test(t));function tZ(t){let e=tG(t);if(w(!!e,`'${t}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!e)return!1;let i=e.parse(t);return e===tj&&(i=function({hue:t,saturation:e,lightness:i,alpha:n}){t/=360,i/=100;let r=0,s=0,o=0;if(e/=100){let n=i<.5?i*(1+e):i+e-i*e,a=2*i-n;r=tY(a,n,t+1/3),s=tY(a,n,t),o=tY(a,n,t-1/3)}else r=s=o=i;return{red:Math.round(255*r),green:Math.round(255*s),blue:Math.round(255*o),alpha:n}}(i)),i}let tJ=(t,e)=>{let i=tZ(t),n=tZ(e);if(!i||!n)return tX(t,e);let r={...i};return t=>(r.red=tK(i.red,n.red,t),r.green=tK(i.green,n.green,t),r.blue=tK(i.blue,n.blue,t),r.alpha=tq(i.alpha,n.alpha,t),tE.transform(r))},tQ=new Set(["none","hidden"]);function t0(t,e){return i=>tq(t,e,i)}function t1(t){return"number"==typeof t?t0:"string"==typeof t?tc(t)?tX:tB.test(t)?tJ:t3:Array.isArray(t)?t2:"object"==typeof t?tB.test(t)?tJ:t5:tX}function t2(t,e){let i=[...t],n=i.length,r=t.map((t,i)=>t1(t)(t,e[i]));return t=>{for(let e=0;e<n;e++)i[e]=r[e](t);return i}}function t5(t,e){let i={...t,...e},n={};for(let r in i)void 0!==t[r]&&void 0!==e[r]&&(n[r]=t1(t[r])(t[r],e[r]));return t=>{for(let e in n)i[e]=n[e](t);return i}}let t3=(t,e)=>{let i=tz.createTransformer(e),n=t$(t),r=t$(e);return n.indexes.var.length===r.indexes.var.length&&n.indexes.color.length===r.indexes.color.length&&n.indexes.number.length>=r.indexes.number.length?tQ.has(t)&&!r.values.length||tQ.has(e)&&!n.values.length?tQ.has(t)?i=>i<=0?t:e:i=>i>=1?e:t:M(t2(function(t,e){let i=[],n={color:0,var:0,number:0};for(let r=0;r<e.values.length;r++){let s=e.types[r],o=t.indexes[s][n[s]],a=t.values[o]??0;i[r]=a,n[s]++}return i}(n,r),r.values),i):(w(!0,`Complex values '${t}' and '${e}
1' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),tX(t,e))};function t9(t,e,i){return"number"==typeof t&&"number"==typeof e&&"number"==typeof i?tq(t,e,i):t1(t)(t,e)}let t4=t=>{let e=({timestamp:e})=>t(e);return{start:(t=!0)=>tn.update(e,t),stop:()=>tr(e),now:()=>ts.isProcessing?ts.timestamp:tl.now()}},t6=(t,e,i=10)=>{let n="",r=Math.max(Math.round(e/i),2);for(let e=0;e<r;e++)n+=Math.round(1e4*t(e/(r-1)))/1e4+", ";return`linear(${n.substring(0,n.length-2)})`};function t8(t){let e=0,i=t.next(e);for(;!i.done&&e<2e4;)e+=50,i=t.next(e);return e>=2e4?1/0:e}function t7(t,e=100,i){let n=i({...t,keyframes:[0,e]}),r=Math.min(t8(n),2e4);return{type:"keyframes",ease:t=>n.next(r*t).value/e,duration:D(r)}}let et={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};function ee(t,e){return t*Math.sqrt(1-e*e)}let ei=["duration","bounce"],en=["stiffness","damping","mass"];function er(t,e){return e.some(e=>void 0!==t[e])}function es(t=et.visualDuration,e=et.bounce){let i,n,r,s,o,a;let l="object"!=typeof t?{visualDuration:t,keyframes:[0,1],bounce:e}:t,{restSpeed:u,restDelta:h}=l,d=l.keyframes[0],c=l.keyframes[l.keyframes.length-1],p={done:!1,value:d},{stiffness:m,damping:f,mass:g,duration:y,velocity:v,isResolvedFromDuration:b}=function(t){let e={velocity:et.velocity,stiffness:et.stiffness,damping:et.damping,mass:et.mass,isResolvedFromDuration:!1,...t};if(!er(t,en)&&er(t,ei)){if(e.velocity=0,t.visualDuration){let i=2*Math.PI/(1.2*t.visualDuration),n=i*i,r=2*x(.05,1,1-(t.bounce||0))*Math.sqrt(n);e={...e,mass:et.mass,stiffness:n,damping:r}}else{let i=function({duration:t=et.duration,bounce:e=et.bounce,velocity:i=et.velocity,mass:n=et.mass}){let r,s;w(t<=R(et.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let o=1-e;o=x(et.minDamping,et.maxDamping,o),t=x(et.minDuration,et.maxDuration,D(t)),o<1?(r=e=>{let n=e*o,r=n*t;return .001-(n-i)/ee(e,o)*Math.exp(-r)},s=e=>{let n=e*o*t,s=Math.pow(o,2)*Math.pow(e,2)*t,a=ee(Math.pow(e,2),o);return(n*i+i-s)*Math.exp(-n)*(-r(e)+.001>0?-1:1)/a}):(r=e=>-.001+Math.exp(-e*t)*((e-i)*t+1),s=e=>t*t*(i-e)*Math.exp(-e*t));let a=function(t,e,i){let n=i;for(let i=1;i<12;i++)n-=t(n)/e(n);return n}(r,s,5/t);if(t=R(t),isNaN(a))return{stiffness:et.stiffness,damping:et.damping,duration:t};{let e=Math.pow(a,2)*n;return{stiffness:e,damping:2*o*Math.sqrt(n*e),duration:t}}}({...t,velocity:0});(e={...e,...i,mass:et.mass}).isResolvedFromDuration=!0}}return e}({...l,velocity:-D(l.velocity||0)}),S=v||0,T=f/(2*Math.sqrt(m*g)),P=c-d,E=D(Math.sqrt(m/g)),A=5>Math.abs(P);if(u||(u=A?et.restSpeed.granular:et.restSpeed.default),h||(h=A?et.restDelta.granular:et.restDelta.default),T<1)r=ee(E,T),s=(S+T*E*P)/r,i=t=>c-Math.exp(-T*E*t)*(s*Math.sin(r*t)+P*Math.cos(r*t)),o=T*E*s+P*r,a=T*E*P-s*r,n=t=>Math.exp(-T*E*t)*(o*Math.sin(r*t)+a*Math.cos(r*t));else if(1===T){i=t=>c-Math.exp(-E*t)*(P+(S+E*P)*t);let t=S+E*P;n=e=>Math.exp(-E*e)*(E*t*e-S)}else{let t=E*Math.sqrt(T*T-1);i=e=>{let i=Math.exp(-T*E*e),n=Math.min(t*e,300);return c-i*((S+T*E*P)*Math.sinh(n)+t*P*Math.cosh(n))/t};let e=(S+T*E*P)/t,r=T*E*e-P*t,s=T*E*P-e*t;n=e=>{let i=Math.exp(-T*E*e),n=Math.min(t*e,300);return i*(r*Math.sinh(n)+s*Math.cosh(n))}}let C={calculatedDuration:b&&y||null,velocity:t=>R(n(t)),next:t=>{if(!b&&T<1){let e=Math.exp(-T*E*t),i=Math.sin(r*t),n=Math.cos(r*t),l=c-e*(s*i+P*n),d=R(e*(o*i+a*n));return p.done=Math.abs(d)<=u&&Math.abs(c-l)<=h,p.value=p.done?c:l,p}let e=i(t);if(b)p.done=t>=y;else{let i=R(n(t));p.done=Math.abs(i)<=u&&Math.abs(c-e)<=h}return p.value=p.done?c:e,p},toString:()=>{let t=Math.min(t8(C),2e4),e=t6(e=>C.next(t*e).value,t,30);return t+"ms "+e},toTransition:()=>{}};return C}function eo(t,e,i){let n=Math.max(e-5,0);return L(i-t(n),e-n)}function ea({keyframes:t,velocity:e=0,power:i=.8,timeConstant:n=325,bounceDamping:r=10,bounceStiffness:s=500,modifyTarget:o,min:a,max:l,restDelta:u=.5,restSpeed:h}){let d,c;let p=t[0],m={done:!1,value:p},f=t=>void 0!==a&&t<a||void 0!==l&&t>l,g=t=>void 0===a?l:void 0===l?a:Math.abs(a-t)<Math.abs(l-t)?a:l,y=i*e,v=p+y,x=void 0===o?v:o(v);x!==v&&(y=x-p);let w=t=>-y*Math.exp(-t/n),b=t=>x+w(t),S=t=>{let e=w(t),i=b(t);m.done=Math.abs(e)<=u,m.value=m.done?x:i},T=t=>
1{f(m.value)&&(d=t,c=es({keyframes:[m.value,g(m.value)],velocity:eo(b,t,m.value),damping:r,stiffness:s,restDelta:u,restSpeed:h}))};return T(0),{calculatedDuration:null,next:t=>{let e=!1;return(c||void 0!==d||(e=!0,S(t),T(t)),void 0!==d&&t>=d)?c.next(t-d):(e||S(t),m)}}}function el(t,e,{clamp:i=!0,ease:n,mixer:r}={}){let s=t.length;if(b(s===e.length,"Both input and output ranges must be the same length","range-length"),1===s)return()=>e[0];if(2===s&&e[0]===e[1])return()=>e[1];let o=t[0]===t[1];t[0]>t[s-1]&&(t=[...t].reverse(),e=[...e].reverse());let a=function(t,e,i){let n=[],r=i||S.mix||t9,s=t.length-1;for(let i=0;i<s;i++){let s=r(t[i],t[i+1]);e&&(s=M(Array.isArray(e)?e[i]||C:e,s)),n.push(s)}return n}(e,n,r),l=a.length,u=i=>{if(o&&i<t[0])return e[0];let n=0;if(l>1)for(;n<t.length-2&&!(i<t[n+1]);n++);let r=k(t[n],t[n+1],i);return a[n](r)};return i?e=>u(x(t[0],t[s-1],e)):u}function eu(t,e){let i=t[t.length-1];for(let n=1;n<=e;n++){let r=k(0,e,n);t.push(tq(i,1,r))}}function eh(t){let e=[0];return eu(e,t.length-1),e}function ed({duration:t=300,keyframes:e,times:i,ease:n="easeInOut"}){let r=_(n)?n.map(tt):tt(n),s={done:!1,value:e[0]},o=el((i&&i.length===e.length?i:eh(e)).map(e=>e*t),e,{ease:Array.isArray(r)?r:e.map(()=>r||K).splice(0,e.length-1)});return{calculatedDuration:t,next:e=>(s.value=o(e),s.done=e>=t,s)}}es.applyToOptions=t=>{let e=t7(t,100,es);return t.ease=e.ease,t.duration=R(e.duration),t.type="keyframes",t};let ec=t=>null!==t;function ep(t,{repeat:e,repeatType:i="loop"},n,r=1){let s=t.filter(ec),o=r<0||e&&"loop"!==i&&e%2==1?0:s.length-1;return o&&void 0!==n?n:s[o]}let em={decay:ea,inertia:ea,tween:ed,keyframes:ed,spring:es};function ef(t){"string"==typeof t.type&&(t.type=em[t.type])}class eg{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,e){return this.finished.then(t,e)}}let ey=t=>t/100;class ev extends eg{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{let{motionValue:t}=this.options;t&&t.updatedAt!==tl.now()&&this.tick(tl.now()),this.isStopped=!0,"idle"!==this.state&&(this.teardown(),this.options.onStop?.())},this.options=t,this.initAnimation(),this.play(),!1===t.autoplay&&this.pause()}initAnimation(){let{options:t}=this;ef(t);let{type:e=ed,repeat:i=0,repeatDelay:n=0,repeatType:r,velocity:s=0}=t,{keyframes:o}=t,a=e||ed;a!==ed&&"number"!=typeof o[0]&&(this.mixKeyframes=M(ey,t9(o[0],o[1])),o=[0,100]);let l=a({...t,keyframes:o});"mirror"===r&&(this.mirroredGenerator=a({...t,keyframes:[...o].reverse(),velocity:-s})),null===l.calculatedDuration&&(l.calculatedDuration=t8(l));let{calculatedDuration:u}=l;this.calculatedDuration=u,this.resolvedDuration=u+n,this.totalDuration=this.resolvedDuration*(i+1)-n,this.generator=l}updateTime(t){let e=Math.round(t-this.startTime)*this.playbackSpeed;null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=e}tick(t,e=!1){let i;let{generator:n,totalDuration:r,mixKeyframes:s,mirroredGenerator:o,resolvedDuration:a,calculatedDuration:l}=this;if(null===this.startTime)return n.next(0);let{delay:u=0,keyframes:h,repeat:d,repeatType:c,repeatDelay:p,type:m,onUpdate:f,finalKeyframe:g}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-r/this.speed,this.startTime)),e?this.currentTime=t:this.updateTime(t);let y=this.currentTime-u*(this.playbackSpeed>=0?1:-1),v=this.playbackSpeed>=0?y<0:y>r;this.currentTime=Math.max(y,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=r);let w=this.currentTime,b=n;if(d){let t=Math.min(this.currentTime,r)/a,e=Math.floor(t),i=t%1;!i&&t>=1&&(i=1),1===i&&e--,(e=Math.min(e,d+1))%2&&("reverse"===c?(i=1-i,p&&(i-=p/a)):"mirror"===c&&(b=o)),w=x(0,1,i)*a}v?(this.delayState.value=h[0],i=this.delayState):i=b.next(w),s&&!v&&(i.value=s(i.value));let{done:S}=i;v||null===l||(S=this.playbackSpeed>=0?this.currentTime>=r:this.currentTime<=0);let T=null===this.holdTime&&("finished"===this.state||"running"===this.state&&S);return T&&m!==ea&&(i.value=ep(h,this.options,g,this.speed)),f&&f(i.value),T&&this.finish(),i}then(t,e){return this.finished.then(t,e)}get duration(){return D(this.calculatedDuration)}get iterationDuration(){let{delay:t=0}=this.options||{};return this.duration+D(t)}get time(){return D(this.currentTime)}set time(t){t=R(t),this.currentTime=t,null===this.startTime||null!==this.holdTime||0===this.playbackSpeed?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=t,this.tick(t))}getGeneratorVelocity(){let t=this.currentTime;
1if(t<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(t);let e=this.generator.next(t).value;return eo(t=>this.generator.next(t).value,t,e)}get speed(){return this.playbackSpeed}set speed(t){let e=this.playbackSpeed!==t;e&&this.driver&&this.updateTime(tl.now()),this.playbackSpeed=t,e&&this.driver&&(this.time=D(this.currentTime))}play(){if(this.isStopped)return;let{driver:t=t4,startTime:e}=this.options;this.driver||(this.driver=t(t=>this.tick(t))),this.options.onPlay?.();let i=this.driver.now();"finished"===this.state?(this.updateFinished(),this.startTime=i):null!==this.holdTime?this.startTime=i-this.holdTime:this.startTime||(this.startTime=e??i),"finished"===this.state&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(tl.now()),this.holdTime=this.currentTime}complete(){"running"!==this.state&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}let ex=t=>180*t/Math.PI,ew=t=>eS(ex(Math.atan2(t[1],t[0]))),eb={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:ew,rotateZ:ew,skewX:t=>ex(Math.atan(t[1])),skewY:t=>ex(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},eS=t=>((t%=360)<0&&(t+=360),t),eT=t=>
1Math.sqrt(t[0]*t[0]+t[1]*t[1]),eP=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),eE={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:eT,scaleY:eP,scale:t=>(eT(t)+eP(t))/2,rotateX:t=>eS(ex(Math.atan2(t[6],t[5]))),rotateY:t=>eS(ex(Math.atan2(-t[2],t[0]))),rotateZ:ew,rotate:ew,skewX:t=>ex(Math.atan(t[4])),skewY:t=>ex(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function eA(t){return t.includes("scale")?1:0}function eC(t,e){let i,n;if(!t||"none"===t)return eA(e);let r=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);if(r)i=eE,n=r;else{let e=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);i=eb,n=e}if(!n)return eA(e);let s=i[e],o=n[1].split(",").map(ek);return"function"==typeof s?s(o):o[s]}let eM=(t,e)=>{let{transform:i="none"}=getComputedStyle(t);return eC(i,e)};function ek(t){return parseFloat(t.trim())}let eV=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],eR=new Set([...eV,"pathRotation"]),eD=t=>t===tf||t===tV,eL=new Set(["x","y","z"]),ej=eV.filter(t=>!eL.has(t)),eB={width:({x:t},{paddingLeft:e="0",paddingRight:i="0",boxSizing:n})=>{let r=t.max-t.min;return"border-box"===n?r:r-parseFloat(e)-parseFloat(i)},height:({y:t},{paddingTop:e="0",paddingBottom:i="0",boxSizing:n})=>{let r=t.max-t.min;return"border-box"===n?r:r-parseFloat(e)-parseFloat(i)},top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:(t,{transform:e})=>eC(e,"x"),y:(t,{transform:e})=>eC(e,"y")};eB.translateX=eB.x,eB.translateY=eB.y;let eF=new Set,eI=!1,eO=!1,eN=!1;function e$(){if(eO){let t=Array.from(eF).filter(t=>t.needsMeasurement),e=new Set(t.map(t=>t.element)),i=new Map;e.forEach(t=>{let e=function(t){let e=[];return ej.forEach(i=>{let n=t.getValue(i);void 0!==n&&(e.push([i,n.get()]),n.set(i.startsWith("scale")?1:0))}),e}(t);e.length&&(i.set(t,e),t.render())}),t.forEach(t=>t.measureInitialState()),e.forEach(t=>{t.render();let e=i.get(t);e&&e.forEach(([e,i])=>{t.getValue(e)?.set(i)})}),t.forEach(t=>t.measureEndState()),t.forEach(t=>{void 0!==t.suspendedScrollY&&window.scrollTo(0,t.suspendedScrollY)})}eO=!1,eI=!1,eF.forEach(t=>t.complete(eN)),eF.clear()}function eW(){eF.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(eO=!0)})}class eU{constructor(t,e,i,n,r,s=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=e,this.name=i,this.motionValue=n,this.element=r,this.isAsync=s}scheduleResolve(){this.state="scheduled",this.isAsync?(eF.add(this),eI||(eI=!0,tn.read(eW),tn.resolveKeyframes(e$))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:t,name:e,element:i,motionValue:n}=this;if(null===t[0]){let r=n?.get(),s=t[t.length-1];if(void 0!==r)t[0]=r;else if(i&&e){let n=i.readValue(e,s);null!=n&&(t[0]=n)}void 0===t[0]&&(t[0]=s),n&&void 0===r&&n.set(t[0])}!function(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),eF.delete(this)}cancel(){"scheduled"===this.state&&(eF.delete(this),this.state="pending")}resume(){"pending"===this.state&&this.scheduleResolve()}}let eH=t=>t.startsWith("--");function ez(t,e,i){eH(e)?t.style.setProperty(e,i):t.style[e]=i}let eY={};function eX(t,e){let i=A(t);return()=>eY[e]??i()}let eq=eX(()=>void 0!==window.ScrollTimeline,"scrollTimeline"),eK=eX(()=>{try{document.createElement("div").animate({opacity:0}
1,{easing:"linear(0, 1)"})}catch(t){return!1}return!0},"linearEasing"),e_=([t,e,i,n])=>`cubic-bezier(${t}, ${e}, ${i}, ${n})`,eG={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:e_([0,.65,.55,1]),circOut:e_([.55,0,1,.45]),backIn:e_([.31,.01,.66,-.59]),backOut:e_([.33,1.53,.69,.99])};function eZ(t){return"function"==typeof t&&"applyToOptions"in t}class eJ extends eg{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;let{element:e,name:i,keyframes:n,pseudoElement:r,allowFlatten:s=!1,finalKeyframe:o,onComplete:a}=t;this.isPseudoElement=!!r,this.allowFlatten=s,this.options=t,b("string"!=typeof t.type,'Mini animate() doesn\'t support "type" as a string.',"mini-spring");let l=function({type:t,...e}){return eZ(t)&&eK()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}(t);this.animation=function(t,e,i,{delay:n=0,duration:r=300,repeat:s=0,repeatType:o="loop",ease:a="easeOut",times:l}={},u){let h={[e]:i};l&&(h.offset=l);let d=function t(e,i){if(e)return"function"==typeof e?eK()?t6(e,i):"ease-out":Z(e)?e_(e):Array.isArray(e)?e.map(e=>t(e,i)||eG.easeOut):eG[e]}(a,r);Array.isArray(d)&&(h.easing=d);let c={delay:n,duration:r,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:s+1,direction:"reverse"===o?"alternate":"normal"};return u&&(c.pseudoElement=u),t.animate(h,c)}(e,i,n,l,r),!1===l.autoplay&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!r){let t=ep(n,this.options,o,this.speed);this.updateMotionValue&&this.updateMotionValue(t),ez(e,i,t),this.animation.cancel()}a?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),"finished"===this.state&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch(t){}}stop(){if(this.isStopped)return;this.isStopped=!0;let{state:t}=this;"idle"!==t&&"finished"!==t&&(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){let t=this.options?.element;!this.isPseudoElement&&t?.isConnected&&this.animation.commitStyles?.()}get duration(){return D(Number(this.animation.effect?.getComputedTiming?.().duration||0))}get iterationDuration(){let{delay:t=0}=this.options||{};return this.duration+D(t)}get time(){return D(Number(this.animation.currentTime)||0)}set time(t){let e=null!==this.finishedTime;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=R(t),e&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return null!==this.finishedTime?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,rangeStart:e,rangeEnd:i,observe:n}){return(this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&eq())?(this.animation.timeline=t,e&&(this.animation.rangeStart=e),i&&(this.animation.rangeEnd=i),C):n(this)}}let eQ={anticipate:U,backInOut:W,circInOut:Y};class e0 extends eJ{constructor(t){"string"==typeof t.ease&&t.ease in eQ&&(t.ease=eQ[t.ease]),ef(t),super(t),void 0!==t.startTime&&!1!==t.autoplay&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){let{motionValue:e,onUpdate:i,onComplete:n,element:r,...s}=this.options;if(!e)return;if(void 0!==t){e.set(t);return}let o=new ev({...s,autoplay:!1}),a=Math.max(10,tl.now()-this.startTime),l=x(0,10,a-10),u=o.sample(a).value,{name:h}=this.options;r&&h&&ez(r,h,u),e.setWithVelocity(o.sample(Math.max(0,a-l)).value,u,l),o.stop()}}let e1=(t,e)=>"zIndex"!==e&&!!("number"==typeof t||Array.isArray(t)||"string"==typeof t&&(tz.test(t)||"0"===t)&&!t.startsWith("url("));function e2(t){t.duration=0,t.type="keyframes"}let e5=new Set(["opacity","clipPath","filter","transform","backgroundColor"]),e3=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/,e9=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),e4=A(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));class e6 extends eg{constructor({autoplay:t=!0,delay:e=0,type:i="keyframes",repeat:n=0,repeatDelay:r=0,repeatType:s="loop",keyframes:o,name:a,motionValue:l,element:u,...h}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=tl.now();let d={autoplay:t,delay:e,type:i,repeat:n,repeatDelay:r,repeatType:s,name:a,motionValue:l,element:u,...h},c=u?.KeyframeResolver||eU;this.keyframeResolver=new c(o,(t,e,i)=>this.onKeyframesResolved(t,e,d,!i),a,l,u),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,e,i,n){let r;this.keyframeResolver=void 0;let{name:s,type:o,velocity:a,delay:l,isHandoff:u,onUpdate:h}=i;this.resolvedAt=tl.now();let d=!0;
1!function(t,e,i,n){let r=t[0];if(null===r)return!1;if("display"===e||"visibility"===e)return!0;let s=t[t.length-1],o=e1(r,e),a=e1(s,e);return w(o===a,`You are trying to animate ${e} from "${r}" to "${s}". "${o?s:r}" is not an animatable value.`,"value-not-animatable"),!!o&&!!a&&(function(t){let e=t[0];if(1===t.length)return!0;for(let i=0;i<t.length;i++)if(t[i]!==e)return!0}(t)||("spring"===i||eZ(i))&&n)}(t,s,o,a)&&(d=!1,(S.instantAnimations||!l)&&h?.(ep(t,i,e)),t[0]=t[t.length-1],e2(i),i.repeat=0);let c={startTime:n?this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt:void 0,finalKeyframe:e,...i,keyframes:t},p=d&&!u&&function(t){let{motionValue:e,name:i,repeatDelay:n,repeatType:r,damping:s,type:o,keyframes:a}=t,l=e?.owner?.current;if(!(l instanceof HTMLElement)&&!(l instanceof SVGElement))return!1;let{onUpdate:u,transformTemplate:h}=e.owner.getProps();return e4()&&i&&(e5.has(i)||e9.has(i)&&function(t){for(let e=0;e<t.length;e++)if("string"==typeof t[e]&&e3.test(t[e]))return!0;return!1}(a))&&("transform"!==i||!h)&&!u&&!n&&"mirror"!==r&&0!==s&&"inertia"!==o}(c),m=c.motionValue?.owner?.current;if(p)try{r=new e0({...c,element:m})}catch{r=new ev(c)}else r=new ev(c);r.finished.then(()=>{this.notifyFinished()}).catch(C),this.pendingTimeline&&(this.stopTimeline=r.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=r}get finished(){return this._animation?this.animation.finished:this._finished}then(t,e){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),eN=!0,eW(),e$(),eN=!1),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}class e8{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>t.finished))}getAll(t){return this.animations[0][t]}setAll(t,e){for(let i=0;i<this.animations.length;i++)this.animations[i][t]=e}attachTimeline(t){let e=this.animations.map(e=>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 state(){return this.getAll("state")}get startTime(){return this.getAll("startTime")}get duration(){return e7(this.animations,"duration")}get iterationDuration(){return e7(this.animations,"iterationDuration")}runAll(t){this.animations.forEach(e=>e[t]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}function e7(t,e){let i=0;for(let n=0;n<t.length;n++){let r=t[n][e];null!==r&&r>i&&(i=r)}return i}class it extends e8{then(t,e){return this.finished.finally(t).then(()=>{})}}function ie(t,e,i,n=0,r=1){let s=Array.from(t).sort((t,e)=>t.sortNodePosition(e)).indexOf(e),o=t.size,a=(o-1)*n;return"function"==typeof i?i(s,o):1===r?s*n:a-s*n}new WeakMap;let ii=t=>!isNaN(parseFloat(t)),ir={current:void 0};class is{constructor(t,e={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=t=>{let e=tl.now();if(this.updatedAt!==e&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(t),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(let t of this.dependents)t.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=e.owner}setCurrent(t){this.current=t,this.updatedAt=tl.now(),null===this.canTrackVelocity&&void 0!==t&&(this.canTrackVelocity=ii(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,e){this.events[t]||(this.events[t]=new V);let i=this.events[t].add(e);return"change"===t?()=>{i(),tn.read(()=>{this.events.change.getSize()||this.stop()})}:i}clearListeners(){for(let t in this.events)this.events[t].clear()}attach(t,e){this.passiveEffect=t,this.stopPassiveEffect=e}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,e,i){this.set(e),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-i}jump(t,e=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,e&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return ir.current&&ir.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){let t=tl.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||t-this.updatedAt>30)return 0;let e=Math.min(this.updatedAt-this.prevUpdatedAt,30);return L(parseFloat(this.current)-parseFloat(this.prevFrameValue),e)}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.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function io(t,e){return new is(t,e)}function ia(t,e){if(t?.inherit&&e){let{inherit:i,...n}=t;return{...e,...n}}return t}function il(t,e){let i=t?.[e]??t?.default??t;return i!==t?ia(i,t):i}let iu={type:"spring",stiffness:500,damping:25,restSpeed:10},ih=t=>({type:"spring",stiffness:550,damping:0===t?2*Math.sqrt(550):30,restSpeed:10}),id={type:"keyframes",duration:.8},ic={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},ip=(t,{keyframes:e})=>e.length>2?id:eR.has(t)?t.startsWith("scale")?ih(e[1]):iu:ic,im=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]),ig=(t,e,i,n={},r,s)=>o=>{let a=il(n,t)||{},l=a.delay||n.delay||0,{elapsed:u=0}=n;u-=R(l);let h={keyframes:Array.isArray(i)?i:[null,i],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-u,onUpdate:t=>{e.set(t),a.onUpdate&&a.onUpdate(t)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:s?void 0:r};!function(t){for(let e in t)if(!im.has(e))return!0;return!1}(a)&&Object.assign(h,ip(t,h)),h.duration&&(h.duration=R(h.duration)),h.repeatDelay&&(h.repeatDelay=R(h.repeatDelay)),void 0!==h.from&&(h.keyframes[0]=h.from);let d=!1;if(!1!==h.type&&(0!==h.duration||h.repeatDelay)||(e2(h),0!==h.delay||(d=!0)),(S.instantAnimations||S.skipAnimations||r?.shouldSkipAnimations||a.skipAnimations)&&(d=!0,e2(h),h.delay=0),h.allowFlatten=!a.type&&!a.ease,d&&!s&&void 0!==e.get()){let t=ep(h.keyframes,a);if(void 0!==t){tn.update(()=>{h.onUpdate(t),h.onComplete()});return}}return a.isSync?new ev(h):new e6(h)},iy=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function iv(t){let e=[{},{}];
1return t?.values.forEach((t,i)=>{e[0][i]=t.get(),e[1][i]=t.getVelocity()}),e}function ix(t,e,i,n){if("function"==typeof e){let[r,s]=iv(n);e=e(void 0!==i?i:t.custom,r,s)}if("string"==typeof e&&(e=t.variants&&t.variants[e]),"function"==typeof e){let[r,s]=iv(n);e=e(void 0!==i?i:t.custom,r,s)}return e}function iw(t,e,i){let n=t.getProps();return ix(n,e,void 0!==i?i:n.custom,t)}let ib=new Set(["width","height","top","left","right","bottom",...eV]),iS=t=>Array.isArray(t),iT=t=>!!(t&&t.getVelocity);function iP(t,e){let i=t.getValue("willChange");if(iT(i)&&i.add)return i.add(e);if(!i&&S.WillChange){let i=new S.WillChange("auto");t.addValue("willChange",i),i.add(e)}}function iE(t){return t.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}let iA="data-"+iE("framerAppearId");function iC(t,e,{delay:i=0,transitionOverride:n,type:r}={}){let{transition:s,transitionEnd:o,...a}=e,l=t.getDefaultTransition();s=s?ia(s,l):l;let u=s?.reduceMotion,h=s?.skipAnimations;n&&(s=n);let d=[],c=r&&t.animationState&&t.animationState.getState()[r],p=s?.path;for(let e in p&&p.animateVisualElement(t,a,s,i,d),a){let n=t.getValue(e,t.latestValues[e]??null),r=a[e];if(void 0===r||c&&function({protectedKeys:t,needsAnimating:e},i){let n=t.hasOwnProperty(i)&&!0!==e[i];return e[i]=!1,n}(c,e))continue;let o={delay:i,...il(s||{},e)};h&&(o.skipAnimations=!0);let l=n.get();if(void 0!==l&&!n.isAnimating()&&!Array.isArray(r)&&r===l&&!o.velocity){tn.update(()=>n.set(r));continue}let p=!1;if(window.MotionHandoffAnimation){let i=t.props[iA];if(i){let t=window.MotionHandoffAnimation(i,e,tn);null!==t&&(o.startTime=t,p=!0)}}iP(t,e);let m=u??t.shouldReduceMotion;n.start(ig(e,n,r,m&&ib.has(e)?{type:!1}:o,t,p));let f=n.animation;f&&d.push(f)}if(o){let e=()=>tn.update(()=>{o&&function(t,e){let{transitionEnd:i={},transition:n={},...r}=iw(t,e)||{};for(let e in r={...r,...i}){var s;let i=iS(s=r[e])?s[s.length-1]||0:s;t.hasValue(e)?t.getValue(e).set(i):t.addValue(e,io(i))}}(t,o)});d.length?Promise.all(d).then(e):e()}return d}function iM(t,e,i={}){let n=iw(t,e,"exit"===i.type?t.presenceContext?.custom:void 0),{transition:r=t.getDefaultTransition()||{}}=n||{};i.transitionOverride&&(r=i.transitionOverride);let s=n?()=>Promise.all(iC(t,n,i)):()=>Promise.resolve(),o=t.variantChildren&&t.variantChildren.size?(n=0)=>{let{delayChildren:s=0,staggerChildren:o,staggerDirection:a}=r;return function(t,e,i=0,n=0,r=0,s=1,o){let a=[];for(let l of t.variantChildren)l.notify("AnimationStart",e),a.push(iM(l,e,{...o,delay:i+("function"==typeof n?0:n)+ie(t.variantChildren,l,n,r,s)}).then(()=>l.notify("AnimationComplete",e)));return Promise.all(a)}(t,e,n,s,o,a,i)}:()=>Promise.resolve(),{when:a}=r;if(!a)return Promise.all([s(),o(i.delay)]);{let[t,e]="beforeChildren"===a?[s,o]:[o,s];return t().then(()=>e())}}let ik=t=>e=>e.test(t),iV=[tf,tV,tk,tM,tD,tR,{test:t=>"auto"===t,parse:t=>t}],iR=t=>iV.find(ik(t)),iD=new Set(["brightness","contrast","saturate","opacity"]);function iL(t){let[e,i]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;let[n]=i.match(tx)||[];if(!n)return t;let r=i.replace(n,""),s=iD.has(e)?1:0;return n!==i&&(s*=100),e+"("+s+r+")"}let ij=/\b([a-z-]*)\(.*?\)/gu,iB={...tz,getAnimatableNone:t=>{let e=t.match(ij);return e?e.map(iL).join(" "):t}},iF={...tz,getAnimatableNone:t=>{let e=tz.parse(t);return tz.createTransformer(t)(e.map(t=>"number"==typeof t?0:"object"==typeof t?{...t,alpha:1}:t))}},iI={...tf,transform:Math.round},iO={borderWidth:tV,borderTopWidth:tV,borderRightWidth:tV,borderBottomWidth:tV,borderLeftWidth:tV,borderRadius:tV,borderTopLeftRadius:tV,borderTopRightRadius:tV,borderBottomRightRadius:tV,borderBottomLeftRadius:tV,width:tV,maxWidth:tV,height:tV,maxHeight:tV,top:tV,right:tV,bottom:tV,left:tV,inset:tV,insetBlock:tV,insetBlockStart:tV,insetBlockEnd:tV,insetInline:tV,insetInlineStart:tV,insetInlineEnd:tV,padding:tV,paddingTop:tV,paddingRight:tV,paddingBottom:tV,paddingLeft:tV,paddingBlock:tV,paddingBlockStart:tV,paddingBlockEnd:tV,paddingInline:tV,paddingInlineStart:tV,paddingInlineEnd:tV,margin:tV,marginTop:tV,marginRight:tV,marginBottom:tV,marginLeft:tV,marginBlock:tV,marginBlockStart:tV,marginBlockEnd:tV,marginInline:tV,marginInlineStart:tV,marginInlineEnd:tV,fontSize:tV,backgroundPositionX:tV,backgroundPositionY:tV,rotate:tM,pathRotation:tM,rotateX:tM,rotateY:tM,rotateZ:tM,scale:ty,scaleX:ty,scaleY:ty,scaleZ:ty,skew:tM,skewX:tM,skewY:tM,distance:tV,translateX:tV,translateY:tV,translateZ:tV,x:tV,y:tV,z:tV,perspective:tV,transformPerspective:tV,opacity:tg,originX:tL,originY:tL,originZ:tV,zIndex:iI,fillOpacity:tg,strokeOpacity:tg,numOctaves:iI},iN={...iO,color:tB,backgroundColor:tB,outlineColor:tB,fill:tB,stroke:tB,borderColor:tB,borderTopColor:tB,borderRightColor:tB,borderBottomColor:tB,borderLeftColor:tB,filter:iB,WebkitFilter:iB,mask:iF,WebkitMask:iF},i$=t=>iN[t],iW=new Set([iB,iF]);function iU(t,e){let i=i$(t);return iW.has(i)||(i=tz),i.getAnimatableNone?i.getAnimatableNone(e):void 0}
1let iH=new Set(["auto","none","0"]);class iz extends eU{constructor(t,e,i,n,r){super(t,e,i,n,r,!0)}readKeyframes(){let{unresolvedKeyframes:t,element:e,name:i}=this;if(!e||!e.current)return;super.readKeyframes();for(let i=0;i<t.length;i++){let n=t[i];if("string"==typeof n&&tc(n=n.trim())){let r=function t(e,i,n=1){b(n<=4,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");let[r,s]=function(t){let e=iy.exec(t);if(!e)return[,];let[,i,n,r]=e;return[`--${i??n}`,r]}(e);if(!r)return;let o=window.getComputedStyle(i).getPropertyValue(r);if(o){let t=o.trim();return T(t)?parseFloat(t):t}return tc(s)?t(s,i,n+1):s}(n,e.current);void 0!==r&&(t[i]=r),i===t.length-1&&(this.finalKeyframe=n)}}if(this.resolveNoneKeyframes(),!ib.has(i)||2!==t.length)return;let[n,r]=t,s=iR(n),o=iR(r);if(tm(n)!==tm(r)&&eB[i]){this.needsMeasurement=!0;return}if(s!==o){if(eD(s)&&eD(o))for(let e=0;e<t.length;e++){let i=t[e];"string"==typeof i&&(t[e]=parseFloat(i))}else eB[i]&&(this.needsMeasurement=!0)}}resolveNoneKeyframes(){let{unresolvedKeyframes:t,name:e}=this,i=[];for(let e=0;e<t.length;e++){var n;(null===t[e]||("number"==typeof(n=t[e])?0===n:null===n||"none"===n||"0"===n||E(n)))&&i.push(e)}i.length&&function(t,e,i){let n,r=0;for(;r<t.length&&!n;){let e=t[r];"string"==typeof e&&!iH.has(e)&&t$(e).values.length&&(n=t[r]),r++}if(n&&i)for(let r of e)t[r]=iU(i,n)}(t,i,e)}measureInitialState(){let{element:t,unresolvedKeyframes:e,name:i}=this;if(!t||!t.current)return;"height"===i&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=eB[i](t.measureViewportBox(),window.getComputedStyle(t.current)),e[0]=this.measuredOrigin;let n=e[e.length-1];void 0!==n&&t.getValue(i,n).jump(n,!1)}measureEndState(){let{element:t,name:e,unresolvedKeyframes:i}=this;if(!t||!t.current)return;let n=t.getValue(e);n&&n.jump(this.measuredOrigin,!1);let r=i.length-1,s=i[r];i[r]=eB[e](t.measureViewportBox(),window.getComputedStyle(t.current)),null!==s&&void 0===this.finalKeyframe&&(this.finalKeyframe=s),this.removedTransforms?.length&&this.removedTransforms.forEac
1h(([e,i])=>{t.getValue(e).set(i)}),this.resolveNoneKeyframes()}}let iY=["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"];function iX(t,e,i){if(null==t)return[];if(t instanceof EventTarget)return[t];if("string"==typeof t){let n=document;e&&(n=e.current);let r=i?.[t]??n.querySelectorAll(t);return r?Array.from(r):[]}return Array.from(t).filter(t=>null!=t)}[...iY];let iq=(t,e)=>e&&"number"==typeof t?e.transform(t):t;function iK(t){return P(t)&&"offsetHeight"in t&&!("ownerSVGElement"in t)}let{schedule:i_,cancel:iG}=ti(queueMicrotask,!1),iZ={x:!1,y:!1};function iJ(t,e){let i=iX(t),n=new AbortController;return[i,{passive:!0,...e,signal:n.signal},()=>n.abort()]}let iQ=(t,e)=>!!e&&(t===e||iQ(t,e.parentElement)),i0=t=>"mouse"===t.pointerType?"number"!=typeof t.button||t.button<=0:!1!==t.isPrimary,i1=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]),i2=new Set(["INPUT","SELECT","TEXTAREA"]),i5=new WeakSet;function i3(t){return e=>{"Enter"===e.key&&t(e)}}function i9(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}let i4=(t,e)=>{let i=t.currentTarget;if(!i)return;let n=i3(()=>{if(i5.has(i))return;i9(i,"down");let t=i3(()=>{i9(i,"up")});i.addEventListener("keyup",t,e),i.addEventListener("blur",()=>i9(i,"cancel"),e)});i.addEventListener("keydown",n,e),i.addEventListener("blur",()=>i.removeEventListener("keydown",n),e)};function i6(t){return i0(t)&&!(iZ.x||iZ.y)}let i8=new WeakSet;function i7(t){return P(t)&&"ownerSVGElement"in t}
1let nt=new WeakMap,ne=(t,e,i)=>(n,r)=>r&&r[0]?r[0][t+"Size"]:i7(n)&&"getBBox"in n?n.getBBox()[e]:n[i],ni=ne("inline","width","offsetWidth"),nn=ne("block","height","offsetHeight");function nr({target:t,borderBoxSize:e}){nt.get(t)?.forEach(i=>{i(t,{get width(){return ni(t,e)},get height(){return nn(t,e)}})})}function ns(t){t.forEach(nr)}let no=new Set;function na(t,e){return"function"==typeof t?(no.add(t),s||(s=()=>{let t={get width(){return window.innerWidth},get height(){return window.innerHeight}};no.forEach(e=>e(t))},window.addEventListener("resize",s)),()=>{no.delete(t),no.size||"function"!=typeof s||(window.removeEventListener("resize",s),s=void 0)}):function(t,e){r||"undefined"==typeof ResizeObserver||(r=new ResizeObserver(ns));let i=iX(t);return i.forEach(t=>{let i=nt.get(t);i||(i=new Set,nt.set(t,i)),i.add(e),r?.observe(t)}),()=>{i.forEach(t=>{let i=nt.get(t);i?.delete(e),i?.size||r?.unobserve(t)})}}(t,e)}let nl={value:null,addProjectionMetrics:null};function nu(t){return i7(t)&&"svg"===t.tagName}function nh(...t){let e=!Array.isArray(t[0]),i=e?0:-1,n=t[0+i],r=el(t[1+i],t[2+i],t[3+i]);return e?r(n):r}let nd=[...iV,tB,tz],nc=t=>nd.find(ik(t)),np=()=>({translate:0,scale:1,origin:0,originPoint:0}),nm=()=>({x:np(),y:np()}),nf=()=>({min:0,max:0}),ng=()=>({x:nf(),y:nf()}),ny=new WeakMap;function nv(t){return null!==t&&"object"==typeof t&&"function"==typeof t.start}function nx(t){return"string"==typeof t||Array.isArray(t)}let nw=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],nb=["initial",...nw];function nS(t){return nv(t.animate)||nb.some(e=>nx(t[e]))}function nT(t){return!!(nS(t)||t.variants)}let nP={current:null},nE={current:!1},nA="undefined"!=typeof window;function nC(){if(nE.current=!0,nA){if(window.matchMedia){let t=window.matchMedia("(prefers-reduced-motion)"),e=()=>nP.current=t.matches;t.addEventListener("change",e),e()}else nP.current=!1}}let nM=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],nk={};class nV{scrapeMotionValuesFromProps(t,e,i){return{}}constructor({parent:t,props:e,presenceContext:i,reducedMotionConfig:n,skipAnimations:r,blockInitialAnimation:s,visualState:o},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=eU,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{let t=tl.now();this.renderScheduledAt<t&&(this.renderScheduledAt=t,tn.render(this.render,!1,!0))};let{latestValues:l,renderState:u}=o;this.latestValues=l,this.baseTarget={...l},this.initialValues=e.initial?{...l}:{},this.renderState=u,this.parent=t,this.props=e,this.presenceContext=i,this.depth=t?t.depth+1:0,this.reducedMotionConfig=n,this.skipAnimationsConfig=r,this.options=a,this.blockInitialAnimation=!!s,this.isControllingVariants=nS(e),this.isVariantNode=nT(e),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);let{willChange:h,...d}=this.scrapeMotionValuesFromProps(e,{},this);for(let t in d){let e=d[t];void 0!==l[t]&&iT(e)&&e.set(l[t])}}mount(t){if(this.hasBeenMounted)for(let t in this.initialValues)this.values.get(t)?.jump(this.initialValues[t]),this.latestValues[t]=this.initialValues[t];this.current=t,ny.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)),"never"===this.reducedMotionConfig?this.shouldReduceMotion=!1:"always"===this.reducedMotionConfig?this.shouldReduceMotion=!0:(nE.current||nC(),this.shouldReduceMotion=nP.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){for(let t in this.projection&&this.projection.unmount(),tr(this.notifyUpdate),tr(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this),this.events)this.events[t].clear();for(let t in this.features){let e=this.features[t];e&&(e.unmount(),e.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,e){let i;if(this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)(),e.accelerate&&e5.has(t)&&this.current instanceof HTMLElement){let{factory:i,keyframes:n,times:r,ease:s,duration:o}=e.accelerate,a=new eJ({element:this.current,name:t,keyframes:n,times:r,ease:s,duration:R(o)}),l=i(a);this.valueSubscriptions.set(t,()=>{l(),a.cancel()});return}let n=eR.has(t);n&&this.onBindTransform&&this.onBindTransform();let r=e.on("change",e=>{this.latestValues[t]=e,this.props.onUpdate&&tn.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});"undefined"!=typeof window&&window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,t,e)),this.valueSubscriptions.set(t,()=>{r(),i&&i()})}sortNodePosition(t){return this.current&&this.sortInstanceNodePosition&&this.type===t.type?this.sortInstanceNodePosition(this.current,t.current):0}updateFeatures(){let t="animation";for(t in nk){let e=nk[t];if(!e)continue;let{isEnabled:i,Feature:n}=e;if(!this.features[t]&&n&&i(this.props)&&(this.features[t]=new n(this)),this.features[t]){let e=this.features[t];
1e.isMounted?e.update():(e.mount(),e.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):ng()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,e){this.latestValues[t]=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 e=0;e<nM.length;e++){let i=nM[e];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);let n=t["on"+i];n&&(this.propEventSubscriptions[i]=this.on(i,n))}this.prevMotionValues=function(t,e,i){for(let n in e){let r=e[n],s=i[n];if(iT(r))t.addValue(n,r);else if(iT(s))t.addValue(n,io(r,{owner:t}));else if(s!==r){if(t.hasValue(n)){let e=t.getValue(n);!0===e.liveStyle?e.jump(r):e.hasAnimated||e.set(r)}else{let e=t.getStaticValue(n);t.addValue(n,io(void 0!==e?e:r,{owner:t}))}}}for(let n in i)void 0===e[n]&&t.removeValue(n);return e}(this,this.scrapeMotionValuesFromProps(t,this.prevProps||{},this),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}addVariantChild(t){let e=this.getClosestVariantNode();if(e)return e.variantChildren&&e.variantChildren.add(t),()=>e.variantChildren.delete(t)}addValue(t,e){let i=this.values.get(t);e!==i&&(i&&this.removeValue(t),this.bindToMotionValue(t,e),this.values.set(t,e),this.latestValues[t]=e.get())}removeValue(t){this.values.delete(t);let 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 i=this.values.get(t);return void 0===i&&void 0!==e&&(i=io(null===e?void 0:e,{owner:this}),this.addValue(t,i)),i}readValue(t,e){let i=void 0===this.latestValues[t]&&this.current?this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options):this.latestValues[t];return null!=i&&("string"==typeof i&&(T(i)||E(i))?i=parseFloat(i):!nc(i)&&tz.test(e)&&(i=iU(t,e)),this.setBaseTarget(t,iT(i)?i.get():i)),iT(i)?i.get():i}setBaseTarget(t,e){this.baseTarget[t]=e}getBaseTarget(t){let e;let{initial:i}=this.props;if("string"==typeof i||"object"==typeof i){let n=ix(this.props,i,this.presenceContext?.custom);n&&(e=n[t])}if(i&&void 0!==e)return e;let n=this.getBaseTargetFromProps(this.props,t);return void 0===n||iT(n)?void 0!==this.initialValues[t]&&void 0===e?void 0:this.baseTarget[t]:n}on(t,e){return this.events[t]||(this.events[t]=new V),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}scheduleRenderMicrotask(){i_.render(this.render)}}class nR extends nV{constructor(){super(...arguments),this.KeyframeResolver=iz}sortInstanceNodePosition(t,e){return 2&t.compareDocumentPosition(e)?1:-1}getBaseTargetFromProps(t,e){let i=t.style;return i?i[e]:void 0}removeValueFromRenderState(t,{vars:e,style:i}){delete e[t],delete i[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:t}=this.props;iT(t)&&(this.childSubscription=t.on("change",t=>{this.current&&(this.current.textContent=`${t}`)}))}}class nD{constructor(t){this.isMounted=!1,this.node=t}update(){}}function nL({top:t,left:e,right:i,bottom:n}){return{x:{min:e,max:i},y:{min:t,max:n}}}function nj(t){return void 0===t||1===t}function nB({scale:t,scaleX:e,scaleY:i}){return!nj(t)||!nj(e)||!nj(i)}function nF(t){return nB(t)||nI(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function nI(t){var e,i;return(e=t.x)&&"0%"!==e||(i=t.y)&&"0%"!==i}function nO(t,e,i,n,r){return void 0!==r&&(t=n+r*(t-n)),n+i*(t-n)+e}function nN(t,e=0,i=1,n,r){t.min=nO(t.min,e,i,n,r),t.max=nO(t.max,e,i,n,r)}function n$(t,{x:e,y:i}){nN(t.x,e.translate,e.scale,e.originPoint),nN(t.y,i.translate,i.scale,i.originPoint)}function nW(t,e){t.min+=e,t.max+=e}function nU(t,e,i,n,r=.5){let s=tq(t.min,t.max,r);nN(t,e,i,s,n)}function nH(t,e){return"string"==typeof t?parseFloat(t)/100*(e.max-e.min):t}function nz(t,e,i){let n=i??t;nU(t.x,nH(e.x,n.x),e.scaleX,e.scale,e.originX),nU(t.y,nH(e.y,n.y),e.scaleY,e.scale,e.originY)}function nY(t,e){return nL(function(t,e){if(!e)return t;let i=e({x:t.left,y:t.top}),n=e({x:t.right,y:t.bottom});return{top:i.y,left:i.x,bottom:n.y,right:n.x}}(t.getBoundingClientRect(),e))}let nX={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},nq=eV.length;function nK(t,e,i){let{style:n,vars:r,transformOrigin:s}=t,o=!1,a=!1;for(let t in e){let i=e[t];if(eR.has(t)){o=!0;continue}if(th(t)){r[t]=i;continue}{let e=iq(i,iO[t]);t.startsWith("origin")?(a=!0,s[t]=e):n[t]=e}}
1if(!e.transform&&(o||i?n.transform=function(t,e,i){let n="",r=!0;for(let s=0;s<nq;s++){let o=eV[s],a=t[o];if(void 0===a)continue;let l=!0;if("number"==typeof a)l=a===(o.startsWith("scale")?1:0);else{let t=parseFloat(a);l=o.startsWith("scale")?1===t:0===t}if(!l||i){let t=iq(a,iO[o]);if(!l){r=!1;let e=nX[o]||o;n+=`${e}(${t}) `}i&&(e[o]=t)}}let s=t.pathRotation;return s&&(r=!1,n+=`rotate(${iq(s,iO.pathRotation)}) `),n=n.trim(),i?n=i(e,r?"":n):r&&(n="none"),n}(e,t.transform,i):n.transform&&(n.transform="none")),a){let{originX:t="50%",originY:e="50%",originZ:i=0}=s;n.transformOrigin=`${t} ${e} ${i}`}}function n_(t,{style:e,vars:i},n,r){let s;let o=t.style;for(s in e)o[s]=e[s];for(s in r?.applyProjectionStyles(o,n),i)o.setProperty(s,i[s])}function nG(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}let nZ={correct:(t,e)=>{if(!e.target)return t;if("string"==typeof t){if(!tV.test(t))return t;t=parseFloat(t)}let i=nG(t,e.target.x),n=nG(t,e.target.y);return`${i}% ${n}%`}},nJ={borderRadius:{...nZ,applyTo:[...iY]},borderTopLeftRadius:nZ,borderTopRightRadius:nZ,borderBottomLeftRadius:nZ,borderBottomRightRadius:nZ,boxShadow:{correct:(t,{treeScale:e,projectionDelta:i})=>{let n=tz.parse(t);if(n.length>5)return t;let r=tz.createTransformer(t),s="number"!=typeof n[0]?1:0,o=i.x.scale*e.x,a=i.y.scale*e.y;n[0+s]/=o,n[1+s]/=a;let l=tq(o,a,.5);return"number"==typeof n[2+s]&&(n[2+s]/=l),"number"==typeof n[3+s]&&(n[3+s]/=l),r(n)}}};function nQ(t,{layout:e,layoutId:i}){return eR.has(t)||t.startsWith("origin")||(e||void 0!==i)&&(!!nJ[t]||"opacity"===t)}function n0(t,e,i){let n=t.style,r=e?.style,s={};if(!n)return s;for(let e in n)(iT(n[e])||r&&iT(r[e])||nQ(e,t)||i?.getValue(e)?.liveStyle!==void 0)&&(s[e]=n[e]);return s}class n1 extends nR{constructor(){super(...arguments),this.type="html",this.renderInstance=n_}mount(t){b(!!t.style,"motion.create() components must forward their ref to a HTML or SVG element","custom-component-ref"),super.mount(t)}readValueFromInstance(t,e){if(eR.has(e))return this.projection?.isProjecting?eA(e):eM(t,e);{let i=window.getComputedStyle(t),n=(th(e)?i.getPropertyValue(e):i[e])||0;return"string"==typeof n?n.trim():n}}measureInstanceViewportBox(t,{transformPagePoint:e}){return nY(t,e)}build(t,e,i){nK(t,e,i.transformTemplate)}scrapeMotionValuesFromProps(t,e,i){return n0(t,e,i)}}class n2 extends nV{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,e){if(e in t){let i=t[e];if("string"==typeof i||"number"==typeof i)return i}}getBaseTargetFromProps(){}removeValueFromRenderState(t,e){delete e.output[t]}measureInstanceViewportBox(){return ng()}build(t,e){Object.assign(t.output,e)}renderInstance(t,{output:e}){Object.assign(t,e)}sortInstanceNodePosition(){return 0}}let n5={offset:"stroke-dashoffset",array:"stroke-dasharray"},n3={offset:"strokeDashoffset",array:"strokeDasharray"},n9=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function n4(t,{attrX:e,attrY:i,attrScale:n,pathLength:r,pathSpacing:s=1,pathOffset:o=0,...a},l,u,h){if(nK(t,a,u),l){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};let{attrs:d,style:c}=t;for(let t of(d.transform&&(c.transform=d.transform,delete d.transform),(c.transform||d.transformOrigin)&&(c.transformOrigin=d.transformOrigin??"50% 50%",delete d.transformOrigin),c.transform&&(c.transformBox=h?.transformBox??"fill-box",delete d.transformBox),n9))void 0!==d[t]&&(c[t]=d[t],delete d[t]);void 0!==e&&(d.x=e),void 0!==i&&(d.y=i),void 0!==n&&(d.scale=n),void 0!==r&&function(t,e,i=1,n=0,r=!0){t.pathLength=1;let s=r?n5:n3;t[s.offset]=`${-n}`,t[s.array]=`${e} ${i}`}(d,r,s,o,!1)}let n6=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"]),n8=t=>"string"==typeof t&&"svg"===t.toLowerCase();function n7(t,e,i){let n=n0(t,e,i);for(let i in t)(iT(t[i])||iT(e[i]))&&(n[-1!==eV.indexOf(i)?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i]=t[i]);return n}class rt extends nR{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=ng}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){if(eR.has(e)){let t=i$(e);return t&&t.default||0}return e=n6.has(e)?e:iE(e),t.getAttribute(e)}
1scrapeMotionValuesFromProps(t,e,i){return n7(t,e,i)}build(t,e,i){n4(t,e,this.isSVGTag,i.transformTemplate,i.style)}renderInstance(t,e,i,n){!function(t,e,i,n){for(let i in n_(t,e,void 0,n),e.attrs)t.setAttribute(n6.has(i)?i:iE(i),e.attrs[i])}(t,e,0,n)}mount(t){this.isSVGTag=n8(t.tagName),super.mount(t)}}let re=nb.length;function ri(t,e){if(!Array.isArray(e))return!1;let i=e.length;if(i!==t.length)return!1;for(let n=0;n<i;n++)if(e[n]!==t[n])return!1;return!0}let rn=[...nw].reverse(),rr=nw.length;function rs(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function ro(){return{animate:rs(!0),whileInView:rs(),whileHover:rs(),whileTap:rs(),whileDrag:rs(),whileFocus:rs(),exit:rs()}}function ra(t,e){t.min=e.min,t.max=e.max}function rl(t,e){ra(t.x,e.x),ra(t.y,e.y)}function ru(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function rh(t){return t.max-t.min}function rd(t,e,i,n=.5){t.origin=n,t.originPoint=tq(e.min,e.max,t.origin),t.scale=rh(i)/rh(e),t.translate=tq(i.min,i.max,t.origin)-t.originPoint,(t.scale>=.9999&&t.scale<=1.0001||isNaN(t.scale))&&(t.scale=1),(t.translate>=-.01&&t.translate<=.01||isNaN(t.translate))&&(t.translate=0)}function rc(t,e,i,n){rd(t.x,e.x,i.x,n?n.originX:void 0),rd(t.y,e.y,i.y,n?n.originY:void 0)}function rp(t,e,i,n=0){let r=n?tq(i.min,i.max,n):i.min;t.min=r+e.min,t.max=t.min+rh(e)}function rm(t,e,i,n=0){let r=n?tq(i.min,i.max,n):i.min;t.min=e.min-r,t.max=t.min+rh(e)}function rf(t,e,i,n){rm(t.x,e.x,i.x,n?.x),rm(t.y,e.y,i.y,n?.y)}function rg(t,e,i,n,r){return t-=e,t=n+1/i*(t-n),void 0!==r&&(t=n+1/r*(t-n)),t}function ry(t,e,[i,n,r],s,o){!function(t,e=0,i=1,n=.5,r,s=t,o=t){if(tk.test(e)&&(e=parseFloat(e),e=tq(o.min,o.max,e/100)-o.min),"number"!=typeof e)return;let a=tq(s.min,s.max,n);t===s&&(a-=e),t.min=rg(t.min,e,i,a,r),t.max=rg(t.max,e,i,a,r)}(t,e[i],e[n],e[r],e.scale,s,o)}let rv=["x","scaleX","originX"],rx=["y","scaleY","originY"];function rw(t,e,i,n){ry(t.x,e,rv,i?i.x:void 0,n?n.x:void 0),ry(t.y,e,rx,i?i.y:void 0,n?n.y:void 0)}function rb(t){return 0===t.translate&&1===t.scale}function rS(t){return rb(t.x)&&rb(t.y)}function rT(t,e){return t.min===e.min&&t.max===e.max}function rP(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function rE(t,e){return rP(t.x,e.x)&&rP(t.y,e.y)}function rA(t){return rh(t.x)/rh(t.y)}function rC(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}function rM(t){return[t("x"),t("y")]}let rk=iY.length,rV=t=>"string"==typeof t?parseFloat(t):t,rR=t=>"number"==typeof t||tV.test(t);function rD(t,e){return void 0!==t[e]?t[e]:t.borderRadius}let rL=rB(0,.5,z),rj=rB(.5,.95,C);function rB(t,e,i){return n=>n<t?0:n>e?1:i(k(t,e,n))}function rF(t,e,i){let n=iT(t)?t:io(t);return n.start(ig("",n,e,i)),n.animation}function rI(t,e,i,n={passive:!0}){return t.addEventListener(e,i,n),()=>t.removeEventListener(e,i,n)}let rO=(t,e)=>t.depth-e.depth;class rN{constructor(){this.children=[],this.isDirty=!1}add(t){y(this.children,t),this.isDirty=!0}remove(t){v(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(rO),this.isDirty=!1,this.children.forEach(t)}}function r$(t){return iT(t)?t.get():t}class rW{constructor(){this.members=[]}add(t){y(this.members,t);for(let e=this.members.length-1;e>=0;e--){let i=this.members[e];if(i===t||i===this.lead||i===this.prevLead)continue;let n=i.instance;n&&!1!==n.isConnected||i.snapshot||(v(this.members,i),i.unmount())}t.scheduleRender()}remove(t){if(v(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){let t=this.members[this.members.length-1];t&&this.promote(t)}}relegate(t){for(let e=this.members.indexOf(t)-1;e>=0;e--){let t=this.members[e];if(!1!==t.isPresent&&t.instance?.isConnected!==!1)return this.promote(t),!0}return!1}promote(t,e){let i=this.lead;if(t!==i&&(this.prevLead=i,this.lead=t,t.show(),i)){i.updateSnapshot(),t.scheduleRender();let{layoutDependency:n}=i.options,{layoutDependency:r}=t.options;(void 0===n||n!==r)&&(t.resumeFrom=i,e&&(i.preserveOpacity=!0),i.snapshot&&(t.snapshot=i.snapshot,t.snapshot.latestValues=i.animationValues||i.latestValues),t.root?.isU
1pdating&&(t.isLayoutDirty=!0)),!1===t.options.crossfade&&i.hide()}}exitAnimationComplete(){this.members.forEach(t=>{t.options.onExitComplete?.(),t.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(t=>t.instance&&t.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}}let rU={hasAnimatedSinceResize:!0,hasEverUpdated:!1},rH={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},rz=["","X","Y","Z"],rY=0;function rX(t,e,i,n){let{latestValues:r}=e;r[t]&&(i[t]=r[t],e.setStaticValue(t,0),n&&(n[t]=0))}function rq({attachResizeListener:t,defaultParent:e,measureScroll:i,checkIsScrollRoot:n,resetTransform:r}){return class{constructor(t={},i=e?.()){this.id=rY++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,nl.value&&(rH.nodes=rH.calculatedTargetDeltas=rH.calculatedProjections=0),this.nodes.forEach(rG),this.nodes.forEach(r9),this.nodes.forEach(r4),this.nodes.forEach(rZ),nl.addProjectionMetrics&&nl.addProjectionMetrics(rH)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=t,this.root=i?i.root||i:this,this.path=i?[...i.path,i]:[],this.parent=i,this.depth=i?i.depth+1:0;for(let t=0;t<this.path.length;t++)this.path[t].shouldResetTransform=!0;this.root===this&&(this.nodes=new rN)}addEventListener(t,e){return this.eventHandlers.has(t)||this.eventHandlers.set(t,new V),this.eventHandlers.get(t).add(e)}notifyListeners(t,...e){let i=this.eventHandlers.get(t);i&&i.notify(...e)}hasListeners(t){return this.eventHandlers.has(t)}mount(e){if(this.instance)return;this.isSVG=i7(e)&&!nu(e),this.instance=e;let{layoutId:i,layout:n,visualElement:r}=this.options;if(r&&!r.current&&r.mount(e),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(n||i)&&(this.isLayoutDirty=!0),t){let i;let n=0,r=()=>this.root.updateBlockedByResize=!1;tn.read(()=>{n=window.innerWidth}),t(e,()=>{let t=window.innerWidth;t!==n&&(n=t,this.root.updateBlockedByResize=!0,i&&i(),i=function(t,e){let i=tl.now(),n=({timestamp:e})=>{let r=e-i;r>=250&&(tr(n),t(r-250))};return tn.setup(n,!0),()=>tr(n)}(r,0),rU.hasAnimatedSinceResize&&(rU.hasAnimatedSinceResize=!1,this.nodes.forEach(r3)))})}i&&this.root.registerSharedNode(i,this),!1!==this.options.animate&&r&&(i||n)&&this.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e,hasRelativeLayoutChanged:i,layout:n})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}let s=this.options.transition||r.getDefaultTransition()||si,{onLayoutAnimationStart:o,onLayoutAnimationComplete:a}=r.getProps(),l=!this.targetLayout||!rE(this.targetLayout,n),u=!e&&i;if(this.options.layoutRoot||this.resumeFrom||u||e&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);let e={...il(s,"layout"),onPlay:o,onComplete:a};(r.shouldReduceMotion||this.options.layoutRoot)&&(e.delay=0,e.type=!1),this.startAnimation(e),this.setAnimationOrigin(t,u,e.path)}else e||r3(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=n})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);let t=this.getStack();t&&t.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),tr(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.forEac
1h(r6),this.animationId++)}getTransformTemplate(){let{visualElement:t}=this.options;return t&&t.getProps().transformTemplate}willUpdate(t=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&function t(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;let{visualElement:i}=e.options;if(!i)return;let n=i.props[iA];if(window.MotionHasOptimisedAnimation(n,"transform")){let{layout:t,layoutId:i}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",tn,!(t||i))}let{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&t(r)}(this),this.root.isUpdating||this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let t=0;t<this.path.length;t++){let e=this.path[t];e.shouldResetTransform=!0,("string"==typeof e.latestValues.x||"string"==typeof e.latestValues.y)&&(e.isLayoutDirty=!0),e.updateScroll("snapshot"),e.options.layoutRoot&&e.willUpdate(!1)}let{layoutId:e,layout:i}=this.options;if(void 0===e&&!i)return;let n=this.getTransformTemplate();this.prevTransformTemplateValue=n?n(this.latestValues,""):void 0,this.updateSnapshot(),t&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){let t=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),t&&this.nodes.forEach(r0),this.nodes.forEach(rQ);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(r1);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(r2),this.nodes.forEach(r5),this.nodes.forEach(rK),this.nodes.forEach(r_)):this.nodes.forEach(r1),this.clearAllSnapshots();let t=tl.now();ts.delta=x(0,1e3/60,t-ts.timestamp),ts.timestamp=t,ts.isProcessing=!0,to.update.process(ts),to.preRender.process(ts),to.render.process(ts),ts.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,i_.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(rJ),this.sharedNodes.forEach(r8)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,tn.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){tn.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),!this.snapshot||rh(this.snapshot.measuredBox.x)||rh(this.snapshot.measuredBox.y)||(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let t=0;t<this.path.length;t++)this.path[t].updateScroll();let t=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected=ng()),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);let{visualElement:e}=this.options;e&&e.notify("LayoutMeasure",this.layout.layoutBox,t?t.layoutBox:void 0)}updateScroll(t="measure"){let e=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===t&&(e=!1),e&&this.instance){let e=n(this.instance);this.scroll={animationId:this.root.animationId,phase:t,isRoot:e,offset:i(this.instance),wasRoot:this.scroll?this.scroll.isRoot:e}}}resetTransform(){if(!r)return;let t=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,e=this.projectionDelta&&!rS(this.projectionDelta),i=this.getTransformTemplate(),n=i?i(this.latestValues,""):void 0,s=n!==this.prevTransformTemplateValue;t&&this.instance&&(e||nF(this.latestValues)||s)&&(r(this.instance,n),this.shouldResetTransform=!1,this.scheduleRender())}measure(t=!0){var e;let i=this.measurePageBox(),n=this.removeElementScroll(i);return t&&(n=this.removeTransform(n)),ss((e=n).x),ss(e.y),{animationId:this.root.animationId,measuredBox:i,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){let{visualElement:t}=this.options;if(!t)return ng();let e=t.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(sa))){let{scroll:t}=this.root;t&&(nW(e.x,t.offset.x),nW(e.y,t.offset.y))}return e}removeElementScroll(t){let e=ng();if(rl(e,t),this.scroll?.wasRoot)return e;for(let i=0;i<this.path.length;i++){let n=this.path[i],{scroll:r,options:s}=n;n!==this.root&&r&&s.layoutScroll&&(r.wasRoot&&rl(e,t),nW(e.x,r.offset.x),nW(e.y,r.offset.y))}return e}applyTransform(t,e=!1,i){let n=i||ng();rl(n,t);for(let t=0;t<this.path.length;t++){let i=this.path[t];!e&&i.options.layoutScroll&&i.scroll&&i!==i.root&&(nW(n.x,-i.scroll.offset.x),nW(n.y,-i.scroll.offset.y)),nF(i.latestValues)&&nz(n,i.latestValues,i.layout?.layoutBox)}return nF(this.latestValues)&&nz(n,this.latestValues,this.layout?.layoutBox),n}removeTransform(t){let e=ng();rl(e,t);for(let t=0;t<this.path.length;t++){let i;let n=this.path[t];nF(n.latestValues)&&(n.instance&&(nB(n.latestValues)&&n.updateSnapshot(),rl(i=ng(),n.measurePageBox())),rw(e,n.latestValues,n.snapshot?.layoutBox,i))}return nF(this.latestValues)&&rw(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!==ts.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(t=!1){let e=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=e.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=e.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=e.isSharedProjectionDirty);let i=!!this.resumingFrom||this!==e;if(!(t||i&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;let{layout:n,layoutId:r}=this.options;if(!this.layout||!(n||r))return;this.resolvedRelativeTargetAt=ts.timestamp;let s=this.getClosestProjectingParent();if(s&&this.linkedParentVersion!==s.layoutVersion&&!s.options.layoutRoot&&this.removeRelativeTarget(),this.targetDelta||this.relativeTarget||(!1!==this.options.layoutAnchor&&s&&s.layout?this.createRelativeTarget(s,this.layout.layoutBox,s.layout.layoutBox):this.removeRelativeTarget()),this.relativeTarget||this.targetDelta){if(this.target||(this.target=ng(),this.targetWithTransforms=ng()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target){var o,a,l,u;this.forceRelativeParentToResolveTarget(),o=this.target,a=this.relativeTarget,l=this.relativeParent.target,u=this.options.layoutAnchor||void 0,rp(o.x,a.x,l.x,u?.x),rp(o.y,a.y,l.y,u?.y)}else this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):rl(this.target,this.layout.layoutBox),n$(this.target,this.targetDelta)):rl(this.target,this.layout.layoutBox);this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,!1!==this.options.layoutAnchor&&s&&!!s.resumingFrom==!!this.resumingFrom&&!s.options.layoutScroll&&s.target&&1!==this.animationProgress?this.createRelativeTarget(s,this.target,s.target):this.relativeParent=this.relativeTarget=void 0),nl.value&&rH.calculatedTargetDeltas++}}getClosestProjectingParent(){return!this.parent||nB(this.parent.latestValues)||nI(this.parent.latestValues)?void 0:this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(t,e,i){this.relativeParent=t,this.linkedParentVersion=t.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=ng(),this.relativeTargetOrigin=ng(),rf(this.relativeTargetOrigin,e,i,this.options.layoutAnchor||void 0),rl(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){let t=this.getLead(),e=!!this.resumingFrom||this!==t,i=!0;
1if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(i=!1),e&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(i=!1),this.resolvedRelativeTargetAt===ts.timestamp&&(i=!1),i)return;let{layout:n,layoutId:r}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(n||r))return;rl(this.layoutCorrected,this.layout.layoutBox);let s=this.treeScale.x,o=this.treeScale.y;!function(t,e,i,n=!1){let r,s;let o=i.length;if(o){e.x=e.y=1;for(let a=0;a<o;a++){s=(r=i[a]).projectionDelta;let{visualElement:o}=r.options;(!o||!o.props.style||"contents"!==o.props.style.display)&&(n&&r.options.layoutScroll&&r.scroll&&r!==r.root&&(nW(t.x,-r.scroll.offset.x),nW(t.y,-r.scroll.offset.y)),s&&(e.x*=s.x.scale,e.y*=s.y.scale,n$(t,s)),n&&nF(r.latestValues)&&nz(t,r.latestValues,r.layout?.layoutBox))}e.x<1.0000000000001&&e.x>.999999999999&&(e.x=1),e.y<1.0000000000001&&e.y>.999999999999&&(e.y=1)}}(this.layoutCorrected,this.treeScale,this.path,e),t.layout&&!t.target&&(1!==this.treeScale.x||1!==this.treeScale.y)&&(t.target=t.layout.layoutBox,t.targetWithTransforms=ng());let{target:a}=t;if(!a){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}this.projectionDelta&&this.prevProjectionDelta?(ru(this.prevProjectionDelta.x,this.projectionDelta.x),ru(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),rc(this.projectionDelta,this.layoutCorrected,a,this.latestValues),this.treeScale.x===s&&this.treeScale.y===o&&rC(this.projectionDelta.x,this.prevProjectionDelta.x)&&rC(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",a)),nl.value&&rH.calculatedProjections++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(t=!0){if(this.options.visualElement?.scheduleRender(),t){let t=this.getStack();t&&t.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=nm(),this.projectionDelta=nm(),this.projectionDeltaWithTransform=nm()}setAnimationOrigin(t,e=!1,i){let n;let r=this.snapshot,s=r?r.latestValues:{},o={...this.latestValues},a=nm();this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!e;let l=ng(),u=(r?r.source:void 0)!==(this.layout?this.layout.source:void 0),h=this.getStack(),d=!h||h.members.length<=1,c=!!(u&&!d&&!0===this.options.crossfade&&!this.path.some(se));this.animationProgress=0;let p=i?.interpolateProjection(t);this.mixTargetDelta=e=>{let i=e/1e3,r=p?.(i);if(r?(a.x.translate=r.x,a.x.scale=tq(t.x.scale,1,i),a.x.origin=t.x.origin,a.x.originPoint=t.x.originPoint,a.y.translate=r.y,a.y.scale=tq(t.y.scale,1,i),a.y.origin=t.y.origin,a.y.originPoint=t.y.originPoint):(r7(a.x,t.x,i),r7(a.y,t.y,i)),this.setTargetDelta(a),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout){var h,m,f,g;rf(l,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),f=this.relativeTarget,g=this.relativeTargetOrigin,st(f.x,g.x,l.x,i),st(f.y,g.y,l.y,i),n&&(h=this.relativeTarget,m=n,rT(h.x,m.x)&&rT(h.y,m.y))&&(this.isProjectionDirty=!1),n||(n=ng()),rl(n,this.relativeTarget)}u&&(this.animationValues=o,function(t,e,i,n,r,s){r?(t.opacity=tq(0,i.opacity??1,rL(n)),t.opacityExit=tq(e.opacity??1,0,rj(n))):s&&(t.opacity=tq(e.opacity??1,i.opacity??1,n));for(let r=0;r<rk;r++){let s=iY[r],o=rD(e,s),a=rD(i,s);(void 0!==o||void 0!==a)&&(o||(o=0),a||(a=0),0===o||0===a||rR(o)===rR(a)?(t[s]=Math.max(tq(rV(o),rV(a),n),0),(tk.test(a)||tk.test(o))&&(t[s]+="%")):t[s]=a)}(e.rotate||i.rotate)&&(t.rotate=tq(e.rotate||0,i.rotate||0,n))}(o,s,this.latestValues,i,c,d)),r&&void 0!==r.rotate&&(this.animationValues||(this.animationValues=o),this.animationValues.pathRotation=r.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=i},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(t){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(tr(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=tn.update(()=>{rU.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=io(0)),this.motionValue.jump(0,!1),this.currentAnimation=rF(this.motionValue,[0,1e3],{...t,velocity:0,isSync:!0,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);let t=this.getStack();t&&t.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){let t=this.getLead(),{targetWithTransforms:e,target:i,layout:n,latestValues:r}=t;if(e&&i&&n){if(this!==t&&this.layout&&n&&so(this.options.animationType,this.layout.layoutBox,n.layoutBox)){i=this.target||ng();let e=rh(this.layout.layoutBox.x);i.x.min=t.target.x.min,i.x.max=i.x.min+e;let n=rh(this.layout.layoutBox.y);i.y.min=t.target.y.min,i.y.max=i.y.min+n}rl(e,i),nz(e,r),rc(this.projectionDeltaWithTransform,this.layoutCorrected,e,r)}}registerSharedNode(t,e){this.sharedNodes.has(t)||this.sharedNodes.set(t,new rW),this.sharedNodes.get(t).add(e);let i=e.options.initialPromotionConfig;e.promote({transition:i?i.transition:void 0,preserveFollowOpacity:i&&i.shouldPreserveFollowOpacity?i.shouldPreserveFollowOpacity(e):void 0})}isLead(){let t=this.getStack();return!t||t.lead===this}getLead(){let{layoutId:t}=this.options;
1return t&&this.getStack()?.lead||this}getPrevLead(){let{layoutId:t}=this.options;return t?this.getStack()?.prevLead:void 0}getStack(){let{layoutId:t}=this.options;if(t)return this.root.sharedNodes.get(t)}promote({needsReset:t,transition:e,preserveFollowOpacity:i}={}){let n=this.getStack();n&&n.promote(this,i),t&&(this.projectionDelta=void 0,this.needsReset=!0),e&&this.setOptions({transition:e})}relegate(){let t=this.getStack();return!!t&&t.relegate(this)}resetSkewAndRotation(){let{visualElement:t}=this.options;if(!t)return;let e=!1,{latestValues:i}=t;if((i.z||i.rotate||i.rotateX||i.rotateY||i.rotateZ||i.skewX||i.skewY)&&(e=!0),!e)return;let n={};i.z&&rX("z",t,n,this.animationValues);for(let e=0;e<rz.length;e++)rX(`rotate${rz[e]}`,t,n,this.animationValues),rX(`skew${rz[e]}`,t,n,this.animationValues);for(let e in t.render(),n)t.setStaticValue(e,n[e]),this.animationValues&&(this.animationValues[e]=n[e]);t.scheduleRender()}applyProjectionStyles(t,e){if(!this.instance||this.isSVG)return;if(!this.isVisible){t.visibility="hidden";return}let i=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,t.visibility="",t.opacity="",t.pointerEvents=r$(e?.pointerEvents)||"",t.transform=i?i(this.latestValues,""):"none";return}let n=this.getLead();if(!this.projectionDelta||!this.layout||!n.target){this.options.layoutId&&(t.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,t.pointerEvents=r$(e?.pointerEvents)||""),this.hasProjected&&!nF(this.latestValues)&&(t.transform=i?i({},""):"none",this.hasProjected=!1);return}t.visibility="";let r=n.animationValues||n.latestValues;this.applyTransformsToTarget();let s=function(t,e,i){let n="",r=t.x.translate/e.x,s=t.y.translate/e.y,o=i?.z||0;if((r||s||o)&&(n=`translate3d(${r}px, ${s}px, ${o}px) `),(1!==e.x||1!==e.y)&&(n+=`scale(${1/e.x}, ${1/e.y}) `),i){let{transformPerspective:t,rotate:e,pathRotation:r,rotateX:s,rotateY:o,skewX:a,skewY:l}=i;t&&(n=`perspective(${t}px) ${n}`),e&&(n+=`rotate(${e}deg) `),r&&(n+=`rotate(${r}deg) `),s&&(n+=`rotateX(${s}deg) `),o&&(n+=`rotateY(${o}deg) `),a&&(n+=`skewX(${a}deg) `),l&&(n+=`skewY(${l}deg) `)}let a=t.x.scale*e.x,l=t.y.scale*e.y;return(1!==a||1!==l)&&(n+=`scale(${a}, ${l})`),n||"none"}(this.projectionDeltaWithTransform,this.treeScale,r);i&&(s=i(r,s)),t.transform=s;let{x:o,y:a}=this.projectionDelta;for(let e in t.transformOrigin=`${100*o.origin}% ${100*a.origin}% 0`,n.animationValues?t.opacity=n===this?r.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:r.opacityExit:t.opacity=n===this?void 0!==r.opacity?r.opacity:"":void 0!==r.opacityExit?r.opacityExit:0,nJ){if(void 0===r[e])continue;let{correct:i,applyTo:o,isCSSVariable:a}=nJ[e],l="none"===s?r[e]:i(r[e],n);if(o){let e=o.length;for(let i=0;i<e;i++)t[o[i]]=l}else a?this.options.visualElement.renderState.vars[e]=l:t[e]=l}this.options.layoutId&&(t.pointerEvents=n===this?r$(e?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(t=>t.currentAnimation?.stop()),this.root.nodes.forEach(rQ),this.root.sharedNodes.clear()}}}function rK(t){t.updateLayout()}function r_(t){let e=t.resumeFrom?.snapshot||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){let{layoutBox:i,measuredBox:n}=t.layout,{animationType:r}=t.options,s=e.source!==t.layout.source;if("size"===r)rM(t=>{let n=s?e.measuredBox[t]:e.layoutBox[t],r=rh(n);n.min=i[t].min,n.max=n.min+r});else if("x"===r||"y"===r){let t="x"===r?"y":"x";ra(s?e.measuredBox[t]:e.layoutBox[t],i[t])}else so(r,e.layoutBox,i)&&rM(n=>{let r=s?e.measuredBox[n]:e.layoutBox[n],o=rh(i[n]);r.max=r.min+o,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[n].max=t.relativeTarget[n].min+o)});let o=nm();rc(o,i,e.layoutBox);let a=nm();s?rc(a,t.applyTransform(n,!0),e.measuredBox):rc(a,i,e.layoutBox);let l=!rS(o),u=!1;if(!t.resumeFrom){let n=t.getClosestProjectingParent();if(n&&!n.resumeFrom){let{snapshot:r,layout:s}=n;if(r&&s){let o=t.options.layoutAnchor||void 0,a=ng();rf(a,e.layoutBox,r.layoutBox,o);let l=ng();rf(l,i,s.layoutBox,o),rE(a,l)||(u=!0),n.options.layoutRoot&&(t.relativeTarget=l,t.relativeTargetOrigin=a,t.relativeParent=n)}}}t.notifyListeners("didUpdate",{layout:i,snapshot:e,delta:a,layoutDelta:o,hasLayoutChanged:l,hasRelativeLayoutChanged:u})}else if(t.isLead()){let{onExitComplete:e}=t.options;e&&e()}t.options.transition=void 0}function rG(t){nl.value&&rH.nodes++,t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.
1isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function rZ(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function rJ(t){t.clearSnapshot()}function rQ(t){t.clearMeasurements()}function r0(t){t.isLayoutDirty=!0,t.updateLayout()}function r1(t){t.isLayoutDirty=!1}function r2(t){t.isAnimationBlocked&&t.layout&&!t.isLayoutDirty&&(t.snapshot=t.layout,t.isLayoutDirty=!0)}function r5(t){let{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function r3(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function r9(t){t.resolveTargetDelta()}function r4(t){t.calcProjection()}function r6(t){t.resetSkewAndRotation()}function r8(t){t.removeLeadSnapshot()}function r7(t,e,i){t.translate=tq(e.translate,0,i),t.scale=tq(e.scale,1,i),t.origin=e.origin,t.originPoint=e.originPoint}function st(t,e,i,n){t.min=tq(e.min,i.min,n),t.max=tq(e.max,i.max,n)}function se(t){return t.animationValues&&void 0!==t.animationValues.opacityExit}let si={duration:.45,ease:[.4,0,.1,1]},sn=t=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),sr=sn("applewebkit/")&&!sn("chrome/")?Math.round:C;function ss(t){t.min=sr(t.min),t.max=sr(t.max)}function so(t,e,i){return"position"===t||"preserve-aspect"===t&&!(.2>=Math.abs(rA(e)-rA(i)))}function sa(t){return t!==t.root&&t.scroll?.wasRoot}let sl=rq({attachResizeListener:(t,e)=>rI(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),su={current:void 0},sh=rq({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!su.current){let t=new sl({});t.mount(window),t.setOptions({layoutScroll:!0}),su.current=t}return su.current},resetTransform:(t,e)=>{t.style.transform=void 0!==e?e:"none"},checkIsScrollRoot:t=>"fixed"===window.getComputedStyle(t).position});new WeakMap,te.reduce((t,e)=>(t[e]=t=>tr(t),t),{});let sd=(0,d.createContext)({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});function sc(t,e){if("function"==typeof t)return t(e);null!=t&&(t.current=e)}class sp extends d.Component{getSnapshotBeforeUpdate(t){let e=this.props.childRef.current;if(iK(e)&&t.isPresent&&!this.props.isPresent&&!1!==this.props.pop){let t=e.offsetParent,i=iK(t)&&t.offsetWidth||0,n=iK(t)&&t.offsetHeight||0,r=getComputedStyle(e),s=this.props.sizeRef.current;s.height=parseFloat(r.height),s.width=parseFloat(r.width),s.top=e.offsetTop,s.left=e.offsetLeft,s.right=i-s.width-s.left,s.bottom=n-s.height-s.top,s.direction=r.direction}return null}componentDidUpdate(){}render(){return this.props.children}}function sm({children:t,isPresent:e,anchorX:i,anchorY:n,root:r,pop:s}){let o=(0,d.useId)(),a=(0,d.useRef)(null),l=(0,d.useRef)({width:0,height:0,top:0,left:0,right:0,bottom:0,direction:"ltr"}),{nonce:u}=(0,d.useContext)(sd),h=function(...t){return d.useCallback(function(...t){return e=>{let i=!1,n=t.map(t=>{let n=sc(t,e);return i||"function"!=typeof n||(i=!0),n});if(i)return()=>{for(let e=0;e<n.length;e++){let i=n[e];"function"==typeof i?i():sc(t[e],null)}}}}(...t),t)}(a,!1!==s?t.props?.ref??t?.ref:void 0);return(0,d.useInsertionEffect)(()=>{let{width:t,height:h,top:d,left:c,right:p,bottom:m,direction:f}=l.current;if(e||!1===s||!a.current||!t||!h)return;let g="rtl"===f,y="left"===i?g?`right: ${p}`:`left: ${c}`:g?`left: ${c}`:`right: ${p}`,v="bottom"===n?`bottom: ${m}`:`top: ${d}`;a.current.dataset.motionPopId=o;let x=document.createElement("style");u&&(x.nonce=u);let w=r??document.head;return w.appendChild(x),x.sheet&&x.sheet.insertRule(` 2 [data-motion-pop-id="${o}"] { 3 position: absolute !important; 4 width: ${t}px !important; 5 height: ${h}px !important; 6 ${y}px !important; 7 ${v}px !important; 8 } 9 `),()=>{a.current?.removeAttribute("data-motion-pop-id"),w.contains(x)&&w.removeChild(x)}},[e]),(0,c.jsx)(sp,{isPresent:e,childRef:a,sizeRef:l,pop:s,children:!1===s?t:d.cloneElement(t,{ref:h})})}let sf=({children:t,initial:e,isPresent:i,onExitComplete:n,custom:r,presenceAffectsLayout:s,mode:o,anchorX:a,anchorY:l,root:u})=>{let h=m(sg),p=(0,d.useId)(),y=(0,d.useRef)(i),v=(0,d.useRef)(n);f(()=>{y.current=i,v.current=n});let x=!0,w=(0,d.useMemo)(()=>(x=!1,{id:p,initial:e,isPresent:i,custom:r,onExitComplete:t=>
9{for(let e of(h.set(t,!0),h.values()))if(!e)return;n&&n()},register:t=>(h.set(t,!1),()=>{h.delete(t),y.current||h.size||v.current?.()})}),[i,h,n]);return s&&x&&(w={...w}),(0,d.useMemo)(()=>{h.forEach((t,e)=>h.set(e,!1))},[i]),d.useEffect(()=>{i||h.size||!n||n()},[i]),t=(0,c.jsx)(sm,{pop:"popLayout"===o,isPresent:i,anchorX:a,anchorY:l,root:u,children:t}),(0,c.jsx)(g.Provider,{value:w,children:t})};function sg(){return new Map}function sy(t=!0){let e=(0,d.useContext)(g);if(null===e)return[!0,null];let{isPresent:i,onExitComplete:n,register:r}=e,s=(0,d.useId)();(0,d.useEffect)(()=>{if(t)return r(s)},[t]);let o=(0,d.useCallback)(()=>t&&n&&n(s),[s,n,t]);return!i&&n?[!1,o]:[!0]}let sv=t=>t.key||"";function sx(t){let e=[];return d.Children.forEach(t,t=>{(0,d.isValidElement)(t)&&e.push(t)}),e}let sw=({children:t,custom:e,initial:i=!0,onExitComplete:n,presenceAffectsLayout:r=!0,mode:s="sync",propagate:o=!1,anchorX:a="left",anchorY:l="top",root:u})=>{let[h,g]=sy(o),y=(0,d.useMemo)(()=>sx(t),[t]),v=o&&!h?[]:y.map(sv),x=(0,d.useRef)(!0),w=(0,d.useRef)(y),b=m(()=>new Map),S=(0,d.useRef)(new Set),[T,P]=(0,d.useState)(y),[E,A]=(0,d.useState)(y);f(()=>{x.current=!1,w.current=y;for(let t=0;t<E.length;t++){let e=sv(E[t]);v.includes(e)?(b.delete(e),S.current.delete(e)):!0!==b.get(e)&&b.set(e,!1)}},[E,v.length,v.join("-")]);let C=[];if(y!==T){let t=[...y];for(let e=0;e<E.length;e++){let i=E[e],n=sv(i);v.includes(n)||(t.splice(e,0,i),C.push(i))}return"wait"===s&&C.length&&(t=C),A(sx(t)),P(y),null}let{forceRender:M}=(0,d.useContext)(p);return(0,c.jsx)(c.Fragment,{children:E.map(t=>{let d=sv(t),p=(!o||!!h)&&(y===E||v.includes(d));return(0,c.jsx)(sf,{isPresent:p,initial:(!x.current||!!i)&&void 0,custom:e,presenceAffectsLayout:r,mode:s,root:u,onExitComplete:p?void 0:()=>{if(S.current.has(d)||!b.has(d))return;S.current.add(d),b.set(d,!0);let t=!0;b.forEach(e=>{e||(t=!1)}),t&&(M?.(),A(w.current),o&&g?.(),n&&n())},anchorX:a,anchorY:l,children:t},d)})})};(0,d.createContext)(null);let sb=(0,d.createContext)({strict:!1}),sS={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"]},sT=!1;function sP(){return!function(){if(sT)return;let t={};for(let e in sS)t[e]={isEnabled:t=>sS[e].some(e=>!!t[e])};nk=t,sT=!0}(),nk}let sE=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","propagate","ignoreStrict","viewport"]);function sA(t){return t.startsWith("while")||t.startsWith("drag")&&"draggable"!==t||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||sE.has(t)}let sC=t=>!sA(t);try{o=require("@emotion/is-prop-valid").default,"function"==typeof o&&(sC=t=>t.startsWith("on")?!sA(t):o(t))}catch{}let sM=(0,d.createContext)({});function sk(t){return Array.isArray(t)?t.join(" "):t}let sV=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function sR(t,e,i){for(let n in e)iT(e[n])||nQ(n,i)||(t[n]=e[n])}let sD=()=>({...sV(),attrs:{}}),sL=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function sj(t){if("string"!=typeof t||t.includes("-"));else if(sL.indexOf(t)>-1||/[A-Z]/u.test(t))return!0;return!1}let sB=t=>(e,i)=>{let n=(0,d.useContext)(sM),r=(0,d.useContext)(g),s=()=>(function({scrapeMotionValuesFromProps:t,createRenderState:e}
9,i,n,r){return{latestValues:function(t,e,i,n){let r={},s=n(t,{});for(let t in s)r[t]=r$(s[t]);let{initial:o,animate:a}=t,l=nS(t),u=nT(t);e&&u&&!l&&!1!==t.inherit&&(void 0===o&&(o=e.initial),void 0===a&&(a=e.animate));let h=!!i&&!1===i.initial,d=(h=h||!1===o)?a:o;if(d&&"boolean"!=typeof d&&!nv(d)){let e=Array.isArray(d)?d:[d];for(let i=0;i<e.length;i++){let n=ix(t,e[i]);if(n){let{transitionEnd:t,transition:e,...i}=n;for(let t in i){let e=i[t];if(Array.isArray(e)){let t=h?e.length-1:0;e=e[t]}null!==e&&(r[t]=e)}for(let e in t)r[e]=t[e]}}}return r}(i,n,r,t),renderState:e()}})(t,e,n,r);return i?s():m(s)},sF=sB({scrapeMotionValuesFromProps:n0,createRenderState:sV}),sI=sB({scrapeMotionValuesFromProps:n7,createRenderState:sD}),sO=Symbol.for("motionComponentSymbol"),sN=(0,d.createContext)({});function s$(t){return t&&"object"==typeof t&&Object.prototype.hasOwnProperty.call(t,"current")}function sW(t,{forwardMotionProps:e=!1,type:i}={},n,r){n&&function(t){let e=sP();for(let i in t)e[i]={...e[i],...t[i]};nk=e}(n);let s=i?"svg"===i:sj(t),o=s?sI:sF;function a(i,n){let a;let l={...(0,d.useContext)(sd),...i,layoutId:function({layoutId:t}){let e=(0,d.useContext)(p).id;return e&&void 0!==t?e+"-"+t:t}(i)},{isStatic:u}=l,h=function(t){let{initial:e,animate:i}=function(t,e){if(nS(t)){let{initial:e,animate:i}=t;return{initial:!1===e||nx(e)?e:void 0,animate:nx(i)?i:void 0}}return!1!==t.inherit?e:{}}(t,(0,d.useContext)(sM));return(0,d.useMemo)(()=>({initial:e,animate:i}),[sk(e),sk(i)])}(i),m=o(i,u);if(!u&&"undefined"!=typeof window){(0,d.useContext)(sb).strict;let e=function(t){let{drag:e,layout:i}=sP();if(!e&&!i)return{};let n={...e,...i};return{MeasureLayout:e?.isEnabled(t)||i?.isEnabled(t)?n.MeasureLayout:void 0,ProjectionNode:n.ProjectionNode}}(l);a=e.MeasureLayout,h.visualElement=function(t,e,i,n,r,s){let{visualElement:o}=(0,d.useContext)(sM),a=(0,d.useContext)(sb),l=(0,d.useContext)(g),u=(0,d.useContext)(sd),h=u.reducedMotion,c=u.skipAnimations,p=(0,d.useRef)(null),m=(0,d.useRef)(!1);n=n||a.renderer,!p.current&&n&&(p.current=n(t,{visualState:e,parent:o,props:i,presenceContext:l,blockInitialAnimation:!!l&&!1===l.initial,reducedMotionConfig:h,skipAnimations:c,isSVG:s}),m.current&&p.current&&(p.current.manuallyAnimateOnMount=!0));let y=p.current,v=(0,d.useContext)(sN);y&&!y.projection&&r&&("html"===y.type||"svg"===y.type)&&function(t,e,i,n){let{layoutId:r,layout:s,drag:o,dragConstraints:a,layoutScroll:l,layoutRoot:u,layoutAnchor:h,layoutCrossfade:d}=e;t.projection=new i(t.latestValues,e["data-framer-portal-id"]?void 0:function t(e){if(e)return!1!==e.options.allowProjection?e.projection:t(e.parent)}(t.parent)),t.projection.setOptions({layoutId:r,layout:s,alwaysMeasureLayout:!!o||a&&s$(a),visualElement:t,animationType:"string"==typeof s?s:"both",initialPromotionConfig:n,crossfade:d,layoutScroll:l,layoutRoot:u,layoutAnchor:h})}(p.current,i,r,v);let x=(0,d.useRef)(!1);(0,d.useInsertionEffect)(()=>{y&&x.current&&y.update(i,l)});let w=i[iA],b=(0,d.useRef)(!!w&&"undefined"!=typeof window&&!window.MotionHandoffIsComplete?.(w)&&window.MotionHasOptimisedAnimation?.(w));return f(()=>{m.current=!0,y&&(x.current=!0,window.MotionIsMounted=!0,y.updateFeatures(),y.scheduleRenderMicrotask(),b.current&&y.animationState&&y.animationState.animateChanges())}),(0,d.useEffect)(()=>{y&&(!b.current&&y.animationState&&y.animationState.animateChanges(),b.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(w)}),b.current=!1),y.enteringChildren=void 0)}),y}(t,m,l,r,e.ProjectionNode,s)}return(0,c.jsxs)(sM.Provider,{value:h,children:[a&&h.visualElement?(0,c.jsx)(a,{visualElement:h.visualElement,...l}):null,function(t,e,i,{latestValues:n},r,s=!1,o){let a=(o??sj(t)?function(t,e,i,n){let r=(0,d.useMemo)(()=>{let i=sD();return n4(i,e,n8(n),t.transformTemplate,t.style),{...i.attrs,style:{...i.style}}},[e]);if(t.style){let e={};sR(e,t.style,t),r.style={...e,...r.style}}return r}:function(t,e){let i={},n=function(t,e){let i=t.style||{},n={};return sR(n,i,t),Object.assign(n,function({transformTemplate:t},e){return(0,d.useMemo)(()=>{let i=sV();return nK(i,e,t),Object.assign({},i.vars,i.style)},[e])}(t,e)),n}(t,e);return t.drag&&!1!==t.dragListener&&(i.draggable=!1,n.userSelect=n.WebkitUserSelect=n.WebkitTouchCallout="none",n.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=n,i}
9)(e,n,r,t),l=function(t,e,i){let n={};for(let r in t)("values"!==r||"object"!=typeof t.values)&&!iT(t[r])&&(sC(r)||!0===i&&sA(r)||!e&&!sA(r)||t.draggable&&r.startsWith("onDrag"))&&(n[r]=t[r]);return n}(e,"string"==typeof t,s),u=t!==d.Fragment?{...l,...a,ref:i}:{},{children:h}=e,c=(0,d.useMemo)(()=>iT(h)?h.get():h,[h]);return(0,d.createElement)(t,{...u,children:c})}(t,i,function(t,e,i){let n=(0,d.useRef)(i);(0,d.useInsertionEffect)(()=>{n.current=i});let r=(0,d.useRef)(null);return(0,d.useCallback)(i=>{i&&t.onMount?.(i),e&&(i?e.mount(i):e.unmount());let s=n.current;if("function"==typeof s){if(i){let t=s(i);"function"==typeof t&&(r.current=t)}else r.current?(r.current(),r.current=null):s(i)}else s&&(s.current=i)},[e])}(m,h.visualElement,n),m,u,e,s)]})}a.displayName=`motion.${"string"==typeof t?t:`create(${t.displayName??t.name??""})`}`;let l=(0,d.forwardRef)(a);return l[sO]=t,l}class sU extends nD{constructor(t){super(t),t.animationState||(t.animationState=function(t){let e=e=>Promise.all(e.map(({animation:e,options:i})=>(function(t,e,i={}){let n;if(t.notify("AnimationStart",e),Array.isArray(e))n=Promise.all(e.map(e=>iM(t,e,i)));else if("string"==typeof e)n=iM(t,e,i);else{let r="function"==typeof e?iw(t,e,i.custom):e;n=Promise.all(iC(t,r,i))}return n.then(()=>{t.notify("AnimationComplete",e)})})(t,e,i))),i=ro(),n=!0,r=!1,s=e=>(i,n)=>{let r=iw(t,n,"exit"===e?t.presenceContext?.custom:void 0);if(r){let{transition:t,transitionEnd:e,...n}=r;i={...i,...n,...e}}return i};function o(o){let{props:a}=t,l=function t(e){if(!e)return;if(!e.isControllingVariants){let i=e.parent&&t(e.parent)||{};return void 0!==e.props.initial&&(i.initial=e.props.initial),i}let i={};for(let t=0;t<re;t++){let n=nb[t],r=e.props[n];(nx(r)||!1===r)&&(i[n]=r)}return i}(t.parent)||{},u=[],h=new Set,d={},c=1/0;for(let e=0;e<rr;e++){var p;let m=rn[e],f=i[m],g=void 0!==a[m]?a[m]:l[m],y=nx(g),v=m===o?f.isActive:null;!1===v&&(c=e);let x=g===l[m]&&g!==a[m]&&y;if(x&&(n||r)&&t.manuallyAnimateOnMount&&(x=!1),f.protectedKeys={...d},!f.isActive&&null===v||!g&&!f.prevProp||nv(g)||"boolean"==typeof g)continue;if("exit"===m&&f.isActive&&!0!==v){f.prevResolvedValues&&(d={...d,...f.prevResolvedValues});continue}let w=(p=f.prevProp,"string"==typeof g?g!==p:!!Array.isArray(g)&&!ri(g,p)),b=w||m===o&&f.isActive&&!x&&y||e>c&&y,S=!1,T=Array.isArray(g)?g:[g],P=T.reduce(s(m),{});!1===v&&(P={});let{prevResolvedValues:E={}}=f,A={...E,...P},C=e=>{b=!0,h.has(e)&&(S=!0,h.delete(e)),f.needsAnimating[e]=!0;let i=t.getValue(e);i&&(i.liveStyle=!1)};for(let t in A){let e=P[t],i=E[t];if(!d.hasOwnProperty(t))(iS(e)&&iS(i)?!ri(e,i)||w:e!==i)?null!=e?C(t):h.add(t):void 0!==e&&h.has(t)?C(t):f.protectedKeys[t]=!0}f.prevProp=g,f.prevResolvedValues=P,f.isActive&&(d={...d,...P}),(n||r)&&t.blockInitialAnimation&&(b=!1);let M=x&&w,k=!M||S;b&&k&&u.push(...T.map(e=>{let i={type:m};if("string"==typeof e&&(n||r)&&!M&&t.manuallyAnimateOnMount&&t.parent){let{parent:n}=t,r=iw(n,e);if(n.enteringChildren&&r){let{delayChildren:e}=r.transition||{};i.delay=ie(n.enteringChildren,t,e)}}return{animation:e,options:i}}))}if(h.size){let e={};if("boolean"!=typeof a.initial){let i=iw(t,Array.isArray(a.initial)?a.initial[0]:a.initial);i&&i.transition&&(e.transition=i.transition)}h.forEach(i=>{let n=t.getBaseTarget(i),r=t.getValue(i);r&&(r.liveStyle=!0),e[i]=n??null}),u.push({animation:e})}let m=!!u.length;return n&&(!1===a.initial||a.initial===a.animate)&&!t.manuallyAnimateOnMount&&(m=!1),n=!1,r=!1,m?e(u):Promise.resolve()}return{animateChanges:o,setActive:function(e,n){if(i[e].isActive===n)return Promise.resolve();t.variantChildren?.forEach(t=>t.animationState?.setActive(e,n)),i[e].isActive=n;let r=o(e);for(let t in i)i[t].protectedKeys={};return r},setAnimateFunction:function(i){e=i(t)},getState:()=>i,reset:()=>{i=ro(),r=!0}}}(t))}updateAnimationControlsSubscription(){let{animate:t}=this.node.getProps();nv(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){let{animate:t}=this.node.getProps(),{animate:e}=this.node.prevProps||{};t!==e&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let sH=0;class sz extends nD{constructor(){super(...arguments),this.id=sH++,this.isExitComplete=!1}update(){if(!this.node.presenceContext)return;let{isPresent:t,onExitComplete:e}=this.node.presenceContext,{isPresent:i}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===i)return;if(t&&!1===i){if(this.isExitComplete){let{initial:t,custom:e}=this.node.getProps();if("string"==typeof t||"object"==typeof t&&null!==t&&!Array.isArray(t)){let i=iw(this.node,t,e);if(i){let{transition:t,transitionEnd:e,...n}=i;for(let t in n)this.node.getValue(t)?.jump(n[t])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);this.isExitComplete=!1;return}let n=this.node.animationState.setActive("exit",!t);e&&!t&&n.then(()=>
9{this.isExitComplete=!0,e(this.id)})}mount(){let{register:t,onExitComplete:e}=this.node.presenceContext||{};e&&e(this.id),t&&(this.unmount=t(this.id))}unmount(){}}let sY={animation:{Feature:sU},exit:{Feature:sz}};function sX(t){return{point:{x:t.pageX,y:t.pageY}}}let sq=t=>e=>i0(e)&&t(e,sX(e));function sK(t,e,i,n){return rI(t,e,sq(i),n)}let s_=({current:t})=>t?t.ownerDocument.defaultView:null,sG=(t,e)=>Math.abs(t-e),sZ=new Set(["auto","scroll"]);class sJ{constructor(t,e,{transformPagePoint:i,contextWindow:n=window,dragSnapToOrigin:r=!1,distanceThreshold:s=3,element:o}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=t=>{this.handleScroll(t.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{var t,e;if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=sQ(this.lastRawMoveEventInfo,this.transformPagePoint));let i=s1(this.lastMoveEventInfo,this.history),n=null!==this.startEvent,r=(t=i.offset,e={x:0,y:0},Math.sqrt(sG(t.x,e.x)**2+sG(t.y,e.y)**2)>=this.distanceThreshold);if(!n&&!r)return;let{point:s}=i,{timestamp:o}=ts;this.history.push({...s,timestamp:o});let{onStart:a,onMove:l}=this.handlers;n||(a&&a(this.lastMoveEvent,i),this.startEvent=this.lastMoveEvent),l&&l(this.lastMoveEvent,i)},this.handlePointerMove=(t,e)=>{this.lastMoveEvent=t,this.lastRawMoveEventInfo=e,this.lastMoveEventInfo=sQ(e,this.transformPagePoint),tn.update(this.updatePoint,!0)},this.handlePointerUp=(t,e)=>{this.end();let{onEnd:i,onSessionEnd:n,resumeAnimation:r}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&r&&r(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let s=s1("pointercancel"===t.type?this.lastMoveEventInfo:sQ(e,this.transformPagePoint),this.history);this.startEvent&&i&&i(t,s),n&&n(t,s)},!i0(t))return;this.dragSnapToOrigin=r,this.handlers=e,this.transformPagePoint=i,this.distanceThreshold=s,this.contextWindow=n||window;let a=sQ(sX(t),this.transformPagePoint),{point:l}=a,{timestamp:u}=ts;this.history=[{...l,timestamp:u}];let{onSessionStart:h}=e;h&&h(t,s1(a,this.history));let d={passive:!0,capture:!0};this.removeListeners=M(sK(this.contextWindow,"pointermove",this.handlePointerMove,d),sK(this.contextWindow,"pointerup",this.handlePointerUp,d),sK(this.contextWindow,"pointercancel",this.handlePointerUp,d)),o&&this.startScrollTracking(o)}startScrollTracking(t){let e=t.parentElement;for(;e;){let t=getComputedStyle(e);(sZ.has(t.overflowX)||sZ.has(t.overflowY))&&this.scrollPositions.set(e,{x:e.scrollLeft,y:e.scrollTop}),e=e.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(t){let e=this.scrollPositions.get(t);if(!e)return;let i=t===window,n=i?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},r={x:n.x-e.x,y:n.y-e.y};(0!==r.x||0!==r.y)&&(i?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=r.x,this.lastMoveEventInfo.point.y+=r.y):this.history.length>0&&(this.history[0].x-=r.x,this.history[0].y-=r.y),this.scrollPositions.set(t,n),tn.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),tr(this.updatePoint)}}function sQ(t,e){return e?{point:e(t.point)}:t}function s0(t,e){return{x:t.x-e.x,y:t.y-e.y}}function s1({point:t},e){return{point:t,delta:s0(t,s2(e)),offset:s0(t,e[0]),velocity:function(t,e){if(t.length<2)return{x:0,y:0};let i=t.length-1,n=null,r=s2(t);for(;i>=0&&(n=t[i],!(r.timestamp-n.timestamp>R(.1)));)i--;if(!n)return{x:0,y:0};n===t[0]&&t.length>2&&r.timestamp-n.timestamp>
92*R(.1)&&(n=t[1]);let s=D(r.timestamp-n.timestamp);if(0===s)return{x:0,y:0};let o={x:(r.x-n.x)/s,y:(r.y-n.y)/s};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}(e,.1)}}function s2(t){return t[t.length-1]}function s5(t,e,i){return{min:void 0!==e?t.min+e:void 0,max:void 0!==i?t.max+i-(t.max-t.min):void 0}}function s3(t,e){let i=e.min-t.min,n=e.max-t.max;return e.max-e.min<t.max-t.min&&([i,n]=[n,i]),{min:i,max:n}}function s9(t,e,i){return{min:s4(t,e),max:s4(t,i)}}function s4(t,e){return"number"==typeof t?t:t[e]||0}let s6=new WeakMap;class s8{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=ng(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:e=!1,distanceThreshold:i}={}){let{presenceContext:n}=this.visualElement;if(n&&!1===n.isPresent)return;let{dragSnapToOrigin:r}=this.getProps();this.panSession=new sJ(t,{onSessionStart:t=>{e&&this.snapToCursor(sX(t).point),this.stopAnimation()},onStart:(t,e)=>{let{drag:i,dragPropagation:n,onDragStart:r}=this.getProps();if(i&&!n&&(this.openDragLock&&this.openDragLock(),this.openDragLock="x"===i||"y"===i?iZ[i]?null:(iZ[i]=!0,()=>{iZ[i]=!1}):iZ.x||iZ.y?null:(iZ.x=iZ.y=!0,()=>{iZ.x=iZ.y=!1}),!this.openDragLock))return;this.latestPointerEvent=t,this.latestPanInfo=e,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),rM(t=>{let e=this.getAxisMotionValue(t).get()||0;if(tk.test(e)){let{projection:i}=this.visualElement;if(i&&i.layout){let n=i.layout.layoutBox[t];if(n){let t=rh(n);e=parseFloat(e)/100*t}}}this.originPoint[t]=e}),r&&tn.update(()=>r(t,e),!1,!0),iP(this.visualElement,"transform");let{animationState:s}=this.visualElement;s&&s.setActive("whileDrag",!0)},onMove:(t,e)=>{this.latestPointerEvent=t,this.latestPanInfo=e;let{dragPropagation:i,dragDirectionLock:n,onDirectionLock:r,onDrag:s}=this.getProps();if(!i&&!this.openDragLock)return;let{offset:o}=e;if(n&&null===this.currentDirection){this.currentDirection=function(t,e=10){let i=null;return Math.abs(t.y)>e?i="y":Math.abs(t.x)>e&&(i="x"),i}(o),null!==this.currentDirection&&r&&r(this.currentDirection);return}this.updateAxis("x",e.point,o),this.updateAxis("y",e.point,o),this.visualElement.render(),s&&tn.update(()=>s(t,e),!1,!0)},onSessionEnd:(t,e)=>{this.latestPointerEvent=t,this.latestPanInfo=e,this.stop(t,e),this.latestPointerEvent=null,this.latestPanInfo=null},resumeAnimation:()=>{let{dragSnapToOrigin:t}=this.getProps();(t||this.constraints)&&this.startAnimation({x:0,y:0})}},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:r,distanceThreshold:i,contextWindow:s_(this.visualElement),element:this.visualElement.current})}stop(t,e){let i=t||this.latestPointerEvent,n=e||this.latestPanInfo,r=this.isDragging;if(this.cancel(),!r||!n||!i)return;let{velocity:s}=n;this.startAnimation(s);let{onDragEnd:o}=this.getProps();o&&tn.postRender(()=>o(i,n))}cancel(){this.isDragging=!1;let{projection:t,animationState:e}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();let{dragPropagation:i}=this.getProps();!i&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),e&&e.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(t,e,i){let{drag:n}=this.getProps();if(!i||!ot(t,n,this.currentDirection))return;let r=this.getAxisMotionValue(t),s=this.originPoint[t]+i[t];this.constraints&&this.constraints[t]&&(s=function(t,{min:e,max:i},n){return void 0!==e&&t<e?t=n?tq(e,t,n.min):Math.max(t,e):void 0!==i&&t>i&&(t=n?tq(i,t,n.max):Math.min(t,i)),t}(s,this.constraints[t],this.elastic[t])),r.set(s)}resolveConstraints(){let{dragConstraints:t,dragElastic:e}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,n=this.constraints;t&&s$(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&i?this.constraints=function(t,{top:e,left:i,bottom:n,right:r}){return{x:s5(t.x,i,r),y:s5(t.y,e,n)}}(i.layoutBox,t):this.constraints=!1,this.elastic=function(t=.35){return!1===t?t=0:!0===t&&(t=.35),{x:s9(t,"left","right"),y:s9(t,"top","bottom")}}(e),n!==this.constraints&&!s$(t)&&i&&this.constraints&&!this.hasMutatedConstraints&&rM(t=>{!1!==this.constraints&&this.getAxisMotionValue(t)&&(this.constraints[t]=function(t,e){let i={};return void 0!==e.min&&(i.min=e.min-t.min),void 0!==e.max&&(i.max=e.max-t.min),i}(i.layoutBox[t],this.constraints[t]))})}resolveRefConstraints(){var t;let{dragConstraints:e,onMeasureDragConstraints:i}=this.getProps();if(!e||!s$(e))return!1;let n=e.current;b(null!==n,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");let{projection:r}=this.visualElement;if(!r||!r.layout)return!1;r.root&&(r.root.scroll=void 0,r.root.updateScroll());
9let s=function(t,e,i){let n=nY(t,i),{scroll:r}=e;return r&&(nW(n.x,r.offset.x),nW(n.y,r.offset.y)),n}(n,r.root,this.visualElement.getTransformPagePoint()),o={x:s3((t=r.layout.layoutBox).x,s.x),y:s3(t.y,s.y)};if(i){let t=i(function({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}(o));this.hasMutatedConstraints=!!t,t&&(o=nL(t))}return o}startAnimation(t){let{drag:e,dragMomentum:i,dragElastic:n,dragTransition:r,dragSnapToOrigin:s,onDragTransitionEnd:o}=this.getProps(),a=this.constraints||{};return Promise.all(rM(o=>{if(!ot(o,e,this.currentDirection))return;let l=a&&a[o]||{};(!0===s||s===o)&&(l={min:0,max:0});let u={type:"inertia",velocity:i?t[o]:0,bounceStiffness:n?200:1e6,bounceDamping:n?40:1e7,timeConstant:750,restDelta:1,restSpeed:10,...r,...l};return this.startAxisValueAnimation(o,u)})).then(o)}startAxisValueAnimation(t,e){let i=this.getAxisMotionValue(t);return iP(this.visualElement,t),i.start(ig(t,i,0,e,this.visualElement,!1))}stopAnimation(){rM(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){let e=`_drag${t.toUpperCase()}`;return this.visualElement.getProps()[e]||this.visualElement.getValue(t,this.visualElement.latestValues[t]??0)}snapToCursor(t){rM(e=>{let{drag:i}=this.getProps();if(!ot(e,i,this.currentDirection))return;let{projection:n}=this.visualElement,r=this.getAxisMotionValue(e);if(n&&n.layout){let{min:i,max:s}=n.layout.layoutBox[e],o=r.get()||0;r.set(t[e]-tq(i,s,.5)+o)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:t,dragConstraints:e}=this.getProps(),{projection:i}=this.visualElement;if(!s$(e)||!i||!this.constraints)return;this.stopAnimation();let n={x:0,y:0};rM(t=>{let e=this.getAxisMotionValue(t);if(e&&!1!==this.constraints){let i=e.get();n[t]=function(t,e){let i=.5,n=rh(t),r=rh(e);return r>n?i=k(e.min,e.max-n,t.min):n>r&&(i=k(t.min,t.max-r,e.min)),x(0,1,i)}({min:i,max:i},this.constraints[t])}});let{transformTemplate:r}=this.visualElement.getProps();this.visualElement.current.style.transform=r?r({},""):"none",i.root&&i.root.updateScroll(),i.updateLayout(),this.constraints=!1,this.resolveConstraints(),rM(e=>{if(!ot(e,t,null))return;let i=this.getAxisMotionValue(e),{min:r,max:s}=this.constraints[e];i.set(tq(r,s,n[e]))}),this.visualElement.render()}addListeners(){let t;if(!this.visualElement.current)return;s6.set(this.visualElement,this);let e=this.visualElement.current,i=sK(e,"pointerdown",t=>{let{drag:i,dragListener:n=!0}=this.getProps(),r=t.target,s=r!==e&&(i2.has(r.tagName)||!0===r.isContentEditable);i&&n&&!s&&this.start(t)}),n=()=>{let{dragConstraints:i}=this.getProps();s$(i)&&i.current&&(this.constraints=this.resolveRefConstraints(),t||(t=function(t,e,i){let n=na(t,s7(i)),r=na(e,s7(i));return()=>{n(),r()}}(e,i.current,()=>this.scalePositionWithinConstraints())))},{projection:r}=this.visualElement,s=r.addEventListener("measure",n);r&&!r.layout&&(r.root&&r.root.updateScroll(),r.updateLayout()),tn.read(n);let o=rI(window,"resize",()=>this.scalePositionWithinConstraints()),a=r.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e})=>{this.isDragging&&e&&(rM(e=>{let i=this.getAxisMotionValue(e);i&&(this.originPoint[e]+=t[e].translate,i.set(i.get()+t[e].translate))}),this.visualElement.render())});return()=>{o(),i(),s(),a&&a(),t&&t()}}getProps(){let t=this.visualElement.getProps(),{drag:e=!1,dragDirectionLock:i=!1,dragPropagation:n=!1,dragConstraints:r=!1,dragElastic:s=.35,dragMomentum:o=!0}=t;return{...t,drag:e,dragDirectionLock:i,dragPropagation:n,dragConstraints:r,dragElastic:s,dragMomentum:o}}}function s7(t){let e=!0;return()=>{if(e){e=!1;return}t()}}function ot(t,e,i){return(!0===e||e===t)&&(null===i||i===t)}class oe extends nD{constructor(t){super(t),this.removeGroupControls=C,this.removeListeners=C,this.controls=new s8(t)}mount(){let{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||C}update(){let{dragControls:t}=this.node.getProps(),{dragControls:e}=this.node.prevProps||{};t!==e&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}let oi=t=>(e,i)=>{t&&tn.update(()=>t(e,i),!1,!0)};class on extends nD{constructor(){super(...arguments),this.removePointerDownListener=C}onPointerDown(t){this.session=new sJ(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:s_(this.node)})}createPanHandlers(){let{onPanSessionStart:t,onPanStart:e,onPan:i,onPanEnd:n}=this.node.getProps();
9return{onSessionStart:oi(t),onStart:oi(e),onMove:oi(i),onEnd:(t,e)=>{delete this.session,n&&tn.postRender(()=>n(t,e))}}}mount(){this.removePointerDownListener=sK(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let or=!1;class os extends d.Component{componentDidMount(){let{visualElement:t,layoutGroup:e,switchLayoutGroup:i,layoutId:n}=this.props,{projection:r}=t;r&&(e.group&&e.group.add(r),i&&i.register&&n&&i.register(r),or&&r.root.didUpdate(),r.addEventListener("animationComplete",()=>{this.safeToRemove()}),r.setOptions({...r.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),rU.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){let{layoutDependency:e,visualElement:i,drag:n,isPresent:r}=this.props,{projection:s}=i;return s&&(s.isPresent=r,t.layoutDependency!==e&&s.setOptions({...s.options,layoutDependency:e}),or=!0,n||t.layoutDependency!==e||void 0===e||t.isPresent!==r?s.willUpdate():this.safeToRemove(),t.isPresent===r||(r?s.promote():s.relegate()||tn.postRender(()=>{let t=s.getStack();t&&t.members.length||this.safeToRemove()}))),null}componentDidUpdate(){let{visualElement:t,layoutAnchor:e}=this.props,{projection:i}=t;i&&(i.options.layoutAnchor=e,i.root.didUpdate(),i_.postRender(()=>{!i.currentAnimation&&i.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:t,layoutGroup:e,switchLayoutGroup:i}=this.props,{projection:n}=t;or=!0,n&&(n.scheduleCheckAfterUnmount(),e&&e.group&&e.group.remove(n),i&&i.deregister&&i.deregister(n))}safeToRemove(){let{safeToRemove:t}=this.props;t&&t()}render(){return null}}function oo(t){let[e,i]=sy(),n=(0,d.useContext)(p);return(0,c.jsx)(os,{...t,layoutGroup:n,switchLayoutGroup:(0,d.useContext)(sN),isPresent:e,safeToRemove:i})}function oa(t,e,i){let{props:n}=t;t.animationState&&n.whileHover&&t.animationState.setActive("whileHover","Start"===i);let r=n["onHover"+i];r&&tn.postRender(()=>r(e,sX(e)))}class ol extends nD{mount(){let{current:t}=this.node;t&&(this.unmount=function(t,e,i={}){let[n,r,s]=iJ(t,i);return n.forEach(t=>{let i,n=!1,s=!1,o=()=>{t.removeEventListener("pointerleave",u)},a=t=>{i&&(i(t),i=void 0),o()},l=t=>{n=!1,window.removeEventListener("pointerup",l),window.removeEventListener("pointercancel",l),s&&(s=!1,a(t))},u=t=>{if("touch"!==t.pointerType){if(n){s=!0;return}a(t)}};t.addEventListener("pointerenter",n=>{if("touch"===n.pointerType||iZ.x||iZ.y)return;s=!1;let o=e(t,n);"function"==typeof o&&(i=o,t.addEventListener("pointerleave",u,r))},r),t.addEventListener("pointerdown",()=>{n=!0,window.addEventListener("pointerup",l,r),window.addEventListener("pointercancel",l,r)},r)}),s}(t,(t,e)=>(oa(this.node,e,"Start"),t=>oa(this.node,t,"End"))))}unmount(){}}class ou extends nD{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=M(rI(this.node.current,"focus",()=>this.onFocus()),rI(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function oh(t,e,i){let{props:n}=t;if(t.current instanceof HTMLButtonElement&&t.current.disabled)return;t.animationState&&n.whileTap&&t.animationState.setActive("whileTap","Start"===i);let r=n["onTap"+("End"===i?"":i)];r&&tn.postRender(()=>r(e,sX(e)))}class od extends nD{mount(){let{current:t}=this.node;if(!t)return;let{globalTapTarget:e,propagate:i}=this.node.props;this.unmount=function(t,e,i={}){let[n,r,s]=iJ(t,i),o=t=>{let n=t.currentTarget;if(!i6(t)||i8.has(t))return;i5.add(n),i.stopPropagation&&i8.add(t);let s=e(n,t),o={...r,capture:!0},a=(t,e)=>{window.removeEventListener("pointerup",l,o),window.removeEventListener("pointercancel",u,o),i5.has(n)&&i5.delete(n),i6(t)&&"function"==typeof s&&s(t,{success:e})},l=t=>{a(t,n===window||n===document||i.useGlobalTarget||iQ(n,t.target))},u=t=>{a(t,!1)};window.addEventListener("pointerup",l,o),window.addEventListener("pointercancel",u,o)};
9return n.forEach(t=>{(i.useGlobalTarget?window:t).addEventListener("pointerdown",o,r),iK(t)&&(t.addEventListener("focus",t=>i4(t,r)),i1.has(t.tagName)||!0===t.isContentEditable||t.hasAttribute("tabindex")||(t.tabIndex=0))}),s}(t,(t,e)=>(oh(this.node,e,"Start"),(t,{success:e})=>oh(this.node,t,e?"End":"Cancel")),{useGlobalTarget:e,stopPropagation:i?.tap===!1})}unmount(){}}let oc=new WeakMap,op=new WeakMap,om=t=>{let e=oc.get(t.target);e&&e(t)},of=t=>{t.forEach(om)},og={some:0,all:1};class oy extends nD{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.stopObserver?.();let{viewport:t={}}=this.node.getProps(),{root:e,margin:i,amount:n="some",once:r}=t,s={root:e?e.current:void 0,rootMargin:i,threshold:"number"==typeof n?n:og[n]};this.stopObserver=function(t,e,i){let n=function({root:t,...e}){let i=t||document;op.has(i)||op.set(i,{});let n=op.get(i),r=JSON.stringify(e);return n[r]||(n[r]=new IntersectionObserver(of,{root:t,...e})),n[r]}(e);return oc.set(t,i),n.observe(t),()=>{oc.delete(t),n.unobserve(t)}}(this.node.current,s,t=>{let{isIntersecting:e}=t;if(this.isInView===e||(this.isInView=e,r&&!e&&this.hasEnteredView))return;e&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",e);let{onViewportEnter:i,onViewportLeave:n}=this.node.getProps(),s=e?i:n;s&&s(t)})}mount(){this.startObserver()}update(){if("undefined"==typeof IntersectionObserver)return;let{props:t,prevProps:e}=this.node;["amount","margin","root"].some(function({viewport:t={}},{viewport:e={}}={}){return i=>t[i]!==e[i]}(t,e))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}}let ov=function(t,e){if("undefined"==typeof Proxy)return sW;let i=new Map,n=(i,n)=>sW(i,n,t,e);return new Proxy((t,e)=>n(t,e),{get:(r,s)=>"create"===s?n:(i.has(s)||i.set(s,sW(s,void 0,t,e)),i.get(s))})}({...sY,inView:{Feature:oy},tap:{Feature:od},focus:{Feature:ou},hover:{Feature:ol},pan:{Feature:on},drag:{Feature:oe,ProjectionNode:sh,MeasureLayout:oo},layout:{ProjectionNode:sh,MeasureLayout:oo}},(t,e)=>e.isSVG??sj(t)?new rt(e):new n1(e,{allowProjection:t!==d.Fragment}));function ox(t){let e=m(()=>io(t)),{isStatic:i}=(0,d.useContext)(sd);if(i){let[,i]=(0,d.useState)(t);(0,d.useEffect)(()=>e.on("change",i),[])}return e}function ow(t,e){let i=ox(e()),n=()=>i.set(e());return n(),f(()=>{let e=()=>tn.preRender(n,!1,!0),i=t.map(t=>t.on("change",e));return()=>{i.forEach(t=>t()),tr(n)}}),i}function ob(t,e,i,n){if("function"==typeof t)return function(t){ir.current=[],t();let e=ow(ir.current,t);return ir.current=void 0,e}(t);if(void 0!==i&&!Array.isArray(i)&&"function"!=typeof e)return function(t,e,i,n){let r=m(()=>Object.keys(i)),s=m(()=>({}));for(let o of r)s[o]=ob(t,e,i[o],n);return s}(t,e,i,n);let r="function"==typeof e?e:nh(e,i,n),s=Array.isArray(t)?oS(t,r):oS([t],([t])=>r(t)),o=Array.isArray(t)?void 0:t.accelerate;return o&&!o.isTransformed&&"function"!=typeof e&&Array.isArray(i)&&n?.clamp!==!1&&(s.accelerate={...o,times:e,keyframes:i,isTransformed:!0,...n?.ease?{ease:n.ease}:{}}),s}function oS(t,e){let i=m(()=>[]);return ow(t,()=>{i.length=0;let n=t.length;for(let e=0;e<n;e++)i[e]=t[e].get();return e(i)})}function oT(t){return"object"==typeof t&&!Array.isArray(t)}function oP(t,e,i,n){return null==t?[]:"string"==typeof t&&oT(e)?iX(t,i,n):t instanceof NodeList?Array.from(t):Array.isArray(t)?t.filter(t=>null!=t):[t]}function oE(t,e,i,n){return"number"==typeof e?e:e.startsWith("-")||e.startsWith("+")?Math.max(0,t+parseFloat(e)):"<"===e?i:e.startsWith("<")?Math.max(0,i+parseFloat(e.slice(1))):n.get(e)??t}function oA(t,e){return t.at!==e.at?t.at-e.at:null===t.value?1:null===e.value?-1:0}function oC(t,e){return e.has(t)||e.set(t,{}),e.get(t)}function oM(t,e){return e[t]||(e[t]=[]),e[t]}({...sY}),new WeakMap,new WeakMap,new WeakMap,new WeakMap,new WeakMap;let ok=t=>"number"==typeof t,oV=t=>t.every(ok);function oR(t){let e={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},i=i7(t)&&!nu(t)?new rt(e):new n1(e);i.mount(t),ny.set(t,i)}function oD(t){let e=new n2({presenceContext:null,props:{}
9,visualState:{renderState:{output:{}},latestValues:{}}});e.mount(t),ny.set(t,e)}function oL(t,e,i,n){let r=[];if(iT(t)||"number"==typeof t||"string"==typeof t&&!oT(e))r.push(rF(t,oT(e)&&e.default||e,i&&i.default||i));else{if(null==t)return r;let s=oP(t,e,n),o=s.length;b(!!o,"No valid elements provided.","no-valid-elements");for(let t=0;t<o;t++){let n=s[t],a=n instanceof Element?oR:oD;ny.has(n)||a(n);let l=ny.get(n),u={...i};"delay"in u&&"function"==typeof u.delay&&(u.delay=u.delay(t,o)),r.push(...iC(l,{...e,transition:u},{}))}}return r}let oj=function(t={}){let{scope:e,reduceMotion:i,skipAnimations:n}=t;return function(t,r,s){let o,a=[],l={};if(void 0!==i&&(l.reduceMotion=i),void 0!==n&&(l.skipAnimations=n),Array.isArray(t)&&t.some(Array.isArray)){let{onComplete:i,...n}=r||{};"function"==typeof i&&(o=i),a=function(t,e,i){let n=[];return(function(t,{defaultTransition:e={},...i}={},n,r){let s=e.duration||.3,o=new Map,a=new Map,l={},u=new Map,h=0,d=0,c=0;for(let i=0;i<t.length;i++){let o=t[i];if("string"==typeof o){u.set(o,d);continue}if(!Array.isArray(o)){u.set(o.name,oE(d,o.at,h,u));continue}let[p,m,f={}]=o;void 0!==f.at&&(d=oE(d,f.at,h,u));let g=0,y=(t,i,n,o=0,a=0)=>{let l=Array.isArray(t)?t:[t],{delay:u=0,times:h=eh(l),type:p=e.type||"keyframes",repeat:m,repeatType:f,repeatDelay:y=0,...x}=i,{ease:b=e.ease||"easeOut",duration:S}=i,T="function"==typeof u?u(o,a):u,P=l.length,E=eZ(p)?p:r?.[p||"keyframes"];if(P<=2&&E){let t=100;2===P&&oV(l)&&(t=Math.abs(l[1]-l[0]));let i={...e,...x};void 0!==S&&(i.duration=R(S));let n=t7(i,t,E);b=n.ease,S=n.duration}S??(S=s);let A=d+T;1===h.length&&0===h[0]&&(h[1]=1);let C=h.length-l.length;if(C>0&&eu(h,C),1===l.length&&l.unshift(null),m&&w(m<20,`Sequence segments can't repeat ${m} times â ignoring repeat option. Use a value below 20 or apply repeat at the sequence level instead.`),m&&m<20){let t=S>0?y/S:0;S=S*(m+1)+y*m;let e=[...l],i=[...h],n=[...b=Array.isArray(b)?[...b]:[b]],r="reverse"===f||"mirror"===f,s=e,o=n;r&&(s=[...e].reverse(),"reverse"===f&&(o=[...n].reverse().map(t=>"function"==typeof t?O(t):t)));for(let a=0;a<m;a++){let u=r&&a%2==0,d=u?s:e,c=u?o:n,p=(a+1)*(1+t);t>0&&(l.push(l[l.length-1]),h.push(p),b.push("linear")),l.push(...d);for(let t=0;t<d.length;t++)h.push(i[t]+p),b.push(0===t?"linear":G(c,t-1))}!function(t,e,i=0){let n=e+1+e*i;for(let e=0;e<t.length;e++)t[e]=t[e]/n}(h,m,t)}let M=A+S;(function(t,e,i,n,r,s){!function(t,e,i){for(let n=0;n<t.length;n++){let r=t[n];r.at>e&&r.at<i&&(v(t,r),n--)}}(t,r,s);for(let o=0;o<e.length;o++)t.push({value:e[o],at:tq(r,s,n[o]),easing:G(i,o)})})(n,l,b,h,A,M),g=Math.max(T+S,g),c=Math.max(M,c)};if(iT(p))y(m,f,oM("default",oC(p,a)));else{let t=oP(p,m,n,l),e=t.length;for(let i=0;i<e;i++){let n=oC(t[i],a);for(let t in m)y(m[t],f&&f[t]?{...f,...f[t]}:{...f},oM(t,n),i,e)}}h=d,d+=g}return a.forEach((t,n)=>{for(let r in t){let s=t[r];s.sort(oA);let a=[],l=[],u=[];for(let t=0;t<s.length;t++){let{at:e,value:i,easing:n}=s[t];a.push(i),l.push(k(0,c,e)),u.push(n||"easeOut")}0!==l[0]&&(l.unshift(0),a.unshift(a[0]),u.unshift("easeInOut")),1!==l[l.length-1]&&(l.push(1),a.push(null)),o.has(n)||o.set(n,{keyframes:{},transition:{}});let h=o.get(n);h.keyframes[r]=a;let{type:d,...p}=e;h.transition[r]={...p,duration:c,ease:u,times:l,...i}}}),o})(t.map(t=>{if(Array.isArray(t)&&"function"==typeof t[0]){let e=t[0],i=io(0);return(i.on("change",e),1===t.length)?[i,[0,1]]:2===t.length?[i,[0,1],t[1]]:[i,t[1],t[2]]}return t}),e,i,{spring:es}).forEach(({keyframes:t,transition:e},i)=>{n.push(...oL(i,t,e))}),n}(t,{...l,...n},e)}else{let{onComplete:i,...n}=s||{};"function"==typeof i&&(o=i),a=oL(t,r,{...l,...n},e)}let u=new it(a);return o&&u.finished.then(o),e&&(e.animations.push(u),u.finished.then(()=>{v(e.animations,u)})),u}}(),oB=()=>({});sB({scrapeMotionValuesFromProps:oB,createRenderState:oB}),(0,d.createContext)(null),new WeakMap,new WeakMap;var oF="calc(100% - env(safe-area-inset-top) - 34px)",oI="undefined"==typeof window,oO={ease:"easeOut",duration:.2},oN={ease:"linear",duration:.01},o$=.6,oW=500;function oU(t){let e=t.current;return e?Math.round(e.getBoundingClientRect().height):(console.warn("Sheet height is not available because the sheet element is not mounted yet."),0)}function oH({snapPointsProp:t,sheetHeight:e}){let i=t.map(t=>t>0&&t<=1?Math.round(t*e):t<0?e+t:t);return console.assert(function(t){for(let e=0;e<t.length;e++)if(t[e+1]>t[e])return!1;return!0}(i)||0===e,`Snap points need to be in descending order got: [${t.join(", ")}]`),i}function oz(t,e){let i=t[0],n=Math.abs(t[0]-e);for(let r=1;r<t.length;r++){let s=Math.abs(t[r]-e);
9s<n&&(i=t[r],n=s)}return i}function oY({sheetHeight:t,snapPoints:e,snapIndex:i}){let n=e[i];return void 0===n?(console.warn(`Invalid snap index ${i}. Snap points are: [${e.join(", ")}]`),null):oX({snapTo:t-n,sheetHeight:t})}function oX({snapTo:t,sheetHeight:e}){return t<0&&console.warn(`Snap point is out of bounds. Sheet height is ${e} but snap point is ${e+Math.abs(t)}.`),Math.max(Math.round(t),0)}function oq(t){return e=>{t.forEach(t=>{"function"==typeof t?t(e):t&&(t.current=e)})}}function oK(t){var e;return"undefined"!=typeof window&&null!=window.navigator&&t.test((null==(e=window.navigator.userAgentData)?void 0:e.platform)||window.navigator.platform)}function o_(t){let e=null;return()=>(null==e&&(e=t()),e)}var oG=o_(function(){return oK(/^Mac/i)}),oZ=o_(function(){return oK(/^iPhone/i)}),oJ=o_(function(){return oK(/^iPad/i)||oG()&&navigator.maxTouchPoints>1}),oQ=o_(function(){return oZ()||oJ()}),o0=(0,d.createContext)(void 0);function o1(){let t=(0,d.useContext)(o0);if(!t)throw Error("Sheet context error");return t}var o2=(0,d.createContext)(void 0);function o5({children:t}){let e=o1(),[i,n]=(0,d.useState)(!!e.disableDrag);return d.createElement(o2.Provider,{value:{disableDrag:i,setDragEnabled:function(){e.disableDrag||n(!1)},setDragDisabled:function(){i||n(!0)}}},t)}function o3(){let t=(0,d.useContext)(o2);if(!t)throw Error("Sheet scroller context error");return t}var o9={wrapper:{position:"fixed",top:0,bottom:0,left:0,right:0,overflow:"hidden",pointerEvents:"none"},backdrop:{zIndex:1,position:"fixed",top:0,left:0,width:"100%",height:"100%",backgroundColor:"rgba(0, 0, 0, 0.2)",touchAction:"none",border:"none",userSelect:"none",WebkitTapHighlightColor:"transparent"},container:{zIndex:2,position:"absolute",left:0,bottom:0,width:"100%",backgroundColor:"#fff",borderTopRightRadius:"8px",borderTopLeftRadius:"8px",boxShadow:"0px -2px 16px rgba(0, 0, 0, 0.3)",display:"flex",flexDirection:"column",pointerEvents:"auto"},headerWrapper:{width:"100%"},header:{height:"40px",width:"100%",position:"relative",display:"flex",alignItems:"center",justifyContent:"center"},indicator:{width:"18px",height:"4px",borderRadius:"99px",backgroundColor:"#ddd"},content:{flexGrow:1,display:"flex",flexDirection:"column",minHeight:"0px",position:"relative"},scroller:{height:"100%",overflowY:"auto",overscrollBehaviorY:"none"}},o4=oI?d.useEffect:d.useLayoutEffect;function o6(t,e){return parseInt(t.getPropertyValue(e).replace("px","").trim(),10)||0}function o8(t){let e=document.querySelector(`#${t}`),i=document.querySelector("body");e&&(i.style.removeProperty("background-color"),e.style.removeProperty("overflow"),e.style.removeProperty("transition-timing-function"),e.style.removeProperty("transition-property"),e.style.removeProperty("transition-duration"),e.style.removeProperty("transform-origin"),e.style.removeProperty("transform"),e.style.removeProperty("border-top-right-radius"),e.style.removeProperty("border-top-left-radius"))}function o7(t){let e=(0,d.useRef)(void 0);return o4(()=>{e.current=t}),(0,d.useCallback)((...t)=>{let i=e.current;return null==i?void 0:i(...t)},[])}function at(...t){return(...e)=>{for(let i of t)"function"==typeof i&&i(...e)}}var ae="undefined"!=typeof document&&window.visualViewport;function ai(t,e){if(!t)return!1;let i=window.getComputedStyle(t),n=/(auto|scroll)/.test(i.overflow+i.overflowX+i.overflowY);return n&&e&&(n=t.scrollHeight!==t.clientHeight||t.scrollWidth!==t.clientWidth),n}function an(t,e){let i=t;for(ai(i,e)&&(i=i.parentElement);i&&!ai(i,e);)i=i.parentElement;return i||document.scrollingElement||document.documentElement}var ar=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]),as=0;function ao(t,e,i){let n=t.style[e];return t.style[e]=i,()=>{t.style[e]=n}}function aa(t,e,i,n){return t.addEventListener(e,i,n),()=>{t.removeEventListener(e,i,n)}}function al(t){let e=document.scrollingElement||document.documentElement;for(;t&&t!==e;){let e=an(t);if(e!==document.documentElement&&e!==document.body&&e!==t){let i=e.getBoundingClientRect().top,n=t.getBoundingClientRect().top;t.getBoundingClientRect().bottom>e.getBoundingClientRect().bottom+24&&(e.scrollTop+=n-i)}t=e.parentElement}}function au(t){return t instanceof HTMLInputElement&&!ar.has(t.type)||t instanceof HTMLTextAreaElement||t instanceof HTMLElement&&t.isContentEditable}var ah=(0,d.forwardRef)(({onOpenStart:t,onOpenEnd:e,onClose:i,onCloseStart:n,onCloseEnd:r,onSnap:s,children:o,disableScrollLocking:l=!1,isOpen:u,snapPoints:c,rootId:p,modalEffectRootId:m,mountPoint:f,style:g,detent:y="full-height",initialSnap:v=0,disableDrag:x=!1,prefersReducedMotion:w=!1,tweenConfig:b=oO,dragVelocityThreshold:S=oW,dragCloseThreshold:T=o$,modalEffectThreshold:P,...E},A)=>
9{let C=(0,d.useRef)(null),M=ox(0),{height:k}=function(){let[t,e]=(0,d.useState)(()=>({height:oI?0:window.innerHeight,width:oI?0:window.innerWidth}));return o4(()=>{function t(){e({height:window.innerHeight,width:window.innerWidth})}return t(),window.addEventListener("resize",t),()=>{window.removeEventListener("resize",t)}},[]),t}(),V=function(){nE.current||nC();let[t]=(0,d.useState)(nP.current);return t}(),R=!!(w||V),D={type:"tween",...R?oN:b},L=ox(k),j=ob(L,t=>t+2>=k?-1:(null==g?void 0:g.zIndex)??9999),B=ob(L,t=>t+2>=k?"hidden":"visible"),F=(0,d.useRef)({onOpenStart:t,onOpenEnd:e,onCloseStart:n,onCloseEnd:r});o4(()=>{F.current={onOpenStart:t,onOpenEnd:e,onCloseStart:n,onCloseEnd:r}});let I=o7((t,e)=>{let i=L.get();if(c){let t=oU(C),n=oH({snapPointsProp:c,sheetHeight:t}),r=t-n[0];if(e.delta.y<0&&i<=r){L.set(r);return}}let n=L.getVelocity();n>0&&M.set(10),n<0&&M.set(-10),L.set(Math.max(i+e.delta.y,0))}),O=o7(()=>{let t=document.activeElement;t&&C.current&&("INPUT"===t.tagName||"TEXTAREA"===t.tagName)&&C.current.contains(t)&&t.blur()}),N=o7((t,{velocity:e})=>{if(e.y>S)i();else{let t=oU(C),e=L.get(),n=0,r=c?oH({snapPointsProp:c,sheetHeight:t}):void 0;if(r){let{snapY:i,snapIndex:o}=function({snapPoints:t,currentY:e,sheetHeight:i,detent:n}){let r=t.map(t=>i-Math.min(t,i));"content-height"!==n||r.includes(0)||r.unshift(0);let s=oz(r,e),o=r.indexOf(s);return{snapY:oX({snapTo:oz(r,e),sheetHeight:i}),snapIndex:o}}({snapPoints:r,currentY:e,sheetHeight:t,detent:y});n=i,null==s||s(o)}else e/t>T&&(n=t);oj(L,n,D),n+1>=t&&i()}M.set(0)});(0,d.useEffect)(()=>{c&&s&&s(u?v:c.length-1)},[u]),(0,d.useEffect)(()=>{if(!u)return;let t=0;if(c){let e=oU(C),i=oH({snapPointsProp:c,sheetHeight:e}),n=oY({sheetHeight:e,snapPoints:i,snapIndex:v});null!==n&&(t=n)}oj(L,t,D)},[u]),(0,d.useImperativeHandle)(A,()=>({y:L,snapTo:t=>{if(!c){console.warn("Snapping is not possible without `snapPoints` prop.");return}let e=oU(C),n=oH({snapPointsProp:c,sheetHeight:e}),r=oY({sheetHeight:e,snapPoints:n,snapIndex:t});null!==r&&(oj(L,r,D),null==s||s(t),r+1>=e&&i())}})),p&&console.warn("The `rootId` prop is deprecated and will be removed in the next major version. Use `modalEffectRootId` instead."),function({y:t,rootId:e,sheetRef:i,snapPointsProp:n,startThreshold:r}){let s=function(){let[t]=(0,d.useState)(()=>{let t={top:0,left:0,right:0,bottom:0};if(oI)return t;let e=document.querySelector(":root");if(!e)return t;e.style.setProperty("--rms-sat","env(safe-area-inset-top)"),e.style.setProperty("--rms-sal","env(safe-area-inset-left)"),e.style.setProperty("--rms-sar","env(safe-area-inset-right)"),e.style.setProperty("--rms-sab","env(safe-area-inset-bottom)");let i=getComputedStyle(e),n=o6(i,"--rms-sat"),r=o6(i,"--rms-sal"),s=o6(i,"--rms-sar"),o=o6(i,"--rms-sab");return e.style.removeProperty("--rms-sat"),e.style.removeProperty("--rms-sal"),e.style.removeProperty("--rms-sar"),e.style.removeProperty("--rms-sab"),{top:n,left:r,right:s,bottom:o}});return t}().top;o4(()=>()=>{e&&o8(e)},[]),o4(()=>{if(!e)return;let o=document.querySelector(`#${e}`);if(!o)return;let a=0,l=t.on("animationStart",()=>{a=oU(i),function(t){let e=document.querySelector(`#${t}`),i=document.querySelector("body");e&&(i.style.backgroundColor="#000",e.style.overflow="hidden",e.style.transitionTimingFunction="cubic-bezier(0.32, 0.72, 0, 1)",e.style.transitionProperty="transform, border-radius",e.style.transitionDuration="0.5s",e.style.transformOrigin="center top")}(e)}),u=t.on("change",t=>{if(!o)return;let e=Math.max(0,1-t/a),i=n?oH({snapPointsProp:n,sheetHeight:a}):void 0,l=i&&i.length>1?i[1]:void 0;if(void 0!==l){let i=a-Math.min(l,a);e=t<=i?(i-t)/i:0}if(void 0!==r){let i=a-Math.min(Math.floor(r*a),a);e=t<=i?(i-t)/i:0}e=Math.max(0,Math.min(1,e));let u=window.innerWidth,h=nh(e,[0,1],[0,24+s]),d=nh(e,[0,1],[1,(u-16)/u]),c=nh(e,[0,1],[0,10]);o.style.transform=`scale(${d}) translate3d(0, ${h}px, 0)`,o.style.borderTopRightRadius=`${c}px`,o.style.borderTopLeftRadius=`${c}px`});function h(){t.get()-5>=a&&o8(e)}let d=t.on("animationComplete",h),c=t.on("animationCancel",h);return()=>{l(),u(),d(),c()}},[t,e,s,r,n])}({y:L,sheetRef:C,snapPointsProp:c,rootId:p||m,startThreshold:P}),function(t={}){let{isDisabled:e}=t;o4(()=>{if(!e)return 1==++as&&(a=oQ()?function(){let t;let e=0,i=window.pageXOffset,n=window.pageYOffset,r=at(ao(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`),ao(document.documentElement,"overflow","hidden"),ao(document.body,"marginTop",`-${n}px`));window.scrollTo(0,0);let s=at(aa(document,"touchstart",i=>{var n;((t=an(null==(n=i.composedPath())?void 0:n[0],!0))!==document.documentElement||t!==document.body)&&(e=i.changedTouches[0].pageY)},{passive:!1,capture:!0}),aa(document,"touchmove",i=>{if(void 0===t)return;if(!t||t===document.documentElement||t===document.body){i.preventDefault();return}let n=i.changedTouches[0].pageY,r=t.scrollTop,s=t.scrollHeight-t.clientHeight;0!==s&&((r<=0&&n>e||r>=s&&n<e)&&i.preventDefault(),e=n)},{passive:!1,capture:!0}),aa(document,"touchend",t=>{var e;let i=null==(e=t.composedPath())?void 0:e[0];au(i)&&i!==document.activeElement&&(t.preventDefault(),i.style.transform="translateY(-2000px)",i.focus(),requestAnimationFrame(()=>{i.style.transform=""}))},{passive:!1,capture:!0}),aa(document,"focus",t=>{var e;let i=null==(e=t.composedPath())?void 0:e[0];au(i)&&(i.style.transform="translateY(-2000px)",requestAnimationFrame(()=>{i.style.transform="",ae&&(ae.height<window.innerHeight?requestAnimationFrame(()=>{al(i)}):ae.addEventListener("resize",()=>al(i),{once:!0}))}))},!0),aa(window,"scroll",()=>{window.scrollTo(0,0)}));return()=>{r(),s(),window.scrollTo(i,n)}}():at(ao(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`),ao(document.documentElement,"overflow","hidden"))),()=>{0==--as&&(null==a||a())}},[e])}({isDisabled:l||!u});let $=(0,d.useMemo)(()=>x?void 0:{drag:"y",dragElastic:0,dragMomentum:!1,dragPropagation:!1,onDrag:I,onDragStart:O,onDragEnd:N},[x,k]),W=d.createElement(o0.Provider,{value:{y:L,sheetRef:C,isOpen:u,initialSnap:v,detent:y,indicatorRotation:M,callbacks:F,dragProps:$,windowHeight:k,animationOptions:D,reduceMotion:R,disableDrag:x}},d.createElement(ov.div,{...E,ref:A,style:{...o9.wrapper,zIndex:j,visibility:B,...g}},d.createElement(sw,null,u?d.createElement(o5,null,d.Children.map(o,(t,e)=>(0,d.cloneElement)(t,{key:`sheet-child-${e}`}))):null)));return oI?W:(0,h.createPortal)(W,f??document.body)});ah.displayName="Sheet";var ad=(0,d.forwardRef)(({children:t,style:e,className:i="",...n},r)=>{let{y:s,isOpen:o,callbacks:a,sheetRef:l,windowHeight:u,detent:h,animationOptions:c}=o1(),{handleAnimationComplete:p}=function(t,e){let i=function(t){let e=(0,d.useRef)(void 0);return(0,d.useEffect)(()=>{e.current=t}),e.current}(t),n=(0,d.useRef)(!1),r=(0,d.useCallback)(()=>{var t,i,r,s;n.current?(null==(s=(r=e.current).onCloseEnd)||s.call(r),n.current=!1):(null==(i=(t=e.current).onOpenEnd)||i.call(t),n.current=!0)},[t,i]);return(0,d.useEffect)(()=>{var n,r,s,o;!i&&t?null==(r=(n=e.current).onOpenStart)||r.call(n):!t&&i&&(null==(o=(s=e.current).onCloseStart)||o.call(s))},[t,i]),{handleAnimationComplete:r}}(o,a),m="full-height"===h?oF:void 0,f="content-height"===h?oF:void 0;return d.createElement(ov.div,{...n,ref:oq([l,r]),className:`react-modal-sheet-container ${i}`,style:{...o9.container,height:m,maxHeight:f,...e,y:s},initial:{y:u},exit:{y:u,transition:c},onAnimationComplete:p},t)});ad.displayName="SheetContainer";var ac={bottom:0,top:0,left:0,right:0};function ap(){return{constraintsRef:(0,d.useRef)(null),onMeasureDragConstraints:(0,d.useCallback)(()=>ac,[])}}var am=(0,d.forwardRef)(({children:t,style:e,disableDrag:i,className:n="",...r},s)=>
9{let o=o1(),a=o3(),{constraintsRef:l,onMeasureDragConstraints:u}=ap(),h=i||a.disableDrag?void 0:o.dragProps;return d.createElement(ov.div,{...r,ref:oq([s,l]),className:`react-modal-sheet-content ${n}`,style:{...o9.content,...e},...h,dragConstraints:l,onMeasureDragConstraints:u},t)});am.displayName="SheetContent";var af=(0,d.forwardRef)(({children:t,style:e,disableDrag:i,...n},r)=>{let{indicatorRotation:s,dragProps:o}=o1(),{constraintsRef:a,onMeasureDragConstraints:l}=ap(),u=ob(s,t=>`translateX(2px) rotate(${t}deg)`),h=ob(s,t=>`translateX(-2px) rotate(${-1*t}deg)`);return d.createElement(ov.div,{...n,ref:oq([r,a]),style:{...o9.headerWrapper,...e},...i?void 0:o,dragConstraints:a,onMeasureDragConstraints:l},t||d.createElement("div",{className:"react-modal-sheet-header",style:o9.header},d.createElement(ov.span,{className:"react-modal-sheet-drag-indicator",style:{...o9.indicator,transform:u}}),d.createElement(ov.span,{className:"react-modal-sheet-drag-indicator",style:{...o9.indicator,transform:h}})))});af.displayName="SheetHeader";var ag=t=>!!t.onClick||!!t.onTap,ay=(0,d.forwardRef)(({style:t={},className:e="",...i},n)=>{let r=ag(i)?ov.button:ov.div,s=ag(i)?"auto":"none";return d.createElement(r,{...i,ref:n,className:`react-modal-sheet-backdrop ${e}`,style:{...o9.backdrop,...t,pointerEvents:s},initial:{opacity:0}
9,animate:{opacity:1},exit:{opacity:0}})});ay.displayName="SheetBackdrop";var av=(0,d.forwardRef)(({autoPadding:t=!0,disableScroll:e=!1,draggableAt:i="top",children:n,style:r,className:s="",...o},a)=>{let{y:l}=o1(),{setDragEnabled:u,setDragDisabled:h}=o3();function c(t){if(e){u();return}let{scrollTop:n,scrollHeight:r,clientHeight:s}=t;if(!(r>s))return;let o=n<=0,a=r-n===s;"top"===i&&o||"bottom"===i&&a||"both"===i&&(o||a)?u():h()}let p=!oI&&("ontouchstart"in window||navigator.maxTouchPoints>0)?{onScroll:function(t){c(t.currentTarget),o.onScroll&&o.onScroll(t)},onTouchStart:function(t){c(t.currentTarget),o.onTouchStart&&o.onTouchStart(t)}}:void 0,m={...o9.scroller,...r};return t&&(m.paddingBottom=l),e&&(m.overflowY="hidden"),d.createElement(ov.div,{...o,ref:a,className:`react-modal-sheet-scroller ${s}`,style:m,...p},n)});av.displayName="SheetScroller";var ax=Object.assign(ah,{Container:ad,Header:af,Content:am,Backdrop:ay,Scroller:av}),aw=i(40489),ab=i(13980),aS=i.n(ab),aT=(0,d.createContext)({close:function(){}}),aP={allowOutsideClick:aS().bool,attachContainerClassesToBody:aS().bool,children:aS().node,className:aS().string,detent:aS().oneOf(["full-height","content-height"]),disableDrag:aS().bool,disableScrollLocking:aS().bool,headlineText:aS().string,initialSnap:aS().number,mountPoint:aS().object,onClose:aS().func,onCloseEnd:aS().func,onCloseStart:aS().func,onOpenEnd:aS().func,onOpenStart:aS().func,onSnap:aS().func,open:aS().bool,prefersReducedMotion:aS().bool,ref:aS().any,returnFocusSelector:aS().string,rootId:aS().string,snapPoints:aS().arrayOf(aS().number),tweenConfig:aS().object,variant:aS().oneOf(["modal","elevated","floating","coplanar"])},aE={children:aS().node,className:aS().string,scrollable:aS().bool},aA={autoFocus:aS().bool,children:aS().node,className:aS().string},aC={children:aS().node,className:aS().string},aM=["attachContainerClassesToBody","children","className","disableDrag","disableScrollLocking","detent","onOpenStart","onOpenEnd","onCloseStart","onCloseEnd","onSnap","snapPoints","initialSnap","rootId","tweenConfig","mountPoint","prefersReducedMotion","headlineText","onClose","onOpen","open","returnFocusSelector","variant","allowOutsideClick"],ak={children:null,className:void 0,detent:"full-height",disableDrag:!1,disableScrollLocking:!1,initialSnap:0,mountPoint:void 0,onClose:null,onCloseEnd:null,onCloseStart:null,onOpenEnd:null,onOpenStart:null,onSnap:null,open:void 0,prefersReducedMotion:!1,rootId:null,snapPoints:null,tweenConfig:{ease:"easeOut",duration:.2}},aV=(0,d.forwardRef)(function(t,e){t.attachContainerClassesToBody;var i=t.children,n=void 0===i?ak.children:i,r=t.className,s=void 0===r?ak.className:r,o=t.disableDrag,a=void 0===o?ak.disableDrag:o,h=t.disableScrollLocking,c=void 0===h?ak.disableScrollLocking:h,p=t.detent,m=void 0===p?ak.detent:p,f=t.onOpenStart,g=void 0===f?ak.onOpenStart:f,y=t.onOpenEnd,v=void 0===y?ak.onOpenEnd:y,x=t.onCloseStart,w=void 0===x?ak.onCloseStart:x,b=t.onCloseEnd,S=void 0===b?ak.onCloseEnd:b,T=t.onSnap,P=void 0===T?ak.onSnap:T,E=t.snapPoints,A=void 0===E?ak.snapPoints:E,C=t.initialSnap,M=void 0===C?ak.initialSnap:C,k=t.rootId,V=void 0===k?ak.rootId:k,R=t.tweenConfig,D=void 0===R?ak.tweenConfig:R,L=t.mountPoint,j=void 0===L?ak.mountPoint:L,B=t.prefersReducedMotion,F=void 0===B?ak.prefersReducedMotion:B;t.headlineText;var I=t.onClose,O=void 0===I?ak.onClose:I;t.onOpen;var N=t.open,$=void 0===N?ak.open:N;t.returnFocusSelector,t.variant,t.allowOutsideClick;var W=(0,u.Z)(t,aM),U=(0,d.useRef)();(0,d.useImperativeHandle)(e,function(){return U.current},[]);var H=function(t){null==O||O(t)};return d.createElement(aT.Provider,{value:{close:H}},d.createElement(ax,(0,l.Z)({ref:U,isOpen:$,onClose:H,detent:m,disableDrag:a,disableScrollLocking:c,onOpenStart:g,onOpenEnd:v,onCloseStart:w,onCloseEnd:S,onSnap:P,snapPoints:A,initialSnap:M,rootId:V||void 0,tweenConfig:D,mountPoint:j,prefersReducedMotion:F,className:(0,aw.Z)("lmnt lmnt-bottom-sheet",s)},W),d.createElement(ax.Container,null,n),d.createElement(ax.Backdrop,{onTap:H})))});aV.displayName="BottomSheet",aV.propTypes=aP;var aR=["children","className","scrollable"],aD={children:null,className:void 0,scrollable:!1},aL=(0,d.forwardRef)(function(t,e){var i=t.children,n=void 0===i?aD.children:i,r=t.className,s=void 0===r?aD.className:r,o=t.scrollable,a=void 0===o?aD.scrollable:o,h=(0,u.Z)(t,aR),c=(0,d.useRef)();return(0,d.useImperativeHandle)(e,function(){return c.current},[]),d.createElement(ax.Content,(0,l.Z)({className:(0,aw.Z)("lmnt-bottom-sheet-content-container",s)},h),a?d.createElement(ax.Scroller,null,d.createElement("div",{className:"lmnt-bottom-sheet-content"},n)):d.createElement("div",{className:"lmnt-bottom-sheet-content"},n))});aL.displayName="BottomSheetContent",aL.propTypes=aE;var aj=["children","className","autofocus"],aB={autoFocus:!0,children:null},aF=(0,d.forwardRef)(function(t,e){var i=t.children,n=void 0===i?aB.children:i;t.className;var r=t.autofocus,s=void 0===r?aB.autoFocus:r,o=(0,u.Z)(t,aj),a=(0,d.useContext)(aT),h=(0,d.useRef)(null),c=(0,d.useRef)();return(0,d.useImperativeHandle)(e,function(){return c.current},[]),d.createElement(ax.Header,null,d.createElement("header",(0,l.Z)({className:"lmnt-bottom-sheet__header"},o),d.createElement("div",{className:"lmnt-bottom-sheet-drag-bar"},d.createElement("div",{className:"lmnt-bottom-sheet-drag-handle"})),d.createElement("div",{style:{display:"flex",padding:"0 24px",justifyContent:"space-between"}},n&&d.createElement("span",{className:"lmnt-bottom-sheet__headline mdc-typography--headline6",id:"lmnt-bottom-sheet__headline"},n),d.createElement("button",{"aria-label":"Dismiss",autoFocus:s,className:"mdc-icon-button mdc-button--text lmnt-bottom-sheet__dismiss",onClick:function(){return a.close()},ref:h,type:"button"},d.createElement("i",{className:"material-icons","aria-hidden":"true"},"close")))))});aF.displayName="BottomSheetHeader",aF.propTypes=aA;var aI={children:null},aO=(0,d.forwardRef)(function(t,e){var i=t.children,n=void 0===i?aI.children:i,r=(0,d.useRef)();return(0,d.useImperativeHandle)(e,function(){return r.current},[]),d.createElement(ax.Scroller,null,n)});aO.displayName="BottomSheetScroller",aO.propTypes=aC}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.