vue-circular-gauge
Version:
Circular gauge component for Vue.js with customizable colors, animations, and thresholds
1 lines • 134 kB
JavaScript
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("vue")):"function"==typeof define&&define.amd?define(["exports","vue"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).VueCircularGauge={},t.Vue)}(this,(function(t,e){"use strict";const n=(t,e,n,i)=>{const s=i/100;if(e>0&&t>100-2*n*e){const e=100-t;return`${Math.max(t*s-e*s,0)} ${i}`}{const o=2*n*e;return`${Math.max(t*s-o*s,0)} ${i}`}},i=(t,e,n,i)=>{const s=i/100;if(e<1&&t<2*n*e){const e=t;return`${Math.max((100-t)*s-e*s,0)} ${i}`}{const o=2*n*e;return`${Math.max((100-t)*s-o*s,0)} ${i}`}},s=(t,e,n,i)=>{if(e>0&&t>100-2*n*e){const e=3.6*(.5*(100-t))-90;return i?`rotate(${e}deg)`:`rotate(${-1*e}deg) scaleX(-1)`}{const t=3.6*(n*e)-90;return i?`rotate(${t}deg)`:`rotate(${-1*t}deg) scaleX(-1)`}},o=(t,e,n,i)=>{if(e<1&&t<2*n*e){const e=3.6*(.5*t)-90;return i?`rotate(${e}deg) scaleY(-1)`:`rotate(${-1*e}deg) scaleY(-1) scaleX(-1)`}{const t=270-3.6*(n*e);return i?`rotate(${t}deg) scaleY(-1)`:`rotate(${-1*t}deg) scaleY(-1) scaleX(-1)`}},r=(t,e)=>{const n=Object.keys(t).sort(((t,e)=>Number(t)-Number(e)));let i="";for(let s=0;s<n.length;s++){const o=Number(n[s]),r=Number(n[s+1]);if(e>=o&&(e<r||!r)){i=t[o];break}}return i},a=(t,e)=>t?"string"==typeof t?t:"object"==typeof t?r(t,e):void 0:e<=25?"hsl(358 75% 59%)":e<=50?"hsl(39 100% 57%)":e<=75?"hsl(212 100% 48%)":"hsl(131 41% 46%)",l=(t,e)=>t?"string"==typeof t?t:"object"==typeof t?r(t,100-e):void 0:"hsl(0 0% 92%)",u=(t,e,n,i)=>t>0&&e<2*n*t&&e<2*n*i?0:1,h=(t,e,n,i)=>0===t&&e>100-2*n||t>0&&e>100-2*n*t&&e>100-2*n*i?0:1,c={xs:{size:32},sm:{size:48},md:{size:72},lg:{size:96},xl:{size:120},"2xl":{size:144}},d=t=>e=>"string"==typeof e&&e.startsWith(t),p=d("--"),m=d("var(--"),f=t=>!!m(t)&&y.test(t.split("/*")[0].trim()),y=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,g={};function v(t){for(const e in t)g[e]=t[e],p(e)&&(g[e].isCSSVariable=!0)}function x(t,n){const i=Symbol("string"==typeof t?`${t}Context`:n);return[n=>{const s=e.inject(i,n);if(s)return s;if(null===s)return s;throw new Error(`Injection \`${i.toString()}\` not found. Component must be used within ${Array.isArray(t)?`one of the following components: ${t.join(", ")}`:`\`${t}\``}`)},t=>(e.provide(i,t),t)]}const[b,w]=x("Motion"),[T,S]=x("LayoutGroup");function P(t){return null!==t&&"object"==typeof t&&"function"==typeof t.start}class A{constructor(t){this.state=t}beforeMount(){}mount(){}unmount(){}update(){}beforeUpdate(){}beforeUnmount(){}}var E=function(){},M=function(){};function V(t,e,n){if(Array.isArray(t))return t.reduce(((t,i)=>{const s=V(i,e,n);return s?{...t,...s}:t}),{});if("object"==typeof t)return t;if(t&&e){const i=e[t];return"function"==typeof i?i(n):i}}function k(t){return null==t?void 0:t.startsWith("--")}"production"!==process.env.NODE_ENV&&(E=function(t,e){t||"undefined"==typeof console||console.warn(e)},M=function(t,e){if(!t)throw new Error(e)});function C(t){return"number"==typeof t}const D=new Set(["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","svg","switch","symbol","text","tspan","use","view","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","linearGradient","radialGradient","textPath"]);function j(t){return D.has(t)}class B{constructor(t){this.features=[];const{features:n=[],lazyMotionContext:i}=t.options,s=n.concat(i.features.value);this.features=s.map((e=>new e(t)));const o=this.features;e.watch(i.features,(e=>{e.forEach((e=>{if(!s.includes(e)){s.push(e);const n=new e(t);o.push(n),t.isMounted()&&(n.beforeMount(),n.mount())}}))}),{flush:"pre"})}mount(){this.features.forEach((t=>t.mount()))}beforeMount(){this.features.forEach((t=>{var e;return null==(e=t.beforeMount)?void 0:e.call(t)}))}unmount(){this.features.forEach((t=>t.unmount()))}update(){this.features.forEach((t=>{var e;return null==(e=t.update)?void 0:e.call(t)}))}beforeUpdate(){this.features.forEach((t=>t.beforeUpdate()))}beforeUnmount(){this.features.forEach((t=>t.beforeUnmount()))}}const O=new WeakMap,[R,L]=x("AnimatePresenceContext");const F=t=>t,U=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];const I={};function $(t,e){let n=!1,i=!0;const s={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,r=U.reduce(((t,e)=>(t[e]=function(t){let e=new Set,n=new Set,i=!1,s=!1;const o=new WeakSet;let r={delta:0,timestamp:0,isProcessing:!1};function a(e){o.has(e)&&(l.schedule(e),t()),e(r)}const l={schedule:(t,s=!1,r=!1)=>{const a=r&&i?e:n;return s&&o.add(t),a.has(t)||a.add(t),t},cancel:t=>{n.delete(t),o.delete(t)},process:t=>{r=t,i?s=!0:(i=!0,[e,n]=[n,e],e.forEach(a),e.clear(),i=!1,s&&(s=!1,l.process(t)))}};return l}(o),t)),{}),{setup:a,read:l,resolveKeyframes:u,preUpdate:h,update:c,preRender:d,render:p,postRender:m}=r,f=()=>{const o=I.useManualTiming?s.timestamp:performance.now();n=!1,I.useManualTiming||(s.delta=i?1e3/60:Math.max(Math.min(o-s.timestamp,40),1)),s.timestamp=o,s.isProcessing=!0,a.process(s),l.process(s),u.process(s),h.process(s),c.process(s),d.process(s),p.process(s),m.process(s),s.isProcessing=!1,n&&e&&(i=!1,t(f))};return{schedule:U.reduce(((e,o)=>{const a=r[o];return e[o]=(e,o=!1,r=!1)=>(n||(n=!0,i=!0,s.isProcessing||t(f)),a.schedule(e,o,r)),e}),{}),cancel:t=>{for(let e=0;e<U.length;e++)r[U[e]].cancel(t)},state:s,steps:r}}const{schedule:N,cancel:z,state:W,steps:Y}=$("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:F,!0),X=new WeakMap;let G=0;const H=new Set;class K{constructor(t,e){var n;this.element=null,this.isSafeToRemove=!1,this.isVShow=!1,this.children=new Set,this.activeStates={initial:!0,animate:!0},this.currentProcess=null,this._context=null,this.animateUpdates=F,this.id="motion-state-"+G++,this.options=t,this.parent=e,null==(n=null==e?void 0:e.children)||n.add(this),this.depth=(null==e?void 0:e.depth)+1||0;const i=!1===(void 0===t.initial&&t.variants?this.context.initial:t.initial)?["initial","animate"]:["initial"];this.initTarget(i),this.featureManager=new B(this),this.type=j(this.options.as)?"svg":"html"}get context(){if(!this._context){const t={get:(t,e)=>{var n,i;return"string"==typeof(i=this.options[e])||!1===i||Array.isArray(i)?this.options[e]:null==(n=this.parent)?void 0:n.context[e]}};this._context=new Proxy({},t)}return this._context}initTarget(t){this.baseTarget=t.reduce(((t,e)=>({...t,...V(this.options[e]||this.context[e],this.options.variants)})),{}),this.target={}}updateOptions(t){var e;this.options=t,null==(e=this.visualElement)||e.update({...this.options,whileTap:this.options.whilePress,reducedMotionConfig:this.options.motionConfig.reduceMotion},{isPresent:!O.has(this.element)})}beforeMount(){this.featureManager.beforeMount()}mount(t,e,n=!1){var i;M(Boolean(t),"Animation state must be mounted with valid Element"),this.element=t,this.updateOptions(e),this.featureManager.mount(),!n&&this.options.animate&&(null==(i=this.startAnimation)||i.call(this)),this.options.layoutId&&(H.add(this.options.layoutId),N.render((()=>{H.clear()})))}clearAnimation(){var t,e;this.currentProcess&&z(this.currentProcess),this.currentProcess=null,null==(e=null==(t=this.visualElement)?void 0:t.variantChildren)||e.forEach((t=>{t.state.clearAnimation()}))}startAnimation(){this.clearAnimation(),this.currentProcess=N.render((()=>{this.currentProcess=null,this.animateUpdates()}))}beforeUnmount(){this.featureManager.beforeUnmount()}unmount(t=!1){const e=this.options.layoutId&&!H.has(this.options.layoutId);(()=>{const n=()=>{var e,n,i;t&&Array.from(this.children).reverse().forEach(this.unmountChild),null==(n=null==(e=this.parent)?void 0:e.children)||n.delete(this),X.delete(this.element),this.featureManager.unmount(),null==(i=this.visualElement)||i.unmount(),this.clearAnimation()};e?Promise.resolve().then(n):n()})()}unmountChild(t){t.unmount(!0)}beforeUpdate(){this.featureManager.beforeUpdate()}update(t){const e=function(t,e){const n=t.animate,i=e.animate;if(n===i)return!1;if(!n||!i)return!0;if("object"==typeof n||"object"==typeof i){const t=Object.keys(n),e=Object.keys(i);return t.length!==e.length||t.some((t=>"transition"!==t&&n[t]!==i[t]))}return n!==i}(this.options,t);this.updateOptions(t),this.featureManager.update(),e&&this.startAnimation()}setActive(t,e,n=!0){var i;this.element&&this.activeStates[t]!==e&&(this.activeStates[t]=e,null==(i=this.visualElement.variantChildren)||i.forEach((n=>{n.state.setActive(t,e,!1)})),n&&this.animateUpdates({isFallback:!e&&"exit"!==t&&this.visualElement.isControllingVariants,isExit:"exit"===t&&this.activeStates.exit}))}isMounted(){return Boolean(this.element)}willUpdate(t){var e;(this.options.layout||this.options.layoutId)&&(null==(e=this.visualElement.projection)||e.willUpdate())}}const _=new WeakMap;function q(t,e,n){return new CustomEvent(t,{detail:{target:e,isExit:n}})}const Z={syntax:"<angle>",initialValue:"0deg",toDefaultUnit:t=>`${t}deg`},J={translate:{syntax:"<length-percentage>",initialValue:"0px",toDefaultUnit:t=>`${t}px`},rotate:Z,scale:{syntax:"<number>",initialValue:1,toDefaultUnit:t=>t},skew:Z},Q=["","X","Y","Z"],tt=new Map,et=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"];["translate","scale","rotate","skew"].forEach((t=>{Q.forEach((e=>{et.push(t+e),tt.set(t+e,J[t])}))}));const nt=new Set(et),it={x:"translateX",y:"translateY",z:"translateZ"};function st([t],[e]){return et.indexOf(t)-et.indexOf(e)}function ot(t,[e,n]){return`${t} ${e}(${n})`}const rt={translate:[0,0],rotate:0,scale:1,skew:0,x:0,y:0,z:0};function at(t){return{test:e=>"string"==typeof e&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}}const lt=at("%"),ut=at("px");function ht(t){return Boolean(t&&t.getVelocity)}const ct=(t,e)=>{let n=k(e)?t.style.getPropertyValue(e):getComputedStyle(t)[e];if(!n&&"0"!==n){const t=tt.get(e);t&&(n=t.initialValue)}return n};function dt(t){var e;const n={},i=[];for(let o in t){let r=t[o];r=ht(r)?r.get():r,s=o,nt.has(s)&&o in it&&(o=it[o]);let a=Array.isArray(r)?r[0]:r;const l=tt.get(o);l?(a=C(r)?null==(e=l.toDefaultUnit)?void 0:e.call(l,r):r,i.push([o,a])):n[o]=a}var s;return i.length&&(n.transform=function(t){return t.sort(st).reduce(ot,"").trim()}(i)),0===Object.keys(n).length?null:n}const pt={fill:!0,stroke:!0,opacity:!0,"stroke-width":!0,"fill-opacity":!0,"stroke-opacity":!0,"stroke-linecap":!0,"stroke-linejoin":!0,"stroke-dasharray":!0,"stroke-dashoffset":!0,cx:!0,cy:!0,r:!0,d:!0,x1:!0,y1:!0,x2:!0,y2:!0,points:!0,"path-length":!0,viewBox:!0,width:!0,height:!0,"preserve-aspect-ratio":!0,"clip-path":!0,filter:!0,mask:!0,"stop-color":!0,"stop-opacity":!0,"gradient-transform":!0,"gradient-units":!0,"spread-method":!0,"marker-end":!0,"marker-mid":!0,"marker-start":!0,"text-anchor":!0,"dominant-baseline":!0,"font-family":!0,"font-size":!0,"font-weight":!0,"letter-spacing":!0,"vector-effect":!0};function mt(t){const e={},n={};for(const i in t){const s=i.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();if(s in pt){const n=t[i];e[s]=ht(n)?n.get():n}else n[i]=t[i]}return void 0!==e["path-length"]&&function(t,e,n=1,i=0){t.pathLength=1,delete t["path-length"],t["stroke-dashoffset"]=ut.transform(-i);const s=ut.transform(e),o=ut.transform(n);t["stroke-dasharray"]=`${s} ${o}`}(e,e["path-length"],e["path-spacing"],e["path-offset"]),{attrs:e,style:n}}"undefined"!=typeof WorkerGlobalScope&&(globalThis,WorkerGlobalScope);const ft=t=>void 0!==t;const yt=t=>Boolean(t&&t.getVelocity),gt={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"]},vt={};for(const Wa in gt)vt[Wa]={isEnabled:t=>gt[Wa].some((e=>!!t[e]))};const xt=()=>({x:{min:0,max:0},y:{min:0,max:0}}),bt="undefined"!=typeof window,wt={current:null},Tt={current:!1};const St=["initial","animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"];function Pt(t){return null!==(e=t.animate)&&"object"==typeof e&&"function"==typeof e.start||St.some((e=>function(t){return"string"==typeof t||Array.isArray(t)}(t[e])));var e}let At;function Et(){At=void 0}const Mt={now:()=>(void 0===At&&Mt.set(W.isProcessing||I.useManualTiming?W.timestamp:performance.now()),At),set:t=>{At=t,queueMicrotask(Et)}},Vt=new Set;function kt(t,e,n){t||Vt.has(e)||(console.warn(e),Vt.add(e))}function Ct(t,e){-1===t.indexOf(e)&&t.push(e)}function Dt(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}class jt{constructor(){this.subscriptions=[]}add(t){return Ct(this.subscriptions,t),()=>Dt(this.subscriptions,t)}notify(t,e,n){const i=this.subscriptions.length;if(i)if(1===i)this.subscriptions[0](t,e,n);else for(let s=0;s<i;s++){const i=this.subscriptions[s];i&&i(t,e,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function Bt(t,e){return e?t*(1e3/e):0}class Ot{constructor(t,e={}){this.version="__VERSION__",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(t,e=!0)=>{var n,i;const s=Mt.now();if(this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(t),this.current!==this.prev&&(null==(n=this.events.change)||n.notify(this.current),this.dependents))for(const o of this.dependents)o.dirty();e&&(null==(i=this.events.renderRequest)||i.notify(this.current))},this.hasAnimated=!1,this.setCurrent(t),this.owner=e.owner}setCurrent(t){var e;this.current=t,this.updatedAt=Mt.now(),null===this.canTrackVelocity&&void 0!==t&&(this.canTrackVelocity=(e=this.current,!isNaN(parseFloat(e))))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return"production"!==process.env.NODE_ENV&&kt(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,e){this.events[t]||(this.events[t]=new jt);const n=this.events[t].add(e);return"change"===t?()=>{n(),N.read((()=>{this.events.change.getSize()||this.stop()}))}:n}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,e){this.passiveEffect=t,this.stopPassiveEffect=e}set(t,e=!0){e&&this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t,e)}setWithVelocity(t,e,n){this.set(e),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-n}jump(t,e=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,e&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var t;null==(t=this.events.change)||t.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=Mt.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||t-this.updatedAt>30)return 0;const e=Math.min(this.updatedAt-this.prevUpdatedAt,30);return Bt(parseFloat(this.current)-parseFloat(this.prevFrameValue),e)}start(t){return this.stop(),new Promise((e=>{this.hasAnimated=!0,this.animation=t(e),this.events.animationStart&&this.events.animationStart.notify()})).then((()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()}))}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){var t,e;null==(t=this.dependents)||t.clear(),null==(e=this.events.destroy)||e.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Rt(t,e){return new Ot(t,e)}function Lt(t){const e=[{},{}];return null==t||t.values.forEach(((t,n)=>{e[0][n]=t.get(),e[1][n]=t.getVelocity()})),e}function Ft(t,e,n,i){if("function"==typeof e){const[s,o]=Lt(i);e=e(void 0!==n?n:t.custom,s,o)}if("string"==typeof e&&(e=t.variants&&t.variants[e]),"function"==typeof e){const[s,o]=Lt(i);e=e(void 0!==n?n:t.custom,s,o)}return e}const Ut=t=>180*t/Math.PI,It=t=>{const e=Ut(Math.atan2(t[1],t[0]));return Nt(e)},$t={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:It,rotateZ:It,skewX:t=>Ut(Math.atan(t[1])),skewY:t=>Ut(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},Nt=t=>((t%=360)<0&&(t+=360),t),zt=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),Wt=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),Yt={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:zt,scaleY:Wt,scale:t=>(zt(t)+Wt(t))/2,rotateX:t=>Nt(Ut(Math.atan2(t[6],t[5]))),rotateY:t=>Nt(Ut(Math.atan2(-t[2],t[0]))),rotateZ:It,rotate:It,skewX:t=>Ut(Math.atan(t[4])),skewY:t=>Ut(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function Xt(t){return t.includes("scale")?1:0}function Gt(t,e){if(!t||"none"===t)return Xt(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let i,s;if(n)i=Yt,s=n;else{const e=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);i=$t,s=e}if(!s)return Xt(e);const o=i[e],r=s[1].split(",").map(Ht);return"function"==typeof o?o(r):r[o]}function Ht(t){return parseFloat(t.trim())}const Kt=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],_t=(()=>new Set(Kt))(),qt=(t,e,n)=>n>e?e:n<t?t:n,Zt={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},Jt={...Zt,transform:t=>qt(0,1,t)},Qt={...Zt,default:1},te=t=>({test:e=>"string"==typeof e&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),ee=te("deg"),ne=te("%"),ie=te("px"),se=te("vh"),oe=te("vw"),re=(()=>({...ne,parse:t=>ne.parse(t)/100,transform:t=>ne.transform(100*t)}))(),ae=t=>t===Zt||t===ie,le=new Set(["x","y","z"]),ue=Kt.filter((t=>!le.has(t)));const he={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:(t,{transform:e})=>Gt(e,"x"),y:(t,{transform:e})=>Gt(e,"y")};he.translateX=he.x,he.translateY=he.y;const ce=new Set;let de=!1,pe=!1,me=!1;function fe(){if(pe){const t=Array.from(ce).filter((t=>t.needsMeasurement)),e=new Set(t.map((t=>t.element))),n=new Map;e.forEach((t=>{const e=function(t){const e=[];return ue.forEach((n=>{const i=t.getValue(n);void 0!==i&&(e.push([n,i.get()]),i.set(n.startsWith("scale")?1:0))})),e}(t);e.length&&(n.set(t,e),t.render())})),t.forEach((t=>t.measureInitialState())),e.forEach((t=>{t.render();const e=n.get(t);e&&e.forEach((([e,n])=>{var i;null==(i=t.getValue(e))||i.set(n)}))})),t.forEach((t=>t.measureEndState())),t.forEach((t=>{void 0!==t.suspendedScrollY&&window.scrollTo(0,t.suspendedScrollY)}))}pe=!1,de=!1,ce.forEach((t=>t.complete(me))),ce.clear()}function ye(){ce.forEach((t=>{t.readKeyframes(),t.needsMeasurement&&(pe=!0)}))}class ge{constructor(t,e,n,i,s,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=e,this.name=n,this.motionValue=i,this.element=s,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(ce.add(this),de||(de=!0,N.read(ye),N.resolveKeyframes(fe))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:e,element:n,motionValue:i}=this;if(null===t[0]){const s=null==i?void 0:i.get(),o=t[t.length-1];if(void 0!==s)t[0]=s;else if(n&&e){const i=n.readValue(e,o);null!=i&&(t[0]=i)}void 0===t[0]&&(t[0]=o),i&&void 0===s&&i.set(t[0])}!function(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),ce.delete(this)}cancel(){"scheduled"===this.state&&(ce.delete(this),this.state="pending")}resume(){"pending"===this.state&&this.scheduleResolve()}}const ve=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),xe=t=>/^0[^.\s]+$/u.test(t),be=t=>Math.round(1e5*t)/1e5,we=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;const Te=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Se=(t,e)=>n=>Boolean("string"==typeof n&&Te.test(n)&&n.startsWith(t)||e&&!function(t){return null==t}(n)&&Object.prototype.hasOwnProperty.call(n,e)),Pe=(t,e,n)=>i=>{if("string"!=typeof i)return i;const[s,o,r,a]=i.match(we);return{[t]:parseFloat(s),[e]:parseFloat(o),[n]:parseFloat(r),alpha:void 0!==a?parseFloat(a):1}},Ae={...Zt,transform:t=>Math.round((t=>qt(0,255,t))(t))},Ee={test:Se("rgb","red"),parse:Pe("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:i=1})=>"rgba("+Ae.transform(t)+", "+Ae.transform(e)+", "+Ae.transform(n)+", "+be(Jt.transform(i))+")"};const Me={test:Se("#"),parse:function(t){let e="",n="",i="",s="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),i=t.substring(5,7),s=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),i=t.substring(3,4),s=t.substring(4,5),e+=e,n+=n,i+=i,s+=s),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(i,16),alpha:s?parseInt(s,16)/255:1}},transform:Ee.transform},Ve={test:Se("hsl","hue"),parse:Pe("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:i=1})=>"hsla("+Math.round(t)+", "+ne.transform(be(e))+", "+ne.transform(be(n))+", "+be(Jt.transform(i))+")"},ke={test:t=>Ee.test(t)||Me.test(t)||Ve.test(t),parse:t=>Ee.test(t)?Ee.parse(t):Ve.test(t)?Ve.parse(t):Me.parse(t),transform:t=>"string"==typeof t?t:t.hasOwnProperty("red")?Ee.transform(t):Ve.transform(t)},Ce=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;const De="number",je="color",Be=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Oe(t){const e=t.toString(),n=[],i={color:[],number:[],var:[]},s=[];let o=0;const r=e.replace(Be,(t=>(ke.test(t)?(i.color.push(o),s.push(je),n.push(ke.parse(t))):t.startsWith("var(")?(i.var.push(o),s.push("var"),n.push(t)):(i.number.push(o),s.push(De),n.push(parseFloat(t))),++o,"${}"))).split("${}");return{values:n,split:r,indexes:i,types:s}}function Re(t){return Oe(t).values}function Le(t){const{split:e,types:n}=Oe(t),i=e.length;return t=>{let s="";for(let o=0;o<i;o++)if(s+=e[o],void 0!==t[o]){const e=n[o];s+=e===De?be(t[o]):e===je?ke.transform(t[o]):t[o]}return s}}const Fe=t=>"number"==typeof t?0:t;const Ue={test:function(t){var e,n;return isNaN(t)&&"string"==typeof t&&((null==(e=t.match(we))?void 0:e.length)||0)+((null==(n=t.match(Ce))?void 0:n.length)||0)>0},parse:Re,createTransformer:Le,getAnimatableNone:function(t){const e=Re(t);return Le(t)(e.map(Fe))}},Ie=t=>e=>e.test(t),$e=[Zt,ie,ne,ee,oe,se,{test:t=>"auto"===t,parse:t=>t}],Ne=t=>$e.find(Ie(t)),ze=[...$e,ke,Ue],We=new Set(["brightness","contrast","saturate","opacity"]);function Ye(t){const[e,n]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[i]=n.match(we)||[];if(!i)return t;const s=n.replace(i,"");let o=We.has(e)?1:0;return i!==n&&(o*=100),e+"("+o+s+")"}const Xe=/\b([a-z-]*)\(.*?\)/gu,Ge={...Ue,getAnimatableNone:t=>{const e=t.match(Xe);return e?e.map(Ye).join(" "):t}},He={...Zt,transform:Math.round},Ke={borderWidth:ie,borderTopWidth:ie,borderRightWidth:ie,borderBottomWidth:ie,borderLeftWidth:ie,borderRadius:ie,radius:ie,borderTopLeftRadius:ie,borderTopRightRadius:ie,borderBottomRightRadius:ie,borderBottomLeftRadius:ie,width:ie,maxWidth:ie,height:ie,maxHeight:ie,top:ie,right:ie,bottom:ie,left:ie,padding:ie,paddingTop:ie,paddingRight:ie,paddingBottom:ie,paddingLeft:ie,margin:ie,marginTop:ie,marginRight:ie,marginBottom:ie,marginLeft:ie,backgroundPositionX:ie,backgroundPositionY:ie,...{rotate:ee,rotateX:ee,rotateY:ee,rotateZ:ee,scale:Qt,scaleX:Qt,scaleY:Qt,scaleZ:Qt,skew:ee,skewX:ee,skewY:ee,distance:ie,translateX:ie,translateY:ie,translateZ:ie,x:ie,y:ie,z:ie,perspective:ie,transformPerspective:ie,opacity:Jt,originX:re,originY:re,originZ:ie},zIndex:He,fillOpacity:Jt,strokeOpacity:Jt,numOctaves:He},_e={...Ke,color:ke,backgroundColor:ke,outlineColor:ke,fill:ke,stroke:ke,borderColor:ke,borderTopColor:ke,borderRightColor:ke,borderBottomColor:ke,borderLeftColor:ke,filter:Ge,WebkitFilter:Ge},qe=t=>_e[t];function Ze(t,e){let n=qe(t);return n!==Ge&&(n=Ue),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const Je=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Qe{scrapeMotionValuesFromProps(t,e,n){return{}}constructor({parent:t,props:e,presenceContext:n,reducedMotionConfig:i,blockInitialAnimation:s,visualState:o},r={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=ge,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.renderScheduledAt=0,this.scheduleRender=()=>{const t=Mt.now();this.renderScheduledAt<t&&(this.renderScheduledAt=t,N.render(this.render,!1,!0))};const{latestValues:a,renderState:l}=o;this.latestValues=a,this.baseTarget={...a},this.initialValues=e.initial?{...a}:{},this.renderState=l,this.parent=t,this.props=e,this.presenceContext=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.options=r,this.blockInitialAnimation=Boolean(s),this.isControllingVariants=Pt(e),this.isVariantNode=function(t){return Boolean(Pt(t)||t.variants)}(e),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(t&&t.current);const{willChange:u,...h}=this.scrapeMotionValuesFromProps(e,{},this);for(const c in h){const t=h[c];void 0!==a[c]&&yt(t)&&t.set(a[c],!1)}}mount(t){this.current=t,_.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach(((t,e)=>this.bindToMotionValue(e,t))),Tt.current||function(){if(Tt.current=!0,bt)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>wt.current=t.matches;t.addListener(e),e()}else wt.current=!1}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||wt.current),"production"!==process.env.NODE_ENV&&kt(!0!==this.shouldReduceMotion,"You have Reduced Motion enabled on your device. Animations may not appear as expected."),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),z(this.notifyUpdate),z(this.render),this.valueSubscriptions.forEach((t=>t())),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const e=this.features[t];e&&(e.unmount(),e.isMounted=!1)}this.current=null}bindToMotionValue(t,e){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const n=_t.has(t);n&&this.onBindTransform&&this.onBindTransform();const i=e.on("change",(e=>{this.latestValues[t]=e,this.props.onUpdate&&N.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0)})),s=e.on("renderRequest",this.scheduleRender);let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,t,e)),this.valueSubscriptions.set(t,(()=>{i(),s(),o&&o(),e.owner&&e.stop()}))}sortNodePosition(t){return this.current&&this.sortInstanceNodePosition&&this.type===t.type?this.sortInstanceNodePosition(this.current,t.current):0}updateFeatures(){let t="animation";for(t in vt){const e=vt[t];if(!e)continue;const{isEnabled:n,Feature:i}=e;if(!this.features[t]&&i&&n(this.props)&&(this.features[t]=new i(this)),this.features[t]){const e=this.features[t];e.isMounted?e.update():(e.mount(),e.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):{x:{min:0,max:0},y:{min:0,max:0}}}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,e){this.latestValues[t]=e}update(t,e){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=e;for(let n=0;n<Je.length;n++){const e=Je[n];this.propEventSubscriptions[e]&&(this.propEventSubscriptions[e](),delete this.propEventSubscriptions[e]);const i=t["on"+e];i&&(this.propEventSubscriptions[e]=this.on(e,i))}this.prevMotionValues=function(t,e,n){for(const i in e){const s=e[i],o=n[i];if(yt(s))t.addValue(i,s);else if(yt(o))t.addValue(i,Rt(s,{owner:t}));else if(o!==s)if(t.hasValue(i)){const e=t.getValue(i);!0===e.liveStyle?e.jump(s):e.hasAnimated||e.set(s)}else{const e=t.getStaticValue(i);t.addValue(i,Rt(void 0!==e?e:s,{owner:t}))}}for(const i in n)void 0===e[i]&&t.removeValue(i);return e}(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const e=this.getClosestVariantNode();if(e)return e.variantChildren&&e.variantChildren.add(t),()=>e.variantChildren.delete(t)}addValue(t,e){const n=this.values.get(t);e!==n&&(n&&this.removeValue(t),this.bindToMotionValue(t,e),this.values.set(t,e),this.latestValues[t]=e.get())}removeValue(t){this.values.delete(t);const e=this.valueSubscriptions.get(t);e&&(e(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,e){if(this.props.values&&this.props.values[t])return this.props.values[t];let n=this.values.get(t);return void 0===n&&void 0!==e&&(n=Rt(null===e?void 0:e,{owner:this}),this.addValue(t,n)),n}readValue(t,e){let n=void 0===this.latestValues[t]&&this.current?this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options):this.latestValues[t];var i;return null!=n&&("string"==typeof n&&(ve(n)||xe(n))?n=parseFloat(n):(i=n,!ze.find(Ie(i))&&Ue.test(e)&&(n=Ze(t,e))),this.setBaseTarget(t,yt(n)?n.get():n)),yt(n)?n.get():n}setBaseTarget(t,e){this.baseTarget[t]=e}getBaseTarget(t){var e;const{initial:n}=this.props;let i;if("string"==typeof n||"object"==typeof n){const s=Ft(this.props,n,null==(e=this.presenceContext)?void 0:e.custom);s&&(i=s[t])}if(n&&void 0!==i)return i;const s=this.getBaseTargetFromProps(this.props,t);return void 0===s||yt(s)?void 0!==this.initialValues[t]&&void 0===i?void 0:this.baseTarget[t]:s}on(t,e){return this.events[t]||(this.events[t]=new jt),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}}const tn=new Set(["width","height","top","left","right","bottom",...Kt]);let en=()=>{},nn=()=>{};"production"!==process.env.NODE_ENV&&(en=(t,e)=>{t||"undefined"==typeof console||console.warn(e)},nn=(t,e)=>{if(!t)throw new Error(e)});const sn=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function on(t,e,n=1){nn(n<=4,`Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`);const[i,s]=function(t){const e=sn.exec(t);if(!e)return[,];const[,n,i,s]=e;return[`--${n??i}`,s]}(t);if(!i)return;const o=window.getComputedStyle(e).getPropertyValue(i);if(o){const t=o.trim();return ve(t)?parseFloat(t):t}return f(s)?on(s,e,n+1):s}const rn=new Set(["auto","none","0"]);class an extends ge{constructor(t,e,n,i,s){super(t,e,n,i,s,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:e,name:n}=this;if(!e||!e.current)return;super.readKeyframes();for(let a=0;a<t.length;a++){let n=t[a];if("string"==typeof n&&(n=n.trim(),f(n))){const i=on(n,e.current);void 0!==i&&(t[a]=i),a===t.length-1&&(this.finalKeyframe=n)}}if(this.resolveNoneKeyframes(),!tn.has(n)||2!==t.length)return;const[i,s]=t,o=Ne(i),r=Ne(s);if(o!==r)if(ae(o)&&ae(r))for(let a=0;a<t.length;a++){const e=t[a];"string"==typeof e&&(t[a]=parseFloat(e))}else he[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:e}=this,n=[];for(let s=0;s<t.length;s++)(null===t[s]||("number"==typeof(i=t[s])?0===i:null===i||"none"===i||"0"===i||xe(i)))&&n.push(s);var i;n.length&&function(t,e,n){let i,s=0;for(;s<t.length&&!i;){const e=t[s];"string"==typeof e&&!rn.has(e)&&Oe(e).values.length&&(i=t[s]),s++}if(i&&n)for(const o of e)t[o]=Ze(n,i)}(t,n,e)}measureInitialState(){const{element:t,unresolvedKeyframes:e,name:n}=this;if(!t||!t.current)return;"height"===n&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=he[n](t.measureViewportBox(),window.getComputedStyle(t.current)),e[0]=this.measuredOrigin;const i=e[e.length-1];void 0!==i&&t.getValue(n,i).jump(i,!1)}measureEndState(){var t;const{element:e,name:n,unresolvedKeyframes:i}=this;if(!e||!e.current)return;const s=e.getValue(n);s&&s.jump(this.measuredOrigin,!1);const o=i.length-1,r=i[o];i[o]=he[n](e.measureViewportBox(),window.getComputedStyle(e.current)),null!==r&&void 0===this.finalKeyframe&&(this.finalKeyframe=r),(null==(t=this.removedTransforms)?void 0:t.length)&&this.removedTransforms.forEach((([t,n])=>{e.getValue(t).set(n)})),this.resolveNoneKeyframes()}}class ln extends Qe{constructor(){super(...arguments),this.KeyframeResolver=an}sortInstanceNodePosition(t,e){return 2&t.compareDocumentPosition(e)?1:-1}getBaseTargetFromProps(t,e){return t.style?t.style[e]:void 0}removeValueFromRenderState(t,{vars:e,style:n}){delete e[t],delete n[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;yt(t)&&(this.childSubscription=t.on("change",(t=>{this.current&&(this.current.textContent=`${t}`)})))}}const un=(t,e)=>e&&"number"==typeof t?e.transform(t):t,hn={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},cn=Kt.length;function dn(t,e,n){const{style:i,vars:s,transformOrigin:o}=t;let r=!1,a=!1;for(const l in e){const t=e[l];if(_t.has(l))r=!0;else if(p(l))s[l]=t;else{const e=un(t,Ke[l]);l.startsWith("origin")?(a=!0,o[l]=e):i[l]=e}}if(e.transform||(r||n?i.transform=function(t,e,n){let i="",s=!0;for(let o=0;o<cn;o++){const r=Kt[o],a=t[r];if(void 0===a)continue;let l=!0;if(l="number"==typeof a?a===(r.startsWith("scale")?1:0):0===parseFloat(a),!l||n){const t=un(a,Ke[r]);l||(s=!1,i+=`${hn[r]||r}(${t}) `),n&&(e[r]=t)}}return i=i.trim(),n?i=n(e,s?"":i):s&&(i="none"),i}(e,t.transform,n):i.transform&&(i.transform="none")),a){const{originX:t="50%",originY:e="50%",originZ:n=0}=o;i.transformOrigin=`${t} ${e} ${n}`}}function pn(t,{style:e,vars:n},i,s){Object.assign(t.style,e,s&&s.getProjectionStyles(i));for(const o in n)t.style.setProperty(o,n[o])}function mn(t,{layout:e,layoutId:n}){return _t.has(t)||t.startsWith("origin")||(e||void 0!==n)&&(!!g[t]||"opacity"===t)}function fn(t,e,n){var i;const{style:s}=t,o={};for(const r in s)(yt(s[r])||e.style&&yt(e.style[r])||mn(r,t)||void 0!==(null==(i=null==n?void 0:n.getValue(r))?void 0:i.liveStyle))&&(o[r]=s[r]);return o}class yn extends ln{constructor(){super(...arguments),this.type="html",this.renderInstance=pn}readValueFromInstance(t,e){if(_t.has(e))return((t,e)=>{const{transform:n="none"}=getComputedStyle(t);return Gt(n,e)})(t,e);{const i=(n=t,window.getComputedStyle(n)),s=(p(e)?i.getPropertyValue(e):i[e])||0;return"string"==typeof s?s.trim():s}var n}measureInstanceViewportBox(t,{transformPagePoint:e}){return function(t,e){return function({top:t,left:e,right:n,bottom:i}){return{x:{min:e,max:n},y:{min:t,max:i}}}(function(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),i=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:i.y,right:i.x}}(t.getBoundingClientRect(),e))}(t,e)}build(t,e,n){dn(t,e,n.transformTemplate)}scrapeMotionValuesFromProps(t,e,n){return fn(t,e,n)}}const gn=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),vn={offset:"stroke-dashoffset",array:"stroke-dasharray"},xn={offset:"strokeDashoffset",array:"strokeDasharray"};function bn(t,{attrX:e,attrY:n,attrScale:i,pathLength:s,pathSpacing:o=1,pathOffset:r=0,...a},l,u,h){if(dn(t,a,u),l)return void(t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox));t.attrs=t.style,t.style={};const{attrs:c,style:d}=t;c.transform&&(d.transform=c.transform,delete c.transform),(d.transform||c.transformOrigin)&&(d.transformOrigin=c.transformOrigin??"50% 50%",delete c.transformOrigin),d.transform&&(d.transformBox=(null==h?void 0:h.transformBox)??"fill-box",delete c.transformBox),void 0!==e&&(c.x=e),void 0!==n&&(c.y=n),void 0!==i&&(c.scale=i),void 0!==s&&function(t,e,n=1,i=0,s=!0){t.pathLength=1;const o=s?vn:xn;t[o.offset]=ie.transform(-i);const r=ie.transform(e),a=ie.transform(n);t[o.array]=`${r} ${a}`}(c,s,o,r,!1)}const wn=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"]);class Tn extends ln{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=xt}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){if(_t.has(e)){const t=qe(e);return t&&t.default||0}return e=wn.has(e)?e:gn(e),t.getAttribute(e)}scrapeMotionValuesFromProps(t,e,n){return function(t,e,n){const i=fn(t,e,n);for(const s in t)(yt(t[s])||yt(e[s]))&&(i[-1!==Kt.indexOf(s)?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s]=t[s]);return i}(t,e,n)}build(t,e,n){bn(t,e,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(t,e,n,i){!function(t,e,n,i){pn(t,e,void 0,i);for(const s in e.attrs)t.setAttribute(wn.has(s)?s:gn(s),e.attrs[s])}(t,e,0,i)}mount(t){var e;this.isSVGTag="string"==typeof(e=t.tagName)&&"svg"===e.toLowerCase(),super.mount(t)}}function Sn(t){return"object"==typeof t&&!Array.isArray(t)}function Pn(t,e,n){if(t instanceof EventTarget)return[t];if("string"==typeof t){let e=document;const i=(null==n?void 0:n[t])??e.querySelectorAll(t);return i?Array.from(i):[]}return Array.from(t)}function An(t,e,n,i){return"string"==typeof t&&Sn(e)?Pn(t,0,i):t instanceof NodeList?Array.from(t):Array.isArray(t)?t:[t]}function En(t,e,n){return t*(e+1)}function Mn(t,e,n,i){return"number"==typeof e?e:e.startsWith("-")||e.startsWith("+")?Math.max(0,t+parseFloat(e)):"<"===e?n:i.get(e)??t}const Vn=(t,e,n)=>t+(e-t)*n,kn=t=>Array.isArray(t)&&"number"!=typeof t[0];function Cn(t,e){return kn(t)?t[((t,e,n)=>{const i=e-t;return((n-t)%i+i)%i+t})(0,t.length,e)]:t}function Dn(t,e,n,i,s,o){!function(t,e,n){for(let i=0;i<t.length;i++){const s=t[i];s.at>e&&s.at<n&&(Dt(t,s),i--)}}(t,s,o);for(let r=0;r<e.length;r++)t.push({value:e[r],at:Vn(s,o,i[r]),easing:Cn(n,r)})}function jn(t,e){for(let n=0;n<t.length;n++)t[n]=t[n]/(e+1)}function Bn(t,e){return t.at===e.at?null===t.value?1:null===e.value?-1:0:t.at-e.at}const On=(t,e,n)=>{const i=e-t;return 0===i?1:(n-t)/i};function Rn(t,e){const n=t[t.length-1];for(let i=1;i<=e;i++){const s=On(0,e,i);t.push(Vn(n,1,s))}}function Ln(t){const e=[0];return Rn(e,t.length-1),e}const Fn=2e4;function Un(t){let e=0;let n=t.next(e);for(;!n.done&&e<Fn;)e+=50,n=t.next(e);return e>=Fn?1/0:e}const In=t=>1e3*t,$n=t=>t/1e3;function Nn(t,e=100,n){const i=n({...t,keyframes:[0,e]}),s=Math.min(Un(i),Fn);return{type:"keyframes",ease:t=>i.next(s*t).value/e,duration:$n(s)}}function zn(t){return"function"==typeof t&&"applyToOptions"in t}function Wn(t,e){return!e.has(t)&&e.set(t,{}),e.get(t)}function Yn(t,e){return e[t]||(e[t]=[]),e[t]}function Xn(t){return Array.isArray(t)?t:[t]}function Gn(t,e){return t&&t[e]?{...t,...t[e]}:{...t}}const Hn=t=>"number"==typeof t,Kn=t=>t.every(Hn);function _n(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,Rt(n))}function qn(t){return(t=>Array.isArray(t))(t)?t[t.length-1]||0:t}function Zn(t,e){const n=function(t,e){const n=t.getProps();return Ft(n,e,n.custom,t)}(t,e);let{transitionEnd:i={},transition:s={},...o}=n||{};o={...o,...i};for(const r in o){_n(t,r,qn(o[r]))}}function Jn(t,e){const n=t.getValue("willChange");if(i=n,Boolean(yt(i)&&i.add))return n.add(e);if(!n&&I.WillChange){const n=new I.WillChange("auto");t.addValue("willChange",n),n.add(e)}var i}const Qn="data-"+gn("framerAppearId");function ti(t){return t.props[Qn]}const ei=t=>null!==t;const ni={type:"spring",stiffness:500,damping:25,restSpeed:10},ii={type:"keyframes",duration:.8},si={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},oi=(t,{keyframes:e})=>e.length>2?ii:_t.has(t)?t.startsWith("scale")?{type:"spring",stiffness:550,damping:0===e[1]?2*Math.sqrt(550):30,restSpeed:10}:ni:si;function ri(t,e){return(null==t?void 0:t[e])??(null==t?void 0:t.default)??t}function ai(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function li(t,e){return n=>n>0?e:t}const ui=(t,e,n)=>{const i=t*t,s=n*(e*e-i)+i;return s<0?0:Math.sqrt(s)},hi=[Me,Ee,Ve];function ci(t){const e=(n=t,hi.find((t=>t.test(n))));var n;if(en(Boolean(e),`'${t}' is not an animatable color. Use the equivalent color code instead.`),!Boolean(e))return!1;let i=e.parse(t);return e===Ve&&(i=function({hue:t,saturation:e,lightness:n,alpha:i}){t/=360,n/=100;let s=0,o=0,r=0;if(e/=100){const i=n<.5?n*(1+e):n+e-n*e,a=2*n-i;s=ai(a,i,t+1/3),o=ai(a,i,t),r=ai(a,i,t-1/3)}else s=o=r=n;return{red:Math.round(255*s),green:Math.round(255*o),blue:Math.round(255*r),alpha:i}}(i)),i}const di=(t,e)=>{const n=ci(t),i=ci(e);if(!n||!i)return li(t,e);const s={...n};return t=>(s.red=ui(n.red,i.red,t),s.green=ui(n.green,i.green,t),s.blue=ui(n.blue,i.blue,t),s.alpha=Vn(n.alpha,i.alpha,t),Ee.transform(s))},pi=new Set(["none","hidden"]);const mi=(t,e)=>n=>e(t(n)),fi=(...t)=>t.reduce(mi);function yi(t,e){return n=>Vn(t,e,n)}function gi(t){return"number"==typeof t?yi:"string"==typeof t?f(t)?li:ke.test(t)?di:bi:Array.isArray(t)?vi:"object"==typeof t?ke.test(t)?di:xi:li}function vi(t,e){const n=[...t],i=n.length,s=t.map(((t,n)=>gi(t)(t,e[n])));return t=>{for(let e=0;e<i;e++)n[e]=s[e](t);return n}}function xi(t,e){const n={...t,...e},i={};for(const s in n)void 0!==t[s]&&void 0!==e[s]&&(i[s]=gi(t[s])(t[s],e[s]));return t=>{for(const e in i)n[e]=i[e](t);return n}}const bi=(t,e)=>{const n=Ue.createTransformer(e),i=Oe(t),s=Oe(e);return i.indexes.var.length===s.indexes.var.length&&i.indexes.color.length===s.indexes.color.length&&i.indexes.number.length>=s.indexes.number.length?pi.has(t)&&!s.values.length||pi.has(e)&&!i.values.length?function(t,e){return pi.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}(t,e):fi(vi(function(t,e){const n=[],i={color:0,var:0,number:0};for(let s=0;s<e.values.length;s++){const o=e.types[s],r=t.indexes[o][i[o]],a=t.values[r]??0;n[s]=a,i[o]++}return n}(i,s),s.values),n):(en(!0,`Complex values '${t}' and '${e}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),li(t,e))};function wi(t,e,n){if("number"==typeof t&&"number"==typeof e&&"number"==typeof n)return Vn(t,e,n);return gi(t)(t,e)}const Ti=t=>{const e=({timestamp:e})=>t(e);return{start:(t=!0)=>N.update(e,t),stop:()=>z(e),now:()=>W.isProcessing?W.timestamp:Mt.now()}},Si=(t,e,n=10)=>{let i="";const s=Math.max(Math.round(e/n),2);for(let o=0;o<s;o++)i+=t(o/(s-1))+", ";return`linear(${i.substring(0,i.length-2)})`};function Pi(t,e,n){const i=Math.max(e-5,0);return Bt(n-t(i),e-i)}const Ai=100,Ei=10,Mi=1,Vi=0,ki=800,Ci=.3,Di=.3,ji={granular:.01,default:2},Bi={granular:.005,default:.5},Oi=.01,Ri=10,Li=.05,Fi=1;function Ui({duration:t=ki,bounce:e=Ci,velocity:n=Vi,mass:i=Mi}){let s,o;en(t<=In(Ri),"Spring duration must be 10 seconds or less");let r=1-e;r=qt(Li,Fi,r),t=qt(Oi,Ri,$n(t)),r<1?(s=e=>{const i=e*r,s=i*t;return.001-(i-n)/$i(e,r)*Math.exp(-s)},o=e=>{const i=e*r*t,o=i*n+n,a=Math.pow(r,2)*Math.pow(e,2)*t,l=Math.exp(-i),u=$i(Math.pow(e,2),r);return(.001-s(e)>0?-1:1)*((o-a)*l)/u}):(s=e=>Math.exp(-e*t)*((e-n)*t+1)-.001,o=e=>Math.exp(-e*t)*(t*t*(n-e)));const a=function(t,e,n){let i=n;for(let s=1;s<Ii;s++)i-=t(i)/e(i);return i}(s,o,5/t);if(t=In(t),isNaN(a))return{stiffness:Ai,damping:Ei,duration:t};{const e=Math.pow(a,2)*i;return{stiffness:e,damping:2*r*Math.sqrt(i*e),duration:t}}}const Ii=12;function $i(t,e){return t*Math.sqrt(1-e*e)}const Ni=["duration","bounce"],zi=["stiffness","damping","mass"];function Wi(t,e){return e.some((e=>void 0!==t[e]))}function Yi(t=Di,e=Ci){const n="object"!=typeof t?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:i,restDelta:s}=n;const o=n.keyframes[0],r=n.keyframes[n.keyframes.length-1],a={done:!1,value:o},{stiffness:l,damping:u,mass:h,duration:c,velocity:d,isResolvedFromDuration:p}=function(t){let e={velocity:Vi,stiffness:Ai,damping:Ei,mass:Mi,isResolvedFromDuration:!1,...t};if(!Wi(t,zi)&&Wi(t,Ni))if(t.visualDuration){const n=t.visualDuration,i=2*Math.PI/(1.2*n),s=i*i,o=2*qt(.05,1,1-(t.bounce||0))*Math.sqrt(s);e={...e,mass:Mi,stiffness:s,damping:o}}else{const n=Ui(t);e={...e,...n,mass:Mi},e.isResolvedFromDuration=!0}return e}({...n,velocity:-$n(n.velocity||0)}),m=d||0,f=u/(2*Math.sqrt(l*h)),y=r-o,g=$n(Math.sqrt(l/h)),v=Math.abs(y)<5;let x;if(i||(i=v?ji.granular:ji.default),s||(s=v?Bi.granular:Bi.default),f<1){const t=$i(g,f);x=e=>{const n=Math.exp(-f*g*e);return r-n*((m+f*g*y)/t*Math.sin(t*e)+y*Math.cos(t*e))}}else if(1===f)x=t=>r-Math.exp(-g*t)*(y+(m+g*y)*t);else{const t=g*Math.sqrt(f*f-1);x=e=>{const n=Math.exp(-f*g*e),i=Math.min(t*e,300);return r-n*((m+f*g*y)*Math.sinh(i)+t*y*Math.cosh(i))/t}}const b={calculatedDuration:p&&c||null,next:t=>{const e=x(t);if(p)a.done=t>=c;else{let n=0===t?m:0;f<1&&(n=0===t?In(m):Pi(x,t,e));const o=Math.abs(n)<=i,l=Math.abs(r-e)<=s;a.done=o&&l}return a.value=a.done?r:e,a},toString:()=>{const t=Math.min(Un(b),Fn),e=Si((e=>b.next(t*e).value),t,30);return t+"ms "+e},toTransition:()=>{}};return b}function Xi({keyframes:t,velocity:e=0,power:n=.8,timeConstant:i=325,bounceDamping:s=10,bounceStiffness:o=500,modifyTarget:r,min:a,max:l,restDelta:u=.5,restSpeed:h}){const c=t[0],d={done:!1,value:c},p=t=>void 0===a?l:void 0===l||Math.abs(a-t)<Math.abs(l-t)?a:l;let m=n*e;const f=c+m,y=void 0===r?f:r(f);y!==f&&(m=y-c);const g=t=>-m*Math.exp(-t/i),v=t=>y+g(t),x=t=>{const e=g(t),n=v(t);d.done=Math.abs(e)<=u,d.value=d.done?y:n};let b,w;const T=t=>{var e;(e=d.value,void 0!==a&&e<a||void 0!==l&&e>l)&&(b=t,w=Yi({keyframes:[d.value,p(d.value)],velocity:Pi(v,t,d.value),damping:s,stiffness:o,restDelta:u,restSpeed:h}))};return T(0),{calculatedDuration:null,next:t=>{let e=!1;return w||void 0!==b||(e=!0,x(t),T(t)),void 0!==b&&t>=b?w.next(t-b):(!e&&x(t),d)}}}function Gi(t,e,{clamp:n=!0,ease:i,mixer:s}={}){const o=t.length;if(nn(o===e.length,"Both input and output ranges must be the same length"),1===o)return()=>e[0];if(2===o&&e[0]===e[1])return()=>e[1];const r=t[0]===t[1];t[0]>t[o-1]&&(t=[...t].reverse(),e=[...e].reverse());const a=function(t,e,n){const i=[],s=n||I.mix||wi,o=t.length-1;for(let r=0;r<o;r++){let n=s(t[r],t[r+1]);if(e){const t=Array.isArray(e)?e[r]||F:e;n=fi(t,n)}i.push(n)}return i}(e,i,s),l=a.length,u=n=>{if(r&&n<t[0])return e[0];let i=0;if(l>1)for(;i<t.length-2&&!(n<t[i+1]);i++);const s=On(t[i],t[i+1],n);return a[i](s)};return n?e=>u(qt(t[0],t[o-1],e)):u}Yi.applyToOptions=t=>{const e=Nn(t,100,Yi);return t.ease=e.ease,t.duration=In(e.duration),t.type="keyframes",t};const Hi=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t;function Ki(t,e,n,i){if(t===e&&n===i)return F;const s=e=>function(t,e,n,i,s){let o,r,a=0;do{r=e+(n-e)/2,o=Hi(r,i,s)-t,o>0?n=r:e=r}while(Math.abs(o)>1e-7&&++a<12);return r}(e,0,1,t,n);return t=>0===t||1===t?t:Hi(s(t),e,i)}const _i=Ki(.42,0,1,1),qi=Ki(0,0,.58,1),Zi=Ki(.42,0,.58,1),Ji=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,Qi=t=>e=>1-t(1-e),ts=Ki(.33,1.53,.69,.99),es=Qi(ts),ns=Ji(es),is=t=>(t*=2)<1?.5*es(t):.5*(2-Math.pow(2,-10*(t-1))),ss=t=>1-Math.sin(Math.acos(t)),os=Qi(ss),rs=Ji(ss),as=t=>Array.isArray(t)&&"number"==typeof t[0],ls={linear:F,easeIn:_i,easeInOut:Zi,easeOut:qi,circIn:ss,circInOut:rs,circOut:os,backIn:es,backInOut:ns,backOut:ts,anticipate:is},us=t=>{if(as(t)){nn(4===t.length,"Cubic bezier arrays must contain four numerical values.");const[e,n,i,s]=t;return Ki(e,n,i,s)}return"string"==typeof t?(nn(void 0!==ls[t],`Invalid easing type '${t}'`),ls[t]):t};function hs({duration:t=300,keyframes:e,times:n,ease:i="easeInOut"}){const s=kn(i)?i.map(us):us(i),o={done:!1,value:e[0]},r=function(t,e){return t.map((t=>t*e))}(n&&n.length===e.length?n:Ln(e),t),a=Gi(r,e,{ease:Array.isArray(s)?s:(l=e,u=s,l.map((()=>u||Zi)).splice(0,l.length-1))});var l,u;return{calculatedDuration:t,n