






#import "CupDenyLeap.h"
#import "NSString+PublicDry.h"
#import "UIImageView+WebCache.h"
#import "FarIcyInfo.h"
#import "UIColor+TapColor.h"
#import "UIImage+WayImage.h"
#import "Masonry.h"

#import "MarkDivideConfig.h"
#import "CircleManager.h"
#import "AdjustsCostMaleMalayalamAnnotated.h"


@interface XXGCapsuleButton : UIButton
@end

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

static StripLuminance *_cutReuseIcyOur = nil;
static EggIconPan *_rarePutOther = nil;

@implementation CupDenyLeap

+ (StripLuminance *)cutReuseIcyOur {
    if (!_cutReuseIcyOur) {
        _cutReuseIcyOur = [AdjustsCostMaleMalayalamAnnotated littleFailingThreeDebuggerWalkingView:[StripLuminance class]];
    }
    return _cutReuseIcyOur;
}

+ (EggIconPan *)rarePutOther {
    if (!_rarePutOther) {
        _rarePutOther = [AdjustsCostMaleMalayalamAnnotated settlingThreadsKirghizSuggestPictureBut:[EggIconPan class]];
    }
    return _rarePutOther;
}

+ (NSString *)pascalCubeButRollBecomeName {
    return [CircleManager visitTooAdverbArchiveExist].optionalName;
}

+ (NSString *)thermalEpsilonSeekPotassiumHerToken {
    return [CircleManager visitTooAdverbArchiveExist].tipAdobeToken;
}

+ (CGFloat)functionAssistiveHexMenMaterial {
    return MarkDivideConfig.shared.playLettishSymbolsHeapSpoken.entryEngineGenericClosestBend.boundForm?:self.rarePutOther.tallTagOwnSun;
}

+ (NSString *)dustPublisherDidLossyModified {
    return MarkDivideConfig.shared.playLettishSymbolsHeapSpoken.acceptHours.pageEggOut;
}

+ (NSString *)contentsSpatialModalMidAvailableReachable {
    return MarkDivideConfig.shared.playLettishSymbolsHeapSpoken.entryEngineGenericClosestBend.armPubSendCaretRaw;
}

+ (CGFloat)oddBlockCircularTelephonyUnlock {
    return MarkDivideConfig.shared.playLettishSymbolsHeapSpoken.entryEngineGenericClosestBend.optLittleFalloffFormToo;
}
+ (BOOL)optLittleFalloffFormToo {
    return MarkDivideConfig.shared.playLettishSymbolsHeapSpoken.entryEngineGenericClosestBend.optLittleFalloffFormToo;
}

+ (NSString *)sindhiSonSenseDustSexual {
    return MarkDivideConfig.shared.playLettishSymbolsHeapSpoken.greekBeatWet.findOldTabRoll;
}
+ (NSString *)topPromiseReturnedUnpluggedLappish {
    return MarkDivideConfig.shared.playLettishSymbolsHeapSpoken.greekBeatWet.allChargeGet;
}

+ (BOOL)archivedIdiomLayoutSessionPrice {
    return MarkDivideConfig.shared.playLettishSymbolsHeapSpoken.hisNorwegianWarpMetricToneBackupPhonetic;
}

+ (BOOL)breakVisit {
    return MarkDivideConfig.shared.playLettishSymbolsHeapSpoken.greekBeatWet.breakVisit;
}

+ (BOOL)periodWhoMetadataDisableAssistantLimited {
    return [MarkDivideConfig shared].periodWhoMetadataDisableAssistantLimited;
}

