{"version":3,"file":"AnimatedCarousel.BWJe6dEB.mjs","names":["React.useMemo","React.useState","React.useCallback"],"sources":["https:/framerusercontent.com/modules/8iwMu1bp0T9vScqgab7Y/Mwnb5GDPv0E3UgnqcTZd/AnimatedCarousel.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import*as React from\"react\";import{addPropertyControls,ControlType}from\"framer\";import{motion,AnimatePresence}from\"framer-motion\";/* User request: update FeatureCarousel to include an internal compact dot indicator pill with clickable accessible dots, synced with autoplay/active slide, desktop absolute bottom-center placement, mobile below-content placement, while preserving existing controls and carousel behavior. *//**\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight any-prefer-fixed\n */export default function FeatureCarousel(props){const{item1Label,item2Label,item3Label,item4Label,item5Label,image1,image2,image3,image4,image5,image1Alt,image2Alt,image3Alt,image4Alt,image5Alt,radius,objectFit,intervalSeconds,tabHeight,barColor,activeTabColor,dividerColor}=props;const intervalMs=intervalSeconds*1e3;const items=React.useMemo(()=>[{label:item1Label,image:image1,alt:image1Alt},{label:item2Label,image:image2,alt:image2Alt},{label:item3Label,image:image3,alt:image3Alt},{label:item4Label,image:image4,alt:image4Alt},{label:item5Label,image:image5,alt:image5Alt}].filter(item=>item.label&&item.image),[item1Label,item2Label,item3Label,item4Label,item5Label,image1,image2,image3,image4,image5,image1Alt,image2Alt,image3Alt,image4Alt,image5Alt]);const[activeIndex,setActiveIndex]=React.useState(0);const[cycleKey,setCycleKey]=React.useState(0);React.useEffect(()=>{if(activeIndex>=items.length){React.startTransition(()=>{setActiveIndex(0);});}},[items.length,activeIndex]);React.useEffect(()=>{if(items.length<=1)return;const timer=setTimeout(()=>{React.startTransition(()=>{setActiveIndex(current=>(current+1)%items.length);setCycleKey(key=>key+1);});},intervalMs);return()=>clearTimeout(timer);},[activeIndex,intervalMs,items.length]);const selectItem=React.useCallback(index=>{React.startTransition(()=>{setActiveIndex(index);setCycleKey(key=>key+1);});},[]);if(items.length===0){return /*#__PURE__*/_jsx(\"div\",{style:{width:\"100%\",height:\"100%\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\",background:\"#f2f2f2\",color:\"#999\",fontSize:14,borderRadius:radius,border:`1px solid ${dividerColor}`},children:\"Add at least one label and image\"});}const activeItem=items[activeIndex];const renderIndicator=React.useCallback(()=>/*#__PURE__*/_jsx(\"div\",{className:\"feature-carousel-dot-indicator\",style:{display:\"inline-flex\",alignItems:\"center\",justifyContent:\"center\",gap:8,padding:\"12px 20px\",borderRadius:999,background:\"rgba(18, 18, 20, 0.92)\",border:\"1px solid rgba(255, 255, 255, 0.12)\",boxShadow:\"0 2px 10px rgba(0, 0, 0, 0.14), inset 0 1px 0 rgba(255,255,255,0.04)\"},role:\"group\",\"aria-label\":\"Carousel slide navigation\",children:items.map((item,index)=>{const isActive=index===activeIndex;return /*#__PURE__*/_jsx(\"button\",{onClick:()=>selectItem(index),\"aria-label\":`Go to slide ${index+1}: ${item.label}`,\"aria-current\":isActive?true:undefined,style:{width:isActive?32:6,height:6,borderRadius:999,border:\"none\",margin:0,padding:0,background:isActive?\"rgba(255,255,255,0.95)\":\"rgba(255,255,255,0.35)\",cursor:\"pointer\",transition:\"all 0.4s ease\",appearance:\"none\",WebkitAppearance:\"none\"}},`dot-${item.label}-${index}`);})}),[activeIndex,items,selectItem]);return /*#__PURE__*/_jsxs(\"div\",{className:\"feature-carousel-root\",style:{position:\"relative\",width:\"100%\",height:\"100%\",display:\"flex\",flexDirection:\"column\",gap:0,overflow:\"hidden\",borderRadius:radius},children:[/*#__PURE__*/_jsx(\"div\",{style:{display:\"grid\",gridTemplateColumns:`repeat(${items.length}, 1fr)`,background:\"#fff\",overflow:\"hidden\",height:tabHeight,flexShrink:0,border:`1px solid ${dividerColor}`,borderBottom:\"none\"},children:items.map((item,index)=>{const isActive=index===activeIndex;return /*#__PURE__*/_jsxs(\"button\",{onClick:()=>selectItem(index),style:{position:\"relative\",height:\"100%\",margin:0,padding:\"0 12px\",border:\"none\",borderRight:index<items.length-1?`1px solid ${dividerColor}`:\"none\",background:isActive?activeTabColor:\"#fff\",cursor:\"pointer\",fontSize:14,fontWeight:600,color:\"#111\",overflow:\"hidden\",appearance:\"none\",WebkitAppearance:\"none\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\",whiteSpace:\"nowrap\",textOverflow:\"ellipsis\"},children:[isActive&&items.length>1&&/*#__PURE__*/_jsx(motion.div,{initial:{scaleX:0},animate:{scaleX:1},transition:{duration:intervalSeconds,ease:\"linear\"},style:{position:\"absolute\",top:0,left:0,height:3,width:\"100%\",background:barColor,transformOrigin:\"left center\"}},`bar-${cycleKey}-${index}`),/*#__PURE__*/_jsx(\"span\",{style:{position:\"relative\",zIndex:1,overflow:\"hidden\",textOverflow:\"ellipsis\"},children:item.label})]},`${item.label}-${index}`);})}),/*#__PURE__*/_jsxs(\"div\",{style:{position:\"relative\",flex:1,width:\"100%\",overflow:\"hidden\",background:\"#fff\",border:`1px solid ${dividerColor}`},children:[/*#__PURE__*/_jsx(AnimatePresence,{mode:\"wait\",children:activeItem?.image&&/*#__PURE__*/_jsx(motion.img,{src:activeItem.image,alt:activeItem.alt||\"\",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.25,ease:\"easeOut\"},style:{width:\"100%\",height:\"100%\",objectFit,display:\"block\"}},`${activeIndex}-${activeItem.image}`)}),items.length>1&&/*#__PURE__*/_jsx(\"div\",{className:\"feature-carousel-indicator-desktop\",style:{position:\"absolute\",left:0,right:0,bottom:20,display:\"flex\",justifyContent:\"center\",pointerEvents:\"none\"},children:/*#__PURE__*/_jsx(\"div\",{style:{pointerEvents:\"auto\"},children:renderIndicator()})})]}),items.length>1&&/*#__PURE__*/_jsx(\"div\",{className:\"feature-carousel-indicator-mobile\",style:{display:\"none\",justifyContent:\"center\",marginTop:20},children:renderIndicator()}),/*#__PURE__*/_jsx(\"style\",{children:`\n                @media (max-width: 767px) {\n                    .feature-carousel-root {\n                        overflow: visible !important;\n                    }\n                    .feature-carousel-indicator-desktop {\n                        display: none !important;\n                    }\n                    .feature-carousel-indicator-mobile {\n                        display: flex !important;\n                    }\n                }\n            `})]});}FeatureCarousel.defaultProps={item1Label:\"Ideas\",item2Label:\"Roadmap\",item3Label:\"Announcements\",item4Label:\"Surveys\",item5Label:\"\",radius:0,objectFit:\"contain\",intervalSeconds:10,tabHeight:60,barColor:\"#ff4f8b\",activeTabColor:\"rgba(255, 75, 130, 0.08)\",dividerColor:\"rgba(0,0,0,0.06)\",image1Alt:\"\",image2Alt:\"\",image3Alt:\"\",image4Alt:\"\",image5Alt:\"\"};addPropertyControls(FeatureCarousel,{item1Label:{type:ControlType.String,title:\"Label 1\",defaultValue:\"Ideas\"},item2Label:{type:ControlType.String,title:\"Label 2\",defaultValue:\"Roadmap\"},item3Label:{type:ControlType.String,title:\"Label 3\",defaultValue:\"Announcements\"},item4Label:{type:ControlType.String,title:\"Label 4\",defaultValue:\"Surveys\"},item5Label:{type:ControlType.String,title:\"Label 5\",defaultValue:\"\"},image1:{type:ControlType.Image,title:\"Image 1\"},image1Alt:{type:ControlType.String,title:\"Alt 1\",defaultValue:\"\"},image2:{type:ControlType.Image,title:\"Image 2\"},image2Alt:{type:ControlType.String,title:\"Alt 2\",defaultValue:\"\"},image3:{type:ControlType.Image,title:\"Image 3\"},image3Alt:{type:ControlType.String,title:\"Alt 3\",defaultValue:\"\"},image4:{type:ControlType.Image,title:\"Image 4\"},image4Alt:{type:ControlType.String,title:\"Alt 4\",defaultValue:\"\"},image5:{type:ControlType.Image,title:\"Image 5\"},image5Alt:{type:ControlType.String,title:\"Alt 5\",defaultValue:\"\"},objectFit:{type:ControlType.Enum,title:\"Object Fit\",defaultValue:\"contain\",options:[\"contain\",\"cover\",\"fill\",\"none\",\"scale-down\"],optionTitles:[\"Contain\",\"Cover\",\"Fill\",\"None\",\"Scale Down\"]},intervalSeconds:{type:ControlType.Number,title:\"Seconds\",defaultValue:10,min:1,max:60,step:1,displayStepper:true},tabHeight:{type:ControlType.Number,title:\"Tab Height\",defaultValue:60,min:40,max:120,step:1,displayStepper:true},radius:{type:ControlType.Number,title:\"Radius\",defaultValue:0,min:0,max:40,step:1,displayStepper:true},barColor:{type:ControlType.Color,title:\"Bar Color\",defaultValue:\"#ff4f8b\"},activeTabColor:{type:ControlType.Color,title:\"Active Tab\",defaultValue:\"rgba(255, 75, 130, 0.08)\"},dividerColor:{type:ControlType.Color,title:\"Divider\",defaultValue:\"rgba(0,0,0,0.06)\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"FeatureCarousel\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerSupportedLayoutHeight\":\"any-prefer-fixed\",\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./AnimatedCarousel.map"],"mappings":"qQAGG,SAAwB,EAAgB,EAAM,CAAC,GAAK,CAAC,aAAW,aAAW,aAAW,aAAW,aAAW,SAAO,SAAO,SAAO,SAAO,SAAO,YAAU,YAAU,YAAU,YAAU,YAAU,SAAO,YAAU,kBAAgB,YAAU,WAAS,iBAAe,gBAAc,EAAY,EAAW,EAAgB,IAAU,EAAMA,MAAkB,CAAC,CAAC,MAAM,EAAW,MAAM,EAAO,IAAI,CAAS,EAAE,CAAC,MAAM,EAAW,MAAM,EAAO,IAAI,CAAS,EAAE,CAAC,MAAM,EAAW,MAAM,EAAO,IAAI,CAAS,EAAE,CAAC,MAAM,EAAW,MAAM,EAAO,IAAI,CAAS,EAAE,CAAC,MAAM,EAAW,MAAM,EAAO,IAAI,CAAS,CAAC,CAAC,CAAC,OAAO,GAAM,EAAK,OAAO,EAAK,KAAK,EAAE,CAAC,EAAW,EAAW,EAAW,EAAW,EAAW,EAAO,EAAO,EAAO,EAAO,EAAO,EAAU,EAAU,EAAU,EAAU,CAAS,CAAC,EAAO,CAAC,EAAY,GAAgBC,EAA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