heartbeat-monitor/node_modules/framer-motion/dist/size-rollup-dom-max-assets.js

2 lines
31 KiB
JavaScript

import{createContext as t}from"react";function e(t,e){-1===t.indexOf(e)&&t.push(e)}function s(t,e){const s=t.indexOf(e);s>-1&&t.splice(s,1)}const n=(t,e,s)=>s>e?e:s<t?t:s;function i(t,e){return e?`${t}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${e}`:t}let a=()=>{},r=()=>{};"undefined"!=typeof process&&"production"!==process.env?.NODE_ENV&&(a=(t,e,s)=>{t||"undefined"==typeof console||console.warn(i(e,s))},r=(t,e,s)=>{if(!t)throw new Error(i(e,s))});const o={},h=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),l=t=>/^0[^.\s]+$/u.test(t);function u(t){let e;return()=>(void 0===e&&(e=t()),e)}const c=t=>t;class d{constructor(){this.subscriptions=[]}add(t){return e(this.subscriptions,t),()=>s(this.subscriptions,t)}notify(t,e,s){const n=this.subscriptions.length;if(n)if(1===n)this.subscriptions[0](t,e,s);else for(let i=0;i<n;i++){const n=this.subscriptions[i];n&&n(t,e,s)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const p=t=>1e3*t,f=t=>t/1e3;function m(t,e){return e?t*(1e3/e):0}const g=t=>Array.isArray(t)&&"number"==typeof t[0],v=t({}),y=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"],b={value:null,addProjectionMetrics:null};function w(t,e){let s=!1,n=!0;const i={delta:0,timestamp:0,isProcessing:!1},a=()=>s=!0,r=y.reduce((t,s)=>(t[s]=function(t,e){let s=new Set,n=new Set,i=!1,a=!1;const r=new WeakSet;let o={delta:0,timestamp:0,isProcessing:!1},h=0;function l(e){r.has(e)&&(u.schedule(e),t()),h++,e(o)}const u={schedule:(t,e=!1,a=!1)=>{const o=a&&i?s:n;return e&&r.add(t),o.has(t)||o.add(t),t},cancel:t=>{n.delete(t),r.delete(t)},process:t=>{o=t,i?a=!0:(i=!0,[s,n]=[n,s],s.forEach(l),e&&b.value&&b.value.frameloop[e].push(h),h=0,s.clear(),i=!1,a&&(a=!1,u.process(t)))}};return u}(a,e?s:void 0),t),{}),{setup:h,read:l,resolveKeyframes:u,preUpdate:c,update:d,preRender:p,render:f,postRender:m}=r,g=()=>{const a=o.useManualTiming?i.timestamp:performance.now();s=!1,o.useManualTiming||(i.delta=n?1e3/60:Math.max(Math.min(a-i.timestamp,40),1)),i.timestamp=a,i.isProcessing=!0,h.process(i),l.process(i),u.process(i),c.process(i),d.process(i),p.process(i),f.process(i),m.process(i),i.isProcessing=!1,s&&e&&(n=!1,t(g))};return{schedule:y.reduce((e,a)=>{const o=r[a];return e[a]=(e,a=!1,r=!1)=>(s||(s=!0,n=!0,i.isProcessing||t(g)),o.schedule(e,a,r)),e},{}),cancel:t=>{for(let e=0;e<y.length;e++)r[y[e]].cancel(t)},state:i,steps:r}}const{schedule:V,cancel:S,state:M,steps:T}=w("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:c,!0);let A;function C(){A=void 0}const k={now:()=>(void 0===A&&k.set(M.isProcessing||o.useManualTiming?M.timestamp:performance.now()),A),set:t=>{A=t,queueMicrotask(C)}},x=t=>e=>"string"==typeof e&&e.startsWith(t),F=x("--"),P=x("var(--"),E=t=>!!P(t)&&B.test(t.split("/*")[0].trim()),B=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function R(t){return"string"==typeof t&&t.split("/*")[0].includes("var(--")}const I={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},N={...I,transform:t=>n(0,1,t)},O={...I,default:1},$=t=>Math.round(1e5*t)/1e5,L=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;const Y=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,j=(t,e)=>s=>Boolean("string"==typeof s&&Y.test(s)&&s.startsWith(t)||e&&!function(t){return null==t}(s)&&Object.prototype.hasOwnProperty.call(s,e)),W=(t,e,s)=>n=>{if("string"!=typeof n)return n;const[i,a,r,o]=n.match(L);return{[t]:parseFloat(i),[e]:parseFloat(a),[s]:parseFloat(r),alpha:void 0!==o?parseFloat(o):1}},X={...I,transform:t=>Math.round((t=>n(0,255,t))(t))},K={test:j("rgb","red"),parse:W("red","green","blue"),transform:({red:t,green:e,blue:s,alpha:n=1})=>"rgba("+X.transform(t)+", "+X.transform(e)+", "+X.transform(s)+", "+$(N.transform(n))+")"};const U={test:j("#"),parse:function(t){let e="",s="",n="",i="";return t.length>5?(e=t.substring(1,3),s=t.substring(3,5),n=t.substring(5,7),i=t.substring(7,9)):(e=t.substring(1,2),s=t.substring(2,3),n=t.substring(3,4),i=t.substring(4,5),e+=e,s+=s,n+=n,i+=i),{red:parseInt(e,16),green:parseInt(s,16),blue:parseInt(n,16),alpha:i?parseInt(i,16)/255:1}},transform:K.transform},Z=t=>({test:e=>"string"==typeof e&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),z=Z("deg"),D=Z("%"),q=Z("px"),H=Z("vh"),_=Z("vw"),G=(()=>({...D,parse:t=>D.parse(t)/100,transform:t=>D.transform(100*t)}))(),J={test:j("hsl","hue"),parse:W("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:s,alpha:n=1})=>"hsla("+Math.round(t)+", "+D.transform($(e))+", "+D.transform($(s))+", "+$(N.transform(n))+")"},Q={test:t=>K.test(t)||U.test(t)||J.test(t),parse:t=>K.test(t)?K.parse(t):J.test(t)?J.parse(t):U.parse(t),transform:t=>"string"==typeof t?t:t.hasOwnProperty("red")?K.transform(t):J.transform(t),getAnimatableNone:t=>{const e=Q.parse(t);return e.alpha=0,Q.transform(e)}},tt=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;const et="number",st="color",nt=/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 it(t){const e=t.toString(),s=[],n={color:[],number:[],var:[]},i=[];let a=0;const r=e.replace(nt,t=>(Q.test(t)?(n.color.push(a),i.push(st),s.push(Q.parse(t))):t.startsWith("var(")?(n.var.push(a),i.push("var"),s.push(t)):(n.number.push(a),i.push(et),s.push(parseFloat(t))),++a,"${}")).split("${}");return{values:s,split:r,indexes:n,types:i}}function at(t){return it(t).values}function rt(t){const{split:e,types:s}=it(t),n=e.length;return t=>{let i="";for(let a=0;a<n;a++)if(i+=e[a],void 0!==t[a]){const e=s[a];i+=e===et?$(t[a]):e===st?Q.transform(t[a]):t[a]}return i}}const ot=t=>"number"==typeof t?0:Q.test(t)?Q.getAnimatableNone(t):t;const ht={test:function(t){return isNaN(t)&&"string"==typeof t&&(t.match(L)?.length||0)+(t.match(tt)?.length||0)>0},parse:at,createTransformer:rt,getAnimatableNone:function(t){const e=at(t);return rt(t)(e.map(ot))}},lt=(t,e,s)=>t+(e-t)*s,ut=(t,e,s=10)=>{let n="";const i=Math.max(Math.round(e/s),2);for(let e=0;e<i;e++)n+=Math.round(1e4*t(e/(i-1)))/1e4+", ";return`linear(${n.substring(0,n.length-2)})`},ct=t=>null!==t;function dt(t,{repeat:e,repeatType:s="loop"},n,i=1){const a=t.filter(ct),r=i<0||e&&"loop"!==s&&e%2==1?0:a.length-1;return r&&void 0!==n?n:a[r]}class pt{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,e){return this.finished.then(t,e)}}const ft=t=>180*t/Math.PI,mt=t=>{const e=ft(Math.atan2(t[1],t[0]));return vt(e)},gt={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:mt,rotateZ:mt,skewX:t=>ft(Math.atan(t[1])),skewY:t=>ft(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},vt=t=>((t%=360)<0&&(t+=360),t),yt=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),bt=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),wt={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:yt,scaleY:bt,scale:t=>(yt(t)+bt(t))/2,rotateX:t=>vt(ft(Math.atan2(t[6],t[5]))),rotateY:t=>vt(ft(Math.atan2(-t[2],t[0]))),rotateZ:mt,rotate:mt,skewX:t=>ft(Math.atan(t[4])),skewY:t=>ft(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function Vt(t){return t.includes("scale")?1:0}function St(t,e){if(!t||"none"===t)return Vt(e);const s=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let n,i;if(s)n=wt,i=s;else{const e=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);n=gt,i=e}if(!i)return Vt(e);const a=n[e],r=i[1].split(",").map(Tt);return"function"==typeof a?a(r):r[a]}const Mt=(t,e)=>{const{transform:s="none"}=getComputedStyle(t);return St(s,e)};function Tt(t){return parseFloat(t.trim())}const At=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Ct=(()=>new Set(At))(),kt=t=>t===I||t===q,xt=new Set(["x","y","z"]),Ft=At.filter(t=>!xt.has(t));const Pt={width:({x:t},{paddingLeft:e="0",paddingRight:s="0"})=>t.max-t.min-parseFloat(e)-parseFloat(s),height:({y:t},{paddingTop:e="0",paddingBottom:s="0"})=>t.max-t.min-parseFloat(e)-parseFloat(s),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})=>St(e,"x"),y:(t,{transform:e})=>St(e,"y")};Pt.translateX=Pt.x,Pt.translateY=Pt.y;const Et=new Set;let Bt=!1,Rt=!1,It=!1;function Nt(){if(Rt){const t=Array.from(Et).filter(t=>t.needsMeasurement),e=new Set(t.map(t=>t.element)),s=new Map;e.forEach(t=>{const e=function(t){const e=[];return Ft.forEach(s=>{const n=t.getValue(s);void 0!==n&&(e.push([s,n.get()]),n.set(s.startsWith("scale")?1:0))}),e}(t);e.length&&(s.set(t,e),t.render())}),t.forEach(t=>t.measureInitialState()),e.forEach(t=>{t.render();const e=s.get(t);e&&e.forEach(([e,s])=>{t.getValue(e)?.set(s)})}),t.forEach(t=>t.measureEndState()),t.forEach(t=>{void 0!==t.suspendedScrollY&&window.scrollTo(0,t.suspendedScrollY)})}Rt=!1,Bt=!1,Et.forEach(t=>t.complete(It)),Et.clear()}function Ot(){Et.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(Rt=!0)})}function $t(){It=!0,Ot(),Nt(),It=!1}class Lt{constructor(t,e,s,n,i,a=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=e,this.name=s,this.motionValue=n,this.element=i,this.isAsync=a}scheduleResolve(){this.state="scheduled",this.isAsync?(Et.add(this),Bt||(Bt=!0,V.read(Ot),V.resolveKeyframes(Nt))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:e,element:s,motionValue:n}=this;if(null===t[0]){const i=n?.get(),a=t[t.length-1];if(void 0!==i)t[0]=i;else if(s&&e){const n=s.readValue(e,a);null!=n&&(t[0]=n)}void 0===t[0]&&(t[0]=a),n&&void 0===i&&n.set(t[0])}!function(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Et.delete(this)}cancel(){"scheduled"===this.state&&(Et.delete(this),this.state="pending")}resume(){"pending"===this.state&&this.scheduleResolve()}}const Yt={};function jt(t,e){const s=u(t);return()=>Yt[e]??s()}const Wt=jt(()=>void 0!==window.ScrollTimeline,"scrollTimeline"),Xt=jt(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(t){return!1}return!0},"linearEasing"),Kt=([t,e,s,n])=>`cubic-bezier(${t}, ${e}, ${s}, ${n})`,Ut={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Kt([0,.65,.55,1]),circOut:Kt([.55,0,1,.45]),backIn:Kt([.31,.01,.66,-.59]),backOut:Kt([.33,1.53,.69,.99])};function Zt(t,e){return t?"function"==typeof t?Xt()?ut(t,e):"ease-out":g(t)?Kt(t):Array.isArray(t)?t.map(t=>Zt(t,e)||Ut.easeOut):Ut[t]:void 0}function zt(t,e,s,{delay:n=0,duration:i=300,repeat:a=0,repeatType:r="loop",ease:o="easeOut",times:h}={},l=void 0){const u={[e]:s};h&&(u.offset=h);const c=Zt(o,i);Array.isArray(c)&&(u.easing=c);const d={delay:n,duration:i,easing:Array.isArray(c)?"linear":c,fill:"both",iterations:a+1,direction:"reverse"===r?"alternate":"normal"};l&&(d.pseudoElement=l);return t.animate(u,d)}function Dt(t){return"function"==typeof t&&"applyToOptions"in t}class qt extends pt{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:e,name:s,keyframes:n,pseudoElement:i,allowFlatten:a=!1,finalKeyframe:o,onComplete:h}=t;this.isPseudoElement=Boolean(i),this.allowFlatten=a,this.options=t,r("string"!=typeof t.type,'Mini animate() doesn\'t support "type" as a string.',"mini-spring");const l=function({type:t,...e}){return Dt(t)&&Xt()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}(t);this.animation=zt(e,s,n,l,i),!1===l.autoplay&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){const t=dt(n,this.options,o,this.speed);this.updateMotionValue?this.updateMotionValue(t):function(t,e,s){(t=>t.startsWith("--"))(e)?t.style.setProperty(e,s):t.style[e]=s}(e,s,t),this.animation.cancel()}h?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),"finished"===this.state&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch(t){}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;"idle"!==t&&"finished"!==t&&(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){const t=this.options?.element;!this.isPseudoElement&&t?.isConnected&&this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return f(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+f(t)}get time(){return f(Number(this.animation.currentTime)||0)}set time(t){this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=p(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return null!==this.finishedTime?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,observe:e}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&Wt()?(this.animation.timeline=t,c):e(this)}}function Ht(t){const e=[{},{}];return t?.values.forEach((t,s)=>{e[0][s]=t.get(),e[1][s]=t.getVelocity()}),e}function _t(t,e,s,n){if("function"==typeof e){const[i,a]=Ht(n);e=e(void 0!==s?s:t.custom,i,a)}if("string"==typeof e&&(e=t.variants&&t.variants[e]),"function"==typeof e){const[i,a]=Ht(n);e=e(void 0!==s?s:t.custom,i,a)}return e}class Gt{constructor(t,e={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=t=>{const e=k.now();if(this.updatedAt!==e&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(t),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const t of this.dependents)t.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=e.owner}setCurrent(t){var e;this.current=t,this.updatedAt=k.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 this.on("change",t)}on(t,e){this.events[t]||(this.events[t]=new d);const s=this.events[t].add(e);return"change"===t?()=>{s(),V.read(()=>{this.events.change.getSize()||this.stop()})}:s}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,e){this.passiveEffect=t,this.stopPassiveEffect=e}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,e,s){this.set(e),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-s}jump(t,e=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,e&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=k.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||t-this.updatedAt>30)return 0;const e=Math.min(this.updatedAt-this.prevUpdatedAt,30);return m(parseFloat(this.current)-parseFloat(this.prevFrameValue),e)}start(t){return this.stop(),new Promise(e=>{this.hasAnimated=!0,this.animation=t(e),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Jt(t,e){return new Gt(t,e)}const Qt=t=>Boolean(t&&t.getVelocity);function te(t){return t.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const ee="data-"+te("framerAppearId"),se=t=>e=>e.test(t),ne=[I,q,D,z,_,H,{test:t=>"auto"===t,parse:t=>t}],ie=t=>ne.find(se(t)),ae=new Set(["brightness","contrast","saturate","opacity"]);function re(t){const[e,s]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[n]=s.match(L)||[];if(!n)return t;const i=s.replace(n,"");let a=ae.has(e)?1:0;return n!==s&&(a*=100),e+"("+a+i+")"}const oe=/\b([a-z-]*)\(.*?\)/gu,he={...ht,getAnimatableNone:t=>{const e=t.match(oe);return e?e.map(re).join(" "):t}},le={...ht,getAnimatableNone:t=>{const e=ht.parse(t);return ht.createTransformer(t)(e.map(t=>"number"==typeof t?0:"object"==typeof t?{...t,alpha:1}:t))}},ue={...I,transform:Math.round},ce={borderWidth:q,borderTopWidth:q,borderRightWidth:q,borderBottomWidth:q,borderLeftWidth:q,borderRadius:q,borderTopLeftRadius:q,borderTopRightRadius:q,borderBottomRightRadius:q,borderBottomLeftRadius:q,width:q,maxWidth:q,height:q,maxHeight:q,top:q,right:q,bottom:q,left:q,inset:q,insetBlock:q,insetBlockStart:q,insetBlockEnd:q,insetInline:q,insetInlineStart:q,insetInlineEnd:q,padding:q,paddingTop:q,paddingRight:q,paddingBottom:q,paddingLeft:q,paddingBlock:q,paddingBlockStart:q,paddingBlockEnd:q,paddingInline:q,paddingInlineStart:q,paddingInlineEnd:q,margin:q,marginTop:q,marginRight:q,marginBottom:q,marginLeft:q,marginBlock:q,marginBlockStart:q,marginBlockEnd:q,marginInline:q,marginInlineStart:q,marginInlineEnd:q,fontSize:q,backgroundPositionX:q,backgroundPositionY:q,...{rotate:z,rotateX:z,rotateY:z,rotateZ:z,scale:O,scaleX:O,scaleY:O,scaleZ:O,skew:z,skewX:z,skewY:z,distance:q,translateX:q,translateY:q,translateZ:q,x:q,y:q,z:q,perspective:q,transformPerspective:q,opacity:N,originX:G,originY:G,originZ:q},zIndex:ue,fillOpacity:N,strokeOpacity:N,numOctaves:ue},de={...ce,color:Q,backgroundColor:Q,outlineColor:Q,fill:Q,stroke:Q,borderColor:Q,borderTopColor:Q,borderRightColor:Q,borderBottomColor:Q,borderLeftColor:Q,filter:he,WebkitFilter:he,mask:le,WebkitMask:le},pe=t=>de[t],fe=new Set([he,le]);function me(t,e){let s=pe(t);return fe.has(s)||(s=ht),s.getAnimatableNone?s.getAnimatableNone(e):void 0}const ge=new Set(["opacity","clipPath","filter","transform"]),ve=(t,e)=>e&&"number"==typeof t?e.transform(t):t,{schedule:ye,cancel:be}=w(queueMicrotask,!1),we=[...ne,Q,ht],Ve=()=>({x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}),Se=()=>({x:{min:0,max:0},y:{min:0,max:0}}),Me=new WeakMap;function Te(t){return null!==t&&"object"==typeof t&&"function"==typeof t.start}function Ae(t){return"string"==typeof t||Array.isArray(t)}const Ce=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],ke=["initial",...Ce];function xe(t){return Te(t.animate)||ke.some(e=>Ae(t[e]))}function Fe(t){return Boolean(xe(t)||t.variants)}const Pe={current:null},Ee={current:!1},Be="undefined"!=typeof window;const Re=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let Ie={};function Ne(t){Ie=t}function Oe(){return Ie}class $e{scrapeMotionValuesFromProps(t,e,s){return{}}constructor({parent:t,props:e,presenceContext:s,reducedMotionConfig:n,skipAnimations:i,blockInitialAnimation:a,visualState:r},o={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=Lt,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const t=k.now();this.renderScheduledAt<t&&(this.renderScheduledAt=t,V.render(this.render,!1,!0))};const{latestValues:h,renderState:l}=r;this.latestValues=h,this.baseTarget={...h},this.initialValues=e.initial?{...h}:{},this.renderState=l,this.parent=t,this.props=e,this.presenceContext=s,this.depth=t?t.depth+1:0,this.reducedMotionConfig=n,this.skipAnimationsConfig=i,this.options=o,this.blockInitialAnimation=Boolean(a),this.isControllingVariants=xe(e),this.isVariantNode=Fe(e),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(t&&t.current);const{willChange:u,...c}=this.scrapeMotionValuesFromProps(e,{},this);for(const t in c){const e=c[t];void 0!==h[t]&&Qt(e)&&e.set(h[t])}}mount(t){if(this.hasBeenMounted)for(const t in this.initialValues)this.values.get(t)?.jump(this.initialValues[t]),this.latestValues[t]=this.initialValues[t];this.current=t,Me.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((t,e)=>this.bindToMotionValue(e,t)),"never"===this.reducedMotionConfig?this.shouldReduceMotion=!1:"always"===this.reducedMotionConfig?this.shouldReduceMotion=!0:(Ee.current||function(){if(Ee.current=!0,Be)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Pe.current=t.matches;t.addEventListener("change",e),e()}else Pe.current=!1}(),this.shouldReduceMotion=Pe.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),S(this.notifyUpdate),S(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(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}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,e){if(this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)(),e.accelerate&&ge.has(t)&&this.current instanceof HTMLElement){const{factory:s,keyframes:n,times:i,ease:a,duration:r}=e.accelerate,o=new qt({element:this.current,name:t,keyframes:n,times:i,ease:a,duration:p(r)}),h=s(o);return void this.valueSubscriptions.set(t,()=>{h(),o.cancel()})}const s=Ct.has(t);s&&this.onBindTransform&&this.onBindTransform();const n=e.on("change",e=>{this.latestValues[t]=e,this.props.onUpdate&&V.preRender(this.notifyUpdate),s&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let i;"undefined"!=typeof window&&window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,t,e)),this.valueSubscriptions.set(t,()=>{n(),i&&i(),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 Ie){const e=Ie[t];if(!e)continue;const{isEnabled:s,Feature:n}=e;if(!this.features[t]&&n&&s(this.props)&&(this.features[t]=new n(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 e=0;e<Re.length;e++){const s=Re[e];this.propEventSubscriptions[s]&&(this.propEventSubscriptions[s](),delete this.propEventSubscriptions[s]);const n=t["on"+s];n&&(this.propEventSubscriptions[s]=this.on(s,n))}this.prevMotionValues=function(t,e,s){for(const n in e){const i=e[n],a=s[n];if(Qt(i))t.addValue(n,i);else if(Qt(a))t.addValue(n,Jt(i,{owner:t}));else if(a!==i)if(t.hasValue(n)){const e=t.getValue(n);!0===e.liveStyle?e.jump(i):e.hasAnimated||e.set(i)}else{const e=t.getStaticValue(n);t.addValue(n,Jt(void 0!==e?e:i,{owner:t}))}}for(const n in s)void 0===e[n]&&t.removeValue(n);return e}(this,this.scrapeMotionValuesFromProps(t,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const e=this.getClosestVariantNode();if(e)return e.variantChildren&&e.variantChildren.add(t),()=>e.variantChildren.delete(t)}addValue(t,e){const s=this.values.get(t);e!==s&&(s&&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 s=this.values.get(t);return void 0===s&&void 0!==e&&(s=Jt(null===e?void 0:e,{owner:this}),this.addValue(t,s)),s}readValue(t,e){let s=void 0===this.latestValues[t]&&this.current?this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options):this.latestValues[t];var n;return null!=s&&("string"==typeof s&&(h(s)||l(s))?s=parseFloat(s):(n=s,!we.find(se(n))&&ht.test(e)&&(s=me(t,e))),this.setBaseTarget(t,Qt(s)?s.get():s)),Qt(s)?s.get():s}setBaseTarget(t,e){this.baseTarget[t]=e}getBaseTarget(t){const{initial:e}=this.props;let s;if("string"==typeof e||"object"==typeof e){const n=_t(this.props,e,this.presenceContext?.custom);n&&(s=n[t])}if(e&&void 0!==s)return s;const n=this.getBaseTargetFromProps(this.props,t);return void 0===n||Qt(n)?void 0!==this.initialValues[t]&&void 0===s?void 0:this.baseTarget[t]:n}on(t,e){return this.events[t]||(this.events[t]=new d),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}scheduleRenderMicrotask(){ye.render(this.render)}}const Le={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Ye=At.length;function je(t,e,s){const{style:n,vars:i,transformOrigin:a}=t;let r=!1,o=!1;for(const t in e){const s=e[t];if(Ct.has(t))r=!0;else if(F(t))i[t]=s;else{const e=ve(s,ce[t]);t.startsWith("origin")?(o=!0,a[t]=e):n[t]=e}}if(e.transform||(r||s?n.transform=function(t,e,s){let n="",i=!0;for(let a=0;a<Ye;a++){const r=At[a],o=t[r];if(void 0===o)continue;let h=!0;if("number"==typeof o)h=o===(r.startsWith("scale")?1:0);else{const t=parseFloat(o);h=r.startsWith("scale")?1===t:0===t}if(!h||s){const t=ve(o,ce[r]);h||(i=!1,n+=`${Le[r]||r}(${t}) `),s&&(e[r]=t)}}return n=n.trim(),s?n=s(e,i?"":n):i&&(n="none"),n}(e,t.transform,s):n.transform&&(n.transform="none")),o){const{originX:t="50%",originY:e="50%",originZ:s=0}=a;n.transformOrigin=`${t} ${e} ${s}`}}function We(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const Xe={correct:(t,e)=>{if(!e.target)return t;if("string"==typeof t){if(!q.test(t))return t;t=parseFloat(t)}return`${We(t,e.target.x)}% ${We(t,e.target.y)}%`}},Ke={correct:(t,{treeScale:e,projectionDelta:s})=>{const n=t,i=ht.parse(t);if(i.length>5)return n;const a=ht.createTransformer(t),r="number"!=typeof i[0]?1:0,o=s.x.scale*e.x,h=s.y.scale*e.y;i[0+r]/=o,i[1+r]/=h;const l=lt(o,h,.5);return"number"==typeof i[2+r]&&(i[2+r]/=l),"number"==typeof i[3+r]&&(i[3+r]/=l),a(i)}},Ue={borderRadius:{...Xe,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Xe,borderTopRightRadius:Xe,borderBottomLeftRadius:Xe,borderBottomRightRadius:Xe,boxShadow:Ke};function Ze(t,{layout:e,layoutId:s}){return Ct.has(t)||t.startsWith("origin")||(e||void 0!==s)&&(!!Ue[t]||"opacity"===t)}function ze(t,e,s){const n=t.style,i=e?.style,a={};if(!n)return a;for(const e in n)(Qt(n[e])||i&&Qt(i[e])||Ze(e,t)||void 0!==s?.getValue(e)?.liveStyle)&&(a[e]=n[e]);return a}const De={offset:"stroke-dashoffset",array:"stroke-dasharray"},qe={offset:"strokeDashoffset",array:"strokeDasharray"};const He=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function _e(t,{attrX:e,attrY:s,attrScale:n,pathLength:i,pathSpacing:a=1,pathOffset:r=0,...o},h,l,u){if(je(t,o,l),h)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=u?.transformBox??"fill-box",delete c.transformBox);for(const t of He)void 0!==c[t]&&(d[t]=c[t],delete c[t]);void 0!==e&&(c.x=e),void 0!==s&&(c.y=s),void 0!==n&&(c.scale=n),void 0!==i&&function(t,e,s=1,n=0,i=!0){t.pathLength=1;const a=i?De:qe;t[a.offset]=""+-n,t[a.array]=`${e} ${s}`}(c,i,a,r,!1)}const Ge=t=>"string"==typeof t&&"svg"===t.toLowerCase();function Je(t,e,s){const n=ze(t,e,s);for(const s in t)if(Qt(t[s])||Qt(e[s])){n[-1!==At.indexOf(s)?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s]=t[s]}return n}function Qe(t){return Qt(t)?t.get():t}const ts=["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 es(t){return"string"==typeof t&&!t.includes("-")&&!!(ts.indexOf(t)>-1||/[A-Z]/u.test(t))}const ss=t(null),ns=t({});function is(t){return t&&"object"==typeof t&&Object.prototype.hasOwnProperty.call(t,"current")}export{Jt as $,E as A,Q as B,ht as C,it as D,V as E,S as F,M as G,k as H,f as I,m as J,p as K,v as L,n as M,ut as N,o as O,ss as P,dt as Q,qt as R,ns as S,Dt as T,u as U,Lt as V,pt as W,$t as X,h as Y,Ct as Z,At as _,Ae as a,l as a0,me as a1,ie as a2,R as a3,Pt as a4,kt as a5,$e as a6,Vt as a7,Mt as a8,F as a9,te as aa,Se as ab,pe as ac,ke as ad,Ce as ae,D as af,q as ag,e as ah,s as ai,d as aj,T as ak,ye as al,Ve as am,Ue as an,Qt as b,Ze as c,je as d,_e as e,Ge as f,es as g,Fe as h,xe as i,Te as j,_t as k,Je as l,Oe as m,Ne as n,ee as o,is as p,c as q,Qe as r,ze as s,g as t,r as u,lt as v,K as w,a as x,J as y,U as z};