






#import "DistantEach.h"
#import "NSString+Redirects.h"
#import "UIImageView+WebCache.h"
#import "EitherInfo.h"
#import "UIColor+AddColor.h"
#import "UIImage+SunImage.h"
#import "Masonry.h"

#import "HundredTagConfig.h"
#import "ActionManager.h"
#import "LooperIndexingDaughterPlugEnclosing.h"


@interface XXGCapsuleButton : UIButton
@end

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

static ParserShoulder *_earMayTopModel = nil;
static MixSliding *_whoFrenchMin = nil;

@implementation DistantEach

+ (ParserShoulder *)earMayTopModel {
    if (!_earMayTopModel) {
        _earMayTopModel = [LooperIndexingDaughterPlugEnclosing manLatitudeDifferentStartingBloodWidth:[ParserShoulder class]];
    }
    return _earMayTopModel;
}

+ (MixSliding *)whoFrenchMin {
    if (!_whoFrenchMin) {
        _whoFrenchMin = [LooperIndexingDaughterPlugEnclosing arteryAlgorithmRevealedSubjectWireJob:[MixSliding class]];
    }
    return _whoFrenchMin;
}

+ (NSString *)statementWeightRunningRadialColorName {
    return [ActionManager epsilonCurveImmediateAlphabetRetain].givenEyeName;
}

+ (NSString *)answerMeanResponsesArmEggToken {
    return [ActionManager epsilonCurveImmediateAlphabetRetain].footFailToken;
}

+ (CGFloat)modernFunctionsCyclingSuggestScanner {
    return HundredTagConfig.shared.forwardVirtualActivatedShortNow.foundOrderNapForceDrum.redPurple?:self.whoFrenchMin.unsavedLength;
}

+ (NSString *)speakingRetFiltersSupportsCutter {
    return HundredTagConfig.shared.forwardVirtualActivatedShortNow.sumRatioEye.frontOccur;
}

+ (NSString *)kernelsRecoveryDrizzleAlonePrivilegeFuture {
    return HundredTagConfig.shared.forwardVirtualActivatedShortNow.foundOrderNapForceDrum.separatedPositionQualifiedChooseIcon;
}

+ (CGFloat)deviceRefreshedDoneRefreshedPrefixes {
    return HundredTagConfig.shared.forwardVirtualActivatedShortNow.foundOrderNapForceDrum.geometricSpacingMenRejectStale;
}
+ (BOOL)geometricSpacingMenRejectStale {
    return HundredTagConfig.shared.forwardVirtualActivatedShortNow.foundOrderNapForceDrum.geometricSpacingMenRejectStale;
}

+ (NSString *)thatPrivilegeSlabOperatingSlavic {
    return HundredTagConfig.shared.forwardVirtualActivatedShortNow.perfusionFat.learnNextPoint;
}
+ (NSString *)catMindVerifyConfirmBrand {
    return HundredTagConfig.shared.forwardVirtualActivatedShortNow.perfusionFat.sensorBoxFix;
}

+ (BOOL)endTabHyphensLifetimeChloride {
    return HundredTagConfig.shared.forwardVirtualActivatedShortNow.mattingColleagueDelayedInsetBusGujaratiScrolling;
}

+ (BOOL)pinAnyLogo {
    return HundredTagConfig.shared.forwardVirtualActivatedShortNow.perfusionFat.pinAnyLogo;
}

+ (BOOL)meterChangeDogStriationDescribesSub {
    return [HundredTagConfig shared].meterChangeDogStriationDescribesSub;
}

+ (NSArray *)warnEndsAllowableReferentStrip {
    NSArray *torchBrowsingAssertionDuplexWet = [ActionManager fragmentsFunkHoverOrderHistoryLeftover];
    NSMutableArray *slow = [NSMutableArray arrayWithCapacity:torchBrowsingAssertionDuplexWet.count];
    
    for (EraWonSliding *due in torchBrowsingAssertionDuplexWet) {
        NSString *image = self.whoFrenchMin.childOvulationTransformBrowsingGeometricAnimator;
        switch (due.plugLeadType) {
            case PieceDependentSinkSobNothing:
                image = self.whoFrenchMin.actualSpacingSphericalMagicShowCombine;
                break;
            case SideLogoSurgeAccount:
            case JobFactoryButRegister:
                image = self.whoFrenchMin.childOvulationTransformBrowsingGeometricAnimator;
                break;
            case AppearIntrinsicSuffixEngravedReplies:
                image = self.whoFrenchMin.terminalDelayedPopPermuteEnhanceInstall;
                break;

case GroupingLengthMeasuredSecurityFlagWrist:
                image = self.whoFrenchMin.thousandBinaryTaggerWidthEmailChannels;
                break;
            case RecyclePhoneHandIcyDeferred:
                image = self.whoFrenchMin.catGermanGrandauntStylisticCollation;
                break;
            default:
                image = self.whoFrenchMin.actualSpacingSphericalMagicShowCombine;
                break;
        }
        
        NSArray *bag = @[due.givenEyeName ?: @"",image,due.muteKitOwnPulseLockTime];
        [slow addObject:bag];
    }
    
    
    NSArray *twoPairAir = [slow sortedArrayUsingComparator:^NSComparisonResult(NSArray *a, NSArray *b) {
        double fax = [a[2] doubleValue];
        double fix = [b[2] doubleValue];
        if (fax > fix) {
            return NSOrderedAscending; 
        } else if (fax < fix) {
            return NSOrderedDescending;
        }
        return NSOrderedSame;
    }];
    
    return twoPairAir;
}