+ (NSArray *)paperUpscaleKeepDatabaseTorque {
    NSArray *handlesDiagnoseAcquireCanBrowsing = [CircleManager carLimitedLifetimePlanSearchingPaddle];
    NSMutableArray *blob = [NSMutableArray arrayWithCapacity:handlesDiagnoseAcquireCanBrowsing.count];
    
    for (SobBedIronUse *fun in handlesDiagnoseAcquireCanBrowsing) {
        NSString *image = self.rarePutOther.kernelShowingAtomMidHelperPanorama;
        switch (fun.treeWillType) {
            case HueFlattenLyricistRetryTextual:
                image = self.rarePutOther.sumBulgarianCaptionCommonMaximumIndicated;
                break;
            case DryCarCreatedAccount:
            case CupStillSolidRegister:
                image = self.rarePutOther.kernelShowingAtomMidHelperPanorama;
                break;
            case DimensionReferenceUnifyPassivelySort:
                image = self.rarePutOther.mustPreciseSymmetricTildeDegreeAlone;
                break;

case CropOffListStaleSettingsBack:
                image = self.rarePutOther.hiddenPriceDolbySeleniumDeepAffecting;
                break;
            case RareWhoIgnoredSplitEntities:
                image = self.rarePutOther.decayPriceThousandsCaseTriggered;
                break;
            default:
                image = self.rarePutOther.sumBulgarianCaptionCommonMaximumIndicated;
                break;
        }
        
        NSArray *box = @[fun.optionalName ?: @"",image,fun.quotationVerticalReplyInterlaceDueTime];
        [blob addObject:box];
    }
    
    
    NSArray *costAffine = [blob sortedArrayUsingComparator:^NSComparisonResult(NSArray *a, NSArray *b) {
        double box = [a[2] doubleValue];
        double ask = [b[2] doubleValue];
        if (box > ask) {
            return NSOrderedAscending; 
        } else if (box < ask) {
            return NSOrderedDescending;
        }
        return NSOrderedSame;
    }];
    
    return costAffine;
}

+ (CGSize)textureSemanticsSubmitUnderGrantingSlantSize {
    return CGSizeMake(self.rarePutOther.magicIdenticalSyntheticSubjectThreeWidth, self.rarePutOther.blueFreeMomentImmediateSuggestedSymmetric);
}

+ (UIColor *)eightYardColor{
    return [UIColor fatChromeHomepageRefinedIntensityAnalysis:MarkDivideConfig.shared.playLettishSymbolsHeapSpoken.compressLearnEllipseArmSinStar.eightYardColor?:self.rarePutOther.eightYardColor];
}

+ (UIColor *)ringMatchColor{
    return [UIColor fatChromeHomepageRefinedIntensityAnalysis:MarkDivideConfig.shared.playLettishSymbolsHeapSpoken.compressLearnEllipseArmSinStar.ringMatchColor?:self.rarePutOther.ringMatchColor];
}

+ (UIColor *)failExecHueColor {
    NSString *hex = MarkDivideConfig.shared.playLettishSymbolsHeapSpoken.compressLearnEllipseArmSinStar.failExecHueColor;
    return hex.lyricistPlaceComposerSuggestReplaced ? [UIColor fatChromeHomepageRefinedIntensityAnalysis:hex] : UIColor.whiteColor;
}

+ (UIColor *)popoverEmailMergeEchoSolidColor{
    return [UIColor fatChromeHomepageRefinedIntensityAnalysis:MarkDivideConfig.shared.playLettishSymbolsHeapSpoken.compressLearnEllipseArmSinStar.popoverEmailMergeEchoSolidColor?:self.rarePutOther.popoverEmailMergeEchoSolidColor];
}

+ (NSString *)showSwapFractionRecycleRationalImage{
    NSString *image = MarkDivideConfig.shared.playLettishSymbolsHeapSpoken.compressLearnEllipseArmSinStar.showSwapFractionRecycleRationalImage;
    return image.lyricistPlaceComposerSuggestReplaced ? image : nil;
}

+ (NSString *)dependingBouncingOceanFactoryIncorrectImage{
    NSString *image = MarkDivideConfig.shared.playLettishSymbolsHeapSpoken.compressLearnEllipseArmSinStar.dependingBouncingOceanFactoryIncorrectImage;
    return image.lyricistPlaceComposerSuggestReplaced ? image : nil;
}

+ (void)reminderImmutableBusTabBagAction {
    if (MarkDivideConfig.shared.cityOptAwayStatus != QuitPreviewsLexiconWaistSawArcade) {
        MarkDivideConfig.shared.cityOptAwayStatus = PaletteStillAboutHisLeapDesign;
    }
}

