mirror of
https://github.com/detleph/components.git
synced 2026-09-04 08:36:03 +02:00
26 lines
104 KiB
JavaScript
26 lines
104 KiB
JavaScript
var pi=Object.defineProperty;var r=(t,e)=>pi(t,"name",{value:e,configurable:!0});import{R as mi}from"./index.6b673aa6.js";import{r as x,R as Ds,a as Ms,j as I,F as _e}from"./jsx-runtime.ed5c3280.js";import"./iframe.95c22648.js";const Xe=x.exports.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"}),he=x.exports.createContext({});function gi(){return x.exports.useContext(he).visualElement}r(gi,"useVisualElementContext");const jt=x.exports.createContext(null),ut=typeof document<"u",te=ut?x.exports.useLayoutEffect:x.exports.useEffect,Ls=x.exports.createContext({strict:!1});function yi(t,e,n,s){const o=gi(),a=x.exports.useContext(Ls),i=x.exports.useContext(jt),l=x.exports.useContext(Xe).reducedMotion,c=x.exports.useRef(void 0);s=s||a.renderer,!c.current&&s&&(c.current=s(t,{visualState:e,parent:o,props:n,presenceId:i?i.id:void 0,blockInitialAnimation:i?i.initial===!1:!1,reducedMotionConfig:l}));const u=c.current;return te(()=>{u&&u.syncRender()}),x.exports.useEffect(()=>{u&&u.animationState&&u.animationState.animateChanges()}),te(()=>()=>u&&u.notifyUnmount(),[]),u}r(yi,"useVisualElement");function mt(t){return typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}r(mt,"isRefObject");function vi(t,e,n){return x.exports.useCallback(s=>{s&&t.mount&&t.mount(s),e&&(s?e.mount(s):e.unmount()),n&&(typeof n=="function"?n(s):mt(n)&&(n.current=s))},[e])}r(vi,"useMotionRef");function Ot(t){return typeof t=="string"||Array.isArray(t)}r(Ot,"isVariantLabel");function pe(t){return typeof t=="object"&&typeof t.start=="function"}r(pe,"isAnimationControls");const xi=["initial","animate","exit","whileHover","whileDrag","whileTap","whileFocus","whileInView"];function me(t){return pe(t.animate)||xi.some(e=>Ot(t[e]))}r(me,"isControllingVariants");function Os(t){return Boolean(me(t)||t.variants)}r(Os,"isVariantNode");function bi(t,e){if(me(t)){const{initial:n,animate:s}=t;return{initial:n===!1||Ot(n)?n:void 0,animate:Ot(s)?s:void 0}}return t.inherit!==!1?e:{}}r(bi,"getCurrentTreeVariants");function Ti(t){const{initial:e,animate:n}=bi(t,x.exports.useContext(he));return x.exports.useMemo(()=>({initial:e,animate:n}),[wn(e),wn(n)])}r(Ti,"useCreateMotionContext");function wn(t){return Array.isArray(t)?t.join(" "):t}r(wn,"variantLabelsAsDependency");const Y=r(t=>({isEnabled:e=>t.some(n=>!!e[n])}),"createDefinition"),Et={measureLayout:Y(["layout","layoutId","drag"]),animation:Y(["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"]),exit:Y(["exit"]),drag:Y(["drag","dragControls"]),focus:Y(["whileFocus"]),hover:Y(["whileHover","onHoverStart","onHoverEnd"]),tap:Y(["whileTap","onTap","onTapStart","onTapCancel"]),pan:Y(["onPan","onPanStart","onPanSessionStart","onPanEnd"]),inView:Y(["whileInView","onViewportEnter","onViewportLeave"])};function Vi(t){for(const e in t)e==="projectionNodeConstructor"?Et.projectionNodeConstructor=t[e]:Et[e].Component=t[e]}r(Vi,"loadFeatures");function ge(t){const e=x.exports.useRef(null);return e.current===null&&(e.current=t()),e.current}r(ge,"useConstant");const Ct={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let Si=1;function wi(){return ge(()=>{if(Ct.hasEverUpdated)return Si++})}r(wi,"useProjectionId");const Je=x.exports.createContext({});class Es extends Ds.Component{getSnapshotBeforeUpdate(){const{visualElement:e,props:n}=this.props;return e&&e.setProps(n),null}componentDidUpdate(){}render(){return this.props.children}}r(Es,"VisualElementHandler");const _s=x.exports.createContext({}),Pi=Symbol.for("motionComponentSymbol");function Ci({preloadedFeatures:t,createVisualElement:e,projectionNodeConstructor:n,useRender:s,useVisualState:o,Component:a}){t&&Vi(t);function i(c,u){const f={...x.exports.useContext(Xe),...c,layoutId:Ai(c)},{isStatic:d}=f;let h=null;const p=Ti(c),g=d?void 0:wi(),b=o(c,d);if(!d&&ut){p.visualElement=yi(a,b,f,e);const V=x.exports.useContext(Ls).strict,P=x.exports.useContext(_s);p.visualElement&&(h=p.visualElement.loadFeatures(f,V,t,g,n||Et.projectionNodeConstructor,P))}return Ms(Es,{visualElement:p.visualElement,props:f,children:[h,I(he.Provider,{value:p,children:s(a,c,g,vi(b,p.visualElement,u),b,d,p.visualElement)})]})}r(i,"MotionComponent");const l=x.exports.forwardRef(i);return l[Pi]=a,l}r(Ci,"createMotionComponent");function Ai({layoutId:t}){const e=x.exports.useContext(Je).id;return e&&t!==void 0?e+"-"+t:t}r(Ai,"useLayoutId");function Ri(t){function e(s,o={}){return Ci(t(s,o))}if(r(e,"custom"),typeof Proxy>"u")return e;const n=new Map;return new Proxy(e,{get:(s,o)=>(n.has(o)||n.set(o,e(o)),n.get(o))})}r(Ri,"createMotionProxy");const Di=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","svg","switch","symbol","text","tspan","use","view"];function Qe(t){return typeof t!="string"||t.includes("-")?!1:!!(Di.indexOf(t)>-1||/[A-Z]/.test(t))}r(Qe,"isSVGComponent");const ee={};function Mi(t){Object.assign(ee,t)}r(Mi,"addScaleCorrector");const ne=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Bt=new Set(ne);function ks(t,{layout:e,layoutId:n}){return Bt.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!ee[t]||t==="opacity")}r(ks,"isForcedMotionValue");const $=r(t=>!!(t!=null&&t.getVelocity),"isMotionValue"),Li={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Oi=r((t,e)=>ne.indexOf(t)-ne.indexOf(e),"sortTransformProps");function Ei({transform:t,transformKeys:e},{enableHardwareAcceleration:n=!0,allowTransformNone:s=!0},o,a){let i="";e.sort(Oi);for(const l of e)i+=`${Li[l]||l}(${t[l]}) `;return n&&!t.z&&(i+="translateZ(0)"),i=i.trim(),a?i=a(t,o?"":i):s&&o&&(i="none"),i}r(Ei,"buildTransform");function Fs(t){return t.startsWith("--")}r(Fs,"isCSSVariable$1");const _i=r((t,e)=>e&&typeof t=="number"?e.transform(t):t,"getValueAsType"),Is=r((t,e)=>n=>Math.max(Math.min(n,e),t),"clamp$1"),At=r(t=>t%1?Number(t.toFixed(5)):t,"sanitize"),_t=/(-)?([\d]*\.?[\d])+/g,ke=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,ki=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function Ut(t){return typeof t=="string"}r(Ut,"isString");const ft={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},Rt=Object.assign(Object.assign({},ft),{transform:Is(0,1)}),zt=Object.assign(Object.assign({},ft),{default:1}),Nt=r(t=>({test:e=>Ut(e)&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),"createUnitType"),tt=Nt("deg"),W=Nt("%"),w=Nt("px"),Fi=Nt("vh"),Ii=Nt("vw"),Pn=Object.assign(Object.assign({},W),{parse:t=>W.parse(t)/100,transform:t=>W.transform(t*100)}),tn=r((t,e)=>n=>Boolean(Ut(n)&&ki.test(n)&&n.startsWith(t)||e&&Object.prototype.hasOwnProperty.call(n,e)),"isColorString"),js=r((t,e,n)=>s=>{if(!Ut(s))return s;const[o,a,i,l]=s.match(_t);return{[t]:parseFloat(o),[e]:parseFloat(a),[n]:parseFloat(i),alpha:l!==void 0?parseFloat(l):1}},"splitColor"),ct={test:tn("hsl","hue"),parse:js("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:s=1})=>"hsla("+Math.round(t)+", "+W.transform(At(e))+", "+W.transform(At(n))+", "+At(Rt.transform(s))+")"},ji=Is(0,255),Se=Object.assign(Object.assign({},ft),{transform:t=>Math.round(ji(t))}),st={test:tn("rgb","red"),parse:js("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+Se.transform(t)+", "+Se.transform(e)+", "+Se.transform(n)+", "+At(Rt.transform(s))+")"};function Bi(t){let e="",n="",s="",o="";return t.length>5?(e=t.substr(1,2),n=t.substr(3,2),s=t.substr(5,2),o=t.substr(7,2)):(e=t.substr(1,1),n=t.substr(2,1),s=t.substr(3,1),o=t.substr(4,1),e+=e,n+=n,s+=s,o+=o),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(s,16),alpha:o?parseInt(o,16)/255:1}}r(Bi,"parseHex");const Fe={test:tn("#"),parse:Bi,transform:st.transform},j={test:t=>st.test(t)||Fe.test(t)||ct.test(t),parse:t=>st.test(t)?st.parse(t):ct.test(t)?ct.parse(t):Fe.parse(t),transform:t=>Ut(t)?t:t.hasOwnProperty("red")?st.transform(t):ct.transform(t)},Bs="${c}",Us="${n}";function Ui(t){var e,n,s,o;return isNaN(t)&&Ut(t)&&((n=(e=t.match(_t))===null||e===void 0?void 0:e.length)!==null&&n!==void 0?n:0)+((o=(s=t.match(ke))===null||s===void 0?void 0:s.length)!==null&&o!==void 0?o:0)>0}r(Ui,"test");function Ns(t){typeof t=="number"&&(t=`${t}`);const e=[];let n=0;const s=t.match(ke);s&&(n=s.length,t=t.replace(ke,Bs),e.push(...s.map(j.parse)));const o=t.match(_t);return o&&(t=t.replace(_t,Us),e.push(...o.map(ft.parse))),{values:e,numColors:n,tokenised:t}}r(Ns,"analyse$1");function $s(t){return Ns(t).values}r($s,"parse");function zs(t){const{values:e,numColors:n,tokenised:s}=Ns(t),o=e.length;return a=>{let i=s;for(let l=0;l<o;l++)i=i.replace(l<n?Bs:Us,l<n?j.transform(a[l]):At(a[l]));return i}}r(zs,"createTransformer");const Ni=r(t=>typeof t=="number"?0:t,"convertNumbersToZero");function $i(t){const e=$s(t);return zs(t)(e.map(Ni))}r($i,"getAnimatableNone$1");const q={test:Ui,parse:$s,createTransformer:zs,getAnimatableNone:$i},zi=new Set(["brightness","contrast","saturate","opacity"]);function Hi(t){let[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[s]=n.match(_t)||[];if(!s)return t;const o=n.replace(s,"");let a=zi.has(e)?1:0;return s!==n&&(a*=100),e+"("+a+o+")"}r(Hi,"applyDefaultFilter");const Gi=/([a-z-]*)\(.*?\)/g,Ie=Object.assign(Object.assign({},q),{getAnimatableNone:t=>{const e=t.match(Gi);return e?e.map(Hi).join(" "):t}}),Cn={...ft,transform:Math.round},Hs={borderWidth:w,borderTopWidth:w,borderRightWidth:w,borderBottomWidth:w,borderLeftWidth:w,borderRadius:w,radius:w,borderTopLeftRadius:w,borderTopRightRadius:w,borderBottomRightRadius:w,borderBottomLeftRadius:w,width:w,maxWidth:w,height:w,maxHeight:w,size:w,top:w,right:w,bottom:w,left:w,padding:w,paddingTop:w,paddingRight:w,paddingBottom:w,paddingLeft:w,margin:w,marginTop:w,marginRight:w,marginBottom:w,marginLeft:w,rotate:tt,rotateX:tt,rotateY:tt,rotateZ:tt,scale:zt,scaleX:zt,scaleY:zt,scaleZ:zt,skew:tt,skewX:tt,skewY:tt,distance:w,translateX:w,translateY:w,translateZ:w,x:w,y:w,z:w,perspective:w,transformPerspective:w,opacity:Rt,originX:Pn,originY:Pn,originZ:w,zIndex:Cn,fillOpacity:Rt,strokeOpacity:Rt,numOctaves:Cn};function en(t,e,n,s){const{style:o,vars:a,transform:i,transformKeys:l,transformOrigin:c}=t;l.length=0;let u=!1,f=!1,d=!0;for(const h in e){const p=e[h];if(Fs(h)){a[h]=p;continue}const g=Hs[h],b=_i(p,g);if(Bt.has(h)){if(u=!0,i[h]=b,l.push(h),!d)continue;p!==(g.default||0)&&(d=!1)}else h.startsWith("origin")?(f=!0,c[h]=b):o[h]=b}if(e.transform||(u||s?o.transform=Ei(t,n,d,s):o.transform&&(o.transform="none")),f){const{originX:h="50%",originY:p="50%",originZ:g=0}=c;o.transformOrigin=`${h} ${p} ${g}`}}r(en,"buildHTMLStyles");const nn=r(()=>({style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}}),"createHtmlRenderState");function Gs(t,e,n){for(const s in e)!$(e[s])&&!ks(s,n)&&(t[s]=e[s])}r(Gs,"copyRawValuesOnly");function Wi({transformTemplate:t},e,n){return x.exports.useMemo(()=>{const s=nn();return en(s,e,{enableHardwareAcceleration:!n},t),Object.assign({},s.vars,s.style)},[e])}r(Wi,"useInitialMotionValues");function Ki(t,e,n){const s=t.style||{},o={};return Gs(o,s,t),Object.assign(o,Wi(t,e,n)),t.transformValues?t.transformValues(o):o}r(Ki,"useStyle");function Yi(t,e,n){const s={},o=Ki(t,e,n);return t.drag&&t.dragListener!==!1&&(s.draggable=!1,o.userSelect=o.WebkitUserSelect=o.WebkitTouchCallout="none",o.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),s.style=o,s}r(Yi,"useHTMLProps");const qi=["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"],Zi=["whileTap","onTap","onTapStart","onTapCancel"],Xi=["onPan","onPanStart","onPanSessionStart","onPanEnd"],Ji=["whileInView","onViewportEnter","onViewportLeave","viewport"],Qi=new Set(["initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","layout","layoutId","layoutDependency","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","drag","dragControls","dragListener","dragConstraints","dragDirectionLock","dragSnapToOrigin","_dragX","_dragY","dragElastic","dragMomentum","dragPropagation","dragTransition","onHoverStart","onHoverEnd","layoutScroll",...Ji,...Zi,...qi,...Xi]);function se(t){return Qi.has(t)}r(se,"isValidMotionProp");let Ws=r(t=>!se(t),"shouldForward");function tr(t){!t||(Ws=r(e=>e.startsWith("on")?!se(e):t(e),"shouldForward"))}r(tr,"loadExternalIsValidProp");try{tr(require("@emotion/is-prop-valid").default)}catch{}function er(t,e,n){const s={};for(const o in t)(Ws(o)||n===!0&&se(o)||!e&&!se(o)||t.draggable&&o.startsWith("onDrag"))&&(s[o]=t[o]);return s}r(er,"filterProps");function An(t,e,n){return typeof t=="string"?t:w.transform(e+n*t)}r(An,"calcOrigin$1");function nr(t,e,n){const s=An(e,t.x,t.width),o=An(n,t.y,t.height);return`${s} ${o}`}r(nr,"calcSVGTransformOrigin");const sr={offset:"stroke-dashoffset",array:"stroke-dasharray"},or={offset:"strokeDashoffset",array:"strokeDasharray"};function ir(t,e,n=1,s=0,o=!0){t.pathLength=1;const a=o?sr:or;t[a.offset]=w.transform(-s);const i=w.transform(e),l=w.transform(n);t[a.array]=`${i} ${l}`}r(ir,"buildSVGPath");function sn(t,{attrX:e,attrY:n,originX:s,originY:o,pathLength:a,pathSpacing:i=1,pathOffset:l=0,...c},u,f){en(t,c,u,f),t.attrs=t.style,t.style={};const{attrs:d,style:h,dimensions:p}=t;d.transform&&(p&&(h.transform=d.transform),delete d.transform),p&&(s!==void 0||o!==void 0||h.transform)&&(h.transformOrigin=nr(p,s!==void 0?s:.5,o!==void 0?o:.5)),e!==void 0&&(d.x=e),n!==void 0&&(d.y=n),a!==void 0&&ir(d,a,i,l,!1)}r(sn,"buildSVGAttrs");const Ks=r(()=>({...nn(),attrs:{}}),"createSvgRenderState");function rr(t,e){const n=x.exports.useMemo(()=>{const s=Ks();return sn(s,e,{enableHardwareAcceleration:!1},t.transformTemplate),{...s.attrs,style:{...s.style}}},[e]);if(t.style){const s={};Gs(s,t.style,t),n.style={...s,...n.style}}return n}r(rr,"useSVGProps");function ar(t=!1){return r((n,s,o,a,{latestValues:i},l)=>{const u=(Qe(n)?rr:Yi)(s,i,l),d={...er(s,typeof n=="string",t),...u,ref:a};return o&&(d["data-projection-id"]=o),x.exports.createElement(n,d)},"useRender")}r(ar,"createUseRender");const Ys=r(t=>t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),"camelToDash");function qs(t,{style:e,vars:n},s,o){Object.assign(t.style,e,o&&o.getProjectionStyles(s));for(const a in n)t.style.setProperty(a,n[a])}r(qs,"renderHTML");const Zs=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength"]);function Xs(t,e,n,s){qs(t,e,void 0,s);for(const o in e.attrs)t.setAttribute(Zs.has(o)?o:Ys(o),e.attrs[o])}r(Xs,"renderSVG");function on(t){const{style:e}=t,n={};for(const s in e)($(e[s])||ks(s,t))&&(n[s]=e[s]);return n}r(on,"scrapeMotionValuesFromProps$1");function Js(t){const e=on(t);for(const n in t)if($(t[n])){const s=n==="x"||n==="y"?"attr"+n.toUpperCase():n;e[s]=t[n]}return e}r(Js,"scrapeMotionValuesFromProps");function Qs(t,e,n,s={},o={}){return typeof e=="function"&&(e=e(n!==void 0?n:t.custom,s,o)),typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"&&(e=e(n!==void 0?n:t.custom,s,o)),e}r(Qs,"resolveVariantFromProps");const kt=r(t=>Array.isArray(t),"isKeyframesTarget"),lr=r(t=>Boolean(t&&typeof t=="object"&&t.mix&&t.toValue),"isCustomValue"),to=r(t=>kt(t)?t[t.length-1]||0:t,"resolveFinalValueInKeyframes");function qt(t){const e=$(t)?t.get():t;return lr(e)?e.toValue():e}r(qt,"resolveMotionValue");function cr({scrapeMotionValuesFromProps:t,createRenderState:e,onMount:n},s,o,a){const i={latestValues:ur(s,o,a,t),renderState:e()};return n&&(i.mount=l=>n(s,l,i)),i}r(cr,"makeState");const eo=r(t=>(e,n)=>{const s=x.exports.useContext(he),o=x.exports.useContext(jt),a=r(()=>cr(t,e,s,o),"make");return n?a():ge(a)},"makeUseVisualState");function ur(t,e,n,s){const o={},a=s(t);for(const h in a)o[h]=qt(a[h]);let{initial:i,animate:l}=t;const c=me(t),u=Os(t);e&&u&&!c&&t.inherit!==!1&&(i===void 0&&(i=e.initial),l===void 0&&(l=e.animate));let f=n?n.initial===!1:!1;f=f||i===!1;const d=f?l:i;return d&&typeof d!="boolean"&&!pe(d)&&(Array.isArray(d)?d:[d]).forEach(p=>{const g=Qs(t,p);if(!g)return;const{transitionEnd:b,transition:V,...P}=g;for(const T in P){let m=P[T];if(Array.isArray(m)){const v=f?m.length-1:0;m=m[v]}m!==null&&(o[T]=m)}for(const T in b)o[T]=b[T]}),o}r(ur,"makeLatestValues");const fr={useVisualState:eo({scrapeMotionValuesFromProps:Js,createRenderState:Ks,onMount:(t,e,{renderState:n,latestValues:s})=>{try{n.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}sn(n,s,{enableHardwareAcceleration:!1},t.transformTemplate),Xs(e,n)}})},dr={useVisualState:eo({scrapeMotionValuesFromProps:on,createRenderState:nn})};function hr(t,{forwardMotionProps:e=!1},n,s,o){return{...Qe(t)?fr:dr,preloadedFeatures:n,useRender:ar(e),createVisualElement:s,projectionNodeConstructor:o,Component:t}}r(hr,"createDomMotionConfig");var D;(function(t){t.Animate="animate",t.Hover="whileHover",t.Tap="whileTap",t.Drag="whileDrag",t.Focus="whileFocus",t.InView="whileInView",t.Exit="exit"})(D||(D={}));function ye(t,e,n,s={passive:!0}){return t.addEventListener(e,n,s),()=>t.removeEventListener(e,n)}r(ye,"addDomEvent");function je(t,e,n,s){x.exports.useEffect(()=>{const o=t.current;if(n&&o)return ye(o,e,n,s)},[t,e,n,s])}r(je,"useDomEvent");function pr({whileFocus:t,visualElement:e}){const{animationState:n}=e,s=r(()=>{n&&n.setActive(D.Focus,!0)},"onFocus"),o=r(()=>{n&&n.setActive(D.Focus,!1)},"onBlur");je(e,"focus",t?s:void 0),je(e,"blur",t?o:void 0)}r(pr,"useFocusGesture");function no(t){return typeof PointerEvent<"u"&&t instanceof PointerEvent?t.pointerType==="mouse":t instanceof MouseEvent}r(no,"isMouseEvent");function so(t){return!!t.touches}r(so,"isTouchEvent");function mr(t){return e=>{const n=e instanceof MouseEvent;(!n||n&&e.button===0)&&t(e)}}r(mr,"filterPrimaryPointer");const gr={pageX:0,pageY:0};function yr(t,e="page"){const s=t.touches[0]||t.changedTouches[0]||gr;return{x:s[e+"X"],y:s[e+"Y"]}}r(yr,"pointFromTouch");function vr(t,e="page"){return{x:t[e+"X"],y:t[e+"Y"]}}r(vr,"pointFromMouse");function rn(t,e="page"){return{point:so(t)?yr(t,e):vr(t,e)}}r(rn,"extractEventInfo");const oo=r((t,e=!1)=>{const n=r(s=>t(s,rn(s)),"listener");return e?mr(n):n},"wrapHandler"),xr=r(()=>ut&&window.onpointerdown===null,"supportsPointerEvents"),br=r(()=>ut&&window.ontouchstart===null,"supportsTouchEvents"),Tr=r(()=>ut&&window.onmousedown===null,"supportsMouseEvents"),Vr={pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointercancel:"mousecancel",pointerover:"mouseover",pointerout:"mouseout",pointerenter:"mouseenter",pointerleave:"mouseleave"},Sr={pointerdown:"touchstart",pointermove:"touchmove",pointerup:"touchend",pointercancel:"touchcancel"};function io(t){return xr()?t:br()?Sr[t]:Tr()?Vr[t]:t}r(io,"getPointerEventName");function yt(t,e,n,s){return ye(t,io(e),oo(n,e==="pointerdown"),s)}r(yt,"addPointerEvent");function oe(t,e,n,s){return je(t,io(e),n&&oo(n,e==="pointerdown"),s)}r(oe,"usePointerEvent");function ro(t){let e=null;return()=>{const n=r(()=>{e=null},"openLock");return e===null?(e=t,n):!1}}r(ro,"createLock");const Rn=ro("dragHorizontal"),Dn=ro("dragVertical");function ao(t){let e=!1;if(t==="y")e=Dn();else if(t==="x")e=Rn();else{const n=Rn(),s=Dn();n&&s?e=r(()=>{n(),s()},"lock"):(n&&n(),s&&s())}return e}r(ao,"getGlobalLock");function lo(){const t=ao(!0);return t?(t(),!1):!0}r(lo,"isDragActive");function Mn(t,e,n){return(s,o)=>{!no(s)||lo()||(t.animationState&&t.animationState.setActive(D.Hover,e),n&&n(s,o))}}r(Mn,"createHoverEvent");function wr({onHoverStart:t,onHoverEnd:e,whileHover:n,visualElement:s}){oe(s,"pointerenter",t||n?Mn(s,!0,t):void 0,{passive:!t}),oe(s,"pointerleave",e||n?Mn(s,!1,e):void 0,{passive:!e})}r(wr,"useHoverGesture");const co=r((t,e)=>e?t===e?!0:co(t,e.parentElement):!1,"isNodeOrChild");function an(t){return x.exports.useEffect(()=>()=>t(),[])}r(an,"useUnmountEffect");function uo(t,e){var n={};for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&e.indexOf(s)<0&&(n[s]=t[s]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,s=Object.getOwnPropertySymbols(t);o<s.length;o++)e.indexOf(s[o])<0&&Object.prototype.propertyIsEnumerable.call(t,s[o])&&(n[s[o]]=t[s[o]]);return n}r(uo,"__rest");var Pr=r(function(){},"warning"),ie=r(function(){},"invariant");const re=r((t,e,n)=>Math.min(Math.max(n,t),e),"clamp"),we=.001,Cr=.01,Ln=10,Ar=.05,Rr=1;function Dr({duration:t=800,bounce:e=.25,velocity:n=0,mass:s=1}){let o,a;Pr(t<=Ln*1e3);let i=1-e;i=re(Ar,Rr,i),t=re(Cr,Ln,t/1e3),i<1?(o=r(u=>{const f=u*i,d=f*t,h=f-n,p=Be(u,i),g=Math.exp(-d);return we-h/p*g},"envelope"),a=r(u=>{const d=u*i*t,h=d*n+n,p=Math.pow(i,2)*Math.pow(u,2)*t,g=Math.exp(-d),b=Be(Math.pow(u,2),i);return(-o(u)+we>0?-1:1)*((h-p)*g)/b},"derivative")):(o=r(u=>{const f=Math.exp(-u*t),d=(u-n)*t+1;return-we+f*d},"envelope"),a=r(u=>{const f=Math.exp(-u*t),d=(n-u)*(t*t);return f*d},"derivative"));const l=5/t,c=Lr(o,a,l);if(t=t*1e3,isNaN(c))return{stiffness:100,damping:10,duration:t};{const u=Math.pow(c,2)*s;return{stiffness:u,damping:i*2*Math.sqrt(s*u),duration:t}}}r(Dr,"findSpring");const Mr=12;function Lr(t,e,n){let s=n;for(let o=1;o<Mr;o++)s=s-t(s)/e(s);return s}r(Lr,"approximateRoot");function Be(t,e){return t*Math.sqrt(1-e*e)}r(Be,"calcAngularFreq");const Or=["duration","bounce"],Er=["stiffness","damping","mass"];function On(t,e){return e.some(n=>t[n]!==void 0)}r(On,"isSpringType");function _r(t){let e=Object.assign({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},t);if(!On(t,Er)&&On(t,Or)){const n=Dr(t);e=Object.assign(Object.assign(Object.assign({},e),n),{velocity:0,mass:1}),e.isResolvedFromDuration=!0}return e}r(_r,"getSpringOptions");function ln(t){var{from:e=0,to:n=1,restSpeed:s=2,restDelta:o}=t,a=uo(t,["from","to","restSpeed","restDelta"]);const i={done:!1,value:e};let{stiffness:l,damping:c,mass:u,velocity:f,duration:d,isResolvedFromDuration:h}=_r(a),p=En,g=En;function b(){const V=f?-(f/1e3):0,P=n-e,T=c/(2*Math.sqrt(l*u)),m=Math.sqrt(l/u)/1e3;if(o===void 0&&(o=Math.min(Math.abs(n-e)/100,.4)),T<1){const v=Be(m,T);p=r(S=>{const R=Math.exp(-T*m*S);return n-R*((V+T*m*P)/v*Math.sin(v*S)+P*Math.cos(v*S))},"resolveSpring"),g=r(S=>{const R=Math.exp(-T*m*S);return T*m*R*(Math.sin(v*S)*(V+T*m*P)/v+P*Math.cos(v*S))-R*(Math.cos(v*S)*(V+T*m*P)-v*P*Math.sin(v*S))},"resolveVelocity")}else if(T===1)p=r(v=>n-Math.exp(-m*v)*(P+(V+m*P)*v),"resolveSpring");else{const v=m*Math.sqrt(T*T-1);p=r(S=>{const R=Math.exp(-T*m*S),M=Math.min(v*S,300);return n-R*((V+T*m*P)*Math.sinh(M)+v*P*Math.cosh(M))/v},"resolveSpring")}}return r(b,"createSpring"),b(),{next:V=>{const P=p(V);if(h)i.done=V>=d;else{const T=g(V)*1e3,m=Math.abs(T)<=s,v=Math.abs(n-P)<=o;i.done=m&&v}return i.value=i.done?n:P,i},flipTarget:()=>{f=-f,[e,n]=[n,e],b()}}}r(ln,"spring");ln.needsInterpolation=(t,e)=>typeof t=="string"||typeof e=="string";const En=r(t=>0,"zero"),Ft=r((t,e,n)=>{const s=e-t;return s===0?1:(n-t)/s},"progress"),L=r((t,e,n)=>-n*t+n*e+t,"mix");function Pe(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}r(Pe,"hueToRgb");function _n({hue:t,saturation:e,lightness:n,alpha:s}){t/=360,e/=100,n/=100;let o=0,a=0,i=0;if(!e)o=a=i=n;else{const l=n<.5?n*(1+e):n+e-n*e,c=2*n-l;o=Pe(c,l,t+1/3),a=Pe(c,l,t),i=Pe(c,l,t-1/3)}return{red:Math.round(o*255),green:Math.round(a*255),blue:Math.round(i*255),alpha:s}}r(_n,"hslaToRgba");const kr=r((t,e,n)=>{const s=t*t,o=e*e;return Math.sqrt(Math.max(0,n*(o-s)+s))},"mixLinearColor"),Fr=[Fe,st,ct],kn=r(t=>Fr.find(e=>e.test(t)),"getColorType"),fo=r((t,e)=>{let n=kn(t),s=kn(e),o=n.parse(t),a=s.parse(e);n===ct&&(o=_n(o),n=st),s===ct&&(a=_n(a),s=st);const i=Object.assign({},o);return l=>{for(const c in i)c!=="alpha"&&(i[c]=kr(o[c],a[c],l));return i.alpha=L(o.alpha,a.alpha,l),n.transform(i)}},"mixColor"),Ue=r(t=>typeof t=="number","isNum"),Ir=r((t,e)=>n=>e(t(n)),"combineFunctions"),ve=r((...t)=>t.reduce(Ir),"pipe");function ho(t,e){return Ue(t)?n=>L(t,e,n):j.test(t)?fo(t,e):mo(t,e)}r(ho,"getMixer");const po=r((t,e)=>{const n=[...t],s=n.length,o=t.map((a,i)=>ho(a,e[i]));return a=>{for(let i=0;i<s;i++)n[i]=o[i](a);return n}},"mixArray"),jr=r((t,e)=>{const n=Object.assign(Object.assign({},t),e),s={};for(const o in n)t[o]!==void 0&&e[o]!==void 0&&(s[o]=ho(t[o],e[o]));return o=>{for(const a in s)n[a]=s[a](o);return n}},"mixObject");function Fn(t){const e=q.parse(t),n=e.length;let s=0,o=0,a=0;for(let i=0;i<n;i++)s||typeof e[i]=="number"?s++:e[i].hue!==void 0?a++:o++;return{parsed:e,numNumbers:s,numRGB:o,numHSL:a}}r(Fn,"analyse");const mo=r((t,e)=>{const n=q.createTransformer(e),s=Fn(t),o=Fn(e);return s.numHSL===o.numHSL&&s.numRGB===o.numRGB&&s.numNumbers>=o.numNumbers?ve(po(s.parsed,o.parsed),n):i=>`${i>0?e:t}`},"mixComplex"),Br=r((t,e)=>n=>L(t,e,n),"mixNumber");function Ur(t){if(typeof t=="number")return Br;if(typeof t=="string")return j.test(t)?fo:mo;if(Array.isArray(t))return po;if(typeof t=="object")return jr}r(Ur,"detectMixerFactory");function Nr(t,e,n){const s=[],o=n||Ur(t[0]),a=t.length-1;for(let i=0;i<a;i++){let l=o(t[i],t[i+1]);if(e){const c=Array.isArray(e)?e[i]:e;l=ve(c,l)}s.push(l)}return s}r(Nr,"createMixers");function $r([t,e],[n]){return s=>n(Ft(t,e,s))}r($r,"fastInterpolate");function zr(t,e){const n=t.length,s=n-1;return o=>{let a=0,i=!1;if(o<=t[0]?i=!0:o>=t[s]&&(a=s-1,i=!0),!i){let c=1;for(;c<n&&!(t[c]>o||c===s);c++);a=c-1}const l=Ft(t[a],t[a+1],o);return e[a](l)}}r(zr,"slowInterpolate");function go(t,e,{clamp:n=!0,ease:s,mixer:o}={}){const a=t.length;ie(a===e.length),ie(!s||!Array.isArray(s)||s.length===a-1),t[0]>t[a-1]&&(t=[].concat(t),e=[].concat(e),t.reverse(),e.reverse());const i=Nr(e,s,o),l=a===2?$r(t,i):zr(t,i);return n?c=>l(re(t[0],t[a-1],c)):l}r(go,"interpolate");const xe=r(t=>e=>1-t(1-e),"reverseEasing"),cn=r(t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,"mirrorEasing"),Hr=r(t=>e=>Math.pow(e,t),"createExpoIn"),yo=r(t=>e=>e*e*((t+1)*e-t),"createBackIn"),Gr=r(t=>{const e=yo(t);return n=>(n*=2)<1?.5*e(n):.5*(2-Math.pow(2,-10*(n-1)))},"createAnticipate"),vo=1.525,Wr=4/11,Kr=8/11,Yr=9/10,un=r(t=>t,"linear"),fn=Hr(2),qr=xe(fn),xo=cn(fn),bo=r(t=>1-Math.sin(Math.acos(t)),"circIn"),dn=xe(bo),Zr=cn(dn),hn=yo(vo),Xr=xe(hn),Jr=cn(hn),Qr=Gr(vo),ta=4356/361,ea=35442/1805,na=16061/1805,ae=r(t=>{if(t===1||t===0)return t;const e=t*t;return t<Wr?7.5625*e:t<Kr?9.075*e-9.9*t+3.4:t<Yr?ta*e-ea*t+na:10.8*t*t-20.52*t+10.72},"bounceOut"),sa=xe(ae),oa=r(t=>t<.5?.5*(1-ae(1-t*2)):.5*ae(t*2-1)+.5,"bounceInOut");function ia(t,e){return t.map(()=>e||xo).splice(0,t.length-1)}r(ia,"defaultEasing");function ra(t){const e=t.length;return t.map((n,s)=>s!==0?s/(e-1):0)}r(ra,"defaultOffset");function aa(t,e){return t.map(n=>n*e)}r(aa,"convertOffsetToTimes");function Zt({from:t=0,to:e=1,ease:n,offset:s,duration:o=300}){const a={done:!1,value:t},i=Array.isArray(e)?e:[t,e],l=aa(s&&s.length===i.length?s:ra(i),o);function c(){return go(l,i,{ease:Array.isArray(n)?n:ia(i,n)})}r(c,"createInterpolator");let u=c();return{next:f=>(a.value=u(f),a.done=f>=o,a),flipTarget:()=>{i.reverse(),u=c()}}}r(Zt,"keyframes$1");function la({velocity:t=0,from:e=0,power:n=.8,timeConstant:s=350,restDelta:o=.5,modifyTarget:a}){const i={done:!1,value:e};let l=n*t;const c=e+l,u=a===void 0?c:a(c);return u!==c&&(l=u-e),{next:f=>{const d=-l*Math.exp(-f/s);return i.done=!(d>o||d<-o),i.value=i.done?u:u+d,i},flipTarget:()=>{}}}r(la,"decay");const In={keyframes:Zt,spring:ln,decay:la};function ca(t){if(Array.isArray(t.to))return Zt;if(In[t.type])return In[t.type];const e=new Set(Object.keys(t));return e.has("ease")||e.has("duration")&&!e.has("dampingRatio")?Zt:e.has("dampingRatio")||e.has("stiffness")||e.has("mass")||e.has("damping")||e.has("restSpeed")||e.has("restDelta")?ln:Zt}r(ca,"detectAnimationFromOptions");const To=1/60*1e3,ua=typeof performance<"u"?()=>performance.now():()=>Date.now(),Vo=typeof window<"u"?t=>window.requestAnimationFrame(t):t=>setTimeout(()=>t(ua()),To);function fa(t){let e=[],n=[],s=0,o=!1,a=!1;const i=new WeakSet,l={schedule:(c,u=!1,f=!1)=>{const d=f&&o,h=d?e:n;return u&&i.add(c),h.indexOf(c)===-1&&(h.push(c),d&&o&&(s=e.length)),c},cancel:c=>{const u=n.indexOf(c);u!==-1&&n.splice(u,1),i.delete(c)},process:c=>{if(o){a=!0;return}if(o=!0,[e,n]=[n,e],n.length=0,s=e.length,s)for(let u=0;u<s;u++){const f=e[u];f(c),i.has(f)&&(l.schedule(f),t())}o=!1,a&&(a=!1,l.process(c))}};return l}r(fa,"createRenderStep");const da=40;let Ne=!0,It=!1,$e=!1;const vt={delta:0,timestamp:0},$t=["read","update","preRender","render","postRender"],be=$t.reduce((t,e)=>(t[e]=fa(()=>It=!0),t),{}),z=$t.reduce((t,e)=>{const n=be[e];return t[e]=(s,o=!1,a=!1)=>(It||pa(),n.schedule(s,o,a)),t},{}),bt=$t.reduce((t,e)=>(t[e]=be[e].cancel,t),{}),Ce=$t.reduce((t,e)=>(t[e]=()=>be[e].process(vt),t),{}),ha=r(t=>be[t].process(vt),"processStep"),So=r(t=>{It=!1,vt.delta=Ne?To:Math.max(Math.min(t-vt.timestamp,da),1),vt.timestamp=t,$e=!0,$t.forEach(ha),$e=!1,It&&(Ne=!1,Vo(So))},"processFrame"),pa=r(()=>{It=!0,Ne=!0,$e||Vo(So)},"startLoop"),le=r(()=>vt,"getFrameData");function wo(t,e,n=0){return t-e-n}r(wo,"loopElapsed");function ma(t,e,n=0,s=!0){return s?wo(e+-t,e,n):e-(t-e)+n}r(ma,"reverseElapsed");function ga(t,e,n,s){return s?t>=e+n:t<=-n}r(ga,"hasRepeatDelayElapsed");const ya=r(t=>{const e=r(({delta:n})=>t(n),"passTimestamp");return{start:()=>z.update(e,!0),stop:()=>bt.update(e)}},"framesync");function Po(t){var e,n,{from:s,autoplay:o=!0,driver:a=ya,elapsed:i=0,repeat:l=0,repeatType:c="loop",repeatDelay:u=0,onPlay:f,onStop:d,onComplete:h,onRepeat:p,onUpdate:g}=t,b=uo(t,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]);let{to:V}=b,P,T=0,m=b.duration,v,S=!1,R=!0,M;const F=ca(b);!((n=(e=F).needsInterpolation)===null||n===void 0)&&n.call(e,s,V)&&(M=go([0,100],[s,V],{clamp:!1}),s=0,V=100);const _=F(Object.assign(Object.assign({},b),{from:s,to:V}));function B(){T++,c==="reverse"?(R=T%2===0,i=ma(i,m,u,R)):(i=wo(i,m,u),c==="mirror"&&_.flipTarget()),S=!1,p&&p()}r(B,"repeat");function Z(){P.stop(),h&&h()}r(Z,"complete");function H(X){if(R||(X=-X),i+=X,!S){const K=_.next(Math.max(0,i));v=K.value,M&&(v=M(v)),S=R?K.done:i<=0}g==null||g(v),S&&(T===0&&(m!=null||(m=i)),T<l?ga(i,m,u,R)&&B():Z())}r(H,"update");function it(){f==null||f(),P=a(H),P.start()}return r(it,"play"),o&&it(),{stop:()=>{d==null||d(),P.stop()}}}r(Po,"animate$1");function Co(t,e){return e?t*(1e3/e):0}r(Co,"velocityPerSecond");function va({from:t=0,velocity:e=0,min:n,max:s,power:o=.8,timeConstant:a=750,bounceStiffness:i=500,bounceDamping:l=10,restDelta:c=1,modifyTarget:u,driver:f,onUpdate:d,onComplete:h,onStop:p}){let g;function b(m){return n!==void 0&&m<n||s!==void 0&&m>s}r(b,"isOutOfBounds");function V(m){return n===void 0?s:s===void 0||Math.abs(n-m)<Math.abs(s-m)?n:s}r(V,"boundaryNearest");function P(m){g==null||g.stop(),g=Po(Object.assign(Object.assign({},m),{driver:f,onUpdate:v=>{var S;d==null||d(v),(S=m.onUpdate)===null||S===void 0||S.call(m,v)},onComplete:h,onStop:p}))}r(P,"startAnimation");function T(m){P(Object.assign({type:"spring",stiffness:i,damping:l,restDelta:c},m))}if(r(T,"startSpring"),b(t))T({from:t,velocity:e,to:V(t)});else{let m=o*e+t;typeof u<"u"&&(m=u(m));const v=V(m),S=v===n?-1:1;let R,M;const F=r(_=>{R=M,M=_,e=Co(_-R,le().delta),(S===1&&_>v||S===-1&&_<v)&&T({from:_,to:v,velocity:e})},"checkBoundary");P({type:"decay",from:t,velocity:e,timeConstant:a,power:o,restDelta:c,modifyTarget:u,onUpdate:b(m)?F:void 0})}return{stop:()=>g==null?void 0:g.stop()}}r(va,"inertia");const ze=r(t=>t.hasOwnProperty("x")&&t.hasOwnProperty("y"),"isPoint"),jn=r(t=>ze(t)&&t.hasOwnProperty("z"),"isPoint3D"),Ht=r((t,e)=>Math.abs(t-e),"distance1D");function pn(t,e){if(Ue(t)&&Ue(e))return Ht(t,e);if(ze(t)&&ze(e)){const n=Ht(t.x,e.x),s=Ht(t.y,e.y),o=jn(t)&&jn(e)?Ht(t.z,e.z):0;return Math.sqrt(Math.pow(n,2)+Math.pow(s,2)+Math.pow(o,2))}}r(pn,"distance");const Ao=r((t,e)=>1-3*e+3*t,"a"),Ro=r((t,e)=>3*e-6*t,"b"),Do=r(t=>3*t,"c"),ce=r((t,e,n)=>((Ao(e,n)*t+Ro(e,n))*t+Do(e))*t,"calcBezier"),Mo=r((t,e,n)=>3*Ao(e,n)*t*t+2*Ro(e,n)*t+Do(e),"getSlope"),xa=1e-7,ba=10;function Ta(t,e,n,s,o){let a,i,l=0;do i=e+(n-e)/2,a=ce(i,s,o)-t,a>0?n=i:e=i;while(Math.abs(a)>xa&&++l<ba);return i}r(Ta,"binarySubdivide");const Va=8,Sa=.001;function wa(t,e,n,s){for(let o=0;o<Va;++o){const a=Mo(e,n,s);if(a===0)return e;e-=(ce(e,n,s)-t)/a}return e}r(wa,"newtonRaphsonIterate");const Xt=11,Gt=1/(Xt-1);function Pa(t,e,n,s){if(t===e&&n===s)return un;const o=new Float32Array(Xt);for(let i=0;i<Xt;++i)o[i]=ce(i*Gt,t,n);function a(i){let l=0,c=1;const u=Xt-1;for(;c!==u&&o[c]<=i;++c)l+=Gt;--c;const f=(i-o[c])/(o[c+1]-o[c]),d=l+f*Gt,h=Mo(d,t,n);return h>=Sa?wa(i,d,t,n):h===0?d:Ta(i,l,l+Gt,t,n)}return r(a,"getTForX"),i=>i===0||i===1?i:ce(a(i),e,s)}r(Pa,"cubicBezier");function Ca({onTap:t,onTapStart:e,onTapCancel:n,whileTap:s,visualElement:o}){const a=t||e||n||s,i=x.exports.useRef(!1),l=x.exports.useRef(null),c={passive:!(e||t||n||p)};function u(){l.current&&l.current(),l.current=null}r(u,"removePointerEndListener");function f(){return u(),i.current=!1,o.animationState&&o.animationState.setActive(D.Tap,!1),!lo()}r(f,"checkPointerEnd");function d(g,b){!f()||(co(o.getInstance(),g.target)?t&&t(g,b):n&&n(g,b))}r(d,"onPointerUp");function h(g,b){!f()||n&&n(g,b)}r(h,"onPointerCancel");function p(g,b){u(),!i.current&&(i.current=!0,l.current=ve(yt(window,"pointerup",d,c),yt(window,"pointercancel",h,c)),o.animationState&&o.animationState.setActive(D.Tap,!0),e&&e(g,b))}r(p,"onPointerDown"),oe(o,"pointerdown",a?p:void 0,c),an(u)}r(Ca,"useTapGesture");const Aa="production",Lo=typeof process>"u"||process.env===void 0?Aa:"production",Bn=new Set;function Oo(t,e,n){t||Bn.has(e)||(console.warn(e),n&&console.warn(n),Bn.add(e))}r(Oo,"warnOnce");const He=new WeakMap,Ae=new WeakMap,Ra=r(t=>{const e=He.get(t.target);e&&e(t)},"fireObserverCallback"),Da=r(t=>{t.forEach(Ra)},"fireAllObserverCallbacks");function Ma({root:t,...e}){const n=t||document;Ae.has(n)||Ae.set(n,{});const s=Ae.get(n),o=JSON.stringify(e);return s[o]||(s[o]=new IntersectionObserver(Da,{root:t,...e})),s[o]}r(Ma,"initIntersectionObserver");function La(t,e,n){const s=Ma(e);return He.set(t,n),s.observe(t),()=>{He.delete(t),s.unobserve(t)}}r(La,"observeIntersection");function Oa({visualElement:t,whileInView:e,onViewportEnter:n,onViewportLeave:s,viewport:o={}}){const a=x.exports.useRef({hasEnteredView:!1,isInView:!1});let i=Boolean(e||n||s);o.once&&a.current.hasEnteredView&&(i=!1),(typeof IntersectionObserver>"u"?ka:_a)(i,a.current,t,o)}r(Oa,"useViewport");const Ea={some:0,all:1};function _a(t,e,n,{root:s,margin:o,amount:a="some",once:i}){x.exports.useEffect(()=>{if(!t)return;const l={root:s==null?void 0:s.current,rootMargin:o,threshold:typeof a=="number"?a:Ea[a]},c=r(u=>{const{isIntersecting:f}=u;if(e.isInView===f||(e.isInView=f,i&&!f&&e.hasEnteredView))return;f&&(e.hasEnteredView=!0),n.animationState&&n.animationState.setActive(D.InView,f);const d=n.getProps(),h=f?d.onViewportEnter:d.onViewportLeave;h&&h(u)},"intersectionCallback");return La(n.getInstance(),l,c)},[t,s,o,a])}r(_a,"useIntersectionObserver");function ka(t,e,n,{fallback:s=!0}){x.exports.useEffect(()=>{!t||!s||(Lo!=="production"&&Oo(!1,"IntersectionObserver not available on this device. whileInView animations will trigger on mount."),requestAnimationFrame(()=>{e.hasEnteredView=!0;const{onViewportEnter:o}=n.getProps();o&&o(null),n.animationState&&n.animationState.setActive(D.InView,!0)}))},[t])}r(ka,"useMissingIntersectionObserver");const ot=r(t=>e=>(t(e),null),"makeRenderlessComponent"),Fa={inView:ot(Oa),tap:ot(Ca),focus:ot(pr),hover:ot(wr)};function Eo(){const t=x.exports.useContext(jt);if(t===null)return[!0,null];const{isPresent:e,onExitComplete:n,register:s}=t,o=x.exports.useId();return x.exports.useEffect(()=>s(o),[]),!e&&n?[!1,r(()=>n&&n(o),"safeToRemove")]:[!0]}r(Eo,"usePresence");function _o(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let s=0;s<n;s++)if(e[s]!==t[s])return!1;return!0}r(_o,"shallowCompare");const ue=r(t=>t*1e3,"secondsToMilliseconds"),Ia={linear:un,easeIn:fn,easeInOut:xo,easeOut:qr,circIn:bo,circInOut:Zr,circOut:dn,backIn:hn,backInOut:Jr,backOut:Xr,anticipate:Qr,bounceIn:sa,bounceInOut:oa,bounceOut:ae},Un=r(t=>{if(Array.isArray(t)){ie(t.length===4);const[e,n,s,o]=t;return Pa(e,n,s,o)}else if(typeof t=="string")return Ia[t];return t},"easingDefinitionToFunction"),ja=r(t=>Array.isArray(t)&&typeof t[0]!="number","isEasingArray"),Nn=r((t,e)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&q.test(e)&&!e.startsWith("url(")),"isAnimatable"),at=r(()=>({type:"spring",stiffness:500,damping:25,restSpeed:10}),"underDampedSpring"),Wt=r(t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),"criticallyDampedSpring"),Re=r(()=>({type:"keyframes",ease:"linear",duration:.3}),"linearTween"),Ba=r(t=>({type:"keyframes",duration:.8,values:t}),"keyframes"),$n={x:at,y:at,z:at,rotate:at,rotateX:at,rotateY:at,rotateZ:at,scaleX:Wt,scaleY:Wt,scale:Wt,opacity:Re,backgroundColor:Re,color:Re,default:Wt},Ua=r((t,e)=>{let n;return kt(e)?n=Ba:n=$n[t]||$n.default,{to:e,...n(e)}},"getDefaultTransition"),Na={...Hs,color:j,backgroundColor:j,outlineColor:j,fill:j,stroke:j,borderColor:j,borderTopColor:j,borderRightColor:j,borderBottomColor:j,borderLeftColor:j,filter:Ie,WebkitFilter:Ie},mn=r(t=>Na[t],"getDefaultValueType");function gn(t,e){var n;let s=mn(t);return s!==Ie&&(s=q),(n=s.getAnimatableNone)===null||n===void 0?void 0:n.call(s,e)}r(gn,"getAnimatableNone");const $a={current:!1};function za({when:t,delay:e,delayChildren:n,staggerChildren:s,staggerDirection:o,repeat:a,repeatType:i,repeatDelay:l,from:c,...u}){return!!Object.keys(u).length}r(za,"isTransitionDefined");function Ha({ease:t,times:e,yoyo:n,flip:s,loop:o,...a}){const i={...a};return e&&(i.offset=e),a.duration&&(i.duration=ue(a.duration)),a.repeatDelay&&(i.repeatDelay=ue(a.repeatDelay)),t&&(i.ease=ja(t)?t.map(Un):Un(t)),a.type==="tween"&&(i.type="keyframes"),(n||o||s)&&(n?i.repeatType="reverse":o?i.repeatType="loop":s&&(i.repeatType="mirror"),i.repeat=o||n||s||a.repeat),a.type!=="spring"&&(i.type="keyframes"),i}r(Ha,"convertTransitionToAnimationOptions");function Ga(t,e){var n,s;return(s=(n=(yn(t,e)||{}).delay)!==null&&n!==void 0?n:t.delay)!==null&&s!==void 0?s:0}r(Ga,"getDelayFromTransition");function Wa(t){return Array.isArray(t.to)&&t.to[0]===null&&(t.to=[...t.to],t.to[0]=t.from),t}r(Wa,"hydrateKeyframes");function Ka(t,e,n){return Array.isArray(e.to)&&t.duration===void 0&&(t.duration=.8),Wa(e),za(t)||(t={...t,...Ua(n,e.to)}),{...e,...Ha(t)}}r(Ka,"getPopmotionAnimationOptions");function Ya(t,e,n,s,o){const a=yn(s,t)||{};let i=a.from!==void 0?a.from:e.get();const l=Nn(t,n);i==="none"&&l&&typeof n=="string"?i=gn(t,n):zn(i)&&typeof n=="string"?i=Hn(n):!Array.isArray(n)&&zn(n)&&typeof i=="string"&&(n=Hn(i));const c=Nn(t,i);function u(){const d={from:i,to:n,velocity:e.getVelocity(),onComplete:o,onUpdate:h=>e.set(h)};return a.type==="inertia"||a.type==="decay"?va({...d,...a}):Po({...Ka(a,d,t),onUpdate:h=>{d.onUpdate(h),a.onUpdate&&a.onUpdate(h)},onComplete:()=>{d.onComplete(),a.onComplete&&a.onComplete()}})}r(u,"start");function f(){const d=to(n);return e.set(d),o(),a.onUpdate&&a.onUpdate(d),a.onComplete&&a.onComplete(),{stop:()=>{}}}return r(f,"set"),!c||!l||a.type===!1?f:u}r(Ya,"getAnimation");function zn(t){return t===0||typeof t=="string"&&parseFloat(t)===0&&t.indexOf(" ")===-1}r(zn,"isZero");function Hn(t){return typeof t=="number"?0:gn("",t)}r(Hn,"getZeroUnit");function yn(t,e){return t[e]||t.default||t}r(yn,"getValueTransition");function vn(t,e,n,s={}){return $a.current&&(s={type:!1}),e.start(o=>{let a,i;const l=Ya(t,e,n,s,o),c=Ga(s,t),u=r(()=>i=l(),"start");return c?a=window.setTimeout(u,ue(c)):u(),()=>{clearTimeout(a),i&&i.stop()}})}r(vn,"startAnimation");const qa=r(t=>/^\-?\d*\.?\d+$/.test(t),"isNumericalString"),Za=r(t=>/^0[^.\s]+$/.test(t),"isZeroValueString");function xn(t,e){t.indexOf(e)===-1&&t.push(e)}r(xn,"addUniqueItem");function bn(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}r(bn,"removeItem");class xt{constructor(){this.subscriptions=[]}add(e){return xn(this.subscriptions,e),()=>bn(this.subscriptions,e)}notify(e,n,s){const o=this.subscriptions.length;if(!!o)if(o===1)this.subscriptions[0](e,n,s);else for(let a=0;a<o;a++){const i=this.subscriptions[a];i&&i(e,n,s)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}r(xt,"SubscriptionManager");const Xa=r(t=>!isNaN(parseFloat(t)),"isFloat");class ko{constructor(e){this.version="7.5.2",this.timeDelta=0,this.lastUpdated=0,this.updateSubscribers=new xt,this.velocityUpdateSubscribers=new xt,this.renderSubscribers=new xt,this.canTrackVelocity=!1,this.updateAndNotify=(n,s=!0)=>{this.prev=this.current,this.current=n;const{delta:o,timestamp:a}=le();this.lastUpdated!==a&&(this.timeDelta=o,this.lastUpdated=a,z.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.updateSubscribers.notify(this.current),this.velocityUpdateSubscribers.getSize()&&this.velocityUpdateSubscribers.notify(this.getVelocity()),s&&this.renderSubscribers.notify(this.current)},this.scheduleVelocityCheck=()=>z.postRender(this.velocityCheck),this.velocityCheck=({timestamp:n})=>{n!==this.lastUpdated&&(this.prev=this.current,this.velocityUpdateSubscribers.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=e,this.canTrackVelocity=Xa(this.current)}onChange(e){return this.updateSubscribers.add(e)}clearListeners(){this.updateSubscribers.clear()}onRenderRequest(e){return e(this.get()),this.renderSubscribers.add(e)}attach(e){this.passiveEffect=e}set(e,n=!0){!n||!this.passiveEffect?this.updateAndNotify(e,n):this.passiveEffect(e,this.updateAndNotify)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?Co(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(e){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.stopAnimation=e(n)}).then(()=>this.clearAnimation())}stop(){this.stopAnimation&&this.stopAnimation(),this.clearAnimation()}isAnimating(){return!!this.stopAnimation}clearAnimation(){this.stopAnimation=null}destroy(){this.updateSubscribers.clear(),this.renderSubscribers.clear(),this.stop()}}r(ko,"MotionValue");function Tt(t){return new ko(t)}r(Tt,"motionValue");const Fo=r(t=>e=>e.test(t),"testValueType"),Ja={test:t=>t==="auto",parse:t=>t},Io=[ft,w,W,tt,Ii,Fi,Ja],wt=r(t=>Io.find(Fo(t)),"findDimensionValueType"),Qa=[...Io,j,q],tl=r(t=>Qa.find(Fo(t)),"findValueType");function el(t){const e={};return t.forEachValue((n,s)=>e[s]=n.get()),e}r(el,"getCurrent");function nl(t){const e={};return t.forEachValue((n,s)=>e[s]=n.getVelocity()),e}r(nl,"getVelocity$1");function Te(t,e,n){const s=t.getProps();return Qs(s,e,n!==void 0?n:s.custom,el(t),nl(t))}r(Te,"resolveVariant");function sl(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,Tt(n))}r(sl,"setMotionValue");function ol(t,e){const n=Te(t,e);let{transitionEnd:s={},transition:o={},...a}=n?t.makeTargetAnimatable(n,!1):{};a={...a,...s};for(const i in a){const l=to(a[i]);sl(t,i,l)}}r(ol,"setTarget");function il(t,e,n){var s,o;const a=Object.keys(e).filter(l=>!t.hasValue(l)),i=a.length;if(!!i)for(let l=0;l<i;l++){const c=a[l],u=e[c];let f=null;Array.isArray(u)&&(f=u[0]),f===null&&(f=(o=(s=n[c])!==null&&s!==void 0?s:t.readValue(c))!==null&&o!==void 0?o:e[c]),f!=null&&(typeof f=="string"&&(qa(f)||Za(f))?f=parseFloat(f):!tl(f)&&q.test(u)&&(f=gn(c,u)),t.addValue(c,Tt(f)),n[c]===void 0&&(n[c]=f),t.setBaseTarget(c,f))}}r(il,"checkTargetForNewValues");function rl(t,e){return e?(e[t]||e.default||e).from:void 0}r(rl,"getOriginFromTransition");function al(t,e,n){var s;const o={};for(const a in t){const i=rl(a,e);o[a]=i!==void 0?i:(s=n.getValue(a))===null||s===void 0?void 0:s.get()}return o}r(al,"getOrigin");function fe(t){return Boolean($(t)&&t.add)}r(fe,"isWillChangeMotionValue");function ll(t,e,n={}){t.notifyAnimationStart(e);let s;if(Array.isArray(e)){const o=e.map(a=>Ge(t,a,n));s=Promise.all(o)}else if(typeof e=="string")s=Ge(t,e,n);else{const o=typeof e=="function"?Te(t,e,n.custom):e;s=jo(t,o,n)}return s.then(()=>t.notifyAnimationComplete(e))}r(ll,"animateVisualElement");function Ge(t,e,n={}){var s;const o=Te(t,e,n.custom);let{transition:a=t.getDefaultTransition()||{}}=o||{};n.transitionOverride&&(a=n.transitionOverride);const i=o?()=>jo(t,o,n):()=>Promise.resolve(),l=!((s=t.variantChildren)===null||s===void 0)&&s.size?(u=0)=>{const{delayChildren:f=0,staggerChildren:d,staggerDirection:h}=a;return cl(t,e,f+u,d,h,n)}:()=>Promise.resolve(),{when:c}=a;if(c){const[u,f]=c==="beforeChildren"?[i,l]:[l,i];return u().then(f)}else return Promise.all([i(),l(n.delay)])}r(Ge,"animateVariant");function jo(t,e,{delay:n=0,transitionOverride:s,type:o}={}){var a;let{transition:i=t.getDefaultTransition(),transitionEnd:l,...c}=t.makeTargetAnimatable(e);const u=t.getValue("willChange");s&&(i=s);const f=[],d=o&&((a=t.animationState)===null||a===void 0?void 0:a.getState()[o]);for(const h in c){const p=t.getValue(h),g=c[h];if(!p||g===void 0||d&&fl(d,h))continue;let b={delay:n,...i};t.shouldReduceMotion&&Bt.has(h)&&(b={...b,type:!1,delay:0});let V=vn(h,p,g,b);fe(u)&&(u.add(h),V=V.then(()=>u.remove(h))),f.push(V)}return Promise.all(f).then(()=>{l&&ol(t,l)})}r(jo,"animateTarget");function cl(t,e,n=0,s=0,o=1,a){const i=[],l=(t.variantChildren.size-1)*s,c=o===1?(u=0)=>u*s:(u=0)=>l-u*s;return Array.from(t.variantChildren).sort(ul).forEach((u,f)=>{i.push(Ge(u,e,{...a,delay:n+c(f)}).then(()=>u.notifyAnimationComplete(e)))}),Promise.all(i)}r(cl,"animateChildren");function ul(t,e){return t.sortNodePosition(e)}r(ul,"sortByTreeOrder");function fl({protectedKeys:t,needsAnimating:e},n){const s=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,s}r(fl,"shouldBlockAnimation");const Tn=[D.Animate,D.InView,D.Focus,D.Hover,D.Tap,D.Drag,D.Exit],dl=[...Tn].reverse(),hl=Tn.length;function pl(t){return e=>Promise.all(e.map(({animation:n,options:s})=>ll(t,n,s)))}r(pl,"animateList");function ml(t){let e=pl(t);const n=yl();let s=!0;const o=r((c,u)=>{const f=Te(t,u);if(f){const{transition:d,transitionEnd:h,...p}=f;c={...c,...p,...h}}return c},"buildResolvedTypeValues");function a(c){e=c(t)}r(a,"setAnimateFunction");function i(c,u){var f;const d=t.getProps(),h=t.getVariantContext(!0)||{},p=[],g=new Set;let b={},V=1/0;for(let T=0;T<hl;T++){const m=dl[T],v=n[m],S=(f=d[m])!==null&&f!==void 0?f:h[m],R=Ot(S),M=m===u?v.isActive:null;M===!1&&(V=T);let F=S===h[m]&&S!==d[m]&&R;if(F&&s&&t.manuallyAnimateOnMount&&(F=!1),v.protectedKeys={...b},!v.isActive&&M===null||!S&&!v.prevProp||pe(S)||typeof S=="boolean")continue;const _=gl(v.prevProp,S);let B=_||m===u&&v.isActive&&!F&&R||T>V&&R;const Z=Array.isArray(S)?S:[S];let H=Z.reduce(o,{});M===!1&&(H={});const{prevResolvedValues:it={}}=v,X={...it,...H},K=r(E=>{B=!0,g.delete(E),v.needsAnimating[E]=!0},"markToAnimate");for(const E in X){const J=H[E],rt=it[E];b.hasOwnProperty(E)||(J!==rt?kt(J)&&kt(rt)?!_o(J,rt)||_?K(E):v.protectedKeys[E]=!0:J!==void 0?K(E):g.add(E):J!==void 0&&g.has(E)?K(E):v.protectedKeys[E]=!0)}v.prevProp=S,v.prevResolvedValues=H,v.isActive&&(b={...b,...H}),s&&t.blockInitialAnimation&&(B=!1),B&&!F&&p.push(...Z.map(E=>({animation:E,options:{type:m,...c}})))}if(g.size){const T={};g.forEach(m=>{const v=t.getBaseTarget(m);v!==void 0&&(T[m]=v)}),p.push({animation:T})}let P=Boolean(p.length);return s&&d.initial===!1&&!t.manuallyAnimateOnMount&&(P=!1),s=!1,P?e(p):Promise.resolve()}r(i,"animateChanges");function l(c,u,f){var d;if(n[c].isActive===u)return Promise.resolve();(d=t.variantChildren)===null||d===void 0||d.forEach(p=>{var g;return(g=p.animationState)===null||g===void 0?void 0:g.setActive(c,u)}),n[c].isActive=u;const h=i(f,c);for(const p in n)n[p].protectedKeys={};return h}return r(l,"setActive"),{animateChanges:i,setActive:l,setAnimateFunction:a,getState:()=>n}}r(ml,"createAnimationState");function gl(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!_o(e,t):!1}r(gl,"checkVariantsDidChange");function lt(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}r(lt,"createTypeState");function yl(){return{[D.Animate]:lt(!0),[D.InView]:lt(),[D.Hover]:lt(),[D.Tap]:lt(),[D.Drag]:lt(),[D.Focus]:lt(),[D.Exit]:lt()}}r(yl,"createState");const vl={animation:ot(({visualElement:t,animate:e})=>{t.animationState||(t.animationState=ml(t)),pe(e)&&x.exports.useEffect(()=>e.subscribe(t),[e])}),exit:ot(t=>{const{custom:e,visualElement:n}=t,[s,o]=Eo(),a=x.exports.useContext(jt);x.exports.useEffect(()=>{n.isPresent=s;const i=n.animationState&&n.animationState.setActive(D.Exit,!s,{custom:a&&a.custom||e});i&&!s&&i.then(o)},[s])})};class Vn{constructor(e,n,{transformPagePoint:s}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const u=Me(this.lastMoveEventInfo,this.history),f=this.startEvent!==null,d=pn(u.offset,{x:0,y:0})>=3;if(!f&&!d)return;const{point:h}=u,{timestamp:p}=le();this.history.push({...h,timestamp:p});const{onStart:g,onMove:b}=this.handlers;f||(g&&g(this.lastMoveEvent,u),this.startEvent=this.lastMoveEvent),b&&b(this.lastMoveEvent,u)},this.handlePointerMove=(u,f)=>{if(this.lastMoveEvent=u,this.lastMoveEventInfo=De(f,this.transformPagePoint),no(u)&&u.buttons===0){this.handlePointerUp(u,f);return}z.update(this.updatePoint,!0)},this.handlePointerUp=(u,f)=>{this.end();const{onEnd:d,onSessionEnd:h}=this.handlers,p=Me(De(f,this.transformPagePoint),this.history);this.startEvent&&d&&d(u,p),h&&h(u,p)},so(e)&&e.touches.length>1)return;this.handlers=n,this.transformPagePoint=s;const o=rn(e),a=De(o,this.transformPagePoint),{point:i}=a,{timestamp:l}=le();this.history=[{...i,timestamp:l}];const{onSessionStart:c}=n;c&&c(e,Me(a,this.history)),this.removeListeners=ve(yt(window,"pointermove",this.handlePointerMove),yt(window,"pointerup",this.handlePointerUp),yt(window,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),bt.update(this.updatePoint)}}r(Vn,"PanSession");function De(t,e){return e?{point:e(t.point)}:t}r(De,"transformPoint");function Gn(t,e){return{x:t.x-e.x,y:t.y-e.y}}r(Gn,"subtractPoint");function Me({point:t},e){return{point:t,delta:Gn(t,Bo(e)),offset:Gn(t,xl(e)),velocity:bl(e,.1)}}r(Me,"getPanInfo");function xl(t){return t[0]}r(xl,"startDevicePoint");function Bo(t){return t[t.length-1]}r(Bo,"lastDevicePoint");function bl(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,s=null;const o=Bo(t);for(;n>=0&&(s=t[n],!(o.timestamp-s.timestamp>ue(e)));)n--;if(!s)return{x:0,y:0};const a=(o.timestamp-s.timestamp)/1e3;if(a===0)return{x:0,y:0};const i={x:(o.x-s.x)/a,y:(o.y-s.y)/a};return i.x===1/0&&(i.x=0),i.y===1/0&&(i.y=0),i}r(bl,"getVelocity");function U(t){return t.max-t.min}r(U,"calcLength");function Wn(t,e=0,n=.01){return pn(t,e)<n}r(Wn,"isNear");function Kn(t,e,n,s=.5){t.origin=s,t.originPoint=L(e.min,e.max,t.origin),t.scale=U(n)/U(e),(Wn(t.scale,1,1e-4)||isNaN(t.scale))&&(t.scale=1),t.translate=L(n.min,n.max,t.origin)-t.originPoint,(Wn(t.translate)||isNaN(t.translate))&&(t.translate=0)}r(Kn,"calcAxisDelta");function Dt(t,e,n,s){Kn(t.x,e.x,n.x,s==null?void 0:s.originX),Kn(t.y,e.y,n.y,s==null?void 0:s.originY)}r(Dt,"calcBoxDelta");function Yn(t,e,n){t.min=n.min+e.min,t.max=t.min+U(e)}r(Yn,"calcRelativeAxis");function Tl(t,e,n){Yn(t.x,e.x,n.x),Yn(t.y,e.y,n.y)}r(Tl,"calcRelativeBox");function qn(t,e,n){t.min=e.min-n.min,t.max=t.min+U(e)}r(qn,"calcRelativeAxisPosition");function Mt(t,e,n){qn(t.x,e.x,n.x),qn(t.y,e.y,n.y)}r(Mt,"calcRelativePosition");function Vl(t,{min:e,max:n},s){return e!==void 0&&t<e?t=s?L(e,t,s.min):Math.max(t,e):n!==void 0&&t>n&&(t=s?L(n,t,s.max):Math.min(t,n)),t}r(Vl,"applyConstraints");function Zn(t,e,n){return{min:e!==void 0?t.min+e:void 0,max:n!==void 0?t.max+n-(t.max-t.min):void 0}}r(Zn,"calcRelativeAxisConstraints");function Sl(t,{top:e,left:n,bottom:s,right:o}){return{x:Zn(t.x,n,o),y:Zn(t.y,e,s)}}r(Sl,"calcRelativeConstraints");function Xn(t,e){let n=e.min-t.min,s=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,s]=[s,n]),{min:n,max:s}}r(Xn,"calcViewportAxisConstraints");function wl(t,e){return{x:Xn(t.x,e.x),y:Xn(t.y,e.y)}}r(wl,"calcViewportConstraints");function Pl(t,e){let n=.5;const s=U(t),o=U(e);return o>s?n=Ft(e.min,e.max-s,t.min):s>o&&(n=Ft(t.min,t.max-o,e.min)),re(0,1,n)}r(Pl,"calcOrigin");function Cl(t,e){const n={};return e.min!==void 0&&(n.min=e.min-t.min),e.max!==void 0&&(n.max=e.max-t.min),n}r(Cl,"rebaseAxisConstraints");const We=.35;function Al(t=We){return t===!1?t=0:t===!0&&(t=We),{x:Jn(t,"left","right"),y:Jn(t,"top","bottom")}}r(Al,"resolveDragElastic");function Jn(t,e,n){return{min:Qn(t,e),max:Qn(t,n)}}r(Jn,"resolveAxisElastic");function Qn(t,e){var n;return typeof t=="number"?t:(n=t[e])!==null&&n!==void 0?n:0}r(Qn,"resolvePointElastic");const ts=r(()=>({translate:0,scale:1,origin:0,originPoint:0}),"createAxisDelta"),Lt=r(()=>({x:ts(),y:ts()}),"createDelta"),es=r(()=>({min:0,max:0}),"createAxis"),k=r(()=>({x:es(),y:es()}),"createBox");function G(t){return[t("x"),t("y")]}r(G,"eachAxis");function Uo({top:t,left:e,right:n,bottom:s}){return{x:{min:e,max:n},y:{min:t,max:s}}}r(Uo,"convertBoundingBoxToBox");function Rl({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}r(Rl,"convertBoxToBoundingBox");function Dl(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),s=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:s.y,right:s.x}}r(Dl,"transformBoxPoints");function Le(t){return t===void 0||t===1}r(Le,"isIdentityScale");function No({scale:t,scaleX:e,scaleY:n}){return!Le(t)||!Le(e)||!Le(n)}r(No,"hasScale");function et(t){return No(t)||ns(t.x)||ns(t.y)||t.z||t.rotate||t.rotateX||t.rotateY}r(et,"hasTransform");function ns(t){return t&&t!=="0%"}r(ns,"hasTranslate");function de(t,e,n){const s=t-n,o=e*s;return n+o}r(de,"scalePoint");function ss(t,e,n,s,o){return o!==void 0&&(t=de(t,o,s)),de(t,n,s)+e}r(ss,"applyPointDelta");function Ke(t,e=0,n=1,s,o){t.min=ss(t.min,e,n,s,o),t.max=ss(t.max,e,n,s,o)}r(Ke,"applyAxisDelta");function $o(t,{x:e,y:n}){Ke(t.x,e.translate,e.scale,e.originPoint),Ke(t.y,n.translate,n.scale,n.originPoint)}r($o,"applyBoxDelta");function Ml(t,e,n,s=!1){var o,a;const i=n.length;if(!i)return;e.x=e.y=1;let l,c;for(let u=0;u<i;u++)l=n[u],c=l.projectionDelta,((a=(o=l.instance)===null||o===void 0?void 0:o.style)===null||a===void 0?void 0:a.display)!=="contents"&&(s&&l.options.layoutScroll&&l.scroll&&l!==l.root&>(t,{x:-l.scroll.x,y:-l.scroll.y}),c&&(e.x*=c.x.scale,e.y*=c.y.scale,$o(t,c)),s&&et(l.latestValues)&>(t,l.latestValues))}r(Ml,"applyTreeDeltas");function nt(t,e){t.min=t.min+e,t.max=t.max+e}r(nt,"translateAxis");function os(t,e,[n,s,o]){const a=e[o]!==void 0?e[o]:.5,i=L(t.min,t.max,a);Ke(t,e[n],e[s],i,e.scale)}r(os,"transformAxis");const Ll=["x","scaleX","originX"],Ol=["y","scaleY","originY"];function gt(t,e){os(t.x,e,Ll),os(t.y,e,Ol)}r(gt,"transformBox");function zo(t,e){return Uo(Dl(t.getBoundingClientRect(),e))}r(zo,"measureViewportBox");function El(t,e,n){const s=zo(t,n),{scroll:o}=e;return o&&(nt(s.x,o.x),nt(s.y,o.y)),s}r(El,"measurePageBox");const _l=new WeakMap;class Ho{constructor(e){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=k(),this.visualElement=e}start(e,{snapToCursor:n=!1}={}){if(this.visualElement.isPresent===!1)return;const s=r(l=>{this.stopAnimation(),n&&this.snapToCursor(rn(l,"page").point)},"onSessionStart"),o=r((l,c)=>{var u;const{drag:f,dragPropagation:d,onDragStart:h}=this.getProps();f&&!d&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=ao(f),!this.openGlobalLock)||(this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),G(p=>{var g,b;let V=this.getAxisMotionValue(p).get()||0;if(W.test(V)){const P=(b=(g=this.visualElement.projection)===null||g===void 0?void 0:g.layout)===null||b===void 0?void 0:b.actual[p];P&&(V=U(P)*(parseFloat(V)/100))}this.originPoint[p]=V}),h==null||h(l,c),(u=this.visualElement.animationState)===null||u===void 0||u.setActive(D.Drag,!0))},"onStart"),a=r((l,c)=>{const{dragPropagation:u,dragDirectionLock:f,onDirectionLock:d,onDrag:h}=this.getProps();if(!u&&!this.openGlobalLock)return;const{offset:p}=c;if(f&&this.currentDirection===null){this.currentDirection=kl(p),this.currentDirection!==null&&(d==null||d(this.currentDirection));return}this.updateAxis("x",c.point,p),this.updateAxis("y",c.point,p),this.visualElement.syncRender(),h==null||h(l,c)},"onMove"),i=r((l,c)=>this.stop(l,c),"onSessionEnd");this.panSession=new Vn(e,{onSessionStart:s,onStart:o,onMove:a,onSessionEnd:i},{transformPagePoint:this.visualElement.getTransformPagePoint()})}stop(e,n){const s=this.isDragging;if(this.cancel(),!s)return;const{velocity:o}=n;this.startAnimation(o);const{onDragEnd:a}=this.getProps();a==null||a(e,n)}cancel(){var e,n;this.isDragging=!1,this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!1),(e=this.panSession)===null||e===void 0||e.end(),this.panSession=void 0;const{dragPropagation:s}=this.getProps();!s&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),(n=this.visualElement.animationState)===null||n===void 0||n.setActive(D.Drag,!1)}updateAxis(e,n,s){const{drag:o}=this.getProps();if(!s||!Kt(e,o,this.currentDirection))return;const a=this.getAxisMotionValue(e);let i=this.originPoint[e]+s[e];this.constraints&&this.constraints[e]&&(i=Vl(i,this.constraints[e],this.elastic[e])),a.set(i)}resolveConstraints(){const{dragConstraints:e,dragElastic:n}=this.getProps(),{layout:s}=this.visualElement.projection||{},o=this.constraints;e&&mt(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&s?this.constraints=Sl(s.actual,e):this.constraints=!1,this.elastic=Al(n),o!==this.constraints&&s&&this.constraints&&!this.hasMutatedConstraints&&G(a=>{this.getAxisMotionValue(a)&&(this.constraints[a]=Cl(s.actual[a],this.constraints[a]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!mt(e))return!1;const s=e.current,{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const a=El(s,o.root,this.visualElement.getTransformPagePoint());let i=wl(o.layout.actual,a);if(n){const l=n(Rl(i));this.hasMutatedConstraints=!!l,l&&(i=Uo(l))}return i}startAnimation(e){const{drag:n,dragMomentum:s,dragElastic:o,dragTransition:a,dragSnapToOrigin:i,onDragTransitionEnd:l}=this.getProps(),c=this.constraints||{},u=G(f=>{var d;if(!Kt(f,n,this.currentDirection))return;let h=(d=c==null?void 0:c[f])!==null&&d!==void 0?d:{};i&&(h={min:0,max:0});const p=o?200:1e6,g=o?40:1e7,b={type:"inertia",velocity:s?e[f]:0,bounceStiffness:p,bounceDamping:g,timeConstant:750,restDelta:1,restSpeed:10,...a,...h};return this.startAxisValueAnimation(f,b)});return Promise.all(u).then(l)}startAxisValueAnimation(e,n){const s=this.getAxisMotionValue(e);return vn(e,s,0,n)}stopAnimation(){G(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){var n,s;const o="_drag"+e.toUpperCase(),a=this.visualElement.getProps()[o];return a||this.visualElement.getValue(e,(s=(n=this.visualElement.getProps().initial)===null||n===void 0?void 0:n[e])!==null&&s!==void 0?s:0)}snapToCursor(e){G(n=>{const{drag:s}=this.getProps();if(!Kt(n,s,this.currentDirection))return;const{projection:o}=this.visualElement,a=this.getAxisMotionValue(n);if(o&&o.layout){const{min:i,max:l}=o.layout.actual[n];a.set(e[n]-L(i,l,.5))}})}scalePositionWithinConstraints(){var e;const{drag:n,dragConstraints:s}=this.getProps(),{projection:o}=this.visualElement;if(!mt(s)||!o||!this.constraints)return;this.stopAnimation();const a={x:0,y:0};G(l=>{const c=this.getAxisMotionValue(l);if(c){const u=c.get();a[l]=Pl({min:u,max:u},this.constraints[l])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.getInstance().style.transform=i?i({},""):"none",(e=o.root)===null||e===void 0||e.updateScroll(),o.updateLayout(),this.resolveConstraints(),G(l=>{if(!Kt(l,n,null))return;const c=this.getAxisMotionValue(l),{min:u,max:f}=this.constraints[l];c.set(L(u,f,a[l]))})}addListeners(){var e;_l.set(this.visualElement,this);const n=this.visualElement.getInstance(),s=yt(n,"pointerdown",u=>{const{drag:f,dragListener:d=!0}=this.getProps();f&&d&&this.start(u)}),o=r(()=>{const{dragConstraints:u}=this.getProps();mt(u)&&(this.constraints=this.resolveRefConstraints())},"measureDragConstraints"),{projection:a}=this.visualElement,i=a.addEventListener("measure",o);a&&!a.layout&&((e=a.root)===null||e===void 0||e.updateScroll(),a.updateLayout()),o();const l=ye(window,"resize",()=>this.scalePositionWithinConstraints()),c=a.addEventListener("didUpdate",({delta:u,hasLayoutChanged:f})=>{this.isDragging&&f&&(G(d=>{const h=this.getAxisMotionValue(d);!h||(this.originPoint[d]+=u[d].translate,h.set(h.get()+u[d].translate))}),this.visualElement.syncRender())});return()=>{l(),s(),i(),c==null||c()}}getProps(){const e=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:s=!1,dragPropagation:o=!1,dragConstraints:a=!1,dragElastic:i=We,dragMomentum:l=!0}=e;return{...e,drag:n,dragDirectionLock:s,dragPropagation:o,dragConstraints:a,dragElastic:i,dragMomentum:l}}}r(Ho,"VisualElementDragControls");function Kt(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}r(Kt,"shouldDrag");function kl(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}r(kl,"getCurrentDirection");function Fl(t){const{dragControls:e,visualElement:n}=t,s=ge(()=>new Ho(n));x.exports.useEffect(()=>e&&e.subscribe(s),[s,e]),x.exports.useEffect(()=>s.addListeners(),[s])}r(Fl,"useDrag");function Il({onPan:t,onPanStart:e,onPanEnd:n,onPanSessionStart:s,visualElement:o}){const a=t||e||n||s,i=x.exports.useRef(null),{transformPagePoint:l}=x.exports.useContext(Xe),c={onSessionStart:s,onStart:e,onMove:t,onEnd:(f,d)=>{i.current=null,n&&n(f,d)}};x.exports.useEffect(()=>{i.current!==null&&i.current.updateHandlers(c)});function u(f){i.current=new Vn(f,c,{transformPagePoint:l})}r(u,"onPointerDown"),oe(o,"pointerdown",a&&u),an(()=>i.current&&i.current.end())}r(Il,"usePanGesture");const jl={pan:ot(Il),drag:ot(Fl)},Ye={current:null},Go={current:!1};function Bl(){if(Go.current=!0,!!ut)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=r(()=>Ye.current=t.matches,"setReducedMotionPreferences");t.addListener(e),e()}else Ye.current=!1}r(Bl,"initPrefersReducedMotion");const Yt=["LayoutMeasure","BeforeLayoutMeasure","LayoutUpdate","ViewportBoxUpdate","Update","Render","AnimationComplete","LayoutAnimationComplete","AnimationStart","LayoutAnimationStart","SetAxisTarget","Unmount"];function Ul(){const t=Yt.map(()=>new xt),e={},n={clearAllListeners:()=>t.forEach(s=>s.clear()),updatePropListeners:s=>{Yt.forEach(o=>{var a;const i="on"+o,l=s[i];(a=e[o])===null||a===void 0||a.call(e),l&&(e[o]=n[i](l))})}};return t.forEach((s,o)=>{n["on"+Yt[o]]=a=>s.add(a),n["notify"+Yt[o]]=(...a)=>s.notify(...a)}),n}r(Ul,"createLifecycles");function Nl(t,e,n){const{willChange:s}=e;for(const o in e){const a=e[o],i=n[o];if($(a))t.addValue(o,a),fe(s)&&s.add(o);else if($(i))t.addValue(o,Tt(a)),fe(s)&&s.remove(o);else if(i!==a)if(t.hasValue(o)){const l=t.getValue(o);!l.hasAnimated&&l.set(a)}else{const l=t.getStaticValue(o);t.addValue(o,Tt(l!==void 0?l:a))}}for(const o in n)e[o]===void 0&&t.removeValue(o);return e}r(Nl,"updateMotionValuesFromProps");const Wo=Object.keys(Et),$l=Wo.length,Ko=r(({treeType:t="",build:e,getBaseTarget:n,makeTargetAnimatable:s,measureViewportBox:o,render:a,readValueFromInstance:i,removeValueFromRenderState:l,sortNodePosition:c,scrapeMotionValuesFromProps:u})=>({parent:f,props:d,presenceId:h,blockInitialAnimation:p,visualState:g,reducedMotionConfig:b},V={})=>{let P=!1;const{latestValues:T,renderState:m}=g;let v;const S=Ul(),R=new Map,M=new Map;let F={};const _={...T};let B;function Z(){!v||!P||(H(),a(v,m,d.style,A.projection))}r(Z,"render");function H(){e(A,m,T,V,d)}r(H,"triggerBuild");function it(){S.notifyUpdate(T)}r(it,"update");function X(y,C){const O=C.onChange(Q=>{T[y]=Q,d.onUpdate&&z.update(it,!1,!0)}),dt=C.onRenderRequest(A.scheduleRender);M.set(y,()=>{O(),dt()})}r(X,"bindToMotionValue");const{willChange:K,...E}=u(d);for(const y in E){const C=E[y];T[y]!==void 0&&$(C)&&(C.set(T[y],!1),fe(K)&&K.add(y))}if(d.values)for(const y in d.values){const C=d.values[y];T[y]!==void 0&&$(C)&&C.set(T[y])}const J=me(d),rt=Os(d),A={treeType:t,current:null,depth:f?f.depth+1:0,parent:f,children:new Set,presenceId:h,shouldReduceMotion:null,variantChildren:rt?new Set:void 0,isVisible:void 0,manuallyAnimateOnMount:Boolean(f==null?void 0:f.isMounted()),blockInitialAnimation:p,isMounted:()=>Boolean(v),mount(y){P=!0,v=A.current=y,A.projection&&A.projection.mount(y),rt&&f&&!J&&(B=f==null?void 0:f.addVariantChild(A)),R.forEach((C,O)=>X(O,C)),Go.current||Bl(),A.shouldReduceMotion=b==="never"?!1:b==="always"?!0:Ye.current,f==null||f.children.add(A),A.setProps(d)},unmount(){var y;(y=A.projection)===null||y===void 0||y.unmount(),bt.update(it),bt.render(Z),M.forEach(C=>C()),B==null||B(),f==null||f.children.delete(A),S.clearAllListeners(),v=void 0,P=!1},loadFeatures(y,C,O,dt,Q,di){const Sn=[];for(let Vt=0;Vt<$l;Vt++){const ht=Wo[Vt],{isEnabled:Ve,Component:St}=Et[ht];Ve(y)&&St&&Sn.push(x.exports.createElement(St,{key:ht,...y,visualElement:A}))}if(!A.projection&&Q){A.projection=new Q(dt,A.getLatestValues(),f&&f.projection);const{layoutId:Vt,layout:ht,drag:Ve,dragConstraints:St,layoutScroll:hi}=y;A.projection.setOptions({layoutId:Vt,layout:ht,alwaysMeasureLayout:Boolean(Ve)||St&&mt(St),visualElement:A,scheduleRender:()=>A.scheduleRender(),animationType:typeof ht=="string"?ht:"both",initialPromotionConfig:di,layoutScroll:hi})}return Sn},addVariantChild(y){var C;const O=A.getClosestVariantNode();if(O)return(C=O.variantChildren)===null||C===void 0||C.add(y),()=>O.variantChildren.delete(y)},sortNodePosition(y){return!c||t!==y.treeType?0:c(A.getInstance(),y.getInstance())},getClosestVariantNode:()=>rt?A:f==null?void 0:f.getClosestVariantNode(),getLayoutId:()=>d.layoutId,getInstance:()=>v,getStaticValue:y=>T[y],setStaticValue:(y,C)=>T[y]=C,getLatestValues:()=>T,setVisibility(y){A.isVisible!==y&&(A.isVisible=y,A.scheduleRender())},makeTargetAnimatable(y,C=!0){return s(A,y,d,C)},measureViewportBox(){return o(v,d)},addValue(y,C){A.hasValue(y)&&A.removeValue(y),R.set(y,C),T[y]=C.get(),X(y,C)},removeValue(y){var C;R.delete(y),(C=M.get(y))===null||C===void 0||C(),M.delete(y),delete T[y],l(y,m)},hasValue:y=>R.has(y),getValue(y,C){if(d.values&&d.values[y])return d.values[y];let O=R.get(y);return O===void 0&&C!==void 0&&(O=Tt(C),A.addValue(y,O)),O},forEachValue:y=>R.forEach(y),readValue:y=>T[y]!==void 0?T[y]:i(v,y,V),setBaseTarget(y,C){_[y]=C},getBaseTarget(y){if(n){const C=n(d,y);if(C!==void 0&&!$(C))return C}return _[y]},...S,build(){return H(),m},scheduleRender(){z.render(Z,!1,!0)},syncRender:Z,setProps(y){(y.transformTemplate||d.transformTemplate)&&A.scheduleRender(),d=y,S.updatePropListeners(y),F=Nl(A,u(d),F)},getProps:()=>d,getVariant:y=>{var C;return(C=d.variants)===null||C===void 0?void 0:C[y]},getDefaultTransition:()=>d.transition,getTransformPagePoint:()=>d.transformPagePoint,getVariantContext(y=!1){if(y)return f==null?void 0:f.getVariantContext();if(!J){const O=(f==null?void 0:f.getVariantContext())||{};return d.initial!==void 0&&(O.initial=d.initial),O}const C={};for(let O=0;O<zl;O++){const dt=Yo[O],Q=d[dt];(Ot(Q)||Q===!1)&&(C[dt]=Q)}return C}};return A},"visualElement"),Yo=["initial",...Tn],zl=Yo.length;function qe(t){return typeof t=="string"&&t.startsWith("var(--")}r(qe,"isCSSVariable");const qo=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function Hl(t){const e=qo.exec(t);if(!e)return[,];const[,n,s]=e;return[n,s]}r(Hl,"parseCSSVariable");function Ze(t,e,n=1){const[s,o]=Hl(t);if(!s)return;const a=window.getComputedStyle(e).getPropertyValue(s);return a?a.trim():qe(o)?Ze(o,e,n+1):o}r(Ze,"getVariableValue");function Gl(t,{...e},n){const s=t.getInstance();if(!(s instanceof Element))return{target:e,transitionEnd:n};n&&(n={...n}),t.forEachValue(o=>{const a=o.get();if(!qe(a))return;const i=Ze(a,s);i&&o.set(i)});for(const o in e){const a=e[o];if(!qe(a))continue;const i=Ze(a,s);!i||(e[o]=i,n&&n[o]===void 0&&(n[o]=a))}return{target:e,transitionEnd:n}}r(Gl,"resolveCSSVariables");const Wl=new Set(["width","height","top","left","right","bottom","x","y"]),Zo=r(t=>Wl.has(t),"isPositionalKey"),Kl=r(t=>Object.keys(t).some(Zo),"hasPositionalKey"),Xo=r((t,e)=>{t.set(e,!1),t.set(e)},"setAndResetVelocity"),is=r(t=>t===ft||t===w,"isNumOrPxType");var rs;(function(t){t.width="width",t.height="height",t.left="left",t.right="right",t.top="top",t.bottom="bottom"})(rs||(rs={}));const as=r((t,e)=>parseFloat(t.split(", ")[e]),"getPosFromMatrix"),ls=r((t,e)=>(n,{transform:s})=>{if(s==="none"||!s)return 0;const o=s.match(/^matrix3d\((.+)\)$/);if(o)return as(o[1],e);{const a=s.match(/^matrix\((.+)\)$/);return a?as(a[1],t):0}},"getTranslateFromMatrix"),Yl=new Set(["x","y","z"]),ql=ne.filter(t=>!Yl.has(t));function Zl(t){const e=[];return ql.forEach(n=>{const s=t.getValue(n);s!==void 0&&(e.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),e.length&&t.syncRender(),e}r(Zl,"removeNonTranslationalTransform");const cs={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:ls(4,13),y:ls(5,14)},Xl=r((t,e,n)=>{const s=e.measureViewportBox(),o=e.getInstance(),a=getComputedStyle(o),{display:i}=a,l={};i==="none"&&e.setStaticValue("display",t.display||"block"),n.forEach(u=>{l[u]=cs[u](s,a)}),e.syncRender();const c=e.measureViewportBox();return n.forEach(u=>{const f=e.getValue(u);Xo(f,l[u]),t[u]=cs[u](c,a)}),t},"convertChangedValueTypes"),Jl=r((t,e,n={},s={})=>{e={...e},s={...s};const o=Object.keys(e).filter(Zo);let a=[],i=!1;const l=[];if(o.forEach(c=>{const u=t.getValue(c);if(!t.hasValue(c))return;let f=n[c],d=wt(f);const h=e[c];let p;if(kt(h)){const g=h.length,b=h[0]===null?1:0;f=h[b],d=wt(f);for(let V=b;V<g;V++)p?ie(wt(h[V])===p):p=wt(h[V])}else p=wt(h);if(d!==p)if(is(d)&&is(p)){const g=u.get();typeof g=="string"&&u.set(parseFloat(g)),typeof h=="string"?e[c]=parseFloat(h):Array.isArray(h)&&p===w&&(e[c]=h.map(parseFloat))}else(d==null?void 0:d.transform)&&(p==null?void 0:p.transform)&&(f===0||h===0)?f===0?u.set(p.transform(f)):e[c]=d.transform(h):(i||(a=Zl(t),i=!0),l.push(c),s[c]=s[c]!==void 0?s[c]:e[c],Xo(u,h))}),l.length){const c=l.indexOf("height")>=0?window.pageYOffset:null,u=Xl(e,t,l);return a.length&&a.forEach(([f,d])=>{t.getValue(f).set(d)}),t.syncRender(),ut&&c!==null&&window.scrollTo({top:c}),{target:u,transitionEnd:s}}else return{target:e,transitionEnd:s}},"checkAndConvertChangedValueTypes");function Ql(t,e,n,s){return Kl(e)?Jl(t,e,n,s):{target:e,transitionEnd:s}}r(Ql,"unitConversion");const tc=r((t,e,n,s)=>{const o=Gl(t,e,s);return e=o.target,s=o.transitionEnd,Ql(t,e,n,s)},"parseDomVariant");function ec(t){return window.getComputedStyle(t)}r(ec,"getComputedStyle$1");const Jo={treeType:"dom",readValueFromInstance(t,e){if(Bt.has(e)){const n=mn(e);return n&&n.default||0}else{const n=ec(t),s=(Fs(e)?n.getPropertyValue(e):n[e])||0;return typeof s=="string"?s.trim():s}},sortNodePosition(t,e){return t.compareDocumentPosition(e)&2?1:-1},getBaseTarget(t,e){var n;return(n=t.style)===null||n===void 0?void 0:n[e]},measureViewportBox(t,{transformPagePoint:e}){return zo(t,e)},resetTransform(t,e,n){const{transformTemplate:s}=n;e.style.transform=s?s({},""):"none",t.scheduleRender()},restoreTransform(t,e){t.style.transform=e.style.transform},removeValueFromRenderState(t,{vars:e,style:n}){delete e[t],delete n[t]},makeTargetAnimatable(t,{transition:e,transitionEnd:n,...s},{transformValues:o},a=!0){let i=al(s,e||{},t);if(o&&(n&&(n=o(n)),s&&(s=o(s)),i&&(i=o(i))),a){il(t,s,i);const l=tc(t,s,i,n);n=l.transitionEnd,s=l.target}return{transition:e,transitionEnd:n,...s}},scrapeMotionValuesFromProps:on,build(t,e,n,s,o){t.isVisible!==void 0&&(e.style.visibility=t.isVisible?"visible":"hidden"),en(e,n,s,o.transformTemplate)},render:qs},nc=Ko(Jo),sc=Ko({...Jo,getBaseTarget(t,e){return t[e]},readValueFromInstance(t,e){var n;return Bt.has(e)?((n=mn(e))===null||n===void 0?void 0:n.default)||0:(e=Zs.has(e)?e:Ys(e),t.getAttribute(e))},scrapeMotionValuesFromProps:Js,build(t,e,n,s,o){sn(e,n,s,o.transformTemplate)},render:Xs}),oc=r((t,e)=>Qe(t)?sc(e,{enableHardwareAcceleration:!1}):nc(e,{enableHardwareAcceleration:!0}),"createDomVisualElement");function us(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}r(us,"pixelsToPercent");const Pt={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(w.test(t))t=parseFloat(t);else return t;const n=us(t,e.target.x),s=us(t,e.target.y);return`${n}% ${s}%`}},fs="_$css",ic={correct:(t,{treeScale:e,projectionDelta:n})=>{const s=t,o=t.includes("var("),a=[];o&&(t=t.replace(qo,p=>(a.push(p),fs)));const i=q.parse(t);if(i.length>5)return s;const l=q.createTransformer(t),c=typeof i[0]!="number"?1:0,u=n.x.scale*e.x,f=n.y.scale*e.y;i[0+c]/=u,i[1+c]/=f;const d=L(u,f,.5);typeof i[2+c]=="number"&&(i[2+c]/=d),typeof i[3+c]=="number"&&(i[3+c]/=d);let h=l(i);if(o){let p=0;h=h.replace(fs,()=>{const g=a[p];return p++,g})}return h}};class Qo extends Ds.Component{componentDidMount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s,layoutId:o}=this.props,{projection:a}=e;Mi(ac),a&&(n.group&&n.group.add(a),s&&s.register&&o&&s.register(a),a.root.didUpdate(),a.addEventListener("animationComplete",()=>{this.safeToRemove()}),a.setOptions({...a.options,onExitComplete:()=>this.safeToRemove()})),Ct.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:n,visualElement:s,drag:o,isPresent:a}=this.props,i=s.projection;return i&&(i.isPresent=a,o||e.layoutDependency!==n||n===void 0?i.willUpdate():this.safeToRemove(),e.isPresent!==a&&(a?i.promote():i.relegate()||z.postRender(()=>{var l;!((l=i.getStack())===null||l===void 0)&&l.members.length||this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),!e.currentAnimation&&e.isLead()&&this.safeToRemove())}componentWillUnmount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s}=this.props,{projection:o}=e;o&&(o.scheduleCheckAfterUnmount(),n!=null&&n.group&&n.group.remove(o),s!=null&&s.deregister&&s.deregister(o))}safeToRemove(){const{safeToRemove:e}=this.props;e==null||e()}render(){return null}}r(Qo,"MeasureLayoutWithContext");function rc(t){const[e,n]=Eo(),s=x.exports.useContext(Je);return I(Qo,{...t,layoutGroup:s,switchLayoutGroup:x.exports.useContext(_s),isPresent:e,safeToRemove:n})}r(rc,"MeasureLayout");const ac={borderRadius:{...Pt,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Pt,borderTopRightRadius:Pt,borderBottomLeftRadius:Pt,borderBottomRightRadius:Pt,boxShadow:ic},lc={measureLayout:rc};function cc(t,e,n={}){const s=$(t)?t:Tt(t);return vn("",s,e,n),{stop:()=>s.stop(),isAnimating:()=>s.isAnimating()}}r(cc,"animate");const ti=["TopLeft","TopRight","BottomLeft","BottomRight"],uc=ti.length,ds=r(t=>typeof t=="string"?parseFloat(t):t,"asNumber"),hs=r(t=>typeof t=="number"||w.test(t),"isPx");function fc(t,e,n,s,o,a){var i,l,c,u;o?(t.opacity=L(0,(i=n.opacity)!==null&&i!==void 0?i:1,dc(s)),t.opacityExit=L((l=e.opacity)!==null&&l!==void 0?l:1,0,hc(s))):a&&(t.opacity=L((c=e.opacity)!==null&&c!==void 0?c:1,(u=n.opacity)!==null&&u!==void 0?u:1,s));for(let f=0;f<uc;f++){const d=`border${ti[f]}Radius`;let h=ps(e,d),p=ps(n,d);if(h===void 0&&p===void 0)continue;h||(h=0),p||(p=0),h===0||p===0||hs(h)===hs(p)?(t[d]=Math.max(L(ds(h),ds(p),s),0),(W.test(p)||W.test(h))&&(t[d]+="%")):t[d]=p}(e.rotate||n.rotate)&&(t.rotate=L(e.rotate||0,n.rotate||0,s))}r(fc,"mixValues");function ps(t,e){var n;return(n=t[e])!==null&&n!==void 0?n:t.borderRadius}r(ps,"getRadius");const dc=ei(0,.5,dn),hc=ei(.5,.95,un);function ei(t,e,n){return s=>s<t?0:s>e?1:n(Ft(t,e,s))}r(ei,"compress");function ms(t,e){t.min=e.min,t.max=e.max}r(ms,"copyAxisInto");function N(t,e){ms(t.x,e.x),ms(t.y,e.y)}r(N,"copyBoxInto");function gs(t,e,n,s,o){return t-=e,t=de(t,1/n,s),o!==void 0&&(t=de(t,1/o,s)),t}r(gs,"removePointDelta");function pc(t,e=0,n=1,s=.5,o,a=t,i=t){if(W.test(e)&&(e=parseFloat(e),e=L(i.min,i.max,e/100)-i.min),typeof e!="number")return;let l=L(a.min,a.max,s);t===a&&(l-=e),t.min=gs(t.min,e,n,l,o),t.max=gs(t.max,e,n,l,o)}r(pc,"removeAxisDelta");function ys(t,e,[n,s,o],a,i){pc(t,e[n],e[s],e[o],e.scale,a,i)}r(ys,"removeAxisTransforms");const mc=["x","scaleX","originX"],gc=["y","scaleY","originY"];function vs(t,e,n,s){ys(t.x,e,mc,n==null?void 0:n.x,s==null?void 0:s.x),ys(t.y,e,gc,n==null?void 0:n.y,s==null?void 0:s.y)}r(vs,"removeBoxTransforms");function xs(t){return t.translate===0&&t.scale===1}r(xs,"isAxisDeltaZero");function ni(t){return xs(t.x)&&xs(t.y)}r(ni,"isDeltaZero");function si(t,e){return t.x.min===e.x.min&&t.x.max===e.x.max&&t.y.min===e.y.min&&t.y.max===e.y.max}r(si,"boxEquals");function bs(t){return U(t.x)/U(t.y)}r(bs,"aspectRatio");function yc(t,e,n=.1){return pn(t,e)<=n}r(yc,"isCloseTo");class oi{constructor(){this.members=[]}add(e){xn(this.members,e),e.scheduleRender()}remove(e){if(bn(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(e){const n=this.members.findIndex(o=>e===o);if(n===0)return!1;let s;for(let o=n;o>=0;o--){const a=this.members[o];if(a.isPresent!==!1){s=a;break}}return s?(this.promote(s),!0):!1}promote(e,n){var s;const o=this.lead;if(e!==o&&(this.prevLead=o,this.lead=e,e.show(),o)){o.instance&&o.scheduleRender(),e.scheduleRender(),e.resumeFrom=o,n&&(e.resumeFrom.preserveOpacity=!0),o.snapshot&&(e.snapshot=o.snapshot,e.snapshot.latestValues=o.animationValues||o.latestValues,e.snapshot.isShared=!0),!((s=e.root)===null||s===void 0)&&s.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:a}=e.options;a===!1&&o.hide()}}exitAnimationComplete(){this.members.forEach(e=>{var n,s,o,a,i;(s=(n=e.options).onExitComplete)===null||s===void 0||s.call(n),(i=(o=e.resumingFrom)===null||o===void 0?void 0:(a=o.options).onExitComplete)===null||i===void 0||i.call(a)})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}r(oi,"NodeStack");const vc="translate3d(0px, 0px, 0) scale(1, 1) scale(1, 1)";function Ts(t,e,n){const s=t.x.translate/e.x,o=t.y.translate/e.y;let a=`translate3d(${s}px, ${o}px, 0) `;if(a+=`scale(${1/e.x}, ${1/e.y}) `,n){const{rotate:c,rotateX:u,rotateY:f}=n;c&&(a+=`rotate(${c}deg) `),u&&(a+=`rotateX(${u}deg) `),f&&(a+=`rotateY(${f}deg) `)}const i=t.x.scale*e.x,l=t.y.scale*e.y;return a+=`scale(${i}, ${l})`,a===vc?"none":a}r(Ts,"buildProjectionTransform");const xc=r((t,e)=>t.depth-e.depth,"compareByDepth");class ii{constructor(){this.children=[],this.isDirty=!1}add(e){xn(this.children,e),this.isDirty=!0}remove(e){bn(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(xc),this.isDirty=!1,this.children.forEach(e)}}r(ii,"FlatTree");const Vs=["","X","Y","Z"],Ss=1e3;function ri({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:s,resetTransform:o}){return r(class{constructor(i,l={},c=e==null?void 0:e()){this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.potentialNodes=new Map,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.nodes.forEach(Pc),this.nodes.forEach(Cc)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.id=i,this.latestValues=l,this.root=c?c.root||c:this,this.path=c?[...c.path,c]:[],this.parent=c,this.depth=c?c.depth+1:0,i&&this.root.registerPotentialNode(i,this);for(let u=0;u<this.path.length;u++)this.path[u].shouldResetTransform=!0;this.root===this&&(this.nodes=new ii)}addEventListener(i,l){return this.eventHandlers.has(i)||this.eventHandlers.set(i,new xt),this.eventHandlers.get(i).add(l)}notifyListeners(i,...l){const c=this.eventHandlers.get(i);c==null||c.notify(...l)}hasListeners(i){return this.eventHandlers.has(i)}registerPotentialNode(i,l){this.potentialNodes.set(i,l)}mount(i,l=!1){var c;if(this.instance)return;this.isSVG=i instanceof SVGElement&&i.tagName!=="svg",this.instance=i;const{layoutId:u,layout:f,visualElement:d}=this.options;if(d&&!d.getInstance()&&d.mount(i),this.root.nodes.add(this),(c=this.parent)===null||c===void 0||c.children.add(this),this.id&&this.root.potentialNodes.delete(this.id),l&&(f||u)&&(this.isLayoutDirty=!0),t){let h;const p=r(()=>this.root.updateBlockedByResize=!1,"resizeUnblockUpdate");t(i,()=>{this.root.updateBlockedByResize=!0,clearTimeout(h),h=window.setTimeout(p,250),Ct.hasAnimatedSinceResize&&(Ct.hasAnimatedSinceResize=!1,this.nodes.forEach(wc))})}u&&this.root.registerSharedNode(u,this),this.options.animate!==!1&&d&&(u||f)&&this.addEventListener("didUpdate",({delta:h,hasLayoutChanged:p,hasRelativeTargetChanged:g,layout:b})=>{var V,P,T,m,v;if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const S=(P=(V=this.options.transition)!==null&&V!==void 0?V:d.getDefaultTransition())!==null&&P!==void 0?P:Lc,{onLayoutAnimationStart:R,onLayoutAnimationComplete:M}=d.getProps(),F=!this.targetLayout||!si(this.targetLayout,b)||g,_=!p&&g;if(((T=this.resumeFrom)===null||T===void 0?void 0:T.instance)||_||p&&(F||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(h,_);const B={...yn(S,"layout"),onPlay:R,onComplete:M};d.shouldReduceMotion&&(B.delay=0,B.type=!1),this.startAnimation(B)}else!p&&this.animationProgress===0&&this.finishAnimation(),this.isLead()&&((v=(m=this.options).onExitComplete)===null||v===void 0||v.call(m));this.targetLayout=b})}unmount(){var i,l;this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this),(i=this.getStack())===null||i===void 0||i.remove(this),(l=this.parent)===null||l===void 0||l.children.delete(this),this.instance=void 0,bt.preRender(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){var i;return this.isAnimationBlocked||((i=this.parent)===null||i===void 0?void 0:i.isTreeAnimationBlocked())||!1}startUpdate(){var i;this.isUpdateBlocked()||(this.isUpdating=!0,(i=this.nodes)===null||i===void 0||i.forEach(Ac))}willUpdate(i=!0){var l,c,u;if(this.root.isUpdateBlocked()){(c=(l=this.options).onExitComplete)===null||c===void 0||c.call(l);return}if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let p=0;p<this.path.length;p++){const g=this.path[p];g.shouldResetTransform=!0,g.updateScroll()}const{layoutId:f,layout:d}=this.options;if(f===void 0&&!d)return;const h=(u=this.options.visualElement)===null||u===void 0?void 0:u.getProps().transformTemplate;this.prevTransformTemplateValue=h==null?void 0:h(this.latestValues,""),this.updateSnapshot(),i&&this.notifyListeners("willUpdate")}didUpdate(){if(this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(ws);return}!this.isUpdating||(this.isUpdating=!1,this.potentialNodes.size&&(this.potentialNodes.forEach(Oc),this.potentialNodes.clear()),this.nodes.forEach(Sc),this.nodes.forEach(bc),this.nodes.forEach(Tc),this.clearAllSnapshots(),Ce.update(),Ce.preRender(),Ce.render())}clearAllSnapshots(){this.nodes.forEach(Vc),this.sharedNodes.forEach(Rc)}scheduleUpdateProjection(){z.preRender(this.updateProjection,!1,!0)}scheduleCheckAfterUnmount(){z.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){if(this.snapshot||!this.instance)return;const i=this.measure(),l=this.removeTransform(this.removeElementScroll(i));Rs(l),this.snapshot={measured:i,layout:l,latestValues:{}}}updateLayout(){var i;if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let u=0;u<this.path.length;u++)this.path[u].updateScroll();const l=this.measure();Rs(l);const c=this.layout;this.layout={measured:l,actual:this.removeElementScroll(l)},this.layoutCorrected=k(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.actual),(i=this.options.visualElement)===null||i===void 0||i.notifyLayoutMeasure(this.layout.actual,c==null?void 0:c.actual)}updateScroll(){this.options.layoutScroll&&this.instance&&(this.isScrollRoot=s(this.instance),this.scroll=n(this.instance))}resetTransform(){var i;if(!o)return;const l=this.isLayoutDirty||this.shouldResetTransform,c=this.projectionDelta&&!ni(this.projectionDelta),u=(i=this.options.visualElement)===null||i===void 0?void 0:i.getProps().transformTemplate,f=u==null?void 0:u(this.latestValues,""),d=f!==this.prevTransformTemplateValue;l&&(c||et(this.latestValues)||d)&&(o(this.instance,f),this.shouldResetTransform=!1,this.scheduleRender())}measure(){const{visualElement:i}=this.options;if(!i)return k();const l=i.measureViewportBox(),{scroll:c}=this.root;return c&&(nt(l.x,c.x),nt(l.y,c.y)),l}removeElementScroll(i){const l=k();N(l,i);for(let c=0;c<this.path.length;c++){const u=this.path[c],{scroll:f,options:d,isScrollRoot:h}=u;if(u!==this.root&&f&&d.layoutScroll){if(h){N(l,i);const{scroll:p}=this.root;p&&(nt(l.x,-p.x),nt(l.y,-p.y))}nt(l.x,f.x),nt(l.y,f.y)}}return l}applyTransform(i,l=!1){const c=k();N(c,i);for(let u=0;u<this.path.length;u++){const f=this.path[u];!l&&f.options.layoutScroll&&f.scroll&&f!==f.root&>(c,{x:-f.scroll.x,y:-f.scroll.y}),et(f.latestValues)&>(c,f.latestValues)}return et(this.latestValues)&>(c,this.latestValues),c}removeTransform(i){var l;const c=k();N(c,i);for(let u=0;u<this.path.length;u++){const f=this.path[u];if(!f.instance||!et(f.latestValues))continue;No(f.latestValues)&&f.updateSnapshot();const d=k(),h=f.measure();N(d,h),vs(c,f.latestValues,(l=f.snapshot)===null||l===void 0?void 0:l.layout,d)}return et(this.latestValues)&&vs(c,this.latestValues),c}setTargetDelta(i){this.targetDelta=i,this.root.scheduleUpdateProjection()}setOptions(i){this.options={...this.options,...i,crossfade:i.crossfade!==void 0?i.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}resolveTargetDelta(){var i;const{layout:l,layoutId:c}=this.options;!this.layout||!(l||c)||(!this.targetDelta&&!this.relativeTarget&&(this.relativeParent=this.getClosestProjectingParent(),this.relativeParent&&this.relativeParent.layout&&(this.relativeTarget=k(),this.relativeTargetOrigin=k(),Mt(this.relativeTargetOrigin,this.layout.actual,this.relativeParent.layout.actual),N(this.relativeTarget,this.relativeTargetOrigin))),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=k(),this.targetWithTransforms=k()),this.relativeTarget&&this.relativeTargetOrigin&&((i=this.relativeParent)===null||i===void 0?void 0:i.target)?Tl(this.target,this.relativeTarget,this.relativeParent.target):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.actual):N(this.target,this.layout.actual),$o(this.target,this.targetDelta)):N(this.target,this.layout.actual),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.relativeParent=this.getClosestProjectingParent(),this.relativeParent&&Boolean(this.relativeParent.resumingFrom)===Boolean(this.resumingFrom)&&!this.relativeParent.options.layoutScroll&&this.relativeParent.target&&(this.relativeTarget=k(),this.relativeTargetOrigin=k(),Mt(this.relativeTargetOrigin,this.target,this.relativeParent.target),N(this.relativeTarget,this.relativeTargetOrigin)))))}getClosestProjectingParent(){if(!(!this.parent||et(this.parent.latestValues)))return(this.parent.relativeTarget||this.parent.targetDelta)&&this.parent.layout?this.parent:this.parent.getClosestProjectingParent()}calcProjection(){var i;const{layout:l,layoutId:c}=this.options;if(this.isTreeAnimating=Boolean(((i=this.parent)===null||i===void 0?void 0:i.isTreeAnimating)||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(l||c))return;const u=this.getLead();N(this.layoutCorrected,this.layout.actual),Ml(this.layoutCorrected,this.treeScale,this.path,Boolean(this.resumingFrom)||this!==u);const{target:f}=u;if(!f)return;this.projectionDelta||(this.projectionDelta=Lt(),this.projectionDeltaWithTransform=Lt());const d=this.treeScale.x,h=this.treeScale.y,p=this.projectionTransform;Dt(this.projectionDelta,this.layoutCorrected,f,this.latestValues),this.projectionTransform=Ts(this.projectionDelta,this.treeScale),(this.projectionTransform!==p||this.treeScale.x!==d||this.treeScale.y!==h)&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",f))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(i=!0){var l,c,u;(c=(l=this.options).scheduleRender)===null||c===void 0||c.call(l),i&&((u=this.getStack())===null||u===void 0||u.scheduleRender()),this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}setAnimationOrigin(i,l=!1){var c;const u=this.snapshot,f=(u==null?void 0:u.latestValues)||{},d={...this.latestValues},h=Lt();this.relativeTarget=this.relativeTargetOrigin=void 0,this.attemptToResolveRelativeTarget=!l;const p=k(),g=u==null?void 0:u.isShared,b=(((c=this.getStack())===null||c===void 0?void 0:c.members.length)||0)<=1,V=Boolean(g&&!b&&this.options.crossfade===!0&&!this.path.some(Mc));this.animationProgress=0,this.mixTargetDelta=P=>{var T;const m=P/1e3;Ps(h.x,i.x,m),Ps(h.y,i.y,m),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&((T=this.relativeParent)===null||T===void 0?void 0:T.layout)&&(Mt(p,this.layout.actual,this.relativeParent.layout.actual),Dc(this.relativeTarget,this.relativeTargetOrigin,p,m)),g&&(this.animationValues=d,fc(d,f,this.latestValues,m,V,b)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=m},this.mixTargetDelta(0)}startAnimation(i){var l,c;this.notifyListeners("animationStart"),(l=this.currentAnimation)===null||l===void 0||l.stop(),this.resumingFrom&&((c=this.resumingFrom.currentAnimation)===null||c===void 0||c.stop()),this.pendingAnimation&&(bt.update(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=z.update(()=>{Ct.hasAnimatedSinceResize=!0,this.currentAnimation=cc(0,Ss,{...i,onUpdate:u=>{var f;this.mixTargetDelta(u),(f=i.onUpdate)===null||f===void 0||f.call(i,u)},onComplete:()=>{var u;(u=i.onComplete)===null||u===void 0||u.call(i),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){var i;this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0),(i=this.getStack())===null||i===void 0||i.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){var i;this.currentAnimation&&((i=this.mixTargetDelta)===null||i===void 0||i.call(this,Ss),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const i=this.getLead();let{targetWithTransforms:l,target:c,layout:u,latestValues:f}=i;if(!(!l||!c||!u)){if(this!==i&&this.layout&&u&&ai(this.options.animationType,this.layout.actual,u.actual)){c=this.target||k();const d=U(this.layout.actual.x);c.x.min=i.target.x.min,c.x.max=c.x.min+d;const h=U(this.layout.actual.y);c.y.min=i.target.y.min,c.y.max=c.y.min+h}N(l,c),gt(l,f),Dt(this.projectionDeltaWithTransform,this.layoutCorrected,l,f)}}registerSharedNode(i,l){var c,u,f;this.sharedNodes.has(i)||this.sharedNodes.set(i,new oi),this.sharedNodes.get(i).add(l),l.promote({transition:(c=l.options.initialPromotionConfig)===null||c===void 0?void 0:c.transition,preserveFollowOpacity:(f=(u=l.options.initialPromotionConfig)===null||u===void 0?void 0:u.shouldPreserveFollowOpacity)===null||f===void 0?void 0:f.call(u,l)})}isLead(){const i=this.getStack();return i?i.lead===this:!0}getLead(){var i;const{layoutId:l}=this.options;return l?((i=this.getStack())===null||i===void 0?void 0:i.lead)||this:this}getPrevLead(){var i;const{layoutId:l}=this.options;return l?(i=this.getStack())===null||i===void 0?void 0:i.prevLead:void 0}getStack(){const{layoutId:i}=this.options;if(i)return this.root.sharedNodes.get(i)}promote({needsReset:i,transition:l,preserveFollowOpacity:c}={}){const u=this.getStack();u&&u.promote(this,c),i&&(this.projectionDelta=void 0,this.needsReset=!0),l&&this.setOptions({transition:l})}relegate(){const i=this.getStack();return i?i.relegate(this):!1}resetRotation(){const{visualElement:i}=this.options;if(!i)return;let l=!1;const c={};for(let u=0;u<Vs.length;u++){const f=Vs[u],d="rotate"+f;!i.getStaticValue(d)||(l=!0,c[d]=i.getStaticValue(d),i.setStaticValue(d,0))}if(!!l){i==null||i.syncRender();for(const u in c)i.setStaticValue(u,c[u]);i.scheduleRender()}}getProjectionStyles(i={}){var l,c,u;const f={};if(!this.instance||this.isSVG)return f;if(this.isVisible)f.visibility="";else return{visibility:"hidden"};const d=(l=this.options.visualElement)===null||l===void 0?void 0:l.getProps().transformTemplate;if(this.needsReset)return this.needsReset=!1,f.opacity="",f.pointerEvents=qt(i.pointerEvents)||"",f.transform=d?d(this.latestValues,""):"none",f;const h=this.getLead();if(!this.projectionDelta||!this.layout||!h.target){const V={};return this.options.layoutId&&(V.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,V.pointerEvents=qt(i.pointerEvents)||""),this.hasProjected&&!et(this.latestValues)&&(V.transform=d?d({},""):"none",this.hasProjected=!1),V}const p=h.animationValues||h.latestValues;this.applyTransformsToTarget(),f.transform=Ts(this.projectionDeltaWithTransform,this.treeScale,p),d&&(f.transform=d(p,f.transform));const{x:g,y:b}=this.projectionDelta;f.transformOrigin=`${g.origin*100}% ${b.origin*100}% 0`,h.animationValues?f.opacity=h===this?(u=(c=p.opacity)!==null&&c!==void 0?c:this.latestValues.opacity)!==null&&u!==void 0?u:1:this.preserveOpacity?this.latestValues.opacity:p.opacityExit:f.opacity=h===this?p.opacity!==void 0?p.opacity:"":p.opacityExit!==void 0?p.opacityExit:0;for(const V in ee){if(p[V]===void 0)continue;const{correct:P,applyTo:T}=ee[V],m=P(p[V],h);if(T){const v=T.length;for(let S=0;S<v;S++)f[T[S]]=m}else f[V]=m}return this.options.layoutId&&(f.pointerEvents=h===this?qt(i.pointerEvents)||"":"none"),f}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(i=>{var l;return(l=i.currentAnimation)===null||l===void 0?void 0:l.stop()}),this.root.nodes.forEach(ws),this.root.sharedNodes.clear()}},"ProjectionNode")}r(ri,"createProjectionNode");function bc(t){t.updateLayout()}r(bc,"updateLayout");function Tc(t){var e,n,s;const o=((e=t.resumeFrom)===null||e===void 0?void 0:e.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&o&&t.hasListeners("didUpdate")){const{actual:a,measured:i}=t.layout,{animationType:l}=t.options;l==="size"?G(h=>{const p=o.isShared?o.measured[h]:o.layout[h],g=U(p);p.min=a[h].min,p.max=p.min+g}):ai(l,o.layout,a)&&G(h=>{const p=o.isShared?o.measured[h]:o.layout[h],g=U(a[h]);p.max=p.min+g});const c=Lt();Dt(c,a,o.layout);const u=Lt();o.isShared?Dt(u,t.applyTransform(i,!0),o.measured):Dt(u,a,o.layout);const f=!ni(c);let d=!1;if(!t.resumeFrom&&(t.relativeParent=t.getClosestProjectingParent(),t.relativeParent&&!t.relativeParent.resumeFrom)){const{snapshot:h,layout:p}=t.relativeParent;if(h&&p){const g=k();Mt(g,o.layout,h.layout);const b=k();Mt(b,a,p.actual),si(g,b)||(d=!0)}}t.notifyListeners("didUpdate",{layout:a,snapshot:o,delta:u,layoutDelta:c,hasLayoutChanged:f,hasRelativeTargetChanged:d})}else t.isLead()&&((s=(n=t.options).onExitComplete)===null||s===void 0||s.call(n));t.options.transition=void 0}r(Tc,"notifyLayoutUpdate");function Vc(t){t.clearSnapshot()}r(Vc,"clearSnapshot");function ws(t){t.clearMeasurements()}r(ws,"clearMeasurements");function Sc(t){const{visualElement:e}=t.options;e!=null&&e.getProps().onBeforeLayoutMeasure&&e.notifyBeforeLayoutMeasure(),t.resetTransform()}r(Sc,"resetTransformStyle");function wc(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0}r(wc,"finishAnimation");function Pc(t){t.resolveTargetDelta()}r(Pc,"resolveTargetDelta");function Cc(t){t.calcProjection()}r(Cc,"calcProjection");function Ac(t){t.resetRotation()}r(Ac,"resetRotation");function Rc(t){t.removeLeadSnapshot()}r(Rc,"removeLeadSnapshots");function Ps(t,e,n){t.translate=L(e.translate,0,n),t.scale=L(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}r(Ps,"mixAxisDelta");function Cs(t,e,n,s){t.min=L(e.min,n.min,s),t.max=L(e.max,n.max,s)}r(Cs,"mixAxis");function Dc(t,e,n,s){Cs(t.x,e.x,n.x,s),Cs(t.y,e.y,n.y,s)}r(Dc,"mixBox");function Mc(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}r(Mc,"hasOpacityCrossfade");const Lc={duration:.45,ease:[.4,0,.1,1]};function Oc(t,e){let n=t.root;for(let a=t.path.length-1;a>=0;a--)if(Boolean(t.path[a].instance)){n=t.path[a];break}const o=(n&&n!==t.root?n.instance:document).querySelector(`[data-projection-id="${e}"]`);o&&t.mount(o,!0)}r(Oc,"mountNodeEarly");function As(t){t.min=Math.round(t.min),t.max=Math.round(t.max)}r(As,"roundAxis");function Rs(t){As(t.x),As(t.y)}r(Rs,"roundBox");function ai(t,e,n){return t==="position"||t==="preserve-aspect"&&!yc(bs(e),bs(n),.2)}r(ai,"shouldAnimatePositionOnly");const Ec=ri({attachResizeListener:(t,e)=>ye(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Oe={current:void 0},_c=ri({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!Oe.current){const t=new Ec(0,{});t.mount(window),t.setOptions({layoutScroll:!0}),Oe.current=t}return Oe.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>Boolean(window.getComputedStyle(t).position==="fixed")}),kc={...vl,...Fa,...jl,...lc},li=Ri((t,e)=>hr(t,e,kc,oc,_c));function ci(){const t=x.exports.useRef(!1);return te(()=>(t.current=!0,()=>{t.current=!1}),[]),t}r(ci,"useIsMounted");function Fc(){const t=ci(),[e,n]=x.exports.useState(0),s=x.exports.useCallback(()=>{t.current&&n(e+1)},[e]);return[x.exports.useCallback(()=>z.postRender(s),[s]),e]}r(Fc,"useForceUpdate");class ui extends x.exports.Component{getSnapshotBeforeUpdate(e){const n=this.props.childRef.current;if(n&&e.isPresent&&!this.props.isPresent){const s=this.props.sizeRef.current;s.height=n.offsetHeight||0,s.width=n.offsetWidth||0,s.top=n.offsetTop,s.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}r(ui,"PopChildMeasure");function Ic({children:t,isPresent:e}){const n=x.exports.useId(),s=x.exports.useRef(null),o=x.exports.useRef({width:0,height:0,top:0,left:0});return x.exports.useInsertionEffect(()=>{const{width:a,height:i,top:l,left:c}=o.current;if(e||!s.current||!a||!i)return;s.current.dataset.motionPopId=n;const u=document.createElement("style");return document.head.appendChild(u),u.sheet&&u.sheet.insertRule(`
|
|
[data-motion-pop-id="${n}"] {
|
|
position: absolute !important;
|
|
width: ${a}px !important;
|
|
height: ${i}px !important;
|
|
top: ${l}px !important;
|
|
left: ${c}px !important;
|
|
}
|
|
`),()=>{document.head.removeChild(u)}},[e]),I(ui,{isPresent:e,childRef:s,sizeRef:o,children:x.exports.cloneElement(t,{ref:s})})}r(Ic,"PopChild");const Ee=r(({children:t,initial:e,isPresent:n,onExitComplete:s,custom:o,presenceAffectsLayout:a,mode:i})=>{const l=ge(jc),c=x.exports.useId(),u=x.exports.useMemo(()=>({id:c,initial:e,isPresent:n,custom:o,onExitComplete:f=>{l.set(f,!0);for(const d of l.values())if(!d)return;s&&s()},register:f=>(l.set(f,!1),()=>l.delete(f))}),a?void 0:[n]);return x.exports.useMemo(()=>{l.forEach((f,d)=>l.set(d,!1))},[n]),x.exports.useEffect(()=>{!n&&!l.size&&s&&s()},[n]),i==="popLayout"&&(t=I(Ic,{isPresent:n,children:t})),I(jt.Provider,{value:u,children:t})},"PresenceChild");function jc(){return new Map}r(jc,"newChildrenMap");const pt=r(t=>t.key||"","getChildKey");function Bc(t,e){t.forEach(n=>{const s=pt(n);e.set(s,n)})}r(Bc,"updateChildLookup");function Uc(t){const e=[];return x.exports.Children.forEach(t,n=>{x.exports.isValidElement(n)&&e.push(n)}),e}r(Uc,"onlyElements");const Nc=r(({children:t,custom:e,initial:n=!0,onExitComplete:s,exitBeforeEnter:o,presenceAffectsLayout:a=!0,mode:i="sync"})=>{o&&(i="wait",Oo(!1,"Replace exitBeforeEnter with mode='wait'"));let[l]=Fc();const c=x.exports.useContext(Je).forceRender;c&&(l=c);const u=ci(),f=Uc(t);let d=f;const h=new Set,p=x.exports.useRef(d),g=x.exports.useRef(new Map).current,b=x.exports.useRef(!0);if(te(()=>{b.current=!1,Bc(f,g),p.current=d}),an(()=>{b.current=!0,g.clear(),h.clear()}),b.current)return I(_e,{children:d.map(m=>I(Ee,{isPresent:!0,initial:n?void 0:!1,presenceAffectsLayout:a,mode:i,children:m},pt(m)))});d=[...d];const V=p.current.map(pt),P=f.map(pt),T=V.length;for(let m=0;m<T;m++){const v=V[m];P.indexOf(v)===-1&&h.add(v)}return i==="wait"&&h.size&&(d=[]),h.forEach(m=>{if(P.indexOf(m)!==-1)return;const v=g.get(m);if(!v)return;const S=V.indexOf(m),R=r(()=>{g.delete(m),h.delete(m);const M=p.current.findIndex(F=>F.key===m);if(p.current.splice(M,1),!h.size){if(p.current=f,u.current===!1)return;l(),s&&s()}},"onExit");d.splice(S,0,I(Ee,{isPresent:!1,onExitComplete:R,custom:e,presenceAffectsLayout:a,mode:i,children:v},pt(v)))}),d=d.map(m=>{const v=m.key;return h.has(v)?m:I(Ee,{isPresent:!0,presenceAffectsLayout:a,mode:i,children:m},pt(m))}),Lo!=="production"&&i==="wait"&&d.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`),I(_e,{children:h.size?d:d.map(m=>x.exports.cloneElement(m))})},"AnimatePresence"),$c="_drawer_meqy7_1",zc={drawer:$c},Hc="_backdrop_tmj1y_1",Gc={backdrop:Hc},Jt=r(({children:t,open:e,onClose:n})=>mi.createPortal(I(Nc,{children:e&&Ms(_e,{children:[I(li.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:Gc.backdrop,onClick:()=>n==null?void 0:n()},"backdrop"),t]})}),document.querySelector("#detleph-fg-context")),"OutsideElement");try{Jt.displayName="OutsideElement",Jt.__docgenInfo={description:"",displayName:"OutsideElement",props:{open:{defaultValue:null,description:"",name:"open",required:!0,type:{name:"boolean"}},onClose:{defaultValue:null,description:"",name:"onClose",required:!1,type:{name:"(() => unknown)"}}}},typeof STORYBOOK_REACT_CLASSES<"u"&&(STORYBOOK_REACT_CLASSES["src/util/OutsideElement/OutsideElement.tsx#OutsideElement"]={docgenInfo:Jt.__docgenInfo,name:"OutsideElement",path:"src/util/OutsideElement/OutsideElement.tsx#OutsideElement"})}catch{}const Qt=r(({open:t,children:e,onClose:n})=>I(Jt,{open:t,onClose:n,children:I(Wc,{children:e})}),"Drawer"),Wc=r(({children:t})=>I(li.div,{className:zc.drawer,initial:{y:"100vh"},animate:{y:"0%"},exit:{y:"100vh"},transition:{type:"tween"},children:t}),"UIDrawer"),fi=Qt;try{Qt.displayName="Drawer",Qt.__docgenInfo={description:"",displayName:"Drawer",props:{open:{defaultValue:null,description:"",name:"open",required:!0,type:{name:"boolean"}},onClose:{defaultValue:null,description:"",name:"onClose",required:!1,type:{name:"(() => unknown)"}}}},typeof STORYBOOK_REACT_CLASSES<"u"&&(STORYBOOK_REACT_CLASSES["src/util/Drawer/Drawer.tsx#Drawer"]={docgenInfo:Qt.__docgenInfo,name:"Drawer",path:"src/util/Drawer/Drawer.tsx#Drawer"})}catch{}const tu={parameters:{storySource:{source:`import React from "react";
|
|
|
|
import { ComponentStory, ComponentMeta } from "@storybook/react";
|
|
|
|
import Drawer from "../util/Drawer";
|
|
|
|
export default { title: "Drawer", component: Drawer } as ComponentMeta<typeof Drawer>;
|
|
|
|
const Template: ComponentStory<typeof Drawer> = (args) => <Drawer {...args} />;
|
|
|
|
export const DefaultDrawer = Template.bind({});
|
|
|
|
DefaultDrawer.args = {
|
|
children: "Test",
|
|
};
|
|
`,locationsMap:{"default-drawer":{startLoc:{col:48,line:9},endLoc:{col:78,line:9},startBody:{col:48,line:9},endBody:{col:78,line:9}}}}},title:"Drawer",component:fi},Kc=r(t=>I(fi,{...t}),"Template"),Yc=Kc.bind({});Yc.args={children:"Test"};const eu=["DefaultDrawer"];export{Yc as DefaultDrawer,eu as __namedExportsOrder,tu as default};
|
|
//# sourceMappingURL=Drawer.stories.187a97e9.js.map
|