<commit_before>//-------------------------------------------------------------------------------------
// Angled Edges v1.0 (https://github.com/josephfusco/angled-edges)
// Copyright 2016 <NAME>
// Licensed under MIT (https://github.com/josephfusco/angled-edges/blob/master/LICENSE)
//-------------------------------------------------------------------------------------

/// Replace `$search` with `$replace` in `$string`
///
/// @author <NAME>
/// @link   http://www.sassmeister.com/gist/1b4f2da5527830088e4d
///
/// @param  {String}  $string - Initial string
/// @param  {String}  $search - Substring to replace
/// @param  {String}  $replace ('') - New value
/// @return {String}  Updated string
///
@function ae-str-replace($string, $search, $replace: '') {
	$index: str-index($string, $search);

	@if $index {
		@return str-slice($string, 1, $index - 1) + $replace + ae-str-replace(str-slice($string, $index + str-length($search)), $search, $replace);
	}

	@return $string;
}

/// Encode SVG to use as background
///
/// @param  {String}  $string
/// @return {String}  Encoded svg data
///
@function ae-svg-encode($string){
	$result: ae-str-replace($string, "<svg", "<svg xmlns='http://www.w3.org/2000/svg'");
	$result: ae-str-replace($result,'%', '%25');
	$result: ae-str-replace($result,'"', '%22');
	$result: ae-str-replace($result,"'", '%27');
	$result: ae-str-replace($result,' ', '%20');
	$result: ae-str-replace($result,'<', '%3C');
	$result: ae-str-replace($result,'>', '%3E');
	@return "data:image/svg+xml," + $result;
}

/// Outputs pseudo content for main mixin
///
/// @author <NAME>
///
/// @param  {String}  $location
/// @param  {Number}  $height
/// @output psuedo content
///
@mixin ae-pseudo($wedge, $height) {
	background-image: url($wedge);
	background-position: center center;
	background-repeat: no-repeat;
	content: '';
	height: $height + px;
	left: 0;
	position: absolute;
	right: 0;
	width: 100%;
	z-index: 1;
}

