






#import "MenTintSave.h"
#import "NSString+SubEntity.h"
#import "UIImageView+WebCache.h"
#import "StrongInfo.h"
#import "UIColor+RowColor.h"
#import "UIImage+WasImage.h"
#import "Masonry.h"

#import "CertPenSheConfig.h"
#import "DitherManager.h"
#import "OutletCupFoggyGroupingSeven.h"


@interface XXGCapsuleButton : UIButton
@end

@implementation XXGCapsuleButton
- (void)layoutSubviews {
    [super layoutSubviews];
    self.layer.cornerRadius = CGRectGetHeight(self.bounds) / 2.0;
}
@end

static MeterMixOutAnd *_mixerRetDogPub = nil;
static TopRetMole *_ironRouteMix = nil;

@implementation MenTintSave

+ (MeterMixOutAnd *)mixerRetDogPub {
    if (!_mixerRetDogPub) {
        _mixerRetDogPub = [OutletCupFoggyGroupingSeven extraDrawInferModifyTrainingSubject:[MeterMixOutAnd class]];
    }
    return _mixerRetDogPub;
}

+ (TopRetMole *)ironRouteMix {
    if (!_ironRouteMix) {
        _ironRouteMix = [OutletCupFoggyGroupingSeven serifCostAirIncomingPresenterFood:[TopRetMole class]];
    }
    return _ironRouteMix;
}

+ (NSString *)portraitsCommitHandledSettlingYouName {
    return [DitherManager truncatesLocalLeadMattingJump].primeMayName;
}

+ (NSString *)capsOwnershipWeekRatioViolationToken {
    return [DitherManager truncatesLocalLeadMattingJump].barriersToken;
}

+ (CGFloat)lazyNegativePrefixesCollapsesOperate {
    return CertPenSheConfig.shared.infinityRangingInputSunNumerator.paddleBoldfaceIdenticalDividerLive.portraits?:self.ironRouteMix.realmLostPort;
}

+ (NSString *)distanceLinearFaeroeseOnlineExpecting {
    return CertPenSheConfig.shared.infinityRangingInputSunNumerator.platformTop.onlineWarn;
}

+ (NSString *)guideSunHormoneSentencesCenteredRectangle {
    return CertPenSheConfig.shared.infinityRangingInputSunNumerator.paddleBoldfaceIdenticalDividerLive.fallbackSchoolImpliedLiterGlobal;
}

+ (CGFloat)provinceObservingVoiceOutPotential {
    return CertPenSheConfig.shared.infinityRangingInputSunNumerator.paddleBoldfaceIdenticalDividerLive.niacinRefusedLateHerMethod;
}
+ (BOOL)niacinRefusedLateHerMethod {
    return CertPenSheConfig.shared.infinityRangingInputSunNumerator.paddleBoldfaceIdenticalDividerLive.niacinRefusedLateHerMethod;
}

+ (NSString *)icelandicAdvisoryTaggerPrepareMid {
    return CertPenSheConfig.shared.infinityRangingInputSunNumerator.airFarItalic.magicBadRetMap;
}
+ (NSString *)editorsDismissedSpaceCarrierSuggest {
    return CertPenSheConfig.shared.infinityRangingInputSunNumerator.airFarItalic.redoneKeyMax;
}

+ (BOOL)uppercaseUnsafeProcedureTwistPush {
    return CertPenSheConfig.shared.infinityRangingInputSunNumerator.fatSonPubApplierRenderMagnesiumAirline;
}

+ (BOOL)lowAskHail {
    return CertPenSheConfig.shared.infinityRangingInputSunNumerator.airFarItalic.lowAskHail;
}

+ (BOOL)gaspHerMovieMightOpaqueRelevance {
    return [CertPenSheConfig shared].gaspHerMovieMightOpaqueRelevance;
}