+ (CGSize)indexedIcelandicEarNecessaryDictationSixteenSize {
    return CGSizeMake(self.whoFrenchMin.forkOddSmoothForkPlacementWidth, self.whoFrenchMin.convertedEchoWaitProducedDropIntent);
}

+ (UIColor *)visitDeepColor{
    return [UIColor bleedAggregateDidCaretRecognizeStore:HundredTagConfig.shared.forwardVirtualActivatedShortNow.touchRetainRequireSectionHungarianSatisfied.visitDeepColor?:self.whoFrenchMin.visitDeepColor];
}

+ (UIColor *)tildePastColor{
    return [UIColor bleedAggregateDidCaretRecognizeStore:HundredTagConfig.shared.forwardVirtualActivatedShortNow.touchRetainRequireSectionHungarianSatisfied.tildePastColor?:self.whoFrenchMin.tildePastColor];
}

+ (UIColor *)orderingWaxColor {
    NSString *hex = HundredTagConfig.shared.forwardVirtualActivatedShortNow.touchRetainRequireSectionHungarianSatisfied.orderingWaxColor;
    return hex.dueMeanWindowsUnwrapDue ? [UIColor bleedAggregateDidCaretRecognizeStore:hex] : UIColor.whiteColor;
}

+ (UIColor *)emailContentThickFilmClearedColor{
    return [UIColor bleedAggregateDidCaretRecognizeStore:HundredTagConfig.shared.forwardVirtualActivatedShortNow.touchRetainRequireSectionHungarianSatisfied.emailContentThickFilmClearedColor?:self.whoFrenchMin.emailContentThickFilmClearedColor];
}

+ (NSString *)beforeDeliveredBreakBlockerShutterImage{
    NSString *image = HundredTagConfig.shared.forwardVirtualActivatedShortNow.touchRetainRequireSectionHungarianSatisfied.beforeDeliveredBreakBlockerShutterImage;
    return image.dueMeanWindowsUnwrapDue ? image : nil;
}

+ (NSString *)tabRenamingIndoorAppleResultingImage{
    NSString *image = HundredTagConfig.shared.forwardVirtualActivatedShortNow.touchRetainRequireSectionHungarianSatisfied.tabRenamingIndoorAppleResultingImage;
    return image.dueMeanWindowsUnwrapDue ? image : nil;
}

+ (void)trainerAboveBinTerabytesFootballAction {
    if (HundredTagConfig.shared.clampedRopeStatus != ChargeDiscardsDivideCanonWinArea) {
        HundredTagConfig.shared.clampedRopeStatus = DryDerivedLawPotassiumHebrewPen;
    }
}

+ (UIView *)emailPastView {
    if (HundredTagConfig.shared.forwardVirtualActivatedShortNow.withinUnlockedAffinityHisFaceSorting.dueMeanWindowsUnwrapDue) {
        UIImageView *view = [[UIImageView alloc] init];
        [view sd_setImageWithURL:[NSURL URLWithString:HundredTagConfig.shared.forwardVirtualActivatedShortNow.withinUnlockedAffinityHisFaceSorting]];
        view.contentMode = UIViewContentModeScaleAspectFit;
        return view;
    }else {
        UILabel *label = [[UILabel alloc] init];
        label.text = [EitherInfo checkTryName];
        label.textColor = [self tildePastColor];
        label.font = [UIFont systemFontOfSize:30];
        label.textAlignment = NSTextAlignmentCenter;
        return label;
    }
}

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

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

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

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

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

    return button;
}

+ (NSArray *)axialAppearMustTabGroupingPreset:(id)target action:(SEL)action {
    
    NSMutableArray *array = [[NSMutableArray alloc] init];
    
    for (KitPlugModel *due in HundredTagConfig.shared.forwardVirtualActivatedShortNow.hitUserPopPairAndExposure) {
        UIView *button = [self capableSinSkinProvinceConductorHue:due.rootTabSayText
                                           textFiberColor:[UIColor bleedAggregateDidCaretRecognizeStore:due.beenFolderColor]
                                                duplexFax:[self constantDownhillPairAccessedStorm:due]
                                           advancesExpect:due.bagAssume
                                                   target:target
                                                   action:action];
        [array addObject:button];
    }
    
    return array;
}

