From c6ddd31d70fb3a607d59c27ac4388f757d58d27f Mon Sep 17 00:00:00 2001 From: laoer536 <1547698569@qq.com> Date: Sun, 7 Jan 2024 00:30:54 +0800 Subject: [PATCH] style: for docs build github page --- docs/assets/{index-RgNoS170.js => index-8mK_cjDZ.js} | 2 +- docs/index.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) rename docs/assets/{index-RgNoS170.js => index-8mK_cjDZ.js} (99%) diff --git a/docs/assets/index-RgNoS170.js b/docs/assets/index-8mK_cjDZ.js similarity index 99% rename from docs/assets/index-RgNoS170.js rename to docs/assets/index-8mK_cjDZ.js index 8b09bd7..a5e32de 100644 --- a/docs/assets/index-RgNoS170.js +++ b/docs/assets/index-8mK_cjDZ.js @@ -1011,4 +1011,4 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var h=reactExports,n=shimExports;function p(o,a){return o===a&&(o!==0||1/o===1/a)||o!==o&&a!==a}var q=typeof Object.is=="function"?Object.is:p,r=n.useSyncExternalStore,t=h.useRef,u=h.useEffect,v=h.useMemo,w=h.useDebugValue;withSelector_production_min.useSyncExternalStoreWithSelector=function(o,a,s,d,g){var _=t(null);if(_.current===null){var c={hasValue:!1,value:null};_.current=c}else c=_.current;_=v(function(){function rt(pt){if(!it){if(it=!0,st=pt,pt=d(pt),g!==void 0&&c.hasValue){var mt=c.value;if(g(mt,pt))return lt=mt}return lt=pt}if(mt=lt,q(st,pt))return mt;var vt=d(pt);return g!==void 0&&g(mt,vt)?mt:(st=pt,lt=vt)}var it=!1,st,lt,ut=s===void 0?null:s;return[function(){return rt(a())},ut===null?void 0:function(){return rt(ut())}]},[a,s,d,g]);var tt=r(o,_[0],_[1]);return u(function(){c.hasValue=!0,c.value=tt},[tt]),w(tt),tt};withSelector.exports=withSelector_production_min;var withSelectorExports=withSelector.exports;const useSyncExternalStoreExports=getDefaultExportFromCjs(withSelectorExports);var define_import_meta_env_default={VITE_API_BASE_URL:"https://production.com",VITE_PUBLIC_PATH:"/vite3.0-react18-TypeScript-router-dom6-mobx6-Eslint-prettier-template/",VITE_API_SERVER_URL:"https://xxxx.com",VITE_USER_NODE_ENV:"production",BASE_URL:"/vite3.0-react18-TypeScript-router-dom6-mobx6-Eslint-prettier-template/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const{useDebugValue}=React,{useSyncExternalStoreWithSelector}=useSyncExternalStoreExports;let didWarnAboutEqualityFn=!1;function useStore(o,a=o.getState,s){(define_import_meta_env_default?"production":void 0)!=="production"&&s&&!didWarnAboutEqualityFn&&(console.warn("[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"),didWarnAboutEqualityFn=!0);const d=useSyncExternalStoreWithSelector(o.subscribe,o.getState,o.getServerState||o.getState,a,s);return useDebugValue(d),d}const createImpl=o=>{(define_import_meta_env_default?"production":void 0)!=="production"&&typeof o!="function"&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const a=typeof o=="function"?createStore(o):o,s=(d,g)=>useStore(a,d,g);return Object.assign(s,a),s},create=o=>o?createImpl(o):createImpl,useUserStore=create(o=>({userName:"LiuJie1998",num:0,changeName:()=>o({userName:"laoer536"}),changeNum:()=>o(a=>({num:a.num+1}))})),MotionConfigContext=reactExports.createContext({transformPagePoint:o=>o,isStatic:!1,reducedMotion:"never"}),MotionContext=reactExports.createContext({}),PresenceContext=reactExports.createContext(null),isBrowser=typeof document<"u",useIsomorphicLayoutEffect=isBrowser?reactExports.useLayoutEffect:reactExports.useEffect,LazyContext=reactExports.createContext({strict:!1}),camelToDash=o=>o.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),optimizedAppearDataId="framerAppearId",optimizedAppearDataAttribute="data-"+camelToDash(optimizedAppearDataId);function useVisualElement(o,a,s,d){const{visualElement:g}=reactExports.useContext(MotionContext),_=reactExports.useContext(LazyContext),c=reactExports.useContext(PresenceContext),tt=reactExports.useContext(MotionConfigContext).reducedMotion,rt=reactExports.useRef();d=d||_.renderer,!rt.current&&d&&(rt.current=d(o,{visualState:a,parent:g,props:s,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:tt}));const it=rt.current;reactExports.useInsertionEffect(()=>{it&&it.update(s,c)});const st=reactExports.useRef(!!(s[optimizedAppearDataAttribute]&&!window.HandoffComplete));return useIsomorphicLayoutEffect(()=>{it&&(it.render(),st.current&&it.animationState&&it.animationState.animateChanges())}),reactExports.useEffect(()=>{it&&(it.updateFeatures(),!st.current&&it.animationState&&it.animationState.animateChanges(),st.current&&(st.current=!1,window.HandoffComplete=!0))}),it}function isRefObject(o){return o&&typeof o=="object"&&Object.prototype.hasOwnProperty.call(o,"current")}function useMotionRef(o,a,s){return reactExports.useCallback(d=>{d&&o.mount&&o.mount(d),a&&(d?a.mount(d):a.unmount()),s&&(typeof s=="function"?s(d):isRefObject(s)&&(s.current=d))},[a])}function isVariantLabel(o){return typeof o=="string"||Array.isArray(o)}function isAnimationControls(o){return o!==null&&typeof o=="object"&&typeof o.start=="function"}const variantPriorityOrder=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],variantProps=["initial",...variantPriorityOrder];function isControllingVariants(o){return isAnimationControls(o.animate)||variantProps.some(a=>isVariantLabel(o[a]))}function isVariantNode(o){return!!(isControllingVariants(o)||o.variants)}function getCurrentTreeVariants(o,a){if(isControllingVariants(o)){const{initial:s,animate:d}=o;return{initial:s===!1||isVariantLabel(s)?s:void 0,animate:isVariantLabel(d)?d:void 0}}return o.inherit!==!1?a:{}}function useCreateMotionContext(o){const{initial:a,animate:s}=getCurrentTreeVariants(o,reactExports.useContext(MotionContext));return reactExports.useMemo(()=>({initial:a,animate:s}),[variantLabelsAsDependency(a),variantLabelsAsDependency(s)])}function variantLabelsAsDependency(o){return Array.isArray(o)?o.join(" "):o}const featureProps={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},featureDefinitions={};for(const o in featureProps)featureDefinitions[o]={isEnabled:a=>featureProps[o].some(s=>!!a[s])};function loadFeatures(o){for(const a in o)featureDefinitions[a]={...featureDefinitions[a],...o[a]}}const LayoutGroupContext=reactExports.createContext({}),SwitchLayoutGroupContext=reactExports.createContext({}),motionComponentSymbol=Symbol.for("motionComponentSymbol");function createMotionComponent({preloadedFeatures:o,createVisualElement:a,useRender:s,useVisualState:d,Component:g}){o&&loadFeatures(o);function _(tt,rt){let it;const st={...reactExports.useContext(MotionConfigContext),...tt,layoutId:useLayoutId(tt)},{isStatic:lt}=st,ut=useCreateMotionContext(tt),pt=d(tt,lt);if(!lt&&isBrowser){ut.visualElement=useVisualElement(g,pt,st,a);const mt=reactExports.useContext(SwitchLayoutGroupContext),vt=reactExports.useContext(LazyContext).strict;ut.visualElement&&(it=ut.visualElement.loadFeatures(st,vt,o,mt))}return reactExports.createElement(MotionContext.Provider,{value:ut},it&&ut.visualElement?reactExports.createElement(it,{visualElement:ut.visualElement,...st}):null,s(g,tt,useMotionRef(pt,ut.visualElement,rt),pt,lt,ut.visualElement))}const c=reactExports.forwardRef(_);return c[motionComponentSymbol]=g,c}function useLayoutId({layoutId:o}){const a=reactExports.useContext(LayoutGroupContext).id;return a&&o!==void 0?a+"-"+o:o}function createMotionProxy(o){function a(d,g={}){return createMotionComponent(o(d,g))}if(typeof Proxy>"u")return a;const s=new Map;return new Proxy(a,{get:(d,g)=>(s.has(g)||s.set(g,a(g)),s.get(g))})}const lowercaseSVGElements=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function isSVGComponent(o){return typeof o!="string"||o.includes("-")?!1:!!(lowercaseSVGElements.indexOf(o)>-1||/[A-Z]/.test(o))}const scaleCorrectors={};function addScaleCorrector(o){Object.assign(scaleCorrectors,o)}const transformPropOrder=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],transformProps=new Set(transformPropOrder);function isForcedMotionValue(o,{layout:a,layoutId:s}){return transformProps.has(o)||o.startsWith("origin")||(a||s!==void 0)&&(!!scaleCorrectors[o]||o==="opacity")}const isMotionValue=o=>!!(o&&o.getVelocity),translateAlias={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},numTransforms=transformPropOrder.length;function buildTransform(o,{enableHardwareAcceleration:a=!0,allowTransformNone:s=!0},d,g){let _="";for(let c=0;ca=>typeof a=="string"&&a.startsWith(o),isCSSVariableName=checkStringStartsWith("--"),isCSSVariableToken=checkStringStartsWith("var(--"),cssVariableRegex=/var\s*\(\s*--[\w-]+(\s*,\s*(?:(?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)+)?\s*\)/g,getValueAsType=(o,a)=>a&&typeof o=="number"?a.transform(o):o,clamp=(o,a,s)=>Math.min(Math.max(s,o),a),number={test:o=>typeof o=="number",parse:parseFloat,transform:o=>o},alpha={...number,transform:o=>clamp(0,1,o)},scale={...number,default:1},sanitize=o=>Math.round(o*1e5)/1e5,floatRegex=/(-)?([\d]*\.?[\d])+/g,colorRegex=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,singleColorRegex=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function isString(o){return typeof o=="string"}const createUnitType=o=>({test:a=>isString(a)&&a.endsWith(o)&&a.split(" ").length===1,parse:parseFloat,transform:a=>`${a}${o}`}),degrees=createUnitType("deg"),percent=createUnitType("%"),px=createUnitType("px"),vh=createUnitType("vh"),vw=createUnitType("vw"),progressPercentage={...percent,parse:o=>percent.parse(o)/100,transform:o=>percent.transform(o*100)},int={...number,transform:Math.round},numberValueTypes={borderWidth:px,borderTopWidth:px,borderRightWidth:px,borderBottomWidth:px,borderLeftWidth:px,borderRadius:px,radius:px,borderTopLeftRadius:px,borderTopRightRadius:px,borderBottomRightRadius:px,borderBottomLeftRadius:px,width:px,maxWidth:px,height:px,maxHeight:px,size:px,top:px,right:px,bottom:px,left:px,padding:px,paddingTop:px,paddingRight:px,paddingBottom:px,paddingLeft:px,margin:px,marginTop:px,marginRight:px,marginBottom:px,marginLeft:px,rotate:degrees,rotateX:degrees,rotateY:degrees,rotateZ:degrees,scale,scaleX:scale,scaleY:scale,scaleZ:scale,skew:degrees,skewX:degrees,skewY:degrees,distance:px,translateX:px,translateY:px,translateZ:px,x:px,y:px,z:px,perspective:px,transformPerspective:px,opacity:alpha,originX:progressPercentage,originY:progressPercentage,originZ:px,zIndex:int,fillOpacity:alpha,strokeOpacity:alpha,numOctaves:int};function buildHTMLStyles(o,a,s,d){const{style:g,vars:_,transform:c,transformOrigin:tt}=o;let rt=!1,it=!1,st=!0;for(const lt in a){const ut=a[lt];if(isCSSVariableName(lt)){_[lt]=ut;continue}const pt=numberValueTypes[lt],mt=getValueAsType(ut,pt);if(transformProps.has(lt)){if(rt=!0,c[lt]=mt,!st)continue;ut!==(pt.default||0)&&(st=!1)}else lt.startsWith("origin")?(it=!0,tt[lt]=mt):g[lt]=mt}if(a.transform||(rt||d?g.transform=buildTransform(o.transform,s,st,d):g.transform&&(g.transform="none")),it){const{originX:lt="50%",originY:ut="50%",originZ:pt=0}=tt;g.transformOrigin=`${lt} ${ut} ${pt}`}}const createHtmlRenderState=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function copyRawValuesOnly(o,a,s){for(const d in a)!isMotionValue(a[d])&&!isForcedMotionValue(d,s)&&(o[d]=a[d])}function useInitialMotionValues({transformTemplate:o},a,s){return reactExports.useMemo(()=>{const d=createHtmlRenderState();return buildHTMLStyles(d,a,{enableHardwareAcceleration:!s},o),Object.assign({},d.vars,d.style)},[a])}function useStyle(o,a,s){const d=o.style||{},g={};return copyRawValuesOnly(g,d,o),Object.assign(g,useInitialMotionValues(o,a,s)),o.transformValues?o.transformValues(g):g}function useHTMLProps(o,a,s){const d={},g=useStyle(o,a,s);return o.drag&&o.dragListener!==!1&&(d.draggable=!1,g.userSelect=g.WebkitUserSelect=g.WebkitTouchCallout="none",g.touchAction=o.drag===!0?"none":`pan-${o.drag==="x"?"y":"x"}`),o.tabIndex===void 0&&(o.onTap||o.onTapStart||o.whileTap)&&(d.tabIndex=0),d.style=g,d}const validMotionProps=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","ignoreStrict","viewport"]);function isValidMotionProp(o){return o.startsWith("while")||o.startsWith("drag")&&o!=="draggable"||o.startsWith("layout")||o.startsWith("onTap")||o.startsWith("onPan")||validMotionProps.has(o)}let shouldForward=o=>!isValidMotionProp(o);function loadExternalIsValidProp(o){o&&(shouldForward=a=>a.startsWith("on")?!isValidMotionProp(a):o(a))}try{loadExternalIsValidProp(require("@emotion/is-prop-valid").default)}catch(o){}function filterProps(o,a,s){const d={};for(const g in o)g==="values"&&typeof o.values=="object"||(shouldForward(g)||s===!0&&isValidMotionProp(g)||!a&&!isValidMotionProp(g)||o.draggable&&g.startsWith("onDrag"))&&(d[g]=o[g]);return d}function calcOrigin$1(o,a,s){return typeof o=="string"?o:px.transform(a+s*o)}function calcSVGTransformOrigin(o,a,s){const d=calcOrigin$1(a,o.x,o.width),g=calcOrigin$1(s,o.y,o.height);return`${d} ${g}`}const dashKeys={offset:"stroke-dashoffset",array:"stroke-dasharray"},camelKeys={offset:"strokeDashoffset",array:"strokeDasharray"};function buildSVGPath(o,a,s=1,d=0,g=!0){o.pathLength=1;const _=g?dashKeys:camelKeys;o[_.offset]=px.transform(-d);const c=px.transform(a),tt=px.transform(s);o[_.array]=`${c} ${tt}`}function buildSVGAttrs(o,{attrX:a,attrY:s,attrScale:d,originX:g,originY:_,pathLength:c,pathSpacing:tt=1,pathOffset:rt=0,...it},st,lt,ut){if(buildHTMLStyles(o,it,st,ut),lt){o.style.viewBox&&(o.attrs.viewBox=o.style.viewBox);return}o.attrs=o.style,o.style={};const{attrs:pt,style:mt,dimensions:vt}=o;pt.transform&&(vt&&(mt.transform=pt.transform),delete pt.transform),vt&&(g!==void 0||_!==void 0||mt.transform)&&(mt.transformOrigin=calcSVGTransformOrigin(vt,g!==void 0?g:.5,_!==void 0?_:.5)),a!==void 0&&(pt.x=a),s!==void 0&&(pt.y=s),d!==void 0&&(pt.scale=d),c!==void 0&&buildSVGPath(pt,c,tt,rt,!1)}const createSvgRenderState=()=>({...createHtmlRenderState(),attrs:{}}),isSVGTag=o=>typeof o=="string"&&o.toLowerCase()==="svg";function useSVGProps(o,a,s,d){const g=reactExports.useMemo(()=>{const _=createSvgRenderState();return buildSVGAttrs(_,a,{enableHardwareAcceleration:!1},isSVGTag(d),o.transformTemplate),{..._.attrs,style:{..._.style}}},[a]);if(o.style){const _={};copyRawValuesOnly(_,o.style,o),g.style={..._,...g.style}}return g}function createUseRender(o=!1){return(s,d,g,{latestValues:_},c)=>{const rt=(isSVGComponent(s)?useSVGProps:useHTMLProps)(d,_,c,s),st={...filterProps(d,typeof s=="string",o),...rt,ref:g},{children:lt}=d,ut=reactExports.useMemo(()=>isMotionValue(lt)?lt.get():lt,[lt]);return reactExports.createElement(s,{...st,children:ut})}}function renderHTML(o,{style:a,vars:s},d,g){Object.assign(o.style,a,g&&g.getProjectionStyles(d));for(const _ in s)o.style.setProperty(_,s[_])}const camelCaseAttributes=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function renderSVG(o,a,s,d){renderHTML(o,a,void 0,d);for(const g in a.attrs)o.setAttribute(camelCaseAttributes.has(g)?g:camelToDash(g),a.attrs[g])}function scrapeMotionValuesFromProps$1(o,a){const{style:s}=o,d={};for(const g in s)(isMotionValue(s[g])||a.style&&isMotionValue(a.style[g])||isForcedMotionValue(g,o))&&(d[g]=s[g]);return d}function scrapeMotionValuesFromProps(o,a){const s=scrapeMotionValuesFromProps$1(o,a);for(const d in o)if(isMotionValue(o[d])||isMotionValue(a[d])){const g=transformPropOrder.indexOf(d)!==-1?"attr"+d.charAt(0).toUpperCase()+d.substring(1):d;s[g]=o[d]}return s}function resolveVariantFromProps(o,a,s,d={},g={}){return typeof a=="function"&&(a=a(s!==void 0?s:o.custom,d,g)),typeof a=="string"&&(a=o.variants&&o.variants[a]),typeof a=="function"&&(a=a(s!==void 0?s:o.custom,d,g)),a}function useConstant(o){const a=reactExports.useRef(null);return a.current===null&&(a.current=o()),a.current}const isKeyframesTarget=o=>Array.isArray(o),isCustomValue=o=>!!(o&&typeof o=="object"&&o.mix&&o.toValue),resolveFinalValueInKeyframes=o=>isKeyframesTarget(o)?o[o.length-1]||0:o;function resolveMotionValue(o){const a=isMotionValue(o)?o.get():o;return isCustomValue(a)?a.toValue():a}function makeState({scrapeMotionValuesFromProps:o,createRenderState:a,onMount:s},d,g,_){const c={latestValues:makeLatestValues(d,g,_,o),renderState:a()};return s&&(c.mount=tt=>s(d,tt,c)),c}const makeUseVisualState=o=>(a,s)=>{const d=reactExports.useContext(MotionContext),g=reactExports.useContext(PresenceContext),_=()=>makeState(o,a,d,g);return s?_():useConstant(_)};function makeLatestValues(o,a,s,d){const g={},_=d(o,{});for(const ut in _)g[ut]=resolveMotionValue(_[ut]);let{initial:c,animate:tt}=o;const rt=isControllingVariants(o),it=isVariantNode(o);a&&it&&!rt&&o.inherit!==!1&&(c===void 0&&(c=a.initial),tt===void 0&&(tt=a.animate));let st=s?s.initial===!1:!1;st=st||c===!1;const lt=st?tt:c;return lt&&typeof lt!="boolean"&&!isAnimationControls(lt)&&(Array.isArray(lt)?lt:[lt]).forEach(pt=>{const mt=resolveVariantFromProps(o,pt);if(!mt)return;const{transitionEnd:vt,transition:_t,...dt}=mt;for(const ct in dt){let ht=dt[ct];if(Array.isArray(ht)){const wt=st?ht.length-1:0;ht=ht[wt]}ht!==null&&(g[ct]=ht)}for(const ct in vt)g[ct]=vt[ct]}),g}const noop=o=>o;class Queue{constructor(){this.order=[],this.scheduled=new Set}add(a){if(!this.scheduled.has(a))return this.scheduled.add(a),this.order.push(a),!0}remove(a){const s=this.order.indexOf(a);s!==-1&&(this.order.splice(s,1),this.scheduled.delete(a))}clear(){this.order.length=0,this.scheduled.clear()}}function createRenderStep(o){let a=new Queue,s=new Queue,d=0,g=!1,_=!1;const c=new WeakSet,tt={schedule:(rt,it=!1,st=!1)=>{const lt=st&&g,ut=lt?a:s;return it&&c.add(rt),ut.add(rt)&<&&g&&(d=a.order.length),rt},cancel:rt=>{s.remove(rt),c.delete(rt)},process:rt=>{if(g){_=!0;return}if(g=!0,[a,s]=[s,a],s.clear(),d=a.order.length,d)for(let it=0;it(lt[ut]=createRenderStep(()=>s=!0),lt),{}),c=lt=>_[lt].process(g),tt=()=>{const lt=performance.now();s=!1,g.delta=d?1e3/60:Math.max(Math.min(lt-g.timestamp,maxElapsed),1),g.timestamp=lt,g.isProcessing=!0,stepsOrder.forEach(c),g.isProcessing=!1,s&&a&&(d=!1,o(tt))},rt=()=>{s=!0,d=!0,g.isProcessing||o(tt)};return{schedule:stepsOrder.reduce((lt,ut)=>{const pt=_[ut];return lt[ut]=(mt,vt=!1,_t=!1)=>(s||rt(),pt.schedule(mt,vt,_t)),lt},{}),cancel:lt=>stepsOrder.forEach(ut=>_[ut].cancel(lt)),state:g,steps:_}}const{schedule:frame,cancel:cancelFrame,state:frameData,steps}=createRenderBatcher(typeof requestAnimationFrame<"u"?requestAnimationFrame:noop,!0),svgMotionConfig={useVisualState:makeUseVisualState({scrapeMotionValuesFromProps,createRenderState:createSvgRenderState,onMount:(o,a,{renderState:s,latestValues:d})=>{frame.read(()=>{try{s.dimensions=typeof a.getBBox=="function"?a.getBBox():a.getBoundingClientRect()}catch{s.dimensions={x:0,y:0,width:0,height:0}}}),frame.render(()=>{buildSVGAttrs(s,d,{enableHardwareAcceleration:!1},isSVGTag(a.tagName),o.transformTemplate),renderSVG(a,s)})}})},htmlMotionConfig={useVisualState:makeUseVisualState({scrapeMotionValuesFromProps:scrapeMotionValuesFromProps$1,createRenderState:createHtmlRenderState})};function createDomMotionConfig(o,{forwardMotionProps:a=!1},s,d){return{...isSVGComponent(o)?svgMotionConfig:htmlMotionConfig,preloadedFeatures:s,useRender:createUseRender(a),createVisualElement:d,Component:o}}function addDomEvent(o,a,s,d={passive:!0}){return o.addEventListener(a,s,d),()=>o.removeEventListener(a,s)}const isPrimaryPointer=o=>o.pointerType==="mouse"?typeof o.button!="number"||o.button<=0:o.isPrimary!==!1;function extractEventInfo(o,a="page"){return{point:{x:o[a+"X"],y:o[a+"Y"]}}}const addPointerInfo=o=>a=>isPrimaryPointer(a)&&o(a,extractEventInfo(a));function addPointerEvent(o,a,s,d){return addDomEvent(o,a,addPointerInfo(s),d)}const combineFunctions=(o,a)=>s=>a(o(s)),pipe=(...o)=>o.reduce(combineFunctions);function createLock(o){let a=null;return()=>{const s=()=>{a=null};return a===null?(a=o,s):!1}}const globalHorizontalLock=createLock("dragHorizontal"),globalVerticalLock=createLock("dragVertical");function getGlobalLock(o){let a=!1;if(o==="y")a=globalVerticalLock();else if(o==="x")a=globalHorizontalLock();else{const s=globalHorizontalLock(),d=globalVerticalLock();s&&d?a=()=>{s(),d()}:(s&&s(),d&&d())}return a}function isDragActive(){const o=getGlobalLock(!0);return o?(o(),!1):!0}class Feature{constructor(a){this.isMounted=!1,this.node=a}update(){}}function addHoverEvent(o,a){const s="pointer"+(a?"enter":"leave"),d="onHover"+(a?"Start":"End"),g=(_,c)=>{if(_.pointerType==="touch"||isDragActive())return;const tt=o.getProps();o.animationState&&tt.whileHover&&o.animationState.setActive("whileHover",a),tt[d]&&frame.update(()=>tt[d](_,c))};return addPointerEvent(o.current,s,g,{passive:!o.getProps()[d]})}class HoverGesture extends Feature{mount(){this.unmount=pipe(addHoverEvent(this.node,!0),addHoverEvent(this.node,!1))}unmount(){}}class FocusGesture extends Feature{constructor(){super(...arguments),this.isActive=!1}onFocus(){let a=!1;try{a=this.node.current.matches(":focus-visible")}catch{a=!0}!a||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=pipe(addDomEvent(this.node.current,"focus",()=>this.onFocus()),addDomEvent(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const isNodeOrChild=(o,a)=>a?o===a?!0:isNodeOrChild(o,a.parentElement):!1;function fireSyntheticPointerEvent(o,a){if(!a)return;const s=new PointerEvent("pointer"+o);a(s,extractEventInfo(s))}class PressGesture extends Feature{constructor(){super(...arguments),this.removeStartListeners=noop,this.removeEndListeners=noop,this.removeAccessibleListeners=noop,this.startPointerPress=(a,s)=>{if(this.removeEndListeners(),this.isPressing)return;const d=this.node.getProps(),_=addPointerEvent(window,"pointerup",(tt,rt)=>{if(!this.checkPressEnd())return;const{onTap:it,onTapCancel:st}=this.node.getProps();frame.update(()=>{isNodeOrChild(this.node.current,tt.target)?it&&it(tt,rt):st&&st(tt,rt)})},{passive:!(d.onTap||d.onPointerUp)}),c=addPointerEvent(window,"pointercancel",(tt,rt)=>this.cancelPress(tt,rt),{passive:!(d.onTapCancel||d.onPointerCancel)});this.removeEndListeners=pipe(_,c),this.startPress(a,s)},this.startAccessiblePress=()=>{const a=_=>{if(_.key!=="Enter"||this.isPressing)return;const c=tt=>{tt.key!=="Enter"||!this.checkPressEnd()||fireSyntheticPointerEvent("up",(rt,it)=>{const{onTap:st}=this.node.getProps();st&&frame.update(()=>st(rt,it))})};this.removeEndListeners(),this.removeEndListeners=addDomEvent(this.node.current,"keyup",c),fireSyntheticPointerEvent("down",(tt,rt)=>{this.startPress(tt,rt)})},s=addDomEvent(this.node.current,"keydown",a),d=()=>{this.isPressing&&fireSyntheticPointerEvent("cancel",(_,c)=>this.cancelPress(_,c))},g=addDomEvent(this.node.current,"blur",d);this.removeAccessibleListeners=pipe(s,g)}}startPress(a,s){this.isPressing=!0;const{onTapStart:d,whileTap:g}=this.node.getProps();g&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),d&&frame.update(()=>d(a,s))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!isDragActive()}cancelPress(a,s){if(!this.checkPressEnd())return;const{onTapCancel:d}=this.node.getProps();d&&frame.update(()=>d(a,s))}mount(){const a=this.node.getProps(),s=addPointerEvent(this.node.current,"pointerdown",this.startPointerPress,{passive:!(a.onTapStart||a.onPointerStart)}),d=addDomEvent(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=pipe(s,d)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const observerCallbacks=new WeakMap,observers=new WeakMap,fireObserverCallback=o=>{const a=observerCallbacks.get(o.target);a&&a(o)},fireAllObserverCallbacks=o=>{o.forEach(fireObserverCallback)};function initIntersectionObserver({root:o,...a}){const s=o||document;observers.has(s)||observers.set(s,{});const d=observers.get(s),g=JSON.stringify(a);return d[g]||(d[g]=new IntersectionObserver(fireAllObserverCallbacks,{root:o,...a})),d[g]}function observeIntersection(o,a,s){const d=initIntersectionObserver(a);return observerCallbacks.set(o,s),d.observe(o),()=>{observerCallbacks.delete(o),d.unobserve(o)}}const thresholdNames={some:0,all:1};class InViewFeature extends Feature{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:a={}}=this.node.getProps(),{root:s,margin:d,amount:g="some",once:_}=a,c={root:s?s.current:void 0,rootMargin:d,threshold:typeof g=="number"?g:thresholdNames[g]},tt=rt=>{const{isIntersecting:it}=rt;if(this.isInView===it||(this.isInView=it,_&&!it&&this.hasEnteredView))return;it&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",it);const{onViewportEnter:st,onViewportLeave:lt}=this.node.getProps(),ut=it?st:lt;ut&&ut(rt)};return observeIntersection(this.node.current,c,tt)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:a,prevProps:s}=this.node;["amount","margin","root"].some(hasViewportOptionChanged(a,s))&&this.startObserver()}unmount(){}}function hasViewportOptionChanged({viewport:o={}},{viewport:a={}}={}){return s=>o[s]!==a[s]}const gestureAnimations={inView:{Feature:InViewFeature},tap:{Feature:PressGesture},focus:{Feature:FocusGesture},hover:{Feature:HoverGesture}};function shallowCompare(o,a){if(!Array.isArray(a))return!1;const s=a.length;if(s!==o.length)return!1;for(let d=0;da[d]=s.get()),a}function getVelocity$1(o){const a={};return o.values.forEach((s,d)=>a[d]=s.getVelocity()),a}function resolveVariant(o,a,s){const d=o.getProps();return resolveVariantFromProps(d,a,s!==void 0?s:d.custom,getCurrent(o),getVelocity$1(o))}let invariant=noop;const secondsToMilliseconds=o=>o*1e3,millisecondsToSeconds=o=>o/1e3,instantAnimationState={current:!1},isBezierDefinition=o=>Array.isArray(o)&&typeof o[0]=="number";function isWaapiSupportedEasing(o){return!!(!o||typeof o=="string"&&supportedWaapiEasing[o]||isBezierDefinition(o)||Array.isArray(o)&&o.every(isWaapiSupportedEasing))}const cubicBezierAsString=([o,a,s,d])=>`cubic-bezier(${o}, ${a}, ${s}, ${d})`,supportedWaapiEasing={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:cubicBezierAsString([0,.65,.55,1]),circOut:cubicBezierAsString([.55,0,1,.45]),backIn:cubicBezierAsString([.31,.01,.66,-.59]),backOut:cubicBezierAsString([.33,1.53,.69,.99])};function mapEasingToNativeEasing(o){if(o)return isBezierDefinition(o)?cubicBezierAsString(o):Array.isArray(o)?o.map(mapEasingToNativeEasing):supportedWaapiEasing[o]}function animateStyle(o,a,s,{delay:d=0,duration:g,repeat:_=0,repeatType:c="loop",ease:tt,times:rt}={}){const it={[a]:s};rt&&(it.offset=rt);const st=mapEasingToNativeEasing(tt);return Array.isArray(st)&&(it.easing=st),o.animate(it,{delay:d,duration:g,easing:Array.isArray(st)?"linear":st,fill:"both",iterations:_+1,direction:c==="reverse"?"alternate":"normal"})}function getFinalKeyframe(o,{repeat:a,repeatType:s="loop"}){const d=a&&s!=="loop"&&a%2===1?0:o.length-1;return o[d]}const calcBezier=(o,a,s)=>(((1-3*s+3*a)*o+(3*s-6*a))*o+3*a)*o,subdivisionPrecision=1e-7,subdivisionMaxIterations=12;function binarySubdivide(o,a,s,d,g){let _,c,tt=0;do c=a+(s-a)/2,_=calcBezier(c,d,g)-o,_>0?s=c:a=c;while(Math.abs(_)>subdivisionPrecision&&++ttbinarySubdivide(_,0,1,o,s);return _=>_===0||_===1?_:calcBezier(g(_),a,d)}const easeIn=cubicBezier(.42,0,1,1),easeOut=cubicBezier(0,0,.58,1),easeInOut=cubicBezier(.42,0,.58,1),isEasingArray=o=>Array.isArray(o)&&typeof o[0]!="number",mirrorEasing=o=>a=>a<=.5?o(2*a)/2:(2-o(2*(1-a)))/2,reverseEasing=o=>a=>1-o(1-a),circIn=o=>1-Math.sin(Math.acos(o)),circOut=reverseEasing(circIn),circInOut=mirrorEasing(circIn),backOut=cubicBezier(.33,1.53,.69,.99),backIn=reverseEasing(backOut),backInOut=mirrorEasing(backIn),anticipate=o=>(o*=2)<1?.5*backIn(o):.5*(2-Math.pow(2,-10*(o-1))),easingLookup={linear:noop,easeIn,easeInOut,easeOut,circIn,circInOut,circOut,backIn,backInOut,backOut,anticipate},easingDefinitionToFunction=o=>{if(Array.isArray(o)){invariant(o.length===4);const[a,s,d,g]=o;return cubicBezier(a,s,d,g)}else if(typeof o=="string")return easingLookup[o];return o},isColorString=(o,a)=>s=>!!(isString(s)&&singleColorRegex.test(s)&&s.startsWith(o)||a&&Object.prototype.hasOwnProperty.call(s,a)),splitColor=(o,a,s)=>d=>{if(!isString(d))return d;const[g,_,c,tt]=d.match(floatRegex);return{[o]:parseFloat(g),[a]:parseFloat(_),[s]:parseFloat(c),alpha:tt!==void 0?parseFloat(tt):1}},clampRgbUnit=o=>clamp(0,255,o),rgbUnit={...number,transform:o=>Math.round(clampRgbUnit(o))},rgba={test:isColorString("rgb","red"),parse:splitColor("red","green","blue"),transform:({red:o,green:a,blue:s,alpha:d=1})=>"rgba("+rgbUnit.transform(o)+", "+rgbUnit.transform(a)+", "+rgbUnit.transform(s)+", "+sanitize(alpha.transform(d))+")"};function parseHex(o){let a="",s="",d="",g="";return o.length>5?(a=o.substring(1,3),s=o.substring(3,5),d=o.substring(5,7),g=o.substring(7,9)):(a=o.substring(1,2),s=o.substring(2,3),d=o.substring(3,4),g=o.substring(4,5),a+=a,s+=s,d+=d,g+=g),{red:parseInt(a,16),green:parseInt(s,16),blue:parseInt(d,16),alpha:g?parseInt(g,16)/255:1}}const hex={test:isColorString("#"),parse:parseHex,transform:rgba.transform},hsla={test:isColorString("hsl","hue"),parse:splitColor("hue","saturation","lightness"),transform:({hue:o,saturation:a,lightness:s,alpha:d=1})=>"hsla("+Math.round(o)+", "+percent.transform(sanitize(a))+", "+percent.transform(sanitize(s))+", "+sanitize(alpha.transform(d))+")"},color={test:o=>rgba.test(o)||hex.test(o)||hsla.test(o),parse:o=>rgba.test(o)?rgba.parse(o):hsla.test(o)?hsla.parse(o):hex.parse(o),transform:o=>isString(o)?o:o.hasOwnProperty("red")?rgba.transform(o):hsla.transform(o)},mix=(o,a,s)=>-s*o+s*a+o;function hueToRgb(o,a,s){return s<0&&(s+=1),s>1&&(s-=1),s<1/6?o+(a-o)*6*s:s<1/2?a:s<2/3?o+(a-o)*(2/3-s)*6:o}function hslaToRgba({hue:o,saturation:a,lightness:s,alpha:d}){o/=360,a/=100,s/=100;let g=0,_=0,c=0;if(!a)g=_=c=s;else{const tt=s<.5?s*(1+a):s+a-s*a,rt=2*s-tt;g=hueToRgb(rt,tt,o+1/3),_=hueToRgb(rt,tt,o),c=hueToRgb(rt,tt,o-1/3)}return{red:Math.round(g*255),green:Math.round(_*255),blue:Math.round(c*255),alpha:d}}const mixLinearColor=(o,a,s)=>{const d=o*o;return Math.sqrt(Math.max(0,s*(a*a-d)+d))},colorTypes=[hex,rgba,hsla],getColorType=o=>colorTypes.find(a=>a.test(o));function asRGBA(o){const a=getColorType(o);let s=a.parse(o);return a===hsla&&(s=hslaToRgba(s)),s}const mixColor=(o,a)=>{const s=asRGBA(o),d=asRGBA(a),g={...s};return _=>(g.red=mixLinearColor(s.red,d.red,_),g.green=mixLinearColor(s.green,d.green,_),g.blue=mixLinearColor(s.blue,d.blue,_),g.alpha=mix(s.alpha,d.alpha,_),rgba.transform(g))};function test(o){var a,s;return isNaN(o)&&isString(o)&&(((a=o.match(floatRegex))===null||a===void 0?void 0:a.length)||0)+(((s=o.match(colorRegex))===null||s===void 0?void 0:s.length)||0)>0}const cssVarTokeniser={regex:cssVariableRegex,countKey:"Vars",token:"${v}",parse:noop},colorTokeniser={regex:colorRegex,countKey:"Colors",token:"${c}",parse:color.parse},numberTokeniser={regex:floatRegex,countKey:"Numbers",token:"${n}",parse:number.parse};function tokenise(o,{regex:a,countKey:s,token:d,parse:g}){const _=o.tokenised.match(a);_&&(o["num"+s]=_.length,o.tokenised=o.tokenised.replace(a,d),o.values.push(..._.map(g)))}function analyseComplexValue(o){const a=o.toString(),s={value:a,tokenised:a,values:[],numVars:0,numColors:0,numNumbers:0};return s.value.includes("var(--")&&tokenise(s,cssVarTokeniser),tokenise(s,colorTokeniser),tokenise(s,numberTokeniser),s}function parseComplexValue(o){return analyseComplexValue(o).values}function createTransformer(o){const{values:a,numColors:s,numVars:d,tokenised:g}=analyseComplexValue(o),_=a.length;return c=>{let tt=g;for(let rt=0;rt<_;rt++)rttypeof o=="number"?0:o;function getAnimatableNone$1(o){const a=parseComplexValue(o);return createTransformer(o)(a.map(convertNumbersToZero))}const complex={test,parse:parseComplexValue,createTransformer,getAnimatableNone:getAnimatableNone$1},mixImmediate=(o,a)=>s=>`${s>0?a:o}`;function getMixer(o,a){return typeof o=="number"?s=>mix(o,a,s):color.test(o)?mixColor(o,a):o.startsWith("var(")?mixImmediate(o,a):mixComplex(o,a)}const mixArray=(o,a)=>{const s=[...o],d=s.length,g=o.map((_,c)=>getMixer(_,a[c]));return _=>{for(let c=0;c{const s={...o,...a},d={};for(const g in s)o[g]!==void 0&&a[g]!==void 0&&(d[g]=getMixer(o[g],a[g]));return g=>{for(const _ in d)s[_]=d[_](g);return s}},mixComplex=(o,a)=>{const s=complex.createTransformer(a),d=analyseComplexValue(o),g=analyseComplexValue(a);return d.numVars===g.numVars&&d.numColors===g.numColors&&d.numNumbers>=g.numNumbers?pipe(mixArray(d.values,g.values),s):mixImmediate(o,a)},progress=(o,a,s)=>{const d=a-o;return d===0?1:(s-o)/d},mixNumber=(o,a)=>s=>mix(o,a,s);function detectMixerFactory(o){return typeof o=="number"?mixNumber:typeof o=="string"?color.test(o)?mixColor:mixComplex:Array.isArray(o)?mixArray:typeof o=="object"?mixObject:mixNumber}function createMixers(o,a,s){const d=[],g=s||detectMixerFactory(o[0]),_=o.length-1;for(let c=0;c<_;c++){let tt=g(o[c],o[c+1]);if(a){const rt=Array.isArray(a)?a[c]||noop:a;tt=pipe(rt,tt)}d.push(tt)}return d}function interpolate(o,a,{clamp:s=!0,ease:d,mixer:g}={}){const _=o.length;if(invariant(_===a.length),_===1)return()=>a[0];o[0]>o[_-1]&&(o=[...o].reverse(),a=[...a].reverse());const c=createMixers(a,d,g),tt=c.length,rt=it=>{let st=0;if(tt>1)for(;strt(clamp(o[0],o[_-1],it)):rt}function fillOffset(o,a){const s=o[o.length-1];for(let d=1;d<=a;d++){const g=progress(0,a,d);o.push(mix(s,1,g))}}function defaultOffset(o){const a=[0];return fillOffset(a,o.length-1),a}function convertOffsetToTimes(o,a){return o.map(s=>s*a)}function defaultEasing(o,a){return o.map(()=>a||easeInOut).splice(0,o.length-1)}function keyframes({duration:o=300,keyframes:a,times:s,ease:d="easeInOut"}){const g=isEasingArray(d)?d.map(easingDefinitionToFunction):easingDefinitionToFunction(d),_={done:!1,value:a[0]},c=convertOffsetToTimes(s&&s.length===a.length?s:defaultOffset(a),o),tt=interpolate(c,a,{ease:Array.isArray(g)?g:defaultEasing(a,g)});return{calculatedDuration:o,next:rt=>(_.value=tt(rt),_.done=rt>=o,_)}}function velocityPerSecond(o,a){return a?o*(1e3/a):0}const velocitySampleDuration=5;function calcGeneratorVelocity(o,a,s){const d=Math.max(a-velocitySampleDuration,0);return velocityPerSecond(s-o(d),a-d)}const safeMin=.001,minDuration=.01,maxDuration$1=10,minDamping=.05,maxDamping=1;function findSpring({duration:o=800,bounce:a=.25,velocity:s=0,mass:d=1}){let g,_,c=1-a;c=clamp(minDamping,maxDamping,c),o=clamp(minDuration,maxDuration$1,millisecondsToSeconds(o)),c<1?(g=it=>{const st=it*c,lt=st*o,ut=st-s,pt=calcAngularFreq(it,c),mt=Math.exp(-lt);return safeMin-ut/pt*mt},_=it=>{const lt=it*c*o,ut=lt*s+s,pt=Math.pow(c,2)*Math.pow(it,2)*o,mt=Math.exp(-lt),vt=calcAngularFreq(Math.pow(it,2),c);return(-g(it)+safeMin>0?-1:1)*((ut-pt)*mt)/vt}):(g=it=>{const st=Math.exp(-it*o),lt=(it-s)*o+1;return-safeMin+st*lt},_=it=>{const st=Math.exp(-it*o),lt=(s-it)*(o*o);return st*lt});const tt=5/o,rt=approximateRoot(g,_,tt);if(o=secondsToMilliseconds(o),isNaN(rt))return{stiffness:100,damping:10,duration:o};{const it=Math.pow(rt,2)*d;return{stiffness:it,damping:c*2*Math.sqrt(d*it),duration:o}}}const rootIterations=12;function approximateRoot(o,a,s){let d=s;for(let g=1;go[s]!==void 0)}function getSpringOptions(o){let a={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...o};if(!isSpringType(o,physicsKeys)&&isSpringType(o,durationKeys)){const s=findSpring(o);a={...a,...s,mass:1},a.isResolvedFromDuration=!0}return a}function spring({keyframes:o,restDelta:a,restSpeed:s,...d}){const g=o[0],_=o[o.length-1],c={done:!1,value:g},{stiffness:tt,damping:rt,mass:it,duration:st,velocity:lt,isResolvedFromDuration:ut}=getSpringOptions({...d,velocity:-millisecondsToSeconds(d.velocity||0)}),pt=lt||0,mt=rt/(2*Math.sqrt(tt*it)),vt=_-g,_t=millisecondsToSeconds(Math.sqrt(tt/it)),dt=Math.abs(vt)<5;s||(s=dt?.01:2),a||(a=dt?.005:.5);let ct;if(mt<1){const ht=calcAngularFreq(_t,mt);ct=wt=>{const St=Math.exp(-mt*_t*wt);return _-St*((pt+mt*_t*vt)/ht*Math.sin(ht*wt)+vt*Math.cos(ht*wt))}}else if(mt===1)ct=ht=>_-Math.exp(-_t*ht)*(vt+(pt+_t*vt)*ht);else{const ht=_t*Math.sqrt(mt*mt-1);ct=wt=>{const St=Math.exp(-mt*_t*wt),xt=Math.min(ht*wt,300);return _-St*((pt+mt*_t*vt)*Math.sinh(xt)+ht*vt*Math.cosh(xt))/ht}}return{calculatedDuration:ut&&st||null,next:ht=>{const wt=ct(ht);if(ut)c.done=ht>=st;else{let St=pt;ht!==0&&(mt<1?St=calcGeneratorVelocity(ct,ht,wt):St=0);const xt=Math.abs(St)<=s,Et=Math.abs(_-wt)<=a;c.done=xt&&Et}return c.value=c.done?_:wt,c}}}function inertia({keyframes:o,velocity:a=0,power:s=.8,timeConstant:d=325,bounceDamping:g=10,bounceStiffness:_=500,modifyTarget:c,min:tt,max:rt,restDelta:it=.5,restSpeed:st}){const lt=o[0],ut={done:!1,value:lt},pt=Tt=>tt!==void 0&&Ttrt,mt=Tt=>tt===void 0?rt:rt===void 0||Math.abs(tt-Tt)-vt*Math.exp(-Tt/d),ht=Tt=>dt+ct(Tt),wt=Tt=>{const $t=ct(Tt),Bt=ht(Tt);ut.done=Math.abs($t)<=it,ut.value=ut.done?dt:Bt};let St,xt;const Et=Tt=>{pt(ut.value)&&(St=Tt,xt=spring({keyframes:[ut.value,mt(ut.value)],velocity:calcGeneratorVelocity(ht,Tt,ut.value),damping:g,stiffness:_,restDelta:it,restSpeed:st}))};return Et(0),{calculatedDuration:null,next:Tt=>{let $t=!1;return!xt&&St===void 0&&($t=!0,wt(Tt),Et(Tt)),St!==void 0&&Tt>St?xt.next(Tt-St):(!$t&&wt(Tt),ut)}}}const frameloopDriver=o=>{const a=({timestamp:s})=>o(s);return{start:()=>frame.update(a,!0),stop:()=>cancelFrame(a),now:()=>frameData.isProcessing?frameData.timestamp:performance.now()}},maxGeneratorDuration=2e4;function calcGeneratorDuration(o){let a=0;const s=50;let d=o.next(a);for(;!d.done&&a=maxGeneratorDuration?1/0:a}const types={decay:inertia,inertia,tween:keyframes,keyframes,spring};function animateValue({autoplay:o=!0,delay:a=0,driver:s=frameloopDriver,keyframes:d,type:g="keyframes",repeat:_=0,repeatDelay:c=0,repeatType:tt="loop",onPlay:rt,onStop:it,onComplete:st,onUpdate:lt,...ut}){let pt=1,mt=!1,vt,_t;const dt=()=>{_t=new Promise(Nt=>{vt=Nt})};dt();let ct;const ht=types[g]||keyframes;let wt;ht!==keyframes&&typeof d[0]!="number"&&(wt=interpolate([0,100],d,{clamp:!1}),d=[0,100]);const St=ht({...ut,keyframes:d});let xt;tt==="mirror"&&(xt=ht({...ut,keyframes:[...d].reverse(),velocity:-(ut.velocity||0)}));let Et="idle",Tt=null,$t=null,Bt=null;St.calculatedDuration===null&&_&&(St.calculatedDuration=calcGeneratorDuration(St));const{calculatedDuration:Ht}=St;let tn=1/0,Xt=1/0;Ht!==null&&(tn=Ht+c,Xt=tn*(_+1)-c);let on=0;const fn=Nt=>{if($t===null)return;pt>0&&($t=Math.min($t,Nt)),pt<0&&($t=Math.min(Nt-Xt/pt,$t)),Tt!==null?on=Tt:on=Math.round(Nt-$t)*pt;const jt=on-a*(pt>=0?1:-1),kt=pt>=0?jt<0:jt>Xt;on=Math.max(jt,0),Et==="finished"&&Tt===null&&(on=Xt);let Mt=on,Ut=St;if(_){const Tn=Math.min(on,Xt)/tn;let xn=Math.floor(Tn),wn=Tn%1;!wn&&Tn>=1&&(wn=1),wn===1&&xn--,xn=Math.min(xn,_+1),!!(xn%2)&&(tt==="reverse"?(wn=1-wn,c&&(wn-=c/tn)):tt==="mirror"&&(Ut=xt)),Mt=clamp(0,1,wn)*tn}const Jt=kt?{done:!1,value:d[0]}:Ut.next(Mt);wt&&(Jt.value=wt(Jt.value));let{done:gn}=Jt;!kt&&Ht!==null&&(gn=pt>=0?on>=Xt:on<=0);const Dn=Tt===null&&(Et==="finished"||Et==="running"&&gn);return lt&<(Jt.value),Dn&&Pt(),Jt},un=()=>{ct&&ct.stop(),ct=void 0},Ot=()=>{Et="idle",un(),vt(),dt(),$t=Bt=null},Pt=()=>{Et="finished",st&&st(),un(),vt()},Gt=()=>{if(mt)return;ct||(ct=s(fn));const Nt=ct.now();rt&&rt(),Tt!==null?$t=Nt-Tt:(!$t||Et==="finished")&&($t=Nt),Et==="finished"&&dt(),Bt=$t,Tt=null,Et="running",ct.start()};o&&Gt();const Kt={then(Nt,jt){return _t.then(Nt,jt)},get time(){return millisecondsToSeconds(on)},set time(Nt){Nt=secondsToMilliseconds(Nt),on=Nt,Tt!==null||!ct||pt===0?Tt=Nt:$t=ct.now()-Nt/pt},get duration(){const Nt=St.calculatedDuration===null?calcGeneratorDuration(St):St.calculatedDuration;return millisecondsToSeconds(Nt)},get speed(){return pt},set speed(Nt){Nt===pt||!ct||(pt=Nt,Kt.time=millisecondsToSeconds(on))},get state(){return Et},play:Gt,pause:()=>{Et="paused",Tt=on},stop:()=>{mt=!0,Et!=="idle"&&(Et="idle",it&&it(),Ot())},cancel:()=>{Bt!==null&&fn(Bt),Ot()},complete:()=>{Et="finished"},sample:Nt=>($t=0,fn(Nt))};return Kt}function memo(o){let a;return()=>(a===void 0&&(a=o()),a)}const supportsWaapi=memo(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),acceleratedValues=new Set(["opacity","clipPath","filter","transform","backgroundColor"]),sampleDelta=10,maxDuration=2e4,requiresPregeneratedKeyframes=(o,a)=>a.type==="spring"||o==="backgroundColor"||!isWaapiSupportedEasing(a.ease);function createAcceleratedAnimation(o,a,{onUpdate:s,onComplete:d,...g}){if(!(supportsWaapi()&&acceleratedValues.has(a)&&!g.repeatDelay&&g.repeatType!=="mirror"&&g.damping!==0&&g.type!=="inertia"))return!1;let c=!1,tt,rt,it=!1;const st=()=>{rt=new Promise(ht=>{tt=ht})};st();let{keyframes:lt,duration:ut=300,ease:pt,times:mt}=g;if(requiresPregeneratedKeyframes(a,g)){const ht=animateValue({...g,repeat:0,delay:0});let wt={done:!1,value:lt[0]};const St=[];let xt=0;for(;!wt.done&&xt{it=!1,vt.cancel()},dt=()=>{it=!0,frame.update(_t),tt(),st()};return vt.onfinish=()=>{it||(o.set(getFinalKeyframe(lt,g)),d&&d(),dt())},{then(ht,wt){return rt.then(ht,wt)},attachTimeline(ht){return vt.timeline=ht,vt.onfinish=null,noop},get time(){return millisecondsToSeconds(vt.currentTime||0)},set time(ht){vt.currentTime=secondsToMilliseconds(ht)},get speed(){return vt.playbackRate},set speed(ht){vt.playbackRate=ht},get duration(){return millisecondsToSeconds(ut)},play:()=>{c||(vt.play(),cancelFrame(_t))},pause:()=>vt.pause(),stop:()=>{if(c=!0,vt.playState==="idle")return;const{currentTime:ht}=vt;if(ht){const wt=animateValue({...g,autoplay:!1});o.setWithVelocity(wt.sample(ht-sampleDelta).value,wt.sample(ht).value,sampleDelta)}dt()},complete:()=>{it||vt.finish()},cancel:dt}}function createInstantAnimation({keyframes:o,delay:a,onUpdate:s,onComplete:d}){const g=()=>(s&&s(o[o.length-1]),d&&d(),{time:0,speed:1,duration:0,play:noop,pause:noop,stop:noop,then:_=>(_(),Promise.resolve()),cancel:noop,complete:noop});return a?animateValue({keyframes:[0,1],duration:0,delay:a,onComplete:g}):g()}const underDampedSpring={type:"spring",stiffness:500,damping:25,restSpeed:10},criticallyDampedSpring=o=>({type:"spring",stiffness:550,damping:o===0?2*Math.sqrt(550):30,restSpeed:10}),keyframesTransition={type:"keyframes",duration:.8},ease={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},getDefaultTransition=(o,{keyframes:a})=>a.length>2?keyframesTransition:transformProps.has(o)?o.startsWith("scale")?criticallyDampedSpring(a[1]):underDampedSpring:ease,isAnimatable=(o,a)=>o==="zIndex"?!1:!!(typeof a=="number"||Array.isArray(a)||typeof a=="string"&&(complex.test(a)||a==="0")&&!a.startsWith("url(")),maxDefaults=new Set(["brightness","contrast","saturate","opacity"]);function applyDefaultFilter(o){const[a,s]=o.slice(0,-1).split("(");if(a==="drop-shadow")return o;const[d]=s.match(floatRegex)||[];if(!d)return o;const g=s.replace(d,"");let _=maxDefaults.has(a)?1:0;return d!==s&&(_*=100),a+"("+_+g+")"}const functionRegex=/([a-z-]*)\(.*?\)/g,filter={...complex,getAnimatableNone:o=>{const a=o.match(functionRegex);return a?a.map(applyDefaultFilter).join(" "):o}},defaultValueTypes={...numberValueTypes,color,backgroundColor:color,outlineColor:color,fill:color,stroke:color,borderColor:color,borderTopColor:color,borderRightColor:color,borderBottomColor:color,borderLeftColor:color,filter,WebkitFilter:filter},getDefaultValueType=o=>defaultValueTypes[o];function getAnimatableNone(o,a){let s=getDefaultValueType(o);return s!==filter&&(s=complex),s.getAnimatableNone?s.getAnimatableNone(a):void 0}const isZeroValueString=o=>/^0[^.\s]+$/.test(o);function isNone(o){if(typeof o=="number")return o===0;if(o!==null)return o==="none"||o==="0"||isZeroValueString(o)}function getKeyframes(o,a,s,d){const g=isAnimatable(a,s);let _;Array.isArray(s)?_=[...s]:_=[null,s];const c=d.from!==void 0?d.from:o.get();let tt;const rt=[];for(let it=0;it<_.length;it++)_[it]===null&&(_[it]=it===0?c:_[it-1]),isNone(_[it])&&rt.push(it),typeof _[it]=="string"&&_[it]!=="none"&&_[it]!=="0"&&(tt=_[it]);if(g&&rt.length&&tt)for(let it=0;itg=>{const _=getValueTransition(d,o)||{},c=_.delay||d.delay||0;let{elapsed:tt=0}=d;tt=tt-secondsToMilliseconds(c);const rt=getKeyframes(a,o,s,_),it=rt[0],st=rt[rt.length-1],lt=isAnimatable(o,it),ut=isAnimatable(o,st);let pt={keyframes:rt,velocity:a.getVelocity(),ease:"easeOut",..._,delay:-tt,onUpdate:mt=>{a.set(mt),_.onUpdate&&_.onUpdate(mt)},onComplete:()=>{g(),_.onComplete&&_.onComplete()}};if(isTransitionDefined(_)||(pt={...pt,...getDefaultTransition(o,pt)}),pt.duration&&(pt.duration=secondsToMilliseconds(pt.duration)),pt.repeatDelay&&(pt.repeatDelay=secondsToMilliseconds(pt.repeatDelay)),!lt||!ut||instantAnimationState.current||_.type===!1||MotionGlobalConfig.skipAnimations)return createInstantAnimation(pt);if(!d.isHandoff&&a.owner&&a.owner.current instanceof HTMLElement&&!a.owner.getProps().onUpdate){const mt=createAcceleratedAnimation(a,o,pt);if(mt)return mt}return animateValue(pt)};function isWillChangeMotionValue(o){return!!(isMotionValue(o)&&o.add)}const isNumericalString=o=>/^\-?\d*\.?\d+$/.test(o);function addUniqueItem(o,a){o.indexOf(a)===-1&&o.push(a)}function removeItem(o,a){const s=o.indexOf(a);s>-1&&o.splice(s,1)}class SubscriptionManager{constructor(){this.subscriptions=[]}add(a){return addUniqueItem(this.subscriptions,a),()=>removeItem(this.subscriptions,a)}notify(a,s,d){const g=this.subscriptions.length;if(g)if(g===1)this.subscriptions[0](a,s,d);else for(let _=0;_!isNaN(parseFloat(o));class MotionValue{constructor(a,s={}){this.version="10.17.9",this.timeDelta=0,this.lastUpdated=0,this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(d,g=!0)=>{this.prev=this.current,this.current=d;const{delta:_,timestamp:c}=frameData;this.lastUpdated!==c&&(this.timeDelta=_,this.lastUpdated=c,frame.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.events.change&&this.events.change.notify(this.current),this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()),g&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.scheduleVelocityCheck=()=>frame.postRender(this.velocityCheck),this.velocityCheck=({timestamp:d})=>{d!==this.lastUpdated&&(this.prev=this.current,this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=a,this.canTrackVelocity=isFloat(this.current),this.owner=s.owner}onChange(a){return this.on("change",a)}on(a,s){this.events[a]||(this.events[a]=new SubscriptionManager);const d=this.events[a].add(s);return a==="change"?()=>{d(),frame.read(()=>{this.events.change.getSize()||this.stop()})}:d}clearListeners(){for(const a in this.events)this.events[a].clear()}attach(a,s){this.passiveEffect=a,this.stopPassiveEffect=s}set(a,s=!0){!s||!this.passiveEffect?this.updateAndNotify(a,s):this.passiveEffect(a,this.updateAndNotify)}setWithVelocity(a,s,d){this.set(s),this.prev=a,this.timeDelta=d}jump(a){this.updateAndNotify(a),this.prev=a,this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?velocityPerSecond(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(a){return this.stop(),new Promise(s=>{this.hasAnimated=!0,this.animation=a(s),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function motionValue(o,a){return new MotionValue(o,a)}const testValueType=o=>a=>a.test(o),auto={test:o=>o==="auto",parse:o=>o},dimensionValueTypes=[number,px,percent,degrees,vw,vh,auto],findDimensionValueType=o=>dimensionValueTypes.find(testValueType(o)),valueTypes=[...dimensionValueTypes,color,complex],findValueType=o=>valueTypes.find(testValueType(o));function setMotionValue(o,a,s){o.hasValue(a)?o.getValue(a).set(s):o.addValue(a,motionValue(s))}function setTarget(o,a){const s=resolveVariant(o,a);let{transitionEnd:d={},transition:g={},..._}=s?o.makeTargetAnimatable(s,!1):{};_={..._,...d};for(const c in _){const tt=resolveFinalValueInKeyframes(_[c]);setMotionValue(o,c,tt)}}function checkTargetForNewValues(o,a,s){var d,g;const _=Object.keys(a).filter(tt=>!o.hasValue(tt)),c=_.length;if(c)for(let tt=0;ttrt.remove(lt))),it.push(_t)}return c&&Promise.all(it).then(()=>{c&&setTarget(o,c)}),it}function animateVariant(o,a,s={}){const d=resolveVariant(o,a,s.custom);let{transition:g=o.getDefaultTransition()||{}}=d||{};s.transitionOverride&&(g=s.transitionOverride);const _=d?()=>Promise.all(animateTarget(o,d,s)):()=>Promise.resolve(),c=o.variantChildren&&o.variantChildren.size?(rt=0)=>{const{delayChildren:it=0,staggerChildren:st,staggerDirection:lt}=g;return animateChildren(o,a,it+rt,st,lt,s)}:()=>Promise.resolve(),{when:tt}=g;if(tt){const[rt,it]=tt==="beforeChildren"?[_,c]:[c,_];return rt().then(()=>it())}else return Promise.all([_(),c(s.delay)])}function animateChildren(o,a,s=0,d=0,g=1,_){const c=[],tt=(o.variantChildren.size-1)*d,rt=g===1?(it=0)=>it*d:(it=0)=>tt-it*d;return Array.from(o.variantChildren).sort(sortByTreeOrder).forEach((it,st)=>{it.notify("AnimationStart",a),c.push(animateVariant(it,a,{..._,delay:s+rt(st)}).then(()=>it.notify("AnimationComplete",a)))}),Promise.all(c)}function sortByTreeOrder(o,a){return o.sortNodePosition(a)}function animateVisualElement(o,a,s={}){o.notify("AnimationStart",a);let d;if(Array.isArray(a)){const g=a.map(_=>animateVariant(o,_,s));d=Promise.all(g)}else if(typeof a=="string")d=animateVariant(o,a,s);else{const g=typeof a=="function"?resolveVariant(o,a,s.custom):a;d=Promise.all(animateTarget(o,g,s))}return d.then(()=>o.notify("AnimationComplete",a))}const reversePriorityOrder=[...variantPriorityOrder].reverse(),numAnimationTypes=variantPriorityOrder.length;function animateList(o){return a=>Promise.all(a.map(({animation:s,options:d})=>animateVisualElement(o,s,d)))}function createAnimationState(o){let a=animateList(o);const s=createState();let d=!0;const g=(rt,it)=>{const st=resolveVariant(o,it);if(st){const{transition:lt,transitionEnd:ut,...pt}=st;rt={...rt,...pt,...ut}}return rt};function _(rt){a=rt(o)}function c(rt,it){const st=o.getProps(),lt=o.getVariantContext(!0)||{},ut=[],pt=new Set;let mt={},vt=1/0;for(let dt=0;dtvt&&St,Bt=!1;const Ht=Array.isArray(wt)?wt:[wt];let tn=Ht.reduce(g,{});xt===!1&&(tn={});const{prevResolvedValues:Xt={}}=ht,on={...Xt,...tn},fn=un=>{$t=!0,pt.has(un)&&(Bt=!0,pt.delete(un)),ht.needsAnimating[un]=!0};for(const un in on){const Ot=tn[un],Pt=Xt[un];if(mt.hasOwnProperty(un))continue;let Gt=!1;isKeyframesTarget(Ot)&&isKeyframesTarget(Pt)?Gt=!shallowCompare(Ot,Pt):Gt=Ot!==Pt,Gt?Ot!==void 0?fn(un):pt.add(un):Ot!==void 0&&pt.has(un)?fn(un):ht.protectedKeys[un]=!0}ht.prevProp=wt,ht.prevResolvedValues=tn,ht.isActive&&(mt={...mt,...tn}),d&&o.blockInitialAnimation&&($t=!1),$t&&(!Et||Bt)&&ut.push(...Ht.map(un=>({animation:un,options:{type:ct,...rt}})))}if(pt.size){const dt={};pt.forEach(ct=>{const ht=o.getBaseTarget(ct);ht!==void 0&&(dt[ct]=ht)}),ut.push({animation:dt})}let _t=!!ut.length;return d&&(st.initial===!1||st.initial===st.animate)&&!o.manuallyAnimateOnMount&&(_t=!1),d=!1,_t?a(ut):Promise.resolve()}function tt(rt,it,st){var lt;if(s[rt].isActive===it)return Promise.resolve();(lt=o.variantChildren)===null||lt===void 0||lt.forEach(pt=>{var mt;return(mt=pt.animationState)===null||mt===void 0?void 0:mt.setActive(rt,it)}),s[rt].isActive=it;const ut=c(st,rt);for(const pt in s)s[pt].protectedKeys={};return ut}return{animateChanges:c,setActive:tt,setAnimateFunction:_,getState:()=>s}}function checkVariantsDidChange(o,a){return typeof a=="string"?a!==o:Array.isArray(a)?!shallowCompare(a,o):!1}function createTypeState(o=!1){return{isActive:o,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function createState(){return{animate:createTypeState(!0),whileInView:createTypeState(),whileHover:createTypeState(),whileTap:createTypeState(),whileDrag:createTypeState(),whileFocus:createTypeState(),exit:createTypeState()}}class AnimationFeature extends Feature{constructor(a){super(a),a.animationState||(a.animationState=createAnimationState(a))}updateAnimationControlsSubscription(){const{animate:a}=this.node.getProps();this.unmount(),isAnimationControls(a)&&(this.unmount=a.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:a}=this.node.getProps(),{animate:s}=this.node.prevProps||{};a!==s&&this.updateAnimationControlsSubscription()}unmount(){}}let id$1=0;class ExitAnimationFeature extends Feature{constructor(){super(...arguments),this.id=id$1++}update(){if(!this.node.presenceContext)return;const{isPresent:a,onExitComplete:s,custom:d}=this.node.presenceContext,{isPresent:g}=this.node.prevPresenceContext||{};if(!this.node.animationState||a===g)return;const _=this.node.animationState.setActive("exit",!a,{custom:d??this.node.getProps().custom});s&&!a&&_.then(()=>s(this.id))}mount(){const{register:a}=this.node.presenceContext||{};a&&(this.unmount=a(this.id))}unmount(){}}const animations={animation:{Feature:AnimationFeature},exit:{Feature:ExitAnimationFeature}},distance=(o,a)=>Math.abs(o-a);function distance2D(o,a){const s=distance(o.x,a.x),d=distance(o.y,a.y);return Math.sqrt(s**2+d**2)}class PanSession{constructor(a,s,{transformPagePoint:d,contextWindow:g,dragSnapToOrigin:_=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const lt=getPanInfo(this.lastMoveEventInfo,this.history),ut=this.startEvent!==null,pt=distance2D(lt.offset,{x:0,y:0})>=3;if(!ut&&!pt)return;const{point:mt}=lt,{timestamp:vt}=frameData;this.history.push({...mt,timestamp:vt});const{onStart:_t,onMove:dt}=this.handlers;ut||(_t&&_t(this.lastMoveEvent,lt),this.startEvent=this.lastMoveEvent),dt&&dt(this.lastMoveEvent,lt)},this.handlePointerMove=(lt,ut)=>{this.lastMoveEvent=lt,this.lastMoveEventInfo=transformPoint(ut,this.transformPagePoint),frame.update(this.updatePoint,!0)},this.handlePointerUp=(lt,ut)=>{this.end();const{onEnd:pt,onSessionEnd:mt,resumeAnimation:vt}=this.handlers;if(this.dragSnapToOrigin&&vt&&vt(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const _t=getPanInfo(lt.type==="pointercancel"?this.lastMoveEventInfo:transformPoint(ut,this.transformPagePoint),this.history);this.startEvent&&pt&&pt(lt,_t),mt&&mt(lt,_t)},!isPrimaryPointer(a))return;this.dragSnapToOrigin=_,this.handlers=s,this.transformPagePoint=d,this.contextWindow=g||window;const c=extractEventInfo(a),tt=transformPoint(c,this.transformPagePoint),{point:rt}=tt,{timestamp:it}=frameData;this.history=[{...rt,timestamp:it}];const{onSessionStart:st}=s;st&&st(a,getPanInfo(tt,this.history)),this.removeListeners=pipe(addPointerEvent(this.contextWindow,"pointermove",this.handlePointerMove),addPointerEvent(this.contextWindow,"pointerup",this.handlePointerUp),addPointerEvent(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(a){this.handlers=a}end(){this.removeListeners&&this.removeListeners(),cancelFrame(this.updatePoint)}}function transformPoint(o,a){return a?{point:a(o.point)}:o}function subtractPoint(o,a){return{x:o.x-a.x,y:o.y-a.y}}function getPanInfo({point:o},a){return{point:o,delta:subtractPoint(o,lastDevicePoint(a)),offset:subtractPoint(o,startDevicePoint(a)),velocity:getVelocity(a,.1)}}function startDevicePoint(o){return o[0]}function lastDevicePoint(o){return o[o.length-1]}function getVelocity(o,a){if(o.length<2)return{x:0,y:0};let s=o.length-1,d=null;const g=lastDevicePoint(o);for(;s>=0&&(d=o[s],!(g.timestamp-d.timestamp>secondsToMilliseconds(a)));)s--;if(!d)return{x:0,y:0};const _=millisecondsToSeconds(g.timestamp-d.timestamp);if(_===0)return{x:0,y:0};const c={x:(g.x-d.x)/_,y:(g.y-d.y)/_};return c.x===1/0&&(c.x=0),c.y===1/0&&(c.y=0),c}function calcLength(o){return o.max-o.min}function isNear(o,a=0,s=.01){return Math.abs(o-a)<=s}function calcAxisDelta(o,a,s,d=.5){o.origin=d,o.originPoint=mix(a.min,a.max,o.origin),o.scale=calcLength(s)/calcLength(a),(isNear(o.scale,1,1e-4)||isNaN(o.scale))&&(o.scale=1),o.translate=mix(s.min,s.max,o.origin)-o.originPoint,(isNear(o.translate)||isNaN(o.translate))&&(o.translate=0)}function calcBoxDelta(o,a,s,d){calcAxisDelta(o.x,a.x,s.x,d?d.originX:void 0),calcAxisDelta(o.y,a.y,s.y,d?d.originY:void 0)}function calcRelativeAxis(o,a,s){o.min=s.min+a.min,o.max=o.min+calcLength(a)}function calcRelativeBox(o,a,s){calcRelativeAxis(o.x,a.x,s.x),calcRelativeAxis(o.y,a.y,s.y)}function calcRelativeAxisPosition(o,a,s){o.min=a.min-s.min,o.max=o.min+calcLength(a)}function calcRelativePosition(o,a,s){calcRelativeAxisPosition(o.x,a.x,s.x),calcRelativeAxisPosition(o.y,a.y,s.y)}function applyConstraints(o,{min:a,max:s},d){return a!==void 0&&os&&(o=d?mix(s,o,d.max):Math.min(o,s)),o}function calcRelativeAxisConstraints(o,a,s){return{min:a!==void 0?o.min+a:void 0,max:s!==void 0?o.max+s-(o.max-o.min):void 0}}function calcRelativeConstraints(o,{top:a,left:s,bottom:d,right:g}){return{x:calcRelativeAxisConstraints(o.x,s,g),y:calcRelativeAxisConstraints(o.y,a,d)}}function calcViewportAxisConstraints(o,a){let s=a.min-o.min,d=a.max-o.max;return a.max-a.mind?s=progress(a.min,a.max-d,o.min):d>g&&(s=progress(o.min,o.max-g,a.min)),clamp(0,1,s)}function rebaseAxisConstraints(o,a){const s={};return a.min!==void 0&&(s.min=a.min-o.min),a.max!==void 0&&(s.max=a.max-o.min),s}const defaultElastic=.35;function resolveDragElastic(o=defaultElastic){return o===!1?o=0:o===!0&&(o=defaultElastic),{x:resolveAxisElastic(o,"left","right"),y:resolveAxisElastic(o,"top","bottom")}}function resolveAxisElastic(o,a,s){return{min:resolvePointElastic(o,a),max:resolvePointElastic(o,s)}}function resolvePointElastic(o,a){return typeof o=="number"?o:o[a]||0}const createAxisDelta=()=>({translate:0,scale:1,origin:0,originPoint:0}),createDelta=()=>({x:createAxisDelta(),y:createAxisDelta()}),createAxis=()=>({min:0,max:0}),createBox=()=>({x:createAxis(),y:createAxis()});function eachAxis(o){return[o("x"),o("y")]}function convertBoundingBoxToBox({top:o,left:a,right:s,bottom:d}){return{x:{min:a,max:s},y:{min:o,max:d}}}function convertBoxToBoundingBox({x:o,y:a}){return{top:a.min,right:o.max,bottom:a.max,left:o.min}}function transformBoxPoints(o,a){if(!a)return o;const s=a({x:o.left,y:o.top}),d=a({x:o.right,y:o.bottom});return{top:s.y,left:s.x,bottom:d.y,right:d.x}}function isIdentityScale(o){return o===void 0||o===1}function hasScale({scale:o,scaleX:a,scaleY:s}){return!isIdentityScale(o)||!isIdentityScale(a)||!isIdentityScale(s)}function hasTransform(o){return hasScale(o)||has2DTranslate(o)||o.z||o.rotate||o.rotateX||o.rotateY}function has2DTranslate(o){return is2DTranslate(o.x)||is2DTranslate(o.y)}function is2DTranslate(o){return o&&o!=="0%"}function scalePoint(o,a,s){const d=o-s,g=a*d;return s+g}function applyPointDelta(o,a,s,d,g){return g!==void 0&&(o=scalePoint(o,g,d)),scalePoint(o,s,d)+a}function applyAxisDelta(o,a=0,s=1,d,g){o.min=applyPointDelta(o.min,a,s,d,g),o.max=applyPointDelta(o.max,a,s,d,g)}function applyBoxDelta(o,{x:a,y:s}){applyAxisDelta(o.x,a.translate,a.scale,a.originPoint),applyAxisDelta(o.y,s.translate,s.scale,s.originPoint)}function applyTreeDeltas(o,a,s,d=!1){const g=s.length;if(!g)return;a.x=a.y=1;let _,c;for(let tt=0;tt1.0000000000001||o<.999999999999?o:1}function translateAxis(o,a){o.min=o.min+a,o.max=o.max+a}function transformAxis(o,a,[s,d,g]){const _=a[g]!==void 0?a[g]:.5,c=mix(o.min,o.max,_);applyAxisDelta(o,a[s],a[d],c,a.scale)}const xKeys$1=["x","scaleX","originX"],yKeys$1=["y","scaleY","originY"];function transformBox(o,a){transformAxis(o.x,a,xKeys$1),transformAxis(o.y,a,yKeys$1)}function measureViewportBox(o,a){return convertBoundingBoxToBox(transformBoxPoints(o.getBoundingClientRect(),a))}function measurePageBox(o,a,s){const d=measureViewportBox(o,s),{scroll:g}=a;return g&&(translateAxis(d.x,g.offset.x),translateAxis(d.y,g.offset.y)),d}const getContextWindow=({current:o})=>o?o.ownerDocument.defaultView:null,elementDragControls=new WeakMap;class VisualElementDragControls{constructor(a){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=createBox(),this.visualElement=a}start(a,{snapToCursor:s=!1}={}){const{presenceContext:d}=this.visualElement;if(d&&d.isPresent===!1)return;const g=st=>{const{dragSnapToOrigin:lt}=this.getProps();lt?this.pauseAnimation():this.stopAnimation(),s&&this.snapToCursor(extractEventInfo(st,"page").point)},_=(st,lt)=>{const{drag:ut,dragPropagation:pt,onDragStart:mt}=this.getProps();if(ut&&!pt&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=getGlobalLock(ut),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),eachAxis(_t=>{let dt=this.getAxisMotionValue(_t).get()||0;if(percent.test(dt)){const{projection:ct}=this.visualElement;if(ct&&ct.layout){const ht=ct.layout.layoutBox[_t];ht&&(dt=calcLength(ht)*(parseFloat(dt)/100))}}this.originPoint[_t]=dt}),mt&&frame.update(()=>mt(st,lt),!1,!0);const{animationState:vt}=this.visualElement;vt&&vt.setActive("whileDrag",!0)},c=(st,lt)=>{const{dragPropagation:ut,dragDirectionLock:pt,onDirectionLock:mt,onDrag:vt}=this.getProps();if(!ut&&!this.openGlobalLock)return;const{offset:_t}=lt;if(pt&&this.currentDirection===null){this.currentDirection=getCurrentDirection(_t),this.currentDirection!==null&&mt&&mt(this.currentDirection);return}this.updateAxis("x",lt.point,_t),this.updateAxis("y",lt.point,_t),this.visualElement.render(),vt&&vt(st,lt)},tt=(st,lt)=>this.stop(st,lt),rt=()=>eachAxis(st=>{var lt;return this.getAnimationState(st)==="paused"&&((lt=this.getAxisMotionValue(st).animation)===null||lt===void 0?void 0:lt.play())}),{dragSnapToOrigin:it}=this.getProps();this.panSession=new PanSession(a,{onSessionStart:g,onStart:_,onMove:c,onSessionEnd:tt,resumeAnimation:rt},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:it,contextWindow:getContextWindow(this.visualElement)})}stop(a,s){const d=this.isDragging;if(this.cancel(),!d)return;const{velocity:g}=s;this.startAnimation(g);const{onDragEnd:_}=this.getProps();_&&frame.update(()=>_(a,s))}cancel(){this.isDragging=!1;const{projection:a,animationState:s}=this.visualElement;a&&(a.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:d}=this.getProps();!d&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),s&&s.setActive("whileDrag",!1)}updateAxis(a,s,d){const{drag:g}=this.getProps();if(!d||!shouldDrag(a,g,this.currentDirection))return;const _=this.getAxisMotionValue(a);let c=this.originPoint[a]+d[a];this.constraints&&this.constraints[a]&&(c=applyConstraints(c,this.constraints[a],this.elastic[a])),_.set(c)}resolveConstraints(){var a;const{dragConstraints:s,dragElastic:d}=this.getProps(),g=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(a=this.visualElement.projection)===null||a===void 0?void 0:a.layout,_=this.constraints;s&&isRefObject(s)?this.constraints||(this.constraints=this.resolveRefConstraints()):s&&g?this.constraints=calcRelativeConstraints(g.layoutBox,s):this.constraints=!1,this.elastic=resolveDragElastic(d),_!==this.constraints&&g&&this.constraints&&!this.hasMutatedConstraints&&eachAxis(c=>{this.getAxisMotionValue(c)&&(this.constraints[c]=rebaseAxisConstraints(g.layoutBox[c],this.constraints[c]))})}resolveRefConstraints(){const{dragConstraints:a,onMeasureDragConstraints:s}=this.getProps();if(!a||!isRefObject(a))return!1;const d=a.current,{projection:g}=this.visualElement;if(!g||!g.layout)return!1;const _=measurePageBox(d,g.root,this.visualElement.getTransformPagePoint());let c=calcViewportConstraints(g.layout.layoutBox,_);if(s){const tt=s(convertBoxToBoundingBox(c));this.hasMutatedConstraints=!!tt,tt&&(c=convertBoundingBoxToBox(tt))}return c}startAnimation(a){const{drag:s,dragMomentum:d,dragElastic:g,dragTransition:_,dragSnapToOrigin:c,onDragTransitionEnd:tt}=this.getProps(),rt=this.constraints||{},it=eachAxis(st=>{if(!shouldDrag(st,s,this.currentDirection))return;let lt=rt&&rt[st]||{};c&&(lt={min:0,max:0});const ut=g?200:1e6,pt=g?40:1e7,mt={type:"inertia",velocity:d?a[st]:0,bounceStiffness:ut,bounceDamping:pt,timeConstant:750,restDelta:1,restSpeed:10,..._,...lt};return this.startAxisValueAnimation(st,mt)});return Promise.all(it).then(tt)}startAxisValueAnimation(a,s){const d=this.getAxisMotionValue(a);return d.start(animateMotionValue(a,d,0,s))}stopAnimation(){eachAxis(a=>this.getAxisMotionValue(a).stop())}pauseAnimation(){eachAxis(a=>{var s;return(s=this.getAxisMotionValue(a).animation)===null||s===void 0?void 0:s.pause()})}getAnimationState(a){var s;return(s=this.getAxisMotionValue(a).animation)===null||s===void 0?void 0:s.state}getAxisMotionValue(a){const s="_drag"+a.toUpperCase(),d=this.visualElement.getProps(),g=d[s];return g||this.visualElement.getValue(a,(d.initial?d.initial[a]:void 0)||0)}snapToCursor(a){eachAxis(s=>{const{drag:d}=this.getProps();if(!shouldDrag(s,d,this.currentDirection))return;const{projection:g}=this.visualElement,_=this.getAxisMotionValue(s);if(g&&g.layout){const{min:c,max:tt}=g.layout.layoutBox[s];_.set(a[s]-mix(c,tt,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:a,dragConstraints:s}=this.getProps(),{projection:d}=this.visualElement;if(!isRefObject(s)||!d||!this.constraints)return;this.stopAnimation();const g={x:0,y:0};eachAxis(c=>{const tt=this.getAxisMotionValue(c);if(tt){const rt=tt.get();g[c]=calcOrigin({min:rt,max:rt},this.constraints[c])}});const{transformTemplate:_}=this.visualElement.getProps();this.visualElement.current.style.transform=_?_({},""):"none",d.root&&d.root.updateScroll(),d.updateLayout(),this.resolveConstraints(),eachAxis(c=>{if(!shouldDrag(c,a,null))return;const tt=this.getAxisMotionValue(c),{min:rt,max:it}=this.constraints[c];tt.set(mix(rt,it,g[c]))})}addListeners(){if(!this.visualElement.current)return;elementDragControls.set(this.visualElement,this);const a=this.visualElement.current,s=addPointerEvent(a,"pointerdown",rt=>{const{drag:it,dragListener:st=!0}=this.getProps();it&&st&&this.start(rt)}),d=()=>{const{dragConstraints:rt}=this.getProps();isRefObject(rt)&&(this.constraints=this.resolveRefConstraints())},{projection:g}=this.visualElement,_=g.addEventListener("measure",d);g&&!g.layout&&(g.root&&g.root.updateScroll(),g.updateLayout()),d();const c=addDomEvent(window,"resize",()=>this.scalePositionWithinConstraints()),tt=g.addEventListener("didUpdate",({delta:rt,hasLayoutChanged:it})=>{this.isDragging&&it&&(eachAxis(st=>{const lt=this.getAxisMotionValue(st);lt&&(this.originPoint[st]+=rt[st].translate,lt.set(lt.get()+rt[st].translate))}),this.visualElement.render())});return()=>{c(),s(),_(),tt&&tt()}}getProps(){const a=this.visualElement.getProps(),{drag:s=!1,dragDirectionLock:d=!1,dragPropagation:g=!1,dragConstraints:_=!1,dragElastic:c=defaultElastic,dragMomentum:tt=!0}=a;return{...a,drag:s,dragDirectionLock:d,dragPropagation:g,dragConstraints:_,dragElastic:c,dragMomentum:tt}}}function shouldDrag(o,a,s){return(a===!0||a===o)&&(s===null||s===o)}function getCurrentDirection(o,a=10){let s=null;return Math.abs(o.y)>a?s="y":Math.abs(o.x)>a&&(s="x"),s}class DragGesture extends Feature{constructor(a){super(a),this.removeGroupControls=noop,this.removeListeners=noop,this.controls=new VisualElementDragControls(a)}mount(){const{dragControls:a}=this.node.getProps();a&&(this.removeGroupControls=a.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||noop}unmount(){this.removeGroupControls(),this.removeListeners()}}const asyncHandler=o=>(a,s)=>{o&&frame.update(()=>o(a,s))};class PanGesture extends Feature{constructor(){super(...arguments),this.removePointerDownListener=noop}onPointerDown(a){this.session=new PanSession(a,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:getContextWindow(this.node)})}createPanHandlers(){const{onPanSessionStart:a,onPanStart:s,onPan:d,onPanEnd:g}=this.node.getProps();return{onSessionStart:asyncHandler(a),onStart:asyncHandler(s),onMove:d,onEnd:(_,c)=>{delete this.session,g&&frame.update(()=>g(_,c))}}}mount(){this.removePointerDownListener=addPointerEvent(this.node.current,"pointerdown",a=>this.onPointerDown(a))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}function usePresence(){const o=reactExports.useContext(PresenceContext);if(o===null)return[!0,null];const{isPresent:a,onExitComplete:s,register:d}=o,g=reactExports.useId();return reactExports.useEffect(()=>d(g),[]),!a&&s?[!1,()=>s&&s(g)]:[!0]}const globalProjectionState={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function pixelsToPercent(o,a){return a.max===a.min?0:o/(a.max-a.min)*100}const correctBorderRadius={correct:(o,a)=>{if(!a.target)return o;if(typeof o=="string")if(px.test(o))o=parseFloat(o);else return o;const s=pixelsToPercent(o,a.target.x),d=pixelsToPercent(o,a.target.y);return`${s}% ${d}%`}},correctBoxShadow={correct:(o,{treeScale:a,projectionDelta:s})=>{const d=o,g=complex.parse(o);if(g.length>5)return d;const _=complex.createTransformer(o),c=typeof g[0]!="number"?1:0,tt=s.x.scale*a.x,rt=s.y.scale*a.y;g[0+c]/=tt,g[1+c]/=rt;const it=mix(tt,rt,.5);return typeof g[2+c]=="number"&&(g[2+c]/=it),typeof g[3+c]=="number"&&(g[3+c]/=it),_(g)}};class MeasureLayoutWithContext extends React.Component{componentDidMount(){const{visualElement:a,layoutGroup:s,switchLayoutGroup:d,layoutId:g}=this.props,{projection:_}=a;addScaleCorrector(defaultScaleCorrectors),_&&(s.group&&s.group.add(_),d&&d.register&&g&&d.register(_),_.root.didUpdate(),_.addEventListener("animationComplete",()=>{this.safeToRemove()}),_.setOptions({..._.options,onExitComplete:()=>this.safeToRemove()})),globalProjectionState.hasEverUpdated=!0}getSnapshotBeforeUpdate(a){const{layoutDependency:s,visualElement:d,drag:g,isPresent:_}=this.props,c=d.projection;return c&&(c.isPresent=_,g||a.layoutDependency!==s||s===void 0?c.willUpdate():this.safeToRemove(),a.isPresent!==_&&(_?c.promote():c.relegate()||frame.postRender(()=>{const tt=c.getStack();(!tt||!tt.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:a}=this.props.visualElement;a&&(a.root.didUpdate(),queueMicrotask(()=>{!a.currentAnimation&&a.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:a,layoutGroup:s,switchLayoutGroup:d}=this.props,{projection:g}=a;g&&(g.scheduleCheckAfterUnmount(),s&&s.group&&s.group.remove(g),d&&d.deregister&&d.deregister(g))}safeToRemove(){const{safeToRemove:a}=this.props;a&&a()}render(){return null}}function MeasureLayout(o){const[a,s]=usePresence(),d=reactExports.useContext(LayoutGroupContext);return React.createElement(MeasureLayoutWithContext,{...o,layoutGroup:d,switchLayoutGroup:reactExports.useContext(SwitchLayoutGroupContext),isPresent:a,safeToRemove:s})}const defaultScaleCorrectors={borderRadius:{...correctBorderRadius,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:correctBorderRadius,borderTopRightRadius:correctBorderRadius,borderBottomLeftRadius:correctBorderRadius,borderBottomRightRadius:correctBorderRadius,boxShadow:correctBoxShadow},borders=["TopLeft","TopRight","BottomLeft","BottomRight"],numBorders=borders.length,asNumber=o=>typeof o=="string"?parseFloat(o):o,isPx=o=>typeof o=="number"||px.test(o);function mixValues(o,a,s,d,g,_){g?(o.opacity=mix(0,s.opacity!==void 0?s.opacity:1,easeCrossfadeIn(d)),o.opacityExit=mix(a.opacity!==void 0?a.opacity:1,0,easeCrossfadeOut(d))):_&&(o.opacity=mix(a.opacity!==void 0?a.opacity:1,s.opacity!==void 0?s.opacity:1,d));for(let c=0;cda?1:s(progress(o,a,d))}function copyAxisInto(o,a){o.min=a.min,o.max=a.max}function copyBoxInto(o,a){copyAxisInto(o.x,a.x),copyAxisInto(o.y,a.y)}function removePointDelta(o,a,s,d,g){return o-=a,o=scalePoint(o,1/s,d),g!==void 0&&(o=scalePoint(o,1/g,d)),o}function removeAxisDelta(o,a=0,s=1,d=.5,g,_=o,c=o){if(percent.test(a)&&(a=parseFloat(a),a=mix(c.min,c.max,a/100)-c.min),typeof a!="number")return;let tt=mix(_.min,_.max,d);o===_&&(tt-=a),o.min=removePointDelta(o.min,a,s,tt,g),o.max=removePointDelta(o.max,a,s,tt,g)}function removeAxisTransforms(o,a,[s,d,g],_,c){removeAxisDelta(o,a[s],a[d],a[g],a.scale,_,c)}const xKeys=["x","scaleX","originX"],yKeys=["y","scaleY","originY"];function removeBoxTransforms(o,a,s,d){removeAxisTransforms(o.x,a,xKeys,s?s.x:void 0,d?d.x:void 0),removeAxisTransforms(o.y,a,yKeys,s?s.y:void 0,d?d.y:void 0)}function isAxisDeltaZero(o){return o.translate===0&&o.scale===1}function isDeltaZero(o){return isAxisDeltaZero(o.x)&&isAxisDeltaZero(o.y)}function boxEquals(o,a){return o.x.min===a.x.min&&o.x.max===a.x.max&&o.y.min===a.y.min&&o.y.max===a.y.max}function boxEqualsRounded(o,a){return Math.round(o.x.min)===Math.round(a.x.min)&&Math.round(o.x.max)===Math.round(a.x.max)&&Math.round(o.y.min)===Math.round(a.y.min)&&Math.round(o.y.max)===Math.round(a.y.max)}function aspectRatio(o){return calcLength(o.x)/calcLength(o.y)}class NodeStack{constructor(){this.members=[]}add(a){addUniqueItem(this.members,a),a.scheduleRender()}remove(a){if(removeItem(this.members,a),a===this.prevLead&&(this.prevLead=void 0),a===this.lead){const s=this.members[this.members.length-1];s&&this.promote(s)}}relegate(a){const s=this.members.findIndex(g=>a===g);if(s===0)return!1;let d;for(let g=s;g>=0;g--){const _=this.members[g];if(_.isPresent!==!1){d=_;break}}return d?(this.promote(d),!0):!1}promote(a,s){const d=this.lead;if(a!==d&&(this.prevLead=d,this.lead=a,a.show(),d)){d.instance&&d.scheduleRender(),a.scheduleRender(),a.resumeFrom=d,s&&(a.resumeFrom.preserveOpacity=!0),d.snapshot&&(a.snapshot=d.snapshot,a.snapshot.latestValues=d.animationValues||d.latestValues),a.root&&a.root.isUpdating&&(a.isLayoutDirty=!0);const{crossfade:g}=a.options;g===!1&&d.hide()}}exitAnimationComplete(){this.members.forEach(a=>{const{options:s,resumingFrom:d}=a;s.onExitComplete&&s.onExitComplete(),d&&d.options.onExitComplete&&d.options.onExitComplete()})}scheduleRender(){this.members.forEach(a=>{a.instance&&a.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function buildProjectionTransform(o,a,s){let d="";const g=o.x.translate/a.x,_=o.y.translate/a.y;if((g||_)&&(d=`translate3d(${g}px, ${_}px, 0) `),(a.x!==1||a.y!==1)&&(d+=`scale(${1/a.x}, ${1/a.y}) `),s){const{rotate:rt,rotateX:it,rotateY:st}=s;rt&&(d+=`rotate(${rt}deg) `),it&&(d+=`rotateX(${it}deg) `),st&&(d+=`rotateY(${st}deg) `)}const c=o.x.scale*a.x,tt=o.y.scale*a.y;return(c!==1||tt!==1)&&(d+=`scale(${c}, ${tt})`),d||"none"}const compareByDepth=(o,a)=>o.depth-a.depth;class FlatTree{constructor(){this.children=[],this.isDirty=!1}add(a){addUniqueItem(this.children,a),this.isDirty=!0}remove(a){removeItem(this.children,a),this.isDirty=!0}forEach(a){this.isDirty&&this.children.sort(compareByDepth),this.isDirty=!1,this.children.forEach(a)}}function delay(o,a){const s=performance.now(),d=({timestamp:g})=>{const _=g-s;_>=a&&(cancelFrame(d),o(_-a))};return frame.read(d,!0),()=>cancelFrame(d)}function record(o){window.MotionDebug&&window.MotionDebug.record(o)}function isSVGElement(o){return o instanceof SVGElement&&o.tagName!=="svg"}function animateSingleValue(o,a,s){const d=isMotionValue(o)?o:motionValue(o);return d.start(animateMotionValue("",d,a,s)),d.animation}const transformAxes=["","X","Y","Z"],hiddenVisibility={visibility:"hidden"},animationTarget=1e3;let id=0;const projectionFrameData={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0};function createProjectionNode({attachResizeListener:o,defaultParent:a,measureScroll:s,checkIsScrollRoot:d,resetTransform:g}){return class{constructor(c={},tt=a==null?void 0:a()){this.id=id++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,projectionFrameData.totalNodes=projectionFrameData.resolvedTargetDeltas=projectionFrameData.recalculatedProjection=0,this.nodes.forEach(propagateDirtyNodes),this.nodes.forEach(resolveTargetDelta),this.nodes.forEach(calcProjection),this.nodes.forEach(cleanDirtyNodes),record(projectionFrameData)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=c,this.root=tt?tt.root||tt:this,this.path=tt?[...tt.path,tt]:[],this.parent=tt,this.depth=tt?tt.depth+1:0;for(let rt=0;rtthis.root.updateBlockedByResize=!1;o(c,()=>{this.root.updateBlockedByResize=!0,lt&<(),lt=delay(ut,250),globalProjectionState.hasAnimatedSinceResize&&(globalProjectionState.hasAnimatedSinceResize=!1,this.nodes.forEach(finishAnimation))})}rt&&this.root.registerSharedNode(rt,this),this.options.animate!==!1&&st&&(rt||it)&&this.addEventListener("didUpdate",({delta:lt,hasLayoutChanged:ut,hasRelativeTargetChanged:pt,layout:mt})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const vt=this.options.transition||st.getDefaultTransition()||defaultLayoutTransition,{onLayoutAnimationStart:_t,onLayoutAnimationComplete:dt}=st.getProps(),ct=!this.targetLayout||!boxEqualsRounded(this.targetLayout,mt)||pt,ht=!ut&&pt;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||ht||ut&&(ct||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(lt,ht);const wt={...getValueTransition(vt,"layout"),onPlay:_t,onComplete:dt};(st.shouldReduceMotion||this.options.layoutRoot)&&(wt.delay=0,wt.type=!1),this.startAnimation(wt)}else ut||finishAnimation(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=mt})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const c=this.getStack();c&&c.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,cancelFrame(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(resetRotation),this.animationId++)}getTransformTemplate(){const{visualElement:c}=this.options;return c&&c.getProps().transformTemplate}willUpdate(c=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let st=0;stthis.update()))}clearAllSnapshots(){this.nodes.forEach(clearSnapshot),this.sharedNodes.forEach(removeLeadSnapshots)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,frame.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){frame.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let rt=0;rt{const St=wt/1e3;mixAxisDelta(lt.x,c.x,St),mixAxisDelta(lt.y,c.y,St),this.setTargetDelta(lt),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(calcRelativePosition(ut,this.layout.layoutBox,this.relativeParent.layout.layoutBox),mixBox(this.relativeTarget,this.relativeTargetOrigin,ut,St),ht&&boxEquals(this.relativeTarget,ht)&&(this.isProjectionDirty=!1),ht||(ht=createBox()),copyBoxInto(ht,this.relativeTarget)),vt&&(this.animationValues=st,mixValues(st,it,this.latestValues,St,ct,dt)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=St},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(c){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(cancelFrame(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=frame.update(()=>{globalProjectionState.hasAnimatedSinceResize=!0,this.currentAnimation=animateSingleValue(0,animationTarget,{...c,onUpdate:tt=>{this.mixTargetDelta(tt),c.onUpdate&&c.onUpdate(tt)},onComplete:()=>{c.onComplete&&c.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const c=this.getStack();c&&c.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(animationTarget),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const c=this.getLead();let{targetWithTransforms:tt,target:rt,layout:it,latestValues:st}=c;if(!(!tt||!rt||!it)){if(this!==c&&this.layout&&it&&shouldAnimatePositionOnly(this.options.animationType,this.layout.layoutBox,it.layoutBox)){rt=this.target||createBox();const lt=calcLength(this.layout.layoutBox.x);rt.x.min=c.target.x.min,rt.x.max=rt.x.min+lt;const ut=calcLength(this.layout.layoutBox.y);rt.y.min=c.target.y.min,rt.y.max=rt.y.min+ut}copyBoxInto(tt,rt),transformBox(tt,st),calcBoxDelta(this.projectionDeltaWithTransform,this.layoutCorrected,tt,st)}}registerSharedNode(c,tt){this.sharedNodes.has(c)||this.sharedNodes.set(c,new NodeStack),this.sharedNodes.get(c).add(tt);const it=tt.options.initialPromotionConfig;tt.promote({transition:it?it.transition:void 0,preserveFollowOpacity:it&&it.shouldPreserveFollowOpacity?it.shouldPreserveFollowOpacity(tt):void 0})}isLead(){const c=this.getStack();return c?c.lead===this:!0}getLead(){var c;const{layoutId:tt}=this.options;return tt?((c=this.getStack())===null||c===void 0?void 0:c.lead)||this:this}getPrevLead(){var c;const{layoutId:tt}=this.options;return tt?(c=this.getStack())===null||c===void 0?void 0:c.prevLead:void 0}getStack(){const{layoutId:c}=this.options;if(c)return this.root.sharedNodes.get(c)}promote({needsReset:c,transition:tt,preserveFollowOpacity:rt}={}){const it=this.getStack();it&&it.promote(this,rt),c&&(this.projectionDelta=void 0,this.needsReset=!0),tt&&this.setOptions({transition:tt})}relegate(){const c=this.getStack();return c?c.relegate(this):!1}resetRotation(){const{visualElement:c}=this.options;if(!c)return;let tt=!1;const{latestValues:rt}=c;if((rt.rotate||rt.rotateX||rt.rotateY||rt.rotateZ)&&(tt=!0),!tt)return;const it={};for(let st=0;st{var tt;return(tt=c.currentAnimation)===null||tt===void 0?void 0:tt.stop()}),this.root.nodes.forEach(clearMeasurements),this.root.sharedNodes.clear()}}}function updateLayout(o){o.updateLayout()}function notifyLayoutUpdate(o){var a;const s=((a=o.resumeFrom)===null||a===void 0?void 0:a.snapshot)||o.snapshot;if(o.isLead()&&o.layout&&s&&o.hasListeners("didUpdate")){const{layoutBox:d,measuredBox:g}=o.layout,{animationType:_}=o.options,c=s.source!==o.layout.source;_==="size"?eachAxis(lt=>{const ut=c?s.measuredBox[lt]:s.layoutBox[lt],pt=calcLength(ut);ut.min=d[lt].min,ut.max=ut.min+pt}):shouldAnimatePositionOnly(_,s.layoutBox,d)&&eachAxis(lt=>{const ut=c?s.measuredBox[lt]:s.layoutBox[lt],pt=calcLength(d[lt]);ut.max=ut.min+pt,o.relativeTarget&&!o.currentAnimation&&(o.isProjectionDirty=!0,o.relativeTarget[lt].max=o.relativeTarget[lt].min+pt)});const tt=createDelta();calcBoxDelta(tt,d,s.layoutBox);const rt=createDelta();c?calcBoxDelta(rt,o.applyTransform(g,!0),s.measuredBox):calcBoxDelta(rt,d,s.layoutBox);const it=!isDeltaZero(tt);let st=!1;if(!o.resumeFrom){const lt=o.getClosestProjectingParent();if(lt&&!lt.resumeFrom){const{snapshot:ut,layout:pt}=lt;if(ut&&pt){const mt=createBox();calcRelativePosition(mt,s.layoutBox,ut.layoutBox);const vt=createBox();calcRelativePosition(vt,d,pt.layoutBox),boxEqualsRounded(mt,vt)||(st=!0),lt.options.layoutRoot&&(o.relativeTarget=vt,o.relativeTargetOrigin=mt,o.relativeParent=lt)}}}o.notifyListeners("didUpdate",{layout:d,snapshot:s,delta:rt,layoutDelta:tt,hasLayoutChanged:it,hasRelativeTargetChanged:st})}else if(o.isLead()){const{onExitComplete:d}=o.options;d&&d()}o.options.transition=void 0}function propagateDirtyNodes(o){projectionFrameData.totalNodes++,o.parent&&(o.isProjecting()||(o.isProjectionDirty=o.parent.isProjectionDirty),o.isSharedProjectionDirty||(o.isSharedProjectionDirty=!!(o.isProjectionDirty||o.parent.isProjectionDirty||o.parent.isSharedProjectionDirty)),o.isTransformDirty||(o.isTransformDirty=o.parent.isTransformDirty))}function cleanDirtyNodes(o){o.isProjectionDirty=o.isSharedProjectionDirty=o.isTransformDirty=!1}function clearSnapshot(o){o.clearSnapshot()}function clearMeasurements(o){o.clearMeasurements()}function clearIsLayoutDirty(o){o.isLayoutDirty=!1}function resetTransformStyle(o){const{visualElement:a}=o.options;a&&a.getProps().onBeforeLayoutMeasure&&a.notify("BeforeLayoutMeasure"),o.resetTransform()}function finishAnimation(o){o.finishAnimation(),o.targetDelta=o.relativeTarget=o.target=void 0,o.isProjectionDirty=!0}function resolveTargetDelta(o){o.resolveTargetDelta()}function calcProjection(o){o.calcProjection()}function resetRotation(o){o.resetRotation()}function removeLeadSnapshots(o){o.removeLeadSnapshot()}function mixAxisDelta(o,a,s){o.translate=mix(a.translate,0,s),o.scale=mix(a.scale,1,s),o.origin=a.origin,o.originPoint=a.originPoint}function mixAxis(o,a,s,d){o.min=mix(a.min,s.min,d),o.max=mix(a.max,s.max,d)}function mixBox(o,a,s,d){mixAxis(o.x,a.x,s.x,d),mixAxis(o.y,a.y,s.y,d)}function hasOpacityCrossfade(o){return o.animationValues&&o.animationValues.opacityExit!==void 0}const defaultLayoutTransition={duration:.45,ease:[.4,0,.1,1]},userAgentContains=o=>typeof navigator<"u"&&navigator.userAgent.toLowerCase().includes(o),roundPoint=userAgentContains("applewebkit/")&&!userAgentContains("chrome/")?Math.round:noop;function roundAxis(o){o.min=roundPoint(o.min),o.max=roundPoint(o.max)}function roundBox(o){roundAxis(o.x),roundAxis(o.y)}function shouldAnimatePositionOnly(o,a,s){return o==="position"||o==="preserve-aspect"&&!isNear(aspectRatio(a),aspectRatio(s),.2)}const DocumentProjectionNode=createProjectionNode({attachResizeListener:(o,a)=>addDomEvent(o,"resize",a),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),rootProjectionNode={current:void 0},HTMLProjectionNode=createProjectionNode({measureScroll:o=>({x:o.scrollLeft,y:o.scrollTop}),defaultParent:()=>{if(!rootProjectionNode.current){const o=new DocumentProjectionNode({});o.mount(window),o.setOptions({layoutScroll:!0}),rootProjectionNode.current=o}return rootProjectionNode.current},resetTransform:(o,a)=>{o.style.transform=a!==void 0?a:"none"},checkIsScrollRoot:o=>window.getComputedStyle(o).position==="fixed"}),drag={pan:{Feature:PanGesture},drag:{Feature:DragGesture,ProjectionNode:HTMLProjectionNode,MeasureLayout}},splitCSSVariableRegex=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function parseCSSVariable(o){const a=splitCSSVariableRegex.exec(o);if(!a)return[,];const[,s,d]=a;return[s,d]}function getVariableValue(o,a,s=1){const[d,g]=parseCSSVariable(o);if(!d)return;const _=window.getComputedStyle(a).getPropertyValue(d);if(_){const c=_.trim();return isNumericalString(c)?parseFloat(c):c}else return isCSSVariableToken(g)?getVariableValue(g,a,s+1):g}function resolveCSSVariables(o,{...a},s){const d=o.current;if(!(d instanceof Element))return{target:a,transitionEnd:s};s&&(s={...s}),o.values.forEach(g=>{const _=g.get();if(!isCSSVariableToken(_))return;const c=getVariableValue(_,d);c&&g.set(c)});for(const g in a){const _=a[g];if(!isCSSVariableToken(_))continue;const c=getVariableValue(_,d);c&&(a[g]=c,s||(s={}),s[g]===void 0&&(s[g]=_))}return{target:a,transitionEnd:s}}const positionalKeys=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),isPositionalKey=o=>positionalKeys.has(o),hasPositionalKey=o=>Object.keys(o).some(isPositionalKey),isNumOrPxType=o=>o===number||o===px,getPosFromMatrix=(o,a)=>parseFloat(o.split(", ")[a]),getTranslateFromMatrix=(o,a)=>(s,{transform:d})=>{if(d==="none"||!d)return 0;const g=d.match(/^matrix3d\((.+)\)$/);if(g)return getPosFromMatrix(g[1],a);{const _=d.match(/^matrix\((.+)\)$/);return _?getPosFromMatrix(_[1],o):0}},transformKeys=new Set(["x","y","z"]),nonTranslationalTransformKeys=transformPropOrder.filter(o=>!transformKeys.has(o));function removeNonTranslationalTransform(o){const a=[];return nonTranslationalTransformKeys.forEach(s=>{const d=o.getValue(s);d!==void 0&&(a.push([s,d.get()]),d.set(s.startsWith("scale")?1:0))}),a.length&&o.render(),a}const positionalValues={width:({x:o},{paddingLeft:a="0",paddingRight:s="0"})=>o.max-o.min-parseFloat(a)-parseFloat(s),height:({y:o},{paddingTop:a="0",paddingBottom:s="0"})=>o.max-o.min-parseFloat(a)-parseFloat(s),top:(o,{top:a})=>parseFloat(a),left:(o,{left:a})=>parseFloat(a),bottom:({y:o},{top:a})=>parseFloat(a)+(o.max-o.min),right:({x:o},{left:a})=>parseFloat(a)+(o.max-o.min),x:getTranslateFromMatrix(4,13),y:getTranslateFromMatrix(5,14)};positionalValues.translateX=positionalValues.x;positionalValues.translateY=positionalValues.y;const convertChangedValueTypes=(o,a,s)=>{const d=a.measureViewportBox(),g=a.current,_=getComputedStyle(g),{display:c}=_,tt={};c==="none"&&a.setStaticValue("display",o.display||"block"),s.forEach(it=>{tt[it]=positionalValues[it](d,_)}),a.render();const rt=a.measureViewportBox();return s.forEach(it=>{const st=a.getValue(it);st&&st.jump(tt[it]),o[it]=positionalValues[it](rt,_)}),o},checkAndConvertChangedValueTypes=(o,a,s={},d={})=>{a={...a},d={...d};const g=Object.keys(a).filter(isPositionalKey);let _=[],c=!1;const tt=[];if(g.forEach(rt=>{const it=o.getValue(rt);if(!o.hasValue(rt))return;let st=s[rt],lt=findDimensionValueType(st);const ut=a[rt];let pt;if(isKeyframesTarget(ut)){const mt=ut.length,vt=ut[0]===null?1:0;st=ut[vt],lt=findDimensionValueType(st);for(let _t=vt;_t=0?window.pageYOffset:null,it=convertChangedValueTypes(a,o,tt);return _.length&&_.forEach(([st,lt])=>{o.getValue(st).set(lt)}),o.render(),isBrowser&&rt!==null&&window.scrollTo({top:rt}),{target:it,transitionEnd:d}}else return{target:a,transitionEnd:d}};function unitConversion(o,a,s,d){return hasPositionalKey(a)?checkAndConvertChangedValueTypes(o,a,s,d):{target:a,transitionEnd:d}}const parseDomVariant=(o,a,s,d)=>{const g=resolveCSSVariables(o,a,d);return a=g.target,d=g.transitionEnd,unitConversion(o,a,s,d)},prefersReducedMotion={current:null},hasReducedMotionListener={current:!1};function initPrefersReducedMotion(){if(hasReducedMotionListener.current=!0,!!isBrowser)if(window.matchMedia){const o=window.matchMedia("(prefers-reduced-motion)"),a=()=>prefersReducedMotion.current=o.matches;o.addListener(a),a()}else prefersReducedMotion.current=!1}function updateMotionValuesFromProps(o,a,s){const{willChange:d}=a;for(const g in a){const _=a[g],c=s[g];if(isMotionValue(_))o.addValue(g,_),isWillChangeMotionValue(d)&&d.add(g);else if(isMotionValue(c))o.addValue(g,motionValue(_,{owner:o})),isWillChangeMotionValue(d)&&d.remove(g);else if(c!==_)if(o.hasValue(g)){const tt=o.getValue(g);!tt.hasAnimated&&tt.set(_)}else{const tt=o.getStaticValue(g);o.addValue(g,motionValue(tt!==void 0?tt:_,{owner:o}))}}for(const g in s)a[g]===void 0&&o.removeValue(g);return a}const visualElementStore=new WeakMap,featureNames=Object.keys(featureDefinitions),numFeatures=featureNames.length,propEventHandlers=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],numVariantProps=variantProps.length;class VisualElement{constructor({parent:a,props:s,presenceContext:d,reducedMotionConfig:g,visualState:_},c={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.scheduleRender=()=>frame.render(this.render,!1,!0);const{latestValues:tt,renderState:rt}=_;this.latestValues=tt,this.baseTarget={...tt},this.initialValues=s.initial?{...tt}:{},this.renderState=rt,this.parent=a,this.props=s,this.presenceContext=d,this.depth=a?a.depth+1:0,this.reducedMotionConfig=g,this.options=c,this.isControllingVariants=isControllingVariants(s),this.isVariantNode=isVariantNode(s),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(a&&a.current);const{willChange:it,...st}=this.scrapeMotionValuesFromProps(s,{});for(const lt in st){const ut=st[lt];tt[lt]!==void 0&&isMotionValue(ut)&&(ut.set(tt[lt],!1),isWillChangeMotionValue(it)&&it.add(lt))}}scrapeMotionValuesFromProps(a,s){return{}}mount(a){this.current=a,visualElementStore.set(a,this),this.projection&&!this.projection.instance&&this.projection.mount(a),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((s,d)=>this.bindToMotionValue(d,s)),hasReducedMotionListener.current||initPrefersReducedMotion(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:prefersReducedMotion.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){visualElementStore.delete(this.current),this.projection&&this.projection.unmount(),cancelFrame(this.notifyUpdate),cancelFrame(this.render),this.valueSubscriptions.forEach(a=>a()),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const a in this.events)this.events[a].clear();for(const a in this.features)this.features[a].unmount();this.current=null}bindToMotionValue(a,s){const d=transformProps.has(a),g=s.on("change",c=>{this.latestValues[a]=c,this.props.onUpdate&&frame.update(this.notifyUpdate,!1,!0),d&&this.projection&&(this.projection.isTransformDirty=!0)}),_=s.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(a,()=>{g(),_()})}sortNodePosition(a){return!this.current||!this.sortInstanceNodePosition||this.type!==a.type?0:this.sortInstanceNodePosition(this.current,a.current)}loadFeatures({children:a,...s},d,g,_){let c,tt;for(let rt=0;rtthis.scheduleRender(),animationType:typeof it=="string"?it:"both",initialPromotionConfig:_,layoutScroll:ut,layoutRoot:pt})}return tt}updateFeatures(){for(const a in this.features){const s=this.features[a];s.isMounted?s.update():(s.mount(),s.isMounted=!0)}}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):createBox()}getStaticValue(a){return this.latestValues[a]}setStaticValue(a,s){this.latestValues[a]=s}makeTargetAnimatable(a,s=!0){return this.makeTargetAnimatableFromInstance(a,this.props,s)}update(a,s){(a.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=a,this.prevPresenceContext=this.presenceContext,this.presenceContext=s;for(let d=0;ds.variantChildren.delete(a)}addValue(a,s){s!==this.values.get(a)&&(this.removeValue(a),this.bindToMotionValue(a,s)),this.values.set(a,s),this.latestValues[a]=s.get()}removeValue(a){this.values.delete(a);const s=this.valueSubscriptions.get(a);s&&(s(),this.valueSubscriptions.delete(a)),delete this.latestValues[a],this.removeValueFromRenderState(a,this.renderState)}hasValue(a){return this.values.has(a)}getValue(a,s){if(this.props.values&&this.props.values[a])return this.props.values[a];let d=this.values.get(a);return d===void 0&&s!==void 0&&(d=motionValue(s,{owner:this}),this.addValue(a,d)),d}readValue(a){var s;return this.latestValues[a]!==void 0||!this.current?this.latestValues[a]:(s=this.getBaseTargetFromProps(this.props,a))!==null&&s!==void 0?s:this.readValueFromInstance(this.current,a,this.options)}setBaseTarget(a,s){this.baseTarget[a]=s}getBaseTarget(a){var s;const{initial:d}=this.props,g=typeof d=="string"||typeof d=="object"?(s=resolveVariantFromProps(this.props,d))===null||s===void 0?void 0:s[a]:void 0;if(d&&g!==void 0)return g;const _=this.getBaseTargetFromProps(this.props,a);return _!==void 0&&!isMotionValue(_)?_:this.initialValues[a]!==void 0&&g===void 0?void 0:this.baseTarget[a]}on(a,s){return this.events[a]||(this.events[a]=new SubscriptionManager),this.events[a].add(s)}notify(a,...s){this.events[a]&&this.events[a].notify(...s)}}class DOMVisualElement extends VisualElement{sortInstanceNodePosition(a,s){return a.compareDocumentPosition(s)&2?1:-1}getBaseTargetFromProps(a,s){return a.style?a.style[s]:void 0}removeValueFromRenderState(a,{vars:s,style:d}){delete s[a],delete d[a]}makeTargetAnimatableFromInstance({transition:a,transitionEnd:s,...d},{transformValues:g},_){let c=getOrigin(d,a||{},this);if(g&&(s&&(s=g(s)),d&&(d=g(d)),c&&(c=g(c))),_){checkTargetForNewValues(this,d,c);const tt=parseDomVariant(this,d,c,s);s=tt.transitionEnd,d=tt.target}return{transition:a,transitionEnd:s,...d}}}function getComputedStyle$1(o){return window.getComputedStyle(o)}class HTMLVisualElement extends DOMVisualElement{readValueFromInstance(a,s){if(transformProps.has(s)){const d=getDefaultValueType(s);return d&&d.default||0}else{const d=getComputedStyle$1(a),g=(isCSSVariableName(s)?d.getPropertyValue(s):d[s])||0;return typeof g=="string"?g.trim():g}}measureInstanceViewportBox(a,{transformPagePoint:s}){return measureViewportBox(a,s)}build(a,s,d,g){buildHTMLStyles(a,s,d,g.transformTemplate)}scrapeMotionValuesFromProps(a,s){return scrapeMotionValuesFromProps$1(a,s)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:a}=this.props;isMotionValue(a)&&(this.childSubscription=a.on("change",s=>{this.current&&(this.current.textContent=`${s}`)}))}renderInstance(a,s,d,g){renderHTML(a,s,d,g)}}class SVGVisualElement extends DOMVisualElement{constructor(){super(...arguments),this.isSVGTag=!1}getBaseTargetFromProps(a,s){return a[s]}readValueFromInstance(a,s){if(transformProps.has(s)){const d=getDefaultValueType(s);return d&&d.default||0}return s=camelCaseAttributes.has(s)?s:camelToDash(s),a.getAttribute(s)}measureInstanceViewportBox(){return createBox()}scrapeMotionValuesFromProps(a,s){return scrapeMotionValuesFromProps(a,s)}build(a,s,d,g){buildSVGAttrs(a,s,d,this.isSVGTag,g.transformTemplate)}renderInstance(a,s,d,g){renderSVG(a,s,d,g)}mount(a){this.isSVGTag=isSVGTag(a.tagName),super.mount(a)}}const createDomVisualElement=(o,a)=>isSVGComponent(o)?new SVGVisualElement(a,{enableHardwareAcceleration:!1}):new HTMLVisualElement(a,{enableHardwareAcceleration:!0}),layout={layout:{ProjectionNode:HTMLProjectionNode,MeasureLayout}},preloadedFeatures={...animations,...gestureAnimations,...drag,...layout},motion=createMotionProxy((o,a)=>createDomMotionConfig(o,a,preloadedFeatures,createDomVisualElement));function About(){const[o]=reactExports.useState("laoer536-关于页面"),{num:a,changeNum:s}=useUserStore();return jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("h1",{children:o}),jsxRuntimeExports.jsxs("h2",{children:["userSore.num:",a]}),jsxRuntimeExports.jsx(motion.button,{...button,onClick:s,children:"点击使用zustand提供的store改变数字"})]})}const dockerLogo="/vite3.0-react18-TypeScript-router-dom6-mobx6-Eslint-prettier-template/assets/Docker-SaajVHef.svg",reactLogo="/vite3.0-react18-TypeScript-router-dom6-mobx6-Eslint-prettier-template/assets/react-h3aPdYU7.svg",home="_home_icbgy_1",logo="_logo_icbgy_1",card="_card_icbgy_9",HomeStyle={home,logo,card,"read-the-docs":"_read-the-docs_icbgy_12","logo-spin":"_logo-spin_icbgy_1"},publicPath="/vite3.0-react18-TypeScript-router-dom6-mobx6-Eslint-prettier-template/";function Home(){const{num:o,changeNum:a}=useUserStore(),s=useNavigate(),d=()=>{s("/about")};return jsxRuntimeExports.jsxs("div",{className:HomeStyle.home,children:[jsxRuntimeExports.jsxs(motion.div,{initial:{translateY:-300},whileInView:{translateY:0},transition:{type:"spring"},children:[jsxRuntimeExports.jsx("a",{href:"https://vitejs.dev",target:"_blank",rel:"noreferrer",children:jsxRuntimeExports.jsx("img",{src:publicPath+"vite.svg",className:HomeStyle.logo,alt:"Vite logo"})}),jsxRuntimeExports.jsx("a",{href:"https://reactjs.org",target:"_blank",rel:"noreferrer",children:jsxRuntimeExports.jsx("img",{src:reactLogo,className:`${HomeStyle.logo} ${HomeStyle.react}`,alt:"React logo"})}),jsxRuntimeExports.jsx("a",{href:"https://forums.docker.com/",target:"_blank",rel:"noreferrer",children:jsxRuntimeExports.jsx("img",{src:dockerLogo,className:HomeStyle.logo,alt:"Docker logo"})})]}),jsxRuntimeExports.jsx("h1",{children:"Vite + React"}),jsxRuntimeExports.jsxs("div",{className:HomeStyle.card,children:[jsxRuntimeExports.jsxs(motion.button,{...button,onClick:a,children:["UserStore's count is ",o]}),jsxRuntimeExports.jsxs("p",{children:["Edit ",jsxRuntimeExports.jsx("code",{children:"src/App.tsx"})," and save to test HMR"]})]}),jsxRuntimeExports.jsx("p",{className:"read-the-docs",children:"Click on the Vite and React logos to learn more"}),jsxRuntimeExports.jsx(motion.button,{...button,onClick:d,children:"点击跳转到about页面"})]})}function Router(){return useRoutes([{path:"/",element:jsxRuntimeExports.jsx(Home,{})},{path:"/about",element:jsxRuntimeExports.jsx(About,{})}])}function App(){return useVcosole(),jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsx(Router,{})})}client.createRoot(document.getElementById("root")).render(jsxRuntimeExports.jsx(React.StrictMode,{children:jsxRuntimeExports.jsx(BrowserRouter,{basename:"/vite3.0-react18-TypeScript-router-dom6-mobx6-Eslint-prettier-template/",children:jsxRuntimeExports.jsx(App,{})})})); + */var h=reactExports,n=shimExports;function p(o,a){return o===a&&(o!==0||1/o===1/a)||o!==o&&a!==a}var q=typeof Object.is=="function"?Object.is:p,r=n.useSyncExternalStore,t=h.useRef,u=h.useEffect,v=h.useMemo,w=h.useDebugValue;withSelector_production_min.useSyncExternalStoreWithSelector=function(o,a,s,d,g){var _=t(null);if(_.current===null){var c={hasValue:!1,value:null};_.current=c}else c=_.current;_=v(function(){function rt(pt){if(!it){if(it=!0,st=pt,pt=d(pt),g!==void 0&&c.hasValue){var mt=c.value;if(g(mt,pt))return lt=mt}return lt=pt}if(mt=lt,q(st,pt))return mt;var vt=d(pt);return g!==void 0&&g(mt,vt)?mt:(st=pt,lt=vt)}var it=!1,st,lt,ut=s===void 0?null:s;return[function(){return rt(a())},ut===null?void 0:function(){return rt(ut())}]},[a,s,d,g]);var tt=r(o,_[0],_[1]);return u(function(){c.hasValue=!0,c.value=tt},[tt]),w(tt),tt};withSelector.exports=withSelector_production_min;var withSelectorExports=withSelector.exports;const useSyncExternalStoreExports=getDefaultExportFromCjs(withSelectorExports);var define_import_meta_env_default={VITE_API_BASE_URL:"https://production.com",VITE_PUBLIC_PATH:"/vite3.0-react18-TypeScript-router-dom6-mobx6-Eslint-prettier-template/",VITE_API_SERVER_URL:"https://xxxx.com",VITE_USER_NODE_ENV:"production",BASE_URL:"/vite3.0-react18-TypeScript-router-dom6-mobx6-Eslint-prettier-template/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const{useDebugValue}=React,{useSyncExternalStoreWithSelector}=useSyncExternalStoreExports;let didWarnAboutEqualityFn=!1;function useStore(o,a=o.getState,s){(define_import_meta_env_default?"production":void 0)!=="production"&&s&&!didWarnAboutEqualityFn&&(console.warn("[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"),didWarnAboutEqualityFn=!0);const d=useSyncExternalStoreWithSelector(o.subscribe,o.getState,o.getServerState||o.getState,a,s);return useDebugValue(d),d}const createImpl=o=>{(define_import_meta_env_default?"production":void 0)!=="production"&&typeof o!="function"&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const a=typeof o=="function"?createStore(o):o,s=(d,g)=>useStore(a,d,g);return Object.assign(s,a),s},create=o=>o?createImpl(o):createImpl,useUserStore=create(o=>({userName:"LiuJie1998",num:0,changeName:()=>o({userName:"laoer536"}),changeNum:()=>o(a=>({num:a.num+1}))})),MotionConfigContext=reactExports.createContext({transformPagePoint:o=>o,isStatic:!1,reducedMotion:"never"}),MotionContext=reactExports.createContext({}),PresenceContext=reactExports.createContext(null),isBrowser=typeof document<"u",useIsomorphicLayoutEffect=isBrowser?reactExports.useLayoutEffect:reactExports.useEffect,LazyContext=reactExports.createContext({strict:!1}),camelToDash=o=>o.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),optimizedAppearDataId="framerAppearId",optimizedAppearDataAttribute="data-"+camelToDash(optimizedAppearDataId);function useVisualElement(o,a,s,d){const{visualElement:g}=reactExports.useContext(MotionContext),_=reactExports.useContext(LazyContext),c=reactExports.useContext(PresenceContext),tt=reactExports.useContext(MotionConfigContext).reducedMotion,rt=reactExports.useRef();d=d||_.renderer,!rt.current&&d&&(rt.current=d(o,{visualState:a,parent:g,props:s,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:tt}));const it=rt.current;reactExports.useInsertionEffect(()=>{it&&it.update(s,c)});const st=reactExports.useRef(!!(s[optimizedAppearDataAttribute]&&!window.HandoffComplete));return useIsomorphicLayoutEffect(()=>{it&&(it.render(),st.current&&it.animationState&&it.animationState.animateChanges())}),reactExports.useEffect(()=>{it&&(it.updateFeatures(),!st.current&&it.animationState&&it.animationState.animateChanges(),st.current&&(st.current=!1,window.HandoffComplete=!0))}),it}function isRefObject(o){return o&&typeof o=="object"&&Object.prototype.hasOwnProperty.call(o,"current")}function useMotionRef(o,a,s){return reactExports.useCallback(d=>{d&&o.mount&&o.mount(d),a&&(d?a.mount(d):a.unmount()),s&&(typeof s=="function"?s(d):isRefObject(s)&&(s.current=d))},[a])}function isVariantLabel(o){return typeof o=="string"||Array.isArray(o)}function isAnimationControls(o){return o!==null&&typeof o=="object"&&typeof o.start=="function"}const variantPriorityOrder=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],variantProps=["initial",...variantPriorityOrder];function isControllingVariants(o){return isAnimationControls(o.animate)||variantProps.some(a=>isVariantLabel(o[a]))}function isVariantNode(o){return!!(isControllingVariants(o)||o.variants)}function getCurrentTreeVariants(o,a){if(isControllingVariants(o)){const{initial:s,animate:d}=o;return{initial:s===!1||isVariantLabel(s)?s:void 0,animate:isVariantLabel(d)?d:void 0}}return o.inherit!==!1?a:{}}function useCreateMotionContext(o){const{initial:a,animate:s}=getCurrentTreeVariants(o,reactExports.useContext(MotionContext));return reactExports.useMemo(()=>({initial:a,animate:s}),[variantLabelsAsDependency(a),variantLabelsAsDependency(s)])}function variantLabelsAsDependency(o){return Array.isArray(o)?o.join(" "):o}const featureProps={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},featureDefinitions={};for(const o in featureProps)featureDefinitions[o]={isEnabled:a=>featureProps[o].some(s=>!!a[s])};function loadFeatures(o){for(const a in o)featureDefinitions[a]={...featureDefinitions[a],...o[a]}}const LayoutGroupContext=reactExports.createContext({}),SwitchLayoutGroupContext=reactExports.createContext({}),motionComponentSymbol=Symbol.for("motionComponentSymbol");function createMotionComponent({preloadedFeatures:o,createVisualElement:a,useRender:s,useVisualState:d,Component:g}){o&&loadFeatures(o);function _(tt,rt){let it;const st={...reactExports.useContext(MotionConfigContext),...tt,layoutId:useLayoutId(tt)},{isStatic:lt}=st,ut=useCreateMotionContext(tt),pt=d(tt,lt);if(!lt&&isBrowser){ut.visualElement=useVisualElement(g,pt,st,a);const mt=reactExports.useContext(SwitchLayoutGroupContext),vt=reactExports.useContext(LazyContext).strict;ut.visualElement&&(it=ut.visualElement.loadFeatures(st,vt,o,mt))}return reactExports.createElement(MotionContext.Provider,{value:ut},it&&ut.visualElement?reactExports.createElement(it,{visualElement:ut.visualElement,...st}):null,s(g,tt,useMotionRef(pt,ut.visualElement,rt),pt,lt,ut.visualElement))}const c=reactExports.forwardRef(_);return c[motionComponentSymbol]=g,c}function useLayoutId({layoutId:o}){const a=reactExports.useContext(LayoutGroupContext).id;return a&&o!==void 0?a+"-"+o:o}function createMotionProxy(o){function a(d,g={}){return createMotionComponent(o(d,g))}if(typeof Proxy>"u")return a;const s=new Map;return new Proxy(a,{get:(d,g)=>(s.has(g)||s.set(g,a(g)),s.get(g))})}const lowercaseSVGElements=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function isSVGComponent(o){return typeof o!="string"||o.includes("-")?!1:!!(lowercaseSVGElements.indexOf(o)>-1||/[A-Z]/.test(o))}const scaleCorrectors={};function addScaleCorrector(o){Object.assign(scaleCorrectors,o)}const transformPropOrder=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],transformProps=new Set(transformPropOrder);function isForcedMotionValue(o,{layout:a,layoutId:s}){return transformProps.has(o)||o.startsWith("origin")||(a||s!==void 0)&&(!!scaleCorrectors[o]||o==="opacity")}const isMotionValue=o=>!!(o&&o.getVelocity),translateAlias={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},numTransforms=transformPropOrder.length;function buildTransform(o,{enableHardwareAcceleration:a=!0,allowTransformNone:s=!0},d,g){let _="";for(let c=0;ca=>typeof a=="string"&&a.startsWith(o),isCSSVariableName=checkStringStartsWith("--"),isCSSVariableToken=checkStringStartsWith("var(--"),cssVariableRegex=/var\s*\(\s*--[\w-]+(\s*,\s*(?:(?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)+)?\s*\)/g,getValueAsType=(o,a)=>a&&typeof o=="number"?a.transform(o):o,clamp=(o,a,s)=>Math.min(Math.max(s,o),a),number={test:o=>typeof o=="number",parse:parseFloat,transform:o=>o},alpha={...number,transform:o=>clamp(0,1,o)},scale={...number,default:1},sanitize=o=>Math.round(o*1e5)/1e5,floatRegex=/(-)?([\d]*\.?[\d])+/g,colorRegex=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,singleColorRegex=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function isString(o){return typeof o=="string"}const createUnitType=o=>({test:a=>isString(a)&&a.endsWith(o)&&a.split(" ").length===1,parse:parseFloat,transform:a=>`${a}${o}`}),degrees=createUnitType("deg"),percent=createUnitType("%"),px=createUnitType("px"),vh=createUnitType("vh"),vw=createUnitType("vw"),progressPercentage={...percent,parse:o=>percent.parse(o)/100,transform:o=>percent.transform(o*100)},int={...number,transform:Math.round},numberValueTypes={borderWidth:px,borderTopWidth:px,borderRightWidth:px,borderBottomWidth:px,borderLeftWidth:px,borderRadius:px,radius:px,borderTopLeftRadius:px,borderTopRightRadius:px,borderBottomRightRadius:px,borderBottomLeftRadius:px,width:px,maxWidth:px,height:px,maxHeight:px,size:px,top:px,right:px,bottom:px,left:px,padding:px,paddingTop:px,paddingRight:px,paddingBottom:px,paddingLeft:px,margin:px,marginTop:px,marginRight:px,marginBottom:px,marginLeft:px,rotate:degrees,rotateX:degrees,rotateY:degrees,rotateZ:degrees,scale,scaleX:scale,scaleY:scale,scaleZ:scale,skew:degrees,skewX:degrees,skewY:degrees,distance:px,translateX:px,translateY:px,translateZ:px,x:px,y:px,z:px,perspective:px,transformPerspective:px,opacity:alpha,originX:progressPercentage,originY:progressPercentage,originZ:px,zIndex:int,fillOpacity:alpha,strokeOpacity:alpha,numOctaves:int};function buildHTMLStyles(o,a,s,d){const{style:g,vars:_,transform:c,transformOrigin:tt}=o;let rt=!1,it=!1,st=!0;for(const lt in a){const ut=a[lt];if(isCSSVariableName(lt)){_[lt]=ut;continue}const pt=numberValueTypes[lt],mt=getValueAsType(ut,pt);if(transformProps.has(lt)){if(rt=!0,c[lt]=mt,!st)continue;ut!==(pt.default||0)&&(st=!1)}else lt.startsWith("origin")?(it=!0,tt[lt]=mt):g[lt]=mt}if(a.transform||(rt||d?g.transform=buildTransform(o.transform,s,st,d):g.transform&&(g.transform="none")),it){const{originX:lt="50%",originY:ut="50%",originZ:pt=0}=tt;g.transformOrigin=`${lt} ${ut} ${pt}`}}const createHtmlRenderState=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function copyRawValuesOnly(o,a,s){for(const d in a)!isMotionValue(a[d])&&!isForcedMotionValue(d,s)&&(o[d]=a[d])}function useInitialMotionValues({transformTemplate:o},a,s){return reactExports.useMemo(()=>{const d=createHtmlRenderState();return buildHTMLStyles(d,a,{enableHardwareAcceleration:!s},o),Object.assign({},d.vars,d.style)},[a])}function useStyle(o,a,s){const d=o.style||{},g={};return copyRawValuesOnly(g,d,o),Object.assign(g,useInitialMotionValues(o,a,s)),o.transformValues?o.transformValues(g):g}function useHTMLProps(o,a,s){const d={},g=useStyle(o,a,s);return o.drag&&o.dragListener!==!1&&(d.draggable=!1,g.userSelect=g.WebkitUserSelect=g.WebkitTouchCallout="none",g.touchAction=o.drag===!0?"none":`pan-${o.drag==="x"?"y":"x"}`),o.tabIndex===void 0&&(o.onTap||o.onTapStart||o.whileTap)&&(d.tabIndex=0),d.style=g,d}const validMotionProps=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","ignoreStrict","viewport"]);function isValidMotionProp(o){return o.startsWith("while")||o.startsWith("drag")&&o!=="draggable"||o.startsWith("layout")||o.startsWith("onTap")||o.startsWith("onPan")||validMotionProps.has(o)}let shouldForward=o=>!isValidMotionProp(o);function loadExternalIsValidProp(o){o&&(shouldForward=a=>a.startsWith("on")?!isValidMotionProp(a):o(a))}try{loadExternalIsValidProp(require("@emotion/is-prop-valid").default)}catch(o){}function filterProps(o,a,s){const d={};for(const g in o)g==="values"&&typeof o.values=="object"||(shouldForward(g)||s===!0&&isValidMotionProp(g)||!a&&!isValidMotionProp(g)||o.draggable&&g.startsWith("onDrag"))&&(d[g]=o[g]);return d}function calcOrigin$1(o,a,s){return typeof o=="string"?o:px.transform(a+s*o)}function calcSVGTransformOrigin(o,a,s){const d=calcOrigin$1(a,o.x,o.width),g=calcOrigin$1(s,o.y,o.height);return`${d} ${g}`}const dashKeys={offset:"stroke-dashoffset",array:"stroke-dasharray"},camelKeys={offset:"strokeDashoffset",array:"strokeDasharray"};function buildSVGPath(o,a,s=1,d=0,g=!0){o.pathLength=1;const _=g?dashKeys:camelKeys;o[_.offset]=px.transform(-d);const c=px.transform(a),tt=px.transform(s);o[_.array]=`${c} ${tt}`}function buildSVGAttrs(o,{attrX:a,attrY:s,attrScale:d,originX:g,originY:_,pathLength:c,pathSpacing:tt=1,pathOffset:rt=0,...it},st,lt,ut){if(buildHTMLStyles(o,it,st,ut),lt){o.style.viewBox&&(o.attrs.viewBox=o.style.viewBox);return}o.attrs=o.style,o.style={};const{attrs:pt,style:mt,dimensions:vt}=o;pt.transform&&(vt&&(mt.transform=pt.transform),delete pt.transform),vt&&(g!==void 0||_!==void 0||mt.transform)&&(mt.transformOrigin=calcSVGTransformOrigin(vt,g!==void 0?g:.5,_!==void 0?_:.5)),a!==void 0&&(pt.x=a),s!==void 0&&(pt.y=s),d!==void 0&&(pt.scale=d),c!==void 0&&buildSVGPath(pt,c,tt,rt,!1)}const createSvgRenderState=()=>({...createHtmlRenderState(),attrs:{}}),isSVGTag=o=>typeof o=="string"&&o.toLowerCase()==="svg";function useSVGProps(o,a,s,d){const g=reactExports.useMemo(()=>{const _=createSvgRenderState();return buildSVGAttrs(_,a,{enableHardwareAcceleration:!1},isSVGTag(d),o.transformTemplate),{..._.attrs,style:{..._.style}}},[a]);if(o.style){const _={};copyRawValuesOnly(_,o.style,o),g.style={..._,...g.style}}return g}function createUseRender(o=!1){return(s,d,g,{latestValues:_},c)=>{const rt=(isSVGComponent(s)?useSVGProps:useHTMLProps)(d,_,c,s),st={...filterProps(d,typeof s=="string",o),...rt,ref:g},{children:lt}=d,ut=reactExports.useMemo(()=>isMotionValue(lt)?lt.get():lt,[lt]);return reactExports.createElement(s,{...st,children:ut})}}function renderHTML(o,{style:a,vars:s},d,g){Object.assign(o.style,a,g&&g.getProjectionStyles(d));for(const _ in s)o.style.setProperty(_,s[_])}const camelCaseAttributes=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function renderSVG(o,a,s,d){renderHTML(o,a,void 0,d);for(const g in a.attrs)o.setAttribute(camelCaseAttributes.has(g)?g:camelToDash(g),a.attrs[g])}function scrapeMotionValuesFromProps$1(o,a){const{style:s}=o,d={};for(const g in s)(isMotionValue(s[g])||a.style&&isMotionValue(a.style[g])||isForcedMotionValue(g,o))&&(d[g]=s[g]);return d}function scrapeMotionValuesFromProps(o,a){const s=scrapeMotionValuesFromProps$1(o,a);for(const d in o)if(isMotionValue(o[d])||isMotionValue(a[d])){const g=transformPropOrder.indexOf(d)!==-1?"attr"+d.charAt(0).toUpperCase()+d.substring(1):d;s[g]=o[d]}return s}function resolveVariantFromProps(o,a,s,d={},g={}){return typeof a=="function"&&(a=a(s!==void 0?s:o.custom,d,g)),typeof a=="string"&&(a=o.variants&&o.variants[a]),typeof a=="function"&&(a=a(s!==void 0?s:o.custom,d,g)),a}function useConstant(o){const a=reactExports.useRef(null);return a.current===null&&(a.current=o()),a.current}const isKeyframesTarget=o=>Array.isArray(o),isCustomValue=o=>!!(o&&typeof o=="object"&&o.mix&&o.toValue),resolveFinalValueInKeyframes=o=>isKeyframesTarget(o)?o[o.length-1]||0:o;function resolveMotionValue(o){const a=isMotionValue(o)?o.get():o;return isCustomValue(a)?a.toValue():a}function makeState({scrapeMotionValuesFromProps:o,createRenderState:a,onMount:s},d,g,_){const c={latestValues:makeLatestValues(d,g,_,o),renderState:a()};return s&&(c.mount=tt=>s(d,tt,c)),c}const makeUseVisualState=o=>(a,s)=>{const d=reactExports.useContext(MotionContext),g=reactExports.useContext(PresenceContext),_=()=>makeState(o,a,d,g);return s?_():useConstant(_)};function makeLatestValues(o,a,s,d){const g={},_=d(o,{});for(const ut in _)g[ut]=resolveMotionValue(_[ut]);let{initial:c,animate:tt}=o;const rt=isControllingVariants(o),it=isVariantNode(o);a&&it&&!rt&&o.inherit!==!1&&(c===void 0&&(c=a.initial),tt===void 0&&(tt=a.animate));let st=s?s.initial===!1:!1;st=st||c===!1;const lt=st?tt:c;return lt&&typeof lt!="boolean"&&!isAnimationControls(lt)&&(Array.isArray(lt)?lt:[lt]).forEach(pt=>{const mt=resolveVariantFromProps(o,pt);if(!mt)return;const{transitionEnd:vt,transition:_t,...dt}=mt;for(const ct in dt){let ht=dt[ct];if(Array.isArray(ht)){const wt=st?ht.length-1:0;ht=ht[wt]}ht!==null&&(g[ct]=ht)}for(const ct in vt)g[ct]=vt[ct]}),g}const noop=o=>o;class Queue{constructor(){this.order=[],this.scheduled=new Set}add(a){if(!this.scheduled.has(a))return this.scheduled.add(a),this.order.push(a),!0}remove(a){const s=this.order.indexOf(a);s!==-1&&(this.order.splice(s,1),this.scheduled.delete(a))}clear(){this.order.length=0,this.scheduled.clear()}}function createRenderStep(o){let a=new Queue,s=new Queue,d=0,g=!1,_=!1;const c=new WeakSet,tt={schedule:(rt,it=!1,st=!1)=>{const lt=st&&g,ut=lt?a:s;return it&&c.add(rt),ut.add(rt)&<&&g&&(d=a.order.length),rt},cancel:rt=>{s.remove(rt),c.delete(rt)},process:rt=>{if(g){_=!0;return}if(g=!0,[a,s]=[s,a],s.clear(),d=a.order.length,d)for(let it=0;it(lt[ut]=createRenderStep(()=>s=!0),lt),{}),c=lt=>_[lt].process(g),tt=()=>{const lt=performance.now();s=!1,g.delta=d?1e3/60:Math.max(Math.min(lt-g.timestamp,maxElapsed),1),g.timestamp=lt,g.isProcessing=!0,stepsOrder.forEach(c),g.isProcessing=!1,s&&a&&(d=!1,o(tt))},rt=()=>{s=!0,d=!0,g.isProcessing||o(tt)};return{schedule:stepsOrder.reduce((lt,ut)=>{const pt=_[ut];return lt[ut]=(mt,vt=!1,_t=!1)=>(s||rt(),pt.schedule(mt,vt,_t)),lt},{}),cancel:lt=>stepsOrder.forEach(ut=>_[ut].cancel(lt)),state:g,steps:_}}const{schedule:frame,cancel:cancelFrame,state:frameData,steps}=createRenderBatcher(typeof requestAnimationFrame<"u"?requestAnimationFrame:noop,!0),svgMotionConfig={useVisualState:makeUseVisualState({scrapeMotionValuesFromProps,createRenderState:createSvgRenderState,onMount:(o,a,{renderState:s,latestValues:d})=>{frame.read(()=>{try{s.dimensions=typeof a.getBBox=="function"?a.getBBox():a.getBoundingClientRect()}catch{s.dimensions={x:0,y:0,width:0,height:0}}}),frame.render(()=>{buildSVGAttrs(s,d,{enableHardwareAcceleration:!1},isSVGTag(a.tagName),o.transformTemplate),renderSVG(a,s)})}})},htmlMotionConfig={useVisualState:makeUseVisualState({scrapeMotionValuesFromProps:scrapeMotionValuesFromProps$1,createRenderState:createHtmlRenderState})};function createDomMotionConfig(o,{forwardMotionProps:a=!1},s,d){return{...isSVGComponent(o)?svgMotionConfig:htmlMotionConfig,preloadedFeatures:s,useRender:createUseRender(a),createVisualElement:d,Component:o}}function addDomEvent(o,a,s,d={passive:!0}){return o.addEventListener(a,s,d),()=>o.removeEventListener(a,s)}const isPrimaryPointer=o=>o.pointerType==="mouse"?typeof o.button!="number"||o.button<=0:o.isPrimary!==!1;function extractEventInfo(o,a="page"){return{point:{x:o[a+"X"],y:o[a+"Y"]}}}const addPointerInfo=o=>a=>isPrimaryPointer(a)&&o(a,extractEventInfo(a));function addPointerEvent(o,a,s,d){return addDomEvent(o,a,addPointerInfo(s),d)}const combineFunctions=(o,a)=>s=>a(o(s)),pipe=(...o)=>o.reduce(combineFunctions);function createLock(o){let a=null;return()=>{const s=()=>{a=null};return a===null?(a=o,s):!1}}const globalHorizontalLock=createLock("dragHorizontal"),globalVerticalLock=createLock("dragVertical");function getGlobalLock(o){let a=!1;if(o==="y")a=globalVerticalLock();else if(o==="x")a=globalHorizontalLock();else{const s=globalHorizontalLock(),d=globalVerticalLock();s&&d?a=()=>{s(),d()}:(s&&s(),d&&d())}return a}function isDragActive(){const o=getGlobalLock(!0);return o?(o(),!1):!0}class Feature{constructor(a){this.isMounted=!1,this.node=a}update(){}}function addHoverEvent(o,a){const s="pointer"+(a?"enter":"leave"),d="onHover"+(a?"Start":"End"),g=(_,c)=>{if(_.pointerType==="touch"||isDragActive())return;const tt=o.getProps();o.animationState&&tt.whileHover&&o.animationState.setActive("whileHover",a),tt[d]&&frame.update(()=>tt[d](_,c))};return addPointerEvent(o.current,s,g,{passive:!o.getProps()[d]})}class HoverGesture extends Feature{mount(){this.unmount=pipe(addHoverEvent(this.node,!0),addHoverEvent(this.node,!1))}unmount(){}}class FocusGesture extends Feature{constructor(){super(...arguments),this.isActive=!1}onFocus(){let a=!1;try{a=this.node.current.matches(":focus-visible")}catch{a=!0}!a||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=pipe(addDomEvent(this.node.current,"focus",()=>this.onFocus()),addDomEvent(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const isNodeOrChild=(o,a)=>a?o===a?!0:isNodeOrChild(o,a.parentElement):!1;function fireSyntheticPointerEvent(o,a){if(!a)return;const s=new PointerEvent("pointer"+o);a(s,extractEventInfo(s))}class PressGesture extends Feature{constructor(){super(...arguments),this.removeStartListeners=noop,this.removeEndListeners=noop,this.removeAccessibleListeners=noop,this.startPointerPress=(a,s)=>{if(this.removeEndListeners(),this.isPressing)return;const d=this.node.getProps(),_=addPointerEvent(window,"pointerup",(tt,rt)=>{if(!this.checkPressEnd())return;const{onTap:it,onTapCancel:st}=this.node.getProps();frame.update(()=>{isNodeOrChild(this.node.current,tt.target)?it&&it(tt,rt):st&&st(tt,rt)})},{passive:!(d.onTap||d.onPointerUp)}),c=addPointerEvent(window,"pointercancel",(tt,rt)=>this.cancelPress(tt,rt),{passive:!(d.onTapCancel||d.onPointerCancel)});this.removeEndListeners=pipe(_,c),this.startPress(a,s)},this.startAccessiblePress=()=>{const a=_=>{if(_.key!=="Enter"||this.isPressing)return;const c=tt=>{tt.key!=="Enter"||!this.checkPressEnd()||fireSyntheticPointerEvent("up",(rt,it)=>{const{onTap:st}=this.node.getProps();st&&frame.update(()=>st(rt,it))})};this.removeEndListeners(),this.removeEndListeners=addDomEvent(this.node.current,"keyup",c),fireSyntheticPointerEvent("down",(tt,rt)=>{this.startPress(tt,rt)})},s=addDomEvent(this.node.current,"keydown",a),d=()=>{this.isPressing&&fireSyntheticPointerEvent("cancel",(_,c)=>this.cancelPress(_,c))},g=addDomEvent(this.node.current,"blur",d);this.removeAccessibleListeners=pipe(s,g)}}startPress(a,s){this.isPressing=!0;const{onTapStart:d,whileTap:g}=this.node.getProps();g&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),d&&frame.update(()=>d(a,s))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!isDragActive()}cancelPress(a,s){if(!this.checkPressEnd())return;const{onTapCancel:d}=this.node.getProps();d&&frame.update(()=>d(a,s))}mount(){const a=this.node.getProps(),s=addPointerEvent(this.node.current,"pointerdown",this.startPointerPress,{passive:!(a.onTapStart||a.onPointerStart)}),d=addDomEvent(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=pipe(s,d)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const observerCallbacks=new WeakMap,observers=new WeakMap,fireObserverCallback=o=>{const a=observerCallbacks.get(o.target);a&&a(o)},fireAllObserverCallbacks=o=>{o.forEach(fireObserverCallback)};function initIntersectionObserver({root:o,...a}){const s=o||document;observers.has(s)||observers.set(s,{});const d=observers.get(s),g=JSON.stringify(a);return d[g]||(d[g]=new IntersectionObserver(fireAllObserverCallbacks,{root:o,...a})),d[g]}function observeIntersection(o,a,s){const d=initIntersectionObserver(a);return observerCallbacks.set(o,s),d.observe(o),()=>{observerCallbacks.delete(o),d.unobserve(o)}}const thresholdNames={some:0,all:1};class InViewFeature extends Feature{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:a={}}=this.node.getProps(),{root:s,margin:d,amount:g="some",once:_}=a,c={root:s?s.current:void 0,rootMargin:d,threshold:typeof g=="number"?g:thresholdNames[g]},tt=rt=>{const{isIntersecting:it}=rt;if(this.isInView===it||(this.isInView=it,_&&!it&&this.hasEnteredView))return;it&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",it);const{onViewportEnter:st,onViewportLeave:lt}=this.node.getProps(),ut=it?st:lt;ut&&ut(rt)};return observeIntersection(this.node.current,c,tt)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:a,prevProps:s}=this.node;["amount","margin","root"].some(hasViewportOptionChanged(a,s))&&this.startObserver()}unmount(){}}function hasViewportOptionChanged({viewport:o={}},{viewport:a={}}={}){return s=>o[s]!==a[s]}const gestureAnimations={inView:{Feature:InViewFeature},tap:{Feature:PressGesture},focus:{Feature:FocusGesture},hover:{Feature:HoverGesture}};function shallowCompare(o,a){if(!Array.isArray(a))return!1;const s=a.length;if(s!==o.length)return!1;for(let d=0;da[d]=s.get()),a}function getVelocity$1(o){const a={};return o.values.forEach((s,d)=>a[d]=s.getVelocity()),a}function resolveVariant(o,a,s){const d=o.getProps();return resolveVariantFromProps(d,a,s!==void 0?s:d.custom,getCurrent(o),getVelocity$1(o))}let invariant=noop;const secondsToMilliseconds=o=>o*1e3,millisecondsToSeconds=o=>o/1e3,instantAnimationState={current:!1},isBezierDefinition=o=>Array.isArray(o)&&typeof o[0]=="number";function isWaapiSupportedEasing(o){return!!(!o||typeof o=="string"&&supportedWaapiEasing[o]||isBezierDefinition(o)||Array.isArray(o)&&o.every(isWaapiSupportedEasing))}const cubicBezierAsString=([o,a,s,d])=>`cubic-bezier(${o}, ${a}, ${s}, ${d})`,supportedWaapiEasing={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:cubicBezierAsString([0,.65,.55,1]),circOut:cubicBezierAsString([.55,0,1,.45]),backIn:cubicBezierAsString([.31,.01,.66,-.59]),backOut:cubicBezierAsString([.33,1.53,.69,.99])};function mapEasingToNativeEasing(o){if(o)return isBezierDefinition(o)?cubicBezierAsString(o):Array.isArray(o)?o.map(mapEasingToNativeEasing):supportedWaapiEasing[o]}function animateStyle(o,a,s,{delay:d=0,duration:g,repeat:_=0,repeatType:c="loop",ease:tt,times:rt}={}){const it={[a]:s};rt&&(it.offset=rt);const st=mapEasingToNativeEasing(tt);return Array.isArray(st)&&(it.easing=st),o.animate(it,{delay:d,duration:g,easing:Array.isArray(st)?"linear":st,fill:"both",iterations:_+1,direction:c==="reverse"?"alternate":"normal"})}function getFinalKeyframe(o,{repeat:a,repeatType:s="loop"}){const d=a&&s!=="loop"&&a%2===1?0:o.length-1;return o[d]}const calcBezier=(o,a,s)=>(((1-3*s+3*a)*o+(3*s-6*a))*o+3*a)*o,subdivisionPrecision=1e-7,subdivisionMaxIterations=12;function binarySubdivide(o,a,s,d,g){let _,c,tt=0;do c=a+(s-a)/2,_=calcBezier(c,d,g)-o,_>0?s=c:a=c;while(Math.abs(_)>subdivisionPrecision&&++ttbinarySubdivide(_,0,1,o,s);return _=>_===0||_===1?_:calcBezier(g(_),a,d)}const easeIn=cubicBezier(.42,0,1,1),easeOut=cubicBezier(0,0,.58,1),easeInOut=cubicBezier(.42,0,.58,1),isEasingArray=o=>Array.isArray(o)&&typeof o[0]!="number",mirrorEasing=o=>a=>a<=.5?o(2*a)/2:(2-o(2*(1-a)))/2,reverseEasing=o=>a=>1-o(1-a),circIn=o=>1-Math.sin(Math.acos(o)),circOut=reverseEasing(circIn),circInOut=mirrorEasing(circIn),backOut=cubicBezier(.33,1.53,.69,.99),backIn=reverseEasing(backOut),backInOut=mirrorEasing(backIn),anticipate=o=>(o*=2)<1?.5*backIn(o):.5*(2-Math.pow(2,-10*(o-1))),easingLookup={linear:noop,easeIn,easeInOut,easeOut,circIn,circInOut,circOut,backIn,backInOut,backOut,anticipate},easingDefinitionToFunction=o=>{if(Array.isArray(o)){invariant(o.length===4);const[a,s,d,g]=o;return cubicBezier(a,s,d,g)}else if(typeof o=="string")return easingLookup[o];return o},isColorString=(o,a)=>s=>!!(isString(s)&&singleColorRegex.test(s)&&s.startsWith(o)||a&&Object.prototype.hasOwnProperty.call(s,a)),splitColor=(o,a,s)=>d=>{if(!isString(d))return d;const[g,_,c,tt]=d.match(floatRegex);return{[o]:parseFloat(g),[a]:parseFloat(_),[s]:parseFloat(c),alpha:tt!==void 0?parseFloat(tt):1}},clampRgbUnit=o=>clamp(0,255,o),rgbUnit={...number,transform:o=>Math.round(clampRgbUnit(o))},rgba={test:isColorString("rgb","red"),parse:splitColor("red","green","blue"),transform:({red:o,green:a,blue:s,alpha:d=1})=>"rgba("+rgbUnit.transform(o)+", "+rgbUnit.transform(a)+", "+rgbUnit.transform(s)+", "+sanitize(alpha.transform(d))+")"};function parseHex(o){let a="",s="",d="",g="";return o.length>5?(a=o.substring(1,3),s=o.substring(3,5),d=o.substring(5,7),g=o.substring(7,9)):(a=o.substring(1,2),s=o.substring(2,3),d=o.substring(3,4),g=o.substring(4,5),a+=a,s+=s,d+=d,g+=g),{red:parseInt(a,16),green:parseInt(s,16),blue:parseInt(d,16),alpha:g?parseInt(g,16)/255:1}}const hex={test:isColorString("#"),parse:parseHex,transform:rgba.transform},hsla={test:isColorString("hsl","hue"),parse:splitColor("hue","saturation","lightness"),transform:({hue:o,saturation:a,lightness:s,alpha:d=1})=>"hsla("+Math.round(o)+", "+percent.transform(sanitize(a))+", "+percent.transform(sanitize(s))+", "+sanitize(alpha.transform(d))+")"},color={test:o=>rgba.test(o)||hex.test(o)||hsla.test(o),parse:o=>rgba.test(o)?rgba.parse(o):hsla.test(o)?hsla.parse(o):hex.parse(o),transform:o=>isString(o)?o:o.hasOwnProperty("red")?rgba.transform(o):hsla.transform(o)},mix=(o,a,s)=>-s*o+s*a+o;function hueToRgb(o,a,s){return s<0&&(s+=1),s>1&&(s-=1),s<1/6?o+(a-o)*6*s:s<1/2?a:s<2/3?o+(a-o)*(2/3-s)*6:o}function hslaToRgba({hue:o,saturation:a,lightness:s,alpha:d}){o/=360,a/=100,s/=100;let g=0,_=0,c=0;if(!a)g=_=c=s;else{const tt=s<.5?s*(1+a):s+a-s*a,rt=2*s-tt;g=hueToRgb(rt,tt,o+1/3),_=hueToRgb(rt,tt,o),c=hueToRgb(rt,tt,o-1/3)}return{red:Math.round(g*255),green:Math.round(_*255),blue:Math.round(c*255),alpha:d}}const mixLinearColor=(o,a,s)=>{const d=o*o;return Math.sqrt(Math.max(0,s*(a*a-d)+d))},colorTypes=[hex,rgba,hsla],getColorType=o=>colorTypes.find(a=>a.test(o));function asRGBA(o){const a=getColorType(o);let s=a.parse(o);return a===hsla&&(s=hslaToRgba(s)),s}const mixColor=(o,a)=>{const s=asRGBA(o),d=asRGBA(a),g={...s};return _=>(g.red=mixLinearColor(s.red,d.red,_),g.green=mixLinearColor(s.green,d.green,_),g.blue=mixLinearColor(s.blue,d.blue,_),g.alpha=mix(s.alpha,d.alpha,_),rgba.transform(g))};function test(o){var a,s;return isNaN(o)&&isString(o)&&(((a=o.match(floatRegex))===null||a===void 0?void 0:a.length)||0)+(((s=o.match(colorRegex))===null||s===void 0?void 0:s.length)||0)>0}const cssVarTokeniser={regex:cssVariableRegex,countKey:"Vars",token:"${v}",parse:noop},colorTokeniser={regex:colorRegex,countKey:"Colors",token:"${c}",parse:color.parse},numberTokeniser={regex:floatRegex,countKey:"Numbers",token:"${n}",parse:number.parse};function tokenise(o,{regex:a,countKey:s,token:d,parse:g}){const _=o.tokenised.match(a);_&&(o["num"+s]=_.length,o.tokenised=o.tokenised.replace(a,d),o.values.push(..._.map(g)))}function analyseComplexValue(o){const a=o.toString(),s={value:a,tokenised:a,values:[],numVars:0,numColors:0,numNumbers:0};return s.value.includes("var(--")&&tokenise(s,cssVarTokeniser),tokenise(s,colorTokeniser),tokenise(s,numberTokeniser),s}function parseComplexValue(o){return analyseComplexValue(o).values}function createTransformer(o){const{values:a,numColors:s,numVars:d,tokenised:g}=analyseComplexValue(o),_=a.length;return c=>{let tt=g;for(let rt=0;rt<_;rt++)rttypeof o=="number"?0:o;function getAnimatableNone$1(o){const a=parseComplexValue(o);return createTransformer(o)(a.map(convertNumbersToZero))}const complex={test,parse:parseComplexValue,createTransformer,getAnimatableNone:getAnimatableNone$1},mixImmediate=(o,a)=>s=>`${s>0?a:o}`;function getMixer(o,a){return typeof o=="number"?s=>mix(o,a,s):color.test(o)?mixColor(o,a):o.startsWith("var(")?mixImmediate(o,a):mixComplex(o,a)}const mixArray=(o,a)=>{const s=[...o],d=s.length,g=o.map((_,c)=>getMixer(_,a[c]));return _=>{for(let c=0;c{const s={...o,...a},d={};for(const g in s)o[g]!==void 0&&a[g]!==void 0&&(d[g]=getMixer(o[g],a[g]));return g=>{for(const _ in d)s[_]=d[_](g);return s}},mixComplex=(o,a)=>{const s=complex.createTransformer(a),d=analyseComplexValue(o),g=analyseComplexValue(a);return d.numVars===g.numVars&&d.numColors===g.numColors&&d.numNumbers>=g.numNumbers?pipe(mixArray(d.values,g.values),s):mixImmediate(o,a)},progress=(o,a,s)=>{const d=a-o;return d===0?1:(s-o)/d},mixNumber=(o,a)=>s=>mix(o,a,s);function detectMixerFactory(o){return typeof o=="number"?mixNumber:typeof o=="string"?color.test(o)?mixColor:mixComplex:Array.isArray(o)?mixArray:typeof o=="object"?mixObject:mixNumber}function createMixers(o,a,s){const d=[],g=s||detectMixerFactory(o[0]),_=o.length-1;for(let c=0;c<_;c++){let tt=g(o[c],o[c+1]);if(a){const rt=Array.isArray(a)?a[c]||noop:a;tt=pipe(rt,tt)}d.push(tt)}return d}function interpolate(o,a,{clamp:s=!0,ease:d,mixer:g}={}){const _=o.length;if(invariant(_===a.length),_===1)return()=>a[0];o[0]>o[_-1]&&(o=[...o].reverse(),a=[...a].reverse());const c=createMixers(a,d,g),tt=c.length,rt=it=>{let st=0;if(tt>1)for(;strt(clamp(o[0],o[_-1],it)):rt}function fillOffset(o,a){const s=o[o.length-1];for(let d=1;d<=a;d++){const g=progress(0,a,d);o.push(mix(s,1,g))}}function defaultOffset(o){const a=[0];return fillOffset(a,o.length-1),a}function convertOffsetToTimes(o,a){return o.map(s=>s*a)}function defaultEasing(o,a){return o.map(()=>a||easeInOut).splice(0,o.length-1)}function keyframes({duration:o=300,keyframes:a,times:s,ease:d="easeInOut"}){const g=isEasingArray(d)?d.map(easingDefinitionToFunction):easingDefinitionToFunction(d),_={done:!1,value:a[0]},c=convertOffsetToTimes(s&&s.length===a.length?s:defaultOffset(a),o),tt=interpolate(c,a,{ease:Array.isArray(g)?g:defaultEasing(a,g)});return{calculatedDuration:o,next:rt=>(_.value=tt(rt),_.done=rt>=o,_)}}function velocityPerSecond(o,a){return a?o*(1e3/a):0}const velocitySampleDuration=5;function calcGeneratorVelocity(o,a,s){const d=Math.max(a-velocitySampleDuration,0);return velocityPerSecond(s-o(d),a-d)}const safeMin=.001,minDuration=.01,maxDuration$1=10,minDamping=.05,maxDamping=1;function findSpring({duration:o=800,bounce:a=.25,velocity:s=0,mass:d=1}){let g,_,c=1-a;c=clamp(minDamping,maxDamping,c),o=clamp(minDuration,maxDuration$1,millisecondsToSeconds(o)),c<1?(g=it=>{const st=it*c,lt=st*o,ut=st-s,pt=calcAngularFreq(it,c),mt=Math.exp(-lt);return safeMin-ut/pt*mt},_=it=>{const lt=it*c*o,ut=lt*s+s,pt=Math.pow(c,2)*Math.pow(it,2)*o,mt=Math.exp(-lt),vt=calcAngularFreq(Math.pow(it,2),c);return(-g(it)+safeMin>0?-1:1)*((ut-pt)*mt)/vt}):(g=it=>{const st=Math.exp(-it*o),lt=(it-s)*o+1;return-safeMin+st*lt},_=it=>{const st=Math.exp(-it*o),lt=(s-it)*(o*o);return st*lt});const tt=5/o,rt=approximateRoot(g,_,tt);if(o=secondsToMilliseconds(o),isNaN(rt))return{stiffness:100,damping:10,duration:o};{const it=Math.pow(rt,2)*d;return{stiffness:it,damping:c*2*Math.sqrt(d*it),duration:o}}}const rootIterations=12;function approximateRoot(o,a,s){let d=s;for(let g=1;go[s]!==void 0)}function getSpringOptions(o){let a={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...o};if(!isSpringType(o,physicsKeys)&&isSpringType(o,durationKeys)){const s=findSpring(o);a={...a,...s,mass:1},a.isResolvedFromDuration=!0}return a}function spring({keyframes:o,restDelta:a,restSpeed:s,...d}){const g=o[0],_=o[o.length-1],c={done:!1,value:g},{stiffness:tt,damping:rt,mass:it,duration:st,velocity:lt,isResolvedFromDuration:ut}=getSpringOptions({...d,velocity:-millisecondsToSeconds(d.velocity||0)}),pt=lt||0,mt=rt/(2*Math.sqrt(tt*it)),vt=_-g,_t=millisecondsToSeconds(Math.sqrt(tt/it)),dt=Math.abs(vt)<5;s||(s=dt?.01:2),a||(a=dt?.005:.5);let ct;if(mt<1){const ht=calcAngularFreq(_t,mt);ct=wt=>{const St=Math.exp(-mt*_t*wt);return _-St*((pt+mt*_t*vt)/ht*Math.sin(ht*wt)+vt*Math.cos(ht*wt))}}else if(mt===1)ct=ht=>_-Math.exp(-_t*ht)*(vt+(pt+_t*vt)*ht);else{const ht=_t*Math.sqrt(mt*mt-1);ct=wt=>{const St=Math.exp(-mt*_t*wt),xt=Math.min(ht*wt,300);return _-St*((pt+mt*_t*vt)*Math.sinh(xt)+ht*vt*Math.cosh(xt))/ht}}return{calculatedDuration:ut&&st||null,next:ht=>{const wt=ct(ht);if(ut)c.done=ht>=st;else{let St=pt;ht!==0&&(mt<1?St=calcGeneratorVelocity(ct,ht,wt):St=0);const xt=Math.abs(St)<=s,Et=Math.abs(_-wt)<=a;c.done=xt&&Et}return c.value=c.done?_:wt,c}}}function inertia({keyframes:o,velocity:a=0,power:s=.8,timeConstant:d=325,bounceDamping:g=10,bounceStiffness:_=500,modifyTarget:c,min:tt,max:rt,restDelta:it=.5,restSpeed:st}){const lt=o[0],ut={done:!1,value:lt},pt=Tt=>tt!==void 0&&Ttrt,mt=Tt=>tt===void 0?rt:rt===void 0||Math.abs(tt-Tt)-vt*Math.exp(-Tt/d),ht=Tt=>dt+ct(Tt),wt=Tt=>{const $t=ct(Tt),Bt=ht(Tt);ut.done=Math.abs($t)<=it,ut.value=ut.done?dt:Bt};let St,xt;const Et=Tt=>{pt(ut.value)&&(St=Tt,xt=spring({keyframes:[ut.value,mt(ut.value)],velocity:calcGeneratorVelocity(ht,Tt,ut.value),damping:g,stiffness:_,restDelta:it,restSpeed:st}))};return Et(0),{calculatedDuration:null,next:Tt=>{let $t=!1;return!xt&&St===void 0&&($t=!0,wt(Tt),Et(Tt)),St!==void 0&&Tt>St?xt.next(Tt-St):(!$t&&wt(Tt),ut)}}}const frameloopDriver=o=>{const a=({timestamp:s})=>o(s);return{start:()=>frame.update(a,!0),stop:()=>cancelFrame(a),now:()=>frameData.isProcessing?frameData.timestamp:performance.now()}},maxGeneratorDuration=2e4;function calcGeneratorDuration(o){let a=0;const s=50;let d=o.next(a);for(;!d.done&&a=maxGeneratorDuration?1/0:a}const types={decay:inertia,inertia,tween:keyframes,keyframes,spring};function animateValue({autoplay:o=!0,delay:a=0,driver:s=frameloopDriver,keyframes:d,type:g="keyframes",repeat:_=0,repeatDelay:c=0,repeatType:tt="loop",onPlay:rt,onStop:it,onComplete:st,onUpdate:lt,...ut}){let pt=1,mt=!1,vt,_t;const dt=()=>{_t=new Promise(Nt=>{vt=Nt})};dt();let ct;const ht=types[g]||keyframes;let wt;ht!==keyframes&&typeof d[0]!="number"&&(wt=interpolate([0,100],d,{clamp:!1}),d=[0,100]);const St=ht({...ut,keyframes:d});let xt;tt==="mirror"&&(xt=ht({...ut,keyframes:[...d].reverse(),velocity:-(ut.velocity||0)}));let Et="idle",Tt=null,$t=null,Bt=null;St.calculatedDuration===null&&_&&(St.calculatedDuration=calcGeneratorDuration(St));const{calculatedDuration:Ht}=St;let tn=1/0,Xt=1/0;Ht!==null&&(tn=Ht+c,Xt=tn*(_+1)-c);let on=0;const fn=Nt=>{if($t===null)return;pt>0&&($t=Math.min($t,Nt)),pt<0&&($t=Math.min(Nt-Xt/pt,$t)),Tt!==null?on=Tt:on=Math.round(Nt-$t)*pt;const jt=on-a*(pt>=0?1:-1),kt=pt>=0?jt<0:jt>Xt;on=Math.max(jt,0),Et==="finished"&&Tt===null&&(on=Xt);let Mt=on,Ut=St;if(_){const Tn=Math.min(on,Xt)/tn;let xn=Math.floor(Tn),wn=Tn%1;!wn&&Tn>=1&&(wn=1),wn===1&&xn--,xn=Math.min(xn,_+1),!!(xn%2)&&(tt==="reverse"?(wn=1-wn,c&&(wn-=c/tn)):tt==="mirror"&&(Ut=xt)),Mt=clamp(0,1,wn)*tn}const Jt=kt?{done:!1,value:d[0]}:Ut.next(Mt);wt&&(Jt.value=wt(Jt.value));let{done:gn}=Jt;!kt&&Ht!==null&&(gn=pt>=0?on>=Xt:on<=0);const Dn=Tt===null&&(Et==="finished"||Et==="running"&&gn);return lt&<(Jt.value),Dn&&Pt(),Jt},un=()=>{ct&&ct.stop(),ct=void 0},Ot=()=>{Et="idle",un(),vt(),dt(),$t=Bt=null},Pt=()=>{Et="finished",st&&st(),un(),vt()},Gt=()=>{if(mt)return;ct||(ct=s(fn));const Nt=ct.now();rt&&rt(),Tt!==null?$t=Nt-Tt:(!$t||Et==="finished")&&($t=Nt),Et==="finished"&&dt(),Bt=$t,Tt=null,Et="running",ct.start()};o&&Gt();const Kt={then(Nt,jt){return _t.then(Nt,jt)},get time(){return millisecondsToSeconds(on)},set time(Nt){Nt=secondsToMilliseconds(Nt),on=Nt,Tt!==null||!ct||pt===0?Tt=Nt:$t=ct.now()-Nt/pt},get duration(){const Nt=St.calculatedDuration===null?calcGeneratorDuration(St):St.calculatedDuration;return millisecondsToSeconds(Nt)},get speed(){return pt},set speed(Nt){Nt===pt||!ct||(pt=Nt,Kt.time=millisecondsToSeconds(on))},get state(){return Et},play:Gt,pause:()=>{Et="paused",Tt=on},stop:()=>{mt=!0,Et!=="idle"&&(Et="idle",it&&it(),Ot())},cancel:()=>{Bt!==null&&fn(Bt),Ot()},complete:()=>{Et="finished"},sample:Nt=>($t=0,fn(Nt))};return Kt}function memo(o){let a;return()=>(a===void 0&&(a=o()),a)}const supportsWaapi=memo(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),acceleratedValues=new Set(["opacity","clipPath","filter","transform","backgroundColor"]),sampleDelta=10,maxDuration=2e4,requiresPregeneratedKeyframes=(o,a)=>a.type==="spring"||o==="backgroundColor"||!isWaapiSupportedEasing(a.ease);function createAcceleratedAnimation(o,a,{onUpdate:s,onComplete:d,...g}){if(!(supportsWaapi()&&acceleratedValues.has(a)&&!g.repeatDelay&&g.repeatType!=="mirror"&&g.damping!==0&&g.type!=="inertia"))return!1;let c=!1,tt,rt,it=!1;const st=()=>{rt=new Promise(ht=>{tt=ht})};st();let{keyframes:lt,duration:ut=300,ease:pt,times:mt}=g;if(requiresPregeneratedKeyframes(a,g)){const ht=animateValue({...g,repeat:0,delay:0});let wt={done:!1,value:lt[0]};const St=[];let xt=0;for(;!wt.done&&xt{it=!1,vt.cancel()},dt=()=>{it=!0,frame.update(_t),tt(),st()};return vt.onfinish=()=>{it||(o.set(getFinalKeyframe(lt,g)),d&&d(),dt())},{then(ht,wt){return rt.then(ht,wt)},attachTimeline(ht){return vt.timeline=ht,vt.onfinish=null,noop},get time(){return millisecondsToSeconds(vt.currentTime||0)},set time(ht){vt.currentTime=secondsToMilliseconds(ht)},get speed(){return vt.playbackRate},set speed(ht){vt.playbackRate=ht},get duration(){return millisecondsToSeconds(ut)},play:()=>{c||(vt.play(),cancelFrame(_t))},pause:()=>vt.pause(),stop:()=>{if(c=!0,vt.playState==="idle")return;const{currentTime:ht}=vt;if(ht){const wt=animateValue({...g,autoplay:!1});o.setWithVelocity(wt.sample(ht-sampleDelta).value,wt.sample(ht).value,sampleDelta)}dt()},complete:()=>{it||vt.finish()},cancel:dt}}function createInstantAnimation({keyframes:o,delay:a,onUpdate:s,onComplete:d}){const g=()=>(s&&s(o[o.length-1]),d&&d(),{time:0,speed:1,duration:0,play:noop,pause:noop,stop:noop,then:_=>(_(),Promise.resolve()),cancel:noop,complete:noop});return a?animateValue({keyframes:[0,1],duration:0,delay:a,onComplete:g}):g()}const underDampedSpring={type:"spring",stiffness:500,damping:25,restSpeed:10},criticallyDampedSpring=o=>({type:"spring",stiffness:550,damping:o===0?2*Math.sqrt(550):30,restSpeed:10}),keyframesTransition={type:"keyframes",duration:.8},ease={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},getDefaultTransition=(o,{keyframes:a})=>a.length>2?keyframesTransition:transformProps.has(o)?o.startsWith("scale")?criticallyDampedSpring(a[1]):underDampedSpring:ease,isAnimatable=(o,a)=>o==="zIndex"?!1:!!(typeof a=="number"||Array.isArray(a)||typeof a=="string"&&(complex.test(a)||a==="0")&&!a.startsWith("url(")),maxDefaults=new Set(["brightness","contrast","saturate","opacity"]);function applyDefaultFilter(o){const[a,s]=o.slice(0,-1).split("(");if(a==="drop-shadow")return o;const[d]=s.match(floatRegex)||[];if(!d)return o;const g=s.replace(d,"");let _=maxDefaults.has(a)?1:0;return d!==s&&(_*=100),a+"("+_+g+")"}const functionRegex=/([a-z-]*)\(.*?\)/g,filter={...complex,getAnimatableNone:o=>{const a=o.match(functionRegex);return a?a.map(applyDefaultFilter).join(" "):o}},defaultValueTypes={...numberValueTypes,color,backgroundColor:color,outlineColor:color,fill:color,stroke:color,borderColor:color,borderTopColor:color,borderRightColor:color,borderBottomColor:color,borderLeftColor:color,filter,WebkitFilter:filter},getDefaultValueType=o=>defaultValueTypes[o];function getAnimatableNone(o,a){let s=getDefaultValueType(o);return s!==filter&&(s=complex),s.getAnimatableNone?s.getAnimatableNone(a):void 0}const isZeroValueString=o=>/^0[^.\s]+$/.test(o);function isNone(o){if(typeof o=="number")return o===0;if(o!==null)return o==="none"||o==="0"||isZeroValueString(o)}function getKeyframes(o,a,s,d){const g=isAnimatable(a,s);let _;Array.isArray(s)?_=[...s]:_=[null,s];const c=d.from!==void 0?d.from:o.get();let tt;const rt=[];for(let it=0;it<_.length;it++)_[it]===null&&(_[it]=it===0?c:_[it-1]),isNone(_[it])&&rt.push(it),typeof _[it]=="string"&&_[it]!=="none"&&_[it]!=="0"&&(tt=_[it]);if(g&&rt.length&&tt)for(let it=0;itg=>{const _=getValueTransition(d,o)||{},c=_.delay||d.delay||0;let{elapsed:tt=0}=d;tt=tt-secondsToMilliseconds(c);const rt=getKeyframes(a,o,s,_),it=rt[0],st=rt[rt.length-1],lt=isAnimatable(o,it),ut=isAnimatable(o,st);let pt={keyframes:rt,velocity:a.getVelocity(),ease:"easeOut",..._,delay:-tt,onUpdate:mt=>{a.set(mt),_.onUpdate&&_.onUpdate(mt)},onComplete:()=>{g(),_.onComplete&&_.onComplete()}};if(isTransitionDefined(_)||(pt={...pt,...getDefaultTransition(o,pt)}),pt.duration&&(pt.duration=secondsToMilliseconds(pt.duration)),pt.repeatDelay&&(pt.repeatDelay=secondsToMilliseconds(pt.repeatDelay)),!lt||!ut||instantAnimationState.current||_.type===!1||MotionGlobalConfig.skipAnimations)return createInstantAnimation(pt);if(!d.isHandoff&&a.owner&&a.owner.current instanceof HTMLElement&&!a.owner.getProps().onUpdate){const mt=createAcceleratedAnimation(a,o,pt);if(mt)return mt}return animateValue(pt)};function isWillChangeMotionValue(o){return!!(isMotionValue(o)&&o.add)}const isNumericalString=o=>/^\-?\d*\.?\d+$/.test(o);function addUniqueItem(o,a){o.indexOf(a)===-1&&o.push(a)}function removeItem(o,a){const s=o.indexOf(a);s>-1&&o.splice(s,1)}class SubscriptionManager{constructor(){this.subscriptions=[]}add(a){return addUniqueItem(this.subscriptions,a),()=>removeItem(this.subscriptions,a)}notify(a,s,d){const g=this.subscriptions.length;if(g)if(g===1)this.subscriptions[0](a,s,d);else for(let _=0;_!isNaN(parseFloat(o));class MotionValue{constructor(a,s={}){this.version="10.17.9",this.timeDelta=0,this.lastUpdated=0,this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(d,g=!0)=>{this.prev=this.current,this.current=d;const{delta:_,timestamp:c}=frameData;this.lastUpdated!==c&&(this.timeDelta=_,this.lastUpdated=c,frame.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.events.change&&this.events.change.notify(this.current),this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()),g&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.scheduleVelocityCheck=()=>frame.postRender(this.velocityCheck),this.velocityCheck=({timestamp:d})=>{d!==this.lastUpdated&&(this.prev=this.current,this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=a,this.canTrackVelocity=isFloat(this.current),this.owner=s.owner}onChange(a){return this.on("change",a)}on(a,s){this.events[a]||(this.events[a]=new SubscriptionManager);const d=this.events[a].add(s);return a==="change"?()=>{d(),frame.read(()=>{this.events.change.getSize()||this.stop()})}:d}clearListeners(){for(const a in this.events)this.events[a].clear()}attach(a,s){this.passiveEffect=a,this.stopPassiveEffect=s}set(a,s=!0){!s||!this.passiveEffect?this.updateAndNotify(a,s):this.passiveEffect(a,this.updateAndNotify)}setWithVelocity(a,s,d){this.set(s),this.prev=a,this.timeDelta=d}jump(a){this.updateAndNotify(a),this.prev=a,this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?velocityPerSecond(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(a){return this.stop(),new Promise(s=>{this.hasAnimated=!0,this.animation=a(s),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function motionValue(o,a){return new MotionValue(o,a)}const testValueType=o=>a=>a.test(o),auto={test:o=>o==="auto",parse:o=>o},dimensionValueTypes=[number,px,percent,degrees,vw,vh,auto],findDimensionValueType=o=>dimensionValueTypes.find(testValueType(o)),valueTypes=[...dimensionValueTypes,color,complex],findValueType=o=>valueTypes.find(testValueType(o));function setMotionValue(o,a,s){o.hasValue(a)?o.getValue(a).set(s):o.addValue(a,motionValue(s))}function setTarget(o,a){const s=resolveVariant(o,a);let{transitionEnd:d={},transition:g={},..._}=s?o.makeTargetAnimatable(s,!1):{};_={..._,...d};for(const c in _){const tt=resolveFinalValueInKeyframes(_[c]);setMotionValue(o,c,tt)}}function checkTargetForNewValues(o,a,s){var d,g;const _=Object.keys(a).filter(tt=>!o.hasValue(tt)),c=_.length;if(c)for(let tt=0;ttrt.remove(lt))),it.push(_t)}return c&&Promise.all(it).then(()=>{c&&setTarget(o,c)}),it}function animateVariant(o,a,s={}){const d=resolveVariant(o,a,s.custom);let{transition:g=o.getDefaultTransition()||{}}=d||{};s.transitionOverride&&(g=s.transitionOverride);const _=d?()=>Promise.all(animateTarget(o,d,s)):()=>Promise.resolve(),c=o.variantChildren&&o.variantChildren.size?(rt=0)=>{const{delayChildren:it=0,staggerChildren:st,staggerDirection:lt}=g;return animateChildren(o,a,it+rt,st,lt,s)}:()=>Promise.resolve(),{when:tt}=g;if(tt){const[rt,it]=tt==="beforeChildren"?[_,c]:[c,_];return rt().then(()=>it())}else return Promise.all([_(),c(s.delay)])}function animateChildren(o,a,s=0,d=0,g=1,_){const c=[],tt=(o.variantChildren.size-1)*d,rt=g===1?(it=0)=>it*d:(it=0)=>tt-it*d;return Array.from(o.variantChildren).sort(sortByTreeOrder).forEach((it,st)=>{it.notify("AnimationStart",a),c.push(animateVariant(it,a,{..._,delay:s+rt(st)}).then(()=>it.notify("AnimationComplete",a)))}),Promise.all(c)}function sortByTreeOrder(o,a){return o.sortNodePosition(a)}function animateVisualElement(o,a,s={}){o.notify("AnimationStart",a);let d;if(Array.isArray(a)){const g=a.map(_=>animateVariant(o,_,s));d=Promise.all(g)}else if(typeof a=="string")d=animateVariant(o,a,s);else{const g=typeof a=="function"?resolveVariant(o,a,s.custom):a;d=Promise.all(animateTarget(o,g,s))}return d.then(()=>o.notify("AnimationComplete",a))}const reversePriorityOrder=[...variantPriorityOrder].reverse(),numAnimationTypes=variantPriorityOrder.length;function animateList(o){return a=>Promise.all(a.map(({animation:s,options:d})=>animateVisualElement(o,s,d)))}function createAnimationState(o){let a=animateList(o);const s=createState();let d=!0;const g=(rt,it)=>{const st=resolveVariant(o,it);if(st){const{transition:lt,transitionEnd:ut,...pt}=st;rt={...rt,...pt,...ut}}return rt};function _(rt){a=rt(o)}function c(rt,it){const st=o.getProps(),lt=o.getVariantContext(!0)||{},ut=[],pt=new Set;let mt={},vt=1/0;for(let dt=0;dtvt&&St,Bt=!1;const Ht=Array.isArray(wt)?wt:[wt];let tn=Ht.reduce(g,{});xt===!1&&(tn={});const{prevResolvedValues:Xt={}}=ht,on={...Xt,...tn},fn=un=>{$t=!0,pt.has(un)&&(Bt=!0,pt.delete(un)),ht.needsAnimating[un]=!0};for(const un in on){const Ot=tn[un],Pt=Xt[un];if(mt.hasOwnProperty(un))continue;let Gt=!1;isKeyframesTarget(Ot)&&isKeyframesTarget(Pt)?Gt=!shallowCompare(Ot,Pt):Gt=Ot!==Pt,Gt?Ot!==void 0?fn(un):pt.add(un):Ot!==void 0&&pt.has(un)?fn(un):ht.protectedKeys[un]=!0}ht.prevProp=wt,ht.prevResolvedValues=tn,ht.isActive&&(mt={...mt,...tn}),d&&o.blockInitialAnimation&&($t=!1),$t&&(!Et||Bt)&&ut.push(...Ht.map(un=>({animation:un,options:{type:ct,...rt}})))}if(pt.size){const dt={};pt.forEach(ct=>{const ht=o.getBaseTarget(ct);ht!==void 0&&(dt[ct]=ht)}),ut.push({animation:dt})}let _t=!!ut.length;return d&&(st.initial===!1||st.initial===st.animate)&&!o.manuallyAnimateOnMount&&(_t=!1),d=!1,_t?a(ut):Promise.resolve()}function tt(rt,it,st){var lt;if(s[rt].isActive===it)return Promise.resolve();(lt=o.variantChildren)===null||lt===void 0||lt.forEach(pt=>{var mt;return(mt=pt.animationState)===null||mt===void 0?void 0:mt.setActive(rt,it)}),s[rt].isActive=it;const ut=c(st,rt);for(const pt in s)s[pt].protectedKeys={};return ut}return{animateChanges:c,setActive:tt,setAnimateFunction:_,getState:()=>s}}function checkVariantsDidChange(o,a){return typeof a=="string"?a!==o:Array.isArray(a)?!shallowCompare(a,o):!1}function createTypeState(o=!1){return{isActive:o,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function createState(){return{animate:createTypeState(!0),whileInView:createTypeState(),whileHover:createTypeState(),whileTap:createTypeState(),whileDrag:createTypeState(),whileFocus:createTypeState(),exit:createTypeState()}}class AnimationFeature extends Feature{constructor(a){super(a),a.animationState||(a.animationState=createAnimationState(a))}updateAnimationControlsSubscription(){const{animate:a}=this.node.getProps();this.unmount(),isAnimationControls(a)&&(this.unmount=a.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:a}=this.node.getProps(),{animate:s}=this.node.prevProps||{};a!==s&&this.updateAnimationControlsSubscription()}unmount(){}}let id$1=0;class ExitAnimationFeature extends Feature{constructor(){super(...arguments),this.id=id$1++}update(){if(!this.node.presenceContext)return;const{isPresent:a,onExitComplete:s,custom:d}=this.node.presenceContext,{isPresent:g}=this.node.prevPresenceContext||{};if(!this.node.animationState||a===g)return;const _=this.node.animationState.setActive("exit",!a,{custom:d??this.node.getProps().custom});s&&!a&&_.then(()=>s(this.id))}mount(){const{register:a}=this.node.presenceContext||{};a&&(this.unmount=a(this.id))}unmount(){}}const animations={animation:{Feature:AnimationFeature},exit:{Feature:ExitAnimationFeature}},distance=(o,a)=>Math.abs(o-a);function distance2D(o,a){const s=distance(o.x,a.x),d=distance(o.y,a.y);return Math.sqrt(s**2+d**2)}class PanSession{constructor(a,s,{transformPagePoint:d,contextWindow:g,dragSnapToOrigin:_=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const lt=getPanInfo(this.lastMoveEventInfo,this.history),ut=this.startEvent!==null,pt=distance2D(lt.offset,{x:0,y:0})>=3;if(!ut&&!pt)return;const{point:mt}=lt,{timestamp:vt}=frameData;this.history.push({...mt,timestamp:vt});const{onStart:_t,onMove:dt}=this.handlers;ut||(_t&&_t(this.lastMoveEvent,lt),this.startEvent=this.lastMoveEvent),dt&&dt(this.lastMoveEvent,lt)},this.handlePointerMove=(lt,ut)=>{this.lastMoveEvent=lt,this.lastMoveEventInfo=transformPoint(ut,this.transformPagePoint),frame.update(this.updatePoint,!0)},this.handlePointerUp=(lt,ut)=>{this.end();const{onEnd:pt,onSessionEnd:mt,resumeAnimation:vt}=this.handlers;if(this.dragSnapToOrigin&&vt&&vt(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const _t=getPanInfo(lt.type==="pointercancel"?this.lastMoveEventInfo:transformPoint(ut,this.transformPagePoint),this.history);this.startEvent&&pt&&pt(lt,_t),mt&&mt(lt,_t)},!isPrimaryPointer(a))return;this.dragSnapToOrigin=_,this.handlers=s,this.transformPagePoint=d,this.contextWindow=g||window;const c=extractEventInfo(a),tt=transformPoint(c,this.transformPagePoint),{point:rt}=tt,{timestamp:it}=frameData;this.history=[{...rt,timestamp:it}];const{onSessionStart:st}=s;st&&st(a,getPanInfo(tt,this.history)),this.removeListeners=pipe(addPointerEvent(this.contextWindow,"pointermove",this.handlePointerMove),addPointerEvent(this.contextWindow,"pointerup",this.handlePointerUp),addPointerEvent(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(a){this.handlers=a}end(){this.removeListeners&&this.removeListeners(),cancelFrame(this.updatePoint)}}function transformPoint(o,a){return a?{point:a(o.point)}:o}function subtractPoint(o,a){return{x:o.x-a.x,y:o.y-a.y}}function getPanInfo({point:o},a){return{point:o,delta:subtractPoint(o,lastDevicePoint(a)),offset:subtractPoint(o,startDevicePoint(a)),velocity:getVelocity(a,.1)}}function startDevicePoint(o){return o[0]}function lastDevicePoint(o){return o[o.length-1]}function getVelocity(o,a){if(o.length<2)return{x:0,y:0};let s=o.length-1,d=null;const g=lastDevicePoint(o);for(;s>=0&&(d=o[s],!(g.timestamp-d.timestamp>secondsToMilliseconds(a)));)s--;if(!d)return{x:0,y:0};const _=millisecondsToSeconds(g.timestamp-d.timestamp);if(_===0)return{x:0,y:0};const c={x:(g.x-d.x)/_,y:(g.y-d.y)/_};return c.x===1/0&&(c.x=0),c.y===1/0&&(c.y=0),c}function calcLength(o){return o.max-o.min}function isNear(o,a=0,s=.01){return Math.abs(o-a)<=s}function calcAxisDelta(o,a,s,d=.5){o.origin=d,o.originPoint=mix(a.min,a.max,o.origin),o.scale=calcLength(s)/calcLength(a),(isNear(o.scale,1,1e-4)||isNaN(o.scale))&&(o.scale=1),o.translate=mix(s.min,s.max,o.origin)-o.originPoint,(isNear(o.translate)||isNaN(o.translate))&&(o.translate=0)}function calcBoxDelta(o,a,s,d){calcAxisDelta(o.x,a.x,s.x,d?d.originX:void 0),calcAxisDelta(o.y,a.y,s.y,d?d.originY:void 0)}function calcRelativeAxis(o,a,s){o.min=s.min+a.min,o.max=o.min+calcLength(a)}function calcRelativeBox(o,a,s){calcRelativeAxis(o.x,a.x,s.x),calcRelativeAxis(o.y,a.y,s.y)}function calcRelativeAxisPosition(o,a,s){o.min=a.min-s.min,o.max=o.min+calcLength(a)}function calcRelativePosition(o,a,s){calcRelativeAxisPosition(o.x,a.x,s.x),calcRelativeAxisPosition(o.y,a.y,s.y)}function applyConstraints(o,{min:a,max:s},d){return a!==void 0&&os&&(o=d?mix(s,o,d.max):Math.min(o,s)),o}function calcRelativeAxisConstraints(o,a,s){return{min:a!==void 0?o.min+a:void 0,max:s!==void 0?o.max+s-(o.max-o.min):void 0}}function calcRelativeConstraints(o,{top:a,left:s,bottom:d,right:g}){return{x:calcRelativeAxisConstraints(o.x,s,g),y:calcRelativeAxisConstraints(o.y,a,d)}}function calcViewportAxisConstraints(o,a){let s=a.min-o.min,d=a.max-o.max;return a.max-a.mind?s=progress(a.min,a.max-d,o.min):d>g&&(s=progress(o.min,o.max-g,a.min)),clamp(0,1,s)}function rebaseAxisConstraints(o,a){const s={};return a.min!==void 0&&(s.min=a.min-o.min),a.max!==void 0&&(s.max=a.max-o.min),s}const defaultElastic=.35;function resolveDragElastic(o=defaultElastic){return o===!1?o=0:o===!0&&(o=defaultElastic),{x:resolveAxisElastic(o,"left","right"),y:resolveAxisElastic(o,"top","bottom")}}function resolveAxisElastic(o,a,s){return{min:resolvePointElastic(o,a),max:resolvePointElastic(o,s)}}function resolvePointElastic(o,a){return typeof o=="number"?o:o[a]||0}const createAxisDelta=()=>({translate:0,scale:1,origin:0,originPoint:0}),createDelta=()=>({x:createAxisDelta(),y:createAxisDelta()}),createAxis=()=>({min:0,max:0}),createBox=()=>({x:createAxis(),y:createAxis()});function eachAxis(o){return[o("x"),o("y")]}function convertBoundingBoxToBox({top:o,left:a,right:s,bottom:d}){return{x:{min:a,max:s},y:{min:o,max:d}}}function convertBoxToBoundingBox({x:o,y:a}){return{top:a.min,right:o.max,bottom:a.max,left:o.min}}function transformBoxPoints(o,a){if(!a)return o;const s=a({x:o.left,y:o.top}),d=a({x:o.right,y:o.bottom});return{top:s.y,left:s.x,bottom:d.y,right:d.x}}function isIdentityScale(o){return o===void 0||o===1}function hasScale({scale:o,scaleX:a,scaleY:s}){return!isIdentityScale(o)||!isIdentityScale(a)||!isIdentityScale(s)}function hasTransform(o){return hasScale(o)||has2DTranslate(o)||o.z||o.rotate||o.rotateX||o.rotateY}function has2DTranslate(o){return is2DTranslate(o.x)||is2DTranslate(o.y)}function is2DTranslate(o){return o&&o!=="0%"}function scalePoint(o,a,s){const d=o-s,g=a*d;return s+g}function applyPointDelta(o,a,s,d,g){return g!==void 0&&(o=scalePoint(o,g,d)),scalePoint(o,s,d)+a}function applyAxisDelta(o,a=0,s=1,d,g){o.min=applyPointDelta(o.min,a,s,d,g),o.max=applyPointDelta(o.max,a,s,d,g)}function applyBoxDelta(o,{x:a,y:s}){applyAxisDelta(o.x,a.translate,a.scale,a.originPoint),applyAxisDelta(o.y,s.translate,s.scale,s.originPoint)}function applyTreeDeltas(o,a,s,d=!1){const g=s.length;if(!g)return;a.x=a.y=1;let _,c;for(let tt=0;tt1.0000000000001||o<.999999999999?o:1}function translateAxis(o,a){o.min=o.min+a,o.max=o.max+a}function transformAxis(o,a,[s,d,g]){const _=a[g]!==void 0?a[g]:.5,c=mix(o.min,o.max,_);applyAxisDelta(o,a[s],a[d],c,a.scale)}const xKeys$1=["x","scaleX","originX"],yKeys$1=["y","scaleY","originY"];function transformBox(o,a){transformAxis(o.x,a,xKeys$1),transformAxis(o.y,a,yKeys$1)}function measureViewportBox(o,a){return convertBoundingBoxToBox(transformBoxPoints(o.getBoundingClientRect(),a))}function measurePageBox(o,a,s){const d=measureViewportBox(o,s),{scroll:g}=a;return g&&(translateAxis(d.x,g.offset.x),translateAxis(d.y,g.offset.y)),d}const getContextWindow=({current:o})=>o?o.ownerDocument.defaultView:null,elementDragControls=new WeakMap;class VisualElementDragControls{constructor(a){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=createBox(),this.visualElement=a}start(a,{snapToCursor:s=!1}={}){const{presenceContext:d}=this.visualElement;if(d&&d.isPresent===!1)return;const g=st=>{const{dragSnapToOrigin:lt}=this.getProps();lt?this.pauseAnimation():this.stopAnimation(),s&&this.snapToCursor(extractEventInfo(st,"page").point)},_=(st,lt)=>{const{drag:ut,dragPropagation:pt,onDragStart:mt}=this.getProps();if(ut&&!pt&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=getGlobalLock(ut),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),eachAxis(_t=>{let dt=this.getAxisMotionValue(_t).get()||0;if(percent.test(dt)){const{projection:ct}=this.visualElement;if(ct&&ct.layout){const ht=ct.layout.layoutBox[_t];ht&&(dt=calcLength(ht)*(parseFloat(dt)/100))}}this.originPoint[_t]=dt}),mt&&frame.update(()=>mt(st,lt),!1,!0);const{animationState:vt}=this.visualElement;vt&&vt.setActive("whileDrag",!0)},c=(st,lt)=>{const{dragPropagation:ut,dragDirectionLock:pt,onDirectionLock:mt,onDrag:vt}=this.getProps();if(!ut&&!this.openGlobalLock)return;const{offset:_t}=lt;if(pt&&this.currentDirection===null){this.currentDirection=getCurrentDirection(_t),this.currentDirection!==null&&mt&&mt(this.currentDirection);return}this.updateAxis("x",lt.point,_t),this.updateAxis("y",lt.point,_t),this.visualElement.render(),vt&&vt(st,lt)},tt=(st,lt)=>this.stop(st,lt),rt=()=>eachAxis(st=>{var lt;return this.getAnimationState(st)==="paused"&&((lt=this.getAxisMotionValue(st).animation)===null||lt===void 0?void 0:lt.play())}),{dragSnapToOrigin:it}=this.getProps();this.panSession=new PanSession(a,{onSessionStart:g,onStart:_,onMove:c,onSessionEnd:tt,resumeAnimation:rt},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:it,contextWindow:getContextWindow(this.visualElement)})}stop(a,s){const d=this.isDragging;if(this.cancel(),!d)return;const{velocity:g}=s;this.startAnimation(g);const{onDragEnd:_}=this.getProps();_&&frame.update(()=>_(a,s))}cancel(){this.isDragging=!1;const{projection:a,animationState:s}=this.visualElement;a&&(a.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:d}=this.getProps();!d&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),s&&s.setActive("whileDrag",!1)}updateAxis(a,s,d){const{drag:g}=this.getProps();if(!d||!shouldDrag(a,g,this.currentDirection))return;const _=this.getAxisMotionValue(a);let c=this.originPoint[a]+d[a];this.constraints&&this.constraints[a]&&(c=applyConstraints(c,this.constraints[a],this.elastic[a])),_.set(c)}resolveConstraints(){var a;const{dragConstraints:s,dragElastic:d}=this.getProps(),g=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(a=this.visualElement.projection)===null||a===void 0?void 0:a.layout,_=this.constraints;s&&isRefObject(s)?this.constraints||(this.constraints=this.resolveRefConstraints()):s&&g?this.constraints=calcRelativeConstraints(g.layoutBox,s):this.constraints=!1,this.elastic=resolveDragElastic(d),_!==this.constraints&&g&&this.constraints&&!this.hasMutatedConstraints&&eachAxis(c=>{this.getAxisMotionValue(c)&&(this.constraints[c]=rebaseAxisConstraints(g.layoutBox[c],this.constraints[c]))})}resolveRefConstraints(){const{dragConstraints:a,onMeasureDragConstraints:s}=this.getProps();if(!a||!isRefObject(a))return!1;const d=a.current,{projection:g}=this.visualElement;if(!g||!g.layout)return!1;const _=measurePageBox(d,g.root,this.visualElement.getTransformPagePoint());let c=calcViewportConstraints(g.layout.layoutBox,_);if(s){const tt=s(convertBoxToBoundingBox(c));this.hasMutatedConstraints=!!tt,tt&&(c=convertBoundingBoxToBox(tt))}return c}startAnimation(a){const{drag:s,dragMomentum:d,dragElastic:g,dragTransition:_,dragSnapToOrigin:c,onDragTransitionEnd:tt}=this.getProps(),rt=this.constraints||{},it=eachAxis(st=>{if(!shouldDrag(st,s,this.currentDirection))return;let lt=rt&&rt[st]||{};c&&(lt={min:0,max:0});const ut=g?200:1e6,pt=g?40:1e7,mt={type:"inertia",velocity:d?a[st]:0,bounceStiffness:ut,bounceDamping:pt,timeConstant:750,restDelta:1,restSpeed:10,..._,...lt};return this.startAxisValueAnimation(st,mt)});return Promise.all(it).then(tt)}startAxisValueAnimation(a,s){const d=this.getAxisMotionValue(a);return d.start(animateMotionValue(a,d,0,s))}stopAnimation(){eachAxis(a=>this.getAxisMotionValue(a).stop())}pauseAnimation(){eachAxis(a=>{var s;return(s=this.getAxisMotionValue(a).animation)===null||s===void 0?void 0:s.pause()})}getAnimationState(a){var s;return(s=this.getAxisMotionValue(a).animation)===null||s===void 0?void 0:s.state}getAxisMotionValue(a){const s="_drag"+a.toUpperCase(),d=this.visualElement.getProps(),g=d[s];return g||this.visualElement.getValue(a,(d.initial?d.initial[a]:void 0)||0)}snapToCursor(a){eachAxis(s=>{const{drag:d}=this.getProps();if(!shouldDrag(s,d,this.currentDirection))return;const{projection:g}=this.visualElement,_=this.getAxisMotionValue(s);if(g&&g.layout){const{min:c,max:tt}=g.layout.layoutBox[s];_.set(a[s]-mix(c,tt,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:a,dragConstraints:s}=this.getProps(),{projection:d}=this.visualElement;if(!isRefObject(s)||!d||!this.constraints)return;this.stopAnimation();const g={x:0,y:0};eachAxis(c=>{const tt=this.getAxisMotionValue(c);if(tt){const rt=tt.get();g[c]=calcOrigin({min:rt,max:rt},this.constraints[c])}});const{transformTemplate:_}=this.visualElement.getProps();this.visualElement.current.style.transform=_?_({},""):"none",d.root&&d.root.updateScroll(),d.updateLayout(),this.resolveConstraints(),eachAxis(c=>{if(!shouldDrag(c,a,null))return;const tt=this.getAxisMotionValue(c),{min:rt,max:it}=this.constraints[c];tt.set(mix(rt,it,g[c]))})}addListeners(){if(!this.visualElement.current)return;elementDragControls.set(this.visualElement,this);const a=this.visualElement.current,s=addPointerEvent(a,"pointerdown",rt=>{const{drag:it,dragListener:st=!0}=this.getProps();it&&st&&this.start(rt)}),d=()=>{const{dragConstraints:rt}=this.getProps();isRefObject(rt)&&(this.constraints=this.resolveRefConstraints())},{projection:g}=this.visualElement,_=g.addEventListener("measure",d);g&&!g.layout&&(g.root&&g.root.updateScroll(),g.updateLayout()),d();const c=addDomEvent(window,"resize",()=>this.scalePositionWithinConstraints()),tt=g.addEventListener("didUpdate",({delta:rt,hasLayoutChanged:it})=>{this.isDragging&&it&&(eachAxis(st=>{const lt=this.getAxisMotionValue(st);lt&&(this.originPoint[st]+=rt[st].translate,lt.set(lt.get()+rt[st].translate))}),this.visualElement.render())});return()=>{c(),s(),_(),tt&&tt()}}getProps(){const a=this.visualElement.getProps(),{drag:s=!1,dragDirectionLock:d=!1,dragPropagation:g=!1,dragConstraints:_=!1,dragElastic:c=defaultElastic,dragMomentum:tt=!0}=a;return{...a,drag:s,dragDirectionLock:d,dragPropagation:g,dragConstraints:_,dragElastic:c,dragMomentum:tt}}}function shouldDrag(o,a,s){return(a===!0||a===o)&&(s===null||s===o)}function getCurrentDirection(o,a=10){let s=null;return Math.abs(o.y)>a?s="y":Math.abs(o.x)>a&&(s="x"),s}class DragGesture extends Feature{constructor(a){super(a),this.removeGroupControls=noop,this.removeListeners=noop,this.controls=new VisualElementDragControls(a)}mount(){const{dragControls:a}=this.node.getProps();a&&(this.removeGroupControls=a.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||noop}unmount(){this.removeGroupControls(),this.removeListeners()}}const asyncHandler=o=>(a,s)=>{o&&frame.update(()=>o(a,s))};class PanGesture extends Feature{constructor(){super(...arguments),this.removePointerDownListener=noop}onPointerDown(a){this.session=new PanSession(a,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:getContextWindow(this.node)})}createPanHandlers(){const{onPanSessionStart:a,onPanStart:s,onPan:d,onPanEnd:g}=this.node.getProps();return{onSessionStart:asyncHandler(a),onStart:asyncHandler(s),onMove:d,onEnd:(_,c)=>{delete this.session,g&&frame.update(()=>g(_,c))}}}mount(){this.removePointerDownListener=addPointerEvent(this.node.current,"pointerdown",a=>this.onPointerDown(a))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}function usePresence(){const o=reactExports.useContext(PresenceContext);if(o===null)return[!0,null];const{isPresent:a,onExitComplete:s,register:d}=o,g=reactExports.useId();return reactExports.useEffect(()=>d(g),[]),!a&&s?[!1,()=>s&&s(g)]:[!0]}const globalProjectionState={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function pixelsToPercent(o,a){return a.max===a.min?0:o/(a.max-a.min)*100}const correctBorderRadius={correct:(o,a)=>{if(!a.target)return o;if(typeof o=="string")if(px.test(o))o=parseFloat(o);else return o;const s=pixelsToPercent(o,a.target.x),d=pixelsToPercent(o,a.target.y);return`${s}% ${d}%`}},correctBoxShadow={correct:(o,{treeScale:a,projectionDelta:s})=>{const d=o,g=complex.parse(o);if(g.length>5)return d;const _=complex.createTransformer(o),c=typeof g[0]!="number"?1:0,tt=s.x.scale*a.x,rt=s.y.scale*a.y;g[0+c]/=tt,g[1+c]/=rt;const it=mix(tt,rt,.5);return typeof g[2+c]=="number"&&(g[2+c]/=it),typeof g[3+c]=="number"&&(g[3+c]/=it),_(g)}};class MeasureLayoutWithContext extends React.Component{componentDidMount(){const{visualElement:a,layoutGroup:s,switchLayoutGroup:d,layoutId:g}=this.props,{projection:_}=a;addScaleCorrector(defaultScaleCorrectors),_&&(s.group&&s.group.add(_),d&&d.register&&g&&d.register(_),_.root.didUpdate(),_.addEventListener("animationComplete",()=>{this.safeToRemove()}),_.setOptions({..._.options,onExitComplete:()=>this.safeToRemove()})),globalProjectionState.hasEverUpdated=!0}getSnapshotBeforeUpdate(a){const{layoutDependency:s,visualElement:d,drag:g,isPresent:_}=this.props,c=d.projection;return c&&(c.isPresent=_,g||a.layoutDependency!==s||s===void 0?c.willUpdate():this.safeToRemove(),a.isPresent!==_&&(_?c.promote():c.relegate()||frame.postRender(()=>{const tt=c.getStack();(!tt||!tt.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:a}=this.props.visualElement;a&&(a.root.didUpdate(),queueMicrotask(()=>{!a.currentAnimation&&a.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:a,layoutGroup:s,switchLayoutGroup:d}=this.props,{projection:g}=a;g&&(g.scheduleCheckAfterUnmount(),s&&s.group&&s.group.remove(g),d&&d.deregister&&d.deregister(g))}safeToRemove(){const{safeToRemove:a}=this.props;a&&a()}render(){return null}}function MeasureLayout(o){const[a,s]=usePresence(),d=reactExports.useContext(LayoutGroupContext);return React.createElement(MeasureLayoutWithContext,{...o,layoutGroup:d,switchLayoutGroup:reactExports.useContext(SwitchLayoutGroupContext),isPresent:a,safeToRemove:s})}const defaultScaleCorrectors={borderRadius:{...correctBorderRadius,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:correctBorderRadius,borderTopRightRadius:correctBorderRadius,borderBottomLeftRadius:correctBorderRadius,borderBottomRightRadius:correctBorderRadius,boxShadow:correctBoxShadow},borders=["TopLeft","TopRight","BottomLeft","BottomRight"],numBorders=borders.length,asNumber=o=>typeof o=="string"?parseFloat(o):o,isPx=o=>typeof o=="number"||px.test(o);function mixValues(o,a,s,d,g,_){g?(o.opacity=mix(0,s.opacity!==void 0?s.opacity:1,easeCrossfadeIn(d)),o.opacityExit=mix(a.opacity!==void 0?a.opacity:1,0,easeCrossfadeOut(d))):_&&(o.opacity=mix(a.opacity!==void 0?a.opacity:1,s.opacity!==void 0?s.opacity:1,d));for(let c=0;cda?1:s(progress(o,a,d))}function copyAxisInto(o,a){o.min=a.min,o.max=a.max}function copyBoxInto(o,a){copyAxisInto(o.x,a.x),copyAxisInto(o.y,a.y)}function removePointDelta(o,a,s,d,g){return o-=a,o=scalePoint(o,1/s,d),g!==void 0&&(o=scalePoint(o,1/g,d)),o}function removeAxisDelta(o,a=0,s=1,d=.5,g,_=o,c=o){if(percent.test(a)&&(a=parseFloat(a),a=mix(c.min,c.max,a/100)-c.min),typeof a!="number")return;let tt=mix(_.min,_.max,d);o===_&&(tt-=a),o.min=removePointDelta(o.min,a,s,tt,g),o.max=removePointDelta(o.max,a,s,tt,g)}function removeAxisTransforms(o,a,[s,d,g],_,c){removeAxisDelta(o,a[s],a[d],a[g],a.scale,_,c)}const xKeys=["x","scaleX","originX"],yKeys=["y","scaleY","originY"];function removeBoxTransforms(o,a,s,d){removeAxisTransforms(o.x,a,xKeys,s?s.x:void 0,d?d.x:void 0),removeAxisTransforms(o.y,a,yKeys,s?s.y:void 0,d?d.y:void 0)}function isAxisDeltaZero(o){return o.translate===0&&o.scale===1}function isDeltaZero(o){return isAxisDeltaZero(o.x)&&isAxisDeltaZero(o.y)}function boxEquals(o,a){return o.x.min===a.x.min&&o.x.max===a.x.max&&o.y.min===a.y.min&&o.y.max===a.y.max}function boxEqualsRounded(o,a){return Math.round(o.x.min)===Math.round(a.x.min)&&Math.round(o.x.max)===Math.round(a.x.max)&&Math.round(o.y.min)===Math.round(a.y.min)&&Math.round(o.y.max)===Math.round(a.y.max)}function aspectRatio(o){return calcLength(o.x)/calcLength(o.y)}class NodeStack{constructor(){this.members=[]}add(a){addUniqueItem(this.members,a),a.scheduleRender()}remove(a){if(removeItem(this.members,a),a===this.prevLead&&(this.prevLead=void 0),a===this.lead){const s=this.members[this.members.length-1];s&&this.promote(s)}}relegate(a){const s=this.members.findIndex(g=>a===g);if(s===0)return!1;let d;for(let g=s;g>=0;g--){const _=this.members[g];if(_.isPresent!==!1){d=_;break}}return d?(this.promote(d),!0):!1}promote(a,s){const d=this.lead;if(a!==d&&(this.prevLead=d,this.lead=a,a.show(),d)){d.instance&&d.scheduleRender(),a.scheduleRender(),a.resumeFrom=d,s&&(a.resumeFrom.preserveOpacity=!0),d.snapshot&&(a.snapshot=d.snapshot,a.snapshot.latestValues=d.animationValues||d.latestValues),a.root&&a.root.isUpdating&&(a.isLayoutDirty=!0);const{crossfade:g}=a.options;g===!1&&d.hide()}}exitAnimationComplete(){this.members.forEach(a=>{const{options:s,resumingFrom:d}=a;s.onExitComplete&&s.onExitComplete(),d&&d.options.onExitComplete&&d.options.onExitComplete()})}scheduleRender(){this.members.forEach(a=>{a.instance&&a.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function buildProjectionTransform(o,a,s){let d="";const g=o.x.translate/a.x,_=o.y.translate/a.y;if((g||_)&&(d=`translate3d(${g}px, ${_}px, 0) `),(a.x!==1||a.y!==1)&&(d+=`scale(${1/a.x}, ${1/a.y}) `),s){const{rotate:rt,rotateX:it,rotateY:st}=s;rt&&(d+=`rotate(${rt}deg) `),it&&(d+=`rotateX(${it}deg) `),st&&(d+=`rotateY(${st}deg) `)}const c=o.x.scale*a.x,tt=o.y.scale*a.y;return(c!==1||tt!==1)&&(d+=`scale(${c}, ${tt})`),d||"none"}const compareByDepth=(o,a)=>o.depth-a.depth;class FlatTree{constructor(){this.children=[],this.isDirty=!1}add(a){addUniqueItem(this.children,a),this.isDirty=!0}remove(a){removeItem(this.children,a),this.isDirty=!0}forEach(a){this.isDirty&&this.children.sort(compareByDepth),this.isDirty=!1,this.children.forEach(a)}}function delay(o,a){const s=performance.now(),d=({timestamp:g})=>{const _=g-s;_>=a&&(cancelFrame(d),o(_-a))};return frame.read(d,!0),()=>cancelFrame(d)}function record(o){window.MotionDebug&&window.MotionDebug.record(o)}function isSVGElement(o){return o instanceof SVGElement&&o.tagName!=="svg"}function animateSingleValue(o,a,s){const d=isMotionValue(o)?o:motionValue(o);return d.start(animateMotionValue("",d,a,s)),d.animation}const transformAxes=["","X","Y","Z"],hiddenVisibility={visibility:"hidden"},animationTarget=1e3;let id=0;const projectionFrameData={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0};function createProjectionNode({attachResizeListener:o,defaultParent:a,measureScroll:s,checkIsScrollRoot:d,resetTransform:g}){return class{constructor(c={},tt=a==null?void 0:a()){this.id=id++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,projectionFrameData.totalNodes=projectionFrameData.resolvedTargetDeltas=projectionFrameData.recalculatedProjection=0,this.nodes.forEach(propagateDirtyNodes),this.nodes.forEach(resolveTargetDelta),this.nodes.forEach(calcProjection),this.nodes.forEach(cleanDirtyNodes),record(projectionFrameData)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=c,this.root=tt?tt.root||tt:this,this.path=tt?[...tt.path,tt]:[],this.parent=tt,this.depth=tt?tt.depth+1:0;for(let rt=0;rtthis.root.updateBlockedByResize=!1;o(c,()=>{this.root.updateBlockedByResize=!0,lt&<(),lt=delay(ut,250),globalProjectionState.hasAnimatedSinceResize&&(globalProjectionState.hasAnimatedSinceResize=!1,this.nodes.forEach(finishAnimation))})}rt&&this.root.registerSharedNode(rt,this),this.options.animate!==!1&&st&&(rt||it)&&this.addEventListener("didUpdate",({delta:lt,hasLayoutChanged:ut,hasRelativeTargetChanged:pt,layout:mt})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const vt=this.options.transition||st.getDefaultTransition()||defaultLayoutTransition,{onLayoutAnimationStart:_t,onLayoutAnimationComplete:dt}=st.getProps(),ct=!this.targetLayout||!boxEqualsRounded(this.targetLayout,mt)||pt,ht=!ut&&pt;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||ht||ut&&(ct||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(lt,ht);const wt={...getValueTransition(vt,"layout"),onPlay:_t,onComplete:dt};(st.shouldReduceMotion||this.options.layoutRoot)&&(wt.delay=0,wt.type=!1),this.startAnimation(wt)}else ut||finishAnimation(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=mt})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const c=this.getStack();c&&c.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,cancelFrame(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(resetRotation),this.animationId++)}getTransformTemplate(){const{visualElement:c}=this.options;return c&&c.getProps().transformTemplate}willUpdate(c=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let st=0;stthis.update()))}clearAllSnapshots(){this.nodes.forEach(clearSnapshot),this.sharedNodes.forEach(removeLeadSnapshots)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,frame.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){frame.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let rt=0;rt{const St=wt/1e3;mixAxisDelta(lt.x,c.x,St),mixAxisDelta(lt.y,c.y,St),this.setTargetDelta(lt),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(calcRelativePosition(ut,this.layout.layoutBox,this.relativeParent.layout.layoutBox),mixBox(this.relativeTarget,this.relativeTargetOrigin,ut,St),ht&&boxEquals(this.relativeTarget,ht)&&(this.isProjectionDirty=!1),ht||(ht=createBox()),copyBoxInto(ht,this.relativeTarget)),vt&&(this.animationValues=st,mixValues(st,it,this.latestValues,St,ct,dt)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=St},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(c){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(cancelFrame(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=frame.update(()=>{globalProjectionState.hasAnimatedSinceResize=!0,this.currentAnimation=animateSingleValue(0,animationTarget,{...c,onUpdate:tt=>{this.mixTargetDelta(tt),c.onUpdate&&c.onUpdate(tt)},onComplete:()=>{c.onComplete&&c.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const c=this.getStack();c&&c.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(animationTarget),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const c=this.getLead();let{targetWithTransforms:tt,target:rt,layout:it,latestValues:st}=c;if(!(!tt||!rt||!it)){if(this!==c&&this.layout&&it&&shouldAnimatePositionOnly(this.options.animationType,this.layout.layoutBox,it.layoutBox)){rt=this.target||createBox();const lt=calcLength(this.layout.layoutBox.x);rt.x.min=c.target.x.min,rt.x.max=rt.x.min+lt;const ut=calcLength(this.layout.layoutBox.y);rt.y.min=c.target.y.min,rt.y.max=rt.y.min+ut}copyBoxInto(tt,rt),transformBox(tt,st),calcBoxDelta(this.projectionDeltaWithTransform,this.layoutCorrected,tt,st)}}registerSharedNode(c,tt){this.sharedNodes.has(c)||this.sharedNodes.set(c,new NodeStack),this.sharedNodes.get(c).add(tt);const it=tt.options.initialPromotionConfig;tt.promote({transition:it?it.transition:void 0,preserveFollowOpacity:it&&it.shouldPreserveFollowOpacity?it.shouldPreserveFollowOpacity(tt):void 0})}isLead(){const c=this.getStack();return c?c.lead===this:!0}getLead(){var c;const{layoutId:tt}=this.options;return tt?((c=this.getStack())===null||c===void 0?void 0:c.lead)||this:this}getPrevLead(){var c;const{layoutId:tt}=this.options;return tt?(c=this.getStack())===null||c===void 0?void 0:c.prevLead:void 0}getStack(){const{layoutId:c}=this.options;if(c)return this.root.sharedNodes.get(c)}promote({needsReset:c,transition:tt,preserveFollowOpacity:rt}={}){const it=this.getStack();it&&it.promote(this,rt),c&&(this.projectionDelta=void 0,this.needsReset=!0),tt&&this.setOptions({transition:tt})}relegate(){const c=this.getStack();return c?c.relegate(this):!1}resetRotation(){const{visualElement:c}=this.options;if(!c)return;let tt=!1;const{latestValues:rt}=c;if((rt.rotate||rt.rotateX||rt.rotateY||rt.rotateZ)&&(tt=!0),!tt)return;const it={};for(let st=0;st{var tt;return(tt=c.currentAnimation)===null||tt===void 0?void 0:tt.stop()}),this.root.nodes.forEach(clearMeasurements),this.root.sharedNodes.clear()}}}function updateLayout(o){o.updateLayout()}function notifyLayoutUpdate(o){var a;const s=((a=o.resumeFrom)===null||a===void 0?void 0:a.snapshot)||o.snapshot;if(o.isLead()&&o.layout&&s&&o.hasListeners("didUpdate")){const{layoutBox:d,measuredBox:g}=o.layout,{animationType:_}=o.options,c=s.source!==o.layout.source;_==="size"?eachAxis(lt=>{const ut=c?s.measuredBox[lt]:s.layoutBox[lt],pt=calcLength(ut);ut.min=d[lt].min,ut.max=ut.min+pt}):shouldAnimatePositionOnly(_,s.layoutBox,d)&&eachAxis(lt=>{const ut=c?s.measuredBox[lt]:s.layoutBox[lt],pt=calcLength(d[lt]);ut.max=ut.min+pt,o.relativeTarget&&!o.currentAnimation&&(o.isProjectionDirty=!0,o.relativeTarget[lt].max=o.relativeTarget[lt].min+pt)});const tt=createDelta();calcBoxDelta(tt,d,s.layoutBox);const rt=createDelta();c?calcBoxDelta(rt,o.applyTransform(g,!0),s.measuredBox):calcBoxDelta(rt,d,s.layoutBox);const it=!isDeltaZero(tt);let st=!1;if(!o.resumeFrom){const lt=o.getClosestProjectingParent();if(lt&&!lt.resumeFrom){const{snapshot:ut,layout:pt}=lt;if(ut&&pt){const mt=createBox();calcRelativePosition(mt,s.layoutBox,ut.layoutBox);const vt=createBox();calcRelativePosition(vt,d,pt.layoutBox),boxEqualsRounded(mt,vt)||(st=!0),lt.options.layoutRoot&&(o.relativeTarget=vt,o.relativeTargetOrigin=mt,o.relativeParent=lt)}}}o.notifyListeners("didUpdate",{layout:d,snapshot:s,delta:rt,layoutDelta:tt,hasLayoutChanged:it,hasRelativeTargetChanged:st})}else if(o.isLead()){const{onExitComplete:d}=o.options;d&&d()}o.options.transition=void 0}function propagateDirtyNodes(o){projectionFrameData.totalNodes++,o.parent&&(o.isProjecting()||(o.isProjectionDirty=o.parent.isProjectionDirty),o.isSharedProjectionDirty||(o.isSharedProjectionDirty=!!(o.isProjectionDirty||o.parent.isProjectionDirty||o.parent.isSharedProjectionDirty)),o.isTransformDirty||(o.isTransformDirty=o.parent.isTransformDirty))}function cleanDirtyNodes(o){o.isProjectionDirty=o.isSharedProjectionDirty=o.isTransformDirty=!1}function clearSnapshot(o){o.clearSnapshot()}function clearMeasurements(o){o.clearMeasurements()}function clearIsLayoutDirty(o){o.isLayoutDirty=!1}function resetTransformStyle(o){const{visualElement:a}=o.options;a&&a.getProps().onBeforeLayoutMeasure&&a.notify("BeforeLayoutMeasure"),o.resetTransform()}function finishAnimation(o){o.finishAnimation(),o.targetDelta=o.relativeTarget=o.target=void 0,o.isProjectionDirty=!0}function resolveTargetDelta(o){o.resolveTargetDelta()}function calcProjection(o){o.calcProjection()}function resetRotation(o){o.resetRotation()}function removeLeadSnapshots(o){o.removeLeadSnapshot()}function mixAxisDelta(o,a,s){o.translate=mix(a.translate,0,s),o.scale=mix(a.scale,1,s),o.origin=a.origin,o.originPoint=a.originPoint}function mixAxis(o,a,s,d){o.min=mix(a.min,s.min,d),o.max=mix(a.max,s.max,d)}function mixBox(o,a,s,d){mixAxis(o.x,a.x,s.x,d),mixAxis(o.y,a.y,s.y,d)}function hasOpacityCrossfade(o){return o.animationValues&&o.animationValues.opacityExit!==void 0}const defaultLayoutTransition={duration:.45,ease:[.4,0,.1,1]},userAgentContains=o=>typeof navigator<"u"&&navigator.userAgent.toLowerCase().includes(o),roundPoint=userAgentContains("applewebkit/")&&!userAgentContains("chrome/")?Math.round:noop;function roundAxis(o){o.min=roundPoint(o.min),o.max=roundPoint(o.max)}function roundBox(o){roundAxis(o.x),roundAxis(o.y)}function shouldAnimatePositionOnly(o,a,s){return o==="position"||o==="preserve-aspect"&&!isNear(aspectRatio(a),aspectRatio(s),.2)}const DocumentProjectionNode=createProjectionNode({attachResizeListener:(o,a)=>addDomEvent(o,"resize",a),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),rootProjectionNode={current:void 0},HTMLProjectionNode=createProjectionNode({measureScroll:o=>({x:o.scrollLeft,y:o.scrollTop}),defaultParent:()=>{if(!rootProjectionNode.current){const o=new DocumentProjectionNode({});o.mount(window),o.setOptions({layoutScroll:!0}),rootProjectionNode.current=o}return rootProjectionNode.current},resetTransform:(o,a)=>{o.style.transform=a!==void 0?a:"none"},checkIsScrollRoot:o=>window.getComputedStyle(o).position==="fixed"}),drag={pan:{Feature:PanGesture},drag:{Feature:DragGesture,ProjectionNode:HTMLProjectionNode,MeasureLayout}},splitCSSVariableRegex=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function parseCSSVariable(o){const a=splitCSSVariableRegex.exec(o);if(!a)return[,];const[,s,d]=a;return[s,d]}function getVariableValue(o,a,s=1){const[d,g]=parseCSSVariable(o);if(!d)return;const _=window.getComputedStyle(a).getPropertyValue(d);if(_){const c=_.trim();return isNumericalString(c)?parseFloat(c):c}else return isCSSVariableToken(g)?getVariableValue(g,a,s+1):g}function resolveCSSVariables(o,{...a},s){const d=o.current;if(!(d instanceof Element))return{target:a,transitionEnd:s};s&&(s={...s}),o.values.forEach(g=>{const _=g.get();if(!isCSSVariableToken(_))return;const c=getVariableValue(_,d);c&&g.set(c)});for(const g in a){const _=a[g];if(!isCSSVariableToken(_))continue;const c=getVariableValue(_,d);c&&(a[g]=c,s||(s={}),s[g]===void 0&&(s[g]=_))}return{target:a,transitionEnd:s}}const positionalKeys=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),isPositionalKey=o=>positionalKeys.has(o),hasPositionalKey=o=>Object.keys(o).some(isPositionalKey),isNumOrPxType=o=>o===number||o===px,getPosFromMatrix=(o,a)=>parseFloat(o.split(", ")[a]),getTranslateFromMatrix=(o,a)=>(s,{transform:d})=>{if(d==="none"||!d)return 0;const g=d.match(/^matrix3d\((.+)\)$/);if(g)return getPosFromMatrix(g[1],a);{const _=d.match(/^matrix\((.+)\)$/);return _?getPosFromMatrix(_[1],o):0}},transformKeys=new Set(["x","y","z"]),nonTranslationalTransformKeys=transformPropOrder.filter(o=>!transformKeys.has(o));function removeNonTranslationalTransform(o){const a=[];return nonTranslationalTransformKeys.forEach(s=>{const d=o.getValue(s);d!==void 0&&(a.push([s,d.get()]),d.set(s.startsWith("scale")?1:0))}),a.length&&o.render(),a}const positionalValues={width:({x:o},{paddingLeft:a="0",paddingRight:s="0"})=>o.max-o.min-parseFloat(a)-parseFloat(s),height:({y:o},{paddingTop:a="0",paddingBottom:s="0"})=>o.max-o.min-parseFloat(a)-parseFloat(s),top:(o,{top:a})=>parseFloat(a),left:(o,{left:a})=>parseFloat(a),bottom:({y:o},{top:a})=>parseFloat(a)+(o.max-o.min),right:({x:o},{left:a})=>parseFloat(a)+(o.max-o.min),x:getTranslateFromMatrix(4,13),y:getTranslateFromMatrix(5,14)};positionalValues.translateX=positionalValues.x;positionalValues.translateY=positionalValues.y;const convertChangedValueTypes=(o,a,s)=>{const d=a.measureViewportBox(),g=a.current,_=getComputedStyle(g),{display:c}=_,tt={};c==="none"&&a.setStaticValue("display",o.display||"block"),s.forEach(it=>{tt[it]=positionalValues[it](d,_)}),a.render();const rt=a.measureViewportBox();return s.forEach(it=>{const st=a.getValue(it);st&&st.jump(tt[it]),o[it]=positionalValues[it](rt,_)}),o},checkAndConvertChangedValueTypes=(o,a,s={},d={})=>{a={...a},d={...d};const g=Object.keys(a).filter(isPositionalKey);let _=[],c=!1;const tt=[];if(g.forEach(rt=>{const it=o.getValue(rt);if(!o.hasValue(rt))return;let st=s[rt],lt=findDimensionValueType(st);const ut=a[rt];let pt;if(isKeyframesTarget(ut)){const mt=ut.length,vt=ut[0]===null?1:0;st=ut[vt],lt=findDimensionValueType(st);for(let _t=vt;_t=0?window.pageYOffset:null,it=convertChangedValueTypes(a,o,tt);return _.length&&_.forEach(([st,lt])=>{o.getValue(st).set(lt)}),o.render(),isBrowser&&rt!==null&&window.scrollTo({top:rt}),{target:it,transitionEnd:d}}else return{target:a,transitionEnd:d}};function unitConversion(o,a,s,d){return hasPositionalKey(a)?checkAndConvertChangedValueTypes(o,a,s,d):{target:a,transitionEnd:d}}const parseDomVariant=(o,a,s,d)=>{const g=resolveCSSVariables(o,a,d);return a=g.target,d=g.transitionEnd,unitConversion(o,a,s,d)},prefersReducedMotion={current:null},hasReducedMotionListener={current:!1};function initPrefersReducedMotion(){if(hasReducedMotionListener.current=!0,!!isBrowser)if(window.matchMedia){const o=window.matchMedia("(prefers-reduced-motion)"),a=()=>prefersReducedMotion.current=o.matches;o.addListener(a),a()}else prefersReducedMotion.current=!1}function updateMotionValuesFromProps(o,a,s){const{willChange:d}=a;for(const g in a){const _=a[g],c=s[g];if(isMotionValue(_))o.addValue(g,_),isWillChangeMotionValue(d)&&d.add(g);else if(isMotionValue(c))o.addValue(g,motionValue(_,{owner:o})),isWillChangeMotionValue(d)&&d.remove(g);else if(c!==_)if(o.hasValue(g)){const tt=o.getValue(g);!tt.hasAnimated&&tt.set(_)}else{const tt=o.getStaticValue(g);o.addValue(g,motionValue(tt!==void 0?tt:_,{owner:o}))}}for(const g in s)a[g]===void 0&&o.removeValue(g);return a}const visualElementStore=new WeakMap,featureNames=Object.keys(featureDefinitions),numFeatures=featureNames.length,propEventHandlers=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],numVariantProps=variantProps.length;class VisualElement{constructor({parent:a,props:s,presenceContext:d,reducedMotionConfig:g,visualState:_},c={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.scheduleRender=()=>frame.render(this.render,!1,!0);const{latestValues:tt,renderState:rt}=_;this.latestValues=tt,this.baseTarget={...tt},this.initialValues=s.initial?{...tt}:{},this.renderState=rt,this.parent=a,this.props=s,this.presenceContext=d,this.depth=a?a.depth+1:0,this.reducedMotionConfig=g,this.options=c,this.isControllingVariants=isControllingVariants(s),this.isVariantNode=isVariantNode(s),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(a&&a.current);const{willChange:it,...st}=this.scrapeMotionValuesFromProps(s,{});for(const lt in st){const ut=st[lt];tt[lt]!==void 0&&isMotionValue(ut)&&(ut.set(tt[lt],!1),isWillChangeMotionValue(it)&&it.add(lt))}}scrapeMotionValuesFromProps(a,s){return{}}mount(a){this.current=a,visualElementStore.set(a,this),this.projection&&!this.projection.instance&&this.projection.mount(a),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((s,d)=>this.bindToMotionValue(d,s)),hasReducedMotionListener.current||initPrefersReducedMotion(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:prefersReducedMotion.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){visualElementStore.delete(this.current),this.projection&&this.projection.unmount(),cancelFrame(this.notifyUpdate),cancelFrame(this.render),this.valueSubscriptions.forEach(a=>a()),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const a in this.events)this.events[a].clear();for(const a in this.features)this.features[a].unmount();this.current=null}bindToMotionValue(a,s){const d=transformProps.has(a),g=s.on("change",c=>{this.latestValues[a]=c,this.props.onUpdate&&frame.update(this.notifyUpdate,!1,!0),d&&this.projection&&(this.projection.isTransformDirty=!0)}),_=s.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(a,()=>{g(),_()})}sortNodePosition(a){return!this.current||!this.sortInstanceNodePosition||this.type!==a.type?0:this.sortInstanceNodePosition(this.current,a.current)}loadFeatures({children:a,...s},d,g,_){let c,tt;for(let rt=0;rtthis.scheduleRender(),animationType:typeof it=="string"?it:"both",initialPromotionConfig:_,layoutScroll:ut,layoutRoot:pt})}return tt}updateFeatures(){for(const a in this.features){const s=this.features[a];s.isMounted?s.update():(s.mount(),s.isMounted=!0)}}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):createBox()}getStaticValue(a){return this.latestValues[a]}setStaticValue(a,s){this.latestValues[a]=s}makeTargetAnimatable(a,s=!0){return this.makeTargetAnimatableFromInstance(a,this.props,s)}update(a,s){(a.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=a,this.prevPresenceContext=this.presenceContext,this.presenceContext=s;for(let d=0;ds.variantChildren.delete(a)}addValue(a,s){s!==this.values.get(a)&&(this.removeValue(a),this.bindToMotionValue(a,s)),this.values.set(a,s),this.latestValues[a]=s.get()}removeValue(a){this.values.delete(a);const s=this.valueSubscriptions.get(a);s&&(s(),this.valueSubscriptions.delete(a)),delete this.latestValues[a],this.removeValueFromRenderState(a,this.renderState)}hasValue(a){return this.values.has(a)}getValue(a,s){if(this.props.values&&this.props.values[a])return this.props.values[a];let d=this.values.get(a);return d===void 0&&s!==void 0&&(d=motionValue(s,{owner:this}),this.addValue(a,d)),d}readValue(a){var s;return this.latestValues[a]!==void 0||!this.current?this.latestValues[a]:(s=this.getBaseTargetFromProps(this.props,a))!==null&&s!==void 0?s:this.readValueFromInstance(this.current,a,this.options)}setBaseTarget(a,s){this.baseTarget[a]=s}getBaseTarget(a){var s;const{initial:d}=this.props,g=typeof d=="string"||typeof d=="object"?(s=resolveVariantFromProps(this.props,d))===null||s===void 0?void 0:s[a]:void 0;if(d&&g!==void 0)return g;const _=this.getBaseTargetFromProps(this.props,a);return _!==void 0&&!isMotionValue(_)?_:this.initialValues[a]!==void 0&&g===void 0?void 0:this.baseTarget[a]}on(a,s){return this.events[a]||(this.events[a]=new SubscriptionManager),this.events[a].add(s)}notify(a,...s){this.events[a]&&this.events[a].notify(...s)}}class DOMVisualElement extends VisualElement{sortInstanceNodePosition(a,s){return a.compareDocumentPosition(s)&2?1:-1}getBaseTargetFromProps(a,s){return a.style?a.style[s]:void 0}removeValueFromRenderState(a,{vars:s,style:d}){delete s[a],delete d[a]}makeTargetAnimatableFromInstance({transition:a,transitionEnd:s,...d},{transformValues:g},_){let c=getOrigin(d,a||{},this);if(g&&(s&&(s=g(s)),d&&(d=g(d)),c&&(c=g(c))),_){checkTargetForNewValues(this,d,c);const tt=parseDomVariant(this,d,c,s);s=tt.transitionEnd,d=tt.target}return{transition:a,transitionEnd:s,...d}}}function getComputedStyle$1(o){return window.getComputedStyle(o)}class HTMLVisualElement extends DOMVisualElement{readValueFromInstance(a,s){if(transformProps.has(s)){const d=getDefaultValueType(s);return d&&d.default||0}else{const d=getComputedStyle$1(a),g=(isCSSVariableName(s)?d.getPropertyValue(s):d[s])||0;return typeof g=="string"?g.trim():g}}measureInstanceViewportBox(a,{transformPagePoint:s}){return measureViewportBox(a,s)}build(a,s,d,g){buildHTMLStyles(a,s,d,g.transformTemplate)}scrapeMotionValuesFromProps(a,s){return scrapeMotionValuesFromProps$1(a,s)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:a}=this.props;isMotionValue(a)&&(this.childSubscription=a.on("change",s=>{this.current&&(this.current.textContent=`${s}`)}))}renderInstance(a,s,d,g){renderHTML(a,s,d,g)}}class SVGVisualElement extends DOMVisualElement{constructor(){super(...arguments),this.isSVGTag=!1}getBaseTargetFromProps(a,s){return a[s]}readValueFromInstance(a,s){if(transformProps.has(s)){const d=getDefaultValueType(s);return d&&d.default||0}return s=camelCaseAttributes.has(s)?s:camelToDash(s),a.getAttribute(s)}measureInstanceViewportBox(){return createBox()}scrapeMotionValuesFromProps(a,s){return scrapeMotionValuesFromProps(a,s)}build(a,s,d,g){buildSVGAttrs(a,s,d,this.isSVGTag,g.transformTemplate)}renderInstance(a,s,d,g){renderSVG(a,s,d,g)}mount(a){this.isSVGTag=isSVGTag(a.tagName),super.mount(a)}}const createDomVisualElement=(o,a)=>isSVGComponent(o)?new SVGVisualElement(a,{enableHardwareAcceleration:!1}):new HTMLVisualElement(a,{enableHardwareAcceleration:!0}),layout={layout:{ProjectionNode:HTMLProjectionNode,MeasureLayout}},preloadedFeatures={...animations,...gestureAnimations,...drag,...layout},motion=createMotionProxy((o,a)=>createDomMotionConfig(o,a,preloadedFeatures,createDomVisualElement));function About(){const[o]=reactExports.useState("laoer536-About Page"),{num:a,changeNum:s}=useUserStore();return jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("h1",{children:o}),jsxRuntimeExports.jsxs("h2",{children:["userSore.num:",a]}),jsxRuntimeExports.jsx(motion.button,{...button,onClick:s,children:"click on the store provided by zustand to change the number"})]})}const dockerLogo="/vite3.0-react18-TypeScript-router-dom6-mobx6-Eslint-prettier-template/assets/Docker-SaajVHef.svg",reactLogo="/vite3.0-react18-TypeScript-router-dom6-mobx6-Eslint-prettier-template/assets/react-h3aPdYU7.svg",home="_home_icbgy_1",logo="_logo_icbgy_1",card="_card_icbgy_9",HomeStyle={home,logo,card,"read-the-docs":"_read-the-docs_icbgy_12","logo-spin":"_logo-spin_icbgy_1"},publicPath="/vite3.0-react18-TypeScript-router-dom6-mobx6-Eslint-prettier-template/";function Home(){const{num:o,changeNum:a}=useUserStore(),s=useNavigate(),d=()=>{s("/about")};return jsxRuntimeExports.jsxs("div",{className:HomeStyle.home,children:[jsxRuntimeExports.jsxs(motion.div,{initial:{translateY:-300},whileInView:{translateY:0},transition:{type:"spring"},children:[jsxRuntimeExports.jsx("a",{href:"https://vitejs.dev",target:"_blank",rel:"noreferrer",children:jsxRuntimeExports.jsx("img",{src:publicPath+"vite.svg",className:HomeStyle.logo,alt:"Vite logo"})}),jsxRuntimeExports.jsx("a",{href:"https://reactjs.org",target:"_blank",rel:"noreferrer",children:jsxRuntimeExports.jsx("img",{src:reactLogo,className:`${HomeStyle.logo} ${HomeStyle.react}`,alt:"React logo"})}),jsxRuntimeExports.jsx("a",{href:"https://forums.docker.com/",target:"_blank",rel:"noreferrer",children:jsxRuntimeExports.jsx("img",{src:dockerLogo,className:HomeStyle.logo,alt:"Docker logo"})})]}),jsxRuntimeExports.jsx("h1",{children:"Vite + React"}),jsxRuntimeExports.jsxs("div",{className:HomeStyle.card,children:[jsxRuntimeExports.jsxs(motion.button,{...button,onClick:a,children:["UserStore's count is ",o]}),jsxRuntimeExports.jsxs("p",{children:["Edit ",jsxRuntimeExports.jsx("code",{children:"src/App.tsx"})," and save to test HMR"]})]}),jsxRuntimeExports.jsx("p",{className:"read-the-docs",children:"Click on the Vite and React logos to learn more"}),jsxRuntimeExports.jsx(motion.button,{...button,onClick:d,children:"click to jump to the about page"})]})}function Router(){return useRoutes([{path:"/",element:jsxRuntimeExports.jsx(Home,{})},{path:"/about",element:jsxRuntimeExports.jsx(About,{})}])}function App(){return useVcosole(),jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsx(Router,{})})}client.createRoot(document.getElementById("root")).render(jsxRuntimeExports.jsx(React.StrictMode,{children:jsxRuntimeExports.jsx(BrowserRouter,{basename:"/vite3.0-react18-TypeScript-router-dom6-mobx6-Eslint-prettier-template/",children:jsxRuntimeExports.jsx(App,{})})})); diff --git a/docs/index.html b/docs/index.html index c15243b..6be5c2b 100644 --- a/docs/index.html +++ b/docs/index.html @@ -5,7 +5,7 @@ Vite + React + TS - +