Files
boc/web-v2/node_modules/framer-motion/dist/framer-motion.js
T

2 lines
185 KiB
JavaScript
Raw Normal View History

!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("react")):"function"==typeof define&&define.amd?define(["exports","react"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).Motion={},t.React)}(this,function(t,e){"use strict";function n(t){var e=Object.create(null);return t&&Object.keys(t).forEach(function(n){if("default"!==n){var i=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,i.get?i:{enumerable:!0,get:function(){return t[n]}})}}),e.default=t,Object.freeze(e)}var i=n(e),o=React,s=Symbol.for("react.element"),r=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,l=o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,c={key:!0,ref:!0,__self:!0,__source:!0};function u(t,e,n){var i,o={},r=null,u=null;for(i in void 0!==n&&(r=""+n),void 0!==e.key&&(r=""+e.key),void 0!==e.ref&&(u=e.ref),e)a.call(e,i)&&!c.hasOwnProperty(i)&&(o[i]=e[i]);if(t&&t.defaultProps)for(i in e=t.defaultProps)void 0===o[i]&&(o[i]=e[i]);return{$$typeof:s,type:t,key:r,ref:u,props:o,_owner:l.current}}const h=r,d=u,p=u,f=e.createContext({});function m(t){const n=e.useRef(null);return null===n.current&&(n.current=t()),n.current}const g="undefined"!=typeof window,y=g?e.useLayoutEffect:e.useEffect,v=e.createContext(null);function x(t,e){-1===t.indexOf(e)&&t.push(e)}function w(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}function S([...t],e,n){const i=e<0?t.length+e:e;if(i>=0&&i<t.length){const i=n<0?t.length+n:n,[o]=t.splice(e,1);t.splice(i,0,o)}return t}const b=(t,e,n)=>n>e?e:n<t?t:n;function T(t,e){return e?`${t}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${e}`:t}t.warning=()=>{},t.invariant=()=>{},"undefined"!=typeof process&&"production"!==process.env?.NODE_ENV&&(t.warning=(t,e,n)=>{t||"undefined"==typeof console||console.warn(T(e,n))},t.invariant=(t,e,n)=>{if(!t)throw new Error(T(e,n))});const P={},E=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),A=t=>"object"==typeof t&&null!==t,M=t=>/^0[^.\s]+$/u.test(t);function C(t){let e;return()=>(void 0===e&&(e=t()),e)}const V=t=>t,k=(...t)=>t.reduce((t,e)=>n=>e(t(n))),D=(t,e,n)=>{const i=e-t;return i?(n-t)/i:1};class R{constructor(){this.subscriptions=[]}add(t){return x(this.subscriptions,t),()=>w(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 o=0;o<i;o++){const i=this.subscriptions[o];i&&i(t,e,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const L=t=>1e3*t,B=t=>t/1e3,O=(t,e)=>e?t*(1e3/e):0,j=new Set;function I(t,e,n){t||j.has(e)||(console.warn(T(e,n)),j.add(e))}const F=(t,e,n)=>{const i=e-t;return((n-t)%i+i)%i+t},W=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t;function $(t,e,n,i){if(t===e&&n===i)return V;const o=e=>function(t,e,n,i,o){let s,r,a=0;do{r=e+(n-e)/2,s=W(r,i,o)-t,s>0?n=r:e=r}while(Math.abs(s)>1e-7&&++a<12);return r}(e,0,1,t,n);return t=>0===t||1===t?t:W(o(t),e,i)}const N=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,U=t=>e=>1-t(1-e),z=$(.33,1.53,.69,.99),Y=U(z),H=N(Y),X=t=>t>=1?1:(t*=2)<1?.5*Y(t):.5*(2-Math.pow(2,-10*(t-1))),G=t=>1-Math.sin(Math.acos(t)),K=U(G),_=N(G),q=$(.42,0,1,1),Z=$(0,0,.58,1),J=$(.42,0,.58,1);const Q=t=>Array.isArray(t)&&"number"!=typeof t[0];function tt(t,e){return Q(t)?t[F(0,t.length,e)]:t}const et=t=>Array.isArray(t)&&"number"==typeof t[0],nt={linear:V,easeIn:q,easeInOut:J,easeOut:Z,circIn:G,circInOut:_,circOut:K,backIn:Y,backInOut:H,backOut:z,anticipate:X},it=e=>{if(et(e)){t.invariant(4===e.length,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[n,i,o,s]=e;return $(n,i,o,s)}return"string"==typeof e?(t.invariant(void 0!==nt[e],`Invalid easing type '${e}'`,"invalid-easing-type"),nt[e]):e},ot=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function st(t,e){let n=!1,i=!0;const o={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,r=ot.reduce((t,e)=>(t[e]=function(t){let e=new Set,n=new Set,i=!1,o=!1;const s=new WeakSet;let r={delta:0,timestamp:0,isProcessing:!1};function