+ (NSArray *)taggerBrandLoopsSucceedTheme {
    NSArray *capSexEventInteractBoyfriend = [DitherManager globallyBlueBuddyContainerUpscaleMonotonic];
    NSMutableArray *snow = [NSMutableArray arrayWithCapacity:capSexEventInteractBoyfriend.count];
    
    for (KernelFinnish *ear in capSexEventInteractBoyfriend) {
        NSString *image = self.ironRouteMix.tooCriticalTagalogCompareReversesKorean;
        switch (ear.softBurnType) {
            case ProblemThermalHandoffSelectDefined:
                image = self.ironRouteMix.limitedLogFooterPartlyPenUnable;
                break;
            case BleedArrayCatAccount:
            case CycleBitMediaRegister:
                image = self.ironRouteMix.tooCriticalTagalogCompareReversesKorean;
                break;
            case ChatterWeeklyPassivePinchPrime:
                image = self.ironRouteMix.cancelingStorylineHundredsOriginalEqualAppear;
                break;

case NotifyingMaxIntegrateVendorOnlineTriple:
                image = self.ironRouteMix.accountBuiltChestRussianWaxKey;
                break;
            case ManagedAdvisoryLeakyLinearSquash:
                image = self.ironRouteMix.applySugarAdjustRegionsTexture;
                break;
            default:
                image = self.ironRouteMix.limitedLogFooterPartlyPenUnable;
                break;
        }
        
        NSArray *box = @[ear.primeMayName ?: @"",image,ear.problemPintBigCombiningRegularTime];
        [snow addObject:box];
    }
    
    
    NSArray *beaconsIll = [snow sortedArrayUsingComparator:^NSComparisonResult(NSArray *a, NSArray *b) {
        double opt = [a[2] doubleValue];
        double spa = [b[2] doubleValue];
        if (opt > spa) {
            return NSOrderedAscending; 
        } else if (opt < spa) {
            return NSOrderedDescending;
        }
        return NSOrderedSame;
    }];
    
    return beaconsIll;
}

+ (CGSize)clustersDiskBreakingSpokenBigGrowSize {
    return CGSizeMake(self.ironRouteMix.issueMastersOptionalTornadoPreviewsWidth, self.ironRouteMix.endpointCompactRedirectMailFillerLighten);
}

+ (UIColor *)redirectsColor{
    return [UIColor hailHandStylusKelvinPitchReminder:CertPenSheConfig.shared.infinityRangingInputSunNumerator.publicSpecifyQuoteNowFourExemplar.redirectsColor?:self.ironRouteMix.redirectsColor];
}

+ (UIColor *)sedentaryColor{
    return [UIColor hailHandStylusKelvinPitchReminder:CertPenSheConfig.shared.infinityRangingInputSunNumerator.publicSpecifyQuoteNowFourExemplar.sedentaryColor?:self.ironRouteMix.sedentaryColor];
}

+ (UIColor *)passCitySheColor {
    NSString *hex = CertPenSheConfig.shared.infinityRangingInputSunNumerator.publicSpecifyQuoteNowFourExemplar.passCitySheColor;
    return hex.orderProgressPasteRunningFire ? [UIColor hailHandStylusKelvinPitchReminder:hex] : UIColor.whiteColor;
}

+ (UIColor *)decayTeaspoonsCriteriaMercuryStrategyColor{
    return [UIColor hailHandStylusKelvinPitchReminder:CertPenSheConfig.shared.infinityRangingInputSunNumerator.publicSpecifyQuoteNowFourExemplar.decayTeaspoonsCriteriaMercuryStrategyColor?:self.ironRouteMix.decayTeaspoonsCriteriaMercuryStrategyColor];
}

+ (NSString *)moodFlagRevertPanelAgreementImage{
    NSString *image = CertPenSheConfig.shared.infinityRangingInputSunNumerator.publicSpecifyQuoteNowFourExemplar.moodFlagRevertPanelAgreementImage;
    return image.orderProgressPasteRunningFire ? image : nil;
}

+ (NSString *)parentHormoneUpdateMenuFireImage{
    NSString *image = CertPenSheConfig.shared.infinityRangingInputSunNumerator.publicSpecifyQuoteNowFourExemplar.parentHormoneUpdateMenuFireImage;
    return image.orderProgressPasteRunningFire ? image : nil;
}

+ (void)ourVerifyShutterMiddleCapAction {
    if (CertPenSheConfig.shared.shareStringStatus != CanceledDrainBasalHexUnifiedOne) {
        CertPenSheConfig.shared.shareStringStatus = MixerPerformedBounceCarriageModuleEqually;
    }
}

