






#import "VitalityTab.h"
#import "NSString+Terabytes.h"
#import "UIImageView+WebCache.h"
#import "LookupInfo.h"
#import "UIColor+AirColor.h"
#import "UIImage+UseImage.h"
#import "Masonry.h"

#import "TaggingTwoConfig.h"
#import "HitBitManager.h"
#import "TeamGrammarCombinedTropicalAlphabet.h"

static CanTallSnapZip *_foggyCycleUnit = nil;
static SixFaxDown *_noneMidMicro = nil;

@implementation VitalityTab

+ (CanTallSnapZip *)foggyCycleUnit {
    if (!_foggyCycleUnit) {
        _foggyCycleUnit = [TeamGrammarCombinedTropicalAlphabet previewsBackupCapEphemeralJoiningCoached:[CanTallSnapZip class]];
    }
    return _foggyCycleUnit;
}

+ (SixFaxDown *)noneMidMicro {
    if (!_noneMidMicro) {
        _noneMidMicro = [TeamGrammarCombinedTropicalAlphabet energyMagneticRemainderPlaceSignCellular:[SixFaxDown class]];
    }
    return _noneMidMicro;
}

+ (NSString *)compareSpeedPhraseBagSolidName {
    return [HitBitManager revealedResolvedButAfterTall].onlyZoomName;
}

+ (NSString *)visionClipCleanupDecomposeFingerToken {
    return [HitBitManager revealedResolvedButAfterTall].raiseAllToken;
}

+ (CGFloat)eyeNearGoogleRatingsFill {
    return TaggingTwoConfig.shared.escapingOnlyPaceAskHertz.sameBitsOcclusionQuoteAdjusted.givenCity?:self.noneMidMicro.lawBandOddBed;
}

+ (NSString *)humanMajorClickBoxCause {
    return TaggingTwoConfig.shared.escapingOnlyPaceAskHertz.sawLabelAdd.eggHasSalt;
}

+ (NSString *)readoutForkTallEmptyDownVisit {
    return TaggingTwoConfig.shared.escapingOnlyPaceAskHertz.sameBitsOcclusionQuoteAdjusted.largeDownloadsUndoModuleSentinel;
}

+ (CGFloat)sumWinApplyUighurDay {
    return TaggingTwoConfig.shared.escapingOnlyPaceAskHertz.sameBitsOcclusionQuoteAdjusted.subsetUsedJumpDisableOffsets;
}
+ (BOOL)subsetUsedJumpDisableOffsets {
    return TaggingTwoConfig.shared.escapingOnlyPaceAskHertz.sameBitsOcclusionQuoteAdjusted.subsetUsedJumpDisableOffsets;
}

+ (NSString *)expertSlopeOfferFeedbackTatar {
    return TaggingTwoConfig.shared.escapingOnlyPaceAskHertz.trySomaliEra.filmApplyQuiet;
}
+ (NSString *)integrateRootLocalTabEast {
    return TaggingTwoConfig.shared.escapingOnlyPaceAskHertz.trySomaliEra.pickManParse;
}

+ (BOOL)sequenceMembersFailCanonDay {
    return TaggingTwoConfig.shared.escapingOnlyPaceAskHertz.gramNotifyingNearbyArrangedMostLingerHelp;
}

+ (BOOL)dayNearest {
    return TaggingTwoConfig.shared.escapingOnlyPaceAskHertz.trySomaliEra.dayNearest;
}

+ (BOOL)firstLongSequencerDissolveLocallyClinical {
    return [TaggingTwoConfig shared].firstLongSequencerDissolveLocallyClinical;
}

+ (NSArray *)currentlyIllegalTrainingSixCan {
    NSArray *punjabiLyricistLegacyAudienceSilent = [HitBitManager organizeClipSoftSegmentsFrameMust];
    NSMutableArray *lose = [NSMutableArray arrayWithCapacity:punjabiLyricistLegacyAudienceSilent.count];
    
    for (FixingUrgency *saw in punjabiLyricistLegacyAudienceSilent) {
        NSString *image = self.noneMidMicro.referentSameEncodedDisablePhraseOccurred;
        switch (saw.sexSlashType) {
            case ReturningSetupDayTamilInsertion:
                image = self.noneMidMicro.tenAwayTheDescendCarbonMatrix;
                break;
            case PenLogoHerButAccount:
            case BatchHalftoneRegister:
                image = self.noneMidMicro.referentSameEncodedDisablePhraseOccurred;
                break;
            case SenderShapeDissolveProceedScreen:
                image = self.noneMidMicro.messagingBulgarianFormTapDuplicateDependent;
                break;
                
case UploadedCanSeventeenSolutionsRotate:
                image = self.noneMidMicro.withHostingMagnesiumFormDetermine;
                break;
            case SawAuditGloballyComplexManyCount:
                image = self.noneMidMicro.ratingsPrepIndexingEraPointerEar;
                break;

            default:
                image = self.noneMidMicro.tenAwayTheDescendCarbonMatrix;
                break;
        }
        
        NSArray *fit = @[saw.onlyZoomName ?: @"",image,saw.pagerSugarNapExecStereoTime];
        [lose addObject:fit];
    }
    
    
    NSArray *overlayDog = [lose sortedArrayUsingComparator:^NSComparisonResult(NSArray *a, NSArray *b) {
        double era = [a[2] doubleValue];
        double two = [b[2] doubleValue];
        if (era > two) {
            return NSOrderedAscending; 
        } else if (era < two) {
            return NSOrderedDescending;
        }
        return NSOrderedSame;
    }];
    
    return overlayDog;
}

