{"version":3,"file":"RelatedProjectsShuffle.2SFjr7IO.mjs","names":["useRef"],"sources":["https:/framerusercontent.com/modules/2rtQq3sETDAApzM5Ms9h/oWo6XhuYUbiexXDnivMP/RelatedProjectsShuffle.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect,useRef}from\"react\";export const withShuffledItems=Component=>{const ShuffledComponent=props=>{const componentRef=useRef(null);const shuffleAndDisplayItems=()=>{const container=componentRef.current;if(!container)return;let items=Array.from(container.children);// Shuffle the array\nfor(let i=items.length-1;i>0;i--){const j=Math.floor(Math.random()*(i+1));[items[i],items[j]]=[items[j],items[i]];}// Re-append items to reflect new order\nitems.forEach((item,index)=>{item.style.display=index<2?\"\":\"none\";container.appendChild(item);});};useEffect(()=>{shuffleAndDisplayItems();},[]);return /*#__PURE__*/_jsx(Component,{ref:componentRef,...props});};return ShuffledComponent;};\nexport const __FramerMetadata__ = {\"exports\":{\"withShuffledItems\":{\"type\":\"reactHoc\",\"name\":\"withShuffledItems\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./RelatedProjectsShuffle.map"],"mappings":"4IAA2C,IAAoC,CAAa,EAAkB,GAAoC,GAAO,CAAC,IAAM,EAAaA,EAAO,KAAK,CAAO,MAA2B,CAAC,IAAM,EAAU,EAAa,QAAQ,GAAG,CAAC,EAAU,OAAO,IAAI,EAAM,MAAM,KAAK,EAAU,SAAS,CAC9T,IAAI,IAAI,EAAE,EAAM,OAAO,EAAE,EAAE,EAAE,IAAI,CAAC,IAAM,EAAE,KAAK,MAAM,KAAK,QAAQ,EAAE,EAAE,GAAG,CAAC,CAAC,EAAM,GAAG,EAAM,IAAI,CAAC,EAAM,GAAG,EAAM,GAAG,CACjH,EAAM,SAAS,EAAK,IAAQ,CAAC,EAAK,MAAM,QAAQ,EAAM,EAAE,GAAG,OAAO,EAAU,YAAY,EAAK,EAAG,EAAiD,OAA9C,MAAc,CAAC,GAAwB,EAAG,EAAE,CAAC,CAAqB,EAAK,EAAU,CAAC,IAAI,EAAa,GAAG,EAAM,CAAC"}