{"version":3,"file":"TestimonialStackCarousel.BUVVaf8c.mjs","names":["useState","useRef","_Fragment"],"sources":["https:/framerusercontent.com/modules/bBkSUAhS7jCKURN5KrLl/A5OUTwjcKHB0PRb1m0R3/TestimonialStackCarousel.js"],"sourcesContent":["// TESTIMONIAL STACK CAROUSEL - Pure Background Image Version\n// @ts-nocheck\nimport{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from\"react/jsx-runtime\";import{useRef,useEffect,useState,startTransition}from\"react\";import{addPropertyControls,ControlType}from\"framer\";/**\n * @framerDisableUnlink\n * @framerIntrinsicWidth 800\n * @framerIntrinsicHeight 600\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight fixed\n */export default function TestimonialStackCarousel(props){const{testimonials,cardStyle,layout3D,autoPlay,autoPlayInterval,typography,showArrows,arrowColor,arrowBgColor}=props;const[activeIndex,setActiveIndex]=useState(0);const[isDragging,setIsDragging]=useState(false);const[isMobile,setIsMobile]=useState(false);const dragStartX=useRef(0);const timerRef=useRef(null);const containerRef=useRef(null);const nextSlide=()=>{startTransition(()=>{setActiveIndex(prev=>(prev+1)%(testimonials.length||1));});};const prevSlide=()=>{startTransition(()=>{setActiveIndex(prev=>(prev-1+(testimonials.length||1))%(testimonials.length||1));});};useEffect(()=>{const checkMobile=()=>{if(typeof window!==\"undefined\"){startTransition(()=>{setIsMobile(window.innerWidth<768);});}};checkMobile();window.addEventListener(\"resize\",checkMobile);return()=>window.removeEventListener(\"resize\",checkMobile);},[]);useEffect(()=>{if(autoPlay&&!isDragging&&testimonials.length>0){timerRef.current=window.setInterval(nextSlide,autoPlayInterval);}return()=>{if(timerRef.current)clearInterval(timerRef.current);};},[autoPlay,autoPlayInterval,isDragging,testimonials.length]);const handlePointerDown=e=>{dragStartX.current=e.clientX;startTransition(()=>setIsDragging(true));};const handlePointerUp=e=>{if(!isDragging)return;const diff=e.clientX-dragStartX.current;if(Math.abs(diff)>50){if(diff>0)prevSlide();else nextSlide();}startTransition(()=>setIsDragging(false));};const getSlideStyle=index=>{const total=testimonials.length;if(total===0)return{};let relPos=index-activeIndex;if(relPos>total/2)relPos-=total;if(relPos<-total/2)relPos+=total;const absPos=Math.abs(relPos);const isActive=relPos===0;const containerWidth=containerRef.current?.offsetWidth||800;const containerHeight=containerRef.current?.offsetHeight||600;const mobileScale=isMobile?.85:1;const responsiveWidth=Math.min(cardStyle.slideWidth*mobileScale,containerWidth*.9);const responsiveHeight=Math.min(cardStyle.slideHeight*mobileScale,containerHeight*.8);const responsiveSpread=isMobile?layout3D.spread/1200*containerWidth*.5:layout3D.spread/1200*containerWidth;const xOffset=relPos*responsiveSpread;const zOffset=absPos*-(isMobile?layout3D.depth*.5:layout3D.depth);const yRotation=relPos*-(isMobile?layout3D.rotation*.5:layout3D.rotation);const scale=1-absPos*(isMobile?.2:.15);const opacity=Math.max(0,1-absPos*.4);return{position:\"absolute\",width:responsiveWidth,height:responsiveHeight,left:\"50%\",top:\"50%\",transform:`translate3d(calc(-50% + ${xOffset}px), -50%, ${zOffset}px) rotateY(${yRotation}deg) scale(${scale})`,zIndex:100-absPos,opacity:opacity,borderRadius:cardStyle.borderRadius,transition:`all ${props.transitionDuration}s cubic-bezier(0.23, 1, 0.32, 1)`,cursor:isActive?\"grab\":\"pointer\",userSelect:\"none\",boxShadow:isActive?\"0 20px 40px rgba(0,0,0,0.15)\":\"0 10px 20px rgba(0,0,0,0.05)\",overflow:\"hidden\",display:\"flex\",flexDirection:\"column\",padding:isMobile?\"24px\":\"40px\"};};return /*#__PURE__*/_jsxs(\"div\",{ref:containerRef,style:{width:\"100%\",height:\"100%\",position:\"relative\",overflow:\"visible\",perspective:\"1200px\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\"},onPointerDown:handlePointerDown,onPointerUp:handlePointerUp,children:[showArrows&&testimonials.length>1&&/*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(\"button\",{type:\"button\",\"aria-label\":\"이전 슬라이드\",onClick:e=>{e.stopPropagation();prevSlide();},style:{position:\"absolute\",left:16,top:\"50%\",transform:\"translateY(-50%)\",zIndex:200,width:40,height:40,borderRadius:\"50%\",border:\"none\",backgroundColor:arrowBgColor,cursor:\"pointer\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\",boxShadow:\"0 0 0 rgba(0,0,0,0)\",flexShrink:0},children:/*#__PURE__*/_jsx(\"svg\",{width:\"8\",height:\"16\",viewBox:\"0 0 8 16\",fill:\"none\",xmlns:\"http://www.w3.org/2000/svg\",children:/*#__PURE__*/_jsx(\"path\",{d:\"M7 1L1 8L7 15\",stroke:arrowColor,strokeWidth:\"2\",strokeLinecap:\"round\",strokeLinejoin:\"round\"})})}),/*#__PURE__*/_jsx(\"button\",{type:\"button\",\"aria-label\":\"다음 슬라이드\",onClick:e=>{e.stopPropagation();nextSlide();},style:{position:\"absolute\",right:16,top:\"50%\",transform:\"translateY(-50%)\",zIndex:200,width:40,height:40,borderRadius:\"50%\",border:\"none\",backgroundColor:arrowBgColor,cursor:\"pointer\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\",boxShadow:\"0 0 0 rgba(0,0,0,0)\",flexShrink:0},children:/*#__PURE__*/_jsx(\"svg\",{width:\"8\",height:\"16\",viewBox:\"0 0 8 16\",fill:\"none\",xmlns:\"http://www.w3.org/2000/svg\",children:/*#__PURE__*/_jsx(\"path\",{d:\"M1 1L7 8L1 15\",stroke:arrowColor,strokeWidth:\"2\",strokeLinecap:\"round\",strokeLinejoin:\"round\"})})})]}),testimonials.map((item,idx)=>/*#__PURE__*/_jsxs(\"div\",{style:getSlideStyle(idx),onClick:()=>idx!==activeIndex&&setActiveIndex(idx),children:[/*#__PURE__*/_jsx(\"img\",{src:item.avatar?.src,alt:item.name,style:{position:\"absolute\",inset:0,width:\"100%\",height:\"100%\",objectFit:\"cover\",zIndex:-1,border:\"none\",outline:\"none\",boxShadow:\"none\"}}),/*#__PURE__*/_jsx(\"div\",{style:{color:typography.quoteColor,...typography.quoteFont,marginBottom:\"20px\"},children:item.quote}),/*#__PURE__*/_jsx(\"div\",{style:{display:\"flex\",alignItems:\"center\",gap:\"28px\",marginTop:\"auto\"},children:/*#__PURE__*/_jsxs(\"div\",{children:[/*#__PURE__*/_jsx(\"div\",{style:{color:typography.nameColor,...typography.nameFont},children:item.name}),/*#__PURE__*/_jsx(\"div\",{style:{color:typography.positionColor,...typography.positionFont},children:item.position})]})})]},idx))]});}addPropertyControls(TestimonialStackCarousel,{testimonials:{type:ControlType.Array,title:\"Testimonials\",control:{type:ControlType.Object,controls:{name:{type:ControlType.String,defaultValue:\"Alex Morgan\"},quote:{type:ControlType.String,defaultValue:\"Amazing work!\",displayTextArea:true},position:{type:ControlType.String,defaultValue:\"CEO\"},avatar:{type:ControlType.ResponsiveImage,title:\"Background Image\"}}}},cardStyle:{type:ControlType.Object,title:\"Card Style\",controls:{slideWidth:{type:ControlType.Number,defaultValue:500},slideHeight:{type:ControlType.Number,defaultValue:530},borderRadius:{type:ControlType.Number,defaultValue:24},sideCardsBlur:{type:ControlType.Number,defaultValue:4}}},layout3D:{type:ControlType.Object,title:\"3D Layout\",controls:{spread:{type:ControlType.Number,defaultValue:200},depth:{type:ControlType.Number,defaultValue:150},rotation:{type:ControlType.Number,defaultValue:15}}},autoPlay:{type:ControlType.Boolean,defaultValue:true},autoPlayInterval:{type:ControlType.Number,defaultValue:5e3},transitionDuration:{type:ControlType.Number,defaultValue:.8},showArrows:{type:ControlType.Boolean,title:\"Show Arrows\",defaultValue:true},arrowColor:{type:ControlType.Color,title:\"Arrow Color\",defaultValue:\"#111111\"},arrowBgColor:{type:ControlType.Color,title:\"Arrow BG\",defaultValue:\"rgba(255,255,255,0.9)\"},typography:{type:ControlType.Object,title:\"Typography\",controls:{quoteFont:{type:ControlType.Font},quoteColor:{type:ControlType.Color,defaultValue:\"#FFFFFF\"},nameFont:{type:ControlType.Font},nameColor:{type:ControlType.Color,defaultValue:\"#FFFFFF\"},positionFont:{type:ControlType.Font},positionColor:{type:ControlType.Color,defaultValue:\"#CCCCCC\"}}}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"TestimonialStackCarousel\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"fixed\",\"framerDisableUnlink\":\"* @framerIntrinsicWidth 800\",\"framerIntrinsicHeight\":\"600\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./TestimonialStackCarousel.map"],"mappings":"2NAQG,SAAwB,EAAyB,EAAM,CAAC,GAAK,CAAC,eAAa,YAAU,WAAS,WAAS,mBAAiB,aAAW,aAAW,aAAW,gBAAc,EAAW,CAAC,EAAY,GAAgBA,EAAS,CAAC,EAAO,CAAC,EAAW,GAAeA,EAAS,EAAK,EAAO,CAAC,EAAS,GAAaA,EAAS,EAAK,EAAQ,EAAWC,EAAO,CAAC,EAAQ,EAASA,EAAO,IAAI,EAAQ,EAAaA,EAAO,IAAI,EAAQ,MAAc,CAAC,MAAoB,CAAC,EAAe,IAAO,EAAK,IAAI,EAAa,QAAQ,EAAE,CAAE,CAAC,CAAE,EAAQ,MAAc,CAAC,MAAoB,CAAC,EAAe,IAAO,EAAK,GAAG,EAAa,QAAQ,KAAK,EAAa,QAAQ,EAAE,CAAE,CAAC,CAAE,EAAE,MAAc,CAAC,IAAM,MAAgB,CAAW,IAAS,QAAa,MAAoB,CAAC,EAAY,EAAO,WAAW,GAAG,CAAE,CAAC,CAAG,EAA8D,OAA5D,EAAY,EAAE,EAAO,iBAAiB,SAAS,CAAW,MAAY,EAAO,oBAAoB,SAAS,CAAW,CAAE,EAAE,CAAC,CAAC,EAAE,OAAkB,GAAU,CAAC,GAAY,EAAa,OAAO,IAAG,EAAS,QAAQ,EAAO,YAAY,EAAU,CAAgB,OAAa,CAAI,EAAS,SAAQ,cAAc,EAAS,OAAO,CAAE,GAAI,CAAC,EAAS,EAAiB,EAAW,EAAa,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