+ (CGSize)tallReadyTryMagnitudeOverlapRedoSize {
    return CGSizeMake(self.noneMidMicro.bufferDeliverBikeDiastolicSpecifierWidth, self.noneMidMicro.zoomPairUnlikelySlopeWaxMargins);
}

+ (UIColor *)leaseWakeColor{
    return [UIColor shotInsidePushSpacingRenewingMetal:TaggingTwoConfig.shared.escapingOnlyPaceAskHertz.cutoffKazakhDetectsEntitiesLocationsPhase.leaseWakeColor?:self.noneMidMicro.leaseWakeColor];
}

+ (UIColor *)didCancelColor{
    return [UIColor shotInsidePushSpacingRenewingMetal:TaggingTwoConfig.shared.escapingOnlyPaceAskHertz.cutoffKazakhDetectsEntitiesLocationsPhase.didCancelColor?:self.noneMidMicro.didCancelColor];
}

+ (UIColor *)newsstandUseRemoveAscenderWetColor{
    return [UIColor shotInsidePushSpacingRenewingMetal:TaggingTwoConfig.shared.escapingOnlyPaceAskHertz.cutoffKazakhDetectsEntitiesLocationsPhase.newsstandUseRemoveAscenderWetColor?:self.noneMidMicro.newsstandUseRemoveAscenderWetColor];
}

+ (void)sameRenderedComposeBinaryCautionAction {
    if (TaggingTwoConfig.shared.useQuoteRunStatus != ThermalCropAndChatterSaveLaunch) {
        TaggingTwoConfig.shared.useQuoteRunStatus = PositionPaceCricketSubTokenMax;
    }
}

+ (UIView *)ropePagerView {
    if (TaggingTwoConfig.shared.escapingOnlyPaceAskHertz.telephotoExposeFormatsPermuteKilohertzAny.parsecsRuleSmallerNapOverride) {
        UIImageView *view = [[UIImageView alloc] init];
        [view sd_setImageWithURL:[NSURL URLWithString:TaggingTwoConfig.shared.escapingOnlyPaceAskHertz.telephotoExposeFormatsPermuteKilohertzAny]];
        view.contentMode = UIViewContentModeScaleAspectFit;
        return view;
    }else {
        UILabel *label = [[UILabel alloc] init];
        label.text = [LookupInfo cutOwnerName];
        label.textColor = [self didCancelColor];
        label.font = [UIFont systemFontOfSize:30];
        label.textAlignment = NSTextAlignmentCenter;
        return label;
    }
}

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

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

+ (UIButton *)cousinAlertRomanVibrancyIdleColor:(NSString *)title {
    
    UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
    [button setTitle:title forState:UIControlStateNormal];
    [button setBackgroundImage:[UIImage barWasSeeRoundColor:[self didCancelColor]] forState:UIControlStateNormal];
    [button setBackgroundImage:[UIImage barWasSeeRoundColor:[[UIColor lightGrayColor] colorWithAlphaComponent:0.5f]] forState:UIControlStateHighlighted];
    button.titleLabel.font = [UIFont systemFontOfSize:16];
    button.layer.cornerRadius = 2.f;
    button.layer.masksToBounds = YES;
    return button;
}

+ (NSArray *)acceptFilteringStiffnessHexBiotinPerformer:(id)target action:(SEL)action {
    
    NSMutableArray *array = [[NSMutableArray alloc] init];
    
    for (KeepDueModel *saw in TaggingTwoConfig.shared.escapingOnlyPaceAskHertz.bannerOnlyHomepageWarnBeforeCoalesced) {
        UIView *button = [self rotorGallonReceiveAndAmbientVisible:saw.cubicPivotText
                                           offDarkenColor:[UIColor shotInsidePushSpacingRenewingMetal:saw.wakeHisDueColor]
                                                pieceDate:[self whoSubmittedRangeRejectUpside:saw]
                                           pinYetSigmaDog:saw.depending
                                                   target:target
                                                   action:action];
        [array addObject:button];
    }
    
    return array;
}

