{"version":3,"file":"LoadMoreMotion.DV_L9Mvt.mjs","names":["forwardRef","_jsx","useState","useCallback","__esmMin","init_ssg_sandbox_shims","ne","_e","c","J","init_jsx_runtime","init_npm_react_18_3_1","window","ensureStyle","style","CSS","withLoadMoreMark","Component","props","ref","event","lastClick","setRef","value","withLoadedEnter","fresh","WINDOW_MS","attach","node","list","loaded","order","MAX_STAGGER","STAGGER_MS","init_LoadMoreMotion"],"sources":["https:/framerusercontent.com/modules/Po8No6iiVycS2mzeEAZq/XdGpp3OANn4TMSLNuCgJ/LoadMoreMotion.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{forwardRef,useCallback,useState}from\"react\";// \"Load more\" motion for CMS grids (marketplace integrations, customer stories).\n// Only the cards that arrive after a Load More click animate in: they fade and rise 8px (250ms,\n// strong ease-out), 40ms apart. Cards already on the page never move. Reduced motion: fade only.\nconst WINDOW_MS=3e3// cards that mount this soon after a click belong to that load\n;const STAGGER_MS=40;const MAX_STAGGER=8;let lastClick=-Infinity;const CSS=`\n@keyframes dyx-loaded-in { from { opacity: 0; transform: translateY(8px); } }\n@keyframes dyx-loaded-fade { from { opacity: 0; } }\n[data-dyx-loaded] { animation: dyx-loaded-in 250ms cubic-bezier(0.23, 1, 0.32, 1) var(--dyx-loaded-delay, 0ms) backwards; }\n@media (prefers-reduced-motion: reduce) { [data-dyx-loaded] { animation-name: dyx-loaded-fade; } }\n`;function ensureStyle(){if(typeof document===\"undefined\"||document.getElementById(\"dyx-loaded-style\"))return;const style=document.createElement(\"style\");style.id=\"dyx-loaded-style\";style.textContent=CSS;document.head.appendChild(style);}// On the Load More button: remembers when it was clicked.\nexport function withLoadMoreMark(Component){return /*#__PURE__*/forwardRef(function LoadMoreMark(props,ref){return /*#__PURE__*/_jsx(Component,{...props,ref:ref,onClickCapture:event=>{props.onClickCapture?.(event);ensureStyle();lastClick=performance.now();}});});}function setRef(ref,value){if(typeof ref===\"function\")ref(value);else if(ref&&typeof ref===\"object\")ref.current=value;}// On the repeated card of the collection list. Framer renders a copy of the list per breakpoint,\n// so the stagger order comes from the card's position among the new cards in its own list.\nexport function withLoadedEnter(Component){return /*#__PURE__*/forwardRef(function LoadedEnter(props,ref){const[fresh]=useState(()=>typeof window!==\"undefined\"&&performance.now()-lastClick<=WINDOW_MS);const attach=useCallback(node=>{setRef(ref,node);if(!fresh||!node)return;const list=node.parentElement?.parentElement??node.parentElement;const loaded=list?Array.from(list.querySelectorAll(\"[data-dyx-loaded]\")):[node];const order=Math.max(0,loaded.indexOf(node));node.style.setProperty(\"--dyx-loaded-delay\",`${Math.min(order,MAX_STAGGER)*STAGGER_MS}ms`);},[ref,fresh]);if(!fresh)return /*#__PURE__*/_jsx(Component,{...props,ref:ref});return /*#__PURE__*/_jsx(Component,{...props,ref:attach,\"data-dyx-loaded\":\"\"});});}\nexport const __FramerMetadata__ = {\"exports\":{\"withLoadedEnter\":{\"type\":\"reactHoc\",\"name\":\"withLoadedEnter\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withLoadMoreMark\":{\"type\":\"reactHoc\",\"name\":\"withLoadMoreMark\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./LoadMoreMotion.map"],"mappings":"A,8IASE,SAASa,GAAa,CAAC,GAAG,OAAO,SAAW,KAAa,SAAS,eAAe,kBAAkB,EAAE,OAAO,IAAMC,EAAM,SAAS,cAAc,OAAO,EAAEA,EAAM,GAAG,mBAAmBA,EAAM,YAAYC,EAAI,SAAS,KAAK,YAAYD,CAAK,CAAE,CAC7O,SAAgBE,EAAiBC,EAAU,CAAC,MAAoBjB,gBAAW,SAAsBkB,EAAMC,EAAI,CAAC,MAAoBlB,gBAAKgB,EAAU,CAAC,GAAGC,EAAUC,MAAI,eAAeC,GAAO,CAACF,EAAM,iBAAiBE,CAAK,EAAEP,EAAY,EAAEQ,EAAU,YAAY,IAAI,CAAE,CAAC,CAAC,CAAE,CAAC,CAA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