{
  "version": 3,
  "sources": ["ssg:https://framerusercontent.com/modules/oJnwsseQ5Qa3HYMJ9iHf/8PDS31VUJuniqIoPWgFD/Simple_Slideshow.js"],
  "sourcesContent": ["import{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect,useRef,useState}from\"react\";import{addPropertyControls,ControlType,RenderTarget}from\"framer\";const isBrowser=typeof window!==\"undefined\";const isCanvas=RenderTarget.current()===RenderTarget.canvas;/**\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight auto\n * @framerDisableUnlink\n */export function SwiperCenteredSlider({slides}){const containerRef=useRef(null);const[hydrated,setHydrated]=useState(false);useEffect(()=>{if(isBrowser)setHydrated(true);},[]);useEffect(()=>{if(!hydrated||!isBrowser||!window.Swiper)return;const swiper=new window.Swiper(\".swiper\",{centeredSlides:true,slidesPerView:\"auto\",spaceBetween:12,loop:true,autoplay:isCanvas?false:{delay:2500,disableOnInteraction:true},simulateTouch:true});const updateChildWidths=()=>{const slideEls=document.querySelectorAll(\".swiper-slide\");slideEls.forEach(slide=>{const child=slide.firstElementChild;if(child){Object.assign(child.style,{width:\"calc(100vw - 80px)\",minWidth:\"296px\",maxWidth:\"400px\"});}});swiper.update();};updateChildWidths();window.addEventListener(\"resize\",updateChildWidths);return()=>window.removeEventListener(\"resize\",updateChildWidths);},[hydrated]);if(isCanvas){return /*#__PURE__*/_jsx(\"div\",{style:{padding:40,textAlign:\"center\",color:\"#999\"},children:\"Canvas Preview: Slider\"});}return /*#__PURE__*/_jsx(\"div\",{ref:containerRef,style:{overflow:\"visible\"},children:/*#__PURE__*/_jsx(\"div\",{className:\"swiper\",style:{overflow:\"visible\"},children:/*#__PURE__*/_jsx(\"div\",{className:\"swiper-wrapper\",style:{display:\"flex\",alignItems:\"center\"},children:slides.map((slide,index)=>/*#__PURE__*/_jsx(\"div\",{className:\"swiper-slide\",style:{flexShrink:1,display:\"flex\",justifyContent:\"flex-start\",overflow:\"visible\"},children:slide},index))})})});}SwiperCenteredSlider.defaultProps={slides:[]};addPropertyControls(SwiperCenteredSlider,{slides:{type:ControlType.Array,title:\"Slides\",control:{type:ControlType.ComponentInstance},maxCount:10}});\nexport const __FramerMetadata__ = {\"exports\":{\"SwiperCenteredSlider\":{\"type\":\"reactComponent\",\"name\":\"SwiperCenteredSlider\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerDisableUnlink\":\"\",\"framerSupportedLayoutHeight\":\"auto\",\"framerSupportedLayoutWidth\":\"any\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Simple_Slideshow.map"],
  "mappings": "8JAAyJ,IAAMA,EAAU,OAAOC,EAAS,IAAkBC,EAASC,EAAa,QAAQ,IAAIA,EAAa,OAIhP,SAASC,EAAqB,CAAC,OAAAC,CAAM,EAAE,CAAC,IAAMC,EAAaC,EAAO,IAAI,EAAO,CAACC,EAASC,CAAW,EAAEC,EAAS,EAAK,EAA2tB,OAAztBC,EAAU,IAAI,CAAIX,GAAUS,EAAY,EAAI,CAAE,EAAE,CAAC,CAAC,EAAEE,EAAU,IAAI,CAAC,GAAG,CAACH,GAAU,CAACR,GAAW,CAACC,EAAO,OAAO,OAAO,IAAMW,EAAO,IAAIX,EAAO,OAAO,UAAU,CAAC,eAAe,GAAK,cAAc,OAAO,aAAa,GAAG,KAAK,GAAK,SAASC,EAAS,GAAM,CAAC,MAAM,KAAK,qBAAqB,EAAI,EAAE,cAAc,EAAI,CAAC,EAAQW,EAAkB,IAAI,CAAgB,SAAS,iBAAiB,eAAe,EAAW,QAAQC,GAAO,CAAC,IAAMC,EAAMD,EAAM,kBAAqBC,GAAO,OAAO,OAAOA,EAAM,MAAM,CAAC,MAAM,qBAAqB,SAAS,QAAQ,SAAS,OAAO,CAAC,CAAG,CAAC,EAAEH,EAAO,OAAO,CAAE,EAAE,OAAAC,EAAkB,EAAEZ,EAAO,iBAAiB,SAASY,CAAiB,EAAQ,IAAIZ,EAAO,oBAAoB,SAASY,CAAiB,CAAE,EAAE,CAACL,CAAQ,CAAC,EAAKN,EAA8Bc,EAAK,MAAM,CAAC,MAAM,CAAC,QAAQ,GAAG,UAAU,SAAS,MAAM,MAAM,EAAE,SAAS,wBAAwB,CAAC,EAAuBA,EAAK,MAAM,CAAC,IAAIV,EAAa,MAAM,CAAC,SAAS,SAAS,EAAE,SAAsBU,EAAK,MAAM,CAAC,UAAU,SAAS,MAAM,CAAC,SAAS,SAAS,EAAE,SAAsBA,EAAK,MAAM,CAAC,UAAU,iBAAiB,MAAM,CAAC,QAAQ,OAAO,WAAW,QAAQ,EAAE,SAASX,EAAO,IAAI,CAACS,EAAMG,IAAqBD,EAAK,MAAM,CAAC,UAAU,eAAe,MAAM,CAAC,WAAW,EAAE,QAAQ,OAAO,eAAe,aAAa,SAAS,SAAS,EAAE,SAASF,CAAK,EAAEG,CAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAE,CAACb,EAAqB,aAAa,CAAC,OAAO,CAAC,CAAC,EAAEc,EAAoBd,EAAqB,CAAC,OAAO,CAAC,KAAKe,EAAY,MAAM,MAAM,SAAS,QAAQ,CAAC,KAAKA,EAAY,iBAAiB,EAAE,SAAS,EAAE,CAAC,CAAC",
  "names": ["isBrowser", "window", "isCanvas", "RenderTarget", "SwiperCenteredSlider", "slides", "containerRef", "pe", "hydrated", "setHydrated", "ye", "ue", "swiper", "updateChildWidths", "slide", "child", "p", "index", "addPropertyControls", "ControlType"]
}
