{"version":3,"file":"QuoteRotator.Bl3CbtHM.mjs","names":["React.useMemo","React.useState","React.useRef","React.useCallback","__esmMin","pe","init_npm_react_18_3_1","ne","init_ssg_sandbox_shims","window","te","_e","p","c","init_jsx_runtime","ce","de","useInView","motion","AnimatePresence","init_framer_motion_DhsWWWsN","init_framer_CaDWdxiz","useIsStaticRenderer","addPropertyControls","ControlType","QuoteRotator","props","fallbackQuotes","preparedQuotes","cleaned","quote1","attribution1","quote2","attribution2","quote3","attribution3","quote4","attribution4","quote5","attribution5","item","activeIndex","setActiveIndex","containerRef","inView","isStatic","goToNext","previous","autoRotate","intervalMs","rotationInterval","intervalId","currentQuote","minQuoteSize","quoteFontSize","backgroundColor","style","starColor","transitionDuration","textColor","quoteFont","mutedTextColor","attributionFont","init_QuoteRotator"],"sources":["https:/framerusercontent.com/modules/EHqQZYggTzNj5VLfqmPW/EZDfu5bL7z1fjedGqx0q/QuoteRotator.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import*as React from\"react\";import{addPropertyControls,ControlType,useIsStaticRenderer}from\"framer\";import{AnimatePresence,motion,useInView}from\"framer-motion\";/**\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight auto\n */export default function QuoteRotator(props){const{quote1,attribution1,quote2,attribution2,quote3,attribution3,quote4,attribution4,quote5,attribution5,autoRotate,rotationInterval,backgroundColor,textColor,mutedTextColor,starColor,padding,quoteFontSize,transitionDuration,quoteFont,attributionFont,style}=props;const fallbackQuotes=React.useMemo(()=>[{quote:\"“The biggest pain point that Energy CX relieved for our company was helping us buy energy at the right time and providing clear visibility into the process. This has made things much easier for us and taken a lot of guesswork out of energy purchasing.”\",attribution:\"Juan Sanchez, Functional Operations Director—Logistics, Blackhawk Industrial\"}],[]);const preparedQuotes=React.useMemo(()=>{const slots=[{quote:quote1,attribution:attribution1},{quote:quote2,attribution:attribution2},{quote:quote3,attribution:attribution3},{quote:quote4,attribution:attribution4},{quote:quote5,attribution:attribution5}];const cleaned=slots.filter(item=>item.quote&&item.quote.trim().length>0).slice(0,5);return cleaned.length>0?cleaned:fallbackQuotes;},[quote1,attribution1,quote2,attribution2,quote3,attribution3,quote4,attribution4,quote5,attribution5,fallbackQuotes]);const[activeIndex,setActiveIndex]=React.useState(0);const containerRef=React.useRef(null);const inView=useInView(containerRef,{amount:.45});const isStatic=useIsStaticRenderer();React.useEffect(()=>{if(activeIndex>preparedQuotes.length-1){React.startTransition(()=>setActiveIndex(0));}},[activeIndex,preparedQuotes.length]);const goToNext=React.useCallback(()=>{if(preparedQuotes.length<2)return;React.startTransition(()=>{setActiveIndex(previous=>(previous+1)%preparedQuotes.length);});},[preparedQuotes.length]);React.useEffect(()=>{if(isStatic||!autoRotate||!inView||preparedQuotes.length<2)return;const intervalMs=Math.max(1,rotationInterval)*1e3;if(typeof window===\"undefined\")return;const intervalId=window.setInterval(goToNext,intervalMs);return()=>{window.clearInterval(intervalId);};},[autoRotate,rotationInterval,goToNext,preparedQuotes.length,inView,isStatic]);const currentQuote=preparedQuotes[activeIndex]||fallbackQuotes[0];const minQuoteSize=Math.max(16,Math.round(quoteFontSize*.78));return /*#__PURE__*/_jsx(\"section\",{ref:containerRef,style:{position:\"relative\",width:\"100%\",background:backgroundColor,padding,boxSizing:\"border-box\",...style},children:/*#__PURE__*/_jsxs(\"div\",{style:{width:\"100%\",maxWidth:980,margin:\"0 auto\",display:\"flex\",flexDirection:\"column\",alignItems:\"center\",justifyContent:\"center\",textAlign:\"center\",gap:18},children:[/*#__PURE__*/_jsx(\"div\",{style:{color:starColor,fontSize:20,lineHeight:1,letterSpacing:\"0.1em\",width:\"max-content\"},\"aria-hidden\":true,children:\"★★★★★\"}),/*#__PURE__*/_jsx(AnimatePresence,{mode:\"wait\",initial:false,children:/*#__PURE__*/_jsx(motion.blockquote,{initial:{opacity:0,y:14},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:Math.max(.15,transitionDuration),ease:\"easeInOut\"},style:{margin:0,maxWidth:820},children:/*#__PURE__*/_jsx(\"p\",{style:{margin:0,color:textColor,fontSize:`clamp(${minQuoteSize}px, 4.6vw, ${quoteFontSize}px)`,lineHeight:quoteFont?.lineHeight??\"1.22em\",letterSpacing:quoteFont?.letterSpacing??\"-0.01em\",textAlign:quoteFont?.textAlign??\"center\",fontFamily:quoteFont?.fontFamily,fontWeight:quoteFont?.fontWeight,fontStyle:quoteFont?.fontStyle},children:currentQuote.quote})},`${activeIndex}-${currentQuote.quote}`)}),/*#__PURE__*/_jsx(\"div\",{style:{color:mutedTextColor,textTransform:\"uppercase\",letterSpacing:attributionFont?.letterSpacing??\"0.08em\",lineHeight:attributionFont?.lineHeight??\"1.3em\",fontSize:attributionFont?.fontSize??\"13px\",textAlign:attributionFont?.textAlign??\"center\",fontFamily:attributionFont?.fontFamily,fontWeight:attributionFont?.fontWeight,fontStyle:attributionFont?.fontStyle,width:\"max-content\",maxWidth:\"100%\"},children:currentQuote.attribution})]})});}addPropertyControls(QuoteRotator,{quote1:{type:ControlType.String,title:\"Quote 1\",displayTextArea:true,defaultValue:\"“The biggest pain point that Energy CX relieved for our company was helping us buy energy at the right time and providing clear visibility into the process. This has made things much easier for us and taken a lot of guesswork out of energy purchasing.”\"},attribution1:{type:ControlType.String,title:\"Attribution 1\",defaultValue:\"Juan Sanchez, Functional Operations Director—Logistics, Blackhawk Industrial\"},quote2:{type:ControlType.String,title:\"Quote 2\",displayTextArea:true,defaultValue:\"\"},attribution2:{type:ControlType.String,title:\"Attribution 2\",defaultValue:\"\"},quote3:{type:ControlType.String,title:\"Quote 3\",displayTextArea:true,defaultValue:\"\"},attribution3:{type:ControlType.String,title:\"Attribution 3\",defaultValue:\"\"},quote4:{type:ControlType.String,title:\"Quote 4\",displayTextArea:true,defaultValue:\"\"},attribution4:{type:ControlType.String,title:\"Attribution 4\",defaultValue:\"\"},quote5:{type:ControlType.String,title:\"Quote 5\",displayTextArea:true,defaultValue:\"\"},attribution5:{type:ControlType.String,title:\"Attribution 5\",defaultValue:\"\"},autoRotate:{type:ControlType.Boolean,title:\"Auto Rotate\",defaultValue:true,enabledTitle:\"On\",disabledTitle:\"Off\"},rotationInterval:{type:ControlType.Number,title:\"Interval\",defaultValue:5,min:1,max:20,step:.5,unit:\"s\"},transitionDuration:{type:ControlType.Number,title:\"Transition\",defaultValue:.55,min:.15,max:2,step:.05,unit:\"s\"},padding:{type:ControlType.Padding,title:\"Padding\",defaultValue:\"88px 24px 88px 24px\"},backgroundColor:{type:ControlType.Color,title:\"Background\",defaultValue:\"#000000\"},textColor:{type:ControlType.Color,title:\"Quote Color\",defaultValue:\"#FFFFFF\"},mutedTextColor:{type:ControlType.Color,title:\"Muted Color\",defaultValue:\"rgba(255,255,255,0.65)\"},starColor:{type:ControlType.Color,title:\"Star Color\",defaultValue:\"#FFFFFF\"},quoteFontSize:{type:ControlType.Number,title:\"Quote Size\",defaultValue:23,min:16,max:42,step:1,unit:\"px\"},quoteFont:{type:ControlType.Font,title:\"Quote Font\",defaultValue:{fontSize:\"23px\",variant:\"Medium\",letterSpacing:\"-0.01em\",lineHeight:\"1.22em\",textAlign:\"center\"},controls:\"extended\",defaultFontType:\"sans-serif\"},attributionFont:{type:ControlType.Font,title:\"Attribution Font\",defaultValue:{fontSize:\"13px\",letterSpacing:\"0.08em\",lineHeight:\"1.3em\",textAlign:\"center\"},controls:\"extended\",defaultFontType:\"monospace\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"QuoteRotator\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"auto\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./QuoteRotator.map"],"mappings":"A,ySAGG,SAAwByB,EAAa,EAAM,CAAC,GAAK,CAAC,SAAO,eAAa,SAAO,eAAa,SAAO,eAAa,SAAO,eAAa,SAAO,eAAa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