1import{o as e}from"./rolldown-runtime-C0FnF6B9.js";import{t}from"./react-C21x__mS.js";import{t as n}from"./react-dom-BddMPX6d.js";var r=Object.defineProperty,i=(e,t)=>{let n={};for(var i in e)r(n,i,{get:e[i],enumerable:!0});return t||r(n,Symbol.toStringTag,{value:`Module`}),n},a=S(),o=e=>_(e,a),s=S();o.write=e=>_(e,s);var c=S();o.onStart=e=>_(e,c);var l=S();o.onFrame=e=>_(e,l);var u=S();o.onFinish=e=>_(e,u);var d=[];o.setTimeout=(e,t)=>{let n=o.now()+t,r=()=>{let e=d.findIndex(e=>e.cancel==r);~e&&d.splice(e,1),h-=+!!~e},i={time:n,handler:e,cancel:r};return d.splice(f(n),0,i),h+=1,v(),i};var f=e=>~(~d.findIndex(t=>t.time>e)||~d.length);o.cancel=e=>{c.delete(e),l.delete(e),u.delete(e),a.delete(e),s.delete(e)},o.sync=e=>{g=!0,o.batchedUpdates(e),g=!1},o.throttle=e=>{let t;function n(){try{e(...t)}finally{t=null}}function r(...e){t=e,o.onStart(n)}return r.handler=e,r.cancel=()=>{c.delete(n),t=null},r};var p=typeof window<`u`?window.requestAnimationFrame:()=>{};o.use=e=>p=e,o.now=typeof performance<`u`?()=>performance.now():Date.now,o.batchedUpdates=e=>e(),o.catch=console.error,o.frameLoop=`always`,o.onDemand=()=>{},o.advance=()=>{o.frameLoop===`demand`?x():console.warn(`Cannot call the manual advancement of rafz whilst frameLoop is not set as demand`)};var m=-1,h=0,g=!1;function _(e,t){g?(t.delete(e),e(0)):(t.add(e),v(),o.frameLoop===`demand`&&o.onDemand())}function v(){m<0&&(m=0,o.frameLoop!==`demand`&&p(b))}function y(){m=-1}function b(){~m&&(p(b),o.batchedUpdates(x))}function x(){let e=m;m=o.now();let t=f(m);if(t&&(ee(d.splice(0,t),e=>e.handler()),h-=t),!h){y();return}c.flush(),a.flush(e?Math.min(64,m-e):16.667),l.flush(),s.flush(),u.flush(),o.frameLoop===`demand`&&h>0&&o.onDemand()}function S(){let e=new Set,t=e;return{add(n){h+=+(t==e&&!e.has(n)),e.add(n)},delete(n){return h-=t==e&&e.has(n)?1:0,e.delete(n)},flush(n){t.size&&(e=new Set,h-=t.size,ee(t,t=>t(n)&&e.add(t)),h+=e.size,t=e)}}}function ee(e,t){e.forEach(e=>{try{t(e)}catch(e){o.catch(e)}})}var C=e(t(),1);function w(){}var T=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),E={arr:Array.isArray,obj:e=>!!e&&e.constructor.name===`Object`,fun:(e=>typeof e==`function`),str:e=>typeof e==`string`,num:e=>typeof e==`number`,und:e=>e===void 0};function D(e,t){if(E.arr(e)){if(!E.arr(t)||e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}return e===t}var O=(e,t)=>e.forEach(t);function k(e,t,n){if(E.arr(e)){for(let r=0;r<e.length;r++)t.call(n,e[r],`${r}`);return}for(let r in e)e.hasOwnProperty(r)&&t.call(n,e[r],r)}var A=e=>E.und(e)?[]:E.arr(e)?e:[e];function j(e,t){if(e.size){let n=Array.from(e);e.clear(),O(n,t)}}var M=(e,...t)=>j(e,e=>e(...t)),N=()=>typeof window>`u`||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),P=i({assign:()=>ae,colors:()=>F,createStringInterpolator:()=>te,skipAnimation:()=>re,to:()=>ne,willAdvance:()=>ie}),te,ne,F=null,re=!1,ie=w,ae=e=>{e.to&&(ne=e.to),e.now&&(o.now=e.now),e.colors!==void 0&&(F=e.colors),e.skipAnimation!=null&&(re=e.skipAnimation),e.createStringInterpolator&&(te=e.createStringInterpolator),e.requestAnimationFrame&&o.use(e.requestAnimationFrame),e.batchedUpdates&&(o.batchedUpdates=e.batchedUpdates),e.willAdvance&&(ie=e.willAdvance),e.frameLoop&&(o.frameLoop=e.frameLoop),e.onDemand&&(o.onDemand=e.onDemand)},oe=new Set,I=[],se=[],ce=0,L={get idle(){return!oe.size&&!I.length},start(e){ce>e.priority?(oe.add(e),o.onStart(le)):(ue(e),o(fe))},advance:fe,sort(e){if(ce)o.onFrame(()=>L.sort(e));else{let t=I.indexOf(e);~t&&(I.splice(t,1),de(e))}},clear(){I=[],oe.clear()}};function le(){oe.forEach(ue),oe.clear(),o(fe)}function ue(e){I.includes(e)||de(e)}function de(e){I.splice(pe(I,t=>t.priority>e.priority),0,e)}function fe(e){let t=se;for(let n=0;n<I.length;n++){let r=I[n];ce=r.priority,r.idle||(ie(r),r.advance(e),r.idle||t.push(r))}return ce=0,se=I,se.length=0,I=t,I.length>0}function pe(e,t){let n=e.findIndex(t);return n<0?e.length:n}var me=(e,t,n)=>Math.min(Math.max(n,e),t),he={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,dar
1kgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199},R=`[-+]?\\d*\\.?\\d+`,ge=`[-+]?\\d*\\.?\\d+%`;function _e(...e){return`\\(\\s*(`+e.join(`)\\s*,\\s*(`)+`)\\s*\\)`}var ve=RegExp(`rgb`+_e(R,R,R)),ye=RegExp(`rgba`+_e(R,R,R,R)),be=RegExp(`hsl`+_e(R,ge,ge)),xe=RegExp(`hsla`+_e(R,ge,ge,R)),Se=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,Ce=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,we=/^#([0-9a-fA-F]{6})$/,Te=/^#([0-9a-fA-F]{8})$/;function Ee(e){let t;return typeof e==`number`?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=we.exec(e))?parseInt(t[1]+`ff`,16)>>>0:F&&F[e]!==void 0?F[e]:(t=ve.exec(e))?(z(t[1])<<24|z(t[2])<<16|z(t[3])<<8|255)>>>0:(t=ye.exec(e))?(z(t[1])<<24|z(t[2])<<16|z(t[3])<<8|Ae(t[4]))>>>0:(t=Se.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+`ff`,16)>>>0:(t=Te.exec(e))?parseInt(t[1],16)>>>0:(t=Ce.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=be.exec(e))?(Oe(ke(t[1]),je(t[2]),je(t[3]))|255)>>>0:(t=xe.exec(e))?(Oe(ke(t[1]),je(t[2]),je(t[3]))|Ae(t[4]))>>>0:null}function De(e,t,n){return n<0&&(n+=1),n>1&&--n,n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function Oe(e,t,n){let r=n<.5?n*(1+t):n+t-n*t,i=2*n-r,a=De(i,r,e+1/3),o=De(i,r,e),s=De(i,r,e-1/3);return Math.round(a*255)<<24|Math.round(o*255)<<16|Math.round(s*255)<<8}function z(e){let t=parseInt(e,10);return t<0?0:t>255?255:t}function ke(e){return(parseFloat(e)%360+360)%360/360}function Ae(e){let t=parseFloat(e);return t<0?0:t>1?255:Math.round(t*255)}function je(e){let t=parseFloat(e);return t<0?0:t>100?1:t/100}function Me(e){let t=Ee(e);return t===null?e:(t||=0,`rgba(${(t&4278190080)>>>24}, ${(t&16711680)>>>16}, ${(t&65280)>>>8}, ${(t&255)/255})`)}var B=(e,t,n)=>{if(E.fun(e))return e;if(E.arr(e))return B({range:e,output:t,extrapolate:n});if(E.str(e.output[0]))return te(e);let r=e,i=r.output,a=r.range||[0,1],o=r.extrapolateLeft||r.extrapolate||`extend`,s=r.extrapolateRight||r.extrapolate||`extend`,c=r.easing||(e=>e);return e=>{let t=Pe(e,a);return Ne(e,a[t],a[t+1],i[t],i[t+1],c,o,s,r.map)}};function Ne(e,t,n,r,i,a,o,s,c){let l=c?c(e):e;if(l<t){if(o===`identity`)return l;o===`clamp`&&(l=t)}if(l>n){if(s===`identity`)return l;s===`clamp`&&(l=n)}return r===i?r:t===n?e<=t?r:i:(t===-1/0?l=-l:n===1/0?l-=t:l=(l-t)/(n-t),l=a(l),r===-1/0?l=-l:i===1/0?l+=r:l=l*(i-r)+r,l)}function Pe(e,t){for(var n=1;n<t.length-1&&!(t[n]>=e);++n);return n-1}var Fe=(e,t=`end`)=>n=>{n=t===`end`?Math.min(n,.999):Math.max(n,.001);let r=n*e;return me(0,1,(t===`end`?Math.floor(r):Math.ceil(r))/e)},Ie=1.70158,Le=Ie*1.525,Re=2.70158,ze=2*Math.PI/3,Be=2*Math.PI/4.5,Ve=e=>{let t=7.5625,n=2.75;return e<1/n?t*e*e:e<2/n?t*(e-=1.5/n)*e+.75:e<2.5/n?t*(e-=2.25/n)*e+.9375:t*(e-=2.625/n)*e+.984375},He={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>1-(1-e)*(1-e),easeInOutQuad:e=>e<.5?2*e*e:1-(-2*e+2)**2/2,easeInCubic:e=>e*e*e,easeOutCubic:e=>1-(1-e)**3,easeInOutCubic:e=>e<.5?4*e*e*e:1-(-2*e+2)**3/2,easeInQuart:e=>e*e*e*e,easeOutQuart:e=>1-(1-e)**4,easeInOutQuart:e=>e<.5?8*e*e*e*e:1-(-2*e+2)**4/2,easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>1-(1-e)**5,easeInOutQuint:e=>e<.5?16*e*e*e*e*e:1-(-2*e+2)**5/2,easeInSine:e=>1-Math.cos(e*Math.PI/2),easeOutSine:e=>Math.sin(e*Math.PI/2),easeInOutSine:e=>-(Math.cos(Math.PI*e)-1)/2,easeInExpo:e=>e===0?0:2**(10*e-10),easeOutExpo:e=>e===1?1:1-2**(-10*e),easeInOutExpo:e=>e===0?0:e===1?1:e<.5?2**(20*e-10)/2:(2-2**(-20*e+10))/2,easeInCirc:e=>1-Math.sqrt(1-e**2),easeOutCirc:e=>Math.sqrt(1-(e-1)**2),easeInOutCirc:e=>e<.5?(1-Math.sqrt(1-(2*e)**2))/2:(Math.sqrt(1-(-2*e+2)**2)+1)/2,easeInBack:e=>Re*e*e*e-Ie*e*e,easeOutBack:e=>1+Re*(e-1)**3+Ie*(e-1)**2,easeInOutBack:e=>e<.5?(2*e)**2*(7.189819*e-Le)/2:((2*e-2)**2*(3.5949095*(e*2-2)+Le)+2)/2,easeInElastic:e=>e===0?0:e===1?1:-(2**(10*e-10))*Math.sin((e*10-10.75)*ze),easeOutElastic:e=>e===0?0:e===1?1:2**(-10*e)*Math.sin((e*10-.75)*ze)+1,easeInOutElastic:e=>e===0?0:e===1?1:e<.5?-(2**(20*e-10)*Math.sin((20*e-11.125)*Be))/2:2**(-20*e+10)*Math.sin((20*e-11.125)*Be)/2+1,easeInBounce:e=>1-Ve(1-e),easeOutBounce:Ve,easeInOutBounce:e=>e<.5?(1-Ve(1-2*e))/2:(1+Ve(2*e-1))/2,steps:Fe},Ue=Symbol.for(`FluidValue.get`),V=Symbol.for(`FluidValue.observers`),H=e=>!!(e&&e[Ue]),U=e=>e&&e[Ue]?e[Ue]():e,We=e=>e[V]||null;function Ge(e,t){e.eventObserved?e.eventObserved(t):e(t)}function W(e,t){let n=e[V];
1n&&n.forEach(e=>{Ge(e,t)})}var Ke=class{constructor(e){if(!e&&!(e=this.get))throw Error(`Unknown getter`);qe(this,e)}},qe=(e,t)=>Je(e,Ue,t);function G(e,t){if(e[Ue]){let n=e[V];n||Je(e,V,n=new Set),n.has(t)||(n.add(t),e.observerAdded&&e.observerAdded(n.size,t))}return t}function K(e,t){let n=e[V];if(n&&n.has(t)){let r=n.size-1;r?n.delete(t):e[V]=null,e.observerRemoved&&e.observerRemoved(r,t)}}var Je=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),Ye=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,Xe=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,Ze=RegExp(`(${Ye.source})(%|[a-z]+)`,`i`),Qe=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,$e=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,et=e=>{let[t,n]=tt(e);if(!t||N())return e;let r=window.getComputedStyle(document.documentElement).getPropertyValue(t);return r?r.trim():n&&n.startsWith(`--`)?window.getComputedStyle(document.documentElement).getPropertyValue(n)||e:n&&$e.test(n)?et(n):n||e},tt=e=>{let t=$e.exec(e);if(!t)return[,];let[,n,r]=t;return[n,r]},nt,rt=(e,t,n,r,i)=>`rgba(${Math.round(t)}, ${Math.round(n)}, ${Math.round(r)}, ${i})`,it=e=>e.match(Ye)??[],at=e=>{nt||=F?RegExp(`(${Object.keys(F).join(`|`)})(?!\\w)`,`g`):/^\b$/;let t=e.output.map(e=>U(e).replace($e,et).replace(Xe,Me).replace(nt,Me)),n=t.map(e=>it(e).map(Number)),r=n[0].map((e,t)=>n.map(e=>{if(!(t in e))throw Error(`The arity of each "output" value must be equal`);return e[t]})).map(t=>B({...e,output:t})),i=e.range||[0,1],a=t.map(e=>it(e)),o=a[0].map((e,t)=>{let n=a.map(e=>{let n=e[t],r=n.indexOf(`.`);return r===-1?0:n.length-r-1});return n.every(e=>e===n[0])&&n[0]>0?n[0]:null});return e=>{let n=i.indexOf(e);if(n!==-1)return t[n];let a=!Ze.test(t[0])&&t.find(e=>Ze.test(e))?.replace(Ye,``),s=0;return t[0].replace(Ye,()=>{let t=s++,n=r[t](e),i=o[t];return`${i==null?n:n.toFixed(i)}${a||``}`}).replace(Qe,rt)}},ot=`react-spring: `,st=e=>{let t=e,n=!1;if(typeof t!=`function`)throw TypeError(`${ot}once requires a function parameter`);return(...e)=>{n||=(t(...e),!0)}},ct=st(console.warn);function lt(){ct(`${ot}The "interpolate" function is deprecated in v9 (use "to" instead)`)}var ut=st(console.warn);function dt(){ut(`${ot}Directly calling start instead of using the api object is deprecated in v9 (use ".start" instead), this will be removed in later 0.X.0 versions`)}function ft(e){return E.str(e)&&(e[0]==`#`||/\d/.test(e)||!N()&&$e.test(e)||e in(F||{}))}var q=N()?C.useEffect:C.useLayoutEffect,pt=()=>{let e=(0,C.useRef)(!1);return q(()=>(e.current=!0,()=>{e.current=!1}),[]),e};function mt(){let e=(0,C.useState)()[1],t=pt();return()=>{t.current&&e(Math.random())}}var ht=e=>(0,C.useEffect)(e,gt),gt=[];function _t(e){let t=(0,C.useRef)(void 0);return(0,C.useEffect)(()=>{t.current=e}),t.current}var vt=Symbol.for(`Animated:node`),yt=e=>!!e&&e[vt]===e,J=e=>e&&e[vt],bt=(e,t)=>T(e,vt,t),xt=e=>e&&e[vt]&&e[vt].getPayload(),St=class{constructor(){bt(this,this)}getPayload(){return this.payload||[]}},Ct=class e extends St{constructor(e){super(),this._value=e,this.done=!0,this.durationProgress=0,E.num(this._value)&&(this.lastPosition=this._value)}static create(t){return new e(t)}getPayload(){return[this]}getValue(){return this._value}setValue(e,t){return E.num(e)&&(this.lastPosition=e,t&&(e=Math.round(e/t)*t,this.done&&(this.lastPosition=e))),this._value!==e&&(this._value=e,!0)}reset(){let{done:e}=this;this.done=!1,E.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,e&&(this.lastVelocity=null),this.v0=null)}},wt=class e extends Ct{constructor(e){super(0),this._string=null,this._toString=B({output:[e,e]})}static create(t){return new e(t)}getValue(){return this._string??=this._toString(this._value)}setValue(e){if(E.str(e)){if(e==this._string)return!1;this._string=e,this._value=1}else if(super.setValue(e))this._string=null;else return!1;return!0}reset(e){e&&(this._toString=B({output:[this.getValue(),e]})),this._value=0,super.reset()}},Tt={dependencies:null},Et=class extends St{constructor(e){super(),this.source=e,this.setValue(e)}getValue(e){let t={};return k(this.source,(n,r)=>{yt(n)?t[r]=n.getValue(e):H(n)?t[r]=U(n):e||(t[r]=n)}),t}setValue(e){this.source=e,this.payload=this._makePayload(e)}reset(){this.payload&&O(this.payload,e=>e.reset())}_makePayload(e){if(e){let t=new Set;return k(e,this._addToPayload,t),Array.from(t)}}
1_addToPayload(e){Tt.dependencies&&H(e)&&Tt.dependencies.add(e);let t=xt(e);t&&O(t,e=>this.add(e))}},Dt=class e extends Et{constructor(e){super(e)}static create(t){return new e(t)}getValue(){return this.source.map(e=>e.getValue())}setValue(e){let t=this.getPayload();return e.length==t.length?t.map((t,n)=>t.setValue(e[n])).some(Boolean):(super.setValue(e.map(Ot)),!0)}};function Ot(e){return(ft(e)?wt:Ct).create(e)}function kt(e){let t=J(e);return t?t.constructor:E.arr(e)?Dt:ft(e)?wt:Ct}var At=(e,t)=>{let n=!E.fun(e)||e.prototype&&e.prototype.isReactComponent;return(0,C.forwardRef)((r,i)=>{let a=(0,C.useRef)(null),s=n&&(0,C.useCallback)(e=>{a.current=Nt(i,e)},[i]),[c,l]=Mt(r,t),u=mt(),d=()=>{let e=a.current;n&&!e||(e?t.applyAnimatedValues(e,c.getValue(!0)):!1)===!1&&u()},f=new jt(d,l),p=(0,C.useRef)(void 0);q(()=>(p.current=f,O(l,e=>G(e,f)),()=>{p.current&&(O(p.current.deps,e=>K(e,p.current)),o.cancel(p.current.update))})),(0,C.useEffect)(d,[]),ht(()=>()=>{let e=p.current;O(e.deps,t=>K(t,e))});let m=t.getComponentProps(c.getValue());return C.createElement(e,{...m,ref:s})})},jt=class{constructor(e,t){this.update=e,this.deps=t}eventObserved(e){e.type==`change`&&o.write(this.update)}};function Mt(e,t){let n=new Set;return Tt.dependencies=n,e.style&&(e={...e,style:t.createAnimatedStyle(e.style)}
1),e=new Et(e),Tt.dependencies=null,[e,n]}function Nt(e,t){return e&&(E.fun(e)?e(t):e.current=t),t}var Pt=Symbol.for(`AnimatedComponent`),Ft=new WeakMap,It=(e,{applyAnimatedValues:t=()=>!1,createAnimatedStyle:n=e=>new Et(e),getComponentProps:r=e=>e}={})=>{let i={applyAnimatedValues:t,createAnimatedStyle:n,getComponentProps:r},a=e=>{let t=Lt(e)||`Anonymous`;if(E.str(e))e=a[e]||(a[e]=At(e,i));else{let t=e[Pt]??Ft.get(e);if(!t){t=At(e,i);try{e[Pt]=t}catch{}Ft.set(e,t)}e=t}return e.displayName=`Animated(${t})`,e};return k(e,(t,n)=>{E.arr(e)&&(n=Lt(t)),a[n]=a(t)}),{animated:a}},Lt=e=>E.str(e)?e:e&&E.str(e.displayName)?e.displayName:E.fun(e)&&e.name||null;function Y(e,...t){return E.fun(e)?e(...t):e}var Rt=(e,t)=>e===!0||!!(t&&e&&(E.fun(e)?e(t):A(e).includes(t))),zt=(e,t)=>E.obj(e)?t&&e[t]:e,Bt=(e,t)=>e.default===!0?e[t]:e.default?e.default[t]:void 0,Vt=e=>e,Ht=(e,t=Vt)=>{let n=Ut;e.default&&e.default!==!0&&(e=e.default,n=Object.keys(e));let r={};for(let i of n){let n=t(e[i],i);E.und(n)||(r[i]=n)}return r},Ut=[`config`,`onProps`,`onStart`,`onChange`,`onPause`,`onResume`,`onRest`],Wt={config:1,from:1,to:1,ref:1,loop:1,reset:1,pause:1,cancel:1,reverse:1,immediate:1,default:1,delay:1,onProps:1,onStart:1,onChange:1,onPause:1,onResume:1,onRest:1,onResolve:1,items:1,trail:1,sort:1,expires:1,initial:1,enter:1,update:1,leave:1,children:1,onDestroyed:1,keys:1,callId:1,parentId:1};function Gt(e){let t={},n=0;if(k(e,(e,r)=>{Wt[r]||(t[r]=e,n++)}),n)return t}function Kt(e){let t=Gt(e);if(t){let n={to:t};return k(e,(e,r)=>r in t||(n[r]=e)),n}return{...e}}function qt(e){let t=U(e);return E.arr(t)?t.map(qt):ft(t)?P.createStringInterpolator({range:[0,1],output:[t,t]})(1):t}function Jt(e){for(let t in e)return!0;return!1}function Yt(e){return E.fun(e)||E.arr(e)&&E.obj(e[0])}function Xt(e,t){e.ref?.delete(e),t?.delete(e)}function Zt(e,t){t&&e.ref!==t&&(e.ref?.delete(e),t.add(e),e.ref=t)}var Qt={default:{tension:170,friction:26},gentle:{tension:120,friction:14},wobbly:{tension:180,friction:12},stiff:{tension:210,friction:20},slow:{tension:280,friction:60},molasses:{tension:280,friction:120}},$t={...Qt.default,mass:1,damping:1,easing:He.linear,clamp:!1},en=class{constructor(){this.velocity=0,Object.assign(this,$t)}};function tn(e,t,n){n&&(n={...n},nn(n,t),t={...n,...t}),nn(e,t),Object.assign(e,t);for(let t in $t)e[t]??(e[t]=$t[t]);let{frequency:r,damping:i}=e,{mass:a}=e;return E.und(r)||(r<.01&&(r=.01),i<0&&(i=0),e.tension=(2*Math.PI/r)**2*a,e.friction=4*Math.PI*i*a/r),e}function nn(e,t){if(!E.und(t.decay))e.duration=void 0;else{let n=!E.und(t.tension)||!E.und(t.friction);(n||!E.und(t.frequency)||!E.und(t.damping)||!E.und(t.mass))&&(e.duration=void 0,e.decay=void 0),n&&(e.frequency=void 0)}}var rn=[],an=class{constructor(){this.changed=!1,this.values=rn,this.toValues=null,this.fromValues=rn,this.config=new en,this.immediate=!1}};function on(e,{key:t,props:n,defaultProps:r,state:i,actions:a}){return new Promise((s,c)=>{let l,u,d=Rt(n.cancel??r?.cancel,t);if(d)m();else{E.und(n.pause)||(i.paused=Rt(n.pause,t));let e=r?.pause;e!==!0&&(e=i.paused||Rt(e,t)),l=Y(n.delay||0,t),e?(i.resumeQueue.add(p),a.pause()):(a.resume(),p())}function f(){i.resumeQueue.add(p),i.timeouts.delete(u),u.cancel(),l=u.time-o.now()}function p(){l>0&&!P.skipAnimation?(i.delayed=!0,u=o.setTimeout(m,l),i.pauseQueue.add(f),i.timeouts.add(u)):m()}function m(){i.delayed&&=!1,i.pauseQueue.delete(f),i.timeouts.delete(u),e<=(i.cancelId||0)&&(d=!0);try{a.start({...n,callId:e,cancel:d},s)}catch(e){c(e)}}})}var sn=(e,t)=>t.length==1?t[0]:t.some(e=>e.cancelled)?Z(e.get()):t.every(e=>e.noop)?cn(e.get()):X(e.get(),t.every(e=>e.finished)),cn=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),X=(e,t,n=!1)=>({value:e,finished:t,cancelled:n}),Z=e=>({value:e,cancelled:!0,finished:!1});function ln(e,t,n,r){let{callId:i,parentId:a,onRest:s}=t,{asyncTo:c,promise:l}=n;return!a&&e===c&&!t.reset?l:n.promise=(async()=>{n.asyncId=i,n.asyncTo=e;let u=Ht(t,(e,t)=>t===`onRest`?void 0:e),d,f,p=new Promise((e,t)=>(d=e,f=t)),m=e=>{let t=i<=(n.cancelId||0)&&Z(r)||i!==n.asyncId&&X(r,!1);if(t)throw e.result=t,f(e),e},h=0,g=(e,t)=>{let a=new dn,o=new fn;return(async()=>{m(a);let s=E.obj(e)?{...e}:{...t,to:e};if(s.parentId=i,k(u,(e,t)=>{E.und(s[t])&&(s[t]=e)}),P.skipAnimation){if(++h>1024)throw un(n),o.result=X(r,!1),f(o),o;return s.immediate=!0,await r.start(s)}let c=await r.start(s);return m(a),n.paused&&await new Promise(e=>{n.resumeQueue.add(e)}),c})()},_;
1try{let t;t=E.arr(e)?(async e=>{for(let t of e)await g(t)})(e):Promise.resolve(e(g,r.stop.bind(r))),await Promise.all([t.then(d),p]),_=X(r.get(),!0,!1)}catch(e){if(e instanceof dn)_=e.result;else if(e instanceof fn)_=e.result;else throw e}finally{i==n.asyncId&&(n.asyncId=a,n.asyncTo=a?c:void 0,n.promise=a?l:void 0)}return E.fun(s)&&o.batchedUpdates(()=>{s(_,r,r.item)}),_})()}function un(e,t){j(e.timeouts,e=>e.cancel()),e.pauseQueue.clear(),e.resumeQueue.clear(),e.asyncId=e.asyncTo=e.promise=void 0,t&&(e.cancelId=t)}var dn=class extends Error{constructor(){super("An async animation has been interrupted. You see this error because you forgot to use `await` or `.catch(...)` on its returned promise.")}},fn=class extends Error{constructor(){super(`SkipAnimationSignal`)}},pn=e=>e instanceof hn,mn=1,hn=class extends Ke{constructor(...e){super(...e),this.id=mn++,this._priority=0}get priority(){return this._priority}set priority(e){this._priority!=e&&(this._priority=e,this._onPriorityChange(e))}get(){let e=J(this);return e&&e.getValue()}to(...e){return P.to(this,e)}interpolate(...e){return lt(),P.to(this,e)}toJSON(){return this.get()}observerAdded(e){e==1&&this._attach()}observerRemoved(e){e==0&&this._detach()}_attach(){}_detach(){}_onChange(e,t=!1){W(this,{type:`change`,parent:this,value:e,idle:t})}_onPriorityChange(e){this.idle||L.sort(this),W(this,{type:`priority`,parent:this,priority:e})}},Q=Symbol.for(`SpringPhase`),gn=1,_n=2,vn=4,yn=e=>(e[Q]&gn)>0,$=e=>(e[Q]&_n)>0,bn=e=>(e[Q]&vn)>0,xn=(e,t)=>t?e[Q]|=3:e[Q]&=-3,Sn=(e,t)=>t?e[Q]|=vn:e[Q]&=-5,Cn=class extends hn{constructor(e,t){if(super(),this.animation=new an,this.defaultProps={},this._state={paused:!1,delayed:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._pendingCalls=new Set,this._lastCallId=0,this._lastToId=0,this._memoizedDuration=0,!E.und(e)||!E.und(t)){let n=E.obj(e)?{...e}:{...t,from:e};E.und(n.default)&&(n.default=!0),this.start(n)}}get idle(){return!($(this)||this._state.asyncTo)||bn(this)}get goal(){return U(this.animation.to)}get velocity(){let e=J(this);return e instanceof Ct?e.lastVelocity||0:e.getPayload().map(e=>e.lastVelocity||0)}get hasAnimated(){return yn(this)}get isAnimating(){return $(this)}get isPaused(){return bn(this)}get isDelayed(){return this._state.delayed}advance(e){let t=!0,n=!1,r=this.animation,{toValues:i}=r,{config:a}=r,o=xt(r.to);!o&&H(r.to)&&(i=A(U(r.to))),r.values.forEach((s,c)=>{if(s.done)return;let l=s.constructor==wt?1:o?o[c].lastPosition:i[c],u=r.immediate,d=l;if(!u){if(d=s.lastPosition,a.tension<=0){s.done=!0;return}let t=s.elapsedTime+=e,n=r.fromValues[c],i=s.v0==null?s.v0=E.arr(a.velocity)?a.velocity[c]:a.velocity:s.v0,o,f=a.precision||(n==l?.005:Math.max(Math.max(Math.abs(l),Math.abs(n),1)*2**-52,Math.min(1,Math.abs(l-n)*.001)));if(!E.und(a.duration)){let r=1;a.duration>0&&(this._memoizedDuration!==a.duration&&(this._memoizedDuration=a.duration,s.durationProgress>0&&(s.elapsedTime=a.duration*s.durationProgress,t=s.elapsedTime+=e)),r=(a.progress||0)+t/this._memoizedDuration,r=r>1?1:r<0?0:r,s.durationProgress=r),d=n+a.easing(r)*(l-n),o=(d-s.lastPosition)/e,u=r==1}else if(a.decay){let e=a.decay===!0?.998:a.decay,r=Math.exp(-(1-e)*t);d=n+i/(1-e)*(1-r),u=Math.abs(s.lastPosition-d)<=f,o=i*r}else{o=s.lastVelocity==null?i:s.lastVelocity;let t=a.restVelocity||f/10,r=a.clamp?0:a.bounce,c=!E.und(r),p=n==l?s.v0>0:n<l,m,h=!1,g=Math.ceil(e/1);for(let e=0;e<g&&(m=Math.abs(o)>t,!(!m&&(u=Math.abs(l-d)<=f,u)));++e){c&&(h=d==l||d>l==p,h&&(o=-o*r,d=l));let e=(-a.tension*1e-6*(d-l)+-a.friction*.001*o)/a.mass;o+=e*1,d+=o*1}}s.lastVelocity=o,Number.isNaN(d)&&(console.warn(`Got NaN while animating:`,this),u=!0)}o&&!o[c].done&&(u=!1),u?s.done=!0:t=!1,s.setValue(d,a.round)&&(n=!0)});let s=J(this),c=s.getValue();if(t){let e=U(r.to);(c!==e||n)&&!a.decay?(s.setValue(e),this._onChange(e)):n&&a.decay&&this._onChange(c),this._stop()}else n&&this._onChange(c)}set(e){return o.batchedUpdates(()=>{this._stop(),this._focus(e),this._set(e)}),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if($(this)){let{to:e,config:t}=this.animation;o.batchedUpdates(()=>{this._onStart(),t.decay||this._set(e,!1),this._stop()})}return this}update(e){return(this.queue||=[]).push(e),this}start(e,t){let n;return E.und(e)?(n=this.queue||[],this.queue=[]):n=[E.obj(e)?e:{...t,to:e}],Promise.all(n.map(e=>this._update(e))).then(e=>sn(this,e))}stop(e){let{to:t}=this.animation;return E.und(t)||this._focus(this.get()),un(this._state,e&&this._lastCallId),o.batchedUpdates(()=>this._stop(t,e)),this}reset(){this._update({reset:!0})}eventObserved(e){e.type==`change`?this._start():e.type==`priority`&&(this.priority=e.priority+1)}_prepareNode(e){let t=this.key||``,{to:n,from:r}=e;n=E.obj(n)?n[t]:n,(n==null||Yt(n))&&(n=void 0),r=E.obj(r)?r[t]:r,r??=void 0;let i={to:n,from:r};return yn(this)||(e.reverse&&([n,r]=[r,n]),r=U(r),E.und(r)?J(this)||this._set(n):this._set(r)),i}_update({...e},t){let{key:n,defaultProps:r}=this;e.default&&Object.assign(r,Ht(e,(e,t)=>/^on/.test(t)?zt(e,n):e)),An(this,e,`onProps`),jn(this,`onProps`,e,this);let i=this._prepareNode(e);if(Object.isFrozen(this))throw Error("Cannot animate a `SpringValue` object that is frozen. Did
1you forget to pass your component to `animated(...)` before animating its props?");let a=this._state;return on(++this._lastCallId,{key:n,props:e,defaultProps:r,state:a,actions:{pause:()=>{bn(this)||(Sn(this,!0),M(a.pauseQueue),jn(this,`onPause`,X(this,wn(this,this.animation.to)),this))},resume:()=>{bn(this)&&(Sn(this,!1),$(this)&&this._resume(),M(a.resumeQueue),jn(this,`onResume`,X(this,wn(this,this.animation.to)),this))},start:this._merge.bind(this,i)}}).then(n=>{if(e.loop&&n.finished&&!(t&&n.noop)){let t=Tn(e);if(t)return this._update(t,!0)}return n})}_merge(e,t,n){if(t.cancel)return this.stop(!0),n(Z(this));let r=!E.und(e.to),i=!E.und(e.from);if(r||i){if(t.callId>this._lastToId)this._lastToId=t.callId;else return n(Z(this))}let{key:a,defaultProps:s,animation:c}=this,{to:l,from:u}=c,{to:d=l,from:f=u}=e;i&&!r&&(!t.default||E.und(d))&&(d=f),t.reverse&&([d,f]=[f,d]);let p=!D(f,u);p&&(c.from=f),f=U(f);let m=!D(d,l);m&&this._focus(d);let h=Yt(t.to),{config:g}=c,{decay:_,velocity:v}=g;(r||i)&&!g.decay&&(g.velocity=0),t.config&&!h&&tn(g,Y(t.config,a),t.config===s.config?void 0:Y(s.config,a));let y=J(this);if(!y||E.und(d))return n(X(this,!0));let b=E.und(t.reset)?i&&!t.default:!E.und(f)&&Rt(t.reset,a),x=b?f:this.get(),S=qt(d),ee=E.num(S)||E.arr(S)||ft(S),C=!h&&(!ee||Rt(s.immediate||t.immediate,a));if(m){let e=kt(d);if(e!==y.constructor){if(C)y=this._set(S);else throw Error(`Cannot animate between ${y.constructor.name} and ${e.name}, as the "to" prop suggests`)}}let w=y.constructor,T=H(d),k=!1;if(!T){let e=b||!yn(this)&&p;(m||e)&&(k=D(qt(x),S),T=!k),(!D(c.immediate,C)&&!C||!D(g.decay,_)||!D(g.velocity,v))&&(T=!0)}if(k&&$(this)&&(c.changed&&!b?T=!0:T||this._stop(l)),!h&&((T||H(l))&&(c.values=y.getPayload(),c.toValues=H(d)?null:w==wt?[1]:A(S)),c.immediate!=C&&(c.immediate=C,!C&&!b&&this._set(l)),T)){let{onRest:e}=c;O(kn,e=>An(this,t,e));let r=X(this,wn(this,l));M(this._pendingCalls,r),this._pendingCalls.add(n),c.changed&&o.batchedUpdates(()=>{c.changed=!b,e?.(r,this),b?Y(s.onRest,r):c.onStart?.(r,this)})}b&&this._set(x),h?n(ln(t.to,t,this._state,this)):T?this._start():$(this)&&!m?this._pendingCalls.add(n):n(cn(x))}_focus(e){let t=this.animation;e!==t.to&&(We(this)&&this._detach(),t.to=e,We(this)&&this._attach())}_attach(){let e=0,{to:t}=this.animation;H(t)&&(G(t,this),pn(t)&&(e=t.priority+1)),this.priority=e}_detach(){let{to:e}=this.animation;H(e)&&K(e,this)}_set(e,t=!0){let n=U(e);if(!E.und(n)){let e=J(this);if(!e||!D(n,e.getValue())){let r=kt(n);!e||e.constructor!=r?bt(this,r.create(n)):e.setValue(n),e&&o.batchedUpdates(()=>{this._onChange(n,t)})}}return J(this)}_onStart(){let e=this.animation;e.changed||(e.changed=!0,jn(this,`onStart`,X(this,wn(this,e.to)),this))}_onChange(e,t){let n=X(e,!1);t||(this._onStart(),Y(this.animation.onChange,n,this)),Y(this.defaultProps.onChange,n,this),super._onChange(e,t)}_start(){let e=this.animation;J(this).reset(U(e.to)),e.immediate||(e.fromValues=e.values.map(e=>e.lastPosition)),$(this)||(xn(this,!0),bn(this)||this._resume())}_resume(){P.skipAnimation?this.finish():L.start(this)}_stop(e,t){if($(this)){xn(this,!1);let n=this.animation;O(n.values,e=>{e.done=!0}),n.toValues&&(n.onChange=n.onPause=n.onResume=void 0),W(this,{type:`idle`,parent:this});let r=t?Z(this.get()):X(this.get(),wn(this,e??n.to));M(this._pendingCalls,r),n.changed=!1,jn(this,`onRest`,r,this)}}};function wn(e,t){let n=qt(t);return D(qt(e.get()),n)}function Tn(e,t=e.loop,n=e.to){let r=Y(t);if(r){let i=r!==!0&&Kt(r),a=(i||e).reverse,o=!i||i.reset;return En({...e,loop:t,default:!1,pause:void 0,to:!a||Yt(n)?n:void 0,from:o?e.from:void 0,reset:o,...i})}}function En(e){let{to:t,from:n}=e=Kt(e),r=new Set;return E.obj(t)&&On(t,r),E.obj(n)&&On(n,r),e.keys=r.size?Array.from(r):null,e}function Dn(e){let t=En(e);return E.und(t.default)&&(t.default=Ht(t)),t}function On(e,t){k(e,(e,n)=>e!=null&&t.add(n))}var kn=[`onStart`,`onRest`,`onChange`,`onPause`,`onResume`];function An(e,t,n){e.animation[n]=t[n]===Bt(t,n)?void 0:zt(t[n],e.key)}function jn(e,t,...n){e.animation[t]?.(...n),e.defaultProps[t]?.(...n)}var Mn=[`onStart`,`onChange`,`onRest`],Nn=1,Pn=class{constructor(e,t){this.id=Nn++,this.springs={},this.queue=[],this._lastAsyncId=0,this._lastLoopId=0,this._active=new Set,this._changed=new Set,this._started=!1,this._state={paused:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._events={onStart:new Map,onChange:new Map,onRest:new Map},this._onFrame=this._onFrame.bind(this),t&&(this._flush=t),e&&this.start({default:!0,...e})}get idle(){return!this._state.asyncTo&&Object.values(this.springs).every(e=>e.idle&&!e.isDelayed&&!e.isPaused)}get item(){return this._item}set item(e){this._item=e}get(){let e={};return this.each((t,n)=>e[n]=t.get()),e}set(e){for(let t in e){let n=e[t];E.und(n)||this.springs[t].set(n)}}update(e){return e&&this.queue.push(En(e)),this}start(e){let{queue:t}=this;return e?t=A(e).map(En):this.queue=[],this._flush?this._flush(this,t):(Vn(this,t),Fn(this,t))}stop(e,t){if(e!==!!e&&(t=e),t){let n=this.springs;O(A(t),t=>n[t].stop(!!e))}else un(this._state,this._lastAsyncId),this.each(t=>t.stop(!!e));return this}pause(e){if(E.und(e))this.start({pause:!0});else{let t=this.springs;O(A(e),e=>t[e].pause())}return this}resume(e){if(E.und(e))this.start({pause:!1});else{let t=this.springs;O(A(e),e=>t[e].resume())}return this}each(e){k(this.springs,e)}onLoopReset(e){let t=this._onLoopReset??=new Set;return t.add(e),()=>{t.delete(e)}}_onFrame(){let{onStart:e,onChange:t,onRest:n}=this._events,r=this._active.size>0,i=this._changed.size>0;(r&&!this._started||i&&!this._started)&&(this._started=!0,j(e,([e,t])=>{t.value=this.get(),e(t,this,this._item)}));let a=!r&&this._started,o=i||a&&n.size?this.get():null;i&&t.size&&j(t,([e,t])=>{t.value=o,e(t,this,this._item)}),a&&(this._started=!1,j(n,([e,t])=>{t.value=o,e(t,this,this._item)}))}eventObserved(e){if(e.type==`change`)this._changed.add(e.parent),e.idle||this._active.add(e.parent);else if(e.type==`idle`)this._active.delete(e.parent);else return;o.onFrame(this._onFrame)}};function Fn(e,t){return Promise.all(t.map(t=>In(e,t))).then(t=>sn(e,t))}async function In(e,t,n){let{keys:r,to:i,from:a,loop:s,onRest:c,onResolve:l}=t,u=E.obj(t.default)&&t.default;s&&(t.loop=!1);let d=t,f=!n&&!d.parentId&&`loop`in t?++e._lastLoopId:n?d.loopId:e._lastLoopId;i===!1&&(t.to=null),a===!1&&(t.from=null);let p=E.arr(i)||E.fun(i)?i:void 0;p?(t.to=void 0,t.onRest=void 0,u&&(u.onRest=void 0)):O(Mn,n=>{let r=t[n];if(E.fun(r)){let i=e._events[n];t[n]=(({finished:e,cancelled:t})=>{let n=i.get(r);n?(e||(n.finished=!1),t&&(n.cancelled=!0)):i.set(r,{value:null,finished:e||!1,cancelled:t||!1})}),u&&(u[n]=t[n])}});let m=e._state;t.pause===!m.paused?(m.paused=t.pause,M(t.pause?m.pauseQueue:m.resumeQueue)):m.paused&&(t.pause=!0);let h=(r||Object.keys(e.springs)).map(n=>e.springs[n].start(t)),g=t.cancel===!0||Bt(t,`cancel`)===!0;(p||g&&m.asyncId)&&h.push(on(++e._lastAsyncId,{props:t,state:m,actions:{pause:w,resume:w,start(t,n){g?(un(m,e._lastAsyncId),n(Z(e))):(t.onRest=c,n(ln(
1p,t,m,e)))}}})),m.paused&&await new Promise(e=>{m.resumeQueue.add(e)});let _=sn(e,await Promise.all(h));if(s&&_.finished&&!(n&&_.noop)&&f===e._lastLoopId){let n=Tn(t,s,i);if(n)return n.loopId=f,e._onLoopReset?.forEach(e=>e()),Vn(e,[n]),In(e,n,!0)}return l&&o.batchedUpdates(()=>l(_,e,e.item)),_}function Ln(e,t){let n={...e.springs};return t&&O(A(t),e=>{E.und(e.keys)&&(e=En(e)),E.obj(e.to)||(e={...e,to:void 0}),Bn(n,e,e=>zn(e))}),Rn(e,n),n}function Rn(e,t){k(t,(t,n)=>{e.springs[n]||(e.springs[n]=t,G(t,e))})}function zn(e,t){let n=new Cn;return n.key=e,t&&G(n,t),n}function Bn(e,t,n){t.keys&&O(t.keys,r=>{(e[r]||(e[r]=n(r)))._prepareNode(t)})}function Vn(e,t){O(t,t=>{Bn(e.springs,t,t=>zn(t,e))})}var Hn=C.createContext({pause:!1,immediate:!1}),Un=()=>{let e=[],t=function(t){dt();let r=[];return O(e,(e,i)=>{if(E.und(t))r.push(e.start());else{let a=n(t,e,i);a&&r.push(e.start(a))}}),r};t.current=e,t.add=function(t){e.includes(t)||e.push(t)},t.delete=function(t){let n=e.indexOf(t);~n&&e.splice(n,1)},t.pause=function(){return O(e,e=>e.pause(...arguments)),this},t.resume=function(){return O(e,e=>e.resume(...arguments)),this},t.set=function(t){O(e,(e,n)=>{let r=E.fun(t)?t(n,e):t;r&&e.set(r)})},t.start=function(t){let n=[];return O(e,(e,r)=>{if(E.und(t))n.push(e.start());else{let i=this._getProps(t,e,r);i&&n.push(e.start(i))}}),n},t.stop=function(){return O(e,e=>e.stop(...arguments)),this},t.update=function(t){return O(e,(e,n)=>e.update(this._getProps(t,e,n))),this};let n=function(e,t,n){return E.fun(e)?e(n,t):e};return t._getProps=n,t};function Wn(e,t,n){let r=E.fun(t)&&t;r&&!n&&(n=[]);let i=(0,C.useMemo)(()=>r||arguments.length==3?Un():void 0,[]),a=(0,C.useRef)(0),o=mt(),s=(0,C.useMemo)(()=>({ctrls:[],queue:[],flush(e,t){let n=Ln(e,t);return a.current>0&&!s.queue.length&&!Object.keys(n).some(t=>!e.springs[t])?Fn(e,t):new Promise(r=>{Rn(e,n),s.queue.push(()=>{r(Fn(e,t))}),o()})}}),[]),c=(0,C.useRef)([...s.ctrls]),l=(0,C.useRef)([]),u=(0,C.useRef)([]);u.current=[];let d=_t(e)||0;(0,C.useMemo)(()=>{O(c.current.slice(e,d),e=>{Xt(e,i),e.stop(!0)}),c.current.length=e,f(d,e)},[e]),(0,C.useMemo)(()=>{f(0,Math.min(d,e))},n);function f(e,n){for(let i=e;i<n;i++){let e=c.current[i]||(c.current[i]=new Pn(null,s.flush)),n=r?r(i,e):t[i];n&&(l.current[i]=Dn(n))}}let p=c.current.map((e,t)=>Ln(e,l.current[t])),m=(0,C.useContext)(Hn),h=m!==_t(m)&&Jt(m);q(()=>{a.current++,s.ctrls=c.current;let{queue:e}=s;e.length&&(s.queue=[],O(e,e=>e()));let t=l.current.length>0?l.current:u.current;O(c.current,(e,n)=>{i?.add(e),h&&e.start({default:m});let r=t[n];r&&(Zt(e,r.ref),e.ref?e.queue.push({...r,default:E.obj(r.default)?{...r.default}:r.default}):e.start(r))}),l.current.length>0&&(u.current=l.current),l.current=[]}),ht(()=>()=>{O(s.ctrls,e=>e.stop(!0))});let g=p.map(e=>({...e}));return i?[g,i]:g}function Gn(e,t){let n=E.fun(e),[[r],i]=Wn(1,n?e:[e],n?t||[]:t);return n||arguments.length==2?[r,i]:r}function Kn(e,t,n){let r=E.fun(t)&&t,{reset:i,sort:a,trail:o=0,reverse:s=!1,expires:c=!0,exitBeforeEnter:l=!1,onDestroyed:u,ref:d,config:f}=r?r():t,p=(0,C.useMemo)(()=>r||arguments.length==3?Un():void 0,[]),m=A(e),h=[],g=(0,C.useRef)(null),_=i?null:g.current;q(()=>{g.current=h}),ht(()=>(O(h,e=>{p?.add(e.ctrl),e.ctrl.ref=void 0}),()=>{O(g.current,e=>{e.expired&&clearTimeout(e.expirationId),Xt(e.ctrl,p),e.ctrl.stop(!0)})}));let v=Jn(m,r?r():t,_),y=i&&g.current||[];q(()=>O(y,({ctrl:e,item:t,key:n})=>{Xt(e,p),Y(u,t,n)}));let b=[];if(_&&O(_,(e,t)=>{e.expired?(clearTimeout(e.expirationId),y.push(e)):(t=b[t]=v.indexOf(e.key),~t&&(h[t]=e))}),O(m,(e,t)=>{h[t]||(h[t]={key:v[t],item:e,phase:`mount`,ctrl:new Pn},h[t].ctrl.item=e)}),b.length){let e=-1,{leave:n}=r?r():t;O(b,(t,r)=>{let i=_[r];~t?(e=h.indexOf(i),h[e]={...i,item:m[t]}):n&&h.splice(++e,0,i)})}E.fun(a)&&h.sort((e,t)=>a(e.item,t.item));let x=-o,S=[],ee=mt(),w=Ht(t),T=new Map,D=(0,C.useRef)(new Map),k=(0,C.useRef)(!1);if(O(h,(e,n)=>{let i=e.key,a=e.phase,s=r?r():t,u,p,m=Y(s.delay||0,i);if(a==`mount`)u=s.enter,p=`enter`;else{let e=v.indexOf(i)<0;if(a!=`leave`){if(e)u=s.leave,p=`leave`;else if(u=s.update)p=`update`;else return}else if(!e)u=s.enter,p=`enter`;else return}if(u=Y(u,e.item,n),u=E.obj(u)?Kt(u):{to:u},!u.config){let t=f||w.config;u.config=Y(t,e.item,n,p)}x+=o;let h={...w,delay:m+x,ref:d,immediate:s.immediate,reset:!1,...u};if(p==`enter`&&E.und(h.from)){let i=r?r():t;h.from=Y(E.und(i.initial)||_?i.from:i.initial,e.item,n)}
1let{onResolve:y}=h;h.onResolve=e=>{Y(y,e);let t=g.current,n=t.find(e=>e.key===i);if(n&&!(e.cancelled&&n.phase!=`update`)&&n.ctrl.idle){let e=t.every(e=>e.ctrl.idle);if(n.phase==`leave`){D.current.delete(n);let t=Y(c,n.item);if(t!==!1){let r=t===!0?0:t;if(n.expired=!0,!e&&r>0){r<=2147483647&&(n.expirationId=setTimeout(ee,r));return}}}e&&t.some(e=>e.expired)&&(l&&(k.current=!0),ee())}};let b=Ln(e.ctrl,h);S.push({payload:h,propsDelay:m}),p===`leave`&&l?D.current.set(e,{phase:p,springs:b,payload:h}):T.set(e,{phase:p,springs:b,payload:h})}),s&&o){let e=S.length;O(S,({payload:t,propsDelay:n},r)=>{t.delay=n+(e-1-r)*o})}let j=(0,C.useContext)(Hn),M=j!==_t(j)&&Jt(j);q(()=>{M&&O(h,e=>{e.ctrl.start({default:j})})},[j]),O(T,(e,t)=>{if(D.current.size){let e=h.findIndex(e=>e.key===t.key);h.splice(e,1)}}),q(()=>{O(D.current.size?D.current:T,({phase:e,payload:t},n)=>{let{ctrl:r}=n;n.phase=e,p?.add(r),M&&e==`enter`&&r.start({default:j}),t&&(Zt(r,t.ref),r.ref&&!k.current?r.update(t):(r.start(t),k.current&&=!1))})},i?void 0:n);let N=e=>C.createElement(C.Fragment,null,h.map((t,n)=>{let r=T.get(t)||D.current.get(t),{springs:i}=r||t.ctrl,a=r?{...t,phase:r.phase}:t,o=e({...i},t.item,a,n),s=E.str(t.key)||E.num(t.key)?t.key:t.ctrl.id,c=o?.props??{},l=c?.ref;return o&&o.type?C.createElement(o.type,{...c,key:s,ref:l}):o}));return p?[N,p]:N}var qn=1;function Jn(e,{key:t,keys:n=t},r){if(n===null){let t=new Set;return e.map(e=>{let n=r&&r.find(n=>n.item===e&&n.phase!==`leave`&&!t.has(n));return n?(t.add(n),n.key):qn++})}return E.und(n)?e:E.fun(n)?e.map(n):A(n)}var Yn=class extends hn{constructor(e,t){super(),this.source=e,this.idle=!0,this._active=new Set,this.calc=B(...t);let n=this._get(),r=kt(n);bt(this,r.create(n))}advance(e){let t=this._get();D(t,this.get())||(J(this).setValue(t),this._onChange(t,this.idle)),!this.idle&&Zn(this._active)&&Qn(this)}_get(){let e=E.arr(this.source)?this.source.map(U):A(U(this.source));return this.calc(...e)}_start(){this.idle&&!Zn(this._active)&&(this.idle=!1,O(xt(this),e=>{e.done=!1}),P.skipAnimation?(o.batchedUpdates(()=>this.advance()),Qn(this)):L.start(this))}_attach(){let e=1;O(A(this.source),t=>{H(t)&&G(t,this),pn(t)&&(t.idle||this._active.add(t),e=Math.max(e,t.priority+1))}),this.priority=e,this._start()}_detach(){O(A(this.source),e=>{H(e)&&K(e,this)}),this._active.clear(),Qn(this)}eventObserved(e){e.type==`change`?e.idle?this.advance():(this._active.add(e.parent),this._start()):e.type==`idle`?this._active.delete(e.parent):e.type==`priority`&&(this.priority=A(this.source).reduce((e,t)=>Math.max(e,(pn(t)?t.priority:0)+1),0))}};function Xn(e){return e.idle!==!1}function Zn(e){return!e.size||Array.from(e).every(Xn)}function Qn(e){e.idle||(e.idle=!0,O(xt(e),e=>{e.done=!0}),W(e,{type:`idle`,parent:e}))}var $n=(e,...t)=>new Yn(e,t);P.assign({createStringInterpolator:at,to:(e,t)=>new Yn(e,t)}),L.advance;var er=e(n(),1),tr=/^--/;function nr(e,t){return t==null||typeof t==`boolean`||t===``?``:typeof t==`number`&&t!==0&&!tr.test(e)&&!(ar.hasOwnProperty(e)&&ar[e])?t+`px`:(``+t).trim()}var rr={};function ir(e,t){if(!e.nodeType||!e.setAttribute||!e.removeAttribute)return!1;let n=e.nodeName===`filter`||e.parentNode&&e.parentNode.nodeName===`filter`,{className:r,style:i,children:a,scrollTop:o,scrollLeft:s,viewBox:c,...l}=t,u=Object.values(l),d=Object.keys(l).map(t=>n||e.hasAttribute(t)?t:rr[t]||(rr[t]=t.replace(/([A-Z])/g,e=>`-`+e.toLowerCase())));t.hasOwnProperty(`children`)&&(e.textContent=a);for(let t in i)if(i.hasOwnProperty(t)){let n=nr(t,i[t]);tr.test(t)?e.style.setProperty(t,n):e.style[t]=n}d.forEach((t,n)=>{let r=u[n];r===void 0?e.removeAttribute(t):e.setAttribute(t,r)}),t.hasOwnProperty(`className`)&&(r===void 0?e.removeAttribute(`class`):e.className=r),o!==void 0&&(e.scrollTop=o),s!==void 0&&(e.scrollLeft=s),t.hasOwnProperty(`viewBox`)&&(c===void 0?e.removeAttribute(`viewBox`):e.setAttribute(`viewBox`,c))}var ar={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},or=(e,t)=>
1e+t.charAt(0).toUpperCase()+t.substring(1),sr=[`Webkit`,`Ms`,`Moz`,`O`];ar=Object.keys(ar).reduce((e,t)=>(sr.forEach(n=>e[or(n,t)]=e[t]),e),ar);var cr=/^(matrix3d|matrix|translate3d|translate[XYZ]?|scale3d|scale[XYZ]?|rotate3d|rotate[XYZ]?|skew[XY]?)$/,lr=/^(translate)/,ur=/^(rotate|skew)/,dr=(e,t)=>E.num(e)&&e!==0?e+t:e,fr=(e,t)=>E.arr(e)?e.every(e=>fr(e,t)):E.num(e)?e===t:parseFloat(e)===t,pr=class extends Et{constructor({x:e,y:t,z:n,...r}){let i=[],a=[];(e||t||n)&&(i.push([e||0,t||0,n||0]),a.push(e=>[`translate3d(${e.map(e=>dr(e,`px`)).join(`,`)})`,fr(e,0)])),k(r,(e,t)=>{if(t===`transform`)i.push([e||``]),a.push(e=>[e,e===``]);else if(cr.test(t)){if(delete r[t],E.und(e))return;let n=lr.test(t)?`px`:ur.test(t)?`deg`:``;i.push(A(e)),a.push(t===`rotate3d`?([e,t,r,i])=>[`rotate3d(${e},${t},${r},${dr(i,n)})`,fr(i,0)]:e=>[`${t}(${e.map(e=>dr(e,n)).join(`,`)})`,fr(e,+!!t.startsWith(`scale`))])}}),i.length&&(r.transform=new mr(i,a)),super(r)}},mr=class extends Ke{constructor(e,t){super(),this.inputs=e,this.transforms=t,this._value=null}get(){return this._value||=this._get()}_get(){let e=``,t=!0;return O(this.inputs,(n,r)=>{let i=U(n[0]),[a,o]=this.transforms[r](E.arr(i)?i:n.map(U));e+=` `+a,t&&=o}),t?`none`:e}observerAdded(e){e==1&&O(this.inputs,e=>O(e,e=>H(e)&&G(e,this)))}observerRemoved(e){e==0&&O(this.inputs,e=>O(e,e=>H(e)&&K(e,this)))}eventObserved(e){e.type==`change`&&(this._value=null),W(this,e)}},hr=`a.abbr.address.area.article.aside.audio.b.base.bdi.bdo.big.blockquote.body.br.button.canvas.caption.cite.code.col.colgroup.data.datalist.dd.del.details.dfn.dialog.div.dl.dt.em.embed.fieldset.figcaption.figure.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.iframe.img.input.ins.kbd.keygen.label.legend.li.link.main.map.mark.menu.menuitem.meta.meter.nav.noscript.object.ol.optgroup.option.output.p.param.picture.pre.progress.q.rp.rt.ruby.s.samp.script.section.select.small.source.span.strong.style.sub.summary.sup.table.tbody.td.textarea.tfoot.th.thead.time.title.tr.track.u.ul.var.video.wbr.circle.clipPath.defs.ellipse.foreignObject.g.image.line.linearGradient.mask.path.pattern.polygon.polyline.radialGradient.rect.stop.svg.text.tspan`.split(`.`);P.assign({batchedUpdates:er.unstable_batchedUpdates,createStringInterpolator:at,colors:he});var gr=It(hr,{applyAnimatedValues:ir,createAnimatedStyle:e=>new pr(e),getComponentProps:({scrollTop:e,scrollLeft:t,...n})=>n}).animated;export{Kn as a,Gn as i,Qt as n,P as o,$n as r,gr as t}; 2//# sourceMappingURL=react-spring_web.modern-C6ohYUSs.js.map
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.