Files
ai-course/node_modules/framer-motion/dist/size-rollup-dom-animation-assets.js

2 lines
6.7 KiB
JavaScript
Raw Permalink Normal View History

const t=(t,e,r)=>r>e?e:r<t?t:r,e={};function r(t){return null!==t&&"object"==typeof t&&"function"==typeof t.start}function s(t){return"string"==typeof t||Array.isArray(t)}const a=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],o=["initial",...a];function n(t){return r(t.animate)||o.some(e=>s(t[e]))}function i(t){return Boolean(n(t)||t.variants)}const c="undefined"!=typeof window,l={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"]},f={};for(const t in l)f[t]={isEnabled:e=>l[t].some(t=>!!e[t])};const d=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"],p={value:null,addProjectionMetrics:null};function u(t,r){let s=!1,a=!0;const o={delta:0,timestamp:0,isProcessing:!1},n=()=>s=!0,i=d.reduce((t,e)=>(t[e]=function(t,e){let r=new Set,s=new Set,a=!1,o=!1;const n=new WeakSet;let i={delta:0,timestamp:0,isProcessing:!1},c=0;function l(e){n.has(e)&&(f.schedule(e),t()),c++,e(i)}const f={schedule:(t,e=!1,o=!1)=>{const i=o&&a?r:s;return e&&n.add(t),i.has(t)||i.add(t),t},cancel:t=>{s.delete(t),n.delete(t)},process:t=>{i=t,a?o=!0:(a=!0,[r,s]=[s,r],r.forEach(l),e&&p.value&&p.value.frameloop[e].push(c),c=0,r.clear(),a=!1,o&&(o=!1,f.process(t)))}};return f}(n,r?e:void 0),t),{}),{setup:c,read:l,resolveKeyframes:f,preUpdate:u,update:m,preRender:g,render:h,postRender:y}=i,v=()=>{const n=e.useManualTiming?o.timestamp:performance.now();s=!1,e.useManualTiming||(o.delta=a?1e3/60:Math.max(Math.min(n-o.timestamp,40),1)),o.timestamp=n,o.isProcessing=!0,c.process(o),l.process(o),f.process(o),u.process(o),m.process(o),g.process(o),h.process(o),y.process(o),o.isProcessing=!1,s&&r&&(a=!1,t(v))};return{schedule:d.reduce((e,r)=>{const n=i[r];return e[r]=(e,r=!1,i=!1)=>(s||(s=!0,a=!0,o.isProcessing||t(v)),n.schedule(e,r,i)),e},{}),cancel:t=>{for(let e=0;e<d.length;e++)i[d[e]].cancel(t)},state:o,steps:i}}const m=t=>e=>"string"==typeof e&&e.startsWith(t),g=m("--"),h=m("var(--"),y=t=>!!h(t)&&v.test(t.split("/*")[0].trim()),v=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,w={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},x={...w,transform:e=>t(0,1,e)},b={...w,default:1},k=t=>({test:e=>"string"==typeof e&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),P=k("deg"),B=k("%"),R=k("px"),T=k("vh"),X=k("vw"),Y=(()=>({...B,parse:t=>B.parse(t)/100,transform:t=>B.transform(100*t)}))(),O=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],S=(()=>new Set(O))(),W={...w,transform:Math.round},$={borderWidth:R,borderTopWidth:R,borderRightWidth:R,borderBottomWidth:R,borderLeftWidth:R,borderRadius:R,radius:R,borderTopLeftRadius:R,borderTopRightRadius:R,borderBottomRightRadius:R,borderBottomLeftRadius:R,width:R,maxWidth:R,height:R,maxHeight:R,top:R,right:R,bottom:R,left:R,padding:R,paddingTop:R,paddingRight:R,paddingBottom:R,paddingLeft:R,margin:R,marginTop:R,marginRight:R,marginBottom:R,marginLeft:R,backgroundPositionX:R,backgroundPositionY:R,...{rotate:P,rotateX:P,rotateY:P,rotateZ:P,scale:b,scaleX:b,scaleY:b,scaleZ:b,skew:P,skewX:P,skewY:P,distance:R,translateX:R,translateY:R,translateZ:R,x:R,y:R,z:R,perspective:R,transformPerspective:R,opacity:x,originX:Y,originY:Y,originZ:R},zIndex:W,fillOpacity:x,strokeOpacity:x,numOctaves:W},L=(t,e)=>e&&"number"==typeof t?e.transform(t):t,Z=t=>Boolean(t&&t.getVelocity),V=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),A="data-"+V("framerAppearId"),E={};function F(t,{layout:e,layoutId:r}){return S.has(t)||t.startsWith("origin")||(e||void 0!==r)&&(!!E[t]||"opacity"===t)}const I={x:"translateX",y:"translateY",z