{"version":3,"file":"UtilityOverrides.CKqoF1fP.mjs","names":[],"sources":["https:/framerusercontent.com/modules/0n8lAoZmGIKTGOSrztxX/uByJPLg4nQqhYkWzlCrQ/UtilityOverrides.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useLayoutEffect,useRef}from\"react\";// Learn more: https://www.framer.com/docs/guides/overrides/\nexport function withLogProps(Component){return props=>{console.log(props);return /*#__PURE__*/_jsx(Component,{...props,className:\"Test log props\",onClick:console.log(\"Hello World\",props.link)});};}export function withCursorPosition(Component){return props=>{// 1. We attach the ref to a wrapper <div> we control, guaranteeing it's never null\nconst containerRef=useRef(null);useLayoutEffect(()=>{const container=containerRef.current;if(!container)return;// --- A. Set Container to Relative ---\n// The wrapper div becomes the boundary for absolute positioning\ncontainer.style.position=\"relative\";// Optional: Ensure the container fills space so the layout doesn't collapse\ncontainer.style.height=\"100%\";container.style.width=\"100%\";// --- B. Find the Buttons ---\n// We search inside our container. Since Component is a child,\n// querySelector will find its buttons.\nconst prevBtn=container.querySelector('button[aria-label=\"Previous\"]');const nextBtn=container.querySelector('button[aria-label=\"Next\"]');if(!prevBtn||!nextBtn)return;// Prevention: Check if wrapper already exists to avoid duplication\nif(prevBtn.parentNode.getAttribute(\"data-nav-wrapper\"))return;// --- C. Create the Button Wrapper ---\nconst navWrapper=document.createElement(\"div\");navWrapper.setAttribute(\"data-nav-wrapper\",\"true\");// --- D. Style: Absolute Bottom Left + Gap ---\nObject.assign(navWrapper.style,{position:\"absolute\",bottom:\"0px\",left:\"0px\",display:\"flex\",gap:\"16px\",padding:\"16px\",zIndex:\"100\"});// --- E. Move Buttons ---\nnavWrapper.appendChild(prevBtn);navWrapper.appendChild(nextBtn);container.appendChild(navWrapper);},[]);return(// We wrap Component in a div so we can reliably attach the ref\n/*#__PURE__*/_jsx(\"div\",{ref:containerRef,className:\"hoc-wrapper\",children:/*#__PURE__*/_jsx(Component,{...props,className:\"Test log props\",// Fixed the console.log to run on click, not on render\nonClick:()=>console.log(\"Hello World\",props.link)})}));};}export function withHiddenContent(Component){return props=>{const cardCount=3;function hideChildrenCardWhenExceedsTheCount(){const filterElements=document.querySelectorAll(\".filter-cms-content-resource\");filterElements.forEach(parentNode=>{if(!parentNode)return;const children=Array.from(parentNode.children).filter(child=>!child.classList.contains(\"no-results-message\"));children.forEach((filterElement,index)=>{filterElement.style.display=index<cardCount?\"\":\"none\";});});}useLayoutEffect(()=>{hideChildrenCardWhenExceedsTheCount();},[]);return /*#__PURE__*/_jsx(Component,{...props});};}export function withFilterContent(Component){return props=>{const clsName=`${props.className} search-text-resource`;return /*#__PURE__*/_jsx(Component,{...props,className:clsName});};}export function withFilterContainer(Component){return props=>{const newCls=`${props.className} filter-cms-content-resource`;return /*#__PURE__*/_jsx(Component,{...props,className:newCls});};}\nexport const __FramerMetadata__ = {\"exports\":{\"withLogProps\":{\"type\":\"reactHoc\",\"name\":\"withLogProps\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withFilterContainer\":{\"type\":\"reactHoc\",\"name\":\"withFilterContainer\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withHiddenContent\":{\"type\":\"reactHoc\",\"name\":\"withHiddenContent\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withCursorPosition\":{\"type\":\"reactHoc\",\"name\":\"withCursorPosition\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withFilterContent\":{\"type\":\"reactHoc\",\"name\":\"withFilterContent\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./UtilityOverrides.map"],"mappings":"2GACA,SAAgB,EAAa,EAAU,CAAC,MAAO,KAAQ,QAAQ,IAAI,EAAM,CAAqB,EAAK,EAAU,CAAC,GAAG,EAAM,UAAU,iBAAiB,QAAQ,QAAQ,IAAI,cAAc,EAAM,KAAK,CAAC,CAAC,EAasc,SAAgB,EAAkB,EAAU,CAAC,MAAO,IAAO,CAAC,IAAM,EAAQ,GAAG,EAAM,UAAU,uBAAuB,OAAoB,EAAK,EAAU,CAAC,GAAG,EAAM,UAAU,EAAQ,CAAC,EAAI,SAAgB,EAAoB,EAAU,CAAC,MAAO,IAAO,CAAC,IAAM,EAAO,GAAG,EAAM,UAAU,8BAA8B,OAAoB,EAAK,EAAU,CAAC,GAAG,EAAM,UAAU,EAAO,CAAC,mBAd/8B,IAA0C"}