{"version":3,"file":"SectionEdge.BE57MB7b.mjs","names":[],"sources":["https:/framerusercontent.com/modules/s2Iy4RKsRnsZODjXk1Ys/ZZ9VlaH72qIhhzTu4SsF/SectionEdge.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";/**\n * SectionEdge — a curved (blob) edge for the top or bottom of a section.\n *\n * Full width, scales with the screen, capped at \"Max height\". Two colours: the\n * curve (set this to match the section's own background) and the strip behind it\n * (match the neighbouring section).\n *\n * \"Fit\" decides what happens once the height is capped on a wide screen:\n * - Crop: keeps the wave's true shape and crops the flat fill (and, past a point,\n *   the wave itself — the taller a wave is, the sooner this starts biting).\n * - Stretch: compresses the wave vertically to fit the cap, so the whole wave is\n *   always visible, with a slightly shallower amplitude. Use this when you want a\n *   tall wave kept short on a wide screen without losing its troughs.\n *\n * Placement: drop it flush at the very top (Position: Top) or very bottom\n * (Position: Bottom) of a section stack, width = Fill, height = Fit. Set the\n * section's own background to the same value as \"Curve\".\n *\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight any\n */const W=1190.55;const EDGES={\"1\":{top:{h:96.44,d:\"M1156.93,30.59c-84.03-.38-144.65,20.84-183.45,32.61-130,36.83-244.89,30.35-294.83,25.14C490.09,68.68,201.92-38.19,0,14.41v82.03h1190.55v-63.58c-10.66-1.42-21.89-2.21-33.62-2.27Z\"},bottom:{h:40.44,d:\"M0,35.96S142.9,4.05,392.01,4.05s444.56,53.41,729.36,30.82c26.29-1.81,49.2-4.77,69.18-8.69V0H0v35.96Z\"}},\"2\":{top:{h:116.24,d:\"M605.89,0C295.21,0,0,53.45,0,53.45v62.8h1190.55v-3.62C1019.2,57.93,916.56,0,605.89,0Z\"},bottom:{h:101.95,d:\"M0,10.19c210.96,9.04,434.84,63.34,600.38,85.31,62.49,8.29,206.24,18.61,368.9-40.04,47.26-18.24,120.41-50.75,221.26-51.9V0H0v10.19Z\"}}};export default function SectionEdge(props){const{position,style,fit,curveColor,behindColor,maxHeight,flipHorizontal}=props;const set=EDGES[style]||EDGES[\"1\"];const edge=set[position]||set.top;// Crop: keep the wavy side, crop the flat side. Stretch: fill vertically (no crop).\nconst par=fit===\"stretch\"?\"none\":position===\"bottom\"?\"xMidYMax slice\":\"xMidYMin slice\";// Size the SVG itself (width 100%, height auto, capped by maxHeight). This avoids\n// the %-height-vs-aspect-ratio trap: a child's percentage height does NOT resolve\n// against a parent whose height came from `aspect-ratio`, so the old\n// `height: calc(100% + 2px)` was ignored, the SVG rendered at its intrinsic height,\n// and `overflow:hidden` cropped the troughs. height:auto + max-height is definite,\n// so Stretch (preserveAspectRatio=\"none\") fills the capped box with the whole wave.\nreturn /*#__PURE__*/_jsx(\"div\",{style:{width:\"100%\",marginTop:position===\"bottom\"?-1:undefined,marginBottom:position===\"bottom\"?undefined:-1,overflow:\"hidden\",// Paint only the 1px overlap row on the seam side in the curve colour, so\n// the wave's anti-aliased flat edge blends into the curve colour, never into\n// \"Behind\" (that caused a light hairline at the seam on phones). Keep it to\n// 1px: on a 390px screen some troughs come within ~1.2-2.7px of the seam, and\n// a wider band flattens them.\nbackground:\"linear-gradient(\"+(position===\"bottom\"?\"to bottom\":\"to top\")+\", \"+curveColor+\" 0, \"+curveColor+\" 1px, \"+behindColor+\" 1px)\",lineHeight:0,transform:flipHorizontal?\"scaleX(-1)\":undefined},children:/*#__PURE__*/_jsx(\"svg\",{viewBox:\"0 0 \"+W+\" \"+edge.h,preserveAspectRatio:par,style:{display:\"block\",width:\"100%\",height:\"auto\",maxHeight:maxHeight},children:/*#__PURE__*/_jsx(\"path\",{d:edge.d,fill:curveColor})})});}SectionEdge.defaultProps={position:\"top\",style:\"1\",fit:\"stretch\",curveColor:\"#D8380E\",behindColor:\"#EDE9DD\",maxHeight:120,flipHorizontal:false};addPropertyControls(SectionEdge,{position:{type:ControlType.Enum,title:\"Position\",options:[\"top\",\"bottom\"],optionTitles:[\"Top\",\"Bottom\"],displaySegmentedControl:true},style:{type:ControlType.Enum,title:\"Style\",options:[\"1\",\"2\"],optionTitles:[\"Style 1\",\"Style 2\"],displaySegmentedControl:true},fit:{type:ControlType.Enum,title:\"Fit\",options:[\"crop\",\"stretch\"],optionTitles:[\"Crop\",\"Stretch\"],displaySegmentedControl:true},curveColor:{type:ControlType.Color,title:\"Curve\"},behindColor:{type:ControlType.Color,title:\"Behind\"},maxHeight:{type:ControlType.Number,title:\"Max height\",min:20,max:600,step:1,unit:\"px\",displayStepper:true},flipHorizontal:{type:ControlType.Boolean,title:\"Flip X\",enabledTitle:\"On\",disabledTitle:\"Off\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"SectionEdge\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./SectionEdge.map"],"mappings":"4JAoB6mB,SAAwB,EAAY,EAAM,CAAC,GAAK,CAAC,WAAS,QAAM,MAAI,aAAW,cAAY,YAAU,kBAAgB,EAAY,EAAI,EAAM,IAAQ,EAAM,GAAW,EAAK,EAAI,IAAW,EAAI,IACnyB,EAAI,IAAM,UAAU,OAAO,IAAW,SAAS,iBAAiB,iBAMtE,OAAoB,EAAK,MAAM,CAAC,MAAM,CAAC,MAAM,OAAO,UAAU,IAAW,SAAS,GAAG,IAAA,GAAU,aAAa,IAAW,SAAS,IAAA,GAAU,GAAG,SAAS,SAKtJ,WAAW,oBAAoB,IAAW,SAAS,YAAY,UAAU,KAAK,EAAW,OAAO,EAAW,SAAS,EAAY,QAAQ,WAAW,EAAE,UAAU,EAAe,aAAa,IAAA,EAAS,EAAE,SAAsB,EAAK,MAAM,CAAC,QAAQ,eAAa,EAAK,EAAE,oBAAoB,EAAI,MAAM,CAAC,QAAQ,QAAQ,MAAM,OAAO,OAAO,OAAiB,WAAS,EAAE,SAAsB,EAAK,OAAO,CAAC,EAAE,EAAK,EAAE,KAAK,CAAU,CAAC,CAAC,CAAC,C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