+ (UIView *)sugarPackView {
    if (MarkDivideConfig.shared.playLettishSymbolsHeapSpoken.kannadaStructureFragmentListHueFormatted.lyricistPlaceComposerSuggestReplaced) {
        UIImageView *view = [[UIImageView alloc] init];
        [view sd_setImageWithURL:[NSURL URLWithString:MarkDivideConfig.shared.playLettishSymbolsHeapSpoken.kannadaStructureFragmentListHueFormatted]];
        view.contentMode = UIViewContentModeScaleAspectFit;
        return view;
    }else {
        UILabel *label = [[UILabel alloc] init];
        label.text = [FarIcyInfo doneRoomName];
        label.textColor = [self ringMatchColor];
        label.font = [UIFont systemFontOfSize:30];
        label.textAlignment = NSTextAlignmentCenter;
        return label;
    }
}

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

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

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

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

    NSString *mathClockZero = [self dependingBouncingOceanFactoryIncorrectImage];
    if (mathClockZero) {
        
        [[SDWebImageManager sharedManager] loadImageWithURL:[NSURL URLWithString:mathClockZero]
                                                    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 nineHintItsHasColor:[[UIColor lightGrayColor] colorWithAlphaComponent:0.5f]] forState:UIControlStateHighlighted];
                });
            }
        }];
        
        [button setBackgroundImage:[UIImage nineHintItsHasColor:[self ringMatchColor]] forState:UIControlStateNormal];
    } else {
        
        [button setBackgroundImage:[UIImage nineHintItsHasColor:[self ringMatchColor]] forState:UIControlStateNormal];
        [button setBackgroundImage:[UIImage nineHintItsHasColor:[[UIColor lightGrayColor] colorWithAlphaComponent:0.5f]] forState:UIControlStateHighlighted];
    }

    return button;
}

+ (NSArray *)quickFactoryHowApplePluralPrevious:(id)target action:(SEL)action {
    
    NSMutableArray *array = [[NSMutableArray alloc] init];
    
    for (FloaterModel *fun in MarkDivideConfig.shared.playLettishSymbolsHeapSpoken.phonogramRearrangeExactnessRainStoreSong) {
        UIView *button = [self annotatedCentersSymbolPiecePendingMandarin:fun.factorFoodText
                                           usedSurgeColor:[UIColor fatChromeHomepageRefinedIntensityAnalysis:fun.rejectOverColor]
                                                gaspAlarm:[self appendingCircleFontSunRemaining:fun]
                                           strongClinical:fun.processor
                                                   target:target
                                                   action:action];
        [array addObject:button];
    }
    
    return array;
}

+ (NSString *)appendingCircleFontSunRemaining:(FloaterModel *)fun {
    
    static NSDictionary<NSString *, NSString *> *map;
    static dispatch_once_t mustToken;
    dispatch_once(&mustToken, ^{
        map = @{
            
            self.rarePutOther.liveIllMix    : self.rarePutOther.sumBulgarianCaptionCommonMaximumIndicated,
            self.rarePutOther.fitDecayToo   : self.rarePutOther.mustPreciseSymmetricTildeDegreeAlone,
            self.rarePutOther.capButHexHalf : self.rarePutOther.kernelShowingAtomMidHelperPanorama,

self.rarePutOther.sinkWet       : self.rarePutOther.decayPriceThousandsCaseTriggered,
            self.rarePutOther.trustRawSlice : self.rarePutOther.hiddenPriceDolbySeleniumDeepAffecting,
            self.rarePutOther.hueLoseBus : self.rarePutOther.sumBulgarianCaptionCommonMaximumIndicated
        };
    });
    if (fun.pageEggOut.mediaOurLong) {
        
        fun.pageEggOut = map[fun.processor];
    }
    return fun.pageEggOut;
}

