<commit_before>import ImageSource
import UIKit

final class MaskCropperView: UIView, ThemeConfigurable {
    
    typealias ThemeType = MaskCropperUITheme
    
    private let overlayView: MaskCropperOverlayView
    private let controlsView = MaskCropperControlsView()
    private let previewView = CroppingPreviewView()
    private let closeButton = UIButton()
    private let confirmButton = UIButton()
    
    // MARK: - Constants
    
    private let aspectRatio = CGFloat(AspectRatio.portrait_3x4.widthToHeightRatio())
    private let closeButtonSize = CGSize(width: 38, height: 38)
    private let continueButtonHeight = CGFloat(38)
    private let continueButtonContentInsets = UIEdgeInsets(top: 0, left: 16, bottom: 0, right: 16)
    
    // MARK: - Init
    
    init(croppingOverlayProvider: CroppingOverlayProvider) {
        
        overlayView = MaskCropperOverlayView(
            croppingOverlayProvider: croppingOverlayProvider
        )
        
        super.init(frame: .zero)
        
        backgroundColor = .white
        clipsToBounds = true
        
        previewView.setGridVisible(false)
        
        addSubview(previewView)
        addSubview(overlayView)
        addSubview(controlsView)
        addSubview(closeButton)
        addSubview(confirmButton)
        
        setupButtons()
        
        overlayView.isUserInteractionEnabled = false<commit_msg>Fix aspect ratio for MaskCropper<commit_after>import ImageSource
import UIKit

final class MaskCropperView: UIView, ThemeConfigurable {
    
    typealias ThemeType = MaskCropperUITheme
    
    private let overlayView: MaskCropperOverlayView
    private let controlsView = MaskCropperControlsView()
    private let previewView = CroppingPreviewView()
    private let closeButton = UIButton()
    private let confirmButton = UIButton()
    
    // MARK: - Constants
    
    private let aspectRatio = CGFloat(AspectRatio.defaultRatio.widthToHeightRatio())
    private let closeButtonSize = CGSize(width: 38, height: 38)
    private let continueButtonHeight = CGFloat(38)
    private let continueButtonContentInsets = UIEdgeInsets(top: 0, left: 16, bottom: 0, right: 16)
    
    // MARK: - Init
    
    init(croppingOverlayProvider: CroppingOverlayProvider) {
        
        overlayView = MaskCropperOverlayView(
            croppingOverlayProvider: croppingOverlayProvider
        )
        
        super.init(frame: .zero)
        
        backgroundColor = .white
        clipsToBounds = true
        
        previewView.setGridVisible(false)
        
        addSubview(previewView)
        addSubview(overlayView)
        addSubview(controlsView)
        addSubview(closeButton)
        addSubview(confirmButton)
        
        setupButtons()
        
        overlayView.isUserInteractionEnabled = false
{'fraction_non_alphanumeric': 0.061855670103092786, 'fraction_numerical': 0.009242801279772485, 'mean_word_length': 2.707509881422925, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, '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': '3869649', 'n_tokens_mistral': 790, 'n_tokens_neox': 758, 'n_words': 169}