/// Attatches an svg wedge shape to an element
///
/// @author <NAME>
///
/// @param  {String}  $location   - 'inside top', 'outside top', 'inside bottom', 'outside bottom'
/// @param  {String}  $hypotenuse - 'upper left', 'upper right', 'lower left', 'lower right'
/// @param  {Color}   $fill
/// @param  {Number}  $width
/// @param  {Number}  $height
/// @output '::before' and/or "::after" with svg background image
///
@mixin angled-edge($location, $hypotenuse, $fill, $width: 1500, $height: 100) {

	// polygon points for right triangle
	$points: (
		'upper left': '0,#{$height} #{$width},#{$height} #{$width},0',
		'upper right': '0,#{$height} #{$width},#{$height} 0,0',
		'lower left': '0,0 #{$width},#{$height} #{$width},0',
		'lower right': '0,0 #{$width},0 0,#{$height}'
	);

	// ensure $fill color is using rgb()
	$fill_rgb: 'rgb(#{red($fill)},#{green($fill)},#{blue($fill)})';
	
	// capture alpha component of $fill to use with fill-opacity
	$fill_alpha: alpha($fill);
	
	$wedge: ae-svg-encode('<svg height="#{$height}" width="#{$width}" fill="#{$fill_rgb}" fill-opacity="#{$fill_alpha}"><polygon points="#{map-get($points,$hypotenuse)}"></polygon></svg>');
	
	position: relative;

	@if $location == 'inside top' {
		&::before {
			@include ae-pseudo($wedge, $height);
			top: 0;
		}
	} @else if $location == 'outside top' {<commit_msg>Fix issue passing color functions in libsass<commit_after>//-------------------------------------------------------------------------------------
// Angled Edges v1.0.1 (https://github.com/josephfusco/angled-edges)
// Copyright 2016 <NAME>
// Licensed under MIT (https://github.com/josephfusco/angled-edges/blob/master/LICENSE)
//-------------------------------------------------------------------------------------

/// Replace `$search` with `$replace` in `$string`
///
/// @author <NAME>
/// @link   http://www.sassmeister.com/gist/1b4f2da5527830088e4d
///
/// @param  {String}  $string - Initial string
/// @param  {String}  $search - Substring to replace
/// @param  {String}  $replace ('') - New value
/// @return {String}  Updated string
///
@function ae-str-replace($string, $search, $replace: '') {
	$index: str-index($string, $search);

	@if $index {
		@return str-slice($string, 1, $index - 1) + $replace + ae-str-replace(str-slice($string, $index + str-length($search)), $search, $replace);
	}

	@return $string;
}

/// Encode SVG to use as background
///
/// @param  {String}  $string
/// @return {String}  Encoded svg data
///
@function ae-svg-encode($string){
	$result: ae-str-replace($string, "<svg", "<svg xmlns='http://www.w3.org/2000/svg'");
	$result: ae-str-replace($result,'%', '%25');
	$result: ae-str-replace($result,'"', '%22');
	$result: ae-str-replace($result,"'", '%27');
	$result: ae-str-replace($result,' ', '%20');
	$result: ae-str-replace($result,'<', '%3C');
	$result: ae-str-replace($result,'>', '%3E');
	@return "data:image/svg+xml," + $result;
}

/// Outputs pseudo content for main mixin
///
/// @author <NAME>
///
/// @param  {String}  $location
/// @param  {Number}  $height
/// @output psuedo content
///
@mixin ae-pseudo($wedge, $height) {
	background-image: url($wedge);
	background-position: center center;
	background-repeat: no-repeat;
	content: '';
	height: $height + px;
	left: 0;
	position: absolute;
	right: 0;
	width: 100%;
	z-index: 1;
}

/// Attatches an svg wedge shape to an element
///
/// @author <NAME>
///
/// @param  {String}  $location   - 'inside top', 'outside top', 'inside bottom', 'outside bottom'
/// @param  {String}  $hypotenuse - 'upper left', 'upper right', 'lower left', 'lower right'
/// @param  {Color}   $fill
/// @param  {Number}  $width
/// @param  {Number}  $height
/// @output '::before' and/or "::after" with svg background image
///
@mixin angled-edge($location, $hypotenuse, $fill, $width: 2800, $height: 100) {

	// polygon points for right triangle
	$points: (
		'upper left': '0,#{$height} #{$width},#{$height} #{$width},0',
		'upper right': '0,#{$height} #{$width},#{$height} 0,0',
		'lower left': '0,0 #{$width},#{$height} #{$width},0',
		'lower right': '0,0 #{$width},0 0,#{$height}'
	);

	// ensure $fill color is using rgb()
	$fill_rgb: 'rgb(#{ceil(red($fill))},#{ceil(green($fill))},#{ceil(blue($fill))})';

	// capture alpha component of $fill to use with fill-opacity
	$fill_alpha: alpha($fill);

	$wedge: ae-svg-encode('<svg height="#{$height}" width="#{$width}" fill="#{$fill_rgb}" fill-opacity="#{$fill_alpha}"><polygon points="#{map-get($points,$hypotenuse)}"></polygon></svg>');

	position: relative;

	@if $location == 'inside top' {
		&::before {
			@include ae-pseudo($wedge, $height);
			top: 0;
		}
	} @else if $location == 'outside top' {
{'fraction_non_alphanumeric': 0.27578407720144754, 'fraction_numerical': 0.019149577804583835, 'mean_word_length': 3.1071207430340557, 'pattern_counts': {'":': 2, '<': 25, '<?xml version=': 0, '>': 21, 'https://': 4, 'lorem ipsum': 0, 'www.': 4, 'xml': 4}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6914821', 'n_tokens_mistral': 2432, 'n_tokens_neox': 2288, 'n_words': 552}