{"version":3,"file":"shared-lib.B4RWpFev.mjs","names":["useRef","useState"],"sources":["https:/framerusercontent.com/modules/sf5IA3OQF6wO10XxD6C9/63KBC8gnBScBy81hSzdq/wbGMGfZeE.js","https:/framerusercontent.com/modules/njoUdBKVBTnzDo7nxQ4q/vaGBrrWJlvTbRp4Kj9WV/Stacked_Card_Transition.js","https:/framerusercontent.com/modules/98ZnlaVoeaeaFBxOeBlN/3D9jy0NoKL4WMHlwHpVv/siteMetadata.js"],"sourcesContent":["// Generated by Framer (18229b5)\nimport{fontStore}from\"framer\";fontStore.loadFonts([\"GF;Almarai-regular\",\"GF;Almarai-700\"]);export const fonts=[{explicitInter:true,fonts:[{cssFamilyName:\"Almarai\",source:\"google\",style:\"normal\",uiFamilyName:\"Almarai\",url:\"https://fonts.gstatic.com/s/almarai/v19/tsstApxBaigK_hnnc1-PonC3vqc.woff2\",weight:\"400\"},{cssFamilyName:\"Almarai\",source:\"google\",style:\"normal\",uiFamilyName:\"Almarai\",url:\"https://fonts.gstatic.com/s/almarai/v19/tssoApxBaigK_hnnS-aghn2coq72sXg.woff2\",weight:\"700\"}]}];export const css=['.framer-pqHwU .framer-styles-preset-37zkd9:not(.rich-text-wrapper), .framer-pqHwU .framer-styles-preset-37zkd9.rich-text-wrapper p { --framer-font-family: \"Almarai\", \"Almarai Placeholder\", sans-serif; --framer-font-family-bold: \"Almarai\", \"Almarai Placeholder\", sans-serif; --framer-font-open-type-features: normal; --framer-font-size: 16px; --framer-font-style: normal; --framer-font-style-bold: normal; --framer-font-variation-axes: normal; --framer-font-weight: 400; --framer-font-weight-bold: 700; --framer-letter-spacing: 0em; --framer-line-height: 150%; --framer-paragraph-spacing: 20px; --framer-text-alignment: center; --framer-text-color: var(--token-9e26a0cb-9685-43b0-a41d-4a5dca2c3056, #ffffff); --framer-text-decoration: none; --framer-text-stroke-color: initial; --framer-text-stroke-width: initial; --framer-text-transform: none; }'];export const className=\"framer-pqHwU\";\nexport const __FramerMetadata__ = {\"exports\":{\"fonts\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"className\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"css\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}","import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType,RenderTarget}from\"framer\";import{useEffect,useLayoutEffect,useRef,useState}from\"react\";import{createPortal}from\"react-dom\";import{motion,useAnimation}from\"framer-motion\";const SESSION_KEY=\"pt_wipe_active\";/**\n * @framerSupportedLayoutWidth auto\n * @framerSupportedLayoutHeight auto\n */export default function StackedCardsTransition({direction=\"vertical\",card1Color=\"#0f0f0f\",card2Color=\"#e85d2f\",card3Color=\"#f0e0d0\",cardTransition={type:\"tween\",duration:.7,ease:[.76,0,.24,1]},stagger=90}){const isCanvas=RenderTarget.current()===RenderTarget.canvas;const c1=useAnimation();const c2=useAnimation();const c3=useAnimation();const portalEl=useRef(null);const[portalReady,setPortalReady]=useState(false);const navigating=useRef(false);const allowNextClick=useRef(false);// Tracks whether cards are currently covering the screen.\n// Used by the fallback timer to auto-sweep cards out if the enter\n// animation never fires (e.g. same-page click in Framer Preview).\nconst isCovering=useRef(false);const reducedMotion=typeof window!==\"undefined\"?window.matchMedia(\"(prefers-reduced-motion: reduce)\").matches:false;// Read sessionStorage synchronously on first render — before any paint.\n// This is the key fix: cards are invisible on cold load, covering on enter.\nconst[startCovered]=useState(()=>{if(typeof window===\"undefined\"||isCanvas)return false;return sessionStorage.getItem(SESSION_KEY)===\"true\";});const isTransitionRef=useRef(startCovered);function posOffIn(){return direction===\"horizontal\"?{x:\"100%\",y:\"0%\"}:{x:\"0%\",y:\"100%\"};}function posCenter(){return{x:\"0%\",y:\"0%\"};}function posOffOut(){return direction===\"horizontal\"?{x:\"-100%\",y:\"0%\"}:{x:\"0%\",y:\"-100%\"};}// ─── PORTAL SETUP ─────────────────────────────────────────────────────\nuseLayoutEffect(()=>{if(isCanvas)return;if(startCovered)sessionStorage.removeItem(SESSION_KEY);const el=document.createElement(\"div\");el.setAttribute(\"data-pt-wipe-portal\",\"\");document.body.appendChild(el);portalEl.current=el;setPortalReady(true);return()=>{document.body.removeChild(el);portalEl.current=null;};},[]);// ─── ENTER ANIMATION ──────────────────────────────────────────────────\nuseEffect(()=>{if(isCanvas||!portalReady||!isTransitionRef.current)return;async function runEnter(){// Real navigation happened — disarm the fallback timer\nisCovering.current=false;if(reducedMotion){c1.set(posOffOut());c2.set(posOffOut());c3.set(posOffOut());return;}await new Promise(r=>setTimeout(r,160));const out=posOffOut();c3.start({...out,transition:cardTransition});await new Promise(r=>setTimeout(r,stagger));c2.start({...out,transition:cardTransition});await new Promise(r=>setTimeout(r,stagger));await c1.start({...out,transition:cardTransition});}runEnter();},[portalReady]);// ─── EXIT ANIMATION ───────────────────────────────────────────────────\nuseEffect(()=>{if(isCanvas)return;const handleClick=e=>{const anchor=e.target.closest(\"a[href]\");if(!anchor)return;if(allowNextClick.current){allowNextClick.current=false;return;}if(navigating.current){e.preventDefault();return;}const href=anchor.getAttribute(\"href\");if(!href)return;if(href.startsWith(\"#\")||href.startsWith(\"mailto:\")||href.startsWith(\"tel:\")||href.startsWith(\"javascript:\"))return;let parsedUrl;try{parsedUrl=new URL(href,window.location.href);if(parsedUrl.hostname!==window.location.hostname)return;}catch{return;}// Same-page link — skip entirely so cards never get stuck\nif(parsedUrl.pathname===window.location.pathname)return;e.preventDefault();e.stopPropagation();navigating.current=true;async function runExit(){if(reducedMotion){sessionStorage.setItem(SESSION_KEY,\"true\");allowNextClick.current=true;navigating.current=false;anchor.click();return;}c1.set(posOffIn());c2.set(posOffIn());c3.set(posOffIn());const center=posCenter();c1.start({...center,transition:cardTransition});await new Promise(r=>setTimeout(r,stagger));c2.start({...center,transition:cardTransition});await new Promise(r=>setTimeout(r,stagger));await c3.start({...center,transition:cardTransition});sessionStorage.setItem(SESSION_KEY,\"true\");isCovering.current=true;allowNextClick.current=true;navigating.current=false;anchor.click();// ── Fallback timer ───────────────────────────────────────\n// If the page doesn't navigate (e.g. same-page link in\n// Framer Preview), the enter animation never runs and cards\n// stay stuck. After a generous timeout we sweep them out\n// ourselves and reset all state so the user isn't locked out.\nconst dur=cardTransition.duration??.7;const fallbackMs=dur*1e3*1.5+stagger*2+600;setTimeout(async()=>{if(!isCovering.current)return;// enter already handled it\nisCovering.current=false;navigating.current=false;sessionStorage.removeItem(SESSION_KEY);const out=posOffOut();c3.start({...out,transition:cardTransition});await new Promise(r=>setTimeout(r,stagger));c2.start({...out,transition:cardTransition});await new Promise(r=>setTimeout(r,stagger));await c1.start({...out,transition:cardTransition});},fallbackMs);}runExit();};document.addEventListener(\"click\",handleClick,true);return()=>document.removeEventListener(\"click\",handleClick,true);},[direction,cardTransition,stagger]);// ─── CANVAS PREVIEW ───────────────────────────────────────────────────\nif(isCanvas)return /*#__PURE__*/_jsx(\"div\",{style:{width:0,height:0,overflow:\"hidden\"}});// ─── LIVE OVERLAY (via portal) ────────────────────────────────────────\nif(!portalReady||!portalEl.current)return null;const cardBase={position:\"absolute\",inset:0,width:\"100%\",height:\"100%\"};const initialPos=startCovered?posCenter():posOffIn();return /*#__PURE__*/createPortal(/*#__PURE__*/_jsxs(\"div\",{style:{position:\"fixed\",inset:0,zIndex:9999,pointerEvents:\"none\",overflow:\"hidden\"},children:[/*#__PURE__*/_jsx(motion.div,{animate:c1,initial:initialPos,style:{...cardBase,backgroundColor:card1Color}}),/*#__PURE__*/_jsx(motion.div,{animate:c2,initial:initialPos,style:{...cardBase,backgroundColor:card2Color}}),/*#__PURE__*/_jsx(motion.div,{animate:c3,initial:initialPos,style:{...cardBase,backgroundColor:card3Color}})]}),portalEl.current);}// ─── PROPERTY CONTROLS ───────────────────────────────────────────────────────\naddPropertyControls(StackedCardsTransition,{direction:{type:ControlType.Enum,title:\"Direction\",defaultValue:\"vertical\",options:[\"vertical\",\"horizontal\"],optionTitles:[\"↓ Vertical\",\"→ Horizontal\"],displaySegmentedControl:true,segmentedControlDirection:\"vertical\"},card1Color:{type:ControlType.Color,title:\"Card 1\",defaultValue:\"#0f0f0f\"},card2Color:{type:ControlType.Color,title:\"Card 2\",defaultValue:\"#e85d2f\"},card3Color:{type:ControlType.Color,title:\"Card 3\",defaultValue:\"#f0e0d0\"},cardTransition:{type:ControlType.Transition,title:\"Transition\",defaultValue:{type:\"tween\",duration:.7,ease:[.76,0,.24,1]}},stagger:{type:ControlType.Number,title:\"Stagger\",defaultValue:90,min:0,max:400,step:10,unit:\"ms\",displayStepper:true,description:\"Setup: Add this component to every page in your project. Keep all properties identical across pages for seamless transitions. Set Page Settings → Transitions to None (Instant). Note: transitions only fire on elements using the <a> tag — in Framer set this under Accessibility → Tag on your link layers.\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"StackedCardsTransition\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"auto\",\"framerSupportedLayoutHeight\":\"auto\",\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Stacked_Card_Transition.map","// Generated by Framer (34c068c)\nexport default function metadata(params,activeLocale){return{description:\"Algility builds AI-native systems for sales, growth, and customer acquisition across SMBs and enterprises.\\n\",favicon:\"https://framerusercontent.com/assets/9ksmEz1FhklsbBUfAE0aZha2s.png\",robots:\"max-image-preview:large\",socialImage:\"https://framerusercontent.com/assets/lZb2hiRftYkTNij5UtwGWACjTec.png\",title:\"Algility | AI-native systems for SMBs & SMEs\"};}export const metadataVersion=1;\nexport const __FramerMetadata__ = {\"exports\":{\"metadataVersion\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"default\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}"],"mappings":"+TAC8B,GAAU,UAAU,CAAC,qBAAqB,iBAA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