+ (UIView *)bandLeaseView {
    if (CertPenSheConfig.shared.infinityRangingInputSunNumerator.nearBrandExecSawDryIts.orderProgressPasteRunningFire) {
        UIImageView *view = [[UIImageView alloc] init];
        [view sd_setImageWithURL:[NSURL URLWithString:CertPenSheConfig.shared.infinityRangingInputSunNumerator.nearBrandExecSawDryIts]];
        view.contentMode = UIViewContentModeScaleAspectFit;
        return view;
    }else {
        UILabel *label = [[UILabel alloc] init];
        label.text = [StrongInfo tapThemeName];
        label.textColor = [self sedentaryColor];
        label.font = [UIFont systemFontOfSize:30];
        label.textAlignment = NSTextAlignmentCenter;
        return label;
    }
}

+ (UILabel *)headSerialDismissedPlugExpected:(NSString *)title {
    UILabel *label = [UILabel new];
    label.text = title;
    label.textColor = [self sedentaryColor];
    label.font = [UIFont systemFontOfSize:13];
    return label;
}

+ (UIButton *)patchExternPreparingStretchLook:(NSString *)title {
    UIButton *button = [[UIButton alloc] init];
    [button setTitle:title forState:UIControlStateNormal];
    [button setTitleColor:[self sedentaryColor] forState:UIControlStateNormal];
    [button setTitleColor:UIColor.lightGrayColor forState:UIControlStateHighlighted];
    button.titleLabel.font = [UIFont systemFontOfSize:13];
    return button;
}

+ (UIButton *)exhaustedRangePinDetectsOwnershipColor:(NSString *)title {

    XXGCapsuleButton *button = [XXGCapsuleButton buttonWithType:UIButtonTypeCustom];
    [button setTitle:title forState:UIControlStateNormal];
    [button setTitleColor:[self passCitySheColor] forState:UIControlStateNormal];
    button.titleLabel.font = [UIFont systemFontOfSize:16];
    
    button.layer.masksToBounds = YES;

    NSString *evictionDigit = [self parentHormoneUpdateMenuFireImage];
    if (evictionDigit) {
        
        [[SDWebImageManager sharedManager] loadImageWithURL:[NSURL URLWithString:evictionDigit]
                                                    options:0
                                                   progress:nil
                                                  completed:^(UIImage *image, NSData *data, NSError *error, SDImageCacheType cacheType, BOOL finished, NSURL *imageURL) {
            if (image) {
                dispatch_async(dispatch_get_main_queue(), ^{
                    [button setBackgroundImage:image forState:UIControlStateNormal];
                    [button setBackgroundImage:[UIImage subsetSelectorColor:[[UIColor lightGrayColor] colorWithAlphaComponent:0.5f]] forState:UIControlStateHighlighted];
                });
            }
        }];
        
        [button setBackgroundImage:[UIImage subsetSelectorColor:[self sedentaryColor]] forState:UIControlStateNormal];
    } else {
        
        [button setBackgroundImage:[UIImage subsetSelectorColor:[self sedentaryColor]] forState:UIControlStateNormal];
        [button setBackgroundImage:[UIImage subsetSelectorColor:[[UIColor lightGrayColor] colorWithAlphaComponent:0.5f]] forState:UIControlStateHighlighted];
    }

    return button;
}

+ (NSArray *)itsChamberTriggerCoastNorwegianCleared:(id)target action:(SEL)action {
    
    NSMutableArray *array = [[NSMutableArray alloc] init];
    
    for (FoldHitModel *ear in CertPenSheConfig.shared.infinityRangingInputSunNumerator.minimizeFitReceiveBitmapAssignStation) {
        UIView *button = [self intrinsicSpeedBlindingBeginningPrimeAdjusting:ear.subPubCubeText
                                           priceWireColor:[UIColor hailHandStylusKelvinPitchReminder:ear.noteWateryColor]
                                                mildGreek:[self carFullLegalCurrencyWas:ear]
                                           penOnceSuchNap:ear.hurricane
                                                   target:target
                                                   action:action];
        [array addObject:button];
    }
    
    return array;
}

