{"version":3,"file":"LogoFlow.CFABPh8A.mjs","names":["React.useRef","React.useEffect","_jsx","__esmMin","init_ssg_sandbox_shims","init_npm_react_18_3_1","ce","init_jsx_runtime","c","de","window","init_framer_ChujFWHC","addPropertyControls","RenderTarget","ControlType","lerpCurve","u","i","u0","v0","u1","v1","LogoFlow","props","logos","step1","step2","step3","size1","size2","size3","secondsPerStep","style","BASE","rootRef","isCanvas","source","l","items","W","pos","size","fade","place","shift","a","transformOf","x","s","key","root","els","speed","raf","lastT","onScreen","loop","now","el","p","wake","io","entries","onVis","badge","glyph","logo","init_LogoFlow"],"sources":["https:/framerusercontent.com/modules/HHDAwtMcJ8fE3cny580O/oT5WjgjQSV2Eqjikz1JJ/LogoFlow.js"],"sourcesContent":["/**\n * LogoFlow\n * What: the tool logos drift right to left through the Oragent hub without stopping. Each logo grows as it\n *       nears the hub, slips into it, comes out the other side and shrinks towards the edge, so at rest the\n *       row is exactly the design (68 / 50 / 40 px either side of the hub).\n * Where: Work Smarter › Card / Oragent Autopilot › Visual › Art Canvas (under \"Oragent Core\").\n * Why code: a ticker whose items change size with their position can't be built with Framer's Ticker.\n * Look: each badge rebuilds the \"Logo Node\" component (glass ring, white badge with a coral inner glow).\n * Performance: transform and opacity only, written straight to the elements by one animation loop.\n *       It pauses while off screen or in a hidden tab, and shows the still design with reduced motion\n *       and in the editor.\n */import{jsx as _jsx}from\"react/jsx-runtime\";import*as React from\"react\";import{addPropertyControls,ControlType,RenderTarget}from\"framer\";/** Piecewise-linear lookup on a curve of [u, value] points (u ascending). */function lerpCurve(c,u){if(u<=c[0][0])return c[0][1];for(let i=1;i<c.length;i++){if(u<=c[i][0]){const[u0,v0]=c[i-1];const[u1,v1]=c[i];return v0+(v1-v0)*(u-u0)/(u1-u0);}}return c[c.length-1][1];}/**\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight any-prefer-fixed\n */export default function LogoFlow(props){const{logos=[],step1=104,step2=183,step3=248,size1=68,size2=50,size3=40,secondsPerStep=2.6,style}=props;// Badges are drawn at the largest size and scaled down, so they stay crisp at any size.\nconst BASE=Math.max(size1,size2,size3,10);const rootRef=React.useRef(null);const isCanvas=RenderTarget.current()===RenderTarget.canvas;const source=(Array.isArray(logos)?logos:[]).filter(l=>l&&l.image&&l.image.src);// Repeat the list so the loop is long enough that no logo shows twice at once.\nconst items=[];if(source.length)while(items.length<8)items.push(...source);const W=items.length;// Distance from the hub (u = steps from the centre) → offset, size and opacity.\nconst pos=[[0,0],[1,step1],[2,step2],[3,step3],[4,step3+(step3-step2)*.9]];const size=[[0,size1*.3],[.3,size1*.4],[.6,size1*.62],[1,size1],[2,size2],[3,size3],[4,size3*.85]];// Logos stay solid while they shrink into the hub's glow, then fade under it.\nconst fade=[[0,0],[.3,0],[.6,1],[3.05,1],[3.5,0]];// Logo i sits at u = i - 3 at rest: three on the left, one hidden in the hub, three on the right.\nconst place=(i,shift)=>{let u=i-3-shift;u=((u+W/2)%W+W)%W-W/2;const a=Math.abs(u);const x=Math.sign(u)*lerpCurve(pos,a);const s=lerpCurve(size,a)/BASE;const o=lerpCurve(fade,a);return{x,s,o};};const transformOf=(x,s)=>\"translate(\"+x.toFixed(2)+\"px, 0px) scale(\"+s.toFixed(4)+\")\";const key=JSON.stringify([items.map(l=>l.image&&l.image.src),step1,step2,step3,size1,size2,size3,secondsPerStep]);React.useEffect(()=>{const root=rootRef.current;if(!root||!W||isCanvas)return;if(window.matchMedia&&window.matchMedia(\"(prefers-reduced-motion: reduce)\").matches)return;const els=Array.from(root.querySelectorAll(\"[data-lf-item]\"));const speed=1/Math.max(.3,secondsPerStep);let raf=0;let shift=0;let lastT=0;let onScreen=false;const loop=now=>{raf=0;if(!onScreen||document.hidden)return;shift=(shift+(lastT?Math.min(.1,(now-lastT)/1e3):0)*speed)%W;lastT=now;els.forEach((el,i)=>{const p=place(i,shift);el.style.transform=transformOf(p.x,p.s);el.style.opacity=p.o.toFixed(3);el.style.visibility=p.o<.005?\"hidden\":\"visible\";});raf=requestAnimationFrame(loop);};const wake=()=>{if(!raf&&onScreen&&!document.hidden){lastT=0;raf=requestAnimationFrame(loop);}};const io=new IntersectionObserver(entries=>{onScreen=entries[entries.length-1].isIntersecting;wake();},{rootMargin:\"100px\"});io.observe(root);const onVis=()=>wake();document.addEventListener(\"visibilitychange\",onVis);return()=>{if(raf)cancelAnimationFrame(raf);io.disconnect();document.removeEventListener(\"visibilitychange\",onVis);};},[key,isCanvas]);const badge=BASE*.8;const glyph=badge*.54;return /*#__PURE__*/_jsx(\"div\",{ref:rootRef,style:{position:\"relative\",width:\"100%\",height:\"100%\",pointerEvents:\"none\",...style},children:items.map((logo,i)=>{const p=place(i,0);return /*#__PURE__*/_jsx(\"div\",{\"data-lf-item\":\"\",style:{position:\"absolute\",left:\"50%\",top:\"50%\",width:BASE,height:BASE,marginLeft:-BASE/2,marginTop:-BASE/2,boxSizing:\"border-box\",borderRadius:\"50%\",background:\"rgba(255, 255, 255, 0.12)\",border:\"1px solid rgba(255, 255, 255, 0.45)\",boxShadow:\"inset 0px 4px 4px 0px rgba(255, 154, 154, 0.16)\",backdropFilter:\"blur(20px)\",WebkitBackdropFilter:\"blur(20px)\",transform:transformOf(p.x,p.s),opacity:p.o,visibility:p.o<.005?\"hidden\":\"visible\",willChange:\"transform, opacity\"},children:/*#__PURE__*/_jsx(\"div\",{style:{position:\"absolute\",left:(BASE-badge)/2-1,top:(BASE-badge)/2-1,width:badge,height:badge,borderRadius:\"50%\",overflow:\"hidden\",background:\"linear-gradient(156deg, #FFFFFF 0%, #FFFFFF 51%, rgba(255, 255, 255, 0.4) 100%)\",boxShadow:\"inset 0px 0px 7.5px 2.25px rgba(254, 118, 121, 1)\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\"},children:/*#__PURE__*/_jsx(\"img\",{src:logo.image.src,srcSet:logo.image.srcSet,alt:logo.name||logo.image.alt||\"\",width:glyph,height:glyph,decoding:\"async\",draggable:false,style:{display:\"block\",width:glyph,height:glyph,objectFit:\"contain\"}})})},i);})});}addPropertyControls(LogoFlow,{logos:{type:ControlType.Array,title:\"Logos\",control:{type:ControlType.Object,controls:{image:{type:ControlType.ResponsiveImage,title:\"Logo\"},name:{type:ControlType.String,title:\"Name\",placeholder:\"Alt text, e.g. Slack\"}}},description:\"Left to right as they sit at rest. The 4th one starts hidden behind the hub.\"},secondsPerStep:{type:ControlType.Number,title:\"Speed\",defaultValue:2.6,min:.5,max:20,step:.1,unit:\"s\",description:\"Seconds for a logo to move one place.\"},step1:{type:ControlType.Number,title:\"Gap 1\",defaultValue:104,min:0,max:600,unit:\"px\",description:\"Centre of the hub to the first logo.\"},step2:{type:ControlType.Number,title:\"Gap 2\",defaultValue:183,min:0,max:800,unit:\"px\"},step3:{type:ControlType.Number,title:\"Gap 3\",defaultValue:248,min:0,max:1e3,unit:\"px\"},size1:{type:ControlType.Number,title:\"Size 1\",defaultValue:68,min:10,max:200,unit:\"px\"},size2:{type:ControlType.Number,title:\"Size 2\",defaultValue:50,min:10,max:200,unit:\"px\"},size3:{type:ControlType.Number,title:\"Size 3\",defaultValue:40,min:10,max:200,unit:\"px\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"LogoFlow\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"any-prefer-fixed\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./LogoFlow.map"],"mappings":"A,uMAWwN,SAASe,EAAUP,EAAEQ,EAAE,CAAC,GAAGA,GAAGR,EAAE,EAAE,CAAC,GAAG,OAAOA,EAAE,EAAE,CAAC,GAAG,IAAI,IAAIS,EAAE,EAAEA,EAAET,EAAE,OAAOS,IAAK,GAAGD,GAAGR,EAAES,EAAE,CAAC,GAAG,CAAC,GAAK,CAACC,EAAGC,GAAIX,EAAES,EAAE,GAAQ,CAACG,EAAGC,GAAIb,EAA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