{"version":3,"file":"SmallEngineMotion.B-cf_ciB.mjs","names":["React.useId","React.useRef","React.useState","__esmMin","init_npm_react_18_3_1","ie","_e","p","c","init_jsx_runtime","ce","de","init_framer_DKgW_P28","addPropertyControls","useIsStaticRenderer","ControlType","SmallEngineMotion","isStaticRenderer","id","root","visible","setVisible","pageVisible","setPageVisible","element","observer","entry","update","ink","surface","bodyColor","enabled","animate","duration","cycle","scale","markScale","frozen","style","staticOnMobile","accentColor","init_SmallEngineMotion","props"],"sources":["https:/framerusercontent.com/modules/DBd7ElHSdSn2TOtVJI7g/mRwEVZNcKKg33wi3SF0h/SmallEngineMotion.js"],"sourcesContent":["/**\n * Small Engine — three-piece hero animation.\n * Paste this whole file into a Framer Code Component.\n * Transparent background; exact geometry simplified from the supplied SVG.\n * The Framer canvas/export, reduced-motion preference and mobile are static.\n * Preview the page to see motion. No external assets or animation packages.\n */import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import*as React from\"react\";import{addPropertyControls,ControlType,useIsStaticRenderer}from\"framer\";/**\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight any\n * @framerIntrinsicWidth 420\n * @framerIntrinsicHeight 380\n */export default function SmallEngineMotion({surface=\"dark\",bodyColor=\"#FFFFFF\",accentColor=\"#CC0000\",cycle=12,markScale=.9,animate=true,staticOnMobile=true,opacity=.9,style}){const isStaticRenderer=useIsStaticRenderer();const id=`se${React.useId().replace(/[^a-zA-Z0-9]/g,\"\")}`;const root=React.useRef(null);const[visible,setVisible]=React.useState(true);const[pageVisible,setPageVisible]=React.useState(true);// Pause when offscreen or in a background tab.\nReact.useEffect(()=>{const element=root.current;if(!element||typeof IntersectionObserver===\"undefined\")return;const observer=new IntersectionObserver(([entry])=>setVisible(entry.isIntersecting),{threshold:0});observer.observe(element);return()=>observer.disconnect();},[]);React.useEffect(()=>{const update=()=>setPageVisible(!document.hidden);update();document.addEventListener(\"visibilitychange\",update);return()=>document.removeEventListener(\"visibilitychange\",update);},[]);const ink=surface===\"dark\"?\"#FFFFFF\":surface===\"light\"?\"#302E39\":bodyColor;const enabled=animate&&!isStaticRenderer;const duration=Math.max(6,Math.min(30,cycle));const scale=Math.max(.4,Math.min(1,markScale));const frozen=`#${id} .se-piece { animation: none !important; transform: none !important; opacity: 1 !important; }`;return /*#__PURE__*/_jsxs(\"div\",{ref:root,id:id,\"aria-hidden\":\"true\",style:{width:\"100%\",height:\"100%\",...style,pointerEvents:\"none\",overflow:\"hidden\",background:\"transparent\",opacity},children:[/*#__PURE__*/_jsx(\"style\",{children:`\n                #${id} .se-piece {\n                    transform-box: fill-box;\n                    transform-origin: center;\n                    animation-duration: ${duration}s;\n                    animation-timing-function: cubic-bezier(.45, 0, .2, 1);\n                    animation-iteration-count: infinite;\n                    animation-play-state: ${visible&&pageVisible?\"running\":\"paused\"};\n                }\n                #${id} .se-upper { animation-name: ${id}Upper; }\n                #${id} .se-lower { animation-name: ${id}Lower; }\n                #${id} .se-signal { animation-name: ${id}Signal; }\n\n                @keyframes ${id}Upper {\n                    0%, 18%, 52%, 100% { transform: translate(0px, 0px) rotate(0deg); }\n                    34% { transform: translate(-5px, -4px) rotate(-10deg); }\n                }\n                @keyframes ${id}Lower {\n                    0%, 18%, 52%, 100% { transform: translate(0px, 0px) rotate(0deg); }\n                    34% { transform: translate(-5px, 4px) rotate(10deg); }\n                }\n                @keyframes ${id}Signal {\n                    0%, 18%, 76%, 100% { transform: translate(0px, 0px) scale(1); opacity: 1; }\n                    32% { transform: translate(8px, 0px) scale(.7); opacity: 0; }\n                    33% { transform: translate(-15px, 0px) scale(.16); opacity: 0; }\n                    44%, 52% { transform: translate(-15px, 0px) scale(.16); opacity: 1; }\n                }\n                ${!enabled?frozen:\"\"}\n                @media (prefers-reduced-motion: reduce) { ${frozen} }\n                ${staticOnMobile?`@media (max-width: 767px) { ${frozen} }`:\"\"}\n            `}),/*#__PURE__*/_jsx(\"svg\",{xmlns:\"http://www.w3.org/2000/svg\",viewBox:\"-6 -7.5 48 50\",width:\"100%\",height:\"100%\",preserveAspectRatio:\"xMidYMid meet\",focusable:\"false\",style:{display:\"block\"},children:/*#__PURE__*/_jsxs(\"g\",{transform:`translate(18 17.5) scale(${scale}) translate(-18 -17.5)`,children:[/*#__PURE__*/_jsx(\"polygon\",{className:\"se-piece se-upper\",fill:ink,points:\"4.519531,17.097656 12.472656,6.171875 25.910156,4.75 17.960938,15.675781\"}),/*#__PURE__*/_jsx(\"polygon\",{className:\"se-piece se-lower\",fill:ink,points:\"4.792969,17.929688 12.746094,28.855469 26.183594,30.277344 18.234375,19.347656\"}),/*#__PURE__*/_jsx(\"polygon\",{className:\"se-piece se-signal\",fill:accentColor,points:\"26.523438,5.164062 32.011719,17.511719 26.523438,29.863281 21.035156,17.511719\"})]})})]});}addPropertyControls(SmallEngineMotion,{surface:{type:ControlType.Enum,title:\"Background\",options:[\"dark\",\"light\",\"custom\"],optionTitles:[\"On dark\",\"On light\",\"Custom\"],defaultValue:\"dark\",description:\"Chooses mark colour. The component itself stays transparent.\"},bodyColor:{type:ControlType.Color,title:\"Mark colour\",defaultValue:\"#FFFFFF\",hidden:props=>props.surface!==\"custom\"},accentColor:{type:ControlType.Color,title:\"Signal colour\",defaultValue:\"#CC0000\"},cycle:{type:ControlType.Number,title:\"Cycle\",min:6,max:30,step:1,unit:\"s\",defaultValue:12},markScale:{type:ControlType.Number,title:\"Mark scale\",min:.4,max:1,step:.01,defaultValue:.9},opacity:{type:ControlType.Number,title:\"Opacity\",min:.1,max:1,step:.05,defaultValue:.9},animate:{type:ControlType.Boolean,title:\"Animate\",defaultValue:true},staticOnMobile:{type:ControlType.Boolean,title:\"Static mobile\",defaultValue:true}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"SmallEngineMotion\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"any\",\"framerIntrinsicHeight\":\"380\",\"framerSupportedLayoutHeight\":\"any\",\"framerI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