+ (NSString *)carFullLegalCurrencyWas:(FoldHitModel *)ear {
    
    static NSDictionary<NSString *, NSString *> *map;
    static dispatch_once_t hangToken;
    dispatch_once(&hangToken, ^{
        map = @{
            
            self.ironRouteMix.darkenSign    : self.ironRouteMix.limitedLogFooterPartlyPenUnable,
            self.ironRouteMix.givenHourly   : self.ironRouteMix.cancelingStorylineHundredsOriginalEqualAppear,
            self.ironRouteMix.dustToolCanon : self.ironRouteMix.tooCriticalTagalogCompareReversesKorean,

self.ironRouteMix.ourGoal       : self.ironRouteMix.applySugarAdjustRegionsTexture,
            self.ironRouteMix.smartFourteen : self.ironRouteMix.accountBuiltChestRussianWaxKey,
            self.ironRouteMix.illPullFit : self.ironRouteMix.limitedLogFooterPartlyPenUnable
        };
    });
    if (ear.onlineWarn.seekReplaced) {
        
        ear.onlineWarn = map[ear.hurricane];
    }
    return ear.onlineWarn;
}

+ (UIView *)intrinsicSpeedBlindingBeginningPrimeAdjusting:(NSString *)title
                      priceWireColor:(UIColor *)titleColor
                           mildGreek:(NSString *)image
                      penOnceSuchNap:(NSString *)idf
                              target:(id)target
                              action:(SEL)action {
    
    UIView *view = [[UIView alloc] init];
    view.backgroundColor = UIColor.clearColor;
    
    UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
    button.layer.masksToBounds = YES;
    button.accessibilityIdentifier = idf;
    
    if ([self issuerAccountsFixOriginsInferiors:image]) {
        [[SDWebImageManager sharedManager] loadImageWithURL:[NSURL URLWithString:image] options:0 progress:nil completed:^(UIImage * _Nullable image2, NSData * _Nullable data, NSError * _Nullable error, SDImageCacheType cacheType, BOOL finished, NSURL * _Nullable imageURL) {
            dispatch_async(dispatch_get_main_queue(), ^{
                [button setImage:image2 forState:UIControlStateNormal];
            });
        }];

    }else {
        UIImage *sonImage = [[UIImage cautionPreservesLevelEnglishFlowName:image] imageWithRenderingMode:(UIImageRenderingModeAlwaysTemplate)];
        button.tintColor = [self sedentaryColor];
        [button setImage:sonImage forState:UIControlStateNormal];
    }
    
    button.contentEdgeInsets = UIEdgeInsetsMake(0, 0, 0, 0);
    [[button imageView] setContentMode:UIViewContentModeScaleAspectFill];
    button.contentHorizontalAlignment= UIControlContentHorizontalAlignmentFill;
    button.contentVerticalAlignment = UIControlContentVerticalAlignmentFill;
    [button addTarget:target action:action forControlEvents:(UIControlEventTouchUpInside)];
    [view addSubview:button];
    
    UILabel *label = [MenTintSave headSerialDismissedPlugExpected:title];
    label.textColor = titleColor;
    label.textAlignment = NSTextAlignmentCenter;
    label.font = [UIFont systemFontOfSize:12];
    label.numberOfLines = 0;
    [view addSubview:label];
    
    [button mas_makeConstraints:^(MASConstraintMaker *make) {
        make.center.equalTo(view);
        make.size.equalTo(view);
    }];
    
    [label mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(view.mas_bottom).offset(8);
        make.left.right.equalTo(view);
    }];
    
    return view;
}

+ (BOOL)issuerAccountsFixOriginsInferiors:(NSString *)url
{
    NSString *axial =@"[a-zA-z]+://[^\\s]*";
    NSPredicate *predicate = [NSPredicate predicateWithFormat:@"SELF MATCHES %@",axial];
    return [predicate evaluateWithObject:url];
}

+ (UITextField *)localTranslateFrictionWideCameraCollisionCode {
    UITextField *textField = [self toolWithOldField:self.mixerRetDogPub.lockMayNegateLogTiedEntityCode isSecure:NO];
    textField.textContentType = UITextContentTypeOneTimeCode;
    return textField;
}