+ (UIView *)annotatedCentersSymbolPiecePendingMandarin:(NSString *)title
                      usedSurgeColor:(UIColor *)titleColor
                           gaspAlarm:(NSString *)image
                      strongClinical:(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 makeSpaIcyProjectsAccounts: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 *itsImage = [[UIImage messagingPictureEggRuleDetachName:image] imageWithRenderingMode:(UIImageRenderingModeAlwaysTemplate)];
        button.tintColor = [self ringMatchColor];
        [button setImage:itsImage 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 = [CupDenyLeap temporalDownloadAdjustSiblingsStyle: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)makeSpaIcyProjectsAccounts:(NSString *)url
{
    NSString *bring =@"[a-zA-z]+://[^\\s]*";
    NSPredicate *predicate = [NSPredicate predicateWithFormat:@"SELF MATCHES %@",bring];
    return [predicate evaluateWithObject:url];
}

+ (UITextField *)yetSixteenLifetimeSymbolBurnLighterCode {
    UITextField *textField = [self phaseBecomeField:self.cutReuseIcyOur.storageEventualIndicatedPlatformUnpluggedLeastCode isSecure:NO];
    textField.textContentType = UITextContentTypeOneTimeCode;
    return textField;
}

+ (UITextField *)showAddFeaturePortionEvictEcho {
    UITextField *textField = [self phaseBecomeField:self.cutReuseIcyOur.factoredPetiteMoireBuffersTrash isSecure:NO];
    textField.keyboardType = UIKeyboardTypeNumberPad;
    return textField;
}

+ (UITextField *)externalDeriveEnclosingOverhangLegibleAccount {
    return [self phaseBecomeField:self.cutReuseIcyOur.mixTaggingToo isSecure:NO];
}

+ (UITextField *)firstGenderCroppingTurnMenPassword:(BOOL)isNew {
    UITextField *textField = [self phaseBecomeField:isNew?self.cutReuseIcyOur.squaredFathomsDissolveDiscardHex:self.cutReuseIcyOur.inferAfterDueKey isSecure:YES];
    [self funnelSumEndsGoalHeadRemotelyMain:textField didSize:CGSizeMake(CupDenyLeap.rarePutOther.dragErrorBag, CupDenyLeap.rarePutOther.dragErrorBag)];
    UIButton * rightButton = [UIButton buttonWithType:UIButtonTypeCustom];
    UIImage *redoImage = [UIImage messagingPictureEggRuleDetachName:self.rarePutOther.purchasedSonTruncatesOutletKelvin];
    UIImage *sensorImage = [UIImage messagingPictureEggRuleDetachName:self.rarePutOther.expandSuggestOrnamentsEyeSubmit];
    rightButton.frame = CGRectMake(0, 0, CupDenyLeap.rarePutOther.dragErrorBag, CupDenyLeap.rarePutOther.dragErrorBag);
    [rightButton setImage:redoImage forState:UIControlStateNormal];
    [rightButton setImage:sensorImage forState:UIControlStateSelected];
    CGFloat cleanFalloff = (CupDenyLeap.rarePutOther.dragErrorBag - 24)/2;
    [rightButton setImageEdgeInsets:UIEdgeInsetsMake(cleanFalloff, cleanFalloff, cleanFalloff, cleanFalloff)];
    rightButton.contentMode = UIViewContentModeScaleAspectFit;
    [textField.rightView addSubview:rightButton];
    return textField;
}

+ (UITextField *)phaseBecomeField:(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 ringMatchColor].CGColor;
    textField.layer.borderWidth = 0.6;
    textField.layer.cornerRadius = self.rarePutOther.timeRecorder;
    
    textField.backgroundColor = [self showSwapFractionRecycleRationalImage] ? UIColor.clearColor : UIColor.whiteColor;
    textField.textColor = UIColor.darkGrayColor;
    textField.attributedPlaceholder = [[NSAttributedString alloc] initWithString:placeholder attributes:@{NSForegroundColorAttributeName: [UIColor lightGrayColor]}];
    [self diacriticMirroredProminentIslamicDepartureExternImage:textField didSize:CGSizeMake(10, CupDenyLeap.rarePutOther.dragErrorBag)];
    textField.rightViewMode = UITextFieldViewModeAlways;
    return textField;
}

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

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