{"version":3,"file":"BottomFade.BAPMoGXz.mjs","names":["c"],"sources":["https:/framerusercontent.com/modules/a14sgJagoVcjgk0Rm6V7/QALTITrPyKDss57ZGOQm/BottomFade.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";/**\n * Edge Fade — a transparent-in-the-middle vertical vignette (dark at the top and\n * dark at the bottom), to keep hero text readable behind a title (top) and a\n * stats row (bottom) while the video still shows through the clear middle band.\n *\n * `color` is the colour the edges fade TO. Default black, which is what every\n * instance predating this prop was hardcoded to. Set it to the NEXT SECTION's\n * background and push `strength` to 1 to dissolve a video hero into the section\n * below it — at full strength the hero's last pixel row is exactly the section\n * colour, so there is no seam to see. Fading to black instead leaves a subtle\n * mismatch against an off-black section (e.g. rgb(13,14,18)).\n *\n * `leftStrength` adds a LEFT-edge ramp, which a multi-shot video hero needs.\n * With one shot you can compose the dark side of the frame under the headline\n * and skip this. As soon as the video cuts between angles you no longer control\n * what sits behind the copy — on /connectors the third shot tilts into a lit\n * dome and put a lamp exactly where the cream h1 sits, measuring 164 where\n * cream text wants its backdrop under ~90. The ramp holds flat to `leftHold`\n * so protection is even across the text column, then falls to zero by\n * `leftEnd` rather than ramping from the very edge (a plain 0%→x% gradient is\n * strongest where there is no text and weakest where the line ends).\n *\n * Both the clear and the opaque stops use the same colour on purpose: fading a\n * colour to `transparent` interpolates through rgba(0,0,0,0) and greys out the\n * midpoint. Same-hue stops keep the ramp clean.\n *\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight any\n * @framerIntrinsicWidth 800\n * @framerIntrinsicHeight 480\n * @framerDisableUnlink\n */// Accepts #abc, #aabbcc, rgb()/rgba() and space-separated modern syntax.\n// Falls back to black, which is the pre-prop behaviour.\nfunction toRgb(input){const s=(input||\"\").trim();const hex=s.match(/^#([0-9a-f]{3}|[0-9a-f]{6})$/i);if(hex){let h=hex[1];if(h.length===3)h=h.split(\"\").map(x=>x+x).join(\"\");return`${parseInt(h.slice(0,2),16)},${parseInt(h.slice(2,4),16)},${parseInt(h.slice(4,6),16)}`;}const m=s.match(/rgba?\\(\\s*([\\d.]+)[\\s,]+([\\d.]+)[\\s,]+([\\d.]+)/i);if(m)return`${Math.round(+m[1])},${Math.round(+m[2])},${Math.round(+m[3])}`;return\"0,0,0\";}export default function BottomFade(props){const{strength=.6,start=58,topStrength=.5,topEnd=42,leftStrength=0,leftHold=34,leftEnd=66,color=\"rgb(0,0,0)\"}=props;const s=Math.max(0,Math.min(1,strength));const ts=Math.max(0,Math.min(1,topStrength));const ls=Math.max(0,Math.min(1,leftStrength));const c=toRgb(color);const vertical=`linear-gradient(180deg, rgba(${c},${ts}) 0%, rgba(${c},0) ${topEnd}%, rgba(${c},0) ${start}%, rgba(${c},${s}) 100%)`;// hold flat across the text column, then fall away\nconst hold=Math.min(leftHold,leftEnd);const horizontal=`linear-gradient(90deg, rgba(${c},${ls}) 0%, rgba(${c},${ls}) ${hold}%, rgba(${c},0) ${leftEnd}%)`;const bg=ls>0?`${horizontal}, ${vertical}`:vertical;return /*#__PURE__*/_jsx(\"div\",{style:{width:\"100%\",height:\"100%\",background:bg,pointerEvents:\"none\",...props.style}});}addPropertyControls(BottomFade,{strength:{type:ControlType.Number,title:\"Bottom darkness\",defaultValue:.6,min:0,max:1,step:.05},start:{type:ControlType.Number,title:\"Bottom start %\",defaultValue:58,min:0,max:100,step:1},topStrength:{type:ControlType.Number,title:\"Top darkness\",defaultValue:.5,min:0,max:1,step:.05},topEnd:{type:ControlType.Number,title:\"Top end %\",defaultValue:42,min:0,max:100,step:1},leftStrength:{type:ControlType.Number,title:\"Left darkness\",description:\"0 = off. Protects headline copy when a multi-shot video cuts to a bright angle.\",defaultValue:0,min:0,max:1,step:.05},leftHold:{type:ControlType.Number,title:\"Left hold %\",description:\"Ramp stays at full strength up to here, so protection is even across the text column.\",defaultValue:34,min:0,max:100,step:1},leftEnd:{type:ControlType.Number,title:\"Left end %\",defaultValue:66,min:0,max:100,step:1},color:{type:ControlType.Color,title:\"Fade to\",description:\"Colour the edges fade to. Set this to the next section's background to dissolve a video hero into it.\",defaultValue:\"rgb(0,0,0)\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"BottomFade\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./BottomFade.map"],"mappings":"4JAiCA,SAAS,EAAM,EAAM,CAAC,IAAM,GAAG,GAAO,GAAA,CAAI,KAAK,EAAQ,EAAI,EAAE,MAAM,+BAA+B,EAAE,GAAG,EAAI,CAAC,IAAI,EAAE,EAAI,GAAsD,OAAhD,EAAE,SAAS,IAAE,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC,IAAI,GAAG,EAAE,CAAC,CAAC,CAAC,KAAK,EAAE,GAAQ,GAAG,SAAS,EAAE,MAAM,EAAE,CAAC,EAAE,EAAE,EAAE,GAAG,SAAS,EAAE,MAAM,EAAE,CAAC,EAAE,EAAE,EAAE,GAAG,SAAS,EAAE,MAAM,EAAE,CAAC,EAAE,EAAE,GAAI,CAAC,IAAM,EAAE,EAAE,MAAM,iDAAiD,EAA8E,OAAzE,EAAQ,GAAG,KAAK,MAAM,CAAC,EAAE,EAAE,EAAE,GAAG,KAAK,MAAM,CAAC,EAAE,EAAE,EAAE,GAAG,KAAK,MAAM,CAAC,EAAE,EAAE,IAAU,OAAQ,CAAC,SAAwB,EAAW,EAAM,CAAC,GAAK,CAAC,WAAS,GAAG,QAAM,GAAG,cAAY,GAAG,SAAO,GAAG,eAAa,EAAE,WAAS,GAAG,UAAQ,GAAG,QAAM,cAAc,EAAY,EAAE,KAAK,IAAI,EAAE,KAAK,IAAI,EAAE,CAAQ,CAAC,EAAQ,EAAG,KAAK,IAAI,EAAE,KAAK,IAAI,EAAE,CAAW,CAAC,EAAQ,EAAG,KAAK,IAAI,EAAE,KAAK,IAAI,EAAE,CAAY,CAAC,E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