+ (NSString *)whoSubmittedRangeRejectUpside:(KeepDueModel *)saw {
    
    static NSDictionary<NSString *, NSString *> *map;
    static dispatch_once_t sinkToken;
    dispatch_once(&sinkToken, ^{
        map = @{
            
            self.noneMidMicro.ourMinimum    : self.noneMidMicro.tenAwayTheDescendCarbonMatrix,
            self.noneMidMicro.soccerBasal   : self.noneMidMicro.messagingBulgarianFormTapDuplicateDependent,
            self.noneMidMicro.fourMidBadRow : self.noneMidMicro.referentSameEncodedDisablePhraseOccurred,
self.noneMidMicro.proceed       : self.noneMidMicro.withHostingMagnesiumFormDetermine,
            self.noneMidMicro.wasBadAskCocoa: self.noneMidMicro.ratingsPrepIndexingEraPointerEar,

        };
    });
    if (saw.eggHasSalt.alertGetSolo) {
        
        saw.eggHasSalt = map[saw.depending];
    }
    return saw.eggHasSalt;
}

+ (UIView *)rotorGallonReceiveAndAmbientVisible:(NSString *)title
                      offDarkenColor:(UIColor *)titleColor
                           pieceDate:(NSString *)image
                      pinYetSigmaDog:(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 beenSoccerWindowsBasqueCursor: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 *dryImage = [[UIImage diskOrderedCampaignThemeAdjectiveName:image] imageWithRenderingMode:(UIImageRenderingModeAlwaysTemplate)];
        button.tintColor = [self didCancelColor];
        [button setImage:dryImage 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 = [VitalityTab shelfUploadedLogAndGoogle: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)beenSoccerWindowsBasqueCursor:(NSString *)url
{
    NSString *today =@"[a-zA-z]+://[^\\s]*";
    NSPredicate *predicate = [NSPredicate predicateWithFormat:@"SELF MATCHES %@",today];
    return [predicate evaluateWithObject:url];
}

+ (UITextField *)forceYetAdjustedReturningValueEnumerateCode {
    UITextField *textField = [self menBayerRunField:self.foggyCycleUnit.unsignedReservedConnectedStepperLocaleSurgeCode isSecure:NO];
    textField.textContentType = UITextContentTypeOneTimeCode;
    return textField;
}

+ (UITextField *)languageMusicalFocusOuterBackwardsDefines {
    UITextField *textField = [self menBayerRunField:self.foggyCycleUnit.packDecodeMismatchForwardTen isSecure:NO];
    textField.keyboardType = UIKeyboardTypeNumberPad;
    return textField;
}

+ (UITextField *)mainArmSinNarrativeAccessoryAccount {
    return [self menBayerRunField:self.foggyCycleUnit.justRoundHigh isSecure:NO];
}

+ (UITextField *)elevatedIndexFootnoteSnapshotDaughtersPassword:(BOOL)isNew {
    UITextField *textField = [self menBayerRunField:isNew?self.foggyCycleUnit.anchorCellStepsonSingularService:self.foggyCycleUnit.localEraQueryKey isSecure:YES];
    [self peerIslamicBothMutableModernEachCar:textField sixSize:CGSizeMake(VitalityTab.noneMidMicro.minEmailRows, VitalityTab.noneMidMicro.minEmailRows)];
    UIButton * rightButton = [UIButton buttonWithType:UIButtonTypeCustom];
    UIImage *bothImage = [UIImage diskOrderedCampaignThemeAdjectiveName:self.noneMidMicro.alternatePickOperationBedEllipse];
    UIImage *runRawImage = [UIImage diskOrderedCampaignThemeAdjectiveName:self.noneMidMicro.winChangingCallBasalInactive];
    rightButton.frame = CGRectMake(0, 0, VitalityTab.noneMidMicro.minEmailRows, VitalityTab.noneMidMicro.minEmailRows);
    [rightButton setImage:bothImage forState:UIControlStateNormal];
    [rightButton setImage:runRawImage forState:UIControlStateSelected];
    CGFloat mayBypassMen = (VitalityTab.noneMidMicro.minEmailRows - 24)/2;
    [rightButton setImageEdgeInsets:UIEdgeInsetsMake(mayBypassMen, mayBypassMen, mayBypassMen, mayBypassMen)];
    rightButton.contentMode = UIViewContentModeScaleAspectFit;
    [textField.rightView addSubview:rightButton];
    return textField;
}

+ (UITextField *)menBayerRunField:(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 didCancelColor].CGColor;
    textField.layer.borderWidth = 0.6;
    textField.layer.cornerRadius = 2;
    textField.backgroundColor = UIColor.whiteColor;
    textField.textColor = UIColor.darkGrayColor;
    textField.attributedPlaceholder = [[NSAttributedString alloc] initWithString:placeholder attributes:@{NSForegroundColorAttributeName: [UIColor lightGrayColor]}];
    [self allowableExistentDatumSourcePanelAreTall:textField sixSize:CGSizeMake(10, VitalityTab.noneMidMicro.minEmailRows)];
    textField.rightViewMode = UITextFieldViewModeAlways;
    return textField;
}

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

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