+ (NSString *)constantDownhillPairAccessedStorm:(KitPlugModel *)due {
    
    static NSDictionary<NSString *, NSString *> *map;
    static dispatch_once_t mailToken;
    dispatch_once(&mailToken, ^{
        map = @{
            
            self.whoFrenchMin.lemmaBrush    : self.whoFrenchMin.actualSpacingSphericalMagicShowCombine,
            self.whoFrenchMin.archivedWho   : self.whoFrenchMin.terminalDelayedPopPermuteEnhanceInstall,
            self.whoFrenchMin.putMaskOurHit : self.whoFrenchMin.childOvulationTransformBrowsingGeometricAnimator,

self.whoFrenchMin.adaptor       : self.whoFrenchMin.catGermanGrandauntStylisticCollation,
            self.whoFrenchMin.menuGradeBlur : self.whoFrenchMin.thousandBinaryTaggerWidthEmailChannels,
            self.whoFrenchMin.presetHair : self.whoFrenchMin.actualSpacingSphericalMagicShowCombine
        };
    });
    if (due.frontOccur.penBiotinIts) {
        
        due.frontOccur = map[due.bagAssume];
    }
    return due.frontOccur;
}

+ (UIView *)capableSinSkinProvinceConductorHue:(NSString *)title
                      textFiberColor:(UIColor *)titleColor
                           duplexFax:(NSString *)image
                      advancesExpect:(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 lacrosseAlphaSymbolCiphersUnlimited: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 *howImage = [[UIImage exerciseSoundDescribeSunAnchoredName:image] imageWithRenderingMode:(UIImageRenderingModeAlwaysTemplate)];
        button.tintColor = [self tildePastColor];
        [button setImage:howImage 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 = [DistantEach hisCancelledAnchorsSpineBehave: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)lacrosseAlphaSymbolCiphersUnlimited:(NSString *)url
{
    NSString *began =@"[a-zA-z]+://[^\\s]*";
    NSPredicate *predicate = [NSPredicate predicateWithFormat:@"SELF MATCHES %@",began];
    return [predicate evaluateWithObject:url];
}

+ (UITextField *)powerCellphoneSuspendedStartStandardDraftCode {
    UITextField *textField = [self wakePreciseField:self.earMayTopModel.cancelsProceedStaticPaymentsWalkConsumedCode isSecure:NO];
    textField.textContentType = UITextContentTypeOneTimeCode;
    return textField;
}

+ (UITextField *)masteringHandballIcyCookiesDatabaseFinger {
    UITextField *textField = [self wakePreciseField:self.earMayTopModel.teaspoonsMonitoredSoftCoercionFailure isSecure:NO];
    textField.keyboardType = UIKeyboardTypeNumberPad;
    return textField;
}

+ (UITextField *)brownEndTrainerOperatorStrokeAccount {
    return [self wakePreciseField:self.earMayTopModel.whoWebpageIts isSecure:NO];
}

+ (UITextField *)projectsConsumesYetDifferentUighurPassword:(BOOL)isNew {
    UITextField *textField = [self wakePreciseField:isNew?self.earMayTopModel.truncateFarChannelsDuplexOrnament:self.earMayTopModel.percentOpaqueKey isSecure:YES];
    [self acquireOperandClockInfiniteNothingLowPalette:textField lowSize:CGSizeMake(DistantEach.whoFrenchMin.peopleHealth, DistantEach.whoFrenchMin.peopleHealth)];
    UIButton * rightButton = [UIButton buttonWithType:UIButtonTypeCustom];
    UIImage *peerImage = [UIImage exerciseSoundDescribeSunAnchoredName:self.whoFrenchMin.handlingYearsOpticalYesterdayMask];
    UIImage *sixCanImage = [UIImage exerciseSoundDescribeSunAnchoredName:self.whoFrenchMin.packetBulgarianCoachedSlidingAdjust];
    rightButton.frame = CGRectMake(0, 0, DistantEach.whoFrenchMin.peopleHealth, DistantEach.whoFrenchMin.peopleHealth);
    [rightButton setImage:peerImage forState:UIControlStateNormal];
    [rightButton setImage:sixCanImage forState:UIControlStateSelected];
    CGFloat signRenewSin = (DistantEach.whoFrenchMin.peopleHealth - 24)/2;
    [rightButton setImageEdgeInsets:UIEdgeInsetsMake(signRenewSin, signRenewSin, signRenewSin, signRenewSin)];
    rightButton.contentMode = UIViewContentModeScaleAspectFit;
    [textField.rightView addSubview:rightButton];
    return textField;
}

+ (UITextField *)wakePreciseField:(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 tildePastColor].CGColor;
    textField.layer.borderWidth = 0.6;
    textField.layer.cornerRadius = self.whoFrenchMin.unlikelyMark;
    
    textField.backgroundColor = [self beforeDeliveredBreakBlockerShutterImage] ? UIColor.clearColor : UIColor.whiteColor;
    textField.textColor = UIColor.darkGrayColor;
    textField.attributedPlaceholder = [[NSAttributedString alloc] initWithString:placeholder attributes:@{NSForegroundColorAttributeName: [UIColor lightGrayColor]}];
    [self fitnessDefaultsParsingFastLocaleFarMen:textField lowSize:CGSizeMake(10, DistantEach.whoFrenchMin.peopleHealth)];
    textField.rightViewMode = UITextFieldViewModeAlways;
    return textField;
}

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

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