+ (UITextField *)ornamentDownhillDescenderKirghizPurchasedBut {
    UITextField *textField = [self toolWithOldField:self.mixerRetDogPub.tornadoPieceContactsEnsureProducer isSecure:NO];
    textField.keyboardType = UIKeyboardTypeNumberPad;
    return textField;
}

+ (UITextField *)armMathOverlayVectorItalicAccount {
    return [self toolWithOldField:self.mixerRetDogPub.hostDryOffIts isSecure:NO];
}

+ (UITextField *)parentSuspendedForwardsPenAltimeterPassword:(BOOL)isNew {
    UITextField *textField = [self toolWithOldField:isNew?self.mixerRetDogPub.persistBatchInvokeCloudCredit:self.mixerRetDogPub.metalBriefDueKey isSecure:YES];
    [self localResourcesAccordingBeginWrongPrefixesShoulder:textField notSize:CGSizeMake(MenTintSave.ironRouteMix.nowCubeIntro, MenTintSave.ironRouteMix.nowCubeIntro)];
    UIButton * rightButton = [UIButton buttonWithType:UIButtonTypeCustom];
    UIImage *factImage = [UIImage cautionPreservesLevelEnglishFlowName:self.ironRouteMix.futureFifteenEffectNotApplier];
    UIImage *sobSexImage = [UIImage cautionPreservesLevelEnglishFlowName:self.ironRouteMix.sayYoungestContactHandlerPeak];
    rightButton.frame = CGRectMake(0, 0, MenTintSave.ironRouteMix.nowCubeIntro, MenTintSave.ironRouteMix.nowCubeIntro);
    [rightButton setImage:factImage forState:UIControlStateNormal];
    [rightButton setImage:sobSexImage forState:UIControlStateSelected];
    CGFloat wonEscapeToo = (MenTintSave.ironRouteMix.nowCubeIntro - 24)/2;
    [rightButton setImageEdgeInsets:UIEdgeInsetsMake(wonEscapeToo, wonEscapeToo, wonEscapeToo, wonEscapeToo)];
    rightButton.contentMode = UIViewContentModeScaleAspectFit;
    [textField.rightView addSubview:rightButton];
    return textField;
}

+ (UITextField *)toolWithOldField:(NSString *)placeholder isSecure:(BOOL)isSecure {
    UITextField *textField = [UITextField new];
    textField.secureTextEntry = isSecure;
    textField.clearButtonMode = UITextFieldViewModeWhileEditing;
    textField.autocorrectionType = UITextAutocorrectionTypeNo;
    textField.autocapitalizationType = UITextAutocapitalizationTypeNone;
    textField.font = [UIFont systemFontOfSize:15];
    textField.layer.borderColor = [self sedentaryColor].CGColor;
    textField.layer.borderWidth = 0.6;
    textField.layer.cornerRadius = self.ironRouteMix.redMillibars;
    
    textField.backgroundColor = [self moodFlagRevertPanelAgreementImage] ? UIColor.clearColor : UIColor.whiteColor;
    textField.textColor = UIColor.darkGrayColor;
    textField.attributedPlaceholder = [[NSAttributedString alloc] initWithString:placeholder attributes:@{NSForegroundColorAttributeName: [UIColor lightGrayColor]}];
    [self wireTomorrowChatterMirroredSixTrackCorners:textField notSize:CGSizeMake(10, MenTintSave.ironRouteMix.nowCubeIntro)];
    textField.rightViewMode = UITextFieldViewModeAlways;
    return textField;
}

+ (void)wireTomorrowChatterMirroredSixTrackCorners:(UITextField *)textField notSize:(CGSize)size
{
    CGRect frame = {{0,0},size};
    UIView *editPull = [[UIView alloc] initWithFrame:frame];
    textField.leftViewMode = UITextFieldViewModeAlways;
    textField.leftView = editPull;
}

+ (void)localResourcesAccordingBeginWrongPrefixesShoulder:(UITextField *)textField notSize:(CGSize)size
{
    CGRect frame = {{0,0},size};
    UIView *scopeWord = [[UIView alloc] initWithFrame:frame];
    textField.rightViewMode = UITextFieldViewModeAlways;
    textField.rightView = scopeWord;
}
@end
