{"version":3,"file":"P1Motion.D_e7Erag.mjs","names":["forwardRef","useRef","__esmMin","init_ssg_sandbox_shims","init_npm_react_18_3_1","de","c","J","init_jsx_runtime","ce","window","RenderTarget","init_framer_DxfB3JJo","scrollLoop","frame","lastY","lastH","tick","y","h","fn","wrap","ref","isCanvas","target","effect","C","Component","props","fwd","withCounter","el","original","m","reduced","pre","num","post","value","decimals","commas","fmt","s","v","raf","t","io","es","t0","step","p","now","e","withDraw","fill","steps","dots","texts","setOn","d","i","EASE","on","state","paint","vh","start","end","clamp","at","stop","withCardHover","imgs","titles","off","init_P1Motion","a","b"],"sources":["https:/framerusercontent.com/modules/4xLFYLuPgW1sZJ3jjPuu/NC68GI097ju7sgdtTJHr/P1Motion.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{forwardRef,useEffect,useRef}from\"react\";import{RenderTarget}from\"framer\";/**\n * P1 motion overrides (MOTION.md S3, S11, S5 scrubbed, V2)\n *\n * withCounter    a figure counts up from 0 (1600 ms) once it is 60% visible; the served text stays the final value\n * withDraw       a step list: the layer named \"Fill\" grows down its rail with the scroll; each layer named \"Step\"\n *                lights up (its \"Dot\" fills, its text goes from 35% to full) when the line reaches it\n * withClipScrub  a photo band opens from an inset window to full frame as its top travels from 100% to 45% of the\n *                screen; the layer inside named \"Photo\" settles from 1.12 to 1\n * withCardHover  on hover, the image inside the layer named \"Media\" grows to 1.05 (600 ms) and the text inside the\n *                layer named \"Title\" draws an underline\n *\n * Scroll is sampled on an animation frame gated on scrollY, since Framer's published pages do not reliably emit\n * scroll events. Reduced motion renders every final state. Every change is undone on unmount.\n */const EASE=\"cubic-bezier(.33,0,.2,1)\";const reduced=()=>typeof window!==\"undefined\"&&window.matchMedia(\"(prefers-reduced-motion: reduce)\").matches;const clamp=(v,a,b)=>v<a?a:v>b?b:v;function scrollLoop(fn){let frame=0;let lastY=NaN;let lastH=NaN;const tick=()=>{const y=window.scrollY;const h=window.innerHeight;if(y!==lastY||h!==lastH){lastY=y;lastH=h;fn();}frame=requestAnimationFrame(tick);};frame=requestAnimationFrame(tick);window.addEventListener(\"scroll\",fn,{passive:true});window.addEventListener(\"resize\",fn);return()=>{cancelAnimationFrame(frame);window.removeEventListener(\"scroll\",fn);window.removeEventListener(\"resize\",fn);};}function wrap(Component,effect){// forwardRef keeps Framer's own ref (appear and in-view effects observe it) on the layer\nconst Wrapped=/*#__PURE__*/forwardRef((props,fwd)=>{const ref=useRef(null);const isCanvas=RenderTarget.current()===RenderTarget.canvas;useEffect(()=>{if(isCanvas||typeof window===\"undefined\")return;const target=ref.current&&ref.current.firstElementChild;if(!target)return;return effect(target)||undefined;},[isCanvas]);const C=Component;if(isCanvas)return /*#__PURE__*/_jsx(C,{...props,ref:fwd});return /*#__PURE__*/_jsx(\"div\",{ref:ref,style:{display:\"contents\"},children:/*#__PURE__*/_jsx(C,{...props,ref:fwd})});});return Wrapped;}export function withCounter(Component){return wrap(Component,target=>{// the deepest element holding the whole figure\nlet el=target;while(el.children.length===1&&el.children[0].textContent===el.textContent)el=el.children[0];const original=el.textContent||\"\";const m=original.match(/^([^\\d]*)([\\d][\\d,]*(?:\\.\\d+)?)(.*)$/);if(!m||reduced())return;const[,pre,num,post]=m;const value=parseFloat(num.replace(/,/g,\"\"));const decimals=(num.split(\".\")[1]||\"\").length;const commas=num.indexOf(\",\")>-1;const fmt=v=>{let s=v.toFixed(decimals);if(commas)s=s.replace(/\\B(?=(\\d{3})+(?!\\d))/g,\",\");return pre+s+post;};// only start from zero when the figure is still below the fold\nconst r=target.getBoundingClientRect();if(r.top<window.innerHeight)return;el.textContent=fmt(0);let raf=0;let t=0;const io=new IntersectionObserver(es=>{if(!es.some(e=>e.isIntersecting))return;io.disconnect();t=window.setTimeout(()=>{const t0=performance.now();const step=now=>{const p=Math.min(1,(now-t0)/1600);const e=1-Math.pow(1-p,3);el.textContent=p<1?fmt(value*e):original;if(p<1)raf=requestAnimationFrame(step);};raf=requestAnimationFrame(step);},450);},{threshold:.6});io.observe(target);return()=>{io.disconnect();clearTimeout(t);cancelAnimationFrame(raf);el.textContent=original;};});}export function withDraw(Component){return wrap(Component,target=>{const fill=target.querySelector('[data-framer-name=\"Fill\"]');const steps=Array.prototype.slice.call(target.querySelectorAll('[data-framer-name=\"Step\"]'));const dots=steps.map(s=>s.querySelector('[data-framer-name=\"Dot\"]'));const texts=steps.map(s=>Array.prototype.slice.call(s.children).filter(c=>c.getAttribute(\"data-framer-name\")!==\"Dot\"));const setOn=(i,on)=>{const d=dots[i];if(d){d.style.transition=`background-color .4s ${EASE}, box-shadow .4s ${EASE}`;d.style.backgroundColor=on?\"#000\":\"#fff\";d.style.boxShadow=on?\"inset 0 0 0 2px #000, 0 0 0 5px #fff\":\"inset 0 0 0 2px #CFCFCF\";}texts[i].forEach(t=>{t.style.transition=`opacity .4s ${EASE}`;t.style.opacity=on?\"1\":\"0.35\";});};if(reduced()){if(fill)fill.style.transform=\"scaleY(1)\";steps.forEach((_,i)=>setOn(i,true));return()=>{if(fill)fill.style.transform=\"\";};}if(fill)fill.style.transformOrigin=\"top\";const state=steps.map(()=>false);steps.forEach((_,i)=>setOn(i,false));const paint=()=>{const r=target.getBoundingClientRect();const vh=window.innerHeight;if(r.bottom<-vh||r.top>vh*2)return;const start=vh*.75;const end=vh*.45;const p=clamp((start-r.top)/(start-end+r.height),0,1);if(fill)fill.style.transform=`scaleY(${p.toFixed(4)})`;steps.forEach((s,i)=>{const sr=s.getBoundingClientRect();const at=(sr.top+14-r.top)/r.height;const on=p>=Math.max(.02,at);if(on!==state[i]){state[i]=on;setOn(i,on);}});};paint();const stop=scrollLoop(paint);return()=>{stop();if(fill)fill.style.transform=\"\";steps.forEach((_,i)=>{const d=dots[i];if(d){d.style.backgroundColor=\"\";d.style.boxShadow=\"\";}texts[i].forEach(t=>t.style.opacity=\"\");});};});}export function withClipScrub(Component){return wrap(Component,target=>{if(reduced())return;const photo=target.querySelector('[data-framer-name=\"Photo\"]');const paint=()=>{const r=target.getBoundingClientRect();const vh=window.innerHeight;if(r.bottom<0||r.top>vh)return;const p=clamp((vh-r.top)/(vh*.55),0,1);const e=1-Math.pow(1-p,2);const y=(1-e)*10;const x=(1-e)*12;const rad=28-28*e;target.style.clipPath=`inset(${y.toFixed(2)}% ${x.toFixed(2)}% ${y.toFixed(2)}% ${x.toFixed(2)}% round ${rad.toFixed(1)}px)`;if(photo)photo.style.transform=`scale(${(1.12-.12*e).toFixed(4)})`;};paint();const stop=scrollLoop(paint);return()=>{stop();target.style.clipPath=\"\";if(photo)photo.style.transform=\"\";};});}export function withCardHover(Component){return wrap(Component,target=>{if(!window.matchMedia(\"(hover: hover) and (pointer: fine)\").matches)return;const imgs=Array.prototype.slice.call(target.querySelectorAll('[data-framer-name=\"Media\"] img'));const titles=Array.prototype.slice.call(target.querySelectorAll('[data-framer-name=\"Title\"] .framer-text'));imgs.forEach(i=>i.style.transition=`transform .6s ${EASE}`);titles.forEach(t=>{t.style.backgroundImage=\"linear-gradient(currentColor, currentColor)\";t.style.backgroundRepeat=\"no-repeat\";t.style.backgroundPosition=\"0 100%\";t.style.backgroundSize=\"0% 1px\";t.style.transition=`background-size .35s ${EASE}`;t.style.display=\"inline\";});const on=()=>{if(reduced())return;imgs.forEach(i=>i.style.transform=\"scale(1.05)\");titles.forEach(t=>t.style.backgroundSize=\"100% 1px\");};const off=()=>{imgs.forEach(i=>i.style.transform=\"\");titles.forEach(t=>t.style.backgroundSize=\"0% 1px\");};target.addEventListener(\"pointerenter\",on);target.addEventListener(\"pointerleave\",off);return()=>{target.removeEventListener(\"pointerenter\",on);target.removeEventListener(\"pointerleave\",off);off();imgs.forEach(i=>i.style.transition=\"\");titles.forEach(t=>{t.style.backgroundImage=\"\";t.style.backgroundSize=\"\";t.style.display=\"\";});};});}\nexport const __FramerMetadata__ = {\"exports\":{\"withCounter\":{\"type\":\"reactHoc\",\"name\":\"withCounter\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withDraw\":{\"type\":\"reactHoc\",\"name\":\"withDraw\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withCardHover\":{\"type\":\"reactHoc\",\"name\":\"withCardHover\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withClipScrub\":{\"type\":\"reactHoc\",\"name\":\"withClipScrub\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./P1Motion.map"],"mappings":"A,gMAayL,SAASa,EAAW,EAAG,CAAC,IAAIC,EAAM,EAAMC,EAAM,IAAQC,EAAM,IAAUC,MAAS,CAAC,IAAMC,EAAER,EAAO,QAAcS,EAAET,EAAO,aAAeQ,IAAIH,GAAOI,IAAIH,KAAO,EAAME,EAAE,EAAMC,EAAEC,EAAG,GAAG,EAAM,sBAAsBH,CAAI,CAAE,EAA6H,MAA3H,GAAM,sBAAsBA,CAAI,EAAEP,EAAO,iBAAiB,SAASU,EAAG,CAAC,QAAQ,EAAI,CAAC,EAAEV,EAAO,iBAAiB,SAASU,CAAE,MAAY,CAAC,qBAAqBN,CAAK,EAAEJ,EAAO,oBAAoB,SAASU,CAAE,EAAEV,EAAO,oBAAoB,SAASU,CAAE,CAAE,CAAE,CAAC,SAASC,EAAK,EAAU,EAAO,CAC7J,MAA1erB,mBAAY,EAAM,IAAM,CAAC,IAAMsB,EAAIrB,EAAO,IAAI,EAAQsB,EAASZ,EAAa,QAAQ,IAAIA,EAAa,OAAOF,MAAc,CAAC,GAAGc,GAAiBb,IAAS,OAAY,OAAO,IAAMc,EAAOF,EAAI,SAASA,EAAI,QAAQ,kBAAkB,GAAIE,EAAc,OAAOC,EAAOD,CAAM,GAAG,IAAA,EAAU,EAAE,CAACD,CAAQ,CAAC,EAAE,IAAMG,EAAEC,EAAqE,OAAxDJ,EAA6B,gBAAKG,EAAE,CAAC,GAAGE,EAAM,IAAIC,CAAG,CAAC,EAAsB,gBAAK,MAAM,CAAK,MAAI,MAAM,CAAC,QAAQ,UAAU,EAAE,SAAsB,gBAAKH,EAA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